diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index bd60f2e67ceacc..7df4df2dd167f1 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -15,7 +15,7 @@ ] }, "microsoft.dotnet.xharness.cli": { - "version": "8.0.0-prerelease.23407.2", + "version": "8.0.0-prerelease.23456.2", "commands": [ "xharness" ] diff --git a/.devcontainer/libraries/Dockerfile b/.devcontainer/Dockerfile similarity index 100% rename from .devcontainer/libraries/Dockerfile rename to .devcontainer/Dockerfile diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000000000..ed9d1f78e2f502 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,48 @@ +// For format details, see https://aka.ms/devcontainer.json. +{ + "name": "Standard configuration", + "build": { + "dockerfile": "Dockerfile", + "args": { + // Update 'VARIANT' to pick a .NET Core version: 6.0, 7.0 + "VARIANT": "6.0-jammy" + } + }, + "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" + } + } + }, + + // 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/libraries/devcontainer.json b/.devcontainer/libraries/devcontainer.json index 4e6b891872c4bb..1cb53754298ab2 100644 --- a/.devcontainer/libraries/devcontainer.json +++ b/.devcontainer/libraries/devcontainer.json @@ -1,8 +1,8 @@ // For format details, see https://aka.ms/devcontainer.json. { - "name": "C# (.NET)", + "name": "Libraries/Runtime development (prebuilt)", "build": { - "dockerfile": "Dockerfile", + "dockerfile": "../Dockerfile", "args": { // Update 'VARIANT' to pick a .NET Core version: 6.0, 7.0 "VARIANT": "6.0-jammy" diff --git a/.devcontainer/scripts/onCreateCommand.sh b/.devcontainer/scripts/onCreateCommand.sh index 09b7478bbaca90..c47eb6b7a0d1d1 100755 --- a/.devcontainer/scripts/onCreateCommand.sh +++ b/.devcontainer/scripts/onCreateCommand.sh @@ -19,7 +19,7 @@ case "$opt" in ./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 + ./dotnet.sh tool install dotnet-serve --version 1.10.172 --tool-path ./.dotnet-tools-global ;; esac diff --git a/.devcontainer/wasm/devcontainer.json b/.devcontainer/wasm/devcontainer.json index 5c99a66e8c5485..ff3a23960d7d4f 100644 --- a/.devcontainer/wasm/devcontainer.json +++ b/.devcontainer/wasm/devcontainer.json @@ -1,6 +1,6 @@ // For format details, see https://aka.ms/devcontainer.json. { - "name": "C# (.NET)", + "name": "WASM development (prebuilt)", "build": { "dockerfile": "Dockerfile", "args": { diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 22648cbe1e4e8d..ab341bf12b5d90 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -39,7 +39,7 @@ /src/mono/mono/mini @vargaz @lambdageek @SamMonoRT /src/mono/mono/mini/*cfgdump* @vargaz /src/mono/mono/mini/*exceptions* @vargaz @BrzVlad -/src/mono/mono/mini/*llvm* @vargaz +/src/mono/mono/mini/*llvm* @vargaz @fanyang-mono /src/mono/mono/mini/*ppc* @vargaz /src/mono/mono/mini/*profiler* @BrzVlad @lambdageek /src/mono/mono/mini/*riscv* @vargaz @lambdageek @@ -47,6 +47,7 @@ /src/mono/mono/mini/debugger-agent.c @vargaz @thaystg @lambdageek /src/mono/mono/mini/interp/* @BrzVlad @vargaz @kotlarmilos /src/mono/mono/mini/interp/*jiterp* @kg +/src/mono/mono/mini/*simd* @fanyang-mono /src/mono/mono/profiler @BrzVlad @lambdageek /src/mono/mono/sgen @BrzVlad @lambdageek @SamMonoRT diff --git a/.github/fabricbot.json b/.github/fabricbot.json index 43a7dceabb3c6b..ff4b8e8acc4367 100644 --- a/.github/fabricbot.json +++ b/.github/fabricbot.json @@ -59,6 +59,15 @@ "vargaz" ] }, + { + "labels": [ + "area-Codegen-Intrinsics-mono" + ], + "mentionees": [ + "SamMonoRT", + "fanyang-mono" + ] + }, { "labels": [ "area-CodeGen-meta-Mono" diff --git a/Directory.Build.props b/Directory.Build.props index f6776738457046..4d3e8a8408abfe 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -80,7 +80,7 @@ - 8.0 + 9.0 .NETCoreApp $(NetCoreAppCurrentIdentifier),Version=v$(NetCoreAppCurrentVersion) Microsoft.NETCore.App @@ -88,16 +88,17 @@ net$(NetCoreAppCurrentVersion) - 7.0 + 8.0 net$(NetCoreAppPreviousVersion) $(NetCoreAppCurrent) - net6.0 + net8.0 $(NetCoreAppCurrent) + in src/mono/wasm/build/WasmApp.LocalBuild.props + and in src/mono/msbuild/apple/build/AppleBuild.LocalBuild.props in sync --> 8.0 net$(NetCoreAppToolCurrentVersion) $(NetCoreAppCurrentIdentifier),Version=v$(NetCoreAppToolCurrentVersion) @@ -114,8 +115,8 @@ - 7.0.0 - net7.0 + 8.0.0-rc.1.23415.6 + net8.0 $(NetFrameworkToolCurrent) @@ -136,6 +137,7 @@ $(Configuration) $(Configuration) $(Configuration) + $(Configuration) @@ -429,6 +431,7 @@ false + @@ -468,4 +471,11 @@ $(RepositoryEngineeringDir)NoTargetsSdk.BeforeTargets.targets $(RepositoryEngineeringDir)TraversalSdk.AfterTargets.targets + + + + $([MSBuild]::NormalizePath('$(ArtifactsBinDir)', 'Microsoft.NETCore.Platforms', 'runtime.json')) + $([MSBuild]::NormalizePath('$(LibrariesProjectRoot)', 'Microsoft.NETCore.Platforms', 'src', 'runtime.json')) + + diff --git a/Directory.Build.targets b/Directory.Build.targets index 933f4d7f4bf10e..c4c006eb266d53 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -15,6 +15,7 @@ + - $(ProductVersion) - $(ProductVersion) - $(ProductVersion) - $(ProductVersion) + diff --git a/NuGet.config b/NuGet.config index 80dd215a4bf01b..4ec29de552c2b6 100644 --- a/NuGet.config +++ b/NuGet.config @@ -20,6 +20,8 @@ + + diff --git a/docs/coding-guidelines/mono-code-guide.md b/docs/coding-guidelines/mono-code-guide.md index 839c3cc365e277..334aebab25a956 100644 --- a/docs/coding-guidelines/mono-code-guide.md +++ b/docs/coding-guidelines/mono-code-guide.md @@ -61,6 +61,49 @@ There are actually three boolean types to keep in mind: * `MonoBoolean` used as an interop type with C# bool in internal calls * `mono_bool` used by the public C API - generally new code shouldn't use it except when adding a new public API function. +## Newer features of C11 and later + +Mono is currently (2023) written in C11. + +### Static asserts + +Use `static_assert` liberally. Include ``. If you cannot include `` (for +example because it introduces conflicting symbols or macros), use `g_static_assert`. Do not use +`_Static_assert` directly (see how `g_static_assert` is defined). Rationale: C23 deprecates +`_Static_assert`. + +### Threads, locks, `call_once` + +Due to mono's threading model and cooperative GC, using C threading and locking primitives directly +is not ok. Prefer `MonoCoopMutex`, `MonoCoopCond` that have GC-aware locking/waiting operations. +If you need them, use `mono_mutex_t`, `mono_cond_t`, etc for cases where GC transitions are +prohibitively costly and you can guarantee that the lock will never be taken by a GC initiator or by +a mix of threads in GC cooperative and GC preemptive mode. + +Using standard C threads and `call_once` in native library PInvokes outside the runtime is okay. + +Using standard C mutexes and condition variables in native library PInvokes outside the runtime is +okay if the locks are not shared with the runtime internals. + +### Thread locals + +FIXME: no guidance yet + +### Atomics + +The C standard atomics are not guaranteed to be lock-free. Use the mono `mono_atomic_` functions +(some of which may be implemented in terms of standard C atomics on some platforms). We do not in +general want locking because it would not be GC aware and may deadlock the cooperative GC. + +Uses of `_Atomic` are a code smell in Mono. + +Using standard C atomics in native library PInvokes outside the runtime is okay provided the atomics +aren't also accessed inside the runtime internals. + +### Generic operations + +FIXME: no guidance for `_Generic` yet. + ## Utility and platform abstraction functions Mono generally tries to fill in POSIX-like abstractions on platforms that lack them (for example, Windows). @@ -251,3 +294,4 @@ calling Mono internals. In general new code should not do this. When modifying existing code, mysterious WASM failures may be attributed to symbol signature mismatches between WASM and the Mono runtime. + diff --git a/docs/deep-dive-blog-posts.md b/docs/deep-dive-blog-posts.md index b0927c9eb242a8..56e29a1f587f52 100644 --- a/docs/deep-dive-blog-posts.md +++ b/docs/deep-dive-blog-posts.md @@ -3,12 +3,13 @@ ### Posts that take a high-level overview of releases - [Corestart 2.0: What's new for performance in .NET Core 2.0](https://www.ageofascent.com/2017/11/05/perfromance-dotnet-core-2-corestart-conference/) -- [Performance improvements in .NET Core 2.0](https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-core/) -- [Performance improvements in .NET Core 2.1](https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-core-2-1/) -- [Performance improvements in .NET Core 3.0](https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-core-3-0/) -- [Performance improvements in .NET 5](https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-5/) -- [Performance improvements in .NET 6](https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-6/) -- [Performance improvements in .NET 7](https://devblogs.microsoft.com/dotnet/performance_improvements_in_net_7/) +- [Performance Improvements in .NET Core 2.0](https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-core/) +- [Performance Improvements in .NET Core 2.1](https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-core-2-1/) +- [Performance Improvements in .NET Core 3.0](https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-core-3-0/) +- [Performance Improvements in .NET 5](https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-5/) +- [Performance Improvements in .NET 6](https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-6/) +- [Performance Improvements in .NET 7](https://devblogs.microsoft.com/dotnet/performance_improvements_in_net_7/) +- [Performance Improvements in .NET 8](https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-8/) ### Posts that take a high-level look at the entire source: diff --git a/docs/design/features/host-runtime-information.md b/docs/design/features/host-runtime-information.md index be57e04f8b7c27..d15009272072d7 100644 --- a/docs/design/features/host-runtime-information.md +++ b/docs/design/features/host-runtime-information.md @@ -12,7 +12,7 @@ Relying on key-value strings as part of initialization of the runtime comes with - Each property comes with non-trivial overhead. As the properties flow through the hosting layer, runtime, and libraries, multiple copies are made of each name and value. - Properties are pre-computed and set at startup. Every application, regardless of whether or not it requires a specific property, must pay the cost of all properties. -To allow a more flexible and less costly way to pass information between the host and runtime, in .NET 8+, the host passes a contract to the runtime as a property. This contract servers as a mechanism for runtime to query for information from the host and for the host to provide structured information to the runtime. +To allow a more flexible and less costly way to pass information between the host and runtime, in .NET 8+, the host passes a contract to the runtime as a property. This contract serves as a mechanism for runtime to query for information from the host and for the host to provide structured information to the runtime. `HOST_RUNTIME_CONTRACT` @@ -90,4 +90,4 @@ Indicates whether or not [`hostpolicy`](./host-components.md#host-policy) is emb `PINVOKE_OVERRIDE` -Hex string representation of a function pointer. It is set when running a self-contained single-file application. The function is called by the runtime to check for redirected p/invokes. The expected signature is defined as `PInvokeOverrideFn` in [`coreclrhost.h`](/src/coreclr/hosts/inc/coreclrhost.h) and [`mono-private-unstable-types.h`](/src/native/public/mono/metadata/details/mono-private-unstable-types.h). \ No newline at end of file +Hex string representation of a function pointer. It is set when running a self-contained single-file application. The function is called by the runtime to check for redirected p/invokes. The expected signature is defined as `PInvokeOverrideFn` in [`coreclrhost.h`](/src/coreclr/hosts/inc/coreclrhost.h) and [`mono-private-unstable-types.h`](/src/native/public/mono/metadata/details/mono-private-unstable-types.h). diff --git a/docs/design/features/native-hosting.md b/docs/design/features/native-hosting.md index f4c8625e3f45b2..6c636b12feea58 100644 --- a/docs/design/features/native-hosting.md +++ b/docs/design/features/native-hosting.md @@ -369,6 +369,7 @@ int hostfxr_get_runtime_delegate(const hostfxr_handle host_context_handle, hostf ``` Starts the runtime and returns a function pointer to specified functionality of the runtime. * `host_context_handle` - handle to the initialized host context. + * **[.NET 8 and above]** If set to `NULL` the function will operate on the active host context in the process. * `type` - the type of runtime functionality requested * `hdt_load_assembly_and_get_function_pointer` - entry point which loads an assembly (with dependencies) and returns function pointer for a specified static method. See below for details (Loading and calling managed components) * `hdt_com_activation`, `hdt_com_register`, `hdt_com_unregister` - COM activation entry-points - see [COM activation](https://github.com/dotnet/runtime/tree/main/docs/design/features/COM-activation.md) for more details. diff --git a/docs/design/features/unloadability.md b/docs/design/features/unloadability.md index 877336baa8201e..7ca316e0887b5c 100644 --- a/docs/design/features/unloadability.md +++ b/docs/design/features/unloadability.md @@ -11,7 +11,7 @@ After investigating all the details, it was decided that we won't support the following scenarios in unloadable `AssemblyLoadContext` unless we get strong feedback on a need to support those. * Loading IJW assemblies * Using R2R generated code from assemblies. R2R assemblies will be loaded as plain IL ones. -* Implementation of the FixedAddressValueTypeAttribute +* ~~Implementation of the FixedAddressValueTypeAttribute~~ Support added in .NET 9 ## General scenarios Based on various discussions and feedback on github, the following general scenarios were often mentioned as use cases for unloadability. * Plugin scenarios when dynamic plugin loading and unloading is required. @@ -84,11 +84,9 @@ We can reuse the `ComCallableWrapperCache` with only a very minor modifications The After the `AssemblyLoadContext` unload is initiated and the managed `LoaderAllocator` is collected, the `ComCallableWrapperCache` is destroyed in the `LoaderAllocator::Destroy` method. #### FixedAddressValueTypeAttribute for fields in collectible types -After investigating all the details, it was decided that we won't add support for the FixedAddressValueTypeAttribute unless we get strong feedback on a need to support it. +The fields with `FixedAddressValueTypeAttribute` are always pinned, so their address in memory never changes. Historically for non-collectible types, these fields are held pinned by a pinned `GCHandle`. But we could not use that for collectible types, since the `MethodTable` whose pointer is stored in the respective boxed instance of the value type would prevent the managed `LoaderAllocator` from being collected. -If we decided to add support for it, we could do it as follows. The fields with `FixedAddressValueTypeAttribute` are always pinned, so their address in memory never changes. For non-collectible types, these fields are held pinned by a pinned `GCHandle`. But we cannot use that for collectible types, since the `MethodTable` whose pointer is stored in the respective boxed instance of the value type would prevent the managed `LoaderAllocator` from being collected. - -For collectible types, a new handle table can be added to `LoaderAllocator`. This handle table would be scanned during GC in a special way and all the objects the handles point to will be reported as pinned. The special scanning would be done in `Module::EnumRegularStaticGCRefs`. To pin the objects, the `promote_func` needs to be passed `GC_CALL_PINNED` in the third argument. +Since .NET 9, we always allocate these fields in the Pinned Object Heap. That way, they are pinned without being held by a handle, and are able to be collected. ## AssemblyLoadContext unloading process For better understanding of the unloading process, it is important to understand relations between several components that play role in the lifetime management. The picture below shows these components and the ways they reference each other. The green marked relations and blocks are the new ones that were added to enable unloadable `AssemblyLoadContext`. The black ones were already present before. diff --git a/docs/design/mono/profiled-aot.md b/docs/design/mono/profiled-aot.md new file mode 100644 index 00000000000000..336089163086ec --- /dev/null +++ b/docs/design/mono/profiled-aot.md @@ -0,0 +1,51 @@ +Profiled Ahead-Of-Time Compilation on Mono +=== + +# Background + +Mobile applications built using .NET typically leverage the Mono runtime to load and execute native machine code. The native machine code is generated from common intermediate language (CIL) assemblies using the Mono compiler with a variety of compilation strategies available including ahead-of-time (AOT) compilation, just-in-time (JIT) compilation, and interpreter. In addition to these strategies, .NET 7 introduced Profiled Ahead-Of-Time Compilation on Mono, a combination of AOT compilation and profile-guided-optimization (PGO) that leverages "profiles" to select which CIL code to AOT rather than an all-or-nothing approach. These profiles are obtained through [tracing](https://github.com/dotnet/runtime/blob/main/docs/design/mono/diagnostics-tracing.md) previous runs of an application, and the resulting trace is analyzed by the [dotnet-pgo tool](https://github.com/dotnet/runtime/blob/main/docs/design/features/dotnet-pgo.md) to generate a profile that tells the Mono AOT Compiler which methods to AOT. + +# How it works + +The advantages of Profiled AOT stem from its flexibility to AOT select code paths, leaving the rest to be compiled on the fly by the JIT compiler or Mono Interpreter. With an analysis of an application's trace, a record capturing a sequence of events during the application's execution, profiles can be generated to tailor optimizations for each application and environment. For example, profiles may target frequently executed (hot) code paths, minimizing the amount of runtime compilations and reducing application size, which are especially important in environments where full AOT compilation would strain storage space. Moreover, profiles may target startup code to optimize startup performance. + +Within .NET, traces can be collected by [diagnostic tooling](https://learn.microsoft.com/en-us/dotnet/core/diagnostics/eventpipe#tools-that-use-eventpipe) that use the [EventPipe](https://learn.microsoft.com/en-us/dotnet/core/diagnostics/eventpipe) runtime component. [Existing diagnostic tooling only supports `NamedPipes`/`UnixDomainSockets`](https://github.com/dotnet/runtime/blob/main/docs/design/mono/diagnostics-tracing.md), so the [diagnostics tool dotnet-dsrouter](https://learn.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-dsrouter) is required to bridge the EventPipe-based diagnostic tooling with .NET applications on mobile platforms and other remote sandboxed environments. + +Events collected by EventPipe-based diagnostic tooling are emitted with a `.nettrace` file format. Among the [various events supported by Mono runtime](https://github.com/dotnet/runtime/blob/main/src/mono/mono/eventpipe/gen-eventing-event-inc.lst), [method jitting and method loading](https://github.com/dotnet/runtime/blob/096b2499fe6939d635c35edaa607a180eb578fbb/src/mono/mono/eventpipe/gen-eventing-event-inc.lst#L39-L41) are crucial to [inform the Mono AOT Compiler what methods to AOT](https://github.com/dotnet/runtime/blob/6b67caaedfbfeaf7707478e50ccc9e8bc929e591/src/mono/mono/mini/aot-compiler.c#L13818-L13880). To collect a trace containing such events, it is imperative that dotnet-trace is provided either the appropriate [event provider](https://learn.microsoft.com/en-us/dotnet/core/diagnostics/well-known-event-providers) with [keyword flags](https://github.com/dotnet/runtime/blob/c59aef7622c9a2499abb1b7d262ed0c90f4b0c7f/src/coreclr/vm/ClrEtwAll.man#L14-L92) through `--providers` or the appropriate list of keywords through `--clrevents`. That way, the [events relevant to the keywords are captured](https://github.com/dotnet/runtime/blob/c59aef7622c9a2499abb1b7d262ed0c90f4b0c7f/src/coreclr/vm/ClrEtwAll.man#L3133). In the example workflows below, `--providers Microsoft-Windows-DotNETRuntime:0x1F000080018:5` is used. + +Profiles [ingested by the Mono AOT Compiler](https://github.com/dotnet/runtime/blob/6b67caaedfbfeaf7707478e50ccc9e8bc929e591/src/tasks/AotCompilerTask/MonoAOTCompiler.cs#L174) are generated through .NET runtime's [`dotnet-pgo` tool](https://github.com/dotnet/runtime/blob/main/docs/design/features/dotnet-pgo.md). As such, profiles passed to the Mono AOT Compiler are expected to adhere to the [`.mibc` file format](https://github.com/dotnet/runtime/blob/main/src/coreclr/tools/dotnet-pgo/dotnet-pgo-experiment.md#mibc-file-format). The Mono AOT Compiler [reads `.mibc` profiles](https://github.com/dotnet/runtime/blob/c59aef7622c9a2499abb1b7d262ed0c90f4b0c7f/src/mono/mono/mini/aot-compiler.c#L14085-L14162) to determine [which methods to AOT](https://github.com/dotnet/runtime/blob/6b67caaedfbfeaf7707478e50ccc9e8bc929e591/src/mono/mono/mini/aot-compiler.c#L13818-L13880) when compiling CIL assemblies. + +# Example Workflows + +## Android -- Running through the [Android Profiled AOT Functional Test](https://github.com/dotnet/runtime/tree/main/src/tests/FunctionalTests/Android/Device_Emulator/AOT_PROFILED) + +### Requirements: +- [Prerequisites](https://github.com/dotnet/runtime/blob/main/docs/workflow/testing/libraries/testing-android.md#prerequisites) +- [Building mono and libs](https://github.com/dotnet/runtime/blob/main/docs/workflow/testing/libraries/testing-android.md#building-libs-and-tests-for-android) +- [dotnet-dsrouter](https://learn.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-dsrouter) +- [dotnet-trace](https://learn.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-trace) + +### Tracing (if not using provided .nettrace/.mibc files) +(informational) [Understanding diagnostics_tracing runtime component](https://github.com/dotnet/runtime/blob/main/docs/design/mono/diagnostics-tracing.md) + +1. Startup dotnet-dsrouter to bridge device/emulator with diagnostic tooling either in a separate window or launch background instance with a `&` at the end. +```C# +dotnet-dsrouter client-server -tcps 127.0.0.1:9001 -ipcc ~/myport --verbose debug +``` + +2. Startup dotnet-trace tool to collect a .nettrace in a separate window +```C# +dotnet-trace collect --providers Microsoft-Windows-DotNETRuntime:0x1F000080018:5 --diagnostic-port ~/myport +``` + +3. Run the Android application enabling `RuntimeComponents` + `DiagnosticPorts` and disabling `NetTraceFilePath` + `ProfiledAOTProfilePaths` in the `.csproj`. These properties are consumed in the Android [build](https://github.com/dotnet/runtime/blob/main/src/mono/msbuild/android/build/AndroidBuild.targets). +```Shell +./dotnet.sh build /t:Test /p:TargetOS=android /p:TargetArchitecture=arm64 /p:Configuration=Debug src/tests/FunctionalTests/Android/Device_Emulator/AOT_PROFILED/Android.Device_Emulator.Aot_Profiled.Test.csproj +``` + +### Profiled AOT + +1. Run the Android application supplying either the default or your own `.nettrace file` in `NetTraceFilePath` and/or `.mibc files` in `ProfiledAOTProfilePaths` and disabling `RuntimeComponents` + `DiagnosticPorts` in the `.csproj`. These properties are consumed in the Android [build](https://github.com/dotnet/runtime/blob/main/src/mono/msbuild/android/build/AndroidBuild.targets). +```Shell +./dotnet.sh build /t:Test /p:TargetOS=android /p:TargetArchitecture=arm64 /p:Configuration=Debug src/tests/FunctionalTests/Android/Device_Emulator/AOT_PROFILED/Android.Device_Emulator.Aot_Profiled.Test.csproj +``` diff --git a/docs/project/list-of-diagnostics.md b/docs/project/list-of-diagnostics.md index 3c9a9afb9c4199..4b46d49f5813f0 100644 --- a/docs/project/list-of-diagnostics.md +++ b/docs/project/list-of-diagnostics.md @@ -208,7 +208,7 @@ The diagnostic id values reserved for .NET Libraries analyzer warnings are `SYSL | __`SYSLIB1089`__ | _`SYSLIB1070`-`SYSLIB1089` reserved for System.Runtime.InteropServices.JavaScript.JSImportGenerator._ | | __`SYSLIB1090`__ | Invalid 'GeneratedComInterfaceAttribute' usage | | __`SYSLIB1091`__ | Method is declared in different partial declaration than the 'GeneratedComInterface' attribute. | -| __`SYSLIB1092`__ | 'GenerateComInterfaceAttribute' usage not recommended. See aka.ms/GeneratedComInterfaceUsage for recommended usage. | +| __`SYSLIB1092`__ | Usage of '[LibraryImport|GeneratedComInterface]' does not follow recommendation. See aka.ms/[LibraryImport|GeneratedComInterface]Usage for best practices. | | __`SYSLIB1093`__ | Analysis for COM interface generation has failed | | __`SYSLIB1094`__ | The base COM interface failed to generate source. Code will not be generated for this interface. | | __`SYSLIB1095`__ | Invalid 'GeneratedComClassAttribute' usage | diff --git a/docs/workflow/building/mono/README.md b/docs/workflow/building/mono/README.md index 19dfcc4a4c482b..8e67434610b095 100644 --- a/docs/workflow/building/mono/README.md +++ b/docs/workflow/building/mono/README.md @@ -55,11 +55,11 @@ build.cmd mono --build ### Useful Build Arguments Here are a list of build arguments that may be of use: -`/p:MonoEnableLlvm=true` - Builds mono w/ LLVM +`/p:MonoEnableLLVM=true` - Builds mono w/ LLVM -`/p:MonoEnableLlvm=true /p:MonoLLVMDir=path/to/llvm` - Builds mono w/ LLVM from a custom path +`/p:MonoEnableLLVM=true /p:MonoLLVMDir=path/to/llvm` - Builds mono w/ LLVM from a custom path -`/p:MonoEnableLlvm=true /p:MonoLLVMDir=path/to/llvm /p:MonoLLVMUseCxx11Abi=true` - Builds mono w/ LLVM +`/p:MonoEnableLLVM=true /p:MonoLLVMDir=path/to/llvm /p:MonoLLVMUseCxx11Abi=true` - Builds mono w/ LLVM from a custom path (and that LLVM was built with C++11 ABI) For `build.sh` diff --git a/docs/workflow/ci/pr-guide.md b/docs/workflow/ci/pr-guide.md index 4c391c66438d64..680cff15cdd1c2 100644 --- a/docs/workflow/ci/pr-guide.md +++ b/docs/workflow/ci/pr-guide.md @@ -8,7 +8,7 @@ To merge pull requests, you must have write permissions in the repository. If yo ## Quick Code Review Rules * Do not mix unrelated changes in one pull request. For example, a code style change should never be mixed with a bug fix. -* All changes should follow the existing code style. You can read more about different code styles at [docs/coding-guidelines](coding-guidelines/). +* All changes should follow the existing code style. You can read more about different code styles at [docs/coding-guidelines](../../coding-guidelines/). * Use Draft pull requests for changes you are still working on but want early CI loop feedback. When you think your changes are ready for review, [change the status](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/changing-the-stage-of-a-pull-request) of your pull request. * Avoid rebasing your changes. If you are asked to make changes during the review process do them as a new commit. * To resolve merge conflicts, use "merge" instead of "rebase". diff --git a/docs/workflow/trimming/feature-switches.md b/docs/workflow/trimming/feature-switches.md index 87d8fa4c5ec425..2c25a36230d4d2 100644 --- a/docs/workflow/trimming/feature-switches.md +++ b/docs/workflow/trimming/feature-switches.md @@ -13,6 +13,7 @@ configurations but their defaults might vary as any SDK can set the defaults dif | EnableUnsafeBinaryFormatterSerialization | System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization | BinaryFormatter serialization support is trimmed when set to false | | EventSourceSupport | System.Diagnostics.Tracing.EventSource.IsSupported | Any EventSource related code or logic is trimmed when set to false | | InvariantGlobalization | System.Globalization.Invariant | All globalization specific code and data is trimmed when set to true | +| MetricsSupport | System.Diagnostics.Metrics.Meter.IsSupported | Any Metrics related code or logic is trimmed when set to false | | PredefinedCulturesOnly | System.Globalization.PredefinedCulturesOnly | Don't allow creating a culture for which the platform does not have data | | HybridGlobalization | System.Globalization.Hybrid | Properties connected with the mixed: platform-specific + icu-based globalization will be trimmed | | UseSystemResourceKeys | System.Resources.UseSystemResourceKeys | Any localizable resources for system assemblies is trimmed when set to true | @@ -27,11 +28,13 @@ configurations but their defaults might vary as any SDK can set the defaults dif | MetadataUpdaterSupport | System.Reflection.Metadata.MetadataUpdater.IsSupported | Metadata update related code to be trimmed when set to false | | _EnableConsumingManagedCodeFromNativeHosting | System.Runtime.InteropServices.EnableConsumingManagedCodeFromNativeHosting | Getting a managed function from native hosting is disabled when set to false and related functionality can be trimmed. | | VerifyDependencyInjectionOpenGenericServiceTrimmability | Microsoft.Extensions.DependencyInjection.VerifyOpenGenericServiceTrimmability | When set to true, DependencyInjection will verify trimming annotations applied to open generic services are correct | +| DisableDependencyInjectionDynamicEngine | Microsoft.Extensions.DependencyInjection.DisableDynamicEngine | When set to true, DependencyInjection will avoid using System.Reflection.Emit when realizing services | | NullabilityInfoContextSupport | System.Reflection.NullabilityInfoContext.IsSupported | Nullable attributes can be trimmed when set to false | | DynamicCodeSupport | System.Runtime.CompilerServices.RuntimeFeature.IsDynamicCodeSupported | Changes RuntimeFeature.IsDynamicCodeSupported to false to allow testing AOT-safe fallback code without publishing for Native AOT. | | _AggressiveAttributeTrimming | System.AggressiveAttributeTrimming | When set to true, aggressively trims attributes to allow for the most size savings possible, even if it could result in runtime behavior changes | | JsonSerializerIsReflectionEnabledByDefault | System.Text.Json.JsonSerializer.IsReflectionEnabledByDefault | When set to false, disables using reflection as the default contract resolver in System.Text.Json | | EnableGeneratedComInterfaceComImportInterop | System.Runtime.InteropServices.Marshalling.EnableGeneratedComInterfaceComImportInterop | When set to true, enables casting source-generated COM object wrappers to built-in COM-based COM interfaces. | +| _UseManagedNtlm | System.Net.Security.UseManagedNtlm | When set to true, uses built-in managed implementation of NTLM and SPNEGO algorithm for HTTP, SMTP authentication, and NegotiateAuthentication API instead of system provided GSSAPI implementation. | Any feature-switch which defines property can be set in csproj file or on the command line as any other MSBuild property. Those without predefined property name diff --git a/eng/Analyzers.targets b/eng/Analyzers.targets index 4ca3df7737280a..eb82aa8dcad972 100644 --- a/eng/Analyzers.targets +++ b/eng/Analyzers.targets @@ -1,4 +1,11 @@ + + + false + false @@ -14,6 +21,7 @@ + diff --git a/eng/AvoidRestoreCycleOnSelfReference.targets b/eng/AvoidRestoreCycleOnSelfReference.targets deleted file mode 100644 index cb665cb070d988..00000000000000 --- a/eng/AvoidRestoreCycleOnSelfReference.targets +++ /dev/null @@ -1,14 +0,0 @@ - - - - <_PackageIdTemp>$(PackageId) - $(PackageId)_temp - - - - - $(_PackageIdTemp) - - - \ No newline at end of file diff --git a/eng/CodeAnalysis.src.globalconfig b/eng/CodeAnalysis.src.globalconfig index aee934588b9a25..d06bf337e234c7 100644 --- a/eng/CodeAnalysis.src.globalconfig +++ b/eng/CodeAnalysis.src.globalconfig @@ -475,7 +475,7 @@ dotnet_diagnostic.CA1860.severity = warning dotnet_diagnostic.CA1861.severity = warning # CA1862: Prefer using 'StringComparer'/'StringComparison' to perform case-insensitive string comparisons -dotnet_diagnostic.CA1862.severity = info +dotnet_diagnostic.CA1862.severity = suggestion # CA1863: Use 'CompositeFormat' dotnet_diagnostic.CA1863.severity = suggestion @@ -486,6 +486,12 @@ dotnet_diagnostic.CA1864.severity = warning # CA1868: Unnecessary call to 'Contains' for sets dotnet_diagnostic.CA1868.severity = warning +# CA1869: Cache and reuse 'JsonSerializerOptions' instances +dotnet_diagnostic.CA1869.severity = warning + +# CA1870: Use a cached 'SearchValues' instance +dotnet_diagnostic.CA1870.severity = warning + # CA2000: Dispose objects before losing scope dotnet_diagnostic.CA2000.severity = none @@ -955,6 +961,147 @@ dotnet_diagnostic.IL3001.severity = warning # IL3002: Using member with RequiresAssemblyFilesAttribute can break functionality when embedded in a single-file app dotnet_diagnostic.IL3002.severity = warning +# RS1001: Missing diagnostic analyzer attribute +dotnet_diagnostic.RS1001.severity = warning + +# RS1002: Missing kind argument when registering an analyzer action +dotnet_diagnostic.RS1002.severity = warning + +# RS1003: Unsupported SymbolKind argument when registering a symbol analyzer action +dotnet_diagnostic.RS1003.severity = warning + +# RS1004: Recommend adding language support to diagnostic analyzer +dotnet_diagnostic.RS1004.severity = warning + +# RS1005: ReportDiagnostic invoked with an unsupported DiagnosticDescriptor +dotnet_diagnostic.RS1005.severity = warning + +# RS1006: Invalid type argument for DiagnosticAnalyzer's Register method +dotnet_diagnostic.RS1006.severity = warning + +# RS1007: Provide localizable arguments to diagnostic descriptor constructor +dotnet_diagnostic.RS1007.severity = none + +# RS1008: Avoid storing per-compilation data into the fields of a diagnostic analyzer +dotnet_diagnostic.RS1008.severity = warning + +# RS1009: Only internal implementations of this interface are allowed +dotnet_diagnostic.RS1009.severity = error + +# RS1010: Create code actions should have a unique EquivalenceKey for FixAll occurrences support +dotnet_diagnostic.RS1010.severity = warning + +# RS1011: Use code actions that have a unique EquivalenceKey for FixAll occurrences support +dotnet_diagnostic.RS1011.severity = warning + +# RS1012: Start action has no registered actions +dotnet_diagnostic.RS1012.severity = warning + +# RS1013: Start action has no registered non-end actions +dotnet_diagnostic.RS1013.severity = warning + +# RS1014: Do not ignore values returned by methods on immutable objects +dotnet_diagnostic.RS1014.severity = warning + +# RS1015: Provide non-null 'helpLinkUri' value to diagnostic descriptor constructor +dotnet_diagnostic.RS1015.severity = none + +# RS1016: Code fix providers should provide FixAll support +dotnet_diagnostic.RS1016.severity = suggestion + +# RS1017: DiagnosticId for analyzers must be a non-null constant +dotnet_diagnostic.RS1017.severity = warning + +# RS1018: DiagnosticId for analyzers must be in specified format +dotnet_diagnostic.RS1018.severity = warning + +# RS1019: DiagnosticId must be unique across analyzers +dotnet_diagnostic.RS1019.severity = warning + +# RS1020: Category for analyzers must be from the specified values +dotnet_diagnostic.RS1020.severity = none + +# RS1021: Invalid entry in analyzer category and diagnostic ID range specification file +dotnet_diagnostic.RS1021.severity = warning + +# RS1022: Do not use types from Workspaces assembly in an analyzer +dotnet_diagnostic.RS1022.severity = warning + +# RS1023: Upgrade MSBuildWorkspace +dotnet_diagnostic.RS1023.severity = warning + +# RS1024: Symbols should be compared for equality +dotnet_diagnostic.RS1024.severity = warning + +# RS1025: Configure generated code analysis +dotnet_diagnostic.RS1025.severity = warning + +# RS1026: Enable concurrent execution +dotnet_diagnostic.RS1026.severity = warning + +# RS1027: Types marked with DiagnosticAnalyzerAttribute(s) should inherit from DiagnosticAnalyzer +dotnet_diagnostic.RS1027.severity = warning + +# RS1028: Provide non-null 'customTags' value to diagnostic descriptor constructor +dotnet_diagnostic.RS1028.severity = none + +# RS1029: Do not use reserved diagnostic IDs +dotnet_diagnostic.RS1029.severity = warning + +# RS1030: Do not invoke Compilation.GetSemanticModel() method within a diagnostic analyzer +dotnet_diagnostic.RS1030.severity = warning + +# RS1031: Define diagnostic title correctly +dotnet_diagnostic.RS1031.severity = warning + +# RS1032: Define diagnostic message correctly +dotnet_diagnostic.RS1032.severity = warning + +# RS1033: Define diagnostic description correctly +dotnet_diagnostic.RS1033.severity = warning + +# RS1034: Prefer 'IsKind' for checking syntax kinds +dotnet_diagnostic.RS1034.severity = warning + +# RS1035: Do not use APIs banned for analyzers +dotnet_diagnostic.RS1035.severity = error + +# RS1036: Specify analyzer banned API enforcement setting +dotnet_diagnostic.RS1036.severity = warning + +# RS1037: Add "CompilationEnd" custom tag to compilation end diagnostic descriptor +dotnet_diagnostic.RS1037.severity = warning + +# RS1038: Compiler extensions should be implemented in assemblies with compiler-provided references +dotnet_diagnostic.RS1038.severity = suggestion + +# RS2000: Add analyzer diagnostic IDs to analyzer release +dotnet_diagnostic.RS2000.severity = warning + +# RS2001: Ensure up-to-date entry for analyzer diagnostic IDs are added to analyzer release +dotnet_diagnostic.RS2001.severity = warning + +# RS2002: Do not add removed analyzer diagnostic IDs to unshipped analyzer release +dotnet_diagnostic.RS2002.severity = warning + +# RS2003: Shipped diagnostic IDs that are no longer reported should have an entry in the 'Removed Rules' table in unshipped file +dotnet_diagnostic.RS2003.severity = warning + +# RS2004: Diagnostic IDs marked as removed in analyzer release file should not be reported by analyzers +dotnet_diagnostic.RS2004.severity = warning + +# RS2005: Remove duplicate entries for diagnostic ID in the same analyzer release +dotnet_diagnostic.RS2005.severity = warning + +# RS2006: Remove duplicate entries for diagnostic ID between analyzer releases +dotnet_diagnostic.RS2006.severity = warning + +# RS2007: Invalid entry in analyzer release file +dotnet_diagnostic.RS2007.severity = warning + +# RS2008: Enable analyzer release tracking +dotnet_diagnostic.RS2008.severity = warning + # SA0001: XML comments dotnet_diagnostic.SA0001.severity = none diff --git a/eng/CodeAnalysis.test.globalconfig b/eng/CodeAnalysis.test.globalconfig index baa75bc6c54fba..76afd46a0b7b53 100644 --- a/eng/CodeAnalysis.test.globalconfig +++ b/eng/CodeAnalysis.test.globalconfig @@ -483,6 +483,12 @@ dotnet_diagnostic.CA1864.severity = none # CA1868: Unnecessary call to 'Contains' for sets dotnet_diagnostic.CA1868.severity = none +# CA1869: Cache and reuse 'JsonSerializerOptions' instances +dotnet_diagnostic.CA1869.severity = none + +# CA1870: Use a cached 'SearchValues' instance +dotnet_diagnostic.CA1870.severity = none + # CA2000: Dispose objects before losing scope dotnet_diagnostic.CA2000.severity = none @@ -951,6 +957,147 @@ dotnet_diagnostic.IL3001.severity = none # IL3002: Using member with RequiresAssemblyFilesAttribute can break functionality when embedded in a single-file app dotnet_diagnostic.IL3002.severity = none +# RS1001: Missing diagnostic analyzer attribute +dotnet_diagnostic.RS1001.severity = none + +# RS1002: Missing kind argument when registering an analyzer action +dotnet_diagnostic.RS1002.severity = none + +# RS1003: Unsupported SymbolKind argument when registering a symbol analyzer action +dotnet_diagnostic.RS1003.severity = none + +# RS1004: Recommend adding language support to diagnostic analyzer +dotnet_diagnostic.RS1004.severity = none + +# RS1005: ReportDiagnostic invoked with an unsupported DiagnosticDescriptor +dotnet_diagnostic.RS1005.severity = none + +# RS1006: Invalid type argument for DiagnosticAnalyzer's Register method +dotnet_diagnostic.RS1006.severity = none + +# RS1007: Provide localizable arguments to diagnostic descriptor constructor +dotnet_diagnostic.RS1007.severity = none + +# RS1008: Avoid storing per-compilation data into the fields of a diagnostic analyzer +dotnet_diagnostic.RS1008.severity = none + +# RS1009: Only internal implementations of this interface are allowed +dotnet_diagnostic.RS1009.severity = none + +# RS1010: Create code actions should have a unique EquivalenceKey for FixAll occurrences support +dotnet_diagnostic.RS1010.severity = none + +# RS1011: Use code actions that have a unique EquivalenceKey for FixAll occurrences support +dotnet_diagnostic.RS1011.severity = none + +# RS1012: Start action has no registered actions +dotnet_diagnostic.RS1012.severity = none + +# RS1013: Start action has no registered non-end actions +dotnet_diagnostic.RS1013.severity = none + +# RS1014: Do not ignore values returned by methods on immutable objects +dotnet_diagnostic.RS1014.severity = none + +# RS1015: Provide non-null 'helpLinkUri' value to diagnostic descriptor constructor +dotnet_diagnostic.RS1015.severity = none + +# RS1016: Code fix providers should provide FixAll support +dotnet_diagnostic.RS1016.severity = suggestion + +# RS1017: DiagnosticId for analyzers must be a non-null constant +dotnet_diagnostic.RS1017.severity = none + +# RS1018: DiagnosticId for analyzers must be in specified format +dotnet_diagnostic.RS1018.severity = none + +# RS1019: DiagnosticId must be unique across analyzers +dotnet_diagnostic.RS1019.severity = none + +# RS1020: Category for analyzers must be from the specified values +dotnet_diagnostic.RS1020.severity = none + +# RS1021: Invalid entry in analyzer category and diagnostic ID range specification file +dotnet_diagnostic.RS1021.severity = none + +# RS1022: Do not use types from Workspaces assembly in an analyzer +dotnet_diagnostic.RS1022.severity = none + +# RS1023: Upgrade MSBuildWorkspace +dotnet_diagnostic.RS1023.severity = none + +# RS1024: Symbols should be compared for equality +dotnet_diagnostic.RS1024.severity = none + +# RS1025: Configure generated code analysis +dotnet_diagnostic.RS1025.severity = none + +# RS1026: Enable concurrent execution +dotnet_diagnostic.RS1026.severity = none + +# RS1027: Types marked with DiagnosticAnalyzerAttribute(s) should inherit from DiagnosticAnalyzer +dotnet_diagnostic.RS1027.severity = none + +# RS1028: Provide non-null 'customTags' value to diagnostic descriptor constructor +dotnet_diagnostic.RS1028.severity = none + +# RS1029: Do not use reserved diagnostic IDs +dotnet_diagnostic.RS1029.severity = none + +# RS1030: Do not invoke Compilation.GetSemanticModel() method within a diagnostic analyzer +dotnet_diagnostic.RS1030.severity = none + +# RS1031: Define diagnostic title correctly +dotnet_diagnostic.RS1031.severity = none + +# RS1032: Define diagnostic message correctly +dotnet_diagnostic.RS1032.severity = none + +# RS1033: Define diagnostic description correctly +dotnet_diagnostic.RS1033.severity = none + +# RS1034: Prefer 'IsKind' for checking syntax kinds +dotnet_diagnostic.RS1034.severity = none + +# RS1035: Do not use APIs banned for analyzers +dotnet_diagnostic.RS1035.severity = none + +# RS1036: Specify analyzer banned API enforcement setting +dotnet_diagnostic.RS1036.severity = none + +# RS1037: Add "CompilationEnd" custom tag to compilation end diagnostic descriptor +dotnet_diagnostic.RS1037.severity = none + +# RS1038: Compiler extensions should be implemented in assemblies with compiler-provided references +dotnet_diagnostic.RS1038.severity = suggestion + +# RS2000: Add analyzer diagnostic IDs to analyzer release +dotnet_diagnostic.RS2000.severity = none + +# RS2001: Ensure up-to-date entry for analyzer diagnostic IDs are added to analyzer release +dotnet_diagnostic.RS2001.severity = none + +# RS2002: Do not add removed analyzer diagnostic IDs to unshipped analyzer release +dotnet_diagnostic.RS2002.severity = none + +# RS2003: Shipped diagnostic IDs that are no longer reported should have an entry in the 'Removed Rules' table in unshipped file +dotnet_diagnostic.RS2003.severity = none + +# RS2004: Diagnostic IDs marked as removed in analyzer release file should not be reported by analyzers +dotnet_diagnostic.RS2004.severity = none + +# RS2005: Remove duplicate entries for diagnostic ID in the same analyzer release +dotnet_diagnostic.RS2005.severity = none + +# RS2006: Remove duplicate entries for diagnostic ID between analyzer releases +dotnet_diagnostic.RS2006.severity = none + +# RS2007: Invalid entry in analyzer release file +dotnet_diagnostic.RS2007.severity = none + +# RS2008: Enable analyzer release tracking +dotnet_diagnostic.RS2008.severity = none + # SA0001: XML comments dotnet_diagnostic.SA0001.severity = none diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props index 1e9d5cf8906491..4f7c9487a44c21 100644 --- a/eng/SourceBuild.props +++ b/eng/SourceBuild.props @@ -63,10 +63,12 @@ + + diff --git a/eng/SourceBuildPrebuiltBaseline.xml b/eng/SourceBuildPrebuiltBaseline.xml index 46dd7457d764aa..0f3958675010e8 100644 --- a/eng/SourceBuildPrebuiltBaseline.xml +++ b/eng/SourceBuildPrebuiltBaseline.xml @@ -9,7 +9,6 @@ - @@ -17,6 +16,14 @@ + + + + + + diff --git a/eng/Subsets.props b/eng/Subsets.props index 77268ffa7b5d09..6f2bfd8be05e24 100644 --- a/eng/Subsets.props +++ b/eng/Subsets.props @@ -82,7 +82,7 @@ tools.illink host.native+host.tools+host.pkg - $(DefaultHostSubsets)+host.tests + $(DefaultHostSubsets)+host.pretest+host.tests host.native @@ -168,6 +168,7 @@ + @@ -352,7 +353,7 @@ Test="true" Category="clr" Condition="'$(DotNetBuildFromSource)' != 'true'"/> - @@ -485,6 +486,12 @@ + + + + + + @@ -504,7 +511,7 @@ - + @@ -558,11 +565,13 @@ %(AdditionalProperties);Configuration=$(LibrariesConfiguration) %(AdditionalProperties);Configuration=$(HostConfiguration) %(AdditionalProperties);Configuration=$(TasksConfiguration) + %(AdditionalProperties);Configuration=$(ToolsConfiguration) %(AdditionalProperties);LibrariesConfiguration=$(LibrariesConfiguration) %(AdditionalProperties);HostConfiguration=$(HostConfiguration) %(AdditionalProperties);TasksConfiguration=$(TasksConfiguration) + %(AdditionalProperties);ToolsConfiguration=$(ToolsConfiguration) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ab67345d0fe5b3..68a296dc447a80 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,8 +1,8 @@ - + https://github.com/dotnet/icu - 92124838d3f0efde3ac483a904691a611babb9a0 + cd1393cad6efacd354328571da8107fb3cbc3a48 https://github.com/dotnet/msquic @@ -12,69 +12,69 @@ https://github.com/dotnet/wcf 7f504aabb1988e9a093c1e74d8040bd52feb2f01 - + https://github.com/dotnet/llvm-project - 9b77c16a6061fb1160ec12bd307badb4c58dff98 + dc18ea8f36885b70da5e7853aa6b5278ce8d0de4 - + https://github.com/dotnet/llvm-project - 9b77c16a6061fb1160ec12bd307badb4c58dff98 + dc18ea8f36885b70da5e7853aa6b5278ce8d0de4 - + https://github.com/dotnet/llvm-project - 9b77c16a6061fb1160ec12bd307badb4c58dff98 + dc18ea8f36885b70da5e7853aa6b5278ce8d0de4 - + https://github.com/dotnet/llvm-project - 9b77c16a6061fb1160ec12bd307badb4c58dff98 + dc18ea8f36885b70da5e7853aa6b5278ce8d0de4 - + https://github.com/dotnet/llvm-project - 9b77c16a6061fb1160ec12bd307badb4c58dff98 + dc18ea8f36885b70da5e7853aa6b5278ce8d0de4 - + https://github.com/dotnet/llvm-project - 9b77c16a6061fb1160ec12bd307badb4c58dff98 + dc18ea8f36885b70da5e7853aa6b5278ce8d0de4 - + https://github.com/dotnet/llvm-project - 9b77c16a6061fb1160ec12bd307badb4c58dff98 + dc18ea8f36885b70da5e7853aa6b5278ce8d0de4 - + https://github.com/dotnet/llvm-project - 9b77c16a6061fb1160ec12bd307badb4c58dff98 + dc18ea8f36885b70da5e7853aa6b5278ce8d0de4 - + https://github.com/dotnet/llvm-project - 9b77c16a6061fb1160ec12bd307badb4c58dff98 + dc18ea8f36885b70da5e7853aa6b5278ce8d0de4 - + https://github.com/dotnet/llvm-project - 9b77c16a6061fb1160ec12bd307badb4c58dff98 + dc18ea8f36885b70da5e7853aa6b5278ce8d0de4 - + https://github.com/dotnet/llvm-project - 9b77c16a6061fb1160ec12bd307badb4c58dff98 + dc18ea8f36885b70da5e7853aa6b5278ce8d0de4 - + https://github.com/dotnet/llvm-project - 9b77c16a6061fb1160ec12bd307badb4c58dff98 + dc18ea8f36885b70da5e7853aa6b5278ce8d0de4 - + https://github.com/dotnet/llvm-project - 9b77c16a6061fb1160ec12bd307badb4c58dff98 + dc18ea8f36885b70da5e7853aa6b5278ce8d0de4 - + https://github.com/dotnet/llvm-project - 9b77c16a6061fb1160ec12bd307badb4c58dff98 + dc18ea8f36885b70da5e7853aa6b5278ce8d0de4 - + https://github.com/dotnet/llvm-project - 9b77c16a6061fb1160ec12bd307badb4c58dff98 + dc18ea8f36885b70da5e7853aa6b5278ce8d0de4 - + https://github.com/dotnet/llvm-project - 9b77c16a6061fb1160ec12bd307badb4c58dff98 + dc18ea8f36885b70da5e7853aa6b5278ce8d0de4 https://github.com/dotnet/command-line-api @@ -85,312 +85,316 @@ 02fe27cd6a9b001c8feb7938e6ef4b3799745759b - + https://github.com/dotnet/cecil - 2f4ef297939628143389ddeea569874ded0b1c1b + 89be445dd4936157533ad96bafb95f701430653a - + https://github.com/dotnet/emsdk - abfa03c97f4175d4d209435cd0e71f558e36c3fd + bebe955e9f7d392fbca594b1c76c54ba2e27027e - + https://github.com/dotnet/source-build-reference-packages - 5a1492557c8717b428b69fd4b7ca8c91d5d18cd3 + b88b567fbf54c5404d039b80cfb86f09a681f604 - + https://github.com/dotnet/source-build-externals - de4dda48d0cf31e13182bc24107b2246c61ed483 + e9d6489787a5ea5400a31dfa34aa6ad6b590de9b - + https://github.com/dotnet/arcade - 9b2af35a6702526dc8a7c5fcadcc44efd0dca170 + 1d451c32dda2314c721adbf8829e1c0cd4e681ff - + https://github.com/dotnet/xliff-tasks - 493329204079519072f0241ed26f692bdee0d60c + 194f32828726c3f1f63f79f3dc09b9e99c157b11 - + https://github.com/dotnet/arcade - 9b2af35a6702526dc8a7c5fcadcc44efd0dca170 + 1d451c32dda2314c721adbf8829e1c0cd4e681ff - + https://github.com/dotnet/arcade - 9b2af35a6702526dc8a7c5fcadcc44efd0dca170 + 1d451c32dda2314c721adbf8829e1c0cd4e681ff - + https://github.com/dotnet/arcade - 9b2af35a6702526dc8a7c5fcadcc44efd0dca170 + 1d451c32dda2314c721adbf8829e1c0cd4e681ff - + https://github.com/dotnet/arcade - 9b2af35a6702526dc8a7c5fcadcc44efd0dca170 + 1d451c32dda2314c721adbf8829e1c0cd4e681ff - + https://github.com/dotnet/arcade - 9b2af35a6702526dc8a7c5fcadcc44efd0dca170 + 1d451c32dda2314c721adbf8829e1c0cd4e681ff - + https://github.com/dotnet/arcade - 9b2af35a6702526dc8a7c5fcadcc44efd0dca170 + 1d451c32dda2314c721adbf8829e1c0cd4e681ff - + https://github.com/dotnet/arcade - 9b2af35a6702526dc8a7c5fcadcc44efd0dca170 + 1d451c32dda2314c721adbf8829e1c0cd4e681ff - + https://github.com/dotnet/arcade - 9b2af35a6702526dc8a7c5fcadcc44efd0dca170 + 1d451c32dda2314c721adbf8829e1c0cd4e681ff - + https://github.com/dotnet/arcade - 9b2af35a6702526dc8a7c5fcadcc44efd0dca170 + 1d451c32dda2314c721adbf8829e1c0cd4e681ff - + https://github.com/dotnet/arcade - 9b2af35a6702526dc8a7c5fcadcc44efd0dca170 + 1d451c32dda2314c721adbf8829e1c0cd4e681ff - + https://github.com/dotnet/arcade - 9b2af35a6702526dc8a7c5fcadcc44efd0dca170 + 1d451c32dda2314c721adbf8829e1c0cd4e681ff - + https://github.com/dotnet/arcade - 9b2af35a6702526dc8a7c5fcadcc44efd0dca170 + 1d451c32dda2314c721adbf8829e1c0cd4e681ff - + https://github.com/dotnet/arcade - 9b2af35a6702526dc8a7c5fcadcc44efd0dca170 + 1d451c32dda2314c721adbf8829e1c0cd4e681ff - + https://github.com/dotnet/arcade - 9b2af35a6702526dc8a7c5fcadcc44efd0dca170 + 1d451c32dda2314c721adbf8829e1c0cd4e681ff - + https://github.com/dotnet/arcade - 9b2af35a6702526dc8a7c5fcadcc44efd0dca170 + 1d451c32dda2314c721adbf8829e1c0cd4e681ff - + https://github.com/dotnet/arcade - 9b2af35a6702526dc8a7c5fcadcc44efd0dca170 + 1d451c32dda2314c721adbf8829e1c0cd4e681ff - + + https://github.com/dotnet/arcade + 1d451c32dda2314c721adbf8829e1c0cd4e681ff + + https://github.com/dotnet/runtime-assets - 48270e734aa881c737b80c4fe0459e68aaf08ad6 + b7d8e946c831e79435054f65e49c2eebb74b55c6 - + https://github.com/dotnet/runtime-assets - 48270e734aa881c737b80c4fe0459e68aaf08ad6 + b7d8e946c831e79435054f65e49c2eebb74b55c6 - + https://github.com/dotnet/runtime-assets - 48270e734aa881c737b80c4fe0459e68aaf08ad6 + b7d8e946c831e79435054f65e49c2eebb74b55c6 - + https://github.com/dotnet/runtime-assets - 48270e734aa881c737b80c4fe0459e68aaf08ad6 + b7d8e946c831e79435054f65e49c2eebb74b55c6 - + https://github.com/dotnet/runtime-assets - 48270e734aa881c737b80c4fe0459e68aaf08ad6 + b7d8e946c831e79435054f65e49c2eebb74b55c6 - + https://github.com/dotnet/runtime-assets - 48270e734aa881c737b80c4fe0459e68aaf08ad6 + b7d8e946c831e79435054f65e49c2eebb74b55c6 - + https://github.com/dotnet/runtime-assets - 48270e734aa881c737b80c4fe0459e68aaf08ad6 + b7d8e946c831e79435054f65e49c2eebb74b55c6 - + https://github.com/dotnet/runtime-assets - 48270e734aa881c737b80c4fe0459e68aaf08ad6 + b7d8e946c831e79435054f65e49c2eebb74b55c6 - + https://github.com/dotnet/runtime-assets - 48270e734aa881c737b80c4fe0459e68aaf08ad6 + b7d8e946c831e79435054f65e49c2eebb74b55c6 - + https://github.com/dotnet/runtime-assets - 48270e734aa881c737b80c4fe0459e68aaf08ad6 + b7d8e946c831e79435054f65e49c2eebb74b55c6 - + https://github.com/dotnet/runtime-assets - 48270e734aa881c737b80c4fe0459e68aaf08ad6 + b7d8e946c831e79435054f65e49c2eebb74b55c6 - + https://github.com/dotnet/runtime-assets - 48270e734aa881c737b80c4fe0459e68aaf08ad6 + b7d8e946c831e79435054f65e49c2eebb74b55c6 - + https://github.com/dotnet/runtime-assets - 48270e734aa881c737b80c4fe0459e68aaf08ad6 + b7d8e946c831e79435054f65e49c2eebb74b55c6 - + https://github.com/dotnet/llvm-project - 9b77c16a6061fb1160ec12bd307badb4c58dff98 + dc18ea8f36885b70da5e7853aa6b5278ce8d0de4 - + https://github.com/dotnet/llvm-project - 9b77c16a6061fb1160ec12bd307badb4c58dff98 + dc18ea8f36885b70da5e7853aa6b5278ce8d0de4 - + https://github.com/dotnet/llvm-project - 9b77c16a6061fb1160ec12bd307badb4c58dff98 + dc18ea8f36885b70da5e7853aa6b5278ce8d0de4 - + https://github.com/dotnet/llvm-project - 9b77c16a6061fb1160ec12bd307badb4c58dff98 + dc18ea8f36885b70da5e7853aa6b5278ce8d0de4 - + https://github.com/dotnet/llvm-project - 9b77c16a6061fb1160ec12bd307badb4c58dff98 + dc18ea8f36885b70da5e7853aa6b5278ce8d0de4 - + https://github.com/dotnet/llvm-project - 9b77c16a6061fb1160ec12bd307badb4c58dff98 + dc18ea8f36885b70da5e7853aa6b5278ce8d0de4 - + https://github.com/dotnet/llvm-project - 9b77c16a6061fb1160ec12bd307badb4c58dff98 + dc18ea8f36885b70da5e7853aa6b5278ce8d0de4 - + https://github.com/dotnet/llvm-project - 9b77c16a6061fb1160ec12bd307badb4c58dff98 + dc18ea8f36885b70da5e7853aa6b5278ce8d0de4 - + https://github.com/dotnet/llvm-project - 9b77c16a6061fb1160ec12bd307badb4c58dff98 + dc18ea8f36885b70da5e7853aa6b5278ce8d0de4 - + https://github.com/dotnet/llvm-project - 9b77c16a6061fb1160ec12bd307badb4c58dff98 + dc18ea8f36885b70da5e7853aa6b5278ce8d0de4 - + https://github.com/dotnet/llvm-project - 9b77c16a6061fb1160ec12bd307badb4c58dff98 + dc18ea8f36885b70da5e7853aa6b5278ce8d0de4 - + https://github.com/dotnet/llvm-project - 9b77c16a6061fb1160ec12bd307badb4c58dff98 + dc18ea8f36885b70da5e7853aa6b5278ce8d0de4 - + https://github.com/dotnet/llvm-project - 9b77c16a6061fb1160ec12bd307badb4c58dff98 + dc18ea8f36885b70da5e7853aa6b5278ce8d0de4 - + https://github.com/dotnet/llvm-project - 9b77c16a6061fb1160ec12bd307badb4c58dff98 + dc18ea8f36885b70da5e7853aa6b5278ce8d0de4 - + https://github.com/dotnet/runtime - edbd5c769a19798b6955050baccf99e6797d3208 + ebe6f541ca2adea41f4b1dfc97774af371654bab - + https://github.com/dotnet/runtime - edbd5c769a19798b6955050baccf99e6797d3208 + ebe6f541ca2adea41f4b1dfc97774af371654bab - + https://github.com/dotnet/runtime - edbd5c769a19798b6955050baccf99e6797d3208 + ebe6f541ca2adea41f4b1dfc97774af371654bab - + https://github.com/dotnet/runtime - edbd5c769a19798b6955050baccf99e6797d3208 + ebe6f541ca2adea41f4b1dfc97774af371654bab - + https://github.com/dotnet/runtime - edbd5c769a19798b6955050baccf99e6797d3208 + ebe6f541ca2adea41f4b1dfc97774af371654bab - + https://github.com/dotnet/runtime - edbd5c769a19798b6955050baccf99e6797d3208 + ebe6f541ca2adea41f4b1dfc97774af371654bab - + https://github.com/dotnet/runtime - edbd5c769a19798b6955050baccf99e6797d3208 + ebe6f541ca2adea41f4b1dfc97774af371654bab - + https://github.com/dotnet/xharness - 480b9159eb7e69b182a87581d5a336e97e0b6dae + a3a749a7056623c665bba226fe843152f413f044 - + https://github.com/dotnet/xharness - 480b9159eb7e69b182a87581d5a336e97e0b6dae + a3a749a7056623c665bba226fe843152f413f044 - + https://github.com/dotnet/xharness - 480b9159eb7e69b182a87581d5a336e97e0b6dae + a3a749a7056623c665bba226fe843152f413f044 - + https://github.com/dotnet/arcade - 9b2af35a6702526dc8a7c5fcadcc44efd0dca170 + 1d451c32dda2314c721adbf8829e1c0cd4e681ff - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 068998a5d91f55a619d1d072ab3094dacd5d6a4f + 5b0a8abbba75c63e20e42f778650dd1448aef62c - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 068998a5d91f55a619d1d072ab3094dacd5d6a4f + 5b0a8abbba75c63e20e42f778650dd1448aef62c - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 068998a5d91f55a619d1d072ab3094dacd5d6a4f + 5b0a8abbba75c63e20e42f778650dd1448aef62c - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 068998a5d91f55a619d1d072ab3094dacd5d6a4f + 5b0a8abbba75c63e20e42f778650dd1448aef62c - + https://github.com/dotnet/hotreload-utils - 696312fd2a60671797b12311a4cf387d3cd14dd0 + 821048c1587d0384826230cdddf292570b8e430f - + https://github.com/dotnet/runtime-assets - 48270e734aa881c737b80c4fe0459e68aaf08ad6 + b7d8e946c831e79435054f65e49c2eebb74b55c6 - + https://github.com/dotnet/roslyn - 93ce610622875b8e843f348e96496abd7056360d + a19fe34b7266ab7638a12c2b54748d89d35a21a7 - + https://github.com/dotnet/roslyn - 93ce610622875b8e843f348e96496abd7056360d + a19fe34b7266ab7638a12c2b54748d89d35a21a7 - + https://github.com/dotnet/roslyn - 93ce610622875b8e843f348e96496abd7056360d + a19fe34b7266ab7638a12c2b54748d89d35a21a7 - + https://github.com/dotnet/roslyn-analyzers - 76d99c5f3e11f0600fae074270c0d89042c360f0 + 837c22a23433f441fa56d96eb45d13c65408f7c3 - + https://github.com/dotnet/roslyn-analyzers - 76d99c5f3e11f0600fae074270c0d89042c360f0 + 837c22a23433f441fa56d96eb45d13c65408f7c3 - + https://github.com/dotnet/sdk - d10b02ae5cc670609d920a672985ed4456bdd6b6 + 4bc3b410401010fb7844fee0479f9b12f52500b3 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 068998a5d91f55a619d1d072ab3094dacd5d6a4f + 5b0a8abbba75c63e20e42f778650dd1448aef62c - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 068998a5d91f55a619d1d072ab3094dacd5d6a4f + 5b0a8abbba75c63e20e42f778650dd1448aef62c @@ -398,5 +402,9 @@ https://github.com/NuGet/NuGet.Client 8fef55f5a55a3b4f2c96cd1a9b5ddc51d4b927f8 + + https://github.com/dotnet/installer + 1f0982b7f469aa0d693d1ad6744a7fde5263ef1b + diff --git a/eng/Versions.props b/eng/Versions.props index 335b628baa5b2a..f70c21cf3ca6c7 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -7,6 +7,7 @@ 0 0 9.0.100 + 8.0.0-rc.1.23414.4 7.0.8 6.0.$([MSBuild]::Add($([System.Version]::Parse('$(PackageVersionNet7)').Build),11)) alpha @@ -15,16 +16,13 @@ $(SdkBandVersion)$(WorkloadVersionSuffix) - - 8.0.0.0 + $(MajorVersion).$(MinorVersion).0.0 false release - true false false - $(AssemblyVersion) true @@ -33,17 +31,17 @@ - 3.11.0-beta1.23420.2 - 8.0.0-preview.23420.2 + 3.11.0-beta1.23462.3 + 9.0.0-preview.23462.3 - 4.8.0-2.23422.14 - 4.8.0-2.23422.14 - 4.8.0-2.23422.14 + 4.8.0-3.23468.4 + 4.8.0-3.23468.4 + 4.8.0-3.23468.4 - 4.5.0 + 4.7.0 3.3.5-beta1.23270.2 @@ -82,39 +80,40 @@ 0.2.0 - 8.0.100-preview.7.23329.3 + 9.0.100-alpha.1.23468.31 - 8.0.0-beta.23411.1 - 8.0.0-beta.23411.1 - 8.0.0-beta.23411.1 - 8.0.0-beta.23411.1 - 8.0.0-beta.23411.1 - 2.5.1-beta.23411.1 - 8.0.0-beta.23411.1 - 8.0.0-beta.23411.1 - 8.0.0-beta.23411.1 - 8.0.0-beta.23411.1 - 8.0.0-beta.23411.1 - 8.0.0-beta.23411.1 - 8.0.0-beta.23411.1 - 8.0.0-beta.23411.1 - 8.0.0-beta.23411.1 + 8.0.0-beta.23463.1 + 8.0.0-beta.23463.1 + 8.0.0-beta.23463.1 + 8.0.0-beta.23463.1 + 8.0.0-beta.23463.1 + 8.0.0-beta.23463.1 + 2.5.1-beta.23463.1 + 8.0.0-beta.23463.1 + 8.0.0-beta.23463.1 + 8.0.0-beta.23463.1 + 8.0.0-beta.23463.1 + 8.0.0-beta.23463.1 + 8.0.0-beta.23463.1 + 8.0.0-beta.23463.1 + 8.0.0-beta.23463.1 + 8.0.0-beta.23463.1 6.0.0-preview.1.102 - 8.0.0-rc.1.23406.6 + 9.0.0-alpha.1.23466.6 6.0.0 - 8.0.0-rc.1.23406.6 + 9.0.0-alpha.1.23466.6 8.0.0-preview.7.23325.2 - 16.0.5-alpha.1.23408.1 - 16.0.5-alpha.1.23408.1 - 16.0.5-alpha.1.23408.1 - 16.0.5-alpha.1.23408.1 - 16.0.5-alpha.1.23408.1 - 16.0.5-alpha.1.23408.1 - 16.0.5-alpha.1.23408.1 - 16.0.5-alpha.1.23408.1 + 16.0.5-alpha.1.23452.1 + 16.0.5-alpha.1.23452.1 + 16.0.5-alpha.1.23452.1 + 16.0.5-alpha.1.23452.1 + 16.0.5-alpha.1.23452.1 + 16.0.5-alpha.1.23452.1 + 16.0.5-alpha.1.23452.1 + 16.0.5-alpha.1.23452.1 6.0.0 1.1.1 @@ -133,34 +132,34 @@ 5.0.0 5.0.0 7.0.0 - 8.0.0-rc.1.23406.6 + 9.0.0-alpha.1.23466.6 6.0.0 7.0.0 4.5.4 4.5.0 - 8.0.0-rc.1.23406.6 + 9.0.0-alpha.1.23466.6 - 8.0.0-beta.23408.1 - 8.0.0-beta.23408.1 - 8.0.0-beta.23408.1 - 8.0.0-beta.23408.1 - 8.0.0-beta.23408.1 - 8.0.0-beta.23408.1 - 8.0.0-beta.23408.1 - 8.0.0-beta.23408.1 - 8.0.0-beta.23408.1 - 8.0.0-beta.23408.1 - 8.0.0-beta.23408.1 - 8.0.0-beta.23408.1 - 8.0.0-beta.23408.1 - 8.0.0-beta.23408.1 + 8.0.0-beta.23456.1 + 8.0.0-beta.23456.1 + 8.0.0-beta.23456.1 + 8.0.0-beta.23456.1 + 8.0.0-beta.23456.1 + 8.0.0-beta.23456.1 + 8.0.0-beta.23456.1 + 8.0.0-beta.23456.1 + 8.0.0-beta.23456.1 + 8.0.0-beta.23456.1 + 8.0.0-beta.23456.1 + 8.0.0-beta.23456.1 + 8.0.0-beta.23456.1 + 8.0.0-beta.23456.1 - 1.0.0-prerelease.23362.5 - 1.0.0-prerelease.23362.5 - 1.0.0-prerelease.23362.5 - 1.0.0-prerelease.23362.5 - 1.0.0-prerelease.23362.5 - 1.0.0-prerelease.23362.5 + 1.0.0-prerelease.23464.6 + 1.0.0-prerelease.23464.6 + 1.0.0-prerelease.23464.6 + 1.0.0-prerelease.23464.6 + 1.0.0-prerelease.23464.6 + 1.0.0-prerelease.23464.6 16.11.27-beta1.23180.1 2.0.0-beta4.23307.1 @@ -180,17 +179,17 @@ 1.1.0 17.4.0-preview-20220707-01 - 8.0.0-prerelease.23407.2 - 8.0.0-prerelease.23407.2 - 8.0.0-prerelease.23407.2 - 8.0.0-alpha.0.23407.2 + 8.0.0-prerelease.23456.2 + 8.0.0-prerelease.23456.2 + 8.0.0-prerelease.23456.2 + 8.0.0-alpha.0.23461.1 2.4.2 1.0.0 2.4.5 3.12.0 4.1.0 6.0.0 - 13.0.1 + 13.0.3 1.0.2 2.0.4 4.18.4 @@ -204,57 +203,58 @@ 2.46.3 2.45.0 2.45.0 - - 1.1.2-beta1.23323.1 - 7.0.0-preview-20221010.1 + 8.0.0-preview-20230918.1 - 8.0.0-rc.1.23406.6 + 9.0.0-alpha.1.23466.6 - 0.11.4-alpha.23407.2 + 0.11.4-alpha.23468.2 - 8.0.0-rc.1.23406.6 + 9.0.0-alpha.1.23466.6 - 8.0.0-rc.1.23407.2 + 9.0.0-alpha.1.23454.1 2.2.2 8.0.0-alpha.1.23180.2 - 16.0.5-alpha.1.23408.1 - 16.0.5-alpha.1.23408.1 - 16.0.5-alpha.1.23408.1 - 16.0.5-alpha.1.23408.1 - 16.0.5-alpha.1.23408.1 - 16.0.5-alpha.1.23408.1 - 16.0.5-alpha.1.23408.1 - 16.0.5-alpha.1.23408.1 - 16.0.5-alpha.1.23408.1 - 16.0.5-alpha.1.23408.1 - 16.0.5-alpha.1.23408.1 - 16.0.5-alpha.1.23408.1 - 16.0.5-alpha.1.23408.1 - 16.0.5-alpha.1.23408.1 + 16.0.5-alpha.1.23452.1 + 16.0.5-alpha.1.23452.1 + 16.0.5-alpha.1.23452.1 + 16.0.5-alpha.1.23452.1 + 16.0.5-alpha.1.23452.1 + 16.0.5-alpha.1.23452.1 + 16.0.5-alpha.1.23452.1 + 16.0.5-alpha.1.23452.1 + 16.0.5-alpha.1.23452.1 + 16.0.5-alpha.1.23452.1 + 16.0.5-alpha.1.23452.1 + 16.0.5-alpha.1.23452.1 + 16.0.5-alpha.1.23452.1 + 16.0.5-alpha.1.23452.1 - 9.0.0-alpha.1.23415.2 + 9.0.0-alpha.1.23465.3 $(MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion) 1.1.87-gba258badda 1.0.0-v3.14.0.5722 - 16.0.5-alpha.1.23408.1 - 16.0.5-alpha.1.23408.1 - 16.0.5-alpha.1.23408.1 - 16.0.5-alpha.1.23408.1 - 16.0.5-alpha.1.23408.1 - 16.0.5-alpha.1.23408.1 - 16.0.5-alpha.1.23408.1 - 16.0.5-alpha.1.23408.1 + 16.0.5-alpha.1.23452.1 + 16.0.5-alpha.1.23452.1 + 16.0.5-alpha.1.23452.1 + 16.0.5-alpha.1.23452.1 + 16.0.5-alpha.1.23452.1 + 16.0.5-alpha.1.23452.1 + 16.0.5-alpha.1.23452.1 + 16.0.5-alpha.1.23452.1 3.1.7 1.0.406601 + + 9.0.100-alpha.1.23469.3 + $(MicrosoftDotnetSdkInternalVersion) diff --git a/eng/build.ps1 b/eng/build.ps1 index 67440febafd5ce..fc771e7635d1fa 100644 --- a/eng/build.ps1 +++ b/eng/build.ps1 @@ -78,8 +78,8 @@ function Get-Help() { Write-Host "Libraries settings:" Write-Host " -allconfigurations Build packages for all build configurations." Write-Host " -coverage Collect code coverage when testing." - Write-Host " -framework (-f) Build framework: net8.0 or net48." - Write-Host " [Default: net8.0]" + Write-Host " -framework (-f) Build framework: net9.0 or net48." + Write-Host " [Default: net9.0]" Write-Host " -testnobuild Skip building tests when invoking -test." Write-Host " -testscope Scope tests, allowed values: innerloop, outerloop, all." Write-Host "" diff --git a/eng/build.sh b/eng/build.sh index e86cd084367c05..c68a742ffbebc8 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -32,7 +32,7 @@ usage() echo " [Default: Debug]" echo " --os Target operating system: windows, linux, freebsd, osx, maccatalyst, tvos," echo " tvossimulator, ios, iossimulator, android, browser, wasi, netbsd, illumos, solaris" - echo " linux-musl, linux-bionic or haiku." + echo " linux-musl, linux-bionic, tizen, or haiku." echo " [Default: Your machine's OS.]" echo " --outputrid Optional argument that overrides the target rid name." echo " --projects Project or solution file(s) to build." @@ -67,8 +67,8 @@ usage() echo "Libraries settings:" echo " --allconfigurations Build packages for all build configurations." echo " --coverage Collect code coverage when testing." - echo " --framework (-f) Build framework: net8.0 or net48." - echo " [Default: net8.0]" + echo " --framework (-f) Build framework: net9.0 or net48." + echo " [Default: net9.0]" echo " --testnobuild Skip building tests when invoking -test." echo " --testscope Test scope, allowed values: innerloop, outerloop, all." echo "" @@ -139,13 +139,12 @@ initDistroRid() local targetOs="$1" local targetArch="$2" local isCrossBuild="$3" - local isPortableBuild="$4" # Only pass ROOTFS_DIR if __DoCrossArchBuild is specified and the current platform is not an Apple platform (that doesn't use rootfs) if [[ $isCrossBuild == 1 && "$targetOs" != "osx" && "$targetOs" != "ios" && "$targetOs" != "iossimulator" && "$targetOs" != "tvos" && "$targetOs" != "tvossimulator" && "$targetOs" != "maccatalyst" ]]; then passedRootfsDir=${ROOTFS_DIR} fi - initDistroRidGlobal "${targetOs}" "${targetArch}" "${isPortableBuild}" "${passedRootfsDir}" + initDistroRidGlobal "${targetOs}" "${targetArch}" "${passedRootfsDir}" } showSubsetHelp() @@ -549,7 +548,7 @@ if [[ "${TreatWarningsAsErrors:-}" == "false" ]]; then arguments="$arguments -warnAsError 0" fi -initDistroRid "$os" "$arch" "$crossBuild" "$portableBuild" +initDistroRid "$os" "$arch" "$crossBuild" # Disable targeting pack caching as we reference a partially constructed targeting pack and update it later. # The later changes are ignored when using the cache. diff --git a/eng/collect_vsinfo.ps1 b/eng/collect_vsinfo.ps1 new file mode 100644 index 00000000000000..e2178fe4b24f8f --- /dev/null +++ b/eng/collect_vsinfo.ps1 @@ -0,0 +1,65 @@ +<# +.PARAMETER ArchiveRunName +Name of the run for vs logs + +.NOTES +Returns 0 if succeeds, 1 otherwise +#> +[CmdletBinding(PositionalBinding=$false)] +Param ( + [Parameter(Mandatory=$True)] + [string] $ArchiveRunName +) + +. $PSScriptRoot/common/tools.ps1 + +$ProgressPreference = "SilentlyContinue" +$LogDir = Join-Path $LogDir $ArchiveRunName +mkdir $LogDir + +$vscollect_uri="http://aka.ms/vscollect.exe" +$vscollect="$env:TEMP\vscollect.exe" + +if (-not (Test-Path $vscollect)) { + Retry({ + Write-Host "GET $vscollect_uri" + Invoke-WebRequest $vscollect_uri -OutFile $vscollect -UseBasicParsing + }) + + if (-not (Test-Path $vscollect)) { + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Unable to download vscollect." + exit 1 + } +} + +&"$vscollect" +Move-Item $env:TEMP\vslogs.zip "$LogDir" + +$vswhere = "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" +if (-not (Test-Path -Path "$vswhere" -PathType Leaf)) +{ + Write-Error "Couldn't locate vswhere at $vswhere" + exit 1 +} + +&"$vswhere" -all -prerelease -products * | Tee-Object -FilePath "$LogDir\vs_where.log" + +$vsdir = &"$vswhere" -latest -prerelease -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath + +if (-not (Test-Path $vsdir)) +{ + $procDumpDir = Join-Path $ToolsDir "procdump" + $procDumpToolPath = Join-Path $procDumpDir "procdump.exe" + $procdump_uri = "https://download.sysinternals.com/files/Procdump.zip" + + if (-not (Test-Path $procDumpToolPath)) { + Retry({ + Write-Host "GET $procdump_uri" + Invoke-WebRequest $procdump_uri -OutFile "$TempDir\Procdump.zip" -UseBasicParsing + }) + + Expand-Archive -Path "$TempDir\Procdump.zip" $procDumpDir + } + + &"$procDumpToolPath" -ma -accepteula VSIXAutoUpdate.exe "$LogDir" +} diff --git a/eng/common/SetupNugetSources.ps1 b/eng/common/SetupNugetSources.ps1 index 6e99723945183e..2dc86ea2cdda1a 100644 --- a/eng/common/SetupNugetSources.ps1 +++ b/eng/common/SetupNugetSources.ps1 @@ -2,7 +2,7 @@ # This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080 # # What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry -# under for each Maestro managed private feed. Two additional credential +# under for each Maestro managed private feed. Two additional credential # entries are also added for the two private static internal feeds: dotnet3-internal and dotnet3-internal-transport. # # This script needs to be called in every job that will restore packages and which the base repo has @@ -37,7 +37,7 @@ Set-StrictMode -Version 2.0 # Add source entry to PackageSources function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Username, $Password) { $packageSource = $sources.SelectSingleNode("add[@key='$SourceName']") - + if ($packageSource -eq $null) { $packageSource = $doc.CreateElement("add") @@ -48,7 +48,7 @@ function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Usern else { Write-Host "Package source $SourceName already present." } - + AddCredential -Creds $creds -Source $SourceName -Username $Username -Password $Password } @@ -89,7 +89,7 @@ function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Username, $Passw $maestroPrivateSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]") Write-Host "Inserting credentials for $($maestroPrivateSources.Count) Maestro's private feeds." - + ForEach ($PackageSource in $maestroPrivateSources) { Write-Host "`tInserting credential for Maestro's feed:" $PackageSource.Key AddCredential -Creds $creds -Source $PackageSource.Key -Username $Username -Password $Password @@ -153,7 +153,7 @@ if ($dotnet31Source -ne $null) { AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password } -$dotnetVersions = @('5','6','7') +$dotnetVersions = @('5','6','7','8') foreach ($dotnetVersion in $dotnetVersions) { $feedPrefix = "dotnet" + $dotnetVersion; diff --git a/eng/common/SetupNugetSources.sh b/eng/common/SetupNugetSources.sh index 8af7d899db1212..a8bb8acd3be180 100644 --- a/eng/common/SetupNugetSources.sh +++ b/eng/common/SetupNugetSources.sh @@ -4,7 +4,7 @@ # This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080 # # What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry -# under for each Maestro's managed private feed. Two additional credential +# under for each Maestro's managed private feed. Two additional credential # entries are also added for the two private static internal feeds: dotnet3-internal and dotnet3-internal-transport. # # This script needs to be called in every job that will restore packages and which the base repo has @@ -68,7 +68,7 @@ if [ "$?" != "0" ]; then sed -i.bak "s|$ConfigNodeHeader|$ConfigNodeHeader${NL}$PackageSourcesTemplate|" $ConfigFile fi -# Ensure there is a ... section. +# Ensure there is a ... section. grep -i "" $ConfigFile if [ "$?" != "0" ]; then echo "Adding ... section." @@ -105,7 +105,7 @@ if [ "$?" == "0" ]; then PackageSources+=('dotnet3.1-internal-transport') fi -DotNetVersions=('5' '6' '7') +DotNetVersions=('5' '6' '7' '8') for DotNetVersion in ${DotNetVersions[@]} ; do FeedPrefix="dotnet${DotNetVersion}"; @@ -142,7 +142,7 @@ IFS=$PrevIFS for FeedName in ${PackageSources[@]} ; do # Check if there is no existing credential for this FeedName - grep -i "<$FeedName>" $ConfigFile + grep -i "<$FeedName>" $ConfigFile if [ "$?" != "0" ]; then echo "Adding credentials for $FeedName." diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake index a88d643c8a765e..0998e875e5f78d 100644 --- a/eng/common/cross/toolchain.cmake +++ b/eng/common/cross/toolchain.cmake @@ -207,6 +207,7 @@ elseif(ILLUMOS) set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} -lssp") elseif(HAIKU) set(CMAKE_SYSROOT "${CROSS_ROOTFS}") + set(CMAKE_PROGRAM_PATH "${CMAKE_PROGRAM_PATH};${CROSS_ROOTFS}/cross-tools-x86_64/bin") set(TOOLSET_PREFIX ${TOOLCHAIN}-) function(locate_toolchain_exec exec var) @@ -217,7 +218,6 @@ elseif(HAIKU) endif() find_program(EXEC_LOCATION_${exec} - PATHS "${CROSS_ROOTFS}/cross-tools-x86_64/bin" NAMES "${TOOLSET_PREFIX}${exec}${CLR_CMAKE_COMPILER_FILE_NAME_VERSION}" "${TOOLSET_PREFIX}${exec}") diff --git a/eng/common/loc/P22DotNetHtmlLocalization.lss b/eng/common/loc/P22DotNetHtmlLocalization.lss index 858a0b237c62ce..5d892d619398f9 100644 Binary files a/eng/common/loc/P22DotNetHtmlLocalization.lss and b/eng/common/loc/P22DotNetHtmlLocalization.lss differ diff --git a/eng/common/native/init-compiler.sh b/eng/common/native/init-compiler.sh index 517401b688bf76..f5c1ec7eafeb28 100644 --- a/eng/common/native/init-compiler.sh +++ b/eng/common/native/init-compiler.sh @@ -63,7 +63,7 @@ if [ -z "$CLR_CC" ]; then # Set default versions if [ -z "$majorVersion" ]; then # note: gcc (all versions) and clang versions higher than 6 do not have minor version in file name, if it is zero. - if [ "$compiler" = "clang" ]; then versions="16 15 14 13 12 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5" + if [ "$compiler" = "clang" ]; then versions="17 16 15 14 13 12 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5" elif [ "$compiler" = "gcc" ]; then versions="13 12 11 10 9 8 7 6 5 4.9"; fi for version in $versions; do diff --git a/eng/common/native/init-distro-rid.sh b/eng/common/native/init-distro-rid.sh index aba9fe24028b0f..de1687b2ccbe79 100644 --- a/eng/common/native/init-distro-rid.sh +++ b/eng/common/native/init-distro-rid.sh @@ -79,7 +79,6 @@ getNonPortableDistroRid() # Input: # os: (str) # arch: (str) -# isPortable: (int) # rootfsDir?: (nullable:string) # # Return: @@ -97,10 +96,9 @@ initDistroRidGlobal() { local targetOs="$1" local targetArch="$2" - local isPortable="$3" local rootfsDir="" - if [ "$#" -ge 4 ]; then - rootfsDir="$4" + if [ "$#" -ge 3 ]; then + rootfsDir="$3" fi if [ -n "${rootfsDir}" ]; then diff --git a/eng/common/sdl/trim-assets-version.ps1 b/eng/common/sdl/trim-assets-version.ps1 new file mode 100644 index 00000000000000..a2e0048770452f --- /dev/null +++ b/eng/common/sdl/trim-assets-version.ps1 @@ -0,0 +1,75 @@ +<# +.SYNOPSIS +Install and run the 'Microsoft.DotNet.VersionTools.Cli' tool with the 'trim-artifacts-version' command to trim the version from the NuGet assets file name. + +.PARAMETER InputPath +Full path to directory where artifact packages are stored + +.PARAMETER Recursive +Search for NuGet packages recursively + +#> + +Param( + [string] $InputPath, + [bool] $Recursive = $true +) + +$CliToolName = "Microsoft.DotNet.VersionTools.Cli" + +function Install-VersionTools-Cli { + param( + [Parameter(Mandatory=$true)][string]$Version + ) + + Write-Host "Installing the package '$CliToolName' with a version of '$version' ..." + $feed = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" + + $argumentList = @("tool", "install", "--local", "$CliToolName", "--add-source $feed", "--no-cache", "--version $Version", "--create-manifest-if-needed") + Start-Process "$dotnet" -Verbose -ArgumentList $argumentList -NoNewWindow -Wait +} + +# ------------------------------------------------------------------- + +if (!(Test-Path $InputPath)) { + Write-Host "Input Path '$InputPath' does not exist" + ExitWithExitCode 1 +} + +$ErrorActionPreference = 'Stop' +Set-StrictMode -Version 2.0 + +$disableConfigureToolsetImport = $true +$global:LASTEXITCODE = 0 + +# `tools.ps1` checks $ci to perform some actions. Since the SDL +# scripts don't necessarily execute in the same agent that run the +# build.ps1/sh script this variable isn't automatically set. +$ci = $true +. $PSScriptRoot\..\tools.ps1 + +try { + $dotnetRoot = InitializeDotNetCli -install:$true + $dotnet = "$dotnetRoot\dotnet.exe" + + $toolsetVersion = Read-ArcadeSdkVersion + Install-VersionTools-Cli -Version $toolsetVersion + + $cliToolFound = (& "$dotnet" tool list --local | Where-Object {$_.Split(' ')[0] -eq $CliToolName}) + if ($null -eq $cliToolFound) { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "The '$CliToolName' tool is not installed." + ExitWithExitCode 1 + } + + Exec-BlockVerbosely { + & "$dotnet" $CliToolName trim-assets-version ` + --assets-path $InputPath ` + --recursive $Recursive + Exit-IfNZEC "Sdl" + } +} +catch { + Write-Host $_ + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_ + ExitWithExitCode 1 +} \ No newline at end of file diff --git a/eng/common/templates/job/execute-sdl.yml b/eng/common/templates/job/execute-sdl.yml index 7aabaa18017bf6..7870f93bc17652 100644 --- a/eng/common/templates/job/execute-sdl.yml +++ b/eng/common/templates/job/execute-sdl.yml @@ -105,6 +105,11 @@ jobs: downloadPath: $(Build.ArtifactStagingDirectory)\artifacts checkDownloadedFiles: true + - powershell: eng/common/sdl/trim-assets-version.ps1 + -InputPath $(Build.ArtifactStagingDirectory)\artifacts + displayName: Trim the version from the NuGet packages + continueOnError: ${{ parameters.sdlContinueOnError }} + - powershell: eng/common/sdl/extract-artifact-packages.ps1 -InputPath $(Build.ArtifactStagingDirectory)\artifacts\BlobArtifacts -ExtractPath $(Build.ArtifactStagingDirectory)\artifacts\BlobArtifacts diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index c9eced9f7df4c6..aa74ab4a81e782 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -671,6 +671,10 @@ function InitializeNativeTools() { } } +function Read-ArcadeSdkVersion() { + return $GlobalJson.'msbuild-sdks'.'Microsoft.DotNet.Arcade.Sdk' +} + function InitializeToolset() { if (Test-Path variable:global:_ToolsetBuildProj) { return $global:_ToolsetBuildProj @@ -678,7 +682,7 @@ function InitializeToolset() { $nugetCache = GetNuGetPackageCachePath - $toolsetVersion = $GlobalJson.'msbuild-sdks'.'Microsoft.DotNet.Arcade.Sdk' + $toolsetVersion = Read-ArcadeSdkVersion $toolsetLocationFile = Join-Path $ToolsetDir "$toolsetVersion.txt" if (Test-Path $toolsetLocationFile) { diff --git a/eng/disable_vsupdate.ps1 b/eng/disable_vsupdate.ps1 new file mode 100644 index 00000000000000..d8d365f0577103 --- /dev/null +++ b/eng/disable_vsupdate.ps1 @@ -0,0 +1,23 @@ +schtasks /change /tn "\Microsoft\VisualStudio\VSIX Auto Update" /disable + +$vswhere = "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" +if (-not (Test-Path -Path "$vswhere" -PathType Leaf)) +{ + Write-Error "Couldn't locate vswhere at $vswhere" + exit 1 +} + +$vsdir = &"$vswhere" -latest -prerelease -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath +$vsregedit = "$vsdir\Common7\IDE\VsRegEdit.exe" + +if (-not (Test-Path -Path "$vsregedit" )) +{ + Write-Error "VSWhere returned path: $vsdir, but regedit $vsregedit doesn't exist." + exit 1 +} + +Write-Output "VSWhere returned path: $vsdir, using regedit $vsregedit" +Write-Output "Disabling updates through VS Registry:" + +&"$vsdir\Common7\IDE\VsRegEdit.exe" set local HKCU ExtensionManager AutomaticallyCheckForUpdates2Override dword 0 +&"$vsdir\Common7\IDE\VsRegEdit.exe" read local HKCU ExtensionManager AutomaticallyCheckForUpdates2Override dword diff --git a/eng/empty.csproj b/eng/empty.csproj deleted file mode 100644 index 55eefdef1ada48..00000000000000 --- a/eng/empty.csproj +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - $(NetCoreAppToolCurrent) - - - - - diff --git a/eng/illink.targets b/eng/illink.targets index c837c96e51dc47..95dfef07654d08 100644 --- a/eng/illink.targets +++ b/eng/illink.targets @@ -1,12 +1,36 @@ + + <_ILLinkTasksSourceDir>$(ToolsProjectRoot)illink\src\ILLink.Tasks\ + $(ToolsProjectRoot)illink\src\ILLink.RoslynAnalyzer\build\Microsoft.NET.ILLink.Analyzers.props + + + + + + + TargetFramework=$(NetCoreAppToolCurrent) + TargetFramework=$(NetFrameworkToolCurrent) + + + + + true - - <_IsTrimmingEnabled>false - + <_RequiresILLinkPack>false + $(ToolsILLinkDir)$(NetCoreAppToolCurrent)/ILLink.Tasks.dll _EmbedILLinkXmls;$(PrepareResourcesDependsOn) $(TargetsTriggeredByCompilation);ILLinkTrimAssembly diff --git a/eng/liveBuilds.targets b/eng/liveBuilds.targets index 370e19805cc3a0..5c5b6f841f90fa 100644 --- a/eng/liveBuilds.targets +++ b/eng/liveBuilds.targets @@ -29,7 +29,7 @@ $([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', 'aotsdk')) $([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', 'build')) - $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'ILLink.Tasks', '$(Configuration)')) + $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'ILLink.Tasks', '$(ToolsConfiguration)')) $([MSBuild]::NormalizeDirectory('$(MonoArtifactsPath)', 'cross', $(TargetOS)-$(TargetArchitecture.ToLowerInvariant()))) $([MSBuild]::NormalizeDirectory('$(LibrariesArtifactsPath)', 'obj', 'grpcserver', 'docker')) diff --git a/eng/native/build-commons.sh b/eng/native/build-commons.sh index 072325a6b22f9a..1cd4ea0ed1231d 100755 --- a/eng/native/build-commons.sh +++ b/eng/native/build-commons.sh @@ -11,7 +11,7 @@ initTargetDistroRid() passedRootfsDir="$ROOTFS_DIR" fi - initDistroRidGlobal "$__TargetOS" "$__TargetArch" "$__PortableBuild" "$passedRootfsDir" + initDistroRidGlobal "$__TargetOS" "$__TargetArch" "$passedRootfsDir" } setup_dirs() @@ -311,7 +311,7 @@ while :; do lowerI="$(echo "${1/--/-}" | tr "[:upper:]" "[:lower:]")" case "$lowerI" in - -\?|-h|--help) + -\?|-h|-help) usage exit 1 ;; diff --git a/eng/native/configurecompiler.cmake b/eng/native/configurecompiler.cmake index 0be4937c7f8d46..6fe1e183e62112 100644 --- a/eng/native/configurecompiler.cmake +++ b/eng/native/configurecompiler.cmake @@ -54,7 +54,22 @@ add_compile_definitions("$<$:DEBUG;_DEBUG;_DBG;URTBLDENV_FRIENDL add_compile_definitions("$<$,$>:NDEBUG;URTBLDENV_FRIENDLY=Retail>") if (MSVC) - add_linker_flag(/guard:cf) + + define_property(TARGET PROPERTY CLR_CONTROL_FLOW_GUARD INHERITED BRIEF_DOCS "Controls the /guard:cf flag presence" FULL_DOCS "Set this property to ON or OFF to indicate if the /guard:cf compiler and linker flag should be present") + define_property(TARGET PROPERTY CLR_EH_CONTINUATION INHERITED BRIEF_DOCS "Controls the /guard:ehcont flag presence" FULL_DOCS "Set this property to ON or OFF to indicate if the /guard:ehcont compiler flag should be present") + define_property(TARGET PROPERTY CLR_EH_OPTION INHERITED BRIEF_DOCS "Defines the value of the /EH option" FULL_DOCS "Set this property to one of the valid /EHxx options (/EHa, /EHsc, /EHa-, ...)") + + set_property(GLOBAL PROPERTY CLR_CONTROL_FLOW_GUARD ON) + + # Remove the /EHsc from the CXX flags so that the compile options are the only source of truth for that + string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + set_property(GLOBAL PROPERTY CLR_EH_OPTION /EHsc) + + add_compile_options($<$:$>) + add_link_options($<$>:/guard:cf>) + + # Load all imported DLLs from the System32 directory. + add_linker_flag(/DEPENDENTLOADFLAG:0x800) # Linker flags # @@ -841,7 +856,9 @@ if (MSVC) add_compile_options($<$:/Gz>) endif (CLR_CMAKE_HOST_ARCH_I386) - add_compile_options($<$,$,$>>:/GL>) + set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON) + set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_DEBUG OFF) + set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_CHECKED OFF) if (CLR_CMAKE_HOST_ARCH_AMD64) # The generator expression in the following command means that the /homeparams option is added only for debug builds for C and C++ source files @@ -850,16 +867,15 @@ if (MSVC) # enable control-flow-guard support for native components for non-Arm64 builds # Added using variables instead of add_compile_options to let individual projects override it - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /guard:cf") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /guard:cf") + add_compile_options($<$,$>>:/guard:cf>) # Enable EH-continuation table and CET-compatibility for native components for amd64 builds except for components of the Mono # runtime. Added some switches using variables instead of add_compile_options to let individual projects override it. if (CLR_CMAKE_HOST_ARCH_AMD64 AND NOT CLR_CMAKE_RUNTIME_MONO) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /guard:ehcont") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /guard:ehcont") - set(CMAKE_ASM_MASM_FLAGS "${CMAKE_ASM_MASM_FLAGS} /guard:ehcont") - add_linker_flag(/guard:ehcont) + set_property(GLOBAL PROPERTY CLR_EH_CONTINUATION ON) + + add_compile_options($<$,$>>:/guard:ehcont>) + add_link_options($<$>:/guard:ehcont>) set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /CETCOMPAT") endif (CLR_CMAKE_HOST_ARCH_AMD64 AND NOT CLR_CMAKE_RUNTIME_MONO) @@ -888,7 +904,9 @@ if (MSVC) endif (CLR_CMAKE_TARGET_ARCH_ARM OR CLR_CMAKE_TARGET_ARCH_ARM64) # Don't display the output header when building RC files. - add_compile_options($<$:/nologo>) + set(CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS} /nologo") + # Don't display the output header when building asm files. + set(CMAKE_ASM_MASM_FLAGS "${CMAKE_ASM_MASM_FLAGS} /nologo") endif (MSVC) # Configure non-MSVC compiler flags that apply to all platforms (unix-like or otherwise) diff --git a/eng/native/functions.cmake b/eng/native/functions.cmake index d5ef9ed625996a..c9f8a619a52913 100644 --- a/eng/native/functions.cmake +++ b/eng/native/functions.cmake @@ -588,21 +588,6 @@ function(disable_pax_mprotect targetName) endif(CLR_CMAKE_HOST_LINUX OR CLR_CMAKE_HOST_FREEBSD OR CLR_CMAKE_HOST_NETBSD OR CLR_CMAKE_HOST_SUNOS) endfunction() -if (CMAKE_VERSION VERSION_LESS "3.12") - # Polyfill add_compile_definitions when it is unavailable - function(add_compile_definitions) - get_directory_property(DIR_COMPILE_DEFINITIONS COMPILE_DEFINITIONS) - list(APPEND DIR_COMPILE_DEFINITIONS ${ARGV}) - set_directory_properties(PROPERTIES COMPILE_DEFINITIONS "${DIR_COMPILE_DEFINITIONS}") - endfunction() -endif() - -if (CMAKE_VERSION VERSION_LESS "3.16") - # Provide a no-op polyfill for precompiled headers on old CMake versions - function(target_precompile_headers) - endfunction() -endif() - # add_linker_flag(Flag [Config1 Config2 ...]) function(add_linker_flag Flag) if (ARGN STREQUAL "") diff --git a/eng/native/ijw/IJW.cmake b/eng/native/ijw/IJW.cmake index 9ef90525dda8ba..4b580aff599c88 100644 --- a/eng/native/ijw/IJW.cmake +++ b/eng/native/ijw/IJW.cmake @@ -2,19 +2,13 @@ if (CLR_CMAKE_HOST_WIN32) function(remove_ijw_incompatible_options options updatedOptions) # IJW isn't compatible with Ehsc, which CMake enables by default - if(options MATCHES "/EHsc") - string(REPLACE "/EHsc" "" options "${options}") - endif() + set_property(DIRECTORY PROPERTY CLR_EH_OPTION "") # IJW isn't compatible with CFG - if(options MATCHES "/guard:cf") - string(REPLACE "/guard:cf" "" options "${options}") - endif() + set_property(DIRECTORY PROPERTY CLR_CONTROL_FLOW_GUARD OFF) # IJW isn't compatible with EHCONT, which requires CFG - if(options MATCHES "/guard:ehcont") - string(REPLACE "/guard:ehcont" "" options "${options}") - endif() + set_property(DIRECTORY PROPERTY CLR_EH_CONTINUATION OFF) # IJW isn't compatible with GR- if(options MATCHES "/GR-") @@ -70,6 +64,10 @@ if (CLR_CMAKE_HOST_WIN32) remove_ijw_incompatible_options("${dirCompileOptions}" dirCompileOptions) set_directory_properties(PROPERTIES COMPILE_OPTIONS "${dirCompileOptions}") + # IJW tests needs to load DLLs from somewhere other than System32 + string(REPLACE "/DEPENDENTLOADFLAG:0x800" "" CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}") + string(REPLACE "/DEPENDENTLOADFLAG:0x800" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}") + set(CLR_SDK_REF_PACK_OUTPUT "") set(CLR_SDK_REF_PACK_DISCOVERY_ERROR "") set(CLR_SDK_REF_PACK_DISCOVERY_RESULT 0) diff --git a/eng/native/init-vs-env.cmd b/eng/native/init-vs-env.cmd index 273f49b3392c2d..befe98ab407f72 100644 --- a/eng/native/init-vs-env.cmd +++ b/eng/native/init-vs-env.cmd @@ -26,6 +26,8 @@ if defined VisualStudioVersion goto :VSDetected set "__VSWhere=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" set "__VSCOMNTOOLS=" +if not exist "%__VSWhere%" goto :VSWhereMissing + if exist "%__VSWhere%" ( for /f "tokens=*" %%p in ( '"%__VSWhere%" -latest -prerelease -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath' @@ -56,6 +58,10 @@ echo %__MsgPrefix%Error: Visual Studio 2022 with C++ tools required. ^ Please see https://github.com/dotnet/runtime/blob/main/docs/workflow/requirements/windows-requirements.md for build requirements. exit /b 1 +:VSWhereMissing +echo %__MsgPrefix%Error: vswhere couldn not be found in Visual Studio Installer directory at "%__VSWhere%" +exit /b 1 + :SetVCEnvironment if "%__VCBuildArch%"=="" exit /b 0 diff --git a/eng/native/tryrun.cmake b/eng/native/tryrun.cmake index 97947fe887936f..cee5dbfcc37da7 100644 --- a/eng/native/tryrun.cmake +++ b/eng/native/tryrun.cmake @@ -170,8 +170,6 @@ else() message(FATAL_ERROR "Unsupported platform. OS: ${CMAKE_SYSTEM_NAME}, arch: ${TARGET_ARCH_NAME}") endif() -if(TARGET_ARCH_NAME MATCHES "^(x86|x64|s390x|armv6|loongarch64|ppc64le)$") +if(TARGET_ARCH_NAME MATCHES "^(x86|x64|s390x|armv6|loongarch64|riscv64|ppc64le)$") set_cache_value(HAVE_FUNCTIONAL_PTHREAD_ROBUST_MUTEXES_EXITCODE 0) -elseif (TARGET_ARCH_NAME STREQUAL "riscv64") - set_cache_value(HAVE_FUNCTIONAL_PTHREAD_ROBUST_MUTEXES_EXITCODE 1) endif() diff --git a/eng/pipelines/common/evaluate-default-paths.yml b/eng/pipelines/common/evaluate-default-paths.yml index cc01ca33c6afb0..c5bebbf8aeb4a3 100644 --- a/eng/pipelines/common/evaluate-default-paths.yml +++ b/eng/pipelines/common/evaluate-default-paths.yml @@ -32,6 +32,7 @@ parameters: src/tasks/WasmBuildTasks/* src/tasks/WorkloadBuildTasks/* src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/* + src/tasks/Microsoft.NET.WebAssembly.Webcil/* src/tests/Common/wasm-test-runner/* ] _wasm_pipelines: [ diff --git a/eng/pipelines/common/global-build-job.yml b/eng/pipelines/common/global-build-job.yml index 41cce9e1534f94..6a8d680ca3ae70 100644 --- a/eng/pipelines/common/global-build-job.yml +++ b/eng/pipelines/common/global-build-job.yml @@ -14,7 +14,6 @@ parameters: dependsOn: [] pool: '' platform: '' - pgoType: '' condition: true useContinueOnErrorDuringBuild: false shouldContinueOnError: false @@ -68,6 +67,7 @@ jobs: variables: - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - group: DotNet-HelixApi-Access + - group: AzureDevOps-Artifact-Feeds-Pats - name: _osParameter value: -os ${{ parameters.osGroup }} @@ -133,7 +133,6 @@ jobs: targetRid: ${{ parameters.targetRid }} nameSuffix: ${{ parameters.nameSuffix }} platform: ${{ parameters.platform }} - pgoType: ${{ parameters.pgoType }} shouldContinueOnError: ${{ parameters.shouldContinueOnError }} ${{ if ne(variableTemplate.forwardedParameters, '') }}: ${{ each parameter in variableTemplate.forwardedParameters }}: @@ -144,13 +143,62 @@ jobs: - ${{ each variable in parameters.variables }}: - ${{ variable }} steps: + - ${{ if eq(parameters.osGroup, 'windows') }}: + - powershell: | + schtasks /change /tn "\Microsoft\VisualStudio\VSIX Auto Update" /disable + + $vswhere = "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" + if (-not (Test-Path -Path "$vswhere" -PathType Leaf)) + { + Write-Error "Couldn't locate vswhere at $vswhere" + exit 1 + } + + $vsdir = &"$vswhere" -latest -prerelease -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath + $vsregedit = "$vsdir\Common7\IDE\VsRegEdit.exe" + + if (-not (Test-Path -Path "$vsregedit" )) + { + Write-Error "VSWhere returned path: $vsdir, but regedit $vsregedit doesn't exist." + exit 1 + } + + Write-Output "VSWhere returned path: $vsdir, using regedit $vsregedit" + Write-Output "Disabling updates through VS Registry:" + + &"$vsdir\Common7\IDE\VsRegEdit.exe" set local HKCU ExtensionManager AutomaticallyCheckForUpdates2Override dword 0 + &"$vsdir\Common7\IDE\VsRegEdit.exe" read local HKCU ExtensionManager AutomaticallyCheckForUpdates2Override dword + displayName: Disable VSIX updates + condition: always() + - checkout: self clean: true - fetchDepth: $(checkoutFetchDepth) + # If running in source build mode, a git stash will be used for the inner clone. Avoid setting a fetch depth, + # as a stash of a shallow cloned repo is not currently supported. + ${{ if ne(parameters.isSourceBuild, true) }}: + fetchDepth: $(checkoutFetchDepth) - ${{ if and(eq(parameters.isOfficialBuild, true), notin(parameters.osGroup, 'osx', 'maccatalyst', 'ios', 'iossimulator', 'tvos', 'tvossimulator')) }}: - template: /eng/pipelines/common/restore-internal-tools.yml + - ${{ if ne(variables['System.TeamProject'], 'public') }}: + - ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.hostedOs, 'windows')) }}: + - task: Bash@3 + displayName: Setup Private Feeds Credentials + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh + arguments: $(Build.SourcesDirectory)/NuGet.config $Token + env: + Token: $(dn-bot-dnceng-artifact-feeds-rw) + - ${{ else }}: + - task: PowerShell@2 + displayName: Setup Private Feeds Credentials + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token + env: + Token: $(dn-bot-dnceng-artifact-feeds-rw) + - ${{ each monoCrossAOTTargetOS in parameters.monoCrossAOTTargetOS }}: - task: DownloadPipelineArtifact@2 displayName: Download ${{monoCrossAOTTargetOS}} AOT offset files @@ -225,18 +273,22 @@ jobs: targetRid: ${{ parameters.targetRid }} nameSuffix: ${{ parameters.nameSuffix }} platform: ${{ parameters.platform }} - pgoType: ${{ parameters.pgoType }} shouldContinueOnError: ${{ parameters.shouldContinueOnError }} ${{ insert }}: ${{ parameters.extraStepsParameters }} + - ${{ if and(eq(parameters.isOfficialBuild, true), eq(parameters.osGroup, 'windows')) }}: + - powershell: ./eng/collect_vsinfo.ps1 -ArchiveRunName postbuild_log + displayName: Collect vslogs on exit + condition: always() + - task: PublishBuildArtifacts@1 displayName: Publish Logs inputs: PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/' PublishLocation: Container ${{ if notin(parameters.osGroup, 'browser', 'wasi') }}: - ArtifactName: Logs_Build_${{ parameters.osGroup }}_${{ parameters.osSubGroup }}_${{ parameters.archType }}_${{ parameters.buildConfig }}_${{ parameters.nameSuffix }} + ArtifactName: Logs_Build_Attempt$(System.JobAttempt)_${{ parameters.osGroup }}_${{ parameters.osSubGroup }}_${{ parameters.archType }}_${{ parameters.buildConfig }}_${{ parameters.nameSuffix }} ${{ if in(parameters.osGroup, 'browser', 'wasi') }}: - ArtifactName: Logs_Build_${{ parameters.osGroup }}_${{ parameters.archType }}_${{ parameters.hostedOs }}_${{ parameters.buildConfig }}_${{ parameters.nameSuffix }} + ArtifactName: Logs_Build_Attempt$(System.JobAttempt)_${{ parameters.osGroup }}_${{ parameters.archType }}_${{ parameters.hostedOs }}_${{ parameters.buildConfig }}_${{ parameters.nameSuffix }} continueOnError: true condition: always() diff --git a/eng/pipelines/common/macos-sign-with-entitlements.yml b/eng/pipelines/common/macos-sign-with-entitlements.yml index 6c65193845d70c..4879c5410ea0bd 100644 --- a/eng/pipelines/common/macos-sign-with-entitlements.yml +++ b/eng/pipelines/common/macos-sign-with-entitlements.yml @@ -1,12 +1,14 @@ parameters: filesToSign: [] + timeoutInMinutes: '30' steps: - task: UseDotNet@2 - displayName: 'Use .NET Core SDK 2.1.808' + displayName: Install .NET 6 SDK for signing. inputs: - packageType: sdk - version: 2.1.808 + packageType: 'sdk' + version: '6.0.x' + installationPath: '$(Agent.TempDirectory)/dotnet' - ${{ each file in parameters.filesToSign }}: - script: codesign -s - -f --entitlements ${{ file.entitlementsFile }} ${{ file.path }}/${{ file.name }} @@ -28,7 +30,7 @@ steps: includeRootFolder: true replaceExistingArchive: true - - task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1 + - task: EsrpCodeSigning@4 displayName: 'ESRP CodeSigning' inputs: ConnectedServiceName: 'ESRP CodeSigning' @@ -48,6 +50,14 @@ steps: "toolVersion": "1.0" } ] + SessionTimeout: ${{ parameters.timeoutInMinutes }} + MaxConcurrency: '50' + MaxRetryAttempts: '5' + PendingAnalysisWaitTimeoutMinutes: '5' + env: + DOTNET_MULTILEVEL_LOOKUP: 0 + DOTNET_ROOT: '$(Agent.TempDirectory)/dotnet' + DOTNET_MSBUILD_SDK_RESOLVER_CLI_DIR: '$(Agent.TempDirectory)/dotnet' - task: ExtractFiles@1 displayName: 'Extract MacOS after signing' diff --git a/eng/pipelines/common/platform-matrix.yml b/eng/pipelines/common/platform-matrix.yml index 8399c82ecd7695..c2f754d6ee2385 100644 --- a/eng/pipelines/common/platform-matrix.yml +++ b/eng/pipelines/common/platform-matrix.yml @@ -883,7 +883,7 @@ jobs: jobTemplate: ${{ parameters.jobTemplate }} helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }} variables: ${{ parameters.variables }} - osGroup: tizen + osGroup: linux # Our build scripts don't support Tizen and have always used Linux as the OS parameter. archType: armel targetRid: tizen-armel platform: tizen_armel diff --git a/eng/pipelines/common/templates/pipeline-with-resources.yml b/eng/pipelines/common/templates/pipeline-with-resources.yml index c30ce8597808d8..d50977f1bf08e8 100644 --- a/eng/pipelines/common/templates/pipeline-with-resources.yml +++ b/eng/pipelines/common/templates/pipeline-with-resources.yml @@ -15,8 +15,9 @@ resources: ROOTFS_DIR: /crossrootfs/armv6 - container: linux_arm64 - image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm64 + image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-biarch-amd64-arm64 env: + ROOTFS_HOST_DIR: /crossrootfs/x64 ROOTFS_DIR: /crossrootfs/arm64 - container: linux_musl_x64 @@ -85,12 +86,12 @@ resources: image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8 - container: browser_wasm - image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-webassembly + image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-webassembly-20230913040940-1edc1c6 env: ROOTFS_DIR: /crossrootfs/x64 - container: wasi_wasm - image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-webassembly + image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-webassembly-20230917141449-2aaa02c env: ROOTFS_DIR: /crossrootfs/x64 diff --git a/eng/pipelines/common/templates/runtimes/build-test-job.yml b/eng/pipelines/common/templates/runtimes/build-test-job.yml index 2b9871f183f766..e249e8ac922a7f 100644 --- a/eng/pipelines/common/templates/runtimes/build-test-job.yml +++ b/eng/pipelines/common/templates/runtimes/build-test-job.yml @@ -14,7 +14,6 @@ parameters: dependsOn: [] dependOnEvaluatePaths: false crossBuild: false - pgoType: '' ### Build managed test components (native components are getting built as part ### of the product build job). @@ -149,6 +148,6 @@ jobs: displayName: Publish Logs inputs: targetPath: $(Build.SourcesDirectory)/artifacts/log - artifactName: '${{ parameters.runtimeFlavor }}_Common_Runtime_TestBuildLogs_AnyOS_AnyCPU_$(buildConfig)_${{ parameters.testGroup }}' + artifactName: '${{ parameters.runtimeFlavor }}_Common_Runtime_TestBuildLogs_Attempt$(System.JobAttempt)_AnyOS_AnyCPU_$(buildConfig)_${{ parameters.testGroup }}' continueOnError: true condition: always() diff --git a/eng/pipelines/common/templates/runtimes/run-test-job.yml b/eng/pipelines/common/templates/runtimes/run-test-job.yml index a137b7c796e6b2..c7628f67e0fa1b 100644 --- a/eng/pipelines/common/templates/runtimes/run-test-job.yml +++ b/eng/pipelines/common/templates/runtimes/run-test-job.yml @@ -7,6 +7,7 @@ parameters: testGroup: '' crossBuild: false readyToRun: false + hotColdSplitting: false liveLibrariesBuildConfig: '' compositeBuildMode: false useCodeFlowEnforcement: '' @@ -119,6 +120,9 @@ jobs: value: 'composite' - name: LogNamePrefix value: TestRunLogs_R2R_CG2_Composite + - ${{ if eq(parameters.hotColdSplitting, true) }}: + - name: LogNamePrefix + value: TestRunLogs_R2R_CG2_HotColdSplitting - name: testTreeFilterArg value: '' @@ -341,14 +345,11 @@ jobs: timeoutPerTestInMinutes: $(timeoutPerTestInMinutes) timeoutPerTestCollectionInMinutes: $(timeoutPerTestCollectionInMinutes) - runCrossGen2: ${{ eq(parameters.readyToRun, true) }} - ${{ if and(ne(parameters.testGroup, 'innerloop'), eq(parameters.runtimeFlavor, 'coreclr')) }}: - runPALTestsDir: '$(coreClrProductRootFolderPath)/paltests' - compositeBuildMode: ${{ parameters.compositeBuildMode }} runInUnloadableContext: ${{ parameters.runInUnloadableContext }} tieringTest: ${{ parameters.tieringTest }} + hotColdSplitting: ${{ parameters.hotColdSplitting }} ${{ if eq(variables['System.TeamProject'], 'internal') }}: # Access token variable for internal project from the @@ -603,7 +604,7 @@ jobs: displayName: Publish Logs inputs: targetPath: $(Build.SourcesDirectory)/artifacts/log - artifactName: '${{ parameters.runtimeFlavor }}_${{ parameters.runtimeVariant }}_$(LogNamePrefix)_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)_${{ parameters.testGroup }}' + artifactName: '${{ parameters.runtimeFlavor }}_${{ parameters.runtimeVariant }}_$(LogNamePrefix)_Attempt$(System.JobAttempt)_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)_${{ parameters.testGroup }}' continueOnError: true condition: always() @@ -631,7 +632,7 @@ jobs: displayName: Create SuperPMI directories condition: always() - - script: $(PythonScript) $(Build.SourcesDirectory)/src/coreclr/scripts/superpmi.py merge-mch -log_level DEBUG -pattern $(MchFilesLocation)$(CollectionName).$(CollectionType)*.mch -output_mch_path $(MergedMchFileLocation)$(CollectionName).$(CollectionType).$(MchFileTag).mch + - script: $(PythonScript) $(Build.SourcesDirectory)/src/coreclr/scripts/superpmi.py merge-mch -log_level DEBUG -pattern $(MchFilesLocation)$(CollectionName).$(CollectionType)*.mch -output_mch_path $(MergedMchFileLocation)$(CollectionName).$(CollectionType).$(MchFileTag).mch displayName: 'Merge $(CollectionName)-$(CollectionType) SuperPMI collections' condition: always() diff --git a/eng/pipelines/common/templates/runtimes/send-to-helix-inner-step.yml b/eng/pipelines/common/templates/runtimes/send-to-helix-inner-step.yml index bd147de7e77264..12e3f68baafb94 100644 --- a/eng/pipelines/common/templates/runtimes/send-to-helix-inner-step.yml +++ b/eng/pipelines/common/templates/runtimes/send-to-helix-inner-step.yml @@ -1,6 +1,5 @@ parameters: osGroup: '' - restoreParams: '' sendParams: '' condition: '' displayName: '' @@ -9,28 +8,14 @@ parameters: steps: - ${{ if eq(parameters.osGroup, 'windows') }}: - # TODO: Remove and consolidate this when we move to arcade via init-tools.cmd. - - powershell: $(Build.SourcesDirectory)\eng\common\build.ps1 -ci -warnaserror 0 ${{ parameters.restoreParams }} - displayName: Restore blob feed tasks (Windows) - condition: and(succeeded(), ${{ and(ne(parameters.condition, false), ne(parameters.restoreParams, '')) }}) - - - powershell: $(Build.SourcesDirectory)\eng\common\msbuild.ps1 -ci -warnaserror 0 ${{ parameters.sendParams }} + - powershell: $(Build.SourcesDirectory)\eng\common\msbuild.ps1 --restore -ci -warnaserror 0 ${{ parameters.sendParams }} displayName: ${{ parameters.displayName }} (Windows) condition: and(succeeded(), ${{ and(ne(parameters.condition, false), ne(parameters.sendParams, '')) }}) env: ${{ parameters.environment }} continueOnError: ${{ eq(parameters.shouldContinueOnError, true) }} - ${{ if ne(parameters.osGroup, 'windows') }}: - # TODO: Remove and consolidate this when we move to arcade via init-tools.sh. - - script: $(Build.SourcesDirectory)/eng/common/build.sh --ci --warnaserror false ${{ parameters.restoreParams }} - displayName: Restore blob feed tasks (Unix) - condition: and(succeeded(), ${{ and(ne(parameters.condition, false), ne(parameters.restoreParams, '')) }}) - ${{ if eq(parameters.osGroup, 'freebsd') }}: - env: - # Arcade uses this SDK instead of trying to restore one. - DotNetCoreSdkDir: /usr/local/dotnet - - - script: $(Build.SourcesDirectory)/eng/common/msbuild.sh --ci --warnaserror false ${{ parameters.sendParams }} + - script: $(Build.SourcesDirectory)/eng/common/msbuild.sh --restore --ci --warnaserror false ${{ parameters.sendParams }} displayName: ${{ parameters.displayName }} (Unix) condition: and(succeeded(), ${{ and(ne(parameters.condition, false), ne(parameters.sendParams, '')) }}) env: ${{ parameters.environment }} diff --git a/eng/pipelines/common/templates/runtimes/send-to-helix-step.yml b/eng/pipelines/common/templates/runtimes/send-to-helix-step.yml index 37b455b19d8300..a45c3817d13b53 100644 --- a/eng/pipelines/common/templates/runtimes/send-to-helix-step.yml +++ b/eng/pipelines/common/templates/runtimes/send-to-helix-step.yml @@ -17,11 +17,11 @@ parameters: timeoutPerTestCollectionInMinutes: '' timeoutPerTestInMinutes: '' runCrossGen2: '' - runPALTestsDir: '' compositeBuildMode: false helixProjectArguments: '' runInUnloadableContext: '' tieringTest: '' + hotColdSplitting: '' nativeAotTest: '' longRunningGcTests: '' gcSimulatorTests: '' @@ -38,7 +38,6 @@ steps: - template: send-to-helix-inner-step.yml parameters: osGroup: ${{ parameters.osGroup }} - restoreParams: /p:DotNetPublishToBlobFeed=true -restore -projects $(Build.SourcesDirectory)$(dir)eng$(dir)empty.csproj sendParams: ${{ parameters.helixProjectArguments }} ${{ parameters.msbuildParallelism }} /bl:$(Build.SourcesDirectory)/artifacts/log/SendToHelix.binlog /p:TargetArchitecture=${{ parameters.archType }} /p:TargetOS=${{ parameters.osGroup }} /p:TargetOSSubgroup=${{ parameters.osSubgroup }} /p:Configuration=${{ parameters.buildConfig }} condition: and(succeeded(), ${{ parameters.condition }}) shouldContinueOnError: ${{ parameters.shouldContinueOnError }} @@ -55,11 +54,11 @@ steps: _CompositeBuildMode: ${{ parameters.compositeBuildMode }} _RunInUnloadableContext: ${{ parameters.runInUnloadableContext }} _TieringTest: ${{ parameters.tieringTest }} + _HotColdSplitting: ${{ parameters.hotColdSplitting }} _NativeAotTest: ${{ parameters.nativeAotTest }} _LongRunningGcTests: ${{ parameters.longRunningGcTests }} _GcSimulatorTests: ${{ parameters.gcSimulatorTests }} _Scenarios: ${{ join(',', parameters.scenarios) }} - _PALTestsDir: ${{ parameters.runPALTestsDir }} _TimeoutPerTestCollectionInMinutes: ${{ parameters.timeoutPerTestCollectionInMinutes }} _TimeoutPerTestInMinutes: ${{ parameters.timeoutPerTestInMinutes }} RuntimeFlavor: ${{ parameters.runtimeFlavor }} diff --git a/eng/pipelines/common/templates/runtimes/xplat-job.yml b/eng/pipelines/common/templates/runtimes/xplat-job.yml index 7249125648cf32..921dfc5d8bb25d 100644 --- a/eng/pipelines/common/templates/runtimes/xplat-job.yml +++ b/eng/pipelines/common/templates/runtimes/xplat-job.yml @@ -106,6 +106,34 @@ jobs: - ${{insert}}: ${{ variable }} steps: + - ${{ if eq(parameters.osGroup, 'windows') }}: + - powershell: | + schtasks /change /tn "\Microsoft\VisualStudio\VSIX Auto Update" /disable + + $vswhere = "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" + if (-not (Test-Path -Path "$vswhere" -PathType Leaf)) + { + Write-Error "Couldn't locate vswhere at $vswhere" + exit 1 + } + + $vsdir = &"$vswhere" -latest -prerelease -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath + $vsregedit = "$vsdir\Common7\IDE\VsRegEdit.exe" + + if (-not (Test-Path -Path "$vsregedit" )) + { + Write-Error "VSWhere returned path: $vsdir, but regedit $vsregedit doesn't exist." + exit 1 + } + + Write-Output "VSWhere returned path: $vsdir, using regedit $vsregedit" + Write-Output "Disabling updates through VS Registry:" + + &"$vsdir\Common7\IDE\VsRegEdit.exe" set local HKCU ExtensionManager AutomaticallyCheckForUpdates2Override dword 0 + &"$vsdir\Common7\IDE\VsRegEdit.exe" read local HKCU ExtensionManager AutomaticallyCheckForUpdates2Override dword + displayName: Disable VSIX updates + condition: always() + - checkout: self clean: true fetchDepth: $(checkoutFetchDepth) diff --git a/eng/pipelines/common/xplat-setup.yml b/eng/pipelines/common/xplat-setup.yml index 28257b05265ba0..a09e428e765cd2 100644 --- a/eng/pipelines/common/xplat-setup.yml +++ b/eng/pipelines/common/xplat-setup.yml @@ -154,12 +154,12 @@ jobs: # Public Linux Build Pool ${{ if and(or(in(parameters.osGroup, 'linux', 'freebsd', 'android', 'tizen'), eq(parameters.jobParameters.hostedOs, 'linux')), eq(variables['System.TeamProject'], 'public')) }}: name: $(DncEngPublicBuildPool) - demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open + demands: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open # Official Build Linux Pool ${{ if and(or(in(parameters.osGroup, 'linux', 'freebsd', 'android', 'tizen'), eq(parameters.jobParameters.hostedOs, 'linux')), ne(variables['System.TeamProject'], 'public')) }}: name: $(DncEngInternalBuildPool) - demands: ImageOverride -equals Build.Ubuntu.1804.Amd64 + demands: ImageOverride -equals Build.Ubuntu.2204.Amd64 # OSX Build Pool (we don't have on-prem OSX BuildPool). ${{ if in(parameters.osGroup, 'osx', 'maccatalyst', 'ios', 'iossimulator', 'tvos', 'tvossimulator') }}: diff --git a/eng/pipelines/coreclr/ci.yml b/eng/pipelines/coreclr/ci.yml index 209314a136702f..e277bf0f483fd4 100644 --- a/eng/pipelines/coreclr/ci.yml +++ b/eng/pipelines/coreclr/ci.yml @@ -165,3 +165,23 @@ extends: platforms: - linux_x64 - windows_x64 + + # + # PAL Tests + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: Debug + platforms: + - linux_x64 + - linux_musl_x64 + - linux_arm64 + - linux_musl_arm64 + - osx_x64 + - osx_arm64 + jobParameters: + buildArgs: -s clr.paltests+clr.paltestlist + nameSuffix: PALTests + extraStepsTemplate: /eng/pipelines/coreclr/templates/run-paltests-step.yml diff --git a/eng/pipelines/coreclr/crossgen2.yml b/eng/pipelines/coreclr/crossgen2.yml index 479dfc5f1121d5..1448474004cd81 100644 --- a/eng/pipelines/coreclr/crossgen2.yml +++ b/eng/pipelines/coreclr/crossgen2.yml @@ -56,3 +56,21 @@ extends: readyToRun: true displayNameArgs: R2R_CG2 liveLibrariesBuildConfig: Release + + # Run pri0 tests with hot/cold splitting enabled (only supported on x64 at the moment) + # TODO: test on arm64 once supported + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + buildConfig: checked + platforms: + - linux_x64 + - osx_x64 + - windows_x64 + jobParameters: + testGroup: innerloop + readyToRun: true + hotColdSplitting: true + displayNameArgs: R2R_CG2_HotColdSplitting + liveLibrariesBuildConfig: Release diff --git a/eng/pipelines/coreclr/jitrollingbuild.yml b/eng/pipelines/coreclr/jitrollingbuild.yml index 687b37d4819006..579e353864c8b3 100644 --- a/eng/pipelines/coreclr/jitrollingbuild.yml +++ b/eng/pipelines/coreclr/jitrollingbuild.yml @@ -13,6 +13,11 @@ trigger: # and should not be triggerable from a PR. pr: none +variables: +# disable CodeQL here, we have a separate pipeline for it +- name: Codeql.Enabled + value: False + extends: template: /eng/pipelines/common/templates/pipeline-with-resources.yml parameters: diff --git a/eng/pipelines/coreclr/perf-wasm-jobs.yml b/eng/pipelines/coreclr/perf-wasm-jobs.yml index aea24283deeb88..9bed189cab67e1 100644 --- a/eng/pipelines/coreclr/perf-wasm-jobs.yml +++ b/eng/pipelines/coreclr/perf-wasm-jobs.yml @@ -115,8 +115,8 @@ jobs: runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml logicalmachine: 'perftiger' javascriptEngine: 'v8' - # passed to ci_setup.py to work with 8.0 sdk when using tfm!=net8.0 - #additionalSetupParameters: '--dotnet-versions 8.0.0' + # For working with a newer sdk, and previous tfm (eg. 9.0 sdk, and net8.0 tfm) + additionalSetupParameters: '--dotnet-versions 8.0.0' collectHelixLogsScript: ${{ parameters.collectHelixLogsScript }} compare: ${{ parameters.compare }} onlySanityCheck: ${{ parameters.onlySanityCheck }} @@ -142,8 +142,8 @@ jobs: runjobtemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml logicalmachine: 'perftiger' javascriptEngine: 'v8' - # passed to ci_setup.py to work with 8.0 sdk when using tfm!=net8.0 - #additionalSetupParameters: '--dotnet-versions 8.0.0' # passed to ci_setup.py + # For working with a newer sdk, and previous tfm (eg. 9.0 sdk, and net8.0 tfm) + additionalSetupParameters: '--dotnet-versions 8.0.0' # passed to ci_setup.py collectHelixLogsScript: ${{ parameters.collectHelixLogsScript }} compare: ${{ parameters.compare }} onlySanityCheck: ${{ parameters.onlySanityCheck }} @@ -166,8 +166,8 @@ jobs: projectFile: blazor_perf.proj runKind: blazor_scenarios runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml - # passed to ci_setup.py to work with 8.0 sdk when using tfm!=net8.0 - # additionalSetupParameters: '--dotnetversions 8.0.0' # passed to performance-setup.sh + # For working with a newer sdk, and previous tfm (eg. 9.0 sdk, and net8.0 tfm) + additionalSetupParameters: '--dotnetversions 8.0.0' # passed to performance-setup.sh logicalmachine: 'perftiger' downloadSpecificBuild: ${{ parameters.downloadSpecificBuild }} perfForkToUse: ${{ parameters.perfForkToUse }} diff --git a/eng/pipelines/coreclr/perf_slow.yml b/eng/pipelines/coreclr/perf_slow.yml index 91e3ad34f38c80..318bc25915d555 100644 --- a/eng/pipelines/coreclr/perf_slow.yml +++ b/eng/pipelines/coreclr/perf_slow.yml @@ -35,7 +35,7 @@ extends: jobs: - ${{ if and(ne(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'Schedule')) }}: - + # build mono - template: /eng/pipelines/common/platform-matrix.yml parameters: @@ -74,27 +74,6 @@ extends: logicalmachine: 'perfampere' timeoutInMinutes: 720 - # build mono on wasm - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: release - runtimeFlavor: mono - platforms: - - browser_wasm - jobParameters: - buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) - nameSuffix: wasm - isOfficialBuild: false - extraStepsTemplate: /eng/pipelines/common/upload-artifact-step.yml - extraStepsParameters: - rootFolder: '$(Build.SourcesDirectory)/artifacts/' - includeRootFolder: true - displayName: Browser Wasm Artifacts - artifactName: BrowserWasm - archiveType: zip - archiveExtension: .zip - - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'Schedule')) }}: # build coreclr and libraries @@ -110,27 +89,6 @@ extends: jobParameters: testGroup: perf - # build mono on wasm - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: release - runtimeFlavor: mono - platforms: - - browser_wasm - jobParameters: - buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) - nameSuffix: wasm - isOfficialBuild: false - extraStepsTemplate: /eng/pipelines/common/upload-artifact-step.yml - extraStepsParameters: - rootFolder: '$(Build.SourcesDirectory)/artifacts/' - includeRootFolder: true - displayName: Browser Wasm Artifacts - artifactName: BrowserWasm - archiveType: zip - archiveExtension: .zip - - template: /eng/pipelines/common/platform-matrix.yml parameters: jobTemplate: /eng/pipelines/common/global-build-job.yml diff --git a/eng/pipelines/coreclr/runtime-nativeaot-outerloop.yml b/eng/pipelines/coreclr/runtime-nativeaot-outerloop.yml new file mode 100644 index 00000000000000..d7e0443561d837 --- /dev/null +++ b/eng/pipelines/coreclr/runtime-nativeaot-outerloop.yml @@ -0,0 +1,178 @@ + +# This pipeline includes the Native AOT tests that we don't have resources to +# run on every PR but that we want to still have test coverage, we run this +# pipeline on a schedule and also developers can run it via /azp run command on +# PRs. This pipeline permits us to have the main runtime pipeline run the same +# platforms in PRs and Scheduled builds. + +# Setting batch to true, triggers one build at a time. +# if there is a push while a build in progress, it will wait, +# until the running build finishes, and produce a build with all the changes +# that happened during the last build. +trigger: + batch: true + branches: + include: + - release/*.* + paths: + include: + - '*' + exclude: + - '**.md' + - eng/Version.Details.xml + - .devcontainer/* + - .github/* + - docs/* + - LICENSE.TXT + - PATENTS.TXT + - THIRD-PARTY-NOTICES.TXT + +schedules: + - cron: "0 9,21 * * *" # run at 9:00 and 21:00 (UTC) which is 1:00 and 13:00 (PST). + displayName: Nativeaot-outerloop main schedule + branches: + include: + - main + always: false # run only if there were changes since the last successful scheduled run. + + +extends: + template: /eng/pipelines/common/templates/pipeline-with-resources.yml + parameters: + stages: + - stage: Build + jobs: + + # + # CoreCLR NativeAOT release build and libraries tests + # Only when CoreCLR or library is changed + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + buildConfig: Release + platforms: + - windows_x64 + - windows_arm64 + - osx_x64 + - osx_arm64 + - linux_x64 + - linux_arm64 + - linux_musl_x64 + jobParameters: + testGroup: innerloop + isSingleFile: true + nameSuffix: NativeAOT_Libs + buildArgs: -s clr.aot+host.native+libs+libs.tests -c $(_BuildConfig) /p:TestNativeAot=true /p:ArchiveTests=true + timeoutInMinutes: 300 # doesn't normally take this long, but I've seen Helix queues backed up for 160 minutes + # extra steps, run tests + extraStepsTemplate: /eng/pipelines/libraries/helix.yml + extraStepsParameters: + creator: dotnet-bot + testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) + + # + # CoreCLR NativeAOT release build (checked runtime) and libraries tests + # Only when CoreCLR or library is changed + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + buildConfig: Release + platforms: + - windows_x64 + - linux_arm64 + jobParameters: + testGroup: innerloop + isSingleFile: true + nameSuffix: NativeAOT_Checked_Libs + buildArgs: -s clr.aot+host.native+libs+libs.tests -c $(_BuildConfig) -rc Checked /p:TestNativeAot=true /p:ArchiveTests=true + timeoutInMinutes: 360 + # extra steps, run tests + extraStepsTemplate: /eng/pipelines/libraries/helix.yml + extraStepsParameters: + creator: dotnet-bot + testRunNamePrefixSuffix: NativeAOT_Checked_$(_BuildConfig) + + # + # CoreCLR NativeAOT release build (checked runtime) - SizeOpt and libraries tests + # Only when CoreCLR or library is changed + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + buildConfig: Release + platforms: + - windows_x64 + - linux_x64 + jobParameters: + testGroup: innerloop + isSingleFile: true + nameSuffix: NativeAOT_Checked_Libs_SizeOpt + buildArgs: -s clr.aot+host.native+libs+libs.tests -c $(_BuildConfig) -rc Checked /p:TestNativeAot=true /p:ArchiveTests=true /p:OptimizationPreference=Size + timeoutInMinutes: 240 + # extra steps, run tests + extraStepsTemplate: /eng/pipelines/libraries/helix.yml + extraStepsParameters: + creator: dotnet-bot + testRunNamePrefixSuffix: NativeAOT_Checked_SizeOpt_$(_BuildConfig) + + # + # CoreCLR NativeAOT release build (checked runtime) - SpeedOpt and libraries tests + # Only when CoreCLR or library is changed + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + buildConfig: Release + platforms: + - windows_x64 + - linux_x64 + jobParameters: + testGroup: innerloop + isSingleFile: true + nameSuffix: NativeAOT_Checked_Libs_SpeedOpt + buildArgs: -s clr.aot+host.native+libs+libs.tests -c $(_BuildConfig) -rc Checked /p:TestNativeAot=true /p:ArchiveTests=true /p:OptimizationPreference=Speed + timeoutInMinutes: 240 + # extra steps, run tests + extraStepsTemplate: /eng/pipelines/libraries/helix.yml + extraStepsParameters: + creator: dotnet-bot + testRunNamePrefixSuffix: NativeAOT_Checked_SpeedOpt_$(_BuildConfig) + + # + # CoreCLR NativeAOT checked build and Pri0 tests + # Only when CoreCLR is changed + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + buildConfig: Checked + platforms: + - windows_x64 + - linux_x64 + variables: + - name: timeoutPerTestInMinutes + value: 60 + - name: timeoutPerTestCollectionInMinutes + value: 180 + jobParameters: + timeoutInMinutes: 240 + nameSuffix: NativeAOT_Pri0 + buildArgs: -s clr.aot+host.native+libs -rc $(_BuildConfig) -lc Release -hc Release + extraStepsTemplate: /eng/pipelines/coreclr/nativeaot-post-build-steps.yml + extraStepsParameters: + creator: dotnet-bot + testBuildArgs: 'nativeaot /p:IlcUseServerGc=false' + liveLibrariesBuildConfig: Release + testRunNamePrefixSuffix: NativeAOT_Pri0_$(_BuildConfig) + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + parameters: + testGroup: innerloop + liveLibrariesBuildConfig: Release diff --git a/eng/pipelines/coreclr/superpmi-collect.yml b/eng/pipelines/coreclr/superpmi-collect.yml index 4c66b20aecbc76..0ebf400f83cc6c 100644 --- a/eng/pipelines/coreclr/superpmi-collect.yml +++ b/eng/pipelines/coreclr/superpmi-collect.yml @@ -110,8 +110,8 @@ extends: jobParameters: testGroup: outerloop liveLibrariesBuildConfig: Release - collectionType: pmi - collectionName: libraries_tests + collectionType: crossgen2 + collectionName: libraries - template: /eng/pipelines/common/platform-matrix.yml parameters: @@ -130,8 +130,8 @@ extends: jobParameters: testGroup: outerloop liveLibrariesBuildConfig: Release - collectionType: crossgen2 - collectionName: libraries + collectionType: run + collectionName: realworld - template: /eng/pipelines/common/platform-matrix.yml parameters: @@ -151,7 +151,7 @@ extends: testGroup: outerloop liveLibrariesBuildConfig: Release collectionType: run - collectionName: realworld + collectionName: benchmarks - template: /eng/pipelines/common/platform-matrix.yml parameters: @@ -170,7 +170,7 @@ extends: jobParameters: testGroup: outerloop liveLibrariesBuildConfig: Release - collectionType: run + collectionType: run_tiered collectionName: benchmarks - template: /eng/pipelines/common/platform-matrix.yml @@ -190,12 +190,15 @@ extends: jobParameters: testGroup: outerloop liveLibrariesBuildConfig: Release - collectionType: run_tiered + collectionType: run_pgo collectionName: benchmarks + # + # Collection of coreclr test run + # - template: /eng/pipelines/common/platform-matrix.yml parameters: - jobTemplate: /eng/pipelines/coreclr/templates/superpmi-collect-job.yml + jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml buildConfig: checked platforms: - osx_arm64 @@ -205,21 +208,38 @@ extends: - windows_x64 - windows_x86 - windows_arm64 + helixQueueGroup: superpmi + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + jobParameters: + testGroup: outerloop + liveLibrariesBuildConfig: Release + SuperPmiCollect: true + + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/coreclr/templates/superpmi-collect-job.yml + buildConfig: checked + platforms: + - linux_arm64 + - linux_x64 + - windows_x64 + - windows_arm64 helixQueueGroup: ci helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml jobParameters: testGroup: outerloop liveLibrariesBuildConfig: Release - collectionType: run_pgo - collectionName: benchmarks + collectionType: nativeaot + collectionName: smoke_tests # - # Collection of coreclr test run + # Collection of libraries test run: normal + # Libraries Test Run using Release libraries, and Checked CoreCLR # - template: /eng/pipelines/common/platform-matrix.yml parameters: - jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml - buildConfig: checked + jobTemplate: /eng/pipelines/libraries/run-test-job.yml + buildConfig: Release platforms: - osx_arm64 - linux_arm @@ -231,6 +251,37 @@ extends: helixQueueGroup: superpmi helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml jobParameters: - testGroup: outerloop - liveLibrariesBuildConfig: Release + testScope: innerloop + liveRuntimeBuildConfig: checked + dependsOnTestBuildConfiguration: Release + dependsOnTestArchitecture: x64 + coreclrTestGroup: superpmi_collection + SuperPmiCollect: true + SuperPmiCollectionName: libraries_tests + + # + # Collection of libraries test run: no_tiered_compilation + # Libraries Test Run using Release libraries, and Checked CoreCLR + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/libraries/run-test-job.yml + buildConfig: Release + platforms: + - osx_arm64 + - linux_arm + - linux_arm64 + - linux_x64 + - windows_x64 + - windows_x86 + - windows_arm64 + helixQueueGroup: superpmi + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + jobParameters: + testScope: innerloop + liveRuntimeBuildConfig: checked + dependsOnTestBuildConfiguration: Release + dependsOnTestArchitecture: x64 + coreclrTestGroup: superpmi_collection_no_tiered_compilation SuperPmiCollect: true + SuperPmiCollectionName: libraries_tests_no_tiered_compilation diff --git a/eng/pipelines/coreclr/templates/build-jit-job.yml b/eng/pipelines/coreclr/templates/build-jit-job.yml index 5566f228b2f0e8..2f78d87bf81633 100644 --- a/eng/pipelines/coreclr/templates/build-jit-job.yml +++ b/eng/pipelines/coreclr/templates/build-jit-job.yml @@ -132,6 +132,6 @@ jobs: displayName: Publish Logs inputs: targetPath: $(Build.SourcesDirectory)/artifacts/log - artifactName: '$(publishLogsArtifactPrefix)_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' + artifactName: '$(publishLogsArtifactPrefix)_Attempt$(System.JobAttempt)_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' continueOnError: true condition: always() diff --git a/eng/pipelines/coreclr/templates/build-job.yml b/eng/pipelines/coreclr/templates/build-job.yml index 99379f80a5d9ce..655de0091457c2 100644 --- a/eng/pipelines/coreclr/templates/build-job.yml +++ b/eng/pipelines/coreclr/templates/build-job.yml @@ -17,7 +17,6 @@ parameters: testGroup: '' timeoutInMinutes: '' variables: {} - pgoType: '' ### Product build jobs: @@ -36,21 +35,18 @@ jobs: dependOnEvaluatePaths: ${{ parameters.dependOnEvaluatePaths }} disableComponentGovernance: ${{ parameters.disableComponentGovernance }} disableClrTest: ${{ parameters.disableClrTest }} - pgoType: ${{ parameters.pgoType }} # Compute job name from template parameters - name: ${{ format('coreclr_{0}_product_build_{1}{2}_{3}_{4}{5}', + name: ${{ format('coreclr_{0}_product_build_{1}{2}_{3}_{4}', parameters.runtimeVariant, parameters.osGroup, parameters.osSubgroup, parameters.archType, - parameters.buildConfig, - parameters.pgoType) }} - displayName: ${{ format('CoreCLR {0} Product Build {1}{2} {3} {4} {5}', + parameters.buildConfig) }} + displayName: ${{ format('CoreCLR {0} Product Build {1}{2} {3} {4}', parameters.runtimeVariant, parameters.osGroup, parameters.osSubgroup, parameters.archType, - parameters.buildConfig, - parameters.pgoType) }} + parameters.buildConfig) }} # Run all steps in the container. # Note that the containers are defined in platform-matrix.yml @@ -70,15 +66,6 @@ jobs: value: '' - name: publishLogsArtifactPrefix value: 'BuildLogs_CoreCLR' - - ${{ if and(ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}: - # Variables used to publish packages to blob feed - - name: dotnetfeedUrl - value: https://dotnetfeed.blob.core.windows.net/dotnet-coreclr/index.json - - name: dotnetfeedPAT - value: $(dotnetfeed-storage-access-key-1) - # Variables used by arcade to gather asset manifests - - name: _DotNetPublishToBlobFeed - value: true - name: officialBuildIdArg value: '' - ${{ if eq(parameters.isOfficialBuild, true) }}: @@ -87,7 +74,7 @@ jobs: - name: enforcePgoArg value: '' # The EnforcePGO script is only supported on Windows and is not supported on arm64. - - ${{ if and(eq(parameters.buildConfig, 'Release'), and(eq(parameters.osGroup, 'windows'), ne(parameters.archType, 'arm64')), ne(parameters.pgoType, 'pgo')) }}: + - ${{ if and(eq(parameters.buildConfig, 'Release'), and(eq(parameters.osGroup, 'windows'), ne(parameters.archType, 'arm64'))) }}: - name: enforcePgoArg value: '-enforcepgo' @@ -101,26 +88,11 @@ jobs: value: '' - ${{ if ne(parameters.testGroup, 'innerloop') }}: - name: clrRuntimeComponentsBuildArg - value: '-component runtime -component alljits -component paltests -component nativeaot -component spmi ' - - ${{ if and(eq(parameters.osGroup, 'linux'), eq(parameters.archType, 'x86')) }}: - - name: clrRuntimeComponentsBuildArg - value: '-component runtime -component jit -component iltools -component spmi ' - - - name: pgoInstrumentArg - value: '' - - ${{ if eq(parameters.pgoType, 'PGO' )}}: - - name: pgoInstrumentArg - value: '-pgoinstrument ' + value: '-component runtime -component alljits -component nativeaot -component spmi ' - name: SignType value: $[ coalesce(variables.OfficialSignType, 'real') ] - - name: clrRuntimePortableBuildArg - value: '' - - ${{ if eq(parameters.osGroup, 'tizen') }}: - - name: clrRuntimePortableBuildArg - value: '-portablebuild=false' - # Set a default empty argument for the pgo path. # This will be set during the 'native prerequisites' step if PGO optimization is enabled. - name: CoreClrPgoDataArg @@ -135,7 +107,6 @@ jobs: - ${{ parameters.variables }} steps: - # Install native dependencies # Linux builds use docker images with dependencies preinstalled, # and FreeBSD builds use a build agent with dependencies @@ -162,6 +133,24 @@ jobs: continueOnError: false condition: and(succeeded(), in(variables['SignType'], 'real', 'test')) + - ${{ if ne(variables['System.TeamProject'], 'public') }}: + - ${{ if ne(parameters.osGroup, 'windows') }}: + - task: Bash@3 + displayName: Setup Private Feeds Credentials + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh + arguments: $(Build.SourcesDirectory)/NuGet.config $Token + env: + Token: $(dn-bot-dnceng-artifact-feeds-rw) + - ${{ if eq(parameters.osGroup, 'windows') }}: + - task: PowerShell@2 + displayName: Setup Private Feeds Credentials + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token + env: + Token: $(dn-bot-dnceng-artifact-feeds-rw) + - ${{ if in(parameters.osGroup, 'osx', 'ios', 'tvos') }}: - script: | du -sh $(Build.SourcesDirectory)/* @@ -174,14 +163,14 @@ jobs: # Build CoreCLR Runtime - ${{ if ne(parameters.osGroup, 'windows') }}: - - script: $(Build.SourcesDirectory)/src/coreclr/build-runtime$(scriptExt) $(buildConfig) $(archType) $(crossArg) $(osArg) -ci $(compilerArg) $(clrRuntimeComponentsBuildArg) $(pgoInstrumentArg) $(officialBuildIdArg) $(clrInterpreterBuildArg) $(clrRuntimePortableBuildArg) $(CoreClrPgoDataArg) $(nativeSymbols) + - script: $(Build.SourcesDirectory)/src/coreclr/build-runtime$(scriptExt) $(buildConfig) $(archType) $(crossArg) $(osArg) -ci $(compilerArg) $(clrRuntimeComponentsBuildArg) $(officialBuildIdArg) $(clrInterpreterBuildArg) $(CoreClrPgoDataArg) $(nativeSymbols) displayName: Build CoreCLR Runtime - ${{ if eq(parameters.osGroup, 'windows') }}: - - script: $(Build.SourcesDirectory)/src/coreclr/build-runtime$(scriptExt) $(buildConfig) $(archType) -ci $(enforcePgoArg) $(pgoInstrumentArg) $(officialBuildIdArg) $(clrInterpreterBuildArg) $(CoreClrPgoDataArg) + - script: $(Build.SourcesDirectory)/src/coreclr/build-runtime$(scriptExt) $(buildConfig) $(archType) -ci $(enforcePgoArg) $(officialBuildIdArg) $(clrInterpreterBuildArg) $(CoreClrPgoDataArg) displayName: Build CoreCLR Runtime - ${{ if or(eq(parameters.crossBuild, 'true'), ne(parameters.archType, 'x64')) }}: - - script: $(Build.SourcesDirectory)/src/coreclr/build-runtime$(scriptExt) $(buildConfig) $(archType) -hostarch x64 $(osArg) -ci $(compilerArg) -component crosscomponents -cmakeargs "-DCLR_CROSS_COMPONENTS_BUILD=1" $(officialBuildIdArg) $(clrRuntimePortableBuildArg) + - script: $(Build.SourcesDirectory)/src/coreclr/build-runtime$(scriptExt) $(buildConfig) $(archType) -hostarch x64 $(osArg) -ci $(compilerArg) -component crosscomponents -cmakeargs "-DCLR_CROSS_COMPONENTS_BUILD=1" $(officialBuildIdArg) displayName: Build CoreCLR Cross-Arch Tools (Tools that run on x64 targeting x86) - ${{ if in(parameters.osGroup, 'osx', 'ios', 'tvos') }}: @@ -191,12 +180,8 @@ jobs: displayName: Disk Usage after Build # Build CoreCLR Managed Components - - ${{ if or(ne(parameters.osGroup, 'linux'), ne(parameters.archType, 'x86')) }}: - - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -subset clr.corelib+clr.nativecorelib+clr.nativeaotlibs+clr.tools+clr.packages+clr.paltestlist $(crossArg) $(compilerArg) -arch $(archType) $(osArg) -c $(buildConfig) $(pgoInstrumentArg) $(officialBuildIdArg) -ci - displayName: Build managed product components and packages - - ${{ if and(eq(parameters.osGroup, 'linux'), eq(parameters.archType, 'x86')) }}: - - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -subset clr.corelib $(crossArg) -arch $(archType) $(osArg) -c $(buildConfig) $(pgoInstrumentArg) $(officialBuildIdArg) -ci - displayName: Build managed product components and packages + - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -subset clr.corelib+clr.nativecorelib+clr.nativeaotlibs+clr.tools+clr.packages $(crossArg) $(compilerArg) -arch $(archType) $(osArg) -c $(buildConfig) $(officialBuildIdArg) -ci + displayName: Build managed product components and packages # Build native test components - ${{ if and(ne(parameters.isOfficialBuild, true), ne(parameters.disableClrTest, true)) }}: @@ -244,7 +229,7 @@ jobs: artifactName: $(buildProductArtifactName) displayName: 'product build' - - ${{ if and(in(parameters.osGroup, 'windows', 'linux'), ne(parameters.archType, 'x86'), eq(parameters.pgoType, '')) }}: + - ${{ if and(in(parameters.osGroup, 'windows', 'linux'), ne(parameters.archType, 'x86')) }}: - template: /eng/pipelines/coreclr/templates/crossdac-build.yml parameters: archType: ${{ parameters.archType }} @@ -256,7 +241,7 @@ jobs: ${{ else }}: hostArchType: x64 - - ${{ if and(in(parameters.osGroup, 'windows'), eq(parameters.archType, 'x86'), eq(parameters.pgoType, '')) }}: + - ${{ if and(in(parameters.osGroup, 'windows'), eq(parameters.archType, 'x86')) }}: - template: /eng/pipelines/coreclr/templates/crossdac-build.yml parameters: archType: arm @@ -267,7 +252,7 @@ jobs: - ${{ if and(ne(parameters.testGroup, ''), ne(parameters.disableClrTest, true)) }}: # Publish test native components for consumption by test execution. - - ${{ if and(ne(parameters.isOfficialBuild, true), eq(parameters.pgoType, '')) }}: + - ${{ if ne(parameters.isOfficialBuild, true) }}: - template: /eng/pipelines/common/upload-artifact-step.yml parameters: rootFolder: $(nativeTestArtifactRootFolderPath) @@ -278,25 +263,23 @@ jobs: artifactName: $(nativeTestArtifactName) displayName: 'native test components' - # Get key vault secrets for publishing - - ${{ if and(ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}: - - task: AzureKeyVault@1 - inputs: - azureSubscription: 'DotNet-Engineering-Services_KeyVault' - KeyVaultName: EngKeyVault - SecretsFilter: 'dotnetfeed-storage-access-key-1,microsoft-symbol-server-pat,symweb-symbol-server-pat' - # Save packages using the prepare-signed-artifacts format. - - ${{ if and(eq(parameters.isOfficialBuild, true), eq(parameters.pgoType, '')) }}: + - ${{ if eq(parameters.isOfficialBuild, true) }}: - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml parameters: name: ${{ parameters.platform }} + - ${{ if and(eq(parameters.isOfficialBuild, true), eq(parameters.osGroup, 'windows')) }}: + - powershell: ./eng/collect_vsinfo.ps1 -ArchiveRunName postbuild_log + displayName: Collect vslogs on exit + condition: always() + + # Publish Logs - task: PublishPipelineArtifact@1 displayName: Publish Logs inputs: targetPath: $(Build.SourcesDirectory)/artifacts/log - artifactName: '$(publishLogsArtifactPrefix)${{ parameters.pgoType }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' + artifactName: '$(publishLogsArtifactPrefix)_Attempt$(System.JobAttempt)_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' continueOnError: true condition: always() diff --git a/eng/pipelines/coreclr/templates/crossdac-pack.yml b/eng/pipelines/coreclr/templates/crossdac-pack.yml index 7489ceeedad056..520eb65fb337e6 100644 --- a/eng/pipelines/coreclr/templates/crossdac-pack.yml +++ b/eng/pipelines/coreclr/templates/crossdac-pack.yml @@ -70,6 +70,6 @@ jobs: displayName: Publish Logs inputs: targetPath: $(Build.SourcesDirectory)/artifacts/log - artifactName: 'CrossDacPackagingLogs' + artifactName: 'CrossDacPackagingLogs_Attempt$(System.JobAttempt)' continueOnError: true condition: always() diff --git a/eng/pipelines/coreclr/templates/helix-queues-setup.yml b/eng/pipelines/coreclr/templates/helix-queues-setup.yml index e264588ee78c91..1f27b9e1ab94ed 100644 --- a/eng/pipelines/coreclr/templates/helix-queues-setup.yml +++ b/eng/pipelines/coreclr/templates/helix-queues-setup.yml @@ -48,11 +48,11 @@ jobs: # Android x64 - ${{ if in(parameters.platform, 'android_x64') }}: - - Ubuntu.1804.Amd64.Android.29.Open + - Ubuntu.2204.Amd64.Android.29.Open # Browser wasm - ${{ if eq(parameters.platform, 'browser_wasm') }}: - - (Ubuntu.1804.Amd64)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-helix-webassembly + - (Ubuntu.2204.Amd64)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-webassembly # iOS devices - ${{ if in(parameters.platform, 'ios_arm64') }}: @@ -79,9 +79,9 @@ jobs: # Linux musl x64 - ${{ if eq(parameters.platform, 'linux_musl_x64') }}: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - - (Alpine.315.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.15-helix-amd64 + - (Alpine.315.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.15-helix-amd64 - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - - (Alpine.315.Amd64)ubuntu.1804.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.15-helix-amd64 + - (Alpine.315.Amd64)Ubuntu.2204.Amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.15-helix-amd64 # Linux musl arm32 - ${{ if eq(parameters.platform, 'linux_musl_arm') }}: @@ -100,9 +100,9 @@ jobs: # Linux x64 - ${{ if eq(parameters.platform, 'linux_x64') }}: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - - Ubuntu.1804.Amd64.Open + - Ubuntu.2204.Amd64.Open - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - - Ubuntu.1804.Amd64 + - Ubuntu.2204.Amd64 # OSX arm64 - ${{ if eq(parameters.platform, 'osx_arm64') }}: diff --git a/eng/pipelines/coreclr/templates/perf-job.yml b/eng/pipelines/coreclr/templates/perf-job.yml index be3a871ad4020e..8eef7bcffdcaaf 100644 --- a/eng/pipelines/coreclr/templates/perf-job.yml +++ b/eng/pipelines/coreclr/templates/perf-job.yml @@ -5,7 +5,7 @@ parameters: osSubgroup: '' container: '' runtimeVariant: '' - framework: net8.0 # Specify the appropriate framework when running release branches (ie net6.0 for release/6.0) + framework: net9.0 # Specify the appropriate framework when running release branches (ie net6.0 for release/6.0) liveLibrariesBuildConfig: '' variables: {} runtimeType: 'coreclr' @@ -229,7 +229,7 @@ jobs: artifactFileName: 'AndroidBDNApk.tar.gz' artifactName: 'AndroidBDNApk' displayName: 'Mono Android BDN Apk' - + # Download iOSMono and Native AOT tests - ${{ if or(eq(parameters.runtimeType, 'iOSMono'), eq(parameters.runtimeType, 'iOSNativeAOT')) }}: - template: /eng/pipelines/common/download-artifact-step.yml @@ -282,10 +282,10 @@ jobs: condition: and(succeeded(), ne(variables.runtimeFlavorName, 'Mono'), ne('${{ parameters.runtimeType }}', 'wasm'), not(in('${{ parameters.runtimeType }}', 'AndroidMono', 'iOSMono', 'iOSNativeAOT'))) # Copy the runtime directory into the testhost folder to include OOBs. - - script: "build.cmd -subset libs.pretest -configuration release -ci -arch $(archType) -testscope innerloop /p:RuntimeArtifactsPath=$(librariesDownloadDir)\\bin\\mono\\$(osGroup).$(archType).$(buildConfigUpper) /p:RuntimeFlavor=mono;xcopy $(Build.SourcesDirectory)\\artifacts\\bin\\runtime\\net8.0-$(osGroup)-$(buildConfigUpper)-$(archType)\\* $(Build.SourcesDirectory)\\artifacts\\bin\\testhost\\net8.0-$(osGroup)-$(buildConfigUpper)-$(archType)\\shared\\Microsoft.NETCore.App\\$(productVersion) /E /I /Y;xcopy $(Build.SourcesDirectory)\\artifacts\\bin\\testhost\\net8.0-$(osGroup)-$(buildConfigUpper)-$(archType)\\* $(Build.SourcesDirectory)\\.dotnet-mono /E /I /Y;copy $(Build.SourcesDirectory)\\artifacts\\bin\\coreclr\\$(osGroup).$(archType).$(buildConfigUpper)\\corerun.exe $(Build.SourcesDirectory)\\.dotnet-mono\\shared\\Microsoft.NETCore.App\\$(productVersion)\\corerun.exe" + - script: "build.cmd -subset libs.pretest -configuration release -ci -arch $(archType) -testscope innerloop /p:RuntimeArtifactsPath=$(librariesDownloadDir)\\bin\\mono\\$(osGroup).$(archType).$(buildConfigUpper) /p:RuntimeFlavor=mono;xcopy $(Build.SourcesDirectory)\\artifacts\\bin\\runtime\\${{parameters.framework}}-$(osGroup)-$(buildConfigUpper)-$(archType)\\* $(Build.SourcesDirectory)\\artifacts\\bin\\testhost\\${{parameters.framework}}-$(osGroup)-$(buildConfigUpper)-$(archType)\\shared\\Microsoft.NETCore.App\\$(productVersion) /E /I /Y;xcopy $(Build.SourcesDirectory)\\artifacts\\bin\\testhost\\${{parameters.framework}}-$(osGroup)-$(buildConfigUpper)-$(archType)\\* $(Build.SourcesDirectory)\\.dotnet-mono /E /I /Y;copy $(Build.SourcesDirectory)\\artifacts\\bin\\coreclr\\$(osGroup).$(archType).$(buildConfigUpper)\\corerun.exe $(Build.SourcesDirectory)\\.dotnet-mono\\shared\\Microsoft.NETCore.App\\$(productVersion)\\corerun.exe" displayName: "Create mono dotnet (Windows)" condition: and(and(succeeded(), eq(variables.runtimeFlavorName, 'Mono')), eq(variables.osGroup, 'windows'), not(in('${{ parameters.runtimeType }}', 'AndroidMono', 'iOSMono', 'iOSNativeAOT'))) - - script: "mkdir $(Build.SourcesDirectory)/.dotnet-mono;./build.sh -subset libs.pretest -configuration release -ci -arch $(archType) -testscope innerloop /p:RuntimeArtifactsPath=$(librariesDownloadDir)/bin/mono/$(osGroup).$(archType).$(buildConfigUpper) /p:RuntimeFlavor=mono;cp $(Build.SourcesDirectory)/artifacts/bin/runtime/net8.0-$(osGroup)-$(buildConfigUpper)-$(archType)/* $(Build.SourcesDirectory)/artifacts/bin/testhost/net8.0-$(osGroup)-$(buildConfigUpper)-$(archType)/shared/Microsoft.NETCore.App/$(productVersion) -rf;cp $(Build.SourcesDirectory)/artifacts/bin/testhost/net8.0-$(osGroup)-$(buildConfigUpper)-$(archType)/* $(Build.SourcesDirectory)/.dotnet-mono -r;cp $(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).$(archType).$(buildConfigUpper)/corerun $(Build.SourcesDirectory)/.dotnet-mono/shared/Microsoft.NETCore.App/$(productVersion)/corerun" + - script: "mkdir $(Build.SourcesDirectory)/.dotnet-mono;./build.sh -subset libs.pretest -configuration release -ci -arch $(archType) -testscope innerloop /p:RuntimeArtifactsPath=$(librariesDownloadDir)/bin/mono/$(osGroup).$(archType).$(buildConfigUpper) /p:RuntimeFlavor=mono;cp $(Build.SourcesDirectory)/artifacts/bin/runtime/${{parameters.framework}}-$(osGroup)-$(buildConfigUpper)-$(archType)/* $(Build.SourcesDirectory)/artifacts/bin/testhost/${{parameters.framework}}-$(osGroup)-$(buildConfigUpper)-$(archType)/shared/Microsoft.NETCore.App/$(productVersion) -rf;cp $(Build.SourcesDirectory)/artifacts/bin/testhost/${{parameters.framework}}-$(osGroup)-$(buildConfigUpper)-$(archType)/* $(Build.SourcesDirectory)/.dotnet-mono -r;cp $(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).$(archType).$(buildConfigUpper)/corerun $(Build.SourcesDirectory)/.dotnet-mono/shared/Microsoft.NETCore.App/$(productVersion)/corerun" displayName: "Create mono dotnet (Linux)" condition: and(and(succeeded(), eq(variables.runtimeFlavorName, 'Mono')), ne(variables.osGroup, 'windows'), not(in('${{ parameters.runtimeType }}', 'AndroidMono', 'iOSMono', 'iOSNativeAOT'))) diff --git a/eng/pipelines/coreclr/templates/run-paltests-step.yml b/eng/pipelines/coreclr/templates/run-paltests-step.yml new file mode 100644 index 00000000000000..3b3881986f7d15 --- /dev/null +++ b/eng/pipelines/coreclr/templates/run-paltests-step.yml @@ -0,0 +1,23 @@ +parameters: + continueOnError: 'false' # optional -- determines whether to continue the build if the step errors + helixQueues: '' # required -- Helix queues + buildConfig: '' # required -- build configuration + archType: '' # required -- targeting CPU architecture + osGroup: '' # required -- operating system for the job + osSubgroup: '' # optional -- operating system subgroup + dependOnEvaluatePaths: false + +steps: + - template: /eng/pipelines/common/templates/runtimes/send-to-helix-step.yml + parameters: + displayName: 'Send job to Helix' + helixBuild: $(Build.BuildNumber) + helixSource: $(_HelixSource) + helixType: 'build/tests/' + helixQueues: ${{ parameters.helixQueues }} + creator: dotnet-bot + helixProjectArguments: '$(Build.SourcesDirectory)/src/coreclr/scripts/paltests.proj' + BuildConfig: ${{ parameters.buildConfig }} + osGroup: ${{ parameters.osGroup }} + archType: ${{ parameters.archType }} + shouldContinueOnError: ${{ parameters.continueOnError }} diff --git a/eng/pipelines/coreclr/templates/run-performance-job.yml b/eng/pipelines/coreclr/templates/run-performance-job.yml index 51d67a7c0ff941..794659045388c1 100644 --- a/eng/pipelines/coreclr/templates/run-performance-job.yml +++ b/eng/pipelines/coreclr/templates/run-performance-job.yml @@ -62,14 +62,21 @@ jobs: - ${{ if and(notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.osGroup, 'windows')) }}: - HelixPerfUploadTokenValue: '$(PerfCommandUploadToken)' - ${{ if eq(parameters.runtimeType, 'wasm') }}: + # nodejs installation steps from https://github.com/nodesource/distributions - HelixPreCommandsWasmOnLinux: >- sudo apt-get -y remove nodejs && - curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - && - sudo apt-get -y install nodejs && + sudo apt-get update && + sudo apt-get install -y ca-certificates curl gnupg && + sudo mkdir -p /etc/apt/keyrings && + sudo rm -f /etc/apt/keyrings/nodesource.gpg && + curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor --batch -o /etc/apt/keyrings/nodesource.gpg && + export NODE_MAJOR=18 && + echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list && + sudo apt-get update && + sudo apt-get install nodejs -y && test -n "$(V8Version)" && npm install --prefix $HELIX_WORKITEM_PAYLOAD jsvu -g && $HELIX_WORKITEM_PAYLOAD/bin/jsvu --os=linux64 v8@$(V8Version) && - find ~/.jsvu -ls && export V8_ENGINE_PATH=~/.jsvu/bin/v8-$(V8Version) && ${V8_ENGINE_PATH} -e 'console.log(`V8 version: ${this.version()}`)' - ${{ if ne(parameters.runtimeType, 'wasm') }}: diff --git a/eng/pipelines/coreclr/templates/run-superpmi-collect-job.yml b/eng/pipelines/coreclr/templates/run-superpmi-collect-job.yml index ab401a83f6959f..93f0450d168910 100644 --- a/eng/pipelines/coreclr/templates/run-superpmi-collect-job.yml +++ b/eng/pipelines/coreclr/templates/run-superpmi-collect-job.yml @@ -100,6 +100,9 @@ jobs: - ${{ if eq(parameters.collectionName, 'libraries_tests') }}: - name: InputDirectory value: '$(Build.SourcesDirectory)/artifacts/tests/libraries/$(osGroup).$(archType).$(buildConfigUpper)' + - ${{ if eq(parameters.collectionName, 'smoke_tests') }}: + - name: InputDirectory + value: '$(Build.SourcesDirectory)/artifacts/tests/coreclr/obj/${{ parameters.osGroup }}.${{ parameters.archType }}.$(buildConfigUpper)/Managed/nativeaot/SmokeTests' workspace: clean: all diff --git a/eng/pipelines/coreclr/templates/run-superpmi-diffs-job.yml b/eng/pipelines/coreclr/templates/run-superpmi-diffs-job.yml index b987c25cb89a27..da61351842a58a 100644 --- a/eng/pipelines/coreclr/templates/run-superpmi-diffs-job.yml +++ b/eng/pipelines/coreclr/templates/run-superpmi-diffs-job.yml @@ -11,7 +11,7 @@ parameters: osSubgroup: '' # optional -- operating system subgroup continueOnError: 'false' # optional -- determines whether to continue the build if the step errors dependsOn: '' # optional -- dependencies of the job - timeoutInMinutes: 120 # optional -- timeout for the job + timeoutInMinutes: 180 # optional -- timeout for the job enableTelemetry: false # optional -- enable for telemetry liveLibrariesBuildConfig: '' # optional -- live-live libraries configuration to use for the run helixQueues: '' # required -- Helix queues @@ -119,7 +119,7 @@ jobs: helixType: 'build/tests/' helixQueues: ${{ join(',', parameters.helixQueues) }} creator: dotnet-bot - WorkItemTimeout: 2:00 # 2 hours + WorkItemTimeout: 3:00 # 3 hours WorkItemDirectory: '$(WorkItemDirectory)' CorrelationPayloadDirectory: '$(CorrelationPayloadDirectory)' helixProjectArguments: '$(Build.SourcesDirectory)/src/coreclr/scripts/superpmi-diffs.proj' diff --git a/eng/pipelines/coreclr/templates/sign-diagnostic-files.yml b/eng/pipelines/coreclr/templates/sign-diagnostic-files.yml index 89cbbec6390df9..6b65962ceaa5a5 100644 --- a/eng/pipelines/coreclr/templates/sign-diagnostic-files.yml +++ b/eng/pipelines/coreclr/templates/sign-diagnostic-files.yml @@ -12,7 +12,7 @@ steps: version: '6.0.x' installationPath: '$(Agent.TempDirectory)/dotnet' - - task: EsrpCodeSigning@1 + - task: EsrpCodeSigning@4 displayName: Sign Diagnostic Binaries inputs: ConnectedServiceName: 'dotnetesrp-diagnostics-dnceng' @@ -48,6 +48,7 @@ steps: SessionTimeout: ${{ parameters.timeoutInMinutes }} MaxConcurrency: '50' MaxRetryAttempts: '5' + PendingAnalysisWaitTimeoutMinutes: '5' env: DOTNET_MULTILEVEL_LOOKUP: 0 DOTNET_ROOT: '$(Agent.TempDirectory)/dotnet' diff --git a/eng/pipelines/coreclr/templates/superpmi-asmdiffs-checked-release-job.yml b/eng/pipelines/coreclr/templates/superpmi-asmdiffs-checked-release-job.yml index 396fe5077f5988..659483c9bc302b 100644 --- a/eng/pipelines/coreclr/templates/superpmi-asmdiffs-checked-release-job.yml +++ b/eng/pipelines/coreclr/templates/superpmi-asmdiffs-checked-release-job.yml @@ -34,7 +34,7 @@ jobs: - name: releaseProductRootFolderPath value: '$(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).$(archType).Release' - name: releaseProductArtifactName - value: 'CoreCLRProduct_${{ parameters.pgoType }}_${{ parameters.runtimeVariant }}_$(osGroup)$(osSubgroup)_$(archType)_release' + value: 'CoreCLRProduct_${{ parameters.runtimeVariant }}_$(osGroup)$(osSubgroup)_$(archType)_release' steps: diff --git a/eng/pipelines/coreclr/templates/superpmi-diffs-job.yml b/eng/pipelines/coreclr/templates/superpmi-diffs-job.yml index aace201eb96613..2375089e250b9a 100644 --- a/eng/pipelines/coreclr/templates/superpmi-diffs-job.yml +++ b/eng/pipelines/coreclr/templates/superpmi-diffs-job.yml @@ -5,7 +5,7 @@ parameters: osSubgroup: '' # optional -- operating system subgroup condition: true pool: '' - timeoutInMinutes: 180 # build timeout + timeoutInMinutes: 240 # build timeout variables: {} helixQueues: '' dependOnEvaluatePaths: false @@ -49,7 +49,7 @@ jobs: - name: releaseProductRootFolderPath value: '$(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).$(archType).Release' - name: releaseProductArtifactName - value: 'CoreCLRProduct_${{ parameters.pgoType }}_${{ parameters.runtimeVariant }}_$(osGroup)$(osSubgroup)_$(archType)_release' + value: 'CoreCLRProduct_${{ parameters.runtimeVariant }}_$(osGroup)$(osSubgroup)_$(archType)_release' steps: diff --git a/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml b/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml index 83347d78b8b1cc..162f5e9f0ed1c8 100644 --- a/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml +++ b/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml @@ -38,7 +38,6 @@ jobs: crossBuild: ${{ parameters.crossBuild }} strategy: ${{ parameters.strategy }} pool: ${{ parameters.pool }} - pgoType: ${{ parameters.pgoType }} # arcade-specific parameters condition: and(succeeded(), ${{ parameters.condition }}) @@ -65,7 +64,7 @@ jobs: # Build product defines what we are trying to build, either coreclr or mono - name: buildProductArtifactName - value: 'CoreCLRProduct_${{ parameters.pgoType }}_${{ parameters.runtimeVariant }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' + value: 'CoreCLRProduct_${{ parameters.runtimeVariant }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' - name: buildProductRootFolderPath value: '$(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).$(archType).$(buildConfigUpper)' @@ -78,13 +77,13 @@ jobs: # We need this because both mono and coreclr build currently depends on CoreClr - name: coreClrProductArtifactName - value: 'CoreCLRProduct_${{ parameters.pgoType }}_${{ parameters.runtimeVariant }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' + value: 'CoreCLRProduct_${{ parameters.runtimeVariant }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' - name: coreClrProductRootFolderPath value: '$(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).$(archType).$(buildConfigUpper)' - name: corelibProductArtifactName - value: 'CoreLib_${{ parameters.pgoType }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' + value: 'CoreLib_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' - name: managedGenericTestArtifactName value: 'CoreCLRManagedTestArtifacts_AnyOS_AnyCPU_$(buildConfig)' diff --git a/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml b/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml index c279c318e34d59..42900f2e36ff28 100644 --- a/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml +++ b/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml @@ -72,165 +72,6 @@ jobs: eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), eq(variables['isRollingBuild'], true)) -# -# CoreCLR NativeAOT release build and libraries tests -# Only when CoreCLR or library is changed -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - buildConfig: Release - platforms: - - windows_x64 - - windows_arm64 - - osx_x64 - - osx_arm64 - - linux_x64 - - linux_arm64 - - linux_musl_x64 - jobParameters: - testGroup: innerloop - isSingleFile: true - nameSuffix: NativeAOT_Libs - buildArgs: -s clr.aot+host.native+libs+libs.tests -c $(_BuildConfig) /p:TestNativeAot=true /p:ArchiveTests=true - timeoutInMinutes: 300 # doesn't normally take this long, but I've seen Helix queues backed up for 160 minutes - # extra steps, run tests - extraStepsTemplate: /eng/pipelines/libraries/helix.yml - extraStepsParameters: - creator: dotnet-bot - testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(variables['isRollingBuild'], true)) - -# -# CoreCLR NativeAOT release build (checked runtime) and libraries tests -# Only when CoreCLR or library is changed -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - buildConfig: Release - platforms: - - windows_x64 - - linux_arm64 - jobParameters: - testGroup: innerloop - isSingleFile: true - nameSuffix: NativeAOT_Checked_Libs - buildArgs: -s clr.aot+host.native+libs+libs.tests -c $(_BuildConfig) -rc Checked /p:TestNativeAot=true /p:ArchiveTests=true - timeoutInMinutes: 360 - # extra steps, run tests - extraStepsTemplate: /eng/pipelines/libraries/helix.yml - extraStepsParameters: - creator: dotnet-bot - testRunNamePrefixSuffix: NativeAOT_Checked_$(_BuildConfig) - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(variables['isRollingBuild'], true)) - -# -# CoreCLR NativeAOT release build (checked runtime) - SizeOpt and libraries tests -# Only when CoreCLR or library is changed -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - buildConfig: Release - platforms: - - windows_x64 - - linux_x64 - jobParameters: - testGroup: innerloop - isSingleFile: true - nameSuffix: NativeAOT_Checked_Libs_SizeOpt - buildArgs: -s clr.aot+host.native+libs+libs.tests -c $(_BuildConfig) -rc Checked /p:TestNativeAot=true /p:ArchiveTests=true /p:OptimizationPreference=Size - timeoutInMinutes: 240 - # extra steps, run tests - extraStepsTemplate: /eng/pipelines/libraries/helix.yml - extraStepsParameters: - creator: dotnet-bot - testRunNamePrefixSuffix: NativeAOT_Checked_SizeOpt_$(_BuildConfig) - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(variables['isRollingBuild'], true)) - -# -# CoreCLR NativeAOT release build (checked runtime) - SpeedOpt and libraries tests -# Only when CoreCLR or library is changed -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - buildConfig: Release - platforms: - - windows_x64 - - linux_x64 - jobParameters: - testGroup: innerloop - isSingleFile: true - nameSuffix: NativeAOT_Checked_Libs_SpeedOpt - buildArgs: -s clr.aot+host.native+libs+libs.tests -c $(_BuildConfig) -rc Checked /p:TestNativeAot=true /p:ArchiveTests=true /p:OptimizationPreference=Speed - timeoutInMinutes: 240 - # extra steps, run tests - extraStepsTemplate: /eng/pipelines/libraries/helix.yml - extraStepsParameters: - creator: dotnet-bot - testRunNamePrefixSuffix: NativeAOT_Checked_SpeedOpt_$(_BuildConfig) - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(variables['isRollingBuild'], true)) - -# -# CoreCLR NativeAOT checked build and Pri0 tests -# Only when CoreCLR is changed -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - buildConfig: Checked - platforms: - - windows_x64 - - linux_x64 - variables: - - name: timeoutPerTestInMinutes - value: 60 - - name: timeoutPerTestCollectionInMinutes - value: 180 - jobParameters: - timeoutInMinutes: 240 - nameSuffix: NativeAOT_Pri0 - buildArgs: -s clr.aot+host.native+libs -rc $(_BuildConfig) -lc Release -hc Release - extraStepsTemplate: /eng/pipelines/coreclr/nativeaot-post-build-steps.yml - extraStepsParameters: - creator: dotnet-bot - testBuildArgs: 'nativeaot /p:IlcUseServerGc=false' - liveLibrariesBuildConfig: Release - testRunNamePrefixSuffix: NativeAOT_Pri0_$(_BuildConfig) - extraVariablesTemplates: - - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - parameters: - testGroup: innerloop - liveLibrariesBuildConfig: Release - condition: >- - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(variables['isRollingBuild'], true)) - # Run net48 tests on win-x64 - template: /eng/pipelines/common/platform-matrix.yml parameters: @@ -362,7 +203,7 @@ jobs: runtimeFlavor: mono platforms: - linux_x64 - # - linux_arm64 + - linux_arm64 variables: - name: timeoutPerTestInMinutes value: 60 diff --git a/eng/pipelines/extra-platforms/runtime-extra-platforms-wasm.yml b/eng/pipelines/extra-platforms/runtime-extra-platforms-wasm.yml index 3fe2e54610d925..c641821da3855a 100644 --- a/eng/pipelines/extra-platforms/runtime-extra-platforms-wasm.yml +++ b/eng/pipelines/extra-platforms/runtime-extra-platforms-wasm.yml @@ -105,22 +105,6 @@ jobs: - WasmTestOnBrowser - WasmTestOnNodeJS - # Smoke tests only with full threading - - template: /eng/pipelines/common/templates/wasm-library-tests.yml - parameters: - platforms: - - browser_wasm - #- browser_wasm_win - nameSuffix: _Threading_Smoke - extraBuildArgs: /p:MonoWasmBuildVariant=multithread /p:WasmEnableThreads=true /p:_WasmPThreadPoolSize=8 /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) - shouldRunSmokeOnly: true - isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }} - isWasmOnlyBuild: ${{ parameters.isWasmOnlyBuild }} - # Always run for runtime-wasm because browser testing is not on runtime - alwaysRun: ${{ parameters.isWasmOnlyBuild }} - scenarios: - - WasmTestOnBrowser - # Library tests with full threading - template: /eng/pipelines/common/templates/wasm-library-tests.yml parameters: @@ -134,7 +118,7 @@ jobs: # Always run for runtime-wasm because tests are not run in runtime alwaysRun: ${{ parameters.isWasmOnlyBuild }} - # NOTE - Since threading is experimental, we don't want to block mainline work + # NOTE - Since threading is experimental, we don't want to block mainline work shouldContinueOnError: true scenarios: - WasmTestOnBrowser diff --git a/eng/pipelines/installer/jobs/build-job.yml b/eng/pipelines/installer/jobs/build-job.yml index 5ae2122f70571d..7d7653e7d0d027 100644 --- a/eng/pipelines/installer/jobs/build-job.yml +++ b/eng/pipelines/installer/jobs/build-job.yml @@ -19,7 +19,6 @@ parameters: displayName: '' runtimeVariant: '' pool: '' - pgoType: '' runOnlyIfDependenciesSucceeded: false # The target names here should match container names in the resources section in our pipelines, like runtime.yml @@ -59,11 +58,10 @@ jobs: dependOnEvaluatePaths: ${{ parameters.dependOnEvaluatePaths }} disableClrTest: ${{ parameters.disableClrTest }} - pgoType: ${{ parameters.pgoType }} # Compute job name from template parameters - name: ${{ format('installer_{0}_{1}_{2}_{3}_{4}_', parameters.pgoType, parameters.runtimeFlavor, parameters.runtimeVariant, coalesce(parameters.name, parameters.platform), parameters.buildConfig) }} - displayName: ${{ format('{0} Installer Build and Test {1} {2} {3} {4}', parameters.pgoType, parameters.runtimeFlavor, parameters.runtimeVariant, coalesce(parameters.name, parameters.platform), parameters.buildConfig) }} + name: ${{ format('installer_{0}_{1}_{2}_{3}_', parameters.runtimeFlavor, parameters.runtimeVariant, coalesce(parameters.name, parameters.platform), parameters.buildConfig) }} + displayName: ${{ format('Installer Build and Test {0} {1} {2} {3}', parameters.runtimeFlavor, parameters.runtimeVariant, coalesce(parameters.name, parameters.platform), parameters.buildConfig) }} # Run all steps in the container. # Note that the containers are defined in platform-matrix.yml @@ -99,25 +97,18 @@ jobs: not(and( eq(parameters.osGroup, 'linux'), eq(parameters.osSubgroup, '')) - )), - eq(parameters.pgoType, 'PGO')) }} + ))) }} - name: BuildAction value: -test - - ${{ if eq(or(not(in(parameters.archType, 'x64', 'x86')), eq(parameters.runtimeFlavor, 'mono'), eq(parameters.isOfficialBuild, true), and(eq(parameters.crossBuild, true), not(and(eq(parameters.osGroup, 'linux'), eq(parameters.osSubgroup, '')))), eq(parameters.pgoType, 'PGO')), true) }}: + - ${{ if eq(or(not(in(parameters.archType, 'x64', 'x86')), eq(parameters.runtimeFlavor, 'mono'), eq(parameters.isOfficialBuild, true), and(eq(parameters.crossBuild, true), not(and(eq(parameters.osGroup, 'linux'), eq(parameters.osSubgroup, ''))))), true) }}: - name: BuildAction value: '' - name: SignType value: test - - name: pgoInstrumentArg - value: '' - - ${{ if eq(parameters.pgoType, 'PGO' )}}: - - name: pgoInstrumentArg - value: '-pgoinstrument ' - # Set up non-PR build from internal project - ${{ if eq(parameters.isOfficialBuild, true) }}: - name: SignType @@ -153,7 +144,6 @@ jobs: build.cmd -subset host+packs -ci $(BuildAction) -configuration $(_BuildConfig) - $(pgoInstrumentArg) $(LiveOverridePathArgs) $(CommonMSBuildArgs) $(MsbuildSigningArguments) @@ -225,7 +215,6 @@ jobs: /p:CrossBuild=${{ parameters.crossBuild }} /p:PortableBuild=$(_PortableBuild) /p:SkipTests=$(SkipTests) - $(pgoInstrumentArg) $(LiveOverridePathArgs) $(CommonMSBuildArgs) @@ -265,7 +254,7 @@ jobs: /p:RuntimeArtifactsPath=$(buildCommandSourcesDirectory)$(RuntimeDownloadPath) /p:RuntimeConfiguration=${{ parameters.liveRuntimeBuildConfig }} - name: RuntimeArtifactName - value: $(runtimeFlavorName)Product_${{ parameters.pgoType }}_${{ parameters.runtimeVariant }}_$(liveRuntimeLegName) + value: $(runtimeFlavorName)Product_${{ parameters.runtimeVariant }}_$(liveRuntimeLegName) - ${{ if ne(parameters.liveLibrariesBuildConfig, '') }}: - name: liveLibrariesLegName @@ -286,14 +275,13 @@ jobs: - evaluate_paths - ${{ parameters.dependsOn }} - ${{ if ne(parameters.liveRuntimeBuildConfig, '') }}: - - ${{ format('{0}_{1}_product_build_{2}{3}_{4}_{5}{6}', + - ${{ format('{0}_{1}_product_build_{2}{3}_{4}_{5}', parameters.runtimeFlavor, parameters.runtimeVariant, parameters.osGroup, parameters.osSubgroup, parameters.archType, - parameters.liveRuntimeBuildConfig, - parameters.pgoType) }} + parameters.liveRuntimeBuildConfig) }} - ${{ if ne(parameters.liveLibrariesBuildConfig, '') }}: - libraries_build_${{ format('{0}{1}_{2}_{3}', parameters.osGroup, @@ -301,6 +289,33 @@ jobs: parameters.archType, parameters.liveLibrariesBuildConfig) }} steps: + - ${{ if eq(parameters.osGroup, 'windows') }}: + - powershell: | + schtasks /change /tn "\Microsoft\VisualStudio\VSIX Auto Update" /disable + + $vswhere = "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" + if (-not (Test-Path -Path "$vswhere" -PathType Leaf)) + { + Write-Error "Couldn't locate vswhere at $vswhere" + exit 1 + } + + $vsdir = &"$vswhere" -latest -prerelease -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath + $vsregedit = "$vsdir\Common7\IDE\VsRegEdit.exe" + + if (-not (Test-Path -Path "$vsregedit" )) + { + Write-Error "VSWhere returned path: $vsdir, but regedit $vsregedit doesn't exist." + exit 1 + } + + Write-Output "VSWhere returned path: $vsdir, using regedit $vsregedit" + Write-Output "Disabling updates through VS Registry:" + + &"$vsdir\Common7\IDE\VsRegEdit.exe" set local HKCU ExtensionManager AutomaticallyCheckForUpdates2Override dword 0 + &"$vsdir\Common7\IDE\VsRegEdit.exe" read local HKCU ExtensionManager AutomaticallyCheckForUpdates2Override dword + displayName: Disable VSIX updates + condition: always() - checkout: self clean: true fetchDepth: $(checkoutFetchDepth) @@ -372,10 +387,16 @@ jobs: path: $(Build.SourcesDirectory)/artifacts/bin/osx-${{ parameters.archType }}.$(_BuildConfig)/corehost entitlementsFile: $(Build.SourcesDirectory)/eng/pipelines/common/entitlements.plist - - script: $(BaseJobBuildCommand) -subset host.pkg+host.tools+host.tests+packs + - script: $(BaseJobBuildCommand) -subset host.pkg+host.tools+host.pretest+host.tests+packs displayName: Build and Package continueOnError: ${{ and(eq(variables.SkipTests, false), eq(parameters.shouldContinueOnError, true)) }} + - ${{ if and(eq(parameters.isOfficialBuild, true), eq(parameters.osGroup, 'windows')) }}: + - powershell: ./eng/collect_vsinfo.ps1 -ArchiveRunName postbuild_log + displayName: Collect vslogs on exit + condition: always() + + - ${{ if in(parameters.osGroup, 'osx', 'ios', 'tvos') }}: - script: | du -sh $(Build.SourcesDirectory)/* @@ -383,7 +404,7 @@ jobs: displayName: Disk Usage after Build # Only in glibc leg, we produce RPMs and Debs - - ${{ if and(eq(parameters.runtimeFlavor, 'coreclr'), or(eq(parameters.platform, 'linux_x64'), eq(parameters.platform, 'linux_arm64')), eq(parameters.osSubgroup, ''), eq(parameters.pgoType, ''))}}: + - ${{ if and(eq(parameters.runtimeFlavor, 'coreclr'), or(eq(parameters.platform, 'linux_x64'), eq(parameters.platform, 'linux_arm64')), eq(parameters.osSubgroup, ''))}}: - ${{ each packageBuild in parameters.packageDistroList }}: # This leg's RID matches the build image. Build its distro-dependent packages, as well as # the distro-independent installers. (There's no particular reason to build the distro- @@ -404,7 +425,6 @@ jobs: runtimeFlavor: ${{ parameters.runtimeFlavor }} runtimeVariant: ${{ parameters.runtimeVariant }} isOfficialBuild: ${{ eq(parameters.isOfficialBuild, true) }} - pgoType: ${{ parameters.pgoType }} skipTests: ${{ eq(variables.SkipTests, true) }} - ${{ if ne(parameters.osGroup, 'windows') }}: diff --git a/eng/pipelines/installer/jobs/steps/upload-job-artifacts.yml b/eng/pipelines/installer/jobs/steps/upload-job-artifacts.yml index 6029ba00571977..4012b9a4fa34cb 100644 --- a/eng/pipelines/installer/jobs/steps/upload-job-artifacts.yml +++ b/eng/pipelines/installer/jobs/steps/upload-job-artifacts.yml @@ -3,7 +3,6 @@ parameters: runtimeFlavor: 'coreclr' runtimeVariant: '' isOfficialBuild: false - pgoType: '' steps: # Upload build artifacts (packages) to pipeline only if official, to save storage space. @@ -51,7 +50,7 @@ steps: displayName: Publish binaries inputs: pathtoPublish: '$(Build.StagingDirectory)/corehost-bin-${{ parameters.name }}-$(_BuildConfig)$(archiveExtension)' - artifactName: Installer-Binaries-${{parameters.pgoType }}${{ parameters.runtimeFlavor }}-${{ parameters.runtimeVariant }}-${{ parameters.name }}-$(_BuildConfig) + artifactName: Installer-Binaries-${{ parameters.runtimeFlavor }}-${{ parameters.runtimeVariant }}-${{ parameters.name }}-$(_BuildConfig) continueOnError: true condition: failed() @@ -71,6 +70,6 @@ steps: displayName: Publish BuildLogs inputs: targetPath: '$(Build.StagingDirectory)/BuildLogs' - artifactName: Installer-Logs-${{parameters.pgoType }}${{ parameters.runtimeFlavor }}-${{ parameters.runtimeVariant }}-${{ parameters.name }}-$(_BuildConfig) + artifactName: Installer-Logs_Attempt$(System.JobAttempt)-${{ parameters.runtimeFlavor }}-${{ parameters.runtimeVariant }}-${{ parameters.name }}-$(_BuildConfig) continueOnError: true condition: always() diff --git a/eng/pipelines/libraries/base-job.yml b/eng/pipelines/libraries/base-job.yml index 9dea30f61c455d..1726ebb26bd88d 100644 --- a/eng/pipelines/libraries/base-job.yml +++ b/eng/pipelines/libraries/base-job.yml @@ -4,7 +4,7 @@ parameters: archType: '' osSubgroup: '' crossBuild: false - framework: 'net8.0' + framework: 'net9.0' isOfficialAllConfigurations: false isSourceBuild: false liveRuntimeBuildConfig: '' @@ -23,7 +23,7 @@ parameters: testScope: '' pool: '' runTests: false - pgoType: '' + SuperPmiCollect: false jobs: - template: /eng/common/templates/job/job.yml @@ -48,6 +48,7 @@ jobs: variables: - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - group: DotNet-HelixApi-Access + - group: AzureDevOps-Artifact-Feeds-Pats - _buildScriptFileName: build @@ -97,7 +98,7 @@ jobs: - _runtimeDownloadPath: '$(Build.SourcesDirectory)/artifacts/transport/${{ parameters.runtimeFlavor }}' - _runtimeConfigurationArg: -rc ${{ parameters.liveRuntimeBuildConfig }} - ${{ if eq(parameters.runTests, true) }}: - - _runtimeArtifactName: '$(runtimeFlavorName)Product_${{ parameters.pgoType }}_${{ parameters.runtimeVariant}}_${{ parameters.osGroup }}${{ parameters.osSubgroup }}_${{ parameters.archType }}_${{ parameters.liveRuntimeBuildConfig }}' + - _runtimeArtifactName: '$(runtimeFlavorName)Product_${{ parameters.runtimeVariant}}_${{ parameters.osGroup }}${{ parameters.osSubgroup }}_${{ parameters.archType }}_${{ parameters.liveRuntimeBuildConfig }}' - _runtimeArtifactsPathArg: ' /p:RuntimeArtifactsPath=$(_runtimeDownloadPath)' - ${{ if eq(parameters.testDisplayName, '') }}: - _testRunNamePrefixSuffix: $(runtimeFlavorName)_${{ parameters.liveRuntimeBuildConfig }} @@ -136,4 +137,22 @@ jobs: artifactName: '$(_runtimeArtifactName)' displayName: '$(runtimeFlavorName) build drop' + - ${{ if ne(variables['System.TeamProject'], 'public') }}: + - ${{ if ne(parameters.osGroup, 'windows') }}: + - task: Bash@3 + displayName: Setup Private Feeds Credentials + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh + arguments: $(Build.SourcesDirectory)/NuGet.config $Token + env: + Token: $(dn-bot-dnceng-artifact-feeds-rw) + - ${{ if eq(parameters.osGroup, 'windows') }}: + - task: PowerShell@2 + displayName: Setup Private Feeds Credentials + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token + env: + Token: $(dn-bot-dnceng-artifact-feeds-rw) + - ${{ parameters.steps }} diff --git a/eng/pipelines/libraries/build-job.yml b/eng/pipelines/libraries/build-job.yml index 19eeba653c37ae..cd76d5b1920bb8 100644 --- a/eng/pipelines/libraries/build-job.yml +++ b/eng/pipelines/libraries/build-job.yml @@ -5,7 +5,7 @@ parameters: archType: '' targetRid: '' crossBuild: false - framework: 'net8.0' + framework: 'net9.0' isOfficialBuild: false isOfficialAllConfigurations: false runtimeVariant: '' diff --git a/eng/pipelines/libraries/enterprise/linux.yml b/eng/pipelines/libraries/enterprise/linux.yml index ccfda9fcaebe40..40552c1a0e18f8 100644 --- a/eng/pipelines/libraries/enterprise/linux.yml +++ b/eng/pipelines/libraries/enterprise/linux.yml @@ -39,7 +39,7 @@ extends: timeoutInMinutes: 120 pool: name: $(DncEngPublicBuildPool) - demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open + demands: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open steps: - bash: | cd $(enterpriseTestsSetup) diff --git a/eng/pipelines/libraries/helix-queues-setup.yml b/eng/pipelines/libraries/helix-queues-setup.yml index 987d7f99c41f4a..dfc98e12f89cf9 100644 --- a/eng/pipelines/libraries/helix-queues-setup.yml +++ b/eng/pipelines/libraries/helix-queues-setup.yml @@ -47,9 +47,9 @@ jobs: # Linux musl x64 - ${{ if eq(parameters.platform, 'linux_musl_x64') }}: - ${{ if or(ne(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}: - - (Alpine.315.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.15-helix-amd64 + - (Alpine.315.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.15-helix-amd64 - ${{ if or(eq(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}: - - (Alpine.317.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.17-helix-amd64 + - (Alpine.317.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.17-helix-amd64 # Linux musl arm64 - ${{ if and(eq(parameters.platform, 'linux_musl_arm64'), or(eq(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true))) }}: @@ -61,25 +61,25 @@ jobs: - ${{ if and(eq(parameters.jobParameters.interpreter, ''), ne(parameters.jobParameters.isSingleFile, true)) }}: - ${{ if and(eq(parameters.jobParameters.testScope, 'outerloop'), eq(parameters.jobParameters.runtimeFlavor, 'mono')) }}: - SLES.15.Amd64.Open - - (Centos.8.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8-helix - - (Fedora.38.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-38-helix - - (Ubuntu.2204.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-amd64 + - (Centos.8.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8-helix + - (Fedora.38.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-38-helix + - (Ubuntu.2204.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-amd64 - (Debian.11.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-helix-amd64 - ${{ if or(ne(parameters.jobParameters.testScope, 'outerloop'), ne(parameters.jobParameters.runtimeFlavor, 'mono')) }}: - ${{ if or(eq(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}: - SLES.15.Amd64.Open - - (Fedora.38.Amd64.Open)ubuntu.1804.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-38-helix + - (Fedora.38.Amd64.Open)ubuntu.2204.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-38-helix - Ubuntu.2204.Amd64.Open - - (Debian.11.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-helix-amd64 - - (Mariner.2.0.Amd64.Open)ubuntu.1804.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-helix-amd64 - - (openSUSE.15.2.Amd64.Open)ubuntu.1804.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:opensuse-15.2-helix-amd64 + - (Debian.11.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-helix-amd64 + - (Mariner.2.0.Amd64.Open)Ubuntu.2204.Amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-helix-amd64 + - (openSUSE.15.2.Amd64.Open)Ubuntu.2204.Amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:opensuse-15.2-helix-amd64 - ${{ if or(ne(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}: - - (Centos.8.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8-helix - - (Debian.11.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-helix-amd64 - - Ubuntu.1804.Amd64.Open + - (Centos.8.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8-helix + - (Debian.11.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-helix-amd64 + - Ubuntu.2204.Amd64.Open - ${{ if or(eq(parameters.jobParameters.interpreter, 'true'), eq(parameters.jobParameters.isSingleFile, true)) }}: # Limiting interp runs as we don't need as much coverage. - - (Debian.11.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-helix-amd64 + - (Debian.11.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-helix-amd64 # Linux s390x - ${{ if eq(parameters.platform, 'linux_s390x') }}: @@ -99,7 +99,7 @@ jobs: # Android - ${{ if in(parameters.platform, 'android_x86', 'android_x64', 'linux_bionic_x64') }}: - - Ubuntu.1804.Amd64.Android.29.Open + - Ubuntu.2204.Amd64.Android.29.Open - ${{ if in(parameters.platform, 'android_arm', 'android_arm64', 'linux_bionic_arm64') }}: - Windows.10.Amd64.Android.Open @@ -173,15 +173,15 @@ jobs: # WASI - ${{ if eq(parameters.platform, 'wasi_wasm') }}: - - (Ubuntu.2004.Amd64)Ubuntu.2004.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-20.04-helix-wasm-amd64 + - (Ubuntu.2204.Amd64)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-webassembly # Browser WebAssembly - ${{ if eq(parameters.platform, 'browser_wasm') }}: - - (Ubuntu.1804.Amd64)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-helix-webassembly + - (Ubuntu.2204.Amd64)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-webassembly # Browser WebAssembly Firefox - ${{ if eq(parameters.platform, 'browser_wasm_firefox') }}: - - (Ubuntu.1804.Amd64)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-helix-webassembly + - (Ubuntu.2204.Amd64)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-webassembly # Browser WebAssembly windows - ${{ if in(parameters.platform, 'browser_wasm_win', 'wasi_wasm_win') }}: diff --git a/eng/pipelines/libraries/helix.yml b/eng/pipelines/libraries/helix.yml index f63792367fe78b..03b3cf1ebaffca 100644 --- a/eng/pipelines/libraries/helix.yml +++ b/eng/pipelines/libraries/helix.yml @@ -13,6 +13,9 @@ parameters: extraHelixArguments: '' shouldContinueOnError: false scenarios: '' + SuperPmiCollect: '' + SuperPmiCollectionType: '' + SuperPmiCollectionName: '' steps: - script: $(_msbuildCommand) $(_warnAsErrorParamHelixOverride) -restore @@ -34,6 +37,9 @@ steps: env: SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops _Scenarios: ${{ join(',', parameters.scenarios) }} # Pass scenarios to MSBuild as env var to avoid need of escaping comma separated list + _SuperPmiCollect: ${{ parameters.SuperPmiCollect }} + _SuperPmiCollectionType: ${{ parameters.SuperPmiCollectionType }} + _SuperPmiCollectionName: ${{ parameters.SuperPmiCollectionName }} ${{ if eq(variables['System.TeamProject'], 'internal') }}: HelixAccessToken: $(HelixApiAccessToken) diff --git a/eng/pipelines/libraries/run-test-job.yml b/eng/pipelines/libraries/run-test-job.yml index 4fe91d22a9312f..cbc53deaed4c16 100644 --- a/eng/pipelines/libraries/run-test-job.yml +++ b/eng/pipelines/libraries/run-test-job.yml @@ -4,7 +4,7 @@ parameters: osSubgroup: '' archType: '' targetRid: '' - framework: 'net8.0' + framework: 'net9.0' isOfficialBuild: false liveRuntimeBuildConfig: '' runtimeFlavor: 'coreclr' @@ -23,6 +23,9 @@ parameters: # stress modes that each test will be run with. This is the same usage as 'testGroup' in # eng/pipelines/common/templates/runtimes/run-test-job.yml. coreclrTestGroup: '' + SuperPmiCollect: false + SuperPmiCollectionType: 'run' + SuperPmiCollectionName: 'libraries_tests' dependsOn: [] jobs: @@ -42,13 +45,18 @@ jobs: container: ${{ parameters.container }} condition: ${{ parameters.condition }} testScope: ${{ parameters.testScope }} + SuperPmiCollect: ${{ parameters.SuperPmiCollect }} runTests: true - ${{ if ne(parameters.liveRuntimeBuildConfig, '') }}: - displayName: ${{ format('Test Run {0} {1}', parameters.liveRuntimeBuildConfig, parameters.runtimeDisplayName) }} - name: ${{ format('test_run_{0}_{1}', parameters.liveRuntimeBuildConfig, parameters.runtimeDisplayName) }} - ${{ if eq(parameters.liveRuntimeBuildConfig, '') }}: - displayName: 'Test Run' - name: test_run + ${{ if eq(parameters.SuperPmiCollect, true) }}: + displayName: ${{ format('SuperPMI collection {0} {1} {2}', parameters.SuperPmiCollectionName, parameters.liveRuntimeBuildConfig, parameters.runtimeDisplayName) }} + name: ${{ format('spmi_{0}_{1}_{2}', parameters.SuperPmiCollectionName, parameters.liveRuntimeBuildConfig, parameters.runtimeDisplayName) }} + ${{ else }}: + ${{ if ne(parameters.liveRuntimeBuildConfig, '') }}: + displayName: ${{ format('Test Run {0} {1}', parameters.liveRuntimeBuildConfig, parameters.runtimeDisplayName) }} + name: ${{ format('test_run_{0}_{1}', parameters.liveRuntimeBuildConfig, parameters.runtimeDisplayName) }} + ${{ if eq(parameters.liveRuntimeBuildConfig, '') }}: + displayName: 'Test Run' + name: test_run ${{ if eq(parameters.interpreter, 'true') }}: testDisplayName: ${{ parameters.runtimeFlavor }}_interpreter_${{ parameters.liveRuntimeBuildConfig }} @@ -64,14 +72,36 @@ jobs: - ${{ format('libraries_build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }} - ${{ if ne(parameters.liveRuntimeBuildConfig, '') }}: - ${{ format('{0}_{1}_product_build_{2}{3}_{4}_{5}', parameters.runtimeFlavor, parameters.runtimeVariant, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.liveRuntimeBuildConfig) }} + # SuperPMI collection needs to run mcs.exe on the AzDO machine. Assume that's an x64 machine, and download an x64 product build if needed. + - ${{ if and(eq(parameters.SuperPmiCollect, true), ne(parameters.archType, 'x64')) }}: + - ${{ format('{0}_{1}_product_build_{2}{3}_{4}_{5}', 'coreclr', '', parameters.osGroup, parameters.osSubgroup, 'x64', parameters.liveRuntimeBuildConfig) }} variables: + - librariesTestsArtifactName: ${{ format('libraries_test_assets_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }} - _archiveTestsParameter: /p:ArchiveTests=true + - ${{ if eq(parameters.SuperPmiCollect, true) }}: + - template: /eng/pipelines/libraries/superpmi-collect-variables.yml + parameters: + buildConfig: ${{ parameters.buildConfig }} + osGroup: ${{ parameters.osGroup }} + archType: ${{ parameters.archType }} + runtimeFlavor: ${{ parameters.runtimeFlavor }} + - ${{ parameters.variables }} steps: + + # SuperPMI collection: Download x64 coreclr if running on non-x64 configuration (needed for mcs.exe on AzDO machine; see `SuperPmiMcsPath`. + - ${{ if and(eq(parameters.SuperPmiCollect, true), ne(parameters.archType, 'x64')) }}: + - template: /eng/pipelines/common/download-artifact-step.yml + parameters: + unpackFolder: $(_runtimeX64DownloadPath) + artifactFileName: 'CoreCLRProduct___${{ parameters.osGroup }}${{ parameters.osSubgroup }}_x64_${{ parameters.liveRuntimeBuildConfig }}$(archiveExtension)' + artifactName: 'CoreCLRProduct___${{ parameters.osGroup }}${{ parameters.osSubgroup }}_x64_${{ parameters.liveRuntimeBuildConfig }}' + displayName: 'CoreCLR product build (x64)' + - template: /eng/pipelines/common/download-artifact-step.yml parameters: displayName: Build Assets @@ -113,6 +143,9 @@ jobs: shouldContinueOnError: ${{ parameters.shouldContinueOnError }} creator: dotnet-bot testRunNamePrefixSuffix: $(_testRunNamePrefixSuffix) + SuperPmiCollect: ${{ parameters.SuperPmiCollect }} + SuperPmiCollectionType: ${{ parameters.SuperPmiCollectionType }} + SuperPmiCollectionName: ${{ parameters.SuperPmiCollectionName }} # coreclrTestGroup: The following mappings of 'coreclrTestGroup' to 'scenarios' is copied from # eng/pipelines/common/templates/runtimes/run-test-job.yml (with 'testGroup' replaced by 'coreclrTestGroup' @@ -137,6 +170,12 @@ jobs: ${{ else }}: extraHelixArguments: $(_extraHelixArguments) + ${{ if in(parameters.coreclrTestGroup, 'superpmi_collection') }}: + scenarios: + - normal + ${{ if in(parameters.coreclrTestGroup, 'superpmi_collection_no_tiered_compilation') }}: + scenarios: + - no_tiered_compilation ${{ if in(parameters.coreclrTestGroup, 'jitstress') }}: scenarios: - no_tiered_compilation @@ -205,3 +244,19 @@ jobs: - syntheticpgo - syntheticpgo_blend + - ${{ if eq(parameters.SuperPmiCollect, true) }}: + - template: /eng/pipelines/libraries/superpmi-postprocess-step.yml + parameters: + buildConfig: ${{ parameters.buildConfig }} + buildConfigUpper: $(buildConfigUpper) + osGroup: ${{ parameters.osGroup }} + osSubgroup: ${{ parameters.osSubgroup }} + archType: ${{ parameters.archType }} + SuperPmiCollectionType: ${{ parameters.SuperPmiCollectionType }} + SuperPmiCollectionName: ${{ parameters.SuperPmiCollectionName }} + MergedMchFileLocation: $(MergedMchFileLocation) + MchFilesLocation: $(MchFilesLocation) + SpmiLogsLocation: $(SpmiLogsLocation) + SuperPmiMcsPath: $(SuperPmiMcsPath) + PythonScript: $(PythonScript) + PipScript: $(PipScript) \ No newline at end of file diff --git a/eng/pipelines/libraries/stress/ssl.yml b/eng/pipelines/libraries/stress/ssl.yml index ab93994400d346..1052d3b04285c7 100644 --- a/eng/pipelines/libraries/stress/ssl.yml +++ b/eng/pipelines/libraries/stress/ssl.yml @@ -37,7 +37,7 @@ extends: timeoutInMinutes: 120 pool: name: $(DncEngPublicBuildPool) - demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open + demands: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open steps: - checkout: self diff --git a/eng/pipelines/libraries/superpmi-collect-variables.yml b/eng/pipelines/libraries/superpmi-collect-variables.yml new file mode 100644 index 00000000000000..509bd609424507 --- /dev/null +++ b/eng/pipelines/libraries/superpmi-collect-variables.yml @@ -0,0 +1,46 @@ +parameters: + buildConfig: '' + osGroup: '' + archType: '' + runtimeFlavor: 'coreclr' + +variables: + + - name: buildConfigUpper + ${{ if eq(parameters.buildConfig, 'debug') }}: + value: 'Debug' + ${{ if eq(parameters.buildConfig, 'release') }}: + value: 'Release' + - name: _runtimeX64DownloadPath + value: '' + # superpmi.py 'merge-mch' needs to be able to find the mcs tool. Point SuperPmiMcsPath at the downloaded CoreCLR binaries. For non-x64 targets, download an x64 + # build and point at that. Pass this to superpmi.py as the '-core_root' argument. It's not actually a "Core_Root" directory, but all it needs is to find mcs. + - name: SuperPmiMcsPath + value: $(_runtimeDownloadPath) + - ${{ if ne(parameters.archType, 'x64') }}: + - name: _runtimeX64DownloadPath + value: '$(Build.SourcesDirectory)/artifacts/transport/${{ parameters.runtimeFlavor }}.x64' + - name: SuperPmiMcsPath + value: $(_runtimeX64DownloadPath) + - ${{ if eq(parameters.osGroup, 'windows') }}: + - name: PythonScript + value: 'py -3' + - name: PipScript + value: 'py -3 -m pip' + - name: MchFilesLocation + value: '$(Build.SourcesDirectory)\artifacts\helixresults\' + - name: MergedMchFileLocation + value: '$(Build.SourcesDirectory)\artifacts\spmi_collection\' + - name: SpmiLogsLocation + value: '$(Build.SourcesDirectory)\artifacts\spmi_logs\' + - ${{ if ne(parameters.osGroup, 'windows') }}: + - name: PythonScript + value: 'python3' + - name: PipScript + value: 'pip3' + - name: MchFilesLocation + value: '$(Build.SourcesDirectory)/artifacts/helixresults/' + - name: MergedMchFileLocation + value: '$(Build.SourcesDirectory)/artifacts/spmi_collection/' + - name: SpmiLogsLocation + value: '$(Build.SourcesDirectory)/artifacts/spmi_logs/' \ No newline at end of file diff --git a/eng/pipelines/libraries/superpmi-postprocess-step.yml b/eng/pipelines/libraries/superpmi-postprocess-step.yml new file mode 100644 index 00000000000000..ef29b332c75170 --- /dev/null +++ b/eng/pipelines/libraries/superpmi-postprocess-step.yml @@ -0,0 +1,87 @@ +######################################################################################################## +# +# Finalize SuperPMI collection: (1) merge all MCH files generated by all Helix jobs, (2) upload MCH file +# to Azure Storage, (3) upload log files. Note that the steps are "condition: always()" because we want +# to upload as much of the collection as possible, even if there were test failures. +# +######################################################################################################## + +parameters: + buildConfig: '' + buildConfigUpper: '' + osGroup: '' + osSubgroup: '' + archType: '' + SuperPmiCollectionType: 'run' + SuperPmiCollectionName: 'libraries_tests' + MergedMchFileLocation: '' + MchFilesLocation: '' + SpmiLogsLocation: '' + SuperPmiMcsPath: '' + PythonScript: '' + PipScript: '' + +steps: + + # Create required directories for merged mch collection and superpmi logs + - ${{ if ne(parameters.osGroup, 'windows') }}: + - script: | + mkdir -p ${{ parameters.MergedMchFileLocation }} + mkdir -p ${{ parameters.SpmiLogsLocation }} + displayName: 'Create SuperPMI directories' + condition: always() + - ${{ if eq(parameters.osGroup, 'windows') }}: + - script: | + mkdir ${{ parameters.MergedMchFileLocation }} + mkdir ${{ parameters.SpmiLogsLocation }} + displayName: 'Create SuperPMI directories' + condition: always() + + - script: ${{ parameters.PythonScript }} $(Build.SourcesDirectory)/src/coreclr/scripts/superpmi.py merge-mch -log_level DEBUG -pattern ${{ parameters.MchFilesLocation }}${{ parameters.SuperPmiCollectionName }}.${{ parameters.SuperPmiCollectionType }}*.mch -output_mch_path ${{ parameters.MergedMchFileLocation }}${{ parameters.SuperPmiCollectionName }}.${{ parameters.SuperPmiCollectionType }}.${{ parameters.osGroup }}.${{ parameters.archType }}.${{ parameters.buildConfig }}.mch -core_root ${{ parameters.SuperPmiMcsPath }} + displayName: 'Merge ${{ parameters.SuperPmiCollectionName }}-${{ parameters.SuperPmiCollectionType }} SuperPMI collections' + condition: always() + + - template: /eng/pipelines/common/upload-artifact-step.yml + parameters: + rootFolder: ${{ parameters.MergedMchFileLocation }} + includeRootFolder: false + archiveType: $(archiveType) + tarCompression: $(tarCompression) + archiveExtension: $(archiveExtension) + artifactName: 'SuperPMI_Collection_${{ parameters.SuperPmiCollectionName }}_${{ parameters.SuperPmiCollectionType }}_${{ parameters.osGroup }}${{ parameters.osSubgroup }}_${{ parameters.archType }}_${{ parameters.buildConfig }}' + displayName: 'Upload artifacts SuperPMI ${{ parameters.SuperPmiCollectionName }}-${{ parameters.SuperPmiCollectionType }} collection' + condition: always() + + # Add authenticated pip feed + - task: PipAuthenticate@1 + displayName: 'Pip Authenticate' + inputs: + artifactFeeds: public/dotnet-public-pypi + onlyAddExtraIndex: false + condition: always() + + # Ensure the Python azure-storage-blob package is installed before doing the upload. + - script: ${{ parameters.PipScript }} install --user --upgrade pip && ${{ parameters.PipScript }} install --user azure.storage.blob==12.5.0 --force-reinstall + displayName: Upgrade Pip to latest and install azure-storage-blob Python package + condition: always() + + - script: ${{ parameters.PythonScript }} $(Build.SourcesDirectory)/src/coreclr/scripts/superpmi.py upload -log_level DEBUG -arch ${{ parameters.archType }} -build_type ${{ parameters.buildConfig }} -mch_files ${{ parameters.MergedMchFileLocation }}${{ parameters.SuperPmiCollectionName }}.${{ parameters.SuperPmiCollectionType }}.${{ parameters.osGroup }}.${{ parameters.archType }}.${{ parameters.buildConfig }}.mch -core_root $(Build.SourcesDirectory)/artifacts/bin/coreclr/${{ parameters.osGroup }}.x64.${{ parameters.buildConfigUpper }} + displayName: 'Upload SuperPMI ${{ parameters.SuperPmiCollectionName }}-${{ parameters.SuperPmiCollectionType }} collection to Azure Storage' + condition: always() + env: + CLRJIT_AZ_KEY: $(clrjit_key1) # secret key stored as variable in pipeline + + - task: CopyFiles@2 + displayName: Copying superpmi.log of all partitions + inputs: + sourceFolder: '${{ parameters.MchFilesLocation }}' + contents: '**/${{ parameters.SuperPmiCollectionName }}.${{ parameters.SuperPmiCollectionType }}*.log' + targetFolder: '${{ parameters.SpmiLogsLocation }}' + condition: always() + + - task: PublishPipelineArtifact@1 + displayName: Publish SuperPMI logs + inputs: + targetPath: ${{ parameters.SpmiLogsLocation }} + artifactName: 'SuperPMI_Logs_${{ parameters.SuperPmiCollectionName }}_${{ parameters.SuperPmiCollectionType }}_${{ parameters.osGroup }}${{ parameters.osSubgroup }}_${{ parameters.archType }}_${{ parameters.buildConfig }}' + condition: always() \ No newline at end of file diff --git a/eng/pipelines/mono/templates/build-job.yml b/eng/pipelines/mono/templates/build-job.yml index b1ac9c1cc6554e..86e0813c7c7e5c 100644 --- a/eng/pipelines/mono/templates/build-job.yml +++ b/eng/pipelines/mono/templates/build-job.yml @@ -15,7 +15,6 @@ parameters: dependsOn: [] monoCrossAOTTargetOS: [] dependOnEvaluatePaths: false - pgoType: '' ### Product build jobs: @@ -171,30 +170,15 @@ jobs: - script: build$(scriptExt) -subset mono+clr.hosts -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(aotCrossParameter) $(llvmParameter) -pack $(OutputRidArg) displayName: Build nupkg - # Publish official build - - ${{ if eq(parameters.publishToBlobFeed, 'true') }}: - - ${{ if ne(parameters.osGroup, 'windows') }}: - - script: $(Build.SourcesDirectory)/eng/common/build.sh --ci --restore --publish --configuration $(_BuildConfig) /p:DotNetPublishUsingPipelines=true /p:DotNetPublishToBlobFeed=true /p:DotNetPublishBlobFeedUrl=$(dotnetfeedUrl) /p:DotNetPublishBlobFeedKey=$(dotnetfeedPAT) /p:Configuration=$(_BuildConfig) /p:TargetArchitecture=$(archType) /p:TargetOS=$(osGroup) /p:OSIdentifier=$(osGroup)$(osSubgroup) /bl:"$(Build.SourcesDirectory)/artifacts/log/publish-pkgs.binlog" --projects $(Build.SourcesDirectory)/eng/empty.csproj - displayName: Publish packages to blob feed - env: - # TODO: remove NUGET_PACKAGES once https://github.com/dotnet/arcade/issues/1578 is fixed - NUGET_PACKAGES: $(Build.SourcesDirectory)/.packages - ${{ if eq(parameters.osGroup, 'freebsd') }}: - # Arcade uses this SDK instead of trying to restore one. - DotNetCoreSdkDir: /usr/local/dotnet - - ${{ if eq(parameters.osGroup, 'windows') }}: - # TODO: pass publish feed url and access token in from the internal pipeline - - powershell: eng\common\build.ps1 -ci -restore -publish -configuration $(_BuildConfig) /p:DotNetPublishUsingPipelines=true /p:DotNetPublishToBlobFeed=true /p:DotNetPublishBlobFeedUrl=$(dotnetfeedUrl) /p:DotNetPublishBlobFeedKey=$(dotnetfeedPAT) /p:Configuration=$(_BuildConfig) /p:TargetArchitecture=$(archType) /p:TargetOS=$(osGroup) /p:OSIdentifier=$(osGroup)$(osSubgroup) /bl:"$(Build.SourcesDirectory)\artifacts\log\publish-pkgs.binlog" -projects $(Build.SourcesDirectory)\eng\empty.csproj - displayName: Publish packages to blob feed - env: - # TODO: remove NUGET_PACKAGES once https://github.com/dotnet/arcade/issues/1578 is fixed - NUGET_PACKAGES: $(Build.SourcesDirectory)\.packages - + - ${{ if and(eq(parameters.isOfficialBuild, true), eq(parameters.osGroup, 'windows')) }}: + - powershell: ./eng/collect_vsinfo.ps1 -ArchiveRunName postbuild_log + displayName: Collect vslogs on exit + condition: always() # Publish Logs - task: PublishPipelineArtifact@1 displayName: Publish Logs inputs: targetPath: $(Build.SourcesDirectory)/artifacts/log - artifactName: 'BuildLogs_Mono_${{ parameters.runtimeVariant }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' + artifactName: 'BuildLogs_Attempt$(System.JobAttempt)_Mono_${{ parameters.runtimeVariant }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' continueOnError: true condition: always() diff --git a/eng/pipelines/mono/templates/generate-offsets.yml b/eng/pipelines/mono/templates/generate-offsets.yml index ddc67f0cc0b7b8..c68adfe67a9e6b 100644 --- a/eng/pipelines/mono/templates/generate-offsets.yml +++ b/eng/pipelines/mono/templates/generate-offsets.yml @@ -87,6 +87,6 @@ jobs: displayName: Publish Logs inputs: targetPath: $(Build.SourcesDirectory)/artifacts/log - artifactName: 'BuildLogs_Mono_Offsets_$(osGroup)$(osSubGroup)' + artifactName: 'BuildLogs_Attempt$(System.JobAttempt)_Mono_Offsets_$(osGroup)$(osSubGroup)' continueOnError: true condition: always() diff --git a/eng/pipelines/mono/templates/workloads-build.yml b/eng/pipelines/mono/templates/workloads-build.yml index b962dcb65d178a..4a50ed665e24ee 100644 --- a/eng/pipelines/mono/templates/workloads-build.yml +++ b/eng/pipelines/mono/templates/workloads-build.yml @@ -96,7 +96,7 @@ jobs: displayName: Publish Logs inputs: targetPath: $(Build.SourcesDirectory)/artifacts/log - artifactName: 'WorkloadLogs' + artifactName: 'WorkloadLogs_Attempt$(System.JobAttempt)' continueOnError: true condition: always() diff --git a/eng/pipelines/mono/templates/xplat-pipeline-job.yml b/eng/pipelines/mono/templates/xplat-pipeline-job.yml index 2c369f71f30bb6..1ca84d9caac1bb 100644 --- a/eng/pipelines/mono/templates/xplat-pipeline-job.yml +++ b/eng/pipelines/mono/templates/xplat-pipeline-job.yml @@ -52,22 +52,22 @@ jobs: variables: - name: coreClrProductArtifactName - value: 'CoreCLRProduct___$(osGroup)$(osSubgroup)_$(archType)_${{ parameters.liveRuntimeBuildConfig }}' + value: 'CoreCLRProduct__$(osGroup)$(osSubgroup)_$(archType)_${{ parameters.liveRuntimeBuildConfig }}' - name: coreClrProductRootFolderPath value: '$(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).$(archType).$(liveRuntimeBuildConfigUpper)' - name: buildProductArtifactName - value: 'MonoProduct__${{ parameters.runtimeVariant }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' + value: 'MonoProduct_${{ parameters.runtimeVariant }}_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' # minijit and monointerpreter do not use separate product builds. - ${{ if or(eq(parameters.runtimeVariant, 'minijit'), eq(parameters.runtimeVariant, 'monointerpreter')) }}: - name : buildProductArtifactName - value : 'MonoProduct___$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' + value : 'MonoProduct__$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' - ${{ if eq(parameters.runtimeVariant, 'llvmfullaot') }}: - name : buildProductArtifactName - value : 'MonoProduct__llvmaot_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' + value : 'MonoProduct_llvmaot_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)' - name: binTestsPath value: '$(Build.SourcesDirectory)/artifacts/tests/coreclr' diff --git a/eng/pipelines/runtime-official.yml b/eng/pipelines/runtime-official.yml index 9c341a04791289..0579ef0feda81c 100644 --- a/eng/pipelines/runtime-official.yml +++ b/eng/pipelines/runtime-official.yml @@ -425,12 +425,13 @@ extends: - windows_arm64 # - # Build PGO CoreCLR release + # Build PGO Instrumented CoreCLR Release # - template: /eng/pipelines/common/platform-matrix.yml parameters: - jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml - buildConfig: release + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: Release + helixQueueGroup: ci platforms: - windows_x64 - windows_x86 @@ -438,29 +439,13 @@ extends: - windows_arm64 - linux_arm64 jobParameters: + buildArgs: -s clr.native+clr.corelib+clr.tools+clr.nativecorelib+libs+host+packs -c $(_BuildConfig) -pgoinstrument isOfficialBuild: ${{ variables.isOfficialBuild }} - signBinaries: false - testGroup: innerloop - pgoType: 'PGO' - - # - # PGO Build - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/installer/jobs/build-job.yml - buildConfig: Release - jobParameters: - isOfficialBuild: ${{ variables.isOfficialBuild }} - liveRuntimeBuildConfig: release - liveLibrariesBuildConfig: Release - pgoType: 'PGO' - platforms: - - windows_x64 - - windows_x86 - - linux_x64 - - windows_arm64 - - linux_arm64 + nameSuffix: PGO + extraStepsTemplate: /eng/pipelines/common/upload-intermediate-artifacts-step.yml + extraStepsParameters: + name: PGO + timeoutInMinutes: 95 # # Build Workloads @@ -490,9 +475,9 @@ extends: - Build_tvossimulator_arm64_release_AllSubsets_Mono - Build_tvossimulator_x64_release_AllSubsets_Mono - Build_windows_x64_release_CrossAOT_Mono - - installer__coreclr__windows_x64_Release_ - - installer__coreclr__windows_x86_Release_ - - installer__coreclr__windows_arm64_Release_ + - installer_coreclr__windows_x64_Release_ + - installer_coreclr__windows_x86_Release_ + - installer_coreclr__windows_arm64_Release_ - ${{ if eq(variables.isOfficialBuild, true) }}: - template: /eng/pipelines/official/stages/publish.yml diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index 0f1f9610c60349..0552d3d4814478 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -70,7 +70,6 @@ extends: jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml buildConfig: checked platforms: - - linux_x86 - linux_x64 - linux_arm - linux_arm64 @@ -79,7 +78,6 @@ extends: - linux_musl_arm64 - linux_musl_x64 - osx_arm64 - - tizen_armel - windows_x86 - windows_x64 - windows_arm64 @@ -188,6 +186,48 @@ extends: eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr_jit.containsChange'], true), eq(variables['isRollingBuild'], true))) + # + # Build CoreCLR with no R2R + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + buildConfig: checked + runtimeFlavor: coreclr + platforms: + - linux_x86 + jobParameters: + testScope: innerloop + nameSuffix: CoreCLR_NoR2R + buildArgs: -s clr.runtime+clr.jit+clr.iltools+clr.spmi+clr.corelib -c $(_BuildConfig) + timeoutInMinutes: 120 + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + # + # Build CoreCLR as a non-portable build + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + buildConfig: checked + runtimeFlavor: coreclr + platforms: + - tizen_armel + jobParameters: + testScope: innerloop + nameSuffix: CoreCLR_NonPortable + buildArgs: -s clr.native+clr.tools+clr.corelib+clr.nativecorelib+clr.aot+clr.packages -c $(_BuildConfig) /p:PortableBuild=false + timeoutInMinutes: 120 + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(variables['isRollingBuild'], true)) + # # CoreCLR NativeAOT debug build and smoke tests # Only when CoreCLR is changed @@ -556,6 +596,47 @@ extends: extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) alwaysRun: ${{ variables.isRollingBuild }} + # + # Android devices + # Build the whole product using Mono and run libraries tests + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + buildConfig: Release + runtimeFlavor: mono + platforms: + - android_arm + - android_arm64 + variables: + # map dependencies variables to local variables + - name: librariesContainsChange + value: $[ dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] + - name: monoContainsChange + value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'] ] + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_Mono + buildArgs: -s mono+libs+libs.tests+host+packs -c $(_BuildConfig) /p:ArchiveTests=true /p:RunSmokeTestsOnly=true /p:EnableAdditionalTimezoneChecks=true + timeoutInMinutes: 480 + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + eq(variables['isRollingBuild'], true)) + # extra steps, run tests + extraStepsTemplate: /eng/pipelines/libraries/helix.yml + extraStepsParameters: + creator: dotnet-bot + testRunNamePrefixSuffix: Mono_$(_BuildConfig) + condition: >- + or( + eq(variables['librariesContainsChange'], true), + eq(variables['monoContainsChange'], true), + eq(variables['isRollingBuild'], true)) + # # iOS/tvOS devices - Full AOT + AggressiveTrimming to reduce size # Build the whole product using Mono and run libraries tests diff --git a/eng/pipelines/runtimelab/runtimelab-post-build-steps.yml b/eng/pipelines/runtimelab/runtimelab-post-build-steps.yml index a6187638cd3461..97c007ba4b3074 100644 --- a/eng/pipelines/runtimelab/runtimelab-post-build-steps.yml +++ b/eng/pipelines/runtimelab/runtimelab-post-build-steps.yml @@ -5,7 +5,6 @@ parameters: osSubgroup: '' nameSuffix: '' platform: '' - pgoType: '' runtimeVariant: '' librariesBinArtifactName: '' isOfficialBuild: false @@ -32,7 +31,7 @@ steps: tarCompression: $(tarCompression) includeRootFolder: false archiveExtension: $(archiveExtension) - artifactName: CoreCLRProduct_${{ parameters.pgoType }}_${{ parameters.runtimeVariant }}_${{ parameters.osGroup }}${{ parameters.osSubgroup }}_${{ parameters.archType }}_${{ parameters.buildConfig }} + artifactName: CoreCLRProduct_${{ parameters.runtimeVariant }}_${{ parameters.osGroup }}${{ parameters.osSubgroup }}_${{ parameters.archType }}_${{ parameters.buildConfig }} displayName: 'CoreCLR product build' # Zip Test Build diff --git a/eng/restore/optimizationData.targets b/eng/restore/optimizationData.targets index 4d6b773bf201ab..009d6c8bca1e60 100644 --- a/eng/restore/optimizationData.targets +++ b/eng/restore/optimizationData.targets @@ -1,4 +1,4 @@ - + @@ -25,6 +25,9 @@ + + <_MergeMibcFilesCacheFile>$(MibcOptimizationDataDir)/$(TargetOS)/$(TargetArchitecture)/merge_mibc_files.cache + $(NuGetPackageRoot)%(MIBCPackage.Identity)/%(MIBCPackage.Version) @@ -32,7 +35,7 @@ <_optimizationMibcFile Include="%(MIBCPackage.PackagePath)/**/*.mibc" SubdirectoryName="$(TargetOS)/$(TargetArchitecture)" /> <_optimizationMibcDestinationFile Include="@(_optimizationMibcFile->'$(MibcOptimizationDataDir)%(SubdirectoryName)/%(RecursiveDir)%(Filename)%(Extension)')" /> + Exclude="@(_optimizationMibcDestinationFile);$(_MergeMibcFilesCacheFile)"/> diff --git a/eng/slngen.targets b/eng/slngen.targets index 59e2565b3817f4..551f4fc486cd12 100644 --- a/eng/slngen.targets +++ b/eng/slngen.targets @@ -1,8 +1,10 @@ + - gen - ref - tests - src + $(SlnGenSolutionFolder)gen + $(SlnGenSolutionFolder)ref + $(SlnGenSolutionFolder)tests + $(SlnGenSolutionFolder)src + diff --git a/eng/targetingpacks.targets b/eng/targetingpacks.targets index b3ad8560d63b1c..2c34b5817b9950 100644 --- a/eng/targetingpacks.targets +++ b/eng/targetingpacks.targets @@ -72,6 +72,13 @@ Condition="'@(KnownAppHostPack)' == '' or !@(KnownAppHostPack->AnyHaveMetadataValue('TargetFramework', '$(NetCoreAppCurrent)'))" /> + + + + $(NetCoreAppCurrent) + + + @@ -92,7 +99,7 @@ - @@ -106,12 +113,13 @@ Condition="'$(UsePackageDownload)' != 'true' and $([System.String]::Copy('%(Identity)').StartsWith('$(LocalFrameworkOverrideName).Runtime'))" /> + + Condition="$([System.String]::Copy('%(Identity)').EndsWith('Microsoft.DotNet.ILCompiler'))" /> - - + - 116.0.5845.96 + 116.0.5845.179 1160321 https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/1160321 - 11.6.189.18 + 11.6.189.20 - 116.0.5845.97 + 116.0.5845.180 1160321 https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/1160375 - 11.6.189.18 + 11.6.189.20 diff --git a/eng/testing/RunnerTemplate.cmd b/eng/testing/RunnerTemplate.cmd index 3833fd569d1996..4f4646a72315d6 100644 --- a/eng/testing/RunnerTemplate.cmd +++ b/eng/testing/RunnerTemplate.cmd @@ -47,6 +47,26 @@ set DOTNET_MULTILEVEL_LOOKUP=0 :: Assume failure set HAS_TEST_RESULTS=0 +:: Support for SuperPMI collection +REM SuperPMI collection +if not defined spmi_enable_collection goto :skip_spmi_enable_collection +echo SuperPMI collection enabled +REM spmi_collect_dir and spmi_core_root need to be set before this script is run, if SuperPMI collection is enabled. +if not defined spmi_collect_dir echo ERROR: spmi_collect_dir not defined&exit /b 1 +if not defined spmi_core_root echo ERROR: spmi_core_root not defined&exit /b 1 +if not exist %spmi_collect_dir% mkdir %spmi_collect_dir% +set SuperPMIShimLogPath=%spmi_collect_dir% +set SuperPMIShimPath=%spmi_core_root%\clrjit.dll +if not exist %SuperPMIShimPath% echo ERROR: %SuperPMIShimPath% not found&exit /b 1 +set DOTNET_EnableExtraSuperPmiQueries=1 +set DOTNET_JitPath=%spmi_core_root%\superpmi-shim-collector.dll +if not exist %DOTNET_JitPath% echo ERROR: %DOTNET_JitPath% not found&exit /b 1 +echo SuperPMIShimLogPath=%SuperPMIShimLogPath% +echo SuperPMIShimPath=%SuperPMIShimPath% +echo DOTNET_EnableExtraSuperPmiQueries=%DOTNET_EnableExtraSuperPmiQueries% +echo DOTNET_JitPath=%DOTNET_JitPath% +:skip_spmi_enable_collection + :: ========================= BEGIN Test Execution ============================= echo ----- start %DATE% %TIME% =============== To repro directly: ===================================================== echo pushd %EXECUTION_DIR% diff --git a/eng/testing/RunnerTemplate.sh b/eng/testing/RunnerTemplate.sh index 7c534f72b5e867..9252c30576ed96 100644 --- a/eng/testing/RunnerTemplate.sh +++ b/eng/testing/RunnerTemplate.sh @@ -157,6 +157,42 @@ elif [[ "$(uname -s)" == "Linux" ]]; then fi # ========================= END Core File Setup ============================== +# ========================= BEGIN support for SuperPMI collection ============================== +if [ ! -z $spmi_enable_collection ]; then + echo "SuperPMI collection enabled" + # spmi_collect_dir and spmi_core_root need to be set before this script is run, if SuperPMI collection is enabled. + if [ -z $spmi_collect_dir ]; then + echo "ERROR - spmi_collect_dir not defined" + exit 1 + fi + if [ -z $spmi_core_root ]; then + echo "ERROR - spmi_core_root not defined" + exit 1 + fi + mkdir -p $spmi_collect_dir + export spmi_file_extension=so + if [[ "$(uname -s)" == "Darwin" ]]; then + export spmi_file_extension=dylib + fi + export SuperPMIShimLogPath=$spmi_collect_dir + export SuperPMIShimPath=$spmi_core_root/libclrjit.$spmi_file_extension + export DOTNET_EnableExtraSuperPmiQueries=1 + export DOTNET_JitPath=$spmi_core_root/libsuperpmi-shim-collector.$spmi_file_extension + if [ ! -e $SuperPMIShimPath ]; then + echo "ERROR - $SuperPMIShimPath not found" + exit 1 + fi + if [ ! -e $DOTNET_JitPath ]; then + echo "ERROR - $DOTNET_JitPath not found" + exit 1 + fi + echo "SuperPMIShimLogPath=$SuperPMIShimLogPath" + echo "SuperPMIShimPath=$SuperPMIShimPath" + echo "DOTNET_EnableExtraSuperPmiQueries=$DOTNET_EnableExtraSuperPmiQueries" + echo "DOTNET_JitPath=$DOTNET_JitPath" +fi +# ========================= END support for SuperPMI collection ============================== + # ========================= BEGIN Test Execution ============================= echo ----- start $(date) =============== To repro directly: ===================================================== echo pushd $EXECUTION_DIR diff --git a/eng/testing/bump-chrome-version.proj b/eng/testing/bump-chrome-version.proj index 3541217da3b13a..d042948d2903f8 100644 --- a/eng/testing/bump-chrome-version.proj +++ b/eng/testing/bump-chrome-version.proj @@ -17,7 +17,7 @@ $(RunSettingsIntermediateOutputFilePath) + $(GenerateRunSettingsFileDependsOn);SetupCoverageFilter GenerateRunSettingsFile;$(PrepareForRunDependsOn) - + <_testFilter Condition="'$(_withCategories)' != ''">$(_withCategories.Replace(';', '&amp;category=')) <_testFilter Condition="'$(_withoutCategories)' != ''">$(_testFilter)$(_withoutCategories.Replace(';', '&amp;category!=')) <_testFilter>$(_testFilter.Trim('&amp;')) + DependsOnTargets="$(GenerateRunSettingsFileDependsOn)"> + $(NetCoreAppCurrentTestHostPath)$([System.IO.Path]::GetFileName('$(DotNetTool)')) + $(_testFilter) + $([System.IO.File]::ReadAllText('$(RunSettingsInputFilePath)')) $(RunSettingsFileContent.Replace('$$MAXCPUCOUNT$$', '1')) $(RunSettingsFileContent.Replace('$$MAXCPUCOUNT$$', '0')) @@ -38,21 +42,21 @@ .Replace('$$COVERAGE_ENABLED$$', '$([MSBuild]::ValueOrDefault('$(Coverage)', 'false'))') .Replace('$$DISABLEPARALLELIZATION$$', '$([MSBuild]::ValueOrDefault('$(TestDisableParallelization)', 'false'))') .Replace('$$DISABLEAPPDOMAIN$$', '$([MSBuild]::ValueOrDefault('$(TestDisableAppDomain)', 'false'))') - .Replace('$$TESTCASEFILTER$$', '$(_testFilter)') - .Replace('$$DOTNETHOSTPATH$$', '$(NetCoreAppCurrentTestHostPath)$([System.IO.Path]::GetFileName('$(DotNetTool)'))')) + .Replace('$$TESTCASEFILTER$$', '$(RunSettingsTestCaseFilter)') + .Replace('$$DOTNETHOSTPATH$$', '$(RunSettingsDotNetHostPath)')) - + - + $(RunSettingsOutputFilePath) diff --git a/eng/testing/tests.singlefile.targets b/eng/testing/tests.singlefile.targets index 2a0a439dd26f08..0bb1f4ec5fd0a3 100644 --- a/eng/testing/tests.singlefile.targets +++ b/eng/testing/tests.singlefile.targets @@ -74,6 +74,8 @@ + + diff --git a/eng/testing/wasm-provisioning.targets b/eng/testing/wasm-provisioning.targets index fd3bbc50c06bb5..d1c9bda6653fe6 100644 --- a/eng/testing/wasm-provisioning.targets +++ b/eng/testing/wasm-provisioning.targets @@ -5,8 +5,8 @@ --> stable - win - linux + Windows + Linux unsupported-platform @@ -25,7 +25,7 @@ firefox - + chrome-linux chromedriver_linux64 chrome @@ -40,7 +40,7 @@ $(linux_ChromeBaseSnapshotUrl)/chromedriver_linux64.zip - + chrome-win chromedriver_win32 chrome.exe diff --git a/eng/testing/workloads-testing.targets b/eng/testing/workloads-testing.targets index d5ccce0f64322b..5b8e0abce741eb 100644 --- a/eng/testing/workloads-testing.targets +++ b/eng/testing/workloads-testing.targets @@ -190,6 +190,7 @@ LocalNuGetsPath="$(LibrariesShippingPackagesDir)" TemplateNuGetConfigPath="$(RepoRoot)NuGet.config" SdkWithNoWorkloadInstalledPath="$(_SdkWithNoWorkloadPath)" + SkipUpdateAppRefPack="true" /> diff --git a/global.json b/global.json index b4ca83d356c283..d9233ff3dc9fd9 100644 --- a/global.json +++ b/global.json @@ -1,18 +1,18 @@ { "sdk": { - "version": "8.0.100-preview.7.23376.3", + "version": "8.0.100-rc.1.23415.11", "allowPrerelease": true, "rollForward": "major" }, "tools": { - "dotnet": "8.0.100-preview.7.23376.3" + "dotnet": "8.0.100-rc.1.23415.11" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23411.1", - "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23411.1", - "Microsoft.DotNet.SharedFramework.Sdk": "8.0.0-beta.23411.1", + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23463.1", + "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23463.1", + "Microsoft.DotNet.SharedFramework.Sdk": "8.0.0-beta.23463.1", "Microsoft.Build.NoTargets": "3.7.0", "Microsoft.Build.Traversal": "3.4.0", - "Microsoft.NET.Sdk.IL": "8.0.0-rc.1.23406.6" + "Microsoft.NET.Sdk.IL": "9.0.0-alpha.1.23466.6" } } diff --git a/src/coreclr/CMakeLists.txt b/src/coreclr/CMakeLists.txt index 7946ca99b0df5f..ade1e03c92efd6 100644 --- a/src/coreclr/CMakeLists.txt +++ b/src/coreclr/CMakeLists.txt @@ -1,10 +1,5 @@ cmake_minimum_required(VERSION 3.20) -cmake_policy(SET CMP0042 NEW) # MACOSX_RPATH is enabled by default. -cmake_policy(SET CMP0066 NEW) # Honor per-config flags in try_compile() source-file signature. -cmake_policy(SET CMP0067 NEW) # Honor language standard in try_compile() source-file signature -cmake_policy(SET CMP0091 NEW) # MSVC runtime library flags are selected by an abstraction. - # Set the project name project(CoreCLR) @@ -73,8 +68,7 @@ endif() # Enable C++ EH with SEH #------------------------- if (MSVC) - string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - add_compile_options($<$:/EHa>) # enable C++ EH (w/ SEH exceptions) + set_property(DIRECTORY PROPERTY CLR_EH_OPTION /EHa) # enable C++ EH (w/ SEH exceptions) endif() #------------------------------- diff --git a/src/coreclr/System.Private.CoreLib/CompatibilitySuppressions.xml b/src/coreclr/System.Private.CoreLib/CompatibilitySuppressions.xml index 276be3a543e343..97b65a2748409e 100644 --- a/src/coreclr/System.Private.CoreLib/CompatibilitySuppressions.xml +++ b/src/coreclr/System.Private.CoreLib/CompatibilitySuppressions.xml @@ -1,45 +1,32 @@  + CP0015 M:System.Diagnostics.Tracing.EventSource.Write``1(System.String,``0):[T:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute] - ref/net8.0/System.Private.CoreLib.dll - lib/net8.0/System.Private.CoreLib.dll CP0015 M:System.Diagnostics.Tracing.EventSource.Write``1(System.String,System.Diagnostics.Tracing.EventSourceOptions@,``0@):[T:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute] - ref/net8.0/System.Private.CoreLib.dll - lib/net8.0/System.Private.CoreLib.dll CP0015 M:System.Diagnostics.Tracing.EventSource.Write``1(System.String,System.Diagnostics.Tracing.EventSourceOptions@,System.Guid@,System.Guid@,``0@):[T:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute] - ref/net8.0/System.Private.CoreLib.dll - lib/net8.0/System.Private.CoreLib.dll CP0015 M:System.Diagnostics.Tracing.EventSource.WriteEvent(System.Int32,System.Object[]):[T:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute] - ref/net8.0/System.Private.CoreLib.dll - lib/net8.0/System.Private.CoreLib.dll CP0015 M:System.Diagnostics.Tracing.EventSource.WriteEventCore(System.Int32,System.Int32,System.Diagnostics.Tracing.EventSource.EventData*):[T:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute] - ref/net8.0/System.Private.CoreLib.dll - lib/net8.0/System.Private.CoreLib.dll CP0015 M:System.Diagnostics.Tracing.EventSource.WriteEventWithRelatedActivityId(System.Int32,System.Guid,System.Object[]):[T:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute] - ref/net8.0/System.Private.CoreLib.dll - lib/net8.0/System.Private.CoreLib.dll CP0015 M:System.Diagnostics.Tracing.EventSource.WriteEventWithRelatedActivityIdCore(System.Int32,System.Guid*,System.Int32,System.Diagnostics.Tracing.EventSource.EventData*):[T:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute] - ref/net8.0/System.Private.CoreLib.dll - lib/net8.0/System.Private.CoreLib.dll \ 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 14936ccfa6479f..888f3f8b1498e0 100644 --- a/src/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj +++ b/src/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj @@ -210,6 +210,12 @@ + + + + + + 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 6d2fff235fa7d0..db8d4ead4659b9 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 @@ -201,7 +201,7 @@ private static void ClassRegistrationScenarioForType(ComActivationContext cxt, b } // Finally validate signature - ParameterInfo[] methParams = method.GetParameters(); + ReadOnlySpan methParams = method.GetParametersAsSpan(); if (method.ReturnType != typeof(void) || methParams == null || methParams.Length != 1 diff --git a/src/coreclr/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs index 9365f8ba0b8695..7fbb594a1844de 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs @@ -227,8 +227,7 @@ private static bool InternalIsDefined(EventInfo element, Type attributeType, boo } else { - ParameterInfo[] parameters = rtMethod.GetParameters(); - return parameters[position]; // Point to the correct ParameterInfo of the method + return rtMethod.GetParametersAsSpan()[position]; // Point to the correct ParameterInfo of the method } } } diff --git a/src/coreclr/System.Private.CoreLib/src/System/Delegate.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Delegate.CoreCLR.cs index 7fd8ed40d57b82..555b40216b7358 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Delegate.CoreCLR.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Delegate.CoreCLR.cs @@ -200,7 +200,7 @@ protected virtual MethodInfo GetMethodImpl() { // it's an open one, need to fetch the first arg of the instantiation MethodInfo invoke = this.GetType().GetMethod("Invoke")!; - declaringType = (RuntimeType)invoke.GetParameters()[0].ParameterType; + declaringType = (RuntimeType)invoke.GetParametersAsSpan()[0].ParameterType; } } } diff --git a/src/coreclr/System.Private.CoreLib/src/System/GC.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/GC.CoreCLR.cs index dbbb6758593b0c..e3e091bb872a2b 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/GC.CoreCLR.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/GC.CoreCLR.cs @@ -899,13 +899,10 @@ internal enum RefreshMemoryStatus /// /// This API will only handle configs that could be handled when the runtime is loaded, for example, for configs that don't have any effects on 32-bit systems (like the GCHeapHardLimit* ones), this API will not handle it. /// - /// As of now, this API is feature preview only and subject to changes as necessary. - /// /// If the hard limit is too low. This can happen if the heap hard limit that the refresh will set, either because of new AppData settings or implied by the container memory limit changes, is lower than what is already committed. /// If the hard limit is invalid. This can happen, for example, with negative heap hard limit percentages. /// /// - [RequiresPreviewFeatures("RefreshMemoryLimit is in preview.")] public static void RefreshMemoryLimit() { ulong heapHardLimit = (AppContext.GetData("GCHeapHardLimit") as ulong?) ?? ulong.MaxValue; 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 ad564aad7e3dde..81372c76ce2ec8 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 @@ -94,7 +94,7 @@ public override void Emit(OpCode opcode, MethodInfo meth) } if (opcode.StackBehaviourPop == StackBehaviour.Varpop) { - stackchange -= meth.GetParametersNoCopy().Length; + stackchange -= meth.GetParametersAsSpan().Length; } // Pop the "this" parameter if the method is non-static, // and the instruction is not newobj/ldtoken/ldftn. @@ -416,7 +416,7 @@ private int GetMemberRefToken(MethodInfo methodInfo, Type[]? optionalParameterTy if (rtMeth == null && dm == null) throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(methodInfo)); - ParameterInfo[] paramInfo = methodInfo.GetParametersNoCopy(); + ReadOnlySpan paramInfo = methodInfo.GetParametersAsSpan(); if (paramInfo != null && paramInfo.Length != 0) { parameterTypes = new Type[paramInfo.Length]; diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeModuleBuilder.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeModuleBuilder.cs index 496c24bb105ae9..4fd4bd49c88a88 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeModuleBuilder.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeModuleBuilder.cs @@ -458,7 +458,7 @@ internal SignatureHelper GetMemberRefSignature(MethodBase? method, int cGenericP } Debug.Assert(method is RuntimeMethodInfo || method is RuntimeConstructorInfo); - ParameterInfo[] parameters = method.GetParametersNoCopy(); + ReadOnlySpan parameters = method.GetParametersAsSpan(); Type[] parameterTypes = new Type[parameters.Length]; Type[][] requiredCustomModifiers = new Type[parameterTypes.Length][]; diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/MethodBase.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/MethodBase.CoreCLR.cs index e8bb0fa1814939..26383704e39277 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/MethodBase.CoreCLR.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/MethodBase.CoreCLR.cs @@ -47,7 +47,7 @@ public abstract partial class MethodBase : MemberInfo // used by EE private IntPtr GetMethodDesc() { return MethodHandle.Value; } - internal virtual ParameterInfo[] GetParametersNoCopy() { return GetParameters(); } + internal virtual ReadOnlySpan GetParametersAsSpan() { return GetParameters(); } #endregion } } diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeConstructorInfo.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeConstructorInfo.CoreCLR.cs index 500581553a3cb1..c16d10e97b38d5 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeConstructorInfo.CoreCLR.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeConstructorInfo.CoreCLR.cs @@ -180,20 +180,11 @@ public override IList GetCustomAttributesData() // This seems to always returns System.Void. internal override Type GetReturnType() { return Signature.ReturnType; } - internal override ParameterInfo[] GetParametersNoCopy() => + internal override ReadOnlySpan GetParametersAsSpan() => m_parameters ??= RuntimeParameterInfo.GetParameters(this, this, Signature); - public override ParameterInfo[] GetParameters() - { - ParameterInfo[] parameters = GetParametersNoCopy(); - - if (parameters.Length == 0) - return parameters; - - ParameterInfo[] ret = new ParameterInfo[parameters.Length]; - Array.Copy(parameters, ret, parameters.Length); - return ret; - } + public override ParameterInfo[] GetParameters() => + GetParametersAsSpan().ToArray(); public override MethodImplAttributes GetMethodImplementationFlags() { 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 ce9182cc4785bc..434f50a7370a1e 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeCustomAttributeData.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeCustomAttributeData.cs @@ -278,7 +278,7 @@ private RuntimeCustomAttributeData(RuntimeModule scope, MetadataToken caCtorToke m_ctor = (RuntimeConstructorInfo)scope.ResolveMethod(caCtorToken, attributeType.GenericTypeArguments, null)!.MethodHandle.GetMethodInfo(); } - ParameterInfo[] parameters = m_ctor.GetParametersNoCopy(); + ReadOnlySpan parameters = m_ctor.GetParametersAsSpan(); if (parameters.Length != 0) { m_ctorParams = new CustomAttributeCtorParameter[parameters.Length]; @@ -412,7 +412,7 @@ private void Init(object pca) // Ensure there is only a single constructor for 'pca', so it is safe to suppress IL2075 ConstructorInfo[] allCtors = type.GetConstructors(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); Debug.Assert(allCtors.Length == 1); - Debug.Assert(allCtors[0].GetParameters().Length == 0); + Debug.Assert(allCtors[0].GetParametersAsSpan().Length == 0); #endif m_ctor = type.GetConstructors(BindingFlags.Public | BindingFlags.Instance)[0]; diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeEventInfo.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeEventInfo.cs index 2f69ff6b0c009f..34b5f378cbdbb1 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeEventInfo.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeEventInfo.cs @@ -63,10 +63,14 @@ o is RuntimeEventInfo m && #region Object Overrides public override string ToString() { - if (m_addMethod == null || m_addMethod.GetParametersNoCopy().Length == 0) + ReadOnlySpan parameters; + if (m_addMethod == null || + (parameters = m_addMethod.GetParametersAsSpan()).Length == 0) + { throw new InvalidOperationException(SR.InvalidOperation_NoPublicAddMethod); + } - return m_addMethod.GetParametersNoCopy()[0].ParameterType.FormatTypeName() + " " + Name; + return parameters[0].ParameterType.FormatTypeName() + " " + Name; } public override bool Equals(object? obj) => diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.CoreCLR.cs index 1fd8da7fe5f66d..de60e189ac918d 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.CoreCLR.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.CoreCLR.cs @@ -240,7 +240,7 @@ public override Type? ReflectedType #endregion #region MethodBase Overrides - internal override ParameterInfo[] GetParametersNoCopy() => + internal override ReadOnlySpan GetParametersAsSpan() => FetchNonReturnParameters(); public override ParameterInfo[] GetParameters() diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimePropertyInfo.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimePropertyInfo.cs index eb83e8f410d6c8..933e05d0bf7854 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimePropertyInfo.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimePropertyInfo.cs @@ -261,23 +261,10 @@ public override MethodInfo[] GetAccessors(bool nonPublic) return m_setterMethod; } - public override ParameterInfo[] GetIndexParameters() - { - ParameterInfo[] indexParams = GetIndexParametersNoCopy(); - - int numParams = indexParams.Length; - - if (numParams == 0) - return indexParams; - - ParameterInfo[] ret = new ParameterInfo[numParams]; - - Array.Copy(indexParams, ret, numParams); - - return ret; - } + public override ParameterInfo[] GetIndexParameters() => + GetIndexParametersSpan().ToArray(); - internal ParameterInfo[] GetIndexParametersNoCopy() + internal ReadOnlySpan GetIndexParametersSpan() { // @History - Logic ported from RTM @@ -285,14 +272,14 @@ internal ParameterInfo[] GetIndexParametersNoCopy() if (m_parameters == null) { int numParams = 0; - ParameterInfo[]? methParams = null; + ReadOnlySpan methParams = default; // First try to get the Get method. RuntimeMethodInfo? m = GetGetMethod(true); if (m != null) { // There is a Get method so use it. - methParams = m.GetParametersNoCopy(); + methParams = m.GetParametersAsSpan(); numParams = methParams.Length; } else @@ -302,7 +289,7 @@ internal ParameterInfo[] GetIndexParametersNoCopy() if (m != null) { - methParams = m.GetParametersNoCopy(); + methParams = m.GetParametersAsSpan(); numParams = methParams.Length - 1; } } diff --git a/src/coreclr/System.Private.CoreLib/src/System/Runtime/ExceptionServices/AsmOffsets.cs b/src/coreclr/System.Private.CoreLib/src/System/Runtime/ExceptionServices/AsmOffsets.cs new file mode 100644 index 00000000000000..6965742ece2835 --- /dev/null +++ b/src/coreclr/System.Private.CoreLib/src/System/Runtime/ExceptionServices/AsmOffsets.cs @@ -0,0 +1,216 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +// NOTE: This file is included also during native runtime compilation by the C++ compiler for verification purposes. +// The static asserts at the end are compiled only when this file is included in native build by c++ compiler. They +// provide compile time verification that all the sizes and offsets match between the managed and native code. + +#if !__cplusplus +internal static +#endif +class AsmOffsets +{ + + // Offsets / sizes that are different in Release / Debug builds +#if DEBUG + // Debug build offsets +#if TARGET_AMD64 +#if TARGET_UNIX + public const int SIZEOF__REGDISPLAY = 0x1a90; + public const int OFFSETOF__REGDISPLAY__SP = 0x1a78; + public const int OFFSETOF__REGDISPLAY__ControlPC = 0x1a80; +#else // TARGET_UNIX + public const int SIZEOF__REGDISPLAY = 0xbf0; + public const int OFFSETOF__REGDISPLAY__SP = 0xbd8; + public const int OFFSETOF__REGDISPLAY__ControlPC = 0xbe0; +#endif // TARGET_UNIX +#elif TARGET_ARM64 + public const int SIZEOF__REGDISPLAY = 0x940; + public const int OFFSETOF__REGDISPLAY__SP = 0x898; + public const int OFFSETOF__REGDISPLAY__ControlPC = 0x8a0; +#elif TARGET_ARM + public const int SIZEOF__REGDISPLAY = 0x410; + public const int OFFSETOF__REGDISPLAY__SP = 0x3ec; + public const int OFFSETOF__REGDISPLAY__ControlPC = 0x3f0; +#elif TARGET_X86 + public const int SIZEOF__REGDISPLAY = 0x5fc; + public const int OFFSETOF__REGDISPLAY__SP = 0x5f0; + public const int OFFSETOF__REGDISPLAY__ControlPC = 0x5f4; +#elif TARGET_RISCV64 + public const int SIZEOF__REGDISPLAY = 0x6C0; + public const int OFFSETOF__REGDISPLAY__SP = 0x628; + public const int OFFSETOF__REGDISPLAY__ControlPC = 0x630; +#elif TARGET_LOONGARCH64 + public const int SIZEOF__REGDISPLAY = 0xc70; + public const int OFFSETOF__REGDISPLAY__SP = 0xbb8; + public const int OFFSETOF__REGDISPLAY__ControlPC = 0xbc0; +#endif + +#if TARGET_64BIT + public const int OFFSETOF__REGDISPLAY__m_pCurrentContext = 0x8; + public const int SIZEOF__StackFrameIterator = 0x370; + public const int OFFSETOF__StackFrameIterator__m_isRuntimeWrappedExceptions = 0x352; + public const int OFFSETOF__StackFrameIterator__m_AdjustedControlPC = 0x368; +#else // TARGET_64BIT + public const int OFFSETOF__REGDISPLAY__m_pCurrentContext = 0x4; + public const int SIZEOF__StackFrameIterator = 0x2d8; + public const int OFFSETOF__StackFrameIterator__m_isRuntimeWrappedExceptions = 0x2c2; + public const int OFFSETOF__StackFrameIterator__m_AdjustedControlPC = 0x2d0; +#endif // TARGET_64BIT + +#else // DEBUG + // Release build offsets +#if TARGET_AMD64 +#if TARGET_UNIX + public const int SIZEOF__REGDISPLAY = 0x1a80; + public const int OFFSETOF__REGDISPLAY__SP = 0x1a70; + public const int OFFSETOF__REGDISPLAY__ControlPC = 0x1a78; +#else // TARGET_UNIX + public const int SIZEOF__REGDISPLAY = 0xbe0; + public const int OFFSETOF__REGDISPLAY__SP = 0xbd0; + public const int OFFSETOF__REGDISPLAY__ControlPC = 0xbd8; +#endif // TARGET_UNIX +#elif TARGET_ARM64 + public const int SIZEOF__REGDISPLAY = 0x930; + public const int OFFSETOF__REGDISPLAY__SP = 0x890; + public const int OFFSETOF__REGDISPLAY__ControlPC = 0x898; +#elif TARGET_ARM + public const int SIZEOF__REGDISPLAY = 0x408; + public const int OFFSETOF__REGDISPLAY__SP = 0x3e8; + public const int OFFSETOF__REGDISPLAY__ControlPC = 0x3ec; +#elif TARGET_X86 + public const int SIZEOF__REGDISPLAY = 0x5f8; + public const int OFFSETOF__REGDISPLAY__SP = 0x5ec; + public const int OFFSETOF__REGDISPLAY__ControlPC = 0x5f0; +#elif TARGET_RISCV64 + public const int SIZEOF__REGDISPLAY = 0x6B0; + public const int OFFSETOF__REGDISPLAY__SP = 0x620; + public const int OFFSETOF__REGDISPLAY__ControlPC = 0x628; +#elif TARGET_LOONGARCH64 + public const int SIZEOF__REGDISPLAY = 0xc60; + public const int OFFSETOF__REGDISPLAY__SP = 0xbb0; + public const int OFFSETOF__REGDISPLAY__ControlPC = 0xbb8; +#endif + +#if TARGET_64BIT + public const int OFFSETOF__REGDISPLAY__m_pCurrentContext = 0x8; + public const int SIZEOF__StackFrameIterator = 0x370; + public const int OFFSETOF__StackFrameIterator__m_isRuntimeWrappedExceptions = 0x34a; + public const int OFFSETOF__StackFrameIterator__m_AdjustedControlPC = 0x360; +#else // TARGET_64BIT + public const int OFFSETOF__REGDISPLAY__m_pCurrentContext = 0x4; + public const int SIZEOF__StackFrameIterator = 0x2d0; + public const int OFFSETOF__StackFrameIterator__m_isRuntimeWrappedExceptions = 0x2ba; + public const int OFFSETOF__StackFrameIterator__m_AdjustedControlPC = 0x2c8; +#endif // TARGET_64BIT + +#endif // DEBUG + +#if TARGET_AMD64 +#if TARGET_UNIX + public const int SIZEOF__PAL_LIMITED_CONTEXT = 0xc20; +#else // TARGET_UNIX + public const int SIZEOF__PAL_LIMITED_CONTEXT = 0x4d0; +#endif // TARGET_UNIx +#elif TARGET_ARM64 + public const int SIZEOF__PAL_LIMITED_CONTEXT = 0x390; +#elif TARGET_ARM + public const int SIZEOF__PAL_LIMITED_CONTEXT = 0x1a0; +#elif TARGET_X86 + public const int SIZEOF__PAL_LIMITED_CONTEXT = 0x2cc; +#elif TARGET_RISCV64 + public const int SIZEOF__PAL_LIMITED_CONTEXT = 0x220; +#elif TARGET_LOONGARCH64 + public const int SIZEOF__PAL_LIMITED_CONTEXT = 0x520; +#endif + +#if TARGET_AMD64 + public const int OFFSETOF__PAL_LIMITED_CONTEXT__IP = 0xf8; + public const int OFFSETOF__PAL_LIMITED_CONTEXT__FP = 0xa0; +#elif TARGET_ARM64 + public const int OFFSETOF__PAL_LIMITED_CONTEXT__IP = 0x108; + public const int OFFSETOF__PAL_LIMITED_CONTEXT__FP = 0xf0; +#elif TARGET_ARM + public const int OFFSETOF__PAL_LIMITED_CONTEXT__IP = 0x40; + public const int OFFSETOF__PAL_LIMITED_CONTEXT__FP = 0x30; +#elif TARGET_X86 + public const int OFFSETOF__PAL_LIMITED_CONTEXT__IP = 0xb8; + public const int OFFSETOF__PAL_LIMITED_CONTEXT__FP = 0xb4; +#elif TARGET_RISCV64 + public const int OFFSETOF__PAL_LIMITED_CONTEXT__IP = 0x108; + public const int OFFSETOF__PAL_LIMITED_CONTEXT__FP = 0x48; +#elif TARGET_LOONGARCH64 + public const int OFFSETOF__PAL_LIMITED_CONTEXT__IP = 0x108; + public const int OFFSETOF__PAL_LIMITED_CONTEXT__FP = 0xb8; +#endif + + // Offsets / sizes that are different in 64 / 32 bit mode + +#if TARGET_64BIT + public const int SIZEOF__EHEnum = 0x20; + public const int OFFSETOF__StackFrameIterator__m_pRegDisplay = 0x228; + public const int OFFSETOF__ExInfo__m_pPrevExInfo = 0; + public const int OFFSETOF__ExInfo__m_pExContext = 8; + public const int OFFSETOF__ExInfo__m_exception = 0x10; + public const int OFFSETOF__ExInfo__m_kind = 0x18; + public const int OFFSETOF__ExInfo__m_passNumber = 0x19; + public const int OFFSETOF__ExInfo__m_idxCurClause = 0x1c; + public const int OFFSETOF__ExInfo__m_frameIter = 0x20; + public const int OFFSETOF__ExInfo__m_notifyDebuggerSP = OFFSETOF__ExInfo__m_frameIter + SIZEOF__StackFrameIterator; +#else // TARGET_64BIT + public const int SIZEOF__EHEnum = 0x10; + public const int OFFSETOF__StackFrameIterator__m_pRegDisplay = 0x218; + public const int OFFSETOF__ExInfo__m_pPrevExInfo = 0; + public const int OFFSETOF__ExInfo__m_pExContext = 4; + public const int OFFSETOF__ExInfo__m_exception = 8; + public const int OFFSETOF__ExInfo__m_kind = 0xC; + public const int OFFSETOF__ExInfo__m_passNumber = 0xD; + public const int OFFSETOF__ExInfo__m_idxCurClause = 0x10; + public const int OFFSETOF__ExInfo__m_frameIter = 0x18; + public const int OFFSETOF__ExInfo__m_notifyDebuggerSP = OFFSETOF__ExInfo__m_frameIter + SIZEOF__StackFrameIterator; +#endif // TARGET_64BIT + +#if __cplusplus + static_assert_no_msg(sizeof(CONTEXT) == AsmOffsets::SIZEOF__PAL_LIMITED_CONTEXT); +#if TARGET_AMD64 + static_assert_no_msg(offsetof(CONTEXT, Rip) == AsmOffsets::OFFSETOF__PAL_LIMITED_CONTEXT__IP); + static_assert_no_msg(offsetof(CONTEXT, Rbp) == AsmOffsets::OFFSETOF__PAL_LIMITED_CONTEXT__FP); +#elif TARGET_ARM64 + static_assert_no_msg(offsetof(CONTEXT, Pc) == AsmOffsets::OFFSETOF__PAL_LIMITED_CONTEXT__IP); + static_assert_no_msg(offsetof(CONTEXT, Fp) == AsmOffsets::OFFSETOF__PAL_LIMITED_CONTEXT__FP); +#elif TARGET_ARM + static_assert_no_msg(offsetof(CONTEXT, Pc) == AsmOffsets::OFFSETOF__PAL_LIMITED_CONTEXT__IP); + static_assert_no_msg(offsetof(CONTEXT, R11) == AsmOffsets::OFFSETOF__PAL_LIMITED_CONTEXT__FP); +#elif TARGET_X86 + static_assert_no_msg(offsetof(CONTEXT, Eip) == AsmOffsets::OFFSETOF__PAL_LIMITED_CONTEXT__IP); + static_assert_no_msg(offsetof(CONTEXT, Ebp) == AsmOffsets::OFFSETOF__PAL_LIMITED_CONTEXT__FP); +#elif TARGET_RISCV64 + static_assert_no_msg(offsetof(CONTEXT, Pc) == AsmOffsets::OFFSETOF__PAL_LIMITED_CONTEXT__IP); + static_assert_no_msg(offsetof(CONTEXT, Fp) == AsmOffsets::OFFSETOF__PAL_LIMITED_CONTEXT__FP); +#elif TARGET_LOONGARCH64 + static_assert_no_msg(offsetof(CONTEXT, Pc) == AsmOffsets::OFFSETOF__PAL_LIMITED_CONTEXT__IP); + static_assert_no_msg(offsetof(CONTEXT, Fp) == AsmOffsets::OFFSETOF__PAL_LIMITED_CONTEXT__FP); +#endif + static_assert_no_msg(sizeof(REGDISPLAY) == AsmOffsets::SIZEOF__REGDISPLAY); + static_assert_no_msg(offsetof(REGDISPLAY, SP) == AsmOffsets::OFFSETOF__REGDISPLAY__SP); + static_assert_no_msg(offsetof(REGDISPLAY, ControlPC) == AsmOffsets::OFFSETOF__REGDISPLAY__ControlPC); + static_assert_no_msg(offsetof(REGDISPLAY, pCurrentContext) == AsmOffsets::OFFSETOF__REGDISPLAY__m_pCurrentContext); + static_assert_no_msg(sizeof(StackFrameIterator) == AsmOffsets::SIZEOF__StackFrameIterator); + static_assert_no_msg(offsetof(StackFrameIterator, m_crawl) + offsetof(CrawlFrame, pRD) == OFFSETOF__StackFrameIterator__m_pRegDisplay); + static_assert_no_msg(offsetof(StackFrameIterator, m_isRuntimeWrappedExceptions) == OFFSETOF__StackFrameIterator__m_isRuntimeWrappedExceptions); + static_assert_no_msg(offsetof(StackFrameIterator, m_AdjustedControlPC) == OFFSETOF__StackFrameIterator__m_AdjustedControlPC); + static_assert_no_msg(sizeof(ExtendedEHClauseEnumerator) == AsmOffsets::SIZEOF__EHEnum); + static_assert_no_msg(offsetof(ExInfo, m_pPrevExInfo) == OFFSETOF__ExInfo__m_pPrevExInfo); + static_assert_no_msg(offsetof(ExInfo, m_pExContext) == OFFSETOF__ExInfo__m_pExContext); + static_assert_no_msg(offsetof(ExInfo, m_exception) == OFFSETOF__ExInfo__m_exception); + static_assert_no_msg(offsetof(ExInfo, m_kind) == OFFSETOF__ExInfo__m_kind); + static_assert_no_msg(offsetof(ExInfo, m_passNumber) == OFFSETOF__ExInfo__m_passNumber); + static_assert_no_msg(offsetof(ExInfo, m_idxCurClause) == OFFSETOF__ExInfo__m_idxCurClause); + static_assert_no_msg(offsetof(ExInfo, m_frameIter) == OFFSETOF__ExInfo__m_frameIter); + static_assert_no_msg(offsetof(ExInfo, m_notifyDebuggerSP) == OFFSETOF__ExInfo__m_notifyDebuggerSP); +#endif + +} +#if __cplusplus +; +#endif diff --git a/src/coreclr/System.Private.CoreLib/src/System/Runtime/ExceptionServices/InternalCalls.cs b/src/coreclr/System.Private.CoreLib/src/System/Runtime/ExceptionServices/InternalCalls.cs new file mode 100644 index 00000000000000..563c5b3704119a --- /dev/null +++ b/src/coreclr/System.Private.CoreLib/src/System/Runtime/ExceptionServices/InternalCalls.cs @@ -0,0 +1,48 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +// +// This is where we group together all the internal calls. +// + +using System.Runtime.InteropServices; +using System.Runtime.CompilerServices; + +namespace System.Runtime.ExceptionServices +{ + internal static partial class InternalCalls + { + [LibraryImport(RuntimeHelpers.QCall, EntryPoint = "SfiInit")] + [return: MarshalAs(UnmanagedType.Bool)] + internal static unsafe partial bool RhpSfiInit(ref StackFrameIterator pThis, void* pStackwalkCtx, [MarshalAs(UnmanagedType.Bool)] bool instructionFault); + + [LibraryImport(RuntimeHelpers.QCall, EntryPoint = "SfiNext")] + [return: MarshalAs(UnmanagedType.Bool)] + internal static unsafe partial bool RhpSfiNext(ref StackFrameIterator pThis, uint* uExCollideClauseIdx, bool* fUnwoundReversePInvoke); + +#pragma warning disable CS8500 + [LibraryImport(RuntimeHelpers.QCall, EntryPoint = "CallCatchFunclet")] + internal static unsafe partial IntPtr RhpCallCatchFunclet( + ObjectHandleOnStack exceptionObj, byte* pHandlerIP, void* pvRegDisplay, EH.ExInfo* exInfo); + + [LibraryImport(RuntimeHelpers.QCall, EntryPoint = "CallFinallyFunclet")] + internal static unsafe partial void RhpCallFinallyFunclet(byte* pHandlerIP, void* pvRegDisplay, EH.ExInfo* exInfo); + + [LibraryImport(RuntimeHelpers.QCall, EntryPoint = "CallFilterFunclet")] + [return: MarshalAs(UnmanagedType.Bool)] + internal static unsafe partial bool RhpCallFilterFunclet( + ObjectHandleOnStack exceptionObj, byte* pFilterIP, void* pvRegDisplay); + + [LibraryImport(RuntimeHelpers.QCall, EntryPoint = "AppendExceptionStackFrame")] + internal static unsafe partial void RhpAppendExceptionStackFrame(ObjectHandleOnStack exceptionObj, IntPtr ip, UIntPtr sp, int flags, EH.ExInfo* exInfo); +#pragma warning restore CS8500 + + [LibraryImport(RuntimeHelpers.QCall, EntryPoint = "EHEnumInitFromStackFrameIterator")] + [return: MarshalAs(UnmanagedType.Bool)] + internal static unsafe partial bool RhpEHEnumInitFromStackFrameIterator(ref StackFrameIterator pFrameIter, byte** pMethodStartAddress, void* pEHEnum); + + [LibraryImport(RuntimeHelpers.QCall, EntryPoint = "EHEnumNext")] + [return: MarshalAs(UnmanagedType.Bool)] + internal static unsafe partial bool RhpEHEnumNext(void* pEHEnum, void* pEHClause); + } +} diff --git a/src/coreclr/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs index 959489be1c7bb7..e7e8b2508a8518 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs @@ -2290,7 +2290,7 @@ private static bool FilterApplyMethodBase( // Check if argumentTypes supplied if (argumentTypes != null) { - ParameterInfo[] parameterInfos = methodBase.GetParametersNoCopy(); + ReadOnlySpan parameterInfos = methodBase.GetParametersAsSpan(); if (argumentTypes.Length != parameterInfos.Length) { @@ -2848,8 +2848,7 @@ public override InterfaceMapping GetInterfaceMap([DynamicallyAccessedMembers(Dyn { ConstructorInfo firstCandidate = candidates[0]; - ParameterInfo[] parameters = firstCandidate.GetParametersNoCopy(); - if (parameters == null || parameters.Length == 0) + if (firstCandidate.GetParametersAsSpan().IsEmpty) { return firstCandidate; } @@ -3817,7 +3816,7 @@ private void CreateInstanceCheckThis() throw new MissingMethodException(SR.Format(SR.MissingConstructor_Name, FullName)); } - if (invokeMethod.GetParametersNoCopy().Length == 0) + if (invokeMethod.GetParametersAsSpan().Length == 0) { if (args.Length != 0) { diff --git a/src/coreclr/System.Private.CoreLib/src/System/Threading/Thread.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Threading/Thread.CoreCLR.cs index c643a566d10bd6..889bb0d492c746 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Threading/Thread.CoreCLR.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Threading/Thread.CoreCLR.cs @@ -60,11 +60,10 @@ public sealed partial class Thread private Thread() { } - public extern int ManagedThreadId + public int ManagedThreadId { [Intrinsic] - [MethodImpl(MethodImplOptions.InternalCall)] - get; + get => _managedThreadId; } /// Returns handle for interop with EE. The handle is guaranteed to be non-null. diff --git a/src/coreclr/binder/bindertracing.cpp b/src/coreclr/binder/bindertracing.cpp index 90e010e23e76f2..82b31932bd030c 100644 --- a/src/coreclr/binder/bindertracing.cpp +++ b/src/coreclr/binder/bindertracing.cpp @@ -119,8 +119,8 @@ namespace BinderTracing { static thread_local bool t_AssemblyLoadStartInProgress = false; - AssemblyBindOperation::AssemblyBindOperation(AssemblySpec *assemblySpec, const SString& assemblyPath) - : m_bindRequest { assemblySpec, SString::Empty(), assemblyPath } + AssemblyBindOperation::AssemblyBindOperation(AssemblySpec *assemblySpec, const WCHAR* assemblyPath) + : m_bindRequest { assemblySpec, SString{ SString::Empty() }, SString{ assemblyPath } } , m_populatedBindRequest { false } , m_checkedIgnoreBind { false } , m_ignoreBind { false } @@ -217,7 +217,13 @@ namespace BinderTracing // Use the error message that would be reported in the file load exception StackSString errorMsg; if (mvidMismatch) - errorMsg.LoadResource(CCompRC::Error, IDS_HOST_ASSEMBLY_RESOLVER_ASSEMBLY_ALREADY_LOADED_IN_CONTEXT); + { + StackSString format; + format.LoadResource(CCompRC::Error, IDS_EE_FILELOAD_ERROR_GENERIC); + StackSString details; + details.LoadResource(CCompRC::Error, IDS_HOST_ASSEMBLY_RESOLVER_ASSEMBLY_ALREADY_LOADED_IN_CONTEXT); + errorMsg.FormatMessage(FORMAT_MESSAGE_FROM_STRING, format.GetUnicode(), 0, 0, m_assemblyName, details); + } const BindResult::AttemptResult *inContextAttempt = bindResult.GetAttempt(true /*foundInContext*/); const BindResult::AttemptResult *appAssembliesAttempt = bindResult.GetAttempt(false /*foundInContext*/); diff --git a/src/coreclr/binder/customassemblybinder.cpp b/src/coreclr/binder/customassemblybinder.cpp index 02a8d2e918dc79..ac1cf61bcf6a2e 100644 --- a/src/coreclr/binder/customassemblybinder.cpp +++ b/src/coreclr/binder/customassemblybinder.cpp @@ -119,7 +119,7 @@ HRESULT CustomAssemblyBinder::BindUsingPEImage( /* in */ PEImage *pPEImage, // Validate architecture if (!AssemblyBinderCommon::IsValidArchitecture(pAssemblyName->GetArchitecture())) { - IF_FAIL_GO(HRESULT_FROM_WIN32(ERROR_BAD_FORMAT)); + IF_FAIL_GO(CLR_E_BIND_ARCHITECTURE_MISMATCH); } // Disallow attempt to bind to the core library. Aside from that, diff --git a/src/coreclr/binder/defaultassemblybinder.cpp b/src/coreclr/binder/defaultassemblybinder.cpp index 2461ca4b1397d6..d4ad4f3265ce8b 100644 --- a/src/coreclr/binder/defaultassemblybinder.cpp +++ b/src/coreclr/binder/defaultassemblybinder.cpp @@ -128,7 +128,7 @@ HRESULT DefaultAssemblyBinder::BindUsingPEImage( /* in */ PEImage *pPEImage, // Validate architecture if (!AssemblyBinderCommon::IsValidArchitecture(pAssemblyName->GetArchitecture())) { - IF_FAIL_GO(HRESULT_FROM_WIN32(ERROR_BAD_FORMAT)); + IF_FAIL_GO(CLR_E_BIND_ARCHITECTURE_MISMATCH); } // Easy out for CoreLib diff --git a/src/coreclr/binder/inc/bindertracing.h b/src/coreclr/binder/inc/bindertracing.h index 0d5e0b670b1158..d4442086ffcfc7 100644 --- a/src/coreclr/binder/inc/bindertracing.h +++ b/src/coreclr/binder/inc/bindertracing.h @@ -27,7 +27,7 @@ namespace BinderTracing { public: // This class assumes the assembly spec will have a longer lifetime than itself - AssemblyBindOperation(AssemblySpec *assemblySpec, const SString& assemblyPath = SString::Empty()); + AssemblyBindOperation(AssemblySpec *assemblySpec, const WCHAR* assemblyPath = NULL); ~AssemblyBindOperation(); void SetResult(PEAssembly *assembly, bool cached = false); diff --git a/src/coreclr/build-runtime.cmd b/src/coreclr/build-runtime.cmd index ec6887c78d84cb..52910be7f1da29 100644 --- a/src/coreclr/build-runtime.cmd +++ b/src/coreclr/build-runtime.cmd @@ -142,7 +142,7 @@ if /i "%1" == "-ninja" (shift&goto Arg_Loop) if /i "%1" == "-msbuild" (set __Ninja=0&shift&goto Arg_Loop) if /i "%1" == "-pgoinstrument" (set __PgoInstrument=1&shift&goto Arg_Loop) if /i "%1" == "-enforcepgo" (set __EnforcePgo=1&shift&goto Arg_Loop) -if /i "%1" == "-pgodatapath" (set __PgoOptDataPath=%2&set __PgoOptimize=1&shift&shift&goto Arg_Loop) +if /i "%1" == "-pgodatapath" (set __PgoOptDataPath=%~2&set __PgoOptimize=1&shift&shift&goto Arg_Loop) if /i "%1" == "-component" (set __RequestedBuildComponents=%__RequestedBuildComponents%-%2&set "__remainingArgs=!__remainingArgs:*%2=!"&shift&shift&goto Arg_Loop) if /i "%1" == "-fsanitize" (set __CMakeArgs=%__CMakeArgs% "-DCLR_CMAKE_ENABLE_SANITIZERS=%2"&shift&shift&goto Arg_Loop) @@ -428,6 +428,10 @@ if %__BuildNative% EQU 1 ( goto ExitWithCode ) + @REM Temporarily disabling PGO until updated files with new linker flag are available. + @REM https://github.com/dotnet/runtime/pull/89311 + GOTO :SkipNativeBuild + if %__EnforcePgo% EQU 1 ( set PgoCheckCmd="!PYTHON!" "!__ProjectDir!\scripts\pgocheck.py" "!__BinDir!\coreclr.dll" "!__BinDir!\clrjit.dll" echo !PgoCheckCmd! diff --git a/src/coreclr/classlibnative/bcltype/arraynative.cpp b/src/coreclr/classlibnative/bcltype/arraynative.cpp index 80298fd13650c1..6faf613c3cf063 100644 --- a/src/coreclr/classlibnative/bcltype/arraynative.cpp +++ b/src/coreclr/classlibnative/bcltype/arraynative.cpp @@ -809,7 +809,7 @@ FCIMPL4(Object*, ArrayNative::CreateInstance, ReflectClassBaseObject* pElementTy // Find the Array class... TypeHandle typeHnd = ClassLoader::LoadArrayTypeThrowing(elementType, kind, rank); - _ASSERTE(rank < MAX_RANK); // Ensures that the stack buffer size allocations below won't overlow + _ASSERTE(rank <= MAX_RANK); // Ensures that the stack buffer size allocations below won't overflow DWORD boundsSize = 0; INT32* bounds; diff --git a/src/coreclr/clr.featuredefines.props b/src/coreclr/clr.featuredefines.props index 1bc919b6dc9c8a..0ccfc347d0a0eb 100644 --- a/src/coreclr/clr.featuredefines.props +++ b/src/coreclr/clr.featuredefines.props @@ -40,6 +40,10 @@ true + + true + + $(DefineConstants);FEATURE_ARRAYSTUB_AS_IL $(DefineConstants);FEATURE_MULTICASTSTUB_AS_IL @@ -59,6 +63,7 @@ $(DefineConstants);FEATURE_BASICFREEZE $(DefineConstants);FEATURE_PORTABLE_SHUFFLE_THUNKS $(DefineConstants);FEATURE_ICASTABLE + $(DefineConstants);FEATURE_EH_FUNCLETS $(DefineConstants);PROFILING_SUPPORTED $(DefineConstants);FEATURE_PROFAPI_ATTACH_DETACH diff --git a/src/coreclr/clrdefinitions.cmake b/src/coreclr/clrdefinitions.cmake index 00e6673561eb2e..68212501b6e5b2 100644 --- a/src/coreclr/clrdefinitions.cmake +++ b/src/coreclr/clrdefinitions.cmake @@ -54,10 +54,10 @@ if(CLR_CMAKE_HOST_WIN32) endif(CLR_CMAKE_HOST_WIN32) if (NOT (CLR_CMAKE_TARGET_ARCH_I386 AND CLR_CMAKE_TARGET_UNIX)) - add_compile_definitions(EnC_SUPPORTED) + add_compile_definitions(FEATURE_METADATA_UPDATER) endif() if(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_ARM64 OR (CLR_CMAKE_TARGET_ARCH_I386 AND CLR_CMAKE_TARGET_WIN32)) - add_compile_definitions(FEATURE_ENC_SUPPORTED) + add_compile_definitions(FEATURE_REMAP_FUNCTION) endif(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_ARM64 OR (CLR_CMAKE_TARGET_ARCH_I386 AND CLR_CMAKE_TARGET_WIN32)) if(CLR_CMAKE_TARGET_WIN32 AND CLR_CMAKE_TARGET_ARCH_AMD64) diff --git a/src/coreclr/debug/createdump/crashinfo.cpp b/src/coreclr/debug/createdump/crashinfo.cpp index ef903767ba0279..8af6ec4a54f5bd 100644 --- a/src/coreclr/debug/createdump/crashinfo.cpp +++ b/src/coreclr/debug/createdump/crashinfo.cpp @@ -195,7 +195,7 @@ CrashInfo::GatherCrashInfo(DumpType dumpType) return false; } // Add the special (fake) memory region for the special diagnostics info - MemoryRegion special(PF_R, SpecialDiagInfoAddress, SpecialDiagInfoAddress + PAGE_SIZE); + MemoryRegion special(PF_R, SpecialDiagInfoAddress, SpecialDiagInfoAddress + SpecialDiagInfoSize); m_memoryRegions.insert(special); #ifdef __APPLE__ InitializeOtherMappings(); diff --git a/src/coreclr/debug/createdump/createdump.h b/src/coreclr/debug/createdump/createdump.h index 50cf53dccfc7aa..4095a5693794af 100644 --- a/src/coreclr/debug/createdump/createdump.h +++ b/src/coreclr/debug/createdump/createdump.h @@ -33,8 +33,6 @@ extern void trace_verbose_printf(const char* format, ...); #endif #include -#include -#include #include #include #include @@ -84,6 +82,7 @@ typedef int T_CONTEXT; #define __STDC_FORMAT_MACROS #include #else +#include #include #endif #include diff --git a/src/coreclr/debug/createdump/specialdiaginfo.h b/src/coreclr/debug/createdump/specialdiaginfo.h index 3a04a9f551e6d7..a857129c9c91ff 100644 --- a/src/coreclr/debug/createdump/specialdiaginfo.h +++ b/src/coreclr/debug/createdump/specialdiaginfo.h @@ -24,6 +24,8 @@ const uint64_t SpecialDiagInfoAddress = 0x7fff1000; #endif #endif +const uint64_t SpecialDiagInfoSize = 0x1000; + struct SpecialDiagInfoHeader { char Signature[16]; diff --git a/src/coreclr/debug/daccess/daccess.cpp b/src/coreclr/debug/daccess/daccess.cpp index 2ff45fd348e30a..5793c63b9b8908 100644 --- a/src/coreclr/debug/daccess/daccess.cpp +++ b/src/coreclr/debug/daccess/daccess.cpp @@ -7978,10 +7978,15 @@ void DacStackReferenceWalker::GCEnumCallback(LPVOID hCallback, OBJECTREF *pObjec { CORDB_ADDRESS fixed_obj = 0; HRESULT hr = dsc->pWalker->mHeap.ListNearObjects((CORDB_ADDRESS)obj, NULL, &fixed_obj, NULL); + + // Interior pointers need not lie on the manage heap at all. When this happens, ListNearObjects + // will return E_FAIL. In this case, we need to be sure to not include this stack slot in our + // enumeration because ICorDebug expects every location enumerated by this API to point to a + // valid object. + if (FAILED(hr)) + return; - // If we failed...oh well, SOS won't mind. We'll just report the interior pointer as is. - if (SUCCEEDED(hr)) - obj = TO_TADDR(fixed_obj); + obj = TO_TADDR(fixed_obj); } // Report the object and where it was found. diff --git a/src/coreclr/debug/daccess/dacdbiimpl.cpp b/src/coreclr/debug/daccess/dacdbiimpl.cpp index 67d5b1e60d948c..759c6998bb436f 100644 --- a/src/coreclr/debug/daccess/dacdbiimpl.cpp +++ b/src/coreclr/debug/daccess/dacdbiimpl.cpp @@ -725,7 +725,7 @@ void DacDbiInterfaceImpl::GetCompilerFlags ( bool DacDbiInterfaceImpl::CanSetEnCBits(Module * pModule) { _ASSERTE(pModule != NULL); -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER // If we're using explicit sequence points (from the PDB), then we can't do EnC // because EnC won't get updated pdbs and so the sequence points will be wrong. bool fIgnorePdbs = ((pModule->GetDebuggerInfoBits() & DACF_IGNORE_PDBS) != 0); @@ -736,7 +736,7 @@ bool DacDbiInterfaceImpl::CanSetEnCBits(Module * pModule) !CORProfilerPresent() && // this queries target #endif fIgnorePdbs; -#else // ! EnC_SUPPORTED +#else // ! FEATURE_METADATA_UPDATER // Enc not supported on any other platforms. bool fAllowEnc = false; #endif @@ -1517,7 +1517,7 @@ unsigned int DacDbiInterfaceImpl::GetTotalFieldCount(TypeHandle thApprox) unsigned int IFCount = pMT->GetNumIntroducedInstanceFields(); unsigned int SFCount = pMT->GetNumStaticFields(); -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER PTR_Module pModule = pMT->GetModule(); // Stats above don't include EnC fields. So add them now. @@ -1612,7 +1612,7 @@ void DacDbiInterfaceImpl::ComputeFieldData(PTR_FieldDesc pFD, { pCurrentFieldData->Initialize(pFD->IsStatic(), pFD->IsPrimitive(), pFD->GetMemberDef()); -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER // If the field was newly introduced via EnC, and hasn't yet // been fixed up, then we'll send back a marker indicating // that it isn't yet available. @@ -1627,7 +1627,7 @@ void DacDbiInterfaceImpl::ComputeFieldData(PTR_FieldDesc pFD, pCurrentFieldData->m_fFldIsCollectibleStatic = FALSE; } else -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER { // Otherwise, we'll compute the info & send it back. pCurrentFieldData->m_fFldStorageAvailable = TRUE; @@ -3934,7 +3934,7 @@ FieldDesc * DacDbiInterfaceImpl::GetEnCFieldDesc(const EnCHangingFieldInfo * pEn //----------------------------------------------------------------------------- PTR_CBYTE DacDbiInterfaceImpl::GetPtrToEnCField(FieldDesc * pFD, const EnCHangingFieldInfo * pEnCFieldInfo) { -#ifndef EnC_SUPPORTED +#ifndef FEATURE_METADATA_UPDATER _ASSERTE(!"Trying to get the address of an EnC field where EnC is not supported! "); return NULL; #else @@ -3971,7 +3971,7 @@ PTR_CBYTE DacDbiInterfaceImpl::GetPtrToEnCField(FieldDesc * pFD, const EnCHangin ThrowHR(CORDBG_E_ENC_HANGING_FIELD); } return pORField; -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER } // DacDbiInterfaceImpl::GetPtrToEnCField //----------------------------------------------------------------------------- @@ -4047,11 +4047,11 @@ void DacDbiInterfaceImpl::GetEnCHangingFieldInfo(const EnCHangingFieldInfo * pEn _ASSERTE(pFD->IsEnCNew()); // We shouldn't be here if it wasn't added to an // already loaded class. -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER pORField = GetPtrToEnCField(pFD, pEnCFieldInfo); #else _ASSERTE(!"We shouldn't be here: EnC not supported"); -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER InitFieldData(pFD, pORField, pEnCFieldInfo, pFieldData); *pfStatic = (pFD->IsStatic() != 0); @@ -4237,7 +4237,7 @@ HRESULT DacDbiInterfaceImpl::IsModuleMapped(VMPTR_Module pModule, OUT BOOL *isMo bool DacDbiInterfaceImpl::MetadataUpdatesApplied() { DD_ENTER_MAY_THROW; -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER return g_metadataUpdatesApplied; #else return false; @@ -7424,7 +7424,7 @@ HRESULT DacDbiInterfaceImpl::AreOptimizationsDisabled(VMPTR_Module vmModule, mdM #else pOptimizationsDisabled->SetDacTargetPtr(0); #endif - + return S_OK; } @@ -7612,9 +7612,6 @@ UINT32 DacRefWalker::GetHandleWalkerMask() if (mHandleMask & CorHandleStrongDependent) result |= (1 << HNDTYPE_DEPENDENT); - if (mHandleMask & CorHandleStrongAsyncPinned) - result |= (1 << HNDTYPE_ASYNCPINNED); - if (mHandleMask & CorHandleStrongSizedByref) result |= (1 << HNDTYPE_SIZEDREF); @@ -7754,10 +7751,6 @@ HRESULT DacHandleWalker::Next(ULONG count, DacGcReference roots[], ULONG *pFetch roots[i].i64ExtraData = GetDependentHandleSecondary(CLRDATA_ADDRESS_TO_TADDR(handle.Handle)).GetAddr(); break; - case HNDTYPE_ASYNCPINNED: - roots[i].dwType = (DWORD)CorHandleStrongAsyncPinned; - break; - case HNDTYPE_SIZEDREF: roots[i].dwType = (DWORD)CorHandleStrongSizedByref; break; @@ -7788,8 +7781,9 @@ HRESULT DacStackReferenceWalker::Next(ULONG count, DacGcReference stackRefs[], U stackRefs[i].i64ExtraData = 0; const SOSStackRefData &sosStackRef = mList.Get(i); - if (sosStackRef.Flags & GC_CALL_INTERIOR) + if (sosStackRef.Flags & GC_CALL_INTERIOR || sosStackRef.Address == 0) { + // Direct pointer case - interior pointer, Frame ref, or enregistered var. stackRefs[i].pObject = CLRDATA_ADDRESS_TO_TADDR(sosStackRef.Object) | 1; } else diff --git a/src/coreclr/debug/daccess/dacdbiimplstackwalk.cpp b/src/coreclr/debug/daccess/dacdbiimplstackwalk.cpp index b3766d11be350a..8a705996d3e828 100644 --- a/src/coreclr/debug/daccess/dacdbiimplstackwalk.cpp +++ b/src/coreclr/debug/daccess/dacdbiimplstackwalk.cpp @@ -261,6 +261,22 @@ BOOL DacDbiInterfaceImpl::UnwindStackWalkFrame(StackWalkHandle pSFIHandle) // Just continue onto the next managed stack frame. continue; } +#ifdef FEATURE_EH_FUNCLETS + else if (g_isNewExceptionHandlingEnabled && pIter->GetFrameState() == StackFrameIterator::SFITER_FRAMELESS_METHOD) + { + // Skip the new exception handling managed code, the debugger clients are not supposed to see them + MethodDesc *pMD = pIter->m_crawl.GetFunction(); + PTR_MethodDesc ptrMD = dac_cast(pMD); + + // EH.DispatchEx, EH.RhThrowEx, EH.RhThrowHwEx + if (ptrMD->GetMethodTable() == g_pEHClass) + { + continue; + } + + fIsAtEndOfStack = FALSE; + } +#endif // FEATURE_EH_FUNCLETS else { fIsAtEndOfStack = FALSE; @@ -433,6 +449,20 @@ ULONG32 DacDbiInterfaceImpl::GetCountOfInternalFrames(VMPTR_Thread vmThread) ULONG32 uCount = 0; while (pFrame != FRAME_TOP) { +#ifdef FEATURE_EH_FUNCLETS + if (g_isNewExceptionHandlingEnabled && InlinedCallFrame::FrameHasActiveCall(pFrame)) + { + // Skip new exception handling helpers + InlinedCallFrame *pInlinedCallFrame = (InlinedCallFrame *)pFrame; + PTR_NDirectMethodDesc pMD = pInlinedCallFrame->m_Datum; + TADDR datum = dac_cast(pMD); + if ((datum & (TADDR)InlinedCallFrameMarker::Mask) == (TADDR)InlinedCallFrameMarker::ExceptionHandlingHelper) + { + pFrame = pFrame->Next(); + continue; + } + } +#endif // FEATURE_EH_FUNCLETS CorDebugInternalFrameType ift = GetInternalFrameType(pFrame); if (ift != STUBFRAME_NONE) { @@ -472,6 +502,20 @@ void DacDbiInterfaceImpl::EnumerateInternalFrames(VMPTR_Thread while (pFrame != FRAME_TOP) { +#ifdef FEATURE_EH_FUNCLETS + if (g_isNewExceptionHandlingEnabled && InlinedCallFrame::FrameHasActiveCall(pFrame)) + { + // Skip new exception handling helpers + InlinedCallFrame *pInlinedCallFrame = (InlinedCallFrame *)pFrame; + PTR_NDirectMethodDesc pMD = pInlinedCallFrame->m_Datum; + TADDR datum = dac_cast(pMD); + if ((datum & (TADDR)InlinedCallFrameMarker::Mask) == (TADDR)InlinedCallFrameMarker::ExceptionHandlingHelper) + { + pFrame = pFrame->Next(); + continue; + } + } +#endif // FEATURE_EH_FUNCLETS // check if the internal frame is interesting frameData.stubFrame.frameType = GetInternalFrameType(pFrame); if (frameData.stubFrame.frameType != STUBFRAME_NONE) diff --git a/src/coreclr/debug/daccess/dacimpl.h b/src/coreclr/debug/daccess/dacimpl.h index 8de684a5dae9a2..e129707955291b 100644 --- a/src/coreclr/debug/daccess/dacimpl.h +++ b/src/coreclr/debug/daccess/dacimpl.h @@ -2117,7 +2117,7 @@ class DacHandleWalker : public DefaultCOMImplGetPEAssembly()->GetPath().IsEmpty()) { - if (!pAssembly->GetPEAssembly()->GetPath(). - DacGetUnicode(count, location, pNeeded)) + if (!pAssembly->GetPEAssembly()->GetPath().DacGetUnicode(count, location, pNeeded)) { hr = E_FAIL; } @@ -3255,8 +3254,8 @@ ClrDataAccess::GetThreadLocalModuleData(CLRDATA_ADDRESS thread, unsigned int ind HRESULT ClrDataAccess::GetHandleEnum(ISOSHandleEnum **ppHandleEnum) { - unsigned int types[] = {HNDTYPE_WEAK_SHORT, HNDTYPE_WEAK_LONG, HNDTYPE_STRONG, HNDTYPE_PINNED, HNDTYPE_VARIABLE, HNDTYPE_DEPENDENT, - HNDTYPE_ASYNCPINNED, HNDTYPE_SIZEDREF, + unsigned int types[] = {HNDTYPE_WEAK_SHORT, HNDTYPE_WEAK_LONG, HNDTYPE_STRONG, HNDTYPE_PINNED, HNDTYPE_DEPENDENT, + HNDTYPE_SIZEDREF, #if defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS) || defined(FEATURE_OBJCMARSHAL) HNDTYPE_REFCOUNTED, #endif // FEATURE_COMINTEROP || FEATURE_COMWRAPPERS || FEATURE_OBJCMARSHAL @@ -3293,8 +3292,8 @@ HRESULT ClrDataAccess::GetHandleEnumForGC(unsigned int gen, ISOSHandleEnum **ppH SOSDacEnter(); - unsigned int types[] = {HNDTYPE_WEAK_SHORT, HNDTYPE_WEAK_LONG, HNDTYPE_STRONG, HNDTYPE_PINNED, HNDTYPE_VARIABLE, HNDTYPE_DEPENDENT, - HNDTYPE_ASYNCPINNED, HNDTYPE_SIZEDREF, + unsigned int types[] = {HNDTYPE_WEAK_SHORT, HNDTYPE_WEAK_LONG, HNDTYPE_STRONG, HNDTYPE_PINNED, HNDTYPE_DEPENDENT, + HNDTYPE_SIZEDREF, #if defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS) || defined(FEATURE_OBJCMARSHAL) HNDTYPE_REFCOUNTED, #endif // FEATURE_COMINTEROP || FEATURE_COMWRAPPERS || FEATURE_OBJCMARSHAL diff --git a/src/coreclr/debug/daccess/stdafx.h b/src/coreclr/debug/daccess/stdafx.h index 050b4eac513724..bb7b7b2365de59 100644 --- a/src/coreclr/debug/daccess/stdafx.h +++ b/src/coreclr/debug/daccess/stdafx.h @@ -26,7 +26,9 @@ #include +#ifdef HOST_WINDOWS #include +#endif #include #include diff --git a/src/coreclr/debug/debug-pal/CMakeLists.txt b/src/coreclr/debug/debug-pal/CMakeLists.txt index 23a1506acacd03..2836dcd58710fa 100644 --- a/src/coreclr/debug/debug-pal/CMakeLists.txt +++ b/src/coreclr/debug/debug-pal/CMakeLists.txt @@ -36,11 +36,7 @@ if(CLR_CMAKE_HOST_UNIX) set (EVENTPIPE_PAL_SOURCES "${SHARED_EVENTPIPE_SOURCE_PATH}/ds-ipc-pal-socket.c") set_source_files_properties(${EVENTPIPE_PAL_SOURCES} PROPERTIES LANGUAGE CXX) - if (CMAKE_VERSION VERSION_GREATER 3.11 OR CMAKE_VERSION VERSION_EQUAL 3.11) - set_source_files_properties(${EVENTPIPE_PAL_SOURCES} PROPERTIES COMPILE_OPTIONS -xc++) - else(CMAKE_VERSION VERSION_GREATER 3.11 OR CMAKE_VERSION VERSION_EQUAL 3.11) - add_compile_options(-xc++) - endif() + set_source_files_properties(${EVENTPIPE_PAL_SOURCES} PROPERTIES COMPILE_OPTIONS -xc++) set(TWO_WAY_PIPE_SOURCES ${EVENTPIPE_PAL_SOURCES} diff --git a/src/coreclr/debug/di/module.cpp b/src/coreclr/debug/di/module.cpp index 15fae1581e2bff..ca8314db533922 100644 --- a/src/coreclr/debug/di/module.cpp +++ b/src/coreclr/debug/di/module.cpp @@ -1852,7 +1852,7 @@ CordbFunction * CordbModule::CreateFunction(mdMethodDef funcMetaDataToken, SIZE_ return pCopy; } -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER //--------------------------------------------------------------------------------------- // // Creates a new CordbFunction object to represent this new version of a function and @@ -1929,7 +1929,7 @@ HRESULT CordbModule::UpdateFunction(mdMethodDef funcMetaDataToken, return hr; } -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER HRESULT CordbModule::LookupOrCreateClass(mdTypeDef classMetaDataToken,CordbClass** ppClass) @@ -2158,7 +2158,7 @@ HRESULT CordbModule::ApplyChanges(ULONG cbMetaData, FAIL_IF_NEUTERED(this); ATT_REQUIRE_STOPPED_MAY_FAIL(GetProcess()); -#ifdef FEATURE_ENC_SUPPORTED +#ifdef FEATURE_REMAP_FUNCTION // We enable EnC back in code:CordbModule::SetJITCompilerFlags. // If EnC isn't enabled, then we'll fail in the LS when we try to ApplyChanges. // We'd expect a well-behaved debugger to never actually land here. @@ -2274,7 +2274,7 @@ HRESULT CordbModule::ApplyChangesInternal(ULONG cbMetaData, if (m_vmDomainAssembly.IsNull()) return E_UNEXPECTED; -#ifdef FEATURE_ENC_SUPPORTED +#ifdef FEATURE_REMAP_FUNCTION HRESULT hr; void * pRemoteBuf = NULL; @@ -2394,9 +2394,9 @@ HRESULT CordbModule::ApplyChangesInternal(ULONG cbMetaData, TESTANDRETURNHR(hr2); } return hr; -#else // FEATURE_ENC_SUPPORTED +#else // FEATURE_REMAP_FUNCTION return E_NOTIMPL; -#endif // FEATURE_ENC_SUPPORTED +#endif // FEATURE_REMAP_FUNCTION } @@ -3078,9 +3078,9 @@ HRESULT CordbCode::GetVersionNumber( ULONG32 *nVersion) *nVersion = (ULONG32)m_nVersion; -#ifndef EnC_SUPPORTED +#ifndef FEATURE_METADATA_UPDATER _ASSERTE(*nVersion == 1); -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER return S_OK; } @@ -3114,7 +3114,7 @@ CordbILCode::CordbILCode(CordbFunction * pFunction, mdSignature localVarSigToken, UINT_PTR id) : CordbCode(pFunction, id, nVersion, TRUE), -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER m_fIsOld(FALSE), #endif m_codeRegionInfo(codeRegionInfo), @@ -3123,7 +3123,7 @@ CordbILCode::CordbILCode(CordbFunction * pFunction, } // CordbILCode::CordbILCode -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER //----------------------------------------------------------------------------- // CordbILCode::MakeOld // Internal method to perform any cleanup necessary when a code blob is no longer diff --git a/src/coreclr/debug/di/process.cpp b/src/coreclr/debug/di/process.cpp index eb0f4ad5f1c262..c1f4e90fa7a36d 100644 --- a/src/coreclr/debug/di/process.cpp +++ b/src/coreclr/debug/di/process.cpp @@ -180,7 +180,11 @@ STDAPI DLLEXPORT OpenVirtualProcessImpl2( IUnknown ** ppInstance, CLR_DEBUGGING_PROCESS_FLAGS* pFlagsOut) { - HMODULE hDac = LoadLibraryW(pDacModulePath); +#ifdef TARGET_WINDOWS + HMODULE hDac = WszLoadLibrary(pDacModulePath, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); +#else + HMODULE hDac = WszLoadLibrary(pDacModulePath); +#endif // !TARGET_WINDOWS if (hDac == NULL) { return HRESULT_FROM_WIN32(GetLastError()); diff --git a/src/coreclr/debug/di/rsclass.cpp b/src/coreclr/debug/di/rsclass.cpp index ec52823c07af5f..55f83b48a6d211 100644 --- a/src/coreclr/debug/di/rsclass.cpp +++ b/src/coreclr/debug/di/rsclass.cpp @@ -132,6 +132,7 @@ HRESULT CordbClass::GetStaticFieldValue(mdFieldDef fieldDef, IMetaDataImport * pImport = NULL; EX_TRY { + RSLockHolder lockHolder(GetProcess()->GetProcessLock()); pImport = GetModule()->GetMetaDataImporter(); // throws // Validate the token. @@ -1191,4 +1192,3 @@ HRESULT CordbClass::SearchFieldInfo( // Well, the field doesn't even belong to this class... ThrowHR(E_INVALIDARG); } - diff --git a/src/coreclr/debug/di/rsfunction.cpp b/src/coreclr/debug/di/rsfunction.cpp index a911dc6bbbeb8e..d9d30eddb072c1 100644 --- a/src/coreclr/debug/di/rsfunction.cpp +++ b/src/coreclr/debug/di/rsfunction.cpp @@ -427,7 +427,7 @@ HRESULT CordbFunction::CreateBreakpoint(ICorDebugFunctionBreakpoint **ppBreakpoi return hr; } -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER //----------------------------------------------------------------------------- // CordbFunction::MakeOld // Internal method to do any cleanup necessary when a Function is no longer @@ -501,7 +501,7 @@ HRESULT CordbFunction::GetCurrentVersionNumber(ULONG32 *pnCurrentVersion) *pnCurrentVersion = (ULONG32)(curFunc->m_dwEnCVersionNumber); -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER _ASSERTE( *pnCurrentVersion >= this->m_dwEnCVersionNumber ); #else _ASSERTE(*pnCurrentVersion == CorDB_DEFAULT_ENC_FUNCTION_VERSION); @@ -536,7 +536,7 @@ HRESULT CordbFunction::GetVersionNumber(ULONG32 *pnVersion) *pnVersion = (ULONG32)m_dwEnCVersionNumber; -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER _ASSERTE(*pnVersion >= CorDB_DEFAULT_ENC_FUNCTION_VERSION); #else _ASSERTE(*pnVersion == CorDB_DEFAULT_ENC_FUNCTION_VERSION); @@ -616,7 +616,7 @@ HRESULT CordbFunction::CreateNativeBreakpoint(ICorDebugFunctionBreakpoint **ppBr // Triggers a new JIT so the next time the function is called, it will be unoptimized. // // Parameters -// +// // // Returns: // S_OK on success. @@ -656,7 +656,7 @@ HRESULT CordbFunction::DisableOptimizations() // // Parameters: // BOOL *pOptimizationsDisabled -// +// // // Returns: // S_OK on success. diff --git a/src/coreclr/debug/di/rspriv.h b/src/coreclr/debug/di/rspriv.h index 4f55cea3ee3b85..ceadc7eedafe77 100644 --- a/src/coreclr/debug/di/rspriv.h +++ b/src/coreclr/debug/di/rspriv.h @@ -5120,13 +5120,13 @@ class CordbClass : public CordbBase, public ICorDebugClass, public ICorDebugClas mdFieldDef fieldDef); mdTypeDef GetTypeDef() { return (mdTypeDef)m_id; } -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER // when we get an added field or method, mark the class to force re-init when we access it void MakeOld() { m_loadLevel = Constructed; } -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER //----------------------------------------------------------- // Data members @@ -5458,7 +5458,7 @@ class CordbFunction : public CordbBase, CordbReJitILCode** ppILCode); -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER void MakeOld(); #endif @@ -5755,9 +5755,9 @@ class CordbILCode : public CordbCode // get total size of the IL code ULONG32 GetSize() { return m_codeRegionInfo.cbSize; } -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER void MakeOld(); -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER HRESULT GetLocalVarSig(SigParser *pLocalsSigParser, ULONG *pLocalVarCount); HRESULT GetLocalVariableType(DWORD dwIndex, const Instantiation * pInst, CordbType ** ppResultType); @@ -5775,7 +5775,7 @@ class CordbILCode : public CordbCode //----------------------------------------------------------- private: -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER UINT m_fIsOld : 1; // marks this instance as an old EnC version bool m_encBreakpointsApplied; #endif diff --git a/src/coreclr/debug/di/rsthread.cpp b/src/coreclr/debug/di/rsthread.cpp index 4cc387235910c9..164399701c6847 100644 --- a/src/coreclr/debug/di/rsthread.cpp +++ b/src/coreclr/debug/di/rsthread.cpp @@ -8575,10 +8575,10 @@ HRESULT CordbJITILFrame::RemapFunction(ULONG32 nOffset) HRESULT hr = S_OK; PUBLIC_API_BEGIN(this) { -#if !defined(FEATURE_ENC_SUPPORTED) +#if !defined(FEATURE_REMAP_FUNCTION) ThrowHR(E_NOTIMPL); -#else // FEATURE_ENC_SUPPORTED +#else // FEATURE_REMAP_FUNCTION // Can only be called on leaf frame. if (!m_nativeFrame->IsLeafFrame()) { @@ -8595,7 +8595,7 @@ HRESULT CordbJITILFrame::RemapFunction(ULONG32 nOffset) // Tell the left-side to do the remap hr = m_nativeFrame->m_pThread->SetRemapIP(nOffset); -#endif // FEATURE_ENC_SUPPORTED +#endif // FEATURE_REMAP_FUNCTION } PUBLIC_API_END(hr); diff --git a/src/coreclr/debug/di/shimprocess.cpp b/src/coreclr/debug/di/shimprocess.cpp index b8aeea15b1ff9c..54618ff9acc869 100644 --- a/src/coreclr/debug/di/shimprocess.cpp +++ b/src/coreclr/debug/di/shimprocess.cpp @@ -1609,11 +1609,7 @@ HMODULE ShimProcess::GetDacModule(PathString& dacModulePath) ThrowLastError(); } - // Dac Dll is named: - // mscordaccore.dll <-- coreclr - // mscordacwks.dll <-- desktop PCWSTR eeFlavor = MAKEDLLNAME_W(W("mscordaccore")); - wszAccessDllPath.Append(eeFlavor); } hDacDll = WszLoadLibrary(wszAccessDllPath); diff --git a/src/coreclr/debug/di/symbolinfo.cpp b/src/coreclr/debug/di/symbolinfo.cpp index f7822a0ecd7eaf..7d293a89a1ddc5 100644 --- a/src/coreclr/debug/di/symbolinfo.cpp +++ b/src/coreclr/debug/di/symbolinfo.cpp @@ -178,7 +178,7 @@ HRESULT SymbolInfo::SetMethodProps(mdToken method, mdToken cls, LPCWSTR wszName) { m_LastMethod.method=method; m_LastMethod.cls=cls; - m_LastMethod.wszName=wszName; + m_LastMethod.wszName.Set(wszName); m_LastMethod.wszName.Normalize(); } EX_CATCH_HRESULT(hr) diff --git a/src/coreclr/debug/ee/controller.cpp b/src/coreclr/debug/ee/controller.cpp index 58e63ab399db2c..94714b9457063d 100644 --- a/src/coreclr/debug/ee/controller.cpp +++ b/src/coreclr/debug/ee/controller.cpp @@ -2773,7 +2773,7 @@ DPOSS_ACTION DebuggerController::ScanForTriggers(CORDB_ADDRESS_TYPE *address, return used; } -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER // This function will check for an EnC patch at the given address and return // it if one is there, otherwise it will return NULL. DebuggerControllerPatch *DebuggerController::GetEnCPatch(const BYTE *address) @@ -2822,7 +2822,7 @@ DPOSS_ACTION DebuggerController::ScanForTriggers(CORDB_ADDRESS_TYPE *address, return NULL; } -#endif //EnC_SUPPORTED +#endif //FEATURE_METADATA_UPDATER // DebuggerController::DispatchPatchOrSingleStep - Ask any patches that are active at a given // address if they want to do anything about the exception that's occurred there. How: For the given @@ -2871,7 +2871,7 @@ DPOSS_ACTION DebuggerController::DispatchPatchOrSingleStep(Thread *thread, CONTE TADDR originalAddress = 0; -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER DebuggerControllerPatch *dcpEnCOriginal = NULL; // If this sequence point has an EnC patch, we want to process it ahead of any others. If the @@ -2912,7 +2912,7 @@ DPOSS_ACTION DebuggerController::DispatchPatchOrSingleStep(Thread *thread, CONTE LOG((LF_CORDB|LF_ENC,LL_INFO10000, "DC::DPOSS done EnC short-circuit, ignoring\n")); // if we got here, then the EnC remap opportunity was not taken, so just continue on. } -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER TP_RESULT tpr; @@ -3000,7 +3000,7 @@ DPOSS_ACTION DebuggerController::DispatchPatchOrSingleStep(Thread *thread, CONTE } } -#if defined EnC_SUPPORTED +#if defined FEATURE_METADATA_UPDATER Exit: #endif @@ -3009,7 +3009,7 @@ DPOSS_ACTION DebuggerController::DispatchPatchOrSingleStep(Thread *thread, CONTE // @todo - do we need to get the context again here? CONTEXT *pCtx = GetManagedLiveCtx(thread); -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER DebuggerControllerPatch *dcpEnCCurrent = GetEnCPatch(dac_cast((GetIP(context)))); // we have a new patch if the original was null and the current is non-null. Otherwise we have an old @@ -3094,7 +3094,7 @@ void DebuggerController::EnableSingleStep() m_singleStep = true; } -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER // Note that this doesn't tell us if Single Stepping is currently enabled // at the hardware level (ie, for x86, if (context->EFlags & 0x100), but // rather, if we WANT single stepping enabled (pThread->m_State &Thread::TS_DebuggerIsStepping) @@ -3119,7 +3119,7 @@ BOOL DebuggerController::IsSingleStepEnabled(Thread *pThread) else return FALSE; } -#endif //EnC_SUPPORTED +#endif //FEATURE_METADATA_UPDATER void DebuggerController::EnableSingleStep(Thread *pThread) { @@ -4724,43 +4724,6 @@ TP_RESULT DebuggerPatchSkip::TriggerExceptionHook(Thread *thread, CONTEXT * cont if (IsSingleStep(exception->ExceptionCode)) { -#ifndef TARGET_UNIX - // Check if the current IP is anywhere near the exception dispatcher logic. - // If it is, ignore the exception, as the real exception is coming next. - static FARPROC pExcepDispProc = NULL; - - if (!pExcepDispProc) - { - HMODULE hNtDll = WszGetModuleHandle(W("ntdll.dll")); - - if (hNtDll != NULL) - { - pExcepDispProc = GetProcAddress(hNtDll, "KiUserExceptionDispatcher"); - - if (!pExcepDispProc) - pExcepDispProc = (FARPROC)(size_t)(-1); - } - else - pExcepDispProc = (FARPROC)(size_t)(-1); - } - - _ASSERTE(pExcepDispProc != NULL); - - if ((size_t)pExcepDispProc != (size_t)(-1)) - { - LPVOID pExcepDispEntryPoint = pExcepDispProc; - - if ((size_t)GetIP(context) > (size_t)pExcepDispEntryPoint && - (size_t)GetIP(context) <= ((size_t)pExcepDispEntryPoint + MAX_INSTRUCTION_LENGTH * 2 + 1)) - { - LOG((LF_CORDB, LL_INFO10000, - "Bypass instruction not redirected. Landed in exception dispatcher.\n")); - - return (TPR_IGNORE_AND_STOP); - } - } -#endif // TARGET_UNIX - // If the IP is close to the skip patch start, or if we were skipping over a call, then assume the IP needs // adjusting. if (m_instrAttrib.m_fIsCall || @@ -8627,7 +8590,7 @@ bool DebuggerFuncEvalComplete::SendEvent(Thread *thread, bool fIpChanged) return true; } -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER // * ------------------------------------------------------------------------ * // * DebuggerEnCBreakpoint routines @@ -8895,7 +8858,7 @@ TP_RESULT DebuggerEnCBreakpoint::HandleRemapComplete(DebuggerControllerPatch *pa return TPR_IGNORE_AND_STOP; } -#endif //EnC_SUPPORTED +#endif //FEATURE_METADATA_UPDATER // continuable-exceptions // * ------------------------------------------------------------------------ * diff --git a/src/coreclr/debug/ee/controller.h b/src/coreclr/debug/ee/controller.h index db4ef781a8add5..a2d8dc2e2602f3 100644 --- a/src/coreclr/debug/ee/controller.h +++ b/src/coreclr/debug/ee/controller.h @@ -1099,9 +1099,9 @@ class DebuggerController // Check whether there are any pathces in the patch table for the specified module. static bool ModuleHasPatches( Module* pModule ); -#if EnC_SUPPORTED +#if FEATURE_METADATA_UPDATER static DebuggerControllerPatch *GetEnCPatch(const BYTE *address); -#endif //EnC_SUPPORTED +#endif //FEATURE_METADATA_UPDATER static DPOSS_ACTION ScanForTriggers(CORDB_ADDRESS_TYPE *address, Thread *thread, @@ -1915,7 +1915,7 @@ class DebuggerContinuableExceptionBreakpoint : public DebuggerController }; -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER //--------------------------------------------------------------------------------------- // // DebuggerEnCBreakpoint - used by edit and continue to support remapping @@ -1963,7 +1963,7 @@ class DebuggerEnCBreakpoint final : public DebuggerController DebuggerJitInfo *m_jitInfo; TriggerType m_fTriggerType; }; -#endif //EnC_SUPPORTED +#endif //FEATURE_METADATA_UPDATER /* ========================================================================= */ diff --git a/src/coreclr/debug/ee/debugger.cpp b/src/coreclr/debug/ee/debugger.cpp index d58a987244a8ea..dedc8d652c215f 100644 --- a/src/coreclr/debug/ee/debugger.cpp +++ b/src/coreclr/debug/ee/debugger.cpp @@ -10426,7 +10426,7 @@ bool Debugger::HandleIPCEvent(DebuggerIPCEvent * pEvent) hr = DeoptimizeMethod(pModule, methodDef); } EX_CATCH_HRESULT(hr); - + DebuggerIPCEvent * pIPCResult = m_pRCThread->GetIPCEventReceiveBuffer(); InitIPCEvent(pIPCResult, @@ -10766,7 +10766,7 @@ bool Debugger::HandleIPCEvent(DebuggerIPCEvent * pEvent) SendReleaseBuffer(m_pRCThread, pEvent->ReleaseBuffer.pBuffer); } break; -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER case DB_IPCE_APPLY_CHANGES: { LOG((LF_ENC, LL_INFO100, "D::HIPCE: DB_IPCE_APPLY_CHANGES 1\n")); @@ -10784,7 +10784,7 @@ bool Debugger::HandleIPCEvent(DebuggerIPCEvent * pEvent) LOG((LF_ENC, LL_INFO100, "D::HIPCE: DB_IPCE_APPLY_CHANGES 2\n")); } break; -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER case DB_IPCE_SET_CLASS_LOAD_FLAG: { @@ -12308,14 +12308,14 @@ HRESULT Debugger::DeoptimizeMethod(Module* pModule, mdMethodDef methodDef) { inliners.Append(inliner); } - + // Keep going return true; }; JITInlineTrackingMap *pMap = pModule->GetJitInlineTrackingMap(); pMap->VisitInliners(pMethodDesc, lambda); - + for (auto it = inliners.Begin(); it != inliners.End(); ++it) { Module *inlinerModule = (*it)->GetModule(); @@ -12348,7 +12348,7 @@ HRESULT Debugger::IsMethodDeoptimized(Module *pModule, mdMethodDef methodDef, BO CodeVersionManager::LockHolder codeVersioningLockHolder; CodeVersionManager *pCodeVersionManager = pModule->GetCodeVersionManager(); ILCodeVersion activeILVersion = pCodeVersionManager->GetActiveILCodeVersion(pModule, methodDef); - *pResult = activeILVersion.IsDeoptimized(); + *pResult = activeILVersion.IsDeoptimized(); } return S_OK; @@ -12617,7 +12617,7 @@ void Debugger::GetVarInfo(MethodDesc * fd, // [IN] method of interest #include "openum.h" -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER //--------------------------------------------------------------------------------------- // @@ -13164,7 +13164,7 @@ HRESULT Debugger::MapILInfoToCurrentNative(MethodDesc *pMD, return S_OK; } -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER //--------------------------------------------------------------------------------------- // Hijack worker stub called from asm stub. This can then delegate to other hijacks. diff --git a/src/coreclr/debug/ee/debugger.h b/src/coreclr/debug/ee/debugger.h index 2c2440ddaf6977..ac2a3218f73569 100644 --- a/src/coreclr/debug/ee/debugger.h +++ b/src/coreclr/debug/ee/debugger.h @@ -1398,11 +1398,11 @@ class DebuggerJitInfo bool m_jitComplete; -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER // If this is true, then we've plastered the method with DebuggerEncBreakpoints // and the method has been EnC'd bool m_encBreakpointsApplied; -#endif //EnC_SUPPORTED +#endif //FEATURE_METADATA_UPDATER PTR_DebuggerMethodInfo m_methodInfo; @@ -1440,9 +1440,9 @@ class DebuggerJitInfo { #ifdef LOGGING const char* encState = "not enabled"; -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER encState = m_encBreakpointsApplied ? "true" : "false"; -#endif //EnC_SUPPORTED +#endif //FEATURE_METADATA_UPDATER LOG((LF_CORDB, LL_INFO10000, " DJI: %p\n" " m_jitComplete: %s\n" " m_encBreakpointsApplied: %s\n" @@ -1963,7 +1963,7 @@ class Debugger : public DebugInterface HRESULT RequestFavor(FAVORCALLBACK fp, void * pData); -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER HRESULT UpdateFunction(MethodDesc* pFD, SIZE_T encVersion); HRESULT AddFunction(MethodDesc* md, SIZE_T enCVersion); HRESULT UpdateNotYetLoadedFunction(mdMethodDef token, Module * pModule, SIZE_T enCVersion); @@ -1975,7 +1975,7 @@ class Debugger : public DebugInterface SIZE_T ilOffset, TADDR nativeFnxStart, SIZE_T *nativeOffset); -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER void GetVarInfo(MethodDesc * fd, // [IN] method of interest CORDB_ADDRESS nativeCodeAddress, // [IN] which edit version @@ -2743,14 +2743,14 @@ class Debugger : public DebugInterface HRESULT ReleaseRemoteBuffer(void *pBuffer, bool removeFromBlobList); private: -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER // Apply an EnC edit and send the result event to the RS HRESULT ApplyChangesAndSendResult(DebuggerModule * pDebuggerModule, DWORD cbMetadata, BYTE *pMetadata, DWORD cbIL, BYTE *pIL); -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER bool GetCompleteDebuggerLaunchString(SString * pStrArgsBuf); diff --git a/src/coreclr/debug/ee/functioninfo.cpp b/src/coreclr/debug/ee/functioninfo.cpp index 19910c6429a9c6..fad9ac786ba714 100644 --- a/src/coreclr/debug/ee/functioninfo.cpp +++ b/src/coreclr/debug/ee/functioninfo.cpp @@ -249,9 +249,9 @@ DebuggerJitInfo::DebuggerJitInfo(DebuggerMethodInfo *minfo, NativeCodeVersion na m_nativeCodeVersion(nativeCodeVersion), m_pLoaderModule(nativeCodeVersion.GetMethodDesc()->GetLoaderModule()), m_jitComplete(false), -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER m_encBreakpointsApplied(false), -#endif //EnC_SUPPORTED +#endif //FEATURE_METADATA_UPDATER m_methodInfo(minfo), m_addrOfCode(NULL), m_sizeOfCode(0), m_prevJitInfo(NULL), m_nextJitInfo(NULL), @@ -1575,7 +1575,11 @@ DebuggerJitInfo *DebuggerMethodInfo::FindOrCreateInitAndAddJitInfo(MethodDesc* f if (startAddr == NULL) { startAddr = g_pEEInterface->GetFunctionAddress(fd); - _ASSERTE(startAddr != NULL); + if (startAddr == NULL) + { + //The only case this should happen is if we are trying to get the DJI for a method that has not been jitted yet. + return NULL; + } } else { diff --git a/src/coreclr/dlls/clretwrc/CMakeLists.txt b/src/coreclr/dlls/clretwrc/CMakeLists.txt index 2b749fd7b3736f..2729a6072269bc 100644 --- a/src/coreclr/dlls/clretwrc/CMakeLists.txt +++ b/src/coreclr/dlls/clretwrc/CMakeLists.txt @@ -8,9 +8,10 @@ if(CLR_CMAKE_HOST_WIN32) string(REPLACE "/LTCG" "" CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO ${CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO}) # remove /guard:cf, /guard:ehcont, and /CETCOMPAT from resource-only libraries - string(REPLACE "/guard:cf" "" CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS}) + set_property(DIRECTORY PROPERTY CLR_CONTROL_FLOW_GUARD OFF) + if (CLR_CMAKE_HOST_ARCH_AMD64) - string(REPLACE "/guard:ehcont" "" CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS}) + set_property(DIRECTORY PROPERTY CLR_EH_CONTINUATION OFF) string(REPLACE "/CETCOMPAT" "" CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS}) endif (CLR_CMAKE_HOST_ARCH_AMD64) diff --git a/src/coreclr/dlls/mscordac/CMakeLists.txt b/src/coreclr/dlls/mscordac/CMakeLists.txt index 4b1ff24ccdceb9..ea49cb0ad4098a 100644 --- a/src/coreclr/dlls/mscordac/CMakeLists.txt +++ b/src/coreclr/dlls/mscordac/CMakeLists.txt @@ -144,7 +144,7 @@ if(CLR_CMAKE_HOST_WIN32) add_custom_command( DEPENDS mscordaccore_def "${CURRENT_BINARY_DIR_FOR_CONFIG}/mscordac.def" mscordacobj daccess OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/mscordaccore.exp - COMMAND lib.exe /OUT:"${CMAKE_CURRENT_BINARY_DIR}/mscordaccore.lib" /DEF:"${CURRENT_BINARY_DIR_FOR_CONFIG}/mscordac.def" "$" $<$,$>:/LTCG> ${STATIC_LIBRARY_FLAGS} $ + COMMAND lib.exe /NOLOGO /OUT:"${CMAKE_CURRENT_BINARY_DIR}/mscordaccore.lib" /DEF:"${CURRENT_BINARY_DIR_FOR_CONFIG}/mscordac.def" "$" $<$,$>:/LTCG> ${STATIC_LIBRARY_FLAGS} $ COMMENT "Generating mscordaccore.exp export file" ) diff --git a/src/coreclr/dlls/mscordac/mscordac_unixexports.src b/src/coreclr/dlls/mscordac/mscordac_unixexports.src index 6372f1906e80a2..6cdd5ff733bcf8 100644 --- a/src/coreclr/dlls/mscordac/mscordac_unixexports.src +++ b/src/coreclr/dlls/mscordac/mscordac_unixexports.src @@ -128,8 +128,7 @@ nativeStringResourceTable_mscorrc #GetTempPathW #InitializeCriticalSection #LeaveCriticalSection -#LoadLibraryA -#LoadLibraryW +#LoadLibraryExA #LoadLibraryExW #MapViewOfFile #MapViewOfFileEx diff --git a/src/coreclr/dlls/mscorrc/CMakeLists.txt b/src/coreclr/dlls/mscorrc/CMakeLists.txt index 8011997c1e55fc..30b2bf1eda69da 100644 --- a/src/coreclr/dlls/mscorrc/CMakeLists.txt +++ b/src/coreclr/dlls/mscorrc/CMakeLists.txt @@ -9,9 +9,10 @@ if(CLR_CMAKE_HOST_WIN32) string(REPLACE "/LTCG" "" CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO ${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO}) # remove /guard:cf, /guard:ehcont, and /CETCOMPAT from resource-only libraries - string(REPLACE "/guard:cf" "" CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS}) + set_property(DIRECTORY PROPERTY CLR_CONTROL_FLOW_GUARD OFF) + if (CLR_CMAKE_HOST_ARCH_AMD64) - string(REPLACE "/guard:ehcont" "" CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS}) + set_property(DIRECTORY PROPERTY CLR_EH_CONTINUATION OFF) string(REPLACE "/CETCOMPAT" "" CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS}) endif (CLR_CMAKE_HOST_ARCH_AMD64) diff --git a/src/coreclr/dlls/mscorrc/mscorrc.rc b/src/coreclr/dlls/mscorrc/mscorrc.rc index 8c3c50d4f522a7..0fbec6efabad13 100644 --- a/src/coreclr/dlls/mscorrc/mscorrc.rc +++ b/src/coreclr/dlls/mscorrc/mscorrc.rc @@ -525,7 +525,6 @@ BEGIN IDS_CLASSLOAD_TOO_MANY_METHODS "Type '%1' from assembly '%2' contains more methods than the current implementation allows." IDS_CLASSLOAD_MI_CANNOT_OVERRIDE "Cannot override runtime implemented method '%3' on type '%1' from assembly '%2'." - IDS_CLASSLOAD_COLLECTIBLEFIXEDVTATTR "Collectible type '%1' has unsupported FixedAddressValueTypeAttribute applied to a field." IDS_EE_JIT_COMPILER_ERROR "The JIT compiler encountered invalid IL code or an internal limitation." IDS_EE_OBJECT_TO_VARIANT_NOT_SUPPORTED "Invalid managed/unmanaged type combination (Marshaling to and from COM VARIANTs isn't supported)." IDS_EE_OBJECT_TO_ITF_NOT_SUPPORTED "Invalid managed/unmanaged type combination (Marshaling to and from COM interface pointers isn't supported)." diff --git a/src/coreclr/dlls/mscorrc/resource.h b/src/coreclr/dlls/mscorrc/resource.h index 878fd3c509da64..5b7eb00ccba8e5 100644 --- a/src/coreclr/dlls/mscorrc/resource.h +++ b/src/coreclr/dlls/mscorrc/resource.h @@ -350,7 +350,6 @@ #define IDS_EE_OUT_OF_SYNCBLOCKS 0x1aae #define IDS_CLASSLOAD_MI_CANNOT_OVERRIDE 0x1ab3 -#define IDS_CLASSLOAD_COLLECTIBLEFIXEDVTATTR 0x1ab6 #define IDS_CLASSLOAD_EQUIVALENTBADTYPE 0x1ab7 #define IDS_EE_CODEEXECUTION_CONTAINSGENERICVAR 0x1abb #define IDS_CLASSLOAD_WRONGCPU 0x1abc diff --git a/src/coreclr/gc/gc.cpp b/src/coreclr/gc/gc.cpp index 5c5903050fdcae..59bd152828672a 100644 --- a/src/coreclr/gc/gc.cpp +++ b/src/coreclr/gc/gc.cpp @@ -41,7 +41,8 @@ class gc_rand } // obtain random number in the range 0 .. r-1 - static uint64_t get_rand(uint64_t r) { + static uint64_t get_rand(uint64_t r) + { // require r >= 0 uint64_t x = (uint64_t)((get_rand() * r) >> 31); return x; @@ -823,6 +824,11 @@ class t_join join_struct.r_join_lock = n_th; } + int get_num_threads() + { + return join_struct.n_threads; + } + void destroy () { dprintf (JOIN_LOG, ("Destroying join structure")); @@ -887,6 +893,8 @@ class t_join // avoid race due to the thread about to reset the event (occasionally) being preempted before ResetEvent() if (color == join_struct.lock_color.LoadWithoutBarrier()) { + dprintf (9999, ("---h%d %d j%d %d - respin!!! (c:%d-%d)", + gch->heap_number, join_id, join_struct.n_threads, color, join_struct.lock_color.LoadWithoutBarrier())); goto respin; } @@ -1117,6 +1125,25 @@ t_join bgc_t_join; } \ } +#define spin_and_wait(count_to_spin, expr) \ +{ \ + while (!expr) \ + { \ + for (int j = 0; j < count_to_spin; j++) \ + { \ + if (expr) \ + { \ + break; \ + } \ + YieldProcessor (); \ + } \ + if (!(expr)) \ + { \ + GCToOSInterface::YieldThread (0); \ + } \ + } \ +} + #ifdef BACKGROUND_GC #define max_pending_allocs 64 @@ -1333,12 +1360,10 @@ inline bool can_use_write_watch_for_card_table() #endif } -#else +#else //WRITE_WATCH #define mem_reserve (MEM_RESERVE) #endif //WRITE_WATCH -//check if the low memory notification is supported - void WaitLongerNoInstru (int i) { // every 8th attempt: @@ -1429,8 +1454,6 @@ enter_msl_status gc_heap::enter_spin_lock_msl_helper (GCSpinLock* msl) { #ifdef DYNAMIC_HEAP_COUNT uint64_t start = GetHighPrecisionTimeStamp(); - - msl->msl_wait_count++; #endif //DYNAMIC_HEAP_COUNT unsigned int i = 0; @@ -1453,7 +1476,8 @@ enter_msl_status gc_heap::enter_spin_lock_msl_helper (GCSpinLock* msl) { if (VolatileLoad (&msl->lock) == lock_free || IsGCInProgress ()) break; - YieldProcessor (); // indicate to the processor that we are spinning + // give the HT neighbor a chance to run + YieldProcessor (); } if (VolatileLoad (&msl->lock) != lock_free && !IsGCInProgress ()) { @@ -1485,7 +1509,7 @@ enter_msl_status gc_heap::enter_spin_lock_msl_helper (GCSpinLock* msl) #ifdef DYNAMIC_HEAP_COUNT uint64_t end = GetHighPrecisionTimeStamp(); Interlocked::ExchangeAdd64 (&msl->msl_wait_time, end - start); - dprintf (6666, ("wait for msl lock total time: %zd, total count: %zd, this time: %zd, this count: %u", msl->msl_wait_time, msl->msl_wait_count, end - start, i)); + dprintf (3, ("h%d wait for msl lock wait time %zd, total wait time: %zd", heap_number, (end - start), msl->msl_wait_time)); #endif //DYNAMIC_HEAP_COUNT } while (Interlocked::CompareExchange (&msl->lock, lock_taken, lock_free) != lock_free); @@ -2318,9 +2342,6 @@ sorted_table* gc_heap::seg_table; #ifdef MULTIPLE_HEAPS GCEvent gc_heap::ee_suspend_event; -#ifdef DYNAMIC_HEAP_COUNT -GCEvent gc_heap::gc_idle_thread_event; -#endif //DYNAMIC_HEAP_COUNT size_t gc_heap::min_gen0_balance_delta = 0; size_t gc_heap::min_balance_threshold = 0; #endif //MULTIPLE_HEAPS @@ -2584,9 +2605,8 @@ fgm_history gc_heap::fgm_result; size_t gc_heap::allocated_since_last_gc[total_oh_count]; -BOOL gc_heap::ro_segments_in_range; - #ifndef USE_REGIONS +BOOL gc_heap::ro_segments_in_range = FALSE; uint8_t* gc_heap::ephemeral_low; uint8_t* gc_heap::ephemeral_high; BOOL gc_heap::ephemeral_promotion; @@ -2919,6 +2939,12 @@ BOOL gc_heap::should_expand_in_full_gc = FALSE; #ifdef DYNAMIC_HEAP_COUNT int gc_heap::dynamic_adaptation_mode = dynamic_adaptation_default; gc_heap::dynamic_heap_count_data_t SVR::gc_heap::dynamic_heap_count_data; +uint64_t gc_heap::last_suspended_end_time = 0; +size_t gc_heap::gc_index_full_gc_end = 0; + +#ifdef STRESS_DYNAMIC_HEAP_COUNT +int gc_heap::heaps_in_this_gc = 0; +#endif //STRESS_DYNAMIC_HEAP_COUNT #endif // DYNAMIC_HEAP_COUNT // Provisional mode related stuff. @@ -2935,9 +2961,9 @@ BOOL gc_heap::heap_analyze_enabled = FALSE; #ifndef MULTIPLE_HEAPS -alloc_list gc_heap::loh_alloc_list [NUM_LOH_ALIST-1]; -alloc_list gc_heap::gen2_alloc_list[NUM_GEN2_ALIST-1]; -alloc_list gc_heap::poh_alloc_list [NUM_POH_ALIST-1]; +alloc_list gc_heap::gen2_alloc_list[NUM_GEN2_ALIST - 1]; +alloc_list gc_heap::loh_alloc_list [NUM_LOH_ALIST - 1]; +alloc_list gc_heap::poh_alloc_list [NUM_POH_ALIST - 1]; #ifdef DOUBLY_LINKED_FL // size we removed with no undo; only for recording purpose @@ -4341,7 +4367,7 @@ size_t size_seg_mapping_table_of (uint8_t* from, uint8_t* end) end = align_on_segment (end); dprintf (1, ("from: %p, end: %p, size: %zx", from, end, sizeof (seg_mapping)*(((size_t)(end - from) >> gc_heap::min_segment_size_shr)))); - return sizeof (seg_mapping)*((size_t)(end - from) >> gc_heap::min_segment_size_shr); + return (sizeof (seg_mapping)*((size_t)(end - from) >> gc_heap::min_segment_size_shr)); } size_t size_region_to_generation_table_of (uint8_t* from, uint8_t* end) @@ -4417,9 +4443,9 @@ heap_segment* ro_segment_lookup (uint8_t* o) #endif //FEATURE_BASICFREEZE +#ifndef USE_REGIONS void gc_heap::seg_mapping_table_add_segment (heap_segment* seg, gc_heap* hp) { -#ifndef USE_REGIONS size_t seg_end = (size_t)(heap_segment_reserved (seg) - 1); size_t begin_index = (size_t)seg >> gc_heap::min_segment_size_shr; seg_mapping* begin_entry = &seg_mapping_table[begin_index]; @@ -4478,12 +4504,10 @@ void gc_heap::seg_mapping_table_add_segment (heap_segment* seg, gc_heap* hp) end_index, (uint8_t*)(end_entry->h0), (end_entry->h0 ? end_entry->h0->heap_number : -1), (uint8_t*)(end_entry->h1), (end_entry->h1 ? end_entry->h1->heap_number : -1))); #endif //MULTIPLE_HEAPS && SIMPLE_DPRINTF -#endif //!USE_REGIONS } void gc_heap::seg_mapping_table_remove_segment (heap_segment* seg) { -#ifndef USE_REGIONS size_t seg_end = (size_t)(heap_segment_reserved (seg) - 1); size_t begin_index = (size_t)seg >> gc_heap::min_segment_size_shr; seg_mapping* begin_entry = &seg_mapping_table[begin_index]; @@ -4527,8 +4551,8 @@ void gc_heap::seg_mapping_table_remove_segment (heap_segment* seg) begin_index, (uint8_t*)(begin_entry->h0), (uint8_t*)(begin_entry->h1), end_index, (uint8_t*)(end_entry->h0), (uint8_t*)(end_entry->h1))); #endif //MULTIPLE_HEAPS -#endif //!USE_REGIONS } +#endif //!USE_REGIONS #ifdef MULTIPLE_HEAPS inline @@ -5286,7 +5310,8 @@ struct initial_memory_details initial_memory_details memory_details; -BOOL gc_heap::reserve_initial_memory (size_t normal_size, size_t large_size, size_t pinned_size, int num_heaps, bool use_large_pages_p, bool separated_poh_p, uint16_t* heap_no_to_numa_node) +BOOL gc_heap::reserve_initial_memory (size_t normal_size, size_t large_size, size_t pinned_size, + int num_heaps, bool use_large_pages_p, bool separated_poh_p, uint16_t* heap_no_to_numa_node) { BOOL reserve_success = FALSE; @@ -6114,6 +6139,13 @@ void gc_heap::release_segment (heap_segment* sg) FIRE_EVENT(GCFreeSegment_V1, heap_segment_mem(sg)); virtual_free (sg, (uint8_t*)heap_segment_reserved (sg)-(uint8_t*)sg, sg); } + +BOOL gc_heap::set_ro_segment_in_range (heap_segment* seg) +{ + seg->flags |= heap_segment_flags_inrange; + ro_segments_in_range = TRUE; + return TRUE; +} #endif //!USE_REGIONS heap_segment* gc_heap::get_segment_for_uoh (int gen_number, size_t size @@ -6967,12 +6999,6 @@ BOOL gc_heap::create_thread_support (int number_of_heaps) { goto cleanup; } -#ifdef DYNAMIC_HEAP_COUNT - if (!gc_idle_thread_event.CreateOSManualEventNoThrow (FALSE)) - { - goto cleanup; - } -#endif //DYNAMIC_HEAP_COUNT if (!ee_suspend_event.CreateOSAutoEventNoThrow (FALSE)) { goto cleanup; @@ -7020,10 +7046,6 @@ bool gc_heap::create_gc_thread () return GCToEEInterface::CreateThread(gc_thread_stub, this, false, ".NET Server GC"); } -#ifdef DYNAMIC_HEAP_COUNT -static size_t prev_change_heap_count_gc_index; -#endif //DYNAMIC_HEAP_COUNT - #ifdef _MSC_VER #pragma warning(disable:4715) //IA64 xcompiler recognizes that without the 'break;' the while(1) will never end and therefore not return a value for that code path #endif //_MSC_VER @@ -7042,18 +7064,87 @@ void gc_heap::gc_thread_function () if (heap_number == 0) { - uint32_t wait_result = gc_heap::ee_suspend_event.Wait(gradual_decommit_in_progress_p ? DECOMMIT_TIME_STEP_MILLISECONDS : INFINITE, FALSE); + bool wait_on_time_out_p = gradual_decommit_in_progress_p; + uint32_t wait_time = DECOMMIT_TIME_STEP_MILLISECONDS; +#ifdef DYNAMIC_HEAP_COUNT + // background_running_p can only change from false to true during suspension. + if (!gc_heap::background_running_p () && dynamic_heap_count_data.should_change_heap_count) + { + assert (dynamic_adaptation_mode == dynamic_adaptation_to_application_sizes); + + dynamic_heap_count_data_t::sample& sample = dynamic_heap_count_data.samples[dynamic_heap_count_data.sample_index]; + wait_time = min (wait_time, (uint32_t)(sample.elapsed_between_gcs / 1000 / 3)); + wait_time = max (wait_time, 1); + + dprintf (6666, ("gc#0 thread waiting for %d ms (betwen GCs %I64d)", wait_time, sample.elapsed_between_gcs)); + } +#endif //DYNAMIC_HEAP_COUNT + uint32_t wait_result = gc_heap::ee_suspend_event.Wait(wait_on_time_out_p ? wait_time : INFINITE, FALSE); + dprintf (9999, ("waiting for ee done res %d (timeout %d, %I64d ms since last suspend end)(should_change_heap_count is %d) (gradual_decommit_in_progress_p %d)", + wait_result, wait_time, ((GetHighPrecisionTimeStamp() - last_suspended_end_time) / 1000), + dynamic_heap_count_data.should_change_heap_count, gradual_decommit_in_progress_p)); if (wait_result == WAIT_TIMEOUT) { - decommit_lock.Enter(); - gradual_decommit_in_progress_p = decommit_step (DECOMMIT_TIME_STEP_MILLISECONDS); - decommit_lock.Leave(); +#ifdef DYNAMIC_HEAP_COUNT + if (dynamic_heap_count_data.should_change_heap_count) + { +#ifdef BACKGROUND_GC + if (!gc_heap::background_running_p ()) +#endif //BACKGROUND_GC + { + dprintf (6666, ("changing heap count due to timeout")); + check_heap_count(); + } + } +#endif //DYNAMIC_HEAP_COUNT + + if (gradual_decommit_in_progress_p) + { + decommit_lock.Enter (); + gradual_decommit_in_progress_p = decommit_step (DECOMMIT_TIME_STEP_MILLISECONDS); + decommit_lock.Leave (); + } continue; } +#ifdef DYNAMIC_HEAP_COUNT + // We might want to consider also doing this when a BGC finishes. + if (dynamic_heap_count_data.should_change_heap_count) + { +#ifdef BACKGROUND_GC + if (!gc_heap::background_running_p ()) +#endif //BACKGROUND_GC + { + // this was a request to do a GC so make sure we follow through with one. + dprintf (6666, ("changing heap count at a GC start")); + check_heap_count (); + } + } + + // wait till the threads that should have gone idle at least reached the place where they are about to wait on the idle event. + if ((gc_heap::dynamic_adaptation_mode == dynamic_adaptation_to_application_sizes) && + (n_heaps != dynamic_heap_count_data.last_n_heaps)) + { + int spin_count = 1024; + int idle_thread_count = n_max_heaps - n_heaps; + dprintf (9999, ("heap count changed %d->%d, idle should be %d and is %d", dynamic_heap_count_data.last_n_heaps, n_heaps, + idle_thread_count, VolatileLoadWithoutBarrier (&dynamic_heap_count_data.idle_thread_count))); + if (idle_thread_count != dynamic_heap_count_data.idle_thread_count) + { + spin_and_wait (spin_count, (idle_thread_count == dynamic_heap_count_data.idle_thread_count)); + dprintf (9999, ("heap count changed %d->%d, now idle is %d", dynamic_heap_count_data.last_n_heaps, n_heaps, + VolatileLoadWithoutBarrier (&dynamic_heap_count_data.idle_thread_count))); + } + + dynamic_heap_count_data.last_n_heaps = n_heaps; + } +#endif //DYNAMIC_HEAP_COUNT + suspended_start_time = GetHighPrecisionTimeStamp(); BEGIN_TIMING(suspend_ee_during_log); + dprintf (9999, ("h0 suspending EE in GC!")); GCToEEInterface::SuspendEE(SUSPEND_FOR_GC); + dprintf (9999, ("h0 suspended EE in GC!")); END_TIMING(suspend_ee_during_log); proceed_with_gc_p = TRUE; @@ -7067,46 +7158,74 @@ void gc_heap::gc_thread_function () { settings.init_mechanisms(); #ifdef DYNAMIC_HEAP_COUNT - // make sure the other gc threads cannot see this as a request to change heap count - // see explanation below about the cases when we return from gc_start_event.Wait - assert (dynamic_heap_count_data.new_n_heaps == n_heaps); + if (gc_heap::dynamic_adaptation_mode == dynamic_adaptation_to_application_sizes) + { + // make sure the other gc threads cannot see this as a request to change heap count + // see explanation below about the cases when we return from gc_start_event.Wait + assert (dynamic_heap_count_data.new_n_heaps == n_heaps); + } #endif //DYNAMIC_HEAP_COUNT + dprintf (9999, ("GC thread %d setting_gc_start_in_gc(h%d)", heap_number, n_heaps)); gc_start_event.Set(); } dprintf (3, (ThreadStressLog::gcServerThread0StartMsg(), heap_number)); } else { + dprintf (9999, ("GC thread %d waiting_for_gc_start(%d)(gc%Id)", heap_number, n_heaps, VolatileLoadWithoutBarrier(&settings.gc_index))); gc_start_event.Wait(INFINITE, FALSE); #ifdef DYNAMIC_HEAP_COUNT - // we have a couple different cases to handle here when we come back from the wait: - // 1. We are starting a GC. Signaled by dynamic_heap_count_data.new_n_heaps == n_heaps - // a) We are starting a GC, but this thread is idle. Signaled by n_heaps <= heap_number - // b) We are starting a GC, and this thread is participating. Signaled by heap_number < n_heaps - // 2. We are changing heap count. Signaled by dynamic_heap_count_data.new_n_heaps != n_heaps - // a) We are changing heap count, but this thread is idle. Signaled by n_heaps <= heap_number. - // b) We are changing heap count, and this thread is participating. Signaled by heap_number < n_heaps. - - // check for 1.a) and 2.a) cases above - if (n_heaps <= heap_number) - { - dprintf (2, ("GC thread %d idle", heap_number)); - - // make sure GC is complete so we know the gc_idle_thread_event has been reset - g_theGCHeap->WaitUntilGCComplete(); + dprintf (9999, ("GC thread %d waiting_done_gc_start(%d-%d)(i: %d)(gc%Id)", + heap_number, n_heaps, dynamic_heap_count_data.new_n_heaps, dynamic_heap_count_data.init_only_p, VolatileLoadWithoutBarrier (&settings.gc_index))); + + if ((gc_heap::dynamic_adaptation_mode == dynamic_adaptation_to_application_sizes) && + (dynamic_heap_count_data.new_n_heaps != n_heaps)) + { + // The reason why we need to do this is - + // + for threads that were participating, we need them to do work for change_heap_count + // + for threads that were not participating but will need to participate, we need to make sure they are woken now instead of + // randomly sometime later. + int old_n_heaps = n_heaps; + int new_n_heaps = dynamic_heap_count_data.new_n_heaps; + int num_threads_to_wake = max (new_n_heaps, old_n_heaps); + if (heap_number < num_threads_to_wake) + { + dprintf (9999, ("h%d < %d, calling change", heap_number, num_threads_to_wake)); + change_heap_count (dynamic_heap_count_data.new_n_heaps); + if (new_n_heaps < old_n_heaps) + { + dprintf (9999, ("h%d after change", heap_number)); + // at the end of change_heap_count we've changed join's heap count to the new one if it's smaller. So we need to make sure + // only that many threads will participate in the following GCs. + if (heap_number < new_n_heaps) + { + dprintf (9999, ("h%d < %d participating (dec)", heap_number, new_n_heaps)); + } + else + { + Interlocked::Increment (&dynamic_heap_count_data.idle_thread_count); + dprintf (9999, ("GC thread %d wait_on_idle(%d < %d)(gc%Id), total idle %d", heap_number, old_n_heaps, new_n_heaps, + VolatileLoadWithoutBarrier (&settings.gc_index), VolatileLoadWithoutBarrier (&dynamic_heap_count_data.idle_thread_count))); + gc_idle_thread_event.Wait (INFINITE, FALSE); + dprintf (9999, ("GC thread %d waking_from_idle(%d)(gc%Id) after doing change", heap_number, n_heaps, VolatileLoadWithoutBarrier (&settings.gc_index))); + } + } + else + { + dprintf (9999, ("h%d < %d participating (inc)", heap_number, new_n_heaps)); + } + } + else + { + Interlocked::Increment (&dynamic_heap_count_data.idle_thread_count); + dprintf (9999, ("GC thread %d wait_on_idle(< max %d)(gc%Id), total idle %d", heap_number, num_threads_to_wake, + VolatileLoadWithoutBarrier (&settings.gc_index), VolatileLoadWithoutBarrier (&dynamic_heap_count_data.idle_thread_count))); + gc_idle_thread_event.Wait (INFINITE, FALSE); + dprintf (9999, ("GC thread %d waking_from_idle(%d)(gc%Id)", heap_number, n_heaps, VolatileLoadWithoutBarrier (&settings.gc_index))); + } - // now wait on the gc_idle_thread_event - gc_idle_thread_event.Wait(INFINITE, FALSE); - dprintf (2, ("GC thread %d waking from idle", heap_number)); - continue; - } - // case 2.b) above: is this a request to change heap count? - if (dynamic_heap_count_data.new_n_heaps != n_heaps) - { - change_heap_count (dynamic_heap_count_data.new_n_heaps); continue; } - // case 1.b) above: we're starting a GC. #endif //DYNAMIC_HEAP_COUNT dprintf (3, (ThreadStressLog::gcServerThreadNStartMsg(), heap_number)); } @@ -7191,10 +7310,6 @@ void gc_heap::gc_thread_function () { gradual_decommit_in_progress_p = decommit_step (DECOMMIT_TIME_STEP_MILLISECONDS); } -#ifdef DYNAMIC_HEAP_COUNT - // check if we should adjust the number of heaps - check_heap_count(); -#endif //DYNAMIC_HEAP_COUNT } else { @@ -7871,8 +7986,7 @@ void gc_heap::fix_older_allocation_area (generation* older_gen) { uint8_t* point = generation_allocation_pointer (older_gen); - size_t size = (generation_allocation_limit (older_gen) - - generation_allocation_pointer (older_gen)); + size_t size = (generation_allocation_limit (older_gen) - generation_allocation_pointer (older_gen)); if (size != 0) { assert ((size >= Align (min_obj_size))); @@ -9187,7 +9301,7 @@ bool gc_heap::get_card_table_commit_layout (uint8_t* from, uint8_t* to, { return false; } -#ifdef DEBUG +#ifdef _DEBUG size_t offsets[total_bookkeeping_elements + 1]; get_card_table_element_layout(start, end, offsets); @@ -9197,9 +9311,9 @@ bool gc_heap::get_card_table_commit_layout (uint8_t* from, uint8_t* to, assert (offsets[i] == card_table_element_layout[i]); dprintf (REGIONS_LOG, ("%zd", card_table_element_layout[i])); } -#endif //DEBUG +#endif //_DEBUG get_card_table_element_sizes (start, to, new_sizes); -#ifdef DEBUG +#ifdef _DEBUG dprintf (REGIONS_LOG, ("new_sizes")); for (int i = card_table_element; i < total_bookkeeping_elements; i++) { @@ -9216,7 +9330,7 @@ bool gc_heap::get_card_table_commit_layout (uint8_t* from, uint8_t* to, dprintf (REGIONS_LOG, ("%zd", bookkeeping_sizes[i])); } } -#endif //DEBUG +#endif //_DEBUG for (int i = card_table_element; i <= seg_mapping_table_element; i++) { uint8_t* required_begin = nullptr; @@ -9575,10 +9689,10 @@ int gc_heap::grow_brick_card_tables (uint8_t* start, translated_ct = translate_card_table (ct); +#ifdef BACKGROUND_GC dprintf (GC_TABLE_LOG, ("card table: %zx(translated: %zx), seg map: %zx, mark array: %zx", (size_t)ct, (size_t)translated_ct, (size_t)new_seg_mapping_table, (size_t)card_table_mark_array (ct))); -#ifdef BACKGROUND_GC if (hp->is_bgc_in_progress()) { dprintf (GC_TABLE_LOG, ("new low: %p, new high: %p, latest mark array is %p(translate: %p)", @@ -9721,7 +9835,6 @@ int gc_heap::grow_brick_card_tables (uint8_t* start, return 0; } -#endif //!USE_REGIONS //copy all of the arrays managed by the card table for a page aligned range void gc_heap::copy_brick_card_range (uint8_t* la, uint32_t* old_card_table, @@ -9902,6 +10015,25 @@ void gc_heap::copy_brick_card_table() release_card_table (&old_card_table[card_word (card_of(la))]); } +void gc_heap::copy_brick_card_table_on_growth () +{ +#ifdef MULTIPLE_HEAPS + for (int i = 0; i < gc_heap::n_heaps; i++) + { + gc_heap* hp = gc_heap::g_heaps[i]; +#else //MULTIPLE_HEAPS + { + gc_heap* hp = pGenGCHeap; +#endif //MULTIPLE_HEAPS + + if (g_gc_card_table != hp->card_table) + { + hp->copy_brick_card_table (); + } + } +} +#endif //!USE_REGIONS + #ifdef FEATURE_BASICFREEZE // Note that we always insert at the head of the max_generation segment list. BOOL gc_heap::insert_ro_segment (heap_segment* seg) @@ -9943,11 +10075,17 @@ BOOL gc_heap::insert_ro_segment (heap_segment* seg) seg_mapping_table_add_ro_segment (seg); +#ifdef USE_REGIONS + // For regions ro segments are always out of range. + assert (!((heap_segment_reserved (seg) > lowest_address) && + (heap_segment_mem (seg) < highest_address))); +#else if ((heap_segment_reserved (seg) > lowest_address) && (heap_segment_mem (seg) < highest_address)) { set_ro_segment_in_range (seg); } +#endif //USE_REGIONS FIRE_EVENT(GCCreateSegment_V1, heap_segment_mem(seg), (size_t)(heap_segment_reserved (seg) - heap_segment_mem(seg)), gc_etw_segment_read_only_heap); @@ -9955,6 +10093,20 @@ BOOL gc_heap::insert_ro_segment (heap_segment* seg) return TRUE; } +void gc_heap::update_ro_segment (heap_segment* seg, uint8_t* allocated, uint8_t* committed) +{ + enter_spin_lock (&gc_heap::gc_lock); + + assert (use_frozen_segments_p); + assert (heap_segment_read_only_p (seg)); + assert (allocated <= committed); + assert (committed <= heap_segment_reserved (seg)); + heap_segment_allocated (seg) = allocated; + heap_segment_committed (seg) = committed; + + leave_spin_lock (&gc_heap::gc_lock); +} + // No one is calling this function right now. If this is getting called we need // to take care of decommitting the mark array for it - we will need to remember // which portion of the mark array was committed and only decommit that. @@ -10006,13 +10158,6 @@ void gc_heap::remove_ro_segment (heap_segment* seg) } #endif //FEATURE_BASICFREEZE -BOOL gc_heap::set_ro_segment_in_range (heap_segment* seg) -{ - seg->flags |= heap_segment_flags_inrange; - ro_segments_in_range = TRUE; - return TRUE; -} - uint8_t** make_mark_list (size_t size) { uint8_t** mark_list = new (nothrow) uint8_t* [size]; @@ -10263,7 +10408,7 @@ static void do_vxsort (uint8_t** item_array, ptrdiff_t item_count, uint8_t* rang // despite possible downclocking on some devices const size_t AVX2_THRESHOLD_SIZE = 8 * 1024; - // above this threshold, using AVX51F for sorting will likely pay off + // above this threshold, using AVX512F for sorting will likely pay off // despite possible downclocking on current devices const size_t AVX512F_THRESHOLD_SIZE = 128 * 1024; @@ -11451,7 +11596,6 @@ inline size_t my_get_size (Object* ob) ((size_t)((CObjectHeader*)ob)->GetNumComponents() * mT->RawGetComponentSize()) : 0)); } -//#define size(i) header(i)->GetSize() #define size(i) my_get_size (header(i)) #define contain_pointers(i) header(i)->ContainsPointers() @@ -11838,8 +11982,6 @@ heap_segment* gc_heap::get_free_region (int gen_number, size_t size) } else { - // TODO: We should keep enough reserve in the free regions so we don't get OOM when - // this is called within GC when we sweep. region = allocate_new_region (__this, gen_number, (gen_number > max_generation), size); } @@ -12513,6 +12655,16 @@ void gc_heap::rearrange_uoh_segments() freeable_uoh_segment = 0; } +void gc_heap::delay_free_segments() +{ + rearrange_uoh_segments(); +#ifdef BACKGROUND_GC + background_delay_delete_uoh_segments(); + if (!gc_heap::background_running_p()) + rearrange_small_heap_segments(); +#endif //BACKGROUND_GC +} + #ifndef USE_REGIONS void gc_heap::rearrange_heap_segments(BOOL compacting) { @@ -13734,7 +13886,6 @@ void gc_heap::reset_write_watch (BOOL concurrent_p) } } #endif //BACKGROUND_GC - #endif //WRITE_WATCH #ifdef BACKGROUND_GC @@ -13794,7 +13945,6 @@ void gc_heap::make_generation (int gen_num, heap_segment* seg, uint8_t* start) #ifdef USE_REGIONS dprintf (REGIONS_LOG, ("g%d start seg is %zx-%p", gen_num, (size_t)seg, heap_segment_mem (seg))); gen->tail_region = seg; - gen->plan_start_segment = 0; gen->tail_ro_region = 0; #endif //USE_REGIONS gen->allocation_segment = seg; @@ -13944,6 +14094,20 @@ bool allocate_initial_regions(int number_of_heaps) } #endif +void +gc_heap::suspend_EE () +{ + dprintf (2, ("suspend_EE")); + GCToEEInterface::SuspendEE (SUSPEND_FOR_GC_PREP); +} + +void +gc_heap::restart_EE () +{ + dprintf (2, ("restart_EE")); + GCToEEInterface::RestartEE (FALSE); +} + HRESULT gc_heap::initialize_gc (size_t soh_segment_size, size_t loh_segment_size, size_t poh_segment_size @@ -14112,7 +14276,7 @@ HRESULT gc_heap::initialize_gc (size_t soh_segment_size, // big enough to accommodate if we were to materialize all the GC bookkeeping datastructures. // We only need to commit what we use and just need to commit more instead of having to // relocate the existing table and then calling copy_brick_card_table. - // Right now all the non mark array portions are commmitted since I'm calling mark_card_table + // Right now all the non mark array portions are commmitted since I'm calling make_card_table // on the whole range. This can be committed as needed. size_t reserve_size = regions_range; uint8_t* reserve_range = (uint8_t*)virtual_alloc (reserve_size, use_large_pages_p); @@ -14800,12 +14964,12 @@ gc_heap::init_gc_heap (int h_number) more_space_lock_uoh = gc_lock; - ro_segments_in_range = FALSE; - loh_alloc_since_cg = 0; #ifndef USE_REGIONS new_heap_segment = NULL; + + ro_segments_in_range = FALSE; #endif //!USE_REGIONS gen0_allocated_after_gc_p = false; @@ -14846,6 +15010,25 @@ gc_heap::init_gc_heap (int h_number) gc_done_event_lock = -1; gc_done_event_set = false; +#ifdef DYNAMIC_HEAP_COUNT + if (h_number != 0) + { + if (!gc_idle_thread_event.CreateAutoEventNoThrow (FALSE)) + { + return 0; + } + +#ifdef BACKGROUND_GC + if (!bgc_idle_thread_event.CreateAutoEventNoThrow (FALSE)) + { + return 0; + } +#endif //BACKGROUND_GC + + dprintf (9999, ("creating idle events for h%d", h_number)); + } +#endif //DYNAMIC_HEAP_COUNT + if (!init_dynamic_data()) { return 0; @@ -15776,7 +15959,7 @@ void allocator::unlink_item (unsigned int bn, uint8_t* item, uint8_t* prev_item, } #ifdef DOUBLY_LINKED_FL -void allocator::unlink_item_no_undo (unsigned int bn, uint8_t* item, size_t size) +void allocator::unlink_item_no_undo (unsigned int bn, uint8_t* item) { alloc_list* al = &alloc_list_of (bn); @@ -15844,7 +16027,7 @@ void allocator::unlink_item_no_undo (unsigned int bn, uint8_t* item, size_t size void allocator::unlink_item_no_undo (uint8_t* item, size_t size) { unsigned int bn = first_suitable_bucket (size); - unlink_item_no_undo (bn, item, size); + unlink_item_no_undo (bn, item); } void allocator::unlink_item_no_undo_added (unsigned int bn, uint8_t* item, uint8_t* previous_item) @@ -15929,7 +16112,9 @@ int allocator::thread_item_front_added (uint8_t* item, size_t size) return a_l_number; } -#if defined(MULTIPLE_HEAPS) && defined(USE_REGIONS) +#endif //DOUBLY_LINKED_FL + +#ifdef DYNAMIC_HEAP_COUNT // This counts the total fl items, and print out the ones whose heap != this_hp void allocator::count_items (gc_heap* this_hp, size_t* fl_items_count, size_t* fl_items_for_oh_count) { @@ -15956,14 +16141,6 @@ void allocator::count_items (gc_heap* this_hp, size_t* fl_items_count, size_t* f if (region->heap != this_hp) { num_fl_items_for_oh++; - - //if ((num_fl_items_rethread % 1000) == 0) - //{ - // end_us = GetHighPrecisionTimeStamp(); - // dprintf (8888, ("%Id items rethreaded out of %Id items in %I64d us, current fl: %Ix", - // num_fl_items_rethread, num_fl_items, (end_us - start_us), free_item)); - // start_us = end_us; - //} } free_item = free_list_slot (free_item); @@ -15978,6 +16155,7 @@ void allocator::count_items (gc_heap* this_hp, size_t* fl_items_count, size_t* f *fl_items_for_oh_count = num_fl_items_for_oh; } +#ifdef DOUBLY_LINKED_FL void min_fl_list_info::thread_item (uint8_t* item) { free_list_slot (item) = 0; @@ -16001,6 +16179,7 @@ void min_fl_list_info::thread_item (uint8_t* item) tail = item; } +#endif //DOUBLY_LINKED_FL void min_fl_list_info::thread_item_no_prev (uint8_t* item) { @@ -16024,7 +16203,6 @@ void min_fl_list_info::thread_item_no_prev (uint8_t* item) tail = item; } -// This is only implemented for gen2 right now!!!! // the min_fl_list array is arranged as chunks of n_heaps min_fl_list_info, the 1st chunk corresponds to the 1st bucket, // and so on. void allocator::rethread_items (size_t* num_total_fl_items, size_t* num_total_fl_items_rethreaded, gc_heap* current_heap, @@ -16065,12 +16243,14 @@ void allocator::rethread_items (size_t* num_total_fl_items, size_t* num_total_fl uint8_t* next_item = free_list_slot (free_item); int hn = region->heap->heap_number; +#ifdef DOUBLY_LINKED_FL if (is_doubly_linked_p()) { unlink_item_no_undo (free_item, size_o); current_bucket_min_fl_list[hn].thread_item (free_item); } else +#endif //DOUBLY_LINKED_FL { unlink_item (i, free_item, prev_item, FALSE); current_bucket_min_fl_list[hn].thread_item_no_prev (free_item); @@ -16117,10 +16297,13 @@ void allocator::merge_items (gc_heap* current_heap, int to_num_heaps, int from_n if (head_other_heap) { +#ifdef DOUBLY_LINKED_FL if (is_doubly_linked_p()) { free_list_prev (head_other_heap) = tail; } +#endif //DOUBLY_LINKED_FL + uint8_t* saved_head = head; uint8_t* saved_tail = tail; @@ -16138,8 +16321,7 @@ void allocator::merge_items (gc_heap* current_heap, int to_num_heaps, int from_n } } } -#endif //MULTIPLE_HEAPS && USE_REGIONS -#endif //DOUBLY_LINKED_FL +#endif //DYNAMIC_HEAP_COUNT void allocator::clear() { @@ -16577,10 +16759,12 @@ void gc_heap::adjust_limit_clr (uint8_t* start, size_t limit_size, size_t size, size_t aligned_min_obj_size = Align(min_obj_size, align_const); +#ifdef USE_REGIONS if (seg) { assert (heap_segment_used (seg) <= heap_segment_committed (seg)); } +#endif //USE_REGIONS #ifdef MULTIPLE_HEAPS if (gen_number == 0) @@ -17349,7 +17533,7 @@ BOOL gc_heap::a_fit_free_list_uoh_p (size_t size, allocator* allocator = generation_allocator (gen); #ifdef FEATURE_LOH_COMPACTION - size_t loh_pad = gen_number == loh_generation ? Align (loh_padding_obj_size, align_const) : 0; + size_t loh_pad = (gen_number == loh_generation) ? Align (loh_padding_obj_size, align_const) : 0; #endif //FEATURE_LOH_COMPACTION #ifdef BACKGROUND_GC @@ -17392,6 +17576,7 @@ BOOL gc_heap::a_fit_free_list_uoh_p (size_t size, gen_number, align_const); dd_new_allocation (dynamic_data_of (gen_number)) -= limit; + size_t saved_free_list_size = free_list_size; #ifdef FEATURE_LOH_COMPACTION if (loh_pad) { @@ -17420,7 +17605,7 @@ BOOL gc_heap::a_fit_free_list_uoh_p (size_t size, { generation_free_obj_space (gen) += remain_size; } - generation_free_list_space (gen) -= free_list_size; + generation_free_list_space (gen) -= saved_free_list_size; assert ((ptrdiff_t)generation_free_list_space (gen) >= 0); generation_free_list_allocated (gen) += limit; @@ -18811,29 +18996,6 @@ allocation_state gc_heap::try_allocate_more_space (alloc_context* acontext, size } #endif //SYNCHRONIZATION_STATS - /* - // We are commenting this out 'cause we don't see the point - we already - // have checked gc_started when we were acquiring the msl - no need to check - // again. This complicates the logic in bgc_suspend_EE 'cause that one would - // need to release msl which causes all sorts of trouble. - if (gc_heap::gc_started) - { -#ifdef SYNCHRONIZATION_STATS - good_suspension++; -#endif //SYNCHRONIZATION_STATS - BOOL fStress = (g_pConfig->GetGCStressLevel() & GCConfig::GCSTRESS_TRANSITION) != 0; - if (!fStress) - { - //Rendez vous early (MP scaling issue) - //dprintf (1, ("[%d]waiting for gc", heap_number)); - wait_for_gc_done(); -#ifdef MULTIPLE_HEAPS - return -1; -#endif //MULTIPLE_HEAPS - } - } - */ - dprintf (3, ("requested to allocate %zd bytes on gen%d", size, gen_number)); int align_const = get_alignment_constant (gen_number <= max_generation); @@ -20473,10 +20635,8 @@ uint8_t* gc_heap::allocate_in_condemned_generations (generation* gen, heap_segment_mem (seg)); // Verify that all pinned plugs for this segment are consumed if (!pinned_plug_que_empty_p() && - ((pinned_plug (oldest_pin()) < - heap_segment_allocated (seg)) && - (pinned_plug (oldest_pin()) >= - generation_allocation_pointer (gen)))) + ((pinned_plug (oldest_pin()) < heap_segment_allocated (seg)) && + (pinned_plug (oldest_pin()) >= generation_allocation_pointer (gen)))) { LOG((LF_GC, LL_INFO10, "remaining pinned plug %zx while leaving segment on allocation", pinned_plug (oldest_pin()))); @@ -21634,8 +21794,8 @@ int gc_heap::generation_to_condemn (int n_initial, } if (n <= max_generation) - { #endif // HOST_64BIT + { if (high_fragmentation) { //elevate to max_generation @@ -21666,9 +21826,7 @@ int gc_heap::generation_to_condemn (int n_initial, n = max (n, max_generation - 1); dprintf (GTC_LOG, ("h%d: nf c %d", heap_number, n)); } -#ifdef HOST_64BIT } -#endif // HOST_64BIT } if (!provisional_mode_triggered && (n == (max_generation - 1)) && (n_alloc < (max_generation -1))) @@ -21986,11 +22144,70 @@ BOOL gc_heap::should_proceed_with_gc() void gc_heap::update_end_gc_time_per_heap() { +#ifdef DYNAMIC_HEAP_COUNT + size_t prev_gen2_end_time = 0; + if ((heap_number == 0) && (dynamic_adaptation_mode == dynamic_adaptation_to_application_sizes) && (settings.condemned_generation == max_generation)) + { + dynamic_data* dd = dynamic_data_of (max_generation); + prev_gen2_end_time = dd_previous_time_clock (dd) + dd_gc_elapsed_time (dd);; + } +#endif //DYNAMIC_HEAP_COUNT + for (int gen_number = 0; gen_number <= settings.condemned_generation; gen_number++) { dynamic_data* dd = dynamic_data_of (gen_number); + + if (heap_number == 0) + { + dprintf (6666, ("prev gen%d GC end time: prev start %I64d + prev gc elapsed %Id = %I64d", + gen_number, dd_previous_time_clock (dd), dd_gc_elapsed_time (dd), (dd_previous_time_clock (dd) + dd_gc_elapsed_time (dd)))); + } + dd_gc_elapsed_time (dd) = (size_t)(end_gc_time - dd_time_clock (dd)); + + if (heap_number == 0) + { + dprintf (6666, ("updated NGC%d %Id elapsed time to %I64d - %I64d = %I64d", gen_number, dd_gc_clock (dd), end_gc_time, dd_time_clock (dd), dd_gc_elapsed_time (dd))); + } + } + +#ifdef DYNAMIC_HEAP_COUNT + if ((heap_number == 0) && (dynamic_adaptation_mode == dynamic_adaptation_to_application_sizes)) + { + dynamic_heap_count_data_t::sample& sample = dynamic_heap_count_data.samples[dynamic_heap_count_data.sample_index]; + sample.elapsed_between_gcs = end_gc_time - last_suspended_end_time; + sample.gc_pause_time = dd_gc_elapsed_time (dynamic_data_of (0)); + sample.msl_wait_time = get_msl_wait_time(); + + dprintf (6666, ("sample#%d: this GC end %I64d - last sus end %I64d = %I64d, this GC pause %I64d, msl wait %I64d", + dynamic_heap_count_data.sample_index, end_gc_time, last_suspended_end_time, sample.elapsed_between_gcs, sample.gc_pause_time, sample.msl_wait_time)); + + last_suspended_end_time = end_gc_time; + + GCEventFireHeapCountSample_V1 ( + (uint64_t)VolatileLoadWithoutBarrier (&settings.gc_index), + sample.elapsed_between_gcs, + sample.gc_pause_time, + sample.msl_wait_time); + + dynamic_heap_count_data.sample_index = (dynamic_heap_count_data.sample_index + 1) % dynamic_heap_count_data_t::sample_size; + + if (settings.condemned_generation == max_generation) + { + gc_index_full_gc_end = dd_gc_clock (dynamic_data_of (0)); + size_t elapsed_between_gen2_gcs = end_gc_time - prev_gen2_end_time; + size_t gen2_elapsed_time = sample.gc_pause_time; + dynamic_heap_count_data.gen2_gc_percents[dynamic_heap_count_data.gen2_sample_index] = (float)gen2_elapsed_time * 100.0f / elapsed_between_gen2_gcs; + + dprintf (6666, ("gen2 sample#%d: this GC end %I64d - last gen2 end %I64d = %I64d, GC elapsed %I64d, percent %.3f", + dynamic_heap_count_data.gen2_sample_index, end_gc_time, prev_gen2_end_time, elapsed_between_gen2_gcs, + gen2_elapsed_time, dynamic_heap_count_data.gen2_gc_percents[dynamic_heap_count_data.gen2_sample_index])); + dynamic_heap_count_data.gen2_sample_index = (dynamic_heap_count_data.gen2_sample_index + 1) % dynamic_heap_count_data_t::sample_size; + } + + calculate_new_heap_count (); } +#endif //DYNAMIC_HEAP_COUNT } void gc_heap::update_end_ngc_time() @@ -22104,7 +22321,7 @@ void gc_heap::gc1() else #endif //BACKGROUND_GC { - mark_phase (n, FALSE); + mark_phase (n); check_gen0_bricks(); @@ -22137,7 +22354,31 @@ void gc_heap::gc1() { dynamic_data* dd = dynamic_data_of (n); end_gc_time = GetHighPrecisionTimeStamp(); + size_t time_since_last_gen2 = 0; + +#ifdef DYNAMIC_HEAP_COUNT + if ((heap_number == 0) && (dynamic_adaptation_mode == dynamic_adaptation_to_application_sizes)) + { + time_since_last_gen2 = (size_t)(end_gc_time - (dd_previous_time_clock (dd) + dd_gc_elapsed_time (dd))); + dprintf (6666, ("BGC %Id end %I64d - (prev gen2 start %I64d + elapsed %Id = %I64d) = time inbewteen gen2 %Id", + dd_gc_clock (dd), end_gc_time, dd_previous_time_clock (dd), dd_gc_elapsed_time (dd), (dd_previous_time_clock (dd) + dd_gc_elapsed_time (dd)), time_since_last_gen2)); + } +#endif //DYNAMIC_HEAP_COUNT + dd_gc_elapsed_time (dd) = (size_t)(end_gc_time - dd_time_clock (dd)); +#ifdef DYNAMIC_HEAP_COUNT + if ((heap_number == 0) && (dynamic_adaptation_mode == dynamic_adaptation_to_application_sizes)) + { + dprintf (6666, ("updating BGC %Id elapsed time to %I64d - %I64d = %I64d", dd_gc_clock (dd), end_gc_time, dd_time_clock (dd), dd_gc_elapsed_time (dd))); + + float bgc_percent = (float)dd_gc_elapsed_time (dd) * 100.0f / (float)time_since_last_gen2; + dynamic_heap_count_data.gen2_gc_percents[dynamic_heap_count_data.gen2_sample_index] = bgc_percent; + dprintf (6666, ("gen2 sample %d elapsed %Id * 100 / time inbetween gen2 %Id = %.3f", + dynamic_heap_count_data.gen2_sample_index, dd_gc_elapsed_time (dd), time_since_last_gen2, bgc_percent)); + dynamic_heap_count_data.gen2_sample_index = (dynamic_heap_count_data.gen2_sample_index + 1) % dynamic_heap_count_data_t::sample_size; + gc_index_full_gc_end = dd_gc_clock (dynamic_data_of (0)); + } +#endif //DYNAMIC_HEAP_COUNT #ifdef HEAP_BALANCE_INSTRUMENTATION if (heap_number == 0) @@ -22195,7 +22436,7 @@ void gc_heap::gc1() for (int older_gen_idx = (1 + n); older_gen_idx <= highest_gen_number; older_gen_idx++) { - compute_promoted_allocation (older_gen_idx); + compute_in (older_gen_idx); dynamic_data* dd = dynamic_data_of (older_gen_idx); size_t new_fragmentation = generation_free_list_space (generation_of (older_gen_idx)) + @@ -22744,7 +22985,12 @@ void gc_heap::merge_fl_from_other_heaps (int gen_idx, int to_n_heaps, int from_n assert (free_list_space_decrease <= generation_free_list_space (gen)); generation_free_list_space (gen) -= free_list_space_decrease; - assert (free_list_space_decrease <= dd_fragmentation (dd)); + // TODO - I'm seeing for gen2 this is free_list_space_decrease can be a bit larger than frag. + // Need to fix this later. + if (gen_idx != max_generation) + { + assert (free_list_space_decrease <= dd_fragmentation (dd)); + } size_t free_list_space_increase = 0; for (int from_hn = 0; from_hn < from_n_heaps; from_hn++) @@ -23719,9 +23965,6 @@ void gc_heap::garbage_collect (int n) #ifdef MULTIPLE_HEAPS gc_start_event.Reset(); -#ifdef DYNAMIC_HEAP_COUNT - gc_idle_thread_event.Reset(); -#endif //DYNAMIC_HEAP_COUNT gc_t_join.restart(); #endif //MULTIPLE_HEAPS } @@ -23743,6 +23986,9 @@ void gc_heap::garbage_collect (int n) #endif // STRESS_HEAP #ifdef MULTIPLE_HEAPS +#ifdef STRESS_DYNAMIC_HEAP_COUNT + Interlocked::Increment (&heaps_in_this_gc); +#endif //STRESS_DYNAMIC_HEAP_COUNT //align all heaps on the max generation to condemn dprintf (3, ("Joining for max generation to condemn")); condemned_generation_num = generation_to_condemn (n, @@ -23757,31 +24003,31 @@ void gc_heap::garbage_collect (int n) seg_table->delete_old_slots(); #endif //FEATURE_BASICFREEZE +#ifndef USE_REGIONS + copy_brick_card_table_on_growth (); +#endif //!USE_REGIONS + #ifdef MULTIPLE_HEAPS +#ifdef STRESS_DYNAMIC_HEAP_COUNT + dprintf (9999, ("%d heaps, join sees %d, actually joined %d, %d idle threads (%d)", + n_heaps, gc_t_join.get_num_threads (), heaps_in_this_gc, + VolatileLoadWithoutBarrier(&dynamic_heap_count_data.idle_thread_count), (n_max_heaps - n_heaps))); + if (heaps_in_this_gc != n_heaps) + { + dprintf (9999, ("should have %d heaps but actually have %d!!", n_heaps, heaps_in_this_gc)); + GCToOSInterface::DebugBreak (); + } + + heaps_in_this_gc = 0; +#endif //STRESS_DYNAMIC_HEAP_COUNT + for (int i = 0; i < n_heaps; i++) { gc_heap* hp = g_heaps[i]; - // check for card table growth - if (g_gc_card_table != hp->card_table) - hp->copy_brick_card_table(); - - hp->rearrange_uoh_segments(); -#ifdef BACKGROUND_GC - hp->background_delay_delete_uoh_segments(); - if (!gc_heap::background_running_p()) - hp->rearrange_small_heap_segments(); -#endif //BACKGROUND_GC + hp->delay_free_segments(); } #else //MULTIPLE_HEAPS - if (g_gc_card_table != card_table) - copy_brick_card_table(); - - rearrange_uoh_segments(); -#ifdef BACKGROUND_GC - background_delay_delete_uoh_segments(); - if (!gc_heap::background_running_p()) - rearrange_small_heap_segments(); -#endif //BACKGROUND_GC + delay_free_segments(); #endif //MULTIPLE_HEAPS BOOL should_evaluate_elevation = TRUE; @@ -23868,10 +24114,8 @@ void gc_heap::garbage_collect (int n) do_pre_gc(); #ifdef MULTIPLE_HEAPS + dprintf (9999, ("in GC, resetting gc_start")); gc_start_event.Reset(); -#ifdef DYNAMIC_HEAP_COUNT - gc_idle_thread_event.Reset(); -#endif //DYNAMIC_HEAP_COUNT dprintf(3, ("Starting all gc threads for gc")); gc_t_join.restart(); #endif //MULTIPLE_HEAPS @@ -24327,7 +24571,7 @@ void gc_heap::equalize_promoted_bytes(int condemned_gen_number) // hope is to achieve better work balancing in relocate and compact phases // this is also used when the heap count changes to balance regions between heaps int highest_gen_number = ((condemned_gen_number == max_generation) ? - (total_generation_count - 1) : condemned_gen_number); + (total_generation_count - 1) : condemned_gen_number); int stop_gen_idx = get_stop_generation_index (condemned_gen_number); for (int gen_idx = highest_gen_number; gen_idx >= stop_gen_idx; gen_idx--) @@ -24674,7 +24918,6 @@ void gc_heap::check_decommissioned_heap() assert (generation_tail_region (gen) == DECOMMISSIONED_REGION_P); assert (generation_tail_ro_region (gen) == DECOMMISSIONED_REGION_P); assert (generation_allocation_context_start_region (gen) == DECOMMISSIONED_UINT8_T_P); - assert (gen->plan_start_segment == DECOMMISSIONED_REGION_P); assert (generation_free_list_allocated (gen) == DECOMMISSIONED_SIZE_T); assert (generation_end_seg_allocated (gen) == DECOMMISSIONED_SIZE_T); assert (generation_allocate_end_seg_p (gen) == DECOMMISSIONED_BOOL); @@ -24811,7 +25054,6 @@ void gc_heap::decommission_heap() generation_allocation_segment (gen) = DECOMMISSIONED_REGION_P; generation_allocation_context_start_region (gen) = DECOMMISSIONED_UINT8_T_P; generation_tail_region (gen) = DECOMMISSIONED_REGION_P; - gen->plan_start_segment = DECOMMISSIONED_REGION_P; generation_tail_ro_region (gen) = DECOMMISSIONED_REGION_P; generation_free_list_allocated (gen) = DECOMMISSIONED_SIZE_T; @@ -24930,8 +25172,10 @@ void gc_heap::recommission_heap() soh_allocation_no_gc = 0; loh_allocation_no_gc = 0; +#ifdef BACKGROUND_GC // initialize the background GC sync mechanism bgc_alloc_lock->init(); +#endif //BACKGROUND_GC gc_heap* heap0 = g_heaps[0]; @@ -24951,8 +25195,6 @@ void gc_heap::recommission_heap() generation_allocation_segment (gen) = nullptr; generation_allocation_context_start_region (gen) = nullptr; - gen->plan_start_segment = nullptr; - generation_free_list_allocated (gen) = 0; generation_end_seg_allocated (gen) = 0; generation_allocate_end_seg_p (gen) = 0; @@ -25036,285 +25278,332 @@ void gc_heap::recommission_heap() #endif //RECORD_LOH_STATE } -void gc_heap::check_heap_count () +float median_of_3 (float a, float b, float c) { - dynamic_heap_count_data.new_n_heaps = n_heaps; +#define compare_and_swap(i, j) \ + { \ + if (i < j) \ + { \ + float t = i; \ + i = j; \ + j = t; \ + } \ + } + compare_and_swap (b, a); + compare_and_swap (c, a); + compare_and_swap (c, b); +#undef compare_and_swap + return b; +} - if (dynamic_adaptation_mode != dynamic_adaptation_to_application_sizes) +size_t gc_heap::get_num_completed_gcs () +{ + size_t num_completed_gcs = settings.gc_index; +#ifdef BACKGROUND_GC + if (g_heaps[0]->is_bgc_in_progress ()) { - return; + num_completed_gcs--; + dprintf (6666, ("BGC in prog, completed GCs -> %Id", num_completed_gcs)); } +#endif //BACKGROUND_GC - // we should be calling this only on the main GC thread - assert (heap_number == 0); + return num_completed_gcs; +} - // acquire data for the current sample - uint64_t soh_msl_wait_time = 0; - uint64_t uoh_msl_wait_time = 0; - size_t allocating_thread_count = 0; - size_t heap_size = 0; - for (int i = 0; i < n_heaps; i++) +int gc_heap::calculate_new_heap_count () +{ + assert (dynamic_adaptation_mode == dynamic_adaptation_to_application_sizes); + + size_t num_completed_gcs = get_num_completed_gcs (); + + dprintf (6666, ("current GC %Id(completed: %Id), prev completed GCs %Id, last full GC happened at index %Id", + VolatileLoadWithoutBarrier (&settings.gc_index), num_completed_gcs, dynamic_heap_count_data.prev_num_completed_gcs, gc_index_full_gc_end)); + + if (num_completed_gcs < (dynamic_heap_count_data.prev_num_completed_gcs + dynamic_heap_count_data_t::sample_size)) { - gc_heap* hp = g_heaps[i]; + dprintf (6666, ("not enough GCs, skipping")); + return n_heaps; + } - allocating_thread_count += hp->alloc_contexts_used; + float median_gen2_tcp_percent = 0.0f; + if (gc_index_full_gc_end >= (settings.gc_index - dynamic_heap_count_data_t::sample_size)) + { + median_gen2_tcp_percent = dynamic_heap_count_data.get_median_gen2_gc_percent (); + } - soh_msl_wait_time += hp->more_space_lock_soh.msl_wait_time; - hp->more_space_lock_soh.msl_wait_time = 0; - hp->more_space_lock_soh.msl_wait_count = 0; + // If there was a blocking gen2 GC, the overhead would be very large and most likely we would not pick it. So we + // rely on the gen2 sample's overhead calculated above. + float throughput_cost_percents[dynamic_heap_count_data_t::sample_size]; + for (int i = 0; i < dynamic_heap_count_data_t::sample_size; i++) + { + dynamic_heap_count_data_t::sample& sample = dynamic_heap_count_data.samples[i]; + throughput_cost_percents[i] = (sample.elapsed_between_gcs ? (((float)sample.msl_wait_time / n_heaps + sample.gc_pause_time) * 100.0f / (float)sample.elapsed_between_gcs) : 0.0f); + assert (throughput_cost_percents[i] >= 0.0); + if (throughput_cost_percents[i] > 100.0) + throughput_cost_percents[i] = 100.0; + dprintf (6666, ("sample %d: msl %I64d / %d + pause %I64d / elapsed %I64d = throughput_cost_percent: %.3f", i, + sample.msl_wait_time, n_heaps, sample.gc_pause_time, sample.elapsed_between_gcs, throughput_cost_percents[i])); + } - uoh_msl_wait_time += hp->more_space_lock_uoh.msl_wait_time; - hp->more_space_lock_uoh.msl_wait_time = 0; - hp->more_space_lock_uoh.msl_wait_count = 0; + float median_throughput_cost_percent = median_of_3 (throughput_cost_percents[0], throughput_cost_percents[1], throughput_cost_percents[2]); + + // apply exponential smoothing and use 1/3 for the smoothing factor + const float smoothing = 3; + float smoothed_median_throughput_cost_percent = dynamic_heap_count_data.smoothed_median_throughput_cost_percent; + if (smoothed_median_throughput_cost_percent != 0.0f) + { + // average it with the previous value + smoothed_median_throughput_cost_percent = median_throughput_cost_percent / smoothing + (smoothed_median_throughput_cost_percent / smoothing) * (smoothing - 1); + } + else + { + smoothed_median_throughput_cost_percent = median_throughput_cost_percent; + } + + dprintf (6666, ("median tcp: %.3f, smoothed tcp: %.3f, gen2 tcp %.3f(%.3f, %.3f, %.3f)", + median_throughput_cost_percent, smoothed_median_throughput_cost_percent, median_gen2_tcp_percent, + dynamic_heap_count_data.gen2_gc_percents[0], dynamic_heap_count_data.gen2_gc_percents[1], dynamic_heap_count_data.gen2_gc_percents[2])); + + size_t heap_size = 0; + for (int i = 0; i < n_heaps; i++) + { + gc_heap* hp = g_heaps[i]; for (int gen_idx = 0; gen_idx < total_generation_count; gen_idx++) { dynamic_data* dd = hp->dynamic_data_of (gen_idx); // estimate the size of each generation as the live data size plus the budget - heap_size += dd_promoted_size (dd) + dd_desired_allocation (dd); - dprintf (6666, ("h%d g%d promoted: %zd desired allocation: %zd", i, gen_idx, dd_promoted_size (dd), dd_desired_allocation (dd))); + heap_size += dd_current_size (dd) + dd_desired_allocation (dd); + dprintf (3, ("h%d g%d current: %zd desired allocation: %zd", i, gen_idx, dd_promoted_size (dd), dd_desired_allocation (dd))); } } - dynamic_data* hp0_dd0 = g_heaps[0]->dynamic_data_of (0); + // estimate the space cost of adding a heap as the min gen0 budget + size_t heap_space_cost_per_heap = dd_min_size (g_heaps[0]->dynamic_data_of (0)); - // persist data for the current sample - dynamic_heap_count_data_t::sample& sample = dynamic_heap_count_data.samples[dynamic_heap_count_data.sample_index]; + // compute the % space cost of adding a heap + float percent_heap_space_cost_per_heap = heap_space_cost_per_heap * 100.0f / heap_size; - sample.soh_msl_wait_time = soh_msl_wait_time / n_heaps; - sample.uoh_msl_wait_time = uoh_msl_wait_time / n_heaps; - sample.elapsed_between_gcs = dd_time_clock (hp0_dd0) - dd_previous_time_clock (hp0_dd0); - sample.gc_elapsed_time = dd_gc_elapsed_time (hp0_dd0); - sample.allocating_thread_count = allocating_thread_count; - sample.heap_size = heap_size; + // compute reasonable step sizes for the heap count + // + // on the way up, we essentially multiply the heap count by 1.5, so we go 1, 2, 3, 5, 8 ... + // we don't go all the way to the number of CPUs, but stay 1 or 2 short + int step_up = (n_heaps + 1) / 2; + int extra_heaps = 1 + (n_max_heaps >= 32); + step_up = min (step_up, n_max_heaps - extra_heaps - n_heaps); - dprintf (6666, ("sample %d: soh_msl_wait_time: %zd, uoh_msl_wait_time: %zd, elapsed_between_gcs: %zd, gc_elapsed_time: %d, heap_size: %zd MB", - dynamic_heap_count_data.sample_index, - sample.soh_msl_wait_time, - sample.uoh_msl_wait_time, - sample.elapsed_between_gcs, - sample.gc_elapsed_time, - sample.heap_size/(1024*1024))); + // on the way down, we essentially divide the heap count by 1.5 + int step_down = (n_heaps + 1) / 3; - dynamic_heap_count_data.sample_index = (dynamic_heap_count_data.sample_index + 1) % dynamic_heap_count_data_t::sample_size; + // estimate the potential time benefit of going up a step + float tcp_reduction_per_step_up = smoothed_median_throughput_cost_percent * step_up / (n_heaps + step_up); - GCEventFireHeapCountSample_V1( - sample.gc_elapsed_time, - sample.soh_msl_wait_time, - sample.uoh_msl_wait_time, - sample.elapsed_between_gcs - ); + // estimate the potential time cost of going down a step + float tcp_increase_per_step_down = smoothed_median_throughput_cost_percent * step_down / (n_heaps - step_down); + + // estimate the potential space cost of going up a step + float scp_increase_per_step_up = percent_heap_space_cost_per_heap * step_up; - if (settings.gc_index < prev_change_heap_count_gc_index + 3) + // estimate the potential space saving of going down a step + float scp_decrease_per_step_down = percent_heap_space_cost_per_heap * step_down; + + dprintf (6666, ("[CHP] u %d, d %d | space cost %Id / heap %Id(%.2fmb) = scp %.3f (u: %.3f, d: %.3f) | stcp %.3f, u * %.1f = %.3f, d * %.1f = %.3f", + step_up, step_down, + heap_space_cost_per_heap, heap_size, ((float)heap_size / (float)1000 / (float)1000), percent_heap_space_cost_per_heap, + scp_increase_per_step_up, scp_decrease_per_step_down, + smoothed_median_throughput_cost_percent, + ((float)step_up / (float)(n_heaps + step_up)), tcp_reduction_per_step_up, + ((float)step_down / (float)(n_heaps - step_down)), tcp_increase_per_step_down)); + +#ifdef STRESS_DYNAMIC_HEAP_COUNT + // quick hack for initial testing + int new_n_heaps = (int)gc_rand::get_rand (n_max_heaps - 1) + 1; + + // if we are adjusting down, make sure we adjust lower than the lowest uoh msl heap + if ((new_n_heaps < n_heaps) && (dynamic_heap_count_data.lowest_heap_with_msl_uoh != -1)) { - // reconsider the decision every few gcs - return; + new_n_heaps = min (dynamic_heap_count_data.lowest_heap_with_msl_uoh, new_n_heaps); + new_n_heaps = max (new_n_heaps, 1); } - - if (gc_heap::background_running_p()) + dprintf (6666, ("stress %d -> %d", n_heaps, new_n_heaps)); +#else //STRESS_DYNAMIC_HEAP_COUNT + int new_n_heaps = n_heaps; + if (median_throughput_cost_percent > 10.0f) { - // can't have background gc running while we change the number of heaps - // so it's useless to compute a new number of heaps here + // ramp up more agressively - use as many heaps as it would take to bring + // the tcp down to 5% + new_n_heaps = (int)(n_heaps * (median_throughput_cost_percent / 5.0)); + dprintf (6666, ("[CHP0] tcp %.3f -> %d * %.3f = %d", median_throughput_cost_percent, n_heaps, (median_throughput_cost_percent / 5.0), new_n_heaps)); + new_n_heaps = min (new_n_heaps, n_max_heaps - extra_heaps); } - else + // if the median tcp is 10% or less, react slower + else if ((smoothed_median_throughput_cost_percent > 5.0f) || (median_gen2_tcp_percent > 10.0f)) { - // compute the % overhead from msl waiting time and gc time for each of the samples - float percent_overhead[dynamic_heap_count_data_t::sample_size]; - for (int i = 0; i < dynamic_heap_count_data_t::sample_size; i++) - { - dynamic_heap_count_data_t::sample& sample = dynamic_heap_count_data.samples[i]; - uint64_t overhead_time = sample.soh_msl_wait_time + sample.uoh_msl_wait_time + sample.gc_elapsed_time; - percent_overhead[i] = overhead_time * 100.0f / sample.elapsed_between_gcs; - if (percent_overhead[i] < 0) - percent_overhead[i] = 0; - else if (percent_overhead[i] > 100) - percent_overhead[i] = 100; - dprintf (6666, ("sample %d: percent_overhead: %d%%", i, (int)percent_overhead[i])); - } - // compute the median of the percent overhead samples - #define compare_and_swap(i, j) \ - { \ - if (percent_overhead[i] < percent_overhead[j]) \ - { \ - float t = percent_overhead[i]; \ - percent_overhead[i] = percent_overhead[j]; \ - percent_overhead[j] = t; \ - } \ - } - compare_and_swap (1, 0); - compare_and_swap (2, 0); - compare_and_swap (2, 1); - #undef compare_and_swap - - // the middle element is the median overhead percentage - float median_percent_overhead = percent_overhead[1]; - - // apply exponential smoothing and use 1/3 for the smoothing factor - const float smoothing = 3; - float smoothed_median_percent_overhead = dynamic_heap_count_data.smoothed_median_percent_overhead; - if (smoothed_median_percent_overhead != 0.0f) - { - // average it with the previous value - smoothed_median_percent_overhead = median_percent_overhead / smoothing + (smoothed_median_percent_overhead / smoothing) * (smoothing - 1); + if (smoothed_median_throughput_cost_percent > 5.0f) + { + dprintf (6666, ("[CHP1] stcp %.3f > 5, %d + %d = %d", smoothed_median_throughput_cost_percent, n_heaps, step_up, (n_heaps + step_up))); } else { - // first time? initialize to the median - smoothed_median_percent_overhead = median_percent_overhead; + dprintf (6666, ("[CHP2] tcp %.3f > 10, %d + %d = %d", median_gen2_tcp_percent, n_heaps, step_up, (n_heaps + step_up))); } + new_n_heaps += step_up; + } + // if we can save at least 1% more in time than we spend in space, increase number of heaps + else if ((tcp_reduction_per_step_up - scp_increase_per_step_up) >= 1.0f) + { + dprintf (6666, ("[CHP3] % .3f - % .3f = % .3f, % d + % d = % d", + tcp_reduction_per_step_up, scp_increase_per_step_up, (tcp_reduction_per_step_up - scp_increase_per_step_up), + n_heaps, step_up, (n_heaps + step_up))); + new_n_heaps += step_up; + } + // if we can save at least 1% more in space than we spend in time, decrease number of heaps + else if ((smoothed_median_throughput_cost_percent < 1.0f) && + (median_gen2_tcp_percent < 5.0f) && + ((scp_decrease_per_step_down - tcp_increase_per_step_down) >= 1.0f)) + { + dprintf (6666, ("[CHP4] stcp %.3f tcp %.3f, %.3f - %.3f = %.3f, %d + %d = %d", + smoothed_median_throughput_cost_percent, median_gen2_tcp_percent, + scp_decrease_per_step_down, tcp_increase_per_step_down, (scp_decrease_per_step_down - tcp_increase_per_step_down), + n_heaps, step_up, (n_heaps + step_up))); + new_n_heaps -= step_down; + } - dprintf (6666, ("median overhead: %d%% smoothed median overhead: %d%%", (int)(median_percent_overhead*1000), (int)(smoothed_median_percent_overhead*1000))); - - // estimate the space cost of adding a heap as the min gen0 size - size_t heap_space_cost_per_heap = dd_min_size (hp0_dd0); - - // compute the % space cost of adding a heap - float percent_heap_space_cost_per_heap = heap_space_cost_per_heap * 100.0f / heap_size; - - // compute reasonable step sizes for the heap count + assert (new_n_heaps >= 1); + assert (new_n_heaps <= n_max_heaps); +#endif //STRESS_DYNAMIC_HEAP_COUNT - // on the way up, we essentially multiply the heap count by 1.5, so we go 1, 2, 3, 5, 8 ... - // we don't go all the way to the number of CPUs, but stay 1 or 2 short - int step_up = (n_heaps + 1) / 2; - int extra_heaps = 1 + (n_max_heaps >= 32); - step_up = min (step_up, n_max_heaps - extra_heaps - n_heaps); + // store data used for decision to emit in ETW event + dynamic_heap_count_data.median_throughput_cost_percent = median_throughput_cost_percent; + dynamic_heap_count_data.smoothed_median_throughput_cost_percent = smoothed_median_throughput_cost_percent; + dynamic_heap_count_data.percent_heap_space_cost_per_heap = percent_heap_space_cost_per_heap; + dynamic_heap_count_data.tcp_reduction_per_step_up = tcp_reduction_per_step_up; + dynamic_heap_count_data.tcp_increase_per_step_down = tcp_increase_per_step_down; + dynamic_heap_count_data.scp_increase_per_step_up = scp_increase_per_step_up; + dynamic_heap_count_data.scp_decrease_per_step_down = scp_decrease_per_step_down; + + GCEventFireHeapCountTuning_V1 ( + (uint16_t)dynamic_heap_count_data.new_n_heaps, + (uint64_t)VolatileLoadWithoutBarrier (&settings.gc_index), + dynamic_heap_count_data.median_throughput_cost_percent, + dynamic_heap_count_data.smoothed_median_throughput_cost_percent, + dynamic_heap_count_data.tcp_reduction_per_step_up, + dynamic_heap_count_data.tcp_increase_per_step_down, + dynamic_heap_count_data.scp_increase_per_step_up, + dynamic_heap_count_data.scp_decrease_per_step_down + ); - // on the way down, we essentially divide the heap count by 1.5 - int step_down = (n_heaps + 1) / 3; + dynamic_heap_count_data.prev_num_completed_gcs = num_completed_gcs; - // estimate the potential time benefit of going up a step - float overhead_reduction_per_step_up = smoothed_median_percent_overhead * step_up / (n_heaps + step_up); + if (new_n_heaps != n_heaps) + { + dprintf (6666, ("should change! %d->%d", n_heaps, new_n_heaps)); + dynamic_heap_count_data.heap_count_to_change_to = new_n_heaps; + dynamic_heap_count_data.should_change_heap_count = true; + } - // estimate the potential time cost of going down a step - float overhead_increase_per_step_down = smoothed_median_percent_overhead * step_down / (n_heaps - step_down); + return new_n_heaps; +} - // estimate the potential space cost of going up a step - float space_cost_increase_per_step_up = percent_heap_space_cost_per_heap * step_up; +void gc_heap::check_heap_count () +{ + dynamic_heap_count_data.new_n_heaps = dynamic_heap_count_data.heap_count_to_change_to; - // estimate the potential space saving of going down a step - float space_cost_decrease_per_step_down = percent_heap_space_cost_per_heap * step_down; + assert (dynamic_heap_count_data.new_n_heaps != n_heaps); -#ifdef STRESS_DYNAMIC_HEAP_COUNT - // quick hack for initial testing - int new_n_heaps = (int)gc_rand::get_rand (n_max_heaps - 1) + 1; + if (dynamic_heap_count_data.new_n_heaps != n_heaps) + { + dprintf (9999, ("h0 suspending EE in check")); + // can't have threads allocating while we change the number of heaps + GCToEEInterface::SuspendEE(SUSPEND_FOR_GC_PREP); + dprintf (9999, ("h0 suspended EE in check")); - // if we are adjusting down, make sure we adjust lower than the lowest uoh msl heap - if ((new_n_heaps < n_heaps) && (dynamic_heap_count_data.lowest_heap_with_msl_uoh != -1)) +#ifdef BACKGROUND_GC + if (gc_heap::background_running_p()) { - new_n_heaps = min (dynamic_heap_count_data.lowest_heap_with_msl_uoh, new_n_heaps); + // background GC is running - reset the new heap count + dynamic_heap_count_data.new_n_heaps = n_heaps; + dprintf (6666, ("can't change heap count! BGC in progress")); - // but not down to zero, obviously... - new_n_heaps = max (new_n_heaps, 1); - } -#else //STRESS_DYNAMIC_HEAP_COUNT - int new_n_heaps = n_heaps; - if (median_percent_overhead > 10.0f) - { - // ramp up more agressively - use as many heaps as it would take to bring - // the overhead down to 5% - new_n_heaps = (int)(n_heaps * (median_percent_overhead / 5.0)); - new_n_heaps = min (new_n_heaps, n_max_heaps - extra_heaps); - } - // if the median overhead is 10% or less, react slower - else if (smoothed_median_percent_overhead > 5.0f) - { - new_n_heaps += step_up; - } - // if we can save at least 1% more in time than we spend in space, increase number of heaps - else if (overhead_reduction_per_step_up - space_cost_increase_per_step_up >= 1.0f) - { - new_n_heaps += step_up; - } - // if we can save at least 1% more in space than we spend in time, decrease number of heaps - else if (smoothed_median_percent_overhead < 1.0f && space_cost_decrease_per_step_down - overhead_increase_per_step_down >= 1.0f) - { - new_n_heaps -= step_down; + GCToEEInterface::RestartEE(TRUE); } +#endif //BACKGROUND_GC + } - dprintf (6666, ("or: %d, si: %d, sd: %d, oi: %d => %d -> %d", - (int)overhead_reduction_per_step_up, - (int)space_cost_increase_per_step_up, - (int)space_cost_decrease_per_step_down, - (int)overhead_increase_per_step_down, - n_heaps, - new_n_heaps)); - - assert (1 <= new_n_heaps); - assert (new_n_heaps <= n_max_heaps); -#endif //STRESS_DYNAMIC_HEAP_COUNT - - dynamic_heap_count_data.new_n_heaps = new_n_heaps; - - // store data used for decision to emit in ETW event - dynamic_heap_count_data.median_percent_overhead = median_percent_overhead; - dynamic_heap_count_data.smoothed_median_percent_overhead = smoothed_median_percent_overhead; - dynamic_heap_count_data.percent_heap_space_cost_per_heap = percent_heap_space_cost_per_heap; - dynamic_heap_count_data.overhead_reduction_per_step_up = overhead_reduction_per_step_up; - dynamic_heap_count_data.overhead_increase_per_step_down = overhead_increase_per_step_down; - dynamic_heap_count_data.space_cost_increase_per_step_up = space_cost_increase_per_step_up; - dynamic_heap_count_data.space_cost_decrease_per_step_down = space_cost_decrease_per_step_down; - - GCEventFireHeapCountTuning_V1( - (uint16_t)dynamic_heap_count_data.new_n_heaps, - (uint64_t)VolatileLoad(&settings.gc_index), - dynamic_heap_count_data.median_percent_overhead, - dynamic_heap_count_data.smoothed_median_percent_overhead, - dynamic_heap_count_data.overhead_reduction_per_step_up, - dynamic_heap_count_data.overhead_increase_per_step_down, - dynamic_heap_count_data.space_cost_increase_per_step_up, - dynamic_heap_count_data.space_cost_decrease_per_step_down - ); - - if (new_n_heaps != n_heaps) + if (dynamic_heap_count_data.new_n_heaps != n_heaps) + { + dprintf (6666, ("prep to change from %d to %d", n_heaps, dynamic_heap_count_data.new_n_heaps)); + if (!prepare_to_change_heap_count (dynamic_heap_count_data.new_n_heaps)) { - // can't have threads allocating while we change the number of heaps - GCToEEInterface::SuspendEE(SUSPEND_FOR_GC_PREP); - - if (gc_heap::background_running_p()) - { - // background GC is running - reset the new heap count - dynamic_heap_count_data.new_n_heaps = n_heaps; - - GCToEEInterface::RestartEE(TRUE); - } + // we don't have sufficient resources - reset the new heap count + dynamic_heap_count_data.new_n_heaps = n_heaps; } } if (dynamic_heap_count_data.new_n_heaps == n_heaps) { // heap count stays the same, no work to do - dprintf (6666, ("heap count stays the same, no work to do %d == %d", dynamic_heap_count_data.new_n_heaps, n_heaps)); + dynamic_heap_count_data.prev_num_completed_gcs = get_num_completed_gcs (); + dynamic_heap_count_data.should_change_heap_count = false; - // come back after 3 GCs to reconsider - prev_change_heap_count_gc_index = settings.gc_index; + dprintf (6666, ("heap count stays the same %d, no work to do, set prev completed to %Id", dynamic_heap_count_data.new_n_heaps, dynamic_heap_count_data.prev_num_completed_gcs)); return; } - if (GCScan::GetGcRuntimeStructuresValid()) + int new_n_heaps = dynamic_heap_count_data.new_n_heaps; + + assert (!(dynamic_heap_count_data.init_only_p)); + { + // At this point we are guaranteed to be able to change the heap count to the new one. + // Change the heap count for joins here because we will need to join new_n_heaps threads together. + dprintf (9999, ("changing join hp %d->%d", n_heaps, new_n_heaps)); + int max_threads_to_wake = max (n_heaps, new_n_heaps); + gc_t_join.update_n_threads (max_threads_to_wake); + // make sure the other gc threads cannot see this as a request to GC assert (dynamic_heap_count_data.new_n_heaps != n_heaps); + + if (n_heaps < new_n_heaps) + { + int saved_idle_thread_count = dynamic_heap_count_data.idle_thread_count; + Interlocked::ExchangeAdd (&dynamic_heap_count_data.idle_thread_count, (n_heaps - new_n_heaps)); + dprintf (9999, ("GC thread %d setting idle events for h%d-h%d, total idle %d -> %d", heap_number, n_heaps, (new_n_heaps - 1), + saved_idle_thread_count, VolatileLoadWithoutBarrier (&dynamic_heap_count_data.idle_thread_count))); + + for (int heap_idx = n_heaps; heap_idx < new_n_heaps; heap_idx++) + { + g_heaps[heap_idx]->gc_idle_thread_event.Set(); +#ifdef BACKGROUND_GC + g_heaps[heap_idx]->bgc_idle_thread_event.Set(); +#endif //BACKGROUND_GC + } + } + gc_start_event.Set(); } int old_n_heaps = n_heaps; + (dynamic_heap_count_data.heap_count_change_count)++; change_heap_count (dynamic_heap_count_data.new_n_heaps); GCToEEInterface::RestartEE(TRUE); - prev_change_heap_count_gc_index = settings.gc_index; + dprintf (9999, ("h0 restarted EE")); // we made changes to the heap count that will change the overhead, // so change the smoothed overhead to reflect that - int new_n_heaps = n_heaps; - dynamic_heap_count_data.smoothed_median_percent_overhead = dynamic_heap_count_data.smoothed_median_percent_overhead/new_n_heaps*old_n_heaps; + dynamic_heap_count_data.smoothed_median_throughput_cost_percent = dynamic_heap_count_data.smoothed_median_throughput_cost_percent / n_heaps * old_n_heaps; + + dprintf (6666, ("h0 finished changing, set should change to false!")); + dynamic_heap_count_data.should_change_heap_count = false; } bool gc_heap::prepare_to_change_heap_count (int new_n_heaps) { - dprintf (6666, ("trying to change heap count %d -> %d", n_heaps, new_n_heaps)); + dprintf (9999, ("trying to change heap count %d -> %d", n_heaps, new_n_heaps)); // use this variable for clarity - n_heaps will change during the transition int old_n_heaps = n_heaps; @@ -25357,6 +25646,17 @@ bool gc_heap::prepare_to_change_heap_count (int new_n_heaps) } } + // Before we look at whether we have sufficient regions we should return regions that should be deleted to free + // so we don't lose them when we decommission heaps. We could do this for only heaps that we are about + // to decomission. But it's better to do this for all heaps because we don't need to worry about adding them to the + // heaps remain (freeable uoh/soh regions) and we get rid of regions with the heap_segment_flags_uoh_delete flag + // because background_delay_delete_uoh_segments makes the assumption it can't be the start region. + for (int i = 0; i < old_n_heaps; i++) + { + gc_heap* hp = g_heaps[i]; + hp->delay_free_segments (); + } + // if we want to increase the number of heaps, we have to make sure we can give // each heap a region for each generation. If we cannot do that, we have to give up ptrdiff_t region_count_in_gen[total_generation_count]; @@ -25437,39 +25737,34 @@ bool gc_heap::prepare_to_change_heap_count (int new_n_heaps) bool gc_heap::change_heap_count (int new_n_heaps) { + dprintf (9999, ("BEG heap%d changing %d->%d", heap_number, n_heaps, new_n_heaps)); + // use this variable for clarity - n_heaps will change during the transition int old_n_heaps = n_heaps; + bool init_only_p = dynamic_heap_count_data.init_only_p; - if (heap_number == 0) { - if (!prepare_to_change_heap_count (new_n_heaps)) - { - // we don't have sufficient resources - reset the new heap count - dynamic_heap_count_data.new_n_heaps = n_heaps; - } - } - - if (GCScan::GetGcRuntimeStructuresValid()) - { - // join for sufficient resources decision gc_t_join.join (this, gc_join_merge_temp_fl); if (gc_t_join.joined ()) { + // BGC is not running, we can safely change its join's heap count. +#ifdef BACKGROUND_GC + bgc_t_join.update_n_threads (new_n_heaps); +#endif //BACKGROUND_GC + + dynamic_heap_count_data.init_only_p = false; + dprintf (9999, ("in change h%d resetting gc_start, update bgc join to %d heaps", heap_number, new_n_heaps)); gc_start_event.Reset(); gc_t_join.restart (); } } - // gc_heap::n_heaps may have changed by now, compare to the snapshot *before* the join - if (dynamic_heap_count_data.new_n_heaps == old_n_heaps) - { - dprintf (6666, ("failed to change heap count, no work to do %d == %d", dynamic_heap_count_data.new_n_heaps, old_n_heaps)); - return false; - } + assert (dynamic_heap_count_data.new_n_heaps != old_n_heaps); + + dprintf (9999, ("Waiting h0 heap%d changing %d->%d", heap_number, n_heaps, new_n_heaps)); if (heap_number == 0) { - // after having checked for sufficient resources, we are now committed to actually change the heap count dprintf (3, ("switching heap count from %d to %d heaps", old_n_heaps, new_n_heaps)); // spread finalization data out to heaps coming into service @@ -25497,7 +25792,7 @@ bool gc_heap::change_heap_count (int new_n_heaps) { gc_heap* hp = g_heaps[i]; - if (GCScan::GetGcRuntimeStructuresValid()) + if (!init_only_p) { hp->fix_allocation_contexts (TRUE); } @@ -25606,7 +25901,7 @@ bool gc_heap::change_heap_count (int new_n_heaps) hpd->free_regions[kind].transfer_regions(&hp->free_regions[kind]); } } - // update number of heaps + dprintf (9999, ("h%d changing %d->%d", heap_number, n_heaps, new_n_heaps)); n_heaps = new_n_heaps; // even out the regions over the current number of heaps @@ -25647,7 +25942,9 @@ bool gc_heap::change_heap_count (int new_n_heaps) } } - if (GCScan::GetGcRuntimeStructuresValid()) + dprintf (3, ("individual heap%d changing %d->%d", heap_number, n_heaps, new_n_heaps)); + + if (!init_only_p) { // join for rethreading the free lists gc_t_join.join (this, gc_join_merge_temp_fl); @@ -25659,7 +25956,11 @@ bool gc_heap::change_heap_count (int new_n_heaps) // rethread the free lists for (int gen_idx = 0; gen_idx < total_generation_count; gen_idx++) { - rethread_fl_items (gen_idx); + if (heap_number < old_n_heaps) + { + dprintf (3, ("h%d calling per heap work!", heap_number)); + rethread_fl_items (gen_idx); + } // join for merging the free lists gc_t_join.join (this, gc_join_merge_temp_fl); @@ -25670,18 +25971,14 @@ bool gc_heap::change_heap_count (int new_n_heaps) gc_t_join.restart (); } } +#ifdef BACKGROUND_GC // there should be no items in the bgc_alloc_lock bgc_alloc_lock->check(); +#endif //BACKGROUND_GC } if (heap_number == 0) { - // udate the number of heaps in the joins - gc_t_join.update_n_threads(new_n_heaps); - #ifdef BACKGROUND_GC - bgc_t_join.update_n_threads(new_n_heaps); - #endif //BACKGROUND_GC - // compute the total budget per generation over the old heaps // and figure out what the new budget per heap is ptrdiff_t budget_per_heap[total_generation_count]; @@ -25741,21 +26038,50 @@ bool gc_heap::change_heap_count (int new_n_heaps) hp->decommission_heap(); } - if (GCScan::GetGcRuntimeStructuresValid()) + if (!init_only_p) { // make sure no allocation contexts point to idle heaps fix_allocation_contexts_heaps(); } - if (old_n_heaps < new_n_heaps) + dynamic_heap_count_data.last_n_heaps = old_n_heaps; + } + + // join the last time to change the heap count again if needed. + if (new_n_heaps < old_n_heaps) + { + gc_t_join.join (this, gc_join_merge_temp_fl); + if (gc_t_join.joined ()) { - // wake up threads for the new heaps - gc_idle_thread_event.Set(); + dprintf (9999, ("now changing the join heap count to the smaller one %d", new_n_heaps)); + gc_t_join.update_n_threads (new_n_heaps); + + gc_t_join.restart (); } } return true; } + +size_t gc_heap::get_msl_wait_time() +{ + assert (dynamic_adaptation_mode == dynamic_adaptation_to_application_sizes); + + size_t msl_wait_since_pause = 0; + + for (int i = 0; i < n_heaps; i++) + { + gc_heap* hp = g_heaps[i]; + + msl_wait_since_pause += hp->more_space_lock_soh.msl_wait_time; + hp->more_space_lock_soh.msl_wait_time = 0; + + msl_wait_since_pause += hp->more_space_lock_uoh.msl_wait_time; + hp->more_space_lock_uoh.msl_wait_time = 0; + } + + return msl_wait_since_pause; +} #endif //DYNAMIC_HEAP_COUNT #endif //USE_REGIONS @@ -26482,7 +26808,7 @@ uint8_t *mark_queue_t::queue_mark(uint8_t *o, int condemned_gen) { return nullptr; } - if (condemned_gen != max_generation && gc_heap::get_region_gen_num (o) > condemned_gen) + if ((condemned_gen != max_generation) && (gc_heap::get_region_gen_num (o) > condemned_gen)) { return nullptr; } @@ -28767,7 +29093,7 @@ void gc_heap::compute_gc_and_ephemeral_range (int condemned_gen_number, bool end } #endif //USE_REGIONS -void gc_heap::mark_phase (int condemned_gen_number, BOOL mark_only_p) +void gc_heap::mark_phase (int condemned_gen_number) { assert (settings.concurrent == FALSE); @@ -29018,18 +29344,14 @@ void gc_heap::mark_phase (int condemned_gen_number, BOOL mark_only_p) } } -#ifdef FEATURE_BASICFREEZE -#ifdef USE_REGIONS - assert (!ro_segments_in_range); -#else //USE_REGIONS +#if defined(FEATURE_BASICFREEZE) && !defined(USE_REGIONS) if (ro_segments_in_range) { dprintf(3,("Marking in range ro segments")); mark_ro_segments(); // Should fire an ETW event here. } -#endif //USE_REGIONS -#endif //FEATURE_BASICFREEZE +#endif //FEATURE_BASICFREEZE && !USE_REGIONS dprintf(3,("Marking Roots")); @@ -29278,7 +29600,7 @@ void gc_heap::mark_phase (int condemned_gen_number, BOOL mark_only_p) #ifdef FEATURE_PREMORTEM_FINALIZATION dprintf (3, ("Finalize marking")); - finalize_queue->ScanForFinalization (GCHeap::Promote, condemned_gen_number, mark_only_p, __this); + finalize_queue->ScanForFinalization (GCHeap::Promote, condemned_gen_number, __this); drain_mark_queue(); fire_mark_event (ETW::GC_ROOT_NEW_FQ, current_promoted_bytes, last_promoted_bytes); GCToEEInterface::DiagWalkFReachableObjects(__this); @@ -30111,9 +30433,7 @@ void gc_heap::seg_clear_mark_bits (heap_segment* seg) // all of them on the in range ro segs. void gc_heap::mark_ro_segments() { -#ifdef USE_REGIONS - assert (!ro_segments_in_range); -#else //USE_REGIONS +#ifndef USE_REGIONS if ((settings.condemned_generation == max_generation) && ro_segments_in_range) { heap_segment* seg = generation_start_segment (generation_of (max_generation)); @@ -30139,14 +30459,12 @@ void gc_heap::mark_ro_segments() seg = heap_segment_next (seg); } } -#endif //USE_REGIONS +#endif //!USE_REGIONS } void gc_heap::sweep_ro_segments() { -#ifdef USE_REGIONS - assert (!ro_segments_in_range); -#else //USE_REGIONS +#ifndef USE_REGIONS if ((settings.condemned_generation == max_generation) && ro_segments_in_range) { heap_segment* seg = generation_start_segment (generation_of (max_generation));; @@ -30172,7 +30490,7 @@ void gc_heap::sweep_ro_segments() seg = heap_segment_next (seg); } } -#endif //USE_REGIONS +#endif //!USE_REGIONS } #endif // FEATURE_BASICFREEZE @@ -32799,17 +33117,17 @@ void gc_heap::plan_phase (int condemned_gen_number) } else { - dprintf (2, ("gen2 didn't grow (end seg alloc: %zd, , condemned alloc: %zd, gen1 c alloc: %zd", + dprintf (1, ("gen2 didn't grow (end seg alloc: %zd, , condemned alloc: %zd, gen1 c alloc: %zd", end_seg_allocated, condemned_allocated, generation_condemned_allocated (generation_of (max_generation - 1)))); } - dprintf (1, ("older gen's free alloc: %zd->%zd, seg alloc: %zd->%zd, condemned alloc: %zd->%zd", + dprintf (2, ("older gen's free alloc: %zd->%zd, seg alloc: %zd->%zd, condemned alloc: %zd->%zd", r_older_gen_free_list_allocated, generation_free_list_allocated (older_gen), r_older_gen_end_seg_allocated, generation_end_seg_allocated (older_gen), r_older_gen_condemned_allocated, generation_condemned_allocated (older_gen))); - dprintf (1, ("this GC did %zd free list alloc(%zd bytes free space rejected)", + dprintf (2, ("this GC did %zd free list alloc(%zd bytes free space rejected)", free_list_allocated, rejected_free_space)); maxgen_size_increase* maxgen_size_info = &(get_gc_data_per_heap()->maxgen_size_info); @@ -33050,12 +33368,12 @@ void gc_heap::plan_phase (int condemned_gen_number) for (i = 0; i < n_heaps; i++) { - //copy the card and brick tables +#ifndef USE_REGIONS if (g_gc_card_table!= g_heaps[i]->card_table) { g_heaps[i]->copy_brick_card_table(); } - +#endif //!USE_REGIONS if (is_full_compacting_gc) { g_heaps[i]->loh_alloc_since_cg = 0; @@ -33474,8 +33792,7 @@ void gc_heap::plan_phase (int condemned_gen_number) { dprintf (2, ("Promoting EE roots for gen %d", condemned_gen_number)); - GCScan::GcPromotionsGranted(condemned_gen_number, - max_generation, &sc); + GCScan::GcPromotionsGranted(condemned_gen_number, max_generation, &sc); } else if (settings.demotion) { @@ -34694,7 +35011,7 @@ void gc_heap::make_free_lists (int condemned_gen_number) PREFIX_ASSUME(current_heap_segment != NULL); uint8_t* end_address = heap_segment_allocated (current_heap_segment); - size_t end_brick = brick_of (end_address-1); + size_t end_brick = brick_of (end_address - 1); int current_gen_num = i; #ifdef USE_REGIONS @@ -37852,10 +38169,7 @@ void gc_heap::background_mark_phase () dprintf (GTC_LOG, ("FM: h%d: loh: %zd, soh: %zd, poh: %zd", heap_number, total_loh_size, total_soh_size, total_poh_size)); -#ifdef FEATURE_BASICFREEZE -#ifdef USE_REGIONS - assert (!ro_segments_in_range); -#else //USE_REGIONS +#if defined(FEATURE_BASICFREEZE) && !defined(USE_REGIONS) if (ro_segments_in_range) { dprintf (2, ("nonconcurrent marking in range ro segments")); @@ -37863,8 +38177,7 @@ void gc_heap::background_mark_phase () //concurrent_print_time_delta ("nonconcurrent marking in range ro segments"); concurrent_print_time_delta ("NRRO"); } -#endif //USE_REGIONS -#endif //FEATURE_BASICFREEZE +#endif //FEATURE_BASICFREEZE && !USE_REGIONS dprintf (2, ("nonconcurrent marking stack roots")); GCScan::GcScanRoots(background_promote, @@ -37956,7 +38269,7 @@ void gc_heap::background_mark_phase () dprintf(3,("Marking finalization data")); //concurrent_print_time_delta ("bgc joined to mark finalization"); concurrent_print_time_delta ("NRj"); - finalize_queue->ScanForFinalization (background_promote, max_generation, FALSE, __this); + finalize_queue->ScanForFinalization (background_promote, max_generation, __this); concurrent_print_time_delta ("NRF"); } @@ -38074,18 +38387,6 @@ void gc_heap::background_mark_phase () dprintf(2,("---- (GC%zu)End of background mark phase ----", VolatileLoad(&settings.gc_index))); } -void -gc_heap::suspend_EE () -{ - dprintf (2, ("suspend_EE")); -#ifdef MULTIPLE_HEAPS - gc_heap* hp = gc_heap::g_heaps[0]; - GCToEEInterface::SuspendEE(SUSPEND_FOR_GC_PREP); -#else - GCToEEInterface::SuspendEE(SUSPEND_FOR_GC_PREP); -#endif //MULTIPLE_HEAPS -} - #ifdef MULTIPLE_HEAPS void gc_heap::bgc_suspend_EE () @@ -38117,17 +38418,6 @@ gc_heap::bgc_suspend_EE () } #endif //MULTIPLE_HEAPS -void -gc_heap::restart_EE () -{ - dprintf (2, ("restart_EE")); -#ifdef MULTIPLE_HEAPS - GCToEEInterface::RestartEE(FALSE); -#else - GCToEEInterface::RestartEE(FALSE); -#endif //MULTIPLE_HEAPS -} - inline uint8_t* gc_heap::high_page (heap_segment* seg, BOOL concurrent_p) { #ifdef USE_REGIONS @@ -38257,10 +38547,9 @@ void gc_heap::revisit_written_page (uint8_t* page, background_mark_object (oo THREAD_NUMBER_ARG); ); } - else if ( - concurrent_p && - ((CObjectHeader*)o)->IsFree() && - (next_o > min (high_address, page + WRITE_WATCH_UNIT_SIZE))) + else if (concurrent_p && + ((CObjectHeader*)o)->IsFree() && + (next_o > min (high_address, page + WRITE_WATCH_UNIT_SIZE))) { // We need to not skip the object here because of this corner scenario: // A large object was being allocated during BGC mark so we first made it @@ -38902,9 +39191,9 @@ void gc_heap::bgc_thread_function() { // this is the case where we have more background GC threads than heaps // - wait until we're told to continue... - dprintf (3, ("BGC thread %d idle", heap_number)); - gc_idle_thread_event.Wait(INFINITE, FALSE); - dprintf (3, ("BGC thread %d waking from idle", heap_number)); + dprintf (9999, ("BGC thread %d idle (%d heaps) (gc%Id)", heap_number, n_heaps, VolatileLoadWithoutBarrier (&settings.gc_index))); + bgc_idle_thread_event.Wait(INFINITE, FALSE); + dprintf (9999, ("BGC thread %d waking from idle (%d heaps) (gc%Id)", heap_number, n_heaps, VolatileLoadWithoutBarrier (&settings.gc_index))); continue; } #endif //DYNAMIC_HEAP_COUNT @@ -38963,8 +39252,7 @@ void gc_heap::bgc_thread_function() dd_new_allocation (dd) = desired_per_heap; } } -#endif //MULTIPLE_HEAPS -#ifdef MULTIPLE_HEAPS + fire_pevents(); #endif //MULTIPLE_HEAPS @@ -38976,7 +39264,7 @@ void gc_heap::bgc_thread_function() dprintf (SPINLOCK_LOG, ("bgc Lgc")); leave_spin_lock (&gc_lock); #ifdef MULTIPLE_HEAPS - dprintf(1, ("End of BGC - starting all BGC threads")); + dprintf(1, ("End of BGC")); bgc_t_join.restart(); #endif //MULTIPLE_HEAPS } @@ -42853,6 +43141,9 @@ bool gc_heap::init_dynamic_data() { process_start_time = now; smoothed_desired_total[0] = dynamic_data_of (0)->min_size * n_heaps; +#ifdef DYNAMIC_HEAP_COUNT + last_suspended_end_time = now; +#endif //DYNAMIC_HEAP_COUNT #ifdef HEAP_BALANCE_INSTRUMENTATION last_gc_end_time_us = now; dprintf (HEAP_BALANCE_LOG, ("qpf=%zd, start: %zd(%d)", qpf, start_raw_ts, now)); @@ -43245,11 +43536,6 @@ size_t gc_heap::compute_in (int gen_number) return in; } -void gc_heap::compute_promoted_allocation (int gen_number) -{ - compute_in (gen_number); -} - #ifdef HOST_64BIT inline size_t gc_heap::trim_youngest_desired (uint32_t memory_load, @@ -43581,7 +43867,7 @@ void gc_heap::decommit_ephemeral_segment_pages() { gradual_decommit_in_progress_p = TRUE; - dprintf (1, ("h%2d gen %d region %p allocated %zdkB committed %zdkB reduce_commit by %zdkB", + dprintf (REGIONS_LOG, ("h%2d gen %d region %p allocated %zdkB committed %zdkB reduce_commit by %zdkB", heap_number, gen_number, get_region_start (tail_region), @@ -43741,6 +44027,7 @@ size_t gc_heap::decommit_region (heap_segment* region, int bucket, int h_number) heap_segment_committed (region) = heap_segment_mem (region); } +#ifdef BACKGROUND_GC // Under USE_REGIONS, mark array is never partially committed. So we are only checking for this // flag here. if ((region->flags & heap_segment_flags_ma_committed) != 0) @@ -43755,6 +44042,7 @@ size_t gc_heap::decommit_region (heap_segment* region, int bucket, int h_number) hp->decommit_mark_array_by_seg (region); region->flags &= ~(heap_segment_flags_ma_committed); } +#endif //BACKGROUND_GC if (use_large_pages_p) { @@ -43764,7 +44052,10 @@ size_t gc_heap::decommit_region (heap_segment* region, int bucket, int h_number) { assert (heap_segment_committed (region) == heap_segment_mem (region)); } +#ifdef BACKGROUND_GC assert ((region->flags & heap_segment_flags_ma_committed) == 0); +#endif //BACKGROUND_GC + global_region_allocator.delete_region (get_region_start (region)); return decommit_size; @@ -44551,7 +44842,6 @@ BOOL gc_heap::ephemeral_gen_fit_p (gc_tuning_point tp) CObjectHeader* gc_heap::allocate_uoh_object (size_t jsize, uint32_t flags, int gen_number, int64_t& alloc_bytes) { - //create a new alloc context because gen3context is shared. alloc_context acontext; acontext.init(); @@ -46481,7 +46771,7 @@ void gc_heap::descr_generations (const char* msg) dprintf (GTC_LOG, ("g%d: start seg: %p alloc seg: %p, tail region: %p", curr_gen_number, heap_segment_mem (seg), - heap_segment_mem (generation_allocation_segment (gen)), + (generation_allocation_segment (gen) ? heap_segment_mem (generation_allocation_segment (gen)) : 0), heap_segment_mem (generation_tail_region (gen)))); while (seg) { @@ -46679,56 +46969,6 @@ enable_no_gc_region_callback_status gc_heap::enable_no_gc_callback(NoGCRegionCal return status; } -// An explanation of locking for finalization: -// -// Multiple threads allocate objects. During the allocation, they are serialized by -// the AllocLock above. But they release that lock before they register the object -// for finalization. That's because there is much contention for the alloc lock, but -// finalization is presumed to be a rare case. -// -// So registering an object for finalization must be protected by the FinalizeLock. -// -// There is another logical queue that involves finalization. When objects registered -// for finalization become unreachable, they are moved from the "registered" queue to -// the "unreachable" queue. Note that this only happens inside a GC, so no other -// threads can be manipulating either queue at that time. Once the GC is over and -// threads are resumed, the Finalizer thread will dequeue objects from the "unreachable" -// queue and call their finalizers. This dequeue operation is also protected with -// the finalize lock. -// -// At first, this seems unnecessary. Only one thread is ever enqueuing or dequeuing -// on the unreachable queue (either the GC thread during a GC or the finalizer thread -// when a GC is not in progress). The reason we share a lock with threads enqueuing -// on the "registered" queue is that the "registered" and "unreachable" queues are -// interrelated. -// -// They are actually two regions of a longer list, which can only grow at one end. -// So to enqueue an object to the "registered" list, you actually rotate an unreachable -// object at the boundary between the logical queues, out to the other end of the -// unreachable queue -- where all growing takes place. Then you move the boundary -// pointer so that the gap we created at the boundary is now on the "registered" -// side rather than the "unreachable" side. Now the object can be placed into the -// "registered" side at that point. This is much more efficient than doing moves -// of arbitrarily long regions, but it causes the two queues to require a shared lock. -// -// Notice that Enter/LeaveFinalizeLock is not a GC-aware spin lock. Instead, it relies -// on the fact that the lock will only be taken for a brief period and that it will -// never provoke or allow a GC while the lock is held. This is critical. If the -// FinalizeLock used enter_spin_lock (and thus sometimes enters preemptive mode to -// allow a GC), then the Alloc client would have to GC protect a finalizable object -// to protect against that eventuality. That is too slow! - - - -BOOL IsValidObject99(uint8_t *pObject) -{ -#ifdef VERIFY_HEAP - if (!((CObjectHeader*)pObject)->IsFree()) - ((CObjectHeader *) pObject)->Validate(); -#endif //VERIFY_HEAP - return(TRUE); -} - #ifdef BACKGROUND_GC BOOL gc_heap::bgc_mark_array_range (heap_segment* seg, BOOL whole_seg_p, @@ -46846,58 +47086,6 @@ void gc_heap::verify_mark_bits_cleared (uint8_t* obj, size_t s) #endif //VERIFY_HEAP } -void gc_heap::clear_all_mark_array() -{ - for (int i = get_start_generation_index(); i < total_generation_count; i++) - { - generation* gen = generation_of (i); - heap_segment* seg = heap_segment_rw (generation_start_segment (gen)); - - while (seg) - { - uint8_t* range_beg = 0; - uint8_t* range_end = 0; - - if (bgc_mark_array_range (seg, (seg == ephemeral_heap_segment), &range_beg, &range_end)) - { - size_t markw = mark_word_of (range_beg); - size_t markw_end = mark_word_of (range_end); - size_t size_total = (markw_end - markw) * sizeof (uint32_t); - //num_dwords_written = markw_end - markw; - size_t size = 0; - size_t size_left = 0; - - assert (((size_t)&mark_array[markw] & (sizeof(PTR_PTR)-1)) == 0); - - if ((size_total & (sizeof(PTR_PTR) - 1)) != 0) - { - size = (size_total & ~(sizeof(PTR_PTR) - 1)); - size_left = size_total - size; - assert ((size_left & (sizeof (uint32_t) - 1)) == 0); - } - else - { - size = size_total; - } - - memclr ((uint8_t*)&mark_array[markw], size); - - if (size_left != 0) - { - uint32_t* markw_to_clear = &mark_array[markw + size / sizeof (uint32_t)]; - for (size_t i = 0; i < (size_left / sizeof (uint32_t)); i++) - { - *markw_to_clear = 0; - markw_to_clear++; - } - } - } - - seg = heap_segment_next_rw (seg); - } - } -} - void gc_heap::verify_mark_array_cleared() { #ifdef VERIFY_HEAP @@ -47045,7 +47233,7 @@ gc_heap::verify_free_lists () { if (!((CObjectHeader*)free_list)->IsFree()) { - dprintf (1, ("Verifiying Heap: curr free list item %zx isn't a free object)", + dprintf (1, ("Verifiying Heap: curr free list item %zx isn't a free object", (size_t)free_list)); FATAL_GC_ERROR(); } @@ -47361,26 +47549,20 @@ void gc_heap::verify_heap (BOOL begin_gc_p) } } +#ifndef USE_REGIONS #ifdef MULTIPLE_HEAPS current_join->join(this, gc_join_verify_copy_table); if (current_join->joined()) +#endif //MULTIPLE_HEAPS { // in concurrent GC, new segment could be allocated when GC is working so the card brick table might not be updated at this point - for (int i = 0; i < n_heaps; i++) - { - //copy the card and brick tables - if (g_gc_card_table != g_heaps[i]->card_table) - { - g_heaps[i]->copy_brick_card_table(); - } - } + copy_brick_card_table_on_growth (); +#ifdef MULTIPLE_HEAPS current_join->restart(); - } -#else - if (g_gc_card_table != card_table) - copy_brick_card_table(); #endif //MULTIPLE_HEAPS + } +#endif //!USE_REGIONS //verify that the generation structures makes sense { @@ -47679,7 +47861,7 @@ void gc_heap::verify_heap (BOOL begin_gc_p) if (need_card_p && !found_card_p) { - dprintf (1, ("Card not set, curr_object = [%zx:%zx, %zx:%zx[", + dprintf (1, ("(in loop) Card not set, curr_object = [%zx:%zx, %zx:%zx[", card_of (curr_object), (size_t)curr_object, card_of (curr_object+Align(s, align_const)), (size_t)(curr_object+Align(s, align_const)))); @@ -47952,6 +48134,7 @@ HRESULT GCHeap::Initialize() uint32_t nhp = 1; uint32_t nhp_from_config = 0; + uint32_t max_nhp_from_config = (uint32_t)GCConfig::GetMaxHeapCount(); #ifndef MULTIPLE_HEAPS GCConfig::SetServerGC(false); @@ -48106,7 +48289,6 @@ HRESULT GCHeap::Initialize() gc_heap::enable_special_regions_p = (bool)GCConfig::GetGCEnableSpecialRegions(); size_t gc_region_size = (size_t)GCConfig::GetGCRegionSize(); - // Constraining the size of region size to be < 2 GB. if (gc_region_size >= MAX_REGION_SIZE) { return CLR_E_GC_BAD_REGION_SIZE; @@ -48146,6 +48328,10 @@ HRESULT GCHeap::Initialize() #ifdef MULTIPLE_HEAPS assert (nhp <= g_num_processors); + if (max_nhp_from_config) + { + nhp = min (nhp, max_nhp_from_config); + } gc_heap::n_max_heaps = nhp; gc_heap::n_heaps = nhp; hr = gc_heap::initialize_gc (seg_size, large_seg_size, pin_seg_size, nhp); @@ -48296,9 +48482,32 @@ HRESULT GCHeap::Initialize() { // start with only 1 heap gc_heap::smoothed_desired_total[0] /= gc_heap::n_heaps; - gc_heap::g_heaps[0]->change_heap_count (1); + int initial_n_heaps = 1; + dprintf (9999, ("gc_heap::n_heaps is %d, initial %d", gc_heap::n_heaps, initial_n_heaps)); + + { + if (!gc_heap::prepare_to_change_heap_count (initial_n_heaps)) + { + // we don't have sufficient resources. + return E_FAIL; + } + + gc_heap::dynamic_heap_count_data.new_n_heaps = initial_n_heaps; + gc_heap::dynamic_heap_count_data.idle_thread_count = 0; + gc_heap::dynamic_heap_count_data.init_only_p = true; + + int max_threads_to_wake = max (gc_heap::n_heaps, initial_n_heaps); + gc_t_join.update_n_threads (max_threads_to_wake); + gc_heap::gc_start_event.Set (); + } + + gc_heap::g_heaps[0]->change_heap_count (initial_n_heaps); + gc_heap::gc_start_event.Reset (); + + // This needs to be different from our initial heap count so we can make sure we wait for + // the idle threads correctly in gc_thread_function. + gc_heap::dynamic_heap_count_data.last_n_heaps = 0; } - gc_heap::dynamic_heap_count_data.new_n_heaps = gc_heap::n_heaps; #endif //DYNAMIC_HEAP_COUNT GCScan::GcRuntimeStructuresValid (TRUE); @@ -49882,12 +50091,18 @@ void gc_heap::do_post_gc() } #endif //BGC_SERVO_TUNING +#ifdef BACKGROUND_GC + const char* str_gc_type = (settings.concurrent ? "BGC" : (gc_heap::background_running_p () ? "FGC" : "NGC")); +#else + const char* str_gc_type = "NGC"; +#endif //BACKGROUND_GC + dprintf (1, (ThreadStressLog::gcDetailedEndMsg(), - VolatileLoad(&settings.gc_index), - dd_collection_count(hp->dynamic_data_of(0)), - (size_t)(GetHighPrecisionTimeStamp() / 1000), + VolatileLoad (&settings.gc_index), + dd_collection_count (hp->dynamic_data_of (0)), + (size_t)(GetHighPrecisionTimeStamp () / 1000), settings.condemned_generation, - (settings.concurrent ? "BGC" : (gc_heap::background_running_p() ? "FGC" : "NGC")), + str_gc_type, (settings.compaction ? "C" : "S"), (settings.promotion ? "P" : "S"), settings.entry_memory_load, @@ -50213,7 +50428,7 @@ GCHeap::GarbageCollectGeneration (unsigned int gen, gc_reason reason) return dd_collection_count (dd); } -size_t GCHeap::GetTotalBytesInUse () +size_t GCHeap::GetTotalBytesInUse () { // take lock here to ensure gc_heap::n_heaps doesn't change under us enter_spin_lock (&pGenGCHeap->gc_lock); @@ -50689,49 +50904,6 @@ void GCHeap::PublishObject (uint8_t* Obj) #endif //BACKGROUND_GC } -// The spec for this one isn't clear. This function -// returns the size that can be allocated without -// triggering a GC of any kind. -size_t GCHeap::ApproxFreeBytes() -{ - enter_spin_lock (&pGenGCHeap->gc_lock); - - generation* gen = pGenGCHeap->generation_of (0); - size_t res = generation_allocation_limit (gen) - generation_allocation_pointer (gen); - - leave_spin_lock (&pGenGCHeap->gc_lock); - - return res; -} - -HRESULT GCHeap::GetGcCounters(int gen, gc_counters* counters) -{ - if ((gen < 0) || (gen > max_generation)) - return E_FAIL; -#ifdef MULTIPLE_HEAPS - counters->current_size = 0; - counters->promoted_size = 0; - counters->collection_count = 0; - - //enumerate all the heaps and get their counters. - for (int i = 0; i < gc_heap::n_heaps; i++) - { - dynamic_data* dd = gc_heap::g_heaps [i]->dynamic_data_of (gen); - - counters->current_size += dd_current_size (dd); - counters->promoted_size += dd_promoted_size (dd); - if (i == 0) - counters->collection_count += dd_collection_count (dd); - } -#else - dynamic_data* dd = pGenGCHeap->dynamic_data_of (gen); - counters->current_size = dd_current_size (dd); - counters->promoted_size = dd_promoted_size (dd); - counters->collection_count = dd_collection_count (dd); -#endif //MULTIPLE_HEAPS - return S_OK; -} - // Get the segment size to use, making sure it conforms. size_t GCHeap::GetValidSegmentSize(bool large_seg) { @@ -50956,19 +51128,20 @@ bool CFinalize::Initialize() GC_NOTRIGGER; } CONTRACTL_END; - m_Array = new (nothrow)(Object*[100]); + const int INITIAL_FINALIZER_ARRAY_SIZE = 100; + m_Array = new (nothrow)(Object*[INITIAL_FINALIZER_ARRAY_SIZE]); if (!m_Array) { ASSERT (m_Array); - STRESS_LOG_OOM_STACK(sizeof(Object*[100])); + STRESS_LOG_OOM_STACK(sizeof(Object*[INITIAL_FINALIZER_ARRAY_SIZE])); if (GCConfig::GetBreakOnOOM()) { GCToOSInterface::DebugBreak(); } return false; } - m_EndArray = &m_Array[100]; + m_EndArray = &m_Array[INITIAL_FINALIZER_ARRAY_SIZE]; for (int i =0; i < FreeList; i++) { @@ -50993,6 +51166,44 @@ size_t CFinalize::GetPromotedCount () return m_PromotedCount; } +// An explanation of locking for finalization: +// +// Multiple threads allocate objects. During the allocation, they are serialized by +// the AllocLock above. But they release that lock before they register the object +// for finalization. That's because there is much contention for the alloc lock, but +// finalization is presumed to be a rare case. +// +// So registering an object for finalization must be protected by the FinalizeLock. +// +// There is another logical queue that involves finalization. When objects registered +// for finalization become unreachable, they are moved from the "registered" queue to +// the "unreachable" queue. Note that this only happens inside a GC, so no other +// threads can be manipulating either queue at that time. Once the GC is over and +// threads are resumed, the Finalizer thread will dequeue objects from the "unreachable" +// queue and call their finalizers. This dequeue operation is also protected with +// the finalize lock. +// +// At first, this seems unnecessary. Only one thread is ever enqueuing or dequeuing +// on the unreachable queue (either the GC thread during a GC or the finalizer thread +// when a GC is not in progress). The reason we share a lock with threads enqueuing +// on the "registered" queue is that the "registered" and "unreachable" queues are +// interrelated. +// +// They are actually two regions of a longer list, which can only grow at one end. +// So to enqueue an object to the "registered" list, you actually rotate an unreachable +// object at the boundary between the logical queues, out to the other end of the +// unreachable queue -- where all growing takes place. Then you move the boundary +// pointer so that the gap we created at the boundary is now on the "registered" +// side rather than the "unreachable" side. Now the object can be placed into the +// "registered" side at that point. This is much more efficient than doing moves +// of arbitrarily long regions, but it causes the two queues to require a shared lock. +// +// Notice that Enter/LeaveFinalizeLock is not a GC-aware spin lock. Instead, it relies +// on the fact that the lock will only be taken for a brief period and that it will +// never provoke or allow a GC while the lock is held. This is critical. If the +// FinalizeLock used enter_spin_lock (and thus sometimes enters preemptive mode to +// allow a GC), then the Alloc client would have to GC protect a finalizable object +// to protect against that eventuality. That is too slow! inline void CFinalize::EnterFinalizeLock() { @@ -51013,7 +51224,8 @@ void CFinalize::EnterFinalizeLock() { if (lock < 0) break; - YieldProcessor (); // indicate to the processor that we are spinning + // give the HT neighbor a chance to run + YieldProcessor (); } } if (lock < 0) @@ -51058,8 +51270,8 @@ CFinalize::RegisterForFinalization (int gen, Object* obj, size_t size) unsigned int dest = gen_segment (gen); // Adjust boundary for segments so that GC will keep objects alive. - Object*** s_i = &SegQueue (FreeList); - if ((*s_i) == m_EndArray) + Object*** s_i = &SegQueue (FreeListSeg); + if ((*s_i) == SegQueueLimit(FreeListSeg)) { if (!GrowArray()) { @@ -51085,7 +51297,7 @@ CFinalize::RegisterForFinalization (int gen, Object* obj, size_t size) //is the segment empty? if (!(*s_i == *(s_i-1))) { - //no, swap the end elements. + //no, move the first element of the segment to the (new) last location in the segment *(*s_i) = *(*(s_i-1)); } //increment the fill pointer @@ -51133,7 +51345,7 @@ CFinalize::GetNextFinalizableObject (BOOL only_non_critical) size_t CFinalize::GetNumberFinalizableObjects() { - return SegQueueLimit(FinalizerListSeg) - SegQueue(FinalizerListSeg); + return SegQueueLimit(FinalizerMaxSeg) - SegQueue(FinalizerStartSeg); } void @@ -51148,11 +51360,16 @@ CFinalize::MoveItem (Object** fromIndex, step = -1; else step = +1; - // Place the element at the boundary closest to dest + // Each iteration places the element at the boundary closest to dest + // and then adjusts the boundary to move that element one segment closer + // to dest. Object** srcIndex = fromIndex; for (unsigned int i = fromSeg; i != toSeg; i+= step) { + // Select SegQueue[i] for step==-1, SegQueueLimit[i] for step==1 Object**& destFill = m_FillPointers[i+(step - 1 )/2]; + // Select SegQueue[i] for step==-1, SegQueueLimit[i]-1 for step==1 + // (SegQueueLimit[i]-1 is the last entry in segment i) Object** destIndex = destFill - (step + 1)/2; if (srcIndex != destIndex) { @@ -51175,8 +51392,8 @@ CFinalize::GcScanRoots (promote_func* fn, int hn, ScanContext *pSC) pSC->thread_number = hn; //scan the finalization queue - Object** startIndex = SegQueue (CriticalFinalizerListSeg); - Object** stopIndex = SegQueueLimit (FinalizerListSeg); + Object** startIndex = SegQueue (FinalizerStartSeg); + Object** stopIndex = SegQueueLimit (FinalizerMaxSeg); for (Object** po = startIndex; po < stopIndex; po++) { @@ -51190,18 +51407,25 @@ CFinalize::GcScanRoots (promote_func* fn, int hn, ScanContext *pSC) void CFinalize::WalkFReachableObjects (fq_walk_fn fn) { - Object** startIndex = SegQueue (CriticalFinalizerListSeg); - Object** stopCriticalIndex = SegQueueLimit (CriticalFinalizerListSeg); - Object** stopIndex = SegQueueLimit (FinalizerListSeg); + Object** startIndex = SegQueue (FinalizerListSeg); + Object** stopIndex = SegQueueLimit (FinalizerListSeg); for (Object** po = startIndex; po < stopIndex; po++) { - fn(po < stopCriticalIndex, *po); + bool isCriticalFinalizer = false; + fn(isCriticalFinalizer, *po); + } + + startIndex = SegQueue (CriticalFinalizerListSeg); + stopIndex = SegQueueLimit (CriticalFinalizerListSeg); + for (Object** po = startIndex; po < stopIndex; po++) + { + bool isCriticalFinalizer = true; + fn(isCriticalFinalizer, *po); } } BOOL -CFinalize::ScanForFinalization (promote_func* pfn, int gen, BOOL mark_only_p, - gc_heap* hp) +CFinalize::ScanForFinalization (promote_func* pfn, int gen, gc_heap* hp) { ScanContext sc; sc.promotion = TRUE; @@ -51234,13 +51458,13 @@ CFinalize::ScanForFinalization (promote_func* pfn, int gen, BOOL mark_only_p, if (GCToEEInterface::EagerFinalized(obj)) { - MoveItem (i, Seg, FreeList); + MoveItem (i, Seg, FreeListSeg); } else if ((obj->GetHeader()->GetBits()) & BIT_SBLK_FINALIZER_RUN) { //remove the object because we don't want to //run the finalizer - MoveItem (i, Seg, FreeList); + MoveItem (i, Seg, FreeListSeg); //Reset the bit so it will be put back on the queue //if resurrected and re-registered. @@ -51299,8 +51523,7 @@ CFinalize::ScanForFinalization (promote_func* pfn, int gen, BOOL mark_only_p, #endif //BACKGROUND_GC if (hp->settings.concurrent && hp->settings.found_finalizers) { - if (!mark_only_p) - GCToEEInterface::EnableFinalization(true); + GCToEEInterface::EnableFinalization(true); } } @@ -51417,14 +51640,14 @@ CFinalize::GrowArray() bool CFinalize::MergeFinalizationData (CFinalize* other_fq) { // compute how much space we will need for the merged data - size_t otherNeededArraySize = other_fq->SegQueue (FreeList) - other_fq->m_Array; + size_t otherNeededArraySize = other_fq->UsedCount(); if (otherNeededArraySize == 0) { // the other queue is empty - nothing to do! return true; } size_t thisArraySize = (m_EndArray - m_Array); - size_t thisNeededArraySize = SegQueue (FreeList) - m_Array; + size_t thisNeededArraySize = UsedCount(); size_t neededArraySize = thisNeededArraySize + otherNeededArraySize; Object ** newArray = m_Array; @@ -51443,6 +51666,10 @@ bool CFinalize::MergeFinalizationData (CFinalize* other_fq) } } + // Since the target might be the original array (with the original data), + // the order of copying must not overwrite any data until it has been + // copied. + // copy the finalization data from this and the other finalize queue for (int i = FreeList - 1; i >= 0; i--) { @@ -51482,10 +51709,10 @@ bool CFinalize::MergeFinalizationData (CFinalize* other_fq) bool CFinalize::SplitFinalizationData (CFinalize* other_fq) { // the other finalization queue is assumed to be empty at this point - size_t otherCurrentArraySize = other_fq->SegQueue (FreeList) - other_fq->m_Array; + size_t otherCurrentArraySize = other_fq->UsedCount(); assert (otherCurrentArraySize == 0); - size_t thisCurrentArraySize = SegQueue (FreeList) - m_Array; + size_t thisCurrentArraySize = UsedCount(); if (thisCurrentArraySize == 0) { // this queue is empty - nothing to split! @@ -51511,7 +51738,7 @@ bool CFinalize::SplitFinalizationData (CFinalize* other_fq) } // move half of the items in each section over to the other queue - PTR_PTR_Object newFillPointers[FreeList]; + PTR_PTR_Object newFillPointers[MaxSeg]; PTR_PTR_Object segQueue = m_Array; for (int i = 0; i < FreeList; i++) { @@ -51527,14 +51754,15 @@ bool CFinalize::SplitFinalizationData (CFinalize* other_fq) memmove (&other_fq->m_Array[otherIndex], &m_Array[thisIndex + thisNewSize], sizeof(other_fq->m_Array[0])*otherSize); other_fq->SegQueueLimit (i) = &other_fq->m_Array[otherIndex + otherSize]; - // we delete the moved half from this queue + // slide the unmoved half to its new position in the queue + // (this will delete the moved half once copies and m_FillPointers updates are completed) memmove (segQueue, &m_Array[thisIndex], sizeof(m_Array[0])*thisNewSize); segQueue += thisNewSize; newFillPointers[i] = segQueue; } // finally update the fill pointers from the new copy we generated - for (int i = 0; i < FreeList; i++) + for (int i = 0; i < MaxSeg; i++) { m_FillPointers[i] = newFillPointers[i]; } @@ -52338,11 +52566,14 @@ void gc_heap::compute_committed_bytes(size_t& total_committed, size_t& committed { heap->accumulate_committed_bytes ( generation_start_segment (heap->generation_of (gen)), total_committed_per_heap, committed_bookkeeping); } + +#ifdef BACKGROUND_GC if (oh == soh) { heap->accumulate_committed_bytes (heap->freeable_soh_segment, total_committed_per_heap, committed_bookkeeping); } else +#endif //BACKGROUND_GC { heap->accumulate_committed_bytes (heap->freeable_uoh_segment, total_committed_per_heap, committed_bookkeeping, (gc_oh_num)oh); } @@ -52563,6 +52794,7 @@ void gc_heap::accumulate_committed_bytes(heap_segment* seg, size_t& committed_by size_t gc_heap::get_mark_array_size (heap_segment* seg) { +#ifdef BACKGROUND_GC if (seg->flags & heap_segment_flags_ma_committed) { uint32_t* mark_array_addr = mark_array; @@ -52574,6 +52806,7 @@ size_t gc_heap::get_mark_array_size (heap_segment* seg) uint8_t* commit_end = align_on_page ((uint8_t*)&mark_array_addr[end_word]); return (size_t)(commit_end - commit_start); } +#endif //BACKGROUND_GC return 0; } #endif //USE_REGIONS diff --git a/src/coreclr/gc/gc.h b/src/coreclr/gc/gc.h index e9c739e3c0d727..fe115976310af7 100644 --- a/src/coreclr/gc/gc.h +++ b/src/coreclr/gc/gc.h @@ -186,14 +186,6 @@ namespace SVR { #define STRESS_HEAP_ARG(x) #endif // STRESS_HEAP -//dynamic data interface -struct gc_counters -{ - size_t current_size; - size_t promoted_size; - size_t collection_count; -}; - enum bgc_state { bgc_not_in_process = 0, diff --git a/src/coreclr/gc/gcconfig.h b/src/coreclr/gc/gcconfig.h index 72786778d5a978..7dd48eb02513c6 100644 --- a/src/coreclr/gc/gcconfig.h +++ b/src/coreclr/gc/gcconfig.h @@ -83,6 +83,7 @@ class GCConfigStringHolder INT_CONFIG (BGCSpinCount, "BGCSpinCount", NULL, 140, "Specifies the bgc spin count") \ INT_CONFIG (BGCSpin, "BGCSpin", NULL, 2, "Specifies the bgc spin time") \ INT_CONFIG (HeapCount, "GCHeapCount", "System.GC.HeapCount", 0, "Specifies the number of server GC heaps") \ + INT_CONFIG (MaxHeapCount, "GCMaxHeapCount", "System.GC.MaxHeapCount", 0, "Specifies the max number of server GC heaps to adjust to") \ INT_CONFIG (Gen0Size, "GCgen0size", NULL, 0, "Specifies the smallest gen0 budget") \ INT_CONFIG (SegmentSize, "GCSegmentSize", NULL, 0, "Specifies the managed heap segment size") \ INT_CONFIG (LatencyMode, "GCLatencyMode", NULL, -1, "Specifies the GC latency mode - batch, interactive or low latency (note that the same " \ @@ -179,7 +180,7 @@ GC_CONFIGURATION_KEYS enum HeapVerifyFlags { HEAPVERIFY_NONE = 0, HEAPVERIFY_GC = 1, // Verify the heap at beginning and end of GC - HEAPVERIFY_BARRIERCHECK = 2, // Verify the brick table + HEAPVERIFY_BARRIERCHECK = 2, // Verify the assignment operations correctly went through write barrier code HEAPVERIFY_SYNCBLK = 4, // Verify sync block scanning // the following options can be used to mitigate some of the overhead introduced diff --git a/src/coreclr/gc/gcee.cpp b/src/coreclr/gc/gcee.cpp index 6dbbfd64a7a514..b0b1b02021aad0 100644 --- a/src/coreclr/gc/gcee.cpp +++ b/src/coreclr/gc/gcee.cpp @@ -30,12 +30,7 @@ void GCHeap::UpdatePreGCCounters() // Publish perf stats g_TotalTimeInGC = GCToOSInterface::QueryPerformanceCounter(); -#ifdef MULTIPLE_HEAPS - //take the first heap.... - gc_mechanisms *pSettings = &gc_heap::g_heaps[0]->settings; -#else gc_mechanisms *pSettings = &gc_heap::settings; -#endif //MULTIPLE_HEAPS uint32_t count = (uint32_t)pSettings->gc_index; uint32_t depth = (uint32_t)pSettings->condemned_generation; @@ -96,13 +91,6 @@ void GCHeap::UpdatePostGCCounters() size_t total_num_gc_handles = g_dwHandles; uint32_t total_num_sync_blocks = GCToEEInterface::GetActiveSyncBlockCount(); - // Note this is however for perf counter only, for legacy reasons. What we showed - // in perf counters for "gen0 size" was really the gen0 budget which made - // sense (somewhat) at the time. For backward compatibility we are keeping - // this calculated the same way. For ETW we use the true gen0 size (and - // gen0 budget is also reported in an event). - size_t youngest_budget = 0; - size_t promoted_finalization_mem = 0; size_t total_num_pinned_objects = gc_heap::get_total_pinned_objects(); @@ -120,37 +108,28 @@ void GCHeap::UpdatePostGCCounters() { gc_heap* hp = gc_heap::g_heaps[hn]; #else + { gc_heap* hp = pGenGCHeap; - { #endif //MULTIPLE_HEAPS - dynamic_data* dd = hp->dynamic_data_of (gen_index); - - if (gen_index == 0) - { - youngest_budget += dd_desired_allocation (hp->dynamic_data_of (gen_index)); - } + dynamic_data* dd = hp->dynamic_data_of (gen_index); - g_GenerationSizes[gen_index] += hp->generation_size (gen_index); + g_GenerationSizes[gen_index] += hp->generation_size (gen_index); - if (gen_index <= condemned_gen) - { - g_GenerationPromotedSizes[gen_index] += dd_promoted_size (dd); - } + if (gen_index <= condemned_gen) + { + g_GenerationPromotedSizes[gen_index] += dd_promoted_size (dd); + } - if ((gen_index == loh_generation) && (condemned_gen == max_generation)) - { - g_GenerationPromotedSizes[gen_index] += dd_promoted_size (dd); - } + if ((gen_index == loh_generation) && (condemned_gen == max_generation)) + { + g_GenerationPromotedSizes[gen_index] += dd_promoted_size (dd); + } - if (gen_index == 0) - { - promoted_finalization_mem += dd_freach_previous_promotion (dd); - } -#ifdef MULTIPLE_HEAPS + if (gen_index == 0) + { + promoted_finalization_mem += dd_freach_previous_promotion (dd); } -#else } -#endif //MULTIPLE_HEAPS } ReportGenerationBounds(); @@ -510,9 +489,12 @@ bool GCHeap::IsInFrozenSegment(Object *object) void GCHeap::UpdateFrozenSegment(segment_handle seg, uint8_t* allocated, uint8_t* committed) { #ifdef FEATURE_BASICFREEZE - heap_segment* heap_seg = reinterpret_cast(seg); - heap_segment_committed(heap_seg) = committed; - heap_segment_allocated(heap_seg) = allocated; +#ifdef MULTIPLE_HEAPS + gc_heap* heap = gc_heap::g_heaps[0]; +#else + gc_heap* heap = pGenGCHeap; +#endif //MULTIPLE_HEAPS + heap->update_ro_segment (reinterpret_cast(seg), allocated, committed); #endif // FEATURE_BASICFREEZE } diff --git a/src/coreclr/gc/gceventstatus.h b/src/coreclr/gc/gceventstatus.h index cc7c81a6ddee86..9e689b008f8807 100644 --- a/src/coreclr/gc/gceventstatus.h +++ b/src/coreclr/gc/gceventstatus.h @@ -213,7 +213,16 @@ void FireDynamicEvent(const char* name, EventArgument... arguments) return; } - uint8_t* buf = new (nothrow) uint8_t[size]; + bool heap_allocated = size > 256; + uint8_t* buf; + if (heap_allocated) + { + buf = new (nothrow) uint8_t[size]; + } + else + { + buf = (uint8_t*)alloca(size); + } if (!buf) { // best effort - if we're OOM, don't bother with the event. @@ -226,7 +235,10 @@ void FireDynamicEvent(const char* name, EventArgument... arguments) IGCToCLREventSink* sink = GCToEEInterface::EventSink(); assert(sink != nullptr); sink->FireDynamicEvent(name, buf, static_cast(size)); - delete[] buf; + if (heap_allocated) + { + delete[] buf; + } }; /* diff --git a/src/coreclr/gc/gcimpl.h b/src/coreclr/gc/gcimpl.h index 45ea7c6decb4c4..040d008c59a0d3 100644 --- a/src/coreclr/gc/gcimpl.h +++ b/src/coreclr/gc/gcimpl.h @@ -160,7 +160,6 @@ class GCHeap : public IGCHeapInternal void ValidateObjectMember (Object *obj); PER_HEAP size_t ApproxTotalBytesInUse(BOOL small_heap_only = FALSE); - PER_HEAP size_t ApproxFreeBytes(); unsigned GetCondemnedGeneration(); @@ -211,8 +210,6 @@ class GCHeap : public IGCHeapInternal Object* GetNextFinalizable() { return GetNextFinalizableObject(); }; size_t GetNumberOfFinalizable() { return GetNumberFinalizableObjects(); } - PER_HEAP_ISOLATED HRESULT GetGcCounters(int gen, gc_counters* counters); - size_t GetValidSegmentSize(bool large_seg = false); void SetReservedVMLimit (size_t vmlimit); diff --git a/src/coreclr/gc/gcinterface.h b/src/coreclr/gc/gcinterface.h index ee6451249cad9f..e992082b78ff68 100644 --- a/src/coreclr/gc/gcinterface.h +++ b/src/coreclr/gc/gcinterface.h @@ -434,6 +434,7 @@ typedef enum * but are useful when the handle owner needs an efficient way to change the * strength of a handle on the fly. * + * NOTE: HNDTYPE_VARIABLE is not used currently. */ HNDTYPE_VARIABLE = 4, @@ -443,9 +444,6 @@ typedef enum * Refcounted handles are handles that behave as strong handles while the * refcount on them is greater than 0 and behave as weak handles otherwise. * - * N.B. These are currently NOT general purpose. - * The implementation is tied to COM Interop. - * */ HNDTYPE_REFCOUNTED = 5, @@ -469,14 +467,11 @@ typedef enum /* * PINNED HANDLES for asynchronous operation * - * Pinned handles are strong handles which have the added property that they - * prevent an object from moving during a garbage collection cycle. This is - * useful when passing a pointer to object innards out of the runtime while GC - * may be enabled. + * Pinned async handles are strong handles that pin a buffer or array of buffers owned + * by System.Threading.Overlapped instance. * - * NOTE: PINNING AN OBJECT IS EXPENSIVE AS IT PREVENTS THE GC FROM ACHIEVING - * OPTIMAL PACKING OF OBJECTS DURING EPHEMERAL COLLECTIONS. THIS TYPE - * OF HANDLE SHOULD BE USED SPARINGLY! + * NOTE: HNDTYPE_ASYNCPINNED is no longer used in the VM starting .NET 8 + * but we are keeping it here for backward compatibility purposes" */ HNDTYPE_ASYNCPINNED = 7, @@ -521,7 +516,7 @@ typedef bool (* walk_fn)(Object*, void*); typedef bool (* walk_fn2)(Object*, uint8_t**, void*); typedef void (* gen_walk_fn)(void* context, int generation, uint8_t* range_start, uint8_t* range_end, uint8_t* range_reserved); typedef void (* record_surv_fn)(uint8_t* begin, uint8_t* end, ptrdiff_t reloc, void* context, bool compacting_p, bool bgc_p); -typedef void (* fq_walk_fn)(bool, void*); +typedef void (* fq_walk_fn)(bool isCritical, void* pObject); typedef void (* fq_scan_fn)(Object** ppObject, ScanContext *pSC, uint32_t dwFlags); typedef void (* handle_scan_fn)(Object** pRef, Object* pSec, uint32_t flags, ScanContext* context, bool isDependent); typedef bool (* async_pin_enum_fn)(Object* object, void* context); diff --git a/src/coreclr/gc/gcpriv.h b/src/coreclr/gc/gcpriv.h index da0085ce19610d..7cdb01187a5c2f 100644 --- a/src/coreclr/gc/gcpriv.h +++ b/src/coreclr/gc/gcpriv.h @@ -294,7 +294,8 @@ void GCLogConfig (const char *fmt, ... ); #define MAX_NUM_BUCKETS (MAX_INDEX_POWER2 - MIN_INDEX_POWER2 + 1) #ifdef USE_REGIONS -#define MAX_REGION_SIZE 0x80000000 +// We constrain this as many bookkeeping fields use an int +#define MAX_REGION_SIZE ((size_t)1 << ((sizeof (int32_t) * 8) - 1)) #endif // USE_REGIONS #define MAX_NUM_FREE_SPACES 200 @@ -402,8 +403,6 @@ struct GCDebugSpinLock { #if defined(DYNAMIC_HEAP_COUNT) // time in microseconds we wait for the more space lock uint64_t msl_wait_time; - // number of times we wait for the more space lock - uint64_t msl_wait_count; #endif //DYNAMIC_HEAP_COUNT GCDebugSpinLock() @@ -415,7 +414,7 @@ struct GCDebugSpinLock { , num_switch_thread(0), num_wait_longer(0), num_switch_thread_w(0), num_disable_preemptive_w(0) #endif #if defined(DYNAMIC_HEAP_COUNT) - , msl_wait_time(0), msl_wait_count(0) + , msl_wait_time(0) #endif //DYNAMIC_HEAP_COUNT { } @@ -800,16 +799,19 @@ struct etw_bucket_info }; #endif //FEATURE_EVENT_TRACE -#if defined(MULTIPLE_HEAPS) && defined(USE_REGIONS) +#ifdef DYNAMIC_HEAP_COUNT struct min_fl_list_info { uint8_t* head; uint8_t* tail; +#ifdef DOUBLY_LINKED_FL void thread_item (uint8_t* item); +#endif //DOUBLY_LINKED_FL + void thread_item_no_prev (uint8_t* item); }; -#endif //MULTIPLE_HEAPS && USE_REGIONS +#endif //DYNAMIC_HEAP_COUNT class allocator { @@ -919,13 +921,15 @@ class allocator void unlink_item (unsigned int bn, uint8_t* item, uint8_t* previous_item, BOOL use_undo_p); void thread_item (uint8_t* item, size_t size); - void thread_item_front (uint8_t* itme, size_t size); + void thread_item_front (uint8_t* item, size_t size); #ifdef DOUBLY_LINKED_FL int thread_item_front_added (uint8_t* itme, size_t size); void unlink_item_no_undo (uint8_t* item, size_t size); - void unlink_item_no_undo (unsigned int bn, uint8_t* item, size_t size); + void unlink_item_no_undo (unsigned int bn, uint8_t* item); void unlink_item_no_undo_added (unsigned int bn, uint8_t* item, uint8_t* previous_item); -#if defined(MULTIPLE_HEAPS) && defined(USE_REGIONS) +#endif //DOUBLY_LINKED_FL + +#ifdef DYNAMIC_HEAP_COUNT void count_items (gc_heap* this_hp, size_t* fl_items_count, size_t* fl_items_for_oh_count); void rethread_items (size_t* num_total_fl_items, size_t* num_total_fl_items_rethread, @@ -934,8 +938,7 @@ class allocator size_t* free_list_space_per_heap, int num_heap); void merge_items (gc_heap* current_heap, int to_num_heaps, int from_num_heaps); -#endif //MULTIPLE_HEAPS && USE_REGIONS -#endif //DOUBLY_LINKED_FL +#endif //DYNAMIC_HEAP_COUNT void copy_to_alloc_list (alloc_list* toalist); void copy_from_alloc_list (alloc_list* fromalist); @@ -951,10 +954,12 @@ class allocator size_t max_item_count, size_t* recorded_fl_info_size); #endif //FEATURE_EVENT_TRACE +#ifdef DOUBLY_LINKED_FL bool is_doubly_linked_p() { return (gen_number == max_generation); } +#endif //DOUBLY_LINKED_FL }; #define NUM_GEN_POWER2 (20) @@ -1002,8 +1007,6 @@ class generation // If we rearrange regions between heaps, we need to make sure this is updated accordingly. heap_segment* tail_region; - // Only used during a GC for generations are being condemned. - heap_segment* plan_start_segment; // As mentioned above, only max_generation could have ro regions, and only on heap#0; for other generations // this will always be 0. heap_segment* tail_ro_region; @@ -1148,15 +1151,12 @@ class dynamic_data // // The following 3 fields are updated at the beginning of each GC, if that GC condemns this generation. // - // The number of GC that condemned this generation. The only difference between this - // and collection_count is just that collection_count is maintained for all physical generations - // (currently there are 5) whereas this is only updated for logical generations (there are 3). - size_t gc_clock; - uint64_t time_clock; //time when this gc started + size_t gc_clock; // the gc index + uint64_t time_clock; // time when this gc started uint64_t previous_time_clock; // time when previous gc started // Updated at the end of a GC, if that GC condemns this generation. - size_t gc_elapsed_time; // Time it took for the gc to complete + size_t gc_elapsed_time; // time it took for the gc to complete // // The following fields (and fields in sdata) are initialized during GC init time and do not change. @@ -1495,6 +1495,8 @@ class mark_queue_t void verify_empty(); }; +float median_of_3 (float a, float b, float c); + //class definition of the internal class class gc_heap { @@ -1744,6 +1746,9 @@ class gc_heap PER_HEAP_ISOLATED_METHOD void shutdown_gc(); + PER_HEAP_ISOLATED_METHOD void suspend_EE (); + PER_HEAP_ISOLATED_METHOD void restart_EE (); + PER_HEAP_ISOLATED_METHOD uint32_t adjust_heaps_hard_limit (uint32_t nhp); PER_HEAP_ISOLATED_METHOD size_t adjust_segment_size_hard_limit_va (size_t seg_size); @@ -2090,6 +2095,11 @@ class gc_heap heap_segment* new_seg, gc_heap* hp, BOOL loh_p); + PER_HEAP_METHOD void copy_brick_card_range (uint8_t* la, uint32_t* old_card_table, + short* old_brick_table, + uint8_t* start, uint8_t* end); + PER_HEAP_METHOD void copy_brick_card_table (); + PER_HEAP_ISOLATED_METHOD void copy_brick_card_table_on_growth (); #endif //USE_REGIONS PER_HEAP_ISOLATED_METHOD BOOL is_mark_set (uint8_t* o); @@ -2380,15 +2390,17 @@ class gc_heap #ifdef FEATURE_BASICFREEZE PER_HEAP_METHOD BOOL insert_ro_segment (heap_segment* seg); PER_HEAP_METHOD void remove_ro_segment (heap_segment* seg); + PER_HEAP_METHOD void update_ro_segment (heap_segment* seg, uint8_t* allocated, uint8_t* committed); #endif //FEATURE_BASICFREEZE - PER_HEAP_METHOD BOOL set_ro_segment_in_range (heap_segment* seg); + #ifndef USE_REGIONS + PER_HEAP_METHOD BOOL set_ro_segment_in_range (heap_segment* seg); PER_HEAP_METHOD heap_segment* soh_get_segment_to_expand(); PER_HEAP_METHOD heap_segment* get_segment (size_t size, gc_oh_num oh); PER_HEAP_ISOLATED_METHOD void release_segment (heap_segment* sg); -#endif //!USE_REGIONS PER_HEAP_ISOLATED_METHOD void seg_mapping_table_add_segment (heap_segment* seg, gc_heap* hp); PER_HEAP_ISOLATED_METHOD void seg_mapping_table_remove_segment (heap_segment* seg); +#endif //!USE_REGIONS PER_HEAP_METHOD heap_segment* get_uoh_segment (int gen_number, size_t size, BOOL* did_full_compact_gc, enter_msl_status* msl_status); PER_HEAP_METHOD void thread_uoh_segment (int gen_number, heap_segment* new_seg); PER_HEAP_ISOLATED_METHOD heap_segment* get_segment_for_uoh (int gen_number, size_t size @@ -2421,6 +2433,7 @@ class gc_heap #ifndef USE_REGIONS PER_HEAP_METHOD void rearrange_heap_segments(BOOL compacting); #endif //!USE_REGIONS + PER_HEAP_METHOD void delay_free_segments(); PER_HEAP_ISOLATED_METHOD void distribute_free_regions(); #ifdef BACKGROUND_GC PER_HEAP_ISOLATED_METHOD void reset_write_watch_for_gc_heap(void* base_address, size_t region_size); @@ -2472,10 +2485,6 @@ class gc_heap size_t card_word_end, size_t& end_card); PER_HEAP_METHOD BOOL grow_heap_segment (heap_segment* seg, uint8_t* high_address, bool* hard_limit_exceeded_p=NULL); PER_HEAP_METHOD int grow_heap_segment (heap_segment* seg, uint8_t* high_address, uint8_t* old_loc, size_t size, BOOL pad_front_p REQD_ALIGN_AND_OFFSET_DCL); - PER_HEAP_METHOD void copy_brick_card_range (uint8_t* la, uint32_t* old_card_table, - short* old_brick_table, - uint8_t* start, uint8_t* end); - PER_HEAP_METHOD void copy_brick_card_table(); PER_HEAP_METHOD void clear_brick_table (uint8_t* from, uint8_t* end); PER_HEAP_METHOD void set_brick (size_t index, ptrdiff_t val); PER_HEAP_METHOD int get_brick_entry (size_t index); @@ -2596,11 +2605,17 @@ class gc_heap // re-initialize a heap in preparation to putting it back into service PER_HEAP_METHOD void recommission_heap(); + PER_HEAP_ISOLATED_METHOD size_t get_num_completed_gcs(); + + PER_HEAP_ISOLATED_METHOD int calculate_new_heap_count(); + // check if we should change the heap count PER_HEAP_METHOD void check_heap_count(); - PER_HEAP_METHOD bool prepare_to_change_heap_count (int new_n_heaps); + PER_HEAP_ISOLATED_METHOD bool prepare_to_change_heap_count (int new_n_heaps); PER_HEAP_METHOD bool change_heap_count (int new_n_heaps); + + PER_HEAP_ISOLATED_METHOD size_t get_msl_wait_time(); #endif //DYNAMIC_HEAP_COUNT #endif //USE_REGIONS @@ -2728,7 +2743,6 @@ class gc_heap PER_HEAP_METHOD void verify_mark_array_cleared(); PER_HEAP_METHOD void verify_partial(); PER_HEAP_METHOD void verify_mark_bits_cleared (uint8_t* obj, size_t s); - PER_HEAP_METHOD void clear_all_mark_array(); #ifdef USE_REGIONS PER_HEAP_METHOD void set_background_overflow_p (uint8_t* oo); #endif @@ -2756,7 +2770,7 @@ class gc_heap PER_HEAP_METHOD BOOL decide_on_promotion_surv (size_t threshold); - PER_HEAP_METHOD void mark_phase (int condemned_gen_number, BOOL mark_only_p); + PER_HEAP_METHOD void mark_phase (int condemned_gen_number); PER_HEAP_METHOD void pin_object (uint8_t* o, uint8_t** ppObject); @@ -3130,7 +3144,6 @@ class gc_heap #endif //BGC_SERVO_TUNING PER_HEAP_METHOD size_t current_generation_size (int gen_number); PER_HEAP_METHOD size_t generation_plan_size (int gen_number); - PER_HEAP_METHOD void compute_promoted_allocation (int gen_number); PER_HEAP_METHOD size_t compute_in (int gen_number); PER_HEAP_METHOD void compute_new_dynamic_data (int gen_number); PER_HEAP_ISOLATED_METHOD gc_history_global* get_gc_data_global(); @@ -3191,14 +3204,8 @@ class gc_heap size_t& num_marked_objects); PER_HEAP_METHOD void revisit_written_pages (BOOL concurrent_p, BOOL reset_only_p=FALSE); - PER_HEAP_METHOD void concurrent_scan_dependent_handles (ScanContext *sc); - - PER_HEAP_ISOLATED_METHOD void suspend_EE (); - PER_HEAP_ISOLATED_METHOD void bgc_suspend_EE (); - PER_HEAP_ISOLATED_METHOD void restart_EE (); - PER_HEAP_METHOD void background_scan_dependent_handles (ScanContext *sc); PER_HEAP_METHOD void allow_fgc(); @@ -3446,9 +3453,6 @@ class gc_heap // Set during a GC and checked by allocator after that GC PER_HEAP_FIELD_SINGLE_GC BOOL sufficient_gen0_space_p; - // TODO: should just get rid of this for regions. - PER_HEAP_FIELD_SINGLE_GC BOOL ro_segments_in_range; - PER_HEAP_FIELD_SINGLE_GC bool no_gc_oom_p; PER_HEAP_FIELD_SINGLE_GC heap_segment* saved_loh_segment_no_gc; @@ -3497,32 +3501,7 @@ class gc_heap PER_HEAP_FIELD_SINGLE_GC heap_segment* saved_overflow_ephemeral_seg; PER_HEAP_FIELD_SINGLE_GC heap_segment* saved_sweep_ephemeral_seg; PER_HEAP_FIELD_SINGLE_GC uint8_t* saved_sweep_ephemeral_start; - - PER_HEAP_FIELD_SINGLE_GC size_t ordered_free_space_indices[MAX_NUM_BUCKETS]; - PER_HEAP_FIELD_SINGLE_GC size_t saved_ordered_free_space_indices[MAX_NUM_BUCKETS]; - PER_HEAP_FIELD_SINGLE_GC size_t ordered_plug_indices[MAX_NUM_BUCKETS]; - PER_HEAP_FIELD_SINGLE_GC size_t saved_ordered_plug_indices[MAX_NUM_BUCKETS]; - PER_HEAP_FIELD_SINGLE_GC BOOL ordered_plug_indices_init; - PER_HEAP_FIELD_SINGLE_GC BOOL use_bestfit; - PER_HEAP_FIELD_SINGLE_GC uint8_t* bestfit_first_pin; - PER_HEAP_FIELD_SINGLE_GC BOOL commit_end_of_seg; - PER_HEAP_FIELD_SINGLE_GC size_t max_free_space_items; // dynamically adjusted. - PER_HEAP_FIELD_SINGLE_GC size_t free_space_buckets; - PER_HEAP_FIELD_SINGLE_GC size_t free_space_items; - // -1 means we are using all the free - // spaces we have (not including - // end of seg space). - PER_HEAP_FIELD_SINGLE_GC int trimmed_free_space_index; - PER_HEAP_FIELD_SINGLE_GC size_t total_ephemeral_plugs; - PER_HEAP_FIELD_SINGLE_GC seg_free_spaces* bestfit_seg; - // Note: we know this from the plan phase. - // total_ephemeral_plugs actually has the same value - // but while we are calculating its value we also store - // info on how big the plugs are for best fit which we - // don't do in plan phase. - // TODO: get rid of total_ephemeral_plugs. - PER_HEAP_FIELD_SINGLE_GC size_t total_ephemeral_size; -#endif //!USE_REGIONS +#endif //USE_REGIONS #ifdef WRITE_WATCH PER_HEAP_FIELD_SINGLE_GC uint8_t* background_written_addresses[array_size + 2]; @@ -3600,6 +3579,8 @@ class gc_heap PER_HEAP_FIELD_SINGLE_GC bool special_sweep_p; #else //USE_REGIONS + PER_HEAP_FIELD_SINGLE_GC BOOL ro_segments_in_range; + // Highest and lowest address for ephemeral generations. // For regions these are global fields. PER_HEAP_FIELD_SINGLE_GC uint8_t* ephemeral_low; @@ -3617,6 +3598,31 @@ class gc_heap PER_HEAP_FIELD_SINGLE_GC BOOL ephemeral_promotion; PER_HEAP_FIELD_SINGLE_GC uint8_t* saved_ephemeral_plan_start[ephemeral_generation_count]; PER_HEAP_FIELD_SINGLE_GC size_t saved_ephemeral_plan_start_size[ephemeral_generation_count]; + + PER_HEAP_FIELD_SINGLE_GC size_t ordered_free_space_indices[MAX_NUM_BUCKETS]; + PER_HEAP_FIELD_SINGLE_GC size_t saved_ordered_free_space_indices[MAX_NUM_BUCKETS]; + PER_HEAP_FIELD_SINGLE_GC size_t ordered_plug_indices[MAX_NUM_BUCKETS]; + PER_HEAP_FIELD_SINGLE_GC size_t saved_ordered_plug_indices[MAX_NUM_BUCKETS]; + PER_HEAP_FIELD_SINGLE_GC BOOL ordered_plug_indices_init; + PER_HEAP_FIELD_SINGLE_GC BOOL use_bestfit; + PER_HEAP_FIELD_SINGLE_GC uint8_t* bestfit_first_pin; + PER_HEAP_FIELD_SINGLE_GC BOOL commit_end_of_seg; + PER_HEAP_FIELD_SINGLE_GC size_t max_free_space_items; // dynamically adjusted. + PER_HEAP_FIELD_SINGLE_GC size_t free_space_buckets; + PER_HEAP_FIELD_SINGLE_GC size_t free_space_items; + // -1 means we are using all the free + // spaces we have (not including + // end of seg space). + PER_HEAP_FIELD_SINGLE_GC int trimmed_free_space_index; + PER_HEAP_FIELD_SINGLE_GC size_t total_ephemeral_plugs; + PER_HEAP_FIELD_SINGLE_GC seg_free_spaces* bestfit_seg; + // Note: we know this from the plan phase. + // total_ephemeral_plugs actually has the same value + // but while we are calculating its value we also store + // info on how big the plugs are for best fit which we + // don't do in plan phase. + // TODO: get rid of total_ephemeral_plugs. + PER_HEAP_FIELD_SINGLE_GC size_t total_ephemeral_size; #endif //USE_REGIONS #ifdef FEATURE_CARD_MARKING_STEALING @@ -3737,7 +3743,7 @@ class gc_heap #else // bucket 0 contains sizes less than 128 #define BASE_GEN2_ALIST_BITS (6) -#endif // HOST_64BIT +#endif //HOST_64BIT PER_HEAP_FIELD_MAINTAINED alloc_list gen2_alloc_list[NUM_GEN2_ALIST - 1]; #ifdef BACKGROUND_GC @@ -3777,6 +3783,13 @@ class gc_heap PER_HEAP_FIELD_MAINTAINED mark* loh_pinned_queue; #endif //FEATURE_LOH_COMPACTION +#ifdef DYNAMIC_HEAP_COUNT + PER_HEAP_FIELD_MAINTAINED GCEvent gc_idle_thread_event; +#ifdef BACKGROUND_GC + PER_HEAP_FIELD_MAINTAINED GCEvent bgc_idle_thread_event; +#endif //BACKGROUND_GC +#endif //DYNAMIC_HEAP_COUNT + /******************************************/ // PER_HEAP_FIELD_MAINTAINED_ALLOC fields // /******************************************/ @@ -3898,17 +3911,6 @@ class gc_heap PER_HEAP_FIELD_DIAG_ONLY fgm_history fgm_result; -#ifdef MULTIPLE_HEAPS -#ifdef _DEBUG - PER_HEAP_FIELD_DIAG_ONLY size_t committed_by_oh_per_heap[total_oh_count]; - PER_HEAP_FIELD_DIAG_ONLY size_t committed_by_oh_per_heap_refresh[total_oh_count]; -#endif //_DEBUG -#else //MULTIPLE_HEAPS -#endif //MULTIPLE_HEAPS - -#ifdef BACKGROUND_GC - PER_HEAP_FIELD_DIAG_ONLY gc_history_per_heap bgc_data_per_heap; - struct gc_history { size_t gc_index; @@ -3934,6 +3936,17 @@ class gc_heap PER_HEAP_FIELD_DIAG_ONLY int gchist_index_per_heap; PER_HEAP_FIELD_DIAG_ONLY gc_history gchist_per_heap[max_history_count]; +#ifdef MULTIPLE_HEAPS +#ifdef _DEBUG + PER_HEAP_FIELD_DIAG_ONLY size_t committed_by_oh_per_heap[total_oh_count]; + PER_HEAP_FIELD_DIAG_ONLY size_t committed_by_oh_per_heap_refresh[total_oh_count]; +#endif //_DEBUG +#else //MULTIPLE_HEAPS +#endif //MULTIPLE_HEAPS + +#ifdef BACKGROUND_GC + PER_HEAP_FIELD_DIAG_ONLY gc_history_per_heap bgc_data_per_heap; + PER_HEAP_FIELD_DIAG_ONLY size_t bgc_overflow_count; // Used in ApproxTotalBytesInUse @@ -4083,7 +4096,6 @@ class gc_heap // These 2 fields' values do not change but are set/unset per GC PER_HEAP_ISOLATED_FIELD_SINGLE_GC GCEvent gc_start_event; PER_HEAP_ISOLATED_FIELD_SINGLE_GC GCEvent ee_suspend_event; - PER_HEAP_ISOLATED_FIELD_SINGLE_GC GCEvent gc_idle_thread_event; // Also updated on the heap#0 GC thread because that's where we are actually doing the decommit. PER_HEAP_ISOLATED_FIELD_SINGLE_GC BOOL gradual_decommit_in_progress_p; @@ -4162,6 +4174,10 @@ class gc_heap PER_HEAP_ISOLATED_FIELD_SINGLE_GC uint8_t* gc_high; // high end of the highest region being condemned #endif //USE_REGIONS +#ifdef STRESS_DYNAMIC_HEAP_COUNT + PER_HEAP_ISOLATED_FIELD_SINGLE_GC int heaps_in_this_gc; +#endif //STRESS_DYNAMIC_HEAP_COUNT + /**************************************************/ // PER_HEAP_ISOLATED_FIELD_SINGLE_GC_ALLOC fields // /**************************************************/ @@ -4260,37 +4276,65 @@ class gc_heap #endif //USE_REGIONS #ifdef DYNAMIC_HEAP_COUNT + // Sample collection - + // + // For every GC, we collect the msl wait time + GC pause duration info and use both to calculate the + // throughput cost percentage. We will also be using the wait time and the GC pause duration separately + // for other purposes in the future. + // + // For all gen2 GCs we also keep a separate array currently just for the GC cost. This serves as a backstop + // to smooth out the situation when we rarely pick the gen2 GCs in the first array. struct dynamic_heap_count_data_t { static const int sample_size = 3; struct sample { - uint64_t elapsed_between_gcs; // time between gcs in microseconds - uint64_t gc_elapsed_time; // time the gc took - uint64_t soh_msl_wait_time; // time the allocator spent waiting for the soh msl lock - uint64_t uoh_msl_wait_time; // time the allocator spent waiting for the uoh msl lock - size_t allocating_thread_count;// number of allocating threads - size_t heap_size; + uint64_t elapsed_between_gcs; // time between gcs in microseconds (this should really be between_pauses) + uint64_t gc_pause_time; // pause time for this GC + uint64_t msl_wait_time; }; - unsigned sample_index; + uint32_t sample_index; sample samples[sample_size]; + size_t prev_num_completed_gcs; - float median_percent_overhead; // estimated overhead of allocator + gc - float smoothed_median_percent_overhead; // exponentially smoothed version - float percent_heap_space_cost_per_heap; // percent space cost of adding a heap - float overhead_reduction_per_step_up; // percentage effect on overhead of increasing heap count - float overhead_increase_per_step_down; // percentage effect on overhead of decreasing heap count - float space_cost_increase_per_step_up; // percentage effect on space of increasing heap count - float space_cost_decrease_per_step_down;// percentage effect on space of decreasing heap count + uint32_t gen2_sample_index; + // This is (gc_elapsed_time / time inbetween this and the last gen2 GC) + float gen2_gc_percents[sample_size]; + + float median_throughput_cost_percent; // estimated overhead of allocator + gc + float smoothed_median_throughput_cost_percent; // exponentially smoothed version + float percent_heap_space_cost_per_heap; // percent space cost of adding a heap + float tcp_reduction_per_step_up; // throughput cost percent effect of increasing heap count + float tcp_increase_per_step_down; // throughput cost percent effect of decreasing heap count + float scp_increase_per_step_up; // space cost percent effect of increasing heap count + float scp_decrease_per_step_down; // space cost percent effect of decreasing heap count int new_n_heaps; + // the heap count we changed from + int last_n_heaps; + // don't start a GC till we see (n_max_heaps - new_n_heaps) number of threads idling + VOLATILE(int32_t) idle_thread_count; + bool init_only_p; + + bool should_change_heap_count; + int heap_count_to_change_to; + int heap_count_change_count; #ifdef STRESS_DYNAMIC_HEAP_COUNT int lowest_heap_with_msl_uoh; #endif //STRESS_DYNAMIC_HEAP_COUNT + + float get_median_gen2_gc_percent() + { + return median_of_3 (gen2_gc_percents[0], gen2_gc_percents[1], gen2_gc_percents[2]); + } }; PER_HEAP_ISOLATED_FIELD_MAINTAINED dynamic_heap_count_data_t dynamic_heap_count_data; + PER_HEAP_ISOLATED_FIELD_MAINTAINED uint64_t last_suspended_end_time; + // If the last full GC is blocking, this is that GC's index; for BGC, this is the settings.gc_index + // when the BGC ended. + PER_HEAP_ISOLATED_FIELD_MAINTAINED size_t gc_index_full_gc_end; #endif //DYNAMIC_HEAP_COUNT /****************************************************/ @@ -4317,8 +4361,9 @@ class gc_heap PER_HEAP_ISOLATED_FIELD_INIT_ONLY bool spin_count_unit_config_p; - // For SOH we always allocate segments of the same - // size unless no_gc_region requires larger ones. + // For SOH we always allocate segments of the same size (except for segments when no_gc_region requires larger ones). + // REGIONS TODO: right now soh_segment_size is still used in a few places for tuning. Should replace those with + // something more meaningful. PER_HEAP_ISOLATED_FIELD_INIT_ONLY size_t soh_segment_size; PER_HEAP_ISOLATED_FIELD_INIT_ONLY size_t segment_info_size; @@ -4663,12 +4708,27 @@ class CFinalize private: - //adjust the count and add a constant to add a segment + // Segments are bounded by m_Array (the overall start), each element of + // m_FillPointers, and then m_EndArray (the overall end). m_Array could + // be considered the first element of (i.e., before all of) m_FillPointers + // and m_EndArray the last. + // + // Therefore, the lower bound on segment X is m_FillPointers[x-1] with a + // special case for the first, and the upper bound on segment X is + // m_FillPointers[x] with special cases for the last. + + // Adjust the count and add a constant to add a segment static const int ExtraSegCount = 2; static const int FinalizerListSeg = total_generation_count + 1; static const int CriticalFinalizerListSeg = total_generation_count; - //Does not correspond to a segment - static const int FreeList = total_generation_count + ExtraSegCount; + // The end of this segment is m_EndArray, not an entry in m_FillPointers. + static const int FreeListSeg = total_generation_count + ExtraSegCount; + static const int FreeList = FreeListSeg; + + static const int FinalizerStartSeg = CriticalFinalizerListSeg; + static const int FinalizerMaxSeg = FinalizerListSeg; + + static const int MaxSeg = FreeListSeg; PTR_PTR_Object m_FillPointers[total_generation_count + ExtraSegCount]; PTR_PTR_Object m_Array; @@ -4691,14 +4751,18 @@ class CFinalize } inline PTR_PTR_Object& SegQueueLimit (unsigned int Seg) { - return m_FillPointers [Seg]; + return (Seg == MaxSeg ? m_EndArray : m_FillPointers[Seg]); + } + + size_t UsedCount () + { + return (SegQueue(FreeListSeg) - m_Array) + (m_EndArray - SegQueueLimit(FreeListSeg)); } BOOL IsSegEmpty ( unsigned int i) { - ASSERT ( (int)i < FreeList); + ASSERT ((int)i <= MaxSeg); return (SegQueueLimit(i) == SegQueue (i)); - } public: @@ -4708,7 +4772,7 @@ class CFinalize void LeaveFinalizeLock(); bool RegisterForFinalization (int gen, Object* obj, size_t size=0); Object* GetNextFinalizableObject (BOOL only_non_critical=FALSE); - BOOL ScanForFinalization (promote_func* fn, int gen,BOOL mark_only_p, gc_heap* hp); + BOOL ScanForFinalization (promote_func* fn, int gen, gc_heap* hp); void RelocateFinalizationData (int gen, gc_heap* hp); void WalkFReachableObjects (fq_walk_fn fn); void GcScanRoots (promote_func* fn, int hn, ScanContext *pSC); @@ -4866,7 +4930,6 @@ uint64_t& dd_previous_time_clock (dynamic_data* inst) return inst->previous_time_clock; } - inline size_t& dd_gc_clock_interval (dynamic_data* inst) { @@ -5106,8 +5169,8 @@ struct plug_and_gap struct gap_reloc_pair { size_t gap; - size_t reloc; - pair m_pair; + size_t reloc; + pair m_pair; }; #define min_pre_pin_obj_size (sizeof (gap_reloc_pair) + min_obj_size) @@ -5701,13 +5764,13 @@ inline generation* gc_heap::generation_of (int n) { assert (((n < total_generation_count) && (n >= 0))); - return &generation_table [ n ]; + return &generation_table[n]; } inline dynamic_data* gc_heap::dynamic_data_of (int gen_number) { - return &dynamic_data_table [ gen_number ]; + return &dynamic_data_table[gen_number]; } #define GC_PAGE_SIZE 0x1000 diff --git a/src/coreclr/gc/handletable.cpp b/src/coreclr/gc/handletable.cpp index 5979f9646499ce..98885cc5f1e1e1 100644 --- a/src/coreclr/gc/handletable.cpp +++ b/src/coreclr/gc/handletable.cpp @@ -407,12 +407,12 @@ void HndDestroyHandleOfUnknownType(HHANDLETABLE hTable, OBJECTHANDLE handle) // sanity check handle we are being asked to free _ASSERTE(handle); -#ifdef FEATURE_COMINTEROP +#ifdef FEATURE_WEAK_NATIVE_COM_HANDLES // If we're being asked to destroy a native COM weak handle, that will cause a leak // of the IWeakReference* that it holds in its extra data. Instead of using this // API use DestroyNativeComWeakHandle instead. _ASSERTE(HandleFetchType(handle) != HNDTYPE_WEAK_NATIVE_COM); -#endif // FEATURE_COMINTEROP +#endif // FEATURE_WEAK_NATIVE_COM_HANDLES // fetch the type and then free normally HndDestroyHandle(hTable, HandleFetchType(handle), handle); diff --git a/src/coreclr/gc/handletableconstants.h b/src/coreclr/gc/handletableconstants.h index 0d6e678f2aebc0..9ad57eb8fd961e 100644 --- a/src/coreclr/gc/handletableconstants.h +++ b/src/coreclr/gc/handletableconstants.h @@ -3,9 +3,13 @@ #ifndef __HANDLETABLECONSTANTS_H__ #define __HANDLETABLECONSTANTS_H__ - // Build support for async pinned handles into standalone GC to make it usable with older runtimes +// Support for ref-counted handles is required on all platforms (FEATURE_COMINTEROP, FEATURE_COMWRAPPERS, FEATURE_OBJCMARSHAL) +#define FEATURE_REFCOUNTED_HANDLES + + // Build support for obsolete handles types into standalone GC to make it usable with older runtimes #if defined(BUILD_AS_STANDALONE) && !defined(FEATURE_NATIVEAOT) -#define FEATURE_ASYNC_PINNED_HANDLES +#define FEATURE_ASYNC_PINNED_HANDLES // No longer used in .NET 8+ +#define FEATURE_WEAK_NATIVE_COM_HANDLES // No longer used in .NET 8+ #endif #define INITIAL_HANDLE_TABLE_ARRAY_SIZE 10 diff --git a/src/coreclr/gc/objecthandle.cpp b/src/coreclr/gc/objecthandle.cpp index 3ccfc693685b3e..e7d2261902baa7 100644 --- a/src/coreclr/gc/objecthandle.cpp +++ b/src/coreclr/gc/objecthandle.cpp @@ -45,6 +45,7 @@ struct VARSCANINFO //---------------------------------------------------------------------------- +#ifdef FEATURE_VARIABLE_HANDLES /* * Scan callback for tracing variable-strength handles. * @@ -65,8 +66,9 @@ void CALLBACK VariableTraceDispatcher(_UNCHECKED_OBJECTREF *pObjRef, uintptr_t * pInfo->pfnTrace(pObjRef, NULL, lp1, pInfo->lp2); } } +#endif // FEATURE_VARIABLE_HANDLES -#if defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS) || defined(FEATURE_OBJCMARSHAL) || defined(FEATURE_NATIVEAOT) +#ifdef FEATURE_REFCOUNTED_HANDLES /* * Scan callback for tracing ref-counted handles. * @@ -102,7 +104,7 @@ void CALLBACK PromoteRefCounted(_UNCHECKED_OBJECTREF *pObjRef, uintptr_t *pExtra // Assert this object wasn't relocated since we are passing a temporary object's address. _ASSERTE(pOldObj == pObj); } -#endif // FEATURE_COMINTEROP || FEATURE_COMWRAPPERS || FEATURE_OBJCMARSHAL || FEATURE_NATIVEAOT +#endif // FEATURE_REFCOUNTED_HANDLES // Only used by profiling/ETW. @@ -268,6 +270,7 @@ void CALLBACK PinObject(_UNCHECKED_OBJECTREF *pObjRef, uintptr_t *pExtraInfo, ui callback(pRef, (ScanContext *)lp1, GC_CALL_PINNED); } +#ifdef FEATURE_ASYNC_PINNED_HANDLES void CALLBACK AsyncPinObject(_UNCHECKED_OBJECTREF *pObjRef, uintptr_t *pExtraInfo, uintptr_t lp1, uintptr_t lp2) { UNREFERENCED_PARAMETER(pExtraInfo); @@ -284,7 +287,7 @@ void CALLBACK AsyncPinObject(_UNCHECKED_OBJECTREF *pObjRef, uintptr_t *pExtraInf GCToEEInterface::WalkAsyncPinnedForPromotion(pPinnedObj, (ScanContext *)lp1, callback); } } - +#endif // FEATURE_ASYNC_PINNED_HANDLES /* * Scan callback for tracing strong handles. @@ -424,9 +427,9 @@ void CALLBACK ScanPointerForProfilerAndETW(_UNCHECKED_OBJECTREF *pObjRef, uintpt break; case HNDTYPE_WEAK_SHORT: case HNDTYPE_WEAK_LONG: -#ifdef FEATURE_COMINTEROP +#ifdef FEATURE_WEAK_NATIVE_COM_HANDLES case HNDTYPE_WEAK_NATIVE_COM: -#endif // FEATURE_COMINTEROP +#endif // FEATURE_WEAK_NATIVE_COM_HANDLES rootFlags |= kEtwGCRootFlagsWeakRef; break; @@ -435,33 +438,33 @@ void CALLBACK ScanPointerForProfilerAndETW(_UNCHECKED_OBJECTREF *pObjRef, uintpt break; case HNDTYPE_PINNED: +#ifdef FEATURE_ASYNC_PINNED_HANDLES case HNDTYPE_ASYNCPINNED: +#endif // FEATURE_ASYNC_PINNED_HANDLES rootFlags |= kEtwGCRootFlagsPinning; break; +#ifdef FEATURE_VARIABLE_HANDLES case HNDTYPE_VARIABLE: -#ifdef FEATURE_NATIVEAOT - { - // Set the appropriate ETW flags for the current strength of this variable handle - uint32_t nVarHandleType = GetVariableHandleType(handle); - if (((nVarHandleType & VHT_WEAK_SHORT) != 0) || - ((nVarHandleType & VHT_WEAK_LONG) != 0)) - { - rootFlags |= kEtwGCRootFlagsWeakRef; - } - if ((nVarHandleType & VHT_PINNED) != 0) { - rootFlags |= kEtwGCRootFlagsPinning; - } + // Set the appropriate ETW flags for the current strength of this variable handle + uint32_t nVarHandleType = GetVariableHandleType(handle); + if (((nVarHandleType & VHT_WEAK_SHORT) != 0) || + ((nVarHandleType & VHT_WEAK_LONG) != 0)) + { + rootFlags |= kEtwGCRootFlagsWeakRef; + } + if ((nVarHandleType & VHT_PINNED) != 0) + { + rootFlags |= kEtwGCRootFlagsPinning; + } - // No special ETW flag for strong handles (VHT_STRONG) - } -#else - _ASSERTE(!"Variable handle encountered"); -#endif + // No special ETW flag for strong handles (VHT_STRONG) + } break; +#endif // FEATURE_VARIABLE_HANDLES -#if (defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS) || defined(FEATURE_OBJCMARSHAL)) && !defined(FEATURE_NATIVEAOT) +#ifdef FEATURE_REFCOUNTED_HANDLES case HNDTYPE_REFCOUNTED: rootFlags |= kEtwGCRootFlagsRefCounted; if (*pRef != NULL) @@ -470,7 +473,11 @@ void CALLBACK ScanPointerForProfilerAndETW(_UNCHECKED_OBJECTREF *pObjRef, uintpt rootFlags |= kEtwGCRootFlagsWeakRef; } break; -#endif // (FEATURE_COMINTEROP || FEATURE_COMWRAPPERS || FEATURE_OBJCMARSHAL) && !FEATURE_NATIVEAOT +#endif // FEATURE_REFCOUNTED_HANDLES + + default: + _ASSERTE(!"Unexpected handle type"); + break; } _UNCHECKED_OBJECTREF pSec = NULL; @@ -832,29 +839,6 @@ int getThreadCount(ScanContext* sc) return sc->thread_count; } -// - reexpress as complete only like hndtable does now!!! -fmh -void Ref_EndSynchronousGC(uint32_t condemned, uint32_t maxgen) -{ - LIMITED_METHOD_CONTRACT; - UNREFERENCED_PARAMETER(condemned); - UNREFERENCED_PARAMETER(maxgen); - -// NOT used, must be modified for MTHTS (scalable HandleTable scan) if planned to use: -// need to pass ScanContext info to split HT bucket by threads, or to be performed under t_join::join -/* - // tell the table we finished a GC - HandleTableMap *walk = &g_HandleTableMap; - while (walk) { - for (uint32_t i = 0; i < INITIAL_HANDLE_TABLE_ARRAY_SIZE; i ++) { - HHANDLETABLE hTable = walk->pTable[i]; - if (hTable) - HndNotifyGcCycleComplete(hTable, condemned, maxgen); - } - walk = walk->pNext; - } -*/ -} - void SetDependentHandleSecondary(OBJECTHANDLE handle, OBJECTREF objref) { CONTRACTL @@ -883,7 +867,7 @@ void SetDependentHandleSecondary(OBJECTHANDLE handle, OBJECTREF objref) HndSetHandleExtraInfo(handle, HNDTYPE_DEPENDENT, (uintptr_t)value); } - +#ifdef FEATURE_VARIABLE_HANDLES //---------------------------------------------------------------------------- /* @@ -1015,6 +999,7 @@ void TraceVariableHandlesBySingleThread(HANDLESCANPROC pfnTrace, uintptr_t lp1, walk = walk->pNext; } } +#endif // FEATURE_VARIABLE_HANDLES //---------------------------------------------------------------------------- @@ -1062,8 +1047,10 @@ void Ref_TracePinningRoots(uint32_t condemned, uint32_t maxgen, ScanContext* sc, walk = walk->pNext; } +#ifdef FEATURE_VARIABLE_HANDLES // pin objects pointed to by variable handles whose dynamic type is VHT_PINNED TraceVariableHandles(PinObject, sc, uintptr_t(fn), VHT_PINNED, condemned, maxgen, flags); +#endif } @@ -1101,11 +1088,12 @@ void Ref_TraceNormalRoots(uint32_t condemned, uint32_t maxgen, ScanContext* sc, walk = walk->pNext; } +#ifdef FEATURE_VARIABLE_HANDLES // promote objects pointed to by variable handles whose dynamic type is VHT_STRONG TraceVariableHandles(PromoteObject, sc, uintptr_t(fn), VHT_STRONG, condemned, maxgen, flags); +#endif - -#if defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS) || defined(FEATURE_OBJCMARSHAL) || defined(FEATURE_NATIVEAOT) +#ifdef FEATURE_REFCOUNTED_HANDLES // don't scan ref-counted handles during concurrent phase as the clean-up of CCWs can race with AD unload and cause AV's if (!sc->concurrent) { @@ -1132,13 +1120,13 @@ void Ref_TraceNormalRoots(uint32_t condemned, uint32_t maxgen, ScanContext* sc, walk = walk->pNext; } } -#endif // FEATURE_COMINTEROP || FEATURE_COMWRAPPERS || FEATURE_OBJCMARSHAL || FEATURE_NATIVEAOT +#endif // FEATURE_REFCOUNTED_HANDLES } void Ref_TraceRefCountHandles(HANDLESCANPROC callback, uintptr_t lParam1, uintptr_t lParam2) { -#if defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS) || defined(FEATURE_OBJCMARSHAL) +#ifdef FEATURE_REFCOUNTED_HANDLES int max_slots = getNumberOfSlots(); uint32_t handleType = HNDTYPE_REFCOUNTED; @@ -1163,7 +1151,7 @@ void Ref_TraceRefCountHandles(HANDLESCANPROC callback, uintptr_t lParam1, uintpt UNREFERENCED_PARAMETER(callback); UNREFERENCED_PARAMETER(lParam1); UNREFERENCED_PARAMETER(lParam2); -#endif // FEATURE_COMINTEROP || FEATURE_COMWRAPPERS || FEATURE_OBJCMARSHAL +#endif // FEATURE_REFCOUNTED_HANDLES } @@ -1179,9 +1167,9 @@ void Ref_CheckReachable(uint32_t condemned, uint32_t maxgen, ScanContext *sc) uint32_t types[] = { HNDTYPE_WEAK_LONG, -#if defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS) || defined(FEATURE_OBJCMARSHAL) || defined(FEATURE_NATIVEAOT) +#ifdef FEATURE_REFCOUNTED_HANDLES HNDTYPE_REFCOUNTED, -#endif // FEATURE_COMINTEROP || FEATURE_COMWRAPPERS || FEATURE_OBJCMARSHAL || FEATURE_NATIVEAOT +#endif }; // check objects pointed to by short weak handles @@ -1209,8 +1197,10 @@ void Ref_CheckReachable(uint32_t condemned, uint32_t maxgen, ScanContext *sc) walk = walk->pNext; } +#ifdef FEATURE_VARIABLE_HANDLES // check objects pointed to by variable handles whose dynamic type is VHT_WEAK_LONG TraceVariableHandles(CheckPromoted, sc, 0, VHT_WEAK_LONG, condemned, maxgen, flags); +#endif } // @@ -1464,9 +1454,9 @@ void Ref_CheckAlive(uint32_t condemned, uint32_t maxgen, ScanContext *sc) uint32_t types[] = { HNDTYPE_WEAK_SHORT -#if defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS) +#ifdef FEATURE_WEAK_NATIVE_COM_HANDLES , HNDTYPE_WEAK_NATIVE_COM -#endif // FEATURE_COMINTEROP || FEATURE_COMWRAPPERS +#endif }; uint32_t flags = sc->concurrent ? HNDGCF_ASYNC : HNDGCF_NORMAL; @@ -1492,8 +1482,11 @@ void Ref_CheckAlive(uint32_t condemned, uint32_t maxgen, ScanContext *sc) } walk = walk->pNext; } + +#ifdef FEATURE_VARIABLE_HANDLES // check objects pointed to by variable handles whose dynamic type is VHT_WEAK_SHORT TraceVariableHandles(CheckPromoted, sc, 0, VHT_WEAK_SHORT, condemned, maxgen, flags); +#endif } static VOLATILE(int32_t) uCount = 0; @@ -1527,12 +1520,12 @@ void Ref_UpdatePointers(uint32_t condemned, uint32_t maxgen, ScanContext* sc, Re HNDTYPE_WEAK_SHORT, HNDTYPE_WEAK_LONG, HNDTYPE_STRONG, -#if defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS) || defined(FEATURE_OBJCMARSHAL) || defined(FEATURE_NATIVEAOT) +#ifdef FEATURE_REFCOUNTED_HANDLES HNDTYPE_REFCOUNTED, -#endif // FEATURE_COMINTEROP || FEATURE_COMWRAPPERS || FEATURE_OBJCMARSHAL || FEATURE_NATIVEAOT -#if defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS) +#endif +#ifdef FEATURE_WEAK_NATIVE_COM_HANDLES HNDTYPE_WEAK_NATIVE_COM, -#endif // FEATURE_COMINTEROP || FEATURE_COMWRAPPERS +#endif HNDTYPE_SIZEDREF, }; @@ -1559,8 +1552,10 @@ void Ref_UpdatePointers(uint32_t condemned, uint32_t maxgen, ScanContext* sc, Re walk = walk->pNext; } +#ifdef FEATURE_VARIABLE_HANDLES // update pointers in variable handles whose dynamic type is VHT_WEAK_SHORT, VHT_WEAK_LONG or VHT_STRONG TraceVariableHandles(UpdatePointer, sc, uintptr_t(fn), VHT_WEAK_SHORT | VHT_WEAK_LONG | VHT_STRONG, condemned, maxgen, flags); +#endif } #if defined(GC_PROFILING) || defined(FEATURE_EVENT_TRACE) @@ -1581,14 +1576,16 @@ void Ref_ScanHandlesForProfilerAndETW(uint32_t maxgen, uintptr_t lp1, handle_sca HNDTYPE_WEAK_SHORT, HNDTYPE_WEAK_LONG, HNDTYPE_STRONG, -#if defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS) || defined(FEATURE_OBJCMARSHAL) || defined(FEATURE_NATIVEAOT) +#ifdef FEATURE_REFCOUNTED_HANDLES HNDTYPE_REFCOUNTED, -#endif // FEATURE_COMINTEROP || FEATURE_COMWRAPPERS || FEATURE_OBJCMARSHAL || FEATURE_NATIVEAOT -#if defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS) +#endif +#ifdef FEATURE_WEAK_NATIVE_COM_HANDLES HNDTYPE_WEAK_NATIVE_COM, -#endif // FEATURE_COMINTEROP || FEATURE_COMWRAPPERS +#endif HNDTYPE_PINNED, -// HNDTYPE_VARIABLE, +#ifdef FEATURE_VARIABLE_HANDLES + HNDTYPE_VARIABLE, +#endif #ifdef FEATURE_ASYNC_PINNED_HANDLES HNDTYPE_ASYNCPINNED, #endif @@ -1612,8 +1609,10 @@ void Ref_ScanHandlesForProfilerAndETW(uint32_t maxgen, uintptr_t lp1, handle_sca walk = walk->pNext; } +#ifdef FEATURE_VARIABLE_HANDLES // update pointers in variable handles whose dynamic type is VHT_WEAK_SHORT, VHT_WEAK_LONG or VHT_STRONG TraceVariableHandlesBySingleThread(&ScanPointerForProfilerAndETW, lp1, (uintptr_t)fn, VHT_WEAK_SHORT | VHT_WEAK_LONG | VHT_STRONG, maxgen, maxgen, flags); +#endif } void Ref_ScanDependentHandlesForProfilerAndETW(uint32_t maxgen, ScanContext * SC, handle_scan_fn fn) @@ -1642,52 +1641,6 @@ void CALLBACK ScanPointer(_UNCHECKED_OBJECTREF *pObjRef, uintptr_t *pExtraInfo, callback(pRef, (ScanContext *)lp1, 0); } -// Enumerate all object references held by any of the handle tables in the system. -void Ref_ScanPointers(uint32_t condemned, uint32_t maxgen, ScanContext* sc, Ref_promote_func* fn) -{ - WRAPPER_NO_CONTRACT; - - uint32_t types[] = - { - HNDTYPE_WEAK_SHORT, - HNDTYPE_WEAK_LONG, - HNDTYPE_STRONG, -#if defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS) || defined(FEATURE_OBJCMARSHAL) || defined(FEATURE_NATIVEAOT) - HNDTYPE_REFCOUNTED, -#endif // FEATURE_COMINTEROP || FEATURE_COMWRAPPERS || FEATURE_OBJCMARSHAL || FEATURE_NATIVEAOT - HNDTYPE_PINNED, -#ifdef FEATURE_ASYNC_PINNED_HANDLES - HNDTYPE_ASYNCPINNED, -#endif - HNDTYPE_SIZEDREF, - }; - - uint32_t flags = HNDGCF_NORMAL; - - // perform a multi-type scan that enumerates pointers - for (HandleTableMap * walk = &g_HandleTableMap; - walk != nullptr; - walk = walk->pNext) - { - for (uint32_t i = 0; i < INITIAL_HANDLE_TABLE_ARRAY_SIZE; i++) - { - if (walk->pBuckets[i] != NULL) - { - // this is the one of Ref_* function performed by single thread in MULTI_HEAPS case, so we need to loop through all HT of the bucket - for (int uCPUindex = 0; uCPUindex < getNumberOfSlots(); uCPUindex++) - { - HHANDLETABLE hTable = walk->pBuckets[i]->pTable[uCPUindex]; - if (hTable) - HndScanHandlesForGC(hTable, &ScanPointer, uintptr_t(sc), uintptr_t(fn), types, ARRAY_SIZE(types), condemned, maxgen, flags); - } - } - } - } - - // enumerate pointers in variable handles whose dynamic type is VHT_WEAK_SHORT, VHT_WEAK_LONG or VHT_STRONG - TraceVariableHandlesBySingleThread(&ScanPointer, uintptr_t(sc), uintptr_t(fn), VHT_WEAK_SHORT | VHT_WEAK_LONG | VHT_STRONG, condemned, maxgen, flags); -} - void Ref_UpdatePinnedPointers(uint32_t condemned, uint32_t maxgen, ScanContext* sc, Ref_promote_func* fn) { WRAPPER_NO_CONTRACT; @@ -1724,8 +1677,10 @@ void Ref_UpdatePinnedPointers(uint32_t condemned, uint32_t maxgen, ScanContext* walk = walk->pNext; } +#ifdef FEATURE_VARIABLE_HANDLES // update pointers in variable handles whose dynamic type is VHT_PINNED TraceVariableHandles(UpdatePointerPinned, sc, uintptr_t(fn), VHT_PINNED, condemned, maxgen, flags); +#endif } @@ -1744,13 +1699,15 @@ void Ref_AgeHandles(uint32_t condemned, uint32_t maxgen, ScanContext* sc) HNDTYPE_STRONG, HNDTYPE_PINNED, +#ifdef FEATURE_VARIABLE_HANDLES HNDTYPE_VARIABLE, -#if defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS) || defined(FEATURE_OBJCMARSHAL) || defined(FEATURE_NATIVEAOT) +#endif +#ifdef FEATURE_REFCOUNTED_HANDLES HNDTYPE_REFCOUNTED, -#endif // FEATURE_COMINTEROP || FEATURE_COMWRAPPERS || FEATURE_OBJCMARSHAL || FEATURE_NATIVEAOT -#if defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS) +#endif +#ifdef FEATURE_WEAK_NATIVE_COM_HANDLES HNDTYPE_WEAK_NATIVE_COM, -#endif // FEATURE_COMINTEROP || FEATURE_COMWRAPPERS +#endif #ifdef FEATURE_ASYNC_PINNED_HANDLES HNDTYPE_ASYNCPINNED, #endif @@ -1796,13 +1753,15 @@ void Ref_RejuvenateHandles(uint32_t condemned, uint32_t maxgen, ScanContext* sc) HNDTYPE_STRONG, HNDTYPE_PINNED, +#ifdef FEATURE_VARIABLE_HANDLES HNDTYPE_VARIABLE, -#if defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS) || defined(FEATURE_OBJCMARSHAL) || defined(FEATURE_NATIVEAOT) +#endif +#ifdef FEATURE_REFCOUNTED_HANDLES HNDTYPE_REFCOUNTED, -#endif // FEATURE_COMINTEROP || FEATURE_COMWRAPPERS || FEATURE_OBJCMARSHAL || FEATURE_NATIVEAOT -#if defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS) +#endif +#ifdef FEATURE_WEAK_NATIVE_COM_HANDLES HNDTYPE_WEAK_NATIVE_COM, -#endif // FEATURE_COMINTEROP || FEATURE_COMWRAPPERS +#endif #ifdef FEATURE_ASYNC_PINNED_HANDLES HNDTYPE_ASYNCPINNED, #endif @@ -1843,17 +1802,18 @@ void Ref_VerifyHandleTable(uint32_t condemned, uint32_t maxgen, ScanContext* sc) HNDTYPE_WEAK_SHORT, HNDTYPE_WEAK_LONG, - HNDTYPE_STRONG, HNDTYPE_PINNED, +#ifdef FEATURE_VARIABLE_HANDLES HNDTYPE_VARIABLE, -#if defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS) || defined(FEATURE_OBJCMARSHAL) || defined(FEATURE_NATIVEAOT) +#endif +#ifdef FEATURE_REFCOUNTED_HANDLES HNDTYPE_REFCOUNTED, -#endif // FEATURE_COMINTEROP || FEATURE_COMWRAPPERS || FEATURE_OBJCMARSHAL || FEATURE_NATIVEAOT -#if defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS) +#endif +#ifdef FEATURE_WEAK_NATIVE_COM_HANDLES HNDTYPE_WEAK_NATIVE_COM, -#endif // FEATURE_COMINTEROP || FEATURE_COMWRAPPERS +#endif #ifdef FEATURE_ASYNC_PINNED_HANDLES HNDTYPE_ASYNCPINNED, #endif diff --git a/src/coreclr/gc/objecthandle.h b/src/coreclr/gc/objecthandle.h index 0f6a851ec03a65..75ad1bd0f77da2 100644 --- a/src/coreclr/gc/objecthandle.h +++ b/src/coreclr/gc/objecthandle.h @@ -86,8 +86,6 @@ void Ref_DestroyHandleTableBucket(HandleTableBucket *pBucket); */ struct ScanContext; struct DhContext; -void Ref_BeginSynchronousGC (uint32_t uCondemnedGeneration, uint32_t uMaxGeneration); -void Ref_EndSynchronousGC (uint32_t uCondemnedGeneration, uint32_t uMaxGeneration); typedef void Ref_promote_func(class Object**, ScanContext*, uint32_t); @@ -101,9 +99,6 @@ bool Ref_ScanDependentHandlesForPromotion(DhContext *pDhContext); void Ref_ScanDependentHandlesForClearing(uint32_t condemned, uint32_t maxgen, ScanContext* sc); void Ref_ScanDependentHandlesForRelocation(uint32_t condemned, uint32_t maxgen, ScanContext* sc, Ref_promote_func* fn); void Ref_ScanSizedRefHandles(uint32_t condemned, uint32_t maxgen, ScanContext* sc, Ref_promote_func* fn); -#ifdef FEATURE_NATIVEAOT -void Ref_ScanPointers(uint32_t condemned, uint32_t maxgen, ScanContext* sc, Ref_promote_func* fn); -#endif void Ref_CheckReachable (uint32_t uCondemnedGeneration, uint32_t uMaxGeneration, ScanContext* sc); void Ref_CheckAlive (uint32_t uCondemnedGeneration, uint32_t uMaxGeneration, ScanContext *sc); diff --git a/src/coreclr/gc/unix/gcenv.unix.cpp b/src/coreclr/gc/unix/gcenv.unix.cpp index 285b783485802a..ab99940a0151cf 100644 --- a/src/coreclr/gc/unix/gcenv.unix.cpp +++ b/src/coreclr/gc/unix/gcenv.unix.cpp @@ -1160,7 +1160,34 @@ uint64_t GetAvailablePhysicalMemory() uint64_t available = 0; // Get the physical memory available. -#ifndef __APPLE__ +#if defined(__APPLE__) + vm_size_t page_size; + mach_port_t mach_port; + mach_msg_type_number_t count; + vm_statistics_data_t vm_stats; + mach_port = mach_host_self(); + count = sizeof(vm_stats) / sizeof(natural_t); + if (KERN_SUCCESS == host_page_size(mach_port, &page_size)) + { + if (KERN_SUCCESS == host_statistics(mach_port, HOST_VM_INFO, (host_info_t)&vm_stats, &count)) + { + available = (int64_t)vm_stats.free_count * (int64_t)page_size; + } + } + mach_port_deallocate(mach_task_self(), mach_port); +#elif defined(__FreeBSD__) + size_t inactive_count = 0, laundry_count = 0, free_count = 0; + size_t sz = sizeof(inactive_count); + sysctlbyname("vm.stats.vm.v_inactive_count", &inactive_count, &sz, NULL, 0); + + sz = sizeof(laundry_count); + sysctlbyname("vm.stats.vm.v_laundry_count", &laundry_count, &sz, NULL, 0); + + sz = sizeof(free_count); + sysctlbyname("vm.stats.vm.v_free_count", &free_count, &sz, NULL, 0); + + available = (inactive_count + laundry_count + free_count) * sysconf(_SC_PAGESIZE); +#else // Linux static volatile bool tryReadMemInfo = true; if (tryReadMemInfo) @@ -1176,22 +1203,7 @@ uint64_t GetAvailablePhysicalMemory() // Fall back to getting the available pages using sysconf. available = sysconf(SYSCONF_PAGES) * sysconf(_SC_PAGE_SIZE); } -#else // __APPLE__ - vm_size_t page_size; - mach_port_t mach_port; - mach_msg_type_number_t count; - vm_statistics_data_t vm_stats; - mach_port = mach_host_self(); - count = sizeof(vm_stats) / sizeof(natural_t); - if (KERN_SUCCESS == host_page_size(mach_port, &page_size)) - { - if (KERN_SUCCESS == host_statistics(mach_port, HOST_VM_INFO, (host_info_t)&vm_stats, &count)) - { - available = (int64_t)vm_stats.free_count * (int64_t)page_size; - } - } - mach_port_deallocate(mach_task_self(), mach_port); -#endif // __APPLE__ +#endif return available; } diff --git a/src/coreclr/gcinfo/gcinfodumper.cpp b/src/coreclr/gcinfo/gcinfodumper.cpp index d412fb618fe063..16fed212542107 100644 --- a/src/coreclr/gcinfo/gcinfodumper.cpp +++ b/src/coreclr/gcinfo/gcinfodumper.cpp @@ -226,7 +226,7 @@ BOOL GcInfoDumper::ReportPointerRecord ( #undef REG #elif defined(TARGET_RISCV64) #undef REG -#define REG(reg, field) { offsetof(Riscv64VolatileContextPointer, field) } +#define REG(reg, field) { offsetof(RiscV64VolatileContextPointer, field) } REG(zero, R0), REG(a0, A0), REG(a1, A1), diff --git a/src/coreclr/ildasm/ildasmpch.h b/src/coreclr/ildasm/ildasmpch.h index b422a059b0eb96..9d89ba46db52c2 100644 --- a/src/coreclr/ildasm/ildasmpch.h +++ b/src/coreclr/ildasm/ildasmpch.h @@ -12,7 +12,6 @@ #include #include #include -#include #ifndef Debug_ReportError #define Debug_ReportError(strMessage) diff --git a/src/coreclr/inc/CMakeLists.txt b/src/coreclr/inc/CMakeLists.txt index 0733379b024093..cae1e5c07b7565 100644 --- a/src/coreclr/inc/CMakeLists.txt +++ b/src/coreclr/inc/CMakeLists.txt @@ -27,7 +27,7 @@ if(CLR_CMAKE_HOST_WIN32) set(OUT_NAME ${CMAKE_CURRENT_BINARY_DIR}/idls_out/${IDLNAME}_i.c) list(APPEND CORGUIDS_SOURCES ${OUT_NAME}) add_custom_command(OUTPUT ${OUT_NAME} - COMMAND ${MIDL} ${MIDL_INCLUDE_DIRECTORIES} /no_stamp /h ${CMAKE_CURRENT_BINARY_DIR}/idls_out/${IDLNAME}.h ${MIDL_DEFINITIONS} /out ${CMAKE_CURRENT_BINARY_DIR}/idls_out ${CMAKE_CURRENT_SOURCE_DIR}/${GENERATE_IDL} + COMMAND ${MIDL} ${MIDL_INCLUDE_DIRECTORIES} /nologo /no_stamp /h ${CMAKE_CURRENT_BINARY_DIR}/idls_out/${IDLNAME}.h ${MIDL_DEFINITIONS} /out ${CMAKE_CURRENT_BINARY_DIR}/idls_out ${CMAKE_CURRENT_SOURCE_DIR}/${GENERATE_IDL} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${GENERATE_IDL} COMMENT "Compiling ${GENERATE_IDL}") endforeach(GENERATE_IDL) diff --git a/src/coreclr/inc/CrstTypes.def b/src/coreclr/inc/CrstTypes.def index 3a1e81f84f8681..3bccb73e03a599 100644 --- a/src/coreclr/inc/CrstTypes.def +++ b/src/coreclr/inc/CrstTypes.def @@ -394,9 +394,6 @@ End Crst RCWCleanupList End -Crst ExternalObjectContextCache -End - Crst Reflection AcquiredBefore LoaderHeap UnresolvedClassLock End diff --git a/src/coreclr/inc/clr/stack.h b/src/coreclr/inc/clr/stack.h deleted file mode 100644 index 97719c21c9ebed..00000000000000 --- a/src/coreclr/inc/clr/stack.h +++ /dev/null @@ -1,98 +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 header provides a basic stack implementation - -#ifndef _clr_Stack_h_ -#define _clr_Stack_h_ - -namespace clr -{ - //------------------------------------------------------------------------------------------------- - // A basic stack class. - // - template < typename T > - class Stack - { - private: - //--------------------------------------------------------------------------------------------- - struct Link - { - template < typename A1 > - Link(A1 && a1, Link * next = nullptr) - : _value(std::forward(a1)) - , _next(next) - {} - - T _value; - Link * _next; - }; - - public: - //--------------------------------------------------------------------------------------------- - // Empty stack constructor. - Stack() - : _top(nullptr) - , _size(0) - {} - - //--------------------------------------------------------------------------------------------- - // Move constructor. - Stack(Stack && stack) - : _top(nullptr) - , _size(0) - { *this = std::move(stack); } - - //--------------------------------------------------------------------------------------------- - ~Stack() - { - while (!empty()) - { - pop(); - } - } - - //--------------------------------------------------------------------------------------------- - // Move assignment. - Stack& operator=(Stack && stack) - { std::swap(_top, stack._top); std::swap(_size, stack._size); } - - //--------------------------------------------------------------------------------------------- - bool empty() const - { return _top == nullptr; } - - //--------------------------------------------------------------------------------------------- - size_t size() const - { return _size; } - - //--------------------------------------------------------------------------------------------- - T & top() - { return _top->_value; } - - //--------------------------------------------------------------------------------------------- - T const & top() const - { return _top->_value; } - - //--------------------------------------------------------------------------------------------- - template < typename A1 > inline - void push(A1 && value) - { - STATIC_CONTRACT_THROWS; - _top = new Link(std::forward(value), _top); - ++_size; - } - - //--------------------------------------------------------------------------------------------- - void pop() - { Link * del = _top; _top = _top->_next; --_size; delete del; } - - private: - //--------------------------------------------------------------------------------------------- - Link * _top; - size_t _size; - }; -} // namespace clr - -#endif // _clr_Stack_h_ diff --git a/src/coreclr/inc/clr/win32.h b/src/coreclr/inc/clr/win32.h deleted file mode 100644 index 0198a732da8ce1..00000000000000 --- a/src/coreclr/inc/clr/win32.h +++ /dev/null @@ -1,37 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// -// clr/win32.h -// -// Provides Win32-specific utility functionality. -// - -// - -#ifndef clr_win32_h -#define clr_win32_h - -#include "winwrap.h" - -namespace clr -{ - namespace win32 - { - // Prevents an HMODULE from being unloaded until process termination. - inline - HRESULT PreventModuleUnload(HMODULE hMod) - { - if (!WszGetModuleHandleEx( - GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_PIN, - reinterpret_cast(hMod), - &hMod)) - { - return HRESULT_FROM_GetLastError(); - } - - return S_OK; - } - } // namespace win -} // namespace clr - -#endif // clr_win32_h diff --git a/src/coreclr/inc/clr_std/utility b/src/coreclr/inc/clr_std/utility index 1b6b5a7b72c1e1..66f9a60d28e315 100644 --- a/src/coreclr/inc/clr_std/utility +++ b/src/coreclr/inc/clr_std/utility @@ -84,6 +84,8 @@ namespace std { // construct from compatible pair } + constexpr pair(const pair&) = default; ///< Copy constructor + void swap(_Myt& _Right) { // exchange contents with _Right if (this != &_Right) @@ -243,6 +245,11 @@ namespace std return (_Pair.second); } + template + inline pair<_T1, _T2> + make_pair(_T1 __x, _T2 __y) + { return std::pair<_T1, _T2>(__x, __y); } + } // namespace std #endif /* __clr_std_utility_h__ */ diff --git a/src/coreclr/inc/clrconfigvalues.h b/src/coreclr/inc/clrconfigvalues.h index 7b356b07443999..c556d45c495894 100644 --- a/src/coreclr/inc/clrconfigvalues.h +++ b/src/coreclr/inc/clrconfigvalues.h @@ -259,6 +259,8 @@ RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_legacyCorruptedStateExceptionsPolicy, W("le CONFIG_DWORD_INFO(INTERNAL_SuppressLostExceptionTypeAssert, W("SuppressLostExceptionTypeAssert"), 0, "") RETAIL_CONFIG_DWORD_INFO(INTERNAL_UseEntryPointFilter, W("UseEntryPointFilter"), 0, "") RETAIL_CONFIG_DWORD_INFO(INTERNAL_Corhost_Swallow_Uncaught_Exceptions, W("Corhost_Swallow_Uncaught_Exceptions"), 0, "") +RETAIL_CONFIG_DWORD_INFO(EXTERNAL_EnableNewExceptionHandling, W("EnableNewExceptionHandling"), 0, "Enable new exception handling."); + /// /// Garbage collector @@ -616,6 +618,10 @@ RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_TieredPGO_InstrumentOnlyHotCode, W("TieredP // By default, we only use optimizations in instrumented tiers for hot R2R code only. RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_TieredPGO_InstrumentedTierAlwaysOptimized, W("TieredPGO_InstrumentedTierAlwaysOptimized"), 0, "Always use optimizations inside instrumented tiers") + +// If scalable counters are used, set the threshold for approximate counting. +RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_TieredPGO_ScalableCountThreshold, W("TieredPGO_ScalableCountThreshold"), 13, "Log2 threshold where counting becomes approximate") + #endif /// @@ -791,6 +797,7 @@ RETAIL_CONFIG_DWORD_INFO(EXTERNAL_EnableArm64Rdm, W("EnableArm64Rd RETAIL_CONFIG_DWORD_INFO(EXTERNAL_EnableArm64Sha1, W("EnableArm64Sha1"), 1, "Allows Arm64 Sha1+ hardware intrinsics to be disabled") RETAIL_CONFIG_DWORD_INFO(EXTERNAL_EnableArm64Sha256, W("EnableArm64Sha256"), 1, "Allows Arm64 Sha256+ hardware intrinsics to be disabled") RETAIL_CONFIG_DWORD_INFO(EXTERNAL_EnableArm64Rcpc, W("EnableArm64Rcpc"), 1, "Allows Arm64 Rcpc+ hardware intrinsics to be disabled") +RETAIL_CONFIG_DWORD_INFO(EXTERNAL_EnableArm64Rcpc2, W("EnableArm64Rcpc2"), 1, "Allows Arm64 Rcpc2+ hardware intrinsics to be disabled") #endif /// diff --git a/src/coreclr/inc/cor.h b/src/coreclr/inc/cor.h index 1428661fda20ea..d6f31caeff96d8 100644 --- a/src/coreclr/inc/cor.h +++ b/src/coreclr/inc/cor.h @@ -23,35 +23,6 @@ extern "C" { #endif -// {BED7F4EA-1A96-11d2-8F08-00A0C9A6186D} -EXTERN_GUID(LIBID_ComPlusRuntime, 0xbed7f4ea, 0x1a96, 0x11d2, 0x8f, 0x8, 0x0, 0xa0, 0xc9, 0xa6, 0x18, 0x6d); - -// {90883F05-3D28-11D2-8F17-00A0C9A6186D} -EXTERN_GUID(GUID_ExportedFromComPlus, 0x90883f05, 0x3d28, 0x11d2, 0x8f, 0x17, 0x0, 0xa0, 0xc9, 0xa6, 0x18, 0x6d); - -// {0F21F359-AB84-41e8-9A78-36D110E6D2F9} -EXTERN_GUID(GUID_ManagedName, 0xf21f359, 0xab84, 0x41e8, 0x9a, 0x78, 0x36, 0xd1, 0x10, 0xe6, 0xd2, 0xf9); - -// {54FC8F55-38DE-4703-9C4E-250351302B1C} -EXTERN_GUID(GUID_Function2Getter, 0x54fc8f55, 0x38de, 0x4703, 0x9c, 0x4e, 0x25, 0x3, 0x51, 0x30, 0x2b, 0x1c); - -// CLSID_CorMetaDataDispenserRuntime: {1EC2DE53-75CC-11d2-9775-00A0C9B4D50C} -// Dispenser coclass for version 1.5 and 2.0 meta data. To get the "latest" bind -// to CLSID_MetaDataDispenser. -EXTERN_GUID(CLSID_CorMetaDataDispenserRuntime, 0x1ec2de53, 0x75cc, 0x11d2, 0x97, 0x75, 0x0, 0xa0, 0xc9, 0xb4, 0xd5, 0xc); - -// {CD2BC5C9-F452-4326-B714-F9C539D4DA58} -EXTERN_GUID(GUID_DispIdOverride, 0xcd2bc5c9, 0xf452, 0x4326, 0xb7, 0x14, 0xf9, 0xc5, 0x39, 0xd4, 0xda, 0x58); - -// {B64784EB-D8D4-4d9b-9ACD-0E30806426F7} -EXTERN_GUID(GUID_ForceIEnumerable, 0xb64784eb, 0xd8d4, 0x4d9b, 0x9a, 0xcd, 0x0e, 0x30, 0x80, 0x64, 0x26, 0xf7); - -// {2941FF83-88D8-4F73-B6A9-BDF8712D000D} -EXTERN_GUID(GUID_PropGetCA, 0x2941ff83, 0x88d8, 0x4f73, 0xb6, 0xa9, 0xbd, 0xf8, 0x71, 0x2d, 0x00, 0x0d); - -// {29533527-3683-4364-ABC0-DB1ADD822FA2} -EXTERN_GUID(GUID_PropPutCA, 0x29533527, 0x3683, 0x4364, 0xab, 0xc0, 0xdb, 0x1a, 0xdd, 0x82, 0x2f, 0xa2); - // CLSID_CLR_v1_MetaData: {005023CA-72B1-11D3-9FC4-00C04F79A0A3} // Used to generate v1 metadata (for v1.0 and v1.1 CLR compatibility). EXTERN_GUID(CLSID_CLR_v1_MetaData, 0x005023ca, 0x72b1, 0x11d3, 0x9f, 0xc4, 0x0, 0xc0, 0x4f, 0x79, 0xa0, 0xa3); @@ -166,18 +137,6 @@ EXTERN_GUID(CLSID_Cor, 0xbee00010, 0xee77, 0x11d0, 0xa0, 0x15, 0x00, 0xc0, 0x4f, // dispenser on the machine. EXTERN_GUID(CLSID_CorMetaDataDispenser, 0xe5cb7a31, 0x7512, 0x11d2, 0x89, 0xce, 0x0, 0x80, 0xc7, 0x92, 0xe5, 0xd8); - -// CLSID_CorMetaDataDispenserReg: {435755FF-7397-11d2-9771-00A0C9B4D50C} -// Dispenser coclass for version 1.0 meta data. To get the "latest" bind -// to CLSID_CorMetaDataDispenser. -EXTERN_GUID(CLSID_CorMetaDataDispenserReg, 0x435755ff, 0x7397, 0x11d2, 0x97, 0x71, 0x0, 0xa0, 0xc9, 0xb4, 0xd5, 0xc); - - -// CLSID_CorMetaDataReg: {87F3A1F5-7397-11d2-9771-00A0C9B4D50C} -// For COM+ Meta Data, Data Driven Registration -EXTERN_GUID(CLSID_CorMetaDataReg, 0x87f3a1f5, 0x7397, 0x11d2, 0x97, 0x71, 0x0, 0xa0, 0xc9, 0xb4, 0xd5, 0xc); - - interface IMetaDataDispenser; //------------------------------------- diff --git a/src/coreclr/inc/corerror.xml b/src/coreclr/inc/corerror.xml index 7c0c3852e1ae0d..1d4129305fa680 100644 --- a/src/coreclr/inc/corerror.xml +++ b/src/coreclr/inc/corerror.xml @@ -2067,40 +2067,10 @@ CLDB_E_INTERNALERROR - - CLR_E_BIND_ASSEMBLY_VERSION_TOO_LOW - "The bound assembly has a version that is lower than that of the request." - For AppX binder, indicates that bound assembly has a version lower than that requested, and we will refuse version rollback. - - - - CLR_E_BIND_ASSEMBLY_PUBLIC_KEY_MISMATCH - "The assembly version has a public key token that does not match that of the request." - For AppX binder, indicates that bound assembly's public key token doesn't match the key in the assembly name. - - - - CLR_E_BIND_IMAGE_UNAVAILABLE - "The requested image was not found or is unavailable." - Occurs if a request for a native image is made on an BINDER_SPACE::Assembly interface when one is not available. - - - - CLR_E_BIND_UNRECOGNIZED_IDENTITY_FORMAT - "The provided identity format is not recognized." - If a binder is provided an identity format that it cannot parse, it returns this error. - - - - CLR_E_BIND_ASSEMBLY_NOT_FOUND - "A binding for the specified assembly name was not found." - Returned by binders that bind based on assembly identity. - - - - CLR_E_BIND_TYPE_NOT_FOUND - "A binding for the specified type name was not found." - Returned by binders that bind based on type identity. + + CLR_E_BIND_ARCHITECTURE_MISMATCH + "The assembly architecture is not compatible with the current process architecture." + Indicates the assembly cannot be loaded because its architecture is not compatible with that of the current process. diff --git a/src/coreclr/inc/corinfoinstructionset.h b/src/coreclr/inc/corinfoinstructionset.h index 5aecf46bf3928c..2ffd9bf6873201 100644 --- a/src/coreclr/inc/corinfoinstructionset.h +++ b/src/coreclr/inc/corinfoinstructionset.h @@ -30,14 +30,15 @@ enum CORINFO_InstructionSet InstructionSet_Dczva=12, InstructionSet_Rcpc=13, InstructionSet_VectorT128=14, - InstructionSet_ArmBase_Arm64=15, - InstructionSet_AdvSimd_Arm64=16, - InstructionSet_Aes_Arm64=17, - InstructionSet_Crc32_Arm64=18, - InstructionSet_Dp_Arm64=19, - InstructionSet_Rdm_Arm64=20, - InstructionSet_Sha1_Arm64=21, - InstructionSet_Sha256_Arm64=22, + InstructionSet_Rcpc2=15, + InstructionSet_ArmBase_Arm64=16, + InstructionSet_AdvSimd_Arm64=17, + InstructionSet_Aes_Arm64=18, + InstructionSet_Crc32_Arm64=19, + InstructionSet_Dp_Arm64=20, + InstructionSet_Rdm_Arm64=21, + InstructionSet_Sha1_Arm64=22, + InstructionSet_Sha256_Arm64=23, #endif // TARGET_ARM64 #ifdef TARGET_AMD64 InstructionSet_X86Base=1, @@ -761,6 +762,8 @@ inline const char *InstructionSetToString(CORINFO_InstructionSet instructionSet) return "Rcpc"; case InstructionSet_VectorT128 : return "VectorT128"; + case InstructionSet_Rcpc2 : + return "Rcpc2"; #endif // TARGET_ARM64 #ifdef TARGET_AMD64 case InstructionSet_X86Base : @@ -994,6 +997,7 @@ inline CORINFO_InstructionSet InstructionSetFromR2RInstructionSet(ReadyToRunInst case READYTORUN_INSTRUCTION_Atomics: return InstructionSet_Atomics; case READYTORUN_INSTRUCTION_Rcpc: return InstructionSet_Rcpc; case READYTORUN_INSTRUCTION_VectorT128: return InstructionSet_VectorT128; + case READYTORUN_INSTRUCTION_Rcpc2: return InstructionSet_Rcpc2; #endif // TARGET_ARM64 #ifdef TARGET_AMD64 case READYTORUN_INSTRUCTION_X86Base: return InstructionSet_X86Base; diff --git a/src/coreclr/inc/crsttypes_generated.h b/src/coreclr/inc/crsttypes_generated.h index 9710f65afcd399..70847a5b367fcd 100644 --- a/src/coreclr/inc/crsttypes_generated.h +++ b/src/coreclr/inc/crsttypes_generated.h @@ -50,92 +50,91 @@ enum CrstType CrstException = 32, CrstExecutableAllocatorLock = 33, CrstExecuteManRangeLock = 34, - CrstExternalObjectContextCache = 35, - CrstFCall = 36, - CrstFrozenObjectHeap = 37, - CrstFuncPtrStubs = 38, - CrstFusionAppCtx = 39, - CrstGCCover = 40, - CrstGlobalStrLiteralMap = 41, - CrstHandleTable = 42, - CrstIbcProfile = 43, - CrstIJWFixupData = 44, - CrstIJWHash = 45, - CrstILStubGen = 46, - CrstInlineTrackingMap = 47, - CrstInstMethodHashTable = 48, - CrstInterop = 49, - CrstInteropData = 50, - CrstIsJMCMethod = 51, - CrstISymUnmanagedReader = 52, - CrstJit = 53, - CrstJitGenericHandleCache = 54, - CrstJitInlineTrackingMap = 55, - CrstJitPatchpoint = 56, - CrstJitPerf = 57, - CrstJumpStubCache = 58, - CrstLeafLock = 59, - CrstListLock = 60, - CrstLoaderAllocator = 61, - CrstLoaderAllocatorReferences = 62, - CrstLoaderHeap = 63, - CrstManagedObjectWrapperMap = 64, - CrstMethodDescBackpatchInfoTracker = 65, - CrstMethodTableExposedObject = 66, - CrstModule = 67, - CrstModuleFixup = 68, - CrstModuleLookupTable = 69, - CrstMulticoreJitHash = 70, - CrstMulticoreJitManager = 71, - CrstNativeImageEagerFixups = 72, - CrstNativeImageLoad = 73, - CrstNls = 74, - CrstNotifyGdb = 75, - CrstObjectList = 76, - CrstPEImage = 77, - CrstPendingTypeLoadEntry = 78, - CrstPerfMap = 79, - CrstPgoData = 80, - CrstPinnedByrefValidation = 81, - CrstPinnedHeapHandleTable = 82, - CrstProfilerGCRefDataFreeList = 83, - CrstProfilingAPIStatus = 84, - CrstRCWCache = 85, - CrstRCWCleanupList = 86, - CrstReadyToRunEntryPointToMethodDescMap = 87, - CrstReflection = 88, - CrstReJITGlobalRequest = 89, - CrstRetThunkCache = 90, - CrstSavedExceptionInfo = 91, - CrstSaveModuleProfileData = 92, - CrstSecurityStackwalkCache = 93, - CrstSigConvert = 94, - CrstSingleUseLock = 95, - CrstSpecialStatics = 96, - CrstStackSampler = 97, - CrstStaticBoxInit = 98, - CrstStressLog = 99, - CrstStubCache = 100, - CrstStubDispatchCache = 101, - CrstStubUnwindInfoHeapSegments = 102, - CrstSyncBlockCache = 103, - CrstSyncHashLock = 104, - CrstSystemBaseDomain = 105, - CrstSystemDomain = 106, - CrstSystemDomainDelayedUnloadList = 107, - CrstThreadIdDispenser = 108, - CrstThreadStore = 109, - CrstTieredCompilation = 110, - CrstTypeEquivalenceMap = 111, - CrstTypeIDMap = 112, - CrstUMEntryThunkCache = 113, - CrstUMEntryThunkFreeListLock = 114, - CrstUniqueStack = 115, - CrstUnresolvedClassLock = 116, - CrstUnwindInfoTableLock = 117, - CrstVSDIndirectionCellLock = 118, - CrstWrapperTemplate = 119, - kNumberOfCrstTypes = 120 + CrstFCall = 35, + CrstFrozenObjectHeap = 36, + CrstFuncPtrStubs = 37, + CrstFusionAppCtx = 38, + CrstGCCover = 39, + CrstGlobalStrLiteralMap = 40, + CrstHandleTable = 41, + CrstIbcProfile = 42, + CrstIJWFixupData = 43, + CrstIJWHash = 44, + CrstILStubGen = 45, + CrstInlineTrackingMap = 46, + CrstInstMethodHashTable = 47, + CrstInterop = 48, + CrstInteropData = 49, + CrstIsJMCMethod = 50, + CrstISymUnmanagedReader = 51, + CrstJit = 52, + CrstJitGenericHandleCache = 53, + CrstJitInlineTrackingMap = 54, + CrstJitPatchpoint = 55, + CrstJitPerf = 56, + CrstJumpStubCache = 57, + CrstLeafLock = 58, + CrstListLock = 59, + CrstLoaderAllocator = 60, + CrstLoaderAllocatorReferences = 61, + CrstLoaderHeap = 62, + CrstManagedObjectWrapperMap = 63, + CrstMethodDescBackpatchInfoTracker = 64, + CrstMethodTableExposedObject = 65, + CrstModule = 66, + CrstModuleFixup = 67, + CrstModuleLookupTable = 68, + CrstMulticoreJitHash = 69, + CrstMulticoreJitManager = 70, + CrstNativeImageEagerFixups = 71, + CrstNativeImageLoad = 72, + CrstNls = 73, + CrstNotifyGdb = 74, + CrstObjectList = 75, + CrstPEImage = 76, + CrstPendingTypeLoadEntry = 77, + CrstPerfMap = 78, + CrstPgoData = 79, + CrstPinnedByrefValidation = 80, + CrstPinnedHeapHandleTable = 81, + CrstProfilerGCRefDataFreeList = 82, + CrstProfilingAPIStatus = 83, + CrstRCWCache = 84, + CrstRCWCleanupList = 85, + CrstReadyToRunEntryPointToMethodDescMap = 86, + CrstReflection = 87, + CrstReJITGlobalRequest = 88, + CrstRetThunkCache = 89, + CrstSavedExceptionInfo = 90, + CrstSaveModuleProfileData = 91, + CrstSecurityStackwalkCache = 92, + CrstSigConvert = 93, + CrstSingleUseLock = 94, + CrstSpecialStatics = 95, + CrstStackSampler = 96, + CrstStaticBoxInit = 97, + CrstStressLog = 98, + CrstStubCache = 99, + CrstStubDispatchCache = 100, + CrstStubUnwindInfoHeapSegments = 101, + CrstSyncBlockCache = 102, + CrstSyncHashLock = 103, + CrstSystemBaseDomain = 104, + CrstSystemDomain = 105, + CrstSystemDomainDelayedUnloadList = 106, + CrstThreadIdDispenser = 107, + CrstThreadStore = 108, + CrstTieredCompilation = 109, + CrstTypeEquivalenceMap = 110, + CrstTypeIDMap = 111, + CrstUMEntryThunkCache = 112, + CrstUMEntryThunkFreeListLock = 113, + CrstUniqueStack = 114, + CrstUnresolvedClassLock = 115, + CrstUnwindInfoTableLock = 116, + CrstVSDIndirectionCellLock = 117, + CrstWrapperTemplate = 118, + kNumberOfCrstTypes = 119 }; #endif // __CRST_TYPES_INCLUDED @@ -181,7 +180,6 @@ int g_rgCrstLevelMap[] = 0, // CrstException 0, // CrstExecutableAllocatorLock 0, // CrstExecuteManRangeLock - 0, // CrstExternalObjectContextCache 4, // CrstFCall -1, // CrstFrozenObjectHeap 7, // CrstFuncPtrStubs @@ -306,7 +304,6 @@ LPCSTR g_rgCrstNameMap[] = "CrstException", "CrstExecutableAllocatorLock", "CrstExecuteManRangeLock", - "CrstExternalObjectContextCache", "CrstFCall", "CrstFrozenObjectHeap", "CrstFuncPtrStubs", diff --git a/src/coreclr/inc/dacvars.h b/src/coreclr/inc/dacvars.h index 8fcc1cced7d439..d245c9877335ab 100644 --- a/src/coreclr/inc/dacvars.h +++ b/src/coreclr/inc/dacvars.h @@ -113,6 +113,11 @@ DEFINE_DACVAR(DWORD, dac__g_debuggerWordTLSIndex, g_debuggerWordTLSIndex) #endif DEFINE_DACVAR(DWORD, dac__g_TlsIndex, g_TlsIndex) +#ifdef FEATURE_EH_FUNCLETS +DEFINE_DACVAR(UNKNOWN_POINTER_TYPE, dac__g_pEHClass, ::g_pEHClass) +DEFINE_DACVAR(BOOL, dac__g_isNewExceptionHandlingEnabled, ::g_isNewExceptionHandlingEnabled) +#endif + DEFINE_DACVAR(PTR_SString, SString__s_Empty, SString::s_Empty) DEFINE_DACVAR(INT32, ArrayBase__s_arrayBoundsZero, ArrayBase::s_arrayBoundsZero) @@ -227,7 +232,7 @@ DEFINE_DACVAR(TADDR, dac__g_MiniMetaDataBuffAddress, ::g_MiniMetaDataBuffAddress DEFINE_DACVAR(SIZE_T, dac__g_clrNotificationArguments, ::g_clrNotificationArguments) -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER DEFINE_DACVAR(bool, dac__g_metadataUpdatesApplied, ::g_metadataUpdatesApplied) #endif diff --git a/src/coreclr/inc/eetwain.h b/src/coreclr/inc/eetwain.h index 91bb4c85c85a4b..9beca3f3729007 100644 --- a/src/coreclr/inc/eetwain.h +++ b/src/coreclr/inc/eetwain.h @@ -332,7 +332,7 @@ virtual void LeaveCatch(GCInfoToken gcInfoToken, PCONTEXT pCtx)=0; #endif // FEATURE_EH_FUNCLETS -#ifdef FEATURE_ENC_SUPPORTED +#ifdef FEATURE_REMAP_FUNCTION /* Last chance for the runtime support to do fixups in the context @@ -347,7 +347,7 @@ virtual HRESULT FixContextForEnC(PCONTEXT pCtx, const ICorDebugInfo::NativeVarInfo * newMethodVars, SIZE_T newMethodVarsCount) = 0; -#endif // FEATURE_ENC_SUPPORTED +#endif // FEATURE_REMAP_FUNCTION #endif // #ifndef DACCESS_COMPILE @@ -597,7 +597,7 @@ virtual void LeaveCatch(GCInfoToken gcInfoToken, PCONTEXT pCtx); #endif // FEATURE_EH_FUNCLETS -#ifdef FEATURE_ENC_SUPPORTED +#ifdef FEATURE_REMAP_FUNCTION /* Last chance for the runtime support to do fixups in the context before execution continues inside an EnC updated function. @@ -610,7 +610,7 @@ HRESULT FixContextForEnC(PCONTEXT pCtx, EECodeInfo * pNewCodeInfo, const ICorDebugInfo::NativeVarInfo * newMethodVars, SIZE_T newMethodVarsCount); -#endif // FEATURE_ENC_SUPPORTED +#endif // FEATURE_REMAP_FUNCTION #endif // #ifndef DACCESS_COMPILE diff --git a/src/coreclr/inc/jiteeversionguid.h b/src/coreclr/inc/jiteeversionguid.h index 54ee605f0aed50..70960ff577ee8a 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 = { /* 4bceb905-d550-4a5d-b1eb-276fff68d183 */ - 0x4bceb905, - 0xd550, - 0x4a5d, - {0xb1, 0xeb, 0x27, 0x6f, 0xff, 0x68, 0xd1, 0x83} +constexpr GUID JITEEVersionIdentifier = { /* a2974440-e8ee-4d95-9e6e-799a330be1a0 */ + 0xa2974440, + 0xe8ee, + 0x4d95, + {0x9e, 0x6e, 0x79, 0x9a, 0x33, 0x0b, 0xe1, 0xa0} }; ////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/coreclr/inc/jithelpers.h b/src/coreclr/inc/jithelpers.h index d34696ac1c9830..06d09a1b5e15ab 100644 --- a/src/coreclr/inc/jithelpers.h +++ b/src/coreclr/inc/jithelpers.h @@ -113,8 +113,8 @@ DYNAMICJITHELPER(CORINFO_HELP_LDELEMA_REF, NULL, CORINFO_HELP_SIG_4_STACK) // Exceptions - JITHELPER(CORINFO_HELP_THROW, IL_Throw, CORINFO_HELP_SIG_REG_ONLY) - JITHELPER(CORINFO_HELP_RETHROW, IL_Rethrow, CORINFO_HELP_SIG_REG_ONLY) + DYNAMICJITHELPER(CORINFO_HELP_THROW, IL_Throw, CORINFO_HELP_SIG_REG_ONLY) + DYNAMICJITHELPER(CORINFO_HELP_RETHROW, IL_Rethrow, CORINFO_HELP_SIG_REG_ONLY) JITHELPER(CORINFO_HELP_USER_BREAKPOINT, JIT_UserBreakpoint, CORINFO_HELP_SIG_REG_ONLY) JITHELPER(CORINFO_HELP_RNGCHKFAIL, JIT_RngChkFail, CORINFO_HELP_SIG_REG_ONLY) JITHELPER(CORINFO_HELP_OVERFLOW, JIT_Overflow, CORINFO_HELP_SIG_REG_ONLY) @@ -271,8 +271,8 @@ JITHELPER(CORINFO_HELP_READYTORUN_GENERIC_STATIC_BASE, NULL, CORINFO_HELP_SIG_NO_ALIGN_STUB) #ifdef FEATURE_EH_FUNCLETS - JITHELPER(CORINFO_HELP_EE_PERSONALITY_ROUTINE, ProcessCLRException, CORINFO_HELP_SIG_UNDEF) - JITHELPER(CORINFO_HELP_EE_PERSONALITY_ROUTINE_FILTER_FUNCLET, ProcessCLRException,CORINFO_HELP_SIG_UNDEF) + DYNAMICJITHELPER(CORINFO_HELP_EE_PERSONALITY_ROUTINE, ProcessCLRException, CORINFO_HELP_SIG_UNDEF) + DYNAMICJITHELPER(CORINFO_HELP_EE_PERSONALITY_ROUTINE_FILTER_FUNCLET, ProcessCLRException,CORINFO_HELP_SIG_UNDEF) #else // FEATURE_EH_FUNCLETS JITHELPER(CORINFO_HELP_EE_PERSONALITY_ROUTINE, NULL, CORINFO_HELP_SIG_UNDEF) JITHELPER(CORINFO_HELP_EE_PERSONALITY_ROUTINE_FILTER_FUNCLET, NULL, CORINFO_HELP_SIG_UNDEF) diff --git a/src/coreclr/inc/readytoruninstructionset.h b/src/coreclr/inc/readytoruninstructionset.h index 0a9a78e03f6c15..190fe4b516617e 100644 --- a/src/coreclr/inc/readytoruninstructionset.h +++ b/src/coreclr/inc/readytoruninstructionset.h @@ -50,6 +50,7 @@ enum ReadyToRunInstructionSet READYTORUN_INSTRUCTION_VectorT128=39, READYTORUN_INSTRUCTION_VectorT256=40, READYTORUN_INSTRUCTION_VectorT512=41, + READYTORUN_INSTRUCTION_Rcpc2=42, }; diff --git a/src/coreclr/inc/regdisp.h b/src/coreclr/inc/regdisp.h index 3f774f54a8dc71..c3b4b4431bec54 100644 --- a/src/coreclr/inc/regdisp.h +++ b/src/coreclr/inc/regdisp.h @@ -211,7 +211,7 @@ typedef struct _Loongarch64VolatileContextPointer #endif #if defined(TARGET_RISCV64) -typedef struct _Riscv64VolatileContextPointer +typedef struct _RiscV64VolatileContextPointer { PDWORD64 R0; PDWORD64 A0; @@ -229,7 +229,7 @@ typedef struct _Riscv64VolatileContextPointer PDWORD64 T4; PDWORD64 T5; PDWORD64 T6; -} Riscv64VolatileContextPointer; +} RiscV64VolatileContextPointer; #endif struct REGDISPLAY : public REGDISPLAY_BASE { @@ -242,7 +242,7 @@ struct REGDISPLAY : public REGDISPLAY_BASE { #endif #ifdef TARGET_RISCV64 - Riscv64VolatileContextPointer volatileCurrContextPointers; + RiscV64VolatileContextPointer volatileCurrContextPointers; #endif REGDISPLAY() diff --git a/src/coreclr/inc/sarray.h b/src/coreclr/inc/sarray.h index 4987af7d660e0c..4c5e7ef86c1b6d 100644 --- a/src/coreclr/inc/sarray.h +++ b/src/coreclr/inc/sarray.h @@ -45,8 +45,8 @@ class SArray COUNT_T GetAllocation() const; - void Preallocate(int count) const; - void Trim() const; + void Preallocate(int count); + void Trim(); void Copy(const Iterator &to, const Iterator &from, COUNT_T size); void Move(const Iterator &to, const Iterator &from, COUNT_T size); @@ -206,6 +206,8 @@ class EMPTY_BASES_DECL InlineSArray : public SArray // StackSArray : SArray with relatively large preallocated buffer for stack use // ================================================================================ +#define STACK_ALLOC 256 + template class EMPTY_BASES_DECL StackSArray : public InlineSArray { diff --git a/src/coreclr/inc/sarray.inl b/src/coreclr/inc/sarray.inl index 7d6a5b6a37d099..9872f9986132f5 100644 --- a/src/coreclr/inc/sarray.inl +++ b/src/coreclr/inc/sarray.inl @@ -165,14 +165,14 @@ inline COUNT_T SArray::GetAllocation() const } template -inline void SArray::Preallocate(int count) const +inline void SArray::Preallocate(int count) { WRAPPER_NO_CONTRACT; m_buffer.Preallocate(count * sizeof(ELEMENT)); } template -inline void SArray::Trim() const +inline void SArray::Trim() { WRAPPER_NO_CONTRACT; m_buffer.Trim(); diff --git a/src/coreclr/inc/sbuffer.h b/src/coreclr/inc/sbuffer.h index 05c75faa575840..aa743695895b2f 100644 --- a/src/coreclr/inc/sbuffer.h +++ b/src/coreclr/inc/sbuffer.h @@ -97,6 +97,7 @@ class SBuffer SBuffer(COUNT_T size); SBuffer(const BYTE *buffer, COUNT_T size); explicit SBuffer(const SBuffer &buffer); + SBuffer(SBuffer &&buffer); // Immutable constructor should ONLY be used if buffer will // NEVER BE FREED OR MODIFIED. PERIOD. . @@ -108,6 +109,10 @@ class SBuffer ~SBuffer(); + private: + void InitializeInstance(); + + public: void Clear(); void Set(const SBuffer &buffer); @@ -137,11 +142,11 @@ class SBuffer // Preallocate some memory you expect to use. This can prevent // multiple reallocations. Note this does not change the visible // size of the buffer. - void Preallocate(COUNT_T allocation) const; + void Preallocate(COUNT_T allocation); // Shrink memory usage of buffer to minimal amount. Note that // this does not change the visible size of the buffer. - void Trim() const; + void Trim(); //-------------------------------------------------------------------- // Content manipulation routines @@ -550,13 +555,6 @@ class EMPTY_BASES_DECL InlineSBuffer : public SBuffer #define GARBAGE_FILL_DWORD 0x24242424 // $$$$ #define GARBAGE_FILL_BUFFER_ITEMS 16 #define GARBAGE_FILL_BUFFER_SIZE GARBAGE_FILL_BUFFER_ITEMS*sizeof(DWORD) -// ================================================================================ -// StackSBuffer : SBuffer with relatively large preallocated buffer for stack use -// ================================================================================ - -#define STACK_ALLOC 256 - -typedef InlineSBuffer StackSBuffer; // ================================================================================ // Inline definitions diff --git a/src/coreclr/inc/sbuffer.inl b/src/coreclr/inc/sbuffer.inl index 53449a18e0988c..a613f847f49f7e 100644 --- a/src/coreclr/inc/sbuffer.inl +++ b/src/coreclr/inc/sbuffer.inl @@ -114,6 +114,32 @@ inline SBuffer::SBuffer(const SBuffer &buffer) RETURN; } +inline SBuffer::SBuffer(SBuffer &&buffer) +{ + CONTRACT_VOID + { + CONSTRUCTOR_CHECK; + PRECONDITION(buffer.Check()); + POSTCONDITION(Check()); + THROWS; + GC_NOTRIGGER; + } + CONTRACT_END; + + m_size = buffer.m_size; + m_allocation = buffer.m_allocation; + m_flags = buffer.m_flags; + m_buffer = buffer.m_buffer; + +#ifdef _DEBUG + m_revision = buffer.m_revision; +#endif + + buffer.InitializeInstance(); + + RETURN; +} + inline SBuffer::SBuffer(const BYTE *buffer, COUNT_T size) : m_size(0), m_allocation(0), @@ -189,6 +215,18 @@ inline SBuffer::~SBuffer() RETURN; } +inline void SBuffer::InitializeInstance() +{ + m_size = 0; + m_allocation = 0; + m_flags = 0; + m_buffer = NULL; + +#ifdef _DEBUG + m_revision = 0; +#endif +} + inline void SBuffer::Set(const SBuffer &buffer) { CONTRACT_VOID @@ -344,7 +382,7 @@ inline COUNT_T SBuffer::GetAllocation() const RETURN m_allocation; } -inline void SBuffer::Preallocate(COUNT_T allocation) const +inline void SBuffer::Preallocate(COUNT_T allocation) { CONTRACT_VOID { @@ -358,12 +396,12 @@ inline void SBuffer::Preallocate(COUNT_T allocation) const CONTRACT_END; if (allocation > m_allocation) - const_cast(this)->ReallocateBuffer(allocation, PRESERVE); + ReallocateBuffer(allocation, PRESERVE); RETURN; } -inline void SBuffer::Trim() const +inline void SBuffer::Trim() { CONTRACT_VOID { @@ -374,7 +412,7 @@ inline void SBuffer::Trim() const CONTRACT_END; if (!IsImmutable()) - const_cast(this)->ReallocateBuffer(m_size, PRESERVE); + ReallocateBuffer(m_size, PRESERVE); RETURN; } diff --git a/src/coreclr/inc/sstring.h b/src/coreclr/inc/sstring.h index 00b826b23c3c54..14244d779d82be 100644 --- a/src/coreclr/inc/sstring.h +++ b/src/coreclr/inc/sstring.h @@ -127,19 +127,20 @@ class EMPTY_BASES_DECL SString : private SBuffer SString(); explicit SString(const SString &s); + SString(SString&& string) = default; SString(const SString &s1, const SString &s2); SString(const SString &s1, const SString &s2, const SString &s3); SString(const SString &s1, const SString &s2, const SString &s3, const SString &s4); SString(const SString &s, const CIterator &i, COUNT_T length); SString(const SString &s, const CIterator &start, const CIterator &end); - SString(const WCHAR *string); + explicit SString(const WCHAR *string); SString(const WCHAR *string, COUNT_T count); SString(enum tagASCII dummyTag, const ASCII *string); SString(enum tagASCII dummyTag, const ASCII *string, COUNT_T count); SString(enum tagUTF8 dummytag, const UTF8 *string); SString(enum tagUTF8 dummytag, const UTF8 *string, COUNT_T count); - SString(WCHAR character); + explicit SString(WCHAR character); // NOTE: Literals MUST be read-only never-freed strings. SString(enum tagLiteral dummytag, const CHAR *literal); @@ -192,7 +193,7 @@ class EMPTY_BASES_DECL SString : private SBuffer // Normalizes the string representation to unicode. This can be used to // make basic read-only operations non-failing. - void Normalize() const; + void Normalize(); // Return the number of characters in the string (excluding the terminating NULL). COUNT_T GetCount() const; @@ -301,10 +302,10 @@ class EMPTY_BASES_DECL SString : private SBuffer void Replace(const Iterator &i, COUNT_T length, const SString &s); // Make sure that string buffer has room to grow - void Preallocate(COUNT_T characters) const; + void Preallocate(COUNT_T characters); // Shrink buffer size as much as possible (reallocate if necessary.) - void Trim() const; + void Trim(); // ------------------------------------------------------------------ // Iterators: @@ -592,11 +593,9 @@ class EMPTY_BASES_DECL SString : private SBuffer operator const WCHAR * () const { WRAPPER_NO_CONTRACT; return GetUnicode(); } - WCHAR operator[](int index) { WRAPPER_NO_CONTRACT; return Begin()[index]; } WCHAR operator[](int index) const { WRAPPER_NO_CONTRACT; return Begin()[index]; } SString &operator= (const SString &s) { WRAPPER_NO_CONTRACT; Set(s); return *this; } - SString &operator+= (const SString &s) { WRAPPER_NO_CONTRACT; Append(s); return *this; } // ------------------------------------------------------------------- // Check functions @@ -683,7 +682,9 @@ class EMPTY_BASES_DECL SString : private SBuffer BOOL IsASCIIScanned() const; void SetASCIIScanned() const; void SetNormalized() const; +public: BOOL IsNormalized() const; +private: void ClearNormalized() const; void EnsureWritable() const; @@ -782,6 +783,13 @@ class EMPTY_BASES_DECL InlineSString : public SString Set(string, count); } + FORCEINLINE InlineSString(enum tagLiteral, const WCHAR *string) + : SString(m_inline, SBUFFER_PADDED_SIZE(MEMSIZE)) + { + WRAPPER_NO_CONTRACT; + Set(string); + } + FORCEINLINE InlineSString(enum tagASCII, const CHAR *string) : SString(m_inline, SBUFFER_PADDED_SIZE(MEMSIZE)) { @@ -867,7 +875,7 @@ typedef InlineSString<2 * 260> LongPathString; // s = SL("My literal String"); // ================================================================================ -#define SL(_literal) SString(SString::Literal, _literal) +#define SL(_literal) SString{ SString::Literal, _literal } // ================================================================================ // Special contract definition - THROWS_UNLESS_NORMALIZED diff --git a/src/coreclr/inc/sstring.inl b/src/coreclr/inc/sstring.inl index 6b535fc4064969..60ec60511922c9 100644 --- a/src/coreclr/inc/sstring.inl +++ b/src/coreclr/inc/sstring.inl @@ -636,7 +636,7 @@ inline const UTF8 *SString::GetUTF8() const } // Normalize the string to unicode. This will make many operations nonfailing. -inline void SString::Normalize() const +inline void SString::Normalize() { SS_CONTRACT_VOID { @@ -1097,7 +1097,7 @@ inline void SString::Delete(const Iterator &i, COUNT_T length) } // Preallocate some space for the string buffer -inline void SString::Preallocate(COUNT_T characters) const +inline void SString::Preallocate(COUNT_T characters) { WRAPPER_NO_CONTRACT; @@ -1106,14 +1106,14 @@ inline void SString::Preallocate(COUNT_T characters) const } // Trim unused space from the buffer -inline void SString::Trim() const +inline void SString::Trim() { WRAPPER_NO_CONTRACT; if (GetRawCount() == 0) { // Share the global empty string buffer. - const_cast(this)->SBuffer::SetImmutable(s_EmptyBuffer, sizeof(s_EmptyBuffer)); + SBuffer::SetImmutable(s_EmptyBuffer, sizeof(s_EmptyBuffer)); } else { diff --git a/src/coreclr/inc/targetosarch.h b/src/coreclr/inc/targetosarch.h index 1251104c10798f..16e95a2cb43736 100644 --- a/src/coreclr/inc/targetosarch.h +++ b/src/coreclr/inc/targetosarch.h @@ -54,7 +54,7 @@ class TargetArchitecture static const bool IsArm32 = true; static const bool IsArmArch = true; static const bool IsLoongArch64 = false; - static const bool IsRiscv64 = false; + static const bool IsRiscV64 = false; #elif defined(TARGET_ARM64) static const bool IsX86 = false; static const bool IsX64 = false; @@ -62,7 +62,7 @@ class TargetArchitecture static const bool IsArm32 = false; static const bool IsArmArch = true; static const bool IsLoongArch64 = false; - static const bool IsRiscv64 = false; + static const bool IsRiscV64 = false; #elif defined(TARGET_AMD64) static const bool IsX86 = false; static const bool IsX64 = true; @@ -70,7 +70,7 @@ class TargetArchitecture static const bool IsArm32 = false; static const bool IsArmArch = false; static const bool IsLoongArch64 = false; - static const bool IsRiscv64 = false; + static const bool IsRiscV64 = false; #elif defined(TARGET_X86) static const bool IsX86 = true; static const bool IsX64 = false; @@ -78,7 +78,7 @@ class TargetArchitecture static const bool IsArm32 = false; static const bool IsArmArch = false; static const bool IsLoongArch64 = false; - static const bool IsRiscv64 = false; + static const bool IsRiscV64 = false; #elif defined(TARGET_LOONGARCH64) static const bool IsX86 = false; static const bool IsX64 = false; @@ -86,7 +86,7 @@ class TargetArchitecture static const bool IsArm32 = false; static const bool IsArmArch = false; static const bool IsLoongArch64 = true; - static const bool IsRiscv64 = false; + static const bool IsRiscV64 = false; #elif defined(TARGET_RISCV64) static const bool IsX86 = false; static const bool IsX64 = false; @@ -94,7 +94,7 @@ class TargetArchitecture static const bool IsArm32 = false; static const bool IsArmArch = false; static const bool IsLoongArch64 = false; - static const bool IsRiscv64 = true; + static const bool IsRiscV64 = true; #else #error Unknown architecture #endif diff --git a/src/coreclr/inc/vptr_list.h b/src/coreclr/inc/vptr_list.h index 718c7edf7afbf2..0070c5867aa358 100644 --- a/src/coreclr/inc/vptr_list.h +++ b/src/coreclr/inc/vptr_list.h @@ -15,7 +15,7 @@ VPTR_CLASS(RangeList) VPTR_CLASS(LockedRangeList) VPTR_CLASS(CodeRangeMapRangeList) -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER VPTR_CLASS(EditAndContinueModule) #endif VPTR_CLASS(Module) diff --git a/src/coreclr/inc/winwrap.h b/src/coreclr/inc/winwrap.h index 652c0b80653310..c322ef69a9bf63 100644 --- a/src/coreclr/inc/winwrap.h +++ b/src/coreclr/inc/winwrap.h @@ -71,8 +71,6 @@ #undef OpenSemaphore #undef CreateWaitableTimer #undef CreateFileMapping -#undef LoadLibrary -#undef LoadLibraryEx #undef GetModuleFileName #undef GetModuleHandle #undef GetModuleHandleEx @@ -191,12 +189,10 @@ //Note only the functions which are currently used are defined #ifdef HOST_WINDOWS #define WszLoadLibrary LoadLibraryExWrapper -#define WszLoadLibraryEx LoadLibraryExWrapper #define WszCreateFile CreateFileWrapper #define WszGetFileAttributesEx GetFileAttributesExWrapper #else // HOST_WINDOWS -#define WszLoadLibrary LoadLibraryW -#define WszLoadLibraryEx LoadLibraryExW +#define WszLoadLibrary LoadLibraryExW #define WszCreateFile CreateFileW #define WszGetFileAttributesEx GetFileAttributesExW #endif // HOST_WINDOWS diff --git a/src/coreclr/jit/CMakeLists.txt b/src/coreclr/jit/CMakeLists.txt index d00b5b27fe59a8..df6e0025778b18 100644 --- a/src/coreclr/jit/CMakeLists.txt +++ b/src/coreclr/jit/CMakeLists.txt @@ -1,5 +1,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) +set(CMAKE_EXTRA_INCLUDE_FILES signal.h) + include_directories("./jitstd") include_directories("../inc") @@ -137,7 +139,6 @@ set( JIT_SOURCES jitconfig.cpp jiteh.cpp jithashtable.cpp - jittelemetry.cpp lclmorph.cpp lclvars.cpp likelyclass.cpp @@ -152,6 +153,7 @@ set( JIT_SOURCES objectalloc.cpp optcse.cpp optimizebools.cpp + switchrecognition.cpp optimizer.cpp patchpoint.cpp phase.cpp @@ -241,6 +243,21 @@ set( JIT_ARM64_SOURCES unwindarm64.cpp hwintrinsicarm64.cpp hwintrinsiccodegenarm64.cpp + vixl/code-buffer-vixl.cc + vixl/compiler-intrinsics-vixl.cc + vixl/cpu-features.cc + vixl/utils-vixl.cc + vixl/aarch64/assembler-aarch64.cc + vixl/aarch64/assembler-sve-aarch64.cc + vixl/aarch64/cpu-aarch64.cc + vixl/aarch64/cpu-features-auditor-aarch64.cc + vixl/aarch64/decoder-aarch64.cc + vixl/aarch64/disasm-aarch64.cc + vixl/aarch64/instructions-aarch64.cc + vixl/aarch64/macro-assembler-aarch64.cc + vixl/aarch64/macro-assembler-sve-aarch64.cc + vixl/aarch64/operands-aarch64.cc + vixl/aarch64/registers-aarch64.cc ) set( JIT_ARMV6_SOURCES @@ -335,7 +352,6 @@ set( JIT_HEADERS jithashtable.h jitpch.h jitstd.h - jittelemetry.h lir.h loopcloning.h loopcloningopts.h @@ -403,6 +419,31 @@ set( JIT_ARM64_HEADERS instrsarm64.h registerarm64.h simdashwintrinsiclistarm64.h + abi-aarch64.h + assembler-aarch64.h + constants-aarch64.h + cpu-aarch64.h + cpu-features-auditor-aarch64.h + decoder-aarch64.h + decoder-constants-aarch64.h + disasm-aarch64.h + instructions-aarch64.h + macro-assembler-aarch64.h + operands-aarch64.h + registers-aarch64.h + vixl/aarch64/assembler-base-vixl.h + vixl/aarch64/code-buffer-vixl.h + vixl/aarch64/code-generation-scopes-vixl.h + vixl/aarch64/compiler-intrinsics-vixl.h + vixl/cpu-features.h + vixl/globals-vixl.h + vixl/invalset-vixl.h + vixl/macro-assembler-interface.h + vixl/simulator-constants-aarch64.h + vixl/platform-vixl.h + vixl/pool-manager-impl.h + vixl/pool-manager.h + vixl/utils-vixl.h ) set( JIT_ARM_HEADERS diff --git a/src/coreclr/jit/assertionprop.cpp b/src/coreclr/jit/assertionprop.cpp index 2eed68d04f6d10..6c353a6a238ef9 100644 --- a/src/coreclr/jit/assertionprop.cpp +++ b/src/coreclr/jit/assertionprop.cpp @@ -81,7 +81,6 @@ bool IntegralRange::Contains(int64_t value) const { switch (type) { - case TYP_BOOL: case TYP_UBYTE: case TYP_USHORT: return SymbolicIntegerValue::Zero; @@ -113,7 +112,6 @@ bool IntegralRange::Contains(int64_t value) const { case TYP_BYTE: return SymbolicIntegerValue::ByteMax; - case TYP_BOOL: case TYP_UBYTE: return SymbolicIntegerValue::UByteMax; case TYP_SHORT: @@ -890,7 +888,6 @@ ssize_t Compiler::optCastConstantSmall(ssize_t iconVal, var_types smallType) case TYP_USHORT: return uint16_t(iconVal); - case TYP_BOOL: case TYP_UBYTE: return uint8_t(iconVal); @@ -2708,7 +2705,6 @@ GenTree* Compiler::optVNConstantPropOnTree(BasicBlock* block, GenTree* tree) unreached(); break; - case TYP_BOOL: case TYP_BYTE: case TYP_UBYTE: case TYP_SHORT: diff --git a/src/coreclr/jit/block.cpp b/src/coreclr/jit/block.cpp index d7eabe832ac98a..8b5cef28a71a82 100644 --- a/src/coreclr/jit/block.cpp +++ b/src/coreclr/jit/block.cpp @@ -792,9 +792,6 @@ bool BasicBlock::IsLIR() const //------------------------------------------------------------------------ // firstStmt: Returns the first statement in the block // -// Arguments: -// None. -// // Return Value: // The first statement in the block's bbStmtList. // @@ -804,10 +801,18 @@ Statement* BasicBlock::firstStmt() const } //------------------------------------------------------------------------ -// lastStmt: Returns the last statement in the block +// hasSingleStmt: Returns true if block has a single statement // -// Arguments: -// None. +// Return Value: +// true if block has a single statement, false otherwise +// +bool BasicBlock::hasSingleStmt() const +{ + return (firstStmt() != nullptr) && (firstStmt() == lastStmt()); +} + +//------------------------------------------------------------------------ +// lastStmt: Returns the last statement in the block // // Return Value: // The last statement in the block's bbStmtList. diff --git a/src/coreclr/jit/block.h b/src/coreclr/jit/block.h index 21b37f17fc4562..9c7953a12b9e56 100644 --- a/src/coreclr/jit/block.h +++ b/src/coreclr/jit/block.h @@ -1127,6 +1127,7 @@ struct BasicBlock : private LIR::Range Statement* firstStmt() const; Statement* lastStmt() const; + bool hasSingleStmt() const; // Statements: convenience method for enabling range-based `for` iteration over the statement list, e.g.: // for (Statement* const stmt : block->Statements()) @@ -1232,6 +1233,9 @@ struct BasicBlock : private LIR::Range template BasicBlockVisit VisitAllSuccs(Compiler* comp, TFunc func); + template + BasicBlockVisit VisitRegularSuccs(Compiler* comp, TFunc func); + bool HasPotentialEHSuccs(Compiler* comp); // BBSuccList: adapter class for forward iteration of block successors, using range-based `for`, diff --git a/src/coreclr/jit/codegen.h b/src/coreclr/jit/codegen.h index eb190f97f0e479..24ce3a88ee1ace 100644 --- a/src/coreclr/jit/codegen.h +++ b/src/coreclr/jit/codegen.h @@ -13,6 +13,8 @@ #include "compiler.h" // temporary?? #include "regset.h" #include "jitgcinfo.h" +#include "vixl/aarch64/macro-assembler-aarch64.h" +#include "vixl/aarch64/disasm-aarch64.h" class CodeGen final : public CodeGenInterface { @@ -35,6 +37,10 @@ class CodeGen final : public CodeGenInterface GenTree* addr, bool fold, bool* revPtr, GenTree** rv1Ptr, GenTree** rv2Ptr, unsigned* mulPtr, ssize_t* cnsPtr); private: + + vixl::aarch64::MacroAssembler vixlMasm; + vixl::aarch64::PrintDisassembler vixlDisasm; + #if defined(TARGET_XARCH) // Bit masks used in negating a float or double number. // This is to avoid creating more than one data constant for these bitmasks when a @@ -1235,6 +1241,10 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX #else instruction genGetInsForOper(genTreeOps oper, var_types type); #endif + instruction genGetVolatileLdStIns(instruction currentIns, + regNumber targetReg, + GenTreeIndir* indir, + bool* needsBarrier); bool genEmitOptimizedGCWriteBarrier(GCInfo::WriteBarrierForm writeBarrierForm, GenTree* addr, GenTree* data); GenTree* getCallTarget(const GenTreeCall* call, CORINFO_METHOD_HANDLE* methHnd); regNumber getCallIndirectionCellReg(GenTreeCall* call); diff --git a/src/coreclr/jit/codegenarm64.cpp b/src/coreclr/jit/codegenarm64.cpp index f99602d21d953b..092a031f270480 100644 --- a/src/coreclr/jit/codegenarm64.cpp +++ b/src/coreclr/jit/codegenarm64.cpp @@ -327,19 +327,38 @@ bool CodeGen::genInstrWithConstant(instruction ins, break; case INS_strb: + assert(size == EA_1BYTE); + immFitsInIns = emitter::emitIns_valid_imm_for_ldst_offset(imm, EA_1BYTE); + break; + case INS_strh: + assert(size == EA_2BYTE); + immFitsInIns = emitter::emitIns_valid_imm_for_ldst_offset(imm, EA_2BYTE); + break; + case INS_str: // reg1 is a source register for store instructions assert(tmpReg != reg1); // regTmp can not match any source register immFitsInIns = emitter::emitIns_valid_imm_for_ldst_offset(imm, size); break; + case INS_ldrb: case INS_ldrsb: + immFitsInIns = emitter::emitIns_valid_imm_for_ldst_offset(imm, EA_1BYTE); + break; + + case INS_ldrh: case INS_ldrsh: + immFitsInIns = emitter::emitIns_valid_imm_for_ldst_offset(imm, EA_2BYTE); + break; + case INS_ldrsw: - case INS_ldrb: - case INS_ldrh: + assert(size == EA_4BYTE); + immFitsInIns = emitter::emitIns_valid_imm_for_ldst_offset(imm, EA_4BYTE); + break; + case INS_ldr: + assert((size == EA_4BYTE) || (size == EA_8BYTE) || (size == EA_16BYTE)); immFitsInIns = emitter::emitIns_valid_imm_for_ldst_offset(imm, size); break; @@ -4207,22 +4226,10 @@ void CodeGen::genCodeForStoreInd(GenTreeStoreInd* tree) if (tree->IsVolatile()) { - bool addrIsInReg = addr->isUsedFromReg(); - bool addrIsAligned = ((tree->gtFlags & GTF_IND_UNALIGNED) == 0); + bool needsBarrier = true; + ins = genGetVolatileLdStIns(ins, dataReg, tree, &needsBarrier); - if ((ins == INS_strb) && addrIsInReg) - { - ins = INS_stlrb; - } - else if ((ins == INS_strh) && addrIsInReg && addrIsAligned) - { - ins = INS_stlrh; - } - else if ((ins == INS_str) && genIsValidIntReg(dataReg) && addrIsInReg && addrIsAligned) - { - ins = INS_stlr; - } - else + if (needsBarrier) { // issue a full memory barrier before a volatile StInd // Note: We cannot issue store barrier ishst because it is a weaker barrier. diff --git a/src/coreclr/jit/codegenarmarch.cpp b/src/coreclr/jit/codegenarmarch.cpp index 5434ef7b722ef9..997287927698de 100644 --- a/src/coreclr/jit/codegenarmarch.cpp +++ b/src/coreclr/jit/codegenarmarch.cpp @@ -1573,15 +1573,59 @@ void CodeGen::genCodeForShift(GenTree* tree) GenTree* operand = tree->gtGetOp1(); GenTree* shiftBy = tree->gtGetOp2(); + + vixl::aarch64::Register dest_reg(tree->GetRegNum(), size * vixl::kBitsPerByte); + vixl::aarch64::Register operand_reg(operand->GetRegNum(), size * vixl::kBitsPerByte); + + if (!shiftBy->IsCnsIntOrI()) { GetEmitter()->emitIns_R_R_R(ins, size, dstReg, operand->GetRegNum(), shiftBy->GetRegNum()); + + vixl::aarch64::Register shiftBy_reg(shiftBy->GetRegNum(), size * vixl::kBitsPerByte); + + switch(tree->gtOper) + { + case GT_LSH: + vixlMasm.Lsl(dest_reg, operand_reg, shiftBy_reg); + break; + case GT_RSH: + vixlMasm.Asr(dest_reg, operand_reg, shiftBy_reg); + break; + case GT_RSZ: + vixlMasm.Lsr(dest_reg, operand_reg, shiftBy_reg); + break; + case GT_ROR: + vixlMasm.Ror(dest_reg, operand_reg, shiftBy_reg); + break; + default: + assert(false); + } + } else { unsigned immWidth = emitter::getBitWidth(size); // For ARM64, immWidth will be set to 32 or 64 unsigned shiftByImm = (unsigned)shiftBy->AsIntCon()->gtIconVal & (immWidth - 1); GetEmitter()->emitIns_R_R_I(ins, size, dstReg, operand->GetRegNum(), shiftByImm); + + switch(tree->gtOper) + { + case GT_LSH: + vixlMasm.Lsl(dest_reg, operand_reg, shiftByImm); + break; + case GT_RSH: + vixlMasm.Asr(dest_reg, operand_reg, shiftByImm); + break; + case GT_RSZ: + vixlMasm.Lsr(dest_reg, operand_reg, shiftByImm); + break; + case GT_ROR: + vixlMasm.Ror(dest_reg, operand_reg, shiftByImm); + break; + default: + assert(false); + } } genProduceReg(tree); @@ -1728,6 +1772,134 @@ void CodeGen::genCodeForIndexAddr(GenTreeIndexAddr* node) genProduceReg(node); } +//------------------------------------------------------------------------ +// genGetVolatileLdStIns: Determine the most efficient instruction to perform a +// volatile load or store and whether an explicit barrier is required or not. +// +// Arguments: +// currentIns - the current instruction to perform load/store +// targetReg - the target register +// indir - the indirection node representing the volatile load/store +// needsBarrier - OUT parameter. Set to true if an explicit memory barrier is required. +// +// Return Value: +// instruction to perform the volatile load/store with. +// +instruction CodeGen::genGetVolatileLdStIns(instruction currentIns, + regNumber targetReg, + GenTreeIndir* indir, + bool* needsBarrier) +{ + assert(indir->IsVolatile()); + + if (!genIsValidIntReg(targetReg)) + { + // We don't have special instructions to perform volatile loads/stores for non-integer registers. + *needsBarrier = true; + return currentIns; + } + + assert(!varTypeIsFloating(indir)); + assert(!varTypeIsSIMD(indir)); + +#ifdef TARGET_ARM64 + *needsBarrier = false; + + if (indir->IsUnaligned() && (currentIns != INS_ldrb) && (currentIns != INS_strb)) + { + // We have to use a normal load/store + explicit memory barrier + // to avoid unaligned access exceptions. + *needsBarrier = true; + return currentIns; + } + + const bool addrIsInReg = indir->Addr()->isUsedFromReg(); + + // With RCPC2 (arm64 v8.4+) we can work with simple addressing modes like [reg + simm9] + const bool shouldUseRcpc2 = compiler->compOpportunisticallyDependsOn(InstructionSet_Rcpc2) && !addrIsInReg && + indir->Addr()->OperIs(GT_LEA) && !indir->HasIndex() && (indir->Scale() == 1) && + emitter::emitIns_valid_imm_for_unscaled_ldst_offset(indir->Offset()); + + if (shouldUseRcpc2) + { + assert(!addrIsInReg); + switch (currentIns) + { + // Loads + + case INS_ldrb: + return INS_ldapurb; + + case INS_ldrh: + return INS_ldapurh; + + case INS_ldr: + return INS_ldapur; + + // Stores + + case INS_strb: + return INS_stlurb; + + case INS_strh: + return INS_stlurh; + + case INS_str: + return INS_stlur; + + default: + *needsBarrier = true; + return currentIns; + } + } + + // Only RCPC2 (arm64 v8.4+) allows us to deal with contained addresses. + // In other cases we'll have to emit a normal load/store + explicit memory barrier. + // It means that lower should generally avoid generating contained addresses for volatile loads/stores + // so we can use cheaper instructions. + if (!addrIsInReg) + { + *needsBarrier = true; + return currentIns; + } + + // RCPC1 (arm64 v8.3+) offers a bit more relaxed memory ordering than ldar. Which is sufficient for + // .NET memory model's requirements, see https://github.com/dotnet/runtime/issues/67374 + const bool hasRcpc1 = compiler->compOpportunisticallyDependsOn(InstructionSet_Rcpc); + switch (currentIns) + { + // Loads + + case INS_ldrb: + return hasRcpc1 ? INS_ldaprb : INS_ldarb; + + case INS_ldrh: + return hasRcpc1 ? INS_ldaprh : INS_ldarh; + + case INS_ldr: + return hasRcpc1 ? INS_ldapr : INS_ldar; + + // Stores + + case INS_strb: + return INS_stlrb; + + case INS_strh: + return INS_stlrh; + + case INS_str: + return INS_stlr; + + default: + *needsBarrier = true; + return currentIns; + } +#else // TARGET_ARM64 + *needsBarrier = true; + return currentIns; +#endif // !TARGET_ARM64 +} + //------------------------------------------------------------------------ // genCodeForIndir: Produce code for a GT_IND node. // @@ -1755,33 +1927,9 @@ void CodeGen::genCodeForIndir(GenTreeIndir* tree) bool emitBarrier = false; - if ((tree->gtFlags & GTF_IND_VOLATILE) != 0) + if (tree->IsVolatile()) { -#ifdef TARGET_ARM64 - bool addrIsInReg = tree->Addr()->isUsedFromReg(); - bool addrIsAligned = ((tree->gtFlags & GTF_IND_UNALIGNED) == 0); - - // on arm64-v8.3+ we can use ldap* instructions with acquire/release semantics to avoid - // full memory barriers if mixed with STLR - bool hasRcpc = compiler->compOpportunisticallyDependsOn(InstructionSet_Rcpc); - - if ((ins == INS_ldrb) && addrIsInReg) - { - ins = hasRcpc ? INS_ldaprb : INS_ldarb; - } - else if ((ins == INS_ldrh) && addrIsInReg && addrIsAligned) - { - ins = hasRcpc ? INS_ldaprh : INS_ldarh; - } - else if ((ins == INS_ldr) && addrIsInReg && addrIsAligned && genIsValidIntReg(targetReg)) - { - ins = hasRcpc ? INS_ldapr : INS_ldar; - } - else -#endif // TARGET_ARM64 - { - emitBarrier = true; - } + ins = genGetVolatileLdStIns(ins, targetReg, tree, &emitBarrier); } GetEmitter()->emitInsLoadStoreOp(ins, emitActualTypeSize(type), targetReg, tree); @@ -3208,7 +3356,7 @@ void CodeGen::genCall(GenTreeCall* call) regNumber tmpReg = call->GetSingleTempReg(); // Register where we save call address in should not be overridden by epilog. - assert((tmpReg & (RBM_INT_CALLEE_TRASH & ~RBM_LR)) == tmpReg); + assert((genRegMask(tmpReg) & (RBM_INT_CALLEE_TRASH & ~RBM_LR)) == genRegMask(tmpReg)); regNumber callAddrReg = call->IsVirtualStubRelativeIndir() ? compiler->virtualStubParamInfo->GetReg() : REG_R2R_INDIRECT_PARAM; @@ -3468,7 +3616,7 @@ void CodeGen::genCallInstruction(GenTreeCall* call) else { // Register where we save call address in should not be overridden by epilog. - assert((targetAddrReg & (RBM_INT_CALLEE_TRASH & ~RBM_LR)) == targetAddrReg); + assert((genRegMask(targetAddrReg) & (RBM_INT_CALLEE_TRASH & ~RBM_LR)) == genRegMask(targetAddrReg)); } // We have now generated code loading the target address from the indirection cell into `targetAddrReg`. diff --git a/src/coreclr/jit/codegencommon.cpp b/src/coreclr/jit/codegencommon.cpp index 76c0212ceaba54..6cbf0b1a837c80 100644 --- a/src/coreclr/jit/codegencommon.cpp +++ b/src/coreclr/jit/codegencommon.cpp @@ -83,7 +83,8 @@ void CodeGenInterface::CopyRegisterInfo() /*****************************************************************************/ -CodeGen::CodeGen(Compiler* theCompiler) : CodeGenInterface(theCompiler) +CodeGen::CodeGen(Compiler* theCompiler) + : CodeGenInterface(theCompiler), vixlMasm(theCompiler), vixlDisasm(theCompiler, jitstdout()) { #if defined(TARGET_XARCH) negBitmaskFlt = nullptr; @@ -2011,7 +2012,7 @@ void CodeGen::genEmitMachineCode() #if TRACK_LSRA_STATS if (JitConfig.DisplayLsraStats() == 3) { - compiler->m_pLinearScan->dumpLsraStatsSummary(jitstdout); + compiler->m_pLinearScan->dumpLsraStatsSummary(jitstdout()); } #endif // TRACK_LSRA_STATS @@ -2104,7 +2105,7 @@ void CodeGen::genEmitUnwindDebugGCandEH() genCreateAndStoreGCInfo(codeSize, prologSize, epilogSize DEBUGARG(codePtr)); #ifdef DEBUG - FILE* dmpf = jitstdout; + FILE* dmpf = jitstdout(); compiler->opts.dmpHex = false; if (!strcmp(compiler->info.compMethodName, "(&vixlCodeStart); + vixl::aarch64::Instruction* vixlAddressEnd = vixlMasm.GetLabelAddress(&vixlCodeEnd); + + // We should now have a buffer containing some instructions. + + // Disassemble the buffer to the jit standard output. + if (vixlAddressStart != vixlAddressEnd) + { + JITDUMP("Ready for disassmble: %s this=%p compiler=%p\n", compiler->info.compFullName, this, compiler); + + if (compiler->verbose) + { + JITDUMP("About to disassmble: %s\n", compiler->info.compFullName); + // Bug: The next few lines never complete. + // However, when debugging in gdb sometimes this will complete. + // For example: "break exit; run" + // when stepping through in gdb, after the disassembler has printed, another thread will + // jump in and start work. Then a few more steps later, the rest of the program will compile + // and suddenly everything has exited. + vixlDisasm.DisassembleBuffer(vixlAddressStart, vixlAddressEnd); + JITDUMP("Finished disassmble\n"); + } + } + // There could be variables alive at this point. For example see lvaKeepAliveAndReportThis. // This call is for cleaning the GC refs genUpdateLife(VarSetOps::MakeEmpty(compiler)); diff --git a/src/coreclr/jit/codegenloongarch64.cpp b/src/coreclr/jit/codegenloongarch64.cpp index 33bd2a77486c65..c63865121b5c04 100644 --- a/src/coreclr/jit/codegenloongarch64.cpp +++ b/src/coreclr/jit/codegenloongarch64.cpp @@ -6482,11 +6482,11 @@ void CodeGen::genCall(GenTreeCall* call) regNumber tmpReg = call->GetSingleTempReg(); // Register where we save call address in should not be overridden by epilog. - assert((tmpReg & (RBM_INT_CALLEE_TRASH & ~RBM_RA)) == tmpReg); + assert((genRegMask(tmpReg) & (RBM_INT_CALLEE_TRASH & ~RBM_RA)) == genRegMask(tmpReg)); regNumber callAddrReg = call->IsVirtualStubRelativeIndir() ? compiler->virtualStubParamInfo->GetReg() : REG_R2R_INDIRECT_PARAM; - GetEmitter()->emitIns_R_R(ins_Load(TYP_I_IMPL), emitActualTypeSize(TYP_I_IMPL), tmpReg, callAddrReg); + GetEmitter()->emitIns_R_R_I(ins_Load(TYP_I_IMPL), emitActualTypeSize(TYP_I_IMPL), tmpReg, callAddrReg, 0); // We will use this again when emitting the jump in genCallInstruction in the epilog call->gtRsvdRegs |= genRegMask(tmpReg); } @@ -6710,13 +6710,13 @@ void CodeGen::genCallInstruction(GenTreeCall* call) // For fast tailcalls we have already loaded the call target when processing the call node. if (!call->IsFastTailCall()) { - GetEmitter()->emitIns_R_R(ins_Load(TYP_I_IMPL), emitActualTypeSize(TYP_I_IMPL), targetAddrReg, - callThroughIndirReg); + GetEmitter()->emitIns_R_R_I(ins_Load(TYP_I_IMPL), emitActualTypeSize(TYP_I_IMPL), targetAddrReg, + callThroughIndirReg, 0); } else { // Register where we save call address in should not be overridden by epilog. - assert((targetAddrReg & (RBM_INT_CALLEE_TRASH & ~RBM_RA)) == targetAddrReg); + assert((genRegMask(targetAddrReg) & (RBM_INT_CALLEE_TRASH & ~RBM_RA)) == genRegMask(targetAddrReg)); } // We have now generated code loading the target address from the indirection cell into `targetAddrReg`. @@ -7681,19 +7681,15 @@ inline void CodeGen::genJumpToThrowHlpBlk_la( callType = emitter::EC_INDIR_R; callTarget = REG_DEFAULT_HELPER_CALL_TARGET; - // ssize_t imm = (4 + 1 + 1) << 2;// 4=li, 1=load, 1=jirl. - - // instGen_Set_Reg_To_Imm(EA_PTR_DSP_RELOC, callTarget, (ssize_t)pAddr); - // emit->emitIns_R_R_I(INS_ld_d, EA_PTRSIZE, callTarget, callTarget, 0); if (compiler->opts.compReloc) { - ssize_t imm = (2 + 1) << 2; // , 1=jirl. + ssize_t imm = (3 + 1) << 2; // to jirl's next instr. emit->emitIns_R_R_I(ins, EA_PTRSIZE, reg1, reg2, imm); GetEmitter()->emitIns_R_AI(INS_bl, EA_PTR_DSP_RELOC, callTarget, (ssize_t)pAddr); } else { - ssize_t imm = (3 + 1) << 2; // , 1=jirl. + ssize_t imm = (4 + 1) << 2; // to jirl's next instr. emit->emitIns_R_R_I(ins, EA_PTRSIZE, reg1, reg2, imm); // GetEmitter()->emitIns_R_I(INS_pcaddu12i, EA_PTRSIZE, callTarget, (ssize_t)pAddr); @@ -7758,35 +7754,6 @@ void CodeGen::instGen_MemoryBarrier(BarrierKind barrierKind) GetEmitter()->emitIns_I(INS_dbar, EA_4BYTE, INS_BARRIER_FULL); } -//----------------------------------------------------------------------------------- -// genProfilingLeaveCallback: Generate the profiling function leave or tailcall callback. -// Technically, this is not part of the epilog; it is called when we are generating code for a GT_RETURN node. -// -// Arguments: -// helper - which helper to call. Either CORINFO_HELP_PROF_FCN_LEAVE or CORINFO_HELP_PROF_FCN_TAILCALL -// -// Return Value: -// None -// -void CodeGen::genProfilingLeaveCallback(unsigned helper /*= CORINFO_HELP_PROF_FCN_LEAVE*/) -{ - assert((helper == CORINFO_HELP_PROF_FCN_LEAVE) || (helper == CORINFO_HELP_PROF_FCN_TAILCALL)); - - // Only hook if profiler says it's okay. - if (!compiler->compIsProfilerHookNeeded()) - { - return; - } - - compiler->info.compProfilerCallback = true; - - // Need to save on to the stack level, since the helper call will pop the argument - unsigned saveStackLvl2 = genStackLevel; - - /* Restore the stack level */ - SetStackLevel(saveStackLvl2); -} - /*----------------------------------------------------------------------------- * * Push/Pop any callee-saved registers we have used @@ -8625,6 +8592,7 @@ void CodeGen::genFnPrologCalleeRegArgs() (regNumber)regArg[i]); regArgNum--; regArgMaskLive &= ~genRegMask((regNumber)regArg[j]); + regArg[j] = 0; if (regArgNum == 0) { break; @@ -8661,6 +8629,7 @@ void CodeGen::genFnPrologCalleeRegArgs() assert(!regArgMaskLive); } +#ifdef PROFILING_SUPPORTED //----------------------------------------------------------------------------------- // genProfilingEnterCallback: Generate the profiling function enter callback. // @@ -8676,10 +8645,60 @@ void CodeGen::genProfilingEnterCallback(regNumber initReg, bool* pInitRegZeroed) { assert(compiler->compGeneratingProlog); - // Give profiler a chance to back out of hooking this method if (!compiler->compIsProfilerHookNeeded()) { return; } + + assert(!compiler->compProfilerMethHndIndirected); + instGen_Set_Reg_To_Imm(EA_PTRSIZE, REG_PROFILER_ENTER_ARG_FUNC_ID, (ssize_t)compiler->compProfilerMethHnd); + + int callerSPOffset = compiler->lvaToCallerSPRelativeOffset(0, isFramePointerUsed()); + genInstrWithConstant(INS_addi_d, EA_PTRSIZE, REG_PROFILER_ENTER_ARG_CALLER_SP, genFramePointerReg(), + (ssize_t)(-callerSPOffset), REG_PROFILER_ENTER_ARG_CALLER_SP); + + genEmitHelperCall(CORINFO_HELP_PROF_FCN_ENTER, 0, EA_UNKNOWN); + + if ((genRegMask(initReg) & RBM_PROFILER_ENTER_TRASH) != RBM_NONE) + { + *pInitRegZeroed = false; + } } + +//----------------------------------------------------------------------------------- +// genProfilingLeaveCallback: Generate the profiling function leave or tailcall callback. +// Technically, this is not part of the epilog; it is called when we are generating code for a GT_RETURN node. +// +// Arguments: +// helper - which helper to call. Either CORINFO_HELP_PROF_FCN_LEAVE or CORINFO_HELP_PROF_FCN_TAILCALL +// +// Return Value: +// None +// +void CodeGen::genProfilingLeaveCallback(unsigned helper /*= CORINFO_HELP_PROF_FCN_LEAVE*/) +{ + assert((helper == CORINFO_HELP_PROF_FCN_LEAVE) || (helper == CORINFO_HELP_PROF_FCN_TAILCALL)); + + if (!compiler->compIsProfilerHookNeeded()) + { + return; + } + + compiler->info.compProfilerCallback = true; + + assert(!compiler->compProfilerMethHndIndirected); + instGen_Set_Reg_To_Imm(EA_PTRSIZE, REG_PROFILER_LEAVE_ARG_FUNC_ID, (ssize_t)compiler->compProfilerMethHnd); + + gcInfo.gcMarkRegSetNpt(RBM_PROFILER_LEAVE_ARG_FUNC_ID); + + int callerSPOffset = compiler->lvaToCallerSPRelativeOffset(0, isFramePointerUsed()); + genInstrWithConstant(INS_addi_d, EA_PTRSIZE, REG_PROFILER_LEAVE_ARG_CALLER_SP, genFramePointerReg(), + (ssize_t)(-callerSPOffset), REG_PROFILER_LEAVE_ARG_CALLER_SP); + + gcInfo.gcMarkRegSetNpt(RBM_PROFILER_LEAVE_ARG_CALLER_SP); + + genEmitHelperCall(helper, 0, EA_UNKNOWN); +} +#endif // PROFILING_SUPPORTED + #endif // TARGET_LOONGARCH64 diff --git a/src/coreclr/jit/codegenriscv64.cpp b/src/coreclr/jit/codegenriscv64.cpp index 39d25e316e529e..6352fa958eff00 100644 --- a/src/coreclr/jit/codegenriscv64.cpp +++ b/src/coreclr/jit/codegenriscv64.cpp @@ -816,8 +816,8 @@ void CodeGen::genCaptureFuncletPrologEpilogInfo() if (compiler->lvaPSPSym != BAD_VAR_NUM) { - if (CallerSP_to_PSP_slot_delta != - compiler->lvaGetCallerSPRelativeOffset(compiler->lvaPSPSym)) // for debugging + if (CallerSP_to_PSP_slot_delta != compiler->lvaGetCallerSPRelativeOffset(compiler->lvaPSPSym)) // for + // debugging { printf("lvaGetCallerSPRelativeOffset(lvaPSPSym): %d\n", compiler->lvaGetCallerSPRelativeOffset(compiler->lvaPSPSym)); @@ -2609,14 +2609,55 @@ void CodeGen::genJumpTable(GenTree* treeNode) } //------------------------------------------------------------------------ -// genLockedInstructions: Generate code for a GT_XADD or GT_XCHG node. +// genLockedInstructions: Generate code for a GT_XADD, GT_XAND, GT_XORR or GT_XCHG node. // // Arguments: -// treeNode - the GT_XADD/XCHG node +// treeNode - the GT_XADD/XAND/XORR/XCHG node // void CodeGen::genLockedInstructions(GenTreeOp* treeNode) { - NYI_RISCV64("genLockedInstructions-----unimplemented/unused on RISCV64 yet----"); + GenTree* data = treeNode->AsOp()->gtOp2; + GenTree* addr = treeNode->AsOp()->gtOp1; + regNumber dataReg = data->GetRegNum(); + regNumber addrReg = addr->GetRegNum(); + regNumber targetReg = treeNode->GetRegNum(); + if (targetReg == REG_NA) + { + targetReg = REG_R0; + } + + genConsumeAddress(addr); + genConsumeRegs(data); + + emitAttr dataSize = emitActualTypeSize(data); + bool is4 = (dataSize == EA_4BYTE); + + assert(!data->isContainedIntOrIImmed()); + + instruction ins = INS_none; + switch (treeNode->gtOper) + { + case GT_XORR: + ins = is4 ? INS_amoor_w : INS_amoor_d; + break; + case GT_XAND: + ins = is4 ? INS_amoand_w : INS_amoand_d; + break; + case GT_XCHG: + ins = is4 ? INS_amoswap_w : INS_amoswap_d; + break; + case GT_XADD: + ins = is4 ? INS_amoadd_w : INS_amoadd_d; + break; + default: + noway_assert(!"Unexpected treeNode->gtOper"); + } + GetEmitter()->emitIns_R_R_R(ins, dataSize, targetReg, addrReg, dataReg); + + if (targetReg != REG_R0) + { + genProduceReg(treeNode); + } } //------------------------------------------------------------------------ @@ -2627,7 +2668,62 @@ void CodeGen::genLockedInstructions(GenTreeOp* treeNode) // void CodeGen::genCodeForCmpXchg(GenTreeCmpXchg* treeNode) { - NYI_RISCV64("genCodeForCmpXchg-----unimplemented/unused on RISCV64 yet----"); + assert(treeNode->OperIs(GT_CMPXCHG)); + + GenTree* locOp = treeNode->gtOpLocation; + GenTree* valOp = treeNode->gtOpValue; + GenTree* comparandOp = treeNode->gtOpComparand; + + regNumber target = treeNode->GetRegNum(); + regNumber loc = locOp->GetRegNum(); + regNumber val = valOp->GetRegNum(); + regNumber comparand = comparandOp->GetRegNum(); + regNumber storeErr = treeNode->ExtractTempReg(RBM_ALLINT); + + // Register allocator should have extended the lifetimes of all input and internal registers + // They should all be different + noway_assert(target != loc); + noway_assert(target != val); + noway_assert(target != comparand); + noway_assert(target != storeErr); + noway_assert(loc != val); + noway_assert(loc != comparand); + noway_assert(loc != storeErr); + noway_assert(val != comparand); + noway_assert(val != storeErr); + noway_assert(comparand != storeErr); + noway_assert(target != REG_NA); + noway_assert(storeErr != REG_NA); + + assert(locOp->isUsedFromReg()); + assert(valOp->isUsedFromReg()); + assert(!comparandOp->isUsedFromMemory()); + + genConsumeAddress(locOp); + genConsumeRegs(valOp); + genConsumeRegs(comparandOp); + + // NOTE: `genConsumeAddress` marks consumed register as not a GC pointer, assuming the input + // registers die at the first generated instruction. However, here the input registers are reused, + // so mark the location register as a GC pointer until code generation for this node is finished. + gcInfo.gcMarkRegPtrVal(loc, locOp->TypeGet()); + + BasicBlock* retry = genCreateTempLabel(); + BasicBlock* fail = genCreateTempLabel(); + + emitter* e = GetEmitter(); + emitAttr size = emitActualTypeSize(valOp); + bool is4 = (size == EA_4BYTE); + + genDefineTempLabel(retry); + e->emitIns_R_R_R(is4 ? INS_lr_w : INS_lr_d, size, target, loc, REG_R0); // load original value + e->emitIns_J_cond_la(INS_bne, fail, target, comparand); // fail if doesn’t match + e->emitIns_R_R_R(is4 ? INS_sc_w : INS_sc_d, size, storeErr, loc, val); // try to update + e->emitIns_J(INS_bnez, retry, storeErr); // retry if update failed + genDefineTempLabel(fail); + + gcInfo.gcMarkRegSetNpt(locOp->gtGetRegMask()); + genProduceReg(treeNode); } static inline bool isImmed(GenTree* treeNode) @@ -4643,6 +4739,8 @@ void CodeGen::genCodeForTreeNode(GenTree* treeNode) case GT_XCHG: case GT_XADD: + case GT_XORR: + case GT_XAND: genLockedInstructions(treeNode->AsOp()); break; @@ -6077,11 +6175,11 @@ void CodeGen::genCall(GenTreeCall* call) regNumber tmpReg = call->GetSingleTempReg(); // Register where we save call address in should not be overridden by epilog. - assert((tmpReg & (RBM_INT_CALLEE_TRASH & ~RBM_RA)) == tmpReg); + assert((genRegMask(tmpReg) & (RBM_INT_CALLEE_TRASH & ~RBM_RA)) == genRegMask(tmpReg)); regNumber callAddrReg = call->IsVirtualStubRelativeIndir() ? compiler->virtualStubParamInfo->GetReg() : REG_R2R_INDIRECT_PARAM; - GetEmitter()->emitIns_R_R(ins_Load(TYP_I_IMPL), emitActualTypeSize(TYP_I_IMPL), tmpReg, callAddrReg); + GetEmitter()->emitIns_R_R_I(ins_Load(TYP_I_IMPL), emitActualTypeSize(TYP_I_IMPL), tmpReg, callAddrReg, 0); // We will use this again when emitting the jump in genCallInstruction in the epilog call->gtRsvdRegs |= genRegMask(tmpReg); } @@ -6305,13 +6403,13 @@ void CodeGen::genCallInstruction(GenTreeCall* call) // For fast tailcalls we have already loaded the call target when processing the call node. if (!call->IsFastTailCall()) { - GetEmitter()->emitIns_R_R(ins_Load(TYP_I_IMPL), emitActualTypeSize(TYP_I_IMPL), targetAddrReg, - callThroughIndirReg); + GetEmitter()->emitIns_R_R_I(ins_Load(TYP_I_IMPL), emitActualTypeSize(TYP_I_IMPL), targetAddrReg, + callThroughIndirReg, 0); } else { // Register where we save call address in should not be overridden by epilog. - assert((targetAddrReg & (RBM_INT_CALLEE_TRASH & ~RBM_RA)) == targetAddrReg); + assert((genRegMask(targetAddrReg) & (RBM_INT_CALLEE_TRASH & ~RBM_RA)) == genRegMask(targetAddrReg)); } // We have now generated code loading the target address from the indirection cell into `targetAddrReg`. @@ -7162,35 +7260,6 @@ void CodeGen::instGen_MemoryBarrier(BarrierKind barrierKind) GetEmitter()->emitIns_I(INS_fence, EA_4BYTE, INS_BARRIER_FULL); } -//----------------------------------------------------------------------------------- -// genProfilingLeaveCallback: Generate the profiling function leave or tailcall callback. -// Technically, this is not part of the epilog; it is called when we are generating code for a GT_RETURN node. -// -// Arguments: -// helper - which helper to call. Either CORINFO_HELP_PROF_FCN_LEAVE or CORINFO_HELP_PROF_FCN_TAILCALL -// -// Return Value: -// None -// -void CodeGen::genProfilingLeaveCallback(unsigned helper /*= CORINFO_HELP_PROF_FCN_LEAVE*/) -{ - assert((helper == CORINFO_HELP_PROF_FCN_LEAVE) || (helper == CORINFO_HELP_PROF_FCN_TAILCALL)); - - // Only hook if profiler says it's okay. - if (!compiler->compIsProfilerHookNeeded()) - { - return; - } - - compiler->info.compProfilerCallback = true; - - // Need to save on to the stack level, since the helper call will pop the argument - unsigned saveStackLvl2 = genStackLevel; - - /* Restore the stack level */ - SetStackLevel(saveStackLvl2); -} - /*----------------------------------------------------------------------------- * * Push/Pop any callee-saved registers we have used @@ -7989,6 +8058,7 @@ void CodeGen::genFnPrologCalleeRegArgs() 0); regArgNum--; regArgMaskLive &= ~genRegMask((regNumber)regArg[j]); + regArg[j] = 0; } else if (k == i) { @@ -8066,6 +8136,7 @@ void CodeGen::genFnPrologCalleeRegArgs() (regNumber)regArg[i], (regNumber)regArg[i]); regArgNum--; regArgMaskLive &= ~genRegMask((regNumber)regArg[j]); + regArg[j] = 0; if (regArgNum == 0) { break; @@ -8102,6 +8173,7 @@ void CodeGen::genFnPrologCalleeRegArgs() assert(!regArgMaskLive); } +#ifdef PROFILING_SUPPORTED //----------------------------------------------------------------------------------- // genProfilingEnterCallback: Generate the profiling function enter callback. // @@ -8110,17 +8182,79 @@ void CodeGen::genFnPrologCalleeRegArgs() // pInitRegZeroed - OUT parameter. *pInitRegZeroed set to 'false' if 'initReg' is // set to non-zero value after this call. // -// Return Value: -// None -// void CodeGen::genProfilingEnterCallback(regNumber initReg, bool* pInitRegZeroed) { assert(compiler->compGeneratingProlog); - // Give profiler a chance to back out of hooking this method if (!compiler->compIsProfilerHookNeeded()) { return; } + + ssize_t methHnd = (ssize_t)compiler->compProfilerMethHnd; + if (compiler->compProfilerMethHndIndirected) + { + instGen_Set_Reg_To_Imm(EA_PTR_DSP_RELOC, REG_PROFILER_ENTER_ARG_FUNC_ID, methHnd); + GetEmitter()->emitIns_R_R_I(INS_ld, EA_PTRSIZE, REG_PROFILER_ENTER_ARG_FUNC_ID, REG_PROFILER_ENTER_ARG_FUNC_ID, + 0); + } + else + { + instGen_Set_Reg_To_Imm(EA_PTRSIZE, REG_PROFILER_ENTER_ARG_FUNC_ID, methHnd); + } + + ssize_t callerSPOffset = -compiler->lvaToCallerSPRelativeOffset(0, isFramePointerUsed()); + genInstrWithConstant(INS_addi, EA_PTRSIZE, REG_PROFILER_ENTER_ARG_CALLER_SP, genFramePointerReg(), callerSPOffset, + REG_PROFILER_ENTER_ARG_CALLER_SP); + + genEmitHelperCall(CORINFO_HELP_PROF_FCN_ENTER, 0, EA_UNKNOWN); + + if ((genRegMask(initReg) & RBM_PROFILER_ENTER_TRASH)) + { + *pInitRegZeroed = false; + } } + +//----------------------------------------------------------------------------------- +// genProfilingLeaveCallback: Generate the profiling function leave or tailcall callback. +// Technically, this is not part of the epilog; it is called when we are generating code for a GT_RETURN node. +// +// Arguments: +// helper - which helper to call. Either CORINFO_HELP_PROF_FCN_LEAVE or CORINFO_HELP_PROF_FCN_TAILCALL +// +void CodeGen::genProfilingLeaveCallback(unsigned helper /*= CORINFO_HELP_PROF_FCN_LEAVE*/) +{ + assert((helper == CORINFO_HELP_PROF_FCN_LEAVE) || (helper == CORINFO_HELP_PROF_FCN_TAILCALL)); + + if (!compiler->compIsProfilerHookNeeded()) + { + return; + } + + compiler->info.compProfilerCallback = true; + + ssize_t methHnd = (ssize_t)compiler->compProfilerMethHnd; + if (compiler->compProfilerMethHndIndirected) + { + instGen_Set_Reg_To_Imm(EA_PTR_DSP_RELOC, REG_PROFILER_LEAVE_ARG_FUNC_ID, methHnd); + GetEmitter()->emitIns_R_R_I(INS_ld, EA_PTRSIZE, REG_PROFILER_LEAVE_ARG_FUNC_ID, REG_PROFILER_LEAVE_ARG_FUNC_ID, + 0); + } + else + { + instGen_Set_Reg_To_Imm(EA_PTRSIZE, REG_PROFILER_LEAVE_ARG_FUNC_ID, methHnd); + } + + gcInfo.gcMarkRegSetNpt(RBM_PROFILER_LEAVE_ARG_FUNC_ID); + + ssize_t callerSPOffset = -compiler->lvaToCallerSPRelativeOffset(0, isFramePointerUsed()); + genInstrWithConstant(INS_addi, EA_PTRSIZE, REG_PROFILER_LEAVE_ARG_CALLER_SP, genFramePointerReg(), callerSPOffset, + REG_PROFILER_LEAVE_ARG_CALLER_SP); + + gcInfo.gcMarkRegSetNpt(RBM_PROFILER_LEAVE_ARG_CALLER_SP); + + genEmitHelperCall(helper, 0, EA_UNKNOWN); +} +#endif // PROFILING_SUPPORTED + #endif // TARGET_RISCV64 diff --git a/src/coreclr/jit/codegenxarch.cpp b/src/coreclr/jit/codegenxarch.cpp index 5847b40ffd32e2..10e03e69521484 100644 --- a/src/coreclr/jit/codegenxarch.cpp +++ b/src/coreclr/jit/codegenxarch.cpp @@ -6735,7 +6735,7 @@ void CodeGen::genCompareFloat(GenTree* treeNode) if (((op1->gtGetContainedRegMask() | op2->gtGetContainedRegMask()) & targetRegMask) == 0) { instGen_Set_Reg_To_Zero(emitTypeSize(TYP_I_IMPL), targetReg); - targetType = TYP_BOOL; // just a tip for inst_SETCC that movzx is not needed + targetType = TYP_UBYTE; // just a tip for inst_SETCC that movzx is not needed } } GetEmitter()->emitInsBinary(ins, cmpAttr, op1, op2); @@ -6906,7 +6906,7 @@ void CodeGen::genCompareInt(GenTree* treeNode) if (((op1->gtGetContainedRegMask() | op2->gtGetContainedRegMask()) & targetRegMask) == 0) { instGen_Set_Reg_To_Zero(emitTypeSize(TYP_I_IMPL), targetReg); - targetType = TYP_BOOL; // just a tip for inst_SETCC that movzx is not needed + targetType = TYP_UBYTE; // just a tip for inst_SETCC that movzx is not needed } } @@ -10894,9 +10894,12 @@ void CodeGen::genZeroInitFrameUsingBlockInit(int untrLclHi, int untrLclLo, regNu assert((blkSize + alignmentHiBlkSize) == (untrLclHi - untrLclLo)); #endif // !defined(TARGET_AMD64) + const int maxSimdSize = (int)compiler->roundDownSIMDSize(blkSize); + assert((maxSimdSize >= XMM_REGSIZE_BYTES) && (maxSimdSize <= ZMM_REGSIZE_BYTES)); + // The loop is unrolled 3 times so we do not move to the loop block until it // will loop at least once so the threshold is 6. - if (blkSize < (6 * XMM_REGSIZE_BYTES)) + if (blkSize < (6 * maxSimdSize)) { // Generate the following code: // @@ -10905,10 +10908,22 @@ void CodeGen::genZeroInitFrameUsingBlockInit(int untrLclHi, int untrLclLo, regNu // ... // movups xmmword ptr [ebp/esp-OFFS], xmm4 // mov qword ptr [ebp/esp-OFFS], rax - + // + // NOTE: it implicitly zeroes YMM4 and ZMM4 as well. emit->emitIns_SIMD_R_R_R(INS_xorps, EA_16BYTE, zeroSIMDReg, zeroSIMDReg, zeroSIMDReg); int i = 0; + if (maxSimdSize > XMM_REGSIZE_BYTES) + { + for (; i <= blkSize - maxSimdSize; i += maxSimdSize) + { + // We previously aligned data to 16 bytes which might not be aligned to maxSimdSize + emit->emitIns_AR_R(simdUnalignedMovIns(), EA_ATTR(maxSimdSize), zeroSIMDReg, frameReg, + alignedLclLo + i); + } + // Remainder will be handled by the xmm loop below + } + for (; i < blkSize; i += XMM_REGSIZE_BYTES) { emit->emitIns_AR_R(simdMov, EA_ATTR(XMM_REGSIZE_BYTES), zeroSIMDReg, frameReg, alignedLclLo + i); diff --git a/src/coreclr/jit/compiler.cpp b/src/coreclr/jit/compiler.cpp index 4b5079ea4bfa13..416842ac4d5b5d 100644 --- a/src/coreclr/jit/compiler.cpp +++ b/src/coreclr/jit/compiler.cpp @@ -20,7 +20,6 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX #include "rangecheck.h" #include "lower.h" #include "stacklevelsetter.h" -#include "jittelemetry.h" #include "patchpointinfo.h" #include "jitstd/algorithm.h" @@ -155,7 +154,7 @@ void Compiler::JitLogEE(unsigned level, const char* fmt, ...) if (verbose) { va_start(args, fmt); - vflogf(jitstdout, fmt, args); + vflogf(jitstdout(), fmt, args); va_end(args); } @@ -1078,7 +1077,7 @@ var_types Compiler::getReturnTypeForStruct(CORINFO_CLASS_HANDLE clsHnd, #elif defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64) - // On LOONGARCH64 struct that is 1-16 bytes is returned by value in one/two register(s) + // On LOONGARCH64/RISCV64 struct that is 1-16 bytes is returned by value in one/two register(s) howToReturnStruct = SPK_ByValue; useType = TYP_STRUCT; @@ -1230,13 +1229,14 @@ void DisplayNowayAssertMap() fout = _wfopen(strJitMeasureNowayAssertFile, W("a")); if (fout == nullptr) { - fprintf(jitstdout, "Failed to open JitMeasureNowayAssertFile \"%ws\"\n", strJitMeasureNowayAssertFile); + fprintf(jitstdout(), "Failed to open JitMeasureNowayAssertFile \"%ws\"\n", + strJitMeasureNowayAssertFile); return; } } else { - fout = jitstdout; + fout = jitstdout(); } // Iterate noway assert map, create sorted table by occurrence, dump it. @@ -1253,7 +1253,7 @@ void DisplayNowayAssertMap() jitstd::sort(nacp, nacp + count, NowayAssertCountMap::compare()); - if (fout == jitstdout) + if (fout == jitstdout()) { // Don't output the header if writing to a file, since we'll be appending to existing dumps in that case. fprintf(fout, "\nnoway_assert counts:\n"); @@ -1266,7 +1266,7 @@ void DisplayNowayAssertMap() nacp[i].fl.m_condStr); } - if (fout != jitstdout) + if (fout != jitstdout()) { fclose(fout); fout = nullptr; @@ -1331,7 +1331,7 @@ void Compiler::compStartup() // Static vars of ValueNumStore ValueNumStore::ValidateValueNumStoreStatics(); - compDisplayStaticSizes(jitstdout); + compDisplayStaticSizes(); } /***************************************************************************** @@ -1389,12 +1389,9 @@ void Compiler::compShutdown() #endif #if NODEBASH_STATS - GenTree::ReportOperBashing(jitstdout); + GenTree::ReportOperBashing(jitstdout()); #endif - // Where should we write our statistics output? - FILE* fout = jitstdout; - #ifdef FEATURE_JIT_METHOD_PERF if (compJitTimeLogFilename != nullptr) { @@ -1445,7 +1442,7 @@ void Compiler::compShutdown() unsigned countLarge = 0; unsigned countSmall = 0; - fprintf(fout, "\nGenTree operator counts (approximate):\n\n"); + jitprintf("\nGenTree operator counts (approximate):\n\n"); for (OperInfo oper : opers) { @@ -1465,8 +1462,8 @@ void Compiler::compShutdown() // Let's not show anything below a threshold if (percentage >= 0.5) { - fprintf(fout, " GT_%-17s %7u (%4.1lf%%) %3u bytes each\n", GenTree::OpName(oper.Oper), count, - percentage, size); + jitprintf(" GT_%-17s %7u (%4.1lf%%) %3u bytes each\n", GenTree::OpName(oper.Oper), count, + percentage, size); remainingCount -= count; } else @@ -1484,14 +1481,14 @@ void Compiler::compShutdown() if (remainingCount > 0) { - fprintf(fout, " All other GT_xxx ... %7u (%4.1lf%%) ... %4.1lf%% small + %4.1lf%% large\n", - remainingCount, 100.0 * remainingCount / totalCount, 100.0 * remainingCountSmall / totalCount, - 100.0 * remainingCountLarge / totalCount); + jitprintf(" All other GT_xxx ... %7u (%4.1lf%%) ... %4.1lf%% small + %4.1lf%% large\n", remainingCount, + 100.0 * remainingCount / totalCount, 100.0 * remainingCountSmall / totalCount, + 100.0 * remainingCountLarge / totalCount); } - fprintf(fout, " -----------------------------------------------------\n"); - fprintf(fout, " Total ....... %11u --ALL-- ... %4.1lf%% small + %4.1lf%% large\n", totalCount, - 100.0 * countSmall / totalCount, 100.0 * countLarge / totalCount); - fprintf(fout, "\n"); + jitprintf(" -----------------------------------------------------\n"); + jitprintf(" Total ....... %11u --ALL-- ... %4.1lf%% small + %4.1lf%% large\n", totalCount, + 100.0 * countSmall / totalCount, 100.0 * countLarge / totalCount); + jitprintf("\n"); } #endif // COUNT_AST_OPERS @@ -1500,49 +1497,49 @@ void Compiler::compShutdown() if (grossVMsize && grossNCsize) { - fprintf(fout, "\n"); - fprintf(fout, "--------------------------------------\n"); - fprintf(fout, "Function and GC info size stats\n"); - fprintf(fout, "--------------------------------------\n"); + jitprintf("\n"); + jitprintf("--------------------------------------\n"); + jitprintf("Function and GC info size stats\n"); + jitprintf("--------------------------------------\n"); - fprintf(fout, "[%7u VM, %8u %6s %4u%%] %s\n", grossVMsize, grossNCsize, Target::g_tgtCPUName, - 100 * grossNCsize / grossVMsize, "Total (excluding GC info)"); + jitprintf("[%7u VM, %8u %6s %4u%%] %s\n", grossVMsize, grossNCsize, Target::g_tgtCPUName, + 100 * grossNCsize / grossVMsize, "Total (excluding GC info)"); - fprintf(fout, "[%7u VM, %8u %6s %4u%%] %s\n", grossVMsize, totalNCsize, Target::g_tgtCPUName, - 100 * totalNCsize / grossVMsize, "Total (including GC info)"); + jitprintf("[%7u VM, %8u %6s %4u%%] %s\n", grossVMsize, totalNCsize, Target::g_tgtCPUName, + 100 * totalNCsize / grossVMsize, "Total (including GC info)"); if (gcHeaderISize || gcHeaderNSize) { - fprintf(fout, "\n"); + jitprintf("\n"); - fprintf(fout, "GC tables : [%7uI,%7uN] %7u byt (%u%% of IL, %u%% of %s).\n", - gcHeaderISize + gcPtrMapISize, gcHeaderNSize + gcPtrMapNSize, totalNCsize - grossNCsize, - 100 * (totalNCsize - grossNCsize) / grossVMsize, 100 * (totalNCsize - grossNCsize) / grossNCsize, - Target::g_tgtCPUName); + jitprintf("GC tables : [%7uI,%7uN] %7u byt (%u%% of IL, %u%% of %s).\n", gcHeaderISize + gcPtrMapISize, + gcHeaderNSize + gcPtrMapNSize, totalNCsize - grossNCsize, + 100 * (totalNCsize - grossNCsize) / grossVMsize, 100 * (totalNCsize - grossNCsize) / grossNCsize, + Target::g_tgtCPUName); - fprintf(fout, "GC headers : [%7uI,%7uN] %7u byt, [%4.1fI,%4.1fN] %4.1f byt/meth\n", gcHeaderISize, - gcHeaderNSize, gcHeaderISize + gcHeaderNSize, (float)gcHeaderISize / (genMethodICnt + 0.001), - (float)gcHeaderNSize / (genMethodNCnt + 0.001), - (float)(gcHeaderISize + gcHeaderNSize) / genMethodCnt); + jitprintf("GC headers : [%7uI,%7uN] %7u byt, [%4.1fI,%4.1fN] %4.1f byt/meth\n", gcHeaderISize, + gcHeaderNSize, gcHeaderISize + gcHeaderNSize, (float)gcHeaderISize / (genMethodICnt + 0.001), + (float)gcHeaderNSize / (genMethodNCnt + 0.001), + (float)(gcHeaderISize + gcHeaderNSize) / genMethodCnt); - fprintf(fout, "GC ptr maps : [%7uI,%7uN] %7u byt, [%4.1fI,%4.1fN] %4.1f byt/meth\n", gcPtrMapISize, - gcPtrMapNSize, gcPtrMapISize + gcPtrMapNSize, (float)gcPtrMapISize / (genMethodICnt + 0.001), - (float)gcPtrMapNSize / (genMethodNCnt + 0.001), - (float)(gcPtrMapISize + gcPtrMapNSize) / genMethodCnt); + jitprintf("GC ptr maps : [%7uI,%7uN] %7u byt, [%4.1fI,%4.1fN] %4.1f byt/meth\n", gcPtrMapISize, + gcPtrMapNSize, gcPtrMapISize + gcPtrMapNSize, (float)gcPtrMapISize / (genMethodICnt + 0.001), + (float)gcPtrMapNSize / (genMethodNCnt + 0.001), + (float)(gcPtrMapISize + gcPtrMapNSize) / genMethodCnt); } else { - fprintf(fout, "\n"); + jitprintf("\n"); - fprintf(fout, "GC tables take up %u bytes (%u%% of instr, %u%% of %6s code).\n", - totalNCsize - grossNCsize, 100 * (totalNCsize - grossNCsize) / grossVMsize, - 100 * (totalNCsize - grossNCsize) / grossNCsize, Target::g_tgtCPUName); + jitprintf("GC tables take up %u bytes (%u%% of instr, %u%% of %6s code).\n", totalNCsize - grossNCsize, + 100 * (totalNCsize - grossNCsize) / grossVMsize, 100 * (totalNCsize - grossNCsize) / grossNCsize, + Target::g_tgtCPUName); } #ifdef DEBUG #if DOUBLE_ALIGN - fprintf(fout, "%u out of %u methods generated with double-aligned stack\n", - Compiler::s_lvaDoubleAlignedProcsCount, genMethodCnt); + jitprintf("%u out of %u methods generated with double-aligned stack\n", Compiler::s_lvaDoubleAlignedProcsCount, + genMethodCnt); #endif #endif } @@ -1550,110 +1547,110 @@ void Compiler::compShutdown() #endif // DISPLAY_SIZES #if CALL_ARG_STATS - compDispCallArgStats(fout); + compDispCallArgStats(jitstdout()); #endif #if COUNT_BASIC_BLOCKS - fprintf(fout, "--------------------------------------------------\n"); - fprintf(fout, "Basic block count frequency table:\n"); - fprintf(fout, "--------------------------------------------------\n"); - bbCntTable.dump(fout); - fprintf(fout, "--------------------------------------------------\n"); - - fprintf(fout, "\n"); - - fprintf(fout, "--------------------------------------------------\n"); - fprintf(fout, "IL method size frequency table for methods with a single basic block:\n"); - fprintf(fout, "--------------------------------------------------\n"); - bbOneBBSizeTable.dump(fout); - fprintf(fout, "--------------------------------------------------\n"); - - fprintf(fout, "--------------------------------------------------\n"); - fprintf(fout, "fgComputeDoms `while (change)` iterations:\n"); - fprintf(fout, "--------------------------------------------------\n"); - domsChangedIterationTable.dump(fout); - fprintf(fout, "--------------------------------------------------\n"); - - fprintf(fout, "--------------------------------------------------\n"); - fprintf(fout, "fgComputeReachabilitySets `while (change)` iterations:\n"); - fprintf(fout, "--------------------------------------------------\n"); - computeReachabilitySetsIterationTable.dump(fout); - fprintf(fout, "--------------------------------------------------\n"); - - fprintf(fout, "--------------------------------------------------\n"); - fprintf(fout, "fgComputeReachability `while (change)` iterations:\n"); - fprintf(fout, "--------------------------------------------------\n"); - computeReachabilityIterationTable.dump(fout); - fprintf(fout, "--------------------------------------------------\n"); + jitprintf("--------------------------------------------------\n"); + jitprintf("Basic block count frequency table:\n"); + jitprintf("--------------------------------------------------\n"); + bbCntTable.dump(jitstdout()); + jitprintf("--------------------------------------------------\n"); + + jitprintf("\n"); + + jitprintf("--------------------------------------------------\n"); + jitprintf("IL method size frequency table for methods with a single basic block:\n"); + jitprintf("--------------------------------------------------\n"); + bbOneBBSizeTable.dump(jitstdout()); + jitprintf("--------------------------------------------------\n"); + + jitprintf("--------------------------------------------------\n"); + jitprintf("fgComputeDoms `while (change)` iterations:\n"); + jitprintf("--------------------------------------------------\n"); + domsChangedIterationTable.dump(jitstdout()); + jitprintf("--------------------------------------------------\n"); + + jitprintf("--------------------------------------------------\n"); + jitprintf("fgComputeReachabilitySets `while (change)` iterations:\n"); + jitprintf("--------------------------------------------------\n"); + computeReachabilitySetsIterationTable.dump(jitstdout()); + jitprintf("--------------------------------------------------\n"); + + jitprintf("--------------------------------------------------\n"); + jitprintf("fgComputeReachability `while (change)` iterations:\n"); + jitprintf("--------------------------------------------------\n"); + computeReachabilityIterationTable.dump(jitstdout()); + jitprintf("--------------------------------------------------\n"); #endif // COUNT_BASIC_BLOCKS #if COUNT_LOOPS - fprintf(fout, "\n"); - fprintf(fout, "---------------------------------------------------\n"); - fprintf(fout, "Loop stats\n"); - fprintf(fout, "---------------------------------------------------\n"); - fprintf(fout, "Total number of methods with loops is %5u\n", totalLoopMethods); - fprintf(fout, "Total number of loops is %5u\n", totalLoopCount); - fprintf(fout, "Maximum number of loops per method is %5u\n", maxLoopsPerMethod); - fprintf(fout, "# of methods overflowing nat loop table is %5u\n", totalLoopOverflows); - fprintf(fout, "Total number of 'unnatural' loops is %5u\n", totalUnnatLoopCount); - fprintf(fout, "# of methods overflowing unnat loop limit is %5u\n", totalUnnatLoopOverflows); - fprintf(fout, "Total number of loops with an iterator is %5u\n", iterLoopCount); - fprintf(fout, "Total number of loops with a constant iterator is %5u\n", constIterLoopCount); - - fprintf(fout, "--------------------------------------------------\n"); - fprintf(fout, "Loop count frequency table:\n"); - fprintf(fout, "--------------------------------------------------\n"); - loopCountTable.dump(fout); - fprintf(fout, "--------------------------------------------------\n"); - fprintf(fout, "Loop exit count frequency table:\n"); - fprintf(fout, "--------------------------------------------------\n"); - loopExitCountTable.dump(fout); - fprintf(fout, "--------------------------------------------------\n"); + jitprintf("\n"); + jitprintf("---------------------------------------------------\n"); + jitprintf("Loop stats\n"); + jitprintf("---------------------------------------------------\n"); + jitprintf("Total number of methods with loops is %5u\n", totalLoopMethods); + jitprintf("Total number of loops is %5u\n", totalLoopCount); + jitprintf("Maximum number of loops per method is %5u\n", maxLoopsPerMethod); + jitprintf("# of methods overflowing nat loop table is %5u\n", totalLoopOverflows); + jitprintf("Total number of 'unnatural' loops is %5u\n", totalUnnatLoopCount); + jitprintf("# of methods overflowing unnat loop limit is %5u\n", totalUnnatLoopOverflows); + jitprintf("Total number of loops with an iterator is %5u\n", iterLoopCount); + jitprintf("Total number of loops with a constant iterator is %5u\n", constIterLoopCount); + + jitprintf("--------------------------------------------------\n"); + jitprintf("Loop count frequency table:\n"); + jitprintf("--------------------------------------------------\n"); + loopCountTable.dump(jitstdout()); + jitprintf("--------------------------------------------------\n"); + jitprintf("Loop exit count frequency table:\n"); + jitprintf("--------------------------------------------------\n"); + loopExitCountTable.dump(jitstdout()); + jitprintf("--------------------------------------------------\n"); #endif // COUNT_LOOPS #if MEASURE_NODE_SIZE - fprintf(fout, "\n"); - fprintf(fout, "---------------------------------------------------\n"); - fprintf(fout, "GenTree node allocation stats\n"); - fprintf(fout, "---------------------------------------------------\n"); + jitprintf("\n"); + jitprintf("---------------------------------------------------\n"); + jitprintf("GenTree node allocation stats\n"); + jitprintf("---------------------------------------------------\n"); - fprintf(fout, "Allocated %6I64u tree nodes (%7I64u bytes total, avg %4I64u bytes per method)\n", - genNodeSizeStats.genTreeNodeCnt, genNodeSizeStats.genTreeNodeSize, - genNodeSizeStats.genTreeNodeSize / genMethodCnt); + jitprintf("Allocated %6I64u tree nodes (%7I64u bytes total, avg %4I64u bytes per method)\n", + genNodeSizeStats.genTreeNodeCnt, genNodeSizeStats.genTreeNodeSize, + genNodeSizeStats.genTreeNodeSize / genMethodCnt); - fprintf(fout, "Allocated %7I64u bytes of unused tree node space (%3.2f%%)\n", - genNodeSizeStats.genTreeNodeSize - genNodeSizeStats.genTreeNodeActualSize, - (float)(100 * (genNodeSizeStats.genTreeNodeSize - genNodeSizeStats.genTreeNodeActualSize)) / - genNodeSizeStats.genTreeNodeSize); + jitprintf("Allocated %7I64u bytes of unused tree node space (%3.2f%%)\n", + genNodeSizeStats.genTreeNodeSize - genNodeSizeStats.genTreeNodeActualSize, + (float)(100 * (genNodeSizeStats.genTreeNodeSize - genNodeSizeStats.genTreeNodeActualSize)) / + genNodeSizeStats.genTreeNodeSize); - fprintf(fout, "\n"); - fprintf(fout, "---------------------------------------------------\n"); - fprintf(fout, "Distribution of per-method GenTree node counts:\n"); - genTreeNcntHist.dump(fout); + jitprintf("\n"); + jitprintf("---------------------------------------------------\n"); + jitprintf("Distribution of per-method GenTree node counts:\n"); + genTreeNcntHist.dump(jitstdout()); - fprintf(fout, "\n"); - fprintf(fout, "---------------------------------------------------\n"); - fprintf(fout, "Distribution of per-method GenTree node allocations (in bytes):\n"); - genTreeNsizHist.dump(fout); + jitprintf("\n"); + jitprintf("---------------------------------------------------\n"); + jitprintf("Distribution of per-method GenTree node allocations (in bytes):\n"); + genTreeNsizHist.dump(jitstdout()); #endif // MEASURE_NODE_SIZE #if MEASURE_BLOCK_SIZE - fprintf(fout, "\n"); - fprintf(fout, "---------------------------------------------------\n"); - fprintf(fout, "BasicBlock and FlowEdge/BasicBlockList allocation stats\n"); - fprintf(fout, "---------------------------------------------------\n"); + jitprintf("\n"); + jitprintf("---------------------------------------------------\n"); + jitprintf("BasicBlock and FlowEdge/BasicBlockList allocation stats\n"); + jitprintf("---------------------------------------------------\n"); - fprintf(fout, "Allocated %6u basic blocks (%7u bytes total, avg %4u bytes per method)\n", BasicBlock::s_Count, - BasicBlock::s_Size, BasicBlock::s_Size / genMethodCnt); - fprintf(fout, "Allocated %6u flow nodes (%7u bytes total, avg %4u bytes per method)\n", genFlowNodeCnt, - genFlowNodeSize, genFlowNodeSize / genMethodCnt); + jitprintf("Allocated %6u basic blocks (%7u bytes total, avg %4u bytes per method)\n", BasicBlock::s_Count, + BasicBlock::s_Size, BasicBlock::s_Size / genMethodCnt); + jitprintf("Allocated %6u flow nodes (%7u bytes total, avg %4u bytes per method)\n", genFlowNodeCnt, genFlowNodeSize, + genFlowNodeSize / genMethodCnt); #endif // MEASURE_BLOCK_SIZE @@ -1661,21 +1658,21 @@ void Compiler::compShutdown() if (s_dspMemStats) { - fprintf(fout, "\nAll allocations:\n"); - ArenaAllocator::dumpAggregateMemStats(jitstdout); + jitprintf("\nAll allocations:\n"); + ArenaAllocator::dumpAggregateMemStats(jitstdout()); - fprintf(fout, "\nLargest method:\n"); - ArenaAllocator::dumpMaxMemStats(jitstdout); + jitprintf("\nLargest method:\n"); + ArenaAllocator::dumpMaxMemStats(jitstdout()); - fprintf(fout, "\n"); - fprintf(fout, "---------------------------------------------------\n"); - fprintf(fout, "Distribution of total memory allocated per method (in KB):\n"); - memAllocHist.dump(fout); + jitprintf("\n"); + jitprintf("---------------------------------------------------\n"); + jitprintf("Distribution of total memory allocated per method (in KB):\n"); + memAllocHist.dump(jitstdout()); - fprintf(fout, "\n"); - fprintf(fout, "---------------------------------------------------\n"); - fprintf(fout, "Distribution of total memory used per method (in KB):\n"); - memUsedHist.dump(fout); + jitprintf("\n"); + jitprintf("---------------------------------------------------\n"); + jitprintf("Distribution of total memory used per method (in KB):\n"); + memUsedHist.dump(jitstdout()); } #endif // MEASURE_MEM_ALLOC @@ -1685,29 +1682,29 @@ void Compiler::compShutdown() if (JitConfig.DisplayLoopHoistStats() != 0) #endif // DEBUG { - PrintAggregateLoopHoistStats(jitstdout); + PrintAggregateLoopHoistStats(jitstdout()); } #endif // LOOP_HOIST_STATS #if TRACK_ENREG_STATS if (JitConfig.JitEnregStats() != 0) { - s_enregisterStats.Dump(fout); + s_enregisterStats.Dump(jitstdout()); } #endif // TRACK_ENREG_STATS #if MEASURE_PTRTAB_SIZE - fprintf(fout, "\n"); - fprintf(fout, "---------------------------------------------------\n"); - fprintf(fout, "GC pointer table stats\n"); - fprintf(fout, "---------------------------------------------------\n"); + jitprintf("\n"); + jitprintf("---------------------------------------------------\n"); + jitprintf("GC pointer table stats\n"); + jitprintf("---------------------------------------------------\n"); - fprintf(fout, "Reg pointer descriptor size (internal): %8u (avg %4u per method)\n", GCInfo::s_gcRegPtrDscSize, - GCInfo::s_gcRegPtrDscSize / genMethodCnt); + jitprintf("Reg pointer descriptor size (internal): %8u (avg %4u per method)\n", GCInfo::s_gcRegPtrDscSize, + GCInfo::s_gcRegPtrDscSize / genMethodCnt); - fprintf(fout, "Total pointer table size: %8u (avg %4u per method)\n", GCInfo::s_gcTotalPtrTabSize, - GCInfo::s_gcTotalPtrTabSize / genMethodCnt); + jitprintf("Total pointer table size: %8u (avg %4u per method)\n", GCInfo::s_gcTotalPtrTabSize, + GCInfo::s_gcTotalPtrTabSize / genMethodCnt); #endif // MEASURE_PTRTAB_SIZE @@ -1715,37 +1712,37 @@ void Compiler::compShutdown() if (genMethodCnt != 0) { - fprintf(fout, "\n"); - fprintf(fout, "A total of %6u methods compiled", genMethodCnt); + jitprintf("\n"); + jitprintf("A total of %6u methods compiled", genMethodCnt); #if DISPLAY_SIZES if (genMethodICnt || genMethodNCnt) { - fprintf(fout, " (%u interruptible, %u non-interruptible)", genMethodICnt, genMethodNCnt); + jitprintf(" (%u interruptible, %u non-interruptible)", genMethodICnt, genMethodNCnt); } #endif // DISPLAY_SIZES - fprintf(fout, ".\n"); + jitprintf(".\n"); } #endif // MEASURE_NODE_SIZE || MEASURE_BLOCK_SIZE || MEASURE_PTRTAB_SIZE || DISPLAY_SIZES #if EMITTER_STATS - emitterStats(fout); + emitterStats(jitstdout()); #endif #if MEASURE_FATAL - fprintf(fout, "\n"); - fprintf(fout, "---------------------------------------------------\n"); - fprintf(fout, "Fatal errors stats\n"); - fprintf(fout, "---------------------------------------------------\n"); - fprintf(fout, " badCode: %u\n", fatal_badCode); - fprintf(fout, " noWay: %u\n", fatal_noWay); - fprintf(fout, " implLimitation: %u\n", fatal_implLimitation); - fprintf(fout, " NOMEM: %u\n", fatal_NOMEM); - fprintf(fout, " noWayAssertBody: %u\n", fatal_noWayAssertBody); + jitprintf("\n"); + jitprintf("---------------------------------------------------\n"); + jitprintf("Fatal errors stats\n"); + jitprintf("---------------------------------------------------\n"); + jitprintf(" badCode: %u\n", fatal_badCode); + jitprintf(" noWay: %u\n", fatal_noWay); + jitprintf(" implLimitation: %u\n", fatal_implLimitation); + jitprintf(" NOMEM: %u\n", fatal_NOMEM); + jitprintf(" noWayAssertBody: %u\n", fatal_noWayAssertBody); #ifdef DEBUG - fprintf(fout, " noWayAssertBodyArgs: %u\n", fatal_noWayAssertBodyArgs); + jitprintf(" noWayAssertBodyArgs: %u\n", fatal_noWayAssertBodyArgs); #endif // DEBUG - fprintf(fout, " NYI: %u\n", fatal_NYI); + jitprintf(" NYI: %u\n", fatal_NYI); #endif // MEASURE_FATAL } @@ -1754,14 +1751,14 @@ void Compiler::compShutdown() */ /* static */ -void Compiler::compDisplayStaticSizes(FILE* fout) +void Compiler::compDisplayStaticSizes() { #if MEASURE_NODE_SIZE - GenTree::DumpNodeSizes(fout); + GenTree::DumpNodeSizes(); #endif #if EMITTER_STATS - emitterStaticStats(fout); + emitterStaticStats(); #endif } @@ -1854,19 +1851,6 @@ void Compiler::compInit(ArenaAllocator* pAlloc, activePhaseChecks = PhaseChecks::CHECK_NONE; activePhaseDumps = PhaseDumps::DUMP_ALL; -#ifdef FEATURE_TRACELOGGING - // Make sure JIT telemetry is initialized as soon as allocations can be made - // but no later than a point where noway_asserts can be thrown. - // 1. JIT telemetry could allocate some objects internally. - // 2. NowayAsserts are tracked through telemetry. - // Note: JIT telemetry could gather data when compiler is not fully initialized. - // So you have to initialize the compiler variables you use for telemetry. - assert((unsigned)PHASE_PRE_IMPORT == 0); - info.compILCodeSize = 0; - info.compMethodHnd = nullptr; - compJitTelemetry.Initialize(this); -#endif - fgInit(); lvaInit(); optInit(); @@ -2368,16 +2352,8 @@ void DummyProfilerELTStub(UINT_PTR ProfilerHandle) #endif // PROFILING_SUPPORTED -bool Compiler::compShouldThrowOnNoway( -#ifdef FEATURE_TRACELOGGING - const char* filename, unsigned line -#endif - ) +bool Compiler::compShouldThrowOnNoway() { -#ifdef FEATURE_TRACELOGGING - compJitTelemetry.NotifyNowayAssert(filename, line); -#endif - // In min opts, we don't want the noway assert to go through the exception // path. Instead we want it to just silently go through codegen for // compat reasons. @@ -2434,12 +2410,6 @@ void Compiler::compInitOptions(JitFlags* jitFlags) { opts.compFlags = CLFLG_MINOPT; } - // Don't optimize .cctors (except prejit) or if we're an inlinee - else if (!jitFlags->IsSet(JitFlags::JIT_FLAG_PREJIT) && ((info.compFlags & FLG_CCTOR) == FLG_CCTOR) && - !compIsForInlining()) - { - opts.compFlags = CLFLG_MINOPT; - } // Default value is to generate a blend of size and speed optimizations // @@ -2579,7 +2549,7 @@ void Compiler::compInitOptions(JitFlags* jitFlags) pfAltJit = &JitConfig.AltJit(); } - if (opts.jitFlags->IsSet(JitFlags::JIT_FLAG_ALT_JIT)) + if (jitFlags->IsSet(JitFlags::JIT_FLAG_ALT_JIT)) { if (pfAltJit->contains(info.compMethodHnd, info.compClassHnd, &info.compMethodInfo->args)) { @@ -2605,7 +2575,7 @@ void Compiler::compInitOptions(JitFlags* jitFlags) altJitVal = JitConfig.AltJit().list(); } - if (opts.jitFlags->IsSet(JitFlags::JIT_FLAG_ALT_JIT)) + if (jitFlags->IsSet(JitFlags::JIT_FLAG_ALT_JIT)) { // In release mode, you either get all methods or no methods. You must use "*" as the parameter, or we ignore // it. You don't get to give a regular expression of methods to match. @@ -5081,6 +5051,10 @@ void Compiler::compCompile(void** methodCodePtr, uint32_t* methodCodeSize, JitFl // Optimize block order // DoPhase(this, PHASE_OPTIMIZE_LAYOUT, &Compiler::optOptimizeLayout); + + // Conditional to Switch conversion + // + DoPhase(this, PHASE_SWITCH_RECOGNITION, &Compiler::optSwitchRecognition); } // Determine start of cold region if we are hot/cold splitting @@ -5177,7 +5151,7 @@ void Compiler::compCompile(void** methodCodePtr, uint32_t* methodCodeSize, JitFl #if TRACK_LSRA_STATS if (JitConfig.DisplayLsraStats() == 2) { - m_pLinearScan->dumpLsraStatsCsv(jitstdout); + m_pLinearScan->dumpLsraStatsCsv(jitstdout()); } #endif // TRACK_LSRA_STATS @@ -5202,10 +5176,6 @@ void Compiler::compCompile(void** methodCodePtr, uint32_t* methodCodeSize, JitFl RecordStateAtEndOfCompilation(); -#ifdef FEATURE_TRACELOGGING - compJitTelemetry.NotifyEndOfCompilation(); -#endif - unsigned methodsCompiled = (unsigned)InterlockedIncrement((LONG*)&Compiler::jitTotalMethodCompiled); if (JitConfig.JitDisasmSummary() && !compIsForInlining()) @@ -5282,6 +5252,13 @@ PhaseStatus Compiler::placeLoopAlignInstructions() weight_t minBlockSoFar = BB_MAX_WEIGHT; BasicBlock* bbHavingAlign = nullptr; BasicBlock::loopNumber currentAlignedLoopNum = BasicBlock::NOT_IN_LOOP; + bool visitedLoopNum[BasicBlock::MAX_LOOP_NUM]; + memset(visitedLoopNum, false, sizeof(visitedLoopNum)); + +#ifdef DEBUG + unsigned visitedBlockForLoopNum[BasicBlock::MAX_LOOP_NUM]; + memset(visitedBlockForLoopNum, 0, sizeof(visitedBlockForLoopNum)); +#endif if ((fgFirstBB != nullptr) && fgFirstBB->isLoopAlign()) { @@ -5304,7 +5281,7 @@ PhaseStatus Compiler::placeLoopAlignInstructions() } } - // If there is a unconditional jump (which is not part of callf/always pair) + // If there is an unconditional jump (which is not part of callf/always pair) if (opts.compJitHideAlignBehindJmp && (block->bbJumpKind == BBJ_ALWAYS) && !block->isBBCallAlwaysPairTail()) { // Track the lower weight blocks @@ -5358,12 +5335,19 @@ PhaseStatus Compiler::placeLoopAlignInstructions() madeChanges = true; unmarkedLoopAlign = true; } - else if ((block->bbNatLoopNum != BasicBlock::NOT_IN_LOOP) && (block->bbNatLoopNum == loopTop->bbNatLoopNum)) + else if ((loopTop->bbNatLoopNum != BasicBlock::NOT_IN_LOOP) && visitedLoopNum[loopTop->bbNatLoopNum]) { +#ifdef DEBUG + char buffer[100]; + sprintf_s(buffer, 100, "loop block " FMT_BB " appears before top of loop", + visitedBlockForLoopNum[loopTop->bbNatLoopNum]); +#endif + // In some odd cases we may see blocks within the loop before we see the // top block of the loop. Just bail on aligning such loops. // - loopTop->unmarkLoopAlign(this DEBUG_ARG("loop block appears before top of loop")); + + loopTop->unmarkLoopAlign(this DEBUG_ARG(buffer)); madeChanges = true; unmarkedLoopAlign = true; } @@ -5398,6 +5382,20 @@ PhaseStatus Compiler::placeLoopAlignInstructions() break; } } + + if (block->bbNatLoopNum != BasicBlock::NOT_IN_LOOP) + { +#ifdef DEBUG + if (!visitedLoopNum[block->bbNatLoopNum]) + { + // Record the first block for which bbNatLoopNum was seen for + // debugging purpose. + visitedBlockForLoopNum[block->bbNatLoopNum] = block->bbNum; + } +#endif + // If this block is part of loop, mark the loopNum as visited. + visitedLoopNum[block->bbNatLoopNum] = true; + } } assert(loopsToProcess == 0); @@ -5879,7 +5877,7 @@ int Compiler::compCompile(CORINFO_MODULE_HANDLE classPtr, } #endif // FUNC_INFO_LOGGING - // if (s_compMethodsCount==0) setvbuf(jitstdout, NULL, _IONBF, 0); + // if (s_compMethodsCount==0) setvbuf(jitstdout(), NULL, _IONBF, 0); if (compIsForInlining()) { @@ -6363,7 +6361,7 @@ void Compiler::compCompileFinish() if (s_dspMemStats || verbose) { printf("\nAllocations for %s (MethodHash=%08x)\n", info.compFullName, info.compMethodHash()); - compArenaAllocator->dumpMemStats(jitstdout); + compArenaAllocator->dumpMemStats(jitstdout()); } #endif // DEBUG #endif // MEASURE_MEM_ALLOC @@ -8292,7 +8290,7 @@ double JitTimer::s_cyclesPerSec = CachedCyclesPerSecond(); #endif #endif // FEATURE_JIT_METHOD_PERF -#if defined(FEATURE_JIT_METHOD_PERF) || DUMP_FLOWGRAPHS || defined(FEATURE_TRACELOGGING) +#if defined(FEATURE_JIT_METHOD_PERF) || DUMP_FLOWGRAPHS const char* PhaseNames[] = { #define CompPhaseNameMacro(enum_nm, string_nm, hasChildren, parent, measureIR) string_nm, #include "compphases.h" diff --git a/src/coreclr/jit/compiler.h b/src/coreclr/jit/compiler.h index d45284fc463b52..7d407d9643b41e 100644 --- a/src/coreclr/jit/compiler.h +++ b/src/coreclr/jit/compiler.h @@ -42,7 +42,6 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX #include "jitexpandarray.h" #include "tinyarray.h" #include "valuenum.h" -#include "jittelemetry.h" #include "namedintrinsiclist.h" #ifdef LATE_DISASM #include "disasm.h" @@ -558,7 +557,6 @@ class LclVarDsc unsigned char lvIsSplit : 1; // Set if the argument is splited. #endif // defined(TARGET_RISCV64) - unsigned char lvIsBoolean : 1; // set if variable is boolean unsigned char lvSingleDef : 1; // variable has a single def. Used to identify ref type locals that can get type // updates @@ -4908,7 +4906,7 @@ class Compiler void fgPerNodeLocalVarLiveness(GenTreeHWIntrinsic* hwintrinsic); #endif // FEATURE_HW_INTRINSICS - void fgAddHandlerLiveVars(BasicBlock* block, VARSET_TP& ehHandlerLiveVars); + void fgAddHandlerLiveVars(BasicBlock* block, VARSET_TP& ehHandlerLiveVars, MemoryKindSet& memoryLiveness); void fgLiveVarAnalysis(bool updateInternalOnly = false); @@ -5489,6 +5487,8 @@ class Compiler bool fgCreateLoopPreHeader(unsigned lnum); + void fgSetEHRegionForNewLoopHead(BasicBlock* newHead, BasicBlock* top); + void fgUnreachableBlock(BasicBlock* block); void fgRemoveConditionalJump(BasicBlock* block); @@ -6325,8 +6325,10 @@ class Compiler public: PhaseStatus optOptimizeBools(); + PhaseStatus optSwitchRecognition(); + bool optSwitchConvert(BasicBlock* firstBlock, int testsCount, ssize_t* testValues, GenTree* nodeToTest); + bool optSwitchDetectAndConvert(BasicBlock* firstBlock); -public: PhaseStatus optInvertLoops(); // Invert loops so they're entered at top and tested at bottom. PhaseStatus optOptimizeFlow(); // Simplify flow graph and do tail duplication PhaseStatus optOptimizeLayout(); // Optimize the BasicBlock layout of the method @@ -10349,7 +10351,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX InlineInfo* inlineInfo); void compDone(); - static void compDisplayStaticSizes(FILE* fout); + static void compDisplayStaticSizes(); //------------ Some utility functions -------------- @@ -10801,22 +10803,8 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX void RecordNowayAssert(const char* filename, unsigned line, const char* condStr); #endif // MEASURE_NOWAY -#ifndef FEATURE_TRACELOGGING // Should we actually fire the noway assert body and the exception handler? bool compShouldThrowOnNoway(); -#else // FEATURE_TRACELOGGING - // Should we actually fire the noway assert body and the exception handler? - bool compShouldThrowOnNoway(const char* filename, unsigned line); - - // Telemetry instance to use per method compilation. - JitTelemetry compJitTelemetry; - - // Get common parameters that have to be logged with most telemetry data. - void compGetTelemetryDefaults(const char** assemblyName, - const char** scopeName, - const char** methodName, - unsigned* methodHash); -#endif // !FEATURE_TRACELOGGING #ifdef DEBUG private: diff --git a/src/coreclr/jit/compiler.hpp b/src/coreclr/jit/compiler.hpp index 82a13b3013baba..24c009c88607c0 100644 --- a/src/coreclr/jit/compiler.hpp +++ b/src/coreclr/jit/compiler.hpp @@ -651,6 +651,95 @@ BasicBlockVisit BasicBlock::VisitAllSuccs(Compiler* comp, TFunc func) return BasicBlockVisit::Continue; } +//------------------------------------------------------------------------------ +// VisitRegularSuccs: Visit regular successors of this block. +// +// Arguments: +// comp - Compiler instance +// func - Callback +// +// Returns: +// Whether or not the visiting was aborted. +// +template +BasicBlockVisit BasicBlock::VisitRegularSuccs(Compiler* comp, TFunc func) +{ + switch (bbJumpKind) + { + case BBJ_EHFILTERRET: + RETURN_ON_ABORT(func(bbJumpDest)); + break; + + case BBJ_EHFINALLYRET: + { + EHblkDsc* ehDsc = comp->ehGetDsc(getHndIndex()); + assert(ehDsc->HasFinallyHandler()); + + BasicBlock* begBlk; + BasicBlock* endBlk; + comp->ehGetCallFinallyBlockRange(getHndIndex(), &begBlk, &endBlk); + + BasicBlock* finBeg = ehDsc->ebdHndBeg; + + for (BasicBlock* bcall = begBlk; bcall != endBlk; bcall = bcall->bbNext) + { + if ((bcall->bbJumpKind != BBJ_CALLFINALLY) || (bcall->bbJumpDest != finBeg)) + { + continue; + } + + assert(bcall->isBBCallAlwaysPair()); + + RETURN_ON_ABORT(func(bcall->bbNext)); + } + + break; + } + + case BBJ_CALLFINALLY: + case BBJ_EHCATCHRET: + case BBJ_LEAVE: + case BBJ_ALWAYS: + RETURN_ON_ABORT(func(bbJumpDest)); + break; + + case BBJ_NONE: + RETURN_ON_ABORT(func(bbNext)); + break; + + case BBJ_COND: + RETURN_ON_ABORT(func(bbNext)); + + if (bbJumpDest != bbNext) + { + RETURN_ON_ABORT(func(bbJumpDest)); + } + + break; + + case BBJ_SWITCH: + { + Compiler::SwitchUniqueSuccSet sd = comp->GetDescriptorForSwitch(this); + for (unsigned i = 0; i < sd.numDistinctSuccs; i++) + { + RETURN_ON_ABORT(func(sd.nonDuplicates[i])); + } + + break; + } + + case BBJ_THROW: + case BBJ_RETURN: + case BBJ_EHFAULTRET: + break; + + default: + unreached(); + } + + return BasicBlockVisit::Continue; +} + #undef RETURN_ON_ABORT //------------------------------------------------------------------------------ diff --git a/src/coreclr/jit/compphases.h b/src/coreclr/jit/compphases.h index 9ee73c7d69ad6f..36eb647f04eba1 100644 --- a/src/coreclr/jit/compphases.h +++ b/src/coreclr/jit/compphases.h @@ -72,6 +72,7 @@ CompPhaseNameMacro(PHASE_MORPH_MDARR, "Morph array ops", 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_BOOLS, "Optimize bools", false, -1, false) +CompPhaseNameMacro(PHASE_SWITCH_RECOGNITION, "Recognize Switch", 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) diff --git a/src/coreclr/jit/disasm.cpp b/src/coreclr/jit/disasm.cpp index e1926a3f640b7b..fd5c98eb068810 100644 --- a/src/coreclr/jit/disasm.cpp +++ b/src/coreclr/jit/disasm.cpp @@ -1478,12 +1478,12 @@ void DisAssembler::disAsmCode(BYTE* hotCodePtr, size_t hotCodeSize, BYTE* coldCo } #else // !DEBUG // NOTE: non-DEBUG builds always use jitstdout currently! - disAsmFile = jitstdout; + disAsmFile = jitstdout(); #endif // !DEBUG if (disAsmFile == nullptr) { - disAsmFile = jitstdout; + disAsmFile = jitstdout(); } // As this writes to a common file, this is not reentrant. @@ -1519,7 +1519,7 @@ void DisAssembler::disAsmCode(BYTE* hotCodePtr, size_t hotCodeSize, BYTE* coldCo DisasmBuffer(disAsmFile, /* printIt */ true); fprintf(disAsmFile, "\n"); - if (disAsmFile != jitstdout) + if (disAsmFile != jitstdout()) { fclose(disAsmFile); } diff --git a/src/coreclr/jit/ee_il_dll.cpp b/src/coreclr/jit/ee_il_dll.cpp index bcf7c7be401c21..11c7f77ecc4a27 100644 --- a/src/coreclr/jit/ee_il_dll.cpp +++ b/src/coreclr/jit/ee_il_dll.cpp @@ -31,8 +31,6 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX /*****************************************************************************/ -FILE* jitstdout = nullptr; - ICorJitHost* g_jitHost = nullptr; bool g_jitInitialized = false; @@ -71,16 +69,25 @@ extern "C" DLLEXPORT void jitStartup(ICorJitHost* jitHost) assert(!JitConfig.isInitialized()); JitConfig.initialize(jitHost); + Compiler::compStartup(); + g_jitInitialized = true; +} + +static FILE* volatile s_jitstdout; + +static FILE* jitstdoutInit() +{ const WCHAR* jitStdOutFile = JitConfig.JitStdOutFile(); + FILE* file = nullptr; if (jitStdOutFile != nullptr) { - jitstdout = _wfopen(jitStdOutFile, W("a")); - assert(jitstdout != nullptr); + file = _wfopen(jitStdOutFile, W("a")); + assert(file != nullptr); } #if !defined(HOST_UNIX) - if (jitstdout == nullptr) + if (file == nullptr) { int stdoutFd = _fileno(procstdout()); // Check fileno error output(s) -1 may overlap with errno result @@ -89,46 +96,61 @@ extern "C" DLLEXPORT void jitStartup(ICorJitHost* jitHost) // or bogus and avoid making further calls. if ((stdoutFd != -1) && (stdoutFd != -2) && (errno != EINVAL)) { - int jitstdoutFd = _dup(_fileno(procstdout())); + int jitstdoutFd = _dup(stdoutFd); // Check the error status returned by dup. if (jitstdoutFd != -1) { _setmode(jitstdoutFd, _O_TEXT); - jitstdout = _fdopen(jitstdoutFd, "w"); - assert(jitstdout != nullptr); + file = _fdopen(jitstdoutFd, "w"); + assert(file != nullptr); // Prevent the FILE* from buffering its output in order to avoid calls to // `fflush()` throughout the code. - setvbuf(jitstdout, nullptr, _IONBF, 0); + setvbuf(file, nullptr, _IONBF, 0); } } } #endif // !HOST_UNIX - // If jitstdout is still null, fallback to whatever procstdout() was - // initially set to. - if (jitstdout == nullptr) + if (file == nullptr) { - jitstdout = procstdout(); + file = procstdout(); } -#ifdef FEATURE_TRACELOGGING - JitTelemetry::NotifyDllProcessAttach(); -#endif - Compiler::compStartup(); + FILE* observed = InterlockedCompareExchangeT(&s_jitstdout, file, nullptr); - g_jitInitialized = true; + if (observed != nullptr) + { + if (file != procstdout()) + { + fclose(file); + } + + return observed; + } + + return file; +} + +FILE* jitstdout() +{ + FILE* file = s_jitstdout; + if (file != nullptr) + { + return file; + } + + return jitstdoutInit(); } -#ifndef DEBUG +// Like printf/logf, but only outputs to jitstdout -- skips call back into EE. void jitprintf(const char* fmt, ...) { va_list vl; va_start(vl, fmt); - vfprintf(jitstdout, fmt, vl); + vfprintf(jitstdout(), fmt, vl); va_end(vl); } -#endif void jitShutdown(bool processIsTerminating) { @@ -139,21 +161,18 @@ void jitShutdown(bool processIsTerminating) Compiler::compShutdown(); - if (jitstdout != procstdout()) + FILE* file = s_jitstdout; + if ((file != nullptr) && (file != procstdout())) { // When the process is terminating, the fclose call is unnecessary and is also prone to // crashing since the UCRT itself often frees the backing memory earlier on in the // termination sequence. if (!processIsTerminating) { - fclose(jitstdout); + fclose(file); } } -#ifdef FEATURE_TRACELOGGING - JitTelemetry::NotifyDllProcessDetach(); -#endif - g_jitInitialized = false; } diff --git a/src/coreclr/jit/ee_il_dll.hpp b/src/coreclr/jit/ee_il_dll.hpp index 0f8191078918f0..c3801d88292f5f 100644 --- a/src/coreclr/jit/ee_il_dll.hpp +++ b/src/coreclr/jit/ee_il_dll.hpp @@ -174,7 +174,7 @@ inline var_types JITtype2varType(CorInfoType type) // see the definition of enum CorInfoType in file inc/corinfo.h TYP_UNDEF, // CORINFO_TYPE_UNDEF = 0x0, TYP_VOID, // CORINFO_TYPE_VOID = 0x1, - TYP_BOOL, // CORINFO_TYPE_BOOL = 0x2, + TYP_UBYTE, // CORINFO_TYPE_BOOL = 0x2, TYP_USHORT, // CORINFO_TYPE_CHAR = 0x3, TYP_BYTE, // CORINFO_TYPE_BYTE = 0x4, TYP_UBYTE, // CORINFO_TYPE_UBYTE = 0x5, @@ -235,7 +235,7 @@ inline var_types JitType2PreciseVarType(CorInfoType type) // see the definition of enum CorInfoType in file inc/corinfo.h TYP_UNDEF, // CORINFO_TYPE_UNDEF = 0x0, TYP_VOID, // CORINFO_TYPE_VOID = 0x1, - TYP_BOOL, // CORINFO_TYPE_BOOL = 0x2, + TYP_UBYTE, // CORINFO_TYPE_BOOL = 0x2, TYP_USHORT, // CORINFO_TYPE_CHAR = 0x3, TYP_BYTE, // CORINFO_TYPE_BYTE = 0x4, TYP_UBYTE, // CORINFO_TYPE_UBYTE = 0x5, diff --git a/src/coreclr/jit/emit.cpp b/src/coreclr/jit/emit.cpp index c85724f9240b98..61c118eacc810b 100644 --- a/src/coreclr/jit/emit.cpp +++ b/src/coreclr/jit/emit.cpp @@ -215,7 +215,7 @@ unsigned emitter::emitInt32CnsCnt; unsigned emitter::emitNegCnsCnt; unsigned emitter::emitPow2CnsCnt; -void emitterStaticStats(FILE* fout) +void emitterStaticStats() { // The IG buffer size depends on whether we are storing a debug info pointer or not. For our purposes // here, do not include that. @@ -227,6 +227,8 @@ void emitterStaticStats(FILE* fout) insGroup* igDummy = nullptr; + FILE* fout = jitstdout(); + fprintf(fout, "\n"); fprintf(fout, "insGroup:\n"); fprintf(fout, "Offset / size of igNext = %3zu / %2zu\n", offsetof(insGroup, igNext), @@ -3143,7 +3145,7 @@ void emitter::emitSplit(emitLocation* startLoc, } // end for loop splitIfNecessary(); - assert(curSize < maxSplitSize); + assert(curSize < UW_MAX_FRAGMENT_SIZE_BYTES); } /***************************************************************************** @@ -7560,7 +7562,7 @@ unsigned emitter::emitEndCodeGen(Compiler* comp, assert(!jmp->idAddr()->iiaHasInstrCount()); emitOutputLJ(NULL, adr, jmp); #elif defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64) - // For LoongArch64 and Riscv64 `emitFwdJumps` is always false. + // For LoongArch64 and RiscV64 `emitFwdJumps` is always false. unreached(); #else #error Unsupported or unset target architecture @@ -7576,7 +7578,7 @@ unsigned emitter::emitEndCodeGen(Compiler* comp, assert(!jmp->idAddr()->iiaHasInstrCount()); emitOutputLJ(NULL, adr, jmp); #elif defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64) - // For LoongArch64 and Riscv64 `emitFwdJumps` is always false. + // For LoongArch64 and RiscV64 `emitFwdJumps` is always false. unreached(); #else #error Unsupported or unset target architecture diff --git a/src/coreclr/jit/emit.h b/src/coreclr/jit/emit.h index 5bb32461a9363f..94ded1df85fcdf 100644 --- a/src/coreclr/jit/emit.h +++ b/src/coreclr/jit/emit.h @@ -628,8 +628,8 @@ class emitter #define MAX_ENCODED_SIZE 15 #elif defined(TARGET_ARM64) #define INSTR_ENCODED_SIZE 4 - static_assert_no_msg(INS_count <= 512); - instruction _idIns : 9; + static_assert_no_msg(INS_count <= 1024); + instruction _idIns : 10; #elif defined(TARGET_LOONGARCH64) // TODO-LoongArch64: not include SIMD-vector. static_assert_no_msg(INS_count <= 512); @@ -712,7 +712,7 @@ class emitter // x86: 17 bits // amd64: 17 bits // arm: 16 bits - // arm64: 17 bits + // arm64: 18 bits // loongarch64: 14 bits // risc-v: 14 bits @@ -754,7 +754,7 @@ class emitter // x86: 38 bits // amd64: 38 bits // arm: 32 bits - // arm64: 31 bits + // arm64: 32 bits // loongarch64: 28 bits // risc-v: 28 bits @@ -763,10 +763,12 @@ class emitter unsigned _idLargeDsp : 1; // does a large displacement follow? unsigned _idLargeCall : 1; // large call descriptor used - unsigned _idBound : 1; // jump target / frame offset bound + unsigned _idBound : 1; // jump target / frame offset bound +#ifndef TARGET_ARMARCH unsigned _idCallRegPtr : 1; // IL indirect calls: addr in reg - unsigned _idCallAddr : 1; // IL indirect calls: can make a direct call to iiaAddr - unsigned _idNoGC : 1; // Some helpers don't get recorded in GC tables +#endif + unsigned _idCallAddr : 1; // IL indirect calls: can make a direct call to iiaAddr + unsigned _idNoGC : 1; // Some helpers don't get recorded in GC tables #if defined(TARGET_XARCH) unsigned _idEvexbContext : 1; // does EVEX.b need to be set. #endif // TARGET_XARCH @@ -1509,6 +1511,7 @@ class emitter _idBound = 1; } +#ifndef TARGET_ARMARCH bool idIsCallRegPtr() const { return _idCallRegPtr != 0; @@ -1517,6 +1520,7 @@ class emitter { _idCallRegPtr = 1; } +#endif // Only call instructions that call helper functions may be marked as "IsNoGC", indicating // that a thread executing such a call cannot be stopped for GC. Thus, in partially-interruptible @@ -3926,6 +3930,19 @@ emitAttr emitter::emitGetBaseMemOpSize(instrDesc* id) const } } + case INS_psrlw: + case INS_psrld: + case INS_psrlq: + case INS_psraw: + case INS_psrad: + case INS_psllw: + case INS_pslld: + case INS_psllq: + { + // These always have 16-byte memory loads + return EA_16BYTE; + } + case INS_vpmovdb: case INS_vpmovdw: case INS_vpmovqb: diff --git a/src/coreclr/jit/emitarm.cpp b/src/coreclr/jit/emitarm.cpp index a0dc786782b0bc..c1dc431c937287 100644 --- a/src/coreclr/jit/emitarm.cpp +++ b/src/coreclr/jit/emitarm.cpp @@ -4770,8 +4770,6 @@ void emitter::emitIns_Call(EmitCallType callType, { /* This is an indirect call (either a virtual call or func ptr call) */ - id->idSetIsCallRegPtr(); - if (isJump) { ins = INS_bx; // INS_bx Reg @@ -4850,6 +4848,7 @@ void emitter::emitIns_Call(EmitCallType callType, dispIns(id); appendToCurIG(id); + emitLastMemBarrier = nullptr; // Cannot optimize away future memory barriers } /***************************************************************************** diff --git a/src/coreclr/jit/emitarm64.cpp b/src/coreclr/jit/emitarm64.cpp index f01ad548d2ee04..f0428d222fc6c5 100644 --- a/src/coreclr/jit/emitarm64.cpp +++ b/src/coreclr/jit/emitarm64.cpp @@ -1157,7 +1157,9 @@ emitAttr emitter::emitInsTargetRegSize(instrDesc* id) case INS_ldrb: case INS_strb: case INS_ldurb: + case INS_ldapurb: case INS_sturb: + case INS_stlurb: result = EA_4BYTE; break; @@ -1172,6 +1174,8 @@ emitAttr emitter::emitInsTargetRegSize(instrDesc* id) case INS_strh: case INS_ldurh: case INS_sturh: + case INS_ldapurh: + case INS_stlurh: result = EA_4BYTE; break; @@ -1209,6 +1213,8 @@ emitAttr emitter::emitInsTargetRegSize(instrDesc* id) case INS_str: case INS_ldur: case INS_stur: + case INS_ldapur: + case INS_stlur: result = id->idOpSize(); break; @@ -1237,7 +1243,9 @@ emitAttr emitter::emitInsLoadStoreSize(instrDesc* id) case INS_ldrb: case INS_strb: case INS_ldurb: + case INS_ldapurb: case INS_sturb: + case INS_stlurb: case INS_ldrsb: case INS_ldursb: result = EA_1BYTE; @@ -1252,6 +1260,8 @@ emitAttr emitter::emitInsLoadStoreSize(instrDesc* id) case INS_sturh: case INS_ldrsh: case INS_ldursh: + case INS_ldapurh: + case INS_stlurh: result = EA_2BYTE; break; @@ -1275,6 +1285,8 @@ emitAttr emitter::emitInsLoadStoreSize(instrDesc* id) case INS_str: case INS_ldur: case INS_stur: + case INS_ldapur: + case INS_stlur: result = id->idOpSize(); break; @@ -2372,6 +2384,12 @@ emitter::code_t emitter::emitInsCode(instruction ins, insFormat fmt) return false; } +// true if this 'imm' can be encoded as the offset in an unscaled ldr/str instruction +/*static*/ bool emitter::emitIns_valid_imm_for_unscaled_ldst_offset(INT64 imm) +{ + return (imm >= -256) && (imm <= 255); +} + // true if this 'imm' can be encoded as the offset in a ldr/str instruction /*static*/ bool emitter::emitIns_valid_imm_for_ldst_offset(INT64 imm, emitAttr attr) { @@ -5505,6 +5523,8 @@ void emitter::emitIns_R_R_I( isLdSt = true; break; + case INS_ldapurb: + case INS_stlurb: case INS_ldurb: case INS_sturb: // size is ignored @@ -5522,7 +5542,9 @@ void emitter::emitIns_R_R_I( break; case INS_ldurh: + case INS_ldapurh: case INS_sturh: + case INS_stlurh: // size is ignored unscaledOp = true; scale = 0; @@ -5550,6 +5572,8 @@ void emitter::emitIns_R_R_I( case INS_ldur: case INS_stur: + case INS_ldapur: + case INS_stlur: // Is the target a vector register? if (isVectorRegister(reg1)) { @@ -8813,8 +8837,6 @@ void emitter::emitIns_Call(EmitCallType callType, { /* This is an indirect call (either a virtual call or func ptr call) */ - id->idSetIsCallRegPtr(); - if (isJump) { ins = INS_br_tail; // INS_br_tail Reg @@ -8886,6 +8908,7 @@ void emitter::emitIns_Call(EmitCallType callType, dispIns(id); appendToCurIG(id); + emitLastMemBarrier = nullptr; // Cannot optimize away future memory barriers } /***************************************************************************** diff --git a/src/coreclr/jit/emitarm64.h b/src/coreclr/jit/emitarm64.h index ca205eef07b0fa..a971f56f9d2884 100644 --- a/src/coreclr/jit/emitarm64.h +++ b/src/coreclr/jit/emitarm64.h @@ -543,6 +543,9 @@ static bool emitIns_valid_imm_for_alu(INT64 imm, emitAttr size); // true if this 'imm' can be encoded as the offset in a ldr/str instruction static bool emitIns_valid_imm_for_ldst_offset(INT64 imm, emitAttr size); +// true if this 'imm' can be encoded as the offset in an unscaled ldr/str instruction +static bool emitIns_valid_imm_for_unscaled_ldst_offset(INT64 imm); + // true if this 'imm' can be encoded as a input operand to a ccmp instruction static bool emitIns_valid_imm_for_ccmp(INT64 imm); diff --git a/src/coreclr/jit/emitloongarch64.cpp b/src/coreclr/jit/emitloongarch64.cpp index 6ead1a674099db..73f2dffebada8f 100644 --- a/src/coreclr/jit/emitloongarch64.cpp +++ b/src/coreclr/jit/emitloongarch64.cpp @@ -2507,10 +2507,10 @@ unsigned emitter::emitOutputCall(insGroup* ig, BYTE* dst, instrDesc* id, code_t { // pc + offset_38bits // - // pcaddu18i t2, addr-hi20 - // jilr r0/1,t2,addr-lo18 + // pcaddu18i t4, addr-hi20 + // jilr r0/1,t4,addr-lo18 - emitOutput_Instr(dst, 0x1e00000e); + emitOutput_Instr(dst, 0x1e000000 | (int)REG_DEFAULT_HELPER_CALL_TARGET); size_t addr = (size_t)(id->idAddr()->iiaAddr); // get addr. @@ -2521,25 +2521,24 @@ unsigned emitter::emitOutputCall(insGroup* ig, BYTE* dst, instrDesc* id, code_t assert((addr & 3) == 0); dst += 4; - emitGCregDeadUpd(REG_T2, dst); + emitGCregDeadUpd(REG_DEFAULT_HELPER_CALL_TARGET, dst); #ifdef DEBUG code = emitInsCode(INS_pcaddu18i); - assert((code | (14)) == 0x1e00000e); - assert((int)REG_T2 == 14); + assert(code == 0x1e000000); code = emitInsCode(INS_jirl); assert(code == 0x4c000000); #endif - emitOutput_Instr(dst, 0x4c000000 | (14 << 5) | reg2); + emitOutput_Instr(dst, 0x4c000000 | ((int)REG_DEFAULT_HELPER_CALL_TARGET << 5) | reg2); emitRecordRelocation(dst - 4, (BYTE*)addr, IMAGE_REL_LOONGARCH64_JIR); } else { - // lu12i_w t2, addr_bits[31:12] // TODO-LoongArch64: maybe optimize. - // ori t2, t2, addr_bits[11:0] - // lu32i_d t2, addr_bits[50:32] - // jirl t2 + // lu12i_w t4, addr_bits[31:12] // TODO-LoongArch64: maybe optimize. + // ori t4, t4, addr_bits[11:0] + // lu32i_d t4, addr_bits[50:32] + // jirl t4 ssize_t imm = (ssize_t)(id->idAddr()->iiaAddr); assert((uint64_t)(imm >> 32) <= 0x7ffff); // In fact max is <= 0xffff. @@ -2548,22 +2547,22 @@ unsigned emitter::emitOutputCall(insGroup* ig, BYTE* dst, instrDesc* id, code_t imm -= reg2; code = emitInsCode(INS_lu12i_w); - code |= (code_t)REG_T2; + code |= (code_t)REG_DEFAULT_HELPER_CALL_TARGET; code |= ((code_t)(imm >> 12) & 0xfffff) << 5; emitOutput_Instr(dst, code); dst += 4; - emitGCregDeadUpd(REG_T2, dst); + emitGCregDeadUpd(REG_DEFAULT_HELPER_CALL_TARGET, dst); code = emitInsCode(INS_ori); - code |= (code_t)REG_T2; - code |= (code_t)REG_T2 << 5; + code |= (code_t)REG_DEFAULT_HELPER_CALL_TARGET; + code |= (code_t)REG_DEFAULT_HELPER_CALL_TARGET << 5; code |= (code_t)(imm & 0xfff) << 10; emitOutput_Instr(dst, code); dst += 4; code = emitInsCode(INS_lu32i_d); - code |= (code_t)REG_T2; + code |= (code_t)REG_DEFAULT_HELPER_CALL_TARGET; code |= ((imm >> 32) & 0x7ffff) << 5; emitOutput_Instr(dst, code); @@ -2571,7 +2570,7 @@ unsigned emitter::emitOutputCall(insGroup* ig, BYTE* dst, instrDesc* id, code_t code = emitInsCode(INS_jirl); code |= (code_t)reg2; - code |= (code_t)REG_T2 << 5; + code |= (code_t)REG_DEFAULT_HELPER_CALL_TARGET << 5; // the offset default is 0; emitOutput_Instr(dst, code); } diff --git a/src/coreclr/jit/emitriscv64.cpp b/src/coreclr/jit/emitriscv64.cpp index b10d0da2a0385f..edfe30a3026f62 100644 --- a/src/coreclr/jit/emitriscv64.cpp +++ b/src/coreclr/jit/emitriscv64.cpp @@ -700,7 +700,7 @@ void emitter::emitIns_R_R_R( if ((INS_add <= ins && ins <= INS_and) || (INS_mul <= ins && ins <= INS_remuw) || (INS_addw <= ins && ins <= INS_sraw) || (INS_fadd_s <= ins && ins <= INS_fmax_s) || (INS_fadd_d <= ins && ins <= INS_fmax_d) || (INS_feq_s <= ins && ins <= INS_fle_s) || - (INS_feq_d <= ins && ins <= INS_fle_d)) + (INS_feq_d <= ins && ins <= INS_fle_d) || (INS_lr_w <= ins && ins <= INS_amomaxu_d)) { #ifdef DEBUG switch (ins) @@ -767,12 +767,37 @@ void emitter::emitIns_R_R_R( case INS_flt_d: case INS_fle_d: + case INS_lr_w: + case INS_lr_d: + case INS_sc_w: + case INS_sc_d: + case INS_amoswap_w: + case INS_amoswap_d: + case INS_amoadd_w: + case INS_amoadd_d: + case INS_amoxor_w: + case INS_amoxor_d: + case INS_amoand_w: + case INS_amoand_d: + case INS_amoor_w: + case INS_amoor_d: + case INS_amomin_w: + case INS_amomin_d: + case INS_amomax_w: + case INS_amomax_d: + case INS_amominu_w: + case INS_amominu_d: + case INS_amomaxu_w: + case INS_amomaxu_d: break; default: NYI_RISCV64("illegal ins within emitIns_R_R_R!"); } #endif + // Src/data register for load reserved should be empty + assert((ins != INS_lr_w && ins != INS_lr_d) || reg3 == REG_R0); + code |= ((reg1 & 0x1f) << 7); code |= ((reg2 & 0x1f) << 15); code |= ((reg3 & 0x1f) << 20); @@ -780,6 +805,11 @@ void emitter::emitIns_R_R_R( { code |= 0x7 << 12; } + else if (INS_lr_w <= ins && ins <= INS_amomaxu_d) + { + // For now all atomics are seq. consistent as Interlocked.* APIs don't expose acquire/release ordering + code |= 0b11 << 25; + } } else { @@ -2887,7 +2917,7 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) { imm20 |= 0xfff00000; } - printf("lui %s, %d\n", rd, imm20); + printf("lui %s, %d\n", rd, imm20); return; } case 0x17: // AUIPC @@ -2898,7 +2928,7 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) { imm20 |= 0xfff00000; } - printf("auipc %s, %d\n", rd, imm20); + printf("auipc %s, %d\n", rd, imm20); return; } case 0x13: @@ -2914,35 +2944,35 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) switch (opcode2) { case 0x0: // ADDI - printf("addi %s, %s, %d\n", rd, rs1, imm12); + printf("addi %s, %s, %d\n", rd, rs1, imm12); return; - case 0x1: // SLLI - printf("slli %s, %s, %d\n", rd, rs1, imm12 & 0x3f); // 6 BITS for SHAMT in RISCV64 + case 0x1: // SLLI + printf("slli %s, %s, %d\n", rd, rs1, imm12 & 0x3f); // 6 BITS for SHAMT in RISCV64 return; case 0x2: // SLTI - printf("slti %s, %s, %d\n", rd, rs1, imm12); + printf("slti %s, %s, %d\n", rd, rs1, imm12); return; case 0x3: // SLTIU - printf("sltiu %s, %s, %d\n", rd, rs1, imm12); + printf("sltiu %s, %s, %d\n", rd, rs1, imm12); return; case 0x4: // XORI - printf("xori %s, %s, 0x%x\n", rd, rs1, imm12); + printf("xori %s, %s, 0x%x\n", rd, rs1, imm12); return; case 0x5: // SRLI & SRAI if (((code >> 30) & 0x1) == 0) { - printf("srli %s, %s, %d\n", rd, rs1, imm12 & 0x3f); // 6BITS for SHAMT in RISCV64 + printf("srli %s, %s, %d\n", rd, rs1, imm12 & 0x3f); // 6BITS for SHAMT in RISCV64 } else { - printf("srai %s, %s, %d\n", rd, rs1, imm12 & 0x3f); // 6BITS for SHAMT in RISCV64 + printf("srai %s, %s, %d\n", rd, rs1, imm12 & 0x3f); // 6BITS for SHAMT in RISCV64 } return; case 0x6: // ORI - printf("ori %s, %s, 0x%x\n", rd, rs1, imm12 & 0xfff); + printf("ori %s, %s, 0x%x\n", rd, rs1, imm12 & 0xfff); return; case 0x7: // ANDI - printf("andi %s, %s, 0x%x\n", rd, rs1, imm12 & 0xfff); + printf("andi %s, %s, 0x%x\n", rd, rs1, imm12 & 0xfff); return; default: printf("RISCV64 illegal instruction: 0x%08X\n", code); @@ -2962,19 +2992,19 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) switch (opcode2) { case 0x0: // ADDIW - printf("addiw %s, %s, %d\n", rd, rs1, imm12); + printf("addiw %s, %s, %d\n", rd, rs1, imm12); return; - case 0x1: // SLLIW - printf("slliw %s, %s, %d\n", rd, rs1, imm12 & 0x3f); // 6 BITS for SHAMT in RISCV64 + case 0x1: // SLLIW + printf("slliw %s, %s, %d\n", rd, rs1, imm12 & 0x3f); // 6 BITS for SHAMT in RISCV64 return; case 0x5: // SRLIW & SRAIW if (((code >> 30) & 0x1) == 0) { - printf("srliw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5BITS for SHAMT in RISCV64 + printf("srliw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5BITS for SHAMT in RISCV64 } else { - printf("sraiw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5BITS for SHAMT in RISCV64 + printf("sraiw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5BITS for SHAMT in RISCV64 } return; default: @@ -2996,40 +3026,40 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) case 0x0: // ADD & SUB if (((code >> 30) & 0x1) == 0) { - printf("add %s, %s, %s\n", rd, rs1, rs2); + printf("add %s, %s, %s\n", rd, rs1, rs2); } else { - printf("sub %s, %s, %s\n", rd, rs1, rs2); + printf("sub %s, %s, %s\n", rd, rs1, rs2); } return; case 0x1: // SLL - printf("sll %s, %s, %s\n", rd, rs1, rs2); + printf("sll %s, %s, %s\n", rd, rs1, rs2); return; case 0x2: // SLT - printf("slt %s, %s, %s\n", rd, rs1, rs2); + printf("slt %s, %s, %s\n", rd, rs1, rs2); return; case 0x3: // SLTU - printf("sltu %s, %s, %s\n", rd, rs1, rs2); + printf("sltu %s, %s, %s\n", rd, rs1, rs2); return; case 0x4: // XOR - printf("xor %s, %s, %s\n", rd, rs1, rs2); + printf("xor %s, %s, %s\n", rd, rs1, rs2); return; case 0x5: // SRL & SRA if (((code >> 30) & 0x1) == 0) { - printf("srl %s, %s, %s\n", rd, rs1, rs2); + printf("srl %s, %s, %s\n", rd, rs1, rs2); } else { - printf("sra %s, %s, %s\n", rd, rs1, rs2); + printf("sra %s, %s, %s\n", rd, rs1, rs2); } return; case 0x6: // OR - printf("or %s, %s, %s\n", rd, rs1, rs2); + printf("or %s, %s, %s\n", rd, rs1, rs2); return; case 0x7: // AND - printf("and %s, %s, %s\n", rd, rs1, rs2); + printf("and %s, %s, %s\n", rd, rs1, rs2); return; default: printf("RISCV64 illegal instruction: 0x%08X\n", code); @@ -3041,28 +3071,28 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) switch (opcode3) { case 0x0: // MUL - printf("mul %s, %s, %s\n", rd, rs1, rs2); + printf("mul %s, %s, %s\n", rd, rs1, rs2); return; case 0x1: // MULH - printf("mulh %s, %s, %s\n", rd, rs1, rs2); + printf("mulh %s, %s, %s\n", rd, rs1, rs2); return; case 0x2: // MULHSU - printf("mulhsu %s, %s, %s\n", rd, rs1, rs2); + printf("mulhsu %s, %s, %s\n", rd, rs1, rs2); return; case 0x3: // MULHU - printf("mulhu %s, %s, %s\n", rd, rs1, rs2); + printf("mulhu %s, %s, %s\n", rd, rs1, rs2); return; case 0x4: // DIV - printf("div %s, %s, %s\n", rd, rs1, rs2); + printf("div %s, %s, %s\n", rd, rs1, rs2); return; case 0x5: // DIVU - printf("divu %s, %s, %s\n", rd, rs1, rs2); + printf("divu %s, %s, %s\n", rd, rs1, rs2); return; case 0x6: // REM - printf("rem %s, %s, %s\n", rd, rs1, rs2); + printf("rem %s, %s, %s\n", rd, rs1, rs2); return; case 0x7: // REMU - printf("remu %s, %s, %s\n", rd, rs1, rs2); + printf("remu %s, %s, %s\n", rd, rs1, rs2); return; default: printf("RISCV64 illegal instruction: 0x%08X\n", code); @@ -3090,24 +3120,24 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) case 0x0: // ADDW & SUBW if (((code >> 30) & 0x1) == 0) { - printf("addw %s, %s, %s\n", rd, rs1, rs2); + printf("addw %s, %s, %s\n", rd, rs1, rs2); } else { - printf("subw %s, %s, %s\n", rd, rs1, rs2); + printf("subw %s, %s, %s\n", rd, rs1, rs2); } return; case 0x1: // SLLW - printf("sllw %s, %s, %s\n", rd, rs1, rs2); + printf("sllw %s, %s, %s\n", rd, rs1, rs2); return; case 0x5: // SRLW & SRAW if (((code >> 30) & 0x1) == 0) { - printf("srlw %s, %s, %s\n", rd, rs1, rs2); + printf("srlw %s, %s, %s\n", rd, rs1, rs2); } else { - printf("sraw %s, %s, %s\n", rd, rs1, rs2); + printf("sraw %s, %s, %s\n", rd, rs1, rs2); } return; default: @@ -3120,19 +3150,19 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) switch (opcode3) { case 0x0: // MULW - printf("mulw %s, %s, %s\n", rd, rs1, rs2); + printf("mulw %s, %s, %s\n", rd, rs1, rs2); return; case 0x4: // DIVW - printf("divw %s, %s, %s\n", rd, rs1, rs2); + printf("divw %s, %s, %s\n", rd, rs1, rs2); return; case 0x5: // DIVUW - printf("divuw %s, %s, %s\n", rd, rs1, rs2); + printf("divuw %s, %s, %s\n", rd, rs1, rs2); return; case 0x6: // REMW - printf("remw %s, %s, %s\n", rd, rs1, rs2); + printf("remw %s, %s, %s\n", rd, rs1, rs2); return; case 0x7: // REMUW - printf("remuw %s, %s, %s\n", rd, rs1, rs2); + printf("remuw %s, %s, %s\n", rd, rs1, rs2); return; default: printf("RISCV64 illegal instruction: 0x%08X\n", code); @@ -3159,16 +3189,16 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) switch (opcode2) { case 0: // SB - printf("sb %s, %d(%s)\n", rs2, offset, rs1); + printf("sb %s, %d(%s)\n", rs2, offset, rs1); return; case 1: // SH - printf("sh %s, %d(%s)\n", rs2, offset, rs1); + printf("sh %s, %d(%s)\n", rs2, offset, rs1); return; case 2: // SW - printf("sw %s, %d(%s)\n", rs2, offset, rs1); + printf("sw %s, %d(%s)\n", rs2, offset, rs1); return; case 3: // SD - printf("sd %s, %d(%s)\n", rs2, offset, rs1); + printf("sd %s, %d(%s)\n", rs2, offset, rs1); return; default: printf("RISCV64 illegal instruction: 0x%08X\n", code); @@ -3189,22 +3219,22 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) switch (opcode2) { case 0: // BEQ - printf("beq %s, %s, %d\n", rs1, rs2, offset); + printf("beq %s, %s, %d\n", rs1, rs2, offset); return; case 1: // BNE - printf("bne %s, %s, %d\n", rs1, rs2, offset); + printf("bne %s, %s, %d\n", rs1, rs2, offset); return; case 4: // BLT - printf("blt %s, %s, %d\n", rs1, rs2, offset); + printf("blt %s, %s, %d\n", rs1, rs2, offset); return; case 5: // BGE - printf("bge %s, %s, %d\n", rs1, rs2, offset); + printf("bge %s, %s, %d\n", rs1, rs2, offset); return; case 6: // BLTU - printf("bltu %s, %s, %d\n", rs1, rs2, offset); + printf("bltu %s, %s, %d\n", rs1, rs2, offset); return; case 7: // BGEU - printf("bgeu %s, %s, %d\n", rs1, rs2, offset); + printf("bgeu %s, %s, %d\n", rs1, rs2, offset); return; default: printf("RISCV64 illegal instruction: 0x%08X\n", code); @@ -3225,25 +3255,25 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) switch (opcode2) { case 0: // LB - printf("lb %s, %d(%s)\n", rd, offset, rs1); + printf("lb %s, %d(%s)\n", rd, offset, rs1); return; case 1: // LH - printf("lh %s, %d(%s)\n", rd, offset, rs1); + printf("lh %s, %d(%s)\n", rd, offset, rs1); return; case 2: // LW - printf("lw %s, %d(%s)\n", rd, offset, rs1); + printf("lw %s, %d(%s)\n", rd, offset, rs1); return; case 3: // LD - printf("ld %s, %d(%s)\n", rd, offset, rs1); + printf("ld %s, %d(%s)\n", rd, offset, rs1); return; case 4: // LBU - printf("lbu %s, %d(%s)\n", rd, offset, rs1); + printf("lbu %s, %d(%s)\n", rd, offset, rs1); return; case 5: // LHU - printf("lhu %s, %d(%s)\n", rd, offset, rs1); + printf("lhu %s, %d(%s)\n", rd, offset, rs1); return; case 6: // LWU - printf("lwu %s, %d(%s)\n", rd, offset, rs1); + printf("lwu %s, %d(%s)\n", rd, offset, rs1); return; default: printf("RISCV64 illegal instruction: 0x%08X\n", code); @@ -3259,7 +3289,7 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) { offset |= 0xfffff000; } - printf("jalr %s, %d(%s)", rd, offset, rs1); + printf("jalr %s, %d(%s)", rd, offset, rs1); CORINFO_METHOD_HANDLE handle = (CORINFO_METHOD_HANDLE)id->idDebugOnlyInfo()->idMemCookie; // Target for ret call is unclear, e.g.: // jalr zero, 0(ra) @@ -3282,7 +3312,7 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) { offset |= 0xfff00000; } - printf("jal %s, %d", rd, offset); + printf("jal %s, %d", rd, offset); CORINFO_METHOD_HANDLE handle = (CORINFO_METHOD_HANDLE)id->idDebugOnlyInfo()->idMemCookie; if (handle != 0) { @@ -3297,7 +3327,7 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) { int pred = ((code) >> 24) & 0xf; int succ = ((code) >> 20) & 0xf; - printf("fence %d, %d\n", pred, succ); + printf("fence %d, %d\n", pred, succ); return; } case 0x73: @@ -3328,32 +3358,32 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) switch (opcode2) { case 0x00: // FADD.S - printf("fadd.s %s, %s, %s\n", fd, fs1, fs2); + printf("fadd.s %s, %s, %s\n", fd, fs1, fs2); return; case 0x04: // FSUB.S - printf("fsub.s %s, %s, %s\n", fd, fs1, fs2); + printf("fsub.s %s, %s, %s\n", fd, fs1, fs2); return; case 0x08: // FMUL.S - printf("fmul.s %s, %s, %s\n", fd, fs1, fs2); + printf("fmul.s %s, %s, %s\n", fd, fs1, fs2); return; case 0x0C: // FDIV.S - printf("fdiv.s %s, %s, %s\n", fd, fs1, fs2); + printf("fdiv.s %s, %s, %s\n", fd, fs1, fs2); return; case 0x2C: // FSQRT.S - printf("fsqrt.s %s, %s\n", fd, fs1); + printf("fsqrt.s %s, %s\n", fd, fs1); return; case 0x10: // FSGNJ.S & FSGNJN.S & FSGNJX.S if (opcode4 == 0) // FSGNJ.S { - printf("fsgnj.s %s, %s, %s\n", fd, fs1, fs2); + printf("fsgnj.s %s, %s, %s\n", fd, fs1, fs2); } else if (opcode4 == 1) // FSGNJN.S { - printf("fsgnjn.s %s, %s, %s\n", fd, fs1, fs2); + printf("fsgnjn.s %s, %s, %s\n", fd, fs1, fs2); } else if (opcode4 == 2) // FSGNJX.S { - printf("fsgnjx.s %s, %s, %s\n", fd, fs1, fs2); + printf("fsgnjx.s %s, %s, %s\n", fd, fs1, fs2); } else { @@ -3363,11 +3393,11 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) case 0x14: // FMIN.S & FMAX.S if (opcode4 == 0) // FMIN.S { - printf("fmin.s %s, %s, %s\n", fd, fs1, fs2); + printf("fmin.s %s, %s, %s\n", fd, fs1, fs2); } else if (opcode4 == 1) // FMAX.S { - printf("fmax.s %s, %s, %s\n", fd, fs1, fs2); + printf("fmax.s %s, %s, %s\n", fd, fs1, fs2); } else { @@ -3377,19 +3407,19 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) case 0x60: // FCVT.W.S & FCVT.WU.S & FCVT.L.S & FCVT.LU.S if (opcode3 == 0) // FCVT.W.S { - printf("fcvt.w.s %s, %s\n", xd, fs1); + printf("fcvt.w.s %s, %s\n", xd, fs1); } else if (opcode3 == 1) // FCVT.WU.S { - printf("fcvt.wu.s %s, %s\n", xd, fs1); + printf("fcvt.wu.s %s, %s\n", xd, fs1); } else if (opcode3 == 2) // FCVT.L.S { - printf("fcvt.l.s %s, %s\n", xd, fs1); + printf("fcvt.l.s %s, %s\n", xd, fs1); } else if (opcode3 == 3) // FCVT.LU.S { - printf("fcvt.lu.s %s, %s\n", xd, fs1); + printf("fcvt.lu.s %s, %s\n", xd, fs1); } else { @@ -3399,11 +3429,11 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) case 0x70: // FMV.X.W & FCLASS.S if (opcode4 == 0) // FMV.X.W { - printf("fmv.x.w %s, %s\n", xd, fs1); + printf("fmv.x.w %s, %s\n", xd, fs1); } else if (opcode4 == 1) // FCLASS.S { - printf("fclass.s %s, %s\n", xd, fs1); + printf("fclass.s %s, %s\n", xd, fs1); } else { @@ -3413,15 +3443,15 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) case 0x50: // FLE.S & FLT.S & FEQ.S if (opcode4 == 0) // FLE.S { - printf("fle.s %s, %s, %s\n", xd, fs1, fs2); + printf("fle.s %s, %s, %s\n", xd, fs1, fs2); } else if (opcode4 == 1) // FLT.S { - printf("flt.s %s, %s, %s\n", xd, fs1, fs2); + printf("flt.s %s, %s, %s\n", xd, fs1, fs2); } else if (opcode4 == 2) // FEQ.S { - printf("feq.s %s, %s, %s\n", xd, fs1, fs2); + printf("feq.s %s, %s, %s\n", xd, fs1, fs2); } else { @@ -3431,19 +3461,19 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) case 0x68: // FCVT.S.W & FCVT.S.WU & FCVT.S.L & FCVT.S.LU if (opcode3 == 0) // FCVT.S.W { - printf("fcvt.s.w %s, %s\n", fd, xs1); + printf("fcvt.s.w %s, %s\n", fd, xs1); } else if (opcode3 == 1) // FCVT.S.WU { - printf("fcvt.s.wu %s, %s\n", fd, xs1); + printf("fcvt.s.wu %s, %s\n", fd, xs1); } else if (opcode3 == 2) // FCVT.S.L { - printf("fcvt.s.l %s, %s\n", fd, xs1); + printf("fcvt.s.l %s, %s\n", fd, xs1); } else if (opcode3 == 3) // FCVT.S.LU { - printf("fcvt.s.lu %s, %s\n", fd, xs1); + printf("fcvt.s.lu %s, %s\n", fd, xs1); } else @@ -3452,35 +3482,35 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) } return; case 0x78: // FMV.W.X - printf("fmv.w.x %s, %s\n", fd, xs1); + printf("fmv.w.x %s, %s\n", fd, xs1); return; case 0x1: // FADD.D - printf("fadd.d %s, %s, %s\n", fd, fs1, fs2); + printf("fadd.d %s, %s, %s\n", fd, fs1, fs2); return; case 0x5: // FSUB.D - printf("fsub.d %s, %s, %s\n", fd, fs1, fs2); + printf("fsub.d %s, %s, %s\n", fd, fs1, fs2); return; case 0x9: // FMUL.D - printf("fmul.d %s, %s, %s\n", fd, fs1, fs2); + printf("fmul.d %s, %s, %s\n", fd, fs1, fs2); return; case 0xd: // FDIV.D - printf("fdiv.d %s, %s, %s\n", fd, fs1, fs2); + printf("fdiv.d %s, %s, %s\n", fd, fs1, fs2); return; case 0x2d: // FSQRT.D - printf("fsqrt.d %s, %s\n", fd, fs1); + printf("fsqrt.d %s, %s\n", fd, fs1); return; case 0x11: // FSGNJ.D & FSGNJN.D & FSGNJX.D if (opcode4 == 0) // FSGNJ.D { - printf("fsgnj.d %s, %s, %s\n", fd, fs1, fs2); + printf("fsgnj.d %s, %s, %s\n", fd, fs1, fs2); } else if (opcode4 == 1) // FSGNJN.D { - printf("fsgnjn.d %s, %s, %s\n", fd, fs1, fs2); + printf("fsgnjn.d %s, %s, %s\n", fd, fs1, fs2); } else if (opcode4 == 2) // FSGNJX.D { - printf("fsgnjx.d %s, %s, %s\n", fd, fs1, fs2); + printf("fsgnjx.d %s, %s, %s\n", fd, fs1, fs2); } else { @@ -3490,11 +3520,11 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) case 0x15: // FMIN.D & FMAX.D if (opcode4 == 0) // FMIN.D { - printf("fmin.d %s, %s, %s\n", fd, fs1, fs2); + printf("fmin.d %s, %s, %s\n", fd, fs1, fs2); } else if (opcode4 == 1) // FMAX.D { - printf("fmax.d %s, %s, %s\n", fd, fs1, fs2); + printf("fmax.d %s, %s, %s\n", fd, fs1, fs2); } else { @@ -3504,7 +3534,7 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) case 0x20: // FCVT.S.D if (opcode3 == 1) // FCVT.S.D { - printf("fcvt.s.d %s, %s\n", fd, fs1); + printf("fcvt.s.d %s, %s\n", fd, fs1); } else { @@ -3514,7 +3544,7 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) case 0x21: // FCVT.D.S if (opcode3 == 0) // FCVT.D.S { - printf("fcvt.d.s %s, %s\n", fd, fs1); + printf("fcvt.d.s %s, %s\n", fd, fs1); } else { @@ -3524,15 +3554,15 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) case 0x51: // FLE.D & FLT.D & FEQ.D if (opcode4 == 0) // FLE.D { - printf("fle.d %s, %s, %s\n", xd, fs1, fs2); + printf("fle.d %s, %s, %s\n", xd, fs1, fs2); } else if (opcode4 == 1) // FLT.D { - printf("flt.d %s, %s, %s\n", xd, fs1, fs2); + printf("flt.d %s, %s, %s\n", xd, fs1, fs2); } else if (opcode4 == 2) // FEQ.D { - printf("feq.d %s, %s, %s\n", xd, fs1, fs2); + printf("feq.d %s, %s, %s\n", xd, fs1, fs2); } else { @@ -3543,19 +3573,19 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) if (opcode3 == 0) // FCVT.W.D { - printf("fcvt.w.d %s, %s\n", xd, fs1); + printf("fcvt.w.d %s, %s\n", xd, fs1); } else if (opcode3 == 1) // FCVT.WU.D { - printf("fcvt.wu.d %s, %s\n", xd, fs1); + printf("fcvt.wu.d %s, %s\n", xd, fs1); } else if (opcode3 == 2) // FCVT.L.D { - printf("fcvt.l.d %s, %s\n", xd, fs1); + printf("fcvt.l.d %s, %s\n", xd, fs1); } else if (opcode3 == 3) // FCVT.LU.D { - printf("fcvt.lu.d %s, %s\n", xd, fs1); + printf("fcvt.lu.d %s, %s\n", xd, fs1); } else { @@ -3565,19 +3595,19 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) case 0x69: // FCVT.D.W & FCVT.D.WU & FCVT.D.L & FCVT.D.LU if (opcode3 == 0) // FCVT.D.W { - printf("fcvt.d.w %s, %s\n", fd, xs1); + printf("fcvt.d.w %s, %s\n", fd, xs1); } else if (opcode3 == 1) // FCVT.D.WU { - printf("fcvt.d.wu %s, %s\n", fd, xs1); + printf("fcvt.d.wu %s, %s\n", fd, xs1); } else if (opcode3 == 2) { - printf("fcvt.d.l %s, %s\n", fd, xs1); + printf("fcvt.d.l %s, %s\n", fd, xs1); } else if (opcode3 == 3) { - printf("fcvt.d.lu %s, %s\n", fd, xs1); + printf("fcvt.d.lu %s, %s\n", fd, xs1); } else @@ -3589,11 +3619,11 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) case 0x71: // FMV.X.D & FCLASS.D if (opcode4 == 0) // FMV.X.D { - printf("fmv.x.d %s, %s\n", xd, fs1); + printf("fmv.x.d %s, %s\n", xd, fs1); } else if (opcode4 == 1) // FCLASS.D { - printf("fclass.d %s, %s\n", xd, fs1); + printf("fclass.d %s, %s\n", xd, fs1); } else { @@ -3602,7 +3632,7 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) return; case 0x79: // FMV.D.X assert(opcode4 == 0); - printf("fmv.d.x %s, %s\n", fd, xs1); + printf("fmv.d.x %s, %s\n", fd, xs1); return; default: NYI_RISCV64("illegal ins within emitDisInsName!"); @@ -3623,11 +3653,11 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) } if (opcode2 == 2) // FSW { - printf("fsw %s, %d(%s)\n", rs2, offset, rs1); + printf("fsw %s, %d(%s)\n", rs2, offset, rs1); } else if (opcode2 == 3) // FSD { - printf("fsd %s, %d(%s)\n", rs2, offset, rs1); + printf("fsd %s, %d(%s)\n", rs2, offset, rs1); } else { @@ -3647,11 +3677,11 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) } if (opcode2 == 2) // FLW { - printf("flw %s, %d(%s)\n", rd, offset, rs1); + printf("flw %s, %d(%s)\n", rd, offset, rs1); } else if (opcode2 == 3) // FLD { - printf("fld %s, %d(%s)\n", rd, offset, rs1); + printf("fld %s, %d(%s)\n", rd, offset, rs1); } else { @@ -3659,6 +3689,92 @@ void emitter::emitDisInsName(code_t code, const BYTE* addr, instrDesc* id) } return; } + case 0x2f: // AMO - atomic memory operation + { + bool hasDataReg = true; + const char* name; + switch (code >> 27) // funct5 + { + case 0b00010: + name = "lr"; + hasDataReg = false; + break; + case 0b00011: + name = "sc"; + break; + case 0b00001: + name = "amoswap"; + break; + case 0b00000: + name = "amoadd"; + break; + case 0b00100: + name = "amoxor"; + break; + case 0b01100: + name = "amoand"; + break; + case 0b01000: + name = "amoor"; + break; + case 0b10000: + name = "amomin"; + break; + case 0b10100: + name = "amomax"; + break; + case 0b11000: + name = "amominu"; + break; + case 0b11100: + name = "amomaxu"; + break; + default: + assert(!"Illegal funct5 within atomic memory operation, emitDisInsName"); + name = "?"; + } + + char width; + switch ((code >> 12) & 0x7) // funct3: width + { + case 0x2: + width = 'w'; + break; + case 0x3: + width = 'd'; + break; + default: + assert(!"Illegal width tag within atomic memory operation, emitDisInsName"); + width = '?'; + } + + const char* aq = code & (1 << 25) ? "aq" : ""; + const char* rl = code & (1 << 26) ? "rl" : ""; + + int len = printf("%s.%c.%s%s", name, width, aq, rl); + if (len <= 0) + { + return; + } + static const int INS_LEN = 14; + assert(len <= INS_LEN); + + const char* dest = RegNames[(code >> 7) & 0x1f]; + const char* addr = RegNames[(code >> 15) & 0x1f]; + + int dataReg = (code >> 20) & 0x1f; + if (hasDataReg) + { + const char* data = RegNames[dataReg]; + printf("%*s %s, %s, (%s)\n", INS_LEN - len, "", dest, data, addr); + } + else + { + assert(dataReg == REG_R0); + printf("%*s %s, (%s)\n", INS_LEN - len, "", dest, addr); + } + return; + } default: NYI_RISCV64("illegal ins within emitDisInsName!"); } @@ -4287,8 +4403,8 @@ regNumber emitter::emitInsTernary(instruction ins, emitAttr attr, GenTree* dst, } else { - tempReg1 = REG_RA; // src1->GetSingleTempReg(); - tempReg2 = REG_T5; // TODO-RISCV64-Bug?: Assign proper temp register + tempReg1 = REG_RA; + tempReg2 = dst->GetSingleTempReg(); assert(tempReg1 != tempReg2); assert(tempReg1 != saveOperReg1); assert(tempReg2 != saveOperReg2); diff --git a/src/coreclr/jit/emitxarch.cpp b/src/coreclr/jit/emitxarch.cpp index 980d40a47ac318..65789413500cd3 100644 --- a/src/coreclr/jit/emitxarch.cpp +++ b/src/coreclr/jit/emitxarch.cpp @@ -5485,6 +5485,13 @@ void emitter::emitInsRMW(instruction ins, emitAttr attr, GenTreeStoreInd* storeI { assert(!src->isContained()); // there must be one non-contained src + if (addr->isContained() && addr->OperIs(GT_LCL_ADDR)) + { + GenTreeLclVarCommon* lclVar = addr->AsLclVarCommon(); + emitIns_S_R(ins, attr, src->GetRegNum(), lclVar->GetLclNum(), lclVar->GetLclOffs()); + return; + } + // ind, reg id = emitNewInstrAmd(attr, offset); emitHandleMemOp(storeInd, id, emitInsModeFormat(ins, IF_ARD_RRD), ins); @@ -8602,9 +8609,14 @@ void emitter::emitIns_SIMD_R_R_R_R( // SSE4.1 blendv* hardcode the mask vector (op3) in XMM0 emitIns_Mov(INS_movaps, attr, REG_XMM0, op3Reg, /* canSkip */ true); - // Ensure we aren't overwriting op2 or oop3 (which should be REG_XMM0) + // Ensure we aren't overwriting op2 or op3 (which should be REG_XMM0) assert((op2Reg != targetReg) || (op1Reg == targetReg)); - assert(targetReg != REG_XMM0); + + // If targetReg == REG_XMM0, it means that op3 was last use and we decided to + // reuse REG_XMM0 for destination i.e. targetReg. In such case, make sure + // that XMM0 value after the (op3Reg -> XMM0) move done above is not + // overwritten by op1Reg. + assert((targetReg != REG_XMM0) || (op1Reg == op3Reg)); emitIns_Mov(INS_movaps, attr, targetReg, op1Reg, /* canSkip */ true); emitIns_R_R(ins, attr, targetReg, op2Reg); @@ -14098,11 +14110,11 @@ BYTE* emitter::emitOutputCV(BYTE* dst, instrDesc* id, code_t code, CnsVal* addc) { if (emitComp->compCodeOpt() == Compiler::SMALL_CODE) { - assert((reinterpret_cast(addr) & 3) == 0); + assert(IS_ALIGNED(addr, 4)); } else { - assert((reinterpret_cast(addr) & (byteSize - 1)) == 0); + assert(IS_ALIGNED(addr, byteSize)); } } #endif // DEBUG diff --git a/src/coreclr/jit/error.cpp b/src/coreclr/jit/error.cpp index 01e6f734b89f89..a45ad7c7df0ef0 100644 --- a/src/coreclr/jit/error.cpp +++ b/src/coreclr/jit/error.cpp @@ -108,32 +108,15 @@ void DECLSPEC_NORETURN noWayAssertBody() fatal(CORJIT_RECOVERABLEERROR); } -inline static bool ShouldThrowOnNoway( -#ifdef FEATURE_TRACELOGGING - const char* filename, unsigned line -#endif - ) +inline static bool ShouldThrowOnNoway() { - return JitTls::GetCompiler() == nullptr || - JitTls::GetCompiler()->compShouldThrowOnNoway( -#ifdef FEATURE_TRACELOGGING - filename, line -#endif - ); + return JitTls::GetCompiler() == nullptr || JitTls::GetCompiler()->compShouldThrowOnNoway(); } /*****************************************************************************/ -void noWayAssertBodyConditional( -#ifdef FEATURE_TRACELOGGING - const char* filename, unsigned line -#endif - ) +void noWayAssertBodyConditional() { -#ifdef FEATURE_TRACELOGGING - if (ShouldThrowOnNoway(filename, line)) -#else if (ShouldThrowOnNoway()) -#endif // FEATURE_TRACELOGGING { noWayAssertBody(); } @@ -387,7 +370,7 @@ int logf(const char* fmt, ...) { // if the EE refuses to log it, we try to send it to stdout va_start(args, fmt); - written = vflogf(jitstdout, fmt, args); + written = vflogf(jitstdout(), fmt, args); va_end(args); } #if 0 // Enable this only when you need it @@ -448,7 +431,7 @@ void gcDump_logf(const char* fmt, ...) { // if the EE refuses to log it, we try to send it to stdout va_start(args, fmt); - vflogf(jitstdout, fmt, args); + vflogf(jitstdout(), fmt, args); va_end(args); } #if 0 // Enable this only when you need it @@ -513,11 +496,7 @@ void noWayAssertAbortHelper(const char* cond, const char* file, unsigned line) void noWayAssertBodyConditional(const char* cond, const char* file, unsigned line) { -#ifdef FEATURE_TRACELOGGING - if (ShouldThrowOnNoway(file, line)) -#else if (ShouldThrowOnNoway()) -#endif { noWayAssertBody(cond, file, line); } diff --git a/src/coreclr/jit/error.h b/src/coreclr/jit/error.h index f31732e28c9f56..9ef5bf8b9dcfa4 100644 --- a/src/coreclr/jit/error.h +++ b/src/coreclr/jit/error.h @@ -73,11 +73,7 @@ extern void DECLSPEC_NORETURN noWayAssertBody(const char* cond, const char* file // Conditionally invoke the noway assert body. The conditional predicate is evaluated using a method on the tlsCompiler. // If a noway_assert is hit, we ask the Compiler whether to raise an exception (i.e., conditionally raise exception.) // To have backward compatibility between v4.5 and v4.0, in min-opts we take a shot at codegen rather than rethrow. -extern void ANALYZER_NORETURN noWayAssertBodyConditional( -#ifdef FEATURE_TRACELOGGING - const char* file, unsigned line -#endif - ); +extern void ANALYZER_NORETURN noWayAssertBodyConditional(); extern void ANALYZER_NORETURN noWayAssertBodyConditional(const char* cond, const char* file, unsigned line); @@ -135,25 +131,19 @@ extern void RecordNowayAssertGlobal(const char* filename, unsigned line, const c // limitations (that could be removed in the future) #define IMPL_LIMITATION(msg) implLimitation() -#ifdef FEATURE_TRACELOGGING -#define NOWAY_ASSERT_BODY_ARGUMENTS __FILE__, __LINE__ -#else -#define NOWAY_ASSERT_BODY_ARGUMENTS -#endif - #define noway_assert(cond) \ do \ { \ RECORD_NOWAY_ASSERT(#cond) \ if (!(cond)) \ { \ - noWayAssertBodyConditional(NOWAY_ASSERT_BODY_ARGUMENTS); \ + noWayAssertBodyConditional(); \ } \ } while (0) #define unreached() noWayAssertBody() -#define NOWAY_MSG(msg) noWayAssertBodyConditional(NOWAY_ASSERT_BODY_ARGUMENTS) -#define NOWAY_MSG_FILE_AND_LINE(msg, file, line) noWayAssertBodyConditional(NOWAY_ASSERT_BODY_ARGUMENTS) +#define NOWAY_MSG(msg) noWayAssertBodyConditional() +#define NOWAY_MSG_FILE_AND_LINE(msg, file, line) noWayAssertBodyConditional() #endif // !DEBUG diff --git a/src/coreclr/jit/fgdiagnostic.cpp b/src/coreclr/jit/fgdiagnostic.cpp index e79bdb0e46368a..afc1bbc1db73ed 100644 --- a/src/coreclr/jit/fgdiagnostic.cpp +++ b/src/coreclr/jit/fgdiagnostic.cpp @@ -674,7 +674,7 @@ FILE* Compiler::fgOpenFlowGraphFile(bool* wbDontClose, Phases phase, PhasePositi } else if (strcmp(filename, "stdout") == 0) { - fgxFile = jitstdout; + fgxFile = jitstdout(); *wbDontClose = true; } else if (strcmp(filename, "stderr") == 0) @@ -3152,6 +3152,7 @@ void Compiler::fgDebugCheckFlags(GenTree* tree) // Some of these aren't handles to invariant data... if ((handleKind == GTF_ICON_STATIC_HDL) || // Pointer to a mutable class Static variable (handleKind == GTF_ICON_BBC_PTR) || // Pointer to a mutable basic block count value + (handleKind == GTF_ICON_FTN_ADDR) || // Pointer to a potentially mutable VM slot (handleKind == GTF_ICON_GLOBAL_PTR)) // Pointer to mutable data from the VM state { // For statics, we expect the GTF_GLOB_REF to be set. However, we currently @@ -3330,6 +3331,12 @@ void Compiler::fgDebugCheckFlagsHelper(GenTree* tree, GenTreeFlags actualFlags, // GenTreeFlags flagsToCheck = ~GTF_GLOB_REF & ~GTF_ORDER_SIDEEFF; + if (tree->isIndir() && tree->AsIndir()->Addr()->IsIconHandle(GTF_ICON_FTN_ADDR)) + { + // IND(ICON_FTN_ADDR) may or may not have GTF_IND_INVARIANT flag. + flagsToCheck &= ~GTF_IND_INVARIANT; + } + if ((actualFlags & ~expectedFlags & flagsToCheck) != 0) { // Print the tree so we can see it in the log. diff --git a/src/coreclr/jit/fgprofile.cpp b/src/coreclr/jit/fgprofile.cpp index 745bbe1ff7c54d..16d0b0e307010b 100644 --- a/src/coreclr/jit/fgprofile.cpp +++ b/src/coreclr/jit/fgprofile.cpp @@ -562,6 +562,10 @@ void BlockCountInstrumentor::BuildSchemaElements(BasicBlock* block, Schema& sche { numCountersPerProbe = 2; } + else if (JitConfig.JitCounterPadding() > 0) + { + numCountersPerProbe = (unsigned)JitConfig.JitCounterPadding(); + } // Remember the schema index for this block. // @@ -1743,6 +1747,10 @@ void EfficientEdgeCountInstrumentor::BuildSchemaElements(BasicBlock* block, Sche { numCountersPerProbe = 2; } + else if (JitConfig.JitCounterPadding() > 0) + { + numCountersPerProbe = (unsigned)JitConfig.JitCounterPadding(); + } // Walk the bbSparseProbeList, emitting one schema element per... // diff --git a/src/coreclr/jit/gentree.cpp b/src/coreclr/jit/gentree.cpp index d02ce4714d8a2e..d42175f98300ef 100644 --- a/src/coreclr/jit/gentree.cpp +++ b/src/coreclr/jit/gentree.cpp @@ -481,10 +481,12 @@ void GenTree::ReportOperBashing(FILE* f) #if MEASURE_NODE_SIZE -void GenTree::DumpNodeSizes(FILE* fp) +void GenTree::DumpNodeSizes() { // Dump the sizes of the various GenTree flavors + FILE* fp = jitstdout(); + fprintf(fp, "Small tree node size = %zu bytes\n", TREE_NODE_SZ_SMALL); fprintf(fp, "Large tree node size = %zu bytes\n", TREE_NODE_SZ_LARGE); fprintf(fp, "\n"); @@ -7696,7 +7698,6 @@ GenTree* Compiler::gtNewGenericCon(var_types type, uint8_t* cnsVal) READ_VALUE(int8_t); return gtNewIconNode(val); } - case TYP_BOOL: case TYP_UBYTE: { READ_VALUE(uint8_t); @@ -7790,7 +7791,6 @@ GenTree* Compiler::gtNewConWithPattern(var_types type, uint8_t pattern) { switch (type) { - case TYP_BOOL: case TYP_UBYTE: return gtNewIconNode(pattern); case TYP_BYTE: @@ -14279,7 +14279,7 @@ GenTree* Compiler::gtFoldBoxNullable(GenTree* tree) static_assert_no_msg(OFFSETOF__CORINFO_NullableOfT__hasValue == 0); GenTree* srcAddr = call->gtArgs.GetArgByIndex(1)->GetNode(); - GenTree* hasValueNode = gtNewIndir(TYP_BOOL, srcAddr); + GenTree* hasValueNode = gtNewIndir(TYP_UBYTE, srcAddr); if (op == op1) { @@ -14849,7 +14849,6 @@ GenTree* Compiler::gtFoldExprConst(GenTree* tree) i1 = INT32(UINT16(i1)); goto CNS_INT; - case TYP_BOOL: case TYP_UBYTE: i1 = INT32(UINT8(i1)); goto CNS_INT; @@ -19637,8 +19636,8 @@ GenTree* Compiler::gtNewSimdBinOpNode( } else { - assert(op2->TypeIs(type, simdBaseType, genActualType(simdBaseType)) || - (op2->TypeIs(TYP_SIMD12) && type == TYP_SIMD16)); + assert((genActualType(op2) == genActualType(type)) || (genActualType(op2) == genActualType(simdBaseType)) || + (op2->TypeIs(TYP_SIMD12) && (type == TYP_SIMD16))); } NamedIntrinsic intrinsic = NI_Illegal; @@ -21333,7 +21332,7 @@ GenTree* Compiler::gtNewSimdCmpOpAllNode( genTreeOps op, var_types type, GenTree* op1, GenTree* op2, CorInfoType simdBaseJitType, unsigned simdSize) { assert(IsBaselineSimdIsaSupportedDebugOnly()); - assert(type == TYP_BOOL); + assert(type == TYP_UBYTE); var_types simdType = getSIMDTypeForSize(simdSize); assert(varTypeIsSIMD(simdType)); @@ -21472,7 +21471,7 @@ GenTree* Compiler::gtNewSimdCmpOpAnyNode( genTreeOps op, var_types type, GenTree* op1, GenTree* op2, CorInfoType simdBaseJitType, unsigned simdSize) { assert(IsBaselineSimdIsaSupportedDebugOnly()); - assert(type == TYP_BOOL); + assert(type == TYP_UBYTE); var_types simdType = getSIMDTypeForSize(simdSize); assert(varTypeIsSIMD(simdType)); @@ -25471,6 +25470,54 @@ void GenTreeHWIntrinsic::Initialize(NamedIntrinsic intrinsicId) } } } + +//------------------------------------------------------------------------------ +// HWOperGet : Returns Oper based on the HWIntrinsicId +// +genTreeOps GenTreeHWIntrinsic::HWOperGet() +{ + switch (GetHWIntrinsicId()) + { +#if defined(TARGET_XARCH) + case NI_SSE_And: + case NI_SSE2_And: + case NI_AVX_And: + case NI_AVX2_And: +#elif defined(TARGET_ARM64) + case NI_AdvSimd_And: +#endif + { + return GT_AND; + } + +#if defined(TARGET_ARM64) + case NI_AdvSimd_Not: + { + return GT_NOT; + } +#endif + +#if defined(TARGET_XARCH) + case NI_SSE_Xor: + case NI_SSE2_Xor: + case NI_AVX_Xor: + case NI_AVX2_Xor: +#elif defined(TARGET_ARM64) + case NI_AdvSimd_Xor: +#endif + { + return GT_XOR; + } + + // TODO: Handle other cases + + default: + { + return GT_NONE; + } + } +} + #endif // FEATURE_HW_INTRINSICS //--------------------------------------------------------------------------------------- diff --git a/src/coreclr/jit/gentree.h b/src/coreclr/jit/gentree.h index 27688c3d41790d..dc115bd491e689 100644 --- a/src/coreclr/jit/gentree.h +++ b/src/coreclr/jit/gentree.h @@ -2311,7 +2311,7 @@ struct GenTree void SetIndirExceptionFlags(Compiler* comp); #if MEASURE_NODE_SIZE - static void DumpNodeSizes(FILE* fp); + static void DumpNodeSizes(); #endif #ifdef DEBUG @@ -6343,6 +6343,8 @@ struct GenTreeHWIntrinsic : public GenTreeJitIntrinsic static bool Equals(GenTreeHWIntrinsic* op1, GenTreeHWIntrinsic* op2); + genTreeOps HWOperGet(); + private: void SetHWIntrinsicId(NamedIntrinsic intrinsicId); @@ -8622,7 +8624,7 @@ struct GenCondition NONE, NONE, SGE, SGT, SLT, SLE, NS, S, NE, EQ, UGE, UGT, ULT, ULE, NC, C, FNEU, FEQU, FGEU, FGTU, FLTU, FLEU, NO, O, - FNE, FEQ, FGE, FGT, FLT, FGT, NP, P + FNE, FEQ, FGE, FGT, FLT, FLE, NP, P }; // clang-format on diff --git a/src/coreclr/jit/host.h b/src/coreclr/jit/host.h index c99a0601e499b0..0ccefae924e637 100644 --- a/src/coreclr/jit/host.h +++ b/src/coreclr/jit/host.h @@ -3,6 +3,8 @@ /*****************************************************************************/ +void jitprintf(const char* fmt, ...); + #ifdef DEBUG #undef printf @@ -44,7 +46,6 @@ extern "C" void ANALYZER_NORETURN __cdecl assertAbort(const char* why, const cha // Re-define printf in Release to use jitstdout (can be overwritten with DOTNET_JitStdOutFile=file) #undef printf #define printf jitprintf -void jitprintf(const char* fmt, ...); #undef assert #define assert(p) (void)0 @@ -55,7 +56,7 @@ void jitprintf(const char* fmt, ...); #define _HOST_H_ /*****************************************************************************/ -extern FILE* jitstdout; +FILE* jitstdout(); inline FILE* procstdout() { diff --git a/src/coreclr/jit/hwintrinsiccodegenarm64.cpp b/src/coreclr/jit/hwintrinsiccodegenarm64.cpp index d3ba9ae64ff77d..611f76d3a02691 100644 --- a/src/coreclr/jit/hwintrinsiccodegenarm64.cpp +++ b/src/coreclr/jit/hwintrinsiccodegenarm64.cpp @@ -486,6 +486,14 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node) break; } + case NI_ArmBase_Arm64_MultiplyLongAdd: + ins = varTypeIsUnsigned(intrin.baseType) ? INS_umaddl : INS_smaddl; + break; + + case NI_ArmBase_Arm64_MultiplyLongSub: + ins = varTypeIsUnsigned(intrin.baseType) ? INS_umsubl : INS_smsubl; + break; + default: ins = HWIntrinsicInfo::lookupIns(intrin.id, intrin.baseType); break; @@ -1112,6 +1120,13 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node) GetEmitter()->emitIns_R_R_R(ins, emitSize, targetReg, op2Reg, op3Reg, opt); break; } + + case NI_ArmBase_Arm64_MultiplyLongAdd: + case NI_ArmBase_Arm64_MultiplyLongSub: + assert(opt == INS_OPTS_NONE); + GetEmitter()->emitIns_R_R_R_R(ins, emitSize, targetReg, op1Reg, op2Reg, op3Reg); + break; + default: unreached(); } diff --git a/src/coreclr/jit/hwintrinsiclistarm64.h b/src/coreclr/jit/hwintrinsiclistarm64.h index 97c9b66ad149b6..3aebd051ecbb64 100644 --- a/src/coreclr/jit/hwintrinsiclistarm64.h +++ b/src/coreclr/jit/hwintrinsiclistarm64.h @@ -686,6 +686,9 @@ HARDWARE_INTRINSIC(ArmBase_Arm64, LeadingSignCount, HARDWARE_INTRINSIC(ArmBase_Arm64, LeadingZeroCount, 0, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_clz, INS_clz, INS_invalid, INS_invalid}, HW_Category_Scalar, HW_Flag_BaseTypeFromFirstArg|HW_Flag_NoFloatingPointUsed) HARDWARE_INTRINSIC(ArmBase_Arm64, MultiplyHigh, 0, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_smulh, INS_umulh, INS_invalid, INS_invalid}, HW_Category_Scalar, HW_Flag_NoFloatingPointUsed) HARDWARE_INTRINSIC(ArmBase_Arm64, ReverseElementBits, 0, 1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_rbit, INS_rbit, INS_invalid, INS_invalid}, HW_Category_Scalar, HW_Flag_NoFloatingPointUsed) +HARDWARE_INTRINSIC(ArmBase_Arm64, MultiplyLongAdd, 0, 3, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_smaddl, INS_umaddl, INS_invalid, INS_invalid}, HW_Category_Scalar, HW_Flag_SpecialCodeGen|HW_Flag_NoFloatingPointUsed) +HARDWARE_INTRINSIC(ArmBase_Arm64, MultiplyLongSub, 0, 3, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_smsubl, INS_umsubl, INS_invalid, INS_invalid}, HW_Category_Scalar, HW_Flag_SpecialCodeGen|HW_Flag_NoFloatingPointUsed) +HARDWARE_INTRINSIC(ArmBase_Arm64, MultiplyLongNeg, 0, 2, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_smnegl, INS_umnegl, INS_invalid, INS_invalid}, HW_Category_Scalar, HW_Flag_NoFloatingPointUsed) // *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** // ISA Function name SIMD size NumArg EncodesExtraTypeArg Instructions Category Flags diff --git a/src/coreclr/jit/hwintrinsicxarch.cpp b/src/coreclr/jit/hwintrinsicxarch.cpp index 488f65b5ac008d..065999982a87a9 100644 --- a/src/coreclr/jit/hwintrinsicxarch.cpp +++ b/src/coreclr/jit/hwintrinsicxarch.cpp @@ -3602,17 +3602,19 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, op2 = impSIMDPopStack(); op1 = impSIMDPopStack(); - if (unusedVal1) + // Consume operands we won't use, in case they have side effects. + // + if (unusedVal1 && !(*val1)->IsVectorZero()) { impAppendTree(gtUnusedValNode(*val1), CHECK_SPILL_ALL, impCurStmtDI); } - if (unusedVal2) + if (unusedVal2 && !(*val2)->IsVectorZero()) { impAppendTree(gtUnusedValNode(*val2), CHECK_SPILL_ALL, impCurStmtDI); } - if (unusedVal3) + if (unusedVal3 && !(*val3)->IsVectorZero()) { impAppendTree(gtUnusedValNode(*val3), CHECK_SPILL_ALL, impCurStmtDI); } diff --git a/src/coreclr/jit/importer.cpp b/src/coreclr/jit/importer.cpp index 278f386b410450..995068c10aef62 100644 --- a/src/coreclr/jit/importer.cpp +++ b/src/coreclr/jit/importer.cpp @@ -685,9 +685,9 @@ bool Compiler::impCheckImplicitArgumentCoercion(var_types sigType, var_types nod return true; } - if (TypeIs(sigType, TYP_BOOL, TYP_UBYTE, TYP_BYTE, TYP_USHORT, TYP_SHORT, TYP_UINT, TYP_INT)) + if (TypeIs(sigType, TYP_UBYTE, TYP_BYTE, TYP_USHORT, TYP_SHORT, TYP_UINT, TYP_INT)) { - if (TypeIs(nodeType, TYP_BOOL, TYP_UBYTE, TYP_BYTE, TYP_USHORT, TYP_SHORT, TYP_UINT, TYP_INT, TYP_I_IMPL)) + if (TypeIs(nodeType, TYP_UBYTE, TYP_BYTE, TYP_USHORT, TYP_SHORT, TYP_UINT, TYP_INT, TYP_I_IMPL)) { return true; } @@ -2990,7 +2990,7 @@ int Compiler::impBoxPatternMatch(CORINFO_RESOLVED_TOKEN* pResolvedToken, objToBox = impGetNodeAddr(objToBox, CHECK_SPILL_ALL, &indirFlags); static_assert_no_msg(OFFSETOF__CORINFO_NullableOfT__hasValue == 0); - impPushOnStack(gtNewIndir(TYP_BOOL, objToBox), typeInfo(TYP_INT)); + impPushOnStack(gtNewIndir(TYP_UBYTE, objToBox), typeInfo(TYP_INT)); JITDUMP("\n Importing BOX; ISINST; BR_TRUE/FALSE as nullableVT.hasValue\n"); return 1 + sizeof(mdToken); diff --git a/src/coreclr/jit/importercalls.cpp b/src/coreclr/jit/importercalls.cpp index fc2d2376541445..d340354d34ef1f 100644 --- a/src/coreclr/jit/importercalls.cpp +++ b/src/coreclr/jit/importercalls.cpp @@ -3227,13 +3227,13 @@ GenTree* Compiler::impIntrinsic(GenTree* newobjThis, break; } -#ifdef TARGET_ARM64 - // Intrinsify Interlocked.Or and Interlocked.And only for arm64-v8.1 (and newer) +#if defined(TARGET_ARM64) || defined(TARGET_RISCV64) + // Intrinsify Interlocked.Or and Interlocked.And only for arm64-v8.1 (and newer) and for RV64A // TODO-CQ: Implement for XArch (https://github.com/dotnet/runtime/issues/32239). case NI_System_Threading_Interlocked_Or: case NI_System_Threading_Interlocked_And: { - if (compOpportunisticallyDependsOn(InstructionSet_Atomics)) + ARM64_ONLY(if (compOpportunisticallyDependsOn(InstructionSet_Atomics))) { assert(sig->numArgs == 2); GenTree* op2 = impPopStack().val; @@ -3244,9 +3244,9 @@ GenTree* Compiler::impIntrinsic(GenTree* newobjThis, } break; } -#endif // TARGET_ARM64 +#endif // defined(TARGET_ARM64) || defined(TARGET_RISCV64) -#if defined(TARGET_XARCH) || defined(TARGET_ARM64) +#if defined(TARGET_XARCH) || defined(TARGET_ARM64) || defined(TARGET_RISCV64) // TODO-ARM-CQ: reenable treating InterlockedCmpXchg32 operation as intrinsic case NI_System_Threading_Interlocked_CompareExchange: { @@ -3320,7 +3320,7 @@ GenTree* Compiler::impIntrinsic(GenTree* newobjThis, retNode = op1; break; } -#endif // defined(TARGET_XARCH) || defined(TARGET_ARM64) +#endif // defined(TARGET_XARCH) || defined(TARGET_ARM64) || defined(TARGET_RISCV64) case NI_System_Threading_Interlocked_MemoryBarrier: case NI_System_Threading_Interlocked_ReadMemoryBarrier: @@ -9200,8 +9200,6 @@ NamedIntrinsic Compiler::lookupNamedIntrinsic(CORINFO_METHOD_HANDLE method) { if (strcmp(className, "Interlocked") == 0) { -#ifndef TARGET_ARM64 - // TODO-CQ: Implement for XArch (https://github.com/dotnet/runtime/issues/32239). if (strcmp(methodName, "And") == 0) { result = NI_System_Threading_Interlocked_And; @@ -9210,9 +9208,7 @@ NamedIntrinsic Compiler::lookupNamedIntrinsic(CORINFO_METHOD_HANDLE method) { result = NI_System_Threading_Interlocked_Or; } - else -#endif - if (strcmp(methodName, "CompareExchange") == 0) + else if (strcmp(methodName, "CompareExchange") == 0) { result = NI_System_Threading_Interlocked_CompareExchange; } diff --git a/src/coreclr/jit/importervectorization.cpp b/src/coreclr/jit/importervectorization.cpp index 0d89f45790661c..89d67112521007 100644 --- a/src/coreclr/jit/importervectorization.cpp +++ b/src/coreclr/jit/importervectorization.cpp @@ -200,7 +200,7 @@ GenTree* Compiler::impExpandHalfConstEqualsSIMD( // Optimization: use a single load when byteLen equals simdSize. // For code simplicity we always create nodes for two vectors case. const bool useSingleVector = simdSize == byteLen; - return gtNewSimdCmpOpAllNode(GT_EQ, TYP_BOOL, useSingleVector ? xor1 : orr, gtNewZeroConNode(simdType), baseType, + return gtNewSimdCmpOpAllNode(GT_EQ, TYP_UBYTE, useSingleVector ? xor1 : orr, gtNewZeroConNode(simdType), baseType, simdSize); // Codegen example for byteLen=40 and OrdinalIgnoreCase mode with AVX: @@ -486,7 +486,7 @@ GenTree* Compiler::impExpandHalfConstEquals(GenTreeLclVarCommon* data, JITDUMP("unable to compose indirCmp\n"); return nullptr; } - assert(indirCmp->TypeIs(TYP_INT, TYP_BOOL)); + assert(indirCmp->TypeIs(TYP_INT, TYP_UBYTE)); GenTreeColon* lenCheckColon = gtNewColonNode(TYP_INT, indirCmp, gtNewFalse()); diff --git a/src/coreclr/jit/inline.cpp b/src/coreclr/jit/inline.cpp index bae5755707594d..0ded3ef3482a70 100644 --- a/src/coreclr/jit/inline.cpp +++ b/src/coreclr/jit/inline.cpp @@ -480,7 +480,7 @@ void InlineContext::DumpData(unsigned indent) { const char* inlineReason = InlGetObservationString(m_Observation); printf("%*s%u,\"%s\",\"%s\",", indent, "", GetOrdinal(), inlineReason, calleeName); - m_Policy->DumpData(jitstdout); + m_Policy->DumpData(jitstdout()); printf("\n"); } diff --git a/src/coreclr/jit/instrsarm64.h b/src/coreclr/jit/instrsarm64.h index ee7483d5257c80..39d729b52de92b 100644 --- a/src/coreclr/jit/instrsarm64.h +++ b/src/coreclr/jit/instrsarm64.h @@ -1053,17 +1053,15 @@ INST1(ldarb, "ldarb", LD, IF_LS_2A, 0x08DFFC00) INST1(ldarh, "ldarh", LD, IF_LS_2A, 0x48DFFC00) // ldarh Rt,[Xn] LS_2A 0100100011011111 111111nnnnnttttt 48DF FC00 - -INST1(ldapr, "ldapr", LD, IF_LS_2A, 0xB8BFC000) +INST1(ldapr, "ldapr", LD, IF_LS_2A, 0xB8BFC000) // ldapr Rt,[Xn] LS_2A 1X11100010111111 110000nnnnnttttt B8BF C000 Rm Rt Rn ARMv8.3 LRCPC -INST1(ldaprb, "ldaprb", LD, IF_LS_2A, 0x38BFC000) +INST1(ldaprb, "ldaprb", LD, IF_LS_2A, 0x38BFC000) // ldaprb Rt,[Xn] LS_2A 0011100010111111 110000nnnnnttttt 38BF C000 Rm Rt Rn ARMv8.3 LRCPC -INST1(ldaprh, "ldaprh", LD, IF_LS_2A, 0x78BFC000) +INST1(ldaprh, "ldaprh", LD, IF_LS_2A, 0x78BFC000) // ldaprh Rt,[Xn] LS_2A 0111100010111111 110000nnnnnttttt 78BF C000 Rm Rt Rn ARMv8.3 LRCPC - INST1(ldxr, "ldxr", LD, IF_LS_2A, 0x885F7C00) // ldxr Rt,[Xn] LS_2A 1X00100001011111 011111nnnnnttttt 885F 7C00 @@ -1100,6 +1098,15 @@ INST1(ldursh, "ldursh", LD, IF_LS_2C, 0x78800000) INST1(ldursw, "ldursw", LD, IF_LS_2C, 0xB8800000) // ldursw Rt,[Xn+simm9] LS_2C 10111000100iiiii iiii00nnnnnttttt B880 0000 [Xn imm(-256..+255)] +INST1(ldapur, "ldapur", LD, IF_LS_2C, 0x99400000) + // ldapur Rt,[Xn+simm9] LS_2C 1X011001010iiiii iiii00nnnnnttttt 9940 0000 [Xn imm(-256..+255)] ARMv8.4 RCPC2 + +INST1(ldapurb, "ldapurb", LD, IF_LS_2C, 0x19400000) + // ldapurb Rt,[Xn+simm9] LS_2C 00011001010iiiii iiii00nnnnnttttt 1940 0000 [Xn imm(-256..+255)] ARMv8.4 RCPC2 + +INST1(ldapurh, "ldapurh", LD, IF_LS_2C, 0x59400000) + // ldapurh Rt,[Xn+simm9] LS_2C 01011001010iiiii iiii00nnnnnttttt 5940 0000 [Xn imm(-256..+255)] ARMv8.4 RCPC2 + INST1(stlr, "stlr", ST, IF_LS_2A, 0x889FFC00) // stlr Rt,[Xn] LS_2A 1X00100010011111 111111nnnnnttttt 889F FC00 @@ -1136,6 +1143,15 @@ INST1(sturb, "sturb", ST, IF_LS_2C, 0x38000000) INST1(sturh, "sturh", ST, IF_LS_2C, 0x78000000) // sturh Rt,[Xn+simm9] LS_2C 01111000000iiiii iiii00nnnnnttttt 7800 0000 [Xn imm(-256..+255)] +INST1(stlur, "stlur", ST, IF_LS_2C, 0x99000000) + // stlur Rt,[Xn+simm9] LS_2C 1X011001000iiiii iiii00nnnnnttttt 9900 0000 [Xn imm(-256..+255)] ARMv8.4 RCPC2 + +INST1(stlurb, "stlurb", ST, IF_LS_2C, 0x19000000) + // stlurb Rt,[Xn+simm9] LS_2C 00011001000iiiii iiii00nnnnnttttt 1900 0000 [Xn imm(-256..+255)] ARMv8.4 RCPC2 + +INST1(stlurh, "stlurh", ST, IF_LS_2C, 0x59000000) + // stlurh Rt,[Xn+simm9] LS_2C 01011001000iiiii iiii00nnnnnttttt 5900 0000 [Xn imm(-256..+255)] ARMv8.4 RCPC2 + INST1(casb, "casb", LD|ST, IF_LS_3E, 0x08A07C00) // casb Wm, Wt, [Xn] LS_3E 00001000101mmmmm 011111nnnnnttttt 08A0 7C00 Rm Rt Rn ARMv8.1 LSE Atomics diff --git a/src/coreclr/jit/instrsriscv64.h b/src/coreclr/jit/instrsriscv64.h index 5438ebb4494d41..502a08d716469f 100644 --- a/src/coreclr/jit/instrsriscv64.h +++ b/src/coreclr/jit/instrsriscv64.h @@ -241,6 +241,29 @@ INST(fcvt_d_l, "fcvt.d.l", 0, 0xd2200053) INST(fcvt_d_lu, "fcvt.d.lu", 0, 0xd2300053) INST(fmv_d_x, "fmv.d.x", 0, 0xf2000053) +// RV32A + RV64A (R-type, R_R_R) +INST(lr_w, "lr.w", 0, 0x1000202f) // funct5:00010 +INST(lr_d, "lr.d", 0, 0x1000302f) // funct5:00010 +INST(sc_w, "sc.w", 0, 0x1800202f) // funct5:00011 +INST(sc_d, "sc.d", 0, 0x1800302f) // funct5:00011 +INST(amoswap_w, "amoswap.w", 0, 0x0800202f) // funct5:00001 +INST(amoswap_d, "amoswap.d", 0, 0x0800302f) // funct5:00001 +INST(amoadd_w, "amoadd.w", 0, 0x0000202f) // funct5:00000 +INST(amoadd_d, "amoadd.d", 0, 0x0000302f) // funct5:00000 +INST(amoxor_w, "amoxor.w", 0, 0x2000202f) // funct5:00100 +INST(amoxor_d, "amoxor.d", 0, 0x2000302f) // funct5:00100 +INST(amoand_w, "amoand.w", 0, 0x6000202f) // funct5:01100 +INST(amoand_d, "amoand.d", 0, 0x6000302f) // funct5:01100 +INST(amoor_w, "amoor.w", 0, 0x4000202f) // funct5:01000 +INST(amoor_d, "amoor.d", 0, 0x4000302f) // funct5:01000 +INST(amomin_w, "amomin.w", 0, 0x8000202f) // funct5:10000 +INST(amomin_d, "amomin.d", 0, 0x8000302f) // funct5:10000 +INST(amomax_w, "amomax.w", 0, 0xa000202f) // funct5:10100 +INST(amomax_d, "amomax.d", 0, 0xa000302f) // funct5:10100 +INST(amominu_w, "amominu.w", 0, 0xc000202f) // funct5:11000 +INST(amominu_d, "amominu.d", 0, 0xc000302f) // funct5:11000 +INST(amomaxu_w, "amomaxu.w", 0, 0xe000202f) // funct5:11100 +INST(amomaxu_d, "amomaxu.d", 0, 0xe000302f) // funct5:11100 // clang-format on /*****************************************************************************/ #undef INST diff --git a/src/coreclr/jit/jitconfigvalues.h b/src/coreclr/jit/jitconfigvalues.h index ae01210a3934c4..a98448beac325a 100644 --- a/src/coreclr/jit/jitconfigvalues.h +++ b/src/coreclr/jit/jitconfigvalues.h @@ -442,8 +442,6 @@ CONFIG_INTEGER(JitOptRepeatCount, W("JitOptRepeatCount"), 2) // Number of times CONFIG_INTEGER(JitDoIfConversion, W("JitDoIfConversion"), 1) // Perform If conversion #endif // defined(OPT_CONFIG) -CONFIG_INTEGER(JitTelemetry, W("JitTelemetry"), 1) // If non-zero, gather JIT telemetry data - // Max # of MapSelect's considered for a particular top-level invocation. CONFIG_INTEGER(JitVNMapSelBudget, W("JitVNMapSelBudget"), DEFAULT_MAP_SELECT_BUDGET) @@ -577,6 +575,7 @@ CONFIG_STRING(JitEnablePatchpointRange, W("JitEnablePatchpointRange")) // Profile instrumentation options CONFIG_INTEGER(JitInterlockedProfiling, W("JitInterlockedProfiling"), 0) CONFIG_INTEGER(JitScalableProfiling, W("JitScalableProfiling"), 1) +CONFIG_INTEGER(JitCounterPadding, W("JitCounterPadding"), 0) // number of unused extra slots per counter CONFIG_INTEGER(JitMinimalJitProfiling, W("JitMinimalJitProfiling"), 1) CONFIG_INTEGER(JitMinimalPrejitProfiling, W("JitMinimalPrejitProfiling"), 0) diff --git a/src/coreclr/jit/jitstd/vector.h b/src/coreclr/jit/jitstd/vector.h index 69f67817ecb6e9..1ba2b295804f96 100644 --- a/src/coreclr/jit/jitstd/vector.h +++ b/src/coreclr/jit/jitstd/vector.h @@ -318,7 +318,7 @@ vector::vector(const vector& vec) template vector::vector(const vector& vec) : m_allocator(vec.m_allocator) - , m_pArray(m_allocator.allocate(vec.m_nSize)) + , m_pArray(vec.m_nSize>0 ? m_allocator.allocate(vec.m_nSize) : nullptr) , m_nSize(vec.m_nSize) , m_nCapacity(vec.m_nSize) { diff --git a/src/coreclr/jit/jittelemetry.cpp b/src/coreclr/jit/jittelemetry.cpp deleted file mode 100644 index f02874c78543ab..00000000000000 --- a/src/coreclr/jit/jittelemetry.cpp +++ /dev/null @@ -1,387 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -/*****************************************************************************/ -// clrjit -// -// This class abstracts the telemetry information collected for the JIT. -// -// Goals: -// 1. Telemetry information should be a NO-op when JIT level telemetry is disabled. -// 2. Data collection should be actionable. -// 3. Data collection should comply to privacy rules. -// 4. Data collection cannot impact JIT/OS performance. -// 5. Data collection volume should be manageable by our remote services. -// -// DESIGN CONCERNS: -// -// > To collect data, we use the TraceLogging API provided by Windows. -// -// The brief workflow suggested is: -// #include -// TRACELOGGING_DEFINE_PROVIDER( // defines g_hProvider -// g_hProvider, // Name of the provider variable -// "MyProvider", // Human-readable name of the provider -// (0xb3864c38, 0x4273, 0x58c5, 0x54, 0x5b, 0x8b, 0x36, 0x08, 0x34, 0x34, 0x71)); // Provider GUID -// int main(int argc, char* argv[]) // or DriverEntry for kernel-mode. -// { -// TraceLoggingRegister(g_hProvider, NULL, NULL, NULL); // NULLs only needed for C. Please do not include the -// // NULLs in C++ code. -// TraceLoggingWrite(g_hProvider, -// "MyEvent1", -// TraceLoggingString(argv[0], "arg0"), -// TraceLoggingInt32(argc)); -// TraceLoggingUnregister(g_hProvider); -// return 0; -// } -// -// In summary, this involves: -// 1. Creating a binary/DLL local provider using: -// TRACELOGGING_DEFINE_PROVIDER(g_hProvider, "ProviderName", providerId, [option]) -// 2. Registering the provider instance -// TraceLoggingRegister(g_hProvider) -// 3. Perform TraceLoggingWrite operations to write out data. -// 4. Unregister the provider instance. -// TraceLoggingUnregister(g_hProvider) -// -// A. Determining where to create the provider instance? -// 1) We use the same provider name/GUID as the CLR and the CLR creates its own DLL local provider handle. -// For CLRJIT.dll, the question is, can the same provider name/GUIDs be shared across binaries? -// -// Answer: -// "For TraceLogging providers, it is okay to use the same provider GUID / name -// in different binaries. Do not share the same provider handle across DLLs. -// As long as you do not pass an hProvider from one DLL to another, TraceLogging -// will properly keep track of the events." -// -// 2) CoreCLR is linked into the CLR. CLR already creates an instance, so where do we create the JIT's instance? -// Answer: -// "Ideally you would have one provider per DLL, but if you're folding distinct sets -// of functionality into one DLL (like shell32.dll or similar sort of catch-all things) -// you can have perhaps a few more providers per binary." -// -// B. Determining where to register and unregister the provider instance? -// 1) For CLRJIT.dll we can register the provider instance during jitDllOnProcessAttach. -// Since one of our goals is to turn telemetry off, we need to be careful about -// referencing environment variables during the DLL load and unload path. -// Referencing environment variables through ConfigDWORD uses UtilCode. -// This roughly translates to InitUtilcode() being called before jitDllOnProcessAttach. -// -// For CLRJIT.dll, compStartup is called on jitOnDllProcessAttach(). -// -// 2) For CLRJIT.dll and CoreCLR, compShutdown will be called during jitOnDllProcessDetach(). -// -// C. Determining the data to collect: -// -// IMPORTANT: Since telemetry data can be collected at any time after DLL load, -// make sure you initialize the compiler state variables you access in telemetry -// data collection. For example, if you are transmitting method names, then -// make sure info.compMethodHnd is initialized at that point. -// -// 1) Tracking noway assert count: -// After a noway assert is hit, in both min-opts and non-min-opts, we collect -// info such as the JIT version, method hash being compiled, filename and -// line number etc. -// -// 2) Tracking baseline for the noway asserts: -// During DLL unload, we report the number of methods that were compiled by -// the JIT per process both under normal mode and during min-opts. NOTE that -// this is ON for all processes. -// -// 3) For the future, be aware of privacy, performance and actionability of the data. -// - -#include "jitpch.h" -#include "compiler.h" - -#ifdef FEATURE_TRACELOGGING -#include "TraceLoggingProvider.h" -#include "MicrosoftTelemetry.h" -#include "clrtraceloggingcommon.h" -#include "fxver.h" - -// Since telemetry code could be called under a noway_assert, make sure, -// we don't call noway_assert again. -#undef noway_assert - -#define BUILD_STR1(x) #x -#define BUILD_STR2(x) BUILD_STR1(x) -#define BUILD_MACHINE BUILD_STR2(__BUILDMACHINE__) - -// A DLL local instance of the DotNet provider -TRACELOGGING_DEFINE_PROVIDER(g_hClrJitProvider, - CLRJIT_PROVIDER_NAME, - CLRJIT_PROVIDER_ID, - TraceLoggingOptionMicrosoftTelemetry()); - -// Threshold to detect if we are hitting too many bad (noway) methods -// over good methods per process to prevent logging too much data. -static const double NOWAY_NOISE_RATIO = 0.6; // Threshold of (bad / total) beyond which we'd stop - // logging. We'd restart if the pass rate improves. -static const unsigned NOWAY_SUFFICIENCY_THRESHOLD = 25; // Count of methods beyond which we'd apply percent - // threshold - -// Initialize Telemetry State -volatile bool JitTelemetry::s_fProviderRegistered = false; -volatile UINT32 JitTelemetry::s_uMethodsCompiled = 0; -volatile UINT32 JitTelemetry::s_uMethodsHitNowayAssert = 0; - -// Constructor for telemetry state per compiler instance -JitTelemetry::JitTelemetry() -{ - Initialize(nullptr); -} - -//------------------------------------------------------------------------ -// Initialize: Initialize the object with the compiler instance -// -// Description: -// Compiler instance may not be fully initialized. If you are -// tracking object data for telemetry, make sure they are initialized -// in the compiler is ready. -// -void JitTelemetry::Initialize(Compiler* c) -{ - comp = c; - m_pszAssemblyName = ""; - m_pszScopeName = ""; - m_pszMethodName = ""; - m_uMethodHash = 0; - m_fMethodInfoCached = false; -} - -//------------------------------------------------------------------------ -// IsTelemetryEnabled: Can we perform JIT telemetry -// -// Return Value: -// Returns "true" if DOTNET_JitTelemetry environment flag is -// non-zero. Else returns "false". -// -// -/* static */ -bool JitTelemetry::IsTelemetryEnabled() -{ - return JitConfig.JitTelemetry() != 0; -} - -//------------------------------------------------------------------------ -// NotifyDllProcessAttach: Notification for DLL load and static initializations -// -// Description: -// Register telemetry provider with the OS. -// -// Note: -// This method can be called twice in NGEN scenario. -// -void JitTelemetry::NotifyDllProcessAttach() -{ - if (!IsTelemetryEnabled()) - { - return; - } - - if (!s_fProviderRegistered) - { - // Register the provider. - TraceLoggingRegister(g_hClrJitProvider); - s_fProviderRegistered = true; - } -} - -//------------------------------------------------------------------------ -// NotifyDllProcessDetach: Notification for DLL unload and teardown -// -// Description: -// Log the methods compiled data if telemetry is enabled and -// Unregister telemetry provider with the OS. -// -void JitTelemetry::NotifyDllProcessDetach() -{ - if (!IsTelemetryEnabled()) - { - return; - } - - assert(s_fProviderRegistered); // volatile read - - // Unregister the provider. - TraceLoggingUnregister(g_hClrJitProvider); -} - -//------------------------------------------------------------------------ -// NotifyEndOfCompilation: Notification for end of current method -// compilation. -// -// Description: -// Increment static volatile counters for the current compiled method. -// This is slightly inaccurate due to lack of synchronization around -// the counters. Inaccuracy is the tradeoff for JITting cost. -// -// Note: -// 1. Must be called post fully successful compilation of the method. -// 2. This serves as an effective baseline as how many methods compiled -// successfully. -void JitTelemetry::NotifyEndOfCompilation() -{ - if (!IsTelemetryEnabled()) - { - return; - } - - s_uMethodsCompiled++; // volatile increment -} - -//------------------------------------------------------------------------ -// NotifyNowayAssert: Notification that a noway handling is under-way. -// -// Arguments: -// filename - The JIT source file name's absolute path at the time of -// building the JIT. -// line - The line number where the noway assert was hit. -// -// Description: -// If telemetry is enabled, then obtain data to collect from the -// compiler or the VM and use the tracelogging APIs to write out. -// -void JitTelemetry::NotifyNowayAssert(const char* filename, unsigned line) -{ - if (!IsTelemetryEnabled()) - { - return; - } - - s_uMethodsHitNowayAssert++; - - // Check if our assumption that noways are rare is invalid for this - // process. If so, return early than logging too much data. - unsigned noways = s_uMethodsHitNowayAssert; - unsigned attempts = max(1, s_uMethodsCompiled + noways); - double ratio = (noways / ((double)attempts)); - if (noways > NOWAY_SUFFICIENCY_THRESHOLD && ratio > NOWAY_NOISE_RATIO) - { - return; - } - - assert(comp); - - UINT32 nowayIndex = s_uMethodsHitNowayAssert; - UINT32 codeSize = 0; - INT32 minOpts = -1; - const char* lastPhase = ""; - if (comp != nullptr) - { - codeSize = comp->info.compILCodeSize; - minOpts = comp->opts.IsMinOptsSet() ? comp->opts.MinOpts() : -1; - lastPhase = PhaseNames[comp->mostRecentlyActivePhase]; - } - - CacheCurrentMethodInfo(); - - TraceLoggingWrite(g_hClrJitProvider, "CLRJIT.NowayAssert", - - TraceLoggingUInt32(codeSize, "IL_CODE_SIZE"), TraceLoggingInt32(minOpts, "MINOPTS_MODE"), - TraceLoggingString(lastPhase, "PREVIOUS_COMPLETED_PHASE"), - - TraceLoggingString(m_pszAssemblyName, "ASSEMBLY_NAME"), - TraceLoggingString(m_pszMethodName, "METHOD_NAME"), - TraceLoggingString(m_pszScopeName, "METHOD_SCOPE"), - TraceLoggingUInt32(m_uMethodHash, "METHOD_HASH"), - - TraceLoggingString(filename, "FILENAME"), TraceLoggingUInt32(line, "LINE"), - TraceLoggingUInt32(nowayIndex, "NOWAY_INDEX"), - - TraceLoggingString(TARGET_READABLE_NAME, "ARCH"), - TraceLoggingString(VER_FILEVERSION_STR, "VERSION"), TraceLoggingString(BUILD_MACHINE, "BUILD"), - TraceLoggingString(VER_COMMENTS_STR, "FLAVOR"), - - TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES)); -} - -//------------------------------------------------------------------------ -// CacheCurrentMethodInfo: Cache the method/assembly/scope name info. -// -// Description: -// Obtain the method information if not already cached, for the -// method under compilation from the compiler. This includes: -// -// Method name, assembly name, scope name, method hash. -// -void JitTelemetry::CacheCurrentMethodInfo() -{ - if (m_fMethodInfoCached) - { - return; - } - - assert(comp); - if (comp != nullptr) - { - comp->compGetTelemetryDefaults(&m_pszAssemblyName, &m_pszScopeName, &m_pszMethodName, &m_uMethodHash); - assert(m_pszAssemblyName); - assert(m_pszScopeName); - assert(m_pszMethodName); - } - - // Set cached to prevent getting this twice. - m_fMethodInfoCached = true; -} - -//------------------------------------------------------------------------ -// compGetTelemetryDefaults: Obtain information specific to telemetry -// from the JIT-interface. -// -// Arguments: -// assemblyName - Pointer to hold assembly name upon return -// scopeName - Pointer to hold scope name upon return -// methodName - Pointer to hold method name upon return -// methodHash - Pointer to hold method hash upon return -// -// Description: -// Obtains from the JIT EE interface the information for the -// current method under compilation. -// -// Warning: -// The eeGetMethodName call could be expensive for generic -// methods, so call this method only when there is less impact -// to throughput. -// -void Compiler::compGetTelemetryDefaults(const char** assemblyName, - const char** scopeName, - const char** methodName, - unsigned* methodHash) -{ - if (info.compMethodHnd != nullptr) - { - __try - { - - // Expensive calls, call infrequently or in exceptional scenarios. - *methodHash = info.compCompHnd->getMethodHash(info.compMethodHnd); - *methodName = eeGetMethodName(info.compMethodHnd, scopeName); - - // SuperPMI needs to implement record/replay of these method calls. - *assemblyName = info.compCompHnd->getAssemblyName( - info.compCompHnd->getModuleAssembly(info.compCompHnd->getClassModule(info.compClassHnd))); - } - __except (EXCEPTION_EXECUTE_HANDLER) - { - } - } - - // If the JIT interface methods init-ed these values to nullptr, - // make sure they are set to empty string. - if (*methodName == nullptr) - { - *methodName = ""; - } - if (*scopeName == nullptr) - { - *scopeName = ""; - } - if (*assemblyName == nullptr) - { - *assemblyName = ""; - } -} - -#endif // FEATURE_TRACELOGGING diff --git a/src/coreclr/jit/jittelemetry.h b/src/coreclr/jit/jittelemetry.h deleted file mode 100644 index dd5a7b8fecb429..00000000000000 --- a/src/coreclr/jit/jittelemetry.h +++ /dev/null @@ -1,77 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -/*****************************************************************************/ -// clrjit -#pragma once - -#ifdef FEATURE_TRACELOGGING - -class Compiler; - -class JitTelemetry -{ -public: - // Notify DLL load. - static void NotifyDllProcessAttach(); - - // Notify DLL unload. - static void NotifyDllProcessDetach(); - - // Constructor - JitTelemetry(); - - // Initialize with compiler instance - void Initialize(Compiler* comp); - - // Notification of end of compilation of the current method. - void NotifyEndOfCompilation(); - - // Notification of noway_assert. - void NotifyNowayAssert(const char* filename, unsigned line); - - // Is telemetry enabled through DOTNET_JitTelemetry? - static bool IsTelemetryEnabled(); - -private: - // Obtain current method information from VM and cache for - // future uses. - void CacheCurrentMethodInfo(); - - // - //-------------------------------------------------------------------------------- - // The below per process counters are updated without synchronization or - // thread-safety to avoid interfering with the JIT throughput. Accuracy - // of these counters will be traded-off for throughput. - // - - // Methods compiled per DLL unload - static volatile UINT32 s_uMethodsCompiled; - - // Methods compiled per DLL unload that hit noway assert (per process) - static volatile UINT32 s_uMethodsHitNowayAssert; - //-------------------------------------------------------------------------------- - - // Has the provider been registered already (per process) - static volatile bool s_fProviderRegistered; - - // Cached value of current method hash. - unsigned m_uMethodHash; - - // Cached value of current assembly name. - const char* m_pszAssemblyName; - - // Cached value of current scope name, i.e., "Program.Foo" in "Program.Foo:Main" - const char* m_pszScopeName; - - // Cached value of current method name, i.e., "Main" in "Program.Foo:Main" - const char* m_pszMethodName; - - // Have we already cached the method/scope/assembly names? - bool m_fMethodInfoCached; - - // Compiler instance. - Compiler* comp; -}; - -#endif // FEATURE_TRACELOGGING diff --git a/src/coreclr/jit/lclmorph.cpp b/src/coreclr/jit/lclmorph.cpp index 666e659e0ed28b..11be8bdad550e9 100644 --- a/src/coreclr/jit/lclmorph.cpp +++ b/src/coreclr/jit/lclmorph.cpp @@ -1144,13 +1144,6 @@ class LocalAddressVisitor final : public GenTreeVisitor return IndirTransform::LclVar; } - // Bool and ubyte are the same type. - if ((indir->TypeIs(TYP_BOOL) && (varDsc->TypeGet() == TYP_UBYTE)) || - (indir->TypeIs(TYP_UBYTE) && (varDsc->TypeGet() == TYP_BOOL))) - { - return IndirTransform::LclVar; - } - // For small stores we can ignore the signed/unsigned diff. if (isDef && (varTypeToSigned(indir) == varTypeToSigned(varDsc))) { diff --git a/src/coreclr/jit/lclvars.cpp b/src/coreclr/jit/lclvars.cpp index e7c9a49ea48250..e1a23da69d4a56 100644 --- a/src/coreclr/jit/lclvars.cpp +++ b/src/coreclr/jit/lclvars.cpp @@ -1501,11 +1501,6 @@ void Compiler::lvaInitVarDsc(LclVarDsc* varDsc, varDsc->lvType = type; } - if (type == TYP_BOOL) - { - varDsc->lvIsBoolean = true; - } - #ifdef DEBUG varDsc->SetStackOffset(BAD_STK_OFFS); #endif @@ -4078,7 +4073,6 @@ void Compiler::lvaMarkLclRefs(GenTree* tree, BasicBlock* block, Statement* stmt, { if (varDsc->IsAddressExposed()) { - varDsc->lvIsBoolean = false; varDsc->lvAllDefsAreNoGc = false; } @@ -4101,34 +4095,6 @@ void Compiler::lvaMarkLclRefs(GenTree* tree, BasicBlock* block, Statement* stmt, varDsc->lvAllDefsAreNoGc = false; } - if (value->gtType != TYP_BOOL) - { - // Is the value clearly a boolean one? - switch (value->gtOper) - { - case GT_CNS_INT: - if (value->AsIntCon()->gtIconVal == 0) - { - break; - } - if (value->AsIntCon()->gtIconVal == 1) - { - break; - } - - // Not 0 or 1, fall through .... - FALLTHROUGH; - default: - if (value->OperIsCompare()) - { - break; - } - - varDsc->lvIsBoolean = false; - break; - } - } - if (!varDsc->lvDisqualifySingleDefRegCandidate) // If this var is already disqualified, we can skip this { bool bbInALoop = (block->bbFlags & BBF_BACKWARD_JUMP) != 0; diff --git a/src/coreclr/jit/liveness.cpp b/src/coreclr/jit/liveness.cpp index 517dc848dc6b35..62f0e1784a1d37 100644 --- a/src/coreclr/jit/liveness.cpp +++ b/src/coreclr/jit/liveness.cpp @@ -1046,6 +1046,7 @@ void Compiler::fgExtendDbgLifetimes() // block - the block in question // ehHandlerLiveVars - On entry, contains an allocated VARSET_TP that the // function will add handler live vars into. +// memoryLiveness - Set of memory liveness that will be added to. // // Notes: // Assumes caller has screened candidate blocks to only those with @@ -1073,7 +1074,7 @@ void Compiler::fgExtendDbgLifetimes() // Console.WriteLine("In catch 1"); // } // -void Compiler::fgAddHandlerLiveVars(BasicBlock* block, VARSET_TP& ehHandlerLiveVars) +void Compiler::fgAddHandlerLiveVars(BasicBlock* block, VARSET_TP& ehHandlerLiveVars, MemoryKindSet& memoryLiveness) { assert(block->HasPotentialEHSuccs(this)); @@ -1087,6 +1088,7 @@ void Compiler::fgAddHandlerLiveVars(BasicBlock* block, VARSET_TP& ehHandlerLiveV if (HBtab->HasFilter()) { VarSetOps::UnionD(this, ehHandlerLiveVars, HBtab->ebdFilter->bbLiveIn); + memoryLiveness |= HBtab->ebdFilter->bbMemoryLiveIn; #if defined(FEATURE_EH_FUNCLETS) // The EH subsystem can trigger a stack walk after the filter // has returned, but before invoking the handler, and the only @@ -1095,11 +1097,13 @@ void Compiler::fgAddHandlerLiveVars(BasicBlock* block, VARSET_TP& ehHandlerLiveV // must report as live any variables live-out of the filter // (which is the same as those live-in to the handler) VarSetOps::UnionD(this, ehHandlerLiveVars, HBtab->ebdHndBeg->bbLiveIn); + memoryLiveness |= HBtab->ebdHndBeg->bbMemoryLiveIn; #endif // FEATURE_EH_FUNCLETS } else { VarSetOps::UnionD(this, ehHandlerLiveVars, HBtab->ebdHndBeg->bbLiveIn); + memoryLiveness |= HBtab->ebdHndBeg->bbMemoryLiveIn; } /* If we have nested try's edbEnclosing will provide them */ @@ -1118,8 +1122,9 @@ void Compiler::fgAddHandlerLiveVars(BasicBlock* block, VARSET_TP& ehHandlerLiveV if (bbInFilterBBRange(block)) { - block->VisitEHSecondPassSuccs(this, [this, &ehHandlerLiveVars](BasicBlock* succ) { + block->VisitEHSecondPassSuccs(this, [this, &ehHandlerLiveVars, &memoryLiveness](BasicBlock* succ) { VarSetOps::UnionD(this, ehHandlerLiveVars, succ->bbLiveIn); + memoryLiveness |= succ->bbMemoryLiveIn; return BasicBlockVisit::Continue; }); } @@ -1190,8 +1195,11 @@ class LiveVarAnalysis } } - // Additionally, union in all the live-in tracked vars of successors. - block->VisitAllSuccs(m_compiler, [=](BasicBlock* succ) { + // Additionally, union in all the live-in tracked vars of regular + // successors. EH successors need to be handled more conservatively + // (their live-in state is live in this entire basic block). Those are + // handled below. + block->VisitRegularSuccs(m_compiler, [=](BasicBlock* succ) { VarSetOps::UnionD(m_compiler, m_liveOut, succ->bbLiveIn); m_memoryLiveOut |= succ->bbMemoryLiveIn; if (succ->bbNum <= block->bbNum) @@ -1214,16 +1222,12 @@ class LiveVarAnalysis /* Compute the 'm_liveIn' set */ VarSetOps::LivenessD(m_compiler, m_liveIn, block->bbVarDef, block->bbVarUse, m_liveOut); - // Even if block->bbMemoryDef is set, we must assume that it doesn't kill memory liveness from m_memoryLiveOut, - // since (without proof otherwise) the use and def may touch different memory at run-time. - m_memoryLiveIn = m_memoryLiveOut | block->bbMemoryUse; - // Does this block have implicit exception flow to a filter or handler? // If so, include the effects of that flow. if (block->HasPotentialEHSuccs(m_compiler)) { VarSetOps::ClearD(m_compiler, m_ehHandlerLiveVars); - m_compiler->fgAddHandlerLiveVars(block, m_ehHandlerLiveVars); + m_compiler->fgAddHandlerLiveVars(block, m_ehHandlerLiveVars, m_memoryLiveOut); VarSetOps::UnionD(m_compiler, m_liveIn, m_ehHandlerLiveVars); VarSetOps::UnionD(m_compiler, m_liveOut, m_ehHandlerLiveVars); @@ -1232,7 +1236,11 @@ class LiveVarAnalysis m_hasPossibleBackEdge = true; } - /* Has there been any change in either live set? */ + // Even if block->bbMemoryDef is set, we must assume that it doesn't kill memory liveness from m_memoryLiveOut, + // since (without proof otherwise) the use and def may touch different memory at run-time. + m_memoryLiveIn = m_memoryLiveOut | block->bbMemoryUse; + + // Has there been any change in either live set? bool liveInChanged = !VarSetOps::Equal(m_compiler, block->bbLiveIn, m_liveIn); if (liveInChanged || !VarSetOps::Equal(m_compiler, block->bbLiveOut, m_liveOut)) @@ -2525,7 +2533,8 @@ void Compiler::fgInterBlockLocalVarLiveness() if (block->HasPotentialEHSuccs(this)) { - fgAddHandlerLiveVars(block, volatileVars); + MemoryKindSet memoryLiveness = 0; + fgAddHandlerLiveVars(block, volatileVars, memoryLiveness); // volatileVars is a subset of exceptVars noway_assert(VarSetOps::IsSubset(this, volatileVars, exceptVars)); diff --git a/src/coreclr/jit/lower.cpp b/src/coreclr/jit/lower.cpp index 81df694f05e1ff..25cfb5409d957a 100644 --- a/src/coreclr/jit/lower.cpp +++ b/src/coreclr/jit/lower.cpp @@ -498,9 +498,16 @@ GenTree* Lowering::LowerNode(GenTree* node) case GT_NEG: #ifdef TARGET_ARM64 + { + GenTree* next = TryLowerNegToMulLongOp(node->AsOp()); + if (next != nullptr) + { + return next; + } ContainCheckNeg(node->AsOp()); + } #endif - break; + break; case GT_SELECT: return LowerSelect(node->AsConditional()); @@ -1150,10 +1157,6 @@ GenTree* Lowering::LowerSwitch(GenTree* node) bool Lowering::TryLowerSwitchToBitTest( BasicBlock* jumpTable[], unsigned jumpCount, unsigned targetCount, BasicBlock* bbSwitch, GenTree* switchValue) { -#ifndef TARGET_XARCH - // Other architectures may use this if they substitute GT_BT with equivalent code. - return false; -#else assert(jumpCount >= 2); assert(targetCount >= 2); assert(bbSwitch->bbJumpKind == BBJ_SWITCH); @@ -1223,7 +1226,7 @@ bool Lowering::TryLowerSwitchToBitTest( return false; } -#ifdef TARGET_64BIT +#if defined(TARGET_64BIT) && defined(TARGET_XARCH) // // See if we can avoid a 8 byte immediate on 64 bit targets. If all upper 32 bits are 1 // then inverting the bit table will make them 0 so that the table now fits in 32 bits. @@ -1270,20 +1273,31 @@ bool Lowering::TryLowerSwitchToBitTest( comp->fgAddRefPred(bbCase1, bbSwitch); } + var_types bitTableType = (bitCount <= (genTypeSize(TYP_INT) * 8)) ? TYP_INT : TYP_LONG; + GenTree* bitTableIcon = comp->gtNewIconNode(bitTable, bitTableType); + +#ifdef TARGET_XARCH // // Append BT(bitTable, switchValue) and JCC(condition) to the switch block. // - - var_types bitTableType = (bitCount <= (genTypeSize(TYP_INT) * 8)) ? TYP_INT : TYP_LONG; - GenTree* bitTableIcon = comp->gtNewIconNode(bitTable, bitTableType); - GenTree* bitTest = comp->gtNewOperNode(GT_BT, TYP_VOID, bitTableIcon, switchValue); + GenTree* bitTest = comp->gtNewOperNode(GT_BT, TYP_VOID, bitTableIcon, switchValue); bitTest->gtFlags |= GTF_SET_FLAGS; GenTreeCC* jcc = comp->gtNewCC(GT_JCC, TYP_VOID, bbSwitchCondition); - LIR::AsRange(bbSwitch).InsertAfter(switchValue, bitTableIcon, bitTest, jcc); - +#else // TARGET_XARCH + // + // Fallback to AND(RSZ(bitTable, switchValue), 1) + // + GenTree* tstCns = comp->gtNewIconNode(bbSwitch->bbNext != bbCase0 ? 0 : 1, bitTableType); + GenTree* shift = comp->gtNewOperNode(GT_RSZ, bitTableType, bitTableIcon, switchValue); + GenTree* one = comp->gtNewIconNode(1, bitTableType); + GenTree* andOp = comp->gtNewOperNode(GT_AND, bitTableType, shift, one); + GenTree* cmp = comp->gtNewOperNode(GT_EQ, TYP_INT, andOp, tstCns); + GenTree* jcc = comp->gtNewOperNode(GT_JTRUE, TYP_VOID, cmp); + LIR::AsRange(bbSwitch).InsertAfter(switchValue, bitTableIcon, shift, tstCns, one); + LIR::AsRange(bbSwitch).InsertAfter(one, andOp, cmp, jcc); +#endif // !TARGET_XARCH return true; -#endif // TARGET_XARCH } void Lowering::ReplaceArgWithPutArgOrBitcast(GenTree** argSlot, GenTree* putArgOrBitcast) @@ -1551,7 +1565,7 @@ void Lowering::LowerArg(GenTreeCall* call, CallArg* callArg, bool late) // the assert below. assert((jitIntrinsic->GetSimdSize() == 12) || (jitIntrinsic->GetSimdSize() == 16) || - (jitIntrinsic->GetSimdSize() == 32)); + (jitIntrinsic->GetSimdSize() == 32) || (jitIntrinsic->GetSimdSize() == 64)); if (jitIntrinsic->GetSimdSize() == 12) { @@ -1967,7 +1981,7 @@ GenTree* Lowering::LowerCallMemcmp(GenTreeCall* call) if (GenTree::OperIsCmpCompare(oper)) { assert(type == TYP_INT); - return comp->gtNewSimdCmpOpAllNode(oper, TYP_BOOL, op1, op2, CORINFO_TYPE_NATIVEUINT, + return comp->gtNewSimdCmpOpAllNode(oper, TYP_UBYTE, op1, op2, CORINFO_TYPE_NATIVEUINT, genTypeSize(op1)); } return comp->gtNewSimdBinOpNode(oper, op1->TypeGet(), op1, op2, CORINFO_TYPE_NATIVEUINT, @@ -3441,7 +3455,7 @@ GenTree* Lowering::OptimizeConstCompare(GenTree* cmp) var_types castToType = cast->CastToType(); GenTree* castOp = cast->gtGetOp1(); - if (((castToType == TYP_BOOL) || (castToType == TYP_UBYTE)) && FitsIn(op2Value)) + if ((castToType == TYP_UBYTE) && FitsIn(op2Value)) { // // Since we're going to remove the cast we need to be able to narrow the cast operand @@ -3851,13 +3865,13 @@ GenTree* Lowering::LowerSelect(GenTreeConditional* select) } #ifdef TARGET_ARM64 - if (trueVal->OperIs(GT_NOT, GT_NEG) || falseVal->OperIs(GT_NOT, GT_NEG)) + if (trueVal->OperIs(GT_NOT, GT_NEG, GT_ADD) || falseVal->OperIs(GT_NOT, GT_NEG, GT_ADD)) { - TryLowerCselToCinvOrCneg(select, cond); + TryLowerCselToCSOp(select, cond); } else if (trueVal->IsCnsIntOrI() && falseVal->IsCnsIntOrI()) { - TryLowerCselToCinc(select, cond); + TryLowerCnsIntCselToCinc(select, cond); } #endif @@ -6033,7 +6047,8 @@ bool Lowering::TryCreateAddrMode(GenTree* addr, bool isContainable, GenTree* par } #ifdef TARGET_ARM64 - if (parent->OperIsIndir() && parent->AsIndir()->IsVolatile()) + const bool hasRcpc2 = comp->compOpportunisticallyDependsOn(InstructionSet_Rcpc2); + if (parent->OperIsIndir() && parent->AsIndir()->IsVolatile() && !hasRcpc2) { // For Arm64 we avoid using LEA for volatile INDs // because we won't be able to use ldar/star @@ -6056,6 +6071,20 @@ bool Lowering::TryCreateAddrMode(GenTree* addr, bool isContainable, GenTree* par &scale, // scaling &offset); // displacement +#ifdef TARGET_ARM64 + if (parent->OperIsIndir() && parent->AsIndir()->IsVolatile()) + { + // Generally, we try to avoid creating addressing modes for volatile INDs so we can then use + // ldar/stlr instead of ldr/str + dmb. Although, with Arm 8.4+'s RCPC2 we can handle unscaled + // addressing modes (if the offset fits into 9 bits) + assert(hasRcpc2); + if ((scale > 1) || (!emitter::emitIns_valid_imm_for_unscaled_ldst_offset(offset)) || (index != nullptr)) + { + return false; + } + } +#endif + var_types targetType = parent->OperIsIndir() ? parent->TypeGet() : TYP_UNDEF; #ifdef TARGET_ARMARCH @@ -6294,6 +6323,12 @@ GenTree* Lowering::LowerAdd(GenTreeOp* node) { return next; } + + next = TryLowerAddSubToMulLongOp(node); + if (next != nullptr) + { + return next; + } } #endif // TARGET_ARM64 @@ -7484,6 +7519,28 @@ bool Lowering::CheckMultiRegLclVar(GenTreeLclVar* lclNode, int registerCount) if (registerCount == varDsc->lvFieldCnt) { canEnregisterAsMultiReg = true; + +#ifdef FEATURE_SIMD + // TYP_SIMD12 breaks the above invariant that "we won't have + // matching reg and field counts"; for example, consider + // + // * STORE_LCL_VAR(CALL) + // * RETURN(LCL_VAR) + // + // These return in two GPR registers, while the fields of the + // local are stored in SIMD and GPR register, so registerCount + // == varDsc->lvFieldCnt == 2. But the backend cannot handle + // this. + + for (int i = 0; i < varDsc->lvFieldCnt; i++) + { + if (comp->lvaGetDesc(varDsc->lvFieldLclStart + i)->TypeGet() == TYP_SIMD12) + { + canEnregisterAsMultiReg = false; + break; + } + } +#endif } } } diff --git a/src/coreclr/jit/lower.h b/src/coreclr/jit/lower.h index 4f303007af2937..3331d0a44975cc 100644 --- a/src/coreclr/jit/lower.h +++ b/src/coreclr/jit/lower.h @@ -88,8 +88,10 @@ class Lowering final : public Phase insCflags TruthifyingFlags(GenCondition cond); void ContainCheckConditionalCompare(GenTreeCCMP* ccmp); void ContainCheckNeg(GenTreeOp* neg); - void TryLowerCselToCinc(GenTreeOp* select, GenTree* cond); - void TryLowerCselToCinvOrCneg(GenTreeOp* select, GenTree* cond); + void TryLowerCnsIntCselToCinc(GenTreeOp* select, GenTree* cond); + void TryLowerCselToCSOp(GenTreeOp* select, GenTree* cond); + GenTree* TryLowerAddSubToMulLongOp(GenTreeOp* op); + GenTree* TryLowerNegToMulLongOp(GenTreeOp* op); #endif void ContainCheckSelect(GenTreeOp* select); void ContainCheckBitCast(GenTree* node); diff --git a/src/coreclr/jit/lowerarmarch.cpp b/src/coreclr/jit/lowerarmarch.cpp index 86a5b2b1ab4cb4..2441f5170f082f 100644 --- a/src/coreclr/jit/lowerarmarch.cpp +++ b/src/coreclr/jit/lowerarmarch.cpp @@ -532,6 +532,16 @@ GenTree* Lowering::LowerBinaryArithmetic(GenTreeOp* binOp) return next; } } + + if (binOp->OperIs(GT_SUB)) + { + // Attempt to optimize for umsubl/smsubl. + GenTree* next = TryLowerAddSubToMulLongOp(binOp); + if (next != nullptr) + { + return next; + } + } #endif } @@ -1188,6 +1198,8 @@ GenTree* Lowering::LowerHWIntrinsic(GenTreeHWIntrinsic* node) bool Lowering::IsValidConstForMovImm(GenTreeHWIntrinsic* node) { assert((node->GetHWIntrinsicId() == NI_Vector64_Create) || (node->GetHWIntrinsicId() == NI_Vector128_Create) || + (node->GetHWIntrinsicId() == NI_Vector64_CreateScalar) || + (node->GetHWIntrinsicId() == NI_Vector128_CreateScalar) || (node->GetHWIntrinsicId() == NI_Vector64_CreateScalarUnsafe) || (node->GetHWIntrinsicId() == NI_Vector128_CreateScalarUnsafe) || (node->GetHWIntrinsicId() == NI_AdvSimd_DuplicateToVector64) || @@ -1261,7 +1273,7 @@ GenTree* Lowering::LowerHWIntrinsicCmpOp(GenTreeHWIntrinsic* node, genTreeOps cm assert(varTypeIsSIMD(simdType)); assert(varTypeIsArithmetic(simdBaseType)); assert(simdSize != 0); - assert(node->gtType == TYP_BOOL); + assert(node->gtType == TYP_UBYTE); assert((cmpOp == GT_EQ) || (cmpOp == GT_NE)); // We have the following (with the appropriate simd size and where the intrinsic could be op_Inequality): @@ -1900,6 +1912,10 @@ GenTree* Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) { use.ReplaceWith(tmp2); } + else + { + tmp2->SetUnusedValue(); + } BlockRange().Remove(node); return tmp2->gtNext; @@ -2545,41 +2561,55 @@ void Lowering::ContainCheckNeg(GenTreeOp* neg) } //---------------------------------------------------------------------------------------------- -// TryLowerCselToCinvOrCneg: Try converting SELECT/SELECTCC to SELECT_INV/SELECT_INVCC. Conversion is possible only if -// one of the operands of the select node is inverted. +// TryLowerCselToCSOp: Try converting SELECT/SELECTCC to SELECT_?/SELECT_?CC. Conversion is possible only if +// one of the operands of the select node is one of GT_NEG, GT_NOT or GT_ADD. // // Arguments: // select - The select node that is now SELECT or SELECTCC // cond - The condition node that SELECT or SELECTCC uses // -void Lowering::TryLowerCselToCinvOrCneg(GenTreeOp* select, GenTree* cond) +void Lowering::TryLowerCselToCSOp(GenTreeOp* select, GenTree* cond) { assert(select->OperIs(GT_SELECT, GT_SELECTCC)); bool shouldReverseCondition; - GenTree* invertedOrNegatedVal; - GenTree* nonInvertedOrNegatedVal; + GenTree* operatedVal; + GenTree* nonOperatedVal; GenTree* nodeToRemove; + GenTree* trueVal = select->gtOp1; + GenTree* falseVal = select->gtOp2; - GenTree* trueVal = select->gtOp1; - GenTree* falseVal = select->gtOp2; - const bool isCneg = trueVal->OperIs(GT_NEG) || falseVal->OperIs(GT_NEG); - - assert(trueVal->OperIs(GT_NOT, GT_NEG) || falseVal->OperIs(GT_NOT, GT_NEG)); + // Determine the resulting operation type. + genTreeOps resultingOp; + if (trueVal->OperIs(GT_NEG) || falseVal->OperIs(GT_NEG)) + { + resultingOp = GT_SELECT_NEG; + shouldReverseCondition = trueVal->OperIs(GT_NEG); + } + else if (trueVal->OperIs(GT_NOT) || falseVal->OperIs(GT_NOT)) + { + resultingOp = GT_SELECT_INV; + shouldReverseCondition = trueVal->OperIs(GT_NOT); + } + else + { + assert(trueVal->OperIs(GT_ADD) || falseVal->OperIs(GT_ADD)); + resultingOp = GT_SELECT_INC; + shouldReverseCondition = trueVal->OperIs(GT_ADD); + } - if ((isCneg && trueVal->OperIs(GT_NEG)) || (!isCneg && trueVal->OperIs(GT_NOT))) + // Values to which the operation are applied must come last. + if (shouldReverseCondition) { - shouldReverseCondition = true; - invertedOrNegatedVal = trueVal->gtGetOp1(); - nonInvertedOrNegatedVal = falseVal; - nodeToRemove = trueVal; + operatedVal = trueVal->gtGetOp1(); + nonOperatedVal = falseVal; + nodeToRemove = trueVal; } else { - shouldReverseCondition = false; - invertedOrNegatedVal = falseVal->gtGetOp1(); - nonInvertedOrNegatedVal = trueVal; - nodeToRemove = falseVal; + operatedVal = falseVal->gtGetOp1(); + nonOperatedVal = trueVal; + nodeToRemove = falseVal; } if (shouldReverseCondition && !cond->OperIsCompare() && select->OperIs(GT_SELECT)) @@ -2589,17 +2619,33 @@ void Lowering::TryLowerCselToCinvOrCneg(GenTreeOp* select, GenTree* cond) return; } - if (!(IsInvariantInRange(invertedOrNegatedVal, select) && IsInvariantInRange(nonInvertedOrNegatedVal, select))) + // For Csinc candidates, the second argument of the GT_ADD must be +1 (increment). + if (resultingOp == GT_SELECT_INC && + !(nodeToRemove->gtGetOp2()->IsCnsIntOrI() && nodeToRemove->gtGetOp2()->AsIntCon()->IconValue() == 1)) + { + return; + } + + // Check that we are safe to move both values. + if (!(IsInvariantInRange(operatedVal, select) && IsInvariantInRange(nonOperatedVal, select))) { return; } - // As the select node would handle the negation/inversion, the op is not required. - // If a value is contained in the negate/invert op, it cannot be contained anymore. + // Passed all checks, move on to block modification. + // If this is a Cinc candidate, we must remove the dangling second argument node. + if (resultingOp == GT_SELECT_INC) + { + BlockRange().Remove(nodeToRemove->gtGetOp2()); + nodeToRemove->AsOp()->gtOp2 = nullptr; + } + + // As the select node would handle the operation, the op is not required. + // If a value is contained in the negate/invert/increment op, it cannot be contained anymore. BlockRange().Remove(nodeToRemove); - invertedOrNegatedVal->ClearContained(); - select->gtOp1 = nonInvertedOrNegatedVal; - select->gtOp2 = invertedOrNegatedVal; + operatedVal->ClearContained(); + select->gtOp1 = nonOperatedVal; + select->gtOp2 = operatedVal; if (select->OperIs(GT_SELECT)) { @@ -2608,10 +2654,7 @@ void Lowering::TryLowerCselToCinvOrCneg(GenTreeOp* select, GenTree* cond) GenTree* revCond = comp->gtReverseCond(cond); assert(cond == revCond); // Ensure `gtReverseCond` did not create a new node. } - select->SetOper(isCneg ? GT_SELECT_NEG : GT_SELECT_INV); - JITDUMP("Converted to: %s\n", isCneg ? "SELECT_NEG" : "SELECT_INV"); - DISPTREERANGE(BlockRange(), select); - JITDUMP("\n"); + select->SetOper(resultingOp); } else { @@ -2622,22 +2665,44 @@ void Lowering::TryLowerCselToCinvOrCneg(GenTreeOp* select, GenTree* cond) // Reverse the condition so that op2 will be selected selectcc->gtCondition = GenCondition::Reverse(selectCond); } - selectcc->SetOper(isCneg ? GT_SELECT_NEGCC : GT_SELECT_INVCC); - JITDUMP("Converted to: %s\n", isCneg ? "SELECT_NEGCC" : "SELECT_INVCC"); - DISPTREERANGE(BlockRange(), selectcc); - JITDUMP("\n"); + + // Convert the resulting operation into the equivalent CC form. + switch (resultingOp) + { + case GT_SELECT_NEG: + resultingOp = GT_SELECT_NEGCC; + break; + case GT_SELECT_INV: + resultingOp = GT_SELECT_INVCC; + break; + case GT_SELECT_INC: + resultingOp = GT_SELECT_INCCC; + break; + default: + assert(false); + } + selectcc->SetOper(resultingOp); } + +#ifdef DEBUG + JITDUMP("Converted to "); + if (comp->verbose) + comp->gtDispNodeName(select); + JITDUMP(":\n"); + DISPTREERANGE(BlockRange(), select); + JITDUMP("\n"); +#endif } //---------------------------------------------------------------------------------------------- -// TryLowerCselToCinc: Try converting SELECT/SELECTCC to SELECT_INC/SELECT_INCCC. Conversion is possible only if both -// the trueVal and falseVal are integral constants and abs(trueVal - falseVal) = 1. +// TryLowerCnsIntCselToCinc: Try converting SELECT/SELECTCC to SELECT_INC/SELECT_INCCC. +// Conversion is possible only if both the trueVal and falseVal are integer constants and abs(trueVal - falseVal) = 1. // // Arguments: // select - The select node that is now SELECT or SELECTCC // cond - The condition node that SELECT or SELECTCC uses // -void Lowering::TryLowerCselToCinc(GenTreeOp* select, GenTree* cond) +void Lowering::TryLowerCnsIntCselToCinc(GenTreeOp* select, GenTree* cond) { assert(select->OperIs(GT_SELECT, GT_SELECTCC)); @@ -2695,6 +2760,158 @@ void Lowering::TryLowerCselToCinc(GenTreeOp* select, GenTree* cond) } } } + +//---------------------------------------------------------------------------------------------- +// TryLowerAddSubToCombinedMulOp: Attempt to convert ADD and SUB nodes to a combined multiply +// and add/sub operation. Conversion can only happen if the operands to the +// operation meet the following criteria: +// - One op is a MUL_LONG containing two integer operands, and the other is a long. +// +// Arguments: +// op - The ADD or SUB node to attempt an optimisation on. +// +// Returns: +// A pointer to the next node to evaluate. On no operation, returns nullptr. +// +GenTree* Lowering::TryLowerAddSubToMulLongOp(GenTreeOp* op) +{ + assert(op->OperIs(GT_ADD, GT_SUB)); + + if (!comp->opts.OptimizationEnabled()) + return nullptr; + + if (!JitConfig.EnableHWIntrinsic()) + return nullptr; + + if (op->isContained()) + return nullptr; + + if (!varTypeIsIntegral(op)) + return nullptr; + + if (op->gtFlags & GTF_SET_FLAGS) + return nullptr; + + if (op->gtOverflow()) + return nullptr; + + GenTree* op1 = op->gtGetOp1(); + GenTree* op2 = op->gtGetOp2(); + + // Select which operation is the MUL_LONG and which is the add value. + GenTreeOp* mul; + GenTree* addVal; + if (op1->OperIs(GT_MUL_LONG)) + { + // For subtractions, the multiply must be second, as [u/s]msubl performs: + // addValue - (mulValue1 * mulValue2) + if (op->OperIs(GT_SUB)) + { + return nullptr; + } + + mul = op1->AsOp(); + addVal = op2; + } + else if (op2->OperIs(GT_MUL_LONG)) + { + mul = op2->AsOp(); + addVal = op1; + } + else + { + // Exit if neither operation are GT_MUL_LONG. + return nullptr; + } + + // Additional value must be of long size. + if (!addVal->TypeIs(TYP_LONG)) + return nullptr; + + // Mul values must both be integers. + if (!genActualTypeIsInt(mul->gtOp1) || !genActualTypeIsInt(mul->gtOp2)) + return nullptr; + + // Create the new node and replace the original. + { + NamedIntrinsic intrinsicId = + op->OperIs(GT_ADD) ? NI_ArmBase_Arm64_MultiplyLongAdd : NI_ArmBase_Arm64_MultiplyLongSub; + GenTreeHWIntrinsic* outOp = + comp->gtNewScalarHWIntrinsicNode(TYP_LONG, mul->gtOp1, mul->gtOp2, addVal, intrinsicId); + outOp->SetSimdBaseJitType(mul->IsUnsigned() ? CORINFO_TYPE_ULONG : CORINFO_TYPE_LONG); + op->ReplaceWith(outOp, comp); + } + + // Delete the hanging MUL. + mul->gtOp1 = nullptr; + mul->gtOp2 = nullptr; + BlockRange().Remove(mul); + +#ifdef DEBUG + JITDUMP("Converted to HW_INTRINSIC 'NI_ArmBase_Arm64_MultiplyLong[Add/Sub]'.\n"); + if (comp->verbose) + comp->gtDispNodeName(op); + JITDUMP(":\n"); + DISPTREERANGE(BlockRange(), op); + JITDUMP("\n"); +#endif + + return op; +} + +//---------------------------------------------------------------------------------------------- +// TryLowerNegToCombinedMulOp: Attempt to convert NEG nodes to a combined multiply +// and negate operation. Conversion can only happen if the operands to the +// operation meet one of the following criteria: +// - op1 is a MUL_LONG containing two integer operands. +// +// Arguments: +// op - The NEG node to attempt an optimisation on. +// +// Returns: +// A pointer to the next node to evaluate. On no operation, returns nullptr. +// +GenTree* Lowering::TryLowerNegToMulLongOp(GenTreeOp* op) +{ + assert(op->OperIs(GT_NEG)); + + if (!comp->opts.OptimizationEnabled()) + return nullptr; + + if (op->isContained()) + return nullptr; + + if (!varTypeIsIntegral(op)) + return nullptr; + + if (op->gtFlags & GTF_SET_FLAGS) + return nullptr; + + GenTree* op1 = op->gtGetOp1(); + + // Ensure the negated operand is a MUL_LONG. + if (!op1->OperIs(GT_MUL_LONG)) + return nullptr; + + // Ensure the MUL_LONG contains two integer parameters. + GenTreeOp* mul = op1->AsOp(); + if (!genActualTypeIsInt(mul->gtOp1) || !genActualTypeIsInt(mul->gtOp2)) + return nullptr; + + // Able to optimise, create the new node and replace the original. + { + GenTreeHWIntrinsic* outOp = + comp->gtNewScalarHWIntrinsicNode(TYP_LONG, mul->gtOp1, mul->gtOp2, NI_ArmBase_Arm64_MultiplyLongNeg); + op->ReplaceWith(outOp, comp); + } + + // Clean up hanging mul. + mul->gtOp1 = nullptr; + mul->gtOp2 = nullptr; + BlockRange().Remove(mul); + + return op; +} #endif // TARGET_ARM64 //------------------------------------------------------------------------ diff --git a/src/coreclr/jit/lowerriscv64.cpp b/src/coreclr/jit/lowerriscv64.cpp index 37848fc5909de3..65426e493a2c18 100644 --- a/src/coreclr/jit/lowerriscv64.cpp +++ b/src/coreclr/jit/lowerriscv64.cpp @@ -64,12 +64,6 @@ bool Lowering::IsContainableImmed(GenTree* parentNode, GenTree* childNode) const switch (parentNode->OperGet()) { - case GT_CMPXCHG: - case GT_LOCKADD: - case GT_XADD: - NYI_RISCV64("GT_CMPXCHG,GT_LOCKADD,GT_XADD"); - break; - case GT_ADD: case GT_EQ: case GT_NE: diff --git a/src/coreclr/jit/lowerxarch.cpp b/src/coreclr/jit/lowerxarch.cpp index eba7bdb93e20fb..e367e54c607d21 100644 --- a/src/coreclr/jit/lowerxarch.cpp +++ b/src/coreclr/jit/lowerxarch.cpp @@ -1692,7 +1692,7 @@ GenTree* Lowering::LowerHWIntrinsicCmpOp(GenTreeHWIntrinsic* node, genTreeOps cm assert(varTypeIsSIMD(simdType)); assert(varTypeIsArithmetic(simdBaseType)); assert(simdSize != 0); - assert(node->gtType == TYP_BOOL); + assert(node->gtType == TYP_UBYTE); assert((cmpOp == GT_EQ) || (cmpOp == GT_NE)); // We have the following (with the appropriate simd size and where the intrinsic could be op_Inequality): @@ -3754,17 +3754,14 @@ GenTree* Lowering::LowerHWIntrinsicGetElement(GenTreeHWIntrinsic* node) // We want to optimize GetElement down to an Indir where possible as // this unlocks additional containment opportunities for various nodes - var_types newType; - GenTree* newBase; - GenTree* newIndex; - uint32_t newScale; - int32_t newOffset; + GenTree* newBase; + GenTree* newIndex; + uint32_t newScale; + int32_t newOffset; GenTreeIndir* indir = op1->AsIndir(); GenTree* addr = indir->Addr(); - newType = simdBaseType; - if (addr->OperIsAddrMode()) { // We have an existing addressing mode, so we want to try and @@ -3860,7 +3857,8 @@ GenTree* Lowering::LowerHWIntrinsicGetElement(GenTreeHWIntrinsic* node) new (comp, GT_LEA) GenTreeAddrMode(addr->TypeGet(), newBase, newIndex, newScale, newOffset); BlockRange().InsertBefore(node, newAddr); - GenTreeIndir* newIndir = comp->gtNewIndir(newType, newAddr, (indir->gtFlags & GTF_IND_FLAGS)); + GenTreeIndir* newIndir = + comp->gtNewIndir(JITtype2varType(simdBaseJitType), newAddr, (indir->gtFlags & GTF_IND_FLAGS)); BlockRange().InsertBefore(node, newIndir); LIR::Use use; @@ -3868,6 +3866,10 @@ GenTree* Lowering::LowerHWIntrinsicGetElement(GenTreeHWIntrinsic* node) { use.ReplaceWith(newIndir); } + else + { + newIndir->SetUnusedValue(); + } BlockRange().Remove(op1); BlockRange().Remove(node); @@ -3907,8 +3909,8 @@ GenTree* Lowering::LowerHWIntrinsicGetElement(GenTreeHWIntrinsic* node) if (lclDsc->lvDoNotEnregister && (lclOffs <= 0xFFFF) && ((lclOffs + elemSize) <= lclDsc->lvExactSize())) { - GenTree* lclFld = - comp->gtNewLclFldNode(lclVar->GetLclNum(), simdBaseType, static_cast(lclOffs)); + GenTree* lclFld = comp->gtNewLclFldNode(lclVar->GetLclNum(), JITtype2varType(simdBaseJitType), + static_cast(lclOffs)); BlockRange().InsertBefore(node, lclFld); LIR::Use use; @@ -3916,6 +3918,10 @@ GenTree* Lowering::LowerHWIntrinsicGetElement(GenTreeHWIntrinsic* node) { use.ReplaceWith(lclFld); } + else + { + lclFld->SetUnusedValue(); + } BlockRange().Remove(op1); BlockRange().Remove(op2); @@ -4158,6 +4164,11 @@ GenTree* Lowering::LowerHWIntrinsicGetElement(GenTreeHWIntrinsic* node) { use.ReplaceWith(cast); } + else + { + node->ClearUnusedValue(); + cast->SetUnusedValue(); + } next = LowerNode(cast); } @@ -4737,6 +4748,10 @@ GenTree* Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) { use.ReplaceWith(tmp1); } + else + { + tmp1->SetUnusedValue(); + } BlockRange().Remove(node); return LowerNode(tmp1); @@ -5267,6 +5282,10 @@ GenTree* Lowering::LowerHWIntrinsicDot(GenTreeHWIntrinsic* node) { use.ReplaceWith(tmp1); } + else + { + tmp1->SetUnusedValue(); + } BlockRange().Remove(node); return tmp1->gtNext; @@ -5306,7 +5325,8 @@ GenTree* Lowering::LowerHWIntrinsicToScalar(GenTreeHWIntrinsic* node) GenTreeIndir* indir = op1->AsIndir(); - GenTreeIndir* newIndir = comp->gtNewIndir(simdBaseType, indir->Addr(), (indir->gtFlags & GTF_IND_FLAGS)); + GenTreeIndir* newIndir = + comp->gtNewIndir(JITtype2varType(simdBaseJitType), indir->Addr(), (indir->gtFlags & GTF_IND_FLAGS)); BlockRange().InsertBefore(node, newIndir); LIR::Use use; @@ -5314,6 +5334,10 @@ GenTree* Lowering::LowerHWIntrinsicToScalar(GenTreeHWIntrinsic* node) { use.ReplaceWith(newIndir); } + else + { + newIndir->SetUnusedValue(); + } BlockRange().Remove(op1); BlockRange().Remove(node); @@ -5334,7 +5358,8 @@ GenTree* Lowering::LowerHWIntrinsicToScalar(GenTreeHWIntrinsic* node) if (lclDsc->lvDoNotEnregister && (lclOffs <= 0xFFFF) && ((lclOffs + elemSize) <= lclDsc->lvExactSize())) { - GenTree* lclFld = comp->gtNewLclFldNode(lclVar->GetLclNum(), simdBaseType, lclVar->GetLclOffs()); + GenTree* lclFld = + comp->gtNewLclFldNode(lclVar->GetLclNum(), JITtype2varType(simdBaseJitType), lclVar->GetLclOffs()); BlockRange().InsertBefore(node, lclFld); LIR::Use use; @@ -5342,6 +5367,10 @@ GenTree* Lowering::LowerHWIntrinsicToScalar(GenTreeHWIntrinsic* node) { use.ReplaceWith(lclFld); } + else + { + lclFld->SetUnusedValue(); + } BlockRange().Remove(op1); BlockRange().Remove(node); @@ -5426,6 +5455,11 @@ GenTree* Lowering::LowerHWIntrinsicToScalar(GenTreeHWIntrinsic* node) { use.ReplaceWith(cast); } + else + { + node->ClearUnusedValue(); + cast->SetUnusedValue(); + } next = LowerNode(cast); } @@ -7922,6 +7956,9 @@ bool Lowering::IsContainableHWIntrinsicOp(GenTreeHWIntrinsic* parentNode, GenTre // The memory form of this already takes a pointer and should be treated like a MemoryLoad supportsGeneralLoads = !childNode->OperIsHWIntrinsic(); } + + supportsGeneralLoads = + supportsGeneralLoads && (genTypeSize(childNode) >= genTypeSize(parentNode->GetSimdBaseType())); break; } @@ -8101,7 +8138,16 @@ bool Lowering::IsContainableHWIntrinsicOp(GenTreeHWIntrinsic* parentNode, GenTre case NI_Vector128_ToScalar: case NI_Vector256_ToScalar: case NI_Vector512_ToScalar: + 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: case NI_AVX512F_ExtractVector128: case NI_AVX512F_ExtractVector256: @@ -8144,15 +8190,24 @@ bool Lowering::IsContainableHWIntrinsicOp(GenTreeHWIntrinsic* parentNode, GenTre return false; } + case NI_Vector128_get_Zero: + case NI_Vector256_get_Zero: + { + // These are only containable as part of Sse41.Insert + return false; + } + case NI_SSE3_MoveAndDuplicate: case NI_AVX2_BroadcastScalarToVector128: case NI_AVX2_BroadcastScalarToVector256: case NI_AVX512F_BroadcastScalarToVector512: { - var_types baseType = hwintrinsic->GetSimdBaseType(); - if (varTypeIsSmall(baseType)) + var_types parentBaseType = parentNode->GetSimdBaseType(); + var_types childBaseType = hwintrinsic->GetSimdBaseType(); + + if (varTypeIsSmall(parentBaseType) || (genTypeSize(parentBaseType) != genTypeSize(childBaseType))) { - // early return if the base type is not embedded broadcast compatible. + // early return if either base type is not embedded broadcast compatible. return false; } @@ -8160,7 +8215,7 @@ bool Lowering::IsContainableHWIntrinsicOp(GenTreeHWIntrinsic* parentNode, GenTre if (intrinsicId == NI_SSE3_MoveAndDuplicate) { // NI_SSE3_MoveAndDuplicate is for Vector128 only. - assert(baseType == TYP_DOUBLE); + assert(childBaseType == TYP_DOUBLE); } if (comp->compOpportunisticallyDependsOn(InstructionSet_AVX512F_VL) && @@ -8193,6 +8248,15 @@ bool Lowering::IsContainableHWIntrinsicOp(GenTreeHWIntrinsic* parentNode, GenTre case NI_AVX_BroadcastScalarToVector128: case NI_AVX_BroadcastScalarToVector256: { + var_types parentBaseType = parentNode->GetSimdBaseType(); + var_types childBaseType = hwintrinsic->GetSimdBaseType(); + + if (varTypeIsSmall(parentBaseType) || (genTypeSize(parentBaseType) != genTypeSize(childBaseType))) + { + // early return if either base type is not embedded broadcast compatible. + return false; + } + return parentNode->OperIsEmbBroadcastCompatible(); } @@ -8332,8 +8396,15 @@ void Lowering::TryFoldCnsVecForEmbeddedBroadcast(GenTreeHWIntrinsic* parentNode, BlockRange().InsertBefore(broadcastNode, createScalar); BlockRange().InsertBefore(createScalar, constScalar); LIR::Use use; - BlockRange().TryGetUse(childNode, &use); - use.ReplaceWith(broadcastNode); + if (BlockRange().TryGetUse(childNode, &use)) + { + use.ReplaceWith(broadcastNode); + } + else + { + broadcastNode->SetUnusedValue(); + } + BlockRange().Remove(childNode); LowerNode(createScalar); LowerNode(broadcastNode); diff --git a/src/coreclr/jit/lsra.cpp b/src/coreclr/jit/lsra.cpp index 5c8fe4aae77889..8c088ac3bc1bfa 100644 --- a/src/coreclr/jit/lsra.cpp +++ b/src/coreclr/jit/lsra.cpp @@ -1421,7 +1421,7 @@ PhaseStatus LinearScan::doLinearScan() #endif ) { - dumpLsraStats(jitstdout); + dumpLsraStats(jitstdout()); } #endif // TRACK_LSRA_STATS @@ -2400,8 +2400,9 @@ void LinearScan::checkLastUses(BasicBlock* block) // We may have exception vars in the liveIn set of exception blocks that are not computed live. if (block->HasPotentialEHSuccs(compiler)) { - VARSET_TP ehHandlerLiveVars(VarSetOps::MakeEmpty(compiler)); - compiler->fgAddHandlerLiveVars(block, ehHandlerLiveVars); + VARSET_TP ehHandlerLiveVars(VarSetOps::MakeEmpty(compiler)); + MemoryKindSet memoryLiveness = emptyMemoryKindSet; + compiler->fgAddHandlerLiveVars(block, ehHandlerLiveVars, memoryLiveness); VarSetOps::DiffD(compiler, liveInNotComputedLive, ehHandlerLiveVars); } VarSetOps::Iter liveInNotComputedLiveIter(compiler, liveInNotComputedLive); @@ -7302,6 +7303,7 @@ void LinearScan::resolveRegisters() assert(!currentRefPosition->getInterval()->isLocalVar); assert(currentRefPosition->getInterval()->firstRefPosition->spillAfter); } + continue; } else if (currentRefPosition->refType == RefTypeUpperVectorRestore) @@ -7322,6 +7324,8 @@ void LinearScan::resolveRegisters() } } localVarInterval->isPartiallySpilled = false; + + continue; } #endif // FEATURE_PARTIAL_SIMD_CALLEE_SAVE diff --git a/src/coreclr/jit/lsraarm64.cpp b/src/coreclr/jit/lsraarm64.cpp index 1d22c1972c0aa6..516d6c8c48bf28 100644 --- a/src/coreclr/jit/lsraarm64.cpp +++ b/src/coreclr/jit/lsraarm64.cpp @@ -1004,7 +1004,7 @@ int LinearScan::BuildNode(GenTree* tree) case GT_XADD: case GT_XCHG: { - assert(dstCount == (tree->TypeGet() == TYP_VOID) ? 0 : 1); + assert(dstCount == (tree->TypeIs(TYP_VOID) ? 0 : 1)); srcCount = tree->gtGetOp2()->isContained() ? 1 : 2; if (!compiler->compOpportunisticallyDependsOn(InstructionSet_Atomics)) @@ -1044,8 +1044,8 @@ int LinearScan::BuildNode(GenTree* tree) } setInternalRegsDelayFree = true; } - buildInternalRegisterUses(); } + buildInternalRegisterUses(); if (dstCount == 1) { BuildDef(tree); diff --git a/src/coreclr/jit/lsrariscv64.cpp b/src/coreclr/jit/lsrariscv64.cpp index 4be7a391d26a70..cc7ea03e3b3832 100644 --- a/src/coreclr/jit/lsrariscv64.cpp +++ b/src/coreclr/jit/lsrariscv64.cpp @@ -368,17 +368,45 @@ int LinearScan::BuildNode(GenTree* tree) case GT_CMPXCHG: { - NYI_RISCV64("-----unimplemented on RISCV64 yet----"); + GenTreeCmpXchg* cas = tree->AsCmpXchg(); + assert(!cas->gtOpComparand->isContained()); + srcCount = 3; + assert(dstCount == 1); + + buildInternalIntRegisterDefForNode(tree); // temp reg for store conditional error + // Extend lifetimes of argument regs because they may be reused during retries + setDelayFree(BuildUse(cas->gtOpLocation)); + setDelayFree(BuildUse(cas->gtOpValue)); + setDelayFree(BuildUse(cas->gtOpComparand)); + + // Internals may not collide with target + setInternalRegsDelayFree = true; + buildInternalRegisterUses(); + BuildDef(tree); } break; case GT_LOCKADD: + assert(!"-----unimplemented on RISCV64----"); + break; + case GT_XORR: case GT_XAND: case GT_XADD: case GT_XCHG: { - NYI_RISCV64("-----unimplemented on RISCV64 yet----"); + assert(dstCount == (tree->TypeIs(TYP_VOID) ? 0 : 1)); + GenTree* addr = tree->gtGetOp1(); + GenTree* data = tree->gtGetOp2(); + assert(!addr->isContained() && !data->isContained()); + srcCount = 2; + + BuildUse(addr); + BuildUse(data); + if (dstCount == 1) + { + BuildDef(tree); + } } break; diff --git a/src/coreclr/jit/morph.cpp b/src/coreclr/jit/morph.cpp index 20733c64cfee01..39617fb20a27d8 100644 --- a/src/coreclr/jit/morph.cpp +++ b/src/coreclr/jit/morph.cpp @@ -4655,20 +4655,12 @@ GenTree* Compiler::fgMorphLeafLocal(GenTreeLclVarCommon* lclNode) if (fgGlobalMorph && lclNode->OperIs(GT_LCL_VAR) && varDsc->lvNormalizeOnLoad() && /* TODO-ASG: delete this zero-diff quirk */ lclNode->CanCSE()) { - // TYP_BOOL quirk: previously, the code in optAssertionIsSubrange did not handle TYP_BOOL. - // Now it does, but this leads to some regressions because we lose the uniform VNs for trees - // that represent the "reduced" normalize-on-load locals, i. e. LCL_VAR(small type V00), created - // here with local assertions, and "expanded", i. e. CAST(small type <- LCL_VAR(int V00)). - // This is a pretty fundamental problem with how normalize-on-load locals appear to the optimizer. - // This quirk preserves the previous behavior. - // TODO-CQ: fix the VNs for normalize-on-load locals and remove this quirk. - var_types lclVarType = varDsc->TypeGet(); - bool isBoolQuirk = lclVarType == TYP_BOOL; + var_types lclVarType = varDsc->TypeGet(); // Assertion prop can tell us to omit adding a cast here. This is useful when the local is a small-typed // parameter that is passed in a register: in that case, the ABI specifies that the upper bits might be // invalid, but the assertion guarantees us that we have normalized when we wrote it. - if (optLocalAssertionProp && !isBoolQuirk && + if (optLocalAssertionProp && optAssertionIsSubrange(lclNode, IntegralRange::ForType(lclVarType), apFull) != NO_ASSERTION_INDEX) { // The previous assertion can guarantee us that if this node gets @@ -8917,6 +8909,14 @@ GenTree* Compiler::fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac, bool* optA break; #endif + case GT_COMMA: + if (op2->OperIsStore() || (op2->OperGet() == GT_COMMA && op2->TypeGet() == TYP_VOID) || fgIsThrow(op2)) + { + typ = tree->gtType = TYP_VOID; + } + + break; + default: break; } @@ -10768,6 +10768,12 @@ GenTree* Compiler::fgOptimizeHWIntrinsic(GenTreeHWIntrinsic* node) break; } + // Must be working with the same types of vectors. + if (hwop1->TypeGet() != node->TypeGet()) + { + break; + } + if (toScalar != nullptr) { DEBUG_DESTROY_NODE(toScalar); @@ -10789,10 +10795,7 @@ GenTree* Compiler::fgOptimizeHWIntrinsic(GenTreeHWIntrinsic* node) INDEBUG(node->gtDebugFlags |= GTF_DEBUG_NODE_MORPHED); return node; } - #if defined(TARGET_XARCH) - case NI_AVX512F_Add: - case NI_AVX512BW_Add: case NI_AVX512F_And: case NI_AVX512DQ_And: case NI_AVX512F_AndNot: @@ -10834,13 +10837,6 @@ GenTree* Compiler::fgOptimizeHWIntrinsic(GenTreeHWIntrinsic* node) switch (intrinsicId) { - case NI_AVX512F_Add: - case NI_AVX512BW_Add: - { - maskIntrinsicId = NI_AVX512F_AddMask; - break; - } - case NI_AVX512F_And: case NI_AVX512DQ_And: { @@ -10953,6 +10949,107 @@ GenTree* Compiler::fgOptimizeHWIntrinsic(GenTreeHWIntrinsic* node) } } + // Transforms: + // 1.(~v1 & v2) to VectorXxx.AndNot(v1, v2) + // 2.(v1 & (~v2)) to VectorXxx.AndNot(v2, v1) + switch (node->HWOperGet()) + { + case GT_AND: + { + GenTree* op1 = node->Op(1); + GenTree* op2 = node->Op(2); + GenTree* lhs = nullptr; + GenTree* rhs = nullptr; + + if (op1->OperIsHWIntrinsic()) + { + // Try handle: ~op1 & op2 + GenTreeHWIntrinsic* hw = op1->AsHWIntrinsic(); + genTreeOps hwOper = hw->HWOperGet(); + + if (hwOper == GT_NOT) + { + lhs = op2; + rhs = hw->Op(1); + } + else if (hwOper == GT_XOR) + { + GenTree* hwOp1 = hw->Op(1); + GenTree* hwOp2 = hw->Op(2); + + if (hwOp1->IsVectorAllBitsSet()) + { + lhs = op2; + rhs = hwOp2; + } + else if (hwOp2->IsVectorAllBitsSet()) + { + lhs = op2; + rhs = hwOp1; + } + } + } + + if ((lhs == nullptr) && op2->OperIsHWIntrinsic()) + { + // Try handle: op1 & ~op2 + GenTreeHWIntrinsic* hw = op2->AsHWIntrinsic(); + genTreeOps hwOper = hw->HWOperGet(); + + if (hwOper == GT_NOT) + { + lhs = op1; + rhs = hw->Op(1); + } + else if (hwOper == GT_XOR) + { + GenTree* hwOp1 = hw->Op(1); + GenTree* hwOp2 = hw->Op(2); + + if (hwOp1->IsVectorAllBitsSet()) + { + lhs = op1; + rhs = hwOp2; + } + else if (hwOp2->IsVectorAllBitsSet()) + { + lhs = op1; + rhs = hwOp1; + } + } + } + + if ((lhs == nullptr) || (rhs == nullptr)) + { + break; + } + + // Filter out side effecting cases for several reasons: + // 1. gtNewSimdBinOpNode may swap operand order. + // 2. The code above will swap operand order. + // 3. The code above does not handle GTF_REVERSE_OPS. + if (((lhs->gtFlags | rhs->gtFlags) & GTF_ALL_EFFECT) != 0) + { + break; + } + + var_types simdType = node->TypeGet(); + CorInfoType simdBaseJitType = node->GetSimdBaseJitType(); + unsigned int simdSize = node->GetSimdSize(); + + GenTree* andnNode = gtNewSimdBinOpNode(GT_AND_NOT, simdType, lhs, rhs, simdBaseJitType, simdSize); + + DEBUG_DESTROY_NODE(node); + INDEBUG(andnNode->gtDebugFlags |= GTF_DEBUG_NODE_MORPHED); + + return andnNode; + } + default: + { + break; + } + } + return node; } diff --git a/src/coreclr/jit/morphblock.cpp b/src/coreclr/jit/morphblock.cpp index cb1fe5106d31ef..347845e7370944 100644 --- a/src/coreclr/jit/morphblock.cpp +++ b/src/coreclr/jit/morphblock.cpp @@ -1183,8 +1183,7 @@ GenTree* MorphCopyBlockHelper::CopyFieldByField() addrSpillTemp = m_comp->lvaGrabTemp(true DEBUGARG("BlockOp address local")); LclVarDsc* addrSpillDsc = m_comp->lvaGetDesc(addrSpillTemp); - addrSpillDsc->lvType = addrSpill->TypeIs(TYP_REF) ? TYP_REF : TYP_BYREF; // TODO-ASG: zero-diff quirk, delete. - addrSpillStore = m_comp->gtNewTempStore(addrSpillTemp, addrSpill); + addrSpillStore = m_comp->gtNewTempStore(addrSpillTemp, addrSpill); } auto grabAddr = [=, &result](unsigned offs) { @@ -1227,7 +1226,12 @@ GenTree* MorphCopyBlockHelper::CopyFieldByField() // handling. GenTreeIntCon* fldOffsetNode = m_comp->gtNewIconNode(fullOffs, TYP_I_IMPL); fldOffsetNode->gtFieldSeq = addrBaseOffsFldSeq; - addrClone = m_comp->gtNewOperNode(GT_ADD, TYP_BYREF, addrClone, fldOffsetNode); + addrClone = m_comp->gtNewOperNode(GT_ADD, varTypeIsGC(addrClone) ? TYP_BYREF : TYP_I_IMPL, addrClone, + fldOffsetNode); + // Avoid constant prop propagating each field access with a large + // constant address. TODO-Cleanup: We should tune constant prop to + // have better heuristics around this. + addrClone->gtFlags |= GTF_DONT_CSE; } return addrClone; diff --git a/src/coreclr/jit/optimizebools.cpp b/src/coreclr/jit/optimizebools.cpp index 043d4acb476ebf..2efbf40b6d5357 100644 --- a/src/coreclr/jit/optimizebools.cpp +++ b/src/coreclr/jit/optimizebools.cpp @@ -1282,8 +1282,7 @@ GenTree* OptBoolsDsc::optIsBoolComp(OptTestInfo* pOptTest) ssize_t ival2 = opr2->AsIntCon()->gtIconVal; // Is the value a boolean? - // We can either have a boolean expression (marked GTF_BOOLEAN) or - // a local variable that is marked as being boolean (lvIsBoolean) + // We can either have a boolean expression (marked GTF_BOOLEAN) or a constant 0/1. if (opr1->gtFlags & GTF_BOOLEAN) { @@ -1293,18 +1292,6 @@ GenTree* OptBoolsDsc::optIsBoolComp(OptTestInfo* pOptTest) { pOptTest->isBool = true; } - else if (opr1->gtOper == GT_LCL_VAR) - { - // is it a boolean local variable? - - unsigned lclNum = opr1->AsLclVarCommon()->GetLclNum(); - noway_assert(lclNum < m_comp->lvaCount); - - if (m_comp->lvaTable[lclNum].lvIsBoolean) - { - pOptTest->isBool = true; - } - } // Was our comparison against the constant 1 (i.e. true) if (ival2 == 1) diff --git a/src/coreclr/jit/optimizer.cpp b/src/coreclr/jit/optimizer.cpp index 684f71b898f313..a583db4b3562c4 100644 --- a/src/coreclr/jit/optimizer.cpp +++ b/src/coreclr/jit/optimizer.cpp @@ -3035,7 +3035,9 @@ bool Compiler::optCanonicalizeLoop(unsigned char loopInd) JITDUMP(FMT_LP " head " FMT_BB " is also " FMT_LP " bottom\n", loopInd, h->bbNum, sibling); - BasicBlock* const newH = fgNewBBbefore(BBJ_NONE, t, /*extendRegion*/ true); + BasicBlock* const newH = fgNewBBbefore(BBJ_NONE, t, /*extendRegion*/ false); + + fgSetEHRegionForNewLoopHead(newH, t); fgRemoveRefPred(t, h); fgAddRefPred(t, newH); @@ -5734,7 +5736,6 @@ bool Compiler::optNarrowTree(GenTree* tree, var_types srct, var_types dstt, Valu case TYP_BYTE: lmask = 0x0000007F; break; - case TYP_BOOL: case TYP_UBYTE: lmask = 0x000000FF; break; @@ -5782,7 +5783,6 @@ bool Compiler::optNarrowTree(GenTree* tree, var_types srct, var_types dstt, Valu case TYP_BYTE: imask = 0x0000007F; break; - case TYP_BOOL: case TYP_UBYTE: imask = 0x000000FF; break; @@ -7960,6 +7960,74 @@ bool Compiler::optVNIsLoopInvariant(ValueNum vn, unsigned lnum, VNSet* loopVnInv return res; } +//------------------------------------------------------------------------------ +// fgSetEHRegionForNewLoopHead: When a new loop HEAD block is created, this sets the EH region properly for +// the new block. +// +// In which EH region should the header live? +// +// The header block is added immediately before `top`. +// +// The `top` block cannot be the first block of a filter or handler: `top` must have a back-edge from a +// BBJ_COND or BBJ_ALWAYS within the loop, and a filter or handler cannot be branched to like that. +// +// The `top` block can be the first block of a `try` region, and you can fall into or branch to the +// first block of a `try` region. (For top-entry loops, `top` will both be the target of a back-edge +// and a fall-through from the previous block.) +// +// If the `top` block is NOT the first block of a `try` region, the header can simply extend the +// `top` block region. +// +// If the `top` block IS the first block of a `try`, we find its parent region and use that. For mutual-protect +// regions, we need to find the actual parent, as the block stores the most "nested" mutual region. For +// non-mutual-protect regions, due to EH canonicalization, we are guaranteed that no other EH regions begin +// on the same block, so looking to just the parent is sufficient. Note that we can't just extend the EH +// region of `top` to the header, because `top` will still be the target of backward branches from +// within the loop. If those backward branches come from outside the `try` (say, only the top half of the loop +// is a `try` region), then we can't branch to a non-first `try` region block (you always must entry the `try` +// in the first block). +// +// Note that hoisting any code out of a try region, for example, to a pre-header block in a different +// EH region, needs to ensure that no exceptions will be thrown. +// +// Arguments: +// newHead - the new `head` block, which has already been added to the block list ahead of the loop `top` +// top - the loop `top` block +// +void Compiler::fgSetEHRegionForNewLoopHead(BasicBlock* newHead, BasicBlock* top) +{ + assert(newHead->bbNext == top); + assert(!fgIsFirstBlockOfFilterOrHandler(top)); + + if ((top->bbFlags & BBF_TRY_BEG) != 0) + { + // `top` is the beginning of a try block. Figure out the EH region to use. + assert(top->hasTryIndex()); + unsigned short newTryIndex = (unsigned short)ehTrueEnclosingTryIndexIL(top->getTryIndex()); + if (newTryIndex == EHblkDsc::NO_ENCLOSING_INDEX) + { + // No EH try index. + newHead->clearTryIndex(); + } + else + { + newHead->setTryIndex(newTryIndex); + } + + // What handler region to use? Use the same handler region as `top`. + newHead->copyHndIndex(top); + } + else + { + // `top` is not the beginning of a try block. Just extend the EH region to the pre-header. + // We don't need to call `fgExtendEHRegionBefore()` because all the special handling that function + // does it to account for `top` being the first block of a `try` or handler region, which we know + // is not true. + + newHead->copyEHRegion(top); + } +} + //------------------------------------------------------------------------------ // fgCreateLoopPreHeader: Creates a pre-header block for the given loop. // A pre-header is a block outside the loop that falls through or branches to the loop @@ -8198,62 +8266,7 @@ bool Compiler::fgCreateLoopPreHeader(unsigned lnum) // Link in the preHead block fgInsertBBbefore(top, preHead); - - // In which EH region should the pre-header live? - // - // The pre-header block is added immediately before `top`. - // - // The `top` block cannot be the first block of a filter or handler: `top` must have a back-edge from a - // BBJ_COND or BBJ_ALWAYS within the loop, and a filter or handler cannot be branched to like that. - // - // The `top` block can be the first block of a `try` region, and you can fall into or branch to the - // first block of a `try` region. (For top-entry loops, `top` will both be the target of a back-edge - // and a fall-through from the previous block.) - // - // If the `top` block is NOT the first block of a `try` region, the pre-header can simply extend the - // `top` block region. - // - // If the `top` block IS the first block of a `try`, we find its parent region and use that. For mutual-protect - // regions, we need to find the actual parent, as the block stores the most "nested" mutual region. For - // non-mutual-protect regions, due to EH canonicalization, we are guaranteed that no other EH regions begin - // on the same block, so looking to just the parent is sufficient. Note that we can't just extend the EH - // region of `top` to the pre-header, because `top` will still be the target of backward branches from - // within the loop. If those backward branches come from outside the `try` (say, only the top half of the loop - // is a `try` region), then we can't branch to a non-first `try` region block (you always must entry the `try` - // in the first block). - // - // Note that hoisting any code out of a try region, for example, to a pre-header block in a different - // EH region, needs to ensure that no exceptions will be thrown. - - assert(!fgIsFirstBlockOfFilterOrHandler(top)); - - if ((top->bbFlags & BBF_TRY_BEG) != 0) - { - // `top` is the beginning of a try block. Figure out the EH region to use. - assert(top->hasTryIndex()); - unsigned short newTryIndex = (unsigned short)ehTrueEnclosingTryIndexIL(top->getTryIndex()); - if (newTryIndex == EHblkDsc::NO_ENCLOSING_INDEX) - { - // No EH try index. - preHead->clearTryIndex(); - } - else - { - preHead->setTryIndex(newTryIndex); - } - - // What handler region to use? Use the same handler region as `top`. - preHead->copyHndIndex(top); - } - else - { - // `top` is not the beginning of a try block. Just extend the EH region to the pre-header. - // We don't need to call `fgExtendEHRegionBefore()` because all the special handling that function - // does it to account for `top` being the first block of a `try` or handler region, which we know - // is not true. - - preHead->copyEHRegion(top); - } + fgSetEHRegionForNewLoopHead(preHead, top); // TODO-CQ: set dominators for this block, to allow loop optimizations requiring them // (e.g: hoisting expression in a loop with the same 'head' as this one) @@ -8875,9 +8888,15 @@ GenTree* Compiler::optRemoveRangeCheck(GenTreeBoundsChk* check, GenTree* comma, } #endif - // Extract side effects + // TODO-Bug: We really should be extracting all side effects from the + // length and index here, but the length typically involves a GT_ARR_LENGTH + // that we would preserve. Usually, as part of proving that the range check + // passes, we have also proven that the ARR_LENGTH is non-faulting. We need + // a good way to communicate to this function that it is ok to ignore side + // effects of the ARR_LENGTH. GenTree* sideEffList = nullptr; - gtExtractSideEffList(check, &sideEffList, GTF_ASG); + gtExtractSideEffList(check->GetArrayLength(), &sideEffList, GTF_ASG); + gtExtractSideEffList(check->GetIndex(), &sideEffList); if (sideEffList != nullptr) { @@ -9031,9 +9050,9 @@ void Compiler::optRemoveRedundantZeroInits() CompAllocator allocator(getAllocator(CMK_ZeroInit)); LclVarRefCounts refCounts(allocator); BitVecTraits bitVecTraits(lvaCount, this); - BitVec zeroInitLocals = BitVecOps::MakeEmpty(&bitVecTraits); - bool hasGCSafePoint = false; - bool canThrow = false; + BitVec zeroInitLocals = BitVecOps::MakeEmpty(&bitVecTraits); + bool hasGCSafePoint = false; + bool hasImplicitControlFlow = false; assert(fgNodeThreading == NodeThreading::AllTrees); @@ -9044,6 +9063,8 @@ void Compiler::optRemoveRedundantZeroInits() CompAllocator allocator(getAllocator(CMK_ZeroInit)); LclVarRefCounts defsInBlock(allocator); bool removedTrackedDefs = false; + bool hasEHSuccs = block->HasPotentialEHSuccs(this); + for (Statement* stmt = block->FirstNonPhiDef(); stmt != nullptr;) { Statement* next = stmt->GetNextStmt(); @@ -9054,10 +9075,7 @@ void Compiler::optRemoveRedundantZeroInits() hasGCSafePoint = true; } - if ((tree->gtFlags & GTF_EXCEPT) != 0) - { - canThrow = true; - } + hasImplicitControlFlow |= hasEHSuccs && ((tree->gtFlags & GTF_EXCEPT) != 0); switch (tree->gtOper) { @@ -9203,7 +9221,8 @@ void Compiler::optRemoveRedundantZeroInits() } } - if (!removedExplicitZeroInit && isEntire && (!canThrow || !lclDsc->lvLiveInOutOfHndlr)) + if (!removedExplicitZeroInit && isEntire && + (!hasImplicitControlFlow || (lclDsc->lvTracked && !lclDsc->lvLiveInOutOfHndlr))) { // If compMethodRequiresPInvokeFrame() returns true, lower may later // insert a call to CORINFO_HELP_INIT_PINVOKE_FRAME which is a gc-safe point. diff --git a/src/coreclr/jit/promotion.cpp b/src/coreclr/jit/promotion.cpp index 5982ed79283355..52163f4db0cceb 100644 --- a/src/coreclr/jit/promotion.cpp +++ b/src/coreclr/jit/promotion.cpp @@ -2340,8 +2340,36 @@ void ReplaceVisitor::ReadBackAfterCall(GenTreeCall* call, GenTree* user) // // If the remainder of the struct local is dying, then we expect that this // entire struct local is now dying, since all field accesses are going to be -// replaced with other locals. The exception is if there is a queued read -// back for any of the fields. +// replaced with other locals. +// +// There are two exceptions to the above: +// +// 1) If there is a queued readback for any of the fields, then there is +// live state in the struct local, so it is not dying. +// +// 2) If there are further uses of the local in the same statement then we cannot +// actually act on the last-use information we would provide here. That's because +// uses of locals occur at the user and we do not model that here. In the real model +// there are cases where we do not have any place to insert any IR between the two uses. +// For example, consider: +// +// ▌ CALL void Program:Foo(Program+S,Program+S) +// ├──▌ LCL_VAR struct V01 loc0 +// └──▌ LCL_VAR struct V01 loc0 +// +// If V01 is promoted fully then both uses of V01 are last uses here; but +// replacing the IR with +// +// ▌ CALL void Program:Foo(Program+S,Program+S) +// ├──▌ LCL_VAR struct V01 loc0 (last use) +// └──▌ COMMA struct +// ├──▌ STORE_LCL_FLD int V01 loc0 [+0] +// │ └──▌ LCL_VAR int V02 tmp0 +// └──▌ LCL_VAR struct V01 loc0 (last use) +// +// would be illegal since the created store overlaps with the first local, +// and does not take into account that both uses occur simultaneously at +// the position of the CALL node. // bool ReplaceVisitor::IsPromotedStructLocalDying(GenTreeLclVarCommon* lcl) { @@ -2362,6 +2390,15 @@ bool ReplaceVisitor::IsPromotedStructLocalDying(GenTreeLclVarCommon* lcl) } } + for (GenTree* cur = lcl->gtNext; cur != nullptr; cur = cur->gtNext) + { + assert(cur->OperIsAnyLocal()); + if (cur->TypeIs(TYP_STRUCT) && (cur->AsLclVarCommon()->GetLclNum() == lcl->GetLclNum())) + { + return false; + } + } + return true; } @@ -2577,7 +2614,7 @@ void ReplaceVisitor::WriteBackBeforeCurrentStatement(unsigned lcl, unsigned offs GenTree* readBack = Promotion::CreateWriteBack(m_compiler, lcl, rep); Statement* stmt = m_compiler->fgNewStmtFromTree(readBack); - JITDUMP("Writing back %s before " FMT_STMT "\n", rep.Description, stmt->GetID()); + JITDUMP("Writing back %s before " FMT_STMT "\n", rep.Description, m_currentStmt->GetID()); DISPSTMT(stmt); m_compiler->fgInsertStmtBefore(m_currentBlock, m_currentStmt, stmt); ClearNeedsWriteBack(rep); diff --git a/src/coreclr/jit/promotionliveness.cpp b/src/coreclr/jit/promotionliveness.cpp index 88678ab07c73d0..5f9fffdb95a291 100644 --- a/src/coreclr/jit/promotionliveness.cpp +++ b/src/coreclr/jit/promotionliveness.cpp @@ -344,7 +344,7 @@ bool PromotionLiveness::PerBlockLiveness(BasicBlock* block) BasicBlockLiveness& bbInfo = m_bbInfo[block->bbNum]; BitVecOps::ClearD(m_bvTraits, bbInfo.LiveOut); - block->VisitAllSuccs(m_compiler, [=, &bbInfo](BasicBlock* succ) { + block->VisitRegularSuccs(m_compiler, [=, &bbInfo](BasicBlock* succ) { BitVecOps::UnionD(m_bvTraits, bbInfo.LiveOut, m_bbInfo[succ->bbNum].LiveIn); m_hasPossibleBackEdge |= succ->bbNum <= block->bbNum; return BasicBlockVisit::Continue; diff --git a/src/coreclr/jit/rangecheck.cpp b/src/coreclr/jit/rangecheck.cpp index 1d10709ec85809..faf0641451d4fd 100644 --- a/src/coreclr/jit/rangecheck.cpp +++ b/src/coreclr/jit/rangecheck.cpp @@ -1110,7 +1110,6 @@ Range RangeCheck::GetRangeFromType(var_types type) { switch (type) { - case TYP_BOOL: case TYP_UBYTE: return Range(Limit(Limit::keConstant, 0), Limit(Limit::keConstant, BYTE_MAX)); case TYP_BYTE: diff --git a/src/coreclr/jit/switchrecognition.cpp b/src/coreclr/jit/switchrecognition.cpp new file mode 100644 index 00000000000000..5052e6ff57411b --- /dev/null +++ b/src/coreclr/jit/switchrecognition.cpp @@ -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. + +#include "jitpch.h" +#ifdef _MSC_VER +#pragma hdrstop +#endif + +// We mainly rely on TryLowerSwitchToBitTest in these heuristics, but jump tables can be useful +// even without conversion to a bitmap test. +#define SWITCH_MAX_DISTANCE ((TARGET_POINTER_SIZE * BITS_IN_BYTE) - 1) +#define SWITCH_MIN_TESTS 3 + +//----------------------------------------------------------------------------- +// optSwitchRecognition: Optimize range check for `x == cns1 || x == cns2 || x == cns3 ...` +// pattern and convert it to Switch block (jump table) which is then *might* be converted +// to a bitmap test via TryLowerSwitchToBitTest. +// TODO: recognize general jump table patterns. +// +// Return Value: +// MODIFIED_EVERYTHING if the optimization was applied. +// +PhaseStatus Compiler::optSwitchRecognition() +{ +// Limit to XARCH, ARM is already doing a great job with such comparisons using +// a series of ccmp instruction (see ifConvert phase). +#ifdef TARGET_XARCH + bool modified = false; + for (BasicBlock* block = fgFirstBB; block != nullptr; block = block->bbNext) + { + // block->KindIs(BBJ_COND) check is for better throughput. + if (block->KindIs(BBJ_COND) && !block->isRunRarely() && optSwitchDetectAndConvert(block)) + { + JITDUMP("Converted block " FMT_BB " to switch\n", block->bbNum) + modified = true; + } + } + + if (modified) + { + fgUpdateChangedFlowGraph(FlowGraphUpdates::COMPUTE_BASICS); + return PhaseStatus::MODIFIED_EVERYTHING; + } +#endif + return PhaseStatus::MODIFIED_NOTHING; +} + +//------------------------------------------------------------------------------ +// IsConstantTestCondBlock : Does the given block represent a simple BBJ_COND +// constant test? e.g. JTRUE(EQ/NE(X, CNS)). +// +// Arguments: +// block - The block to check +// blockIfTrue - [out] The block that will be jumped to if X == CNS +// blockIfFalse - [out] The block that will be jumped to if X != CNS +// isReversed - [out] True if the condition is reversed (GT_NE) +// variableNode - [out] The variable node (X in the example above) +// cns - [out] The constant value (CNS in the example above) +// +// Return Value: +// True if the block represents a constant test, false otherwise +// +bool IsConstantTestCondBlock(const BasicBlock* block, + BasicBlock** blockIfTrue, + BasicBlock** blockIfFalse, + bool* isReversed, + GenTree** variableNode = nullptr, + ssize_t* cns = nullptr) +{ + // NOTE: caller is expected to check that a block has multiple statements or not + if (block->KindIs(BBJ_COND) && (block->lastStmt() != nullptr) && ((block->bbFlags & BBF_DONT_REMOVE) == 0)) + { + const GenTree* rootNode = block->lastStmt()->GetRootNode(); + assert(rootNode->OperIs(GT_JTRUE)); + + // It has to be JTRUE(GT_EQ or GT_NE) + if (rootNode->gtGetOp1()->OperIs(GT_EQ, GT_NE)) + { + GenTree* op1 = rootNode->gtGetOp1()->gtGetOp1(); + GenTree* op2 = rootNode->gtGetOp1()->gtGetOp2(); + + if (!varTypeIsIntegral(op1) || !varTypeIsIntegral(op2)) + { + // Only integral types are supported + return false; + } + + // We're looking for "X EQ/NE CNS" or "CNS EQ/NE X" pattern + if (op1->IsCnsIntOrI() ^ op2->IsCnsIntOrI()) + { + // TODO: relax this to support any side-effect free expression + if (!op1->OperIs(GT_LCL_VAR) && !op2->OperIs(GT_LCL_VAR)) + { + return false; + } + + *isReversed = rootNode->gtGetOp1()->OperIs(GT_NE); + *blockIfTrue = *isReversed ? block->bbNext : block->bbJumpDest; + *blockIfFalse = *isReversed ? block->bbJumpDest : block->bbNext; + + if ((block->bbNext == block->bbJumpDest) || (block->bbJumpDest == block)) + { + // Ignoring weird cases like a condition jumping to itself + return false; + } + + if ((variableNode != nullptr) && (cns != nullptr)) + { + if (op1->IsCnsIntOrI()) + { + *cns = op1->AsIntCon()->IconValue(); + *variableNode = op2; + } + else + { + *cns = op2->AsIntCon()->IconValue(); + *variableNode = op1; + } + } + return true; + } + } + } + return false; +} + +//------------------------------------------------------------------------------ +// optSwitchDetectAndConvert : Try to detect a series of conditional blocks which +// can be converted into a switch (jump-table) construct. See optSwitchConvert +// for more details. +// +// Arguments: +// firstBlock - A block to start the search from +// +// Return Value: +// True if the conversion was successful, false otherwise +// +bool Compiler::optSwitchDetectAndConvert(BasicBlock* firstBlock) +{ + assert(firstBlock->KindIs(BBJ_COND)); + + GenTree* variableNode = nullptr; + ssize_t cns = 0; + BasicBlock* blockIfTrue = nullptr; + BasicBlock* blockIfFalse = nullptr; + + // The algorithm is simple - we check that the given block is a constant test block + // and then try to accumulate as many constant test blocks as possible. Once we hit + // a block that doesn't match the pattern, we start processing the accumulated blocks. + bool isReversed = false; + if (IsConstantTestCondBlock(firstBlock, &blockIfTrue, &blockIfFalse, &isReversed, &variableNode, &cns)) + { + if (isReversed) + { + // First block uses NE - we don't support this yet. We currently expect all blocks to use EQ + // and allow NE for the last one (because it's what Roslyn usually emits). + // TODO: make it more flexible and support cases like "x != cns1 && x != cns2 && ..." + return false; + } + + // No more than SWITCH_MAX_TABLE_SIZE blocks are allowed (arbitrary limit in this context) + int testValueIndex = 0; + ssize_t testValues[SWITCH_MAX_DISTANCE] = {}; + testValues[testValueIndex++] = cns; + + const BasicBlock* prevBlock = firstBlock; + + // Now walk the next blocks and see if they are basically the same type of test + for (const BasicBlock* currBb = firstBlock->bbNext; currBb != nullptr; currBb = currBb->bbNext) + { + GenTree* currVariableNode = nullptr; + ssize_t currCns = 0; + BasicBlock* currBlockIfTrue = nullptr; + BasicBlock* currBlockIfFalse = nullptr; + + if (!currBb->hasSingleStmt()) + { + // Only the first conditional block can have multiple statements. + // Stop searching and process what we already have. + return optSwitchConvert(firstBlock, testValueIndex, testValues, variableNode); + } + + // Inspect secondary blocks + if (IsConstantTestCondBlock(currBb, &currBlockIfTrue, &currBlockIfFalse, &isReversed, &currVariableNode, + &currCns)) + { + if (currBlockIfTrue != blockIfTrue) + { + // This blocks jumps to a different target, stop searching and process what we already have. + return optSwitchConvert(firstBlock, testValueIndex, testValues, variableNode); + } + + if (!GenTree::Compare(currVariableNode, variableNode)) + { + // A different variable node is used, stop searching and process what we already have. + return optSwitchConvert(firstBlock, testValueIndex, testValues, variableNode); + } + + if (currBb->GetUniquePred(this) != prevBlock) + { + // Multiple preds in a secondary block, stop searching and process what we already have. + return optSwitchConvert(firstBlock, testValueIndex, testValues, variableNode); + } + + if (!BasicBlock::sameEHRegion(prevBlock, currBb)) + { + // Current block is in a different EH region, stop searching and process what we already have. + return optSwitchConvert(firstBlock, testValueIndex, testValues, variableNode); + } + + // Ok we can work with that, add the test value to the list + testValues[testValueIndex++] = currCns; + if (testValueIndex == SWITCH_MAX_DISTANCE) + { + // Too many suitable tests found - stop and process what we already have. + return optSwitchConvert(firstBlock, testValueIndex, testValues, variableNode); + } + + if (isReversed) + { + // We only support reversed test (GT_NE) for the last block. + return optSwitchConvert(firstBlock, testValueIndex, testValues, variableNode); + } + + prevBlock = currBb; + } + else + { + // Current block is not a suitable test, stop searching and process what we already have. + return optSwitchConvert(firstBlock, testValueIndex, testValues, variableNode); + } + } + } + + return false; +} + +//------------------------------------------------------------------------------ +// optSwitchConvert : Convert a series of conditional blocks into a switch block +// conditional blocks are blocks that have a single statement that is a GT_EQ +// or GT_NE node. The blocks are expected jump into the same target and test +// the same variable against different constants +// +// Arguments: +// firstBlock - First conditional block in the chain +// testsCount - Number of conditional blocks in the chain +// testValues - Array of constants that are tested against the variable +// nodeToTest - Variable node that is tested against the constants +// +// Return Value: +// True if the conversion was successful, false otherwise +// +bool Compiler::optSwitchConvert(BasicBlock* firstBlock, int testsCount, ssize_t* testValues, GenTree* nodeToTest) +{ + assert(firstBlock->KindIs(BBJ_COND)); + + if (testsCount < SWITCH_MIN_TESTS) + { + // Early out - short chains. + return false; + } + + static_assert_no_msg(SWITCH_MIN_TESTS > 0); + + // Find max and min values in the testValues array + // At this point we have at least SWITCH_MIN_TESTS values in the array + ssize_t minValue = testValues[0]; + ssize_t maxValue = testValues[0]; + + int testIdx = 0; + for (; testIdx < testsCount; testIdx++) + { + ssize_t testValue = testValues[testIdx]; + if (testValue < 0) + { + // We don't support negative values + break; + } + + const ssize_t newMinValue = min(minValue, testValue); + const ssize_t newMaxValue = max(maxValue, testValue); + assert(newMaxValue >= newMinValue); + if ((newMaxValue - newMinValue) > SWITCH_MAX_DISTANCE) + { + // Stop here, the distance between min and max is too big + break; + } + minValue = newMinValue; + maxValue = newMaxValue; + } + + // testIdx is now representing the index of last good test value, + // Update testsCount as it's now potentially smaller than initially. + testsCount = testIdx; + + if (testsCount < SWITCH_MIN_TESTS) + { + // Make sure we still have at least SWITCH_MIN_TESTS values after we filtered out some of them + return false; + } + + // if MaxValue is less than SWITCH_MAX_DISTANCE then don't bother with SUB(val, minValue) + if (maxValue <= SWITCH_MAX_DISTANCE) + { + minValue = 0; + } + + // Find the last block in the chain + const BasicBlock* lastBlock = firstBlock; + for (int i = 0; i < testsCount - 1; i++) + { + lastBlock = lastBlock->bbNext; + } + + BasicBlock* blockIfTrue = nullptr; + BasicBlock* blockIfFalse = nullptr; + bool isReversed = false; + const bool isTest = IsConstantTestCondBlock(lastBlock, &blockIfTrue, &blockIfFalse, &isReversed); + assert(isTest); + + // Convert firstBlock to a switch block + firstBlock->bbJumpKind = BBJ_SWITCH; + firstBlock->bbJumpDest = nullptr; + firstBlock->bbCodeOffsEnd = lastBlock->bbCodeOffsEnd; + firstBlock->lastStmt()->GetRootNode()->ChangeOper(GT_SWITCH); + + // The root node is now SUB(nodeToTest, minValue) if minValue != 0 + GenTree* switchValue = gtCloneExpr(nodeToTest); + if (minValue != 0) + { + switchValue = + gtNewOperNode(GT_SUB, nodeToTest->TypeGet(), switchValue, gtNewIconNode(minValue, nodeToTest->TypeGet())); + } + + firstBlock->lastStmt()->GetRootNode()->AsOp()->gtOp1 = switchValue; + gtSetStmtInfo(firstBlock->lastStmt()); + fgSetStmtSeq(firstBlock->lastStmt()); + gtUpdateStmtSideEffects(firstBlock->lastStmt()); + + // Unlink and remove the whole chain of conditional blocks + BasicBlock* blockToRemove = firstBlock->bbNext; + fgRemoveRefPred(blockToRemove, firstBlock); + while (blockToRemove != lastBlock->bbNext) + { + BasicBlock* nextBlock = blockToRemove->bbNext; + fgRemoveBlock(blockToRemove, true); + blockToRemove = nextBlock; + } + + const auto jumpCount = static_cast(maxValue - minValue + 1); + assert((jumpCount > 0) && (jumpCount <= SWITCH_MAX_DISTANCE + 1)); + const auto jmpTab = new (this, CMK_BasicBlock) BasicBlock*[jumpCount + 1 /*default case*/]; + + firstBlock->bbJumpSwt = new (this, CMK_BasicBlock) BBswtDesc; + firstBlock->bbJumpSwt->bbsCount = jumpCount + 1; + firstBlock->bbJumpSwt->bbsHasDefault = true; + firstBlock->bbJumpSwt->bbsDstTab = jmpTab; + firstBlock->bbNext = isReversed ? blockIfTrue : blockIfFalse; + fgHasSwitch = true; + + // Splitting doesn't work well with jump-tables currently + opts.compProcedureSplitting = false; + + // Compose a bit vector of all the values we have in the testValues array + // to quickly check if a value is in the array + ssize_t bitVector = 0; + for (testIdx = 0; testIdx < testsCount; testIdx++) + { + assert(testIdx <= (int)((sizeof(ssize_t) * BITS_PER_BYTE) - 1)); + bitVector |= (ssize_t)(1ULL << static_cast((testValues[testIdx] - minValue))); + } + + // Unlink blockIfTrue from firstBlock, we're going to link it again in the loop below. + fgRemoveRefPred(blockIfTrue, firstBlock); + + for (unsigned i = 0; i < jumpCount; i++) + { + // value exists in the testValues array (via bitVector) - 'true' case. + const bool isTrue = (bitVector & static_cast(1ULL << i)) != 0; + jmpTab[i] = isTrue ? blockIfTrue : blockIfFalse; + + fgAddRefPred(jmpTab[i], firstBlock); + } + + // Link the 'default' case + jmpTab[jumpCount] = blockIfFalse; + fgAddRefPred(blockIfFalse, firstBlock); + + return true; +} diff --git a/src/coreclr/jit/target.h b/src/coreclr/jit/target.h index 4e385d323a7d81..638e55d56c7431 100644 --- a/src/coreclr/jit/target.h +++ b/src/coreclr/jit/target.h @@ -38,7 +38,7 @@ inline bool compMacOsArm64Abi() } inline bool compFeatureArgSplit() { - return TargetArchitecture::IsLoongArch64 || TargetArchitecture::IsArm32 || TargetArchitecture::IsRiscv64 || + return TargetArchitecture::IsLoongArch64 || TargetArchitecture::IsArm32 || TargetArchitecture::IsRiscV64 || (TargetOS::IsWindows && TargetArchitecture::IsArm64); } inline bool compUnixX86Abi() diff --git a/src/coreclr/jit/targetloongarch64.h b/src/coreclr/jit/targetloongarch64.h index d9442f17299b43..736fd1406c304c 100644 --- a/src/coreclr/jit/targetloongarch64.h +++ b/src/coreclr/jit/targetloongarch64.h @@ -75,8 +75,8 @@ #define RBM_CALLEE_SAVED (RBM_INT_CALLEE_SAVED | RBM_FLT_CALLEE_SAVED) #define RBM_CALLEE_TRASH (RBM_INT_CALLEE_TRASH | RBM_FLT_CALLEE_TRASH) - #define REG_DEFAULT_HELPER_CALL_TARGET REG_T2 - #define RBM_DEFAULT_HELPER_CALL_TARGET RBM_T2 + #define REG_DEFAULT_HELPER_CALL_TARGET REG_T4 + #define RBM_DEFAULT_HELPER_CALL_TARGET RBM_T4 #define RBM_ALLINT (RBM_INT_CALLEE_SAVED | RBM_INT_CALLEE_TRASH) #define RBM_ALLFLOAT (RBM_FLT_CALLEE_SAVED | RBM_FLT_CALLEE_TRASH) @@ -212,14 +212,14 @@ #define REG_PREV(reg) ((regNumber)((unsigned)(reg) - 1)) // The following registers are used in emitting Enter/Leave/Tailcall profiler callbacks - #define REG_PROFILER_ENTER_ARG_FUNC_ID REG_R10 - #define RBM_PROFILER_ENTER_ARG_FUNC_ID RBM_R10 - #define REG_PROFILER_ENTER_ARG_CALLER_SP REG_R11 - #define RBM_PROFILER_ENTER_ARG_CALLER_SP RBM_R11 - #define REG_PROFILER_LEAVE_ARG_FUNC_ID REG_R10 - #define RBM_PROFILER_LEAVE_ARG_FUNC_ID RBM_R10 - #define REG_PROFILER_LEAVE_ARG_CALLER_SP REG_R11 - #define RBM_PROFILER_LEAVE_ARG_CALLER_SP RBM_R11 + #define REG_PROFILER_ENTER_ARG_FUNC_ID REG_T1 + #define RBM_PROFILER_ENTER_ARG_FUNC_ID RBM_T1 + #define REG_PROFILER_ENTER_ARG_CALLER_SP REG_T2 + #define RBM_PROFILER_ENTER_ARG_CALLER_SP RBM_T2 + #define REG_PROFILER_LEAVE_ARG_FUNC_ID REG_PROFILER_ENTER_ARG_FUNC_ID + #define RBM_PROFILER_LEAVE_ARG_FUNC_ID RBM_PROFILER_ENTER_ARG_FUNC_ID + #define REG_PROFILER_LEAVE_ARG_CALLER_SP REG_PROFILER_ENTER_ARG_CALLER_SP + #define RBM_PROFILER_LEAVE_ARG_CALLER_SP RBM_PROFILER_ENTER_ARG_CALLER_SP // The registers trashed by profiler enter/leave/tailcall hook #define RBM_PROFILER_ENTER_TRASH (RBM_CALLEE_TRASH & ~(RBM_ARG_REGS|RBM_FLTARG_REGS|RBM_FP)) diff --git a/src/coreclr/jit/targetriscv64.h b/src/coreclr/jit/targetriscv64.h index fb0f487e47476e..a12bcc04986409 100644 --- a/src/coreclr/jit/targetriscv64.h +++ b/src/coreclr/jit/targetriscv64.h @@ -192,18 +192,18 @@ #define REG_PREV(reg) ((regNumber)((unsigned)(reg) - 1)) // The following registers are used in emitting Enter/Leave/Tailcall profiler callbacks - #define REG_PROFILER_ENTER_ARG_FUNC_ID REG_R16 - #define RBM_PROFILER_ENTER_ARG_FUNC_ID RBM_R16 - #define REG_PROFILER_ENTER_ARG_CALLER_SP REG_R17 - #define RBM_PROFILER_ENTER_ARG_CALLER_SP RBM_R17 - #define REG_PROFILER_LEAVE_ARG_FUNC_ID REG_R16 - #define RBM_PROFILER_LEAVE_ARG_FUNC_ID RBM_R16 - #define REG_PROFILER_LEAVE_ARG_CALLER_SP REG_R17 - #define RBM_PROFILER_LEAVE_ARG_CALLER_SP RBM_R17 + #define REG_PROFILER_ENTER_ARG_FUNC_ID REG_T0 + #define RBM_PROFILER_ENTER_ARG_FUNC_ID RBM_T0 + #define REG_PROFILER_ENTER_ARG_CALLER_SP REG_T1 + #define RBM_PROFILER_ENTER_ARG_CALLER_SP RBM_T1 + #define REG_PROFILER_LEAVE_ARG_FUNC_ID REG_PROFILER_ENTER_ARG_FUNC_ID + #define RBM_PROFILER_LEAVE_ARG_FUNC_ID RBM_PROFILER_ENTER_ARG_FUNC_ID + #define REG_PROFILER_LEAVE_ARG_CALLER_SP REG_PROFILER_ENTER_ARG_CALLER_SP + #define RBM_PROFILER_LEAVE_ARG_CALLER_SP RBM_PROFILER_ENTER_ARG_CALLER_SP // The registers trashed by profiler enter/leave/tailcall hook #define RBM_PROFILER_ENTER_TRASH (RBM_CALLEE_TRASH & ~(RBM_ARG_REGS|RBM_FLTARG_REGS|RBM_FP)) - #define RBM_PROFILER_LEAVE_TRASH (RBM_CALLEE_TRASH & ~(RBM_ARG_REGS|RBM_FLTARG_REGS|RBM_FP)) + #define RBM_PROFILER_LEAVE_TRASH RBM_PROFILER_ENTER_TRASH #define RBM_PROFILER_TAILCALL_TRASH RBM_PROFILER_LEAVE_TRASH // Which register are int and long values returned in ? diff --git a/src/coreclr/jit/typelist.h b/src/coreclr/jit/typelist.h index dad396b6f63355..8b8da6db011f5b 100644 --- a/src/coreclr/jit/typelist.h +++ b/src/coreclr/jit/typelist.h @@ -37,7 +37,6 @@ tf ) DEF_TP(UNDEF ,"" , TYP_UNDEF, 0, 0, 0, 0, 0, VTR_INT, availableIntRegs, RBM_INT_CALLEE_SAVED, RBM_INT_CALLEE_TRASH, VTF_ANY) DEF_TP(VOID ,"void" , TYP_VOID, 0, 0, 0, 0, 0, VTR_INT, availableIntRegs, RBM_INT_CALLEE_SAVED, RBM_INT_CALLEE_TRASH, VTF_ANY) -DEF_TP(BOOL ,"bool" , TYP_INT, 1, 1, 4, 1, 1, VTR_INT, availableIntRegs, RBM_INT_CALLEE_SAVED, RBM_INT_CALLEE_TRASH, VTF_INT|VTF_UNS) DEF_TP(BYTE ,"byte" , TYP_INT, 1, 1, 4, 1, 1, VTR_INT, availableIntRegs, RBM_INT_CALLEE_SAVED, RBM_INT_CALLEE_TRASH, VTF_INT) DEF_TP(UBYTE ,"ubyte" , TYP_INT, 1, 1, 4, 1, 1, VTR_INT, availableIntRegs, RBM_INT_CALLEE_SAVED, RBM_INT_CALLEE_TRASH, VTF_INT|VTF_UNS) diff --git a/src/coreclr/jit/utils.cpp b/src/coreclr/jit/utils.cpp index 3ec8e71c159e46..19bdb0fadaa8c5 100644 --- a/src/coreclr/jit/utils.cpp +++ b/src/coreclr/jit/utils.cpp @@ -2734,7 +2734,7 @@ float FloatingPointUtils::maximumNumber(float x, float y) // // It propagates NaN inputs back to the caller and // otherwise returns the lesser of the inputs. It -// treats +0 as lesser than -0 as per the specification. +// treats +0 as greater than -0 as per the specification. // // Arguments: // val1 - left operand @@ -2763,7 +2763,7 @@ double FloatingPointUtils::minimum(double val1, double val2) // // It propagates NaN inputs back to the caller and // otherwise returns the input with a lesser magnitude. -// It treats +0 as lesser than -0 as per the specification. +// It treats +0 as greater than -0 as per the specification. // // Arguments: // x - left operand @@ -2856,7 +2856,7 @@ double FloatingPointUtils::minimumNumber(double x, double y) // // It propagates NaN inputs back to the caller and // otherwise returns the lesser of the inputs. It -// treats +0 as lesser than -0 as per the specification. +// treats +0 as greater than -0 as per the specification. // // Arguments: // val1 - left operand @@ -2885,7 +2885,7 @@ float FloatingPointUtils::minimum(float val1, float val2) // // It propagates NaN inputs back to the caller and // otherwise returns the input with a lesser magnitude. -// It treats +0 as lesser than -0 as per the specification. +// It treats +0 as greater than -0 as per the specification. // // Arguments: // x - left operand @@ -3855,7 +3855,6 @@ bool CastFromIntOverflows(int32_t fromValue, var_types toType, bool fromUnsigned { switch (toType) { - case TYP_BOOL: case TYP_BYTE: case TYP_UBYTE: case TYP_SHORT: @@ -3879,7 +3878,6 @@ bool CastFromLongOverflows(int64_t fromValue, var_types toType, bool fromUnsigne { switch (toType) { - case TYP_BOOL: case TYP_BYTE: case TYP_UBYTE: case TYP_SHORT: @@ -3994,7 +3992,6 @@ bool CastFromFloatOverflows(float fromValue, var_types toType) { case TYP_BYTE: return !(-129.0f < fromValue && fromValue < 128.0f); - case TYP_BOOL: case TYP_UBYTE: return !(-1.0f < fromValue && fromValue < 256.0f); case TYP_SHORT: @@ -4023,7 +4020,6 @@ bool CastFromDoubleOverflows(double fromValue, var_types toType) { case TYP_BYTE: return !(-129.0 < fromValue && fromValue < 128.0); - case TYP_BOOL: case TYP_UBYTE: return !(-1.0 < fromValue && fromValue < 256.0); case TYP_SHORT: diff --git a/src/coreclr/jit/utils.h b/src/coreclr/jit/utils.h index 77f74ba95cb31d..ba044c7b9cc5d2 100644 --- a/src/coreclr/jit/utils.h +++ b/src/coreclr/jit/utils.h @@ -1002,7 +1002,6 @@ bool FitsIn(var_types type, T value) { case TYP_BYTE: return FitsIn(value); - case TYP_BOOL: case TYP_UBYTE: return FitsIn(value); case TYP_SHORT: diff --git a/src/coreclr/jit/valuenum.cpp b/src/coreclr/jit/valuenum.cpp index 2ea2ee7845b8b2..79da0ca4601bd4 100644 --- a/src/coreclr/jit/valuenum.cpp +++ b/src/coreclr/jit/valuenum.cpp @@ -1885,7 +1885,6 @@ ValueNum ValueNumStore::VNForGenericCon(var_types typ, uint8_t* cnsVal) typ val = {}; \ memcpy(&val, cnsVal, sizeof(typ)); - case TYP_BOOL: case TYP_UBYTE: { READ_VALUE(uint8_t); @@ -2045,7 +2044,6 @@ ValueNum ValueNumStore::VNZeroForType(var_types typ) { switch (typ) { - case TYP_BOOL: case TYP_BYTE: case TYP_UBYTE: case TYP_SHORT: @@ -2116,7 +2114,6 @@ ValueNum ValueNumStore::VNOneForType(var_types typ) { switch (typ) { - case TYP_BOOL: case TYP_BYTE: case TYP_UBYTE: case TYP_SHORT: @@ -3862,7 +3859,6 @@ ValueNum ValueNumStore::EvalCastForConstantArgs(var_types typ, VNFunc func, Valu case TYP_BYTE: assert(typ == TYP_INT); return VNForIntCon(INT8(arg0Val)); - case TYP_BOOL: case TYP_UBYTE: assert(typ == TYP_INT); return VNForIntCon(UINT8(arg0Val)); @@ -3945,7 +3941,6 @@ ValueNum ValueNumStore::EvalCastForConstantArgs(var_types typ, VNFunc func, Valu case TYP_BYTE: assert(typ == TYP_INT); return VNForIntCon(INT8(arg0Val)); - case TYP_BOOL: case TYP_UBYTE: assert(typ == TYP_INT); return VNForIntCon(UINT8(arg0Val)); @@ -4002,7 +3997,6 @@ ValueNum ValueNumStore::EvalCastForConstantArgs(var_types typ, VNFunc func, Valu case TYP_BYTE: assert(typ == TYP_INT); return VNForIntCon(INT8(arg0Val)); - case TYP_BOOL: case TYP_UBYTE: assert(typ == TYP_INT); return VNForIntCon(UINT8(arg0Val)); @@ -4044,7 +4038,6 @@ ValueNum ValueNumStore::EvalCastForConstantArgs(var_types typ, VNFunc func, Valu case TYP_BYTE: assert(typ == TYP_INT); return VNForIntCon(INT8(arg0Val)); - case TYP_BOOL: case TYP_UBYTE: assert(typ == TYP_INT); return VNForIntCon(UINT8(arg0Val)); @@ -4153,7 +4146,6 @@ ValueNum ValueNumStore::EvalBitCastForConstantArgs(var_types dstType, ValueNum a switch (dstType) { - case TYP_BOOL: case TYP_UBYTE: memcpy(&int32, bytes, sizeof(int32)); return VNForIntCon(static_cast(int32)); @@ -7440,6 +7432,26 @@ ValueNum ValueNumStore::EvalHWIntrinsicFunBinary(var_types type, case NI_AVX512BW_ShiftLeftLogical: #endif { +#ifdef TARGET_XARCH + if (TypeOfVN(arg1VN) == TYP_SIMD16) + { + // The xarch shift instructions support taking the shift amount as + // a simd16, in which case they take the shift amount from the lower + // 64-bits. + + uint64_t shiftAmount = GetConstantSimd16(arg1VN).u64[0]; + + if (genTypeSize(baseType) != 8) + { + arg1VN = VNForIntCon(static_cast(shiftAmount)); + } + else + { + arg1VN = VNForLongCon(static_cast(shiftAmount)); + } + } +#endif // TARGET_XARCH + return EvaluateBinarySimd(this, GT_LSH, /* scalar */ false, type, baseType, arg0VN, arg1VN); } @@ -7453,6 +7465,26 @@ ValueNum ValueNumStore::EvalHWIntrinsicFunBinary(var_types type, case NI_AVX512BW_ShiftRightArithmetic: #endif { +#ifdef TARGET_XARCH + if (TypeOfVN(arg1VN) == TYP_SIMD16) + { + // The xarch shift instructions support taking the shift amount as + // a simd16, in which case they take the shift amount from the lower + // 64-bits. + + uint64_t shiftAmount = GetConstantSimd16(arg1VN).u64[0]; + + if (genTypeSize(baseType) != 8) + { + arg1VN = VNForIntCon(static_cast(shiftAmount)); + } + else + { + arg1VN = VNForLongCon(static_cast(shiftAmount)); + } + } +#endif // TARGET_XARCH + return EvaluateBinarySimd(this, GT_RSH, /* scalar */ false, type, baseType, arg0VN, arg1VN); } @@ -7465,6 +7497,26 @@ ValueNum ValueNumStore::EvalHWIntrinsicFunBinary(var_types type, case NI_AVX512BW_ShiftRightLogical: #endif { +#ifdef TARGET_XARCH + if (TypeOfVN(arg1VN) == TYP_SIMD16) + { + // The xarch shift instructions support taking the shift amount as + // a simd16, in which case they take the shift amount from the lower + // 64-bits. + + uint64_t shiftAmount = GetConstantSimd16(arg1VN).u64[0]; + + if (genTypeSize(baseType) != 8) + { + arg1VN = VNForIntCon(static_cast(shiftAmount)); + } + else + { + arg1VN = VNForLongCon(static_cast(shiftAmount)); + } + } +#endif // TARGET_XARCH + return EvaluateBinarySimd(this, GT_RSZ, /* scalar */ false, type, baseType, arg0VN, arg1VN); } @@ -7891,7 +7943,7 @@ ValueNum ValueNumStore::EvalHWIntrinsicFunBinary(var_types type, #endif { // Handle `x ^ x == 0` - return arg0VN; + return VNZeroForType(type); } default: @@ -8758,7 +8810,6 @@ void ValueNumStore::vnDump(Compiler* comp, ValueNum vn, bool isPtr) var_types vnt = TypeOfVN(vn); switch (vnt) { - case TYP_BOOL: case TYP_BYTE: case TYP_UBYTE: case TYP_SHORT: @@ -10355,7 +10406,6 @@ void Compiler::fgValueNumberTreeConst(GenTree* tree) case TYP_SHORT: case TYP_BYTE: case TYP_UBYTE: - case TYP_BOOL: if (tree->IsIconHandle()) { const GenTreeIntCon* cns = tree->AsIntCon(); diff --git a/src/coreclr/jit/vartype.h b/src/coreclr/jit/vartype.h index 3c38a3427ebd29..65a4c50de78865 100644 --- a/src/coreclr/jit/vartype.h +++ b/src/coreclr/jit/vartype.h @@ -126,7 +126,6 @@ inline var_types varTypeToSigned(T vt) { switch (type) { - case TYP_BOOL: case TYP_UBYTE: return TYP_BYTE; case TYP_USHORT: @@ -204,7 +203,7 @@ inline bool varTypeIsEnregisterable(T vt) template inline bool varTypeIsByte(T vt) { - return (TypeGet(vt) >= TYP_BOOL) && (TypeGet(vt) <= TYP_UBYTE); + return (TypeGet(vt) == TYP_BYTE) || (TypeGet(vt) == TYP_UBYTE); } template @@ -216,7 +215,7 @@ inline bool varTypeIsShort(T vt) template inline bool varTypeIsSmall(T vt) { - return (TypeGet(vt) >= TYP_BOOL) && (TypeGet(vt) <= TYP_USHORT); + return (TypeGet(vt) >= TYP_BYTE) && (TypeGet(vt) <= TYP_USHORT); } template @@ -238,13 +237,13 @@ inline bool varTypeIsIntOrI(T vt) template inline bool genActualTypeIsInt(T vt) { - return ((TypeGet(vt) >= TYP_BOOL) && (TypeGet(vt) <= TYP_UINT)); + return ((TypeGet(vt) >= TYP_BYTE) && (TypeGet(vt) <= TYP_UINT)); } template inline bool genActualTypeIsIntOrI(T vt) { - return ((TypeGet(vt) >= TYP_BOOL) && (TypeGet(vt) <= TYP_U_IMPL)); + return ((TypeGet(vt) >= TYP_BYTE) && (TypeGet(vt) <= TYP_U_IMPL)); } template diff --git a/src/coreclr/jit/vixl/LICENCE b/src/coreclr/jit/vixl/LICENCE new file mode 100644 index 00000000000000..0acd8ebd638214 --- /dev/null +++ b/src/coreclr/jit/vixl/LICENCE @@ -0,0 +1,30 @@ +LICENCE +======= + +The software in this repository is covered by the following licence. + +// Copyright 2015, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/coreclr/jit/vixl/aarch64/abi-aarch64.h b/src/coreclr/jit/vixl/aarch64/abi-aarch64.h new file mode 100644 index 00000000000000..6e5ba7e34c1f18 --- /dev/null +++ b/src/coreclr/jit/vixl/aarch64/abi-aarch64.h @@ -0,0 +1,167 @@ +// Copyright 2016, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// The ABI features are only supported with C++11 or later. +#if __cplusplus >= 201103L +// This should not be defined manually. +#define VIXL_HAS_ABI_SUPPORT +#elif defined(VIXL_HAS_ABI_SUPPORT) +#error "The ABI support requires C++11 or later." +#endif + +#ifdef VIXL_HAS_ABI_SUPPORT + +#ifndef VIXL_AARCH64_ABI_AARCH64_H_ +#define VIXL_AARCH64_ABI_AARCH64_H_ + +#include +#include + +#include "../globals-vixl.h" + +#include "instructions-aarch64.h" +#include "operands-aarch64.h" + +namespace vixl { +namespace aarch64 { + +// Class describing the AArch64 procedure call standard, as defined in "ARM +// Procedure Call Standard for the ARM 64-bit Architecture (AArch64)", +// release 1.0 (AAPCS below). +// +// The stages in the comments match the description in that document. +// +// Stage B does not apply to arguments handled by this class. +class ABI { + public: + explicit ABI(Register stack_pointer = sp) : stack_pointer_(stack_pointer) { + // Stage A - Initialization + Reset(); + } + + void Reset() { + NGRN_ = 0; + NSRN_ = 0; + stack_offset_ = 0; + } + + int GetStackSpaceRequired() { return stack_offset_; } + + // The logic is described in section 5.5 of the AAPCS. + template + GenericOperand GetReturnGenericOperand() const { + ABI abi(stack_pointer_); + GenericOperand result = abi.GetNextParameterGenericOperand(); + VIXL_ASSERT(result.IsCPURegister()); + return result; + } + + // The logic is described in section 5.4.2 of the AAPCS. + // The `GenericOperand` returned describes the location reserved for the + // argument from the point of view of the callee. + template + GenericOperand GetNextParameterGenericOperand() { + const bool is_floating_point_type = std::is_floating_point::value; + const bool is_integral_type = + std::is_integral::value || std::is_enum::value; + const bool is_pointer_type = std::is_pointer::value; + int type_alignment = std::alignment_of::value; + + // We only support basic types. + VIXL_ASSERT(is_floating_point_type || is_integral_type || is_pointer_type); + + // To ensure we get the correct type of operand when simulating on a 32-bit + // host, force the size of pointer types to the native AArch64 pointer size. + unsigned size = is_pointer_type ? 8 : sizeof(T); + // The size of the 'operand' reserved for the argument. + unsigned operand_size = AlignUp(size, kWRegSizeInBytes); + if (size > 8) { + VIXL_UNIMPLEMENTED(); + return GenericOperand(); + } + + // Stage C.1 + if (is_floating_point_type && (NSRN_ < 8)) { + return GenericOperand(VRegister(NSRN_++, size * kBitsPerByte)); + } + // Stages C.2, C.3, and C.4: Unsupported. Caught by the assertions above. + // Stages C.5 and C.6 + if (is_floating_point_type) { + VIXL_STATIC_ASSERT( + !is_floating_point_type || + (std::is_same::value || std::is_same::value)); + int offset = stack_offset_; + stack_offset_ += 8; + return GenericOperand(MemOperand(stack_pointer_, offset), operand_size); + } + // Stage C.7 + if ((is_integral_type || is_pointer_type) && (size <= 8) && (NGRN_ < 8)) { + return GenericOperand(Register(NGRN_++, operand_size * kBitsPerByte)); + } + // Stage C.8 + if (type_alignment == 16) { + NGRN_ = AlignUp(NGRN_, 2); + } + // Stage C.9 + if (is_integral_type && (size == 16) && (NGRN_ < 7)) { + VIXL_UNIMPLEMENTED(); + return GenericOperand(); + } + // Stage C.10: Unsupported. Caught by the assertions above. + // Stage C.11 + NGRN_ = 8; + // Stage C.12 + stack_offset_ = AlignUp(stack_offset_, max(type_alignment, 8)); + // Stage C.13: Unsupported. Caught by the assertions above. + // Stage C.14 + VIXL_ASSERT(size <= 8u); + size = max(size, 8u); + int offset = stack_offset_; + stack_offset_ += size; + return GenericOperand(MemOperand(stack_pointer_, offset), operand_size); + } + + private: + Register stack_pointer_; + // Next General-purpose Register Number. + int NGRN_; + // Next SIMD and Floating-point Register Number. + int NSRN_; + // The acronym "NSAA" used in the standard refers to the "Next Stacked + // Argument Address". Here we deal with offsets from the stack pointer. + int stack_offset_; +}; + +template <> +inline GenericOperand ABI::GetReturnGenericOperand() const { + return GenericOperand(); +} +} +} // namespace vixl::aarch64 + +#endif // VIXL_AARCH64_ABI_AARCH64_H_ + +#endif // VIXL_HAS_ABI_SUPPORT diff --git a/src/coreclr/jit/vixl/aarch64/assembler-aarch64.cc b/src/coreclr/jit/vixl/aarch64/assembler-aarch64.cc new file mode 100644 index 00000000000000..29800f0ea53ea9 --- /dev/null +++ b/src/coreclr/jit/vixl/aarch64/assembler-aarch64.cc @@ -0,0 +1,6279 @@ +// Copyright 2015, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +#include + +#include "assembler-aarch64.h" +#include "macro-assembler-aarch64.h" + +namespace vixl { +namespace aarch64 { + +RawLiteral::RawLiteral(size_t size, + LiteralPool* literal_pool, + DeletionPolicy deletion_policy) + : size_(size), + offset_(0), + low64_(0), + high64_(0), + literal_pool_(literal_pool), + deletion_policy_(deletion_policy) { + VIXL_ASSERT((deletion_policy == kManuallyDeleted) || (literal_pool_ != NULL)); + if (deletion_policy == kDeletedOnPoolDestruction) { + literal_pool_->DeleteOnDestruction(this); + } +} + + +void Assembler::Reset() { GetBuffer()->Reset(); } + + +void Assembler::bind(Label* label) { + BindToOffset(label, GetBuffer()->GetCursorOffset()); +} + + +void Assembler::BindToOffset(Label* label, ptrdiff_t offset) { + VIXL_ASSERT((offset >= 0) && (offset <= GetBuffer()->GetCursorOffset())); + VIXL_ASSERT(offset % kInstructionSize == 0); + + label->Bind(offset); + + for (Label::LabelLinksIterator it(label); !it.Done(); it.Advance()) { + Instruction* link = + GetBuffer()->GetOffsetAddress(*it.Current()); + link->SetImmPCOffsetTarget(GetLabelAddress(label)); + } + label->ClearAllLinks(); +} + + +// A common implementation for the LinkAndGetOffsetTo helpers. +// +// The offset is calculated by aligning the PC and label addresses down to a +// multiple of 1 << element_shift, then calculating the (scaled) offset between +// them. This matches the semantics of adrp, for example. +template +ptrdiff_t Assembler::LinkAndGetOffsetTo(Label* label) { + VIXL_STATIC_ASSERT(element_shift < (sizeof(ptrdiff_t) * 8)); + + if (label->IsBound()) { + uintptr_t pc_offset = GetCursorAddress() >> element_shift; + uintptr_t label_offset = GetLabelAddress(label) >> element_shift; + return label_offset - pc_offset; + } else { + label->AddLink(GetBuffer()->GetCursorOffset()); + return 0; + } +} + + +ptrdiff_t Assembler::LinkAndGetByteOffsetTo(Label* label) { + return LinkAndGetOffsetTo<0>(label); +} + + +ptrdiff_t Assembler::LinkAndGetInstructionOffsetTo(Label* label) { + return LinkAndGetOffsetTo(label); +} + + +ptrdiff_t Assembler::LinkAndGetPageOffsetTo(Label* label) { + return LinkAndGetOffsetTo(label); +} + + +void Assembler::place(RawLiteral* literal) { + VIXL_ASSERT(!literal->IsPlaced()); + + // Patch instructions using this literal. + if (literal->IsUsed()) { + Instruction* target = GetCursorAddress(); + ptrdiff_t offset = literal->GetLastUse(); + bool done; + do { + Instruction* ldr = GetBuffer()->GetOffsetAddress(offset); + VIXL_ASSERT(ldr->IsLoadLiteral()); + + ptrdiff_t imm19 = ldr->GetImmLLiteral(); + VIXL_ASSERT(imm19 <= 0); + done = (imm19 == 0); + offset += imm19 * kLiteralEntrySize; + + ldr->SetImmLLiteral(target); + } while (!done); + } + + // "bind" the literal. + literal->SetOffset(GetCursorOffset()); + // Copy the data into the pool. + switch (literal->GetSize()) { + case kSRegSizeInBytes: + dc32(literal->GetRawValue32()); + break; + case kDRegSizeInBytes: + dc64(literal->GetRawValue64()); + break; + default: + VIXL_ASSERT(literal->GetSize() == kQRegSizeInBytes); + dc64(literal->GetRawValue128Low64()); + dc64(literal->GetRawValue128High64()); + } + + literal->literal_pool_ = NULL; +} + + +ptrdiff_t Assembler::LinkAndGetWordOffsetTo(RawLiteral* literal) { + VIXL_ASSERT(IsWordAligned(GetCursorOffset())); + + bool register_first_use = + (literal->GetLiteralPool() != NULL) && !literal->IsUsed(); + + if (literal->IsPlaced()) { + // The literal is "behind", the offset will be negative. + VIXL_ASSERT((literal->GetOffset() - GetCursorOffset()) <= 0); + return (literal->GetOffset() - GetCursorOffset()) >> kLiteralEntrySizeLog2; + } + + ptrdiff_t offset = 0; + // Link all uses together. + if (literal->IsUsed()) { + offset = + (literal->GetLastUse() - GetCursorOffset()) >> kLiteralEntrySizeLog2; + } + literal->SetLastUse(GetCursorOffset()); + + if (register_first_use) { + literal->GetLiteralPool()->AddEntry(literal); + } + + return offset; +} + + +// Code generation. +void Assembler::br(const Register& xn) { + VIXL_ASSERT(xn.Is64Bits()); + Emit(BR | Rn(xn)); +} + + +void Assembler::blr(const Register& xn) { + VIXL_ASSERT(xn.Is64Bits()); + Emit(BLR | Rn(xn)); +} + + +void Assembler::ret(const Register& xn) { + VIXL_ASSERT(xn.Is64Bits()); + Emit(RET | Rn(xn)); +} + + +void Assembler::braaz(const Register& xn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth)); + VIXL_ASSERT(xn.Is64Bits()); + Emit(BRAAZ | Rn(xn) | Rd_mask); +} + +void Assembler::brabz(const Register& xn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth)); + VIXL_ASSERT(xn.Is64Bits()); + Emit(BRABZ | Rn(xn) | Rd_mask); +} + +void Assembler::blraaz(const Register& xn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth)); + VIXL_ASSERT(xn.Is64Bits()); + Emit(BLRAAZ | Rn(xn) | Rd_mask); +} + +void Assembler::blrabz(const Register& xn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth)); + VIXL_ASSERT(xn.Is64Bits()); + Emit(BLRABZ | Rn(xn) | Rd_mask); +} + +void Assembler::retaa() { + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth)); + Emit(RETAA | Rn_mask | Rd_mask); +} + +void Assembler::retab() { + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth)); + Emit(RETAB | Rn_mask | Rd_mask); +} + +// The Arm ARM names the register Xm but encodes it in the Xd bitfield. +void Assembler::braa(const Register& xn, const Register& xm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth)); + VIXL_ASSERT(xn.Is64Bits() && xm.Is64Bits()); + Emit(BRAA | Rn(xn) | RdSP(xm)); +} + +void Assembler::brab(const Register& xn, const Register& xm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth)); + VIXL_ASSERT(xn.Is64Bits() && xm.Is64Bits()); + Emit(BRAB | Rn(xn) | RdSP(xm)); +} + +void Assembler::blraa(const Register& xn, const Register& xm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth)); + VIXL_ASSERT(xn.Is64Bits() && xm.Is64Bits()); + Emit(BLRAA | Rn(xn) | RdSP(xm)); +} + +void Assembler::blrab(const Register& xn, const Register& xm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth)); + VIXL_ASSERT(xn.Is64Bits() && xm.Is64Bits()); + Emit(BLRAB | Rn(xn) | RdSP(xm)); +} + + +void Assembler::b(int64_t imm26) { Emit(B | ImmUncondBranch(imm26)); } + + +void Assembler::b(int64_t imm19, Condition cond) { + Emit(B_cond | ImmCondBranch(imm19) | cond); +} + + +void Assembler::b(Label* label) { + int64_t offset = LinkAndGetInstructionOffsetTo(label); + VIXL_ASSERT(Instruction::IsValidImmPCOffset(UncondBranchType, offset)); + b(static_cast(offset)); +} + + +void Assembler::b(Label* label, Condition cond) { + int64_t offset = LinkAndGetInstructionOffsetTo(label); + VIXL_ASSERT(Instruction::IsValidImmPCOffset(CondBranchType, offset)); + b(static_cast(offset), cond); +} + + +void Assembler::bl(int64_t imm26) { Emit(BL | ImmUncondBranch(imm26)); } + + +void Assembler::bl(Label* label) { + int64_t offset = LinkAndGetInstructionOffsetTo(label); + VIXL_ASSERT(Instruction::IsValidImmPCOffset(UncondBranchType, offset)); + bl(static_cast(offset)); +} + + +void Assembler::cbz(const Register& rt, int64_t imm19) { + Emit(SF(rt) | CBZ | ImmCmpBranch(imm19) | Rt(rt)); +} + + +void Assembler::cbz(const Register& rt, Label* label) { + int64_t offset = LinkAndGetInstructionOffsetTo(label); + VIXL_ASSERT(Instruction::IsValidImmPCOffset(CompareBranchType, offset)); + cbz(rt, static_cast(offset)); +} + + +void Assembler::cbnz(const Register& rt, int64_t imm19) { + Emit(SF(rt) | CBNZ | ImmCmpBranch(imm19) | Rt(rt)); +} + + +void Assembler::cbnz(const Register& rt, Label* label) { + int64_t offset = LinkAndGetInstructionOffsetTo(label); + VIXL_ASSERT(Instruction::IsValidImmPCOffset(CompareBranchType, offset)); + cbnz(rt, static_cast(offset)); +} + + +void Assembler::NEONTable(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + NEONTableOp op) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.Is16B() || vd.Is8B()); + VIXL_ASSERT(vn.Is16B()); + VIXL_ASSERT(AreSameFormat(vd, vm)); + Emit(op | (vd.IsQ() ? NEON_Q : 0) | Rm(vm) | Rn(vn) | Rd(vd)); +} + + +void Assembler::tbl(const VRegister& vd, + const VRegister& vn, + const VRegister& vm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + NEONTable(vd, vn, vm, NEON_TBL_1v); +} + + +void Assembler::tbl(const VRegister& vd, + const VRegister& vn, + const VRegister& vn2, + const VRegister& vm) { + USE(vn2); + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vn, vn2)); + VIXL_ASSERT(AreConsecutive(vn, vn2)); + NEONTable(vd, vn, vm, NEON_TBL_2v); +} + + +void Assembler::tbl(const VRegister& vd, + const VRegister& vn, + const VRegister& vn2, + const VRegister& vn3, + const VRegister& vm) { + USE(vn2, vn3); + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vn, vn2, vn3)); + VIXL_ASSERT(AreConsecutive(vn, vn2, vn3)); + NEONTable(vd, vn, vm, NEON_TBL_3v); +} + + +void Assembler::tbl(const VRegister& vd, + const VRegister& vn, + const VRegister& vn2, + const VRegister& vn3, + const VRegister& vn4, + const VRegister& vm) { + USE(vn2, vn3, vn4); + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vn, vn2, vn3, vn4)); + VIXL_ASSERT(AreConsecutive(vn, vn2, vn3, vn4)); + NEONTable(vd, vn, vm, NEON_TBL_4v); +} + + +void Assembler::tbx(const VRegister& vd, + const VRegister& vn, + const VRegister& vm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + NEONTable(vd, vn, vm, NEON_TBX_1v); +} + + +void Assembler::tbx(const VRegister& vd, + const VRegister& vn, + const VRegister& vn2, + const VRegister& vm) { + USE(vn2); + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vn, vn2)); + VIXL_ASSERT(AreConsecutive(vn, vn2)); + NEONTable(vd, vn, vm, NEON_TBX_2v); +} + + +void Assembler::tbx(const VRegister& vd, + const VRegister& vn, + const VRegister& vn2, + const VRegister& vn3, + const VRegister& vm) { + USE(vn2, vn3); + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vn, vn2, vn3)); + VIXL_ASSERT(AreConsecutive(vn, vn2, vn3)); + NEONTable(vd, vn, vm, NEON_TBX_3v); +} + + +void Assembler::tbx(const VRegister& vd, + const VRegister& vn, + const VRegister& vn2, + const VRegister& vn3, + const VRegister& vn4, + const VRegister& vm) { + USE(vn2, vn3, vn4); + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vn, vn2, vn3, vn4)); + VIXL_ASSERT(AreConsecutive(vn, vn2, vn3, vn4)); + NEONTable(vd, vn, vm, NEON_TBX_4v); +} + + +void Assembler::tbz(const Register& rt, unsigned bit_pos, int64_t imm14) { + VIXL_ASSERT(rt.Is64Bits() || (rt.Is32Bits() && (bit_pos < kWRegSize))); + Emit(TBZ | ImmTestBranchBit(bit_pos) | ImmTestBranch(imm14) | Rt(rt)); +} + + +void Assembler::tbz(const Register& rt, unsigned bit_pos, Label* label) { + ptrdiff_t offset = LinkAndGetInstructionOffsetTo(label); + VIXL_ASSERT(Instruction::IsValidImmPCOffset(TestBranchType, offset)); + tbz(rt, bit_pos, static_cast(offset)); +} + + +void Assembler::tbnz(const Register& rt, unsigned bit_pos, int64_t imm14) { + VIXL_ASSERT(rt.Is64Bits() || (rt.Is32Bits() && (bit_pos < kWRegSize))); + Emit(TBNZ | ImmTestBranchBit(bit_pos) | ImmTestBranch(imm14) | Rt(rt)); +} + + +void Assembler::tbnz(const Register& rt, unsigned bit_pos, Label* label) { + ptrdiff_t offset = LinkAndGetInstructionOffsetTo(label); + VIXL_ASSERT(Instruction::IsValidImmPCOffset(TestBranchType, offset)); + tbnz(rt, bit_pos, static_cast(offset)); +} + + +void Assembler::adr(const Register& xd, int64_t imm21) { + VIXL_ASSERT(xd.Is64Bits()); + Emit(ADR | ImmPCRelAddress(imm21) | Rd(xd)); +} + + +void Assembler::adr(const Register& xd, Label* label) { + adr(xd, static_cast(LinkAndGetByteOffsetTo(label))); +} + + +void Assembler::adrp(const Register& xd, int64_t imm21) { + VIXL_ASSERT(xd.Is64Bits()); + Emit(ADRP | ImmPCRelAddress(imm21) | Rd(xd)); +} + + +void Assembler::adrp(const Register& xd, Label* label) { + VIXL_ASSERT(AllowPageOffsetDependentCode()); + adrp(xd, static_cast(LinkAndGetPageOffsetTo(label))); +} + + +void Assembler::add(const Register& rd, + const Register& rn, + const Operand& operand) { + AddSub(rd, rn, operand, LeaveFlags, ADD); +} + + +void Assembler::adds(const Register& rd, + const Register& rn, + const Operand& operand) { + AddSub(rd, rn, operand, SetFlags, ADD); +} + + +void Assembler::cmn(const Register& rn, const Operand& operand) { + Register zr = AppropriateZeroRegFor(rn); + adds(zr, rn, operand); +} + + +void Assembler::sub(const Register& rd, + const Register& rn, + const Operand& operand) { + AddSub(rd, rn, operand, LeaveFlags, SUB); +} + + +void Assembler::subs(const Register& rd, + const Register& rn, + const Operand& operand) { + AddSub(rd, rn, operand, SetFlags, SUB); +} + + +void Assembler::cmp(const Register& rn, const Operand& operand) { + Register zr = AppropriateZeroRegFor(rn); + subs(zr, rn, operand); +} + + +void Assembler::neg(const Register& rd, const Operand& operand) { + Register zr = AppropriateZeroRegFor(rd); + sub(rd, zr, operand); +} + + +void Assembler::negs(const Register& rd, const Operand& operand) { + Register zr = AppropriateZeroRegFor(rd); + subs(rd, zr, operand); +} + + +void Assembler::adc(const Register& rd, + const Register& rn, + const Operand& operand) { + AddSubWithCarry(rd, rn, operand, LeaveFlags, ADC); +} + + +void Assembler::adcs(const Register& rd, + const Register& rn, + const Operand& operand) { + AddSubWithCarry(rd, rn, operand, SetFlags, ADC); +} + + +void Assembler::sbc(const Register& rd, + const Register& rn, + const Operand& operand) { + AddSubWithCarry(rd, rn, operand, LeaveFlags, SBC); +} + + +void Assembler::sbcs(const Register& rd, + const Register& rn, + const Operand& operand) { + AddSubWithCarry(rd, rn, operand, SetFlags, SBC); +} + + +void Assembler::rmif(const Register& xn, unsigned rotation, StatusFlags flags) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFlagM)); + VIXL_ASSERT(xn.Is64Bits()); + Emit(RMIF | Rn(xn) | ImmRMIFRotation(rotation) | Nzcv(flags)); +} + + +void Assembler::setf8(const Register& rn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFlagM)); + Emit(SETF8 | Rn(rn)); +} + + +void Assembler::setf16(const Register& rn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFlagM)); + Emit(SETF16 | Rn(rn)); +} + + +void Assembler::ngc(const Register& rd, const Operand& operand) { + Register zr = AppropriateZeroRegFor(rd); + sbc(rd, zr, operand); +} + + +void Assembler::ngcs(const Register& rd, const Operand& operand) { + Register zr = AppropriateZeroRegFor(rd); + sbcs(rd, zr, operand); +} + + +// Logical instructions. +void Assembler::and_(const Register& rd, + const Register& rn, + const Operand& operand) { + Logical(rd, rn, operand, AND); +} + + +void Assembler::ands(const Register& rd, + const Register& rn, + const Operand& operand) { + Logical(rd, rn, operand, ANDS); +} + + +void Assembler::tst(const Register& rn, const Operand& operand) { + ands(AppropriateZeroRegFor(rn), rn, operand); +} + + +void Assembler::bic(const Register& rd, + const Register& rn, + const Operand& operand) { + Logical(rd, rn, operand, BIC); +} + + +void Assembler::bics(const Register& rd, + const Register& rn, + const Operand& operand) { + Logical(rd, rn, operand, BICS); +} + + +void Assembler::orr(const Register& rd, + const Register& rn, + const Operand& operand) { + Logical(rd, rn, operand, ORR); +} + + +void Assembler::orn(const Register& rd, + const Register& rn, + const Operand& operand) { + Logical(rd, rn, operand, ORN); +} + + +void Assembler::eor(const Register& rd, + const Register& rn, + const Operand& operand) { + Logical(rd, rn, operand, EOR); +} + + +void Assembler::eon(const Register& rd, + const Register& rn, + const Operand& operand) { + Logical(rd, rn, operand, EON); +} + + +void Assembler::lslv(const Register& rd, + const Register& rn, + const Register& rm) { + VIXL_ASSERT(rd.GetSizeInBits() == rn.GetSizeInBits()); + VIXL_ASSERT(rd.GetSizeInBits() == rm.GetSizeInBits()); + Emit(SF(rd) | LSLV | Rm(rm) | Rn(rn) | Rd(rd)); +} + + +void Assembler::lsrv(const Register& rd, + const Register& rn, + const Register& rm) { + VIXL_ASSERT(rd.GetSizeInBits() == rn.GetSizeInBits()); + VIXL_ASSERT(rd.GetSizeInBits() == rm.GetSizeInBits()); + Emit(SF(rd) | LSRV | Rm(rm) | Rn(rn) | Rd(rd)); +} + + +void Assembler::asrv(const Register& rd, + const Register& rn, + const Register& rm) { + VIXL_ASSERT(rd.GetSizeInBits() == rn.GetSizeInBits()); + VIXL_ASSERT(rd.GetSizeInBits() == rm.GetSizeInBits()); + Emit(SF(rd) | ASRV | Rm(rm) | Rn(rn) | Rd(rd)); +} + + +void Assembler::rorv(const Register& rd, + const Register& rn, + const Register& rm) { + VIXL_ASSERT(rd.GetSizeInBits() == rn.GetSizeInBits()); + VIXL_ASSERT(rd.GetSizeInBits() == rm.GetSizeInBits()); + Emit(SF(rd) | RORV | Rm(rm) | Rn(rn) | Rd(rd)); +} + + +// Bitfield operations. +void Assembler::bfm(const Register& rd, + const Register& rn, + unsigned immr, + unsigned imms) { + VIXL_ASSERT(rd.GetSizeInBits() == rn.GetSizeInBits()); + Instr N = SF(rd) >> (kSFOffset - kBitfieldNOffset); + Emit(SF(rd) | BFM | N | ImmR(immr, rd.GetSizeInBits()) | + ImmS(imms, rn.GetSizeInBits()) | Rn(rn) | Rd(rd)); +} + + +void Assembler::sbfm(const Register& rd, + const Register& rn, + unsigned immr, + unsigned imms) { + VIXL_ASSERT(rd.Is64Bits() || rn.Is32Bits()); + Instr N = SF(rd) >> (kSFOffset - kBitfieldNOffset); + Emit(SF(rd) | SBFM | N | ImmR(immr, rd.GetSizeInBits()) | + ImmS(imms, rn.GetSizeInBits()) | Rn(rn) | Rd(rd)); +} + + +void Assembler::ubfm(const Register& rd, + const Register& rn, + unsigned immr, + unsigned imms) { + VIXL_ASSERT(rd.GetSizeInBits() == rn.GetSizeInBits()); + Instr N = SF(rd) >> (kSFOffset - kBitfieldNOffset); + Emit(SF(rd) | UBFM | N | ImmR(immr, rd.GetSizeInBits()) | + ImmS(imms, rn.GetSizeInBits()) | Rn(rn) | Rd(rd)); +} + + +void Assembler::extr(const Register& rd, + const Register& rn, + const Register& rm, + unsigned lsb) { + VIXL_ASSERT(rd.GetSizeInBits() == rn.GetSizeInBits()); + VIXL_ASSERT(rd.GetSizeInBits() == rm.GetSizeInBits()); + Instr N = SF(rd) >> (kSFOffset - kBitfieldNOffset); + Emit(SF(rd) | EXTR | N | Rm(rm) | ImmS(lsb, rn.GetSizeInBits()) | Rn(rn) | + Rd(rd)); +} + + +void Assembler::csel(const Register& rd, + const Register& rn, + const Register& rm, + Condition cond) { + ConditionalSelect(rd, rn, rm, cond, CSEL); +} + + +void Assembler::csinc(const Register& rd, + const Register& rn, + const Register& rm, + Condition cond) { + ConditionalSelect(rd, rn, rm, cond, CSINC); +} + + +void Assembler::csinv(const Register& rd, + const Register& rn, + const Register& rm, + Condition cond) { + ConditionalSelect(rd, rn, rm, cond, CSINV); +} + + +void Assembler::csneg(const Register& rd, + const Register& rn, + const Register& rm, + Condition cond) { + ConditionalSelect(rd, rn, rm, cond, CSNEG); +} + + +void Assembler::cset(const Register& rd, Condition cond) { + VIXL_ASSERT((cond != al) && (cond != nv)); + Register zr = AppropriateZeroRegFor(rd); + csinc(rd, zr, zr, InvertCondition(cond)); +} + + +void Assembler::csetm(const Register& rd, Condition cond) { + VIXL_ASSERT((cond != al) && (cond != nv)); + Register zr = AppropriateZeroRegFor(rd); + csinv(rd, zr, zr, InvertCondition(cond)); +} + + +void Assembler::cinc(const Register& rd, const Register& rn, Condition cond) { + VIXL_ASSERT((cond != al) && (cond != nv)); + csinc(rd, rn, rn, InvertCondition(cond)); +} + + +void Assembler::cinv(const Register& rd, const Register& rn, Condition cond) { + VIXL_ASSERT((cond != al) && (cond != nv)); + csinv(rd, rn, rn, InvertCondition(cond)); +} + + +void Assembler::cneg(const Register& rd, const Register& rn, Condition cond) { + VIXL_ASSERT((cond != al) && (cond != nv)); + csneg(rd, rn, rn, InvertCondition(cond)); +} + + +void Assembler::ConditionalSelect(const Register& rd, + const Register& rn, + const Register& rm, + Condition cond, + ConditionalSelectOp op) { + VIXL_ASSERT(rd.GetSizeInBits() == rn.GetSizeInBits()); + VIXL_ASSERT(rd.GetSizeInBits() == rm.GetSizeInBits()); + Emit(SF(rd) | op | Rm(rm) | Cond(cond) | Rn(rn) | Rd(rd)); +} + + +void Assembler::ccmn(const Register& rn, + const Operand& operand, + StatusFlags nzcv, + Condition cond) { + ConditionalCompare(rn, operand, nzcv, cond, CCMN); +} + + +void Assembler::ccmp(const Register& rn, + const Operand& operand, + StatusFlags nzcv, + Condition cond) { + ConditionalCompare(rn, operand, nzcv, cond, CCMP); +} + + +void Assembler::DataProcessing3Source(const Register& rd, + const Register& rn, + const Register& rm, + const Register& ra, + DataProcessing3SourceOp op) { + Emit(SF(rd) | op | Rm(rm) | Ra(ra) | Rn(rn) | Rd(rd)); +} + + +void Assembler::crc32b(const Register& wd, + const Register& wn, + const Register& wm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kCRC32)); + VIXL_ASSERT(wd.Is32Bits() && wn.Is32Bits() && wm.Is32Bits()); + Emit(SF(wm) | Rm(wm) | CRC32B | Rn(wn) | Rd(wd)); +} + + +void Assembler::crc32h(const Register& wd, + const Register& wn, + const Register& wm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kCRC32)); + VIXL_ASSERT(wd.Is32Bits() && wn.Is32Bits() && wm.Is32Bits()); + Emit(SF(wm) | Rm(wm) | CRC32H | Rn(wn) | Rd(wd)); +} + + +void Assembler::crc32w(const Register& wd, + const Register& wn, + const Register& wm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kCRC32)); + VIXL_ASSERT(wd.Is32Bits() && wn.Is32Bits() && wm.Is32Bits()); + Emit(SF(wm) | Rm(wm) | CRC32W | Rn(wn) | Rd(wd)); +} + + +void Assembler::crc32x(const Register& wd, + const Register& wn, + const Register& xm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kCRC32)); + VIXL_ASSERT(wd.Is32Bits() && wn.Is32Bits() && xm.Is64Bits()); + Emit(SF(xm) | Rm(xm) | CRC32X | Rn(wn) | Rd(wd)); +} + + +void Assembler::crc32cb(const Register& wd, + const Register& wn, + const Register& wm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kCRC32)); + VIXL_ASSERT(wd.Is32Bits() && wn.Is32Bits() && wm.Is32Bits()); + Emit(SF(wm) | Rm(wm) | CRC32CB | Rn(wn) | Rd(wd)); +} + + +void Assembler::crc32ch(const Register& wd, + const Register& wn, + const Register& wm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kCRC32)); + VIXL_ASSERT(wd.Is32Bits() && wn.Is32Bits() && wm.Is32Bits()); + Emit(SF(wm) | Rm(wm) | CRC32CH | Rn(wn) | Rd(wd)); +} + + +void Assembler::crc32cw(const Register& wd, + const Register& wn, + const Register& wm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kCRC32)); + VIXL_ASSERT(wd.Is32Bits() && wn.Is32Bits() && wm.Is32Bits()); + Emit(SF(wm) | Rm(wm) | CRC32CW | Rn(wn) | Rd(wd)); +} + + +void Assembler::crc32cx(const Register& wd, + const Register& wn, + const Register& xm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kCRC32)); + VIXL_ASSERT(wd.Is32Bits() && wn.Is32Bits() && xm.Is64Bits()); + Emit(SF(xm) | Rm(xm) | CRC32CX | Rn(wn) | Rd(wd)); +} + + +void Assembler::mul(const Register& rd, + const Register& rn, + const Register& rm) { + VIXL_ASSERT(AreSameSizeAndType(rd, rn, rm)); + DataProcessing3Source(rd, rn, rm, AppropriateZeroRegFor(rd), MADD); +} + + +void Assembler::madd(const Register& rd, + const Register& rn, + const Register& rm, + const Register& ra) { + DataProcessing3Source(rd, rn, rm, ra, MADD); +} + + +void Assembler::mneg(const Register& rd, + const Register& rn, + const Register& rm) { + VIXL_ASSERT(AreSameSizeAndType(rd, rn, rm)); + DataProcessing3Source(rd, rn, rm, AppropriateZeroRegFor(rd), MSUB); +} + + +void Assembler::msub(const Register& rd, + const Register& rn, + const Register& rm, + const Register& ra) { + DataProcessing3Source(rd, rn, rm, ra, MSUB); +} + + +void Assembler::umaddl(const Register& xd, + const Register& wn, + const Register& wm, + const Register& xa) { + VIXL_ASSERT(xd.Is64Bits() && xa.Is64Bits()); + VIXL_ASSERT(wn.Is32Bits() && wm.Is32Bits()); + DataProcessing3Source(xd, wn, wm, xa, UMADDL_x); +} + + +void Assembler::smaddl(const Register& xd, + const Register& wn, + const Register& wm, + const Register& xa) { + VIXL_ASSERT(xd.Is64Bits() && xa.Is64Bits()); + VIXL_ASSERT(wn.Is32Bits() && wm.Is32Bits()); + DataProcessing3Source(xd, wn, wm, xa, SMADDL_x); +} + + +void Assembler::umsubl(const Register& xd, + const Register& wn, + const Register& wm, + const Register& xa) { + VIXL_ASSERT(xd.Is64Bits() && xa.Is64Bits()); + VIXL_ASSERT(wn.Is32Bits() && wm.Is32Bits()); + DataProcessing3Source(xd, wn, wm, xa, UMSUBL_x); +} + + +void Assembler::smsubl(const Register& xd, + const Register& wn, + const Register& wm, + const Register& xa) { + VIXL_ASSERT(xd.Is64Bits() && xa.Is64Bits()); + VIXL_ASSERT(wn.Is32Bits() && wm.Is32Bits()); + DataProcessing3Source(xd, wn, wm, xa, SMSUBL_x); +} + + +void Assembler::smull(const Register& xd, + const Register& wn, + const Register& wm) { + VIXL_ASSERT(xd.Is64Bits()); + VIXL_ASSERT(wn.Is32Bits() && wm.Is32Bits()); + DataProcessing3Source(xd, wn, wm, xzr, SMADDL_x); +} + + +void Assembler::sdiv(const Register& rd, + const Register& rn, + const Register& rm) { + VIXL_ASSERT(rd.GetSizeInBits() == rn.GetSizeInBits()); + VIXL_ASSERT(rd.GetSizeInBits() == rm.GetSizeInBits()); + Emit(SF(rd) | SDIV | Rm(rm) | Rn(rn) | Rd(rd)); +} + + +void Assembler::smulh(const Register& xd, + const Register& xn, + const Register& xm) { + VIXL_ASSERT(xd.Is64Bits() && xn.Is64Bits() && xm.Is64Bits()); + DataProcessing3Source(xd, xn, xm, xzr, SMULH_x); +} + + +void Assembler::umulh(const Register& xd, + const Register& xn, + const Register& xm) { + VIXL_ASSERT(xd.Is64Bits() && xn.Is64Bits() && xm.Is64Bits()); + DataProcessing3Source(xd, xn, xm, xzr, UMULH_x); +} + + +void Assembler::udiv(const Register& rd, + const Register& rn, + const Register& rm) { + VIXL_ASSERT(rd.GetSizeInBits() == rn.GetSizeInBits()); + VIXL_ASSERT(rd.GetSizeInBits() == rm.GetSizeInBits()); + Emit(SF(rd) | UDIV | Rm(rm) | Rn(rn) | Rd(rd)); +} + + +void Assembler::rbit(const Register& rd, const Register& rn) { + DataProcessing1Source(rd, rn, RBIT); +} + + +void Assembler::rev16(const Register& rd, const Register& rn) { + DataProcessing1Source(rd, rn, REV16); +} + + +void Assembler::rev32(const Register& xd, const Register& xn) { + VIXL_ASSERT(xd.Is64Bits()); + DataProcessing1Source(xd, xn, REV); +} + + +void Assembler::rev(const Register& rd, const Register& rn) { + DataProcessing1Source(rd, rn, rd.Is64Bits() ? REV_x : REV_w); +} + + +void Assembler::clz(const Register& rd, const Register& rn) { + DataProcessing1Source(rd, rn, CLZ); +} + + +void Assembler::cls(const Register& rd, const Register& rn) { + DataProcessing1Source(rd, rn, CLS); +} + +#define PAUTH_VARIATIONS(V) \ + V(paci, PACI) \ + V(pacd, PACD) \ + V(auti, AUTI) \ + V(autd, AUTD) + +#define VIXL_DEFINE_ASM_FUNC(PRE, OP) \ + void Assembler::PRE##a(const Register& xd, const Register& xn) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth)); \ + VIXL_ASSERT(xd.Is64Bits() && xn.Is64Bits()); \ + Emit(SF(xd) | OP##A | Rd(xd) | RnSP(xn)); \ + } \ + \ + void Assembler::PRE##za(const Register& xd) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth)); \ + VIXL_ASSERT(xd.Is64Bits()); \ + Emit(SF(xd) | OP##ZA | Rd(xd) | Rn(xzr)); \ + } \ + \ + void Assembler::PRE##b(const Register& xd, const Register& xn) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth)); \ + VIXL_ASSERT(xd.Is64Bits() && xn.Is64Bits()); \ + Emit(SF(xd) | OP##B | Rd(xd) | RnSP(xn)); \ + } \ + \ + void Assembler::PRE##zb(const Register& xd) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth)); \ + VIXL_ASSERT(xd.Is64Bits()); \ + Emit(SF(xd) | OP##ZB | Rd(xd) | Rn(xzr)); \ + } + +PAUTH_VARIATIONS(VIXL_DEFINE_ASM_FUNC) +#undef VIXL_DEFINE_ASM_FUNC + +void Assembler::pacga(const Register& xd, + const Register& xn, + const Register& xm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth, CPUFeatures::kPAuthGeneric)); + VIXL_ASSERT(xd.Is64Bits() && xn.Is64Bits() && xm.Is64Bits()); + Emit(SF(xd) | PACGA | Rd(xd) | Rn(xn) | RmSP(xm)); +} + +void Assembler::xpaci(const Register& xd) { + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth)); + VIXL_ASSERT(xd.Is64Bits()); + Emit(SF(xd) | XPACI | Rd(xd) | Rn(xzr)); +} + +void Assembler::xpacd(const Register& xd) { + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth)); + VIXL_ASSERT(xd.Is64Bits()); + Emit(SF(xd) | XPACD | Rd(xd) | Rn(xzr)); +} + + +void Assembler::ldp(const CPURegister& rt, + const CPURegister& rt2, + const MemOperand& src) { + LoadStorePair(rt, rt2, src, LoadPairOpFor(rt, rt2)); +} + + +void Assembler::stp(const CPURegister& rt, + const CPURegister& rt2, + const MemOperand& dst) { + LoadStorePair(rt, rt2, dst, StorePairOpFor(rt, rt2)); +} + + +void Assembler::ldpsw(const Register& xt, + const Register& xt2, + const MemOperand& src) { + VIXL_ASSERT(xt.Is64Bits() && xt2.Is64Bits()); + LoadStorePair(xt, xt2, src, LDPSW_x); +} + + +void Assembler::LoadStorePair(const CPURegister& rt, + const CPURegister& rt2, + const MemOperand& addr, + LoadStorePairOp op) { + VIXL_ASSERT(CPUHas(rt, rt2)); + + // 'rt' and 'rt2' can only be aliased for stores. + VIXL_ASSERT(((op & LoadStorePairLBit) == 0) || !rt.Is(rt2)); + VIXL_ASSERT(AreSameSizeAndType(rt, rt2)); + VIXL_ASSERT(IsImmLSPair(addr.GetOffset(), CalcLSPairDataSize(op))); + + int offset = static_cast(addr.GetOffset()); + Instr memop = op | Rt(rt) | Rt2(rt2) | RnSP(addr.GetBaseRegister()) | + ImmLSPair(offset, CalcLSPairDataSize(op)); + + Instr addrmodeop; + if (addr.IsImmediateOffset()) { + addrmodeop = LoadStorePairOffsetFixed; + } else { + if (addr.IsPreIndex()) { + addrmodeop = LoadStorePairPreIndexFixed; + } else { + VIXL_ASSERT(addr.IsPostIndex()); + addrmodeop = LoadStorePairPostIndexFixed; + } + } + + Instr emitop = addrmodeop | memop; + + // Only X registers may be specified for ldpsw. + VIXL_ASSERT(((emitop & LoadStorePairMask) != LDPSW_x) || rt.IsX()); + + Emit(emitop); +} + + +void Assembler::ldnp(const CPURegister& rt, + const CPURegister& rt2, + const MemOperand& src) { + LoadStorePairNonTemporal(rt, rt2, src, LoadPairNonTemporalOpFor(rt, rt2)); +} + + +void Assembler::stnp(const CPURegister& rt, + const CPURegister& rt2, + const MemOperand& dst) { + LoadStorePairNonTemporal(rt, rt2, dst, StorePairNonTemporalOpFor(rt, rt2)); +} + + +void Assembler::LoadStorePairNonTemporal(const CPURegister& rt, + const CPURegister& rt2, + const MemOperand& addr, + LoadStorePairNonTemporalOp op) { + VIXL_ASSERT(CPUHas(rt, rt2)); + + VIXL_ASSERT(!rt.Is(rt2)); + VIXL_ASSERT(AreSameSizeAndType(rt, rt2)); + VIXL_ASSERT(addr.IsImmediateOffset()); + + unsigned size = + CalcLSPairDataSize(static_cast(op & LoadStorePairMask)); + VIXL_ASSERT(IsImmLSPair(addr.GetOffset(), size)); + int offset = static_cast(addr.GetOffset()); + Emit(op | Rt(rt) | Rt2(rt2) | RnSP(addr.GetBaseRegister()) | + ImmLSPair(offset, size)); +} + + +// Memory instructions. +void Assembler::ldrb(const Register& rt, + const MemOperand& src, + LoadStoreScalingOption option) { + VIXL_ASSERT(option != RequireUnscaledOffset); + VIXL_ASSERT(option != PreferUnscaledOffset); + LoadStore(rt, src, LDRB_w, option); +} + + +void Assembler::strb(const Register& rt, + const MemOperand& dst, + LoadStoreScalingOption option) { + VIXL_ASSERT(option != RequireUnscaledOffset); + VIXL_ASSERT(option != PreferUnscaledOffset); + LoadStore(rt, dst, STRB_w, option); +} + + +void Assembler::ldrsb(const Register& rt, + const MemOperand& src, + LoadStoreScalingOption option) { + VIXL_ASSERT(option != RequireUnscaledOffset); + VIXL_ASSERT(option != PreferUnscaledOffset); + LoadStore(rt, src, rt.Is64Bits() ? LDRSB_x : LDRSB_w, option); +} + + +void Assembler::ldrh(const Register& rt, + const MemOperand& src, + LoadStoreScalingOption option) { + VIXL_ASSERT(option != RequireUnscaledOffset); + VIXL_ASSERT(option != PreferUnscaledOffset); + LoadStore(rt, src, LDRH_w, option); +} + + +void Assembler::strh(const Register& rt, + const MemOperand& dst, + LoadStoreScalingOption option) { + VIXL_ASSERT(option != RequireUnscaledOffset); + VIXL_ASSERT(option != PreferUnscaledOffset); + LoadStore(rt, dst, STRH_w, option); +} + + +void Assembler::ldrsh(const Register& rt, + const MemOperand& src, + LoadStoreScalingOption option) { + VIXL_ASSERT(option != RequireUnscaledOffset); + VIXL_ASSERT(option != PreferUnscaledOffset); + LoadStore(rt, src, rt.Is64Bits() ? LDRSH_x : LDRSH_w, option); +} + + +void Assembler::ldr(const CPURegister& rt, + const MemOperand& src, + LoadStoreScalingOption option) { + VIXL_ASSERT(option != RequireUnscaledOffset); + VIXL_ASSERT(option != PreferUnscaledOffset); + LoadStore(rt, src, LoadOpFor(rt), option); +} + + +void Assembler::str(const CPURegister& rt, + const MemOperand& dst, + LoadStoreScalingOption option) { + VIXL_ASSERT(option != RequireUnscaledOffset); + VIXL_ASSERT(option != PreferUnscaledOffset); + LoadStore(rt, dst, StoreOpFor(rt), option); +} + + +void Assembler::ldrsw(const Register& xt, + const MemOperand& src, + LoadStoreScalingOption option) { + VIXL_ASSERT(xt.Is64Bits()); + VIXL_ASSERT(option != RequireUnscaledOffset); + VIXL_ASSERT(option != PreferUnscaledOffset); + LoadStore(xt, src, LDRSW_x, option); +} + + +void Assembler::ldurb(const Register& rt, + const MemOperand& src, + LoadStoreScalingOption option) { + VIXL_ASSERT(option != RequireScaledOffset); + VIXL_ASSERT(option != PreferScaledOffset); + LoadStore(rt, src, LDRB_w, option); +} + + +void Assembler::sturb(const Register& rt, + const MemOperand& dst, + LoadStoreScalingOption option) { + VIXL_ASSERT(option != RequireScaledOffset); + VIXL_ASSERT(option != PreferScaledOffset); + LoadStore(rt, dst, STRB_w, option); +} + + +void Assembler::ldursb(const Register& rt, + const MemOperand& src, + LoadStoreScalingOption option) { + VIXL_ASSERT(option != RequireScaledOffset); + VIXL_ASSERT(option != PreferScaledOffset); + LoadStore(rt, src, rt.Is64Bits() ? LDRSB_x : LDRSB_w, option); +} + + +void Assembler::ldurh(const Register& rt, + const MemOperand& src, + LoadStoreScalingOption option) { + VIXL_ASSERT(option != RequireScaledOffset); + VIXL_ASSERT(option != PreferScaledOffset); + LoadStore(rt, src, LDRH_w, option); +} + + +void Assembler::sturh(const Register& rt, + const MemOperand& dst, + LoadStoreScalingOption option) { + VIXL_ASSERT(option != RequireScaledOffset); + VIXL_ASSERT(option != PreferScaledOffset); + LoadStore(rt, dst, STRH_w, option); +} + + +void Assembler::ldursh(const Register& rt, + const MemOperand& src, + LoadStoreScalingOption option) { + VIXL_ASSERT(option != RequireScaledOffset); + VIXL_ASSERT(option != PreferScaledOffset); + LoadStore(rt, src, rt.Is64Bits() ? LDRSH_x : LDRSH_w, option); +} + + +void Assembler::ldur(const CPURegister& rt, + const MemOperand& src, + LoadStoreScalingOption option) { + VIXL_ASSERT(option != RequireScaledOffset); + VIXL_ASSERT(option != PreferScaledOffset); + LoadStore(rt, src, LoadOpFor(rt), option); +} + + +void Assembler::stur(const CPURegister& rt, + const MemOperand& dst, + LoadStoreScalingOption option) { + VIXL_ASSERT(option != RequireScaledOffset); + VIXL_ASSERT(option != PreferScaledOffset); + LoadStore(rt, dst, StoreOpFor(rt), option); +} + + +void Assembler::ldursw(const Register& xt, + const MemOperand& src, + LoadStoreScalingOption option) { + VIXL_ASSERT(xt.Is64Bits()); + VIXL_ASSERT(option != RequireScaledOffset); + VIXL_ASSERT(option != PreferScaledOffset); + LoadStore(xt, src, LDRSW_x, option); +} + + +void Assembler::ldraa(const Register& xt, const MemOperand& src) { + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth)); + LoadStorePAC(xt, src, LDRAA); +} + + +void Assembler::ldrab(const Register& xt, const MemOperand& src) { + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth)); + LoadStorePAC(xt, src, LDRAB); +} + + +void Assembler::ldrsw(const Register& xt, RawLiteral* literal) { + VIXL_ASSERT(xt.Is64Bits()); + VIXL_ASSERT(literal->GetSize() == kWRegSizeInBytes); + ldrsw(xt, static_cast(LinkAndGetWordOffsetTo(literal))); +} + + +void Assembler::ldr(const CPURegister& rt, RawLiteral* literal) { + VIXL_ASSERT(CPUHas(rt)); + VIXL_ASSERT(literal->GetSize() == static_cast(rt.GetSizeInBytes())); + ldr(rt, static_cast(LinkAndGetWordOffsetTo(literal))); +} + + +void Assembler::ldrsw(const Register& rt, int64_t imm19) { + Emit(LDRSW_x_lit | ImmLLiteral(imm19) | Rt(rt)); +} + + +void Assembler::ldr(const CPURegister& rt, int64_t imm19) { + VIXL_ASSERT(CPUHas(rt)); + LoadLiteralOp op = LoadLiteralOpFor(rt); + Emit(op | ImmLLiteral(imm19) | Rt(rt)); +} + + +void Assembler::prfm(int op, int64_t imm19) { + Emit(PRFM_lit | ImmPrefetchOperation(op) | ImmLLiteral(imm19)); +} + +void Assembler::prfm(PrefetchOperation op, int64_t imm19) { + // Passing unnamed values in 'op' is undefined behaviour in C++. + VIXL_ASSERT(IsNamedPrefetchOperation(op)); + prfm(static_cast(op), imm19); +} + + +// Exclusive-access instructions. +void Assembler::stxrb(const Register& rs, + const Register& rt, + const MemOperand& dst) { + VIXL_ASSERT(dst.IsImmediateOffset() && (dst.GetOffset() == 0)); + Emit(STXRB_w | Rs(rs) | Rt(rt) | Rt2_mask | RnSP(dst.GetBaseRegister())); +} + + +void Assembler::stxrh(const Register& rs, + const Register& rt, + const MemOperand& dst) { + VIXL_ASSERT(dst.IsImmediateOffset() && (dst.GetOffset() == 0)); + Emit(STXRH_w | Rs(rs) | Rt(rt) | Rt2_mask | RnSP(dst.GetBaseRegister())); +} + + +void Assembler::stxr(const Register& rs, + const Register& rt, + const MemOperand& dst) { + VIXL_ASSERT(dst.IsImmediateOffset() && (dst.GetOffset() == 0)); + LoadStoreExclusive op = rt.Is64Bits() ? STXR_x : STXR_w; + Emit(op | Rs(rs) | Rt(rt) | Rt2_mask | RnSP(dst.GetBaseRegister())); +} + + +void Assembler::ldxrb(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(src.IsImmediateOffset() && (src.GetOffset() == 0)); + Emit(LDXRB_w | Rs_mask | Rt(rt) | Rt2_mask | RnSP(src.GetBaseRegister())); +} + + +void Assembler::ldxrh(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(src.IsImmediateOffset() && (src.GetOffset() == 0)); + Emit(LDXRH_w | Rs_mask | Rt(rt) | Rt2_mask | RnSP(src.GetBaseRegister())); +} + + +void Assembler::ldxr(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(src.IsImmediateOffset() && (src.GetOffset() == 0)); + LoadStoreExclusive op = rt.Is64Bits() ? LDXR_x : LDXR_w; + Emit(op | Rs_mask | Rt(rt) | Rt2_mask | RnSP(src.GetBaseRegister())); +} + + +void Assembler::stxp(const Register& rs, + const Register& rt, + const Register& rt2, + const MemOperand& dst) { + VIXL_ASSERT(rt.GetSizeInBits() == rt2.GetSizeInBits()); + VIXL_ASSERT(dst.IsImmediateOffset() && (dst.GetOffset() == 0)); + LoadStoreExclusive op = rt.Is64Bits() ? STXP_x : STXP_w; + Emit(op | Rs(rs) | Rt(rt) | Rt2(rt2) | RnSP(dst.GetBaseRegister())); +} + + +void Assembler::ldxp(const Register& rt, + const Register& rt2, + const MemOperand& src) { + VIXL_ASSERT(rt.GetSizeInBits() == rt2.GetSizeInBits()); + VIXL_ASSERT(src.IsImmediateOffset() && (src.GetOffset() == 0)); + LoadStoreExclusive op = rt.Is64Bits() ? LDXP_x : LDXP_w; + Emit(op | Rs_mask | Rt(rt) | Rt2(rt2) | RnSP(src.GetBaseRegister())); +} + + +void Assembler::stlxrb(const Register& rs, + const Register& rt, + const MemOperand& dst) { + VIXL_ASSERT(dst.IsImmediateOffset() && (dst.GetOffset() == 0)); + Emit(STLXRB_w | Rs(rs) | Rt(rt) | Rt2_mask | RnSP(dst.GetBaseRegister())); +} + + +void Assembler::stlxrh(const Register& rs, + const Register& rt, + const MemOperand& dst) { + VIXL_ASSERT(dst.IsImmediateOffset() && (dst.GetOffset() == 0)); + Emit(STLXRH_w | Rs(rs) | Rt(rt) | Rt2_mask | RnSP(dst.GetBaseRegister())); +} + + +void Assembler::stlxr(const Register& rs, + const Register& rt, + const MemOperand& dst) { + VIXL_ASSERT(dst.IsImmediateOffset() && (dst.GetOffset() == 0)); + LoadStoreExclusive op = rt.Is64Bits() ? STLXR_x : STLXR_w; + Emit(op | Rs(rs) | Rt(rt) | Rt2_mask | RnSP(dst.GetBaseRegister())); +} + + +void Assembler::ldaxrb(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(src.IsImmediateOffset() && (src.GetOffset() == 0)); + Emit(LDAXRB_w | Rs_mask | Rt(rt) | Rt2_mask | RnSP(src.GetBaseRegister())); +} + + +void Assembler::ldaxrh(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(src.IsImmediateOffset() && (src.GetOffset() == 0)); + Emit(LDAXRH_w | Rs_mask | Rt(rt) | Rt2_mask | RnSP(src.GetBaseRegister())); +} + + +void Assembler::ldaxr(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(src.IsImmediateOffset() && (src.GetOffset() == 0)); + LoadStoreExclusive op = rt.Is64Bits() ? LDAXR_x : LDAXR_w; + Emit(op | Rs_mask | Rt(rt) | Rt2_mask | RnSP(src.GetBaseRegister())); +} + + +void Assembler::stlxp(const Register& rs, + const Register& rt, + const Register& rt2, + const MemOperand& dst) { + VIXL_ASSERT(rt.GetSizeInBits() == rt2.GetSizeInBits()); + VIXL_ASSERT(dst.IsImmediateOffset() && (dst.GetOffset() == 0)); + LoadStoreExclusive op = rt.Is64Bits() ? STLXP_x : STLXP_w; + Emit(op | Rs(rs) | Rt(rt) | Rt2(rt2) | RnSP(dst.GetBaseRegister())); +} + + +void Assembler::ldaxp(const Register& rt, + const Register& rt2, + const MemOperand& src) { + VIXL_ASSERT(rt.GetSizeInBits() == rt2.GetSizeInBits()); + VIXL_ASSERT(src.IsImmediateOffset() && (src.GetOffset() == 0)); + LoadStoreExclusive op = rt.Is64Bits() ? LDAXP_x : LDAXP_w; + Emit(op | Rs_mask | Rt(rt) | Rt2(rt2) | RnSP(src.GetBaseRegister())); +} + + +void Assembler::stlrb(const Register& rt, const MemOperand& dst) { + VIXL_ASSERT(dst.IsImmediateOffset() && (dst.GetOffset() == 0)); + Emit(STLRB_w | Rs_mask | Rt(rt) | Rt2_mask | RnSP(dst.GetBaseRegister())); +} + +void Assembler::stlurb(const Register& rt, const MemOperand& dst) { + VIXL_ASSERT(CPUHas(CPUFeatures::kRCpc, CPUFeatures::kRCpcImm)); + VIXL_ASSERT(dst.IsImmediateOffset() && IsImmLSUnscaled(dst.GetOffset())); + + Instr base = RnSP(dst.GetBaseRegister()); + int64_t offset = dst.GetOffset(); + Emit(STLURB | Rt(rt) | base | ImmLS(static_cast(offset))); +} + + +void Assembler::stlrh(const Register& rt, const MemOperand& dst) { + VIXL_ASSERT(dst.IsImmediateOffset() && (dst.GetOffset() == 0)); + Emit(STLRH_w | Rs_mask | Rt(rt) | Rt2_mask | RnSP(dst.GetBaseRegister())); +} + +void Assembler::stlurh(const Register& rt, const MemOperand& dst) { + VIXL_ASSERT(CPUHas(CPUFeatures::kRCpc, CPUFeatures::kRCpcImm)); + VIXL_ASSERT(dst.IsImmediateOffset() && IsImmLSUnscaled(dst.GetOffset())); + + Instr base = RnSP(dst.GetBaseRegister()); + int64_t offset = dst.GetOffset(); + Emit(STLURH | Rt(rt) | base | ImmLS(static_cast(offset))); +} + + +void Assembler::stlr(const Register& rt, const MemOperand& dst) { + VIXL_ASSERT(dst.IsImmediateOffset() && (dst.GetOffset() == 0)); + LoadStoreExclusive op = rt.Is64Bits() ? STLR_x : STLR_w; + Emit(op | Rs_mask | Rt(rt) | Rt2_mask | RnSP(dst.GetBaseRegister())); +} + +void Assembler::stlur(const Register& rt, const MemOperand& dst) { + VIXL_ASSERT(CPUHas(CPUFeatures::kRCpc, CPUFeatures::kRCpcImm)); + VIXL_ASSERT(dst.IsImmediateOffset() && IsImmLSUnscaled(dst.GetOffset())); + + Instr base = RnSP(dst.GetBaseRegister()); + int64_t offset = dst.GetOffset(); + Instr op = rt.Is64Bits() ? STLUR_x : STLUR_w; + Emit(op | Rt(rt) | base | ImmLS(static_cast(offset))); +} + + +void Assembler::ldarb(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(src.IsImmediateOffset() && (src.GetOffset() == 0)); + Emit(LDARB_w | Rs_mask | Rt(rt) | Rt2_mask | RnSP(src.GetBaseRegister())); +} + + +void Assembler::ldarh(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(src.IsImmediateOffset() && (src.GetOffset() == 0)); + Emit(LDARH_w | Rs_mask | Rt(rt) | Rt2_mask | RnSP(src.GetBaseRegister())); +} + + +void Assembler::ldar(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(src.IsImmediateOffset() && (src.GetOffset() == 0)); + LoadStoreExclusive op = rt.Is64Bits() ? LDAR_x : LDAR_w; + Emit(op | Rs_mask | Rt(rt) | Rt2_mask | RnSP(src.GetBaseRegister())); +} + + +void Assembler::stllrb(const Register& rt, const MemOperand& dst) { + VIXL_ASSERT(CPUHas(CPUFeatures::kLORegions)); + VIXL_ASSERT(dst.IsImmediateOffset() && (dst.GetOffset() == 0)); + Emit(STLLRB | Rs_mask | Rt(rt) | Rt2_mask | RnSP(dst.GetBaseRegister())); +} + + +void Assembler::stllrh(const Register& rt, const MemOperand& dst) { + VIXL_ASSERT(CPUHas(CPUFeatures::kLORegions)); + VIXL_ASSERT(dst.IsImmediateOffset() && (dst.GetOffset() == 0)); + Emit(STLLRH | Rs_mask | Rt(rt) | Rt2_mask | RnSP(dst.GetBaseRegister())); +} + + +void Assembler::stllr(const Register& rt, const MemOperand& dst) { + VIXL_ASSERT(CPUHas(CPUFeatures::kLORegions)); + VIXL_ASSERT(dst.IsImmediateOffset() && (dst.GetOffset() == 0)); + LoadStoreExclusive op = rt.Is64Bits() ? STLLR_x : STLLR_w; + Emit(op | Rs_mask | Rt(rt) | Rt2_mask | RnSP(dst.GetBaseRegister())); +} + + +void Assembler::ldlarb(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(CPUHas(CPUFeatures::kLORegions)); + VIXL_ASSERT(src.IsImmediateOffset() && (src.GetOffset() == 0)); + Emit(LDLARB | Rs_mask | Rt(rt) | Rt2_mask | RnSP(src.GetBaseRegister())); +} + + +void Assembler::ldlarh(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(CPUHas(CPUFeatures::kLORegions)); + VIXL_ASSERT(src.IsImmediateOffset() && (src.GetOffset() == 0)); + Emit(LDLARH | Rs_mask | Rt(rt) | Rt2_mask | RnSP(src.GetBaseRegister())); +} + + +void Assembler::ldlar(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(CPUHas(CPUFeatures::kLORegions)); + VIXL_ASSERT(src.IsImmediateOffset() && (src.GetOffset() == 0)); + LoadStoreExclusive op = rt.Is64Bits() ? LDLAR_x : LDLAR_w; + Emit(op | Rs_mask | Rt(rt) | Rt2_mask | RnSP(src.GetBaseRegister())); +} + + +// clang-format off +#define COMPARE_AND_SWAP_W_X_LIST(V) \ + V(cas, CAS) \ + V(casa, CASA) \ + V(casl, CASL) \ + V(casal, CASAL) +// clang-format on + +#define VIXL_DEFINE_ASM_FUNC(FN, OP) \ + void Assembler::FN(const Register& rs, \ + const Register& rt, \ + const MemOperand& src) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kAtomics)); \ + VIXL_ASSERT(src.IsImmediateOffset() && (src.GetOffset() == 0)); \ + VIXL_ASSERT(AreSameFormat(rs, rt)); \ + LoadStoreExclusive op = rt.Is64Bits() ? OP##_x : OP##_w; \ + Emit(op | Rs(rs) | Rt(rt) | Rt2_mask | RnSP(src.GetBaseRegister())); \ + } +COMPARE_AND_SWAP_W_X_LIST(VIXL_DEFINE_ASM_FUNC) +#undef VIXL_DEFINE_ASM_FUNC + +// clang-format off +#define COMPARE_AND_SWAP_W_LIST(V) \ + V(casb, CASB) \ + V(casab, CASAB) \ + V(caslb, CASLB) \ + V(casalb, CASALB) \ + V(cash, CASH) \ + V(casah, CASAH) \ + V(caslh, CASLH) \ + V(casalh, CASALH) +// clang-format on + +#define VIXL_DEFINE_ASM_FUNC(FN, OP) \ + void Assembler::FN(const Register& rs, \ + const Register& rt, \ + const MemOperand& src) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kAtomics)); \ + VIXL_ASSERT(src.IsImmediateOffset() && (src.GetOffset() == 0)); \ + Emit(OP | Rs(rs) | Rt(rt) | Rt2_mask | RnSP(src.GetBaseRegister())); \ + } +COMPARE_AND_SWAP_W_LIST(VIXL_DEFINE_ASM_FUNC) +#undef VIXL_DEFINE_ASM_FUNC + + +// clang-format off +#define COMPARE_AND_SWAP_PAIR_LIST(V) \ + V(casp, CASP) \ + V(caspa, CASPA) \ + V(caspl, CASPL) \ + V(caspal, CASPAL) +// clang-format on + +#define VIXL_DEFINE_ASM_FUNC(FN, OP) \ + void Assembler::FN(const Register& rs, \ + const Register& rs1, \ + const Register& rt, \ + const Register& rt1, \ + const MemOperand& src) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kAtomics)); \ + USE(rs1, rt1); \ + VIXL_ASSERT(src.IsImmediateOffset() && (src.GetOffset() == 0)); \ + VIXL_ASSERT(AreEven(rs, rt)); \ + VIXL_ASSERT(AreConsecutive(rs, rs1)); \ + VIXL_ASSERT(AreConsecutive(rt, rt1)); \ + VIXL_ASSERT(AreSameFormat(rs, rs1, rt, rt1)); \ + LoadStoreExclusive op = rt.Is64Bits() ? OP##_x : OP##_w; \ + Emit(op | Rs(rs) | Rt(rt) | Rt2_mask | RnSP(src.GetBaseRegister())); \ + } +COMPARE_AND_SWAP_PAIR_LIST(VIXL_DEFINE_ASM_FUNC) +#undef VIXL_DEFINE_ASM_FUNC + +// These macros generate all the variations of the atomic memory operations, +// e.g. ldadd, ldadda, ldaddb, staddl, etc. +// For a full list of the methods with comments, see the assembler header file. + +// clang-format off +#define ATOMIC_MEMORY_SIMPLE_OPERATION_LIST(V, DEF) \ + V(DEF, add, LDADD) \ + V(DEF, clr, LDCLR) \ + V(DEF, eor, LDEOR) \ + V(DEF, set, LDSET) \ + V(DEF, smax, LDSMAX) \ + V(DEF, smin, LDSMIN) \ + V(DEF, umax, LDUMAX) \ + V(DEF, umin, LDUMIN) + +#define ATOMIC_MEMORY_STORE_MODES(V, NAME, OP) \ + V(NAME, OP##_x, OP##_w) \ + V(NAME##l, OP##L_x, OP##L_w) \ + V(NAME##b, OP##B, OP##B) \ + V(NAME##lb, OP##LB, OP##LB) \ + V(NAME##h, OP##H, OP##H) \ + V(NAME##lh, OP##LH, OP##LH) + +#define ATOMIC_MEMORY_LOAD_MODES(V, NAME, OP) \ + ATOMIC_MEMORY_STORE_MODES(V, NAME, OP) \ + V(NAME##a, OP##A_x, OP##A_w) \ + V(NAME##al, OP##AL_x, OP##AL_w) \ + V(NAME##ab, OP##AB, OP##AB) \ + V(NAME##alb, OP##ALB, OP##ALB) \ + V(NAME##ah, OP##AH, OP##AH) \ + V(NAME##alh, OP##ALH, OP##ALH) +// clang-format on + +#define DEFINE_ASM_LOAD_FUNC(FN, OP_X, OP_W) \ + void Assembler::ld##FN(const Register& rs, \ + const Register& rt, \ + const MemOperand& src) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kAtomics)); \ + VIXL_ASSERT(src.IsImmediateOffset() && (src.GetOffset() == 0)); \ + AtomicMemoryOp op = rt.Is64Bits() ? OP_X : OP_W; \ + Emit(op | Rs(rs) | Rt(rt) | RnSP(src.GetBaseRegister())); \ + } +#define DEFINE_ASM_STORE_FUNC(FN, OP_X, OP_W) \ + void Assembler::st##FN(const Register& rs, const MemOperand& src) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kAtomics)); \ + ld##FN(rs, AppropriateZeroRegFor(rs), src); \ + } + +ATOMIC_MEMORY_SIMPLE_OPERATION_LIST(ATOMIC_MEMORY_LOAD_MODES, + DEFINE_ASM_LOAD_FUNC) +ATOMIC_MEMORY_SIMPLE_OPERATION_LIST(ATOMIC_MEMORY_STORE_MODES, + DEFINE_ASM_STORE_FUNC) + +#define DEFINE_ASM_SWP_FUNC(FN, OP_X, OP_W) \ + void Assembler::FN(const Register& rs, \ + const Register& rt, \ + const MemOperand& src) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kAtomics)); \ + VIXL_ASSERT(src.IsImmediateOffset() && (src.GetOffset() == 0)); \ + AtomicMemoryOp op = rt.Is64Bits() ? OP_X : OP_W; \ + Emit(op | Rs(rs) | Rt(rt) | RnSP(src.GetBaseRegister())); \ + } + +ATOMIC_MEMORY_LOAD_MODES(DEFINE_ASM_SWP_FUNC, swp, SWP) + +#undef DEFINE_ASM_LOAD_FUNC +#undef DEFINE_ASM_STORE_FUNC +#undef DEFINE_ASM_SWP_FUNC + + +void Assembler::ldaprb(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(CPUHas(CPUFeatures::kRCpc)); + VIXL_ASSERT(src.IsImmediateOffset() && (src.GetOffset() == 0)); + AtomicMemoryOp op = LDAPRB; + Emit(op | Rs(xzr) | Rt(rt) | RnSP(src.GetBaseRegister())); +} + +void Assembler::ldapurb(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(CPUHas(CPUFeatures::kRCpc, CPUFeatures::kRCpcImm)); + VIXL_ASSERT(src.IsImmediateOffset() && IsImmLSUnscaled(src.GetOffset())); + + Instr base = RnSP(src.GetBaseRegister()); + int64_t offset = src.GetOffset(); + Emit(LDAPURB | Rt(rt) | base | ImmLS(static_cast(offset))); +} + +void Assembler::ldapursb(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(CPUHas(CPUFeatures::kRCpc, CPUFeatures::kRCpcImm)); + VIXL_ASSERT(src.IsImmediateOffset() && IsImmLSUnscaled(src.GetOffset())); + + Instr base = RnSP(src.GetBaseRegister()); + int64_t offset = src.GetOffset(); + Instr op = rt.Is64Bits() ? LDAPURSB_x : LDAPURSB_w; + Emit(op | Rt(rt) | base | ImmLS(static_cast(offset))); +} + +void Assembler::ldaprh(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(CPUHas(CPUFeatures::kRCpc)); + VIXL_ASSERT(src.IsImmediateOffset() && (src.GetOffset() == 0)); + AtomicMemoryOp op = LDAPRH; + Emit(op | Rs(xzr) | Rt(rt) | RnSP(src.GetBaseRegister())); +} + +void Assembler::ldapurh(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(CPUHas(CPUFeatures::kRCpc, CPUFeatures::kRCpcImm)); + VIXL_ASSERT(src.IsImmediateOffset() && IsImmLSUnscaled(src.GetOffset())); + + Instr base = RnSP(src.GetBaseRegister()); + int64_t offset = src.GetOffset(); + Emit(LDAPURH | Rt(rt) | base | ImmLS(static_cast(offset))); +} + +void Assembler::ldapursh(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(CPUHas(CPUFeatures::kRCpc, CPUFeatures::kRCpcImm)); + VIXL_ASSERT(src.IsImmediateOffset() && IsImmLSUnscaled(src.GetOffset())); + + Instr base = RnSP(src.GetBaseRegister()); + int64_t offset = src.GetOffset(); + LoadStoreRCpcUnscaledOffsetOp op = rt.Is64Bits() ? LDAPURSH_x : LDAPURSH_w; + Emit(op | Rt(rt) | base | ImmLS(static_cast(offset))); +} + +void Assembler::ldapr(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(CPUHas(CPUFeatures::kRCpc)); + VIXL_ASSERT(src.IsImmediateOffset() && (src.GetOffset() == 0)); + AtomicMemoryOp op = rt.Is64Bits() ? LDAPR_x : LDAPR_w; + Emit(op | Rs(xzr) | Rt(rt) | RnSP(src.GetBaseRegister())); +} + +void Assembler::ldapur(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(CPUHas(CPUFeatures::kRCpc, CPUFeatures::kRCpcImm)); + VIXL_ASSERT(src.IsImmediateOffset() && IsImmLSUnscaled(src.GetOffset())); + + Instr base = RnSP(src.GetBaseRegister()); + int64_t offset = src.GetOffset(); + LoadStoreRCpcUnscaledOffsetOp op = rt.Is64Bits() ? LDAPUR_x : LDAPUR_w; + Emit(op | Rt(rt) | base | ImmLS(static_cast(offset))); +} + +void Assembler::ldapursw(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(CPUHas(CPUFeatures::kRCpc, CPUFeatures::kRCpcImm)); + VIXL_ASSERT(rt.Is64Bits()); + VIXL_ASSERT(src.IsImmediateOffset() && IsImmLSUnscaled(src.GetOffset())); + + Instr base = RnSP(src.GetBaseRegister()); + int64_t offset = src.GetOffset(); + Emit(LDAPURSW | Rt(rt) | base | ImmLS(static_cast(offset))); +} + +void Assembler::prfm(int op, + const MemOperand& address, + LoadStoreScalingOption option) { + VIXL_ASSERT(option != RequireUnscaledOffset); + VIXL_ASSERT(option != PreferUnscaledOffset); + Prefetch(op, address, option); +} + +void Assembler::prfm(PrefetchOperation op, + const MemOperand& address, + LoadStoreScalingOption option) { + // Passing unnamed values in 'op' is undefined behaviour in C++. + VIXL_ASSERT(IsNamedPrefetchOperation(op)); + prfm(static_cast(op), address, option); +} + + +void Assembler::prfum(int op, + const MemOperand& address, + LoadStoreScalingOption option) { + VIXL_ASSERT(option != RequireScaledOffset); + VIXL_ASSERT(option != PreferScaledOffset); + Prefetch(op, address, option); +} + +void Assembler::prfum(PrefetchOperation op, + const MemOperand& address, + LoadStoreScalingOption option) { + // Passing unnamed values in 'op' is undefined behaviour in C++. + VIXL_ASSERT(IsNamedPrefetchOperation(op)); + prfum(static_cast(op), address, option); +} + + +void Assembler::prfm(int op, RawLiteral* literal) { + prfm(op, static_cast(LinkAndGetWordOffsetTo(literal))); +} + +void Assembler::prfm(PrefetchOperation op, RawLiteral* literal) { + // Passing unnamed values in 'op' is undefined behaviour in C++. + VIXL_ASSERT(IsNamedPrefetchOperation(op)); + prfm(static_cast(op), literal); +} + + +void Assembler::sys(int op1, int crn, int crm, int op2, const Register& xt) { + VIXL_ASSERT(xt.Is64Bits()); + Emit(SYS | ImmSysOp1(op1) | CRn(crn) | CRm(crm) | ImmSysOp2(op2) | Rt(xt)); +} + + +void Assembler::sys(int op, const Register& xt) { + VIXL_ASSERT(xt.Is64Bits()); + Emit(SYS | SysOp(op) | Rt(xt)); +} + + +void Assembler::dc(DataCacheOp op, const Register& rt) { + if (op == CVAP) VIXL_ASSERT(CPUHas(CPUFeatures::kDCPoP)); + if (op == CVADP) VIXL_ASSERT(CPUHas(CPUFeatures::kDCCVADP)); + sys(op, rt); +} + + +void Assembler::ic(InstructionCacheOp op, const Register& rt) { + VIXL_ASSERT(op == IVAU); + sys(op, rt); +} + + +void Assembler::hint(SystemHint code) { hint(static_cast(code)); } + + +void Assembler::hint(int imm7) { + VIXL_ASSERT(IsUint7(imm7)); + Emit(HINT | ImmHint(imm7) | Rt(xzr)); +} + + +// NEON structure loads and stores. +Instr Assembler::LoadStoreStructAddrModeField(const MemOperand& addr) { + Instr addr_field = RnSP(addr.GetBaseRegister()); + + if (addr.IsPostIndex()) { + VIXL_STATIC_ASSERT(NEONLoadStoreMultiStructPostIndex == + static_cast( + NEONLoadStoreSingleStructPostIndex)); + + addr_field |= NEONLoadStoreMultiStructPostIndex; + if (addr.GetOffset() == 0) { + addr_field |= RmNot31(addr.GetRegisterOffset()); + } else { + // The immediate post index addressing mode is indicated by rm = 31. + // The immediate is implied by the number of vector registers used. + addr_field |= (0x1f << Rm_offset); + } + } else { + VIXL_ASSERT(addr.IsImmediateOffset() && (addr.GetOffset() == 0)); + } + return addr_field; +} + +void Assembler::LoadStoreStructVerify(const VRegister& vt, + const MemOperand& addr, + Instr op) { +#ifdef VIXL_DEBUG + // Assert that addressing mode is either offset (with immediate 0), post + // index by immediate of the size of the register list, or post index by a + // value in a core register. + VIXL_ASSERT(vt.HasSize() && vt.HasLaneSize()); + if (addr.IsImmediateOffset()) { + VIXL_ASSERT(addr.GetOffset() == 0); + } else { + int offset = vt.GetSizeInBytes(); + switch (op) { + case NEON_LD1_1v: + case NEON_ST1_1v: + offset *= 1; + break; + case NEONLoadStoreSingleStructLoad1: + case NEONLoadStoreSingleStructStore1: + case NEON_LD1R: + offset = (offset / vt.GetLanes()) * 1; + break; + + case NEON_LD1_2v: + case NEON_ST1_2v: + case NEON_LD2: + case NEON_ST2: + offset *= 2; + break; + case NEONLoadStoreSingleStructLoad2: + case NEONLoadStoreSingleStructStore2: + case NEON_LD2R: + offset = (offset / vt.GetLanes()) * 2; + break; + + case NEON_LD1_3v: + case NEON_ST1_3v: + case NEON_LD3: + case NEON_ST3: + offset *= 3; + break; + case NEONLoadStoreSingleStructLoad3: + case NEONLoadStoreSingleStructStore3: + case NEON_LD3R: + offset = (offset / vt.GetLanes()) * 3; + break; + + case NEON_LD1_4v: + case NEON_ST1_4v: + case NEON_LD4: + case NEON_ST4: + offset *= 4; + break; + case NEONLoadStoreSingleStructLoad4: + case NEONLoadStoreSingleStructStore4: + case NEON_LD4R: + offset = (offset / vt.GetLanes()) * 4; + break; + default: + VIXL_UNREACHABLE(); + } + VIXL_ASSERT(!addr.GetRegisterOffset().Is(NoReg) || + addr.GetOffset() == offset); + } +#else + USE(vt, addr, op); +#endif +} + +void Assembler::LoadStoreStruct(const VRegister& vt, + const MemOperand& addr, + NEONLoadStoreMultiStructOp op) { + LoadStoreStructVerify(vt, addr, op); + VIXL_ASSERT(vt.IsVector() || vt.Is1D()); + Emit(op | LoadStoreStructAddrModeField(addr) | LSVFormat(vt) | Rt(vt)); +} + + +void Assembler::LoadStoreStructSingleAllLanes(const VRegister& vt, + const MemOperand& addr, + NEONLoadStoreSingleStructOp op) { + LoadStoreStructVerify(vt, addr, op); + Emit(op | LoadStoreStructAddrModeField(addr) | LSVFormat(vt) | Rt(vt)); +} + + +void Assembler::ld1(const VRegister& vt, const MemOperand& src) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + LoadStoreStruct(vt, src, NEON_LD1_1v); +} + + +void Assembler::ld1(const VRegister& vt, + const VRegister& vt2, + const MemOperand& src) { + USE(vt2); + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vt, vt2)); + VIXL_ASSERT(AreConsecutive(vt, vt2)); + LoadStoreStruct(vt, src, NEON_LD1_2v); +} + + +void Assembler::ld1(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const MemOperand& src) { + USE(vt2, vt3); + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vt, vt2, vt3)); + VIXL_ASSERT(AreConsecutive(vt, vt2, vt3)); + LoadStoreStruct(vt, src, NEON_LD1_3v); +} + + +void Assembler::ld1(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const VRegister& vt4, + const MemOperand& src) { + USE(vt2, vt3, vt4); + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vt, vt2, vt3, vt4)); + VIXL_ASSERT(AreConsecutive(vt, vt2, vt3, vt4)); + LoadStoreStruct(vt, src, NEON_LD1_4v); +} + + +void Assembler::ld2(const VRegister& vt, + const VRegister& vt2, + const MemOperand& src) { + USE(vt2); + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vt, vt2)); + VIXL_ASSERT(AreConsecutive(vt, vt2)); + LoadStoreStruct(vt, src, NEON_LD2); +} + + +void Assembler::ld2(const VRegister& vt, + const VRegister& vt2, + int lane, + const MemOperand& src) { + USE(vt2); + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vt, vt2)); + VIXL_ASSERT(AreConsecutive(vt, vt2)); + LoadStoreStructSingle(vt, lane, src, NEONLoadStoreSingleStructLoad2); +} + + +void Assembler::ld2r(const VRegister& vt, + const VRegister& vt2, + const MemOperand& src) { + USE(vt2); + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vt, vt2)); + VIXL_ASSERT(AreConsecutive(vt, vt2)); + LoadStoreStructSingleAllLanes(vt, src, NEON_LD2R); +} + + +void Assembler::ld3(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const MemOperand& src) { + USE(vt2, vt3); + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vt, vt2, vt3)); + VIXL_ASSERT(AreConsecutive(vt, vt2, vt3)); + LoadStoreStruct(vt, src, NEON_LD3); +} + + +void Assembler::ld3(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + int lane, + const MemOperand& src) { + USE(vt2, vt3); + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vt, vt2, vt3)); + VIXL_ASSERT(AreConsecutive(vt, vt2, vt3)); + LoadStoreStructSingle(vt, lane, src, NEONLoadStoreSingleStructLoad3); +} + + +void Assembler::ld3r(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const MemOperand& src) { + USE(vt2, vt3); + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vt, vt2, vt3)); + VIXL_ASSERT(AreConsecutive(vt, vt2, vt3)); + LoadStoreStructSingleAllLanes(vt, src, NEON_LD3R); +} + + +void Assembler::ld4(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const VRegister& vt4, + const MemOperand& src) { + USE(vt2, vt3, vt4); + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vt, vt2, vt3, vt4)); + VIXL_ASSERT(AreConsecutive(vt, vt2, vt3, vt4)); + LoadStoreStruct(vt, src, NEON_LD4); +} + + +void Assembler::ld4(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const VRegister& vt4, + int lane, + const MemOperand& src) { + USE(vt2, vt3, vt4); + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vt, vt2, vt3, vt4)); + VIXL_ASSERT(AreConsecutive(vt, vt2, vt3, vt4)); + LoadStoreStructSingle(vt, lane, src, NEONLoadStoreSingleStructLoad4); +} + + +void Assembler::ld4r(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const VRegister& vt4, + const MemOperand& src) { + USE(vt2, vt3, vt4); + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vt, vt2, vt3, vt4)); + VIXL_ASSERT(AreConsecutive(vt, vt2, vt3, vt4)); + LoadStoreStructSingleAllLanes(vt, src, NEON_LD4R); +} + + +void Assembler::st1(const VRegister& vt, const MemOperand& src) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + LoadStoreStruct(vt, src, NEON_ST1_1v); +} + + +void Assembler::st1(const VRegister& vt, + const VRegister& vt2, + const MemOperand& src) { + USE(vt2); + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vt, vt2)); + VIXL_ASSERT(AreConsecutive(vt, vt2)); + LoadStoreStruct(vt, src, NEON_ST1_2v); +} + + +void Assembler::st1(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const MemOperand& src) { + USE(vt2, vt3); + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vt, vt2, vt3)); + VIXL_ASSERT(AreConsecutive(vt, vt2, vt3)); + LoadStoreStruct(vt, src, NEON_ST1_3v); +} + + +void Assembler::st1(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const VRegister& vt4, + const MemOperand& src) { + USE(vt2, vt3, vt4); + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vt, vt2, vt3, vt4)); + VIXL_ASSERT(AreConsecutive(vt, vt2, vt3, vt4)); + LoadStoreStruct(vt, src, NEON_ST1_4v); +} + + +void Assembler::st2(const VRegister& vt, + const VRegister& vt2, + const MemOperand& dst) { + USE(vt2); + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vt, vt2)); + VIXL_ASSERT(AreConsecutive(vt, vt2)); + LoadStoreStruct(vt, dst, NEON_ST2); +} + + +void Assembler::st2(const VRegister& vt, + const VRegister& vt2, + int lane, + const MemOperand& dst) { + USE(vt2); + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vt, vt2)); + VIXL_ASSERT(AreConsecutive(vt, vt2)); + LoadStoreStructSingle(vt, lane, dst, NEONLoadStoreSingleStructStore2); +} + + +void Assembler::st3(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const MemOperand& dst) { + USE(vt2, vt3); + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vt, vt2, vt3)); + VIXL_ASSERT(AreConsecutive(vt, vt2, vt3)); + LoadStoreStruct(vt, dst, NEON_ST3); +} + + +void Assembler::st3(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + int lane, + const MemOperand& dst) { + USE(vt2, vt3); + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vt, vt2, vt3)); + VIXL_ASSERT(AreConsecutive(vt, vt2, vt3)); + LoadStoreStructSingle(vt, lane, dst, NEONLoadStoreSingleStructStore3); +} + + +void Assembler::st4(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const VRegister& vt4, + const MemOperand& dst) { + USE(vt2, vt3, vt4); + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vt, vt2, vt3, vt4)); + VIXL_ASSERT(AreConsecutive(vt, vt2, vt3, vt4)); + LoadStoreStruct(vt, dst, NEON_ST4); +} + + +void Assembler::st4(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const VRegister& vt4, + int lane, + const MemOperand& dst) { + USE(vt2, vt3, vt4); + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vt, vt2, vt3, vt4)); + VIXL_ASSERT(AreConsecutive(vt, vt2, vt3, vt4)); + LoadStoreStructSingle(vt, lane, dst, NEONLoadStoreSingleStructStore4); +} + + +void Assembler::LoadStoreStructSingle(const VRegister& vt, + uint32_t lane, + const MemOperand& addr, + NEONLoadStoreSingleStructOp op) { + LoadStoreStructVerify(vt, addr, op); + + // We support vt arguments of the form vt.VxT() or vt.T(), where x is the + // number of lanes, and T is b, h, s or d. + unsigned lane_size = vt.GetLaneSizeInBytes(); + VIXL_ASSERT(lane_size > 0); + VIXL_ASSERT(lane < (kQRegSizeInBytes / lane_size)); + + // Lane size is encoded in the opcode field. Lane index is encoded in the Q, + // S and size fields. + lane *= lane_size; + if (lane_size == 8) lane++; + + Instr size = (lane << NEONLSSize_offset) & NEONLSSize_mask; + Instr s = (lane << (NEONS_offset - 2)) & NEONS_mask; + Instr q = (lane << (NEONQ_offset - 3)) & NEONQ_mask; + + Instr instr = op; + switch (lane_size) { + case 1: + instr |= NEONLoadStoreSingle_b; + break; + case 2: + instr |= NEONLoadStoreSingle_h; + break; + case 4: + instr |= NEONLoadStoreSingle_s; + break; + default: + VIXL_ASSERT(lane_size == 8); + instr |= NEONLoadStoreSingle_d; + } + + Emit(instr | LoadStoreStructAddrModeField(addr) | q | size | s | Rt(vt)); +} + + +void Assembler::ld1(const VRegister& vt, int lane, const MemOperand& src) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + LoadStoreStructSingle(vt, lane, src, NEONLoadStoreSingleStructLoad1); +} + + +void Assembler::ld1r(const VRegister& vt, const MemOperand& src) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + LoadStoreStructSingleAllLanes(vt, src, NEON_LD1R); +} + + +void Assembler::st1(const VRegister& vt, int lane, const MemOperand& dst) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + LoadStoreStructSingle(vt, lane, dst, NEONLoadStoreSingleStructStore1); +} + + +void Assembler::NEON3DifferentL(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + NEON3DifferentOp vop) { + VIXL_ASSERT(AreSameFormat(vn, vm)); + VIXL_ASSERT((vn.Is1H() && vd.Is1S()) || (vn.Is1S() && vd.Is1D()) || + (vn.Is8B() && vd.Is8H()) || (vn.Is4H() && vd.Is4S()) || + (vn.Is2S() && vd.Is2D()) || (vn.Is16B() && vd.Is8H()) || + (vn.Is8H() && vd.Is4S()) || (vn.Is4S() && vd.Is2D())); + Instr format, op = vop; + if (vd.IsScalar()) { + op |= NEON_Q | NEONScalar; + format = SFormat(vn); + } else { + format = VFormat(vn); + } + Emit(format | op | Rm(vm) | Rn(vn) | Rd(vd)); +} + + +void Assembler::NEON3DifferentW(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + NEON3DifferentOp vop) { + VIXL_ASSERT(AreSameFormat(vd, vn)); + VIXL_ASSERT((vm.Is8B() && vd.Is8H()) || (vm.Is4H() && vd.Is4S()) || + (vm.Is2S() && vd.Is2D()) || (vm.Is16B() && vd.Is8H()) || + (vm.Is8H() && vd.Is4S()) || (vm.Is4S() && vd.Is2D())); + Emit(VFormat(vm) | vop | Rm(vm) | Rn(vn) | Rd(vd)); +} + + +void Assembler::NEON3DifferentHN(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + NEON3DifferentOp vop) { + VIXL_ASSERT(AreSameFormat(vm, vn)); + VIXL_ASSERT((vd.Is8B() && vn.Is8H()) || (vd.Is4H() && vn.Is4S()) || + (vd.Is2S() && vn.Is2D()) || (vd.Is16B() && vn.Is8H()) || + (vd.Is8H() && vn.Is4S()) || (vd.Is4S() && vn.Is2D())); + Emit(VFormat(vd) | vop | Rm(vm) | Rn(vn) | Rd(vd)); +} + + +// clang-format off +#define NEON_3DIFF_LONG_LIST(V) \ + V(pmull, NEON_PMULL, vn.IsVector() && vn.Is8B()) \ + V(pmull2, NEON_PMULL2, vn.IsVector() && vn.Is16B()) \ + V(saddl, NEON_SADDL, vn.IsVector() && vn.IsD()) \ + V(saddl2, NEON_SADDL2, vn.IsVector() && vn.IsQ()) \ + V(sabal, NEON_SABAL, vn.IsVector() && vn.IsD()) \ + V(sabal2, NEON_SABAL2, vn.IsVector() && vn.IsQ()) \ + V(uabal, NEON_UABAL, vn.IsVector() && vn.IsD()) \ + V(uabal2, NEON_UABAL2, vn.IsVector() && vn.IsQ()) \ + V(sabdl, NEON_SABDL, vn.IsVector() && vn.IsD()) \ + V(sabdl2, NEON_SABDL2, vn.IsVector() && vn.IsQ()) \ + V(uabdl, NEON_UABDL, vn.IsVector() && vn.IsD()) \ + V(uabdl2, NEON_UABDL2, vn.IsVector() && vn.IsQ()) \ + V(smlal, NEON_SMLAL, vn.IsVector() && vn.IsD()) \ + V(smlal2, NEON_SMLAL2, vn.IsVector() && vn.IsQ()) \ + V(umlal, NEON_UMLAL, vn.IsVector() && vn.IsD()) \ + V(umlal2, NEON_UMLAL2, vn.IsVector() && vn.IsQ()) \ + V(smlsl, NEON_SMLSL, vn.IsVector() && vn.IsD()) \ + V(smlsl2, NEON_SMLSL2, vn.IsVector() && vn.IsQ()) \ + V(umlsl, NEON_UMLSL, vn.IsVector() && vn.IsD()) \ + V(umlsl2, NEON_UMLSL2, vn.IsVector() && vn.IsQ()) \ + V(smull, NEON_SMULL, vn.IsVector() && vn.IsD()) \ + V(smull2, NEON_SMULL2, vn.IsVector() && vn.IsQ()) \ + V(umull, NEON_UMULL, vn.IsVector() && vn.IsD()) \ + V(umull2, NEON_UMULL2, vn.IsVector() && vn.IsQ()) \ + V(ssubl, NEON_SSUBL, vn.IsVector() && vn.IsD()) \ + V(ssubl2, NEON_SSUBL2, vn.IsVector() && vn.IsQ()) \ + V(uaddl, NEON_UADDL, vn.IsVector() && vn.IsD()) \ + V(uaddl2, NEON_UADDL2, vn.IsVector() && vn.IsQ()) \ + V(usubl, NEON_USUBL, vn.IsVector() && vn.IsD()) \ + V(usubl2, NEON_USUBL2, vn.IsVector() && vn.IsQ()) \ + V(sqdmlal, NEON_SQDMLAL, vn.Is1H() || vn.Is1S() || vn.Is4H() || vn.Is2S()) \ + V(sqdmlal2, NEON_SQDMLAL2, vn.Is1H() || vn.Is1S() || vn.Is8H() || vn.Is4S()) \ + V(sqdmlsl, NEON_SQDMLSL, vn.Is1H() || vn.Is1S() || vn.Is4H() || vn.Is2S()) \ + V(sqdmlsl2, NEON_SQDMLSL2, vn.Is1H() || vn.Is1S() || vn.Is8H() || vn.Is4S()) \ + V(sqdmull, NEON_SQDMULL, vn.Is1H() || vn.Is1S() || vn.Is4H() || vn.Is2S()) \ + V(sqdmull2, NEON_SQDMULL2, vn.Is1H() || vn.Is1S() || vn.Is8H() || vn.Is4S()) \ +// clang-format on + + +#define VIXL_DEFINE_ASM_FUNC(FN, OP, AS) \ +void Assembler::FN(const VRegister& vd, \ + const VRegister& vn, \ + const VRegister& vm) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); \ + VIXL_ASSERT(AS); \ + NEON3DifferentL(vd, vn, vm, OP); \ +} +NEON_3DIFF_LONG_LIST(VIXL_DEFINE_ASM_FUNC) +#undef VIXL_DEFINE_ASM_FUNC + +// clang-format off +#define NEON_3DIFF_HN_LIST(V) \ + V(addhn, NEON_ADDHN, vd.IsD()) \ + V(addhn2, NEON_ADDHN2, vd.IsQ()) \ + V(raddhn, NEON_RADDHN, vd.IsD()) \ + V(raddhn2, NEON_RADDHN2, vd.IsQ()) \ + V(subhn, NEON_SUBHN, vd.IsD()) \ + V(subhn2, NEON_SUBHN2, vd.IsQ()) \ + V(rsubhn, NEON_RSUBHN, vd.IsD()) \ + V(rsubhn2, NEON_RSUBHN2, vd.IsQ()) +// clang-format on + +#define VIXL_DEFINE_ASM_FUNC(FN, OP, AS) \ + void Assembler::FN(const VRegister& vd, \ + const VRegister& vn, \ + const VRegister& vm) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); \ + VIXL_ASSERT(AS); \ + NEON3DifferentHN(vd, vn, vm, OP); \ + } +NEON_3DIFF_HN_LIST(VIXL_DEFINE_ASM_FUNC) +#undef VIXL_DEFINE_ASM_FUNC + +void Assembler::uaddw(const VRegister& vd, + const VRegister& vn, + const VRegister& vm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vm.IsD()); + NEON3DifferentW(vd, vn, vm, NEON_UADDW); +} + + +void Assembler::uaddw2(const VRegister& vd, + const VRegister& vn, + const VRegister& vm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vm.IsQ()); + NEON3DifferentW(vd, vn, vm, NEON_UADDW2); +} + + +void Assembler::saddw(const VRegister& vd, + const VRegister& vn, + const VRegister& vm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vm.IsD()); + NEON3DifferentW(vd, vn, vm, NEON_SADDW); +} + + +void Assembler::saddw2(const VRegister& vd, + const VRegister& vn, + const VRegister& vm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vm.IsQ()); + NEON3DifferentW(vd, vn, vm, NEON_SADDW2); +} + + +void Assembler::usubw(const VRegister& vd, + const VRegister& vn, + const VRegister& vm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vm.IsD()); + NEON3DifferentW(vd, vn, vm, NEON_USUBW); +} + + +void Assembler::usubw2(const VRegister& vd, + const VRegister& vn, + const VRegister& vm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vm.IsQ()); + NEON3DifferentW(vd, vn, vm, NEON_USUBW2); +} + + +void Assembler::ssubw(const VRegister& vd, + const VRegister& vn, + const VRegister& vm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vm.IsD()); + NEON3DifferentW(vd, vn, vm, NEON_SSUBW); +} + + +void Assembler::ssubw2(const VRegister& vd, + const VRegister& vn, + const VRegister& vm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vm.IsQ()); + NEON3DifferentW(vd, vn, vm, NEON_SSUBW2); +} + + +void Assembler::mov(const Register& rd, const Register& rm) { + // Moves involving the stack pointer are encoded as add immediate with + // second operand of zero. Otherwise, orr with first operand zr is + // used. + if (rd.IsSP() || rm.IsSP()) { + add(rd, rm, 0); + } else { + orr(rd, AppropriateZeroRegFor(rd), rm); + } +} + +void Assembler::xpaclri() { + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth)); + Emit(XPACLRI); +} + +void Assembler::pacia1716() { + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth)); + Emit(PACIA1716); +} + +void Assembler::pacib1716() { + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth)); + Emit(PACIB1716); +} + +void Assembler::autia1716() { + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth)); + Emit(AUTIA1716); +} + +void Assembler::autib1716() { + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth)); + Emit(AUTIB1716); +} + +void Assembler::paciaz() { + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth)); + Emit(PACIAZ); +} + +void Assembler::pacibz() { + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth)); + Emit(PACIBZ); +} + +void Assembler::autiaz() { + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth)); + Emit(AUTIAZ); +} + +void Assembler::autibz() { + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth)); + Emit(AUTIBZ); +} + +void Assembler::paciasp() { + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth)); + Emit(PACIASP); +} + +void Assembler::pacibsp() { + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth)); + Emit(PACIBSP); +} + +void Assembler::autiasp() { + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth)); + Emit(AUTIASP); +} + +void Assembler::autibsp() { + VIXL_ASSERT(CPUHas(CPUFeatures::kPAuth)); + Emit(AUTIBSP); +} + +void Assembler::bti(BranchTargetIdentifier id) { + VIXL_ASSERT((id != EmitPACIASP) && (id != EmitPACIBSP)); // Not modes of Bti. + VIXL_ASSERT(id != EmitBTI_none); // Always generate an instruction. + VIXL_ASSERT(CPUHas(CPUFeatures::kBTI)); + hint(static_cast(id)); +} + +void Assembler::mvn(const Register& rd, const Operand& operand) { + orn(rd, AppropriateZeroRegFor(rd), operand); +} + + +void Assembler::mrs(const Register& xt, SystemRegister sysreg) { + VIXL_ASSERT(xt.Is64Bits()); + VIXL_ASSERT(CPUHas(sysreg)); + Emit(MRS | ImmSystemRegister(sysreg) | Rt(xt)); +} + + +void Assembler::msr(SystemRegister sysreg, const Register& xt) { + VIXL_ASSERT(xt.Is64Bits()); + VIXL_ASSERT(CPUHas(sysreg)); + Emit(MSR | Rt(xt) | ImmSystemRegister(sysreg)); +} + + +void Assembler::cfinv() { + VIXL_ASSERT(CPUHas(CPUFeatures::kFlagM)); + Emit(CFINV); +} + + +void Assembler::axflag() { + VIXL_ASSERT(CPUHas(CPUFeatures::kAXFlag)); + Emit(AXFLAG); +} + + +void Assembler::xaflag() { + VIXL_ASSERT(CPUHas(CPUFeatures::kAXFlag)); + Emit(XAFLAG); +} + + +void Assembler::clrex(int imm4) { Emit(CLREX | CRm(imm4)); } + + +void Assembler::dmb(BarrierDomain domain, BarrierType type) { + Emit(DMB | ImmBarrierDomain(domain) | ImmBarrierType(type)); +} + + +void Assembler::dsb(BarrierDomain domain, BarrierType type) { + Emit(DSB | ImmBarrierDomain(domain) | ImmBarrierType(type)); +} + + +void Assembler::isb() { + Emit(ISB | ImmBarrierDomain(FullSystem) | ImmBarrierType(BarrierAll)); +} + +void Assembler::esb() { + VIXL_ASSERT(CPUHas(CPUFeatures::kRAS)); + hint(ESB); +} + +void Assembler::csdb() { hint(CSDB); } + +void Assembler::fmov(const VRegister& vd, double imm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP)); + if (vd.IsScalar()) { + VIXL_ASSERT(vd.Is1D()); + Emit(FMOV_d_imm | Rd(vd) | ImmFP64(imm)); + } else { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.Is2D()); + Instr op = NEONModifiedImmediate_MOVI | NEONModifiedImmediateOpBit; + Instr q = NEON_Q; + uint32_t encoded_imm = FP64ToImm8(imm); + Emit(q | op | ImmNEONabcdefgh(encoded_imm) | NEONCmode(0xf) | Rd(vd)); + } +} + + +void Assembler::fmov(const VRegister& vd, float imm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP)); + if (vd.IsScalar()) { + VIXL_ASSERT(vd.Is1S()); + Emit(FMOV_s_imm | Rd(vd) | ImmFP32(imm)); + } else { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.Is2S() || vd.Is4S()); + Instr op = NEONModifiedImmediate_MOVI; + Instr q = vd.Is4S() ? NEON_Q : 0; + uint32_t encoded_imm = FP32ToImm8(imm); + Emit(q | op | ImmNEONabcdefgh(encoded_imm) | NEONCmode(0xf) | Rd(vd)); + } +} + + +void Assembler::fmov(const VRegister& vd, Float16 imm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP)); + if (vd.IsScalar()) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFPHalf)); + VIXL_ASSERT(vd.Is1H()); + Emit(FMOV_h_imm | Rd(vd) | ImmFP16(imm)); + } else { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON, CPUFeatures::kNEONHalf)); + VIXL_ASSERT(vd.Is4H() || vd.Is8H()); + Instr q = vd.Is8H() ? NEON_Q : 0; + uint32_t encoded_imm = FP16ToImm8(imm); + Emit(q | NEONModifiedImmediate_FMOV | ImmNEONabcdefgh(encoded_imm) | + NEONCmode(0xf) | Rd(vd)); + } +} + + +void Assembler::fmov(const Register& rd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP)); + VIXL_ASSERT(vn.Is1H() || vn.Is1S() || vn.Is1D()); + VIXL_ASSERT((rd.GetSizeInBits() == vn.GetSizeInBits()) || vn.Is1H()); + FPIntegerConvertOp op; + switch (vn.GetSizeInBits()) { + case 16: + VIXL_ASSERT(CPUHas(CPUFeatures::kFPHalf)); + op = rd.Is64Bits() ? FMOV_xh : FMOV_wh; + break; + case 32: + op = FMOV_ws; + break; + default: + op = FMOV_xd; + } + Emit(op | Rd(rd) | Rn(vn)); +} + + +void Assembler::fmov(const VRegister& vd, const Register& rn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP)); + VIXL_ASSERT(vd.Is1H() || vd.Is1S() || vd.Is1D()); + VIXL_ASSERT((vd.GetSizeInBits() == rn.GetSizeInBits()) || vd.Is1H()); + FPIntegerConvertOp op; + switch (vd.GetSizeInBits()) { + case 16: + VIXL_ASSERT(CPUHas(CPUFeatures::kFPHalf)); + op = rn.Is64Bits() ? FMOV_hx : FMOV_hw; + break; + case 32: + op = FMOV_sw; + break; + default: + op = FMOV_dx; + } + Emit(op | Rd(vd) | Rn(rn)); +} + + +void Assembler::fmov(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP)); + if (vd.Is1H()) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFPHalf)); + } + VIXL_ASSERT(vd.Is1H() || vd.Is1S() || vd.Is1D()); + VIXL_ASSERT(vd.IsSameFormat(vn)); + Emit(FPType(vd) | FMOV | Rd(vd) | Rn(vn)); +} + + +void Assembler::fmov(const VRegister& vd, int index, const Register& rn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON, CPUFeatures::kFP)); + VIXL_ASSERT((index == 1) && vd.Is1D() && rn.IsX()); + USE(index); + Emit(FMOV_d1_x | Rd(vd) | Rn(rn)); +} + + +void Assembler::fmov(const Register& rd, const VRegister& vn, int index) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON, CPUFeatures::kFP)); + VIXL_ASSERT((index == 1) && vn.Is1D() && rd.IsX()); + USE(index); + Emit(FMOV_x_d1 | Rd(rd) | Rn(vn)); +} + + +void Assembler::fmadd(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + const VRegister& va) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP)); + FPDataProcessing3SourceOp op; + if (vd.Is1H()) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFPHalf)); + op = FMADD_h; + } else if (vd.Is1S()) { + op = FMADD_s; + } else { + VIXL_ASSERT(vd.Is1D()); + op = FMADD_d; + } + FPDataProcessing3Source(vd, vn, vm, va, op); +} + + +void Assembler::fmsub(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + const VRegister& va) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP)); + FPDataProcessing3SourceOp op; + if (vd.Is1H()) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFPHalf)); + op = FMSUB_h; + } else if (vd.Is1S()) { + op = FMSUB_s; + } else { + VIXL_ASSERT(vd.Is1D()); + op = FMSUB_d; + } + FPDataProcessing3Source(vd, vn, vm, va, op); +} + + +void Assembler::fnmadd(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + const VRegister& va) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP)); + FPDataProcessing3SourceOp op; + if (vd.Is1H()) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFPHalf)); + op = FNMADD_h; + } else if (vd.Is1S()) { + op = FNMADD_s; + } else { + VIXL_ASSERT(vd.Is1D()); + op = FNMADD_d; + } + FPDataProcessing3Source(vd, vn, vm, va, op); +} + + +void Assembler::fnmsub(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + const VRegister& va) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP)); + FPDataProcessing3SourceOp op; + if (vd.Is1H()) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFPHalf)); + op = FNMSUB_h; + } else if (vd.Is1S()) { + op = FNMSUB_s; + } else { + VIXL_ASSERT(vd.Is1D()); + op = FNMSUB_d; + } + FPDataProcessing3Source(vd, vn, vm, va, op); +} + + +void Assembler::fnmul(const VRegister& vd, + const VRegister& vn, + const VRegister& vm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP)); + VIXL_ASSERT(AreSameSizeAndType(vd, vn, vm)); + Instr op; + if (vd.Is1H()) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFPHalf)); + op = FNMUL_h; + } else if (vd.Is1S()) { + op = FNMUL_s; + } else { + VIXL_ASSERT(vd.Is1D()); + op = FNMUL_d; + } + Emit(FPType(vd) | op | Rm(vm) | Rn(vn) | Rd(vd)); +} + + +void Assembler::FPCompareMacro(const VRegister& vn, + double value, + FPTrapFlags trap) { + USE(value); + // Although the fcmp{e} instructions can strictly only take an immediate + // value of +0.0, we don't need to check for -0.0 because the sign of 0.0 + // doesn't affect the result of the comparison. + VIXL_ASSERT(value == 0.0); + VIXL_ASSERT(vn.Is1H() || vn.Is1S() || vn.Is1D()); + Instr op = (trap == EnableTrap) ? FCMPE_zero : FCMP_zero; + Emit(FPType(vn) | op | Rn(vn)); +} + + +void Assembler::FPCompareMacro(const VRegister& vn, + const VRegister& vm, + FPTrapFlags trap) { + VIXL_ASSERT(vn.Is1H() || vn.Is1S() || vn.Is1D()); + VIXL_ASSERT(vn.IsSameSizeAndType(vm)); + Instr op = (trap == EnableTrap) ? FCMPE : FCMP; + Emit(FPType(vn) | op | Rm(vm) | Rn(vn)); +} + + +void Assembler::fcmp(const VRegister& vn, const VRegister& vm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP)); + if (vn.Is1H()) VIXL_ASSERT(CPUHas(CPUFeatures::kFPHalf)); + FPCompareMacro(vn, vm, DisableTrap); +} + + +void Assembler::fcmpe(const VRegister& vn, const VRegister& vm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP)); + if (vn.Is1H()) VIXL_ASSERT(CPUHas(CPUFeatures::kFPHalf)); + FPCompareMacro(vn, vm, EnableTrap); +} + + +void Assembler::fcmp(const VRegister& vn, double value) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP)); + if (vn.Is1H()) VIXL_ASSERT(CPUHas(CPUFeatures::kFPHalf)); + FPCompareMacro(vn, value, DisableTrap); +} + + +void Assembler::fcmpe(const VRegister& vn, double value) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP)); + if (vn.Is1H()) VIXL_ASSERT(CPUHas(CPUFeatures::kFPHalf)); + FPCompareMacro(vn, value, EnableTrap); +} + + +void Assembler::FPCCompareMacro(const VRegister& vn, + const VRegister& vm, + StatusFlags nzcv, + Condition cond, + FPTrapFlags trap) { + VIXL_ASSERT(vn.Is1H() || vn.Is1S() || vn.Is1D()); + VIXL_ASSERT(vn.IsSameSizeAndType(vm)); + Instr op = (trap == EnableTrap) ? FCCMPE : FCCMP; + Emit(FPType(vn) | op | Rm(vm) | Cond(cond) | Rn(vn) | Nzcv(nzcv)); +} + +void Assembler::fccmp(const VRegister& vn, + const VRegister& vm, + StatusFlags nzcv, + Condition cond) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP)); + if (vn.Is1H()) VIXL_ASSERT(CPUHas(CPUFeatures::kFPHalf)); + FPCCompareMacro(vn, vm, nzcv, cond, DisableTrap); +} + + +void Assembler::fccmpe(const VRegister& vn, + const VRegister& vm, + StatusFlags nzcv, + Condition cond) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP)); + if (vn.Is1H()) VIXL_ASSERT(CPUHas(CPUFeatures::kFPHalf)); + FPCCompareMacro(vn, vm, nzcv, cond, EnableTrap); +} + + +void Assembler::fcsel(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + Condition cond) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP)); + if (vd.Is1H()) VIXL_ASSERT(CPUHas(CPUFeatures::kFPHalf)); + VIXL_ASSERT(vd.Is1H() || vd.Is1S() || vd.Is1D()); + VIXL_ASSERT(AreSameFormat(vd, vn, vm)); + Emit(FPType(vd) | FCSEL | Rm(vm) | Cond(cond) | Rn(vn) | Rd(vd)); +} + + +void Assembler::fcvt(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP)); + FPDataProcessing1SourceOp op; + // The half-precision variants belong to base FP, and do not require kFPHalf. + if (vd.Is1D()) { + VIXL_ASSERT(vn.Is1S() || vn.Is1H()); + op = vn.Is1S() ? FCVT_ds : FCVT_dh; + } else if (vd.Is1S()) { + VIXL_ASSERT(vn.Is1D() || vn.Is1H()); + op = vn.Is1D() ? FCVT_sd : FCVT_sh; + } else { + VIXL_ASSERT(vd.Is1H()); + VIXL_ASSERT(vn.Is1D() || vn.Is1S()); + op = vn.Is1D() ? FCVT_hd : FCVT_hs; + } + FPDataProcessing1Source(vd, vn, op); +} + + +void Assembler::fcvtl(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP, CPUFeatures::kNEON)); + VIXL_ASSERT((vd.Is4S() && vn.Is4H()) || (vd.Is2D() && vn.Is2S())); + // The half-precision variants belong to base FP, and do not require kFPHalf. + Instr format = vd.Is2D() ? (1 << NEONSize_offset) : 0; + Emit(format | NEON_FCVTL | Rn(vn) | Rd(vd)); +} + + +void Assembler::fcvtl2(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP, CPUFeatures::kNEON)); + VIXL_ASSERT((vd.Is4S() && vn.Is8H()) || (vd.Is2D() && vn.Is4S())); + // The half-precision variants belong to base FP, and do not require kFPHalf. + Instr format = vd.Is2D() ? (1 << NEONSize_offset) : 0; + Emit(NEON_Q | format | NEON_FCVTL | Rn(vn) | Rd(vd)); +} + + +void Assembler::fcvtn(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP, CPUFeatures::kNEON)); + VIXL_ASSERT((vn.Is4S() && vd.Is4H()) || (vn.Is2D() && vd.Is2S())); + // The half-precision variants belong to base FP, and do not require kFPHalf. + Instr format = vn.Is2D() ? (1 << NEONSize_offset) : 0; + Emit(format | NEON_FCVTN | Rn(vn) | Rd(vd)); +} + + +void Assembler::fcvtn2(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP, CPUFeatures::kNEON)); + VIXL_ASSERT((vn.Is4S() && vd.Is8H()) || (vn.Is2D() && vd.Is4S())); + // The half-precision variants belong to base FP, and do not require kFPHalf. + Instr format = vn.Is2D() ? (1 << NEONSize_offset) : 0; + Emit(NEON_Q | format | NEON_FCVTN | Rn(vn) | Rd(vd)); +} + + +void Assembler::fcvtxn(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP, CPUFeatures::kNEON)); + Instr format = 1 << NEONSize_offset; + if (vd.IsScalar()) { + VIXL_ASSERT(vd.Is1S() && vn.Is1D()); + Emit(format | NEON_FCVTXN_scalar | Rn(vn) | Rd(vd)); + } else { + VIXL_ASSERT(vd.Is2S() && vn.Is2D()); + Emit(format | NEON_FCVTXN | Rn(vn) | Rd(vd)); + } +} + + +void Assembler::fcvtxn2(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP, CPUFeatures::kNEON)); + VIXL_ASSERT(vd.Is4S() && vn.Is2D()); + Instr format = 1 << NEONSize_offset; + Emit(NEON_Q | format | NEON_FCVTXN | Rn(vn) | Rd(vd)); +} + +void Assembler::fjcvtzs(const Register& rd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP, CPUFeatures::kJSCVT)); + VIXL_ASSERT(rd.IsW() && vn.Is1D()); + Emit(FJCVTZS | Rn(vn) | Rd(rd)); +} + + +void Assembler::NEONFPConvertToInt(const Register& rd, + const VRegister& vn, + Instr op) { + Emit(SF(rd) | FPType(vn) | op | Rn(vn) | Rd(rd)); +} + + +void Assembler::NEONFPConvertToInt(const VRegister& vd, + const VRegister& vn, + Instr op) { + if (vn.IsScalar()) { + VIXL_ASSERT((vd.Is1S() && vn.Is1S()) || (vd.Is1D() && vn.Is1D())); + op |= NEON_Q | NEONScalar; + } + Emit(FPFormat(vn) | op | Rn(vn) | Rd(vd)); +} + + +void Assembler::NEONFP16ConvertToInt(const VRegister& vd, + const VRegister& vn, + Instr op) { + VIXL_ASSERT(AreSameFormat(vd, vn)); + VIXL_ASSERT(vn.IsLaneSizeH()); + if (vn.IsScalar()) { + op |= NEON_Q | NEONScalar; + } else if (vn.Is8H()) { + op |= NEON_Q; + } + Emit(op | Rn(vn) | Rd(vd)); +} + + +#define NEON_FP2REGMISC_FCVT_LIST(V) \ + V(fcvtnu, NEON_FCVTNU, FCVTNU) \ + V(fcvtns, NEON_FCVTNS, FCVTNS) \ + V(fcvtpu, NEON_FCVTPU, FCVTPU) \ + V(fcvtps, NEON_FCVTPS, FCVTPS) \ + V(fcvtmu, NEON_FCVTMU, FCVTMU) \ + V(fcvtms, NEON_FCVTMS, FCVTMS) \ + V(fcvtau, NEON_FCVTAU, FCVTAU) \ + V(fcvtas, NEON_FCVTAS, FCVTAS) + +#define VIXL_DEFINE_ASM_FUNC(FN, VEC_OP, SCA_OP) \ + void Assembler::FN(const Register& rd, const VRegister& vn) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kFP)); \ + if (vn.IsH()) VIXL_ASSERT(CPUHas(CPUFeatures::kFPHalf)); \ + NEONFPConvertToInt(rd, vn, SCA_OP); \ + } \ + void Assembler::FN(const VRegister& vd, const VRegister& vn) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kFP, CPUFeatures::kNEON)); \ + if (vd.IsLaneSizeH()) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kNEONHalf)); \ + NEONFP16ConvertToInt(vd, vn, VEC_OP##_H); \ + } else { \ + NEONFPConvertToInt(vd, vn, VEC_OP); \ + } \ + } +NEON_FP2REGMISC_FCVT_LIST(VIXL_DEFINE_ASM_FUNC) +#undef VIXL_DEFINE_ASM_FUNC + + +void Assembler::fcvtzs(const Register& rd, const VRegister& vn, int fbits) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP)); + if (vn.Is1H()) VIXL_ASSERT(CPUHas(CPUFeatures::kFPHalf)); + VIXL_ASSERT(vn.Is1H() || vn.Is1S() || vn.Is1D()); + VIXL_ASSERT((fbits >= 0) && (fbits <= rd.GetSizeInBits())); + if (fbits == 0) { + Emit(SF(rd) | FPType(vn) | FCVTZS | Rn(vn) | Rd(rd)); + } else { + Emit(SF(rd) | FPType(vn) | FCVTZS_fixed | FPScale(64 - fbits) | Rn(vn) | + Rd(rd)); + } +} + + +void Assembler::fcvtzs(const VRegister& vd, const VRegister& vn, int fbits) { + // This form is a NEON scalar FP instruction. + VIXL_ASSERT(CPUHas(CPUFeatures::kFP, CPUFeatures::kNEON)); + if (vn.IsLaneSizeH()) VIXL_ASSERT(CPUHas(CPUFeatures::kNEONHalf)); + VIXL_ASSERT(fbits >= 0); + if (fbits == 0) { + if (vd.IsLaneSizeH()) { + NEONFP2RegMiscFP16(vd, vn, NEON_FCVTZS_H); + } else { + NEONFP2RegMisc(vd, vn, NEON_FCVTZS); + } + } else { + VIXL_ASSERT(vd.Is1D() || vd.Is1S() || vd.Is2D() || vd.Is2S() || vd.Is4S() || + vd.Is1H() || vd.Is4H() || vd.Is8H()); + NEONShiftRightImmediate(vd, vn, fbits, NEON_FCVTZS_imm); + } +} + + +void Assembler::fcvtzu(const Register& rd, const VRegister& vn, int fbits) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP)); + if (vn.Is1H()) VIXL_ASSERT(CPUHas(CPUFeatures::kFPHalf)); + VIXL_ASSERT(vn.Is1H() || vn.Is1S() || vn.Is1D()); + VIXL_ASSERT((fbits >= 0) && (fbits <= rd.GetSizeInBits())); + if (fbits == 0) { + Emit(SF(rd) | FPType(vn) | FCVTZU | Rn(vn) | Rd(rd)); + } else { + Emit(SF(rd) | FPType(vn) | FCVTZU_fixed | FPScale(64 - fbits) | Rn(vn) | + Rd(rd)); + } +} + + +void Assembler::fcvtzu(const VRegister& vd, const VRegister& vn, int fbits) { + // This form is a NEON scalar FP instruction. + VIXL_ASSERT(CPUHas(CPUFeatures::kFP, CPUFeatures::kNEON)); + if (vn.IsLaneSizeH()) VIXL_ASSERT(CPUHas(CPUFeatures::kNEONHalf)); + VIXL_ASSERT(fbits >= 0); + if (fbits == 0) { + if (vd.IsLaneSizeH()) { + NEONFP2RegMiscFP16(vd, vn, NEON_FCVTZU_H); + } else { + NEONFP2RegMisc(vd, vn, NEON_FCVTZU); + } + } else { + VIXL_ASSERT(vd.Is1D() || vd.Is1S() || vd.Is2D() || vd.Is2S() || vd.Is4S() || + vd.Is1H() || vd.Is4H() || vd.Is8H()); + NEONShiftRightImmediate(vd, vn, fbits, NEON_FCVTZU_imm); + } +} + +void Assembler::ucvtf(const VRegister& vd, const VRegister& vn, int fbits) { + // This form is a NEON scalar FP instruction. + VIXL_ASSERT(CPUHas(CPUFeatures::kFP, CPUFeatures::kNEON)); + if (vn.IsLaneSizeH()) VIXL_ASSERT(CPUHas(CPUFeatures::kNEONHalf)); + VIXL_ASSERT(fbits >= 0); + if (fbits == 0) { + if (vd.IsLaneSizeH()) { + NEONFP2RegMiscFP16(vd, vn, NEON_UCVTF_H); + } else { + NEONFP2RegMisc(vd, vn, NEON_UCVTF); + } + } else { + VIXL_ASSERT(vd.Is1D() || vd.Is1S() || vd.Is2D() || vd.Is2S() || vd.Is4S() || + vd.Is1H() || vd.Is4H() || vd.Is8H()); + NEONShiftRightImmediate(vd, vn, fbits, NEON_UCVTF_imm); + } +} + +void Assembler::scvtf(const VRegister& vd, const VRegister& vn, int fbits) { + // This form is a NEON scalar FP instruction. + VIXL_ASSERT(CPUHas(CPUFeatures::kFP, CPUFeatures::kNEON)); + if (vn.IsLaneSizeH()) VIXL_ASSERT(CPUHas(CPUFeatures::kNEONHalf)); + VIXL_ASSERT(fbits >= 0); + if (fbits == 0) { + if (vd.IsLaneSizeH()) { + NEONFP2RegMiscFP16(vd, vn, NEON_SCVTF_H); + } else { + NEONFP2RegMisc(vd, vn, NEON_SCVTF); + } + } else { + VIXL_ASSERT(vd.Is1D() || vd.Is1S() || vd.Is2D() || vd.Is2S() || vd.Is4S() || + vd.Is1H() || vd.Is4H() || vd.Is8H()); + NEONShiftRightImmediate(vd, vn, fbits, NEON_SCVTF_imm); + } +} + + +void Assembler::scvtf(const VRegister& vd, const Register& rn, int fbits) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP)); + if (vd.Is1H()) VIXL_ASSERT(CPUHas(CPUFeatures::kFPHalf)); + VIXL_ASSERT(vd.Is1H() || vd.Is1S() || vd.Is1D()); + VIXL_ASSERT(fbits >= 0); + if (fbits == 0) { + Emit(SF(rn) | FPType(vd) | SCVTF | Rn(rn) | Rd(vd)); + } else { + Emit(SF(rn) | FPType(vd) | SCVTF_fixed | FPScale(64 - fbits) | Rn(rn) | + Rd(vd)); + } +} + + +void Assembler::ucvtf(const VRegister& vd, const Register& rn, int fbits) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP)); + if (vd.Is1H()) VIXL_ASSERT(CPUHas(CPUFeatures::kFPHalf)); + VIXL_ASSERT(vd.Is1H() || vd.Is1S() || vd.Is1D()); + VIXL_ASSERT(fbits >= 0); + if (fbits == 0) { + Emit(SF(rn) | FPType(vd) | UCVTF | Rn(rn) | Rd(vd)); + } else { + Emit(SF(rn) | FPType(vd) | UCVTF_fixed | FPScale(64 - fbits) | Rn(rn) | + Rd(vd)); + } +} + + +void Assembler::NEON3Same(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + NEON3SameOp vop) { + VIXL_ASSERT(AreSameFormat(vd, vn, vm)); + VIXL_ASSERT(vd.IsVector() || !vd.IsQ()); + + Instr format, op = vop; + if (vd.IsScalar()) { + op |= NEON_Q | NEONScalar; + format = SFormat(vd); + } else { + format = VFormat(vd); + } + + Emit(format | op | Rm(vm) | Rn(vn) | Rd(vd)); +} + + +void Assembler::NEONFP3Same(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + Instr op) { + VIXL_ASSERT(AreSameFormat(vd, vn, vm)); + Emit(FPFormat(vd) | op | Rm(vm) | Rn(vn) | Rd(vd)); +} + + +void Assembler::NEON3SameFP16(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + Instr op) { + VIXL_ASSERT(AreSameFormat(vd, vn, vm)); + VIXL_ASSERT(vd.GetLaneSizeInBytes() == kHRegSizeInBytes); + if (vd.Is8H()) op |= NEON_Q; + Emit(op | Rm(vm) | Rn(vn) | Rd(vd)); +} + + +// clang-format off +#define NEON_FP2REGMISC_LIST(V) \ + V(fabs, NEON_FABS, FABS, FABS_h) \ + V(fneg, NEON_FNEG, FNEG, FNEG_h) \ + V(fsqrt, NEON_FSQRT, FSQRT, FSQRT_h) \ + V(frintn, NEON_FRINTN, FRINTN, FRINTN_h) \ + V(frinta, NEON_FRINTA, FRINTA, FRINTA_h) \ + V(frintp, NEON_FRINTP, FRINTP, FRINTP_h) \ + V(frintm, NEON_FRINTM, FRINTM, FRINTM_h) \ + V(frintx, NEON_FRINTX, FRINTX, FRINTX_h) \ + V(frintz, NEON_FRINTZ, FRINTZ, FRINTZ_h) \ + V(frinti, NEON_FRINTI, FRINTI, FRINTI_h) \ + V(frsqrte, NEON_FRSQRTE, NEON_FRSQRTE_scalar, NEON_FRSQRTE_H_scalar) \ + V(frecpe, NEON_FRECPE, NEON_FRECPE_scalar, NEON_FRECPE_H_scalar) +// clang-format on + +#define VIXL_DEFINE_ASM_FUNC(FN, VEC_OP, SCA_OP, SCA_OP_H) \ + void Assembler::FN(const VRegister& vd, const VRegister& vn) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kFP)); \ + Instr op; \ + if (vd.IsScalar()) { \ + if (vd.Is1H()) { \ + if ((SCA_OP_H & NEONScalar2RegMiscFP16FMask) == \ + NEONScalar2RegMiscFP16Fixed) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON, CPUFeatures::kNEONHalf)); \ + } else { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kFPHalf)); \ + } \ + op = SCA_OP_H; \ + } else { \ + if ((SCA_OP & NEONScalar2RegMiscFMask) == NEONScalar2RegMiscFixed) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); \ + } \ + VIXL_ASSERT(vd.Is1S() || vd.Is1D()); \ + op = SCA_OP; \ + } \ + } else { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); \ + VIXL_ASSERT(vd.Is4H() || vd.Is8H() || vd.Is2S() || vd.Is2D() || \ + vd.Is4S()); \ + if (vd.IsLaneSizeH()) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kNEONHalf)); \ + op = VEC_OP##_H; \ + if (vd.Is8H()) { \ + op |= NEON_Q; \ + } \ + } else { \ + op = VEC_OP; \ + } \ + } \ + if (vd.IsLaneSizeH()) { \ + NEONFP2RegMiscFP16(vd, vn, op); \ + } else { \ + NEONFP2RegMisc(vd, vn, op); \ + } \ + } +NEON_FP2REGMISC_LIST(VIXL_DEFINE_ASM_FUNC) +#undef VIXL_DEFINE_ASM_FUNC + +// clang-format off +#define NEON_FP2REGMISC_V85_LIST(V) \ + V(frint32x, NEON_FRINT32X, FRINT32X) \ + V(frint32z, NEON_FRINT32Z, FRINT32Z) \ + V(frint64x, NEON_FRINT64X, FRINT64X) \ + V(frint64z, NEON_FRINT64Z, FRINT64Z) +// clang-format on + +#define VIXL_DEFINE_ASM_FUNC(FN, VEC_OP, SCA_OP) \ + void Assembler::FN(const VRegister& vd, const VRegister& vn) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kFP, CPUFeatures::kFrintToFixedSizedInt)); \ + Instr op; \ + if (vd.IsScalar()) { \ + VIXL_ASSERT(vd.Is1S() || vd.Is1D()); \ + op = SCA_OP; \ + } else { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); \ + VIXL_ASSERT(vd.Is2S() || vd.Is2D() || vd.Is4S()); \ + op = VEC_OP; \ + } \ + NEONFP2RegMisc(vd, vn, op); \ + } +NEON_FP2REGMISC_V85_LIST(VIXL_DEFINE_ASM_FUNC) +#undef VIXL_DEFINE_ASM_FUNC + +void Assembler::NEONFP2RegMiscFP16(const VRegister& vd, + const VRegister& vn, + Instr op) { + VIXL_ASSERT(AreSameFormat(vd, vn)); + Emit(op | Rn(vn) | Rd(vd)); +} + + +void Assembler::NEONFP2RegMisc(const VRegister& vd, + const VRegister& vn, + Instr op) { + VIXL_ASSERT(AreSameFormat(vd, vn)); + Emit(FPFormat(vd) | op | Rn(vn) | Rd(vd)); +} + + +void Assembler::NEON2RegMisc(const VRegister& vd, + const VRegister& vn, + NEON2RegMiscOp vop, + int value) { + VIXL_ASSERT(AreSameFormat(vd, vn)); + VIXL_ASSERT(value == 0); + USE(value); + + Instr format, op = vop; + if (vd.IsScalar()) { + op |= NEON_Q | NEONScalar; + format = SFormat(vd); + } else { + format = VFormat(vd); + } + + Emit(format | op | Rn(vn) | Rd(vd)); +} + + +void Assembler::cmeq(const VRegister& vd, const VRegister& vn, int value) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsVector() || vd.Is1D()); + NEON2RegMisc(vd, vn, NEON_CMEQ_zero, value); +} + + +void Assembler::cmge(const VRegister& vd, const VRegister& vn, int value) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsVector() || vd.Is1D()); + NEON2RegMisc(vd, vn, NEON_CMGE_zero, value); +} + + +void Assembler::cmgt(const VRegister& vd, const VRegister& vn, int value) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsVector() || vd.Is1D()); + NEON2RegMisc(vd, vn, NEON_CMGT_zero, value); +} + + +void Assembler::cmle(const VRegister& vd, const VRegister& vn, int value) { + VIXL_ASSERT(vd.IsVector() || vd.Is1D()); + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + NEON2RegMisc(vd, vn, NEON_CMLE_zero, value); +} + + +void Assembler::cmlt(const VRegister& vd, const VRegister& vn, int value) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsVector() || vd.Is1D()); + NEON2RegMisc(vd, vn, NEON_CMLT_zero, value); +} + + +void Assembler::shll(const VRegister& vd, const VRegister& vn, int shift) { + USE(shift); + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT((vd.Is8H() && vn.Is8B() && shift == 8) || + (vd.Is4S() && vn.Is4H() && shift == 16) || + (vd.Is2D() && vn.Is2S() && shift == 32)); + Emit(VFormat(vn) | NEON_SHLL | Rn(vn) | Rd(vd)); +} + + +void Assembler::shll2(const VRegister& vd, const VRegister& vn, int shift) { + USE(shift); + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT((vd.Is8H() && vn.Is16B() && shift == 8) || + (vd.Is4S() && vn.Is8H() && shift == 16) || + (vd.Is2D() && vn.Is4S() && shift == 32)); + Emit(VFormat(vn) | NEON_SHLL | Rn(vn) | Rd(vd)); +} + + +void Assembler::NEONFP2RegMisc(const VRegister& vd, + const VRegister& vn, + NEON2RegMiscOp vop, + double value) { + VIXL_ASSERT(AreSameFormat(vd, vn)); + VIXL_ASSERT(value == 0.0); + USE(value); + + Instr op = vop; + if (vd.IsScalar()) { + VIXL_ASSERT(vd.Is1S() || vd.Is1D()); + op |= NEON_Q | NEONScalar; + } else { + VIXL_ASSERT(vd.Is2S() || vd.Is2D() || vd.Is4S()); + } + + Emit(FPFormat(vd) | op | Rn(vn) | Rd(vd)); +} + + +void Assembler::NEONFP2RegMiscFP16(const VRegister& vd, + const VRegister& vn, + NEON2RegMiscFP16Op vop, + double value) { + VIXL_ASSERT(AreSameFormat(vd, vn)); + VIXL_ASSERT(value == 0.0); + USE(value); + + Instr op = vop; + if (vd.IsScalar()) { + VIXL_ASSERT(vd.Is1H()); + op |= NEON_Q | NEONScalar; + } else { + VIXL_ASSERT(vd.Is4H() || vd.Is8H()); + if (vd.Is8H()) { + op |= NEON_Q; + } + } + + Emit(op | Rn(vn) | Rd(vd)); +} + + +void Assembler::fcmeq(const VRegister& vd, const VRegister& vn, double value) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP, CPUFeatures::kNEON)); + if (vd.IsLaneSizeH()) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEONHalf)); + NEONFP2RegMiscFP16(vd, vn, NEON_FCMEQ_H_zero, value); + } else { + NEONFP2RegMisc(vd, vn, NEON_FCMEQ_zero, value); + } +} + + +void Assembler::fcmge(const VRegister& vd, const VRegister& vn, double value) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP, CPUFeatures::kNEON)); + if (vd.IsLaneSizeH()) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEONHalf)); + NEONFP2RegMiscFP16(vd, vn, NEON_FCMGE_H_zero, value); + } else { + NEONFP2RegMisc(vd, vn, NEON_FCMGE_zero, value); + } +} + + +void Assembler::fcmgt(const VRegister& vd, const VRegister& vn, double value) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP, CPUFeatures::kNEON)); + if (vd.IsLaneSizeH()) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEONHalf)); + NEONFP2RegMiscFP16(vd, vn, NEON_FCMGT_H_zero, value); + } else { + NEONFP2RegMisc(vd, vn, NEON_FCMGT_zero, value); + } +} + + +void Assembler::fcmle(const VRegister& vd, const VRegister& vn, double value) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP, CPUFeatures::kNEON)); + if (vd.IsLaneSizeH()) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEONHalf)); + NEONFP2RegMiscFP16(vd, vn, NEON_FCMLE_H_zero, value); + } else { + NEONFP2RegMisc(vd, vn, NEON_FCMLE_zero, value); + } +} + + +void Assembler::fcmlt(const VRegister& vd, const VRegister& vn, double value) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP, CPUFeatures::kNEON)); + if (vd.IsLaneSizeH()) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEONHalf)); + NEONFP2RegMiscFP16(vd, vn, NEON_FCMLT_H_zero, value); + } else { + NEONFP2RegMisc(vd, vn, NEON_FCMLT_zero, value); + } +} + + +void Assembler::frecpx(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP, CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsScalar()); + VIXL_ASSERT(AreSameFormat(vd, vn)); + Instr op; + if (vd.Is1H()) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEONHalf)); + op = NEON_FRECPX_H_scalar; + } else { + VIXL_ASSERT(vd.Is1S() || vd.Is1D()); + op = NEON_FRECPX_scalar; + } + Emit(FPFormat(vd) | op | Rn(vn) | Rd(vd)); +} + + +// clang-format off +#define NEON_3SAME_LIST(V) \ + V(add, NEON_ADD, vd.IsVector() || vd.Is1D()) \ + V(addp, NEON_ADDP, vd.IsVector() || vd.Is1D()) \ + V(sub, NEON_SUB, vd.IsVector() || vd.Is1D()) \ + V(cmeq, NEON_CMEQ, vd.IsVector() || vd.Is1D()) \ + V(cmge, NEON_CMGE, vd.IsVector() || vd.Is1D()) \ + V(cmgt, NEON_CMGT, vd.IsVector() || vd.Is1D()) \ + V(cmhi, NEON_CMHI, vd.IsVector() || vd.Is1D()) \ + V(cmhs, NEON_CMHS, vd.IsVector() || vd.Is1D()) \ + V(cmtst, NEON_CMTST, vd.IsVector() || vd.Is1D()) \ + V(sshl, NEON_SSHL, vd.IsVector() || vd.Is1D()) \ + V(ushl, NEON_USHL, vd.IsVector() || vd.Is1D()) \ + V(srshl, NEON_SRSHL, vd.IsVector() || vd.Is1D()) \ + V(urshl, NEON_URSHL, vd.IsVector() || vd.Is1D()) \ + V(sqdmulh, NEON_SQDMULH, vd.IsLaneSizeH() || vd.IsLaneSizeS()) \ + V(sqrdmulh, NEON_SQRDMULH, vd.IsLaneSizeH() || vd.IsLaneSizeS()) \ + V(shadd, NEON_SHADD, vd.IsVector() && !vd.IsLaneSizeD()) \ + V(uhadd, NEON_UHADD, vd.IsVector() && !vd.IsLaneSizeD()) \ + V(srhadd, NEON_SRHADD, vd.IsVector() && !vd.IsLaneSizeD()) \ + V(urhadd, NEON_URHADD, vd.IsVector() && !vd.IsLaneSizeD()) \ + V(shsub, NEON_SHSUB, vd.IsVector() && !vd.IsLaneSizeD()) \ + V(uhsub, NEON_UHSUB, vd.IsVector() && !vd.IsLaneSizeD()) \ + V(smax, NEON_SMAX, vd.IsVector() && !vd.IsLaneSizeD()) \ + V(smaxp, NEON_SMAXP, vd.IsVector() && !vd.IsLaneSizeD()) \ + V(smin, NEON_SMIN, vd.IsVector() && !vd.IsLaneSizeD()) \ + V(sminp, NEON_SMINP, vd.IsVector() && !vd.IsLaneSizeD()) \ + V(umax, NEON_UMAX, vd.IsVector() && !vd.IsLaneSizeD()) \ + V(umaxp, NEON_UMAXP, vd.IsVector() && !vd.IsLaneSizeD()) \ + V(umin, NEON_UMIN, vd.IsVector() && !vd.IsLaneSizeD()) \ + V(uminp, NEON_UMINP, vd.IsVector() && !vd.IsLaneSizeD()) \ + V(saba, NEON_SABA, vd.IsVector() && !vd.IsLaneSizeD()) \ + V(sabd, NEON_SABD, vd.IsVector() && !vd.IsLaneSizeD()) \ + V(uaba, NEON_UABA, vd.IsVector() && !vd.IsLaneSizeD()) \ + V(uabd, NEON_UABD, vd.IsVector() && !vd.IsLaneSizeD()) \ + V(mla, NEON_MLA, vd.IsVector() && !vd.IsLaneSizeD()) \ + V(mls, NEON_MLS, vd.IsVector() && !vd.IsLaneSizeD()) \ + V(mul, NEON_MUL, vd.IsVector() && !vd.IsLaneSizeD()) \ + V(and_, NEON_AND, vd.Is8B() || vd.Is16B()) \ + V(orr, NEON_ORR, vd.Is8B() || vd.Is16B()) \ + V(orn, NEON_ORN, vd.Is8B() || vd.Is16B()) \ + V(eor, NEON_EOR, vd.Is8B() || vd.Is16B()) \ + V(bic, NEON_BIC, vd.Is8B() || vd.Is16B()) \ + V(bit, NEON_BIT, vd.Is8B() || vd.Is16B()) \ + V(bif, NEON_BIF, vd.Is8B() || vd.Is16B()) \ + V(bsl, NEON_BSL, vd.Is8B() || vd.Is16B()) \ + V(pmul, NEON_PMUL, vd.Is8B() || vd.Is16B()) \ + V(uqadd, NEON_UQADD, true) \ + V(sqadd, NEON_SQADD, true) \ + V(uqsub, NEON_UQSUB, true) \ + V(sqsub, NEON_SQSUB, true) \ + V(sqshl, NEON_SQSHL, true) \ + V(uqshl, NEON_UQSHL, true) \ + V(sqrshl, NEON_SQRSHL, true) \ + V(uqrshl, NEON_UQRSHL, true) +// clang-format on + +#define VIXL_DEFINE_ASM_FUNC(FN, OP, AS) \ + void Assembler::FN(const VRegister& vd, \ + const VRegister& vn, \ + const VRegister& vm) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); \ + VIXL_ASSERT(AS); \ + NEON3Same(vd, vn, vm, OP); \ + } +NEON_3SAME_LIST(VIXL_DEFINE_ASM_FUNC) +#undef VIXL_DEFINE_ASM_FUNC + +// clang-format off +#define NEON_FP3SAME_OP_LIST(V) \ + V(fmulx, NEON_FMULX, NEON_FMULX_scalar, NEON_FMULX_H_scalar) \ + V(frecps, NEON_FRECPS, NEON_FRECPS_scalar, NEON_FRECPS_H_scalar) \ + V(frsqrts, NEON_FRSQRTS, NEON_FRSQRTS_scalar, NEON_FRSQRTS_H_scalar) \ + V(fabd, NEON_FABD, NEON_FABD_scalar, NEON_FABD_H_scalar) \ + V(fmla, NEON_FMLA, 0, 0) \ + V(fmls, NEON_FMLS, 0, 0) \ + V(facge, NEON_FACGE, NEON_FACGE_scalar, NEON_FACGE_H_scalar) \ + V(facgt, NEON_FACGT, NEON_FACGT_scalar, NEON_FACGT_H_scalar) \ + V(fcmeq, NEON_FCMEQ, NEON_FCMEQ_scalar, NEON_FCMEQ_H_scalar) \ + V(fcmge, NEON_FCMGE, NEON_FCMGE_scalar, NEON_FCMGE_H_scalar) \ + V(fcmgt, NEON_FCMGT, NEON_FCMGT_scalar, NEON_FCMGT_H_scalar) \ + V(faddp, NEON_FADDP, 0, 0) \ + V(fmaxp, NEON_FMAXP, 0, 0) \ + V(fminp, NEON_FMINP, 0, 0) \ + V(fmaxnmp, NEON_FMAXNMP, 0, 0) \ + V(fadd, NEON_FADD, FADD, 0) \ + V(fsub, NEON_FSUB, FSUB, 0) \ + V(fmul, NEON_FMUL, FMUL, 0) \ + V(fdiv, NEON_FDIV, FDIV, 0) \ + V(fmax, NEON_FMAX, FMAX, 0) \ + V(fmin, NEON_FMIN, FMIN, 0) \ + V(fmaxnm, NEON_FMAXNM, FMAXNM, 0) \ + V(fminnm, NEON_FMINNM, FMINNM, 0) \ + V(fminnmp, NEON_FMINNMP, 0, 0) +// clang-format on + +// TODO: This macro is complicated because it classifies the instructions in the +// macro list above, and treats each case differently. It could be somewhat +// simpler if we were to split the macro, at the cost of some duplication. +#define VIXL_DEFINE_ASM_FUNC(FN, VEC_OP, SCA_OP, SCA_OP_H) \ + void Assembler::FN(const VRegister& vd, \ + const VRegister& vn, \ + const VRegister& vm) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kFP)); \ + Instr op; \ + bool is_fp16 = false; \ + if ((SCA_OP != 0) && vd.IsScalar()) { \ + if ((SCA_OP_H != 0) && vd.Is1H()) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON, CPUFeatures::kNEONHalf)); \ + is_fp16 = true; \ + op = SCA_OP_H; \ + } else { \ + VIXL_ASSERT(vd.Is1H() || vd.Is1S() || vd.Is1D()); \ + if ((SCA_OP & NEONScalar3SameFMask) == NEONScalar3SameFixed) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); \ + if (vd.Is1H()) VIXL_ASSERT(CPUHas(CPUFeatures::kNEONHalf)); \ + } else if (vd.Is1H()) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kFPHalf)); \ + } \ + op = SCA_OP; \ + } \ + } else { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); \ + VIXL_ASSERT(vd.IsVector()); \ + if (vd.Is4H() || vd.Is8H()) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kNEONHalf)); \ + is_fp16 = true; \ + op = VEC_OP##_H; \ + } else { \ + VIXL_ASSERT(vd.Is2S() || vd.Is2D() || vd.Is4S()); \ + op = VEC_OP; \ + } \ + } \ + if (is_fp16) { \ + NEON3SameFP16(vd, vn, vm, op); \ + } else { \ + NEONFP3Same(vd, vn, vm, op); \ + } \ + } +NEON_FP3SAME_OP_LIST(VIXL_DEFINE_ASM_FUNC) +#undef VIXL_DEFINE_ASM_FUNC + + +// clang-format off +#define NEON_FHM_LIST(V) \ + V(fmlal, NEON_FMLAL) \ + V(fmlal2, NEON_FMLAL2) \ + V(fmlsl, NEON_FMLSL) \ + V(fmlsl2, NEON_FMLSL2) +// clang-format on + +#define VIXL_DEFINE_ASM_FUNC(FN, VEC_OP) \ + void Assembler::FN(const VRegister& vd, \ + const VRegister& vn, \ + const VRegister& vm) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON, \ + CPUFeatures::kFP, \ + CPUFeatures::kNEONHalf, \ + CPUFeatures::kFHM)); \ + VIXL_ASSERT((vd.Is2S() && vn.Is2H() && vm.Is2H()) || \ + (vd.Is4S() && vn.Is4H() && vm.Is4H())); \ + Emit(FPFormat(vd) | VEC_OP | Rm(vm) | Rn(vn) | Rd(vd)); \ + } +NEON_FHM_LIST(VIXL_DEFINE_ASM_FUNC) +#undef VIXL_DEFINE_ASM_FUNC + + +void Assembler::addp(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT((vd.Is1D() && vn.Is2D())); + Emit(SFormat(vd) | NEON_ADDP_scalar | Rn(vn) | Rd(vd)); +} + + +void Assembler::sqrdmlah(const VRegister& vd, + const VRegister& vn, + const VRegister& vm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON, CPUFeatures::kRDM)); + VIXL_ASSERT(AreSameFormat(vd, vn, vm)); + VIXL_ASSERT(vd.IsVector() || !vd.IsQ()); + + Instr format, op = NEON_SQRDMLAH; + if (vd.IsScalar()) { + op |= NEON_Q | NEONScalar; + format = SFormat(vd); + } else { + format = VFormat(vd); + } + + Emit(format | op | Rm(vm) | Rn(vn) | Rd(vd)); +} + + +void Assembler::sqrdmlsh(const VRegister& vd, + const VRegister& vn, + const VRegister& vm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON, CPUFeatures::kRDM)); + VIXL_ASSERT(AreSameFormat(vd, vn, vm)); + VIXL_ASSERT(vd.IsVector() || !vd.IsQ()); + + Instr format, op = NEON_SQRDMLSH; + if (vd.IsScalar()) { + op |= NEON_Q | NEONScalar; + format = SFormat(vd); + } else { + format = VFormat(vd); + } + + Emit(format | op | Rm(vm) | Rn(vn) | Rd(vd)); +} + + +void Assembler::sdot(const VRegister& vd, + const VRegister& vn, + const VRegister& vm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON, CPUFeatures::kDotProduct)); + VIXL_ASSERT(AreSameFormat(vn, vm)); + VIXL_ASSERT((vd.Is2S() && vn.Is8B()) || (vd.Is4S() && vn.Is16B())); + + Emit(VFormat(vd) | NEON_SDOT | Rm(vm) | Rn(vn) | Rd(vd)); +} + + +void Assembler::udot(const VRegister& vd, + const VRegister& vn, + const VRegister& vm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON, CPUFeatures::kDotProduct)); + VIXL_ASSERT(AreSameFormat(vn, vm)); + VIXL_ASSERT((vd.Is2S() && vn.Is8B()) || (vd.Is4S() && vn.Is16B())); + + Emit(VFormat(vd) | NEON_UDOT | Rm(vm) | Rn(vn) | Rd(vd)); +} + + +void Assembler::faddp(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP, CPUFeatures::kNEON)); + VIXL_ASSERT((vd.Is1S() && vn.Is2S()) || (vd.Is1D() && vn.Is2D()) || + (vd.Is1H() && vn.Is2H())); + if (vd.Is1H()) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEONHalf)); + Emit(NEON_FADDP_h_scalar | Rn(vn) | Rd(vd)); + } else { + Emit(FPFormat(vd) | NEON_FADDP_scalar | Rn(vn) | Rd(vd)); + } +} + + +void Assembler::fmaxp(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP, CPUFeatures::kNEON)); + VIXL_ASSERT((vd.Is1S() && vn.Is2S()) || (vd.Is1D() && vn.Is2D()) || + (vd.Is1H() && vn.Is2H())); + if (vd.Is1H()) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEONHalf)); + Emit(NEON_FMAXP_h_scalar | Rn(vn) | Rd(vd)); + } else { + Emit(FPFormat(vd) | NEON_FMAXP_scalar | Rn(vn) | Rd(vd)); + } +} + + +void Assembler::fminp(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP, CPUFeatures::kNEON)); + VIXL_ASSERT((vd.Is1S() && vn.Is2S()) || (vd.Is1D() && vn.Is2D()) || + (vd.Is1H() && vn.Is2H())); + if (vd.Is1H()) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEONHalf)); + Emit(NEON_FMINP_h_scalar | Rn(vn) | Rd(vd)); + } else { + Emit(FPFormat(vd) | NEON_FMINP_scalar | Rn(vn) | Rd(vd)); + } +} + + +void Assembler::fmaxnmp(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP, CPUFeatures::kNEON)); + VIXL_ASSERT((vd.Is1S() && vn.Is2S()) || (vd.Is1D() && vn.Is2D()) || + (vd.Is1H() && vn.Is2H())); + if (vd.Is1H()) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEONHalf)); + Emit(NEON_FMAXNMP_h_scalar | Rn(vn) | Rd(vd)); + } else { + Emit(FPFormat(vd) | NEON_FMAXNMP_scalar | Rn(vn) | Rd(vd)); + } +} + + +void Assembler::fminnmp(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP, CPUFeatures::kNEON)); + VIXL_ASSERT((vd.Is1S() && vn.Is2S()) || (vd.Is1D() && vn.Is2D()) || + (vd.Is1H() && vn.Is2H())); + if (vd.Is1H()) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEONHalf)); + Emit(NEON_FMINNMP_h_scalar | Rn(vn) | Rd(vd)); + } else { + Emit(FPFormat(vd) | NEON_FMINNMP_scalar | Rn(vn) | Rd(vd)); + } +} + + +// v8.3 complex numbers - floating-point complex multiply accumulate. +void Assembler::fcmla(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index, + int rot) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP, CPUFeatures::kNEON, CPUFeatures::kFcma)); + VIXL_ASSERT(vd.IsVector() && AreSameFormat(vd, vn)); + VIXL_ASSERT((vm.IsH() && (vd.Is8H() || vd.Is4H())) || + (vm.IsS() && vd.Is4S())); + if (vd.IsLaneSizeH()) VIXL_ASSERT(CPUHas(CPUFeatures::kNEONHalf)); + int index_num_bits = vd.Is4S() ? 1 : 2; + Emit(VFormat(vd) | Rm(vm) | NEON_FCMLA_byelement | + ImmNEONHLM(vm_index, index_num_bits) | ImmRotFcmlaSca(rot) | Rn(vn) | + Rd(vd)); +} + + +void Assembler::fcmla(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int rot) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP, CPUFeatures::kNEON, CPUFeatures::kFcma)); + VIXL_ASSERT(AreSameFormat(vd, vn, vm)); + VIXL_ASSERT(vd.IsVector() && !vd.IsLaneSizeB()); + if (vd.IsLaneSizeH()) VIXL_ASSERT(CPUHas(CPUFeatures::kNEONHalf)); + Emit(VFormat(vd) | Rm(vm) | NEON_FCMLA | ImmRotFcmlaVec(rot) | Rn(vn) | + Rd(vd)); +} + + +// v8.3 complex numbers - floating-point complex add. +void Assembler::fcadd(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int rot) { + VIXL_ASSERT(CPUHas(CPUFeatures::kFP, CPUFeatures::kNEON, CPUFeatures::kFcma)); + VIXL_ASSERT(AreSameFormat(vd, vn, vm)); + VIXL_ASSERT(vd.IsVector() && !vd.IsLaneSizeB()); + if (vd.IsLaneSizeH()) VIXL_ASSERT(CPUHas(CPUFeatures::kNEONHalf)); + Emit(VFormat(vd) | Rm(vm) | NEON_FCADD | ImmRotFcadd(rot) | Rn(vn) | Rd(vd)); +} + + +void Assembler::orr(const VRegister& vd, const int imm8, const int left_shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + NEONModifiedImmShiftLsl(vd, imm8, left_shift, NEONModifiedImmediate_ORR); +} + + +void Assembler::mov(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vd, vn)); + if (vd.IsD()) { + orr(vd.V8B(), vn.V8B(), vn.V8B()); + } else { + VIXL_ASSERT(vd.IsQ()); + orr(vd.V16B(), vn.V16B(), vn.V16B()); + } +} + + +void Assembler::bic(const VRegister& vd, const int imm8, const int left_shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + NEONModifiedImmShiftLsl(vd, imm8, left_shift, NEONModifiedImmediate_BIC); +} + + +void Assembler::movi(const VRegister& vd, + const uint64_t imm, + Shift shift, + const int shift_amount) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT((shift == LSL) || (shift == MSL)); + if (vd.Is2D() || vd.Is1D()) { + VIXL_ASSERT(shift_amount == 0); + int imm8 = 0; + for (int i = 0; i < 8; ++i) { + int byte = (imm >> (i * 8)) & 0xff; + VIXL_ASSERT((byte == 0) || (byte == 0xff)); + if (byte == 0xff) { + imm8 |= (1 << i); + } + } + int q = vd.Is2D() ? NEON_Q : 0; + Emit(q | NEONModImmOp(1) | NEONModifiedImmediate_MOVI | + ImmNEONabcdefgh(imm8) | NEONCmode(0xe) | Rd(vd)); + } else if (shift == LSL) { + VIXL_ASSERT(IsUint8(imm)); + NEONModifiedImmShiftLsl(vd, + static_cast(imm), + shift_amount, + NEONModifiedImmediate_MOVI); + } else { + VIXL_ASSERT(IsUint8(imm)); + NEONModifiedImmShiftMsl(vd, + static_cast(imm), + shift_amount, + NEONModifiedImmediate_MOVI); + } +} + + +void Assembler::mvn(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vd, vn)); + if (vd.IsD()) { + not_(vd.V8B(), vn.V8B()); + } else { + VIXL_ASSERT(vd.IsQ()); + not_(vd.V16B(), vn.V16B()); + } +} + + +void Assembler::mvni(const VRegister& vd, + const int imm8, + Shift shift, + const int shift_amount) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT((shift == LSL) || (shift == MSL)); + if (shift == LSL) { + NEONModifiedImmShiftLsl(vd, imm8, shift_amount, NEONModifiedImmediate_MVNI); + } else { + NEONModifiedImmShiftMsl(vd, imm8, shift_amount, NEONModifiedImmediate_MVNI); + } +} + + +void Assembler::NEONFPByElement(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index, + NEONByIndexedElementOp vop, + NEONByIndexedElementOp vop_half) { + VIXL_ASSERT(AreSameFormat(vd, vn)); + VIXL_ASSERT((vd.Is2S() && vm.Is1S()) || (vd.Is4S() && vm.Is1S()) || + (vd.Is1S() && vm.Is1S()) || (vd.Is2D() && vm.Is1D()) || + (vd.Is1D() && vm.Is1D()) || (vd.Is4H() && vm.Is1H()) || + (vd.Is8H() && vm.Is1H()) || (vd.Is1H() && vm.Is1H())); + VIXL_ASSERT((vm.Is1S() && (vm_index < 4)) || (vm.Is1D() && (vm_index < 2)) || + (vm.Is1H() && (vm.GetCode() < 16) && (vm_index < 8))); + + Instr op = vop; + int index_num_bits; + if (vm.Is1D()) { + index_num_bits = 1; + } else if (vm.Is1S()) { + index_num_bits = 2; + } else { + index_num_bits = 3; + op = vop_half; + } + + if (vd.IsScalar()) { + op |= NEON_Q | NEONScalar; + } + + if (!vm.Is1H()) { + op |= FPFormat(vd); + } else if (vd.Is8H()) { + op |= NEON_Q; + } + + Emit(op | ImmNEONHLM(vm_index, index_num_bits) | Rm(vm) | Rn(vn) | Rd(vd)); +} + + +void Assembler::NEONByElement(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index, + NEONByIndexedElementOp vop) { + VIXL_ASSERT(AreSameFormat(vd, vn)); + VIXL_ASSERT((vd.Is4H() && vm.Is1H()) || (vd.Is8H() && vm.Is1H()) || + (vd.Is1H() && vm.Is1H()) || (vd.Is2S() && vm.Is1S()) || + (vd.Is4S() && vm.Is1S()) || (vd.Is1S() && vm.Is1S())); + VIXL_ASSERT((vm.Is1H() && (vm.GetCode() < 16) && (vm_index < 8)) || + (vm.Is1S() && (vm_index < 4))); + + Instr format, op = vop; + int index_num_bits = vm.Is1H() ? 3 : 2; + if (vd.IsScalar()) { + op |= NEONScalar | NEON_Q; + format = SFormat(vn); + } else { + format = VFormat(vn); + } + Emit(format | op | ImmNEONHLM(vm_index, index_num_bits) | Rm(vm) | Rn(vn) | + Rd(vd)); +} + + +void Assembler::NEONByElementL(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index, + NEONByIndexedElementOp vop) { + VIXL_ASSERT((vd.Is4S() && vn.Is4H() && vm.Is1H()) || + (vd.Is4S() && vn.Is8H() && vm.Is1H()) || + (vd.Is1S() && vn.Is1H() && vm.Is1H()) || + (vd.Is2D() && vn.Is2S() && vm.Is1S()) || + (vd.Is2D() && vn.Is4S() && vm.Is1S()) || + (vd.Is1D() && vn.Is1S() && vm.Is1S())); + + VIXL_ASSERT((vm.Is1H() && (vm.GetCode() < 16) && (vm_index < 8)) || + (vm.Is1S() && (vm_index < 4))); + + Instr format, op = vop; + int index_num_bits = vm.Is1H() ? 3 : 2; + if (vd.IsScalar()) { + op |= NEONScalar | NEON_Q; + format = SFormat(vn); + } else { + format = VFormat(vn); + } + Emit(format | op | ImmNEONHLM(vm_index, index_num_bits) | Rm(vm) | Rn(vn) | + Rd(vd)); +} + + +void Assembler::sdot(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON, CPUFeatures::kDotProduct)); + VIXL_ASSERT((vd.Is2S() && vn.Is8B() && vm.Is1S4B()) || + (vd.Is4S() && vn.Is16B() && vm.Is1S4B())); + + int index_num_bits = 2; + Emit(VFormat(vd) | NEON_SDOT_byelement | + ImmNEONHLM(vm_index, index_num_bits) | Rm(vm) | Rn(vn) | Rd(vd)); +} + + +void Assembler::udot(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON, CPUFeatures::kDotProduct)); + VIXL_ASSERT((vd.Is2S() && vn.Is8B() && vm.Is1S4B()) || + (vd.Is4S() && vn.Is16B() && vm.Is1S4B())); + + int index_num_bits = 2; + Emit(VFormat(vd) | NEON_UDOT_byelement | + ImmNEONHLM(vm_index, index_num_bits) | Rm(vm) | Rn(vn) | Rd(vd)); +} + + +// clang-format off +#define NEON_BYELEMENT_LIST(V) \ + V(mul, NEON_MUL_byelement, vn.IsVector()) \ + V(mla, NEON_MLA_byelement, vn.IsVector()) \ + V(mls, NEON_MLS_byelement, vn.IsVector()) \ + V(sqdmulh, NEON_SQDMULH_byelement, true) \ + V(sqrdmulh, NEON_SQRDMULH_byelement, true) \ +// clang-format on + +#define VIXL_DEFINE_ASM_FUNC(FN, OP, AS) \ + void Assembler::FN(const VRegister& vd, \ + const VRegister& vn, \ + const VRegister& vm, \ + int vm_index) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); \ + VIXL_ASSERT(AS); \ + NEONByElement(vd, vn, vm, vm_index, OP); \ + } +NEON_BYELEMENT_LIST(VIXL_DEFINE_ASM_FUNC) +#undef VIXL_DEFINE_ASM_FUNC + + +// clang-format off +#define NEON_BYELEMENT_RDM_LIST(V) \ + V(sqrdmlah, NEON_SQRDMLAH_byelement) \ + V(sqrdmlsh, NEON_SQRDMLSH_byelement) +// clang-format on + +#define VIXL_DEFINE_ASM_FUNC(FN, OP) \ + void Assembler::FN(const VRegister& vd, \ + const VRegister& vn, \ + const VRegister& vm, \ + int vm_index) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON, CPUFeatures::kRDM)); \ + NEONByElement(vd, vn, vm, vm_index, OP); \ + } +NEON_BYELEMENT_RDM_LIST(VIXL_DEFINE_ASM_FUNC) +#undef VIXL_DEFINE_ASM_FUNC + + +// clang-format off +#define NEON_FPBYELEMENT_LIST(V) \ + V(fmul, NEON_FMUL_byelement, NEON_FMUL_H_byelement) \ + V(fmla, NEON_FMLA_byelement, NEON_FMLA_H_byelement) \ + V(fmls, NEON_FMLS_byelement, NEON_FMLS_H_byelement) \ + V(fmulx, NEON_FMULX_byelement, NEON_FMULX_H_byelement) +// clang-format on + +#define VIXL_DEFINE_ASM_FUNC(FN, OP, OP_H) \ + void Assembler::FN(const VRegister& vd, \ + const VRegister& vn, \ + const VRegister& vm, \ + int vm_index) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kFP, CPUFeatures::kNEON)); \ + if (vd.IsLaneSizeH()) VIXL_ASSERT(CPUHas(CPUFeatures::kNEONHalf)); \ + NEONFPByElement(vd, vn, vm, vm_index, OP, OP_H); \ + } +NEON_FPBYELEMENT_LIST(VIXL_DEFINE_ASM_FUNC) +#undef VIXL_DEFINE_ASM_FUNC + + +// clang-format off +#define NEON_BYELEMENT_LONG_LIST(V) \ + V(sqdmull, NEON_SQDMULL_byelement, vn.IsScalar() || vn.IsD()) \ + V(sqdmull2, NEON_SQDMULL_byelement, vn.IsVector() && vn.IsQ()) \ + V(sqdmlal, NEON_SQDMLAL_byelement, vn.IsScalar() || vn.IsD()) \ + V(sqdmlal2, NEON_SQDMLAL_byelement, vn.IsVector() && vn.IsQ()) \ + V(sqdmlsl, NEON_SQDMLSL_byelement, vn.IsScalar() || vn.IsD()) \ + V(sqdmlsl2, NEON_SQDMLSL_byelement, vn.IsVector() && vn.IsQ()) \ + V(smull, NEON_SMULL_byelement, vn.IsVector() && vn.IsD()) \ + V(smull2, NEON_SMULL_byelement, vn.IsVector() && vn.IsQ()) \ + V(umull, NEON_UMULL_byelement, vn.IsVector() && vn.IsD()) \ + V(umull2, NEON_UMULL_byelement, vn.IsVector() && vn.IsQ()) \ + V(smlal, NEON_SMLAL_byelement, vn.IsVector() && vn.IsD()) \ + V(smlal2, NEON_SMLAL_byelement, vn.IsVector() && vn.IsQ()) \ + V(umlal, NEON_UMLAL_byelement, vn.IsVector() && vn.IsD()) \ + V(umlal2, NEON_UMLAL_byelement, vn.IsVector() && vn.IsQ()) \ + V(smlsl, NEON_SMLSL_byelement, vn.IsVector() && vn.IsD()) \ + V(smlsl2, NEON_SMLSL_byelement, vn.IsVector() && vn.IsQ()) \ + V(umlsl, NEON_UMLSL_byelement, vn.IsVector() && vn.IsD()) \ + V(umlsl2, NEON_UMLSL_byelement, vn.IsVector() && vn.IsQ()) +// clang-format on + + +#define VIXL_DEFINE_ASM_FUNC(FN, OP, AS) \ + void Assembler::FN(const VRegister& vd, \ + const VRegister& vn, \ + const VRegister& vm, \ + int vm_index) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); \ + VIXL_ASSERT(AS); \ + NEONByElementL(vd, vn, vm, vm_index, OP); \ + } +NEON_BYELEMENT_LONG_LIST(VIXL_DEFINE_ASM_FUNC) +#undef VIXL_DEFINE_ASM_FUNC + + +// clang-format off +#define NEON_BYELEMENT_FHM_LIST(V) \ + V(fmlal, NEON_FMLAL_H_byelement) \ + V(fmlal2, NEON_FMLAL2_H_byelement) \ + V(fmlsl, NEON_FMLSL_H_byelement) \ + V(fmlsl2, NEON_FMLSL2_H_byelement) +// clang-format on + + +#define VIXL_DEFINE_ASM_FUNC(FN, OP) \ + void Assembler::FN(const VRegister& vd, \ + const VRegister& vn, \ + const VRegister& vm, \ + int vm_index) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON, \ + CPUFeatures::kFP, \ + CPUFeatures::kNEONHalf, \ + CPUFeatures::kFHM)); \ + VIXL_ASSERT((vd.Is2S() && vn.Is2H()) || (vd.Is4S() && vn.Is4H())); \ + VIXL_ASSERT(vm.IsH()); \ + VIXL_ASSERT((vm_index >= 0) && (vm_index < 8)); \ + /* Vm itself can only be in the bottom 16 registers. */ \ + VIXL_ASSERT(vm.GetCode() < 16); \ + Emit(FPFormat(vd) | OP | Rd(vd) | Rn(vn) | Rm(vm) | \ + ImmNEONHLM(vm_index, 3)); \ + } +NEON_BYELEMENT_FHM_LIST(VIXL_DEFINE_ASM_FUNC) +#undef VIXL_DEFINE_ASM_FUNC + +void Assembler::suqadd(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + NEON2RegMisc(vd, vn, NEON_SUQADD); +} + + +void Assembler::usqadd(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + NEON2RegMisc(vd, vn, NEON_USQADD); +} + + +void Assembler::abs(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsVector() || vd.Is1D()); + NEON2RegMisc(vd, vn, NEON_ABS); +} + + +void Assembler::sqabs(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + NEON2RegMisc(vd, vn, NEON_SQABS); +} + + +void Assembler::neg(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsVector() || vd.Is1D()); + NEON2RegMisc(vd, vn, NEON_NEG); +} + + +void Assembler::sqneg(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + NEON2RegMisc(vd, vn, NEON_SQNEG); +} + + +void Assembler::NEONXtn(const VRegister& vd, + const VRegister& vn, + NEON2RegMiscOp vop) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + Instr format, op = vop; + if (vd.IsScalar()) { + VIXL_ASSERT((vd.Is1B() && vn.Is1H()) || (vd.Is1H() && vn.Is1S()) || + (vd.Is1S() && vn.Is1D())); + op |= NEON_Q | NEONScalar; + format = SFormat(vd); + } else { + VIXL_ASSERT((vd.Is8B() && vn.Is8H()) || (vd.Is4H() && vn.Is4S()) || + (vd.Is2S() && vn.Is2D()) || (vd.Is16B() && vn.Is8H()) || + (vd.Is8H() && vn.Is4S()) || (vd.Is4S() && vn.Is2D())); + format = VFormat(vd); + } + Emit(format | op | Rn(vn) | Rd(vd)); +} + + +void Assembler::xtn(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsVector() && vd.IsD()); + NEONXtn(vd, vn, NEON_XTN); +} + + +void Assembler::xtn2(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsVector() && vd.IsQ()); + NEONXtn(vd, vn, NEON_XTN); +} + + +void Assembler::sqxtn(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsScalar() || vd.IsD()); + NEONXtn(vd, vn, NEON_SQXTN); +} + + +void Assembler::sqxtn2(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsVector() && vd.IsQ()); + NEONXtn(vd, vn, NEON_SQXTN); +} + + +void Assembler::sqxtun(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsScalar() || vd.IsD()); + NEONXtn(vd, vn, NEON_SQXTUN); +} + + +void Assembler::sqxtun2(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsVector() && vd.IsQ()); + NEONXtn(vd, vn, NEON_SQXTUN); +} + + +void Assembler::uqxtn(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsScalar() || vd.IsD()); + NEONXtn(vd, vn, NEON_UQXTN); +} + + +void Assembler::uqxtn2(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsVector() && vd.IsQ()); + NEONXtn(vd, vn, NEON_UQXTN); +} + + +// NEON NOT and RBIT are distinguised by bit 22, the bottom bit of "size". +void Assembler::not_(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vd, vn)); + VIXL_ASSERT(vd.Is8B() || vd.Is16B()); + Emit(VFormat(vd) | NEON_RBIT_NOT | Rn(vn) | Rd(vd)); +} + + +void Assembler::rbit(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vd, vn)); + VIXL_ASSERT(vd.Is8B() || vd.Is16B()); + Emit(VFormat(vn) | (1 << NEONSize_offset) | NEON_RBIT_NOT | Rn(vn) | Rd(vd)); +} + + +void Assembler::ext(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int index) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vd, vn, vm)); + VIXL_ASSERT(vd.Is8B() || vd.Is16B()); + VIXL_ASSERT((0 <= index) && (index < vd.GetLanes())); + Emit(VFormat(vd) | NEON_EXT | Rm(vm) | ImmNEONExt(index) | Rn(vn) | Rd(vd)); +} + + +void Assembler::dup(const VRegister& vd, const VRegister& vn, int vn_index) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + Instr q, scalar; + + // We support vn arguments of the form vn.VxT() or vn.T(), where x is the + // number of lanes, and T is b, h, s or d. + int lane_size = vn.GetLaneSizeInBytes(); + NEONFormatField format; + switch (lane_size) { + case 1: + format = NEON_16B; + break; + case 2: + format = NEON_8H; + break; + case 4: + format = NEON_4S; + break; + default: + VIXL_ASSERT(lane_size == 8); + format = NEON_2D; + break; + } + + if (vd.IsScalar()) { + q = NEON_Q; + scalar = NEONScalar; + } else { + VIXL_ASSERT(!vd.Is1D()); + q = vd.IsD() ? 0 : NEON_Q; + scalar = 0; + } + Emit(q | scalar | NEON_DUP_ELEMENT | ImmNEON5(format, vn_index) | Rn(vn) | + Rd(vd)); +} + + +void Assembler::mov(const VRegister& vd, const VRegister& vn, int vn_index) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsScalar()); + dup(vd, vn, vn_index); +} + + +void Assembler::dup(const VRegister& vd, const Register& rn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(!vd.Is1D()); + VIXL_ASSERT(vd.Is2D() == rn.IsX()); + int q = vd.IsD() ? 0 : NEON_Q; + Emit(q | NEON_DUP_GENERAL | ImmNEON5(VFormat(vd), 0) | Rn(rn) | Rd(vd)); +} + + +void Assembler::ins(const VRegister& vd, + int vd_index, + const VRegister& vn, + int vn_index) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vd, vn)); + // We support vd arguments of the form vd.VxT() or vd.T(), where x is the + // number of lanes, and T is b, h, s or d. + int lane_size = vd.GetLaneSizeInBytes(); + NEONFormatField format; + switch (lane_size) { + case 1: + format = NEON_16B; + break; + case 2: + format = NEON_8H; + break; + case 4: + format = NEON_4S; + break; + default: + VIXL_ASSERT(lane_size == 8); + format = NEON_2D; + break; + } + + VIXL_ASSERT( + (0 <= vd_index) && + (vd_index < LaneCountFromFormat(static_cast(format)))); + VIXL_ASSERT( + (0 <= vn_index) && + (vn_index < LaneCountFromFormat(static_cast(format)))); + Emit(NEON_INS_ELEMENT | ImmNEON5(format, vd_index) | + ImmNEON4(format, vn_index) | Rn(vn) | Rd(vd)); +} + + +void Assembler::mov(const VRegister& vd, + int vd_index, + const VRegister& vn, + int vn_index) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + ins(vd, vd_index, vn, vn_index); +} + + +void Assembler::ins(const VRegister& vd, int vd_index, const Register& rn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + // We support vd arguments of the form vd.VxT() or vd.T(), where x is the + // number of lanes, and T is b, h, s or d. + int lane_size = vd.GetLaneSizeInBytes(); + NEONFormatField format; + switch (lane_size) { + case 1: + format = NEON_16B; + VIXL_ASSERT(rn.IsW()); + break; + case 2: + format = NEON_8H; + VIXL_ASSERT(rn.IsW()); + break; + case 4: + format = NEON_4S; + VIXL_ASSERT(rn.IsW()); + break; + default: + VIXL_ASSERT(lane_size == 8); + VIXL_ASSERT(rn.IsX()); + format = NEON_2D; + break; + } + + VIXL_ASSERT( + (0 <= vd_index) && + (vd_index < LaneCountFromFormat(static_cast(format)))); + Emit(NEON_INS_GENERAL | ImmNEON5(format, vd_index) | Rn(rn) | Rd(vd)); +} + + +void Assembler::mov(const VRegister& vd, int vd_index, const Register& rn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + ins(vd, vd_index, rn); +} + + +void Assembler::umov(const Register& rd, const VRegister& vn, int vn_index) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + // We support vn arguments of the form vn.VxT() or vn.T(), where x is the + // number of lanes, and T is b, h, s or d. + int lane_size = vn.GetLaneSizeInBytes(); + NEONFormatField format; + Instr q = 0; + switch (lane_size) { + case 1: + format = NEON_16B; + VIXL_ASSERT(rd.IsW()); + break; + case 2: + format = NEON_8H; + VIXL_ASSERT(rd.IsW()); + break; + case 4: + format = NEON_4S; + VIXL_ASSERT(rd.IsW()); + break; + default: + VIXL_ASSERT(lane_size == 8); + VIXL_ASSERT(rd.IsX()); + format = NEON_2D; + q = NEON_Q; + break; + } + + VIXL_ASSERT( + (0 <= vn_index) && + (vn_index < LaneCountFromFormat(static_cast(format)))); + Emit(q | NEON_UMOV | ImmNEON5(format, vn_index) | Rn(vn) | Rd(rd)); +} + + +void Assembler::mov(const Register& rd, const VRegister& vn, int vn_index) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vn.GetSizeInBytes() >= 4); + umov(rd, vn, vn_index); +} + + +void Assembler::smov(const Register& rd, const VRegister& vn, int vn_index) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + // We support vn arguments of the form vn.VxT() or vn.T(), where x is the + // number of lanes, and T is b, h, s. + int lane_size = vn.GetLaneSizeInBytes(); + NEONFormatField format; + Instr q = 0; + VIXL_ASSERT(lane_size != 8); + switch (lane_size) { + case 1: + format = NEON_16B; + break; + case 2: + format = NEON_8H; + break; + default: + VIXL_ASSERT(lane_size == 4); + VIXL_ASSERT(rd.IsX()); + format = NEON_4S; + break; + } + q = rd.IsW() ? 0 : NEON_Q; + VIXL_ASSERT( + (0 <= vn_index) && + (vn_index < LaneCountFromFormat(static_cast(format)))); + Emit(q | NEON_SMOV | ImmNEON5(format, vn_index) | Rn(vn) | Rd(rd)); +} + + +void Assembler::cls(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vd, vn)); + VIXL_ASSERT(!vd.Is1D() && !vd.Is2D()); + Emit(VFormat(vn) | NEON_CLS | Rn(vn) | Rd(vd)); +} + + +void Assembler::clz(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vd, vn)); + VIXL_ASSERT(!vd.Is1D() && !vd.Is2D()); + Emit(VFormat(vn) | NEON_CLZ | Rn(vn) | Rd(vd)); +} + + +void Assembler::cnt(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vd, vn)); + VIXL_ASSERT(vd.Is8B() || vd.Is16B()); + Emit(VFormat(vn) | NEON_CNT | Rn(vn) | Rd(vd)); +} + + +void Assembler::rev16(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vd, vn)); + VIXL_ASSERT(vd.Is8B() || vd.Is16B()); + Emit(VFormat(vn) | NEON_REV16 | Rn(vn) | Rd(vd)); +} + + +void Assembler::rev32(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vd, vn)); + VIXL_ASSERT(vd.Is8B() || vd.Is16B() || vd.Is4H() || vd.Is8H()); + Emit(VFormat(vn) | NEON_REV32 | Rn(vn) | Rd(vd)); +} + + +void Assembler::rev64(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vd, vn)); + VIXL_ASSERT(!vd.Is1D() && !vd.Is2D()); + Emit(VFormat(vn) | NEON_REV64 | Rn(vn) | Rd(vd)); +} + + +void Assembler::ursqrte(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vd, vn)); + VIXL_ASSERT(vd.Is2S() || vd.Is4S()); + Emit(VFormat(vn) | NEON_URSQRTE | Rn(vn) | Rd(vd)); +} + + +void Assembler::urecpe(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(AreSameFormat(vd, vn)); + VIXL_ASSERT(vd.Is2S() || vd.Is4S()); + Emit(VFormat(vn) | NEON_URECPE | Rn(vn) | Rd(vd)); +} + + +void Assembler::NEONAddlp(const VRegister& vd, + const VRegister& vn, + NEON2RegMiscOp op) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT((op == NEON_SADDLP) || (op == NEON_UADDLP) || + (op == NEON_SADALP) || (op == NEON_UADALP)); + + VIXL_ASSERT((vn.Is8B() && vd.Is4H()) || (vn.Is4H() && vd.Is2S()) || + (vn.Is2S() && vd.Is1D()) || (vn.Is16B() && vd.Is8H()) || + (vn.Is8H() && vd.Is4S()) || (vn.Is4S() && vd.Is2D())); + Emit(VFormat(vn) | op | Rn(vn) | Rd(vd)); +} + + +void Assembler::saddlp(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + NEONAddlp(vd, vn, NEON_SADDLP); +} + + +void Assembler::uaddlp(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + NEONAddlp(vd, vn, NEON_UADDLP); +} + + +void Assembler::sadalp(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + NEONAddlp(vd, vn, NEON_SADALP); +} + + +void Assembler::uadalp(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + NEONAddlp(vd, vn, NEON_UADALP); +} + + +void Assembler::NEONAcrossLanesL(const VRegister& vd, + const VRegister& vn, + NEONAcrossLanesOp op) { + VIXL_ASSERT((vn.Is8B() && vd.Is1H()) || (vn.Is16B() && vd.Is1H()) || + (vn.Is4H() && vd.Is1S()) || (vn.Is8H() && vd.Is1S()) || + (vn.Is4S() && vd.Is1D())); + Emit(VFormat(vn) | op | Rn(vn) | Rd(vd)); +} + + +void Assembler::saddlv(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + NEONAcrossLanesL(vd, vn, NEON_SADDLV); +} + + +void Assembler::uaddlv(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + NEONAcrossLanesL(vd, vn, NEON_UADDLV); +} + + +void Assembler::NEONAcrossLanes(const VRegister& vd, + const VRegister& vn, + NEONAcrossLanesOp op, + Instr op_half) { + VIXL_ASSERT((vn.Is8B() && vd.Is1B()) || (vn.Is16B() && vd.Is1B()) || + (vn.Is4H() && vd.Is1H()) || (vn.Is8H() && vd.Is1H()) || + (vn.Is4S() && vd.Is1S())); + if ((op & NEONAcrossLanesFPFMask) == NEONAcrossLanesFPFixed) { + if (vd.Is1H()) { + VIXL_ASSERT(op_half != 0); + Instr vop = op_half; + if (vn.Is8H()) { + vop |= NEON_Q; + } + Emit(vop | Rn(vn) | Rd(vd)); + } else { + Emit(FPFormat(vn) | op | Rn(vn) | Rd(vd)); + } + } else { + Emit(VFormat(vn) | op | Rn(vn) | Rd(vd)); + } +} + +// clang-format off +#define NEON_ACROSSLANES_LIST(V) \ + V(addv, NEON_ADDV) \ + V(smaxv, NEON_SMAXV) \ + V(sminv, NEON_SMINV) \ + V(umaxv, NEON_UMAXV) \ + V(uminv, NEON_UMINV) +// clang-format on + +#define VIXL_DEFINE_ASM_FUNC(FN, OP) \ + void Assembler::FN(const VRegister& vd, const VRegister& vn) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); \ + NEONAcrossLanes(vd, vn, OP, 0); \ + } +NEON_ACROSSLANES_LIST(VIXL_DEFINE_ASM_FUNC) +#undef VIXL_DEFINE_ASM_FUNC + + +// clang-format off +#define NEON_ACROSSLANES_FP_LIST(V) \ + V(fmaxv, NEON_FMAXV, NEON_FMAXV_H) \ + V(fminv, NEON_FMINV, NEON_FMINV_H) \ + V(fmaxnmv, NEON_FMAXNMV, NEON_FMAXNMV_H) \ + V(fminnmv, NEON_FMINNMV, NEON_FMINNMV_H) \ +// clang-format on + +#define VIXL_DEFINE_ASM_FUNC(FN, OP, OP_H) \ + void Assembler::FN(const VRegister& vd, const VRegister& vn) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kFP, CPUFeatures::kNEON)); \ + if (vd.Is1H()) VIXL_ASSERT(CPUHas(CPUFeatures::kNEONHalf)); \ + VIXL_ASSERT(vd.Is1S() || vd.Is1H()); \ + NEONAcrossLanes(vd, vn, OP, OP_H); \ + } +NEON_ACROSSLANES_FP_LIST(VIXL_DEFINE_ASM_FUNC) +#undef VIXL_DEFINE_ASM_FUNC + + +void Assembler::NEONPerm(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + NEONPermOp op) { + VIXL_ASSERT(AreSameFormat(vd, vn, vm)); + VIXL_ASSERT(!vd.Is1D()); + Emit(VFormat(vd) | op | Rm(vm) | Rn(vn) | Rd(vd)); +} + + +void Assembler::trn1(const VRegister& vd, + const VRegister& vn, + const VRegister& vm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + NEONPerm(vd, vn, vm, NEON_TRN1); +} + + +void Assembler::trn2(const VRegister& vd, + const VRegister& vn, + const VRegister& vm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + NEONPerm(vd, vn, vm, NEON_TRN2); +} + + +void Assembler::uzp1(const VRegister& vd, + const VRegister& vn, + const VRegister& vm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + NEONPerm(vd, vn, vm, NEON_UZP1); +} + + +void Assembler::uzp2(const VRegister& vd, + const VRegister& vn, + const VRegister& vm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + NEONPerm(vd, vn, vm, NEON_UZP2); +} + + +void Assembler::zip1(const VRegister& vd, + const VRegister& vn, + const VRegister& vm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + NEONPerm(vd, vn, vm, NEON_ZIP1); +} + + +void Assembler::zip2(const VRegister& vd, + const VRegister& vn, + const VRegister& vm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + NEONPerm(vd, vn, vm, NEON_ZIP2); +} + + +void Assembler::NEONShiftImmediate(const VRegister& vd, + const VRegister& vn, + NEONShiftImmediateOp op, + int immh_immb) { + VIXL_ASSERT(AreSameFormat(vd, vn)); + Instr q, scalar; + if (vn.IsScalar()) { + q = NEON_Q; + scalar = NEONScalar; + } else { + q = vd.IsD() ? 0 : NEON_Q; + scalar = 0; + } + Emit(q | op | scalar | immh_immb | Rn(vn) | Rd(vd)); +} + + +void Assembler::NEONShiftLeftImmediate(const VRegister& vd, + const VRegister& vn, + int shift, + NEONShiftImmediateOp op) { + int lane_size_in_bits = vn.GetLaneSizeInBits(); + VIXL_ASSERT((shift >= 0) && (shift < lane_size_in_bits)); + NEONShiftImmediate(vd, vn, op, (lane_size_in_bits + shift) << 16); +} + + +void Assembler::NEONShiftRightImmediate(const VRegister& vd, + const VRegister& vn, + int shift, + NEONShiftImmediateOp op) { + int lane_size_in_bits = vn.GetLaneSizeInBits(); + VIXL_ASSERT((shift >= 1) && (shift <= lane_size_in_bits)); + NEONShiftImmediate(vd, vn, op, ((2 * lane_size_in_bits) - shift) << 16); +} + + +void Assembler::NEONShiftImmediateL(const VRegister& vd, + const VRegister& vn, + int shift, + NEONShiftImmediateOp op) { + int lane_size_in_bits = vn.GetLaneSizeInBits(); + VIXL_ASSERT((shift >= 0) && (shift < lane_size_in_bits)); + int immh_immb = (lane_size_in_bits + shift) << 16; + + VIXL_ASSERT((vn.Is8B() && vd.Is8H()) || (vn.Is4H() && vd.Is4S()) || + (vn.Is2S() && vd.Is2D()) || (vn.Is16B() && vd.Is8H()) || + (vn.Is8H() && vd.Is4S()) || (vn.Is4S() && vd.Is2D())); + Instr q; + q = vn.IsD() ? 0 : NEON_Q; + Emit(q | op | immh_immb | Rn(vn) | Rd(vd)); +} + + +void Assembler::NEONShiftImmediateN(const VRegister& vd, + const VRegister& vn, + int shift, + NEONShiftImmediateOp op) { + Instr q, scalar; + int lane_size_in_bits = vd.GetLaneSizeInBits(); + VIXL_ASSERT((shift >= 1) && (shift <= lane_size_in_bits)); + int immh_immb = (2 * lane_size_in_bits - shift) << 16; + + if (vn.IsScalar()) { + VIXL_ASSERT((vd.Is1B() && vn.Is1H()) || (vd.Is1H() && vn.Is1S()) || + (vd.Is1S() && vn.Is1D())); + q = NEON_Q; + scalar = NEONScalar; + } else { + VIXL_ASSERT((vd.Is8B() && vn.Is8H()) || (vd.Is4H() && vn.Is4S()) || + (vd.Is2S() && vn.Is2D()) || (vd.Is16B() && vn.Is8H()) || + (vd.Is8H() && vn.Is4S()) || (vd.Is4S() && vn.Is2D())); + scalar = 0; + q = vd.IsD() ? 0 : NEON_Q; + } + Emit(q | op | scalar | immh_immb | Rn(vn) | Rd(vd)); +} + + +void Assembler::shl(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsVector() || vd.Is1D()); + NEONShiftLeftImmediate(vd, vn, shift, NEON_SHL); +} + + +void Assembler::sli(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsVector() || vd.Is1D()); + NEONShiftLeftImmediate(vd, vn, shift, NEON_SLI); +} + + +void Assembler::sqshl(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + NEONShiftLeftImmediate(vd, vn, shift, NEON_SQSHL_imm); +} + + +void Assembler::sqshlu(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + NEONShiftLeftImmediate(vd, vn, shift, NEON_SQSHLU); +} + + +void Assembler::uqshl(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + NEONShiftLeftImmediate(vd, vn, shift, NEON_UQSHL_imm); +} + + +void Assembler::sshll(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vn.IsD()); + NEONShiftImmediateL(vd, vn, shift, NEON_SSHLL); +} + + +void Assembler::sshll2(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vn.IsQ()); + NEONShiftImmediateL(vd, vn, shift, NEON_SSHLL); +} + + +void Assembler::sxtl(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + sshll(vd, vn, 0); +} + + +void Assembler::sxtl2(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + sshll2(vd, vn, 0); +} + + +void Assembler::ushll(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vn.IsD()); + NEONShiftImmediateL(vd, vn, shift, NEON_USHLL); +} + + +void Assembler::ushll2(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vn.IsQ()); + NEONShiftImmediateL(vd, vn, shift, NEON_USHLL); +} + + +void Assembler::uxtl(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + ushll(vd, vn, 0); +} + + +void Assembler::uxtl2(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + ushll2(vd, vn, 0); +} + + +void Assembler::sri(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsVector() || vd.Is1D()); + NEONShiftRightImmediate(vd, vn, shift, NEON_SRI); +} + + +void Assembler::sshr(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsVector() || vd.Is1D()); + NEONShiftRightImmediate(vd, vn, shift, NEON_SSHR); +} + + +void Assembler::ushr(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsVector() || vd.Is1D()); + NEONShiftRightImmediate(vd, vn, shift, NEON_USHR); +} + + +void Assembler::srshr(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsVector() || vd.Is1D()); + NEONShiftRightImmediate(vd, vn, shift, NEON_SRSHR); +} + + +void Assembler::urshr(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsVector() || vd.Is1D()); + NEONShiftRightImmediate(vd, vn, shift, NEON_URSHR); +} + + +void Assembler::ssra(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsVector() || vd.Is1D()); + NEONShiftRightImmediate(vd, vn, shift, NEON_SSRA); +} + + +void Assembler::usra(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsVector() || vd.Is1D()); + NEONShiftRightImmediate(vd, vn, shift, NEON_USRA); +} + + +void Assembler::srsra(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsVector() || vd.Is1D()); + NEONShiftRightImmediate(vd, vn, shift, NEON_SRSRA); +} + + +void Assembler::ursra(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsVector() || vd.Is1D()); + NEONShiftRightImmediate(vd, vn, shift, NEON_URSRA); +} + + +void Assembler::shrn(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vn.IsVector() && vd.IsD()); + NEONShiftImmediateN(vd, vn, shift, NEON_SHRN); +} + + +void Assembler::shrn2(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vn.IsVector() && vd.IsQ()); + NEONShiftImmediateN(vd, vn, shift, NEON_SHRN); +} + + +void Assembler::rshrn(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vn.IsVector() && vd.IsD()); + NEONShiftImmediateN(vd, vn, shift, NEON_RSHRN); +} + + +void Assembler::rshrn2(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vn.IsVector() && vd.IsQ()); + NEONShiftImmediateN(vd, vn, shift, NEON_RSHRN); +} + + +void Assembler::sqshrn(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsD() || (vn.IsScalar() && vd.IsScalar())); + NEONShiftImmediateN(vd, vn, shift, NEON_SQSHRN); +} + + +void Assembler::sqshrn2(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vn.IsVector() && vd.IsQ()); + NEONShiftImmediateN(vd, vn, shift, NEON_SQSHRN); +} + + +void Assembler::sqrshrn(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsD() || (vn.IsScalar() && vd.IsScalar())); + NEONShiftImmediateN(vd, vn, shift, NEON_SQRSHRN); +} + + +void Assembler::sqrshrn2(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vn.IsVector() && vd.IsQ()); + NEONShiftImmediateN(vd, vn, shift, NEON_SQRSHRN); +} + + +void Assembler::sqshrun(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsD() || (vn.IsScalar() && vd.IsScalar())); + NEONShiftImmediateN(vd, vn, shift, NEON_SQSHRUN); +} + + +void Assembler::sqshrun2(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vn.IsVector() && vd.IsQ()); + NEONShiftImmediateN(vd, vn, shift, NEON_SQSHRUN); +} + + +void Assembler::sqrshrun(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsD() || (vn.IsScalar() && vd.IsScalar())); + NEONShiftImmediateN(vd, vn, shift, NEON_SQRSHRUN); +} + + +void Assembler::sqrshrun2(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vn.IsVector() && vd.IsQ()); + NEONShiftImmediateN(vd, vn, shift, NEON_SQRSHRUN); +} + + +void Assembler::uqshrn(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsD() || (vn.IsScalar() && vd.IsScalar())); + NEONShiftImmediateN(vd, vn, shift, NEON_UQSHRN); +} + + +void Assembler::uqshrn2(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vn.IsVector() && vd.IsQ()); + NEONShiftImmediateN(vd, vn, shift, NEON_UQSHRN); +} + + +void Assembler::uqrshrn(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vd.IsD() || (vn.IsScalar() && vd.IsScalar())); + NEONShiftImmediateN(vd, vn, shift, NEON_UQRSHRN); +} + + +void Assembler::uqrshrn2(const VRegister& vd, const VRegister& vn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kNEON)); + VIXL_ASSERT(vn.IsVector() && vd.IsQ()); + NEONShiftImmediateN(vd, vn, shift, NEON_UQRSHRN); +} + + +// Note: +// For all ToImm instructions below, a difference in case +// for the same letter indicates a negated bit. +// If b is 1, then B is 0. +uint32_t Assembler::FP16ToImm8(Float16 imm) { + VIXL_ASSERT(IsImmFP16(imm)); + // Half: aBbb.cdef.gh00.0000 (16 bits) + uint16_t bits = Float16ToRawbits(imm); + // bit7: a000.0000 + uint16_t bit7 = ((bits >> 15) & 0x1) << 7; + // bit6: 0b00.0000 + uint16_t bit6 = ((bits >> 13) & 0x1) << 6; + // bit5_to_0: 00cd.efgh + uint16_t bit5_to_0 = (bits >> 6) & 0x3f; + uint32_t result = static_cast(bit7 | bit6 | bit5_to_0); + return result; +} + + +Instr Assembler::ImmFP16(Float16 imm) { + return FP16ToImm8(imm) << ImmFP_offset; +} + + +uint32_t Assembler::FP32ToImm8(float imm) { + VIXL_ASSERT(IsImmFP32(imm)); + // bits: aBbb.bbbc.defg.h000.0000.0000.0000.0000 + uint32_t bits = FloatToRawbits(imm); + // bit7: a000.0000 + uint32_t bit7 = ((bits >> 31) & 0x1) << 7; + // bit6: 0b00.0000 + uint32_t bit6 = ((bits >> 29) & 0x1) << 6; + // bit5_to_0: 00cd.efgh + uint32_t bit5_to_0 = (bits >> 19) & 0x3f; + + return bit7 | bit6 | bit5_to_0; +} + + +Instr Assembler::ImmFP32(float imm) { return FP32ToImm8(imm) << ImmFP_offset; } + + +uint32_t Assembler::FP64ToImm8(double imm) { + VIXL_ASSERT(IsImmFP64(imm)); + // bits: aBbb.bbbb.bbcd.efgh.0000.0000.0000.0000 + // 0000.0000.0000.0000.0000.0000.0000.0000 + uint64_t bits = DoubleToRawbits(imm); + // bit7: a000.0000 + uint64_t bit7 = ((bits >> 63) & 0x1) << 7; + // bit6: 0b00.0000 + uint64_t bit6 = ((bits >> 61) & 0x1) << 6; + // bit5_to_0: 00cd.efgh + uint64_t bit5_to_0 = (bits >> 48) & 0x3f; + + return static_cast(bit7 | bit6 | bit5_to_0); +} + + +Instr Assembler::ImmFP64(double imm) { return FP64ToImm8(imm) << ImmFP_offset; } + + +// Code generation helpers. +bool Assembler::OneInstrMoveImmediateHelper(Assembler* assm, + const Register& dst, + uint64_t imm) { + bool emit_code = assm != NULL; + unsigned n, imm_s, imm_r; + int reg_size = dst.GetSizeInBits(); + + if (IsImmMovz(imm, reg_size) && !dst.IsSP()) { + // Immediate can be represented in a move zero instruction. Movz can't write + // to the stack pointer. + if (emit_code) { + assm->movz(dst, imm); + } + return true; + } else if (IsImmMovn(imm, reg_size) && !dst.IsSP()) { + // Immediate can be represented in a move negative instruction. Movn can't + // write to the stack pointer. + if (emit_code) { + assm->movn(dst, dst.Is64Bits() ? ~imm : (~imm & kWRegMask)); + } + return true; + } else if (IsImmLogical(imm, reg_size, &n, &imm_s, &imm_r)) { + // Immediate can be represented in a logical orr instruction. + VIXL_ASSERT(!dst.IsZero()); + if (emit_code) { + assm->LogicalImmediate(dst, + AppropriateZeroRegFor(dst), + n, + imm_s, + imm_r, + ORR); + } + return true; + } + return false; +} + + +void Assembler::MoveWide(const Register& rd, + uint64_t imm, + int shift, + MoveWideImmediateOp mov_op) { + // Ignore the top 32 bits of an immediate if we're moving to a W register. + if (rd.Is32Bits()) { + // Check that the top 32 bits are zero (a positive 32-bit number) or top + // 33 bits are one (a negative 32-bit number, sign extended to 64 bits). + VIXL_ASSERT(((imm >> kWRegSize) == 0) || + ((imm >> (kWRegSize - 1)) == 0x1ffffffff)); + imm &= kWRegMask; + } + + if (shift >= 0) { + // Explicit shift specified. + VIXL_ASSERT((shift == 0) || (shift == 16) || (shift == 32) || + (shift == 48)); + VIXL_ASSERT(rd.Is64Bits() || (shift == 0) || (shift == 16)); + shift /= 16; + } else { + // Calculate a new immediate and shift combination to encode the immediate + // argument. + VIXL_ASSERT(shift == -1); + shift = 0; + if ((imm & 0xffffffffffff0000) == 0) { + // Nothing to do. + } else if ((imm & 0xffffffff0000ffff) == 0) { + imm >>= 16; + shift = 1; + } else if ((imm & 0xffff0000ffffffff) == 0) { + VIXL_ASSERT(rd.Is64Bits()); + imm >>= 32; + shift = 2; + } else if ((imm & 0x0000ffffffffffff) == 0) { + VIXL_ASSERT(rd.Is64Bits()); + imm >>= 48; + shift = 3; + } + } + + VIXL_ASSERT(IsUint16(imm)); + + Emit(SF(rd) | MoveWideImmediateFixed | mov_op | Rd(rd) | ImmMoveWide(imm) | + ShiftMoveWide(shift)); +} + + +void Assembler::AddSub(const Register& rd, + const Register& rn, + const Operand& operand, + FlagsUpdate S, + AddSubOp op) { + VIXL_ASSERT(rd.GetSizeInBits() == rn.GetSizeInBits()); + if (operand.IsImmediate()) { + int64_t immediate = operand.GetImmediate(); + VIXL_ASSERT(IsImmAddSub(immediate)); + Instr dest_reg = (S == SetFlags) ? Rd(rd) : RdSP(rd); + Emit(SF(rd) | AddSubImmediateFixed | op | Flags(S) | + ImmAddSub(static_cast(immediate)) | dest_reg | RnSP(rn)); + } else if (operand.IsShiftedRegister()) { + VIXL_ASSERT(operand.GetRegister().GetSizeInBits() == rd.GetSizeInBits()); + VIXL_ASSERT(operand.GetShift() != ROR); + + // For instructions of the form: + // add/sub wsp, , [, LSL #0-3 ] + // add/sub , wsp, [, LSL #0-3 ] + // add/sub wsp, wsp, [, LSL #0-3 ] + // adds/subs , wsp, [, LSL #0-3 ] + // or their 64-bit register equivalents, convert the operand from shifted to + // extended register mode, and emit an add/sub extended instruction. + if (rn.IsSP() || rd.IsSP()) { + VIXL_ASSERT(!(rd.IsSP() && (S == SetFlags))); + DataProcExtendedRegister(rd, + rn, + operand.ToExtendedRegister(), + S, + AddSubExtendedFixed | op); + } else { + DataProcShiftedRegister(rd, rn, operand, S, AddSubShiftedFixed | op); + } + } else { + VIXL_ASSERT(operand.IsExtendedRegister()); + DataProcExtendedRegister(rd, rn, operand, S, AddSubExtendedFixed | op); + } +} + + +void Assembler::AddSubWithCarry(const Register& rd, + const Register& rn, + const Operand& operand, + FlagsUpdate S, + AddSubWithCarryOp op) { + VIXL_ASSERT(rd.GetSizeInBits() == rn.GetSizeInBits()); + VIXL_ASSERT(rd.GetSizeInBits() == operand.GetRegister().GetSizeInBits()); + VIXL_ASSERT(operand.IsShiftedRegister() && (operand.GetShiftAmount() == 0)); + Emit(SF(rd) | op | Flags(S) | Rm(operand.GetRegister()) | Rn(rn) | Rd(rd)); +} + + +void Assembler::hlt(int code) { + VIXL_ASSERT(IsUint16(code)); + Emit(HLT | ImmException(code)); +} + + +void Assembler::brk(int code) { + VIXL_ASSERT(IsUint16(code)); + Emit(BRK | ImmException(code)); +} + + +void Assembler::svc(int code) { Emit(SVC | ImmException(code)); } + +void Assembler::udf(int code) { Emit(UDF | ImmUdf(code)); } + + +// TODO(all): The third parameter should be passed by reference but gcc 4.8.2 +// reports a bogus uninitialised warning then. +void Assembler::Logical(const Register& rd, + const Register& rn, + const Operand operand, + LogicalOp op) { + VIXL_ASSERT(rd.GetSizeInBits() == rn.GetSizeInBits()); + if (operand.IsImmediate()) { + int64_t immediate = operand.GetImmediate(); + unsigned reg_size = rd.GetSizeInBits(); + + VIXL_ASSERT(immediate != 0); + VIXL_ASSERT(immediate != -1); + VIXL_ASSERT(rd.Is64Bits() || IsUint32(immediate)); + + // If the operation is NOT, invert the operation and immediate. + if ((op & NOT) == NOT) { + op = static_cast(op & ~NOT); + immediate = rd.Is64Bits() ? ~immediate : (~immediate & kWRegMask); + } + + unsigned n, imm_s, imm_r; + if (IsImmLogical(immediate, reg_size, &n, &imm_s, &imm_r)) { + // Immediate can be encoded in the instruction. + LogicalImmediate(rd, rn, n, imm_s, imm_r, op); + } else { + // This case is handled in the macro assembler. + VIXL_UNREACHABLE(); + } + } else { + VIXL_ASSERT(operand.IsShiftedRegister()); + VIXL_ASSERT(operand.GetRegister().GetSizeInBits() == rd.GetSizeInBits()); + Instr dp_op = static_cast(op | LogicalShiftedFixed); + DataProcShiftedRegister(rd, rn, operand, LeaveFlags, dp_op); + } +} + + +void Assembler::LogicalImmediate(const Register& rd, + const Register& rn, + unsigned n, + unsigned imm_s, + unsigned imm_r, + LogicalOp op) { + unsigned reg_size = rd.GetSizeInBits(); + Instr dest_reg = (op == ANDS) ? Rd(rd) : RdSP(rd); + Emit(SF(rd) | LogicalImmediateFixed | op | BitN(n, reg_size) | + ImmSetBits(imm_s, reg_size) | ImmRotate(imm_r, reg_size) | dest_reg | + Rn(rn)); +} + + +void Assembler::ConditionalCompare(const Register& rn, + const Operand& operand, + StatusFlags nzcv, + Condition cond, + ConditionalCompareOp op) { + Instr ccmpop; + if (operand.IsImmediate()) { + int64_t immediate = operand.GetImmediate(); + VIXL_ASSERT(IsImmConditionalCompare(immediate)); + ccmpop = ConditionalCompareImmediateFixed | op | + ImmCondCmp(static_cast(immediate)); + } else { + VIXL_ASSERT(operand.IsShiftedRegister() && (operand.GetShiftAmount() == 0)); + ccmpop = ConditionalCompareRegisterFixed | op | Rm(operand.GetRegister()); + } + Emit(SF(rn) | ccmpop | Cond(cond) | Rn(rn) | Nzcv(nzcv)); +} + + +void Assembler::DataProcessing1Source(const Register& rd, + const Register& rn, + DataProcessing1SourceOp op) { + VIXL_ASSERT(rd.GetSizeInBits() == rn.GetSizeInBits()); + Emit(SF(rn) | op | Rn(rn) | Rd(rd)); +} + + +void Assembler::FPDataProcessing1Source(const VRegister& vd, + const VRegister& vn, + FPDataProcessing1SourceOp op) { + VIXL_ASSERT(vd.Is1H() || vd.Is1S() || vd.Is1D()); + Emit(FPType(vn) | op | Rn(vn) | Rd(vd)); +} + + +void Assembler::FPDataProcessing3Source(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + const VRegister& va, + FPDataProcessing3SourceOp op) { + VIXL_ASSERT(vd.Is1H() || vd.Is1S() || vd.Is1D()); + VIXL_ASSERT(AreSameSizeAndType(vd, vn, vm, va)); + Emit(FPType(vd) | op | Rm(vm) | Rn(vn) | Rd(vd) | Ra(va)); +} + + +void Assembler::NEONModifiedImmShiftLsl(const VRegister& vd, + const int imm8, + const int left_shift, + NEONModifiedImmediateOp op) { + VIXL_ASSERT(vd.Is8B() || vd.Is16B() || vd.Is4H() || vd.Is8H() || vd.Is2S() || + vd.Is4S()); + VIXL_ASSERT((left_shift == 0) || (left_shift == 8) || (left_shift == 16) || + (left_shift == 24)); + VIXL_ASSERT(IsUint8(imm8)); + + int cmode_1, cmode_2, cmode_3; + if (vd.Is8B() || vd.Is16B()) { + VIXL_ASSERT(op == NEONModifiedImmediate_MOVI); + cmode_1 = 1; + cmode_2 = 1; + cmode_3 = 1; + } else { + cmode_1 = (left_shift >> 3) & 1; + cmode_2 = left_shift >> 4; + cmode_3 = 0; + if (vd.Is4H() || vd.Is8H()) { + VIXL_ASSERT((left_shift == 0) || (left_shift == 8)); + cmode_3 = 1; + } + } + int cmode = (cmode_3 << 3) | (cmode_2 << 2) | (cmode_1 << 1); + + int q = vd.IsQ() ? NEON_Q : 0; + + Emit(q | op | ImmNEONabcdefgh(imm8) | NEONCmode(cmode) | Rd(vd)); +} + + +void Assembler::NEONModifiedImmShiftMsl(const VRegister& vd, + const int imm8, + const int shift_amount, + NEONModifiedImmediateOp op) { + VIXL_ASSERT(vd.Is2S() || vd.Is4S()); + VIXL_ASSERT((shift_amount == 8) || (shift_amount == 16)); + VIXL_ASSERT(IsUint8(imm8)); + + int cmode_0 = (shift_amount >> 4) & 1; + int cmode = 0xc | cmode_0; + + int q = vd.IsQ() ? NEON_Q : 0; + + Emit(q | op | ImmNEONabcdefgh(imm8) | NEONCmode(cmode) | Rd(vd)); +} + + +void Assembler::EmitShift(const Register& rd, + const Register& rn, + Shift shift, + unsigned shift_amount) { + switch (shift) { + case LSL: + lsl(rd, rn, shift_amount); + break; + case LSR: + lsr(rd, rn, shift_amount); + break; + case ASR: + asr(rd, rn, shift_amount); + break; + case ROR: + ror(rd, rn, shift_amount); + break; + default: + VIXL_UNREACHABLE(); + } +} + + +void Assembler::EmitExtendShift(const Register& rd, + const Register& rn, + Extend extend, + unsigned left_shift) { + VIXL_ASSERT(rd.GetSizeInBits() >= rn.GetSizeInBits()); + unsigned reg_size = rd.GetSizeInBits(); + // Use the correct size of register. + Register rn_ = Register(rn.GetCode(), rd.GetSizeInBits()); + // Bits extracted are high_bit:0. + unsigned high_bit = (8 << (extend & 0x3)) - 1; + // Number of bits left in the result that are not introduced by the shift. + unsigned non_shift_bits = (reg_size - left_shift) & (reg_size - 1); + + if ((non_shift_bits > high_bit) || (non_shift_bits == 0)) { + switch (extend) { + case UXTB: + case UXTH: + case UXTW: + ubfm(rd, rn_, non_shift_bits, high_bit); + break; + case SXTB: + case SXTH: + case SXTW: + sbfm(rd, rn_, non_shift_bits, high_bit); + break; + case UXTX: + case SXTX: { + VIXL_ASSERT(rn.GetSizeInBits() == kXRegSize); + // Nothing to extend. Just shift. + lsl(rd, rn_, left_shift); + break; + } + default: + VIXL_UNREACHABLE(); + } + } else { + // No need to extend as the extended bits would be shifted away. + lsl(rd, rn_, left_shift); + } +} + + +void Assembler::DataProcShiftedRegister(const Register& rd, + const Register& rn, + const Operand& operand, + FlagsUpdate S, + Instr op) { + VIXL_ASSERT(operand.IsShiftedRegister()); + VIXL_ASSERT(rn.Is64Bits() || + (rn.Is32Bits() && IsUint5(operand.GetShiftAmount()))); + Emit(SF(rd) | op | Flags(S) | ShiftDP(operand.GetShift()) | + ImmDPShift(operand.GetShiftAmount()) | Rm(operand.GetRegister()) | + Rn(rn) | Rd(rd)); +} + + +void Assembler::DataProcExtendedRegister(const Register& rd, + const Register& rn, + const Operand& operand, + FlagsUpdate S, + Instr op) { + Instr dest_reg = (S == SetFlags) ? Rd(rd) : RdSP(rd); + Emit(SF(rd) | op | Flags(S) | Rm(operand.GetRegister()) | + ExtendMode(operand.GetExtend()) | + ImmExtendShift(operand.GetShiftAmount()) | dest_reg | RnSP(rn)); +} + + +Instr Assembler::LoadStoreMemOperand(const MemOperand& addr, + unsigned access_size_in_bytes_log2, + LoadStoreScalingOption option) { + Instr base = RnSP(addr.GetBaseRegister()); + int64_t offset = addr.GetOffset(); + + if (addr.IsImmediateOffset()) { + bool prefer_unscaled = + (option == PreferUnscaledOffset) || (option == RequireUnscaledOffset); + if (prefer_unscaled && IsImmLSUnscaled(offset)) { + // Use the unscaled addressing mode. + return base | LoadStoreUnscaledOffsetFixed | ImmLS(offset); + } + + if ((option != RequireUnscaledOffset) && + IsImmLSScaled(offset, access_size_in_bytes_log2)) { + // We need `offset` to be positive for the shift to be well-defined. + // IsImmLSScaled should check this. + VIXL_ASSERT(offset >= 0); + // Use the scaled addressing mode. + return base | LoadStoreUnsignedOffsetFixed | + ImmLSUnsigned(offset >> access_size_in_bytes_log2); + } + + if ((option != RequireScaledOffset) && IsImmLSUnscaled(offset)) { + // Use the unscaled addressing mode. + return base | LoadStoreUnscaledOffsetFixed | ImmLS(offset); + } + } + + // All remaining addressing modes are register-offset, pre-indexed or + // post-indexed modes. + VIXL_ASSERT((option != RequireUnscaledOffset) && + (option != RequireScaledOffset)); + + if (addr.IsRegisterOffset()) { + Extend ext = addr.GetExtend(); + Shift shift = addr.GetShift(); + unsigned shift_amount = addr.GetShiftAmount(); + + // LSL is encoded in the option field as UXTX. + if (shift == LSL) { + ext = UXTX; + } + + // Shifts are encoded in one bit, indicating a left shift by the memory + // access size. + VIXL_ASSERT((shift_amount == 0) || (shift_amount == access_size_in_bytes_log2)); + return base | LoadStoreRegisterOffsetFixed | Rm(addr.GetRegisterOffset()) | + ExtendMode(ext) | ImmShiftLS((shift_amount > 0) ? 1 : 0); + } + + if (addr.IsPreIndex() && IsImmLSUnscaled(offset)) { + return base | LoadStorePreIndexFixed | ImmLS(offset); + } + + if (addr.IsPostIndex() && IsImmLSUnscaled(offset)) { + return base | LoadStorePostIndexFixed | ImmLS(offset); + } + + // If this point is reached, the MemOperand (addr) cannot be encoded. + VIXL_UNREACHABLE(); + return 0; +} + + +void Assembler::LoadStore(const CPURegister& rt, + const MemOperand& addr, + LoadStoreOp op, + LoadStoreScalingOption option) { + VIXL_ASSERT(CPUHas(rt)); + Emit(op | Rt(rt) | LoadStoreMemOperand(addr, CalcLSDataSize(op), option)); +} + +void Assembler::LoadStorePAC(const Register& xt, + const MemOperand& addr, + LoadStorePACOp op) { + VIXL_ASSERT(xt.Is64Bits()); + VIXL_ASSERT(addr.IsImmediateOffset() || addr.IsPreIndex()); + + Instr pac_op = op; + if (addr.IsPreIndex()) { + pac_op |= LoadStorePACPreBit; + } + + Instr base = RnSP(addr.GetBaseRegister()); + int64_t offset = addr.GetOffset(); + + Emit(pac_op | Rt(xt) | base | ImmLSPAC(static_cast(offset))); +} + + +void Assembler::Prefetch(int op, + const MemOperand& addr, + LoadStoreScalingOption option) { + VIXL_ASSERT(addr.IsRegisterOffset() || addr.IsImmediateOffset()); + + Instr prfop = ImmPrefetchOperation(op); + Emit(PRFM | prfop | LoadStoreMemOperand(addr, kXRegSizeInBytesLog2, option)); +} + +void Assembler::Prefetch(PrefetchOperation op, + const MemOperand& addr, + LoadStoreScalingOption option) { + // Passing unnamed values in 'op' is undefined behaviour in C++. + VIXL_ASSERT(IsNamedPrefetchOperation(op)); + Prefetch(static_cast(op), addr, option); +} + + +bool Assembler::IsImmAddSub(int64_t immediate) { + return IsUint12(immediate) || + (IsUint12(immediate >> 12) && ((immediate & 0xfff) == 0)); +} + + +bool Assembler::IsImmConditionalCompare(int64_t immediate) { + return IsUint5(immediate); +} + + +bool Assembler::IsImmFP16(Float16 imm) { + // Valid values will have the form: + // aBbb.cdef.gh00.000 + uint16_t bits = Float16ToRawbits(imm); + // bits[6..0] are cleared. + if ((bits & 0x3f) != 0) { + return false; + } + + // bits[13..12] are all set or all cleared. + uint16_t b_pattern = (bits >> 12) & 0x03; + if (b_pattern != 0 && b_pattern != 0x03) { + return false; + } + + // bit[15] and bit[14] are opposite. + if (((bits ^ (bits << 1)) & 0x4000) == 0) { + return false; + } + + return true; +} + + +bool Assembler::IsImmFP32(float imm) { + // Valid values will have the form: + // aBbb.bbbc.defg.h000.0000.0000.0000.0000 + uint32_t bits = FloatToRawbits(imm); + // bits[19..0] are cleared. + if ((bits & 0x7ffff) != 0) { + return false; + } + + // bits[29..25] are all set or all cleared. + uint32_t b_pattern = (bits >> 16) & 0x3e00; + if (b_pattern != 0 && b_pattern != 0x3e00) { + return false; + } + + // bit[30] and bit[29] are opposite. + if (((bits ^ (bits << 1)) & 0x40000000) == 0) { + return false; + } + + return true; +} + + +bool Assembler::IsImmFP64(double imm) { + // Valid values will have the form: + // aBbb.bbbb.bbcd.efgh.0000.0000.0000.0000 + // 0000.0000.0000.0000.0000.0000.0000.0000 + uint64_t bits = DoubleToRawbits(imm); + // bits[47..0] are cleared. + if ((bits & 0x0000ffffffffffff) != 0) { + return false; + } + + // bits[61..54] are all set or all cleared. + uint32_t b_pattern = (bits >> 48) & 0x3fc0; + if ((b_pattern != 0) && (b_pattern != 0x3fc0)) { + return false; + } + + // bit[62] and bit[61] are opposite. + if (((bits ^ (bits << 1)) & (UINT64_C(1) << 62)) == 0) { + return false; + } + + return true; +} + + +bool Assembler::IsImmLSPair(int64_t offset, unsigned access_size_in_bytes_log2) { + VIXL_ASSERT(access_size_in_bytes_log2 <= kQRegSizeInBytesLog2); + return IsMultiple(offset, 1 << access_size_in_bytes_log2) && + IsInt7(offset / (1 << access_size_in_bytes_log2)); +} + + +bool Assembler::IsImmLSScaled(int64_t offset, unsigned access_size_in_bytes_log2) { + VIXL_ASSERT(access_size_in_bytes_log2 <= kQRegSizeInBytesLog2); + return IsMultiple(offset, 1 << access_size_in_bytes_log2) && + IsUint12(offset / (1 << access_size_in_bytes_log2)); +} + + +bool Assembler::IsImmLSUnscaled(int64_t offset) { return IsInt9(offset); } + + +// The movn instruction can generate immediates containing an arbitrary 16-bit +// value, with remaining bits set, eg. 0xffff1234, 0xffff1234ffffffff. +bool Assembler::IsImmMovn(uint64_t imm, unsigned reg_size) { + return IsImmMovz(~imm, reg_size); +} + + +// The movz instruction can generate immediates containing an arbitrary 16-bit +// value, with remaining bits clear, eg. 0x00001234, 0x0000123400000000. +bool Assembler::IsImmMovz(uint64_t imm, unsigned reg_size) { + VIXL_ASSERT((reg_size == kXRegSize) || (reg_size == kWRegSize)); + return CountClearHalfWords(imm, reg_size) >= ((reg_size / 16) - 1); +} + + +// Test if a given value can be encoded in the immediate field of a logical +// instruction. +// If it can be encoded, the function returns true, and values pointed to by n, +// imm_s and imm_r are updated with immediates encoded in the format required +// by the corresponding fields in the logical instruction. +// If it can not be encoded, the function returns false, and the values pointed +// to by n, imm_s and imm_r are undefined. +bool Assembler::IsImmLogical(uint64_t value, + unsigned width, + unsigned* n, + unsigned* imm_s, + unsigned* imm_r) { + VIXL_ASSERT((width == kBRegSize) || (width == kHRegSize) || + (width == kSRegSize) || (width == kDRegSize)); + + bool negate = false; + + // Logical immediates are encoded using parameters n, imm_s and imm_r using + // the following table: + // + // N imms immr size S R + // 1 ssssss rrrrrr 64 UInt(ssssss) UInt(rrrrrr) + // 0 0sssss xrrrrr 32 UInt(sssss) UInt(rrrrr) + // 0 10ssss xxrrrr 16 UInt(ssss) UInt(rrrr) + // 0 110sss xxxrrr 8 UInt(sss) UInt(rrr) + // 0 1110ss xxxxrr 4 UInt(ss) UInt(rr) + // 0 11110s xxxxxr 2 UInt(s) UInt(r) + // (s bits must not be all set) + // + // A pattern is constructed of size bits, where the least significant S+1 bits + // are set. The pattern is rotated right by R, and repeated across a 32 or + // 64-bit value, depending on destination register width. + // + // Put another way: the basic format of a logical immediate is a single + // contiguous stretch of 1 bits, repeated across the whole word at intervals + // given by a power of 2. To identify them quickly, we first locate the + // lowest stretch of 1 bits, then the next 1 bit above that; that combination + // is different for every logical immediate, so it gives us all the + // information we need to identify the only logical immediate that our input + // could be, and then we simply check if that's the value we actually have. + // + // (The rotation parameter does give the possibility of the stretch of 1 bits + // going 'round the end' of the word. To deal with that, we observe that in + // any situation where that happens the bitwise NOT of the value is also a + // valid logical immediate. So we simply invert the input whenever its low bit + // is set, and then we know that the rotated case can't arise.) + + if (value & 1) { + // If the low bit is 1, negate the value, and set a flag to remember that we + // did (so that we can adjust the return values appropriately). + negate = true; + value = ~value; + } + + if (width <= kWRegSize) { + // To handle 8/16/32-bit logical immediates, the very easiest thing is to repeat + // the input value to fill a 64-bit word. The correct encoding of that as a + // logical immediate will also be the correct encoding of the value. + + // Avoid making the assumption that the most-significant 56/48/32 bits are zero by + // shifting the value left and duplicating it. + for (unsigned bits = width; bits <= kWRegSize; bits *= 2) { + value <<= bits; + uint64_t mask = (UINT64_C(1) << bits) - 1; + value |= ((value >> bits) & mask); + } + } + + // The basic analysis idea: imagine our input word looks like this. + // + // 0011111000111110001111100011111000111110001111100011111000111110 + // c b a + // |<--d-->| + // + // We find the lowest set bit (as an actual power-of-2 value, not its index) + // and call it a. Then we add a to our original number, which wipes out the + // bottommost stretch of set bits and replaces it with a 1 carried into the + // next zero bit. Then we look for the new lowest set bit, which is in + // position b, and subtract it, so now our number is just like the original + // but with the lowest stretch of set bits completely gone. Now we find the + // lowest set bit again, which is position c in the diagram above. Then we'll + // measure the distance d between bit positions a and c (using CLZ), and that + // tells us that the only valid logical immediate that could possibly be equal + // to this number is the one in which a stretch of bits running from a to just + // below b is replicated every d bits. + uint64_t a = LowestSetBit(value); + uint64_t value_plus_a = value + a; + uint64_t b = LowestSetBit(value_plus_a); + uint64_t value_plus_a_minus_b = value_plus_a - b; + uint64_t c = LowestSetBit(value_plus_a_minus_b); + + int d, clz_a, out_n; + uint64_t mask; + + if (c != 0) { + // The general case, in which there is more than one stretch of set bits. + // Compute the repeat distance d, and set up a bitmask covering the basic + // unit of repetition (i.e. a word with the bottom d bits set). Also, in all + // of these cases the N bit of the output will be zero. + clz_a = CountLeadingZeros(a, kXRegSize); + int clz_c = CountLeadingZeros(c, kXRegSize); + d = clz_a - clz_c; + mask = ((UINT64_C(1) << d) - 1); + out_n = 0; + } else { + // Handle degenerate cases. + // + // If any of those 'find lowest set bit' operations didn't find a set bit at + // all, then the word will have been zero thereafter, so in particular the + // last lowest_set_bit operation will have returned zero. So we can test for + // all the special case conditions in one go by seeing if c is zero. + if (a == 0) { + // The input was zero (or all 1 bits, which will come to here too after we + // inverted it at the start of the function), for which we just return + // false. + return false; + } else { + // Otherwise, if c was zero but a was not, then there's just one stretch + // of set bits in our word, meaning that we have the trivial case of + // d == 64 and only one 'repetition'. Set up all the same variables as in + // the general case above, and set the N bit in the output. + clz_a = CountLeadingZeros(a, kXRegSize); + d = 64; + mask = ~UINT64_C(0); + out_n = 1; + } + } + + // If the repeat period d is not a power of two, it can't be encoded. + if (!IsPowerOf2(d)) { + return false; + } + + if (((b - a) & ~mask) != 0) { + // If the bit stretch (b - a) does not fit within the mask derived from the + // repeat period, then fail. + return false; + } + + // The only possible option is b - a repeated every d bits. Now we're going to + // actually construct the valid logical immediate derived from that + // specification, and see if it equals our original input. + // + // To repeat a value every d bits, we multiply it by a number of the form + // (1 + 2^d + 2^(2d) + ...), i.e. 0x0001000100010001 or similar. These can + // be derived using a table lookup on CLZ(d). + static const uint64_t multipliers[] = { + 0x0000000000000001UL, + 0x0000000100000001UL, + 0x0001000100010001UL, + 0x0101010101010101UL, + 0x1111111111111111UL, + 0x5555555555555555UL, + }; + uint64_t multiplier = multipliers[CountLeadingZeros(d, kXRegSize) - 57]; + uint64_t candidate = (b - a) * multiplier; + + if (value != candidate) { + // The candidate pattern doesn't match our input value, so fail. + return false; + } + + // We have a match! This is a valid logical immediate, so now we have to + // construct the bits and pieces of the instruction encoding that generates + // it. + + // Count the set bits in our basic stretch. The special case of clz(0) == -1 + // makes the answer come out right for stretches that reach the very top of + // the word (e.g. numbers like 0xffffc00000000000). + int clz_b = (b == 0) ? -1 : CountLeadingZeros(b, kXRegSize); + int s = clz_a - clz_b; + + // Decide how many bits to rotate right by, to put the low bit of that basic + // stretch in position a. + int r; + if (negate) { + // If we inverted the input right at the start of this function, here's + // where we compensate: the number of set bits becomes the number of clear + // bits, and the rotation count is based on position b rather than position + // a (since b is the location of the 'lowest' 1 bit after inversion). + s = d - s; + r = (clz_b + 1) & (d - 1); + } else { + r = (clz_a + 1) & (d - 1); + } + + // Now we're done, except for having to encode the S output in such a way that + // it gives both the number of set bits and the length of the repeated + // segment. The s field is encoded like this: + // + // imms size S + // ssssss 64 UInt(ssssss) + // 0sssss 32 UInt(sssss) + // 10ssss 16 UInt(ssss) + // 110sss 8 UInt(sss) + // 1110ss 4 UInt(ss) + // 11110s 2 UInt(s) + // + // So we 'or' (2 * -d) with our computed s to form imms. + if ((n != NULL) || (imm_s != NULL) || (imm_r != NULL)) { + *n = out_n; + *imm_s = ((2 * -d) | (s - 1)) & 0x3f; + *imm_r = r; + } + + return true; +} + + +LoadStoreOp Assembler::LoadOpFor(const CPURegister& rt) { + VIXL_ASSERT(rt.IsValid()); + if (rt.IsRegister()) { + return rt.Is64Bits() ? LDR_x : LDR_w; + } else { + VIXL_ASSERT(rt.IsVRegister()); + switch (rt.GetSizeInBits()) { + case kBRegSize: + return LDR_b; + case kHRegSize: + return LDR_h; + case kSRegSize: + return LDR_s; + case kDRegSize: + return LDR_d; + default: + VIXL_ASSERT(rt.IsQ()); + return LDR_q; + } + } +} + + +LoadStoreOp Assembler::StoreOpFor(const CPURegister& rt) { + VIXL_ASSERT(rt.IsValid()); + if (rt.IsRegister()) { + return rt.Is64Bits() ? STR_x : STR_w; + } else { + VIXL_ASSERT(rt.IsVRegister()); + switch (rt.GetSizeInBits()) { + case kBRegSize: + return STR_b; + case kHRegSize: + return STR_h; + case kSRegSize: + return STR_s; + case kDRegSize: + return STR_d; + default: + VIXL_ASSERT(rt.IsQ()); + return STR_q; + } + } +} + + +LoadStorePairOp Assembler::StorePairOpFor(const CPURegister& rt, + const CPURegister& rt2) { + VIXL_ASSERT(AreSameSizeAndType(rt, rt2)); + USE(rt2); + if (rt.IsRegister()) { + return rt.Is64Bits() ? STP_x : STP_w; + } else { + VIXL_ASSERT(rt.IsVRegister()); + switch (rt.GetSizeInBytes()) { + case kSRegSizeInBytes: + return STP_s; + case kDRegSizeInBytes: + return STP_d; + default: + VIXL_ASSERT(rt.IsQ()); + return STP_q; + } + } +} + + +LoadStorePairOp Assembler::LoadPairOpFor(const CPURegister& rt, + const CPURegister& rt2) { + VIXL_ASSERT((STP_w | LoadStorePairLBit) == LDP_w); + return static_cast(StorePairOpFor(rt, rt2) | + LoadStorePairLBit); +} + + +LoadStorePairNonTemporalOp Assembler::StorePairNonTemporalOpFor( + const CPURegister& rt, const CPURegister& rt2) { + VIXL_ASSERT(AreSameSizeAndType(rt, rt2)); + USE(rt2); + if (rt.IsRegister()) { + return rt.Is64Bits() ? STNP_x : STNP_w; + } else { + VIXL_ASSERT(rt.IsVRegister()); + switch (rt.GetSizeInBytes()) { + case kSRegSizeInBytes: + return STNP_s; + case kDRegSizeInBytes: + return STNP_d; + default: + VIXL_ASSERT(rt.IsQ()); + return STNP_q; + } + } +} + + +LoadStorePairNonTemporalOp Assembler::LoadPairNonTemporalOpFor( + const CPURegister& rt, const CPURegister& rt2) { + VIXL_ASSERT((STNP_w | LoadStorePairNonTemporalLBit) == LDNP_w); + return static_cast( + StorePairNonTemporalOpFor(rt, rt2) | LoadStorePairNonTemporalLBit); +} + + +LoadLiteralOp Assembler::LoadLiteralOpFor(const CPURegister& rt) { + if (rt.IsRegister()) { + return rt.IsX() ? LDR_x_lit : LDR_w_lit; + } else { + VIXL_ASSERT(rt.IsVRegister()); + switch (rt.GetSizeInBytes()) { + case kSRegSizeInBytes: + return LDR_s_lit; + case kDRegSizeInBytes: + return LDR_d_lit; + default: + VIXL_ASSERT(rt.IsQ()); + return LDR_q_lit; + } + } +} + + +bool Assembler::CPUHas(const CPURegister& rt) const { + // Core registers are available without any particular CPU features. + if (rt.IsRegister()) return true; + VIXL_ASSERT(rt.IsVRegister()); + // The architecture does not allow FP and NEON to be implemented separately, + // but we can crudely categorise them based on register size, since FP only + // uses D, S and (occasionally) H registers. + if (rt.IsH() || rt.IsS() || rt.IsD()) { + return CPUHas(CPUFeatures::kFP) || CPUHas(CPUFeatures::kNEON); + } + VIXL_ASSERT(rt.IsB() || rt.IsQ()); + return CPUHas(CPUFeatures::kNEON); +} + + +bool Assembler::CPUHas(const CPURegister& rt, const CPURegister& rt2) const { + // This is currently only used for loads and stores, where rt and rt2 must + // have the same size and type. We could extend this to cover other cases if + // necessary, but for now we can avoid checking both registers. + VIXL_ASSERT(AreSameSizeAndType(rt, rt2)); + USE(rt2); + return CPUHas(rt); +} + + +bool Assembler::CPUHas(SystemRegister sysreg) const { + switch (sysreg) { + case RNDR: + case RNDRRS: + return CPUHas(CPUFeatures::kRNG); + case FPCR: + case NZCV: + break; + } + return true; +} + + +} // namespace aarch64 +} // namespace vixl diff --git a/src/coreclr/jit/vixl/aarch64/assembler-aarch64.h b/src/coreclr/jit/vixl/aarch64/assembler-aarch64.h new file mode 100644 index 00000000000000..ebb8e4ad77cd9a --- /dev/null +++ b/src/coreclr/jit/vixl/aarch64/assembler-aarch64.h @@ -0,0 +1,7073 @@ +// Copyright 2015, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef VIXL_AARCH64_ASSEMBLER_AARCH64_H_ +#define VIXL_AARCH64_ASSEMBLER_AARCH64_H_ + +#include "../assembler-base-vixl.h" +#include "../code-generation-scopes-vixl.h" +#include "../cpu-features.h" +#include "../globals-vixl.h" +#include "../invalset-vixl.h" +#include "../utils-vixl.h" +#include "operands-aarch64.h" + +namespace vixl { +namespace aarch64 { + +class LabelTestHelper; // Forward declaration. + + +class Label { + public: + Label() : location_(kLocationUnbound) {} + ~Label() { + // All links to a label must have been resolved before it is destructed. + VIXL_ASSERT(!IsLinked()); + } + + bool IsBound() const { return location_ >= 0; } + bool IsLinked() const { return !links_.empty(); } + + ptrdiff_t GetLocation() const { return location_; } + VIXL_DEPRECATED("GetLocation", ptrdiff_t location() const) { + return GetLocation(); + } + + static const int kNPreallocatedLinks = 4; + static const ptrdiff_t kInvalidLinkKey = PTRDIFF_MAX; + static const size_t kReclaimFrom = 512; + static const size_t kReclaimFactor = 2; + + typedef InvalSet + LinksSetBase; + typedef InvalSetIterator LabelLinksIteratorBase; + + private: + class LinksSet : public LinksSetBase { + public: + LinksSet() : LinksSetBase() {} + }; + + // Allows iterating over the links of a label. The behaviour is undefined if + // the list of links is modified in any way while iterating. + class LabelLinksIterator : public LabelLinksIteratorBase { + public: + explicit LabelLinksIterator(Label* label) + : LabelLinksIteratorBase(&label->links_) {} + + // TODO: Remove these and use the STL-like interface instead. + using LabelLinksIteratorBase::Advance; + using LabelLinksIteratorBase::Current; + }; + + void Bind(ptrdiff_t location) { + // Labels can only be bound once. + VIXL_ASSERT(!IsBound()); + location_ = location; + } + + void AddLink(ptrdiff_t instruction) { + // If a label is bound, the assembler already has the information it needs + // to write the instruction, so there is no need to add it to links_. + VIXL_ASSERT(!IsBound()); + links_.insert(instruction); + } + + void DeleteLink(ptrdiff_t instruction) { links_.erase(instruction); } + + void ClearAllLinks() { links_.clear(); } + + // TODO: The comment below considers average case complexity for our + // usual use-cases. The elements of interest are: + // - Branches to a label are emitted in order: branch instructions to a label + // are generated at an offset in the code generation buffer greater than any + // other branch to that same label already generated. As an example, this can + // be broken when an instruction is patched to become a branch. Note that the + // code will still work, but the complexity considerations below may locally + // not apply any more. + // - Veneers are generated in order: for multiple branches of the same type + // branching to the same unbound label going out of range, veneers are + // generated in growing order of the branch instruction offset from the start + // of the buffer. + // + // When creating a veneer for a branch going out of range, the link for this + // branch needs to be removed from this `links_`. Since all branches are + // tracked in one underlying InvalSet, the complexity for this deletion is the + // same as for finding the element, ie. O(n), where n is the number of links + // in the set. + // This could be reduced to O(1) by using the same trick as used when tracking + // branch information for veneers: split the container to use one set per type + // of branch. With that setup, when a veneer is created and the link needs to + // be deleted, if the two points above hold, it must be the minimum element of + // the set for its type of branch, and that minimum element will be accessible + // in O(1). + + // The offsets of the instructions that have linked to this label. + LinksSet links_; + // The label location. + ptrdiff_t location_; + + static const ptrdiff_t kLocationUnbound = -1; + +// It is not safe to copy labels, so disable the copy constructor and operator +// by declaring them private (without an implementation). +#if __cplusplus >= 201103L + Label(const Label&) = delete; + void operator=(const Label&) = delete; +#else + Label(const Label&); + void operator=(const Label&); +#endif + + // The Assembler class is responsible for binding and linking labels, since + // the stored offsets need to be consistent with the Assembler's buffer. + friend class Assembler; + // The MacroAssembler and VeneerPool handle resolution of branches to distant + // targets. + friend class MacroAssembler; + friend class VeneerPool; +}; + + +class Assembler; +class LiteralPool; + +// A literal is a 32-bit or 64-bit piece of data stored in the instruction +// stream and loaded through a pc relative load. The same literal can be +// referred to by multiple instructions but a literal can only reside at one +// place in memory. A literal can be used by a load before or after being +// placed in memory. +// +// Internally an offset of 0 is associated with a literal which has been +// neither used nor placed. Then two possibilities arise: +// 1) the label is placed, the offset (stored as offset + 1) is used to +// resolve any subsequent load using the label. +// 2) the label is not placed and offset is the offset of the last load using +// the literal (stored as -offset -1). If multiple loads refer to this +// literal then the last load holds the offset of the preceding load and +// all loads form a chain. Once the offset is placed all the loads in the +// chain are resolved and future loads fall back to possibility 1. +class RawLiteral { + public: + enum DeletionPolicy { + kDeletedOnPlacementByPool, + kDeletedOnPoolDestruction, + kManuallyDeleted + }; + + RawLiteral(size_t size, + LiteralPool* literal_pool, + DeletionPolicy deletion_policy = kManuallyDeleted); + + // The literal pool only sees and deletes `RawLiteral*` pointers, but they are + // actually pointing to `Literal` objects. + virtual ~RawLiteral() {} + + size_t GetSize() const { + VIXL_STATIC_ASSERT(kDRegSizeInBytes == kXRegSizeInBytes); + VIXL_STATIC_ASSERT(kSRegSizeInBytes == kWRegSizeInBytes); + VIXL_ASSERT((size_ == kXRegSizeInBytes) || (size_ == kWRegSizeInBytes) || + (size_ == kQRegSizeInBytes)); + return size_; + } + VIXL_DEPRECATED("GetSize", size_t size()) { return GetSize(); } + + uint64_t GetRawValue128Low64() const { + VIXL_ASSERT(size_ == kQRegSizeInBytes); + return low64_; + } + VIXL_DEPRECATED("GetRawValue128Low64", uint64_t raw_value128_low64()) { + return GetRawValue128Low64(); + } + + uint64_t GetRawValue128High64() const { + VIXL_ASSERT(size_ == kQRegSizeInBytes); + return high64_; + } + VIXL_DEPRECATED("GetRawValue128High64", uint64_t raw_value128_high64()) { + return GetRawValue128High64(); + } + + uint64_t GetRawValue64() const { + VIXL_ASSERT(size_ == kXRegSizeInBytes); + VIXL_ASSERT(high64_ == 0); + return low64_; + } + VIXL_DEPRECATED("GetRawValue64", uint64_t raw_value64()) { + return GetRawValue64(); + } + + uint32_t GetRawValue32() const { + VIXL_ASSERT(size_ == kWRegSizeInBytes); + VIXL_ASSERT(high64_ == 0); + VIXL_ASSERT(IsUint32(low64_) || IsInt32(low64_)); + return static_cast(low64_); + } + VIXL_DEPRECATED("GetRawValue32", uint32_t raw_value32()) { + return GetRawValue32(); + } + + bool IsUsed() const { return offset_ < 0; } + bool IsPlaced() const { return offset_ > 0; } + + LiteralPool* GetLiteralPool() const { return literal_pool_; } + + ptrdiff_t GetOffset() const { + VIXL_ASSERT(IsPlaced()); + return offset_ - 1; + } + VIXL_DEPRECATED("GetOffset", ptrdiff_t offset()) { return GetOffset(); } + + protected: + void SetOffset(ptrdiff_t offset) { + VIXL_ASSERT(offset >= 0); + VIXL_ASSERT(IsWordAligned(offset)); + VIXL_ASSERT(!IsPlaced()); + offset_ = offset + 1; + } + VIXL_DEPRECATED("SetOffset", void set_offset(ptrdiff_t offset)) { + SetOffset(offset); + } + + ptrdiff_t GetLastUse() const { + VIXL_ASSERT(IsUsed()); + return -offset_ - 1; + } + VIXL_DEPRECATED("GetLastUse", ptrdiff_t last_use()) { return GetLastUse(); } + + void SetLastUse(ptrdiff_t offset) { + VIXL_ASSERT(offset >= 0); + VIXL_ASSERT(IsWordAligned(offset)); + VIXL_ASSERT(!IsPlaced()); + offset_ = -offset - 1; + } + VIXL_DEPRECATED("SetLastUse", void set_last_use(ptrdiff_t offset)) { + SetLastUse(offset); + } + + size_t size_; + ptrdiff_t offset_; + uint64_t low64_; + uint64_t high64_; + + private: + LiteralPool* literal_pool_; + DeletionPolicy deletion_policy_; + + friend class Assembler; + friend class LiteralPool; +}; + + +template +class Literal : public RawLiteral { + public: + explicit Literal(T value, + LiteralPool* literal_pool = NULL, + RawLiteral::DeletionPolicy ownership = kManuallyDeleted) + : RawLiteral(sizeof(value), literal_pool, ownership) { + VIXL_STATIC_ASSERT(sizeof(value) <= kXRegSizeInBytes); + UpdateValue(value); + } + + Literal(T high64, + T low64, + LiteralPool* literal_pool = NULL, + RawLiteral::DeletionPolicy ownership = kManuallyDeleted) + : RawLiteral(kQRegSizeInBytes, literal_pool, ownership) { + VIXL_STATIC_ASSERT(sizeof(low64) == (kQRegSizeInBytes / 2)); + UpdateValue(high64, low64); + } + + virtual ~Literal() {} + + // Update the value of this literal, if necessary by rewriting the value in + // the pool. + // If the literal has already been placed in a literal pool, the address of + // the start of the code buffer must be provided, as the literal only knows it + // offset from there. This also allows patching the value after the code has + // been moved in memory. + void UpdateValue(T new_value, uint8_t* code_buffer = NULL) { + VIXL_ASSERT(sizeof(new_value) == size_); + memcpy(&low64_, &new_value, sizeof(new_value)); + if (IsPlaced()) { + VIXL_ASSERT(code_buffer != NULL); + RewriteValueInCode(code_buffer); + } + } + + void UpdateValue(T high64, T low64, uint8_t* code_buffer = NULL) { + VIXL_ASSERT(sizeof(low64) == size_ / 2); + memcpy(&low64_, &low64, sizeof(low64)); + memcpy(&high64_, &high64, sizeof(high64)); + if (IsPlaced()) { + VIXL_ASSERT(code_buffer != NULL); + RewriteValueInCode(code_buffer); + } + } + + void UpdateValue(T new_value, const Assembler* assembler); + void UpdateValue(T high64, T low64, const Assembler* assembler); + + private: + void RewriteValueInCode(uint8_t* code_buffer) { + VIXL_ASSERT(IsPlaced()); + VIXL_STATIC_ASSERT(sizeof(T) <= kXRegSizeInBytes); + switch (GetSize()) { + case kSRegSizeInBytes: + *reinterpret_cast(code_buffer + GetOffset()) = + GetRawValue32(); + break; + case kDRegSizeInBytes: + *reinterpret_cast(code_buffer + GetOffset()) = + GetRawValue64(); + break; + default: + VIXL_ASSERT(GetSize() == kQRegSizeInBytes); + uint64_t* base_address = + reinterpret_cast(code_buffer + GetOffset()); + *base_address = GetRawValue128Low64(); + *(base_address + 1) = GetRawValue128High64(); + } + } +}; + + +// Control whether or not position-independent code should be emitted. +enum PositionIndependentCodeOption { + // All code generated will be position-independent; all branches and + // references to labels generated with the Label class will use PC-relative + // addressing. + PositionIndependentCode, + + // Allow VIXL to generate code that refers to absolute addresses. With this + // option, it will not be possible to copy the code buffer and run it from a + // different address; code must be generated in its final location. + PositionDependentCode, + + // Allow VIXL to assume that the bottom 12 bits of the address will be + // constant, but that the top 48 bits may change. This allows `adrp` to + // function in systems which copy code between pages, but otherwise maintain + // 4KB page alignment. + PageOffsetDependentCode +}; + + +// Control how scaled- and unscaled-offset loads and stores are generated. +enum LoadStoreScalingOption { + // Prefer scaled-immediate-offset instructions, but emit unscaled-offset, + // register-offset, pre-index or post-index instructions if necessary. + PreferScaledOffset, + + // Prefer unscaled-immediate-offset instructions, but emit scaled-offset, + // register-offset, pre-index or post-index instructions if necessary. + PreferUnscaledOffset, + + // Require scaled-immediate-offset instructions. + RequireScaledOffset, + + // Require unscaled-immediate-offset instructions. + RequireUnscaledOffset +}; + + +// Assembler. +class Assembler : public vixl::internal::AssemblerBase { + public: + explicit Assembler( + PositionIndependentCodeOption pic = PositionIndependentCode) + : pic_(pic), cpu_features_(CPUFeatures::AArch64LegacyBaseline()) {} + explicit Assembler( + size_t capacity, + PositionIndependentCodeOption pic = PositionIndependentCode) + : AssemblerBase(capacity), + pic_(pic), + cpu_features_(CPUFeatures::AArch64LegacyBaseline()) {} + Assembler(byte* buffer, + size_t capacity, + PositionIndependentCodeOption pic = PositionIndependentCode) + : AssemblerBase(buffer, capacity), + pic_(pic), + cpu_features_(CPUFeatures::AArch64LegacyBaseline()) {} + + // Upon destruction, the code will assert that one of the following is true: + // * The Assembler object has not been used. + // * Nothing has been emitted since the last Reset() call. + // * Nothing has been emitted since the last FinalizeCode() call. + ~Assembler() {} + + // System functions. + + // Start generating code from the beginning of the buffer, discarding any code + // and data that has already been emitted into the buffer. + void Reset(); + + // Bind a label to the current PC. + void bind(Label* label); + + // Bind a label to a specified offset from the start of the buffer. + void BindToOffset(Label* label, ptrdiff_t offset); + + // Place a literal at the current PC. + void place(RawLiteral* literal); + + VIXL_DEPRECATED("GetCursorOffset", ptrdiff_t CursorOffset() const) { + return GetCursorOffset(); + } + + VIXL_DEPRECATED("GetBuffer().GetCapacity()", + ptrdiff_t GetBufferEndOffset() const) { + return static_cast(GetBuffer().GetCapacity()); + } + VIXL_DEPRECATED("GetBuffer().GetCapacity()", + ptrdiff_t BufferEndOffset() const) { + return GetBuffer().GetCapacity(); + } + + // Return the address of a bound label. + template + T GetLabelAddress(const Label* label) const { + VIXL_ASSERT(label->IsBound()); + VIXL_STATIC_ASSERT(sizeof(T) >= sizeof(uintptr_t)); + return GetBuffer().GetOffsetAddress(label->GetLocation()); + } + + Instruction* GetInstructionAt(ptrdiff_t instruction_offset) { + return GetBuffer()->GetOffsetAddress(instruction_offset); + } + VIXL_DEPRECATED("GetInstructionAt", + Instruction* InstructionAt(ptrdiff_t instruction_offset)) { + return GetInstructionAt(instruction_offset); + } + + ptrdiff_t GetInstructionOffset(Instruction* instruction) { + VIXL_STATIC_ASSERT(sizeof(*instruction) == 1); + ptrdiff_t offset = + instruction - GetBuffer()->GetStartAddress(); + VIXL_ASSERT((0 <= offset) && + (offset < static_cast(GetBuffer()->GetCapacity()))); + return offset; + } + VIXL_DEPRECATED("GetInstructionOffset", + ptrdiff_t InstructionOffset(Instruction* instruction)) { + return GetInstructionOffset(instruction); + } + + // Instruction set functions. + + // Branch / Jump instructions. + + // Branch to register. + void br(const Register& xn); + + // Branch with link to register. + void blr(const Register& xn); + + // Branch to register with return hint. + void ret(const Register& xn = lr); + + // Branch to register, with pointer authentication. Using key A and a modifier + // of zero [Armv8.3]. + void braaz(const Register& xn); + + // Branch to register, with pointer authentication. Using key B and a modifier + // of zero [Armv8.3]. + void brabz(const Register& xn); + + // Branch with link to register, with pointer authentication. Using key A and + // a modifier of zero [Armv8.3]. + void blraaz(const Register& xn); + + // Branch with link to register, with pointer authentication. Using key B and + // a modifier of zero [Armv8.3]. + void blrabz(const Register& xn); + + // Return from subroutine, with pointer authentication. Using key A [Armv8.3]. + void retaa(); + + // Return from subroutine, with pointer authentication. Using key B [Armv8.3]. + void retab(); + + // Branch to register, with pointer authentication. Using key A [Armv8.3]. + void braa(const Register& xn, const Register& xm); + + // Branch to register, with pointer authentication. Using key B [Armv8.3]. + void brab(const Register& xn, const Register& xm); + + // Branch with link to register, with pointer authentication. Using key A + // [Armv8.3]. + void blraa(const Register& xn, const Register& xm); + + // Branch with link to register, with pointer authentication. Using key B + // [Armv8.3]. + void blrab(const Register& xn, const Register& xm); + + // Unconditional branch to label. + void b(Label* label); + + // Conditional branch to label. + void b(Label* label, Condition cond); + + // Unconditional branch to PC offset. + void b(int64_t imm26); + + // Conditional branch to PC offset. + void b(int64_t imm19, Condition cond); + + // Branch with link to label. + void bl(Label* label); + + // Branch with link to PC offset. + void bl(int64_t imm26); + + // Compare and branch to label if zero. + void cbz(const Register& rt, Label* label); + + // Compare and branch to PC offset if zero. + void cbz(const Register& rt, int64_t imm19); + + // Compare and branch to label if not zero. + void cbnz(const Register& rt, Label* label); + + // Compare and branch to PC offset if not zero. + void cbnz(const Register& rt, int64_t imm19); + + // Table lookup from one register. + void tbl(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Table lookup from two registers. + void tbl(const VRegister& vd, + const VRegister& vn, + const VRegister& vn2, + const VRegister& vm); + + // Table lookup from three registers. + void tbl(const VRegister& vd, + const VRegister& vn, + const VRegister& vn2, + const VRegister& vn3, + const VRegister& vm); + + // Table lookup from four registers. + void tbl(const VRegister& vd, + const VRegister& vn, + const VRegister& vn2, + const VRegister& vn3, + const VRegister& vn4, + const VRegister& vm); + + // Table lookup extension from one register. + void tbx(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Table lookup extension from two registers. + void tbx(const VRegister& vd, + const VRegister& vn, + const VRegister& vn2, + const VRegister& vm); + + // Table lookup extension from three registers. + void tbx(const VRegister& vd, + const VRegister& vn, + const VRegister& vn2, + const VRegister& vn3, + const VRegister& vm); + + // Table lookup extension from four registers. + void tbx(const VRegister& vd, + const VRegister& vn, + const VRegister& vn2, + const VRegister& vn3, + const VRegister& vn4, + const VRegister& vm); + + // Test bit and branch to label if zero. + void tbz(const Register& rt, unsigned bit_pos, Label* label); + + // Test bit and branch to PC offset if zero. + void tbz(const Register& rt, unsigned bit_pos, int64_t imm14); + + // Test bit and branch to label if not zero. + void tbnz(const Register& rt, unsigned bit_pos, Label* label); + + // Test bit and branch to PC offset if not zero. + void tbnz(const Register& rt, unsigned bit_pos, int64_t imm14); + + // Address calculation instructions. + // Calculate a PC-relative address. Unlike for branches the offset in adr is + // unscaled (i.e. the result can be unaligned). + + // Calculate the address of a label. + void adr(const Register& xd, Label* label); + + // Calculate the address of a PC offset. + void adr(const Register& xd, int64_t imm21); + + // Calculate the page address of a label. + void adrp(const Register& xd, Label* label); + + // Calculate the page address of a PC offset. + void adrp(const Register& xd, int64_t imm21); + + // Data Processing instructions. + + // Add. + void add(const Register& rd, const Register& rn, const Operand& operand); + + // Add and update status flags. + void adds(const Register& rd, const Register& rn, const Operand& operand); + + // Compare negative. + void cmn(const Register& rn, const Operand& operand); + + // Subtract. + void sub(const Register& rd, const Register& rn, const Operand& operand); + + // Subtract and update status flags. + void subs(const Register& rd, const Register& rn, const Operand& operand); + + // Compare. + void cmp(const Register& rn, const Operand& operand); + + // Negate. + void neg(const Register& rd, const Operand& operand); + + // Negate and update status flags. + void negs(const Register& rd, const Operand& operand); + + // Add with carry bit. + void adc(const Register& rd, const Register& rn, const Operand& operand); + + // Add with carry bit and update status flags. + void adcs(const Register& rd, const Register& rn, const Operand& operand); + + // Subtract with carry bit. + void sbc(const Register& rd, const Register& rn, const Operand& operand); + + // Subtract with carry bit and update status flags. + void sbcs(const Register& rd, const Register& rn, const Operand& operand); + + // Rotate register right and insert into NZCV flags under the control of a + // mask [Armv8.4]. + void rmif(const Register& xn, unsigned rotation, StatusFlags flags); + + // Set NZCV flags from register, treated as an 8-bit value [Armv8.4]. + void setf8(const Register& rn); + + // Set NZCV flags from register, treated as an 16-bit value [Armv8.4]. + void setf16(const Register& rn); + + // Negate with carry bit. + void ngc(const Register& rd, const Operand& operand); + + // Negate with carry bit and update status flags. + void ngcs(const Register& rd, const Operand& operand); + + // Logical instructions. + + // Bitwise and (A & B). + void and_(const Register& rd, const Register& rn, const Operand& operand); + + // Bitwise and (A & B) and update status flags. + void ands(const Register& rd, const Register& rn, const Operand& operand); + + // Bit test and set flags. + void tst(const Register& rn, const Operand& operand); + + // Bit clear (A & ~B). + void bic(const Register& rd, const Register& rn, const Operand& operand); + + // Bit clear (A & ~B) and update status flags. + void bics(const Register& rd, const Register& rn, const Operand& operand); + + // Bitwise or (A | B). + void orr(const Register& rd, const Register& rn, const Operand& operand); + + // Bitwise nor (A | ~B). + void orn(const Register& rd, const Register& rn, const Operand& operand); + + // Bitwise eor/xor (A ^ B). + void eor(const Register& rd, const Register& rn, const Operand& operand); + + // Bitwise enor/xnor (A ^ ~B). + void eon(const Register& rd, const Register& rn, const Operand& operand); + + // Logical shift left by variable. + void lslv(const Register& rd, const Register& rn, const Register& rm); + + // Logical shift right by variable. + void lsrv(const Register& rd, const Register& rn, const Register& rm); + + // Arithmetic shift right by variable. + void asrv(const Register& rd, const Register& rn, const Register& rm); + + // Rotate right by variable. + void rorv(const Register& rd, const Register& rn, const Register& rm); + + // Bitfield instructions. + + // Bitfield move. + void bfm(const Register& rd, + const Register& rn, + unsigned immr, + unsigned imms); + + // Signed bitfield move. + void sbfm(const Register& rd, + const Register& rn, + unsigned immr, + unsigned imms); + + // Unsigned bitfield move. + void ubfm(const Register& rd, + const Register& rn, + unsigned immr, + unsigned imms); + + // Bfm aliases. + + // Bitfield insert. + void bfi(const Register& rd, + const Register& rn, + unsigned lsb, + unsigned width) { + VIXL_ASSERT(width >= 1); + VIXL_ASSERT(lsb + width <= static_cast(rn.GetSizeInBits())); + bfm(rd, + rn, + (rd.GetSizeInBits() - lsb) & (rd.GetSizeInBits() - 1), + width - 1); + } + + // Bitfield extract and insert low. + void bfxil(const Register& rd, + const Register& rn, + unsigned lsb, + unsigned width) { + VIXL_ASSERT(width >= 1); + VIXL_ASSERT(lsb + width <= static_cast(rn.GetSizeInBits())); + bfm(rd, rn, lsb, lsb + width - 1); + } + + // Bitfield clear [Armv8.2]. + void bfc(const Register& rd, unsigned lsb, unsigned width) { + bfi(rd, AppropriateZeroRegFor(rd), lsb, width); + } + + // Sbfm aliases. + + // Arithmetic shift right. + void asr(const Register& rd, const Register& rn, unsigned shift) { + VIXL_ASSERT(shift < static_cast(rd.GetSizeInBits())); + sbfm(rd, rn, shift, rd.GetSizeInBits() - 1); + } + + // Signed bitfield insert with zero at right. + void sbfiz(const Register& rd, + const Register& rn, + unsigned lsb, + unsigned width) { + VIXL_ASSERT(width >= 1); + VIXL_ASSERT(lsb + width <= static_cast(rn.GetSizeInBits())); + sbfm(rd, + rn, + (rd.GetSizeInBits() - lsb) & (rd.GetSizeInBits() - 1), + width - 1); + } + + // Signed bitfield extract. + void sbfx(const Register& rd, + const Register& rn, + unsigned lsb, + unsigned width) { + VIXL_ASSERT(width >= 1); + VIXL_ASSERT(lsb + width <= static_cast(rn.GetSizeInBits())); + sbfm(rd, rn, lsb, lsb + width - 1); + } + + // Signed extend byte. + void sxtb(const Register& rd, const Register& rn) { sbfm(rd, rn, 0, 7); } + + // Signed extend halfword. + void sxth(const Register& rd, const Register& rn) { sbfm(rd, rn, 0, 15); } + + // Signed extend word. + void sxtw(const Register& rd, const Register& rn) { sbfm(rd, rn, 0, 31); } + + // Ubfm aliases. + + // Logical shift left. + void lsl(const Register& rd, const Register& rn, unsigned shift) { + unsigned reg_size = rd.GetSizeInBits(); + VIXL_ASSERT(shift < reg_size); + ubfm(rd, rn, (reg_size - shift) % reg_size, reg_size - shift - 1); + } + + // Logical shift right. + void lsr(const Register& rd, const Register& rn, unsigned shift) { + VIXL_ASSERT(shift < static_cast(rd.GetSizeInBits())); + ubfm(rd, rn, shift, rd.GetSizeInBits() - 1); + } + + // Unsigned bitfield insert with zero at right. + void ubfiz(const Register& rd, + const Register& rn, + unsigned lsb, + unsigned width) { + VIXL_ASSERT(width >= 1); + VIXL_ASSERT(lsb + width <= static_cast(rn.GetSizeInBits())); + ubfm(rd, + rn, + (rd.GetSizeInBits() - lsb) & (rd.GetSizeInBits() - 1), + width - 1); + } + + // Unsigned bitfield extract. + void ubfx(const Register& rd, + const Register& rn, + unsigned lsb, + unsigned width) { + VIXL_ASSERT(width >= 1); + VIXL_ASSERT(lsb + width <= static_cast(rn.GetSizeInBits())); + ubfm(rd, rn, lsb, lsb + width - 1); + } + + // Unsigned extend byte. + void uxtb(const Register& rd, const Register& rn) { ubfm(rd, rn, 0, 7); } + + // Unsigned extend halfword. + void uxth(const Register& rd, const Register& rn) { ubfm(rd, rn, 0, 15); } + + // Unsigned extend word. + void uxtw(const Register& rd, const Register& rn) { ubfm(rd, rn, 0, 31); } + + // Extract. + void extr(const Register& rd, + const Register& rn, + const Register& rm, + unsigned lsb); + + // Conditional select: rd = cond ? rn : rm. + void csel(const Register& rd, + const Register& rn, + const Register& rm, + Condition cond); + + // Conditional select increment: rd = cond ? rn : rm + 1. + void csinc(const Register& rd, + const Register& rn, + const Register& rm, + Condition cond); + + // Conditional select inversion: rd = cond ? rn : ~rm. + void csinv(const Register& rd, + const Register& rn, + const Register& rm, + Condition cond); + + // Conditional select negation: rd = cond ? rn : -rm. + void csneg(const Register& rd, + const Register& rn, + const Register& rm, + Condition cond); + + // Conditional set: rd = cond ? 1 : 0. + void cset(const Register& rd, Condition cond); + + // Conditional set mask: rd = cond ? -1 : 0. + void csetm(const Register& rd, Condition cond); + + // Conditional increment: rd = cond ? rn + 1 : rn. + void cinc(const Register& rd, const Register& rn, Condition cond); + + // Conditional invert: rd = cond ? ~rn : rn. + void cinv(const Register& rd, const Register& rn, Condition cond); + + // Conditional negate: rd = cond ? -rn : rn. + void cneg(const Register& rd, const Register& rn, Condition cond); + + // Rotate right. + void ror(const Register& rd, const Register& rs, unsigned shift) { + extr(rd, rs, rs, shift); + } + + // Conditional comparison. + + // Conditional compare negative. + void ccmn(const Register& rn, + const Operand& operand, + StatusFlags nzcv, + Condition cond); + + // Conditional compare. + void ccmp(const Register& rn, + const Operand& operand, + StatusFlags nzcv, + Condition cond); + + // CRC-32 checksum from byte. + void crc32b(const Register& wd, const Register& wn, const Register& wm); + + // CRC-32 checksum from half-word. + void crc32h(const Register& wd, const Register& wn, const Register& wm); + + // CRC-32 checksum from word. + void crc32w(const Register& wd, const Register& wn, const Register& wm); + + // CRC-32 checksum from double word. + void crc32x(const Register& wd, const Register& wn, const Register& xm); + + // CRC-32 C checksum from byte. + void crc32cb(const Register& wd, const Register& wn, const Register& wm); + + // CRC-32 C checksum from half-word. + void crc32ch(const Register& wd, const Register& wn, const Register& wm); + + // CRC-32 C checksum from word. + void crc32cw(const Register& wd, const Register& wn, const Register& wm); + + // CRC-32C checksum from double word. + void crc32cx(const Register& wd, const Register& wn, const Register& xm); + + // Multiply. + void mul(const Register& rd, const Register& rn, const Register& rm); + + // Negated multiply. + void mneg(const Register& rd, const Register& rn, const Register& rm); + + // Signed long multiply: 32 x 32 -> 64-bit. + void smull(const Register& xd, const Register& wn, const Register& wm); + + // Signed multiply high: 64 x 64 -> 64-bit <127:64>. + void smulh(const Register& xd, const Register& xn, const Register& xm); + + // Multiply and accumulate. + void madd(const Register& rd, + const Register& rn, + const Register& rm, + const Register& ra); + + // Multiply and subtract. + void msub(const Register& rd, + const Register& rn, + const Register& rm, + const Register& ra); + + // Signed long multiply and accumulate: 32 x 32 + 64 -> 64-bit. + void smaddl(const Register& xd, + const Register& wn, + const Register& wm, + const Register& xa); + + // Unsigned long multiply and accumulate: 32 x 32 + 64 -> 64-bit. + void umaddl(const Register& xd, + const Register& wn, + const Register& wm, + const Register& xa); + + // Unsigned long multiply: 32 x 32 -> 64-bit. + void umull(const Register& xd, const Register& wn, const Register& wm) { + umaddl(xd, wn, wm, xzr); + } + + // Unsigned multiply high: 64 x 64 -> 64-bit <127:64>. + void umulh(const Register& xd, const Register& xn, const Register& xm); + + // Signed long multiply and subtract: 64 - (32 x 32) -> 64-bit. + void smsubl(const Register& xd, + const Register& wn, + const Register& wm, + const Register& xa); + + // Unsigned long multiply and subtract: 64 - (32 x 32) -> 64-bit. + void umsubl(const Register& xd, + const Register& wn, + const Register& wm, + const Register& xa); + + // Signed integer divide. + void sdiv(const Register& rd, const Register& rn, const Register& rm); + + // Unsigned integer divide. + void udiv(const Register& rd, const Register& rn, const Register& rm); + + // Bit reverse. + void rbit(const Register& rd, const Register& rn); + + // Reverse bytes in 16-bit half words. + void rev16(const Register& rd, const Register& rn); + + // Reverse bytes in 32-bit words. + void rev32(const Register& xd, const Register& xn); + + // Reverse bytes in 64-bit general purpose register, an alias for rev + // [Armv8.2]. + void rev64(const Register& xd, const Register& xn) { + VIXL_ASSERT(xd.Is64Bits() && xn.Is64Bits()); + rev(xd, xn); + } + + // Reverse bytes. + void rev(const Register& rd, const Register& rn); + + // Count leading zeroes. + void clz(const Register& rd, const Register& rn); + + // Count leading sign bits. + void cls(const Register& rd, const Register& rn); + + // Pointer Authentication Code for Instruction address, using key A [Armv8.3]. + void pacia(const Register& xd, const Register& rn); + + // Pointer Authentication Code for Instruction address, using key A and a + // modifier of zero [Armv8.3]. + void paciza(const Register& xd); + + // Pointer Authentication Code for Instruction address, using key A, with + // address in x17 and modifier in x16 [Armv8.3]. + void pacia1716(); + + // Pointer Authentication Code for Instruction address, using key A, with + // address in LR and modifier in SP [Armv8.3]. + void paciasp(); + + // Pointer Authentication Code for Instruction address, using key A, with + // address in LR and a modifier of zero [Armv8.3]. + void paciaz(); + + // Pointer Authentication Code for Instruction address, using key B [Armv8.3]. + void pacib(const Register& xd, const Register& xn); + + // Pointer Authentication Code for Instruction address, using key B and a + // modifier of zero [Armv8.3]. + void pacizb(const Register& xd); + + // Pointer Authentication Code for Instruction address, using key B, with + // address in x17 and modifier in x16 [Armv8.3]. + void pacib1716(); + + // Pointer Authentication Code for Instruction address, using key B, with + // address in LR and modifier in SP [Armv8.3]. + void pacibsp(); + + // Pointer Authentication Code for Instruction address, using key B, with + // address in LR and a modifier of zero [Armv8.3]. + void pacibz(); + + // Pointer Authentication Code for Data address, using key A [Armv8.3]. + void pacda(const Register& xd, const Register& xn); + + // Pointer Authentication Code for Data address, using key A and a modifier of + // zero [Armv8.3]. + void pacdza(const Register& xd); + + // Pointer Authentication Code for Data address, using key B [Armv8.3]. + void pacdb(const Register& xd, const Register& xn); + + // Pointer Authentication Code for Data address, using key B and a modifier of + // zero [Armv8.3]. + void pacdzb(const Register& xd); + + // Pointer Authentication Code, using Generic key [Armv8.3]. + void pacga(const Register& xd, const Register& xn, const Register& xm); + + // Authenticate Instruction address, using key A [Armv8.3]. + void autia(const Register& xd, const Register& xn); + + // Authenticate Instruction address, using key A and a modifier of zero + // [Armv8.3]. + void autiza(const Register& xd); + + // Authenticate Instruction address, using key A, with address in x17 and + // modifier in x16 [Armv8.3]. + void autia1716(); + + // Authenticate Instruction address, using key A, with address in LR and + // modifier in SP [Armv8.3]. + void autiasp(); + + // Authenticate Instruction address, using key A, with address in LR and a + // modifier of zero [Armv8.3]. + void autiaz(); + + // Authenticate Instruction address, using key B [Armv8.3]. + void autib(const Register& xd, const Register& xn); + + // Authenticate Instruction address, using key B and a modifier of zero + // [Armv8.3]. + void autizb(const Register& xd); + + // Authenticate Instruction address, using key B, with address in x17 and + // modifier in x16 [Armv8.3]. + void autib1716(); + + // Authenticate Instruction address, using key B, with address in LR and + // modifier in SP [Armv8.3]. + void autibsp(); + + // Authenticate Instruction address, using key B, with address in LR and a + // modifier of zero [Armv8.3]. + void autibz(); + + // Authenticate Data address, using key A [Armv8.3]. + void autda(const Register& xd, const Register& xn); + + // Authenticate Data address, using key A and a modifier of zero [Armv8.3]. + void autdza(const Register& xd); + + // Authenticate Data address, using key B [Armv8.3]. + void autdb(const Register& xd, const Register& xn); + + // Authenticate Data address, using key B and a modifier of zero [Armv8.3]. + void autdzb(const Register& xd); + + // Strip Pointer Authentication Code of Data address [Armv8.3]. + void xpacd(const Register& xd); + + // Strip Pointer Authentication Code of Instruction address [Armv8.3]. + void xpaci(const Register& xd); + + // Strip Pointer Authentication Code of Instruction address in LR [Armv8.3]. + void xpaclri(); + + // Memory instructions. + + // Load integer or FP register. + void ldr(const CPURegister& rt, + const MemOperand& src, + LoadStoreScalingOption option = PreferScaledOffset); + + // Store integer or FP register. + void str(const CPURegister& rt, + const MemOperand& dst, + LoadStoreScalingOption option = PreferScaledOffset); + + // Load word with sign extension. + void ldrsw(const Register& xt, + const MemOperand& src, + LoadStoreScalingOption option = PreferScaledOffset); + + // Load byte. + void ldrb(const Register& rt, + const MemOperand& src, + LoadStoreScalingOption option = PreferScaledOffset); + + // Store byte. + void strb(const Register& rt, + const MemOperand& dst, + LoadStoreScalingOption option = PreferScaledOffset); + + // Load byte with sign extension. + void ldrsb(const Register& rt, + const MemOperand& src, + LoadStoreScalingOption option = PreferScaledOffset); + + // Load half-word. + void ldrh(const Register& rt, + const MemOperand& src, + LoadStoreScalingOption option = PreferScaledOffset); + + // Store half-word. + void strh(const Register& rt, + const MemOperand& dst, + LoadStoreScalingOption option = PreferScaledOffset); + + // Load half-word with sign extension. + void ldrsh(const Register& rt, + const MemOperand& src, + LoadStoreScalingOption option = PreferScaledOffset); + + // Load integer or FP register (with unscaled offset). + void ldur(const CPURegister& rt, + const MemOperand& src, + LoadStoreScalingOption option = PreferUnscaledOffset); + + // Store integer or FP register (with unscaled offset). + void stur(const CPURegister& rt, + const MemOperand& src, + LoadStoreScalingOption option = PreferUnscaledOffset); + + // Load word with sign extension. + void ldursw(const Register& xt, + const MemOperand& src, + LoadStoreScalingOption option = PreferUnscaledOffset); + + // Load byte (with unscaled offset). + void ldurb(const Register& rt, + const MemOperand& src, + LoadStoreScalingOption option = PreferUnscaledOffset); + + // Store byte (with unscaled offset). + void sturb(const Register& rt, + const MemOperand& dst, + LoadStoreScalingOption option = PreferUnscaledOffset); + + // Load byte with sign extension (and unscaled offset). + void ldursb(const Register& rt, + const MemOperand& src, + LoadStoreScalingOption option = PreferUnscaledOffset); + + // Load half-word (with unscaled offset). + void ldurh(const Register& rt, + const MemOperand& src, + LoadStoreScalingOption option = PreferUnscaledOffset); + + // Store half-word (with unscaled offset). + void sturh(const Register& rt, + const MemOperand& dst, + LoadStoreScalingOption option = PreferUnscaledOffset); + + // Load half-word with sign extension (and unscaled offset). + void ldursh(const Register& rt, + const MemOperand& src, + LoadStoreScalingOption option = PreferUnscaledOffset); + + // Load double-word with pointer authentication, using data key A and a + // modifier of zero [Armv8.3]. + void ldraa(const Register& xt, const MemOperand& src); + + // Load double-word with pointer authentication, using data key B and a + // modifier of zero [Armv8.3]. + void ldrab(const Register& xt, const MemOperand& src); + + // Load integer or FP register pair. + void ldp(const CPURegister& rt, + const CPURegister& rt2, + const MemOperand& src); + + // Store integer or FP register pair. + void stp(const CPURegister& rt, + const CPURegister& rt2, + const MemOperand& dst); + + // Load word pair with sign extension. + void ldpsw(const Register& xt, const Register& xt2, const MemOperand& src); + + // Load integer or FP register pair, non-temporal. + void ldnp(const CPURegister& rt, + const CPURegister& rt2, + const MemOperand& src); + + // Store integer or FP register pair, non-temporal. + void stnp(const CPURegister& rt, + const CPURegister& rt2, + const MemOperand& dst); + + // Load integer or FP register from literal pool. + void ldr(const CPURegister& rt, RawLiteral* literal); + + // Load word with sign extension from literal pool. + void ldrsw(const Register& xt, RawLiteral* literal); + + // Load integer or FP register from pc + imm19 << 2. + void ldr(const CPURegister& rt, int64_t imm19); + + // Load word with sign extension from pc + imm19 << 2. + void ldrsw(const Register& xt, int64_t imm19); + + // Store exclusive byte. + void stxrb(const Register& rs, const Register& rt, const MemOperand& dst); + + // Store exclusive half-word. + void stxrh(const Register& rs, const Register& rt, const MemOperand& dst); + + // Store exclusive register. + void stxr(const Register& rs, const Register& rt, const MemOperand& dst); + + // Load exclusive byte. + void ldxrb(const Register& rt, const MemOperand& src); + + // Load exclusive half-word. + void ldxrh(const Register& rt, const MemOperand& src); + + // Load exclusive register. + void ldxr(const Register& rt, const MemOperand& src); + + // Store exclusive register pair. + void stxp(const Register& rs, + const Register& rt, + const Register& rt2, + const MemOperand& dst); + + // Load exclusive register pair. + void ldxp(const Register& rt, const Register& rt2, const MemOperand& src); + + // Store-release exclusive byte. + void stlxrb(const Register& rs, const Register& rt, const MemOperand& dst); + + // Store-release exclusive half-word. + void stlxrh(const Register& rs, const Register& rt, const MemOperand& dst); + + // Store-release exclusive register. + void stlxr(const Register& rs, const Register& rt, const MemOperand& dst); + + // Load-acquire exclusive byte. + void ldaxrb(const Register& rt, const MemOperand& src); + + // Load-acquire exclusive half-word. + void ldaxrh(const Register& rt, const MemOperand& src); + + // Load-acquire exclusive register. + void ldaxr(const Register& rt, const MemOperand& src); + + // Store-release exclusive register pair. + void stlxp(const Register& rs, + const Register& rt, + const Register& rt2, + const MemOperand& dst); + + // Load-acquire exclusive register pair. + void ldaxp(const Register& rt, const Register& rt2, const MemOperand& src); + + // Store-release byte. + void stlrb(const Register& rt, const MemOperand& dst); + + // Store-release half-word. + void stlrh(const Register& rt, const MemOperand& dst); + + // Store-release register. + void stlr(const Register& rt, const MemOperand& dst); + + // Load-acquire byte. + void ldarb(const Register& rt, const MemOperand& src); + + // Load-acquire half-word. + void ldarh(const Register& rt, const MemOperand& src); + + // Load-acquire register. + void ldar(const Register& rt, const MemOperand& src); + + // Store LORelease byte [Armv8.1]. + void stllrb(const Register& rt, const MemOperand& dst); + + // Store LORelease half-word [Armv8.1]. + void stllrh(const Register& rt, const MemOperand& dst); + + // Store LORelease register [Armv8.1]. + void stllr(const Register& rt, const MemOperand& dst); + + // Load LORelease byte [Armv8.1]. + void ldlarb(const Register& rt, const MemOperand& src); + + // Load LORelease half-word [Armv8.1]. + void ldlarh(const Register& rt, const MemOperand& src); + + // Load LORelease register [Armv8.1]. + void ldlar(const Register& rt, const MemOperand& src); + + // Compare and Swap word or doubleword in memory [Armv8.1]. + void cas(const Register& rs, const Register& rt, const MemOperand& src); + + // Compare and Swap word or doubleword in memory [Armv8.1]. + void casa(const Register& rs, const Register& rt, const MemOperand& src); + + // Compare and Swap word or doubleword in memory [Armv8.1]. + void casl(const Register& rs, const Register& rt, const MemOperand& src); + + // Compare and Swap word or doubleword in memory [Armv8.1]. + void casal(const Register& rs, const Register& rt, const MemOperand& src); + + // Compare and Swap byte in memory [Armv8.1]. + void casb(const Register& rs, const Register& rt, const MemOperand& src); + + // Compare and Swap byte in memory [Armv8.1]. + void casab(const Register& rs, const Register& rt, const MemOperand& src); + + // Compare and Swap byte in memory [Armv8.1]. + void caslb(const Register& rs, const Register& rt, const MemOperand& src); + + // Compare and Swap byte in memory [Armv8.1]. + void casalb(const Register& rs, const Register& rt, const MemOperand& src); + + // Compare and Swap halfword in memory [Armv8.1]. + void cash(const Register& rs, const Register& rt, const MemOperand& src); + + // Compare and Swap halfword in memory [Armv8.1]. + void casah(const Register& rs, const Register& rt, const MemOperand& src); + + // Compare and Swap halfword in memory [Armv8.1]. + void caslh(const Register& rs, const Register& rt, const MemOperand& src); + + // Compare and Swap halfword in memory [Armv8.1]. + void casalh(const Register& rs, const Register& rt, const MemOperand& src); + + // Compare and Swap Pair of words or doublewords in memory [Armv8.1]. + void casp(const Register& rs, + const Register& rs2, + const Register& rt, + const Register& rt2, + const MemOperand& src); + + // Compare and Swap Pair of words or doublewords in memory [Armv8.1]. + void caspa(const Register& rs, + const Register& rs2, + const Register& rt, + const Register& rt2, + const MemOperand& src); + + // Compare and Swap Pair of words or doublewords in memory [Armv8.1]. + void caspl(const Register& rs, + const Register& rs2, + const Register& rt, + const Register& rt2, + const MemOperand& src); + + // Compare and Swap Pair of words or doublewords in memory [Armv8.1]. + void caspal(const Register& rs, + const Register& rs2, + const Register& rt, + const Register& rt2, + const MemOperand& src); + + // Store-release byte (with unscaled offset) [Armv8.4]. + void stlurb(const Register& rt, const MemOperand& dst); + + // Load-acquire RCpc Register byte (with unscaled offset) [Armv8.4]. + void ldapurb(const Register& rt, const MemOperand& src); + + // Load-acquire RCpc Register signed byte (with unscaled offset) [Armv8.4]. + void ldapursb(const Register& rt, const MemOperand& src); + + // Store-release half-word (with unscaled offset) [Armv8.4]. + void stlurh(const Register& rt, const MemOperand& dst); + + // Load-acquire RCpc Register half-word (with unscaled offset) [Armv8.4]. + void ldapurh(const Register& rt, const MemOperand& src); + + // Load-acquire RCpc Register signed half-word (with unscaled offset) + // [Armv8.4]. + void ldapursh(const Register& rt, const MemOperand& src); + + // Store-release word or double-word (with unscaled offset) [Armv8.4]. + void stlur(const Register& rt, const MemOperand& dst); + + // Load-acquire RCpc Register word or double-word (with unscaled offset) + // [Armv8.4]. + void ldapur(const Register& rt, const MemOperand& src); + + // Load-acquire RCpc Register signed word (with unscaled offset) [Armv8.4]. + void ldapursw(const Register& xt, const MemOperand& src); + + // Atomic add on byte in memory [Armv8.1] + void ldaddb(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic add on byte in memory, with Load-acquire semantics [Armv8.1] + void ldaddab(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic add on byte in memory, with Store-release semantics [Armv8.1] + void ldaddlb(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic add on byte in memory, with Load-acquire and Store-release semantics + // [Armv8.1] + void ldaddalb(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic add on halfword in memory [Armv8.1] + void ldaddh(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic add on halfword in memory, with Load-acquire semantics [Armv8.1] + void ldaddah(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic add on halfword in memory, with Store-release semantics [Armv8.1] + void ldaddlh(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic add on halfword in memory, with Load-acquire and Store-release + // semantics [Armv8.1] + void ldaddalh(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic add on word or doubleword in memory [Armv8.1] + void ldadd(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic add on word or doubleword in memory, with Load-acquire semantics + // [Armv8.1] + void ldadda(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic add on word or doubleword in memory, with Store-release semantics + // [Armv8.1] + void ldaddl(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic add on word or doubleword in memory, with Load-acquire and + // Store-release semantics [Armv8.1] + void ldaddal(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic bit clear on byte in memory [Armv8.1] + void ldclrb(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic bit clear on byte in memory, with Load-acquire semantics [Armv8.1] + void ldclrab(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic bit clear on byte in memory, with Store-release semantics [Armv8.1] + void ldclrlb(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic bit clear on byte in memory, with Load-acquire and Store-release + // semantics [Armv8.1] + void ldclralb(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic bit clear on halfword in memory [Armv8.1] + void ldclrh(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic bit clear on halfword in memory, with Load-acquire semantics + // [Armv8.1] + void ldclrah(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic bit clear on halfword in memory, with Store-release semantics + // [Armv8.1] + void ldclrlh(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic bit clear on halfword in memory, with Load-acquire and Store-release + // semantics [Armv8.1] + void ldclralh(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic bit clear on word or doubleword in memory [Armv8.1] + void ldclr(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic bit clear on word or doubleword in memory, with Load-acquire + // semantics [Armv8.1] + void ldclra(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic bit clear on word or doubleword in memory, with Store-release + // semantics [Armv8.1] + void ldclrl(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic bit clear on word or doubleword in memory, with Load-acquire and + // Store-release semantics [Armv8.1] + void ldclral(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic exclusive OR on byte in memory [Armv8.1] + void ldeorb(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic exclusive OR on byte in memory, with Load-acquire semantics + // [Armv8.1] + void ldeorab(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic exclusive OR on byte in memory, with Store-release semantics + // [Armv8.1] + void ldeorlb(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic exclusive OR on byte in memory, with Load-acquire and Store-release + // semantics [Armv8.1] + void ldeoralb(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic exclusive OR on halfword in memory [Armv8.1] + void ldeorh(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic exclusive OR on halfword in memory, with Load-acquire semantics + // [Armv8.1] + void ldeorah(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic exclusive OR on halfword in memory, with Store-release semantics + // [Armv8.1] + void ldeorlh(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic exclusive OR on halfword in memory, with Load-acquire and + // Store-release semantics [Armv8.1] + void ldeoralh(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic exclusive OR on word or doubleword in memory [Armv8.1] + void ldeor(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic exclusive OR on word or doubleword in memory, with Load-acquire + // semantics [Armv8.1] + void ldeora(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic exclusive OR on word or doubleword in memory, with Store-release + // semantics [Armv8.1] + void ldeorl(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic exclusive OR on word or doubleword in memory, with Load-acquire and + // Store-release semantics [Armv8.1] + void ldeoral(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic bit set on byte in memory [Armv8.1] + void ldsetb(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic bit set on byte in memory, with Load-acquire semantics [Armv8.1] + void ldsetab(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic bit set on byte in memory, with Store-release semantics [Armv8.1] + void ldsetlb(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic bit set on byte in memory, with Load-acquire and Store-release + // semantics [Armv8.1] + void ldsetalb(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic bit set on halfword in memory [Armv8.1] + void ldseth(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic bit set on halfword in memory, with Load-acquire semantics [Armv8.1] + void ldsetah(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic bit set on halfword in memory, with Store-release semantics + // [Armv8.1] + void ldsetlh(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic bit set on halfword in memory, with Load-acquire and Store-release + // semantics [Armv8.1] + void ldsetalh(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic bit set on word or doubleword in memory [Armv8.1] + void ldset(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic bit set on word or doubleword in memory, with Load-acquire semantics + // [Armv8.1] + void ldseta(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic bit set on word or doubleword in memory, with Store-release + // semantics [Armv8.1] + void ldsetl(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic bit set on word or doubleword in memory, with Load-acquire and + // Store-release semantics [Armv8.1] + void ldsetal(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic signed maximum on byte in memory [Armv8.1] + void ldsmaxb(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic signed maximum on byte in memory, with Load-acquire semantics + // [Armv8.1] + void ldsmaxab(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic signed maximum on byte in memory, with Store-release semantics + // [Armv8.1] + void ldsmaxlb(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic signed maximum on byte in memory, with Load-acquire and + // Store-release semantics [Armv8.1] + void ldsmaxalb(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic signed maximum on halfword in memory [Armv8.1] + void ldsmaxh(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic signed maximum on halfword in memory, with Load-acquire semantics + // [Armv8.1] + void ldsmaxah(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic signed maximum on halfword in memory, with Store-release semantics + // [Armv8.1] + void ldsmaxlh(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic signed maximum on halfword in memory, with Load-acquire and + // Store-release semantics [Armv8.1] + void ldsmaxalh(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic signed maximum on word or doubleword in memory [Armv8.1] + void ldsmax(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic signed maximum on word or doubleword in memory, with Load-acquire + // semantics [Armv8.1] + void ldsmaxa(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic signed maximum on word or doubleword in memory, with Store-release + // semantics [Armv8.1] + void ldsmaxl(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic signed maximum on word or doubleword in memory, with Load-acquire + // and Store-release semantics [Armv8.1] + void ldsmaxal(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic signed minimum on byte in memory [Armv8.1] + void ldsminb(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic signed minimum on byte in memory, with Load-acquire semantics + // [Armv8.1] + void ldsminab(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic signed minimum on byte in memory, with Store-release semantics + // [Armv8.1] + void ldsminlb(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic signed minimum on byte in memory, with Load-acquire and + // Store-release semantics [Armv8.1] + void ldsminalb(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic signed minimum on halfword in memory [Armv8.1] + void ldsminh(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic signed minimum on halfword in memory, with Load-acquire semantics + // [Armv8.1] + void ldsminah(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic signed minimum on halfword in memory, with Store-release semantics + // [Armv8.1] + void ldsminlh(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic signed minimum on halfword in memory, with Load-acquire and + // Store-release semantics [Armv8.1] + void ldsminalh(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic signed minimum on word or doubleword in memory [Armv8.1] + void ldsmin(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic signed minimum on word or doubleword in memory, with Load-acquire + // semantics [Armv8.1] + void ldsmina(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic signed minimum on word or doubleword in memory, with Store-release + // semantics [Armv8.1] + void ldsminl(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic signed minimum on word or doubleword in memory, with Load-acquire + // and Store-release semantics [Armv8.1] + void ldsminal(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic unsigned maximum on byte in memory [Armv8.1] + void ldumaxb(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic unsigned maximum on byte in memory, with Load-acquire semantics + // [Armv8.1] + void ldumaxab(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic unsigned maximum on byte in memory, with Store-release semantics + // [Armv8.1] + void ldumaxlb(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic unsigned maximum on byte in memory, with Load-acquire and + // Store-release semantics [Armv8.1] + void ldumaxalb(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic unsigned maximum on halfword in memory [Armv8.1] + void ldumaxh(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic unsigned maximum on halfword in memory, with Load-acquire semantics + // [Armv8.1] + void ldumaxah(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic unsigned maximum on halfword in memory, with Store-release semantics + // [Armv8.1] + void ldumaxlh(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic unsigned maximum on halfword in memory, with Load-acquire and + // Store-release semantics [Armv8.1] + void ldumaxalh(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic unsigned maximum on word or doubleword in memory [Armv8.1] + void ldumax(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic unsigned maximum on word or doubleword in memory, with Load-acquire + // semantics [Armv8.1] + void ldumaxa(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic unsigned maximum on word or doubleword in memory, with Store-release + // semantics [Armv8.1] + void ldumaxl(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic unsigned maximum on word or doubleword in memory, with Load-acquire + // and Store-release semantics [Armv8.1] + void ldumaxal(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic unsigned minimum on byte in memory [Armv8.1] + void lduminb(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic unsigned minimum on byte in memory, with Load-acquire semantics + // [Armv8.1] + void lduminab(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic unsigned minimum on byte in memory, with Store-release semantics + // [Armv8.1] + void lduminlb(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic unsigned minimum on byte in memory, with Load-acquire and + // Store-release semantics [Armv8.1] + void lduminalb(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic unsigned minimum on halfword in memory [Armv8.1] + void lduminh(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic unsigned minimum on halfword in memory, with Load-acquire semantics + // [Armv8.1] + void lduminah(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic unsigned minimum on halfword in memory, with Store-release semantics + // [Armv8.1] + void lduminlh(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic unsigned minimum on halfword in memory, with Load-acquire and + // Store-release semantics [Armv8.1] + void lduminalh(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic unsigned minimum on word or doubleword in memory [Armv8.1] + void ldumin(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic unsigned minimum on word or doubleword in memory, with Load-acquire + // semantics [Armv8.1] + void ldumina(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic unsigned minimum on word or doubleword in memory, with Store-release + // semantics [Armv8.1] + void lduminl(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic unsigned minimum on word or doubleword in memory, with Load-acquire + // and Store-release semantics [Armv8.1] + void lduminal(const Register& rs, const Register& rt, const MemOperand& src); + + // Atomic add on byte in memory, without return. [Armv8.1] + void staddb(const Register& rs, const MemOperand& src); + + // Atomic add on byte in memory, with Store-release semantics and without + // return. [Armv8.1] + void staddlb(const Register& rs, const MemOperand& src); + + // Atomic add on halfword in memory, without return. [Armv8.1] + void staddh(const Register& rs, const MemOperand& src); + + // Atomic add on halfword in memory, with Store-release semantics and without + // return. [Armv8.1] + void staddlh(const Register& rs, const MemOperand& src); + + // Atomic add on word or doubleword in memory, without return. [Armv8.1] + void stadd(const Register& rs, const MemOperand& src); + + // Atomic add on word or doubleword in memory, with Store-release semantics + // and without return. [Armv8.1] + void staddl(const Register& rs, const MemOperand& src); + + // Atomic bit clear on byte in memory, without return. [Armv8.1] + void stclrb(const Register& rs, const MemOperand& src); + + // Atomic bit clear on byte in memory, with Store-release semantics and + // without return. [Armv8.1] + void stclrlb(const Register& rs, const MemOperand& src); + + // Atomic bit clear on halfword in memory, without return. [Armv8.1] + void stclrh(const Register& rs, const MemOperand& src); + + // Atomic bit clear on halfword in memory, with Store-release semantics and + // without return. [Armv8.1] + void stclrlh(const Register& rs, const MemOperand& src); + + // Atomic bit clear on word or doubleword in memory, without return. [Armv8.1] + void stclr(const Register& rs, const MemOperand& src); + + // Atomic bit clear on word or doubleword in memory, with Store-release + // semantics and without return. [Armv8.1] + void stclrl(const Register& rs, const MemOperand& src); + + // Atomic exclusive OR on byte in memory, without return. [Armv8.1] + void steorb(const Register& rs, const MemOperand& src); + + // Atomic exclusive OR on byte in memory, with Store-release semantics and + // without return. [Armv8.1] + void steorlb(const Register& rs, const MemOperand& src); + + // Atomic exclusive OR on halfword in memory, without return. [Armv8.1] + void steorh(const Register& rs, const MemOperand& src); + + // Atomic exclusive OR on halfword in memory, with Store-release semantics + // and without return. [Armv8.1] + void steorlh(const Register& rs, const MemOperand& src); + + // Atomic exclusive OR on word or doubleword in memory, without return. + // [Armv8.1] + void steor(const Register& rs, const MemOperand& src); + + // Atomic exclusive OR on word or doubleword in memory, with Store-release + // semantics and without return. [Armv8.1] + void steorl(const Register& rs, const MemOperand& src); + + // Atomic bit set on byte in memory, without return. [Armv8.1] + void stsetb(const Register& rs, const MemOperand& src); + + // Atomic bit set on byte in memory, with Store-release semantics and without + // return. [Armv8.1] + void stsetlb(const Register& rs, const MemOperand& src); + + // Atomic bit set on halfword in memory, without return. [Armv8.1] + void stseth(const Register& rs, const MemOperand& src); + + // Atomic bit set on halfword in memory, with Store-release semantics and + // without return. [Armv8.1] + void stsetlh(const Register& rs, const MemOperand& src); + + // Atomic bit set on word or doubleword in memory, without return. [Armv8.1] + void stset(const Register& rs, const MemOperand& src); + + // Atomic bit set on word or doubleword in memory, with Store-release + // semantics and without return. [Armv8.1] + void stsetl(const Register& rs, const MemOperand& src); + + // Atomic signed maximum on byte in memory, without return. [Armv8.1] + void stsmaxb(const Register& rs, const MemOperand& src); + + // Atomic signed maximum on byte in memory, with Store-release semantics and + // without return. [Armv8.1] + void stsmaxlb(const Register& rs, const MemOperand& src); + + // Atomic signed maximum on halfword in memory, without return. [Armv8.1] + void stsmaxh(const Register& rs, const MemOperand& src); + + // Atomic signed maximum on halfword in memory, with Store-release semantics + // and without return. [Armv8.1] + void stsmaxlh(const Register& rs, const MemOperand& src); + + // Atomic signed maximum on word or doubleword in memory, without return. + // [Armv8.1] + void stsmax(const Register& rs, const MemOperand& src); + + // Atomic signed maximum on word or doubleword in memory, with Store-release + // semantics and without return. [Armv8.1] + void stsmaxl(const Register& rs, const MemOperand& src); + + // Atomic signed minimum on byte in memory, without return. [Armv8.1] + void stsminb(const Register& rs, const MemOperand& src); + + // Atomic signed minimum on byte in memory, with Store-release semantics and + // without return. [Armv8.1] + void stsminlb(const Register& rs, const MemOperand& src); + + // Atomic signed minimum on halfword in memory, without return. [Armv8.1] + void stsminh(const Register& rs, const MemOperand& src); + + // Atomic signed minimum on halfword in memory, with Store-release semantics + // and without return. [Armv8.1] + void stsminlh(const Register& rs, const MemOperand& src); + + // Atomic signed minimum on word or doubleword in memory, without return. + // [Armv8.1] + void stsmin(const Register& rs, const MemOperand& src); + + // Atomic signed minimum on word or doubleword in memory, with Store-release + // semantics and without return. semantics [Armv8.1] + void stsminl(const Register& rs, const MemOperand& src); + + // Atomic unsigned maximum on byte in memory, without return. [Armv8.1] + void stumaxb(const Register& rs, const MemOperand& src); + + // Atomic unsigned maximum on byte in memory, with Store-release semantics and + // without return. [Armv8.1] + void stumaxlb(const Register& rs, const MemOperand& src); + + // Atomic unsigned maximum on halfword in memory, without return. [Armv8.1] + void stumaxh(const Register& rs, const MemOperand& src); + + // Atomic unsigned maximum on halfword in memory, with Store-release semantics + // and without return. [Armv8.1] + void stumaxlh(const Register& rs, const MemOperand& src); + + // Atomic unsigned maximum on word or doubleword in memory, without return. + // [Armv8.1] + void stumax(const Register& rs, const MemOperand& src); + + // Atomic unsigned maximum on word or doubleword in memory, with Store-release + // semantics and without return. [Armv8.1] + void stumaxl(const Register& rs, const MemOperand& src); + + // Atomic unsigned minimum on byte in memory, without return. [Armv8.1] + void stuminb(const Register& rs, const MemOperand& src); + + // Atomic unsigned minimum on byte in memory, with Store-release semantics and + // without return. [Armv8.1] + void stuminlb(const Register& rs, const MemOperand& src); + + // Atomic unsigned minimum on halfword in memory, without return. [Armv8.1] + void stuminh(const Register& rs, const MemOperand& src); + + // Atomic unsigned minimum on halfword in memory, with Store-release semantics + // and without return. [Armv8.1] + void stuminlh(const Register& rs, const MemOperand& src); + + // Atomic unsigned minimum on word or doubleword in memory, without return. + // [Armv8.1] + void stumin(const Register& rs, const MemOperand& src); + + // Atomic unsigned minimum on word or doubleword in memory, with Store-release + // semantics and without return. [Armv8.1] + void stuminl(const Register& rs, const MemOperand& src); + + // Swap byte in memory [Armv8.1] + void swpb(const Register& rs, const Register& rt, const MemOperand& src); + + // Swap byte in memory, with Load-acquire semantics [Armv8.1] + void swpab(const Register& rs, const Register& rt, const MemOperand& src); + + // Swap byte in memory, with Store-release semantics [Armv8.1] + void swplb(const Register& rs, const Register& rt, const MemOperand& src); + + // Swap byte in memory, with Load-acquire and Store-release semantics + // [Armv8.1] + void swpalb(const Register& rs, const Register& rt, const MemOperand& src); + + // Swap halfword in memory [Armv8.1] + void swph(const Register& rs, const Register& rt, const MemOperand& src); + + // Swap halfword in memory, with Load-acquire semantics [Armv8.1] + void swpah(const Register& rs, const Register& rt, const MemOperand& src); + + // Swap halfword in memory, with Store-release semantics [Armv8.1] + void swplh(const Register& rs, const Register& rt, const MemOperand& src); + + // Swap halfword in memory, with Load-acquire and Store-release semantics + // [Armv8.1] + void swpalh(const Register& rs, const Register& rt, const MemOperand& src); + + // Swap word or doubleword in memory [Armv8.1] + void swp(const Register& rs, const Register& rt, const MemOperand& src); + + // Swap word or doubleword in memory, with Load-acquire semantics [Armv8.1] + void swpa(const Register& rs, const Register& rt, const MemOperand& src); + + // Swap word or doubleword in memory, with Store-release semantics [Armv8.1] + void swpl(const Register& rs, const Register& rt, const MemOperand& src); + + // Swap word or doubleword in memory, with Load-acquire and Store-release + // semantics [Armv8.1] + void swpal(const Register& rs, const Register& rt, const MemOperand& src); + + // Load-Acquire RCpc Register byte [Armv8.3] + void ldaprb(const Register& rt, const MemOperand& src); + + // Load-Acquire RCpc Register halfword [Armv8.3] + void ldaprh(const Register& rt, const MemOperand& src); + + // Load-Acquire RCpc Register word or doubleword [Armv8.3] + void ldapr(const Register& rt, const MemOperand& src); + + // Prefetch memory. + void prfm(PrefetchOperation op, + const MemOperand& addr, + LoadStoreScalingOption option = PreferScaledOffset); + + // Prefetch memory (with unscaled offset). + void prfum(PrefetchOperation op, + const MemOperand& addr, + LoadStoreScalingOption option = PreferUnscaledOffset); + + // Prefetch memory in the literal pool. + void prfm(PrefetchOperation op, RawLiteral* literal); + + // Prefetch from pc + imm19 << 2. + void prfm(PrefetchOperation op, int64_t imm19); + + // Prefetch memory (allowing unallocated hints). + void prfm(int op, + const MemOperand& addr, + LoadStoreScalingOption option = PreferScaledOffset); + + // Prefetch memory (with unscaled offset, allowing unallocated hints). + void prfum(int op, + const MemOperand& addr, + LoadStoreScalingOption option = PreferUnscaledOffset); + + // Prefetch memory in the literal pool (allowing unallocated hints). + void prfm(int op, RawLiteral* literal); + + // Prefetch from pc + imm19 << 2 (allowing unallocated hints). + void prfm(int op, int64_t imm19); + + // Move instructions. The default shift of -1 indicates that the move + // instruction will calculate an appropriate 16-bit immediate and left shift + // that is equal to the 64-bit immediate argument. If an explicit left shift + // is specified (0, 16, 32 or 48), the immediate must be a 16-bit value. + // + // For movk, an explicit shift can be used to indicate which half word should + // be overwritten, eg. movk(x0, 0, 0) will overwrite the least-significant + // half word with zero, whereas movk(x0, 0, 48) will overwrite the + // most-significant. + + // Move immediate and keep. + void movk(const Register& rd, uint64_t imm, int shift = -1) { + MoveWide(rd, imm, shift, MOVK); + } + + // Move inverted immediate. + void movn(const Register& rd, uint64_t imm, int shift = -1) { + MoveWide(rd, imm, shift, MOVN); + } + + // Move immediate. + void movz(const Register& rd, uint64_t imm, int shift = -1) { + MoveWide(rd, imm, shift, MOVZ); + } + + // Move immediate, aliases for movz, movn, orr. + void mov(const Register& rd, uint64_t imm) { + if (!OneInstrMoveImmediateHelper(this, rd, imm)) { + VIXL_UNIMPLEMENTED(); + } + } + + // Misc instructions. + + // Monitor debug-mode breakpoint. + void brk(int code); + + // Halting debug-mode breakpoint. + void hlt(int code); + + // Generate exception targeting EL1. + void svc(int code); + + // Generate undefined instruction exception. + void udf(int code); + + // Move register to register. + void mov(const Register& rd, const Register& rn); + + // Move inverted operand to register. + void mvn(const Register& rd, const Operand& operand); + + // System instructions. + + // Move to register from system register. + void mrs(const Register& xt, SystemRegister sysreg); + + // Move from register to system register. + void msr(SystemRegister sysreg, const Register& xt); + + // Invert carry flag [Armv8.4]. + void cfinv(); + + // Convert floating-point condition flags from alternative format to Arm + // format [Armv8.5]. + void xaflag(); + + // Convert floating-point condition flags from Arm format to alternative + // format [Armv8.5]. + void axflag(); + + // System instruction. + void sys(int op1, int crn, int crm, int op2, const Register& xt = xzr); + + // System instruction with pre-encoded op (op1:crn:crm:op2). + void sys(int op, const Register& xt = xzr); + + // System data cache operation. + void dc(DataCacheOp op, const Register& rt); + + // System instruction cache operation. + void ic(InstructionCacheOp op, const Register& rt); + + // System hint (named type). + void hint(SystemHint code); + + // System hint (numbered type). + void hint(int imm7); + + // Clear exclusive monitor. + void clrex(int imm4 = 0xf); + + // Data memory barrier. + void dmb(BarrierDomain domain, BarrierType type); + + // Data synchronization barrier. + void dsb(BarrierDomain domain, BarrierType type); + + // Instruction synchronization barrier. + void isb(); + + // Error synchronization barrier. + void esb(); + + // Conditional speculation dependency barrier. + void csdb(); + + // No-op. + void nop() { hint(NOP); } + + // Branch target identification. + void bti(BranchTargetIdentifier id); + + // FP and NEON instructions. + + // Move double precision immediate to FP register. + void fmov(const VRegister& vd, double imm); + + // Move single precision immediate to FP register. + void fmov(const VRegister& vd, float imm); + + // Move half precision immediate to FP register [Armv8.2]. + void fmov(const VRegister& vd, Float16 imm); + + // Move FP register to register. + void fmov(const Register& rd, const VRegister& fn); + + // Move register to FP register. + void fmov(const VRegister& vd, const Register& rn); + + // Move FP register to FP register. + void fmov(const VRegister& vd, const VRegister& fn); + + // Move 64-bit register to top half of 128-bit FP register. + void fmov(const VRegister& vd, int index, const Register& rn); + + // Move top half of 128-bit FP register to 64-bit register. + void fmov(const Register& rd, const VRegister& vn, int index); + + // FP add. + void fadd(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // FP subtract. + void fsub(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // FP multiply. + void fmul(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // FP fused multiply-add. + void fmadd(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + const VRegister& va); + + // FP fused multiply-subtract. + void fmsub(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + const VRegister& va); + + // FP fused multiply-add and negate. + void fnmadd(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + const VRegister& va); + + // FP fused multiply-subtract and negate. + void fnmsub(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + const VRegister& va); + + // FP multiply-negate scalar. + void fnmul(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // FP reciprocal exponent scalar. + void frecpx(const VRegister& vd, const VRegister& vn); + + // FP divide. + void fdiv(const VRegister& vd, const VRegister& fn, const VRegister& vm); + + // FP maximum. + void fmax(const VRegister& vd, const VRegister& fn, const VRegister& vm); + + // FP minimum. + void fmin(const VRegister& vd, const VRegister& fn, const VRegister& vm); + + // FP maximum number. + void fmaxnm(const VRegister& vd, const VRegister& fn, const VRegister& vm); + + // FP minimum number. + void fminnm(const VRegister& vd, const VRegister& fn, const VRegister& vm); + + // FP absolute. + void fabs(const VRegister& vd, const VRegister& vn); + + // FP negate. + void fneg(const VRegister& vd, const VRegister& vn); + + // FP square root. + void fsqrt(const VRegister& vd, const VRegister& vn); + + // FP round to integer, nearest with ties to away. + void frinta(const VRegister& vd, const VRegister& vn); + + // FP round to integer, implicit rounding. + void frinti(const VRegister& vd, const VRegister& vn); + + // FP round to integer, toward minus infinity. + void frintm(const VRegister& vd, const VRegister& vn); + + // FP round to integer, nearest with ties to even. + void frintn(const VRegister& vd, const VRegister& vn); + + // FP round to integer, toward plus infinity. + void frintp(const VRegister& vd, const VRegister& vn); + + // FP round to integer, exact, implicit rounding. + void frintx(const VRegister& vd, const VRegister& vn); + + // FP round to integer, towards zero. + void frintz(const VRegister& vd, const VRegister& vn); + + // FP round to 32-bit integer, exact, implicit rounding [Armv8.5]. + void frint32x(const VRegister& vd, const VRegister& vn); + + // FP round to 32-bit integer, towards zero [Armv8.5]. + void frint32z(const VRegister& vd, const VRegister& vn); + + // FP round to 64-bit integer, exact, implicit rounding [Armv8.5]. + void frint64x(const VRegister& vd, const VRegister& vn); + + // FP round to 64-bit integer, towards zero [Armv8.5]. + void frint64z(const VRegister& vd, const VRegister& vn); + + void FPCompareMacro(const VRegister& vn, double value, FPTrapFlags trap); + + void FPCompareMacro(const VRegister& vn, + const VRegister& vm, + FPTrapFlags trap); + + // FP compare registers. + void fcmp(const VRegister& vn, const VRegister& vm); + + // FP compare immediate. + void fcmp(const VRegister& vn, double value); + + void FPCCompareMacro(const VRegister& vn, + const VRegister& vm, + StatusFlags nzcv, + Condition cond, + FPTrapFlags trap); + + // FP conditional compare. + void fccmp(const VRegister& vn, + const VRegister& vm, + StatusFlags nzcv, + Condition cond); + + // FP signaling compare registers. + void fcmpe(const VRegister& vn, const VRegister& vm); + + // FP signaling compare immediate. + void fcmpe(const VRegister& vn, double value); + + // FP conditional signaling compare. + void fccmpe(const VRegister& vn, + const VRegister& vm, + StatusFlags nzcv, + Condition cond); + + // FP conditional select. + void fcsel(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + Condition cond); + + // Common FP Convert functions. + void NEONFPConvertToInt(const Register& rd, const VRegister& vn, Instr op); + void NEONFPConvertToInt(const VRegister& vd, const VRegister& vn, Instr op); + void NEONFP16ConvertToInt(const VRegister& vd, const VRegister& vn, Instr op); + + // FP convert between precisions. + void fcvt(const VRegister& vd, const VRegister& vn); + + // FP convert to higher precision. + void fcvtl(const VRegister& vd, const VRegister& vn); + + // FP convert to higher precision (second part). + void fcvtl2(const VRegister& vd, const VRegister& vn); + + // FP convert to lower precision. + void fcvtn(const VRegister& vd, const VRegister& vn); + + // FP convert to lower prevision (second part). + void fcvtn2(const VRegister& vd, const VRegister& vn); + + // FP convert to lower precision, rounding to odd. + void fcvtxn(const VRegister& vd, const VRegister& vn); + + // FP convert to lower precision, rounding to odd (second part). + void fcvtxn2(const VRegister& vd, const VRegister& vn); + + // FP convert to signed integer, nearest with ties to away. + void fcvtas(const Register& rd, const VRegister& vn); + + // FP convert to unsigned integer, nearest with ties to away. + void fcvtau(const Register& rd, const VRegister& vn); + + // FP convert to signed integer, nearest with ties to away. + void fcvtas(const VRegister& vd, const VRegister& vn); + + // FP convert to unsigned integer, nearest with ties to away. + void fcvtau(const VRegister& vd, const VRegister& vn); + + // FP convert to signed integer, round towards -infinity. + void fcvtms(const Register& rd, const VRegister& vn); + + // FP convert to unsigned integer, round towards -infinity. + void fcvtmu(const Register& rd, const VRegister& vn); + + // FP convert to signed integer, round towards -infinity. + void fcvtms(const VRegister& vd, const VRegister& vn); + + // FP convert to unsigned integer, round towards -infinity. + void fcvtmu(const VRegister& vd, const VRegister& vn); + + // FP convert to signed integer, nearest with ties to even. + void fcvtns(const Register& rd, const VRegister& vn); + + // FP JavaScript convert to signed integer, rounding toward zero [Armv8.3]. + void fjcvtzs(const Register& rd, const VRegister& vn); + + // FP convert to unsigned integer, nearest with ties to even. + void fcvtnu(const Register& rd, const VRegister& vn); + + // FP convert to signed integer, nearest with ties to even. + void fcvtns(const VRegister& rd, const VRegister& vn); + + // FP convert to unsigned integer, nearest with ties to even. + void fcvtnu(const VRegister& rd, const VRegister& vn); + + // FP convert to signed integer or fixed-point, round towards zero. + void fcvtzs(const Register& rd, const VRegister& vn, int fbits = 0); + + // FP convert to unsigned integer or fixed-point, round towards zero. + void fcvtzu(const Register& rd, const VRegister& vn, int fbits = 0); + + // FP convert to signed integer or fixed-point, round towards zero. + void fcvtzs(const VRegister& vd, const VRegister& vn, int fbits = 0); + + // FP convert to unsigned integer or fixed-point, round towards zero. + void fcvtzu(const VRegister& vd, const VRegister& vn, int fbits = 0); + + // FP convert to signed integer, round towards +infinity. + void fcvtps(const Register& rd, const VRegister& vn); + + // FP convert to unsigned integer, round towards +infinity. + void fcvtpu(const Register& rd, const VRegister& vn); + + // FP convert to signed integer, round towards +infinity. + void fcvtps(const VRegister& vd, const VRegister& vn); + + // FP convert to unsigned integer, round towards +infinity. + void fcvtpu(const VRegister& vd, const VRegister& vn); + + // Convert signed integer or fixed point to FP. + void scvtf(const VRegister& fd, const Register& rn, int fbits = 0); + + // Convert unsigned integer or fixed point to FP. + void ucvtf(const VRegister& fd, const Register& rn, int fbits = 0); + + // Convert signed integer or fixed-point to FP. + void scvtf(const VRegister& fd, const VRegister& vn, int fbits = 0); + + // Convert unsigned integer or fixed-point to FP. + void ucvtf(const VRegister& fd, const VRegister& vn, int fbits = 0); + + // Unsigned absolute difference. + void uabd(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed absolute difference. + void sabd(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned absolute difference and accumulate. + void uaba(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed absolute difference and accumulate. + void saba(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Add. + void add(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Subtract. + void sub(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned halving add. + void uhadd(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed halving add. + void shadd(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned rounding halving add. + void urhadd(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed rounding halving add. + void srhadd(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned halving sub. + void uhsub(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed halving sub. + void shsub(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned saturating add. + void uqadd(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed saturating add. + void sqadd(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned saturating subtract. + void uqsub(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed saturating subtract. + void sqsub(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Add pairwise. + void addp(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Add pair of elements scalar. + void addp(const VRegister& vd, const VRegister& vn); + + // Multiply-add to accumulator. + void mla(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Multiply-subtract to accumulator. + void mls(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Multiply. + void mul(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Multiply by scalar element. + void mul(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // Multiply-add by scalar element. + void mla(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // Multiply-subtract by scalar element. + void mls(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // Signed long multiply-add by scalar element. + void smlal(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // Signed long multiply-add by scalar element (second part). + void smlal2(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // Unsigned long multiply-add by scalar element. + void umlal(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // Unsigned long multiply-add by scalar element (second part). + void umlal2(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // Signed long multiply-sub by scalar element. + void smlsl(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // Signed long multiply-sub by scalar element (second part). + void smlsl2(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // Unsigned long multiply-sub by scalar element. + void umlsl(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // Unsigned long multiply-sub by scalar element (second part). + void umlsl2(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // Signed long multiply by scalar element. + void smull(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // Signed long multiply by scalar element (second part). + void smull2(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // Unsigned long multiply by scalar element. + void umull(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // Unsigned long multiply by scalar element (second part). + void umull2(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // Signed saturating double long multiply by element. + void sqdmull(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // Signed saturating double long multiply by element (second part). + void sqdmull2(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // Signed saturating doubling long multiply-add by element. + void sqdmlal(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // Signed saturating doubling long multiply-add by element (second part). + void sqdmlal2(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // Signed saturating doubling long multiply-sub by element. + void sqdmlsl(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // Signed saturating doubling long multiply-sub by element (second part). + void sqdmlsl2(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // Compare equal. + void cmeq(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Compare signed greater than or equal. + void cmge(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Compare signed greater than. + void cmgt(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Compare unsigned higher. + void cmhi(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Compare unsigned higher or same. + void cmhs(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Compare bitwise test bits nonzero. + void cmtst(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Compare bitwise to zero. + void cmeq(const VRegister& vd, const VRegister& vn, int value); + + // Compare signed greater than or equal to zero. + void cmge(const VRegister& vd, const VRegister& vn, int value); + + // Compare signed greater than zero. + void cmgt(const VRegister& vd, const VRegister& vn, int value); + + // Compare signed less than or equal to zero. + void cmle(const VRegister& vd, const VRegister& vn, int value); + + // Compare signed less than zero. + void cmlt(const VRegister& vd, const VRegister& vn, int value); + + // Signed shift left by register. + void sshl(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned shift left by register. + void ushl(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed saturating shift left by register. + void sqshl(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned saturating shift left by register. + void uqshl(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed rounding shift left by register. + void srshl(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned rounding shift left by register. + void urshl(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed saturating rounding shift left by register. + void sqrshl(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned saturating rounding shift left by register. + void uqrshl(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Bitwise and. + void and_(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Bitwise or. + void orr(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Bitwise or immediate. + void orr(const VRegister& vd, const int imm8, const int left_shift = 0); + + // Move register to register. + void mov(const VRegister& vd, const VRegister& vn); + + // Bitwise orn. + void orn(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Bitwise eor. + void eor(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Bit clear immediate. + void bic(const VRegister& vd, const int imm8, const int left_shift = 0); + + // Bit clear. + void bic(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Bitwise insert if false. + void bif(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Bitwise insert if true. + void bit(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Bitwise select. + void bsl(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Polynomial multiply. + void pmul(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Vector move immediate. + void movi(const VRegister& vd, + const uint64_t imm, + Shift shift = LSL, + const int shift_amount = 0); + + // Bitwise not. + void mvn(const VRegister& vd, const VRegister& vn); + + // Vector move inverted immediate. + void mvni(const VRegister& vd, + const int imm8, + Shift shift = LSL, + const int shift_amount = 0); + + // Signed saturating accumulate of unsigned value. + void suqadd(const VRegister& vd, const VRegister& vn); + + // Unsigned saturating accumulate of signed value. + void usqadd(const VRegister& vd, const VRegister& vn); + + // Absolute value. + void abs(const VRegister& vd, const VRegister& vn); + + // Signed saturating absolute value. + void sqabs(const VRegister& vd, const VRegister& vn); + + // Negate. + void neg(const VRegister& vd, const VRegister& vn); + + // Signed saturating negate. + void sqneg(const VRegister& vd, const VRegister& vn); + + // Bitwise not. + void not_(const VRegister& vd, const VRegister& vn); + + // Extract narrow. + void xtn(const VRegister& vd, const VRegister& vn); + + // Extract narrow (second part). + void xtn2(const VRegister& vd, const VRegister& vn); + + // Signed saturating extract narrow. + void sqxtn(const VRegister& vd, const VRegister& vn); + + // Signed saturating extract narrow (second part). + void sqxtn2(const VRegister& vd, const VRegister& vn); + + // Unsigned saturating extract narrow. + void uqxtn(const VRegister& vd, const VRegister& vn); + + // Unsigned saturating extract narrow (second part). + void uqxtn2(const VRegister& vd, const VRegister& vn); + + // Signed saturating extract unsigned narrow. + void sqxtun(const VRegister& vd, const VRegister& vn); + + // Signed saturating extract unsigned narrow (second part). + void sqxtun2(const VRegister& vd, const VRegister& vn); + + // Extract vector from pair of vectors. + void ext(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int index); + + // Duplicate vector element to vector or scalar. + void dup(const VRegister& vd, const VRegister& vn, int vn_index); + + // Move vector element to scalar. + void mov(const VRegister& vd, const VRegister& vn, int vn_index); + + // Duplicate general-purpose register to vector. + void dup(const VRegister& vd, const Register& rn); + + // Insert vector element from another vector element. + void ins(const VRegister& vd, + int vd_index, + const VRegister& vn, + int vn_index); + + // Move vector element to another vector element. + void mov(const VRegister& vd, + int vd_index, + const VRegister& vn, + int vn_index); + + // Insert vector element from general-purpose register. + void ins(const VRegister& vd, int vd_index, const Register& rn); + + // Move general-purpose register to a vector element. + void mov(const VRegister& vd, int vd_index, const Register& rn); + + // Unsigned move vector element to general-purpose register. + void umov(const Register& rd, const VRegister& vn, int vn_index); + + // Move vector element to general-purpose register. + void mov(const Register& rd, const VRegister& vn, int vn_index); + + // Signed move vector element to general-purpose register. + void smov(const Register& rd, const VRegister& vn, int vn_index); + + // One-element structure load to one register. + void ld1(const VRegister& vt, const MemOperand& src); + + // One-element structure load to two registers. + void ld1(const VRegister& vt, const VRegister& vt2, const MemOperand& src); + + // One-element structure load to three registers. + void ld1(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const MemOperand& src); + + // One-element structure load to four registers. + void ld1(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const VRegister& vt4, + const MemOperand& src); + + // One-element single structure load to one lane. + void ld1(const VRegister& vt, int lane, const MemOperand& src); + + // One-element single structure load to all lanes. + void ld1r(const VRegister& vt, const MemOperand& src); + + // Two-element structure load. + void ld2(const VRegister& vt, const VRegister& vt2, const MemOperand& src); + + // Two-element single structure load to one lane. + void ld2(const VRegister& vt, + const VRegister& vt2, + int lane, + const MemOperand& src); + + // Two-element single structure load to all lanes. + void ld2r(const VRegister& vt, const VRegister& vt2, const MemOperand& src); + + // Three-element structure load. + void ld3(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const MemOperand& src); + + // Three-element single structure load to one lane. + void ld3(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + int lane, + const MemOperand& src); + + // Three-element single structure load to all lanes. + void ld3r(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const MemOperand& src); + + // Four-element structure load. + void ld4(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const VRegister& vt4, + const MemOperand& src); + + // Four-element single structure load to one lane. + void ld4(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const VRegister& vt4, + int lane, + const MemOperand& src); + + // Four-element single structure load to all lanes. + void ld4r(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const VRegister& vt4, + const MemOperand& src); + + // Count leading sign bits. + void cls(const VRegister& vd, const VRegister& vn); + + // Count leading zero bits (vector). + void clz(const VRegister& vd, const VRegister& vn); + + // Population count per byte. + void cnt(const VRegister& vd, const VRegister& vn); + + // Reverse bit order. + void rbit(const VRegister& vd, const VRegister& vn); + + // Reverse elements in 16-bit halfwords. + void rev16(const VRegister& vd, const VRegister& vn); + + // Reverse elements in 32-bit words. + void rev32(const VRegister& vd, const VRegister& vn); + + // Reverse elements in 64-bit doublewords. + void rev64(const VRegister& vd, const VRegister& vn); + + // Unsigned reciprocal square root estimate. + void ursqrte(const VRegister& vd, const VRegister& vn); + + // Unsigned reciprocal estimate. + void urecpe(const VRegister& vd, const VRegister& vn); + + // Signed pairwise long add. + void saddlp(const VRegister& vd, const VRegister& vn); + + // Unsigned pairwise long add. + void uaddlp(const VRegister& vd, const VRegister& vn); + + // Signed pairwise long add and accumulate. + void sadalp(const VRegister& vd, const VRegister& vn); + + // Unsigned pairwise long add and accumulate. + void uadalp(const VRegister& vd, const VRegister& vn); + + // Shift left by immediate. + void shl(const VRegister& vd, const VRegister& vn, int shift); + + // Signed saturating shift left by immediate. + void sqshl(const VRegister& vd, const VRegister& vn, int shift); + + // Signed saturating shift left unsigned by immediate. + void sqshlu(const VRegister& vd, const VRegister& vn, int shift); + + // Unsigned saturating shift left by immediate. + void uqshl(const VRegister& vd, const VRegister& vn, int shift); + + // Signed shift left long by immediate. + void sshll(const VRegister& vd, const VRegister& vn, int shift); + + // Signed shift left long by immediate (second part). + void sshll2(const VRegister& vd, const VRegister& vn, int shift); + + // Signed extend long. + void sxtl(const VRegister& vd, const VRegister& vn); + + // Signed extend long (second part). + void sxtl2(const VRegister& vd, const VRegister& vn); + + // Unsigned shift left long by immediate. + void ushll(const VRegister& vd, const VRegister& vn, int shift); + + // Unsigned shift left long by immediate (second part). + void ushll2(const VRegister& vd, const VRegister& vn, int shift); + + // Shift left long by element size. + void shll(const VRegister& vd, const VRegister& vn, int shift); + + // Shift left long by element size (second part). + void shll2(const VRegister& vd, const VRegister& vn, int shift); + + // Unsigned extend long. + void uxtl(const VRegister& vd, const VRegister& vn); + + // Unsigned extend long (second part). + void uxtl2(const VRegister& vd, const VRegister& vn); + + // Shift left by immediate and insert. + void sli(const VRegister& vd, const VRegister& vn, int shift); + + // Shift right by immediate and insert. + void sri(const VRegister& vd, const VRegister& vn, int shift); + + // Signed maximum. + void smax(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed pairwise maximum. + void smaxp(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Add across vector. + void addv(const VRegister& vd, const VRegister& vn); + + // Signed add long across vector. + void saddlv(const VRegister& vd, const VRegister& vn); + + // Unsigned add long across vector. + void uaddlv(const VRegister& vd, const VRegister& vn); + + // FP maximum number across vector. + void fmaxnmv(const VRegister& vd, const VRegister& vn); + + // FP maximum across vector. + void fmaxv(const VRegister& vd, const VRegister& vn); + + // FP minimum number across vector. + void fminnmv(const VRegister& vd, const VRegister& vn); + + // FP minimum across vector. + void fminv(const VRegister& vd, const VRegister& vn); + + // Signed maximum across vector. + void smaxv(const VRegister& vd, const VRegister& vn); + + // Signed minimum. + void smin(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed minimum pairwise. + void sminp(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed minimum across vector. + void sminv(const VRegister& vd, const VRegister& vn); + + // One-element structure store from one register. + void st1(const VRegister& vt, const MemOperand& src); + + // One-element structure store from two registers. + void st1(const VRegister& vt, const VRegister& vt2, const MemOperand& src); + + // One-element structure store from three registers. + void st1(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const MemOperand& src); + + // One-element structure store from four registers. + void st1(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const VRegister& vt4, + const MemOperand& src); + + // One-element single structure store from one lane. + void st1(const VRegister& vt, int lane, const MemOperand& src); + + // Two-element structure store from two registers. + void st2(const VRegister& vt, const VRegister& vt2, const MemOperand& src); + + // Two-element single structure store from two lanes. + void st2(const VRegister& vt, + const VRegister& vt2, + int lane, + const MemOperand& src); + + // Three-element structure store from three registers. + void st3(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const MemOperand& src); + + // Three-element single structure store from three lanes. + void st3(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + int lane, + const MemOperand& src); + + // Four-element structure store from four registers. + void st4(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const VRegister& vt4, + const MemOperand& src); + + // Four-element single structure store from four lanes. + void st4(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const VRegister& vt4, + int lane, + const MemOperand& src); + + // Unsigned add long. + void uaddl(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned add long (second part). + void uaddl2(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned add wide. + void uaddw(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned add wide (second part). + void uaddw2(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed add long. + void saddl(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed add long (second part). + void saddl2(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed add wide. + void saddw(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed add wide (second part). + void saddw2(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned subtract long. + void usubl(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned subtract long (second part). + void usubl2(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned subtract wide. + void usubw(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned subtract wide (second part). + void usubw2(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed subtract long. + void ssubl(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed subtract long (second part). + void ssubl2(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed integer subtract wide. + void ssubw(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed integer subtract wide (second part). + void ssubw2(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned maximum. + void umax(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned pairwise maximum. + void umaxp(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned maximum across vector. + void umaxv(const VRegister& vd, const VRegister& vn); + + // Unsigned minimum. + void umin(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned pairwise minimum. + void uminp(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned minimum across vector. + void uminv(const VRegister& vd, const VRegister& vn); + + // Transpose vectors (primary). + void trn1(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Transpose vectors (secondary). + void trn2(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unzip vectors (primary). + void uzp1(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unzip vectors (secondary). + void uzp2(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Zip vectors (primary). + void zip1(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Zip vectors (secondary). + void zip2(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed shift right by immediate. + void sshr(const VRegister& vd, const VRegister& vn, int shift); + + // Unsigned shift right by immediate. + void ushr(const VRegister& vd, const VRegister& vn, int shift); + + // Signed rounding shift right by immediate. + void srshr(const VRegister& vd, const VRegister& vn, int shift); + + // Unsigned rounding shift right by immediate. + void urshr(const VRegister& vd, const VRegister& vn, int shift); + + // Signed shift right by immediate and accumulate. + void ssra(const VRegister& vd, const VRegister& vn, int shift); + + // Unsigned shift right by immediate and accumulate. + void usra(const VRegister& vd, const VRegister& vn, int shift); + + // Signed rounding shift right by immediate and accumulate. + void srsra(const VRegister& vd, const VRegister& vn, int shift); + + // Unsigned rounding shift right by immediate and accumulate. + void ursra(const VRegister& vd, const VRegister& vn, int shift); + + // Shift right narrow by immediate. + void shrn(const VRegister& vd, const VRegister& vn, int shift); + + // Shift right narrow by immediate (second part). + void shrn2(const VRegister& vd, const VRegister& vn, int shift); + + // Rounding shift right narrow by immediate. + void rshrn(const VRegister& vd, const VRegister& vn, int shift); + + // Rounding shift right narrow by immediate (second part). + void rshrn2(const VRegister& vd, const VRegister& vn, int shift); + + // Unsigned saturating shift right narrow by immediate. + void uqshrn(const VRegister& vd, const VRegister& vn, int shift); + + // Unsigned saturating shift right narrow by immediate (second part). + void uqshrn2(const VRegister& vd, const VRegister& vn, int shift); + + // Unsigned saturating rounding shift right narrow by immediate. + void uqrshrn(const VRegister& vd, const VRegister& vn, int shift); + + // Unsigned saturating rounding shift right narrow by immediate (second part). + void uqrshrn2(const VRegister& vd, const VRegister& vn, int shift); + + // Signed saturating shift right narrow by immediate. + void sqshrn(const VRegister& vd, const VRegister& vn, int shift); + + // Signed saturating shift right narrow by immediate (second part). + void sqshrn2(const VRegister& vd, const VRegister& vn, int shift); + + // Signed saturating rounded shift right narrow by immediate. + void sqrshrn(const VRegister& vd, const VRegister& vn, int shift); + + // Signed saturating rounded shift right narrow by immediate (second part). + void sqrshrn2(const VRegister& vd, const VRegister& vn, int shift); + + // Signed saturating shift right unsigned narrow by immediate. + void sqshrun(const VRegister& vd, const VRegister& vn, int shift); + + // Signed saturating shift right unsigned narrow by immediate (second part). + void sqshrun2(const VRegister& vd, const VRegister& vn, int shift); + + // Signed sat rounded shift right unsigned narrow by immediate. + void sqrshrun(const VRegister& vd, const VRegister& vn, int shift); + + // Signed sat rounded shift right unsigned narrow by immediate (second part). + void sqrshrun2(const VRegister& vd, const VRegister& vn, int shift); + + // FP reciprocal step. + void frecps(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // FP reciprocal estimate. + void frecpe(const VRegister& vd, const VRegister& vn); + + // FP reciprocal square root estimate. + void frsqrte(const VRegister& vd, const VRegister& vn); + + // FP reciprocal square root step. + void frsqrts(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed absolute difference and accumulate long. + void sabal(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed absolute difference and accumulate long (second part). + void sabal2(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned absolute difference and accumulate long. + void uabal(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned absolute difference and accumulate long (second part). + void uabal2(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed absolute difference long. + void sabdl(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed absolute difference long (second part). + void sabdl2(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned absolute difference long. + void uabdl(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned absolute difference long (second part). + void uabdl2(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Polynomial multiply long. + void pmull(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Polynomial multiply long (second part). + void pmull2(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed long multiply-add. + void smlal(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed long multiply-add (second part). + void smlal2(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned long multiply-add. + void umlal(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned long multiply-add (second part). + void umlal2(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed long multiply-sub. + void smlsl(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed long multiply-sub (second part). + void smlsl2(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned long multiply-sub. + void umlsl(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned long multiply-sub (second part). + void umlsl2(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed long multiply. + void smull(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed long multiply (second part). + void smull2(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed saturating doubling long multiply-add. + void sqdmlal(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed saturating doubling long multiply-add (second part). + void sqdmlal2(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed saturating doubling long multiply-subtract. + void sqdmlsl(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed saturating doubling long multiply-subtract (second part). + void sqdmlsl2(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed saturating doubling long multiply. + void sqdmull(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed saturating doubling long multiply (second part). + void sqdmull2(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed saturating doubling multiply returning high half. + void sqdmulh(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed saturating rounding doubling multiply returning high half. + void sqrdmulh(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed dot product [Armv8.2]. + void sdot(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed saturating rounding doubling multiply accumulate returning high + // half [Armv8.1]. + void sqrdmlah(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned dot product [Armv8.2]. + void udot(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed saturating rounding doubling multiply subtract returning high half + // [Armv8.1]. + void sqrdmlsh(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Signed saturating doubling multiply element returning high half. + void sqdmulh(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // Signed saturating rounding doubling multiply element returning high half. + void sqrdmulh(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // Signed dot product by element [Armv8.2]. + void sdot(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // Signed saturating rounding doubling multiply accumulate element returning + // high half [Armv8.1]. + void sqrdmlah(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // Unsigned dot product by element [Armv8.2]. + void udot(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // Signed saturating rounding doubling multiply subtract element returning + // high half [Armv8.1]. + void sqrdmlsh(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // Unsigned long multiply long. + void umull(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Unsigned long multiply (second part). + void umull2(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Add narrow returning high half. + void addhn(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Add narrow returning high half (second part). + void addhn2(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Rounding add narrow returning high half. + void raddhn(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Rounding add narrow returning high half (second part). + void raddhn2(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Subtract narrow returning high half. + void subhn(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Subtract narrow returning high half (second part). + void subhn2(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Rounding subtract narrow returning high half. + void rsubhn(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // Rounding subtract narrow returning high half (second part). + void rsubhn2(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // FP vector multiply accumulate. + void fmla(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // FP fused multiply-add long to accumulator. + void fmlal(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // FP fused multiply-add long to accumulator (second part). + void fmlal2(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // FP fused multiply-add long to accumulator by element. + void fmlal(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // FP fused multiply-add long to accumulator by element (second part). + void fmlal2(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // FP vector multiply subtract. + void fmls(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // FP fused multiply-subtract long to accumulator. + void fmlsl(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // FP fused multiply-subtract long to accumulator (second part). + void fmlsl2(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // FP fused multiply-subtract long to accumulator by element. + void fmlsl(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // FP fused multiply-subtract long to accumulator by element (second part). + void fmlsl2(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // FP vector multiply extended. + void fmulx(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // FP absolute greater than or equal. + void facge(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // FP absolute greater than. + void facgt(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // FP multiply by element. + void fmul(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // FP fused multiply-add to accumulator by element. + void fmla(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // FP fused multiply-sub from accumulator by element. + void fmls(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // FP multiply extended by element. + void fmulx(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index); + + // FP compare equal. + void fcmeq(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // FP greater than. + void fcmgt(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // FP greater than or equal. + void fcmge(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // FP compare equal to zero. + void fcmeq(const VRegister& vd, const VRegister& vn, double imm); + + // FP greater than zero. + void fcmgt(const VRegister& vd, const VRegister& vn, double imm); + + // FP greater than or equal to zero. + void fcmge(const VRegister& vd, const VRegister& vn, double imm); + + // FP less than or equal to zero. + void fcmle(const VRegister& vd, const VRegister& vn, double imm); + + // FP less than to zero. + void fcmlt(const VRegister& vd, const VRegister& vn, double imm); + + // FP absolute difference. + void fabd(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // FP pairwise add vector. + void faddp(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // FP pairwise add scalar. + void faddp(const VRegister& vd, const VRegister& vn); + + // FP pairwise maximum vector. + void fmaxp(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // FP pairwise maximum scalar. + void fmaxp(const VRegister& vd, const VRegister& vn); + + // FP pairwise minimum vector. + void fminp(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // FP pairwise minimum scalar. + void fminp(const VRegister& vd, const VRegister& vn); + + // FP pairwise maximum number vector. + void fmaxnmp(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // FP pairwise maximum number scalar. + void fmaxnmp(const VRegister& vd, const VRegister& vn); + + // FP pairwise minimum number vector. + void fminnmp(const VRegister& vd, const VRegister& vn, const VRegister& vm); + + // FP pairwise minimum number scalar. + void fminnmp(const VRegister& vd, const VRegister& vn); + + // v8.3 complex numbers - note that these are only partial/helper functions + // and must be used in series in order to perform full CN operations. + + // FP complex multiply accumulate (by element) [Armv8.3]. + void fcmla(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index, + int rot); + + // FP complex multiply accumulate [Armv8.3]. + void fcmla(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int rot); + + // FP complex add [Armv8.3]. + void fcadd(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int rot); + + // Scalable Vector Extensions. + + // Absolute value (predicated). + void abs(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Add vectors (predicated). + void add(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Add vectors (unpredicated). + void add(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm); + + // Add immediate (unpredicated). + void add(const ZRegister& zd, const ZRegister& zn, int imm8, int shift = -1); + + // Add multiple of predicate register size to scalar register. + void addpl(const Register& xd, const Register& xn, int imm6); + + // Add multiple of vector register size to scalar register. + void addvl(const Register& xd, const Register& xn, int imm6); + + // Compute vector address. + void adr(const ZRegister& zd, const SVEMemOperand& addr); + + // Bitwise AND predicates. + void and_(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm); + + // Bitwise AND vectors (predicated). + void and_(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Bitwise AND with immediate (unpredicated). + void and_(const ZRegister& zd, const ZRegister& zn, uint64_t imm); + + // Bitwise AND vectors (unpredicated). + void and_(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm); + + // Bitwise AND predicates. + void ands(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm); + + // Bitwise AND reduction to scalar. + void andv(const VRegister& vd, const PRegister& pg, const ZRegister& zn); + + // Arithmetic shift right by immediate (predicated). + void asr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + int shift); + + // Arithmetic shift right by 64-bit wide elements (predicated). + void asr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Arithmetic shift right by immediate (unpredicated). + void asr(const ZRegister& zd, const ZRegister& zn, int shift); + + // Arithmetic shift right by 64-bit wide elements (unpredicated). + void asr(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm); + + // Arithmetic shift right for divide by immediate (predicated). + void asrd(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + int shift); + + // Reversed arithmetic shift right by vector (predicated). + void asrr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Bitwise clear predicates. + void bic(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm); + + // Bitwise clear vectors (predicated). + void bic(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Bitwise clear bits using immediate (unpredicated). + void bic(const ZRegister& zd, const ZRegister& zn, uint64_t imm); + + // Bitwise clear vectors (unpredicated). + void bic(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm); + + // Bitwise clear predicates. + void bics(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm); + + // Break after first true condition. + void brka(const PRegisterWithLaneSize& pd, + const PRegister& pg, + const PRegisterWithLaneSize& pn); + + // Break after first true condition. + void brkas(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn); + + // Break before first true condition. + void brkb(const PRegisterWithLaneSize& pd, + const PRegister& pg, + const PRegisterWithLaneSize& pn); + + // Break before first true condition. + void brkbs(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn); + + // Propagate break to next partition. + void brkn(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm); + + // Propagate break to next partition. + void brkns(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm); + + // Break after first true condition, propagating from previous partition. + void brkpa(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm); + + // Break after first true condition, propagating from previous partition. + void brkpas(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm); + + // Break before first true condition, propagating from previous partition. + void brkpb(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm); + + // Break before first true condition, propagating from previous partition. + void brkpbs(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm); + + // Conditionally extract element after last to general-purpose register. + void clasta(const Register& rd, + const PRegister& pg, + const Register& rn, + const ZRegister& zm); + + // Conditionally extract element after last to SIMD&FP scalar register. + void clasta(const VRegister& vd, + const PRegister& pg, + const VRegister& vn, + const ZRegister& zm); + + // Conditionally extract element after last to vector register. + void clasta(const ZRegister& zd, + const PRegister& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Conditionally extract last element to general-purpose register. + void clastb(const Register& rd, + const PRegister& pg, + const Register& rn, + const ZRegister& zm); + + // Conditionally extract last element to SIMD&FP scalar register. + void clastb(const VRegister& vd, + const PRegister& pg, + const VRegister& vn, + const ZRegister& zm); + + // Conditionally extract last element to vector register. + void clastb(const ZRegister& zd, + const PRegister& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Count leading sign bits (predicated). + void cls(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Count leading zero bits (predicated). + void clz(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + void cmp(Condition cond, + const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Compare vector to 64-bit wide elements. + void cmpeq(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Compare vector to immediate. + void cmpeq(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5); + + // Compare vector to 64-bit wide elements. + void cmpge(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Compare vector to immediate. + void cmpge(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5); + + // Compare vector to 64-bit wide elements. + void cmpgt(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Compare vector to immediate. + void cmpgt(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5); + + // Compare vector to 64-bit wide elements. + void cmphi(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Compare vector to immediate. + void cmphi(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + unsigned imm7); + + // Compare vector to 64-bit wide elements. + void cmphs(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Compare vector to immediate. + void cmphs(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + unsigned imm7); + + // Compare vector to 64-bit wide elements. + void cmple(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Compare vector to immediate. + void cmple(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5); + + // Compare vector to 64-bit wide elements. + void cmplo(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Compare vector to immediate. + void cmplo(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + unsigned imm7); + + // Compare vector to 64-bit wide elements. + void cmpls(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Compare vector to immediate. + void cmpls(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + unsigned imm7); + + // Compare vector to 64-bit wide elements. + void cmplt(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Compare vector to immediate. + void cmplt(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5); + + // Compare vector to 64-bit wide elements. + void cmpne(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Compare vector to immediate. + void cmpne(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5); + + // Logically invert boolean condition in vector (predicated). + void cnot(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Count non-zero bits (predicated). + void cnt(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Set scalar to multiple of predicate constraint element count. + void cntb(const Register& rd, int pattern = SVE_ALL, int multiplier = 1); + + // Set scalar to multiple of predicate constraint element count. + void cntd(const Register& rd, int pattern = SVE_ALL, int multiplier = 1); + + // Set scalar to multiple of predicate constraint element count. + void cnth(const Register& rd, int pattern = SVE_ALL, int multiplier = 1); + + // Set scalar to active predicate element count. + void cntp(const Register& xd, + const PRegister& pg, + const PRegisterWithLaneSize& pn); + + // Set scalar to multiple of predicate constraint element count. + void cntw(const Register& rd, int pattern = SVE_ALL, int multiplier = 1); + + // Shuffle active elements of vector to the right and fill with zero. + void compact(const ZRegister& zd, const PRegister& pg, const ZRegister& zn); + + // Copy signed integer immediate to vector elements (predicated). + void cpy(const ZRegister& zd, const PRegister& pg, int imm8, int shift = -1); + + // Copy general-purpose register to vector elements (predicated). + void cpy(const ZRegister& zd, const PRegisterM& pg, const Register& rn); + + // Copy SIMD&FP scalar register to vector elements (predicated). + void cpy(const ZRegister& zd, const PRegisterM& pg, const VRegister& vn); + + // Compare and terminate loop. + void ctermeq(const Register& rn, const Register& rm); + + // Compare and terminate loop. + void ctermne(const Register& rn, const Register& rm); + + // Decrement scalar by multiple of predicate constraint element count. + void decb(const Register& xdn, int pattern = SVE_ALL, int multiplier = 1); + + // Decrement scalar by multiple of predicate constraint element count. + void decd(const Register& xdn, int pattern = SVE_ALL, int multiplier = 1); + + // Decrement vector by multiple of predicate constraint element count. + void decd(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1); + + // Decrement scalar by multiple of predicate constraint element count. + void dech(const Register& xdn, int pattern = SVE_ALL, int multiplier = 1); + + // Decrement vector by multiple of predicate constraint element count. + void dech(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1); + + // Decrement scalar by active predicate element count. + void decp(const Register& rdn, const PRegisterWithLaneSize& pg); + + // Decrement vector by active predicate element count. + void decp(const ZRegister& zdn, const PRegister& pg); + + // Decrement scalar by multiple of predicate constraint element count. + void decw(const Register& xdn, int pattern = SVE_ALL, int multiplier = 1); + + // Decrement vector by multiple of predicate constraint element count. + void decw(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1); + + // Broadcast general-purpose register to vector elements (unpredicated). + void dup(const ZRegister& zd, const Register& xn); + + // Broadcast indexed element to vector (unpredicated). + void dup(const ZRegister& zd, const ZRegister& zn, unsigned index); + + // As for movz/movk/movn, if the default shift of -1 is specified to dup, the + // assembler will pick an appropriate immediate and left shift that is + // equivalent to the immediate argument. If an explicit left shift is + // specified (0 or 8), the immediate must be a signed 8-bit integer. + + // Broadcast signed immediate to vector elements (unpredicated). + void dup(const ZRegister& zd, int imm8, int shift = -1); + + // Broadcast logical bitmask immediate to vector (unpredicated). + void dupm(const ZRegister& zd, uint64_t imm); + + // Bitwise exclusive OR with inverted immediate (unpredicated). + void eon(const ZRegister& zd, const ZRegister& zn, uint64_t imm); + + // Bitwise exclusive OR predicates. + void eor(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm); + + // Bitwise exclusive OR vectors (predicated). + void eor(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Bitwise exclusive OR with immediate (unpredicated). + void eor(const ZRegister& zd, const ZRegister& zn, uint64_t imm); + + // Bitwise exclusive OR vectors (unpredicated). + void eor(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm); + + // Bitwise exclusive OR predicates. + void eors(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm); + + // Bitwise XOR reduction to scalar. + void eorv(const VRegister& vd, const PRegister& pg, const ZRegister& zn); + + // Extract vector from pair of vectors. + void ext(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm, + unsigned offset); + + // Floating-point absolute difference (predicated). + void fabd(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Floating-point absolute value (predicated). + void fabs(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Floating-point absolute compare vectors. + void facge(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Floating-point absolute compare vectors. + void facgt(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Floating-point add immediate (predicated). + void fadd(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + double imm); + + // Floating-point add vector (predicated). + void fadd(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Floating-point add vector (unpredicated). + void fadd(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm); + + // Floating-point add strictly-ordered reduction, accumulating in scalar. + void fadda(const VRegister& vd, + const PRegister& pg, + const VRegister& vn, + const ZRegister& zm); + + // Floating-point add recursive reduction to scalar. + void faddv(const VRegister& vd, const PRegister& pg, const ZRegister& zn); + + // Floating-point complex add with rotate (predicated). + void fcadd(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm, + int rot); + + // Floating-point compare vector with zero. + void fcmeq(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + double zero); + + // Floating-point compare vectors. + void fcmeq(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Floating-point compare vector with zero. + void fcmge(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + double zero); + + // Floating-point compare vectors. + void fcmge(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Floating-point compare vector with zero. + void fcmgt(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + double zero); + + // Floating-point compare vectors. + void fcmgt(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Floating-point complex multiply-add with rotate (predicated). + void fcmla(const ZRegister& zda, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm, + int rot); + + // Floating-point complex multiply-add by indexed values with rotate. + void fcmla(const ZRegister& zda, + const ZRegister& zn, + const ZRegister& zm, + int index, + int rot); + + // Floating-point compare vector with zero. + void fcmle(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + double zero); + + // Floating-point compare vector with zero. + void fcmlt(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + double zero); + + // Floating-point compare vector with zero. + void fcmne(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + double zero); + + // Floating-point compare vectors. + void fcmne(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Floating-point compare vectors. + void fcmuo(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Copy floating-point immediate to vector elements (predicated). + void fcpy(const ZRegister& zd, const PRegisterM& pg, double imm); + + // Copy half-precision floating-point immediate to vector elements + // (predicated). + void fcpy(const ZRegister& zd, const PRegisterM& pg, Float16 imm) { + fcpy(zd, pg, FPToDouble(imm, kIgnoreDefaultNaN)); + } + + // Floating-point convert precision (predicated). + void fcvt(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Floating-point convert to signed integer, rounding toward zero + // (predicated). + void fcvtzs(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Floating-point convert to unsigned integer, rounding toward zero + // (predicated). + void fcvtzu(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Floating-point divide by vector (predicated). + void fdiv(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Floating-point reversed divide by vector (predicated). + void fdivr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Broadcast floating-point immediate to vector elements. + void fdup(const ZRegister& zd, double imm); + + // Broadcast half-precision floating-point immediate to vector elements. + void fdup(const ZRegister& zd, Float16 imm) { + fdup(zd, FPToDouble(imm, kIgnoreDefaultNaN)); + } + + // Floating-point exponential accelerator. + void fexpa(const ZRegister& zd, const ZRegister& zn); + + // Floating-point fused multiply-add vectors (predicated), writing + // multiplicand [Zdn = Za + Zdn * Zm]. + void fmad(const ZRegister& zdn, + const PRegisterM& pg, + const ZRegister& zm, + const ZRegister& za); + + // Floating-point maximum with immediate (predicated). + void fmax(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + double imm); + + // Floating-point maximum (predicated). + void fmax(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Floating-point maximum number with immediate (predicated). + void fmaxnm(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + double imm); + + // Floating-point maximum number (predicated). + void fmaxnm(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Floating-point maximum number recursive reduction to scalar. + void fmaxnmv(const VRegister& vd, const PRegister& pg, const ZRegister& zn); + + // Floating-point maximum recursive reduction to scalar. + void fmaxv(const VRegister& vd, const PRegister& pg, const ZRegister& zn); + + // Floating-point minimum with immediate (predicated). + void fmin(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + double imm); + + // Floating-point minimum (predicated). + void fmin(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Floating-point minimum number with immediate (predicated). + void fminnm(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + double imm); + + // Floating-point minimum number (predicated). + void fminnm(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Floating-point minimum number recursive reduction to scalar. + void fminnmv(const VRegister& vd, const PRegister& pg, const ZRegister& zn); + + // Floating-point minimum recursive reduction to scalar. + void fminv(const VRegister& vd, const PRegister& pg, const ZRegister& zn); + + // Floating-point fused multiply-add vectors (predicated), writing addend + // [Zda = Zda + Zn * Zm]. + void fmla(const ZRegister& zda, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Floating-point fused multiply-add by indexed elements + // (Zda = Zda + Zn * Zm[indexed]). + void fmla(const ZRegister& zda, + const ZRegister& zn, + const ZRegister& zm, + int index); + + // Floating-point fused multiply-subtract vectors (predicated), writing + // addend [Zda = Zda + -Zn * Zm]. + void fmls(const ZRegister& zda, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Floating-point fused multiply-subtract by indexed elements + // (Zda = Zda + -Zn * Zm[indexed]). + void fmls(const ZRegister& zda, + const ZRegister& zn, + const ZRegister& zm, + int index); + + // Move 8-bit floating-point immediate to vector elements (unpredicated). + void fmov(const ZRegister& zd, double imm); + + // Move 8-bit floating-point immediate to vector elements (predicated). + void fmov(const ZRegister& zd, const PRegisterM& pg, double imm); + + // Floating-point fused multiply-subtract vectors (predicated), writing + // multiplicand [Zdn = Za + -Zdn * Zm]. + void fmsb(const ZRegister& zdn, + const PRegisterM& pg, + const ZRegister& zm, + const ZRegister& za); + + // Floating-point multiply by immediate (predicated). + void fmul(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + double imm); + + // Floating-point multiply vectors (predicated). + void fmul(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Floating-point multiply by indexed elements. + void fmul(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm, + unsigned index); + + // Floating-point multiply vectors (unpredicated). + void fmul(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm); + + // Floating-point multiply-extended vectors (predicated). + void fmulx(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Floating-point negate (predicated). + void fneg(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Floating-point negated fused multiply-add vectors (predicated), writing + // multiplicand [Zdn = -Za + -Zdn * Zm]. + void fnmad(const ZRegister& zdn, + const PRegisterM& pg, + const ZRegister& zm, + const ZRegister& za); + + // Floating-point negated fused multiply-add vectors (predicated), writing + // addend [Zda = -Zda + -Zn * Zm]. + void fnmla(const ZRegister& zda, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Floating-point negated fused multiply-subtract vectors (predicated), + // writing addend [Zda = -Zda + Zn * Zm]. + void fnmls(const ZRegister& zda, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Floating-point negated fused multiply-subtract vectors (predicated), + // writing multiplicand [Zdn = -Za + Zdn * Zm]. + void fnmsb(const ZRegister& zdn, + const PRegisterM& pg, + const ZRegister& zm, + const ZRegister& za); + + // Floating-point reciprocal estimate (unpredicated). + void frecpe(const ZRegister& zd, const ZRegister& zn); + + // Floating-point reciprocal step (unpredicated). + void frecps(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm); + + // Floating-point reciprocal exponent (predicated). + void frecpx(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Floating-point round to integral value (predicated). + void frinta(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Floating-point round to integral value (predicated). + void frinti(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Floating-point round to integral value (predicated). + void frintm(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Floating-point round to integral value (predicated). + void frintn(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Floating-point round to integral value (predicated). + void frintp(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Floating-point round to integral value (predicated). + void frintx(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Floating-point round to integral value (predicated). + void frintz(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Floating-point reciprocal square root estimate (unpredicated). + void frsqrte(const ZRegister& zd, const ZRegister& zn); + + // Floating-point reciprocal square root step (unpredicated). + void frsqrts(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm); + + // Floating-point adjust exponent by vector (predicated). + void fscale(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Floating-point square root (predicated). + void fsqrt(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Floating-point subtract immediate (predicated). + void fsub(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + double imm); + + // Floating-point subtract vectors (predicated). + void fsub(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Floating-point subtract vectors (unpredicated). + void fsub(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm); + + // Floating-point reversed subtract from immediate (predicated). + void fsubr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + double imm); + + // Floating-point reversed subtract vectors (predicated). + void fsubr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Floating-point trigonometric multiply-add coefficient. + void ftmad(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm, + int imm3); + + // Floating-point trigonometric starting value. + void ftsmul(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm); + + // Floating-point trigonometric select coefficient. + void ftssel(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm); + + // Increment scalar by multiple of predicate constraint element count. + void incb(const Register& xdn, int pattern = SVE_ALL, int multiplier = 1); + + // Increment scalar by multiple of predicate constraint element count. + void incd(const Register& xdn, int pattern = SVE_ALL, int multiplier = 1); + + // Increment vector by multiple of predicate constraint element count. + void incd(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1); + + // Increment scalar by multiple of predicate constraint element count. + void inch(const Register& xdn, int pattern = SVE_ALL, int multiplier = 1); + + // Increment vector by multiple of predicate constraint element count. + void inch(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1); + + // Increment scalar by active predicate element count. + void incp(const Register& rdn, const PRegisterWithLaneSize& pg); + + // Increment vector by active predicate element count. + void incp(const ZRegister& zdn, const PRegister& pg); + + // Increment scalar by multiple of predicate constraint element count. + void incw(const Register& xdn, int pattern = SVE_ALL, int multiplier = 1); + + // Increment vector by multiple of predicate constraint element count. + void incw(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1); + + // Create index starting from and incremented by immediate. + void index(const ZRegister& zd, int start, int step); + + // Create index starting from and incremented by general-purpose register. + void index(const ZRegister& zd, const Register& rn, const Register& rm); + + // Create index starting from general-purpose register and incremented by + // immediate. + void index(const ZRegister& zd, const Register& rn, int imm5); + + // Create index starting from immediate and incremented by general-purpose + // register. + void index(const ZRegister& zd, int imm5, const Register& rm); + + // Insert general-purpose register in shifted vector. + void insr(const ZRegister& zdn, const Register& rm); + + // Insert SIMD&FP scalar register in shifted vector. + void insr(const ZRegister& zdn, const VRegister& vm); + + // Extract element after last to general-purpose register. + void lasta(const Register& rd, const PRegister& pg, const ZRegister& zn); + + // Extract element after last to SIMD&FP scalar register. + void lasta(const VRegister& vd, const PRegister& pg, const ZRegister& zn); + + // Extract last element to general-purpose register. + void lastb(const Register& rd, const PRegister& pg, const ZRegister& zn); + + // Extract last element to SIMD&FP scalar register. + void lastb(const VRegister& vd, const PRegister& pg, const ZRegister& zn); + + // Contiguous/gather load bytes to vector. + void ld1b(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous/gather load halfwords to vector. + void ld1h(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous/gather load words to vector. + void ld1w(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous/gather load doublewords to vector. + void ld1d(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // TODO: Merge other loads into the SVEMemOperand versions. + + // Load and broadcast unsigned byte to vector. + void ld1rb(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Load and broadcast unsigned halfword to vector. + void ld1rh(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Load and broadcast unsigned word to vector. + void ld1rw(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Load and broadcast doubleword to vector. + void ld1rd(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load and replicate sixteen bytes. + void ld1rqb(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load and replicate eight halfwords. + void ld1rqh(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load and replicate four words. + void ld1rqw(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load and replicate two doublewords. + void ld1rqd(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Load and broadcast signed byte to vector. + void ld1rsb(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Load and broadcast signed halfword to vector. + void ld1rsh(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Load and broadcast signed word to vector. + void ld1rsw(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous/gather load signed bytes to vector. + void ld1sb(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous/gather load signed halfwords to vector. + void ld1sh(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous/gather load signed words to vector. + void ld1sw(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // TODO: Merge other loads into the SVEMemOperand versions. + + // Contiguous load two-byte structures to two vectors. + void ld2b(const ZRegister& zt1, + const ZRegister& zt2, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load two-halfword structures to two vectors. + void ld2h(const ZRegister& zt1, + const ZRegister& zt2, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load two-word structures to two vectors. + void ld2w(const ZRegister& zt1, + const ZRegister& zt2, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load two-doubleword structures to two vectors. + void ld2d(const ZRegister& zt1, + const ZRegister& zt2, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load three-byte structures to three vectors. + void ld3b(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load three-halfword structures to three vectors. + void ld3h(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load three-word structures to three vectors. + void ld3w(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load three-doubleword structures to three vectors. + void ld3d(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load four-byte structures to four vectors. + void ld4b(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const ZRegister& zt4, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load four-halfword structures to four vectors. + void ld4h(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const ZRegister& zt4, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load four-word structures to four vectors. + void ld4w(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const ZRegister& zt4, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load four-doubleword structures to four vectors. + void ld4d(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const ZRegister& zt4, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load first-fault unsigned bytes to vector. + void ldff1b(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load first-fault unsigned halfwords to vector. + void ldff1h(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load first-fault unsigned words to vector. + void ldff1w(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load first-fault doublewords to vector. + void ldff1d(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load first-fault signed bytes to vector. + void ldff1sb(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load first-fault signed halfwords to vector. + void ldff1sh(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load first-fault signed words to vector. + void ldff1sw(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Gather load first-fault unsigned bytes to vector. + void ldff1b(const ZRegister& zt, + const PRegisterZ& pg, + const Register& xn, + const ZRegister& zm); + + // Gather load first-fault unsigned bytes to vector (immediate index). + void ldff1b(const ZRegister& zt, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5); + + // Gather load first-fault doublewords to vector (vector index). + void ldff1d(const ZRegister& zt, + const PRegisterZ& pg, + const Register& xn, + const ZRegister& zm); + + // Gather load first-fault doublewords to vector (immediate index). + void ldff1d(const ZRegister& zt, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5); + + // Gather load first-fault unsigned halfwords to vector (vector index). + void ldff1h(const ZRegister& zt, + const PRegisterZ& pg, + const Register& xn, + const ZRegister& zm); + + // Gather load first-fault unsigned halfwords to vector (immediate index). + void ldff1h(const ZRegister& zt, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5); + + // Gather load first-fault signed bytes to vector (vector index). + void ldff1sb(const ZRegister& zt, + const PRegisterZ& pg, + const Register& xn, + const ZRegister& zm); + + // Gather load first-fault signed bytes to vector (immediate index). + void ldff1sb(const ZRegister& zt, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5); + + // Gather load first-fault signed halfwords to vector (vector index). + void ldff1sh(const ZRegister& zt, + const PRegisterZ& pg, + const Register& xn, + const ZRegister& zm); + + // Gather load first-fault signed halfwords to vector (immediate index). + void ldff1sh(const ZRegister& zt, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5); + + // Gather load first-fault signed words to vector (vector index). + void ldff1sw(const ZRegister& zt, + const PRegisterZ& pg, + const Register& xn, + const ZRegister& zm); + + // Gather load first-fault signed words to vector (immediate index). + void ldff1sw(const ZRegister& zt, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5); + + // Gather load first-fault unsigned words to vector (vector index). + void ldff1w(const ZRegister& zt, + const PRegisterZ& pg, + const Register& xn, + const ZRegister& zm); + + // Gather load first-fault unsigned words to vector (immediate index). + void ldff1w(const ZRegister& zt, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5); + + // Contiguous load non-fault unsigned bytes to vector (immediate index). + void ldnf1b(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load non-fault doublewords to vector (immediate index). + void ldnf1d(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load non-fault unsigned halfwords to vector (immediate + // index). + void ldnf1h(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load non-fault signed bytes to vector (immediate index). + void ldnf1sb(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load non-fault signed halfwords to vector (immediate index). + void ldnf1sh(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load non-fault signed words to vector (immediate index). + void ldnf1sw(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load non-fault unsigned words to vector (immediate index). + void ldnf1w(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load non-temporal bytes to vector. + void ldnt1b(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load non-temporal halfwords to vector. + void ldnt1h(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load non-temporal words to vector. + void ldnt1w(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Contiguous load non-temporal doublewords to vector. + void ldnt1d(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Load SVE predicate/vector register. + void ldr(const CPURegister& rt, const SVEMemOperand& addr); + + // Logical shift left by immediate (predicated). + void lsl(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + int shift); + + // Logical shift left by 64-bit wide elements (predicated). + void lsl(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Logical shift left by immediate (unpredicated). + void lsl(const ZRegister& zd, const ZRegister& zn, int shift); + + // Logical shift left by 64-bit wide elements (unpredicated). + void lsl(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm); + + // Reversed logical shift left by vector (predicated). + void lslr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Logical shift right by immediate (predicated). + void lsr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + int shift); + + // Logical shift right by 64-bit wide elements (predicated). + void lsr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Logical shift right by immediate (unpredicated). + void lsr(const ZRegister& zd, const ZRegister& zn, int shift); + + // Logical shift right by 64-bit wide elements (unpredicated). + void lsr(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm); + + // Reversed logical shift right by vector (predicated). + void lsrr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Bitwise invert predicate. + void not_(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn); + + // Bitwise invert predicate, setting the condition flags. + void nots(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn); + + // Multiply-add vectors (predicated), writing multiplicand + // [Zdn = Za + Zdn * Zm]. + void mad(const ZRegister& zdn, + const PRegisterM& pg, + const ZRegister& zm, + const ZRegister& za); + + // Multiply-add vectors (predicated), writing addend + // [Zda = Zda + Zn * Zm]. + void mla(const ZRegister& zda, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Multiply-subtract vectors (predicated), writing addend + // [Zda = Zda - Zn * Zm]. + void mls(const ZRegister& zda, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Move predicates (unpredicated) + void mov(const PRegister& pd, const PRegister& pn); + + // Move predicates (merging) + void mov(const PRegisterWithLaneSize& pd, + const PRegisterM& pg, + const PRegisterWithLaneSize& pn); + + // Move predicates (zeroing) + void mov(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn); + + // Move general-purpose register to vector elements (unpredicated) + void mov(const ZRegister& zd, const Register& xn); + + // Move SIMD&FP scalar register to vector elements (unpredicated) + void mov(const ZRegister& zd, const VRegister& vn); + + // Move vector register (unpredicated) + void mov(const ZRegister& zd, const ZRegister& zn); + + // Move indexed element to vector elements (unpredicated) + void mov(const ZRegister& zd, const ZRegister& zn, unsigned index); + + // Move general-purpose register to vector elements (predicated) + void mov(const ZRegister& zd, const PRegisterM& pg, const Register& rn); + + // Move SIMD&FP scalar register to vector elements (predicated) + void mov(const ZRegister& zd, const PRegisterM& pg, const VRegister& vn); + + // Move vector elements (predicated) + void mov(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Move signed integer immediate to vector elements (predicated) + void mov(const ZRegister& zd, const PRegister& pg, int imm8, int shift = -1); + + // Move signed immediate to vector elements (unpredicated). + void mov(const ZRegister& zd, int imm8, int shift); + + // Move logical bitmask immediate to vector (unpredicated). + void mov(const ZRegister& zd, uint64_t imm); + + // Move predicate (unpredicated), setting the condition flags + void movs(const PRegister& pd, const PRegister& pn); + + // Move predicates (zeroing), setting the condition flags + void movs(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn); + + // Move prefix (predicated). + void movprfx(const ZRegister& zd, const PRegister& pg, const ZRegister& zn); + + // Move prefix (unpredicated). + void movprfx(const ZRegister& zd, const ZRegister& zn); + + // Multiply-subtract vectors (predicated), writing multiplicand + // [Zdn = Za - Zdn * Zm]. + void msb(const ZRegister& zdn, + const PRegisterM& pg, + const ZRegister& zm, + const ZRegister& za); + + // Multiply vectors (predicated). + void mul(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Multiply by immediate (unpredicated). + void mul(const ZRegister& zd, const ZRegister& zn, int imm8); + + // Bitwise NAND predicates. + void nand(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm); + + // Bitwise NAND predicates. + void nands(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm); + + // Negate (predicated). + void neg(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Bitwise NOR predicates. + void nor(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm); + + // Bitwise NOR predicates. + void nors(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm); + + // Bitwise invert vector (predicated). + void not_(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Bitwise OR inverted predicate. + void orn(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm); + + // Bitwise OR inverted predicate. + void orns(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm); + + // Bitwise OR with inverted immediate (unpredicated). + void orn(const ZRegister& zd, const ZRegister& zn, uint64_t imm); + + // Bitwise OR predicate. + void orr(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm); + + // Bitwise OR vectors (predicated). + void orr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Bitwise OR with immediate (unpredicated). + void orr(const ZRegister& zd, const ZRegister& zn, uint64_t imm); + + // Bitwise OR vectors (unpredicated). + void orr(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm); + + // Bitwise OR predicate. + void orrs(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm); + + // Bitwise OR reduction to scalar. + void orv(const VRegister& vd, const PRegister& pg, const ZRegister& zn); + + // Set all predicate elements to false. + void pfalse(const PRegisterWithLaneSize& pd); + + // Set the first active predicate element to true. + void pfirst(const PRegisterWithLaneSize& pd, + const PRegister& pg, + const PRegisterWithLaneSize& pn); + + // Find next active predicate. + void pnext(const PRegisterWithLaneSize& pd, + const PRegister& pg, + const PRegisterWithLaneSize& pn); + + // Prefetch bytes. + void prfb(PrefetchOperation prfop, + const PRegister& pg, + const SVEMemOperand& addr); + + // Prefetch halfwords. + void prfh(PrefetchOperation prfop, + const PRegister& pg, + const SVEMemOperand& addr); + + // Prefetch words. + void prfw(PrefetchOperation prfop, + const PRegister& pg, + const SVEMemOperand& addr); + + // Prefetch doublewords. + void prfd(PrefetchOperation prfop, + const PRegister& pg, + const SVEMemOperand& addr); + + // Set condition flags for predicate. + void ptest(const PRegister& pg, const PRegisterWithLaneSize& pn); + + // Initialise predicate from named constraint. + void ptrue(const PRegisterWithLaneSize& pd, int pattern = SVE_ALL); + + // Initialise predicate from named constraint. + void ptrues(const PRegisterWithLaneSize& pd, int pattern = SVE_ALL); + + // Unpack and widen half of predicate. + void punpkhi(const PRegisterWithLaneSize& pd, + const PRegisterWithLaneSize& pn); + + // Unpack and widen half of predicate. + void punpklo(const PRegisterWithLaneSize& pd, + const PRegisterWithLaneSize& pn); + + // Reverse bits (predicated). + void rbit(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Read the first-fault register. + void rdffr(const PRegisterWithLaneSize& pd); + + // Return predicate of succesfully loaded elements. + void rdffr(const PRegisterWithLaneSize& pd, const PRegisterZ& pg); + + // Return predicate of succesfully loaded elements. + void rdffrs(const PRegisterWithLaneSize& pd, const PRegisterZ& pg); + + // Read multiple of vector register size to scalar register. + void rdvl(const Register& xd, int imm6); + + // Reverse all elements in a predicate. + void rev(const PRegisterWithLaneSize& pd, const PRegisterWithLaneSize& pn); + + // Reverse all elements in a vector (unpredicated). + void rev(const ZRegister& zd, const ZRegister& zn); + + // Reverse bytes / halfwords / words within elements (predicated). + void revb(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Reverse bytes / halfwords / words within elements (predicated). + void revh(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Reverse bytes / halfwords / words within elements (predicated). + void revw(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Signed absolute difference (predicated). + void sabd(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Signed add reduction to scalar. + void saddv(const VRegister& dd, const PRegister& pg, const ZRegister& zn); + + // Signed integer convert to floating-point (predicated). + void scvtf(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Signed divide (predicated). + void sdiv(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Signed reversed divide (predicated). + void sdivr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Signed dot product by indexed quadtuplet. + void sdot(const ZRegister& zda, + const ZRegister& zn, + const ZRegister& zm, + int index); + + // Signed dot product. + void sdot(const ZRegister& zda, const ZRegister& zn, const ZRegister& zm); + + // Conditionally select elements from two predicates. + void sel(const PRegisterWithLaneSize& pd, + const PRegister& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm); + + // Conditionally select elements from two vectors. + void sel(const ZRegister& zd, + const PRegister& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Initialise the first-fault register to all true. + void setffr(); + + // Signed maximum vectors (predicated). + void smax(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Signed maximum with immediate (unpredicated). + void smax(const ZRegister& zd, const ZRegister& zn, int imm8); + + // Signed maximum reduction to scalar. + void smaxv(const VRegister& vd, const PRegister& pg, const ZRegister& zn); + + // Signed minimum vectors (predicated). + void smin(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Signed minimum with immediate (unpredicated). + void smin(const ZRegister& zd, const ZRegister& zn, int imm8); + + // Signed minimum reduction to scalar. + void sminv(const VRegister& vd, const PRegister& pg, const ZRegister& zn); + + // Signed multiply returning high half (predicated). + void smulh(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Splice two vectors under predicate control. + void splice(const ZRegister& zd, + const PRegister& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Signed saturating add vectors (unpredicated). + void sqadd(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm); + + // Signed saturating add immediate (unpredicated). + void sqadd(const ZRegister& zd, + const ZRegister& zn, + int imm8, + int shift = -1); + + // Signed saturating decrement scalar by multiple of 8-bit predicate + // constraint element count. + void sqdecb(const Register& xd, + const Register& wn, + int pattern, + int multiplier); + + // Signed saturating decrement scalar by multiple of 8-bit predicate + // constraint element count. + void sqdecb(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1); + + // Signed saturating decrement scalar by multiple of 64-bit predicate + // constraint element count. + void sqdecd(const Register& xd, + const Register& wn, + int pattern = SVE_ALL, + int multiplier = 1); + + // Signed saturating decrement scalar by multiple of 64-bit predicate + // constraint element count. + void sqdecd(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1); + + // Signed saturating decrement vector by multiple of 64-bit predicate + // constraint element count. + void sqdecd(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1); + + // Signed saturating decrement scalar by multiple of 16-bit predicate + // constraint element count. + void sqdech(const Register& xd, + const Register& wn, + int pattern = SVE_ALL, + int multiplier = 1); + + // Signed saturating decrement scalar by multiple of 16-bit predicate + // constraint element count. + void sqdech(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1); + + // Signed saturating decrement vector by multiple of 16-bit predicate + // constraint element count. + void sqdech(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1); + + // Signed saturating decrement scalar by active predicate element count. + void sqdecp(const Register& xd, + const PRegisterWithLaneSize& pg, + const Register& wn); + + // Signed saturating decrement scalar by active predicate element count. + void sqdecp(const Register& xdn, const PRegisterWithLaneSize& pg); + + // Signed saturating decrement vector by active predicate element count. + void sqdecp(const ZRegister& zdn, const PRegister& pg); + + // Signed saturating decrement scalar by multiple of 32-bit predicate + // constraint element count. + void sqdecw(const Register& xd, + const Register& wn, + int pattern = SVE_ALL, + int multiplier = 1); + + // Signed saturating decrement scalar by multiple of 32-bit predicate + // constraint element count. + void sqdecw(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1); + + // Signed saturating decrement vector by multiple of 32-bit predicate + // constraint element count. + void sqdecw(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1); + + // Signed saturating increment scalar by multiple of 8-bit predicate + // constraint element count. + void sqincb(const Register& xd, + const Register& wn, + int pattern = SVE_ALL, + int multiplier = 1); + + // Signed saturating increment scalar by multiple of 8-bit predicate + // constraint element count. + void sqincb(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1); + + // Signed saturating increment scalar by multiple of 64-bit predicate + // constraint element count. + void sqincd(const Register& xd, + const Register& wn, + int pattern, + int multiplier); + + // Signed saturating increment scalar by multiple of 64-bit predicate + // constraint element count. + void sqincd(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1); + + // Signed saturating increment vector by multiple of 64-bit predicate + // constraint element count. + void sqincd(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1); + + // Signed saturating increment scalar by multiple of 16-bit predicate + // constraint element count. + void sqinch(const Register& xd, + const Register& wn, + int pattern = SVE_ALL, + int multiplier = 1); + + // Signed saturating increment scalar by multiple of 16-bit predicate + // constraint element count. + void sqinch(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1); + + // Signed saturating increment vector by multiple of 16-bit predicate + // constraint element count. + void sqinch(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1); + + // Signed saturating increment scalar by active predicate element count. + void sqincp(const Register& xd, + const PRegisterWithLaneSize& pg, + const Register& wn); + + // Signed saturating increment scalar by active predicate element count. + void sqincp(const Register& xdn, const PRegisterWithLaneSize& pg); + + // Signed saturating increment vector by active predicate element count. + void sqincp(const ZRegister& zdn, const PRegister& pg); + + // Signed saturating increment scalar by multiple of 32-bit predicate + // constraint element count. + void sqincw(const Register& xd, + const Register& wn, + int pattern = SVE_ALL, + int multiplier = 1); + + // Signed saturating increment scalar by multiple of 32-bit predicate + // constraint element count. + void sqincw(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1); + + // Signed saturating increment vector by multiple of 32-bit predicate + // constraint element count. + void sqincw(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1); + + // Signed saturating subtract vectors (unpredicated). + void sqsub(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm); + + // Signed saturating subtract immediate (unpredicated). + void sqsub(const ZRegister& zd, + const ZRegister& zn, + int imm8, + int shift = -1); + + // Contiguous/scatter store bytes from vector. + void st1b(const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr); + + // Contiguous/scatter store halfwords from vector. + void st1h(const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr); + + // Contiguous/scatter store words from vector. + void st1w(const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr); + + // Contiguous/scatter store doublewords from vector. + void st1d(const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr); + + // Contiguous store two-byte structures from two vectors. + void st2b(const ZRegister& zt1, + const ZRegister& zt2, + const PRegister& pg, + const SVEMemOperand& addr); + + // Contiguous store two-halfword structures from two vectors. + void st2h(const ZRegister& zt1, + const ZRegister& zt2, + const PRegister& pg, + const SVEMemOperand& addr); + + // Contiguous store two-word structures from two vectors. + void st2w(const ZRegister& zt1, + const ZRegister& zt2, + const PRegister& pg, + const SVEMemOperand& addr); + + // Contiguous store two-doubleword structures from two vectors, + void st2d(const ZRegister& zt1, + const ZRegister& zt2, + const PRegister& pg, + const SVEMemOperand& addr); + + // Contiguous store three-byte structures from three vectors. + void st3b(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const PRegister& pg, + const SVEMemOperand& addr); + + // Contiguous store three-halfword structures from three vectors. + void st3h(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const PRegister& pg, + const SVEMemOperand& addr); + + // Contiguous store three-word structures from three vectors. + void st3w(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const PRegister& pg, + const SVEMemOperand& addr); + + // Contiguous store three-doubleword structures from three vectors. + void st3d(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const PRegister& pg, + const SVEMemOperand& addr); + + // Contiguous store four-byte structures from four vectors. + void st4b(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const ZRegister& zt4, + const PRegister& pg, + const SVEMemOperand& addr); + + // Contiguous store four-halfword structures from four vectors. + void st4h(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const ZRegister& zt4, + const PRegister& pg, + const SVEMemOperand& addr); + + // Contiguous store four-word structures from four vectors. + void st4w(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const ZRegister& zt4, + const PRegister& pg, + const SVEMemOperand& addr); + + // Contiguous store four-doubleword structures from four vectors. + void st4d(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const ZRegister& zt4, + const PRegister& pg, + const SVEMemOperand& addr); + + // Contiguous store non-temporal bytes from vector. + void stnt1b(const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr); + + // Contiguous store non-temporal halfwords from vector. + void stnt1h(const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr); + + // Contiguous store non-temporal words from vector. + void stnt1w(const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr); + + // Contiguous store non-temporal doublewords from vector. + void stnt1d(const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr); + + // Store SVE predicate/vector register. + void str(const CPURegister& rt, const SVEMemOperand& addr); + + // Subtract vectors (predicated). + void sub(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Subtract vectors (unpredicated). + void sub(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm); + + // Subtract immediate (unpredicated). + void sub(const ZRegister& zd, const ZRegister& zn, int imm8, int shift = -1); + + // Reversed subtract vectors (predicated). + void subr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Reversed subtract from immediate (unpredicated). + void subr(const ZRegister& zd, const ZRegister& zn, int imm8, int shift = -1); + + // Signed unpack and extend half of vector. + void sunpkhi(const ZRegister& zd, const ZRegister& zn); + + // Signed unpack and extend half of vector. + void sunpklo(const ZRegister& zd, const ZRegister& zn); + + // Signed byte extend (predicated). + void sxtb(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Signed halfword extend (predicated). + void sxth(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Signed word extend (predicated). + void sxtw(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Programmable table lookup/permute using vector of indices into a + // vector. + void tbl(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm); + + // Interleave even or odd elements from two predicates. + void trn1(const PRegisterWithLaneSize& pd, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm); + + // Interleave even or odd elements from two vectors. + void trn1(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm); + + // Interleave even or odd elements from two predicates. + void trn2(const PRegisterWithLaneSize& pd, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm); + + // Interleave even or odd elements from two vectors. + void trn2(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm); + + // Unsigned absolute difference (predicated). + void uabd(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Unsigned add reduction to scalar. + void uaddv(const VRegister& dd, const PRegister& pg, const ZRegister& zn); + + // Unsigned integer convert to floating-point (predicated). + void ucvtf(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Unsigned divide (predicated). + void udiv(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Unsigned reversed divide (predicated). + void udivr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Unsigned dot product by indexed quadtuplet. + void udot(const ZRegister& zda, + const ZRegister& zn, + const ZRegister& zm, + int index); + + // Unsigned dot product. + void udot(const ZRegister& zda, const ZRegister& zn, const ZRegister& zm); + + // Unsigned maximum vectors (predicated). + void umax(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Unsigned maximum with immediate (unpredicated). + void umax(const ZRegister& zd, const ZRegister& zn, int imm8); + + // Unsigned maximum reduction to scalar. + void umaxv(const VRegister& vd, const PRegister& pg, const ZRegister& zn); + + // Unsigned minimum vectors (predicated). + void umin(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Unsigned minimum with immediate (unpredicated). + void umin(const ZRegister& zd, const ZRegister& zn, int imm8); + + // Unsigned minimum reduction to scalar. + void uminv(const VRegister& vd, const PRegister& pg, const ZRegister& zn); + + // Unsigned multiply returning high half (predicated). + void umulh(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Unsigned saturating add vectors (unpredicated). + void uqadd(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm); + + // Unsigned saturating add immediate (unpredicated). + void uqadd(const ZRegister& zd, + const ZRegister& zn, + int imm8, + int shift = -1); + + // Unsigned saturating decrement scalar by multiple of 8-bit predicate + // constraint element count. + void uqdecb(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1); + + // Unsigned saturating decrement scalar by multiple of 64-bit predicate + // constraint element count. + void uqdecd(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1); + + // Unsigned saturating decrement vector by multiple of 64-bit predicate + // constraint element count. + void uqdecd(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1); + + // Unsigned saturating decrement scalar by multiple of 16-bit predicate + // constraint element count. + void uqdech(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1); + + // Unsigned saturating decrement vector by multiple of 16-bit predicate + // constraint element count. + void uqdech(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1); + + // Unsigned saturating decrement scalar by active predicate element count. + void uqdecp(const Register& rdn, const PRegisterWithLaneSize& pg); + + // Unsigned saturating decrement vector by active predicate element count. + void uqdecp(const ZRegister& zdn, const PRegister& pg); + + // Unsigned saturating decrement scalar by multiple of 32-bit predicate + // constraint element count. + void uqdecw(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1); + + // Unsigned saturating decrement vector by multiple of 32-bit predicate + // constraint element count. + void uqdecw(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1); + + // Unsigned saturating increment scalar by multiple of 8-bit predicate + // constraint element count. + void uqincb(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1); + + // Unsigned saturating increment scalar by multiple of 64-bit predicate + // constraint element count. + void uqincd(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1); + + // Unsigned saturating increment vector by multiple of 64-bit predicate + // constraint element count. + void uqincd(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1); + + // Unsigned saturating increment scalar by multiple of 16-bit predicate + // constraint element count. + void uqinch(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1); + + // Unsigned saturating increment vector by multiple of 16-bit predicate + // constraint element count. + void uqinch(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1); + + // Unsigned saturating increment scalar by active predicate element count. + void uqincp(const Register& rdn, const PRegisterWithLaneSize& pg); + + // Unsigned saturating increment vector by active predicate element count. + void uqincp(const ZRegister& zdn, const PRegister& pg); + + // Unsigned saturating increment scalar by multiple of 32-bit predicate + // constraint element count. + void uqincw(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1); + + // Unsigned saturating increment vector by multiple of 32-bit predicate + // constraint element count. + void uqincw(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1); + + // Unsigned saturating subtract vectors (unpredicated). + void uqsub(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm); + + // Unsigned saturating subtract immediate (unpredicated). + void uqsub(const ZRegister& zd, + const ZRegister& zn, + int imm8, + int shift = -1); + + // Unsigned unpack and extend half of vector. + void uunpkhi(const ZRegister& zd, const ZRegister& zn); + + // Unsigned unpack and extend half of vector. + void uunpklo(const ZRegister& zd, const ZRegister& zn); + + // Unsigned byte extend (predicated). + void uxtb(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Unsigned halfword extend (predicated). + void uxth(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Unsigned word extend (predicated). + void uxtw(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn); + + // Concatenate even or odd elements from two predicates. + void uzp1(const PRegisterWithLaneSize& pd, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm); + + // Concatenate even or odd elements from two vectors. + void uzp1(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm); + + // Concatenate even or odd elements from two predicates. + void uzp2(const PRegisterWithLaneSize& pd, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm); + + // Concatenate even or odd elements from two vectors. + void uzp2(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm); + + // While incrementing signed scalar less than or equal to scalar. + void whilele(const PRegisterWithLaneSize& pd, + const Register& rn, + const Register& rm); + + // While incrementing unsigned scalar lower than scalar. + void whilelo(const PRegisterWithLaneSize& pd, + const Register& rn, + const Register& rm); + + // While incrementing unsigned scalar lower or same as scalar. + void whilels(const PRegisterWithLaneSize& pd, + const Register& rn, + const Register& rm); + + // While incrementing signed scalar less than scalar. + void whilelt(const PRegisterWithLaneSize& pd, + const Register& rn, + const Register& rm); + + // Write the first-fault register. + void wrffr(const PRegisterWithLaneSize& pn); + + // Interleave elements from two half predicates. + void zip1(const PRegisterWithLaneSize& pd, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm); + + // Interleave elements from two half vectors. + void zip1(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm); + + // Interleave elements from two half predicates. + void zip2(const PRegisterWithLaneSize& pd, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm); + + // Interleave elements from two half vectors. + void zip2(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm); + + // Emit generic instructions. + + // Emit raw instructions into the instruction stream. + void dci(Instr raw_inst) { Emit(raw_inst); } + + // Emit 32 bits of data into the instruction stream. + void dc32(uint32_t data) { dc(data); } + + // Emit 64 bits of data into the instruction stream. + void dc64(uint64_t data) { dc(data); } + + // Emit data in the instruction stream. + template + void dc(T data) { + VIXL_ASSERT(AllowAssembler()); + GetBuffer()->Emit(data); + } + + // Copy a string into the instruction stream, including the terminating NULL + // character. The instruction pointer is then aligned correctly for + // subsequent instructions. + void EmitString(const char* string) { + VIXL_ASSERT(string != NULL); + VIXL_ASSERT(AllowAssembler()); + + GetBuffer()->EmitString(string); + GetBuffer()->Align(); + } + + // Code generation helpers. + static bool OneInstrMoveImmediateHelper(Assembler* assm, + const Register& dst, + uint64_t imm); + + // Register encoding. + template + static Instr Rx(CPURegister rx) { + VIXL_ASSERT(rx.GetCode() != kSPRegInternalCode); + return ImmUnsignedField(rx.GetCode()); + } + +#define CPU_REGISTER_FIELD_NAMES(V) V(d) V(n) V(m) V(a) V(t) V(t2) V(s) +#define REGISTER_ENCODER(N) \ + static Instr R##N(CPURegister r##N) { \ + return Rx(r##N); \ + } + CPU_REGISTER_FIELD_NAMES(REGISTER_ENCODER) +#undef REGISTER_ENCODER +#undef CPU_REGISTER_FIELD_NAMES + + static Instr RmNot31(CPURegister rm) { + VIXL_ASSERT(rm.GetCode() != kSPRegInternalCode); + VIXL_ASSERT(!rm.IsZero()); + return Rm(rm); + } + + // These encoding functions allow the stack pointer to be encoded, and + // disallow the zero register. + static Instr RdSP(Register rd) { + VIXL_ASSERT(!rd.IsZero()); + return (rd.GetCode() & kRegCodeMask) << Rd_offset; + } + + static Instr RnSP(Register rn) { + VIXL_ASSERT(!rn.IsZero()); + return (rn.GetCode() & kRegCodeMask) << Rn_offset; + } + + static Instr RmSP(Register rm) { + VIXL_ASSERT(!rm.IsZero()); + return (rm.GetCode() & kRegCodeMask) << Rm_offset; + } + + static Instr Pd(PRegister pd) { + return Rx(pd); + } + + static Instr Pm(PRegister pm) { + return Rx(pm); + } + + static Instr Pn(PRegister pn) { + return Rx(pn); + } + + static Instr PgLow8(PRegister pg) { + // Governing predicates can be merging, zeroing, or unqualified. They should + // never have a lane size. + VIXL_ASSERT(!pg.HasLaneSize()); + return Rx(pg); + } + + template + static Instr Pg(PRegister pg) { + // Governing predicates can be merging, zeroing, or unqualified. They should + // never have a lane size. + VIXL_ASSERT(!pg.HasLaneSize()); + return Rx(pg); + } + + // Flags encoding. + static Instr Flags(FlagsUpdate S) { + if (S == SetFlags) { + return 1 << FlagsUpdate_offset; + } else if (S == LeaveFlags) { + return 0 << FlagsUpdate_offset; + } + VIXL_UNREACHABLE(); + return 0; + } + + static Instr Cond(Condition cond) { return cond << Condition_offset; } + + // Generic immediate encoding. + template + static Instr ImmField(int64_t imm) { + VIXL_STATIC_ASSERT((hibit >= lobit) && (lobit >= 0)); + VIXL_STATIC_ASSERT(hibit < (sizeof(Instr) * kBitsPerByte)); + int fieldsize = hibit - lobit + 1; + VIXL_ASSERT(IsIntN(fieldsize, imm)); + return static_cast(TruncateToUintN(fieldsize, imm) << lobit); + } + + // For unsigned immediate encoding. + // TODO: Handle signed and unsigned immediate in satisfactory way. + template + static Instr ImmUnsignedField(uint64_t imm) { + VIXL_STATIC_ASSERT((hibit >= lobit) && (lobit >= 0)); + VIXL_STATIC_ASSERT(hibit < (sizeof(Instr) * kBitsPerByte)); + VIXL_ASSERT(IsUintN(hibit - lobit + 1, imm)); + return static_cast(imm << lobit); + } + + // PC-relative address encoding. + static Instr ImmPCRelAddress(int64_t imm21) { + VIXL_ASSERT(IsInt21(imm21)); + Instr imm = static_cast(TruncateToUint21(imm21)); + Instr immhi = (imm >> ImmPCRelLo_width) << ImmPCRelHi_offset; + Instr immlo = imm << ImmPCRelLo_offset; + return (immhi & ImmPCRelHi_mask) | (immlo & ImmPCRelLo_mask); + } + + // Branch encoding. + static Instr ImmUncondBranch(int64_t imm26) { + VIXL_ASSERT(IsInt26(imm26)); + return TruncateToUint26(imm26) << ImmUncondBranch_offset; + } + + static Instr ImmCondBranch(int64_t imm19) { + VIXL_ASSERT(IsInt19(imm19)); + return TruncateToUint19(imm19) << ImmCondBranch_offset; + } + + static Instr ImmCmpBranch(int64_t imm19) { + VIXL_ASSERT(IsInt19(imm19)); + return TruncateToUint19(imm19) << ImmCmpBranch_offset; + } + + static Instr ImmTestBranch(int64_t imm14) { + VIXL_ASSERT(IsInt14(imm14)); + return TruncateToUint14(imm14) << ImmTestBranch_offset; + } + + static Instr ImmTestBranchBit(unsigned bit_pos) { + VIXL_ASSERT(IsUint6(bit_pos)); + // Subtract five from the shift offset, as we need bit 5 from bit_pos. + unsigned b5 = bit_pos << (ImmTestBranchBit5_offset - 5); + unsigned b40 = bit_pos << ImmTestBranchBit40_offset; + b5 &= ImmTestBranchBit5_mask; + b40 &= ImmTestBranchBit40_mask; + return b5 | b40; + } + + // Data Processing encoding. + static Instr SF(Register rd) { + return rd.Is64Bits() ? SixtyFourBits : ThirtyTwoBits; + } + + static Instr ImmAddSub(int imm) { + VIXL_ASSERT(IsImmAddSub(imm)); + if (IsUint12(imm)) { // No shift required. + imm <<= ImmAddSub_offset; + } else { + imm = ((imm >> 12) << ImmAddSub_offset) | (1 << ImmAddSubShift_offset); + } + return imm; + } + + static Instr SVEImmSetBits(unsigned imms, unsigned lane_size) { + VIXL_ASSERT(IsUint6(imms)); + VIXL_ASSERT((lane_size == kDRegSize) || IsUint6(imms + 3)); + USE(lane_size); + return imms << SVEImmSetBits_offset; + } + + static Instr SVEImmRotate(unsigned immr, unsigned lane_size) { + VIXL_ASSERT(IsUintN(WhichPowerOf2(lane_size), immr)); + USE(lane_size); + return immr << SVEImmRotate_offset; + } + + static Instr SVEBitN(unsigned bitn) { + VIXL_ASSERT(IsUint1(bitn)); + return bitn << SVEBitN_offset; + } + + static Instr SVEDtype(unsigned msize_in_bytes_log2, + unsigned esize_in_bytes_log2, + bool is_signed, + int dtype_h_lsb = 23, + int dtype_l_lsb = 21) { + VIXL_ASSERT(msize_in_bytes_log2 <= kDRegSizeInBytesLog2); + VIXL_ASSERT(esize_in_bytes_log2 <= kDRegSizeInBytesLog2); + Instr dtype_h = msize_in_bytes_log2; + Instr dtype_l = esize_in_bytes_log2; + // Signed forms use the encodings where msize would be greater than esize. + if (is_signed) { + dtype_h = dtype_h ^ 0x3; + dtype_l = dtype_l ^ 0x3; + } + VIXL_ASSERT(IsUint2(dtype_h)); + VIXL_ASSERT(IsUint2(dtype_l)); + VIXL_ASSERT((dtype_h > dtype_l) == is_signed); + + return (dtype_h << dtype_h_lsb) | (dtype_l << dtype_l_lsb); + } + + static Instr SVEDtypeSplit(unsigned msize_in_bytes_log2, + unsigned esize_in_bytes_log2, + bool is_signed) { + return SVEDtype(msize_in_bytes_log2, + esize_in_bytes_log2, + is_signed, + 23, + 13); + } + + static Instr ImmS(unsigned imms, unsigned reg_size) { + VIXL_ASSERT(((reg_size == kXRegSize) && IsUint6(imms)) || + ((reg_size == kWRegSize) && IsUint5(imms))); + USE(reg_size); + return imms << ImmS_offset; + } + + static Instr ImmR(unsigned immr, unsigned reg_size) { + VIXL_ASSERT(((reg_size == kXRegSize) && IsUint6(immr)) || + ((reg_size == kWRegSize) && IsUint5(immr))); + USE(reg_size); + VIXL_ASSERT(IsUint6(immr)); + return immr << ImmR_offset; + } + + static Instr ImmSetBits(unsigned imms, unsigned reg_size) { + VIXL_ASSERT((reg_size == kWRegSize) || (reg_size == kXRegSize)); + VIXL_ASSERT(IsUint6(imms)); + VIXL_ASSERT((reg_size == kXRegSize) || IsUint6(imms + 3)); + USE(reg_size); + return imms << ImmSetBits_offset; + } + + static Instr ImmRotate(unsigned immr, unsigned reg_size) { + VIXL_ASSERT((reg_size == kWRegSize) || (reg_size == kXRegSize)); + VIXL_ASSERT(((reg_size == kXRegSize) && IsUint6(immr)) || + ((reg_size == kWRegSize) && IsUint5(immr))); + USE(reg_size); + return immr << ImmRotate_offset; + } + + static Instr ImmLLiteral(int64_t imm19) { + VIXL_ASSERT(IsInt19(imm19)); + return TruncateToUint19(imm19) << ImmLLiteral_offset; + } + + static Instr BitN(unsigned bitn, unsigned reg_size) { + VIXL_ASSERT((reg_size == kWRegSize) || (reg_size == kXRegSize)); + VIXL_ASSERT((reg_size == kXRegSize) || (bitn == 0)); + USE(reg_size); + return bitn << BitN_offset; + } + + static Instr ShiftDP(Shift shift) { + VIXL_ASSERT(shift == LSL || shift == LSR || shift == ASR || shift == ROR); + return shift << ShiftDP_offset; + } + + static Instr ImmDPShift(unsigned amount) { + VIXL_ASSERT(IsUint6(amount)); + return amount << ImmDPShift_offset; + } + + static Instr ExtendMode(Extend extend) { return extend << ExtendMode_offset; } + + static Instr ImmExtendShift(unsigned left_shift) { + VIXL_ASSERT(left_shift <= 4); + return left_shift << ImmExtendShift_offset; + } + + static Instr ImmCondCmp(unsigned imm) { + VIXL_ASSERT(IsUint5(imm)); + return imm << ImmCondCmp_offset; + } + + static Instr Nzcv(StatusFlags nzcv) { + return ((nzcv >> Flags_offset) & 0xf) << Nzcv_offset; + } + + // MemOperand offset encoding. + static Instr ImmLSUnsigned(int64_t imm12) { + VIXL_ASSERT(IsUint12(imm12)); + return TruncateToUint12(imm12) << ImmLSUnsigned_offset; + } + + static Instr ImmLS(int64_t imm9) { + VIXL_ASSERT(IsInt9(imm9)); + return TruncateToUint9(imm9) << ImmLS_offset; + } + + static Instr ImmLSPair(int64_t imm7, unsigned access_size_in_bytes_log2) { + VIXL_ASSERT(IsMultiple(imm7, 1 << access_size_in_bytes_log2)); + int64_t scaled_imm7 = imm7 / (1 << access_size_in_bytes_log2); + VIXL_ASSERT(IsInt7(scaled_imm7)); + return TruncateToUint7(scaled_imm7) << ImmLSPair_offset; + } + + static Instr ImmShiftLS(unsigned shift_amount) { + VIXL_ASSERT(IsUint1(shift_amount)); + return shift_amount << ImmShiftLS_offset; + } + + static Instr ImmLSPAC(int64_t imm10) { + VIXL_ASSERT(IsMultiple(imm10, 1 << 3)); + int64_t scaled_imm10 = imm10 / (1 << 3); + VIXL_ASSERT(IsInt10(scaled_imm10)); + uint32_t s_bit = (scaled_imm10 >> 9) & 1; + return (s_bit << ImmLSPACHi_offset) | + (TruncateToUint9(scaled_imm10) << ImmLSPACLo_offset); + } + + static Instr ImmPrefetchOperation(int imm5) { + VIXL_ASSERT(IsUint5(imm5)); + return imm5 << ImmPrefetchOperation_offset; + } + + static Instr ImmException(int imm16) { + VIXL_ASSERT(IsUint16(imm16)); + return imm16 << ImmException_offset; + } + + static Instr ImmUdf(int imm16) { + VIXL_ASSERT(IsUint16(imm16)); + return imm16 << ImmUdf_offset; + } + + static Instr ImmSystemRegister(int imm16) { + VIXL_ASSERT(IsUint16(imm16)); + return imm16 << ImmSystemRegister_offset; + } + + static Instr ImmRMIFRotation(int imm6) { + VIXL_ASSERT(IsUint6(imm6)); + return imm6 << ImmRMIFRotation_offset; + } + + static Instr ImmHint(int imm7) { + VIXL_ASSERT(IsUint7(imm7)); + return imm7 << ImmHint_offset; + } + + static Instr CRm(int imm4) { + VIXL_ASSERT(IsUint4(imm4)); + return imm4 << CRm_offset; + } + + static Instr CRn(int imm4) { + VIXL_ASSERT(IsUint4(imm4)); + return imm4 << CRn_offset; + } + + static Instr SysOp(int imm14) { + VIXL_ASSERT(IsUint14(imm14)); + return imm14 << SysOp_offset; + } + + static Instr ImmSysOp1(int imm3) { + VIXL_ASSERT(IsUint3(imm3)); + return imm3 << SysOp1_offset; + } + + static Instr ImmSysOp2(int imm3) { + VIXL_ASSERT(IsUint3(imm3)); + return imm3 << SysOp2_offset; + } + + static Instr ImmBarrierDomain(int imm2) { + VIXL_ASSERT(IsUint2(imm2)); + return imm2 << ImmBarrierDomain_offset; + } + + static Instr ImmBarrierType(int imm2) { + VIXL_ASSERT(IsUint2(imm2)); + return imm2 << ImmBarrierType_offset; + } + + // Move immediates encoding. + static Instr ImmMoveWide(uint64_t imm) { + VIXL_ASSERT(IsUint16(imm)); + return static_cast(imm << ImmMoveWide_offset); + } + + static Instr ShiftMoveWide(int64_t shift) { + VIXL_ASSERT(IsUint2(shift)); + return static_cast(shift << ShiftMoveWide_offset); + } + + // FP Immediates. + static Instr ImmFP16(Float16 imm); + static Instr ImmFP32(float imm); + static Instr ImmFP64(double imm); + + // FP register type. + static Instr FPType(VRegister fd) { + VIXL_ASSERT(fd.IsScalar()); + switch (fd.GetSizeInBits()) { + case 16: + return FP16; + case 32: + return FP32; + case 64: + return FP64; + default: + VIXL_UNREACHABLE(); + return 0; + } + } + + static Instr FPScale(unsigned scale) { + VIXL_ASSERT(IsUint6(scale)); + return scale << FPScale_offset; + } + + // Immediate field checking helpers. + static bool IsImmAddSub(int64_t immediate); + static bool IsImmConditionalCompare(int64_t immediate); + static bool IsImmFP16(Float16 imm); + static bool IsImmFP32(float imm); + static bool IsImmFP64(double imm); + static bool IsImmLogical(uint64_t value, + unsigned width, + unsigned* n = NULL, + unsigned* imm_s = NULL, + unsigned* imm_r = NULL); + static bool IsImmLSPair(int64_t offset, unsigned access_size_in_bytes_log2); + static bool IsImmLSScaled(int64_t offset, unsigned access_size_in_bytes_log2); + static bool IsImmLSUnscaled(int64_t offset); + static bool IsImmMovn(uint64_t imm, unsigned reg_size); + static bool IsImmMovz(uint64_t imm, unsigned reg_size); + + // Instruction bits for vector format in data processing operations. + static Instr VFormat(VRegister vd) { + if (vd.Is64Bits()) { + switch (vd.GetLanes()) { + case 2: + return NEON_2S; + case 4: + return NEON_4H; + case 8: + return NEON_8B; + default: + return 0xffffffff; + } + } else { + VIXL_ASSERT(vd.Is128Bits()); + switch (vd.GetLanes()) { + case 2: + return NEON_2D; + case 4: + return NEON_4S; + case 8: + return NEON_8H; + case 16: + return NEON_16B; + default: + return 0xffffffff; + } + } + } + + // Instruction bits for vector format in floating point data processing + // operations. + static Instr FPFormat(VRegister vd) { + switch (vd.GetLanes()) { + case 1: + // Floating point scalar formats. + switch (vd.GetSizeInBits()) { + case 16: + return FP16; + case 32: + return FP32; + case 64: + return FP64; + default: + VIXL_UNREACHABLE(); + } + break; + case 2: + // Two lane floating point vector formats. + switch (vd.GetSizeInBits()) { + case 64: + return NEON_FP_2S; + case 128: + return NEON_FP_2D; + default: + VIXL_UNREACHABLE(); + } + break; + case 4: + // Four lane floating point vector formats. + switch (vd.GetSizeInBits()) { + case 64: + return NEON_FP_4H; + case 128: + return NEON_FP_4S; + default: + VIXL_UNREACHABLE(); + } + break; + case 8: + // Eight lane floating point vector format. + VIXL_ASSERT(vd.Is128Bits()); + return NEON_FP_8H; + default: + VIXL_UNREACHABLE(); + return 0; + } + VIXL_UNREACHABLE(); + return 0; + } + + // Instruction bits for vector format in load and store operations. + static Instr LSVFormat(VRegister vd) { + if (vd.Is64Bits()) { + switch (vd.GetLanes()) { + case 1: + return LS_NEON_1D; + case 2: + return LS_NEON_2S; + case 4: + return LS_NEON_4H; + case 8: + return LS_NEON_8B; + default: + return 0xffffffff; + } + } else { + VIXL_ASSERT(vd.Is128Bits()); + switch (vd.GetLanes()) { + case 2: + return LS_NEON_2D; + case 4: + return LS_NEON_4S; + case 8: + return LS_NEON_8H; + case 16: + return LS_NEON_16B; + default: + return 0xffffffff; + } + } + } + + // Instruction bits for scalar format in data processing operations. + static Instr SFormat(VRegister vd) { + VIXL_ASSERT(vd.GetLanes() == 1); + switch (vd.GetSizeInBytes()) { + case 1: + return NEON_B; + case 2: + return NEON_H; + case 4: + return NEON_S; + case 8: + return NEON_D; + default: + return 0xffffffff; + } + } + + template + static Instr SVESize(const T& rd) { + VIXL_ASSERT(rd.IsZRegister() || rd.IsPRegister()); + VIXL_ASSERT(rd.HasLaneSize()); + switch (rd.GetLaneSizeInBytes()) { + case 1: + return SVE_B; + case 2: + return SVE_H; + case 4: + return SVE_S; + case 8: + return SVE_D; + default: + return 0xffffffff; + } + } + + static Instr ImmSVEPredicateConstraint(int pattern) { + VIXL_ASSERT(IsUint5(pattern)); + return (pattern << ImmSVEPredicateConstraint_offset) & + ImmSVEPredicateConstraint_mask; + } + + static Instr ImmNEONHLM(int index, int num_bits) { + int h, l, m; + if (num_bits == 3) { + VIXL_ASSERT(IsUint3(index)); + h = (index >> 2) & 1; + l = (index >> 1) & 1; + m = (index >> 0) & 1; + } else if (num_bits == 2) { + VIXL_ASSERT(IsUint2(index)); + h = (index >> 1) & 1; + l = (index >> 0) & 1; + m = 0; + } else { + VIXL_ASSERT(IsUint1(index) && (num_bits == 1)); + h = (index >> 0) & 1; + l = 0; + m = 0; + } + return (h << NEONH_offset) | (l << NEONL_offset) | (m << NEONM_offset); + } + + static Instr ImmRotFcadd(int rot) { + VIXL_ASSERT(rot == 90 || rot == 270); + return (((rot == 270) ? 1 : 0) << ImmRotFcadd_offset); + } + + static Instr ImmRotFcmlaSca(int rot) { + VIXL_ASSERT(rot == 0 || rot == 90 || rot == 180 || rot == 270); + return (rot / 90) << ImmRotFcmlaSca_offset; + } + + static Instr ImmRotFcmlaVec(int rot) { + VIXL_ASSERT(rot == 0 || rot == 90 || rot == 180 || rot == 270); + return (rot / 90) << ImmRotFcmlaVec_offset; + } + + static Instr ImmNEONExt(int imm4) { + VIXL_ASSERT(IsUint4(imm4)); + return imm4 << ImmNEONExt_offset; + } + + static Instr ImmNEON5(Instr format, int index) { + VIXL_ASSERT(IsUint4(index)); + int s = LaneSizeInBytesLog2FromFormat(static_cast(format)); + int imm5 = (index << (s + 1)) | (1 << s); + return imm5 << ImmNEON5_offset; + } + + static Instr ImmNEON4(Instr format, int index) { + VIXL_ASSERT(IsUint4(index)); + int s = LaneSizeInBytesLog2FromFormat(static_cast(format)); + int imm4 = index << s; + return imm4 << ImmNEON4_offset; + } + + static Instr ImmNEONabcdefgh(int imm8) { + VIXL_ASSERT(IsUint8(imm8)); + Instr instr; + instr = ((imm8 >> 5) & 7) << ImmNEONabc_offset; + instr |= (imm8 & 0x1f) << ImmNEONdefgh_offset; + return instr; + } + + static Instr NEONCmode(int cmode) { + VIXL_ASSERT(IsUint4(cmode)); + return cmode << NEONCmode_offset; + } + + static Instr NEONModImmOp(int op) { + VIXL_ASSERT(IsUint1(op)); + return op << NEONModImmOp_offset; + } + + // Size of the code generated since label to the current position. + size_t GetSizeOfCodeGeneratedSince(Label* label) const { + VIXL_ASSERT(label->IsBound()); + return GetBuffer().GetOffsetFrom(label->GetLocation()); + } + VIXL_DEPRECATED("GetSizeOfCodeGeneratedSince", + size_t SizeOfCodeGeneratedSince(Label* label) const) { + return GetSizeOfCodeGeneratedSince(label); + } + + VIXL_DEPRECATED("GetBuffer().GetCapacity()", + size_t GetBufferCapacity() const) { + return GetBuffer().GetCapacity(); + } + VIXL_DEPRECATED("GetBuffer().GetCapacity()", size_t BufferCapacity() const) { + return GetBuffer().GetCapacity(); + } + + VIXL_DEPRECATED("GetBuffer().GetRemainingBytes()", + size_t GetRemainingBufferSpace() const) { + return GetBuffer().GetRemainingBytes(); + } + VIXL_DEPRECATED("GetBuffer().GetRemainingBytes()", + size_t RemainingBufferSpace() const) { + return GetBuffer().GetRemainingBytes(); + } + + PositionIndependentCodeOption GetPic() const { return pic_; } + VIXL_DEPRECATED("GetPic", PositionIndependentCodeOption pic() const) { + return GetPic(); + } + + CPUFeatures* GetCPUFeatures() { return &cpu_features_; } + + void SetCPUFeatures(const CPUFeatures& cpu_features) { + cpu_features_ = cpu_features; + } + + bool AllowPageOffsetDependentCode() const { + return (GetPic() == PageOffsetDependentCode) || + (GetPic() == PositionDependentCode); + } + + static Register AppropriateZeroRegFor(const CPURegister& reg) { + return reg.Is64Bits() ? Register(xzr) : Register(wzr); + } + + protected: + void LoadStore(const CPURegister& rt, + const MemOperand& addr, + LoadStoreOp op, + LoadStoreScalingOption option = PreferScaledOffset); + + void LoadStorePAC(const Register& xt, + const MemOperand& addr, + LoadStorePACOp op); + + void LoadStorePair(const CPURegister& rt, + const CPURegister& rt2, + const MemOperand& addr, + LoadStorePairOp op); + void LoadStoreStruct(const VRegister& vt, + const MemOperand& addr, + NEONLoadStoreMultiStructOp op); + void LoadStoreStruct1(const VRegister& vt, + int reg_count, + const MemOperand& addr); + void LoadStoreStructSingle(const VRegister& vt, + uint32_t lane, + const MemOperand& addr, + NEONLoadStoreSingleStructOp op); + void LoadStoreStructSingleAllLanes(const VRegister& vt, + const MemOperand& addr, + NEONLoadStoreSingleStructOp op); + void LoadStoreStructVerify(const VRegister& vt, + const MemOperand& addr, + Instr op); + + // Set `is_load` to false in default as it's only used in the + // scalar-plus-vector form. + Instr SVEMemOperandHelper(unsigned msize_in_bytes_log2, + int num_regs, + const SVEMemOperand& addr, + bool is_load = false); + + // E.g. st1b, st1h, ... + // This supports both contiguous and scatter stores. + void SVESt1Helper(unsigned msize_in_bytes_log2, + const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr); + + // E.g. ld1b, ld1h, ... + // This supports both contiguous and gather loads. + void SVELd1Helper(unsigned msize_in_bytes_log2, + const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr, + bool is_signed); + + // E.g. ld1rb, ld1rh, ... + void SVELd1BroadcastHelper(unsigned msize_in_bytes_log2, + const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr, + bool is_signed); + + // E.g. ldff1b, ldff1h, ... + // This supports both contiguous and gather loads. + void SVELdff1Helper(unsigned msize_in_bytes_log2, + const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr, + bool is_signed); + + // Common code for the helpers above. + void SVELdSt1Helper(unsigned msize_in_bytes_log2, + const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr, + bool is_signed, + Instr op); + + // Common code for the helpers above. + void SVEScatterGatherHelper(unsigned msize_in_bytes_log2, + const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr, + bool is_load, + bool is_signed, + bool is_first_fault); + + // E.g. st2b, st3h, ... + void SVESt234Helper(int num_regs, + const ZRegister& zt1, + const PRegister& pg, + const SVEMemOperand& addr); + + // E.g. ld2b, ld3h, ... + void SVELd234Helper(int num_regs, + const ZRegister& zt1, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + // Common code for the helpers above. + void SVELdSt234Helper(int num_regs, + const ZRegister& zt1, + const PRegister& pg, + const SVEMemOperand& addr, + Instr op); + + // E.g. ld1qb, ld1qh, ldnt1b, ... + void SVELd1St1ScaImmHelper(const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr, + Instr regoffset_op, + Instr immoffset_op, + int imm_divisor = 1); + + void Prefetch(PrefetchOperation op, + const MemOperand& addr, + LoadStoreScalingOption option = PreferScaledOffset); + void Prefetch(int op, + const MemOperand& addr, + LoadStoreScalingOption option = PreferScaledOffset); + + // TODO(all): The third parameter should be passed by reference but gcc 4.8.2 + // reports a bogus uninitialised warning then. + void Logical(const Register& rd, + const Register& rn, + const Operand operand, + LogicalOp op); + + void SVELogicalImmediate(const ZRegister& zd, uint64_t imm, Instr op); + + void LogicalImmediate(const Register& rd, + const Register& rn, + unsigned n, + unsigned imm_s, + unsigned imm_r, + LogicalOp op); + + void ConditionalCompare(const Register& rn, + const Operand& operand, + StatusFlags nzcv, + Condition cond, + ConditionalCompareOp op); + + void AddSubWithCarry(const Register& rd, + const Register& rn, + const Operand& operand, + FlagsUpdate S, + AddSubWithCarryOp op); + + void CompareVectors(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm, + SVEIntCompareVectorsOp op); + + void CompareVectors(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + int imm, + SVEIntCompareSignedImmOp op); + + void CompareVectors(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + unsigned imm, + SVEIntCompareUnsignedImmOp op); + + void SVEIntAddSubtractImmUnpredicatedHelper( + SVEIntAddSubtractImm_UnpredicatedOp op, + const ZRegister& zd, + int imm8, + int shift); + + void SVEElementCountToRegisterHelper(Instr op, + const Register& rd, + int pattern, + int multiplier); + + Instr EncodeSVEShiftImmediate(Shift shift_op, + int shift, + int lane_size_in_bits); + + void SVEBitwiseShiftImmediate(const ZRegister& zd, + const ZRegister& zn, + Instr encoded_imm, + SVEBitwiseShiftUnpredicatedOp op); + + void SVEBitwiseShiftImmediatePred(const ZRegister& zdn, + const PRegisterM& pg, + Instr encoded_imm, + SVEBitwiseShiftByImm_PredicatedOp op); + + Instr SVEFPMulIndexHelper(unsigned lane_size_in_bytes_log2, + const ZRegister& zm, + int index, + Instr op_h, + Instr op_s, + Instr op_d); + + + void SVEContiguousPrefetchScalarPlusScalarHelper(PrefetchOperation prfop, + const PRegister& pg, + const SVEMemOperand& addr, + int prefetch_size); + + void SVEContiguousPrefetchScalarPlusVectorHelper(PrefetchOperation prfop, + const PRegister& pg, + const SVEMemOperand& addr, + int prefetch_size); + + void SVEGatherPrefetchVectorPlusImmediateHelper(PrefetchOperation prfop, + const PRegister& pg, + const SVEMemOperand& addr, + int prefetch_size); + + void SVEGatherPrefetchScalarPlusImmediateHelper(PrefetchOperation prfop, + const PRegister& pg, + const SVEMemOperand& addr, + int prefetch_size); + + void SVEPrefetchHelper(PrefetchOperation prfop, + const PRegister& pg, + const SVEMemOperand& addr, + int prefetch_size); + + static Instr SVEImmPrefetchOperation(PrefetchOperation prfop) { + // SVE only supports PLD and PST, not PLI. + VIXL_ASSERT(((prfop >= PLDL1KEEP) && (prfop <= PLDL3STRM)) || + ((prfop >= PSTL1KEEP) && (prfop <= PSTL3STRM))); + // Check that we can simply map bits. + VIXL_STATIC_ASSERT(PLDL1KEEP == 0b00000); + VIXL_STATIC_ASSERT(PSTL1KEEP == 0b10000); + // Remaining operations map directly. + return ((prfop & 0b10000) >> 1) | (prfop & 0b00111); + } + + // Functions for emulating operands not directly supported by the instruction + // set. + void EmitShift(const Register& rd, + const Register& rn, + Shift shift, + unsigned amount); + void EmitExtendShift(const Register& rd, + const Register& rn, + Extend extend, + unsigned left_shift); + + void AddSub(const Register& rd, + const Register& rn, + const Operand& operand, + FlagsUpdate S, + AddSubOp op); + + void NEONTable(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + NEONTableOp op); + + // Find an appropriate LoadStoreOp or LoadStorePairOp for the specified + // registers. Only simple loads are supported; sign- and zero-extension (such + // as in LDPSW_x or LDRB_w) are not supported. + static LoadStoreOp LoadOpFor(const CPURegister& rt); + static LoadStorePairOp LoadPairOpFor(const CPURegister& rt, + const CPURegister& rt2); + static LoadStoreOp StoreOpFor(const CPURegister& rt); + static LoadStorePairOp StorePairOpFor(const CPURegister& rt, + const CPURegister& rt2); + static LoadStorePairNonTemporalOp LoadPairNonTemporalOpFor( + const CPURegister& rt, const CPURegister& rt2); + static LoadStorePairNonTemporalOp StorePairNonTemporalOpFor( + const CPURegister& rt, const CPURegister& rt2); + static LoadLiteralOp LoadLiteralOpFor(const CPURegister& rt); + + // Convenience pass-through for CPU feature checks. + bool CPUHas(CPUFeatures::Feature feature0, + CPUFeatures::Feature feature1 = CPUFeatures::kNone, + CPUFeatures::Feature feature2 = CPUFeatures::kNone, + CPUFeatures::Feature feature3 = CPUFeatures::kNone) const { + return cpu_features_.Has(feature0, feature1, feature2, feature3); + } + + // Determine whether the target CPU has the specified registers, based on the + // currently-enabled CPU features. Presence of a register does not imply + // support for arbitrary operations on it. For example, CPUs with FP have H + // registers, but most half-precision operations require the FPHalf feature. + // + // These are used to check CPU features in loads and stores that have the same + // entry point for both integer and FP registers. + bool CPUHas(const CPURegister& rt) const; + bool CPUHas(const CPURegister& rt, const CPURegister& rt2) const; + + bool CPUHas(SystemRegister sysreg) const; + + private: + static uint32_t FP16ToImm8(Float16 imm); + static uint32_t FP32ToImm8(float imm); + static uint32_t FP64ToImm8(double imm); + + // Instruction helpers. + void MoveWide(const Register& rd, + uint64_t imm, + int shift, + MoveWideImmediateOp mov_op); + void DataProcShiftedRegister(const Register& rd, + const Register& rn, + const Operand& operand, + FlagsUpdate S, + Instr op); + void DataProcExtendedRegister(const Register& rd, + const Register& rn, + const Operand& operand, + FlagsUpdate S, + Instr op); + void LoadStorePairNonTemporal(const CPURegister& rt, + const CPURegister& rt2, + const MemOperand& addr, + LoadStorePairNonTemporalOp op); + void LoadLiteral(const CPURegister& rt, uint64_t imm, LoadLiteralOp op); + void ConditionalSelect(const Register& rd, + const Register& rn, + const Register& rm, + Condition cond, + ConditionalSelectOp op); + void DataProcessing1Source(const Register& rd, + const Register& rn, + DataProcessing1SourceOp op); + void DataProcessing3Source(const Register& rd, + const Register& rn, + const Register& rm, + const Register& ra, + DataProcessing3SourceOp op); + void FPDataProcessing1Source(const VRegister& fd, + const VRegister& fn, + FPDataProcessing1SourceOp op); + void FPDataProcessing3Source(const VRegister& fd, + const VRegister& fn, + const VRegister& fm, + const VRegister& fa, + FPDataProcessing3SourceOp op); + void NEONAcrossLanesL(const VRegister& vd, + const VRegister& vn, + NEONAcrossLanesOp op); + void NEONAcrossLanes(const VRegister& vd, + const VRegister& vn, + NEONAcrossLanesOp op, + Instr op_half); + void NEONModifiedImmShiftLsl(const VRegister& vd, + const int imm8, + const int left_shift, + NEONModifiedImmediateOp op); + void NEONModifiedImmShiftMsl(const VRegister& vd, + const int imm8, + const int shift_amount, + NEONModifiedImmediateOp op); + void NEONFP2Same(const VRegister& vd, const VRegister& vn, Instr vop); + void NEON3Same(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + NEON3SameOp vop); + void NEON3SameFP16(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + Instr op); + void NEONFP3Same(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + Instr op); + void NEON3DifferentL(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + NEON3DifferentOp vop); + void NEON3DifferentW(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + NEON3DifferentOp vop); + void NEON3DifferentHN(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + NEON3DifferentOp vop); + void NEONFP2RegMisc(const VRegister& vd, + const VRegister& vn, + NEON2RegMiscOp vop, + double value = 0.0); + void NEONFP2RegMiscFP16(const VRegister& vd, + const VRegister& vn, + NEON2RegMiscFP16Op vop, + double value = 0.0); + void NEON2RegMisc(const VRegister& vd, + const VRegister& vn, + NEON2RegMiscOp vop, + int value = 0); + void NEONFP2RegMisc(const VRegister& vd, const VRegister& vn, Instr op); + void NEONFP2RegMiscFP16(const VRegister& vd, const VRegister& vn, Instr op); + void NEONAddlp(const VRegister& vd, const VRegister& vn, NEON2RegMiscOp op); + void NEONPerm(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + NEONPermOp op); + void NEONFPByElement(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index, + NEONByIndexedElementOp op, + NEONByIndexedElementOp op_half); + void NEONByElement(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index, + NEONByIndexedElementOp op); + void NEONByElementL(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index, + NEONByIndexedElementOp op); + void NEONShiftImmediate(const VRegister& vd, + const VRegister& vn, + NEONShiftImmediateOp op, + int immh_immb); + void NEONShiftLeftImmediate(const VRegister& vd, + const VRegister& vn, + int shift, + NEONShiftImmediateOp op); + void NEONShiftRightImmediate(const VRegister& vd, + const VRegister& vn, + int shift, + NEONShiftImmediateOp op); + void NEONShiftImmediateL(const VRegister& vd, + const VRegister& vn, + int shift, + NEONShiftImmediateOp op); + void NEONShiftImmediateN(const VRegister& vd, + const VRegister& vn, + int shift, + NEONShiftImmediateOp op); + void NEONXtn(const VRegister& vd, const VRegister& vn, NEON2RegMiscOp vop); + + // If *shift is -1, find values of *imm8 and *shift such that IsInt8(*imm8) + // and *shift is either 0 or 8. Otherwise, leave the values unchanged. + void ResolveSVEImm8Shift(int* imm8, int* shift); + + Instr LoadStoreStructAddrModeField(const MemOperand& addr); + + // Encode the specified MemOperand for the specified access size and scaling + // preference. + Instr LoadStoreMemOperand(const MemOperand& addr, + unsigned access_size_in_bytes_log2, + LoadStoreScalingOption option); + + // Link the current (not-yet-emitted) instruction to the specified label, then + // return an offset to be encoded in the instruction. If the label is not yet + // bound, an offset of 0 is returned. + ptrdiff_t LinkAndGetByteOffsetTo(Label* label); + ptrdiff_t LinkAndGetInstructionOffsetTo(Label* label); + ptrdiff_t LinkAndGetPageOffsetTo(Label* label); + + // A common implementation for the LinkAndGetOffsetTo helpers. + template + ptrdiff_t LinkAndGetOffsetTo(Label* label); + + // Literal load offset are in words (32-bit). + ptrdiff_t LinkAndGetWordOffsetTo(RawLiteral* literal); + + // Emit the instruction in buffer_. + void Emit(Instr instruction) { + VIXL_STATIC_ASSERT(sizeof(instruction) == kInstructionSize); + VIXL_ASSERT(AllowAssembler()); + GetBuffer()->Emit32(instruction); + } + + PositionIndependentCodeOption pic_; + + CPUFeatures cpu_features_; +}; + + +template +void Literal::UpdateValue(T new_value, const Assembler* assembler) { + return UpdateValue(new_value, + assembler->GetBuffer().GetStartAddress()); +} + + +template +void Literal::UpdateValue(T high64, T low64, const Assembler* assembler) { + return UpdateValue(high64, + low64, + assembler->GetBuffer().GetStartAddress()); +} + + +} // namespace aarch64 + +// Required InvalSet template specialisations. +// TODO: These template specialisations should not live in this file. Move +// Label out of the aarch64 namespace in order to share its implementation +// later. +#define INVAL_SET_TEMPLATE_PARAMETERS \ + ptrdiff_t, aarch64::Label::kNPreallocatedLinks, ptrdiff_t, \ + aarch64::Label::kInvalidLinkKey, aarch64::Label::kReclaimFrom, \ + aarch64::Label::kReclaimFactor +template <> +inline ptrdiff_t InvalSet::GetKey( + const ptrdiff_t& element) { + return element; +} +template <> +inline void InvalSet::SetKey(ptrdiff_t* element, + ptrdiff_t key) { + *element = key; +} +#undef INVAL_SET_TEMPLATE_PARAMETERS + +} // namespace vixl + +#endif // VIXL_AARCH64_ASSEMBLER_AARCH64_H_ diff --git a/src/coreclr/jit/vixl/aarch64/assembler-sve-aarch64.cc b/src/coreclr/jit/vixl/aarch64/assembler-sve-aarch64.cc new file mode 100644 index 00000000000000..5a603493661be2 --- /dev/null +++ b/src/coreclr/jit/vixl/aarch64/assembler-sve-aarch64.cc @@ -0,0 +1,6489 @@ +// Copyright 2019, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "assembler-aarch64.h" + +namespace vixl { +namespace aarch64 { + +void Assembler::ResolveSVEImm8Shift(int* imm8, int* shift) { + if (*shift < 0) { + VIXL_ASSERT(*shift == -1); + // Derive the shift amount from the immediate. + if (IsInt8(*imm8)) { + *shift = 0; + } else if ((*imm8 % 256) == 0) { + *imm8 /= 256; + *shift = 8; + } + } + + VIXL_ASSERT(IsInt8(*imm8)); + VIXL_ASSERT((*shift == 0) || (*shift == 8)); +} + +// SVEAddressGeneration. + +void Assembler::adr(const ZRegister& zd, const SVEMemOperand& addr) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(addr.IsVectorPlusVector()); + VIXL_ASSERT( + AreSameLaneSize(zd, addr.GetVectorBase(), addr.GetVectorOffset())); + + int lane_size = zd.GetLaneSizeInBits(); + VIXL_ASSERT((lane_size == kSRegSize) || (lane_size == kDRegSize)); + + int shift_amount = addr.GetShiftAmount(); + VIXL_ASSERT((shift_amount >= 0) && (shift_amount <= 3)); + + Instr op = 0xffffffff; + Instr msz = shift_amount << 10; + SVEOffsetModifier mod = addr.GetOffsetModifier(); + switch (mod) { + case SVE_UXTW: + VIXL_ASSERT(lane_size == kDRegSize); + op = ADR_z_az_d_u32_scaled; + break; + case SVE_SXTW: + VIXL_ASSERT(lane_size == kDRegSize); + op = ADR_z_az_d_s32_scaled; + break; + case SVE_LSL: + case NO_SVE_OFFSET_MODIFIER: + op = (lane_size == kSRegSize) ? ADR_z_az_s_same_scaled + : ADR_z_az_d_same_scaled; + break; + default: + VIXL_UNIMPLEMENTED(); + } + Emit(op | msz | Rd(zd) | Rn(addr.GetVectorBase()) | + Rm(addr.GetVectorOffset())); +} + +void Assembler::SVELogicalImmediate(const ZRegister& zdn, + uint64_t imm, + Instr op) { + unsigned bit_n, imm_s, imm_r; + unsigned lane_size = zdn.GetLaneSizeInBits(); + // Check that the immediate can be encoded in the instruction. + if (IsImmLogical(imm, lane_size, &bit_n, &imm_s, &imm_r)) { + Emit(op | Rd(zdn) | SVEBitN(bit_n) | SVEImmRotate(imm_r, lane_size) | + SVEImmSetBits(imm_s, lane_size)); + } else { + VIXL_UNREACHABLE(); + } +} + +void Assembler::and_(const ZRegister& zd, const ZRegister& zn, uint64_t imm) { + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + SVELogicalImmediate(zd, imm, AND_z_zi); +} + +void Assembler::dupm(const ZRegister& zd, uint64_t imm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + // DUPM_z_i is an SVEBroadcastBitmaskImmOp, but its encoding and constraints + // are similar enough to SVEBitwiseLogicalWithImm_UnpredicatedOp, that we can + // use the logical immediate encoder to get the correct behaviour. + SVELogicalImmediate(zd, imm, DUPM_z_i); +} + +void Assembler::eor(const ZRegister& zd, const ZRegister& zn, uint64_t imm) { + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + SVELogicalImmediate(zd, imm, EOR_z_zi); +} + +void Assembler::orr(const ZRegister& zd, const ZRegister& zn, uint64_t imm) { + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + SVELogicalImmediate(zd, imm, ORR_z_zi); +} + +// SVEBitwiseLogicalUnpredicated. +void Assembler::and_(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.IsLaneSizeD()); + VIXL_ASSERT(AreSameFormat(zd, zn, zm)); + Emit(AND_z_zz | Rd(zd) | Rn(zn) | Rm(zm)); +} + +void Assembler::bic(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.IsLaneSizeD()); + VIXL_ASSERT(AreSameFormat(zd, zn, zm)); + Emit(BIC_z_zz | Rd(zd) | Rn(zn) | Rm(zm)); +} + +void Assembler::eor(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.IsLaneSizeD()); + VIXL_ASSERT(AreSameFormat(zd, zn, zm)); + Emit(EOR_z_zz | Rd(zd) | Rn(zn) | Rm(zm)); +} + +void Assembler::orr(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.IsLaneSizeD()); + VIXL_ASSERT(AreSameFormat(zd, zn, zm)); + Emit(ORR_z_zz | Rd(zd) | Rn(zn) | Rm(zm)); +} + +// SVEBitwiseShiftPredicated. + +void Assembler::SVEBitwiseShiftImmediatePred( + const ZRegister& zdn, + const PRegisterM& pg, + Instr encoded_imm_and_tsz, + SVEBitwiseShiftByImm_PredicatedOp op) { + Instr tszl_and_imm = ExtractUnsignedBitfield32(4, 0, encoded_imm_and_tsz) + << 5; + Instr tszh = ExtractUnsignedBitfield32(6, 5, encoded_imm_and_tsz) << 22; + Emit(op | tszh | tszl_and_imm | PgLow8(pg) | Rd(zdn)); +} + +void Assembler::asr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + int shift) { + // ASR ., /M, ., # + // 0000 0100 ..00 0000 100. .... .... .... + // tszh<23:22> | opc<19:18> = 00 | L<17> = 0 | U<16> = 0 | Pg<12:10> | + // tszl<9:8> | imm3<7:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + Instr encoded_imm = + EncodeSVEShiftImmediate(ASR, shift, zd.GetLaneSizeInBits()); + SVEBitwiseShiftImmediatePred(zd, pg, encoded_imm, ASR_z_p_zi); +} + +void Assembler::asr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // ASR ., /M, ., .D + // 0000 0100 ..01 1000 100. .... .... .... + // size<23:22> | R<18> = 0 | L<17> = 0 | U<16> = 0 | Pg<12:10> | Zm<9:5> | + // Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm) || + ((zm.GetLaneSizeInBytes() == kDRegSizeInBytes) && + (zd.GetLaneSizeInBytes() != kDRegSizeInBytes))); + Instr op = ASR_z_p_zw; + if (AreSameLaneSize(zd, zn, zm)) { + op = ASR_z_p_zz; + } + Emit(op | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::asrd(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + int shift) { + // ASRD ., /M, ., # + // 0000 0100 ..00 0100 100. .... .... .... + // tszh<23:22> | opc<19:18> = 01 | L<17> = 0 | U<16> = 0 | Pg<12:10> | + // tszl<9:8> | imm3<7:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + + Instr encoded_imm = + EncodeSVEShiftImmediate(ASR, shift, zd.GetLaneSizeInBits()); + SVEBitwiseShiftImmediatePred(zd, pg, encoded_imm, ASRD_z_p_zi); +} + +void Assembler::asrr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // ASRR ., /M, ., . + // 0000 0100 ..01 0100 100. .... .... .... + // size<23:22> | R<18> = 1 | L<17> = 0 | U<16> = 0 | Pg<12:10> | Zm<9:5> | + // Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + + Emit(ASRR_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::lsl(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + int shift) { + // LSL ., /M, ., # + // 0000 0100 ..00 0011 100. .... .... .... + // tszh<23:22> | opc<19:18> = 00 | L<17> = 1 | U<16> = 1 | Pg<12:10> | + // tszl<9:8> | imm3<7:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + + Instr encoded_imm = + EncodeSVEShiftImmediate(LSL, shift, zd.GetLaneSizeInBits()); + SVEBitwiseShiftImmediatePred(zd, pg, encoded_imm, LSL_z_p_zi); +} + +void Assembler::lsl(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // LSL ., /M, ., .D + // 0000 0100 ..01 1011 100. .... .... .... + // size<23:22> | R<18> = 0 | L<17> = 1 | U<16> = 1 | Pg<12:10> | Zm<9:5> | + // Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm) || + ((zm.GetLaneSizeInBytes() == kDRegSizeInBytes) && + (zd.GetLaneSizeInBytes() != kDRegSizeInBytes))); + Instr op = LSL_z_p_zw; + if (AreSameLaneSize(zd, zn, zm)) { + op = LSL_z_p_zz; + } + Emit(op | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::lslr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // LSLR ., /M, ., . + // 0000 0100 ..01 0111 100. .... .... .... + // size<23:22> | R<18> = 1 | L<17> = 1 | U<16> = 1 | Pg<12:10> | Zm<9:5> | + // Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + + Emit(LSLR_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::lsr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + int shift) { + // LSR ., /M, ., # + // 0000 0100 ..00 0001 100. .... .... .... + // tszh<23:22> | opc<19:18> = 00 | L<17> = 0 | U<16> = 1 | Pg<12:10> | + // tszl<9:8> | imm3<7:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + + Instr encoded_imm = + EncodeSVEShiftImmediate(LSR, shift, zd.GetLaneSizeInBits()); + SVEBitwiseShiftImmediatePred(zd, pg, encoded_imm, LSR_z_p_zi); +} + +void Assembler::lsr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // LSR ., /M, ., .D + // 0000 0100 ..01 1001 100. .... .... .... + // size<23:22> | R<18> = 0 | L<17> = 0 | U<16> = 1 | Pg<12:10> | Zm<9:5> | + // Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm) || + ((zm.GetLaneSizeInBytes() == kDRegSizeInBytes) && + (zd.GetLaneSizeInBytes() != kDRegSizeInBytes))); + Instr op = LSR_z_p_zw; + if (AreSameLaneSize(zd, zn, zm)) { + op = LSR_z_p_zz; + } + Emit(op | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::lsrr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // LSRR ., /M, ., . + // 0000 0100 ..01 0101 100. .... .... .... + // size<23:22> | R<18> = 1 | L<17> = 0 | U<16> = 1 | Pg<12:10> | Zm<9:5> | + // Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + + Emit(LSRR_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +// SVEBitwiseShiftUnpredicated. + +Instr Assembler::EncodeSVEShiftImmediate(Shift shift_op, + int shift, + int lane_size_in_bits) { + if (shift_op == LSL) { + VIXL_ASSERT((shift >= 0) && (shift < lane_size_in_bits)); + return lane_size_in_bits + shift; + } + + VIXL_ASSERT((shift_op == ASR) || (shift_op == LSR)); + VIXL_ASSERT((shift > 0) && (shift <= lane_size_in_bits)); + return (2 * lane_size_in_bits) - shift; +} + +void Assembler::SVEBitwiseShiftImmediate(const ZRegister& zd, + const ZRegister& zn, + Instr encoded_imm_and_tsz, + SVEBitwiseShiftUnpredicatedOp op) { + Instr tszl_and_imm = ExtractUnsignedBitfield32(4, 0, encoded_imm_and_tsz) + << 16; + Instr tszh = ExtractUnsignedBitfield32(6, 5, encoded_imm_and_tsz) << 22; + Emit(op | tszh | tszl_and_imm | Rd(zd) | Rn(zn)); +} + +void Assembler::asr(const ZRegister& zd, const ZRegister& zn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + Instr encoded_imm = + EncodeSVEShiftImmediate(ASR, shift, zd.GetLaneSizeInBits()); + SVEBitwiseShiftImmediate(zd, zn, encoded_imm, ASR_z_zi); +} + +void Assembler::asr(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kDRegSizeInBytes); + + Emit(ASR_z_zw | SVESize(zd) | Rd(zd) | Rn(zn) | Rm(zm)); +} + +void Assembler::lsl(const ZRegister& zd, const ZRegister& zn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + Instr encoded_imm = + EncodeSVEShiftImmediate(LSL, shift, zd.GetLaneSizeInBits()); + SVEBitwiseShiftImmediate(zd, zn, encoded_imm, LSL_z_zi); +} + +void Assembler::lsl(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kDRegSizeInBytes); + + Emit(LSL_z_zw | SVESize(zd) | Rd(zd) | Rn(zn) | Rm(zm)); +} + +void Assembler::lsr(const ZRegister& zd, const ZRegister& zn, int shift) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + Instr encoded_imm = + EncodeSVEShiftImmediate(LSR, shift, zd.GetLaneSizeInBits()); + SVEBitwiseShiftImmediate(zd, zn, encoded_imm, LSR_z_zi); +} + +void Assembler::lsr(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kDRegSizeInBytes); + + Emit(LSR_z_zw | SVESize(zd) | Rd(zd) | Rn(zn) | Rm(zm)); +} + +// SVEElementCount. + +#define VIXL_SVE_INC_DEC_LIST(V) \ + V(cntb, CNTB_r_s) \ + V(cnth, CNTH_r_s) \ + V(cntw, CNTW_r_s) \ + V(cntd, CNTD_r_s) \ + V(decb, DECB_r_rs) \ + V(dech, DECH_r_rs) \ + V(decw, DECW_r_rs) \ + V(decd, DECD_r_rs) \ + V(incb, INCB_r_rs) \ + V(inch, INCH_r_rs) \ + V(incw, INCW_r_rs) \ + V(incd, INCD_r_rs) \ + V(sqdecb, SQDECB_r_rs_x) \ + V(sqdech, SQDECH_r_rs_x) \ + V(sqdecw, SQDECW_r_rs_x) \ + V(sqdecd, SQDECD_r_rs_x) \ + V(sqincb, SQINCB_r_rs_x) \ + V(sqinch, SQINCH_r_rs_x) \ + V(sqincw, SQINCW_r_rs_x) \ + V(sqincd, SQINCD_r_rs_x) + +#define VIXL_DEFINE_ASM_FUNC(FN, OP) \ + void Assembler::FN(const Register& rdn, int pattern, int multiplier) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); \ + VIXL_ASSERT(rdn.IsX()); \ + Emit(OP | Rd(rdn) | ImmSVEPredicateConstraint(pattern) | \ + ImmUnsignedField<19, 16>(multiplier - 1)); \ + } +VIXL_SVE_INC_DEC_LIST(VIXL_DEFINE_ASM_FUNC) +#undef VIXL_DEFINE_ASM_FUNC + +#define VIXL_SVE_UQINC_UQDEC_LIST(V) \ + V(uqdecb, (rdn.IsX() ? UQDECB_r_rs_x : UQDECB_r_rs_uw)) \ + V(uqdech, (rdn.IsX() ? UQDECH_r_rs_x : UQDECH_r_rs_uw)) \ + V(uqdecw, (rdn.IsX() ? UQDECW_r_rs_x : UQDECW_r_rs_uw)) \ + V(uqdecd, (rdn.IsX() ? UQDECD_r_rs_x : UQDECD_r_rs_uw)) \ + V(uqincb, (rdn.IsX() ? UQINCB_r_rs_x : UQINCB_r_rs_uw)) \ + V(uqinch, (rdn.IsX() ? UQINCH_r_rs_x : UQINCH_r_rs_uw)) \ + V(uqincw, (rdn.IsX() ? UQINCW_r_rs_x : UQINCW_r_rs_uw)) \ + V(uqincd, (rdn.IsX() ? UQINCD_r_rs_x : UQINCD_r_rs_uw)) + +#define VIXL_DEFINE_ASM_FUNC(FN, OP) \ + void Assembler::FN(const Register& rdn, int pattern, int multiplier) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); \ + Emit(OP | Rd(rdn) | ImmSVEPredicateConstraint(pattern) | \ + ImmUnsignedField<19, 16>(multiplier - 1)); \ + } +VIXL_SVE_UQINC_UQDEC_LIST(VIXL_DEFINE_ASM_FUNC) +#undef VIXL_DEFINE_ASM_FUNC + +#define VIXL_SVE_SQX_INC_DEC_LIST(V) \ + V(sqdecb, SQDECB) \ + V(sqdech, SQDECH) \ + V(sqdecw, SQDECW) \ + V(sqdecd, SQDECD) \ + V(sqincb, SQINCB) \ + V(sqinch, SQINCH) \ + V(sqincw, SQINCW) \ + V(sqincd, SQINCD) + +#define VIXL_DEFINE_ASM_FUNC(FN, OP) \ + void Assembler::FN(const Register& xd, \ + const Register& wn, \ + int pattern, \ + int multiplier) { \ + USE(wn); \ + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); \ + VIXL_ASSERT(wn.IsW() && xd.Is(wn.X())); \ + Emit(OP##_r_rs_sx | Rd(xd) | ImmSVEPredicateConstraint(pattern) | \ + ImmUnsignedField<19, 16>(multiplier - 1)); \ + } +VIXL_SVE_SQX_INC_DEC_LIST(VIXL_DEFINE_ASM_FUNC) +#undef VIXL_DEFINE_ASM_FUNC + +#define VIXL_SVE_INC_DEC_VEC_LIST(V) \ + V(dech, DEC, H) \ + V(decw, DEC, W) \ + V(decd, DEC, D) \ + V(inch, INC, H) \ + V(incw, INC, W) \ + V(incd, INC, D) \ + V(sqdech, SQDEC, H) \ + V(sqdecw, SQDEC, W) \ + V(sqdecd, SQDEC, D) \ + V(sqinch, SQINC, H) \ + V(sqincw, SQINC, W) \ + V(sqincd, SQINC, D) \ + V(uqdech, UQDEC, H) \ + V(uqdecw, UQDEC, W) \ + V(uqdecd, UQDEC, D) \ + V(uqinch, UQINC, H) \ + V(uqincw, UQINC, W) \ + V(uqincd, UQINC, D) + +#define VIXL_DEFINE_ASM_FUNC(FN, OP, T) \ + void Assembler::FN(const ZRegister& zdn, int pattern, int multiplier) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); \ + VIXL_ASSERT(zdn.GetLaneSizeInBytes() == k##T##RegSizeInBytes); \ + Emit(OP##T##_z_zs | Rd(zdn) | ImmSVEPredicateConstraint(pattern) | \ + ImmUnsignedField<19, 16>(multiplier - 1)); \ + } +VIXL_SVE_INC_DEC_VEC_LIST(VIXL_DEFINE_ASM_FUNC) +#undef VIXL_DEFINE_ASM_FUNC + +// SVEFPAccumulatingReduction. + +void Assembler::fadda(const VRegister& vd, + const PRegister& pg, + const VRegister& vn, + const ZRegister& zm) { + // FADDA , , , . + // 0110 0101 ..01 1000 001. .... .... .... + // size<23:22> | opc<18:16> = 000 | Pg<12:10> | Zm<9:5> | Vdn<4:0> + + USE(vn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(vd.Is(vn)); + VIXL_ASSERT(vd.IsScalar()); + VIXL_ASSERT(zm.GetLaneSizeInBytes() != kBRegSizeInBytes); + VIXL_ASSERT(AreSameLaneSize(zm, vd)); + + Emit(FADDA_v_p_z | SVESize(zm) | Rd(vd) | PgLow8(pg) | Rn(zm)); +} + +// SVEFPArithmetic_Predicated. + +void Assembler::fabd(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // FABD ., /M, ., . + // 0110 0101 ..00 1000 100. .... .... .... + // size<23:22> | opc<19:16> = 1000 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FABD_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::fadd(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + double imm) { + // FADD ., /M, ., + // 0110 0101 ..01 1000 100. ..00 00.. .... + // size<23:22> | opc<18:16> = 000 | Pg<12:10> | i1<5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + VIXL_ASSERT((imm == 0.5) || (imm == 1.0)); + + Instr i1 = (imm == 1.0) ? (1 << 5) : 0; + Emit(FADD_z_p_zs | SVESize(zd) | Rd(zd) | PgLow8(pg) | i1); +} + +void Assembler::fadd(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // FADD ., /M, ., . + // 0110 0101 ..00 0000 100. .... .... .... + // size<23:22> | opc<19:16> = 0000 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FADD_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::fdiv(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // FDIV ., /M, ., . + // 0110 0101 ..00 1101 100. .... .... .... + // size<23:22> | opc<19:16> = 1101 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FDIV_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::fdivr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // FDIVR ., /M, ., . + // 0110 0101 ..00 1100 100. .... .... .... + // size<23:22> | opc<19:16> = 1100 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FDIVR_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::fmax(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + double imm) { + // FMAX ., /M, ., + // 0110 0101 ..01 1110 100. ..00 00.. .... + // size<23:22> | opc<18:16> = 110 | Pg<12:10> | i1<5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + VIXL_ASSERT(((imm == 0.0) && (_copysign(1.0, imm) == 1.0)) || (imm == 1.0)); + + Instr i1 = (imm == 1.0) ? (1 << 5) : 0; + Emit(FMAX_z_p_zs | SVESize(zd) | Rd(zd) | PgLow8(pg) | i1); +} + +void Assembler::fmax(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // FMAX ., /M, ., . + // 0110 0101 ..00 0110 100. .... .... .... + // size<23:22> | opc<19:16> = 0110 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FMAX_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::fmaxnm(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + double imm) { + // FMAXNM ., /M, ., + // 0110 0101 ..01 1100 100. ..00 00.. .... + // size<23:22> | opc<18:16> = 100 | Pg<12:10> | i1<5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + VIXL_ASSERT(((imm == 0.0) && (_copysign(1.0, imm) == 1.0)) || (imm == 1.0)); + + Instr i1 = (imm == 1.0) ? (1 << 5) : 0; + Emit(FMAXNM_z_p_zs | SVESize(zd) | Rd(zd) | PgLow8(pg) | i1); +} + +void Assembler::fmaxnm(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // FMAXNM ., /M, ., . + // 0110 0101 ..00 0100 100. .... .... .... + // size<23:22> | opc<19:16> = 0100 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FMAXNM_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::fmin(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + double imm) { + // FMIN ., /M, ., + // 0110 0101 ..01 1111 100. ..00 00.. .... + // size<23:22> | opc<18:16> = 111 | Pg<12:10> | i1<5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + VIXL_ASSERT(((imm == 0.0) && (_copysign(1.0, imm) == 1.0)) || (imm == 1.0)); + + Instr i1 = (imm == 1.0) ? (1 << 5) : 0; + Emit(FMIN_z_p_zs | SVESize(zd) | Rd(zd) | PgLow8(pg) | i1); +} + +void Assembler::fmin(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // FMIN ., /M, ., . + // 0110 0101 ..00 0111 100. .... .... .... + // size<23:22> | opc<19:16> = 0111 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FMIN_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::fminnm(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + double imm) { + // FMINNM ., /M, ., + // 0110 0101 ..01 1101 100. ..00 00.. .... + // size<23:22> | opc<18:16> = 101 | Pg<12:10> | i1<5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + VIXL_ASSERT(((imm == 0.0) && (_copysign(1.0, imm) == 1.0)) || (imm == 1.0)); + + Instr i1 = (imm == 1.0) ? (1 << 5) : 0; + Emit(FMINNM_z_p_zs | SVESize(zd) | Rd(zd) | PgLow8(pg) | i1); +} + +void Assembler::fminnm(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // FMINNM ., /M, ., . + // 0110 0101 ..00 0101 100. .... .... .... + // size<23:22> | opc<19:16> = 0101 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FMINNM_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::fmul(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + double imm) { + // FMUL ., /M, ., + // 0110 0101 ..01 1010 100. ..00 00.. .... + // size<23:22> | opc<18:16> = 010 | Pg<12:10> | i1<5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + VIXL_ASSERT((imm == 0.5) || (imm == 2.0)); + + Instr i1 = (imm == 2.0) ? (1 << 5) : 0; + Emit(FMUL_z_p_zs | SVESize(zd) | Rd(zd) | PgLow8(pg) | i1); +} + +void Assembler::fmul(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // FMUL ., /M, ., . + // 0110 0101 ..00 0010 100. .... .... .... + // size<23:22> | opc<19:16> = 0010 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FMUL_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::fmulx(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // FMULX ., /M, ., . + // 0110 0101 ..00 1010 100. .... .... .... + // size<23:22> | opc<19:16> = 1010 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FMULX_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::fscale(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // FSCALE ., /M, ., . + // 0110 0101 ..00 1001 100. .... .... .... + // size<23:22> | opc<19:16> = 1001 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FSCALE_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::fsub(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + double imm) { + // FSUB ., /M, ., + // 0110 0101 ..01 1001 100. ..00 00.. .... + // size<23:22> | opc<18:16> = 001 | Pg<12:10> | i1<5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + VIXL_ASSERT((imm == 0.5) || (imm == 1.0)); + + Instr i1 = (imm == 1.0) ? (1 << 5) : 0; + Emit(FSUB_z_p_zs | SVESize(zd) | Rd(zd) | PgLow8(pg) | i1); +} + +void Assembler::fsub(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // FSUB ., /M, ., . + // 0110 0101 ..00 0001 100. .... .... .... + // size<23:22> | opc<19:16> = 0001 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FSUB_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::fsubr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + double imm) { + // FSUBR ., /M, ., + // 0110 0101 ..01 1011 100. ..00 00.. .... + // size<23:22> | opc<18:16> = 011 | Pg<12:10> | i1<5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + VIXL_ASSERT((imm == 0.5) || (imm == 1.0)); + + Instr i1 = (imm == 1.0) ? (1 << 5) : 0; + Emit(FSUBR_z_p_zs | SVESize(zd) | Rd(zd) | PgLow8(pg) | i1); +} + +void Assembler::fsubr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // FSUBR ., /M, ., . + // 0110 0101 ..00 0011 100. .... .... .... + // size<23:22> | opc<19:16> = 0011 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FSUBR_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::ftmad(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm, + int imm3) { + // FTMAD ., ., ., # + // 0110 0101 ..01 0... 1000 00.. .... .... + // size<23:22> | imm3<18:16> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FTMAD_z_zzi | SVESize(zd) | Rd(zd) | Rn(zm) | + ImmUnsignedField<18, 16>(imm3)); +} + +// SVEFPArithmeticUnpredicated. + +void Assembler::fadd(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm) { + // FADD ., ., . + // 0110 0101 ..0. .... 0000 00.. .... .... + // size<23:22> | Zm<20:16> | opc<12:10> = 000 | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FADD_z_zz | SVESize(zd) | Rd(zd) | Rn(zn) | Rm(zm)); +} + +void Assembler::fmul(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm) { + // FMUL ., ., . + // 0110 0101 ..0. .... 0000 10.. .... .... + // size<23:22> | Zm<20:16> | opc<12:10> = 010 | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FMUL_z_zz | SVESize(zd) | Rd(zd) | Rn(zn) | Rm(zm)); +} + +void Assembler::frecps(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm) { + // FRECPS ., ., . + // 0110 0101 ..0. .... 0001 10.. .... .... + // size<23:22> | Zm<20:16> | opc<12:10> = 110 | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FRECPS_z_zz | SVESize(zd) | Rd(zd) | Rn(zn) | Rm(zm)); +} + +void Assembler::frsqrts(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm) { + // FRSQRTS ., ., . + // 0110 0101 ..0. .... 0001 11.. .... .... + // size<23:22> | Zm<20:16> | opc<12:10> = 111 | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FRSQRTS_z_zz | SVESize(zd) | Rd(zd) | Rn(zn) | Rm(zm)); +} + +void Assembler::fsub(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm) { + // FSUB ., ., . + // 0110 0101 ..0. .... 0000 01.. .... .... + // size<23:22> | Zm<20:16> | opc<12:10> = 001 | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FSUB_z_zz | SVESize(zd) | Rd(zd) | Rn(zn) | Rm(zm)); +} + +void Assembler::ftsmul(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm) { + // FTSMUL ., ., . + // 0110 0101 ..0. .... 0000 11.. .... .... + // size<23:22> | Zm<20:16> | opc<12:10> = 011 | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FTSMUL_z_zz | SVESize(zd) | Rd(zd) | Rn(zn) | Rm(zm)); +} + +// SVEFPCompareVectors. + +void Assembler::facge(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + // FACGE ., /Z, ., . + // 0110 0101 ..0. .... 110. .... ...1 .... + // size<23:22> | Zm<20:16> | op<15> = 1 | o2<13> = 0 | Pg<12:10> | Zn<9:5> | + // o3<4> = 1 | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zn, zm)); + VIXL_ASSERT(zn.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FACGE_p_p_zz | SVESize(zn) | Pd(pd) | PgLow8(pg) | Rn(zn) | Rm(zm)); +} + +void Assembler::facgt(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + // FACGT ., /Z, ., . + // 0110 0101 ..0. .... 111. .... ...1 .... + // size<23:22> | Zm<20:16> | op<15> = 1 | o2<13> = 1 | Pg<12:10> | Zn<9:5> | + // o3<4> = 1 | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zn, zm)); + VIXL_ASSERT(zn.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FACGT_p_p_zz | SVESize(zn) | Pd(pd) | PgLow8(pg) | Rn(zn) | Rm(zm)); +} + +void Assembler::fcmeq(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + // FCMEQ ., /Z, ., . + // 0110 0101 ..0. .... 011. .... ...0 .... + // size<23:22> | Zm<20:16> | op<15> = 0 | o2<13> = 1 | Pg<12:10> | Zn<9:5> | + // o3<4> = 0 | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zn, zm)); + VIXL_ASSERT(zn.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FCMEQ_p_p_zz | SVESize(zn) | Pd(pd) | PgLow8(pg) | Rn(zn) | Rm(zm)); +} + +void Assembler::fcmge(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + // FCMGE ., /Z, ., . + // 0110 0101 ..0. .... 010. .... ...0 .... + // size<23:22> | Zm<20:16> | op<15> = 0 | o2<13> = 0 | Pg<12:10> | Zn<9:5> | + // o3<4> = 0 | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zn, zm)); + VIXL_ASSERT(zn.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FCMGE_p_p_zz | SVESize(zn) | Pd(pd) | PgLow8(pg) | Rn(zn) | Rm(zm)); +} + +void Assembler::fcmgt(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + // FCMGT ., /Z, ., . + // 0110 0101 ..0. .... 010. .... ...1 .... + // size<23:22> | Zm<20:16> | op<15> = 0 | o2<13> = 0 | Pg<12:10> | Zn<9:5> | + // o3<4> = 1 | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zn, zm)); + VIXL_ASSERT(zn.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FCMGT_p_p_zz | SVESize(zn) | Pd(pd) | PgLow8(pg) | Rn(zn) | Rm(zm)); +} + +void Assembler::fcmne(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + // FCMNE ., /Z, ., . + // 0110 0101 ..0. .... 011. .... ...1 .... + // size<23:22> | Zm<20:16> | op<15> = 0 | o2<13> = 1 | Pg<12:10> | Zn<9:5> | + // o3<4> = 1 | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zn, zm)); + VIXL_ASSERT(zn.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FCMNE_p_p_zz | SVESize(zn) | Pd(pd) | PgLow8(pg) | Rn(zn) | Rm(zm)); +} + +void Assembler::fcmuo(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + // FCMUO ., /Z, ., . + // 0110 0101 ..0. .... 110. .... ...0 .... + // size<23:22> | Zm<20:16> | op<15> = 1 | o2<13> = 0 | Pg<12:10> | Zn<9:5> | + // o3<4> = 0 | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zn, zm)); + VIXL_ASSERT(zn.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FCMUO_p_p_zz | SVESize(zn) | Pd(pd) | PgLow8(pg) | Rn(zn) | Rm(zm)); +} + +// SVEFPCompareWithZero. + +void Assembler::fcmeq(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + double zero) { + // FCMEQ ., /Z, ., #0.0 + // 0110 0101 ..01 0010 001. .... ...0 .... + // size<23:22> | eq<17> = 1 | lt<16> = 0 | Pg<12:10> | Zn<9:5> | ne<4> = 0 | + // Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zn.GetLaneSizeInBytes() != kBRegSizeInBytes); + VIXL_ASSERT(zero == 0.0); + USE(zero); + + Emit(FCMEQ_p_p_z0 | SVESize(zn) | Pd(pd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::fcmge(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + double zero) { + // FCMGE ., /Z, ., #0.0 + // 0110 0101 ..01 0000 001. .... ...0 .... + // size<23:22> | eq<17> = 0 | lt<16> = 0 | Pg<12:10> | Zn<9:5> | ne<4> = 0 | + // Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zn.GetLaneSizeInBytes() != kBRegSizeInBytes); + VIXL_ASSERT(zero == 0.0); + USE(zero); + + Emit(FCMGE_p_p_z0 | SVESize(zn) | Pd(pd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::fcmgt(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + double zero) { + // FCMGT ., /Z, ., #0.0 + // 0110 0101 ..01 0000 001. .... ...1 .... + // size<23:22> | eq<17> = 0 | lt<16> = 0 | Pg<12:10> | Zn<9:5> | ne<4> = 1 | + // Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zn.GetLaneSizeInBytes() != kBRegSizeInBytes); + VIXL_ASSERT(zero == 0.0); + USE(zero); + + Emit(FCMGT_p_p_z0 | SVESize(zn) | Pd(pd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::fcmle(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + double zero) { + // FCMLE ., /Z, ., #0.0 + // 0110 0101 ..01 0001 001. .... ...1 .... + // size<23:22> | eq<17> = 0 | lt<16> = 1 | Pg<12:10> | Zn<9:5> | ne<4> = 1 | + // Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zn.GetLaneSizeInBytes() != kBRegSizeInBytes); + VIXL_ASSERT(zero == 0.0); + USE(zero); + + Emit(FCMLE_p_p_z0 | SVESize(zn) | Pd(pd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::fcmlt(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + double zero) { + // FCMLT ., /Z, ., #0.0 + // 0110 0101 ..01 0001 001. .... ...0 .... + // size<23:22> | eq<17> = 0 | lt<16> = 1 | Pg<12:10> | Zn<9:5> | ne<4> = 0 | + // Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zn.GetLaneSizeInBytes() != kBRegSizeInBytes); + VIXL_ASSERT(zero == 0.0); + USE(zero); + + Emit(FCMLT_p_p_z0 | SVESize(zn) | Pd(pd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::fcmne(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + double zero) { + // FCMNE ., /Z, ., #0.0 + // 0110 0101 ..01 0011 001. .... ...0 .... + // size<23:22> | eq<17> = 1 | lt<16> = 1 | Pg<12:10> | Zn<9:5> | ne<4> = 0 | + // Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zn.GetLaneSizeInBytes() != kBRegSizeInBytes); + VIXL_ASSERT(zero == 0.0); + USE(zero); + + Emit(FCMNE_p_p_z0 | SVESize(zn) | Pd(pd) | PgLow8(pg) | Rn(zn)); +} + +// SVEFPComplexAddition. + +void Assembler::fcadd(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm, + int rot) { + // FCADD ., /M, ., ., + // 0110 0100 ..00 000. 100. .... .... .... + // size<23:22> | rot<16> | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + VIXL_ASSERT((rot == 90) || (rot == 270)); + + Instr rotate_bit = (rot == 90) ? 0 : (1 << 16); + Emit(FCADD_z_p_zz | rotate_bit | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +// SVEFPComplexMulAdd. + +void Assembler::fcmla(const ZRegister& zda, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm, + int rot) { + // FCMLA ., /M, ., ., + // 0110 0100 ..0. .... 0... .... .... .... + // size<23:22> | Zm<20:16> | rot<14:13> | Pg<12:10> | Zn<9:5> | Zda<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zda, zn, zm)); + VIXL_ASSERT(zda.GetLaneSizeInBytes() != kBRegSizeInBytes); + VIXL_ASSERT((rot == 0) || (rot == 90) || (rot == 180) || (rot == 270)); + + Instr rotate_bit = (rot / 90) << 13; + Emit(FCMLA_z_p_zzz | rotate_bit | SVESize(zda) | Rd(zda) | PgLow8(pg) | + Rn(zn) | Rm(zm)); +} + +// SVEFPComplexMulAddIndex. + +void Assembler::fcmla(const ZRegister& zda, + const ZRegister& zn, + const ZRegister& zm, + int index, + int rot) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zda, zn, zm)); + VIXL_ASSERT((rot == 0) || (rot == 90) || (rot == 180) || (rot == 270)); + VIXL_ASSERT(index >= 0); + + int lane_size = zda.GetLaneSizeInBytes(); + + Instr zm_and_idx = 0; + Instr op = FCMLA_z_zzzi_h; + if (lane_size == kHRegSizeInBytes) { + // Zm<18:16> | i2<20:19> + VIXL_ASSERT((zm.GetCode() <= 7) && (index <= 3)); + zm_and_idx = (index << 19) | Rx<18, 16>(zm); + } else { + // Zm<19:16> | i1<20> + VIXL_ASSERT(lane_size == kSRegSizeInBytes); + VIXL_ASSERT((zm.GetCode() <= 15) && (index <= 1)); + zm_and_idx = (index << 20) | Rx<19, 16>(zm); + op = FCMLA_z_zzzi_s; + } + + Instr rotate_bit = (rot / 90) << 10; + Emit(op | zm_and_idx | rotate_bit | Rd(zda) | Rn(zn)); +} + +// SVEFPFastReduction. + +void Assembler::faddv(const VRegister& vd, + const PRegister& pg, + const ZRegister& zn) { + // FADDV , , . + // 0110 0101 ..00 0000 001. .... .... .... + // size<23:22> | opc<18:16> = 000 | Pg<12:10> | Zn<9:5> | Vd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(vd.IsScalar()); + VIXL_ASSERT(zn.GetLaneSizeInBytes() != kBRegSizeInBytes); + VIXL_ASSERT(AreSameLaneSize(zn, vd)); + + Emit(FADDV_v_p_z | SVESize(zn) | Rd(vd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::fmaxnmv(const VRegister& vd, + const PRegister& pg, + const ZRegister& zn) { + // FMAXNMV , , . + // 0110 0101 ..00 0100 001. .... .... .... + // size<23:22> | opc<18:16> = 100 | Pg<12:10> | Zn<9:5> | Vd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(vd.IsScalar()); + VIXL_ASSERT(zn.GetLaneSizeInBytes() != kBRegSizeInBytes); + VIXL_ASSERT(AreSameLaneSize(zn, vd)); + + Emit(FMAXNMV_v_p_z | SVESize(zn) | Rd(vd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::fmaxv(const VRegister& vd, + const PRegister& pg, + const ZRegister& zn) { + // FMAXV , , . + // 0110 0101 ..00 0110 001. .... .... .... + // size<23:22> | opc<18:16> = 110 | Pg<12:10> | Zn<9:5> | Vd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(vd.IsScalar()); + VIXL_ASSERT(zn.GetLaneSizeInBytes() != kBRegSizeInBytes); + VIXL_ASSERT(AreSameLaneSize(zn, vd)); + + Emit(FMAXV_v_p_z | SVESize(zn) | Rd(vd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::fminnmv(const VRegister& vd, + const PRegister& pg, + const ZRegister& zn) { + // FMINNMV , , . + // 0110 0101 ..00 0101 001. .... .... .... + // size<23:22> | opc<18:16> = 101 | Pg<12:10> | Zn<9:5> | Vd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(vd.IsScalar()); + VIXL_ASSERT(zn.GetLaneSizeInBytes() != kBRegSizeInBytes); + VIXL_ASSERT(AreSameLaneSize(zn, vd)); + + Emit(FMINNMV_v_p_z | SVESize(zn) | Rd(vd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::fminv(const VRegister& vd, + const PRegister& pg, + const ZRegister& zn) { + // FMINV , , . + // 0110 0101 ..00 0111 001. .... .... .... + // size<23:22> | opc<18:16> = 111 | Pg<12:10> | Zn<9:5> | Vd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(vd.IsScalar()); + VIXL_ASSERT(zn.GetLaneSizeInBytes() != kBRegSizeInBytes); + VIXL_ASSERT(AreSameLaneSize(zn, vd)); + + Emit(FMINV_v_p_z | SVESize(zn) | Rd(vd) | PgLow8(pg) | Rn(zn)); +} + +// SVEFPMulAdd. + +void Assembler::fmad(const ZRegister& zdn, + const PRegisterM& pg, + const ZRegister& zm, + const ZRegister& za) { + // FMAD ., /M, ., . + // 0110 0101 ..1. .... 100. .... .... .... + // size<23:22> | Za<20:16> | opc<14:13> = 00 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zdn, zm, za)); + VIXL_ASSERT(zdn.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FMAD_z_p_zzz | SVESize(zdn) | Rd(zdn) | PgLow8(pg) | Rn(zm) | Rm(za)); +} + +void Assembler::fmla(const ZRegister& zda, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // FMLA ., /M, ., . + // 0110 0101 ..1. .... 000. .... .... .... + // size<23:22> | Zm<20:16> | opc<14:13> = 00 | Pg<12:10> | Zn<9:5> | Zda<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zda, zn, zm)); + VIXL_ASSERT(zda.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FMLA_z_p_zzz | SVESize(zda) | Rd(zda) | PgLow8(pg) | Rn(zn) | Rm(zm)); +} + +void Assembler::fmls(const ZRegister& zda, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // FMLS ., /M, ., . + // 0110 0101 ..1. .... 001. .... .... .... + // size<23:22> | Zm<20:16> | opc<14:13> = 01 | Pg<12:10> | Zn<9:5> | Zda<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zda, zn, zm)); + VIXL_ASSERT(zda.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FMLS_z_p_zzz | SVESize(zda) | Rd(zda) | PgLow8(pg) | Rn(zn) | Rm(zm)); +} + +void Assembler::fmsb(const ZRegister& zdn, + const PRegisterM& pg, + const ZRegister& zm, + const ZRegister& za) { + // FMSB ., /M, ., . + // 0110 0101 ..1. .... 101. .... .... .... + // size<23:22> | Za<20:16> | opc<14:13> = 01 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zdn, zm, za)); + VIXL_ASSERT(zdn.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FMSB_z_p_zzz | SVESize(zdn) | Rd(zdn) | PgLow8(pg) | Rn(zm) | Rm(za)); +} + +void Assembler::fnmad(const ZRegister& zdn, + const PRegisterM& pg, + const ZRegister& zm, + const ZRegister& za) { + // FNMAD ., /M, ., . + // 0110 0101 ..1. .... 110. .... .... .... + // size<23:22> | Za<20:16> | opc<14:13> = 10 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zdn, zm, za)); + VIXL_ASSERT(zdn.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FNMAD_z_p_zzz | SVESize(zdn) | Rd(zdn) | PgLow8(pg) | Rn(zm) | Rm(za)); +} + +void Assembler::fnmla(const ZRegister& zda, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // FNMLA ., /M, ., . + // 0110 0101 ..1. .... 010. .... .... .... + // size<23:22> | Zm<20:16> | opc<14:13> = 10 | Pg<12:10> | Zn<9:5> | Zda<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zda, zn, zm)); + VIXL_ASSERT(zda.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FNMLA_z_p_zzz | SVESize(zda) | Rd(zda) | PgLow8(pg) | Rn(zn) | Rm(zm)); +} + +void Assembler::fnmls(const ZRegister& zda, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // FNMLS ., /M, ., . + // 0110 0101 ..1. .... 011. .... .... .... + // size<23:22> | Zm<20:16> | opc<14:13> = 11 | Pg<12:10> | Zn<9:5> | Zda<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zda, zn, zm)); + VIXL_ASSERT(zda.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FNMLS_z_p_zzz | SVESize(zda) | Rd(zda) | PgLow8(pg) | Rn(zn) | Rm(zm)); +} + +void Assembler::fnmsb(const ZRegister& zdn, + const PRegisterM& pg, + const ZRegister& zm, + const ZRegister& za) { + // FNMSB ., /M, ., . + // 0110 0101 ..1. .... 111. .... .... .... + // size<23:22> | Za<20:16> | opc<14:13> = 11 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zdn, zm, za)); + VIXL_ASSERT(zdn.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FNMSB_z_p_zzz | SVESize(zdn) | Rd(zdn) | PgLow8(pg) | Rn(zm) | Rm(za)); +} + +Instr Assembler::SVEFPMulIndexHelper(unsigned lane_size_in_bytes_log2, + const ZRegister& zm, + int index, + Instr op_h, + Instr op_s, + Instr op_d) { + Instr size = lane_size_in_bytes_log2 << SVESize_offset; + Instr zm_with_index = Rm(zm); + Instr op = 0xffffffff; + // Allowable register number and lane index depends on the lane size. + switch (lane_size_in_bytes_log2) { + case kHRegSizeInBytesLog2: + VIXL_ASSERT(zm.GetCode() <= 7); + VIXL_ASSERT(IsUint3(index)); + // For H-sized lanes, size is encoded as 0b0x, where x is used as the top + // bit of the index. So, if index is less than four, the top bit of index + // is zero, and therefore size is 0b00. Otherwise, it's 0b01, the usual + // encoding for H-sized lanes. + if (index < 4) size = 0; + // Top two bits of "zm" encode the index. + zm_with_index |= (index & 3) << (Rm_offset + 3); + op = op_h; + break; + case kSRegSizeInBytesLog2: + VIXL_ASSERT(zm.GetCode() <= 7); + VIXL_ASSERT(IsUint2(index)); + // Top two bits of "zm" encode the index. + zm_with_index |= (index & 3) << (Rm_offset + 3); + op = op_s; + break; + case kDRegSizeInBytesLog2: + VIXL_ASSERT(zm.GetCode() <= 15); + VIXL_ASSERT(IsUint1(index)); + // Top bit of "zm" encodes the index. + zm_with_index |= (index & 1) << (Rm_offset + 4); + op = op_d; + break; + default: + VIXL_UNIMPLEMENTED(); + } + return op | zm_with_index | size; +} + +// SVEFPMulAddIndex. + +void Assembler::fmla(const ZRegister& zda, + const ZRegister& zn, + const ZRegister& zm, + int index) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zda, zn, zm)); + + // The encoding of opcode, index, Zm, and size are synthesized in this + // variable. + Instr synthesized_op = SVEFPMulIndexHelper(zda.GetLaneSizeInBytesLog2(), + zm, + index, + FMLA_z_zzzi_h, + FMLA_z_zzzi_s, + FMLA_z_zzzi_d); + + Emit(synthesized_op | Rd(zda) | Rn(zn)); +} + +void Assembler::fmls(const ZRegister& zda, + const ZRegister& zn, + const ZRegister& zm, + int index) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zda, zn, zm)); + + // The encoding of opcode, index, Zm, and size are synthesized in this + // variable. + Instr synthesized_op = SVEFPMulIndexHelper(zda.GetLaneSizeInBytesLog2(), + zm, + index, + FMLS_z_zzzi_h, + FMLS_z_zzzi_s, + FMLS_z_zzzi_d); + + Emit(synthesized_op | Rd(zda) | Rn(zn)); +} + +// SVEFPMulIndex. + +// This prototype maps to 3 instruction encodings: +void Assembler::fmul(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm, + unsigned index) { + // FMUL ., ., .[] + // 0110 0100 ..1. .... 0010 00.. .... .... + // size<23:22> | opc<20:16> | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + + // The encoding of opcode, index, Zm, and size are synthesized in this + // variable. + Instr synthesized_op = SVEFPMulIndexHelper(zd.GetLaneSizeInBytesLog2(), + zm, + index, + FMUL_z_zzi_h, + FMUL_z_zzi_s, + FMUL_z_zzi_d); + + Emit(synthesized_op | Rd(zd) | Rn(zn)); +} + +// SVEFPUnaryOpPredicated. + +void Assembler::fcvt(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Instr op = 0xffffffff; + switch (zn.GetLaneSizeInBytes()) { + case kHRegSizeInBytes: + switch (zd.GetLaneSizeInBytes()) { + case kSRegSizeInBytes: + op = FCVT_z_p_z_h2s; + break; + case kDRegSizeInBytes: + op = FCVT_z_p_z_h2d; + break; + } + break; + case kSRegSizeInBytes: + switch (zd.GetLaneSizeInBytes()) { + case kHRegSizeInBytes: + op = FCVT_z_p_z_s2h; + break; + case kDRegSizeInBytes: + op = FCVT_z_p_z_s2d; + break; + } + break; + case kDRegSizeInBytes: + switch (zd.GetLaneSizeInBytes()) { + case kHRegSizeInBytes: + op = FCVT_z_p_z_d2h; + break; + case kSRegSizeInBytes: + op = FCVT_z_p_z_d2s; + break; + } + break; + } + VIXL_ASSERT(op != 0xffffffff); + + Emit(op | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::fcvtzs(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + Instr op = 0xffffffff; + switch (zn.GetLaneSizeInBytes()) { + case kHRegSizeInBytes: + switch (zd.GetLaneSizeInBytes()) { + case kHRegSizeInBytes: + op = FCVTZS_z_p_z_fp162h; + break; + case kSRegSizeInBytes: + op = FCVTZS_z_p_z_fp162w; + break; + case kDRegSizeInBytes: + op = FCVTZS_z_p_z_fp162x; + break; + } + break; + case kSRegSizeInBytes: + switch (zd.GetLaneSizeInBytes()) { + case kSRegSizeInBytes: + op = FCVTZS_z_p_z_s2w; + break; + case kDRegSizeInBytes: + op = FCVTZS_z_p_z_s2x; + break; + } + break; + case kDRegSizeInBytes: + switch (zd.GetLaneSizeInBytes()) { + case kSRegSizeInBytes: + op = FCVTZS_z_p_z_d2w; + break; + case kDRegSizeInBytes: + op = FCVTZS_z_p_z_d2x; + break; + } + break; + } + VIXL_ASSERT(op != 0xffffffff); + + Emit(op | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::fcvtzu(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + Instr op = 0xffffffff; + switch (zn.GetLaneSizeInBytes()) { + case kHRegSizeInBytes: + switch (zd.GetLaneSizeInBytes()) { + case kHRegSizeInBytes: + op = FCVTZU_z_p_z_fp162h; + break; + case kSRegSizeInBytes: + op = FCVTZU_z_p_z_fp162w; + break; + case kDRegSizeInBytes: + op = FCVTZU_z_p_z_fp162x; + break; + } + break; + case kSRegSizeInBytes: + switch (zd.GetLaneSizeInBytes()) { + case kSRegSizeInBytes: + op = FCVTZU_z_p_z_s2w; + break; + case kDRegSizeInBytes: + op = FCVTZU_z_p_z_s2x; + break; + } + break; + case kDRegSizeInBytes: + switch (zd.GetLaneSizeInBytes()) { + case kSRegSizeInBytes: + op = FCVTZU_z_p_z_d2w; + break; + case kDRegSizeInBytes: + op = FCVTZU_z_p_z_d2x; + break; + } + break; + } + VIXL_ASSERT(op != 0xffffffff); + + Emit(op | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::frecpx(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + // FRECPX ., /M, . + // 0110 0101 ..00 1100 101. .... .... .... + // size<23:22> | opc<17:16> = 00 | Pg<12:10> | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FRECPX_z_p_z | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::frinta(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FRINTA_z_p_z | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::frinti(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FRINTI_z_p_z | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::frintm(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FRINTM_z_p_z | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::frintn(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FRINTN_z_p_z | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::frintp(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FRINTP_z_p_z | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::frintx(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FRINTX_z_p_z | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::frintz(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FRINTZ_z_p_z | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::fsqrt(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + // FSQRT ., /M, . + // 0110 0101 ..00 1101 101. .... .... .... + // size<23:22> | opc<17:16> = 01 | Pg<12:10> | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FSQRT_z_p_z | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::scvtf(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + Instr op = 0xffffffff; + switch (zn.GetLaneSizeInBytes()) { + case kHRegSizeInBytes: + switch (zd.GetLaneSizeInBytes()) { + case kHRegSizeInBytes: + op = SCVTF_z_p_z_h2fp16; + break; + } + break; + case kSRegSizeInBytes: + switch (zd.GetLaneSizeInBytes()) { + case kHRegSizeInBytes: + op = SCVTF_z_p_z_w2fp16; + break; + case kSRegSizeInBytes: + op = SCVTF_z_p_z_w2s; + break; + case kDRegSizeInBytes: + op = SCVTF_z_p_z_w2d; + break; + } + break; + case kDRegSizeInBytes: + switch (zd.GetLaneSizeInBytes()) { + case kHRegSizeInBytes: + op = SCVTF_z_p_z_x2fp16; + break; + case kSRegSizeInBytes: + op = SCVTF_z_p_z_x2s; + break; + case kDRegSizeInBytes: + op = SCVTF_z_p_z_x2d; + break; + } + break; + } + VIXL_ASSERT(op != 0xffffffff); + + Emit(op | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::ucvtf(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + Instr op = 0xffffffff; + switch (zn.GetLaneSizeInBytes()) { + case kHRegSizeInBytes: + switch (zd.GetLaneSizeInBytes()) { + case kHRegSizeInBytes: + op = UCVTF_z_p_z_h2fp16; + break; + } + break; + case kSRegSizeInBytes: + switch (zd.GetLaneSizeInBytes()) { + case kHRegSizeInBytes: + op = UCVTF_z_p_z_w2fp16; + break; + case kSRegSizeInBytes: + op = UCVTF_z_p_z_w2s; + break; + case kDRegSizeInBytes: + op = UCVTF_z_p_z_w2d; + break; + } + break; + case kDRegSizeInBytes: + switch (zd.GetLaneSizeInBytes()) { + case kHRegSizeInBytes: + op = UCVTF_z_p_z_x2fp16; + break; + case kSRegSizeInBytes: + op = UCVTF_z_p_z_x2s; + break; + case kDRegSizeInBytes: + op = UCVTF_z_p_z_x2d; + break; + } + break; + } + VIXL_ASSERT(op != 0xffffffff); + + Emit(op | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +// SVEFPUnaryOpUnpredicated. + +void Assembler::frecpe(const ZRegister& zd, const ZRegister& zn) { + // FRECPE ., . + // 0110 0101 ..00 1110 0011 00.. .... .... + // size<23:22> | opc<18:16> = 110 | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FRECPE_z_z | SVESize(zd) | Rd(zd) | Rn(zn)); +} + +void Assembler::frsqrte(const ZRegister& zd, const ZRegister& zn) { + // FRSQRTE ., . + // 0110 0101 ..00 1111 0011 00.. .... .... + // size<23:22> | opc<18:16> = 111 | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FRSQRTE_z_z | SVESize(zd) | Rd(zd) | Rn(zn)); +} + +// SVEIncDecByPredicateCount. + +void Assembler::decp(const Register& rdn, const PRegisterWithLaneSize& pg) { + // DECP , . + // 0010 0101 ..10 1101 1000 100. .... .... + // size<23:22> | op<17> = 0 | D<16> = 1 | opc2<10:9> = 00 | Pg<8:5> | + // Rdn<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(rdn.IsX()); + + Emit(DECP_r_p_r | SVESize(pg) | Rd(rdn) | Rx<8, 5>(pg)); +} + +void Assembler::decp(const ZRegister& zdn, const PRegister& pg) { + // DECP ., + // 0010 0101 ..10 1101 1000 000. .... .... + // size<23:22> | op<17> = 0 | D<16> = 1 | opc2<10:9> = 00 | Pg<8:5> | + // Zdn<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zdn.GetLaneSizeInBytes() != kBRegSizeInBytes); + VIXL_ASSERT(pg.IsUnqualified()); + + Emit(DECP_z_p_z | SVESize(zdn) | Rd(zdn) | Pg<8, 5>(pg)); +} + +void Assembler::incp(const Register& rdn, const PRegisterWithLaneSize& pg) { + // INCP , . + // 0010 0101 ..10 1100 1000 100. .... .... + // size<23:22> | op<17> = 0 | D<16> = 0 | opc2<10:9> = 00 | Pg<8:5> | + // Rdn<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(rdn.IsX()); + + Emit(INCP_r_p_r | SVESize(pg) | Rd(rdn) | Rx<8, 5>(pg)); +} + +void Assembler::incp(const ZRegister& zdn, const PRegister& pg) { + // INCP ., + // 0010 0101 ..10 1100 1000 000. .... .... + // size<23:22> | op<17> = 0 | D<16> = 0 | opc2<10:9> = 00 | Pg<8:5> | + // Zdn<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zdn.GetLaneSizeInBytes() != kBRegSizeInBytes); + VIXL_ASSERT(pg.IsUnqualified()); + + Emit(INCP_z_p_z | SVESize(zdn) | Rd(zdn) | Pg<8, 5>(pg)); +} + +void Assembler::sqdecp(const Register& xd, + const PRegisterWithLaneSize& pg, + const Register& wn) { + // SQDECP , ., + // 0010 0101 ..10 1010 1000 100. .... .... + // size<23:22> | D<17> = 1 | U<16> = 0 | sf<10> = 0 | op<9> = 0 | Pg<8:5> | + // Rdn<4:0> + + USE(wn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(xd.IsX() && wn.IsW() && xd.Aliases(wn)); + + Emit(SQDECP_r_p_r_sx | SVESize(pg) | Rd(xd) | Rx<8, 5>(pg)); +} + +void Assembler::sqdecp(const Register& xdn, const PRegisterWithLaneSize& pg) { + // SQDECP , . + // 0010 0101 ..10 1010 1000 110. .... .... + // size<23:22> | D<17> = 1 | U<16> = 0 | sf<10> = 1 | op<9> = 0 | Pg<8:5> | + // Rdn<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(xdn.IsX()); + + Emit(SQDECP_r_p_r_x | SVESize(pg) | Rd(xdn) | Rx<8, 5>(pg)); +} + +void Assembler::sqdecp(const ZRegister& zdn, const PRegister& pg) { + // SQDECP ., + // 0010 0101 ..10 1010 1000 000. .... .... + // size<23:22> | D<17> = 1 | U<16> = 0 | opc<10:9> = 00 | Pg<8:5> | Zdn<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zdn.GetLaneSizeInBytes() != kBRegSizeInBytes); + VIXL_ASSERT(pg.IsUnqualified()); + + Emit(SQDECP_z_p_z | SVESize(zdn) | Rd(zdn) | Pg<8, 5>(pg)); +} + +void Assembler::sqincp(const Register& xd, + const PRegisterWithLaneSize& pg, + const Register& wn) { + // SQINCP , ., + // 0010 0101 ..10 1000 1000 100. .... .... + // size<23:22> | D<17> = 0 | U<16> = 0 | sf<10> = 0 | op<9> = 0 | Pg<8:5> | + // Rdn<4:0> + + USE(wn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(xd.IsX() && wn.IsW() && xd.Aliases(wn)); + + Emit(SQINCP_r_p_r_sx | SVESize(pg) | Rd(xd) | Rx<8, 5>(pg)); +} + +void Assembler::sqincp(const Register& xdn, const PRegisterWithLaneSize& pg) { + // SQINCP , . + // 0010 0101 ..10 1000 1000 110. .... .... + // size<23:22> | D<17> = 0 | U<16> = 0 | sf<10> = 1 | op<9> = 0 | Pg<8:5> | + // Rdn<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(xdn.IsX()); + + Emit(SQINCP_r_p_r_x | SVESize(pg) | Rd(xdn) | Rx<8, 5>(pg)); +} + +void Assembler::sqincp(const ZRegister& zdn, const PRegister& pg) { + // SQINCP ., + // 0010 0101 ..10 1000 1000 000. .... .... + // size<23:22> | D<17> = 0 | U<16> = 0 | opc<10:9> = 00 | Pg<8:5> | Zdn<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zdn.GetLaneSizeInBytes() != kBRegSizeInBytes); + VIXL_ASSERT(pg.IsUnqualified()); + + Emit(SQINCP_z_p_z | SVESize(zdn) | Rd(zdn) | Pg<8, 5>(pg)); +} + +void Assembler::uqdecp(const Register& rdn, const PRegisterWithLaneSize& pg) { + // UQDECP , . + // UQDECP , . + // 0010 0101 ..10 1011 1000 10.. .... .... + // size<23:22> | D<17> = 1 | U<16> = 1 | sf<10> | op<9> = 0 | Pg<8:5> | + // Rdn<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Instr op = rdn.IsX() ? UQDECP_r_p_r_x : UQDECP_r_p_r_uw; + Emit(op | SVESize(pg) | Rd(rdn) | Rx<8, 5>(pg)); +} + +void Assembler::uqdecp(const ZRegister& zdn, const PRegister& pg) { + // UQDECP ., + // 0010 0101 ..10 1011 1000 000. .... .... + // size<23:22> | D<17> = 1 | U<16> = 1 | opc<10:9> = 00 | Pg<8:5> | Zdn<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zdn.GetLaneSizeInBytes() != kBRegSizeInBytes); + VIXL_ASSERT(pg.IsUnqualified()); + + Emit(UQDECP_z_p_z | SVESize(zdn) | Rd(zdn) | Pg<8, 5>(pg)); +} + +void Assembler::uqincp(const Register& rdn, const PRegisterWithLaneSize& pg) { + // UQINCP , . + // 0010 0101 ..10 1001 1000 100. .... .... + // size<23:22> | D<17> = 0 | U<16> = 1 | sf<10> = 0 | op<9> = 0 | Pg<8:5> | + // Rdn<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Instr op = rdn.IsX() ? UQINCP_r_p_r_x : UQINCP_r_p_r_uw; + Emit(op | SVESize(pg) | Rd(rdn) | Rx<8, 5>(pg)); +} + +void Assembler::uqincp(const ZRegister& zdn, const PRegister& pg) { + // UQINCP ., + // 0010 0101 ..10 1001 1000 000. .... .... + // size<23:22> | D<17> = 0 | U<16> = 1 | opc<10:9> = 00 | Pg<8:5> | Zdn<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zdn.GetLaneSizeInBytes() != kBRegSizeInBytes); + VIXL_ASSERT(pg.IsUnqualified()); + + Emit(UQINCP_z_p_z | SVESize(zdn) | Rd(zdn) | Pg<8, 5>(pg)); +} + +// SVEIndexGeneration. + +void Assembler::index(const ZRegister& zd, int start, int step) { + // INDEX ., #, # + // 0000 0100 ..1. .... 0100 00.. .... .... + // size<23:22> | step<20:16> | start<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Emit(INDEX_z_ii | SVESize(zd) | ImmField<20, 16>(step) | + ImmField<9, 5>(start) | Rd(zd)); +} + +void Assembler::index(const ZRegister& zd, + const Register& rn, + const Register& rm) { + // INDEX ., , + // 0000 0100 ..1. .... 0100 11.. .... .... + // size<23:22> | Rm<20:16> | Rn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(static_cast(rn.GetSizeInBits()) >= + zd.GetLaneSizeInBits()); + VIXL_ASSERT(static_cast(rm.GetSizeInBits()) >= + zd.GetLaneSizeInBits()); + + Emit(INDEX_z_rr | SVESize(zd) | Rd(zd) | Rn(rn) | Rm(rm)); +} + +void Assembler::index(const ZRegister& zd, const Register& rn, int imm5) { + // INDEX ., , # + // 0000 0100 ..1. .... 0100 01.. .... .... + // size<23:22> | imm5<20:16> | Rn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(static_cast(rn.GetSizeInBits()) >= + zd.GetLaneSizeInBits()); + + Emit(INDEX_z_ri | SVESize(zd) | Rd(zd) | Rn(rn) | ImmField<20, 16>(imm5)); +} + +void Assembler::index(const ZRegister& zd, int imm5, const Register& rm) { + // INDEX ., #, + // 0000 0100 ..1. .... 0100 10.. .... .... + // size<23:22> | Rm<20:16> | imm5<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(static_cast(rm.GetSizeInBits()) >= + zd.GetLaneSizeInBits()); + + Emit(INDEX_z_ir | SVESize(zd) | Rd(zd) | ImmField<9, 5>(imm5) | Rm(rm)); +} + +// SVEIntArithmeticUnpredicated. + +void Assembler::add(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm) { + // ADD ., ., . + // 0000 0100 ..1. .... 0000 00.. .... .... + // size<23:22> | Zm<20:16> | opc<12:10> = 000 | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + + Emit(ADD_z_zz | SVESize(zd) | Rd(zd) | Rn(zn) | Rm(zm)); +} + +void Assembler::sqadd(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm) { + // SQADD ., ., . + // 0000 0100 ..1. .... 0001 00.. .... .... + // size<23:22> | Zm<20:16> | opc<12:10> = 100 | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + + Emit(SQADD_z_zz | SVESize(zd) | Rd(zd) | Rn(zn) | Rm(zm)); +} + +void Assembler::sqsub(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm) { + // SQSUB ., ., . + // 0000 0100 ..1. .... 0001 10.. .... .... + // size<23:22> | Zm<20:16> | opc<12:10> = 110 | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + + Emit(SQSUB_z_zz | SVESize(zd) | Rd(zd) | Rn(zn) | Rm(zm)); +} + +void Assembler::sub(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm) { + // SUB ., ., . + // 0000 0100 ..1. .... 0000 01.. .... .... + // size<23:22> | Zm<20:16> | opc<12:10> = 001 | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + + Emit(SUB_z_zz | SVESize(zd) | Rd(zd) | Rn(zn) | Rm(zm)); +} + +void Assembler::uqadd(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm) { + // UQADD ., ., . + // 0000 0100 ..1. .... 0001 01.. .... .... + // size<23:22> | Zm<20:16> | opc<12:10> = 101 | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + + Emit(UQADD_z_zz | SVESize(zd) | Rd(zd) | Rn(zn) | Rm(zm)); +} + +void Assembler::uqsub(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm) { + // UQSUB ., ., . + // 0000 0100 ..1. .... 0001 11.. .... .... + // size<23:22> | Zm<20:16> | opc<12:10> = 111 | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + + Emit(UQSUB_z_zz | SVESize(zd) | Rd(zd) | Rn(zn) | Rm(zm)); +} + +// SVEIntBinaryArithmeticPredicated. + +void Assembler::add(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // ADD ., /M, ., . + // 0000 0100 ..00 0000 000. .... .... .... + // size<23:22> | opc<18:16> = 000 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameFormat(zd, zn, zm)); + + Emit(ADD_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::and_(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // AND ., /M, ., . + // 0000 0100 ..01 1010 000. .... .... .... + // size<23:22> | opc<18:16> = 010 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameFormat(zd, zn, zm)); + + Emit(AND_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::bic(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // BIC ., /M, ., . + // 0000 0100 ..01 1011 000. .... .... .... + // size<23:22> | opc<18:16> = 011 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameFormat(zd, zn, zm)); + + Emit(BIC_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::eor(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // EOR ., /M, ., . + // 0000 0100 ..01 1001 000. .... .... .... + // size<23:22> | opc<18:16> = 001 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameFormat(zd, zn, zm)); + + Emit(EOR_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::mul(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // MUL ., /M, ., . + // 0000 0100 ..01 0000 000. .... .... .... + // size<23:22> | H<17> = 0 | U<16> = 0 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameFormat(zd, zn, zm)); + + Emit(MUL_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::orr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // ORR ., /M, ., . + // 0000 0100 ..01 1000 000. .... .... .... + // size<23:22> | opc<18:16> = 000 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameFormat(zd, zn, zm)); + + Emit(ORR_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::sabd(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // SABD ., /M, ., . + // 0000 0100 ..00 1100 000. .... .... .... + // size<23:22> | opc<18:17> = 10 | U<16> = 0 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameFormat(zd, zn, zm)); + + Emit(SABD_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::sdiv(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // SDIV ., /M, ., . + // 0000 0100 ..01 0100 000. .... .... .... + // size<23:22> | R<17> = 0 | U<16> = 0 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameFormat(zd, zn, zm)); + VIXL_ASSERT(zd.IsLaneSizeS() || zd.IsLaneSizeD()); + + Emit(SDIV_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::sdivr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // SDIVR ., /M, ., . + // 0000 0100 ..01 0110 000. .... .... .... + // size<23:22> | R<17> = 1 | U<16> = 0 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameFormat(zd, zn, zm)); + VIXL_ASSERT(zd.IsLaneSizeS() || zd.IsLaneSizeD()); + + Emit(SDIVR_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::smax(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // SMAX ., /M, ., . + // 0000 0100 ..00 1000 000. .... .... .... + // size<23:22> | opc<18:17> = 00 | U<16> = 0 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameFormat(zd, zn, zm)); + + Emit(SMAX_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::smin(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // SMIN ., /M, ., . + // 0000 0100 ..00 1010 000. .... .... .... + // size<23:22> | opc<18:17> = 01 | U<16> = 0 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameFormat(zd, zn, zm)); + + Emit(SMIN_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::smulh(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // SMULH ., /M, ., . + // 0000 0100 ..01 0010 000. .... .... .... + // size<23:22> | H<17> = 1 | U<16> = 0 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameFormat(zd, zn, zm)); + + Emit(SMULH_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::sub(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // SUB ., /M, ., . + // 0000 0100 ..00 0001 000. .... .... .... + // size<23:22> | opc<18:16> = 001 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameFormat(zd, zn, zm)); + + Emit(SUB_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::subr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // SUBR ., /M, ., . + // 0000 0100 ..00 0011 000. .... .... .... + // size<23:22> | opc<18:16> = 011 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameFormat(zd, zn, zm)); + + Emit(SUBR_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::uabd(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // UABD ., /M, ., . + // 0000 0100 ..00 1101 000. .... .... .... + // size<23:22> | opc<18:17> = 10 | U<16> = 1 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameFormat(zd, zn, zm)); + + Emit(UABD_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::udiv(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // UDIV ., /M, ., . + // 0000 0100 ..01 0101 000. .... .... .... + // size<23:22> | R<17> = 0 | U<16> = 1 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameFormat(zd, zn, zm)); + VIXL_ASSERT(zd.IsLaneSizeS() || zd.IsLaneSizeD()); + + Emit(UDIV_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::udivr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // UDIVR ., /M, ., . + // 0000 0100 ..01 0111 000. .... .... .... + // size<23:22> | R<17> = 1 | U<16> = 1 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameFormat(zd, zn, zm)); + VIXL_ASSERT(zd.IsLaneSizeS() || zd.IsLaneSizeD()); + + Emit(UDIVR_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::umax(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // UMAX ., /M, ., . + // 0000 0100 ..00 1001 000. .... .... .... + // size<23:22> | opc<18:17> = 00 | U<16> = 1 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameFormat(zd, zn, zm)); + + Emit(UMAX_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::umin(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // UMIN ., /M, ., . + // 0000 0100 ..00 1011 000. .... .... .... + // size<23:22> | opc<18:17> = 01 | U<16> = 1 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameFormat(zd, zn, zm)); + + Emit(UMIN_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::umulh(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // UMULH ., /M, ., . + // 0000 0100 ..01 0011 000. .... .... .... + // size<23:22> | H<17> = 1 | U<16> = 1 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameFormat(zd, zn, zm)); + + Emit(UMULH_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +// SVEIntCompareScalars. + +void Assembler::ctermeq(const Register& rn, const Register& rm) { + // CTERMEQ , + // 0010 0101 1.1. .... 0010 00.. ...0 0000 + // op<23> = 1 | sz<22> | Rm<20:16> | Rn<9:5> | ne<4> = 0 + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameSizeAndType(rn, rm)); + const Instr sz = rn.Is64Bits() ? 0x00400000 : 0x00000000; + + Emit(CTERMEQ_rr | sz | Rn(rn) | Rm(rm)); +} + +void Assembler::ctermne(const Register& rn, const Register& rm) { + // CTERMNE , + // 0010 0101 1.1. .... 0010 00.. ...1 0000 + // op<23> = 1 | sz<22> | Rm<20:16> | Rn<9:5> | ne<4> = 1 + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameSizeAndType(rn, rm)); + const Instr sz = rn.Is64Bits() ? 0x00400000 : 0x00000000; + + Emit(CTERMNE_rr | sz | Rn(rn) | Rm(rm)); +} + +void Assembler::whilele(const PRegisterWithLaneSize& pd, + const Register& rn, + const Register& rm) { + // WHILELE ., , + // 0010 0101 ..1. .... 000. 01.. ...1 .... + // size<23:22> | Rm<20:16> | sf<12> | U<11> = 0 | lt<10> = 1 | Rn<9:5> | + // eq<4> = 1 | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameSizeAndType(rn, rm)); + const Instr sf = rn.Is64Bits() ? 0x00001000 : 0x00000000; + + Emit(WHILELE_p_p_rr | SVESize(pd) | sf | Pd(pd) | Rn(rn) | Rm(rm)); +} + +void Assembler::whilelo(const PRegisterWithLaneSize& pd, + const Register& rn, + const Register& rm) { + // WHILELO ., , + // 0010 0101 ..1. .... 000. 11.. ...0 .... + // size<23:22> | Rm<20:16> | sf<12> | U<11> = 1 | lt<10> = 1 | Rn<9:5> | + // eq<4> = 0 | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameSizeAndType(rn, rm)); + const Instr sf = rn.Is64Bits() ? 0x00001000 : 0x00000000; + + Emit(WHILELO_p_p_rr | SVESize(pd) | sf | Pd(pd) | Rn(rn) | Rm(rm)); +} + +void Assembler::whilels(const PRegisterWithLaneSize& pd, + const Register& rn, + const Register& rm) { + // WHILELS ., , + // 0010 0101 ..1. .... 000. 11.. ...1 .... + // size<23:22> | Rm<20:16> | sf<12> | U<11> = 1 | lt<10> = 1 | Rn<9:5> | + // eq<4> = 1 | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameSizeAndType(rn, rm)); + const Instr sf = rn.Is64Bits() ? 0x00001000 : 0x00000000; + + Emit(WHILELS_p_p_rr | SVESize(pd) | sf | Pd(pd) | Rn(rn) | Rm(rm)); +} + +void Assembler::whilelt(const PRegisterWithLaneSize& pd, + const Register& rn, + const Register& rm) { + // WHILELT ., , + // 0010 0101 ..1. .... 000. 01.. ...0 .... + // size<23:22> | Rm<20:16> | sf<12> | U<11> = 0 | lt<10> = 1 | Rn<9:5> | + // eq<4> = 0 | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameSizeAndType(rn, rm)); + const Instr sf = rn.Is64Bits() ? 0x00001000 : 0x00000000; + + Emit(WHILELT_p_p_rr | SVESize(pd) | sf | Pd(pd) | Rn(rn) | Rm(rm)); +} + +void Assembler::CompareVectors(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm, + SVEIntCompareVectorsOp op) { + Emit(op | SVESize(zn) | Pd(pd) | PgLow8(pg) | Rn(zn) | Rm(zm)); +} + +void Assembler::CompareVectors(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + int imm, + SVEIntCompareSignedImmOp op) { + Emit(op | SVESize(zn) | Pd(pd) | PgLow8(pg) | Rn(zn) | ImmField<20, 16>(imm)); +} + +void Assembler::CompareVectors(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + unsigned imm, + SVEIntCompareUnsignedImmOp op) { + Emit(op | SVESize(zn) | Pd(pd) | PgLow8(pg) | Rn(zn) | + ImmUnsignedField<20, 14>(imm)); +} + +void Assembler::cmp(Condition cond, + const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + switch (cond) { + case eq: + cmpeq(pd, pg, zn, zm); + break; + case ge: + cmpge(pd, pg, zn, zm); + break; + case gt: + cmpgt(pd, pg, zn, zm); + break; + case le: + cmple(pd, pg, zn, zm); + break; + case lt: + cmplt(pd, pg, zn, zm); + break; + case ne: + cmpne(pd, pg, zn, zm); + break; + case hi: + cmphi(pd, pg, zn, zm); + break; + case hs: + cmphs(pd, pg, zn, zm); + break; + case lo: + cmplo(pd, pg, zn, zm); + break; + case ls: + cmpls(pd, pg, zn, zm); + break; + default: + VIXL_UNREACHABLE(); + } +} + +// SVEIntCompareSignedImm. + +void Assembler::cmpeq(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5) { + // CMPEQ ., /Z, ., # + // 0010 0101 ..0. .... 100. .... ...0 .... + // size<23:22> | imm5<20:16> | op<15> = 1 | o2<13> = 0 | Pg<12:10> | Zn<9:5> + // | ne<4> = 0 | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(pd, zn)); + + CompareVectors(pd, pg, zn, imm5, CMPEQ_p_p_zi); +} + +void Assembler::cmpge(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5) { + // CMPGE ., /Z, ., # + // 0010 0101 ..0. .... 000. .... ...0 .... + // size<23:22> | imm5<20:16> | op<15> = 0 | o2<13> = 0 | Pg<12:10> | Zn<9:5> + // | ne<4> = 0 | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(pd, zn)); + + CompareVectors(pd, pg, zn, imm5, CMPGE_p_p_zi); +} + +void Assembler::cmpgt(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5) { + // CMPGT ., /Z, ., # + // 0010 0101 ..0. .... 000. .... ...1 .... + // size<23:22> | imm5<20:16> | op<15> = 0 | o2<13> = 0 | Pg<12:10> | Zn<9:5> + // | ne<4> = 1 | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(pd, zn)); + + CompareVectors(pd, pg, zn, imm5, CMPGT_p_p_zi); +} + +void Assembler::cmple(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5) { + // CMPLE ., /Z, ., # + // 0010 0101 ..0. .... 001. .... ...1 .... + // size<23:22> | imm5<20:16> | op<15> = 0 | o2<13> = 1 | Pg<12:10> | Zn<9:5> + // | ne<4> = 1 | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(pd, zn)); + + CompareVectors(pd, pg, zn, imm5, CMPLE_p_p_zi); +} + +void Assembler::cmplt(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5) { + // CMPLT ., /Z, ., # + // 0010 0101 ..0. .... 001. .... ...0 .... + // size<23:22> | imm5<20:16> | op<15> = 0 | o2<13> = 1 | Pg<12:10> | Zn<9:5> + // | ne<4> = 0 | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(pd, zn)); + + CompareVectors(pd, pg, zn, imm5, CMPLT_p_p_zi); +} + +void Assembler::cmpne(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5) { + // CMPNE ., /Z, ., # + // 0010 0101 ..0. .... 100. .... ...1 .... + // size<23:22> | imm5<20:16> | op<15> = 1 | o2<13> = 0 | Pg<12:10> | Zn<9:5> + // | ne<4> = 1 | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(pd, zn)); + + CompareVectors(pd, pg, zn, imm5, CMPNE_p_p_zi); +} + +// SVEIntCompareUnsignedImm. + +void Assembler::cmphi(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + unsigned imm7) { + // CMPHI ., /Z, ., # + // 0010 0100 ..1. .... ..0. .... ...1 .... + // size<23:22> | imm7<20:14> | lt<13> = 0 | Pg<12:10> | Zn<9:5> | ne<4> = 1 | + // Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(pd, zn)); + + CompareVectors(pd, pg, zn, imm7, CMPHI_p_p_zi); +} + +void Assembler::cmphs(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + unsigned imm7) { + // CMPHS ., /Z, ., # + // 0010 0100 ..1. .... ..0. .... ...0 .... + // size<23:22> | imm7<20:14> | lt<13> = 0 | Pg<12:10> | Zn<9:5> | ne<4> = 0 | + // Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(pd, zn)); + + CompareVectors(pd, pg, zn, imm7, CMPHS_p_p_zi); +} + +void Assembler::cmplo(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + unsigned imm7) { + // CMPLO ., /Z, ., # + // 0010 0100 ..1. .... ..1. .... ...0 .... + // size<23:22> | imm7<20:14> | lt<13> = 1 | Pg<12:10> | Zn<9:5> | ne<4> = 0 | + // Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(pd, zn)); + + CompareVectors(pd, pg, zn, imm7, CMPLO_p_p_zi); +} + +void Assembler::cmpls(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + unsigned imm7) { + // CMPLS ., /Z, ., # + // 0010 0100 ..1. .... ..1. .... ...1 .... + // size<23:22> | imm7<20:14> | lt<13> = 1 | Pg<12:10> | Zn<9:5> | ne<4> = 1 | + // Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(pd, zn)); + + CompareVectors(pd, pg, zn, imm7, CMPLS_p_p_zi); +} + +// SVEIntCompareVectors. + +// This prototype maps to 2 instruction encodings: +// CMPEQ_p_p_zw +// CMPEQ_p_p_zz +void Assembler::cmpeq(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(pd, zn)); + SVEIntCompareVectorsOp op = CMPEQ_p_p_zz; + if (!AreSameLaneSize(zn, zm)) { + VIXL_ASSERT(zm.IsLaneSizeD()); + op = CMPEQ_p_p_zw; + } + CompareVectors(pd, pg, zn, zm, op); +} + +// This prototype maps to 2 instruction encodings: +// CMPGE_p_p_zw +// CMPGE_p_p_zz +void Assembler::cmpge(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(pd, zn)); + SVEIntCompareVectorsOp op = CMPGE_p_p_zz; + if (!AreSameLaneSize(zn, zm)) { + VIXL_ASSERT(zm.IsLaneSizeD()); + op = CMPGE_p_p_zw; + } + CompareVectors(pd, pg, zn, zm, op); +} + +// This prototype maps to 2 instruction encodings: +// CMPGT_p_p_zw +// CMPGT_p_p_zz +void Assembler::cmpgt(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(pd, zn)); + SVEIntCompareVectorsOp op = CMPGT_p_p_zz; + if (!AreSameLaneSize(zn, zm)) { + VIXL_ASSERT(zm.IsLaneSizeD()); + op = CMPGT_p_p_zw; + } + CompareVectors(pd, pg, zn, zm, op); +} + +// This prototype maps to 2 instruction encodings: +// CMPHI_p_p_zw +// CMPHI_p_p_zz +void Assembler::cmphi(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(pd, zn)); + SVEIntCompareVectorsOp op = CMPHI_p_p_zz; + if (!AreSameLaneSize(zn, zm)) { + VIXL_ASSERT(zm.IsLaneSizeD()); + op = CMPHI_p_p_zw; + } + CompareVectors(pd, pg, zn, zm, op); +} + +// This prototype maps to 2 instruction encodings: +// CMPHS_p_p_zw +// CMPHS_p_p_zz +void Assembler::cmphs(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(pd, zn)); + SVEIntCompareVectorsOp op = CMPHS_p_p_zz; + if (!AreSameLaneSize(zn, zm)) { + VIXL_ASSERT(zm.IsLaneSizeD()); + op = CMPHS_p_p_zw; + } + CompareVectors(pd, pg, zn, zm, op); +} + +void Assembler::cmple(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(pd, zn)); + if (AreSameLaneSize(zn, zm)) { + cmpge(pd, pg, zm, zn); + return; + } + VIXL_ASSERT(zm.IsLaneSizeD()); + VIXL_ASSERT(!zn.IsLaneSizeD()); + + CompareVectors(pd, pg, zn, zm, CMPLE_p_p_zw); +} + +void Assembler::cmplo(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(pd, zn)); + if (AreSameLaneSize(zn, zm)) { + cmphi(pd, pg, zm, zn); + return; + } + VIXL_ASSERT(zm.IsLaneSizeD()); + VIXL_ASSERT(!zn.IsLaneSizeD()); + + CompareVectors(pd, pg, zn, zm, CMPLO_p_p_zw); +} + +void Assembler::cmpls(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(pd, zn)); + if (AreSameLaneSize(zn, zm)) { + cmphs(pd, pg, zm, zn); + return; + } + VIXL_ASSERT(zm.IsLaneSizeD()); + VIXL_ASSERT(!zn.IsLaneSizeD()); + + CompareVectors(pd, pg, zn, zm, CMPLS_p_p_zw); +} + +void Assembler::cmplt(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(pd, zn)); + if (AreSameLaneSize(zn, zm)) { + cmpgt(pd, pg, zm, zn); + return; + } + VIXL_ASSERT(zm.IsLaneSizeD()); + VIXL_ASSERT(!zn.IsLaneSizeD()); + + CompareVectors(pd, pg, zn, zm, CMPLT_p_p_zw); +} + +// This prototype maps to 2 instruction encodings: +// CMPNE_p_p_zw +// CMPNE_p_p_zz +void Assembler::cmpne(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(pd, zn)); + SVEIntCompareVectorsOp op = CMPNE_p_p_zz; + if (!AreSameLaneSize(zn, zm)) { + VIXL_ASSERT(zm.IsLaneSizeD()); + op = CMPNE_p_p_zw; + } + CompareVectors(pd, pg, zn, zm, op); +} + +// SVEIntMiscUnpredicated. + +void Assembler::fexpa(const ZRegister& zd, const ZRegister& zn) { + // FEXPA ., . + // 0000 0100 ..10 0000 1011 10.. .... .... + // size<23:22> | opc<20:16> = 00000 | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FEXPA_z_z | SVESize(zd) | Rd(zd) | Rn(zn)); +} + +void Assembler::ftssel(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm) { + // FTSSEL ., ., . + // 0000 0100 ..1. .... 1011 00.. .... .... + // size<23:22> | Zm<20:16> | op<10> = 0 | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FTSSEL_z_zz | SVESize(zd) | Rd(zd) | Rn(zn) | Rm(zm)); +} + +void Assembler::movprfx(const ZRegister& zd, const ZRegister& zn) { + // MOVPRFX , + // 0000 0100 0010 0000 1011 11.. .... .... + // opc<23:22> = 00 | opc2<20:16> = 00000 | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + + Emit(MOVPRFX_z_z | Rd(zd) | Rn(zn)); +} + +// SVEIntMulAddPredicated. + +void Assembler::mad(const ZRegister& zdn, + const PRegisterM& pg, + const ZRegister& zm, + const ZRegister& za) { + // MAD ., /M, ., . + // 0000 0100 ..0. .... 110. .... .... .... + // size<23:22> | Zm<20:16> | op<13> = 0 | Pg<12:10> | Za<9:5> | Zdn<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zdn, zm, za)); + + Emit(MAD_z_p_zzz | SVESize(zdn) | Rd(zdn) | PgLow8(pg) | Rm(zm) | Rn(za)); +} + +void Assembler::mla(const ZRegister& zda, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // MLA ., /M, ., . + // 0000 0100 ..0. .... 010. .... .... .... + // size<23:22> | Zm<20:16> | op<13> = 0 | Pg<12:10> | Zn<9:5> | Zda<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zda, zn, zm)); + + Emit(MLA_z_p_zzz | SVESize(zda) | Rd(zda) | PgLow8(pg) | Rn(zn) | Rm(zm)); +} + +void Assembler::mls(const ZRegister& zda, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + // MLS ., /M, ., . + // 0000 0100 ..0. .... 011. .... .... .... + // size<23:22> | Zm<20:16> | op<13> = 1 | Pg<12:10> | Zn<9:5> | Zda<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zda, zn, zm)); + + Emit(MLS_z_p_zzz | SVESize(zda) | Rd(zda) | PgLow8(pg) | Rn(zn) | Rm(zm)); +} + +void Assembler::msb(const ZRegister& zdn, + const PRegisterM& pg, + const ZRegister& zm, + const ZRegister& za) { + // MSB ., /M, ., . + // 0000 0100 ..0. .... 111. .... .... .... + // size<23:22> | Zm<20:16> | op<13> = 1 | Pg<12:10> | Za<9:5> | Zdn<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zdn, zm, za)); + + Emit(MSB_z_p_zzz | SVESize(zdn) | Rd(zdn) | PgLow8(pg) | Rm(zm) | Rn(za)); +} + +// SVEIntMulAddUnpredicated. + +void Assembler::sdot(const ZRegister& zda, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zda.IsLaneSizeS() || zda.IsLaneSizeD()); + VIXL_ASSERT(zda.GetLaneSizeInBytes() == (zn.GetLaneSizeInBytes() * 4)); + VIXL_ASSERT(AreSameLaneSize(zm, zn)); + + Emit(SDOT_z_zzz | SVESize(zda) | Rd(zda) | Rn(zn) | Rm(zm)); +} + +void Assembler::udot(const ZRegister& zda, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zda.IsLaneSizeS() || zda.IsLaneSizeD()); + VIXL_ASSERT(zda.GetLaneSizeInBytes() == (zn.GetLaneSizeInBytes() * 4)); + VIXL_ASSERT(AreSameLaneSize(zm, zn)); + + Emit(UDOT_z_zzz | SVESize(zda) | Rd(zda) | Rn(zn) | Rm(zm)); +} + +// SVEIntReduction. + +void Assembler::andv(const VRegister& vd, + const PRegister& pg, + const ZRegister& zn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(vd.IsScalar()); + + Emit(ANDV_r_p_z | SVESize(zn) | Rd(vd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::eorv(const VRegister& vd, + const PRegister& pg, + const ZRegister& zn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(vd.IsScalar()); + + Emit(EORV_r_p_z | SVESize(zn) | Rd(vd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::movprfx(const ZRegister& zd, + const PRegister& pg, + const ZRegister& zn) { + // MOVPRFX ., /, . + // 0000 0100 ..01 000. 001. .... .... .... + // size<23:22> | opc<18:17> = 00 | M<16> | Pg<12:10> | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(pg.IsMerging() || pg.IsZeroing()); + VIXL_ASSERT(!pg.HasLaneSize()); + + Instr m = pg.IsMerging() ? 0x00010000 : 0x00000000; + Emit(MOVPRFX_z_p_z | SVESize(zd) | m | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::orv(const VRegister& vd, + const PRegister& pg, + const ZRegister& zn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(vd.IsScalar()); + + Emit(ORV_r_p_z | SVESize(zn) | Rd(vd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::saddv(const VRegister& dd, + const PRegister& pg, + const ZRegister& zn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zn.GetLaneSizeInBytes() != kDRegSizeInBytes); + + Emit(SADDV_r_p_z | SVESize(zn) | Rd(dd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::smaxv(const VRegister& vd, + const PRegister& pg, + const ZRegister& zn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(vd.IsScalar()); + + Emit(SMAXV_r_p_z | SVESize(zn) | Rd(vd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::sminv(const VRegister& vd, + const PRegister& pg, + const ZRegister& zn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(vd.IsScalar()); + + Emit(SMINV_r_p_z | SVESize(zn) | Rd(vd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::uaddv(const VRegister& dd, + const PRegister& pg, + const ZRegister& zn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Emit(UADDV_r_p_z | SVESize(zn) | Rd(dd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::umaxv(const VRegister& vd, + const PRegister& pg, + const ZRegister& zn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(vd.IsScalar()); + + Emit(UMAXV_r_p_z | SVESize(zn) | Rd(vd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::uminv(const VRegister& vd, + const PRegister& pg, + const ZRegister& zn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(vd.IsScalar()); + + Emit(UMINV_r_p_z | SVESize(zn) | Rd(vd) | PgLow8(pg) | Rn(zn)); +} + +// SVEIntUnaryArithmeticPredicated. + +void Assembler::abs(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + // ABS ., /M, . + // 0000 0100 ..01 0110 101. .... .... .... + // size<23:22> | opc<18:16> = 110 | Pg<12:10> | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + + Emit(ABS_z_p_z | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::cls(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + // CLS ., /M, . + // 0000 0100 ..01 1000 101. .... .... .... + // size<23:22> | opc<18:16> = 000 | Pg<12:10> | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + + Emit(CLS_z_p_z | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::clz(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + // CLZ ., /M, . + // 0000 0100 ..01 1001 101. .... .... .... + // size<23:22> | opc<18:16> = 001 | Pg<12:10> | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + + Emit(CLZ_z_p_z | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::cnot(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + // CNOT ., /M, . + // 0000 0100 ..01 1011 101. .... .... .... + // size<23:22> | opc<18:16> = 011 | Pg<12:10> | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + + Emit(CNOT_z_p_z | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::cnt(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + // CNT ., /M, . + // 0000 0100 ..01 1010 101. .... .... .... + // size<23:22> | opc<18:16> = 010 | Pg<12:10> | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + + Emit(CNT_z_p_z | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::fabs(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + // FABS ., /M, . + // 0000 0100 ..01 1100 101. .... .... .... + // size<23:22> | opc<18:16> = 100 | Pg<12:10> | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FABS_z_p_z | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::fneg(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + // FNEG ., /M, . + // 0000 0100 ..01 1101 101. .... .... .... + // size<23:22> | opc<18:16> = 101 | Pg<12:10> | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Emit(FNEG_z_p_z | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::neg(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + // NEG ., /M, . + // 0000 0100 ..01 0111 101. .... .... .... + // size<23:22> | opc<18:16> = 111 | Pg<12:10> | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + + Emit(NEG_z_p_z | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::not_(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + // NOT ., /M, . + // 0000 0100 ..01 1110 101. .... .... .... + // size<23:22> | opc<18:16> = 110 | Pg<12:10> | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + + Emit(NOT_z_p_z | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::sxtb(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + // SXTB ., /M, . + // 0000 0100 ..01 0000 101. .... .... .... + // size<23:22> | opc<18:16> = 000 | Pg<12:10> | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() > kBRegSizeInBytes); + + Emit(SXTB_z_p_z | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::sxth(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + // SXTH ., /M, . + // 0000 0100 ..01 0010 101. .... .... .... + // size<23:22> | opc<18:16> = 010 | Pg<12:10> | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() > kHRegSizeInBytes); + + Emit(SXTH_z_p_z | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::sxtw(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + // SXTW .D, /M, .D + // 0000 0100 ..01 0100 101. .... .... .... + // size<23:22> | opc<18:16> = 100 | Pg<12:10> | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() > kSRegSizeInBytes); + + Emit(SXTW_z_p_z | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::uxtb(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + // UXTB ., /M, . + // 0000 0100 ..01 0001 101. .... .... .... + // size<23:22> | opc<18:16> = 001 | Pg<12:10> | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() > kBRegSizeInBytes); + + Emit(UXTB_z_p_z | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::uxth(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + // UXTH ., /M, . + // 0000 0100 ..01 0011 101. .... .... .... + // size<23:22> | opc<18:16> = 011 | Pg<12:10> | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() > kHRegSizeInBytes); + + Emit(UXTH_z_p_z | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::uxtw(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + // UXTW .D, /M, .D + // 0000 0100 ..01 0101 101. .... .... .... + // size<23:22> | opc<18:16> = 101 | Pg<12:10> | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() > kSRegSizeInBytes); + + Emit(UXTW_z_p_z | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +// SVEIntWideImmPredicated. + +void Assembler::cpy(const ZRegister& zd, + const PRegister& pg, + int imm8, + int shift) { + // CPY ., /, #{, } + // 0000 0101 ..01 .... 0... .... .... .... + // size<23:22> | Pg<19:16> | M<14> | sh<13> | imm8<12:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(pg.IsMerging() || pg.IsZeroing()); + + ResolveSVEImm8Shift(&imm8, &shift); + + Instr sh = (shift > 0) ? (1 << 13) : 0; + Instr m = pg.IsMerging() ? (1 << 14) : 0; + Emit(CPY_z_p_i | m | sh | SVESize(zd) | Rd(zd) | Pg<19, 16>(pg) | + ImmField<12, 5>(imm8)); +} + +void Assembler::fcpy(const ZRegister& zd, const PRegisterM& pg, double imm) { + // FCPY ., /M, # + // 0000 0101 ..01 .... 110. .... .... .... + // size<23:22> | Pg<19:16> | imm8<12:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Instr imm_field = ImmUnsignedField<12, 5>(FP64ToImm8(imm)); + Emit(FCPY_z_p_i | SVESize(zd) | Rd(zd) | Pg<19, 16>(pg) | imm_field); +} + +// SVEIntAddSubtractImmUnpredicated. + +void Assembler::SVEIntAddSubtractImmUnpredicatedHelper( + SVEIntAddSubtractImm_UnpredicatedOp op, + const ZRegister& zd, + int imm8, + int shift) { + if (shift < 0) { + VIXL_ASSERT(shift == -1); + // Derive the shift amount from the immediate. + if (IsUint8(imm8)) { + shift = 0; + } else if (IsUint16(imm8) && ((imm8 % 256) == 0)) { + imm8 /= 256; + shift = 8; + } + } + + VIXL_ASSERT(IsUint8(imm8)); + VIXL_ASSERT((shift == 0) || (shift == 8)); + + Instr shift_bit = (shift > 0) ? (1 << 13) : 0; + Emit(op | SVESize(zd) | Rd(zd) | shift_bit | ImmUnsignedField<12, 5>(imm8)); +} + +void Assembler::add(const ZRegister& zd, + const ZRegister& zn, + int imm8, + int shift) { + // ADD ., ., #{, } + // 0010 0101 ..10 0000 11.. .... .... .... + // size<23:22> | opc<18:16> = 000 | sh<13> | imm8<12:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + + SVEIntAddSubtractImmUnpredicatedHelper(ADD_z_zi, zd, imm8, shift); +} + +void Assembler::dup(const ZRegister& zd, int imm8, int shift) { + // DUP ., #{, } + // 0010 0101 ..11 1000 11.. .... .... .... + // size<23:22> | opc<18:17> = 00 | sh<13> | imm8<12:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + ResolveSVEImm8Shift(&imm8, &shift); + VIXL_ASSERT((shift < 8) || !zd.IsLaneSizeB()); + + Instr shift_bit = (shift > 0) ? (1 << 13) : 0; + Emit(DUP_z_i | SVESize(zd) | Rd(zd) | shift_bit | ImmField<12, 5>(imm8)); +} + +void Assembler::fdup(const ZRegister& zd, double imm) { + // FDUP ., # + // 0010 0101 ..11 1001 110. .... .... .... + // size<23:22> | opc<18:17> = 00 | o2<13> = 0 | imm8<12:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() != kBRegSizeInBytes); + + Instr encoded_imm = FP64ToImm8(imm) << 5; + Emit(FDUP_z_i | SVESize(zd) | encoded_imm | Rd(zd)); +} + +void Assembler::mul(const ZRegister& zd, const ZRegister& zn, int imm8) { + // MUL ., ., # + // 0010 0101 ..11 0000 110. .... .... .... + // size<23:22> | opc<18:16> = 000 | o2<13> = 0 | imm8<12:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + + Emit(MUL_z_zi | SVESize(zd) | Rd(zd) | ImmField<12, 5>(imm8)); +} + +void Assembler::smax(const ZRegister& zd, const ZRegister& zn, int imm8) { + // SMAX ., ., # + // 0010 0101 ..10 1000 110. .... .... .... + // size<23:22> | opc<18:16> = 000 | o2<13> = 0 | imm8<12:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + + Emit(SMAX_z_zi | SVESize(zd) | Rd(zd) | ImmField<12, 5>(imm8)); +} + +void Assembler::smin(const ZRegister& zd, const ZRegister& zn, int imm8) { + // SMIN ., ., # + // 0010 0101 ..10 1010 110. .... .... .... + // size<23:22> | opc<18:16> = 010 | o2<13> = 0 | imm8<12:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + + Emit(SMIN_z_zi | SVESize(zd) | Rd(zd) | ImmField<12, 5>(imm8)); +} + +void Assembler::sqadd(const ZRegister& zd, + const ZRegister& zn, + int imm8, + int shift) { + // SQADD ., ., #{, } + // 0010 0101 ..10 0100 11.. .... .... .... + // size<23:22> | opc<18:16> = 100 | sh<13> | imm8<12:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + + SVEIntAddSubtractImmUnpredicatedHelper(SQADD_z_zi, zd, imm8, shift); +} + +void Assembler::sqsub(const ZRegister& zd, + const ZRegister& zn, + int imm8, + int shift) { + // SQSUB ., ., #{, } + // 0010 0101 ..10 0110 11.. .... .... .... + // size<23:22> | opc<18:16> = 110 | sh<13> | imm8<12:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + + SVEIntAddSubtractImmUnpredicatedHelper(SQSUB_z_zi, zd, imm8, shift); +} + +void Assembler::sub(const ZRegister& zd, + const ZRegister& zn, + int imm8, + int shift) { + // SUB ., ., #{, } + // 0010 0101 ..10 0001 11.. .... .... .... + // size<23:22> | opc<18:16> = 001 | sh<13> | imm8<12:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + + SVEIntAddSubtractImmUnpredicatedHelper(SUB_z_zi, zd, imm8, shift); +} + +void Assembler::subr(const ZRegister& zd, + const ZRegister& zn, + int imm8, + int shift) { + // SUBR ., ., #{, } + // 0010 0101 ..10 0011 11.. .... .... .... + // size<23:22> | opc<18:16> = 011 | sh<13> | imm8<12:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + + SVEIntAddSubtractImmUnpredicatedHelper(SUBR_z_zi, zd, imm8, shift); +} + +void Assembler::umax(const ZRegister& zd, const ZRegister& zn, int imm8) { + // UMAX ., ., # + // 0010 0101 ..10 1001 110. .... .... .... + // size<23:22> | opc<18:16> = 001 | o2<13> = 0 | imm8<12:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + + Emit(UMAX_z_zi | SVESize(zd) | Rd(zd) | ImmUnsignedField<12, 5>(imm8)); +} + +void Assembler::umin(const ZRegister& zd, const ZRegister& zn, int imm8) { + // UMIN ., ., # + // 0010 0101 ..10 1011 110. .... .... .... + // size<23:22> | opc<18:16> = 011 | o2<13> = 0 | imm8<12:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + + Emit(UMIN_z_zi | SVESize(zd) | Rd(zd) | ImmUnsignedField<12, 5>(imm8)); +} + +void Assembler::uqadd(const ZRegister& zd, + const ZRegister& zn, + int imm8, + int shift) { + // UQADD ., ., #{, } + // 0010 0101 ..10 0101 11.. .... .... .... + // size<23:22> | opc<18:16> = 101 | sh<13> | imm8<12:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + + SVEIntAddSubtractImmUnpredicatedHelper(UQADD_z_zi, zd, imm8, shift); +} + +void Assembler::uqsub(const ZRegister& zd, + const ZRegister& zn, + int imm8, + int shift) { + // UQSUB ., ., #{, } + // 0010 0101 ..10 0111 11.. .... .... .... + // size<23:22> | opc<18:16> = 111 | sh<13> | imm8<12:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + + SVEIntAddSubtractImmUnpredicatedHelper(UQSUB_z_zi, zd, imm8, shift); +} + +// SVEMemLoad. + +void Assembler::SVELdSt1Helper(unsigned msize_in_bytes_log2, + const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr, + bool is_signed, + Instr op) { + VIXL_ASSERT(addr.IsContiguous()); + + Instr mem_op = SVEMemOperandHelper(msize_in_bytes_log2, 1, addr); + Instr dtype = + SVEDtype(msize_in_bytes_log2, zt.GetLaneSizeInBytesLog2(), is_signed); + Emit(op | mem_op | dtype | Rt(zt) | PgLow8(pg)); +} + +void Assembler::SVELdSt234Helper(int num_regs, + const ZRegister& zt1, + const PRegister& pg, + const SVEMemOperand& addr, + Instr op) { + VIXL_ASSERT((num_regs >= 2) && (num_regs <= 4)); + + unsigned msize_in_bytes_log2 = zt1.GetLaneSizeInBytesLog2(); + Instr num = (num_regs - 1) << 21; + Instr msz = msize_in_bytes_log2 << 23; + Instr mem_op = SVEMemOperandHelper(msize_in_bytes_log2, num_regs, addr); + Emit(op | mem_op | msz | num | Rt(zt1) | PgLow8(pg)); +} + +void Assembler::SVELd1Helper(unsigned msize_in_bytes_log2, + const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr, + bool is_signed) { + VIXL_ASSERT(zt.GetLaneSizeInBytesLog2() >= msize_in_bytes_log2); + if (is_signed) { + // Sign-extension is only possible when the vector elements are larger than + // the elements in memory. + VIXL_ASSERT(zt.GetLaneSizeInBytesLog2() != msize_in_bytes_log2); + } + + if (addr.IsScatterGather()) { + bool is_load = true; + bool is_ff = false; + SVEScatterGatherHelper(msize_in_bytes_log2, + zt, + pg, + addr, + is_load, + is_signed, + is_ff); + return; + } + + Instr op = 0xffffffff; + if (addr.IsScalarPlusImmediate()) { + op = SVEContiguousLoad_ScalarPlusImmFixed; + } else if (addr.IsScalarPlusScalar()) { + // Rm must not be xzr. + VIXL_ASSERT(!addr.GetScalarOffset().IsZero()); + op = SVEContiguousLoad_ScalarPlusScalarFixed; + } else { + VIXL_UNIMPLEMENTED(); + } + SVELdSt1Helper(msize_in_bytes_log2, zt, pg, addr, is_signed, op); +} + +void Assembler::SVELdff1Helper(unsigned msize_in_bytes_log2, + const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr, + bool is_signed) { + VIXL_ASSERT(zt.GetLaneSizeInBytesLog2() >= msize_in_bytes_log2); + if (is_signed) { + // Sign-extension is only possible when the vector elements are larger than + // the elements in memory. + VIXL_ASSERT(zt.GetLaneSizeInBytesLog2() != msize_in_bytes_log2); + } + + if (addr.IsScatterGather()) { + bool is_load = true; + bool is_ff = true; + SVEScatterGatherHelper(msize_in_bytes_log2, + zt, + pg, + addr, + is_load, + is_signed, + is_ff); + return; + } + + if (addr.IsPlainScalar()) { + // SVEMemOperand(x0) is treated as a scalar-plus-immediate form ([x0, #0]). + // In these instructions, we want to treat it as [x0, xzr]. + SVEMemOperand addr_scalar_plus_scalar(addr.GetScalarBase(), xzr); + // Guard against infinite recursion. + VIXL_ASSERT(!addr_scalar_plus_scalar.IsPlainScalar()); + SVELdff1Helper(msize_in_bytes_log2, + zt, + pg, + addr_scalar_plus_scalar, + is_signed); + return; + } + + Instr op = 0xffffffff; + if (addr.IsScalarPlusScalar()) { + op = SVEContiguousFirstFaultLoad_ScalarPlusScalarFixed; + } else { + VIXL_UNIMPLEMENTED(); + } + SVELdSt1Helper(msize_in_bytes_log2, zt, pg, addr, is_signed, op); +} + +void Assembler::SVEScatterGatherHelper(unsigned msize_in_bytes_log2, + const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr, + bool is_load, + bool is_signed, + bool is_first_fault) { + VIXL_ASSERT(addr.IsScatterGather()); + VIXL_ASSERT(zt.IsLaneSizeS() || zt.IsLaneSizeD()); + VIXL_ASSERT(is_load || !is_first_fault); + VIXL_ASSERT(is_load || !is_signed); + + Instr op = 0xffffffff; + if (addr.IsVectorPlusImmediate()) { + VIXL_ASSERT(AreSameLaneSize(zt, addr.GetVectorBase())); + if (is_load) { + if (zt.IsLaneSizeS()) { + op = SVE32BitGatherLoad_VectorPlusImmFixed; + } else { + op = SVE64BitGatherLoad_VectorPlusImmFixed; + } + } else { + if (zt.IsLaneSizeS()) { + op = SVE32BitScatterStore_VectorPlusImmFixed; + } else { + op = SVE64BitScatterStore_VectorPlusImmFixed; + } + } + } else { + VIXL_ASSERT(addr.IsScalarPlusVector()); + VIXL_ASSERT(AreSameLaneSize(zt, addr.GetVectorOffset())); + SVEOffsetModifier mod = addr.GetOffsetModifier(); + if (zt.IsLaneSizeS()) { + VIXL_ASSERT((mod == SVE_UXTW) || (mod == SVE_SXTW)); + unsigned shift_amount = addr.GetShiftAmount(); + if (shift_amount == 0) { + if (is_load) { + op = SVE32BitGatherLoad_ScalarPlus32BitUnscaledOffsetsFixed; + } else { + op = SVE32BitScatterStore_ScalarPlus32BitUnscaledOffsetsFixed; + } + } else if (shift_amount == 1) { + VIXL_ASSERT(msize_in_bytes_log2 == kHRegSizeInBytesLog2); + if (is_load) { + op = SVE32BitGatherLoadHalfwords_ScalarPlus32BitScaledOffsetsFixed; + } else { + op = SVE32BitScatterStore_ScalarPlus32BitScaledOffsetsFixed; + } + } else { + VIXL_ASSERT(shift_amount == 2); + VIXL_ASSERT(msize_in_bytes_log2 == kSRegSizeInBytesLog2); + if (is_load) { + op = SVE32BitGatherLoadWords_ScalarPlus32BitScaledOffsetsFixed; + } else { + op = SVE32BitScatterStore_ScalarPlus32BitScaledOffsetsFixed; + } + } + } else if (zt.IsLaneSizeD()) { + switch (mod) { + case NO_SVE_OFFSET_MODIFIER: + if (is_load) { + op = SVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsetsFixed; + } else { + op = SVE64BitScatterStore_ScalarPlus64BitUnscaledOffsetsFixed; + } + break; + case SVE_LSL: + if (is_load) { + op = SVE64BitGatherLoad_ScalarPlus64BitScaledOffsetsFixed; + } else { + op = SVE64BitScatterStore_ScalarPlus64BitScaledOffsetsFixed; + } + break; + case SVE_UXTW: + case SVE_SXTW: { + unsigned shift_amount = addr.GetShiftAmount(); + if (shift_amount == 0) { + if (is_load) { + op = + SVE64BitGatherLoad_ScalarPlusUnpacked32BitUnscaledOffsetsFixed; + } else { + op = + SVE64BitScatterStore_ScalarPlusUnpacked32BitUnscaledOffsetsFixed; + } + } else { + VIXL_ASSERT(shift_amount == msize_in_bytes_log2); + if (is_load) { + op = SVE64BitGatherLoad_ScalarPlus32BitUnpackedScaledOffsetsFixed; + } else { + op = + SVE64BitScatterStore_ScalarPlusUnpacked32BitScaledOffsetsFixed; + } + } + break; + } + default: + VIXL_UNIMPLEMENTED(); + } + } + } + + Instr mem_op = SVEMemOperandHelper(msize_in_bytes_log2, 1, addr, is_load); + Instr msz = ImmUnsignedField<24, 23>(msize_in_bytes_log2); + Instr u = (!is_load || is_signed) ? 0 : (1 << 14); + Instr ff = is_first_fault ? (1 << 13) : 0; + Emit(op | mem_op | msz | u | ff | Rt(zt) | PgLow8(pg)); +} + +void Assembler::SVELd234Helper(int num_regs, + const ZRegister& zt1, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + if (addr.IsScalarPlusScalar()) { + // Rm must not be xzr. + VIXL_ASSERT(!addr.GetScalarOffset().IsZero()); + } + + Instr op = 0; + if (addr.IsScalarPlusImmediate()) { + op = SVELoadMultipleStructures_ScalarPlusImmFixed; + } else if (addr.IsScalarPlusScalar()) { + op = SVELoadMultipleStructures_ScalarPlusScalarFixed; + } else { + // These instructions don't support any other addressing modes. + VIXL_ABORT(); + } + SVELdSt234Helper(num_regs, zt1, pg, addr, op); +} + +// SVEMemContiguousLoad. + +#define VIXL_DEFINE_LD1(MSZ, LANE_SIZE) \ + void Assembler::ld1##MSZ(const ZRegister& zt, \ + const PRegisterZ& pg, \ + const SVEMemOperand& addr) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); \ + SVELd1Helper(k##LANE_SIZE##RegSizeInBytesLog2, zt, pg, addr, false); \ + } +#define VIXL_DEFINE_LD2(MSZ, LANE_SIZE) \ + void Assembler::ld2##MSZ(const ZRegister& zt1, \ + const ZRegister& zt2, \ + const PRegisterZ& pg, \ + const SVEMemOperand& addr) { \ + USE(zt2); \ + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); \ + VIXL_ASSERT(AreConsecutive(zt1, zt2)); \ + VIXL_ASSERT(AreSameFormat(zt1, zt2)); \ + VIXL_ASSERT(zt1.IsLaneSize##LANE_SIZE()); \ + SVELd234Helper(2, zt1, pg, addr); \ + } +#define VIXL_DEFINE_LD3(MSZ, LANE_SIZE) \ + void Assembler::ld3##MSZ(const ZRegister& zt1, \ + const ZRegister& zt2, \ + const ZRegister& zt3, \ + const PRegisterZ& pg, \ + const SVEMemOperand& addr) { \ + USE(zt2, zt3); \ + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); \ + VIXL_ASSERT(AreConsecutive(zt1, zt2, zt3)); \ + VIXL_ASSERT(AreSameFormat(zt1, zt2, zt3)); \ + VIXL_ASSERT(zt1.IsLaneSize##LANE_SIZE()); \ + SVELd234Helper(3, zt1, pg, addr); \ + } +#define VIXL_DEFINE_LD4(MSZ, LANE_SIZE) \ + void Assembler::ld4##MSZ(const ZRegister& zt1, \ + const ZRegister& zt2, \ + const ZRegister& zt3, \ + const ZRegister& zt4, \ + const PRegisterZ& pg, \ + const SVEMemOperand& addr) { \ + USE(zt2, zt3, zt4); \ + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); \ + VIXL_ASSERT(AreConsecutive(zt1, zt2, zt3, zt4)); \ + VIXL_ASSERT(AreSameFormat(zt1, zt2, zt3, zt4)); \ + VIXL_ASSERT(zt1.IsLaneSize##LANE_SIZE()); \ + SVELd234Helper(4, zt1, pg, addr); \ + } + +VIXL_SVE_LOAD_STORE_VARIANT_LIST(VIXL_DEFINE_LD1) +VIXL_SVE_LOAD_STORE_VARIANT_LIST(VIXL_DEFINE_LD2) +VIXL_SVE_LOAD_STORE_VARIANT_LIST(VIXL_DEFINE_LD3) +VIXL_SVE_LOAD_STORE_VARIANT_LIST(VIXL_DEFINE_LD4) + +#define VIXL_DEFINE_LD1S(MSZ, LANE_SIZE) \ + void Assembler::ld1s##MSZ(const ZRegister& zt, \ + const PRegisterZ& pg, \ + const SVEMemOperand& addr) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); \ + SVELd1Helper(k##LANE_SIZE##RegSizeInBytesLog2, zt, pg, addr, true); \ + } +VIXL_SVE_LOAD_STORE_SIGNED_VARIANT_LIST(VIXL_DEFINE_LD1S) + +// SVEMem32BitGatherAndUnsizedContiguous. + +void Assembler::SVELd1BroadcastHelper(unsigned msize_in_bytes_log2, + const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr, + bool is_signed) { + VIXL_ASSERT(addr.IsScalarPlusImmediate()); + VIXL_ASSERT(zt.GetLaneSizeInBytesLog2() >= msize_in_bytes_log2); + if (is_signed) { + // Sign-extension is only possible when the vector elements are larger than + // the elements in memory. + VIXL_ASSERT(zt.GetLaneSizeInBytesLog2() != msize_in_bytes_log2); + } + + int64_t imm = addr.GetImmediateOffset(); + int divisor = 1 << msize_in_bytes_log2; + VIXL_ASSERT(imm % divisor == 0); + Instr dtype = SVEDtypeSplit(msize_in_bytes_log2, + zt.GetLaneSizeInBytesLog2(), + is_signed); + + Emit(SVELoadAndBroadcastElementFixed | dtype | RnSP(addr.GetScalarBase()) | + ImmUnsignedField<21, 16>(imm / divisor) | Rt(zt) | PgLow8(pg)); +} + +// This prototype maps to 4 instruction encodings: +// LD1RB_z_p_bi_u16 +// LD1RB_z_p_bi_u32 +// LD1RB_z_p_bi_u64 +// LD1RB_z_p_bi_u8 +void Assembler::ld1rb(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + SVELd1BroadcastHelper(kBRegSizeInBytesLog2, zt, pg, addr, false); +} + +// This prototype maps to 3 instruction encodings: +// LD1RH_z_p_bi_u16 +// LD1RH_z_p_bi_u32 +// LD1RH_z_p_bi_u64 +void Assembler::ld1rh(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + SVELd1BroadcastHelper(kHRegSizeInBytesLog2, zt, pg, addr, false); +} + +// This prototype maps to 2 instruction encodings: +// LD1RW_z_p_bi_u32 +// LD1RW_z_p_bi_u64 +void Assembler::ld1rw(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + SVELd1BroadcastHelper(kSRegSizeInBytesLog2, zt, pg, addr, false); +} + +void Assembler::ld1rd(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + SVELd1BroadcastHelper(kDRegSizeInBytesLog2, zt, pg, addr, false); +} + +// This prototype maps to 3 instruction encodings: +// LD1RSB_z_p_bi_s16 +// LD1RSB_z_p_bi_s32 +// LD1RSB_z_p_bi_s64 +void Assembler::ld1rsb(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + SVELd1BroadcastHelper(kBRegSizeInBytesLog2, zt, pg, addr, true); +} + +// This prototype maps to 2 instruction encodings: +// LD1RSH_z_p_bi_s32 +// LD1RSH_z_p_bi_s64 +void Assembler::ld1rsh(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + SVELd1BroadcastHelper(kHRegSizeInBytesLog2, zt, pg, addr, true); +} + +void Assembler::ld1rsw(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + SVELd1BroadcastHelper(kWRegSizeInBytesLog2, zt, pg, addr, true); +} + +void Assembler::ldr(const CPURegister& rt, const SVEMemOperand& addr) { + // LDR , [{, #, MUL VL}] + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(rt.IsPRegister() || rt.IsZRegister()); + VIXL_ASSERT(addr.IsPlainScalar() || + (addr.IsScalarPlusImmediate() && + (addr.GetOffsetModifier() == SVE_MUL_VL))); + int64_t imm9 = addr.GetImmediateOffset(); + VIXL_ASSERT(IsInt9(imm9)); + Instr imm9l = ExtractUnsignedBitfield32(2, 0, imm9) << 10; + Instr imm9h = ExtractUnsignedBitfield32(8, 3, imm9) << 16; + + Instr op = LDR_z_bi; + if (rt.IsPRegister()) { + op = LDR_p_bi; + } + Emit(op | Rt(rt) | RnSP(addr.GetScalarBase()) | imm9h | imm9l); +} + +// SVEMem64BitGather. + +// This prototype maps to 3 instruction encodings: +// LDFF1B_z_p_bz_d_64_unscaled +// LDFF1B_z_p_bz_d_x32_unscaled +void Assembler::ldff1b(const ZRegister& zt, + const PRegisterZ& pg, + const Register& xn, + const ZRegister& zm) { + // LDFF1B { .D }, /Z, [, .D] + // 1100 0100 010. .... 111. .... .... .... + // msz<24:23> = 00 | Zm<20:16> | U<14> = 1 | ff<13> = 1 | Pg<12:10> | Rn<9:5> + // | Zt<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Emit(LDFF1B_z_p_bz_d_64_unscaled | Rt(zt) | PgLow8(pg) | RnSP(xn) | Rm(zm)); +} + +// This prototype maps to 2 instruction encodings: +// LDFF1B_z_p_ai_d +// LDFF1B_z_p_ai_s +void Assembler::ldff1b(const ZRegister& zt, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5) { + // LDFF1B { .D }, /Z, [.D{, #}] + // 1100 0100 001. .... 111. .... .... .... + // msz<24:23> = 00 | imm5<20:16> | U<14> = 1 | ff<13> = 1 | Pg<12:10> | + // Zn<9:5> | Zt<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Emit(LDFF1B_z_p_ai_d | Rt(zt) | PgLow8(pg) | Rn(zn) | ImmField<20, 16>(imm5)); +} + +// This prototype maps to 4 instruction encodings: +// LDFF1D_z_p_bz_d_64_scaled +// LDFF1D_z_p_bz_d_64_unscaled +// LDFF1D_z_p_bz_d_x32_scaled +// LDFF1D_z_p_bz_d_x32_unscaled +void Assembler::ldff1d(const ZRegister& zt, + const PRegisterZ& pg, + const Register& xn, + const ZRegister& zm) { + // LDFF1D { .D }, /Z, [, .D, LSL #3] + // 1100 0101 111. .... 111. .... .... .... + // msz<24:23> = 11 | Zm<20:16> | U<14> = 1 | ff<13> = 1 | Pg<12:10> | Rn<9:5> + // | Zt<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Emit(LDFF1D_z_p_bz_d_64_scaled | Rt(zt) | PgLow8(pg) | RnSP(xn) | Rm(zm)); +} + +void Assembler::ldff1d(const ZRegister& zt, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5) { + // LDFF1D { .D }, /Z, [.D{, #}] + // 1100 0101 101. .... 111. .... .... .... + // msz<24:23> = 11 | imm5<20:16> | U<14> = 1 | ff<13> = 1 | Pg<12:10> | + // Zn<9:5> | Zt<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Emit(LDFF1D_z_p_ai_d | Rt(zt) | PgLow8(pg) | Rn(zn) | ImmField<20, 16>(imm5)); +} + +// This prototype maps to 6 instruction encodings: +// LDFF1H_z_p_bz_d_64_scaled +// LDFF1H_z_p_bz_d_64_unscaled +// LDFF1H_z_p_bz_d_x32_scaled +// LDFF1H_z_p_bz_d_x32_unscaled +void Assembler::ldff1h(const ZRegister& zt, + const PRegisterZ& pg, + const Register& xn, + const ZRegister& zm) { + // LDFF1H { .D }, /Z, [, .D, LSL #1] + // 1100 0100 111. .... 111. .... .... .... + // msz<24:23> = 01 | Zm<20:16> | U<14> = 1 | ff<13> = 1 | Pg<12:10> | Rn<9:5> + // | Zt<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Emit(LDFF1H_z_p_bz_d_64_scaled | Rt(zt) | PgLow8(pg) | RnSP(xn) | Rm(zm)); +} + +// This prototype maps to 2 instruction encodings: +// LDFF1H_z_p_ai_d +// LDFF1H_z_p_ai_s +void Assembler::ldff1h(const ZRegister& zt, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5) { + // LDFF1H { .D }, /Z, [.D{, #}] + // 1100 0100 101. .... 111. .... .... .... + // msz<24:23> = 01 | imm5<20:16> | U<14> = 1 | ff<13> = 1 | Pg<12:10> | + // Zn<9:5> | Zt<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Emit(LDFF1H_z_p_ai_d | Rt(zt) | PgLow8(pg) | Rn(zn) | ImmField<20, 16>(imm5)); +} + +// This prototype maps to 3 instruction encodings: +// LDFF1SB_z_p_bz_d_64_unscaled +// LDFF1SB_z_p_bz_d_x32_unscaled +void Assembler::ldff1sb(const ZRegister& zt, + const PRegisterZ& pg, + const Register& xn, + const ZRegister& zm) { + // LDFF1SB { .D }, /Z, [, .D] + // 1100 0100 010. .... 101. .... .... .... + // msz<24:23> = 00 | Zm<20:16> | U<14> = 0 | ff<13> = 1 | Pg<12:10> | Rn<9:5> + // | Zt<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Emit(LDFF1SB_z_p_bz_d_64_unscaled | Rt(zt) | PgLow8(pg) | RnSP(xn) | Rm(zm)); +} + +// This prototype maps to 2 instruction encodings: +// LDFF1SB_z_p_ai_d +// LDFF1SB_z_p_ai_s +void Assembler::ldff1sb(const ZRegister& zt, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5) { + // LDFF1SB { .D }, /Z, [.D{, #}] + // 1100 0100 001. .... 101. .... .... .... + // msz<24:23> = 00 | imm5<20:16> | U<14> = 0 | ff<13> = 1 | Pg<12:10> | + // Zn<9:5> | Zt<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Emit(LDFF1SB_z_p_ai_d | Rt(zt) | PgLow8(pg) | Rn(zn) | + ImmField<20, 16>(imm5)); +} + +// This prototype maps to 6 instruction encodings: +// LDFF1SH_z_p_bz_d_64_scaled +// LDFF1SH_z_p_bz_d_64_unscaled +// LDFF1SH_z_p_bz_d_x32_scaled +// LDFF1SH_z_p_bz_d_x32_unscaled +void Assembler::ldff1sh(const ZRegister& zt, + const PRegisterZ& pg, + const Register& xn, + const ZRegister& zm) { + // LDFF1SH { .D }, /Z, [, .D, LSL #1] + // 1100 0100 111. .... 101. .... .... .... + // msz<24:23> = 01 | Zm<20:16> | U<14> = 0 | ff<13> = 1 | Pg<12:10> | Rn<9:5> + // | Zt<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Emit(LDFF1SH_z_p_bz_d_64_scaled | Rt(zt) | PgLow8(pg) | RnSP(xn) | Rm(zm)); +} + +// This prototype maps to 2 instruction encodings: +// LDFF1SH_z_p_ai_d +// LDFF1SH_z_p_ai_s +void Assembler::ldff1sh(const ZRegister& zt, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5) { + // LDFF1SH { .D }, /Z, [.D{, #}] + // 1100 0100 101. .... 101. .... .... .... + // msz<24:23> = 01 | imm5<20:16> | U<14> = 0 | ff<13> = 1 | Pg<12:10> | + // Zn<9:5> | Zt<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Emit(LDFF1SH_z_p_ai_d | Rt(zt) | PgLow8(pg) | Rn(zn) | + ImmField<20, 16>(imm5)); +} + +// This prototype maps to 4 instruction encodings: +// LDFF1SW_z_p_bz_d_64_scaled +// LDFF1SW_z_p_bz_d_64_unscaled +// LDFF1SW_z_p_bz_d_x32_scaled +// LDFF1SW_z_p_bz_d_x32_unscaled +void Assembler::ldff1sw(const ZRegister& zt, + const PRegisterZ& pg, + const Register& xn, + const ZRegister& zm) { + // LDFF1SW { .D }, /Z, [, .D, LSL #2] + // 1100 0101 011. .... 101. .... .... .... + // msz<24:23> = 10 | Zm<20:16> | U<14> = 0 | ff<13> = 1 | Pg<12:10> | Rn<9:5> + // | Zt<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Emit(LDFF1SW_z_p_bz_d_64_scaled | Rt(zt) | PgLow8(pg) | RnSP(xn) | Rm(zm)); +} + +void Assembler::ldff1sw(const ZRegister& zt, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5) { + // LDFF1SW { .D }, /Z, [.D{, #}] + // 1100 0101 001. .... 101. .... .... .... + // msz<24:23> = 10 | imm5<20:16> | U<14> = 0 | ff<13> = 1 | Pg<12:10> | + // Zn<9:5> | Zt<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Emit(LDFF1SW_z_p_ai_d | Rt(zt) | PgLow8(pg) | Rn(zn) | + ImmField<20, 16>(imm5)); +} + +// This prototype maps to 6 instruction encodings: +// LDFF1W_z_p_bz_d_64_scaled +// LDFF1W_z_p_bz_d_64_unscaled +// LDFF1W_z_p_bz_d_x32_scaled +// LDFF1W_z_p_bz_d_x32_unscaled +void Assembler::ldff1w(const ZRegister& zt, + const PRegisterZ& pg, + const Register& xn, + const ZRegister& zm) { + // LDFF1W { .D }, /Z, [, .D, LSL #2] + // 1100 0101 011. .... 111. .... .... .... + // msz<24:23> = 10 | Zm<20:16> | U<14> = 1 | ff<13> = 1 | Pg<12:10> | Rn<9:5> + // | Zt<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Emit(LDFF1W_z_p_bz_d_64_scaled | Rt(zt) | PgLow8(pg) | RnSP(xn) | Rm(zm)); +} + +// This prototype maps to 2 instruction encodings: +// LDFF1W_z_p_ai_d +// LDFF1W_z_p_ai_s +void Assembler::ldff1w(const ZRegister& zt, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5) { + // LDFF1W { .D }, /Z, [.D{, #}] + // 1100 0101 001. .... 111. .... .... .... + // msz<24:23> = 10 | imm5<20:16> | U<14> = 1 | ff<13> = 1 | Pg<12:10> | + // Zn<9:5> | Zt<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Emit(LDFF1W_z_p_ai_d | Rt(zt) | PgLow8(pg) | Rn(zn) | ImmField<20, 16>(imm5)); +} + +void Assembler::SVEGatherPrefetchVectorPlusImmediateHelper( + PrefetchOperation prfop, + const PRegister& pg, + const SVEMemOperand& addr, + int prefetch_size) { + VIXL_ASSERT(addr.IsVectorPlusImmediate()); + ZRegister zn = addr.GetVectorBase(); + VIXL_ASSERT(zn.IsLaneSizeS() || zn.IsLaneSizeD()); + + Instr op = 0xffffffff; + switch (prefetch_size) { + case kBRegSize: + op = zn.IsLaneSizeS() ? static_cast(PRFB_i_p_ai_s) + : static_cast(PRFB_i_p_ai_d); + break; + case kHRegSize: + op = zn.IsLaneSizeS() ? static_cast(PRFH_i_p_ai_s) + : static_cast(PRFH_i_p_ai_d); + break; + case kSRegSize: + op = zn.IsLaneSizeS() ? static_cast(PRFW_i_p_ai_s) + : static_cast(PRFW_i_p_ai_d); + break; + case kDRegSize: + op = zn.IsLaneSizeS() ? static_cast(PRFD_i_p_ai_s) + : static_cast(PRFD_i_p_ai_d); + break; + default: + VIXL_UNIMPLEMENTED(); + break; + } + + int64_t imm5 = addr.GetImmediateOffset(); + Emit(op | SVEImmPrefetchOperation(prfop) | PgLow8(pg) | Rn(zn) | + ImmUnsignedField<20, 16>(imm5)); +} + +void Assembler::SVEGatherPrefetchScalarPlusImmediateHelper( + PrefetchOperation prfop, + const PRegister& pg, + const SVEMemOperand& addr, + int prefetch_size) { + VIXL_ASSERT(addr.IsScalarPlusImmediate()); + int64_t imm6 = addr.GetImmediateOffset(); + + Instr op = 0xffffffff; + switch (prefetch_size) { + case kBRegSize: + op = PRFB_i_p_bi_s; + break; + case kHRegSize: + op = PRFH_i_p_bi_s; + break; + case kSRegSize: + op = PRFW_i_p_bi_s; + break; + case kDRegSize: + op = PRFD_i_p_bi_s; + break; + default: + VIXL_UNIMPLEMENTED(); + break; + } + + Emit(op | SVEImmPrefetchOperation(prfop) | PgLow8(pg) | + RnSP(addr.GetScalarBase()) | ImmField<21, 16>(imm6)); +} + +void Assembler::SVEContiguousPrefetchScalarPlusScalarHelper( + PrefetchOperation prfop, + const PRegister& pg, + const SVEMemOperand& addr, + int prefetch_size) { + VIXL_ASSERT(addr.IsScalarPlusScalar()); + Instr op = 0xffffffff; + + switch (prefetch_size) { + case kBRegSize: + VIXL_ASSERT(addr.GetOffsetModifier() == NO_SVE_OFFSET_MODIFIER); + op = PRFB_i_p_br_s; + break; + case kHRegSize: + VIXL_ASSERT(addr.GetOffsetModifier() == SVE_LSL); + VIXL_ASSERT(addr.GetShiftAmount() == kHRegSizeInBytesLog2); + op = PRFH_i_p_br_s; + break; + case kSRegSize: + VIXL_ASSERT(addr.GetOffsetModifier() == SVE_LSL); + VIXL_ASSERT(addr.GetShiftAmount() == kSRegSizeInBytesLog2); + op = PRFW_i_p_br_s; + break; + case kDRegSize: + VIXL_ASSERT(addr.GetOffsetModifier() == SVE_LSL); + VIXL_ASSERT(addr.GetShiftAmount() == kDRegSizeInBytesLog2); + op = PRFD_i_p_br_s; + break; + default: + VIXL_UNIMPLEMENTED(); + break; + } + + VIXL_ASSERT(!addr.GetScalarOffset().IsZero()); + Emit(op | SVEImmPrefetchOperation(prfop) | PgLow8(pg) | + RnSP(addr.GetScalarBase()) | Rm(addr.GetScalarOffset())); +} + +void Assembler::SVEContiguousPrefetchScalarPlusVectorHelper( + PrefetchOperation prfop, + const PRegister& pg, + const SVEMemOperand& addr, + int prefetch_size) { + VIXL_ASSERT(addr.IsScalarPlusVector()); + ZRegister zm = addr.GetVectorOffset(); + SVEOffsetModifier mod = addr.GetOffsetModifier(); + + // All prefetch scalar-plus-vector addressing modes use a shift corresponding + // to the element size. + switch (prefetch_size) { + case kBRegSize: + VIXL_ASSERT(addr.GetShiftAmount() == kBRegSizeInBytesLog2); + break; + case kHRegSize: + VIXL_ASSERT(addr.GetShiftAmount() == kHRegSizeInBytesLog2); + break; + case kSRegSize: + VIXL_ASSERT(addr.GetShiftAmount() == kSRegSizeInBytesLog2); + break; + case kDRegSize: + VIXL_ASSERT(addr.GetShiftAmount() == kDRegSizeInBytesLog2); + break; + default: + VIXL_UNIMPLEMENTED(); + break; + } + + Instr sx = 0; + Instr op = 0xffffffff; + if ((mod == NO_SVE_OFFSET_MODIFIER) || (mod == SVE_LSL)) { + VIXL_ASSERT(zm.IsLaneSizeD()); + + switch (prefetch_size) { + case kBRegSize: + VIXL_ASSERT(mod == NO_SVE_OFFSET_MODIFIER); + op = PRFB_i_p_bz_d_64_scaled; + break; + case kHRegSize: + VIXL_ASSERT(mod == SVE_LSL); + op = PRFH_i_p_bz_d_64_scaled; + break; + case kSRegSize: + VIXL_ASSERT(mod == SVE_LSL); + op = PRFW_i_p_bz_d_64_scaled; + break; + case kDRegSize: + VIXL_ASSERT(mod == SVE_LSL); + op = PRFD_i_p_bz_d_64_scaled; + break; + default: + VIXL_UNIMPLEMENTED(); + break; + } + } else { + VIXL_ASSERT((mod == SVE_SXTW) || (mod == SVE_UXTW)); + VIXL_ASSERT(zm.IsLaneSizeS() || zm.IsLaneSizeD()); + + switch (prefetch_size) { + case kBRegSize: + op = zm.IsLaneSizeS() ? static_cast(PRFB_i_p_bz_s_x32_scaled) + : static_cast(PRFB_i_p_bz_d_x32_scaled); + break; + case kHRegSize: + op = zm.IsLaneSizeS() ? static_cast(PRFH_i_p_bz_s_x32_scaled) + : static_cast(PRFH_i_p_bz_d_x32_scaled); + break; + case kSRegSize: + op = zm.IsLaneSizeS() ? static_cast(PRFW_i_p_bz_s_x32_scaled) + : static_cast(PRFW_i_p_bz_d_x32_scaled); + break; + case kDRegSize: + op = zm.IsLaneSizeS() ? static_cast(PRFD_i_p_bz_s_x32_scaled) + : static_cast(PRFD_i_p_bz_d_x32_scaled); + break; + default: + VIXL_UNIMPLEMENTED(); + break; + } + + if (mod == SVE_SXTW) { + sx = 1 << 22; + } + } + + Emit(op | SVEImmPrefetchOperation(prfop) | PgLow8(pg) | sx | + RnSP(addr.GetScalarBase()) | Rm(zm)); +} + +void Assembler::SVEPrefetchHelper(PrefetchOperation prfop, + const PRegister& pg, + const SVEMemOperand& addr, + int prefetch_size) { + if (addr.IsVectorPlusImmediate()) { + // For example: + // [z0.s, #0] + SVEGatherPrefetchVectorPlusImmediateHelper(prfop, pg, addr, prefetch_size); + + } else if (addr.IsScalarPlusImmediate()) { + // For example: + // [x0, #42, mul vl] + SVEGatherPrefetchScalarPlusImmediateHelper(prfop, pg, addr, prefetch_size); + + } else if (addr.IsScalarPlusVector()) { + // For example: + // [x0, z0.s, sxtw] + SVEContiguousPrefetchScalarPlusVectorHelper(prfop, pg, addr, prefetch_size); + + } else if (addr.IsScalarPlusScalar()) { + // For example: + // [x0, x1] + SVEContiguousPrefetchScalarPlusScalarHelper(prfop, pg, addr, prefetch_size); + + } else { + VIXL_UNIMPLEMENTED(); + } +} + +void Assembler::prfb(PrefetchOperation prfop, + const PRegister& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + SVEPrefetchHelper(prfop, pg, addr, kBRegSize); +} + +void Assembler::prfd(PrefetchOperation prfop, + const PRegister& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + SVEPrefetchHelper(prfop, pg, addr, kDRegSize); +} + +void Assembler::prfh(PrefetchOperation prfop, + const PRegister& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + SVEPrefetchHelper(prfop, pg, addr, kHRegSize); +} + +void Assembler::prfw(PrefetchOperation prfop, + const PRegister& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + SVEPrefetchHelper(prfop, pg, addr, kSRegSize); +} + +void Assembler::SVELd1St1ScaImmHelper(const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr, + Instr regoffset_op, + Instr immoffset_op, + int imm_divisor) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(addr.IsScalarPlusScalar() || addr.IsScalarPlusImmediate()); + + Instr op; + if (addr.IsScalarPlusScalar()) { + op = regoffset_op | Rm(addr.GetScalarOffset()); + } else { + int64_t imm = addr.GetImmediateOffset(); + VIXL_ASSERT(((imm % imm_divisor) == 0) && IsInt4(imm / imm_divisor)); + op = immoffset_op | ImmField<19, 16>(imm / imm_divisor); + } + Emit(op | Rt(zt) | PgLow8(pg) | RnSP(addr.GetScalarBase())); +} + +void Assembler::ld1rqb(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(addr.IsScalarPlusImmediate() || addr.IsEquivalentToLSL(0)); + VIXL_ASSERT(zt.IsLaneSizeB()); + SVELd1St1ScaImmHelper(zt, + pg, + addr, + LD1RQB_z_p_br_contiguous, + LD1RQB_z_p_bi_u8, + 16); +} + +void Assembler::ld1rqd(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(addr.IsScalarPlusImmediate() || addr.IsEquivalentToLSL(3)); + VIXL_ASSERT(zt.IsLaneSizeD()); + SVELd1St1ScaImmHelper(zt, + pg, + addr, + LD1RQD_z_p_br_contiguous, + LD1RQD_z_p_bi_u64, + 16); +} + +void Assembler::ld1rqh(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(addr.IsScalarPlusImmediate() || addr.IsEquivalentToLSL(1)); + VIXL_ASSERT(zt.IsLaneSizeH()); + SVELd1St1ScaImmHelper(zt, + pg, + addr, + LD1RQH_z_p_br_contiguous, + LD1RQH_z_p_bi_u16, + 16); +} + +void Assembler::ld1rqw(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(addr.IsScalarPlusImmediate() || addr.IsEquivalentToLSL(2)); + VIXL_ASSERT(zt.IsLaneSizeS()); + SVELd1St1ScaImmHelper(zt, + pg, + addr, + LD1RQW_z_p_br_contiguous, + LD1RQW_z_p_bi_u32, + 16); +} + +#define VIXL_DEFINE_LDFF1(MSZ, LANE_SIZE) \ + void Assembler::ldff1##MSZ(const ZRegister& zt, \ + const PRegisterZ& pg, \ + const SVEMemOperand& addr) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); \ + SVELdff1Helper(k##LANE_SIZE##RegSizeInBytesLog2, zt, pg, addr, false); \ + } +VIXL_SVE_LOAD_STORE_VARIANT_LIST(VIXL_DEFINE_LDFF1) + +#define VIXL_DEFINE_LDFF1S(MSZ, LANE_SIZE) \ + void Assembler::ldff1s##MSZ(const ZRegister& zt, \ + const PRegisterZ& pg, \ + const SVEMemOperand& addr) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); \ + SVELdff1Helper(k##LANE_SIZE##RegSizeInBytesLog2, zt, pg, addr, true); \ + } +VIXL_SVE_LOAD_STORE_SIGNED_VARIANT_LIST(VIXL_DEFINE_LDFF1S) + +void Assembler::ldnf1b(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(addr.IsPlainRegister() || + (addr.IsScalarPlusImmediate() && + (addr.GetOffsetModifier() == SVE_MUL_VL))); + + SVELdSt1Helper(0, + zt, + pg, + addr, + /* is_signed = */ false, + SVEContiguousNonFaultLoad_ScalarPlusImmFixed); +} + +void Assembler::ldnf1d(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(addr.IsPlainRegister() || + (addr.IsScalarPlusImmediate() && + (addr.GetOffsetModifier() == SVE_MUL_VL))); + + SVELdSt1Helper(3, + zt, + pg, + addr, + /* is_signed = */ false, + SVEContiguousNonFaultLoad_ScalarPlusImmFixed); +} + +void Assembler::ldnf1h(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(addr.IsPlainRegister() || + (addr.IsScalarPlusImmediate() && + (addr.GetOffsetModifier() == SVE_MUL_VL))); + + SVELdSt1Helper(1, + zt, + pg, + addr, + /* is_signed = */ false, + SVEContiguousNonFaultLoad_ScalarPlusImmFixed); +} + +void Assembler::ldnf1sb(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(addr.IsPlainRegister() || + (addr.IsScalarPlusImmediate() && + (addr.GetOffsetModifier() == SVE_MUL_VL))); + + SVELdSt1Helper(0, + zt, + pg, + addr, + /* is_signed = */ true, + SVEContiguousNonFaultLoad_ScalarPlusImmFixed); +} + +void Assembler::ldnf1sh(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(addr.IsPlainRegister() || + (addr.IsScalarPlusImmediate() && + (addr.GetOffsetModifier() == SVE_MUL_VL))); + + SVELdSt1Helper(1, + zt, + pg, + addr, + /* is_signed = */ true, + SVEContiguousNonFaultLoad_ScalarPlusImmFixed); +} + +void Assembler::ldnf1sw(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(addr.IsPlainRegister() || + (addr.IsScalarPlusImmediate() && + (addr.GetOffsetModifier() == SVE_MUL_VL))); + + SVELdSt1Helper(2, + zt, + pg, + addr, + /* is_signed = */ true, + SVEContiguousNonFaultLoad_ScalarPlusImmFixed); +} + +void Assembler::ldnf1w(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(addr.IsPlainRegister() || + (addr.IsScalarPlusImmediate() && + (addr.GetOffsetModifier() == SVE_MUL_VL))); + + SVELdSt1Helper(2, + zt, + pg, + addr, + /* is_signed = */ false, + SVEContiguousNonFaultLoad_ScalarPlusImmFixed); +} + +void Assembler::ldnt1b(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(addr.IsPlainScalar() || + (addr.IsScalarPlusImmediate() && addr.IsMulVl()) || + (addr.IsScalarPlusScalar() && addr.IsEquivalentToLSL(0))); + SVELd1St1ScaImmHelper(zt, + pg, + addr, + LDNT1B_z_p_br_contiguous, + LDNT1B_z_p_bi_contiguous); +} + +void Assembler::ldnt1d(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(addr.IsPlainScalar() || + (addr.IsScalarPlusImmediate() && addr.IsMulVl()) || + (addr.IsScalarPlusScalar() && addr.IsEquivalentToLSL(3))); + SVELd1St1ScaImmHelper(zt, + pg, + addr, + LDNT1D_z_p_br_contiguous, + LDNT1D_z_p_bi_contiguous); +} + +void Assembler::ldnt1h(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(addr.IsPlainScalar() || + (addr.IsScalarPlusImmediate() && addr.IsMulVl()) || + (addr.IsScalarPlusScalar() && addr.IsEquivalentToLSL(1))); + SVELd1St1ScaImmHelper(zt, + pg, + addr, + LDNT1H_z_p_br_contiguous, + LDNT1H_z_p_bi_contiguous); +} + +void Assembler::ldnt1w(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(addr.IsPlainScalar() || + (addr.IsScalarPlusImmediate() && addr.IsMulVl()) || + (addr.IsScalarPlusScalar() && addr.IsEquivalentToLSL(2))); + SVELd1St1ScaImmHelper(zt, + pg, + addr, + LDNT1W_z_p_br_contiguous, + LDNT1W_z_p_bi_contiguous); +} + +Instr Assembler::SVEMemOperandHelper(unsigned msize_in_bytes_log2, + int num_regs, + const SVEMemOperand& addr, + bool is_load) { + VIXL_ASSERT((num_regs >= 1) && (num_regs <= 4)); + + Instr op = 0xfffffff; + if (addr.IsScalarPlusImmediate()) { + VIXL_ASSERT((addr.GetImmediateOffset() == 0) || addr.IsMulVl()); + int64_t imm = addr.GetImmediateOffset(); + VIXL_ASSERT((imm % num_regs) == 0); + op = RnSP(addr.GetScalarBase()) | ImmField<19, 16>(imm / num_regs); + + } else if (addr.IsScalarPlusScalar()) { + VIXL_ASSERT(addr.GetScalarOffset().IsZero() || + addr.IsEquivalentToLSL(msize_in_bytes_log2)); + op = RnSP(addr.GetScalarBase()) | Rm(addr.GetScalarOffset()); + + } else if (addr.IsVectorPlusImmediate()) { + ZRegister zn = addr.GetVectorBase(); + uint64_t imm = addr.GetImmediateOffset(); + VIXL_ASSERT(num_regs == 1); + VIXL_ASSERT(zn.IsLaneSizeS() || zn.IsLaneSizeD()); + VIXL_ASSERT(IsMultiple(imm, (1 << msize_in_bytes_log2))); + op = Rn(zn) | ImmUnsignedField<20, 16>(imm >> msize_in_bytes_log2); + + } else if (addr.IsScalarPlusVector()) { + // We have to support several different addressing modes. Some instructions + // support a subset of these, but the SVEMemOperand encoding is consistent. + Register xn = addr.GetScalarBase(); + ZRegister zm = addr.GetVectorOffset(); + SVEOffsetModifier mod = addr.GetOffsetModifier(); + Instr modifier_bit = 1 << (is_load ? 22 : 14); + Instr xs = (mod == SVE_SXTW) ? modifier_bit : 0; + VIXL_ASSERT(num_regs == 1); + + if (mod == SVE_LSL) { + // 64-bit scaled offset: [, .D, LSL #] + VIXL_ASSERT(zm.IsLaneSizeD()); + VIXL_ASSERT(addr.GetShiftAmount() == msize_in_bytes_log2); + } else if (mod == NO_SVE_OFFSET_MODIFIER) { + // 64-bit unscaled offset: [, .D] + VIXL_ASSERT(zm.IsLaneSizeD()); + VIXL_ASSERT(addr.GetShiftAmount() == 0); + } else { + // 32-bit scaled offset: [, .S, #] + // 32-bit unscaled offset: [, .S, ] + // 32-bit unpacked scaled offset: [, .D, #] + // 32-bit unpacked unscaled offset: [, .D, ] + VIXL_ASSERT(zm.IsLaneSizeS() || zm.IsLaneSizeD()); + VIXL_ASSERT((mod == SVE_SXTW) || (mod == SVE_UXTW)); + VIXL_ASSERT((addr.GetShiftAmount() == 0) || + (addr.GetShiftAmount() == msize_in_bytes_log2)); + } + + // The form itself is encoded in the instruction opcode. + op = RnSP(xn) | Rm(zm) | xs; + } else { + VIXL_UNIMPLEMENTED(); + } + + return op; +} + +// SVEMemStore. + +void Assembler::SVESt1Helper(unsigned msize_in_bytes_log2, + const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr) { + if (addr.IsScalarPlusScalar()) { + // Rm must not be xzr. + VIXL_ASSERT(!addr.GetScalarOffset().IsZero()); + } + + if (addr.IsScatterGather()) { + bool is_load = false; + bool is_signed = false; + bool is_ff = false; + SVEScatterGatherHelper(msize_in_bytes_log2, + zt, + pg, + addr, + is_load, + is_signed, + is_ff); + return; + } + + Instr op; + if (addr.IsScalarPlusImmediate()) { + op = SVEContiguousStore_ScalarPlusImmFixed; + } else if (addr.IsScalarPlusScalar()) { + op = SVEContiguousStore_ScalarPlusScalarFixed; + } else { + VIXL_UNIMPLEMENTED(); + op = 0xffffffff; + } + SVELdSt1Helper(msize_in_bytes_log2, zt, pg, addr, false, op); +} + +void Assembler::SVESt234Helper(int num_regs, + const ZRegister& zt1, + const PRegister& pg, + const SVEMemOperand& addr) { + if (addr.IsScalarPlusScalar()) { + // Rm must not be xzr. + VIXL_ASSERT(!addr.GetScalarOffset().IsZero()); + } + + Instr op = 0; + if (addr.IsScalarPlusImmediate()) { + op = SVEStoreMultipleStructures_ScalarPlusImmFixed; + } else if (addr.IsScalarPlusScalar()) { + op = SVEStoreMultipleStructures_ScalarPlusScalarFixed; + } else { + // These instructions don't support any other addressing modes. + VIXL_ABORT(); + } + SVELdSt234Helper(num_regs, zt1, pg, addr, op); +} + +#define VIXL_DEFINE_ST1(MSZ, LANE_SIZE) \ + void Assembler::st1##MSZ(const ZRegister& zt, \ + const PRegister& pg, \ + const SVEMemOperand& addr) { \ + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); \ + SVESt1Helper(k##LANE_SIZE##RegSizeInBytesLog2, zt, pg, addr); \ + } +#define VIXL_DEFINE_ST2(MSZ, LANE_SIZE) \ + void Assembler::st2##MSZ(const ZRegister& zt1, \ + const ZRegister& zt2, \ + const PRegister& pg, \ + const SVEMemOperand& addr) { \ + USE(zt2); \ + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); \ + VIXL_ASSERT(AreConsecutive(zt1, zt2)); \ + VIXL_ASSERT(AreSameFormat(zt1, zt2)); \ + VIXL_ASSERT(zt1.IsLaneSize##LANE_SIZE()); \ + SVESt234Helper(2, zt1, pg, addr); \ + } +#define VIXL_DEFINE_ST3(MSZ, LANE_SIZE) \ + void Assembler::st3##MSZ(const ZRegister& zt1, \ + const ZRegister& zt2, \ + const ZRegister& zt3, \ + const PRegister& pg, \ + const SVEMemOperand& addr) { \ + USE(zt2, zt3); \ + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); \ + VIXL_ASSERT(AreConsecutive(zt1, zt2, zt3)); \ + VIXL_ASSERT(AreSameFormat(zt1, zt2, zt3)); \ + VIXL_ASSERT(zt1.IsLaneSize##LANE_SIZE()); \ + SVESt234Helper(3, zt1, pg, addr); \ + } +#define VIXL_DEFINE_ST4(MSZ, LANE_SIZE) \ + void Assembler::st4##MSZ(const ZRegister& zt1, \ + const ZRegister& zt2, \ + const ZRegister& zt3, \ + const ZRegister& zt4, \ + const PRegister& pg, \ + const SVEMemOperand& addr) { \ + USE(zt2, zt3, zt4); \ + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); \ + VIXL_ASSERT(AreConsecutive(zt1, zt2, zt3, zt4)); \ + VIXL_ASSERT(AreSameFormat(zt1, zt2, zt3, zt4)); \ + VIXL_ASSERT(zt1.IsLaneSize##LANE_SIZE()); \ + SVESt234Helper(4, zt1, pg, addr); \ + } + +VIXL_SVE_LOAD_STORE_VARIANT_LIST(VIXL_DEFINE_ST1) +VIXL_SVE_LOAD_STORE_VARIANT_LIST(VIXL_DEFINE_ST2) +VIXL_SVE_LOAD_STORE_VARIANT_LIST(VIXL_DEFINE_ST3) +VIXL_SVE_LOAD_STORE_VARIANT_LIST(VIXL_DEFINE_ST4) + +void Assembler::stnt1b(const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(addr.IsPlainScalar() || + (addr.IsScalarPlusImmediate() && addr.IsMulVl()) || + (addr.IsScalarPlusScalar() && addr.IsEquivalentToLSL(0))); + SVELd1St1ScaImmHelper(zt, + pg, + addr, + STNT1B_z_p_br_contiguous, + STNT1B_z_p_bi_contiguous); +} + +void Assembler::stnt1d(const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(addr.IsPlainScalar() || + (addr.IsScalarPlusImmediate() && addr.IsMulVl()) || + (addr.IsScalarPlusScalar() && addr.IsEquivalentToLSL(3))); + SVELd1St1ScaImmHelper(zt, + pg, + addr, + STNT1D_z_p_br_contiguous, + STNT1D_z_p_bi_contiguous); +} + +void Assembler::stnt1h(const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(addr.IsPlainScalar() || + (addr.IsScalarPlusImmediate() && addr.IsMulVl()) || + (addr.IsScalarPlusScalar() && addr.IsEquivalentToLSL(1))); + SVELd1St1ScaImmHelper(zt, + pg, + addr, + STNT1H_z_p_br_contiguous, + STNT1H_z_p_bi_contiguous); +} + +void Assembler::stnt1w(const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(addr.IsPlainScalar() || + (addr.IsScalarPlusImmediate() && addr.IsMulVl()) || + (addr.IsScalarPlusScalar() && addr.IsEquivalentToLSL(2))); + SVELd1St1ScaImmHelper(zt, + pg, + addr, + STNT1W_z_p_br_contiguous, + STNT1W_z_p_bi_contiguous); +} + +void Assembler::str(const CPURegister& rt, const SVEMemOperand& addr) { + // STR , [{, #, MUL VL}] + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(rt.IsPRegister() || rt.IsZRegister()); + VIXL_ASSERT(addr.IsPlainScalar() || + (addr.IsScalarPlusImmediate() && + (addr.GetOffsetModifier() == SVE_MUL_VL))); + int64_t imm9 = addr.GetImmediateOffset(); + VIXL_ASSERT(IsInt9(imm9)); + Instr imm9l = ExtractUnsignedBitfield32(2, 0, imm9) << 10; + Instr imm9h = ExtractUnsignedBitfield32(8, 3, imm9) << 16; + + Instr op = STR_z_bi; + if (rt.IsPRegister()) { + op = STR_p_bi; + } + Emit(op | Rt(rt) | RnSP(addr.GetScalarBase()) | imm9h | imm9l); +} + +// SVEMulIndex. + +void Assembler::sdot(const ZRegister& zda, + const ZRegister& zn, + const ZRegister& zm, + int index) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zda.GetLaneSizeInBytes() == (zn.GetLaneSizeInBytes() * 4)); + VIXL_ASSERT(AreSameLaneSize(zn, zm)); + + Instr op = 0xffffffff; + switch (zda.GetLaneSizeInBits()) { + case kSRegSize: + VIXL_ASSERT(IsUint2(index)); + op = SDOT_z_zzzi_s | Rx<18, 16>(zm) | (index << 19) | Rd(zda) | Rn(zn); + break; + case kDRegSize: + VIXL_ASSERT(IsUint1(index)); + op = SDOT_z_zzzi_d | Rx<19, 16>(zm) | (index << 20) | Rd(zda) | Rn(zn); + break; + default: + VIXL_UNIMPLEMENTED(); + break; + } + + Emit(op); +} + +void Assembler::udot(const ZRegister& zda, + const ZRegister& zn, + const ZRegister& zm, + int index) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zda.GetLaneSizeInBytes() == (zn.GetLaneSizeInBytes() * 4)); + VIXL_ASSERT(AreSameLaneSize(zn, zm)); + + Instr op = 0xffffffff; + switch (zda.GetLaneSizeInBits()) { + case kSRegSize: + VIXL_ASSERT(IsUint2(index)); + op = UDOT_z_zzzi_s | Rx<18, 16>(zm) | (index << 19) | Rd(zda) | Rn(zn); + break; + case kDRegSize: + VIXL_ASSERT(IsUint1(index)); + op = UDOT_z_zzzi_d | Rx<19, 16>(zm) | (index << 20) | Rd(zda) | Rn(zn); + break; + default: + VIXL_UNIMPLEMENTED(); + break; + } + + Emit(op); +} + +// SVEPartitionBreak. + +void Assembler::brka(const PRegisterWithLaneSize& pd, + const PRegister& pg, + const PRegisterWithLaneSize& pn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(pg.IsMerging() || pg.IsZeroing()); + VIXL_ASSERT(pd.IsLaneSizeB() && pn.IsLaneSizeB()); + + Instr m = pg.IsMerging() ? 0x00000010 : 0x00000000; + Emit(BRKA_p_p_p | Pd(pd) | Pg<13, 10>(pg) | m | Pn(pn)); +} + +void Assembler::brkas(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(pd.IsLaneSizeB() && pn.IsLaneSizeB()); + + Emit(BRKAS_p_p_p_z | Pd(pd) | Pg<13, 10>(pg) | Pn(pn)); +} + +void Assembler::brkb(const PRegisterWithLaneSize& pd, + const PRegister& pg, + const PRegisterWithLaneSize& pn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(pg.IsMerging() || pg.IsZeroing()); + VIXL_ASSERT(pd.IsLaneSizeB() && pn.IsLaneSizeB()); + + Instr m = pg.IsMerging() ? 0x00000010 : 0x00000000; + Emit(BRKB_p_p_p | Pd(pd) | Pg<13, 10>(pg) | m | Pn(pn)); +} + +void Assembler::brkbs(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(pd.IsLaneSizeB() && pn.IsLaneSizeB()); + + Emit(BRKBS_p_p_p_z | Pd(pd) | Pg<13, 10>(pg) | Pn(pn)); +} + +void Assembler::brkn(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + USE(pm); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(pd.IsLaneSizeB() && pn.IsLaneSizeB()); + VIXL_ASSERT(pd.Is(pm)); + + Emit(BRKN_p_p_pp | Pd(pd) | Pg<13, 10>(pg) | Pn(pn)); +} + +void Assembler::brkns(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + USE(pm); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(pd.IsLaneSizeB() && pn.IsLaneSizeB()); + VIXL_ASSERT(pd.Is(pm)); + + Emit(BRKNS_p_p_pp | Pd(pd) | Pg<13, 10>(pg) | Pn(pn)); +} + +// SVEPermutePredicate. + +void Assembler::punpkhi(const PRegisterWithLaneSize& pd, + const PRegisterWithLaneSize& pn) { + // PUNPKHI .H, .B + // 0000 0101 0011 0001 0100 000. ...0 .... + // H<16> = 1 | Pn<8:5> | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(pd.IsLaneSizeH()); + VIXL_ASSERT(pn.IsLaneSizeB()); + + Emit(PUNPKHI_p_p | Pd(pd) | Pn(pn)); +} + +void Assembler::punpklo(const PRegisterWithLaneSize& pd, + const PRegisterWithLaneSize& pn) { + // PUNPKLO .H, .B + // 0000 0101 0011 0000 0100 000. ...0 .... + // H<16> = 0 | Pn<8:5> | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(pd.IsLaneSizeH()); + VIXL_ASSERT(pn.IsLaneSizeB()); + + Emit(PUNPKLO_p_p | Pd(pd) | Pn(pn)); +} + +void Assembler::rev(const PRegisterWithLaneSize& pd, + const PRegisterWithLaneSize& pn) { + // REV ., . + // 0000 0101 ..11 0100 0100 000. ...0 .... + // size<23:22> | Pn<8:5> | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(pd, pn)); + + Emit(REV_p_p | SVESize(pd) | Pd(pd) | Rx<8, 5>(pn)); +} + +void Assembler::trn1(const PRegisterWithLaneSize& pd, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + // TRN1 ., ., . + // 0000 0101 ..10 .... 0101 000. ...0 .... + // size<23:22> | Pm<19:16> | opc<12:11> = 10 | H<10> = 0 | Pn<8:5> | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(pd, pn, pm)); + + Emit(TRN1_p_pp | SVESize(pd) | Pd(pd) | Pn(pn) | Pm(pm)); +} + +void Assembler::trn2(const PRegisterWithLaneSize& pd, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + // TRN2 ., ., . + // 0000 0101 ..10 .... 0101 010. ...0 .... + // size<23:22> | Pm<19:16> | opc<12:11> = 10 | H<10> = 1 | Pn<8:5> | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(pd, pn, pm)); + + Emit(TRN2_p_pp | SVESize(pd) | Pd(pd) | Pn(pn) | Pm(pm)); +} + +void Assembler::uzp1(const PRegisterWithLaneSize& pd, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + // UZP1 ., ., . + // 0000 0101 ..10 .... 0100 100. ...0 .... + // size<23:22> | Pm<19:16> | opc<12:11> = 01 | H<10> = 0 | Pn<8:5> | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(pd, pn, pm)); + + Emit(UZP1_p_pp | SVESize(pd) | Pd(pd) | Pn(pn) | Pm(pm)); +} + +void Assembler::uzp2(const PRegisterWithLaneSize& pd, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + // UZP2 ., ., . + // 0000 0101 ..10 .... 0100 110. ...0 .... + // size<23:22> | Pm<19:16> | opc<12:11> = 01 | H<10> = 1 | Pn<8:5> | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(pd, pn, pm)); + + Emit(UZP2_p_pp | SVESize(pd) | Pd(pd) | Pn(pn) | Pm(pm)); +} + +void Assembler::zip1(const PRegisterWithLaneSize& pd, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + // ZIP1 ., ., . + // 0000 0101 ..10 .... 0100 000. ...0 .... + // size<23:22> | Pm<19:16> | opc<12:11> = 00 | H<10> = 0 | Pn<8:5> | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(pd, pn, pm)); + + Emit(ZIP1_p_pp | SVESize(pd) | Pd(pd) | Pn(pn) | Pm(pm)); +} + +void Assembler::zip2(const PRegisterWithLaneSize& pd, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + // ZIP2 ., ., . + // 0000 0101 ..10 .... 0100 010. ...0 .... + // size<23:22> | Pm<19:16> | opc<12:11> = 00 | H<10> = 1 | Pn<8:5> | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(pd, pn, pm)); + + Emit(ZIP2_p_pp | SVESize(pd) | Pd(pd) | Pn(pn) | Pm(pm)); +} + +// SVEPermuteVectorExtract. + +void Assembler::ext(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm, + unsigned offset) { + // EXT .B, .B, .B, # + // 0000 0101 001. .... 000. .... .... .... + // imm8h<20:16> | imm8l<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(IsUint8(offset)); + + int imm8h = ExtractUnsignedBitfield32(7, 3, offset); + int imm8l = ExtractUnsignedBitfield32(2, 0, offset); + Emit(EXT_z_zi_des | Rd(zd) | Rn(zm) | ImmUnsignedField<20, 16>(imm8h) | + ImmUnsignedField<12, 10>(imm8l)); +} + +// SVEPermuteVectorInterleaving. + +void Assembler::trn1(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm) { + // TRN1 ., ., . + // 0000 0101 ..1. .... 0111 00.. .... .... + // size<23:22> | Zm<20:16> | opc<12:10> = 100 | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + + Emit(TRN1_z_zz | SVESize(zd) | Rd(zd) | Rn(zn) | Rm(zm)); +} + +void Assembler::trn2(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm) { + // TRN2 ., ., . + // 0000 0101 ..1. .... 0111 01.. .... .... + // size<23:22> | Zm<20:16> | opc<12:10> = 101 | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + + Emit(TRN2_z_zz | SVESize(zd) | Rd(zd) | Rn(zn) | Rm(zm)); +} + +void Assembler::uzp1(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm) { + // UZP1 ., ., . + // 0000 0101 ..1. .... 0110 10.. .... .... + // size<23:22> | Zm<20:16> | opc<12:10> = 010 | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + + Emit(UZP1_z_zz | SVESize(zd) | Rd(zd) | Rn(zn) | Rm(zm)); +} + +void Assembler::uzp2(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm) { + // UZP2 ., ., . + // 0000 0101 ..1. .... 0110 11.. .... .... + // size<23:22> | Zm<20:16> | opc<12:10> = 011 | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + + Emit(UZP2_z_zz | SVESize(zd) | Rd(zd) | Rn(zn) | Rm(zm)); +} + +void Assembler::zip1(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm) { + // ZIP1 ., ., . + // 0000 0101 ..1. .... 0110 00.. .... .... + // size<23:22> | Zm<20:16> | opc<12:10> = 000 | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + + Emit(ZIP1_z_zz | SVESize(zd) | Rd(zd) | Rn(zn) | Rm(zm)); +} + +void Assembler::zip2(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm) { + // ZIP2 ., ., . + // 0000 0101 ..1. .... 0110 01.. .... .... + // size<23:22> | Zm<20:16> | opc<12:10> = 001 | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + + Emit(ZIP2_z_zz | SVESize(zd) | Rd(zd) | Rn(zn) | Rm(zm)); +} + +// SVEPermuteVectorPredicated. + +void Assembler::clasta(const Register& rd, + const PRegister& pg, + const Register& rn, + const ZRegister& zm) { + // CLASTA , , , . + // 0000 0101 ..11 0000 101. .... .... .... + // size<23:22> | B<16> = 0 | Pg<12:10> | Zm<9:5> | Rdn<4:0> + + USE(rn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(rd.Is(rn)); + + Emit(CLASTA_r_p_z | SVESize(zm) | Rd(rd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::clasta(const VRegister& vd, + const PRegister& pg, + const VRegister& vn, + const ZRegister& zm) { + // CLASTA , , , . + // 0000 0101 ..10 1010 100. .... .... .... + // size<23:22> | B<16> = 0 | Pg<12:10> | Zm<9:5> | Vdn<4:0> + + USE(vn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(vd.Is(vn)); + VIXL_ASSERT(vd.IsScalar()); + VIXL_ASSERT(AreSameLaneSize(vd, zm)); + + Emit(CLASTA_v_p_z | SVESize(zm) | Rd(vd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::clasta(const ZRegister& zd, + const PRegister& pg, + const ZRegister& zn, + const ZRegister& zm) { + // CLASTA ., , ., . + // 0000 0101 ..10 1000 100. .... .... .... + // size<23:22> | B<16> = 0 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + + Emit(CLASTA_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::clastb(const Register& rd, + const PRegister& pg, + const Register& rn, + const ZRegister& zm) { + // CLASTB , , , . + // 0000 0101 ..11 0001 101. .... .... .... + // size<23:22> | B<16> = 1 | Pg<12:10> | Zm<9:5> | Rdn<4:0> + + USE(rn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(rd.Is(rn)); + + Emit(CLASTB_r_p_z | SVESize(zm) | Rd(rd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::clastb(const VRegister& vd, + const PRegister& pg, + const VRegister& vn, + const ZRegister& zm) { + // CLASTB , , , . + // 0000 0101 ..10 1011 100. .... .... .... + // size<23:22> | B<16> = 1 | Pg<12:10> | Zm<9:5> | Vdn<4:0> + + USE(vn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(vd.Is(vn)); + VIXL_ASSERT(vd.IsScalar()); + VIXL_ASSERT(AreSameLaneSize(vd, zm)); + + Emit(CLASTB_v_p_z | SVESize(zm) | Rd(vd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::clastb(const ZRegister& zd, + const PRegister& pg, + const ZRegister& zn, + const ZRegister& zm) { + // CLASTB ., , ., . + // 0000 0101 ..10 1001 100. .... .... .... + // size<23:22> | B<16> = 1 | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + + Emit(CLASTB_z_p_zz | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +void Assembler::compact(const ZRegister& zd, + const PRegister& pg, + const ZRegister& zn) { + // COMPACT ., , . + // 0000 0101 1.10 0001 100. .... .... .... + // sz<22> | Pg<12:10> | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT((zd.GetLaneSizeInBits() == kSRegSize) || + (zd.GetLaneSizeInBits() == kDRegSize)); + + Instr sz = (zd.GetLaneSizeInBits() == kDRegSize) ? (1 << 22) : 0; + Emit(COMPACT_z_p_z | sz | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::cpy(const ZRegister& zd, + const PRegisterM& pg, + const Register& rn) { + // CPY ., /M, + // 0000 0101 ..10 1000 101. .... .... .... + // size<23:22> | Pg<12:10> | Rn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(static_cast(rn.GetSizeInBits()) >= + zd.GetLaneSizeInBits()); + + Emit(CPY_z_p_r | SVESize(zd) | Rd(zd) | PgLow8(pg) | RnSP(rn)); +} + +void Assembler::cpy(const ZRegister& zd, + const PRegisterM& pg, + const VRegister& vn) { + // CPY ., /M, + // 0000 0101 ..10 0000 100. .... .... .... + // size<23:22> | Pg<12:10> | Vn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(vn.IsScalar()); + VIXL_ASSERT(static_cast(vn.GetSizeInBits()) == + zd.GetLaneSizeInBits()); + + Emit(CPY_z_p_v | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(vn)); +} + +void Assembler::lasta(const Register& rd, + const PRegister& pg, + const ZRegister& zn) { + // LASTA , , . + // 0000 0101 ..10 0000 101. .... .... .... + // size<23:22> | B<16> = 0 | Pg<12:10> | Zn<9:5> | Rd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Emit(LASTA_r_p_z | SVESize(zn) | Rd(rd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::lasta(const VRegister& vd, + const PRegister& pg, + const ZRegister& zn) { + // LASTA , , . + // 0000 0101 ..10 0010 100. .... .... .... + // size<23:22> | B<16> = 0 | Pg<12:10> | Zn<9:5> | Vd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(vd.IsScalar()); + + Emit(LASTA_v_p_z | SVESize(zn) | Rd(vd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::lastb(const Register& rd, + const PRegister& pg, + const ZRegister& zn) { + // LASTB , , . + // 0000 0101 ..10 0001 101. .... .... .... + // size<23:22> | B<16> = 1 | Pg<12:10> | Zn<9:5> | Rd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Emit(LASTB_r_p_z | SVESize(zn) | Rd(rd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::lastb(const VRegister& vd, + const PRegister& pg, + const ZRegister& zn) { + // LASTB , , . + // 0000 0101 ..10 0011 100. .... .... .... + // size<23:22> | B<16> = 1 | Pg<12:10> | Zn<9:5> | Vd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(vd.IsScalar()); + + Emit(LASTB_v_p_z | SVESize(zn) | Rd(vd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::rbit(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + // RBIT ., /M, . + // 0000 0101 ..10 0111 100. .... .... .... + // size<23:22> | opc<17:16> = 11 | Pg<12:10> | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + + Emit(RBIT_z_p_z | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::revb(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + // REVB ., /M, . + // 0000 0101 ..10 0100 100. .... .... .... + // size<23:22> | opc<17:16> = 00 | Pg<12:10> | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.IsLaneSizeH() || zd.IsLaneSizeS() || zd.IsLaneSizeD()); + + Emit(REVB_z_z | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::revh(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + // REVH ., /M, . + // 0000 0101 ..10 0101 100. .... .... .... + // size<23:22> | opc<17:16> = 01 | Pg<12:10> | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.IsLaneSizeS() || zd.IsLaneSizeD()); + + Emit(REVH_z_z | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::revw(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + // REVW .D, /M, .D + // 0000 0101 ..10 0110 100. .... .... .... + // size<23:22> | opc<17:16> = 10 | Pg<12:10> | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + VIXL_ASSERT(zd.IsLaneSizeD()); + + Emit(REVW_z_z | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zn)); +} + +void Assembler::splice(const ZRegister& zd, + const PRegister& pg, + const ZRegister& zn, + const ZRegister& zm) { + // SPLICE ., , ., . + // 0000 0101 ..10 1100 100. .... .... .... + // size<23:22> | Pg<12:10> | Zm<9:5> | Zdn<4:0> + + USE(zn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.Is(zn)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + + Emit(SPLICE_z_p_zz_des | SVESize(zd) | Rd(zd) | PgLow8(pg) | Rn(zm)); +} + +// SVEPermuteVectorUnpredicated. + +void Assembler::dup(const ZRegister& zd, const Register& xn) { + // DUP ., + // 0000 0101 ..10 0000 0011 10.. .... .... + // size<23:22> | Rn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Emit(DUP_z_r | SVESize(zd) | Rd(zd) | RnSP(xn)); +} + +void Assembler::dup(const ZRegister& zd, const ZRegister& zn, unsigned index) { + // DUP ., .[] + // 0000 0101 ..1. .... 0010 00.. .... .... + // imm2<23:22> | tsz<20:16> | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameFormat(zd, zn)); + VIXL_ASSERT((index * zd.GetLaneSizeInBits()) < 512); + int n = zd.GetLaneSizeInBytesLog2(); + unsigned imm_7 = (index << (n + 1)) | (1 << n); + VIXL_ASSERT(IsUint7(imm_7)); + unsigned imm_2 = ExtractUnsignedBitfield32(6, 5, imm_7); + unsigned tsz_5 = ExtractUnsignedBitfield32(4, 0, imm_7); + + Emit(DUP_z_zi | ImmUnsignedField<23, 22>(imm_2) | + ImmUnsignedField<20, 16>(tsz_5) | Rd(zd) | Rn(zn)); +} + +void Assembler::insr(const ZRegister& zdn, const Register& rm) { + // INSR ., + // 0000 0101 ..10 0100 0011 10.. .... .... + // size<23:22> | Rm<9:5> | Zdn<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Emit(INSR_z_r | SVESize(zdn) | Rd(zdn) | Rn(rm)); +} + +void Assembler::insr(const ZRegister& zdn, const VRegister& vm) { + // INSR ., + // 0000 0101 ..11 0100 0011 10.. .... .... + // size<23:22> | Vm<9:5> | Zdn<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(vm.IsScalar()); + + Emit(INSR_z_v | SVESize(zdn) | Rd(zdn) | Rn(vm)); +} + +void Assembler::rev(const ZRegister& zd, const ZRegister& zn) { + // REV ., . + // 0000 0101 ..11 1000 0011 10.. .... .... + // size<23:22> | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameFormat(zd, zn)); + + Emit(REV_z_z | SVESize(zd) | Rd(zd) | Rn(zn)); +} + +void Assembler::sunpkhi(const ZRegister& zd, const ZRegister& zn) { + // SUNPKHI ., . + // 0000 0101 ..11 0001 0011 10.. .... .... + // size<23:22> | U<17> = 0 | H<16> = 1 | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() == (zn.GetLaneSizeInBytes() * 2)); + VIXL_ASSERT(!zd.IsLaneSizeB()); + + Emit(SUNPKHI_z_z | SVESize(zd) | Rd(zd) | Rn(zn)); +} + +void Assembler::sunpklo(const ZRegister& zd, const ZRegister& zn) { + // SUNPKLO ., . + // 0000 0101 ..11 0000 0011 10.. .... .... + // size<23:22> | U<17> = 0 | H<16> = 0 | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() == (zn.GetLaneSizeInBytes() * 2)); + VIXL_ASSERT(!zd.IsLaneSizeB()); + + Emit(SUNPKLO_z_z | SVESize(zd) | Rd(zd) | Rn(zn)); +} + +void Assembler::tbl(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm) { + // TBL ., { . }, . + // 0000 0101 ..1. .... 0011 00.. .... .... + // size<23:22> | Zm<20:16> | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameFormat(zd, zn, zm)); + + Emit(TBL_z_zz_1 | SVESize(zd) | Rd(zd) | Rn(zn) | Rm(zm)); +} + +void Assembler::uunpkhi(const ZRegister& zd, const ZRegister& zn) { + // UUNPKHI ., . + // 0000 0101 ..11 0011 0011 10.. .... .... + // size<23:22> | U<17> = 1 | H<16> = 1 | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() == (zn.GetLaneSizeInBytes() * 2)); + VIXL_ASSERT(!zd.IsLaneSizeB()); + + Emit(UUNPKHI_z_z | SVESize(zd) | Rd(zd) | Rn(zn)); +} + +void Assembler::uunpklo(const ZRegister& zd, const ZRegister& zn) { + // UUNPKLO ., . + // 0000 0101 ..11 0010 0011 10.. .... .... + // size<23:22> | U<17> = 1 | H<16> = 0 | Zn<9:5> | Zd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(zd.GetLaneSizeInBytes() == (zn.GetLaneSizeInBytes() * 2)); + VIXL_ASSERT(!zd.IsLaneSizeB()); + + Emit(UUNPKLO_z_z | SVESize(zd) | Rd(zd) | Rn(zn)); +} + +// SVEPredicateCount. + +void Assembler::cntp(const Register& xd, + const PRegister& pg, + const PRegisterWithLaneSize& pn) { + // CNTP , , . + // 0010 0101 ..10 0000 10.. ..0. .... .... + // size<23:22> | opc<18:16> = 000 | Pg<13:10> | o2<9> = 0 | Pn<8:5> | Rd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(xd.IsX()); + VIXL_ASSERT(pg.IsUnqualified()); + if (pg.HasLaneSize()) VIXL_ASSERT(AreSameFormat(pg, pn)); + + Emit(CNTP_r_p_p | SVESize(pn) | Rd(xd) | Pg<13, 10>(pg) | Pn(pn)); +} + +// SVEPredicateLogicalOp. +void Assembler::and_(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameFormat(pd, pn, pm)); + VIXL_ASSERT(pd.IsLaneSizeB()); + Emit(AND_p_p_pp_z | Pd(pd) | Pg<13, 10>(pg) | Pn(pn) | Pm(pm)); +} + +void Assembler::ands(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameFormat(pd, pn, pm)); + VIXL_ASSERT(pd.IsLaneSizeB()); + Emit(ANDS_p_p_pp_z | Pd(pd) | Pg<13, 10>(pg) | Pn(pn) | Pm(pm)); +} + +void Assembler::bic(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameFormat(pd, pn, pm)); + VIXL_ASSERT(pd.IsLaneSizeB()); + Emit(BIC_p_p_pp_z | Pd(pd) | Pg<13, 10>(pg) | Pn(pn) | Pm(pm)); +} + +void Assembler::bics(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameFormat(pd, pn, pm)); + VIXL_ASSERT(pd.IsLaneSizeB()); + Emit(BICS_p_p_pp_z | Pd(pd) | Pg<13, 10>(pg) | Pn(pn) | Pm(pm)); +} + +void Assembler::eor(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameFormat(pd, pn, pm)); + VIXL_ASSERT(pd.IsLaneSizeB()); + Emit(EOR_p_p_pp_z | Pd(pd) | Pg<13, 10>(pg) | Pn(pn) | Pm(pm)); +} + +void Assembler::eors(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameFormat(pd, pn, pm)); + VIXL_ASSERT(pd.IsLaneSizeB()); + Emit(EORS_p_p_pp_z | Pd(pd) | Pg<13, 10>(pg) | Pn(pn) | Pm(pm)); +} + +void Assembler::nand(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameFormat(pd, pn, pm)); + VIXL_ASSERT(pd.IsLaneSizeB()); + Emit(NAND_p_p_pp_z | Pd(pd) | Pg<13, 10>(pg) | Pn(pn) | Pm(pm)); +} + +void Assembler::nands(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameFormat(pd, pn, pm)); + VIXL_ASSERT(pd.IsLaneSizeB()); + Emit(NANDS_p_p_pp_z | Pd(pd) | Pg<13, 10>(pg) | Pn(pn) | Pm(pm)); +} + +void Assembler::nor(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameFormat(pd, pn, pm)); + VIXL_ASSERT(pd.IsLaneSizeB()); + Emit(NOR_p_p_pp_z | Pd(pd) | Pg<13, 10>(pg) | Pn(pn) | Pm(pm)); +} + +void Assembler::nors(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameFormat(pd, pn, pm)); + VIXL_ASSERT(pd.IsLaneSizeB()); + Emit(NORS_p_p_pp_z | Pd(pd) | Pg<13, 10>(pg) | Pn(pn) | Pm(pm)); +} + +void Assembler::orn(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameFormat(pd, pn, pm)); + VIXL_ASSERT(pd.IsLaneSizeB()); + Emit(ORN_p_p_pp_z | Pd(pd) | Pg<13, 10>(pg) | Pn(pn) | Pm(pm)); +} + +void Assembler::orns(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameFormat(pd, pn, pm)); + VIXL_ASSERT(pd.IsLaneSizeB()); + Emit(ORNS_p_p_pp_z | Pd(pd) | Pg<13, 10>(pg) | Pn(pn) | Pm(pm)); +} + +void Assembler::orr(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameFormat(pd, pn, pm)); + VIXL_ASSERT(pd.IsLaneSizeB()); + Emit(ORR_p_p_pp_z | Pd(pd) | Pg<13, 10>(pg) | Pn(pn) | Pm(pm)); +} + +void Assembler::orrs(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameFormat(pd, pn, pm)); + VIXL_ASSERT(pd.IsLaneSizeB()); + Emit(ORRS_p_p_pp_z | Pd(pd) | Pg<13, 10>(pg) | Pn(pn) | Pm(pm)); +} + +void Assembler::sel(const PRegisterWithLaneSize& pd, + const PRegister& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + Emit(SEL_p_p_pp | Pd(pd) | Pg<13, 10>(pg) | Pn(pn) | Pm(pm)); +} + +// SVEPredicateMisc. + +void Assembler::pfalse(const PRegisterWithLaneSize& pd) { + // PFALSE .B + // 0010 0101 0001 1000 1110 0100 0000 .... + // op<23> = 0 | S<22> = 0 | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + // Ignore the lane size, since it makes no difference to the operation. + + Emit(PFALSE_p | Pd(pd)); +} + +void Assembler::pfirst(const PRegisterWithLaneSize& pd, + const PRegister& pg, + const PRegisterWithLaneSize& pn) { + // PFIRST .B, , .B + // 0010 0101 0101 1000 1100 000. ...0 .... + // op<23> = 0 | S<22> = 1 | Pg<8:5> | Pdn<3:0> + + USE(pn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(pd.Is(pn)); + VIXL_ASSERT(pd.IsLaneSizeB()); + + Emit(PFIRST_p_p_p | Pd(pd) | Pg<8, 5>(pg)); +} + +void Assembler::pnext(const PRegisterWithLaneSize& pd, + const PRegister& pg, + const PRegisterWithLaneSize& pn) { + // PNEXT ., , . + // 0010 0101 ..01 1001 1100 010. ...0 .... + // size<23:22> | Pg<8:5> | Pdn<3:0> + + USE(pn); + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(pd.Is(pn)); + + Emit(PNEXT_p_p_p | SVESize(pd) | Pd(pd) | Pg<8, 5>(pg)); +} + +void Assembler::ptest(const PRegister& pg, const PRegisterWithLaneSize& pn) { + // PTEST , .B + // 0010 0101 0101 0000 11.. ..0. ...0 0000 + // op<23> = 0 | S<22> = 1 | Pg<13:10> | Pn<8:5> | opc2<3:0> = 0000 + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(pn.IsLaneSizeB()); + + Emit(PTEST_p_p | Pg<13, 10>(pg) | Rx<8, 5>(pn)); +} + +void Assembler::ptrue(const PRegisterWithLaneSize& pd, int pattern) { + // PTRUE .{, } + // 0010 0101 ..01 1000 1110 00.. ...0 .... + // size<23:22> | S<16> = 0 | pattern<9:5> | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Emit(PTRUE_p_s | SVESize(pd) | Pd(pd) | ImmSVEPredicateConstraint(pattern)); +} + +void Assembler::ptrues(const PRegisterWithLaneSize& pd, int pattern) { + // PTRUES .{, } + // 0010 0101 ..01 1001 1110 00.. ...0 .... + // size<23:22> | S<16> = 1 | pattern<9:5> | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Emit(PTRUES_p_s | SVESize(pd) | Pd(pd) | ImmSVEPredicateConstraint(pattern)); +} + +void Assembler::rdffr(const PRegisterWithLaneSize& pd) { + // RDFFR .B + // 0010 0101 0001 1001 1111 0000 0000 .... + // op<23> = 0 | S<22> = 0 | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Emit(RDFFR_p_f | Pd(pd)); +} + +void Assembler::rdffr(const PRegisterWithLaneSize& pd, const PRegisterZ& pg) { + // RDFFR .B, /Z + // 0010 0101 0001 1000 1111 000. ...0 .... + // op<23> = 0 | S<22> = 0 | Pg<8:5> | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Emit(RDFFR_p_p_f | Pd(pd) | Pg<8, 5>(pg)); +} + +void Assembler::rdffrs(const PRegisterWithLaneSize& pd, const PRegisterZ& pg) { + // RDFFRS .B, /Z + // 0010 0101 0101 1000 1111 000. ...0 .... + // op<23> = 0 | S<22> = 1 | Pg<8:5> | Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Emit(RDFFRS_p_p_f | Pd(pd) | Pg<8, 5>(pg)); +} + +// SVEPropagateBreak. + +void Assembler::brkpa(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + // BRKPA .B, /Z, .B, .B + // 0010 0101 0000 .... 11.. ..0. ...0 .... + // op<23> = 0 | S<22> = 0 | Pm<19:16> | Pg<13:10> | Pn<8:5> | B<4> = 0 | + // Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Emit(BRKPA_p_p_pp | Pd(pd) | Pg<13, 10>(pg) | Pn(pn) | Pm(pm)); +} + +void Assembler::brkpas(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + // BRKPAS .B, /Z, .B, .B + // 0010 0101 0100 .... 11.. ..0. ...0 .... + // op<23> = 0 | S<22> = 1 | Pm<19:16> | Pg<13:10> | Pn<8:5> | B<4> = 0 | + // Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Emit(BRKPAS_p_p_pp | Pd(pd) | Pg<13, 10>(pg) | Pn(pn) | Pm(pm)); +} + +void Assembler::brkpb(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + // BRKPB .B, /Z, .B, .B + // 0010 0101 0000 .... 11.. ..0. ...1 .... + // op<23> = 0 | S<22> = 0 | Pm<19:16> | Pg<13:10> | Pn<8:5> | B<4> = 1 | + // Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Emit(BRKPB_p_p_pp | Pd(pd) | Pg<13, 10>(pg) | Pn(pn) | Pm(pm)); +} + +void Assembler::brkpbs(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + // BRKPBS .B, /Z, .B, .B + // 0010 0101 0100 .... 11.. ..0. ...1 .... + // op<23> = 0 | S<22> = 1 | Pm<19:16> | Pg<13:10> | Pn<8:5> | B<4> = 1 | + // Pd<3:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Emit(BRKPBS_p_p_pp | Pd(pd) | Pg<13, 10>(pg) | Pn(pn) | Pm(pm)); +} + +// SVEStackFrameAdjustment. + +void Assembler::addpl(const Register& xd, const Register& xn, int imm6) { + // ADDPL , , # + // 0000 0100 011. .... 0101 0... .... .... + // op<22> = 1 | Rn<20:16> | imm6<10:5> | Rd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(xd.IsX()); + VIXL_ASSERT(xn.IsX()); + + Emit(ADDPL_r_ri | RdSP(xd) | RmSP(xn) | ImmField<10, 5>(imm6)); +} + +void Assembler::addvl(const Register& xd, const Register& xn, int imm6) { + // ADDVL , , # + // 0000 0100 001. .... 0101 0... .... .... + // op<22> = 0 | Rn<20:16> | imm6<10:5> | Rd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(xd.IsX()); + VIXL_ASSERT(xn.IsX()); + + Emit(ADDVL_r_ri | RdSP(xd) | RmSP(xn) | ImmField<10, 5>(imm6)); +} + +// SVEStackFrameSize. + +void Assembler::rdvl(const Register& xd, int imm6) { + // RDVL , # + // 0000 0100 1011 1111 0101 0... .... .... + // op<22> = 0 | opc2<20:16> = 11111 | imm6<10:5> | Rd<4:0> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(xd.IsX()); + + Emit(RDVL_r_i | Rd(xd) | ImmField<10, 5>(imm6)); +} + +// SVEVectorSelect. + +void Assembler::sel(const ZRegister& zd, + const PRegister& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + + Emit(SEL_z_p_zz | SVESize(zd) | Rd(zd) | Pg<13, 10>(pg) | Rn(zn) | Rm(zm)); +} + +// SVEWriteFFR. + +void Assembler::setffr() { + // SETFFR + // 0010 0101 0010 1100 1001 0000 0000 0000 + // opc<23:22> = 00 + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Emit(SETFFR_f); +} + +void Assembler::wrffr(const PRegisterWithLaneSize& pn) { + // WRFFR .B + // 0010 0101 0010 1000 1001 000. ...0 0000 + // opc<23:22> = 00 | Pn<8:5> + + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + + Emit(WRFFR_f_p | Rx<8, 5>(pn)); +} + +// Aliases. + +void Assembler::bic(const ZRegister& zd, const ZRegister& zn, uint64_t imm) { + and_(zd, zn, ~imm); +} + +void Assembler::eon(const ZRegister& zd, const ZRegister& zn, uint64_t imm) { + eor(zd, zn, ~imm); +} + +void Assembler::orn(const ZRegister& zd, const ZRegister& zn, uint64_t imm) { + orr(zd, zn, ~imm); +} + + +void Assembler::fmov(const ZRegister& zd, const PRegisterM& pg, double imm) { + if (IsPositiveZero(imm)) { + cpy(zd, pg, 0); + } else { + fcpy(zd, pg, imm); + } +} + +void Assembler::fmov(const ZRegister& zd, double imm) { + if (IsPositiveZero(imm)) { + dup(zd, imm); + } else { + fdup(zd, imm); + } +} + +void Assembler::mov(const PRegister& pd, const PRegister& pn) { + // If the inputs carry a lane size, they must match. + VIXL_ASSERT((!pd.HasLaneSize() && !pn.HasLaneSize()) || + AreSameLaneSize(pd, pn)); + orr(pd.VnB(), pn.Zeroing(), pn.VnB(), pn.VnB()); +} + +void Assembler::mov(const PRegisterWithLaneSize& pd, + const PRegisterM& pg, + const PRegisterWithLaneSize& pn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + sel(pd, pg, pn, pd); +} + +void Assembler::mov(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + and_(pd, pg, pn, pn); +} + +void Assembler::mov(const ZRegister& zd, + const PRegister& pg, + int imm8, + int shift) { + VIXL_ASSERT(pg.IsMerging() || pg.IsZeroing()); + cpy(zd, pg, imm8, shift); +} + +void Assembler::mov(const ZRegister& zd, const Register& xn) { dup(zd, xn); } + +void Assembler::mov(const ZRegister& zd, const VRegister& vn) { + VIXL_ASSERT(vn.IsScalar()); + VIXL_ASSERT(AreSameLaneSize(zd, vn)); + dup(zd, vn.Z().WithSameLaneSizeAs(vn), 0); +} + +void Assembler::mov(const ZRegister& zd, const ZRegister& zn) { + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + orr(zd.VnD(), zn.VnD(), zn.VnD()); +} + +void Assembler::mov(const ZRegister& zd, const ZRegister& zn, unsigned index) { + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + dup(zd, zn, index); +} + +void Assembler::mov(const ZRegister& zd, + const PRegisterM& pg, + const Register& rn) { + cpy(zd, pg, rn); +} + +void Assembler::mov(const ZRegister& zd, + const PRegisterM& pg, + const VRegister& vn) { + VIXL_ASSERT(vn.IsScalar()); + VIXL_ASSERT(AreSameLaneSize(zd, vn)); + cpy(zd, pg, vn); +} + +void Assembler::mov(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn) { + VIXL_ASSERT(AreSameLaneSize(zd, zn)); + sel(zd, pg, zn, zd); +} + +void Assembler::mov(const ZRegister& zd, uint64_t imm) { + // Mov is an alias of dupm for certain values of imm. Whilst this matters in + // the disassembler, for the assembler, we don't distinguish between the + // two mnemonics, and simply call dupm. + dupm(zd, imm); +} + +void Assembler::mov(const ZRegister& zd, int imm8, int shift) { + dup(zd, imm8, shift); +} + +void Assembler::movs(const PRegister& pd, const PRegister& pn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + orrs(pd.VnB(), pn.Zeroing(), pn.VnB(), pn.VnB()); +} + +void Assembler::movs(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + ands(pd, pg, pn, pn); +} + +void Assembler::not_(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + eor(pd, pg, pn, pg.VnB()); +} + +void Assembler::nots(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn) { + VIXL_ASSERT(CPUHas(CPUFeatures::kSVE)); + eors(pd, pg, pn, pg.VnB()); +} + +} // namespace aarch64 +} // namespace vixl diff --git a/src/coreclr/jit/vixl/aarch64/constants-aarch64.h b/src/coreclr/jit/vixl/aarch64/constants-aarch64.h new file mode 100644 index 00000000000000..d17c88943c8cee --- /dev/null +++ b/src/coreclr/jit/vixl/aarch64/constants-aarch64.h @@ -0,0 +1,4439 @@ +// Copyright 2015, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef VIXL_AARCH64_CONSTANTS_AARCH64_H_ +#define VIXL_AARCH64_CONSTANTS_AARCH64_H_ + +#include "../globals-vixl.h" + +namespace vixl { +namespace aarch64 { + +const unsigned kNumberOfRegisters = 32; +const unsigned kNumberOfVRegisters = 32; +const unsigned kNumberOfZRegisters = kNumberOfVRegisters; +const unsigned kNumberOfPRegisters = 16; +// Callee saved registers are x21-x30(lr). +const int kNumberOfCalleeSavedRegisters = 10; +const int kFirstCalleeSavedRegisterIndex = 21; +// Callee saved FP registers are d8-d15. Note that the high parts of v8-v15 are +// still caller-saved. +const int kNumberOfCalleeSavedFPRegisters = 8; +const int kFirstCalleeSavedFPRegisterIndex = 8; +// All predicated instructions accept at least p0-p7 as the governing predicate. +const unsigned kNumberOfGoverningPRegisters = 8; + +// clang-format off +#define AARCH64_P_REGISTER_CODE_LIST(R) \ + R(0) R(1) R(2) R(3) R(4) R(5) R(6) R(7) \ + R(8) R(9) R(10) R(11) R(12) R(13) R(14) R(15) + +#define AARCH64_REGISTER_CODE_LIST(R) \ + R(0) R(1) R(2) R(3) R(4) R(5) R(6) R(7) \ + R(8) R(9) R(10) R(11) R(12) R(13) R(14) R(15) \ + R(16) R(17) R(18) R(19) R(20) R(21) R(22) R(23) \ + R(24) R(25) R(26) R(27) R(28) R(29) R(30) R(31) + +// SVE loads and stores use "w" instead of "s" for word-sized accesses, so the +// mapping from the load/store variant to constants like k*RegSize is irregular. +#define VIXL_SVE_LOAD_STORE_VARIANT_LIST(V) \ + V(b, B) \ + V(h, H) \ + V(w, S) \ + V(d, D) + +// Sign-extending loads don't have double-word variants. +#define VIXL_SVE_LOAD_STORE_SIGNED_VARIANT_LIST(V) \ + V(b, B) \ + V(h, H) \ + V(w, S) + +#define INSTRUCTION_FIELDS_LIST(V_) \ +/* Register fields */ \ +V_(Rd, 4, 0, ExtractBits) /* Destination register. */ \ +V_(Rn, 9, 5, ExtractBits) /* First source register. */ \ +V_(Rm, 20, 16, ExtractBits) /* Second source register. */ \ +V_(RmLow16, 19, 16, ExtractBits) /* Second source register (code 0-15). */ \ +V_(Ra, 14, 10, ExtractBits) /* Third source register. */ \ +V_(Rt, 4, 0, ExtractBits) /* Load/store register. */ \ +V_(Rt2, 14, 10, ExtractBits) /* Load/store second register. */ \ +V_(Rs, 20, 16, ExtractBits) /* Exclusive access status. */ \ +V_(Pt, 3, 0, ExtractBits) /* Load/store register (p0-p7). */ \ +V_(Pd, 3, 0, ExtractBits) /* SVE destination predicate register. */ \ +V_(Pn, 8, 5, ExtractBits) /* SVE first source predicate register. */ \ +V_(Pm, 19, 16, ExtractBits) /* SVE second source predicate register.*/ \ +V_(PgLow8, 12, 10, ExtractBits) /* Governing predicate (p0-p7). */ \ + \ +/* Common bits */ \ +V_(SixtyFourBits, 31, 31, ExtractBits) \ +V_(FlagsUpdate, 29, 29, ExtractBits) \ + \ +/* PC relative addressing */ \ +V_(ImmPCRelHi, 23, 5, ExtractSignedBits) \ +V_(ImmPCRelLo, 30, 29, ExtractBits) \ + \ +/* Add/subtract/logical shift register */ \ +V_(ShiftDP, 23, 22, ExtractBits) \ +V_(ImmDPShift, 15, 10, ExtractBits) \ + \ +/* Add/subtract immediate */ \ +V_(ImmAddSub, 21, 10, ExtractBits) \ +V_(ImmAddSubShift, 22, 22, ExtractBits) \ + \ +/* Add/substract extend */ \ +V_(ImmExtendShift, 12, 10, ExtractBits) \ +V_(ExtendMode, 15, 13, ExtractBits) \ + \ +/* Move wide */ \ +V_(ImmMoveWide, 20, 5, ExtractBits) \ +V_(ShiftMoveWide, 22, 21, ExtractBits) \ + \ +/* Logical immediate, bitfield and extract */ \ +V_(BitN, 22, 22, ExtractBits) \ +V_(ImmRotate, 21, 16, ExtractBits) \ +V_(ImmSetBits, 15, 10, ExtractBits) \ +V_(ImmR, 21, 16, ExtractBits) \ +V_(ImmS, 15, 10, ExtractBits) \ + \ +/* Test and branch immediate */ \ +V_(ImmTestBranch, 18, 5, ExtractSignedBits) \ +V_(ImmTestBranchBit40, 23, 19, ExtractBits) \ +V_(ImmTestBranchBit5, 31, 31, ExtractBits) \ + \ +/* Conditionals */ \ +V_(Condition, 15, 12, ExtractBits) \ +V_(ConditionBranch, 3, 0, ExtractBits) \ +V_(Nzcv, 3, 0, ExtractBits) \ +V_(ImmCondCmp, 20, 16, ExtractBits) \ +V_(ImmCondBranch, 23, 5, ExtractSignedBits) \ + \ +/* Floating point */ \ +V_(FPType, 23, 22, ExtractBits) \ +V_(ImmFP, 20, 13, ExtractBits) \ +V_(FPScale, 15, 10, ExtractBits) \ + \ +/* Load Store */ \ +V_(ImmLS, 20, 12, ExtractSignedBits) \ +V_(ImmLSUnsigned, 21, 10, ExtractBits) \ +V_(ImmLSPair, 21, 15, ExtractSignedBits) \ +V_(ImmShiftLS, 12, 12, ExtractBits) \ +V_(LSOpc, 23, 22, ExtractBits) \ +V_(LSVector, 26, 26, ExtractBits) \ +V_(LSSize, 31, 30, ExtractBits) \ +V_(ImmPrefetchOperation, 4, 0, ExtractBits) \ +V_(PrefetchHint, 4, 3, ExtractBits) \ +V_(PrefetchTarget, 2, 1, ExtractBits) \ +V_(PrefetchStream, 0, 0, ExtractBits) \ +V_(ImmLSPACHi, 22, 22, ExtractSignedBits) \ +V_(ImmLSPACLo, 20, 12, ExtractBits) \ + \ +/* Other immediates */ \ +V_(ImmUncondBranch, 25, 0, ExtractSignedBits) \ +V_(ImmCmpBranch, 23, 5, ExtractSignedBits) \ +V_(ImmLLiteral, 23, 5, ExtractSignedBits) \ +V_(ImmException, 20, 5, ExtractBits) \ +V_(ImmHint, 11, 5, ExtractBits) \ +V_(ImmBarrierDomain, 11, 10, ExtractBits) \ +V_(ImmBarrierType, 9, 8, ExtractBits) \ +V_(ImmUdf, 15, 0, ExtractBits) \ + \ +/* System (MRS, MSR, SYS) */ \ +V_(ImmSystemRegister, 20, 5, ExtractBits) \ +V_(SysO0, 19, 19, ExtractBits) \ +V_(SysOp, 18, 5, ExtractBits) \ +V_(SysOp0, 20, 19, ExtractBits) \ +V_(SysOp1, 18, 16, ExtractBits) \ +V_(SysOp2, 7, 5, ExtractBits) \ +V_(CRn, 15, 12, ExtractBits) \ +V_(CRm, 11, 8, ExtractBits) \ +V_(ImmRMIFRotation, 20, 15, ExtractBits) \ + \ +/* Load-/store-exclusive */ \ +V_(LdStXLoad, 22, 22, ExtractBits) \ +V_(LdStXNotExclusive, 23, 23, ExtractBits) \ +V_(LdStXAcquireRelease, 15, 15, ExtractBits) \ +V_(LdStXSizeLog2, 31, 30, ExtractBits) \ +V_(LdStXPair, 21, 21, ExtractBits) \ + \ +/* NEON generic fields */ \ +V_(NEONQ, 30, 30, ExtractBits) \ +V_(NEONSize, 23, 22, ExtractBits) \ +V_(NEONLSSize, 11, 10, ExtractBits) \ +V_(NEONS, 12, 12, ExtractBits) \ +V_(NEONL, 21, 21, ExtractBits) \ +V_(NEONM, 20, 20, ExtractBits) \ +V_(NEONH, 11, 11, ExtractBits) \ +V_(ImmNEONExt, 14, 11, ExtractBits) \ +V_(ImmNEON5, 20, 16, ExtractBits) \ +V_(ImmNEON4, 14, 11, ExtractBits) \ + \ +/* NEON extra fields */ \ +V_(ImmRotFcadd, 12, 12, ExtractBits) \ +V_(ImmRotFcmlaVec, 12, 11, ExtractBits) \ +V_(ImmRotFcmlaSca, 14, 13, ExtractBits) \ + \ +/* NEON Modified Immediate fields */ \ +V_(ImmNEONabc, 18, 16, ExtractBits) \ +V_(ImmNEONdefgh, 9, 5, ExtractBits) \ +V_(NEONModImmOp, 29, 29, ExtractBits) \ +V_(NEONCmode, 15, 12, ExtractBits) \ + \ +/* NEON Shift Immediate fields */ \ +V_(ImmNEONImmhImmb, 22, 16, ExtractBits) \ +V_(ImmNEONImmh, 22, 19, ExtractBits) \ +V_(ImmNEONImmb, 18, 16, ExtractBits) \ + \ +/* SVE generic fields */ \ +V_(SVESize, 23, 22, ExtractBits) \ +V_(ImmSVEVLScale, 10, 5, ExtractSignedBits) \ +V_(ImmSVEIntWideSigned, 12, 5, ExtractSignedBits) \ +V_(ImmSVEIntWideUnsigned, 12, 5, ExtractBits) \ +V_(ImmSVEPredicateConstraint, 9, 5, ExtractBits) \ + \ +/* SVE Bitwise Immediate bitfield */ \ +V_(SVEBitN, 17, 17, ExtractBits) \ +V_(SVEImmRotate, 16, 11, ExtractBits) \ +V_(SVEImmSetBits, 10, 5, ExtractBits) \ + \ +V_(SVEImmPrefetchOperation, 3, 0, ExtractBits) \ +V_(SVEPrefetchHint, 3, 3, ExtractBits) + +// clang-format on + +#define SYSTEM_REGISTER_FIELDS_LIST(V_, M_) \ + /* NZCV */ \ + V_(Flags, 31, 28, ExtractBits) \ + V_(N, 31, 31, ExtractBits) \ + V_(Z, 30, 30, ExtractBits) \ + V_(C, 29, 29, ExtractBits) \ + V_(V, 28, 28, ExtractBits) \ + M_(NZCV, Flags_mask) \ + /* FPCR */ \ + V_(AHP, 26, 26, ExtractBits) \ + V_(DN, 25, 25, ExtractBits) \ + V_(FZ, 24, 24, ExtractBits) \ + V_(RMode, 23, 22, ExtractBits) \ + M_(FPCR, AHP_mask | DN_mask | FZ_mask | RMode_mask) + +// Fields offsets. +#define DECLARE_FIELDS_OFFSETS(Name, HighBit, LowBit, X) \ + const int Name##_offset = LowBit; \ + const int Name##_width = HighBit - LowBit + 1; \ + const uint32_t Name##_mask = ((1 << Name##_width) - 1) << LowBit; +#define NOTHING(A, B) +INSTRUCTION_FIELDS_LIST(DECLARE_FIELDS_OFFSETS) +SYSTEM_REGISTER_FIELDS_LIST(DECLARE_FIELDS_OFFSETS, NOTHING) +#undef NOTHING +#undef DECLARE_FIELDS_BITS + +// ImmPCRel is a compound field (not present in INSTRUCTION_FIELDS_LIST), formed +// from ImmPCRelLo and ImmPCRelHi. +const int ImmPCRel_mask = ImmPCRelLo_mask | ImmPCRelHi_mask; + +// Disable `clang-format` for the `enum`s below. We care about the manual +// formatting that `clang-format` would destroy. +// clang-format off + +// Condition codes. +enum Condition { + eq = 0, // Z set Equal. + ne = 1, // Z clear Not equal. + cs = 2, // C set Carry set. + cc = 3, // C clear Carry clear. + mi = 4, // N set Negative. + pl = 5, // N clear Positive or zero. + vs = 6, // V set Overflow. + vc = 7, // V clear No overflow. + hi = 8, // C set, Z clear Unsigned higher. + ls = 9, // C clear or Z set Unsigned lower or same. + ge = 10, // N == V Greater or equal. + lt = 11, // N != V Less than. + gt = 12, // Z clear, N == V Greater than. + le = 13, // Z set or N != V Less then or equal + al = 14, // Always. + nv = 15, // Behaves as always/al. + + // Aliases. + hs = cs, // C set Unsigned higher or same. + lo = cc, // C clear Unsigned lower. + + // Floating-point additional condition code. + uo, // Unordered comparison. + + // SVE predicate condition aliases. + sve_none = eq, // No active elements were true. + sve_any = ne, // An active element was true. + sve_nlast = cs, // The last element was not true. + sve_last = cc, // The last element was true. + sve_first = mi, // The first element was true. + sve_nfrst = pl, // The first element was not true. + sve_pmore = hi, // An active element was true but not the last element. + sve_plast = ls, // The last active element was true or no active elements were true. + sve_tcont = ge, // CTERM termination condition not deleted. + sve_tstop = lt // CTERM termination condition deleted. +}; + +inline Condition InvertCondition(Condition cond) { + // Conditions al and nv behave identically, as "always true". They can't be + // inverted, because there is no "always false" condition. + VIXL_ASSERT((cond != al) && (cond != nv)); + return static_cast(cond ^ 1); +} + +enum FPTrapFlags { + EnableTrap = 1, + DisableTrap = 0 +}; + +enum FlagsUpdate { + SetFlags = 1, + LeaveFlags = 0 +}; + +enum StatusFlags { + NoFlag = 0, + + // Derive the flag combinations from the system register bit descriptions. + NFlag = N_mask, + ZFlag = Z_mask, + CFlag = C_mask, + VFlag = V_mask, + NZFlag = NFlag | ZFlag, + NCFlag = NFlag | CFlag, + NVFlag = NFlag | VFlag, + ZCFlag = ZFlag | CFlag, + ZVFlag = ZFlag | VFlag, + CVFlag = CFlag | VFlag, + NZCFlag = NFlag | ZFlag | CFlag, + NZVFlag = NFlag | ZFlag | VFlag, + NCVFlag = NFlag | CFlag | VFlag, + ZCVFlag = ZFlag | CFlag | VFlag, + NZCVFlag = NFlag | ZFlag | CFlag | VFlag, + + // Floating-point comparison results. + FPEqualFlag = ZCFlag, + FPLessThanFlag = NFlag, + FPGreaterThanFlag = CFlag, + FPUnorderedFlag = CVFlag, + + // SVE condition flags. + SVEFirstFlag = NFlag, + SVENoneFlag = ZFlag, + SVENotLastFlag = CFlag +}; + +enum Shift { + NO_SHIFT = -1, + LSL = 0x0, + LSR = 0x1, + ASR = 0x2, + ROR = 0x3, + MSL = 0x4 +}; + +enum Extend { + NO_EXTEND = -1, + UXTB = 0, + UXTH = 1, + UXTW = 2, + UXTX = 3, + SXTB = 4, + SXTH = 5, + SXTW = 6, + SXTX = 7 +}; + +enum SVEOffsetModifier { + NO_SVE_OFFSET_MODIFIER, + // Multiply (each element of) the offset by either the vector or predicate + // length, according to the context. + SVE_MUL_VL, + // Shift or extend modifiers (as in `Shift` or `Extend`). + SVE_LSL, + SVE_UXTW, + SVE_SXTW +}; + +enum SystemHint { + NOP = 0, + YIELD = 1, + WFE = 2, + WFI = 3, + SEV = 4, + SEVL = 5, + ESB = 16, + CSDB = 20, + BTI = 32, + BTI_c = 34, + BTI_j = 36, + BTI_jc = 38 +}; + +enum BranchTargetIdentifier { + EmitBTI_none = NOP, + EmitBTI = BTI, + EmitBTI_c = BTI_c, + EmitBTI_j = BTI_j, + EmitBTI_jc = BTI_jc, + + // These correspond to the values of the CRm:op2 fields in the equivalent HINT + // instruction. + EmitPACIASP = 25, + EmitPACIBSP = 27 +}; + +enum BarrierDomain { + OuterShareable = 0, + NonShareable = 1, + InnerShareable = 2, + FullSystem = 3 +}; + +enum BarrierType { + BarrierOther = 0, + BarrierReads = 1, + BarrierWrites = 2, + BarrierAll = 3 +}; + +enum PrefetchOperation { + PLDL1KEEP = 0x00, + PLDL1STRM = 0x01, + PLDL2KEEP = 0x02, + PLDL2STRM = 0x03, + PLDL3KEEP = 0x04, + PLDL3STRM = 0x05, + + PrfUnallocated06 = 0x06, + PrfUnallocated07 = 0x07, + + PLIL1KEEP = 0x08, + PLIL1STRM = 0x09, + PLIL2KEEP = 0x0a, + PLIL2STRM = 0x0b, + PLIL3KEEP = 0x0c, + PLIL3STRM = 0x0d, + + PrfUnallocated0e = 0x0e, + PrfUnallocated0f = 0x0f, + + PSTL1KEEP = 0x10, + PSTL1STRM = 0x11, + PSTL2KEEP = 0x12, + PSTL2STRM = 0x13, + PSTL3KEEP = 0x14, + PSTL3STRM = 0x15, + + PrfUnallocated16 = 0x16, + PrfUnallocated17 = 0x17, + PrfUnallocated18 = 0x18, + PrfUnallocated19 = 0x19, + PrfUnallocated1a = 0x1a, + PrfUnallocated1b = 0x1b, + PrfUnallocated1c = 0x1c, + PrfUnallocated1d = 0x1d, + PrfUnallocated1e = 0x1e, + PrfUnallocated1f = 0x1f, +}; + +constexpr bool IsNamedPrefetchOperation(int op) { + return ((op >= PLDL1KEEP) && (op <= PLDL3STRM)) || + ((op >= PLIL1KEEP) && (op <= PLIL3STRM)) || + ((op >= PSTL1KEEP) && (op <= PSTL3STRM)); +} + +enum BType { + // Set when executing any instruction on a guarded page, except those cases + // listed below. + DefaultBType = 0, + + // Set when an indirect branch is taken from an unguarded page to a guarded + // page, or from a guarded page to ip0 or ip1 (x16 or x17), eg "br ip0". + BranchFromUnguardedOrToIP = 1, + + // Set when an indirect branch and link (call) is taken, eg. "blr x0". + BranchAndLink = 2, + + // Set when an indirect branch is taken from a guarded page to a register + // that is not ip0 or ip1 (x16 or x17), eg, "br x0". + BranchFromGuardedNotToIP = 3 +}; + +template +class SystemRegisterEncoder { + public: + static const uint32_t value = + ((op0 << SysO0_offset) | + (op1 << SysOp1_offset) | + (crn << CRn_offset) | + (crm << CRm_offset) | + (op2 << SysOp2_offset)) >> ImmSystemRegister_offset; +}; + +// System/special register names. +// This information is not encoded as one field but as the concatenation of +// multiple fields (Op0, Op1, Crn, Crm, Op2). +enum SystemRegister { + NZCV = SystemRegisterEncoder<3, 3, 4, 2, 0>::value, + FPCR = SystemRegisterEncoder<3, 3, 4, 4, 0>::value, + RNDR = SystemRegisterEncoder<3, 3, 2, 4, 0>::value, // Random number. + RNDRRS = SystemRegisterEncoder<3, 3, 2, 4, 1>::value // Reseeded random number. +}; + +template +class CacheOpEncoder { + public: + static const uint32_t value = + ((op1 << SysOp1_offset) | + (crn << CRn_offset) | + (crm << CRm_offset) | + (op2 << SysOp2_offset)) >> SysOp_offset; +}; + +enum InstructionCacheOp { + IVAU = CacheOpEncoder<3, 7, 5, 1>::value +}; + +enum DataCacheOp { + CVAC = CacheOpEncoder<3, 7, 10, 1>::value, + CVAU = CacheOpEncoder<3, 7, 11, 1>::value, + CVAP = CacheOpEncoder<3, 7, 12, 1>::value, + CVADP = CacheOpEncoder<3, 7, 13, 1>::value, + CIVAC = CacheOpEncoder<3, 7, 14, 1>::value, + ZVA = CacheOpEncoder<3, 7, 4, 1>::value +}; + +// Some SVE instructions support a predicate constraint pattern. This is +// interpreted as a VL-dependent value, and is typically used to initialise +// predicates, or to otherwise limit the number of processed elements. +enum SVEPredicateConstraint { + // Select 2^N elements, for the largest possible N. + SVE_POW2 = 0x0, + // Each VL selects exactly N elements if possible, or zero if N is greater + // than the number of elements. Note that the encoding values for VL are + // not linearly related to N. + SVE_VL1 = 0x1, + SVE_VL2 = 0x2, + SVE_VL3 = 0x3, + SVE_VL4 = 0x4, + SVE_VL5 = 0x5, + SVE_VL6 = 0x6, + SVE_VL7 = 0x7, + SVE_VL8 = 0x8, + SVE_VL16 = 0x9, + SVE_VL32 = 0xa, + SVE_VL64 = 0xb, + SVE_VL128 = 0xc, + SVE_VL256 = 0xd, + // Each MUL selects the largest multiple of N elements that the vector + // length supports. Note that for D-sized lanes, this can be zero. + SVE_MUL4 = 0x1d, + SVE_MUL3 = 0x1e, + // Select all elements. + SVE_ALL = 0x1f +}; + +// Instruction enumerations. +// +// These are the masks that define a class of instructions, and the list of +// instructions within each class. Each enumeration has a Fixed, FMask and +// Mask value. +// +// Fixed: The fixed bits in this instruction class. +// FMask: The mask used to extract the fixed bits in the class. +// Mask: The mask used to identify the instructions within a class. +// +// The enumerations can be used like this: +// +// VIXL_ASSERT(instr->Mask(PCRelAddressingFMask) == PCRelAddressingFixed); +// switch(instr->Mask(PCRelAddressingMask)) { +// case ADR: Format("adr 'Xd, 'AddrPCRelByte"); break; +// case ADRP: Format("adrp 'Xd, 'AddrPCRelPage"); break; +// default: printf("Unknown instruction\n"); +// } + + +// Generic fields. +enum GenericInstrField { + SixtyFourBits = 0x80000000, + ThirtyTwoBits = 0x00000000, + + FPTypeMask = 0x00C00000, + FP16 = 0x00C00000, + FP32 = 0x00000000, + FP64 = 0x00400000 +}; + +enum NEONFormatField { + NEONFormatFieldMask = 0x40C00000, + NEON_Q = 0x40000000, + NEON_8B = 0x00000000, + NEON_16B = NEON_8B | NEON_Q, + NEON_4H = 0x00400000, + NEON_8H = NEON_4H | NEON_Q, + NEON_2S = 0x00800000, + NEON_4S = NEON_2S | NEON_Q, + NEON_1D = 0x00C00000, + NEON_2D = 0x00C00000 | NEON_Q +}; + +enum NEONFPFormatField { + NEONFPFormatFieldMask = 0x40400000, + NEON_FP_4H = FP16, + NEON_FP_2S = FP32, + NEON_FP_8H = FP16 | NEON_Q, + NEON_FP_4S = FP32 | NEON_Q, + NEON_FP_2D = FP64 | NEON_Q +}; + +enum NEONLSFormatField { + NEONLSFormatFieldMask = 0x40000C00, + LS_NEON_8B = 0x00000000, + LS_NEON_16B = LS_NEON_8B | NEON_Q, + LS_NEON_4H = 0x00000400, + LS_NEON_8H = LS_NEON_4H | NEON_Q, + LS_NEON_2S = 0x00000800, + LS_NEON_4S = LS_NEON_2S | NEON_Q, + LS_NEON_1D = 0x00000C00, + LS_NEON_2D = LS_NEON_1D | NEON_Q +}; + +enum NEONScalarFormatField { + NEONScalarFormatFieldMask = 0x00C00000, + NEONScalar = 0x10000000, + NEON_B = 0x00000000, + NEON_H = 0x00400000, + NEON_S = 0x00800000, + NEON_D = 0x00C00000 +}; + +enum SVESizeField { + SVESizeFieldMask = 0x00C00000, + SVE_B = 0x00000000, + SVE_H = 0x00400000, + SVE_S = 0x00800000, + SVE_D = 0x00C00000 +}; + +// PC relative addressing. +enum PCRelAddressingOp { + PCRelAddressingFixed = 0x10000000, + PCRelAddressingFMask = 0x1F000000, + PCRelAddressingMask = 0x9F000000, + ADR = PCRelAddressingFixed | 0x00000000, + ADRP = PCRelAddressingFixed | 0x80000000 +}; + +// Add/sub (immediate, shifted and extended.) +const int kSFOffset = 31; +enum AddSubOp { + AddSubOpMask = 0x60000000, + AddSubSetFlagsBit = 0x20000000, + ADD = 0x00000000, + ADDS = ADD | AddSubSetFlagsBit, + SUB = 0x40000000, + SUBS = SUB | AddSubSetFlagsBit +}; + +#define ADD_SUB_OP_LIST(V) \ + V(ADD), \ + V(ADDS), \ + V(SUB), \ + V(SUBS) + +enum AddSubImmediateOp { + AddSubImmediateFixed = 0x11000000, + AddSubImmediateFMask = 0x1F800000, + AddSubImmediateMask = 0xFF800000, + #define ADD_SUB_IMMEDIATE(A) \ + A##_w_imm = AddSubImmediateFixed | A, \ + A##_x_imm = AddSubImmediateFixed | A | SixtyFourBits + ADD_SUB_OP_LIST(ADD_SUB_IMMEDIATE) + #undef ADD_SUB_IMMEDIATE +}; + +enum AddSubShiftedOp { + AddSubShiftedFixed = 0x0B000000, + AddSubShiftedFMask = 0x1F200000, + AddSubShiftedMask = 0xFF200000, + #define ADD_SUB_SHIFTED(A) \ + A##_w_shift = AddSubShiftedFixed | A, \ + A##_x_shift = AddSubShiftedFixed | A | SixtyFourBits + ADD_SUB_OP_LIST(ADD_SUB_SHIFTED) + #undef ADD_SUB_SHIFTED +}; + +enum AddSubExtendedOp { + AddSubExtendedFixed = 0x0B200000, + AddSubExtendedFMask = 0x1F200000, + AddSubExtendedMask = 0xFFE00000, + #define ADD_SUB_EXTENDED(A) \ + A##_w_ext = AddSubExtendedFixed | A, \ + A##_x_ext = AddSubExtendedFixed | A | SixtyFourBits + ADD_SUB_OP_LIST(ADD_SUB_EXTENDED) + #undef ADD_SUB_EXTENDED +}; + +// Add/sub with carry. +enum AddSubWithCarryOp { + AddSubWithCarryFixed = 0x1A000000, + AddSubWithCarryFMask = 0x1FE00000, + AddSubWithCarryMask = 0xFFE0FC00, + ADC_w = AddSubWithCarryFixed | ADD, + ADC_x = AddSubWithCarryFixed | ADD | SixtyFourBits, + ADC = ADC_w, + ADCS_w = AddSubWithCarryFixed | ADDS, + ADCS_x = AddSubWithCarryFixed | ADDS | SixtyFourBits, + SBC_w = AddSubWithCarryFixed | SUB, + SBC_x = AddSubWithCarryFixed | SUB | SixtyFourBits, + SBC = SBC_w, + SBCS_w = AddSubWithCarryFixed | SUBS, + SBCS_x = AddSubWithCarryFixed | SUBS | SixtyFourBits +}; + +// Rotate right into flags. +enum RotateRightIntoFlagsOp { + RotateRightIntoFlagsFixed = 0x1A000400, + RotateRightIntoFlagsFMask = 0x1FE07C00, + RotateRightIntoFlagsMask = 0xFFE07C10, + RMIF = RotateRightIntoFlagsFixed | 0xA0000000 +}; + +// Evaluate into flags. +enum EvaluateIntoFlagsOp { + EvaluateIntoFlagsFixed = 0x1A000800, + EvaluateIntoFlagsFMask = 0x1FE03C00, + EvaluateIntoFlagsMask = 0xFFE07C1F, + SETF8 = EvaluateIntoFlagsFixed | 0x2000000D, + SETF16 = EvaluateIntoFlagsFixed | 0x2000400D +}; + + +// Logical (immediate and shifted register). +enum LogicalOp { + LogicalOpMask = 0x60200000, + NOT = 0x00200000, + AND = 0x00000000, + BIC = AND | NOT, + ORR = 0x20000000, + ORN = ORR | NOT, + EOR = 0x40000000, + EON = EOR | NOT, + ANDS = 0x60000000, + BICS = ANDS | NOT +}; + +// Logical immediate. +enum LogicalImmediateOp { + LogicalImmediateFixed = 0x12000000, + LogicalImmediateFMask = 0x1F800000, + LogicalImmediateMask = 0xFF800000, + AND_w_imm = LogicalImmediateFixed | AND, + AND_x_imm = LogicalImmediateFixed | AND | SixtyFourBits, + ORR_w_imm = LogicalImmediateFixed | ORR, + ORR_x_imm = LogicalImmediateFixed | ORR | SixtyFourBits, + EOR_w_imm = LogicalImmediateFixed | EOR, + EOR_x_imm = LogicalImmediateFixed | EOR | SixtyFourBits, + ANDS_w_imm = LogicalImmediateFixed | ANDS, + ANDS_x_imm = LogicalImmediateFixed | ANDS | SixtyFourBits +}; + +// Logical shifted register. +enum LogicalShiftedOp { + LogicalShiftedFixed = 0x0A000000, + LogicalShiftedFMask = 0x1F000000, + LogicalShiftedMask = 0xFF200000, + AND_w = LogicalShiftedFixed | AND, + AND_x = LogicalShiftedFixed | AND | SixtyFourBits, + AND_shift = AND_w, + BIC_w = LogicalShiftedFixed | BIC, + BIC_x = LogicalShiftedFixed | BIC | SixtyFourBits, + BIC_shift = BIC_w, + ORR_w = LogicalShiftedFixed | ORR, + ORR_x = LogicalShiftedFixed | ORR | SixtyFourBits, + ORR_shift = ORR_w, + ORN_w = LogicalShiftedFixed | ORN, + ORN_x = LogicalShiftedFixed | ORN | SixtyFourBits, + ORN_shift = ORN_w, + EOR_w = LogicalShiftedFixed | EOR, + EOR_x = LogicalShiftedFixed | EOR | SixtyFourBits, + EOR_shift = EOR_w, + EON_w = LogicalShiftedFixed | EON, + EON_x = LogicalShiftedFixed | EON | SixtyFourBits, + EON_shift = EON_w, + ANDS_w = LogicalShiftedFixed | ANDS, + ANDS_x = LogicalShiftedFixed | ANDS | SixtyFourBits, + ANDS_shift = ANDS_w, + BICS_w = LogicalShiftedFixed | BICS, + BICS_x = LogicalShiftedFixed | BICS | SixtyFourBits, + BICS_shift = BICS_w +}; + +// Move wide immediate. +enum MoveWideImmediateOp { + MoveWideImmediateFixed = 0x12800000, + MoveWideImmediateFMask = 0x1F800000, + MoveWideImmediateMask = 0xFF800000, + MOVN = 0x00000000, + MOVZ = 0x40000000, + MOVK = 0x60000000, + MOVN_w = MoveWideImmediateFixed | MOVN, + MOVN_x = MoveWideImmediateFixed | MOVN | SixtyFourBits, + MOVZ_w = MoveWideImmediateFixed | MOVZ, + MOVZ_x = MoveWideImmediateFixed | MOVZ | SixtyFourBits, + MOVK_w = MoveWideImmediateFixed | MOVK, + MOVK_x = MoveWideImmediateFixed | MOVK | SixtyFourBits +}; + +// Bitfield. +const int kBitfieldNOffset = 22; +enum BitfieldOp { + BitfieldFixed = 0x13000000, + BitfieldFMask = 0x1F800000, + BitfieldMask = 0xFF800000, + SBFM_w = BitfieldFixed | 0x00000000, + SBFM_x = BitfieldFixed | 0x80000000, + SBFM = SBFM_w, + BFM_w = BitfieldFixed | 0x20000000, + BFM_x = BitfieldFixed | 0xA0000000, + BFM = BFM_w, + UBFM_w = BitfieldFixed | 0x40000000, + UBFM_x = BitfieldFixed | 0xC0000000, + UBFM = UBFM_w + // Bitfield N field. +}; + +// Extract. +enum ExtractOp { + ExtractFixed = 0x13800000, + ExtractFMask = 0x1F800000, + ExtractMask = 0xFFA00000, + EXTR_w = ExtractFixed | 0x00000000, + EXTR_x = ExtractFixed | 0x80000000, + EXTR = EXTR_w +}; + +// Unconditional branch. +enum UnconditionalBranchOp { + UnconditionalBranchFixed = 0x14000000, + UnconditionalBranchFMask = 0x7C000000, + UnconditionalBranchMask = 0xFC000000, + B = UnconditionalBranchFixed | 0x00000000, + BL = UnconditionalBranchFixed | 0x80000000 +}; + +// Unconditional branch to register. +enum UnconditionalBranchToRegisterOp { + UnconditionalBranchToRegisterFixed = 0xD6000000, + UnconditionalBranchToRegisterFMask = 0xFE000000, + UnconditionalBranchToRegisterMask = 0xFFFFFC00, + BR = UnconditionalBranchToRegisterFixed | 0x001F0000, + BLR = UnconditionalBranchToRegisterFixed | 0x003F0000, + RET = UnconditionalBranchToRegisterFixed | 0x005F0000, + + BRAAZ = UnconditionalBranchToRegisterFixed | 0x001F0800, + BRABZ = UnconditionalBranchToRegisterFixed | 0x001F0C00, + BLRAAZ = UnconditionalBranchToRegisterFixed | 0x003F0800, + BLRABZ = UnconditionalBranchToRegisterFixed | 0x003F0C00, + RETAA = UnconditionalBranchToRegisterFixed | 0x005F0800, + RETAB = UnconditionalBranchToRegisterFixed | 0x005F0C00, + BRAA = UnconditionalBranchToRegisterFixed | 0x011F0800, + BRAB = UnconditionalBranchToRegisterFixed | 0x011F0C00, + BLRAA = UnconditionalBranchToRegisterFixed | 0x013F0800, + BLRAB = UnconditionalBranchToRegisterFixed | 0x013F0C00 +}; + +// Compare and branch. +enum CompareBranchOp { + CompareBranchFixed = 0x34000000, + CompareBranchFMask = 0x7E000000, + CompareBranchMask = 0xFF000000, + CBZ_w = CompareBranchFixed | 0x00000000, + CBZ_x = CompareBranchFixed | 0x80000000, + CBZ = CBZ_w, + CBNZ_w = CompareBranchFixed | 0x01000000, + CBNZ_x = CompareBranchFixed | 0x81000000, + CBNZ = CBNZ_w +}; + +// Test and branch. +enum TestBranchOp { + TestBranchFixed = 0x36000000, + TestBranchFMask = 0x7E000000, + TestBranchMask = 0x7F000000, + TBZ = TestBranchFixed | 0x00000000, + TBNZ = TestBranchFixed | 0x01000000 +}; + +// Conditional branch. +enum ConditionalBranchOp { + ConditionalBranchFixed = 0x54000000, + ConditionalBranchFMask = 0xFE000000, + ConditionalBranchMask = 0xFF000010, + B_cond = ConditionalBranchFixed | 0x00000000 +}; + +// System. +// System instruction encoding is complicated because some instructions use op +// and CR fields to encode parameters. To handle this cleanly, the system +// instructions are split into more than one enum. + +enum SystemOp { + SystemFixed = 0xD5000000, + SystemFMask = 0xFFC00000 +}; + +enum SystemSysRegOp { + SystemSysRegFixed = 0xD5100000, + SystemSysRegFMask = 0xFFD00000, + SystemSysRegMask = 0xFFF00000, + MRS = SystemSysRegFixed | 0x00200000, + MSR = SystemSysRegFixed | 0x00000000 +}; + +enum SystemPStateOp { + SystemPStateFixed = 0xD5004000, + SystemPStateFMask = 0xFFF8F000, + SystemPStateMask = 0xFFFFF0FF, + CFINV = SystemPStateFixed | 0x0000001F, + XAFLAG = SystemPStateFixed | 0x0000003F, + AXFLAG = SystemPStateFixed | 0x0000005F +}; + +enum SystemHintOp { + SystemHintFixed = 0xD503201F, + SystemHintFMask = 0xFFFFF01F, + SystemHintMask = 0xFFFFF01F, + HINT = SystemHintFixed | 0x00000000 +}; + +enum SystemSysOp { + SystemSysFixed = 0xD5080000, + SystemSysFMask = 0xFFF80000, + SystemSysMask = 0xFFF80000, + SYS = SystemSysFixed | 0x00000000 +}; + +// Exception. +enum ExceptionOp { + ExceptionFixed = 0xD4000000, + ExceptionFMask = 0xFF000000, + ExceptionMask = 0xFFE0001F, + HLT = ExceptionFixed | 0x00400000, + BRK = ExceptionFixed | 0x00200000, + SVC = ExceptionFixed | 0x00000001, + HVC = ExceptionFixed | 0x00000002, + SMC = ExceptionFixed | 0x00000003, + DCPS1 = ExceptionFixed | 0x00A00001, + DCPS2 = ExceptionFixed | 0x00A00002, + DCPS3 = ExceptionFixed | 0x00A00003 +}; + +enum MemBarrierOp { + MemBarrierFixed = 0xD503309F, + MemBarrierFMask = 0xFFFFF09F, + MemBarrierMask = 0xFFFFF0FF, + DSB = MemBarrierFixed | 0x00000000, + DMB = MemBarrierFixed | 0x00000020, + ISB = MemBarrierFixed | 0x00000040 +}; + +enum SystemExclusiveMonitorOp { + SystemExclusiveMonitorFixed = 0xD503305F, + SystemExclusiveMonitorFMask = 0xFFFFF0FF, + SystemExclusiveMonitorMask = 0xFFFFF0FF, + CLREX = SystemExclusiveMonitorFixed +}; + +enum SystemPAuthOp { + SystemPAuthFixed = 0xD503211F, + SystemPAuthFMask = 0xFFFFFD1F, + SystemPAuthMask = 0xFFFFFFFF, + PACIA1716 = SystemPAuthFixed | 0x00000100, + PACIB1716 = SystemPAuthFixed | 0x00000140, + AUTIA1716 = SystemPAuthFixed | 0x00000180, + AUTIB1716 = SystemPAuthFixed | 0x000001C0, + PACIAZ = SystemPAuthFixed | 0x00000300, + PACIASP = SystemPAuthFixed | 0x00000320, + PACIBZ = SystemPAuthFixed | 0x00000340, + PACIBSP = SystemPAuthFixed | 0x00000360, + AUTIAZ = SystemPAuthFixed | 0x00000380, + AUTIASP = SystemPAuthFixed | 0x000003A0, + AUTIBZ = SystemPAuthFixed | 0x000003C0, + AUTIBSP = SystemPAuthFixed | 0x000003E0, + + // XPACLRI has the same fixed mask as System Hints and needs to be handled + // differently. + XPACLRI = 0xD50320FF +}; + +// Any load or store. +enum LoadStoreAnyOp { + LoadStoreAnyFMask = 0x0a000000, + LoadStoreAnyFixed = 0x08000000 +}; + +// Any load pair or store pair. +enum LoadStorePairAnyOp { + LoadStorePairAnyFMask = 0x3a000000, + LoadStorePairAnyFixed = 0x28000000 +}; + +#define LOAD_STORE_PAIR_OP_LIST(V) \ + V(STP, w, 0x00000000), \ + V(LDP, w, 0x00400000), \ + V(LDPSW, x, 0x40400000), \ + V(STP, x, 0x80000000), \ + V(LDP, x, 0x80400000), \ + V(STP, s, 0x04000000), \ + V(LDP, s, 0x04400000), \ + V(STP, d, 0x44000000), \ + V(LDP, d, 0x44400000), \ + V(STP, q, 0x84000000), \ + V(LDP, q, 0x84400000) + +// Load/store pair (post, pre and offset.) +enum LoadStorePairOp { + LoadStorePairMask = 0xC4400000, + LoadStorePairLBit = 1 << 22, + #define LOAD_STORE_PAIR(A, B, C) \ + A##_##B = C + LOAD_STORE_PAIR_OP_LIST(LOAD_STORE_PAIR) + #undef LOAD_STORE_PAIR +}; + +enum LoadStorePairPostIndexOp { + LoadStorePairPostIndexFixed = 0x28800000, + LoadStorePairPostIndexFMask = 0x3B800000, + LoadStorePairPostIndexMask = 0xFFC00000, + #define LOAD_STORE_PAIR_POST_INDEX(A, B, C) \ + A##_##B##_post = LoadStorePairPostIndexFixed | A##_##B + LOAD_STORE_PAIR_OP_LIST(LOAD_STORE_PAIR_POST_INDEX) + #undef LOAD_STORE_PAIR_POST_INDEX +}; + +enum LoadStorePairPreIndexOp { + LoadStorePairPreIndexFixed = 0x29800000, + LoadStorePairPreIndexFMask = 0x3B800000, + LoadStorePairPreIndexMask = 0xFFC00000, + #define LOAD_STORE_PAIR_PRE_INDEX(A, B, C) \ + A##_##B##_pre = LoadStorePairPreIndexFixed | A##_##B + LOAD_STORE_PAIR_OP_LIST(LOAD_STORE_PAIR_PRE_INDEX) + #undef LOAD_STORE_PAIR_PRE_INDEX +}; + +enum LoadStorePairOffsetOp { + LoadStorePairOffsetFixed = 0x29000000, + LoadStorePairOffsetFMask = 0x3B800000, + LoadStorePairOffsetMask = 0xFFC00000, + #define LOAD_STORE_PAIR_OFFSET(A, B, C) \ + A##_##B##_off = LoadStorePairOffsetFixed | A##_##B + LOAD_STORE_PAIR_OP_LIST(LOAD_STORE_PAIR_OFFSET) + #undef LOAD_STORE_PAIR_OFFSET +}; + +enum LoadStorePairNonTemporalOp { + LoadStorePairNonTemporalFixed = 0x28000000, + LoadStorePairNonTemporalFMask = 0x3B800000, + LoadStorePairNonTemporalMask = 0xFFC00000, + LoadStorePairNonTemporalLBit = 1 << 22, + STNP_w = LoadStorePairNonTemporalFixed | STP_w, + LDNP_w = LoadStorePairNonTemporalFixed | LDP_w, + STNP_x = LoadStorePairNonTemporalFixed | STP_x, + LDNP_x = LoadStorePairNonTemporalFixed | LDP_x, + STNP_s = LoadStorePairNonTemporalFixed | STP_s, + LDNP_s = LoadStorePairNonTemporalFixed | LDP_s, + STNP_d = LoadStorePairNonTemporalFixed | STP_d, + LDNP_d = LoadStorePairNonTemporalFixed | LDP_d, + STNP_q = LoadStorePairNonTemporalFixed | STP_q, + LDNP_q = LoadStorePairNonTemporalFixed | LDP_q +}; + +// Load with pointer authentication. +enum LoadStorePACOp { + LoadStorePACFixed = 0xF8200400, + LoadStorePACFMask = 0xFF200400, + LoadStorePACMask = 0xFFA00C00, + LoadStorePACPreBit = 0x00000800, + LDRAA = LoadStorePACFixed | 0x00000000, + LDRAA_pre = LoadStorePACPreBit | LDRAA, + LDRAB = LoadStorePACFixed | 0x00800000, + LDRAB_pre = LoadStorePACPreBit | LDRAB +}; + +// Load literal. +enum LoadLiteralOp { + LoadLiteralFixed = 0x18000000, + LoadLiteralFMask = 0x3B000000, + LoadLiteralMask = 0xFF000000, + LDR_w_lit = LoadLiteralFixed | 0x00000000, + LDR_x_lit = LoadLiteralFixed | 0x40000000, + LDRSW_x_lit = LoadLiteralFixed | 0x80000000, + PRFM_lit = LoadLiteralFixed | 0xC0000000, + LDR_s_lit = LoadLiteralFixed | 0x04000000, + LDR_d_lit = LoadLiteralFixed | 0x44000000, + LDR_q_lit = LoadLiteralFixed | 0x84000000 +}; + +#define LOAD_STORE_OP_LIST(V) \ + V(ST, RB, w, 0x00000000), \ + V(ST, RH, w, 0x40000000), \ + V(ST, R, w, 0x80000000), \ + V(ST, R, x, 0xC0000000), \ + V(LD, RB, w, 0x00400000), \ + V(LD, RH, w, 0x40400000), \ + V(LD, R, w, 0x80400000), \ + V(LD, R, x, 0xC0400000), \ + V(LD, RSB, x, 0x00800000), \ + V(LD, RSH, x, 0x40800000), \ + V(LD, RSW, x, 0x80800000), \ + V(LD, RSB, w, 0x00C00000), \ + V(LD, RSH, w, 0x40C00000), \ + V(ST, R, b, 0x04000000), \ + V(ST, R, h, 0x44000000), \ + V(ST, R, s, 0x84000000), \ + V(ST, R, d, 0xC4000000), \ + V(ST, R, q, 0x04800000), \ + V(LD, R, b, 0x04400000), \ + V(LD, R, h, 0x44400000), \ + V(LD, R, s, 0x84400000), \ + V(LD, R, d, 0xC4400000), \ + V(LD, R, q, 0x04C00000) + +// Load/store (post, pre, offset and unsigned.) +enum LoadStoreOp { + LoadStoreMask = 0xC4C00000, + LoadStoreVMask = 0x04000000, + #define LOAD_STORE(A, B, C, D) \ + A##B##_##C = D + LOAD_STORE_OP_LIST(LOAD_STORE), + #undef LOAD_STORE + PRFM = 0xC0800000 +}; + +// Load/store unscaled offset. +enum LoadStoreUnscaledOffsetOp { + LoadStoreUnscaledOffsetFixed = 0x38000000, + LoadStoreUnscaledOffsetFMask = 0x3B200C00, + LoadStoreUnscaledOffsetMask = 0xFFE00C00, + PRFUM = LoadStoreUnscaledOffsetFixed | PRFM, + #define LOAD_STORE_UNSCALED(A, B, C, D) \ + A##U##B##_##C = LoadStoreUnscaledOffsetFixed | D + LOAD_STORE_OP_LIST(LOAD_STORE_UNSCALED) + #undef LOAD_STORE_UNSCALED +}; + +// Load/store post index. +enum LoadStorePostIndex { + LoadStorePostIndexFixed = 0x38000400, + LoadStorePostIndexFMask = 0x3B200C00, + LoadStorePostIndexMask = 0xFFE00C00, + #define LOAD_STORE_POST_INDEX(A, B, C, D) \ + A##B##_##C##_post = LoadStorePostIndexFixed | D + LOAD_STORE_OP_LIST(LOAD_STORE_POST_INDEX) + #undef LOAD_STORE_POST_INDEX +}; + +// Load/store pre index. +enum LoadStorePreIndex { + LoadStorePreIndexFixed = 0x38000C00, + LoadStorePreIndexFMask = 0x3B200C00, + LoadStorePreIndexMask = 0xFFE00C00, + #define LOAD_STORE_PRE_INDEX(A, B, C, D) \ + A##B##_##C##_pre = LoadStorePreIndexFixed | D + LOAD_STORE_OP_LIST(LOAD_STORE_PRE_INDEX) + #undef LOAD_STORE_PRE_INDEX +}; + +// Load/store unsigned offset. +enum LoadStoreUnsignedOffset { + LoadStoreUnsignedOffsetFixed = 0x39000000, + LoadStoreUnsignedOffsetFMask = 0x3B000000, + LoadStoreUnsignedOffsetMask = 0xFFC00000, + PRFM_unsigned = LoadStoreUnsignedOffsetFixed | PRFM, + #define LOAD_STORE_UNSIGNED_OFFSET(A, B, C, D) \ + A##B##_##C##_unsigned = LoadStoreUnsignedOffsetFixed | D + LOAD_STORE_OP_LIST(LOAD_STORE_UNSIGNED_OFFSET) + #undef LOAD_STORE_UNSIGNED_OFFSET +}; + +// Load/store register offset. +enum LoadStoreRegisterOffset { + LoadStoreRegisterOffsetFixed = 0x38200800, + LoadStoreRegisterOffsetFMask = 0x3B200C00, + LoadStoreRegisterOffsetMask = 0xFFE00C00, + PRFM_reg = LoadStoreRegisterOffsetFixed | PRFM, + #define LOAD_STORE_REGISTER_OFFSET(A, B, C, D) \ + A##B##_##C##_reg = LoadStoreRegisterOffsetFixed | D + LOAD_STORE_OP_LIST(LOAD_STORE_REGISTER_OFFSET) + #undef LOAD_STORE_REGISTER_OFFSET +}; + +enum LoadStoreExclusive { + LoadStoreExclusiveFixed = 0x08000000, + LoadStoreExclusiveFMask = 0x3F000000, + LoadStoreExclusiveMask = 0xFFE08000, + STXRB_w = LoadStoreExclusiveFixed | 0x00000000, + STXRH_w = LoadStoreExclusiveFixed | 0x40000000, + STXR_w = LoadStoreExclusiveFixed | 0x80000000, + STXR_x = LoadStoreExclusiveFixed | 0xC0000000, + LDXRB_w = LoadStoreExclusiveFixed | 0x00400000, + LDXRH_w = LoadStoreExclusiveFixed | 0x40400000, + LDXR_w = LoadStoreExclusiveFixed | 0x80400000, + LDXR_x = LoadStoreExclusiveFixed | 0xC0400000, + STXP_w = LoadStoreExclusiveFixed | 0x80200000, + STXP_x = LoadStoreExclusiveFixed | 0xC0200000, + LDXP_w = LoadStoreExclusiveFixed | 0x80600000, + LDXP_x = LoadStoreExclusiveFixed | 0xC0600000, + STLXRB_w = LoadStoreExclusiveFixed | 0x00008000, + STLXRH_w = LoadStoreExclusiveFixed | 0x40008000, + STLXR_w = LoadStoreExclusiveFixed | 0x80008000, + STLXR_x = LoadStoreExclusiveFixed | 0xC0008000, + LDAXRB_w = LoadStoreExclusiveFixed | 0x00408000, + LDAXRH_w = LoadStoreExclusiveFixed | 0x40408000, + LDAXR_w = LoadStoreExclusiveFixed | 0x80408000, + LDAXR_x = LoadStoreExclusiveFixed | 0xC0408000, + STLXP_w = LoadStoreExclusiveFixed | 0x80208000, + STLXP_x = LoadStoreExclusiveFixed | 0xC0208000, + LDAXP_w = LoadStoreExclusiveFixed | 0x80608000, + LDAXP_x = LoadStoreExclusiveFixed | 0xC0608000, + STLRB_w = LoadStoreExclusiveFixed | 0x00808000, + STLRH_w = LoadStoreExclusiveFixed | 0x40808000, + STLR_w = LoadStoreExclusiveFixed | 0x80808000, + STLR_x = LoadStoreExclusiveFixed | 0xC0808000, + LDARB_w = LoadStoreExclusiveFixed | 0x00C08000, + LDARH_w = LoadStoreExclusiveFixed | 0x40C08000, + LDAR_w = LoadStoreExclusiveFixed | 0x80C08000, + LDAR_x = LoadStoreExclusiveFixed | 0xC0C08000, + + // v8.1 Load/store LORegion ops + STLLRB = LoadStoreExclusiveFixed | 0x00800000, + LDLARB = LoadStoreExclusiveFixed | 0x00C00000, + STLLRH = LoadStoreExclusiveFixed | 0x40800000, + LDLARH = LoadStoreExclusiveFixed | 0x40C00000, + STLLR_w = LoadStoreExclusiveFixed | 0x80800000, + LDLAR_w = LoadStoreExclusiveFixed | 0x80C00000, + STLLR_x = LoadStoreExclusiveFixed | 0xC0800000, + LDLAR_x = LoadStoreExclusiveFixed | 0xC0C00000, + + // v8.1 Load/store exclusive ops + LSEBit_l = 0x00400000, + LSEBit_o0 = 0x00008000, + LSEBit_sz = 0x40000000, + CASFixed = LoadStoreExclusiveFixed | 0x80A00000, + CASBFixed = LoadStoreExclusiveFixed | 0x00A00000, + CASHFixed = LoadStoreExclusiveFixed | 0x40A00000, + CASPFixed = LoadStoreExclusiveFixed | 0x00200000, + CAS_w = CASFixed, + CAS_x = CASFixed | LSEBit_sz, + CASA_w = CASFixed | LSEBit_l, + CASA_x = CASFixed | LSEBit_l | LSEBit_sz, + CASL_w = CASFixed | LSEBit_o0, + CASL_x = CASFixed | LSEBit_o0 | LSEBit_sz, + CASAL_w = CASFixed | LSEBit_l | LSEBit_o0, + CASAL_x = CASFixed | LSEBit_l | LSEBit_o0 | LSEBit_sz, + CASB = CASBFixed, + CASAB = CASBFixed | LSEBit_l, + CASLB = CASBFixed | LSEBit_o0, + CASALB = CASBFixed | LSEBit_l | LSEBit_o0, + CASH = CASHFixed, + CASAH = CASHFixed | LSEBit_l, + CASLH = CASHFixed | LSEBit_o0, + CASALH = CASHFixed | LSEBit_l | LSEBit_o0, + CASP_w = CASPFixed, + CASP_x = CASPFixed | LSEBit_sz, + CASPA_w = CASPFixed | LSEBit_l, + CASPA_x = CASPFixed | LSEBit_l | LSEBit_sz, + CASPL_w = CASPFixed | LSEBit_o0, + CASPL_x = CASPFixed | LSEBit_o0 | LSEBit_sz, + CASPAL_w = CASPFixed | LSEBit_l | LSEBit_o0, + CASPAL_x = CASPFixed | LSEBit_l | LSEBit_o0 | LSEBit_sz +}; + +// Load/store RCpc unscaled offset. +enum LoadStoreRCpcUnscaledOffsetOp { + LoadStoreRCpcUnscaledOffsetFixed = 0x19000000, + LoadStoreRCpcUnscaledOffsetFMask = 0x3F200C00, + LoadStoreRCpcUnscaledOffsetMask = 0xFFE00C00, + STLURB = LoadStoreRCpcUnscaledOffsetFixed | 0x00000000, + LDAPURB = LoadStoreRCpcUnscaledOffsetFixed | 0x00400000, + LDAPURSB_x = LoadStoreRCpcUnscaledOffsetFixed | 0x00800000, + LDAPURSB_w = LoadStoreRCpcUnscaledOffsetFixed | 0x00C00000, + STLURH = LoadStoreRCpcUnscaledOffsetFixed | 0x40000000, + LDAPURH = LoadStoreRCpcUnscaledOffsetFixed | 0x40400000, + LDAPURSH_x = LoadStoreRCpcUnscaledOffsetFixed | 0x40800000, + LDAPURSH_w = LoadStoreRCpcUnscaledOffsetFixed | 0x40C00000, + STLUR_w = LoadStoreRCpcUnscaledOffsetFixed | 0x80000000, + LDAPUR_w = LoadStoreRCpcUnscaledOffsetFixed | 0x80400000, + LDAPURSW = LoadStoreRCpcUnscaledOffsetFixed | 0x80800000, + STLUR_x = LoadStoreRCpcUnscaledOffsetFixed | 0xC0000000, + LDAPUR_x = LoadStoreRCpcUnscaledOffsetFixed | 0xC0400000 +}; + +#define ATOMIC_MEMORY_SIMPLE_OPC_LIST(V) \ + V(LDADD, 0x00000000), \ + V(LDCLR, 0x00001000), \ + V(LDEOR, 0x00002000), \ + V(LDSET, 0x00003000), \ + V(LDSMAX, 0x00004000), \ + V(LDSMIN, 0x00005000), \ + V(LDUMAX, 0x00006000), \ + V(LDUMIN, 0x00007000) + +// Atomic memory. +enum AtomicMemoryOp { + AtomicMemoryFixed = 0x38200000, + AtomicMemoryFMask = 0x3B200C00, + AtomicMemoryMask = 0xFFE0FC00, + SWPB = AtomicMemoryFixed | 0x00008000, + SWPAB = AtomicMemoryFixed | 0x00808000, + SWPLB = AtomicMemoryFixed | 0x00408000, + SWPALB = AtomicMemoryFixed | 0x00C08000, + SWPH = AtomicMemoryFixed | 0x40008000, + SWPAH = AtomicMemoryFixed | 0x40808000, + SWPLH = AtomicMemoryFixed | 0x40408000, + SWPALH = AtomicMemoryFixed | 0x40C08000, + SWP_w = AtomicMemoryFixed | 0x80008000, + SWPA_w = AtomicMemoryFixed | 0x80808000, + SWPL_w = AtomicMemoryFixed | 0x80408000, + SWPAL_w = AtomicMemoryFixed | 0x80C08000, + SWP_x = AtomicMemoryFixed | 0xC0008000, + SWPA_x = AtomicMemoryFixed | 0xC0808000, + SWPL_x = AtomicMemoryFixed | 0xC0408000, + SWPAL_x = AtomicMemoryFixed | 0xC0C08000, + LDAPRB = AtomicMemoryFixed | 0x0080C000, + LDAPRH = AtomicMemoryFixed | 0x4080C000, + LDAPR_w = AtomicMemoryFixed | 0x8080C000, + LDAPR_x = AtomicMemoryFixed | 0xC080C000, + + AtomicMemorySimpleFMask = 0x3B208C00, + AtomicMemorySimpleOpMask = 0x00007000, +#define ATOMIC_MEMORY_SIMPLE(N, OP) \ + N##Op = OP, \ + N##B = AtomicMemoryFixed | OP, \ + N##AB = AtomicMemoryFixed | OP | 0x00800000, \ + N##LB = AtomicMemoryFixed | OP | 0x00400000, \ + N##ALB = AtomicMemoryFixed | OP | 0x00C00000, \ + N##H = AtomicMemoryFixed | OP | 0x40000000, \ + N##AH = AtomicMemoryFixed | OP | 0x40800000, \ + N##LH = AtomicMemoryFixed | OP | 0x40400000, \ + N##ALH = AtomicMemoryFixed | OP | 0x40C00000, \ + N##_w = AtomicMemoryFixed | OP | 0x80000000, \ + N##A_w = AtomicMemoryFixed | OP | 0x80800000, \ + N##L_w = AtomicMemoryFixed | OP | 0x80400000, \ + N##AL_w = AtomicMemoryFixed | OP | 0x80C00000, \ + N##_x = AtomicMemoryFixed | OP | 0xC0000000, \ + N##A_x = AtomicMemoryFixed | OP | 0xC0800000, \ + N##L_x = AtomicMemoryFixed | OP | 0xC0400000, \ + N##AL_x = AtomicMemoryFixed | OP | 0xC0C00000 + + ATOMIC_MEMORY_SIMPLE_OPC_LIST(ATOMIC_MEMORY_SIMPLE) +#undef ATOMIC_MEMORY_SIMPLE +}; + +// Conditional compare. +enum ConditionalCompareOp { + ConditionalCompareMask = 0x60000000, + CCMN = 0x20000000, + CCMP = 0x60000000 +}; + +// Conditional compare register. +enum ConditionalCompareRegisterOp { + ConditionalCompareRegisterFixed = 0x1A400000, + ConditionalCompareRegisterFMask = 0x1FE00800, + ConditionalCompareRegisterMask = 0xFFE00C10, + CCMN_w = ConditionalCompareRegisterFixed | CCMN, + CCMN_x = ConditionalCompareRegisterFixed | SixtyFourBits | CCMN, + CCMP_w = ConditionalCompareRegisterFixed | CCMP, + CCMP_x = ConditionalCompareRegisterFixed | SixtyFourBits | CCMP +}; + +// Conditional compare immediate. +enum ConditionalCompareImmediateOp { + ConditionalCompareImmediateFixed = 0x1A400800, + ConditionalCompareImmediateFMask = 0x1FE00800, + ConditionalCompareImmediateMask = 0xFFE00C10, + CCMN_w_imm = ConditionalCompareImmediateFixed | CCMN, + CCMN_x_imm = ConditionalCompareImmediateFixed | SixtyFourBits | CCMN, + CCMP_w_imm = ConditionalCompareImmediateFixed | CCMP, + CCMP_x_imm = ConditionalCompareImmediateFixed | SixtyFourBits | CCMP +}; + +// Conditional select. +enum ConditionalSelectOp { + ConditionalSelectFixed = 0x1A800000, + ConditionalSelectFMask = 0x1FE00000, + ConditionalSelectMask = 0xFFE00C00, + CSEL_w = ConditionalSelectFixed | 0x00000000, + CSEL_x = ConditionalSelectFixed | 0x80000000, + CSEL = CSEL_w, + CSINC_w = ConditionalSelectFixed | 0x00000400, + CSINC_x = ConditionalSelectFixed | 0x80000400, + CSINC = CSINC_w, + CSINV_w = ConditionalSelectFixed | 0x40000000, + CSINV_x = ConditionalSelectFixed | 0xC0000000, + CSINV = CSINV_w, + CSNEG_w = ConditionalSelectFixed | 0x40000400, + CSNEG_x = ConditionalSelectFixed | 0xC0000400, + CSNEG = CSNEG_w +}; + +// Data processing 1 source. +enum DataProcessing1SourceOp { + DataProcessing1SourceFixed = 0x5AC00000, + DataProcessing1SourceFMask = 0x5FE00000, + DataProcessing1SourceMask = 0xFFFFFC00, + RBIT = DataProcessing1SourceFixed | 0x00000000, + RBIT_w = RBIT, + RBIT_x = RBIT | SixtyFourBits, + REV16 = DataProcessing1SourceFixed | 0x00000400, + REV16_w = REV16, + REV16_x = REV16 | SixtyFourBits, + REV = DataProcessing1SourceFixed | 0x00000800, + REV_w = REV, + REV32_x = REV | SixtyFourBits, + REV_x = DataProcessing1SourceFixed | SixtyFourBits | 0x00000C00, + CLZ = DataProcessing1SourceFixed | 0x00001000, + CLZ_w = CLZ, + CLZ_x = CLZ | SixtyFourBits, + CLS = DataProcessing1SourceFixed | 0x00001400, + CLS_w = CLS, + CLS_x = CLS | SixtyFourBits, + + // Pointer authentication instructions in Armv8.3. + PACIA = DataProcessing1SourceFixed | 0x80010000, + PACIB = DataProcessing1SourceFixed | 0x80010400, + PACDA = DataProcessing1SourceFixed | 0x80010800, + PACDB = DataProcessing1SourceFixed | 0x80010C00, + AUTIA = DataProcessing1SourceFixed | 0x80011000, + AUTIB = DataProcessing1SourceFixed | 0x80011400, + AUTDA = DataProcessing1SourceFixed | 0x80011800, + AUTDB = DataProcessing1SourceFixed | 0x80011C00, + PACIZA = DataProcessing1SourceFixed | 0x80012000, + PACIZB = DataProcessing1SourceFixed | 0x80012400, + PACDZA = DataProcessing1SourceFixed | 0x80012800, + PACDZB = DataProcessing1SourceFixed | 0x80012C00, + AUTIZA = DataProcessing1SourceFixed | 0x80013000, + AUTIZB = DataProcessing1SourceFixed | 0x80013400, + AUTDZA = DataProcessing1SourceFixed | 0x80013800, + AUTDZB = DataProcessing1SourceFixed | 0x80013C00, + XPACI = DataProcessing1SourceFixed | 0x80014000, + XPACD = DataProcessing1SourceFixed | 0x80014400 +}; + +// Data processing 2 source. +enum DataProcessing2SourceOp { + DataProcessing2SourceFixed = 0x1AC00000, + DataProcessing2SourceFMask = 0x5FE00000, + DataProcessing2SourceMask = 0xFFE0FC00, + UDIV_w = DataProcessing2SourceFixed | 0x00000800, + UDIV_x = DataProcessing2SourceFixed | 0x80000800, + UDIV = UDIV_w, + SDIV_w = DataProcessing2SourceFixed | 0x00000C00, + SDIV_x = DataProcessing2SourceFixed | 0x80000C00, + SDIV = SDIV_w, + LSLV_w = DataProcessing2SourceFixed | 0x00002000, + LSLV_x = DataProcessing2SourceFixed | 0x80002000, + LSLV = LSLV_w, + LSRV_w = DataProcessing2SourceFixed | 0x00002400, + LSRV_x = DataProcessing2SourceFixed | 0x80002400, + LSRV = LSRV_w, + ASRV_w = DataProcessing2SourceFixed | 0x00002800, + ASRV_x = DataProcessing2SourceFixed | 0x80002800, + ASRV = ASRV_w, + RORV_w = DataProcessing2SourceFixed | 0x00002C00, + RORV_x = DataProcessing2SourceFixed | 0x80002C00, + RORV = RORV_w, + PACGA = DataProcessing2SourceFixed | SixtyFourBits | 0x00003000, + CRC32B = DataProcessing2SourceFixed | 0x00004000, + CRC32H = DataProcessing2SourceFixed | 0x00004400, + CRC32W = DataProcessing2SourceFixed | 0x00004800, + CRC32X = DataProcessing2SourceFixed | SixtyFourBits | 0x00004C00, + CRC32CB = DataProcessing2SourceFixed | 0x00005000, + CRC32CH = DataProcessing2SourceFixed | 0x00005400, + CRC32CW = DataProcessing2SourceFixed | 0x00005800, + CRC32CX = DataProcessing2SourceFixed | SixtyFourBits | 0x00005C00 +}; + +// Data processing 3 source. +enum DataProcessing3SourceOp { + DataProcessing3SourceFixed = 0x1B000000, + DataProcessing3SourceFMask = 0x1F000000, + DataProcessing3SourceMask = 0xFFE08000, + MADD_w = DataProcessing3SourceFixed | 0x00000000, + MADD_x = DataProcessing3SourceFixed | 0x80000000, + MADD = MADD_w, + MSUB_w = DataProcessing3SourceFixed | 0x00008000, + MSUB_x = DataProcessing3SourceFixed | 0x80008000, + MSUB = MSUB_w, + SMADDL_x = DataProcessing3SourceFixed | 0x80200000, + SMSUBL_x = DataProcessing3SourceFixed | 0x80208000, + SMULH_x = DataProcessing3SourceFixed | 0x80400000, + UMADDL_x = DataProcessing3SourceFixed | 0x80A00000, + UMSUBL_x = DataProcessing3SourceFixed | 0x80A08000, + UMULH_x = DataProcessing3SourceFixed | 0x80C00000 +}; + +// Floating point compare. +enum FPCompareOp { + FPCompareFixed = 0x1E202000, + FPCompareFMask = 0x5F203C00, + FPCompareMask = 0xFFE0FC1F, + FCMP_h = FPCompareFixed | FP16 | 0x00000000, + FCMP_s = FPCompareFixed | 0x00000000, + FCMP_d = FPCompareFixed | FP64 | 0x00000000, + FCMP = FCMP_s, + FCMP_h_zero = FPCompareFixed | FP16 | 0x00000008, + FCMP_s_zero = FPCompareFixed | 0x00000008, + FCMP_d_zero = FPCompareFixed | FP64 | 0x00000008, + FCMP_zero = FCMP_s_zero, + FCMPE_h = FPCompareFixed | FP16 | 0x00000010, + FCMPE_s = FPCompareFixed | 0x00000010, + FCMPE_d = FPCompareFixed | FP64 | 0x00000010, + FCMPE = FCMPE_s, + FCMPE_h_zero = FPCompareFixed | FP16 | 0x00000018, + FCMPE_s_zero = FPCompareFixed | 0x00000018, + FCMPE_d_zero = FPCompareFixed | FP64 | 0x00000018, + FCMPE_zero = FCMPE_s_zero +}; + +// Floating point conditional compare. +enum FPConditionalCompareOp { + FPConditionalCompareFixed = 0x1E200400, + FPConditionalCompareFMask = 0x5F200C00, + FPConditionalCompareMask = 0xFFE00C10, + FCCMP_h = FPConditionalCompareFixed | FP16 | 0x00000000, + FCCMP_s = FPConditionalCompareFixed | 0x00000000, + FCCMP_d = FPConditionalCompareFixed | FP64 | 0x00000000, + FCCMP = FCCMP_s, + FCCMPE_h = FPConditionalCompareFixed | FP16 | 0x00000010, + FCCMPE_s = FPConditionalCompareFixed | 0x00000010, + FCCMPE_d = FPConditionalCompareFixed | FP64 | 0x00000010, + FCCMPE = FCCMPE_s +}; + +// Floating point conditional select. +enum FPConditionalSelectOp { + FPConditionalSelectFixed = 0x1E200C00, + FPConditionalSelectFMask = 0x5F200C00, + FPConditionalSelectMask = 0xFFE00C00, + FCSEL_h = FPConditionalSelectFixed | FP16 | 0x00000000, + FCSEL_s = FPConditionalSelectFixed | 0x00000000, + FCSEL_d = FPConditionalSelectFixed | FP64 | 0x00000000, + FCSEL = FCSEL_s +}; + +// Floating point immediate. +enum FPImmediateOp { + FPImmediateFixed = 0x1E201000, + FPImmediateFMask = 0x5F201C00, + FPImmediateMask = 0xFFE01C00, + FMOV_h_imm = FPImmediateFixed | FP16 | 0x00000000, + FMOV_s_imm = FPImmediateFixed | 0x00000000, + FMOV_d_imm = FPImmediateFixed | FP64 | 0x00000000 +}; + +// Floating point data processing 1 source. +enum FPDataProcessing1SourceOp { + FPDataProcessing1SourceFixed = 0x1E204000, + FPDataProcessing1SourceFMask = 0x5F207C00, + FPDataProcessing1SourceMask = 0xFFFFFC00, + FMOV_h = FPDataProcessing1SourceFixed | FP16 | 0x00000000, + FMOV_s = FPDataProcessing1SourceFixed | 0x00000000, + FMOV_d = FPDataProcessing1SourceFixed | FP64 | 0x00000000, + FMOV = FMOV_s, + FABS_h = FPDataProcessing1SourceFixed | FP16 | 0x00008000, + FABS_s = FPDataProcessing1SourceFixed | 0x00008000, + FABS_d = FPDataProcessing1SourceFixed | FP64 | 0x00008000, + FABS = FABS_s, + FNEG_h = FPDataProcessing1SourceFixed | FP16 | 0x00010000, + FNEG_s = FPDataProcessing1SourceFixed | 0x00010000, + FNEG_d = FPDataProcessing1SourceFixed | FP64 | 0x00010000, + FNEG = FNEG_s, + FSQRT_h = FPDataProcessing1SourceFixed | FP16 | 0x00018000, + FSQRT_s = FPDataProcessing1SourceFixed | 0x00018000, + FSQRT_d = FPDataProcessing1SourceFixed | FP64 | 0x00018000, + FSQRT = FSQRT_s, + FCVT_ds = FPDataProcessing1SourceFixed | 0x00028000, + FCVT_sd = FPDataProcessing1SourceFixed | FP64 | 0x00020000, + FCVT_hs = FPDataProcessing1SourceFixed | 0x00038000, + FCVT_hd = FPDataProcessing1SourceFixed | FP64 | 0x00038000, + FCVT_sh = FPDataProcessing1SourceFixed | 0x00C20000, + FCVT_dh = FPDataProcessing1SourceFixed | 0x00C28000, + FRINT32X_s = FPDataProcessing1SourceFixed | 0x00088000, + FRINT32X_d = FPDataProcessing1SourceFixed | FP64 | 0x00088000, + FRINT32X = FRINT32X_s, + FRINT32Z_s = FPDataProcessing1SourceFixed | 0x00080000, + FRINT32Z_d = FPDataProcessing1SourceFixed | FP64 | 0x00080000, + FRINT32Z = FRINT32Z_s, + FRINT64X_s = FPDataProcessing1SourceFixed | 0x00098000, + FRINT64X_d = FPDataProcessing1SourceFixed | FP64 | 0x00098000, + FRINT64X = FRINT64X_s, + FRINT64Z_s = FPDataProcessing1SourceFixed | 0x00090000, + FRINT64Z_d = FPDataProcessing1SourceFixed | FP64 | 0x00090000, + FRINT64Z = FRINT64Z_s, + FRINTN_h = FPDataProcessing1SourceFixed | FP16 | 0x00040000, + FRINTN_s = FPDataProcessing1SourceFixed | 0x00040000, + FRINTN_d = FPDataProcessing1SourceFixed | FP64 | 0x00040000, + FRINTN = FRINTN_s, + FRINTP_h = FPDataProcessing1SourceFixed | FP16 | 0x00048000, + FRINTP_s = FPDataProcessing1SourceFixed | 0x00048000, + FRINTP_d = FPDataProcessing1SourceFixed | FP64 | 0x00048000, + FRINTP = FRINTP_s, + FRINTM_h = FPDataProcessing1SourceFixed | FP16 | 0x00050000, + FRINTM_s = FPDataProcessing1SourceFixed | 0x00050000, + FRINTM_d = FPDataProcessing1SourceFixed | FP64 | 0x00050000, + FRINTM = FRINTM_s, + FRINTZ_h = FPDataProcessing1SourceFixed | FP16 | 0x00058000, + FRINTZ_s = FPDataProcessing1SourceFixed | 0x00058000, + FRINTZ_d = FPDataProcessing1SourceFixed | FP64 | 0x00058000, + FRINTZ = FRINTZ_s, + FRINTA_h = FPDataProcessing1SourceFixed | FP16 | 0x00060000, + FRINTA_s = FPDataProcessing1SourceFixed | 0x00060000, + FRINTA_d = FPDataProcessing1SourceFixed | FP64 | 0x00060000, + FRINTA = FRINTA_s, + FRINTX_h = FPDataProcessing1SourceFixed | FP16 | 0x00070000, + FRINTX_s = FPDataProcessing1SourceFixed | 0x00070000, + FRINTX_d = FPDataProcessing1SourceFixed | FP64 | 0x00070000, + FRINTX = FRINTX_s, + FRINTI_h = FPDataProcessing1SourceFixed | FP16 | 0x00078000, + FRINTI_s = FPDataProcessing1SourceFixed | 0x00078000, + FRINTI_d = FPDataProcessing1SourceFixed | FP64 | 0x00078000, + FRINTI = FRINTI_s +}; + +// Floating point data processing 2 source. +enum FPDataProcessing2SourceOp { + FPDataProcessing2SourceFixed = 0x1E200800, + FPDataProcessing2SourceFMask = 0x5F200C00, + FPDataProcessing2SourceMask = 0xFFE0FC00, + FMUL = FPDataProcessing2SourceFixed | 0x00000000, + FMUL_h = FMUL | FP16, + FMUL_s = FMUL, + FMUL_d = FMUL | FP64, + FDIV = FPDataProcessing2SourceFixed | 0x00001000, + FDIV_h = FDIV | FP16, + FDIV_s = FDIV, + FDIV_d = FDIV | FP64, + FADD = FPDataProcessing2SourceFixed | 0x00002000, + FADD_h = FADD | FP16, + FADD_s = FADD, + FADD_d = FADD | FP64, + FSUB = FPDataProcessing2SourceFixed | 0x00003000, + FSUB_h = FSUB | FP16, + FSUB_s = FSUB, + FSUB_d = FSUB | FP64, + FMAX = FPDataProcessing2SourceFixed | 0x00004000, + FMAX_h = FMAX | FP16, + FMAX_s = FMAX, + FMAX_d = FMAX | FP64, + FMIN = FPDataProcessing2SourceFixed | 0x00005000, + FMIN_h = FMIN | FP16, + FMIN_s = FMIN, + FMIN_d = FMIN | FP64, + FMAXNM = FPDataProcessing2SourceFixed | 0x00006000, + FMAXNM_h = FMAXNM | FP16, + FMAXNM_s = FMAXNM, + FMAXNM_d = FMAXNM | FP64, + FMINNM = FPDataProcessing2SourceFixed | 0x00007000, + FMINNM_h = FMINNM | FP16, + FMINNM_s = FMINNM, + FMINNM_d = FMINNM | FP64, + FNMUL = FPDataProcessing2SourceFixed | 0x00008000, + FNMUL_h = FNMUL | FP16, + FNMUL_s = FNMUL, + FNMUL_d = FNMUL | FP64 +}; + +// Floating point data processing 3 source. +enum FPDataProcessing3SourceOp { + FPDataProcessing3SourceFixed = 0x1F000000, + FPDataProcessing3SourceFMask = 0x5F000000, + FPDataProcessing3SourceMask = 0xFFE08000, + FMADD_h = FPDataProcessing3SourceFixed | 0x00C00000, + FMSUB_h = FPDataProcessing3SourceFixed | 0x00C08000, + FNMADD_h = FPDataProcessing3SourceFixed | 0x00E00000, + FNMSUB_h = FPDataProcessing3SourceFixed | 0x00E08000, + FMADD_s = FPDataProcessing3SourceFixed | 0x00000000, + FMSUB_s = FPDataProcessing3SourceFixed | 0x00008000, + FNMADD_s = FPDataProcessing3SourceFixed | 0x00200000, + FNMSUB_s = FPDataProcessing3SourceFixed | 0x00208000, + FMADD_d = FPDataProcessing3SourceFixed | 0x00400000, + FMSUB_d = FPDataProcessing3SourceFixed | 0x00408000, + FNMADD_d = FPDataProcessing3SourceFixed | 0x00600000, + FNMSUB_d = FPDataProcessing3SourceFixed | 0x00608000 +}; + +// Conversion between floating point and integer. +enum FPIntegerConvertOp { + FPIntegerConvertFixed = 0x1E200000, + FPIntegerConvertFMask = 0x5F20FC00, + FPIntegerConvertMask = 0xFFFFFC00, + FCVTNS = FPIntegerConvertFixed | 0x00000000, + FCVTNS_wh = FCVTNS | FP16, + FCVTNS_xh = FCVTNS | SixtyFourBits | FP16, + FCVTNS_ws = FCVTNS, + FCVTNS_xs = FCVTNS | SixtyFourBits, + FCVTNS_wd = FCVTNS | FP64, + FCVTNS_xd = FCVTNS | SixtyFourBits | FP64, + FCVTNU = FPIntegerConvertFixed | 0x00010000, + FCVTNU_wh = FCVTNU | FP16, + FCVTNU_xh = FCVTNU | SixtyFourBits | FP16, + FCVTNU_ws = FCVTNU, + FCVTNU_xs = FCVTNU | SixtyFourBits, + FCVTNU_wd = FCVTNU | FP64, + FCVTNU_xd = FCVTNU | SixtyFourBits | FP64, + FCVTPS = FPIntegerConvertFixed | 0x00080000, + FCVTPS_wh = FCVTPS | FP16, + FCVTPS_xh = FCVTPS | SixtyFourBits | FP16, + FCVTPS_ws = FCVTPS, + FCVTPS_xs = FCVTPS | SixtyFourBits, + FCVTPS_wd = FCVTPS | FP64, + FCVTPS_xd = FCVTPS | SixtyFourBits | FP64, + FCVTPU = FPIntegerConvertFixed | 0x00090000, + FCVTPU_wh = FCVTPU | FP16, + FCVTPU_xh = FCVTPU | SixtyFourBits | FP16, + FCVTPU_ws = FCVTPU, + FCVTPU_xs = FCVTPU | SixtyFourBits, + FCVTPU_wd = FCVTPU | FP64, + FCVTPU_xd = FCVTPU | SixtyFourBits | FP64, + FCVTMS = FPIntegerConvertFixed | 0x00100000, + FCVTMS_wh = FCVTMS | FP16, + FCVTMS_xh = FCVTMS | SixtyFourBits | FP16, + FCVTMS_ws = FCVTMS, + FCVTMS_xs = FCVTMS | SixtyFourBits, + FCVTMS_wd = FCVTMS | FP64, + FCVTMS_xd = FCVTMS | SixtyFourBits | FP64, + FCVTMU = FPIntegerConvertFixed | 0x00110000, + FCVTMU_wh = FCVTMU | FP16, + FCVTMU_xh = FCVTMU | SixtyFourBits | FP16, + FCVTMU_ws = FCVTMU, + FCVTMU_xs = FCVTMU | SixtyFourBits, + FCVTMU_wd = FCVTMU | FP64, + FCVTMU_xd = FCVTMU | SixtyFourBits | FP64, + FCVTZS = FPIntegerConvertFixed | 0x00180000, + FCVTZS_wh = FCVTZS | FP16, + FCVTZS_xh = FCVTZS | SixtyFourBits | FP16, + FCVTZS_ws = FCVTZS, + FCVTZS_xs = FCVTZS | SixtyFourBits, + FCVTZS_wd = FCVTZS | FP64, + FCVTZS_xd = FCVTZS | SixtyFourBits | FP64, + FCVTZU = FPIntegerConvertFixed | 0x00190000, + FCVTZU_wh = FCVTZU | FP16, + FCVTZU_xh = FCVTZU | SixtyFourBits | FP16, + FCVTZU_ws = FCVTZU, + FCVTZU_xs = FCVTZU | SixtyFourBits, + FCVTZU_wd = FCVTZU | FP64, + FCVTZU_xd = FCVTZU | SixtyFourBits | FP64, + SCVTF = FPIntegerConvertFixed | 0x00020000, + SCVTF_hw = SCVTF | FP16, + SCVTF_hx = SCVTF | SixtyFourBits | FP16, + SCVTF_sw = SCVTF, + SCVTF_sx = SCVTF | SixtyFourBits, + SCVTF_dw = SCVTF | FP64, + SCVTF_dx = SCVTF | SixtyFourBits | FP64, + UCVTF = FPIntegerConvertFixed | 0x00030000, + UCVTF_hw = UCVTF | FP16, + UCVTF_hx = UCVTF | SixtyFourBits | FP16, + UCVTF_sw = UCVTF, + UCVTF_sx = UCVTF | SixtyFourBits, + UCVTF_dw = UCVTF | FP64, + UCVTF_dx = UCVTF | SixtyFourBits | FP64, + FCVTAS = FPIntegerConvertFixed | 0x00040000, + FCVTAS_wh = FCVTAS | FP16, + FCVTAS_xh = FCVTAS | SixtyFourBits | FP16, + FCVTAS_ws = FCVTAS, + FCVTAS_xs = FCVTAS | SixtyFourBits, + FCVTAS_wd = FCVTAS | FP64, + FCVTAS_xd = FCVTAS | SixtyFourBits | FP64, + FCVTAU = FPIntegerConvertFixed | 0x00050000, + FCVTAU_wh = FCVTAU | FP16, + FCVTAU_xh = FCVTAU | SixtyFourBits | FP16, + FCVTAU_ws = FCVTAU, + FCVTAU_xs = FCVTAU | SixtyFourBits, + FCVTAU_wd = FCVTAU | FP64, + FCVTAU_xd = FCVTAU | SixtyFourBits | FP64, + FMOV_wh = FPIntegerConvertFixed | 0x00060000 | FP16, + FMOV_hw = FPIntegerConvertFixed | 0x00070000 | FP16, + FMOV_xh = FMOV_wh | SixtyFourBits, + FMOV_hx = FMOV_hw | SixtyFourBits, + FMOV_ws = FPIntegerConvertFixed | 0x00060000, + FMOV_sw = FPIntegerConvertFixed | 0x00070000, + FMOV_xd = FMOV_ws | SixtyFourBits | FP64, + FMOV_dx = FMOV_sw | SixtyFourBits | FP64, + FMOV_d1_x = FPIntegerConvertFixed | SixtyFourBits | 0x008F0000, + FMOV_x_d1 = FPIntegerConvertFixed | SixtyFourBits | 0x008E0000, + FJCVTZS = FPIntegerConvertFixed | FP64 | 0x001E0000 +}; + +// Conversion between fixed point and floating point. +enum FPFixedPointConvertOp { + FPFixedPointConvertFixed = 0x1E000000, + FPFixedPointConvertFMask = 0x5F200000, + FPFixedPointConvertMask = 0xFFFF0000, + FCVTZS_fixed = FPFixedPointConvertFixed | 0x00180000, + FCVTZS_wh_fixed = FCVTZS_fixed | FP16, + FCVTZS_xh_fixed = FCVTZS_fixed | SixtyFourBits | FP16, + FCVTZS_ws_fixed = FCVTZS_fixed, + FCVTZS_xs_fixed = FCVTZS_fixed | SixtyFourBits, + FCVTZS_wd_fixed = FCVTZS_fixed | FP64, + FCVTZS_xd_fixed = FCVTZS_fixed | SixtyFourBits | FP64, + FCVTZU_fixed = FPFixedPointConvertFixed | 0x00190000, + FCVTZU_wh_fixed = FCVTZU_fixed | FP16, + FCVTZU_xh_fixed = FCVTZU_fixed | SixtyFourBits | FP16, + FCVTZU_ws_fixed = FCVTZU_fixed, + FCVTZU_xs_fixed = FCVTZU_fixed | SixtyFourBits, + FCVTZU_wd_fixed = FCVTZU_fixed | FP64, + FCVTZU_xd_fixed = FCVTZU_fixed | SixtyFourBits | FP64, + SCVTF_fixed = FPFixedPointConvertFixed | 0x00020000, + SCVTF_hw_fixed = SCVTF_fixed | FP16, + SCVTF_hx_fixed = SCVTF_fixed | SixtyFourBits | FP16, + SCVTF_sw_fixed = SCVTF_fixed, + SCVTF_sx_fixed = SCVTF_fixed | SixtyFourBits, + SCVTF_dw_fixed = SCVTF_fixed | FP64, + SCVTF_dx_fixed = SCVTF_fixed | SixtyFourBits | FP64, + UCVTF_fixed = FPFixedPointConvertFixed | 0x00030000, + UCVTF_hw_fixed = UCVTF_fixed | FP16, + UCVTF_hx_fixed = UCVTF_fixed | SixtyFourBits | FP16, + UCVTF_sw_fixed = UCVTF_fixed, + UCVTF_sx_fixed = UCVTF_fixed | SixtyFourBits, + UCVTF_dw_fixed = UCVTF_fixed | FP64, + UCVTF_dx_fixed = UCVTF_fixed | SixtyFourBits | FP64 +}; + +// Crypto - two register SHA. +enum Crypto2RegSHAOp { + Crypto2RegSHAFixed = 0x5E280800, + Crypto2RegSHAFMask = 0xFF3E0C00 +}; + +// Crypto - three register SHA. +enum Crypto3RegSHAOp { + Crypto3RegSHAFixed = 0x5E000000, + Crypto3RegSHAFMask = 0xFF208C00 +}; + +// Crypto - AES. +enum CryptoAESOp { + CryptoAESFixed = 0x4E280800, + CryptoAESFMask = 0xFF3E0C00 +}; + +// NEON instructions with two register operands. +enum NEON2RegMiscOp { + NEON2RegMiscFixed = 0x0E200800, + NEON2RegMiscFMask = 0x9F3E0C00, + NEON2RegMiscMask = 0xBF3FFC00, + NEON2RegMiscUBit = 0x20000000, + NEON_REV64 = NEON2RegMiscFixed | 0x00000000, + NEON_REV32 = NEON2RegMiscFixed | 0x20000000, + NEON_REV16 = NEON2RegMiscFixed | 0x00001000, + NEON_SADDLP = NEON2RegMiscFixed | 0x00002000, + NEON_UADDLP = NEON_SADDLP | NEON2RegMiscUBit, + NEON_SUQADD = NEON2RegMiscFixed | 0x00003000, + NEON_USQADD = NEON_SUQADD | NEON2RegMiscUBit, + NEON_CLS = NEON2RegMiscFixed | 0x00004000, + NEON_CLZ = NEON2RegMiscFixed | 0x20004000, + NEON_CNT = NEON2RegMiscFixed | 0x00005000, + NEON_RBIT_NOT = NEON2RegMiscFixed | 0x20005000, + NEON_SADALP = NEON2RegMiscFixed | 0x00006000, + NEON_UADALP = NEON_SADALP | NEON2RegMiscUBit, + NEON_SQABS = NEON2RegMiscFixed | 0x00007000, + NEON_SQNEG = NEON2RegMiscFixed | 0x20007000, + NEON_CMGT_zero = NEON2RegMiscFixed | 0x00008000, + NEON_CMGE_zero = NEON2RegMiscFixed | 0x20008000, + NEON_CMEQ_zero = NEON2RegMiscFixed | 0x00009000, + NEON_CMLE_zero = NEON2RegMiscFixed | 0x20009000, + NEON_CMLT_zero = NEON2RegMiscFixed | 0x0000A000, + NEON_ABS = NEON2RegMiscFixed | 0x0000B000, + NEON_NEG = NEON2RegMiscFixed | 0x2000B000, + NEON_XTN = NEON2RegMiscFixed | 0x00012000, + NEON_SQXTUN = NEON2RegMiscFixed | 0x20012000, + NEON_SHLL = NEON2RegMiscFixed | 0x20013000, + NEON_SQXTN = NEON2RegMiscFixed | 0x00014000, + NEON_UQXTN = NEON_SQXTN | NEON2RegMiscUBit, + + NEON2RegMiscOpcode = 0x0001F000, + NEON_RBIT_NOT_opcode = NEON_RBIT_NOT & NEON2RegMiscOpcode, + NEON_NEG_opcode = NEON_NEG & NEON2RegMiscOpcode, + NEON_XTN_opcode = NEON_XTN & NEON2RegMiscOpcode, + NEON_UQXTN_opcode = NEON_UQXTN & NEON2RegMiscOpcode, + + // These instructions use only one bit of the size field. The other bit is + // used to distinguish between instructions. + NEON2RegMiscFPMask = NEON2RegMiscMask | 0x00800000, + NEON_FABS = NEON2RegMiscFixed | 0x0080F000, + NEON_FNEG = NEON2RegMiscFixed | 0x2080F000, + NEON_FCVTN = NEON2RegMiscFixed | 0x00016000, + NEON_FCVTXN = NEON2RegMiscFixed | 0x20016000, + NEON_FCVTL = NEON2RegMiscFixed | 0x00017000, + NEON_FRINT32X = NEON2RegMiscFixed | 0x2001E000, + NEON_FRINT32Z = NEON2RegMiscFixed | 0x0001E000, + NEON_FRINT64X = NEON2RegMiscFixed | 0x2001F000, + NEON_FRINT64Z = NEON2RegMiscFixed | 0x0001F000, + NEON_FRINTN = NEON2RegMiscFixed | 0x00018000, + NEON_FRINTA = NEON2RegMiscFixed | 0x20018000, + NEON_FRINTP = NEON2RegMiscFixed | 0x00818000, + NEON_FRINTM = NEON2RegMiscFixed | 0x00019000, + NEON_FRINTX = NEON2RegMiscFixed | 0x20019000, + NEON_FRINTZ = NEON2RegMiscFixed | 0x00819000, + NEON_FRINTI = NEON2RegMiscFixed | 0x20819000, + NEON_FCVTNS = NEON2RegMiscFixed | 0x0001A000, + NEON_FCVTNU = NEON_FCVTNS | NEON2RegMiscUBit, + NEON_FCVTPS = NEON2RegMiscFixed | 0x0081A000, + NEON_FCVTPU = NEON_FCVTPS | NEON2RegMiscUBit, + NEON_FCVTMS = NEON2RegMiscFixed | 0x0001B000, + NEON_FCVTMU = NEON_FCVTMS | NEON2RegMiscUBit, + NEON_FCVTZS = NEON2RegMiscFixed | 0x0081B000, + NEON_FCVTZU = NEON_FCVTZS | NEON2RegMiscUBit, + NEON_FCVTAS = NEON2RegMiscFixed | 0x0001C000, + NEON_FCVTAU = NEON_FCVTAS | NEON2RegMiscUBit, + NEON_FSQRT = NEON2RegMiscFixed | 0x2081F000, + NEON_SCVTF = NEON2RegMiscFixed | 0x0001D000, + NEON_UCVTF = NEON_SCVTF | NEON2RegMiscUBit, + NEON_URSQRTE = NEON2RegMiscFixed | 0x2081C000, + NEON_URECPE = NEON2RegMiscFixed | 0x0081C000, + NEON_FRSQRTE = NEON2RegMiscFixed | 0x2081D000, + NEON_FRECPE = NEON2RegMiscFixed | 0x0081D000, + NEON_FCMGT_zero = NEON2RegMiscFixed | 0x0080C000, + NEON_FCMGE_zero = NEON2RegMiscFixed | 0x2080C000, + NEON_FCMEQ_zero = NEON2RegMiscFixed | 0x0080D000, + NEON_FCMLE_zero = NEON2RegMiscFixed | 0x2080D000, + NEON_FCMLT_zero = NEON2RegMiscFixed | 0x0080E000, + + NEON_FCVTL_opcode = NEON_FCVTL & NEON2RegMiscOpcode, + NEON_FCVTN_opcode = NEON_FCVTN & NEON2RegMiscOpcode +}; + +// NEON instructions with two register operands (FP16). +enum NEON2RegMiscFP16Op { + NEON2RegMiscFP16Fixed = 0x0E780800, + NEON2RegMiscFP16FMask = 0x9F7E0C00, + NEON2RegMiscFP16Mask = 0xBFFFFC00, + NEON_FRINTN_H = NEON2RegMiscFP16Fixed | 0x00018000, + NEON_FRINTM_H = NEON2RegMiscFP16Fixed | 0x00019000, + NEON_FCVTNS_H = NEON2RegMiscFP16Fixed | 0x0001A000, + NEON_FCVTMS_H = NEON2RegMiscFP16Fixed | 0x0001B000, + NEON_FCVTAS_H = NEON2RegMiscFP16Fixed | 0x0001C000, + NEON_SCVTF_H = NEON2RegMiscFP16Fixed | 0x0001D000, + NEON_FCMGT_H_zero = NEON2RegMiscFP16Fixed | 0x0080C000, + NEON_FCMEQ_H_zero = NEON2RegMiscFP16Fixed | 0x0080D000, + NEON_FCMLT_H_zero = NEON2RegMiscFP16Fixed | 0x0080E000, + NEON_FABS_H = NEON2RegMiscFP16Fixed | 0x0080F000, + NEON_FRINTP_H = NEON2RegMiscFP16Fixed | 0x00818000, + NEON_FRINTZ_H = NEON2RegMiscFP16Fixed | 0x00819000, + NEON_FCVTPS_H = NEON2RegMiscFP16Fixed | 0x0081A000, + NEON_FCVTZS_H = NEON2RegMiscFP16Fixed | 0x0081B000, + NEON_FRECPE_H = NEON2RegMiscFP16Fixed | 0x0081D000, + NEON_FRINTA_H = NEON2RegMiscFP16Fixed | 0x20018000, + NEON_FRINTX_H = NEON2RegMiscFP16Fixed | 0x20019000, + NEON_FCVTNU_H = NEON2RegMiscFP16Fixed | 0x2001A000, + NEON_FCVTMU_H = NEON2RegMiscFP16Fixed | 0x2001B000, + NEON_FCVTAU_H = NEON2RegMiscFP16Fixed | 0x2001C000, + NEON_UCVTF_H = NEON2RegMiscFP16Fixed | 0x2001D000, + NEON_FCMGE_H_zero = NEON2RegMiscFP16Fixed | 0x2080C000, + NEON_FCMLE_H_zero = NEON2RegMiscFP16Fixed | 0x2080D000, + NEON_FNEG_H = NEON2RegMiscFP16Fixed | 0x2080F000, + NEON_FRINTI_H = NEON2RegMiscFP16Fixed | 0x20819000, + NEON_FCVTPU_H = NEON2RegMiscFP16Fixed | 0x2081A000, + NEON_FCVTZU_H = NEON2RegMiscFP16Fixed | 0x2081B000, + NEON_FRSQRTE_H = NEON2RegMiscFP16Fixed | 0x2081D000, + NEON_FSQRT_H = NEON2RegMiscFP16Fixed | 0x2081F000 +}; + +// NEON instructions with three same-type operands. +enum NEON3SameOp { + NEON3SameFixed = 0x0E200400, + NEON3SameFMask = 0x9F200400, + NEON3SameMask = 0xBF20FC00, + NEON3SameUBit = 0x20000000, + NEON_ADD = NEON3SameFixed | 0x00008000, + NEON_ADDP = NEON3SameFixed | 0x0000B800, + NEON_SHADD = NEON3SameFixed | 0x00000000, + NEON_SHSUB = NEON3SameFixed | 0x00002000, + NEON_SRHADD = NEON3SameFixed | 0x00001000, + NEON_CMEQ = NEON3SameFixed | NEON3SameUBit | 0x00008800, + NEON_CMGE = NEON3SameFixed | 0x00003800, + NEON_CMGT = NEON3SameFixed | 0x00003000, + NEON_CMHI = NEON3SameFixed | NEON3SameUBit | NEON_CMGT, + NEON_CMHS = NEON3SameFixed | NEON3SameUBit | NEON_CMGE, + NEON_CMTST = NEON3SameFixed | 0x00008800, + NEON_MLA = NEON3SameFixed | 0x00009000, + NEON_MLS = NEON3SameFixed | 0x20009000, + NEON_MUL = NEON3SameFixed | 0x00009800, + NEON_PMUL = NEON3SameFixed | 0x20009800, + NEON_SRSHL = NEON3SameFixed | 0x00005000, + NEON_SQSHL = NEON3SameFixed | 0x00004800, + NEON_SQRSHL = NEON3SameFixed | 0x00005800, + NEON_SSHL = NEON3SameFixed | 0x00004000, + NEON_SMAX = NEON3SameFixed | 0x00006000, + NEON_SMAXP = NEON3SameFixed | 0x0000A000, + NEON_SMIN = NEON3SameFixed | 0x00006800, + NEON_SMINP = NEON3SameFixed | 0x0000A800, + NEON_SABD = NEON3SameFixed | 0x00007000, + NEON_SABA = NEON3SameFixed | 0x00007800, + NEON_UABD = NEON3SameFixed | NEON3SameUBit | NEON_SABD, + NEON_UABA = NEON3SameFixed | NEON3SameUBit | NEON_SABA, + NEON_SQADD = NEON3SameFixed | 0x00000800, + NEON_SQSUB = NEON3SameFixed | 0x00002800, + NEON_SUB = NEON3SameFixed | NEON3SameUBit | 0x00008000, + NEON_UHADD = NEON3SameFixed | NEON3SameUBit | NEON_SHADD, + NEON_UHSUB = NEON3SameFixed | NEON3SameUBit | NEON_SHSUB, + NEON_URHADD = NEON3SameFixed | NEON3SameUBit | NEON_SRHADD, + NEON_UMAX = NEON3SameFixed | NEON3SameUBit | NEON_SMAX, + NEON_UMAXP = NEON3SameFixed | NEON3SameUBit | NEON_SMAXP, + NEON_UMIN = NEON3SameFixed | NEON3SameUBit | NEON_SMIN, + NEON_UMINP = NEON3SameFixed | NEON3SameUBit | NEON_SMINP, + NEON_URSHL = NEON3SameFixed | NEON3SameUBit | NEON_SRSHL, + NEON_UQADD = NEON3SameFixed | NEON3SameUBit | NEON_SQADD, + NEON_UQRSHL = NEON3SameFixed | NEON3SameUBit | NEON_SQRSHL, + NEON_UQSHL = NEON3SameFixed | NEON3SameUBit | NEON_SQSHL, + NEON_UQSUB = NEON3SameFixed | NEON3SameUBit | NEON_SQSUB, + NEON_USHL = NEON3SameFixed | NEON3SameUBit | NEON_SSHL, + NEON_SQDMULH = NEON3SameFixed | 0x0000B000, + NEON_SQRDMULH = NEON3SameFixed | 0x2000B000, + + // NEON floating point instructions with three same-type operands. + NEON3SameFPFixed = NEON3SameFixed | 0x0000C000, + NEON3SameFPFMask = NEON3SameFMask | 0x0000C000, + NEON3SameFPMask = NEON3SameMask | 0x00800000, + NEON_FADD = NEON3SameFixed | 0x0000D000, + NEON_FSUB = NEON3SameFixed | 0x0080D000, + NEON_FMUL = NEON3SameFixed | 0x2000D800, + NEON_FDIV = NEON3SameFixed | 0x2000F800, + NEON_FMAX = NEON3SameFixed | 0x0000F000, + NEON_FMAXNM = NEON3SameFixed | 0x0000C000, + NEON_FMAXP = NEON3SameFixed | 0x2000F000, + NEON_FMAXNMP = NEON3SameFixed | 0x2000C000, + NEON_FMIN = NEON3SameFixed | 0x0080F000, + NEON_FMINNM = NEON3SameFixed | 0x0080C000, + NEON_FMINP = NEON3SameFixed | 0x2080F000, + NEON_FMINNMP = NEON3SameFixed | 0x2080C000, + NEON_FMLA = NEON3SameFixed | 0x0000C800, + NEON_FMLS = NEON3SameFixed | 0x0080C800, + NEON_FMULX = NEON3SameFixed | 0x0000D800, + NEON_FRECPS = NEON3SameFixed | 0x0000F800, + NEON_FRSQRTS = NEON3SameFixed | 0x0080F800, + NEON_FABD = NEON3SameFixed | 0x2080D000, + NEON_FADDP = NEON3SameFixed | 0x2000D000, + NEON_FCMEQ = NEON3SameFixed | 0x0000E000, + NEON_FCMGE = NEON3SameFixed | 0x2000E000, + NEON_FCMGT = NEON3SameFixed | 0x2080E000, + NEON_FACGE = NEON3SameFixed | 0x2000E800, + NEON_FACGT = NEON3SameFixed | 0x2080E800, + + // NEON logical instructions with three same-type operands. + NEON3SameLogicalFixed = NEON3SameFixed | 0x00001800, + NEON3SameLogicalFMask = NEON3SameFMask | 0x0000F800, + NEON3SameLogicalMask = 0xBFE0FC00, + NEON3SameLogicalFormatMask = NEON_Q, + NEON_AND = NEON3SameLogicalFixed | 0x00000000, + NEON_ORR = NEON3SameLogicalFixed | 0x00A00000, + NEON_ORN = NEON3SameLogicalFixed | 0x00C00000, + NEON_EOR = NEON3SameLogicalFixed | 0x20000000, + NEON_BIC = NEON3SameLogicalFixed | 0x00400000, + NEON_BIF = NEON3SameLogicalFixed | 0x20C00000, + NEON_BIT = NEON3SameLogicalFixed | 0x20800000, + NEON_BSL = NEON3SameLogicalFixed | 0x20400000, + + // FHM (FMLAL-like) instructions have an oddball encoding scheme under 3Same. + NEON3SameFHMMask = 0xBFE0FC00, // U size opcode + NEON_FMLAL = NEON3SameFixed | 0x0000E800, // 0 00 11101 + NEON_FMLAL2 = NEON3SameFixed | 0x2000C800, // 1 00 11001 + NEON_FMLSL = NEON3SameFixed | 0x0080E800, // 0 10 11101 + NEON_FMLSL2 = NEON3SameFixed | 0x2080C800 // 1 10 11001 +}; + + +enum NEON3SameFP16 { + NEON3SameFP16Fixed = 0x0E400400, + NEON3SameFP16FMask = 0x9F60C400, + NEON3SameFP16Mask = 0xBFE0FC00, + NEON_FMAXNM_H = NEON3SameFP16Fixed | 0x00000000, + NEON_FMLA_H = NEON3SameFP16Fixed | 0x00000800, + NEON_FADD_H = NEON3SameFP16Fixed | 0x00001000, + NEON_FMULX_H = NEON3SameFP16Fixed | 0x00001800, + NEON_FCMEQ_H = NEON3SameFP16Fixed | 0x00002000, + NEON_FMAX_H = NEON3SameFP16Fixed | 0x00003000, + NEON_FRECPS_H = NEON3SameFP16Fixed | 0x00003800, + NEON_FMINNM_H = NEON3SameFP16Fixed | 0x00800000, + NEON_FMLS_H = NEON3SameFP16Fixed | 0x00800800, + NEON_FSUB_H = NEON3SameFP16Fixed | 0x00801000, + NEON_FMIN_H = NEON3SameFP16Fixed | 0x00803000, + NEON_FRSQRTS_H = NEON3SameFP16Fixed | 0x00803800, + NEON_FMAXNMP_H = NEON3SameFP16Fixed | 0x20000000, + NEON_FADDP_H = NEON3SameFP16Fixed | 0x20001000, + NEON_FMUL_H = NEON3SameFP16Fixed | 0x20001800, + NEON_FCMGE_H = NEON3SameFP16Fixed | 0x20002000, + NEON_FACGE_H = NEON3SameFP16Fixed | 0x20002800, + NEON_FMAXP_H = NEON3SameFP16Fixed | 0x20003000, + NEON_FDIV_H = NEON3SameFP16Fixed | 0x20003800, + NEON_FMINNMP_H = NEON3SameFP16Fixed | 0x20800000, + NEON_FABD_H = NEON3SameFP16Fixed | 0x20801000, + NEON_FCMGT_H = NEON3SameFP16Fixed | 0x20802000, + NEON_FACGT_H = NEON3SameFP16Fixed | 0x20802800, + NEON_FMINP_H = NEON3SameFP16Fixed | 0x20803000 +}; + + +// 'Extra' NEON instructions with three same-type operands. +enum NEON3SameExtraOp { + NEON3SameExtraFixed = 0x0E008400, + NEON3SameExtraUBit = 0x20000000, + NEON3SameExtraFMask = 0x9E208400, + NEON3SameExtraMask = 0xBE20FC00, + NEON_SQRDMLAH = NEON3SameExtraFixed | NEON3SameExtraUBit, + NEON_SQRDMLSH = NEON3SameExtraFixed | NEON3SameExtraUBit | 0x00000800, + NEON_SDOT = NEON3SameExtraFixed | 0x00001000, + NEON_UDOT = NEON3SameExtraFixed | NEON3SameExtraUBit | 0x00001000, + + /* v8.3 Complex Numbers */ + NEON3SameExtraFCFixed = 0x2E00C400, + NEON3SameExtraFCFMask = 0xBF20C400, + // FCMLA fixes opcode<3:2>, and uses opcode<1:0> to encode . + NEON3SameExtraFCMLAMask = NEON3SameExtraFCFMask | 0x00006000, + NEON_FCMLA = NEON3SameExtraFCFixed, + // FCADD fixes opcode<3:2, 0>, and uses opcode<1> to encode . + NEON3SameExtraFCADDMask = NEON3SameExtraFCFMask | 0x00006800, + NEON_FCADD = NEON3SameExtraFCFixed | 0x00002000 + // Other encodings under NEON3SameExtraFCFMask are UNALLOCATED. +}; + +// NEON instructions with three different-type operands. +enum NEON3DifferentOp { + NEON3DifferentFixed = 0x0E200000, + NEON3DifferentFMask = 0x9F200C00, + NEON3DifferentMask = 0xFF20FC00, + NEON_ADDHN = NEON3DifferentFixed | 0x00004000, + NEON_ADDHN2 = NEON_ADDHN | NEON_Q, + NEON_PMULL = NEON3DifferentFixed | 0x0000E000, + NEON_PMULL2 = NEON_PMULL | NEON_Q, + NEON_RADDHN = NEON3DifferentFixed | 0x20004000, + NEON_RADDHN2 = NEON_RADDHN | NEON_Q, + NEON_RSUBHN = NEON3DifferentFixed | 0x20006000, + NEON_RSUBHN2 = NEON_RSUBHN | NEON_Q, + NEON_SABAL = NEON3DifferentFixed | 0x00005000, + NEON_SABAL2 = NEON_SABAL | NEON_Q, + NEON_SABDL = NEON3DifferentFixed | 0x00007000, + NEON_SABDL2 = NEON_SABDL | NEON_Q, + NEON_SADDL = NEON3DifferentFixed | 0x00000000, + NEON_SADDL2 = NEON_SADDL | NEON_Q, + NEON_SADDW = NEON3DifferentFixed | 0x00001000, + NEON_SADDW2 = NEON_SADDW | NEON_Q, + NEON_SMLAL = NEON3DifferentFixed | 0x00008000, + NEON_SMLAL2 = NEON_SMLAL | NEON_Q, + NEON_SMLSL = NEON3DifferentFixed | 0x0000A000, + NEON_SMLSL2 = NEON_SMLSL | NEON_Q, + NEON_SMULL = NEON3DifferentFixed | 0x0000C000, + NEON_SMULL2 = NEON_SMULL | NEON_Q, + NEON_SSUBL = NEON3DifferentFixed | 0x00002000, + NEON_SSUBL2 = NEON_SSUBL | NEON_Q, + NEON_SSUBW = NEON3DifferentFixed | 0x00003000, + NEON_SSUBW2 = NEON_SSUBW | NEON_Q, + NEON_SQDMLAL = NEON3DifferentFixed | 0x00009000, + NEON_SQDMLAL2 = NEON_SQDMLAL | NEON_Q, + NEON_SQDMLSL = NEON3DifferentFixed | 0x0000B000, + NEON_SQDMLSL2 = NEON_SQDMLSL | NEON_Q, + NEON_SQDMULL = NEON3DifferentFixed | 0x0000D000, + NEON_SQDMULL2 = NEON_SQDMULL | NEON_Q, + NEON_SUBHN = NEON3DifferentFixed | 0x00006000, + NEON_SUBHN2 = NEON_SUBHN | NEON_Q, + NEON_UABAL = NEON_SABAL | NEON3SameUBit, + NEON_UABAL2 = NEON_UABAL | NEON_Q, + NEON_UABDL = NEON_SABDL | NEON3SameUBit, + NEON_UABDL2 = NEON_UABDL | NEON_Q, + NEON_UADDL = NEON_SADDL | NEON3SameUBit, + NEON_UADDL2 = NEON_UADDL | NEON_Q, + NEON_UADDW = NEON_SADDW | NEON3SameUBit, + NEON_UADDW2 = NEON_UADDW | NEON_Q, + NEON_UMLAL = NEON_SMLAL | NEON3SameUBit, + NEON_UMLAL2 = NEON_UMLAL | NEON_Q, + NEON_UMLSL = NEON_SMLSL | NEON3SameUBit, + NEON_UMLSL2 = NEON_UMLSL | NEON_Q, + NEON_UMULL = NEON_SMULL | NEON3SameUBit, + NEON_UMULL2 = NEON_UMULL | NEON_Q, + NEON_USUBL = NEON_SSUBL | NEON3SameUBit, + NEON_USUBL2 = NEON_USUBL | NEON_Q, + NEON_USUBW = NEON_SSUBW | NEON3SameUBit, + NEON_USUBW2 = NEON_USUBW | NEON_Q +}; + +// NEON instructions operating across vectors. +enum NEONAcrossLanesOp { + NEONAcrossLanesFixed = 0x0E300800, + NEONAcrossLanesFMask = 0x9F3E0C00, + NEONAcrossLanesMask = 0xBF3FFC00, + NEON_ADDV = NEONAcrossLanesFixed | 0x0001B000, + NEON_SADDLV = NEONAcrossLanesFixed | 0x00003000, + NEON_UADDLV = NEONAcrossLanesFixed | 0x20003000, + NEON_SMAXV = NEONAcrossLanesFixed | 0x0000A000, + NEON_SMINV = NEONAcrossLanesFixed | 0x0001A000, + NEON_UMAXV = NEONAcrossLanesFixed | 0x2000A000, + NEON_UMINV = NEONAcrossLanesFixed | 0x2001A000, + + NEONAcrossLanesFP16Fixed = NEONAcrossLanesFixed | 0x0000C000, + NEONAcrossLanesFP16FMask = NEONAcrossLanesFMask | 0x2000C000, + NEONAcrossLanesFP16Mask = NEONAcrossLanesMask | 0x20800000, + NEON_FMAXNMV_H = NEONAcrossLanesFP16Fixed | 0x00000000, + NEON_FMAXV_H = NEONAcrossLanesFP16Fixed | 0x00003000, + NEON_FMINNMV_H = NEONAcrossLanesFP16Fixed | 0x00800000, + NEON_FMINV_H = NEONAcrossLanesFP16Fixed | 0x00803000, + + // NEON floating point across instructions. + NEONAcrossLanesFPFixed = NEONAcrossLanesFixed | 0x2000C000, + NEONAcrossLanesFPFMask = NEONAcrossLanesFMask | 0x2000C000, + NEONAcrossLanesFPMask = NEONAcrossLanesMask | 0x20800000, + + NEON_FMAXV = NEONAcrossLanesFPFixed | 0x2000F000, + NEON_FMINV = NEONAcrossLanesFPFixed | 0x2080F000, + NEON_FMAXNMV = NEONAcrossLanesFPFixed | 0x2000C000, + NEON_FMINNMV = NEONAcrossLanesFPFixed | 0x2080C000 +}; + +// NEON instructions with indexed element operand. +enum NEONByIndexedElementOp { + NEONByIndexedElementFixed = 0x0F000000, + NEONByIndexedElementFMask = 0x9F000400, + NEONByIndexedElementMask = 0xBF00F400, + NEON_MUL_byelement = NEONByIndexedElementFixed | 0x00008000, + NEON_MLA_byelement = NEONByIndexedElementFixed | 0x20000000, + NEON_MLS_byelement = NEONByIndexedElementFixed | 0x20004000, + NEON_SMULL_byelement = NEONByIndexedElementFixed | 0x0000A000, + NEON_SMLAL_byelement = NEONByIndexedElementFixed | 0x00002000, + NEON_SMLSL_byelement = NEONByIndexedElementFixed | 0x00006000, + NEON_UMULL_byelement = NEONByIndexedElementFixed | 0x2000A000, + NEON_UMLAL_byelement = NEONByIndexedElementFixed | 0x20002000, + NEON_UMLSL_byelement = NEONByIndexedElementFixed | 0x20006000, + NEON_SQDMULL_byelement = NEONByIndexedElementFixed | 0x0000B000, + NEON_SQDMLAL_byelement = NEONByIndexedElementFixed | 0x00003000, + NEON_SQDMLSL_byelement = NEONByIndexedElementFixed | 0x00007000, + NEON_SQDMULH_byelement = NEONByIndexedElementFixed | 0x0000C000, + NEON_SQRDMULH_byelement = NEONByIndexedElementFixed | 0x0000D000, + NEON_SDOT_byelement = NEONByIndexedElementFixed | 0x0000E000, + NEON_SQRDMLAH_byelement = NEONByIndexedElementFixed | 0x2000D000, + NEON_UDOT_byelement = NEONByIndexedElementFixed | 0x2000E000, + NEON_SQRDMLSH_byelement = NEONByIndexedElementFixed | 0x2000F000, + + NEON_FMLA_H_byelement = NEONByIndexedElementFixed | 0x00001000, + NEON_FMLS_H_byelement = NEONByIndexedElementFixed | 0x00005000, + NEON_FMUL_H_byelement = NEONByIndexedElementFixed | 0x00009000, + NEON_FMULX_H_byelement = NEONByIndexedElementFixed | 0x20009000, + + // Floating point instructions. + NEONByIndexedElementFPFixed = NEONByIndexedElementFixed | 0x00800000, + NEONByIndexedElementFPMask = NEONByIndexedElementMask | 0x00800000, + NEON_FMLA_byelement = NEONByIndexedElementFPFixed | 0x00001000, + NEON_FMLS_byelement = NEONByIndexedElementFPFixed | 0x00005000, + NEON_FMUL_byelement = NEONByIndexedElementFPFixed | 0x00009000, + NEON_FMULX_byelement = NEONByIndexedElementFPFixed | 0x20009000, + + // FMLAL-like instructions. + // For all cases: U = x, size = 10, opcode = xx00 + NEONByIndexedElementFPLongFixed = NEONByIndexedElementFixed | 0x00800000, + NEONByIndexedElementFPLongFMask = NEONByIndexedElementFMask | 0x00C03000, + NEONByIndexedElementFPLongMask = 0xBFC0F400, + NEON_FMLAL_H_byelement = NEONByIndexedElementFixed | 0x00800000, + NEON_FMLAL2_H_byelement = NEONByIndexedElementFixed | 0x20808000, + NEON_FMLSL_H_byelement = NEONByIndexedElementFixed | 0x00804000, + NEON_FMLSL2_H_byelement = NEONByIndexedElementFixed | 0x2080C000, + + // Complex instruction(s). + // This is necessary because the 'rot' encoding moves into the + // NEONByIndex..Mask space. + NEONByIndexedElementFPComplexMask = 0xBF009400, + NEON_FCMLA_byelement = NEONByIndexedElementFixed | 0x20001000 +}; + +// NEON register copy. +enum NEONCopyOp { + NEONCopyFixed = 0x0E000400, + NEONCopyFMask = 0x9FE08400, + NEONCopyMask = 0x3FE08400, + NEONCopyInsElementMask = NEONCopyMask | 0x40000000, + NEONCopyInsGeneralMask = NEONCopyMask | 0x40007800, + NEONCopyDupElementMask = NEONCopyMask | 0x20007800, + NEONCopyDupGeneralMask = NEONCopyDupElementMask, + NEONCopyUmovMask = NEONCopyMask | 0x20007800, + NEONCopySmovMask = NEONCopyMask | 0x20007800, + NEON_INS_ELEMENT = NEONCopyFixed | 0x60000000, + NEON_INS_GENERAL = NEONCopyFixed | 0x40001800, + NEON_DUP_ELEMENT = NEONCopyFixed | 0x00000000, + NEON_DUP_GENERAL = NEONCopyFixed | 0x00000800, + NEON_SMOV = NEONCopyFixed | 0x00002800, + NEON_UMOV = NEONCopyFixed | 0x00003800 +}; + +// NEON extract. +enum NEONExtractOp { + NEONExtractFixed = 0x2E000000, + NEONExtractFMask = 0xBF208400, + NEONExtractMask = 0xBFE08400, + NEON_EXT = NEONExtractFixed | 0x00000000 +}; + +enum NEONLoadStoreMultiOp { + NEONLoadStoreMultiL = 0x00400000, + NEONLoadStoreMulti1_1v = 0x00007000, + NEONLoadStoreMulti1_2v = 0x0000A000, + NEONLoadStoreMulti1_3v = 0x00006000, + NEONLoadStoreMulti1_4v = 0x00002000, + NEONLoadStoreMulti2 = 0x00008000, + NEONLoadStoreMulti3 = 0x00004000, + NEONLoadStoreMulti4 = 0x00000000 +}; + +// NEON load/store multiple structures. +enum NEONLoadStoreMultiStructOp { + NEONLoadStoreMultiStructFixed = 0x0C000000, + NEONLoadStoreMultiStructFMask = 0xBFBF0000, + NEONLoadStoreMultiStructMask = 0xBFFFF000, + NEONLoadStoreMultiStructStore = NEONLoadStoreMultiStructFixed, + NEONLoadStoreMultiStructLoad = NEONLoadStoreMultiStructFixed | + NEONLoadStoreMultiL, + NEON_LD1_1v = NEONLoadStoreMultiStructLoad | NEONLoadStoreMulti1_1v, + NEON_LD1_2v = NEONLoadStoreMultiStructLoad | NEONLoadStoreMulti1_2v, + NEON_LD1_3v = NEONLoadStoreMultiStructLoad | NEONLoadStoreMulti1_3v, + NEON_LD1_4v = NEONLoadStoreMultiStructLoad | NEONLoadStoreMulti1_4v, + NEON_LD2 = NEONLoadStoreMultiStructLoad | NEONLoadStoreMulti2, + NEON_LD3 = NEONLoadStoreMultiStructLoad | NEONLoadStoreMulti3, + NEON_LD4 = NEONLoadStoreMultiStructLoad | NEONLoadStoreMulti4, + NEON_ST1_1v = NEONLoadStoreMultiStructStore | NEONLoadStoreMulti1_1v, + NEON_ST1_2v = NEONLoadStoreMultiStructStore | NEONLoadStoreMulti1_2v, + NEON_ST1_3v = NEONLoadStoreMultiStructStore | NEONLoadStoreMulti1_3v, + NEON_ST1_4v = NEONLoadStoreMultiStructStore | NEONLoadStoreMulti1_4v, + NEON_ST2 = NEONLoadStoreMultiStructStore | NEONLoadStoreMulti2, + NEON_ST3 = NEONLoadStoreMultiStructStore | NEONLoadStoreMulti3, + NEON_ST4 = NEONLoadStoreMultiStructStore | NEONLoadStoreMulti4 +}; + +// NEON load/store multiple structures with post-index addressing. +enum NEONLoadStoreMultiStructPostIndexOp { + NEONLoadStoreMultiStructPostIndexFixed = 0x0C800000, + NEONLoadStoreMultiStructPostIndexFMask = 0xBFA00000, + NEONLoadStoreMultiStructPostIndexMask = 0xBFE0F000, + NEONLoadStoreMultiStructPostIndex = 0x00800000, + NEON_LD1_1v_post = NEON_LD1_1v | NEONLoadStoreMultiStructPostIndex, + NEON_LD1_2v_post = NEON_LD1_2v | NEONLoadStoreMultiStructPostIndex, + NEON_LD1_3v_post = NEON_LD1_3v | NEONLoadStoreMultiStructPostIndex, + NEON_LD1_4v_post = NEON_LD1_4v | NEONLoadStoreMultiStructPostIndex, + NEON_LD2_post = NEON_LD2 | NEONLoadStoreMultiStructPostIndex, + NEON_LD3_post = NEON_LD3 | NEONLoadStoreMultiStructPostIndex, + NEON_LD4_post = NEON_LD4 | NEONLoadStoreMultiStructPostIndex, + NEON_ST1_1v_post = NEON_ST1_1v | NEONLoadStoreMultiStructPostIndex, + NEON_ST1_2v_post = NEON_ST1_2v | NEONLoadStoreMultiStructPostIndex, + NEON_ST1_3v_post = NEON_ST1_3v | NEONLoadStoreMultiStructPostIndex, + NEON_ST1_4v_post = NEON_ST1_4v | NEONLoadStoreMultiStructPostIndex, + NEON_ST2_post = NEON_ST2 | NEONLoadStoreMultiStructPostIndex, + NEON_ST3_post = NEON_ST3 | NEONLoadStoreMultiStructPostIndex, + NEON_ST4_post = NEON_ST4 | NEONLoadStoreMultiStructPostIndex +}; + +enum NEONLoadStoreSingleOp { + NEONLoadStoreSingle1 = 0x00000000, + NEONLoadStoreSingle2 = 0x00200000, + NEONLoadStoreSingle3 = 0x00002000, + NEONLoadStoreSingle4 = 0x00202000, + NEONLoadStoreSingleL = 0x00400000, + NEONLoadStoreSingle_b = 0x00000000, + NEONLoadStoreSingle_h = 0x00004000, + NEONLoadStoreSingle_s = 0x00008000, + NEONLoadStoreSingle_d = 0x00008400, + NEONLoadStoreSingleAllLanes = 0x0000C000, + NEONLoadStoreSingleLenMask = 0x00202000 +}; + +// NEON load/store single structure. +enum NEONLoadStoreSingleStructOp { + NEONLoadStoreSingleStructFixed = 0x0D000000, + NEONLoadStoreSingleStructFMask = 0xBF9F0000, + NEONLoadStoreSingleStructMask = 0xBFFFE000, + NEONLoadStoreSingleStructStore = NEONLoadStoreSingleStructFixed, + NEONLoadStoreSingleStructLoad = NEONLoadStoreSingleStructFixed | + NEONLoadStoreSingleL, + NEONLoadStoreSingleStructLoad1 = NEONLoadStoreSingle1 | + NEONLoadStoreSingleStructLoad, + NEONLoadStoreSingleStructLoad2 = NEONLoadStoreSingle2 | + NEONLoadStoreSingleStructLoad, + NEONLoadStoreSingleStructLoad3 = NEONLoadStoreSingle3 | + NEONLoadStoreSingleStructLoad, + NEONLoadStoreSingleStructLoad4 = NEONLoadStoreSingle4 | + NEONLoadStoreSingleStructLoad, + NEONLoadStoreSingleStructStore1 = NEONLoadStoreSingle1 | + NEONLoadStoreSingleStructFixed, + NEONLoadStoreSingleStructStore2 = NEONLoadStoreSingle2 | + NEONLoadStoreSingleStructFixed, + NEONLoadStoreSingleStructStore3 = NEONLoadStoreSingle3 | + NEONLoadStoreSingleStructFixed, + NEONLoadStoreSingleStructStore4 = NEONLoadStoreSingle4 | + NEONLoadStoreSingleStructFixed, + NEON_LD1_b = NEONLoadStoreSingleStructLoad1 | NEONLoadStoreSingle_b, + NEON_LD1_h = NEONLoadStoreSingleStructLoad1 | NEONLoadStoreSingle_h, + NEON_LD1_s = NEONLoadStoreSingleStructLoad1 | NEONLoadStoreSingle_s, + NEON_LD1_d = NEONLoadStoreSingleStructLoad1 | NEONLoadStoreSingle_d, + NEON_LD1R = NEONLoadStoreSingleStructLoad1 | NEONLoadStoreSingleAllLanes, + NEON_ST1_b = NEONLoadStoreSingleStructStore1 | NEONLoadStoreSingle_b, + NEON_ST1_h = NEONLoadStoreSingleStructStore1 | NEONLoadStoreSingle_h, + NEON_ST1_s = NEONLoadStoreSingleStructStore1 | NEONLoadStoreSingle_s, + NEON_ST1_d = NEONLoadStoreSingleStructStore1 | NEONLoadStoreSingle_d, + + NEON_LD2_b = NEONLoadStoreSingleStructLoad2 | NEONLoadStoreSingle_b, + NEON_LD2_h = NEONLoadStoreSingleStructLoad2 | NEONLoadStoreSingle_h, + NEON_LD2_s = NEONLoadStoreSingleStructLoad2 | NEONLoadStoreSingle_s, + NEON_LD2_d = NEONLoadStoreSingleStructLoad2 | NEONLoadStoreSingle_d, + NEON_LD2R = NEONLoadStoreSingleStructLoad2 | NEONLoadStoreSingleAllLanes, + NEON_ST2_b = NEONLoadStoreSingleStructStore2 | NEONLoadStoreSingle_b, + NEON_ST2_h = NEONLoadStoreSingleStructStore2 | NEONLoadStoreSingle_h, + NEON_ST2_s = NEONLoadStoreSingleStructStore2 | NEONLoadStoreSingle_s, + NEON_ST2_d = NEONLoadStoreSingleStructStore2 | NEONLoadStoreSingle_d, + + NEON_LD3_b = NEONLoadStoreSingleStructLoad3 | NEONLoadStoreSingle_b, + NEON_LD3_h = NEONLoadStoreSingleStructLoad3 | NEONLoadStoreSingle_h, + NEON_LD3_s = NEONLoadStoreSingleStructLoad3 | NEONLoadStoreSingle_s, + NEON_LD3_d = NEONLoadStoreSingleStructLoad3 | NEONLoadStoreSingle_d, + NEON_LD3R = NEONLoadStoreSingleStructLoad3 | NEONLoadStoreSingleAllLanes, + NEON_ST3_b = NEONLoadStoreSingleStructStore3 | NEONLoadStoreSingle_b, + NEON_ST3_h = NEONLoadStoreSingleStructStore3 | NEONLoadStoreSingle_h, + NEON_ST3_s = NEONLoadStoreSingleStructStore3 | NEONLoadStoreSingle_s, + NEON_ST3_d = NEONLoadStoreSingleStructStore3 | NEONLoadStoreSingle_d, + + NEON_LD4_b = NEONLoadStoreSingleStructLoad4 | NEONLoadStoreSingle_b, + NEON_LD4_h = NEONLoadStoreSingleStructLoad4 | NEONLoadStoreSingle_h, + NEON_LD4_s = NEONLoadStoreSingleStructLoad4 | NEONLoadStoreSingle_s, + NEON_LD4_d = NEONLoadStoreSingleStructLoad4 | NEONLoadStoreSingle_d, + NEON_LD4R = NEONLoadStoreSingleStructLoad4 | NEONLoadStoreSingleAllLanes, + NEON_ST4_b = NEONLoadStoreSingleStructStore4 | NEONLoadStoreSingle_b, + NEON_ST4_h = NEONLoadStoreSingleStructStore4 | NEONLoadStoreSingle_h, + NEON_ST4_s = NEONLoadStoreSingleStructStore4 | NEONLoadStoreSingle_s, + NEON_ST4_d = NEONLoadStoreSingleStructStore4 | NEONLoadStoreSingle_d +}; + +// NEON load/store single structure with post-index addressing. +enum NEONLoadStoreSingleStructPostIndexOp { + NEONLoadStoreSingleStructPostIndexFixed = 0x0D800000, + NEONLoadStoreSingleStructPostIndexFMask = 0xBF800000, + NEONLoadStoreSingleStructPostIndexMask = 0xBFE0E000, + NEONLoadStoreSingleStructPostIndex = 0x00800000, + NEON_LD1_b_post = NEON_LD1_b | NEONLoadStoreSingleStructPostIndex, + NEON_LD1_h_post = NEON_LD1_h | NEONLoadStoreSingleStructPostIndex, + NEON_LD1_s_post = NEON_LD1_s | NEONLoadStoreSingleStructPostIndex, + NEON_LD1_d_post = NEON_LD1_d | NEONLoadStoreSingleStructPostIndex, + NEON_LD1R_post = NEON_LD1R | NEONLoadStoreSingleStructPostIndex, + NEON_ST1_b_post = NEON_ST1_b | NEONLoadStoreSingleStructPostIndex, + NEON_ST1_h_post = NEON_ST1_h | NEONLoadStoreSingleStructPostIndex, + NEON_ST1_s_post = NEON_ST1_s | NEONLoadStoreSingleStructPostIndex, + NEON_ST1_d_post = NEON_ST1_d | NEONLoadStoreSingleStructPostIndex, + + NEON_LD2_b_post = NEON_LD2_b | NEONLoadStoreSingleStructPostIndex, + NEON_LD2_h_post = NEON_LD2_h | NEONLoadStoreSingleStructPostIndex, + NEON_LD2_s_post = NEON_LD2_s | NEONLoadStoreSingleStructPostIndex, + NEON_LD2_d_post = NEON_LD2_d | NEONLoadStoreSingleStructPostIndex, + NEON_LD2R_post = NEON_LD2R | NEONLoadStoreSingleStructPostIndex, + NEON_ST2_b_post = NEON_ST2_b | NEONLoadStoreSingleStructPostIndex, + NEON_ST2_h_post = NEON_ST2_h | NEONLoadStoreSingleStructPostIndex, + NEON_ST2_s_post = NEON_ST2_s | NEONLoadStoreSingleStructPostIndex, + NEON_ST2_d_post = NEON_ST2_d | NEONLoadStoreSingleStructPostIndex, + + NEON_LD3_b_post = NEON_LD3_b | NEONLoadStoreSingleStructPostIndex, + NEON_LD3_h_post = NEON_LD3_h | NEONLoadStoreSingleStructPostIndex, + NEON_LD3_s_post = NEON_LD3_s | NEONLoadStoreSingleStructPostIndex, + NEON_LD3_d_post = NEON_LD3_d | NEONLoadStoreSingleStructPostIndex, + NEON_LD3R_post = NEON_LD3R | NEONLoadStoreSingleStructPostIndex, + NEON_ST3_b_post = NEON_ST3_b | NEONLoadStoreSingleStructPostIndex, + NEON_ST3_h_post = NEON_ST3_h | NEONLoadStoreSingleStructPostIndex, + NEON_ST3_s_post = NEON_ST3_s | NEONLoadStoreSingleStructPostIndex, + NEON_ST3_d_post = NEON_ST3_d | NEONLoadStoreSingleStructPostIndex, + + NEON_LD4_b_post = NEON_LD4_b | NEONLoadStoreSingleStructPostIndex, + NEON_LD4_h_post = NEON_LD4_h | NEONLoadStoreSingleStructPostIndex, + NEON_LD4_s_post = NEON_LD4_s | NEONLoadStoreSingleStructPostIndex, + NEON_LD4_d_post = NEON_LD4_d | NEONLoadStoreSingleStructPostIndex, + NEON_LD4R_post = NEON_LD4R | NEONLoadStoreSingleStructPostIndex, + NEON_ST4_b_post = NEON_ST4_b | NEONLoadStoreSingleStructPostIndex, + NEON_ST4_h_post = NEON_ST4_h | NEONLoadStoreSingleStructPostIndex, + NEON_ST4_s_post = NEON_ST4_s | NEONLoadStoreSingleStructPostIndex, + NEON_ST4_d_post = NEON_ST4_d | NEONLoadStoreSingleStructPostIndex +}; + +// NEON modified immediate. +enum NEONModifiedImmediateOp { + NEONModifiedImmediateFixed = 0x0F000400, + NEONModifiedImmediateFMask = 0x9FF80400, + NEONModifiedImmediateOpBit = 0x20000000, + NEONModifiedImmediate_FMOV = NEONModifiedImmediateFixed | 0x00000800, + NEONModifiedImmediate_MOVI = NEONModifiedImmediateFixed | 0x00000000, + NEONModifiedImmediate_MVNI = NEONModifiedImmediateFixed | 0x20000000, + NEONModifiedImmediate_ORR = NEONModifiedImmediateFixed | 0x00001000, + NEONModifiedImmediate_BIC = NEONModifiedImmediateFixed | 0x20001000 +}; + +// NEON shift immediate. +enum NEONShiftImmediateOp { + NEONShiftImmediateFixed = 0x0F000400, + NEONShiftImmediateFMask = 0x9F800400, + NEONShiftImmediateMask = 0xBF80FC00, + NEONShiftImmediateUBit = 0x20000000, + NEON_SHL = NEONShiftImmediateFixed | 0x00005000, + NEON_SSHLL = NEONShiftImmediateFixed | 0x0000A000, + NEON_USHLL = NEONShiftImmediateFixed | 0x2000A000, + NEON_SLI = NEONShiftImmediateFixed | 0x20005000, + NEON_SRI = NEONShiftImmediateFixed | 0x20004000, + NEON_SHRN = NEONShiftImmediateFixed | 0x00008000, + NEON_RSHRN = NEONShiftImmediateFixed | 0x00008800, + NEON_UQSHRN = NEONShiftImmediateFixed | 0x20009000, + NEON_UQRSHRN = NEONShiftImmediateFixed | 0x20009800, + NEON_SQSHRN = NEONShiftImmediateFixed | 0x00009000, + NEON_SQRSHRN = NEONShiftImmediateFixed | 0x00009800, + NEON_SQSHRUN = NEONShiftImmediateFixed | 0x20008000, + NEON_SQRSHRUN = NEONShiftImmediateFixed | 0x20008800, + NEON_SSHR = NEONShiftImmediateFixed | 0x00000000, + NEON_SRSHR = NEONShiftImmediateFixed | 0x00002000, + NEON_USHR = NEONShiftImmediateFixed | 0x20000000, + NEON_URSHR = NEONShiftImmediateFixed | 0x20002000, + NEON_SSRA = NEONShiftImmediateFixed | 0x00001000, + NEON_SRSRA = NEONShiftImmediateFixed | 0x00003000, + NEON_USRA = NEONShiftImmediateFixed | 0x20001000, + NEON_URSRA = NEONShiftImmediateFixed | 0x20003000, + NEON_SQSHLU = NEONShiftImmediateFixed | 0x20006000, + NEON_SCVTF_imm = NEONShiftImmediateFixed | 0x0000E000, + NEON_UCVTF_imm = NEONShiftImmediateFixed | 0x2000E000, + NEON_FCVTZS_imm = NEONShiftImmediateFixed | 0x0000F800, + NEON_FCVTZU_imm = NEONShiftImmediateFixed | 0x2000F800, + NEON_SQSHL_imm = NEONShiftImmediateFixed | 0x00007000, + NEON_UQSHL_imm = NEONShiftImmediateFixed | 0x20007000 +}; + +// NEON table. +enum NEONTableOp { + NEONTableFixed = 0x0E000000, + NEONTableFMask = 0xBF208C00, + NEONTableExt = 0x00001000, + NEONTableMask = 0xBF20FC00, + NEON_TBL_1v = NEONTableFixed | 0x00000000, + NEON_TBL_2v = NEONTableFixed | 0x00002000, + NEON_TBL_3v = NEONTableFixed | 0x00004000, + NEON_TBL_4v = NEONTableFixed | 0x00006000, + NEON_TBX_1v = NEON_TBL_1v | NEONTableExt, + NEON_TBX_2v = NEON_TBL_2v | NEONTableExt, + NEON_TBX_3v = NEON_TBL_3v | NEONTableExt, + NEON_TBX_4v = NEON_TBL_4v | NEONTableExt +}; + +// NEON perm. +enum NEONPermOp { + NEONPermFixed = 0x0E000800, + NEONPermFMask = 0xBF208C00, + NEONPermMask = 0x3F20FC00, + NEON_UZP1 = NEONPermFixed | 0x00001000, + NEON_TRN1 = NEONPermFixed | 0x00002000, + NEON_ZIP1 = NEONPermFixed | 0x00003000, + NEON_UZP2 = NEONPermFixed | 0x00005000, + NEON_TRN2 = NEONPermFixed | 0x00006000, + NEON_ZIP2 = NEONPermFixed | 0x00007000 +}; + +// NEON scalar instructions with two register operands. +enum NEONScalar2RegMiscOp { + NEONScalar2RegMiscFixed = 0x5E200800, + NEONScalar2RegMiscFMask = 0xDF3E0C00, + NEONScalar2RegMiscMask = NEON_Q | NEONScalar | NEON2RegMiscMask, + NEON_CMGT_zero_scalar = NEON_Q | NEONScalar | NEON_CMGT_zero, + NEON_CMEQ_zero_scalar = NEON_Q | NEONScalar | NEON_CMEQ_zero, + NEON_CMLT_zero_scalar = NEON_Q | NEONScalar | NEON_CMLT_zero, + NEON_CMGE_zero_scalar = NEON_Q | NEONScalar | NEON_CMGE_zero, + NEON_CMLE_zero_scalar = NEON_Q | NEONScalar | NEON_CMLE_zero, + NEON_ABS_scalar = NEON_Q | NEONScalar | NEON_ABS, + NEON_SQABS_scalar = NEON_Q | NEONScalar | NEON_SQABS, + NEON_NEG_scalar = NEON_Q | NEONScalar | NEON_NEG, + NEON_SQNEG_scalar = NEON_Q | NEONScalar | NEON_SQNEG, + NEON_SQXTN_scalar = NEON_Q | NEONScalar | NEON_SQXTN, + NEON_UQXTN_scalar = NEON_Q | NEONScalar | NEON_UQXTN, + NEON_SQXTUN_scalar = NEON_Q | NEONScalar | NEON_SQXTUN, + NEON_SUQADD_scalar = NEON_Q | NEONScalar | NEON_SUQADD, + NEON_USQADD_scalar = NEON_Q | NEONScalar | NEON_USQADD, + + NEONScalar2RegMiscOpcode = NEON2RegMiscOpcode, + NEON_NEG_scalar_opcode = NEON_NEG_scalar & NEONScalar2RegMiscOpcode, + + NEONScalar2RegMiscFPMask = NEONScalar2RegMiscMask | 0x00800000, + NEON_FRSQRTE_scalar = NEON_Q | NEONScalar | NEON_FRSQRTE, + NEON_FRECPE_scalar = NEON_Q | NEONScalar | NEON_FRECPE, + NEON_SCVTF_scalar = NEON_Q | NEONScalar | NEON_SCVTF, + NEON_UCVTF_scalar = NEON_Q | NEONScalar | NEON_UCVTF, + NEON_FCMGT_zero_scalar = NEON_Q | NEONScalar | NEON_FCMGT_zero, + NEON_FCMEQ_zero_scalar = NEON_Q | NEONScalar | NEON_FCMEQ_zero, + NEON_FCMLT_zero_scalar = NEON_Q | NEONScalar | NEON_FCMLT_zero, + NEON_FCMGE_zero_scalar = NEON_Q | NEONScalar | NEON_FCMGE_zero, + NEON_FCMLE_zero_scalar = NEON_Q | NEONScalar | NEON_FCMLE_zero, + NEON_FRECPX_scalar = NEONScalar2RegMiscFixed | 0x0081F000, + NEON_FCVTNS_scalar = NEON_Q | NEONScalar | NEON_FCVTNS, + NEON_FCVTNU_scalar = NEON_Q | NEONScalar | NEON_FCVTNU, + NEON_FCVTPS_scalar = NEON_Q | NEONScalar | NEON_FCVTPS, + NEON_FCVTPU_scalar = NEON_Q | NEONScalar | NEON_FCVTPU, + NEON_FCVTMS_scalar = NEON_Q | NEONScalar | NEON_FCVTMS, + NEON_FCVTMU_scalar = NEON_Q | NEONScalar | NEON_FCVTMU, + NEON_FCVTZS_scalar = NEON_Q | NEONScalar | NEON_FCVTZS, + NEON_FCVTZU_scalar = NEON_Q | NEONScalar | NEON_FCVTZU, + NEON_FCVTAS_scalar = NEON_Q | NEONScalar | NEON_FCVTAS, + NEON_FCVTAU_scalar = NEON_Q | NEONScalar | NEON_FCVTAU, + NEON_FCVTXN_scalar = NEON_Q | NEONScalar | NEON_FCVTXN +}; + +// NEON instructions with two register operands (FP16). +enum NEONScalar2RegMiscFP16Op { + NEONScalar2RegMiscFP16Fixed = 0x5E780800, + NEONScalar2RegMiscFP16FMask = 0xDF7E0C00, + NEONScalar2RegMiscFP16Mask = 0xFFFFFC00, + NEON_FCVTNS_H_scalar = NEON_Q | NEONScalar | NEON_FCVTNS_H, + NEON_FCVTMS_H_scalar = NEON_Q | NEONScalar | NEON_FCVTMS_H, + NEON_FCVTAS_H_scalar = NEON_Q | NEONScalar | NEON_FCVTAS_H, + NEON_SCVTF_H_scalar = NEON_Q | NEONScalar | NEON_SCVTF_H, + NEON_FCMGT_H_zero_scalar = NEON_Q | NEONScalar | NEON_FCMGT_H_zero, + NEON_FCMEQ_H_zero_scalar = NEON_Q | NEONScalar | NEON_FCMEQ_H_zero, + NEON_FCMLT_H_zero_scalar = NEON_Q | NEONScalar | NEON_FCMLT_H_zero, + NEON_FCVTPS_H_scalar = NEON_Q | NEONScalar | NEON_FCVTPS_H, + NEON_FCVTZS_H_scalar = NEON_Q | NEONScalar | NEON_FCVTZS_H, + NEON_FRECPE_H_scalar = NEON_Q | NEONScalar | NEON_FRECPE_H, + NEON_FRECPX_H_scalar = NEONScalar2RegMiscFP16Fixed | 0x0081F000, + NEON_FCVTNU_H_scalar = NEON_Q | NEONScalar | NEON_FCVTNU_H, + NEON_FCVTMU_H_scalar = NEON_Q | NEONScalar | NEON_FCVTMU_H, + NEON_FCVTAU_H_scalar = NEON_Q | NEONScalar | NEON_FCVTAU_H, + NEON_UCVTF_H_scalar = NEON_Q | NEONScalar | NEON_UCVTF_H, + NEON_FCMGE_H_zero_scalar = NEON_Q | NEONScalar | NEON_FCMGE_H_zero, + NEON_FCMLE_H_zero_scalar = NEON_Q | NEONScalar | NEON_FCMLE_H_zero, + NEON_FCVTPU_H_scalar = NEON_Q | NEONScalar | NEON_FCVTPU_H, + NEON_FCVTZU_H_scalar = NEON_Q | NEONScalar | NEON_FCVTZU_H, + NEON_FRSQRTE_H_scalar = NEON_Q | NEONScalar | NEON_FRSQRTE_H +}; + +// NEON scalar instructions with three same-type operands. +enum NEONScalar3SameOp { + NEONScalar3SameFixed = 0x5E200400, + NEONScalar3SameFMask = 0xDF200400, + NEONScalar3SameMask = 0xFF20FC00, + NEON_ADD_scalar = NEON_Q | NEONScalar | NEON_ADD, + NEON_CMEQ_scalar = NEON_Q | NEONScalar | NEON_CMEQ, + NEON_CMGE_scalar = NEON_Q | NEONScalar | NEON_CMGE, + NEON_CMGT_scalar = NEON_Q | NEONScalar | NEON_CMGT, + NEON_CMHI_scalar = NEON_Q | NEONScalar | NEON_CMHI, + NEON_CMHS_scalar = NEON_Q | NEONScalar | NEON_CMHS, + NEON_CMTST_scalar = NEON_Q | NEONScalar | NEON_CMTST, + NEON_SUB_scalar = NEON_Q | NEONScalar | NEON_SUB, + NEON_UQADD_scalar = NEON_Q | NEONScalar | NEON_UQADD, + NEON_SQADD_scalar = NEON_Q | NEONScalar | NEON_SQADD, + NEON_UQSUB_scalar = NEON_Q | NEONScalar | NEON_UQSUB, + NEON_SQSUB_scalar = NEON_Q | NEONScalar | NEON_SQSUB, + NEON_USHL_scalar = NEON_Q | NEONScalar | NEON_USHL, + NEON_SSHL_scalar = NEON_Q | NEONScalar | NEON_SSHL, + NEON_UQSHL_scalar = NEON_Q | NEONScalar | NEON_UQSHL, + NEON_SQSHL_scalar = NEON_Q | NEONScalar | NEON_SQSHL, + NEON_URSHL_scalar = NEON_Q | NEONScalar | NEON_URSHL, + NEON_SRSHL_scalar = NEON_Q | NEONScalar | NEON_SRSHL, + NEON_UQRSHL_scalar = NEON_Q | NEONScalar | NEON_UQRSHL, + NEON_SQRSHL_scalar = NEON_Q | NEONScalar | NEON_SQRSHL, + NEON_SQDMULH_scalar = NEON_Q | NEONScalar | NEON_SQDMULH, + NEON_SQRDMULH_scalar = NEON_Q | NEONScalar | NEON_SQRDMULH, + + // NEON floating point scalar instructions with three same-type operands. + NEONScalar3SameFPFixed = NEONScalar3SameFixed | 0x0000C000, + NEONScalar3SameFPFMask = NEONScalar3SameFMask | 0x0000C000, + NEONScalar3SameFPMask = NEONScalar3SameMask | 0x00800000, + NEON_FACGE_scalar = NEON_Q | NEONScalar | NEON_FACGE, + NEON_FACGT_scalar = NEON_Q | NEONScalar | NEON_FACGT, + NEON_FCMEQ_scalar = NEON_Q | NEONScalar | NEON_FCMEQ, + NEON_FCMGE_scalar = NEON_Q | NEONScalar | NEON_FCMGE, + NEON_FCMGT_scalar = NEON_Q | NEONScalar | NEON_FCMGT, + NEON_FMULX_scalar = NEON_Q | NEONScalar | NEON_FMULX, + NEON_FRECPS_scalar = NEON_Q | NEONScalar | NEON_FRECPS, + NEON_FRSQRTS_scalar = NEON_Q | NEONScalar | NEON_FRSQRTS, + NEON_FABD_scalar = NEON_Q | NEONScalar | NEON_FABD +}; + +// NEON scalar FP16 instructions with three same-type operands. +enum NEONScalar3SameFP16Op { + NEONScalar3SameFP16Fixed = 0x5E400400, + NEONScalar3SameFP16FMask = 0xDF60C400, + NEONScalar3SameFP16Mask = 0xFFE0FC00, + NEON_FABD_H_scalar = NEON_Q | NEONScalar | NEON_FABD_H, + NEON_FMULX_H_scalar = NEON_Q | NEONScalar | NEON_FMULX_H, + NEON_FCMEQ_H_scalar = NEON_Q | NEONScalar | NEON_FCMEQ_H, + NEON_FCMGE_H_scalar = NEON_Q | NEONScalar | NEON_FCMGE_H, + NEON_FCMGT_H_scalar = NEON_Q | NEONScalar | NEON_FCMGT_H, + NEON_FACGE_H_scalar = NEON_Q | NEONScalar | NEON_FACGE_H, + NEON_FACGT_H_scalar = NEON_Q | NEONScalar | NEON_FACGT_H, + NEON_FRECPS_H_scalar = NEON_Q | NEONScalar | NEON_FRECPS_H, + NEON_FRSQRTS_H_scalar = NEON_Q | NEONScalar | NEON_FRSQRTS_H +}; + +// 'Extra' NEON scalar instructions with three same-type operands. +enum NEONScalar3SameExtraOp { + NEONScalar3SameExtraFixed = 0x5E008400, + NEONScalar3SameExtraFMask = 0xDF208400, + NEONScalar3SameExtraMask = 0xFF20FC00, + NEON_SQRDMLAH_scalar = NEON_Q | NEONScalar | NEON_SQRDMLAH, + NEON_SQRDMLSH_scalar = NEON_Q | NEONScalar | NEON_SQRDMLSH +}; + +// NEON scalar instructions with three different-type operands. +enum NEONScalar3DiffOp { + NEONScalar3DiffFixed = 0x5E200000, + NEONScalar3DiffFMask = 0xDF200C00, + NEONScalar3DiffMask = NEON_Q | NEONScalar | NEON3DifferentMask, + NEON_SQDMLAL_scalar = NEON_Q | NEONScalar | NEON_SQDMLAL, + NEON_SQDMLSL_scalar = NEON_Q | NEONScalar | NEON_SQDMLSL, + NEON_SQDMULL_scalar = NEON_Q | NEONScalar | NEON_SQDMULL +}; + +// NEON scalar instructions with indexed element operand. +enum NEONScalarByIndexedElementOp { + NEONScalarByIndexedElementFixed = 0x5F000000, + NEONScalarByIndexedElementFMask = 0xDF000400, + NEONScalarByIndexedElementMask = 0xFF00F400, + NEON_SQDMLAL_byelement_scalar = NEON_Q | NEONScalar | NEON_SQDMLAL_byelement, + NEON_SQDMLSL_byelement_scalar = NEON_Q | NEONScalar | NEON_SQDMLSL_byelement, + NEON_SQDMULL_byelement_scalar = NEON_Q | NEONScalar | NEON_SQDMULL_byelement, + NEON_SQDMULH_byelement_scalar = NEON_Q | NEONScalar | NEON_SQDMULH_byelement, + NEON_SQRDMULH_byelement_scalar + = NEON_Q | NEONScalar | NEON_SQRDMULH_byelement, + NEON_SQRDMLAH_byelement_scalar + = NEON_Q | NEONScalar | NEON_SQRDMLAH_byelement, + NEON_SQRDMLSH_byelement_scalar + = NEON_Q | NEONScalar | NEON_SQRDMLSH_byelement, + NEON_FMLA_H_byelement_scalar = NEON_Q | NEONScalar | NEON_FMLA_H_byelement, + NEON_FMLS_H_byelement_scalar = NEON_Q | NEONScalar | NEON_FMLS_H_byelement, + NEON_FMUL_H_byelement_scalar = NEON_Q | NEONScalar | NEON_FMUL_H_byelement, + NEON_FMULX_H_byelement_scalar = NEON_Q | NEONScalar | NEON_FMULX_H_byelement, + + // Floating point instructions. + NEONScalarByIndexedElementFPFixed + = NEONScalarByIndexedElementFixed | 0x00800000, + NEONScalarByIndexedElementFPMask + = NEONScalarByIndexedElementMask | 0x00800000, + NEON_FMLA_byelement_scalar = NEON_Q | NEONScalar | NEON_FMLA_byelement, + NEON_FMLS_byelement_scalar = NEON_Q | NEONScalar | NEON_FMLS_byelement, + NEON_FMUL_byelement_scalar = NEON_Q | NEONScalar | NEON_FMUL_byelement, + NEON_FMULX_byelement_scalar = NEON_Q | NEONScalar | NEON_FMULX_byelement +}; + +// NEON scalar register copy. +enum NEONScalarCopyOp { + NEONScalarCopyFixed = 0x5E000400, + NEONScalarCopyFMask = 0xDFE08400, + NEONScalarCopyMask = 0xFFE0FC00, + NEON_DUP_ELEMENT_scalar = NEON_Q | NEONScalar | NEON_DUP_ELEMENT +}; + +// NEON scalar pairwise instructions. +enum NEONScalarPairwiseOp { + NEONScalarPairwiseFixed = 0x5E300800, + NEONScalarPairwiseFMask = 0xDF3E0C00, + NEONScalarPairwiseMask = 0xFFB1F800, + NEON_ADDP_scalar = NEONScalarPairwiseFixed | 0x0081B000, + NEON_FMAXNMP_h_scalar = NEONScalarPairwiseFixed | 0x0000C000, + NEON_FADDP_h_scalar = NEONScalarPairwiseFixed | 0x0000D000, + NEON_FMAXP_h_scalar = NEONScalarPairwiseFixed | 0x0000F000, + NEON_FMINNMP_h_scalar = NEONScalarPairwiseFixed | 0x0080C000, + NEON_FMINP_h_scalar = NEONScalarPairwiseFixed | 0x0080F000, + NEON_FMAXNMP_scalar = NEONScalarPairwiseFixed | 0x2000C000, + NEON_FMINNMP_scalar = NEONScalarPairwiseFixed | 0x2080C000, + NEON_FADDP_scalar = NEONScalarPairwiseFixed | 0x2000D000, + NEON_FMAXP_scalar = NEONScalarPairwiseFixed | 0x2000F000, + NEON_FMINP_scalar = NEONScalarPairwiseFixed | 0x2080F000 +}; + +// NEON scalar shift immediate. +enum NEONScalarShiftImmediateOp { + NEONScalarShiftImmediateFixed = 0x5F000400, + NEONScalarShiftImmediateFMask = 0xDF800400, + NEONScalarShiftImmediateMask = 0xFF80FC00, + NEON_SHL_scalar = NEON_Q | NEONScalar | NEON_SHL, + NEON_SLI_scalar = NEON_Q | NEONScalar | NEON_SLI, + NEON_SRI_scalar = NEON_Q | NEONScalar | NEON_SRI, + NEON_SSHR_scalar = NEON_Q | NEONScalar | NEON_SSHR, + NEON_USHR_scalar = NEON_Q | NEONScalar | NEON_USHR, + NEON_SRSHR_scalar = NEON_Q | NEONScalar | NEON_SRSHR, + NEON_URSHR_scalar = NEON_Q | NEONScalar | NEON_URSHR, + NEON_SSRA_scalar = NEON_Q | NEONScalar | NEON_SSRA, + NEON_USRA_scalar = NEON_Q | NEONScalar | NEON_USRA, + NEON_SRSRA_scalar = NEON_Q | NEONScalar | NEON_SRSRA, + NEON_URSRA_scalar = NEON_Q | NEONScalar | NEON_URSRA, + NEON_UQSHRN_scalar = NEON_Q | NEONScalar | NEON_UQSHRN, + NEON_UQRSHRN_scalar = NEON_Q | NEONScalar | NEON_UQRSHRN, + NEON_SQSHRN_scalar = NEON_Q | NEONScalar | NEON_SQSHRN, + NEON_SQRSHRN_scalar = NEON_Q | NEONScalar | NEON_SQRSHRN, + NEON_SQSHRUN_scalar = NEON_Q | NEONScalar | NEON_SQSHRUN, + NEON_SQRSHRUN_scalar = NEON_Q | NEONScalar | NEON_SQRSHRUN, + NEON_SQSHLU_scalar = NEON_Q | NEONScalar | NEON_SQSHLU, + NEON_SQSHL_imm_scalar = NEON_Q | NEONScalar | NEON_SQSHL_imm, + NEON_UQSHL_imm_scalar = NEON_Q | NEONScalar | NEON_UQSHL_imm, + NEON_SCVTF_imm_scalar = NEON_Q | NEONScalar | NEON_SCVTF_imm, + NEON_UCVTF_imm_scalar = NEON_Q | NEONScalar | NEON_UCVTF_imm, + NEON_FCVTZS_imm_scalar = NEON_Q | NEONScalar | NEON_FCVTZS_imm, + NEON_FCVTZU_imm_scalar = NEON_Q | NEONScalar | NEON_FCVTZU_imm +}; + +enum SVE32BitGatherLoadHalfwords_ScalarPlus32BitScaledOffsetsOp { + SVE32BitGatherLoadHalfwords_ScalarPlus32BitScaledOffsetsFixed = 0x84A00000, + SVE32BitGatherLoadHalfwords_ScalarPlus32BitScaledOffsetsFMask = 0xFFA08000, + SVE32BitGatherLoadHalfwords_ScalarPlus32BitScaledOffsetsMask = 0xFFA0E000, + LD1SH_z_p_bz_s_x32_scaled = SVE32BitGatherLoadHalfwords_ScalarPlus32BitScaledOffsetsFixed, + LDFF1SH_z_p_bz_s_x32_scaled = SVE32BitGatherLoadHalfwords_ScalarPlus32BitScaledOffsetsFixed | 0x00002000, + LD1H_z_p_bz_s_x32_scaled = SVE32BitGatherLoadHalfwords_ScalarPlus32BitScaledOffsetsFixed | 0x00004000, + LDFF1H_z_p_bz_s_x32_scaled = SVE32BitGatherLoadHalfwords_ScalarPlus32BitScaledOffsetsFixed | 0x00006000 +}; + +enum SVE32BitGatherLoadWords_ScalarPlus32BitScaledOffsetsOp { + SVE32BitGatherLoadWords_ScalarPlus32BitScaledOffsetsFixed = 0x85200000, + SVE32BitGatherLoadWords_ScalarPlus32BitScaledOffsetsFMask = 0xFFA08000, + SVE32BitGatherLoadWords_ScalarPlus32BitScaledOffsetsMask = 0xFFA0E000, + LD1W_z_p_bz_s_x32_scaled = SVE32BitGatherLoadWords_ScalarPlus32BitScaledOffsetsFixed | 0x00004000, + LDFF1W_z_p_bz_s_x32_scaled = SVE32BitGatherLoadWords_ScalarPlus32BitScaledOffsetsFixed | 0x00006000 +}; + +enum SVE32BitGatherLoad_ScalarPlus32BitUnscaledOffsetsOp { + SVE32BitGatherLoad_ScalarPlus32BitUnscaledOffsetsFixed = 0x84000000, + SVE32BitGatherLoad_ScalarPlus32BitUnscaledOffsetsFMask = 0xFE208000, + SVE32BitGatherLoad_ScalarPlus32BitUnscaledOffsetsMask = 0xFFA0E000, + LD1SB_z_p_bz_s_x32_unscaled = SVE32BitGatherLoad_ScalarPlus32BitUnscaledOffsetsFixed, + LDFF1SB_z_p_bz_s_x32_unscaled = SVE32BitGatherLoad_ScalarPlus32BitUnscaledOffsetsFixed | 0x00002000, + LD1B_z_p_bz_s_x32_unscaled = SVE32BitGatherLoad_ScalarPlus32BitUnscaledOffsetsFixed | 0x00004000, + LDFF1B_z_p_bz_s_x32_unscaled = SVE32BitGatherLoad_ScalarPlus32BitUnscaledOffsetsFixed | 0x00006000, + LD1SH_z_p_bz_s_x32_unscaled = SVE32BitGatherLoad_ScalarPlus32BitUnscaledOffsetsFixed | 0x00800000, + LDFF1SH_z_p_bz_s_x32_unscaled = SVE32BitGatherLoad_ScalarPlus32BitUnscaledOffsetsFixed | 0x00802000, + LD1H_z_p_bz_s_x32_unscaled = SVE32BitGatherLoad_ScalarPlus32BitUnscaledOffsetsFixed | 0x00804000, + LDFF1H_z_p_bz_s_x32_unscaled = SVE32BitGatherLoad_ScalarPlus32BitUnscaledOffsetsFixed | 0x00806000, + LD1W_z_p_bz_s_x32_unscaled = SVE32BitGatherLoad_ScalarPlus32BitUnscaledOffsetsFixed | 0x01004000, + LDFF1W_z_p_bz_s_x32_unscaled = SVE32BitGatherLoad_ScalarPlus32BitUnscaledOffsetsFixed | 0x01006000 +}; + +enum SVE32BitGatherLoad_VectorPlusImmOp { + SVE32BitGatherLoad_VectorPlusImmFixed = 0x84208000, + SVE32BitGatherLoad_VectorPlusImmFMask = 0xFE608000, + SVE32BitGatherLoad_VectorPlusImmMask = 0xFFE0E000, + LD1SB_z_p_ai_s = SVE32BitGatherLoad_VectorPlusImmFixed, + LDFF1SB_z_p_ai_s = SVE32BitGatherLoad_VectorPlusImmFixed | 0x00002000, + LD1B_z_p_ai_s = SVE32BitGatherLoad_VectorPlusImmFixed | 0x00004000, + LDFF1B_z_p_ai_s = SVE32BitGatherLoad_VectorPlusImmFixed | 0x00006000, + LD1SH_z_p_ai_s = SVE32BitGatherLoad_VectorPlusImmFixed | 0x00800000, + LDFF1SH_z_p_ai_s = SVE32BitGatherLoad_VectorPlusImmFixed | 0x00802000, + LD1H_z_p_ai_s = SVE32BitGatherLoad_VectorPlusImmFixed | 0x00804000, + LDFF1H_z_p_ai_s = SVE32BitGatherLoad_VectorPlusImmFixed | 0x00806000, + LD1W_z_p_ai_s = SVE32BitGatherLoad_VectorPlusImmFixed | 0x01004000, + LDFF1W_z_p_ai_s = SVE32BitGatherLoad_VectorPlusImmFixed | 0x01006000 +}; + +enum SVE32BitGatherPrefetch_ScalarPlus32BitScaledOffsetsOp { + SVE32BitGatherPrefetch_ScalarPlus32BitScaledOffsetsFixed = 0x84200000, + SVE32BitGatherPrefetch_ScalarPlus32BitScaledOffsetsFMask = 0xFFA08010, + SVE32BitGatherPrefetch_ScalarPlus32BitScaledOffsetsMask = 0xFFA0E010, + PRFB_i_p_bz_s_x32_scaled = SVE32BitGatherPrefetch_ScalarPlus32BitScaledOffsetsFixed, + PRFH_i_p_bz_s_x32_scaled = SVE32BitGatherPrefetch_ScalarPlus32BitScaledOffsetsFixed | 0x00002000, + PRFW_i_p_bz_s_x32_scaled = SVE32BitGatherPrefetch_ScalarPlus32BitScaledOffsetsFixed | 0x00004000, + PRFD_i_p_bz_s_x32_scaled = SVE32BitGatherPrefetch_ScalarPlus32BitScaledOffsetsFixed | 0x00006000 +}; + +enum SVE32BitGatherPrefetch_VectorPlusImmOp { + SVE32BitGatherPrefetch_VectorPlusImmFixed = 0x8400E000, + SVE32BitGatherPrefetch_VectorPlusImmFMask = 0xFE60E010, + SVE32BitGatherPrefetch_VectorPlusImmMask = 0xFFE0E010, + PRFB_i_p_ai_s = SVE32BitGatherPrefetch_VectorPlusImmFixed, + PRFH_i_p_ai_s = SVE32BitGatherPrefetch_VectorPlusImmFixed | 0x00800000, + PRFW_i_p_ai_s = SVE32BitGatherPrefetch_VectorPlusImmFixed | 0x01000000, + PRFD_i_p_ai_s = SVE32BitGatherPrefetch_VectorPlusImmFixed | 0x01800000 +}; + +enum SVE32BitScatterStore_ScalarPlus32BitScaledOffsetsOp { + SVE32BitScatterStore_ScalarPlus32BitScaledOffsetsFixed = 0xE4608000, + SVE32BitScatterStore_ScalarPlus32BitScaledOffsetsFMask = 0xFE60A000, + SVE32BitScatterStore_ScalarPlus32BitScaledOffsetsMask = 0xFFE0A000, + ST1H_z_p_bz_s_x32_scaled = SVE32BitScatterStore_ScalarPlus32BitScaledOffsetsFixed | 0x00800000, + ST1W_z_p_bz_s_x32_scaled = SVE32BitScatterStore_ScalarPlus32BitScaledOffsetsFixed | 0x01000000 +}; + +enum SVE32BitScatterStore_ScalarPlus32BitUnscaledOffsetsOp { + SVE32BitScatterStore_ScalarPlus32BitUnscaledOffsetsFixed = 0xE4408000, + SVE32BitScatterStore_ScalarPlus32BitUnscaledOffsetsFMask = 0xFE60A000, + SVE32BitScatterStore_ScalarPlus32BitUnscaledOffsetsMask = 0xFFE0A000, + ST1B_z_p_bz_s_x32_unscaled = SVE32BitScatterStore_ScalarPlus32BitUnscaledOffsetsFixed, + ST1H_z_p_bz_s_x32_unscaled = SVE32BitScatterStore_ScalarPlus32BitUnscaledOffsetsFixed | 0x00800000, + ST1W_z_p_bz_s_x32_unscaled = SVE32BitScatterStore_ScalarPlus32BitUnscaledOffsetsFixed | 0x01000000 +}; + +enum SVE32BitScatterStore_VectorPlusImmOp { + SVE32BitScatterStore_VectorPlusImmFixed = 0xE460A000, + SVE32BitScatterStore_VectorPlusImmFMask = 0xFE60E000, + SVE32BitScatterStore_VectorPlusImmMask = 0xFFE0E000, + ST1B_z_p_ai_s = SVE32BitScatterStore_VectorPlusImmFixed, + ST1H_z_p_ai_s = SVE32BitScatterStore_VectorPlusImmFixed | 0x00800000, + ST1W_z_p_ai_s = SVE32BitScatterStore_VectorPlusImmFixed | 0x01000000 +}; + +enum SVE64BitGatherLoad_ScalarPlus32BitUnpackedScaledOffsetsOp { + SVE64BitGatherLoad_ScalarPlus32BitUnpackedScaledOffsetsFixed = 0xC4200000, + SVE64BitGatherLoad_ScalarPlus32BitUnpackedScaledOffsetsFMask = 0xFE208000, + SVE64BitGatherLoad_ScalarPlus32BitUnpackedScaledOffsetsMask = 0xFFA0E000, + LD1SH_z_p_bz_d_x32_scaled = SVE64BitGatherLoad_ScalarPlus32BitUnpackedScaledOffsetsFixed | 0x00800000, + LDFF1SH_z_p_bz_d_x32_scaled = SVE64BitGatherLoad_ScalarPlus32BitUnpackedScaledOffsetsFixed | 0x00802000, + LD1H_z_p_bz_d_x32_scaled = SVE64BitGatherLoad_ScalarPlus32BitUnpackedScaledOffsetsFixed | 0x00804000, + LDFF1H_z_p_bz_d_x32_scaled = SVE64BitGatherLoad_ScalarPlus32BitUnpackedScaledOffsetsFixed | 0x00806000, + LD1SW_z_p_bz_d_x32_scaled = SVE64BitGatherLoad_ScalarPlus32BitUnpackedScaledOffsetsFixed | 0x01000000, + LDFF1SW_z_p_bz_d_x32_scaled = SVE64BitGatherLoad_ScalarPlus32BitUnpackedScaledOffsetsFixed | 0x01002000, + LD1W_z_p_bz_d_x32_scaled = SVE64BitGatherLoad_ScalarPlus32BitUnpackedScaledOffsetsFixed | 0x01004000, + LDFF1W_z_p_bz_d_x32_scaled = SVE64BitGatherLoad_ScalarPlus32BitUnpackedScaledOffsetsFixed | 0x01006000, + LD1D_z_p_bz_d_x32_scaled = SVE64BitGatherLoad_ScalarPlus32BitUnpackedScaledOffsetsFixed | 0x01804000, + LDFF1D_z_p_bz_d_x32_scaled = SVE64BitGatherLoad_ScalarPlus32BitUnpackedScaledOffsetsFixed | 0x01806000 +}; + +enum SVE64BitGatherLoad_ScalarPlus64BitScaledOffsetsOp { + SVE64BitGatherLoad_ScalarPlus64BitScaledOffsetsFixed = 0xC4608000, + SVE64BitGatherLoad_ScalarPlus64BitScaledOffsetsFMask = 0xFE608000, + SVE64BitGatherLoad_ScalarPlus64BitScaledOffsetsMask = 0xFFE0E000, + LD1SH_z_p_bz_d_64_scaled = SVE64BitGatherLoad_ScalarPlus64BitScaledOffsetsFixed | 0x00800000, + LDFF1SH_z_p_bz_d_64_scaled = SVE64BitGatherLoad_ScalarPlus64BitScaledOffsetsFixed | 0x00802000, + LD1H_z_p_bz_d_64_scaled = SVE64BitGatherLoad_ScalarPlus64BitScaledOffsetsFixed | 0x00804000, + LDFF1H_z_p_bz_d_64_scaled = SVE64BitGatherLoad_ScalarPlus64BitScaledOffsetsFixed | 0x00806000, + LD1SW_z_p_bz_d_64_scaled = SVE64BitGatherLoad_ScalarPlus64BitScaledOffsetsFixed | 0x01000000, + LDFF1SW_z_p_bz_d_64_scaled = SVE64BitGatherLoad_ScalarPlus64BitScaledOffsetsFixed | 0x01002000, + LD1W_z_p_bz_d_64_scaled = SVE64BitGatherLoad_ScalarPlus64BitScaledOffsetsFixed | 0x01004000, + LDFF1W_z_p_bz_d_64_scaled = SVE64BitGatherLoad_ScalarPlus64BitScaledOffsetsFixed | 0x01006000, + LD1D_z_p_bz_d_64_scaled = SVE64BitGatherLoad_ScalarPlus64BitScaledOffsetsFixed | 0x01804000, + LDFF1D_z_p_bz_d_64_scaled = SVE64BitGatherLoad_ScalarPlus64BitScaledOffsetsFixed | 0x01806000 +}; + +enum SVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsetsOp { + SVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsetsFixed = 0xC4408000, + SVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsetsFMask = 0xFE608000, + SVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsetsMask = 0xFFE0E000, + LD1SB_z_p_bz_d_64_unscaled = SVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsetsFixed, + LDFF1SB_z_p_bz_d_64_unscaled = SVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsetsFixed | 0x00002000, + LD1B_z_p_bz_d_64_unscaled = SVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsetsFixed | 0x00004000, + LDFF1B_z_p_bz_d_64_unscaled = SVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsetsFixed | 0x00006000, + LD1SH_z_p_bz_d_64_unscaled = SVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsetsFixed | 0x00800000, + LDFF1SH_z_p_bz_d_64_unscaled = SVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsetsFixed | 0x00802000, + LD1H_z_p_bz_d_64_unscaled = SVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsetsFixed | 0x00804000, + LDFF1H_z_p_bz_d_64_unscaled = SVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsetsFixed | 0x00806000, + LD1SW_z_p_bz_d_64_unscaled = SVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsetsFixed | 0x01000000, + LDFF1SW_z_p_bz_d_64_unscaled = SVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsetsFixed | 0x01002000, + LD1W_z_p_bz_d_64_unscaled = SVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsetsFixed | 0x01004000, + LDFF1W_z_p_bz_d_64_unscaled = SVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsetsFixed | 0x01006000, + LD1D_z_p_bz_d_64_unscaled = SVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsetsFixed | 0x01804000, + LDFF1D_z_p_bz_d_64_unscaled = SVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsetsFixed | 0x01806000 +}; + +enum SVE64BitGatherLoad_ScalarPlusUnpacked32BitUnscaledOffsetsOp { + SVE64BitGatherLoad_ScalarPlusUnpacked32BitUnscaledOffsetsFixed = 0xC4000000, + SVE64BitGatherLoad_ScalarPlusUnpacked32BitUnscaledOffsetsFMask = 0xFE208000, + SVE64BitGatherLoad_ScalarPlusUnpacked32BitUnscaledOffsetsMask = 0xFFA0E000, + LD1SB_z_p_bz_d_x32_unscaled = SVE64BitGatherLoad_ScalarPlusUnpacked32BitUnscaledOffsetsFixed, + LDFF1SB_z_p_bz_d_x32_unscaled = SVE64BitGatherLoad_ScalarPlusUnpacked32BitUnscaledOffsetsFixed | 0x00002000, + LD1B_z_p_bz_d_x32_unscaled = SVE64BitGatherLoad_ScalarPlusUnpacked32BitUnscaledOffsetsFixed | 0x00004000, + LDFF1B_z_p_bz_d_x32_unscaled = SVE64BitGatherLoad_ScalarPlusUnpacked32BitUnscaledOffsetsFixed | 0x00006000, + LD1SH_z_p_bz_d_x32_unscaled = SVE64BitGatherLoad_ScalarPlusUnpacked32BitUnscaledOffsetsFixed | 0x00800000, + LDFF1SH_z_p_bz_d_x32_unscaled = SVE64BitGatherLoad_ScalarPlusUnpacked32BitUnscaledOffsetsFixed | 0x00802000, + LD1H_z_p_bz_d_x32_unscaled = SVE64BitGatherLoad_ScalarPlusUnpacked32BitUnscaledOffsetsFixed | 0x00804000, + LDFF1H_z_p_bz_d_x32_unscaled = SVE64BitGatherLoad_ScalarPlusUnpacked32BitUnscaledOffsetsFixed | 0x00806000, + LD1SW_z_p_bz_d_x32_unscaled = SVE64BitGatherLoad_ScalarPlusUnpacked32BitUnscaledOffsetsFixed | 0x01000000, + LDFF1SW_z_p_bz_d_x32_unscaled = SVE64BitGatherLoad_ScalarPlusUnpacked32BitUnscaledOffsetsFixed | 0x01002000, + LD1W_z_p_bz_d_x32_unscaled = SVE64BitGatherLoad_ScalarPlusUnpacked32BitUnscaledOffsetsFixed | 0x01004000, + LDFF1W_z_p_bz_d_x32_unscaled = SVE64BitGatherLoad_ScalarPlusUnpacked32BitUnscaledOffsetsFixed | 0x01006000, + LD1D_z_p_bz_d_x32_unscaled = SVE64BitGatherLoad_ScalarPlusUnpacked32BitUnscaledOffsetsFixed | 0x01804000, + LDFF1D_z_p_bz_d_x32_unscaled = SVE64BitGatherLoad_ScalarPlusUnpacked32BitUnscaledOffsetsFixed | 0x01806000 +}; + +enum SVE64BitGatherLoad_VectorPlusImmOp { + SVE64BitGatherLoad_VectorPlusImmFixed = 0xC4208000, + SVE64BitGatherLoad_VectorPlusImmFMask = 0xFE608000, + SVE64BitGatherLoad_VectorPlusImmMask = 0xFFE0E000, + LD1SB_z_p_ai_d = SVE64BitGatherLoad_VectorPlusImmFixed, + LDFF1SB_z_p_ai_d = SVE64BitGatherLoad_VectorPlusImmFixed | 0x00002000, + LD1B_z_p_ai_d = SVE64BitGatherLoad_VectorPlusImmFixed | 0x00004000, + LDFF1B_z_p_ai_d = SVE64BitGatherLoad_VectorPlusImmFixed | 0x00006000, + LD1SH_z_p_ai_d = SVE64BitGatherLoad_VectorPlusImmFixed | 0x00800000, + LDFF1SH_z_p_ai_d = SVE64BitGatherLoad_VectorPlusImmFixed | 0x00802000, + LD1H_z_p_ai_d = SVE64BitGatherLoad_VectorPlusImmFixed | 0x00804000, + LDFF1H_z_p_ai_d = SVE64BitGatherLoad_VectorPlusImmFixed | 0x00806000, + LD1SW_z_p_ai_d = SVE64BitGatherLoad_VectorPlusImmFixed | 0x01000000, + LDFF1SW_z_p_ai_d = SVE64BitGatherLoad_VectorPlusImmFixed | 0x01002000, + LD1W_z_p_ai_d = SVE64BitGatherLoad_VectorPlusImmFixed | 0x01004000, + LDFF1W_z_p_ai_d = SVE64BitGatherLoad_VectorPlusImmFixed | 0x01006000, + LD1D_z_p_ai_d = SVE64BitGatherLoad_VectorPlusImmFixed | 0x01804000, + LDFF1D_z_p_ai_d = SVE64BitGatherLoad_VectorPlusImmFixed | 0x01806000 +}; + +enum SVE64BitGatherPrefetch_ScalarPlus64BitScaledOffsetsOp { + SVE64BitGatherPrefetch_ScalarPlus64BitScaledOffsetsFixed = 0xC4608000, + SVE64BitGatherPrefetch_ScalarPlus64BitScaledOffsetsFMask = 0xFFE08010, + SVE64BitGatherPrefetch_ScalarPlus64BitScaledOffsetsMask = 0xFFE0E010, + PRFB_i_p_bz_d_64_scaled = SVE64BitGatherPrefetch_ScalarPlus64BitScaledOffsetsFixed, + PRFH_i_p_bz_d_64_scaled = SVE64BitGatherPrefetch_ScalarPlus64BitScaledOffsetsFixed | 0x00002000, + PRFW_i_p_bz_d_64_scaled = SVE64BitGatherPrefetch_ScalarPlus64BitScaledOffsetsFixed | 0x00004000, + PRFD_i_p_bz_d_64_scaled = SVE64BitGatherPrefetch_ScalarPlus64BitScaledOffsetsFixed | 0x00006000 +}; + +enum SVE64BitGatherPrefetch_ScalarPlusUnpacked32BitScaledOffsetsOp { + SVE64BitGatherPrefetch_ScalarPlusUnpacked32BitScaledOffsetsFixed = 0xC4200000, + SVE64BitGatherPrefetch_ScalarPlusUnpacked32BitScaledOffsetsFMask = 0xFFA08010, + SVE64BitGatherPrefetch_ScalarPlusUnpacked32BitScaledOffsetsMask = 0xFFA0E010, + PRFB_i_p_bz_d_x32_scaled = SVE64BitGatherPrefetch_ScalarPlusUnpacked32BitScaledOffsetsFixed, + PRFH_i_p_bz_d_x32_scaled = SVE64BitGatherPrefetch_ScalarPlusUnpacked32BitScaledOffsetsFixed | 0x00002000, + PRFW_i_p_bz_d_x32_scaled = SVE64BitGatherPrefetch_ScalarPlusUnpacked32BitScaledOffsetsFixed | 0x00004000, + PRFD_i_p_bz_d_x32_scaled = SVE64BitGatherPrefetch_ScalarPlusUnpacked32BitScaledOffsetsFixed | 0x00006000 +}; + +enum SVE64BitGatherPrefetch_VectorPlusImmOp { + SVE64BitGatherPrefetch_VectorPlusImmFixed = 0xC400E000, + SVE64BitGatherPrefetch_VectorPlusImmFMask = 0xFE60E010, + SVE64BitGatherPrefetch_VectorPlusImmMask = 0xFFE0E010, + PRFB_i_p_ai_d = SVE64BitGatherPrefetch_VectorPlusImmFixed, + PRFH_i_p_ai_d = SVE64BitGatherPrefetch_VectorPlusImmFixed | 0x00800000, + PRFW_i_p_ai_d = SVE64BitGatherPrefetch_VectorPlusImmFixed | 0x01000000, + PRFD_i_p_ai_d = SVE64BitGatherPrefetch_VectorPlusImmFixed | 0x01800000 +}; + +enum SVE64BitScatterStore_ScalarPlus64BitScaledOffsetsOp { + SVE64BitScatterStore_ScalarPlus64BitScaledOffsetsFixed = 0xE420A000, + SVE64BitScatterStore_ScalarPlus64BitScaledOffsetsFMask = 0xFE60E000, + SVE64BitScatterStore_ScalarPlus64BitScaledOffsetsMask = 0xFFE0E000, + ST1H_z_p_bz_d_64_scaled = SVE64BitScatterStore_ScalarPlus64BitScaledOffsetsFixed | 0x00800000, + ST1W_z_p_bz_d_64_scaled = SVE64BitScatterStore_ScalarPlus64BitScaledOffsetsFixed | 0x01000000, + ST1D_z_p_bz_d_64_scaled = SVE64BitScatterStore_ScalarPlus64BitScaledOffsetsFixed | 0x01800000 +}; + +enum SVE64BitScatterStore_ScalarPlus64BitUnscaledOffsetsOp { + SVE64BitScatterStore_ScalarPlus64BitUnscaledOffsetsFixed = 0xE400A000, + SVE64BitScatterStore_ScalarPlus64BitUnscaledOffsetsFMask = 0xFE60E000, + SVE64BitScatterStore_ScalarPlus64BitUnscaledOffsetsMask = 0xFFE0E000, + ST1B_z_p_bz_d_64_unscaled = SVE64BitScatterStore_ScalarPlus64BitUnscaledOffsetsFixed, + ST1H_z_p_bz_d_64_unscaled = SVE64BitScatterStore_ScalarPlus64BitUnscaledOffsetsFixed | 0x00800000, + ST1W_z_p_bz_d_64_unscaled = SVE64BitScatterStore_ScalarPlus64BitUnscaledOffsetsFixed | 0x01000000, + ST1D_z_p_bz_d_64_unscaled = SVE64BitScatterStore_ScalarPlus64BitUnscaledOffsetsFixed | 0x01800000 +}; + +enum SVE64BitScatterStore_ScalarPlusUnpacked32BitScaledOffsetsOp { + SVE64BitScatterStore_ScalarPlusUnpacked32BitScaledOffsetsFixed = 0xE4208000, + SVE64BitScatterStore_ScalarPlusUnpacked32BitScaledOffsetsFMask = 0xFE60A000, + SVE64BitScatterStore_ScalarPlusUnpacked32BitScaledOffsetsMask = 0xFFE0A000, + ST1H_z_p_bz_d_x32_scaled = SVE64BitScatterStore_ScalarPlusUnpacked32BitScaledOffsetsFixed | 0x00800000, + ST1W_z_p_bz_d_x32_scaled = SVE64BitScatterStore_ScalarPlusUnpacked32BitScaledOffsetsFixed | 0x01000000, + ST1D_z_p_bz_d_x32_scaled = SVE64BitScatterStore_ScalarPlusUnpacked32BitScaledOffsetsFixed | 0x01800000 +}; + +enum SVE64BitScatterStore_ScalarPlusUnpacked32BitUnscaledOffsetsOp { + SVE64BitScatterStore_ScalarPlusUnpacked32BitUnscaledOffsetsFixed = 0xE4008000, + SVE64BitScatterStore_ScalarPlusUnpacked32BitUnscaledOffsetsFMask = 0xFE60A000, + SVE64BitScatterStore_ScalarPlusUnpacked32BitUnscaledOffsetsMask = 0xFFE0A000, + ST1B_z_p_bz_d_x32_unscaled = SVE64BitScatterStore_ScalarPlusUnpacked32BitUnscaledOffsetsFixed, + ST1H_z_p_bz_d_x32_unscaled = SVE64BitScatterStore_ScalarPlusUnpacked32BitUnscaledOffsetsFixed | 0x00800000, + ST1W_z_p_bz_d_x32_unscaled = SVE64BitScatterStore_ScalarPlusUnpacked32BitUnscaledOffsetsFixed | 0x01000000, + ST1D_z_p_bz_d_x32_unscaled = SVE64BitScatterStore_ScalarPlusUnpacked32BitUnscaledOffsetsFixed | 0x01800000 +}; + +enum SVE64BitScatterStore_VectorPlusImmOp { + SVE64BitScatterStore_VectorPlusImmFixed = 0xE440A000, + SVE64BitScatterStore_VectorPlusImmFMask = 0xFE60E000, + SVE64BitScatterStore_VectorPlusImmMask = 0xFFE0E000, + ST1B_z_p_ai_d = SVE64BitScatterStore_VectorPlusImmFixed, + ST1H_z_p_ai_d = SVE64BitScatterStore_VectorPlusImmFixed | 0x00800000, + ST1W_z_p_ai_d = SVE64BitScatterStore_VectorPlusImmFixed | 0x01000000, + ST1D_z_p_ai_d = SVE64BitScatterStore_VectorPlusImmFixed | 0x01800000 +}; + +enum SVEAddressGenerationOp { + SVEAddressGenerationFixed = 0x0420A000, + SVEAddressGenerationFMask = 0xFF20F000, + SVEAddressGenerationMask = 0xFFE0F000, + ADR_z_az_d_s32_scaled = SVEAddressGenerationFixed, + ADR_z_az_d_u32_scaled = SVEAddressGenerationFixed | 0x00400000, + ADR_z_az_s_same_scaled = SVEAddressGenerationFixed | 0x00800000, + ADR_z_az_d_same_scaled = SVEAddressGenerationFixed | 0x00C00000 +}; + +enum SVEBitwiseLogicalUnpredicatedOp { + SVEBitwiseLogicalUnpredicatedFixed = 0x04202000, + SVEBitwiseLogicalUnpredicatedFMask = 0xFF20E000, + SVEBitwiseLogicalUnpredicatedMask = 0xFFE0FC00, + AND_z_zz = SVEBitwiseLogicalUnpredicatedFixed | 0x00001000, + ORR_z_zz = SVEBitwiseLogicalUnpredicatedFixed | 0x00401000, + EOR_z_zz = SVEBitwiseLogicalUnpredicatedFixed | 0x00801000, + BIC_z_zz = SVEBitwiseLogicalUnpredicatedFixed | 0x00C01000 +}; + +enum SVEBitwiseLogicalWithImm_UnpredicatedOp { + SVEBitwiseLogicalWithImm_UnpredicatedFixed = 0x05000000, + SVEBitwiseLogicalWithImm_UnpredicatedFMask = 0xFF3C0000, + SVEBitwiseLogicalWithImm_UnpredicatedMask = 0xFFFC0000, + ORR_z_zi = SVEBitwiseLogicalWithImm_UnpredicatedFixed, + EOR_z_zi = SVEBitwiseLogicalWithImm_UnpredicatedFixed | 0x00400000, + AND_z_zi = SVEBitwiseLogicalWithImm_UnpredicatedFixed | 0x00800000 +}; + +enum SVEBitwiseLogical_PredicatedOp { + SVEBitwiseLogical_PredicatedFixed = 0x04180000, + SVEBitwiseLogical_PredicatedFMask = 0xFF38E000, + SVEBitwiseLogical_PredicatedMask = 0xFF3FE000, + ORR_z_p_zz = SVEBitwiseLogical_PredicatedFixed, + EOR_z_p_zz = SVEBitwiseLogical_PredicatedFixed | 0x00010000, + AND_z_p_zz = SVEBitwiseLogical_PredicatedFixed | 0x00020000, + BIC_z_p_zz = SVEBitwiseLogical_PredicatedFixed | 0x00030000 +}; + +enum SVEBitwiseShiftByImm_PredicatedOp { + SVEBitwiseShiftByImm_PredicatedFixed = 0x04008000, + SVEBitwiseShiftByImm_PredicatedFMask = 0xFF30E000, + SVEBitwiseShiftByImm_PredicatedMask = 0xFF3FE000, + ASR_z_p_zi = SVEBitwiseShiftByImm_PredicatedFixed, + LSR_z_p_zi = SVEBitwiseShiftByImm_PredicatedFixed | 0x00010000, + LSL_z_p_zi = SVEBitwiseShiftByImm_PredicatedFixed | 0x00030000, + ASRD_z_p_zi = SVEBitwiseShiftByImm_PredicatedFixed | 0x00040000 +}; + +enum SVEBitwiseShiftByVector_PredicatedOp { + SVEBitwiseShiftByVector_PredicatedFixed = 0x04108000, + SVEBitwiseShiftByVector_PredicatedFMask = 0xFF38E000, + SVEBitwiseShiftByVector_PredicatedMask = 0xFF3FE000, + ASR_z_p_zz = SVEBitwiseShiftByVector_PredicatedFixed, + LSR_z_p_zz = SVEBitwiseShiftByVector_PredicatedFixed | 0x00010000, + LSL_z_p_zz = SVEBitwiseShiftByVector_PredicatedFixed | 0x00030000, + ASRR_z_p_zz = SVEBitwiseShiftByVector_PredicatedFixed | 0x00040000, + LSRR_z_p_zz = SVEBitwiseShiftByVector_PredicatedFixed | 0x00050000, + LSLR_z_p_zz = SVEBitwiseShiftByVector_PredicatedFixed | 0x00070000 +}; + +enum SVEBitwiseShiftByWideElements_PredicatedOp { + SVEBitwiseShiftByWideElements_PredicatedFixed = 0x04188000, + SVEBitwiseShiftByWideElements_PredicatedFMask = 0xFF38E000, + SVEBitwiseShiftByWideElements_PredicatedMask = 0xFF3FE000, + ASR_z_p_zw = SVEBitwiseShiftByWideElements_PredicatedFixed, + LSR_z_p_zw = SVEBitwiseShiftByWideElements_PredicatedFixed | 0x00010000, + LSL_z_p_zw = SVEBitwiseShiftByWideElements_PredicatedFixed | 0x00030000 +}; + +enum SVEBitwiseShiftUnpredicatedOp { + SVEBitwiseShiftUnpredicatedFixed = 0x04208000, + SVEBitwiseShiftUnpredicatedFMask = 0xFF20E000, + SVEBitwiseShiftUnpredicatedMask = 0xFF20FC00, + ASR_z_zw = SVEBitwiseShiftUnpredicatedFixed, + LSR_z_zw = SVEBitwiseShiftUnpredicatedFixed | 0x00000400, + LSL_z_zw = SVEBitwiseShiftUnpredicatedFixed | 0x00000C00, + ASR_z_zi = SVEBitwiseShiftUnpredicatedFixed | 0x00001000, + LSR_z_zi = SVEBitwiseShiftUnpredicatedFixed | 0x00001400, + LSL_z_zi = SVEBitwiseShiftUnpredicatedFixed | 0x00001C00 +}; + +enum SVEBroadcastBitmaskImmOp { + SVEBroadcastBitmaskImmFixed = 0x05C00000, + SVEBroadcastBitmaskImmFMask = 0xFFFC0000, + SVEBroadcastBitmaskImmMask = 0xFFFC0000, + DUPM_z_i = SVEBroadcastBitmaskImmFixed +}; + +enum SVEBroadcastFPImm_UnpredicatedOp { + SVEBroadcastFPImm_UnpredicatedFixed = 0x2539C000, + SVEBroadcastFPImm_UnpredicatedFMask = 0xFF39C000, + SVEBroadcastFPImm_UnpredicatedMask = 0xFF3FE000, + FDUP_z_i = SVEBroadcastFPImm_UnpredicatedFixed +}; + +enum SVEBroadcastGeneralRegisterOp { + SVEBroadcastGeneralRegisterFixed = 0x05203800, + SVEBroadcastGeneralRegisterFMask = 0xFF3FFC00, + SVEBroadcastGeneralRegisterMask = 0xFF3FFC00, + DUP_z_r = SVEBroadcastGeneralRegisterFixed +}; + +enum SVEBroadcastIndexElementOp { + SVEBroadcastIndexElementFixed = 0x05202000, + SVEBroadcastIndexElementFMask = 0xFF20FC00, + SVEBroadcastIndexElementMask = 0xFF20FC00, + DUP_z_zi = SVEBroadcastIndexElementFixed +}; + +enum SVEBroadcastIntImm_UnpredicatedOp { + SVEBroadcastIntImm_UnpredicatedFixed = 0x2538C000, + SVEBroadcastIntImm_UnpredicatedFMask = 0xFF39C000, + SVEBroadcastIntImm_UnpredicatedMask = 0xFF3FC000, + DUP_z_i = SVEBroadcastIntImm_UnpredicatedFixed +}; + +enum SVECompressActiveElementsOp { + SVECompressActiveElementsFixed = 0x05A18000, + SVECompressActiveElementsFMask = 0xFFBFE000, + SVECompressActiveElementsMask = 0xFFBFE000, + COMPACT_z_p_z = SVECompressActiveElementsFixed +}; + +enum SVEConditionallyBroadcastElementToVectorOp { + SVEConditionallyBroadcastElementToVectorFixed = 0x05288000, + SVEConditionallyBroadcastElementToVectorFMask = 0xFF3EE000, + SVEConditionallyBroadcastElementToVectorMask = 0xFF3FE000, + CLASTA_z_p_zz = SVEConditionallyBroadcastElementToVectorFixed, + CLASTB_z_p_zz = SVEConditionallyBroadcastElementToVectorFixed | 0x00010000 +}; + +enum SVEConditionallyExtractElementToGeneralRegisterOp { + SVEConditionallyExtractElementToGeneralRegisterFixed = 0x0530A000, + SVEConditionallyExtractElementToGeneralRegisterFMask = 0xFF3EE000, + SVEConditionallyExtractElementToGeneralRegisterMask = 0xFF3FE000, + CLASTA_r_p_z = SVEConditionallyExtractElementToGeneralRegisterFixed, + CLASTB_r_p_z = SVEConditionallyExtractElementToGeneralRegisterFixed | 0x00010000 +}; + +enum SVEConditionallyExtractElementToSIMDFPScalarOp { + SVEConditionallyExtractElementToSIMDFPScalarFixed = 0x052A8000, + SVEConditionallyExtractElementToSIMDFPScalarFMask = 0xFF3EE000, + SVEConditionallyExtractElementToSIMDFPScalarMask = 0xFF3FE000, + CLASTA_v_p_z = SVEConditionallyExtractElementToSIMDFPScalarFixed, + CLASTB_v_p_z = SVEConditionallyExtractElementToSIMDFPScalarFixed | 0x00010000 +}; + +enum SVEConditionallyTerminateScalarsOp { + SVEConditionallyTerminateScalarsFixed = 0x25202000, + SVEConditionallyTerminateScalarsFMask = 0xFF20FC0F, + SVEConditionallyTerminateScalarsMask = 0xFFA0FC1F, + CTERMEQ_rr = SVEConditionallyTerminateScalarsFixed | 0x00800000, + CTERMNE_rr = SVEConditionallyTerminateScalarsFixed | 0x00800010 +}; + +enum SVEConstructivePrefix_UnpredicatedOp { + SVEConstructivePrefix_UnpredicatedFixed = 0x0420BC00, + SVEConstructivePrefix_UnpredicatedFMask = 0xFF20FC00, + SVEConstructivePrefix_UnpredicatedMask = 0xFFFFFC00, + MOVPRFX_z_z = SVEConstructivePrefix_UnpredicatedFixed +}; + +enum SVEContiguousFirstFaultLoad_ScalarPlusScalarOp { + SVEContiguousFirstFaultLoad_ScalarPlusScalarFixed = 0xA4006000, + SVEContiguousFirstFaultLoad_ScalarPlusScalarFMask = 0xFE00E000, + SVEContiguousFirstFaultLoad_ScalarPlusScalarMask = 0xFFE0E000, + LDFF1B_z_p_br_u8 = SVEContiguousFirstFaultLoad_ScalarPlusScalarFixed, + LDFF1B_z_p_br_u16 = SVEContiguousFirstFaultLoad_ScalarPlusScalarFixed | 0x00200000, + LDFF1B_z_p_br_u32 = SVEContiguousFirstFaultLoad_ScalarPlusScalarFixed | 0x00400000, + LDFF1B_z_p_br_u64 = SVEContiguousFirstFaultLoad_ScalarPlusScalarFixed | 0x00600000, + LDFF1SW_z_p_br_s64 = SVEContiguousFirstFaultLoad_ScalarPlusScalarFixed | 0x00800000, + LDFF1H_z_p_br_u16 = SVEContiguousFirstFaultLoad_ScalarPlusScalarFixed | 0x00A00000, + LDFF1H_z_p_br_u32 = SVEContiguousFirstFaultLoad_ScalarPlusScalarFixed | 0x00C00000, + LDFF1H_z_p_br_u64 = SVEContiguousFirstFaultLoad_ScalarPlusScalarFixed | 0x00E00000, + LDFF1SH_z_p_br_s64 = SVEContiguousFirstFaultLoad_ScalarPlusScalarFixed | 0x01000000, + LDFF1SH_z_p_br_s32 = SVEContiguousFirstFaultLoad_ScalarPlusScalarFixed | 0x01200000, + LDFF1W_z_p_br_u32 = SVEContiguousFirstFaultLoad_ScalarPlusScalarFixed | 0x01400000, + LDFF1W_z_p_br_u64 = SVEContiguousFirstFaultLoad_ScalarPlusScalarFixed | 0x01600000, + LDFF1SB_z_p_br_s64 = SVEContiguousFirstFaultLoad_ScalarPlusScalarFixed | 0x01800000, + LDFF1SB_z_p_br_s32 = SVEContiguousFirstFaultLoad_ScalarPlusScalarFixed | 0x01A00000, + LDFF1SB_z_p_br_s16 = SVEContiguousFirstFaultLoad_ScalarPlusScalarFixed | 0x01C00000, + LDFF1D_z_p_br_u64 = SVEContiguousFirstFaultLoad_ScalarPlusScalarFixed | 0x01E00000 +}; + +enum SVEContiguousLoad_ScalarPlusImmOp { + SVEContiguousLoad_ScalarPlusImmFixed = 0xA400A000, + SVEContiguousLoad_ScalarPlusImmFMask = 0xFE10E000, + SVEContiguousLoad_ScalarPlusImmMask = 0xFFF0E000, + LD1B_z_p_bi_u8 = SVEContiguousLoad_ScalarPlusImmFixed, + LD1B_z_p_bi_u16 = SVEContiguousLoad_ScalarPlusImmFixed | 0x00200000, + LD1B_z_p_bi_u32 = SVEContiguousLoad_ScalarPlusImmFixed | 0x00400000, + LD1B_z_p_bi_u64 = SVEContiguousLoad_ScalarPlusImmFixed | 0x00600000, + LD1SW_z_p_bi_s64 = SVEContiguousLoad_ScalarPlusImmFixed | 0x00800000, + LD1H_z_p_bi_u16 = SVEContiguousLoad_ScalarPlusImmFixed | 0x00A00000, + LD1H_z_p_bi_u32 = SVEContiguousLoad_ScalarPlusImmFixed | 0x00C00000, + LD1H_z_p_bi_u64 = SVEContiguousLoad_ScalarPlusImmFixed | 0x00E00000, + LD1SH_z_p_bi_s64 = SVEContiguousLoad_ScalarPlusImmFixed | 0x01000000, + LD1SH_z_p_bi_s32 = SVEContiguousLoad_ScalarPlusImmFixed | 0x01200000, + LD1W_z_p_bi_u32 = SVEContiguousLoad_ScalarPlusImmFixed | 0x01400000, + LD1W_z_p_bi_u64 = SVEContiguousLoad_ScalarPlusImmFixed | 0x01600000, + LD1SB_z_p_bi_s64 = SVEContiguousLoad_ScalarPlusImmFixed | 0x01800000, + LD1SB_z_p_bi_s32 = SVEContiguousLoad_ScalarPlusImmFixed | 0x01A00000, + LD1SB_z_p_bi_s16 = SVEContiguousLoad_ScalarPlusImmFixed | 0x01C00000, + LD1D_z_p_bi_u64 = SVEContiguousLoad_ScalarPlusImmFixed | 0x01E00000 +}; + +enum SVEContiguousLoad_ScalarPlusScalarOp { + SVEContiguousLoad_ScalarPlusScalarFixed = 0xA4004000, + SVEContiguousLoad_ScalarPlusScalarFMask = 0xFE00E000, + SVEContiguousLoad_ScalarPlusScalarMask = 0xFFE0E000, + LD1B_z_p_br_u8 = SVEContiguousLoad_ScalarPlusScalarFixed, + LD1B_z_p_br_u16 = SVEContiguousLoad_ScalarPlusScalarFixed | 0x00200000, + LD1B_z_p_br_u32 = SVEContiguousLoad_ScalarPlusScalarFixed | 0x00400000, + LD1B_z_p_br_u64 = SVEContiguousLoad_ScalarPlusScalarFixed | 0x00600000, + LD1SW_z_p_br_s64 = SVEContiguousLoad_ScalarPlusScalarFixed | 0x00800000, + LD1H_z_p_br_u16 = SVEContiguousLoad_ScalarPlusScalarFixed | 0x00A00000, + LD1H_z_p_br_u32 = SVEContiguousLoad_ScalarPlusScalarFixed | 0x00C00000, + LD1H_z_p_br_u64 = SVEContiguousLoad_ScalarPlusScalarFixed | 0x00E00000, + LD1SH_z_p_br_s64 = SVEContiguousLoad_ScalarPlusScalarFixed | 0x01000000, + LD1SH_z_p_br_s32 = SVEContiguousLoad_ScalarPlusScalarFixed | 0x01200000, + LD1W_z_p_br_u32 = SVEContiguousLoad_ScalarPlusScalarFixed | 0x01400000, + LD1W_z_p_br_u64 = SVEContiguousLoad_ScalarPlusScalarFixed | 0x01600000, + LD1SB_z_p_br_s64 = SVEContiguousLoad_ScalarPlusScalarFixed | 0x01800000, + LD1SB_z_p_br_s32 = SVEContiguousLoad_ScalarPlusScalarFixed | 0x01A00000, + LD1SB_z_p_br_s16 = SVEContiguousLoad_ScalarPlusScalarFixed | 0x01C00000, + LD1D_z_p_br_u64 = SVEContiguousLoad_ScalarPlusScalarFixed | 0x01E00000 +}; + +enum SVEContiguousNonFaultLoad_ScalarPlusImmOp { + SVEContiguousNonFaultLoad_ScalarPlusImmFixed = 0xA410A000, + SVEContiguousNonFaultLoad_ScalarPlusImmFMask = 0xFE10E000, + SVEContiguousNonFaultLoad_ScalarPlusImmMask = 0xFFF0E000, + LDNF1B_z_p_bi_u8 = SVEContiguousNonFaultLoad_ScalarPlusImmFixed, + LDNF1B_z_p_bi_u16 = SVEContiguousNonFaultLoad_ScalarPlusImmFixed | 0x00200000, + LDNF1B_z_p_bi_u32 = SVEContiguousNonFaultLoad_ScalarPlusImmFixed | 0x00400000, + LDNF1B_z_p_bi_u64 = SVEContiguousNonFaultLoad_ScalarPlusImmFixed | 0x00600000, + LDNF1SW_z_p_bi_s64 = SVEContiguousNonFaultLoad_ScalarPlusImmFixed | 0x00800000, + LDNF1H_z_p_bi_u16 = SVEContiguousNonFaultLoad_ScalarPlusImmFixed | 0x00A00000, + LDNF1H_z_p_bi_u32 = SVEContiguousNonFaultLoad_ScalarPlusImmFixed | 0x00C00000, + LDNF1H_z_p_bi_u64 = SVEContiguousNonFaultLoad_ScalarPlusImmFixed | 0x00E00000, + LDNF1SH_z_p_bi_s64 = SVEContiguousNonFaultLoad_ScalarPlusImmFixed | 0x01000000, + LDNF1SH_z_p_bi_s32 = SVEContiguousNonFaultLoad_ScalarPlusImmFixed | 0x01200000, + LDNF1W_z_p_bi_u32 = SVEContiguousNonFaultLoad_ScalarPlusImmFixed | 0x01400000, + LDNF1W_z_p_bi_u64 = SVEContiguousNonFaultLoad_ScalarPlusImmFixed | 0x01600000, + LDNF1SB_z_p_bi_s64 = SVEContiguousNonFaultLoad_ScalarPlusImmFixed | 0x01800000, + LDNF1SB_z_p_bi_s32 = SVEContiguousNonFaultLoad_ScalarPlusImmFixed | 0x01A00000, + LDNF1SB_z_p_bi_s16 = SVEContiguousNonFaultLoad_ScalarPlusImmFixed | 0x01C00000, + LDNF1D_z_p_bi_u64 = SVEContiguousNonFaultLoad_ScalarPlusImmFixed | 0x01E00000 +}; + +enum SVEContiguousNonTemporalLoad_ScalarPlusImmOp { + SVEContiguousNonTemporalLoad_ScalarPlusImmFixed = 0xA400E000, + SVEContiguousNonTemporalLoad_ScalarPlusImmFMask = 0xFE70E000, + SVEContiguousNonTemporalLoad_ScalarPlusImmMask = 0xFFF0E000, + LDNT1B_z_p_bi_contiguous = SVEContiguousNonTemporalLoad_ScalarPlusImmFixed, + LDNT1H_z_p_bi_contiguous = SVEContiguousNonTemporalLoad_ScalarPlusImmFixed | 0x00800000, + LDNT1W_z_p_bi_contiguous = SVEContiguousNonTemporalLoad_ScalarPlusImmFixed | 0x01000000, + LDNT1D_z_p_bi_contiguous = SVEContiguousNonTemporalLoad_ScalarPlusImmFixed | 0x01800000 +}; + +enum SVEContiguousNonTemporalLoad_ScalarPlusScalarOp { + SVEContiguousNonTemporalLoad_ScalarPlusScalarFixed = 0xA400C000, + SVEContiguousNonTemporalLoad_ScalarPlusScalarFMask = 0xFE60E000, + SVEContiguousNonTemporalLoad_ScalarPlusScalarMask = 0xFFE0E000, + LDNT1B_z_p_br_contiguous = SVEContiguousNonTemporalLoad_ScalarPlusScalarFixed, + LDNT1H_z_p_br_contiguous = SVEContiguousNonTemporalLoad_ScalarPlusScalarFixed | 0x00800000, + LDNT1W_z_p_br_contiguous = SVEContiguousNonTemporalLoad_ScalarPlusScalarFixed | 0x01000000, + LDNT1D_z_p_br_contiguous = SVEContiguousNonTemporalLoad_ScalarPlusScalarFixed | 0x01800000 +}; + +enum SVEContiguousNonTemporalStore_ScalarPlusImmOp { + SVEContiguousNonTemporalStore_ScalarPlusImmFixed = 0xE410E000, + SVEContiguousNonTemporalStore_ScalarPlusImmFMask = 0xFE70E000, + SVEContiguousNonTemporalStore_ScalarPlusImmMask = 0xFFF0E000, + STNT1B_z_p_bi_contiguous = SVEContiguousNonTemporalStore_ScalarPlusImmFixed, + STNT1H_z_p_bi_contiguous = SVEContiguousNonTemporalStore_ScalarPlusImmFixed | 0x00800000, + STNT1W_z_p_bi_contiguous = SVEContiguousNonTemporalStore_ScalarPlusImmFixed | 0x01000000, + STNT1D_z_p_bi_contiguous = SVEContiguousNonTemporalStore_ScalarPlusImmFixed | 0x01800000 +}; + +enum SVEContiguousNonTemporalStore_ScalarPlusScalarOp { + SVEContiguousNonTemporalStore_ScalarPlusScalarFixed = 0xE4006000, + SVEContiguousNonTemporalStore_ScalarPlusScalarFMask = 0xFE60E000, + SVEContiguousNonTemporalStore_ScalarPlusScalarMask = 0xFFE0E000, + STNT1B_z_p_br_contiguous = SVEContiguousNonTemporalStore_ScalarPlusScalarFixed, + STNT1H_z_p_br_contiguous = SVEContiguousNonTemporalStore_ScalarPlusScalarFixed | 0x00800000, + STNT1W_z_p_br_contiguous = SVEContiguousNonTemporalStore_ScalarPlusScalarFixed | 0x01000000, + STNT1D_z_p_br_contiguous = SVEContiguousNonTemporalStore_ScalarPlusScalarFixed | 0x01800000 +}; + +enum SVEContiguousPrefetch_ScalarPlusImmOp { + SVEContiguousPrefetch_ScalarPlusImmFixed = 0x85C00000, + SVEContiguousPrefetch_ScalarPlusImmFMask = 0xFFC08010, + SVEContiguousPrefetch_ScalarPlusImmMask = 0xFFC0E010, + PRFB_i_p_bi_s = SVEContiguousPrefetch_ScalarPlusImmFixed, + PRFH_i_p_bi_s = SVEContiguousPrefetch_ScalarPlusImmFixed | 0x00002000, + PRFW_i_p_bi_s = SVEContiguousPrefetch_ScalarPlusImmFixed | 0x00004000, + PRFD_i_p_bi_s = SVEContiguousPrefetch_ScalarPlusImmFixed | 0x00006000 +}; + +enum SVEContiguousPrefetch_ScalarPlusScalarOp { + SVEContiguousPrefetch_ScalarPlusScalarFixed = 0x8400C000, + SVEContiguousPrefetch_ScalarPlusScalarFMask = 0xFE60E010, + SVEContiguousPrefetch_ScalarPlusScalarMask = 0xFFE0E010, + PRFB_i_p_br_s = SVEContiguousPrefetch_ScalarPlusScalarFixed, + PRFH_i_p_br_s = SVEContiguousPrefetch_ScalarPlusScalarFixed | 0x00800000, + PRFW_i_p_br_s = SVEContiguousPrefetch_ScalarPlusScalarFixed | 0x01000000, + PRFD_i_p_br_s = SVEContiguousPrefetch_ScalarPlusScalarFixed | 0x01800000 +}; + +enum SVEContiguousStore_ScalarPlusImmOp { + SVEContiguousStore_ScalarPlusImmFixed = 0xE400E000, + SVEContiguousStore_ScalarPlusImmFMask = 0xFE10E000, + SVEContiguousStore_ScalarPlusImmMask = 0xFF90E000, + ST1B_z_p_bi = SVEContiguousStore_ScalarPlusImmFixed, + ST1H_z_p_bi = SVEContiguousStore_ScalarPlusImmFixed | 0x00800000, + ST1W_z_p_bi = SVEContiguousStore_ScalarPlusImmFixed | 0x01000000, + ST1D_z_p_bi = SVEContiguousStore_ScalarPlusImmFixed | 0x01800000 +}; + +enum SVEContiguousStore_ScalarPlusScalarOp { + SVEContiguousStore_ScalarPlusScalarFixed = 0xE4004000, + SVEContiguousStore_ScalarPlusScalarFMask = 0xFE00E000, + SVEContiguousStore_ScalarPlusScalarMask = 0xFF80E000, + ST1B_z_p_br = SVEContiguousStore_ScalarPlusScalarFixed, + ST1H_z_p_br = SVEContiguousStore_ScalarPlusScalarFixed | 0x00800000, + ST1W_z_p_br = SVEContiguousStore_ScalarPlusScalarFixed | 0x01000000, + ST1D_z_p_br = SVEContiguousStore_ScalarPlusScalarFixed | 0x01800000 +}; + +enum SVECopyFPImm_PredicatedOp { + SVECopyFPImm_PredicatedFixed = 0x0510C000, + SVECopyFPImm_PredicatedFMask = 0xFF30E000, + SVECopyFPImm_PredicatedMask = 0xFF30E000, + FCPY_z_p_i = SVECopyFPImm_PredicatedFixed +}; + +enum SVECopyGeneralRegisterToVector_PredicatedOp { + SVECopyGeneralRegisterToVector_PredicatedFixed = 0x0528A000, + SVECopyGeneralRegisterToVector_PredicatedFMask = 0xFF3FE000, + SVECopyGeneralRegisterToVector_PredicatedMask = 0xFF3FE000, + CPY_z_p_r = SVECopyGeneralRegisterToVector_PredicatedFixed +}; + +enum SVECopyIntImm_PredicatedOp { + SVECopyIntImm_PredicatedFixed = 0x05100000, + SVECopyIntImm_PredicatedFMask = 0xFF308000, + SVECopyIntImm_PredicatedMask = 0xFF308000, + CPY_z_p_i = SVECopyIntImm_PredicatedFixed +}; + +enum SVECopySIMDFPScalarRegisterToVector_PredicatedOp { + SVECopySIMDFPScalarRegisterToVector_PredicatedFixed = 0x05208000, + SVECopySIMDFPScalarRegisterToVector_PredicatedFMask = 0xFF3FE000, + SVECopySIMDFPScalarRegisterToVector_PredicatedMask = 0xFF3FE000, + CPY_z_p_v = SVECopySIMDFPScalarRegisterToVector_PredicatedFixed +}; + +enum SVEElementCountOp { + SVEElementCountFixed = 0x0420E000, + SVEElementCountFMask = 0xFF30F800, + SVEElementCountMask = 0xFFF0FC00, + CNTB_r_s = SVEElementCountFixed, + CNTH_r_s = SVEElementCountFixed | 0x00400000, + CNTW_r_s = SVEElementCountFixed | 0x00800000, + CNTD_r_s = SVEElementCountFixed | 0x00C00000 +}; + +enum SVEExtractElementToGeneralRegisterOp { + SVEExtractElementToGeneralRegisterFixed = 0x0520A000, + SVEExtractElementToGeneralRegisterFMask = 0xFF3EE000, + SVEExtractElementToGeneralRegisterMask = 0xFF3FE000, + LASTA_r_p_z = SVEExtractElementToGeneralRegisterFixed, + LASTB_r_p_z = SVEExtractElementToGeneralRegisterFixed | 0x00010000 +}; + +enum SVEExtractElementToSIMDFPScalarRegisterOp { + SVEExtractElementToSIMDFPScalarRegisterFixed = 0x05228000, + SVEExtractElementToSIMDFPScalarRegisterFMask = 0xFF3EE000, + SVEExtractElementToSIMDFPScalarRegisterMask = 0xFF3FE000, + LASTA_v_p_z = SVEExtractElementToSIMDFPScalarRegisterFixed, + LASTB_v_p_z = SVEExtractElementToSIMDFPScalarRegisterFixed | 0x00010000 +}; + +enum SVEFFRInitialiseOp { + SVEFFRInitialiseFixed = 0x252C9000, + SVEFFRInitialiseFMask = 0xFF3FFFFF, + SVEFFRInitialiseMask = 0xFFFFFFFF, + SETFFR_f = SVEFFRInitialiseFixed +}; + +enum SVEFFRWriteFromPredicateOp { + SVEFFRWriteFromPredicateFixed = 0x25289000, + SVEFFRWriteFromPredicateFMask = 0xFF3FFE1F, + SVEFFRWriteFromPredicateMask = 0xFFFFFE1F, + WRFFR_f_p = SVEFFRWriteFromPredicateFixed +}; + +enum SVEFPAccumulatingReductionOp { + SVEFPAccumulatingReductionFixed = 0x65182000, + SVEFPAccumulatingReductionFMask = 0xFF38E000, + SVEFPAccumulatingReductionMask = 0xFF3FE000, + FADDA_v_p_z = SVEFPAccumulatingReductionFixed +}; + +enum SVEFPArithmeticUnpredicatedOp { + SVEFPArithmeticUnpredicatedFixed = 0x65000000, + SVEFPArithmeticUnpredicatedFMask = 0xFF20E000, + SVEFPArithmeticUnpredicatedMask = 0xFF20FC00, + FADD_z_zz = SVEFPArithmeticUnpredicatedFixed, + FSUB_z_zz = SVEFPArithmeticUnpredicatedFixed | 0x00000400, + FMUL_z_zz = SVEFPArithmeticUnpredicatedFixed | 0x00000800, + FTSMUL_z_zz = SVEFPArithmeticUnpredicatedFixed | 0x00000C00, + FRECPS_z_zz = SVEFPArithmeticUnpredicatedFixed | 0x00001800, + FRSQRTS_z_zz = SVEFPArithmeticUnpredicatedFixed | 0x00001C00 +}; + +enum SVEFPArithmeticWithImm_PredicatedOp { + SVEFPArithmeticWithImm_PredicatedFixed = 0x65188000, + SVEFPArithmeticWithImm_PredicatedFMask = 0xFF38E3C0, + SVEFPArithmeticWithImm_PredicatedMask = 0xFF3FE3C0, + FADD_z_p_zs = SVEFPArithmeticWithImm_PredicatedFixed, + FSUB_z_p_zs = SVEFPArithmeticWithImm_PredicatedFixed | 0x00010000, + FMUL_z_p_zs = SVEFPArithmeticWithImm_PredicatedFixed | 0x00020000, + FSUBR_z_p_zs = SVEFPArithmeticWithImm_PredicatedFixed | 0x00030000, + FMAXNM_z_p_zs = SVEFPArithmeticWithImm_PredicatedFixed | 0x00040000, + FMINNM_z_p_zs = SVEFPArithmeticWithImm_PredicatedFixed | 0x00050000, + FMAX_z_p_zs = SVEFPArithmeticWithImm_PredicatedFixed | 0x00060000, + FMIN_z_p_zs = SVEFPArithmeticWithImm_PredicatedFixed | 0x00070000 +}; + +enum SVEFPArithmetic_PredicatedOp { + SVEFPArithmetic_PredicatedFixed = 0x65008000, + SVEFPArithmetic_PredicatedFMask = 0xFF30E000, + SVEFPArithmetic_PredicatedMask = 0xFF3FE000, + FADD_z_p_zz = SVEFPArithmetic_PredicatedFixed, + FSUB_z_p_zz = SVEFPArithmetic_PredicatedFixed | 0x00010000, + FMUL_z_p_zz = SVEFPArithmetic_PredicatedFixed | 0x00020000, + FSUBR_z_p_zz = SVEFPArithmetic_PredicatedFixed | 0x00030000, + FMAXNM_z_p_zz = SVEFPArithmetic_PredicatedFixed | 0x00040000, + FMINNM_z_p_zz = SVEFPArithmetic_PredicatedFixed | 0x00050000, + FMAX_z_p_zz = SVEFPArithmetic_PredicatedFixed | 0x00060000, + FMIN_z_p_zz = SVEFPArithmetic_PredicatedFixed | 0x00070000, + FABD_z_p_zz = SVEFPArithmetic_PredicatedFixed | 0x00080000, + FSCALE_z_p_zz = SVEFPArithmetic_PredicatedFixed | 0x00090000, + FMULX_z_p_zz = SVEFPArithmetic_PredicatedFixed | 0x000A0000, + FDIVR_z_p_zz = SVEFPArithmetic_PredicatedFixed | 0x000C0000, + FDIV_z_p_zz = SVEFPArithmetic_PredicatedFixed | 0x000D0000 +}; + +enum SVEFPCompareVectorsOp { + SVEFPCompareVectorsFixed = 0x65004000, + SVEFPCompareVectorsFMask = 0xFF204000, + SVEFPCompareVectorsMask = 0xFF20E010, + FCMGE_p_p_zz = SVEFPCompareVectorsFixed, + FCMGT_p_p_zz = SVEFPCompareVectorsFixed | 0x00000010, + FCMEQ_p_p_zz = SVEFPCompareVectorsFixed | 0x00002000, + FCMNE_p_p_zz = SVEFPCompareVectorsFixed | 0x00002010, + FCMUO_p_p_zz = SVEFPCompareVectorsFixed | 0x00008000, + FACGE_p_p_zz = SVEFPCompareVectorsFixed | 0x00008010, + FACGT_p_p_zz = SVEFPCompareVectorsFixed | 0x0000A010 +}; + +enum SVEFPCompareWithZeroOp { + SVEFPCompareWithZeroFixed = 0x65102000, + SVEFPCompareWithZeroFMask = 0xFF38E000, + SVEFPCompareWithZeroMask = 0xFF3FE010, + FCMGE_p_p_z0 = SVEFPCompareWithZeroFixed, + FCMGT_p_p_z0 = SVEFPCompareWithZeroFixed | 0x00000010, + FCMLT_p_p_z0 = SVEFPCompareWithZeroFixed | 0x00010000, + FCMLE_p_p_z0 = SVEFPCompareWithZeroFixed | 0x00010010, + FCMEQ_p_p_z0 = SVEFPCompareWithZeroFixed | 0x00020000, + FCMNE_p_p_z0 = SVEFPCompareWithZeroFixed | 0x00030000 +}; + +enum SVEFPComplexAdditionOp { + SVEFPComplexAdditionFixed = 0x64008000, + SVEFPComplexAdditionFMask = 0xFF3EE000, + SVEFPComplexAdditionMask = 0xFF3EE000, + FCADD_z_p_zz = SVEFPComplexAdditionFixed +}; + +enum SVEFPComplexMulAddOp { + SVEFPComplexMulAddFixed = 0x64000000, + SVEFPComplexMulAddFMask = 0xFF208000, + SVEFPComplexMulAddMask = 0xFF208000, + FCMLA_z_p_zzz = SVEFPComplexMulAddFixed +}; + +enum SVEFPComplexMulAddIndexOp { + SVEFPComplexMulAddIndexFixed = 0x64201000, + SVEFPComplexMulAddIndexFMask = 0xFF20F000, + SVEFPComplexMulAddIndexMask = 0xFFE0F000, + FCMLA_z_zzzi_h = SVEFPComplexMulAddIndexFixed | 0x00800000, + FCMLA_z_zzzi_s = SVEFPComplexMulAddIndexFixed | 0x00C00000 +}; + +enum SVEFPConvertPrecisionOp { + SVEFPConvertPrecisionFixed = 0x6508A000, + SVEFPConvertPrecisionFMask = 0xFF3CE000, + SVEFPConvertPrecisionMask = 0xFFFFE000, + FCVT_z_p_z_s2h = SVEFPConvertPrecisionFixed | 0x00800000, + FCVT_z_p_z_h2s = SVEFPConvertPrecisionFixed | 0x00810000, + FCVT_z_p_z_d2h = SVEFPConvertPrecisionFixed | 0x00C00000, + FCVT_z_p_z_h2d = SVEFPConvertPrecisionFixed | 0x00C10000, + FCVT_z_p_z_d2s = SVEFPConvertPrecisionFixed | 0x00C20000, + FCVT_z_p_z_s2d = SVEFPConvertPrecisionFixed | 0x00C30000 +}; + +enum SVEFPConvertToIntOp { + SVEFPConvertToIntFixed = 0x6518A000, + SVEFPConvertToIntFMask = 0xFF38E000, + SVEFPConvertToIntMask = 0xFFFFE000, + FCVTZS_z_p_z_fp162h = SVEFPConvertToIntFixed | 0x00420000, + FCVTZU_z_p_z_fp162h = SVEFPConvertToIntFixed | 0x00430000, + FCVTZS_z_p_z_fp162w = SVEFPConvertToIntFixed | 0x00440000, + FCVTZU_z_p_z_fp162w = SVEFPConvertToIntFixed | 0x00450000, + FCVTZS_z_p_z_fp162x = SVEFPConvertToIntFixed | 0x00460000, + FCVTZU_z_p_z_fp162x = SVEFPConvertToIntFixed | 0x00470000, + FCVTZS_z_p_z_s2w = SVEFPConvertToIntFixed | 0x00840000, + FCVTZU_z_p_z_s2w = SVEFPConvertToIntFixed | 0x00850000, + FCVTZS_z_p_z_d2w = SVEFPConvertToIntFixed | 0x00C00000, + FCVTZU_z_p_z_d2w = SVEFPConvertToIntFixed | 0x00C10000, + FCVTZS_z_p_z_s2x = SVEFPConvertToIntFixed | 0x00C40000, + FCVTZU_z_p_z_s2x = SVEFPConvertToIntFixed | 0x00C50000, + FCVTZS_z_p_z_d2x = SVEFPConvertToIntFixed | 0x00C60000, + FCVTZU_z_p_z_d2x = SVEFPConvertToIntFixed | 0x00C70000 +}; + +enum SVEFPExponentialAcceleratorOp { + SVEFPExponentialAcceleratorFixed = 0x0420B800, + SVEFPExponentialAcceleratorFMask = 0xFF20FC00, + SVEFPExponentialAcceleratorMask = 0xFF3FFC00, + FEXPA_z_z = SVEFPExponentialAcceleratorFixed +}; + +enum SVEFPFastReductionOp { + SVEFPFastReductionFixed = 0x65002000, + SVEFPFastReductionFMask = 0xFF38E000, + SVEFPFastReductionMask = 0xFF3FE000, + FADDV_v_p_z = SVEFPFastReductionFixed, + FMAXNMV_v_p_z = SVEFPFastReductionFixed | 0x00040000, + FMINNMV_v_p_z = SVEFPFastReductionFixed | 0x00050000, + FMAXV_v_p_z = SVEFPFastReductionFixed | 0x00060000, + FMINV_v_p_z = SVEFPFastReductionFixed | 0x00070000 +}; + +enum SVEFPMulAddOp { + SVEFPMulAddFixed = 0x65200000, + SVEFPMulAddFMask = 0xFF200000, + SVEFPMulAddMask = 0xFF20E000, + FMLA_z_p_zzz = SVEFPMulAddFixed, + FMLS_z_p_zzz = SVEFPMulAddFixed | 0x00002000, + FNMLA_z_p_zzz = SVEFPMulAddFixed | 0x00004000, + FNMLS_z_p_zzz = SVEFPMulAddFixed | 0x00006000, + FMAD_z_p_zzz = SVEFPMulAddFixed | 0x00008000, + FMSB_z_p_zzz = SVEFPMulAddFixed | 0x0000A000, + FNMAD_z_p_zzz = SVEFPMulAddFixed | 0x0000C000, + FNMSB_z_p_zzz = SVEFPMulAddFixed | 0x0000E000 +}; + +enum SVEFPMulAddIndexOp { + SVEFPMulAddIndexFixed = 0x64200000, + SVEFPMulAddIndexFMask = 0xFF20F800, + SVEFPMulAddIndexMask = 0xFFE0FC00, + FMLA_z_zzzi_h = SVEFPMulAddIndexFixed, + FMLA_z_zzzi_h_i3h = FMLA_z_zzzi_h | 0x00400000, + FMLS_z_zzzi_h = SVEFPMulAddIndexFixed | 0x00000400, + FMLS_z_zzzi_h_i3h = FMLS_z_zzzi_h | 0x00400000, + FMLA_z_zzzi_s = SVEFPMulAddIndexFixed | 0x00800000, + FMLS_z_zzzi_s = SVEFPMulAddIndexFixed | 0x00800400, + FMLA_z_zzzi_d = SVEFPMulAddIndexFixed | 0x00C00000, + FMLS_z_zzzi_d = SVEFPMulAddIndexFixed | 0x00C00400 +}; + +enum SVEFPMulIndexOp { + SVEFPMulIndexFixed = 0x64202000, + SVEFPMulIndexFMask = 0xFF20FC00, + SVEFPMulIndexMask = 0xFFE0FC00, + FMUL_z_zzi_h = SVEFPMulIndexFixed, + FMUL_z_zzi_h_i3h = FMUL_z_zzi_h | 0x00400000, + FMUL_z_zzi_s = SVEFPMulIndexFixed | 0x00800000, + FMUL_z_zzi_d = SVEFPMulIndexFixed | 0x00C00000 +}; + +enum SVEFPRoundToIntegralValueOp { + SVEFPRoundToIntegralValueFixed = 0x6500A000, + SVEFPRoundToIntegralValueFMask = 0xFF38E000, + SVEFPRoundToIntegralValueMask = 0xFF3FE000, + FRINTN_z_p_z = SVEFPRoundToIntegralValueFixed, + FRINTP_z_p_z = SVEFPRoundToIntegralValueFixed | 0x00010000, + FRINTM_z_p_z = SVEFPRoundToIntegralValueFixed | 0x00020000, + FRINTZ_z_p_z = SVEFPRoundToIntegralValueFixed | 0x00030000, + FRINTA_z_p_z = SVEFPRoundToIntegralValueFixed | 0x00040000, + FRINTX_z_p_z = SVEFPRoundToIntegralValueFixed | 0x00060000, + FRINTI_z_p_z = SVEFPRoundToIntegralValueFixed | 0x00070000 +}; + +enum SVEFPTrigMulAddCoefficientOp { + SVEFPTrigMulAddCoefficientFixed = 0x65108000, + SVEFPTrigMulAddCoefficientFMask = 0xFF38FC00, + SVEFPTrigMulAddCoefficientMask = 0xFF38FC00, + FTMAD_z_zzi = SVEFPTrigMulAddCoefficientFixed +}; + +enum SVEFPTrigSelectCoefficientOp { + SVEFPTrigSelectCoefficientFixed = 0x0420B000, + SVEFPTrigSelectCoefficientFMask = 0xFF20F800, + SVEFPTrigSelectCoefficientMask = 0xFF20FC00, + FTSSEL_z_zz = SVEFPTrigSelectCoefficientFixed +}; + +enum SVEFPUnaryOpOp { + SVEFPUnaryOpFixed = 0x650CA000, + SVEFPUnaryOpFMask = 0xFF3CE000, + SVEFPUnaryOpMask = 0xFF3FE000, + FRECPX_z_p_z = SVEFPUnaryOpFixed, + FSQRT_z_p_z = SVEFPUnaryOpFixed | 0x00010000 +}; + +enum SVEFPUnaryOpUnpredicatedOp { + SVEFPUnaryOpUnpredicatedFixed = 0x65083000, + SVEFPUnaryOpUnpredicatedFMask = 0xFF38F000, + SVEFPUnaryOpUnpredicatedMask = 0xFF3FFC00, + FRECPE_z_z = SVEFPUnaryOpUnpredicatedFixed | 0x00060000, + FRSQRTE_z_z = SVEFPUnaryOpUnpredicatedFixed | 0x00070000 +}; + +enum SVEIncDecByPredicateCountOp { + SVEIncDecByPredicateCountFixed = 0x25288000, + SVEIncDecByPredicateCountFMask = 0xFF38F000, + SVEIncDecByPredicateCountMask = 0xFF3FFE00, + SQINCP_z_p_z = SVEIncDecByPredicateCountFixed, + SQINCP_r_p_r_sx = SVEIncDecByPredicateCountFixed | 0x00000800, + SQINCP_r_p_r_x = SVEIncDecByPredicateCountFixed | 0x00000C00, + UQINCP_z_p_z = SVEIncDecByPredicateCountFixed | 0x00010000, + UQINCP_r_p_r_uw = SVEIncDecByPredicateCountFixed | 0x00010800, + UQINCP_r_p_r_x = SVEIncDecByPredicateCountFixed | 0x00010C00, + SQDECP_z_p_z = SVEIncDecByPredicateCountFixed | 0x00020000, + SQDECP_r_p_r_sx = SVEIncDecByPredicateCountFixed | 0x00020800, + SQDECP_r_p_r_x = SVEIncDecByPredicateCountFixed | 0x00020C00, + UQDECP_z_p_z = SVEIncDecByPredicateCountFixed | 0x00030000, + UQDECP_r_p_r_uw = SVEIncDecByPredicateCountFixed | 0x00030800, + UQDECP_r_p_r_x = SVEIncDecByPredicateCountFixed | 0x00030C00, + INCP_z_p_z = SVEIncDecByPredicateCountFixed | 0x00040000, + INCP_r_p_r = SVEIncDecByPredicateCountFixed | 0x00040800, + DECP_z_p_z = SVEIncDecByPredicateCountFixed | 0x00050000, + DECP_r_p_r = SVEIncDecByPredicateCountFixed | 0x00050800 +}; + +enum SVEIncDecRegisterByElementCountOp { + SVEIncDecRegisterByElementCountFixed = 0x0430E000, + SVEIncDecRegisterByElementCountFMask = 0xFF30F800, + SVEIncDecRegisterByElementCountMask = 0xFFF0FC00, + INCB_r_rs = SVEIncDecRegisterByElementCountFixed, + DECB_r_rs = SVEIncDecRegisterByElementCountFixed | 0x00000400, + INCH_r_rs = SVEIncDecRegisterByElementCountFixed | 0x00400000, + DECH_r_rs = SVEIncDecRegisterByElementCountFixed | 0x00400400, + INCW_r_rs = SVEIncDecRegisterByElementCountFixed | 0x00800000, + DECW_r_rs = SVEIncDecRegisterByElementCountFixed | 0x00800400, + INCD_r_rs = SVEIncDecRegisterByElementCountFixed | 0x00C00000, + DECD_r_rs = SVEIncDecRegisterByElementCountFixed | 0x00C00400 +}; + +enum SVEIncDecVectorByElementCountOp { + SVEIncDecVectorByElementCountFixed = 0x0430C000, + SVEIncDecVectorByElementCountFMask = 0xFF30F800, + SVEIncDecVectorByElementCountMask = 0xFFF0FC00, + INCH_z_zs = SVEIncDecVectorByElementCountFixed | 0x00400000, + DECH_z_zs = SVEIncDecVectorByElementCountFixed | 0x00400400, + INCW_z_zs = SVEIncDecVectorByElementCountFixed | 0x00800000, + DECW_z_zs = SVEIncDecVectorByElementCountFixed | 0x00800400, + INCD_z_zs = SVEIncDecVectorByElementCountFixed | 0x00C00000, + DECD_z_zs = SVEIncDecVectorByElementCountFixed | 0x00C00400 +}; + +enum SVEIndexGenerationOp { + SVEIndexGenerationFixed = 0x04204000, + SVEIndexGenerationFMask = 0xFF20F000, + SVEIndexGenerationMask = 0xFF20FC00, + INDEX_z_ii = SVEIndexGenerationFixed, + INDEX_z_ri = SVEIndexGenerationFixed | 0x00000400, + INDEX_z_ir = SVEIndexGenerationFixed | 0x00000800, + INDEX_z_rr = SVEIndexGenerationFixed | 0x00000C00 +}; + +enum SVEInsertGeneralRegisterOp { + SVEInsertGeneralRegisterFixed = 0x05243800, + SVEInsertGeneralRegisterFMask = 0xFF3FFC00, + SVEInsertGeneralRegisterMask = 0xFF3FFC00, + INSR_z_r = SVEInsertGeneralRegisterFixed +}; + +enum SVEInsertSIMDFPScalarRegisterOp { + SVEInsertSIMDFPScalarRegisterFixed = 0x05343800, + SVEInsertSIMDFPScalarRegisterFMask = 0xFF3FFC00, + SVEInsertSIMDFPScalarRegisterMask = 0xFF3FFC00, + INSR_z_v = SVEInsertSIMDFPScalarRegisterFixed +}; + +enum SVEIntAddSubtractImm_UnpredicatedOp { + SVEIntAddSubtractImm_UnpredicatedFixed = 0x2520C000, + SVEIntAddSubtractImm_UnpredicatedFMask = 0xFF38C000, + SVEIntAddSubtractImm_UnpredicatedMask = 0xFF3FC000, + ADD_z_zi = SVEIntAddSubtractImm_UnpredicatedFixed, + SUB_z_zi = SVEIntAddSubtractImm_UnpredicatedFixed | 0x00010000, + SUBR_z_zi = SVEIntAddSubtractImm_UnpredicatedFixed | 0x00030000, + SQADD_z_zi = SVEIntAddSubtractImm_UnpredicatedFixed | 0x00040000, + UQADD_z_zi = SVEIntAddSubtractImm_UnpredicatedFixed | 0x00050000, + SQSUB_z_zi = SVEIntAddSubtractImm_UnpredicatedFixed | 0x00060000, + UQSUB_z_zi = SVEIntAddSubtractImm_UnpredicatedFixed | 0x00070000 +}; + +enum SVEIntAddSubtractVectors_PredicatedOp { + SVEIntAddSubtractVectors_PredicatedFixed = 0x04000000, + SVEIntAddSubtractVectors_PredicatedFMask = 0xFF38E000, + SVEIntAddSubtractVectors_PredicatedMask = 0xFF3FE000, + ADD_z_p_zz = SVEIntAddSubtractVectors_PredicatedFixed, + SUB_z_p_zz = SVEIntAddSubtractVectors_PredicatedFixed | 0x00010000, + SUBR_z_p_zz = SVEIntAddSubtractVectors_PredicatedFixed | 0x00030000 +}; + +enum SVEIntArithmeticUnpredicatedOp { + SVEIntArithmeticUnpredicatedFixed = 0x04200000, + SVEIntArithmeticUnpredicatedFMask = 0xFF20E000, + SVEIntArithmeticUnpredicatedMask = 0xFF20FC00, + ADD_z_zz = SVEIntArithmeticUnpredicatedFixed, + SUB_z_zz = SVEIntArithmeticUnpredicatedFixed | 0x00000400, + SQADD_z_zz = SVEIntArithmeticUnpredicatedFixed | 0x00001000, + UQADD_z_zz = SVEIntArithmeticUnpredicatedFixed | 0x00001400, + SQSUB_z_zz = SVEIntArithmeticUnpredicatedFixed | 0x00001800, + UQSUB_z_zz = SVEIntArithmeticUnpredicatedFixed | 0x00001C00 +}; + +enum SVEIntCompareScalarCountAndLimitOp { + SVEIntCompareScalarCountAndLimitFixed = 0x25200000, + SVEIntCompareScalarCountAndLimitFMask = 0xFF20E000, + SVEIntCompareScalarCountAndLimitMask = 0xFF20EC10, + WHILELT_p_p_rr = SVEIntCompareScalarCountAndLimitFixed | 0x00000400, + WHILELE_p_p_rr = SVEIntCompareScalarCountAndLimitFixed | 0x00000410, + WHILELO_p_p_rr = SVEIntCompareScalarCountAndLimitFixed | 0x00000C00, + WHILELS_p_p_rr = SVEIntCompareScalarCountAndLimitFixed | 0x00000C10 +}; + +enum SVEIntCompareSignedImmOp { + SVEIntCompareSignedImmFixed = 0x25000000, + SVEIntCompareSignedImmFMask = 0xFF204000, + SVEIntCompareSignedImmMask = 0xFF20E010, + CMPGE_p_p_zi = SVEIntCompareSignedImmFixed, + CMPGT_p_p_zi = SVEIntCompareSignedImmFixed | 0x00000010, + CMPLT_p_p_zi = SVEIntCompareSignedImmFixed | 0x00002000, + CMPLE_p_p_zi = SVEIntCompareSignedImmFixed | 0x00002010, + CMPEQ_p_p_zi = SVEIntCompareSignedImmFixed | 0x00008000, + CMPNE_p_p_zi = SVEIntCompareSignedImmFixed | 0x00008010 +}; + +enum SVEIntCompareUnsignedImmOp { + SVEIntCompareUnsignedImmFixed = 0x24200000, + SVEIntCompareUnsignedImmFMask = 0xFF200000, + SVEIntCompareUnsignedImmMask = 0xFF202010, + CMPHS_p_p_zi = SVEIntCompareUnsignedImmFixed, + CMPHI_p_p_zi = SVEIntCompareUnsignedImmFixed | 0x00000010, + CMPLO_p_p_zi = SVEIntCompareUnsignedImmFixed | 0x00002000, + CMPLS_p_p_zi = SVEIntCompareUnsignedImmFixed | 0x00002010 +}; + +enum SVEIntCompareVectorsOp { + SVEIntCompareVectorsFixed = 0x24000000, + SVEIntCompareVectorsFMask = 0xFF200000, + SVEIntCompareVectorsMask = 0xFF20E010, + CMPHS_p_p_zz = SVEIntCompareVectorsFixed, + CMPHI_p_p_zz = SVEIntCompareVectorsFixed | 0x00000010, + CMPEQ_p_p_zw = SVEIntCompareVectorsFixed | 0x00002000, + CMPNE_p_p_zw = SVEIntCompareVectorsFixed | 0x00002010, + CMPGE_p_p_zw = SVEIntCompareVectorsFixed | 0x00004000, + CMPGT_p_p_zw = SVEIntCompareVectorsFixed | 0x00004010, + CMPLT_p_p_zw = SVEIntCompareVectorsFixed | 0x00006000, + CMPLE_p_p_zw = SVEIntCompareVectorsFixed | 0x00006010, + CMPGE_p_p_zz = SVEIntCompareVectorsFixed | 0x00008000, + CMPGT_p_p_zz = SVEIntCompareVectorsFixed | 0x00008010, + CMPEQ_p_p_zz = SVEIntCompareVectorsFixed | 0x0000A000, + CMPNE_p_p_zz = SVEIntCompareVectorsFixed | 0x0000A010, + CMPHS_p_p_zw = SVEIntCompareVectorsFixed | 0x0000C000, + CMPHI_p_p_zw = SVEIntCompareVectorsFixed | 0x0000C010, + CMPLO_p_p_zw = SVEIntCompareVectorsFixed | 0x0000E000, + CMPLS_p_p_zw = SVEIntCompareVectorsFixed | 0x0000E010 +}; + +enum SVEIntConvertToFPOp { + SVEIntConvertToFPFixed = 0x6510A000, + SVEIntConvertToFPFMask = 0xFF38E000, + SVEIntConvertToFPMask = 0xFFFFE000, + SCVTF_z_p_z_h2fp16 = SVEIntConvertToFPFixed | 0x00420000, + UCVTF_z_p_z_h2fp16 = SVEIntConvertToFPFixed | 0x00430000, + SCVTF_z_p_z_w2fp16 = SVEIntConvertToFPFixed | 0x00440000, + UCVTF_z_p_z_w2fp16 = SVEIntConvertToFPFixed | 0x00450000, + SCVTF_z_p_z_x2fp16 = SVEIntConvertToFPFixed | 0x00460000, + UCVTF_z_p_z_x2fp16 = SVEIntConvertToFPFixed | 0x00470000, + SCVTF_z_p_z_w2s = SVEIntConvertToFPFixed | 0x00840000, + UCVTF_z_p_z_w2s = SVEIntConvertToFPFixed | 0x00850000, + SCVTF_z_p_z_w2d = SVEIntConvertToFPFixed | 0x00C00000, + UCVTF_z_p_z_w2d = SVEIntConvertToFPFixed | 0x00C10000, + SCVTF_z_p_z_x2s = SVEIntConvertToFPFixed | 0x00C40000, + UCVTF_z_p_z_x2s = SVEIntConvertToFPFixed | 0x00C50000, + SCVTF_z_p_z_x2d = SVEIntConvertToFPFixed | 0x00C60000, + UCVTF_z_p_z_x2d = SVEIntConvertToFPFixed | 0x00C70000 +}; + +enum SVEIntDivideVectors_PredicatedOp { + SVEIntDivideVectors_PredicatedFixed = 0x04140000, + SVEIntDivideVectors_PredicatedFMask = 0xFF3CE000, + SVEIntDivideVectors_PredicatedMask = 0xFF3FE000, + SDIV_z_p_zz = SVEIntDivideVectors_PredicatedFixed, + UDIV_z_p_zz = SVEIntDivideVectors_PredicatedFixed | 0x00010000, + SDIVR_z_p_zz = SVEIntDivideVectors_PredicatedFixed | 0x00020000, + UDIVR_z_p_zz = SVEIntDivideVectors_PredicatedFixed | 0x00030000 +}; + +enum SVEIntMinMaxDifference_PredicatedOp { + SVEIntMinMaxDifference_PredicatedFixed = 0x04080000, + SVEIntMinMaxDifference_PredicatedFMask = 0xFF38E000, + SVEIntMinMaxDifference_PredicatedMask = 0xFF3FE000, + SMAX_z_p_zz = SVEIntMinMaxDifference_PredicatedFixed, + UMAX_z_p_zz = SVEIntMinMaxDifference_PredicatedFixed | 0x00010000, + SMIN_z_p_zz = SVEIntMinMaxDifference_PredicatedFixed | 0x00020000, + UMIN_z_p_zz = SVEIntMinMaxDifference_PredicatedFixed | 0x00030000, + SABD_z_p_zz = SVEIntMinMaxDifference_PredicatedFixed | 0x00040000, + UABD_z_p_zz = SVEIntMinMaxDifference_PredicatedFixed | 0x00050000 +}; + +enum SVEIntMinMaxImm_UnpredicatedOp { + SVEIntMinMaxImm_UnpredicatedFixed = 0x2528C000, + SVEIntMinMaxImm_UnpredicatedFMask = 0xFF38C000, + SVEIntMinMaxImm_UnpredicatedMask = 0xFF3FE000, + SMAX_z_zi = SVEIntMinMaxImm_UnpredicatedFixed, + UMAX_z_zi = SVEIntMinMaxImm_UnpredicatedFixed | 0x00010000, + SMIN_z_zi = SVEIntMinMaxImm_UnpredicatedFixed | 0x00020000, + UMIN_z_zi = SVEIntMinMaxImm_UnpredicatedFixed | 0x00030000 +}; + +enum SVEIntMulAddPredicatedOp { + SVEIntMulAddPredicatedFixed = 0x04004000, + SVEIntMulAddPredicatedFMask = 0xFF204000, + SVEIntMulAddPredicatedMask = 0xFF20E000, + MLA_z_p_zzz = SVEIntMulAddPredicatedFixed, + MLS_z_p_zzz = SVEIntMulAddPredicatedFixed | 0x00002000, + MAD_z_p_zzz = SVEIntMulAddPredicatedFixed | 0x00008000, + MSB_z_p_zzz = SVEIntMulAddPredicatedFixed | 0x0000A000 +}; + +enum SVEIntMulAddUnpredicatedOp { + SVEIntMulAddUnpredicatedFixed = 0x44000000, + SVEIntMulAddUnpredicatedFMask = 0xFF208000, + SVEIntMulAddUnpredicatedMask = 0xFF20FC00, + SDOT_z_zzz = SVEIntMulAddUnpredicatedFixed, + UDOT_z_zzz = SVEIntMulAddUnpredicatedFixed | 0x00000400 +}; + +enum SVEIntMulImm_UnpredicatedOp { + SVEIntMulImm_UnpredicatedFixed = 0x2530C000, + SVEIntMulImm_UnpredicatedFMask = 0xFF38C000, + SVEIntMulImm_UnpredicatedMask = 0xFF3FE000, + MUL_z_zi = SVEIntMulImm_UnpredicatedFixed +}; + +enum SVEIntMulVectors_PredicatedOp { + SVEIntMulVectors_PredicatedFixed = 0x04100000, + SVEIntMulVectors_PredicatedFMask = 0xFF3CE000, + SVEIntMulVectors_PredicatedMask = 0xFF3FE000, + MUL_z_p_zz = SVEIntMulVectors_PredicatedFixed, + SMULH_z_p_zz = SVEIntMulVectors_PredicatedFixed | 0x00020000, + UMULH_z_p_zz = SVEIntMulVectors_PredicatedFixed | 0x00030000 +}; + +enum SVEMovprfxOp { + SVEMovprfxFixed = 0x04002000, + SVEMovprfxFMask = 0xFF20E000, + SVEMovprfxMask = 0xFF3EE000, + MOVPRFX_z_p_z = SVEMovprfxFixed | 0x00100000 +}; + +enum SVEIntReductionOp { + SVEIntReductionFixed = 0x04002000, + SVEIntReductionFMask = 0xFF20E000, + SVEIntReductionMask = 0xFF3FE000, + SADDV_r_p_z = SVEIntReductionFixed, + UADDV_r_p_z = SVEIntReductionFixed | 0x00010000, + SMAXV_r_p_z = SVEIntReductionFixed | 0x00080000, + UMAXV_r_p_z = SVEIntReductionFixed | 0x00090000, + SMINV_r_p_z = SVEIntReductionFixed | 0x000A0000, + UMINV_r_p_z = SVEIntReductionFixed | 0x000B0000 +}; + +enum SVEIntReductionLogicalOp { + SVEIntReductionLogicalFixed = 0x04182000, + SVEIntReductionLogicalFMask = 0xFF38E000, + SVEIntReductionLogicalMask = 0xFF3FE000, + ORV_r_p_z = SVEIntReductionLogicalFixed | 0x00180000, + EORV_r_p_z = SVEIntReductionLogicalFixed | 0x00190000, + ANDV_r_p_z = SVEIntReductionLogicalFixed | 0x001A0000 +}; + +enum SVEIntUnaryArithmeticPredicatedOp { + SVEIntUnaryArithmeticPredicatedFixed = 0x0400A000, + SVEIntUnaryArithmeticPredicatedFMask = 0xFF20E000, + SVEIntUnaryArithmeticPredicatedMask = 0xFF3FE000, + SXTB_z_p_z = SVEIntUnaryArithmeticPredicatedFixed | 0x00100000, + UXTB_z_p_z = SVEIntUnaryArithmeticPredicatedFixed | 0x00110000, + SXTH_z_p_z = SVEIntUnaryArithmeticPredicatedFixed | 0x00120000, + UXTH_z_p_z = SVEIntUnaryArithmeticPredicatedFixed | 0x00130000, + SXTW_z_p_z = SVEIntUnaryArithmeticPredicatedFixed | 0x00140000, + UXTW_z_p_z = SVEIntUnaryArithmeticPredicatedFixed | 0x00150000, + ABS_z_p_z = SVEIntUnaryArithmeticPredicatedFixed | 0x00160000, + NEG_z_p_z = SVEIntUnaryArithmeticPredicatedFixed | 0x00170000, + CLS_z_p_z = SVEIntUnaryArithmeticPredicatedFixed | 0x00180000, + CLZ_z_p_z = SVEIntUnaryArithmeticPredicatedFixed | 0x00190000, + CNT_z_p_z = SVEIntUnaryArithmeticPredicatedFixed | 0x001A0000, + CNOT_z_p_z = SVEIntUnaryArithmeticPredicatedFixed | 0x001B0000, + FABS_z_p_z = SVEIntUnaryArithmeticPredicatedFixed | 0x001C0000, + FNEG_z_p_z = SVEIntUnaryArithmeticPredicatedFixed | 0x001D0000, + NOT_z_p_z = SVEIntUnaryArithmeticPredicatedFixed | 0x001E0000 +}; + +enum SVELoadAndBroadcastElementOp { + SVELoadAndBroadcastElementFixed = 0x84408000, + SVELoadAndBroadcastElementFMask = 0xFE408000, + SVELoadAndBroadcastElementMask = 0xFFC0E000, + LD1RB_z_p_bi_u8 = SVELoadAndBroadcastElementFixed, + LD1RB_z_p_bi_u16 = SVELoadAndBroadcastElementFixed | 0x00002000, + LD1RB_z_p_bi_u32 = SVELoadAndBroadcastElementFixed | 0x00004000, + LD1RB_z_p_bi_u64 = SVELoadAndBroadcastElementFixed | 0x00006000, + LD1RSW_z_p_bi_s64 = SVELoadAndBroadcastElementFixed | 0x00800000, + LD1RH_z_p_bi_u16 = SVELoadAndBroadcastElementFixed | 0x00802000, + LD1RH_z_p_bi_u32 = SVELoadAndBroadcastElementFixed | 0x00804000, + LD1RH_z_p_bi_u64 = SVELoadAndBroadcastElementFixed | 0x00806000, + LD1RSH_z_p_bi_s64 = SVELoadAndBroadcastElementFixed | 0x01000000, + LD1RSH_z_p_bi_s32 = SVELoadAndBroadcastElementFixed | 0x01002000, + LD1RW_z_p_bi_u32 = SVELoadAndBroadcastElementFixed | 0x01004000, + LD1RW_z_p_bi_u64 = SVELoadAndBroadcastElementFixed | 0x01006000, + LD1RSB_z_p_bi_s64 = SVELoadAndBroadcastElementFixed | 0x01800000, + LD1RSB_z_p_bi_s32 = SVELoadAndBroadcastElementFixed | 0x01802000, + LD1RSB_z_p_bi_s16 = SVELoadAndBroadcastElementFixed | 0x01804000, + LD1RD_z_p_bi_u64 = SVELoadAndBroadcastElementFixed | 0x01806000 +}; + +enum SVELoadAndBroadcastQuadword_ScalarPlusImmOp { + SVELoadAndBroadcastQuadword_ScalarPlusImmFixed = 0xA4002000, + SVELoadAndBroadcastQuadword_ScalarPlusImmFMask = 0xFE10E000, + SVELoadAndBroadcastQuadword_ScalarPlusImmMask = 0xFFF0E000, + LD1RQB_z_p_bi_u8 = SVELoadAndBroadcastQuadword_ScalarPlusImmFixed, + LD1RQH_z_p_bi_u16 = SVELoadAndBroadcastQuadword_ScalarPlusImmFixed | 0x00800000, + LD1RQW_z_p_bi_u32 = SVELoadAndBroadcastQuadword_ScalarPlusImmFixed | 0x01000000, + LD1RQD_z_p_bi_u64 = SVELoadAndBroadcastQuadword_ScalarPlusImmFixed | 0x01800000 +}; + +enum SVELoadAndBroadcastQuadword_ScalarPlusScalarOp { + SVELoadAndBroadcastQuadword_ScalarPlusScalarFixed = 0xA4000000, + SVELoadAndBroadcastQuadword_ScalarPlusScalarFMask = 0xFE00E000, + SVELoadAndBroadcastQuadword_ScalarPlusScalarMask = 0xFFE0E000, + LD1RQB_z_p_br_contiguous = SVELoadAndBroadcastQuadword_ScalarPlusScalarFixed, + LD1RQH_z_p_br_contiguous = SVELoadAndBroadcastQuadword_ScalarPlusScalarFixed | 0x00800000, + LD1RQW_z_p_br_contiguous = SVELoadAndBroadcastQuadword_ScalarPlusScalarFixed | 0x01000000, + LD1RQD_z_p_br_contiguous = SVELoadAndBroadcastQuadword_ScalarPlusScalarFixed | 0x01800000 +}; + +enum SVELoadMultipleStructures_ScalarPlusImmOp { + SVELoadMultipleStructures_ScalarPlusImmFixed = 0xA400E000, + SVELoadMultipleStructures_ScalarPlusImmFMask = 0xFE10E000, + SVELoadMultipleStructures_ScalarPlusImmMask = 0xFFF0E000, + LD2B_z_p_bi_contiguous = SVELoadMultipleStructures_ScalarPlusImmFixed | 0x00200000, + LD3B_z_p_bi_contiguous = SVELoadMultipleStructures_ScalarPlusImmFixed | 0x00400000, + LD4B_z_p_bi_contiguous = SVELoadMultipleStructures_ScalarPlusImmFixed | 0x00600000, + LD2H_z_p_bi_contiguous = SVELoadMultipleStructures_ScalarPlusImmFixed | 0x00A00000, + LD3H_z_p_bi_contiguous = SVELoadMultipleStructures_ScalarPlusImmFixed | 0x00C00000, + LD4H_z_p_bi_contiguous = SVELoadMultipleStructures_ScalarPlusImmFixed | 0x00E00000, + LD2W_z_p_bi_contiguous = SVELoadMultipleStructures_ScalarPlusImmFixed | 0x01200000, + LD3W_z_p_bi_contiguous = SVELoadMultipleStructures_ScalarPlusImmFixed | 0x01400000, + LD4W_z_p_bi_contiguous = SVELoadMultipleStructures_ScalarPlusImmFixed | 0x01600000, + LD2D_z_p_bi_contiguous = SVELoadMultipleStructures_ScalarPlusImmFixed | 0x01A00000, + LD3D_z_p_bi_contiguous = SVELoadMultipleStructures_ScalarPlusImmFixed | 0x01C00000, + LD4D_z_p_bi_contiguous = SVELoadMultipleStructures_ScalarPlusImmFixed | 0x01E00000 +}; + +enum SVELoadMultipleStructures_ScalarPlusScalarOp { + SVELoadMultipleStructures_ScalarPlusScalarFixed = 0xA400C000, + SVELoadMultipleStructures_ScalarPlusScalarFMask = 0xFE00E000, + SVELoadMultipleStructures_ScalarPlusScalarMask = 0xFFE0E000, + LD2B_z_p_br_contiguous = SVELoadMultipleStructures_ScalarPlusScalarFixed | 0x00200000, + LD3B_z_p_br_contiguous = SVELoadMultipleStructures_ScalarPlusScalarFixed | 0x00400000, + LD4B_z_p_br_contiguous = SVELoadMultipleStructures_ScalarPlusScalarFixed | 0x00600000, + LD2H_z_p_br_contiguous = SVELoadMultipleStructures_ScalarPlusScalarFixed | 0x00A00000, + LD3H_z_p_br_contiguous = SVELoadMultipleStructures_ScalarPlusScalarFixed | 0x00C00000, + LD4H_z_p_br_contiguous = SVELoadMultipleStructures_ScalarPlusScalarFixed | 0x00E00000, + LD2W_z_p_br_contiguous = SVELoadMultipleStructures_ScalarPlusScalarFixed | 0x01200000, + LD3W_z_p_br_contiguous = SVELoadMultipleStructures_ScalarPlusScalarFixed | 0x01400000, + LD4W_z_p_br_contiguous = SVELoadMultipleStructures_ScalarPlusScalarFixed | 0x01600000, + LD2D_z_p_br_contiguous = SVELoadMultipleStructures_ScalarPlusScalarFixed | 0x01A00000, + LD3D_z_p_br_contiguous = SVELoadMultipleStructures_ScalarPlusScalarFixed | 0x01C00000, + LD4D_z_p_br_contiguous = SVELoadMultipleStructures_ScalarPlusScalarFixed | 0x01E00000 +}; + +enum SVELoadPredicateRegisterOp { + SVELoadPredicateRegisterFixed = 0x85800000, + SVELoadPredicateRegisterFMask = 0xFFC0E010, + SVELoadPredicateRegisterMask = 0xFFC0E010, + LDR_p_bi = SVELoadPredicateRegisterFixed +}; + +enum SVELoadVectorRegisterOp { + SVELoadVectorRegisterFixed = 0x85804000, + SVELoadVectorRegisterFMask = 0xFFC0E000, + SVELoadVectorRegisterMask = 0xFFC0E000, + LDR_z_bi = SVELoadVectorRegisterFixed +}; + +enum SVEMulIndexOp { + SVEMulIndexFixed = 0x44200000, + SVEMulIndexFMask = 0xFF200000, + SVEMulIndexMask = 0xFFE0FC00, + SDOT_z_zzzi_s = SVEMulIndexFixed | 0x00800000, + UDOT_z_zzzi_s = SVEMulIndexFixed | 0x00800400, + SDOT_z_zzzi_d = SVEMulIndexFixed | 0x00C00000, + UDOT_z_zzzi_d = SVEMulIndexFixed | 0x00C00400 +}; + +enum SVEPartitionBreakConditionOp { + SVEPartitionBreakConditionFixed = 0x25104000, + SVEPartitionBreakConditionFMask = 0xFF3FC200, + SVEPartitionBreakConditionMask = 0xFFFFC200, + BRKA_p_p_p = SVEPartitionBreakConditionFixed, + BRKAS_p_p_p_z = SVEPartitionBreakConditionFixed | 0x00400000, + BRKB_p_p_p = SVEPartitionBreakConditionFixed | 0x00800000, + BRKBS_p_p_p_z = SVEPartitionBreakConditionFixed | 0x00C00000 +}; + +enum SVEPermutePredicateElementsOp { + SVEPermutePredicateElementsFixed = 0x05204000, + SVEPermutePredicateElementsFMask = 0xFF30E210, + SVEPermutePredicateElementsMask = 0xFF30FE10, + ZIP1_p_pp = SVEPermutePredicateElementsFixed, + ZIP2_p_pp = SVEPermutePredicateElementsFixed | 0x00000400, + UZP1_p_pp = SVEPermutePredicateElementsFixed | 0x00000800, + UZP2_p_pp = SVEPermutePredicateElementsFixed | 0x00000C00, + TRN1_p_pp = SVEPermutePredicateElementsFixed | 0x00001000, + TRN2_p_pp = SVEPermutePredicateElementsFixed | 0x00001400 +}; + +enum SVEPermuteVectorExtractOp { + SVEPermuteVectorExtractFixed = 0x05200000, + SVEPermuteVectorExtractFMask = 0xFF20E000, + SVEPermuteVectorExtractMask = 0xFFE0E000, + EXT_z_zi_des = SVEPermuteVectorExtractFixed +}; + +enum SVEPermuteVectorInterleavingOp { + SVEPermuteVectorInterleavingFixed = 0x05206000, + SVEPermuteVectorInterleavingFMask = 0xFF20E000, + SVEPermuteVectorInterleavingMask = 0xFF20FC00, + ZIP1_z_zz = SVEPermuteVectorInterleavingFixed, + ZIP2_z_zz = SVEPermuteVectorInterleavingFixed | 0x00000400, + UZP1_z_zz = SVEPermuteVectorInterleavingFixed | 0x00000800, + UZP2_z_zz = SVEPermuteVectorInterleavingFixed | 0x00000C00, + TRN1_z_zz = SVEPermuteVectorInterleavingFixed | 0x00001000, + TRN2_z_zz = SVEPermuteVectorInterleavingFixed | 0x00001400 +}; + +enum SVEPredicateCountOp { + SVEPredicateCountFixed = 0x25208000, + SVEPredicateCountFMask = 0xFF38C000, + SVEPredicateCountMask = 0xFF3FC200, + CNTP_r_p_p = SVEPredicateCountFixed +}; + +enum SVEPredicateFirstActiveOp { + SVEPredicateFirstActiveFixed = 0x2518C000, + SVEPredicateFirstActiveFMask = 0xFF3FFE10, + SVEPredicateFirstActiveMask = 0xFFFFFE10, + PFIRST_p_p_p = SVEPredicateFirstActiveFixed | 0x00400000 +}; + +enum SVEPredicateInitializeOp { + SVEPredicateInitializeFixed = 0x2518E000, + SVEPredicateInitializeFMask = 0xFF3EFC10, + SVEPredicateInitializeMask = 0xFF3FFC10, + SVEPredicateInitializeSetFlagsBit = 0x00010000, + PTRUE_p_s = SVEPredicateInitializeFixed | 0x00000000, + PTRUES_p_s = SVEPredicateInitializeFixed | SVEPredicateInitializeSetFlagsBit +}; + +enum SVEPredicateLogicalOp { + SVEPredicateLogicalFixed = 0x25004000, + SVEPredicateLogicalFMask = 0xFF30C000, + SVEPredicateLogicalMask = 0xFFF0C210, + SVEPredicateLogicalSetFlagsBit = 0x00400000, + AND_p_p_pp_z = SVEPredicateLogicalFixed, + ANDS_p_p_pp_z = AND_p_p_pp_z | SVEPredicateLogicalSetFlagsBit, + BIC_p_p_pp_z = SVEPredicateLogicalFixed | 0x00000010, + BICS_p_p_pp_z = BIC_p_p_pp_z | SVEPredicateLogicalSetFlagsBit, + EOR_p_p_pp_z = SVEPredicateLogicalFixed | 0x00000200, + EORS_p_p_pp_z = EOR_p_p_pp_z | SVEPredicateLogicalSetFlagsBit, + ORR_p_p_pp_z = SVEPredicateLogicalFixed | 0x00800000, + ORRS_p_p_pp_z = ORR_p_p_pp_z | SVEPredicateLogicalSetFlagsBit, + ORN_p_p_pp_z = SVEPredicateLogicalFixed | 0x00800010, + ORNS_p_p_pp_z = ORN_p_p_pp_z | SVEPredicateLogicalSetFlagsBit, + NAND_p_p_pp_z = SVEPredicateLogicalFixed | 0x00800210, + NANDS_p_p_pp_z = NAND_p_p_pp_z | SVEPredicateLogicalSetFlagsBit, + NOR_p_p_pp_z = SVEPredicateLogicalFixed | 0x00800200, + NORS_p_p_pp_z = NOR_p_p_pp_z | SVEPredicateLogicalSetFlagsBit, + SEL_p_p_pp = SVEPredicateLogicalFixed | 0x00000210 +}; + +enum SVEPredicateNextActiveOp { + SVEPredicateNextActiveFixed = 0x2519C400, + SVEPredicateNextActiveFMask = 0xFF3FFE10, + SVEPredicateNextActiveMask = 0xFF3FFE10, + PNEXT_p_p_p = SVEPredicateNextActiveFixed +}; + +enum SVEPredicateReadFromFFR_PredicatedOp { + SVEPredicateReadFromFFR_PredicatedFixed = 0x2518F000, + SVEPredicateReadFromFFR_PredicatedFMask = 0xFF3FFE10, + SVEPredicateReadFromFFR_PredicatedMask = 0xFFFFFE10, + RDFFR_p_p_f = SVEPredicateReadFromFFR_PredicatedFixed, + RDFFRS_p_p_f = SVEPredicateReadFromFFR_PredicatedFixed | 0x00400000 +}; + +enum SVEPredicateReadFromFFR_UnpredicatedOp { + SVEPredicateReadFromFFR_UnpredicatedFixed = 0x2519F000, + SVEPredicateReadFromFFR_UnpredicatedFMask = 0xFF3FFFF0, + SVEPredicateReadFromFFR_UnpredicatedMask = 0xFFFFFFF0, + RDFFR_p_f = SVEPredicateReadFromFFR_UnpredicatedFixed +}; + +enum SVEPredicateTestOp { + SVEPredicateTestFixed = 0x2510C000, + SVEPredicateTestFMask = 0xFF3FC210, + SVEPredicateTestMask = 0xFFFFC21F, + PTEST_p_p = SVEPredicateTestFixed | 0x00400000 +}; + +enum SVEPredicateZeroOp { + SVEPredicateZeroFixed = 0x2518E400, + SVEPredicateZeroFMask = 0xFF3FFFF0, + SVEPredicateZeroMask = 0xFFFFFFF0, + PFALSE_p = SVEPredicateZeroFixed +}; + +enum SVEPropagateBreakOp { + SVEPropagateBreakFixed = 0x2500C000, + SVEPropagateBreakFMask = 0xFF30C000, + SVEPropagateBreakMask = 0xFFF0C210, + BRKPA_p_p_pp = SVEPropagateBreakFixed, + BRKPB_p_p_pp = SVEPropagateBreakFixed | 0x00000010, + BRKPAS_p_p_pp = SVEPropagateBreakFixed | 0x00400000, + BRKPBS_p_p_pp = SVEPropagateBreakFixed | 0x00400010 +}; + +enum SVEPropagateBreakToNextPartitionOp { + SVEPropagateBreakToNextPartitionFixed = 0x25184000, + SVEPropagateBreakToNextPartitionFMask = 0xFFBFC210, + SVEPropagateBreakToNextPartitionMask = 0xFFFFC210, + BRKN_p_p_pp = SVEPropagateBreakToNextPartitionFixed, + BRKNS_p_p_pp = SVEPropagateBreakToNextPartitionFixed | 0x00400000 +}; + +enum SVEReversePredicateElementsOp { + SVEReversePredicateElementsFixed = 0x05344000, + SVEReversePredicateElementsFMask = 0xFF3FFE10, + SVEReversePredicateElementsMask = 0xFF3FFE10, + REV_p_p = SVEReversePredicateElementsFixed +}; + +enum SVEReverseVectorElementsOp { + SVEReverseVectorElementsFixed = 0x05383800, + SVEReverseVectorElementsFMask = 0xFF3FFC00, + SVEReverseVectorElementsMask = 0xFF3FFC00, + REV_z_z = SVEReverseVectorElementsFixed +}; + +enum SVEReverseWithinElementsOp { + SVEReverseWithinElementsFixed = 0x05248000, + SVEReverseWithinElementsFMask = 0xFF3CE000, + SVEReverseWithinElementsMask = 0xFF3FE000, + REVB_z_z = SVEReverseWithinElementsFixed, + REVH_z_z = SVEReverseWithinElementsFixed | 0x00010000, + REVW_z_z = SVEReverseWithinElementsFixed | 0x00020000, + RBIT_z_p_z = SVEReverseWithinElementsFixed | 0x00030000 +}; + +enum SVESaturatingIncDecRegisterByElementCountOp { + SVESaturatingIncDecRegisterByElementCountFixed = 0x0420F000, + SVESaturatingIncDecRegisterByElementCountFMask = 0xFF20F000, + SVESaturatingIncDecRegisterByElementCountMask = 0xFFF0FC00, + SQINCB_r_rs_sx = SVESaturatingIncDecRegisterByElementCountFixed, + UQINCB_r_rs_uw = SVESaturatingIncDecRegisterByElementCountFixed | 0x00000400, + SQDECB_r_rs_sx = SVESaturatingIncDecRegisterByElementCountFixed | 0x00000800, + UQDECB_r_rs_uw = SVESaturatingIncDecRegisterByElementCountFixed | 0x00000C00, + SQINCB_r_rs_x = SVESaturatingIncDecRegisterByElementCountFixed | 0x00100000, + UQINCB_r_rs_x = SVESaturatingIncDecRegisterByElementCountFixed | 0x00100400, + SQDECB_r_rs_x = SVESaturatingIncDecRegisterByElementCountFixed | 0x00100800, + UQDECB_r_rs_x = SVESaturatingIncDecRegisterByElementCountFixed | 0x00100C00, + SQINCH_r_rs_sx = SVESaturatingIncDecRegisterByElementCountFixed | 0x00400000, + UQINCH_r_rs_uw = SVESaturatingIncDecRegisterByElementCountFixed | 0x00400400, + SQDECH_r_rs_sx = SVESaturatingIncDecRegisterByElementCountFixed | 0x00400800, + UQDECH_r_rs_uw = SVESaturatingIncDecRegisterByElementCountFixed | 0x00400C00, + SQINCH_r_rs_x = SVESaturatingIncDecRegisterByElementCountFixed | 0x00500000, + UQINCH_r_rs_x = SVESaturatingIncDecRegisterByElementCountFixed | 0x00500400, + SQDECH_r_rs_x = SVESaturatingIncDecRegisterByElementCountFixed | 0x00500800, + UQDECH_r_rs_x = SVESaturatingIncDecRegisterByElementCountFixed | 0x00500C00, + SQINCW_r_rs_sx = SVESaturatingIncDecRegisterByElementCountFixed | 0x00800000, + UQINCW_r_rs_uw = SVESaturatingIncDecRegisterByElementCountFixed | 0x00800400, + SQDECW_r_rs_sx = SVESaturatingIncDecRegisterByElementCountFixed | 0x00800800, + UQDECW_r_rs_uw = SVESaturatingIncDecRegisterByElementCountFixed | 0x00800C00, + SQINCW_r_rs_x = SVESaturatingIncDecRegisterByElementCountFixed | 0x00900000, + UQINCW_r_rs_x = SVESaturatingIncDecRegisterByElementCountFixed | 0x00900400, + SQDECW_r_rs_x = SVESaturatingIncDecRegisterByElementCountFixed | 0x00900800, + UQDECW_r_rs_x = SVESaturatingIncDecRegisterByElementCountFixed | 0x00900C00, + SQINCD_r_rs_sx = SVESaturatingIncDecRegisterByElementCountFixed | 0x00C00000, + UQINCD_r_rs_uw = SVESaturatingIncDecRegisterByElementCountFixed | 0x00C00400, + SQDECD_r_rs_sx = SVESaturatingIncDecRegisterByElementCountFixed | 0x00C00800, + UQDECD_r_rs_uw = SVESaturatingIncDecRegisterByElementCountFixed | 0x00C00C00, + SQINCD_r_rs_x = SVESaturatingIncDecRegisterByElementCountFixed | 0x00D00000, + UQINCD_r_rs_x = SVESaturatingIncDecRegisterByElementCountFixed | 0x00D00400, + SQDECD_r_rs_x = SVESaturatingIncDecRegisterByElementCountFixed | 0x00D00800, + UQDECD_r_rs_x = SVESaturatingIncDecRegisterByElementCountFixed | 0x00D00C00 +}; + +enum SVESaturatingIncDecVectorByElementCountOp { + SVESaturatingIncDecVectorByElementCountFixed = 0x0420C000, + SVESaturatingIncDecVectorByElementCountFMask = 0xFF30F000, + SVESaturatingIncDecVectorByElementCountMask = 0xFFF0FC00, + SQINCH_z_zs = SVESaturatingIncDecVectorByElementCountFixed | 0x00400000, + UQINCH_z_zs = SVESaturatingIncDecVectorByElementCountFixed | 0x00400400, + SQDECH_z_zs = SVESaturatingIncDecVectorByElementCountFixed | 0x00400800, + UQDECH_z_zs = SVESaturatingIncDecVectorByElementCountFixed | 0x00400C00, + SQINCW_z_zs = SVESaturatingIncDecVectorByElementCountFixed | 0x00800000, + UQINCW_z_zs = SVESaturatingIncDecVectorByElementCountFixed | 0x00800400, + SQDECW_z_zs = SVESaturatingIncDecVectorByElementCountFixed | 0x00800800, + UQDECW_z_zs = SVESaturatingIncDecVectorByElementCountFixed | 0x00800C00, + SQINCD_z_zs = SVESaturatingIncDecVectorByElementCountFixed | 0x00C00000, + UQINCD_z_zs = SVESaturatingIncDecVectorByElementCountFixed | 0x00C00400, + SQDECD_z_zs = SVESaturatingIncDecVectorByElementCountFixed | 0x00C00800, + UQDECD_z_zs = SVESaturatingIncDecVectorByElementCountFixed | 0x00C00C00 +}; + +enum SVEStackFrameAdjustmentOp { + SVEStackFrameAdjustmentFixed = 0x04205000, + SVEStackFrameAdjustmentFMask = 0xFFA0F800, + SVEStackFrameAdjustmentMask = 0xFFE0F800, + ADDVL_r_ri = SVEStackFrameAdjustmentFixed, + ADDPL_r_ri = SVEStackFrameAdjustmentFixed | 0x00400000 +}; + +enum SVEStackFrameSizeOp { + SVEStackFrameSizeFixed = 0x04BF5000, + SVEStackFrameSizeFMask = 0xFFFFF800, + SVEStackFrameSizeMask = 0xFFFFF800, + RDVL_r_i = SVEStackFrameSizeFixed +}; + +enum SVEStoreMultipleStructures_ScalarPlusImmOp { + SVEStoreMultipleStructures_ScalarPlusImmFixed = 0xE410E000, + SVEStoreMultipleStructures_ScalarPlusImmFMask = 0xFE10E000, + SVEStoreMultipleStructures_ScalarPlusImmMask = 0xFFF0E000, + ST2B_z_p_bi_contiguous = SVEStoreMultipleStructures_ScalarPlusImmFixed | 0x00200000, + ST3B_z_p_bi_contiguous = SVEStoreMultipleStructures_ScalarPlusImmFixed | 0x00400000, + ST4B_z_p_bi_contiguous = SVEStoreMultipleStructures_ScalarPlusImmFixed | 0x00600000, + ST2H_z_p_bi_contiguous = SVEStoreMultipleStructures_ScalarPlusImmFixed | 0x00A00000, + ST3H_z_p_bi_contiguous = SVEStoreMultipleStructures_ScalarPlusImmFixed | 0x00C00000, + ST4H_z_p_bi_contiguous = SVEStoreMultipleStructures_ScalarPlusImmFixed | 0x00E00000, + ST2W_z_p_bi_contiguous = SVEStoreMultipleStructures_ScalarPlusImmFixed | 0x01200000, + ST3W_z_p_bi_contiguous = SVEStoreMultipleStructures_ScalarPlusImmFixed | 0x01400000, + ST4W_z_p_bi_contiguous = SVEStoreMultipleStructures_ScalarPlusImmFixed | 0x01600000, + ST2D_z_p_bi_contiguous = SVEStoreMultipleStructures_ScalarPlusImmFixed | 0x01A00000, + ST3D_z_p_bi_contiguous = SVEStoreMultipleStructures_ScalarPlusImmFixed | 0x01C00000, + ST4D_z_p_bi_contiguous = SVEStoreMultipleStructures_ScalarPlusImmFixed | 0x01E00000 +}; + +enum SVEStoreMultipleStructures_ScalarPlusScalarOp { + SVEStoreMultipleStructures_ScalarPlusScalarFixed = 0xE4006000, + SVEStoreMultipleStructures_ScalarPlusScalarFMask = 0xFE00E000, + SVEStoreMultipleStructures_ScalarPlusScalarMask = 0xFFE0E000, + ST2B_z_p_br_contiguous = SVEStoreMultipleStructures_ScalarPlusScalarFixed | 0x00200000, + ST3B_z_p_br_contiguous = SVEStoreMultipleStructures_ScalarPlusScalarFixed | 0x00400000, + ST4B_z_p_br_contiguous = SVEStoreMultipleStructures_ScalarPlusScalarFixed | 0x00600000, + ST2H_z_p_br_contiguous = SVEStoreMultipleStructures_ScalarPlusScalarFixed | 0x00A00000, + ST3H_z_p_br_contiguous = SVEStoreMultipleStructures_ScalarPlusScalarFixed | 0x00C00000, + ST4H_z_p_br_contiguous = SVEStoreMultipleStructures_ScalarPlusScalarFixed | 0x00E00000, + ST2W_z_p_br_contiguous = SVEStoreMultipleStructures_ScalarPlusScalarFixed | 0x01200000, + ST3W_z_p_br_contiguous = SVEStoreMultipleStructures_ScalarPlusScalarFixed | 0x01400000, + ST4W_z_p_br_contiguous = SVEStoreMultipleStructures_ScalarPlusScalarFixed | 0x01600000, + ST2D_z_p_br_contiguous = SVEStoreMultipleStructures_ScalarPlusScalarFixed | 0x01A00000, + ST3D_z_p_br_contiguous = SVEStoreMultipleStructures_ScalarPlusScalarFixed | 0x01C00000, + ST4D_z_p_br_contiguous = SVEStoreMultipleStructures_ScalarPlusScalarFixed | 0x01E00000 +}; + +enum SVEStorePredicateRegisterOp { + SVEStorePredicateRegisterFixed = 0xE5800000, + SVEStorePredicateRegisterFMask = 0xFFC0E010, + SVEStorePredicateRegisterMask = 0xFFC0E010, + STR_p_bi = SVEStorePredicateRegisterFixed +}; + +enum SVEStoreVectorRegisterOp { + SVEStoreVectorRegisterFixed = 0xE5804000, + SVEStoreVectorRegisterFMask = 0xFFC0E000, + SVEStoreVectorRegisterMask = 0xFFC0E000, + STR_z_bi = SVEStoreVectorRegisterFixed +}; + +enum SVETableLookupOp { + SVETableLookupFixed = 0x05203000, + SVETableLookupFMask = 0xFF20FC00, + SVETableLookupMask = 0xFF20FC00, + TBL_z_zz_1 = SVETableLookupFixed +}; + +enum SVEUnpackPredicateElementsOp { + SVEUnpackPredicateElementsFixed = 0x05304000, + SVEUnpackPredicateElementsFMask = 0xFFFEFE10, + SVEUnpackPredicateElementsMask = 0xFFFFFE10, + PUNPKLO_p_p = SVEUnpackPredicateElementsFixed, + PUNPKHI_p_p = SVEUnpackPredicateElementsFixed | 0x00010000 +}; + +enum SVEUnpackVectorElementsOp { + SVEUnpackVectorElementsFixed = 0x05303800, + SVEUnpackVectorElementsFMask = 0xFF3CFC00, + SVEUnpackVectorElementsMask = 0xFF3FFC00, + SUNPKLO_z_z = SVEUnpackVectorElementsFixed, + SUNPKHI_z_z = SVEUnpackVectorElementsFixed | 0x00010000, + UUNPKLO_z_z = SVEUnpackVectorElementsFixed | 0x00020000, + UUNPKHI_z_z = SVEUnpackVectorElementsFixed | 0x00030000 +}; + +enum SVEVectorSelectOp { + SVEVectorSelectFixed = 0x0520C000, + SVEVectorSelectFMask = 0xFF20C000, + SVEVectorSelectMask = 0xFF20C000, + SEL_z_p_zz = SVEVectorSelectFixed +}; + +enum SVEVectorSplice_DestructiveOp { + SVEVectorSplice_DestructiveFixed = 0x052C8000, + SVEVectorSplice_DestructiveFMask = 0xFF3FE000, + SVEVectorSplice_DestructiveMask = 0xFF3FE000, + SPLICE_z_p_zz_des = SVEVectorSplice_DestructiveFixed +}; + +enum ReservedOp { + ReservedFixed = 0x00000000, + ReservedFMask = 0x1E000000, + ReservedMask = 0xFFFF0000, + UDF = ReservedFixed | 0x00000000 +}; + +// Unimplemented and unallocated instructions. These are defined to make fixed +// bit assertion easier. +enum UnimplementedOp { + UnimplementedFixed = 0x00000000, + UnimplementedFMask = 0x00000000 +}; + +enum UnallocatedOp { + UnallocatedFixed = 0x00000000, + UnallocatedFMask = 0x00000000 +}; + +// Re-enable `clang-format` after the `enum`s. +// clang-format on + +} // namespace aarch64 +} // namespace vixl + +#endif // VIXL_AARCH64_CONSTANTS_AARCH64_H_ diff --git a/src/coreclr/jit/vixl/aarch64/cpu-aarch64.cc b/src/coreclr/jit/vixl/aarch64/cpu-aarch64.cc new file mode 100644 index 00000000000000..8886303e05d949 --- /dev/null +++ b/src/coreclr/jit/vixl/aarch64/cpu-aarch64.cc @@ -0,0 +1,489 @@ +// Copyright 2015, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// #if defined(__aarch64__) && (defined(__ANDROID__) || defined(__linux__)) +// #include +// #define VIXL_USE_LINUX_HWCAP 1 +// #endif + +#include "../utils-vixl.h" + +#include "cpu-aarch64.h" + +namespace vixl { +namespace aarch64 { + + +const IDRegister::Field AA64PFR0::kFP(16, Field::kSigned); +const IDRegister::Field AA64PFR0::kAdvSIMD(20, Field::kSigned); +const IDRegister::Field AA64PFR0::kRAS(28); +const IDRegister::Field AA64PFR0::kSVE(32); +const IDRegister::Field AA64PFR0::kDIT(48); +const IDRegister::Field AA64PFR0::kCSV2(56); +const IDRegister::Field AA64PFR0::kCSV3(60); + +const IDRegister::Field AA64PFR1::kBT(0); +const IDRegister::Field AA64PFR1::kSSBS(4); +const IDRegister::Field AA64PFR1::kMTE(8); + +const IDRegister::Field AA64ISAR0::kAES(4); +const IDRegister::Field AA64ISAR0::kSHA1(8); +const IDRegister::Field AA64ISAR0::kSHA2(12); +const IDRegister::Field AA64ISAR0::kCRC32(16); +const IDRegister::Field AA64ISAR0::kAtomic(20); +const IDRegister::Field AA64ISAR0::kRDM(28); +const IDRegister::Field AA64ISAR0::kSHA3(32); +const IDRegister::Field AA64ISAR0::kSM3(36); +const IDRegister::Field AA64ISAR0::kSM4(40); +const IDRegister::Field AA64ISAR0::kDP(44); +const IDRegister::Field AA64ISAR0::kFHM(48); +const IDRegister::Field AA64ISAR0::kTS(52); +const IDRegister::Field AA64ISAR0::kRNDR(60); + +const IDRegister::Field AA64ISAR1::kDPB(0); +const IDRegister::Field AA64ISAR1::kAPA(4); +const IDRegister::Field AA64ISAR1::kAPI(8); +const IDRegister::Field AA64ISAR1::kJSCVT(12); +const IDRegister::Field AA64ISAR1::kFCMA(16); +const IDRegister::Field AA64ISAR1::kLRCPC(20); +const IDRegister::Field AA64ISAR1::kGPA(24); +const IDRegister::Field AA64ISAR1::kGPI(28); +const IDRegister::Field AA64ISAR1::kFRINTTS(32); +const IDRegister::Field AA64ISAR1::kSB(36); +const IDRegister::Field AA64ISAR1::kSPECRES(40); +const IDRegister::Field AA64ISAR1::kBF16(44); +const IDRegister::Field AA64ISAR1::kDGH(48); +const IDRegister::Field AA64ISAR1::kI8MM(52); + +const IDRegister::Field AA64MMFR1::kLO(16); + +const IDRegister::Field AA64MMFR2::kAT(32); + +const IDRegister::Field AA64ZFR0::kBF16(20); +const IDRegister::Field AA64ZFR0::kI8MM(44); +const IDRegister::Field AA64ZFR0::kF32MM(52); +const IDRegister::Field AA64ZFR0::kF64MM(56); + +CPUFeatures AA64PFR0::GetCPUFeatures() const { + CPUFeatures f; + if (Get(kFP) >= 0) f.Combine(CPUFeatures::kFP); + if (Get(kFP) >= 1) f.Combine(CPUFeatures::kFPHalf); + if (Get(kAdvSIMD) >= 0) f.Combine(CPUFeatures::kNEON); + if (Get(kAdvSIMD) >= 1) f.Combine(CPUFeatures::kNEONHalf); + if (Get(kRAS) >= 1) f.Combine(CPUFeatures::kRAS); + if (Get(kSVE) >= 1) f.Combine(CPUFeatures::kSVE); + if (Get(kDIT) >= 1) f.Combine(CPUFeatures::kDIT); + if (Get(kCSV2) >= 1) f.Combine(CPUFeatures::kCSV2); + if (Get(kCSV2) >= 2) f.Combine(CPUFeatures::kSCXTNUM); + if (Get(kCSV3) >= 1) f.Combine(CPUFeatures::kCSV3); + return f; +} + +CPUFeatures AA64PFR1::GetCPUFeatures() const { + CPUFeatures f; + if (Get(kBT) >= 1) f.Combine(CPUFeatures::kBTI); + if (Get(kSSBS) >= 1) f.Combine(CPUFeatures::kSSBS); + if (Get(kSSBS) >= 2) f.Combine(CPUFeatures::kSSBSControl); + if (Get(kMTE) >= 1) f.Combine(CPUFeatures::kMTEInstructions); + if (Get(kMTE) >= 2) f.Combine(CPUFeatures::kMTE); + return f; +} + +CPUFeatures AA64ISAR0::GetCPUFeatures() const { + CPUFeatures f; + if (Get(kAES) >= 1) f.Combine(CPUFeatures::kAES); + if (Get(kAES) >= 2) f.Combine(CPUFeatures::kPmull1Q); + if (Get(kSHA1) >= 1) f.Combine(CPUFeatures::kSHA1); + if (Get(kSHA2) >= 1) f.Combine(CPUFeatures::kSHA2); + if (Get(kSHA2) >= 2) f.Combine(CPUFeatures::kSHA512); + if (Get(kCRC32) >= 1) f.Combine(CPUFeatures::kCRC32); + if (Get(kAtomic) >= 1) f.Combine(CPUFeatures::kAtomics); + if (Get(kRDM) >= 1) f.Combine(CPUFeatures::kRDM); + if (Get(kSHA3) >= 1) f.Combine(CPUFeatures::kSHA3); + if (Get(kSM3) >= 1) f.Combine(CPUFeatures::kSM3); + if (Get(kSM4) >= 1) f.Combine(CPUFeatures::kSM4); + if (Get(kDP) >= 1) f.Combine(CPUFeatures::kDotProduct); + if (Get(kFHM) >= 1) f.Combine(CPUFeatures::kFHM); + if (Get(kTS) >= 1) f.Combine(CPUFeatures::kFlagM); + if (Get(kTS) >= 2) f.Combine(CPUFeatures::kAXFlag); + if (Get(kRNDR) >= 1) f.Combine(CPUFeatures::kRNG); + return f; +} + +CPUFeatures AA64ISAR1::GetCPUFeatures() const { + CPUFeatures f; + if (Get(kDPB) >= 1) f.Combine(CPUFeatures::kDCPoP); + if (Get(kDPB) >= 2) f.Combine(CPUFeatures::kDCCVADP); + if (Get(kJSCVT) >= 1) f.Combine(CPUFeatures::kJSCVT); + if (Get(kFCMA) >= 1) f.Combine(CPUFeatures::kFcma); + if (Get(kLRCPC) >= 1) f.Combine(CPUFeatures::kRCpc); + if (Get(kLRCPC) >= 2) f.Combine(CPUFeatures::kRCpcImm); + if (Get(kFRINTTS) >= 1) f.Combine(CPUFeatures::kFrintToFixedSizedInt); + if (Get(kSB) >= 1) f.Combine(CPUFeatures::kSB); + if (Get(kSPECRES) >= 1) f.Combine(CPUFeatures::kSPECRES); + if (Get(kBF16) >= 1) f.Combine(CPUFeatures::kBF16); + if (Get(kDGH) >= 1) f.Combine(CPUFeatures::kDGH); + if (Get(kI8MM) >= 1) f.Combine(CPUFeatures::kI8MM); + + // Only one of these fields should be non-zero, but they have the same + // encodings, so merge the logic. + int apx = max(Get(kAPI), Get(kAPA)); + if (apx >= 1) { + f.Combine(CPUFeatures::kPAuth); + // APA (rather than API) indicates QARMA. + if (Get(kAPA) >= 1) f.Combine(CPUFeatures::kPAuthQARMA); + if (apx == 0b0010) f.Combine(CPUFeatures::kPAuthEnhancedPAC); + if (apx >= 0b0011) f.Combine(CPUFeatures::kPAuthEnhancedPAC2); + if (apx >= 0b0100) f.Combine(CPUFeatures::kPAuthFPAC); + if (apx >= 0b0101) f.Combine(CPUFeatures::kPAuthFPACCombined); + } + + if (Get(kGPI) >= 1) f.Combine(CPUFeatures::kPAuthGeneric); + if (Get(kGPA) >= 1) { + f.Combine(CPUFeatures::kPAuthGeneric, CPUFeatures::kPAuthGenericQARMA); + } + return f; +} + +CPUFeatures AA64MMFR1::GetCPUFeatures() const { + CPUFeatures f; + if (Get(kLO) >= 1) f.Combine(CPUFeatures::kLORegions); + return f; +} + +CPUFeatures AA64MMFR2::GetCPUFeatures() const { + CPUFeatures f; + if (Get(kAT) >= 1) f.Combine(CPUFeatures::kUSCAT); + return f; +} + +CPUFeatures AA64ZFR0::GetCPUFeatures() const { + // This register is only available with SVE, but reads-as-zero in its absence, + // so it's always safe to read it. + CPUFeatures f; + if (Get(kF64MM) >= 1) f.Combine(CPUFeatures::kSVEF64MM); + if (Get(kF32MM) >= 1) f.Combine(CPUFeatures::kSVEF32MM); + if (Get(kI8MM) >= 1) f.Combine(CPUFeatures::kSVEI8MM); + if (Get(kBF16) >= 1) f.Combine(CPUFeatures::kSVEBF16); + return f; +} + +int IDRegister::Get(IDRegister::Field field) const { + int msb = field.GetMsb(); + int lsb = field.GetLsb(); + VIXL_STATIC_ASSERT(static_cast(Field::kMaxWidthInBits) < + (sizeof(int) * kBitsPerByte)); + switch (field.GetType()) { + case Field::kSigned: + return static_cast(ExtractSignedBitfield64(msb, lsb, value_)); + case Field::kUnsigned: + return static_cast(ExtractUnsignedBitfield64(msb, lsb, value_)); + } + VIXL_UNREACHABLE(); + return 0; +} + +CPUFeatures CPU::InferCPUFeaturesFromIDRegisters() { + CPUFeatures f; +#define VIXL_COMBINE_ID_REG(NAME, MRS_ARG) \ + f.Combine(Read##NAME().GetCPUFeatures()); + VIXL_AARCH64_ID_REG_LIST(VIXL_COMBINE_ID_REG) +#undef VIXL_COMBINE_ID_REG + return f; +} + +CPUFeatures CPU::InferCPUFeaturesFromOS( + CPUFeatures::QueryIDRegistersOption option) { + CPUFeatures features; + +#if VIXL_USE_LINUX_HWCAP + // Map each set bit onto a feature. Ideally, we'd use HWCAP_* macros rather + // than explicit bits, but explicit bits allow us to identify features that + // the toolchain doesn't know about. + static const CPUFeatures::Feature kFeatureBits[] = + {// Bits 0-7 + CPUFeatures::kFP, + CPUFeatures::kNEON, + CPUFeatures::kNone, // "EVTSTRM", which VIXL doesn't track. + CPUFeatures::kAES, + CPUFeatures::kPmull1Q, + CPUFeatures::kSHA1, + CPUFeatures::kSHA2, + CPUFeatures::kCRC32, + // Bits 8-15 + CPUFeatures::kAtomics, + CPUFeatures::kFPHalf, + CPUFeatures::kNEONHalf, + CPUFeatures::kIDRegisterEmulation, + CPUFeatures::kRDM, + CPUFeatures::kJSCVT, + CPUFeatures::kFcma, + CPUFeatures::kRCpc, + // Bits 16-23 + CPUFeatures::kDCPoP, + CPUFeatures::kSHA3, + CPUFeatures::kSM3, + CPUFeatures::kSM4, + CPUFeatures::kDotProduct, + CPUFeatures::kSHA512, + CPUFeatures::kSVE, + CPUFeatures::kFHM, + // Bits 24-31 + CPUFeatures::kDIT, + CPUFeatures::kUSCAT, + CPUFeatures::kRCpcImm, + CPUFeatures::kFlagM, + CPUFeatures::kSSBSControl, + CPUFeatures::kSB, + CPUFeatures::kPAuth, + CPUFeatures::kPAuthGeneric, + // Bits 32-39 + CPUFeatures::kDCCVADP, + CPUFeatures::kNone, // "sve2" + CPUFeatures::kNone, // "sveaes" + CPUFeatures::kNone, // "svepmull" + CPUFeatures::kNone, // "svebitperm" + CPUFeatures::kNone, // "svesha3" + CPUFeatures::kNone, // "svesm4" + CPUFeatures::kFrintToFixedSizedInt, + // Bits 40-47 + CPUFeatures::kSVEI8MM, + CPUFeatures::kSVEF32MM, + CPUFeatures::kSVEF64MM, + CPUFeatures::kSVEBF16, + CPUFeatures::kI8MM, + CPUFeatures::kBF16, + CPUFeatures::kDGH, + CPUFeatures::kRNG, + // Bits 48+ + CPUFeatures::kBTI}; + + uint64_t hwcap_low32 = getauxval(AT_HWCAP); + uint64_t hwcap_high32 = getauxval(AT_HWCAP2); + VIXL_ASSERT(IsUint32(hwcap_low32)); + VIXL_ASSERT(IsUint32(hwcap_high32)); + uint64_t hwcap = hwcap_low32 | (hwcap_high32 << 32); + + VIXL_STATIC_ASSERT(ArrayLength(kFeatureBits) < 64); + for (size_t i = 0; i < ArrayLength(kFeatureBits); i++) { + if (hwcap & (UINT64_C(1) << i)) features.Combine(kFeatureBits[i]); + } +#endif // VIXL_USE_LINUX_HWCAP + + if ((option == CPUFeatures::kQueryIDRegistersIfAvailable) && + (features.Has(CPUFeatures::kIDRegisterEmulation))) { + features.Combine(InferCPUFeaturesFromIDRegisters()); + } + return features; +} + + +#ifdef __aarch64__ +#define VIXL_READ_ID_REG(NAME, MRS_ARG) \ + NAME CPU::Read##NAME() { \ + uint64_t value = 0; \ + __asm__("mrs %0, " MRS_ARG : "=r"(value)); \ + return NAME(value); \ + } +#else // __aarch64__ +#define VIXL_READ_ID_REG(NAME, MRS_ARG) \ + NAME CPU::Read##NAME() { \ + VIXL_UNREACHABLE(); \ + return NAME(0); \ + } +#endif // __aarch64__ + +VIXL_AARCH64_ID_REG_LIST(VIXL_READ_ID_REG) + +#undef VIXL_READ_ID_REG + + +// Initialise to smallest possible cache size. +unsigned CPU::dcache_line_size_ = 1; +unsigned CPU::icache_line_size_ = 1; + + +// Currently computes I and D cache line size. +void CPU::SetUp() { + uint32_t cache_type_register = GetCacheType(); + + // The cache type register holds information about the caches, including I + // D caches line size. + static const int kDCacheLineSizeShift = 16; + static const int kICacheLineSizeShift = 0; + static const uint32_t kDCacheLineSizeMask = 0xf << kDCacheLineSizeShift; + static const uint32_t kICacheLineSizeMask = 0xf << kICacheLineSizeShift; + + // The cache type register holds the size of the I and D caches in words as + // a power of two. + uint32_t dcache_line_size_power_of_two = + (cache_type_register & kDCacheLineSizeMask) >> kDCacheLineSizeShift; + uint32_t icache_line_size_power_of_two = + (cache_type_register & kICacheLineSizeMask) >> kICacheLineSizeShift; + + dcache_line_size_ = 4 << dcache_line_size_power_of_two; + icache_line_size_ = 4 << icache_line_size_power_of_two; +} + + +uint32_t CPU::GetCacheType() { +#ifdef __aarch64__ + uint64_t cache_type_register; + // Copy the content of the cache type register to a core register. + __asm__ __volatile__("mrs %[ctr], ctr_el0" // NOLINT(runtime/references) + : [ctr] "=r"(cache_type_register)); + VIXL_ASSERT(IsUint32(cache_type_register)); + return static_cast(cache_type_register); +#else + // This will lead to a cache with 1 byte long lines, which is fine since + // neither EnsureIAndDCacheCoherency nor the simulator will need this + // information. + return 0; +#endif +} + + +// Query the SVE vector length. This requires CPUFeatures::kSVE. +int CPU::ReadSVEVectorLengthInBits() { +#ifdef __aarch64__ + uint64_t vl; + // To support compilers that don't understand `rdvl`, encode the value + // directly and move it manually. + __asm__( + " .word 0x04bf5100\n" // rdvl x0, #8 + " mov %[vl], x0\n" + : [vl] "=r"(vl) + : + : "x0"); + VIXL_ASSERT(vl <= INT_MAX); + return static_cast(vl); +#else + VIXL_UNREACHABLE(); + return 0; +#endif +} + + +void CPU::EnsureIAndDCacheCoherency(void *address, size_t length) { +#ifdef __aarch64__ + // Implement the cache synchronisation for all targets where AArch64 is the + // host, even if we're building the simulator for an AAarch64 host. This + // allows for cases where the user wants to simulate code as well as run it + // natively. + + if (length == 0) { + return; + } + + // The code below assumes user space cache operations are allowed. + + // Work out the line sizes for each cache, and use them to determine the + // start addresses. + uintptr_t start = reinterpret_cast(address); + uintptr_t dsize = static_cast(dcache_line_size_); + uintptr_t isize = static_cast(icache_line_size_); + uintptr_t dline = start & ~(dsize - 1); + uintptr_t iline = start & ~(isize - 1); + + // Cache line sizes are always a power of 2. + VIXL_ASSERT(IsPowerOf2(dsize)); + VIXL_ASSERT(IsPowerOf2(isize)); + uintptr_t end = start + length; + + do { + __asm__ __volatile__( + // Clean each line of the D cache containing the target data. + // + // dc : Data Cache maintenance + // c : Clean + // va : by (Virtual) Address + // u : to the point of Unification + // The point of unification for a processor is the point by which the + // instruction and data caches are guaranteed to see the same copy of a + // memory location. See ARM DDI 0406B page B2-12 for more information. + " dc cvau, %[dline]\n" + : + : [dline] "r"(dline) + // This code does not write to memory, but the "memory" dependency + // prevents GCC from reordering the code. + : "memory"); + dline += dsize; + } while (dline < end); + + __asm__ __volatile__( + // Make sure that the data cache operations (above) complete before the + // instruction cache operations (below). + // + // dsb : Data Synchronisation Barrier + // ish : Inner SHareable domain + // + // The point of unification for an Inner Shareable shareability domain is + // the point by which the instruction and data caches of all the + // processors + // in that Inner Shareable shareability domain are guaranteed to see the + // same copy of a memory location. See ARM DDI 0406B page B2-12 for more + // information. + " dsb ish\n" + : + : + : "memory"); + + do { + __asm__ __volatile__( + // Invalidate each line of the I cache containing the target data. + // + // ic : Instruction Cache maintenance + // i : Invalidate + // va : by Address + // u : to the point of Unification + " ic ivau, %[iline]\n" + : + : [iline] "r"(iline) + : "memory"); + iline += isize; + } while (iline < end); + + __asm__ __volatile__( + // Make sure that the instruction cache operations (above) take effect + // before the isb (below). + " dsb ish\n" + + // Ensure that any instructions already in the pipeline are discarded and + // reloaded from the new data. + // isb : Instruction Synchronisation Barrier + " isb\n" + : + : + : "memory"); +#else + // If the host isn't AArch64, we must be using the simulator, so this function + // doesn't have to do anything. + USE(address, length); +#endif +} + +} // namespace aarch64 +} // namespace vixl diff --git a/src/coreclr/jit/vixl/aarch64/cpu-aarch64.h b/src/coreclr/jit/vixl/aarch64/cpu-aarch64.h new file mode 100644 index 00000000000000..2bf1e60f68b2c9 --- /dev/null +++ b/src/coreclr/jit/vixl/aarch64/cpu-aarch64.h @@ -0,0 +1,282 @@ +// Copyright 2014, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef VIXL_CPU_AARCH64_H +#define VIXL_CPU_AARCH64_H + +#include "../cpu-features.h" +#include "../globals-vixl.h" + +#include "instructions-aarch64.h" + +#ifndef VIXL_INCLUDE_TARGET_AARCH64 +// The supporting .cc file is only compiled when the A64 target is selected. +// Throw an explicit error now to avoid a harder-to-debug linker error later. +// +// These helpers _could_ work on any AArch64 host, even when generating AArch32 +// code, but we don't support this because the available features may differ +// between AArch32 and AArch64 on the same platform, so basing AArch32 code +// generation on aarch64::CPU features is probably broken. +#error cpu-aarch64.h requires VIXL_INCLUDE_TARGET_AARCH64 (scons target=a64). +#endif + +namespace vixl { +namespace aarch64 { + +// A CPU ID register, for use with CPUFeatures::kIDRegisterEmulation. Fields +// specific to each register are described in relevant subclasses. +class IDRegister { + protected: + explicit IDRegister(uint64_t value = 0) : value_(value) {} + + class Field { + public: + enum Type { kUnsigned, kSigned }; + + // This needs to be constexpr so that fields have "constant initialisation". + // This avoids initialisation order problems when these values are used to + // (dynamically) initialise static variables, etc. + explicit constexpr Field(int lsb, Type type = kUnsigned) + : lsb_(lsb), type_(type) {} + + static const int kMaxWidthInBits = 4; + + int GetWidthInBits() const { + // All current ID fields have four bits. + return kMaxWidthInBits; + } + int GetLsb() const { return lsb_; } + int GetMsb() const { return lsb_ + GetWidthInBits() - 1; } + Type GetType() const { return type_; } + + private: + int lsb_; + Type type_; + }; + + public: + // Extract the specified field, performing sign-extension for signed fields. + // This allows us to implement the 'value >= number' detection mechanism + // recommended by the Arm ARM, for both signed and unsigned fields. + int Get(Field field) const; + + private: + uint64_t value_; +}; + +class AA64PFR0 : public IDRegister { + public: + explicit AA64PFR0(uint64_t value) : IDRegister(value) {} + + CPUFeatures GetCPUFeatures() const; + + private: + static const Field kFP; + static const Field kAdvSIMD; + static const Field kRAS; + static const Field kSVE; + static const Field kDIT; + static const Field kCSV2; + static const Field kCSV3; +}; + +class AA64PFR1 : public IDRegister { + public: + explicit AA64PFR1(uint64_t value) : IDRegister(value) {} + + CPUFeatures GetCPUFeatures() const; + + private: + static const Field kBT; + static const Field kSSBS; + static const Field kMTE; +}; + +class AA64ISAR0 : public IDRegister { + public: + explicit AA64ISAR0(uint64_t value) : IDRegister(value) {} + + CPUFeatures GetCPUFeatures() const; + + private: + static const Field kAES; + static const Field kSHA1; + static const Field kSHA2; + static const Field kCRC32; + static const Field kAtomic; + static const Field kRDM; + static const Field kSHA3; + static const Field kSM3; + static const Field kSM4; + static const Field kDP; + static const Field kFHM; + static const Field kTS; + static const Field kRNDR; +}; + +class AA64ISAR1 : public IDRegister { + public: + explicit AA64ISAR1(uint64_t value) : IDRegister(value) {} + + CPUFeatures GetCPUFeatures() const; + + private: + static const Field kDPB; + static const Field kAPA; + static const Field kAPI; + static const Field kJSCVT; + static const Field kFCMA; + static const Field kLRCPC; + static const Field kGPA; + static const Field kGPI; + static const Field kFRINTTS; + static const Field kSB; + static const Field kSPECRES; + static const Field kBF16; + static const Field kDGH; + static const Field kI8MM; +}; + +class AA64MMFR1 : public IDRegister { + public: + explicit AA64MMFR1(uint64_t value) : IDRegister(value) {} + + CPUFeatures GetCPUFeatures() const; + + private: + static const Field kLO; +}; + +class AA64MMFR2 : public IDRegister { + public: + explicit AA64MMFR2(uint64_t value) : IDRegister(value) {} + + CPUFeatures GetCPUFeatures() const; + + private: + static const Field kAT; +}; + +class AA64ZFR0 : public IDRegister { + public: + explicit AA64ZFR0(uint64_t value) : IDRegister(value) {} + + CPUFeatures GetCPUFeatures() const; + + private: + static const Field kBF16; + static const Field kI8MM; + static const Field kF32MM; + static const Field kF64MM; +}; + +class CPU { + public: + // Initialise CPU support. + static void SetUp(); + + // Ensures the data at a given address and with a given size is the same for + // the I and D caches. I and D caches are not automatically coherent on ARM + // so this operation is required before any dynamically generated code can + // safely run. + static void EnsureIAndDCacheCoherency(void *address, size_t length); + + // Read and interpret the ID registers. This requires + // CPUFeatures::kIDRegisterEmulation, and therefore cannot be called on + // non-AArch64 platforms. + static CPUFeatures InferCPUFeaturesFromIDRegisters(); + + // Read and interpret CPUFeatures reported by the OS. Failed queries (or + // unsupported platforms) return an empty list. Note that this is + // indistinguishable from a successful query on a platform that advertises no + // features. + // + // Non-AArch64 hosts are considered to be unsupported platforms, and this + // function returns an empty list. + static CPUFeatures InferCPUFeaturesFromOS( + CPUFeatures::QueryIDRegistersOption option = + CPUFeatures::kQueryIDRegistersIfAvailable); + + // Query the SVE vector length. This requires CPUFeatures::kSVE. + static int ReadSVEVectorLengthInBits(); + + // Handle tagged pointers. + template + static T SetPointerTag(T pointer, uint64_t tag) { + VIXL_ASSERT(IsUintN(kAddressTagWidth, tag)); + + // Use C-style casts to get static_cast behaviour for integral types (T), + // and reinterpret_cast behaviour for other types. + + uint64_t raw = (uint64_t)pointer; + VIXL_STATIC_ASSERT(sizeof(pointer) == sizeof(raw)); + + raw = (raw & ~kAddressTagMask) | (tag << kAddressTagOffset); + return (T)raw; + } + + template + static uint64_t GetPointerTag(T pointer) { + // Use C-style casts to get static_cast behaviour for integral types (T), + // and reinterpret_cast behaviour for other types. + + uint64_t raw = (uint64_t)pointer; + VIXL_STATIC_ASSERT(sizeof(pointer) == sizeof(raw)); + + return (raw & kAddressTagMask) >> kAddressTagOffset; + } + + private: +#define VIXL_AARCH64_ID_REG_LIST(V) \ + V(AA64PFR0, "ID_AA64PFR0_EL1") \ + V(AA64PFR1, "ID_AA64PFR1_EL1") \ + V(AA64ISAR0, "ID_AA64ISAR0_EL1") \ + V(AA64ISAR1, "ID_AA64ISAR1_EL1") \ + V(AA64MMFR1, "ID_AA64MMFR1_EL1") \ + /* These registers are RES0 in the baseline Arm8.0. We can always safely */ \ + /* read them, but some compilers don't accept the symbolic names. */ \ + V(AA64MMFR2, "S3_0_C0_C7_2") \ + V(AA64ZFR0, "S3_0_C0_C4_4") + +#define VIXL_READ_ID_REG(NAME, MRS_ARG) static NAME Read##NAME(); + // On native AArch64 platforms, read the named CPU ID registers. These require + // CPUFeatures::kIDRegisterEmulation, and should not be called on non-AArch64 + // platforms. + VIXL_AARCH64_ID_REG_LIST(VIXL_READ_ID_REG) +#undef VIXL_READ_ID_REG + + // Return the content of the cache type register. + static uint32_t GetCacheType(); + + // I and D cache line size in bytes. + static unsigned icache_line_size_; + static unsigned dcache_line_size_; +}; + +} // namespace aarch64 +} // namespace vixl + +#endif // VIXL_CPU_AARCH64_H diff --git a/src/coreclr/jit/vixl/aarch64/cpu-features-auditor-aarch64.cc b/src/coreclr/jit/vixl/aarch64/cpu-features-auditor-aarch64.cc new file mode 100644 index 00000000000000..55ba848f92688b --- /dev/null +++ b/src/coreclr/jit/vixl/aarch64/cpu-features-auditor-aarch64.cc @@ -0,0 +1,1357 @@ +// Copyright 2018, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of Arm Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "../cpu-features.h" +#include "../globals-vixl.h" +#include "../utils-vixl.h" +#include "decoder-aarch64.h" + +#include "cpu-features-auditor-aarch64.h" + +namespace vixl { +namespace aarch64 { + +// Every instruction must update last_instruction_, even if only to clear it, +// and every instruction must also update seen_ once it has been fully handled. +// This scope makes that simple, and allows early returns in the decode logic. +class CPUFeaturesAuditor::RecordInstructionFeaturesScope { + public: + explicit RecordInstructionFeaturesScope(CPUFeaturesAuditor* auditor) + : auditor_(auditor) { + auditor_->last_instruction_ = CPUFeatures::None(); + } + ~RecordInstructionFeaturesScope() { + auditor_->seen_.Combine(auditor_->last_instruction_); + } + + void Record(const CPUFeatures& features) { + auditor_->last_instruction_.Combine(features); + } + + void Record(CPUFeatures::Feature feature0, + CPUFeatures::Feature feature1 = CPUFeatures::kNone, + CPUFeatures::Feature feature2 = CPUFeatures::kNone, + CPUFeatures::Feature feature3 = CPUFeatures::kNone) { + auditor_->last_instruction_.Combine(feature0, feature1, feature2, feature3); + } + + // If exactly one of a or b is known to be available, record it. Otherwise, + // record both. This is intended for encodings that can be provided by two + // different features. + void RecordOneOrBothOf(CPUFeatures::Feature a, CPUFeatures::Feature b) { + bool hint_a = auditor_->available_.Has(a); + bool hint_b = auditor_->available_.Has(b); + if (hint_a && !hint_b) { + Record(a); + } else if (hint_b && !hint_a) { + Record(b); + } else { + Record(a, b); + } + } + + private: + CPUFeaturesAuditor* auditor_; +}; + +void CPUFeaturesAuditor::LoadStoreHelper(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + switch (instr->Mask(LoadStoreMask)) { + case LDR_b: + case LDR_q: + case STR_b: + case STR_q: + scope.Record(CPUFeatures::kNEON); + return; + case LDR_h: + case LDR_s: + case LDR_d: + case STR_h: + case STR_s: + case STR_d: + scope.RecordOneOrBothOf(CPUFeatures::kFP, CPUFeatures::kNEON); + return; + default: + // No special CPU features. + return; + } +} + +void CPUFeaturesAuditor::LoadStorePairHelper(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + switch (instr->Mask(LoadStorePairMask)) { + case LDP_q: + case STP_q: + scope.Record(CPUFeatures::kNEON); + return; + case LDP_s: + case LDP_d: + case STP_s: + case STP_d: { + scope.RecordOneOrBothOf(CPUFeatures::kFP, CPUFeatures::kNEON); + return; + } + default: + // No special CPU features. + return; + } +} + +void CPUFeaturesAuditor::VisitAddSubExtended(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + USE(instr); +} + +void CPUFeaturesAuditor::VisitAddSubImmediate(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + USE(instr); +} + +void CPUFeaturesAuditor::VisitAddSubShifted(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + USE(instr); +} + +void CPUFeaturesAuditor::VisitAddSubWithCarry(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + USE(instr); +} + +void CPUFeaturesAuditor::VisitRotateRightIntoFlags(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + switch (instr->Mask(RotateRightIntoFlagsMask)) { + case RMIF: + scope.Record(CPUFeatures::kFlagM); + return; + } +} + +void CPUFeaturesAuditor::VisitEvaluateIntoFlags(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + switch (instr->Mask(EvaluateIntoFlagsMask)) { + case SETF8: + case SETF16: + scope.Record(CPUFeatures::kFlagM); + return; + } +} + +void CPUFeaturesAuditor::VisitAtomicMemory(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + switch (instr->Mask(AtomicMemoryMask)) { + case LDAPRB: + case LDAPRH: + case LDAPR_w: + case LDAPR_x: + scope.Record(CPUFeatures::kRCpc); + return; + default: + // Everything else belongs to the Atomics extension. + scope.Record(CPUFeatures::kAtomics); + return; + } +} + +void CPUFeaturesAuditor::VisitBitfield(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + USE(instr); +} + +void CPUFeaturesAuditor::VisitCompareBranch(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + USE(instr); +} + +void CPUFeaturesAuditor::VisitConditionalBranch(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + USE(instr); +} + +void CPUFeaturesAuditor::VisitConditionalCompareImmediate( + const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + USE(instr); +} + +void CPUFeaturesAuditor::VisitConditionalCompareRegister( + const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + USE(instr); +} + +void CPUFeaturesAuditor::VisitConditionalSelect(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + USE(instr); +} + +void CPUFeaturesAuditor::VisitCrypto2RegSHA(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + USE(instr); +} + +void CPUFeaturesAuditor::VisitCrypto3RegSHA(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + USE(instr); +} + +void CPUFeaturesAuditor::VisitCryptoAES(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + USE(instr); +} + +void CPUFeaturesAuditor::VisitDataProcessing1Source(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + switch (instr->Mask(DataProcessing1SourceMask)) { + case PACIA: + case PACIB: + case PACDA: + case PACDB: + case AUTIA: + case AUTIB: + case AUTDA: + case AUTDB: + case PACIZA: + case PACIZB: + case PACDZA: + case PACDZB: + case AUTIZA: + case AUTIZB: + case AUTDZA: + case AUTDZB: + case XPACI: + case XPACD: + scope.Record(CPUFeatures::kPAuth); + return; + default: + // No special CPU features. + return; + } +} + +void CPUFeaturesAuditor::VisitDataProcessing2Source(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + switch (instr->Mask(DataProcessing2SourceMask)) { + case CRC32B: + case CRC32H: + case CRC32W: + case CRC32X: + case CRC32CB: + case CRC32CH: + case CRC32CW: + case CRC32CX: + scope.Record(CPUFeatures::kCRC32); + return; + case PACGA: + scope.Record(CPUFeatures::kPAuth, CPUFeatures::kPAuthGeneric); + return; + default: + // No special CPU features. + return; + } +} + +void CPUFeaturesAuditor::VisitLoadStoreRCpcUnscaledOffset( + const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + switch (instr->Mask(LoadStoreRCpcUnscaledOffsetMask)) { + case LDAPURB: + case LDAPURSB_w: + case LDAPURSB_x: + case LDAPURH: + case LDAPURSH_w: + case LDAPURSH_x: + case LDAPUR_w: + case LDAPURSW: + case LDAPUR_x: + + // These stores don't actually have RCpc semantics but they're included with + // the RCpc extensions. + case STLURB: + case STLURH: + case STLUR_w: + case STLUR_x: + scope.Record(CPUFeatures::kRCpc, CPUFeatures::kRCpcImm); + return; + } +} + +void CPUFeaturesAuditor::VisitLoadStorePAC(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + USE(instr); + scope.Record(CPUFeatures::kPAuth); +} + +void CPUFeaturesAuditor::VisitDataProcessing3Source(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + USE(instr); +} + +void CPUFeaturesAuditor::VisitException(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + USE(instr); +} + +void CPUFeaturesAuditor::VisitExtract(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + USE(instr); +} + +void CPUFeaturesAuditor::VisitFPCompare(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require FP. + scope.Record(CPUFeatures::kFP); + switch (instr->Mask(FPCompareMask)) { + case FCMP_h: + case FCMP_h_zero: + case FCMPE_h: + case FCMPE_h_zero: + scope.Record(CPUFeatures::kFPHalf); + return; + default: + // No special CPU features. + return; + } +} + +void CPUFeaturesAuditor::VisitFPConditionalCompare(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require FP. + scope.Record(CPUFeatures::kFP); + switch (instr->Mask(FPConditionalCompareMask)) { + case FCCMP_h: + case FCCMPE_h: + scope.Record(CPUFeatures::kFPHalf); + return; + default: + // No special CPU features. + return; + } +} + +void CPUFeaturesAuditor::VisitFPConditionalSelect(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require FP. + scope.Record(CPUFeatures::kFP); + if (instr->Mask(FPConditionalSelectMask) == FCSEL_h) { + scope.Record(CPUFeatures::kFPHalf); + } +} + +void CPUFeaturesAuditor::VisitFPDataProcessing1Source( + const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require FP. + scope.Record(CPUFeatures::kFP); + switch (instr->Mask(FPDataProcessing1SourceMask)) { + case FMOV_h: + case FABS_h: + case FNEG_h: + case FSQRT_h: + case FRINTN_h: + case FRINTP_h: + case FRINTM_h: + case FRINTZ_h: + case FRINTA_h: + case FRINTX_h: + case FRINTI_h: + scope.Record(CPUFeatures::kFPHalf); + return; + case FRINT32X_s: + case FRINT32X_d: + case FRINT32Z_s: + case FRINT32Z_d: + case FRINT64X_s: + case FRINT64X_d: + case FRINT64Z_s: + case FRINT64Z_d: + scope.Record(CPUFeatures::kFrintToFixedSizedInt); + return; + default: + // No special CPU features. + // This category includes some half-precision FCVT instructions that do + // not require FPHalf. + return; + } +} + +void CPUFeaturesAuditor::VisitFPDataProcessing2Source( + const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require FP. + scope.Record(CPUFeatures::kFP); + switch (instr->Mask(FPDataProcessing2SourceMask)) { + case FMUL_h: + case FDIV_h: + case FADD_h: + case FSUB_h: + case FMAX_h: + case FMIN_h: + case FMAXNM_h: + case FMINNM_h: + case FNMUL_h: + scope.Record(CPUFeatures::kFPHalf); + return; + default: + // No special CPU features. + return; + } +} + +void CPUFeaturesAuditor::VisitFPDataProcessing3Source( + const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require FP. + scope.Record(CPUFeatures::kFP); + switch (instr->Mask(FPDataProcessing3SourceMask)) { + case FMADD_h: + case FMSUB_h: + case FNMADD_h: + case FNMSUB_h: + scope.Record(CPUFeatures::kFPHalf); + return; + default: + // No special CPU features. + return; + } +} + +void CPUFeaturesAuditor::VisitFPFixedPointConvert(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require FP. + scope.Record(CPUFeatures::kFP); + switch (instr->Mask(FPFixedPointConvertMask)) { + case FCVTZS_wh_fixed: + case FCVTZS_xh_fixed: + case FCVTZU_wh_fixed: + case FCVTZU_xh_fixed: + case SCVTF_hw_fixed: + case SCVTF_hx_fixed: + case UCVTF_hw_fixed: + case UCVTF_hx_fixed: + scope.Record(CPUFeatures::kFPHalf); + return; + default: + // No special CPU features. + return; + } +} + +void CPUFeaturesAuditor::VisitFPImmediate(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require FP. + scope.Record(CPUFeatures::kFP); + if (instr->Mask(FPImmediateMask) == FMOV_h_imm) { + scope.Record(CPUFeatures::kFPHalf); + } +} + +void CPUFeaturesAuditor::VisitFPIntegerConvert(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require FP. + scope.Record(CPUFeatures::kFP); + switch (instr->Mask(FPIntegerConvertMask)) { + case FCVTAS_wh: + case FCVTAS_xh: + case FCVTAU_wh: + case FCVTAU_xh: + case FCVTMS_wh: + case FCVTMS_xh: + case FCVTMU_wh: + case FCVTMU_xh: + case FCVTNS_wh: + case FCVTNS_xh: + case FCVTNU_wh: + case FCVTNU_xh: + case FCVTPS_wh: + case FCVTPS_xh: + case FCVTPU_wh: + case FCVTPU_xh: + case FCVTZS_wh: + case FCVTZS_xh: + case FCVTZU_wh: + case FCVTZU_xh: + case FMOV_hw: + case FMOV_hx: + case FMOV_wh: + case FMOV_xh: + case SCVTF_hw: + case SCVTF_hx: + case UCVTF_hw: + case UCVTF_hx: + scope.Record(CPUFeatures::kFPHalf); + return; + case FMOV_d1_x: + case FMOV_x_d1: + scope.Record(CPUFeatures::kNEON); + return; + case FJCVTZS: + scope.Record(CPUFeatures::kJSCVT); + return; + default: + // No special CPU features. + return; + } +} + +void CPUFeaturesAuditor::VisitLoadLiteral(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + switch (instr->Mask(LoadLiteralMask)) { + case LDR_s_lit: + case LDR_d_lit: + scope.RecordOneOrBothOf(CPUFeatures::kFP, CPUFeatures::kNEON); + return; + case LDR_q_lit: + scope.Record(CPUFeatures::kNEON); + return; + default: + // No special CPU features. + return; + } +} + +void CPUFeaturesAuditor::VisitLoadStoreExclusive(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + switch (instr->Mask(LoadStoreExclusiveMask)) { + case CAS_w: + case CASA_w: + case CASL_w: + case CASAL_w: + case CAS_x: + case CASA_x: + case CASL_x: + case CASAL_x: + case CASB: + case CASAB: + case CASLB: + case CASALB: + case CASH: + case CASAH: + case CASLH: + case CASALH: + case CASP_w: + case CASPA_w: + case CASPL_w: + case CASPAL_w: + case CASP_x: + case CASPA_x: + case CASPL_x: + case CASPAL_x: + scope.Record(CPUFeatures::kAtomics); + return; + case STLLRB: + case LDLARB: + case STLLRH: + case LDLARH: + case STLLR_w: + case LDLAR_w: + case STLLR_x: + case LDLAR_x: + scope.Record(CPUFeatures::kLORegions); + return; + default: + // No special CPU features. + return; + } +} + +void CPUFeaturesAuditor::VisitLoadStorePairNonTemporal( + const Instruction* instr) { + LoadStorePairHelper(instr); +} + +void CPUFeaturesAuditor::VisitLoadStorePairOffset(const Instruction* instr) { + LoadStorePairHelper(instr); +} + +void CPUFeaturesAuditor::VisitLoadStorePairPostIndex(const Instruction* instr) { + LoadStorePairHelper(instr); +} + +void CPUFeaturesAuditor::VisitLoadStorePairPreIndex(const Instruction* instr) { + LoadStorePairHelper(instr); +} + +void CPUFeaturesAuditor::VisitLoadStorePostIndex(const Instruction* instr) { + LoadStoreHelper(instr); +} + +void CPUFeaturesAuditor::VisitLoadStorePreIndex(const Instruction* instr) { + LoadStoreHelper(instr); +} + +void CPUFeaturesAuditor::VisitLoadStoreRegisterOffset( + const Instruction* instr) { + LoadStoreHelper(instr); +} + +void CPUFeaturesAuditor::VisitLoadStoreUnscaledOffset( + const Instruction* instr) { + LoadStoreHelper(instr); +} + +void CPUFeaturesAuditor::VisitLoadStoreUnsignedOffset( + const Instruction* instr) { + LoadStoreHelper(instr); +} + +void CPUFeaturesAuditor::VisitLogicalImmediate(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + USE(instr); +} + +void CPUFeaturesAuditor::VisitLogicalShifted(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + USE(instr); +} + +void CPUFeaturesAuditor::VisitMoveWideImmediate(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + USE(instr); +} + +void CPUFeaturesAuditor::VisitNEON2RegMisc(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require NEON. + scope.Record(CPUFeatures::kNEON); + switch (instr->Mask(NEON2RegMiscFPMask)) { + case NEON_FABS: + case NEON_FNEG: + case NEON_FSQRT: + case NEON_FCVTL: + case NEON_FCVTN: + case NEON_FCVTXN: + case NEON_FRINTI: + case NEON_FRINTX: + case NEON_FRINTA: + case NEON_FRINTM: + case NEON_FRINTN: + case NEON_FRINTP: + case NEON_FRINTZ: + case NEON_FCVTNS: + case NEON_FCVTNU: + case NEON_FCVTPS: + case NEON_FCVTPU: + case NEON_FCVTMS: + case NEON_FCVTMU: + case NEON_FCVTZS: + case NEON_FCVTZU: + case NEON_FCVTAS: + case NEON_FCVTAU: + case NEON_SCVTF: + case NEON_UCVTF: + case NEON_FRSQRTE: + case NEON_FRECPE: + case NEON_FCMGT_zero: + case NEON_FCMGE_zero: + case NEON_FCMEQ_zero: + case NEON_FCMLE_zero: + case NEON_FCMLT_zero: + scope.Record(CPUFeatures::kFP); + return; + case NEON_FRINT32X: + case NEON_FRINT32Z: + case NEON_FRINT64X: + case NEON_FRINT64Z: + scope.Record(CPUFeatures::kFP, CPUFeatures::kFrintToFixedSizedInt); + return; + default: + // No additional features. + return; + } +} + +void CPUFeaturesAuditor::VisitNEON2RegMiscFP16(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require NEONHalf. + scope.Record(CPUFeatures::kFP, CPUFeatures::kNEON, CPUFeatures::kNEONHalf); + USE(instr); +} + +void CPUFeaturesAuditor::VisitNEON3Different(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require NEON. + scope.Record(CPUFeatures::kNEON); + USE(instr); +} + +void CPUFeaturesAuditor::VisitNEON3Same(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require NEON. + scope.Record(CPUFeatures::kNEON); + if (instr->Mask(NEON3SameFPFMask) == NEON3SameFPFixed) { + scope.Record(CPUFeatures::kFP); + } + switch (instr->Mask(NEON3SameFHMMask)) { + case NEON_FMLAL: + case NEON_FMLAL2: + case NEON_FMLSL: + case NEON_FMLSL2: + scope.Record(CPUFeatures::kFP, CPUFeatures::kNEONHalf, CPUFeatures::kFHM); + return; + default: + // No additional features. + return; + } +} + +void CPUFeaturesAuditor::VisitNEON3SameExtra(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require NEON. + scope.Record(CPUFeatures::kNEON); + if ((instr->Mask(NEON3SameExtraFCMLAMask) == NEON_FCMLA) || + (instr->Mask(NEON3SameExtraFCADDMask) == NEON_FCADD)) { + scope.Record(CPUFeatures::kFP, CPUFeatures::kFcma); + if (instr->GetNEONSize() == 1) scope.Record(CPUFeatures::kNEONHalf); + } else { + switch (instr->Mask(NEON3SameExtraMask)) { + case NEON_SDOT: + case NEON_UDOT: + scope.Record(CPUFeatures::kDotProduct); + return; + case NEON_SQRDMLAH: + case NEON_SQRDMLSH: + scope.Record(CPUFeatures::kRDM); + return; + default: + // No additional features. + return; + } + } +} + +void CPUFeaturesAuditor::VisitNEON3SameFP16(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require NEON FP16 support. + scope.Record(CPUFeatures::kFP, CPUFeatures::kNEON, CPUFeatures::kNEONHalf); + USE(instr); +} + +void CPUFeaturesAuditor::VisitNEONAcrossLanes(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require NEON. + scope.Record(CPUFeatures::kNEON); + if (instr->Mask(NEONAcrossLanesFP16FMask) == NEONAcrossLanesFP16Fixed) { + // FMAXV_H, FMINV_H, FMAXNMV_H, FMINNMV_H + scope.Record(CPUFeatures::kFP, CPUFeatures::kNEONHalf); + } else if (instr->Mask(NEONAcrossLanesFPFMask) == NEONAcrossLanesFPFixed) { + // FMAXV, FMINV, FMAXNMV, FMINNMV + scope.Record(CPUFeatures::kFP); + } +} + +void CPUFeaturesAuditor::VisitNEONByIndexedElement(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require NEON. + scope.Record(CPUFeatures::kNEON); + switch (instr->Mask(NEONByIndexedElementMask)) { + case NEON_SDOT_byelement: + case NEON_UDOT_byelement: + scope.Record(CPUFeatures::kDotProduct); + return; + case NEON_SQRDMLAH_byelement: + case NEON_SQRDMLSH_byelement: + scope.Record(CPUFeatures::kRDM); + return; + default: + // Fall through to check other instructions. + break; + } + switch (instr->Mask(NEONByIndexedElementFPLongMask)) { + case NEON_FMLAL_H_byelement: + case NEON_FMLAL2_H_byelement: + case NEON_FMLSL_H_byelement: + case NEON_FMLSL2_H_byelement: + scope.Record(CPUFeatures::kFP, CPUFeatures::kNEONHalf, CPUFeatures::kFHM); + return; + default: + // Fall through to check other instructions. + break; + } + switch (instr->Mask(NEONByIndexedElementFPMask)) { + case NEON_FMLA_H_byelement: + case NEON_FMLS_H_byelement: + case NEON_FMUL_H_byelement: + case NEON_FMULX_H_byelement: + scope.Record(CPUFeatures::kNEONHalf); + VIXL_FALLTHROUGH(); + case NEON_FMLA_byelement: + case NEON_FMLS_byelement: + case NEON_FMUL_byelement: + case NEON_FMULX_byelement: + scope.Record(CPUFeatures::kFP); + return; + default: + switch (instr->Mask(NEONByIndexedElementFPComplexMask)) { + case NEON_FCMLA_byelement: + scope.Record(CPUFeatures::kFP, CPUFeatures::kFcma); + if (instr->GetNEONSize() == 1) scope.Record(CPUFeatures::kNEONHalf); + return; + } + // No additional features. + return; + } +} + +void CPUFeaturesAuditor::VisitNEONCopy(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require NEON. + scope.Record(CPUFeatures::kNEON); + USE(instr); +} + +void CPUFeaturesAuditor::VisitNEONExtract(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require NEON. + scope.Record(CPUFeatures::kNEON); + USE(instr); +} + +void CPUFeaturesAuditor::VisitNEONLoadStoreMultiStruct( + const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require NEON. + scope.Record(CPUFeatures::kNEON); + USE(instr); +} + +void CPUFeaturesAuditor::VisitNEONLoadStoreMultiStructPostIndex( + const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require NEON. + scope.Record(CPUFeatures::kNEON); + USE(instr); +} + +void CPUFeaturesAuditor::VisitNEONLoadStoreSingleStruct( + const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require NEON. + scope.Record(CPUFeatures::kNEON); + USE(instr); +} + +void CPUFeaturesAuditor::VisitNEONLoadStoreSingleStructPostIndex( + const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require NEON. + scope.Record(CPUFeatures::kNEON); + USE(instr); +} + +void CPUFeaturesAuditor::VisitNEONModifiedImmediate(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require NEON. + scope.Record(CPUFeatures::kNEON); + if (instr->GetNEONCmode() == 0xf) { + // FMOV (vector, immediate), double-, single- or half-precision. + scope.Record(CPUFeatures::kFP); + if (instr->ExtractBit(11)) scope.Record(CPUFeatures::kNEONHalf); + } +} + +void CPUFeaturesAuditor::VisitNEONPerm(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require NEON. + scope.Record(CPUFeatures::kNEON); + USE(instr); +} + +void CPUFeaturesAuditor::VisitNEONScalar2RegMisc(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require NEON. + scope.Record(CPUFeatures::kNEON); + switch (instr->Mask(NEONScalar2RegMiscFPMask)) { + case NEON_FRECPE_scalar: + case NEON_FRECPX_scalar: + case NEON_FRSQRTE_scalar: + case NEON_FCMGT_zero_scalar: + case NEON_FCMGE_zero_scalar: + case NEON_FCMEQ_zero_scalar: + case NEON_FCMLE_zero_scalar: + case NEON_FCMLT_zero_scalar: + case NEON_SCVTF_scalar: + case NEON_UCVTF_scalar: + case NEON_FCVTNS_scalar: + case NEON_FCVTNU_scalar: + case NEON_FCVTPS_scalar: + case NEON_FCVTPU_scalar: + case NEON_FCVTMS_scalar: + case NEON_FCVTMU_scalar: + case NEON_FCVTZS_scalar: + case NEON_FCVTZU_scalar: + case NEON_FCVTAS_scalar: + case NEON_FCVTAU_scalar: + case NEON_FCVTXN_scalar: + scope.Record(CPUFeatures::kFP); + return; + default: + // No additional features. + return; + } +} + +void CPUFeaturesAuditor::VisitNEONScalar2RegMiscFP16(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require NEONHalf. + scope.Record(CPUFeatures::kFP, CPUFeatures::kNEON, CPUFeatures::kNEONHalf); + USE(instr); +} + +void CPUFeaturesAuditor::VisitNEONScalar3Diff(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require NEON. + scope.Record(CPUFeatures::kNEON); + USE(instr); +} + +void CPUFeaturesAuditor::VisitNEONScalar3Same(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require NEON. + scope.Record(CPUFeatures::kNEON); + if (instr->Mask(NEONScalar3SameFPFMask) == NEONScalar3SameFPFixed) { + scope.Record(CPUFeatures::kFP); + } +} + +void CPUFeaturesAuditor::VisitNEONScalar3SameExtra(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require NEON and RDM. + scope.Record(CPUFeatures::kNEON, CPUFeatures::kRDM); + USE(instr); +} + +void CPUFeaturesAuditor::VisitNEONScalar3SameFP16(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require NEONHalf. + scope.Record(CPUFeatures::kFP, CPUFeatures::kNEON, CPUFeatures::kNEONHalf); + USE(instr); +} + +void CPUFeaturesAuditor::VisitNEONScalarByIndexedElement( + const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require NEON. + scope.Record(CPUFeatures::kNEON); + switch (instr->Mask(NEONScalarByIndexedElementMask)) { + case NEON_SQRDMLAH_byelement_scalar: + case NEON_SQRDMLSH_byelement_scalar: + scope.Record(CPUFeatures::kRDM); + return; + default: + switch (instr->Mask(NEONScalarByIndexedElementFPMask)) { + case NEON_FMLA_H_byelement_scalar: + case NEON_FMLS_H_byelement_scalar: + case NEON_FMUL_H_byelement_scalar: + case NEON_FMULX_H_byelement_scalar: + scope.Record(CPUFeatures::kNEONHalf); + VIXL_FALLTHROUGH(); + case NEON_FMLA_byelement_scalar: + case NEON_FMLS_byelement_scalar: + case NEON_FMUL_byelement_scalar: + case NEON_FMULX_byelement_scalar: + scope.Record(CPUFeatures::kFP); + return; + } + // No additional features. + return; + } +} + +void CPUFeaturesAuditor::VisitNEONScalarCopy(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require NEON. + scope.Record(CPUFeatures::kNEON); + USE(instr); +} + +void CPUFeaturesAuditor::VisitNEONScalarPairwise(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require NEON. + scope.Record(CPUFeatures::kNEON); + switch (instr->Mask(NEONScalarPairwiseMask)) { + case NEON_FMAXNMP_h_scalar: + case NEON_FADDP_h_scalar: + case NEON_FMAXP_h_scalar: + case NEON_FMINNMP_h_scalar: + case NEON_FMINP_h_scalar: + scope.Record(CPUFeatures::kNEONHalf); + VIXL_FALLTHROUGH(); + case NEON_FADDP_scalar: + case NEON_FMAXP_scalar: + case NEON_FMAXNMP_scalar: + case NEON_FMINP_scalar: + case NEON_FMINNMP_scalar: + scope.Record(CPUFeatures::kFP); + return; + default: + // No additional features. + return; + } +} + +void CPUFeaturesAuditor::VisitNEONScalarShiftImmediate( + const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require NEON. + scope.Record(CPUFeatures::kNEON); + switch (instr->Mask(NEONScalarShiftImmediateMask)) { + case NEON_FCVTZS_imm_scalar: + case NEON_FCVTZU_imm_scalar: + case NEON_SCVTF_imm_scalar: + case NEON_UCVTF_imm_scalar: + scope.Record(CPUFeatures::kFP); + // If immh is 0b001x then the data type is FP16, and requires kNEONHalf. + if ((instr->GetImmNEONImmh() & 0xe) == 0x2) { + scope.Record(CPUFeatures::kNEONHalf); + } + return; + default: + // No additional features. + return; + } +} + +void CPUFeaturesAuditor::VisitNEONShiftImmediate(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require NEON. + scope.Record(CPUFeatures::kNEON); + switch (instr->Mask(NEONShiftImmediateMask)) { + case NEON_SCVTF_imm: + case NEON_UCVTF_imm: + case NEON_FCVTZS_imm: + case NEON_FCVTZU_imm: + scope.Record(CPUFeatures::kFP); + // If immh is 0b001x then the data type is FP16, and requires kNEONHalf. + if ((instr->GetImmNEONImmh() & 0xe) == 0x2) { + scope.Record(CPUFeatures::kNEONHalf); + } + return; + default: + // No additional features. + return; + } +} + +void CPUFeaturesAuditor::VisitNEONTable(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + // All of these instructions require NEON. + scope.Record(CPUFeatures::kNEON); + USE(instr); +} + +void CPUFeaturesAuditor::VisitPCRelAddressing(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + USE(instr); +} + +// Most SVE visitors require only SVE. +#define VIXL_SIMPLE_SVE_VISITOR_LIST(V) \ + V(SVE32BitGatherLoad_ScalarPlus32BitUnscaledOffsets) \ + V(SVE32BitGatherLoad_VectorPlusImm) \ + V(SVE32BitGatherLoadHalfwords_ScalarPlus32BitScaledOffsets) \ + V(SVE32BitGatherLoadWords_ScalarPlus32BitScaledOffsets) \ + V(SVE32BitGatherPrefetch_ScalarPlus32BitScaledOffsets) \ + V(SVE32BitGatherPrefetch_VectorPlusImm) \ + V(SVE32BitScatterStore_ScalarPlus32BitScaledOffsets) \ + V(SVE32BitScatterStore_ScalarPlus32BitUnscaledOffsets) \ + V(SVE32BitScatterStore_VectorPlusImm) \ + V(SVE64BitGatherLoad_ScalarPlus32BitUnpackedScaledOffsets) \ + V(SVE64BitGatherLoad_ScalarPlus64BitScaledOffsets) \ + V(SVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsets) \ + V(SVE64BitGatherLoad_ScalarPlusUnpacked32BitUnscaledOffsets) \ + V(SVE64BitGatherLoad_VectorPlusImm) \ + V(SVE64BitGatherPrefetch_ScalarPlus64BitScaledOffsets) \ + V(SVE64BitGatherPrefetch_ScalarPlusUnpacked32BitScaledOffsets) \ + V(SVE64BitGatherPrefetch_VectorPlusImm) \ + V(SVE64BitScatterStore_ScalarPlus64BitScaledOffsets) \ + V(SVE64BitScatterStore_ScalarPlus64BitUnscaledOffsets) \ + V(SVE64BitScatterStore_ScalarPlusUnpacked32BitScaledOffsets) \ + V(SVE64BitScatterStore_ScalarPlusUnpacked32BitUnscaledOffsets) \ + V(SVE64BitScatterStore_VectorPlusImm) \ + V(SVEAddressGeneration) \ + V(SVEBitwiseLogicalUnpredicated) \ + V(SVEBitwiseShiftUnpredicated) \ + V(SVEFFRInitialise) \ + V(SVEFFRWriteFromPredicate) \ + V(SVEFPAccumulatingReduction) \ + V(SVEFPArithmeticUnpredicated) \ + V(SVEFPCompareVectors) \ + V(SVEFPCompareWithZero) \ + V(SVEFPComplexAddition) \ + V(SVEFPComplexMulAdd) \ + V(SVEFPComplexMulAddIndex) \ + V(SVEFPFastReduction) \ + V(SVEFPMulIndex) \ + V(SVEFPMulAdd) \ + V(SVEFPMulAddIndex) \ + V(SVEFPUnaryOpUnpredicated) \ + V(SVEIncDecByPredicateCount) \ + V(SVEIndexGeneration) \ + V(SVEIntArithmeticUnpredicated) \ + V(SVEIntCompareSignedImm) \ + V(SVEIntCompareUnsignedImm) \ + V(SVEIntCompareVectors) \ + V(SVEIntMulAddPredicated) \ + V(SVEIntMulAddUnpredicated) \ + V(SVEIntReduction) \ + V(SVEIntUnaryArithmeticPredicated) \ + V(SVEMovprfx) \ + V(SVEMulIndex) \ + V(SVEPermuteVectorExtract) \ + V(SVEPermuteVectorInterleaving) \ + V(SVEPredicateCount) \ + V(SVEPredicateLogical) \ + V(SVEPropagateBreak) \ + V(SVEStackFrameAdjustment) \ + V(SVEStackFrameSize) \ + V(SVEVectorSelect) \ + V(SVEBitwiseLogical_Predicated) \ + V(SVEBitwiseLogicalWithImm_Unpredicated) \ + V(SVEBitwiseShiftByImm_Predicated) \ + V(SVEBitwiseShiftByVector_Predicated) \ + V(SVEBitwiseShiftByWideElements_Predicated) \ + V(SVEBroadcastBitmaskImm) \ + V(SVEBroadcastFPImm_Unpredicated) \ + V(SVEBroadcastGeneralRegister) \ + V(SVEBroadcastIndexElement) \ + V(SVEBroadcastIntImm_Unpredicated) \ + V(SVECompressActiveElements) \ + V(SVEConditionallyBroadcastElementToVector) \ + V(SVEConditionallyExtractElementToSIMDFPScalar) \ + V(SVEConditionallyExtractElementToGeneralRegister) \ + V(SVEConditionallyTerminateScalars) \ + V(SVEConstructivePrefix_Unpredicated) \ + V(SVEContiguousFirstFaultLoad_ScalarPlusScalar) \ + V(SVEContiguousLoad_ScalarPlusImm) \ + V(SVEContiguousLoad_ScalarPlusScalar) \ + V(SVEContiguousNonFaultLoad_ScalarPlusImm) \ + V(SVEContiguousNonTemporalLoad_ScalarPlusImm) \ + V(SVEContiguousNonTemporalLoad_ScalarPlusScalar) \ + V(SVEContiguousNonTemporalStore_ScalarPlusImm) \ + V(SVEContiguousNonTemporalStore_ScalarPlusScalar) \ + V(SVEContiguousPrefetch_ScalarPlusImm) \ + V(SVEContiguousPrefetch_ScalarPlusScalar) \ + V(SVEContiguousStore_ScalarPlusImm) \ + V(SVEContiguousStore_ScalarPlusScalar) \ + V(SVECopySIMDFPScalarRegisterToVector_Predicated) \ + V(SVECopyFPImm_Predicated) \ + V(SVECopyGeneralRegisterToVector_Predicated) \ + V(SVECopyIntImm_Predicated) \ + V(SVEElementCount) \ + V(SVEExtractElementToSIMDFPScalarRegister) \ + V(SVEExtractElementToGeneralRegister) \ + V(SVEFPArithmetic_Predicated) \ + V(SVEFPArithmeticWithImm_Predicated) \ + V(SVEFPConvertPrecision) \ + V(SVEFPConvertToInt) \ + V(SVEFPExponentialAccelerator) \ + V(SVEFPRoundToIntegralValue) \ + V(SVEFPTrigMulAddCoefficient) \ + V(SVEFPTrigSelectCoefficient) \ + V(SVEFPUnaryOp) \ + V(SVEIncDecRegisterByElementCount) \ + V(SVEIncDecVectorByElementCount) \ + V(SVEInsertSIMDFPScalarRegister) \ + V(SVEInsertGeneralRegister) \ + V(SVEIntAddSubtractImm_Unpredicated) \ + V(SVEIntAddSubtractVectors_Predicated) \ + V(SVEIntCompareScalarCountAndLimit) \ + V(SVEIntConvertToFP) \ + V(SVEIntDivideVectors_Predicated) \ + V(SVEIntMinMaxImm_Unpredicated) \ + V(SVEIntMinMaxDifference_Predicated) \ + V(SVEIntMulImm_Unpredicated) \ + V(SVEIntMulVectors_Predicated) \ + V(SVELoadAndBroadcastElement) \ + V(SVELoadAndBroadcastQuadword_ScalarPlusImm) \ + V(SVELoadAndBroadcastQuadword_ScalarPlusScalar) \ + V(SVELoadMultipleStructures_ScalarPlusImm) \ + V(SVELoadMultipleStructures_ScalarPlusScalar) \ + V(SVELoadPredicateRegister) \ + V(SVELoadVectorRegister) \ + V(SVEPartitionBreakCondition) \ + V(SVEPermutePredicateElements) \ + V(SVEPredicateFirstActive) \ + V(SVEPredicateInitialize) \ + V(SVEPredicateNextActive) \ + V(SVEPredicateReadFromFFR_Predicated) \ + V(SVEPredicateReadFromFFR_Unpredicated) \ + V(SVEPredicateTest) \ + V(SVEPredicateZero) \ + V(SVEPropagateBreakToNextPartition) \ + V(SVEReversePredicateElements) \ + V(SVEReverseVectorElements) \ + V(SVEReverseWithinElements) \ + V(SVESaturatingIncDecRegisterByElementCount) \ + V(SVESaturatingIncDecVectorByElementCount) \ + V(SVEStoreMultipleStructures_ScalarPlusImm) \ + V(SVEStoreMultipleStructures_ScalarPlusScalar) \ + V(SVEStorePredicateRegister) \ + V(SVEStoreVectorRegister) \ + V(SVETableLookup) \ + V(SVEUnpackPredicateElements) \ + V(SVEUnpackVectorElements) \ + V(SVEVectorSplice_Destructive) + +#define VIXL_DEFINE_SIMPLE_SVE_VISITOR(NAME) \ + void CPUFeaturesAuditor::Visit##NAME(const Instruction* instr) { \ + RecordInstructionFeaturesScope scope(this); \ + scope.Record(CPUFeatures::kSVE); \ + USE(instr); \ + } +VIXL_SIMPLE_SVE_VISITOR_LIST(VIXL_DEFINE_SIMPLE_SVE_VISITOR) +#undef VIXL_DEFINE_SIMPLE_SVE_VISITOR +#undef VIXL_SIMPLE_SVE_VISITOR_LIST + +void CPUFeaturesAuditor::VisitSystem(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + if (instr->Mask(SystemHintFMask) == SystemHintFixed) { + CPUFeatures required; + switch (instr->GetInstructionBits()) { + case PACIA1716: + case PACIB1716: + case AUTIA1716: + case AUTIB1716: + case PACIAZ: + case PACIASP: + case PACIBZ: + case PACIBSP: + case AUTIAZ: + case AUTIASP: + case AUTIBZ: + case AUTIBSP: + case XPACLRI: + required.Combine(CPUFeatures::kPAuth); + break; + default: + switch (instr->GetImmHint()) { + case ESB: + required.Combine(CPUFeatures::kRAS); + break; + case BTI: + case BTI_j: + case BTI_c: + case BTI_jc: + required.Combine(CPUFeatures::kBTI); + break; + default: + break; + } + break; + } + + // These are all HINT instructions, and behave as NOPs if the corresponding + // features are not implemented, so we record the corresponding features + // only if they are available. + if (available_.Has(required)) scope.Record(required); + } else if (instr->Mask(SystemSysMask) == SYS) { + switch (instr->GetSysOp()) { + // DC instruction variants. + case CVAP: + scope.Record(CPUFeatures::kDCPoP); + break; + case CVADP: + scope.Record(CPUFeatures::kDCCVADP); + break; + case IVAU: + case CVAC: + case CVAU: + case CIVAC: + // No special CPU features. + break; + } + } else if (instr->Mask(SystemPStateFMask) == SystemPStateFixed) { + switch (instr->Mask(SystemPStateMask)) { + case CFINV: + scope.Record(CPUFeatures::kFlagM); + break; + case AXFLAG: + case XAFLAG: + scope.Record(CPUFeatures::kAXFlag); + break; + } + } else if (instr->Mask(SystemSysRegFMask) == SystemSysRegFixed) { + if (instr->Mask(SystemSysRegMask) == MRS) { + switch (instr->GetImmSystemRegister()) { + case RNDR: + case RNDRRS: + scope.Record(CPUFeatures::kRNG); + break; + } + } + } +} + +void CPUFeaturesAuditor::VisitTestBranch(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + USE(instr); +} + +void CPUFeaturesAuditor::VisitUnallocated(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + USE(instr); +} + +void CPUFeaturesAuditor::VisitUnconditionalBranch(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + USE(instr); +} + +void CPUFeaturesAuditor::VisitUnconditionalBranchToRegister( + const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + switch (instr->Mask(UnconditionalBranchToRegisterMask)) { + case BRAAZ: + case BRABZ: + case BLRAAZ: + case BLRABZ: + case RETAA: + case RETAB: + case BRAA: + case BRAB: + case BLRAA: + case BLRAB: + scope.Record(CPUFeatures::kPAuth); + return; + default: + // No additional features. + return; + } +} + +void CPUFeaturesAuditor::VisitReserved(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + USE(instr); +} + +void CPUFeaturesAuditor::VisitUnimplemented(const Instruction* instr) { + RecordInstructionFeaturesScope scope(this); + USE(instr); +} + + +} // namespace aarch64 +} // namespace vixl diff --git a/src/coreclr/jit/vixl/aarch64/cpu-features-auditor-aarch64.h b/src/coreclr/jit/vixl/aarch64/cpu-features-auditor-aarch64.h new file mode 100644 index 00000000000000..43d9069f59bc40 --- /dev/null +++ b/src/coreclr/jit/vixl/aarch64/cpu-features-auditor-aarch64.h @@ -0,0 +1,125 @@ +// Copyright 2018, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of Arm Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef VIXL_AARCH64_CPU_FEATURES_AUDITOR_AARCH64_H_ +#define VIXL_AARCH64_CPU_FEATURES_AUDITOR_AARCH64_H_ + +// #include + +#include "../cpu-features.h" +#include "decoder-aarch64.h" + +namespace vixl { +namespace aarch64 { + +// This visitor records the CPU features that each decoded instruction requires. +// It provides: +// - the set of CPU features required by the most recently decoded instruction, +// - a cumulative set of encountered CPU features, +// - an optional list of 'available' CPU features. +// +// Primarily, this allows the Disassembler and Simulator to share the same CPU +// features logic. However, it can be used standalone to scan code blocks for +// CPU features. +class CPUFeaturesAuditor : public DecoderVisitor { + public: + // Construction arguments: + // - If a decoder is specified, the CPUFeaturesAuditor automatically + // registers itself as a visitor. Otherwise, this can be done manually. + // + // - If an `available` features list is provided, it is used as a hint in + // cases where instructions may be provided by multiple separate features. + // An example of this is FP&SIMD loads and stores: some of these are used + // in both FP and integer SIMD code. If exactly one of those features is + // in `available` when one of these instructions is encountered, then the + // auditor will record that feature. Otherwise, it will record _both_ + // features. + explicit CPUFeaturesAuditor( + Decoder* decoder, const CPUFeatures& available = CPUFeatures::None()) + : available_(available), decoder_(decoder) { + if (decoder_ != NULL) decoder_->AppendVisitor(this); + } + + explicit CPUFeaturesAuditor( + const CPUFeatures& available = CPUFeatures::None()) + : available_(available), decoder_(NULL) {} + + virtual ~CPUFeaturesAuditor() { + if (decoder_ != NULL) decoder_->RemoveVisitor(this); + } + + void ResetSeenFeatures() { + seen_ = CPUFeatures::None(); + last_instruction_ = CPUFeatures::None(); + } + + // Query or set available CPUFeatures. + const CPUFeatures& GetAvailableFeatures() const { return available_; } + void SetAvailableFeatures(const CPUFeatures& available) { + available_ = available; + } + + // Query CPUFeatures seen since construction (or the last call to `Reset()`). + const CPUFeatures& GetSeenFeatures() const { return seen_; } + + // Query CPUFeatures from the last instruction visited by this auditor. + const CPUFeatures& GetInstructionFeatures() const { + return last_instruction_; + } + + bool InstructionIsAvailable() const { + return available_.Has(last_instruction_); + } + + // The common CPUFeatures interface operates on the available_ list. + CPUFeatures* GetCPUFeatures() { return &available_; } + void SetCPUFeatures(const CPUFeatures& available) { + SetAvailableFeatures(available); + } + +// Declare all Visitor functions. +#define DECLARE(A) \ + virtual void Visit##A(const Instruction* instr) VIXL_OVERRIDE; + VISITOR_LIST(DECLARE) +#undef DECLARE + + private: + class RecordInstructionFeaturesScope; + + void LoadStoreHelper(const Instruction* instr); + void LoadStorePairHelper(const Instruction* instr); + + CPUFeatures seen_; + CPUFeatures last_instruction_; + CPUFeatures available_; + + Decoder* decoder_; +}; + +} // namespace aarch64 +} // namespace vixl + +#endif // VIXL_AARCH64_CPU_FEATURES_AUDITOR_AARCH64_H_ diff --git a/src/coreclr/jit/vixl/aarch64/decoder-aarch64.cc b/src/coreclr/jit/vixl/aarch64/decoder-aarch64.cc new file mode 100644 index 00000000000000..99e77a549a61ee --- /dev/null +++ b/src/coreclr/jit/vixl/aarch64/decoder-aarch64.cc @@ -0,0 +1,535 @@ +// Copyright 2019, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include + +#include "../globals-vixl.h" +#include "../utils-vixl.h" + +#include "decoder-aarch64.h" +#include "decoder-constants-aarch64.h" + +namespace vixl { +namespace aarch64 { + +void Decoder::Decode(const Instruction* instr) { + jitstd::list::iterator it; + for (it = visitors_.begin(); it != visitors_.end(); it++) { + VIXL_ASSERT((*it)->IsConstVisitor()); + } + VIXL_ASSERT(compiled_decoder_root_ != NULL); + compiled_decoder_root_->Decode(instr); +} + +void Decoder::Decode(Instruction* instr) { + compiled_decoder_root_->Decode(const_cast(instr)); +} + +void Decoder::AddDecodeNode(const DecodeNode& node) { + // decode_nodes_.insert(std::make_pair(node.GetName(), node)); + // std::pair *p = new std::pair(node.GetName(), node); + decode_nodes_.push_back(node); +} + +DecodeNode* Decoder::GetDecodeNode(std::string name) { + // if (decode_nodes_.count(name) != 1) { + // std::string msg = "Can't find decode node " + name + ".\n"; + // VIXL_ABORT_WITH_MSG(msg.c_str()); + // } + // return &decode_nodes_[name]; + for(unsigned int i = 0; i < decode_nodes_.size(); i++) + { + if (name.compare(decode_nodes_[i].GetName()) == 0) + { + return &decode_nodes_[i]; + } + } + // std::string msg = "Can't find decode node " + name + ".\n"; + std::string msg = "Can't find decode node\n"; + VIXL_ABORT_WITH_MSG(msg.c_str()); + return nullptr; +} + +void Decoder::ConstructDecodeGraph() { + // Add all of the decoding nodes to the Decoder. + for (unsigned i = 0; i < ArrayLength(kDecodeMapping); i++) { + AddDecodeNode(DecodeNode(compiler, kDecodeMapping[i], this)); + } + + // Add the visitor function wrapping nodes to the Decoder. + for (unsigned i = 0; i < ArrayLength(kVisitorNodes); i++) { + AddDecodeNode(DecodeNode(compiler, kVisitorNodes[i], this)); + } + + // Compile the graph from the root. + compiled_decoder_root_ = GetDecodeNode("Root")->Compile(this); +} + +void Decoder::AppendVisitor(DecoderVisitor* new_visitor) { + visitors_.push_back(new_visitor); +} + + +void Decoder::PrependVisitor(DecoderVisitor* new_visitor) { + visitors_.push_front(new_visitor); +} + + +void Decoder::InsertVisitorBefore(DecoderVisitor* new_visitor, + DecoderVisitor* registered_visitor) { + jitstd::list::iterator it; + for (it = visitors_.begin(); it != visitors_.end(); it++) { + if (*it == registered_visitor) { + visitors_.insert(it, new_visitor); + return; + } + } + // We reached the end of the list. The last element must be + // registered_visitor. + VIXL_ASSERT(*it == registered_visitor); + visitors_.insert(it, new_visitor); +} + + +void Decoder::InsertVisitorAfter(DecoderVisitor* new_visitor, + DecoderVisitor* registered_visitor) { + jitstd::list::iterator it; + for (it = visitors_.begin(); it != visitors_.end(); it++) { + if (*it == registered_visitor) { + it++; + visitors_.insert(it, new_visitor); + return; + } + } + // We reached the end of the list. The last element must be + // registered_visitor. + VIXL_ASSERT(*it == registered_visitor); + visitors_.push_back(new_visitor); +} + + +void Decoder::RemoveVisitor(DecoderVisitor* visitor) { + visitors_.remove(visitor); +} + +#define DEFINE_VISITOR_CALLERS(A) \ + void Decoder::Visit##A(const Instruction* instr) { \ + VIXL_ASSERT(((A##FMask == 0) && (A##Fixed == 0)) || \ + (instr->Mask(A##FMask) == A##Fixed)); \ + jitstd::list::iterator it; \ + for (it = visitors_.begin(); it != visitors_.end(); it++) { \ + (*it)->Visit##A(instr); \ + } \ + } +VISITOR_LIST(DEFINE_VISITOR_CALLERS) +#undef DEFINE_VISITOR_CALLERS + +void DecodeNode::SetSampledBits(const uint8_t* bits, int bit_count) { + VIXL_ASSERT(!IsCompiled()); + + int i = 0; + sampled_bits_.resize(bit_count, i); + for (i = 0; i < bit_count; i++) { + sampled_bits_[i] = bits[i]; + } +} + +jitstd::vector DecodeNode::GetSampledBits() const { + return sampled_bits_; +} + +size_t DecodeNode::GetSampledBitsCount() const { return sampled_bits_.size(); } + +void DecodeNode::AddPatterns(const DecodePattern* patterns) { + VIXL_ASSERT(!IsCompiled()); + for (unsigned i = 0; i < kMaxDecodeMappings; i++) { + // Empty string indicates end of patterns. + if (patterns[i].pattern == NULL) break; + VIXL_ASSERT((strlen(patterns[i].pattern) == GetSampledBitsCount()) || + (strcmp(patterns[i].pattern, "otherwise") == 0)); + pattern_table_.push_back(patterns[i]); + } +} + +void DecodeNode::CompileNodeForBits(Decoder* decoder, + std::string name, + uint32_t bits) { + DecodeNode* n = decoder->GetDecodeNode(name); + VIXL_ASSERT(n != NULL); + if (!n->IsCompiled()) { + n->Compile(decoder); + } + VIXL_ASSERT(n->IsCompiled()); + compiled_node_->SetNodeForBits(bits, n->GetCompiledNode()); +} + +BitExtractFn DecodeNode::GetBitExtractFunction(uint32_t mask) { + // Instantiate a templated bit extraction function for every pattern we + // might encounter. If the assertion in the default clause is reached, add a + // new instantiation below using the information in the failure message. + BitExtractFn bit_extract_fn = NULL; + switch (mask) { +#define INSTANTIATE_TEMPLATE(M) \ + case M: \ + bit_extract_fn = &Instruction::ExtractBits; \ + break; + INSTANTIATE_TEMPLATE(0x000001e0); + INSTANTIATE_TEMPLATE(0x00000400); + INSTANTIATE_TEMPLATE(0x00000800); + INSTANTIATE_TEMPLATE(0x00000c00); + INSTANTIATE_TEMPLATE(0x00001000); + INSTANTIATE_TEMPLATE(0x00001800); + INSTANTIATE_TEMPLATE(0x00001c00); + INSTANTIATE_TEMPLATE(0x00004000); + INSTANTIATE_TEMPLATE(0x00008000); + INSTANTIATE_TEMPLATE(0x0000f000); + INSTANTIATE_TEMPLATE(0x0000fc00); + INSTANTIATE_TEMPLATE(0x00060010); + INSTANTIATE_TEMPLATE(0x00093e00); + INSTANTIATE_TEMPLATE(0x000c1000); + INSTANTIATE_TEMPLATE(0x00100000); + INSTANTIATE_TEMPLATE(0x00101800); + INSTANTIATE_TEMPLATE(0x00140000); + INSTANTIATE_TEMPLATE(0x00180000); + INSTANTIATE_TEMPLATE(0x00181000); + INSTANTIATE_TEMPLATE(0x00190000); + INSTANTIATE_TEMPLATE(0x00191400); + INSTANTIATE_TEMPLATE(0x001c0000); + INSTANTIATE_TEMPLATE(0x001c1800); + INSTANTIATE_TEMPLATE(0x001f0000); + INSTANTIATE_TEMPLATE(0x0020fc00); + INSTANTIATE_TEMPLATE(0x0038f000); + INSTANTIATE_TEMPLATE(0x00400000); + INSTANTIATE_TEMPLATE(0x00400010); + INSTANTIATE_TEMPLATE(0x0040f000); + INSTANTIATE_TEMPLATE(0x00500000); + INSTANTIATE_TEMPLATE(0x00800000); + INSTANTIATE_TEMPLATE(0x00800010); + INSTANTIATE_TEMPLATE(0x00801800); + INSTANTIATE_TEMPLATE(0x009f0000); + INSTANTIATE_TEMPLATE(0x00c00000); + INSTANTIATE_TEMPLATE(0x00c00010); + INSTANTIATE_TEMPLATE(0x00cf8000); + INSTANTIATE_TEMPLATE(0x00db0000); + INSTANTIATE_TEMPLATE(0x00dc0000); + INSTANTIATE_TEMPLATE(0x00e00003); + INSTANTIATE_TEMPLATE(0x00f80400); + INSTANTIATE_TEMPLATE(0x01e00000); + INSTANTIATE_TEMPLATE(0x03800000); + INSTANTIATE_TEMPLATE(0x04c0f000); + INSTANTIATE_TEMPLATE(0x10800400); + INSTANTIATE_TEMPLATE(0x1e000000); + INSTANTIATE_TEMPLATE(0x20000000); + INSTANTIATE_TEMPLATE(0x20000410); + INSTANTIATE_TEMPLATE(0x20007000); + INSTANTIATE_TEMPLATE(0x20007800); + INSTANTIATE_TEMPLATE(0x2000f000); + INSTANTIATE_TEMPLATE(0x2000f800); + INSTANTIATE_TEMPLATE(0x201e0c00); + INSTANTIATE_TEMPLATE(0x20803800); + INSTANTIATE_TEMPLATE(0x20c0cc00); + INSTANTIATE_TEMPLATE(0x20c0f000); + INSTANTIATE_TEMPLATE(0x20c0f800); + INSTANTIATE_TEMPLATE(0x20c1f000); + INSTANTIATE_TEMPLATE(0x51e00000); + INSTANTIATE_TEMPLATE(0x60007800); + INSTANTIATE_TEMPLATE(0x6000f800); + INSTANTIATE_TEMPLATE(0x601e0000); + INSTANTIATE_TEMPLATE(0x80007c00); + INSTANTIATE_TEMPLATE(0x80017c00); + INSTANTIATE_TEMPLATE(0x80408000); + INSTANTIATE_TEMPLATE(0x80a07c00); + INSTANTIATE_TEMPLATE(0x80df0000); + INSTANTIATE_TEMPLATE(0x80e08000); + INSTANTIATE_TEMPLATE(0xa0c00000); + INSTANTIATE_TEMPLATE(0xb5a00000); + INSTANTIATE_TEMPLATE(0xc0c00c00); + INSTANTIATE_TEMPLATE(0xc4400000); + INSTANTIATE_TEMPLATE(0xc4c00000); + INSTANTIATE_TEMPLATE(0xe0400000); + INSTANTIATE_TEMPLATE(0xe120e000); + INSTANTIATE_TEMPLATE(0xe3c00000); + INSTANTIATE_TEMPLATE(0xf1200000); +#undef INSTANTIATE_TEMPLATE + default: + printf("Node %s: No template instantiated for extracting 0x%08x.\n", + GetName().c_str(), + GenerateSampledBitsMask()); + printf("Add one in %s above line %d:\n", __FILE__, __LINE__); + printf(" INSTANTIATE_TEMPLATE(0x%08x);\n", GenerateSampledBitsMask()); + VIXL_UNREACHABLE(); + } + return bit_extract_fn; +} + +BitExtractFn DecodeNode::GetBitExtractFunction(uint32_t mask, uint32_t value) { + // Instantiate a templated bit extraction function for every pattern we + // might encounter. If the assertion in the following check fails, add a + // new instantiation below using the information in the failure message. + bool instantiated = false; + BitExtractFn bit_extract_fn = NULL; +#define INSTANTIATE_TEMPLATE(M, V) \ + if ((mask == M) && (value == V)) { \ + bit_extract_fn = &Instruction::IsMaskedValue; \ + instantiated = true; \ + } + INSTANTIATE_TEMPLATE(0x0000001c, 0x00000000); + INSTANTIATE_TEMPLATE(0x00000210, 0x00000000); + INSTANTIATE_TEMPLATE(0x000003c0, 0x00000000); + INSTANTIATE_TEMPLATE(0x00001c00, 0x00000000); + INSTANTIATE_TEMPLATE(0x00001c0f, 0x00000000); + INSTANTIATE_TEMPLATE(0x00003000, 0x00000000); + INSTANTIATE_TEMPLATE(0x00007800, 0x00000000); + INSTANTIATE_TEMPLATE(0x0000e000, 0x0000a000); + INSTANTIATE_TEMPLATE(0x0000f000, 0x00000000); + INSTANTIATE_TEMPLATE(0x00030400, 0x00000000); + INSTANTIATE_TEMPLATE(0x0003801f, 0x0000000d); + INSTANTIATE_TEMPLATE(0x00060210, 0x00000000); + INSTANTIATE_TEMPLATE(0x00060810, 0x00000000); + INSTANTIATE_TEMPLATE(0x00060a10, 0x00000000); + INSTANTIATE_TEMPLATE(0x00060bf0, 0x00000000); + INSTANTIATE_TEMPLATE(0x00061e10, 0x00000000); + INSTANTIATE_TEMPLATE(0x00061e10, 0x00000400); + INSTANTIATE_TEMPLATE(0x00070200, 0x00000000); + INSTANTIATE_TEMPLATE(0x000b1e10, 0x00000000); + INSTANTIATE_TEMPLATE(0x000f0000, 0x00000000); + INSTANTIATE_TEMPLATE(0x00130e1f, 0x00000000); + INSTANTIATE_TEMPLATE(0x00130fff, 0x00000000); + INSTANTIATE_TEMPLATE(0x00180000, 0x00000000); + INSTANTIATE_TEMPLATE(0x00180000, 0x00100000); + INSTANTIATE_TEMPLATE(0x001e0000, 0x00000000); + INSTANTIATE_TEMPLATE(0x001f0000, 0x00000000); + INSTANTIATE_TEMPLATE(0x001f0000, 0x001f0000); + INSTANTIATE_TEMPLATE(0x0038e000, 0x00000000); + INSTANTIATE_TEMPLATE(0x0039e000, 0x00002000); + INSTANTIATE_TEMPLATE(0x003ae000, 0x00002000); + INSTANTIATE_TEMPLATE(0x003ce000, 0x00042000); + INSTANTIATE_TEMPLATE(0x005f0000, 0x001f0000); + INSTANTIATE_TEMPLATE(0x00780000, 0x00000000); + INSTANTIATE_TEMPLATE(0x00870210, 0x00000000); + INSTANTIATE_TEMPLATE(0x00c00000, 0x00000000); + INSTANTIATE_TEMPLATE(0x00c00000, 0x00800000); + INSTANTIATE_TEMPLATE(0x00c00000, 0x00c00000); + INSTANTIATE_TEMPLATE(0x00c00010, 0x00800000); + INSTANTIATE_TEMPLATE(0x00ca1e10, 0x00000000); + INSTANTIATE_TEMPLATE(0x01000010, 0x00000000); + INSTANTIATE_TEMPLATE(0x20000800, 0x00000000); + INSTANTIATE_TEMPLATE(0x20008000, 0x00000000); + INSTANTIATE_TEMPLATE(0x20040000, 0x00000000); + INSTANTIATE_TEMPLATE(0x201e8000, 0x00000000); + INSTANTIATE_TEMPLATE(0x60000000, 0x00000000); + INSTANTIATE_TEMPLATE(0x60000000, 0x20000000); + INSTANTIATE_TEMPLATE(0x60000000, 0x60000000); + INSTANTIATE_TEMPLATE(0x60200000, 0x00000000); + INSTANTIATE_TEMPLATE(0x80008000, 0x00000000); + INSTANTIATE_TEMPLATE(0x80008000, 0x00008000); + INSTANTIATE_TEMPLATE(0x80400000, 0x00400000); + INSTANTIATE_TEMPLATE(0xa00003e0, 0x00000000); + INSTANTIATE_TEMPLATE(0xa000c007, 0x00000000); + INSTANTIATE_TEMPLATE(0xa0100000, 0x00000000); + INSTANTIATE_TEMPLATE(0xc4000000, 0xc0000000); + INSTANTIATE_TEMPLATE(0xc4000000, 0xc4000000); + INSTANTIATE_TEMPLATE(0xe0000010, 0xa0000000); + INSTANTIATE_TEMPLATE(0xe01c0000, 0x20000000); + INSTANTIATE_TEMPLATE(0xe1ff0000, 0x00000000); +#undef INSTANTIATE_TEMPLATE + + if (!instantiated) { + printf( + "Node %s: no template instantiated for mask 0x%08x, value = " + "0x%08x.\n", + GetName().c_str(), + mask, + value); + printf("Add one in %s above line %d:\n", __FILE__, __LINE__); + printf(" INSTANTIATE_TEMPLATE(0x%08x, 0x%08x);\n", mask, value); + VIXL_UNREACHABLE(); + } + return bit_extract_fn; +} + +bool DecodeNode::TryCompileOptimisedDecodeTable(Decoder* decoder) { + // EitherOr optimisation: if there are only one or two patterns in the table, + // try to optimise the node to exploit that. + size_t table_size = pattern_table_.size(); + if ((table_size <= 2) && (GetSampledBitsCount() > 1)) { + // TODO: support 'x' in this optimisation by dropping the sampled bit + // positions before making the mask/value. + if ((strchr(pattern_table_[0].pattern, 'x') == NULL) && + ((table_size == 1) || + (strcmp(pattern_table_[1].pattern, "otherwise") == 0))) { + // A pattern table consisting of a fixed pattern with no x's, and an + // "otherwise" or absent case. Optimise this into an instruction mask and + // value test. + uint32_t single_decode_mask = 0; + uint32_t single_decode_value = 0; + jitstd::vector bits = GetSampledBits(); + + // Construct the instruction mask and value from the pattern. + VIXL_ASSERT(bits.size() == strlen(pattern_table_[0].pattern)); + for (size_t i = 0; i < bits.size(); i++) { + single_decode_mask |= 1U << bits[i]; + if (pattern_table_[0].pattern[i] == '1') { + single_decode_value |= 1U << bits[i]; + } + } + BitExtractFn bit_extract_fn = + GetBitExtractFunction(single_decode_mask, single_decode_value); + + // Create a compiled node that contains a two entry table for the + // either/or cases. + CreateCompiledNode(bit_extract_fn, 2); + + // Set DecodeNode for when the instruction after masking doesn't match the + // value. + const char* doesnt_match_handler = + (table_size == 1) ? "VisitUnallocated" : pattern_table_[1].handler; + CompileNodeForBits(decoder, doesnt_match_handler, 0); + + // Set DecodeNode for when it does match. + CompileNodeForBits(decoder, pattern_table_[0].handler, 1); + + return true; + } + } + return false; +} + +CompiledDecodeNode* DecodeNode::Compile(Decoder* decoder) { + if (IsLeafNode()) { + // A leaf node is a simple wrapper around a visitor function, with no + // instruction decoding to do. + CreateVisitorNode(); + } else if (!TryCompileOptimisedDecodeTable(decoder)) { + // The "otherwise" node is the default next node if no pattern matches. + std::string otherwise = "VisitUnallocated"; + + // For each pattern in pattern_table_, create an entry in matches that + // has a corresponding mask and value for the pattern. + jitstd::vector matches(decoder->compiler->getAllocator(CMK_Codegen)); + for (size_t i = 0; i < pattern_table_.size(); i++) { + if (strcmp(pattern_table_[i].pattern, "otherwise") == 0) { + // "otherwise" must be the last pattern in the list, otherwise the + // indices won't match for pattern_table_ and matches. + VIXL_ASSERT(i == pattern_table_.size() - 1); + otherwise = pattern_table_[i].handler; + } else { + matches.push_back(GenerateMaskValuePair( + GenerateOrderedPattern(pattern_table_[i].pattern))); + } + } + + BitExtractFn bit_extract_fn = + GetBitExtractFunction(GenerateSampledBitsMask()); + + // Create a compiled node that contains a table with an entry for every bit + // pattern. + CreateCompiledNode(bit_extract_fn, 1U << GetSampledBitsCount()); + VIXL_ASSERT(compiled_node_ != NULL); + + // When we find a pattern matches the representation, set the node's decode + // function for that representation to the corresponding function. + for (uint32_t bits = 0; bits < (1U << GetSampledBitsCount()); bits++) { + for (size_t i = 0; i < matches.size(); i++) { + if ((bits & matches[i].first) == matches[i].second) { + // Only one instruction class should match for each value of bits, so + // if we get here, the node pointed to should still be unallocated. + VIXL_ASSERT(compiled_node_->GetNodeForBits(bits) == NULL); + CompileNodeForBits(decoder, pattern_table_[i].handler, bits); + break; + } + } + + // If the decode_table_ entry for these bits is still NULL, the + // instruction must be handled by the "otherwise" case, which by default + // is the Unallocated visitor. + if (compiled_node_->GetNodeForBits(bits) == NULL) { + CompileNodeForBits(decoder, otherwise, bits); + } + } + } + + VIXL_ASSERT(compiled_node_ != NULL); + return compiled_node_; +} + +void CompiledDecodeNode::Decode(const Instruction* instr) const { + if (IsLeafNode()) { + // If this node is a leaf, call the registered visitor function. + VIXL_ASSERT(decoder_ != NULL); + (decoder_->*visitor_fn_)(instr); + } else { + // Otherwise, using the sampled bit extractor for this node, look up the + // next node in the decode tree, and call its Decode method. + VIXL_ASSERT(bit_extract_fn_ != NULL); + VIXL_ASSERT((instr->*bit_extract_fn_)() < decode_table_size_); + VIXL_ASSERT(decode_table_[(instr->*bit_extract_fn_)()] != NULL); + decode_table_[(instr->*bit_extract_fn_)()]->Decode(instr); + } +} + +DecodeNode::MaskValuePair DecodeNode::GenerateMaskValuePair( + std::string pattern) const { + uint32_t mask = 0, value = 0; + for (size_t i = 0; i < pattern.size(); i++) { + mask |= ((pattern[i] == 'x') ? 0 : 1) << i; + value |= ((pattern[i] == '1') ? 1 : 0) << i; + } + return std::make_pair(mask, value); +} + +std::string DecodeNode::GenerateOrderedPattern(std::string pattern) const { + jitstd::vector sampled_bits = GetSampledBits(); + // Construct a temporary 32-character string containing '_', then at each + // sampled bit position, set the corresponding pattern character. + std::string temp("________________________________"); + for (size_t i = 0; i < sampled_bits.size(); i++) { + temp[sampled_bits[i]] = pattern[i]; + } + + // Iterate through the temporary string, filtering out the non-'_' characters + // into a new ordered pattern result string. + std::string result; + for (size_t i = 0; i < temp.size(); i++) { + if (temp[i] != '_') { + result+=temp[i]; + } + } + VIXL_ASSERT(result.size() == sampled_bits.size()); + return result; +} + +uint32_t DecodeNode::GenerateSampledBitsMask() const { + jitstd::vector sampled_bits = GetSampledBits(); + uint32_t mask = 0; + for (size_t i = 0; i < sampled_bits.size(); i++) { + mask |= 1 << sampled_bits[i]; + } + return mask; +} + +} // namespace aarch64 +} // namespace vixl diff --git a/src/coreclr/jit/vixl/aarch64/decoder-aarch64.h b/src/coreclr/jit/vixl/aarch64/decoder-aarch64.h new file mode 100644 index 00000000000000..1cd70dec7db133 --- /dev/null +++ b/src/coreclr/jit/vixl/aarch64/decoder-aarch64.h @@ -0,0 +1,695 @@ +// Copyright 2019, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef VIXL_AARCH64_DECODER_AARCH64_H_ +#define VIXL_AARCH64_DECODER_AARCH64_H_ + +#include "list.h" +// #include +#include + +#include "../globals-vixl.h" + +#include "instructions-aarch64.h" + +#include "../../jit.h" + +// List macro containing all visitors needed by the decoder class. + +#define VISITOR_LIST_THAT_RETURN(V) \ + V(AddSubExtended) \ + V(AddSubImmediate) \ + V(AddSubShifted) \ + V(AddSubWithCarry) \ + V(AtomicMemory) \ + V(Bitfield) \ + V(CompareBranch) \ + V(ConditionalBranch) \ + V(ConditionalCompareImmediate) \ + V(ConditionalCompareRegister) \ + V(ConditionalSelect) \ + V(Crypto2RegSHA) \ + V(Crypto3RegSHA) \ + V(CryptoAES) \ + V(DataProcessing1Source) \ + V(DataProcessing2Source) \ + V(DataProcessing3Source) \ + V(EvaluateIntoFlags) \ + V(Exception) \ + V(Extract) \ + V(FPCompare) \ + V(FPConditionalCompare) \ + V(FPConditionalSelect) \ + V(FPDataProcessing1Source) \ + V(FPDataProcessing2Source) \ + V(FPDataProcessing3Source) \ + V(FPFixedPointConvert) \ + V(FPImmediate) \ + V(FPIntegerConvert) \ + V(LoadLiteral) \ + V(LoadStoreExclusive) \ + V(LoadStorePAC) \ + V(LoadStorePairNonTemporal) \ + V(LoadStorePairOffset) \ + V(LoadStorePairPostIndex) \ + V(LoadStorePairPreIndex) \ + V(LoadStorePostIndex) \ + V(LoadStorePreIndex) \ + V(LoadStoreRCpcUnscaledOffset) \ + V(LoadStoreRegisterOffset) \ + V(LoadStoreUnscaledOffset) \ + V(LoadStoreUnsignedOffset) \ + V(LogicalImmediate) \ + V(LogicalShifted) \ + V(MoveWideImmediate) \ + V(NEON2RegMisc) \ + V(NEON2RegMiscFP16) \ + V(NEON3Different) \ + V(NEON3Same) \ + V(NEON3SameExtra) \ + V(NEON3SameFP16) \ + V(NEONAcrossLanes) \ + V(NEONByIndexedElement) \ + V(NEONCopy) \ + V(NEONExtract) \ + V(NEONLoadStoreMultiStruct) \ + V(NEONLoadStoreMultiStructPostIndex) \ + V(NEONLoadStoreSingleStruct) \ + V(NEONLoadStoreSingleStructPostIndex) \ + V(NEONModifiedImmediate) \ + V(NEONPerm) \ + V(NEONScalar2RegMisc) \ + V(NEONScalar2RegMiscFP16) \ + V(NEONScalar3Diff) \ + V(NEONScalar3Same) \ + V(NEONScalar3SameExtra) \ + V(NEONScalar3SameFP16) \ + V(NEONScalarByIndexedElement) \ + V(NEONScalarCopy) \ + V(NEONScalarPairwise) \ + V(NEONScalarShiftImmediate) \ + V(NEONShiftImmediate) \ + V(NEONTable) \ + V(PCRelAddressing) \ + V(RotateRightIntoFlags) \ + V(SVE32BitGatherLoad_ScalarPlus32BitUnscaledOffsets) \ + V(SVE32BitGatherLoad_VectorPlusImm) \ + V(SVE32BitGatherLoadHalfwords_ScalarPlus32BitScaledOffsets) \ + V(SVE32BitGatherLoadWords_ScalarPlus32BitScaledOffsets) \ + V(SVE32BitGatherPrefetch_ScalarPlus32BitScaledOffsets) \ + V(SVE32BitGatherPrefetch_VectorPlusImm) \ + V(SVE32BitScatterStore_ScalarPlus32BitScaledOffsets) \ + V(SVE32BitScatterStore_ScalarPlus32BitUnscaledOffsets) \ + V(SVE32BitScatterStore_VectorPlusImm) \ + V(SVE64BitGatherLoad_ScalarPlus32BitUnpackedScaledOffsets) \ + V(SVE64BitGatherLoad_ScalarPlus64BitScaledOffsets) \ + V(SVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsets) \ + V(SVE64BitGatherLoad_ScalarPlusUnpacked32BitUnscaledOffsets) \ + V(SVE64BitGatherLoad_VectorPlusImm) \ + V(SVE64BitGatherPrefetch_ScalarPlus64BitScaledOffsets) \ + V(SVE64BitGatherPrefetch_ScalarPlusUnpacked32BitScaledOffsets) \ + V(SVE64BitGatherPrefetch_VectorPlusImm) \ + V(SVE64BitScatterStore_ScalarPlus64BitScaledOffsets) \ + V(SVE64BitScatterStore_ScalarPlus64BitUnscaledOffsets) \ + V(SVE64BitScatterStore_ScalarPlusUnpacked32BitScaledOffsets) \ + V(SVE64BitScatterStore_ScalarPlusUnpacked32BitUnscaledOffsets) \ + V(SVE64BitScatterStore_VectorPlusImm) \ + V(SVEAddressGeneration) \ + V(SVEBitwiseLogicalUnpredicated) \ + V(SVEBitwiseShiftUnpredicated) \ + V(SVEFFRInitialise) \ + V(SVEFFRWriteFromPredicate) \ + V(SVEFPAccumulatingReduction) \ + V(SVEFPArithmeticUnpredicated) \ + V(SVEFPCompareVectors) \ + V(SVEFPCompareWithZero) \ + V(SVEFPComplexAddition) \ + V(SVEFPComplexMulAdd) \ + V(SVEFPComplexMulAddIndex) \ + V(SVEFPFastReduction) \ + V(SVEFPMulIndex) \ + V(SVEFPMulAdd) \ + V(SVEFPMulAddIndex) \ + V(SVEFPUnaryOpUnpredicated) \ + V(SVEIncDecByPredicateCount) \ + V(SVEIndexGeneration) \ + V(SVEIntArithmeticUnpredicated) \ + V(SVEIntCompareSignedImm) \ + V(SVEIntCompareUnsignedImm) \ + V(SVEIntCompareVectors) \ + V(SVEIntMulAddPredicated) \ + V(SVEIntMulAddUnpredicated) \ + V(SVEIntReduction) \ + V(SVEIntUnaryArithmeticPredicated) \ + V(SVEMovprfx) \ + V(SVEMulIndex) \ + V(SVEPermuteVectorExtract) \ + V(SVEPermuteVectorInterleaving) \ + V(SVEPredicateCount) \ + V(SVEPredicateLogical) \ + V(SVEPropagateBreak) \ + V(SVEStackFrameAdjustment) \ + V(SVEStackFrameSize) \ + V(SVEVectorSelect) \ + V(SVEBitwiseLogical_Predicated) \ + V(SVEBitwiseLogicalWithImm_Unpredicated) \ + V(SVEBitwiseShiftByImm_Predicated) \ + V(SVEBitwiseShiftByVector_Predicated) \ + V(SVEBitwiseShiftByWideElements_Predicated) \ + V(SVEBroadcastBitmaskImm) \ + V(SVEBroadcastFPImm_Unpredicated) \ + V(SVEBroadcastGeneralRegister) \ + V(SVEBroadcastIndexElement) \ + V(SVEBroadcastIntImm_Unpredicated) \ + V(SVECompressActiveElements) \ + V(SVEConditionallyBroadcastElementToVector) \ + V(SVEConditionallyExtractElementToSIMDFPScalar) \ + V(SVEConditionallyExtractElementToGeneralRegister) \ + V(SVEConditionallyTerminateScalars) \ + V(SVEConstructivePrefix_Unpredicated) \ + V(SVEContiguousFirstFaultLoad_ScalarPlusScalar) \ + V(SVEContiguousLoad_ScalarPlusImm) \ + V(SVEContiguousLoad_ScalarPlusScalar) \ + V(SVEContiguousNonFaultLoad_ScalarPlusImm) \ + V(SVEContiguousNonTemporalLoad_ScalarPlusImm) \ + V(SVEContiguousNonTemporalLoad_ScalarPlusScalar) \ + V(SVEContiguousNonTemporalStore_ScalarPlusImm) \ + V(SVEContiguousNonTemporalStore_ScalarPlusScalar) \ + V(SVEContiguousPrefetch_ScalarPlusImm) \ + V(SVEContiguousPrefetch_ScalarPlusScalar) \ + V(SVEContiguousStore_ScalarPlusImm) \ + V(SVEContiguousStore_ScalarPlusScalar) \ + V(SVECopySIMDFPScalarRegisterToVector_Predicated) \ + V(SVECopyFPImm_Predicated) \ + V(SVECopyGeneralRegisterToVector_Predicated) \ + V(SVECopyIntImm_Predicated) \ + V(SVEElementCount) \ + V(SVEExtractElementToSIMDFPScalarRegister) \ + V(SVEExtractElementToGeneralRegister) \ + V(SVEFPArithmetic_Predicated) \ + V(SVEFPArithmeticWithImm_Predicated) \ + V(SVEFPConvertPrecision) \ + V(SVEFPConvertToInt) \ + V(SVEFPExponentialAccelerator) \ + V(SVEFPRoundToIntegralValue) \ + V(SVEFPTrigMulAddCoefficient) \ + V(SVEFPTrigSelectCoefficient) \ + V(SVEFPUnaryOp) \ + V(SVEIncDecRegisterByElementCount) \ + V(SVEIncDecVectorByElementCount) \ + V(SVEInsertSIMDFPScalarRegister) \ + V(SVEInsertGeneralRegister) \ + V(SVEIntAddSubtractImm_Unpredicated) \ + V(SVEIntAddSubtractVectors_Predicated) \ + V(SVEIntCompareScalarCountAndLimit) \ + V(SVEIntConvertToFP) \ + V(SVEIntDivideVectors_Predicated) \ + V(SVEIntMinMaxImm_Unpredicated) \ + V(SVEIntMinMaxDifference_Predicated) \ + V(SVEIntMulImm_Unpredicated) \ + V(SVEIntMulVectors_Predicated) \ + V(SVELoadAndBroadcastElement) \ + V(SVELoadAndBroadcastQuadword_ScalarPlusImm) \ + V(SVELoadAndBroadcastQuadword_ScalarPlusScalar) \ + V(SVELoadMultipleStructures_ScalarPlusImm) \ + V(SVELoadMultipleStructures_ScalarPlusScalar) \ + V(SVELoadPredicateRegister) \ + V(SVELoadVectorRegister) \ + V(SVEPartitionBreakCondition) \ + V(SVEPermutePredicateElements) \ + V(SVEPredicateFirstActive) \ + V(SVEPredicateInitialize) \ + V(SVEPredicateNextActive) \ + V(SVEPredicateReadFromFFR_Predicated) \ + V(SVEPredicateReadFromFFR_Unpredicated) \ + V(SVEPredicateTest) \ + V(SVEPredicateZero) \ + V(SVEPropagateBreakToNextPartition) \ + V(SVEReversePredicateElements) \ + V(SVEReverseVectorElements) \ + V(SVEReverseWithinElements) \ + V(SVESaturatingIncDecRegisterByElementCount) \ + V(SVESaturatingIncDecVectorByElementCount) \ + V(SVEStoreMultipleStructures_ScalarPlusImm) \ + V(SVEStoreMultipleStructures_ScalarPlusScalar) \ + V(SVEStorePredicateRegister) \ + V(SVEStoreVectorRegister) \ + V(SVETableLookup) \ + V(SVEUnpackPredicateElements) \ + V(SVEUnpackVectorElements) \ + V(SVEVectorSplice_Destructive) \ + V(System) \ + V(TestBranch) \ + V(Unallocated) \ + V(UnconditionalBranch) \ + V(UnconditionalBranchToRegister) \ + V(Unimplemented) + +#define VISITOR_LIST_THAT_DONT_RETURN(V) V(Reserved) + +#define VISITOR_LIST(V) \ + VISITOR_LIST_THAT_RETURN(V) \ + VISITOR_LIST_THAT_DONT_RETURN(V) + +namespace vixl { +namespace aarch64 { + +// The Visitor interface. Disassembler and simulator (and other tools) +// must provide implementations for all of these functions. +// +// Note that this class must change in breaking ways with even minor additions +// to VIXL, and so its API should be considered unstable. User classes that +// inherit from this one should be expected to break even on minor version +// updates. If this is a problem, consider using DecoderVisitorWithDefaults +// instead. +class DecoderVisitor { + public: + enum VisitorConstness { kConstVisitor, kNonConstVisitor }; + explicit DecoderVisitor(VisitorConstness constness = kConstVisitor) + : constness_(constness) {} + + virtual ~DecoderVisitor() {} + +#define DECLARE(A) virtual void Visit##A(const Instruction* instr) = 0; + VISITOR_LIST(DECLARE) +#undef DECLARE + + bool IsConstVisitor() const { return constness_ == kConstVisitor; } + Instruction* MutableInstruction(const Instruction* instr) { + VIXL_ASSERT(!IsConstVisitor()); + return const_cast(instr); + } + + private: + const VisitorConstness constness_; +}; + +// As above, but a default (no-op) implementation for each visitor is provided. +// This is useful for derived class that only care about specific visitors. +// +// A minor version update may add a visitor, but will never remove one, so it is +// safe (and recommended) to use `override` in derived classes. +class DecoderVisitorWithDefaults : public DecoderVisitor { + public: + explicit DecoderVisitorWithDefaults( + VisitorConstness constness = kConstVisitor) + : DecoderVisitor(constness) {} + + virtual ~DecoderVisitorWithDefaults() {} + +#define DECLARE(A) \ + virtual void Visit##A(const Instruction* instr) VIXL_OVERRIDE { USE(instr); } + VISITOR_LIST(DECLARE) +#undef DECLARE +}; + +class DecodeNode; +class CompiledDecodeNode; + +// The instruction decoder is constructed from a graph of decode nodes. At each +// node, a number of bits are sampled from the instruction being decoded. The +// resulting value is used to look up the next node in the graph, which then +// samples other bits, and moves to other decode nodes. Eventually, a visitor +// node is reached, and the corresponding visitor function is called, which +// handles the instruction. +class Decoder { + public: + Decoder(Compiler* _compiler) : + compiler(_compiler), + visitors_(_compiler->getAllocator(CMK_Codegen)), + decode_nodes_(_compiler->getAllocator(CMK_Codegen)) + { ConstructDecodeGraph(); } + + // Top-level wrappers around the actual decoding function. + void Decode(const Instruction* instr); + void Decode(Instruction* instr); + + // Decode all instructions from start (inclusive) to end (exclusive). + template + void Decode(T start, T end) { + for (T instr = start; instr < end; instr = instr->GetNextInstruction()) { + Decode(instr); + } + } + + // Register a new visitor class with the decoder. + // Decode() will call the corresponding visitor method from all registered + // visitor classes when decoding reaches the leaf node of the instruction + // decode tree. + // Visitors are called in order. + // A visitor can be registered multiple times. + // + // d.AppendVisitor(V1); + // d.AppendVisitor(V2); + // d.PrependVisitor(V2); + // d.AppendVisitor(V3); + // + // d.Decode(i); + // + // will call in order visitor methods in V2, V1, V2, V3. + void AppendVisitor(DecoderVisitor* visitor); + void PrependVisitor(DecoderVisitor* visitor); + // These helpers register `new_visitor` before or after the first instance of + // `registered_visiter` in the list. + // So if + // V1, V2, V1, V2 + // are registered in this order in the decoder, calls to + // d.InsertVisitorAfter(V3, V1); + // d.InsertVisitorBefore(V4, V2); + // will yield the order + // V1, V3, V4, V2, V1, V2 + // + // For more complex modifications of the order of registered visitors, one can + // directly access and modify the list of visitors via the `visitors()' + // accessor. + void InsertVisitorBefore(DecoderVisitor* new_visitor, + DecoderVisitor* registered_visitor); + void InsertVisitorAfter(DecoderVisitor* new_visitor, + DecoderVisitor* registered_visitor); + + // Remove all instances of a previously registered visitor class from the list + // of visitors stored by the decoder. + void RemoveVisitor(DecoderVisitor* visitor); + +#define DECLARE(A) void Visit##A(const Instruction* instr); + VISITOR_LIST(DECLARE) +#undef DECLARE + + jitstd::list* visitors() { return &visitors_; } + + // Get a DecodeNode by name from the Decoder's map. + DecodeNode* GetDecodeNode(std::string name); + + Compiler* compiler; + + private: + // Decodes an instruction and calls the visitor functions registered with the + // Decoder class. + void DecodeInstruction(const Instruction* instr); + + // Add an initialised DecodeNode to the decode_node_ map. + void AddDecodeNode(const DecodeNode& node); + + // Visitors are registered in a list. + jitstd::list visitors_; + + // Compile the dynamically generated decode graph based on the static + // information in kDecodeMapping and kVisitorNodes. + void ConstructDecodeGraph(); + + // Root node for the compiled decoder graph, stored here to avoid a map lookup + // for every instruction decoded. + CompiledDecodeNode* compiled_decoder_root_; + + // Map of node names to DecodeNodes. + // std::map decode_nodes_; + jitstd::vector decode_nodes_; +}; + +const int kMaxDecodeSampledBits = 16; +const int kMaxDecodeMappings = 100; +typedef void (Decoder::*DecodeFnPtr)(const Instruction*); +typedef uint32_t (Instruction::*BitExtractFn)(void) const; + +// A Visitor node maps the name of a visitor to the function that handles it. +struct VisitorNode { + const char* name; + const DecodeFnPtr visitor_fn; +}; + +// DecodePattern and DecodeMapping represent the input data to the decoder +// compilation stage. After compilation, the decoder is embodied in the graph +// of CompiledDecodeNodes pointer to by compiled_decoder_root_. + +// A DecodePattern maps a pattern of set/unset/don't care (1, 0, x) bits as a +// string to the name of its handler. +struct DecodePattern { + const char* pattern; + const char* handler; +}; + +// A DecodeMapping consists of the name of a handler, the bits sampled in the +// instruction by that handler, and a mapping from the pattern that those +// sampled bits match to the corresponding name of a node. +struct DecodeMapping { + const char* name; + const uint8_t sampled_bits[kMaxDecodeSampledBits]; + const DecodePattern mapping[kMaxDecodeMappings]; +}; + +// For speed, before nodes can be used for decoding instructions, they must +// be compiled. This converts the mapping "bit pattern strings to decoder name +// string" stored in DecodeNodes to an array look up for the pointer to the next +// node, stored in CompiledDecodeNodes. Compilation may also apply other +// optimisations for simple decode patterns. +class CompiledDecodeNode { + public: + // Constructor for decode node, containing a decode table and pointer to a + // function that extracts the bits to be sampled. + CompiledDecodeNode(BitExtractFn bit_extract_fn, size_t decode_table_size) + : bit_extract_fn_(bit_extract_fn), + visitor_fn_(NULL), + decode_table_size_(decode_table_size), + decoder_(NULL) { + decode_table_ = new CompiledDecodeNode*[decode_table_size_]; + memset(decode_table_, 0, decode_table_size_ * sizeof(decode_table_[0])); + } + + // Constructor for wrappers around visitor functions. These require no + // decoding, so no bit extraction function or decode table is assigned. + explicit CompiledDecodeNode(DecodeFnPtr visitor_fn, Decoder* decoder) + : bit_extract_fn_(NULL), + visitor_fn_(visitor_fn), + decode_table_(NULL), + decode_table_size_(0), + decoder_(decoder) {} + + ~CompiledDecodeNode() VIXL_NEGATIVE_TESTING_ALLOW_EXCEPTION { + // Free the decode table, if this is a compiled, non-leaf node. + if (decode_table_ != NULL) { + VIXL_ASSERT(!IsLeafNode()); + delete[] decode_table_; + } + } + + // Decode the instruction by either sampling the bits using the bit extract + // function to find the next node, or, if we're at a leaf, calling the visitor + // function. + void Decode(const Instruction* instr) const; + + // A leaf node is a wrapper for a visitor function. + bool IsLeafNode() const { + VIXL_ASSERT(((visitor_fn_ == NULL) && (bit_extract_fn_ != NULL)) || + ((visitor_fn_ != NULL) && (bit_extract_fn_ == NULL))); + return visitor_fn_ != NULL; + } + + // Get a pointer to the next node required in the decode process, based on the + // bits sampled by the current node. + CompiledDecodeNode* GetNodeForBits(uint32_t bits) const { + VIXL_ASSERT(bits < decode_table_size_); + return decode_table_[bits]; + } + + // Set the next node in the decode process for the pattern of sampled bits in + // the current node. + void SetNodeForBits(uint32_t bits, CompiledDecodeNode* n) { + VIXL_ASSERT(bits < decode_table_size_); + VIXL_ASSERT(n != NULL); + decode_table_[bits] = n; + } + + private: + // Pointer to an instantiated template function for extracting the bits + // sampled by this node. Set to NULL for leaf nodes. + const BitExtractFn bit_extract_fn_; + + // Visitor function that handles the instruction identified. Set only for + // leaf nodes, where no extra decoding is required, otherwise NULL. + const DecodeFnPtr visitor_fn_; + + // Mapping table from instruction bits to next decode stage. + CompiledDecodeNode** decode_table_; + const size_t decode_table_size_; + + // Pointer to the decoder containing this node, used to call its visitor + // function for leaf nodes. Set to NULL for non-leaf nodes. + Decoder* decoder_; +}; + +class DecodeNode { + public: + // Default constructor needed for map initialisation. + DecodeNode(Compiler* compiler) + : sampled_bits_(compiler->getAllocator(CMK_Codegen)), + pattern_table_(compiler->getAllocator(CMK_Codegen)), + compiled_node_(NULL) {} + + // Constructor for DecodeNode wrappers around visitor functions. These are + // marked as "compiled", as there is no decoding left to do. + explicit DecodeNode(Compiler* compiler, const VisitorNode& visitor, Decoder* decoder) + : name_(visitor.name), + sampled_bits_(compiler->getAllocator(CMK_Codegen)), + visitor_fn_(visitor.visitor_fn), + pattern_table_(compiler->getAllocator(CMK_Codegen)), + decoder_(decoder), + compiled_node_(NULL) {} + + // Constructor for DecodeNodes that map bit patterns to other DecodeNodes. + explicit DecodeNode(Compiler* compiler, const DecodeMapping& map, Decoder* decoder = NULL) + : name_(map.name), + sampled_bits_(compiler->getAllocator(CMK_Codegen)), + visitor_fn_(NULL), + pattern_table_(compiler->getAllocator(CMK_Codegen)), + decoder_(decoder), + compiled_node_(NULL) { + // The length of the bit string in the first mapping determines the number + // of sampled bits. When adding patterns later, we assert that all mappings + // sample the same number of bits. + VIXL_CHECK(strcmp(map.mapping[0].pattern, "otherwise") != 0); + int bit_count = static_cast(strlen(map.mapping[0].pattern)); + VIXL_CHECK((bit_count > 0) && (bit_count <= 32)); + SetSampledBits(map.sampled_bits, bit_count); + AddPatterns(map.mapping); + } + + ~DecodeNode() { + // Delete the compiled version of this node, if one was created. + if (compiled_node_ != NULL) { + delete compiled_node_; + } + } + + // Set the bits sampled from the instruction by this node. + void SetSampledBits(const uint8_t* bits, int bit_count); + + // Get the bits sampled from the instruction by this node. + jitstd::vector GetSampledBits() const; + + // Get the number of bits sampled from the instruction by this node. + size_t GetSampledBitsCount() const; + + // Add patterns to this node's internal pattern table. + void AddPatterns(const DecodePattern* patterns); + + // A leaf node is a DecodeNode that wraps the visitor function for the + // identified instruction class. + bool IsLeafNode() const { return visitor_fn_ != NULL; } + + std::string GetName() const { return name_; } + + // Create a CompiledDecodeNode of specified table size that uses + // bit_extract_fn to sample bits from the instruction. + void CreateCompiledNode(BitExtractFn bit_extract_fn, size_t table_size) { + VIXL_ASSERT(bit_extract_fn != NULL); + VIXL_ASSERT(table_size > 0); + compiled_node_ = new CompiledDecodeNode(bit_extract_fn, table_size); + } + + // Create a CompiledDecodeNode wrapping a visitor function. No decoding is + // required for this node; the visitor function is called instead. + void CreateVisitorNode() { + compiled_node_ = new CompiledDecodeNode(visitor_fn_, decoder_); + } + + // Find and compile the DecodeNode named "name", and set it as the node for + // the pattern "bits". + void CompileNodeForBits(Decoder* decoder, std::string name, uint32_t bits); + + // Get a pointer to an instruction method that extracts the instruction bits + // specified by the mask argument, and returns those sampled bits as a + // contiguous sequence, suitable for indexing an array. + // For example, a mask of 0b1010 returns a function that, given an instruction + // 0bXYZW, will return 0bXZ. + BitExtractFn GetBitExtractFunction(uint32_t mask); + + // Get a pointer to an Instruction method that applies a mask to the + // instruction bits, and tests if the result is equal to value. The returned + // function gives a 1 result if (inst & mask == value), 0 otherwise. + BitExtractFn GetBitExtractFunction(uint32_t mask, uint32_t value); + + // Compile this DecodeNode into a new CompiledDecodeNode and returns a pointer + // to it. This pointer is also stored inside the DecodeNode itself. Destroying + // a DecodeNode frees its associated CompiledDecodeNode. + CompiledDecodeNode* Compile(Decoder* decoder); + + // Get a pointer to the CompiledDecodeNode associated with this DecodeNode. + // Returns NULL if the node has not been compiled yet. + CompiledDecodeNode* GetCompiledNode() const { return compiled_node_; } + bool IsCompiled() const { return GetCompiledNode() != NULL; } + + private: + // Generate a mask and value pair from a string constructed from 0, 1 and x + // (don't care) characters. + // For example "10x1" should return mask = 0b1101, value = 0b1001. + typedef std::pair MaskValuePair; + MaskValuePair GenerateMaskValuePair(std::string pattern) const; + + // Generate a pattern string ordered by the bit positions sampled by this + // node. The first character in the string corresponds to the lowest sampled + // bit. + // For example, a pattern of "1x0" expected when sampling bits 31, 1 and 30 + // returns the pattern "x01"; bit 1 should be 'x', bit 30 '0' and bit 31 '1'. + // This output makes comparisons easier between the pattern and bits sampled + // from an instruction using the fast "compress" algorithm. See + // Instruction::Compress(). + std::string GenerateOrderedPattern(std::string pattern) const; + + // Generate a mask with a bit set at each sample position. + uint32_t GenerateSampledBitsMask() const; + + // Try to compile a more optimised decode operation for this node, returning + // true if successful. + bool TryCompileOptimisedDecodeTable(Decoder* decoder); + + // Name of this decoder node, used to construct edges in the decode graph. + std::string name_; + + // Vector of bits sampled from an instruction to determine which node to look + // up next in the decode process. + jitstd::vector sampled_bits_; + + // Visitor function that handles the instruction identified. Set only for leaf + // nodes, where no extra decoding is required. For non-leaf decoding nodes, + // this pointer is NULL. + DecodeFnPtr visitor_fn_; + + // Source mapping from bit pattern to name of next decode stage. + jitstd::vector pattern_table_; + + // Pointer to the decoder containing this node, used to call its visitor + // function for leaf nodes. + Decoder* decoder_; + + // Pointer to the compiled version of this node. Is this node hasn't been + // compiled yet, this pointer is NULL. + CompiledDecodeNode* compiled_node_; +}; + +} // namespace aarch64 +} // namespace vixl + +#endif // VIXL_AARCH64_DECODER_AARCH64_H_ diff --git a/src/coreclr/jit/vixl/aarch64/decoder-constants-aarch64.h b/src/coreclr/jit/vixl/aarch64/decoder-constants-aarch64.h new file mode 100644 index 00000000000000..53f283bb7a2e91 --- /dev/null +++ b/src/coreclr/jit/vixl/aarch64/decoder-constants-aarch64.h @@ -0,0 +1,2138 @@ +// Copyright 2019, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +namespace vixl { +namespace aarch64 { + +// This decode table is derived from the AArch64 ISA XML specification, +// available from https://developer.arm.com/products/architecture/a-profile/ +// +// The data below are based on the "Index by Encoding" tables, reformatted into +// structures of C++ strings, suitable for processing into an instruction +// decoding tree. + +// clang-format off +static const DecodeMapping kDecodeMapping[] = { + { "Root", + {28, 27, 26, 25}, + { {"0000", "DecodeReserved"}, + {"0010", "DecodeSVE"}, + {"100x", "DecodeDataProcessingImmediate"}, + {"101x", "DecodeBranchesExceptionAndSystem"}, + {"x1x0", "DecodeLoadsAndStores"}, + {"x101", "DecodeDataProcessingRegister"}, + {"x111", "DecodeDataProcessingFPAndNEON"}, + }, + }, + + { "DecodeReserved", + {31, 30, 29, 24, 23, 22, 21, 20, 19, 18, 17, 16}, + { {"000000000000", "VisitReserved"}, + {"otherwise", "VisitUnallocated"}, + }, + }, + + { "DecodeDataProcessingImmediate", + {25, 24, 23}, + { {"00x", "VisitPCRelAddressing"}, + {"01x", "UnallocAddSubImmediate"}, + {"100", "UnallocLogicalImmediate"}, + {"101", "UnallocMoveWideImmediate"}, + {"110", "UnallocBitfield"}, + {"111", "UnallocExtract"}, + }, + }, + + { "DecodeBranchesExceptionAndSystem", + {31, 30, 29, 25, 24, 23, 22}, + { {"0100xxx", "UnallocConditionalBranch"}, + {"11000xx", "UnallocException"}, + {"1100100", "UnallocSystem"}, + {"1101xxx", "UnallocUnconditionalBranchToRegister"}, + {"x00xxxx", "VisitUnconditionalBranch"}, + {"x010xxx", "VisitCompareBranch"}, + {"x011xxx", "VisitTestBranch"}, + }, + }, + + { "DecodeLoadsAndStores", + {31, 29, 28, 26, 24, 23, 21}, + { {"x0000xx", "UnallocLoadStoreExclusive"}, + {"x01x0xx", "UnallocLoadLiteral"}, + {"x0101x0", "UnallocLoadStoreRCpcUnscaledOffset"}, + {"x10x00x", "UnallocLoadStorePairNonTemporal"}, + {"x10x01x", "UnallocLoadStorePairPostIndex"}, + {"x10x10x", "UnallocLoadStorePairOffset"}, + {"x10x11x", "UnallocLoadStorePairPreIndex"}, + {"0001000", "DecodeNEONLoadStoreMulti"}, + {"0001010", "UnallocNEONLoadStoreMultiStructPostIndex"}, + {"000110x", "DecodeNEONLoadStoreSingle"}, + {"000111x", "UnallocNEONLoadStoreSingleStructPostIndex"}, + {"x11x0x0", "DecodeLoadStore"}, + {"x11x0x1", "DecodeLoadStoreRegister"}, + {"x11x1xx", "UnallocLoadStoreUnsignedOffset"}, + }, + }, + + { "DecodeDataProcessingRegister", + {30, 28, 24, 23, 22, 21}, + { {"010110", "UnallocDataProcessing2Source"}, + {"110110", "UnallocDataProcessing1Source"}, + {"x00xxx", "UnallocLogicalShifted"}, + {"x01xx0", "UnallocAddSubShifted"}, + {"x01xx1", "UnallocAddSubExtended"}, + {"x10000", "UnallocAddSubWithCarry"}, + {"x10010", "DecodeCondCmp"}, + {"x10100", "UnallocConditionalSelect"}, + {"x11xxx", "UnallocDataProcessing3Source"}, + }, + }, + + { "DecodeDataProcessingFPAndNEON", + {31, 30, 29, 28, 24, 21}, + { {"0xx000", "DecodeNEONOther"}, + {"0xx001", "DecodeNEON3Op"}, + {"0xx01x", "DecodeNEONImmAndIndex"}, + {"01x100", "DecodeNEONScalarAnd3SHA"}, + {"01x101", "DecodeNEONScalarAnd2SHA"}, + {"01x11x", "DecodeNEONScalar"}, + {"x0x100", "UnallocFPFixedPointConvert"}, + {"x0x101", "DecodeFP"}, + {"x0x11x", "UnallocFPDataProcessing3Source"}, + }, + }, + + { "DecodeSVE", + {31, 30, 29, 24, 21, 15, 14, 13}, + { {"00000x1x", "VisitSVEIntMulAddPredicated"}, + {"00000000", "DecodeSVE00000000"}, + {"00000001", "DecodeSVE00000001"}, + {"00000100", "DecodeSVE00000100"}, + {"00000101", "VisitSVEIntUnaryArithmeticPredicated"}, + {"00001000", "VisitSVEIntArithmeticUnpredicated"}, + {"00001001", "VisitSVEBitwiseLogicalUnpredicated"}, + {"00001010", "DecodeSVE00001010"}, + {"00001100", "VisitSVEBitwiseShiftUnpredicated"}, + {"00001101", "DecodeSVE00001101"}, + {"00001110", "DecodeSVE00001110"}, + {"00001111", "DecodeSVE00001111"}, + {"000100xx", "DecodeSVE000100xx"}, + {"0001010x", "DecodeSVE0001010x"}, + {"00010110", "DecodeSVE00010110"}, + {"00010111", "DecodeSVE00010111"}, + {"00011000", "VisitSVEPermuteVectorExtract"}, + {"00011001", "DecodeSVE00011001"}, + {"00011010", "DecodeSVE00011010"}, + {"00011011", "VisitSVEPermuteVectorInterleaving"}, + {"00011100", "DecodeSVE00011100"}, + {"00011101", "DecodeSVE00011101"}, + {"0001111x", "VisitSVEVectorSelect"}, + {"00100xxx", "VisitSVEIntCompareVectors"}, + {"00101xxx", "VisitSVEIntCompareUnsignedImm"}, + {"00110x0x", "VisitSVEIntCompareSignedImm"}, + {"0011001x", "DecodeSVE0011001x"}, + {"00110110", "DecodeSVE00110110"}, + {"00110111", "DecodeSVE00110111"}, + {"00111000", "VisitSVEIntCompareScalarCountAndLimit"}, + {"00111001", "UnallocSVEConditionallyTerminateScalars"}, + {"00111100", "DecodeSVE00111100"}, + {"00111101", "UnallocSVEPredicateCount"}, + {"0011111x", "DecodeSVE0011111x"}, + {"010000xx", "VisitSVEIntMulAddUnpredicated"}, + {"01001xxx", "VisitSVEMulIndex"}, + {"011000xx", "VisitSVEFPComplexMulAdd"}, + {"01100100", "UnallocSVEFPComplexAddition"}, + {"01101000", "DecodeSVE01101000"}, + {"01101001", "UnallocSVEFPMulIndex"}, + {"01110x1x", "VisitSVEFPCompareVectors"}, + {"01110000", "VisitSVEFPArithmeticUnpredicated"}, + {"01110001", "DecodeSVE01110001"}, + {"01110100", "DecodeSVE01110100"}, + {"01110101", "DecodeSVE01110101"}, + {"01111xxx", "VisitSVEFPMulAdd"}, + {"100x010x", "UnallocSVELoadAndBroadcastElement"}, + {"100x0110", "DecodeSVE100x0110"}, + {"100x0111", "DecodeSVE100x0111"}, + {"100x11xx", "DecodeSVE100x11xx"}, + {"100000xx", "VisitSVE32BitGatherLoad_ScalarPlus32BitUnscaledOffsets"}, + {"100010xx", "DecodeSVE100010xx"}, + {"100100x1", "DecodeSVE100100x1"}, + {"10010000", "DecodeSVE10010000"}, + {"10010010", "DecodeSVE10010010"}, + {"100110x1", "DecodeSVE100110x1"}, + {"10011000", "DecodeSVE10011000"}, + {"10011010", "DecodeSVE10011010"}, + {"101xx000", "VisitSVELoadAndBroadcastQuadword_ScalarPlusScalar"}, + {"101xx001", "UnallocSVELoadAndBroadcastQuadword_ScalarPlusImm"}, + {"101xx010", "VisitSVEContiguousLoad_ScalarPlusScalar"}, + {"101xx011", "VisitSVEContiguousFirstFaultLoad_ScalarPlusScalar"}, + {"101xx101", "DecodeSVE101xx101"}, + {"101x0110", "DecodeSVE101x0110"}, + {"101x0111", "DecodeSVE101x0111"}, + {"101x1110", "VisitSVELoadMultipleStructures_ScalarPlusScalar"}, + {"101x1111", "DecodeSVE101x1111"}, + {"110x00xx", "VisitSVE64BitGatherLoad_ScalarPlusUnpacked32BitUnscaledOffsets"}, + {"110x0111", "DecodeSVE110x0111"}, + {"1100010x", "UnallocSVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsets"}, + {"11000110", "UnallocSVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsets"}, + {"110010xx", "DecodeSVE110010xx"}, + {"110011xx", "DecodeSVE110011xx"}, + {"1101010x", "UnallocSVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsets"}, + {"11010110", "UnallocSVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsets"}, + {"110110xx", "VisitSVE64BitGatherLoad_ScalarPlus32BitUnpackedScaledOffsets"}, + {"110111xx", "DecodeSVE110111xx"}, + {"111x0011", "DecodeSVE111x0011"}, + {"111x01x0", "DecodeSVE111x01x0"}, + {"111x0101", "DecodeSVE111x0101"}, + {"111x0111", "DecodeSVE111x0111"}, + {"111x1011", "VisitSVEStoreMultipleStructures_ScalarPlusScalar"}, + {"111x11x0", "DecodeSVE111x11x0"}, + {"111x1101", "DecodeSVE111x1101"}, + {"111x1111", "DecodeSVE111x1111"}, + {"1110x010", "VisitSVEContiguousStore_ScalarPlusScalar"}, + {"1111x000", "UnallocSVEStorePredicateRegister"}, + {"1111x010", "DecodeSVE1111x010"}, + }, + }, + + { "DecodeSVE00000000", + {20, 19, 18}, + { {"00x", "VisitSVEIntAddSubtractVectors_Predicated"}, + {"01x", "VisitSVEIntMinMaxDifference_Predicated"}, + {"100", "VisitSVEIntMulVectors_Predicated"}, + {"101", "VisitSVEIntDivideVectors_Predicated"}, + {"11x", "VisitSVEBitwiseLogical_Predicated"}, + }, + }, + + { "DecodeSVE00000100", + {20, 19}, + { {"0x", "VisitSVEBitwiseShiftByImm_Predicated"}, + {"10", "VisitSVEBitwiseShiftByVector_Predicated"}, + {"11", "VisitSVEBitwiseShiftByWideElements_Predicated"}, + }, + }, + + { "DecodeSVE00001010", + {23, 12, 11}, + { {"x0x", "VisitSVEIndexGeneration"}, + {"010", "VisitSVEStackFrameAdjustment"}, + {"110", "UnallocSVEStackFrameSize"}, + }, + }, + + { "UnallocSVEStackFrameSize", + {22, 20, 19, 18, 17, 16}, + { {"011111", "VisitSVEStackFrameSize"}, + }, + }, + + { "DecodeSVE00001101", + {12, 11, 10}, + { {"0xx", "VisitSVEAddressGeneration"}, + {"10x", "VisitSVEFPTrigSelectCoefficient"}, + {"110", "VisitSVEFPExponentialAccelerator"}, + {"111", "VisitSVEConstructivePrefix_Unpredicated"}, + }, + }, + + { "DecodeSVE00001110", + {20, 12, 11}, + { {"00x", "VisitSVESaturatingIncDecVectorByElementCount"}, + {"100", "VisitSVEIncDecVectorByElementCount"}, + }, + }, + + { "DecodeSVE00001111", + {20, 12, 11}, + { {"x1x", "VisitSVESaturatingIncDecRegisterByElementCount"}, + {"000", "VisitSVEElementCount"}, + {"100", "VisitSVEIncDecRegisterByElementCount"}, + }, + }, + + { "DecodeSVE000100xx", + {23, 22, 20, 19, 18}, + { {"xx1xx", "VisitSVECopyIntImm_Predicated"}, + {"0x000", "VisitSVEBitwiseLogicalWithImm_Unpredicated"}, + {"10000", "VisitSVEBitwiseLogicalWithImm_Unpredicated"}, + {"11000", "VisitSVEBroadcastBitmaskImm"}, + }, + }, + + { "DecodeSVE0001010x", + {23, 22, 20, 19, 18}, + { {"0x000", "VisitSVEBitwiseLogicalWithImm_Unpredicated"}, + {"10000", "VisitSVEBitwiseLogicalWithImm_Unpredicated"}, + {"11000", "VisitSVEBroadcastBitmaskImm"}, + }, + }, + + { "DecodeSVE00010110", + {23, 22, 20, 19, 18}, + { {"xx1xx", "VisitSVECopyFPImm_Predicated"}, + {"0x000", "VisitSVEBitwiseLogicalWithImm_Unpredicated"}, + {"10000", "VisitSVEBitwiseLogicalWithImm_Unpredicated"}, + {"11000", "VisitSVEBroadcastBitmaskImm"}, + }, + }, + + { "DecodeSVE00010111", + {23, 22, 20, 19, 18}, + { {"0x000", "VisitSVEBitwiseLogicalWithImm_Unpredicated"}, + {"10000", "VisitSVEBitwiseLogicalWithImm_Unpredicated"}, + {"11000", "VisitSVEBroadcastBitmaskImm"}, + }, + }, + + { "UnallocSVEBroadcastIndexElement", + {10}, + { {"0", "VisitSVEBroadcastIndexElement"}, + }, + }, + + { "UnallocSVETableLookup", + {10}, + { {"0", "VisitSVETableLookup"}, + }, + }, + + { "UnallocSVEBroadcastGeneralRegister", + {17, 16, 10}, + { {"000", "VisitSVEBroadcastGeneralRegister"}, + }, + }, + + { "UnallocSVEInsertGeneralRegister", + {17, 16, 10}, + { {"000", "VisitSVEInsertGeneralRegister"}, + }, + }, + + { "UnallocSVEUnpackVectorElements", + {10}, + { {"0", "VisitSVEUnpackVectorElements"}, + }, + }, + + { "UnallocSVEInsertSIMDFPScalarRegister", + {17, 16, 10}, + { {"000", "VisitSVEInsertSIMDFPScalarRegister"}, + }, + }, + + { "UnallocSVEReverseVectorElements", + {17, 16, 10}, + { {"000", "VisitSVEReverseVectorElements"}, + }, + }, + + { "DecodeSVE00011001", + {20, 19, 18, 12, 11}, + { {"xxx00", "UnallocSVEBroadcastIndexElement"}, + {"xxx10", "UnallocSVETableLookup"}, + {"00011", "UnallocSVEBroadcastGeneralRegister"}, + {"00111", "UnallocSVEInsertGeneralRegister"}, + {"10011", "UnallocSVEUnpackVectorElements"}, + {"10111", "UnallocSVEInsertSIMDFPScalarRegister"}, + {"11011", "UnallocSVEReverseVectorElements"}, + }, + }, + + { "UnallocSVEPermutePredicateElements", + {9, 4}, + { {"00", "VisitSVEPermutePredicateElements"}, + }, + }, + + { "UnallocSVEUnpackPredicateElements", + {23, 22, 19, 17, 12, 11, 10, 9, 4}, + { {"000000000", "VisitSVEUnpackPredicateElements"}, + }, + }, + + { "UnallocSVEReversePredicateElements", + {19, 17, 16, 12, 11, 10, 9, 4}, + { {"00000000", "VisitSVEReversePredicateElements"}, + }, + }, + + { "DecodeSVE00011010", + {20, 18}, + { {"0x", "UnallocSVEPermutePredicateElements"}, + {"10", "UnallocSVEUnpackPredicateElements"}, + {"11", "UnallocSVEReversePredicateElements"}, + }, + }, + + { "DecodeSVE00011100", + {23, 20, 19, 18, 17, 16}, + { {"x00000", "VisitSVECopySIMDFPScalarRegisterToVector_Predicated"}, + {"x0001x", "VisitSVEExtractElementToSIMDFPScalarRegister"}, + {"x001xx", "VisitSVEReverseWithinElements"}, + {"x0100x", "VisitSVEConditionallyBroadcastElementToVector"}, + {"x0101x", "VisitSVEConditionallyExtractElementToSIMDFPScalar"}, + {"x01100", "VisitSVEVectorSplice_Destructive"}, + {"100001", "VisitSVECompressActiveElements"}, + }, + }, + + { "DecodeSVE00011101", + {20, 19, 18, 17, 16}, + { {"0000x", "VisitSVEExtractElementToGeneralRegister"}, + {"01000", "VisitSVECopyGeneralRegisterToVector_Predicated"}, + {"1000x", "VisitSVEConditionallyExtractElementToGeneralRegister"}, + }, + }, + + { "UnallocSVEPartitionBreakCondition", + {18, 17, 16, 9}, + { {"0000", "VisitSVEPartitionBreakCondition"}, + }, + }, + + { "UnallocSVEPropagateBreakToNextPartition", + {23, 18, 17, 16, 9, 4}, + { {"000000", "VisitSVEPropagateBreakToNextPartition"}, + }, + }, + + { "DecodeSVE0011001x", + {20, 19}, + { {"0x", "VisitSVEPredicateLogical"}, + {"10", "UnallocSVEPartitionBreakCondition"}, + {"11", "UnallocSVEPropagateBreakToNextPartition"}, + }, + }, + + { "UnallocSVEPredicateTest", + {18, 17, 9, 4}, + { {"0000", "VisitSVEPredicateTest"}, + }, + }, + + { "UnallocSVEPredicateFirstActive", + {18, 17, 12, 11, 10, 9, 4}, + { {"0000000", "VisitSVEPredicateFirstActive"}, + }, + }, + + { "UnallocSVEPredicateNextActive", + {18, 17, 12, 11, 10, 9, 4}, + { {"0000100", "VisitSVEPredicateNextActive"}, + }, + }, + + { "DecodeSVE00110110", + {20, 19, 16}, + { {"0xx", "VisitSVEPropagateBreak"}, + {"100", "UnallocSVEPredicateTest"}, + {"110", "UnallocSVEPredicateFirstActive"}, + {"111", "UnallocSVEPredicateNextActive"}, + }, + }, + + { "UnallocSVEPredicateTest", + {18, 17, 9, 4}, + { {"0000", "VisitSVEPredicateTest"}, + }, + }, + + { "UnallocSVEPredicateInitialize", + {18, 17, 11, 4}, + { {"0000", "VisitSVEPredicateInitialize"}, + }, + }, + + { "UnallocSVEPredicateZero", + {18, 17, 11, 9, 8, 7, 6, 5, 4}, + { {"000000000", "VisitSVEPredicateZero"}, + }, + }, + + { "UnallocSVEPredicateReadFromFFR_Predicated", + {18, 17, 11, 9, 4}, + { {"00000", "VisitSVEPredicateReadFromFFR_Predicated"}, + }, + }, + + { "UnallocSVEPredicateReadFromFFR_Unpredicated", + {18, 17, 11, 9, 8, 7, 6, 5, 4}, + { {"000000000", "VisitSVEPredicateReadFromFFR_Unpredicated"}, + }, + }, + + { "DecodeSVE00110111", + {20, 19, 16, 12, 10}, + { {"0xxxx", "VisitSVEPropagateBreak"}, + {"100xx", "UnallocSVEPredicateTest"}, + {"11x00", "UnallocSVEPredicateInitialize"}, + {"11001", "UnallocSVEPredicateZero"}, + {"11010", "UnallocSVEPredicateReadFromFFR_Predicated"}, + {"11110", "UnallocSVEPredicateReadFromFFR_Unpredicated"}, + }, + }, + + { "UnallocSVEConditionallyTerminateScalars", + {12, 11, 10, 3, 2, 1, 0}, + { {"0000000", "VisitSVEConditionallyTerminateScalars"}, + }, + }, + + { "UnallocSVEPredicateCount_2", + {20}, + { {"0", "VisitSVEPredicateCount"}, + }, + }, + + { "UnallocSVEIncDecByPredicateCount", + {20}, + { {"0", "VisitSVEIncDecByPredicateCount"}, + }, + }, + + { "UnallocSVEFFRWriteFromPredicate", + {20, 17, 16, 11, 10, 9, 4, 3, 2, 1, 0}, + { {"00000000000", "VisitSVEFFRWriteFromPredicate"}, + }, + }, + + { "UnallocSVEFFRInitialise", + {20, 17, 16, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}, + { {"000000000000000", "VisitSVEFFRInitialise"}, + }, + }, + + { "DecodeSVE00111100", + {19, 18, 12}, + { {"0xx", "UnallocSVEPredicateCount_2"}, + {"1x0", "UnallocSVEIncDecByPredicateCount"}, + {"101", "UnallocSVEFFRWriteFromPredicate"}, + {"111", "UnallocSVEFFRInitialise"}, + }, + }, + + { "UnallocSVEPredicateCount", + {20, 19}, + { {"00", "VisitSVEPredicateCount"}, + }, + }, + + { "DecodeSVE0011111x", + {20, 19, 16}, + { {"00x", "VisitSVEIntAddSubtractImm_Unpredicated"}, + {"01x", "VisitSVEIntMinMaxImm_Unpredicated"}, + {"10x", "VisitSVEIntMulImm_Unpredicated"}, + {"110", "VisitSVEBroadcastIntImm_Unpredicated"}, + {"111", "VisitSVEBroadcastFPImm_Unpredicated"}, + }, + }, + + { "UnallocSVEFPComplexAddition", + {20, 19, 18, 17}, + { {"0000", "VisitSVEFPComplexAddition"}, + }, + }, + + { "DecodeSVE01101000", + {12, 11}, + { {"00", "VisitSVEFPMulAddIndex"}, + {"1x", "VisitSVEFPComplexMulAddIndex"}, + }, + }, + + { "UnallocSVEFPMulIndex", + {12, 11, 10}, + { {"000", "VisitSVEFPMulIndex"}, + }, + }, + + { "DecodeSVE01110001", + {20, 19, 12}, + { {"00x", "VisitSVEFPFastReduction"}, + {"011", "VisitSVEFPUnaryOpUnpredicated"}, + {"10x", "VisitSVEFPCompareWithZero"}, + {"11x", "VisitSVEFPAccumulatingReduction"}, + }, + }, + + { "UnallocSVEFPTrigMulAddCoefficient", + {12, 11, 10}, + { {"000", "VisitSVEFPTrigMulAddCoefficient"}, + }, + }, + + { "UnallocSVEFPArithmeticWithImm_Predicated", + {9, 8, 7, 6}, + { {"0000", "VisitSVEFPArithmeticWithImm_Predicated"}, + }, + }, + + { "DecodeSVE01110100", + {20, 19}, + { {"0x", "VisitSVEFPArithmetic_Predicated"}, + {"10", "UnallocSVEFPTrigMulAddCoefficient"}, + {"11", "UnallocSVEFPArithmeticWithImm_Predicated"}, + }, + }, + + { "DecodeSVE01110101", + {20, 19, 18}, + { {"00x", "VisitSVEFPRoundToIntegralValue"}, + {"010", "VisitSVEFPConvertPrecision"}, + {"011", "VisitSVEFPUnaryOp"}, + {"10x", "VisitSVEIntConvertToFP"}, + {"11x", "VisitSVEFPConvertToInt"}, + }, + }, + + { "UnallocSVELoadAndBroadcastElement", + {22}, + { {"1", "VisitSVELoadAndBroadcastElement"}, + }, + }, + + { "DecodeSVE100x0110", + {22, 4}, + { {"00", "VisitSVEContiguousPrefetch_ScalarPlusScalar"}, + {"1x", "VisitSVELoadAndBroadcastElement"}, + }, + }, + + { "DecodeSVE100x0111", + {22, 4}, + { {"00", "VisitSVE32BitGatherPrefetch_VectorPlusImm"}, + {"1x", "VisitSVELoadAndBroadcastElement"}, + }, + }, + + { "DecodeSVE100x11xx", + {22}, + { {"0", "VisitSVE32BitGatherLoad_VectorPlusImm"}, + {"1", "VisitSVELoadAndBroadcastElement"}, + }, + }, + + { "DecodeSVE100010xx", + {23, 4}, + { {"00", "VisitSVE32BitGatherPrefetch_ScalarPlus32BitScaledOffsets"}, + {"1x", "VisitSVE32BitGatherLoadHalfwords_ScalarPlus32BitScaledOffsets"}, + }, + }, + + { "DecodeSVE100100x1", + {23, 22, 4}, + { {"0xx", "VisitSVE32BitGatherLoad_ScalarPlus32BitUnscaledOffsets"}, + {"110", "VisitSVEContiguousPrefetch_ScalarPlusImm"}, + }, + }, + + { "DecodeSVE10010000", + {23, 22, 4}, + { {"0xx", "VisitSVE32BitGatherLoad_ScalarPlus32BitUnscaledOffsets"}, + {"100", "VisitSVELoadPredicateRegister"}, + {"110", "VisitSVEContiguousPrefetch_ScalarPlusImm"}, + }, + }, + + { "DecodeSVE10010010", + {23, 22, 4}, + { {"0xx", "VisitSVE32BitGatherLoad_ScalarPlus32BitUnscaledOffsets"}, + {"10x", "VisitSVELoadVectorRegister"}, + {"110", "VisitSVEContiguousPrefetch_ScalarPlusImm"}, + }, + }, + + { "DecodeSVE100110x1", + {23, 22, 4}, + { {"0xx", "VisitSVE32BitGatherLoadWords_ScalarPlus32BitScaledOffsets"}, + {"110", "VisitSVEContiguousPrefetch_ScalarPlusImm"}, + }, + }, + + { "DecodeSVE10011000", + {23, 22, 4}, + { {"0xx", "VisitSVE32BitGatherLoadWords_ScalarPlus32BitScaledOffsets"}, + {"100", "VisitSVELoadPredicateRegister"}, + {"110", "VisitSVEContiguousPrefetch_ScalarPlusImm"}, + }, + }, + + { "DecodeSVE10011010", + {23, 22, 4}, + { {"0xx", "VisitSVE32BitGatherLoadWords_ScalarPlus32BitScaledOffsets"}, + {"10x", "VisitSVELoadVectorRegister"}, + {"110", "VisitSVEContiguousPrefetch_ScalarPlusImm"}, + }, + }, + + { "UnallocSVELoadAndBroadcastQuadword_ScalarPlusImm", + {20}, + { {"0", "VisitSVELoadAndBroadcastQuadword_ScalarPlusImm"}, + }, + }, + + { "DecodeSVE101xx101", + {20}, + { {"0", "VisitSVEContiguousLoad_ScalarPlusImm"}, + {"1", "VisitSVEContiguousNonFaultLoad_ScalarPlusImm"}, + }, + }, + + { "DecodeSVE101x0110", + {22}, + { {"0", "VisitSVEContiguousNonTemporalLoad_ScalarPlusScalar"}, + {"1", "VisitSVELoadMultipleStructures_ScalarPlusScalar"}, + }, + }, + + { "DecodeSVE101x0111", + {22, 20}, + { {"00", "VisitSVEContiguousNonTemporalLoad_ScalarPlusImm"}, + {"10", "VisitSVELoadMultipleStructures_ScalarPlusImm"}, + }, + }, + + { "DecodeSVE101x1111", + {22, 20}, + { {"x0", "VisitSVELoadMultipleStructures_ScalarPlusImm"}, + }, + }, + + { "DecodeSVE110x0111", + {22, 4}, + { {"00", "VisitSVE64BitGatherPrefetch_VectorPlusImm"}, + {"1x", "VisitSVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsets"}, + }, + }, + + { "UnallocSVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsets", + {22}, + { {"1", "VisitSVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsets"}, + }, + }, + + { "UnallocSVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsets", + {22}, + { {"1", "VisitSVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsets"}, + }, + }, + + { "DecodeSVE110010xx", + {23, 4}, + { {"00", "VisitSVE64BitGatherPrefetch_ScalarPlusUnpacked32BitScaledOffsets"}, + {"1x", "VisitSVE64BitGatherLoad_ScalarPlus32BitUnpackedScaledOffsets"}, + }, + }, + + { "DecodeSVE110011xx", + {23, 22, 4}, + { {"x0x", "VisitSVE64BitGatherLoad_VectorPlusImm"}, + {"010", "VisitSVE64BitGatherPrefetch_ScalarPlus64BitScaledOffsets"}, + {"11x", "VisitSVE64BitGatherLoad_ScalarPlus64BitScaledOffsets"}, + }, + }, + + { "UnallocSVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsets", + {22}, + { {"1", "VisitSVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsets"}, + }, + }, + + { "UnallocSVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsets", + {22}, + { {"1", "VisitSVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsets"}, + }, + }, + + { "DecodeSVE110111xx", + {22}, + { {"0", "VisitSVE64BitGatherLoad_VectorPlusImm"}, + {"1", "VisitSVE64BitGatherLoad_ScalarPlus64BitScaledOffsets"}, + }, + }, + + { "DecodeSVE111x0011", + {22}, + { {"0", "VisitSVEContiguousNonTemporalStore_ScalarPlusScalar"}, + {"1", "VisitSVEStoreMultipleStructures_ScalarPlusScalar"}, + }, + }, + + { "DecodeSVE111x01x0", + {22}, + { {"0", "VisitSVE64BitScatterStore_ScalarPlusUnpacked32BitUnscaledOffsets"}, + {"1", "VisitSVE32BitScatterStore_ScalarPlus32BitUnscaledOffsets"}, + }, + }, + + { "DecodeSVE111x0101", + {22}, + { {"0", "VisitSVE64BitScatterStore_ScalarPlus64BitUnscaledOffsets"}, + {"1", "VisitSVE64BitScatterStore_VectorPlusImm"}, + }, + }, + + { "DecodeSVE111x0111", + {22, 20}, + { {"x0", "VisitSVEContiguousStore_ScalarPlusImm"}, + {"01", "VisitSVEContiguousNonTemporalStore_ScalarPlusImm"}, + {"11", "VisitSVEStoreMultipleStructures_ScalarPlusImm"}, + }, + }, + + { "DecodeSVE111x11x0", + {22}, + { {"0", "VisitSVE64BitScatterStore_ScalarPlusUnpacked32BitScaledOffsets"}, + {"1", "VisitSVE32BitScatterStore_ScalarPlus32BitScaledOffsets"}, + }, + }, + + { "DecodeSVE111x1101", + {22}, + { {"0", "VisitSVE64BitScatterStore_ScalarPlus64BitScaledOffsets"}, + {"1", "VisitSVE32BitScatterStore_VectorPlusImm"}, + }, + }, + + { "DecodeSVE111x1111", + {22, 20}, + { {"x0", "VisitSVEContiguousStore_ScalarPlusImm"}, + {"x1", "VisitSVEStoreMultipleStructures_ScalarPlusImm"}, + }, + }, + + { "UnallocSVEStorePredicateRegister", + {23, 22, 4}, + { {"100", "VisitSVEStorePredicateRegister"}, + }, + }, + + { "DecodeSVE1111x010", + {23, 22}, + { {"0x", "VisitSVEContiguousStore_ScalarPlusScalar"}, + {"10", "VisitSVEStoreVectorRegister"}, + {"11", "VisitSVEContiguousStore_ScalarPlusScalar"}, + }, + }, + + { "DecodeNEONScalarAnd3SHA", + {29, 23, 22, 15, 14, 11, 10}, + { {"0xx0x00", "VisitCrypto3RegSHA"}, + {"x000xx1", "UnallocNEONScalarCopy"}, + {"xxx1xx1", "UnallocNEONScalar3SameExtra"}, + {"xx100x1", "UnallocNEONScalar3SameFP16"}, + }, + }, + + { "DecodeNEONScalarAnd2SHA", + {29, 20, 19, 18, 17, 11, 10}, + { {"0010010", "VisitCrypto2RegSHA"}, + {"x000010", "UnallocNEONScalar2RegMisc"}, + {"x100010", "UnallocNEONScalarPairwise"}, + {"x110010", "UnallocNEONScalar2RegMiscFP16"}, + {"xxxxxx1", "UnallocNEONScalar3Same"}, + {"xxxxx00", "UnallocNEONScalar3Diff"}, + }, + }, + + { "DecodeNEONScalar", + {28, 23, 10}, + { {"101", "UnallocNEONScalarShiftImmediate"}, + {"1x0", "UnallocNEONScalarByIndexedElement"}, + }, + }, + + { "DecodeNEONLoadStoreMulti", + {20, 19, 18, 17, 16}, + { {"00000", "UnallocNEONLoadStoreMultiStruct"}, + }, + }, + + { "DecodeNEONLoadStoreSingle", + {20, 19, 18, 17, 16}, + { {"00000", "UnallocNEONLoadStoreSingleStruct"}, + }, + }, + + { "DecodeNEONOther", + {29, 23, 22, 15, 14, 11, 10}, + { {"0xx0x00", "UnallocNEONTable"}, + {"0xx0x10", "UnallocNEONPerm"}, + {"1xx0xx0", "UnallocNEONExtract"}, + {"x000xx1", "UnallocNEONCopy"}, + {"xx100x1", "UnallocNEON3SameFP16"}, + {"xxx1xx1", "UnallocNEON3SameExtra"}, + }, + }, + + { "DecodeNEON2OpAndAcross", + {30, 29, 20, 19, 18, 17}, + { {"100100", "VisitCryptoAES"}, + {"xx1100", "UnallocNEON2RegMiscFP16"}, + {"xx0000", "UnallocNEON2RegMisc"}, + {"xx1000", "UnallocNEONAcrossLanes"}, + }, + }, + + { "DecodeNEON3Op", + {11, 10}, + { {"00", "UnallocNEON3Different"}, + {"10", "DecodeNEON2OpAndAcross"}, + {"x1", "UnallocNEON3Same"}, + }, + }, + + { "DecodeNEONImmAndIndex", + {23, 22, 21, 20, 19, 10}, + { {"000001", "UnallocNEONModifiedImmediate"}, + {"0xxx11", "UnallocNEONShiftImmediate"}, + {"0xx1x1", "UnallocNEONShiftImmediate"}, + {"0x1xx1", "UnallocNEONShiftImmediate"}, + {"01xxx1", "UnallocNEONShiftImmediate"}, + {"xxxxx0", "UnallocNEONByIndexedElement"}, + }, + }, + + { "DecodeFP", + {15, 14, 13, 12, 11, 10}, + { {"000000", "UnallocFPIntegerConvert"}, + {"x10000", "UnallocFPDataProcessing1Source"}, + {"xx1000", "UnallocFPCompare"}, + {"xxx100", "UnallocFPImmediate"}, + {"xxxx01", "UnallocFPConditionalCompare"}, + {"xxxx10", "UnallocFPDataProcessing2Source"}, + {"xxxx11", "UnallocFPConditionalSelect"}, + }, + }, + + { "DecodeLoadStore", + {11, 10}, + { {"00", "UnallocLoadStoreUnscaledOffset"}, + {"01", "UnallocLoadStorePostIndex"}, + {"10", "VisitUnimplemented"}, // LoadStoreUnprivileged. + {"11", "UnallocLoadStorePreIndex"}, + }, + }, + + { "DecodeLoadStoreRegister", + {11, 10}, + { {"00", "UnallocAtomicMemory"}, + {"10", "UnallocLoadStoreRegisterOffset"}, + {"x1", "UnallocLoadStorePAC"}, + }, + }, + + { "DecodeCondCmp", + {11}, + { {"0", "UnallocConditionalCompareRegister"}, + {"1", "UnallocConditionalCompareImmediate"}, + }, + }, + + // Unallocation decode nodes. These are used to mark encodings within an + // instruction class as unallocated. + { "UnallocAddSubExtended", + {12, 11, 10}, + { {"1x1", "VisitUnallocated"}, + {"11x", "VisitUnallocated"}, + {"otherwise", "UnallocAddSubExtended_2"}, + }, + }, + + { "UnallocAddSubExtended_2", + {23, 22}, + { {"1x", "VisitUnallocated"}, + {"x1", "VisitUnallocated"}, + {"otherwise", "VisitAddSubExtended"}, + }, + }, + + { "UnallocAddSubImmediate", + {23}, + { {"0", "VisitAddSubImmediate"}, + {"1", "VisitUnallocated"}, + }, + }, + + { "UnallocAddSubShifted", + {23, 22}, + { {"11", "VisitUnallocated"}, + {"otherwise", "UnallocAddSubShifted_2"}, + }, + }, + + { "UnallocAddSubShifted_2", + {31, 15}, + { {"01", "VisitUnallocated"}, + {"otherwise", "VisitAddSubShifted"}, + }, + }, + + { "UnallocAddSubWithCarry", + {15, 14, 13, 12, 11, 10}, + { {"000000", "VisitAddSubWithCarry"}, + {"x00001", "UnallocRotateRightIntoFlags"}, + {"xx0010", "UnallocEvaluateIntoFlags"}, + {"otherwise", "VisitUnallocated"}, + }, + }, + + { "UnallocAtomicMemory", + {26, 23, 22, 15, 14, 13, 12}, + { {"0xx1001", "VisitUnallocated"}, + {"0xx101x", "VisitUnallocated"}, + {"0xx1101", "VisitUnallocated"}, + {"0xx111x", "VisitUnallocated"}, + {"00x1100", "VisitUnallocated"}, + {"0111100", "VisitUnallocated"}, + {"1xxxxxx", "VisitUnallocated"}, + {"otherwise", "VisitAtomicMemory"}, + }, + }, + + { "UnallocBitfield", + {31, 30, 29, 22}, + { {"x11x", "VisitUnallocated"}, + {"0xx1", "VisitUnallocated"}, + {"1xx0", "VisitUnallocated"}, + {"otherwise", "VisitBitfield"}, + }, + }, + + { "UnallocConditionalBranch", + {24, 4}, + { {"00", "VisitConditionalBranch"}, + {"otherwise", "VisitUnallocated"}, + }, + }, + + { "UnallocConditionalCompareImmediate", + {10, 4, 29}, + { {"1xx", "VisitUnallocated"}, + {"x1x", "VisitUnallocated"}, + {"xx0", "VisitUnallocated"}, + {"otherwise", "VisitConditionalCompareImmediate"}, + }, + }, + + { "UnallocConditionalCompareRegister", + {10, 4, 29}, + { {"1xx", "VisitUnallocated"}, + {"x1x", "VisitUnallocated"}, + {"xx0", "VisitUnallocated"}, + {"otherwise", "VisitConditionalCompareRegister"}, + }, + }, + + { "UnallocConditionalSelect", + {11, 29}, + { {"00", "VisitConditionalSelect"}, + {"otherwise", "VisitUnallocated"}, + }, + }, + + { "UnallocDataProcessing1Source", + {31, 16, 14, 13, 12, 11, 10}, + { {"x0xx11x", "VisitUnallocated"}, + {"0000011", "VisitUnallocated"}, + {"1001xxx", "VisitUnallocated"}, + {"x01xxxx", "VisitUnallocated"}, + {"x0x1xxx", "VisitUnallocated"}, + {"01xxxxx", "VisitUnallocated"}, + {"111xx1x", "VisitUnallocated"}, + {"111x1xx", "VisitUnallocated"}, + {"1111xxx", "VisitUnallocated"}, + {"otherwise", "UnallocDataProcessing1Source_2"}, + }, + }, + + { "UnallocDataProcessing1Source_2", + {29, 20, 19, 18, 17, 15}, + { {"000000", "VisitDataProcessing1Source"}, + {"otherwise", "VisitUnallocated"}, + }, + }, + + { "UnallocDataProcessing2Source", + {31, 14, 13, 12, 11, 10}, + { {"x0000x", "VisitUnallocated"}, + {"x11xxx", "VisitUnallocated"}, + {"010x11", "VisitUnallocated"}, + {"110xx0", "VisitUnallocated"}, + {"110x0x", "VisitUnallocated"}, + {"otherwise", "UnallocDataProcessing2Source_2"}, + }, + }, + + { "UnallocDataProcessing2Source_2", + {29, 15}, + { {"00", "VisitDataProcessing2Source"}, + {"otherwise", "VisitUnallocated"}, + }, + }, + + { "UnallocDataProcessing3Source", + {23, 22, 21, 15, 31}, + { {"00100", "VisitUnallocated"}, + {"00110", "VisitUnallocated"}, + {"01000", "VisitUnallocated"}, + {"0101x", "VisitUnallocated"}, + {"011xx", "VisitUnallocated"}, + {"100xx", "VisitUnallocated"}, + {"10100", "VisitUnallocated"}, + {"10110", "VisitUnallocated"}, + {"11000", "VisitUnallocated"}, + {"1101x", "VisitUnallocated"}, + {"111xx", "VisitUnallocated"}, + {"otherwise", "UnallocDataProcessing3Source_2"}, + }, + }, + + { "UnallocDataProcessing3Source_2", + {30, 29}, + { {"00", "VisitDataProcessing3Source"}, + {"otherwise", "VisitUnallocated"}, + }, + }, + + { "UnallocEvaluateIntoFlags", + {31, 30, 29, 20, 19, 18}, + { {"001000", "UnallocEvaluateIntoFlags_2"}, + {"otherwise", "VisitUnallocated"}, + }, + }, + + { "UnallocEvaluateIntoFlags_2", + {17, 16, 15, 4, 3, 2, 1, 0}, + { {"00001101", "VisitEvaluateIntoFlags"}, + {"otherwise", "VisitUnallocated"}, + }, + }, + + { "UnallocException", + {23, 22, 21, 1, 0}, + { {"00000", "VisitUnallocated"}, + {"001x1", "VisitUnallocated"}, + {"0011x", "VisitUnallocated"}, + {"010x1", "VisitUnallocated"}, + {"0101x", "VisitUnallocated"}, + {"011xx", "VisitUnallocated"}, + {"100xx", "VisitUnallocated"}, + {"10100", "VisitUnallocated"}, + {"11xxx", "VisitUnallocated"}, + {"otherwise", "UnallocException_2"}, + }, + }, + + { "UnallocException_2", + {4, 3, 2}, + { {"000", "VisitException"}, + {"otherwise", "VisitUnallocated"}, + }, + }, + + { "UnallocExtract", + {30, 29, 21}, + { {"000", "UnallocExtract_2"}, + {"otherwise", "VisitUnallocated"}, + }, + }, + + { "UnallocExtract_2", + {31, 22, 15}, + { {"10x", "VisitUnallocated"}, + {"01x", "VisitUnallocated"}, + {"0x1", "VisitUnallocated"}, + {"otherwise", "VisitExtract"}, + }, + }, + + { "UnallocFPCompare", + {31, 29, 15, 14, 2, 1, 0}, + { {"0000000", "UnallocFPCompare_2"}, + {"otherwise", "VisitUnallocated"}, + }, + }, + + { "UnallocFPCompare_2", + {23, 22}, + { {"10", "VisitUnallocated"}, + {"otherwise", "VisitFPCompare"}, + }, + }, + + { "UnallocFPConditionalCompare", + {31, 29, 23, 22}, + { {"xx10", "VisitUnallocated"}, + {"x1xx", "VisitUnallocated"}, + {"1xxx", "VisitUnallocated"}, + {"otherwise", "VisitFPConditionalCompare"}, + }, + }, + + { "UnallocFPConditionalSelect", + {31, 29, 23, 22}, + { {"xx10", "VisitUnallocated"}, + {"x1xx", "VisitUnallocated"}, + {"1xxx", "VisitUnallocated"}, + {"otherwise", "VisitFPConditionalSelect"}, + }, + }, + + { "UnallocFPDataProcessing1Source", + {31, 29, 20}, + { {"000", "UnallocFPDataProcessing1Source_2"}, + {"otherwise", "VisitUnallocated"}, + }, + }, + + { "UnallocFPDataProcessing1Source_2", + {23, 22, 19, 18, 17, 16, 15}, + { {"0000100", "VisitUnallocated"}, + {"0000110", "VisitUnallocated"}, + {"0001101", "VisitUnallocated"}, + {"00101xx", "VisitUnallocated"}, + {"0011xxx", "VisitUnallocated"}, + {"0100101", "VisitUnallocated"}, + {"0101101", "VisitUnallocated"}, + {"01101xx", "VisitUnallocated"}, + {"0111xxx", "VisitUnallocated"}, + {"10xxxxx", "VisitUnallocated"}, + {"110011x", "VisitUnallocated"}, + {"1101101", "VisitUnallocated"}, + {"111xxxx", "VisitUnallocated"}, + {"otherwise", "VisitFPDataProcessing1Source"}, + }, + }, + + { "UnallocFPDataProcessing2Source", + {15, 14, 13, 12}, + { {"1xx1", "VisitUnallocated"}, + {"1x1x", "VisitUnallocated"}, + {"11xx", "VisitUnallocated"}, + {"otherwise", "UnallocFPDataProcessing2Source_2"}, + }, + }, + + { "UnallocFPDataProcessing2Source_2", + {31, 29, 23, 22}, + { {"xx10", "VisitUnallocated"}, + {"x1xx", "VisitUnallocated"}, + {"1xxx", "VisitUnallocated"}, + {"otherwise", "VisitFPDataProcessing2Source"}, + }, + }, + + { "UnallocFPDataProcessing3Source", + {31, 29, 23, 22}, + { {"xx10", "VisitUnallocated"}, + {"x1xx", "VisitUnallocated"}, + {"1xxx", "VisitUnallocated"}, + {"otherwise", "VisitFPDataProcessing3Source"}, + }, + }, + + { "UnallocFPFixedPointConvert", + {23, 22, 20, 19, 17, 16}, + { {"10xxxx", "VisitUnallocated"}, + {"xxx00x", "VisitUnallocated"}, + {"xxx11x", "VisitUnallocated"}, + {"xx0x0x", "VisitUnallocated"}, + {"xx1x1x", "VisitUnallocated"}, + {"otherwise", "UnallocFPFixedPointConvert_2"}, + }, + }, + + { "UnallocFPFixedPointConvert_2", + {29, 18}, + { {"00", "UnallocFPFixedPointConvert_3"}, + {"otherwise", "VisitUnallocated"}, + }, + }, + + { "UnallocFPFixedPointConvert_3", + {31, 15}, + { {"00", "VisitUnallocated"}, + {"otherwise", "VisitFPFixedPointConvert"}, + }, + }, + + { "UnallocFPImmediate", + {23, 22}, + { {"10", "VisitUnallocated"}, + {"otherwise", "UnallocFPImmediate_2"}, + }, + }, + + { "UnallocFPImmediate_2", + {31, 29, 9, 8, 7, 6, 5}, + { {"0000000", "VisitFPImmediate"}, + {"otherwise", "VisitUnallocated"}, + }, + }, + + { "UnallocFPIntegerConvert", + {29}, + { {"0", "UnallocFPIntegerConvert_2"}, + {"1", "VisitUnallocated"}, + }, + }, + + { "UnallocFPIntegerConvert_2", + {31, 23, 22, 20, 19, 18, 17, 16}, + { {"0001x11x", "VisitUnallocated"}, + {"0010x11x", "VisitUnallocated"}, + {"0011011x", "VisitUnallocated"}, + {"00111111", "VisitUnallocated"}, + {"010xx11x", "VisitUnallocated"}, + {"100xx11x", "VisitUnallocated"}, + {"1011x11x", "VisitUnallocated"}, + {"101x111x", "VisitUnallocated"}, + {"1101x11x", "VisitUnallocated"}, + {"110x011x", "VisitUnallocated"}, + {"xxx1x01x", "VisitUnallocated"}, + {"xxx1x10x", "VisitUnallocated"}, + {"xxxx110x", "VisitUnallocated"}, + {"xxxx101x", "VisitUnallocated"}, + {"otherwise", "VisitFPIntegerConvert"}, + }, + }, + + { "UnallocLoadLiteral", + {26, 31, 30}, + { {"111", "VisitUnallocated"}, + {"otherwise", "VisitLoadLiteral"}, + }, + }, + + { "UnallocLoadStoreExclusive", + {31, 23, 21, 14, 13, 12, 11, 10}, + { {"001xxxx0", "VisitUnallocated"}, + {"001xxx0x", "VisitUnallocated"}, + {"001xx0xx", "VisitUnallocated"}, + {"001x0xxx", "VisitUnallocated"}, + {"0010xxxx", "VisitUnallocated"}, + {"x11xxxx0", "VisitUnallocated"}, + {"x11xxx0x", "VisitUnallocated"}, + {"x11xx0xx", "VisitUnallocated"}, + {"x11x0xxx", "VisitUnallocated"}, + {"x110xxxx", "VisitUnallocated"}, + {"otherwise", "VisitLoadStoreExclusive"}, + }, + }, + + { "UnallocLoadStorePAC", + {31, 30, 26}, + { {"110", "VisitLoadStorePAC"}, + {"otherwise", "VisitUnallocated"}, + }, + }, + + { "UnallocLoadStoreRCpcUnscaledOffset", + {31, 30, 23, 22, 11, 10}, + { {"xxxxx1", "VisitUnallocated"}, + {"xxxx1x", "VisitUnallocated"}, + {"101100", "VisitUnallocated"}, + {"111000", "VisitUnallocated"}, + {"111100", "VisitUnallocated"}, + {"otherwise", "VisitLoadStoreRCpcUnscaledOffset"}, + }, + }, + + { "UnallocLoadStorePairNonTemporal", + {26, 31, 30, 22}, + { {"001x", "VisitUnallocated"}, + {"x11x", "VisitUnallocated"}, + {"otherwise", "VisitLoadStorePairNonTemporal"}, + }, + }, + + { "UnallocLoadStorePairOffset", + {26, 31, 30, 22}, + { {"0010", "VisitUnallocated"}, + {"x11x", "VisitUnallocated"}, + {"otherwise", "VisitLoadStorePairOffset"}, + }, + }, + + { "UnallocLoadStorePairPostIndex", + {26, 31, 30, 22}, + { {"0010", "VisitUnallocated"}, + {"x11x", "VisitUnallocated"}, + {"otherwise", "VisitLoadStorePairPostIndex"}, + }, + }, + + { "UnallocLoadStorePairPreIndex", + {26, 31, 30, 22}, + { {"0010", "VisitUnallocated"}, + {"x11x", "VisitUnallocated"}, + {"otherwise", "VisitLoadStorePairPreIndex"}, + }, + }, + + { "UnallocLoadStorePostIndex", + {26, 23, 22, 31, 30}, + { {"01011", "VisitUnallocated"}, + {"0111x", "VisitUnallocated"}, + {"11xx1", "VisitUnallocated"}, + {"11x1x", "VisitUnallocated"}, + {"otherwise", "VisitLoadStorePostIndex"}, + }, + }, + + { "UnallocLoadStorePreIndex", + {26, 23, 22, 31, 30}, + { {"01011", "VisitUnallocated"}, + {"0111x", "VisitUnallocated"}, + {"11xx1", "VisitUnallocated"}, + {"11x1x", "VisitUnallocated"}, + {"otherwise", "VisitLoadStorePreIndex"}, + }, + }, + + { "UnallocLoadStoreRegisterOffset", + {14}, + { {"0", "VisitUnallocated"}, + {"1", "UnallocLoadStoreRegisterOffset_2"}, + }, + }, + + { "UnallocLoadStoreRegisterOffset_2", + {26, 23, 22, 31, 30}, + { {"0111x", "VisitUnallocated"}, + {"11xx1", "VisitUnallocated"}, + {"11x1x", "VisitUnallocated"}, + {"otherwise", "VisitLoadStoreRegisterOffset"}, + }, + }, + + { "UnallocLoadStoreUnscaledOffset", + {26, 23, 22, 31, 30}, + { {"0111x", "VisitUnallocated"}, + {"11xx1", "VisitUnallocated"}, + {"11x1x", "VisitUnallocated"}, + {"otherwise", "VisitLoadStoreUnscaledOffset"}, + }, + }, + + { "UnallocLoadStoreUnsignedOffset", + {26, 23, 22, 31, 30}, + { {"0111x", "VisitUnallocated"}, + {"11xx1", "VisitUnallocated"}, + {"11x1x", "VisitUnallocated"}, + {"otherwise", "VisitLoadStoreUnsignedOffset"}, + }, + }, + + { "UnallocLogicalImmediate", + {31, 22}, + { {"01", "VisitUnallocated"}, + {"otherwise", "VisitLogicalImmediate"}, + }, + }, + + { "UnallocLogicalShifted", + {31, 15}, + { {"01", "VisitUnallocated"}, + {"otherwise", "VisitLogicalShifted"}, + }, + }, + + { "UnallocMoveWideImmediate", + {30, 29}, + { {"01", "VisitUnallocated"}, + {"otherwise", "UnallocMoveWideImmediate_2"}, + }, + }, + + { "UnallocMoveWideImmediate_2", + {31, 22}, + { {"01", "VisitUnallocated"}, + {"otherwise", "VisitMoveWideImmediate"}, + }, + }, + + { "UnallocNEON2RegMisc", + {16, 15, 14, 13, 12, 23, 22, 29}, + { {"00001xx1", "VisitUnallocated"}, + {"001011x1", "VisitUnallocated"}, + {"01010xx1", "VisitUnallocated"}, + {"011xx0xx", "VisitUnallocated"}, + {"011101x1", "VisitUnallocated"}, + {"1000xxxx", "VisitUnallocated"}, + {"10011xx0", "VisitUnallocated"}, + {"10101xxx", "VisitUnallocated"}, + {"101101xx", "VisitUnallocated"}, + {"101110x1", "VisitUnallocated"}, + {"101111xx", "VisitUnallocated"}, + {"110001x1", "VisitUnallocated"}, + {"111101xx", "VisitUnallocated"}, + {"111111x0", "VisitUnallocated"}, + {"otherwise", "VisitNEON2RegMisc"}, + }, + }, + + { "UnallocNEON2RegMiscFP16", + {29, 23, 22, 16, 15, 14, 13, 12}, + { {"xx0xxxxx", "VisitUnallocated"}, + {"xxx00xxx", "VisitUnallocated"}, + {"xxx010xx", "VisitUnallocated"}, + {"xxx10xxx", "VisitUnallocated"}, + {"xxx11110", "VisitUnallocated"}, + {"x0x011xx", "VisitUnallocated"}, + {"x0x11111", "VisitUnallocated"}, + {"x1x11100", "VisitUnallocated"}, + {"01x11111", "VisitUnallocated"}, + {"11x01110", "VisitUnallocated"}, + {"11x11000", "VisitUnallocated"}, + {"otherwise", "VisitNEON2RegMiscFP16"}, + }, + }, + + { "UnallocNEON3Different", + {15, 14, 13, 12, 29}, + { {"10011", "VisitUnallocated"}, + {"10111", "VisitUnallocated"}, + {"11011", "VisitUnallocated"}, + {"11101", "VisitUnallocated"}, + {"1111x", "VisitUnallocated"}, + {"otherwise", "VisitNEON3Different"}, + }, + }, + + { "UnallocNEON3Same", + {29, 23, 22, 15, 14, 13, 12, 11}, + { {"00111101", "VisitUnallocated"}, + {"01x11011", "VisitUnallocated"}, + {"01x11100", "VisitUnallocated"}, + {"01111101", "VisitUnallocated"}, + {"1xx10111", "VisitUnallocated"}, + {"10111001", "VisitUnallocated"}, + {"11x11011", "VisitUnallocated"}, + {"11x11111", "VisitUnallocated"}, + {"11111001", "VisitUnallocated"}, + {"otherwise", "VisitNEON3Same"}, + }, + }, + + { "UnallocNEON3SameExtra", + {29, 14, 13, 12, 11}, + { {"x0011", "VisitUnallocated"}, + {"x01xx", "VisitUnallocated"}, + {"00000", "VisitUnallocated"}, + {"00001", "VisitUnallocated"}, + {"01xxx", "VisitUnallocated"}, + {"111x1", "VisitUnallocated"}, + {"otherwise", "VisitNEON3SameExtra"}, + }, + }, + + { "UnallocNEON3SameFP16", + {29, 23, 13, 12, 11}, + { {"00101", "VisitUnallocated"}, + {"01011", "VisitUnallocated"}, + {"01100", "VisitUnallocated"}, + {"01101", "VisitUnallocated"}, + {"10001", "VisitUnallocated"}, + {"11001", "VisitUnallocated"}, + {"11011", "VisitUnallocated"}, + {"11111", "VisitUnallocated"}, + {"otherwise", "VisitNEON3SameFP16"}, + }, + }, + + { "UnallocNEONAcrossLanes", + {29, 23, 22, 16, 15, 14, 13, 12}, + { {"xxx0000x", "VisitUnallocated"}, + {"xxx00010", "VisitUnallocated"}, + {"xxx001xx", "VisitUnallocated"}, + {"xxx0100x", "VisitUnallocated"}, + {"xxx01011", "VisitUnallocated"}, + {"xxx01101", "VisitUnallocated"}, + {"xxx01110", "VisitUnallocated"}, + {"xxx10xxx", "VisitUnallocated"}, + {"xxx1100x", "VisitUnallocated"}, + {"xxx111xx", "VisitUnallocated"}, + {"00101100", "VisitUnallocated"}, + {"00101111", "VisitUnallocated"}, + {"01101100", "VisitUnallocated"}, + {"01101111", "VisitUnallocated"}, + {"1xx11011", "VisitUnallocated"}, + {"otherwise", "VisitNEONAcrossLanes"}, + }, + }, + + { "UnallocNEONByIndexedElement", + {29, 23, 22, 15, 14, 13, 12}, + { {"0010001", "VisitUnallocated"}, + {"0010101", "VisitUnallocated"}, + {"0011001", "VisitUnallocated"}, + {"00x0000", "VisitUnallocated"}, + {"00x0100", "VisitUnallocated"}, + {"0xx1111", "VisitUnallocated"}, + {"1000001", "VisitUnallocated"}, + {"1000011", "VisitUnallocated"}, + {"1000101", "VisitUnallocated"}, + {"1000111", "VisitUnallocated"}, + {"10x1000", "VisitUnallocated"}, + {"10x1100", "VisitUnallocated"}, + {"1110001", "VisitUnallocated"}, + {"1110011", "VisitUnallocated"}, + {"1110101", "VisitUnallocated"}, + {"1110111", "VisitUnallocated"}, + {"1xx1011", "VisitUnallocated"}, + {"x011001", "VisitUnallocated"}, + {"otherwise", "VisitNEONByIndexedElement"}, + }, + }, + + { "UnallocNEONCopy", + {14, 13, 12, 11, 30, 29}, + { {"xxxx01", "VisitUnallocated"}, + {"0010x0", "VisitUnallocated"}, + {"001100", "VisitUnallocated"}, + {"0100x0", "VisitUnallocated"}, + {"0110x0", "VisitUnallocated"}, + {"1xxxx0", "VisitUnallocated"}, + {"otherwise", "UnallocNEONCopy_2"}, + }, + }, + + { "UnallocNEONCopy_2", + {19, 18, 17, 16}, + { {"0000", "VisitUnallocated"}, + {"otherwise", "VisitNEONCopy"}, + }, + }, + + { "UnallocNEONExtract", + {23, 22}, + { {"00", "VisitNEONExtract"}, + {"otherwise", "VisitUnallocated"}, + }, + }, + + { "UnallocNEONLoadStoreMultiStruct", + {22, 15, 14, 13, 12}, + { {"00001", "VisitUnallocated"}, + {"00011", "VisitUnallocated"}, + {"00101", "VisitUnallocated"}, + {"01001", "VisitUnallocated"}, + {"01011", "VisitUnallocated"}, + {"011xx", "VisitUnallocated"}, + {"10001", "VisitUnallocated"}, + {"10011", "VisitUnallocated"}, + {"10101", "VisitUnallocated"}, + {"11001", "VisitUnallocated"}, + {"11011", "VisitUnallocated"}, + {"111xx", "VisitUnallocated"}, + {"otherwise", "VisitNEONLoadStoreMultiStruct"}, + }, + }, + + { "UnallocNEONLoadStoreMultiStructPostIndex", + {22, 15, 14, 13, 12}, + { {"00001", "VisitUnallocated"}, + {"00011", "VisitUnallocated"}, + {"00101", "VisitUnallocated"}, + {"01001", "VisitUnallocated"}, + {"01011", "VisitUnallocated"}, + {"011xx", "VisitUnallocated"}, + {"10001", "VisitUnallocated"}, + {"10011", "VisitUnallocated"}, + {"10101", "VisitUnallocated"}, + {"11001", "VisitUnallocated"}, + {"11011", "VisitUnallocated"}, + {"111xx", "VisitUnallocated"}, + {"otherwise", "VisitNEONLoadStoreMultiStructPostIndex"}, + }, + }, + + { "UnallocNEONLoadSingleStruct", + {21, 15, 14, 13, 12, 11, 10}, + { {"0010xx1", "VisitUnallocated"}, + {"0011xx1", "VisitUnallocated"}, + {"0100101", "VisitUnallocated"}, + {"0100x1x", "VisitUnallocated"}, + {"0101011", "VisitUnallocated"}, + {"01011x1", "VisitUnallocated"}, + {"0101x10", "VisitUnallocated"}, + {"01101xx", "VisitUnallocated"}, + {"01111xx", "VisitUnallocated"}, + {"1010xx1", "VisitUnallocated"}, + {"1011xx1", "VisitUnallocated"}, + {"1100011", "VisitUnallocated"}, + {"11001x1", "VisitUnallocated"}, + {"1100x10", "VisitUnallocated"}, + {"1101011", "VisitUnallocated"}, + {"11011x1", "VisitUnallocated"}, + {"1101x10", "VisitUnallocated"}, + {"11101xx", "VisitUnallocated"}, + {"11111xx", "VisitUnallocated"}, + {"otherwise", "VisitNEONLoadStoreSingleStruct"}, + }, + }, + + { "UnallocNEONLoadStoreSingleStruct", + {22}, + { {"0", "UnallocNEONStoreSingleStruct"}, + {"1", "UnallocNEONLoadSingleStruct"}, + }, + }, + + { "UnallocNEONLoadSingleStructPostIndex", + {21, 15, 14, 13, 12, 11, 10}, + { {"0010xx1", "VisitUnallocated"}, + {"0011xx1", "VisitUnallocated"}, + {"0100101", "VisitUnallocated"}, + {"0100x1x", "VisitUnallocated"}, + {"0101011", "VisitUnallocated"}, + {"01011x1", "VisitUnallocated"}, + {"0101x10", "VisitUnallocated"}, + {"01101xx", "VisitUnallocated"}, + {"01111xx", "VisitUnallocated"}, + {"1010xx1", "VisitUnallocated"}, + {"1011xx1", "VisitUnallocated"}, + {"1100011", "VisitUnallocated"}, + {"11001x1", "VisitUnallocated"}, + {"1100x10", "VisitUnallocated"}, + {"1101011", "VisitUnallocated"}, + {"11011x1", "VisitUnallocated"}, + {"1101x10", "VisitUnallocated"}, + {"11101xx", "VisitUnallocated"}, + {"11111xx", "VisitUnallocated"}, + {"otherwise", "VisitNEONLoadStoreSingleStructPostIndex"}, + }, + }, + + { "UnallocNEONLoadStoreSingleStructPostIndex", + {22}, + { {"0", "UnallocNEONStoreSingleStructPostIndex"}, + {"1", "UnallocNEONLoadSingleStructPostIndex"}, + }, + }, + + { "UnallocNEONModifiedImmediate", + {30, 29, 15, 14, 13, 12, 11}, + { { "x00xxx1", "VisitUnallocated"}, + { "x010xx1", "VisitUnallocated"}, + { "x0110x1", "VisitUnallocated"}, + { "x011101", "VisitUnallocated"}, + { "0111110", "VisitUnallocated"}, + { "x1xxxx1", "VisitUnallocated"}, + { "otherwise", "VisitNEONModifiedImmediate"}, + }, + }, + + { "UnallocNEONPerm", + {13, 12}, + { {"00", "VisitUnallocated"}, + {"otherwise", "VisitNEONPerm"}, + }, + }, + + { "UnallocNEONScalar2RegMisc", + {16, 15, 14, 13, 12, 23, 22, 29}, + { {"0000xxxx", "VisitUnallocated"}, + {"00010xxx", "VisitUnallocated"}, + {"0010xxxx", "VisitUnallocated"}, + {"00110xxx", "VisitUnallocated"}, + {"01010xx1", "VisitUnallocated"}, + {"011xx0xx", "VisitUnallocated"}, + {"011101x1", "VisitUnallocated"}, + {"01111xxx", "VisitUnallocated"}, + {"1000xxxx", "VisitUnallocated"}, + {"10010xx0", "VisitUnallocated"}, + {"10011xxx", "VisitUnallocated"}, + {"10101xxx", "VisitUnallocated"}, + {"101100x0", "VisitUnallocated"}, + {"101101xx", "VisitUnallocated"}, + {"10111xxx", "VisitUnallocated"}, + {"1100xxxx", "VisitUnallocated"}, + {"111001xx", "VisitUnallocated"}, + {"11110xxx", "VisitUnallocated"}, + {"111110xx", "VisitUnallocated"}, + {"111111x1", "VisitUnallocated"}, + {"otherwise", "VisitNEONScalar2RegMisc"}, + }, + }, + + { "UnallocNEONScalar2RegMiscFP16", + {29, 23, 22, 16, 15, 14, 13, 12}, + { {"xx0xxxxx", "VisitUnallocated"}, + {"xx100xxx", "VisitUnallocated"}, + {"xx1010xx", "VisitUnallocated"}, + {"xx110xxx", "VisitUnallocated"}, + {"xx11100x", "VisitUnallocated"}, + {"xx111110", "VisitUnallocated"}, + {"x01011xx", "VisitUnallocated"}, + {"x0111111", "VisitUnallocated"}, + {"x1101111", "VisitUnallocated"}, + {"x1111100", "VisitUnallocated"}, + {"11101110", "VisitUnallocated"}, + {"11111111", "VisitUnallocated"}, + {"otherwise", "VisitNEONScalar2RegMiscFP16"}, + }, + }, + + { "UnallocNEONScalar3Diff", + {14, 13, 12, 29}, + { {"000x", "VisitUnallocated"}, + {"0011", "VisitUnallocated"}, + {"010x", "VisitUnallocated"}, + {"0111", "VisitUnallocated"}, + {"100x", "VisitUnallocated"}, + {"1011", "VisitUnallocated"}, + {"11xx", "VisitUnallocated"}, + {"otherwise", "UnallocNEONScalar3Diff_2"}, + }, + }, + + { "UnallocNEONScalar3Diff_2", + {15}, + { {"0", "VisitUnallocated"}, + {"1", "VisitNEONScalar3Diff"}, + }, + }, + + { "UnallocNEONScalar3Same", + {15, 14, 13, 12, 11, 23, 22, 29}, + { {"00000xxx", "VisitUnallocated"}, + {"0001xxxx", "VisitUnallocated"}, + {"00100xxx", "VisitUnallocated"}, + {"011xxxxx", "VisitUnallocated"}, + {"1001xxxx", "VisitUnallocated"}, + {"1010xxxx", "VisitUnallocated"}, + {"10111xxx", "VisitUnallocated"}, + {"1100xxxx", "VisitUnallocated"}, + {"110100xx", "VisitUnallocated"}, + {"110101x0", "VisitUnallocated"}, + {"110110x1", "VisitUnallocated"}, + {"110111xx", "VisitUnallocated"}, + {"111001x0", "VisitUnallocated"}, + {"111010x0", "VisitUnallocated"}, + {"111011x0", "VisitUnallocated"}, + {"11110xxx", "VisitUnallocated"}, + {"111110x1", "VisitUnallocated"}, + {"111111x1", "VisitUnallocated"}, + {"otherwise", "VisitNEONScalar3Same"}, + }, + }, + + { "UnallocNEONScalar3SameExtra", + {29, 14, 13, 12, 11}, + { {"x001x", "VisitUnallocated"}, + {"x01xx", "VisitUnallocated"}, + {"x1xxx", "VisitUnallocated"}, + {"00000", "VisitUnallocated"}, + {"00001", "VisitUnallocated"}, + {"otherwise", "VisitNEONScalar3SameExtra"}, + }, + }, + + { "UnallocNEONScalar3SameFP16", + {29, 23, 13, 12, 11}, + { {"00011", "VisitNEONScalar3SameFP16"}, + {"00100", "VisitNEONScalar3SameFP16"}, + {"00111", "VisitNEONScalar3SameFP16"}, + {"01111", "VisitNEONScalar3SameFP16"}, + {"10100", "VisitNEONScalar3SameFP16"}, + {"10101", "VisitNEONScalar3SameFP16"}, + {"11010", "VisitNEONScalar3SameFP16"}, + {"11100", "VisitNEONScalar3SameFP16"}, + {"11101", "VisitNEONScalar3SameFP16"}, + {"otherwise", "VisitUnallocated"}, + }, + }, + + { "UnallocNEONScalarByIndexedElement", + {29, 23, 22, 15, 14, 13, 12}, + { {"0xx1111", "VisitUnallocated"}, + {"1000001", "VisitUnallocated"}, + {"1000101", "VisitUnallocated"}, + {"11x0001", "VisitUnallocated"}, + {"11x0101", "VisitUnallocated"}, + {"1xx0011", "VisitUnallocated"}, + {"1xx0111", "VisitUnallocated"}, + {"1xx1011", "VisitUnallocated"}, + {"1xx1100", "VisitUnallocated"}, + {"x010001", "VisitUnallocated"}, + {"x010101", "VisitUnallocated"}, + {"x011001", "VisitUnallocated"}, + {"xxx0000", "VisitUnallocated"}, + {"xxx0010", "VisitUnallocated"}, + {"xxx0100", "VisitUnallocated"}, + {"xxx0110", "VisitUnallocated"}, + {"xxx1000", "VisitUnallocated"}, + {"xxx1010", "VisitUnallocated"}, + {"xxx1110", "VisitUnallocated"}, + {"otherwise", "VisitNEONScalarByIndexedElement"}, + }, + }, + + { "UnallocNEONScalarCopy", + {14, 13, 12, 11}, + { {"0000", "UnallocNEONScalarCopy_2"}, + {"otherwise", "VisitUnallocated"}, + }, + }, + + { "UnallocNEONScalarCopy_2", + {19, 18, 17, 16}, + { {"0000", "VisitUnallocated"}, + {"otherwise", "UnallocNEONScalarCopy_3"}, + }, + }, + + { "UnallocNEONScalarCopy_3", + {29}, + { {"0", "VisitNEONScalarCopy"}, + {"1", "VisitUnallocated"}, + }, + }, + + { "UnallocNEONScalarPairwise", + {29, 23, 22, 16, 15, 14, 13, 12}, + { {"xxx00xxx", "VisitUnallocated"}, + {"xxx010xx", "VisitUnallocated"}, + {"xxx01110", "VisitUnallocated"}, + {"xxx10xxx", "VisitUnallocated"}, + {"xxx1100x", "VisitUnallocated"}, + {"xxx11010", "VisitUnallocated"}, + {"xxx111xx", "VisitUnallocated"}, + {"x1x01101", "VisitUnallocated"}, + {"00101100", "VisitUnallocated"}, + {"00101101", "VisitUnallocated"}, + {"00101111", "VisitUnallocated"}, + {"01101100", "VisitUnallocated"}, + {"01101111", "VisitUnallocated"}, + {"1xx11011", "VisitUnallocated"}, + {"otherwise", "VisitNEONScalarPairwise"}, + }, + }, + + { "UnallocNEONScalarShiftImmediate", + {15, 14, 13, 12, 11, 29}, + { {"00001x", "VisitUnallocated"}, + {"00011x", "VisitUnallocated"}, + {"00101x", "VisitUnallocated"}, + {"00111x", "VisitUnallocated"}, + {"010000", "VisitUnallocated"}, + {"01001x", "VisitUnallocated"}, + {"01011x", "VisitUnallocated"}, + {"011000", "VisitUnallocated"}, + {"01101x", "VisitUnallocated"}, + {"01111x", "VisitUnallocated"}, + {"100000", "VisitUnallocated"}, + {"100010", "VisitUnallocated"}, + {"101xxx", "VisitUnallocated"}, + {"110xxx", "VisitUnallocated"}, + {"11101x", "VisitUnallocated"}, + {"11110x", "VisitUnallocated"}, + {"otherwise", "UnallocNEONScalarShiftImmediate_2"}, + }, + }, + + { "UnallocNEONScalarShiftImmediate_2", + {22, 21, 20, 19}, + { {"0000", "VisitUnallocated"}, + {"otherwise", "VisitNEONScalarShiftImmediate"}, + }, + }, + + { "UnallocNEONShiftImmediate", + {15, 14, 13, 12, 11, 29}, + { {"00001x", "VisitUnallocated"}, + {"00011x", "VisitUnallocated"}, + {"00101x", "VisitUnallocated"}, + {"00111x", "VisitUnallocated"}, + {"010000", "VisitUnallocated"}, + {"01001x", "VisitUnallocated"}, + {"01011x", "VisitUnallocated"}, + {"011000", "VisitUnallocated"}, + {"01101x", "VisitUnallocated"}, + {"01111x", "VisitUnallocated"}, + {"10101x", "VisitUnallocated"}, + {"1011xx", "VisitUnallocated"}, + {"110xxx", "VisitUnallocated"}, + {"11101x", "VisitUnallocated"}, + {"11110x", "VisitUnallocated"}, + {"otherwise", "VisitNEONShiftImmediate"}, + }, + }, + + { "UnallocNEONStoreSingleStruct", + {21, 15, 14, 13, 12, 11, 10}, + { {"0010xx1", "VisitUnallocated"}, + {"0011xx1", "VisitUnallocated"}, + {"0100101", "VisitUnallocated"}, + {"0100x1x", "VisitUnallocated"}, + {"0101011", "VisitUnallocated"}, + {"01011x1", "VisitUnallocated"}, + {"0101x10", "VisitUnallocated"}, + {"1010xx1", "VisitUnallocated"}, + {"1011xx1", "VisitUnallocated"}, + {"1100011", "VisitUnallocated"}, + {"11001x1", "VisitUnallocated"}, + {"1100x10", "VisitUnallocated"}, + {"1101011", "VisitUnallocated"}, + {"11011x1", "VisitUnallocated"}, + {"1101x10", "VisitUnallocated"}, + {"x11xxxx", "VisitUnallocated"}, + {"otherwise", "VisitNEONLoadStoreSingleStruct"}, + }, + }, + + { "UnallocNEONStoreSingleStructPostIndex", + {21, 15, 14, 13, 12, 11, 10}, + { {"0010xx1", "VisitUnallocated"}, + {"0011xx1", "VisitUnallocated"}, + {"0100101", "VisitUnallocated"}, + {"0100x1x", "VisitUnallocated"}, + {"0101011", "VisitUnallocated"}, + {"01011x1", "VisitUnallocated"}, + {"0101x10", "VisitUnallocated"}, + {"1010xx1", "VisitUnallocated"}, + {"1011xx1", "VisitUnallocated"}, + {"1100011", "VisitUnallocated"}, + {"11001x1", "VisitUnallocated"}, + {"1100x10", "VisitUnallocated"}, + {"1101011", "VisitUnallocated"}, + {"11011x1", "VisitUnallocated"}, + {"1101x10", "VisitUnallocated"}, + {"x11xxxx", "VisitUnallocated"}, + {"otherwise", "VisitNEONLoadStoreSingleStructPostIndex"}, + }, + }, + + { "UnallocNEONTable", + {23, 22}, + { {"00", "VisitNEONTable"}, + {"otherwise", "VisitUnallocated"}, + }, + }, + + { "UnallocRotateRightIntoFlags", + {31, 30, 29, 4}, + { {"1010", "VisitRotateRightIntoFlags"}, + {"otherwise", "VisitUnallocated"}, + }, + }, + + { "UnallocSystem", + {21, 20, 19, 15, 14, 13, 12}, + { {"0000101", "VisitUnallocated"}, + {"000011x", "VisitUnallocated"}, + {"0001xxx", "VisitUnallocated"}, + {"100xxxx", "VisitUnallocated"}, + {"otherwise", "UnallocSystem_2"}, + }, + }, + + { "UnallocSystem_2", + {21, 20, 19, 15, 14, 13}, + { {"000000", "VisitUnallocated"}, + {"otherwise", "UnallocSystem_3"}, + }, + }, + + { "UnallocSystem_3", + {21, 20, 19, 16, 15, 14, 13}, + { {"0000001", "VisitUnallocated"}, + {"otherwise", "UnallocSystem_4"}, + }, + }, + + { "UnallocSystem_4", + {21, 20, 19, 17, 15, 14, 13}, + { {"0000001", "VisitUnallocated"}, + {"otherwise", "UnallocSystem_5"}, + }, + }, + + { "UnallocSystem_5", + {21, 20, 19, 18, 15, 14, 13}, + { {"0001001", "VisitUnallocated"}, + {"otherwise", "VisitSystem"}, + }, + }, + + { "UnallocUnconditionalBranchToRegister", + {15, 14, 13, 12}, + { {"0000", "UnallocUnconditionalBranchToRegister_2"}, + {"otherwise", "VisitUnallocated"}, + }, + }, + + { "UnallocUnconditionalBranchToRegister_2", + {20, 19, 18, 17, 16}, + { {"11111", "UnallocUnconditionalBranchToRegister_3"}, + {"otherwise", "VisitUnallocated"}, + }, + }, + + { "UnallocUnconditionalBranchToRegister_3", + {24, 23, 22, 21}, + { {"0011", "VisitUnallocated"}, + {"011x", "VisitUnallocated"}, + {"otherwise", "VisitUnconditionalBranchToRegister"}, + }, + }, + + { "DecodeSVE101xxxxx", + {15, 14, 13}, + { {"101", "DecodeSVE101xx101"}, + {"010", "VisitSVEContiguousLoad_ScalarPlusScalar"}, + {"otherwise", "VisitSVEMemContiguousLoad"}, + }, + }, + + { "DecodeSVE101xx101", + {20}, + { {"0", "VisitSVEContiguousLoad_ScalarPlusImm"}, + {"1", "VisitSVEMemContiguousLoad"}, + }, + }, + + { "DecodeSVE00000001", + {20, 19}, + { {"10", "VisitSVEMovprfx"}, + {"otherwise", "VisitSVEIntReduction"}, + }, + }, +}; +// clang-format on + +static const VisitorNode kVisitorNodes[] = { +#define VISITOR_NODES(A) {"Visit" #A, &Decoder::Visit##A}, + VISITOR_LIST(VISITOR_NODES) +#undef VISITOR_NODES +}; + +} // namespace aarch64 +} // namespace vixl diff --git a/src/coreclr/jit/vixl/aarch64/disasm-aarch64.cc b/src/coreclr/jit/vixl/aarch64/disasm-aarch64.cc new file mode 100644 index 00000000000000..0f0277e5076917 --- /dev/null +++ b/src/coreclr/jit/vixl/aarch64/disasm-aarch64.cc @@ -0,0 +1,11009 @@ +// Copyright 2015, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include +#include +#include + +#include "disasm-aarch64.h" + +namespace vixl { +namespace aarch64 { + + +Disassembler::Disassembler(Compiler* _compiler) + : compiler(_compiler) +{ + buffer_size_ = 256; + buffer_ = reinterpret_cast(malloc(buffer_size_)); + buffer_pos_ = 0; + own_buffer_ = true; + code_address_offset_ = 0; +} + + +Disassembler::Disassembler(Compiler* _compiler, char *text_buffer, int buffer_size) + : compiler(_compiler) +{ + buffer_size_ = buffer_size; + buffer_ = text_buffer; + buffer_pos_ = 0; + own_buffer_ = false; + code_address_offset_ = 0; +} + + +Disassembler::~Disassembler() { + if (own_buffer_) { + free(buffer_); + } +} + + +char *Disassembler::GetOutput() { return buffer_; } + + +void Disassembler::VisitAddSubImmediate(const Instruction *instr) { + bool rd_is_zr = RdIsZROrSP(instr); + bool stack_op = + (rd_is_zr || RnIsZROrSP(instr)) && (instr->GetImmAddSub() == 0) ? true + : false; + const char *mnemonic = ""; + const char *form = "'Rds, 'Rns, 'IAddSub"; + const char *form_cmp = "'Rns, 'IAddSub"; + const char *form_mov = "'Rds, 'Rns"; + + switch (instr->Mask(AddSubImmediateMask)) { + case ADD_w_imm: + case ADD_x_imm: { + mnemonic = "add"; + if (stack_op) { + mnemonic = "mov"; + form = form_mov; + } + break; + } + case ADDS_w_imm: + case ADDS_x_imm: { + mnemonic = "adds"; + if (rd_is_zr) { + mnemonic = "cmn"; + form = form_cmp; + } + break; + } + case SUB_w_imm: + case SUB_x_imm: + mnemonic = "sub"; + break; + case SUBS_w_imm: + case SUBS_x_imm: { + mnemonic = "subs"; + if (rd_is_zr) { + mnemonic = "cmp"; + form = form_cmp; + } + break; + } + default: + VIXL_UNREACHABLE(); + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitAddSubShifted(const Instruction *instr) { + bool rd_is_zr = RdIsZROrSP(instr); + bool rn_is_zr = RnIsZROrSP(instr); + const char *mnemonic = ""; + const char *form = "'Rd, 'Rn, 'Rm'NDP"; + const char *form_cmp = "'Rn, 'Rm'NDP"; + const char *form_neg = "'Rd, 'Rm'NDP"; + + switch (instr->Mask(AddSubShiftedMask)) { + case ADD_w_shift: + case ADD_x_shift: + mnemonic = "add"; + break; + case ADDS_w_shift: + case ADDS_x_shift: { + mnemonic = "adds"; + if (rd_is_zr) { + mnemonic = "cmn"; + form = form_cmp; + } + break; + } + case SUB_w_shift: + case SUB_x_shift: { + mnemonic = "sub"; + if (rn_is_zr) { + mnemonic = "neg"; + form = form_neg; + } + break; + } + case SUBS_w_shift: + case SUBS_x_shift: { + mnemonic = "subs"; + if (rd_is_zr) { + mnemonic = "cmp"; + form = form_cmp; + } else if (rn_is_zr) { + mnemonic = "negs"; + form = form_neg; + } + break; + } + default: + VIXL_UNREACHABLE(); + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitAddSubExtended(const Instruction *instr) { + bool rd_is_zr = RdIsZROrSP(instr); + const char *mnemonic = ""; + Extend mode = static_cast(instr->GetExtendMode()); + const char *form = ((mode == UXTX) || (mode == SXTX)) ? "'Rds, 'Rns, 'Xm'Ext" + : "'Rds, 'Rns, 'Wm'Ext"; + const char *form_cmp = + ((mode == UXTX) || (mode == SXTX)) ? "'Rns, 'Xm'Ext" : "'Rns, 'Wm'Ext"; + + switch (instr->Mask(AddSubExtendedMask)) { + case ADD_w_ext: + case ADD_x_ext: + mnemonic = "add"; + break; + case ADDS_w_ext: + case ADDS_x_ext: { + mnemonic = "adds"; + if (rd_is_zr) { + mnemonic = "cmn"; + form = form_cmp; + } + break; + } + case SUB_w_ext: + case SUB_x_ext: + mnemonic = "sub"; + break; + case SUBS_w_ext: + case SUBS_x_ext: { + mnemonic = "subs"; + if (rd_is_zr) { + mnemonic = "cmp"; + form = form_cmp; + } + break; + } + default: + VIXL_UNREACHABLE(); + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitAddSubWithCarry(const Instruction *instr) { + bool rn_is_zr = RnIsZROrSP(instr); + const char *mnemonic = ""; + const char *form = "'Rd, 'Rn, 'Rm"; + const char *form_neg = "'Rd, 'Rm"; + + switch (instr->Mask(AddSubWithCarryMask)) { + case ADC_w: + case ADC_x: + mnemonic = "adc"; + break; + case ADCS_w: + case ADCS_x: + mnemonic = "adcs"; + break; + case SBC_w: + case SBC_x: { + mnemonic = "sbc"; + if (rn_is_zr) { + mnemonic = "ngc"; + form = form_neg; + } + break; + } + case SBCS_w: + case SBCS_x: { + mnemonic = "sbcs"; + if (rn_is_zr) { + mnemonic = "ngcs"; + form = form_neg; + } + break; + } + default: + VIXL_UNREACHABLE(); + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitRotateRightIntoFlags(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(RotateRightIntoFlags)"; + + switch (instr->Mask(RotateRightIntoFlagsMask)) { + case RMIF: + mnemonic = "rmif"; + form = "'Xn, 'IRr, 'INzcv"; + break; + default: + VIXL_UNREACHABLE(); + } + + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitEvaluateIntoFlags(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(EvaluateIntoFlags)"; + + switch (instr->Mask(EvaluateIntoFlagsMask)) { + case SETF8: + mnemonic = "setf8"; + form = "'Wn"; + break; + case SETF16: + mnemonic = "setf16"; + form = "'Wn"; + break; + default: + VIXL_UNREACHABLE(); + } + + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitLogicalImmediate(const Instruction *instr) { + bool rd_is_zr = RdIsZROrSP(instr); + bool rn_is_zr = RnIsZROrSP(instr); + const char *mnemonic = ""; + const char *form = "'Rds, 'Rn, 'ITri"; + + if (instr->GetImmLogical() == 0) { + // The immediate encoded in the instruction is not in the expected format. + Format(instr, "unallocated", "(LogicalImmediate)"); + return; + } + + switch (instr->Mask(LogicalImmediateMask)) { + case AND_w_imm: + case AND_x_imm: + mnemonic = "and"; + break; + case ORR_w_imm: + case ORR_x_imm: { + mnemonic = "orr"; + unsigned reg_size = + (instr->GetSixtyFourBits() == 1) ? kXRegSize : kWRegSize; + if (rn_is_zr && !IsMovzMovnImm(reg_size, instr->GetImmLogical())) { + mnemonic = "mov"; + form = "'Rds, 'ITri"; + } + break; + } + case EOR_w_imm: + case EOR_x_imm: + mnemonic = "eor"; + break; + case ANDS_w_imm: + case ANDS_x_imm: { + mnemonic = "ands"; + if (rd_is_zr) { + mnemonic = "tst"; + form = "'Rn, 'ITri"; + } + break; + } + default: + VIXL_UNREACHABLE(); + } + Format(instr, mnemonic, form); +} + + +bool Disassembler::IsMovzMovnImm(unsigned reg_size, uint64_t value) { + VIXL_ASSERT((reg_size == kXRegSize) || + ((reg_size == kWRegSize) && (value <= 0xffffffff))); + + // Test for movz: 16 bits set at positions 0, 16, 32 or 48. + if (((value & UINT64_C(0xffffffffffff0000)) == 0) || + ((value & UINT64_C(0xffffffff0000ffff)) == 0) || + ((value & UINT64_C(0xffff0000ffffffff)) == 0) || + ((value & UINT64_C(0x0000ffffffffffff)) == 0)) { + return true; + } + + // Test for movn: NOT(16 bits set at positions 0, 16, 32 or 48). + if ((reg_size == kXRegSize) && + (((~value & UINT64_C(0xffffffffffff0000)) == 0) || + ((~value & UINT64_C(0xffffffff0000ffff)) == 0) || + ((~value & UINT64_C(0xffff0000ffffffff)) == 0) || + ((~value & UINT64_C(0x0000ffffffffffff)) == 0))) { + return true; + } + if ((reg_size == kWRegSize) && (((value & 0xffff0000) == 0xffff0000) || + ((value & 0x0000ffff) == 0x0000ffff))) { + return true; + } + return false; +} + + +void Disassembler::VisitLogicalShifted(const Instruction *instr) { + bool rd_is_zr = RdIsZROrSP(instr); + bool rn_is_zr = RnIsZROrSP(instr); + const char *mnemonic = ""; + const char *form = "'Rd, 'Rn, 'Rm'NLo"; + + switch (instr->Mask(LogicalShiftedMask)) { + case AND_w: + case AND_x: + mnemonic = "and"; + break; + case BIC_w: + case BIC_x: + mnemonic = "bic"; + break; + case EOR_w: + case EOR_x: + mnemonic = "eor"; + break; + case EON_w: + case EON_x: + mnemonic = "eon"; + break; + case BICS_w: + case BICS_x: + mnemonic = "bics"; + break; + case ANDS_w: + case ANDS_x: { + mnemonic = "ands"; + if (rd_is_zr) { + mnemonic = "tst"; + form = "'Rn, 'Rm'NLo"; + } + break; + } + case ORR_w: + case ORR_x: { + mnemonic = "orr"; + if (rn_is_zr && (instr->GetImmDPShift() == 0) && + (instr->GetShiftDP() == LSL)) { + mnemonic = "mov"; + form = "'Rd, 'Rm"; + } + break; + } + case ORN_w: + case ORN_x: { + mnemonic = "orn"; + if (rn_is_zr) { + mnemonic = "mvn"; + form = "'Rd, 'Rm'NLo"; + } + break; + } + default: + VIXL_UNREACHABLE(); + } + + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitConditionalCompareRegister(const Instruction *instr) { + const char *mnemonic = ""; + const char *form = "'Rn, 'Rm, 'INzcv, 'Cond"; + + switch (instr->Mask(ConditionalCompareRegisterMask)) { + case CCMN_w: + case CCMN_x: + mnemonic = "ccmn"; + break; + case CCMP_w: + case CCMP_x: + mnemonic = "ccmp"; + break; + default: + VIXL_UNREACHABLE(); + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitConditionalCompareImmediate(const Instruction *instr) { + const char *mnemonic = ""; + const char *form = "'Rn, 'IP, 'INzcv, 'Cond"; + + switch (instr->Mask(ConditionalCompareImmediateMask)) { + case CCMN_w_imm: + case CCMN_x_imm: + mnemonic = "ccmn"; + break; + case CCMP_w_imm: + case CCMP_x_imm: + mnemonic = "ccmp"; + break; + default: + VIXL_UNREACHABLE(); + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitConditionalSelect(const Instruction *instr) { + bool rnm_is_zr = (RnIsZROrSP(instr) && RmIsZROrSP(instr)); + bool rn_is_rm = (instr->GetRn() == instr->GetRm()); + const char *mnemonic = ""; + const char *form = "'Rd, 'Rn, 'Rm, 'Cond"; + const char *form_test = "'Rd, 'CInv"; + const char *form_update = "'Rd, 'Rn, 'CInv"; + + Condition cond = static_cast(instr->GetCondition()); + bool invertible_cond = (cond != al) && (cond != nv); + + switch (instr->Mask(ConditionalSelectMask)) { + case CSEL_w: + case CSEL_x: + mnemonic = "csel"; + break; + case CSINC_w: + case CSINC_x: { + mnemonic = "csinc"; + if (rnm_is_zr && invertible_cond) { + mnemonic = "cset"; + form = form_test; + } else if (rn_is_rm && invertible_cond) { + mnemonic = "cinc"; + form = form_update; + } + break; + } + case CSINV_w: + case CSINV_x: { + mnemonic = "csinv"; + if (rnm_is_zr && invertible_cond) { + mnemonic = "csetm"; + form = form_test; + } else if (rn_is_rm && invertible_cond) { + mnemonic = "cinv"; + form = form_update; + } + break; + } + case CSNEG_w: + case CSNEG_x: { + mnemonic = "csneg"; + if (rn_is_rm && invertible_cond) { + mnemonic = "cneg"; + form = form_update; + } + break; + } + default: + VIXL_UNREACHABLE(); + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitBitfield(const Instruction *instr) { + unsigned s = instr->GetImmS(); + unsigned r = instr->GetImmR(); + unsigned rd_size_minus_1 = + ((instr->GetSixtyFourBits() == 1) ? kXRegSize : kWRegSize) - 1; + const char *mnemonic = ""; + const char *form = ""; + const char *form_shift_right = "'Rd, 'Rn, 'IBr"; + const char *form_extend = "'Rd, 'Wn"; + const char *form_bfiz = "'Rd, 'Rn, 'IBZ-r, 'IBs+1"; + const char *form_bfc = "'Rd, 'IBZ-r, 'IBs+1"; + const char *form_bfx = "'Rd, 'Rn, 'IBr, 'IBs-r+1"; + const char *form_lsl = "'Rd, 'Rn, 'IBZ-r"; + + switch (instr->Mask(BitfieldMask)) { + case SBFM_w: + case SBFM_x: { + mnemonic = "sbfx"; + form = form_bfx; + if (r == 0) { + form = form_extend; + if (s == 7) { + mnemonic = "sxtb"; + } else if (s == 15) { + mnemonic = "sxth"; + } else if ((s == 31) && (instr->GetSixtyFourBits() == 1)) { + mnemonic = "sxtw"; + } else { + form = form_bfx; + } + } else if (s == rd_size_minus_1) { + mnemonic = "asr"; + form = form_shift_right; + } else if (s < r) { + mnemonic = "sbfiz"; + form = form_bfiz; + } + break; + } + case UBFM_w: + case UBFM_x: { + mnemonic = "ubfx"; + form = form_bfx; + if (r == 0) { + form = form_extend; + if (s == 7) { + mnemonic = "uxtb"; + } else if (s == 15) { + mnemonic = "uxth"; + } else { + form = form_bfx; + } + } + if (s == rd_size_minus_1) { + mnemonic = "lsr"; + form = form_shift_right; + } else if (r == s + 1) { + mnemonic = "lsl"; + form = form_lsl; + } else if (s < r) { + mnemonic = "ubfiz"; + form = form_bfiz; + } + break; + } + case BFM_w: + case BFM_x: { + mnemonic = "bfxil"; + form = form_bfx; + if (s < r) { + if (instr->GetRn() == kZeroRegCode) { + mnemonic = "bfc"; + form = form_bfc; + } else { + mnemonic = "bfi"; + form = form_bfiz; + } + } + } + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitExtract(const Instruction *instr) { + const char *mnemonic = ""; + const char *form = "'Rd, 'Rn, 'Rm, 'IExtract"; + + switch (instr->Mask(ExtractMask)) { + case EXTR_w: + case EXTR_x: { + if (instr->GetRn() == instr->GetRm()) { + mnemonic = "ror"; + form = "'Rd, 'Rn, 'IExtract"; + } else { + mnemonic = "extr"; + } + break; + } + default: + VIXL_UNREACHABLE(); + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitPCRelAddressing(const Instruction *instr) { + switch (instr->Mask(PCRelAddressingMask)) { + case ADR: + Format(instr, "adr", "'Xd, 'AddrPCRelByte"); + break; + case ADRP: + Format(instr, "adrp", "'Xd, 'AddrPCRelPage"); + break; + default: + Format(instr, "unimplemented", "(PCRelAddressing)"); + } +} + + +void Disassembler::VisitConditionalBranch(const Instruction *instr) { + switch (instr->Mask(ConditionalBranchMask)) { + case B_cond: + Format(instr, "b.'CBrn", "'TImmCond"); + break; + default: + VIXL_UNREACHABLE(); + } +} + + +void Disassembler::VisitUnconditionalBranchToRegister( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form; + + switch (instr->Mask(UnconditionalBranchToRegisterMask)) { + case BR: + mnemonic = "br"; + form = "'Xn"; + break; + case BLR: + mnemonic = "blr"; + form = "'Xn"; + break; + case RET: { + mnemonic = "ret"; + if (instr->GetRn() == kLinkRegCode) { + form = NULL; + } else { + form = "'Xn"; + } + break; + } + case BRAAZ: + mnemonic = "braaz"; + form = "'Xn"; + break; + case BRABZ: + mnemonic = "brabz"; + form = "'Xn"; + break; + case BLRAAZ: + mnemonic = "blraaz"; + form = "'Xn"; + break; + case BLRABZ: + mnemonic = "blrabz"; + form = "'Xn"; + break; + case RETAA: + mnemonic = "retaa"; + form = NULL; + break; + case RETAB: + mnemonic = "retab"; + form = NULL; + break; + case BRAA: + mnemonic = "braa"; + form = "'Xn, 'Xds"; + break; + case BRAB: + mnemonic = "brab"; + form = "'Xn, 'Xds"; + break; + case BLRAA: + mnemonic = "blraa"; + form = "'Xn, 'Xds"; + break; + case BLRAB: + mnemonic = "blrab"; + form = "'Xn, 'Xds"; + break; + default: + form = "(UnconditionalBranchToRegister)"; + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitUnconditionalBranch(const Instruction *instr) { + const char *mnemonic = ""; + const char *form = "'TImmUncn"; + + switch (instr->Mask(UnconditionalBranchMask)) { + case B: + mnemonic = "b"; + break; + case BL: + mnemonic = "bl"; + break; + default: + VIXL_UNREACHABLE(); + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitDataProcessing1Source(const Instruction *instr) { + const char *mnemonic = ""; + const char *form = "'Rd, 'Rn"; + + switch (instr->Mask(DataProcessing1SourceMask)) { +#define FORMAT(A, B) \ + case A##_w: \ + case A##_x: \ + mnemonic = B; \ + break; + FORMAT(RBIT, "rbit"); + FORMAT(REV16, "rev16"); + FORMAT(REV, "rev"); + FORMAT(CLZ, "clz"); + FORMAT(CLS, "cls"); +#undef FORMAT + +#define PAUTH_VARIATIONS(V) \ + V(PACI, "paci") \ + V(PACD, "pacd") \ + V(AUTI, "auti") \ + V(AUTD, "autd") +#define PAUTH_CASE(NAME, MN) \ + case NAME##A: \ + mnemonic = MN "a"; \ + form = "'Xd, 'Xns"; \ + break; \ + case NAME##ZA: \ + mnemonic = MN "za"; \ + form = "'Xd"; \ + break; \ + case NAME##B: \ + mnemonic = MN "b"; \ + form = "'Xd, 'Xns"; \ + break; \ + case NAME##ZB: \ + mnemonic = MN "zb"; \ + form = "'Xd"; \ + break; + + PAUTH_VARIATIONS(PAUTH_CASE) +#undef PAUTH_CASE + + case XPACI: + mnemonic = "xpaci"; + form = "'Xd"; + break; + case XPACD: + mnemonic = "xpacd"; + form = "'Xd"; + break; + case REV32_x: + mnemonic = "rev32"; + break; + default: + VIXL_UNREACHABLE(); + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitDataProcessing2Source(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Rd, 'Rn, 'Rm"; + const char *form_wwx = "'Wd, 'Wn, 'Xm"; + + switch (instr->Mask(DataProcessing2SourceMask)) { +#define FORMAT(A, B) \ + case A##_w: \ + case A##_x: \ + mnemonic = B; \ + break; + FORMAT(UDIV, "udiv"); + FORMAT(SDIV, "sdiv"); + FORMAT(LSLV, "lsl"); + FORMAT(LSRV, "lsr"); + FORMAT(ASRV, "asr"); + FORMAT(RORV, "ror"); +#undef FORMAT + case PACGA: + mnemonic = "pacga"; + form = "'Xd, 'Xn, 'Xms"; + break; + case CRC32B: + mnemonic = "crc32b"; + break; + case CRC32H: + mnemonic = "crc32h"; + break; + case CRC32W: + mnemonic = "crc32w"; + break; + case CRC32X: + mnemonic = "crc32x"; + form = form_wwx; + break; + case CRC32CB: + mnemonic = "crc32cb"; + break; + case CRC32CH: + mnemonic = "crc32ch"; + break; + case CRC32CW: + mnemonic = "crc32cw"; + break; + case CRC32CX: + mnemonic = "crc32cx"; + form = form_wwx; + break; + default: + form = "(DataProcessing2Source)"; + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitDataProcessing3Source(const Instruction *instr) { + bool ra_is_zr = RaIsZROrSP(instr); + const char *mnemonic = ""; + const char *form = "'Xd, 'Wn, 'Wm, 'Xa"; + const char *form_rrr = "'Rd, 'Rn, 'Rm"; + const char *form_rrrr = "'Rd, 'Rn, 'Rm, 'Ra"; + const char *form_xww = "'Xd, 'Wn, 'Wm"; + const char *form_xxx = "'Xd, 'Xn, 'Xm"; + + switch (instr->Mask(DataProcessing3SourceMask)) { + case MADD_w: + case MADD_x: { + mnemonic = "madd"; + form = form_rrrr; + if (ra_is_zr) { + mnemonic = "mul"; + form = form_rrr; + } + break; + } + case MSUB_w: + case MSUB_x: { + mnemonic = "msub"; + form = form_rrrr; + if (ra_is_zr) { + mnemonic = "mneg"; + form = form_rrr; + } + break; + } + case SMADDL_x: { + mnemonic = "smaddl"; + if (ra_is_zr) { + mnemonic = "smull"; + form = form_xww; + } + break; + } + case SMSUBL_x: { + mnemonic = "smsubl"; + if (ra_is_zr) { + mnemonic = "smnegl"; + form = form_xww; + } + break; + } + case UMADDL_x: { + mnemonic = "umaddl"; + if (ra_is_zr) { + mnemonic = "umull"; + form = form_xww; + } + break; + } + case UMSUBL_x: { + mnemonic = "umsubl"; + if (ra_is_zr) { + mnemonic = "umnegl"; + form = form_xww; + } + break; + } + case SMULH_x: { + mnemonic = "smulh"; + form = form_xxx; + break; + } + case UMULH_x: { + mnemonic = "umulh"; + form = form_xxx; + break; + } + default: + VIXL_UNREACHABLE(); + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitCompareBranch(const Instruction *instr) { + const char *mnemonic = ""; + const char *form = "'Rt, 'TImmCmpa"; + + switch (instr->Mask(CompareBranchMask)) { + case CBZ_w: + case CBZ_x: + mnemonic = "cbz"; + break; + case CBNZ_w: + case CBNZ_x: + mnemonic = "cbnz"; + break; + default: + VIXL_UNREACHABLE(); + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitTestBranch(const Instruction *instr) { + const char *mnemonic = ""; + // If the top bit of the immediate is clear, the tested register is + // disassembled as Wt, otherwise Xt. As the top bit of the immediate is + // encoded in bit 31 of the instruction, we can reuse the Rt form, which + // uses bit 31 (normally "sf") to choose the register size. + const char *form = "'Rt, 'It, 'TImmTest"; + + switch (instr->Mask(TestBranchMask)) { + case TBZ: + mnemonic = "tbz"; + break; + case TBNZ: + mnemonic = "tbnz"; + break; + default: + VIXL_UNREACHABLE(); + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitMoveWideImmediate(const Instruction *instr) { + const char *mnemonic = ""; + const char *form = "'Rd, 'IMoveImm"; + + // Print the shift separately for movk, to make it clear which half word will + // be overwritten. Movn and movz print the computed immediate, which includes + // shift calculation. + switch (instr->Mask(MoveWideImmediateMask)) { + case MOVN_w: + case MOVN_x: + if ((instr->GetImmMoveWide()) || (instr->GetShiftMoveWide() == 0)) { + if ((instr->GetSixtyFourBits() == 0) && + (instr->GetImmMoveWide() == 0xffff)) { + mnemonic = "movn"; + } else { + mnemonic = "mov"; + form = "'Rd, 'IMoveNeg"; + } + } else { + mnemonic = "movn"; + } + break; + case MOVZ_w: + case MOVZ_x: + if ((instr->GetImmMoveWide()) || (instr->GetShiftMoveWide() == 0)) + mnemonic = "mov"; + else + mnemonic = "movz"; + break; + case MOVK_w: + case MOVK_x: + mnemonic = "movk"; + form = "'Rd, 'IMoveLSL"; + break; + default: + VIXL_UNREACHABLE(); + } + Format(instr, mnemonic, form); +} + + +#define LOAD_STORE_LIST(V) \ + V(STRB_w, "strb", "'Wt") \ + V(STRH_w, "strh", "'Wt") \ + V(STR_w, "str", "'Wt") \ + V(STR_x, "str", "'Xt") \ + V(LDRB_w, "ldrb", "'Wt") \ + V(LDRH_w, "ldrh", "'Wt") \ + V(LDR_w, "ldr", "'Wt") \ + V(LDR_x, "ldr", "'Xt") \ + V(LDRSB_x, "ldrsb", "'Xt") \ + V(LDRSH_x, "ldrsh", "'Xt") \ + V(LDRSW_x, "ldrsw", "'Xt") \ + V(LDRSB_w, "ldrsb", "'Wt") \ + V(LDRSH_w, "ldrsh", "'Wt") \ + V(STR_b, "str", "'Bt") \ + V(STR_h, "str", "'Ht") \ + V(STR_s, "str", "'St") \ + V(STR_d, "str", "'Dt") \ + V(LDR_b, "ldr", "'Bt") \ + V(LDR_h, "ldr", "'Ht") \ + V(LDR_s, "ldr", "'St") \ + V(LDR_d, "ldr", "'Dt") \ + V(STR_q, "str", "'Qt") \ + V(LDR_q, "ldr", "'Qt") + +void Disassembler::VisitLoadStorePreIndex(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(LoadStorePreIndex)"; + + switch (instr->Mask(LoadStorePreIndexMask)) { +#define LS_PREINDEX(A, B, C) \ + case A##_pre: \ + mnemonic = B; \ + form = C ", ['Xns'ILSi]!"; \ + break; + LOAD_STORE_LIST(LS_PREINDEX) +#undef LS_PREINDEX + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitLoadStorePostIndex(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(LoadStorePostIndex)"; + + switch (instr->Mask(LoadStorePostIndexMask)) { +#define LS_POSTINDEX(A, B, C) \ + case A##_post: \ + mnemonic = B; \ + form = C ", ['Xns]'ILSi"; \ + break; + LOAD_STORE_LIST(LS_POSTINDEX) +#undef LS_POSTINDEX + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitLoadStoreUnsignedOffset(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(LoadStoreUnsignedOffset)"; + + switch (instr->Mask(LoadStoreUnsignedOffsetMask)) { +#define LS_UNSIGNEDOFFSET(A, B, C) \ + case A##_unsigned: \ + mnemonic = B; \ + form = C ", ['Xns'ILU]"; \ + break; + LOAD_STORE_LIST(LS_UNSIGNEDOFFSET) +#undef LS_UNSIGNEDOFFSET + case PRFM_unsigned: + mnemonic = "prfm"; + form = "'prefOp, ['Xns'ILU]"; + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitLoadStoreRCpcUnscaledOffset(const Instruction *instr) { + const char *mnemonic; + const char *form = "'Wt, ['Xns'ILS]"; + const char *form_x = "'Xt, ['Xns'ILS]"; + + switch (instr->Mask(LoadStoreRCpcUnscaledOffsetMask)) { + case STLURB: + mnemonic = "stlurb"; + break; + case LDAPURB: + mnemonic = "ldapurb"; + break; + case LDAPURSB_w: + mnemonic = "ldapursb"; + break; + case LDAPURSB_x: + mnemonic = "ldapursb"; + form = form_x; + break; + case STLURH: + mnemonic = "stlurh"; + break; + case LDAPURH: + mnemonic = "ldapurh"; + break; + case LDAPURSH_w: + mnemonic = "ldapursh"; + break; + case LDAPURSH_x: + mnemonic = "ldapursh"; + form = form_x; + break; + case STLUR_w: + mnemonic = "stlur"; + break; + case LDAPUR_w: + mnemonic = "ldapur"; + break; + case LDAPURSW: + mnemonic = "ldapursw"; + form = form_x; + break; + case STLUR_x: + mnemonic = "stlur"; + form = form_x; + break; + case LDAPUR_x: + mnemonic = "ldapur"; + form = form_x; + break; + default: + mnemonic = "unimplemented"; + form = "(LoadStoreRCpcUnscaledOffset)"; + } + + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitLoadStoreRegisterOffset(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(LoadStoreRegisterOffset)"; + + switch (instr->Mask(LoadStoreRegisterOffsetMask)) { +#define LS_REGISTEROFFSET(A, B, C) \ + case A##_reg: \ + mnemonic = B; \ + form = C ", ['Xns, 'Offsetreg]"; \ + break; + LOAD_STORE_LIST(LS_REGISTEROFFSET) +#undef LS_REGISTEROFFSET + case PRFM_reg: + mnemonic = "prfm"; + form = "'prefOp, ['Xns, 'Offsetreg]"; + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitLoadStoreUnscaledOffset(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Wt, ['Xns'ILS]"; + const char *form_x = "'Xt, ['Xns'ILS]"; + const char *form_b = "'Bt, ['Xns'ILS]"; + const char *form_h = "'Ht, ['Xns'ILS]"; + const char *form_s = "'St, ['Xns'ILS]"; + const char *form_d = "'Dt, ['Xns'ILS]"; + const char *form_q = "'Qt, ['Xns'ILS]"; + const char *form_prefetch = "'prefOp, ['Xns'ILS]"; + + switch (instr->Mask(LoadStoreUnscaledOffsetMask)) { + case STURB_w: + mnemonic = "sturb"; + break; + case STURH_w: + mnemonic = "sturh"; + break; + case STUR_w: + mnemonic = "stur"; + break; + case STUR_x: + mnemonic = "stur"; + form = form_x; + break; + case STUR_b: + mnemonic = "stur"; + form = form_b; + break; + case STUR_h: + mnemonic = "stur"; + form = form_h; + break; + case STUR_s: + mnemonic = "stur"; + form = form_s; + break; + case STUR_d: + mnemonic = "stur"; + form = form_d; + break; + case STUR_q: + mnemonic = "stur"; + form = form_q; + break; + case LDURB_w: + mnemonic = "ldurb"; + break; + case LDURH_w: + mnemonic = "ldurh"; + break; + case LDUR_w: + mnemonic = "ldur"; + break; + case LDUR_x: + mnemonic = "ldur"; + form = form_x; + break; + case LDUR_b: + mnemonic = "ldur"; + form = form_b; + break; + case LDUR_h: + mnemonic = "ldur"; + form = form_h; + break; + case LDUR_s: + mnemonic = "ldur"; + form = form_s; + break; + case LDUR_d: + mnemonic = "ldur"; + form = form_d; + break; + case LDUR_q: + mnemonic = "ldur"; + form = form_q; + break; + case LDURSB_x: + form = form_x; + VIXL_FALLTHROUGH(); + case LDURSB_w: + mnemonic = "ldursb"; + break; + case LDURSH_x: + form = form_x; + VIXL_FALLTHROUGH(); + case LDURSH_w: + mnemonic = "ldursh"; + break; + case LDURSW_x: + mnemonic = "ldursw"; + form = form_x; + break; + case PRFUM: + mnemonic = "prfum"; + form = form_prefetch; + break; + default: + form = "(LoadStoreUnscaledOffset)"; + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitLoadLiteral(const Instruction *instr) { + const char *mnemonic = "ldr"; + const char *form = "(LoadLiteral)"; + + switch (instr->Mask(LoadLiteralMask)) { + case LDR_w_lit: + form = "'Wt, 'ILLiteral 'LValue"; + break; + case LDR_x_lit: + form = "'Xt, 'ILLiteral 'LValue"; + break; + case LDR_s_lit: + form = "'St, 'ILLiteral 'LValue"; + break; + case LDR_d_lit: + form = "'Dt, 'ILLiteral 'LValue"; + break; + case LDR_q_lit: + form = "'Qt, 'ILLiteral 'LValue"; + break; + case LDRSW_x_lit: { + mnemonic = "ldrsw"; + form = "'Xt, 'ILLiteral 'LValue"; + break; + } + case PRFM_lit: { + mnemonic = "prfm"; + form = "'prefOp, 'ILLiteral 'LValue"; + break; + } + default: + mnemonic = "unimplemented"; + } + Format(instr, mnemonic, form); +} + + +#define LOAD_STORE_PAIR_LIST(V) \ + V(STP_w, "stp", "'Wt, 'Wt2", "2") \ + V(LDP_w, "ldp", "'Wt, 'Wt2", "2") \ + V(LDPSW_x, "ldpsw", "'Xt, 'Xt2", "2") \ + V(STP_x, "stp", "'Xt, 'Xt2", "3") \ + V(LDP_x, "ldp", "'Xt, 'Xt2", "3") \ + V(STP_s, "stp", "'St, 'St2", "2") \ + V(LDP_s, "ldp", "'St, 'St2", "2") \ + V(STP_d, "stp", "'Dt, 'Dt2", "3") \ + V(LDP_d, "ldp", "'Dt, 'Dt2", "3") \ + V(LDP_q, "ldp", "'Qt, 'Qt2", "4") \ + V(STP_q, "stp", "'Qt, 'Qt2", "4") + +void Disassembler::VisitLoadStorePairPostIndex(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(LoadStorePairPostIndex)"; + + switch (instr->Mask(LoadStorePairPostIndexMask)) { +#define LSP_POSTINDEX(A, B, C, D) \ + case A##_post: \ + mnemonic = B; \ + form = C ", ['Xns]'ILP" D "i"; \ + break; + LOAD_STORE_PAIR_LIST(LSP_POSTINDEX) +#undef LSP_POSTINDEX + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitLoadStorePairPreIndex(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(LoadStorePairPreIndex)"; + + switch (instr->Mask(LoadStorePairPreIndexMask)) { +#define LSP_PREINDEX(A, B, C, D) \ + case A##_pre: \ + mnemonic = B; \ + form = C ", ['Xns'ILP" D "i]!"; \ + break; + LOAD_STORE_PAIR_LIST(LSP_PREINDEX) +#undef LSP_PREINDEX + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitLoadStorePairOffset(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(LoadStorePairOffset)"; + + switch (instr->Mask(LoadStorePairOffsetMask)) { +#define LSP_OFFSET(A, B, C, D) \ + case A##_off: \ + mnemonic = B; \ + form = C ", ['Xns'ILP" D "]"; \ + break; + LOAD_STORE_PAIR_LIST(LSP_OFFSET) +#undef LSP_OFFSET + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitLoadStorePairNonTemporal(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form; + + switch (instr->Mask(LoadStorePairNonTemporalMask)) { + case STNP_w: + mnemonic = "stnp"; + form = "'Wt, 'Wt2, ['Xns'ILP2]"; + break; + case LDNP_w: + mnemonic = "ldnp"; + form = "'Wt, 'Wt2, ['Xns'ILP2]"; + break; + case STNP_x: + mnemonic = "stnp"; + form = "'Xt, 'Xt2, ['Xns'ILP3]"; + break; + case LDNP_x: + mnemonic = "ldnp"; + form = "'Xt, 'Xt2, ['Xns'ILP3]"; + break; + case STNP_s: + mnemonic = "stnp"; + form = "'St, 'St2, ['Xns'ILP2]"; + break; + case LDNP_s: + mnemonic = "ldnp"; + form = "'St, 'St2, ['Xns'ILP2]"; + break; + case STNP_d: + mnemonic = "stnp"; + form = "'Dt, 'Dt2, ['Xns'ILP3]"; + break; + case LDNP_d: + mnemonic = "ldnp"; + form = "'Dt, 'Dt2, ['Xns'ILP3]"; + break; + case STNP_q: + mnemonic = "stnp"; + form = "'Qt, 'Qt2, ['Xns'ILP4]"; + break; + case LDNP_q: + mnemonic = "ldnp"; + form = "'Qt, 'Qt2, ['Xns'ILP4]"; + break; + default: + form = "(LoadStorePairNonTemporal)"; + } + Format(instr, mnemonic, form); +} + +// clang-format off +#define LOAD_STORE_EXCLUSIVE_LIST(V) \ + V(STXRB_w, "stxrb", "'Ws, 'Wt") \ + V(STXRH_w, "stxrh", "'Ws, 'Wt") \ + V(STXR_w, "stxr", "'Ws, 'Wt") \ + V(STXR_x, "stxr", "'Ws, 'Xt") \ + V(LDXRB_w, "ldxrb", "'Wt") \ + V(LDXRH_w, "ldxrh", "'Wt") \ + V(LDXR_w, "ldxr", "'Wt") \ + V(LDXR_x, "ldxr", "'Xt") \ + V(STXP_w, "stxp", "'Ws, 'Wt, 'Wt2") \ + V(STXP_x, "stxp", "'Ws, 'Xt, 'Xt2") \ + V(LDXP_w, "ldxp", "'Wt, 'Wt2") \ + V(LDXP_x, "ldxp", "'Xt, 'Xt2") \ + V(STLXRB_w, "stlxrb", "'Ws, 'Wt") \ + V(STLXRH_w, "stlxrh", "'Ws, 'Wt") \ + V(STLXR_w, "stlxr", "'Ws, 'Wt") \ + V(STLXR_x, "stlxr", "'Ws, 'Xt") \ + V(LDAXRB_w, "ldaxrb", "'Wt") \ + V(LDAXRH_w, "ldaxrh", "'Wt") \ + V(LDAXR_w, "ldaxr", "'Wt") \ + V(LDAXR_x, "ldaxr", "'Xt") \ + V(STLXP_w, "stlxp", "'Ws, 'Wt, 'Wt2") \ + V(STLXP_x, "stlxp", "'Ws, 'Xt, 'Xt2") \ + V(LDAXP_w, "ldaxp", "'Wt, 'Wt2") \ + V(LDAXP_x, "ldaxp", "'Xt, 'Xt2") \ + V(STLRB_w, "stlrb", "'Wt") \ + V(STLRH_w, "stlrh", "'Wt") \ + V(STLR_w, "stlr", "'Wt") \ + V(STLR_x, "stlr", "'Xt") \ + V(LDARB_w, "ldarb", "'Wt") \ + V(LDARH_w, "ldarh", "'Wt") \ + V(LDAR_w, "ldar", "'Wt") \ + V(LDAR_x, "ldar", "'Xt") \ + V(STLLRB, "stllrb", "'Wt") \ + V(STLLRH, "stllrh", "'Wt") \ + V(STLLR_w, "stllr", "'Wt") \ + V(STLLR_x, "stllr", "'Xt") \ + V(LDLARB, "ldlarb", "'Wt") \ + V(LDLARH, "ldlarh", "'Wt") \ + V(LDLAR_w, "ldlar", "'Wt") \ + V(LDLAR_x, "ldlar", "'Xt") \ + V(CAS_w, "cas", "'Ws, 'Wt") \ + V(CAS_x, "cas", "'Xs, 'Xt") \ + V(CASA_w, "casa", "'Ws, 'Wt") \ + V(CASA_x, "casa", "'Xs, 'Xt") \ + V(CASL_w, "casl", "'Ws, 'Wt") \ + V(CASL_x, "casl", "'Xs, 'Xt") \ + V(CASAL_w, "casal", "'Ws, 'Wt") \ + V(CASAL_x, "casal", "'Xs, 'Xt") \ + V(CASB, "casb", "'Ws, 'Wt") \ + V(CASAB, "casab", "'Ws, 'Wt") \ + V(CASLB, "caslb", "'Ws, 'Wt") \ + V(CASALB, "casalb", "'Ws, 'Wt") \ + V(CASH, "cash", "'Ws, 'Wt") \ + V(CASAH, "casah", "'Ws, 'Wt") \ + V(CASLH, "caslh", "'Ws, 'Wt") \ + V(CASALH, "casalh", "'Ws, 'Wt") \ + V(CASP_w, "casp", "'Ws, 'Ws+, 'Wt, 'Wt+") \ + V(CASP_x, "casp", "'Xs, 'Xs+, 'Xt, 'Xt+") \ + V(CASPA_w, "caspa", "'Ws, 'Ws+, 'Wt, 'Wt+") \ + V(CASPA_x, "caspa", "'Xs, 'Xs+, 'Xt, 'Xt+") \ + V(CASPL_w, "caspl", "'Ws, 'Ws+, 'Wt, 'Wt+") \ + V(CASPL_x, "caspl", "'Xs, 'Xs+, 'Xt, 'Xt+") \ + V(CASPAL_w, "caspal", "'Ws, 'Ws+, 'Wt, 'Wt+") \ + V(CASPAL_x, "caspal", "'Xs, 'Xs+, 'Xt, 'Xt+") +// clang-format on + + +void Disassembler::VisitLoadStoreExclusive(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form; + + switch (instr->Mask(LoadStoreExclusiveMask)) { +#define LSX(A, B, C) \ + case A: \ + mnemonic = B; \ + form = C ", ['Xns]"; \ + break; + LOAD_STORE_EXCLUSIVE_LIST(LSX) +#undef LSX + default: + form = "(LoadStoreExclusive)"; + } + + switch (instr->Mask(LoadStoreExclusiveMask)) { + case CASP_w: + case CASP_x: + case CASPA_w: + case CASPA_x: + case CASPL_w: + case CASPL_x: + case CASPAL_w: + case CASPAL_x: + if ((instr->GetRs() % 2 == 1) || (instr->GetRt() % 2 == 1)) { + mnemonic = "unallocated"; + form = "(LoadStoreExclusive)"; + } + break; + } + + Format(instr, mnemonic, form); +} + +void Disassembler::VisitLoadStorePAC(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(LoadStorePAC)"; + + switch (instr->Mask(LoadStorePACMask)) { + case LDRAA: + mnemonic = "ldraa"; + form = "'Xt, ['Xns'ILA]"; + break; + case LDRAB: + mnemonic = "ldrab"; + form = "'Xt, ['Xns'ILA]"; + break; + case LDRAA_pre: + mnemonic = "ldraa"; + form = "'Xt, ['Xns'ILA]!"; + break; + case LDRAB_pre: + mnemonic = "ldrab"; + form = "'Xt, ['Xns'ILA]!"; + break; + } + + Format(instr, mnemonic, form); +} + +#define ATOMIC_MEMORY_SIMPLE_LIST(V) \ + V(LDADD, "add") \ + V(LDCLR, "clr") \ + V(LDEOR, "eor") \ + V(LDSET, "set") \ + V(LDSMAX, "smax") \ + V(LDSMIN, "smin") \ + V(LDUMAX, "umax") \ + V(LDUMIN, "umin") + +void Disassembler::VisitAtomicMemory(const Instruction *instr) { + const int kMaxAtomicOpMnemonicLength = 16; + const char *mnemonic; + const char *form = "'Ws, 'Wt, ['Xns]"; + + switch (instr->Mask(AtomicMemoryMask)) { +#define AMS(A, MN) \ + case A##B: \ + mnemonic = MN "b"; \ + break; \ + case A##AB: \ + mnemonic = MN "ab"; \ + break; \ + case A##LB: \ + mnemonic = MN "lb"; \ + break; \ + case A##ALB: \ + mnemonic = MN "alb"; \ + break; \ + case A##H: \ + mnemonic = MN "h"; \ + break; \ + case A##AH: \ + mnemonic = MN "ah"; \ + break; \ + case A##LH: \ + mnemonic = MN "lh"; \ + break; \ + case A##ALH: \ + mnemonic = MN "alh"; \ + break; \ + case A##_w: \ + mnemonic = MN; \ + break; \ + case A##A_w: \ + mnemonic = MN "a"; \ + break; \ + case A##L_w: \ + mnemonic = MN "l"; \ + break; \ + case A##AL_w: \ + mnemonic = MN "al"; \ + break; \ + case A##_x: \ + mnemonic = MN; \ + form = "'Xs, 'Xt, ['Xns]"; \ + break; \ + case A##A_x: \ + mnemonic = MN "a"; \ + form = "'Xs, 'Xt, ['Xns]"; \ + break; \ + case A##L_x: \ + mnemonic = MN "l"; \ + form = "'Xs, 'Xt, ['Xns]"; \ + break; \ + case A##AL_x: \ + mnemonic = MN "al"; \ + form = "'Xs, 'Xt, ['Xns]"; \ + break; + ATOMIC_MEMORY_SIMPLE_LIST(AMS) + + // SWP has the same semantics as ldadd etc but without the store aliases. + AMS(SWP, "swp") +#undef AMS + + case LDAPRB: + mnemonic = "ldaprb"; + form = "'Wt, ['Xns]"; + break; + case LDAPRH: + mnemonic = "ldaprh"; + form = "'Wt, ['Xns]"; + break; + case LDAPR_w: + mnemonic = "ldapr"; + form = "'Wt, ['Xns]"; + break; + case LDAPR_x: + mnemonic = "ldapr"; + form = "'Xt, ['Xns]"; + break; + default: + mnemonic = "unimplemented"; + form = "(AtomicMemory)"; + } + + const char *prefix = ""; + switch (instr->Mask(AtomicMemoryMask)) { +#define AMS(A, MN) \ + case A##AB: \ + case A##ALB: \ + case A##AH: \ + case A##ALH: \ + case A##A_w: \ + case A##AL_w: \ + case A##A_x: \ + case A##AL_x: \ + prefix = "ld"; \ + break; \ + case A##B: \ + case A##LB: \ + case A##H: \ + case A##LH: \ + case A##_w: \ + case A##L_w: { \ + prefix = "ld"; \ + unsigned rt = instr->GetRt(); \ + if (Register(rt, 32).IsZero()) { \ + prefix = "st"; \ + form = "'Ws, ['Xns]"; \ + } \ + break; \ + } \ + case A##_x: \ + case A##L_x: { \ + prefix = "ld"; \ + unsigned rt = instr->GetRt(); \ + if (Register(rt, 64).IsZero()) { \ + prefix = "st"; \ + form = "'Xs, ['Xns]"; \ + } \ + break; \ + } + ATOMIC_MEMORY_SIMPLE_LIST(AMS) +#undef AMS + } + + char buffer[kMaxAtomicOpMnemonicLength]; + if (strlen(prefix) > 0) { + _snprintf_s(buffer, kMaxAtomicOpMnemonicLength, -1, "%s%s", prefix, mnemonic); + mnemonic = buffer; + } + + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitFPCompare(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Fn, 'Fm"; + const char *form_zero = "'Fn, #0.0"; + + switch (instr->Mask(FPCompareMask)) { + case FCMP_h_zero: + case FCMP_s_zero: + case FCMP_d_zero: + form = form_zero; + VIXL_FALLTHROUGH(); + case FCMP_h: + case FCMP_s: + case FCMP_d: + mnemonic = "fcmp"; + break; + case FCMPE_h_zero: + case FCMPE_s_zero: + case FCMPE_d_zero: + form = form_zero; + VIXL_FALLTHROUGH(); + case FCMPE_h: + case FCMPE_s: + case FCMPE_d: + mnemonic = "fcmpe"; + break; + default: + form = "(FPCompare)"; + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitFPConditionalCompare(const Instruction *instr) { + const char *mnemonic = "unmplemented"; + const char *form = "'Fn, 'Fm, 'INzcv, 'Cond"; + + switch (instr->Mask(FPConditionalCompareMask)) { + case FCCMP_h: + case FCCMP_s: + case FCCMP_d: + mnemonic = "fccmp"; + break; + case FCCMPE_h: + case FCCMPE_s: + case FCCMPE_d: + mnemonic = "fccmpe"; + break; + default: + form = "(FPConditionalCompare)"; + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitFPConditionalSelect(const Instruction *instr) { + const char *mnemonic = ""; + const char *form = "'Fd, 'Fn, 'Fm, 'Cond"; + + switch (instr->Mask(FPConditionalSelectMask)) { + case FCSEL_h: + case FCSEL_s: + case FCSEL_d: + mnemonic = "fcsel"; + break; + default: + VIXL_UNREACHABLE(); + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitFPDataProcessing1Source(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Fd, 'Fn"; + + switch (instr->Mask(FPDataProcessing1SourceMask)) { +#define FORMAT(A, B) \ + case A##_h: \ + case A##_s: \ + case A##_d: \ + mnemonic = B; \ + break; + FORMAT(FMOV, "fmov"); + FORMAT(FABS, "fabs"); + FORMAT(FNEG, "fneg"); + FORMAT(FSQRT, "fsqrt"); + FORMAT(FRINTN, "frintn"); + FORMAT(FRINTP, "frintp"); + FORMAT(FRINTM, "frintm"); + FORMAT(FRINTZ, "frintz"); + FORMAT(FRINTA, "frinta"); + FORMAT(FRINTX, "frintx"); + FORMAT(FRINTI, "frinti"); +#undef FORMAT +#define FORMAT(A, B) \ + case A##_s: \ + case A##_d: \ + mnemonic = B; \ + break; + FORMAT(FRINT32X, "frint32x"); + FORMAT(FRINT32Z, "frint32z"); + FORMAT(FRINT64X, "frint64x"); + FORMAT(FRINT64Z, "frint64z"); +#undef FORMAT + case FCVT_ds: + mnemonic = "fcvt"; + form = "'Dd, 'Sn"; + break; + case FCVT_sd: + mnemonic = "fcvt"; + form = "'Sd, 'Dn"; + break; + case FCVT_hs: + mnemonic = "fcvt"; + form = "'Hd, 'Sn"; + break; + case FCVT_sh: + mnemonic = "fcvt"; + form = "'Sd, 'Hn"; + break; + case FCVT_dh: + mnemonic = "fcvt"; + form = "'Dd, 'Hn"; + break; + case FCVT_hd: + mnemonic = "fcvt"; + form = "'Hd, 'Dn"; + break; + default: + form = "(FPDataProcessing1Source)"; + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitFPDataProcessing2Source(const Instruction *instr) { + const char *mnemonic = ""; + const char *form = "'Fd, 'Fn, 'Fm"; + + switch (instr->Mask(FPDataProcessing2SourceMask)) { +#define FORMAT(A, B) \ + case A##_h: \ + case A##_s: \ + case A##_d: \ + mnemonic = B; \ + break; + FORMAT(FADD, "fadd"); + FORMAT(FSUB, "fsub"); + FORMAT(FMUL, "fmul"); + FORMAT(FDIV, "fdiv"); + FORMAT(FMAX, "fmax"); + FORMAT(FMIN, "fmin"); + FORMAT(FMAXNM, "fmaxnm"); + FORMAT(FMINNM, "fminnm"); + FORMAT(FNMUL, "fnmul"); +#undef FORMAT + default: + VIXL_UNREACHABLE(); + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitFPDataProcessing3Source(const Instruction *instr) { + const char *mnemonic = ""; + const char *form = "'Fd, 'Fn, 'Fm, 'Fa"; + + switch (instr->Mask(FPDataProcessing3SourceMask)) { +#define FORMAT(A, B) \ + case A##_h: \ + case A##_s: \ + case A##_d: \ + mnemonic = B; \ + break; + FORMAT(FMADD, "fmadd"); + FORMAT(FMSUB, "fmsub"); + FORMAT(FNMADD, "fnmadd"); + FORMAT(FNMSUB, "fnmsub"); +#undef FORMAT + default: + VIXL_UNREACHABLE(); + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitFPImmediate(const Instruction *instr) { + const char *mnemonic = ""; + const char *form = "(FPImmediate)"; + switch (instr->Mask(FPImmediateMask)) { + case FMOV_h_imm: + mnemonic = "fmov"; + form = "'Hd, 'IFP"; + break; + case FMOV_s_imm: + mnemonic = "fmov"; + form = "'Sd, 'IFP"; + break; + case FMOV_d_imm: + mnemonic = "fmov"; + form = "'Dd, 'IFP"; + break; + default: + VIXL_UNREACHABLE(); + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitFPIntegerConvert(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(FPIntegerConvert)"; + const char *form_rf = "'Rd, 'Fn"; + const char *form_fr = "'Fd, 'Rn"; + + switch (instr->Mask(FPIntegerConvertMask)) { + case FMOV_wh: + case FMOV_xh: + case FMOV_ws: + case FMOV_xd: + mnemonic = "fmov"; + form = form_rf; + break; + case FMOV_hw: + case FMOV_hx: + case FMOV_sw: + case FMOV_dx: + mnemonic = "fmov"; + form = form_fr; + break; + case FMOV_d1_x: + mnemonic = "fmov"; + form = "'Vd.D[1], 'Rn"; + break; + case FMOV_x_d1: + mnemonic = "fmov"; + form = "'Rd, 'Vn.D[1]"; + break; + case FCVTAS_wh: + case FCVTAS_xh: + case FCVTAS_ws: + case FCVTAS_xs: + case FCVTAS_wd: + case FCVTAS_xd: + mnemonic = "fcvtas"; + form = form_rf; + break; + case FCVTAU_wh: + case FCVTAU_xh: + case FCVTAU_ws: + case FCVTAU_xs: + case FCVTAU_wd: + case FCVTAU_xd: + mnemonic = "fcvtau"; + form = form_rf; + break; + case FCVTMS_wh: + case FCVTMS_xh: + case FCVTMS_ws: + case FCVTMS_xs: + case FCVTMS_wd: + case FCVTMS_xd: + mnemonic = "fcvtms"; + form = form_rf; + break; + case FCVTMU_wh: + case FCVTMU_xh: + case FCVTMU_ws: + case FCVTMU_xs: + case FCVTMU_wd: + case FCVTMU_xd: + mnemonic = "fcvtmu"; + form = form_rf; + break; + case FCVTNS_wh: + case FCVTNS_xh: + case FCVTNS_ws: + case FCVTNS_xs: + case FCVTNS_wd: + case FCVTNS_xd: + mnemonic = "fcvtns"; + form = form_rf; + break; + case FCVTNU_wh: + case FCVTNU_xh: + case FCVTNU_ws: + case FCVTNU_xs: + case FCVTNU_wd: + case FCVTNU_xd: + mnemonic = "fcvtnu"; + form = form_rf; + break; + case FCVTZU_wh: + case FCVTZU_xh: + case FCVTZU_ws: + case FCVTZU_xs: + case FCVTZU_wd: + case FCVTZU_xd: + mnemonic = "fcvtzu"; + form = form_rf; + break; + case FCVTZS_wh: + case FCVTZS_xh: + case FCVTZS_ws: + case FCVTZS_xs: + case FCVTZS_wd: + case FCVTZS_xd: + mnemonic = "fcvtzs"; + form = form_rf; + break; + case FCVTPU_wh: + case FCVTPU_xh: + case FCVTPU_xs: + case FCVTPU_wd: + case FCVTPU_ws: + case FCVTPU_xd: + mnemonic = "fcvtpu"; + form = form_rf; + break; + case FCVTPS_wh: + case FCVTPS_xh: + case FCVTPS_ws: + case FCVTPS_xs: + case FCVTPS_wd: + case FCVTPS_xd: + mnemonic = "fcvtps"; + form = form_rf; + break; + case SCVTF_hw: + case SCVTF_hx: + case SCVTF_sw: + case SCVTF_sx: + case SCVTF_dw: + case SCVTF_dx: + mnemonic = "scvtf"; + form = form_fr; + break; + case UCVTF_hw: + case UCVTF_hx: + case UCVTF_sw: + case UCVTF_sx: + case UCVTF_dw: + case UCVTF_dx: + mnemonic = "ucvtf"; + form = form_fr; + break; + case FJCVTZS: + mnemonic = "fjcvtzs"; + form = form_rf; + break; + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitFPFixedPointConvert(const Instruction *instr) { + const char *mnemonic = ""; + const char *form = "'Rd, 'Fn, 'IFPFBits"; + const char *form_fr = "'Fd, 'Rn, 'IFPFBits"; + + switch (instr->Mask(FPFixedPointConvertMask)) { + case FCVTZS_wh_fixed: + case FCVTZS_xh_fixed: + case FCVTZS_ws_fixed: + case FCVTZS_xs_fixed: + case FCVTZS_wd_fixed: + case FCVTZS_xd_fixed: + mnemonic = "fcvtzs"; + break; + case FCVTZU_wh_fixed: + case FCVTZU_xh_fixed: + case FCVTZU_ws_fixed: + case FCVTZU_xs_fixed: + case FCVTZU_wd_fixed: + case FCVTZU_xd_fixed: + mnemonic = "fcvtzu"; + break; + case SCVTF_hw_fixed: + case SCVTF_hx_fixed: + case SCVTF_sw_fixed: + case SCVTF_sx_fixed: + case SCVTF_dw_fixed: + case SCVTF_dx_fixed: + mnemonic = "scvtf"; + form = form_fr; + break; + case UCVTF_hw_fixed: + case UCVTF_hx_fixed: + case UCVTF_sw_fixed: + case UCVTF_sx_fixed: + case UCVTF_dw_fixed: + case UCVTF_dx_fixed: + mnemonic = "ucvtf"; + form = form_fr; + break; + default: + VIXL_UNREACHABLE(); + } + Format(instr, mnemonic, form); +} + +// clang-format off +#define PAUTH_SYSTEM_MNEMONICS(V) \ + V(PACIA1716, "pacia1716") \ + V(PACIB1716, "pacib1716") \ + V(AUTIA1716, "autia1716") \ + V(AUTIB1716, "autib1716") \ + V(PACIAZ, "paciaz") \ + V(PACIASP, "paciasp") \ + V(PACIBZ, "pacibz") \ + V(PACIBSP, "pacibsp") \ + V(AUTIAZ, "autiaz") \ + V(AUTIASP, "autiasp") \ + V(AUTIBZ, "autibz") \ + V(AUTIBSP, "autibsp") +// clang-format on + +void Disassembler::VisitSystem(const Instruction *instr) { + // Some system instructions hijack their Op and Cp fields to represent a + // range of immediates instead of indicating a different instruction. This + // makes the decoding tricky. + const char *mnemonic = "unimplemented"; + const char *form = "(System)"; + if (instr->GetInstructionBits() == XPACLRI) { + mnemonic = "xpaclri"; + form = NULL; + } else if (instr->Mask(SystemPStateFMask) == SystemPStateFixed) { + switch (instr->Mask(SystemPStateMask)) { + case CFINV: + mnemonic = "cfinv"; + form = NULL; + break; + case AXFLAG: + mnemonic = "axflag"; + form = NULL; + break; + case XAFLAG: + mnemonic = "xaflag"; + form = NULL; + break; + } + } else if (instr->Mask(SystemPAuthFMask) == SystemPAuthFixed) { + switch (instr->Mask(SystemPAuthMask)) { +#define PAUTH_CASE(NAME, MN) \ + case NAME: \ + mnemonic = MN; \ + form = NULL; \ + break; + + PAUTH_SYSTEM_MNEMONICS(PAUTH_CASE) +#undef PAUTH_CASE + } + } else if (instr->Mask(SystemExclusiveMonitorFMask) == + SystemExclusiveMonitorFixed) { + switch (instr->Mask(SystemExclusiveMonitorMask)) { + case CLREX: { + mnemonic = "clrex"; + form = (instr->GetCRm() == 0xf) ? NULL : "'IX"; + break; + } + } + } else if (instr->Mask(SystemSysRegFMask) == SystemSysRegFixed) { + switch (instr->Mask(SystemSysRegMask)) { + case MRS: { + mnemonic = "mrs"; + form = "'Xt, 'IY"; + break; + } + case MSR: { + mnemonic = "msr"; + form = "'IY, 'Xt"; + break; + } + } + } else if (instr->Mask(SystemHintFMask) == SystemHintFixed) { + form = NULL; + switch (instr->GetImmHint()) { + case NOP: + mnemonic = "nop"; + break; + case YIELD: + mnemonic = "yield"; + break; + case WFE: + mnemonic = "wfe"; + break; + case WFI: + mnemonic = "wfi"; + break; + case SEV: + mnemonic = "sev"; + break; + case SEVL: + mnemonic = "sevl"; + break; + case ESB: + mnemonic = "esb"; + break; + case CSDB: + mnemonic = "csdb"; + break; + case BTI: + mnemonic = "bti"; + break; + case BTI_c: + mnemonic = "bti c"; + break; + case BTI_j: + mnemonic = "bti j"; + break; + case BTI_jc: + mnemonic = "bti jc"; + break; + default: + // Fall back to 'hint #'. + form = "'IH"; + mnemonic = "hint"; + break; + } + } else if (instr->Mask(MemBarrierFMask) == MemBarrierFixed) { + switch (instr->Mask(MemBarrierMask)) { + case DMB: { + mnemonic = "dmb"; + form = "'M"; + break; + } + case DSB: { + mnemonic = "dsb"; + form = "'M"; + break; + } + case ISB: { + mnemonic = "isb"; + form = NULL; + break; + } + } + } else if (instr->Mask(SystemSysFMask) == SystemSysFixed) { + switch (instr->GetSysOp()) { + case IVAU: + mnemonic = "ic"; + form = "ivau, 'Xt"; + break; + case CVAC: + mnemonic = "dc"; + form = "cvac, 'Xt"; + break; + case CVAU: + mnemonic = "dc"; + form = "cvau, 'Xt"; + break; + case CVAP: + mnemonic = "dc"; + form = "cvap, 'Xt"; + break; + case CVADP: + mnemonic = "dc"; + form = "cvadp, 'Xt"; + break; + case CIVAC: + mnemonic = "dc"; + form = "civac, 'Xt"; + break; + case ZVA: + mnemonic = "dc"; + form = "zva, 'Xt"; + break; + default: + mnemonic = "sys"; + if (instr->GetRt() == 31) { + form = "'G1, 'Kn, 'Km, 'G2"; + } else { + form = "'G1, 'Kn, 'Km, 'G2, 'Xt"; + } + break; + } + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitException(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'IDebug"; + + switch (instr->Mask(ExceptionMask)) { + case HLT: + mnemonic = "hlt"; + break; + case BRK: + mnemonic = "brk"; + break; + case SVC: + mnemonic = "svc"; + break; + case HVC: + mnemonic = "hvc"; + break; + case SMC: + mnemonic = "smc"; + break; + case DCPS1: + mnemonic = "dcps1"; + form = "{'IDebug}"; + break; + case DCPS2: + mnemonic = "dcps2"; + form = "{'IDebug}"; + break; + case DCPS3: + mnemonic = "dcps3"; + form = "{'IDebug}"; + break; + default: + form = "(Exception)"; + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitCrypto2RegSHA(const Instruction *instr) { + VisitUnimplemented(instr); +} + + +void Disassembler::VisitCrypto3RegSHA(const Instruction *instr) { + VisitUnimplemented(instr); +} + + +void Disassembler::VisitCryptoAES(const Instruction *instr) { + VisitUnimplemented(instr); +} + + +void Disassembler::VisitNEON2RegMisc(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Vd.%s, 'Vn.%s"; + const char *form_cmp_zero = "'Vd.%s, 'Vn.%s, #0"; + const char *form_fcmp_zero = "'Vd.%s, 'Vn.%s, #0.0"; + NEONFormatDecoder nfd(instr); + + static const NEONFormatMap map_lp_ta = + {{23, 22, 30}, {NF_4H, NF_8H, NF_2S, NF_4S, NF_1D, NF_2D}}; + + static const NEONFormatMap map_cvt_ta = {{22}, {NF_4S, NF_2D}}; + + static const NEONFormatMap map_cvt_tb = {{22, 30}, + {NF_4H, NF_8H, NF_2S, NF_4S}}; + + if (instr->Mask(NEON2RegMiscOpcode) <= NEON_NEG_opcode) { + // These instructions all use a two bit size field, except NOT and RBIT, + // which use the field to encode the operation. + switch (instr->Mask(NEON2RegMiscMask)) { + case NEON_REV64: + mnemonic = "rev64"; + break; + case NEON_REV32: + mnemonic = "rev32"; + break; + case NEON_REV16: + mnemonic = "rev16"; + break; + case NEON_SADDLP: + mnemonic = "saddlp"; + nfd.SetFormatMap(0, &map_lp_ta); + break; + case NEON_UADDLP: + mnemonic = "uaddlp"; + nfd.SetFormatMap(0, &map_lp_ta); + break; + case NEON_SUQADD: + mnemonic = "suqadd"; + break; + case NEON_USQADD: + mnemonic = "usqadd"; + break; + case NEON_CLS: + mnemonic = "cls"; + break; + case NEON_CLZ: + mnemonic = "clz"; + break; + case NEON_CNT: + mnemonic = "cnt"; + break; + case NEON_SADALP: + mnemonic = "sadalp"; + nfd.SetFormatMap(0, &map_lp_ta); + break; + case NEON_UADALP: + mnemonic = "uadalp"; + nfd.SetFormatMap(0, &map_lp_ta); + break; + case NEON_SQABS: + mnemonic = "sqabs"; + break; + case NEON_SQNEG: + mnemonic = "sqneg"; + break; + case NEON_CMGT_zero: + mnemonic = "cmgt"; + form = form_cmp_zero; + break; + case NEON_CMGE_zero: + mnemonic = "cmge"; + form = form_cmp_zero; + break; + case NEON_CMEQ_zero: + mnemonic = "cmeq"; + form = form_cmp_zero; + break; + case NEON_CMLE_zero: + mnemonic = "cmle"; + form = form_cmp_zero; + break; + case NEON_CMLT_zero: + mnemonic = "cmlt"; + form = form_cmp_zero; + break; + case NEON_ABS: + mnemonic = "abs"; + break; + case NEON_NEG: + mnemonic = "neg"; + break; + case NEON_RBIT_NOT: + switch (instr->GetFPType()) { + case 0: + mnemonic = "mvn"; + break; + case 1: + mnemonic = "rbit"; + break; + default: + form = "(NEON2RegMisc)"; + } + nfd.SetFormatMaps(nfd.LogicalFormatMap()); + break; + } + } else { + // These instructions all use a one bit size field, except XTN, SQXTUN, + // SHLL, SQXTN and UQXTN, which use a two bit size field. + nfd.SetFormatMaps(nfd.FPFormatMap()); + switch (instr->Mask(NEON2RegMiscFPMask)) { + case NEON_FABS: + mnemonic = "fabs"; + break; + case NEON_FNEG: + mnemonic = "fneg"; + break; + case NEON_FCVTN: + mnemonic = instr->Mask(NEON_Q) ? "fcvtn2" : "fcvtn"; + nfd.SetFormatMap(0, &map_cvt_tb); + nfd.SetFormatMap(1, &map_cvt_ta); + break; + case NEON_FCVTXN: + mnemonic = instr->Mask(NEON_Q) ? "fcvtxn2" : "fcvtxn"; + nfd.SetFormatMap(0, &map_cvt_tb); + nfd.SetFormatMap(1, &map_cvt_ta); + break; + case NEON_FCVTL: + mnemonic = instr->Mask(NEON_Q) ? "fcvtl2" : "fcvtl"; + nfd.SetFormatMap(0, &map_cvt_ta); + nfd.SetFormatMap(1, &map_cvt_tb); + break; + case NEON_FRINT32X: + mnemonic = "frint32x"; + break; + case NEON_FRINT32Z: + mnemonic = "frint32z"; + break; + case NEON_FRINT64X: + mnemonic = "frint64x"; + break; + case NEON_FRINT64Z: + mnemonic = "frint64z"; + break; + case NEON_FRINTN: + mnemonic = "frintn"; + break; + case NEON_FRINTA: + mnemonic = "frinta"; + break; + case NEON_FRINTP: + mnemonic = "frintp"; + break; + case NEON_FRINTM: + mnemonic = "frintm"; + break; + case NEON_FRINTX: + mnemonic = "frintx"; + break; + case NEON_FRINTZ: + mnemonic = "frintz"; + break; + case NEON_FRINTI: + mnemonic = "frinti"; + break; + case NEON_FCVTNS: + mnemonic = "fcvtns"; + break; + case NEON_FCVTNU: + mnemonic = "fcvtnu"; + break; + case NEON_FCVTPS: + mnemonic = "fcvtps"; + break; + case NEON_FCVTPU: + mnemonic = "fcvtpu"; + break; + case NEON_FCVTMS: + mnemonic = "fcvtms"; + break; + case NEON_FCVTMU: + mnemonic = "fcvtmu"; + break; + case NEON_FCVTZS: + mnemonic = "fcvtzs"; + break; + case NEON_FCVTZU: + mnemonic = "fcvtzu"; + break; + case NEON_FCVTAS: + mnemonic = "fcvtas"; + break; + case NEON_FCVTAU: + mnemonic = "fcvtau"; + break; + case NEON_FSQRT: + mnemonic = "fsqrt"; + break; + case NEON_SCVTF: + mnemonic = "scvtf"; + break; + case NEON_UCVTF: + mnemonic = "ucvtf"; + break; + case NEON_URSQRTE: + mnemonic = "ursqrte"; + break; + case NEON_URECPE: + mnemonic = "urecpe"; + break; + case NEON_FRSQRTE: + mnemonic = "frsqrte"; + break; + case NEON_FRECPE: + mnemonic = "frecpe"; + break; + case NEON_FCMGT_zero: + mnemonic = "fcmgt"; + form = form_fcmp_zero; + break; + case NEON_FCMGE_zero: + mnemonic = "fcmge"; + form = form_fcmp_zero; + break; + case NEON_FCMEQ_zero: + mnemonic = "fcmeq"; + form = form_fcmp_zero; + break; + case NEON_FCMLE_zero: + mnemonic = "fcmle"; + form = form_fcmp_zero; + break; + case NEON_FCMLT_zero: + mnemonic = "fcmlt"; + form = form_fcmp_zero; + break; + default: + if ((NEON_XTN_opcode <= instr->Mask(NEON2RegMiscOpcode)) && + (instr->Mask(NEON2RegMiscOpcode) <= NEON_UQXTN_opcode)) { + nfd.SetFormatMap(0, nfd.IntegerFormatMap()); + nfd.SetFormatMap(1, nfd.LongIntegerFormatMap()); + + switch (instr->Mask(NEON2RegMiscMask)) { + case NEON_XTN: + mnemonic = "xtn"; + break; + case NEON_SQXTN: + mnemonic = "sqxtn"; + break; + case NEON_UQXTN: + mnemonic = "uqxtn"; + break; + case NEON_SQXTUN: + mnemonic = "sqxtun"; + break; + case NEON_SHLL: + mnemonic = "shll"; + nfd.SetFormatMap(0, nfd.LongIntegerFormatMap()); + nfd.SetFormatMap(1, nfd.IntegerFormatMap()); + switch (instr->GetNEONSize()) { + case 0: + form = "'Vd.%s, 'Vn.%s, #8"; + break; + case 1: + form = "'Vd.%s, 'Vn.%s, #16"; + break; + case 2: + form = "'Vd.%s, 'Vn.%s, #32"; + break; + default: + Format(instr, "unallocated", "(NEON2RegMisc)"); + return; + } + } + Format(instr, nfd.Mnemonic(mnemonic), nfd.Substitute(form)); + return; + } else { + form = "(NEON2RegMisc)"; + } + } + } + Format(instr, mnemonic, nfd.Substitute(form)); +} + +void Disassembler::VisitNEON2RegMiscFP16(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Vd.%s, 'Vn.%s"; + const char *form_cmp = "'Vd.%s, 'Vn.%s, #0.0"; + + static const NEONFormatMap map_half = {{30}, {NF_4H, NF_8H}}; + NEONFormatDecoder nfd(instr, &map_half); + + switch (instr->Mask(NEON2RegMiscFP16Mask)) { +// clang-format off +#define FORMAT(A, B) \ + case NEON_##A##_H: \ + mnemonic = B; \ + break; + FORMAT(FABS, "fabs") + FORMAT(FCVTAS, "fcvtas") + FORMAT(FCVTAU, "fcvtau") + FORMAT(FCVTMS, "fcvtms") + FORMAT(FCVTMU, "fcvtmu") + FORMAT(FCVTNS, "fcvtns") + FORMAT(FCVTNU, "fcvtnu") + FORMAT(FCVTPS, "fcvtps") + FORMAT(FCVTPU, "fcvtpu") + FORMAT(FCVTZS, "fcvtzs") + FORMAT(FCVTZU, "fcvtzu") + FORMAT(FNEG, "fneg") + FORMAT(FRECPE, "frecpe") + FORMAT(FRINTA, "frinta") + FORMAT(FRINTI, "frinti") + FORMAT(FRINTM, "frintm") + FORMAT(FRINTN, "frintn") + FORMAT(FRINTP, "frintp") + FORMAT(FRINTX, "frintx") + FORMAT(FRINTZ, "frintz") + FORMAT(FRSQRTE, "frsqrte") + FORMAT(FSQRT, "fsqrt") + FORMAT(SCVTF, "scvtf") + FORMAT(UCVTF, "ucvtf") +// clang-format on +#undef FORMAT + + case NEON_FCMEQ_H_zero: + mnemonic = "fcmeq"; + form = form_cmp; + break; + case NEON_FCMGT_H_zero: + mnemonic = "fcmgt"; + form = form_cmp; + break; + case NEON_FCMGE_H_zero: + mnemonic = "fcmge"; + form = form_cmp; + break; + case NEON_FCMLT_H_zero: + mnemonic = "fcmlt"; + form = form_cmp; + break; + case NEON_FCMLE_H_zero: + mnemonic = "fcmle"; + form = form_cmp; + break; + default: + form = "(NEON2RegMiscFP16)"; + } + Format(instr, mnemonic, nfd.Substitute(form)); +} + + +void Disassembler::VisitNEON3Same(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Vd.%s, 'Vn.%s, 'Vm.%s"; + NEONFormatDecoder nfd(instr); + + if (instr->Mask(NEON3SameLogicalFMask) == NEON3SameLogicalFixed) { + switch (instr->Mask(NEON3SameLogicalMask)) { + case NEON_AND: + mnemonic = "and"; + break; + case NEON_ORR: + mnemonic = "orr"; + if (instr->GetRm() == instr->GetRn()) { + mnemonic = "mov"; + form = "'Vd.%s, 'Vn.%s"; + } + break; + case NEON_ORN: + mnemonic = "orn"; + break; + case NEON_EOR: + mnemonic = "eor"; + break; + case NEON_BIC: + mnemonic = "bic"; + break; + case NEON_BIF: + mnemonic = "bif"; + break; + case NEON_BIT: + mnemonic = "bit"; + break; + case NEON_BSL: + mnemonic = "bsl"; + break; + default: + form = "(NEON3Same)"; + } + nfd.SetFormatMaps(nfd.LogicalFormatMap()); + } else { + static const char kUnknown[] = "unallocated"; + static const char *mnemonics[] = {"shadd", + "uhadd", + "shadd", + "uhadd", + "sqadd", + "uqadd", + "sqadd", + "uqadd", + "srhadd", + "urhadd", + "srhadd", + "urhadd", + // Handled by logical cases above. + NULL, + NULL, + NULL, + NULL, + "shsub", + "uhsub", + "shsub", + "uhsub", + "sqsub", + "uqsub", + "sqsub", + "uqsub", + "cmgt", + "cmhi", + "cmgt", + "cmhi", + "cmge", + "cmhs", + "cmge", + "cmhs", + "sshl", + "ushl", + "sshl", + "ushl", + "sqshl", + "uqshl", + "sqshl", + "uqshl", + "srshl", + "urshl", + "srshl", + "urshl", + "sqrshl", + "uqrshl", + "sqrshl", + "uqrshl", + "smax", + "umax", + "smax", + "umax", + "smin", + "umin", + "smin", + "umin", + "sabd", + "uabd", + "sabd", + "uabd", + "saba", + "uaba", + "saba", + "uaba", + "add", + "sub", + "add", + "sub", + "cmtst", + "cmeq", + "cmtst", + "cmeq", + "mla", + "mls", + "mla", + "mls", + "mul", + "pmul", + "mul", + "pmul", + "smaxp", + "umaxp", + "smaxp", + "umaxp", + "sminp", + "uminp", + "sminp", + "uminp", + "sqdmulh", + "sqrdmulh", + "sqdmulh", + "sqrdmulh", + "addp", + kUnknown, + "addp", + kUnknown, + "fmaxnm", + "fmaxnmp", + "fminnm", + "fminnmp", + "fmla", + kUnknown, // FMLAL2 or unallocated + "fmls", + kUnknown, // FMLSL2 or unallocated + "fadd", + "faddp", + "fsub", + "fabd", + "fmulx", + "fmul", + kUnknown, + kUnknown, + "fcmeq", + "fcmge", + kUnknown, + "fcmgt", + kUnknown, // FMLAL or unallocated + "facge", + kUnknown, // FMLSL or unallocated + "facgt", + "fmax", + "fmaxp", + "fmin", + "fminp", + "frecps", + "fdiv", + "frsqrts", + kUnknown}; + + // Operation is determined by the opcode bits (15-11), the top bit of + // size (23) and the U bit (29). + unsigned index = (instr->ExtractBits(15, 11) << 2) | + (instr->ExtractBit(23) << 1) | instr->ExtractBit(29); + VIXL_ASSERT(index < ArrayLength(mnemonics)); + mnemonic = mnemonics[index]; + // Assert that index is not one of the previously handled logical + // instructions. + VIXL_ASSERT(mnemonic != NULL); + + if (mnemonic == kUnknown) { + // Catch special cases where we need to check more bits than we have in + // the table index. Anything not matched here is unallocated. + + const char *fhm_form = (instr->Mask(NEON_Q) == 0) + ? "'Vd.2s, 'Vn.2h, 'Vm.2h" + : "'Vd.4s, 'Vn.4h, 'Vm.4h"; + switch (instr->Mask(NEON3SameFHMMask)) { + case NEON_FMLAL: + mnemonic = "fmlal"; + form = fhm_form; + break; + case NEON_FMLAL2: + mnemonic = "fmlal2"; + form = fhm_form; + break; + case NEON_FMLSL: + mnemonic = "fmlsl"; + form = fhm_form; + break; + case NEON_FMLSL2: + mnemonic = "fmlsl2"; + form = fhm_form; + break; + default: + VIXL_ASSERT(strcmp(mnemonic, "unallocated") == 0); + form = "(NEON3Same)"; + break; + } + } + + if (instr->Mask(NEON3SameFPFMask) == NEON3SameFPFixed) { + nfd.SetFormatMaps(nfd.FPFormatMap()); + } + } + Format(instr, mnemonic, nfd.Substitute(form)); +} + +void Disassembler::VisitNEON3SameFP16(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Vd.%s, 'Vn.%s, 'Vm.%s"; + + NEONFormatDecoder nfd(instr); + nfd.SetFormatMaps(nfd.FP16FormatMap()); + + switch (instr->Mask(NEON3SameFP16Mask)) { +#define FORMAT(A, B) \ + case NEON_##A##_H: \ + mnemonic = B; \ + break; + FORMAT(FMAXNM, "fmaxnm"); + FORMAT(FMLA, "fmla"); + FORMAT(FADD, "fadd"); + FORMAT(FMULX, "fmulx"); + FORMAT(FCMEQ, "fcmeq"); + FORMAT(FMAX, "fmax"); + FORMAT(FRECPS, "frecps"); + FORMAT(FMINNM, "fminnm"); + FORMAT(FMLS, "fmls"); + FORMAT(FSUB, "fsub"); + FORMAT(FMIN, "fmin"); + FORMAT(FRSQRTS, "frsqrts"); + FORMAT(FMAXNMP, "fmaxnmp"); + FORMAT(FADDP, "faddp"); + FORMAT(FMUL, "fmul"); + FORMAT(FCMGE, "fcmge"); + FORMAT(FACGE, "facge"); + FORMAT(FMAXP, "fmaxp"); + FORMAT(FDIV, "fdiv"); + FORMAT(FMINNMP, "fminnmp"); + FORMAT(FABD, "fabd"); + FORMAT(FCMGT, "fcmgt"); + FORMAT(FACGT, "facgt"); + FORMAT(FMINP, "fminp"); +#undef FORMAT + default: + form = "(NEON3SameFP16)"; + } + + Format(instr, mnemonic, nfd.Substitute(form)); +} + +void Disassembler::VisitNEON3SameExtra(const Instruction *instr) { + static const NEONFormatMap map_usdot = {{30}, {NF_8B, NF_16B}}; + + const char *mnemonic = "unallocated"; + const char *form = "(NEON3SameExtra)"; + + NEONFormatDecoder nfd(instr); + + if (instr->Mask(NEON3SameExtraFCMLAMask) == NEON_FCMLA) { + mnemonic = "fcmla"; + form = "'Vd.%s, 'Vn.%s, 'Vm.%s, 'IVFCNM"; + } else if (instr->Mask(NEON3SameExtraFCADDMask) == NEON_FCADD) { + mnemonic = "fcadd"; + form = "'Vd.%s, 'Vn.%s, 'Vm.%s, 'IVFCNA"; + } else { + form = "'Vd.%s, 'Vn.%s, 'Vm.%s"; + switch (instr->Mask(NEON3SameExtraMask)) { + case NEON_SDOT: + mnemonic = "sdot"; + nfd.SetFormatMap(1, &map_usdot); + nfd.SetFormatMap(2, &map_usdot); + break; + case NEON_SQRDMLAH: + mnemonic = "sqrdmlah"; + break; + case NEON_UDOT: + mnemonic = "udot"; + nfd.SetFormatMap(1, &map_usdot); + nfd.SetFormatMap(2, &map_usdot); + break; + case NEON_SQRDMLSH: + mnemonic = "sqrdmlsh"; + break; + } + } + + Format(instr, mnemonic, nfd.Substitute(form)); +} + + +void Disassembler::VisitNEON3Different(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Vd.%s, 'Vn.%s, 'Vm.%s"; + + NEONFormatDecoder nfd(instr); + nfd.SetFormatMap(0, nfd.LongIntegerFormatMap()); + + // Ignore the Q bit. Appending a "2" suffix is handled later. + switch (instr->Mask(NEON3DifferentMask) & ~NEON_Q) { + case NEON_PMULL: + mnemonic = "pmull"; + break; + case NEON_SABAL: + mnemonic = "sabal"; + break; + case NEON_SABDL: + mnemonic = "sabdl"; + break; + case NEON_SADDL: + mnemonic = "saddl"; + break; + case NEON_SMLAL: + mnemonic = "smlal"; + break; + case NEON_SMLSL: + mnemonic = "smlsl"; + break; + case NEON_SMULL: + mnemonic = "smull"; + break; + case NEON_SSUBL: + mnemonic = "ssubl"; + break; + case NEON_SQDMLAL: + mnemonic = "sqdmlal"; + break; + case NEON_SQDMLSL: + mnemonic = "sqdmlsl"; + break; + case NEON_SQDMULL: + mnemonic = "sqdmull"; + break; + case NEON_UABAL: + mnemonic = "uabal"; + break; + case NEON_UABDL: + mnemonic = "uabdl"; + break; + case NEON_UADDL: + mnemonic = "uaddl"; + break; + case NEON_UMLAL: + mnemonic = "umlal"; + break; + case NEON_UMLSL: + mnemonic = "umlsl"; + break; + case NEON_UMULL: + mnemonic = "umull"; + break; + case NEON_USUBL: + mnemonic = "usubl"; + break; + case NEON_SADDW: + mnemonic = "saddw"; + nfd.SetFormatMap(1, nfd.LongIntegerFormatMap()); + break; + case NEON_SSUBW: + mnemonic = "ssubw"; + nfd.SetFormatMap(1, nfd.LongIntegerFormatMap()); + break; + case NEON_UADDW: + mnemonic = "uaddw"; + nfd.SetFormatMap(1, nfd.LongIntegerFormatMap()); + break; + case NEON_USUBW: + mnemonic = "usubw"; + nfd.SetFormatMap(1, nfd.LongIntegerFormatMap()); + break; + case NEON_ADDHN: + mnemonic = "addhn"; + nfd.SetFormatMaps(nfd.LongIntegerFormatMap()); + nfd.SetFormatMap(0, nfd.IntegerFormatMap()); + break; + case NEON_RADDHN: + mnemonic = "raddhn"; + nfd.SetFormatMaps(nfd.LongIntegerFormatMap()); + nfd.SetFormatMap(0, nfd.IntegerFormatMap()); + break; + case NEON_RSUBHN: + mnemonic = "rsubhn"; + nfd.SetFormatMaps(nfd.LongIntegerFormatMap()); + nfd.SetFormatMap(0, nfd.IntegerFormatMap()); + break; + case NEON_SUBHN: + mnemonic = "subhn"; + nfd.SetFormatMaps(nfd.LongIntegerFormatMap()); + nfd.SetFormatMap(0, nfd.IntegerFormatMap()); + break; + default: + form = "(NEON3Different)"; + } + Format(instr, nfd.Mnemonic(mnemonic), nfd.Substitute(form)); +} + + +void Disassembler::VisitNEONAcrossLanes(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "%sd, 'Vn.%s"; + const char *form_half = "'Hd, 'Vn.%s"; + bool half_op = false; + static const NEONFormatMap map_half = {{30}, {NF_4H, NF_8H}}; + + NEONFormatDecoder nfd(instr, + NEONFormatDecoder::ScalarFormatMap(), + NEONFormatDecoder::IntegerFormatMap()); + + if (instr->Mask(NEONAcrossLanesFP16FMask) == NEONAcrossLanesFP16Fixed) { + half_op = true; + form = form_half; + nfd.SetFormatMaps(&map_half); + switch (instr->Mask(NEONAcrossLanesFP16Mask)) { + case NEON_FMAXV_H: + mnemonic = "fmaxv"; + break; + case NEON_FMINV_H: + mnemonic = "fminv"; + break; + case NEON_FMAXNMV_H: + mnemonic = "fmaxnmv"; + break; + case NEON_FMINNMV_H: + mnemonic = "fminnmv"; + break; + } + } else if (instr->Mask(NEONAcrossLanesFPFMask) == NEONAcrossLanesFPFixed) { + nfd.SetFormatMap(0, nfd.FPScalarFormatMap()); + nfd.SetFormatMap(1, nfd.FPFormatMap()); + switch (instr->Mask(NEONAcrossLanesFPMask)) { + case NEON_FMAXV: + mnemonic = "fmaxv"; + break; + case NEON_FMINV: + mnemonic = "fminv"; + break; + case NEON_FMAXNMV: + mnemonic = "fmaxnmv"; + break; + case NEON_FMINNMV: + mnemonic = "fminnmv"; + break; + default: + form = "(NEONAcrossLanes)"; + break; + } + } else if (instr->Mask(NEONAcrossLanesFMask) == NEONAcrossLanesFixed) { + switch (instr->Mask(NEONAcrossLanesMask)) { + case NEON_ADDV: + mnemonic = "addv"; + break; + case NEON_SMAXV: + mnemonic = "smaxv"; + break; + case NEON_SMINV: + mnemonic = "sminv"; + break; + case NEON_UMAXV: + mnemonic = "umaxv"; + break; + case NEON_UMINV: + mnemonic = "uminv"; + break; + case NEON_SADDLV: + mnemonic = "saddlv"; + nfd.SetFormatMap(0, nfd.LongScalarFormatMap()); + break; + case NEON_UADDLV: + mnemonic = "uaddlv"; + nfd.SetFormatMap(0, nfd.LongScalarFormatMap()); + break; + default: + form = "(NEONAcrossLanes)"; + break; + } + } + + if (half_op) { + Format(instr, mnemonic, nfd.Substitute(form)); + } else { + Format(instr, + mnemonic, + nfd.Substitute(form, + NEONFormatDecoder::kPlaceholder, + NEONFormatDecoder::kFormat)); + } +} + + +void Disassembler::VisitNEONByIndexedElement(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + bool l_instr = false; + bool fp_instr = false; + bool cn_instr = false; + bool half_instr = false; + bool fhm_instr = false; // FMLAL{2}, FMLSL{2} + + const char *form = "'Vd.%s, 'Vn.%s, 'Ve.%s['IVByElemIndex]"; + + static const NEONFormatMap map_ta = {{23, 22}, {NF_UNDEF, NF_4S, NF_2D}}; + static const NEONFormatMap map_cn = + {{23, 22, 30}, + {NF_UNDEF, NF_UNDEF, NF_4H, NF_8H, NF_UNDEF, NF_4S, NF_UNDEF, NF_UNDEF}}; + static const NEONFormatMap map_usdot = {{30}, {NF_8B, NF_16B}}; + static const NEONFormatMap map_half = {{30}, {NF_4H, NF_8H}}; + + NEONFormatDecoder nfd(instr, + &map_ta, + NEONFormatDecoder::IntegerFormatMap(), + NEONFormatDecoder::ScalarFormatMap()); + + switch (instr->Mask(NEONByIndexedElementMask)) { + case NEON_SMULL_byelement: + mnemonic = "smull"; + l_instr = true; + break; + case NEON_UMULL_byelement: + mnemonic = "umull"; + l_instr = true; + break; + case NEON_SMLAL_byelement: + mnemonic = "smlal"; + l_instr = true; + break; + case NEON_UMLAL_byelement: + mnemonic = "umlal"; + l_instr = true; + break; + case NEON_SMLSL_byelement: + mnemonic = "smlsl"; + l_instr = true; + break; + case NEON_UMLSL_byelement: + mnemonic = "umlsl"; + l_instr = true; + break; + case NEON_SQDMULL_byelement: + mnemonic = "sqdmull"; + l_instr = true; + break; + case NEON_SQDMLAL_byelement: + mnemonic = "sqdmlal"; + l_instr = true; + break; + case NEON_SQDMLSL_byelement: + mnemonic = "sqdmlsl"; + l_instr = true; + break; + case NEON_MUL_byelement: + mnemonic = "mul"; + break; + case NEON_MLA_byelement: + mnemonic = "mla"; + break; + case NEON_MLS_byelement: + mnemonic = "mls"; + break; + case NEON_SQDMULH_byelement: + mnemonic = "sqdmulh"; + break; + case NEON_SQRDMULH_byelement: + mnemonic = "sqrdmulh"; + break; + case NEON_SDOT_byelement: + mnemonic = "sdot"; + form = "'Vd.%s, 'Vn.%s, 'Ve.4b['IVByElemIndex]"; + nfd.SetFormatMap(1, &map_usdot); + break; + case NEON_SQRDMLAH_byelement: + mnemonic = "sqrdmlah"; + break; + case NEON_UDOT_byelement: + mnemonic = "udot"; + form = "'Vd.%s, 'Vn.%s, 'Ve.4b['IVByElemIndex]"; + nfd.SetFormatMap(1, &map_usdot); + break; + case NEON_SQRDMLSH_byelement: + mnemonic = "sqrdmlsh"; + break; + default: { + switch (instr->Mask(NEONByIndexedElementFPLongMask)) { + case NEON_FMLAL_H_byelement: + mnemonic = "fmlal"; + fhm_instr = true; + break; + case NEON_FMLAL2_H_byelement: + mnemonic = "fmlal2"; + fhm_instr = true; + break; + case NEON_FMLSL_H_byelement: + mnemonic = "fmlsl"; + fhm_instr = true; + break; + case NEON_FMLSL2_H_byelement: + mnemonic = "fmlsl2"; + fhm_instr = true; + break; + default: + switch (instr->Mask(NEONByIndexedElementFPMask)) { + case NEON_FMUL_byelement: + mnemonic = "fmul"; + fp_instr = true; + break; + case NEON_FMLA_byelement: + mnemonic = "fmla"; + fp_instr = true; + break; + case NEON_FMLS_byelement: + mnemonic = "fmls"; + fp_instr = true; + break; + case NEON_FMULX_byelement: + mnemonic = "fmulx"; + fp_instr = true; + break; + case NEON_FMLA_H_byelement: + mnemonic = "fmla"; + half_instr = true; + break; + case NEON_FMLS_H_byelement: + mnemonic = "fmls"; + half_instr = true; + break; + case NEON_FMUL_H_byelement: + mnemonic = "fmul"; + half_instr = true; + break; + case NEON_FMULX_H_byelement: + mnemonic = "fmulx"; + half_instr = true; + break; + default: + switch (instr->Mask(NEONByIndexedElementFPComplexMask)) { + case NEON_FCMLA_byelement: + mnemonic = "fcmla"; + cn_instr = true; + form = "'Vd.%s, 'Vn.%s, 'Ve.%s['IVByElemIndexRot], 'ILFCNR"; + break; + } + } + } + } + } + + if (fhm_instr) { + // These are oddballs. Set the format manually. + form = (instr->Mask(NEON_Q) == 0) + ? "'Vd.2s, 'Vn.2h, 'Ve.h['IVByElemIndexFHM]" + : "'Vd.4s, 'Vn.4h, 'Ve.h['IVByElemIndexFHM]"; + Format(instr, mnemonic, nfd.Substitute(form)); + } else if (half_instr) { + form = "'Vd.%s, 'Vn.%s, 'Ve.h['IVByElemIndex]"; + nfd.SetFormatMaps(&map_half, &map_half); + Format(instr, mnemonic, nfd.Substitute(form)); + } else if (l_instr) { + Format(instr, nfd.Mnemonic(mnemonic), nfd.Substitute(form)); + } else if (fp_instr) { + nfd.SetFormatMap(0, nfd.FPFormatMap()); + Format(instr, mnemonic, nfd.Substitute(form)); + } else if (cn_instr) { + nfd.SetFormatMap(0, &map_cn); + nfd.SetFormatMap(1, &map_cn); + Format(instr, mnemonic, nfd.Substitute(form)); + } else { + nfd.SetFormatMap(0, nfd.IntegerFormatMap()); + Format(instr, mnemonic, nfd.Substitute(form)); + } +} + + +void Disassembler::VisitNEONCopy(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(NEONCopy)"; + + NEONFormatDecoder nfd(instr, + NEONFormatDecoder::TriangularFormatMap(), + NEONFormatDecoder::TriangularScalarFormatMap()); + + if (instr->Mask(NEONCopyInsElementMask) == NEON_INS_ELEMENT) { + mnemonic = "mov"; + nfd.SetFormatMap(0, nfd.TriangularScalarFormatMap()); + form = "'Vd.%s['IVInsIndex1], 'Vn.%s['IVInsIndex2]"; + } else if (instr->Mask(NEONCopyInsGeneralMask) == NEON_INS_GENERAL) { + mnemonic = "mov"; + nfd.SetFormatMap(0, nfd.TriangularScalarFormatMap()); + if (nfd.GetVectorFormat() == kFormatD) { + form = "'Vd.%s['IVInsIndex1], 'Xn"; + } else { + form = "'Vd.%s['IVInsIndex1], 'Wn"; + } + } else if (instr->Mask(NEONCopyUmovMask) == NEON_UMOV) { + if (instr->Mask(NEON_Q) || ((instr->GetImmNEON5() & 7) == 4)) { + mnemonic = "mov"; + } else { + mnemonic = "umov"; + } + nfd.SetFormatMap(0, nfd.TriangularScalarFormatMap()); + if (nfd.GetVectorFormat() == kFormatD) { + form = "'Xd, 'Vn.%s['IVInsIndex1]"; + } else { + form = "'Wd, 'Vn.%s['IVInsIndex1]"; + } + } else if (instr->Mask(NEONCopySmovMask) == NEON_SMOV) { + mnemonic = "smov"; + nfd.SetFormatMap(0, nfd.TriangularScalarFormatMap()); + form = "'R30d, 'Vn.%s['IVInsIndex1]"; + } else if (instr->Mask(NEONCopyDupElementMask) == NEON_DUP_ELEMENT) { + mnemonic = "dup"; + form = "'Vd.%s, 'Vn.%s['IVInsIndex1]"; + } else if (instr->Mask(NEONCopyDupGeneralMask) == NEON_DUP_GENERAL) { + mnemonic = "dup"; + if (nfd.GetVectorFormat() == kFormat2D) { + form = "'Vd.%s, 'Xn"; + } else { + form = "'Vd.%s, 'Wn"; + } + } + Format(instr, mnemonic, nfd.Substitute(form)); +} + + +void Disassembler::VisitNEONExtract(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(NEONExtract)"; + NEONFormatDecoder nfd(instr, NEONFormatDecoder::LogicalFormatMap()); + if (instr->Mask(NEONExtractMask) == NEON_EXT) { + mnemonic = "ext"; + form = "'Vd.%s, 'Vn.%s, 'Vm.%s, 'IVExtract"; + } + Format(instr, mnemonic, nfd.Substitute(form)); +} + + +void Disassembler::VisitNEONLoadStoreMultiStruct(const Instruction *instr) { + const char *mnemonic = NULL; + const char *form = NULL; + const char *form_1v = "{'Vt.%1$s}, ['Xns]"; + const char *form_2v = "{'Vt.%1$s, 'Vt2.%1$s}, ['Xns]"; + const char *form_3v = "{'Vt.%1$s, 'Vt2.%1$s, 'Vt3.%1$s}, ['Xns]"; + const char *form_4v = "{'Vt.%1$s, 'Vt2.%1$s, 'Vt3.%1$s, 'Vt4.%1$s}, ['Xns]"; + NEONFormatDecoder nfd(instr, NEONFormatDecoder::LoadStoreFormatMap()); + + switch (instr->Mask(NEONLoadStoreMultiStructMask)) { + case NEON_LD1_1v: + mnemonic = "ld1"; + form = form_1v; + break; + case NEON_LD1_2v: + mnemonic = "ld1"; + form = form_2v; + break; + case NEON_LD1_3v: + mnemonic = "ld1"; + form = form_3v; + break; + case NEON_LD1_4v: + mnemonic = "ld1"; + form = form_4v; + break; + case NEON_LD2: + mnemonic = "ld2"; + form = form_2v; + break; + case NEON_LD3: + mnemonic = "ld3"; + form = form_3v; + break; + case NEON_LD4: + mnemonic = "ld4"; + form = form_4v; + break; + case NEON_ST1_1v: + mnemonic = "st1"; + form = form_1v; + break; + case NEON_ST1_2v: + mnemonic = "st1"; + form = form_2v; + break; + case NEON_ST1_3v: + mnemonic = "st1"; + form = form_3v; + break; + case NEON_ST1_4v: + mnemonic = "st1"; + form = form_4v; + break; + case NEON_ST2: + mnemonic = "st2"; + form = form_2v; + break; + case NEON_ST3: + mnemonic = "st3"; + form = form_3v; + break; + case NEON_ST4: + mnemonic = "st4"; + form = form_4v; + break; + default: + break; + } + + // Work out unallocated encodings. + bool allocated = (mnemonic != NULL); + switch (instr->Mask(NEONLoadStoreMultiStructMask)) { + case NEON_LD2: + case NEON_LD3: + case NEON_LD4: + case NEON_ST2: + case NEON_ST3: + case NEON_ST4: + // LD[2-4] and ST[2-4] cannot use .1d format. + allocated = (instr->GetNEONQ() != 0) || (instr->GetNEONLSSize() != 3); + break; + default: + break; + } + if (allocated) { + VIXL_ASSERT(mnemonic != NULL); + VIXL_ASSERT(form != NULL); + } else { + mnemonic = "unallocated"; + form = "(NEONLoadStoreMultiStruct)"; + } + + Format(instr, mnemonic, nfd.Substitute(form)); +} + + +void Disassembler::VisitNEONLoadStoreMultiStructPostIndex( + const Instruction *instr) { + const char *mnemonic = NULL; + const char *form = NULL; + const char *form_1v = "{'Vt.%1$s}, ['Xns], 'Xmr1"; + const char *form_2v = "{'Vt.%1$s, 'Vt2.%1$s}, ['Xns], 'Xmr2"; + const char *form_3v = "{'Vt.%1$s, 'Vt2.%1$s, 'Vt3.%1$s}, ['Xns], 'Xmr3"; + const char *form_4v = + "{'Vt.%1$s, 'Vt2.%1$s, 'Vt3.%1$s, 'Vt4.%1$s}, ['Xns], 'Xmr4"; + NEONFormatDecoder nfd(instr, NEONFormatDecoder::LoadStoreFormatMap()); + + switch (instr->Mask(NEONLoadStoreMultiStructPostIndexMask)) { + case NEON_LD1_1v_post: + mnemonic = "ld1"; + form = form_1v; + break; + case NEON_LD1_2v_post: + mnemonic = "ld1"; + form = form_2v; + break; + case NEON_LD1_3v_post: + mnemonic = "ld1"; + form = form_3v; + break; + case NEON_LD1_4v_post: + mnemonic = "ld1"; + form = form_4v; + break; + case NEON_LD2_post: + mnemonic = "ld2"; + form = form_2v; + break; + case NEON_LD3_post: + mnemonic = "ld3"; + form = form_3v; + break; + case NEON_LD4_post: + mnemonic = "ld4"; + form = form_4v; + break; + case NEON_ST1_1v_post: + mnemonic = "st1"; + form = form_1v; + break; + case NEON_ST1_2v_post: + mnemonic = "st1"; + form = form_2v; + break; + case NEON_ST1_3v_post: + mnemonic = "st1"; + form = form_3v; + break; + case NEON_ST1_4v_post: + mnemonic = "st1"; + form = form_4v; + break; + case NEON_ST2_post: + mnemonic = "st2"; + form = form_2v; + break; + case NEON_ST3_post: + mnemonic = "st3"; + form = form_3v; + break; + case NEON_ST4_post: + mnemonic = "st4"; + form = form_4v; + break; + default: + break; + } + + // Work out unallocated encodings. + bool allocated = (mnemonic != NULL); + switch (instr->Mask(NEONLoadStoreMultiStructPostIndexMask)) { + case NEON_LD2_post: + case NEON_LD3_post: + case NEON_LD4_post: + case NEON_ST2_post: + case NEON_ST3_post: + case NEON_ST4_post: + // LD[2-4] and ST[2-4] cannot use .1d format. + allocated = (instr->GetNEONQ() != 0) || (instr->GetNEONLSSize() != 3); + break; + default: + break; + } + if (allocated) { + VIXL_ASSERT(mnemonic != NULL); + VIXL_ASSERT(form != NULL); + } else { + mnemonic = "unallocated"; + form = "(NEONLoadStoreMultiStructPostIndex)"; + } + + Format(instr, mnemonic, nfd.Substitute(form)); +} + + +void Disassembler::VisitNEONLoadStoreSingleStruct(const Instruction *instr) { + const char *mnemonic = NULL; + const char *form = NULL; + + const char *form_1b = "{'Vt.b}['IVLSLane0], ['Xns]"; + const char *form_1h = "{'Vt.h}['IVLSLane1], ['Xns]"; + const char *form_1s = "{'Vt.s}['IVLSLane2], ['Xns]"; + const char *form_1d = "{'Vt.d}['IVLSLane3], ['Xns]"; + NEONFormatDecoder nfd(instr, NEONFormatDecoder::LoadStoreFormatMap()); + + switch (instr->Mask(NEONLoadStoreSingleStructMask)) { + case NEON_LD1_b: + mnemonic = "ld1"; + form = form_1b; + break; + case NEON_LD1_h: + mnemonic = "ld1"; + form = form_1h; + break; + case NEON_LD1_s: + mnemonic = "ld1"; + VIXL_STATIC_ASSERT((NEON_LD1_s | (1 << NEONLSSize_offset)) == NEON_LD1_d); + form = ((instr->GetNEONLSSize() & 1) == 0) ? form_1s : form_1d; + break; + case NEON_ST1_b: + mnemonic = "st1"; + form = form_1b; + break; + case NEON_ST1_h: + mnemonic = "st1"; + form = form_1h; + break; + case NEON_ST1_s: + mnemonic = "st1"; + VIXL_STATIC_ASSERT((NEON_ST1_s | (1 << NEONLSSize_offset)) == NEON_ST1_d); + form = ((instr->GetNEONLSSize() & 1) == 0) ? form_1s : form_1d; + break; + case NEON_LD1R: + mnemonic = "ld1r"; + form = "{'Vt.%s}, ['Xns]"; + break; + case NEON_LD2_b: + case NEON_ST2_b: + mnemonic = (instr->GetLdStXLoad() == 1) ? "ld2" : "st2"; + form = "{'Vt.b, 'Vt2.b}['IVLSLane0], ['Xns]"; + break; + case NEON_LD2_h: + case NEON_ST2_h: + mnemonic = (instr->GetLdStXLoad() == 1) ? "ld2" : "st2"; + form = "{'Vt.h, 'Vt2.h}['IVLSLane1], ['Xns]"; + break; + case NEON_LD2_s: + case NEON_ST2_s: + VIXL_STATIC_ASSERT((NEON_ST2_s | (1 << NEONLSSize_offset)) == NEON_ST2_d); + VIXL_STATIC_ASSERT((NEON_LD2_s | (1 << NEONLSSize_offset)) == NEON_LD2_d); + mnemonic = (instr->GetLdStXLoad() == 1) ? "ld2" : "st2"; + if ((instr->GetNEONLSSize() & 1) == 0) { + form = "{'Vt.s, 'Vt2.s}['IVLSLane2], ['Xns]"; + } else { + form = "{'Vt.d, 'Vt2.d}['IVLSLane3], ['Xns]"; + } + break; + case NEON_LD2R: + mnemonic = "ld2r"; + form = "{'Vt.%s, 'Vt2.%s}, ['Xns]"; + break; + case NEON_LD3_b: + case NEON_ST3_b: + mnemonic = (instr->GetLdStXLoad() == 1) ? "ld3" : "st3"; + form = "{'Vt.b, 'Vt2.b, 'Vt3.b}['IVLSLane0], ['Xns]"; + break; + case NEON_LD3_h: + case NEON_ST3_h: + mnemonic = (instr->GetLdStXLoad() == 1) ? "ld3" : "st3"; + form = "{'Vt.h, 'Vt2.h, 'Vt3.h}['IVLSLane1], ['Xns]"; + break; + case NEON_LD3_s: + case NEON_ST3_s: + mnemonic = (instr->GetLdStXLoad() == 1) ? "ld3" : "st3"; + if ((instr->GetNEONLSSize() & 1) == 0) { + form = "{'Vt.s, 'Vt2.s, 'Vt3.s}['IVLSLane2], ['Xns]"; + } else { + form = "{'Vt.d, 'Vt2.d, 'Vt3.d}['IVLSLane3], ['Xns]"; + } + break; + case NEON_LD3R: + mnemonic = "ld3r"; + form = "{'Vt.%s, 'Vt2.%s, 'Vt3.%s}, ['Xns]"; + break; + case NEON_LD4_b: + case NEON_ST4_b: + mnemonic = (instr->GetLdStXLoad() == 1) ? "ld4" : "st4"; + form = "{'Vt.b, 'Vt2.b, 'Vt3.b, 'Vt4.b}['IVLSLane0], ['Xns]"; + break; + case NEON_LD4_h: + case NEON_ST4_h: + mnemonic = (instr->GetLdStXLoad() == 1) ? "ld4" : "st4"; + form = "{'Vt.h, 'Vt2.h, 'Vt3.h, 'Vt4.h}['IVLSLane1], ['Xns]"; + break; + case NEON_LD4_s: + case NEON_ST4_s: + VIXL_STATIC_ASSERT((NEON_LD4_s | (1 << NEONLSSize_offset)) == NEON_LD4_d); + VIXL_STATIC_ASSERT((NEON_ST4_s | (1 << NEONLSSize_offset)) == NEON_ST4_d); + mnemonic = (instr->GetLdStXLoad() == 1) ? "ld4" : "st4"; + if ((instr->GetNEONLSSize() & 1) == 0) { + form = "{'Vt.s, 'Vt2.s, 'Vt3.s, 'Vt4.s}['IVLSLane2], ['Xns]"; + } else { + form = "{'Vt.d, 'Vt2.d, 'Vt3.d, 'Vt4.d}['IVLSLane3], ['Xns]"; + } + break; + case NEON_LD4R: + mnemonic = "ld4r"; + form = "{'Vt.%1$s, 'Vt2.%1$s, 'Vt3.%1$s, 'Vt4.%1$s}, ['Xns]"; + break; + default: + break; + } + + // Work out unallocated encodings. + bool allocated = (mnemonic != NULL); + switch (instr->Mask(NEONLoadStoreSingleStructMask)) { + case NEON_LD1_h: + case NEON_LD2_h: + case NEON_LD3_h: + case NEON_LD4_h: + case NEON_ST1_h: + case NEON_ST2_h: + case NEON_ST3_h: + case NEON_ST4_h: + VIXL_ASSERT(allocated); + allocated = ((instr->GetNEONLSSize() & 1) == 0); + break; + case NEON_LD1_s: + case NEON_LD2_s: + case NEON_LD3_s: + case NEON_LD4_s: + case NEON_ST1_s: + case NEON_ST2_s: + case NEON_ST3_s: + case NEON_ST4_s: + VIXL_ASSERT(allocated); + allocated = (instr->GetNEONLSSize() <= 1) && + ((instr->GetNEONLSSize() == 0) || (instr->GetNEONS() == 0)); + break; + case NEON_LD1R: + case NEON_LD2R: + case NEON_LD3R: + case NEON_LD4R: + VIXL_ASSERT(allocated); + allocated = (instr->GetNEONS() == 0); + break; + default: + break; + } + if (allocated) { + VIXL_ASSERT(mnemonic != NULL); + VIXL_ASSERT(form != NULL); + } else { + mnemonic = "unallocated"; + form = "(NEONLoadStoreSingleStruct)"; + } + + Format(instr, mnemonic, nfd.Substitute(form)); +} + + +void Disassembler::VisitNEONLoadStoreSingleStructPostIndex( + const Instruction *instr) { + const char *mnemonic = NULL; + const char *form = NULL; + + const char *form_1b = "{'Vt.b}['IVLSLane0], ['Xns], 'Xmb1"; + const char *form_1h = "{'Vt.h}['IVLSLane1], ['Xns], 'Xmb2"; + const char *form_1s = "{'Vt.s}['IVLSLane2], ['Xns], 'Xmb4"; + const char *form_1d = "{'Vt.d}['IVLSLane3], ['Xns], 'Xmb8"; + NEONFormatDecoder nfd(instr, NEONFormatDecoder::LoadStoreFormatMap()); + + switch (instr->Mask(NEONLoadStoreSingleStructPostIndexMask)) { + case NEON_LD1_b_post: + mnemonic = "ld1"; + form = form_1b; + break; + case NEON_LD1_h_post: + mnemonic = "ld1"; + form = form_1h; + break; + case NEON_LD1_s_post: + mnemonic = "ld1"; + VIXL_STATIC_ASSERT((NEON_LD1_s | (1 << NEONLSSize_offset)) == NEON_LD1_d); + form = ((instr->GetNEONLSSize() & 1) == 0) ? form_1s : form_1d; + break; + case NEON_ST1_b_post: + mnemonic = "st1"; + form = form_1b; + break; + case NEON_ST1_h_post: + mnemonic = "st1"; + form = form_1h; + break; + case NEON_ST1_s_post: + mnemonic = "st1"; + VIXL_STATIC_ASSERT((NEON_ST1_s | (1 << NEONLSSize_offset)) == NEON_ST1_d); + form = ((instr->GetNEONLSSize() & 1) == 0) ? form_1s : form_1d; + break; + case NEON_LD1R_post: + mnemonic = "ld1r"; + form = "{'Vt.%s}, ['Xns], 'Xmz1"; + break; + case NEON_LD2_b_post: + case NEON_ST2_b_post: + mnemonic = (instr->GetLdStXLoad() == 1) ? "ld2" : "st2"; + form = "{'Vt.b, 'Vt2.b}['IVLSLane0], ['Xns], 'Xmb2"; + break; + case NEON_ST2_h_post: + case NEON_LD2_h_post: + mnemonic = (instr->GetLdStXLoad() == 1) ? "ld2" : "st2"; + form = "{'Vt.h, 'Vt2.h}['IVLSLane1], ['Xns], 'Xmb4"; + break; + case NEON_LD2_s_post: + case NEON_ST2_s_post: + mnemonic = (instr->GetLdStXLoad() == 1) ? "ld2" : "st2"; + if ((instr->GetNEONLSSize() & 1) == 0) + form = "{'Vt.s, 'Vt2.s}['IVLSLane2], ['Xns], 'Xmb8"; + else + form = "{'Vt.d, 'Vt2.d}['IVLSLane3], ['Xns], 'Xmb16"; + break; + case NEON_LD2R_post: + mnemonic = "ld2r"; + form = "{'Vt.%s, 'Vt2.%s}, ['Xns], 'Xmz2"; + break; + case NEON_LD3_b_post: + case NEON_ST3_b_post: + mnemonic = (instr->GetLdStXLoad() == 1) ? "ld3" : "st3"; + form = "{'Vt.b, 'Vt2.b, 'Vt3.b}['IVLSLane0], ['Xns], 'Xmb3"; + break; + case NEON_LD3_h_post: + case NEON_ST3_h_post: + mnemonic = (instr->GetLdStXLoad() == 1) ? "ld3" : "st3"; + form = "{'Vt.h, 'Vt2.h, 'Vt3.h}['IVLSLane1], ['Xns], 'Xmb6"; + break; + case NEON_LD3_s_post: + case NEON_ST3_s_post: + mnemonic = (instr->GetLdStXLoad() == 1) ? "ld3" : "st3"; + if ((instr->GetNEONLSSize() & 1) == 0) + form = "{'Vt.s, 'Vt2.s, 'Vt3.s}['IVLSLane2], ['Xns], 'Xmb12"; + else + form = "{'Vt.d, 'Vt2.d, 'Vt3.d}['IVLSLane3], ['Xns], 'Xmb24"; + break; + case NEON_LD3R_post: + mnemonic = "ld3r"; + form = "{'Vt.%s, 'Vt2.%s, 'Vt3.%s}, ['Xns], 'Xmz3"; + break; + case NEON_LD4_b_post: + case NEON_ST4_b_post: + mnemonic = (instr->GetLdStXLoad() == 1) ? "ld4" : "st4"; + form = "{'Vt.b, 'Vt2.b, 'Vt3.b, 'Vt4.b}['IVLSLane0], ['Xns], 'Xmb4"; + break; + case NEON_LD4_h_post: + case NEON_ST4_h_post: + mnemonic = (instr->GetLdStXLoad()) == 1 ? "ld4" : "st4"; + form = "{'Vt.h, 'Vt2.h, 'Vt3.h, 'Vt4.h}['IVLSLane1], ['Xns], 'Xmb8"; + break; + case NEON_LD4_s_post: + case NEON_ST4_s_post: + mnemonic = (instr->GetLdStXLoad() == 1) ? "ld4" : "st4"; + if ((instr->GetNEONLSSize() & 1) == 0) + form = "{'Vt.s, 'Vt2.s, 'Vt3.s, 'Vt4.s}['IVLSLane2], ['Xns], 'Xmb16"; + else + form = "{'Vt.d, 'Vt2.d, 'Vt3.d, 'Vt4.d}['IVLSLane3], ['Xns], 'Xmb32"; + break; + case NEON_LD4R_post: + mnemonic = "ld4r"; + form = "{'Vt.%1$s, 'Vt2.%1$s, 'Vt3.%1$s, 'Vt4.%1$s}, ['Xns], 'Xmz4"; + break; + default: + break; + } + + // Work out unallocated encodings. + bool allocated = (mnemonic != NULL); + switch (instr->Mask(NEONLoadStoreSingleStructPostIndexMask)) { + case NEON_LD1_h_post: + case NEON_LD2_h_post: + case NEON_LD3_h_post: + case NEON_LD4_h_post: + case NEON_ST1_h_post: + case NEON_ST2_h_post: + case NEON_ST3_h_post: + case NEON_ST4_h_post: + VIXL_ASSERT(allocated); + allocated = ((instr->GetNEONLSSize() & 1) == 0); + break; + case NEON_LD1_s_post: + case NEON_LD2_s_post: + case NEON_LD3_s_post: + case NEON_LD4_s_post: + case NEON_ST1_s_post: + case NEON_ST2_s_post: + case NEON_ST3_s_post: + case NEON_ST4_s_post: + VIXL_ASSERT(allocated); + allocated = (instr->GetNEONLSSize() <= 1) && + ((instr->GetNEONLSSize() == 0) || (instr->GetNEONS() == 0)); + break; + case NEON_LD1R_post: + case NEON_LD2R_post: + case NEON_LD3R_post: + case NEON_LD4R_post: + VIXL_ASSERT(allocated); + allocated = (instr->GetNEONS() == 0); + break; + default: + break; + } + if (allocated) { + VIXL_ASSERT(mnemonic != NULL); + VIXL_ASSERT(form != NULL); + } else { + mnemonic = "unallocated"; + form = "(NEONLoadStoreSingleStructPostIndex)"; + } + + Format(instr, mnemonic, nfd.Substitute(form)); +} + + +void Disassembler::VisitNEONModifiedImmediate(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Vt.%s, 'IVMIImm8, lsl 'IVMIShiftAmt1"; + + int half_enc = instr->ExtractBit(11); + int cmode = instr->GetNEONCmode(); + int cmode_3 = (cmode >> 3) & 1; + int cmode_2 = (cmode >> 2) & 1; + int cmode_1 = (cmode >> 1) & 1; + int cmode_0 = cmode & 1; + int q = instr->GetNEONQ(); + int op = instr->GetNEONModImmOp(); + + static const NEONFormatMap map_b = {{30}, {NF_8B, NF_16B}}; + static const NEONFormatMap map_h = {{30}, {NF_4H, NF_8H}}; + static const NEONFormatMap map_s = {{30}, {NF_2S, NF_4S}}; + NEONFormatDecoder nfd(instr, &map_b); + if (cmode_3 == 0) { + if (cmode_0 == 0) { + mnemonic = (op == 1) ? "mvni" : "movi"; + } else { // cmode<0> == '1'. + mnemonic = (op == 1) ? "bic" : "orr"; + } + nfd.SetFormatMap(0, &map_s); + } else { // cmode<3> == '1'. + if (cmode_2 == 0) { + if (cmode_0 == 0) { + mnemonic = (op == 1) ? "mvni" : "movi"; + } else { // cmode<0> == '1'. + mnemonic = (op == 1) ? "bic" : "orr"; + } + nfd.SetFormatMap(0, &map_h); + } else { // cmode<2> == '1'. + if (cmode_1 == 0) { + mnemonic = (op == 1) ? "mvni" : "movi"; + form = "'Vt.%s, 'IVMIImm8, msl 'IVMIShiftAmt2"; + nfd.SetFormatMap(0, &map_s); + } else { // cmode<1> == '1'. + if (cmode_0 == 0) { + mnemonic = "movi"; + if (op == 0) { + form = "'Vt.%s, 'IVMIImm8"; + } else { + form = (q == 0) ? "'Dd, 'IVMIImm" : "'Vt.2d, 'IVMIImm"; + } + } else { // cmode<0> == '1' + mnemonic = "fmov"; + form = "'Vt.%s, 'IFPNeon"; + if (half_enc == 1) { + nfd.SetFormatMap(0, &map_h); + } else if (op == 0) { + nfd.SetFormatMap(0, &map_s); + } else if (q == 1) { + form = "'Vt.2d, 'IFPNeon"; + } else { + mnemonic = "unallocated"; + form = "(NEONModifiedImmediate)"; + } + } + } + } + } + Format(instr, mnemonic, nfd.Substitute(form)); +} + + +void Disassembler::VisitNEONScalar2RegMisc(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "%sd, %sn"; + const char *form_0 = "%sd, %sn, #0"; + const char *form_fp0 = "%sd, %sn, #0.0"; + + NEONFormatDecoder nfd(instr, NEONFormatDecoder::ScalarFormatMap()); + + if (instr->Mask(NEON2RegMiscOpcode) <= NEON_NEG_scalar_opcode) { + // These instructions all use a two bit size field, except NOT and RBIT, + // which use the field to encode the operation. + switch (instr->Mask(NEONScalar2RegMiscMask)) { + case NEON_CMGT_zero_scalar: + mnemonic = "cmgt"; + form = form_0; + break; + case NEON_CMGE_zero_scalar: + mnemonic = "cmge"; + form = form_0; + break; + case NEON_CMLE_zero_scalar: + mnemonic = "cmle"; + form = form_0; + break; + case NEON_CMLT_zero_scalar: + mnemonic = "cmlt"; + form = form_0; + break; + case NEON_CMEQ_zero_scalar: + mnemonic = "cmeq"; + form = form_0; + break; + case NEON_NEG_scalar: + mnemonic = "neg"; + break; + case NEON_SQNEG_scalar: + mnemonic = "sqneg"; + break; + case NEON_ABS_scalar: + mnemonic = "abs"; + break; + case NEON_SQABS_scalar: + mnemonic = "sqabs"; + break; + case NEON_SUQADD_scalar: + mnemonic = "suqadd"; + break; + case NEON_USQADD_scalar: + mnemonic = "usqadd"; + break; + default: + form = "(NEONScalar2RegMisc)"; + } + } else { + // These instructions all use a one bit size field, except SQXTUN, SQXTN + // and UQXTN, which use a two bit size field. + nfd.SetFormatMaps(nfd.FPScalarFormatMap()); + switch (instr->Mask(NEONScalar2RegMiscFPMask)) { + case NEON_FRSQRTE_scalar: + mnemonic = "frsqrte"; + break; + case NEON_FRECPE_scalar: + mnemonic = "frecpe"; + break; + case NEON_SCVTF_scalar: + mnemonic = "scvtf"; + break; + case NEON_UCVTF_scalar: + mnemonic = "ucvtf"; + break; + case NEON_FCMGT_zero_scalar: + mnemonic = "fcmgt"; + form = form_fp0; + break; + case NEON_FCMGE_zero_scalar: + mnemonic = "fcmge"; + form = form_fp0; + break; + case NEON_FCMLE_zero_scalar: + mnemonic = "fcmle"; + form = form_fp0; + break; + case NEON_FCMLT_zero_scalar: + mnemonic = "fcmlt"; + form = form_fp0; + break; + case NEON_FCMEQ_zero_scalar: + mnemonic = "fcmeq"; + form = form_fp0; + break; + case NEON_FRECPX_scalar: + mnemonic = "frecpx"; + break; + case NEON_FCVTNS_scalar: + mnemonic = "fcvtns"; + break; + case NEON_FCVTNU_scalar: + mnemonic = "fcvtnu"; + break; + case NEON_FCVTPS_scalar: + mnemonic = "fcvtps"; + break; + case NEON_FCVTPU_scalar: + mnemonic = "fcvtpu"; + break; + case NEON_FCVTMS_scalar: + mnemonic = "fcvtms"; + break; + case NEON_FCVTMU_scalar: + mnemonic = "fcvtmu"; + break; + case NEON_FCVTZS_scalar: + mnemonic = "fcvtzs"; + break; + case NEON_FCVTZU_scalar: + mnemonic = "fcvtzu"; + break; + case NEON_FCVTAS_scalar: + mnemonic = "fcvtas"; + break; + case NEON_FCVTAU_scalar: + mnemonic = "fcvtau"; + break; + case NEON_FCVTXN_scalar: + nfd.SetFormatMap(0, nfd.LongScalarFormatMap()); + mnemonic = "fcvtxn"; + break; + default: + nfd.SetFormatMap(0, nfd.ScalarFormatMap()); + nfd.SetFormatMap(1, nfd.LongScalarFormatMap()); + switch (instr->Mask(NEONScalar2RegMiscMask)) { + case NEON_SQXTN_scalar: + mnemonic = "sqxtn"; + break; + case NEON_UQXTN_scalar: + mnemonic = "uqxtn"; + break; + case NEON_SQXTUN_scalar: + mnemonic = "sqxtun"; + break; + default: + form = "(NEONScalar2RegMisc)"; + } + } + } + Format(instr, mnemonic, nfd.SubstitutePlaceholders(form)); +} + +void Disassembler::VisitNEONScalar2RegMiscFP16(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Hd, 'Hn"; + const char *form_fp0 = "'Hd, 'Hn, #0.0"; + + switch (instr->Mask(NEONScalar2RegMiscFP16Mask)) { +#define FORMAT(A, B) \ + case NEON_##A##_H_scalar: \ + mnemonic = B; \ + break; + // clang-format off + FORMAT(FCVTNS, "fcvtns") + FORMAT(FCVTMS, "fcvtms") + FORMAT(FCVTAS, "fcvtas") + FORMAT(SCVTF, "scvtf") + FORMAT(FCVTPS, "fcvtps") + FORMAT(FCVTZS, "fcvtzs") + FORMAT(FRECPE, "frecpe") + FORMAT(FRECPX, "frecpx") + FORMAT(FCVTNU, "fcvtnu") + FORMAT(FCVTMU, "fcvtmu") + FORMAT(FCVTAU, "fcvtau") + FORMAT(UCVTF, "ucvtf") + FORMAT(FCVTPU, "fcvtpu") + FORMAT(FCVTZU, "fcvtzu") + FORMAT(FRSQRTE, "frsqrte") +// clang-format on +#undef FORMAT +#define FORMAT(A, B) \ + case NEON_##A##_H_zero_scalar: \ + mnemonic = B; \ + form = form_fp0; \ + break; + FORMAT(FCMGT, "fcmgt") + FORMAT(FCMEQ, "fcmeq") + FORMAT(FCMLT, "fcmlt") + FORMAT(FCMGE, "fcmge") + FORMAT(FCMLE, "fcmle") +#undef FORMAT + + default: + VIXL_UNREACHABLE(); + } + Format(instr, mnemonic, form); +} + + +void Disassembler::VisitNEONScalar3Diff(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "%sd, %sn, %sm"; + NEONFormatDecoder nfd(instr, + NEONFormatDecoder::LongScalarFormatMap(), + NEONFormatDecoder::ScalarFormatMap()); + + switch (instr->Mask(NEONScalar3DiffMask)) { + case NEON_SQDMLAL_scalar: + mnemonic = "sqdmlal"; + break; + case NEON_SQDMLSL_scalar: + mnemonic = "sqdmlsl"; + break; + case NEON_SQDMULL_scalar: + mnemonic = "sqdmull"; + break; + default: + form = "(NEONScalar3Diff)"; + } + Format(instr, mnemonic, nfd.SubstitutePlaceholders(form)); +} + + +void Disassembler::VisitNEONScalar3Same(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "%sd, %sn, %sm"; + NEONFormatDecoder nfd(instr, NEONFormatDecoder::ScalarFormatMap()); + + if (instr->Mask(NEONScalar3SameFPFMask) == NEONScalar3SameFPFixed) { + nfd.SetFormatMaps(nfd.FPScalarFormatMap()); + switch (instr->Mask(NEONScalar3SameFPMask)) { + case NEON_FACGE_scalar: + mnemonic = "facge"; + break; + case NEON_FACGT_scalar: + mnemonic = "facgt"; + break; + case NEON_FCMEQ_scalar: + mnemonic = "fcmeq"; + break; + case NEON_FCMGE_scalar: + mnemonic = "fcmge"; + break; + case NEON_FCMGT_scalar: + mnemonic = "fcmgt"; + break; + case NEON_FMULX_scalar: + mnemonic = "fmulx"; + break; + case NEON_FRECPS_scalar: + mnemonic = "frecps"; + break; + case NEON_FRSQRTS_scalar: + mnemonic = "frsqrts"; + break; + case NEON_FABD_scalar: + mnemonic = "fabd"; + break; + default: + form = "(NEONScalar3Same)"; + } + } else { + switch (instr->Mask(NEONScalar3SameMask)) { + case NEON_ADD_scalar: + mnemonic = "add"; + break; + case NEON_SUB_scalar: + mnemonic = "sub"; + break; + case NEON_CMEQ_scalar: + mnemonic = "cmeq"; + break; + case NEON_CMGE_scalar: + mnemonic = "cmge"; + break; + case NEON_CMGT_scalar: + mnemonic = "cmgt"; + break; + case NEON_CMHI_scalar: + mnemonic = "cmhi"; + break; + case NEON_CMHS_scalar: + mnemonic = "cmhs"; + break; + case NEON_CMTST_scalar: + mnemonic = "cmtst"; + break; + case NEON_UQADD_scalar: + mnemonic = "uqadd"; + break; + case NEON_SQADD_scalar: + mnemonic = "sqadd"; + break; + case NEON_UQSUB_scalar: + mnemonic = "uqsub"; + break; + case NEON_SQSUB_scalar: + mnemonic = "sqsub"; + break; + case NEON_USHL_scalar: + mnemonic = "ushl"; + break; + case NEON_SSHL_scalar: + mnemonic = "sshl"; + break; + case NEON_UQSHL_scalar: + mnemonic = "uqshl"; + break; + case NEON_SQSHL_scalar: + mnemonic = "sqshl"; + break; + case NEON_URSHL_scalar: + mnemonic = "urshl"; + break; + case NEON_SRSHL_scalar: + mnemonic = "srshl"; + break; + case NEON_UQRSHL_scalar: + mnemonic = "uqrshl"; + break; + case NEON_SQRSHL_scalar: + mnemonic = "sqrshl"; + break; + case NEON_SQDMULH_scalar: + mnemonic = "sqdmulh"; + break; + case NEON_SQRDMULH_scalar: + mnemonic = "sqrdmulh"; + break; + default: + form = "(NEONScalar3Same)"; + } + } + Format(instr, mnemonic, nfd.SubstitutePlaceholders(form)); +} + +void Disassembler::VisitNEONScalar3SameFP16(const Instruction *instr) { + const char *mnemonic = NULL; + const char *form = "'Hd, 'Hn, 'Hm"; + + switch (instr->Mask(NEONScalar3SameFP16Mask)) { + case NEON_FABD_H_scalar: + mnemonic = "fabd"; + break; + case NEON_FMULX_H_scalar: + mnemonic = "fmulx"; + break; + case NEON_FCMEQ_H_scalar: + mnemonic = "fcmeq"; + break; + case NEON_FCMGE_H_scalar: + mnemonic = "fcmge"; + break; + case NEON_FCMGT_H_scalar: + mnemonic = "fcmgt"; + break; + case NEON_FACGE_H_scalar: + mnemonic = "facge"; + break; + case NEON_FACGT_H_scalar: + mnemonic = "facgt"; + break; + case NEON_FRECPS_H_scalar: + mnemonic = "frecps"; + break; + case NEON_FRSQRTS_H_scalar: + mnemonic = "frsqrts"; + break; + default: + VIXL_UNREACHABLE(); + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitNEONScalar3SameExtra(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "%sd, %sn, %sm"; + NEONFormatDecoder nfd(instr, NEONFormatDecoder::ScalarFormatMap()); + + switch (instr->Mask(NEONScalar3SameExtraMask)) { + case NEON_SQRDMLAH_scalar: + mnemonic = "sqrdmlah"; + break; + case NEON_SQRDMLSH_scalar: + mnemonic = "sqrdmlsh"; + break; + default: + form = "(NEONScalar3SameExtra)"; + } + Format(instr, mnemonic, nfd.SubstitutePlaceholders(form)); +} + + +void Disassembler::VisitNEONScalarByIndexedElement(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "%sd, %sn, 'Ve.%s['IVByElemIndex]"; + const char *form_half = "'Hd, 'Hn, 'Ve.h['IVByElemIndex]"; + NEONFormatDecoder nfd(instr, NEONFormatDecoder::ScalarFormatMap()); + bool long_instr = false; + + switch (instr->Mask(NEONScalarByIndexedElementMask)) { + case NEON_SQDMULL_byelement_scalar: + mnemonic = "sqdmull"; + long_instr = true; + break; + case NEON_SQDMLAL_byelement_scalar: + mnemonic = "sqdmlal"; + long_instr = true; + break; + case NEON_SQDMLSL_byelement_scalar: + mnemonic = "sqdmlsl"; + long_instr = true; + break; + case NEON_SQDMULH_byelement_scalar: + mnemonic = "sqdmulh"; + break; + case NEON_SQRDMULH_byelement_scalar: + mnemonic = "sqrdmulh"; + break; + case NEON_SQRDMLAH_byelement_scalar: + mnemonic = "sqrdmlah"; + break; + case NEON_SQRDMLSH_byelement_scalar: + mnemonic = "sqrdmlsh"; + break; + default: + nfd.SetFormatMap(0, nfd.FPScalarFormatMap()); + switch (instr->Mask(NEONScalarByIndexedElementFPMask)) { + case NEON_FMUL_byelement_scalar: + mnemonic = "fmul"; + break; + case NEON_FMLA_byelement_scalar: + mnemonic = "fmla"; + break; + case NEON_FMLS_byelement_scalar: + mnemonic = "fmls"; + break; + case NEON_FMULX_byelement_scalar: + mnemonic = "fmulx"; + break; + case NEON_FMLA_H_byelement_scalar: + mnemonic = "fmla"; + form = form_half; + break; + case NEON_FMLS_H_byelement_scalar: + mnemonic = "fmls"; + form = form_half; + break; + case NEON_FMUL_H_byelement_scalar: + mnemonic = "fmul"; + form = form_half; + break; + case NEON_FMULX_H_byelement_scalar: + mnemonic = "fmulx"; + form = form_half; + break; + default: + form = "(NEONScalarByIndexedElement)"; + } + } + + if (long_instr) { + nfd.SetFormatMap(0, nfd.LongScalarFormatMap()); + } + + Format(instr, + mnemonic, + nfd.Substitute(form, nfd.kPlaceholder, nfd.kPlaceholder, nfd.kFormat)); +} + + +void Disassembler::VisitNEONScalarCopy(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(NEONScalarCopy)"; + + NEONFormatDecoder nfd(instr, NEONFormatDecoder::TriangularScalarFormatMap()); + + if (instr->Mask(NEONScalarCopyMask) == NEON_DUP_ELEMENT_scalar) { + mnemonic = "mov"; + form = "%sd, 'Vn.%s['IVInsIndex1]"; + } + + Format(instr, mnemonic, nfd.Substitute(form, nfd.kPlaceholder, nfd.kFormat)); +} + + +void Disassembler::VisitNEONScalarPairwise(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "%sd, 'Vn.%s"; + NEONFormatMap map = {{22}, {NF_2S, NF_2D}}; + NEONFormatDecoder nfd(instr, + NEONFormatDecoder::FPScalarPairwiseFormatMap(), + &map); + + switch (instr->Mask(NEONScalarPairwiseMask)) { + case NEON_ADDP_scalar: + // All pairwise operations except ADDP use bit U to differentiate FP16 + // from FP32/FP64 variations. + nfd.SetFormatMap(0, NEONFormatDecoder::FPScalarFormatMap()); + mnemonic = "addp"; + break; + case NEON_FADDP_h_scalar: + form = "%sd, 'Vn.2h"; + VIXL_FALLTHROUGH(); + case NEON_FADDP_scalar: + mnemonic = "faddp"; + break; + case NEON_FMAXP_h_scalar: + form = "%sd, 'Vn.2h"; + VIXL_FALLTHROUGH(); + case NEON_FMAXP_scalar: + mnemonic = "fmaxp"; + break; + case NEON_FMAXNMP_h_scalar: + form = "%sd, 'Vn.2h"; + VIXL_FALLTHROUGH(); + case NEON_FMAXNMP_scalar: + mnemonic = "fmaxnmp"; + break; + case NEON_FMINP_h_scalar: + form = "%sd, 'Vn.2h"; + VIXL_FALLTHROUGH(); + case NEON_FMINP_scalar: + mnemonic = "fminp"; + break; + case NEON_FMINNMP_h_scalar: + form = "%sd, 'Vn.2h"; + VIXL_FALLTHROUGH(); + case NEON_FMINNMP_scalar: + mnemonic = "fminnmp"; + break; + default: + form = "(NEONScalarPairwise)"; + } + Format(instr, + mnemonic, + nfd.Substitute(form, + NEONFormatDecoder::kPlaceholder, + NEONFormatDecoder::kFormat)); +} + + +void Disassembler::VisitNEONScalarShiftImmediate(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "%sd, %sn, 'Is1"; + const char *form_2 = "%sd, %sn, 'Is2"; + + static const NEONFormatMap map_shift = {{22, 21, 20, 19}, + {NF_UNDEF, + NF_B, + NF_H, + NF_H, + NF_S, + NF_S, + NF_S, + NF_S, + NF_D, + NF_D, + NF_D, + NF_D, + NF_D, + NF_D, + NF_D, + NF_D}}; + static const NEONFormatMap map_shift_narrow = + {{21, 20, 19}, {NF_UNDEF, NF_H, NF_S, NF_S, NF_D, NF_D, NF_D, NF_D}}; + NEONFormatDecoder nfd(instr, &map_shift); + + if (instr->GetImmNEONImmh()) { // immh has to be non-zero. + switch (instr->Mask(NEONScalarShiftImmediateMask)) { + case NEON_FCVTZU_imm_scalar: + mnemonic = "fcvtzu"; + break; + case NEON_FCVTZS_imm_scalar: + mnemonic = "fcvtzs"; + break; + case NEON_SCVTF_imm_scalar: + mnemonic = "scvtf"; + break; + case NEON_UCVTF_imm_scalar: + mnemonic = "ucvtf"; + break; + case NEON_SRI_scalar: + mnemonic = "sri"; + break; + case NEON_SSHR_scalar: + mnemonic = "sshr"; + break; + case NEON_USHR_scalar: + mnemonic = "ushr"; + break; + case NEON_SRSHR_scalar: + mnemonic = "srshr"; + break; + case NEON_URSHR_scalar: + mnemonic = "urshr"; + break; + case NEON_SSRA_scalar: + mnemonic = "ssra"; + break; + case NEON_USRA_scalar: + mnemonic = "usra"; + break; + case NEON_SRSRA_scalar: + mnemonic = "srsra"; + break; + case NEON_URSRA_scalar: + mnemonic = "ursra"; + break; + case NEON_SHL_scalar: + mnemonic = "shl"; + form = form_2; + break; + case NEON_SLI_scalar: + mnemonic = "sli"; + form = form_2; + break; + case NEON_SQSHLU_scalar: + mnemonic = "sqshlu"; + form = form_2; + break; + case NEON_SQSHL_imm_scalar: + mnemonic = "sqshl"; + form = form_2; + break; + case NEON_UQSHL_imm_scalar: + mnemonic = "uqshl"; + form = form_2; + break; + case NEON_UQSHRN_scalar: + mnemonic = "uqshrn"; + nfd.SetFormatMap(1, &map_shift_narrow); + break; + case NEON_UQRSHRN_scalar: + mnemonic = "uqrshrn"; + nfd.SetFormatMap(1, &map_shift_narrow); + break; + case NEON_SQSHRN_scalar: + mnemonic = "sqshrn"; + nfd.SetFormatMap(1, &map_shift_narrow); + break; + case NEON_SQRSHRN_scalar: + mnemonic = "sqrshrn"; + nfd.SetFormatMap(1, &map_shift_narrow); + break; + case NEON_SQSHRUN_scalar: + mnemonic = "sqshrun"; + nfd.SetFormatMap(1, &map_shift_narrow); + break; + case NEON_SQRSHRUN_scalar: + mnemonic = "sqrshrun"; + nfd.SetFormatMap(1, &map_shift_narrow); + break; + default: + form = "(NEONScalarShiftImmediate)"; + } + } else { + form = "(NEONScalarShiftImmediate)"; + } + Format(instr, mnemonic, nfd.SubstitutePlaceholders(form)); +} + + +void Disassembler::VisitNEONShiftImmediate(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Vd.%s, 'Vn.%s, 'Is1"; + const char *form_shift_2 = "'Vd.%s, 'Vn.%s, 'Is2"; + const char *form_xtl = "'Vd.%s, 'Vn.%s"; + + // 0001->8H, 001x->4S, 01xx->2D, all others undefined. + static const NEONFormatMap map_shift_ta = + {{22, 21, 20, 19}, + {NF_UNDEF, NF_8H, NF_4S, NF_4S, NF_2D, NF_2D, NF_2D, NF_2D}}; + + // 00010->8B, 00011->16B, 001x0->4H, 001x1->8H, + // 01xx0->2S, 01xx1->4S, 1xxx1->2D, all others undefined. + static const NEONFormatMap map_shift_tb = + {{22, 21, 20, 19, 30}, + {NF_UNDEF, NF_UNDEF, NF_8B, NF_16B, NF_4H, NF_8H, NF_4H, + NF_8H, NF_2S, NF_4S, NF_2S, NF_4S, NF_2S, NF_4S, + NF_2S, NF_4S, NF_UNDEF, NF_2D, NF_UNDEF, NF_2D, NF_UNDEF, + NF_2D, NF_UNDEF, NF_2D, NF_UNDEF, NF_2D, NF_UNDEF, NF_2D, + NF_UNDEF, NF_2D, NF_UNDEF, NF_2D}}; + + NEONFormatDecoder nfd(instr, &map_shift_tb); + + if (instr->GetImmNEONImmh()) { // immh has to be non-zero. + switch (instr->Mask(NEONShiftImmediateMask)) { + case NEON_SQSHLU: + mnemonic = "sqshlu"; + form = form_shift_2; + break; + case NEON_SQSHL_imm: + mnemonic = "sqshl"; + form = form_shift_2; + break; + case NEON_UQSHL_imm: + mnemonic = "uqshl"; + form = form_shift_2; + break; + case NEON_SHL: + mnemonic = "shl"; + form = form_shift_2; + break; + case NEON_SLI: + mnemonic = "sli"; + form = form_shift_2; + break; + case NEON_SCVTF_imm: + mnemonic = "scvtf"; + break; + case NEON_UCVTF_imm: + mnemonic = "ucvtf"; + break; + case NEON_FCVTZU_imm: + mnemonic = "fcvtzu"; + break; + case NEON_FCVTZS_imm: + mnemonic = "fcvtzs"; + break; + case NEON_SRI: + mnemonic = "sri"; + break; + case NEON_SSHR: + mnemonic = "sshr"; + break; + case NEON_USHR: + mnemonic = "ushr"; + break; + case NEON_SRSHR: + mnemonic = "srshr"; + break; + case NEON_URSHR: + mnemonic = "urshr"; + break; + case NEON_SSRA: + mnemonic = "ssra"; + break; + case NEON_USRA: + mnemonic = "usra"; + break; + case NEON_SRSRA: + mnemonic = "srsra"; + break; + case NEON_URSRA: + mnemonic = "ursra"; + break; + case NEON_SHRN: + mnemonic = instr->Mask(NEON_Q) ? "shrn2" : "shrn"; + nfd.SetFormatMap(1, &map_shift_ta); + break; + case NEON_RSHRN: + mnemonic = instr->Mask(NEON_Q) ? "rshrn2" : "rshrn"; + nfd.SetFormatMap(1, &map_shift_ta); + break; + case NEON_UQSHRN: + mnemonic = instr->Mask(NEON_Q) ? "uqshrn2" : "uqshrn"; + nfd.SetFormatMap(1, &map_shift_ta); + break; + case NEON_UQRSHRN: + mnemonic = instr->Mask(NEON_Q) ? "uqrshrn2" : "uqrshrn"; + nfd.SetFormatMap(1, &map_shift_ta); + break; + case NEON_SQSHRN: + mnemonic = instr->Mask(NEON_Q) ? "sqshrn2" : "sqshrn"; + nfd.SetFormatMap(1, &map_shift_ta); + break; + case NEON_SQRSHRN: + mnemonic = instr->Mask(NEON_Q) ? "sqrshrn2" : "sqrshrn"; + nfd.SetFormatMap(1, &map_shift_ta); + break; + case NEON_SQSHRUN: + mnemonic = instr->Mask(NEON_Q) ? "sqshrun2" : "sqshrun"; + nfd.SetFormatMap(1, &map_shift_ta); + break; + case NEON_SQRSHRUN: + mnemonic = instr->Mask(NEON_Q) ? "sqrshrun2" : "sqrshrun"; + nfd.SetFormatMap(1, &map_shift_ta); + break; + case NEON_SSHLL: + nfd.SetFormatMap(0, &map_shift_ta); + if (instr->GetImmNEONImmb() == 0 && + CountSetBits(instr->GetImmNEONImmh(), 32) == 1) { // sxtl variant. + form = form_xtl; + mnemonic = instr->Mask(NEON_Q) ? "sxtl2" : "sxtl"; + } else { // sshll variant. + form = form_shift_2; + mnemonic = instr->Mask(NEON_Q) ? "sshll2" : "sshll"; + } + break; + case NEON_USHLL: + nfd.SetFormatMap(0, &map_shift_ta); + if (instr->GetImmNEONImmb() == 0 && + CountSetBits(instr->GetImmNEONImmh(), 32) == 1) { // uxtl variant. + form = form_xtl; + mnemonic = instr->Mask(NEON_Q) ? "uxtl2" : "uxtl"; + } else { // ushll variant. + form = form_shift_2; + mnemonic = instr->Mask(NEON_Q) ? "ushll2" : "ushll"; + } + break; + default: + form = "(NEONShiftImmediate)"; + } + } else { + form = "(NEONShiftImmediate)"; + } + Format(instr, mnemonic, nfd.Substitute(form)); +} + + +void Disassembler::VisitNEONTable(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(NEONTable)"; + const char form_1v[] = "'Vd.%%s, {'Vn.16b}, 'Vm.%%s"; + const char form_2v[] = "'Vd.%%s, {'Vn.16b, v%d.16b}, 'Vm.%%s"; + const char form_3v[] = "'Vd.%%s, {'Vn.16b, v%d.16b, v%d.16b}, 'Vm.%%s"; + const char form_4v[] = + "'Vd.%%s, {'Vn.16b, v%d.16b, v%d.16b, v%d.16b}, 'Vm.%%s"; + static const NEONFormatMap map_b = {{30}, {NF_8B, NF_16B}}; + NEONFormatDecoder nfd(instr, &map_b); + + switch (instr->Mask(NEONTableMask)) { + case NEON_TBL_1v: + mnemonic = "tbl"; + form = form_1v; + break; + case NEON_TBL_2v: + mnemonic = "tbl"; + form = form_2v; + break; + case NEON_TBL_3v: + mnemonic = "tbl"; + form = form_3v; + break; + case NEON_TBL_4v: + mnemonic = "tbl"; + form = form_4v; + break; + case NEON_TBX_1v: + mnemonic = "tbx"; + form = form_1v; + break; + case NEON_TBX_2v: + mnemonic = "tbx"; + form = form_2v; + break; + case NEON_TBX_3v: + mnemonic = "tbx"; + form = form_3v; + break; + case NEON_TBX_4v: + mnemonic = "tbx"; + form = form_4v; + break; + default: + break; + } + + char re_form[sizeof(form_4v) + 6]; + int reg_num = instr->GetRn(); + _snprintf_s(re_form, + sizeof(re_form), -1, + form, + (reg_num + 1) % kNumberOfVRegisters, + (reg_num + 2) % kNumberOfVRegisters, + (reg_num + 3) % kNumberOfVRegisters); + + Format(instr, mnemonic, nfd.Substitute(re_form)); +} + + +void Disassembler::VisitNEONPerm(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Vd.%s, 'Vn.%s, 'Vm.%s"; + NEONFormatDecoder nfd(instr); + + switch (instr->Mask(NEONPermMask)) { + case NEON_TRN1: + mnemonic = "trn1"; + break; + case NEON_TRN2: + mnemonic = "trn2"; + break; + case NEON_UZP1: + mnemonic = "uzp1"; + break; + case NEON_UZP2: + mnemonic = "uzp2"; + break; + case NEON_ZIP1: + mnemonic = "zip1"; + break; + case NEON_ZIP2: + mnemonic = "zip2"; + break; + default: + form = "(NEONPerm)"; + } + Format(instr, mnemonic, nfd.Substitute(form)); +} + +void Disassembler:: + VisitSVE32BitGatherLoadHalfwords_ScalarPlus32BitScaledOffsets( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "{'Zt.s}, 'Pgl/z, ['Xns, 'Zm.s, '?22:suxtw #1]"; + + switch (instr->Mask( + SVE32BitGatherLoadHalfwords_ScalarPlus32BitScaledOffsetsMask)) { + case LD1H_z_p_bz_s_x32_scaled: + mnemonic = "ld1h"; + break; + case LD1SH_z_p_bz_s_x32_scaled: + mnemonic = "ld1sh"; + break; + case LDFF1H_z_p_bz_s_x32_scaled: + mnemonic = "ldff1h"; + break; + case LDFF1SH_z_p_bz_s_x32_scaled: + mnemonic = "ldff1sh"; + break; + default: + form = "(SVE32BitGatherLoadHalfwords_ScalarPlus32BitScaledOffsets)"; + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVE32BitGatherLoadWords_ScalarPlus32BitScaledOffsets( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "{'Zt.s}, 'Pgl/z, ['Xns, 'Zm.s, '?22:suxtw #2]"; + + switch ( + instr->Mask(SVE32BitGatherLoadWords_ScalarPlus32BitScaledOffsetsMask)) { + case LD1W_z_p_bz_s_x32_scaled: + mnemonic = "ld1w"; + break; + case LDFF1W_z_p_bz_s_x32_scaled: + mnemonic = "ldff1w"; + break; + default: + form = "(SVE32BitGatherLoadWords_ScalarPlus32BitScaledOffsets)"; + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVE32BitGatherLoad_ScalarPlus32BitUnscaledOffsets( + const Instruction *instr) { + const char *form = "{'Zt.s}, 'Pgl/z, ['Xns, 'Zm.s, '?22:suxtw]"; + + const char *mnemonic = "unimplemented"; + switch (instr->Mask(SVE32BitGatherLoad_ScalarPlus32BitUnscaledOffsetsMask)) { + case LD1B_z_p_bz_s_x32_unscaled: + mnemonic = "ld1b"; + break; + case LD1H_z_p_bz_s_x32_unscaled: + mnemonic = "ld1h"; + break; + case LD1SB_z_p_bz_s_x32_unscaled: + mnemonic = "ld1sb"; + break; + case LD1SH_z_p_bz_s_x32_unscaled: + mnemonic = "ld1sh"; + break; + case LD1W_z_p_bz_s_x32_unscaled: + mnemonic = "ld1w"; + break; + case LDFF1B_z_p_bz_s_x32_unscaled: + mnemonic = "ldff1b"; + break; + case LDFF1H_z_p_bz_s_x32_unscaled: + mnemonic = "ldff1h"; + break; + case LDFF1SB_z_p_bz_s_x32_unscaled: + mnemonic = "ldff1sb"; + break; + case LDFF1SH_z_p_bz_s_x32_unscaled: + mnemonic = "ldff1sh"; + break; + case LDFF1W_z_p_bz_s_x32_unscaled: + mnemonic = "ldff1w"; + break; + default: + form = "(SVE32BitGatherLoad_ScalarPlus32BitUnscaledOffsets)"; + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVE32BitGatherLoad_VectorPlusImm( + const Instruction *instr) { + const char *form = "{'Zt.s}, 'Pgl/z, ['Zn.s]"; + const char *form_imm_b = "{'Zt.s}, 'Pgl/z, ['Zn.s, #'u2016]"; + const char *form_imm_h = "{'Zt.s}, 'Pgl/z, ['Zn.s, #'u2016*2]"; + const char *form_imm_w = "{'Zt.s}, 'Pgl/z, ['Zn.s, #'u2016*4]"; + const char *form_imm; + + const char *mnemonic = "unimplemented"; + switch (instr->Mask(SVE32BitGatherLoad_VectorPlusImmMask)) { + case LD1B_z_p_ai_s: + mnemonic = "ld1b"; + form_imm = form_imm_b; + break; + case LD1H_z_p_ai_s: + mnemonic = "ld1h"; + form_imm = form_imm_h; + break; + case LD1SB_z_p_ai_s: + mnemonic = "ld1sb"; + form_imm = form_imm_b; + break; + case LD1SH_z_p_ai_s: + mnemonic = "ld1sh"; + form_imm = form_imm_h; + break; + case LD1W_z_p_ai_s: + mnemonic = "ld1w"; + form_imm = form_imm_w; + break; + case LDFF1B_z_p_ai_s: + mnemonic = "ldff1b"; + form_imm = form_imm_b; + break; + case LDFF1H_z_p_ai_s: + mnemonic = "ldff1h"; + form_imm = form_imm_h; + break; + case LDFF1SB_z_p_ai_s: + mnemonic = "ldff1sb"; + form_imm = form_imm_b; + break; + case LDFF1SH_z_p_ai_s: + mnemonic = "ldff1sh"; + form_imm = form_imm_h; + break; + case LDFF1W_z_p_ai_s: + mnemonic = "ldff1w"; + form_imm = form_imm_w; + break; + default: + form = "(SVE32BitGatherLoad_VectorPlusImm)"; + form_imm = form; + break; + } + if (instr->ExtractBits(20, 16) != 0) form = form_imm; + + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVE32BitGatherPrefetch_ScalarPlus32BitScaledOffsets( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'prefSVEOp, 'Pgl, ['Xns, 'Zm.s, '?22:suxtw"; + const char *suffix = NULL; + + switch ( + instr->Mask(SVE32BitGatherPrefetch_ScalarPlus32BitScaledOffsetsMask)) { + case PRFB_i_p_bz_s_x32_scaled: + mnemonic = "prfb"; + suffix = "]"; + break; + case PRFD_i_p_bz_s_x32_scaled: + mnemonic = "prfd"; + suffix = " #3]"; + break; + case PRFH_i_p_bz_s_x32_scaled: + mnemonic = "prfh"; + suffix = " #1]"; + break; + case PRFW_i_p_bz_s_x32_scaled: + mnemonic = "prfw"; + suffix = " #2]"; + break; + default: + form = "(SVE32BitGatherPrefetch_ScalarPlus32BitScaledOffsets)"; + break; + } + Format(instr, mnemonic, form, suffix); +} + +void Disassembler::VisitSVE32BitGatherPrefetch_VectorPlusImm( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = (instr->ExtractBits(20, 16) != 0) + ? "'prefSVEOp, 'Pgl, ['Zn.s, #'u2016]" + : "'prefSVEOp, 'Pgl, ['Zn.s]"; + + switch (instr->Mask(SVE32BitGatherPrefetch_VectorPlusImmMask)) { + case PRFB_i_p_ai_s: + mnemonic = "prfb"; + break; + case PRFD_i_p_ai_s: + mnemonic = "prfd"; + break; + case PRFH_i_p_ai_s: + mnemonic = "prfh"; + break; + case PRFW_i_p_ai_s: + mnemonic = "prfw"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVE32BitScatterStore_ScalarPlus32BitScaledOffsets( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "{'Zt.s}, 'Pgl, ['Xns, 'Zm.s, '?14:suxtw #'u2423]"; + + switch (instr->Mask(SVE32BitScatterStore_ScalarPlus32BitScaledOffsetsMask)) { + case ST1H_z_p_bz_s_x32_scaled: + mnemonic = "st1h"; + break; + case ST1W_z_p_bz_s_x32_scaled: + mnemonic = "st1w"; + break; + default: + form = "(SVE32BitScatterStore_ScalarPlus32BitScaledOffsets)"; + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVE32BitScatterStore_ScalarPlus32BitUnscaledOffsets( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "{'Zt.s}, 'Pgl, ['Xns, 'Zm.s, '?14:suxtw]"; + + switch ( + instr->Mask(SVE32BitScatterStore_ScalarPlus32BitUnscaledOffsetsMask)) { + case ST1B_z_p_bz_s_x32_unscaled: + mnemonic = "st1b"; + break; + case ST1H_z_p_bz_s_x32_unscaled: + mnemonic = "st1h"; + break; + case ST1W_z_p_bz_s_x32_unscaled: + mnemonic = "st1w"; + break; + default: + form = "(SVE32BitScatterStore_ScalarPlus32BitUnscaledOffsets)"; + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVE32BitScatterStore_VectorPlusImm( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "{'Zt.s}, 'Pgl, ['Zn.s"; + const char *suffix = NULL; + + bool is_zero = instr->ExtractBits(20, 16) == 0; + + switch (instr->Mask(SVE32BitScatterStore_VectorPlusImmMask)) { + case ST1B_z_p_ai_s: + mnemonic = "st1b"; + suffix = is_zero ? "]" : ", #'u2016]"; + break; + case ST1H_z_p_ai_s: + mnemonic = "st1h"; + suffix = is_zero ? "]" : ", #'u2016*2]"; + break; + case ST1W_z_p_ai_s: + mnemonic = "st1w"; + suffix = is_zero ? "]" : ", #'u2016*4]"; + break; + default: + form = "(SVE32BitScatterStore_VectorPlusImm)"; + break; + } + Format(instr, mnemonic, form, suffix); +} + +void Disassembler::VisitSVE64BitGatherLoad_ScalarPlus32BitUnpackedScaledOffsets( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "{'Zt.d}, 'Pgl/z, ['Xns, 'Zm.d, '?22:suxtw #'u2423]"; + + switch (instr->Mask( + SVE64BitGatherLoad_ScalarPlus32BitUnpackedScaledOffsetsMask)) { + case LD1D_z_p_bz_d_x32_scaled: + mnemonic = "ld1d"; + break; + case LD1H_z_p_bz_d_x32_scaled: + mnemonic = "ld1h"; + break; + case LD1SH_z_p_bz_d_x32_scaled: + mnemonic = "ld1sh"; + break; + case LD1SW_z_p_bz_d_x32_scaled: + mnemonic = "ld1sw"; + break; + case LD1W_z_p_bz_d_x32_scaled: + mnemonic = "ld1w"; + break; + case LDFF1D_z_p_bz_d_x32_scaled: + mnemonic = "ldff1d"; + break; + case LDFF1H_z_p_bz_d_x32_scaled: + mnemonic = "ldff1h"; + break; + case LDFF1SH_z_p_bz_d_x32_scaled: + mnemonic = "ldff1sh"; + break; + case LDFF1SW_z_p_bz_d_x32_scaled: + mnemonic = "ldff1sw"; + break; + case LDFF1W_z_p_bz_d_x32_scaled: + mnemonic = "ldff1w"; + break; + default: + form = "(SVE64BitGatherLoad_ScalarPlus32BitUnpackedScaledOffsetsMask)"; + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVE64BitGatherLoad_ScalarPlus64BitScaledOffsets( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "{'Zt.d}, 'Pgl/z, ['Xns, 'Zm.d, lsl #'u2423]"; + + switch (instr->Mask(SVE64BitGatherLoad_ScalarPlus64BitScaledOffsetsMask)) { + case LD1D_z_p_bz_d_64_scaled: + mnemonic = "ld1d"; + break; + case LD1H_z_p_bz_d_64_scaled: + mnemonic = "ld1h"; + break; + case LD1SH_z_p_bz_d_64_scaled: + mnemonic = "ld1sh"; + break; + case LD1SW_z_p_bz_d_64_scaled: + mnemonic = "ld1sw"; + break; + case LD1W_z_p_bz_d_64_scaled: + mnemonic = "ld1w"; + break; + case LDFF1D_z_p_bz_d_64_scaled: + mnemonic = "ldff1d"; + break; + case LDFF1H_z_p_bz_d_64_scaled: + mnemonic = "ldff1h"; + break; + case LDFF1SH_z_p_bz_d_64_scaled: + mnemonic = "ldff1sh"; + break; + case LDFF1SW_z_p_bz_d_64_scaled: + mnemonic = "ldff1sw"; + break; + case LDFF1W_z_p_bz_d_64_scaled: + mnemonic = "ldff1w"; + break; + default: + form = "(SVE64BitGatherLoad_ScalarPlus64BitScaledOffsetsMask)"; + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsets( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "{'Zt.d}, 'Pgl/z, ['Xns, 'Zm.d]"; + + switch (instr->Mask(SVE64BitGatherLoad_ScalarPlus64BitUnscaledOffsetsMask)) { + case LD1B_z_p_bz_d_64_unscaled: + mnemonic = "ld1b"; + break; + case LD1D_z_p_bz_d_64_unscaled: + mnemonic = "ld1d"; + break; + case LD1H_z_p_bz_d_64_unscaled: + mnemonic = "ld1h"; + break; + case LD1SB_z_p_bz_d_64_unscaled: + mnemonic = "ld1sb"; + break; + case LD1SH_z_p_bz_d_64_unscaled: + mnemonic = "ld1sh"; + break; + case LD1SW_z_p_bz_d_64_unscaled: + mnemonic = "ld1sw"; + break; + case LD1W_z_p_bz_d_64_unscaled: + mnemonic = "ld1w"; + break; + case LDFF1B_z_p_bz_d_64_unscaled: + mnemonic = "ldff1b"; + break; + case LDFF1D_z_p_bz_d_64_unscaled: + mnemonic = "ldff1d"; + break; + case LDFF1H_z_p_bz_d_64_unscaled: + mnemonic = "ldff1h"; + break; + case LDFF1SB_z_p_bz_d_64_unscaled: + mnemonic = "ldff1sb"; + break; + case LDFF1SH_z_p_bz_d_64_unscaled: + mnemonic = "ldff1sh"; + break; + case LDFF1SW_z_p_bz_d_64_unscaled: + mnemonic = "ldff1sw"; + break; + case LDFF1W_z_p_bz_d_64_unscaled: + mnemonic = "ldff1w"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler:: + VisitSVE64BitGatherLoad_ScalarPlusUnpacked32BitUnscaledOffsets( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "{'Zt.d}, 'Pgl/z, ['Xns, 'Zm.d, '?22:suxtw]"; + + switch (instr->Mask( + SVE64BitGatherLoad_ScalarPlusUnpacked32BitUnscaledOffsetsMask)) { + case LD1B_z_p_bz_d_x32_unscaled: + mnemonic = "ld1b"; + break; + case LD1D_z_p_bz_d_x32_unscaled: + mnemonic = "ld1d"; + break; + case LD1H_z_p_bz_d_x32_unscaled: + mnemonic = "ld1h"; + break; + case LD1SB_z_p_bz_d_x32_unscaled: + mnemonic = "ld1sb"; + break; + case LD1SH_z_p_bz_d_x32_unscaled: + mnemonic = "ld1sh"; + break; + case LD1SW_z_p_bz_d_x32_unscaled: + mnemonic = "ld1sw"; + break; + case LD1W_z_p_bz_d_x32_unscaled: + mnemonic = "ld1w"; + break; + case LDFF1B_z_p_bz_d_x32_unscaled: + mnemonic = "ldff1b"; + break; + case LDFF1D_z_p_bz_d_x32_unscaled: + mnemonic = "ldff1d"; + break; + case LDFF1H_z_p_bz_d_x32_unscaled: + mnemonic = "ldff1h"; + break; + case LDFF1SB_z_p_bz_d_x32_unscaled: + mnemonic = "ldff1sb"; + break; + case LDFF1SH_z_p_bz_d_x32_unscaled: + mnemonic = "ldff1sh"; + break; + case LDFF1SW_z_p_bz_d_x32_unscaled: + mnemonic = "ldff1sw"; + break; + case LDFF1W_z_p_bz_d_x32_unscaled: + mnemonic = "ldff1w"; + break; + default: + form = "(SVE64BitGatherLoad_ScalarPlusUnpacked32BitUnscaledOffsetsMask)"; + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVE64BitGatherLoad_VectorPlusImm( + const Instruction *instr) { + const char *form = "{'Zt.d}, 'Pgl/z, ['Zn.d]"; + const char *form_imm[4] = {"{'Zt.d}, 'Pgl/z, ['Zn.d, #'u2016]", + "{'Zt.d}, 'Pgl/z, ['Zn.d, #'u2016*2]", + "{'Zt.d}, 'Pgl/z, ['Zn.d, #'u2016*4]", + "{'Zt.d}, 'Pgl/z, ['Zn.d, #'u2016*8]"}; + + if (instr->ExtractBits(20, 16) != 0) { + unsigned msz = instr->ExtractBits(24, 23); + bool sign_extend = instr->ExtractBit(14) == 0; + if ((msz == kDRegSizeInBytesLog2) && sign_extend) { + form = "(SVE64BitGatherLoad_VectorPlusImm)"; + } else { + VIXL_ASSERT(msz < ArrayLength(form_imm)); + form = form_imm[msz]; + } + } + + const char *mnemonic = "unimplemented"; + switch (instr->Mask(SVE64BitGatherLoad_VectorPlusImmMask)) { + case LD1B_z_p_ai_d: + mnemonic = "ld1b"; + break; + case LD1D_z_p_ai_d: + mnemonic = "ld1d"; + break; + case LD1H_z_p_ai_d: + mnemonic = "ld1h"; + break; + case LD1SB_z_p_ai_d: + mnemonic = "ld1sb"; + break; + case LD1SH_z_p_ai_d: + mnemonic = "ld1sh"; + break; + case LD1SW_z_p_ai_d: + mnemonic = "ld1sw"; + break; + case LD1W_z_p_ai_d: + mnemonic = "ld1w"; + break; + case LDFF1B_z_p_ai_d: + mnemonic = "ldff1b"; + break; + case LDFF1D_z_p_ai_d: + mnemonic = "ldff1d"; + break; + case LDFF1H_z_p_ai_d: + mnemonic = "ldff1h"; + break; + case LDFF1SB_z_p_ai_d: + mnemonic = "ldff1sb"; + break; + case LDFF1SH_z_p_ai_d: + mnemonic = "ldff1sh"; + break; + case LDFF1SW_z_p_ai_d: + mnemonic = "ldff1sw"; + break; + case LDFF1W_z_p_ai_d: + mnemonic = "ldff1w"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVE64BitGatherPrefetch_ScalarPlus64BitScaledOffsets( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVE64BitGatherPrefetch_ScalarPlus64BitScaledOffsets)"; + + switch ( + instr->Mask(SVE64BitGatherPrefetch_ScalarPlus64BitScaledOffsetsMask)) { + case PRFB_i_p_bz_d_64_scaled: + mnemonic = "prfb"; + form = "'prefSVEOp, 'Pgl, ['Xns, 'Zm.d]"; + break; + case PRFD_i_p_bz_d_64_scaled: + mnemonic = "prfd"; + form = "'prefSVEOp, 'Pgl, ['Xns, 'Zm.d, lsl #3]"; + break; + case PRFH_i_p_bz_d_64_scaled: + mnemonic = "prfh"; + form = "'prefSVEOp, 'Pgl, ['Xns, 'Zm.d, lsl #1]"; + break; + case PRFW_i_p_bz_d_64_scaled: + mnemonic = "prfw"; + form = "'prefSVEOp, 'Pgl, ['Xns, 'Zm.d, lsl #2]"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler:: + VisitSVE64BitGatherPrefetch_ScalarPlusUnpacked32BitScaledOffsets( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'prefSVEOp, 'Pgl, ['Xns, 'Zm.d, '?22:suxtw"; + const char *suffix = NULL; + + switch (instr->Mask( + SVE64BitGatherPrefetch_ScalarPlusUnpacked32BitScaledOffsetsMask)) { + case PRFB_i_p_bz_d_x32_scaled: + mnemonic = "prfb"; + suffix = " ]"; + break; + case PRFD_i_p_bz_d_x32_scaled: + mnemonic = "prfd"; + suffix = " #3]"; + break; + case PRFH_i_p_bz_d_x32_scaled: + mnemonic = "prfh"; + suffix = " #1]"; + break; + case PRFW_i_p_bz_d_x32_scaled: + mnemonic = "prfw"; + suffix = " #2]"; + break; + default: + form = "(SVE64BitGatherPrefetch_ScalarPlusUnpacked32BitScaledOffsets)"; + break; + } + Format(instr, mnemonic, form, suffix); +} + +void Disassembler::VisitSVE64BitGatherPrefetch_VectorPlusImm( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = (instr->ExtractBits(20, 16) != 0) + ? "'prefSVEOp, 'Pgl, ['Zn.d, #'u2016]" + : "'prefSVEOp, 'Pgl, ['Zn.d]"; + + switch (instr->Mask(SVE64BitGatherPrefetch_VectorPlusImmMask)) { + case PRFB_i_p_ai_d: + mnemonic = "prfb"; + break; + case PRFD_i_p_ai_d: + mnemonic = "prfd"; + break; + case PRFH_i_p_ai_d: + mnemonic = "prfh"; + break; + case PRFW_i_p_ai_d: + mnemonic = "prfw"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVE64BitScatterStore_ScalarPlus64BitScaledOffsets( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "{'Zt.d}, 'Pgl, ['Xns, 'Zm.d, lsl #'u2423]"; + + switch (instr->Mask(SVE64BitScatterStore_ScalarPlus64BitScaledOffsetsMask)) { + case ST1D_z_p_bz_d_64_scaled: + mnemonic = "st1d"; + break; + case ST1H_z_p_bz_d_64_scaled: + mnemonic = "st1h"; + break; + case ST1W_z_p_bz_d_64_scaled: + mnemonic = "st1w"; + break; + default: + form = "(SVE64BitScatterStore_ScalarPlus64BitScaledOffsets)"; + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVE64BitScatterStore_ScalarPlus64BitUnscaledOffsets( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "{'Zt.d}, 'Pgl, ['Xns, 'Zm.d]"; + + switch ( + instr->Mask(SVE64BitScatterStore_ScalarPlus64BitUnscaledOffsetsMask)) { + case ST1B_z_p_bz_d_64_unscaled: + mnemonic = "st1b"; + break; + case ST1D_z_p_bz_d_64_unscaled: + mnemonic = "st1d"; + break; + case ST1H_z_p_bz_d_64_unscaled: + mnemonic = "st1h"; + break; + case ST1W_z_p_bz_d_64_unscaled: + mnemonic = "st1w"; + break; + default: + form = "(SVE64BitScatterStore_ScalarPlus64BitUnscaledOffset)"; + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler:: + VisitSVE64BitScatterStore_ScalarPlusUnpacked32BitScaledOffsets( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "{'Zt.d}, 'Pgl, ['Xns, 'Zm.d, '?14:suxtw #'u2423]"; + + switch (instr->Mask( + SVE64BitScatterStore_ScalarPlusUnpacked32BitScaledOffsetsMask)) { + case ST1D_z_p_bz_d_x32_scaled: + mnemonic = "st1d"; + break; + case ST1H_z_p_bz_d_x32_scaled: + mnemonic = "st1h"; + break; + case ST1W_z_p_bz_d_x32_scaled: + mnemonic = "st1w"; + break; + default: + form = "(SVE64BitScatterStore_ScalarPlusUnpacked32BitScaledOffsets)"; + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler:: + VisitSVE64BitScatterStore_ScalarPlusUnpacked32BitUnscaledOffsets( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "{'Zt.d}, 'Pgl, ['Xns, 'Zm.d, '?14:suxtw]"; + + switch (instr->Mask( + SVE64BitScatterStore_ScalarPlusUnpacked32BitUnscaledOffsetsMask)) { + case ST1B_z_p_bz_d_x32_unscaled: + mnemonic = "st1b"; + break; + case ST1D_z_p_bz_d_x32_unscaled: + mnemonic = "st1d"; + break; + case ST1H_z_p_bz_d_x32_unscaled: + mnemonic = "st1h"; + break; + case ST1W_z_p_bz_d_x32_unscaled: + mnemonic = "st1w"; + break; + default: + form = "(SVE64BitScatterStore_ScalarPlusUnpacked32BitUnscaledOffsets)"; + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVE64BitScatterStore_VectorPlusImm( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "{'Zt.d}, 'Pgl, ['Zn.d"; + const char *suffix = NULL; + + bool is_zero = instr->ExtractBits(20, 16) == 0; + + switch (instr->Mask(SVE64BitScatterStore_VectorPlusImmMask)) { + case ST1B_z_p_ai_d: + mnemonic = "st1b"; + suffix = is_zero ? "]" : ", #'u2016]"; + break; + case ST1D_z_p_ai_d: + mnemonic = "st1d"; + suffix = is_zero ? "]" : ", #'u2016*8]"; + break; + case ST1H_z_p_ai_d: + mnemonic = "st1h"; + suffix = is_zero ? "]" : ", #'u2016*2]"; + break; + case ST1W_z_p_ai_d: + mnemonic = "st1w"; + suffix = is_zero ? "]" : ", #'u2016*4]"; + break; + default: + form = "(SVE64BitScatterStore_VectorPlusImm)"; + break; + } + Format(instr, mnemonic, form, suffix); +} + +void Disassembler::VisitSVEBitwiseLogicalWithImm_Unpredicated( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Zd.'tl, 'Zd.'tl, 'ITriSvel"; + + if (instr->GetSVEImmLogical() == 0) { + // The immediate encoded in the instruction is not in the expected format. + Format(instr, "unallocated", "(SVEBitwiseImm)"); + return; + } + + switch (instr->Mask(SVEBitwiseLogicalWithImm_UnpredicatedMask)) { + case AND_z_zi: + mnemonic = "and"; + break; + case EOR_z_zi: + mnemonic = "eor"; + break; + case ORR_z_zi: + mnemonic = "orr"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEBitwiseLogical_Predicated(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Zd.'t, 'Pgl/m, 'Zd.'t, 'Zn.'t"; + + switch (instr->Mask(SVEBitwiseLogical_PredicatedMask)) { + case AND_z_p_zz: + mnemonic = "and"; + break; + case BIC_z_p_zz: + mnemonic = "bic"; + break; + case EOR_z_p_zz: + mnemonic = "eor"; + break; + case ORR_z_p_zz: + mnemonic = "orr"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEBitwiseShiftByImm_Predicated( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Zd.'tszp, 'Pgl/m, 'Zd.'tszp, 'ITriSveq"; + unsigned tsize = (instr->ExtractBits(23, 22) << 2) | instr->ExtractBits(9, 8); + + if (tsize == 0) { + form = "(SVEBitwiseShiftByImm_Predicated)"; + } else { + switch (instr->Mask(SVEBitwiseShiftByImm_PredicatedMask)) { + case ASRD_z_p_zi: + mnemonic = "asrd"; + break; + case ASR_z_p_zi: + mnemonic = "asr"; + break; + case LSL_z_p_zi: + mnemonic = "lsl"; + form = "'Zd.'tszp, p'u1210/m, 'Zd.'tszp, 'ITriSvep"; + break; + case LSR_z_p_zi: + mnemonic = "lsr"; + break; + default: + break; + } + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEBitwiseShiftByVector_Predicated( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Zd.'t, 'Pgl/m, 'Zd.'t, 'Zn.'t"; + + switch (instr->Mask(SVEBitwiseShiftByVector_PredicatedMask)) { + case ASRR_z_p_zz: + mnemonic = "asrr"; + break; + case ASR_z_p_zz: + mnemonic = "asr"; + break; + case LSLR_z_p_zz: + mnemonic = "lslr"; + break; + case LSL_z_p_zz: + mnemonic = "lsl"; + break; + case LSRR_z_p_zz: + mnemonic = "lsrr"; + break; + case LSR_z_p_zz: + mnemonic = "lsr"; + break; + default: + form = "(SVEBitwiseShiftByVector_Predicated)"; + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEBitwiseShiftByWideElements_Predicated( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Zd.'t, 'Pgl/m, 'Zd.'t, 'Zn.d"; + + if (instr->GetSVESize() == kDRegSizeInBytesLog2) { + form = "(SVEBitwiseShiftByWideElements_Predicated)"; + } else { + switch (instr->Mask(SVEBitwiseShiftByWideElements_PredicatedMask)) { + case ASR_z_p_zw: + mnemonic = "asr"; + break; + case LSL_z_p_zw: + mnemonic = "lsl"; + break; + case LSR_z_p_zw: + mnemonic = "lsr"; + break; + default: + form = "(SVEBitwiseShiftByWideElements_Predicated)"; + break; + } + } + Format(instr, mnemonic, form); +} + +static bool SVEMoveMaskPreferred(uint64_t value, int lane_bytes_log2) { + VIXL_ASSERT(IsUintN(8 << lane_bytes_log2, value)); + + // Duplicate lane-sized value across double word. + switch (lane_bytes_log2) { + case 0: + value *= 0x0101010101010101; + break; + case 1: + value *= 0x0001000100010001; + break; + case 2: + value *= 0x0000000100000001; + break; + case 3: // Nothing to do + break; + default: + VIXL_UNREACHABLE(); + } + + if ((value & 0xff) == 0) { + // Check for 16-bit patterns. Set least-significant 16 bits, to make tests + // easier; we already checked least-significant byte is zero above. + uint64_t generic_value = value | 0xffff; + + // Check 0x00000000_0000pq00 or 0xffffffff_ffffpq00. + if ((generic_value == 0xffff) || (generic_value == UINT64_MAX)) { + return false; + } + + // Check 0x0000pq00_0000pq00 or 0xffffpq00_ffffpq00. + uint64_t rotvalue = RotateRight(value, 32, 64); + if (value == rotvalue) { + generic_value &= 0xffffffff; + if ((generic_value == 0xffff) || (generic_value == UINT32_MAX)) { + return false; + } + } + + // Check 0xpq00pq00_pq00pq00. + rotvalue = RotateRight(value, 16, 64); + if (value == rotvalue) { + return false; + } + } else { + // Check for 8-bit patterns. Set least-significant byte, to make tests + // easier. + uint64_t generic_value = value | 0xff; + + // Check 0x00000000_000000pq or 0xffffffff_ffffffpq. + if ((generic_value == 0xff) || (generic_value == UINT64_MAX)) { + return false; + } + + // Check 0x000000pq_000000pq or 0xffffffpq_ffffffpq. + uint64_t rotvalue = RotateRight(value, 32, 64); + if (value == rotvalue) { + generic_value &= 0xffffffff; + if ((generic_value == 0xff) || (generic_value == UINT32_MAX)) { + return false; + } + } + + // Check 0x00pq00pq_00pq00pq or 0xffpqffpq_ffpqffpq. + rotvalue = RotateRight(value, 16, 64); + if (value == rotvalue) { + generic_value &= 0xffff; + if ((generic_value == 0xff) || (generic_value == UINT16_MAX)) { + return false; + } + } + + // Check 0xpqpqpqpq_pqpqpqpq. + rotvalue = RotateRight(value, 8, 64); + if (value == rotvalue) { + return false; + } + } + return true; +} + +void Disassembler::VisitSVEBroadcastBitmaskImm(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEBroadcastBitmaskImm)"; + + switch (instr->Mask(SVEBroadcastBitmaskImmMask)) { + case DUPM_z_i: { + uint64_t imm = instr->GetSVEImmLogical(); + if (imm != 0) { + int lane_size = instr->GetSVEBitwiseImmLaneSizeInBytesLog2(); + mnemonic = SVEMoveMaskPreferred(imm, lane_size) ? "mov" : "dupm"; + form = "'Zd.'tl, 'ITriSvel"; + } + break; + } + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEBroadcastFPImm_Unpredicated( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEBroadcastFPImm_Unpredicated)"; + + switch (instr->Mask(SVEBroadcastFPImm_UnpredicatedMask)) { + case FDUP_z_i: + // The preferred disassembly for fdup is "fmov". + mnemonic = "fmov"; + form = "'Zd.'t, 'IFPSve"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEBroadcastGeneralRegister(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEBroadcastGeneralRegister)"; + + switch (instr->Mask(SVEBroadcastGeneralRegisterMask)) { + case DUP_z_r: + // The preferred disassembly for dup is "mov". + mnemonic = "mov"; + if (instr->GetSVESize() == kDRegSizeInBytesLog2) { + form = "'Zd.'t, 'Xns"; + } else { + form = "'Zd.'t, 'Wns"; + } + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEBroadcastIndexElement(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEBroadcastIndexElement)"; + + switch (instr->Mask(SVEBroadcastIndexElementMask)) { + case DUP_z_zi: { + // The tsz field must not be zero. + int tsz = instr->ExtractBits(20, 16); + if (tsz != 0) { + // The preferred disassembly for dup is "mov". + mnemonic = "mov"; + int imm2 = instr->ExtractBits(23, 22); + if ((CountSetBits(imm2) + CountSetBits(tsz)) == 1) { + // If imm2:tsz has one set bit, the index is zero. This is + // disassembled as a mov from a b/h/s/d/q scalar register. + form = "'Zd.'tszx, 'tszx'u0905"; + } else { + form = "'Zd.'tszx, 'Zn.'tszx['IVInsSVEIndex]"; + } + } + break; + } + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEBroadcastIntImm_Unpredicated( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEBroadcastIntImm_Unpredicated)"; + + switch (instr->Mask(SVEBroadcastIntImm_UnpredicatedMask)) { + case DUP_z_i: + // The encoding of byte-sized lanes with lsl #8 is undefined. + if ((instr->GetSVEVectorFormat() == kFormatVnB) && + (instr->ExtractBit(13) == 1)) + break; + + // The preferred disassembly for dup is "mov". + mnemonic = "mov"; + form = (instr->ExtractBit(13) == 0) ? "'Zd.'t, #'s1205" + : "'Zd.'t, #'s1205, lsl #8"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVECompressActiveElements(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVECompressActiveElements)"; + + switch (instr->Mask(SVECompressActiveElementsMask)) { + case COMPACT_z_p_z: + // The top bit of size is always set for compact, so 't can only be + // substituted with types S and D. + VIXL_ASSERT(instr->ExtractBit(23) == 1); + mnemonic = "compact"; + form = "'Zd.'t, 'Pgl, 'Zn.'t"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEConditionallyBroadcastElementToVector( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Zd.'t, 'Pgl, 'Zd.'t, 'Zn.'t"; + + switch (instr->Mask(SVEConditionallyBroadcastElementToVectorMask)) { + case CLASTA_z_p_zz: + mnemonic = "clasta"; + break; + case CLASTB_z_p_zz: + mnemonic = "clastb"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEConditionallyExtractElementToGeneralRegister( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Wd, 'Pgl, 'Wd, 'Zn.'t"; + + if (instr->GetSVESize() == kDRegSizeInBytesLog2) { + form = "'Xd, p'u1210, 'Xd, 'Zn.'t"; + } + + switch (instr->Mask(SVEConditionallyExtractElementToGeneralRegisterMask)) { + case CLASTA_r_p_z: + mnemonic = "clasta"; + break; + case CLASTB_r_p_z: + mnemonic = "clastb"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEConditionallyExtractElementToSIMDFPScalar( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'t'u0400, 'Pgl, 't'u0400, 'Zn.'t"; + + switch (instr->Mask(SVEConditionallyExtractElementToSIMDFPScalarMask)) { + case CLASTA_v_p_z: + mnemonic = "clasta"; + break; + case CLASTB_v_p_z: + mnemonic = "clastb"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEConditionallyTerminateScalars( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = (instr->ExtractBit(22) == 0) ? "'Wn, 'Wm" : "'Xn, 'Xm"; + + switch (instr->Mask(SVEConditionallyTerminateScalarsMask)) { + case CTERMEQ_rr: + mnemonic = "ctermeq"; + break; + case CTERMNE_rr: + mnemonic = "ctermne"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEConstructivePrefix_Unpredicated( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEConstructivePrefix_Unpredicated)"; + + switch (instr->Mask(SVEConstructivePrefix_UnpredicatedMask)) { + case MOVPRFX_z_z: + mnemonic = "movprfx"; + form = "'Zd, 'Zn"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEContiguousFirstFaultLoad_ScalarPlusScalar( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + + bool rm_is_zr = instr->GetRm() == kZeroRegCode; + + const char *form = "{'Zt.'tlss}, 'Pgl/z, ['Xns"; + const char *suffix = NULL; + + switch (instr->Mask(SVEContiguousFirstFaultLoad_ScalarPlusScalarMask)) { + case LDFF1B_z_p_br_u16: + case LDFF1B_z_p_br_u32: + case LDFF1B_z_p_br_u64: + case LDFF1B_z_p_br_u8: + mnemonic = "ldff1b"; + suffix = rm_is_zr ? "]" : ", 'Xm]"; + break; + case LDFF1D_z_p_br_u64: + mnemonic = "ldff1d"; + suffix = rm_is_zr ? "]" : ", 'Xm, lsl #3]"; + break; + case LDFF1H_z_p_br_u16: + case LDFF1H_z_p_br_u32: + case LDFF1H_z_p_br_u64: + mnemonic = "ldff1h"; + suffix = rm_is_zr ? "]" : ", 'Xm, lsl #1]"; + break; + case LDFF1SB_z_p_br_s16: + case LDFF1SB_z_p_br_s32: + case LDFF1SB_z_p_br_s64: + mnemonic = "ldff1sb"; + suffix = rm_is_zr ? "]" : ", 'Xm]"; + break; + case LDFF1SH_z_p_br_s32: + case LDFF1SH_z_p_br_s64: + mnemonic = "ldff1sh"; + suffix = rm_is_zr ? "]" : ", 'Xm, lsl #1]"; + break; + case LDFF1SW_z_p_br_s64: + mnemonic = "ldff1sw"; + suffix = rm_is_zr ? "]" : ", 'Xm, lsl #2]"; + break; + case LDFF1W_z_p_br_u32: + case LDFF1W_z_p_br_u64: + mnemonic = "ldff1w"; + suffix = rm_is_zr ? "]" : ", 'Xm, lsl #2]"; + break; + default: + form = "(SVEContiguousFirstFaultLoad_ScalarPlusScalar)"; + break; + } + + Format(instr, mnemonic, form, suffix); +} + +void Disassembler::VisitSVEContiguousNonFaultLoad_ScalarPlusImm( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "{'Zt.'tlss}, 'Pgl/z, ['Xns"; + const char *suffix = + (instr->ExtractBits(19, 16) == 0) ? "]" : ", #'s1916, mul vl]"; + + switch (instr->Mask(SVEContiguousNonFaultLoad_ScalarPlusImmMask)) { + case LDNF1B_z_p_bi_u16: + case LDNF1B_z_p_bi_u32: + case LDNF1B_z_p_bi_u64: + case LDNF1B_z_p_bi_u8: + mnemonic = "ldnf1b"; + break; + case LDNF1D_z_p_bi_u64: + mnemonic = "ldnf1d"; + break; + case LDNF1H_z_p_bi_u16: + case LDNF1H_z_p_bi_u32: + case LDNF1H_z_p_bi_u64: + mnemonic = "ldnf1h"; + break; + case LDNF1SB_z_p_bi_s16: + case LDNF1SB_z_p_bi_s32: + case LDNF1SB_z_p_bi_s64: + mnemonic = "ldnf1sb"; + break; + case LDNF1SH_z_p_bi_s32: + case LDNF1SH_z_p_bi_s64: + mnemonic = "ldnf1sh"; + break; + case LDNF1SW_z_p_bi_s64: + mnemonic = "ldnf1sw"; + break; + case LDNF1W_z_p_bi_u32: + case LDNF1W_z_p_bi_u64: + mnemonic = "ldnf1w"; + break; + default: + form = "(SVEContiguousNonFaultLoad_ScalarPlusImm)"; + suffix = NULL; + break; + } + Format(instr, mnemonic, form, suffix); +} + +void Disassembler::VisitSVEContiguousNonTemporalLoad_ScalarPlusImm( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEContiguousNonTemporalLoad_ScalarPlusImm)"; + + const char *suffix = + (instr->ExtractBits(19, 16) == 0) ? "]" : ", #'s1916, mul vl]"; + switch (instr->Mask(SVEContiguousNonTemporalLoad_ScalarPlusImmMask)) { + case LDNT1B_z_p_bi_contiguous: + mnemonic = "ldnt1b"; + form = "{'Zt.b}, 'Pgl/z, ['Xns"; + break; + case LDNT1D_z_p_bi_contiguous: + mnemonic = "ldnt1d"; + form = "{'Zt.d}, 'Pgl/z, ['Xns"; + break; + case LDNT1H_z_p_bi_contiguous: + mnemonic = "ldnt1h"; + form = "{'Zt.h}, 'Pgl/z, ['Xns"; + break; + case LDNT1W_z_p_bi_contiguous: + mnemonic = "ldnt1w"; + form = "{'Zt.s}, 'Pgl/z, ['Xns"; + break; + default: + suffix = NULL; + break; + } + Format(instr, mnemonic, form, suffix); +} + +void Disassembler::VisitSVEContiguousNonTemporalLoad_ScalarPlusScalar( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEContiguousNonTemporalLoad_ScalarPlusScalar)"; + + switch (instr->Mask(SVEContiguousNonTemporalLoad_ScalarPlusScalarMask)) { + case LDNT1B_z_p_br_contiguous: + mnemonic = "ldnt1b"; + form = "{'Zt.b}, 'Pgl/z, ['Xns, 'Rm]"; + break; + case LDNT1D_z_p_br_contiguous: + mnemonic = "ldnt1d"; + form = "{'Zt.d}, 'Pgl/z, ['Xns, 'Rm, lsl #3]"; + break; + case LDNT1H_z_p_br_contiguous: + mnemonic = "ldnt1h"; + form = "{'Zt.h}, 'Pgl/z, ['Xns, 'Rm, lsl #1]"; + break; + case LDNT1W_z_p_br_contiguous: + mnemonic = "ldnt1w"; + form = "{'Zt.s}, 'Pgl/z, ['Xns, 'Rm, lsl #2]"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEContiguousNonTemporalStore_ScalarPlusImm( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEContiguousNonTemporalStore_ScalarPlusImm)"; + + const char *suffix = + (instr->ExtractBits(19, 16) == 0) ? "]" : ", #'s1916, mul vl]"; + switch (instr->Mask(SVEContiguousNonTemporalStore_ScalarPlusImmMask)) { + case STNT1B_z_p_bi_contiguous: + mnemonic = "stnt1b"; + form = "{'Zt.b}, 'Pgl, ['Xns"; + break; + case STNT1D_z_p_bi_contiguous: + mnemonic = "stnt1d"; + form = "{'Zt.d}, 'Pgl, ['Xns"; + break; + case STNT1H_z_p_bi_contiguous: + mnemonic = "stnt1h"; + form = "{'Zt.h}, 'Pgl, ['Xns"; + break; + case STNT1W_z_p_bi_contiguous: + mnemonic = "stnt1w"; + form = "{'Zt.s}, 'Pgl, ['Xns"; + break; + default: + suffix = NULL; + break; + } + Format(instr, mnemonic, form, suffix); +} + +void Disassembler::VisitSVEContiguousNonTemporalStore_ScalarPlusScalar( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEContiguousNonTemporalStore_ScalarPlusScalar)"; + + switch (instr->Mask(SVEContiguousNonTemporalStore_ScalarPlusScalarMask)) { + case STNT1B_z_p_br_contiguous: + mnemonic = "stnt1b"; + form = "{'Zt.b}, 'Pgl, ['Xns, 'Rm]"; + break; + case STNT1D_z_p_br_contiguous: + mnemonic = "stnt1d"; + form = "{'Zt.d}, 'Pgl, ['Xns, 'Rm, lsl #3]"; + break; + case STNT1H_z_p_br_contiguous: + mnemonic = "stnt1h"; + form = "{'Zt.h}, 'Pgl, ['Xns, 'Rm, lsl #1]"; + break; + case STNT1W_z_p_br_contiguous: + mnemonic = "stnt1w"; + form = "{'Zt.s}, 'Pgl, ['Xns, 'Rm, lsl #2]"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEContiguousPrefetch_ScalarPlusImm( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = (instr->ExtractBits(21, 16) != 0) + ? "'prefSVEOp, 'Pgl, ['Xns, #'s2116, mul vl]" + : "'prefSVEOp, 'Pgl, ['Xns]"; + + switch (instr->Mask(SVEContiguousPrefetch_ScalarPlusImmMask)) { + case PRFB_i_p_bi_s: + mnemonic = "prfb"; + break; + case PRFD_i_p_bi_s: + mnemonic = "prfd"; + break; + case PRFH_i_p_bi_s: + mnemonic = "prfh"; + break; + case PRFW_i_p_bi_s: + mnemonic = "prfw"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEContiguousPrefetch_ScalarPlusScalar( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEContiguousPrefetch_ScalarPlusScalar)"; + + if (instr->GetRm() != kZeroRegCode) { + switch (instr->Mask(SVEContiguousPrefetch_ScalarPlusScalarMask)) { + case PRFB_i_p_br_s: + mnemonic = "prfb"; + form = "'prefSVEOp, 'Pgl, ['Xns, 'Rm]"; + break; + case PRFD_i_p_br_s: + mnemonic = "prfd"; + form = "'prefSVEOp, 'Pgl, ['Xns, 'Rm, lsl #3]"; + break; + case PRFH_i_p_br_s: + mnemonic = "prfh"; + form = "'prefSVEOp, 'Pgl, ['Xns, 'Rm, lsl #1]"; + break; + case PRFW_i_p_br_s: + mnemonic = "prfw"; + form = "'prefSVEOp, 'Pgl, ['Xns, 'Rm, lsl #2]"; + break; + default: + break; + } + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEContiguousStore_ScalarPlusImm( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + + // The 'size' field isn't in the usual place here. + const char *form = "{'Zt.'tls}, 'Pgl, ['Xns, #'s1916, mul vl]"; + if (instr->ExtractBits(19, 16) == 0) { + form = "{'Zt.'tls}, 'Pgl, ['Xns]"; + } + + switch (instr->Mask(SVEContiguousStore_ScalarPlusImmMask)) { + case ST1B_z_p_bi: + mnemonic = "st1b"; + break; + case ST1D_z_p_bi: + mnemonic = "st1d"; + break; + case ST1H_z_p_bi: + mnemonic = "st1h"; + break; + case ST1W_z_p_bi: + mnemonic = "st1w"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEContiguousStore_ScalarPlusScalar( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + + // The 'size' field isn't in the usual place here. + const char *form = "{'Zt.'tls}, 'Pgl, ['Xns, 'Xm'NSveS]"; + + switch (instr->Mask(SVEContiguousStore_ScalarPlusScalarMask)) { + case ST1B_z_p_br: + mnemonic = "st1b"; + break; + case ST1D_z_p_br: + mnemonic = "st1d"; + break; + case ST1H_z_p_br: + mnemonic = "st1h"; + break; + case ST1W_z_p_br: + mnemonic = "st1w"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVECopyFPImm_Predicated(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVECopyFPImm_Predicated)"; + + switch (instr->Mask(SVECopyFPImm_PredicatedMask)) { + case FCPY_z_p_i: + // The preferred disassembly for fcpy is "fmov". + mnemonic = "fmov"; + form = "'Zd.'t, 'Pm/m, 'IFPSve"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVECopyGeneralRegisterToVector_Predicated( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVECopyGeneralRegisterToVector_Predicated)"; + + switch (instr->Mask(SVECopyGeneralRegisterToVector_PredicatedMask)) { + case CPY_z_p_r: + // The preferred disassembly for cpy is "mov". + mnemonic = "mov"; + form = "'Zd.'t, 'Pgl/m, 'Wns"; + if (instr->GetSVESize() == kXRegSizeInBytesLog2) { + form = "'Zd.'t, 'Pgl/m, 'Xns"; + } + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVECopyIntImm_Predicated(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVECopyIntImm_Predicated)"; + const char *suffix = NULL; + + switch (instr->Mask(SVECopyIntImm_PredicatedMask)) { + case CPY_z_p_i: { + // The preferred disassembly for cpy is "mov". + mnemonic = "mov"; + form = "'Zd.'t, 'Pm/'?14:mz, #'s1205"; + if (instr->ExtractBit(13) != 0) suffix = ", lsl #8"; + break; + } + default: + break; + } + Format(instr, mnemonic, form, suffix); +} + +void Disassembler::VisitSVECopySIMDFPScalarRegisterToVector_Predicated( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVECopySIMDFPScalarRegisterToVector_Predicated)"; + + switch (instr->Mask(SVECopySIMDFPScalarRegisterToVector_PredicatedMask)) { + case CPY_z_p_v: + // The preferred disassembly for cpy is "mov". + mnemonic = "mov"; + form = "'Zd.'t, 'Pgl/m, 'Vnv"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEExtractElementToGeneralRegister( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Wd, 'Pgl, 'Zn.'t"; + + if (instr->GetSVESize() == kDRegSizeInBytesLog2) { + form = "'Xd, p'u1210, 'Zn.'t"; + } + + switch (instr->Mask(SVEExtractElementToGeneralRegisterMask)) { + case LASTA_r_p_z: + mnemonic = "lasta"; + break; + case LASTB_r_p_z: + mnemonic = "lastb"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEExtractElementToSIMDFPScalarRegister( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'t'u0400, 'Pgl, 'Zn.'t"; + + switch (instr->Mask(SVEExtractElementToSIMDFPScalarRegisterMask)) { + case LASTA_v_p_z: + mnemonic = "lasta"; + break; + case LASTB_v_p_z: + mnemonic = "lastb"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEFFRInitialise(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEFFRInitialise)"; + + switch (instr->Mask(SVEFFRInitialiseMask)) { + case SETFFR_f: + mnemonic = "setffr"; + form = " "; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEFFRWriteFromPredicate(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEFFRWriteFromPredicate)"; + + switch (instr->Mask(SVEFFRWriteFromPredicateMask)) { + case WRFFR_f_p: + mnemonic = "wrffr"; + form = "'Pn.b"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEFPArithmeticWithImm_Predicated( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form00 = "'Zd.'t, 'Pgl/m, 'Zd.'t, #0.0"; + const char *form05 = "'Zd.'t, 'Pgl/m, 'Zd.'t, #0.5"; + const char *form10 = "'Zd.'t, 'Pgl/m, 'Zd.'t, #1.0"; + const char *form20 = "'Zd.'t, 'Pgl/m, 'Zd.'t, #2.0"; + int i1 = instr->ExtractBit(5); + const char *form = i1 ? form10 : form00; + + switch (instr->Mask(SVEFPArithmeticWithImm_PredicatedMask)) { + case FADD_z_p_zs: + mnemonic = "fadd"; + form = i1 ? form10 : form05; + break; + case FMAXNM_z_p_zs: + mnemonic = "fmaxnm"; + break; + case FMAX_z_p_zs: + mnemonic = "fmax"; + break; + case FMINNM_z_p_zs: + mnemonic = "fminnm"; + break; + case FMIN_z_p_zs: + mnemonic = "fmin"; + break; + case FMUL_z_p_zs: + mnemonic = "fmul"; + form = i1 ? form20 : form05; + break; + case FSUBR_z_p_zs: + mnemonic = "fsubr"; + form = i1 ? form10 : form05; + break; + case FSUB_z_p_zs: + mnemonic = "fsub"; + form = i1 ? form10 : form05; + break; + default: + form = "(SVEFPArithmeticWithImm_Predicated)"; + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEFPArithmetic_Predicated(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Zd.'t, 'Pgl/m, 'Zd.'t, 'Zn.'t"; + + switch (instr->Mask(SVEFPArithmetic_PredicatedMask)) { + case FABD_z_p_zz: + mnemonic = "fabd"; + break; + case FADD_z_p_zz: + mnemonic = "fadd"; + break; + case FDIVR_z_p_zz: + mnemonic = "fdivr"; + break; + case FDIV_z_p_zz: + mnemonic = "fdiv"; + break; + case FMAXNM_z_p_zz: + mnemonic = "fmaxnm"; + break; + case FMAX_z_p_zz: + mnemonic = "fmax"; + break; + case FMINNM_z_p_zz: + mnemonic = "fminnm"; + break; + case FMIN_z_p_zz: + mnemonic = "fmin"; + break; + case FMULX_z_p_zz: + mnemonic = "fmulx"; + break; + case FMUL_z_p_zz: + mnemonic = "fmul"; + break; + case FSCALE_z_p_zz: + mnemonic = "fscale"; + break; + case FSUBR_z_p_zz: + mnemonic = "fsubr"; + break; + case FSUB_z_p_zz: + mnemonic = "fsub"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEFPConvertPrecision(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEFPConvertPrecision)"; + + switch (instr->Mask(SVEFPConvertPrecisionMask)) { + case FCVT_z_p_z_d2h: + mnemonic = "fcvt"; + form = "'Zd.h, 'Pgl/m, 'Zn.d"; + break; + case FCVT_z_p_z_d2s: + mnemonic = "fcvt"; + form = "'Zd.s, 'Pgl/m, 'Zn.d"; + break; + case FCVT_z_p_z_h2d: + mnemonic = "fcvt"; + form = "'Zd.d, 'Pgl/m, 'Zn.h"; + break; + case FCVT_z_p_z_h2s: + mnemonic = "fcvt"; + form = "'Zd.s, 'Pgl/m, 'Zn.h"; + break; + case FCVT_z_p_z_s2d: + mnemonic = "fcvt"; + form = "'Zd.d, 'Pgl/m, 'Zn.s"; + break; + case FCVT_z_p_z_s2h: + mnemonic = "fcvt"; + form = "'Zd.h, 'Pgl/m, 'Zn.s"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEFPConvertToInt(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEFPConvertToInt)"; + + switch (instr->Mask(SVEFPConvertToIntMask)) { + case FCVTZS_z_p_z_d2w: + mnemonic = "fcvtzs"; + form = "'Zd.s, 'Pgl/m, 'Zn.d"; + break; + case FCVTZS_z_p_z_d2x: + mnemonic = "fcvtzs"; + form = "'Zd.d, 'Pgl/m, 'Zn.d"; + break; + case FCVTZS_z_p_z_fp162h: + mnemonic = "fcvtzs"; + form = "'Zd.h, 'Pgl/m, 'Zn.h"; + break; + case FCVTZS_z_p_z_fp162w: + mnemonic = "fcvtzs"; + form = "'Zd.s, 'Pgl/m, 'Zn.h"; + break; + case FCVTZS_z_p_z_fp162x: + mnemonic = "fcvtzs"; + form = "'Zd.d, 'Pgl/m, 'Zn.h"; + break; + case FCVTZS_z_p_z_s2w: + mnemonic = "fcvtzs"; + form = "'Zd.s, 'Pgl/m, 'Zn.s"; + break; + case FCVTZS_z_p_z_s2x: + mnemonic = "fcvtzs"; + form = "'Zd.d, 'Pgl/m, 'Zn.s"; + break; + case FCVTZU_z_p_z_d2w: + mnemonic = "fcvtzu"; + form = "'Zd.s, 'Pgl/m, 'Zn.d"; + break; + case FCVTZU_z_p_z_d2x: + mnemonic = "fcvtzu"; + form = "'Zd.d, 'Pgl/m, 'Zn.d"; + break; + case FCVTZU_z_p_z_fp162h: + mnemonic = "fcvtzu"; + form = "'Zd.h, 'Pgl/m, 'Zn.h"; + break; + case FCVTZU_z_p_z_fp162w: + mnemonic = "fcvtzu"; + form = "'Zd.s, 'Pgl/m, 'Zn.h"; + break; + case FCVTZU_z_p_z_fp162x: + mnemonic = "fcvtzu"; + form = "'Zd.d, 'Pgl/m, 'Zn.h"; + break; + case FCVTZU_z_p_z_s2w: + mnemonic = "fcvtzu"; + form = "'Zd.s, 'Pgl/m, 'Zn.s"; + break; + case FCVTZU_z_p_z_s2x: + mnemonic = "fcvtzu"; + form = "'Zd.d, 'Pgl/m, 'Zn.s"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEFPExponentialAccelerator(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEFPExponentialAccelerator)"; + + unsigned size = instr->GetSVESize(); + switch (instr->Mask(SVEFPExponentialAcceleratorMask)) { + case FEXPA_z_z: + if ((size == kHRegSizeInBytesLog2) || (size == kSRegSizeInBytesLog2) || + (size == kDRegSizeInBytesLog2)) { + mnemonic = "fexpa"; + form = "'Zd.'t, 'Zn.'t"; + } + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEFPRoundToIntegralValue(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Zd.'t, 'Pgl/m, 'Zn.'t"; + + switch (instr->Mask(SVEFPRoundToIntegralValueMask)) { + case FRINTA_z_p_z: + mnemonic = "frinta"; + break; + case FRINTI_z_p_z: + mnemonic = "frinti"; + break; + case FRINTM_z_p_z: + mnemonic = "frintm"; + break; + case FRINTN_z_p_z: + mnemonic = "frintn"; + break; + case FRINTP_z_p_z: + mnemonic = "frintp"; + break; + case FRINTX_z_p_z: + mnemonic = "frintx"; + break; + case FRINTZ_z_p_z: + mnemonic = "frintz"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEFPTrigMulAddCoefficient(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEFPTrigMulAddCoefficient)"; + + unsigned size = instr->GetSVESize(); + switch (instr->Mask(SVEFPTrigMulAddCoefficientMask)) { + case FTMAD_z_zzi: + if ((size == kHRegSizeInBytesLog2) || (size == kSRegSizeInBytesLog2) || + (size == kDRegSizeInBytesLog2)) { + mnemonic = "ftmad"; + form = "'Zd.'t, 'Zd.'t, 'Zn.'t, #'u1816"; + } + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEFPTrigSelectCoefficient(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEFPTrigSelectCoefficient)"; + + unsigned size = instr->GetSVESize(); + switch (instr->Mask(SVEFPTrigSelectCoefficientMask)) { + case FTSSEL_z_zz: + if ((size == kHRegSizeInBytesLog2) || (size == kSRegSizeInBytesLog2) || + (size == kDRegSizeInBytesLog2)) { + mnemonic = "ftssel"; + form = "'Zd.'t, 'Zn.'t, 'Zm.'t"; + } + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEFPUnaryOp(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Zd.'t, 'Pgl/m, 'Zn.'t"; + + if (instr->GetSVESize() == kBRegSizeInBytesLog2) { + form = "(SVEFPUnaryOp)"; + } else { + switch (instr->Mask(SVEFPUnaryOpMask)) { + case FRECPX_z_p_z: + mnemonic = "frecpx"; + break; + case FSQRT_z_p_z: + mnemonic = "fsqrt"; + break; + default: + form = "(SVEFPUnaryOp)"; + break; + } + } + Format(instr, mnemonic, form); +} + +static const char *IncDecFormHelper(const Instruction *instr, + const char *reg_pat_mul_form, + const char *reg_pat_form, + const char *reg_form) { + if (instr->ExtractBits(19, 16) == 0) { + if (instr->ExtractBits(9, 5) == SVE_ALL) { + // Use the register only form if the multiplier is one (encoded as zero) + // and the pattern is SVE_ALL. + return reg_form; + } + // Use the register and pattern form if the multiplier is one. + return reg_pat_form; + } + return reg_pat_mul_form; +} + +void Disassembler::VisitSVEIncDecRegisterByElementCount( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = + IncDecFormHelper(instr, "'Xd, 'Ipc, mul #'u1916+1", "'Xd, 'Ipc", "'Xd"); + + switch (instr->Mask(SVEIncDecRegisterByElementCountMask)) { + case DECB_r_rs: + mnemonic = "decb"; + break; + case DECD_r_rs: + mnemonic = "decd"; + break; + case DECH_r_rs: + mnemonic = "dech"; + break; + case DECW_r_rs: + mnemonic = "decw"; + break; + case INCB_r_rs: + mnemonic = "incb"; + break; + case INCD_r_rs: + mnemonic = "incd"; + break; + case INCH_r_rs: + mnemonic = "inch"; + break; + case INCW_r_rs: + mnemonic = "incw"; + break; + default: + form = "(SVEIncDecRegisterByElementCount)"; + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEIncDecVectorByElementCount( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = IncDecFormHelper(instr, + "'Zd.'t, 'Ipc, mul #'u1916+1", + "'Zd.'t, 'Ipc", + "'Zd.'t"); + + switch (instr->Mask(SVEIncDecVectorByElementCountMask)) { + case DECD_z_zs: + mnemonic = "decd"; + break; + case DECH_z_zs: + mnemonic = "dech"; + break; + case DECW_z_zs: + mnemonic = "decw"; + break; + case INCD_z_zs: + mnemonic = "incd"; + break; + case INCH_z_zs: + mnemonic = "inch"; + break; + case INCW_z_zs: + mnemonic = "incw"; + break; + default: + form = "(SVEIncDecVectorByElementCount)"; + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEInsertGeneralRegister(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEInsertGeneralRegister)"; + + switch (instr->Mask(SVEInsertGeneralRegisterMask)) { + case INSR_z_r: + mnemonic = "insr"; + if (instr->GetSVESize() == kDRegSizeInBytesLog2) { + form = "'Zd.'t, 'Xn"; + } else { + form = "'Zd.'t, 'Wn"; + } + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEInsertSIMDFPScalarRegister( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEInsertSIMDFPScalarRegister)"; + + switch (instr->Mask(SVEInsertSIMDFPScalarRegisterMask)) { + case INSR_z_v: + mnemonic = "insr"; + form = "'Zd.'t, 'Vnv"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEIntAddSubtractImm_Unpredicated( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = (instr->ExtractBit(13) == 0) + ? "'Zd.'t, 'Zd.'t, #'u1205" + : "'Zd.'t, 'Zd.'t, #'u1205, lsl #8"; + + switch (instr->Mask(SVEIntAddSubtractImm_UnpredicatedMask)) { + case ADD_z_zi: + mnemonic = "add"; + break; + case SQADD_z_zi: + mnemonic = "sqadd"; + break; + case SQSUB_z_zi: + mnemonic = "sqsub"; + break; + case SUBR_z_zi: + mnemonic = "subr"; + break; + case SUB_z_zi: + mnemonic = "sub"; + break; + case UQADD_z_zi: + mnemonic = "uqadd"; + break; + case UQSUB_z_zi: + mnemonic = "uqsub"; + break; + default: + form = "(SVEIntAddSubtractImm_Unpredicated)"; + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEIntAddSubtractVectors_Predicated( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Zd.'t, 'Pgl/m, 'Zd.'t, 'Zn.'t"; + + switch (instr->Mask(SVEIntAddSubtractVectors_PredicatedMask)) { + case ADD_z_p_zz: + mnemonic = "add"; + break; + case SUBR_z_p_zz: + mnemonic = "subr"; + break; + case SUB_z_p_zz: + mnemonic = "sub"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEIntCompareScalarCountAndLimit( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = + (instr->ExtractBit(12) == 0) ? "'Pd.'t, 'Wn, 'Wm" : "'Pd.'t, 'Xn, 'Xm"; + + switch (instr->Mask(SVEIntCompareScalarCountAndLimitMask)) { + case WHILELE_p_p_rr: + mnemonic = "whilele"; + break; + case WHILELO_p_p_rr: + mnemonic = "whilelo"; + break; + case WHILELS_p_p_rr: + mnemonic = "whilels"; + break; + case WHILELT_p_p_rr: + mnemonic = "whilelt"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEIntConvertToFP(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEIntConvertToFP)"; + + switch (instr->Mask(SVEIntConvertToFPMask)) { + case SCVTF_z_p_z_h2fp16: + mnemonic = "scvtf"; + form = "'Zd.h, 'Pgl/m, 'Zn.h"; + break; + case SCVTF_z_p_z_w2d: + mnemonic = "scvtf"; + form = "'Zd.d, 'Pgl/m, 'Zn.s"; + break; + case SCVTF_z_p_z_w2fp16: + mnemonic = "scvtf"; + form = "'Zd.h, 'Pgl/m, 'Zn.s"; + break; + case SCVTF_z_p_z_w2s: + mnemonic = "scvtf"; + form = "'Zd.s, 'Pgl/m, 'Zn.s"; + break; + case SCVTF_z_p_z_x2d: + mnemonic = "scvtf"; + form = "'Zd.d, 'Pgl/m, 'Zn.d"; + break; + case SCVTF_z_p_z_x2fp16: + mnemonic = "scvtf"; + form = "'Zd.h, 'Pgl/m, 'Zn.d"; + break; + case SCVTF_z_p_z_x2s: + mnemonic = "scvtf"; + form = "'Zd.s, 'Pgl/m, 'Zn.d"; + break; + case UCVTF_z_p_z_h2fp16: + mnemonic = "ucvtf"; + form = "'Zd.h, 'Pgl/m, 'Zn.h"; + break; + case UCVTF_z_p_z_w2d: + mnemonic = "ucvtf"; + form = "'Zd.d, 'Pgl/m, 'Zn.s"; + break; + case UCVTF_z_p_z_w2fp16: + mnemonic = "ucvtf"; + form = "'Zd.h, 'Pgl/m, 'Zn.s"; + break; + case UCVTF_z_p_z_w2s: + mnemonic = "ucvtf"; + form = "'Zd.s, 'Pgl/m, 'Zn.s"; + break; + case UCVTF_z_p_z_x2d: + mnemonic = "ucvtf"; + form = "'Zd.d, 'Pgl/m, 'Zn.d"; + break; + case UCVTF_z_p_z_x2fp16: + mnemonic = "ucvtf"; + form = "'Zd.h, 'Pgl/m, 'Zn.d"; + break; + case UCVTF_z_p_z_x2s: + mnemonic = "ucvtf"; + form = "'Zd.s, 'Pgl/m, 'Zn.d"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEIntDivideVectors_Predicated( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Zd.'t, 'Pgl/m, 'Zd.'t, 'Zn.'t"; + + switch (instr->Mask(SVEIntDivideVectors_PredicatedMask)) { + case SDIVR_z_p_zz: + mnemonic = "sdivr"; + break; + case SDIV_z_p_zz: + mnemonic = "sdiv"; + break; + case UDIVR_z_p_zz: + mnemonic = "udivr"; + break; + case UDIV_z_p_zz: + mnemonic = "udiv"; + break; + default: + break; + } + + switch (instr->Mask(SVEIntDivideVectors_PredicatedMask)) { + case SDIVR_z_p_zz: + case SDIV_z_p_zz: + case UDIVR_z_p_zz: + case UDIV_z_p_zz: + switch (instr->GetSVESize()) { + case kBRegSizeInBytesLog2: + case kHRegSizeInBytesLog2: + mnemonic = "unimplemented"; + form = "(SVEIntBinaryArithmeticPredicated)"; + break; + case kSRegSizeInBytesLog2: + case kDRegSizeInBytesLog2: + // The default form works for these instructions. + break; + default: + // GetSVESize() should never return other values. + VIXL_UNREACHABLE(); + break; + } + } + + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEIntMinMaxDifference_Predicated( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Zd.'t, 'Pgl/m, 'Zd.'t, 'Zn.'t"; + + switch (instr->Mask(SVEIntMinMaxDifference_PredicatedMask)) { + case SABD_z_p_zz: + mnemonic = "sabd"; + break; + case SMAX_z_p_zz: + mnemonic = "smax"; + break; + case SMIN_z_p_zz: + mnemonic = "smin"; + break; + case UABD_z_p_zz: + mnemonic = "uabd"; + break; + case UMAX_z_p_zz: + mnemonic = "umax"; + break; + case UMIN_z_p_zz: + mnemonic = "umin"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEIntMinMaxImm_Unpredicated(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Zd.'t, 'Zd.'t, #'u1205"; + + switch (instr->Mask(SVEIntMinMaxImm_UnpredicatedMask)) { + case SMAX_z_zi: + mnemonic = "smax"; + form = "'Zd.'t, 'Zd.'t, #'s1205"; + break; + case SMIN_z_zi: + mnemonic = "smin"; + form = "'Zd.'t, 'Zd.'t, #'s1205"; + break; + case UMAX_z_zi: + mnemonic = "umax"; + break; + case UMIN_z_zi: + mnemonic = "umin"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEIntMulImm_Unpredicated(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEIntMulImm_Unpredicated)"; + + switch (instr->Mask(SVEIntMulImm_UnpredicatedMask)) { + case MUL_z_zi: + mnemonic = "mul"; + form = "'Zd.'t, 'Zd.'t, #'s1205"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEIntMulVectors_Predicated(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Zd.'t, 'Pgl/m, 'Zd.'t, 'Zn.'t"; + + switch (instr->Mask(SVEIntMulVectors_PredicatedMask)) { + case MUL_z_p_zz: + mnemonic = "mul"; + break; + case SMULH_z_p_zz: + mnemonic = "smulh"; + break; + case UMULH_z_p_zz: + mnemonic = "umulh"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVELoadAndBroadcastElement(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVELoadAndBroadcastElement)"; + const char *suffix_b = ", #'u2116]"; + const char *suffix_h = ", #'u2116*2]"; + const char *suffix_w = ", #'u2116*4]"; + const char *suffix_d = ", #'u2116*8]"; + const char *suffix = NULL; + + switch (instr->Mask(SVELoadAndBroadcastElementMask)) { + case LD1RB_z_p_bi_u16: + mnemonic = "ld1rb"; + form = "{'Zt.h}, 'Pgl/z, ['Xns"; + suffix = suffix_b; + break; + case LD1RB_z_p_bi_u32: + mnemonic = "ld1rb"; + form = "{'Zt.s}, 'Pgl/z, ['Xns"; + suffix = suffix_b; + break; + case LD1RB_z_p_bi_u64: + mnemonic = "ld1rb"; + form = "{'Zt.d}, 'Pgl/z, ['Xns"; + suffix = suffix_b; + break; + case LD1RB_z_p_bi_u8: + mnemonic = "ld1rb"; + form = "{'Zt.b}, 'Pgl/z, ['Xns"; + suffix = suffix_b; + break; + case LD1RD_z_p_bi_u64: + mnemonic = "ld1rd"; + form = "{'Zt.d}, 'Pgl/z, ['Xns"; + suffix = suffix_d; + break; + case LD1RH_z_p_bi_u16: + mnemonic = "ld1rh"; + form = "{'Zt.h}, 'Pgl/z, ['Xns"; + suffix = suffix_h; + break; + case LD1RH_z_p_bi_u32: + mnemonic = "ld1rh"; + form = "{'Zt.s}, 'Pgl/z, ['Xns"; + suffix = suffix_h; + break; + case LD1RH_z_p_bi_u64: + mnemonic = "ld1rh"; + form = "{'Zt.d}, 'Pgl/z, ['Xns"; + suffix = suffix_h; + break; + case LD1RSB_z_p_bi_s16: + mnemonic = "ld1rsb"; + form = "{'Zt.h}, 'Pgl/z, ['Xns"; + suffix = suffix_b; + break; + case LD1RSB_z_p_bi_s32: + mnemonic = "ld1rsb"; + form = "{'Zt.s}, 'Pgl/z, ['Xns"; + suffix = suffix_b; + break; + case LD1RSB_z_p_bi_s64: + mnemonic = "ld1rsb"; + form = "{'Zt.d}, 'Pgl/z, ['Xns"; + suffix = suffix_b; + break; + case LD1RSH_z_p_bi_s32: + mnemonic = "ld1rsh"; + form = "{'Zt.s}, 'Pgl/z, ['Xns"; + suffix = suffix_h; + break; + case LD1RSH_z_p_bi_s64: + mnemonic = "ld1rsh"; + form = "{'Zt.d}, 'Pgl/z, ['Xns"; + suffix = suffix_h; + break; + case LD1RSW_z_p_bi_s64: + mnemonic = "ld1rsw"; + form = "{'Zt.d}, 'Pgl/z, ['Xns"; + suffix = suffix_w; + break; + case LD1RW_z_p_bi_u32: + mnemonic = "ld1rw"; + form = "{'Zt.s}, 'Pgl/z, ['Xns"; + suffix = suffix_w; + break; + case LD1RW_z_p_bi_u64: + mnemonic = "ld1rw"; + form = "{'Zt.d}, 'Pgl/z, ['Xns"; + suffix = suffix_w; + break; + default: + break; + } + + // Hide curly brackets if immediate is zero. + if (instr->ExtractBits(21, 16) == 0) { + suffix = "]"; + } + + Format(instr, mnemonic, form, suffix); +} + +void Disassembler::VisitSVELoadAndBroadcastQuadword_ScalarPlusImm( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVELoadAndBroadcastQuadword_ScalarPlusImm)"; + + const char *suffix = + (instr->ExtractBits(19, 16) == 0) ? "]" : ", #'s1916*16]"; + + switch (instr->Mask(SVELoadAndBroadcastQuadword_ScalarPlusImmMask)) { + case LD1RQB_z_p_bi_u8: + mnemonic = "ld1rqb"; + form = "{'Zt.b}, 'Pgl/z, ['Xns"; + break; + case LD1RQD_z_p_bi_u64: + mnemonic = "ld1rqd"; + form = "{'Zt.d}, 'Pgl/z, ['Xns"; + break; + case LD1RQH_z_p_bi_u16: + mnemonic = "ld1rqh"; + form = "{'Zt.h}, 'Pgl/z, ['Xns"; + break; + case LD1RQW_z_p_bi_u32: + mnemonic = "ld1rqw"; + form = "{'Zt.s}, 'Pgl/z, ['Xns"; + break; + default: + suffix = NULL; + break; + } + Format(instr, mnemonic, form, suffix); +} + +void Disassembler::VisitSVELoadAndBroadcastQuadword_ScalarPlusScalar( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVELoadAndBroadcastQuadword_ScalarPlusScalar)"; + + switch (instr->Mask(SVELoadAndBroadcastQuadword_ScalarPlusScalarMask)) { + case LD1RQB_z_p_br_contiguous: + mnemonic = "ld1rqb"; + form = "{'Zt.b}, 'Pgl/z, ['Xns, 'Rm]"; + break; + case LD1RQD_z_p_br_contiguous: + mnemonic = "ld1rqd"; + form = "{'Zt.d}, 'Pgl/z, ['Xns, 'Rm, lsl #3]"; + break; + case LD1RQH_z_p_br_contiguous: + mnemonic = "ld1rqh"; + form = "{'Zt.h}, 'Pgl/z, ['Xns, 'Rm, lsl #1]"; + break; + case LD1RQW_z_p_br_contiguous: + mnemonic = "ld1rqw"; + form = "{'Zt.s}, 'Pgl/z, ['Xns, 'Rm, lsl #2]"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVELoadMultipleStructures_ScalarPlusImm( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVELoadMultipleStructures_ScalarPlusImm)"; + + const char *form_2 = "{'Zt.'tmsz, 'Zt2.'tmsz}, 'Pgl/z, ['Xns'ISveSvl]"; + const char *form_3 = + "{'Zt.'tmsz, 'Zt2.'tmsz, 'Zt3.'tmsz}, 'Pgl/z, ['Xns'ISveSvl]"; + const char *form_4 = + "{'Zt.'tmsz, 'Zt2.'tmsz, 'Zt3.'tmsz, 'Zt4.'tmsz}, " + "'Pgl/z, ['Xns'ISveSvl]"; + + switch (instr->Mask(SVELoadMultipleStructures_ScalarPlusImmMask)) { + case LD2B_z_p_bi_contiguous: + mnemonic = "ld2b"; + form = form_2; + break; + case LD2D_z_p_bi_contiguous: + mnemonic = "ld2d"; + form = form_2; + break; + case LD2H_z_p_bi_contiguous: + mnemonic = "ld2h"; + form = form_2; + break; + case LD2W_z_p_bi_contiguous: + mnemonic = "ld2w"; + form = form_2; + break; + case LD3B_z_p_bi_contiguous: + mnemonic = "ld3b"; + form = form_3; + break; + case LD3D_z_p_bi_contiguous: + mnemonic = "ld3d"; + form = form_3; + break; + case LD3H_z_p_bi_contiguous: + mnemonic = "ld3h"; + form = form_3; + break; + case LD3W_z_p_bi_contiguous: + mnemonic = "ld3w"; + form = form_3; + break; + case LD4B_z_p_bi_contiguous: + mnemonic = "ld4b"; + form = form_4; + break; + case LD4D_z_p_bi_contiguous: + mnemonic = "ld4d"; + form = form_4; + break; + case LD4H_z_p_bi_contiguous: + mnemonic = "ld4h"; + form = form_4; + break; + case LD4W_z_p_bi_contiguous: + mnemonic = "ld4w"; + form = form_4; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVELoadMultipleStructures_ScalarPlusScalar( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVELoadMultipleStructures_ScalarPlusScalar)"; + + const char *form_2 = "{'Zt.'tmsz, 'Zt2.'tmsz}, 'Pgl/z, ['Xns, 'Xm'NSveS]"; + const char *form_3 = + "{'Zt.'tmsz, 'Zt2.'tmsz, 'Zt3.'tmsz}, 'Pgl/z, ['Xns, 'Xm'NSveS]"; + const char *form_4 = + "{'Zt.'tmsz, 'Zt2.'tmsz, 'Zt3.'tmsz, 'Zt4.'tmsz}, " + "'Pgl/z, ['Xns, 'Xm'NSveS]"; + + switch (instr->Mask(SVELoadMultipleStructures_ScalarPlusScalarMask)) { + case LD2B_z_p_br_contiguous: + mnemonic = "ld2b"; + form = form_2; + break; + case LD2D_z_p_br_contiguous: + mnemonic = "ld2d"; + form = form_2; + break; + case LD2H_z_p_br_contiguous: + mnemonic = "ld2h"; + form = form_2; + break; + case LD2W_z_p_br_contiguous: + mnemonic = "ld2w"; + form = form_2; + break; + case LD3B_z_p_br_contiguous: + mnemonic = "ld3b"; + form = form_3; + break; + case LD3D_z_p_br_contiguous: + mnemonic = "ld3d"; + form = form_3; + break; + case LD3H_z_p_br_contiguous: + mnemonic = "ld3h"; + form = form_3; + break; + case LD3W_z_p_br_contiguous: + mnemonic = "ld3w"; + form = form_3; + break; + case LD4B_z_p_br_contiguous: + mnemonic = "ld4b"; + form = form_4; + break; + case LD4D_z_p_br_contiguous: + mnemonic = "ld4d"; + form = form_4; + break; + case LD4H_z_p_br_contiguous: + mnemonic = "ld4h"; + form = form_4; + break; + case LD4W_z_p_br_contiguous: + mnemonic = "ld4w"; + form = form_4; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVELoadPredicateRegister(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVELoadPredicateRegister)"; + + switch (instr->Mask(SVELoadPredicateRegisterMask)) { + case LDR_p_bi: + mnemonic = "ldr"; + if (instr->Mask(0x003f1c00) == 0) { + form = "'Pd, ['Xns]"; + } else { + form = "'Pd, ['Xns, #'s2116:1210, mul vl]"; + } + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVELoadVectorRegister(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVELoadVectorRegister)"; + + switch (instr->Mask(SVELoadVectorRegisterMask)) { + case LDR_z_bi: + mnemonic = "ldr"; + if (instr->Mask(0x003f1c00) == 0) { + form = "'Zd, ['Xns]"; + } else { + form = "'Zt, ['Xns, #'s2116:1210, mul vl]"; + } + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEPartitionBreakCondition(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Pd.b, p'u1310/'?04:mz, 'Pn.b"; + + switch (instr->Mask(SVEPartitionBreakConditionMask)) { + case BRKAS_p_p_p_z: + mnemonic = "brkas"; + break; + case BRKA_p_p_p: + mnemonic = "brka"; + break; + case BRKBS_p_p_p_z: + mnemonic = "brkbs"; + break; + case BRKB_p_p_p: + mnemonic = "brkb"; + break; + default: + form = "(SVEPartitionBreakCondition)"; + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEPermutePredicateElements(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Pd.'t, 'Pn.'t, 'Pm.'t"; + + switch (instr->Mask(SVEPermutePredicateElementsMask)) { + case TRN1_p_pp: + mnemonic = "trn1"; + break; + case TRN2_p_pp: + mnemonic = "trn2"; + break; + case UZP1_p_pp: + mnemonic = "uzp1"; + break; + case UZP2_p_pp: + mnemonic = "uzp2"; + break; + case ZIP1_p_pp: + mnemonic = "zip1"; + break; + case ZIP2_p_pp: + mnemonic = "zip2"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEPredicateFirstActive(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEPredicateFirstActive)"; + + switch (instr->Mask(SVEPredicateFirstActiveMask)) { + case PFIRST_p_p_p: + mnemonic = "pfirst"; + form = "'Pd.b, 'Pn, 'Pd.b"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEPredicateReadFromFFR_Unpredicated( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEPredicateReadFromFFR_Unpredicated)"; + + switch (instr->Mask(SVEPredicateReadFromFFR_UnpredicatedMask)) { + case RDFFR_p_f: + mnemonic = "rdffr"; + form = "'Pd.b"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEPredicateTest(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEPredicateTest)"; + + switch (instr->Mask(SVEPredicateTestMask)) { + case PTEST_p_p: + mnemonic = "ptest"; + form = "p'u1310, 'Pn.b"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEPredicateZero(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEPredicateZero)"; + + switch (instr->Mask(SVEPredicateZeroMask)) { + case PFALSE_p: + mnemonic = "pfalse"; + form = "'Pd.b"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEPropagateBreakToNextPartition( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Pd.b, p'u1310/z, 'Pn.b, 'Pd.b"; + + switch (instr->Mask(SVEPropagateBreakToNextPartitionMask)) { + case BRKNS_p_p_pp: + mnemonic = "brkns"; + break; + case BRKN_p_p_pp: + mnemonic = "brkn"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEReversePredicateElements(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEReversePredicateElements)"; + + switch (instr->Mask(SVEReversePredicateElementsMask)) { + case REV_p_p: + mnemonic = "rev"; + form = "'Pd.'t, 'Pn.'t"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEReverseVectorElements(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEReverseVectorElements)"; + + switch (instr->Mask(SVEReverseVectorElementsMask)) { + case REV_z_z: + mnemonic = "rev"; + form = "'Zd.'t, 'Zn.'t"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEReverseWithinElements(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Zd.'t, 'Pgl/m, 'Zn.'t"; + + unsigned size = instr->GetSVESize(); + switch (instr->Mask(SVEReverseWithinElementsMask)) { + case RBIT_z_p_z: + mnemonic = "rbit"; + break; + case REVB_z_z: + if ((size == kHRegSizeInBytesLog2) || (size == kSRegSizeInBytesLog2) || + (size == kDRegSizeInBytesLog2)) { + mnemonic = "revb"; + } else { + form = "(SVEReverseWithinElements)"; + } + break; + case REVH_z_z: + if ((size == kSRegSizeInBytesLog2) || (size == kDRegSizeInBytesLog2)) { + mnemonic = "revh"; + } else { + form = "(SVEReverseWithinElements)"; + } + break; + case REVW_z_z: + if (size == kDRegSizeInBytesLog2) { + mnemonic = "revw"; + } else { + form = "(SVEReverseWithinElements)"; + } + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVESaturatingIncDecRegisterByElementCount( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = IncDecFormHelper(instr, + "'R20d, 'Ipc, mul #'u1916+1", + "'R20d, 'Ipc", + "'R20d"); + const char *form_sx = IncDecFormHelper(instr, + "'Xd, 'Wd, 'Ipc, mul #'u1916+1", + "'Xd, 'Wd, 'Ipc", + "'Xd, 'Wd"); + + switch (instr->Mask(SVESaturatingIncDecRegisterByElementCountMask)) { + case SQDECB_r_rs_sx: + mnemonic = "sqdecb"; + form = form_sx; + break; + case SQDECD_r_rs_sx: + mnemonic = "sqdecd"; + form = form_sx; + break; + case SQDECH_r_rs_sx: + mnemonic = "sqdech"; + form = form_sx; + break; + case SQDECW_r_rs_sx: + mnemonic = "sqdecw"; + form = form_sx; + break; + case SQINCB_r_rs_sx: + mnemonic = "sqincb"; + form = form_sx; + break; + case SQINCD_r_rs_sx: + mnemonic = "sqincd"; + form = form_sx; + break; + case SQINCH_r_rs_sx: + mnemonic = "sqinch"; + form = form_sx; + break; + case SQINCW_r_rs_sx: + mnemonic = "sqincw"; + form = form_sx; + break; + case SQDECB_r_rs_x: + mnemonic = "sqdecb"; + break; + case SQDECD_r_rs_x: + mnemonic = "sqdecd"; + break; + case SQDECH_r_rs_x: + mnemonic = "sqdech"; + break; + case SQDECW_r_rs_x: + mnemonic = "sqdecw"; + break; + case SQINCB_r_rs_x: + mnemonic = "sqincb"; + break; + case SQINCD_r_rs_x: + mnemonic = "sqincd"; + break; + case SQINCH_r_rs_x: + mnemonic = "sqinch"; + break; + case SQINCW_r_rs_x: + mnemonic = "sqincw"; + break; + case UQDECB_r_rs_uw: + case UQDECB_r_rs_x: + mnemonic = "uqdecb"; + break; + case UQDECD_r_rs_uw: + case UQDECD_r_rs_x: + mnemonic = "uqdecd"; + break; + case UQDECH_r_rs_uw: + case UQDECH_r_rs_x: + mnemonic = "uqdech"; + break; + case UQDECW_r_rs_uw: + case UQDECW_r_rs_x: + mnemonic = "uqdecw"; + break; + case UQINCB_r_rs_uw: + case UQINCB_r_rs_x: + mnemonic = "uqincb"; + break; + case UQINCD_r_rs_uw: + case UQINCD_r_rs_x: + mnemonic = "uqincd"; + break; + case UQINCH_r_rs_uw: + case UQINCH_r_rs_x: + mnemonic = "uqinch"; + break; + case UQINCW_r_rs_uw: + case UQINCW_r_rs_x: + mnemonic = "uqincw"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVESaturatingIncDecVectorByElementCount( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = IncDecFormHelper(instr, + "'Zd.'t, 'Ipc, mul #'u1916+1", + "'Zd.'t, 'Ipc", + "'Zd.'t"); + + switch (instr->Mask(SVESaturatingIncDecVectorByElementCountMask)) { + case SQDECD_z_zs: + mnemonic = "sqdecd"; + break; + case SQDECH_z_zs: + mnemonic = "sqdech"; + break; + case SQDECW_z_zs: + mnemonic = "sqdecw"; + break; + case SQINCD_z_zs: + mnemonic = "sqincd"; + break; + case SQINCH_z_zs: + mnemonic = "sqinch"; + break; + case SQINCW_z_zs: + mnemonic = "sqincw"; + break; + case UQDECD_z_zs: + mnemonic = "uqdecd"; + break; + case UQDECH_z_zs: + mnemonic = "uqdech"; + break; + case UQDECW_z_zs: + mnemonic = "uqdecw"; + break; + case UQINCD_z_zs: + mnemonic = "uqincd"; + break; + case UQINCH_z_zs: + mnemonic = "uqinch"; + break; + case UQINCW_z_zs: + mnemonic = "uqincw"; + break; + default: + form = "(SVEElementCount)"; + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEStoreMultipleStructures_ScalarPlusImm( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEStoreMultipleStructures_ScalarPlusImm)"; + + const char *form_2 = "{'Zt.'tmsz, 'Zt2.'tmsz}, 'Pgl, ['Xns'ISveSvl]"; + const char *form_3 = + "{'Zt.'tmsz, 'Zt2.'tmsz, 'Zt3.'tmsz}, 'Pgl, ['Xns'ISveSvl]"; + const char *form_4 = + "{'Zt.'tmsz, 'Zt2.'tmsz, 'Zt3.'tmsz, 'Zt4.'tmsz}, " + "'Pgl, ['Xns'ISveSvl]"; + + switch (instr->Mask(SVEStoreMultipleStructures_ScalarPlusImmMask)) { + case ST2B_z_p_bi_contiguous: + mnemonic = "st2b"; + form = form_2; + break; + case ST2H_z_p_bi_contiguous: + mnemonic = "st2h"; + form = form_2; + break; + case ST2W_z_p_bi_contiguous: + mnemonic = "st2w"; + form = form_2; + break; + case ST2D_z_p_bi_contiguous: + mnemonic = "st2d"; + form = form_2; + break; + case ST3B_z_p_bi_contiguous: + mnemonic = "st3b"; + form = form_3; + break; + case ST3H_z_p_bi_contiguous: + mnemonic = "st3h"; + form = form_3; + break; + case ST3W_z_p_bi_contiguous: + mnemonic = "st3w"; + form = form_3; + break; + case ST3D_z_p_bi_contiguous: + mnemonic = "st3d"; + form = form_3; + break; + case ST4B_z_p_bi_contiguous: + mnemonic = "st4b"; + form = form_4; + break; + case ST4H_z_p_bi_contiguous: + mnemonic = "st4h"; + form = form_4; + break; + case ST4W_z_p_bi_contiguous: + mnemonic = "st4w"; + form = form_4; + break; + case ST4D_z_p_bi_contiguous: + mnemonic = "st4d"; + form = form_4; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEStoreMultipleStructures_ScalarPlusScalar( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEStoreMultipleStructures_ScalarPlusScalar)"; + + const char *form_2 = "{'Zt.'tmsz, 'Zt2.'tmsz}, 'Pgl, ['Xns, 'Xm'NSveS]"; + const char *form_3 = + "{'Zt.'tmsz, 'Zt2.'tmsz, 'Zt3.'tmsz}, 'Pgl, ['Xns, 'Xm'NSveS]"; + const char *form_4 = + "{'Zt.'tmsz, 'Zt2.'tmsz, 'Zt3.'tmsz, 'Zt4.'tmsz}, " + "'Pgl, ['Xns, 'Xm'NSveS]"; + + switch (instr->Mask(SVEStoreMultipleStructures_ScalarPlusScalarMask)) { + case ST2B_z_p_br_contiguous: + mnemonic = "st2b"; + form = form_2; + break; + case ST2D_z_p_br_contiguous: + mnemonic = "st2d"; + form = form_2; + break; + case ST2H_z_p_br_contiguous: + mnemonic = "st2h"; + form = form_2; + break; + case ST2W_z_p_br_contiguous: + mnemonic = "st2w"; + form = form_2; + break; + case ST3B_z_p_br_contiguous: + mnemonic = "st3b"; + form = form_3; + break; + case ST3D_z_p_br_contiguous: + mnemonic = "st3d"; + form = form_3; + break; + case ST3H_z_p_br_contiguous: + mnemonic = "st3h"; + form = form_3; + break; + case ST3W_z_p_br_contiguous: + mnemonic = "st3w"; + form = form_3; + break; + case ST4B_z_p_br_contiguous: + mnemonic = "st4b"; + form = form_4; + break; + case ST4D_z_p_br_contiguous: + mnemonic = "st4d"; + form = form_4; + break; + case ST4H_z_p_br_contiguous: + mnemonic = "st4h"; + form = form_4; + break; + case ST4W_z_p_br_contiguous: + mnemonic = "st4w"; + form = form_4; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEStorePredicateRegister(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEStorePredicateRegister)"; + + switch (instr->Mask(SVEStorePredicateRegisterMask)) { + case STR_p_bi: + mnemonic = "str"; + if (instr->Mask(0x003f1c00) == 0) { + form = "'Pd, ['Xns]"; + } else { + form = "'Pd, ['Xns, #'s2116:1210, mul vl]"; + } + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEStoreVectorRegister(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEStoreVectorRegister)"; + + switch (instr->Mask(SVEStoreVectorRegisterMask)) { + case STR_z_bi: + mnemonic = "str"; + if (instr->Mask(0x003f1c00) == 0) { + form = "'Zd, ['Xns]"; + } else { + form = "'Zt, ['Xns, #'s2116:1210, mul vl]"; + } + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVETableLookup(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVETableLookup)"; + + switch (instr->Mask(SVETableLookupMask)) { + case TBL_z_zz_1: + mnemonic = "tbl"; + form = "'Zd.'t, {'Zn.'t}, 'Zm.'t"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEUnpackPredicateElements(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Pd.h, 'Pn.b"; + + switch (instr->Mask(SVEUnpackPredicateElementsMask)) { + case PUNPKHI_p_p: + mnemonic = "punpkhi"; + break; + case PUNPKLO_p_p: + mnemonic = "punpklo"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEUnpackVectorElements(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Zd.'t, 'Zn.'th"; + + if (instr->GetSVESize() == 0) { + // The lowest lane size of the destination vector is H-sized lane. + Format(instr, "unallocated", "(SVEUnpackVectorElements)"); + return; + } + + switch (instr->Mask(SVEUnpackVectorElementsMask)) { + case SUNPKHI_z_z: + mnemonic = "sunpkhi"; + break; + case SUNPKLO_z_z: + mnemonic = "sunpklo"; + break; + case UUNPKHI_z_z: + mnemonic = "uunpkhi"; + break; + case UUNPKLO_z_z: + mnemonic = "uunpklo"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEVectorSplice_Destructive(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEVectorSplice_Destructive)"; + + switch (instr->Mask(SVEVectorSplice_DestructiveMask)) { + case SPLICE_z_p_zz_des: + mnemonic = "splice"; + form = "'Zd.'t, 'Pgl, 'Zd.'t, 'Zn.'t"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEAddressGeneration(const Instruction *instr) { + const char *mnemonic = "adr"; + const char *form = "'Zd.d, ['Zn.d, 'Zm.d"; + const char *suffix = NULL; + + bool msz_is_zero = (instr->ExtractBits(11, 10) == 0); + + switch (instr->Mask(SVEAddressGenerationMask)) { + case ADR_z_az_d_s32_scaled: + suffix = msz_is_zero ? ", sxtw]" : ", sxtw #'u1110]"; + break; + case ADR_z_az_d_u32_scaled: + suffix = msz_is_zero ? ", uxtw]" : ", uxtw #'u1110]"; + break; + case ADR_z_az_s_same_scaled: + case ADR_z_az_d_same_scaled: + form = "'Zd.'t, ['Zn.'t, 'Zm.'t"; + suffix = msz_is_zero ? "]" : ", lsl #'u1110]"; + break; + default: + mnemonic = "unimplemented"; + form = "(SVEAddressGeneration)"; + break; + } + Format(instr, mnemonic, form, suffix); +} + +void Disassembler::VisitSVEBitwiseLogicalUnpredicated( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Zd.d, 'Zn.d, 'Zm.d"; + + switch (instr->Mask(SVEBitwiseLogicalUnpredicatedMask)) { + case AND_z_zz: + mnemonic = "and"; + break; + case BIC_z_zz: + mnemonic = "bic"; + break; + case EOR_z_zz: + mnemonic = "eor"; + break; + case ORR_z_zz: + mnemonic = "orr"; + if (instr->GetRn() == instr->GetRm()) { + mnemonic = "mov"; + form = "'Zd.d, 'Zn.d"; + } + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEBitwiseShiftUnpredicated(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEBitwiseShiftUnpredicated)"; + unsigned tsize = + (instr->ExtractBits(23, 22) << 2) | instr->ExtractBits(20, 19); + unsigned lane_size = instr->GetSVESize(); + + switch (instr->Mask(SVEBitwiseShiftUnpredicatedMask)) { + case ASR_z_zi: + if (tsize != 0) { + // The tsz field must not be zero. + mnemonic = "asr"; + form = "'Zd.'tszs, 'Zn.'tszs, 'ITriSves"; + } + break; + case ASR_z_zw: + if (lane_size <= kSRegSizeInBytesLog2) { + mnemonic = "asr"; + form = "'Zd.'t, 'Zn.'t, 'Zm.d"; + } + break; + case LSL_z_zi: + if (tsize != 0) { + // The tsz field must not be zero. + mnemonic = "lsl"; + form = "'Zd.'tszs, 'Zn.'tszs, 'ITriSver"; + } + break; + case LSL_z_zw: + if (lane_size <= kSRegSizeInBytesLog2) { + mnemonic = "lsl"; + form = "'Zd.'t, 'Zn.'t, 'Zm.d"; + } + break; + case LSR_z_zi: + if (tsize != 0) { + // The tsz field must not be zero. + mnemonic = "lsr"; + form = "'Zd.'tszs, 'Zn.'tszs, 'ITriSves"; + } + break; + case LSR_z_zw: + if (lane_size <= kSRegSizeInBytesLog2) { + mnemonic = "lsr"; + form = "'Zd.'t, 'Zn.'t, 'Zm.d"; + } + break; + default: + break; + } + + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEElementCount(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = + IncDecFormHelper(instr, "'Xd, 'Ipc, mul #'u1916+1", "'Xd, 'Ipc", "'Xd"); + + switch (instr->Mask(SVEElementCountMask)) { + case CNTB_r_s: + mnemonic = "cntb"; + break; + case CNTD_r_s: + mnemonic = "cntd"; + break; + case CNTH_r_s: + mnemonic = "cnth"; + break; + case CNTW_r_s: + mnemonic = "cntw"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEFPAccumulatingReduction(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEFPAccumulatingReduction)"; + + switch (instr->Mask(SVEFPAccumulatingReductionMask)) { + case FADDA_v_p_z: + mnemonic = "fadda"; + form = "'t'u0400, 'Pgl, 't'u0400, 'Zn.'t"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEFPArithmeticUnpredicated(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Zd.'t, 'Zn.'t, 'Zm.'t"; + + switch (instr->Mask(SVEFPArithmeticUnpredicatedMask)) { + case FADD_z_zz: + mnemonic = "fadd"; + break; + case FMUL_z_zz: + mnemonic = "fmul"; + break; + case FRECPS_z_zz: + mnemonic = "frecps"; + break; + case FRSQRTS_z_zz: + mnemonic = "frsqrts"; + break; + case FSUB_z_zz: + mnemonic = "fsub"; + break; + case FTSMUL_z_zz: + mnemonic = "ftsmul"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEFPCompareVectors(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Pd.'t, 'Pgl/z, 'Zn.'t, 'Zm.'t"; + + switch (instr->Mask(SVEFPCompareVectorsMask)) { + case FACGE_p_p_zz: + mnemonic = "facge"; + break; + case FACGT_p_p_zz: + mnemonic = "facgt"; + break; + case FCMEQ_p_p_zz: + mnemonic = "fcmeq"; + break; + case FCMGE_p_p_zz: + mnemonic = "fcmge"; + break; + case FCMGT_p_p_zz: + mnemonic = "fcmgt"; + break; + case FCMNE_p_p_zz: + mnemonic = "fcmne"; + break; + case FCMUO_p_p_zz: + mnemonic = "fcmuo"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEFPCompareWithZero(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Pd.'t, 'Pgl/z, 'Zn.'t, #0.0"; + + switch (instr->Mask(SVEFPCompareWithZeroMask)) { + case FCMEQ_p_p_z0: + mnemonic = "fcmeq"; + break; + case FCMGE_p_p_z0: + mnemonic = "fcmge"; + break; + case FCMGT_p_p_z0: + mnemonic = "fcmgt"; + break; + case FCMLE_p_p_z0: + mnemonic = "fcmle"; + break; + case FCMLT_p_p_z0: + mnemonic = "fcmlt"; + break; + case FCMNE_p_p_z0: + mnemonic = "fcmne"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEFPComplexAddition(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEFPComplexAddition)"; + + switch (instr->Mask(SVEFPComplexAdditionMask)) { + case FCADD_z_p_zz: + mnemonic = "fcadd"; + if (instr->ExtractBit(16) == 0) { + form = "'Zd.'t, 'Pgl/m, 'Zd.'t, 'Zn.'t, #90"; + } else { + form = "'Zd.'t, 'Pgl/m, 'Zd.'t, 'Zn.'t, #270"; + } + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEFPComplexMulAdd(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEFPComplexMulAdd)"; + const char *suffix = NULL; + + const char *fcmla_constants[] = {"0", "90", "180", "270"}; + + switch (instr->Mask(SVEFPComplexMulAddMask)) { + case FCMLA_z_p_zzz: + mnemonic = "fcmla"; + form = "'Zd.'t, 'Pgl/m, 'Zn.'t, 'Zm.'t, #"; + suffix = fcmla_constants[instr->ExtractBits(14, 13)]; + break; + default: + break; + } + Format(instr, mnemonic, form, suffix); +} + +void Disassembler::VisitSVEFPComplexMulAddIndex(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEFPComplexMulAddIndex)"; + + const char *fcmla_constants[] = {"0", "90", "180", "270"}; + const char *suffix = fcmla_constants[instr->ExtractBits(11, 10)]; + + switch (instr->Mask(SVEFPComplexMulAddIndexMask)) { + case FCMLA_z_zzzi_h: + mnemonic = "fcmla"; + form = "'Zd.h, 'Zn.h, z'u1816.h['u2019], #"; + break; + case FCMLA_z_zzzi_s: + mnemonic = "fcmla"; + form = "'Zd.s, 'Zn.s, z'u1916.s['u2020], #"; + break; + default: + suffix = NULL; + break; + } + Format(instr, mnemonic, form, suffix); +} + +void Disassembler::VisitSVEFPFastReduction(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'t'u0400, 'Pgl, 'Zn.'t"; + + switch (instr->Mask(SVEFPFastReductionMask)) { + case FADDV_v_p_z: + mnemonic = "faddv"; + break; + case FMAXNMV_v_p_z: + mnemonic = "fmaxnmv"; + break; + case FMAXV_v_p_z: + mnemonic = "fmaxv"; + break; + case FMINNMV_v_p_z: + mnemonic = "fminnmv"; + break; + case FMINV_v_p_z: + mnemonic = "fminv"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEFPMulIndex(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEFPMulIndex)"; + + switch (instr->Mask(SVEFPMulIndexMask)) { + case FMUL_z_zzi_d: + mnemonic = "fmul"; + form = "'Zd.d, 'Zn.d, z'u1916.d['u2020]"; + break; + case FMUL_z_zzi_h: + case FMUL_z_zzi_h_i3h: + mnemonic = "fmul"; + form = "'Zd.h, 'Zn.h, z'u1816.h['u2222:2019]"; + break; + case FMUL_z_zzi_s: + mnemonic = "fmul"; + form = "'Zd.s, 'Zn.s, z'u1816.s['u2019]"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEFPMulAdd(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Zd.'t, 'Pgl/m, 'Zn.'t, 'Zm.'t"; + + switch (instr->Mask(SVEFPMulAddMask)) { + case FMAD_z_p_zzz: + mnemonic = "fmad"; + break; + case FMLA_z_p_zzz: + mnemonic = "fmla"; + break; + case FMLS_z_p_zzz: + mnemonic = "fmls"; + break; + case FMSB_z_p_zzz: + mnemonic = "fmsb"; + break; + case FNMAD_z_p_zzz: + mnemonic = "fnmad"; + break; + case FNMLA_z_p_zzz: + mnemonic = "fnmla"; + break; + case FNMLS_z_p_zzz: + mnemonic = "fnmls"; + break; + case FNMSB_z_p_zzz: + mnemonic = "fnmsb"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEFPMulAddIndex(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEFPMulAddIndex)"; + + switch (instr->Mask(SVEFPMulAddIndexMask)) { + case FMLA_z_zzzi_d: + mnemonic = "fmla"; + form = "'Zd.d, 'Zn.d, z'u1916.d['u2020]"; + break; + case FMLA_z_zzzi_s: + mnemonic = "fmla"; + form = "'Zd.s, 'Zn.s, z'u1816.s['u2019]"; + break; + case FMLS_z_zzzi_d: + mnemonic = "fmls"; + form = "'Zd.d, 'Zn.d, z'u1916.d['u2020]"; + break; + case FMLS_z_zzzi_s: + mnemonic = "fmls"; + form = "'Zd.s, 'Zn.s, z'u1816.s['u2019]"; + break; + case FMLA_z_zzzi_h: + case FMLA_z_zzzi_h_i3h: + mnemonic = "fmla"; + form = "'Zd.h, 'Zn.h, z'u1816.h['u2222:2019]"; + break; + case FMLS_z_zzzi_h: + case FMLS_z_zzzi_h_i3h: + mnemonic = "fmls"; + form = "'Zd.h, 'Zn.h, z'u1816.h['u2222:2019]"; + break; + default: + break; + } + + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEFPUnaryOpUnpredicated(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Zd.'t, 'Zn.'t"; + + switch (instr->Mask(SVEFPUnaryOpUnpredicatedMask)) { + case FRECPE_z_z: + mnemonic = "frecpe"; + break; + case FRSQRTE_z_z: + mnemonic = "frsqrte"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEIncDecByPredicateCount(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEIncDecByPredicateCount)"; + + switch (instr->Mask(SVEIncDecByPredicateCountMask)) { + case DECP_r_p_r: + case DECP_z_p_z: + mnemonic = "decp"; + break; + case INCP_r_p_r: + case INCP_z_p_z: + mnemonic = "incp"; + break; + case SQDECP_r_p_r_sx: + case SQDECP_r_p_r_x: + case SQDECP_z_p_z: + mnemonic = "sqdecp"; + break; + case SQINCP_r_p_r_sx: + case SQINCP_r_p_r_x: + case SQINCP_z_p_z: + mnemonic = "sqincp"; + break; + case UQDECP_r_p_r_uw: + case UQDECP_r_p_r_x: + case UQDECP_z_p_z: + mnemonic = "uqdecp"; + break; + case UQINCP_r_p_r_uw: + case UQINCP_r_p_r_x: + case UQINCP_z_p_z: + mnemonic = "uqincp"; + break; + default: + break; + } + + switch (instr->Mask(SVEIncDecByPredicateCountMask)) { + // , . + case DECP_r_p_r: + case INCP_r_p_r: + form = "'Xd, 'Pn.'t"; + break; + // ., + case DECP_z_p_z: + case INCP_z_p_z: + case SQDECP_z_p_z: + case SQINCP_z_p_z: + case UQDECP_z_p_z: + case UQINCP_z_p_z: + form = "'Zd.'t, 'Pn"; + break; + // , ., + case SQDECP_r_p_r_sx: + case SQINCP_r_p_r_sx: + form = "'Xd, 'Pn.'t, 'Wd"; + break; + // , . + case SQDECP_r_p_r_x: + case SQINCP_r_p_r_x: + case UQDECP_r_p_r_x: + case UQINCP_r_p_r_x: + form = "'Xd, 'Pn.'t"; + break; + // , . + case UQDECP_r_p_r_uw: + case UQINCP_r_p_r_uw: + form = "'Wd, 'Pn.'t"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEIndexGeneration(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEIndexGeneration)"; + + bool w_inputs = + static_cast(instr->GetSVESize()) <= kWRegSizeInBytesLog2; + + switch (instr->Mask(SVEIndexGenerationMask)) { + case INDEX_z_ii: + mnemonic = "index"; + form = "'Zd.'t, #'s0905, #'s2016"; + break; + case INDEX_z_ir: + mnemonic = "index"; + form = w_inputs ? "'Zd.'t, #'s0905, 'Wm" : "'Zd.'t, #'s0905, 'Xm"; + break; + case INDEX_z_ri: + mnemonic = "index"; + form = w_inputs ? "'Zd.'t, 'Wn, #'s2016" : "'Zd.'t, 'Xn, #'s2016"; + break; + case INDEX_z_rr: + mnemonic = "index"; + form = w_inputs ? "'Zd.'t, 'Wn, 'Wm" : "'Zd.'t, 'Xn, 'Xm"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEIntArithmeticUnpredicated(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Zd.'t, 'Zn.'t, 'Zm.'t"; + + switch (instr->Mask(SVEIntArithmeticUnpredicatedMask)) { + case ADD_z_zz: + mnemonic = "add"; + break; + case SQADD_z_zz: + mnemonic = "sqadd"; + break; + case SQSUB_z_zz: + mnemonic = "sqsub"; + break; + case SUB_z_zz: + mnemonic = "sub"; + break; + case UQADD_z_zz: + mnemonic = "uqadd"; + break; + case UQSUB_z_zz: + mnemonic = "uqsub"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEIntCompareSignedImm(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Pd.'t, 'Pgl/z, 'Zn.'t, #'s2016"; + + switch (instr->Mask(SVEIntCompareSignedImmMask)) { + case CMPEQ_p_p_zi: + mnemonic = "cmpeq"; + break; + case CMPGE_p_p_zi: + mnemonic = "cmpge"; + break; + case CMPGT_p_p_zi: + mnemonic = "cmpgt"; + break; + case CMPLE_p_p_zi: + mnemonic = "cmple"; + break; + case CMPLT_p_p_zi: + mnemonic = "cmplt"; + break; + case CMPNE_p_p_zi: + mnemonic = "cmpne"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEIntCompareUnsignedImm(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Pd.'t, 'Pgl/z, 'Zn.'t, #'u2014"; + + switch (instr->Mask(SVEIntCompareUnsignedImmMask)) { + case CMPHI_p_p_zi: + mnemonic = "cmphi"; + break; + case CMPHS_p_p_zi: + mnemonic = "cmphs"; + break; + case CMPLO_p_p_zi: + mnemonic = "cmplo"; + break; + case CMPLS_p_p_zi: + mnemonic = "cmpls"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEIntCompareVectors(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Pd.'t, 'Pgl/z, 'Zn.'t, 'Zm.d"; + + switch (instr->Mask(SVEIntCompareVectorsMask)) { + case CMPEQ_p_p_zw: + mnemonic = "cmpeq"; + break; + case CMPEQ_p_p_zz: + mnemonic = "cmpeq"; + form = "'Pd.'t, 'Pgl/z, 'Zn.'t, 'Zm.'t"; + break; + case CMPGE_p_p_zw: + mnemonic = "cmpge"; + break; + case CMPGE_p_p_zz: + mnemonic = "cmpge"; + form = "'Pd.'t, 'Pgl/z, 'Zn.'t, 'Zm.'t"; + break; + case CMPGT_p_p_zw: + mnemonic = "cmpgt"; + break; + case CMPGT_p_p_zz: + mnemonic = "cmpgt"; + form = "'Pd.'t, 'Pgl/z, 'Zn.'t, 'Zm.'t"; + break; + case CMPHI_p_p_zw: + mnemonic = "cmphi"; + break; + case CMPHI_p_p_zz: + mnemonic = "cmphi"; + form = "'Pd.'t, 'Pgl/z, 'Zn.'t, 'Zm.'t"; + break; + case CMPHS_p_p_zw: + mnemonic = "cmphs"; + break; + case CMPHS_p_p_zz: + mnemonic = "cmphs"; + form = "'Pd.'t, 'Pgl/z, 'Zn.'t, 'Zm.'t"; + break; + case CMPLE_p_p_zw: + mnemonic = "cmple"; + break; + case CMPLO_p_p_zw: + mnemonic = "cmplo"; + break; + case CMPLS_p_p_zw: + mnemonic = "cmpls"; + break; + case CMPLT_p_p_zw: + mnemonic = "cmplt"; + break; + case CMPNE_p_p_zw: + mnemonic = "cmpne"; + break; + case CMPNE_p_p_zz: + mnemonic = "cmpne"; + form = "'Pd.'t, 'Pgl/z, 'Zn.'t, 'Zm.'t"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEIntMulAddPredicated(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEIntMulAddPredicated)"; + + switch (instr->Mask(SVEIntMulAddPredicatedMask)) { + case MAD_z_p_zzz: + mnemonic = "mad"; + form = "'Zd.'t, 'Pgl/m, 'Zm.'t, 'Zn.'t"; + break; + case MLA_z_p_zzz: + mnemonic = "mla"; + form = "'Zd.'t, 'Pgl/m, 'Zn.'t, 'Zm.'t"; + break; + case MLS_z_p_zzz: + mnemonic = "mls"; + form = "'Zd.'t, 'Pgl/m, 'Zn.'t, 'Zm.'t"; + break; + case MSB_z_p_zzz: + mnemonic = "msb"; + form = "'Zd.'t, 'Pgl/m, 'Zm.'t, 'Zn.'t"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEIntMulAddUnpredicated(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEIntMulAddUnpredicated)"; + + if (static_cast(instr->GetSVESize()) >= kSRegSizeInBytesLog2) { + form = "'Zd.'t, 'Zn.'tq, 'Zm.'tq"; + switch (instr->Mask(SVEIntMulAddUnpredicatedMask)) { + case SDOT_z_zzz: + mnemonic = "sdot"; + break; + case UDOT_z_zzz: + mnemonic = "udot"; + break; + default: + break; + } + } + + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEMovprfx(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEMovprfx)"; + + if (instr->Mask(SVEMovprfxMask) == MOVPRFX_z_p_z) { + mnemonic = "movprfx"; + form = "'Zd.'t, 'Pgl/'?16:mz, 'Zn.'t"; + } + + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEIntReduction(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Vdv, 'Pgl, 'Zn.'t"; + + if (instr->Mask(SVEIntReductionLogicalFMask) == SVEIntReductionLogicalFixed) { + switch (instr->Mask(SVEIntReductionLogicalMask)) { + case ANDV_r_p_z: + mnemonic = "andv"; + break; + case EORV_r_p_z: + mnemonic = "eorv"; + break; + case ORV_r_p_z: + mnemonic = "orv"; + break; + default: + break; + } + } else { + switch (instr->Mask(SVEIntReductionMask)) { + case SADDV_r_p_z: + mnemonic = "saddv"; + form = "'Dd, 'Pgl, 'Zn.'t"; + break; + case SMAXV_r_p_z: + mnemonic = "smaxv"; + break; + case SMINV_r_p_z: + mnemonic = "sminv"; + break; + case UADDV_r_p_z: + mnemonic = "uaddv"; + form = "'Dd, 'Pgl, 'Zn.'t"; + break; + case UMAXV_r_p_z: + mnemonic = "umaxv"; + break; + case UMINV_r_p_z: + mnemonic = "uminv"; + break; + default: + break; + } + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEIntUnaryArithmeticPredicated( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Zd.'t, 'Pgl/m, 'Zn.'t"; + + switch (instr->Mask(SVEIntUnaryArithmeticPredicatedMask)) { + case ABS_z_p_z: + mnemonic = "abs"; + break; + case CLS_z_p_z: + mnemonic = "cls"; + break; + case CLZ_z_p_z: + mnemonic = "clz"; + break; + case CNOT_z_p_z: + mnemonic = "cnot"; + break; + case CNT_z_p_z: + mnemonic = "cnt"; + break; + case FABS_z_p_z: + mnemonic = "fabs"; + break; + case FNEG_z_p_z: + mnemonic = "fneg"; + break; + case NEG_z_p_z: + mnemonic = "neg"; + break; + case NOT_z_p_z: + mnemonic = "not"; + break; + case SXTB_z_p_z: + mnemonic = "sxtb"; + break; + case SXTH_z_p_z: + mnemonic = "sxth"; + break; + case SXTW_z_p_z: + mnemonic = "sxtw"; + break; + case UXTB_z_p_z: + mnemonic = "uxtb"; + break; + case UXTH_z_p_z: + mnemonic = "uxth"; + break; + case UXTW_z_p_z: + mnemonic = "uxtw"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEMulIndex(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEMulIndex)"; + + switch (instr->Mask(SVEMulIndexMask)) { + case SDOT_z_zzzi_d: + mnemonic = "sdot"; + form = "'Zd.d, 'Zn.h, z'u1916.h['u2020]"; + break; + case SDOT_z_zzzi_s: + mnemonic = "sdot"; + form = "'Zd.s, 'Zn.b, z'u1816.b['u2019]"; + break; + case UDOT_z_zzzi_d: + mnemonic = "udot"; + form = "'Zd.d, 'Zn.h, z'u1916.h['u2020]"; + break; + case UDOT_z_zzzi_s: + mnemonic = "udot"; + form = "'Zd.s, 'Zn.b, z'u1816.b['u2019]"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEPermuteVectorExtract(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEPermuteVectorExtract)"; + + switch (instr->Mask(SVEPermuteVectorExtractMask)) { + case EXT_z_zi_des: + mnemonic = "ext"; + form = "'Zd.b, 'Zd.b, 'Zn.b, #'u2016:1210"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEPermuteVectorInterleaving(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Zd.'t, 'Zn.'t, 'Zm.'t"; + + switch (instr->Mask(SVEPermuteVectorInterleavingMask)) { + case TRN1_z_zz: + mnemonic = "trn1"; + break; + case TRN2_z_zz: + mnemonic = "trn2"; + break; + case UZP1_z_zz: + mnemonic = "uzp1"; + break; + case UZP2_z_zz: + mnemonic = "uzp2"; + break; + case ZIP1_z_zz: + mnemonic = "zip1"; + break; + case ZIP2_z_zz: + mnemonic = "zip2"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEPredicateCount(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEPredicateCount)"; + + switch (instr->Mask(SVEPredicateCountMask)) { + case CNTP_r_p_p: + mnemonic = "cntp"; + form = "'Xd, p'u1310, 'Pn.'t"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEPredicateLogical(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Pd.b, p'u1310/z, 'Pn.b, 'Pm.b"; + + int pd = instr->GetPd(); + int pn = instr->GetPn(); + int pm = instr->GetPm(); + int pg = instr->ExtractBits(13, 10); + + switch (instr->Mask(SVEPredicateLogicalMask)) { + case ANDS_p_p_pp_z: + mnemonic = "ands"; + if (pn == pm) { + mnemonic = "movs"; + form = "'Pd.b, p'u1310/z, 'Pn.b"; + } + break; + case AND_p_p_pp_z: + mnemonic = "and"; + if (pn == pm) { + mnemonic = "mov"; + form = "'Pd.b, p'u1310/z, 'Pn.b"; + } + break; + case BICS_p_p_pp_z: + mnemonic = "bics"; + break; + case BIC_p_p_pp_z: + mnemonic = "bic"; + break; + case EORS_p_p_pp_z: + mnemonic = "eors"; + if (pm == pg) { + mnemonic = "nots"; + form = "'Pd.b, 'Pm/z, 'Pn.b"; + } + break; + case EOR_p_p_pp_z: + mnemonic = "eor"; + if (pm == pg) { + mnemonic = "not"; + form = "'Pd.b, 'Pm/z, 'Pn.b"; + } + break; + case NANDS_p_p_pp_z: + mnemonic = "nands"; + break; + case NAND_p_p_pp_z: + mnemonic = "nand"; + break; + case NORS_p_p_pp_z: + mnemonic = "nors"; + break; + case NOR_p_p_pp_z: + mnemonic = "nor"; + break; + case ORNS_p_p_pp_z: + mnemonic = "orns"; + break; + case ORN_p_p_pp_z: + mnemonic = "orn"; + break; + case ORRS_p_p_pp_z: + mnemonic = "orrs"; + if ((pn == pm) && (pn == pg)) { + mnemonic = "movs"; + form = "'Pd.b, 'Pn.b"; + } + break; + case ORR_p_p_pp_z: + mnemonic = "orr"; + if ((pn == pm) && (pn == pg)) { + mnemonic = "mov"; + form = "'Pd.b, 'Pn.b"; + } + break; + case SEL_p_p_pp: + if (pd == pm) { + mnemonic = "mov"; + form = "'Pd.b, p'u1310/m, 'Pn.b"; + } else { + mnemonic = "sel"; + form = "'Pd.b, p'u1310, 'Pn.b, 'Pm.b"; + } + break; + default: + form = "(SVEPredicateLogical)"; + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEPredicateInitialize(const Instruction *instr) { + // This group only contains PTRUE{S}, and there are no unallocated encodings. + VIXL_STATIC_ASSERT( + SVEPredicateInitializeMask == + (SVEPredicateInitializeFMask | SVEPredicateInitializeSetFlagsBit)); + VIXL_ASSERT((instr->Mask(SVEPredicateInitializeMask) == PTRUE_p_s) || + (instr->Mask(SVEPredicateInitializeMask) == PTRUES_p_s)); + + const char *mnemonic = instr->ExtractBit(16) ? "ptrues" : "ptrue"; + const char *form = "'Pd.'t, 'Ipc"; + // Omit the pattern if it is the default ('ALL'). + if (instr->ExtractBits(9, 5) == SVE_ALL) form = "'Pd.'t"; + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEPredicateNextActive(const Instruction *instr) { + // This group only contains PNEXT, and there are no unallocated encodings. + VIXL_STATIC_ASSERT(SVEPredicateNextActiveFMask == SVEPredicateNextActiveMask); + VIXL_ASSERT(instr->Mask(SVEPredicateNextActiveMask) == PNEXT_p_p_p); + + Format(instr, "pnext", "'Pd.'t, 'Pn, 'Pd.'t"); +} + +void Disassembler::VisitSVEPredicateReadFromFFR_Predicated( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEPredicateReadFromFFR_Predicated)"; + switch (instr->Mask(SVEPredicateReadFromFFR_PredicatedMask)) { + case RDFFR_p_p_f: + case RDFFRS_p_p_f: + mnemonic = instr->ExtractBit(22) ? "rdffrs" : "rdffr"; + form = "'Pd.b, 'Pn/z"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEPropagateBreak(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Pd.b, p'u1310/z, 'Pn.b, 'Pm.b"; + + switch (instr->Mask(SVEPropagateBreakMask)) { + case BRKPAS_p_p_pp: + mnemonic = "brkpas"; + break; + case BRKPA_p_p_pp: + mnemonic = "brkpa"; + break; + case BRKPBS_p_p_pp: + mnemonic = "brkpbs"; + break; + case BRKPB_p_p_pp: + mnemonic = "brkpb"; + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEStackFrameAdjustment(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "'Xds, 'Xms, #'s1005"; + + switch (instr->Mask(SVEStackFrameAdjustmentMask)) { + case ADDPL_r_ri: + mnemonic = "addpl"; + break; + case ADDVL_r_ri: + mnemonic = "addvl"; + break; + default: + form = "(SVEStackFrameAdjustment)"; + break; + } + + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEStackFrameSize(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEStackFrameSize)"; + + switch (instr->Mask(SVEStackFrameSizeMask)) { + case RDVL_r_i: + mnemonic = "rdvl"; + form = "'Xd, #'s1005"; + break; + default: + break; + } + + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEVectorSelect(const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "(SVEVectorSelect)"; + + switch (instr->Mask(SVEVectorSelectMask)) { + case SEL_z_p_zz: + if (instr->GetRd() == instr->GetRm()) { + mnemonic = "mov"; + form = "'Zd.'t, p'u1310/m, 'Zn.'t"; + } else { + mnemonic = "sel"; + form = "'Zd.'t, p'u1310, 'Zn.'t, 'Zm.'t"; + } + break; + default: + break; + } + Format(instr, mnemonic, form); +} + +void Disassembler::VisitSVEContiguousLoad_ScalarPlusImm( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "{'Zt.'tlss}, 'Pgl/z, ['Xns"; + const char *suffix = + (instr->ExtractBits(19, 16) == 0) ? "]" : ", #'s1916, mul vl]"; + + switch (instr->Mask(SVEContiguousLoad_ScalarPlusImmMask)) { + case LD1B_z_p_bi_u16: + case LD1B_z_p_bi_u32: + case LD1B_z_p_bi_u64: + case LD1B_z_p_bi_u8: + mnemonic = "ld1b"; + break; + case LD1D_z_p_bi_u64: + mnemonic = "ld1d"; + break; + case LD1H_z_p_bi_u16: + case LD1H_z_p_bi_u32: + case LD1H_z_p_bi_u64: + mnemonic = "ld1h"; + break; + case LD1SB_z_p_bi_s16: + case LD1SB_z_p_bi_s32: + case LD1SB_z_p_bi_s64: + mnemonic = "ld1sb"; + break; + case LD1SH_z_p_bi_s32: + case LD1SH_z_p_bi_s64: + mnemonic = "ld1sh"; + break; + case LD1SW_z_p_bi_s64: + mnemonic = "ld1sw"; + break; + case LD1W_z_p_bi_u32: + case LD1W_z_p_bi_u64: + mnemonic = "ld1w"; + break; + default: + form = "(SVEContiguousLoad_ScalarPlusImm)"; + suffix = NULL; + break; + } + + Format(instr, mnemonic, form, suffix); +} + +void Disassembler::VisitSVEContiguousLoad_ScalarPlusScalar( + const Instruction *instr) { + const char *mnemonic = "unimplemented"; + const char *form = "{'Zt.'tlss}, 'Pgl/z, ['Xns, 'Xm"; + const char *suffix = NULL; + + switch (instr->Mask(SVEContiguousLoad_ScalarPlusScalarMask)) { + case LD1B_z_p_br_u16: + case LD1B_z_p_br_u32: + case LD1B_z_p_br_u64: + case LD1B_z_p_br_u8: + mnemonic = "ld1b"; + suffix = "]"; + break; + case LD1D_z_p_br_u64: + mnemonic = "ld1d"; + suffix = ", lsl #'u2423]"; + break; + case LD1H_z_p_br_u16: + case LD1H_z_p_br_u32: + case LD1H_z_p_br_u64: + mnemonic = "ld1h"; + suffix = ", lsl #'u2423]"; + break; + case LD1SB_z_p_br_s16: + case LD1SB_z_p_br_s32: + case LD1SB_z_p_br_s64: + mnemonic = "ld1sb"; + suffix = "]"; + break; + case LD1SH_z_p_br_s32: + case LD1SH_z_p_br_s64: + mnemonic = "ld1sh"; + suffix = ", lsl #1]"; + break; + case LD1SW_z_p_br_s64: + mnemonic = "ld1sw"; + suffix = ", lsl #2]"; + break; + case LD1W_z_p_br_u32: + case LD1W_z_p_br_u64: + mnemonic = "ld1w"; + suffix = ", lsl #'u2423]"; + break; + default: + form = "(SVEContiguousLoad_ScalarPlusScalar)"; + suffix = NULL; + break; + } + + Format(instr, mnemonic, form, suffix); +} + +void Disassembler::VisitReserved(const Instruction *instr) { + // UDF is the only instruction in this group, and the Decoder is precise. + VIXL_ASSERT(instr->Mask(ReservedMask) == UDF); + Format(instr, "udf", "'IUdf"); +} + + +void Disassembler::VisitUnimplemented(const Instruction *instr) { + Format(instr, "unimplemented", "(Unimplemented)"); +} + + +void Disassembler::VisitUnallocated(const Instruction *instr) { + Format(instr, "unallocated", "(Unallocated)"); +} + + +void Disassembler::ProcessOutput(const Instruction * /*instr*/) { + // The base disasm does nothing more than disassembling into a buffer. +} + + +void Disassembler::AppendRegisterNameToOutput(const Instruction *instr, + const CPURegister ®) { + USE(instr); + VIXL_ASSERT(reg.IsValid()); + char reg_char; + + if (reg.IsRegister()) { + reg_char = reg.Is64Bits() ? 'x' : 'w'; + } else { + VIXL_ASSERT(reg.IsVRegister()); + switch (reg.GetSizeInBits()) { + case kBRegSize: + reg_char = 'b'; + break; + case kHRegSize: + reg_char = 'h'; + break; + case kSRegSize: + reg_char = 's'; + break; + case kDRegSize: + reg_char = 'd'; + break; + default: + VIXL_ASSERT(reg.Is128Bits()); + reg_char = 'q'; + } + } + + if (reg.IsVRegister() || !(reg.Aliases(sp) || reg.Aliases(xzr))) { + // A core or scalar/vector register: [wx]0 - 30, [bhsdq]0 - 31. + AppendToOutput("%c%d", reg_char, reg.GetCode()); + } else if (reg.Aliases(sp)) { + // Disassemble w31/x31 as stack pointer wsp/sp. + AppendToOutput("%s", reg.Is64Bits() ? "sp" : "wsp"); + } else { + // Disassemble w31/x31 as zero register wzr/xzr. + AppendToOutput("%czr", reg_char); + } +} + + +void Disassembler::AppendPCRelativeOffsetToOutput(const Instruction *instr, + int64_t offset) { + USE(instr); + if (offset < 0) { + // Cast to uint64_t so that INT64_MIN is handled in a well-defined way. + uint64_t abs_offset = -static_cast(offset); + AppendToOutput("#-0x%" PRIx64, abs_offset); + } else { + AppendToOutput("#+0x%" PRIx64, offset); + } +} + + +void Disassembler::AppendAddressToOutput(const Instruction *instr, + const void *addr) { + USE(instr); + AppendToOutput("(addr 0x%" PRIxPTR ")", reinterpret_cast(addr)); +} + + +void Disassembler::AppendCodeAddressToOutput(const Instruction *instr, + const void *addr) { + AppendAddressToOutput(instr, addr); +} + + +void Disassembler::AppendDataAddressToOutput(const Instruction *instr, + const void *addr) { + AppendAddressToOutput(instr, addr); +} + + +void Disassembler::AppendCodeRelativeAddressToOutput(const Instruction *instr, + const void *addr) { + USE(instr); + int64_t rel_addr = CodeRelativeAddress(addr); + if (rel_addr >= 0) { + AppendToOutput("(addr 0x%" PRIx64 ")", rel_addr); + } else { + AppendToOutput("(addr -0x%" PRIx64 ")", -rel_addr); + } +} + + +void Disassembler::AppendCodeRelativeCodeAddressToOutput( + const Instruction *instr, const void *addr) { + AppendCodeRelativeAddressToOutput(instr, addr); +} + + +void Disassembler::AppendCodeRelativeDataAddressToOutput( + const Instruction *instr, const void *addr) { + AppendCodeRelativeAddressToOutput(instr, addr); +} + + +void Disassembler::MapCodeAddress(int64_t base_address, + const Instruction *instr_address) { + set_code_address_offset(base_address - + reinterpret_cast(instr_address)); +} +int64_t Disassembler::CodeRelativeAddress(const void *addr) { + return reinterpret_cast(addr) + code_address_offset(); +} + + +void Disassembler::Format(const Instruction *instr, + const char *mnemonic, + const char *format0, + const char *format1) { + VIXL_ASSERT(mnemonic != NULL); + ResetOutput(); + Substitute(instr, mnemonic); + if (format0 != NULL) { + VIXL_ASSERT(buffer_pos_ < buffer_size_); + buffer_[buffer_pos_++] = ' '; + Substitute(instr, format0); + if (format1 != NULL) { + Substitute(instr, format1); + } + } + VIXL_ASSERT(buffer_pos_ < buffer_size_); + buffer_[buffer_pos_] = 0; + ProcessOutput(instr); +} + + +void Disassembler::Substitute(const Instruction *instr, const char *string) { + char chr = *string++; + while (chr != '\0') { + if (chr == '\'') { + string += SubstituteField(instr, string); + } else { + VIXL_ASSERT(buffer_pos_ < buffer_size_); + buffer_[buffer_pos_++] = chr; + } + chr = *string++; + } +} + + +int Disassembler::SubstituteField(const Instruction *instr, + const char *format) { + switch (format[0]) { + // NB. The remaining substitution prefix upper-case characters are: JU. + case 'R': // Register. X or W, selected by sf (or alternative) bit. + case 'F': // FP register. S or D, selected by type field. + case 'V': // Vector register, V, vector format. + case 'Z': // Scalable vector register. + case 'W': + case 'X': + case 'B': + case 'H': + case 'S': + case 'D': + case 'Q': + return SubstituteRegisterField(instr, format); + case 'P': + return SubstitutePredicateRegisterField(instr, format); + case 'I': + return SubstituteImmediateField(instr, format); + case 'L': + return SubstituteLiteralField(instr, format); + case 'N': + return SubstituteShiftField(instr, format); + case 'C': + return SubstituteConditionField(instr, format); + case 'E': + return SubstituteExtendField(instr, format); + case 'A': + return SubstitutePCRelAddressField(instr, format); + case 'T': + return SubstituteBranchTargetField(instr, format); + case 'O': + return SubstituteLSRegOffsetField(instr, format); + case 'M': + return SubstituteBarrierField(instr, format); + case 'K': + return SubstituteCrField(instr, format); + case 'G': + return SubstituteSysOpField(instr, format); + case 'p': + return SubstitutePrefetchField(instr, format); + case 'u': + case 's': + return SubstituteIntField(instr, format); + case 't': + return SubstituteSVESize(instr, format); + case '?': + return SubstituteTernary(instr, format); + default: { + VIXL_UNREACHABLE(); + return 1; + } + } +} + +std::pair Disassembler::GetRegNumForField( + const Instruction *instr, char reg_prefix, const char *field) { + unsigned reg_num = UINT_MAX; + unsigned field_len = 1; + + switch (field[0]) { + case 'd': + reg_num = instr->GetRd(); + break; + case 'n': + reg_num = instr->GetRn(); + break; + case 'm': + reg_num = instr->GetRm(); + break; + case 'e': + // This is register Rm, but using a 4-bit specifier. Used in NEON + // by-element instructions. + reg_num = instr->GetRmLow16(); + break; + case 'a': + reg_num = instr->GetRa(); + break; + case 's': + reg_num = instr->GetRs(); + break; + case 't': + reg_num = instr->GetRt(); + break; + default: + VIXL_UNREACHABLE(); + } + + switch (field[1]) { + case '2': + case '3': + case '4': + if ((reg_prefix == 'V') || (reg_prefix == 'Z')) { // Vt2/3/4, Zt2/3/4 + VIXL_ASSERT(field[0] == 't'); + reg_num = (reg_num + field[1] - '1') % 32; + field_len++; + } else { + VIXL_ASSERT((field[0] == 't') && (field[1] == '2')); + reg_num = instr->GetRt2(); + field_len++; + } + break; + case '+': // Rt+, Rs+ (ie. Rt + 1, Rs + 1) + VIXL_ASSERT((reg_prefix == 'W') || (reg_prefix == 'X')); + VIXL_ASSERT((field[0] == 's') || (field[0] == 't')); + reg_num++; + field_len++; + break; + case 's': // Core registers that are (w)sp rather than zr. + VIXL_ASSERT((reg_prefix == 'W') || (reg_prefix == 'X')); + reg_num = (reg_num == kZeroRegCode) ? kSPRegInternalCode : reg_num; + field_len++; + break; + } + + VIXL_ASSERT(reg_num != UINT_MAX); + return std::make_pair(reg_num, field_len); +} + +int Disassembler::SubstituteRegisterField(const Instruction *instr, + const char *format) { + unsigned field_len = 1; // Initially, count only the first character. + + // The first character of the register format field, eg R, X, S, etc. + char reg_prefix = format[0]; + + // Pointer to the character after the prefix. This may be one of the standard + // symbols representing a register encoding, or a two digit bit position, + // handled by the following code. + const char *reg_field = &format[1]; + + if (reg_prefix == 'R') { + bool is_x = instr->GetSixtyFourBits(); + if (strspn(reg_field, "0123456789") == 2) { // r20d, r31n, etc. + // Core W or X registers where the type is determined by a specified bit + // position, eg. 'R20d, 'R05n. This is like the 'Rd syntax, where bit 31 + // is implicitly used to select between W and X. + int bitpos = ((reg_field[0] - '0') * 10) + (reg_field[1] - '0'); + VIXL_ASSERT(bitpos <= 31); + is_x = (instr->ExtractBit(bitpos) == 1); + reg_field = &format[3]; + field_len += 2; + } + reg_prefix = is_x ? 'X' : 'W'; + } + + std::pair rn = + GetRegNumForField(instr, reg_prefix, reg_field); + unsigned reg_num = rn.first; + field_len += rn.second; + + if (reg_field[0] == 'm') { + switch (reg_field[1]) { + // Handle registers tagged with b (bytes), z (instruction), or + // r (registers), used for address updates in NEON load/store + // instructions. + case 'r': + case 'b': + case 'z': { + VIXL_ASSERT(reg_prefix == 'X'); + field_len = 3; + char *eimm; + int imm = static_cast(strtol(®_field[2], &eimm, 10)); + field_len += eimm - ®_field[2]; + if (reg_num == 31) { + switch (reg_field[1]) { + case 'z': + imm *= (1 << instr->GetNEONLSSize()); + break; + case 'r': + imm *= (instr->GetNEONQ() == 0) ? kDRegSizeInBytes + : kQRegSizeInBytes; + break; + case 'b': + break; + } + AppendToOutput("#%d", imm); + return field_len; + } + break; + } + } + } + + CPURegister::RegisterType reg_type = CPURegister::kRegister; + unsigned reg_size = kXRegSize; + + if (reg_prefix == 'F') { + switch (instr->GetFPType()) { + case 3: + reg_prefix = 'H'; + break; + case 0: + reg_prefix = 'S'; + break; + default: + reg_prefix = 'D'; + } + } + + switch (reg_prefix) { + case 'W': + reg_type = CPURegister::kRegister; + reg_size = kWRegSize; + break; + case 'X': + reg_type = CPURegister::kRegister; + reg_size = kXRegSize; + break; + case 'B': + reg_type = CPURegister::kVRegister; + reg_size = kBRegSize; + break; + case 'H': + reg_type = CPURegister::kVRegister; + reg_size = kHRegSize; + break; + case 'S': + reg_type = CPURegister::kVRegister; + reg_size = kSRegSize; + break; + case 'D': + reg_type = CPURegister::kVRegister; + reg_size = kDRegSize; + break; + case 'Q': + reg_type = CPURegister::kVRegister; + reg_size = kQRegSize; + break; + case 'V': + if (reg_field[1] == 'v') { + reg_type = CPURegister::kVRegister; + reg_size = 1 << (instr->GetSVESize() + 3); + field_len++; + break; + } + AppendToOutput("v%d", reg_num); + return field_len; + case 'Z': + AppendToOutput("z%d", reg_num); + return field_len; + default: + VIXL_UNREACHABLE(); + } + + AppendRegisterNameToOutput(instr, CPURegister(reg_num, reg_size, reg_type)); + + return field_len; +} + +int Disassembler::SubstitutePredicateRegisterField(const Instruction *instr, + const char *format) { + VIXL_ASSERT(format[0] == 'P'); + switch (format[1]) { + // This field only supports P register that are always encoded in the same + // position. + case 'd': + case 't': + AppendToOutput("p%u", instr->GetPt()); + break; + case 'n': + AppendToOutput("p%u", instr->GetPn()); + break; + case 'm': + AppendToOutput("p%u", instr->GetPm()); + break; + case 'g': + VIXL_ASSERT(format[2] == 'l'); + AppendToOutput("p%u", instr->GetPgLow8()); + return 3; + default: + VIXL_UNREACHABLE(); + } + return 2; +} + +int Disassembler::SubstituteImmediateField(const Instruction *instr, + const char *format) { + VIXL_ASSERT(format[0] == 'I'); + + switch (format[1]) { + case 'M': { // IMoveImm, IMoveNeg or IMoveLSL. + if (format[5] == 'L') { + AppendToOutput("#0x%" PRIx32, instr->GetImmMoveWide()); + if (instr->GetShiftMoveWide() > 0) { + AppendToOutput(", lsl #%" PRId32, 16 * instr->GetShiftMoveWide()); + } + } else { + VIXL_ASSERT((format[5] == 'I') || (format[5] == 'N')); + uint64_t imm = static_cast(instr->GetImmMoveWide()) + << (16 * instr->GetShiftMoveWide()); + if (format[5] == 'N') imm = ~imm; + if (!instr->GetSixtyFourBits()) imm &= UINT64_C(0xffffffff); + AppendToOutput("#0x%" PRIx64, imm); + } + return 8; + } + case 'L': { + switch (format[2]) { + case 'L': { // ILLiteral - Immediate Load Literal. + AppendToOutput("pc%+" PRId32, + instr->GetImmLLiteral() * + static_cast(kLiteralEntrySize)); + return 9; + } + case 'S': { // ILS - Immediate Load/Store. + // ILSi - As above, but an index field which must not be + // omitted even if it is zero. + bool is_index = format[3] == 'i'; + if (is_index || (instr->GetImmLS() != 0)) { + AppendToOutput(", #%" PRId32, instr->GetImmLS()); + } + return is_index ? 4 : 3; + } + case 'P': { // ILPx - Immediate Load/Store Pair, x = access size. + // ILPxi - As above, but an index field which must not be + // omitted even if it is zero. + VIXL_ASSERT((format[3] >= '0') && (format[3] <= '9')); + bool is_index = format[4] == 'i'; + if (is_index || (instr->GetImmLSPair() != 0)) { + // format[3] is the scale value. Convert to a number. + int scale = 1 << (format[3] - '0'); + AppendToOutput(", #%" PRId32, instr->GetImmLSPair() * scale); + } + return is_index ? 5 : 4; + } + case 'U': { // ILU - Immediate Load/Store Unsigned. + if (instr->GetImmLSUnsigned() != 0) { + int shift = instr->GetSizeLS(); + AppendToOutput(", #%" PRId32, instr->GetImmLSUnsigned() << shift); + } + return 3; + } + case 'F': { // ILF(CNR) - Immediate Rotation Value for Complex Numbers + AppendToOutput("#%" PRId32, instr->GetImmRotFcmlaSca() * 90); + return strlen("ILFCNR"); + } + case 'A': { // ILA - Immediate Load with pointer authentication. + if (instr->GetImmLSPAC() != 0) { + AppendToOutput(", #%" PRId32, instr->GetImmLSPAC()); + } + return 3; + } + default: { + VIXL_UNIMPLEMENTED(); + return 0; + } + } + } + case 'C': { // ICondB - Immediate Conditional Branch. + int64_t offset = instr->GetImmCondBranch() << 2; + AppendPCRelativeOffsetToOutput(instr, offset); + return 6; + } + case 'A': { // IAddSub. + int64_t imm = instr->GetImmAddSub() << (12 * instr->GetImmAddSubShift()); + AppendToOutput("#0x%" PRIx64 " (%" PRId64 ")", imm, imm); + return 7; + } + case 'F': { // IFP, IFPNeon, IFPSve or IFPFBits. + int imm8 = 0; + int len = strlen("IFP"); + switch (format[3]) { + case 'F': + VIXL_ASSERT(strncmp(format, "IFPFBits", strlen("IFPFBits")) == 0); + AppendToOutput("#%" PRId32, 64 - instr->GetFPScale()); + return strlen("IFPFBits"); + case 'N': + VIXL_ASSERT(strncmp(format, "IFPNeon", strlen("IFPNeon")) == 0); + imm8 = instr->GetImmNEONabcdefgh(); + len += strlen("Neon"); + break; + case 'S': + VIXL_ASSERT(strncmp(format, "IFPSve", strlen("IFPSve")) == 0); + imm8 = instr->ExtractBits(12, 5); + len += strlen("Sve"); + break; + default: + VIXL_ASSERT(strncmp(format, "IFP", strlen("IFP")) == 0); + imm8 = instr->GetImmFP(); + break; + } + AppendToOutput("#0x%" PRIx32 " (%.4f)", + imm8, + Instruction::Imm8ToFP32(imm8)); + return len; + } + case 'H': { // IH - ImmHint + AppendToOutput("#%" PRId32, instr->GetImmHint()); + return 2; + } + case 'T': { // ITri - Immediate Triangular Encoded. + if (format[4] == 'S') { + VIXL_ASSERT((format[5] == 'v') && (format[6] == 'e')); + switch (format[7]) { + case 'l': + // SVE logical immediate encoding. + AppendToOutput("#0x%" PRIx64, instr->GetSVEImmLogical()); + return 8; + case 'p': { + // SVE predicated shift immediate encoding, lsl. + std::pair shift_and_lane_size = + instr->GetSVEImmShiftAndLaneSizeLog2( + /* is_predicated = */ true); + int lane_bits = 8 << shift_and_lane_size.second; + AppendToOutput("#%" PRId32, lane_bits - shift_and_lane_size.first); + return 8; + } + case 'q': { + // SVE predicated shift immediate encoding, asr and lsr. + std::pair shift_and_lane_size = + instr->GetSVEImmShiftAndLaneSizeLog2( + /* is_predicated = */ true); + AppendToOutput("#%" PRId32, shift_and_lane_size.first); + return 8; + } + case 'r': { + // SVE unpredicated shift immediate encoding, lsl. + std::pair shift_and_lane_size = + instr->GetSVEImmShiftAndLaneSizeLog2( + /* is_predicated = */ false); + int lane_bits = 8 << shift_and_lane_size.second; + AppendToOutput("#%" PRId32, lane_bits - shift_and_lane_size.first); + return 8; + } + case 's': { + // SVE unpredicated shift immediate encoding, asr and lsr. + std::pair shift_and_lane_size = + instr->GetSVEImmShiftAndLaneSizeLog2( + /* is_predicated = */ false); + AppendToOutput("#%" PRId32, shift_and_lane_size.first); + return 8; + } + default: + VIXL_UNREACHABLE(); + return 0; + } + } else { + AppendToOutput("#0x%" PRIx64, instr->GetImmLogical()); + return 4; + } + } + case 'N': { // INzcv. + int nzcv = (instr->GetNzcv() << Flags_offset); + AppendToOutput("#%c%c%c%c", + ((nzcv & NFlag) == 0) ? 'n' : 'N', + ((nzcv & ZFlag) == 0) ? 'z' : 'Z', + ((nzcv & CFlag) == 0) ? 'c' : 'C', + ((nzcv & VFlag) == 0) ? 'v' : 'V'); + return 5; + } + case 'P': { // IP - Conditional compare. + AppendToOutput("#%" PRId32, instr->GetImmCondCmp()); + return 2; + } + case 'B': { // Bitfields. + return SubstituteBitfieldImmediateField(instr, format); + } + case 'E': { // IExtract. + AppendToOutput("#%" PRId32, instr->GetImmS()); + return 8; + } + case 't': { // It - Test and branch bit. + AppendToOutput("#%" PRId32, + (instr->GetImmTestBranchBit5() << 5) | + instr->GetImmTestBranchBit40()); + return 2; + } + case 'S': { // ISveSvl - SVE 'mul vl' immediate for structured ld/st. + VIXL_ASSERT(strncmp(format, "ISveSvl", 7) == 0); + int imm = instr->ExtractSignedBits(19, 16); + if (imm != 0) { + int reg_count = instr->ExtractBits(22, 21) + 1; + AppendToOutput(", #%d, mul vl", imm * reg_count); + } + return 7; + } + case 's': { // Is - Shift (immediate). + switch (format[2]) { + case '1': { // Is1 - SSHR. + int shift = 16 << HighestSetBitPosition(instr->GetImmNEONImmh()); + shift -= instr->GetImmNEONImmhImmb(); + AppendToOutput("#%d", shift); + return 3; + } + case '2': { // Is2 - SLI. + int shift = instr->GetImmNEONImmhImmb(); + shift -= 8 << HighestSetBitPosition(instr->GetImmNEONImmh()); + AppendToOutput("#%d", shift); + return 3; + } + default: { + VIXL_UNIMPLEMENTED(); + return 0; + } + } + } + case 'D': { // IDebug - HLT and BRK instructions. + AppendToOutput("#0x%" PRIx32, instr->GetImmException()); + return 6; + } + case 'U': { // IUdf - UDF immediate. + AppendToOutput("#0x%" PRIx32, instr->GetImmUdf()); + return 4; + } + case 'V': { // Immediate Vector. + switch (format[2]) { + case 'F': { + switch (format[5]) { + // Convert 'rot' bit encodings into equivalent angle rotation + case 'A': + AppendToOutput("#%" PRId32, + instr->GetImmRotFcadd() == 1 ? 270 : 90); + break; + case 'M': + AppendToOutput("#%" PRId32, instr->GetImmRotFcmlaVec() * 90); + break; + } + return strlen("IVFCN") + 1; + } + case 'E': { // IVExtract. + AppendToOutput("#%" PRId32, instr->GetImmNEONExt()); + return 9; + } + case 'B': { // IVByElemIndex. + int ret = strlen("IVByElemIndex"); + int vm_index = (instr->GetNEONH() << 1) | instr->GetNEONL(); + static const char *format_rot = "IVByElemIndexRot"; + static const char *format_fhm = "IVByElemIndexFHM"; + bool is_fhm = strncmp(format, format_fhm, strlen(format_fhm)) == 0; + if (strncmp(format, format_rot, strlen(format_rot)) == 0) { + // FCMLA uses 'H' bit index when SIZE is 2, else H:L + if (instr->GetNEONSize() == 2) { + vm_index = instr->GetNEONH(); + } + ret = static_cast(strlen(format_rot)); + } else if (is_fhm || (instr->GetNEONSize() == 0)) { + // Half-precision FP ops use H:L:M bit index + // Widening operations with H-sized operands also use H:L:M. + vm_index = (instr->GetNEONH() << 2) | (instr->GetNEONL() << 1) | + instr->GetNEONM(); + if (is_fhm) ret = static_cast(strlen(format_fhm)); + } else if (instr->GetNEONSize() == 1) { + vm_index = (vm_index << 1) | instr->GetNEONM(); + } + AppendToOutput("%d", vm_index); + return ret; + } + case 'I': { // INS element. + if (strncmp(format, "IVInsIndex", strlen("IVInsIndex")) == 0) { + unsigned rd_index, rn_index; + unsigned imm5 = instr->GetImmNEON5(); + unsigned imm4 = instr->GetImmNEON4(); + int tz = CountTrailingZeros(imm5, 32); + if (tz <= 3) { // Defined for tz = 0 to 3 only. + rd_index = imm5 >> (tz + 1); + rn_index = imm4 >> tz; + if (strncmp(format, "IVInsIndex1", strlen("IVInsIndex1")) == 0) { + AppendToOutput("%d", rd_index); + return strlen("IVInsIndex1"); + } else if (strncmp(format, + "IVInsIndex2", + strlen("IVInsIndex2")) == 0) { + AppendToOutput("%d", rn_index); + return strlen("IVInsIndex2"); + } + } + return 0; + } else if (strncmp(format, + "IVInsSVEIndex", + strlen("IVInsSVEIndex")) == 0) { + std::pair index_and_lane_size = + instr->GetSVEPermuteIndexAndLaneSizeLog2(); + AppendToOutput("%d", index_and_lane_size.first); + return strlen("IVInsSVEIndex"); + } + VIXL_FALLTHROUGH(); + } + case 'L': { // IVLSLane[0123] - suffix indicates access size shift. + AppendToOutput("%d", instr->GetNEONLSIndex(format[8] - '0')); + return 9; + } + case 'M': { // Modified Immediate cases. + if (strncmp(format, "IVMIImm8", strlen("IVMIImm8")) == 0) { + uint64_t imm8 = instr->GetImmNEONabcdefgh(); + AppendToOutput("#0x%" PRIx64, imm8); + return strlen("IVMIImm8"); + } else if (strncmp(format, "IVMIImm", strlen("IVMIImm")) == 0) { + uint64_t imm8 = instr->GetImmNEONabcdefgh(); + uint64_t imm = 0; + for (int i = 0; i < 8; ++i) { + if (imm8 & (1 << i)) { + imm |= (UINT64_C(0xff) << (8 * i)); + } + } + AppendToOutput("#0x%" PRIx64, imm); + return strlen("IVMIImm"); + } else if (strncmp(format, + "IVMIShiftAmt1", + strlen("IVMIShiftAmt1")) == 0) { + int cmode = instr->GetNEONCmode(); + int shift_amount = 8 * ((cmode >> 1) & 3); + AppendToOutput("#%d", shift_amount); + return strlen("IVMIShiftAmt1"); + } else if (strncmp(format, + "IVMIShiftAmt2", + strlen("IVMIShiftAmt2")) == 0) { + int cmode = instr->GetNEONCmode(); + int shift_amount = 8 << (cmode & 1); + AppendToOutput("#%d", shift_amount); + return strlen("IVMIShiftAmt2"); + } else { + VIXL_UNIMPLEMENTED(); + return 0; + } + } + default: { + VIXL_UNIMPLEMENTED(); + return 0; + } + } + } + case 'X': { // IX - CLREX instruction. + AppendToOutput("#0x%" PRIx32, instr->GetCRm()); + return 2; + } + case 'Y': { // IY - system register immediate. + switch (instr->GetImmSystemRegister()) { + case NZCV: + AppendToOutput("nzcv"); + break; + case FPCR: + AppendToOutput("fpcr"); + break; + case RNDR: + AppendToOutput("rndr"); + break; + case RNDRRS: + AppendToOutput("rndrrs"); + break; + default: + AppendToOutput("S%d_%d_c%d_c%d_%d", + instr->GetSysOp0(), + instr->GetSysOp1(), + instr->GetCRn(), + instr->GetCRm(), + instr->GetSysOp2()); + break; + } + return 2; + } + case 'R': { // IR - Rotate right into flags. + switch (format[2]) { + case 'r': { // IRr - Rotate amount. + AppendToOutput("#%d", instr->GetImmRMIFRotation()); + return 3; + } + default: { + VIXL_UNIMPLEMENTED(); + return 0; + } + } + } + case 'p': { // Ipc - SVE predicate constraint specifier. + VIXL_ASSERT(format[2] == 'c'); + unsigned pattern = instr->GetImmSVEPredicateConstraint(); + switch (pattern) { + // VL1-VL8 are encoded directly. + case SVE_VL1: + case SVE_VL2: + case SVE_VL3: + case SVE_VL4: + case SVE_VL5: + case SVE_VL6: + case SVE_VL7: + case SVE_VL8: + AppendToOutput("vl%u", pattern); + break; + // VL16-VL256 are encoded as log2(N) + c. + case SVE_VL16: + case SVE_VL32: + case SVE_VL64: + case SVE_VL128: + case SVE_VL256: + AppendToOutput("vl%u", 16 << (pattern - SVE_VL16)); + break; + // Special cases. + case SVE_POW2: + AppendToOutput("pow2"); + break; + case SVE_MUL4: + AppendToOutput("mul4"); + break; + case SVE_MUL3: + AppendToOutput("mul3"); + break; + case SVE_ALL: + AppendToOutput("all"); + break; + default: + AppendToOutput("#0x%x", pattern); + break; + } + return 3; + } + default: { + VIXL_UNIMPLEMENTED(); + return 0; + } + } +} + + +int Disassembler::SubstituteBitfieldImmediateField(const Instruction *instr, + const char *format) { + VIXL_ASSERT((format[0] == 'I') && (format[1] == 'B')); + unsigned r = instr->GetImmR(); + unsigned s = instr->GetImmS(); + + switch (format[2]) { + case 'r': { // IBr. + AppendToOutput("#%d", r); + return 3; + } + case 's': { // IBs+1 or IBs-r+1. + if (format[3] == '+') { + AppendToOutput("#%d", s + 1); + return 5; + } else { + VIXL_ASSERT(format[3] == '-'); + AppendToOutput("#%d", s - r + 1); + return 7; + } + } + case 'Z': { // IBZ-r. + VIXL_ASSERT((format[3] == '-') && (format[4] == 'r')); + unsigned reg_size = + (instr->GetSixtyFourBits() == 1) ? kXRegSize : kWRegSize; + AppendToOutput("#%d", reg_size - r); + return 5; + } + default: { + VIXL_UNREACHABLE(); + return 0; + } + } +} + + +int Disassembler::SubstituteLiteralField(const Instruction *instr, + const char *format) { + VIXL_ASSERT(strncmp(format, "LValue", 6) == 0); + USE(format); + + const void *address = instr->GetLiteralAddress(); + switch (instr->Mask(LoadLiteralMask)) { + case LDR_w_lit: + case LDR_x_lit: + case LDRSW_x_lit: + case LDR_s_lit: + case LDR_d_lit: + case LDR_q_lit: + AppendCodeRelativeDataAddressToOutput(instr, address); + break; + case PRFM_lit: { + // Use the prefetch hint to decide how to print the address. + switch (instr->GetPrefetchHint()) { + case 0x0: // PLD: prefetch for load. + case 0x2: // PST: prepare for store. + AppendCodeRelativeDataAddressToOutput(instr, address); + break; + case 0x1: // PLI: preload instructions. + AppendCodeRelativeCodeAddressToOutput(instr, address); + break; + case 0x3: // Unallocated hint. + AppendCodeRelativeAddressToOutput(instr, address); + break; + } + break; + } + default: + VIXL_UNREACHABLE(); + } + + return 6; +} + + +int Disassembler::SubstituteShiftField(const Instruction *instr, + const char *format) { + VIXL_ASSERT(format[0] == 'N'); + VIXL_ASSERT(instr->GetShiftDP() <= 0x3); + + switch (format[1]) { + case 'D': { // NDP. + VIXL_ASSERT(instr->GetShiftDP() != ROR); + VIXL_FALLTHROUGH(); + } + case 'L': { // NLo. + if (instr->GetImmDPShift() != 0) { + const char *shift_type[] = {"lsl", "lsr", "asr", "ror"}; + AppendToOutput(", %s #%" PRId32, + shift_type[instr->GetShiftDP()], + instr->GetImmDPShift()); + } + return 3; + } + case 'S': { // NSveS (SVE structured load/store indexing shift). + VIXL_ASSERT(strncmp(format, "NSveS", 5) == 0); + int msz = instr->ExtractBits(24, 23); + if (msz > 0) { + AppendToOutput(", lsl #%d", msz); + } + return 5; + } + default: + VIXL_UNIMPLEMENTED(); + return 0; + } +} + + +int Disassembler::SubstituteConditionField(const Instruction *instr, + const char *format) { + VIXL_ASSERT(format[0] == 'C'); + const char *condition_code[] = {"eq", + "ne", + "hs", + "lo", + "mi", + "pl", + "vs", + "vc", + "hi", + "ls", + "ge", + "lt", + "gt", + "le", + "al", + "nv"}; + int cond; + switch (format[1]) { + case 'B': + cond = instr->GetConditionBranch(); + break; + case 'I': { + cond = InvertCondition(static_cast(instr->GetCondition())); + break; + } + default: + cond = instr->GetCondition(); + } + AppendToOutput("%s", condition_code[cond]); + return 4; +} + + +int Disassembler::SubstitutePCRelAddressField(const Instruction *instr, + const char *format) { + VIXL_ASSERT((strcmp(format, "AddrPCRelByte") == 0) || // Used by `adr`. + (strcmp(format, "AddrPCRelPage") == 0)); // Used by `adrp`. + + int64_t offset = instr->GetImmPCRel(); + + // Compute the target address based on the effective address (after applying + // code_address_offset). This is required for correct behaviour of adrp. + const Instruction *base = instr + code_address_offset(); + if (format[9] == 'P') { + offset *= kPageSize; + base = AlignDown(base, kPageSize); + } + // Strip code_address_offset before printing, so we can use the + // semantically-correct AppendCodeRelativeAddressToOutput. + const void *target = + reinterpret_cast(base + offset - code_address_offset()); + + AppendPCRelativeOffsetToOutput(instr, offset); + AppendToOutput(" "); + AppendCodeRelativeAddressToOutput(instr, target); + return 13; +} + + +int Disassembler::SubstituteBranchTargetField(const Instruction *instr, + const char *format) { + VIXL_ASSERT(strncmp(format, "TImm", 4) == 0); + + int64_t offset = 0; + switch (format[5]) { + // BImmUncn - unconditional branch immediate. + case 'n': + offset = instr->GetImmUncondBranch(); + break; + // BImmCond - conditional branch immediate. + case 'o': + offset = instr->GetImmCondBranch(); + break; + // BImmCmpa - compare and branch immediate. + case 'm': + offset = instr->GetImmCmpBranch(); + break; + // BImmTest - test and branch immediate. + case 'e': + offset = instr->GetImmTestBranch(); + break; + default: + VIXL_UNIMPLEMENTED(); + } + offset *= static_cast(kInstructionSize); + const void *target_address = reinterpret_cast(instr + offset); + VIXL_STATIC_ASSERT(sizeof(*instr) == 1); + + AppendPCRelativeOffsetToOutput(instr, offset); + AppendToOutput(" "); + AppendCodeRelativeCodeAddressToOutput(instr, target_address); + + return 8; +} + + +int Disassembler::SubstituteExtendField(const Instruction *instr, + const char *format) { + VIXL_ASSERT(strncmp(format, "Ext", 3) == 0); + VIXL_ASSERT(instr->GetExtendMode() <= 7); + USE(format); + + const char *extend_mode[] = + {"uxtb", "uxth", "uxtw", "uxtx", "sxtb", "sxth", "sxtw", "sxtx"}; + + // If rd or rn is SP, uxtw on 32-bit registers and uxtx on 64-bit + // registers becomes lsl. + if (((instr->GetRd() == kZeroRegCode) || (instr->GetRn() == kZeroRegCode)) && + (((instr->GetExtendMode() == UXTW) && (instr->GetSixtyFourBits() == 0)) || + (instr->GetExtendMode() == UXTX))) { + if (instr->GetImmExtendShift() > 0) { + AppendToOutput(", lsl #%" PRId32, instr->GetImmExtendShift()); + } + } else { + AppendToOutput(", %s", extend_mode[instr->GetExtendMode()]); + if (instr->GetImmExtendShift() > 0) { + AppendToOutput(" #%" PRId32, instr->GetImmExtendShift()); + } + } + return 3; +} + + +int Disassembler::SubstituteLSRegOffsetField(const Instruction *instr, + const char *format) { + VIXL_ASSERT(strncmp(format, "Offsetreg", 9) == 0); + const char *extend_mode[] = {"undefined", + "undefined", + "uxtw", + "lsl", + "undefined", + "undefined", + "sxtw", + "sxtx"}; + USE(format); + + unsigned shift = instr->GetImmShiftLS(); + Extend ext = static_cast(instr->GetExtendMode()); + char reg_type = ((ext == UXTW) || (ext == SXTW)) ? 'w' : 'x'; + + unsigned rm = instr->GetRm(); + if (rm == kZeroRegCode) { + AppendToOutput("%czr", reg_type); + } else { + AppendToOutput("%c%d", reg_type, rm); + } + + // Extend mode UXTX is an alias for shift mode LSL here. + if (!((ext == UXTX) && (shift == 0))) { + AppendToOutput(", %s", extend_mode[ext]); + if (shift != 0) { + AppendToOutput(" #%d", instr->GetSizeLS()); + } + } + return 9; +} + + +int Disassembler::SubstitutePrefetchField(const Instruction *instr, + const char *format) { + VIXL_ASSERT(format[0] == 'p'); + USE(format); + + bool is_sve = + (strncmp(format, "prefSVEOp", strlen("prefSVEOp")) == 0) ? true : false; + int placeholder_length = is_sve ? 9 : 6; + static const char *stream_options[] = {"keep", "strm"}; + + // auto get_hints xt= [](bool is_sve) -> jitstd::vector { + // //AHTODO + // static const jitstd::vector sve_hints(compiler->getAllocator(CMK_Codegen)); + // // sve_hints.push_back("ld"); + // // sve_hints.push_back("st"); + // static const jitstd::vector core_hints(compiler->getAllocator(CMK_Codegen)); + // // core_hints.push_back("ld"); + // // core_hints.push_back("li"); + // // core_hints.push_back("st"); + // return (is_sve) ? sve_hints : core_hints; + // }; + + jitstd::vector hints(compiler->getAllocator(CMK_Codegen)); + // /= get_hints(is_sve); + unsigned hint = + is_sve ? instr->GetSVEPrefetchHint() : instr->GetPrefetchHint(); + unsigned target = instr->GetPrefetchTarget() + 1; + unsigned stream = instr->GetPrefetchStream(); + + if ((hint >= hints.size()) || (target > 3)) { + // Unallocated prefetch operations. + //AHTODO + // if (is_sve) { + // std::bitset<4> prefetch_mode(instr->GetSVEImmPrefetchOperation()); + // AppendToOutput("#0b%s", prefetch_mode.to_string().c_str()); + // } else { + // std::bitset<5> prefetch_mode(instr->GetImmPrefetchOperation()); + // AppendToOutput("#0b%s", prefetch_mode.to_string().c_str()); + // } + } else { + VIXL_ASSERT(stream < ArrayLength(stream_options)); + AppendToOutput("p%sl%d%s", + hints[hint].c_str(), + target, + stream_options[stream]); + } + return placeholder_length; +} + +int Disassembler::SubstituteBarrierField(const Instruction *instr, + const char *format) { + VIXL_ASSERT(format[0] == 'M'); + USE(format); + + static const char *options[4][4] = {{"sy (0b0000)", "oshld", "oshst", "osh"}, + {"sy (0b0100)", "nshld", "nshst", "nsh"}, + {"sy (0b1000)", "ishld", "ishst", "ish"}, + {"sy (0b1100)", "ld", "st", "sy"}}; + int domain = instr->GetImmBarrierDomain(); + int type = instr->GetImmBarrierType(); + + AppendToOutput("%s", options[domain][type]); + return 1; +} + +int Disassembler::SubstituteSysOpField(const Instruction *instr, + const char *format) { + VIXL_ASSERT(format[0] == 'G'); + int op = -1; + switch (format[1]) { + case '1': + op = instr->GetSysOp1(); + break; + case '2': + op = instr->GetSysOp2(); + break; + default: + VIXL_UNREACHABLE(); + } + AppendToOutput("#%d", op); + return 2; +} + +int Disassembler::SubstituteCrField(const Instruction *instr, + const char *format) { + VIXL_ASSERT(format[0] == 'K'); + int cr = -1; + switch (format[1]) { + case 'n': + cr = instr->GetCRn(); + break; + case 'm': + cr = instr->GetCRm(); + break; + default: + VIXL_UNREACHABLE(); + } + AppendToOutput("C%d", cr); + return 2; +} + +int Disassembler::SubstituteIntField(const Instruction *instr, + const char *format) { + VIXL_ASSERT((format[0] == 'u') || (format[0] == 's')); + + // A generic signed or unsigned int field uses a placeholder of the form + // 'sAABB and 'uAABB respectively where AA and BB are two digit bit positions + // between 00 and 31, and AA >= BB. The placeholder is substituted with the + // decimal integer represented by the bits in the instruction between + // positions AA and BB inclusive. + // + // In addition, split fields can be represented using 'sAABB:CCDD, where CCDD + // become the least-significant bits of the result, and bit AA is the sign bit + // (if 's is used). + int32_t bits = 0; + int width = 0; + const char *c = format; + do { + c++; // Skip the 'u', 's' or ':'. + VIXL_ASSERT(strspn(c, "0123456789") == 4); + int msb = ((c[0] - '0') * 10) + (c[1] - '0'); + int lsb = ((c[2] - '0') * 10) + (c[3] - '0'); + c += 4; // Skip the characters we just read. + int chunk_width = msb - lsb + 1; + VIXL_ASSERT((chunk_width > 0) && (chunk_width < 32)); + bits = (bits << chunk_width) | (instr->ExtractBits(msb, lsb)); + width += chunk_width; + } while (*c == ':'); + VIXL_ASSERT(IsUintN(width, bits)); + + if (format[0] == 's') { + bits = ExtractSignedBitfield32(width - 1, 0, bits); + } + + if (*c == '+') { + // A "+n" trailing the format specifier indicates the extracted value should + // be incremented by n. This is for cases where the encoding is zero-based, + // but range of values is not, eg. values [1, 16] encoded as [0, 15] + char *new_c; + uint64_t value = strtoul(c + 1, &new_c, 10); + c = new_c; + VIXL_ASSERT(IsInt32(value)); + bits += value; + } else if (*c == '*') { + // Similarly, a "*n" trailing the format specifier indicates the extracted + // value should be multiplied by n. This is for cases where the encoded + // immediate is scaled, for example by access size. + char *new_c; + uint64_t value = strtoul(c + 1, &new_c, 10); + c = new_c; + VIXL_ASSERT(IsInt32(value)); + bits *= value; + } + + AppendToOutput("%d", bits); + + return static_cast(c - format); +} + +int Disassembler::SubstituteSVESize(const Instruction *instr, + const char *format) { + USE(format); + VIXL_ASSERT(format[0] == 't'); + + static const char sizes[] = {'b', 'h', 's', 'd', 'q'}; + // TODO: only the most common case for is supported at the moment, + // and even then, the RESERVED values are handled as if they're not + // reserved. + unsigned size_in_bytes_log2 = instr->GetSVESize(); + int placeholder_length = 1; + switch (format[1]) { + case 'l': + placeholder_length++; + if (format[2] == 's') { + // 'tls: Loads and stores + size_in_bytes_log2 = instr->ExtractBits(22, 21); + placeholder_length++; + if (format[3] == 's') { + // Sign extension load. + unsigned msize = instr->ExtractBits(24, 23); + if (msize > size_in_bytes_log2) size_in_bytes_log2 ^= 0x3; + placeholder_length++; + } + } else { + // 'tl: Logical operations + size_in_bytes_log2 = instr->GetSVEBitwiseImmLaneSizeInBytesLog2(); + } + break; + case 'm': // 'tmsz + VIXL_ASSERT(strncmp(format, "tmsz", 4) == 0); + placeholder_length += 3; + size_in_bytes_log2 = instr->ExtractBits(24, 23); + break; + case 's': + if (format[2] == 'z') { + VIXL_ASSERT((format[3] == 'x') || (format[3] == 's') || + (format[3] == 'p')); + if (format[3] == 'x') { + // 'tszx: Indexes. + std::pair index_and_lane_size = + instr->GetSVEPermuteIndexAndLaneSizeLog2(); + size_in_bytes_log2 = index_and_lane_size.second; + } else if (format[3] == 'p') { + // 'tszp: Predicated shifts. + std::pair shift_and_lane_size = + instr->GetSVEImmShiftAndLaneSizeLog2(/* is_predicated = */ true); + size_in_bytes_log2 = shift_and_lane_size.second; + } else { + // 'tszs: Unpredicated shifts. + std::pair shift_and_lane_size = + instr->GetSVEImmShiftAndLaneSizeLog2(/* is_predicated = */ false); + size_in_bytes_log2 = shift_and_lane_size.second; + } + placeholder_length += 3; // skip `sz[x|s]` + } + break; + case 'h': + // Half size of the lane size field. + size_in_bytes_log2 -= 1; + placeholder_length++; + break; + case 'q': + // Quarter size of the lane size field. + size_in_bytes_log2 -= 2; + placeholder_length++; + break; + default: + break; + } + + VIXL_ASSERT(size_in_bytes_log2 < ArrayLength(sizes)); + AppendToOutput("%c", sizes[size_in_bytes_log2]); + + return placeholder_length; +} + +int Disassembler::SubstituteTernary(const Instruction *instr, + const char *format) { + VIXL_ASSERT((format[0] == '?') && (format[3] == ':')); + + // The ternary substitution of the format "'?bb:TF" is replaced by a single + // character, either T or F, depending on the value of the bit at position + // bb in the instruction. For example, "'?31:xw" is substituted with "x" if + // bit 31 is true, and "w" otherwise. + VIXL_ASSERT(strspn(&format[1], "0123456789") == 2); + char *c; + uint64_t value = strtoul(&format[1], &c, 10); + VIXL_ASSERT(value < (kInstructionSize * kBitsPerByte)); + VIXL_ASSERT((*c == ':') && (strlen(c) >= 3)); // Minimum of ":TF" + c++; + AppendToOutput("%c", c[1 - instr->ExtractBit(static_cast(value))]); + return 6; +} + +void Disassembler::ResetOutput() { + buffer_pos_ = 0; + buffer_[buffer_pos_] = 0; +} + + +void Disassembler::AppendToOutput(const char *format, ...) { + va_list args; + va_start(args, format); + buffer_pos_ += _vsnprintf_s(&buffer_[buffer_pos_], + buffer_size_ - buffer_pos_, -1, + format, + args); + va_end(args); +} + + +void PrintDisassembler::Disassemble(const Instruction *instr) { + Decoder decoder(compiler); + if (cpu_features_auditor_ != NULL) { + decoder.AppendVisitor(cpu_features_auditor_); + } + decoder.AppendVisitor(this); + decoder.Decode(instr); +} + +void PrintDisassembler::DisassembleBuffer(const Instruction *start, + const Instruction *end) { + Decoder decoder(compiler); + if (cpu_features_auditor_ != NULL) { + decoder.AppendVisitor(cpu_features_auditor_); + } + decoder.AppendVisitor(this); + decoder.Decode(start, end); +} + +void PrintDisassembler::DisassembleBuffer(const Instruction *start, + uint64_t size) { + DisassembleBuffer(start, start + size); +} + + +void PrintDisassembler::ProcessOutput(const Instruction *instr) { + int64_t address = CodeRelativeAddress(instr); + + uint64_t abs_address; + const char *sign; + if (signed_addresses_) { + if (address < 0) { + sign = "-"; + abs_address = -static_cast(address); + } else { + // Leave a leading space, to maintain alignment. + sign = " "; + abs_address = address; + } + } else { + sign = ""; + abs_address = address; + } + + int bytes_printed = fprintf(stream_, + "%s0x%016" PRIx64 " %08" PRIx32 "\t\t%s", + sign, + abs_address, + instr->GetInstructionBits(), + GetOutput()); + if (cpu_features_auditor_ != NULL) { + CPUFeatures needs = cpu_features_auditor_->GetInstructionFeatures(); + needs.Remove(cpu_features_auditor_->GetAvailableFeatures()); + if (needs != CPUFeatures::None()) { + // Try to align annotations. This value is arbitrary, but based on looking + // good with most instructions. Note that, for historical reasons, the + // disassembly itself is printed with tab characters, so bytes_printed is + // _not_ equivalent to the number of occupied screen columns. However, the + // prefix before the tabs is always the same length, so the annotation + // indentation does not change from one line to the next. + const int indent_to = 70; + // Always allow some space between the instruction and the annotation. + const int min_pad = 2; + + int pad = max(min_pad, (indent_to - bytes_printed)); + fprintf(stream_, "%*s", pad, ""); + + //AHTODO + // std::stringstream features; + // features << needs; + // fprintf(stream_, + // "%s%s%s", + // cpu_features_prefix_, + // features.str().c_str(), + // cpu_features_suffix_); + } + } + fprintf(stream_, "\n"); +} + +} // namespace aarch64 +} // namespace vixl diff --git a/src/coreclr/jit/vixl/aarch64/disasm-aarch64.h b/src/coreclr/jit/vixl/aarch64/disasm-aarch64.h new file mode 100644 index 00000000000000..9714f2a4998d0c --- /dev/null +++ b/src/coreclr/jit/vixl/aarch64/disasm-aarch64.h @@ -0,0 +1,245 @@ +// Copyright 2015, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef VIXL_AARCH64_DISASM_AARCH64_H +#define VIXL_AARCH64_DISASM_AARCH64_H + +#include + +#include "../globals-vixl.h" +#include "../utils-vixl.h" + +#include "cpu-features-auditor-aarch64.h" +#include "decoder-aarch64.h" +#include "instructions-aarch64.h" +#include "operands-aarch64.h" + +namespace vixl { +namespace aarch64 { + +class Disassembler : public DecoderVisitor { + public: + Disassembler(Compiler* compiler); + Disassembler(Compiler* compiler, char* text_buffer, int buffer_size); + virtual ~Disassembler(); + char* GetOutput(); + +// Declare all Visitor functions. +#define DECLARE(A) \ + virtual void Visit##A(const Instruction* instr) VIXL_OVERRIDE; + VISITOR_LIST(DECLARE) +#undef DECLARE + + protected: + virtual void ProcessOutput(const Instruction* instr); + + // Default output functions. The functions below implement a default way of + // printing elements in the disassembly. A sub-class can override these to + // customize the disassembly output. + + // Prints the name of a register. + // TODO: This currently doesn't allow renaming of V registers. + virtual void AppendRegisterNameToOutput(const Instruction* instr, + const CPURegister& reg); + + // Prints a PC-relative offset. This is used for example when disassembling + // branches to immediate offsets. + virtual void AppendPCRelativeOffsetToOutput(const Instruction* instr, + int64_t offset); + + // Prints an address, in the general case. It can be code or data. This is + // used for example to print the target address of an ADR instruction. + virtual void AppendCodeRelativeAddressToOutput(const Instruction* instr, + const void* addr); + + // Prints the address of some code. + // This is used for example to print the target address of a branch to an + // immediate offset. + // A sub-class can for example override this method to lookup the address and + // print an appropriate name. + virtual void AppendCodeRelativeCodeAddressToOutput(const Instruction* instr, + const void* addr); + + // Prints the address of some data. + // This is used for example to print the source address of a load literal + // instruction. + virtual void AppendCodeRelativeDataAddressToOutput(const Instruction* instr, + const void* addr); + + // Same as the above, but for addresses that are not relative to the code + // buffer. They are currently not used by VIXL. + virtual void AppendAddressToOutput(const Instruction* instr, + const void* addr); + virtual void AppendCodeAddressToOutput(const Instruction* instr, + const void* addr); + virtual void AppendDataAddressToOutput(const Instruction* instr, + const void* addr); + + public: + // Get/Set the offset that should be added to code addresses when printing + // code-relative addresses in the AppendCodeRelativeAddressToOutput() + // helpers. + // Below is an example of how a branch immediate instruction in memory at + // address 0xb010200 would disassemble with different offsets. + // Base address | Disassembly + // 0x0 | 0xb010200: b #+0xcc (addr 0xb0102cc) + // 0x10000 | 0xb000200: b #+0xcc (addr 0xb0002cc) + // 0xb010200 | 0x0: b #+0xcc (addr 0xcc) + void MapCodeAddress(int64_t base_address, const Instruction* instr_address); + int64_t CodeRelativeAddress(const void* instr); + + Compiler* compiler; + + private: + void Format(const Instruction* instr, + const char* mnemonic, + const char* format0, + const char* format1 = NULL); + void Substitute(const Instruction* instr, const char* string); + int SubstituteField(const Instruction* instr, const char* format); + int SubstituteRegisterField(const Instruction* instr, const char* format); + int SubstitutePredicateRegisterField(const Instruction* instr, + const char* format); + int SubstituteImmediateField(const Instruction* instr, const char* format); + int SubstituteLiteralField(const Instruction* instr, const char* format); + int SubstituteBitfieldImmediateField(const Instruction* instr, + const char* format); + int SubstituteShiftField(const Instruction* instr, const char* format); + int SubstituteExtendField(const Instruction* instr, const char* format); + int SubstituteConditionField(const Instruction* instr, const char* format); + int SubstitutePCRelAddressField(const Instruction* instr, const char* format); + int SubstituteBranchTargetField(const Instruction* instr, const char* format); + int SubstituteLSRegOffsetField(const Instruction* instr, const char* format); + int SubstitutePrefetchField(const Instruction* instr, const char* format); + int SubstituteBarrierField(const Instruction* instr, const char* format); + int SubstituteSysOpField(const Instruction* instr, const char* format); + int SubstituteCrField(const Instruction* instr, const char* format); + int SubstituteIntField(const Instruction* instr, const char* format); + int SubstituteSVESize(const Instruction* instr, const char* format); + int SubstituteTernary(const Instruction* instr, const char* format); + + std::pair GetRegNumForField(const Instruction* instr, + char reg_prefix, + const char* field); + + bool RdIsZROrSP(const Instruction* instr) const { + return (instr->GetRd() == kZeroRegCode); + } + + bool RnIsZROrSP(const Instruction* instr) const { + return (instr->GetRn() == kZeroRegCode); + } + + bool RmIsZROrSP(const Instruction* instr) const { + return (instr->GetRm() == kZeroRegCode); + } + + bool RaIsZROrSP(const Instruction* instr) const { + return (instr->GetRa() == kZeroRegCode); + } + + bool IsMovzMovnImm(unsigned reg_size, uint64_t value); + + int64_t code_address_offset() const { return code_address_offset_; } + + protected: + void ResetOutput(); + void AppendToOutput(const char* string, ...) PRINTF_CHECK(2, 3); + + void set_code_address_offset(int64_t code_address_offset) { + code_address_offset_ = code_address_offset; + } + + char* buffer_; + uint32_t buffer_pos_; + uint32_t buffer_size_; + bool own_buffer_; + + int64_t code_address_offset_; +}; + + +class PrintDisassembler : public Disassembler { + public: + explicit PrintDisassembler(Compiler *compiler, FILE* stream) + : Disassembler(compiler), + cpu_features_auditor_(NULL), + cpu_features_prefix_("// Needs: "), + cpu_features_suffix_(""), + signed_addresses_(false), + stream_(stream) {} + + // Convenience helpers for quick disassembly, without having to manually + // create a decoder. + void DisassembleBuffer(const Instruction* start, uint64_t size); + void DisassembleBuffer(const Instruction* start, const Instruction* end); + void Disassemble(const Instruction* instr); + + // If a CPUFeaturesAuditor is specified, it will be used to annotate + // disassembly. The CPUFeaturesAuditor is expected to visit the instructions + // _before_ the disassembler, such that the CPUFeatures information is + // available when the disassembler is called. + void RegisterCPUFeaturesAuditor(CPUFeaturesAuditor* auditor) { + cpu_features_auditor_ = auditor; + } + + // Set the prefix to appear before the CPU features annotations. + void SetCPUFeaturesPrefix(const char* prefix) { + VIXL_ASSERT(prefix != NULL); + cpu_features_prefix_ = prefix; + } + + // Set the suffix to appear after the CPU features annotations. + void SetCPUFeaturesSuffix(const char* suffix) { + VIXL_ASSERT(suffix != NULL); + cpu_features_suffix_ = suffix; + } + + // By default, addresses are printed as simple, unsigned 64-bit hex values. + // + // With `PrintSignedAddresses(true)`: + // - negative addresses are printed as "-0x1234...", + // - positive addresses have a leading space, like " 0x1234...", to maintain + // alignment. + // + // This is most useful in combination with Disassembler::MapCodeAddress(...). + void PrintSignedAddresses(bool s) { signed_addresses_ = s; } + + protected: + virtual void ProcessOutput(const Instruction* instr) VIXL_OVERRIDE; + + CPUFeaturesAuditor* cpu_features_auditor_; + const char* cpu_features_prefix_; + const char* cpu_features_suffix_; + bool signed_addresses_; + + private: + FILE* stream_; +}; +} // namespace aarch64 +} // namespace vixl + +#endif // VIXL_AARCH64_DISASM_AARCH64_H diff --git a/src/coreclr/jit/vixl/aarch64/instructions-aarch64.cc b/src/coreclr/jit/vixl/aarch64/instructions-aarch64.cc new file mode 100644 index 00000000000000..df5ea32dad6e38 --- /dev/null +++ b/src/coreclr/jit/vixl/aarch64/instructions-aarch64.cc @@ -0,0 +1,1416 @@ +// Copyright 2015, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "instructions-aarch64.h" +#include "assembler-aarch64.h" + +namespace vixl { +namespace aarch64 { + +static uint64_t RepeatBitsAcrossReg(unsigned reg_size, + uint64_t value, + unsigned width) { + VIXL_ASSERT((width == 2) || (width == 4) || (width == 8) || (width == 16) || + (width == 32)); + VIXL_ASSERT((reg_size == kBRegSize) || (reg_size == kHRegSize) || + (reg_size == kSRegSize) || (reg_size == kDRegSize)); + uint64_t result = value & ((UINT64_C(1) << width) - 1); + for (unsigned i = width; i < reg_size; i *= 2) { + result |= (result << i); + } + return result; +} + +bool Instruction::CanTakeSVEMovprfx(const Instruction* movprfx) const { + bool movprfx_is_predicated = movprfx->Mask(SVEMovprfxMask) == MOVPRFX_z_p_z; + bool movprfx_is_unpredicated = + movprfx->Mask(SVEConstructivePrefix_UnpredicatedMask) == MOVPRFX_z_z; + VIXL_ASSERT(movprfx_is_predicated != movprfx_is_unpredicated); + + int movprfx_zd = movprfx->GetRd(); + int movprfx_pg = movprfx_is_predicated ? movprfx->GetPgLow8() : -1; + VectorFormat movprfx_vform = + movprfx_is_predicated ? movprfx->GetSVEVectorFormat() : kFormatUndefined; + + bool pg_matches_low8 = movprfx_pg == GetPgLow8(); + bool vform_matches = movprfx_vform == GetSVEVectorFormat(); + bool zd_matches = movprfx_zd == GetRd(); + bool zd_matches_zm = movprfx_zd == GetRm(); + bool zd_matches_zn = movprfx_zd == GetRn(); + + switch (Mask(SVEBitwiseLogicalWithImm_UnpredicatedMask)) { + case AND_z_zi: + case EOR_z_zi: + case ORR_z_zi: + return movprfx_is_unpredicated && zd_matches; + } + switch (Mask(SVEBitwiseLogical_PredicatedMask)) { + case AND_z_p_zz: + case BIC_z_p_zz: + case EOR_z_p_zz: + case ORR_z_p_zz: + if (movprfx_is_predicated && !(pg_matches_low8 && vform_matches)) { + return false; + } + // The movprfx's `zd` must not alias any other inputs. + if (movprfx_zd == GetRx<9, 5>()) return false; + return zd_matches; + } + switch (Mask(SVEBitwiseShiftByImm_PredicatedMask)) { + case ASRD_z_p_zi: + case ASR_z_p_zi: + case LSL_z_p_zi: + case LSR_z_p_zi: + if (movprfx_is_predicated) { + if (!pg_matches_low8) return false; + unsigned tsz = ExtractBits<0x00c00300>(); + VectorFormat instr_vform = + SVEFormatFromLaneSizeInBytesLog2(HighestSetBitPosition(tsz)); + if (movprfx_vform != instr_vform) return false; + } + return zd_matches; + } + switch (Mask(SVEBitwiseShiftByVector_PredicatedMask)) { + case ASRR_z_p_zz: + case ASR_z_p_zz: + case LSLR_z_p_zz: + case LSL_z_p_zz: + case LSRR_z_p_zz: + case LSR_z_p_zz: + if (movprfx_is_predicated && !(pg_matches_low8 && vform_matches)) { + return false; + } + // The movprfx's `zd` must not alias any other inputs. + if (movprfx_zd == GetRx<9, 5>()) return false; + return zd_matches; + } + switch (Mask(SVEBitwiseShiftByWideElements_PredicatedMask)) { + case ASR_z_p_zw: + case LSL_z_p_zw: + case LSR_z_p_zw: + if (movprfx_is_predicated && !(pg_matches_low8 && vform_matches)) { + return false; + } + // The movprfx's `zd` must not alias any other inputs. + if (movprfx_zd == GetRx<9, 5>()) return false; + return zd_matches; + } + switch (Mask(SVEConditionallyBroadcastElementToVectorMask)) { + case CLASTA_z_p_zz: + case CLASTB_z_p_zz: + // The movprfx's `zd` must not alias any other inputs. + if (movprfx_zd == GetRx<9, 5>()) return false; + return movprfx_is_unpredicated && zd_matches; + } + switch (Mask(SVECopyFPImm_PredicatedMask)) { + case FCPY_z_p_i: + if (movprfx_is_predicated) { + if (!vform_matches) return false; + if (movprfx_pg != GetRx<19, 16>()) return false; + } + return zd_matches; + } + switch (Mask(SVECopyGeneralRegisterToVector_PredicatedMask)) { + case CPY_z_p_r: + if (movprfx_is_predicated && !(pg_matches_low8 && vform_matches)) { + return false; + } + return zd_matches; + } + switch (Mask(SVECopyIntImm_PredicatedMask)) { + case CPY_z_p_i: + if (movprfx_is_predicated) { + if (!vform_matches) return false; + if (movprfx_pg != GetRx<19, 16>()) return false; + } + // Only the merging form can take movprfx. + if (ExtractBit(14) == 0) return false; + return zd_matches; + } + switch (Mask(SVECopySIMDFPScalarRegisterToVector_PredicatedMask)) { + case CPY_z_p_v: + if (movprfx_is_predicated && !(pg_matches_low8 && vform_matches)) { + return false; + } + return zd_matches && !zd_matches_zn; + } + switch (Mask(SVEFPArithmeticWithImm_PredicatedMask)) { + case FADD_z_p_zs: + case FMAXNM_z_p_zs: + case FMAX_z_p_zs: + case FMINNM_z_p_zs: + case FMIN_z_p_zs: + case FMUL_z_p_zs: + case FSUBR_z_p_zs: + case FSUB_z_p_zs: + if (movprfx_is_predicated && !(pg_matches_low8 && vform_matches)) { + return false; + } + return zd_matches; + } + switch (Mask(SVEFPArithmetic_PredicatedMask)) { + case FABD_z_p_zz: + case FADD_z_p_zz: + case FDIVR_z_p_zz: + case FDIV_z_p_zz: + case FMAXNM_z_p_zz: + case FMAX_z_p_zz: + case FMINNM_z_p_zz: + case FMIN_z_p_zz: + case FMULX_z_p_zz: + case FMUL_z_p_zz: + case FSCALE_z_p_zz: + case FSUBR_z_p_zz: + case FSUB_z_p_zz: + if (movprfx_is_predicated && !(pg_matches_low8 && vform_matches)) { + return false; + } + // The movprfx's `zd` must not alias any other inputs. + if (movprfx_zd == GetRx<9, 5>()) return false; + return zd_matches; + } + switch (Mask(SVEFPComplexAdditionMask)) { + case FCADD_z_p_zz: + if (movprfx_is_predicated && !(pg_matches_low8 && vform_matches)) { + return false; + } + // The movprfx's `zd` must not alias any other inputs. + if (movprfx_zd == GetRx<9, 5>()) return false; + return zd_matches; + } + switch (Mask(SVEFPComplexMulAddIndexMask)) { + case FCMLA_z_zzzi_h: + // The movprfx's `zd` must not alias any other inputs. + if (movprfx_zd == GetRx<18, 16>()) return false; + return movprfx_is_unpredicated && zd_matches && !zd_matches_zn; + case FCMLA_z_zzzi_s: + // The movprfx's `zd` must not alias any other inputs. + if (movprfx_zd == GetRx<19, 16>()) return false; + return movprfx_is_unpredicated && zd_matches && !zd_matches_zn; + } + switch (Mask(SVEFPComplexMulAddMask)) { + case FCMLA_z_p_zzz: + if (movprfx_is_predicated && !(pg_matches_low8 && vform_matches)) { + return false; + } + return zd_matches && !zd_matches_zm && !zd_matches_zn; + } + switch (Mask(SVEFPConvertPrecisionMask)) { + case FCVT_z_p_z_d2h: + case FCVT_z_p_z_d2s: + case FCVT_z_p_z_h2d: + case FCVT_z_p_z_h2s: + case FCVT_z_p_z_s2d: + case FCVT_z_p_z_s2h: + if (movprfx_is_predicated && !(pg_matches_low8 && vform_matches)) { + return false; + } + return zd_matches && !zd_matches_zn; + } + switch (Mask(SVEFPConvertToIntMask)) { + case FCVTZS_z_p_z_d2w: + case FCVTZS_z_p_z_d2x: + case FCVTZS_z_p_z_fp162h: + case FCVTZS_z_p_z_fp162w: + case FCVTZS_z_p_z_fp162x: + case FCVTZS_z_p_z_s2w: + case FCVTZS_z_p_z_s2x: + case FCVTZU_z_p_z_d2w: + case FCVTZU_z_p_z_d2x: + case FCVTZU_z_p_z_fp162h: + case FCVTZU_z_p_z_fp162w: + case FCVTZU_z_p_z_fp162x: + case FCVTZU_z_p_z_s2w: + case FCVTZU_z_p_z_s2x: + if (movprfx_is_predicated) { + if (!pg_matches_low8) return false; + // The movprfx element size must match the instruction's maximum encoded + // element size. We have to partially decode the opc and opc2 fields to + // find this. + unsigned opc = ExtractBits(23, 22); + unsigned opc2 = ExtractBits(18, 17); + VectorFormat instr_vform = + SVEFormatFromLaneSizeInBytesLog2(max(opc, opc2)); + if (movprfx_vform != instr_vform) return false; + } + return zd_matches && !zd_matches_zn; + } + switch (Mask(SVEFPMulAddIndexMask)) { + case FMLA_z_zzzi_h: + case FMLA_z_zzzi_h_i3h: + case FMLA_z_zzzi_s: + case FMLS_z_zzzi_h: + case FMLS_z_zzzi_h_i3h: + case FMLS_z_zzzi_s: + // The movprfx's `zd` must not alias any other inputs. + if (movprfx_zd == GetRx<18, 16>()) return false; + return movprfx_is_unpredicated && zd_matches && !zd_matches_zn; + case FMLA_z_zzzi_d: + case FMLS_z_zzzi_d: + // The movprfx's `zd` must not alias any other inputs. + if (movprfx_zd == GetRx<19, 16>()) return false; + return movprfx_is_unpredicated && zd_matches && !zd_matches_zn; + } + switch (Mask(SVEFPMulAddMask)) { + case FMAD_z_p_zzz: + case FMSB_z_p_zzz: + case FNMAD_z_p_zzz: + case FNMSB_z_p_zzz: + if (movprfx_is_predicated && !(pg_matches_low8 && vform_matches)) { + return false; + } + // The movprfx's `zd` must not alias any other inputs. + if (movprfx_zd == GetRx<20, 16>()) return false; + if (movprfx_zd == GetRx<9, 5>()) return false; + return zd_matches; + case FMLA_z_p_zzz: + case FMLS_z_p_zzz: + case FNMLA_z_p_zzz: + case FNMLS_z_p_zzz: + if (movprfx_is_predicated && !(pg_matches_low8 && vform_matches)) { + return false; + } + return zd_matches && !zd_matches_zm && !zd_matches_zn; + } + switch (Mask(SVEFPRoundToIntegralValueMask)) { + case FRINTA_z_p_z: + case FRINTI_z_p_z: + case FRINTM_z_p_z: + case FRINTN_z_p_z: + case FRINTP_z_p_z: + case FRINTX_z_p_z: + case FRINTZ_z_p_z: + if (movprfx_is_predicated && !(pg_matches_low8 && vform_matches)) { + return false; + } + return zd_matches && !zd_matches_zn; + } + switch (Mask(SVEFPTrigMulAddCoefficientMask)) { + case FTMAD_z_zzi: + // The movprfx's `zd` must not alias any other inputs. + if (movprfx_zd == GetRx<9, 5>()) return false; + return movprfx_is_unpredicated && zd_matches; + } + switch (Mask(SVEFPUnaryOpMask)) { + case FRECPX_z_p_z: + case FSQRT_z_p_z: + if (movprfx_is_predicated && !(pg_matches_low8 && vform_matches)) { + return false; + } + return zd_matches && !zd_matches_zn; + } + switch (Mask(SVEIncDecByPredicateCountMask)) { + case DECP_z_p_z: + case INCP_z_p_z: + case SQDECP_z_p_z: + case SQINCP_z_p_z: + case UQDECP_z_p_z: + case UQINCP_z_p_z: + return movprfx_is_unpredicated && zd_matches; + } + switch (Mask(SVEIncDecVectorByElementCountMask)) { + case DECD_z_zs: + case DECH_z_zs: + case DECW_z_zs: + case INCD_z_zs: + case INCH_z_zs: + case INCW_z_zs: + return movprfx_is_unpredicated && zd_matches; + } + switch (Mask(SVEInsertGeneralRegisterMask)) { + case INSR_z_r: + return movprfx_is_unpredicated && zd_matches; + } + switch (Mask(SVEInsertSIMDFPScalarRegisterMask)) { + case INSR_z_v: + // The movprfx's `zd` must not alias any other inputs. + if (movprfx_zd == GetRx<9, 5>()) return false; + return movprfx_is_unpredicated && zd_matches; + } + switch (Mask(SVEIntAddSubtractImm_UnpredicatedMask)) { + case ADD_z_zi: + case SQADD_z_zi: + case SQSUB_z_zi: + case SUBR_z_zi: + case SUB_z_zi: + case UQADD_z_zi: + case UQSUB_z_zi: + return movprfx_is_unpredicated && zd_matches; + } + switch (Mask(SVEIntAddSubtractVectors_PredicatedMask)) { + case ADD_z_p_zz: + case SUBR_z_p_zz: + case SUB_z_p_zz: + if (movprfx_is_predicated && !(pg_matches_low8 && vform_matches)) { + return false; + } + // The movprfx's `zd` must not alias any other inputs. + if (movprfx_zd == GetRx<9, 5>()) return false; + return zd_matches; + } + switch (Mask(SVEIntConvertToFPMask)) { + case SCVTF_z_p_z_h2fp16: + case SCVTF_z_p_z_w2d: + case SCVTF_z_p_z_w2fp16: + case SCVTF_z_p_z_w2s: + case SCVTF_z_p_z_x2d: + case SCVTF_z_p_z_x2fp16: + case SCVTF_z_p_z_x2s: + case UCVTF_z_p_z_h2fp16: + case UCVTF_z_p_z_w2d: + case UCVTF_z_p_z_w2fp16: + case UCVTF_z_p_z_w2s: + case UCVTF_z_p_z_x2d: + case UCVTF_z_p_z_x2fp16: + case UCVTF_z_p_z_x2s: + if (movprfx_is_predicated) { + if (!pg_matches_low8) return false; + // The movprfx element size must match the instruction's maximum encoded + // element size. We have to partially decode the opc and opc2 fields to + // find this. + unsigned opc = ExtractBits(23, 22); + unsigned opc2 = ExtractBits(18, 17); + VectorFormat instr_vform = + SVEFormatFromLaneSizeInBytesLog2(max(opc, opc2)); + if (movprfx_vform != instr_vform) return false; + } + return zd_matches && !zd_matches_zn; + } + switch (Mask(SVEIntDivideVectors_PredicatedMask)) { + case SDIVR_z_p_zz: + case SDIV_z_p_zz: + case UDIVR_z_p_zz: + case UDIV_z_p_zz: + if (movprfx_is_predicated && !(pg_matches_low8 && vform_matches)) { + return false; + } + // The movprfx's `zd` must not alias any other inputs. + if (movprfx_zd == GetRx<9, 5>()) return false; + return zd_matches; + } + switch (Mask(SVEIntMinMaxDifference_PredicatedMask)) { + case SABD_z_p_zz: + case SMAX_z_p_zz: + case SMIN_z_p_zz: + case UABD_z_p_zz: + case UMAX_z_p_zz: + case UMIN_z_p_zz: + if (movprfx_is_predicated && !(pg_matches_low8 && vform_matches)) { + return false; + } + // The movprfx's `zd` must not alias any other inputs. + if (movprfx_zd == GetRx<9, 5>()) return false; + return zd_matches; + } + switch (Mask(SVEIntMinMaxImm_UnpredicatedMask)) { + case SMAX_z_zi: + case SMIN_z_zi: + case UMAX_z_zi: + case UMIN_z_zi: + return movprfx_is_unpredicated && zd_matches; + } + switch (Mask(SVEIntMulAddPredicatedMask)) { + case MAD_z_p_zzz: + case MSB_z_p_zzz: + if (movprfx_is_predicated && !(pg_matches_low8 && vform_matches)) { + return false; + } + // The movprfx's `zd` must not alias any other inputs. + if (movprfx_zd == GetRx<9, 5>()) return false; + return zd_matches && !zd_matches_zm; + case MLA_z_p_zzz: + case MLS_z_p_zzz: + if (movprfx_is_predicated && !(pg_matches_low8 && vform_matches)) { + return false; + } + return zd_matches && !zd_matches_zm && !zd_matches_zn; + } + switch (Mask(SVEIntMulAddUnpredicatedMask)) { + case SDOT_z_zzz: + case UDOT_z_zzz: + return movprfx_is_unpredicated && zd_matches && !zd_matches_zm && + !zd_matches_zn; + } + switch (Mask(SVEIntMulImm_UnpredicatedMask)) { + case MUL_z_zi: + return movprfx_is_unpredicated && zd_matches; + } + switch (Mask(SVEIntMulVectors_PredicatedMask)) { + case MUL_z_p_zz: + case SMULH_z_p_zz: + case UMULH_z_p_zz: + if (movprfx_is_predicated && !(pg_matches_low8 && vform_matches)) { + return false; + } + // The movprfx's `zd` must not alias any other inputs. + if (movprfx_zd == GetRx<9, 5>()) return false; + return zd_matches; + } + switch (Mask(SVEIntUnaryArithmeticPredicatedMask)) { + case ABS_z_p_z: + case CLS_z_p_z: + case CLZ_z_p_z: + case CNOT_z_p_z: + case CNT_z_p_z: + case FABS_z_p_z: + case FNEG_z_p_z: + case NEG_z_p_z: + case NOT_z_p_z: + case SXTB_z_p_z: + case SXTH_z_p_z: + case SXTW_z_p_z: + case UXTB_z_p_z: + case UXTH_z_p_z: + case UXTW_z_p_z: + if (movprfx_is_predicated && !(pg_matches_low8 && vform_matches)) { + return false; + } + return zd_matches && !zd_matches_zn; + } + switch (Mask(SVEMulIndexMask)) { + case SDOT_z_zzzi_s: + case UDOT_z_zzzi_s: + // The movprfx's `zd` must not alias any other inputs. + if (movprfx_zd == GetRx<18, 16>()) return false; + return movprfx_is_unpredicated && zd_matches && !zd_matches_zn; + case SDOT_z_zzzi_d: + case UDOT_z_zzzi_d: + // The movprfx's `zd` must not alias any other inputs. + if (movprfx_zd == GetRx<19, 16>()) return false; + return movprfx_is_unpredicated && zd_matches && !zd_matches_zn; + } + switch (Mask(SVEPermuteVectorExtractMask)) { + case EXT_z_zi_des: + // The movprfx's `zd` must not alias any other inputs. + if (movprfx_zd == GetRx<9, 5>()) return false; + return movprfx_is_unpredicated && zd_matches; + } + switch (Mask(SVEReverseWithinElementsMask)) { + case RBIT_z_p_z: + case REVB_z_z: + case REVH_z_z: + case REVW_z_z: + if (movprfx_is_predicated && !(pg_matches_low8 && vform_matches)) { + return false; + } + return zd_matches && !zd_matches_zn; + } + switch (Mask(SVESaturatingIncDecVectorByElementCountMask)) { + case SQDECD_z_zs: + case SQDECH_z_zs: + case SQDECW_z_zs: + case SQINCD_z_zs: + case SQINCH_z_zs: + case SQINCW_z_zs: + case UQDECD_z_zs: + case UQDECH_z_zs: + case UQDECW_z_zs: + case UQINCD_z_zs: + case UQINCH_z_zs: + case UQINCW_z_zs: + return movprfx_is_unpredicated && zd_matches; + } + switch (Mask(SVEVectorSplice_DestructiveMask)) { + case SPLICE_z_p_zz_des: + // The movprfx's `zd` must not alias any other inputs. + if (movprfx_zd == GetRx<9, 5>()) return false; + return movprfx_is_unpredicated && zd_matches; + } + return false; +} // NOLINT(readability/fn_size) + +bool Instruction::IsLoad() const { + if (Mask(LoadStoreAnyFMask) != LoadStoreAnyFixed) { + return false; + } + + if (Mask(LoadStorePairAnyFMask) == LoadStorePairAnyFixed) { + return Mask(LoadStorePairLBit) != 0; + } else { + LoadStoreOp op = static_cast(Mask(LoadStoreMask)); + switch (op) { + case LDRB_w: + case LDRH_w: + case LDR_w: + case LDR_x: + case LDRSB_w: + case LDRSB_x: + case LDRSH_w: + case LDRSH_x: + case LDRSW_x: + case LDR_b: + case LDR_h: + case LDR_s: + case LDR_d: + case LDR_q: + return true; + default: + return false; + } + } +} + + +bool Instruction::IsStore() const { + if (Mask(LoadStoreAnyFMask) != LoadStoreAnyFixed) { + return false; + } + + if (Mask(LoadStorePairAnyFMask) == LoadStorePairAnyFixed) { + return Mask(LoadStorePairLBit) == 0; + } else { + LoadStoreOp op = static_cast(Mask(LoadStoreMask)); + switch (op) { + case STRB_w: + case STRH_w: + case STR_w: + case STR_x: + case STR_b: + case STR_h: + case STR_s: + case STR_d: + case STR_q: + return true; + default: + return false; + } + } +} + + +std::pair Instruction::GetSVEPermuteIndexAndLaneSizeLog2() const { + uint32_t imm_2 = ExtractBits<0x00C00000>(); + uint32_t tsz_5 = ExtractBits<0x001F0000>(); + uint32_t imm_7 = (imm_2 << 5) | tsz_5; + int lane_size_in_byte_log_2 = min(CountTrailingZeros(tsz_5), 5); + int index = ExtractUnsignedBitfield32(6, lane_size_in_byte_log_2 + 1, imm_7); + return std::make_pair(index, lane_size_in_byte_log_2); +} + + +// Logical immediates can't encode zero, so a return value of zero is used to +// indicate a failure case. Specifically, where the constraints on imm_s are +// not met. +uint64_t Instruction::GetImmLogical() const { + unsigned reg_size = GetSixtyFourBits() ? kXRegSize : kWRegSize; + int32_t n = GetBitN(); + int32_t imm_s = GetImmSetBits(); + int32_t imm_r = GetImmRotate(); + return DecodeImmBitMask(n, imm_s, imm_r, reg_size); +} + +// Logical immediates can't encode zero, so a return value of zero is used to +// indicate a failure case. Specifically, where the constraints on imm_s are +// not met. +uint64_t Instruction::GetSVEImmLogical() const { + int n = GetSVEBitN(); + int imm_s = GetSVEImmSetBits(); + int imm_r = GetSVEImmRotate(); + int lane_size_in_bytes_log2 = GetSVEBitwiseImmLaneSizeInBytesLog2(); + switch (lane_size_in_bytes_log2) { + case kDRegSizeInBytesLog2: + case kSRegSizeInBytesLog2: + case kHRegSizeInBytesLog2: + case kBRegSizeInBytesLog2: { + int lane_size_in_bits = 1 << (lane_size_in_bytes_log2 + 3); + return DecodeImmBitMask(n, imm_s, imm_r, lane_size_in_bits); + } + default: + return 0; + } +} + +std::pair Instruction::GetSVEImmShiftAndLaneSizeLog2( + bool is_predicated) const { + Instr tsize = + is_predicated ? ExtractBits<0x00C00300>() : ExtractBits<0x00D80000>(); + Instr imm_3 = + is_predicated ? ExtractBits<0x000000E0>() : ExtractBits<0x00070000>(); + if (tsize == 0) { + // The bit field `tsize` means undefined if it is zero, so return a + // convenience value kWMinInt to indicate a failure case. + return std::make_pair(kWMinInt, kWMinInt); + } + + int lane_size_in_bytes_log_2 = 32 - CountLeadingZeros(tsize, 32) - 1; + int esize = (1 << lane_size_in_bytes_log_2) * kBitsPerByte; + int shift = (2 * esize) - ((tsize << 3) | imm_3); + return std::make_pair(shift, lane_size_in_bytes_log_2); +} + +int Instruction::GetSVEMsizeFromDtype(bool is_signed, int dtype_h_lsb) const { + Instr dtype_h = ExtractBits(dtype_h_lsb + 1, dtype_h_lsb); + if (is_signed) { + dtype_h = dtype_h ^ 0x3; + } + return dtype_h; +} + +int Instruction::GetSVEEsizeFromDtype(bool is_signed, int dtype_l_lsb) const { + Instr dtype_l = ExtractBits(dtype_l_lsb + 1, dtype_l_lsb); + if (is_signed) { + dtype_l = dtype_l ^ 0x3; + } + return dtype_l; +} + +int Instruction::GetSVEBitwiseImmLaneSizeInBytesLog2() const { + int n = GetSVEBitN(); + int imm_s = GetSVEImmSetBits(); + unsigned type_bitset = + (n << SVEImmSetBits_width) | (~imm_s & GetUintMask(SVEImmSetBits_width)); + + // An lane size is constructed from the n and imm_s bits according to + // the following table: + // + // N imms size + // 0 0xxxxx 32 + // 0 10xxxx 16 + // 0 110xxx 8 + // 0 1110xx 8 + // 0 11110x 8 + // 1 xxxxxx 64 + + if (type_bitset == 0) { + // Bail out early since `HighestSetBitPosition` doesn't accept zero + // value input. + return -1; + } + + switch (HighestSetBitPosition(type_bitset)) { + case 6: + return kDRegSizeInBytesLog2; + case 5: + return kSRegSizeInBytesLog2; + case 4: + return kHRegSizeInBytesLog2; + case 3: + case 2: + case 1: + return kBRegSizeInBytesLog2; + default: + // RESERVED encoding. + return -1; + } +} + +uint64_t Instruction::DecodeImmBitMask(int32_t n, + int32_t imm_s, + int32_t imm_r, + int32_t size) const { + // An integer is constructed from the n, imm_s and imm_r bits according to + // the following table: + // + // N imms immr size S R + // 1 ssssss rrrrrr 64 UInt(ssssss) UInt(rrrrrr) + // 0 0sssss xrrrrr 32 UInt(sssss) UInt(rrrrr) + // 0 10ssss xxrrrr 16 UInt(ssss) UInt(rrrr) + // 0 110sss xxxrrr 8 UInt(sss) UInt(rrr) + // 0 1110ss xxxxrr 4 UInt(ss) UInt(rr) + // 0 11110s xxxxxr 2 UInt(s) UInt(r) + // (s bits must not be all set) + // + // A pattern is constructed of size bits, where the least significant S+1 + // bits are set. The pattern is rotated right by R, and repeated across a + // 32 or 64-bit value, depending on destination register width. + // + + if (n == 1) { + if (imm_s == 0x3f) { + return 0; + } + uint64_t bits = (UINT64_C(1) << (imm_s + 1)) - 1; + return RotateRight(bits, imm_r, 64); + } else { + if ((imm_s >> 1) == 0x1f) { + return 0; + } + for (int width = 0x20; width >= 0x2; width >>= 1) { + if ((imm_s & width) == 0) { + int mask = width - 1; + if ((imm_s & mask) == mask) { + return 0; + } + uint64_t bits = (UINT64_C(1) << ((imm_s & mask) + 1)) - 1; + return RepeatBitsAcrossReg(size, + RotateRight(bits, imm_r & mask, width), + width); + } + } + } + VIXL_UNREACHABLE(); + return 0; +} + + +uint32_t Instruction::GetImmNEONabcdefgh() const { + return GetImmNEONabc() << 5 | GetImmNEONdefgh(); +} + + +Float16 Instruction::Imm8ToFloat16(uint32_t imm8) { + // Imm8: abcdefgh (8 bits) + // Half: aBbb.cdef.gh00.0000 (16 bits) + // where B is b ^ 1 + uint32_t bits = imm8; + uint16_t bit7 = (bits >> 7) & 0x1; + uint16_t bit6 = (bits >> 6) & 0x1; + uint16_t bit5_to_0 = bits & 0x3f; + uint16_t result = (bit7 << 15) | ((4 - bit6) << 12) | (bit5_to_0 << 6); + return RawbitsToFloat16(result); +} + + +float Instruction::Imm8ToFP32(uint32_t imm8) { + // Imm8: abcdefgh (8 bits) + // Single: aBbb.bbbc.defg.h000.0000.0000.0000.0000 (32 bits) + // where B is b ^ 1 + uint32_t bits = imm8; + uint32_t bit7 = (bits >> 7) & 0x1; + uint32_t bit6 = (bits >> 6) & 0x1; + uint32_t bit5_to_0 = bits & 0x3f; + uint32_t result = (bit7 << 31) | ((32 - bit6) << 25) | (bit5_to_0 << 19); + + return RawbitsToFloat(result); +} + + +Float16 Instruction::GetImmFP16() const { return Imm8ToFloat16(GetImmFP()); } + + +float Instruction::GetImmFP32() const { return Imm8ToFP32(GetImmFP()); } + + +double Instruction::Imm8ToFP64(uint32_t imm8) { + // Imm8: abcdefgh (8 bits) + // Double: aBbb.bbbb.bbcd.efgh.0000.0000.0000.0000 + // 0000.0000.0000.0000.0000.0000.0000.0000 (64 bits) + // where B is b ^ 1 + uint32_t bits = imm8; + uint64_t bit7 = (bits >> 7) & 0x1; + uint64_t bit6 = (bits >> 6) & 0x1; + uint64_t bit5_to_0 = bits & 0x3f; + uint64_t result = (bit7 << 63) | ((256 - bit6) << 54) | (bit5_to_0 << 48); + + return RawbitsToDouble(result); +} + + +double Instruction::GetImmFP64() const { return Imm8ToFP64(GetImmFP()); } + + +Float16 Instruction::GetImmNEONFP16() const { + return Imm8ToFloat16(GetImmNEONabcdefgh()); +} + + +float Instruction::GetImmNEONFP32() const { + return Imm8ToFP32(GetImmNEONabcdefgh()); +} + + +double Instruction::GetImmNEONFP64() const { + return Imm8ToFP64(GetImmNEONabcdefgh()); +} + + +unsigned CalcLSDataSize(LoadStoreOp op) { + VIXL_ASSERT((LSSize_offset + LSSize_width) == (kInstructionSize * 8)); + unsigned size = static_cast(op) >> LSSize_offset; + if ((op & LSVector_mask) != 0) { + // Vector register memory operations encode the access size in the "size" + // and "opc" fields. + if ((size == 0) && ((op & LSOpc_mask) >> LSOpc_offset) >= 2) { + size = kQRegSizeInBytesLog2; + } + } + return size; +} + + +unsigned CalcLSPairDataSize(LoadStorePairOp op) { + VIXL_STATIC_ASSERT(kXRegSizeInBytes == kDRegSizeInBytes); + VIXL_STATIC_ASSERT(kWRegSizeInBytes == kSRegSizeInBytes); + switch (op) { + case STP_q: + case LDP_q: + return kQRegSizeInBytesLog2; + case STP_x: + case LDP_x: + case STP_d: + case LDP_d: + return kXRegSizeInBytesLog2; + default: + return kWRegSizeInBytesLog2; + } +} + + +int Instruction::GetImmBranchRangeBitwidth(ImmBranchType branch_type) { + switch (branch_type) { + case UncondBranchType: + return ImmUncondBranch_width; + case CondBranchType: + return ImmCondBranch_width; + case CompareBranchType: + return ImmCmpBranch_width; + case TestBranchType: + return ImmTestBranch_width; + default: + VIXL_UNREACHABLE(); + return 0; + } +} + + +int32_t Instruction::GetImmBranchForwardRange(ImmBranchType branch_type) { + int32_t encoded_max = 1 << (GetImmBranchRangeBitwidth(branch_type) - 1); + return encoded_max * kInstructionSize; +} + + +bool Instruction::IsValidImmPCOffset(ImmBranchType branch_type, + int64_t offset) { + return IsIntN(GetImmBranchRangeBitwidth(branch_type), offset); +} + + +const Instruction* Instruction::GetImmPCOffsetTarget() const { + const Instruction* base = this; + ptrdiff_t offset; + if (IsPCRelAddressing()) { + // ADR and ADRP. + offset = GetImmPCRel(); + if (Mask(PCRelAddressingMask) == ADRP) { + base = AlignDown(base, kPageSize); + offset *= kPageSize; + } else { + VIXL_ASSERT(Mask(PCRelAddressingMask) == ADR); + } + } else { + // All PC-relative branches. + VIXL_ASSERT(GetBranchType() != UnknownBranchType); + // Relative branch offsets are instruction-size-aligned. + offset = GetImmBranch() * static_cast(kInstructionSize); + } + return base + offset; +} + + +int Instruction::GetImmBranch() const { + switch (GetBranchType()) { + case CondBranchType: + return GetImmCondBranch(); + case UncondBranchType: + return GetImmUncondBranch(); + case CompareBranchType: + return GetImmCmpBranch(); + case TestBranchType: + return GetImmTestBranch(); + default: + VIXL_UNREACHABLE(); + } + return 0; +} + + +void Instruction::SetImmPCOffsetTarget(const Instruction* target) { + if (IsPCRelAddressing()) { + SetPCRelImmTarget(target); + } else { + SetBranchImmTarget(target); + } +} + + +void Instruction::SetPCRelImmTarget(const Instruction* target) { + ptrdiff_t imm21; + if ((Mask(PCRelAddressingMask) == ADR)) { + imm21 = target - this; + } else { + VIXL_ASSERT(Mask(PCRelAddressingMask) == ADRP); + uintptr_t this_page = reinterpret_cast(this) / kPageSize; + uintptr_t target_page = reinterpret_cast(target) / kPageSize; + imm21 = target_page - this_page; + } + Instr imm = Assembler::ImmPCRelAddress(static_cast(imm21)); + + SetInstructionBits(Mask(~ImmPCRel_mask) | imm); +} + + +void Instruction::SetBranchImmTarget(const Instruction* target) { + VIXL_ASSERT(((target - this) & 3) == 0); + Instr branch_imm = 0; + uint32_t imm_mask = 0; + int offset = static_cast((target - this) >> kInstructionSizeLog2); + switch (GetBranchType()) { + case CondBranchType: { + branch_imm = Assembler::ImmCondBranch(offset); + imm_mask = ImmCondBranch_mask; + break; + } + case UncondBranchType: { + branch_imm = Assembler::ImmUncondBranch(offset); + imm_mask = ImmUncondBranch_mask; + break; + } + case CompareBranchType: { + branch_imm = Assembler::ImmCmpBranch(offset); + imm_mask = ImmCmpBranch_mask; + break; + } + case TestBranchType: { + branch_imm = Assembler::ImmTestBranch(offset); + imm_mask = ImmTestBranch_mask; + break; + } + default: + VIXL_UNREACHABLE(); + } + SetInstructionBits(Mask(~imm_mask) | branch_imm); +} + + +void Instruction::SetImmLLiteral(const Instruction* source) { + VIXL_ASSERT(IsWordAligned(source)); + ptrdiff_t offset = (source - this) >> kLiteralEntrySizeLog2; + Instr imm = Assembler::ImmLLiteral(static_cast(offset)); + Instr mask = ImmLLiteral_mask; + + SetInstructionBits(Mask(~mask) | imm); +} + + +VectorFormat VectorFormatHalfWidth(VectorFormat vform) { + switch (vform) { + case kFormat8H: + return kFormat8B; + case kFormat4S: + return kFormat4H; + case kFormat2D: + return kFormat2S; + case kFormatH: + return kFormatB; + case kFormatS: + return kFormatH; + case kFormatD: + return kFormatS; + case kFormatVnH: + return kFormatVnB; + case kFormatVnS: + return kFormatVnH; + case kFormatVnD: + return kFormatVnS; + break; + default: + VIXL_UNREACHABLE(); + return kFormatUndefined; + } +} + + +VectorFormat VectorFormatDoubleWidth(VectorFormat vform) { + VIXL_ASSERT(vform == kFormat8B || vform == kFormat4H || vform == kFormat2S || + vform == kFormatB || vform == kFormatH || vform == kFormatS); + switch (vform) { + case kFormat8B: + return kFormat8H; + case kFormat4H: + return kFormat4S; + case kFormat2S: + return kFormat2D; + case kFormatB: + return kFormatH; + case kFormatH: + return kFormatS; + case kFormatS: + return kFormatD; + default: + VIXL_UNREACHABLE(); + return kFormatUndefined; + } +} + + +VectorFormat VectorFormatFillQ(VectorFormat vform) { + switch (vform) { + case kFormatB: + case kFormat8B: + case kFormat16B: + return kFormat16B; + case kFormatH: + case kFormat4H: + case kFormat8H: + return kFormat8H; + case kFormatS: + case kFormat2S: + case kFormat4S: + return kFormat4S; + case kFormatD: + case kFormat1D: + case kFormat2D: + return kFormat2D; + default: + VIXL_UNREACHABLE(); + return kFormatUndefined; + } +} + +VectorFormat VectorFormatHalfWidthDoubleLanes(VectorFormat vform) { + switch (vform) { + case kFormat4H: + return kFormat8B; + case kFormat8H: + return kFormat16B; + case kFormat2S: + return kFormat4H; + case kFormat4S: + return kFormat8H; + case kFormat1D: + return kFormat2S; + case kFormat2D: + return kFormat4S; + case kFormatVnH: + return kFormatVnB; + case kFormatVnS: + return kFormatVnH; + case kFormatVnD: + return kFormatVnS; + default: + VIXL_UNREACHABLE(); + return kFormatUndefined; + } +} + +VectorFormat VectorFormatDoubleLanes(VectorFormat vform) { + VIXL_ASSERT(vform == kFormat8B || vform == kFormat4H || vform == kFormat2S); + switch (vform) { + case kFormat8B: + return kFormat16B; + case kFormat4H: + return kFormat8H; + case kFormat2S: + return kFormat4S; + default: + VIXL_UNREACHABLE(); + return kFormatUndefined; + } +} + + +VectorFormat VectorFormatHalfLanes(VectorFormat vform) { + VIXL_ASSERT(vform == kFormat16B || vform == kFormat8H || vform == kFormat4S); + switch (vform) { + case kFormat16B: + return kFormat8B; + case kFormat8H: + return kFormat4H; + case kFormat4S: + return kFormat2S; + default: + VIXL_UNREACHABLE(); + return kFormatUndefined; + } +} + + +VectorFormat ScalarFormatFromLaneSize(int lane_size_in_bits) { + switch (lane_size_in_bits) { + case 8: + return kFormatB; + case 16: + return kFormatH; + case 32: + return kFormatS; + case 64: + return kFormatD; + default: + VIXL_UNREACHABLE(); + return kFormatUndefined; + } +} + + +bool IsSVEFormat(VectorFormat vform) { + switch (vform) { + case kFormatVnB: + case kFormatVnH: + case kFormatVnS: + case kFormatVnD: + case kFormatVnQ: + return true; + default: + return false; + } +} + + +VectorFormat SVEFormatFromLaneSizeInBytes(int lane_size_in_bytes) { + switch (lane_size_in_bytes) { + case 1: + return kFormatVnB; + case 2: + return kFormatVnH; + case 4: + return kFormatVnS; + case 8: + return kFormatVnD; + case 16: + return kFormatVnQ; + default: + VIXL_UNREACHABLE(); + return kFormatUndefined; + } +} + + +VectorFormat SVEFormatFromLaneSizeInBits(int lane_size_in_bits) { + switch (lane_size_in_bits) { + case 8: + case 16: + case 32: + case 64: + case 128: + return SVEFormatFromLaneSizeInBytes(lane_size_in_bits / kBitsPerByte); + default: + VIXL_UNREACHABLE(); + return kFormatUndefined; + } +} + + +VectorFormat SVEFormatFromLaneSizeInBytesLog2(int lane_size_in_bytes_log2) { + switch (lane_size_in_bytes_log2) { + case 0: + case 1: + case 2: + case 3: + case 4: + return SVEFormatFromLaneSizeInBytes(1 << lane_size_in_bytes_log2); + default: + VIXL_UNREACHABLE(); + return kFormatUndefined; + } +} + + +VectorFormat ScalarFormatFromFormat(VectorFormat vform) { + return ScalarFormatFromLaneSize(LaneSizeInBitsFromFormat(vform)); +} + + +unsigned RegisterSizeInBitsFromFormat(VectorFormat vform) { + VIXL_ASSERT(vform != kFormatUndefined); + VIXL_ASSERT(!IsSVEFormat(vform)); + switch (vform) { + case kFormatB: + return kBRegSize; + case kFormatH: + return kHRegSize; + case kFormatS: + case kFormat2H: + return kSRegSize; + case kFormatD: + case kFormat8B: + case kFormat4H: + case kFormat2S: + case kFormat1D: + return kDRegSize; + case kFormat16B: + case kFormat8H: + case kFormat4S: + case kFormat2D: + return kQRegSize; + default: + VIXL_UNREACHABLE(); + return 0; + } +} + + +unsigned RegisterSizeInBytesFromFormat(VectorFormat vform) { + return RegisterSizeInBitsFromFormat(vform) / 8; +} + + +unsigned LaneSizeInBitsFromFormat(VectorFormat vform) { + VIXL_ASSERT(vform != kFormatUndefined); + switch (vform) { + case kFormatB: + case kFormat8B: + case kFormat16B: + case kFormatVnB: + return 8; + case kFormatH: + case kFormat2H: + case kFormat4H: + case kFormat8H: + case kFormatVnH: + return 16; + case kFormatS: + case kFormat2S: + case kFormat4S: + case kFormatVnS: + return 32; + case kFormatD: + case kFormat1D: + case kFormat2D: + case kFormatVnD: + return 64; + case kFormatVnQ: + return 128; + default: + VIXL_UNREACHABLE(); + return 0; + } +} + + +int LaneSizeInBytesFromFormat(VectorFormat vform) { + return LaneSizeInBitsFromFormat(vform) / 8; +} + + +int LaneSizeInBytesLog2FromFormat(VectorFormat vform) { + VIXL_ASSERT(vform != kFormatUndefined); + switch (vform) { + case kFormatB: + case kFormat8B: + case kFormat16B: + case kFormatVnB: + return 0; + case kFormatH: + case kFormat2H: + case kFormat4H: + case kFormat8H: + case kFormatVnH: + return 1; + case kFormatS: + case kFormat2S: + case kFormat4S: + case kFormatVnS: + return 2; + case kFormatD: + case kFormat1D: + case kFormat2D: + case kFormatVnD: + return 3; + case kFormatVnQ: + return 4; + default: + VIXL_UNREACHABLE(); + return 0; + } +} + + +int LaneCountFromFormat(VectorFormat vform) { + VIXL_ASSERT(vform != kFormatUndefined); + switch (vform) { + case kFormat16B: + return 16; + case kFormat8B: + case kFormat8H: + return 8; + case kFormat4H: + case kFormat4S: + return 4; + case kFormat2H: + case kFormat2S: + case kFormat2D: + return 2; + case kFormat1D: + case kFormatB: + case kFormatH: + case kFormatS: + case kFormatD: + return 1; + default: + VIXL_UNREACHABLE(); + return 0; + } +} + + +int MaxLaneCountFromFormat(VectorFormat vform) { + VIXL_ASSERT(vform != kFormatUndefined); + switch (vform) { + case kFormatB: + case kFormat8B: + case kFormat16B: + return 16; + case kFormatH: + case kFormat4H: + case kFormat8H: + return 8; + case kFormatS: + case kFormat2S: + case kFormat4S: + return 4; + case kFormatD: + case kFormat1D: + case kFormat2D: + return 2; + default: + VIXL_UNREACHABLE(); + return 0; + } +} + + +// Does 'vform' indicate a vector format or a scalar format? +bool IsVectorFormat(VectorFormat vform) { + VIXL_ASSERT(vform != kFormatUndefined); + switch (vform) { + case kFormatB: + case kFormatH: + case kFormatS: + case kFormatD: + return false; + default: + return true; + } +} + + +int64_t MaxIntFromFormat(VectorFormat vform) { + int lane_size = LaneSizeInBitsFromFormat(vform); + return static_cast(GetUintMask(lane_size) >> 1); +} + + +int64_t MinIntFromFormat(VectorFormat vform) { + return -MaxIntFromFormat(vform) - 1; +} + + +uint64_t MaxUintFromFormat(VectorFormat vform) { + return GetUintMask(LaneSizeInBitsFromFormat(vform)); +} + +} // namespace aarch64 +} // namespace vixl diff --git a/src/coreclr/jit/vixl/aarch64/instructions-aarch64.h b/src/coreclr/jit/vixl/aarch64/instructions-aarch64.h new file mode 100644 index 00000000000000..202f08ec1a15d3 --- /dev/null +++ b/src/coreclr/jit/vixl/aarch64/instructions-aarch64.h @@ -0,0 +1,1015 @@ +// Copyright 2015, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef VIXL_AARCH64_INSTRUCTIONS_AARCH64_H_ +#define VIXL_AARCH64_INSTRUCTIONS_AARCH64_H_ + +#include "../globals-vixl.h" +#include "../utils-vixl.h" + +#include "constants-aarch64.h" + +namespace vixl { +namespace aarch64 { +// ISA constants. -------------------------------------------------------------- + +typedef uint32_t Instr; +const unsigned kInstructionSize = 4; +const unsigned kInstructionSizeLog2 = 2; +const unsigned kLiteralEntrySize = 4; +const unsigned kLiteralEntrySizeLog2 = 2; +const unsigned kMaxLoadLiteralRange = 1 * MBytes; + +// This is the nominal page size (as used by the adrp instruction); the actual +// size of the memory pages allocated by the kernel is likely to differ. +const unsigned kPageSize = 4 * KBytes; +const unsigned kPageSizeLog2 = 12; + +const unsigned kBRegSize = 8; +const unsigned kBRegSizeLog2 = 3; +const unsigned kBRegSizeInBytes = kBRegSize / 8; +const unsigned kBRegSizeInBytesLog2 = kBRegSizeLog2 - 3; +const unsigned kHRegSize = 16; +const unsigned kHRegSizeLog2 = 4; +const unsigned kHRegSizeInBytes = kHRegSize / 8; +const unsigned kHRegSizeInBytesLog2 = kHRegSizeLog2 - 3; +const unsigned kWRegSize = 32; +const unsigned kWRegSizeLog2 = 5; +const unsigned kWRegSizeInBytes = kWRegSize / 8; +const unsigned kWRegSizeInBytesLog2 = kWRegSizeLog2 - 3; +const unsigned kXRegSize = 64; +const unsigned kXRegSizeLog2 = 6; +const unsigned kXRegSizeInBytes = kXRegSize / 8; +const unsigned kXRegSizeInBytesLog2 = kXRegSizeLog2 - 3; +const unsigned kSRegSize = 32; +const unsigned kSRegSizeLog2 = 5; +const unsigned kSRegSizeInBytes = kSRegSize / 8; +const unsigned kSRegSizeInBytesLog2 = kSRegSizeLog2 - 3; +const unsigned kDRegSize = 64; +const unsigned kDRegSizeLog2 = 6; +const unsigned kDRegSizeInBytes = kDRegSize / 8; +const unsigned kDRegSizeInBytesLog2 = kDRegSizeLog2 - 3; +const unsigned kQRegSize = 128; +const unsigned kQRegSizeLog2 = 7; +const unsigned kQRegSizeInBytes = kQRegSize / 8; +const unsigned kQRegSizeInBytesLog2 = kQRegSizeLog2 - 3; +const uint64_t kWRegMask = UINT64_C(0xffffffff); +const uint64_t kXRegMask = UINT64_C(0xffffffffffffffff); +const uint64_t kHRegMask = UINT64_C(0xffff); +const uint64_t kSRegMask = UINT64_C(0xffffffff); +const uint64_t kDRegMask = UINT64_C(0xffffffffffffffff); +const uint64_t kHSignMask = UINT64_C(0x8000); +const uint64_t kSSignMask = UINT64_C(0x80000000); +const uint64_t kDSignMask = UINT64_C(0x8000000000000000); +const uint64_t kWSignMask = UINT64_C(0x80000000); +const uint64_t kXSignMask = UINT64_C(0x8000000000000000); +const uint64_t kByteMask = UINT64_C(0xff); +const uint64_t kHalfWordMask = UINT64_C(0xffff); +const uint64_t kWordMask = UINT64_C(0xffffffff); +const uint64_t kXMaxUInt = UINT64_C(0xffffffffffffffff); +const uint64_t kWMaxUInt = UINT64_C(0xffffffff); +const uint64_t kHMaxUInt = UINT64_C(0xffff); +// Define k*MinInt with "-k*MaxInt - 1", because the hexadecimal representation +// (e.g. "INT32_C(0x80000000)") has implementation-defined behaviour. +const int64_t kXMaxInt = INT64_C(0x7fffffffffffffff); +const int64_t kXMinInt = -kXMaxInt - 1; +const int32_t kWMaxInt = INT32_C(0x7fffffff); +const int32_t kWMinInt = -kWMaxInt - 1; +const int16_t kHMaxInt = INT16_C(0x7fff); +const int16_t kHMinInt = -kHMaxInt - 1; +const unsigned kFpRegCode = 29; +const unsigned kLinkRegCode = 30; +const unsigned kSpRegCode = 31; +const unsigned kZeroRegCode = 31; +const unsigned kSPRegInternalCode = 63; +const unsigned kRegCodeMask = 0x1f; + +const unsigned kAtomicAccessGranule = 16; + +const unsigned kAddressTagOffset = 56; +const unsigned kAddressTagWidth = 8; +const uint64_t kAddressTagMask = ((UINT64_C(1) << kAddressTagWidth) - 1) + << kAddressTagOffset; +VIXL_STATIC_ASSERT(kAddressTagMask == UINT64_C(0xff00000000000000)); + +const uint64_t kTTBRMask = UINT64_C(1) << 55; + +// We can't define a static kZRegSize because the size depends on the +// implementation. However, it is sometimes useful to know the minimum and +// maxmimum possible sizes. +const unsigned kZRegMinSize = 128; +const unsigned kZRegMinSizeLog2 = 7; +const unsigned kZRegMinSizeInBytes = kZRegMinSize / 8; +const unsigned kZRegMinSizeInBytesLog2 = kZRegMinSizeLog2 - 3; +const unsigned kZRegMaxSize = 2048; +const unsigned kZRegMaxSizeLog2 = 11; +const unsigned kZRegMaxSizeInBytes = kZRegMaxSize / 8; +const unsigned kZRegMaxSizeInBytesLog2 = kZRegMaxSizeLog2 - 3; + +// The P register size depends on the Z register size. +const unsigned kZRegBitsPerPRegBit = kBitsPerByte; +const unsigned kZRegBitsPerPRegBitLog2 = 3; +const unsigned kPRegMinSize = kZRegMinSize / kZRegBitsPerPRegBit; +const unsigned kPRegMinSizeLog2 = kZRegMinSizeLog2 - 3; +const unsigned kPRegMinSizeInBytes = kPRegMinSize / 8; +const unsigned kPRegMinSizeInBytesLog2 = kPRegMinSizeLog2 - 3; +const unsigned kPRegMaxSize = kZRegMaxSize / kZRegBitsPerPRegBit; +const unsigned kPRegMaxSizeLog2 = kZRegMaxSizeLog2 - 3; +const unsigned kPRegMaxSizeInBytes = kPRegMaxSize / 8; +const unsigned kPRegMaxSizeInBytesLog2 = kPRegMaxSizeLog2 - 3; + +// Make these moved float constants backwards compatible +// with explicit vixl::aarch64:: namespace references. +using vixl::kDoubleMantissaBits; +using vixl::kDoubleExponentBits; +using vixl::kFloatMantissaBits; +using vixl::kFloatExponentBits; +using vixl::kFloat16MantissaBits; +using vixl::kFloat16ExponentBits; + +using vixl::kFP16PositiveInfinity; +using vixl::kFP16NegativeInfinity; +using vixl::kFP32PositiveInfinity; +using vixl::kFP32NegativeInfinity; +using vixl::kFP64PositiveInfinity; +using vixl::kFP64NegativeInfinity; + +using vixl::kFP16DefaultNaN; +using vixl::kFP32DefaultNaN; +using vixl::kFP64DefaultNaN; + +unsigned CalcLSDataSize(LoadStoreOp op); +unsigned CalcLSPairDataSize(LoadStorePairOp op); + +enum ImmBranchType { + UnknownBranchType = 0, + CondBranchType = 1, + UncondBranchType = 2, + CompareBranchType = 3, + TestBranchType = 4 +}; + +enum AddrMode { Offset, PreIndex, PostIndex }; + +enum Reg31Mode { Reg31IsStackPointer, Reg31IsZeroRegister }; + +enum VectorFormat { + kFormatUndefined = 0xffffffff, + kFormat8B = NEON_8B, + kFormat16B = NEON_16B, + kFormat4H = NEON_4H, + kFormat8H = NEON_8H, + kFormat2S = NEON_2S, + kFormat4S = NEON_4S, + kFormat1D = NEON_1D, + kFormat2D = NEON_2D, + + // Scalar formats. We add the scalar bit to distinguish between scalar and + // vector enumerations; the bit is always set in the encoding of scalar ops + // and always clear for vector ops. Although kFormatD and kFormat1D appear + // to be the same, their meaning is subtly different. The first is a scalar + // operation, the second a vector operation that only affects one lane. + kFormatB = NEON_B | NEONScalar, + kFormatH = NEON_H | NEONScalar, + kFormatS = NEON_S | NEONScalar, + kFormatD = NEON_D | NEONScalar, + + // An artificial value, used to distinguish from NEON format category. + kFormatSVE = 0x0000fffd, + // An artificial value. Q lane size isn't encoded in the usual size field. + kFormatSVEQ = 0x000f0000, + // Vector element width of SVE register with the unknown lane count since + // the vector length is implementation dependent. + kFormatVnB = SVE_B | kFormatSVE, + kFormatVnH = SVE_H | kFormatSVE, + kFormatVnS = SVE_S | kFormatSVE, + kFormatVnD = SVE_D | kFormatSVE, + kFormatVnQ = kFormatSVEQ | kFormatSVE, + + // An artificial value, used by simulator trace tests and a few oddball + // instructions (such as FMLAL). + kFormat2H = 0xfffffffe +}; + +// Instructions. --------------------------------------------------------------- + +class Instruction { + public: + Instr GetInstructionBits() const { + return *(reinterpret_cast(this)); + } + VIXL_DEPRECATED("GetInstructionBits", Instr InstructionBits() const) { + return GetInstructionBits(); + } + + void SetInstructionBits(Instr new_instr) { + *(reinterpret_cast(this)) = new_instr; + } + + int ExtractBit(int pos) const { return (GetInstructionBits() >> pos) & 1; } + VIXL_DEPRECATED("ExtractBit", int Bit(int pos) const) { + return ExtractBit(pos); + } + + uint32_t ExtractBits(int msb, int lsb) const { + return ExtractUnsignedBitfield32(msb, lsb, GetInstructionBits()); + } + VIXL_DEPRECATED("ExtractBits", uint32_t Bits(int msb, int lsb) const) { + return ExtractBits(msb, lsb); + } + + // Compress bit extraction operation from Hacker's Delight. + // https://github.com/hcs0/Hackers-Delight/blob/master/compress.c.txt + uint32_t Compress(uint32_t mask) const { + uint32_t mk, mp, mv, t; + uint32_t x = GetInstructionBits() & mask; // Clear irrelevant bits. + mk = ~mask << 1; // We will count 0's to right. + for (int i = 0; i < 5; i++) { + mp = mk ^ (mk << 1); // Parallel suffix. + mp = mp ^ (mp << 2); + mp = mp ^ (mp << 4); + mp = mp ^ (mp << 8); + mp = mp ^ (mp << 16); + mv = mp & mask; // Bits to move. + mask = (mask ^ mv) | (mv >> (1 << i)); // Compress mask. + t = x & mv; + x = (x ^ t) | (t >> (1 << i)); // Compress x. + mk = mk & ~mp; + } + return x; + } + + template + uint32_t ExtractBits() const { + return Compress(M); + } + + template + uint32_t IsMaskedValue() const { + return (Mask(M) == V) ? 1 : 0; + } + + int32_t ExtractSignedBits(int msb, int lsb) const { + int32_t bits = *(reinterpret_cast(this)); + return ExtractSignedBitfield32(msb, lsb, bits); + } + VIXL_DEPRECATED("ExtractSignedBits", + int32_t SignedBits(int msb, int lsb) const) { + return ExtractSignedBits(msb, lsb); + } + + Instr Mask(uint32_t mask) const { + VIXL_ASSERT(mask != 0); + return GetInstructionBits() & mask; + } + +#define DEFINE_GETTER(Name, HighBit, LowBit, Func) \ + int32_t Get##Name() const { return this->Func(HighBit, LowBit); } \ + VIXL_DEPRECATED("Get" #Name, int32_t Name() const) { return Get##Name(); } + INSTRUCTION_FIELDS_LIST(DEFINE_GETTER) +#undef DEFINE_GETTER + + template + int32_t GetRx() const { + // We don't have any register fields wider than five bits, so the result + // will always fit into an int32_t. + VIXL_ASSERT((msb - lsb + 1) <= 5); + return this->ExtractBits(msb, lsb); + } + + VectorFormat GetSVEVectorFormat() const { + switch (Mask(SVESizeFieldMask)) { + case SVE_B: + return kFormatVnB; + case SVE_H: + return kFormatVnH; + case SVE_S: + return kFormatVnS; + case SVE_D: + return kFormatVnD; + } + VIXL_UNREACHABLE(); + return kFormatUndefined; + } + + // ImmPCRel is a compound field (not present in INSTRUCTION_FIELDS_LIST), + // formed from ImmPCRelLo and ImmPCRelHi. + int GetImmPCRel() const { + uint32_t hi = static_cast(GetImmPCRelHi()); + uint32_t lo = GetImmPCRelLo(); + uint32_t offset = (hi << ImmPCRelLo_width) | lo; + int width = ImmPCRelLo_width + ImmPCRelHi_width; + return ExtractSignedBitfield32(width - 1, 0, offset); + } + VIXL_DEPRECATED("GetImmPCRel", int ImmPCRel() const) { return GetImmPCRel(); } + + // ImmLSPAC is a compound field (not present in INSTRUCTION_FIELDS_LIST), + // formed from ImmLSPACLo and ImmLSPACHi. + int GetImmLSPAC() const { + uint32_t hi = static_cast(GetImmLSPACHi()); + uint32_t lo = GetImmLSPACLo(); + uint32_t offset = (hi << ImmLSPACLo_width) | lo; + int width = ImmLSPACLo_width + ImmLSPACHi_width; + return ExtractSignedBitfield32(width - 1, 0, offset) << 3; + } + + uint64_t GetImmLogical() const; + VIXL_DEPRECATED("GetImmLogical", uint64_t ImmLogical() const) { + return GetImmLogical(); + } + uint64_t GetSVEImmLogical() const; + int GetSVEBitwiseImmLaneSizeInBytesLog2() const; + uint64_t DecodeImmBitMask(int32_t n, + int32_t imm_s, + int32_t imm_r, + int32_t size) const; + + std::pair GetSVEPermuteIndexAndLaneSizeLog2() const; + + std::pair GetSVEImmShiftAndLaneSizeLog2(bool is_predicated) const; + + int GetSVEMsizeFromDtype(bool is_signed, int dtype_h_lsb = 23) const; + + int GetSVEEsizeFromDtype(bool is_signed, int dtype_l_lsb = 21) const; + + unsigned GetImmNEONabcdefgh() const; + VIXL_DEPRECATED("GetImmNEONabcdefgh", unsigned ImmNEONabcdefgh() const) { + return GetImmNEONabcdefgh(); + } + + Float16 GetImmFP16() const; + + float GetImmFP32() const; + VIXL_DEPRECATED("GetImmFP32", float ImmFP32() const) { return GetImmFP32(); } + + double GetImmFP64() const; + VIXL_DEPRECATED("GetImmFP64", double ImmFP64() const) { return GetImmFP64(); } + + Float16 GetImmNEONFP16() const; + + float GetImmNEONFP32() const; + VIXL_DEPRECATED("GetImmNEONFP32", float ImmNEONFP32() const) { + return GetImmNEONFP32(); + } + + double GetImmNEONFP64() const; + VIXL_DEPRECATED("GetImmNEONFP64", double ImmNEONFP64() const) { + return GetImmNEONFP64(); + } + + Float16 GetSVEImmFP16() const { return Imm8ToFloat16(ExtractBits(12, 5)); } + + float GetSVEImmFP32() const { return Imm8ToFP32(ExtractBits(12, 5)); } + + double GetSVEImmFP64() const { return Imm8ToFP64(ExtractBits(12, 5)); } + + static Float16 Imm8ToFloat16(uint32_t imm8); + static float Imm8ToFP32(uint32_t imm8); + static double Imm8ToFP64(uint32_t imm8); + + unsigned GetSizeLS() const { + return CalcLSDataSize(static_cast(Mask(LoadStoreMask))); + } + VIXL_DEPRECATED("GetSizeLS", unsigned SizeLS() const) { return GetSizeLS(); } + + unsigned GetSizeLSPair() const { + return CalcLSPairDataSize( + static_cast(Mask(LoadStorePairMask))); + } + VIXL_DEPRECATED("GetSizeLSPair", unsigned SizeLSPair() const) { + return GetSizeLSPair(); + } + + int GetNEONLSIndex(int access_size_shift) const { + int64_t q = GetNEONQ(); + int64_t s = GetNEONS(); + int64_t size = GetNEONLSSize(); + int64_t index = (q << 3) | (s << 2) | size; + return static_cast(index >> access_size_shift); + } + VIXL_DEPRECATED("GetNEONLSIndex", + int NEONLSIndex(int access_size_shift) const) { + return GetNEONLSIndex(access_size_shift); + } + + // Helpers. + bool IsCondBranchImm() const { + return Mask(ConditionalBranchFMask) == ConditionalBranchFixed; + } + + bool IsUncondBranchImm() const { + return Mask(UnconditionalBranchFMask) == UnconditionalBranchFixed; + } + + bool IsCompareBranch() const { + return Mask(CompareBranchFMask) == CompareBranchFixed; + } + + bool IsTestBranch() const { return Mask(TestBranchFMask) == TestBranchFixed; } + + bool IsImmBranch() const { return GetBranchType() != UnknownBranchType; } + + bool IsPCRelAddressing() const { + return Mask(PCRelAddressingFMask) == PCRelAddressingFixed; + } + + bool IsLogicalImmediate() const { + return Mask(LogicalImmediateFMask) == LogicalImmediateFixed; + } + + bool IsAddSubImmediate() const { + return Mask(AddSubImmediateFMask) == AddSubImmediateFixed; + } + + bool IsAddSubExtended() const { + return Mask(AddSubExtendedFMask) == AddSubExtendedFixed; + } + + bool IsLoadOrStore() const { + return Mask(LoadStoreAnyFMask) == LoadStoreAnyFixed; + } + + // True if `this` is valid immediately after the provided movprfx instruction. + bool CanTakeSVEMovprfx(Instruction const* movprfx) const; + + bool IsLoad() const; + bool IsStore() const; + + bool IsLoadLiteral() const { + // This includes PRFM_lit. + return Mask(LoadLiteralFMask) == LoadLiteralFixed; + } + + bool IsMovn() const { + return (Mask(MoveWideImmediateMask) == MOVN_x) || + (Mask(MoveWideImmediateMask) == MOVN_w); + } + + bool IsException() const { return Mask(ExceptionFMask) == ExceptionFixed; } + + bool IsPAuth() const { return Mask(SystemPAuthFMask) == SystemPAuthFixed; } + + bool IsBti() const { + if (Mask(SystemHintFMask) == SystemHintFixed) { + int imm_hint = GetImmHint(); + switch (imm_hint) { + case BTI: + case BTI_c: + case BTI_j: + case BTI_jc: + return true; + } + } + return false; + } + + static int GetImmBranchRangeBitwidth(ImmBranchType branch_type); + VIXL_DEPRECATED( + "GetImmBranchRangeBitwidth", + static int ImmBranchRangeBitwidth(ImmBranchType branch_type)) { + return GetImmBranchRangeBitwidth(branch_type); + } + + static int32_t GetImmBranchForwardRange(ImmBranchType branch_type); + VIXL_DEPRECATED( + "GetImmBranchForwardRange", + static int32_t ImmBranchForwardRange(ImmBranchType branch_type)) { + return GetImmBranchForwardRange(branch_type); + } + + static bool IsValidImmPCOffset(ImmBranchType branch_type, int64_t offset); + + // Indicate whether Rd can be the stack pointer or the zero register. This + // does not check that the instruction actually has an Rd field. + Reg31Mode GetRdMode() const { + // The following instructions use sp or wsp as Rd: + // Add/sub (immediate) when not setting the flags. + // Add/sub (extended) when not setting the flags. + // Logical (immediate) when not setting the flags. + // Otherwise, r31 is the zero register. + if (IsAddSubImmediate() || IsAddSubExtended()) { + if (Mask(AddSubSetFlagsBit)) { + return Reg31IsZeroRegister; + } else { + return Reg31IsStackPointer; + } + } + if (IsLogicalImmediate()) { + // Of the logical (immediate) instructions, only ANDS (and its aliases) + // can set the flags. The others can all write into sp. + // Note that some logical operations are not available to + // immediate-operand instructions, so we have to combine two masks here. + if (Mask(LogicalImmediateMask & LogicalOpMask) == ANDS) { + return Reg31IsZeroRegister; + } else { + return Reg31IsStackPointer; + } + } + return Reg31IsZeroRegister; + } + VIXL_DEPRECATED("GetRdMode", Reg31Mode RdMode() const) { return GetRdMode(); } + + // Indicate whether Rn can be the stack pointer or the zero register. This + // does not check that the instruction actually has an Rn field. + Reg31Mode GetRnMode() const { + // The following instructions use sp or wsp as Rn: + // All loads and stores. + // Add/sub (immediate). + // Add/sub (extended). + // Otherwise, r31 is the zero register. + if (IsLoadOrStore() || IsAddSubImmediate() || IsAddSubExtended()) { + return Reg31IsStackPointer; + } + return Reg31IsZeroRegister; + } + VIXL_DEPRECATED("GetRnMode", Reg31Mode RnMode() const) { return GetRnMode(); } + + ImmBranchType GetBranchType() const { + if (IsCondBranchImm()) { + return CondBranchType; + } else if (IsUncondBranchImm()) { + return UncondBranchType; + } else if (IsCompareBranch()) { + return CompareBranchType; + } else if (IsTestBranch()) { + return TestBranchType; + } else { + return UnknownBranchType; + } + } + VIXL_DEPRECATED("GetBranchType", ImmBranchType BranchType() const) { + return GetBranchType(); + } + + // Find the target of this instruction. 'this' may be a branch or a + // PC-relative addressing instruction. + const Instruction* GetImmPCOffsetTarget() const; + VIXL_DEPRECATED("GetImmPCOffsetTarget", + const Instruction* ImmPCOffsetTarget() const) { + return GetImmPCOffsetTarget(); + } + + // Patch a PC-relative offset to refer to 'target'. 'this' may be a branch or + // a PC-relative addressing instruction. + void SetImmPCOffsetTarget(const Instruction* target); + // Patch a literal load instruction to load from 'source'. + void SetImmLLiteral(const Instruction* source); + + // The range of a load literal instruction, expressed as 'instr +- range'. + // The range is actually the 'positive' range; the branch instruction can + // target [instr - range - kInstructionSize, instr + range]. + static const int kLoadLiteralImmBitwidth = 19; + static const int kLoadLiteralRange = + (1 << kLoadLiteralImmBitwidth) / 2 - kInstructionSize; + + // Calculate the address of a literal referred to by a load-literal + // instruction, and return it as the specified type. + // + // The literal itself is safely mutable only if the backing buffer is safely + // mutable. + template + T GetLiteralAddress() const { + uint64_t base_raw = reinterpret_cast(this); + int64_t offset = GetImmLLiteral() * static_cast(kLiteralEntrySize); + uint64_t address_raw = base_raw + offset; + + // Cast the address using a C-style cast. A reinterpret_cast would be + // appropriate, but it can't cast one integral type to another. + T address = (T)(address_raw); + + // Assert that the address can be represented by the specified type. + VIXL_ASSERT((uint64_t)(address) == address_raw); + + return address; + } + template + VIXL_DEPRECATED("GetLiteralAddress", T LiteralAddress() const) { + return GetLiteralAddress(); + } + + uint32_t GetLiteral32() const { + uint32_t literal; + memcpy(&literal, GetLiteralAddress(), sizeof(literal)); + return literal; + } + VIXL_DEPRECATED("GetLiteral32", uint32_t Literal32() const) { + return GetLiteral32(); + } + + uint64_t GetLiteral64() const { + uint64_t literal; + memcpy(&literal, GetLiteralAddress(), sizeof(literal)); + return literal; + } + VIXL_DEPRECATED("GetLiteral64", uint64_t Literal64() const) { + return GetLiteral64(); + } + + float GetLiteralFP32() const { return RawbitsToFloat(GetLiteral32()); } + VIXL_DEPRECATED("GetLiteralFP32", float LiteralFP32() const) { + return GetLiteralFP32(); + } + + double GetLiteralFP64() const { return RawbitsToDouble(GetLiteral64()); } + VIXL_DEPRECATED("GetLiteralFP64", double LiteralFP64() const) { + return GetLiteralFP64(); + } + + Instruction* GetNextInstruction() { return this + kInstructionSize; } + const Instruction* GetNextInstruction() const { + return this + kInstructionSize; + } + VIXL_DEPRECATED("GetNextInstruction", + const Instruction* NextInstruction() const) { + return GetNextInstruction(); + } + + const Instruction* GetInstructionAtOffset(int64_t offset) const { + VIXL_ASSERT(IsWordAligned(this + offset)); + return this + offset; + } + VIXL_DEPRECATED("GetInstructionAtOffset", + const Instruction* InstructionAtOffset(int64_t offset) + const) { + return GetInstructionAtOffset(offset); + } + + template + static Instruction* Cast(T src) { + return reinterpret_cast(src); + } + + template + static const Instruction* CastConst(T src) { + return reinterpret_cast(src); + } + + private: + int GetImmBranch() const; + + void SetPCRelImmTarget(const Instruction* target); + void SetBranchImmTarget(const Instruction* target); +}; + + +// Functions for handling NEON and SVE vector format information. + +const int kMaxLanesPerVector = 16; + +VectorFormat VectorFormatHalfWidth(VectorFormat vform); +VectorFormat VectorFormatDoubleWidth(VectorFormat vform); +VectorFormat VectorFormatDoubleLanes(VectorFormat vform); +VectorFormat VectorFormatHalfLanes(VectorFormat vform); +VectorFormat ScalarFormatFromLaneSize(int lane_size_in_bits); +VectorFormat VectorFormatHalfWidthDoubleLanes(VectorFormat vform); +VectorFormat VectorFormatFillQ(VectorFormat vform); +VectorFormat ScalarFormatFromFormat(VectorFormat vform); +VectorFormat SVEFormatFromLaneSizeInBits(int lane_size_in_bits); +VectorFormat SVEFormatFromLaneSizeInBytes(int lane_size_in_bytes); +VectorFormat SVEFormatFromLaneSizeInBytesLog2(int lane_size_in_bytes_log_2); +unsigned RegisterSizeInBitsFromFormat(VectorFormat vform); +unsigned RegisterSizeInBytesFromFormat(VectorFormat vform); +bool IsSVEFormat(VectorFormat vform); +// TODO: Make the return types of these functions consistent. +unsigned LaneSizeInBitsFromFormat(VectorFormat vform); +int LaneSizeInBytesFromFormat(VectorFormat vform); +int LaneSizeInBytesLog2FromFormat(VectorFormat vform); +int LaneCountFromFormat(VectorFormat vform); +int MaxLaneCountFromFormat(VectorFormat vform); +bool IsVectorFormat(VectorFormat vform); +int64_t MaxIntFromFormat(VectorFormat vform); +int64_t MinIntFromFormat(VectorFormat vform); +uint64_t MaxUintFromFormat(VectorFormat vform); + + +// clang-format off +enum NEONFormat { + NF_UNDEF = 0, + NF_8B = 1, + NF_16B = 2, + NF_4H = 3, + NF_8H = 4, + NF_2S = 5, + NF_4S = 6, + NF_1D = 7, + NF_2D = 8, + NF_B = 9, + NF_H = 10, + NF_S = 11, + NF_D = 12 +}; +// clang-format on + +static const unsigned kNEONFormatMaxBits = 6; + +struct NEONFormatMap { + // The bit positions in the instruction to consider. + uint8_t bits[kNEONFormatMaxBits]; + + // Mapping from concatenated bits to format. + NEONFormat map[1 << kNEONFormatMaxBits]; +}; + +class NEONFormatDecoder { + public: + enum SubstitutionMode { kPlaceholder, kFormat }; + + // Construct a format decoder with increasingly specific format maps for each + // subsitution. If no format map is specified, the default is the integer + // format map. + explicit NEONFormatDecoder(const Instruction* instr) { + instrbits_ = instr->GetInstructionBits(); + SetFormatMaps(IntegerFormatMap()); + } + NEONFormatDecoder(const Instruction* instr, const NEONFormatMap* format) { + instrbits_ = instr->GetInstructionBits(); + SetFormatMaps(format); + } + NEONFormatDecoder(const Instruction* instr, + const NEONFormatMap* format0, + const NEONFormatMap* format1) { + instrbits_ = instr->GetInstructionBits(); + SetFormatMaps(format0, format1); + } + NEONFormatDecoder(const Instruction* instr, + const NEONFormatMap* format0, + const NEONFormatMap* format1, + const NEONFormatMap* format2) { + instrbits_ = instr->GetInstructionBits(); + SetFormatMaps(format0, format1, format2); + } + + // Set the format mapping for all or individual substitutions. + void SetFormatMaps(const NEONFormatMap* format0, + const NEONFormatMap* format1 = NULL, + const NEONFormatMap* format2 = NULL) { + VIXL_ASSERT(format0 != NULL); + formats_[0] = format0; + formats_[1] = (format1 == NULL) ? formats_[0] : format1; + formats_[2] = (format2 == NULL) ? formats_[1] : format2; + } + void SetFormatMap(unsigned index, const NEONFormatMap* format) { + VIXL_ASSERT(index <= ArrayLength(formats_)); + VIXL_ASSERT(format != NULL); + formats_[index] = format; + } + + // Substitute %s in the input string with the placeholder string for each + // register, ie. "'B", "'H", etc. + const char* SubstitutePlaceholders(const char* string) { + return Substitute(string, kPlaceholder, kPlaceholder, kPlaceholder); + } + + // Substitute %s in the input string with a new string based on the + // substitution mode. + const char* Substitute(const char* string, + SubstitutionMode mode0 = kFormat, + SubstitutionMode mode1 = kFormat, + SubstitutionMode mode2 = kFormat) { + _snprintf_s(form_buffer_, + sizeof(form_buffer_), -1, + string, + GetSubstitute(0, mode0), + GetSubstitute(1, mode1), + GetSubstitute(2, mode2)); + return form_buffer_; + } + + // Append a "2" to a mnemonic string based of the state of the Q bit. + const char* Mnemonic(const char* mnemonic) { + if ((instrbits_ & NEON_Q) != 0) { + _snprintf_s(mne_buffer_, sizeof(mne_buffer_), -1, "%s2", mnemonic); + return mne_buffer_; + } + return mnemonic; + } + + VectorFormat GetVectorFormat(int format_index = 0) { + return GetVectorFormat(formats_[format_index]); + } + + VectorFormat GetVectorFormat(const NEONFormatMap* format_map) { + static const VectorFormat vform[] = {kFormatUndefined, + kFormat8B, + kFormat16B, + kFormat4H, + kFormat8H, + kFormat2S, + kFormat4S, + kFormat1D, + kFormat2D, + kFormatB, + kFormatH, + kFormatS, + kFormatD}; + VIXL_ASSERT(GetNEONFormat(format_map) < ArrayLength(vform)); + return vform[GetNEONFormat(format_map)]; + } + + // Built in mappings for common cases. + + // The integer format map uses three bits (Q, size<1:0>) to encode the + // "standard" set of NEON integer vector formats. + static const NEONFormatMap* IntegerFormatMap() { + static const NEONFormatMap map = + {{23, 22, 30}, + {NF_8B, NF_16B, NF_4H, NF_8H, NF_2S, NF_4S, NF_UNDEF, NF_2D}}; + return ↦ + } + + // The long integer format map uses two bits (size<1:0>) to encode the + // long set of NEON integer vector formats. These are used in narrow, wide + // and long operations. + static const NEONFormatMap* LongIntegerFormatMap() { + static const NEONFormatMap map = {{23, 22}, {NF_8H, NF_4S, NF_2D}}; + return ↦ + } + + // The FP format map uses two bits (Q, size<0>) to encode the NEON FP vector + // formats: NF_2S, NF_4S, NF_2D. + static const NEONFormatMap* FPFormatMap() { + // The FP format map assumes two bits (Q, size<0>) are used to encode the + // NEON FP vector formats: NF_2S, NF_4S, NF_2D. + static const NEONFormatMap map = {{22, 30}, + {NF_2S, NF_4S, NF_UNDEF, NF_2D}}; + return ↦ + } + + // The FP16 format map uses one bit (Q) to encode the NEON vector format: + // NF_4H, NF_8H. + static const NEONFormatMap* FP16FormatMap() { + static const NEONFormatMap map = {{30}, {NF_4H, NF_8H}}; + return ↦ + } + + // The load/store format map uses three bits (Q, 11, 10) to encode the + // set of NEON vector formats. + static const NEONFormatMap* LoadStoreFormatMap() { + static const NEONFormatMap map = + {{11, 10, 30}, + {NF_8B, NF_16B, NF_4H, NF_8H, NF_2S, NF_4S, NF_1D, NF_2D}}; + return ↦ + } + + // The logical format map uses one bit (Q) to encode the NEON vector format: + // NF_8B, NF_16B. + static const NEONFormatMap* LogicalFormatMap() { + static const NEONFormatMap map = {{30}, {NF_8B, NF_16B}}; + return ↦ + } + + // The triangular format map uses between two and five bits to encode the NEON + // vector format: + // xxx10->8B, xxx11->16B, xx100->4H, xx101->8H + // x1000->2S, x1001->4S, 10001->2D, all others undefined. + static const NEONFormatMap* TriangularFormatMap() { + static const NEONFormatMap map = + {{19, 18, 17, 16, 30}, + {NF_UNDEF, NF_UNDEF, NF_8B, NF_16B, NF_4H, NF_8H, NF_8B, NF_16B, + NF_2S, NF_4S, NF_8B, NF_16B, NF_4H, NF_8H, NF_8B, NF_16B, + NF_UNDEF, NF_2D, NF_8B, NF_16B, NF_4H, NF_8H, NF_8B, NF_16B, + NF_2S, NF_4S, NF_8B, NF_16B, NF_4H, NF_8H, NF_8B, NF_16B}}; + return ↦ + } + + // The scalar format map uses two bits (size<1:0>) to encode the NEON scalar + // formats: NF_B, NF_H, NF_S, NF_D. + static const NEONFormatMap* ScalarFormatMap() { + static const NEONFormatMap map = {{23, 22}, {NF_B, NF_H, NF_S, NF_D}}; + return ↦ + } + + // The long scalar format map uses two bits (size<1:0>) to encode the longer + // NEON scalar formats: NF_H, NF_S, NF_D. + static const NEONFormatMap* LongScalarFormatMap() { + static const NEONFormatMap map = {{23, 22}, {NF_H, NF_S, NF_D}}; + return ↦ + } + + // The FP scalar format map assumes one bit (size<0>) is used to encode the + // NEON FP scalar formats: NF_S, NF_D. + static const NEONFormatMap* FPScalarFormatMap() { + static const NEONFormatMap map = {{22}, {NF_S, NF_D}}; + return ↦ + } + + // The FP scalar pairwise format map assumes two bits (U, size<0>) are used to + // encode the NEON FP scalar formats: NF_H, NF_S, NF_D. + static const NEONFormatMap* FPScalarPairwiseFormatMap() { + static const NEONFormatMap map = {{29, 22}, {NF_H, NF_UNDEF, NF_S, NF_D}}; + return ↦ + } + + // The triangular scalar format map uses between one and four bits to encode + // the NEON FP scalar formats: + // xxx1->B, xx10->H, x100->S, 1000->D, all others undefined. + static const NEONFormatMap* TriangularScalarFormatMap() { + static const NEONFormatMap map = {{19, 18, 17, 16}, + {NF_UNDEF, + NF_B, + NF_H, + NF_B, + NF_S, + NF_B, + NF_H, + NF_B, + NF_D, + NF_B, + NF_H, + NF_B, + NF_S, + NF_B, + NF_H, + NF_B}}; + return ↦ + } + + private: + // Get a pointer to a string that represents the format or placeholder for + // the specified substitution index, based on the format map and instruction. + const char* GetSubstitute(int index, SubstitutionMode mode) { + if (mode == kFormat) { + return NEONFormatAsString(GetNEONFormat(formats_[index])); + } + VIXL_ASSERT(mode == kPlaceholder); + return NEONFormatAsPlaceholder(GetNEONFormat(formats_[index])); + } + + // Get the NEONFormat enumerated value for bits obtained from the + // instruction based on the specified format mapping. + NEONFormat GetNEONFormat(const NEONFormatMap* format_map) { + return format_map->map[PickBits(format_map->bits)]; + } + + // Convert a NEONFormat into a string. + static const char* NEONFormatAsString(NEONFormat format) { + // clang-format off + static const char* formats[] = { + "undefined", + "8b", "16b", "4h", "8h", "2s", "4s", "1d", "2d", + "b", "h", "s", "d" + }; + // clang-format on + VIXL_ASSERT(format < ArrayLength(formats)); + return formats[format]; + } + + // Convert a NEONFormat into a register placeholder string. + static const char* NEONFormatAsPlaceholder(NEONFormat format) { + VIXL_ASSERT((format == NF_B) || (format == NF_H) || (format == NF_S) || + (format == NF_D) || (format == NF_UNDEF)); + // clang-format off + static const char* formats[] = { + "undefined", + "undefined", "undefined", "undefined", "undefined", + "undefined", "undefined", "undefined", "undefined", + "'B", "'H", "'S", "'D" + }; + // clang-format on + return formats[format]; + } + + // Select bits from instrbits_ defined by the bits array, concatenate them, + // and return the value. + uint8_t PickBits(const uint8_t bits[]) { + uint8_t result = 0; + for (unsigned b = 0; b < kNEONFormatMaxBits; b++) { + if (bits[b] == 0) break; + result <<= 1; + result |= ((instrbits_ & (1 << bits[b])) == 0) ? 0 : 1; + } + return result; + } + + Instr instrbits_; + const NEONFormatMap* formats_[3]; + char form_buffer_[64]; + char mne_buffer_[16]; +}; +} // namespace aarch64 +} // namespace vixl + +#endif // VIXL_AARCH64_INSTRUCTIONS_AARCH64_H_ diff --git a/src/coreclr/jit/vixl/aarch64/macro-assembler-aarch64.cc b/src/coreclr/jit/vixl/aarch64/macro-assembler-aarch64.cc new file mode 100644 index 00000000000000..301d5ff11b0ba2 --- /dev/null +++ b/src/coreclr/jit/vixl/aarch64/macro-assembler-aarch64.cc @@ -0,0 +1,3102 @@ +// Copyright 2015, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include + +#include "macro-assembler-aarch64.h" + +namespace vixl { +namespace aarch64 { + + +void Pool::Release() { + if (--monitor_ == 0) { + // Ensure the pool has not been blocked for too long. + VIXL_ASSERT(masm_->GetCursorOffset() < checkpoint_); + } +} + + +void Pool::SetNextCheckpoint(ptrdiff_t checkpoint) { + masm_->checkpoint_ = min(masm_->checkpoint_, checkpoint); + checkpoint_ = checkpoint; +} + + +LiteralPool::LiteralPool(MacroAssembler* masm) + : Pool(masm), + entries_(masm->compiler->getAllocator(CMK_Codegen)), + size_(0), + first_use_(-1), + recommended_checkpoint_(kNoCheckpointRequired), + deleted_on_destruction_(masm->compiler->getAllocator(CMK_Codegen)) {} + + +LiteralPool::~LiteralPool() VIXL_NEGATIVE_TESTING_ALLOW_EXCEPTION { + VIXL_ASSERT(IsEmpty()); + VIXL_ASSERT(!IsBlocked()); + for (jitstd::vector::iterator it = deleted_on_destruction_.begin(); + it != deleted_on_destruction_.end(); + it++) { + delete *it; + } +} + + +void LiteralPool::Reset() { + jitstd::vector::iterator it, end; + for (it = entries_.begin(), end = entries_.end(); it != end; ++it) { + RawLiteral* literal = *it; + if (literal->deletion_policy_ == RawLiteral::kDeletedOnPlacementByPool) { + delete literal; + } + } + entries_.clear(); + size_ = 0; + first_use_ = -1; + Pool::Reset(); + recommended_checkpoint_ = kNoCheckpointRequired; +} + + +void LiteralPool::CheckEmitFor(size_t amount, EmitOption option) { + if (IsEmpty() || IsBlocked()) return; + + ptrdiff_t distance = masm_->GetCursorOffset() + amount - first_use_; + if (distance >= kRecommendedLiteralPoolRange) { + Emit(option); + } +} + + +void LiteralPool::CheckEmitForBranch(size_t range) { + if (IsEmpty() || IsBlocked()) return; + if (GetMaxSize() >= range) Emit(); +} + +// We use a subclass to access the protected `ExactAssemblyScope` constructor +// giving us control over the pools. This allows us to use this scope within +// code emitting pools without creating a circular dependency. +// We keep the constructor private to restrict usage of this helper class. +class ExactAssemblyScopeWithoutPoolsCheck : public ExactAssemblyScope { + private: + ExactAssemblyScopeWithoutPoolsCheck(MacroAssembler* masm, size_t size) + : ExactAssemblyScope(masm, + size, + ExactAssemblyScope::kExactSize, + ExactAssemblyScope::kIgnorePools) {} + + friend void LiteralPool::Emit(LiteralPool::EmitOption); + friend void VeneerPool::Emit(VeneerPool::EmitOption, size_t); +}; + + +void LiteralPool::Emit(EmitOption option) { + // There is an issue if we are asked to emit a blocked or empty pool. + VIXL_ASSERT(!IsBlocked()); + VIXL_ASSERT(!IsEmpty()); + + size_t pool_size = GetSize(); + size_t emit_size = pool_size; + if (option == kBranchRequired) emit_size += kInstructionSize; + Label end_of_pool; + + VIXL_ASSERT(emit_size % kInstructionSize == 0); + { + CodeBufferCheckScope guard(masm_, + emit_size, + CodeBufferCheckScope::kCheck, + CodeBufferCheckScope::kExactSize); +#ifdef VIXL_DEBUG + // Also explicitly disallow usage of the `MacroAssembler` here. + masm_->SetAllowMacroInstructions(false); +#endif + if (option == kBranchRequired) { + ExactAssemblyScopeWithoutPoolsCheck guard(masm_, kInstructionSize); + masm_->b(&end_of_pool); + } + + { + // Marker indicating the size of the literal pool in 32-bit words. + VIXL_ASSERT((pool_size % kWRegSizeInBytes) == 0); + ExactAssemblyScopeWithoutPoolsCheck guard(masm_, kInstructionSize); + masm_->ldr(xzr, static_cast(pool_size / kWRegSizeInBytes)); + } + + // Now populate the literal pool. + jitstd::vector::iterator it, end; + for (it = entries_.begin(), end = entries_.end(); it != end; ++it) { + VIXL_ASSERT((*it)->IsUsed()); + masm_->place(*it); + } + + if (option == kBranchRequired) masm_->bind(&end_of_pool); +#ifdef VIXL_DEBUG + masm_->SetAllowMacroInstructions(true); +#endif + } + + Reset(); +} + + +void LiteralPool::AddEntry(RawLiteral* literal) { + // A literal must be registered immediately before its first use. Here we + // cannot control that it is its first use, but we check no code has been + // emitted since its last use. + VIXL_ASSERT(masm_->GetCursorOffset() == literal->GetLastUse()); + + UpdateFirstUse(masm_->GetCursorOffset()); + VIXL_ASSERT(masm_->GetCursorOffset() >= first_use_); + entries_.push_back(literal); + size_ += literal->GetSize(); +} + + +void LiteralPool::UpdateFirstUse(ptrdiff_t use_position) { + first_use_ = min(first_use_, use_position); + if (first_use_ == -1) { + first_use_ = use_position; + SetNextRecommendedCheckpoint(GetNextRecommendedCheckpoint()); + SetNextCheckpoint(first_use_ + Instruction::kLoadLiteralRange); + } else { + VIXL_ASSERT(use_position > first_use_); + } +} + + +void VeneerPool::Reset() { + Pool::Reset(); + unresolved_branches_.Reset(); +} + + +void VeneerPool::Release() { + if (--monitor_ == 0) { + VIXL_ASSERT(IsEmpty() || + masm_->GetCursorOffset() < + unresolved_branches_.GetFirstLimit()); + } +} + + +void VeneerPool::RegisterUnresolvedBranch(ptrdiff_t branch_pos, + Label* label, + ImmBranchType branch_type) { + VIXL_ASSERT(!label->IsBound()); + BranchInfo branch_info = BranchInfo(branch_pos, label, branch_type); + unresolved_branches_.insert(branch_info); + UpdateNextCheckPoint(); + // TODO: In debug mode register the label with the assembler to make sure it + // is bound with masm Bind and not asm bind. +} + + +void VeneerPool::DeleteUnresolvedBranchInfoForLabel(Label* label) { + if (IsEmpty()) { + VIXL_ASSERT(checkpoint_ == kNoCheckpointRequired); + return; + } + + if (label->IsLinked()) { + Label::LabelLinksIterator links_it(label); + for (; !links_it.Done(); links_it.Advance()) { + ptrdiff_t link_offset = *links_it.Current(); + Instruction* link = masm_->GetInstructionAt(link_offset); + + // ADR instructions are not handled. + if (BranchTypeUsesVeneers(link->GetBranchType())) { + BranchInfo branch_info(link_offset, label, link->GetBranchType()); + unresolved_branches_.erase(branch_info); + } + } + } + + UpdateNextCheckPoint(); +} + + +bool VeneerPool::ShouldEmitVeneer(int64_t first_unreacheable_pc, + size_t amount) { + ptrdiff_t offset = + kPoolNonVeneerCodeSize + amount + GetMaxSize() + GetOtherPoolsMaxSize(); + return (masm_->GetCursorOffset() + offset) > first_unreacheable_pc; +} + + +void VeneerPool::CheckEmitFor(size_t amount, EmitOption option) { + if (IsEmpty()) return; + + VIXL_ASSERT(masm_->GetCursorOffset() + kPoolNonVeneerCodeSize < + unresolved_branches_.GetFirstLimit()); + + if (IsBlocked()) return; + + if (ShouldEmitVeneers(amount)) { + Emit(option, amount); + } else { + UpdateNextCheckPoint(); + } +} + + +void VeneerPool::Emit(EmitOption option, size_t amount) { + // There is an issue if we are asked to emit a blocked or empty pool. + VIXL_ASSERT(!IsBlocked()); + VIXL_ASSERT(!IsEmpty()); + + Label end; + if (option == kBranchRequired) { + ExactAssemblyScopeWithoutPoolsCheck guard(masm_, kInstructionSize); + masm_->b(&end); + } + + // We want to avoid generating veneer pools too often, so generate veneers for + // branches that don't immediately require a veneer but will soon go out of + // range. + static const size_t kVeneerEmissionMargin = 1 * KBytes; + + for (BranchInfoSetIterator it(&unresolved_branches_); !it.Done();) { + BranchInfo* branch_info = it.Current(); + if (ShouldEmitVeneer(branch_info->first_unreacheable_pc_, + amount + kVeneerEmissionMargin)) { + CodeBufferCheckScope scope(masm_, + kVeneerCodeSize, + CodeBufferCheckScope::kCheck, + CodeBufferCheckScope::kExactSize); + ptrdiff_t branch_pos = branch_info->pc_offset_; + Instruction* branch = masm_->GetInstructionAt(branch_pos); + Label* label = branch_info->label_; + + // Patch the branch to point to the current position, and emit a branch + // to the label. + Instruction* veneer = masm_->GetCursorAddress(); + branch->SetImmPCOffsetTarget(veneer); + { + ExactAssemblyScopeWithoutPoolsCheck guard(masm_, kInstructionSize); + masm_->b(label); + } + + // Update the label. The branch patched does not point to it any longer. + label->DeleteLink(branch_pos); + + it.DeleteCurrentAndAdvance(); + } else { + it.AdvanceToNextType(); + } + } + + UpdateNextCheckPoint(); + + masm_->bind(&end); +} + + +MacroAssembler::MacroAssembler(Compiler* _compiler, + PositionIndependentCodeOption pic) + : Assembler(pic), + compiler(_compiler), +#ifdef VIXL_DEBUG + allow_macro_instructions_(true), +#endif + generate_simulator_code_(VIXL_AARCH64_GENERATE_SIMULATOR_CODE), + sp_(sp), + tmp_list_(ip0, ip1), + v_tmp_list_(d31), + p_tmp_list_(CPURegList::Empty(CPURegister::kPRegister)), + current_scratch_scope_(NULL), + literal_pool_(this), + veneer_pool_(this), + recommended_checkpoint_(Pool::kNoCheckpointRequired), + fp_nan_propagation_(NoFPMacroNaNPropagationSelected) { + checkpoint_ = GetNextCheckPoint(); +#ifndef VIXL_DEBUG + USE(allow_macro_instructions_); +#endif +} + + +MacroAssembler::MacroAssembler(Compiler* _compiler, + size_t capacity, + PositionIndependentCodeOption pic) + : Assembler(capacity, pic), + compiler(_compiler), +#ifdef VIXL_DEBUG + allow_macro_instructions_(true), +#endif + generate_simulator_code_(VIXL_AARCH64_GENERATE_SIMULATOR_CODE), + sp_(sp), + tmp_list_(ip0, ip1), + v_tmp_list_(d31), + p_tmp_list_(CPURegList::Empty(CPURegister::kPRegister)), + current_scratch_scope_(NULL), + literal_pool_(this), + veneer_pool_(this), + recommended_checkpoint_(Pool::kNoCheckpointRequired), + fp_nan_propagation_(NoFPMacroNaNPropagationSelected) { + checkpoint_ = GetNextCheckPoint(); +} + + +MacroAssembler::MacroAssembler(Compiler* _compiler, + byte* buffer, + size_t capacity, + PositionIndependentCodeOption pic) + : Assembler(buffer, capacity, pic), + compiler(_compiler), +#ifdef VIXL_DEBUG + allow_macro_instructions_(true), +#endif + generate_simulator_code_(VIXL_AARCH64_GENERATE_SIMULATOR_CODE), + sp_(sp), + tmp_list_(ip0, ip1), + v_tmp_list_(d31), + p_tmp_list_(CPURegList::Empty(CPURegister::kPRegister)), + current_scratch_scope_(NULL), + literal_pool_(this), + veneer_pool_(this), + recommended_checkpoint_(Pool::kNoCheckpointRequired), + fp_nan_propagation_(NoFPMacroNaNPropagationSelected) { + checkpoint_ = GetNextCheckPoint(); +} + + +MacroAssembler::~MacroAssembler() {} + + +void MacroAssembler::Reset() { + Assembler::Reset(); + + VIXL_ASSERT(!literal_pool_.IsBlocked()); + literal_pool_.Reset(); + veneer_pool_.Reset(); + + checkpoint_ = GetNextCheckPoint(); +} + + +void MacroAssembler::FinalizeCode(FinalizeOption option) { + if (!literal_pool_.IsEmpty()) { + // The user may decide to emit more code after Finalize, emit a branch if + // that's the case. + literal_pool_.Emit(option == kUnreachable ? Pool::kNoBranchRequired + : Pool::kBranchRequired); + } + VIXL_ASSERT(veneer_pool_.IsEmpty()); + + Assembler::FinalizeCode(); +} + + +void MacroAssembler::CheckEmitFor(size_t amount) { + CheckEmitPoolsFor(amount); + GetBuffer()->EnsureSpaceFor(amount); +} + + +void MacroAssembler::CheckEmitPoolsFor(size_t amount) { + literal_pool_.CheckEmitFor(amount); + veneer_pool_.CheckEmitFor(amount); + checkpoint_ = GetNextCheckPoint(); +} + + +int MacroAssembler::MoveImmediateHelper(MacroAssembler* masm, + const Register& rd, + uint64_t imm) { + bool emit_code = (masm != NULL); + VIXL_ASSERT(IsUint32(imm) || IsInt32(imm) || rd.Is64Bits()); + // The worst case for size is mov 64-bit immediate to sp: + // * up to 4 instructions to materialise the constant + // * 1 instruction to move to sp + MacroEmissionCheckScope guard(masm); + + // Immediates on Aarch64 can be produced using an initial value, and zero to + // three move keep operations. + // + // Initial values can be generated with: + // 1. 64-bit move zero (movz). + // 2. 32-bit move inverted (movn). + // 3. 64-bit move inverted. + // 4. 32-bit orr immediate. + // 5. 64-bit orr immediate. + // Move-keep may then be used to modify each of the 16-bit half words. + // + // The code below supports all five initial value generators, and + // applying move-keep operations to move-zero and move-inverted initial + // values. + + // Try to move the immediate in one instruction, and if that fails, switch to + // using multiple instructions. + if (OneInstrMoveImmediateHelper(masm, rd, imm)) { + return 1; + } else { + int instruction_count = 0; + unsigned reg_size = rd.GetSizeInBits(); + + // Generic immediate case. Imm will be represented by + // [imm3, imm2, imm1, imm0], where each imm is 16 bits. + // A move-zero or move-inverted is generated for the first non-zero or + // non-0xffff immX, and a move-keep for subsequent non-zero immX. + + uint64_t ignored_halfword = 0; + bool invert_move = false; + // If the number of 0xffff halfwords is greater than the number of 0x0000 + // halfwords, it's more efficient to use move-inverted. + if (CountClearHalfWords(~imm, reg_size) > + CountClearHalfWords(imm, reg_size)) { + ignored_halfword = 0xffff; + invert_move = true; + } + + // Mov instructions can't move values into the stack pointer, so set up a + // temporary register, if needed. + UseScratchRegisterScope temps; + Register temp; + if (emit_code) { + temps.Open(masm); + temp = rd.IsSP() ? temps.AcquireSameSizeAs(rd) : rd; + } + + // Iterate through the halfwords. Use movn/movz for the first non-ignored + // halfword, and movk for subsequent halfwords. + VIXL_ASSERT((reg_size % 16) == 0); + bool first_mov_done = false; + for (unsigned i = 0; i < (reg_size / 16); i++) { + uint64_t imm16 = (imm >> (16 * i)) & 0xffff; + if (imm16 != ignored_halfword) { + if (!first_mov_done) { + if (invert_move) { + if (emit_code) masm->movn(temp, ~imm16 & 0xffff, 16 * i); + instruction_count++; + } else { + if (emit_code) masm->movz(temp, imm16, 16 * i); + instruction_count++; + } + first_mov_done = true; + } else { + // Construct a wider constant. + if (emit_code) masm->movk(temp, imm16, 16 * i); + instruction_count++; + } + } + } + + VIXL_ASSERT(first_mov_done); + + // Move the temporary if the original destination register was the stack + // pointer. + if (rd.IsSP()) { + if (emit_code) masm->mov(rd, temp); + instruction_count++; + } + return instruction_count; + } +} + + +void MacroAssembler::B(Label* label, BranchType type, Register reg, int bit) { + VIXL_ASSERT((reg.Is(NoReg) || (type >= kBranchTypeFirstUsingReg)) && + ((bit == -1) || (type >= kBranchTypeFirstUsingBit))); + if (kBranchTypeFirstCondition <= type && type <= kBranchTypeLastCondition) { + B(static_cast(type), label); + } else { + switch (type) { + case always: + B(label); + break; + case never: + break; + case reg_zero: + Cbz(reg, label); + break; + case reg_not_zero: + Cbnz(reg, label); + break; + case reg_bit_clear: + Tbz(reg, bit, label); + break; + case reg_bit_set: + Tbnz(reg, bit, label); + break; + default: + VIXL_UNREACHABLE(); + } + } +} + + +void MacroAssembler::B(Label* label) { + // We don't need to check the size of the literal pool, because the size of + // the literal pool is already bounded by the literal range, which is smaller + // than the range of this branch. + VIXL_ASSERT(Instruction::GetImmBranchForwardRange(UncondBranchType) > + Instruction::kLoadLiteralRange); + SingleEmissionCheckScope guard(this); + b(label); +} + + +void MacroAssembler::B(Label* label, Condition cond) { + // We don't need to check the size of the literal pool, because the size of + // the literal pool is already bounded by the literal range, which is smaller + // than the range of this branch. + VIXL_ASSERT(Instruction::GetImmBranchForwardRange(CondBranchType) > + Instruction::kLoadLiteralRange); + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT((cond != al) && (cond != nv)); + EmissionCheckScope guard(this, 2 * kInstructionSize); + + if (label->IsBound() && LabelIsOutOfRange(label, CondBranchType)) { + Label done; + b(&done, InvertCondition(cond)); + b(label); + bind(&done); + } else { + if (!label->IsBound()) { + veneer_pool_.RegisterUnresolvedBranch(GetCursorOffset(), + label, + CondBranchType); + } + b(label, cond); + } +} + + +void MacroAssembler::Cbnz(const Register& rt, Label* label) { + // We don't need to check the size of the literal pool, because the size of + // the literal pool is already bounded by the literal range, which is smaller + // than the range of this branch. + VIXL_ASSERT(Instruction::GetImmBranchForwardRange(CompareBranchType) > + Instruction::kLoadLiteralRange); + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rt.IsZero()); + EmissionCheckScope guard(this, 2 * kInstructionSize); + + if (label->IsBound() && LabelIsOutOfRange(label, CondBranchType)) { + Label done; + cbz(rt, &done); + b(label); + bind(&done); + } else { + if (!label->IsBound()) { + veneer_pool_.RegisterUnresolvedBranch(GetCursorOffset(), + label, + CompareBranchType); + } + cbnz(rt, label); + } +} + + +void MacroAssembler::Cbz(const Register& rt, Label* label) { + // We don't need to check the size of the literal pool, because the size of + // the literal pool is already bounded by the literal range, which is smaller + // than the range of this branch. + VIXL_ASSERT(Instruction::GetImmBranchForwardRange(CompareBranchType) > + Instruction::kLoadLiteralRange); + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rt.IsZero()); + EmissionCheckScope guard(this, 2 * kInstructionSize); + + if (label->IsBound() && LabelIsOutOfRange(label, CondBranchType)) { + Label done; + cbnz(rt, &done); + b(label); + bind(&done); + } else { + if (!label->IsBound()) { + veneer_pool_.RegisterUnresolvedBranch(GetCursorOffset(), + label, + CompareBranchType); + } + cbz(rt, label); + } +} + + +void MacroAssembler::Tbnz(const Register& rt, unsigned bit_pos, Label* label) { + // This is to avoid a situation where emitting a veneer for a TBZ/TBNZ branch + // can become impossible because we emit the literal pool first. + literal_pool_.CheckEmitForBranch( + Instruction::GetImmBranchForwardRange(TestBranchType)); + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rt.IsZero()); + EmissionCheckScope guard(this, 2 * kInstructionSize); + + if (label->IsBound() && LabelIsOutOfRange(label, TestBranchType)) { + Label done; + tbz(rt, bit_pos, &done); + b(label); + bind(&done); + } else { + if (!label->IsBound()) { + veneer_pool_.RegisterUnresolvedBranch(GetCursorOffset(), + label, + TestBranchType); + } + tbnz(rt, bit_pos, label); + } +} + + +void MacroAssembler::Tbz(const Register& rt, unsigned bit_pos, Label* label) { + // This is to avoid a situation where emitting a veneer for a TBZ/TBNZ branch + // can become impossible because we emit the literal pool first. + literal_pool_.CheckEmitForBranch( + Instruction::GetImmBranchForwardRange(TestBranchType)); + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rt.IsZero()); + EmissionCheckScope guard(this, 2 * kInstructionSize); + + if (label->IsBound() && LabelIsOutOfRange(label, TestBranchType)) { + Label done; + tbnz(rt, bit_pos, &done); + b(label); + bind(&done); + } else { + if (!label->IsBound()) { + veneer_pool_.RegisterUnresolvedBranch(GetCursorOffset(), + label, + TestBranchType); + } + tbz(rt, bit_pos, label); + } +} + +void MacroAssembler::Bind(Label* label, BranchTargetIdentifier id) { + VIXL_ASSERT(allow_macro_instructions_); + veneer_pool_.DeleteUnresolvedBranchInfoForLabel(label); + if (id == EmitBTI_none) { + bind(label); + } else { + // Emit this inside an ExactAssemblyScope to ensure there are no extra + // instructions between the bind and the target identifier instruction. + ExactAssemblyScope scope(this, kInstructionSize); + bind(label); + if (id == EmitPACIASP) { + paciasp(); + } else if (id == EmitPACIBSP) { + pacibsp(); + } else { + bti(id); + } + } +} + +// Bind a label to a specified offset from the start of the buffer. +void MacroAssembler::BindToOffset(Label* label, ptrdiff_t offset) { + VIXL_ASSERT(allow_macro_instructions_); + veneer_pool_.DeleteUnresolvedBranchInfoForLabel(label); + Assembler::BindToOffset(label, offset); +} + + +void MacroAssembler::And(const Register& rd, + const Register& rn, + const Operand& operand) { + VIXL_ASSERT(allow_macro_instructions_); + LogicalMacro(rd, rn, operand, AND); +} + + +void MacroAssembler::Ands(const Register& rd, + const Register& rn, + const Operand& operand) { + VIXL_ASSERT(allow_macro_instructions_); + LogicalMacro(rd, rn, operand, ANDS); +} + + +void MacroAssembler::Tst(const Register& rn, const Operand& operand) { + VIXL_ASSERT(allow_macro_instructions_); + Ands(AppropriateZeroRegFor(rn), rn, operand); +} + + +void MacroAssembler::Bic(const Register& rd, + const Register& rn, + const Operand& operand) { + VIXL_ASSERT(allow_macro_instructions_); + LogicalMacro(rd, rn, operand, BIC); +} + + +void MacroAssembler::Bics(const Register& rd, + const Register& rn, + const Operand& operand) { + VIXL_ASSERT(allow_macro_instructions_); + LogicalMacro(rd, rn, operand, BICS); +} + + +void MacroAssembler::Orr(const Register& rd, + const Register& rn, + const Operand& operand) { + VIXL_ASSERT(allow_macro_instructions_); + LogicalMacro(rd, rn, operand, ORR); +} + + +void MacroAssembler::Orn(const Register& rd, + const Register& rn, + const Operand& operand) { + VIXL_ASSERT(allow_macro_instructions_); + LogicalMacro(rd, rn, operand, ORN); +} + + +void MacroAssembler::Eor(const Register& rd, + const Register& rn, + const Operand& operand) { + VIXL_ASSERT(allow_macro_instructions_); + LogicalMacro(rd, rn, operand, EOR); +} + + +void MacroAssembler::Eon(const Register& rd, + const Register& rn, + const Operand& operand) { + VIXL_ASSERT(allow_macro_instructions_); + LogicalMacro(rd, rn, operand, EON); +} + + +void MacroAssembler::LogicalMacro(const Register& rd, + const Register& rn, + const Operand& operand, + LogicalOp op) { + // The worst case for size is logical immediate to sp: + // * up to 4 instructions to materialise the constant + // * 1 instruction to do the operation + // * 1 instruction to move to sp + MacroEmissionCheckScope guard(this); + UseScratchRegisterScope temps(this); + // Use `rd` as a temp, if we can. + temps.Include(rd); + // We read `rn` after evaluating `operand`. + temps.Exclude(rn); + // It doesn't matter if `operand` is in `temps` (e.g. because it alises `rd`) + // because we don't need it after it is evaluated. + + if (operand.IsImmediate()) { + uint64_t immediate = operand.GetImmediate(); + unsigned reg_size = rd.GetSizeInBits(); + + // If the operation is NOT, invert the operation and immediate. + if ((op & NOT) == NOT) { + op = static_cast(op & ~NOT); + immediate = ~immediate; + } + + // Ignore the top 32 bits of an immediate if we're moving to a W register. + if (rd.Is32Bits()) { + // Check that the top 32 bits are consistent. + VIXL_ASSERT(((immediate >> kWRegSize) == 0) || + ((immediate >> kWRegSize) == 0xffffffff)); + immediate &= kWRegMask; + } + + VIXL_ASSERT(rd.Is64Bits() || IsUint32(immediate)); + + // Special cases for all set or all clear immediates. + if (immediate == 0) { + switch (op) { + case AND: + Mov(rd, 0); + return; + case ORR: + VIXL_FALLTHROUGH(); + case EOR: + Mov(rd, rn); + return; + case ANDS: + VIXL_FALLTHROUGH(); + case BICS: + break; + default: + VIXL_UNREACHABLE(); + } + } else if ((rd.Is64Bits() && (immediate == UINT64_C(0xffffffffffffffff))) || + (rd.Is32Bits() && (immediate == UINT64_C(0x00000000ffffffff)))) { + switch (op) { + case AND: + Mov(rd, rn); + return; + case ORR: + Mov(rd, immediate); + return; + case EOR: + Mvn(rd, rn); + return; + case ANDS: + VIXL_FALLTHROUGH(); + case BICS: + break; + default: + VIXL_UNREACHABLE(); + } + } + + unsigned n, imm_s, imm_r; + if (IsImmLogical(immediate, reg_size, &n, &imm_s, &imm_r)) { + // Immediate can be encoded in the instruction. + LogicalImmediate(rd, rn, n, imm_s, imm_r, op); + } else { + // Immediate can't be encoded: synthesize using move immediate. + Register temp = temps.AcquireSameSizeAs(rn); + VIXL_ASSERT(!temp.Aliases(rn)); + + // If the left-hand input is the stack pointer, we can't pre-shift the + // immediate, as the encoding won't allow the subsequent post shift. + PreShiftImmMode mode = rn.IsSP() ? kNoShift : kAnyShift; + Operand imm_operand = MoveImmediateForShiftedOp(temp, immediate, mode); + + if (rd.Is(sp) || rd.Is(wsp)) { + // If rd is the stack pointer we cannot use it as the destination + // register so we use the temp register as an intermediate again. + Logical(temp, rn, imm_operand, op); + Mov(rd, temp); + } else { + Logical(rd, rn, imm_operand, op); + } + } + } else if (operand.IsExtendedRegister()) { + VIXL_ASSERT(operand.GetRegister().GetSizeInBits() <= rd.GetSizeInBits()); + // Add/sub extended supports shift <= 4. We want to support exactly the + // same modes here. + VIXL_ASSERT(operand.GetShiftAmount() <= 4); + VIXL_ASSERT( + operand.GetRegister().Is64Bits() || + ((operand.GetExtend() != UXTX) && (operand.GetExtend() != SXTX))); + + Register temp = temps.AcquireSameSizeAs(rn); + VIXL_ASSERT(!temp.Aliases(rn)); + EmitExtendShift(temp, + operand.GetRegister(), + operand.GetExtend(), + operand.GetShiftAmount()); + Logical(rd, rn, Operand(temp), op); + } else { + // The operand can be encoded in the instruction. + VIXL_ASSERT(operand.IsShiftedRegister()); + Logical(rd, rn, operand, op); + } +} + + +void MacroAssembler::Mov(const Register& rd, + const Operand& operand, + DiscardMoveMode discard_mode) { + VIXL_ASSERT(allow_macro_instructions_); + // The worst case for size is mov immediate with up to 4 instructions. + MacroEmissionCheckScope guard(this); + + if (operand.IsImmediate()) { + // Call the macro assembler for generic immediates. + Mov(rd, operand.GetImmediate()); + } else if (operand.IsShiftedRegister() && (operand.GetShiftAmount() != 0)) { + // Emit a shift instruction if moving a shifted register. This operation + // could also be achieved using an orr instruction (like orn used by Mvn), + // but using a shift instruction makes the disassembly clearer. + EmitShift(rd, + operand.GetRegister(), + operand.GetShift(), + operand.GetShiftAmount()); + } else if (operand.IsExtendedRegister()) { + // Emit an extend instruction if moving an extended register. This handles + // extend with post-shift operations, too. + EmitExtendShift(rd, + operand.GetRegister(), + operand.GetExtend(), + operand.GetShiftAmount()); + } else { + Mov(rd, operand.GetRegister(), discard_mode); + } +} + + +void MacroAssembler::Movi16bitHelper(const VRegister& vd, uint64_t imm) { + VIXL_ASSERT(IsUint16(imm)); + int byte1 = (imm & 0xff); + int byte2 = ((imm >> 8) & 0xff); + if (byte1 == byte2) { + movi(vd.Is64Bits() ? vd.V8B() : vd.V16B(), byte1); + } else if (byte1 == 0) { + movi(vd, byte2, LSL, 8); + } else if (byte2 == 0) { + movi(vd, byte1); + } else if (byte1 == 0xff) { + mvni(vd, ~byte2 & 0xff, LSL, 8); + } else if (byte2 == 0xff) { + mvni(vd, ~byte1 & 0xff); + } else { + UseScratchRegisterScope temps(this); + Register temp = temps.AcquireW(); + movz(temp, imm); + dup(vd, temp); + } +} + + +void MacroAssembler::Movi32bitHelper(const VRegister& vd, uint64_t imm) { + VIXL_ASSERT(IsUint32(imm)); + + uint8_t bytes[sizeof(imm)]; + memcpy(bytes, &imm, sizeof(imm)); + + // All bytes are either 0x00 or 0xff. + { + bool all0orff = true; + for (int i = 0; i < 4; ++i) { + if ((bytes[i] != 0) && (bytes[i] != 0xff)) { + all0orff = false; + break; + } + } + + if (all0orff == true) { + movi(vd.Is64Bits() ? vd.V1D() : vd.V2D(), ((imm << 32) | imm)); + return; + } + } + + // Of the 4 bytes, only one byte is non-zero. + for (int i = 0; i < 4; i++) { + if ((imm & (0xff << (i * 8))) == imm) { + movi(vd, bytes[i], LSL, i * 8); + return; + } + } + + // Of the 4 bytes, only one byte is not 0xff. + for (int i = 0; i < 4; i++) { + uint32_t mask = ~(0xff << (i * 8)); + if ((imm & mask) == mask) { + mvni(vd, ~bytes[i] & 0xff, LSL, i * 8); + return; + } + } + + // Immediate is of the form 0x00MMFFFF. + if ((imm & 0xff00ffff) == 0x0000ffff) { + movi(vd, bytes[2], MSL, 16); + return; + } + + // Immediate is of the form 0x0000MMFF. + if ((imm & 0xffff00ff) == 0x000000ff) { + movi(vd, bytes[1], MSL, 8); + return; + } + + // Immediate is of the form 0xFFMM0000. + if ((imm & 0xff00ffff) == 0xff000000) { + mvni(vd, ~bytes[2] & 0xff, MSL, 16); + return; + } + // Immediate is of the form 0xFFFFMM00. + if ((imm & 0xffff00ff) == 0xffff0000) { + mvni(vd, ~bytes[1] & 0xff, MSL, 8); + return; + } + + // Top and bottom 16-bits are equal. + if (((imm >> 16) & 0xffff) == (imm & 0xffff)) { + Movi16bitHelper(vd.Is64Bits() ? vd.V4H() : vd.V8H(), imm & 0xffff); + return; + } + + // Default case. + { + UseScratchRegisterScope temps(this); + Register temp = temps.AcquireW(); + Mov(temp, imm); + dup(vd, temp); + } +} + + +void MacroAssembler::Movi64bitHelper(const VRegister& vd, uint64_t imm) { + // All bytes are either 0x00 or 0xff. + { + bool all0orff = true; + for (int i = 0; i < 8; ++i) { + int byteval = (imm >> (i * 8)) & 0xff; + if (byteval != 0 && byteval != 0xff) { + all0orff = false; + break; + } + } + if (all0orff == true) { + movi(vd, imm); + return; + } + } + + // Top and bottom 32-bits are equal. + if (((imm >> 32) & 0xffffffff) == (imm & 0xffffffff)) { + Movi32bitHelper(vd.Is64Bits() ? vd.V2S() : vd.V4S(), imm & 0xffffffff); + return; + } + + // Default case. + { + UseScratchRegisterScope temps(this); + Register temp = temps.AcquireX(); + Mov(temp, imm); + if (vd.Is1D()) { + mov(vd.D(), 0, temp); + } else { + dup(vd.V2D(), temp); + } + } +} + + +void MacroAssembler::Movi(const VRegister& vd, + uint64_t imm, + Shift shift, + int shift_amount) { + VIXL_ASSERT(allow_macro_instructions_); + MacroEmissionCheckScope guard(this); + if (shift_amount != 0 || shift != LSL) { + movi(vd, imm, shift, shift_amount); + } else if (vd.Is8B() || vd.Is16B()) { + // 8-bit immediate. + VIXL_ASSERT(IsUint8(imm)); + movi(vd, imm); + } else if (vd.Is4H() || vd.Is8H()) { + // 16-bit immediate. + Movi16bitHelper(vd, imm); + } else if (vd.Is2S() || vd.Is4S()) { + // 32-bit immediate. + Movi32bitHelper(vd, imm); + } else { + // 64-bit immediate. + Movi64bitHelper(vd, imm); + } +} + + +void MacroAssembler::Movi(const VRegister& vd, uint64_t hi, uint64_t lo) { + // TODO: Move 128-bit values in a more efficient way. + VIXL_ASSERT(vd.Is128Bits()); + Movi(vd.V2D(), lo); + if (hi != lo) { + UseScratchRegisterScope temps(this); + // TODO: Figure out if using a temporary V register to materialise the + // immediate is better. + Register temp = temps.AcquireX(); + Mov(temp, hi); + Ins(vd.V2D(), 1, temp); + } +} + + +void MacroAssembler::Mvn(const Register& rd, const Operand& operand) { + VIXL_ASSERT(allow_macro_instructions_); + // The worst case for size is mvn immediate with up to 4 instructions. + MacroEmissionCheckScope guard(this); + + if (operand.IsImmediate()) { + // Call the macro assembler for generic immediates. + Mvn(rd, operand.GetImmediate()); + } else if (operand.IsExtendedRegister()) { + // Emit two instructions for the extend case. This differs from Mov, as + // the extend and invert can't be achieved in one instruction. + EmitExtendShift(rd, + operand.GetRegister(), + operand.GetExtend(), + operand.GetShiftAmount()); + mvn(rd, rd); + } else { + // Otherwise, register and shifted register cases can be handled by the + // assembler directly, using orn. + mvn(rd, operand); + } +} + + +void MacroAssembler::Mov(const Register& rd, uint64_t imm) { + VIXL_ASSERT(allow_macro_instructions_); + MoveImmediateHelper(this, rd, imm); +} + + +void MacroAssembler::Ccmp(const Register& rn, + const Operand& operand, + StatusFlags nzcv, + Condition cond) { + VIXL_ASSERT(allow_macro_instructions_); + if (operand.IsImmediate() && (operand.GetImmediate() < 0)) { + ConditionalCompareMacro(rn, -operand.GetImmediate(), nzcv, cond, CCMN); + } else { + ConditionalCompareMacro(rn, operand, nzcv, cond, CCMP); + } +} + + +void MacroAssembler::Ccmn(const Register& rn, + const Operand& operand, + StatusFlags nzcv, + Condition cond) { + VIXL_ASSERT(allow_macro_instructions_); + if (operand.IsImmediate() && (operand.GetImmediate() < 0)) { + ConditionalCompareMacro(rn, -operand.GetImmediate(), nzcv, cond, CCMP); + } else { + ConditionalCompareMacro(rn, operand, nzcv, cond, CCMN); + } +} + + +void MacroAssembler::ConditionalCompareMacro(const Register& rn, + const Operand& operand, + StatusFlags nzcv, + Condition cond, + ConditionalCompareOp op) { + VIXL_ASSERT((cond != al) && (cond != nv)); + // The worst case for size is ccmp immediate: + // * up to 4 instructions to materialise the constant + // * 1 instruction for ccmp + MacroEmissionCheckScope guard(this); + + if ((operand.IsShiftedRegister() && (operand.GetShiftAmount() == 0)) || + (operand.IsImmediate() && + IsImmConditionalCompare(operand.GetImmediate()))) { + // The immediate can be encoded in the instruction, or the operand is an + // unshifted register: call the assembler. + ConditionalCompare(rn, operand, nzcv, cond, op); + } else { + UseScratchRegisterScope temps(this); + // The operand isn't directly supported by the instruction: perform the + // operation on a temporary register. + Register temp = temps.AcquireSameSizeAs(rn); + Mov(temp, operand); + ConditionalCompare(rn, temp, nzcv, cond, op); + } +} + + +void MacroAssembler::CselHelper(MacroAssembler* masm, + const Register& rd, + Operand left, + Operand right, + Condition cond, + bool* should_synthesise_left, + bool* should_synthesise_right) { + bool emit_code = (masm != NULL); + + VIXL_ASSERT(!emit_code || masm->allow_macro_instructions_); + VIXL_ASSERT((cond != al) && (cond != nv)); + VIXL_ASSERT(!rd.IsZero() && !rd.IsSP()); + VIXL_ASSERT(left.IsImmediate() || !left.GetRegister().IsSP()); + VIXL_ASSERT(right.IsImmediate() || !right.GetRegister().IsSP()); + + if (should_synthesise_left != NULL) *should_synthesise_left = false; + if (should_synthesise_right != NULL) *should_synthesise_right = false; + + // The worst case for size occurs when the inputs are two non encodable + // constants: + // * up to 4 instructions to materialise the left constant + // * up to 4 instructions to materialise the right constant + // * 1 instruction for csel + EmissionCheckScope guard(masm, 9 * kInstructionSize); + UseScratchRegisterScope temps; + if (masm != NULL) { + temps.Open(masm); + } + + // Try to handle cases where both inputs are immediates. + bool left_is_immediate = left.IsImmediate() || left.IsZero(); + bool right_is_immediate = right.IsImmediate() || right.IsZero(); + if (left_is_immediate && right_is_immediate && + CselSubHelperTwoImmediates(masm, + rd, + left.GetEquivalentImmediate(), + right.GetEquivalentImmediate(), + cond, + should_synthesise_left, + should_synthesise_right)) { + return; + } + + // Handle cases where one of the two inputs is -1, 0, or 1. + bool left_is_small_immediate = + left_is_immediate && ((-1 <= left.GetEquivalentImmediate()) && + (left.GetEquivalentImmediate() <= 1)); + bool right_is_small_immediate = + right_is_immediate && ((-1 <= right.GetEquivalentImmediate()) && + (right.GetEquivalentImmediate() <= 1)); + if (right_is_small_immediate || left_is_small_immediate) { + bool swapped_inputs = false; + if (!right_is_small_immediate) { + std::swap(left, right); + cond = InvertCondition(cond); + swapped_inputs = true; + } + CselSubHelperRightSmallImmediate(masm, + &temps, + rd, + left, + right, + cond, + swapped_inputs ? should_synthesise_right + : should_synthesise_left); + return; + } + + // Otherwise both inputs need to be available in registers. Synthesise them + // if necessary and emit the `csel`. + if (!left.IsPlainRegister()) { + if (emit_code) { + Register temp = temps.AcquireSameSizeAs(rd); + masm->Mov(temp, left); + left = temp; + } + if (should_synthesise_left != NULL) *should_synthesise_left = true; + } + if (!right.IsPlainRegister()) { + if (emit_code) { + Register temp = temps.AcquireSameSizeAs(rd); + masm->Mov(temp, right); + right = temp; + } + if (should_synthesise_right != NULL) *should_synthesise_right = true; + } + if (emit_code) { + VIXL_ASSERT(left.IsPlainRegister() && right.IsPlainRegister()); + if (left.GetRegister().Is(right.GetRegister())) { + masm->Mov(rd, left.GetRegister()); + } else { + masm->csel(rd, left.GetRegister(), right.GetRegister(), cond); + } + } +} + + +bool MacroAssembler::CselSubHelperTwoImmediates(MacroAssembler* masm, + const Register& rd, + int64_t left, + int64_t right, + Condition cond, + bool* should_synthesise_left, + bool* should_synthesise_right) { + bool emit_code = (masm != NULL); + if (should_synthesise_left != NULL) *should_synthesise_left = false; + if (should_synthesise_right != NULL) *should_synthesise_right = false; + + if (left == right) { + if (emit_code) masm->Mov(rd, left); + return true; + } else if (left == -right) { + if (should_synthesise_right != NULL) *should_synthesise_right = true; + if (emit_code) { + masm->Mov(rd, right); + masm->Cneg(rd, rd, cond); + } + return true; + } + + if (CselSubHelperTwoOrderedImmediates(masm, rd, left, right, cond)) { + return true; + } else { + std::swap(left, right); + if (CselSubHelperTwoOrderedImmediates(masm, + rd, + left, + right, + InvertCondition(cond))) { + return true; + } + } + + // TODO: Handle more situations. For example handle `csel rd, #5, #6, cond` + // with `cinc`. + return false; +} + + +bool MacroAssembler::CselSubHelperTwoOrderedImmediates(MacroAssembler* masm, + const Register& rd, + int64_t left, + int64_t right, + Condition cond) { + bool emit_code = (masm != NULL); + + if ((left == 1) && (right == 0)) { + if (emit_code) masm->cset(rd, cond); + return true; + } else if ((left == -1) && (right == 0)) { + if (emit_code) masm->csetm(rd, cond); + return true; + } + return false; +} + + +void MacroAssembler::CselSubHelperRightSmallImmediate( + MacroAssembler* masm, + UseScratchRegisterScope* temps, + const Register& rd, + const Operand& left, + const Operand& right, + Condition cond, + bool* should_synthesise_left) { + bool emit_code = (masm != NULL); + VIXL_ASSERT((right.IsImmediate() || right.IsZero()) && + (-1 <= right.GetEquivalentImmediate()) && + (right.GetEquivalentImmediate() <= 1)); + Register left_register; + + if (left.IsPlainRegister()) { + left_register = left.GetRegister(); + } else { + if (emit_code) { + left_register = temps->AcquireSameSizeAs(rd); + masm->Mov(left_register, left); + } + if (should_synthesise_left != NULL) *should_synthesise_left = true; + } + if (emit_code) { + int64_t imm = right.GetEquivalentImmediate(); + Register zr = AppropriateZeroRegFor(rd); + if (imm == 0) { + masm->csel(rd, left_register, zr, cond); + } else if (imm == 1) { + masm->csinc(rd, left_register, zr, cond); + } else { + VIXL_ASSERT(imm == -1); + masm->csinv(rd, left_register, zr, cond); + } + } +} + + +void MacroAssembler::Add(const Register& rd, + const Register& rn, + const Operand& operand, + FlagsUpdate S) { + VIXL_ASSERT(allow_macro_instructions_); + if (operand.IsImmediate()) { + int64_t imm = operand.GetImmediate(); + if ((imm < 0) && (imm != std::numeric_limits::Min()) && + IsImmAddSub(-imm)) { + AddSubMacro(rd, rn, -imm, S, SUB); + return; + } + } + AddSubMacro(rd, rn, operand, S, ADD); +} + + +void MacroAssembler::Adds(const Register& rd, + const Register& rn, + const Operand& operand) { + Add(rd, rn, operand, SetFlags); +} + + +void MacroAssembler::Sub(const Register& rd, + const Register& rn, + const Operand& operand, + FlagsUpdate S) { + VIXL_ASSERT(allow_macro_instructions_); + if (operand.IsImmediate()) { + int64_t imm = operand.GetImmediate(); + if ((imm < 0) && (imm != std::numeric_limits::Min()) && + IsImmAddSub(-imm)) { + AddSubMacro(rd, rn, -imm, S, ADD); + return; + } + } + AddSubMacro(rd, rn, operand, S, SUB); +} + + +void MacroAssembler::Subs(const Register& rd, + const Register& rn, + const Operand& operand) { + Sub(rd, rn, operand, SetFlags); +} + + +void MacroAssembler::Cmn(const Register& rn, const Operand& operand) { + VIXL_ASSERT(allow_macro_instructions_); + Adds(AppropriateZeroRegFor(rn), rn, operand); +} + + +void MacroAssembler::Cmp(const Register& rn, const Operand& operand) { + VIXL_ASSERT(allow_macro_instructions_); + Subs(AppropriateZeroRegFor(rn), rn, operand); +} + + +void MacroAssembler::Fcmp(const VRegister& fn, double value, FPTrapFlags trap) { + VIXL_ASSERT(allow_macro_instructions_); + // The worst case for size is: + // * 1 to materialise the constant, using literal pool if necessary + // * 1 instruction for fcmp{e} + MacroEmissionCheckScope guard(this); + if (value != 0.0) { + UseScratchRegisterScope temps(this); + VRegister tmp = temps.AcquireSameSizeAs(fn); + Fmov(tmp, value); + FPCompareMacro(fn, tmp, trap); + } else { + FPCompareMacro(fn, value, trap); + } +} + + +void MacroAssembler::Fcmpe(const VRegister& fn, double value) { + Fcmp(fn, value, EnableTrap); +} + + +void MacroAssembler::Fmov(VRegister vd, double imm) { + VIXL_ASSERT(allow_macro_instructions_); + // Floating point immediates are loaded through the literal pool. + MacroEmissionCheckScope guard(this); + + if (vd.Is1H() || vd.Is4H() || vd.Is8H()) { + Fmov(vd, Float16(imm)); + return; + } + + if (vd.Is1S() || vd.Is2S() || vd.Is4S()) { + Fmov(vd, static_cast(imm)); + return; + } + + VIXL_ASSERT(vd.Is1D() || vd.Is2D()); + if (IsImmFP64(imm)) { + fmov(vd, imm); + } else { + uint64_t rawbits = DoubleToRawbits(imm); + if (vd.IsScalar()) { + if (rawbits == 0) { + fmov(vd, xzr); + } else { + ldr(vd, + new Literal(imm, + &literal_pool_, + RawLiteral::kDeletedOnPlacementByPool)); + } + } else { + // TODO: consider NEON support for load literal. + Movi(vd, rawbits); + } + } +} + + +void MacroAssembler::Fmov(VRegister vd, float imm) { + VIXL_ASSERT(allow_macro_instructions_); + // Floating point immediates are loaded through the literal pool. + MacroEmissionCheckScope guard(this); + + if (vd.Is1H() || vd.Is4H() || vd.Is8H()) { + Fmov(vd, Float16(imm)); + return; + } + + if (vd.Is1D() || vd.Is2D()) { + Fmov(vd, static_cast(imm)); + return; + } + + VIXL_ASSERT(vd.Is1S() || vd.Is2S() || vd.Is4S()); + if (IsImmFP32(imm)) { + fmov(vd, imm); + } else { + uint32_t rawbits = FloatToRawbits(imm); + if (vd.IsScalar()) { + if (rawbits == 0) { + fmov(vd, wzr); + } else { + ldr(vd, + new Literal(imm, + &literal_pool_, + RawLiteral::kDeletedOnPlacementByPool)); + } + } else { + // TODO: consider NEON support for load literal. + Movi(vd, rawbits); + } + } +} + + +void MacroAssembler::Fmov(VRegister vd, Float16 imm) { + VIXL_ASSERT(allow_macro_instructions_); + MacroEmissionCheckScope guard(this); + + if (vd.Is1S() || vd.Is2S() || vd.Is4S()) { + Fmov(vd, FPToFloat(imm, kIgnoreDefaultNaN)); + return; + } + + if (vd.Is1D() || vd.Is2D()) { + Fmov(vd, FPToDouble(imm, kIgnoreDefaultNaN)); + return; + } + + VIXL_ASSERT(vd.Is1H() || vd.Is4H() || vd.Is8H()); + uint16_t rawbits = Float16ToRawbits(imm); + if (IsImmFP16(imm)) { + fmov(vd, imm); + } else { + if (vd.IsScalar()) { + if (rawbits == 0x0) { + fmov(vd, wzr); + } else { + // We can use movz instead of the literal pool. + UseScratchRegisterScope temps(this); + Register temp = temps.AcquireW(); + Mov(temp, rawbits); + Fmov(vd, temp); + } + } else { + // TODO: consider NEON support for load literal. + Movi(vd, static_cast(rawbits)); + } + } +} + + +void MacroAssembler::Neg(const Register& rd, const Operand& operand) { + VIXL_ASSERT(allow_macro_instructions_); + if (operand.IsImmediate()) { + Mov(rd, -operand.GetImmediate()); + } else { + Sub(rd, AppropriateZeroRegFor(rd), operand); + } +} + + +void MacroAssembler::Negs(const Register& rd, const Operand& operand) { + VIXL_ASSERT(allow_macro_instructions_); + Subs(rd, AppropriateZeroRegFor(rd), operand); +} + + +bool MacroAssembler::TryOneInstrMoveImmediate(const Register& dst, + uint64_t imm) { + return OneInstrMoveImmediateHelper(this, dst, imm); +} + + +Operand MacroAssembler::MoveImmediateForShiftedOp(const Register& dst, + uint64_t imm, + PreShiftImmMode mode) { + int reg_size = dst.GetSizeInBits(); + + // Encode the immediate in a single move instruction, if possible. + if (TryOneInstrMoveImmediate(dst, imm)) { + // The move was successful; nothing to do here. + } else { + // Pre-shift the immediate to the least-significant bits of the register. + int shift_low = CountTrailingZeros(imm, reg_size); + if (mode == kLimitShiftForSP) { + // When applied to the stack pointer, the subsequent arithmetic operation + // can use the extend form to shift left by a maximum of four bits. Right + // shifts are not allowed, so we filter them out later before the new + // immediate is tested. + shift_low = min(shift_low, 4); + } + // TryOneInstrMoveImmediate handles `imm` with a value of zero, so shift_low + // must lie in the range [0, 63], and the shifts below are well-defined. + VIXL_ASSERT((shift_low >= 0) && (shift_low < 64)); + // imm_low = imm >> shift_low (with sign extension) + uint64_t imm_low = ExtractSignedBitfield64(63, shift_low, imm); + + // Pre-shift the immediate to the most-significant bits of the register, + // inserting set bits in the least-significant bits. + int shift_high = CountLeadingZeros(imm, reg_size); + VIXL_ASSERT((shift_high >= 0) && (shift_high < 64)); + uint64_t imm_high = (imm << shift_high) | GetUintMask(shift_high); + + if ((mode != kNoShift) && TryOneInstrMoveImmediate(dst, imm_low)) { + // The new immediate has been moved into the destination's low bits: + // return a new leftward-shifting operand. + return Operand(dst, LSL, shift_low); + } else if ((mode == kAnyShift) && TryOneInstrMoveImmediate(dst, imm_high)) { + // The new immediate has been moved into the destination's high bits: + // return a new rightward-shifting operand. + return Operand(dst, LSR, shift_high); + } else { + Mov(dst, imm); + } + } + return Operand(dst); +} + + +void MacroAssembler::Move(const GenericOperand& dst, + const GenericOperand& src) { + if (dst.Equals(src)) { + return; + } + + VIXL_ASSERT(dst.IsValid() && src.IsValid()); + + // The sizes of the operands must match exactly. + VIXL_ASSERT(dst.GetSizeInBits() == src.GetSizeInBits()); + VIXL_ASSERT(dst.GetSizeInBits() <= kXRegSize); + int operand_size = static_cast(dst.GetSizeInBits()); + + if (dst.IsCPURegister() && src.IsCPURegister()) { + CPURegister dst_reg = dst.GetCPURegister(); + CPURegister src_reg = src.GetCPURegister(); + if (dst_reg.IsRegister() && src_reg.IsRegister()) { + Mov(Register(dst_reg), Register(src_reg)); + } else if (dst_reg.IsVRegister() && src_reg.IsVRegister()) { + Fmov(VRegister(dst_reg), VRegister(src_reg)); + } else { + if (dst_reg.IsRegister()) { + Fmov(Register(dst_reg), VRegister(src_reg)); + } else { + Fmov(VRegister(dst_reg), Register(src_reg)); + } + } + return; + } + + if (dst.IsMemOperand() && src.IsMemOperand()) { + UseScratchRegisterScope temps(this); + CPURegister temp = temps.AcquireCPURegisterOfSize(operand_size); + Ldr(temp, src.GetMemOperand()); + Str(temp, dst.GetMemOperand()); + return; + } + + if (dst.IsCPURegister()) { + Ldr(dst.GetCPURegister(), src.GetMemOperand()); + } else { + Str(src.GetCPURegister(), dst.GetMemOperand()); + } +} + + +void MacroAssembler::ComputeAddress(const Register& dst, + const MemOperand& mem_op) { + // We cannot handle pre-indexing or post-indexing. + VIXL_ASSERT(mem_op.GetAddrMode() == Offset); + Register base = mem_op.GetBaseRegister(); + if (mem_op.IsImmediateOffset()) { + Add(dst, base, mem_op.GetOffset()); + } else { + VIXL_ASSERT(mem_op.IsRegisterOffset()); + Register reg_offset = mem_op.GetRegisterOffset(); + Shift shift = mem_op.GetShift(); + Extend extend = mem_op.GetExtend(); + if (shift == NO_SHIFT) { + VIXL_ASSERT(extend != NO_EXTEND); + Add(dst, base, Operand(reg_offset, extend, mem_op.GetShiftAmount())); + } else { + VIXL_ASSERT(extend == NO_EXTEND); + Add(dst, base, Operand(reg_offset, shift, mem_op.GetShiftAmount())); + } + } +} + + +void MacroAssembler::AddSubMacro(const Register& rd, + const Register& rn, + const Operand& operand, + FlagsUpdate S, + AddSubOp op) { + // Worst case is add/sub immediate: + // * up to 4 instructions to materialise the constant + // * 1 instruction for add/sub + MacroEmissionCheckScope guard(this); + + if (operand.IsZero() && rd.Is(rn) && rd.Is64Bits() && rn.Is64Bits() && + (S == LeaveFlags)) { + // The instruction would be a nop. Avoid generating useless code. + return; + } + + if ((operand.IsImmediate() && !IsImmAddSub(operand.GetImmediate())) || + (rn.IsZero() && !operand.IsShiftedRegister()) || + (operand.IsShiftedRegister() && (operand.GetShift() == ROR))) { + UseScratchRegisterScope temps(this); + // Use `rd` as a temp, if we can. + temps.Include(rd); + // We read `rn` after evaluating `operand`. + temps.Exclude(rn); + // It doesn't matter if `operand` is in `temps` (e.g. because it alises + // `rd`) because we don't need it after it is evaluated. + Register temp = temps.AcquireSameSizeAs(rn); + if (operand.IsImmediate()) { + PreShiftImmMode mode = kAnyShift; + + // If the destination or source register is the stack pointer, we can + // only pre-shift the immediate right by values supported in the add/sub + // extend encoding. + if (rd.IsSP()) { + // If the destination is SP and flags will be set, we can't pre-shift + // the immediate at all. + mode = (S == SetFlags) ? kNoShift : kLimitShiftForSP; + } else if (rn.IsSP()) { + mode = kLimitShiftForSP; + } + + Operand imm_operand = + MoveImmediateForShiftedOp(temp, operand.GetImmediate(), mode); + AddSub(rd, rn, imm_operand, S, op); + } else { + Mov(temp, operand); + AddSub(rd, rn, temp, S, op); + } + } else { + AddSub(rd, rn, operand, S, op); + } +} + + +void MacroAssembler::Adc(const Register& rd, + const Register& rn, + const Operand& operand) { + VIXL_ASSERT(allow_macro_instructions_); + AddSubWithCarryMacro(rd, rn, operand, LeaveFlags, ADC); +} + + +void MacroAssembler::Adcs(const Register& rd, + const Register& rn, + const Operand& operand) { + VIXL_ASSERT(allow_macro_instructions_); + AddSubWithCarryMacro(rd, rn, operand, SetFlags, ADC); +} + + +void MacroAssembler::Sbc(const Register& rd, + const Register& rn, + const Operand& operand) { + VIXL_ASSERT(allow_macro_instructions_); + AddSubWithCarryMacro(rd, rn, operand, LeaveFlags, SBC); +} + + +void MacroAssembler::Sbcs(const Register& rd, + const Register& rn, + const Operand& operand) { + VIXL_ASSERT(allow_macro_instructions_); + AddSubWithCarryMacro(rd, rn, operand, SetFlags, SBC); +} + + +void MacroAssembler::Ngc(const Register& rd, const Operand& operand) { + VIXL_ASSERT(allow_macro_instructions_); + Register zr = AppropriateZeroRegFor(rd); + Sbc(rd, zr, operand); +} + + +void MacroAssembler::Ngcs(const Register& rd, const Operand& operand) { + VIXL_ASSERT(allow_macro_instructions_); + Register zr = AppropriateZeroRegFor(rd); + Sbcs(rd, zr, operand); +} + + +void MacroAssembler::AddSubWithCarryMacro(const Register& rd, + const Register& rn, + const Operand& operand, + FlagsUpdate S, + AddSubWithCarryOp op) { + VIXL_ASSERT(rd.GetSizeInBits() == rn.GetSizeInBits()); + // Worst case is addc/subc immediate: + // * up to 4 instructions to materialise the constant + // * 1 instruction for add/sub + MacroEmissionCheckScope guard(this); + UseScratchRegisterScope temps(this); + // Use `rd` as a temp, if we can. + temps.Include(rd); + // We read `rn` after evaluating `operand`. + temps.Exclude(rn); + // It doesn't matter if `operand` is in `temps` (e.g. because it alises `rd`) + // because we don't need it after it is evaluated. + + if (operand.IsImmediate() || + (operand.IsShiftedRegister() && (operand.GetShift() == ROR))) { + // Add/sub with carry (immediate or ROR shifted register.) + Register temp = temps.AcquireSameSizeAs(rn); + Mov(temp, operand); + AddSubWithCarry(rd, rn, Operand(temp), S, op); + } else if (operand.IsShiftedRegister() && (operand.GetShiftAmount() != 0)) { + // Add/sub with carry (shifted register). + VIXL_ASSERT(operand.GetRegister().GetSizeInBits() == rd.GetSizeInBits()); + VIXL_ASSERT(operand.GetShift() != ROR); + VIXL_ASSERT( + IsUintN(rd.GetSizeInBits() == kXRegSize ? kXRegSizeLog2 : kWRegSizeLog2, + operand.GetShiftAmount())); + Register temp = temps.AcquireSameSizeAs(rn); + EmitShift(temp, + operand.GetRegister(), + operand.GetShift(), + operand.GetShiftAmount()); + AddSubWithCarry(rd, rn, Operand(temp), S, op); + } else if (operand.IsExtendedRegister()) { + // Add/sub with carry (extended register). + VIXL_ASSERT(operand.GetRegister().GetSizeInBits() <= rd.GetSizeInBits()); + // Add/sub extended supports a shift <= 4. We want to support exactly the + // same modes. + VIXL_ASSERT(operand.GetShiftAmount() <= 4); + VIXL_ASSERT( + operand.GetRegister().Is64Bits() || + ((operand.GetExtend() != UXTX) && (operand.GetExtend() != SXTX))); + Register temp = temps.AcquireSameSizeAs(rn); + EmitExtendShift(temp, + operand.GetRegister(), + operand.GetExtend(), + operand.GetShiftAmount()); + AddSubWithCarry(rd, rn, Operand(temp), S, op); + } else { + // The addressing mode is directly supported by the instruction. + AddSubWithCarry(rd, rn, operand, S, op); + } +} + + +void MacroAssembler::Rmif(const Register& xn, + unsigned shift, + StatusFlags flags) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + rmif(xn, shift, flags); +} + + +void MacroAssembler::Setf8(const Register& wn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + setf8(wn); +} + + +void MacroAssembler::Setf16(const Register& wn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + setf16(wn); +} + + +#define DEFINE_FUNCTION(FN, REGTYPE, REG, OP) \ + void MacroAssembler::FN(const REGTYPE REG, const MemOperand& addr) { \ + VIXL_ASSERT(allow_macro_instructions_); \ + LoadStoreMacro(REG, addr, OP); \ + } +LS_MACRO_LIST(DEFINE_FUNCTION) +#undef DEFINE_FUNCTION + + +void MacroAssembler::LoadStoreMacro(const CPURegister& rt, + const MemOperand& addr, + LoadStoreOp op) { + // Worst case is ldr/str pre/post index: + // * 1 instruction for ldr/str + // * up to 4 instructions to materialise the constant + // * 1 instruction to update the base + MacroEmissionCheckScope guard(this); + + int64_t offset = addr.GetOffset(); + unsigned access_size = CalcLSDataSize(op); + + // Check if an immediate offset fits in the immediate field of the + // appropriate instruction. If not, emit two instructions to perform + // the operation. + if (addr.IsImmediateOffset() && !IsImmLSScaled(offset, access_size) && + !IsImmLSUnscaled(offset)) { + // Immediate offset that can't be encoded using unsigned or unscaled + // addressing modes. + UseScratchRegisterScope temps(this); + Register temp = temps.AcquireSameSizeAs(addr.GetBaseRegister()); + Mov(temp, addr.GetOffset()); + LoadStore(rt, MemOperand(addr.GetBaseRegister(), temp), op); + } else if (addr.IsPostIndex() && !IsImmLSUnscaled(offset)) { + // Post-index beyond unscaled addressing range. + LoadStore(rt, MemOperand(addr.GetBaseRegister()), op); + Add(addr.GetBaseRegister(), addr.GetBaseRegister(), Operand(offset)); + } else if (addr.IsPreIndex() && !IsImmLSUnscaled(offset)) { + // Pre-index beyond unscaled addressing range. + Add(addr.GetBaseRegister(), addr.GetBaseRegister(), Operand(offset)); + LoadStore(rt, MemOperand(addr.GetBaseRegister()), op); + } else { + // Encodable in one load/store instruction. + LoadStore(rt, addr, op); + } +} + + +#define DEFINE_FUNCTION(FN, REGTYPE, REG, REG2, OP) \ + void MacroAssembler::FN(const REGTYPE REG, \ + const REGTYPE REG2, \ + const MemOperand& addr) { \ + VIXL_ASSERT(allow_macro_instructions_); \ + LoadStorePairMacro(REG, REG2, addr, OP); \ + } +LSPAIR_MACRO_LIST(DEFINE_FUNCTION) +#undef DEFINE_FUNCTION + +void MacroAssembler::LoadStorePairMacro(const CPURegister& rt, + const CPURegister& rt2, + const MemOperand& addr, + LoadStorePairOp op) { + // TODO(all): Should we support register offset for load-store-pair? + VIXL_ASSERT(!addr.IsRegisterOffset()); + // Worst case is ldp/stp immediate: + // * 1 instruction for ldp/stp + // * up to 4 instructions to materialise the constant + // * 1 instruction to update the base + MacroEmissionCheckScope guard(this); + + int64_t offset = addr.GetOffset(); + unsigned access_size = CalcLSPairDataSize(op); + + // Check if the offset fits in the immediate field of the appropriate + // instruction. If not, emit two instructions to perform the operation. + if (IsImmLSPair(offset, access_size)) { + // Encodable in one load/store pair instruction. + LoadStorePair(rt, rt2, addr, op); + } else { + Register base = addr.GetBaseRegister(); + if (addr.IsImmediateOffset()) { + UseScratchRegisterScope temps(this); + Register temp = temps.AcquireSameSizeAs(base); + Add(temp, base, offset); + LoadStorePair(rt, rt2, MemOperand(temp), op); + } else if (addr.IsPostIndex()) { + LoadStorePair(rt, rt2, MemOperand(base), op); + Add(base, base, offset); + } else { + VIXL_ASSERT(addr.IsPreIndex()); + Add(base, base, offset); + LoadStorePair(rt, rt2, MemOperand(base), op); + } + } +} + + +void MacroAssembler::Prfm(PrefetchOperation op, const MemOperand& addr) { + MacroEmissionCheckScope guard(this); + + // There are no pre- or post-index modes for prfm. + VIXL_ASSERT(addr.IsImmediateOffset() || addr.IsRegisterOffset()); + + // The access size is implicitly 8 bytes for all prefetch operations. + unsigned size = kXRegSizeInBytesLog2; + + // Check if an immediate offset fits in the immediate field of the + // appropriate instruction. If not, emit two instructions to perform + // the operation. + if (addr.IsImmediateOffset() && !IsImmLSScaled(addr.GetOffset(), size) && + !IsImmLSUnscaled(addr.GetOffset())) { + // Immediate offset that can't be encoded using unsigned or unscaled + // addressing modes. + UseScratchRegisterScope temps(this); + Register temp = temps.AcquireSameSizeAs(addr.GetBaseRegister()); + Mov(temp, addr.GetOffset()); + Prefetch(op, MemOperand(addr.GetBaseRegister(), temp)); + } else { + // Simple register-offsets are encodable in one instruction. + Prefetch(op, addr); + } +} + + +void MacroAssembler::Push(const CPURegister& src0, + const CPURegister& src1, + const CPURegister& src2, + const CPURegister& src3) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(AreSameSizeAndType(src0, src1, src2, src3)); + VIXL_ASSERT(src0.IsValid()); + + int count = 1 + src1.IsValid() + src2.IsValid() + src3.IsValid(); + int size = src0.GetSizeInBytes(); + + PrepareForPush(count, size); + PushHelper(count, size, src0, src1, src2, src3); +} + + +void MacroAssembler::Pop(const CPURegister& dst0, + const CPURegister& dst1, + const CPURegister& dst2, + const CPURegister& dst3) { + // It is not valid to pop into the same register more than once in one + // instruction, not even into the zero register. + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!AreAliased(dst0, dst1, dst2, dst3)); + VIXL_ASSERT(AreSameSizeAndType(dst0, dst1, dst2, dst3)); + VIXL_ASSERT(dst0.IsValid()); + + int count = 1 + dst1.IsValid() + dst2.IsValid() + dst3.IsValid(); + int size = dst0.GetSizeInBytes(); + + PrepareForPop(count, size); + PopHelper(count, size, dst0, dst1, dst2, dst3); +} + + +void MacroAssembler::PushCPURegList(CPURegList registers) { + VIXL_ASSERT(!registers.Overlaps(*GetScratchRegisterList())); + VIXL_ASSERT(!registers.Overlaps(*GetScratchVRegisterList())); + VIXL_ASSERT(allow_macro_instructions_); + + int reg_size = registers.GetRegisterSizeInBytes(); + PrepareForPush(registers.GetCount(), reg_size); + + // Bump the stack pointer and store two registers at the bottom. + int size = registers.GetTotalSizeInBytes(); + const CPURegister& bottom_0 = registers.PopLowestIndex(); + const CPURegister& bottom_1 = registers.PopLowestIndex(); + if (bottom_0.IsValid() && bottom_1.IsValid()) { + Stp(bottom_0, bottom_1, MemOperand(StackPointer(), -size, PreIndex)); + } else if (bottom_0.IsValid()) { + Str(bottom_0, MemOperand(StackPointer(), -size, PreIndex)); + } + + int offset = 2 * reg_size; + while (!registers.IsEmpty()) { + const CPURegister& src0 = registers.PopLowestIndex(); + const CPURegister& src1 = registers.PopLowestIndex(); + if (src1.IsValid()) { + Stp(src0, src1, MemOperand(StackPointer(), offset)); + } else { + Str(src0, MemOperand(StackPointer(), offset)); + } + offset += 2 * reg_size; + } +} + + +void MacroAssembler::PopCPURegList(CPURegList registers) { + VIXL_ASSERT(!registers.Overlaps(*GetScratchRegisterList())); + VIXL_ASSERT(!registers.Overlaps(*GetScratchVRegisterList())); + VIXL_ASSERT(allow_macro_instructions_); + + int reg_size = registers.GetRegisterSizeInBytes(); + PrepareForPop(registers.GetCount(), reg_size); + + + int size = registers.GetTotalSizeInBytes(); + const CPURegister& bottom_0 = registers.PopLowestIndex(); + const CPURegister& bottom_1 = registers.PopLowestIndex(); + + int offset = 2 * reg_size; + while (!registers.IsEmpty()) { + const CPURegister& dst0 = registers.PopLowestIndex(); + const CPURegister& dst1 = registers.PopLowestIndex(); + if (dst1.IsValid()) { + Ldp(dst0, dst1, MemOperand(StackPointer(), offset)); + } else { + Ldr(dst0, MemOperand(StackPointer(), offset)); + } + offset += 2 * reg_size; + } + + // Load the two registers at the bottom and drop the stack pointer. + if (bottom_0.IsValid() && bottom_1.IsValid()) { + Ldp(bottom_0, bottom_1, MemOperand(StackPointer(), size, PostIndex)); + } else if (bottom_0.IsValid()) { + Ldr(bottom_0, MemOperand(StackPointer(), size, PostIndex)); + } +} + + +void MacroAssembler::PushMultipleTimes(int count, Register src) { + VIXL_ASSERT(allow_macro_instructions_); + int size = src.GetSizeInBytes(); + + PrepareForPush(count, size); + // Push up to four registers at a time if possible because if the current + // stack pointer is sp and the register size is 32, registers must be pushed + // in blocks of four in order to maintain the 16-byte alignment for sp. + while (count >= 4) { + PushHelper(4, size, src, src, src, src); + count -= 4; + } + if (count >= 2) { + PushHelper(2, size, src, src, NoReg, NoReg); + count -= 2; + } + if (count == 1) { + PushHelper(1, size, src, NoReg, NoReg, NoReg); + count -= 1; + } + VIXL_ASSERT(count == 0); +} + + +void MacroAssembler::PushHelper(int count, + int size, + const CPURegister& src0, + const CPURegister& src1, + const CPURegister& src2, + const CPURegister& src3) { + // Ensure that we don't unintentionally modify scratch or debug registers. + // Worst case for size is 2 stp. + ExactAssemblyScope scope(this, + 2 * kInstructionSize, + ExactAssemblyScope::kMaximumSize); + + VIXL_ASSERT(AreSameSizeAndType(src0, src1, src2, src3)); + VIXL_ASSERT(size == src0.GetSizeInBytes()); + + // When pushing multiple registers, the store order is chosen such that + // Push(a, b) is equivalent to Push(a) followed by Push(b). + switch (count) { + case 1: + VIXL_ASSERT(src1.IsNone() && src2.IsNone() && src3.IsNone()); + str(src0, MemOperand(StackPointer(), -1 * size, PreIndex)); + break; + case 2: + VIXL_ASSERT(src2.IsNone() && src3.IsNone()); + stp(src1, src0, MemOperand(StackPointer(), -2 * size, PreIndex)); + break; + case 3: + VIXL_ASSERT(src3.IsNone()); + stp(src2, src1, MemOperand(StackPointer(), -3 * size, PreIndex)); + str(src0, MemOperand(StackPointer(), 2 * size)); + break; + case 4: + // Skip over 4 * size, then fill in the gap. This allows four W registers + // to be pushed using sp, whilst maintaining 16-byte alignment for sp at + // all times. + stp(src3, src2, MemOperand(StackPointer(), -4 * size, PreIndex)); + stp(src1, src0, MemOperand(StackPointer(), 2 * size)); + break; + default: + VIXL_UNREACHABLE(); + } +} + + +void MacroAssembler::PopHelper(int count, + int size, + const CPURegister& dst0, + const CPURegister& dst1, + const CPURegister& dst2, + const CPURegister& dst3) { + // Ensure that we don't unintentionally modify scratch or debug registers. + // Worst case for size is 2 ldp. + ExactAssemblyScope scope(this, + 2 * kInstructionSize, + ExactAssemblyScope::kMaximumSize); + + VIXL_ASSERT(AreSameSizeAndType(dst0, dst1, dst2, dst3)); + VIXL_ASSERT(size == dst0.GetSizeInBytes()); + + // When popping multiple registers, the load order is chosen such that + // Pop(a, b) is equivalent to Pop(a) followed by Pop(b). + switch (count) { + case 1: + VIXL_ASSERT(dst1.IsNone() && dst2.IsNone() && dst3.IsNone()); + ldr(dst0, MemOperand(StackPointer(), 1 * size, PostIndex)); + break; + case 2: + VIXL_ASSERT(dst2.IsNone() && dst3.IsNone()); + ldp(dst0, dst1, MemOperand(StackPointer(), 2 * size, PostIndex)); + break; + case 3: + VIXL_ASSERT(dst3.IsNone()); + ldr(dst2, MemOperand(StackPointer(), 2 * size)); + ldp(dst0, dst1, MemOperand(StackPointer(), 3 * size, PostIndex)); + break; + case 4: + // Load the higher addresses first, then load the lower addresses and skip + // the whole block in the second instruction. This allows four W registers + // to be popped using sp, whilst maintaining 16-byte alignment for sp at + // all times. + ldp(dst2, dst3, MemOperand(StackPointer(), 2 * size)); + ldp(dst0, dst1, MemOperand(StackPointer(), 4 * size, PostIndex)); + break; + default: + VIXL_UNREACHABLE(); + } +} + + +void MacroAssembler::PrepareForPush(int count, int size) { + if (sp.Is(StackPointer())) { + // If the current stack pointer is sp, then it must be aligned to 16 bytes + // on entry and the total size of the specified registers must also be a + // multiple of 16 bytes. + VIXL_ASSERT((count * size) % 16 == 0); + } else { + // Even if the current stack pointer is not the system stack pointer (sp), + // the system stack pointer will still be modified in order to comply with + // ABI rules about accessing memory below the system stack pointer. + BumpSystemStackPointer(count * size); + } +} + + +void MacroAssembler::PrepareForPop(int count, int size) { + USE(count, size); + if (sp.Is(StackPointer())) { + // If the current stack pointer is sp, then it must be aligned to 16 bytes + // on entry and the total size of the specified registers must also be a + // multiple of 16 bytes. + VIXL_ASSERT((count * size) % 16 == 0); + } +} + +void MacroAssembler::Poke(const Register& src, const Operand& offset) { + VIXL_ASSERT(allow_macro_instructions_); + if (offset.IsImmediate()) { + VIXL_ASSERT(offset.GetImmediate() >= 0); + } + + Str(src, MemOperand(StackPointer(), offset)); +} + + +void MacroAssembler::Peek(const Register& dst, const Operand& offset) { + VIXL_ASSERT(allow_macro_instructions_); + if (offset.IsImmediate()) { + VIXL_ASSERT(offset.GetImmediate() >= 0); + } + + Ldr(dst, MemOperand(StackPointer(), offset)); +} + + +void MacroAssembler::Claim(const Operand& size) { + VIXL_ASSERT(allow_macro_instructions_); + + if (size.IsZero()) { + return; + } + + if (size.IsImmediate()) { + VIXL_ASSERT(size.GetImmediate() > 0); + if (sp.Is(StackPointer())) { + VIXL_ASSERT((size.GetImmediate() % 16) == 0); + } + } + + if (!sp.Is(StackPointer())) { + BumpSystemStackPointer(size); + } + + Sub(StackPointer(), StackPointer(), size); +} + + +void MacroAssembler::Drop(const Operand& size) { + VIXL_ASSERT(allow_macro_instructions_); + + if (size.IsZero()) { + return; + } + + if (size.IsImmediate()) { + VIXL_ASSERT(size.GetImmediate() > 0); + if (sp.Is(StackPointer())) { + VIXL_ASSERT((size.GetImmediate() % 16) == 0); + } + } + + Add(StackPointer(), StackPointer(), size); +} + + +void MacroAssembler::PushCalleeSavedRegisters() { + // Ensure that the macro-assembler doesn't use any scratch registers. + // 10 stp will be emitted. + // TODO(all): Should we use GetCalleeSaved and SavedFP. + ExactAssemblyScope scope(this, 10 * kInstructionSize); + + // This method must not be called unless the current stack pointer is sp. + VIXL_ASSERT(sp.Is(StackPointer())); + + MemOperand tos(sp, -2 * static_cast(kXRegSizeInBytes), PreIndex); + + stp(x29, x30, tos); + stp(x27, x28, tos); + stp(x25, x26, tos); + stp(x23, x24, tos); + stp(x21, x22, tos); + stp(x19, x20, tos); + + stp(d14, d15, tos); + stp(d12, d13, tos); + stp(d10, d11, tos); + stp(d8, d9, tos); +} + + +void MacroAssembler::PopCalleeSavedRegisters() { + // Ensure that the macro-assembler doesn't use any scratch registers. + // 10 ldp will be emitted. + // TODO(all): Should we use GetCalleeSaved and SavedFP. + ExactAssemblyScope scope(this, 10 * kInstructionSize); + + // This method must not be called unless the current stack pointer is sp. + VIXL_ASSERT(sp.Is(StackPointer())); + + MemOperand tos(sp, 2 * kXRegSizeInBytes, PostIndex); + + ldp(d8, d9, tos); + ldp(d10, d11, tos); + ldp(d12, d13, tos); + ldp(d14, d15, tos); + + ldp(x19, x20, tos); + ldp(x21, x22, tos); + ldp(x23, x24, tos); + ldp(x25, x26, tos); + ldp(x27, x28, tos); + ldp(x29, x30, tos); +} + +void MacroAssembler::LoadCPURegList(CPURegList registers, + const MemOperand& src) { + LoadStoreCPURegListHelper(kLoad, registers, src); +} + +void MacroAssembler::StoreCPURegList(CPURegList registers, + const MemOperand& dst) { + LoadStoreCPURegListHelper(kStore, registers, dst); +} + + +void MacroAssembler::LoadStoreCPURegListHelper(LoadStoreCPURegListAction op, + CPURegList registers, + const MemOperand& mem) { + // We do not handle pre-indexing or post-indexing. + VIXL_ASSERT(!(mem.IsPreIndex() || mem.IsPostIndex())); + VIXL_ASSERT(!registers.Overlaps(tmp_list_)); + VIXL_ASSERT(!registers.Overlaps(v_tmp_list_)); + VIXL_ASSERT(!registers.Overlaps(p_tmp_list_)); + VIXL_ASSERT(!registers.IncludesAliasOf(sp)); + + UseScratchRegisterScope temps(this); + + MemOperand loc = BaseMemOperandForLoadStoreCPURegList(registers, mem, &temps); + const int reg_size = registers.GetRegisterSizeInBytes(); + + VIXL_ASSERT(IsPowerOf2(reg_size)); + + // Since we are operating on register pairs, we would like to align on double + // the standard size; on the other hand, we don't want to insert an extra + // operation, which will happen if the number of registers is even. Note that + // the alignment of the base pointer is unknown here, but we assume that it + // is more likely to be aligned. + if (((loc.GetOffset() & (2 * reg_size - 1)) != 0) && + ((registers.GetCount() % 2) != 0)) { + if (op == kStore) { + Str(registers.PopLowestIndex(), loc); + } else { + VIXL_ASSERT(op == kLoad); + Ldr(registers.PopLowestIndex(), loc); + } + loc.AddOffset(reg_size); + } + while (registers.GetCount() >= 2) { + const CPURegister& dst0 = registers.PopLowestIndex(); + const CPURegister& dst1 = registers.PopLowestIndex(); + if (op == kStore) { + Stp(dst0, dst1, loc); + } else { + VIXL_ASSERT(op == kLoad); + Ldp(dst0, dst1, loc); + } + loc.AddOffset(2 * reg_size); + } + if (!registers.IsEmpty()) { + if (op == kStore) { + Str(registers.PopLowestIndex(), loc); + } else { + VIXL_ASSERT(op == kLoad); + Ldr(registers.PopLowestIndex(), loc); + } + } +} + +MemOperand MacroAssembler::BaseMemOperandForLoadStoreCPURegList( + const CPURegList& registers, + const MemOperand& mem, + UseScratchRegisterScope* scratch_scope) { + // If necessary, pre-compute the base address for the accesses. + if (mem.IsRegisterOffset()) { + Register reg_base = scratch_scope->AcquireX(); + ComputeAddress(reg_base, mem); + return MemOperand(reg_base); + + } else if (mem.IsImmediateOffset()) { + int reg_size = registers.GetRegisterSizeInBytes(); + int total_size = registers.GetTotalSizeInBytes(); + int64_t min_offset = mem.GetOffset(); + int64_t max_offset = + mem.GetOffset() + max(0, total_size - 2 * reg_size); + if ((registers.GetCount() >= 2) && + (!Assembler::IsImmLSPair(min_offset, WhichPowerOf2(reg_size)) || + !Assembler::IsImmLSPair(max_offset, WhichPowerOf2(reg_size)))) { + Register reg_base = scratch_scope->AcquireX(); + ComputeAddress(reg_base, mem); + return MemOperand(reg_base); + } + } + + return mem; +} + +void MacroAssembler::BumpSystemStackPointer(const Operand& space) { + VIXL_ASSERT(!sp.Is(StackPointer())); + // TODO: Several callers rely on this not using scratch registers, so we use + // the assembler directly here. However, this means that large immediate + // values of 'space' cannot be handled. + ExactAssemblyScope scope(this, kInstructionSize); + sub(sp, StackPointer(), space); +} + + +// TODO(all): Fix printf for NEON and SVE registers. + +// This is the main Printf implementation. All callee-saved registers are +// preserved, but NZCV and the caller-saved registers may be clobbered. +void MacroAssembler::PrintfNoPreserve(const char* format, + const CPURegister& arg0, + const CPURegister& arg1, + const CPURegister& arg2, + const CPURegister& arg3) { + // We cannot handle a caller-saved stack pointer. It doesn't make much sense + // in most cases anyway, so this restriction shouldn't be too serious. + VIXL_ASSERT(!kCallerSaved.IncludesAliasOf(StackPointer())); + + // The provided arguments, and their proper PCS registers. + CPURegister args[kPrintfMaxArgCount] = {arg0, arg1, arg2, arg3}; + CPURegister pcs[kPrintfMaxArgCount]; + + int arg_count = kPrintfMaxArgCount; + + // The PCS varargs registers for printf. Note that x0 is used for the printf + // format string. + static const CPURegList kPCSVarargs = + CPURegList(CPURegister::kRegister, kXRegSize, 1, arg_count); + static const CPURegList kPCSVarargsV = + CPURegList(CPURegister::kVRegister, kDRegSize, 0, arg_count - 1); + + // We can use caller-saved registers as scratch values, except for the + // arguments and the PCS registers where they might need to go. + UseScratchRegisterScope temps(this); + temps.Include(kCallerSaved); + temps.Include(kCallerSavedV); + temps.Exclude(kPCSVarargs); + temps.Exclude(kPCSVarargsV); + temps.Exclude(arg0, arg1, arg2, arg3); + + // Copies of the arg lists that we can iterate through. + CPURegList pcs_varargs = kPCSVarargs; + CPURegList pcs_varargs_fp = kPCSVarargsV; + + // Place the arguments. There are lots of clever tricks and optimizations we + // could use here, but Printf is a debug tool so instead we just try to keep + // it simple: Move each input that isn't already in the right place to a + // scratch register, then move everything back. + for (unsigned i = 0; i < kPrintfMaxArgCount; i++) { + // Work out the proper PCS register for this argument. + if (args[i].IsRegister()) { + pcs[i] = pcs_varargs.PopLowestIndex().X(); + // We might only need a W register here. We need to know the size of the + // argument so we can properly encode it for the simulator call. + if (args[i].Is32Bits()) pcs[i] = pcs[i].Wreg(); + } else if (args[i].IsVRegister()) { + // In C, floats are always cast to doubles for varargs calls. + pcs[i] = pcs_varargs_fp.PopLowestIndex().D(); + } else { + VIXL_ASSERT(args[i].IsNone()); + arg_count = i; + break; + } + + // If the argument is already in the right place, leave it where it is. + if (args[i].Aliases(pcs[i])) continue; + + // Otherwise, if the argument is in a PCS argument register, allocate an + // appropriate scratch register and then move it out of the way. + if (kPCSVarargs.IncludesAliasOf(args[i]) || + kPCSVarargsV.IncludesAliasOf(args[i])) { + if (args[i].IsRegister()) { + Register old_arg = Register(args[i]); + Register new_arg = temps.AcquireSameSizeAs(old_arg); + Mov(new_arg, old_arg); + args[i] = new_arg; + } else { + VRegister old_arg(args[i]); + VRegister new_arg = temps.AcquireSameSizeAs(old_arg); + Fmov(new_arg, old_arg); + args[i] = new_arg; + } + } + } + + // Do a second pass to move values into their final positions and perform any + // conversions that may be required. + for (int i = 0; i < arg_count; i++) { + VIXL_ASSERT(pcs[i].GetType() == args[i].GetType()); + if (pcs[i].IsRegister()) { + Mov(Register(pcs[i]), Register(args[i]), kDiscardForSameWReg); + } else { + VIXL_ASSERT(pcs[i].IsVRegister()); + if (pcs[i].GetSizeInBits() == args[i].GetSizeInBits()) { + Fmov(VRegister(pcs[i]), VRegister(args[i])); + } else { + Fcvt(VRegister(pcs[i]), VRegister(args[i])); + } + } + } + + // Load the format string into x0, as per the procedure-call standard. + // + // To make the code as portable as possible, the format string is encoded + // directly in the instruction stream. It might be cleaner to encode it in a + // literal pool, but since Printf is usually used for debugging, it is + // beneficial for it to be minimally dependent on other features. + temps.Exclude(x0); + Label format_address; + Adr(x0, &format_address); + + // Emit the format string directly in the instruction stream. + { + BlockPoolsScope scope(this); + // Data emitted: + // branch + // strlen(format) + 1 (includes null termination) + // padding to next instruction + // unreachable + EmissionCheckScope guard(this, + AlignUp(strlen(format) + 1, kInstructionSize) + + 2 * kInstructionSize); + Label after_data; + B(&after_data); + Bind(&format_address); + EmitString(format); + Unreachable(); + Bind(&after_data); + } + + // We don't pass any arguments on the stack, but we still need to align the C + // stack pointer to a 16-byte boundary for PCS compliance. + if (!sp.Is(StackPointer())) { + Bic(sp, StackPointer(), 0xf); + } + + // Actually call printf. This part needs special handling for the simulator, + // since the system printf function will use a different instruction set and + // the procedure-call standard will not be compatible. + if (generate_simulator_code_) { + ExactAssemblyScope scope(this, kPrintfLength); + hlt(kPrintfOpcode); + dc32(arg_count); // kPrintfArgCountOffset + + // Determine the argument pattern. + uint32_t arg_pattern_list = 0; + for (int i = 0; i < arg_count; i++) { + uint32_t arg_pattern; + if (pcs[i].IsRegister()) { + arg_pattern = pcs[i].Is32Bits() ? kPrintfArgW : kPrintfArgX; + } else { + VIXL_ASSERT(pcs[i].Is64Bits()); + arg_pattern = kPrintfArgD; + } + VIXL_ASSERT(arg_pattern < (1 << kPrintfArgPatternBits)); + arg_pattern_list |= (arg_pattern << (kPrintfArgPatternBits * i)); + } + dc32(arg_pattern_list); // kPrintfArgPatternListOffset + } else { + Register tmp = temps.AcquireX(); + // AHTODO + // Mov(tmp, reinterpret_cast(printf)); + Blr(tmp); + } +} + + +void MacroAssembler::Printf(const char* format, + CPURegister arg0, + CPURegister arg1, + CPURegister arg2, + CPURegister arg3) { + // We can only print sp if it is the current stack pointer. + if (!sp.Is(StackPointer())) { + VIXL_ASSERT(!sp.Aliases(arg0)); + VIXL_ASSERT(!sp.Aliases(arg1)); + VIXL_ASSERT(!sp.Aliases(arg2)); + VIXL_ASSERT(!sp.Aliases(arg3)); + } + + // Make sure that the macro assembler doesn't try to use any of our arguments + // as scratch registers. + UseScratchRegisterScope exclude_all(this); + exclude_all.ExcludeAll(); + + // Preserve all caller-saved registers as well as NZCV. + // If sp is the stack pointer, PushCPURegList asserts that the size of each + // list is a multiple of 16 bytes. + PushCPURegList(kCallerSaved); + PushCPURegList(kCallerSavedV); + + { + UseScratchRegisterScope temps(this); + // We can use caller-saved registers as scratch values (except for argN). + temps.Include(kCallerSaved); + temps.Include(kCallerSavedV); + temps.Exclude(arg0, arg1, arg2, arg3); + + // If any of the arguments are the current stack pointer, allocate a new + // register for them, and adjust the value to compensate for pushing the + // caller-saved registers. + bool arg0_sp = StackPointer().Aliases(arg0); + bool arg1_sp = StackPointer().Aliases(arg1); + bool arg2_sp = StackPointer().Aliases(arg2); + bool arg3_sp = StackPointer().Aliases(arg3); + if (arg0_sp || arg1_sp || arg2_sp || arg3_sp) { + // Allocate a register to hold the original stack pointer value, to pass + // to PrintfNoPreserve as an argument. + Register arg_sp = temps.AcquireX(); + Add(arg_sp, + StackPointer(), + kCallerSaved.GetTotalSizeInBytes() + + kCallerSavedV.GetTotalSizeInBytes()); + if (arg0_sp) arg0 = Register(arg_sp.GetCode(), arg0.GetSizeInBits()); + if (arg1_sp) arg1 = Register(arg_sp.GetCode(), arg1.GetSizeInBits()); + if (arg2_sp) arg2 = Register(arg_sp.GetCode(), arg2.GetSizeInBits()); + if (arg3_sp) arg3 = Register(arg_sp.GetCode(), arg3.GetSizeInBits()); + } + + // Preserve NZCV. + Register tmp = temps.AcquireX(); + Mrs(tmp, NZCV); + Push(tmp, xzr); + temps.Release(tmp); + + PrintfNoPreserve(format, arg0, arg1, arg2, arg3); + + // Restore NZCV. + tmp = temps.AcquireX(); + Pop(xzr, tmp); + Msr(NZCV, tmp); + temps.Release(tmp); + } + + PopCPURegList(kCallerSavedV); + PopCPURegList(kCallerSaved); +} + +// void MacroAssembler::Trace(TraceParameters parameters, TraceCommand command) { +// VIXL_ASSERT(allow_macro_instructions_); + +// if (generate_simulator_code_) { +// // The arguments to the trace pseudo instruction need to be contiguous in +// // memory, so make sure we don't try to emit a literal pool. +// ExactAssemblyScope scope(this, kTraceLength); + +// Label start; +// bind(&start); + +// // Refer to simulator-aarch64.h for a description of the marker and its +// // arguments. +// hlt(kTraceOpcode); + +// VIXL_ASSERT(GetSizeOfCodeGeneratedSince(&start) == kTraceParamsOffset); +// dc32(parameters); + +// VIXL_ASSERT(GetSizeOfCodeGeneratedSince(&start) == kTraceCommandOffset); +// dc32(command); +// } else { +// // Emit nothing on real hardware. +// USE(parameters, command); +// } +// } + + +// void MacroAssembler::Log(TraceParameters parameters) { +// VIXL_ASSERT(allow_macro_instructions_); + +// if (generate_simulator_code_) { +// // The arguments to the log pseudo instruction need to be contiguous in +// // memory, so make sure we don't try to emit a literal pool. +// ExactAssemblyScope scope(this, kLogLength); + +// Label start; +// bind(&start); + +// // Refer to simulator-aarch64.h for a description of the marker and its +// // arguments. +// hlt(kLogOpcode); + +// VIXL_ASSERT(GetSizeOfCodeGeneratedSince(&start) == kLogParamsOffset); +// dc32(parameters); +// } else { +// // Emit nothing on real hardware. +// USE(parameters); +// } +// } + + +void MacroAssembler::SetSimulatorCPUFeatures(const CPUFeatures& features) { + // ConfigureSimulatorCPUFeaturesHelper(features, kSetCPUFeaturesOpcode); +} + + +void MacroAssembler::EnableSimulatorCPUFeatures(const CPUFeatures& features) { + // ConfigureSimulatorCPUFeaturesHelper(features, kEnableCPUFeaturesOpcode); +} + + +void MacroAssembler::DisableSimulatorCPUFeatures(const CPUFeatures& features) { + // ConfigureSimulatorCPUFeaturesHelper(features, kDisableCPUFeaturesOpcode); +} + + +// void MacroAssembler::ConfigureSimulatorCPUFeaturesHelper( +// const CPUFeatures& features, DebugHltOpcode action) { +// VIXL_ASSERT(allow_macro_instructions_); +// VIXL_ASSERT(generate_simulator_code_); + +// typedef ConfigureCPUFeaturesElementType ElementType; +// VIXL_ASSERT(CPUFeatures::kNumberOfFeatures <= +// std::numeric_limits::max()); + +// size_t count = features.Count(); + +// size_t preamble_length = kConfigureCPUFeaturesListOffset; +// size_t list_length = (count + 1) * sizeof(ElementType); +// size_t padding_length = AlignUp(list_length, kInstructionSize) - list_length; + +// size_t total_length = preamble_length + list_length + padding_length; + +// // Check the overall code size as well as the size of each component. +// ExactAssemblyScope guard_total(this, total_length); + +// { // Preamble: the opcode itself. +// ExactAssemblyScope guard_preamble(this, preamble_length); +// hlt(action); +// } +// { // A kNone-terminated list of features. +// ExactAssemblyScope guard_list(this, list_length); +// for (CPUFeatures::const_iterator it = features.begin(); +// it != features.end(); +// ++it) { +// dc(static_cast(*it)); +// } +// dc(static_cast(CPUFeatures::kNone)); +// } +// { // Padding for instruction alignment. +// ExactAssemblyScope guard_padding(this, padding_length); +// for (size_t size = 0; size < padding_length; size += sizeof(ElementType)) { +// // The exact value is arbitrary. +// dc(static_cast(CPUFeatures::kNone)); +// } +// } +// } + +void MacroAssembler::SaveSimulatorCPUFeatures() { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(generate_simulator_code_); + SingleEmissionCheckScope guard(this); + hlt(kSaveCPUFeaturesOpcode); +} + + +void MacroAssembler::RestoreSimulatorCPUFeatures() { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(generate_simulator_code_); + SingleEmissionCheckScope guard(this); + hlt(kRestoreCPUFeaturesOpcode); +} + + +void UseScratchRegisterScope::Open(MacroAssembler* masm) { + VIXL_ASSERT(masm_ == NULL); + VIXL_ASSERT(masm != NULL); + masm_ = masm; + + CPURegList* available = masm->GetScratchRegisterList(); + CPURegList* available_v = masm->GetScratchVRegisterList(); + CPURegList* available_p = masm->GetScratchPRegisterList(); + old_available_ = available->GetList(); + old_available_v_ = available_v->GetList(); + old_available_p_ = available_p->GetList(); + VIXL_ASSERT(available->GetType() == CPURegister::kRegister); + VIXL_ASSERT(available_v->GetType() == CPURegister::kVRegister); + VIXL_ASSERT(available_p->GetType() == CPURegister::kPRegister); + + parent_ = masm->GetCurrentScratchRegisterScope(); + masm->SetCurrentScratchRegisterScope(this); +} + + +void UseScratchRegisterScope::Close() { + if (masm_ != NULL) { + // Ensure that scopes nest perfectly, and do not outlive their parents. + // This is a run-time check because the order of destruction of objects in + // the _same_ scope is implementation-defined, and is likely to change in + // optimised builds. + VIXL_CHECK(masm_->GetCurrentScratchRegisterScope() == this); + masm_->SetCurrentScratchRegisterScope(parent_); + + masm_->GetScratchRegisterList()->SetList(old_available_); + masm_->GetScratchVRegisterList()->SetList(old_available_v_); + masm_->GetScratchPRegisterList()->SetList(old_available_p_); + + masm_ = NULL; + } +} + + +bool UseScratchRegisterScope::IsAvailable(const CPURegister& reg) const { + return masm_->GetScratchRegisterList()->IncludesAliasOf(reg) || + masm_->GetScratchVRegisterList()->IncludesAliasOf(reg) || + masm_->GetScratchPRegisterList()->IncludesAliasOf(reg); +} + +Register UseScratchRegisterScope::AcquireRegisterOfSize(int size_in_bits) { + int code = AcquireFrom(masm_->GetScratchRegisterList()).GetCode(); + return Register(code, size_in_bits); +} + + +VRegister UseScratchRegisterScope::AcquireVRegisterOfSize(int size_in_bits) { + int code = AcquireFrom(masm_->GetScratchVRegisterList()).GetCode(); + return VRegister(code, size_in_bits); +} + + +void UseScratchRegisterScope::Release(const CPURegister& reg) { + VIXL_ASSERT(masm_ != NULL); + + // Release(NoReg) has no effect. + if (reg.IsNone()) return; + + ReleaseByCode(GetAvailableListFor(reg.GetBank()), reg.GetCode()); +} + + +void UseScratchRegisterScope::Include(const CPURegList& list) { + VIXL_ASSERT(masm_ != NULL); + + // Including an empty list has no effect. + if (list.IsEmpty()) return; + VIXL_ASSERT(list.GetType() != CPURegister::kNoRegister); + + RegList reg_list = list.GetList(); + if (list.GetType() == CPURegister::kRegister) { + // Make sure that neither sp nor xzr are included the list. + reg_list &= ~(xzr.GetBit() | sp.GetBit()); + } + + IncludeByRegList(GetAvailableListFor(list.GetBank()), reg_list); +} + + +void UseScratchRegisterScope::Include(const Register& reg1, + const Register& reg2, + const Register& reg3, + const Register& reg4) { + VIXL_ASSERT(masm_ != NULL); + RegList include = + reg1.GetBit() | reg2.GetBit() | reg3.GetBit() | reg4.GetBit(); + // Make sure that neither sp nor xzr are included the list. + include &= ~(xzr.GetBit() | sp.GetBit()); + + IncludeByRegList(masm_->GetScratchRegisterList(), include); +} + + +void UseScratchRegisterScope::Include(const VRegister& reg1, + const VRegister& reg2, + const VRegister& reg3, + const VRegister& reg4) { + RegList include = + reg1.GetBit() | reg2.GetBit() | reg3.GetBit() | reg4.GetBit(); + IncludeByRegList(masm_->GetScratchVRegisterList(), include); +} + + +void UseScratchRegisterScope::Include(const CPURegister& reg1, + const CPURegister& reg2, + const CPURegister& reg3, + const CPURegister& reg4) { + RegList include = 0; + RegList include_v = 0; + RegList include_p = 0; + + const CPURegister regs[] = {reg1, reg2, reg3, reg4}; + + for (size_t i = 0; i < ArrayLength(regs); i++) { + RegList bit = regs[i].GetBit(); + switch (regs[i].GetBank()) { + case CPURegister::kNoRegisterBank: + // Include(NoReg) has no effect. + VIXL_ASSERT(regs[i].IsNone()); + break; + case CPURegister::kRRegisterBank: + include |= bit; + break; + case CPURegister::kVRegisterBank: + include_v |= bit; + break; + case CPURegister::kPRegisterBank: + include_p |= bit; + break; + } + } + + IncludeByRegList(masm_->GetScratchRegisterList(), include); + IncludeByRegList(masm_->GetScratchVRegisterList(), include_v); + IncludeByRegList(masm_->GetScratchPRegisterList(), include_p); +} + + +void UseScratchRegisterScope::Exclude(const CPURegList& list) { + ExcludeByRegList(GetAvailableListFor(list.GetBank()), list.GetList()); +} + + +void UseScratchRegisterScope::Exclude(const Register& reg1, + const Register& reg2, + const Register& reg3, + const Register& reg4) { + RegList exclude = + reg1.GetBit() | reg2.GetBit() | reg3.GetBit() | reg4.GetBit(); + ExcludeByRegList(masm_->GetScratchRegisterList(), exclude); +} + + +void UseScratchRegisterScope::Exclude(const VRegister& reg1, + const VRegister& reg2, + const VRegister& reg3, + const VRegister& reg4) { + RegList exclude_v = + reg1.GetBit() | reg2.GetBit() | reg3.GetBit() | reg4.GetBit(); + ExcludeByRegList(masm_->GetScratchVRegisterList(), exclude_v); +} + + +void UseScratchRegisterScope::Exclude(const CPURegister& reg1, + const CPURegister& reg2, + const CPURegister& reg3, + const CPURegister& reg4) { + RegList exclude = 0; + RegList exclude_v = 0; + RegList exclude_p = 0; + + const CPURegister regs[] = {reg1, reg2, reg3, reg4}; + + for (size_t i = 0; i < ArrayLength(regs); i++) { + RegList bit = regs[i].GetBit(); + switch (regs[i].GetBank()) { + case CPURegister::kNoRegisterBank: + // Exclude(NoReg) has no effect. + VIXL_ASSERT(regs[i].IsNone()); + break; + case CPURegister::kRRegisterBank: + exclude |= bit; + break; + case CPURegister::kVRegisterBank: + exclude_v |= bit; + break; + case CPURegister::kPRegisterBank: + exclude_p |= bit; + break; + } + } + + ExcludeByRegList(masm_->GetScratchRegisterList(), exclude); + ExcludeByRegList(masm_->GetScratchVRegisterList(), exclude_v); + ExcludeByRegList(masm_->GetScratchPRegisterList(), exclude_p); +} + + +void UseScratchRegisterScope::ExcludeAll() { + ExcludeByRegList(masm_->GetScratchRegisterList(), + masm_->GetScratchRegisterList()->GetList()); + ExcludeByRegList(masm_->GetScratchVRegisterList(), + masm_->GetScratchVRegisterList()->GetList()); + ExcludeByRegList(masm_->GetScratchPRegisterList(), + masm_->GetScratchPRegisterList()->GetList()); +} + + +CPURegister UseScratchRegisterScope::AcquireFrom(CPURegList* available, + RegList mask) { + VIXL_CHECK((available->GetList() & mask) != 0); + CPURegister result = available->PopLowestIndex(mask); + VIXL_ASSERT(!AreAliased(result, xzr, sp)); + return result; +} + + +void UseScratchRegisterScope::ReleaseByCode(CPURegList* available, int code) { + ReleaseByRegList(available, static_cast(1) << code); +} + + +void UseScratchRegisterScope::ReleaseByRegList(CPURegList* available, + RegList regs) { + available->SetList(available->GetList() | regs); +} + + +void UseScratchRegisterScope::IncludeByRegList(CPURegList* available, + RegList regs) { + available->SetList(available->GetList() | regs); +} + + +void UseScratchRegisterScope::ExcludeByRegList(CPURegList* available, + RegList exclude) { + available->SetList(available->GetList() & ~exclude); +} + +CPURegList* UseScratchRegisterScope::GetAvailableListFor( + CPURegister::RegisterBank bank) { + switch (bank) { + case CPURegister::kNoRegisterBank: + return NULL; + case CPURegister::kRRegisterBank: + return masm_->GetScratchRegisterList(); + case CPURegister::kVRegisterBank: + return masm_->GetScratchVRegisterList(); + case CPURegister::kPRegisterBank: + return masm_->GetScratchPRegisterList(); + return NULL; + } + VIXL_UNREACHABLE(); + return NULL; +} + +} // namespace aarch64 +} // namespace vixl diff --git a/src/coreclr/jit/vixl/aarch64/macro-assembler-aarch64.h b/src/coreclr/jit/vixl/aarch64/macro-assembler-aarch64.h new file mode 100644 index 00000000000000..04ae44058c241e --- /dev/null +++ b/src/coreclr/jit/vixl/aarch64/macro-assembler-aarch64.h @@ -0,0 +1,7351 @@ +// Copyright 2015, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef VIXL_AARCH64_MACRO_ASSEMBLER_AARCH64_H_ +#define VIXL_AARCH64_MACRO_ASSEMBLER_AARCH64_H_ + +#include +#include + +#include "../code-generation-scopes-vixl.h" +#include "../globals-vixl.h" +#include "../macro-assembler-interface.h" + +#include "assembler-aarch64.h" +// Required for runtime call support. +// TODO: Break this dependency. We should be able to separate out the necessary +// parts so that we don't need to include the whole simulator header. +// #include "simulator-aarch64.h" +// Required in order to generate debugging instructions for the simulator. This +// is needed regardless of whether the simulator is included or not, since +// generating simulator specific instructions is controlled at runtime. +#include "simulator-constants-aarch64.h" + +#include "compiler.h" + +#define LS_MACRO_LIST(V) \ + V(Ldrb, Register&, rt, LDRB_w) \ + V(Strb, Register&, rt, STRB_w) \ + V(Ldrsb, Register&, rt, rt.Is64Bits() ? LDRSB_x : LDRSB_w) \ + V(Ldrh, Register&, rt, LDRH_w) \ + V(Strh, Register&, rt, STRH_w) \ + V(Ldrsh, Register&, rt, rt.Is64Bits() ? LDRSH_x : LDRSH_w) \ + V(Ldr, CPURegister&, rt, LoadOpFor(rt)) \ + V(Str, CPURegister&, rt, StoreOpFor(rt)) \ + V(Ldrsw, Register&, rt, LDRSW_x) + + +#define LSPAIR_MACRO_LIST(V) \ + V(Ldp, CPURegister&, rt, rt2, LoadPairOpFor(rt, rt2)) \ + V(Stp, CPURegister&, rt, rt2, StorePairOpFor(rt, rt2)) \ + V(Ldpsw, Register&, rt, rt2, LDPSW_x) + +namespace vixl { +namespace aarch64 { + +// Forward declaration +class MacroAssembler; +class UseScratchRegisterScope; + +class Pool { + public: + explicit Pool(MacroAssembler* masm) + : checkpoint_(kNoCheckpointRequired), masm_(masm) { + Reset(); + } + + void Reset() { + checkpoint_ = kNoCheckpointRequired; + monitor_ = 0; + } + + void Block() { monitor_++; } + void Release(); + bool IsBlocked() const { return monitor_ != 0; } + + static const ptrdiff_t kNoCheckpointRequired = PTRDIFF_MAX; + + void SetNextCheckpoint(ptrdiff_t checkpoint); + ptrdiff_t GetCheckpoint() const { return checkpoint_; } + VIXL_DEPRECATED("GetCheckpoint", ptrdiff_t checkpoint() const) { + return GetCheckpoint(); + } + + enum EmitOption { kBranchRequired, kNoBranchRequired }; + + protected: + // Next buffer offset at which a check is required for this pool. + ptrdiff_t checkpoint_; + // Indicates whether the emission of this pool is blocked. + int monitor_; + // The MacroAssembler using this pool. + MacroAssembler* masm_; +}; + + +class LiteralPool : public Pool { + public: + explicit LiteralPool(MacroAssembler* masm); + ~LiteralPool() VIXL_NEGATIVE_TESTING_ALLOW_EXCEPTION; + void Reset(); + + void AddEntry(RawLiteral* literal); + bool IsEmpty() const { return entries_.empty(); } + size_t GetSize() const; + VIXL_DEPRECATED("GetSize", size_t Size() const) { return GetSize(); } + + size_t GetMaxSize() const; + VIXL_DEPRECATED("GetMaxSize", size_t MaxSize() const) { return GetMaxSize(); } + + size_t GetOtherPoolsMaxSize() const; + VIXL_DEPRECATED("GetOtherPoolsMaxSize", size_t OtherPoolsMaxSize() const) { + return GetOtherPoolsMaxSize(); + } + + void CheckEmitFor(size_t amount, EmitOption option = kBranchRequired); + // Check whether we need to emit the literal pool in order to be able to + // safely emit a branch with a given range. + void CheckEmitForBranch(size_t range); + void Emit(EmitOption option = kNoBranchRequired); + + void SetNextRecommendedCheckpoint(ptrdiff_t offset); + ptrdiff_t GetNextRecommendedCheckpoint(); + VIXL_DEPRECATED("GetNextRecommendedCheckpoint", + ptrdiff_t NextRecommendedCheckpoint()) { + return GetNextRecommendedCheckpoint(); + } + + void UpdateFirstUse(ptrdiff_t use_position); + + void DeleteOnDestruction(RawLiteral* literal) { + deleted_on_destruction_.push_back(literal); + } + + // Recommended not exact since the pool can be blocked for short periods. + static const ptrdiff_t kRecommendedLiteralPoolRange = 128 * KBytes; + + private: + jitstd::vector entries_; + size_t size_; + ptrdiff_t first_use_; + // The parent class `Pool` provides a `checkpoint_`, which is the buffer + // offset before which a check *must* occur. This recommended checkpoint + // indicates when we would like to start emitting the constant pool. The + // MacroAssembler can, but does not have to, check the buffer when the + // checkpoint is reached. + ptrdiff_t recommended_checkpoint_; + + jitstd::vector deleted_on_destruction_; +}; + + +inline size_t LiteralPool::GetSize() const { + // Account for the pool header. + return size_ + kInstructionSize; +} + + +inline size_t LiteralPool::GetMaxSize() const { + // Account for the potential branch over the pool. + return GetSize() + kInstructionSize; +} + + +inline ptrdiff_t LiteralPool::GetNextRecommendedCheckpoint() { + return first_use_ + kRecommendedLiteralPoolRange; +} + + +class VeneerPool : public Pool { + public: + explicit VeneerPool(MacroAssembler* masm) : Pool(masm) {} + + void Reset(); + + void Block() { monitor_++; } + void Release(); + bool IsBlocked() const { return monitor_ != 0; } + bool IsEmpty() const { return unresolved_branches_.IsEmpty(); } + + class BranchInfo { + public: + BranchInfo() + : first_unreacheable_pc_(0), + pc_offset_(0), + label_(NULL), + branch_type_(UnknownBranchType) {} + BranchInfo(ptrdiff_t offset, Label* label, ImmBranchType branch_type) + : pc_offset_(offset), label_(label), branch_type_(branch_type) { + first_unreacheable_pc_ = + pc_offset_ + Instruction::GetImmBranchForwardRange(branch_type_); + } + + static bool IsValidComparison(const BranchInfo& branch_1, + const BranchInfo& branch_2) { + // BranchInfo are always compared against against other objects with + // the same branch type. + if (branch_1.branch_type_ != branch_2.branch_type_) { + return false; + } + // Since we should never have two branch infos with the same offsets, it + // first looks like we should check that offsets are different. However + // the operators may also be used to *search* for a branch info in the + // set. + bool same_offsets = (branch_1.pc_offset_ == branch_2.pc_offset_); + return (!same_offsets || ((branch_1.label_ == branch_2.label_) && + (branch_1.first_unreacheable_pc_ == + branch_2.first_unreacheable_pc_))); + } + + // We must provide comparison operators to work with InvalSet. + bool operator==(const BranchInfo& other) const { + VIXL_ASSERT(IsValidComparison(*this, other)); + return pc_offset_ == other.pc_offset_; + } + bool operator<(const BranchInfo& other) const { + VIXL_ASSERT(IsValidComparison(*this, other)); + return pc_offset_ < other.pc_offset_; + } + bool operator<=(const BranchInfo& other) const { + VIXL_ASSERT(IsValidComparison(*this, other)); + return pc_offset_ <= other.pc_offset_; + } + bool operator>(const BranchInfo& other) const { + VIXL_ASSERT(IsValidComparison(*this, other)); + return pc_offset_ > other.pc_offset_; + } + + // First instruction position that is not reachable by the branch using a + // positive branch offset. + ptrdiff_t first_unreacheable_pc_; + // Offset of the branch in the code generation buffer. + ptrdiff_t pc_offset_; + // The label branched to. + Label* label_; + ImmBranchType branch_type_; + }; + + bool BranchTypeUsesVeneers(ImmBranchType type) { + return (type != UnknownBranchType) && (type != UncondBranchType); + } + + void RegisterUnresolvedBranch(ptrdiff_t branch_pos, + Label* label, + ImmBranchType branch_type); + void DeleteUnresolvedBranchInfoForLabel(Label* label); + + bool ShouldEmitVeneer(int64_t first_unreacheable_pc, size_t amount); + bool ShouldEmitVeneers(size_t amount) { + return ShouldEmitVeneer(unresolved_branches_.GetFirstLimit(), amount); + } + + void CheckEmitFor(size_t amount, EmitOption option = kBranchRequired); + void Emit(EmitOption option, size_t margin); + + // The code size generated for a veneer. Currently one branch instruction. + // This is for code size checking purposes, and can be extended in the future + // for example if we decide to add nops between the veneers. + static const int kVeneerCodeSize = 1 * kInstructionSize; + // The maximum size of code other than veneers that can be generated when + // emitting a veneer pool. Currently there can be an additional branch to jump + // over the pool. + static const int kPoolNonVeneerCodeSize = 1 * kInstructionSize; + + void UpdateNextCheckPoint() { SetNextCheckpoint(GetNextCheckPoint()); } + + int GetNumberOfPotentialVeneers() const { + return static_cast(unresolved_branches_.GetSize()); + } + VIXL_DEPRECATED("GetNumberOfPotentialVeneers", + int NumberOfPotentialVeneers() const) { + return GetNumberOfPotentialVeneers(); + } + + size_t GetMaxSize() const { + return kPoolNonVeneerCodeSize + + unresolved_branches_.GetSize() * kVeneerCodeSize; + } + VIXL_DEPRECATED("GetMaxSize", size_t MaxSize() const) { return GetMaxSize(); } + + size_t GetOtherPoolsMaxSize() const; + VIXL_DEPRECATED("GetOtherPoolsMaxSize", size_t OtherPoolsMaxSize() const) { + return GetOtherPoolsMaxSize(); + } + + static const int kNPreallocatedInfos = 4; + static const ptrdiff_t kInvalidOffset = PTRDIFF_MAX; + static const size_t kReclaimFrom = 128; + static const size_t kReclaimFactor = 16; + + private: + typedef InvalSet + BranchInfoTypedSetBase; + typedef InvalSetIterator BranchInfoTypedSetIterBase; + + class BranchInfoTypedSet : public BranchInfoTypedSetBase { + public: + BranchInfoTypedSet() : BranchInfoTypedSetBase() {} + + ptrdiff_t GetFirstLimit() { + if (empty()) { + return kInvalidOffset; + } + return GetMinElementKey(); + } + VIXL_DEPRECATED("GetFirstLimit", ptrdiff_t FirstLimit()) { + return GetFirstLimit(); + } + }; + + class BranchInfoTypedSetIterator : public BranchInfoTypedSetIterBase { + public: + BranchInfoTypedSetIterator() : BranchInfoTypedSetIterBase(NULL) {} + explicit BranchInfoTypedSetIterator(BranchInfoTypedSet* typed_set) + : BranchInfoTypedSetIterBase(typed_set) {} + + // TODO: Remove these and use the STL-like interface instead. + using BranchInfoTypedSetIterBase::Advance; + using BranchInfoTypedSetIterBase::Current; + }; + + class BranchInfoSet { + public: + void insert(BranchInfo branch_info) { + ImmBranchType type = branch_info.branch_type_; + VIXL_ASSERT(IsValidBranchType(type)); + typed_set_[BranchIndexFromType(type)].insert(branch_info); + } + + void erase(BranchInfo branch_info) { + if (IsValidBranchType(branch_info.branch_type_)) { + int index = + BranchInfoSet::BranchIndexFromType(branch_info.branch_type_); + typed_set_[index].erase(branch_info); + } + } + + size_t GetSize() const { + size_t res = 0; + for (int i = 0; i < kNumberOfTrackedBranchTypes; i++) { + res += typed_set_[i].size(); + } + return res; + } + VIXL_DEPRECATED("GetSize", size_t size() const) { return GetSize(); } + + bool IsEmpty() const { + for (int i = 0; i < kNumberOfTrackedBranchTypes; i++) { + if (!typed_set_[i].empty()) { + return false; + } + } + return true; + } + VIXL_DEPRECATED("IsEmpty", bool empty() const) { return IsEmpty(); } + + ptrdiff_t GetFirstLimit() { + ptrdiff_t res = kInvalidOffset; + for (int i = 0; i < kNumberOfTrackedBranchTypes; i++) { + res = min(res, typed_set_[i].GetFirstLimit()); + } + return res; + } + VIXL_DEPRECATED("GetFirstLimit", ptrdiff_t FirstLimit()) { + return GetFirstLimit(); + } + + void Reset() { + for (int i = 0; i < kNumberOfTrackedBranchTypes; i++) { + typed_set_[i].clear(); + } + } + + static ImmBranchType BranchTypeFromIndex(int index) { + switch (index) { + case 0: + return CondBranchType; + case 1: + return CompareBranchType; + case 2: + return TestBranchType; + default: + VIXL_UNREACHABLE(); + return UnknownBranchType; + } + } + static int BranchIndexFromType(ImmBranchType branch_type) { + switch (branch_type) { + case CondBranchType: + return 0; + case CompareBranchType: + return 1; + case TestBranchType: + return 2; + default: + VIXL_UNREACHABLE(); + return 0; + } + } + + bool IsValidBranchType(ImmBranchType branch_type) { + return (branch_type != UnknownBranchType) && + (branch_type != UncondBranchType); + } + + private: + static const int kNumberOfTrackedBranchTypes = 3; + BranchInfoTypedSet typed_set_[kNumberOfTrackedBranchTypes]; + + friend class VeneerPool; + friend class BranchInfoSetIterator; + }; + + class BranchInfoSetIterator { + public: + explicit BranchInfoSetIterator(BranchInfoSet* set) : set_(set) { + for (int i = 0; i < BranchInfoSet::kNumberOfTrackedBranchTypes; i++) { + new (&sub_iterator_[i]) + BranchInfoTypedSetIterator(&(set_->typed_set_[i])); + } + } + + VeneerPool::BranchInfo* Current() { + for (int i = 0; i < BranchInfoSet::kNumberOfTrackedBranchTypes; i++) { + if (!sub_iterator_[i].Done()) { + return sub_iterator_[i].Current(); + } + } + VIXL_UNREACHABLE(); + return NULL; + } + + void Advance() { + VIXL_ASSERT(!Done()); + for (int i = 0; i < BranchInfoSet::kNumberOfTrackedBranchTypes; i++) { + if (!sub_iterator_[i].Done()) { + sub_iterator_[i].Advance(); + return; + } + } + VIXL_UNREACHABLE(); + } + + bool Done() const { + for (int i = 0; i < BranchInfoSet::kNumberOfTrackedBranchTypes; i++) { + if (!sub_iterator_[i].Done()) return false; + } + return true; + } + + void AdvanceToNextType() { + VIXL_ASSERT(!Done()); + for (int i = 0; i < BranchInfoSet::kNumberOfTrackedBranchTypes; i++) { + if (!sub_iterator_[i].Done()) { + sub_iterator_[i].Finish(); + return; + } + } + VIXL_UNREACHABLE(); + } + + void DeleteCurrentAndAdvance() { + for (int i = 0; i < BranchInfoSet::kNumberOfTrackedBranchTypes; i++) { + if (!sub_iterator_[i].Done()) { + sub_iterator_[i].DeleteCurrentAndAdvance(); + return; + } + } + } + + private: + BranchInfoSet* set_; + BranchInfoTypedSetIterator + sub_iterator_[BranchInfoSet::kNumberOfTrackedBranchTypes]; + }; + + ptrdiff_t GetNextCheckPoint() { + if (unresolved_branches_.IsEmpty()) { + return kNoCheckpointRequired; + } else { + return unresolved_branches_.GetFirstLimit(); + } + } + VIXL_DEPRECATED("GetNextCheckPoint", ptrdiff_t NextCheckPoint()) { + return GetNextCheckPoint(); + } + + // Information about unresolved (forward) branches. + BranchInfoSet unresolved_branches_; +}; + + +// Helper for common Emission checks. +// The macro-instruction maps to a single instruction. +class SingleEmissionCheckScope : public EmissionCheckScope { + public: + explicit SingleEmissionCheckScope(MacroAssemblerInterface* masm) + : EmissionCheckScope(masm, kInstructionSize) {} +}; + + +// The macro instruction is a "typical" macro-instruction. Typical macro- +// instruction only emit a few instructions, a few being defined as 8 here. +class MacroEmissionCheckScope : public EmissionCheckScope { + public: + explicit MacroEmissionCheckScope(MacroAssemblerInterface* masm) + : EmissionCheckScope(masm, kTypicalMacroInstructionMaxSize) {} + + private: + static const size_t kTypicalMacroInstructionMaxSize = 8 * kInstructionSize; +}; + + +// This scope simplifies the handling of the SVE `movprfx` instruction. +// +// If dst.Aliases(src): +// - Start an ExactAssemblyScope(masm, kInstructionSize). +// Otherwise: +// - Start an ExactAssemblyScope(masm, 2 * kInstructionSize). +// - Generate a suitable `movprfx` instruction. +// +// In both cases, the ExactAssemblyScope is left with enough remaining space for +// exactly one destructive instruction. +class MovprfxHelperScope : public ExactAssemblyScope { + public: + inline MovprfxHelperScope(MacroAssembler* masm, + const ZRegister& dst, + const ZRegister& src); + + inline MovprfxHelperScope(MacroAssembler* masm, + const ZRegister& dst, + const PRegister& pg, + const ZRegister& src); + + // TODO: Implement constructors that examine _all_ sources. If `dst` aliases + // any other source register, we can't use `movprfx`. This isn't obviously + // useful, but the MacroAssembler should not generate invalid code for it. + // Valid behaviour can be implemented using `mov`. + // + // The best way to handle this in an instruction-agnostic way is probably to + // use variadic templates. + + private: + inline bool ShouldGenerateMovprfx(const ZRegister& dst, + const ZRegister& src) { + VIXL_ASSERT(AreSameLaneSize(dst, src)); + return !dst.Aliases(src); + } + + inline bool ShouldGenerateMovprfx(const ZRegister& dst, + const PRegister& pg, + const ZRegister& src) { + VIXL_ASSERT(pg.IsMerging() || pg.IsZeroing()); + // We need to emit movprfx in two cases: + // 1. To give a predicated merging unary instruction zeroing predication. + // 2. To make destructive instructions constructive. + // + // There are no predicated zeroing instructions that can take movprfx, so we + // will never generate an unnecessary movprfx with this logic. + return pg.IsZeroing() || ShouldGenerateMovprfx(dst, src); + } +}; + + +enum BranchType { + // Copies of architectural conditions. + // The associated conditions can be used in place of those, the code will + // take care of reinterpreting them with the correct type. + integer_eq = eq, + integer_ne = ne, + integer_hs = hs, + integer_lo = lo, + integer_mi = mi, + integer_pl = pl, + integer_vs = vs, + integer_vc = vc, + integer_hi = hi, + integer_ls = ls, + integer_ge = ge, + integer_lt = lt, + integer_gt = gt, + integer_le = le, + integer_al = al, + integer_nv = nv, + + // These two are *different* from the architectural codes al and nv. + // 'always' is used to generate unconditional branches. + // 'never' is used to not generate a branch (generally as the inverse + // branch type of 'always). + always, + never, + // cbz and cbnz + reg_zero, + reg_not_zero, + // tbz and tbnz + reg_bit_clear, + reg_bit_set, + + // Aliases. + kBranchTypeFirstCondition = eq, + kBranchTypeLastCondition = nv, + kBranchTypeFirstUsingReg = reg_zero, + kBranchTypeFirstUsingBit = reg_bit_clear, + + // SVE branch conditions. + integer_none = eq, + integer_any = ne, + integer_nlast = cs, + integer_last = cc, + integer_first = mi, + integer_nfrst = pl, + integer_pmore = hi, + integer_plast = ls, + integer_tcont = ge, + integer_tstop = lt +}; + + +enum DiscardMoveMode { kDontDiscardForSameWReg, kDiscardForSameWReg }; + +// The macro assembler supports moving automatically pre-shifted immediates for +// arithmetic and logical instructions, and then applying a post shift in the +// instruction to undo the modification, in order to reduce the code emitted for +// an operation. For example: +// +// Add(x0, x0, 0x1f7de) => movz x16, 0xfbef; add x0, x0, x16, lsl #1. +// +// This optimisation can be only partially applied when the stack pointer is an +// operand or destination, so this enumeration is used to control the shift. +enum PreShiftImmMode { + kNoShift, // Don't pre-shift. + kLimitShiftForSP, // Limit pre-shift for add/sub extend use. + kAnyShift // Allow any pre-shift. +}; + +enum FPMacroNaNPropagationOption { + // The default option. This generates a run-time error in macros that respect + // this option. + NoFPMacroNaNPropagationSelected, + // For example, Fmin(result, NaN(a), NaN(b)) always selects NaN(a) if both + // NaN(a) and NaN(b) are both quiet, or both are signalling, at the + // cost of extra code generation in some cases. + StrictNaNPropagation, + // For example, Fmin(result, NaN(a), NaN(b)) selects either NaN, but using the + // fewest instructions. + FastNaNPropagation +}; + +class MacroAssembler : public Assembler, public MacroAssemblerInterface { + public: + explicit MacroAssembler( + Compiler* compiler, + PositionIndependentCodeOption pic = PositionIndependentCode); + MacroAssembler(Compiler* compiler, size_t capacity, + PositionIndependentCodeOption pic = PositionIndependentCode); + MacroAssembler(Compiler* compiler, byte* buffer, + size_t capacity, + PositionIndependentCodeOption pic = PositionIndependentCode); + ~MacroAssembler(); + + enum FinalizeOption { + kFallThrough, // There may be more code to execute after calling Finalize. + kUnreachable // Anything generated after calling Finalize is unreachable. + }; + + virtual vixl::internal::AssemblerBase* AsAssemblerBase() VIXL_OVERRIDE { + return this; + } + + // TODO(pools): implement these functions. + virtual void EmitPoolHeader() VIXL_OVERRIDE {} + virtual void EmitPoolFooter() VIXL_OVERRIDE {} + virtual void EmitPaddingBytes(int n) VIXL_OVERRIDE { USE(n); } + virtual void EmitNopBytes(int n) VIXL_OVERRIDE { USE(n); } + + // Start generating code from the beginning of the buffer, discarding any code + // and data that has already been emitted into the buffer. + // + // In order to avoid any accidental transfer of state, Reset ASSERTs that the + // constant pool is not blocked. + void Reset(); + + // Finalize a code buffer of generated instructions. This function must be + // called before executing or copying code from the buffer. By default, + // anything generated after this should not be reachable (the last instruction + // generated is an unconditional branch). If you need to generate more code, + // then set `option` to kFallThrough. + void FinalizeCode(FinalizeOption option = kUnreachable); + + + // Constant generation helpers. + // These functions return the number of instructions required to move the + // immediate into the destination register. Also, if the masm pointer is + // non-null, it generates the code to do so. + // The two features are implemented using one function to avoid duplication of + // the logic. + // The function can be used to evaluate the cost of synthesizing an + // instruction using 'mov immediate' instructions. A user might prefer loading + // a constant using the literal pool instead of using multiple 'mov immediate' + // instructions. + static int MoveImmediateHelper(MacroAssembler* masm, + const Register& rd, + uint64_t imm); + + + // Logical macros. + void And(const Register& rd, const Register& rn, const Operand& operand); + void Ands(const Register& rd, const Register& rn, const Operand& operand); + void Bic(const Register& rd, const Register& rn, const Operand& operand); + void Bics(const Register& rd, const Register& rn, const Operand& operand); + void Orr(const Register& rd, const Register& rn, const Operand& operand); + void Orn(const Register& rd, const Register& rn, const Operand& operand); + void Eor(const Register& rd, const Register& rn, const Operand& operand); + void Eon(const Register& rd, const Register& rn, const Operand& operand); + void Tst(const Register& rn, const Operand& operand); + void LogicalMacro(const Register& rd, + const Register& rn, + const Operand& operand, + LogicalOp op); + + // Add and sub macros. + void Add(const Register& rd, + const Register& rn, + const Operand& operand, + FlagsUpdate S = LeaveFlags); + void Adds(const Register& rd, const Register& rn, const Operand& operand); + void Sub(const Register& rd, + const Register& rn, + const Operand& operand, + FlagsUpdate S = LeaveFlags); + void Subs(const Register& rd, const Register& rn, const Operand& operand); + void Cmn(const Register& rn, const Operand& operand); + void Cmp(const Register& rn, const Operand& operand); + void Neg(const Register& rd, const Operand& operand); + void Negs(const Register& rd, const Operand& operand); + + void AddSubMacro(const Register& rd, + const Register& rn, + const Operand& operand, + FlagsUpdate S, + AddSubOp op); + + // Add/sub with carry macros. + void Adc(const Register& rd, const Register& rn, const Operand& operand); + void Adcs(const Register& rd, const Register& rn, const Operand& operand); + void Sbc(const Register& rd, const Register& rn, const Operand& operand); + void Sbcs(const Register& rd, const Register& rn, const Operand& operand); + void Ngc(const Register& rd, const Operand& operand); + void Ngcs(const Register& rd, const Operand& operand); + void AddSubWithCarryMacro(const Register& rd, + const Register& rn, + const Operand& operand, + FlagsUpdate S, + AddSubWithCarryOp op); + + void Rmif(const Register& xn, unsigned shift, StatusFlags flags); + void Setf8(const Register& wn); + void Setf16(const Register& wn); + + // Move macros. + void Mov(const Register& rd, uint64_t imm); + void Mov(const Register& rd, + const Operand& operand, + DiscardMoveMode discard_mode = kDontDiscardForSameWReg); + void Mvn(const Register& rd, uint64_t imm) { + Mov(rd, (rd.GetSizeInBits() == kXRegSize) ? ~imm : (~imm & kWRegMask)); + } + void Mvn(const Register& rd, const Operand& operand); + + // Try to move an immediate into the destination register in a single + // instruction. Returns true for success, and updates the contents of dst. + // Returns false, otherwise. + bool TryOneInstrMoveImmediate(const Register& dst, uint64_t imm); + + // Move an immediate into register dst, and return an Operand object for + // use with a subsequent instruction that accepts a shift. The value moved + // into dst is not necessarily equal to imm; it may have had a shifting + // operation applied to it that will be subsequently undone by the shift + // applied in the Operand. + Operand MoveImmediateForShiftedOp(const Register& dst, + uint64_t imm, + PreShiftImmMode mode); + + void Move(const GenericOperand& dst, const GenericOperand& src); + + // Synthesises the address represented by a MemOperand into a register. + void ComputeAddress(const Register& dst, const MemOperand& mem_op); + + // Conditional macros. + void Ccmp(const Register& rn, + const Operand& operand, + StatusFlags nzcv, + Condition cond); + void Ccmn(const Register& rn, + const Operand& operand, + StatusFlags nzcv, + Condition cond); + void ConditionalCompareMacro(const Register& rn, + const Operand& operand, + StatusFlags nzcv, + Condition cond, + ConditionalCompareOp op); + + // On return, the boolean values pointed to will indicate whether `left` and + // `right` should be synthesised in a temporary register. + static void GetCselSynthesisInformation(const Register& rd, + const Operand& left, + const Operand& right, + bool* should_synthesise_left, + bool* should_synthesise_right) { + // Note that the helper does not need to look at the condition. + CselHelper(NULL, + rd, + left, + right, + eq, + should_synthesise_left, + should_synthesise_right); + } + + void Csel(const Register& rd, + const Operand& left, + const Operand& right, + Condition cond) { + CselHelper(this, rd, left, right, cond); + } + +// Load/store macros. +#define DECLARE_FUNCTION(FN, REGTYPE, REG, OP) \ + void FN(const REGTYPE REG, const MemOperand& addr); + LS_MACRO_LIST(DECLARE_FUNCTION) +#undef DECLARE_FUNCTION + + void LoadStoreMacro(const CPURegister& rt, + const MemOperand& addr, + LoadStoreOp op); + +#define DECLARE_FUNCTION(FN, REGTYPE, REG, REG2, OP) \ + void FN(const REGTYPE REG, const REGTYPE REG2, const MemOperand& addr); + LSPAIR_MACRO_LIST(DECLARE_FUNCTION) +#undef DECLARE_FUNCTION + + void LoadStorePairMacro(const CPURegister& rt, + const CPURegister& rt2, + const MemOperand& addr, + LoadStorePairOp op); + + void Prfm(PrefetchOperation op, const MemOperand& addr); + + // Push or pop up to 4 registers of the same width to or from the stack, + // using the current stack pointer as set by SetStackPointer. + // + // If an argument register is 'NoReg', all further arguments are also assumed + // to be 'NoReg', and are thus not pushed or popped. + // + // Arguments are ordered such that "Push(a, b);" is functionally equivalent + // to "Push(a); Push(b);". + // + // It is valid to push the same register more than once, and there is no + // restriction on the order in which registers are specified. + // + // It is not valid to pop into the same register more than once in one + // operation, not even into the zero register. + // + // If the current stack pointer (as set by SetStackPointer) is sp, then it + // must be aligned to 16 bytes on entry and the total size of the specified + // registers must also be a multiple of 16 bytes. + // + // Even if the current stack pointer is not the system stack pointer (sp), + // Push (and derived methods) will still modify the system stack pointer in + // order to comply with ABI rules about accessing memory below the system + // stack pointer. + // + // Other than the registers passed into Pop, the stack pointer and (possibly) + // the system stack pointer, these methods do not modify any other registers. + void Push(const CPURegister& src0, + const CPURegister& src1 = NoReg, + const CPURegister& src2 = NoReg, + const CPURegister& src3 = NoReg); + void Pop(const CPURegister& dst0, + const CPURegister& dst1 = NoReg, + const CPURegister& dst2 = NoReg, + const CPURegister& dst3 = NoReg); + + // Alternative forms of Push and Pop, taking a RegList or CPURegList that + // specifies the registers that are to be pushed or popped. Higher-numbered + // registers are associated with higher memory addresses (as in the A32 push + // and pop instructions). + // + // (Push|Pop)SizeRegList allow you to specify the register size as a + // parameter. Only kXRegSize, kWRegSize, kDRegSize and kSRegSize are + // supported. + // + // Otherwise, (Push|Pop)(CPU|X|W|D|S)RegList is preferred. + void PushCPURegList(CPURegList registers); + void PopCPURegList(CPURegList registers); + + void PushSizeRegList( + RegList registers, + unsigned reg_size, + CPURegister::RegisterType type = CPURegister::kRegister) { + PushCPURegList(CPURegList(type, reg_size, registers)); + } + void PopSizeRegList(RegList registers, + unsigned reg_size, + CPURegister::RegisterType type = CPURegister::kRegister) { + PopCPURegList(CPURegList(type, reg_size, registers)); + } + void PushXRegList(RegList regs) { PushSizeRegList(regs, kXRegSize); } + void PopXRegList(RegList regs) { PopSizeRegList(regs, kXRegSize); } + void PushWRegList(RegList regs) { PushSizeRegList(regs, kWRegSize); } + void PopWRegList(RegList regs) { PopSizeRegList(regs, kWRegSize); } + void PushDRegList(RegList regs) { + PushSizeRegList(regs, kDRegSize, CPURegister::kVRegister); + } + void PopDRegList(RegList regs) { + PopSizeRegList(regs, kDRegSize, CPURegister::kVRegister); + } + void PushSRegList(RegList regs) { + PushSizeRegList(regs, kSRegSize, CPURegister::kVRegister); + } + void PopSRegList(RegList regs) { + PopSizeRegList(regs, kSRegSize, CPURegister::kVRegister); + } + + // Push the specified register 'count' times. + void PushMultipleTimes(int count, Register src); + + // Poke 'src' onto the stack. The offset is in bytes. + // + // If the current stack pointer (as set by SetStackPointer) is sp, then sp + // must be aligned to 16 bytes. + void Poke(const Register& src, const Operand& offset); + + // Peek at a value on the stack, and put it in 'dst'. The offset is in bytes. + // + // If the current stack pointer (as set by SetStackPointer) is sp, then sp + // must be aligned to 16 bytes. + void Peek(const Register& dst, const Operand& offset); + + // Alternative forms of Peek and Poke, taking a RegList or CPURegList that + // specifies the registers that are to be pushed or popped. Higher-numbered + // registers are associated with higher memory addresses. + // + // (Peek|Poke)SizeRegList allow you to specify the register size as a + // parameter. Only kXRegSize, kWRegSize, kDRegSize and kSRegSize are + // supported. + // + // Otherwise, (Peek|Poke)(CPU|X|W|D|S)RegList is preferred. + void PeekCPURegList(CPURegList registers, int64_t offset) { + LoadCPURegList(registers, MemOperand(StackPointer(), offset)); + } + void PokeCPURegList(CPURegList registers, int64_t offset) { + StoreCPURegList(registers, MemOperand(StackPointer(), offset)); + } + + void PeekSizeRegList( + RegList registers, + int64_t offset, + unsigned reg_size, + CPURegister::RegisterType type = CPURegister::kRegister) { + PeekCPURegList(CPURegList(type, reg_size, registers), offset); + } + void PokeSizeRegList( + RegList registers, + int64_t offset, + unsigned reg_size, + CPURegister::RegisterType type = CPURegister::kRegister) { + PokeCPURegList(CPURegList(type, reg_size, registers), offset); + } + void PeekXRegList(RegList regs, int64_t offset) { + PeekSizeRegList(regs, offset, kXRegSize); + } + void PokeXRegList(RegList regs, int64_t offset) { + PokeSizeRegList(regs, offset, kXRegSize); + } + void PeekWRegList(RegList regs, int64_t offset) { + PeekSizeRegList(regs, offset, kWRegSize); + } + void PokeWRegList(RegList regs, int64_t offset) { + PokeSizeRegList(regs, offset, kWRegSize); + } + void PeekDRegList(RegList regs, int64_t offset) { + PeekSizeRegList(regs, offset, kDRegSize, CPURegister::kVRegister); + } + void PokeDRegList(RegList regs, int64_t offset) { + PokeSizeRegList(regs, offset, kDRegSize, CPURegister::kVRegister); + } + void PeekSRegList(RegList regs, int64_t offset) { + PeekSizeRegList(regs, offset, kSRegSize, CPURegister::kVRegister); + } + void PokeSRegList(RegList regs, int64_t offset) { + PokeSizeRegList(regs, offset, kSRegSize, CPURegister::kVRegister); + } + + + // Claim or drop stack space without actually accessing memory. + // + // If the current stack pointer (as set by SetStackPointer) is sp, then it + // must be aligned to 16 bytes and the size claimed or dropped must be a + // multiple of 16 bytes. + void Claim(const Operand& size); + void Drop(const Operand& size); + + // As above, but for multiples of the SVE vector length. + void ClaimVL(int64_t multiplier) { + // We never need to worry about sp alignment because the VL is always a + // multiple of 16. + VIXL_STATIC_ASSERT((kZRegMinSizeInBytes % 16) == 0); + VIXL_ASSERT(multiplier >= 0); + Addvl(sp, sp, -multiplier); + } + void DropVL(int64_t multiplier) { + VIXL_STATIC_ASSERT((kZRegMinSizeInBytes % 16) == 0); + VIXL_ASSERT(multiplier >= 0); + Addvl(sp, sp, multiplier); + } + + // Preserve the callee-saved registers (as defined by AAPCS64). + // + // Higher-numbered registers are pushed before lower-numbered registers, and + // thus get higher addresses. + // Floating-point registers are pushed before general-purpose registers, and + // thus get higher addresses. + // + // This method must not be called unless StackPointer() is sp, and it is + // aligned to 16 bytes. + void PushCalleeSavedRegisters(); + + // Restore the callee-saved registers (as defined by AAPCS64). + // + // Higher-numbered registers are popped after lower-numbered registers, and + // thus come from higher addresses. + // Floating-point registers are popped after general-purpose registers, and + // thus come from higher addresses. + // + // This method must not be called unless StackPointer() is sp, and it is + // aligned to 16 bytes. + void PopCalleeSavedRegisters(); + + void LoadCPURegList(CPURegList registers, const MemOperand& src); + void StoreCPURegList(CPURegList registers, const MemOperand& dst); + + // Remaining instructions are simple pass-through calls to the assembler. + void Adr(const Register& rd, Label* label) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + SingleEmissionCheckScope guard(this); + adr(rd, label); + } + void Adrp(const Register& rd, Label* label) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + SingleEmissionCheckScope guard(this); + adrp(rd, label); + } + void Asr(const Register& rd, const Register& rn, unsigned shift) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + SingleEmissionCheckScope guard(this); + asr(rd, rn, shift); + } + void Asr(const Register& rd, const Register& rn, const Register& rm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + VIXL_ASSERT(!rm.IsZero()); + SingleEmissionCheckScope guard(this); + asrv(rd, rn, rm); + } + + // Branch type inversion relies on these relations. + VIXL_STATIC_ASSERT((reg_zero == (reg_not_zero ^ 1)) && + (reg_bit_clear == (reg_bit_set ^ 1)) && + (always == (never ^ 1))); + + BranchType InvertBranchType(BranchType type) { + if (kBranchTypeFirstCondition <= type && type <= kBranchTypeLastCondition) { + return static_cast( + InvertCondition(static_cast(type))); + } else { + return static_cast(type ^ 1); + } + } + + void B(Label* label, BranchType type, Register reg = NoReg, int bit = -1); + + void B(Label* label); + void B(Label* label, Condition cond); + void B(Condition cond, Label* label) { B(label, cond); } + void Bfm(const Register& rd, + const Register& rn, + unsigned immr, + unsigned imms) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + SingleEmissionCheckScope guard(this); + bfm(rd, rn, immr, imms); + } + void Bfi(const Register& rd, + const Register& rn, + unsigned lsb, + unsigned width) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + SingleEmissionCheckScope guard(this); + bfi(rd, rn, lsb, width); + } + void Bfc(const Register& rd, unsigned lsb, unsigned width) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + SingleEmissionCheckScope guard(this); + bfc(rd, lsb, width); + } + void Bfxil(const Register& rd, + const Register& rn, + unsigned lsb, + unsigned width) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + SingleEmissionCheckScope guard(this); + bfxil(rd, rn, lsb, width); + } + void Bind(Label* label, BranchTargetIdentifier id = EmitBTI_none); + // Bind a label to a specified offset from the start of the buffer. + void BindToOffset(Label* label, ptrdiff_t offset); + void Bl(Label* label) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + bl(label); + } + void Blr(const Register& xn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!xn.IsZero()); + SingleEmissionCheckScope guard(this); + blr(xn); + } + void Br(const Register& xn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!xn.IsZero()); + SingleEmissionCheckScope guard(this); + br(xn); + } + void Braaz(const Register& xn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + braaz(xn); + } + void Brabz(const Register& xn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + brabz(xn); + } + void Blraaz(const Register& xn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + blraaz(xn); + } + void Blrabz(const Register& xn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + blrabz(xn); + } + void Retaa() { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + retaa(); + } + void Retab() { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + retab(); + } + void Braa(const Register& xn, const Register& xm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + braa(xn, xm); + } + void Brab(const Register& xn, const Register& xm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + brab(xn, xm); + } + void Blraa(const Register& xn, const Register& xm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + blraa(xn, xm); + } + void Blrab(const Register& xn, const Register& xm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + blrab(xn, xm); + } + void Brk(int code = 0) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + brk(code); + } + void Cbnz(const Register& rt, Label* label); + void Cbz(const Register& rt, Label* label); + void Cinc(const Register& rd, const Register& rn, Condition cond) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + SingleEmissionCheckScope guard(this); + cinc(rd, rn, cond); + } + void Cinv(const Register& rd, const Register& rn, Condition cond) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + SingleEmissionCheckScope guard(this); + cinv(rd, rn, cond); + } + +#define PAUTH_SYSTEM_MODES(V) \ + V(az) \ + V(bz) \ + V(asp) \ + V(bsp) + +#define DEFINE_MACRO_ASM_FUNCS(SUFFIX) \ + void Paci##SUFFIX() { \ + VIXL_ASSERT(allow_macro_instructions_); \ + SingleEmissionCheckScope guard(this); \ + paci##SUFFIX(); \ + } \ + void Auti##SUFFIX() { \ + VIXL_ASSERT(allow_macro_instructions_); \ + SingleEmissionCheckScope guard(this); \ + auti##SUFFIX(); \ + } + + PAUTH_SYSTEM_MODES(DEFINE_MACRO_ASM_FUNCS) +#undef DEFINE_MACRO_ASM_FUNCS + + // The 1716 pac and aut instructions encourage people to use x16 and x17 + // directly, perhaps without realising that this is forbidden. For example: + // + // UseScratchRegisterScope temps(&masm); + // Register temp = temps.AcquireX(); // temp will be x16 + // __ Mov(x17, ptr); + // __ Mov(x16, modifier); // Will override temp! + // __ Pacia1716(); + // + // To work around this issue, you must exclude x16 and x17 from the scratch + // register list. You may need to replace them with other registers: + // + // UseScratchRegisterScope temps(&masm); + // temps.Exclude(x16, x17); + // temps.Include(x10, x11); + // __ Mov(x17, ptr); + // __ Mov(x16, modifier); + // __ Pacia1716(); + void Pacia1716() { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!GetScratchRegisterList()->IncludesAliasOf(x16)); + VIXL_ASSERT(!GetScratchRegisterList()->IncludesAliasOf(x17)); + SingleEmissionCheckScope guard(this); + pacia1716(); + } + void Pacib1716() { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!GetScratchRegisterList()->IncludesAliasOf(x16)); + VIXL_ASSERT(!GetScratchRegisterList()->IncludesAliasOf(x17)); + SingleEmissionCheckScope guard(this); + pacib1716(); + } + void Autia1716() { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!GetScratchRegisterList()->IncludesAliasOf(x16)); + VIXL_ASSERT(!GetScratchRegisterList()->IncludesAliasOf(x17)); + SingleEmissionCheckScope guard(this); + autia1716(); + } + void Autib1716() { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!GetScratchRegisterList()->IncludesAliasOf(x16)); + VIXL_ASSERT(!GetScratchRegisterList()->IncludesAliasOf(x17)); + SingleEmissionCheckScope guard(this); + autib1716(); + } + void Xpaclri() { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + xpaclri(); + } + void Clrex() { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + clrex(); + } + void Cls(const Register& rd, const Register& rn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + SingleEmissionCheckScope guard(this); + cls(rd, rn); + } + void Clz(const Register& rd, const Register& rn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + SingleEmissionCheckScope guard(this); + clz(rd, rn); + } + void Cneg(const Register& rd, const Register& rn, Condition cond) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + SingleEmissionCheckScope guard(this); + cneg(rd, rn, cond); + } + void Esb() { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + esb(); + } + void Csdb() { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + csdb(); + } + void Cset(const Register& rd, Condition cond) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + SingleEmissionCheckScope guard(this); + cset(rd, cond); + } + void Csetm(const Register& rd, Condition cond) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + SingleEmissionCheckScope guard(this); + csetm(rd, cond); + } + void Csinc(const Register& rd, + const Register& rn, + const Register& rm, + Condition cond) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT((cond != al) && (cond != nv)); + SingleEmissionCheckScope guard(this); + csinc(rd, rn, rm, cond); + } + void Csinv(const Register& rd, + const Register& rn, + const Register& rm, + Condition cond) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT((cond != al) && (cond != nv)); + SingleEmissionCheckScope guard(this); + csinv(rd, rn, rm, cond); + } + void Csneg(const Register& rd, + const Register& rn, + const Register& rm, + Condition cond) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT((cond != al) && (cond != nv)); + SingleEmissionCheckScope guard(this); + csneg(rd, rn, rm, cond); + } + void Dmb(BarrierDomain domain, BarrierType type) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + dmb(domain, type); + } + void Dsb(BarrierDomain domain, BarrierType type) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + dsb(domain, type); + } + void Extr(const Register& rd, + const Register& rn, + const Register& rm, + unsigned lsb) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + VIXL_ASSERT(!rm.IsZero()); + SingleEmissionCheckScope guard(this); + extr(rd, rn, rm, lsb); + } + void Fadd(const VRegister& vd, const VRegister& vn, const VRegister& vm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fadd(vd, vn, vm); + } + void Fccmp(const VRegister& vn, + const VRegister& vm, + StatusFlags nzcv, + Condition cond, + FPTrapFlags trap = DisableTrap) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT((cond != al) && (cond != nv)); + SingleEmissionCheckScope guard(this); + FPCCompareMacro(vn, vm, nzcv, cond, trap); + } + void Fccmpe(const VRegister& vn, + const VRegister& vm, + StatusFlags nzcv, + Condition cond) { + Fccmp(vn, vm, nzcv, cond, EnableTrap); + } + void Fcmp(const VRegister& vn, + const VRegister& vm, + FPTrapFlags trap = DisableTrap) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + FPCompareMacro(vn, vm, trap); + } + void Fcmp(const VRegister& vn, double value, FPTrapFlags trap = DisableTrap); + void Fcmpe(const VRegister& vn, double value); + void Fcmpe(const VRegister& vn, const VRegister& vm) { + Fcmp(vn, vm, EnableTrap); + } + void Fcsel(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + Condition cond) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT((cond != al) && (cond != nv)); + SingleEmissionCheckScope guard(this); + fcsel(vd, vn, vm, cond); + } + void Fcvt(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fcvt(vd, vn); + } + void Fcvtl(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fcvtl(vd, vn); + } + void Fcvtl2(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fcvtl2(vd, vn); + } + void Fcvtn(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fcvtn(vd, vn); + } + void Fcvtn2(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fcvtn2(vd, vn); + } + void Fcvtxn(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fcvtxn(vd, vn); + } + void Fcvtxn2(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fcvtxn2(vd, vn); + } + void Fcvtas(const Register& rd, const VRegister& vn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + SingleEmissionCheckScope guard(this); + fcvtas(rd, vn); + } + void Fcvtau(const Register& rd, const VRegister& vn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + SingleEmissionCheckScope guard(this); + fcvtau(rd, vn); + } + void Fcvtms(const Register& rd, const VRegister& vn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + SingleEmissionCheckScope guard(this); + fcvtms(rd, vn); + } + void Fcvtmu(const Register& rd, const VRegister& vn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + SingleEmissionCheckScope guard(this); + fcvtmu(rd, vn); + } + void Fcvtns(const Register& rd, const VRegister& vn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + SingleEmissionCheckScope guard(this); + fcvtns(rd, vn); + } + void Fcvtnu(const Register& rd, const VRegister& vn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + SingleEmissionCheckScope guard(this); + fcvtnu(rd, vn); + } + void Fcvtps(const Register& rd, const VRegister& vn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + SingleEmissionCheckScope guard(this); + fcvtps(rd, vn); + } + void Fcvtpu(const Register& rd, const VRegister& vn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + SingleEmissionCheckScope guard(this); + fcvtpu(rd, vn); + } + void Fcvtzs(const Register& rd, const VRegister& vn, int fbits = 0) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + SingleEmissionCheckScope guard(this); + fcvtzs(rd, vn, fbits); + } + void Fjcvtzs(const Register& rd, const VRegister& vn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + SingleEmissionCheckScope guard(this); + fjcvtzs(rd, vn); + } + void Fcvtzu(const Register& rd, const VRegister& vn, int fbits = 0) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + SingleEmissionCheckScope guard(this); + fcvtzu(rd, vn, fbits); + } + void Fdiv(const VRegister& vd, const VRegister& vn, const VRegister& vm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fdiv(vd, vn, vm); + } + void Fmax(const VRegister& vd, const VRegister& vn, const VRegister& vm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fmax(vd, vn, vm); + } + void Fmaxnm(const VRegister& vd, const VRegister& vn, const VRegister& vm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fmaxnm(vd, vn, vm); + } + void Fmin(const VRegister& vd, const VRegister& vn, const VRegister& vm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fmin(vd, vn, vm); + } + void Fminnm(const VRegister& vd, const VRegister& vn, const VRegister& vm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fminnm(vd, vn, vm); + } + void Fmov(const VRegister& vd, const VRegister& vn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + // TODO: Use DiscardMoveMode to allow this move to be elided if vd.Is(vn). + fmov(vd, vn); + } + void Fmov(const VRegister& vd, const Register& rn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rn.IsZero()); + SingleEmissionCheckScope guard(this); + fmov(vd, rn); + } + void Fmov(const VRegister& vd, int index, const Register& rn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + if (vd.Is1D() && (index == 0)) { + mov(vd, index, rn); + } else { + fmov(vd, index, rn); + } + } + void Fmov(const Register& rd, const VRegister& vn, int index) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + if (vn.Is1D() && (index == 0)) { + mov(rd, vn, index); + } else { + fmov(rd, vn, index); + } + } + + // Provide explicit double and float interfaces for FP immediate moves, rather + // than relying on implicit C++ casts. This allows signalling NaNs to be + // preserved when the immediate matches the format of vd. Most systems convert + // signalling NaNs to quiet NaNs when converting between float and double. + void Fmov(VRegister vd, double imm); + void Fmov(VRegister vd, float imm); + void Fmov(VRegister vd, const Float16 imm); + // Provide a template to allow other types to be converted automatically. + template + void Fmov(VRegister vd, T imm) { + VIXL_ASSERT(allow_macro_instructions_); + Fmov(vd, static_cast(imm)); + } + void Fmov(Register rd, VRegister vn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + SingleEmissionCheckScope guard(this); + fmov(rd, vn); + } + void Fmul(const VRegister& vd, const VRegister& vn, const VRegister& vm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fmul(vd, vn, vm); + } + void Fnmul(const VRegister& vd, const VRegister& vn, const VRegister& vm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fnmul(vd, vn, vm); + } + void Fmadd(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + const VRegister& va) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fmadd(vd, vn, vm, va); + } + void Fmsub(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + const VRegister& va) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fmsub(vd, vn, vm, va); + } + void Fnmadd(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + const VRegister& va) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fnmadd(vd, vn, vm, va); + } + void Fnmsub(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + const VRegister& va) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fnmsub(vd, vn, vm, va); + } + void Fsub(const VRegister& vd, const VRegister& vn, const VRegister& vm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fsub(vd, vn, vm); + } + void Hint(SystemHint code) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + hint(code); + } + void Hint(int imm7) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + hint(imm7); + } + void Hlt(int code) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + hlt(code); + } + void Isb() { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + isb(); + } + void Ldar(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldar(rt, src); + } + void Ldarb(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldarb(rt, src); + } + void Ldarh(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldarh(rt, src); + } + void Ldlar(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldlar(rt, src); + } + void Ldlarb(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldlarb(rt, src); + } + void Ldlarh(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldlarh(rt, src); + } + void Ldaxp(const Register& rt, const Register& rt2, const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rt.Aliases(rt2)); + SingleEmissionCheckScope guard(this); + ldaxp(rt, rt2, src); + } + void Ldaxr(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldaxr(rt, src); + } + void Ldaxrb(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldaxrb(rt, src); + } + void Ldaxrh(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldaxrh(rt, src); + } + +// clang-format off +#define COMPARE_AND_SWAP_SINGLE_MACRO_LIST(V) \ + V(cas, Cas) \ + V(casa, Casa) \ + V(casl, Casl) \ + V(casal, Casal) \ + V(casb, Casb) \ + V(casab, Casab) \ + V(caslb, Caslb) \ + V(casalb, Casalb) \ + V(cash, Cash) \ + V(casah, Casah) \ + V(caslh, Caslh) \ + V(casalh, Casalh) +// clang-format on + +#define DEFINE_MACRO_ASM_FUNC(ASM, MASM) \ + void MASM(const Register& rs, const Register& rt, const MemOperand& src) { \ + VIXL_ASSERT(allow_macro_instructions_); \ + SingleEmissionCheckScope guard(this); \ + ASM(rs, rt, src); \ + } + COMPARE_AND_SWAP_SINGLE_MACRO_LIST(DEFINE_MACRO_ASM_FUNC) +#undef DEFINE_MACRO_ASM_FUNC + + +// clang-format off +#define COMPARE_AND_SWAP_PAIR_MACRO_LIST(V) \ + V(casp, Casp) \ + V(caspa, Caspa) \ + V(caspl, Caspl) \ + V(caspal, Caspal) +// clang-format on + +#define DEFINE_MACRO_ASM_FUNC(ASM, MASM) \ + void MASM(const Register& rs, \ + const Register& rs2, \ + const Register& rt, \ + const Register& rt2, \ + const MemOperand& src) { \ + VIXL_ASSERT(allow_macro_instructions_); \ + SingleEmissionCheckScope guard(this); \ + ASM(rs, rs2, rt, rt2, src); \ + } + COMPARE_AND_SWAP_PAIR_MACRO_LIST(DEFINE_MACRO_ASM_FUNC) +#undef DEFINE_MACRO_ASM_FUNC + +// These macros generate all the variations of the atomic memory operations, +// e.g. ldadd, ldadda, ldaddb, staddl, etc. + +// clang-format off +#define ATOMIC_MEMORY_SIMPLE_MACRO_LIST(V, DEF, MASM_PRE, ASM_PRE) \ + V(DEF, MASM_PRE##add, ASM_PRE##add) \ + V(DEF, MASM_PRE##clr, ASM_PRE##clr) \ + V(DEF, MASM_PRE##eor, ASM_PRE##eor) \ + V(DEF, MASM_PRE##set, ASM_PRE##set) \ + V(DEF, MASM_PRE##smax, ASM_PRE##smax) \ + V(DEF, MASM_PRE##smin, ASM_PRE##smin) \ + V(DEF, MASM_PRE##umax, ASM_PRE##umax) \ + V(DEF, MASM_PRE##umin, ASM_PRE##umin) + +#define ATOMIC_MEMORY_STORE_MACRO_MODES(V, MASM, ASM) \ + V(MASM, ASM) \ + V(MASM##l, ASM##l) \ + V(MASM##b, ASM##b) \ + V(MASM##lb, ASM##lb) \ + V(MASM##h, ASM##h) \ + V(MASM##lh, ASM##lh) + +#define ATOMIC_MEMORY_LOAD_MACRO_MODES(V, MASM, ASM) \ + ATOMIC_MEMORY_STORE_MACRO_MODES(V, MASM, ASM) \ + V(MASM##a, ASM##a) \ + V(MASM##al, ASM##al) \ + V(MASM##ab, ASM##ab) \ + V(MASM##alb, ASM##alb) \ + V(MASM##ah, ASM##ah) \ + V(MASM##alh, ASM##alh) +// clang-format on + +#define DEFINE_MACRO_LOAD_ASM_FUNC(MASM, ASM) \ + void MASM(const Register& rs, const Register& rt, const MemOperand& src) { \ + VIXL_ASSERT(allow_macro_instructions_); \ + SingleEmissionCheckScope guard(this); \ + ASM(rs, rt, src); \ + } +#define DEFINE_MACRO_STORE_ASM_FUNC(MASM, ASM) \ + void MASM(const Register& rs, const MemOperand& src) { \ + VIXL_ASSERT(allow_macro_instructions_); \ + SingleEmissionCheckScope guard(this); \ + ASM(rs, src); \ + } + + ATOMIC_MEMORY_SIMPLE_MACRO_LIST(ATOMIC_MEMORY_LOAD_MACRO_MODES, + DEFINE_MACRO_LOAD_ASM_FUNC, + Ld, + ld) + ATOMIC_MEMORY_SIMPLE_MACRO_LIST(ATOMIC_MEMORY_STORE_MACRO_MODES, + DEFINE_MACRO_STORE_ASM_FUNC, + St, + st) + +#define DEFINE_MACRO_SWP_ASM_FUNC(MASM, ASM) \ + void MASM(const Register& rs, const Register& rt, const MemOperand& src) { \ + VIXL_ASSERT(allow_macro_instructions_); \ + SingleEmissionCheckScope guard(this); \ + ASM(rs, rt, src); \ + } + + ATOMIC_MEMORY_LOAD_MACRO_MODES(DEFINE_MACRO_SWP_ASM_FUNC, Swp, swp) + +#undef DEFINE_MACRO_LOAD_ASM_FUNC +#undef DEFINE_MACRO_STORE_ASM_FUNC +#undef DEFINE_MACRO_SWP_ASM_FUNC + + void Ldaprb(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + VIXL_ASSERT(src.IsImmediateOffset()); + if (src.GetOffset() == 0) { + ldaprb(rt, src); + } else { + ldapurb(rt, src); + } + } + + void Ldapursb(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldapursb(rt, src); + } + + void Ldaprh(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + VIXL_ASSERT(src.IsImmediateOffset()); + if (src.GetOffset() == 0) { + ldaprh(rt, src); + } else { + ldapurh(rt, src); + } + } + + void Ldapursh(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldapursh(rt, src); + } + + void Ldapr(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + VIXL_ASSERT(src.IsImmediateOffset()); + if (src.GetOffset() == 0) { + ldapr(rt, src); + } else { + ldapur(rt, src); + } + } + + void Ldapursw(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldapursw(rt, src); + } + + void Ldnp(const CPURegister& rt, + const CPURegister& rt2, + const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldnp(rt, rt2, src); + } + // Provide both double and float interfaces for FP immediate loads, rather + // than relying on implicit C++ casts. This allows signalling NaNs to be + // preserved when the immediate matches the format of fd. Most systems convert + // signalling NaNs to quiet NaNs when converting between float and double. + void Ldr(const VRegister& vt, double imm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + RawLiteral* literal; + if (vt.IsD()) { + literal = new Literal(imm, + &literal_pool_, + RawLiteral::kDeletedOnPlacementByPool); + } else { + literal = new Literal(static_cast(imm), + &literal_pool_, + RawLiteral::kDeletedOnPlacementByPool); + } + ldr(vt, literal); + } + void Ldr(const VRegister& vt, float imm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + RawLiteral* literal; + if (vt.IsS()) { + literal = new Literal(imm, + &literal_pool_, + RawLiteral::kDeletedOnPlacementByPool); + } else { + literal = new Literal(static_cast(imm), + &literal_pool_, + RawLiteral::kDeletedOnPlacementByPool); + } + ldr(vt, literal); + } + void Ldr(const VRegister& vt, uint64_t high64, uint64_t low64) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(vt.IsQ()); + SingleEmissionCheckScope guard(this); + ldr(vt, + new Literal(high64, + low64, + &literal_pool_, + RawLiteral::kDeletedOnPlacementByPool)); + } + void Ldr(const Register& rt, uint64_t imm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rt.IsZero()); + SingleEmissionCheckScope guard(this); + RawLiteral* literal; + if (rt.Is64Bits()) { + literal = new Literal(imm, + &literal_pool_, + RawLiteral::kDeletedOnPlacementByPool); + } else { + VIXL_ASSERT(rt.Is32Bits()); + VIXL_ASSERT(IsUint32(imm) || IsInt32(imm)); + literal = new Literal(static_cast(imm), + &literal_pool_, + RawLiteral::kDeletedOnPlacementByPool); + } + ldr(rt, literal); + } + void Ldrsw(const Register& rt, uint32_t imm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rt.IsZero()); + SingleEmissionCheckScope guard(this); + ldrsw(rt, + new Literal(imm, + &literal_pool_, + RawLiteral::kDeletedOnPlacementByPool)); + } + void Ldr(const CPURegister& rt, RawLiteral* literal) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldr(rt, literal); + } + void Ldrsw(const Register& rt, RawLiteral* literal) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldrsw(rt, literal); + } + void Ldxp(const Register& rt, const Register& rt2, const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rt.Aliases(rt2)); + SingleEmissionCheckScope guard(this); + ldxp(rt, rt2, src); + } + void Ldxr(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldxr(rt, src); + } + void Ldxrb(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldxrb(rt, src); + } + void Ldxrh(const Register& rt, const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldxrh(rt, src); + } + void Lsl(const Register& rd, const Register& rn, unsigned shift) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + SingleEmissionCheckScope guard(this); + lsl(rd, rn, shift); + } + void Lsl(const Register& rd, const Register& rn, const Register& rm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + VIXL_ASSERT(!rm.IsZero()); + SingleEmissionCheckScope guard(this); + lslv(rd, rn, rm); + } + void Lsr(const Register& rd, const Register& rn, unsigned shift) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + SingleEmissionCheckScope guard(this); + lsr(rd, rn, shift); + } + void Lsr(const Register& rd, const Register& rn, const Register& rm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + VIXL_ASSERT(!rm.IsZero()); + SingleEmissionCheckScope guard(this); + lsrv(rd, rn, rm); + } + void Ldraa(const Register& xt, const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldraa(xt, src); + } + void Ldrab(const Register& xt, const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldrab(xt, src); + } + void Madd(const Register& rd, + const Register& rn, + const Register& rm, + const Register& ra) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + VIXL_ASSERT(!rm.IsZero()); + VIXL_ASSERT(!ra.IsZero()); + SingleEmissionCheckScope guard(this); + madd(rd, rn, rm, ra); + } + void Mneg(const Register& rd, const Register& rn, const Register& rm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + VIXL_ASSERT(!rm.IsZero()); + SingleEmissionCheckScope guard(this); + mneg(rd, rn, rm); + } + void Mov(const Register& rd, + const Register& rn, + DiscardMoveMode discard_mode = kDontDiscardForSameWReg) { + VIXL_ASSERT(allow_macro_instructions_); + // Emit a register move only if the registers are distinct, or if they are + // not X registers. + // + // Note that mov(w0, w0) is not a no-op because it clears the top word of + // x0. A flag is provided (kDiscardForSameWReg) if a move between the same W + // registers is not required to clear the top word of the X register. In + // this case, the instruction is discarded. + // + // If the sp is an operand, add #0 is emitted, otherwise, orr #0. + if (!rd.Is(rn) || + (rd.Is32Bits() && (discard_mode == kDontDiscardForSameWReg))) { + SingleEmissionCheckScope guard(this); + mov(rd, rn); + } + } + void Movk(const Register& rd, uint64_t imm, int shift = -1) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + SingleEmissionCheckScope guard(this); + movk(rd, imm, shift); + } + void Mrs(const Register& rt, SystemRegister sysreg) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rt.IsZero()); + SingleEmissionCheckScope guard(this); + mrs(rt, sysreg); + } + void Msr(SystemRegister sysreg, const Register& rt) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rt.IsZero()); + SingleEmissionCheckScope guard(this); + msr(sysreg, rt); + } + void Cfinv() { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + cfinv(); + } + void Axflag() { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + axflag(); + } + void Xaflag() { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + xaflag(); + } + void Sys(int op1, int crn, int crm, int op2, const Register& rt = xzr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sys(op1, crn, crm, op2, rt); + } + void Dc(DataCacheOp op, const Register& rt) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + dc(op, rt); + } + void Ic(InstructionCacheOp op, const Register& rt) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ic(op, rt); + } + void Msub(const Register& rd, + const Register& rn, + const Register& rm, + const Register& ra) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + VIXL_ASSERT(!rm.IsZero()); + VIXL_ASSERT(!ra.IsZero()); + SingleEmissionCheckScope guard(this); + msub(rd, rn, rm, ra); + } + void Mul(const Register& rd, const Register& rn, const Register& rm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + VIXL_ASSERT(!rm.IsZero()); + SingleEmissionCheckScope guard(this); + mul(rd, rn, rm); + } + void Nop() { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + nop(); + } + void Rbit(const Register& rd, const Register& rn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + SingleEmissionCheckScope guard(this); + rbit(rd, rn); + } + void Ret(const Register& xn = lr) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!xn.IsZero()); + SingleEmissionCheckScope guard(this); + ret(xn); + } + void Rev(const Register& rd, const Register& rn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + SingleEmissionCheckScope guard(this); + rev(rd, rn); + } + void Rev16(const Register& rd, const Register& rn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + SingleEmissionCheckScope guard(this); + rev16(rd, rn); + } + void Rev32(const Register& rd, const Register& rn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + SingleEmissionCheckScope guard(this); + rev32(rd, rn); + } + void Rev64(const Register& rd, const Register& rn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + SingleEmissionCheckScope guard(this); + rev64(rd, rn); + } + +#define PAUTH_MASM_VARIATIONS(V) \ + V(Paci, paci) \ + V(Pacd, pacd) \ + V(Auti, auti) \ + V(Autd, autd) + +#define DEFINE_MACRO_ASM_FUNCS(MASM_PRE, ASM_PRE) \ + void MASM_PRE##a(const Register& xd, const Register& xn) { \ + VIXL_ASSERT(allow_macro_instructions_); \ + SingleEmissionCheckScope guard(this); \ + ASM_PRE##a(xd, xn); \ + } \ + void MASM_PRE##za(const Register& xd) { \ + VIXL_ASSERT(allow_macro_instructions_); \ + SingleEmissionCheckScope guard(this); \ + ASM_PRE##za(xd); \ + } \ + void MASM_PRE##b(const Register& xd, const Register& xn) { \ + VIXL_ASSERT(allow_macro_instructions_); \ + SingleEmissionCheckScope guard(this); \ + ASM_PRE##b(xd, xn); \ + } \ + void MASM_PRE##zb(const Register& xd) { \ + VIXL_ASSERT(allow_macro_instructions_); \ + SingleEmissionCheckScope guard(this); \ + ASM_PRE##zb(xd); \ + } + + PAUTH_MASM_VARIATIONS(DEFINE_MACRO_ASM_FUNCS) +#undef DEFINE_MACRO_ASM_FUNCS + + void Pacga(const Register& xd, const Register& xn, const Register& xm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + pacga(xd, xn, xm); + } + + void Xpaci(const Register& xd) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + xpaci(xd); + } + + void Xpacd(const Register& xd) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + xpacd(xd); + } + void Ror(const Register& rd, const Register& rs, unsigned shift) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rs.IsZero()); + SingleEmissionCheckScope guard(this); + ror(rd, rs, shift); + } + void Ror(const Register& rd, const Register& rn, const Register& rm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + VIXL_ASSERT(!rm.IsZero()); + SingleEmissionCheckScope guard(this); + rorv(rd, rn, rm); + } + void Sbfiz(const Register& rd, + const Register& rn, + unsigned lsb, + unsigned width) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + SingleEmissionCheckScope guard(this); + sbfiz(rd, rn, lsb, width); + } + void Sbfm(const Register& rd, + const Register& rn, + unsigned immr, + unsigned imms) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + SingleEmissionCheckScope guard(this); + sbfm(rd, rn, immr, imms); + } + void Sbfx(const Register& rd, + const Register& rn, + unsigned lsb, + unsigned width) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + SingleEmissionCheckScope guard(this); + sbfx(rd, rn, lsb, width); + } + void Scvtf(const VRegister& vd, const Register& rn, int fbits = 0) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rn.IsZero()); + SingleEmissionCheckScope guard(this); + scvtf(vd, rn, fbits); + } + void Sdiv(const Register& rd, const Register& rn, const Register& rm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + VIXL_ASSERT(!rm.IsZero()); + SingleEmissionCheckScope guard(this); + sdiv(rd, rn, rm); + } + void Smaddl(const Register& rd, + const Register& rn, + const Register& rm, + const Register& ra) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + VIXL_ASSERT(!rm.IsZero()); + VIXL_ASSERT(!ra.IsZero()); + SingleEmissionCheckScope guard(this); + smaddl(rd, rn, rm, ra); + } + void Smsubl(const Register& rd, + const Register& rn, + const Register& rm, + const Register& ra) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + VIXL_ASSERT(!rm.IsZero()); + VIXL_ASSERT(!ra.IsZero()); + SingleEmissionCheckScope guard(this); + smsubl(rd, rn, rm, ra); + } + void Smull(const Register& rd, const Register& rn, const Register& rm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + VIXL_ASSERT(!rm.IsZero()); + SingleEmissionCheckScope guard(this); + smull(rd, rn, rm); + } + void Smulh(const Register& xd, const Register& xn, const Register& xm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!xd.IsZero()); + VIXL_ASSERT(!xn.IsZero()); + VIXL_ASSERT(!xm.IsZero()); + SingleEmissionCheckScope guard(this); + smulh(xd, xn, xm); + } + void Stlr(const Register& rt, const MemOperand& dst) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + VIXL_ASSERT(dst.IsImmediateOffset()); + if (dst.GetOffset() == 0) { + stlr(rt, dst); + } else { + stlur(rt, dst); + } + } + void Stlrb(const Register& rt, const MemOperand& dst) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + VIXL_ASSERT(dst.IsImmediateOffset()); + if (dst.GetOffset() == 0) { + stlrb(rt, dst); + } else { + stlurb(rt, dst); + } + } + void Stlrh(const Register& rt, const MemOperand& dst) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + VIXL_ASSERT(dst.IsImmediateOffset()); + if (dst.GetOffset() == 0) { + stlrh(rt, dst); + } else { + stlurh(rt, dst); + } + } + void Stllr(const Register& rt, const MemOperand& dst) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + stllr(rt, dst); + } + void Stllrb(const Register& rt, const MemOperand& dst) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + stllrb(rt, dst); + } + void Stllrh(const Register& rt, const MemOperand& dst) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + stllrh(rt, dst); + } + void Stlxp(const Register& rs, + const Register& rt, + const Register& rt2, + const MemOperand& dst) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rs.Aliases(dst.GetBaseRegister())); + VIXL_ASSERT(!rs.Aliases(rt)); + VIXL_ASSERT(!rs.Aliases(rt2)); + SingleEmissionCheckScope guard(this); + stlxp(rs, rt, rt2, dst); + } + void Stlxr(const Register& rs, const Register& rt, const MemOperand& dst) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rs.Aliases(dst.GetBaseRegister())); + VIXL_ASSERT(!rs.Aliases(rt)); + SingleEmissionCheckScope guard(this); + stlxr(rs, rt, dst); + } + void Stlxrb(const Register& rs, const Register& rt, const MemOperand& dst) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rs.Aliases(dst.GetBaseRegister())); + VIXL_ASSERT(!rs.Aliases(rt)); + SingleEmissionCheckScope guard(this); + stlxrb(rs, rt, dst); + } + void Stlxrh(const Register& rs, const Register& rt, const MemOperand& dst) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rs.Aliases(dst.GetBaseRegister())); + VIXL_ASSERT(!rs.Aliases(rt)); + SingleEmissionCheckScope guard(this); + stlxrh(rs, rt, dst); + } + void Stnp(const CPURegister& rt, + const CPURegister& rt2, + const MemOperand& dst) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + stnp(rt, rt2, dst); + } + void Stxp(const Register& rs, + const Register& rt, + const Register& rt2, + const MemOperand& dst) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rs.Aliases(dst.GetBaseRegister())); + VIXL_ASSERT(!rs.Aliases(rt)); + VIXL_ASSERT(!rs.Aliases(rt2)); + SingleEmissionCheckScope guard(this); + stxp(rs, rt, rt2, dst); + } + void Stxr(const Register& rs, const Register& rt, const MemOperand& dst) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rs.Aliases(dst.GetBaseRegister())); + VIXL_ASSERT(!rs.Aliases(rt)); + SingleEmissionCheckScope guard(this); + stxr(rs, rt, dst); + } + void Stxrb(const Register& rs, const Register& rt, const MemOperand& dst) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rs.Aliases(dst.GetBaseRegister())); + VIXL_ASSERT(!rs.Aliases(rt)); + SingleEmissionCheckScope guard(this); + stxrb(rs, rt, dst); + } + void Stxrh(const Register& rs, const Register& rt, const MemOperand& dst) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rs.Aliases(dst.GetBaseRegister())); + VIXL_ASSERT(!rs.Aliases(rt)); + SingleEmissionCheckScope guard(this); + stxrh(rs, rt, dst); + } + void Svc(int code) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + svc(code); + } + void Sxtb(const Register& rd, const Register& rn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + SingleEmissionCheckScope guard(this); + sxtb(rd, rn); + } + void Sxth(const Register& rd, const Register& rn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + SingleEmissionCheckScope guard(this); + sxth(rd, rn); + } + void Sxtw(const Register& rd, const Register& rn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + SingleEmissionCheckScope guard(this); + sxtw(rd, rn); + } + void Tbl(const VRegister& vd, const VRegister& vn, const VRegister& vm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + tbl(vd, vn, vm); + } + void Tbl(const VRegister& vd, + const VRegister& vn, + const VRegister& vn2, + const VRegister& vm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + tbl(vd, vn, vn2, vm); + } + void Tbl(const VRegister& vd, + const VRegister& vn, + const VRegister& vn2, + const VRegister& vn3, + const VRegister& vm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + tbl(vd, vn, vn2, vn3, vm); + } + void Tbl(const VRegister& vd, + const VRegister& vn, + const VRegister& vn2, + const VRegister& vn3, + const VRegister& vn4, + const VRegister& vm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + tbl(vd, vn, vn2, vn3, vn4, vm); + } + void Tbx(const VRegister& vd, const VRegister& vn, const VRegister& vm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + tbx(vd, vn, vm); + } + void Tbx(const VRegister& vd, + const VRegister& vn, + const VRegister& vn2, + const VRegister& vm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + tbx(vd, vn, vn2, vm); + } + void Tbx(const VRegister& vd, + const VRegister& vn, + const VRegister& vn2, + const VRegister& vn3, + const VRegister& vm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + tbx(vd, vn, vn2, vn3, vm); + } + void Tbx(const VRegister& vd, + const VRegister& vn, + const VRegister& vn2, + const VRegister& vn3, + const VRegister& vn4, + const VRegister& vm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + tbx(vd, vn, vn2, vn3, vn4, vm); + } + void Tbnz(const Register& rt, unsigned bit_pos, Label* label); + void Tbz(const Register& rt, unsigned bit_pos, Label* label); + void Ubfiz(const Register& rd, + const Register& rn, + unsigned lsb, + unsigned width) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + SingleEmissionCheckScope guard(this); + ubfiz(rd, rn, lsb, width); + } + void Ubfm(const Register& rd, + const Register& rn, + unsigned immr, + unsigned imms) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + SingleEmissionCheckScope guard(this); + ubfm(rd, rn, immr, imms); + } + void Ubfx(const Register& rd, + const Register& rn, + unsigned lsb, + unsigned width) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + SingleEmissionCheckScope guard(this); + ubfx(rd, rn, lsb, width); + } + void Ucvtf(const VRegister& vd, const Register& rn, int fbits = 0) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rn.IsZero()); + SingleEmissionCheckScope guard(this); + ucvtf(vd, rn, fbits); + } + void Udiv(const Register& rd, const Register& rn, const Register& rm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + VIXL_ASSERT(!rm.IsZero()); + SingleEmissionCheckScope guard(this); + udiv(rd, rn, rm); + } + void Umaddl(const Register& rd, + const Register& rn, + const Register& rm, + const Register& ra) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + VIXL_ASSERT(!rm.IsZero()); + VIXL_ASSERT(!ra.IsZero()); + SingleEmissionCheckScope guard(this); + umaddl(rd, rn, rm, ra); + } + void Umull(const Register& rd, const Register& rn, const Register& rm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + VIXL_ASSERT(!rm.IsZero()); + SingleEmissionCheckScope guard(this); + umull(rd, rn, rm); + } + void Umulh(const Register& xd, const Register& xn, const Register& xm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!xd.IsZero()); + VIXL_ASSERT(!xn.IsZero()); + VIXL_ASSERT(!xm.IsZero()); + SingleEmissionCheckScope guard(this); + umulh(xd, xn, xm); + } + void Umsubl(const Register& rd, + const Register& rn, + const Register& rm, + const Register& ra) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + VIXL_ASSERT(!rm.IsZero()); + VIXL_ASSERT(!ra.IsZero()); + SingleEmissionCheckScope guard(this); + umsubl(rd, rn, rm, ra); + } + void Unreachable() { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + if (generate_simulator_code_) { + hlt(kUnreachableOpcode); + } else { + // Use the architecturally-defined UDF instruction to abort on hardware, + // because using HLT and BRK tends to make the process difficult to debug. + udf(kUnreachableOpcode); + } + } + void Uxtb(const Register& rd, const Register& rn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + SingleEmissionCheckScope guard(this); + uxtb(rd, rn); + } + void Uxth(const Register& rd, const Register& rn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + SingleEmissionCheckScope guard(this); + uxth(rd, rn); + } + void Uxtw(const Register& rd, const Register& rn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!rd.IsZero()); + VIXL_ASSERT(!rn.IsZero()); + SingleEmissionCheckScope guard(this); + uxtw(rd, rn); + } + +// NEON 3 vector register instructions. +#define NEON_3VREG_MACRO_LIST(V) \ + V(add, Add) \ + V(addhn, Addhn) \ + V(addhn2, Addhn2) \ + V(addp, Addp) \ + V(and_, And) \ + V(bic, Bic) \ + V(bif, Bif) \ + V(bit, Bit) \ + V(bsl, Bsl) \ + V(cmeq, Cmeq) \ + V(cmge, Cmge) \ + V(cmgt, Cmgt) \ + V(cmhi, Cmhi) \ + V(cmhs, Cmhs) \ + V(cmtst, Cmtst) \ + V(eor, Eor) \ + V(fabd, Fabd) \ + V(facge, Facge) \ + V(facgt, Facgt) \ + V(faddp, Faddp) \ + V(fcmeq, Fcmeq) \ + V(fcmge, Fcmge) \ + V(fcmgt, Fcmgt) \ + V(fmaxnmp, Fmaxnmp) \ + V(fmaxp, Fmaxp) \ + V(fminnmp, Fminnmp) \ + V(fminp, Fminp) \ + V(fmla, Fmla) \ + V(fmlal, Fmlal) \ + V(fmlal2, Fmlal2) \ + V(fmls, Fmls) \ + V(fmlsl, Fmlsl) \ + V(fmlsl2, Fmlsl2) \ + V(fmulx, Fmulx) \ + V(frecps, Frecps) \ + V(frsqrts, Frsqrts) \ + V(mla, Mla) \ + V(mls, Mls) \ + V(mul, Mul) \ + V(orn, Orn) \ + V(orr, Orr) \ + V(pmul, Pmul) \ + V(pmull, Pmull) \ + V(pmull2, Pmull2) \ + V(raddhn, Raddhn) \ + V(raddhn2, Raddhn2) \ + V(rsubhn, Rsubhn) \ + V(rsubhn2, Rsubhn2) \ + V(saba, Saba) \ + V(sabal, Sabal) \ + V(sabal2, Sabal2) \ + V(sabd, Sabd) \ + V(sabdl, Sabdl) \ + V(sabdl2, Sabdl2) \ + V(saddl, Saddl) \ + V(saddl2, Saddl2) \ + V(saddw, Saddw) \ + V(saddw2, Saddw2) \ + V(shadd, Shadd) \ + V(shsub, Shsub) \ + V(smax, Smax) \ + V(smaxp, Smaxp) \ + V(smin, Smin) \ + V(sminp, Sminp) \ + V(smlal, Smlal) \ + V(smlal2, Smlal2) \ + V(smlsl, Smlsl) \ + V(smlsl2, Smlsl2) \ + V(smull, Smull) \ + V(smull2, Smull2) \ + V(sqadd, Sqadd) \ + V(sqdmlal, Sqdmlal) \ + V(sqdmlal2, Sqdmlal2) \ + V(sqdmlsl, Sqdmlsl) \ + V(sqdmlsl2, Sqdmlsl2) \ + V(sqdmulh, Sqdmulh) \ + V(sqdmull, Sqdmull) \ + V(sqdmull2, Sqdmull2) \ + V(sqrdmulh, Sqrdmulh) \ + V(sdot, Sdot) \ + V(sqrdmlah, Sqrdmlah) \ + V(udot, Udot) \ + V(sqrdmlsh, Sqrdmlsh) \ + V(sqrshl, Sqrshl) \ + V(sqshl, Sqshl) \ + V(sqsub, Sqsub) \ + V(srhadd, Srhadd) \ + V(srshl, Srshl) \ + V(sshl, Sshl) \ + V(ssubl, Ssubl) \ + V(ssubl2, Ssubl2) \ + V(ssubw, Ssubw) \ + V(ssubw2, Ssubw2) \ + V(sub, Sub) \ + V(subhn, Subhn) \ + V(subhn2, Subhn2) \ + V(trn1, Trn1) \ + V(trn2, Trn2) \ + V(uaba, Uaba) \ + V(uabal, Uabal) \ + V(uabal2, Uabal2) \ + V(uabd, Uabd) \ + V(uabdl, Uabdl) \ + V(uabdl2, Uabdl2) \ + V(uaddl, Uaddl) \ + V(uaddl2, Uaddl2) \ + V(uaddw, Uaddw) \ + V(uaddw2, Uaddw2) \ + V(uhadd, Uhadd) \ + V(uhsub, Uhsub) \ + V(umax, Umax) \ + V(umaxp, Umaxp) \ + V(umin, Umin) \ + V(uminp, Uminp) \ + V(umlal, Umlal) \ + V(umlal2, Umlal2) \ + V(umlsl, Umlsl) \ + V(umlsl2, Umlsl2) \ + V(umull, Umull) \ + V(umull2, Umull2) \ + V(uqadd, Uqadd) \ + V(uqrshl, Uqrshl) \ + V(uqshl, Uqshl) \ + V(uqsub, Uqsub) \ + V(urhadd, Urhadd) \ + V(urshl, Urshl) \ + V(ushl, Ushl) \ + V(usubl, Usubl) \ + V(usubl2, Usubl2) \ + V(usubw, Usubw) \ + V(usubw2, Usubw2) \ + V(uzp1, Uzp1) \ + V(uzp2, Uzp2) \ + V(zip1, Zip1) \ + V(zip2, Zip2) + +#define DEFINE_MACRO_ASM_FUNC(ASM, MASM) \ + void MASM(const VRegister& vd, const VRegister& vn, const VRegister& vm) { \ + VIXL_ASSERT(allow_macro_instructions_); \ + SingleEmissionCheckScope guard(this); \ + ASM(vd, vn, vm); \ + } + NEON_3VREG_MACRO_LIST(DEFINE_MACRO_ASM_FUNC) +#undef DEFINE_MACRO_ASM_FUNC + +// NEON 2 vector register instructions. +#define NEON_2VREG_MACRO_LIST(V) \ + V(abs, Abs) \ + V(addp, Addp) \ + V(addv, Addv) \ + V(cls, Cls) \ + V(clz, Clz) \ + V(cnt, Cnt) \ + V(fabs, Fabs) \ + V(faddp, Faddp) \ + V(fcvtas, Fcvtas) \ + V(fcvtau, Fcvtau) \ + V(fcvtms, Fcvtms) \ + V(fcvtmu, Fcvtmu) \ + V(fcvtns, Fcvtns) \ + V(fcvtnu, Fcvtnu) \ + V(fcvtps, Fcvtps) \ + V(fcvtpu, Fcvtpu) \ + V(fmaxnmp, Fmaxnmp) \ + V(fmaxnmv, Fmaxnmv) \ + V(fmaxp, Fmaxp) \ + V(fmaxv, Fmaxv) \ + V(fminnmp, Fminnmp) \ + V(fminnmv, Fminnmv) \ + V(fminp, Fminp) \ + V(fminv, Fminv) \ + V(fneg, Fneg) \ + V(frecpe, Frecpe) \ + V(frecpx, Frecpx) \ + V(frint32x, Frint32x) \ + V(frint32z, Frint32z) \ + V(frint64x, Frint64x) \ + V(frint64z, Frint64z) \ + V(frinta, Frinta) \ + V(frinti, Frinti) \ + V(frintm, Frintm) \ + V(frintn, Frintn) \ + V(frintp, Frintp) \ + V(frintx, Frintx) \ + V(frintz, Frintz) \ + V(frsqrte, Frsqrte) \ + V(fsqrt, Fsqrt) \ + V(mov, Mov) \ + V(mvn, Mvn) \ + V(neg, Neg) \ + V(not_, Not) \ + V(rbit, Rbit) \ + V(rev16, Rev16) \ + V(rev32, Rev32) \ + V(rev64, Rev64) \ + V(sadalp, Sadalp) \ + V(saddlp, Saddlp) \ + V(saddlv, Saddlv) \ + V(smaxv, Smaxv) \ + V(sminv, Sminv) \ + V(sqabs, Sqabs) \ + V(sqneg, Sqneg) \ + V(sqxtn, Sqxtn) \ + V(sqxtn2, Sqxtn2) \ + V(sqxtun, Sqxtun) \ + V(sqxtun2, Sqxtun2) \ + V(suqadd, Suqadd) \ + V(sxtl, Sxtl) \ + V(sxtl2, Sxtl2) \ + V(uadalp, Uadalp) \ + V(uaddlp, Uaddlp) \ + V(uaddlv, Uaddlv) \ + V(umaxv, Umaxv) \ + V(uminv, Uminv) \ + V(uqxtn, Uqxtn) \ + V(uqxtn2, Uqxtn2) \ + V(urecpe, Urecpe) \ + V(ursqrte, Ursqrte) \ + V(usqadd, Usqadd) \ + V(uxtl, Uxtl) \ + V(uxtl2, Uxtl2) \ + V(xtn, Xtn) \ + V(xtn2, Xtn2) + +#define DEFINE_MACRO_ASM_FUNC(ASM, MASM) \ + void MASM(const VRegister& vd, const VRegister& vn) { \ + VIXL_ASSERT(allow_macro_instructions_); \ + SingleEmissionCheckScope guard(this); \ + ASM(vd, vn); \ + } + NEON_2VREG_MACRO_LIST(DEFINE_MACRO_ASM_FUNC) +#undef DEFINE_MACRO_ASM_FUNC + +// NEON 2 vector register with immediate instructions. +#define NEON_2VREG_FPIMM_MACRO_LIST(V) \ + V(fcmeq, Fcmeq) \ + V(fcmge, Fcmge) \ + V(fcmgt, Fcmgt) \ + V(fcmle, Fcmle) \ + V(fcmlt, Fcmlt) + +#define DEFINE_MACRO_ASM_FUNC(ASM, MASM) \ + void MASM(const VRegister& vd, const VRegister& vn, double imm) { \ + VIXL_ASSERT(allow_macro_instructions_); \ + SingleEmissionCheckScope guard(this); \ + ASM(vd, vn, imm); \ + } + NEON_2VREG_FPIMM_MACRO_LIST(DEFINE_MACRO_ASM_FUNC) +#undef DEFINE_MACRO_ASM_FUNC + +// NEON by element instructions. +#define NEON_BYELEMENT_MACRO_LIST(V) \ + V(fmul, Fmul) \ + V(fmla, Fmla) \ + V(fmlal, Fmlal) \ + V(fmlal2, Fmlal2) \ + V(fmls, Fmls) \ + V(fmlsl, Fmlsl) \ + V(fmlsl2, Fmlsl2) \ + V(fmulx, Fmulx) \ + V(mul, Mul) \ + V(mla, Mla) \ + V(mls, Mls) \ + V(sqdmulh, Sqdmulh) \ + V(sqrdmulh, Sqrdmulh) \ + V(sdot, Sdot) \ + V(sqrdmlah, Sqrdmlah) \ + V(udot, Udot) \ + V(sqrdmlsh, Sqrdmlsh) \ + V(sqdmull, Sqdmull) \ + V(sqdmull2, Sqdmull2) \ + V(sqdmlal, Sqdmlal) \ + V(sqdmlal2, Sqdmlal2) \ + V(sqdmlsl, Sqdmlsl) \ + V(sqdmlsl2, Sqdmlsl2) \ + V(smull, Smull) \ + V(smull2, Smull2) \ + V(smlal, Smlal) \ + V(smlal2, Smlal2) \ + V(smlsl, Smlsl) \ + V(smlsl2, Smlsl2) \ + V(umull, Umull) \ + V(umull2, Umull2) \ + V(umlal, Umlal) \ + V(umlal2, Umlal2) \ + V(umlsl, Umlsl) \ + V(umlsl2, Umlsl2) + +#define DEFINE_MACRO_ASM_FUNC(ASM, MASM) \ + void MASM(const VRegister& vd, \ + const VRegister& vn, \ + const VRegister& vm, \ + int vm_index) { \ + VIXL_ASSERT(allow_macro_instructions_); \ + SingleEmissionCheckScope guard(this); \ + ASM(vd, vn, vm, vm_index); \ + } + NEON_BYELEMENT_MACRO_LIST(DEFINE_MACRO_ASM_FUNC) +#undef DEFINE_MACRO_ASM_FUNC + +#define NEON_2VREG_SHIFT_MACRO_LIST(V) \ + V(rshrn, Rshrn) \ + V(rshrn2, Rshrn2) \ + V(shl, Shl) \ + V(shll, Shll) \ + V(shll2, Shll2) \ + V(shrn, Shrn) \ + V(shrn2, Shrn2) \ + V(sli, Sli) \ + V(sqrshrn, Sqrshrn) \ + V(sqrshrn2, Sqrshrn2) \ + V(sqrshrun, Sqrshrun) \ + V(sqrshrun2, Sqrshrun2) \ + V(sqshl, Sqshl) \ + V(sqshlu, Sqshlu) \ + V(sqshrn, Sqshrn) \ + V(sqshrn2, Sqshrn2) \ + V(sqshrun, Sqshrun) \ + V(sqshrun2, Sqshrun2) \ + V(sri, Sri) \ + V(srshr, Srshr) \ + V(srsra, Srsra) \ + V(sshr, Sshr) \ + V(ssra, Ssra) \ + V(uqrshrn, Uqrshrn) \ + V(uqrshrn2, Uqrshrn2) \ + V(uqshl, Uqshl) \ + V(uqshrn, Uqshrn) \ + V(uqshrn2, Uqshrn2) \ + V(urshr, Urshr) \ + V(ursra, Ursra) \ + V(ushr, Ushr) \ + V(usra, Usra) + +#define DEFINE_MACRO_ASM_FUNC(ASM, MASM) \ + void MASM(const VRegister& vd, const VRegister& vn, int shift) { \ + VIXL_ASSERT(allow_macro_instructions_); \ + SingleEmissionCheckScope guard(this); \ + ASM(vd, vn, shift); \ + } + NEON_2VREG_SHIFT_MACRO_LIST(DEFINE_MACRO_ASM_FUNC) +#undef DEFINE_MACRO_ASM_FUNC + +#define NEON_2VREG_SHIFT_LONG_MACRO_LIST(V) \ + V(shll, sshll, Sshll) \ + V(shll, ushll, Ushll) \ + V(shll2, sshll2, Sshll2) \ + V(shll2, ushll2, Ushll2) + +#define DEFINE_MACRO_ASM_FUNC(ASM1, ASM2, MASM) \ + void MASM(const VRegister& vd, const VRegister& vn, int shift) { \ + VIXL_ASSERT(allow_macro_instructions_); \ + SingleEmissionCheckScope guard(this); \ + if (vn.GetLaneSizeInBits() == static_cast(shift)) { \ + ASM1(vd, vn, shift); \ + } else { \ + ASM2(vd, vn, shift); \ + } \ + } + NEON_2VREG_SHIFT_LONG_MACRO_LIST(DEFINE_MACRO_ASM_FUNC) +#undef DEFINE_MACRO_ASM_FUNC + +// SVE 3 vector register instructions. +#define SVE_3VREG_COMMUTATIVE_MACRO_LIST(V) \ + V(add, Add) \ + V(and_, And) \ + V(bic, Bic) \ + V(eor, Eor) \ + V(mul, Mul) \ + V(orr, Orr) \ + V(sabd, Sabd) \ + V(smax, Smax) \ + V(smulh, Smulh) \ + V(smin, Smin) \ + V(uabd, Uabd) \ + V(umax, Umax) \ + V(umin, Umin) \ + V(umulh, Umulh) + +#define DEFINE_MACRO_ASM_FUNC(ASM, MASM) \ + void MASM(const ZRegister& zd, \ + const PRegisterM& pg, \ + const ZRegister& zn, \ + const ZRegister& zm) { \ + VIXL_ASSERT(allow_macro_instructions_); \ + if (zd.Aliases(zn)) { \ + SingleEmissionCheckScope guard(this); \ + ASM(zd, pg, zd, zm); \ + } else if (zd.Aliases(zm)) { \ + SingleEmissionCheckScope guard(this); \ + ASM(zd, pg, zd, zn); \ + } else { \ + MovprfxHelperScope guard(this, zd, pg, zn); \ + ASM(zd, pg, zd, zm); \ + } \ + } + SVE_3VREG_COMMUTATIVE_MACRO_LIST(DEFINE_MACRO_ASM_FUNC) +#undef DEFINE_MACRO_ASM_FUNC + + void Bic(const VRegister& vd, const int imm8, const int left_shift = 0) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + bic(vd, imm8, left_shift); + } + void Cmeq(const VRegister& vd, const VRegister& vn, int imm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + cmeq(vd, vn, imm); + } + void Cmge(const VRegister& vd, const VRegister& vn, int imm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + cmge(vd, vn, imm); + } + void Cmgt(const VRegister& vd, const VRegister& vn, int imm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + cmgt(vd, vn, imm); + } + void Cmle(const VRegister& vd, const VRegister& vn, int imm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + cmle(vd, vn, imm); + } + void Cmlt(const VRegister& vd, const VRegister& vn, int imm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + cmlt(vd, vn, imm); + } + void Dup(const VRegister& vd, const VRegister& vn, int index) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + dup(vd, vn, index); + } + void Dup(const VRegister& vd, const Register& rn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + dup(vd, rn); + } + void Ext(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int index) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ext(vd, vn, vm, index); + } + void Fcadd(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int rot) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fcadd(vd, vn, vm, rot); + } + void Fcmla(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int vm_index, + int rot) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fcmla(vd, vn, vm, vm_index, rot); + } + void Fcmla(const VRegister& vd, + const VRegister& vn, + const VRegister& vm, + int rot) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fcmla(vd, vn, vm, rot); + } + void Ins(const VRegister& vd, + int vd_index, + const VRegister& vn, + int vn_index) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ins(vd, vd_index, vn, vn_index); + } + void Ins(const VRegister& vd, int vd_index, const Register& rn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ins(vd, vd_index, rn); + } + void Ld1(const VRegister& vt, const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ld1(vt, src); + } + void Ld1(const VRegister& vt, const VRegister& vt2, const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ld1(vt, vt2, src); + } + void Ld1(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ld1(vt, vt2, vt3, src); + } + void Ld1(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const VRegister& vt4, + const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ld1(vt, vt2, vt3, vt4, src); + } + void Ld1(const VRegister& vt, int lane, const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ld1(vt, lane, src); + } + void Ld1r(const VRegister& vt, const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ld1r(vt, src); + } + void Ld2(const VRegister& vt, const VRegister& vt2, const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ld2(vt, vt2, src); + } + void Ld2(const VRegister& vt, + const VRegister& vt2, + int lane, + const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ld2(vt, vt2, lane, src); + } + void Ld2r(const VRegister& vt, const VRegister& vt2, const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ld2r(vt, vt2, src); + } + void Ld3(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ld3(vt, vt2, vt3, src); + } + void Ld3(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + int lane, + const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ld3(vt, vt2, vt3, lane, src); + } + void Ld3r(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ld3r(vt, vt2, vt3, src); + } + void Ld4(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const VRegister& vt4, + const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ld4(vt, vt2, vt3, vt4, src); + } + void Ld4(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const VRegister& vt4, + int lane, + const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ld4(vt, vt2, vt3, vt4, lane, src); + } + void Ld4r(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const VRegister& vt4, + const MemOperand& src) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ld4r(vt, vt2, vt3, vt4, src); + } + void Mov(const VRegister& vd, + int vd_index, + const VRegister& vn, + int vn_index) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + mov(vd, vd_index, vn, vn_index); + } + void Mov(const VRegister& vd, const VRegister& vn, int index) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + mov(vd, vn, index); + } + void Mov(const VRegister& vd, int vd_index, const Register& rn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + mov(vd, vd_index, rn); + } + void Mov(const Register& rd, const VRegister& vn, int vn_index) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + mov(rd, vn, vn_index); + } + void Movi(const VRegister& vd, + uint64_t imm, + Shift shift = LSL, + int shift_amount = 0); + void Movi(const VRegister& vd, uint64_t hi, uint64_t lo); + void Mvni(const VRegister& vd, + const int imm8, + Shift shift = LSL, + const int shift_amount = 0) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + mvni(vd, imm8, shift, shift_amount); + } + void Orr(const VRegister& vd, const int imm8, const int left_shift = 0) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + orr(vd, imm8, left_shift); + } + void Scvtf(const VRegister& vd, const VRegister& vn, int fbits = 0) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + scvtf(vd, vn, fbits); + } + void Ucvtf(const VRegister& vd, const VRegister& vn, int fbits = 0) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ucvtf(vd, vn, fbits); + } + void Fcvtzs(const VRegister& vd, const VRegister& vn, int fbits = 0) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fcvtzs(vd, vn, fbits); + } + void Fcvtzu(const VRegister& vd, const VRegister& vn, int fbits = 0) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fcvtzu(vd, vn, fbits); + } + void St1(const VRegister& vt, const MemOperand& dst) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + st1(vt, dst); + } + void St1(const VRegister& vt, const VRegister& vt2, const MemOperand& dst) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + st1(vt, vt2, dst); + } + void St1(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const MemOperand& dst) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + st1(vt, vt2, vt3, dst); + } + void St1(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const VRegister& vt4, + const MemOperand& dst) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + st1(vt, vt2, vt3, vt4, dst); + } + void St1(const VRegister& vt, int lane, const MemOperand& dst) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + st1(vt, lane, dst); + } + void St2(const VRegister& vt, const VRegister& vt2, const MemOperand& dst) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + st2(vt, vt2, dst); + } + void St3(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const MemOperand& dst) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + st3(vt, vt2, vt3, dst); + } + void St4(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const VRegister& vt4, + const MemOperand& dst) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + st4(vt, vt2, vt3, vt4, dst); + } + void St2(const VRegister& vt, + const VRegister& vt2, + int lane, + const MemOperand& dst) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + st2(vt, vt2, lane, dst); + } + void St3(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + int lane, + const MemOperand& dst) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + st3(vt, vt2, vt3, lane, dst); + } + void St4(const VRegister& vt, + const VRegister& vt2, + const VRegister& vt3, + const VRegister& vt4, + int lane, + const MemOperand& dst) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + st4(vt, vt2, vt3, vt4, lane, dst); + } + void Smov(const Register& rd, const VRegister& vn, int vn_index) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + smov(rd, vn, vn_index); + } + void Umov(const Register& rd, const VRegister& vn, int vn_index) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + umov(rd, vn, vn_index); + } + void Crc32b(const Register& rd, const Register& rn, const Register& rm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + crc32b(rd, rn, rm); + } + void Crc32h(const Register& rd, const Register& rn, const Register& rm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + crc32h(rd, rn, rm); + } + void Crc32w(const Register& rd, const Register& rn, const Register& rm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + crc32w(rd, rn, rm); + } + void Crc32x(const Register& rd, const Register& rn, const Register& rm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + crc32x(rd, rn, rm); + } + void Crc32cb(const Register& rd, const Register& rn, const Register& rm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + crc32cb(rd, rn, rm); + } + void Crc32ch(const Register& rd, const Register& rn, const Register& rm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + crc32ch(rd, rn, rm); + } + void Crc32cw(const Register& rd, const Register& rn, const Register& rm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + crc32cw(rd, rn, rm); + } + void Crc32cx(const Register& rd, const Register& rn, const Register& rm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + crc32cx(rd, rn, rm); + } + + // Scalable Vector Extensions. + void Abs(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + abs(zd, pg, zn); + } + void Add(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + add(zd, zn, zm); + } + void Add(const ZRegister& zd, const ZRegister& zn, IntegerOperand imm) { + VIXL_ASSERT(allow_macro_instructions_); + AddSubHelper(kAddImmediate, zd, zn, imm); + } + void Addpl(const Register& xd, const Register& xn, int64_t multiplier); + void Addvl(const Register& xd, const Register& xn, int64_t multiplier); + // Note that unlike the core ISA, SVE's `adr` is not PC-relative. + void Adr(const ZRegister& zd, const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + adr(zd, addr); + } + void And(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + and_(pd, pg, pn, pm); + } + void And(const ZRegister& zd, const ZRegister& zn, uint64_t imm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + if (IsImmLogical(imm, zd.GetLaneSizeInBits())) { + and_(zd, zn, imm); + } else { + // TODO: Synthesise the immediate once 'Mov' is implemented. + VIXL_UNIMPLEMENTED(); + } + } + void And(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + SingleEmissionCheckScope guard(this); + and_(zd.VnD(), zn.VnD(), zm.VnD()); + } + void Ands(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ands(pd, pg, pn, pm); + } + void Andv(const VRegister& vd, const PRegister& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + andv(vd, pg, zn); + } + void Asr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + int shift) { + VIXL_ASSERT(allow_macro_instructions_); + MovprfxHelperScope guard(this, zd, pg, zn); + asr(zd, pg, zd, shift); + } + void Asr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + void Asr(const ZRegister& zd, const ZRegister& zn, int shift) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + asr(zd, zn, shift); + } + void Asr(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + asr(zd, zn, zm); + } + void Asrd(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + int shift) { + VIXL_ASSERT(allow_macro_instructions_); + MovprfxHelperScope guard(this, zd, pg, zn); + asrd(zd, pg, zd, shift); + } + void Bic(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + bic(pd, pg, pn, pm); + } + void Bic(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + SingleEmissionCheckScope guard(this); + bic(zd.VnD(), zn.VnD(), zm.VnD()); + } + void Bic(const ZRegister& zd, const ZRegister& zn, uint64_t imm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + if (IsImmLogical(imm, zd.GetLaneSizeInBits())) { + bic(zd, zn, imm); + } else { + // TODO: Synthesise the immediate once 'Mov' is implemented. + VIXL_UNIMPLEMENTED(); + } + } + void Bics(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + bics(pd, pg, pn, pm); + } + void Brka(const PRegisterWithLaneSize& pd, + const PRegister& pg, + const PRegisterWithLaneSize& pn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + brka(pd, pg, pn); + } + void Brkas(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + brkas(pd, pg, pn); + } + void Brkb(const PRegisterWithLaneSize& pd, + const PRegister& pg, + const PRegisterWithLaneSize& pn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + brkb(pd, pg, pn); + } + void Brkbs(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + brkbs(pd, pg, pn); + } + void Brkn(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(allow_macro_instructions_); + if (!pd.Aliases(pm)) { + Mov(pd, pm); + } + SingleEmissionCheckScope guard(this); + brkn(pd, pg, pn, pd); + } + void Brkns(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(allow_macro_instructions_); + if (!pd.Aliases(pm)) { + Mov(pd, pm); + } + SingleEmissionCheckScope guard(this); + brkns(pd, pg, pn, pd); + } + void Brkpa(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + brkpa(pd, pg, pn, pm); + } + void Brkpas(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + brkpas(pd, pg, pn, pm); + } + void Brkpb(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + brkpb(pd, pg, pn, pm); + } + void Brkpbs(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + brkpbs(pd, pg, pn, pm); + } + void Clasta(const Register& rd, + const PRegister& pg, + const Register& rn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + clasta(rd, pg, rn, zm); + } + void Clasta(const VRegister& vd, + const PRegister& pg, + const VRegister& vn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + clasta(vd, pg, vn, zm); + } + void Clasta(const ZRegister& zd, + const PRegister& pg, + const ZRegister& zn, + const ZRegister& zm); + void Clastb(const Register& rd, + const PRegister& pg, + const Register& rn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + clastb(rd, pg, rn, zm); + } + void Clastb(const VRegister& vd, + const PRegister& pg, + const VRegister& vn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + clastb(vd, pg, vn, zm); + } + void Clastb(const ZRegister& zd, + const PRegister& pg, + const ZRegister& zn, + const ZRegister& zm); + void Cls(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + cls(zd, pg, zn); + } + void Clz(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + clz(zd, pg, zn); + } + void Cmpeq(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + cmpeq(pd, pg, zn, zm); + } + void Cmpeq(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + IntegerOperand imm) { + VIXL_ASSERT(allow_macro_instructions_); + int imm5; + if (imm.TryEncodeAsIntNForLane<5>(zn, &imm5)) { + SingleEmissionCheckScope guard(this); + cmpeq(pd, pg, zn, imm5); + } else { + CompareHelper(eq, pd, pg, zn, imm); + } + } + void Cmpge(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + cmpge(pd, pg, zn, zm); + } + void Cmpge(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + IntegerOperand imm) { + VIXL_ASSERT(allow_macro_instructions_); + int imm5; + if (imm.TryEncodeAsIntNForLane<5>(zn, &imm5)) { + SingleEmissionCheckScope guard(this); + cmpge(pd, pg, zn, imm5); + } else { + CompareHelper(ge, pd, pg, zn, imm); + } + } + void Cmpgt(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + cmpgt(pd, pg, zn, zm); + } + void Cmpgt(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + IntegerOperand imm) { + VIXL_ASSERT(allow_macro_instructions_); + int imm5; + if (imm.TryEncodeAsIntNForLane<5>(zn, &imm5)) { + SingleEmissionCheckScope guard(this); + cmpgt(pd, pg, zn, imm5); + } else { + CompareHelper(gt, pd, pg, zn, imm); + } + } + void Cmphi(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + cmphi(pd, pg, zn, zm); + } + void Cmphi(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + IntegerOperand imm) { + VIXL_ASSERT(allow_macro_instructions_); + if (imm.IsUintN(7)) { + SingleEmissionCheckScope guard(this); + cmphi(pd, pg, zn, static_cast(imm.AsUintN(7))); + } else { + CompareHelper(hi, pd, pg, zn, imm); + } + } + void Cmphs(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + cmphs(pd, pg, zn, zm); + } + void Cmphs(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + IntegerOperand imm) { + if (imm.IsUintN(7)) { + SingleEmissionCheckScope guard(this); + cmphs(pd, pg, zn, static_cast(imm.AsUintN(7))); + } else { + CompareHelper(hs, pd, pg, zn, imm); + } + } + void Cmple(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + cmple(pd, pg, zn, zm); + } + void Cmple(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + IntegerOperand imm) { + VIXL_ASSERT(allow_macro_instructions_); + int imm5; + if (imm.TryEncodeAsIntNForLane<5>(zn, &imm5)) { + SingleEmissionCheckScope guard(this); + cmple(pd, pg, zn, imm5); + } else { + CompareHelper(le, pd, pg, zn, imm); + } + } + void Cmplo(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + cmplo(pd, pg, zn, zm); + } + void Cmplo(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + IntegerOperand imm) { + if (imm.IsUintN(7)) { + SingleEmissionCheckScope guard(this); + cmplo(pd, pg, zn, static_cast(imm.AsUintN(7))); + } else { + CompareHelper(lo, pd, pg, zn, imm); + } + } + void Cmpls(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + cmpls(pd, pg, zn, zm); + } + void Cmpls(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + IntegerOperand imm) { + if (imm.IsUintN(7)) { + SingleEmissionCheckScope guard(this); + cmpls(pd, pg, zn, static_cast(imm.AsUintN(7))); + } else { + CompareHelper(ls, pd, pg, zn, imm); + } + } + void Cmplt(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + cmplt(pd, pg, zn, zm); + } + void Cmplt(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + IntegerOperand imm) { + VIXL_ASSERT(allow_macro_instructions_); + int imm5; + if (imm.TryEncodeAsIntNForLane<5>(zn, &imm5)) { + SingleEmissionCheckScope guard(this); + cmplt(pd, pg, zn, imm5); + } else { + CompareHelper(lt, pd, pg, zn, imm); + } + } + void Cmpne(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + cmpne(pd, pg, zn, zm); + } + void Cmpne(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + IntegerOperand imm) { + VIXL_ASSERT(allow_macro_instructions_); + int imm5; + if (imm.TryEncodeAsIntNForLane<5>(zn, &imm5)) { + SingleEmissionCheckScope guard(this); + cmpne(pd, pg, zn, imm5); + } else { + CompareHelper(ne, pd, pg, zn, imm); + } + } + void Cnot(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + cnot(zd, pg, zn); + } + void Cnt(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + cnt(zd, pg, zn); + } + void Cntb(const Register& rd, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + cntb(rd, pattern, multiplier); + } + void Cntd(const Register& rd, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + cntd(rd, pattern, multiplier); + } + void Cnth(const Register& rd, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + cnth(rd, pattern, multiplier); + } + void Cntp(const Register& rd, + const PRegister& pg, + const PRegisterWithLaneSize& pn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + // The `cntp` instruction architecturally takes an X register, but the + // result will always be in the range [0, kPRegMaxSize] (and therefore + // always fits in a W register), so we can accept a W-sized rd here. + cntp(rd.X(), pg, pn); + } + void Cntw(const Register& rd, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + cntw(rd, pattern, multiplier); + } + void Compact(const ZRegister& zd, const PRegister& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + compact(zd, pg, zn); + } + void Cpy(const ZRegister& zd, const PRegister& pg, IntegerOperand imm); + void Cpy(const ZRegister& zd, const PRegisterM& pg, const Register& rn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + cpy(zd, pg, rn); + } + void Cpy(const ZRegister& zd, const PRegisterM& pg, const VRegister& vn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + cpy(zd, pg, vn); + } + void Ctermeq(const Register& rn, const Register& rm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ctermeq(rn, rm); + } + void Ctermne(const Register& rn, const Register& rm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ctermne(rn, rm); + } + void Decb(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + decb(rdn, pattern, multiplier); + } + void Decd(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + decd(rdn, pattern, multiplier); + } + void Decd(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + decd(zdn, pattern, multiplier); + } + void Dech(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + dech(rdn, pattern, multiplier); + } + void Dech(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + dech(zdn, pattern, multiplier); + } + void Decp(const Register& rdn, const PRegisterWithLaneSize& pg) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + decp(rdn, pg); + } + void Decp(const ZRegister& zd, const PRegister& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(AreSameFormat(zd, zn)); + // `decp` writes every lane, so use an unpredicated movprfx. + MovprfxHelperScope guard(this, zd, zn); + decp(zd, pg); + } + void Decp(const ZRegister& zdn, const PRegister& pg) { Decp(zdn, pg, zdn); } + void Decw(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + decw(rdn, pattern, multiplier); + } + void Decw(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + decw(zdn, pattern, multiplier); + } + void Dup(const ZRegister& zd, const Register& xn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + dup(zd, xn); + } + void Dup(const ZRegister& zd, const ZRegister& zn, int index) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + dup(zd, zn, index); + } + void Dup(const ZRegister& zd, IntegerOperand imm); + void Eon(const ZRegister& zd, const ZRegister& zn, uint64_t imm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + if (IsImmLogical(imm, zd.GetLaneSizeInBits())) { + eon(zd, zn, imm); + } else { + // TODO: Synthesise the immediate once 'Mov' is implemented. + VIXL_UNIMPLEMENTED(); + } + } + void Eor(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + eor(pd, pg, pn, pm); + } + void Eor(const ZRegister& zd, const ZRegister& zn, uint64_t imm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + if (IsImmLogical(imm, zd.GetLaneSizeInBits())) { + eor(zd, zn, imm); + } else { + // TODO: Synthesise the immediate once 'Mov' is implemented. + VIXL_UNIMPLEMENTED(); + } + } + void Eor(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + SingleEmissionCheckScope guard(this); + eor(zd.VnD(), zn.VnD(), zm.VnD()); + } + void Eors(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + eors(pd, pg, pn, pm); + } + void Eorv(const VRegister& vd, const PRegister& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + eorv(vd, pg, zn); + } + void Ext(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm, + unsigned offset); + void Fabd(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm, + FPMacroNaNPropagationOption nan_option); + void Fabs(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fabs(zd, pg, zn); + } + void Facge(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + facge(pd, pg, zn, zm); + } + void Facgt(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + facgt(pd, pg, zn, zm); + } + void Facle(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + facge(pd, pg, zm, zn); + } + void Faclt(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + facgt(pd, pg, zm, zn); + } + void Fadd(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + double imm) { + VIXL_ASSERT(allow_macro_instructions_); + MovprfxHelperScope guard(this, zd, pg, zn); + fadd(zd, pg, zd, imm); + } + void Fadd(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm, + FPMacroNaNPropagationOption nan_option); + void Fadd(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fadd(zd, zn, zm); + } + void Fadda(const VRegister& vd, + const PRegister& pg, + const VRegister& vn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fadda(vd, pg, vn, zm); + } + void Faddv(const VRegister& vd, const PRegister& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + faddv(vd, pg, zn); + } + void Fcadd(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm, + int rot); + void Fcmeq(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + double zero) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + if (zero == 0.0) { + fcmeq(pd, pg, zn, zero); + } else { + // TODO: Synthesise other immediates. + VIXL_UNIMPLEMENTED(); + } + } + void Fcmeq(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fcmeq(pd, pg, zn, zm); + } + void Fcmge(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + double zero) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + if (zero == 0.0) { + fcmge(pd, pg, zn, zero); + } else { + // TODO: Synthesise other immediates. + VIXL_UNIMPLEMENTED(); + } + } + void Fcmge(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fcmge(pd, pg, zn, zm); + } + void Fcmgt(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + double zero) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + if (zero == 0.0) { + fcmgt(pd, pg, zn, zero); + } else { + // TODO: Synthesise other immediates. + VIXL_UNIMPLEMENTED(); + } + } + void Fcmgt(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fcmgt(pd, pg, zn, zm); + } + void Fcmla(const ZRegister& zda, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm, + int rot) { + VIXL_ASSERT(allow_macro_instructions_); + MovprfxHelperScope guard(this, zda, pg, zda); + fcmla(zda, pg, zn, zm, rot); + } + void Fcmla(const ZRegister& zda, + const ZRegister& zn, + const ZRegister& zm, + int index, + int rot) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fcmla(zda, zn, zm, index, rot); + } + void Fcmle(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + double zero) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + if (zero == 0.0) { + fcmle(pd, pg, zn, zero); + } else { + // TODO: Synthesise other immediates. + VIXL_UNIMPLEMENTED(); + } + } + void Fcmle(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fcmge(pd, pg, zm, zn); + } + void Fcmlt(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + double zero) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + if (zero == 0.0) { + fcmlt(pd, pg, zn, zero); + } else { + // TODO: Synthesise other immediates. + VIXL_UNIMPLEMENTED(); + } + } + void Fcmlt(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fcmgt(pd, pg, zm, zn); + } + void Fcmne(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + double zero) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + if (zero == 0.0) { + fcmne(pd, pg, zn, zero); + } else { + // TODO: Synthesise other immediates. + VIXL_UNIMPLEMENTED(); + } + } + void Fcmne(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fcmne(pd, pg, zn, zm); + } + void Fcmuo(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fcmuo(pd, pg, zn, zm); + } + void Fcpy(const ZRegister& zd, const PRegisterM& pg, double imm); + void Fcpy(const ZRegister& zd, const PRegisterM& pg, float imm); + void Fcpy(const ZRegister& zd, const PRegisterM& pg, Float16 imm); + void Fcvt(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fcvt(zd, pg, zn); + } + void Fcvt(const ZRegister& zd, const PRegisterZ& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + // The element type in this predicated movprfx is determined by the larger + // type between the source and destination. + int lane_size = max(zd.GetLaneSizeInBits(), zn.GetLaneSizeInBits()); + MovprfxHelperScope guard(this, + zd.WithLaneSize(lane_size), + pg, + zn.WithLaneSize(lane_size)); + fcvt(zd, pg.Merging(), zn); + } + void Fcvtzs(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fcvtzs(zd, pg, zn); + } + void Fcvtzu(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fcvtzu(zd, pg, zn); + } + void Fdiv(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + void Fdup(const ZRegister& zd, double imm); + void Fdup(const ZRegister& zd, float imm); + void Fdup(const ZRegister& zd, Float16 imm); + void Fexpa(const ZRegister& zd, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fexpa(zd, zn); + } + void Fmad(const ZRegister& zdn, + const PRegisterM& pg, + const ZRegister& zm, + const ZRegister& za) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fmad(zdn, pg, zm, za); + } + void Fmax(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + double imm) { + VIXL_ASSERT(allow_macro_instructions_); + MovprfxHelperScope guard(this, zd, pg, zn); + fmax(zd, pg, zd, imm); + } + void Fmax( + const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm, + FPMacroNaNPropagationOption nan_option = NoFPMacroNaNPropagationSelected); + void Fmaxnm(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + double imm) { + VIXL_ASSERT(allow_macro_instructions_); + MovprfxHelperScope guard(this, zd, pg, zn); + fmaxnm(zd, pg, zd, imm); + } + void Fmaxnm(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm, + FPMacroNaNPropagationOption nan_option); + void Fmaxnmv(const VRegister& vd, const PRegister& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fmaxnmv(vd, pg, zn); + } + void Fmaxv(const VRegister& vd, const PRegister& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fmaxv(vd, pg, zn); + } + void Fmin(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + double imm) { + VIXL_ASSERT(allow_macro_instructions_); + MovprfxHelperScope guard(this, zd, pg, zn); + fmin(zd, pg, zd, imm); + } + void Fmin( + const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm, + FPMacroNaNPropagationOption nan_option = NoFPMacroNaNPropagationSelected); + void Fminnm(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + double imm) { + VIXL_ASSERT(allow_macro_instructions_); + MovprfxHelperScope guard(this, zd, pg, zn); + fminnm(zd, pg, zd, imm); + } + void Fminnm(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm, + FPMacroNaNPropagationOption nan_option); + void Fminnmv(const VRegister& vd, const PRegister& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fminnmv(vd, pg, zn); + } + void Fminv(const VRegister& vd, const PRegister& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fminv(vd, pg, zn); + } + // zd = za + (zn * zm) + void Fmla( + const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm, + FPMacroNaNPropagationOption nan_option = NoFPMacroNaNPropagationSelected); + void Fmla(const ZRegister& zd, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm, + int index); + // zd = za - (zn * zm) + void Fmls( + const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm, + FPMacroNaNPropagationOption nan_option = NoFPMacroNaNPropagationSelected); + void Fmls(const ZRegister& zd, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm, + int index); + void Fmov(const ZRegister& zd, double imm) { + VIXL_ASSERT(allow_macro_instructions_); + Fdup(zd, imm); + } + void Fmov(const ZRegister& zd, float imm) { + VIXL_ASSERT(allow_macro_instructions_); + Fdup(zd, imm); + } + void Fmov(const ZRegister& zd, Float16 imm) { + VIXL_ASSERT(allow_macro_instructions_); + Fdup(zd, imm); + } + void Fmov(const ZRegister& zd, const PRegisterM& pg, double imm) { + VIXL_ASSERT(allow_macro_instructions_); + Fcpy(zd, pg, imm); + } + void Fmov(const ZRegister& zd, const PRegisterM& pg, float imm) { + VIXL_ASSERT(allow_macro_instructions_); + Fcpy(zd, pg, imm); + } + void Fmov(const ZRegister& zd, const PRegisterM& pg, Float16 imm) { + VIXL_ASSERT(allow_macro_instructions_); + Fcpy(zd, pg, imm); + } + void Fmsb(const ZRegister& zdn, + const PRegisterM& pg, + const ZRegister& zm, + const ZRegister& za) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fmsb(zdn, pg, zm, za); + } + void Fmul(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + double imm) { + VIXL_ASSERT(allow_macro_instructions_); + MovprfxHelperScope guard(this, zd, pg, zn); + fmul(zd, pg, zd, imm); + } + void Fmul(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm, + FPMacroNaNPropagationOption nan_option); + void Fmul(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm, + unsigned index) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fmul(zd, zn, zm, index); + } + void Fmul(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fmul(zd, zn, zm); + } + void Fmulx(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm, + FPMacroNaNPropagationOption nan_option); + void Fneg(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fneg(zd, pg, zn); + } + void Fnmla( + const ZRegister& zda, + const PRegisterM& pg, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm, + FPMacroNaNPropagationOption nan_option = NoFPMacroNaNPropagationSelected); + void Fnmls( + const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm, + FPMacroNaNPropagationOption nan_option = NoFPMacroNaNPropagationSelected); + void Frecpe(const ZRegister& zd, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + frecpe(zd, zn); + } + void Frecps(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + frecps(zd, zn, zm); + } + void Frecpx(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + frecpx(zd, pg, zn); + } + void Frecpx(const ZRegister& zd, const PRegisterZ& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + MovprfxHelperScope guard(this, zd, pg, zn); + frecpx(zd, pg.Merging(), zn); + } + void Frinta(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + frinta(zd, pg, zn); + } + void Frinta(const ZRegister& zd, const PRegisterZ& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + MovprfxHelperScope guard(this, zd, pg, zn); + frinta(zd, pg.Merging(), zn); + } + void Frinti(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + frinti(zd, pg, zn); + } + void Frinti(const ZRegister& zd, const PRegisterZ& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + MovprfxHelperScope guard(this, zd, pg, zn); + frinti(zd, pg.Merging(), zn); + } + void Frintm(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + frintm(zd, pg, zn); + } + void Frintm(const ZRegister& zd, const PRegisterZ& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + MovprfxHelperScope guard(this, zd, pg, zn); + frintm(zd, pg.Merging(), zn); + } + void Frintn(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + frintn(zd, pg, zn); + } + void Frintn(const ZRegister& zd, const PRegisterZ& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + MovprfxHelperScope guard(this, zd, pg, zn); + frintn(zd, pg.Merging(), zn); + } + void Frintp(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + frintp(zd, pg, zn); + } + void Frintp(const ZRegister& zd, const PRegisterZ& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + MovprfxHelperScope guard(this, zd, pg, zn); + frintp(zd, pg.Merging(), zn); + } + void Frintx(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + frintx(zd, pg, zn); + } + void Frintx(const ZRegister& zd, const PRegisterZ& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + MovprfxHelperScope guard(this, zd, pg, zn); + frintx(zd, pg.Merging(), zn); + } + void Frintz(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + frintz(zd, pg, zn); + } + void Frintz(const ZRegister& zd, const PRegisterZ& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + MovprfxHelperScope guard(this, zd, pg, zn); + frintz(zd, pg.Merging(), zn); + } + void Frsqrte(const ZRegister& zd, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + frsqrte(zd, zn); + } + void Frsqrts(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + frsqrts(zd, zn, zm); + } + void Fscale(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + void Fsqrt(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fsqrt(zd, pg, zn); + } + void Fsqrt(const ZRegister& zd, const PRegisterZ& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + MovprfxHelperScope guard(this, zd, pg, zn); + fsqrt(zd, pg.Merging(), zn); + } + void Fsub(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + double imm) { + VIXL_ASSERT(allow_macro_instructions_); + MovprfxHelperScope guard(this, zd, pg, zn); + fsub(zd, pg, zd, imm); + } + void Fsub(const ZRegister& zd, + const PRegisterM& pg, + double imm, + const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + MovprfxHelperScope guard(this, zd, pg, zn); + fsubr(zd, pg, zd, imm); + } + void Fsub(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + void Fsub(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + fsub(zd, zn, zm); + } + void Ftmad(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm, + int imm3); + void Ftsmul(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ftsmul(zd, zn, zm); + } + void Ftssel(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ftssel(zd, zn, zm); + } + void Incb(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + incb(rdn, pattern, multiplier); + } + void Incd(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + incd(rdn, pattern, multiplier); + } + void Incd(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + incd(zdn, pattern, multiplier); + } + void Inch(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + inch(rdn, pattern, multiplier); + } + void Inch(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + inch(zdn, pattern, multiplier); + } + void Incp(const Register& rdn, const PRegisterWithLaneSize& pg) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + incp(rdn, pg); + } + void Incp(const ZRegister& zd, const PRegister& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(AreSameFormat(zd, zn)); + // `incp` writes every lane, so use an unpredicated movprfx. + MovprfxHelperScope guard(this, zd, zn); + incp(zd, pg); + } + void Incp(const ZRegister& zdn, const PRegister& pg) { Incp(zdn, pg, zdn); } + void Incw(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + incw(rdn, pattern, multiplier); + } + void Incw(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + incw(zdn, pattern, multiplier); + } + void Index(const ZRegister& zd, const Operand& start, const Operand& step); + void Insr(const ZRegister& zdn, const Register& rm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + insr(zdn, rm); + } + void Insr(const ZRegister& zdn, const VRegister& vm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + insr(zdn, vm); + } + void Insr(const ZRegister& zdn, IntegerOperand imm); + void Lasta(const Register& rd, const PRegister& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + lasta(rd, pg, zn); + } + void Lasta(const VRegister& vd, const PRegister& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + lasta(vd, pg, zn); + } + void Lastb(const Register& rd, const PRegister& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + lastb(rd, pg, zn); + } + void Lastb(const VRegister& vd, const PRegister& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + lastb(vd, pg, zn); + } + void Ld1b(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + void Ld1h(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + void Ld1w(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + void Ld1d(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + void Ld1rb(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadBroadcastImmHelper(zt, + pg, + addr, + &MacroAssembler::ld1rb, + kBRegSizeInBytes); + } + void Ld1rh(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadBroadcastImmHelper(zt, + pg, + addr, + &MacroAssembler::ld1rh, + kHRegSizeInBytes); + } + void Ld1rw(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadBroadcastImmHelper(zt, + pg, + addr, + &MacroAssembler::ld1rw, + kSRegSizeInBytes); + } + void Ld1rd(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadBroadcastImmHelper(zt, + pg, + addr, + &MacroAssembler::ld1rd, + kDRegSizeInBytes); + } + void Ld1rqb(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + void Ld1rqd(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + void Ld1rqh(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + void Ld1rqw(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + void Ld1rsb(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadBroadcastImmHelper(zt, + pg, + addr, + &MacroAssembler::ld1rsb, + kBRegSizeInBytes); + } + void Ld1rsh(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadBroadcastImmHelper(zt, + pg, + addr, + &MacroAssembler::ld1rsh, + kHRegSizeInBytes); + } + void Ld1rsw(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadBroadcastImmHelper(zt, + pg, + addr, + &MacroAssembler::ld1rsw, + kSRegSizeInBytes); + } + void Ld1sb(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + void Ld1sh(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + void Ld1sw(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + void Ld2b(const ZRegister& zt1, + const ZRegister& zt2, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ld2b(zt1, zt2, pg, addr); + } + void Ld2h(const ZRegister& zt1, + const ZRegister& zt2, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ld2h(zt1, zt2, pg, addr); + } + void Ld2w(const ZRegister& zt1, + const ZRegister& zt2, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ld2w(zt1, zt2, pg, addr); + } + void Ld2d(const ZRegister& zt1, + const ZRegister& zt2, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ld2d(zt1, zt2, pg, addr); + } + void Ld3b(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ld3b(zt1, zt2, zt3, pg, addr); + } + void Ld3h(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ld3h(zt1, zt2, zt3, pg, addr); + } + void Ld3w(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ld3w(zt1, zt2, zt3, pg, addr); + } + void Ld3d(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ld3d(zt1, zt2, zt3, pg, addr); + } + void Ld4b(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const ZRegister& zt4, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ld4b(zt1, zt2, zt3, zt4, pg, addr); + } + void Ld4h(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const ZRegister& zt4, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ld4h(zt1, zt2, zt3, zt4, pg, addr); + } + void Ld4w(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const ZRegister& zt4, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ld4w(zt1, zt2, zt3, zt4, pg, addr); + } + void Ld4d(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const ZRegister& zt4, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ld4d(zt1, zt2, zt3, zt4, pg, addr); + } + void Ldff1b(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + void Ldff1h(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + void Ldff1w(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + void Ldff1d(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + void Ldff1sb(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + void Ldff1sh(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + void Ldff1sw(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + void Ldff1b(const ZRegister& zt, + const PRegisterZ& pg, + const Register& xn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldff1b(zt, pg, xn, zm); + } + void Ldff1b(const ZRegister& zt, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldff1b(zt, pg, zn, imm5); + } + void Ldff1d(const ZRegister& zt, + const PRegisterZ& pg, + const Register& xn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldff1d(zt, pg, xn, zm); + } + void Ldff1d(const ZRegister& zt, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldff1d(zt, pg, zn, imm5); + } + void Ldff1h(const ZRegister& zt, + const PRegisterZ& pg, + const Register& xn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldff1h(zt, pg, xn, zm); + } + void Ldff1h(const ZRegister& zt, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldff1h(zt, pg, zn, imm5); + } + void Ldff1sb(const ZRegister& zt, + const PRegisterZ& pg, + const Register& xn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldff1sb(zt, pg, xn, zm); + } + void Ldff1sb(const ZRegister& zt, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldff1sb(zt, pg, zn, imm5); + } + void Ldff1sh(const ZRegister& zt, + const PRegisterZ& pg, + const Register& xn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldff1sh(zt, pg, xn, zm); + } + void Ldff1sh(const ZRegister& zt, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldff1sh(zt, pg, zn, imm5); + } + void Ldff1sw(const ZRegister& zt, + const PRegisterZ& pg, + const Register& xn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldff1sw(zt, pg, xn, zm); + } + void Ldff1sw(const ZRegister& zt, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldff1sw(zt, pg, zn, imm5); + } + void Ldff1w(const ZRegister& zt, + const PRegisterZ& pg, + const Register& xn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldff1w(zt, pg, xn, zm); + } + void Ldff1w(const ZRegister& zt, + const PRegisterZ& pg, + const ZRegister& zn, + int imm5) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldff1w(zt, pg, zn, imm5); + } + void Ldnf1b(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldnf1b(zt, pg, addr); + } + void Ldnf1d(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldnf1d(zt, pg, addr); + } + void Ldnf1h(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldnf1h(zt, pg, addr); + } + void Ldnf1sb(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldnf1sb(zt, pg, addr); + } + void Ldnf1sh(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldnf1sh(zt, pg, addr); + } + void Ldnf1sw(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldnf1sw(zt, pg, addr); + } + void Ldnf1w(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ldnf1w(zt, pg, addr); + } + void Ldnt1b(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + void Ldnt1d(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + void Ldnt1h(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + void Ldnt1w(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + void Ldr(const CPURegister& rt, const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadStoreScalarImmHelper(rt, addr, &MacroAssembler::ldr); + } + void Lsl(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + int shift) { + VIXL_ASSERT(allow_macro_instructions_); + MovprfxHelperScope guard(this, zd, pg, zn); + lsl(zd, pg, zd, shift); + } + void Lsl(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + void Lsl(const ZRegister& zd, const ZRegister& zn, int shift) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + lsl(zd, zn, shift); + } + void Lsl(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + lsl(zd, zn, zm); + } + void Lsr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + int shift) { + VIXL_ASSERT(allow_macro_instructions_); + MovprfxHelperScope guard(this, zd, pg, zn); + lsr(zd, pg, zd, shift); + } + void Lsr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + void Lsr(const ZRegister& zd, const ZRegister& zn, int shift) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + lsr(zd, zn, shift); + } + void Lsr(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + lsr(zd, zn, zm); + } + void Mov(const PRegister& pd, const PRegister& pn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + mov(pd.VnB(), pn.VnB()); + } + void Mov(const PRegisterWithLaneSize& pd, + const PRegisterM& pg, + const PRegisterWithLaneSize& pn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + mov(pd, pg, pn); + } + void Mov(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + mov(pd, pg, pn); + } + void Mov(const ZRegister& zd, const Register& xn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + mov(zd, xn); + } + + void Mov(const ZRegister& zd, const VRegister& vn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + mov(zd, vn); + } + + void Mov(const ZRegister& zd, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + mov(zd, zn); + } + void Mov(const ZRegister& zd, const ZRegister& zn, unsigned index) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + mov(zd, zn, index); + } + void Mov(const ZRegister& zd, const PRegister& pg, IntegerOperand imm) { + VIXL_ASSERT(allow_macro_instructions_); + Cpy(zd, pg, imm); + } + // TODO: support zeroing predicated moves using movprfx. + void Mov(const ZRegister& zd, const PRegisterM& pg, const Register& rn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + mov(zd, pg, rn); + } + void Mov(const ZRegister& zd, const PRegisterM& pg, const VRegister& vn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + mov(zd, pg, vn); + } + void Mov(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + mov(zd, pg, zn); + } + void Mov(const ZRegister& zd, IntegerOperand imm) { + VIXL_ASSERT(allow_macro_instructions_); + Dup(zd, imm); + } + void Movs(const PRegister& pd, const PRegister& pn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + movs(pd, pn); + } + void Movs(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + movs(pd, pg, pn); + } + // zd = za + (zn * zm) + void Mla(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm); + // zd = za - (zn * zm) + void Mls(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm); + void Mul(const ZRegister& zd, const ZRegister& zn, IntegerOperand imm); + void Nand(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + nand(pd, pg, pn, pm); + } + void Nands(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + nands(pd, pg, pn, pm); + } + // There is no instruction with this form, but we can implement it using + // `subr`. + void Neg(const ZRegister& zd, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + MovprfxHelperScope guard(this, zd, zn); + subr(zd, zd, 0); + } + void Neg(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + neg(zd, pg, zn); + } + void Nor(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + nor(pd, pg, pn, pm); + } + void Nors(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + nors(pd, pg, pn, pm); + } + void Not(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + not_(pd, pg, pn); + } + void Not(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + not_(zd, pg, zn); + } + void Nots(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + nots(pd, pg, pn); + } + void Orn(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + orn(pd, pg, pn, pm); + } + void Orn(const ZRegister& zd, const ZRegister& zn, uint64_t imm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + if (IsImmLogical(imm, zd.GetLaneSizeInBits())) { + orn(zd, zn, imm); + } else { + // TODO: Synthesise the immediate once 'Mov' is implemented. + VIXL_UNIMPLEMENTED(); + } + } + void Orns(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + orns(pd, pg, pn, pm); + } + void Orr(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + orr(pd, pg, pn, pm); + } + void Orr(const ZRegister& zd, const ZRegister& zn, uint64_t imm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + if (IsImmLogical(imm, zd.GetLaneSizeInBits())) { + orr(zd, zn, imm); + } else { + // TODO: Synthesise the immediate once 'Mov' is implemented. + VIXL_UNIMPLEMENTED(); + } + } + void Orr(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(AreSameLaneSize(zd, zn, zm)); + SingleEmissionCheckScope guard(this); + orr(zd.VnD(), zn.VnD(), zm.VnD()); + } + void Orrs(const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + orrs(pd, pg, pn, pm); + } + void Orv(const VRegister& vd, const PRegister& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + orv(vd, pg, zn); + } + void Pfalse(const PRegister& pd) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(pd.IsUnqualified()); + SingleEmissionCheckScope guard(this); + // No matter what the lane size is, overall this operation just writes zeros + // throughout the register. + pfalse(pd.VnB()); + } + void Pfirst(const PRegisterWithLaneSize& pd, + const PRegister& pg, + const PRegisterWithLaneSize& pn); + void Pnext(const PRegisterWithLaneSize& pd, + const PRegister& pg, + const PRegisterWithLaneSize& pn); + void Prfb(PrefetchOperation prfop, + const PRegister& pg, + const SVEMemOperand addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + prfb(prfop, pg, addr); + } + void Prfh(PrefetchOperation prfop, + const PRegister& pg, + const SVEMemOperand addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + prfh(prfop, pg, addr); + } + void Prfw(PrefetchOperation prfop, + const PRegister& pg, + const SVEMemOperand addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + prfw(prfop, pg, addr); + } + void Prfd(PrefetchOperation prfop, + const PRegister& pg, + const SVEMemOperand addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + prfd(prfop, pg, addr); + } + void Ptest(const PRegister& pg, const PRegisterWithLaneSize& pn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ptest(pg, pn); + } + void Ptrue(const PRegisterWithLaneSize& pd, + SVEPredicateConstraint pattern, + FlagsUpdate s); + void Ptrue(const PRegisterWithLaneSize& pd, + SVEPredicateConstraint pattern = SVE_ALL) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ptrue(pd, pattern); + } + void Ptrues(const PRegisterWithLaneSize& pd, + SVEPredicateConstraint pattern = SVE_ALL) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ptrues(pd, pattern); + } + void Punpkhi(const PRegisterWithLaneSize& pd, + const PRegisterWithLaneSize& pn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + punpkhi(pd, pn); + } + void Punpklo(const PRegisterWithLaneSize& pd, + const PRegisterWithLaneSize& pn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + punpklo(pd, pn); + } + void Rbit(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + rbit(zd, pg, zn); + } + void Rdffr(const PRegister& pd) { + VIXL_ASSERT(allow_macro_instructions_); + // Although this is essentially just a move, it writes every bit and so can + // only support b-sized lane because other lane sizes would simplicity clear + // bits in `pd`. + VIXL_ASSERT(!pd.HasLaneSize() || pd.IsLaneSizeB()); + VIXL_ASSERT(pd.IsUnqualified()); + SingleEmissionCheckScope guard(this); + rdffr(pd.VnB()); + } + void Rdffr(const PRegisterWithLaneSize& pd, const PRegisterZ& pg) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + rdffr(pd, pg); + } + void Rdffrs(const PRegisterWithLaneSize& pd, const PRegisterZ& pg) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + rdffrs(pd, pg); + } + // Note that there is no `rdpl` instruction, but this macro emulates it (for + // symmetry with `Rdvl`). + void Rdpl(const Register& xd, int64_t multiplier) { + VIXL_ASSERT(allow_macro_instructions_); + Addpl(xd, xzr, multiplier); + } + void Rdvl(const Register& xd, int64_t multiplier) { + VIXL_ASSERT(allow_macro_instructions_); + Addvl(xd, xzr, multiplier); + } + void Rev(const PRegisterWithLaneSize& pd, const PRegisterWithLaneSize& pn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + rev(pd, pn); + } + void Rev(const ZRegister& zd, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + rev(zd, zn); + } + void Revb(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + revb(zd, pg, zn); + } + void Revh(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + revh(zd, pg, zn); + } + void Revw(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + revw(zd, pg, zn); + } + void Saddv(const VRegister& dd, const PRegister& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + saddv(dd, pg, zn); + } + void Scvtf(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + scvtf(zd, pg, zn); + } + void Sdiv(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + void Sdot(const ZRegister& zd, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm); + void Sdot(const ZRegister& zd, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm, + int index); + void Sel(const PRegisterWithLaneSize& pd, + const PRegister& pg, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sel(pd, pg, pn, pm); + } + void Sel(const ZRegister& zd, + const PRegister& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sel(zd, pg, zn, zm); + } + void Setffr() { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + setffr(); + } + void Smax(const ZRegister& zd, const ZRegister& zn, IntegerOperand imm); + void Smaxv(const VRegister& vd, const PRegister& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + smaxv(vd, pg, zn); + } + void Smin(const ZRegister& zd, const ZRegister& zn, IntegerOperand imm); + void Sminv(const VRegister& vd, const PRegister& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sminv(vd, pg, zn); + } + void Splice(const ZRegister& zd, + const PRegister& pg, + const ZRegister& zn, + const ZRegister& zm); + void Sqadd(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sqadd(zd, zn, zm); + } + void Sqadd(const ZRegister& zd, const ZRegister& zn, IntegerOperand imm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(imm.IsUint8() || + (imm.IsUint16() && ((imm.AsUint16() & 0xff) == 0))); + MovprfxHelperScope guard(this, zd, zn); + sqadd(zd, zd, imm.AsUint16()); + } + void Sqdecb(const Register& xd, + const Register& wn, + int pattern = SVE_ALL, + int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sqdecb(xd, wn, pattern, multiplier); + } + void Sqdecb(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sqdecb(rdn, pattern, multiplier); + } + void Sqdecd(const Register& xd, + const Register& wn, + int pattern = SVE_ALL, + int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sqdecd(xd, wn, pattern, multiplier); + } + void Sqdecd(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sqdecd(rdn, pattern, multiplier); + } + void Sqdecd(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sqdecd(zdn, pattern, multiplier); + } + void Sqdech(const Register& xd, + const Register& wn, + int pattern = SVE_ALL, + int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sqdech(xd, wn, pattern, multiplier); + } + void Sqdech(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sqdech(rdn, pattern, multiplier); + } + void Sqdech(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sqdech(zdn, pattern, multiplier); + } + void Sqdecp(const Register& xdn, + const PRegisterWithLaneSize& pg, + const Register& wdn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sqdecp(xdn, pg, wdn); + } + void Sqdecp(const Register& xdn, const PRegisterWithLaneSize& pg) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sqdecp(xdn, pg); + } + void Sqdecp(const ZRegister& zd, const PRegister& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(AreSameFormat(zd, zn)); + // `sqdecp` writes every lane, so use an unpredicated movprfx. + MovprfxHelperScope guard(this, zd, zn); + sqdecp(zd, pg); + } + void Sqdecp(const ZRegister& zdn, const PRegister& pg) { + Sqdecp(zdn, pg, zdn); + } + void Sqdecw(const Register& xd, + const Register& wn, + int pattern = SVE_ALL, + int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sqdecw(xd, wn, pattern, multiplier); + } + void Sqdecw(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sqdecw(rdn, pattern, multiplier); + } + void Sqdecw(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sqdecw(zdn, pattern, multiplier); + } + void Sqincb(const Register& xd, + const Register& wn, + int pattern = SVE_ALL, + int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sqincb(xd, wn, pattern, multiplier); + } + void Sqincb(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sqincb(rdn, pattern, multiplier); + } + void Sqincd(const Register& xd, + const Register& wn, + int pattern = SVE_ALL, + int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sqincd(xd, wn, pattern, multiplier); + } + void Sqincd(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sqincd(rdn, pattern, multiplier); + } + void Sqincd(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sqincd(zdn, pattern, multiplier); + } + void Sqinch(const Register& xd, + const Register& wn, + int pattern = SVE_ALL, + int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sqinch(xd, wn, pattern, multiplier); + } + void Sqinch(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sqinch(rdn, pattern, multiplier); + } + void Sqinch(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sqinch(zdn, pattern, multiplier); + } + void Sqincp(const Register& xdn, + const PRegisterWithLaneSize& pg, + const Register& wdn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sqincp(xdn, pg, wdn); + } + void Sqincp(const Register& xdn, const PRegisterWithLaneSize& pg) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sqincp(xdn, pg); + } + void Sqincp(const ZRegister& zd, const PRegister& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(AreSameFormat(zd, zn)); + // `sqincp` writes every lane, so use an unpredicated movprfx. + MovprfxHelperScope guard(this, zd, zn); + sqincp(zd, pg); + } + void Sqincp(const ZRegister& zdn, const PRegister& pg) { + Sqincp(zdn, pg, zdn); + } + void Sqincw(const Register& xd, + const Register& wn, + int pattern = SVE_ALL, + int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sqincw(xd, wn, pattern, multiplier); + } + void Sqincw(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sqincw(rdn, pattern, multiplier); + } + void Sqincw(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sqincw(zdn, pattern, multiplier); + } + void Sqsub(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sqsub(zd, zn, zm); + } + void Sqsub(const ZRegister& zd, const ZRegister& zn, IntegerOperand imm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(imm.IsUint8() || + (imm.IsUint16() && ((imm.AsUint16() & 0xff) == 0))); + MovprfxHelperScope guard(this, zd, zn); + sqsub(zd, zd, imm.AsUint16()); + } + void St1b(const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr); + void St1h(const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr); + void St1w(const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr); + void St1d(const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr); + void St2b(const ZRegister& zt1, + const ZRegister& zt2, + const PRegister& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + st2b(zt1, zt2, pg, addr); + } + void St2h(const ZRegister& zt1, + const ZRegister& zt2, + const PRegister& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + st2h(zt1, zt2, pg, addr); + } + void St2w(const ZRegister& zt1, + const ZRegister& zt2, + const PRegister& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + st2w(zt1, zt2, pg, addr); + } + void St2d(const ZRegister& zt1, + const ZRegister& zt2, + const PRegister& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + st2d(zt1, zt2, pg, addr); + } + void St3b(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const PRegister& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + st3b(zt1, zt2, zt3, pg, addr); + } + void St3h(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const PRegister& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + st3h(zt1, zt2, zt3, pg, addr); + } + void St3w(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const PRegister& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + st3w(zt1, zt2, zt3, pg, addr); + } + void St3d(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const PRegister& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + st3d(zt1, zt2, zt3, pg, addr); + } + void St4b(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const ZRegister& zt4, + const PRegister& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + st4b(zt1, zt2, zt3, zt4, pg, addr); + } + void St4h(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const ZRegister& zt4, + const PRegister& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + st4h(zt1, zt2, zt3, zt4, pg, addr); + } + void St4w(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const ZRegister& zt4, + const PRegister& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + st4w(zt1, zt2, zt3, zt4, pg, addr); + } + void St4d(const ZRegister& zt1, + const ZRegister& zt2, + const ZRegister& zt3, + const ZRegister& zt4, + const PRegister& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + st4d(zt1, zt2, zt3, zt4, pg, addr); + } + void Stnt1b(const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr); + void Stnt1d(const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr); + void Stnt1h(const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr); + void Stnt1w(const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr); + void Str(const CPURegister& rt, const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadStoreScalarImmHelper(rt, addr, &MacroAssembler::str); + } + void Sub(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + void Sub(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sub(zd, zn, zm); + } + void Sub(const ZRegister& zd, const ZRegister& zn, IntegerOperand imm) { + VIXL_ASSERT(allow_macro_instructions_); + AddSubHelper(kSubImmediate, zd, zn, imm); + } + void Sub(const ZRegister& zd, IntegerOperand imm, const ZRegister& zm); + void Sunpkhi(const ZRegister& zd, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sunpkhi(zd, zn); + } + void Sunpklo(const ZRegister& zd, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sunpklo(zd, zn); + } + void Sxtb(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sxtb(zd, pg, zn); + } + void Sxth(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sxth(zd, pg, zn); + } + void Sxtw(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + sxtw(zd, pg, zn); + } + void Tbl(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + tbl(zd, zn, zm); + } + void Trn1(const PRegisterWithLaneSize& pd, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + trn1(pd, pn, pm); + } + void Trn1(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + trn1(zd, zn, zm); + } + void Trn2(const PRegisterWithLaneSize& pd, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + trn2(pd, pn, pm); + } + void Trn2(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + trn2(zd, zn, zm); + } + void Uaddv(const VRegister& dd, const PRegister& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + uaddv(dd, pg, zn); + } + void Ucvtf(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + ucvtf(zd, pg, zn); + } + void Udiv(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + void Udot(const ZRegister& zd, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm); + void Udot(const ZRegister& zd, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm, + int index); + void Umax(const ZRegister& zd, const ZRegister& zn, IntegerOperand imm); + void Umaxv(const VRegister& vd, const PRegister& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + umaxv(vd, pg, zn); + } + void Umin(const ZRegister& zd, const ZRegister& zn, IntegerOperand imm); + void Uminv(const VRegister& vd, const PRegister& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + uminv(vd, pg, zn); + } + void Uqadd(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + uqadd(zd, zn, zm); + } + void Uqadd(const ZRegister& zd, const ZRegister& zn, IntegerOperand imm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(imm.IsUint8() || + (imm.IsUint16() && ((imm.AsUint16() & 0xff) == 0))); + MovprfxHelperScope guard(this, zd, zn); + uqadd(zd, zd, imm.AsUint16()); + } + void Uqdecb(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + uqdecb(rdn, pattern, multiplier); + } + void Uqdecd(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + uqdecd(rdn, pattern, multiplier); + } + void Uqdecd(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + uqdecd(zdn, pattern, multiplier); + } + void Uqdech(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + uqdech(rdn, pattern, multiplier); + } + void Uqdech(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + uqdech(zdn, pattern, multiplier); + } + // The saturation is based on the size of `rn`. The result is zero-extended + // into `rd`, which must be at least as big. + void Uqdecp(const Register& rd, + const PRegisterWithLaneSize& pg, + const Register& rn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(rd.Aliases(rn)); + VIXL_ASSERT(rd.GetSizeInBytes() >= rn.GetSizeInBytes()); + SingleEmissionCheckScope guard(this); + if (rn.Is64Bits()) { + uqdecp(rd, pg); + } else { + // Convert into , to make this more consistent with Sqdecp. + uqdecp(rd.Wreg(), pg); + } + } + void Uqdecp(const Register& rdn, const PRegisterWithLaneSize& pg) { + Uqdecp(rdn, pg, rdn); + } + void Uqdecp(const ZRegister& zd, const PRegister& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(AreSameFormat(zd, zn)); + // `sqdecp` writes every lane, so use an unpredicated movprfx. + MovprfxHelperScope guard(this, zd, zn); + uqdecp(zd, pg); + } + void Uqdecp(const ZRegister& zdn, const PRegister& pg) { + Uqdecp(zdn, pg, zdn); + } + void Uqdecw(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + uqdecw(rdn, pattern, multiplier); + } + void Uqdecw(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + uqdecw(zdn, pattern, multiplier); + } + void Uqincb(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + uqincb(rdn, pattern, multiplier); + } + void Uqincd(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + uqincd(rdn, pattern, multiplier); + } + void Uqincd(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + uqincd(zdn, pattern, multiplier); + } + void Uqinch(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + uqinch(rdn, pattern, multiplier); + } + void Uqinch(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + uqinch(zdn, pattern, multiplier); + } + // The saturation is based on the size of `rn`. The result is zero-extended + // into `rd`, which must be at least as big. + void Uqincp(const Register& rd, + const PRegisterWithLaneSize& pg, + const Register& rn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(rd.Aliases(rn)); + VIXL_ASSERT(rd.GetSizeInBytes() >= rn.GetSizeInBytes()); + SingleEmissionCheckScope guard(this); + if (rn.Is64Bits()) { + uqincp(rd, pg); + } else { + // Convert into , to make this more consistent with Sqincp. + uqincp(rd.Wreg(), pg); + } + } + void Uqincp(const Register& rdn, const PRegisterWithLaneSize& pg) { + Uqincp(rdn, pg, rdn); + } + void Uqincp(const ZRegister& zd, const PRegister& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(AreSameFormat(zd, zn)); + // `sqincp` writes every lane, so use an unpredicated movprfx. + MovprfxHelperScope guard(this, zd, zn); + uqincp(zd, pg); + } + void Uqincp(const ZRegister& zdn, const PRegister& pg) { + Uqincp(zdn, pg, zdn); + } + void Uqincw(const Register& rdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + uqincw(rdn, pattern, multiplier); + } + void Uqincw(const ZRegister& zdn, int pattern = SVE_ALL, int multiplier = 1) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + uqincw(zdn, pattern, multiplier); + } + void Uqsub(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + uqsub(zd, zn, zm); + } + void Uqsub(const ZRegister& zd, const ZRegister& zn, IntegerOperand imm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(imm.IsUint8() || + (imm.IsUint16() && ((imm.AsUint16() & 0xff) == 0))); + MovprfxHelperScope guard(this, zd, zn); + uqsub(zd, zd, imm.AsUint16()); + } + void Uunpkhi(const ZRegister& zd, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + uunpkhi(zd, zn); + } + void Uunpklo(const ZRegister& zd, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + uunpklo(zd, zn); + } + void Uxtb(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + uxtb(zd, pg, zn); + } + void Uxth(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + uxth(zd, pg, zn); + } + void Uxtw(const ZRegister& zd, const PRegisterM& pg, const ZRegister& zn) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + uxtw(zd, pg, zn); + } + void Uzp1(const PRegisterWithLaneSize& pd, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + uzp1(pd, pn, pm); + } + void Uzp1(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + uzp1(zd, zn, zm); + } + void Uzp2(const PRegisterWithLaneSize& pd, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + uzp2(pd, pn, pm); + } + void Uzp2(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + uzp2(zd, zn, zm); + } + void Whilele(const PRegisterWithLaneSize& pd, + const Register& rn, + const Register& rm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + whilele(pd, rn, rm); + } + void Whilelo(const PRegisterWithLaneSize& pd, + const Register& rn, + const Register& rm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + whilelo(pd, rn, rm); + } + void Whilels(const PRegisterWithLaneSize& pd, + const Register& rn, + const Register& rm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + whilels(pd, rn, rm); + } + void Whilelt(const PRegisterWithLaneSize& pd, + const Register& rn, + const Register& rm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + whilelt(pd, rn, rm); + } + void Wrffr(const PRegister& pn) { + VIXL_ASSERT(allow_macro_instructions_); + // Although this is essentially just a move, it writes every bit and so can + // only support b-sized lane because other lane sizes would implicitly clear + // bits in `ffr`. + VIXL_ASSERT(!pn.HasLaneSize() || pn.IsLaneSizeB()); + VIXL_ASSERT(pn.IsUnqualified()); + SingleEmissionCheckScope guard(this); + wrffr(pn.VnB()); + } + void Zip1(const PRegisterWithLaneSize& pd, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + zip1(pd, pn, pm); + } + void Zip1(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + zip1(zd, zn, zm); + } + void Zip2(const PRegisterWithLaneSize& pd, + const PRegisterWithLaneSize& pn, + const PRegisterWithLaneSize& pm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + zip2(pd, pn, pm); + } + void Zip2(const ZRegister& zd, const ZRegister& zn, const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SingleEmissionCheckScope guard(this); + zip2(zd, zn, zm); + } + + template + Literal* CreateLiteralDestroyedWithPool(T value) { + return new Literal(value, + &literal_pool_, + RawLiteral::kDeletedOnPoolDestruction); + } + + template + Literal* CreateLiteralDestroyedWithPool(T high64, T low64) { + return new Literal(high64, + low64, + &literal_pool_, + RawLiteral::kDeletedOnPoolDestruction); + } + + // Push the system stack pointer (sp) down to allow the same to be done to + // the current stack pointer (according to StackPointer()). This must be + // called _before_ accessing the memory. + // + // This is necessary when pushing or otherwise adding things to the stack, to + // satisfy the AAPCS64 constraint that the memory below the system stack + // pointer is not accessed. + // + // This method asserts that StackPointer() is not sp, since the call does + // not make sense in that context. + // + // TODO: This method can only accept values of 'space' that can be encoded in + // one instruction. Refer to the implementation for details. + void BumpSystemStackPointer(const Operand& space); + + virtual bool AllowMacroInstructions() const VIXL_OVERRIDE { + return allow_macro_instructions_; + } + + virtual bool ArePoolsBlocked() const VIXL_OVERRIDE { + return IsLiteralPoolBlocked() && IsVeneerPoolBlocked(); + } + + void SetGenerateSimulatorCode(bool value) { + generate_simulator_code_ = value; + } + + bool GenerateSimulatorCode() const { return generate_simulator_code_; } + + size_t GetLiteralPoolSize() const { return literal_pool_.GetSize(); } + VIXL_DEPRECATED("GetLiteralPoolSize", size_t LiteralPoolSize() const) { + return GetLiteralPoolSize(); + } + + size_t GetLiteralPoolMaxSize() const { return literal_pool_.GetMaxSize(); } + VIXL_DEPRECATED("GetLiteralPoolMaxSize", size_t LiteralPoolMaxSize() const) { + return GetLiteralPoolMaxSize(); + } + + size_t GetVeneerPoolMaxSize() const { return veneer_pool_.GetMaxSize(); } + VIXL_DEPRECATED("GetVeneerPoolMaxSize", size_t VeneerPoolMaxSize() const) { + return GetVeneerPoolMaxSize(); + } + + // The number of unresolved branches that may require a veneer. + int GetNumberOfPotentialVeneers() const { + return veneer_pool_.GetNumberOfPotentialVeneers(); + } + VIXL_DEPRECATED("GetNumberOfPotentialVeneers", + int NumberOfPotentialVeneers() const) { + return GetNumberOfPotentialVeneers(); + } + + ptrdiff_t GetNextCheckPoint() const { + ptrdiff_t next_checkpoint_for_pools = + min(literal_pool_.GetCheckpoint(), veneer_pool_.GetCheckpoint()); + return min(next_checkpoint_for_pools, + static_cast(GetBuffer().GetCapacity())); + } + VIXL_DEPRECATED("GetNextCheckPoint", ptrdiff_t NextCheckPoint()) { + return GetNextCheckPoint(); + } + + void EmitLiteralPool(LiteralPool::EmitOption option) { + if (!literal_pool_.IsEmpty()) literal_pool_.Emit(option); + + checkpoint_ = GetNextCheckPoint(); + recommended_checkpoint_ = literal_pool_.GetNextRecommendedCheckpoint(); + } + + void CheckEmitFor(size_t amount); + void EnsureEmitFor(size_t amount) { + ptrdiff_t offset = amount; + ptrdiff_t max_pools_size = + literal_pool_.GetMaxSize() + veneer_pool_.GetMaxSize(); + ptrdiff_t cursor = GetCursorOffset(); + if ((cursor >= recommended_checkpoint_) || + ((cursor + offset + max_pools_size) >= checkpoint_)) { + CheckEmitFor(amount); + } + } + + void CheckEmitPoolsFor(size_t amount); + virtual void EnsureEmitPoolsFor(size_t amount) VIXL_OVERRIDE { + ptrdiff_t offset = amount; + ptrdiff_t max_pools_size = + literal_pool_.GetMaxSize() + veneer_pool_.GetMaxSize(); + ptrdiff_t cursor = GetCursorOffset(); + if ((cursor >= recommended_checkpoint_) || + ((cursor + offset + max_pools_size) >= checkpoint_)) { + CheckEmitPoolsFor(amount); + } + } + + // Set the current stack pointer, but don't generate any code. + void SetStackPointer(const Register& stack_pointer) { + VIXL_ASSERT(!GetScratchRegisterList()->IncludesAliasOf(stack_pointer)); + sp_ = stack_pointer; + } + + // Return the current stack pointer, as set by SetStackPointer. + const Register& StackPointer() const { return sp_; } + + CPURegList* GetScratchRegisterList() { return &tmp_list_; } + VIXL_DEPRECATED("GetScratchRegisterList", CPURegList* TmpList()) { + return GetScratchRegisterList(); + } + + CPURegList* GetScratchVRegisterList() { return &v_tmp_list_; } + VIXL_DEPRECATED("GetScratchVRegisterList", CPURegList* FPTmpList()) { + return GetScratchVRegisterList(); + } + + CPURegList* GetScratchPRegisterList() { return &p_tmp_list_; } + + // Get or set the current (most-deeply-nested) UseScratchRegisterScope. + void SetCurrentScratchRegisterScope(UseScratchRegisterScope* scope) { + current_scratch_scope_ = scope; + } + UseScratchRegisterScope* GetCurrentScratchRegisterScope() { + return current_scratch_scope_; + } + + // Like printf, but print at run-time from generated code. + // + // The caller must ensure that arguments for floating-point placeholders + // (such as %e, %f or %g) are VRegisters in format 1S or 1D, and that + // arguments for integer placeholders are Registers. + // + // At the moment it is only possible to print the value of sp if it is the + // current stack pointer. Otherwise, the MacroAssembler will automatically + // update sp on every push (using BumpSystemStackPointer), so determining its + // value is difficult. + // + // Format placeholders that refer to more than one argument, or to a specific + // argument, are not supported. This includes formats like "%1$d" or "%.*d". + // + // This function automatically preserves caller-saved registers so that + // calling code can use Printf at any point without having to worry about + // corruption. The preservation mechanism generates a lot of code. If this is + // a problem, preserve the important registers manually and then call + // PrintfNoPreserve. Callee-saved registers are not used by Printf, and are + // implicitly preserved. + void Printf(const char* format, + CPURegister arg0 = NoCPUReg, + CPURegister arg1 = NoCPUReg, + CPURegister arg2 = NoCPUReg, + CPURegister arg3 = NoCPUReg); + + // Like Printf, but don't preserve any caller-saved registers, not even 'lr'. + // + // The return code from the system printf call will be returned in x0. + void PrintfNoPreserve(const char* format, + const CPURegister& arg0 = NoCPUReg, + const CPURegister& arg1 = NoCPUReg, + const CPURegister& arg2 = NoCPUReg, + const CPURegister& arg3 = NoCPUReg); + + // Trace control when running the debug simulator. + // + // For example: + // + // __ Trace(LOG_REGS, TRACE_ENABLE); + // Will add registers to the trace if it wasn't already the case. + // + // __ Trace(LOG_DISASM, TRACE_DISABLE); + // Will stop logging disassembly. It has no effect if the disassembly wasn't + // already being logged. + // void Trace(TraceParameters parameters, TraceCommand command); + + // Log the requested data independently of what is being traced. + // + // For example: + // + // __ Log(LOG_FLAGS) + // Will output the flags. + // void Log(TraceParameters parameters); + + // Enable or disable CPU features dynamically. This mechanism allows users to + // strictly check the use of CPU features in different regions of code. + void SetSimulatorCPUFeatures(const CPUFeatures& features); + void EnableSimulatorCPUFeatures(const CPUFeatures& features); + void DisableSimulatorCPUFeatures(const CPUFeatures& features); + void SaveSimulatorCPUFeatures(); + void RestoreSimulatorCPUFeatures(); + + LiteralPool* GetLiteralPool() { return &literal_pool_; } + +// Support for simulated runtime calls. + +// `CallRuntime` requires variadic templating, that is only available from +// C++11. +// #if __cplusplus >= 201103L +// #define VIXL_HAS_MACROASSEMBLER_RUNTIME_CALL_SUPPORT +// #endif // #if __cplusplus >= 201103L + +#ifdef VIXL_HAS_MACROASSEMBLER_RUNTIME_CALL_SUPPORT + template + void CallRuntimeHelper(R (*function)(P...), RuntimeCallType call_type); + + template + void CallRuntime(R (*function)(P...)) { + CallRuntimeHelper(function, kCallRuntime); + } + + template + void TailCallRuntime(R (*function)(P...)) { + CallRuntimeHelper(function, kTailCallRuntime); + } +#endif // #ifdef VIXL_HAS_MACROASSEMBLER_RUNTIME_CALL_SUPPORT + + protected: + void BlockLiteralPool() { literal_pool_.Block(); } + void ReleaseLiteralPool() { literal_pool_.Release(); } + bool IsLiteralPoolBlocked() const { return literal_pool_.IsBlocked(); } + void BlockVeneerPool() { veneer_pool_.Block(); } + void ReleaseVeneerPool() { veneer_pool_.Release(); } + bool IsVeneerPoolBlocked() const { return veneer_pool_.IsBlocked(); } + + virtual void BlockPools() VIXL_OVERRIDE { + BlockLiteralPool(); + BlockVeneerPool(); + } + + virtual void ReleasePools() VIXL_OVERRIDE { + ReleaseLiteralPool(); + ReleaseVeneerPool(); + } + + // The scopes below need to able to block and release a particular pool. + // TODO: Consider removing those scopes or move them to + // code-generation-scopes-vixl.h. + friend class BlockPoolsScope; + friend class BlockLiteralPoolScope; + friend class BlockVeneerPoolScope; + + virtual void SetAllowMacroInstructions(bool value) VIXL_OVERRIDE { + allow_macro_instructions_ = value; + } + + // Helper used to query information about code generation and to generate + // code for `csel`. + // Here and for the related helpers below: + // - Code is generated when `masm` is not `NULL`. + // - On return and when set, `should_synthesise_left` and + // `should_synthesise_right` will indicate whether `left` and `right` + // should be synthesized in a temporary register. + static void CselHelper(MacroAssembler* masm, + const Register& rd, + Operand left, + Operand right, + Condition cond, + bool* should_synthesise_left = NULL, + bool* should_synthesise_right = NULL); + + // The helper returns `true` if it can handle the specified arguments. + // Also see comments for `CselHelper()`. + static bool CselSubHelperTwoImmediates(MacroAssembler* masm, + const Register& rd, + int64_t left, + int64_t right, + Condition cond, + bool* should_synthesise_left, + bool* should_synthesise_right); + + // See comments for `CselHelper()`. + static bool CselSubHelperTwoOrderedImmediates(MacroAssembler* masm, + const Register& rd, + int64_t left, + int64_t right, + Condition cond); + + // See comments for `CselHelper()`. + static void CselSubHelperRightSmallImmediate(MacroAssembler* masm, + UseScratchRegisterScope* temps, + const Register& rd, + const Operand& left, + const Operand& right, + Condition cond, + bool* should_synthesise_left); + + // Generate code to calculate the address represented by `addr` and write it + // into `xd`. This is used as a common fall-back for out-of-range load and + // store operands. + // + // The vl_divisor_log2 argument is used to scale the VL, for use with + // SVE_MUL_VL. + void CalculateSVEAddress(const Register& xd, + const SVEMemOperand& addr, + int vl_divisor_log2 = 0); + + void CalculateSVEAddress(const Register& xd, + const SVEMemOperand& addr, + const CPURegister& rt) { + VIXL_ASSERT(rt.IsPRegister() || rt.IsZRegister()); + int vl_divisor_log2 = rt.IsPRegister() ? kZRegBitsPerPRegBitLog2 : 0; + CalculateSVEAddress(xd, addr, vl_divisor_log2); + } + + void SetFPNaNPropagationOption(FPMacroNaNPropagationOption nan_option) { + fp_nan_propagation_ = nan_option; + } + + void ResolveFPNaNPropagationOption(FPMacroNaNPropagationOption* nan_option) { + // The input option has priority over the option that has set. + if (*nan_option == NoFPMacroNaNPropagationSelected) { + *nan_option = fp_nan_propagation_; + } + VIXL_ASSERT(*nan_option != NoFPMacroNaNPropagationSelected); + } + + Compiler* compiler; + + private: + // The actual Push and Pop implementations. These don't generate any code + // other than that required for the push or pop. This allows + // (Push|Pop)CPURegList to bundle together setup code for a large block of + // registers. + // + // Note that size is per register, and is specified in bytes. + void PushHelper(int count, + int size, + const CPURegister& src0, + const CPURegister& src1, + const CPURegister& src2, + const CPURegister& src3); + void PopHelper(int count, + int size, + const CPURegister& dst0, + const CPURegister& dst1, + const CPURegister& dst2, + const CPURegister& dst3); + + void Movi16bitHelper(const VRegister& vd, uint64_t imm); + void Movi32bitHelper(const VRegister& vd, uint64_t imm); + void Movi64bitHelper(const VRegister& vd, uint64_t imm); + + // Perform necessary maintenance operations before a push or pop. + // + // Note that size is per register, and is specified in bytes. + void PrepareForPush(int count, int size); + void PrepareForPop(int count, int size); + + // The actual implementation of load and store operations for CPURegList. + enum LoadStoreCPURegListAction { kLoad, kStore }; + void LoadStoreCPURegListHelper(LoadStoreCPURegListAction operation, + CPURegList registers, + const MemOperand& mem); + // Returns a MemOperand suitable for loading or storing a CPURegList at `dst`. + // This helper may allocate registers from `scratch_scope` and generate code + // to compute an intermediate address. The resulting MemOperand is only valid + // as long as `scratch_scope` remains valid. + MemOperand BaseMemOperandForLoadStoreCPURegList( + const CPURegList& registers, + const MemOperand& mem, + UseScratchRegisterScope* scratch_scope); + + bool LabelIsOutOfRange(Label* label, ImmBranchType branch_type) { + return !Instruction::IsValidImmPCOffset(branch_type, + label->GetLocation() - + GetCursorOffset()); + } + + // void ConfigureSimulatorCPUFeaturesHelper(const CPUFeatures& features, + // DebugHltOpcode action); + + void CompareHelper(Condition cond, + const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + IntegerOperand imm); + + // E.g. Ld1rb. + typedef void (Assembler::*SVELoadBroadcastFn)(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + + void SVELoadBroadcastImmHelper(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr, + SVELoadBroadcastFn fn, + int divisor); + + // E.g. ldr/str + typedef void (Assembler::*SVELoadStoreFn)(const CPURegister& rt, + const SVEMemOperand& addr); + + void SVELoadStoreScalarImmHelper(const CPURegister& rt, + const SVEMemOperand& addr, + SVELoadStoreFn fn); + + typedef void (Assembler::*SVELoad1Fn)(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr); + typedef void (Assembler::*SVEStore1Fn)(const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr); + + // Helper for predicated Z register loads with addressing modes not directly + // encodable in the instruction. The supported_modifier parameter indicates + // which offset modifier the calling instruction encoder supports (eg. + // SVE_MUL_VL). The ratio log2 of VL to memory access size is passed as + // vl_divisor_log2; pass -1 to indicate no dependency. + template + void SVELoadStoreScalarImmHelper( + const ZRegister& zt, + const Tg& pg, + const SVEMemOperand& addr, + Tf fn, + int imm_bits, + int shift_amount, + SVEOffsetModifier supported_modifier = NO_SVE_OFFSET_MODIFIER, + int vl_divisor_log2 = 0); + + template + void SVELoadStore1Helper(int msize_in_bytes_log2, + const ZRegister& zt, + const Tg& pg, + const SVEMemOperand& addr, + Tf fn); + + template + void SVELoadFFHelper(int msize_in_bytes_log2, + const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr, + Tf fn); + + typedef void (MacroAssembler::*IntWideImmMacroFn)(const ZRegister& zd, + const ZRegister& zn, + IntegerOperand imm); + + typedef void (Assembler::*IntWideImmShiftFn)(const ZRegister& zd, + const ZRegister& zn, + int imm, + int shift); + + typedef void (Assembler::*IntArithFn)(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm); + + typedef void (Assembler::*IntWideImmFn)(const ZRegister& zd, + const ZRegister& zn, + int imm); + + typedef void (Assembler::*IntArithIndexFn)(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm, + int index); + + typedef void (MacroAssembler::*SVEArithPredicatedFn)(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + void IntWideImmHelper(IntWideImmFn imm_fn, + SVEArithPredicatedFn reg_fn, + const ZRegister& zd, + const ZRegister& zn, + IntegerOperand imm, + bool is_signed_imm); + + enum AddSubHelperOption { kAddImmediate, kSubImmediate }; + + void AddSubHelper(AddSubHelperOption option, + const ZRegister& zd, + const ZRegister& zn, + IntegerOperand imm); + + // Try to emit an add- or sub-like instruction (imm_fn) with `imm`, or the + // corresponding sub- or add-like instruction (n_imm_fn) with a negated `imm`. + // A `movprfx` is automatically generated if one is required. If successful, + // return true. Otherwise, return false. + // + // This helper uses two's complement equivalences, for example treating 0xffff + // as -1 for H-sized lanes. + bool TrySingleAddSub(AddSubHelperOption option, + const ZRegister& zd, + const ZRegister& zn, + IntegerOperand imm); + + void SVESdotUdotHelper(IntArithFn fn, + const ZRegister& zd, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm); + + void SVESdotUdotIndexHelper(IntArithIndexFn fn, + const ZRegister& zd, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm, + int index); + + // For noncommutative arithmetic operations. + void NoncommutativeArithmeticHelper(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm, + SVEArithPredicatedFn fn, + SVEArithPredicatedFn rev_fn); + + void FPCommutativeArithmeticHelper(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm, + SVEArithPredicatedFn fn, + FPMacroNaNPropagationOption nan_option); + + // Floating-point fused multiply-add vectors (predicated), writing addend. + typedef void (Assembler::*SVEMulAddPredicatedZdaFn)(const ZRegister& zda, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + // Floating-point fused multiply-add vectors (predicated), writing + // multiplicand. + typedef void (Assembler::*SVEMulAddPredicatedZdnFn)(const ZRegister& zdn, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm); + + void FPMulAddHelper(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm, + SVEMulAddPredicatedZdaFn fn_zda, + SVEMulAddPredicatedZdnFn fn_zdn, + FPMacroNaNPropagationOption nan_option); + + typedef void (Assembler::*SVEMulAddIndexFn)(const ZRegister& zda, + const ZRegister& zn, + const ZRegister& zm, + int index); + + void FPMulAddIndexHelper(SVEMulAddIndexFn fn, + const ZRegister& zd, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm, + int index); + + // Tell whether any of the macro instruction can be used. When false the + // MacroAssembler will assert if a method which can emit a variable number + // of instructions is called. + bool allow_macro_instructions_; + + // Indicates whether we should generate simulator or native code. + bool generate_simulator_code_; + + // The register to use as a stack pointer for stack operations. + Register sp_; + + // Scratch registers available for use by the MacroAssembler. + CPURegList tmp_list_; + CPURegList v_tmp_list_; + CPURegList p_tmp_list_; + + UseScratchRegisterScope* current_scratch_scope_; + + LiteralPool literal_pool_; + VeneerPool veneer_pool_; + + ptrdiff_t checkpoint_; + ptrdiff_t recommended_checkpoint_; + + FPMacroNaNPropagationOption fp_nan_propagation_; + + friend class Pool; + friend class LiteralPool; +}; + + +inline size_t VeneerPool::GetOtherPoolsMaxSize() const { + return masm_->GetLiteralPoolMaxSize(); +} + + +inline size_t LiteralPool::GetOtherPoolsMaxSize() const { + return masm_->GetVeneerPoolMaxSize(); +} + + +inline void LiteralPool::SetNextRecommendedCheckpoint(ptrdiff_t offset) { + masm_->recommended_checkpoint_ = + min(masm_->recommended_checkpoint_, offset); + recommended_checkpoint_ = offset; +} + +class InstructionAccurateScope : public ExactAssemblyScope { + public: + VIXL_DEPRECATED("ExactAssemblyScope", + InstructionAccurateScope(MacroAssembler* masm, + int64_t count, + SizePolicy size_policy = kExactSize)) + : ExactAssemblyScope(masm, count * kInstructionSize, size_policy) {} +}; + +class BlockLiteralPoolScope { + public: + explicit BlockLiteralPoolScope(MacroAssembler* masm) : masm_(masm) { + masm_->BlockLiteralPool(); + } + + ~BlockLiteralPoolScope() { masm_->ReleaseLiteralPool(); } + + private: + MacroAssembler* masm_; +}; + + +class BlockVeneerPoolScope { + public: + explicit BlockVeneerPoolScope(MacroAssembler* masm) : masm_(masm) { + masm_->BlockVeneerPool(); + } + + ~BlockVeneerPoolScope() { masm_->ReleaseVeneerPool(); } + + private: + MacroAssembler* masm_; +}; + + +class BlockPoolsScope { + public: + explicit BlockPoolsScope(MacroAssembler* masm) : masm_(masm) { + masm_->BlockPools(); + } + + ~BlockPoolsScope() { masm_->ReleasePools(); } + + private: + MacroAssembler* masm_; +}; + +MovprfxHelperScope::MovprfxHelperScope(MacroAssembler* masm, + const ZRegister& dst, + const ZRegister& src) + : ExactAssemblyScope(masm, + ShouldGenerateMovprfx(dst, src) + ? (2 * kInstructionSize) + : kInstructionSize) { + if (ShouldGenerateMovprfx(dst, src)) { + masm->movprfx(dst, src); + } +} + +MovprfxHelperScope::MovprfxHelperScope(MacroAssembler* masm, + const ZRegister& dst, + const PRegister& pg, + const ZRegister& src) + : ExactAssemblyScope(masm, + ShouldGenerateMovprfx(dst, pg, src) + ? (2 * kInstructionSize) + : kInstructionSize) { + if (ShouldGenerateMovprfx(dst, pg, src)) { + masm->movprfx(dst, pg, src); + } +} + +// This scope utility allows scratch registers to be managed safely. The +// MacroAssembler's GetScratch*RegisterList() are used as a pool of scratch +// registers. These registers can be allocated on demand, and will be returned +// at the end of the scope. +// +// When the scope ends, the MacroAssembler's lists will be restored to their +// original state, even if the lists were modified by some other means. +class UseScratchRegisterScope { + public: + // This constructor implicitly calls `Open` to initialise the scope (`masm` + // must not be `NULL`), so it is ready to use immediately after it has been + // constructed. + explicit UseScratchRegisterScope(MacroAssembler* masm) + : masm_(NULL), + parent_(NULL), + old_available_(0), + old_available_v_(0), + old_available_p_(0) { + Open(masm); + } + // This constructor does not implicitly initialise the scope. Instead, the + // user is required to explicitly call the `Open` function before using the + // scope. + UseScratchRegisterScope() + : masm_(NULL), + parent_(NULL), + old_available_(0), + old_available_v_(0), + old_available_p_(0) {} + + // This function performs the actual initialisation work. + void Open(MacroAssembler* masm); + + // The destructor always implicitly calls the `Close` function. + ~UseScratchRegisterScope() { Close(); } + + // This function performs the cleaning-up work. It must succeed even if the + // scope has not been opened. It is safe to call multiple times. + void Close(); + + + bool IsAvailable(const CPURegister& reg) const; + + // Take a register from the appropriate temps list. It will be returned + // automatically when the scope ends. + Register AcquireW() { + return AcquireFrom(masm_->GetScratchRegisterList()).Wreg(); + } + Register AcquireX() { + return AcquireFrom(masm_->GetScratchRegisterList()).X(); + } + VRegister AcquireH() { + return AcquireFrom(masm_->GetScratchVRegisterList()).H(); + } + VRegister AcquireS() { + return AcquireFrom(masm_->GetScratchVRegisterList()).S(); + } + VRegister AcquireD() { + return AcquireFrom(masm_->GetScratchVRegisterList()).D(); + } + ZRegister AcquireZ() { + return AcquireFrom(masm_->GetScratchVRegisterList()).Z(); + } + PRegister AcquireP() { + // Prefer to allocate p8-p15 if we can, to leave p0-p7 available for use as + // governing predicates. + CPURegList* available = masm_->GetScratchPRegisterList(); + RegList preferred = ~kGoverningPRegisterMask; + if ((available->GetList() & preferred) != 0) { + return AcquireFrom(available, preferred).P(); + } + return AcquireFrom(available).P(); + } + // Acquire a P register suitable for use as a governing predicate in + // instructions which only accept p0-p7 for that purpose. + PRegister AcquireGoverningP() { + CPURegList* available = masm_->GetScratchPRegisterList(); + return AcquireFrom(available, kGoverningPRegisterMask).P(); + } + + Register AcquireRegisterOfSize(int size_in_bits); + Register AcquireSameSizeAs(const Register& reg) { + return AcquireRegisterOfSize(reg.GetSizeInBits()); + } + VRegister AcquireVRegisterOfSize(int size_in_bits); + VRegister AcquireSameSizeAs(const VRegister& reg) { + return AcquireVRegisterOfSize(reg.GetSizeInBits()); + } + CPURegister AcquireCPURegisterOfSize(int size_in_bits) { + return masm_->GetScratchRegisterList()->IsEmpty() + ? CPURegister(AcquireVRegisterOfSize(size_in_bits)) + : CPURegister(AcquireRegisterOfSize(size_in_bits)); + } + + // Acquire a register big enough to represent one lane of `vector`. + Register AcquireRegisterToHoldLane(const CPURegister& vector) { + VIXL_ASSERT(vector.GetLaneSizeInBits() <= kXRegSize); + return (vector.GetLaneSizeInBits() > kWRegSize) ? AcquireX() : AcquireW(); + } + + + // Explicitly release an acquired (or excluded) register, putting it back in + // the appropriate temps list. + void Release(const CPURegister& reg); + + + // Make the specified registers available as scratch registers for the + // duration of this scope. + void Include(const CPURegList& list); + void Include(const Register& reg1, + const Register& reg2 = NoReg, + const Register& reg3 = NoReg, + const Register& reg4 = NoReg); + void Include(const VRegister& reg1, + const VRegister& reg2 = NoVReg, + const VRegister& reg3 = NoVReg, + const VRegister& reg4 = NoVReg); + void Include(const CPURegister& reg1, + const CPURegister& reg2 = NoCPUReg, + const CPURegister& reg3 = NoCPUReg, + const CPURegister& reg4 = NoCPUReg); + + + // Make sure that the specified registers are not available in this scope. + // This can be used to prevent helper functions from using sensitive + // registers, for example. + void Exclude(const CPURegList& list); + void Exclude(const Register& reg1, + const Register& reg2 = NoReg, + const Register& reg3 = NoReg, + const Register& reg4 = NoReg); + void Exclude(const VRegister& reg1, + const VRegister& reg2 = NoVReg, + const VRegister& reg3 = NoVReg, + const VRegister& reg4 = NoVReg); + void Exclude(const CPURegister& reg1, + const CPURegister& reg2 = NoCPUReg, + const CPURegister& reg3 = NoCPUReg, + const CPURegister& reg4 = NoCPUReg); + + // Convenience for excluding registers that are part of Operands. This is + // useful for sequences like this: + // + // // Use 'rd' as a scratch, but only if it's not aliased by an input. + // temps.Include(rd); + // temps.Exclude(rn); + // temps.Exclude(operand); + // + // Otherwise, a conditional check is needed on the last 'Exclude'. + void Exclude(const Operand& operand) { + if (operand.IsShiftedRegister() || operand.IsExtendedRegister()) { + Exclude(operand.GetRegister()); + } else { + VIXL_ASSERT(operand.IsImmediate()); + } + } + + // Prevent any scratch registers from being used in this scope. + void ExcludeAll(); + + private: + static CPURegister AcquireFrom(CPURegList* available, + RegList mask = ~static_cast(0)); + + static void ReleaseByCode(CPURegList* available, int code); + static void ReleaseByRegList(CPURegList* available, RegList regs); + static void IncludeByRegList(CPURegList* available, RegList exclude); + static void ExcludeByRegList(CPURegList* available, RegList exclude); + + CPURegList* GetAvailableListFor(CPURegister::RegisterBank bank); + + static const RegList kGoverningPRegisterMask = + (static_cast(1) << kNumberOfGoverningPRegisters) - 1; + + // The MacroAssembler maintains a list of available scratch registers, and + // also keeps track of the most recently-opened scope so that on destruction + // we can check that scopes do not outlive their parents. + MacroAssembler* masm_; + UseScratchRegisterScope* parent_; + + // The state of the available lists at the start of this scope. + RegList old_available_; // kRegister + RegList old_available_v_; // kVRegister / kZRegister + RegList old_available_p_; // kPRegister + + // Disallow copy constructor and operator=. + VIXL_NO_RETURN_IN_DEBUG_MODE UseScratchRegisterScope( + const UseScratchRegisterScope&) { + VIXL_UNREACHABLE(); + } + VIXL_NO_RETURN_IN_DEBUG_MODE void operator=(const UseScratchRegisterScope&) { + VIXL_UNREACHABLE(); + } +}; + + +// Like CPUFeaturesScope, but also generate Simulation pseudo-instructions to +// control a Simulator's CPUFeatures dynamically. +// +// One major difference from CPUFeaturesScope is that this scope cannot offer +// a writable "CPUFeatures* GetCPUFeatures()", because every write to the +// features needs a corresponding macro instruction. +class SimulationCPUFeaturesScope { + public: + template + explicit SimulationCPUFeaturesScope(MacroAssembler* masm, T... features) + : masm_(masm), cpu_features_scope_(masm, features...) { + masm_->SaveSimulatorCPUFeatures(); + masm_->EnableSimulatorCPUFeatures(CPUFeatures(features...)); + } + + ~SimulationCPUFeaturesScope() { masm_->RestoreSimulatorCPUFeatures(); } + + const CPUFeatures* GetCPUFeatures() const { + return cpu_features_scope_.GetCPUFeatures(); + } + + void SetCPUFeatures(const CPUFeatures& cpu_features) { + cpu_features_scope_.SetCPUFeatures(cpu_features); + masm_->SetSimulatorCPUFeatures(cpu_features); + } + + private: + MacroAssembler* masm_; + CPUFeaturesScope cpu_features_scope_; +}; + + +// Variadic templating is only available from C++11. +#ifdef VIXL_HAS_MACROASSEMBLER_RUNTIME_CALL_SUPPORT + +// `R` stands for 'return type', and `P` for 'parameter types'. +template +void MacroAssembler::CallRuntimeHelper(R (*function)(P...), + RuntimeCallType call_type) { + if (generate_simulator_code_) { +#ifdef VIXL_HAS_SIMULATED_RUNTIME_CALL_SUPPORT + uintptr_t runtime_call_wrapper_address = reinterpret_cast( + &(Simulator::RuntimeCallStructHelper::Wrapper)); + uintptr_t function_address = reinterpret_cast(function); + + EmissionCheckScope guard(this, + kRuntimeCallLength, + CodeBufferCheckScope::kExactSize); + Label start; + bind(&start); + { + ExactAssemblyScope scope(this, kInstructionSize); + hlt(kRuntimeCallOpcode); + } + VIXL_ASSERT(GetSizeOfCodeGeneratedSince(&start) == + kRuntimeCallWrapperOffset); + dc(runtime_call_wrapper_address); + VIXL_ASSERT(GetSizeOfCodeGeneratedSince(&start) == + kRuntimeCallFunctionOffset); + dc(function_address); + VIXL_ASSERT(GetSizeOfCodeGeneratedSince(&start) == kRuntimeCallTypeOffset); + dc32(call_type); + VIXL_ASSERT(GetSizeOfCodeGeneratedSince(&start) == kRuntimeCallLength); +#else + VIXL_UNREACHABLE(); +#endif // #ifdef VIXL_HAS_SIMULATED_RUNTIME_CALL_SUPPORT + } else { + UseScratchRegisterScope temps(this); + Register temp = temps.AcquireX(); + Mov(temp, reinterpret_cast(function)); + if (call_type == kTailCallRuntime) { + Br(temp); + } else { + VIXL_ASSERT(call_type == kCallRuntime); + Blr(temp); + } + } +} + +#endif // #ifdef VIXL_HAS_MACROASSEMBLER_RUNTIME_CALL_SUPPORT + +} // namespace aarch64 + +// Required InvalSet template specialisations. +// TODO: These template specialisations should not live in this file. Move +// VeneerPool out of the aarch64 namespace in order to share its implementation +// later. +template <> +inline ptrdiff_t InvalSet:: + GetKey(const aarch64::VeneerPool::BranchInfo& branch_info) { + return branch_info.first_unreacheable_pc_; +} +template <> +inline void InvalSet:: + SetKey(aarch64::VeneerPool::BranchInfo* branch_info, ptrdiff_t key) { + branch_info->first_unreacheable_pc_ = key; +} + +} // namespace vixl + +#endif // VIXL_AARCH64_MACRO_ASSEMBLER_AARCH64_H_ diff --git a/src/coreclr/jit/vixl/aarch64/macro-assembler-sve-aarch64.cc b/src/coreclr/jit/vixl/aarch64/macro-assembler-sve-aarch64.cc new file mode 100644 index 00000000000000..b107f132925835 --- /dev/null +++ b/src/coreclr/jit/vixl/aarch64/macro-assembler-sve-aarch64.cc @@ -0,0 +1,2027 @@ +// Copyright 2019, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "macro-assembler-aarch64.h" + +namespace vixl { +namespace aarch64 { + +void MacroAssembler::AddSubHelper(AddSubHelperOption option, + const ZRegister& zd, + const ZRegister& zn, + IntegerOperand imm) { + VIXL_ASSERT(imm.FitsInLane(zd)); + + // Simple, encodable cases. + if (TrySingleAddSub(option, zd, zn, imm)) return; + + VIXL_ASSERT((option == kAddImmediate) || (option == kSubImmediate)); + bool add_imm = (option == kAddImmediate); + + // Try to translate Add(..., -imm) to Sub(..., imm) if we can encode it in one + // instruction. Also interpret the immediate as signed, so we can convert + // Add(zd.VnH(), zn.VnH(), 0xffff...) to Sub(..., 1), etc. + IntegerOperand signed_imm(imm.AsIntN(zd.GetLaneSizeInBits())); + if (signed_imm.IsNegative()) { + AddSubHelperOption n_option = add_imm ? kSubImmediate : kAddImmediate; + IntegerOperand n_imm(signed_imm.GetMagnitude()); + // IntegerOperand can represent -INT_MIN, so this is always safe. + VIXL_ASSERT(n_imm.IsPositiveOrZero()); + if (TrySingleAddSub(n_option, zd, zn, n_imm)) return; + } + + // Otherwise, fall back to dup + ADD_z_z/SUB_z_z. + UseScratchRegisterScope temps(this); + ZRegister scratch = temps.AcquireZ().WithLaneSize(zn.GetLaneSizeInBits()); + Dup(scratch, imm); + + SingleEmissionCheckScope guard(this); + if (add_imm) { + add(zd, zn, scratch); + } else { + sub(zd, zn, scratch); + } +} + +bool MacroAssembler::TrySingleAddSub(AddSubHelperOption option, + const ZRegister& zd, + const ZRegister& zn, + IntegerOperand imm) { + VIXL_ASSERT(imm.FitsInLane(zd)); + + int imm8; + int shift = -1; + if (imm.TryEncodeAsShiftedUintNForLane<8, 0>(zd, &imm8, &shift) || + imm.TryEncodeAsShiftedUintNForLane<8, 8>(zd, &imm8, &shift)) { + MovprfxHelperScope guard(this, zd, zn); + switch (option) { + case kAddImmediate: + add(zd, zd, imm8, shift); + return true; + case kSubImmediate: + sub(zd, zd, imm8, shift); + return true; + } + } + return false; +} + +void MacroAssembler::IntWideImmHelper(IntWideImmFn imm_fn, + SVEArithPredicatedFn reg_macro, + const ZRegister& zd, + const ZRegister& zn, + IntegerOperand imm, + bool is_signed) { + if (is_signed) { + // E.g. MUL_z_zi, SMIN_z_zi, SMAX_z_zi + if (imm.IsInt8()) { + MovprfxHelperScope guard(this, zd, zn); + (this->*imm_fn)(zd, zd, imm.AsInt8()); + return; + } + } else { + // E.g. UMIN_z_zi, UMAX_z_zi + if (imm.IsUint8()) { + MovprfxHelperScope guard(this, zd, zn); + (this->*imm_fn)(zd, zd, imm.AsUint8()); + return; + } + } + + UseScratchRegisterScope temps(this); + PRegister pg = temps.AcquireGoverningP(); + Ptrue(pg.WithSameLaneSizeAs(zd)); + + // Try to re-use zd if we can, so we can avoid a movprfx. + ZRegister scratch = + zd.Aliases(zn) ? temps.AcquireZ().WithLaneSize(zn.GetLaneSizeInBits()) + : zd; + Dup(scratch, imm); + + // The vector-form macro for commutative operations will swap the arguments to + // avoid movprfx, if necessary. + (this->*reg_macro)(zd, pg.Merging(), zn, scratch); +} + +void MacroAssembler::Mul(const ZRegister& zd, + const ZRegister& zn, + IntegerOperand imm) { + VIXL_ASSERT(allow_macro_instructions_); + IntWideImmFn imm_fn = &Assembler::mul; + SVEArithPredicatedFn reg_fn = &MacroAssembler::Mul; + IntWideImmHelper(imm_fn, reg_fn, zd, zn, imm, true); +} + +void MacroAssembler::Smin(const ZRegister& zd, + const ZRegister& zn, + IntegerOperand imm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(imm.FitsInSignedLane(zd)); + IntWideImmFn imm_fn = &Assembler::smin; + SVEArithPredicatedFn reg_fn = &MacroAssembler::Smin; + IntWideImmHelper(imm_fn, reg_fn, zd, zn, imm, true); +} + +void MacroAssembler::Smax(const ZRegister& zd, + const ZRegister& zn, + IntegerOperand imm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(imm.FitsInSignedLane(zd)); + IntWideImmFn imm_fn = &Assembler::smax; + SVEArithPredicatedFn reg_fn = &MacroAssembler::Smax; + IntWideImmHelper(imm_fn, reg_fn, zd, zn, imm, true); +} + +void MacroAssembler::Umax(const ZRegister& zd, + const ZRegister& zn, + IntegerOperand imm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(imm.FitsInUnsignedLane(zd)); + IntWideImmFn imm_fn = &Assembler::umax; + SVEArithPredicatedFn reg_fn = &MacroAssembler::Umax; + IntWideImmHelper(imm_fn, reg_fn, zd, zn, imm, false); +} + +void MacroAssembler::Umin(const ZRegister& zd, + const ZRegister& zn, + IntegerOperand imm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(imm.FitsInUnsignedLane(zd)); + IntWideImmFn imm_fn = &Assembler::umin; + SVEArithPredicatedFn reg_fn = &MacroAssembler::Umin; + IntWideImmHelper(imm_fn, reg_fn, zd, zn, imm, false); +} + +void MacroAssembler::Addpl(const Register& xd, + const Register& xn, + int64_t multiplier) { + VIXL_ASSERT(allow_macro_instructions_); + + // This macro relies on `Rdvl` to handle some out-of-range cases. Check that + // `VL * multiplier` cannot overflow, for any possible value of VL. + VIXL_ASSERT(multiplier <= (INT64_MAX / kZRegMaxSizeInBytes)); + VIXL_ASSERT(multiplier >= (INT64_MIN / kZRegMaxSizeInBytes)); + + if (xd.IsZero()) return; + if (xn.IsZero() && xd.IsSP()) { + // TODO: This operation doesn't make much sense, but we could support it + // with a scratch register if necessary. + VIXL_UNIMPLEMENTED(); + } + + // Handling xzr requires an extra move, so defer it until later so we can try + // to use `rdvl` instead (via `Addvl`). + if (IsInt6(multiplier) && !xn.IsZero()) { + SingleEmissionCheckScope guard(this); + addpl(xd, xn, static_cast(multiplier)); + return; + } + + // If `multiplier` is a multiple of 8, we can use `Addvl` instead. + if ((multiplier % kZRegBitsPerPRegBit) == 0) { + Addvl(xd, xn, multiplier / kZRegBitsPerPRegBit); + return; + } + + if (IsInt6(multiplier)) { + VIXL_ASSERT(xn.IsZero()); // Other cases were handled with `addpl`. + // There is no simple `rdpl` instruction, and `addpl` cannot accept xzr, so + // materialise a zero. + MacroEmissionCheckScope guard(this); + movz(xd, 0); + addpl(xd, xd, static_cast(multiplier)); + return; + } + + // TODO: Some probable cases result in rather long sequences. For example, + // `Addpl(sp, sp, 33)` requires five instructions, even though it's only just + // outside the encodable range. We should look for ways to cover such cases + // without drastically increasing the complexity of this logic. + + // For other cases, calculate xn + (PL * multiplier) using discrete + // instructions. This requires two scratch registers in the general case, so + // try to re-use the destination as a scratch register. + UseScratchRegisterScope temps(this); + temps.Include(xd); + temps.Exclude(xn); + + Register scratch = temps.AcquireX(); + // Because there is no `rdpl`, so we have to calculate PL from VL. We can't + // scale the multiplier because (we already know) it isn't a multiple of 8. + Rdvl(scratch, multiplier); + + MacroEmissionCheckScope guard(this); + if (xn.IsZero()) { + asr(xd, scratch, kZRegBitsPerPRegBitLog2); + } else if (xd.IsSP() || xn.IsSP()) { + // TODO: MacroAssembler::Add should be able to handle this. + asr(scratch, scratch, kZRegBitsPerPRegBitLog2); + add(xd, xn, scratch); + } else { + add(xd, xn, Operand(scratch, ASR, kZRegBitsPerPRegBitLog2)); + } +} + +void MacroAssembler::Addvl(const Register& xd, + const Register& xn, + int64_t multiplier) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(xd.IsX()); + VIXL_ASSERT(xn.IsX()); + + // Check that `VL * multiplier` cannot overflow, for any possible value of VL. + VIXL_ASSERT(multiplier <= (INT64_MAX / kZRegMaxSizeInBytes)); + VIXL_ASSERT(multiplier >= (INT64_MIN / kZRegMaxSizeInBytes)); + + if (xd.IsZero()) return; + if (xn.IsZero() && xd.IsSP()) { + // TODO: This operation doesn't make much sense, but we could support it + // with a scratch register if necessary. `rdvl` cannot write into `sp`. + VIXL_UNIMPLEMENTED(); + } + + if (IsInt6(multiplier)) { + SingleEmissionCheckScope guard(this); + if (xn.IsZero()) { + rdvl(xd, static_cast(multiplier)); + } else { + addvl(xd, xn, static_cast(multiplier)); + } + return; + } + + // TODO: Some probable cases result in rather long sequences. For example, + // `Addvl(sp, sp, 42)` requires four instructions, even though it's only just + // outside the encodable range. We should look for ways to cover such cases + // without drastically increasing the complexity of this logic. + + // For other cases, calculate xn + (VL * multiplier) using discrete + // instructions. This requires two scratch registers in the general case, so + // we try to re-use the destination as a scratch register. + UseScratchRegisterScope temps(this); + temps.Include(xd); + temps.Exclude(xn); + + Register a = temps.AcquireX(); + Mov(a, multiplier); + + MacroEmissionCheckScope guard(this); + Register b = temps.AcquireX(); + rdvl(b, 1); + if (xn.IsZero()) { + mul(xd, a, b); + } else if (xd.IsSP() || xn.IsSP()) { + mul(a, a, b); + add(xd, xn, a); + } else { + madd(xd, a, b, xn); + } +} + +void MacroAssembler::CalculateSVEAddress(const Register& xd, + const SVEMemOperand& addr, + int vl_divisor_log2) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(!addr.IsScatterGather()); + VIXL_ASSERT(xd.IsX()); + + // The lower bound is where a whole Z register is accessed. + VIXL_ASSERT(!addr.IsMulVl() || (vl_divisor_log2 >= 0)); + // The upper bound is for P register accesses, and for instructions like + // "st1b { z0.d } [...]", where one byte is accessed for every D-sized lane. + VIXL_ASSERT(vl_divisor_log2 <= static_cast(kZRegBitsPerPRegBitLog2)); + + SVEOffsetModifier mod = addr.GetOffsetModifier(); + Register base = addr.GetScalarBase(); + + if (addr.IsEquivalentToScalar()) { + // For example: + // [x0] + // [x0, #0] + // [x0, xzr, LSL 2] + Mov(xd, base); + } else if (addr.IsScalarPlusImmediate()) { + // For example: + // [x0, #42] + // [x0, #42, MUL VL] + int64_t offset = addr.GetImmediateOffset(); + VIXL_ASSERT(offset != 0); // Handled by IsEquivalentToScalar. + if (addr.IsMulVl()) { + int vl_divisor = 1 << vl_divisor_log2; + // For all possible values of vl_divisor, we can simply use `Addpl`. This + // will select `addvl` if necessary. + VIXL_ASSERT((kZRegBitsPerPRegBit % vl_divisor) == 0); + Addpl(xd, base, offset * (kZRegBitsPerPRegBit / vl_divisor)); + } else { + // IsScalarPlusImmediate() ensures that no other modifiers can occur. + VIXL_ASSERT(mod == NO_SVE_OFFSET_MODIFIER); + Add(xd, base, offset); + } + } else if (addr.IsScalarPlusScalar()) { + // For example: + // [x0, x1] + // [x0, x1, LSL #4] + Register offset = addr.GetScalarOffset(); + VIXL_ASSERT(!offset.IsZero()); // Handled by IsEquivalentToScalar. + if (mod == SVE_LSL) { + Add(xd, base, Operand(offset, LSL, addr.GetShiftAmount())); + } else { + // IsScalarPlusScalar() ensures that no other modifiers can occur. + VIXL_ASSERT(mod == NO_SVE_OFFSET_MODIFIER); + Add(xd, base, offset); + } + } else { + // All other forms are scatter-gather addresses, which cannot be evaluated + // into an X register. + VIXL_UNREACHABLE(); + } +} + +void MacroAssembler::Cpy(const ZRegister& zd, + const PRegister& pg, + IntegerOperand imm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(imm.FitsInLane(zd)); + int imm8; + int shift; + if (imm.TryEncodeAsShiftedIntNForLane<8, 0>(zd, &imm8, &shift) || + imm.TryEncodeAsShiftedIntNForLane<8, 8>(zd, &imm8, &shift)) { + SingleEmissionCheckScope guard(this); + cpy(zd, pg, imm8, shift); + return; + } + + // The fallbacks rely on `cpy` variants that only support merging predication. + // If zeroing predication was requested, zero the destination first. + if (pg.IsZeroing()) { + SingleEmissionCheckScope guard(this); + dup(zd, 0); + } + PRegisterM pg_m = pg.Merging(); + + // Try to encode the immediate using fcpy. + VIXL_ASSERT(imm.FitsInLane(zd)); + if (zd.GetLaneSizeInBits() >= kHRegSize) { + double fp_imm = 0.0; + switch (zd.GetLaneSizeInBits()) { + case kHRegSize: + fp_imm = + FPToDouble(RawbitsToFloat16(imm.AsUint16()), kIgnoreDefaultNaN); + break; + case kSRegSize: + fp_imm = RawbitsToFloat(imm.AsUint32()); + break; + case kDRegSize: + fp_imm = RawbitsToDouble(imm.AsUint64()); + break; + default: + VIXL_UNREACHABLE(); + break; + } + // IsImmFP64 is equivalent to IsImmFP for the same arithmetic value, so + // we can use IsImmFP64 for all lane sizes. + if (IsImmFP64(fp_imm)) { + SingleEmissionCheckScope guard(this); + fcpy(zd, pg_m, fp_imm); + return; + } + } + + // Fall back to using a scratch register. + UseScratchRegisterScope temps(this); + Register scratch = temps.AcquireRegisterToHoldLane(zd); + Mov(scratch, imm); + + SingleEmissionCheckScope guard(this); + cpy(zd, pg_m, scratch); +} + +// TODO: We implement Fcpy (amongst other things) for all FP types because it +// allows us to preserve user-specified NaNs. We should come up with some +// FPImmediate type to abstract this, and avoid all the duplication below (and +// elsewhere). + +void MacroAssembler::Fcpy(const ZRegister& zd, + const PRegisterM& pg, + double imm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(pg.IsMerging()); + + if (IsImmFP64(imm)) { + SingleEmissionCheckScope guard(this); + fcpy(zd, pg, imm); + return; + } + + // As a fall-back, cast the immediate to the required lane size, and try to + // encode the bit pattern using `Cpy`. + Cpy(zd, pg, FPToRawbitsWithSize(zd.GetLaneSizeInBits(), imm)); +} + +void MacroAssembler::Fcpy(const ZRegister& zd, + const PRegisterM& pg, + float imm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(pg.IsMerging()); + + if (IsImmFP32(imm)) { + SingleEmissionCheckScope guard(this); + fcpy(zd, pg, imm); + return; + } + + // As a fall-back, cast the immediate to the required lane size, and try to + // encode the bit pattern using `Cpy`. + Cpy(zd, pg, FPToRawbitsWithSize(zd.GetLaneSizeInBits(), imm)); +} + +void MacroAssembler::Fcpy(const ZRegister& zd, + const PRegisterM& pg, + Float16 imm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(pg.IsMerging()); + + if (IsImmFP16(imm)) { + SingleEmissionCheckScope guard(this); + fcpy(zd, pg, imm); + return; + } + + // As a fall-back, cast the immediate to the required lane size, and try to + // encode the bit pattern using `Cpy`. + Cpy(zd, pg, FPToRawbitsWithSize(zd.GetLaneSizeInBits(), imm)); +} + +void MacroAssembler::Dup(const ZRegister& zd, IntegerOperand imm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(imm.FitsInLane(zd)); + unsigned lane_size = zd.GetLaneSizeInBits(); + int imm8; + int shift; + if (imm.TryEncodeAsShiftedIntNForLane<8, 0>(zd, &imm8, &shift) || + imm.TryEncodeAsShiftedIntNForLane<8, 8>(zd, &imm8, &shift)) { + SingleEmissionCheckScope guard(this); + dup(zd, imm8, shift); + } else if (IsImmLogical(imm.AsUintN(lane_size), lane_size)) { + SingleEmissionCheckScope guard(this); + dupm(zd, imm.AsUintN(lane_size)); + } else { + UseScratchRegisterScope temps(this); + Register scratch = temps.AcquireRegisterToHoldLane(zd); + Mov(scratch, imm); + + SingleEmissionCheckScope guard(this); + dup(zd, scratch); + } +} + +void MacroAssembler::NoncommutativeArithmeticHelper( + const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm, + SVEArithPredicatedFn fn, + SVEArithPredicatedFn rev_fn) { + if (zd.Aliases(zn)) { + // E.g. zd = zd / zm + SingleEmissionCheckScope guard(this); + (this->*fn)(zd, pg, zn, zm); + } else if (zd.Aliases(zm)) { + // E.g. zd = zn / zd + SingleEmissionCheckScope guard(this); + (this->*rev_fn)(zd, pg, zm, zn); + } else { + // E.g. zd = zn / zm + MovprfxHelperScope guard(this, zd, pg, zn); + (this->*fn)(zd, pg, zd, zm); + } +} + +void MacroAssembler::FPCommutativeArithmeticHelper( + const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm, + SVEArithPredicatedFn fn, + FPMacroNaNPropagationOption nan_option) { + ResolveFPNaNPropagationOption(&nan_option); + + if (zd.Aliases(zn)) { + SingleEmissionCheckScope guard(this); + (this->*fn)(zd, pg, zd, zm); + } else if (zd.Aliases(zm)) { + switch (nan_option) { + case FastNaNPropagation: { + // Swap the arguments. + SingleEmissionCheckScope guard(this); + (this->*fn)(zd, pg, zd, zn); + return; + } + case StrictNaNPropagation: { + UseScratchRegisterScope temps(this); + // Use a scratch register to keep the argument order exactly as + // specified. + ZRegister scratch = temps.AcquireZ().WithSameLaneSizeAs(zn); + { + MovprfxHelperScope guard(this, scratch, pg, zn); + (this->*fn)(scratch, pg, scratch, zm); + } + Mov(zd, scratch); + return; + } + case NoFPMacroNaNPropagationSelected: + VIXL_UNREACHABLE(); + return; + } + } else { + MovprfxHelperScope guard(this, zd, pg, zn); + (this->*fn)(zd, pg, zd, zm); + } +} + +void MacroAssembler::Asr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + NoncommutativeArithmeticHelper(zd, + pg, + zn, + zm, + static_cast( + &Assembler::asr), + static_cast( + &Assembler::asrr)); +} + +void MacroAssembler::Lsl(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + NoncommutativeArithmeticHelper(zd, + pg, + zn, + zm, + static_cast( + &Assembler::lsl), + static_cast( + &Assembler::lslr)); +} + +void MacroAssembler::Lsr(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + NoncommutativeArithmeticHelper(zd, + pg, + zn, + zm, + static_cast( + &Assembler::lsr), + static_cast( + &Assembler::lsrr)); +} + +void MacroAssembler::Fdiv(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + NoncommutativeArithmeticHelper(zd, + pg, + zn, + zm, + static_cast( + &Assembler::fdiv), + static_cast( + &Assembler::fdivr)); +} + +void MacroAssembler::Fsub(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + NoncommutativeArithmeticHelper(zd, + pg, + zn, + zm, + static_cast( + &Assembler::fsub), + static_cast( + &Assembler::fsubr)); +} + +void MacroAssembler::Fadd(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm, + FPMacroNaNPropagationOption nan_option) { + VIXL_ASSERT(allow_macro_instructions_); + FPCommutativeArithmeticHelper(zd, + pg, + zn, + zm, + static_cast( + &Assembler::fadd), + nan_option); +} + +void MacroAssembler::Fabd(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm, + FPMacroNaNPropagationOption nan_option) { + VIXL_ASSERT(allow_macro_instructions_); + FPCommutativeArithmeticHelper(zd, + pg, + zn, + zm, + static_cast( + &Assembler::fabd), + nan_option); +} + +void MacroAssembler::Fmul(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm, + FPMacroNaNPropagationOption nan_option) { + VIXL_ASSERT(allow_macro_instructions_); + FPCommutativeArithmeticHelper(zd, + pg, + zn, + zm, + static_cast( + &Assembler::fmul), + nan_option); +} + +void MacroAssembler::Fmulx(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm, + FPMacroNaNPropagationOption nan_option) { + VIXL_ASSERT(allow_macro_instructions_); + FPCommutativeArithmeticHelper(zd, + pg, + zn, + zm, + static_cast( + &Assembler::fmulx), + nan_option); +} + +void MacroAssembler::Fmax(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm, + FPMacroNaNPropagationOption nan_option) { + VIXL_ASSERT(allow_macro_instructions_); + FPCommutativeArithmeticHelper(zd, + pg, + zn, + zm, + static_cast( + &Assembler::fmax), + nan_option); +} + +void MacroAssembler::Fmin(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm, + FPMacroNaNPropagationOption nan_option) { + VIXL_ASSERT(allow_macro_instructions_); + FPCommutativeArithmeticHelper(zd, + pg, + zn, + zm, + static_cast( + &Assembler::fmin), + nan_option); +} + +void MacroAssembler::Fmaxnm(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm, + FPMacroNaNPropagationOption nan_option) { + VIXL_ASSERT(allow_macro_instructions_); + FPCommutativeArithmeticHelper(zd, + pg, + zn, + zm, + static_cast( + &Assembler::fmaxnm), + nan_option); +} + +void MacroAssembler::Fminnm(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm, + FPMacroNaNPropagationOption nan_option) { + VIXL_ASSERT(allow_macro_instructions_); + FPCommutativeArithmeticHelper(zd, + pg, + zn, + zm, + static_cast( + &Assembler::fminnm), + nan_option); +} + +void MacroAssembler::Fdup(const ZRegister& zd, double imm) { + VIXL_ASSERT(allow_macro_instructions_); + + switch (zd.GetLaneSizeInBits()) { + case kHRegSize: + Fdup(zd, Float16(imm)); + break; + case kSRegSize: + Fdup(zd, static_cast(imm)); + break; + case kDRegSize: + if (IsImmFP64(imm)) { + SingleEmissionCheckScope guard(this); + fdup(zd, imm); + } else { + Dup(zd, DoubleToRawbits(imm)); + } + break; + } +} + +void MacroAssembler::Fdup(const ZRegister& zd, float imm) { + VIXL_ASSERT(allow_macro_instructions_); + + switch (zd.GetLaneSizeInBits()) { + case kHRegSize: + Fdup(zd, Float16(imm)); + break; + case kSRegSize: + if (IsImmFP32(imm)) { + SingleEmissionCheckScope guard(this); + fdup(zd, imm); + } else { + Dup(zd, FloatToRawbits(imm)); + } + break; + case kDRegSize: + Fdup(zd, static_cast(imm)); + break; + } +} + +void MacroAssembler::Fdup(const ZRegister& zd, Float16 imm) { + VIXL_ASSERT(allow_macro_instructions_); + + switch (zd.GetLaneSizeInBits()) { + case kHRegSize: + if (IsImmFP16(imm)) { + SingleEmissionCheckScope guard(this); + fdup(zd, imm); + } else { + Dup(zd, Float16ToRawbits(imm)); + } + break; + case kSRegSize: + Fdup(zd, FPToFloat(imm, kIgnoreDefaultNaN)); + break; + case kDRegSize: + Fdup(zd, FPToDouble(imm, kIgnoreDefaultNaN)); + break; + } +} + +void MacroAssembler::Index(const ZRegister& zd, + const Operand& start, + const Operand& step) { + class IndexOperand : public Operand { + public: + static IndexOperand Prepare(MacroAssembler* masm, + UseScratchRegisterScope* temps, + const Operand& op, + const ZRegister& zd) { + // Look for encodable immediates. + int imm; + if (op.IsImmediate()) { + if (IntegerOperand(op).TryEncodeAsIntNForLane<5>(zd, &imm)) { + return IndexOperand(imm); + } + Register scratch = temps->AcquireRegisterToHoldLane(zd); + masm->Mov(scratch, op); + return IndexOperand(scratch); + } else { + // Plain registers can be encoded directly. + VIXL_ASSERT(op.IsPlainRegister()); + return IndexOperand(op.GetRegister()); + } + } + + int GetImm5() const { + int64_t imm = GetImmediate(); + VIXL_ASSERT(IsInt5(imm)); + return static_cast(imm); + } + + private: + explicit IndexOperand(const Register& reg) : Operand(reg) {} + explicit IndexOperand(int64_t imm) : Operand(imm) {} + }; + + UseScratchRegisterScope temps(this); + IndexOperand start_enc = IndexOperand::Prepare(this, &temps, start, zd); + IndexOperand step_enc = IndexOperand::Prepare(this, &temps, step, zd); + + SingleEmissionCheckScope guard(this); + if (start_enc.IsImmediate()) { + if (step_enc.IsImmediate()) { + index(zd, start_enc.GetImm5(), step_enc.GetImm5()); + } else { + index(zd, start_enc.GetImm5(), step_enc.GetRegister()); + } + } else { + if (step_enc.IsImmediate()) { + index(zd, start_enc.GetRegister(), step_enc.GetImm5()); + } else { + index(zd, start_enc.GetRegister(), step_enc.GetRegister()); + } + } +} + +void MacroAssembler::Insr(const ZRegister& zdn, IntegerOperand imm) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(imm.FitsInLane(zdn)); + + if (imm.IsZero()) { + SingleEmissionCheckScope guard(this); + insr(zdn, xzr); + return; + } + + UseScratchRegisterScope temps(this); + Register scratch = temps.AcquireRegisterToHoldLane(zdn); + + // TODO: There are many cases where we could optimise immediates, such as by + // detecting repeating patterns or FP immediates. We should optimise and + // abstract this for use in other SVE mov-immediate-like macros. + Mov(scratch, imm); + + SingleEmissionCheckScope guard(this); + insr(zdn, scratch); +} + +void MacroAssembler::Mla(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + if (zd.Aliases(za)) { + // zda = zda + (zn * zm) + SingleEmissionCheckScope guard(this); + mla(zd, pg, zn, zm); + } else if (zd.Aliases(zn)) { + // zdn = za + (zdn * zm) + SingleEmissionCheckScope guard(this); + mad(zd, pg, zm, za); + } else if (zd.Aliases(zm)) { + // Multiplication is commutative, so we can swap zn and zm. + // zdm = za + (zdm * zn) + SingleEmissionCheckScope guard(this); + mad(zd, pg, zn, za); + } else { + // zd = za + (zn * zm) + ExactAssemblyScope guard(this, 2 * kInstructionSize); + movprfx(zd, pg, za); + mla(zd, pg, zn, zm); + } +} + +void MacroAssembler::Mls(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + if (zd.Aliases(za)) { + // zda = zda - (zn * zm) + SingleEmissionCheckScope guard(this); + mls(zd, pg, zn, zm); + } else if (zd.Aliases(zn)) { + // zdn = za - (zdn * zm) + SingleEmissionCheckScope guard(this); + msb(zd, pg, zm, za); + } else if (zd.Aliases(zm)) { + // Multiplication is commutative, so we can swap zn and zm. + // zdm = za - (zdm * zn) + SingleEmissionCheckScope guard(this); + msb(zd, pg, zn, za); + } else { + // zd = za - (zn * zm) + ExactAssemblyScope guard(this, 2 * kInstructionSize); + movprfx(zd, pg, za); + mls(zd, pg, zn, zm); + } +} + +void MacroAssembler::CompareHelper(Condition cond, + const PRegisterWithLaneSize& pd, + const PRegisterZ& pg, + const ZRegister& zn, + IntegerOperand imm) { + UseScratchRegisterScope temps(this); + ZRegister zm = temps.AcquireZ().WithLaneSize(zn.GetLaneSizeInBits()); + Dup(zm, imm); + SingleEmissionCheckScope guard(this); + cmp(cond, pd, pg, zn, zm); +} + +void MacroAssembler::Pfirst(const PRegisterWithLaneSize& pd, + const PRegister& pg, + const PRegisterWithLaneSize& pn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(pd.IsLaneSizeB()); + VIXL_ASSERT(pn.IsLaneSizeB()); + if (pd.Is(pn)) { + SingleEmissionCheckScope guard(this); + pfirst(pd, pg, pn); + } else { + UseScratchRegisterScope temps(this); + PRegister temp_pg = pg; + if (pd.Aliases(pg)) { + temp_pg = temps.AcquireP(); + Mov(temp_pg.VnB(), pg.VnB()); + } + Mov(pd, pn); + SingleEmissionCheckScope guard(this); + pfirst(pd, temp_pg, pd); + } +} + +void MacroAssembler::Pnext(const PRegisterWithLaneSize& pd, + const PRegister& pg, + const PRegisterWithLaneSize& pn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(AreSameFormat(pd, pn)); + if (pd.Is(pn)) { + SingleEmissionCheckScope guard(this); + pnext(pd, pg, pn); + } else { + UseScratchRegisterScope temps(this); + PRegister temp_pg = pg; + if (pd.Aliases(pg)) { + temp_pg = temps.AcquireP(); + Mov(temp_pg.VnB(), pg.VnB()); + } + Mov(pd.VnB(), pn.VnB()); + SingleEmissionCheckScope guard(this); + pnext(pd, temp_pg, pd); + } +} + +void MacroAssembler::Ptrue(const PRegisterWithLaneSize& pd, + SVEPredicateConstraint pattern, + FlagsUpdate s) { + VIXL_ASSERT(allow_macro_instructions_); + switch (s) { + case LeaveFlags: + Ptrue(pd, pattern); + return; + case SetFlags: + Ptrues(pd, pattern); + return; + } + VIXL_UNREACHABLE(); +} + +void MacroAssembler::Sdiv(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + NoncommutativeArithmeticHelper(zd, + pg, + zn, + zm, + static_cast( + &Assembler::sdiv), + static_cast( + &Assembler::sdivr)); +} + +void MacroAssembler::Sub(const ZRegister& zd, + IntegerOperand imm, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + + int imm8; + int shift = -1; + if (imm.TryEncodeAsShiftedUintNForLane<8, 0>(zd, &imm8, &shift) || + imm.TryEncodeAsShiftedUintNForLane<8, 8>(zd, &imm8, &shift)) { + MovprfxHelperScope guard(this, zd, zm); + subr(zd, zd, imm8, shift); + } else { + UseScratchRegisterScope temps(this); + ZRegister scratch = temps.AcquireZ().WithLaneSize(zm.GetLaneSizeInBits()); + Dup(scratch, imm); + + SingleEmissionCheckScope guard(this); + sub(zd, scratch, zm); + } +} + +void MacroAssembler::Sub(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + NoncommutativeArithmeticHelper(zd, + pg, + zn, + zm, + static_cast( + &Assembler::sub), + static_cast( + &Assembler::subr)); +} + +void MacroAssembler::Udiv(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + NoncommutativeArithmeticHelper(zd, + pg, + zn, + zm, + static_cast( + &Assembler::udiv), + static_cast( + &Assembler::udivr)); +} + +void MacroAssembler::SVELoadBroadcastImmHelper(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr, + SVELoadBroadcastFn fn, + int divisor) { + VIXL_ASSERT(addr.IsScalarPlusImmediate()); + int64_t imm = addr.GetImmediateOffset(); + if ((imm % divisor == 0) && IsUint6(imm / divisor)) { + SingleEmissionCheckScope guard(this); + (this->*fn)(zt, pg, addr); + } else { + UseScratchRegisterScope temps(this); + Register scratch = temps.AcquireX(); + CalculateSVEAddress(scratch, addr, zt); + SingleEmissionCheckScope guard(this); + (this->*fn)(zt, pg, SVEMemOperand(scratch)); + } +} + +void MacroAssembler::SVELoadStoreScalarImmHelper(const CPURegister& rt, + const SVEMemOperand& addr, + SVELoadStoreFn fn) { + VIXL_ASSERT(allow_macro_instructions_); + VIXL_ASSERT(rt.IsZRegister() || rt.IsPRegister()); + + if (addr.IsPlainScalar() || + (addr.IsScalarPlusImmediate() && IsInt9(addr.GetImmediateOffset()) && + addr.IsMulVl())) { + SingleEmissionCheckScope guard(this); + (this->*fn)(rt, addr); + return; + } + + if (addr.IsEquivalentToScalar()) { + SingleEmissionCheckScope guard(this); + (this->*fn)(rt, SVEMemOperand(addr.GetScalarBase())); + return; + } + + UseScratchRegisterScope temps(this); + Register scratch = temps.AcquireX(); + CalculateSVEAddress(scratch, addr, rt); + SingleEmissionCheckScope guard(this); + (this->*fn)(rt, SVEMemOperand(scratch)); +} + +template +void MacroAssembler::SVELoadStoreScalarImmHelper( + const ZRegister& zt, + const Tg& pg, + const SVEMemOperand& addr, + Tf fn, + int imm_bits, + int shift_amount, + SVEOffsetModifier supported_modifier, + int vl_divisor_log2) { + VIXL_ASSERT(allow_macro_instructions_); + int imm_divisor = 1 << shift_amount; + + if (addr.IsPlainScalar() || + (addr.IsScalarPlusImmediate() && + IsIntN(imm_bits, addr.GetImmediateOffset() / imm_divisor) && + ((addr.GetImmediateOffset() % imm_divisor) == 0) && + (addr.GetOffsetModifier() == supported_modifier))) { + SingleEmissionCheckScope guard(this); + (this->*fn)(zt, pg, addr); + return; + } + + if (addr.IsEquivalentToScalar()) { + SingleEmissionCheckScope guard(this); + (this->*fn)(zt, pg, SVEMemOperand(addr.GetScalarBase())); + return; + } + + if (addr.IsMulVl() && (supported_modifier != SVE_MUL_VL) && + (vl_divisor_log2 == -1)) { + // We don't handle [x0, #imm, MUL VL] if the in-memory access size is not VL + // dependent. + VIXL_UNIMPLEMENTED(); + } + + UseScratchRegisterScope temps(this); + Register scratch = temps.AcquireX(); + CalculateSVEAddress(scratch, addr, vl_divisor_log2); + SingleEmissionCheckScope guard(this); + (this->*fn)(zt, pg, SVEMemOperand(scratch)); +} + +template +void MacroAssembler::SVELoadStore1Helper(int msize_in_bytes_log2, + const ZRegister& zt, + const Tg& pg, + const SVEMemOperand& addr, + Tf fn) { + if (addr.IsPlainScalar() || + (addr.IsScalarPlusScalar() && !addr.GetScalarOffset().IsZero() && + addr.IsEquivalentToLSL(msize_in_bytes_log2)) || + (addr.IsScalarPlusImmediate() && IsInt4(addr.GetImmediateOffset()) && + addr.IsMulVl())) { + SingleEmissionCheckScope guard(this); + (this->*fn)(zt, pg, addr); + return; + } + + if (addr.IsEquivalentToScalar()) { + SingleEmissionCheckScope guard(this); + (this->*fn)(zt, pg, SVEMemOperand(addr.GetScalarBase())); + return; + } + + if (addr.IsVectorPlusImmediate()) { + uint64_t offset = addr.GetImmediateOffset(); + if (IsMultiple(offset, (1 << msize_in_bytes_log2)) && + IsUint5(offset >> msize_in_bytes_log2)) { + SingleEmissionCheckScope guard(this); + (this->*fn)(zt, pg, addr); + return; + } + } + + if (addr.IsScalarPlusVector()) { + VIXL_ASSERT(addr.IsScatterGather()); + SingleEmissionCheckScope guard(this); + (this->*fn)(zt, pg, addr); + return; + } + + UseScratchRegisterScope temps(this); + if (addr.IsScatterGather()) { + // In scatter-gather modes, zt and zn/zm have the same lane size. However, + // for 32-bit accesses, the result of each lane's address calculation still + // requires 64 bits; we can't naively use `Adr` for the address calculation + // because it would truncate each address to 32 bits. + + if (addr.IsVectorPlusImmediate()) { + // Synthesise the immediate in an X register, then use a + // scalar-plus-vector access with the original vector. + Register scratch = temps.AcquireX(); + Mov(scratch, addr.GetImmediateOffset()); + SingleEmissionCheckScope guard(this); + SVEOffsetModifier om = + zt.IsLaneSizeS() ? SVE_UXTW : NO_SVE_OFFSET_MODIFIER; + (this->*fn)(zt, pg, SVEMemOperand(scratch, addr.GetVectorBase(), om)); + return; + } + + VIXL_UNIMPLEMENTED(); + } else { + Register scratch = temps.AcquireX(); + // TODO: If we have an immediate offset that is a multiple of + // msize_in_bytes, we can use Rdvl/Rdpl and a scalar-plus-scalar form to + // save an instruction. + int vl_divisor_log2 = zt.GetLaneSizeInBytesLog2() - msize_in_bytes_log2; + CalculateSVEAddress(scratch, addr, vl_divisor_log2); + SingleEmissionCheckScope guard(this); + (this->*fn)(zt, pg, SVEMemOperand(scratch)); + } +} + +template +void MacroAssembler::SVELoadFFHelper(int msize_in_bytes_log2, + const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr, + Tf fn) { + if (addr.IsScatterGather()) { + // Scatter-gather first-fault loads share encodings with normal loads. + SVELoadStore1Helper(msize_in_bytes_log2, zt, pg, addr, fn); + return; + } + + // Contiguous first-faulting loads have no scalar-plus-immediate form at all, + // so we don't do immediate synthesis. + + // We cannot currently distinguish "[x0]" from "[x0, #0]", and this + // is not "scalar-plus-scalar", so we have to permit `IsPlainScalar()` here. + if (addr.IsPlainScalar() || (addr.IsScalarPlusScalar() && + addr.IsEquivalentToLSL(msize_in_bytes_log2))) { + SingleEmissionCheckScope guard(this); + (this->*fn)(zt, pg, addr); + return; + } + + VIXL_UNIMPLEMENTED(); +} + +void MacroAssembler::Ld1b(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadStore1Helper(kBRegSizeInBytesLog2, + zt, + pg, + addr, + static_cast(&Assembler::ld1b)); +} + +void MacroAssembler::Ld1h(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadStore1Helper(kHRegSizeInBytesLog2, + zt, + pg, + addr, + static_cast(&Assembler::ld1h)); +} + +void MacroAssembler::Ld1w(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadStore1Helper(kWRegSizeInBytesLog2, + zt, + pg, + addr, + static_cast(&Assembler::ld1w)); +} + +void MacroAssembler::Ld1d(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadStore1Helper(kDRegSizeInBytesLog2, + zt, + pg, + addr, + static_cast(&Assembler::ld1d)); +} + +void MacroAssembler::Ld1sb(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadStore1Helper(kBRegSizeInBytesLog2, + zt, + pg, + addr, + static_cast(&Assembler::ld1sb)); +} + +void MacroAssembler::Ld1sh(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadStore1Helper(kHRegSizeInBytesLog2, + zt, + pg, + addr, + static_cast(&Assembler::ld1sh)); +} + +void MacroAssembler::Ld1sw(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadStore1Helper(kSRegSizeInBytesLog2, + zt, + pg, + addr, + static_cast(&Assembler::ld1sw)); +} + +void MacroAssembler::St1b(const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadStore1Helper(kBRegSizeInBytesLog2, + zt, + pg, + addr, + static_cast(&Assembler::st1b)); +} + +void MacroAssembler::St1h(const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadStore1Helper(kHRegSizeInBytesLog2, + zt, + pg, + addr, + static_cast(&Assembler::st1h)); +} + +void MacroAssembler::St1w(const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadStore1Helper(kSRegSizeInBytesLog2, + zt, + pg, + addr, + static_cast(&Assembler::st1w)); +} + +void MacroAssembler::St1d(const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadStore1Helper(kDRegSizeInBytesLog2, + zt, + pg, + addr, + static_cast(&Assembler::st1d)); +} + +void MacroAssembler::Ldff1b(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadFFHelper(kBRegSizeInBytesLog2, + zt, + pg, + addr, + static_cast(&Assembler::ldff1b)); +} + +void MacroAssembler::Ldff1h(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadFFHelper(kHRegSizeInBytesLog2, + zt, + pg, + addr, + static_cast(&Assembler::ldff1h)); +} + +void MacroAssembler::Ldff1w(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadFFHelper(kSRegSizeInBytesLog2, + zt, + pg, + addr, + static_cast(&Assembler::ldff1w)); +} + +void MacroAssembler::Ldff1d(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadFFHelper(kDRegSizeInBytesLog2, + zt, + pg, + addr, + static_cast(&Assembler::ldff1d)); +} + +void MacroAssembler::Ldff1sb(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadFFHelper(kBRegSizeInBytesLog2, + zt, + pg, + addr, + static_cast(&Assembler::ldff1sb)); +} + +void MacroAssembler::Ldff1sh(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadFFHelper(kHRegSizeInBytesLog2, + zt, + pg, + addr, + static_cast(&Assembler::ldff1sh)); +} + +void MacroAssembler::Ldff1sw(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadFFHelper(kSRegSizeInBytesLog2, + zt, + pg, + addr, + static_cast(&Assembler::ldff1sw)); +} + +void MacroAssembler::Ld1rqb(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadStoreScalarImmHelper(zt, + pg, + addr, + &MacroAssembler::ld1rqb, + 4, + 4, + NO_SVE_OFFSET_MODIFIER, + -1); +} + +void MacroAssembler::Ld1rqd(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadStoreScalarImmHelper(zt, + pg, + addr, + &MacroAssembler::ld1rqd, + 4, + 4, + NO_SVE_OFFSET_MODIFIER, + -1); +} + +void MacroAssembler::Ld1rqh(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadStoreScalarImmHelper(zt, + pg, + addr, + &MacroAssembler::ld1rqh, + 4, + 4, + NO_SVE_OFFSET_MODIFIER, + -1); +} + +void MacroAssembler::Ld1rqw(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadStoreScalarImmHelper(zt, + pg, + addr, + &MacroAssembler::ld1rqw, + 4, + 4, + NO_SVE_OFFSET_MODIFIER, + -1); +} + +void MacroAssembler::Ldnt1b(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadStoreScalarImmHelper(zt, + pg, + addr, + &MacroAssembler::ldnt1b, + 4, + 0, + SVE_MUL_VL); +} + +void MacroAssembler::Ldnt1d(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadStoreScalarImmHelper(zt, + pg, + addr, + &MacroAssembler::ldnt1d, + 4, + 0, + SVE_MUL_VL); +} + +void MacroAssembler::Ldnt1h(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadStoreScalarImmHelper(zt, + pg, + addr, + &MacroAssembler::ldnt1h, + 4, + 0, + SVE_MUL_VL); +} + +void MacroAssembler::Ldnt1w(const ZRegister& zt, + const PRegisterZ& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadStoreScalarImmHelper(zt, + pg, + addr, + &MacroAssembler::ldnt1w, + 4, + 0, + SVE_MUL_VL); +} + +void MacroAssembler::Stnt1b(const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadStoreScalarImmHelper(zt, + pg, + addr, + &MacroAssembler::stnt1b, + 4, + 0, + SVE_MUL_VL); +} +void MacroAssembler::Stnt1d(const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadStoreScalarImmHelper(zt, + pg, + addr, + &MacroAssembler::stnt1d, + 4, + 0, + SVE_MUL_VL); +} +void MacroAssembler::Stnt1h(const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadStoreScalarImmHelper(zt, + pg, + addr, + &MacroAssembler::stnt1h, + 4, + 0, + SVE_MUL_VL); +} +void MacroAssembler::Stnt1w(const ZRegister& zt, + const PRegister& pg, + const SVEMemOperand& addr) { + VIXL_ASSERT(allow_macro_instructions_); + SVELoadStoreScalarImmHelper(zt, + pg, + addr, + &MacroAssembler::stnt1w, + 4, + 0, + SVE_MUL_VL); +} + +void MacroAssembler::SVESdotUdotIndexHelper(IntArithIndexFn fn, + const ZRegister& zd, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm, + int index) { + if (zd.Aliases(za)) { + // zda = zda + (zn . zm) + SingleEmissionCheckScope guard(this); + (this->*fn)(zd, zn, zm, index); + + } else if (zd.Aliases(zn) || zd.Aliases(zm)) { + // zdn = za + (zdn . zm[index]) + // zdm = za + (zn . zdm[index]) + // zdnm = za + (zdnm . zdnm[index]) + UseScratchRegisterScope temps(this); + ZRegister scratch = temps.AcquireZ().WithSameLaneSizeAs(zd); + { + MovprfxHelperScope guard(this, scratch, za); + (this->*fn)(scratch, zn, zm, index); + } + + Mov(zd, scratch); + } else { + // zd = za + (zn . zm) + MovprfxHelperScope guard(this, zd, za); + (this->*fn)(zd, zn, zm, index); + } +} + +void MacroAssembler::SVESdotUdotHelper(IntArithFn fn, + const ZRegister& zd, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm) { + if (zd.Aliases(za)) { + // zda = zda + (zn . zm) + SingleEmissionCheckScope guard(this); + (this->*fn)(zd, zn, zm); + + } else if (zd.Aliases(zn) || zd.Aliases(zm)) { + // zdn = za + (zdn . zm) + // zdm = za + (zn . zdm) + // zdnm = za + (zdnm . zdnm) + UseScratchRegisterScope temps(this); + ZRegister scratch = temps.AcquireZ().WithSameLaneSizeAs(zd); + { + MovprfxHelperScope guard(this, scratch, za); + (this->*fn)(scratch, zn, zm); + } + + Mov(zd, scratch); + } else { + // zd = za + (zn . zm) + MovprfxHelperScope guard(this, zd, za); + (this->*fn)(zd, zn, zm); + } +} + +void MacroAssembler::Fscale(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + if (zd.Aliases(zm) && !zd.Aliases(zn)) { + UseScratchRegisterScope temps(this); + ZRegister scratch = temps.AcquireZ().WithSameLaneSizeAs(zm); + Mov(scratch, zm); + MovprfxHelperScope guard(this, zd, pg, zn); + fscale(zd, pg, zd, scratch); + } else { + MovprfxHelperScope guard(this, zd, pg, zn); + fscale(zd, pg, zd, zm); + } +} + +void MacroAssembler::Sdot(const ZRegister& zd, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SVESdotUdotHelper(&Assembler::sdot, zd, za, zn, zm); +} + +void MacroAssembler::Sdot(const ZRegister& zd, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm, + int index) { + VIXL_ASSERT(allow_macro_instructions_); + SVESdotUdotIndexHelper(&Assembler::sdot, zd, za, zn, zm, index); +} + +void MacroAssembler::Udot(const ZRegister& zd, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + SVESdotUdotHelper(&Assembler::udot, zd, za, zn, zm); +} + +void MacroAssembler::Udot(const ZRegister& zd, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm, + int index) { + VIXL_ASSERT(allow_macro_instructions_); + SVESdotUdotIndexHelper(&Assembler::udot, zd, za, zn, zm, index); +} + +void MacroAssembler::FPMulAddHelper(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm, + SVEMulAddPredicatedZdaFn fn_zda, + SVEMulAddPredicatedZdnFn fn_zdn, + FPMacroNaNPropagationOption nan_option) { + ResolveFPNaNPropagationOption(&nan_option); + + if (zd.Aliases(za)) { + // zda = (-)zda + ((-)zn * zm) for fmla, fmls, fnmla and fnmls. + SingleEmissionCheckScope guard(this); + (this->*fn_zda)(zd, pg, zn, zm); + } else if (zd.Aliases(zn)) { + // zdn = (-)za + ((-)zdn * zm) for fmad, fmsb, fnmad and fnmsb. + SingleEmissionCheckScope guard(this); + (this->*fn_zdn)(zd, pg, zm, za); + } else if (zd.Aliases(zm)) { + switch (nan_option) { + case FastNaNPropagation: { + // We treat multiplication as commutative in the fast mode, so we can + // swap zn and zm. + // zdm = (-)za + ((-)zdm * zn) for fmad, fmsb, fnmad and fnmsb. + SingleEmissionCheckScope guard(this); + (this->*fn_zdn)(zd, pg, zn, za); + return; + } + case StrictNaNPropagation: { + UseScratchRegisterScope temps(this); + // Use a scratch register to keep the argument order exactly as + // specified. + ZRegister scratch = temps.AcquireZ().WithSameLaneSizeAs(zn); + { + MovprfxHelperScope guard(this, scratch, pg, za); + // scratch = (-)za + ((-)zn * zm) + (this->*fn_zda)(scratch, pg, zn, zm); + } + Mov(zd, scratch); + return; + } + case NoFPMacroNaNPropagationSelected: + VIXL_UNREACHABLE(); + return; + } + } else { + // zd = (-)za + ((-)zn * zm) for fmla, fmls, fnmla and fnmls. + MovprfxHelperScope guard(this, zd, pg, za); + (this->*fn_zda)(zd, pg, zn, zm); + } +} + +void MacroAssembler::FPMulAddIndexHelper(SVEMulAddIndexFn fn, + const ZRegister& zd, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm, + int index) { + if (zd.Aliases(za)) { + // zda = zda + (zn * zm[i]) + SingleEmissionCheckScope guard(this); + (this->*fn)(zd, zn, zm, index); + + } else if (zd.Aliases(zn) || zd.Aliases(zm)) { + // zdn = za + (zdn * zm[i]) + // zdm = za + (zn * zdm[i]) + // zdnm = za + (zdnm * zdnm[i]) + UseScratchRegisterScope temps(this); + ZRegister scratch = temps.AcquireZ().WithSameLaneSizeAs(zd); + { + MovprfxHelperScope guard(this, scratch, za); + (this->*fn)(scratch, zn, zm, index); + } + Mov(zd, scratch); + } else { + // zd = za + (zn * zm[i]) + MovprfxHelperScope guard(this, zd, za); + (this->*fn)(zd, zn, zm, index); + } +} + +void MacroAssembler::Fmla(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm, + FPMacroNaNPropagationOption nan_option) { + VIXL_ASSERT(allow_macro_instructions_); + FPMulAddHelper(zd, + pg, + za, + zn, + zm, + &Assembler::fmla, + &Assembler::fmad, + nan_option); +} + +void MacroAssembler::Fmla(const ZRegister& zd, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm, + int index) { + VIXL_ASSERT(allow_macro_instructions_); + FPMulAddIndexHelper(&Assembler::fmla, zd, za, zn, zm, index); +} + +void MacroAssembler::Fmls(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm, + FPMacroNaNPropagationOption nan_option) { + VIXL_ASSERT(allow_macro_instructions_); + FPMulAddHelper(zd, + pg, + za, + zn, + zm, + &Assembler::fmls, + &Assembler::fmsb, + nan_option); +} + +void MacroAssembler::Fmls(const ZRegister& zd, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm, + int index) { + VIXL_ASSERT(allow_macro_instructions_); + FPMulAddIndexHelper(&Assembler::fmls, zd, za, zn, zm, index); +} + +void MacroAssembler::Fnmla(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm, + FPMacroNaNPropagationOption nan_option) { + VIXL_ASSERT(allow_macro_instructions_); + FPMulAddHelper(zd, + pg, + za, + zn, + zm, + &Assembler::fnmla, + &Assembler::fnmad, + nan_option); +} + +void MacroAssembler::Fnmls(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& za, + const ZRegister& zn, + const ZRegister& zm, + FPMacroNaNPropagationOption nan_option) { + VIXL_ASSERT(allow_macro_instructions_); + FPMulAddHelper(zd, + pg, + za, + zn, + zm, + &Assembler::fnmls, + &Assembler::fnmsb, + nan_option); +} + +void MacroAssembler::Ftmad(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm, + int imm3) { + VIXL_ASSERT(allow_macro_instructions_); + if (zd.Aliases(zm) && !zd.Aliases(zn)) { + UseScratchRegisterScope temps(this); + ZRegister scratch = temps.AcquireZ().WithSameLaneSizeAs(zm); + Mov(scratch, zm); + MovprfxHelperScope guard(this, zd, zn); + ftmad(zd, zd, scratch, imm3); + } else { + MovprfxHelperScope guard(this, zd, zn); + ftmad(zd, zd, zm, imm3); + } +} + +void MacroAssembler::Fcadd(const ZRegister& zd, + const PRegisterM& pg, + const ZRegister& zn, + const ZRegister& zm, + int rot) { + VIXL_ASSERT(allow_macro_instructions_); + if (zd.Aliases(zm) && !zd.Aliases(zn)) { + UseScratchRegisterScope temps(this); + ZRegister scratch = temps.AcquireZ().WithSameLaneSizeAs(zd); + { + MovprfxHelperScope guard(this, scratch, pg, zn); + fcadd(scratch, pg, scratch, zm, rot); + } + Mov(zd, scratch); + } else { + MovprfxHelperScope guard(this, zd, pg, zn); + fcadd(zd, pg, zd, zm, rot); + } +} + +void MacroAssembler::Ext(const ZRegister& zd, + const ZRegister& zn, + const ZRegister& zm, + unsigned offset) { + VIXL_ASSERT(allow_macro_instructions_); + if (zd.Aliases(zm) && !zd.Aliases(zn)) { + // zd = ext(zn, zd, offset) + UseScratchRegisterScope temps(this); + ZRegister scratch = temps.AcquireZ().WithSameLaneSizeAs(zd); + { + MovprfxHelperScope guard(this, scratch, zn); + ext(scratch, scratch, zm, offset); + } + Mov(zd, scratch); + } else { + // zd = ext(zn, zm, offset) + // zd = ext(zd, zd, offset) + MovprfxHelperScope guard(this, zd, zn); + ext(zd, zd, zm, offset); + } +} + +void MacroAssembler::Splice(const ZRegister& zd, + const PRegister& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + if (zd.Aliases(zm) && !zd.Aliases(zn)) { + UseScratchRegisterScope temps(this); + ZRegister scratch = temps.AcquireZ().WithSameLaneSizeAs(zd); + { + MovprfxHelperScope guard(this, scratch, zn); + splice(scratch, pg, scratch, zm); + } + Mov(zd, scratch); + } else { + MovprfxHelperScope guard(this, zd, zn); + splice(zd, pg, zd, zm); + } +} + +void MacroAssembler::Clasta(const ZRegister& zd, + const PRegister& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + if (zd.Aliases(zm) && !zd.Aliases(zn)) { + UseScratchRegisterScope temps(this); + ZRegister scratch = temps.AcquireZ().WithSameLaneSizeAs(zd); + { + MovprfxHelperScope guard(this, scratch, zn); + clasta(scratch, pg, scratch, zm); + } + Mov(zd, scratch); + } else { + MovprfxHelperScope guard(this, zd, zn); + clasta(zd, pg, zd, zm); + } +} + +void MacroAssembler::Clastb(const ZRegister& zd, + const PRegister& pg, + const ZRegister& zn, + const ZRegister& zm) { + VIXL_ASSERT(allow_macro_instructions_); + if (zd.Aliases(zm) && !zd.Aliases(zn)) { + UseScratchRegisterScope temps(this); + ZRegister scratch = temps.AcquireZ().WithSameLaneSizeAs(zd); + { + MovprfxHelperScope guard(this, scratch, zn); + clastb(scratch, pg, scratch, zm); + } + Mov(zd, scratch); + } else { + MovprfxHelperScope guard(this, zd, zn); + clastb(zd, pg, zd, zm); + } +} + +} // namespace aarch64 +} // namespace vixl diff --git a/src/coreclr/jit/vixl/aarch64/operands-aarch64.cc b/src/coreclr/jit/vixl/aarch64/operands-aarch64.cc new file mode 100644 index 00000000000000..008179e40d3893 --- /dev/null +++ b/src/coreclr/jit/vixl/aarch64/operands-aarch64.cc @@ -0,0 +1,464 @@ +// Copyright 2016, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "operands-aarch64.h" + +namespace vixl { +namespace aarch64 { + +// CPURegList utilities. +CPURegister CPURegList::PopLowestIndex(RegList mask) { + RegList list = list_ & mask; + if (list == 0) return NoCPUReg; + int index = CountTrailingZeros(list); + VIXL_ASSERT(((1 << index) & list) != 0); + Remove(index); + return CPURegister(index, size_, type_); +} + + +CPURegister CPURegList::PopHighestIndex(RegList mask) { + RegList list = list_ & mask; + if (list == 0) return NoCPUReg; + int index = CountLeadingZeros(list); + index = kRegListSizeInBits - 1 - index; + VIXL_ASSERT(((1 << index) & list) != 0); + Remove(index); + return CPURegister(index, size_, type_); +} + + +bool CPURegList::IsValid() const { + if (type_ == CPURegister::kNoRegister) { + // We can't use IsEmpty here because that asserts IsValid(). + return list_ == 0; + } else { + bool is_valid = true; + // Try to create a CPURegister for each element in the list. + for (int i = 0; i < kRegListSizeInBits; i++) { + if (((list_ >> i) & 1) != 0) { + is_valid &= CPURegister(i, size_, type_).IsValid(); + } + } + return is_valid; + } +} + + +void CPURegList::RemoveCalleeSaved() { + if (GetType() == CPURegister::kRegister) { + Remove(GetCalleeSaved(GetRegisterSizeInBits())); + } else if (GetType() == CPURegister::kVRegister) { + Remove(GetCalleeSavedV(GetRegisterSizeInBits())); + } else { + VIXL_ASSERT(GetType() == CPURegister::kNoRegister); + VIXL_ASSERT(IsEmpty()); + // The list must already be empty, so do nothing. + } +} + + +CPURegList CPURegList::Union(const CPURegList& list_1, + const CPURegList& list_2, + const CPURegList& list_3) { + return Union(list_1, Union(list_2, list_3)); +} + + +CPURegList CPURegList::Union(const CPURegList& list_1, + const CPURegList& list_2, + const CPURegList& list_3, + const CPURegList& list_4) { + return Union(Union(list_1, list_2), Union(list_3, list_4)); +} + + +CPURegList CPURegList::Intersection(const CPURegList& list_1, + const CPURegList& list_2, + const CPURegList& list_3) { + return Intersection(list_1, Intersection(list_2, list_3)); +} + + +CPURegList CPURegList::Intersection(const CPURegList& list_1, + const CPURegList& list_2, + const CPURegList& list_3, + const CPURegList& list_4) { + return Intersection(Intersection(list_1, list_2), + Intersection(list_3, list_4)); +} + + +CPURegList CPURegList::GetCalleeSaved(unsigned size) { + return CPURegList(CPURegister::kRegister, size, 19, 29); +} + + +CPURegList CPURegList::GetCalleeSavedV(unsigned size) { + return CPURegList(CPURegister::kVRegister, size, 8, 15); +} + + +CPURegList CPURegList::GetCallerSaved(unsigned size) { + // Registers x0-x18 and lr (x30) are caller-saved. + CPURegList list = CPURegList(CPURegister::kRegister, size, 0, 18); + // Do not use lr directly to avoid initialisation order fiasco bugs for users. + list.Combine(Register(30, kXRegSize)); + return list; +} + + +CPURegList CPURegList::GetCallerSavedV(unsigned size) { + // Registers d0-d7 and d16-d31 are caller-saved. + CPURegList list = CPURegList(CPURegister::kVRegister, size, 0, 7); + list.Combine(CPURegList(CPURegister::kVRegister, size, 16, 31)); + return list; +} + + +const CPURegList kCalleeSaved = CPURegList::GetCalleeSaved(); +const CPURegList kCalleeSavedV = CPURegList::GetCalleeSavedV(); +const CPURegList kCallerSaved = CPURegList::GetCallerSaved(); +const CPURegList kCallerSavedV = CPURegList::GetCallerSavedV(); + +// Operand. +Operand::Operand(int64_t immediate) + : immediate_(immediate), + reg_(NoReg), + shift_(NO_SHIFT), + extend_(NO_EXTEND), + shift_amount_(0) {} + +Operand::Operand(IntegerOperand immediate) + : immediate_(immediate.AsIntN(64)), + reg_(NoReg), + shift_(NO_SHIFT), + extend_(NO_EXTEND), + shift_amount_(0) {} + +Operand::Operand(Register reg, Shift shift, unsigned shift_amount) + : reg_(reg), + shift_(shift), + extend_(NO_EXTEND), + shift_amount_(shift_amount) { + VIXL_ASSERT(shift != MSL); + VIXL_ASSERT(reg.Is64Bits() || (shift_amount < kWRegSize)); + VIXL_ASSERT(reg.Is32Bits() || (shift_amount < kXRegSize)); + VIXL_ASSERT(!reg.IsSP()); +} + + +Operand::Operand(Register reg, Extend extend, unsigned shift_amount) + : reg_(reg), + shift_(NO_SHIFT), + extend_(extend), + shift_amount_(shift_amount) { + VIXL_ASSERT(reg.IsValid()); + VIXL_ASSERT(shift_amount <= 4); + VIXL_ASSERT(!reg.IsSP()); + + // Extend modes SXTX and UXTX require a 64-bit register. + VIXL_ASSERT(reg.Is64Bits() || ((extend != SXTX) && (extend != UXTX))); +} + + +bool Operand::IsImmediate() const { return reg_.Is(NoReg); } + + +bool Operand::IsPlainRegister() const { + return reg_.IsValid() && + (((shift_ == NO_SHIFT) && (extend_ == NO_EXTEND)) || + // No-op shifts. + ((shift_ != NO_SHIFT) && (shift_amount_ == 0)) || + // No-op extend operations. + // We can't include [US]XTW here without knowing more about the + // context; they are only no-ops for 32-bit operations. + // + // For example, this operand could be replaced with w1: + // __ Add(w0, w0, Operand(w1, UXTW)); + // However, no plain register can replace it in this context: + // __ Add(x0, x0, Operand(w1, UXTW)); + (((extend_ == UXTX) || (extend_ == SXTX)) && (shift_amount_ == 0))); +} + + +bool Operand::IsShiftedRegister() const { + return reg_.IsValid() && (shift_ != NO_SHIFT); +} + + +bool Operand::IsExtendedRegister() const { + return reg_.IsValid() && (extend_ != NO_EXTEND); +} + + +bool Operand::IsZero() const { + if (IsImmediate()) { + return GetImmediate() == 0; + } else { + return GetRegister().IsZero(); + } +} + + +Operand Operand::ToExtendedRegister() const { + VIXL_ASSERT(IsShiftedRegister()); + VIXL_ASSERT((shift_ == LSL) && (shift_amount_ <= 4)); + return Operand(reg_, reg_.Is64Bits() ? UXTX : UXTW, shift_amount_); +} + + +// MemOperand +MemOperand::MemOperand() + : base_(NoReg), + regoffset_(NoReg), + offset_(0), + addrmode_(Offset), + shift_(NO_SHIFT), + extend_(NO_EXTEND) {} + + +MemOperand::MemOperand(Register base, int64_t offset, AddrMode addrmode) + : base_(base), + regoffset_(NoReg), + offset_(offset), + addrmode_(addrmode), + shift_(NO_SHIFT), + extend_(NO_EXTEND), + shift_amount_(0) { + VIXL_ASSERT(base.Is64Bits() && !base.IsZero()); +} + + +MemOperand::MemOperand(Register base, + Register regoffset, + Extend extend, + unsigned shift_amount) + : base_(base), + regoffset_(regoffset), + offset_(0), + addrmode_(Offset), + shift_(NO_SHIFT), + extend_(extend), + shift_amount_(shift_amount) { + VIXL_ASSERT(base.Is64Bits() && !base.IsZero()); + VIXL_ASSERT(!regoffset.IsSP()); + VIXL_ASSERT((extend == UXTW) || (extend == SXTW) || (extend == SXTX)); + + // SXTX extend mode requires a 64-bit offset register. + VIXL_ASSERT(regoffset.Is64Bits() || (extend != SXTX)); +} + + +MemOperand::MemOperand(Register base, + Register regoffset, + Shift shift, + unsigned shift_amount) + : base_(base), + regoffset_(regoffset), + offset_(0), + addrmode_(Offset), + shift_(shift), + extend_(NO_EXTEND), + shift_amount_(shift_amount) { + VIXL_ASSERT(base.Is64Bits() && !base.IsZero()); + VIXL_ASSERT(regoffset.Is64Bits() && !regoffset.IsSP()); + VIXL_ASSERT(shift == LSL); +} + + +MemOperand::MemOperand(Register base, const Operand& offset, AddrMode addrmode) + : base_(base), + regoffset_(NoReg), + addrmode_(addrmode), + shift_(NO_SHIFT), + extend_(NO_EXTEND), + shift_amount_(0) { + VIXL_ASSERT(base.Is64Bits() && !base.IsZero()); + + if (offset.IsImmediate()) { + offset_ = offset.GetImmediate(); + } else if (offset.IsShiftedRegister()) { + VIXL_ASSERT((addrmode == Offset) || (addrmode == PostIndex)); + + regoffset_ = offset.GetRegister(); + shift_ = offset.GetShift(); + shift_amount_ = offset.GetShiftAmount(); + + extend_ = NO_EXTEND; + offset_ = 0; + + // These assertions match those in the shifted-register constructor. + VIXL_ASSERT(regoffset_.Is64Bits() && !regoffset_.IsSP()); + VIXL_ASSERT(shift_ == LSL); + } else { + VIXL_ASSERT(offset.IsExtendedRegister()); + VIXL_ASSERT(addrmode == Offset); + + regoffset_ = offset.GetRegister(); + extend_ = offset.GetExtend(); + shift_amount_ = offset.GetShiftAmount(); + + shift_ = NO_SHIFT; + offset_ = 0; + + // These assertions match those in the extended-register constructor. + VIXL_ASSERT(!regoffset_.IsSP()); + VIXL_ASSERT((extend_ == UXTW) || (extend_ == SXTW) || (extend_ == SXTX)); + VIXL_ASSERT((regoffset_.Is64Bits() || (extend_ != SXTX))); + } +} + + +bool MemOperand::IsPlainRegister() const { + return IsImmediateOffset() && (GetOffset() == 0); +} + + +bool MemOperand::IsEquivalentToPlainRegister() const { + if (regoffset_.Is(NoReg)) { + // Immediate offset, pre-index or post-index. + return GetOffset() == 0; + } else if (GetRegisterOffset().IsZero()) { + // Zero register offset, pre-index or post-index. + // We can ignore shift and extend options because they all result in zero. + return true; + } + return false; +} + + +bool MemOperand::IsImmediateOffset() const { + return (addrmode_ == Offset) && regoffset_.Is(NoReg); +} + + +bool MemOperand::IsRegisterOffset() const { + return (addrmode_ == Offset) && !regoffset_.Is(NoReg); +} + + +bool MemOperand::IsPreIndex() const { return addrmode_ == PreIndex; } + + +bool MemOperand::IsPostIndex() const { return addrmode_ == PostIndex; } + + +void MemOperand::AddOffset(int64_t offset) { + VIXL_ASSERT(IsImmediateOffset()); + offset_ += offset; +} + + +bool SVEMemOperand::IsValid() const { +#ifdef VIXL_DEBUG + { + // It should not be possible for an SVEMemOperand to match multiple types. + int count = 0; + if (IsScalarPlusImmediate()) count++; + if (IsScalarPlusScalar()) count++; + if (IsScalarPlusVector()) count++; + if (IsVectorPlusImmediate()) count++; + if (IsVectorPlusVector()) count++; + VIXL_ASSERT(count <= 1); + } +#endif + + // We can't have a register _and_ an immediate offset. + if ((offset_ != 0) && (!regoffset_.IsNone())) return false; + + if (shift_amount_ != 0) { + // Only shift and extend modifiers can take a shift amount. + switch (mod_) { + case NO_SVE_OFFSET_MODIFIER: + case SVE_MUL_VL: + return false; + case SVE_LSL: + case SVE_UXTW: + case SVE_SXTW: + // Fall through. + break; + } + } + + return IsScalarPlusImmediate() || IsScalarPlusScalar() || + IsScalarPlusVector() || IsVectorPlusImmediate() || + IsVectorPlusVector(); +} + + +bool SVEMemOperand::IsEquivalentToScalar() const { + if (IsScalarPlusImmediate()) { + return GetImmediateOffset() == 0; + } + if (IsScalarPlusScalar()) { + // We can ignore the shift because it will still result in zero. + return GetScalarOffset().IsZero(); + } + // Forms involving vectors are never equivalent to a single scalar. + return false; +} + +bool SVEMemOperand::IsPlainRegister() const { + if (IsScalarPlusImmediate()) { + return GetImmediateOffset() == 0; + } + return false; +} + +GenericOperand::GenericOperand(const CPURegister& reg) + : cpu_register_(reg), mem_op_size_(0) { + if (reg.IsQ()) { + VIXL_ASSERT(reg.GetSizeInBits() > static_cast(kXRegSize)); + // Support for Q registers is not implemented yet. + VIXL_UNIMPLEMENTED(); + } +} + + +GenericOperand::GenericOperand(const MemOperand& mem_op, size_t mem_op_size) + : cpu_register_(NoReg), mem_op_(mem_op), mem_op_size_(mem_op_size) { + if (mem_op_size_ > kXRegSizeInBytes) { + // We only support generic operands up to the size of X registers. + VIXL_UNIMPLEMENTED(); + } +} + +bool GenericOperand::Equals(const GenericOperand& other) const { + if (!IsValid() || !other.IsValid()) { + // Two invalid generic operands are considered equal. + return !IsValid() && !other.IsValid(); + } + if (IsCPURegister() && other.IsCPURegister()) { + return GetCPURegister().Is(other.GetCPURegister()); + } else if (IsMemOperand() && other.IsMemOperand()) { + return GetMemOperand().Equals(other.GetMemOperand()) && + (GetMemOperandSizeInBytes() == other.GetMemOperandSizeInBytes()); + } + return false; +} +} +} // namespace vixl::aarch64 diff --git a/src/coreclr/jit/vixl/aarch64/operands-aarch64.h b/src/coreclr/jit/vixl/aarch64/operands-aarch64.h new file mode 100644 index 00000000000000..7f6745ad27fc0b --- /dev/null +++ b/src/coreclr/jit/vixl/aarch64/operands-aarch64.h @@ -0,0 +1,978 @@ +// Copyright 2016, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef VIXL_AARCH64_OPERANDS_AARCH64_H_ +#define VIXL_AARCH64_OPERANDS_AARCH64_H_ + +#include +#include + +#include "instructions-aarch64.h" +#include "registers-aarch64.h" + +namespace vixl { +namespace aarch64 { + +// Lists of registers. +class CPURegList { + public: + explicit CPURegList(CPURegister reg1, + CPURegister reg2 = NoCPUReg, + CPURegister reg3 = NoCPUReg, + CPURegister reg4 = NoCPUReg) + : list_(reg1.GetBit() | reg2.GetBit() | reg3.GetBit() | reg4.GetBit()), + size_(reg1.GetSizeInBits()), + type_(reg1.GetType()) { + VIXL_ASSERT(AreSameSizeAndType(reg1, reg2, reg3, reg4)); + VIXL_ASSERT(IsValid()); + } + + CPURegList(CPURegister::RegisterType type, unsigned size, RegList list) + : list_(list), size_(size), type_(type) { + VIXL_ASSERT(IsValid()); + } + + CPURegList(CPURegister::RegisterType type, + unsigned size, + unsigned first_reg, + unsigned last_reg) + : size_(size), type_(type) { + VIXL_ASSERT( + ((type == CPURegister::kRegister) && (last_reg < kNumberOfRegisters)) || + ((type == CPURegister::kVRegister) && + (last_reg < kNumberOfVRegisters))); + VIXL_ASSERT(last_reg >= first_reg); + list_ = (UINT64_C(1) << (last_reg + 1)) - 1; + list_ &= ~((UINT64_C(1) << first_reg) - 1); + VIXL_ASSERT(IsValid()); + } + + // Construct an empty CPURegList with the specified size and type. If `size` + // is CPURegister::kUnknownSize and the register type requires a size, a valid + // but unspecified default will be picked. + static CPURegList Empty(CPURegister::RegisterType type, + unsigned size = CPURegister::kUnknownSize) { + return CPURegList(type, GetDefaultSizeFor(type, size), 0); + } + + // Construct a CPURegList with all possible registers with the specified size + // and type. If `size` is CPURegister::kUnknownSize and the register type + // requires a size, a valid but unspecified default will be picked. + static CPURegList All(CPURegister::RegisterType type, + unsigned size = CPURegister::kUnknownSize) { + unsigned number_of_registers = (CPURegister::GetMaxCodeFor(type) + 1); + RegList list = (static_cast(1) << number_of_registers) - 1; + if (type == CPURegister::kRegister) { + // GetMaxCodeFor(kRegister) ignores SP, so explicitly include it. + list |= (static_cast(1) << kSPRegInternalCode); + } + return CPURegList(type, GetDefaultSizeFor(type, size), list); + } + + CPURegister::RegisterType GetType() const { + VIXL_ASSERT(IsValid()); + return type_; + } + VIXL_DEPRECATED("GetType", CPURegister::RegisterType type() const) { + return GetType(); + } + + CPURegister::RegisterBank GetBank() const { + return CPURegister::GetBankFor(GetType()); + } + + // Combine another CPURegList into this one. Registers that already exist in + // this list are left unchanged. The type and size of the registers in the + // 'other' list must match those in this list. + void Combine(const CPURegList& other) { + VIXL_ASSERT(IsValid()); + VIXL_ASSERT(other.GetType() == type_); + VIXL_ASSERT(other.GetRegisterSizeInBits() == size_); + list_ |= other.GetList(); + } + + // Remove every register in the other CPURegList from this one. Registers that + // do not exist in this list are ignored. The type and size of the registers + // in the 'other' list must match those in this list. + void Remove(const CPURegList& other) { + VIXL_ASSERT(IsValid()); + VIXL_ASSERT(other.GetType() == type_); + VIXL_ASSERT(other.GetRegisterSizeInBits() == size_); + list_ &= ~other.GetList(); + } + + // Variants of Combine and Remove which take a single register. + void Combine(const CPURegister& other) { + VIXL_ASSERT(other.GetType() == type_); + VIXL_ASSERT(other.GetSizeInBits() == size_); + Combine(other.GetCode()); + } + + void Remove(const CPURegister& other) { + VIXL_ASSERT(other.GetType() == type_); + VIXL_ASSERT(other.GetSizeInBits() == size_); + Remove(other.GetCode()); + } + + // Variants of Combine and Remove which take a single register by its code; + // the type and size of the register is inferred from this list. + void Combine(int code) { + VIXL_ASSERT(IsValid()); + VIXL_ASSERT(CPURegister(code, size_, type_).IsValid()); + list_ |= (UINT64_C(1) << code); + } + + void Remove(int code) { + VIXL_ASSERT(IsValid()); + VIXL_ASSERT(CPURegister(code, size_, type_).IsValid()); + list_ &= ~(UINT64_C(1) << code); + } + + static CPURegList Union(const CPURegList& list_1, const CPURegList& list_2) { + VIXL_ASSERT(list_1.type_ == list_2.type_); + VIXL_ASSERT(list_1.size_ == list_2.size_); + return CPURegList(list_1.type_, list_1.size_, list_1.list_ | list_2.list_); + } + static CPURegList Union(const CPURegList& list_1, + const CPURegList& list_2, + const CPURegList& list_3); + static CPURegList Union(const CPURegList& list_1, + const CPURegList& list_2, + const CPURegList& list_3, + const CPURegList& list_4); + + static CPURegList Intersection(const CPURegList& list_1, + const CPURegList& list_2) { + VIXL_ASSERT(list_1.type_ == list_2.type_); + VIXL_ASSERT(list_1.size_ == list_2.size_); + return CPURegList(list_1.type_, list_1.size_, list_1.list_ & list_2.list_); + } + static CPURegList Intersection(const CPURegList& list_1, + const CPURegList& list_2, + const CPURegList& list_3); + static CPURegList Intersection(const CPURegList& list_1, + const CPURegList& list_2, + const CPURegList& list_3, + const CPURegList& list_4); + + bool Overlaps(const CPURegList& other) const { + return (type_ == other.type_) && ((list_ & other.list_) != 0); + } + + RegList GetList() const { + VIXL_ASSERT(IsValid()); + return list_; + } + VIXL_DEPRECATED("GetList", RegList list() const) { return GetList(); } + + void SetList(RegList new_list) { + VIXL_ASSERT(IsValid()); + list_ = new_list; + } + VIXL_DEPRECATED("SetList", void set_list(RegList new_list)) { + return SetList(new_list); + } + + // Remove all callee-saved registers from the list. This can be useful when + // preparing registers for an AAPCS64 function call, for example. + void RemoveCalleeSaved(); + + // Find the register in this list that appears in `mask` with the lowest or + // highest code, remove it from the list and return it as a CPURegister. If + // the list is empty, leave it unchanged and return NoCPUReg. + CPURegister PopLowestIndex(RegList mask = ~static_cast(0)); + CPURegister PopHighestIndex(RegList mask = ~static_cast(0)); + + // AAPCS64 callee-saved registers. + static CPURegList GetCalleeSaved(unsigned size = kXRegSize); + static CPURegList GetCalleeSavedV(unsigned size = kDRegSize); + + // AAPCS64 caller-saved registers. Note that this includes lr. + // TODO(all): Determine how we handle d8-d15 being callee-saved, but the top + // 64-bits being caller-saved. + static CPURegList GetCallerSaved(unsigned size = kXRegSize); + static CPURegList GetCallerSavedV(unsigned size = kDRegSize); + + bool IsEmpty() const { + VIXL_ASSERT(IsValid()); + return list_ == 0; + } + + bool IncludesAliasOf(const CPURegister& other) const { + VIXL_ASSERT(IsValid()); + return (GetBank() == other.GetBank()) && IncludesAliasOf(other.GetCode()); + } + + bool IncludesAliasOf(int code) const { + VIXL_ASSERT(IsValid()); + return (((static_cast(1) << code) & list_) != 0); + } + + int GetCount() const { + VIXL_ASSERT(IsValid()); + return CountSetBits(list_); + } + VIXL_DEPRECATED("GetCount", int Count()) const { return GetCount(); } + + int GetRegisterSizeInBits() const { + VIXL_ASSERT(IsValid()); + return size_; + } + VIXL_DEPRECATED("GetRegisterSizeInBits", int RegisterSizeInBits() const) { + return GetRegisterSizeInBits(); + } + + int GetRegisterSizeInBytes() const { + int size_in_bits = GetRegisterSizeInBits(); + VIXL_ASSERT((size_in_bits % 8) == 0); + return size_in_bits / 8; + } + VIXL_DEPRECATED("GetRegisterSizeInBytes", int RegisterSizeInBytes() const) { + return GetRegisterSizeInBytes(); + } + + unsigned GetTotalSizeInBytes() const { + VIXL_ASSERT(IsValid()); + return GetRegisterSizeInBytes() * GetCount(); + } + VIXL_DEPRECATED("GetTotalSizeInBytes", unsigned TotalSizeInBytes() const) { + return GetTotalSizeInBytes(); + } + + private: + // If `size` is CPURegister::kUnknownSize and the type requires a known size, + // then return an arbitrary-but-valid size. + // + // Otherwise, the size is checked for validity and returned unchanged. + static unsigned GetDefaultSizeFor(CPURegister::RegisterType type, + unsigned size) { + if (size == CPURegister::kUnknownSize) { + if (type == CPURegister::kRegister) size = kXRegSize; + if (type == CPURegister::kVRegister) size = kQRegSize; + // All other types require kUnknownSize. + } + VIXL_ASSERT(CPURegister(0, size, type).IsValid()); + return size; + } + + RegList list_; + int size_; + CPURegister::RegisterType type_; + + bool IsValid() const; +}; + + +// AAPCS64 callee-saved registers. +extern const CPURegList kCalleeSaved; +extern const CPURegList kCalleeSavedV; + + +// AAPCS64 caller-saved registers. Note that this includes lr. +extern const CPURegList kCallerSaved; +extern const CPURegList kCallerSavedV; + +class IntegerOperand; + +// Operand. +class Operand { + public: + // # + // where is int64_t. + // This is allowed to be an implicit constructor because Operand is + // a wrapper class that doesn't normally perform any type conversion. + Operand(int64_t immediate); // NOLINT(runtime/explicit) + + Operand(IntegerOperand immediate); // NOLINT(runtime/explicit) + + // rm, { #} + // where is one of {LSL, LSR, ASR, ROR}. + // is uint6_t. + // This is allowed to be an implicit constructor because Operand is + // a wrapper class that doesn't normally perform any type conversion. + Operand(Register reg, + Shift shift = LSL, + unsigned shift_amount = 0); // NOLINT(runtime/explicit) + + // rm, { {#}} + // where is one of {UXTB, UXTH, UXTW, UXTX, SXTB, SXTH, SXTW, SXTX}. + // is uint2_t. + explicit Operand(Register reg, Extend extend, unsigned shift_amount = 0); + + bool IsImmediate() const; + bool IsPlainRegister() const; + bool IsShiftedRegister() const; + bool IsExtendedRegister() const; + bool IsZero() const; + + // This returns an LSL shift (<= 4) operand as an equivalent extend operand, + // which helps in the encoding of instructions that use the stack pointer. + Operand ToExtendedRegister() const; + + int64_t GetImmediate() const { + VIXL_ASSERT(IsImmediate()); + return immediate_; + } + VIXL_DEPRECATED("GetImmediate", int64_t immediate() const) { + return GetImmediate(); + } + + int64_t GetEquivalentImmediate() const { + return IsZero() ? 0 : GetImmediate(); + } + + Register GetRegister() const { + VIXL_ASSERT(IsShiftedRegister() || IsExtendedRegister()); + return reg_; + } + VIXL_DEPRECATED("GetRegister", Register reg() const) { return GetRegister(); } + Register GetBaseRegister() const { return GetRegister(); } + + Shift GetShift() const { + VIXL_ASSERT(IsShiftedRegister()); + return shift_; + } + VIXL_DEPRECATED("GetShift", Shift shift() const) { return GetShift(); } + + Extend GetExtend() const { + VIXL_ASSERT(IsExtendedRegister()); + return extend_; + } + VIXL_DEPRECATED("GetExtend", Extend extend() const) { return GetExtend(); } + + unsigned GetShiftAmount() const { + VIXL_ASSERT(IsShiftedRegister() || IsExtendedRegister()); + return shift_amount_; + } + VIXL_DEPRECATED("GetShiftAmount", unsigned shift_amount() const) { + return GetShiftAmount(); + } + + private: + int64_t immediate_; + Register reg_; + Shift shift_; + Extend extend_; + unsigned shift_amount_; +}; + + +// MemOperand represents the addressing mode of a load or store instruction. +// In assembly syntax, MemOperands are normally denoted by one or more elements +// inside or around square brackets. +class MemOperand { + public: + // Creates an invalid `MemOperand`. + MemOperand(); + explicit MemOperand(Register base, + int64_t offset = 0, + AddrMode addrmode = Offset); + MemOperand(Register base, + Register regoffset, + Shift shift = LSL, + unsigned shift_amount = 0); + MemOperand(Register base, + Register regoffset, + Extend extend, + unsigned shift_amount = 0); + MemOperand(Register base, const Operand& offset, AddrMode addrmode = Offset); + + const Register& GetBaseRegister() const { return base_; } + + // If the MemOperand has a register offset, return it. (This also applies to + // pre- and post-index modes.) Otherwise, return NoReg. + const Register& GetRegisterOffset() const { return regoffset_; } + + // If the MemOperand has an immediate offset, return it. (This also applies to + // pre- and post-index modes.) Otherwise, return 0. + int64_t GetOffset() const { return offset_; } + + AddrMode GetAddrMode() const { return addrmode_; } + Shift GetShift() const { return shift_; } + Extend GetExtend() const { return extend_; } + + unsigned GetShiftAmount() const { + // Extend modes can also encode a shift for some instructions. + VIXL_ASSERT((GetShift() != NO_SHIFT) || (GetExtend() != NO_EXTEND)); + return shift_amount_; + } + + // True for MemOperands which represent something like [x0]. + // Currently, this will also return true for [x0, #0], because MemOperand has + // no way to distinguish the two. + bool IsPlainRegister() const; + + // True for MemOperands which represent something like [x0], or for compound + // MemOperands which are functionally equivalent, such as [x0, #0], [x0, xzr] + // or [x0, wzr, UXTW #3]. + bool IsEquivalentToPlainRegister() const; + + // True for immediate-offset (but not indexed) MemOperands. + bool IsImmediateOffset() const; + // True for register-offset (but not indexed) MemOperands. + bool IsRegisterOffset() const; + + bool IsPreIndex() const; + bool IsPostIndex() const; + + void AddOffset(int64_t offset); + + bool IsValid() const { + return base_.IsValid() && + ((addrmode_ == Offset) || (addrmode_ == PreIndex) || + (addrmode_ == PostIndex)) && + ((shift_ == NO_SHIFT) || (extend_ == NO_EXTEND)) && + ((offset_ == 0) || !regoffset_.IsValid()); + } + + bool Equals(const MemOperand& other) const { + return base_.Is(other.base_) && regoffset_.Is(other.regoffset_) && + (offset_ == other.offset_) && (addrmode_ == other.addrmode_) && + (shift_ == other.shift_) && (extend_ == other.extend_) && + (shift_amount_ == other.shift_amount_); + } + + private: + Register base_; + Register regoffset_; + int64_t offset_; + AddrMode addrmode_; + Shift shift_; + Extend extend_; + unsigned shift_amount_; +}; + +// SVE supports memory operands which don't make sense to the core ISA, such as +// scatter-gather forms, in which either the base or offset registers are +// vectors. This class exists to avoid complicating core-ISA code with +// SVE-specific behaviour. +// +// Note that SVE does not support any pre- or post-index modes. +class SVEMemOperand { + public: + // "vector-plus-immediate", like [z0.s, #21] + explicit SVEMemOperand(ZRegister base, uint64_t offset = 0) + : base_(base), + regoffset_(NoReg), + offset_(RawbitsToInt64(offset)), + mod_(NO_SVE_OFFSET_MODIFIER), + shift_amount_(0) { + VIXL_ASSERT(IsVectorPlusImmediate()); + VIXL_ASSERT(IsValid()); + } + + // "scalar-plus-immediate", like [x0], [x0, #42] or [x0, #42, MUL_VL] + // The only supported modifiers are NO_SVE_OFFSET_MODIFIER or SVE_MUL_VL. + // + // Note that VIXL cannot currently distinguish between `SVEMemOperand(x0)` and + // `SVEMemOperand(x0, 0)`. This is only significant in scalar-plus-scalar + // instructions where xm defaults to xzr. However, users should not rely on + // `SVEMemOperand(x0, 0)` being accepted in such cases. + explicit SVEMemOperand(Register base, + uint64_t offset = 0, + SVEOffsetModifier mod = NO_SVE_OFFSET_MODIFIER) + : base_(base), + regoffset_(NoReg), + offset_(RawbitsToInt64(offset)), + mod_(mod), + shift_amount_(0) { + VIXL_ASSERT(IsScalarPlusImmediate()); + VIXL_ASSERT(IsValid()); + } + + // "scalar-plus-scalar", like [x0, x1] + // "scalar-plus-vector", like [x0, z1.d] + SVEMemOperand(Register base, CPURegister offset) + : base_(base), + regoffset_(offset), + offset_(0), + mod_(NO_SVE_OFFSET_MODIFIER), + shift_amount_(0) { + VIXL_ASSERT(IsScalarPlusScalar() || IsScalarPlusVector()); + if (offset.IsZero()) VIXL_ASSERT(IsEquivalentToScalar()); + VIXL_ASSERT(IsValid()); + } + + // "scalar-plus-vector", like [x0, z1.d, UXTW] + // The type of `mod` can be any `SVEOffsetModifier` (other than LSL), or a + // corresponding `Extend` value. + template + SVEMemOperand(Register base, ZRegister offset, M mod) + : base_(base), + regoffset_(offset), + offset_(0), + mod_(GetSVEOffsetModifierFor(mod)), + shift_amount_(0) { + VIXL_ASSERT(mod_ != SVE_LSL); // LSL requires an explicit shift amount. + VIXL_ASSERT(IsScalarPlusVector()); + VIXL_ASSERT(IsValid()); + } + + // "scalar-plus-scalar", like [x0, x1, LSL #1] + // "scalar-plus-vector", like [x0, z1.d, LSL #2] + // The type of `mod` can be any `SVEOffsetModifier`, or a corresponding + // `Shift` or `Extend` value. + template + SVEMemOperand(Register base, CPURegister offset, M mod, unsigned shift_amount) + : base_(base), + regoffset_(offset), + offset_(0), + mod_(GetSVEOffsetModifierFor(mod)), + shift_amount_(shift_amount) { + VIXL_ASSERT(IsValid()); + } + + // "vector-plus-vector", like [z0.d, z1.d, UXTW] + template + SVEMemOperand(ZRegister base, + ZRegister offset, + M mod = NO_SVE_OFFSET_MODIFIER, + unsigned shift_amount = 0) + : base_(base), + regoffset_(offset), + offset_(0), + mod_(GetSVEOffsetModifierFor(mod)), + shift_amount_(shift_amount) { + VIXL_ASSERT(IsValid()); + VIXL_ASSERT(IsVectorPlusVector()); + } + + // True for SVEMemOperands which represent something like [x0]. + // This will also return true for [x0, #0], because there is no way + // to distinguish the two. + bool IsPlainScalar() const { + return IsScalarPlusImmediate() && (offset_ == 0); + } + + // True for SVEMemOperands which represent something like [x0], or for + // compound SVEMemOperands which are functionally equivalent, such as + // [x0, #0], [x0, xzr] or [x0, wzr, UXTW #3]. + bool IsEquivalentToScalar() const; + + // True for SVEMemOperands like [x0], [x0, #0], false for [x0, xzr] and + // similar. + bool IsPlainRegister() const; + + bool IsScalarPlusImmediate() const { + return base_.IsX() && regoffset_.IsNone() && + ((mod_ == NO_SVE_OFFSET_MODIFIER) || IsMulVl()); + } + + bool IsScalarPlusScalar() const { + // SVE offers no extend modes for scalar-plus-scalar, so both registers must + // be X registers. + return base_.IsX() && regoffset_.IsX() && + ((mod_ == NO_SVE_OFFSET_MODIFIER) || (mod_ == SVE_LSL)); + } + + bool IsScalarPlusVector() const { + // The modifier can be LSL or an an extend mode (UXTW or SXTW) here. Unlike + // in the core ISA, these extend modes do not imply an S-sized lane, so the + // modifier is independent from the lane size. The architecture describes + // [US]XTW with a D-sized lane as an "unpacked" offset. + return base_.IsX() && regoffset_.IsZRegister() && + (regoffset_.IsLaneSizeS() || regoffset_.IsLaneSizeD()) && !IsMulVl(); + } + + bool IsVectorPlusImmediate() const { + return base_.IsZRegister() && + (base_.IsLaneSizeS() || base_.IsLaneSizeD()) && + regoffset_.IsNone() && (mod_ == NO_SVE_OFFSET_MODIFIER); + } + + bool IsVectorPlusVector() const { + return base_.IsZRegister() && regoffset_.IsZRegister() && (offset_ == 0) && + AreSameFormat(base_, regoffset_) && + (base_.IsLaneSizeS() || base_.IsLaneSizeD()); + } + + bool IsContiguous() const { return !IsScatterGather(); } + bool IsScatterGather() const { + return base_.IsZRegister() || regoffset_.IsZRegister(); + } + + // TODO: If necessary, add helpers like `HasScalarBase()`. + + Register GetScalarBase() const { + VIXL_ASSERT(base_.IsX()); + return Register(base_); + } + + ZRegister GetVectorBase() const { + VIXL_ASSERT(base_.IsZRegister()); + VIXL_ASSERT(base_.HasLaneSize()); + return ZRegister(base_); + } + + Register GetScalarOffset() const { + VIXL_ASSERT(regoffset_.IsRegister()); + return Register(regoffset_); + } + + ZRegister GetVectorOffset() const { + VIXL_ASSERT(regoffset_.IsZRegister()); + VIXL_ASSERT(regoffset_.HasLaneSize()); + return ZRegister(regoffset_); + } + + int64_t GetImmediateOffset() const { + VIXL_ASSERT(regoffset_.IsNone()); + return offset_; + } + + SVEOffsetModifier GetOffsetModifier() const { return mod_; } + unsigned GetShiftAmount() const { return shift_amount_; } + + bool IsEquivalentToLSL(unsigned amount) const { + if (shift_amount_ != amount) return false; + if (amount == 0) { + // No-shift is equivalent to "LSL #0". + return ((mod_ == SVE_LSL) || (mod_ == NO_SVE_OFFSET_MODIFIER)); + } + return mod_ == SVE_LSL; + } + + bool IsMulVl() const { return mod_ == SVE_MUL_VL; } + + bool IsValid() const; + + private: + // Allow standard `Shift` and `Extend` arguments to be used. + SVEOffsetModifier GetSVEOffsetModifierFor(Shift shift) { + if (shift == LSL) return SVE_LSL; + if (shift == NO_SHIFT) return NO_SVE_OFFSET_MODIFIER; + // SVE does not accept any other shift. + VIXL_UNIMPLEMENTED(); + return NO_SVE_OFFSET_MODIFIER; + } + + SVEOffsetModifier GetSVEOffsetModifierFor(Extend extend = NO_EXTEND) { + if (extend == UXTW) return SVE_UXTW; + if (extend == SXTW) return SVE_SXTW; + if (extend == NO_EXTEND) return NO_SVE_OFFSET_MODIFIER; + // SVE does not accept any other extend mode. + VIXL_UNIMPLEMENTED(); + return NO_SVE_OFFSET_MODIFIER; + } + + SVEOffsetModifier GetSVEOffsetModifierFor(SVEOffsetModifier mod) { + return mod; + } + + CPURegister base_; + CPURegister regoffset_; + int64_t offset_; + SVEOffsetModifier mod_; + unsigned shift_amount_; +}; + +// Represent a signed or unsigned integer operand. +// +// This is designed to make instructions which naturally accept a _signed_ +// immediate easier to implement and use, when we also want users to be able to +// specify raw-bits values (such as with hexadecimal constants). The advantage +// of this class over a simple uint64_t (with implicit C++ sign-extension) is +// that this class can strictly check the range of allowed values. With a simple +// uint64_t, it is impossible to distinguish -1 from UINT64_MAX. +// +// For example, these instructions are equivalent: +// +// __ Insr(z0.VnB(), -1); +// __ Insr(z0.VnB(), 0xff); +// +// ... as are these: +// +// __ Insr(z0.VnD(), -1); +// __ Insr(z0.VnD(), 0xffffffffffffffff); +// +// ... but this is invalid: +// +// __ Insr(z0.VnB(), 0xffffffffffffffff); // Too big for B-sized lanes. +class IntegerOperand { + public: +#define VIXL_INT_TYPES(V) \ + V(char) V(short) V(int) V(long) V(long long) // NOLINT(runtime/int) +#define VIXL_DECL_INT_OVERLOADS(T) \ + /* These are allowed to be implicit constructors because this is a */ \ + /* wrapper class that doesn't normally perform any type conversion. */ \ + IntegerOperand(signed T immediate) /* NOLINT(runtime/explicit) */ \ + : raw_bits_(immediate), /* Allow implicit sign-extension. */ \ + is_negative_(immediate < 0) {} \ + IntegerOperand(unsigned T immediate) /* NOLINT(runtime/explicit) */ \ + : raw_bits_(immediate), is_negative_(false) {} + VIXL_INT_TYPES(VIXL_DECL_INT_OVERLOADS) +#undef VIXL_DECL_INT_OVERLOADS +#undef VIXL_INT_TYPES + + // TODO: `Operand` can currently only hold an int64_t, so some large, unsigned + // values will be misrepresented here. + explicit IntegerOperand(const Operand& operand) + : raw_bits_(operand.GetEquivalentImmediate()), + is_negative_(operand.GetEquivalentImmediate() < 0) {} + + bool IsIntN(unsigned n) const { + return is_negative_ ? vixl::IsIntN(n, RawbitsToInt64(raw_bits_)) + : vixl::IsIntN(n, raw_bits_); + } + bool IsUintN(unsigned n) const { + return !is_negative_ && vixl::IsUintN(n, raw_bits_); + } + + bool IsUint8() const { return IsUintN(8); } + bool IsUint16() const { return IsUintN(16); } + bool IsUint32() const { return IsUintN(32); } + bool IsUint64() const { return IsUintN(64); } + + bool IsInt8() const { return IsIntN(8); } + bool IsInt16() const { return IsIntN(16); } + bool IsInt32() const { return IsIntN(32); } + bool IsInt64() const { return IsIntN(64); } + + bool FitsInBits(unsigned n) const { + return is_negative_ ? IsIntN(n) : IsUintN(n); + } + bool FitsInLane(const CPURegister& zd) const { + return FitsInBits(zd.GetLaneSizeInBits()); + } + bool FitsInSignedLane(const CPURegister& zd) const { + return IsIntN(zd.GetLaneSizeInBits()); + } + bool FitsInUnsignedLane(const CPURegister& zd) const { + return IsUintN(zd.GetLaneSizeInBits()); + } + + // Cast a value in the range [INT_MIN, UINT_MAX] to an unsigned integer + // in the range [0, UINT_MAX] (using two's complement mapping). + uint64_t AsUintN(unsigned n) const { + VIXL_ASSERT(FitsInBits(n)); + return raw_bits_ & GetUintMask(n); + } + + uint8_t AsUint8() const { return static_cast(AsUintN(8)); } + uint16_t AsUint16() const { return static_cast(AsUintN(16)); } + uint32_t AsUint32() const { return static_cast(AsUintN(32)); } + uint64_t AsUint64() const { return AsUintN(64); } + + // Cast a value in the range [INT_MIN, UINT_MAX] to a signed integer in + // the range [INT_MIN, INT_MAX] (using two's complement mapping). + int64_t AsIntN(unsigned n) const { + VIXL_ASSERT(FitsInBits(n)); + return ExtractSignedBitfield64(n - 1, 0, raw_bits_); + } + + int8_t AsInt8() const { return static_cast(AsIntN(8)); } + int16_t AsInt16() const { return static_cast(AsIntN(16)); } + int32_t AsInt32() const { return static_cast(AsIntN(32)); } + int64_t AsInt64() const { return AsIntN(64); } + + // Several instructions encode a signed int_t, which is then (optionally) + // left-shifted and sign-extended to a Z register lane with a size which may + // be larger than N. This helper tries to find an int_t such that the + // IntegerOperand's arithmetic value is reproduced in each lane. + // + // This is the mechanism that allows `Insr(z0.VnB(), 0xff)` to be treated as + // `Insr(z0.VnB(), -1)`. + template + bool TryEncodeAsShiftedIntNForLane(const CPURegister& zd, T* imm) const { + // VIXL_STATIC_ASSERT(std::numeric_limits::digits > N); + VIXL_ASSERT(FitsInLane(zd)); + if ((raw_bits_ & GetUintMask(kShift)) != 0) return false; + + // Reverse the specified left-shift. + IntegerOperand unshifted(*this); + unshifted.ArithmeticShiftRight(kShift); + + if (unshifted.IsIntN(N)) { + // This is trivial, since sign-extension produces the same arithmetic + // value irrespective of the destination size. + *imm = static_cast(unshifted.AsIntN(N)); + return true; + } + + // Otherwise, we might be able to use the sign-extension to produce the + // desired bit pattern. We can only do this for values in the range + // [INT_MAX + 1, UINT_MAX], where the highest set bit is the sign bit. + // + // The lane size has to be adjusted to compensate for `kShift`, since the + // high bits will be dropped when the encoded value is left-shifted. + if (unshifted.IsUintN(zd.GetLaneSizeInBits() - kShift)) { + int64_t encoded = unshifted.AsIntN(zd.GetLaneSizeInBits() - kShift); + if (vixl::IsIntN(N, encoded)) { + *imm = static_cast(encoded); + return true; + } + } + return false; + } + + // As above, but `kShift` is written to the `*shift` parameter on success, so + // that it is easy to chain calls like this: + // + // if (imm.TryEncodeAsShiftedIntNForLane<8, 0>(zd, &imm8, &shift) || + // imm.TryEncodeAsShiftedIntNForLane<8, 8>(zd, &imm8, &shift)) { + // insn(zd, imm8, shift) + // } + template + bool TryEncodeAsShiftedIntNForLane(const CPURegister& zd, + T* imm, + S* shift) const { + if (TryEncodeAsShiftedIntNForLane(zd, imm)) { + *shift = kShift; + return true; + } + return false; + } + + // As above, but assume that `kShift` is 0. + template + bool TryEncodeAsIntNForLane(const CPURegister& zd, T* imm) const { + return TryEncodeAsShiftedIntNForLane(zd, imm); + } + + // As above, but for unsigned fields. This is usuaully a simple operation, but + // is provided for symmetry. + template + bool TryEncodeAsShiftedUintNForLane(const CPURegister& zd, T* imm) const { + // VIXL_STATIC_ASSERT(std::numeric_limits::digits > N); + VIXL_ASSERT(FitsInLane(zd)); + + // TODO: Should we convert -1 to 0xff here? + if (is_negative_) return false; + USE(zd); + + if ((raw_bits_ & GetUintMask(kShift)) != 0) return false; + + if (vixl::IsUintN(N, raw_bits_ >> kShift)) { + *imm = static_cast(raw_bits_ >> kShift); + return true; + } + return false; + } + + template + bool TryEncodeAsShiftedUintNForLane(const CPURegister& zd, + T* imm, + S* shift) const { + if (TryEncodeAsShiftedUintNForLane(zd, imm)) { + *shift = kShift; + return true; + } + return false; + } + + bool IsZero() const { return raw_bits_ == 0; } + bool IsNegative() const { return is_negative_; } + bool IsPositiveOrZero() const { return !is_negative_; } + + uint64_t GetMagnitude() const { + return is_negative_ ? -raw_bits_ : raw_bits_; + } + + private: + // Shift the arithmetic value right, with sign extension if is_negative_. + void ArithmeticShiftRight(int shift) { + VIXL_ASSERT((shift >= 0) && (shift < 64)); + if (shift == 0) return; + if (is_negative_) { + raw_bits_ = ExtractSignedBitfield64(63, shift, raw_bits_); + } else { + raw_bits_ >>= shift; + } + } + + uint64_t raw_bits_; + bool is_negative_; +}; + +// This an abstraction that can represent a register or memory location. The +// `MacroAssembler` provides helpers to move data between generic operands. +class GenericOperand { + public: + GenericOperand() { VIXL_ASSERT(!IsValid()); } + GenericOperand(const CPURegister& reg); // NOLINT(runtime/explicit) + GenericOperand(const MemOperand& mem_op, + size_t mem_op_size = 0); // NOLINT(runtime/explicit) + + bool IsValid() const { return cpu_register_.IsValid() != mem_op_.IsValid(); } + + bool Equals(const GenericOperand& other) const; + + bool IsCPURegister() const { + VIXL_ASSERT(IsValid()); + return cpu_register_.IsValid(); + } + + bool IsRegister() const { + return IsCPURegister() && cpu_register_.IsRegister(); + } + + bool IsVRegister() const { + return IsCPURegister() && cpu_register_.IsVRegister(); + } + + bool IsSameCPURegisterType(const GenericOperand& other) { + return IsCPURegister() && other.IsCPURegister() && + GetCPURegister().IsSameType(other.GetCPURegister()); + } + + bool IsMemOperand() const { + VIXL_ASSERT(IsValid()); + return mem_op_.IsValid(); + } + + CPURegister GetCPURegister() const { + VIXL_ASSERT(IsCPURegister()); + return cpu_register_; + } + + MemOperand GetMemOperand() const { + VIXL_ASSERT(IsMemOperand()); + return mem_op_; + } + + size_t GetMemOperandSizeInBytes() const { + VIXL_ASSERT(IsMemOperand()); + return mem_op_size_; + } + + size_t GetSizeInBytes() const { + return IsCPURegister() ? cpu_register_.GetSizeInBytes() + : GetMemOperandSizeInBytes(); + } + + size_t GetSizeInBits() const { return GetSizeInBytes() * kBitsPerByte; } + + private: + CPURegister cpu_register_; + MemOperand mem_op_; + // The size of the memory region pointed to, in bytes. + // We only support sizes up to X/D register sizes. + size_t mem_op_size_; +}; +} +} // namespace vixl::aarch64 + +#endif // VIXL_AARCH64_OPERANDS_AARCH64_H_ diff --git a/src/coreclr/jit/vixl/aarch64/registers-aarch64.cc b/src/coreclr/jit/vixl/aarch64/registers-aarch64.cc new file mode 100644 index 00000000000000..f363892aff68cc --- /dev/null +++ b/src/coreclr/jit/vixl/aarch64/registers-aarch64.cc @@ -0,0 +1,327 @@ +// Copyright 2019, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include +#include + +#include "registers-aarch64.h" + +namespace vixl { +namespace aarch64 { + +std::string CPURegister::GetArchitecturalName() const { + // std::ostringstream name; + // if (IsZRegister()) { + // name << 'z' << GetCode(); + // if (HasLaneSize()) { + // name << '.' << GetLaneSizeSymbol(); + // } + // } else if (IsPRegister()) { + // name << 'p' << GetCode(); + // if (HasLaneSize()) { + // name << '.' << GetLaneSizeSymbol(); + // } + // switch (qualifiers_) { + // case kNoQualifiers: + // break; + // case kMerging: + // name << "/m"; + // break; + // case kZeroing: + // name << "/z"; + // break; + // } + // } else { + // VIXL_UNIMPLEMENTED(); + // } + // return name.str(); + return "TODO"; +} + +unsigned CPURegister::GetMaxCodeFor(CPURegister::RegisterBank bank) { + switch (bank) { + case kNoRegisterBank: + return 0; + case kRRegisterBank: + return Register::GetMaxCode(); + case kVRegisterBank: +#ifdef VIXL_HAS_CONSTEXPR + VIXL_STATIC_ASSERT(VRegister::GetMaxCode() == ZRegister::GetMaxCode()); +#else + VIXL_ASSERT(VRegister::GetMaxCode() == ZRegister::GetMaxCode()); +#endif + return VRegister::GetMaxCode(); + case kPRegisterBank: + return PRegister::GetMaxCode(); + } + VIXL_UNREACHABLE(); + return 0; +} + +bool CPURegister::IsValidRegister() const { + return ((code_ < kNumberOfRegisters) || (code_ == kSPRegInternalCode)) && + (bank_ == kRRegisterBank) && + ((size_ == kEncodedWRegSize) || (size_ == kEncodedXRegSize)) && + (qualifiers_ == kNoQualifiers) && (lane_size_ == size_); +} + +bool CPURegister::IsValidVRegister() const { + VIXL_STATIC_ASSERT(kEncodedBRegSize < kEncodedQRegSize); + return (code_ < kNumberOfVRegisters) && (bank_ == kVRegisterBank) && + ((size_ >= kEncodedBRegSize) && (size_ <= kEncodedQRegSize)) && + (qualifiers_ == kNoQualifiers) && + (lane_size_ != kEncodedUnknownSize) && (lane_size_ <= size_); +} + +bool CPURegister::IsValidFPRegister() const { + return IsValidVRegister() && IsFPRegister(); +} + +bool CPURegister::IsValidZRegister() const { + VIXL_STATIC_ASSERT(kEncodedBRegSize < kEncodedQRegSize); + // Z registers are valid with or without a lane size, so we don't need to + // check lane_size_. + return (code_ < kNumberOfZRegisters) && (bank_ == kVRegisterBank) && + (size_ == kEncodedUnknownSize) && (qualifiers_ == kNoQualifiers); +} + +bool CPURegister::IsValidPRegister() const { + VIXL_STATIC_ASSERT(kEncodedBRegSize < kEncodedQRegSize); + // P registers are valid with or without a lane size, so we don't need to + // check lane_size_. + return (code_ < kNumberOfPRegisters) && (bank_ == kPRegisterBank) && + (size_ == kEncodedUnknownSize) && + ((qualifiers_ == kNoQualifiers) || (qualifiers_ == kMerging) || + (qualifiers_ == kZeroing)); +} + +bool CPURegister::IsValid() const { + return IsValidRegister() || IsValidVRegister() || IsValidZRegister() || + IsValidPRegister(); +} + +// Most coersions simply invoke the necessary constructor. + +Register CPURegister::Wreg() const { + VIXL_ASSERT(GetBank() == kRRegisterBank); + return WRegister(GetCode()); + } + +#define VIXL_CPUREG_COERCION_LIST(U) \ + U(Register, X, R) \ + U(VRegister, B, V) \ + U(VRegister, H, V) \ + U(VRegister, S, V) \ + U(VRegister, D, V) \ + U(VRegister, Q, V) \ + U(VRegister, V, V) \ + U(ZRegister, Z, V) \ + U(PRegister, P, P) +#define VIXL_DEFINE_CPUREG_COERCION(RET_TYPE, CTOR_TYPE, BANK) \ + RET_TYPE CPURegister::CTOR_TYPE() const { \ + VIXL_ASSERT(GetBank() == k##BANK##RegisterBank); \ + return CTOR_TYPE##Register(GetCode()); \ + } +VIXL_CPUREG_COERCION_LIST(VIXL_DEFINE_CPUREG_COERCION) +#undef VIXL_CPUREG_COERCION_LIST +#undef VIXL_DEFINE_CPUREG_COERCION + +// NEON lane-format coersions always return VRegisters. +#define VIXL_CPUREG_NEON_COERCION_LIST(V) \ + V(8, B) \ + V(16, B) \ + V(2, H) \ + V(4, H) \ + V(8, H) \ + V(2, S) \ + V(4, S) \ + V(1, D) \ + V(2, D) +#define VIXL_DEFINE_CPUREG_NEON_COERCION(LANES, LANE_TYPE) \ + VRegister VRegister::V##LANES##LANE_TYPE() const { \ + VIXL_ASSERT(IsVRegister()); \ + return VRegister(GetCode(), LANES * k##LANE_TYPE##RegSize, LANES); \ + } +VIXL_CPUREG_NEON_COERCION_LIST(VIXL_DEFINE_CPUREG_NEON_COERCION) +#undef VIXL_CPUREG_NEON_COERCION_LIST +#undef VIXL_DEFINE_CPUREG_NEON_COERCION + +// Semantic type coersion for sdot and udot. +// TODO: Use the qualifiers_ field to distinguish this from ::S(). +VRegister VRegister::S4B() const { + VIXL_ASSERT(IsVRegister()); + return SRegister(GetCode()); +} + +bool AreAliased(const CPURegister& reg1, + const CPURegister& reg2, + const CPURegister& reg3, + const CPURegister& reg4, + const CPURegister& reg5, + const CPURegister& reg6, + const CPURegister& reg7, + const CPURegister& reg8) { + int number_of_valid_regs = 0; + int number_of_valid_vregs = 0; + int number_of_valid_pregs = 0; + + RegList unique_regs = 0; + RegList unique_vregs = 0; + RegList unique_pregs = 0; + + const CPURegister regs[] = {reg1, reg2, reg3, reg4, reg5, reg6, reg7, reg8}; + + for (size_t i = 0; i < ArrayLength(regs); i++) { + switch (regs[i].GetBank()) { + case CPURegister::kRRegisterBank: + number_of_valid_regs++; + unique_regs |= regs[i].GetBit(); + break; + case CPURegister::kVRegisterBank: + number_of_valid_vregs++; + unique_vregs |= regs[i].GetBit(); + break; + case CPURegister::kPRegisterBank: + number_of_valid_pregs++; + unique_pregs |= regs[i].GetBit(); + break; + case CPURegister::kNoRegisterBank: + VIXL_ASSERT(regs[i].IsNone()); + break; + } + } + + int number_of_unique_regs = CountSetBits(unique_regs); + int number_of_unique_vregs = CountSetBits(unique_vregs); + int number_of_unique_pregs = CountSetBits(unique_pregs); + + VIXL_ASSERT(number_of_valid_regs >= number_of_unique_regs); + VIXL_ASSERT(number_of_valid_vregs >= number_of_unique_vregs); + VIXL_ASSERT(number_of_valid_pregs >= number_of_unique_pregs); + + return (number_of_valid_regs != number_of_unique_regs) || + (number_of_valid_vregs != number_of_unique_vregs) || + (number_of_valid_pregs != number_of_unique_pregs); +} + +bool AreSameSizeAndType(const CPURegister& reg1, + const CPURegister& reg2, + const CPURegister& reg3, + const CPURegister& reg4, + const CPURegister& reg5, + const CPURegister& reg6, + const CPURegister& reg7, + const CPURegister& reg8) { + VIXL_ASSERT(reg1.IsValid()); + bool match = true; + match &= !reg2.IsValid() || reg2.IsSameSizeAndType(reg1); + match &= !reg3.IsValid() || reg3.IsSameSizeAndType(reg1); + match &= !reg4.IsValid() || reg4.IsSameSizeAndType(reg1); + match &= !reg5.IsValid() || reg5.IsSameSizeAndType(reg1); + match &= !reg6.IsValid() || reg6.IsSameSizeAndType(reg1); + match &= !reg7.IsValid() || reg7.IsSameSizeAndType(reg1); + match &= !reg8.IsValid() || reg8.IsSameSizeAndType(reg1); + return match; +} + +bool AreEven(const CPURegister& reg1, + const CPURegister& reg2, + const CPURegister& reg3, + const CPURegister& reg4, + const CPURegister& reg5, + const CPURegister& reg6, + const CPURegister& reg7, + const CPURegister& reg8) { + VIXL_ASSERT(reg1.IsValid()); + bool even = (reg1.GetCode() % 2) == 0; + even &= !reg2.IsValid() || ((reg2.GetCode() % 2) == 0); + even &= !reg3.IsValid() || ((reg3.GetCode() % 2) == 0); + even &= !reg4.IsValid() || ((reg4.GetCode() % 2) == 0); + even &= !reg5.IsValid() || ((reg5.GetCode() % 2) == 0); + even &= !reg6.IsValid() || ((reg6.GetCode() % 2) == 0); + even &= !reg7.IsValid() || ((reg7.GetCode() % 2) == 0); + even &= !reg8.IsValid() || ((reg8.GetCode() % 2) == 0); + return even; +} + +bool AreConsecutive(const CPURegister& reg1, + const CPURegister& reg2, + const CPURegister& reg3, + const CPURegister& reg4) { + VIXL_ASSERT(reg1.IsValid()); + + if (!reg2.IsValid()) { + return true; + } else if (reg2.GetCode() != + ((reg1.GetCode() + 1) % (reg1.GetMaxCode() + 1))) { + return false; + } + + if (!reg3.IsValid()) { + return true; + } else if (reg3.GetCode() != + ((reg2.GetCode() + 1) % (reg1.GetMaxCode() + 1))) { + return false; + } + + if (!reg4.IsValid()) { + return true; + } else if (reg4.GetCode() != + ((reg3.GetCode() + 1) % (reg1.GetMaxCode() + 1))) { + return false; + } + + return true; +} + +bool AreSameFormat(const CPURegister& reg1, + const CPURegister& reg2, + const CPURegister& reg3, + const CPURegister& reg4) { + VIXL_ASSERT(reg1.IsValid()); + bool match = true; + match &= !reg2.IsValid() || reg2.IsSameFormat(reg1); + match &= !reg3.IsValid() || reg3.IsSameFormat(reg1); + match &= !reg4.IsValid() || reg4.IsSameFormat(reg1); + return match; +} + +bool AreSameLaneSize(const CPURegister& reg1, + const CPURegister& reg2, + const CPURegister& reg3, + const CPURegister& reg4) { + VIXL_ASSERT(reg1.IsValid()); + bool match = true; + match &= + !reg2.IsValid() || (reg2.GetLaneSizeInBits() == reg1.GetLaneSizeInBits()); + match &= + !reg3.IsValid() || (reg3.GetLaneSizeInBits() == reg1.GetLaneSizeInBits()); + match &= + !reg4.IsValid() || (reg4.GetLaneSizeInBits() == reg1.GetLaneSizeInBits()); + return match; +} +} +} // namespace vixl::aarch64 diff --git a/src/coreclr/jit/vixl/aarch64/registers-aarch64.h b/src/coreclr/jit/vixl/aarch64/registers-aarch64.h new file mode 100644 index 00000000000000..f8c17438193dfc --- /dev/null +++ b/src/coreclr/jit/vixl/aarch64/registers-aarch64.h @@ -0,0 +1,902 @@ +// Copyright 2019, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef VIXL_AARCH64_REGISTERS_AARCH64_H_ +#define VIXL_AARCH64_REGISTERS_AARCH64_H_ + +#include + +#include "instructions-aarch64.h" + +namespace vixl { +namespace aarch64 { + +// An integer type capable of representing a homogeneous, non-overlapping set of +// registers as a bitmask of their codes. +typedef uint64_t RegList; +static const int kRegListSizeInBits = sizeof(RegList) * 8; + +class Register; +class WRegister; +class XRegister; + +class VRegister; +class BRegister; +class HRegister; +class SRegister; +class DRegister; +class QRegister; + +class ZRegister; + +class PRegister; +class PRegisterWithLaneSize; +class PRegisterM; +class PRegisterZ; + +// A container for any single register supported by the processor. Selected +// qualifications are also supported. Basic registers can be constructed +// directly as CPURegister objects. Other variants should be constructed as one +// of the derived classes. +// +// CPURegister aims to support any getter that would also be available to more +// specialised register types. However, using the equivalent functions on the +// specialised register types can avoid run-time checks, and should therefore be +// preferred where run-time polymorphism isn't required. +// +// Type-specific modifers are typically implemented only on the derived classes. +// +// The encoding is such that CPURegister objects are cheap to pass by value. +class CPURegister { + public: + enum RegisterBank : uint8_t { + kNoRegisterBank = 0, + kRRegisterBank, + kVRegisterBank, + kPRegisterBank + }; + enum RegisterType { + kNoRegister, + kRegister, + kVRegister, + kZRegister, + kPRegister + }; + + static const unsigned kUnknownSize = 0; + + VIXL_CONSTEXPR CPURegister() + : code_(0), + bank_(kNoRegisterBank), + size_(kEncodedUnknownSize), + qualifiers_(kNoQualifiers), + lane_size_(kEncodedUnknownSize) {} + + CPURegister(int code, int size_in_bits, RegisterType type) + : code_(code), + bank_(GetBankFor(type)), + size_(EncodeSizeInBits(size_in_bits)), + qualifiers_(kNoQualifiers), + lane_size_(EncodeSizeInBits(size_in_bits)) { + VIXL_ASSERT(IsValid()); + } + + // Basic accessors. + + // TODO: Make this return 'int'. + unsigned GetCode() const { return code_; } + + RegisterBank GetBank() const { return bank_; } + + // For scalar registers, the lane size matches the register size, and is + // always known. + bool HasSize() const { return size_ != kEncodedUnknownSize; } + bool HasLaneSize() const { return lane_size_ != kEncodedUnknownSize; } + + RegList GetBit() const { + if (IsNone()) return 0; + VIXL_ASSERT(code_ < kRegListSizeInBits); + return static_cast(1) << code_; + } + + // Return the architectural name for this register. + // TODO: This is temporary. Ultimately, we should move the + // Simulator::*RegNameForCode helpers out of the simulator, and provide an + // independent way to obtain the name of a register. + std::string GetArchitecturalName() const; + + // Return the highest valid register code for this type, to allow generic + // loops to be written. This excludes kSPRegInternalCode, since it is not + // contiguous, and sp usually requires special handling anyway. + unsigned GetMaxCode() const { return GetMaxCodeFor(GetBank()); } + + // Registers without a known size report kUnknownSize. + int GetSizeInBits() const { return DecodeSizeInBits(size_); } + int GetSizeInBytes() const { return DecodeSizeInBytes(size_); } + // TODO: Make these return 'int'. + unsigned GetLaneSizeInBits() const { return DecodeSizeInBits(lane_size_); } + unsigned GetLaneSizeInBytes() const { return DecodeSizeInBytes(lane_size_); } + unsigned GetLaneSizeInBytesLog2() const { + VIXL_ASSERT(HasLaneSize()); + return DecodeSizeInBytesLog2(lane_size_); + } + + int GetLanes() const { + if (HasSize() && HasLaneSize()) { + // Take advantage of the size encoding to calculate this efficiently. + VIXL_STATIC_ASSERT(kEncodedHRegSize == (kEncodedBRegSize + 1)); + VIXL_STATIC_ASSERT(kEncodedSRegSize == (kEncodedHRegSize + 1)); + VIXL_STATIC_ASSERT(kEncodedDRegSize == (kEncodedSRegSize + 1)); + VIXL_STATIC_ASSERT(kEncodedQRegSize == (kEncodedDRegSize + 1)); + int log2_delta = static_cast(size_) - static_cast(lane_size_); + VIXL_ASSERT(log2_delta >= 0); + return 1 << log2_delta; + } + return kUnknownSize; + } + + bool Is8Bits() const { return size_ == kEncodedBRegSize; } + bool Is16Bits() const { return size_ == kEncodedHRegSize; } + bool Is32Bits() const { return size_ == kEncodedSRegSize; } + bool Is64Bits() const { return size_ == kEncodedDRegSize; } + bool Is128Bits() const { return size_ == kEncodedQRegSize; } + + bool IsLaneSizeB() const { return lane_size_ == kEncodedBRegSize; } + bool IsLaneSizeH() const { return lane_size_ == kEncodedHRegSize; } + bool IsLaneSizeS() const { return lane_size_ == kEncodedSRegSize; } + bool IsLaneSizeD() const { return lane_size_ == kEncodedDRegSize; } + bool IsLaneSizeQ() const { return lane_size_ == kEncodedQRegSize; } + + // If IsRegister(), then it is valid to convert the CPURegister to some + // Register type. + // + // If... ... then it is safe to construct ... + // r.IsRegister() -> Register(r) + // r.IsVRegister() -> VRegister(r) + // r.IsZRegister() -> ZRegister(r) + // r.IsPRegister() -> PRegister(r) + // + // r.IsPRegister() && HasLaneSize() -> PRegisterWithLaneSize(r) + // r.IsPRegister() && IsMerging() -> PRegisterM(r) + // r.IsPRegister() && IsZeroing() -> PRegisterZ(r) + bool IsRegister() const { return GetType() == kRegister; } + bool IsVRegister() const { return GetType() == kVRegister; } + bool IsZRegister() const { return GetType() == kZRegister; } + bool IsPRegister() const { return GetType() == kPRegister; } + + bool IsNone() const { return GetType() == kNoRegister; } + + // `GetType() == kNoRegister` implies IsNone(), and vice-versa. + // `GetType() == kRegister` implies IsRegister(), and vice-versa. + RegisterType GetType() const { + switch (bank_) { + case kNoRegisterBank: + return kNoRegister; + case kRRegisterBank: + return kRegister; + case kVRegisterBank: + return HasSize() ? kVRegister : kZRegister; + case kPRegisterBank: + return kPRegister; + } + VIXL_UNREACHABLE(); + return kNoRegister; + } + + // IsFPRegister() is true for scalar FP types (and therefore implies + // IsVRegister()). There is no corresponding FPRegister type. + bool IsFPRegister() const { return Is1H() || Is1S() || Is1D(); } + + // TODO: These are stricter forms of the helpers above. We should make the + // basic helpers strict, and remove these. + bool IsValidRegister() const; + bool IsValidVRegister() const; + bool IsValidFPRegister() const; + bool IsValidZRegister() const; + bool IsValidPRegister() const; + + bool IsValid() const; + bool IsValidOrNone() const { return IsNone() || IsValid(); } + + bool IsVector() const { return HasLaneSize() && (size_ != lane_size_); } + bool IsScalar() const { return HasLaneSize() && (size_ == lane_size_); } + + bool IsSameType(const CPURegister& other) const { + return GetType() == other.GetType(); + } + + bool IsSameBank(const CPURegister& other) const { + return GetBank() == other.GetBank(); + } + + // Two registers with unknown size are considered to have the same size if + // they also have the same type. For example, all Z registers have the same + // size, even though we don't know what that is. + bool IsSameSizeAndType(const CPURegister& other) const { + return IsSameType(other) && (size_ == other.size_); + } + + bool IsSameFormat(const CPURegister& other) const { + return IsSameSizeAndType(other) && (lane_size_ == other.lane_size_); + } + + // Note that NoReg aliases itself, so that 'Is' implies 'Aliases'. + bool Aliases(const CPURegister& other) const { + return IsSameBank(other) && (code_ == other.code_); + } + + bool Is(const CPURegister& other) const { + if (IsRegister() || IsVRegister()) { + // For core (W, X) and FP/NEON registers, we only consider the code, size + // and type. This is legacy behaviour. + // TODO: We should probably check every field for all registers. + return Aliases(other) && (size_ == other.size_); + } else { + // For Z and P registers, we require all fields to match exactly. + VIXL_ASSERT(IsNone() || IsZRegister() || IsPRegister()); + return (code_ == other.code_) && (bank_ == other.bank_) && + (size_ == other.size_) && (qualifiers_ == other.qualifiers_) && + (lane_size_ == other.lane_size_); + } + } + + // Conversions to specific register types. The result is a register that + // aliases the original CPURegister. That is, the original register bank + // (`GetBank()`) is checked and the code (`GetCode()`) preserved, but all + // other properties are ignored. + // + // Typical usage: + // + // if (reg.GetBank() == kVRegisterBank) { + // DRegister d = reg.D(); + // ... + // } + // + // These could all return types with compile-time guarantees (like XRegister), + // but this breaks backwards-compatibility quite severely, particularly with + // code like `cond ? reg.W() : reg.X()`, which would have indeterminate type. + +// #undef W + + // Core registers, like "w0". + Register Wreg() const; + Register X() const; + // FP/NEON registers, like "b0". + VRegister B() const; + VRegister H() const; + VRegister S() const; + VRegister D() const; + VRegister Q() const; + VRegister V() const; + // SVE registers, like "z0". + ZRegister Z() const; + PRegister P() const; + + // Utilities for kRegister types. + + bool IsZero() const { return IsRegister() && (code_ == kZeroRegCode); } + bool IsSP() const { return IsRegister() && (code_ == kSPRegInternalCode); } + bool IsW() const { return IsRegister() && Is32Bits(); } + bool IsX() const { return IsRegister() && Is64Bits(); } + + // Utilities for FP/NEON kVRegister types. + + // These helpers ensure that the size and type of the register are as + // described. They do not consider the number of lanes that make up a vector. + // So, for example, Is8B() implies IsD(), and Is1D() implies IsD, but IsD() + // does not imply Is1D() or Is8B(). + // Check the number of lanes, ie. the format of the vector, using methods such + // as Is8B(), Is1D(), etc. + bool IsB() const { return IsVRegister() && Is8Bits(); } + bool IsH() const { return IsVRegister() && Is16Bits(); } + bool IsS() const { return IsVRegister() && Is32Bits(); } + bool IsD() const { return IsVRegister() && Is64Bits(); } + bool IsQ() const { return IsVRegister() && Is128Bits(); } + + // As above, but also check that the register has exactly one lane. For + // example, reg.Is1D() implies DRegister(reg).IsValid(), but reg.IsD() does + // not. + bool Is1B() const { return IsB() && IsScalar(); } + bool Is1H() const { return IsH() && IsScalar(); } + bool Is1S() const { return IsS() && IsScalar(); } + bool Is1D() const { return IsD() && IsScalar(); } + bool Is1Q() const { return IsQ() && IsScalar(); } + + // Check the specific NEON format. + bool Is8B() const { return IsD() && IsLaneSizeB(); } + bool Is16B() const { return IsQ() && IsLaneSizeB(); } + bool Is2H() const { return IsS() && IsLaneSizeH(); } + bool Is4H() const { return IsD() && IsLaneSizeH(); } + bool Is8H() const { return IsQ() && IsLaneSizeH(); } + bool Is2S() const { return IsD() && IsLaneSizeS(); } + bool Is4S() const { return IsQ() && IsLaneSizeS(); } + bool Is2D() const { return IsQ() && IsLaneSizeD(); } + + // A semantic alias for sdot and udot (indexed and by element) instructions. + // The current CPURegister implementation cannot not tell this from Is1S(), + // but it might do later. + // TODO: Do this with the qualifiers_ field. + bool Is1S4B() const { return Is1S(); } + + // Utilities for SVE registers. + + bool IsUnqualified() const { return qualifiers_ == kNoQualifiers; } + bool IsMerging() const { return IsPRegister() && (qualifiers_ == kMerging); } + bool IsZeroing() const { return IsPRegister() && (qualifiers_ == kZeroing); } + + // SVE types have unknown sizes, but within known bounds. + + int GetMaxSizeInBytes() const { + switch (GetType()) { + case kZRegister: + return kZRegMaxSizeInBytes; + case kPRegister: + return kPRegMaxSizeInBytes; + default: + VIXL_ASSERT(HasSize()); + return GetSizeInBits(); + } + } + + int GetMinSizeInBytes() const { + switch (GetType()) { + case kZRegister: + return kZRegMinSizeInBytes; + case kPRegister: + return kPRegMinSizeInBytes; + default: + VIXL_ASSERT(HasSize()); + return GetSizeInBits(); + } + } + + int GetMaxSizeInBits() const { return GetMaxSizeInBytes() * kBitsPerByte; } + int GetMinSizeInBits() const { return GetMinSizeInBytes() * kBitsPerByte; } + + static RegisterBank GetBankFor(RegisterType type) { + switch (type) { + case kNoRegister: + return kNoRegisterBank; + case kRegister: + return kRRegisterBank; + case kVRegister: + case kZRegister: + return kVRegisterBank; + case kPRegister: + return kPRegisterBank; + } + VIXL_UNREACHABLE(); + return kNoRegisterBank; + } + + static unsigned GetMaxCodeFor(CPURegister::RegisterType type) { + return GetMaxCodeFor(GetBankFor(type)); + } + + protected: + enum EncodedSize : uint8_t { + // Ensure that kUnknownSize (and therefore kNoRegister) is encoded as zero. + kEncodedUnknownSize = 0, + + // The implementation assumes that the remaining sizes are encoded as + // `log2(size) + c`, so the following names must remain in sequence. + kEncodedBRegSize, + kEncodedHRegSize, + kEncodedSRegSize, + kEncodedDRegSize, + kEncodedQRegSize, + + kEncodedWRegSize = kEncodedSRegSize, + kEncodedXRegSize = kEncodedDRegSize + }; + VIXL_STATIC_ASSERT(kSRegSize == kWRegSize); + VIXL_STATIC_ASSERT(kDRegSize == kXRegSize); + + char GetLaneSizeSymbol() const { + switch (lane_size_) { + case kEncodedBRegSize: + return 'B'; + case kEncodedHRegSize: + return 'H'; + case kEncodedSRegSize: + return 'S'; + case kEncodedDRegSize: + return 'D'; + case kEncodedQRegSize: + return 'Q'; + case kEncodedUnknownSize: + break; + } + VIXL_UNREACHABLE(); + return '?'; + } + + static EncodedSize EncodeSizeInBits(int size_in_bits) { + switch (size_in_bits) { + case kUnknownSize: + return kEncodedUnknownSize; + case kBRegSize: + return kEncodedBRegSize; + case kHRegSize: + return kEncodedHRegSize; + case kSRegSize: + return kEncodedSRegSize; + case kDRegSize: + return kEncodedDRegSize; + case kQRegSize: + return kEncodedQRegSize; + } + VIXL_UNREACHABLE(); + return kEncodedUnknownSize; + } + + static int DecodeSizeInBytesLog2(EncodedSize encoded_size) { + switch (encoded_size) { + case kEncodedUnknownSize: + // Log2 of B-sized lane in bytes is 0, so we can't just return 0 here. + VIXL_UNREACHABLE(); + return -1; + case kEncodedBRegSize: + return kBRegSizeInBytesLog2; + case kEncodedHRegSize: + return kHRegSizeInBytesLog2; + case kEncodedSRegSize: + return kSRegSizeInBytesLog2; + case kEncodedDRegSize: + return kDRegSizeInBytesLog2; + case kEncodedQRegSize: + return kQRegSizeInBytesLog2; + } + VIXL_UNREACHABLE(); + return kUnknownSize; + } + + static int DecodeSizeInBytes(EncodedSize encoded_size) { + if (encoded_size == kEncodedUnknownSize) { + return kUnknownSize; + } + return 1 << DecodeSizeInBytesLog2(encoded_size); + } + + static int DecodeSizeInBits(EncodedSize encoded_size) { + VIXL_STATIC_ASSERT(kUnknownSize == 0); + return DecodeSizeInBytes(encoded_size) * kBitsPerByte; + } + + static unsigned GetMaxCodeFor(CPURegister::RegisterBank bank); + + enum Qualifiers : uint8_t { + kNoQualifiers = 0, + // Used by P registers. + kMerging, + kZeroing + }; + + // An unchecked constructor, for use by derived classes. + CPURegister(int code, + EncodedSize size, + RegisterBank bank, + EncodedSize lane_size, + Qualifiers qualifiers = kNoQualifiers) + : code_(code), + bank_(bank), + size_(size), + qualifiers_(qualifiers), + lane_size_(lane_size) {} + + // TODO: Check that access to these fields is reasonably efficient. + uint8_t code_; + RegisterBank bank_; + EncodedSize size_; + Qualifiers qualifiers_; + EncodedSize lane_size_; +}; +// Ensure that CPURegisters can fit in a single (64-bit) register. This is a +// proxy for being "cheap to pass by value", which is hard to check directly. +VIXL_STATIC_ASSERT(sizeof(CPURegister) <= sizeof(uint64_t)); + +// TODO: Add constexpr constructors. +#define VIXL_DECLARE_REGISTER_COMMON(NAME, REGISTER_TYPE, PARENT_TYPE) \ + VIXL_CONSTEXPR NAME() : PARENT_TYPE() {} \ + \ + explicit NAME(CPURegister other) : PARENT_TYPE(other) { \ + VIXL_ASSERT(IsValid()); \ + } \ + \ + VIXL_CONSTEXPR static unsigned GetMaxCode() { \ + return kNumberOf##REGISTER_TYPE##s - 1; \ + } + +// Any W or X register, including the zero register and the stack pointer. +class Register : public CPURegister { + public: + VIXL_DECLARE_REGISTER_COMMON(Register, Register, CPURegister) + + Register(int code, int size_in_bits) + : CPURegister(code, size_in_bits, kRegister) { + VIXL_ASSERT(IsValidRegister()); + } + + bool IsValid() const { return IsValidRegister(); } +}; + +// Any FP or NEON V register, including vector (V.) and scalar forms +// (B, H, S, D, Q). +class VRegister : public CPURegister { + public: + VIXL_DECLARE_REGISTER_COMMON(VRegister, VRegister, CPURegister) + + // For historical reasons, VRegister(0) returns v0.1Q (or equivalently, q0). + explicit VRegister(int code, int size_in_bits = kQRegSize, int lanes = 1) + : CPURegister(code, + EncodeSizeInBits(size_in_bits), + kVRegisterBank, + EncodeLaneSizeInBits(size_in_bits, lanes)) { + VIXL_ASSERT(IsValidVRegister()); + } + + VRegister(int code, VectorFormat format) + : CPURegister(code, + EncodeSizeInBits(RegisterSizeInBitsFromFormat(format)), + kVRegisterBank, + EncodeSizeInBits(LaneSizeInBitsFromFormat(format)), + kNoQualifiers) { + VIXL_ASSERT(IsValid()); + } + + VRegister V8B() const; + VRegister V16B() const; + VRegister V2H() const; + VRegister V4H() const; + VRegister V8H() const; + VRegister V2S() const; + VRegister V4S() const; + VRegister V1D() const; + VRegister V2D() const; + VRegister S4B() const; + + bool IsValid() const { return IsValidVRegister(); } + + protected: + static EncodedSize EncodeLaneSizeInBits(int size_in_bits, int lanes) { + VIXL_ASSERT(lanes >= 1); + VIXL_ASSERT((size_in_bits % lanes) == 0); + return EncodeSizeInBits(size_in_bits / lanes); + } +}; + +// Any SVE Z register, with or without a lane size specifier. +class ZRegister : public CPURegister { + public: + VIXL_DECLARE_REGISTER_COMMON(ZRegister, ZRegister, CPURegister) + + explicit ZRegister(int code, int lane_size_in_bits = kUnknownSize) + : CPURegister(code, + kEncodedUnknownSize, + kVRegisterBank, + EncodeSizeInBits(lane_size_in_bits)) { + VIXL_ASSERT(IsValid()); + } + + ZRegister(int code, VectorFormat format) + : CPURegister(code, + kEncodedUnknownSize, + kVRegisterBank, + EncodeSizeInBits(LaneSizeInBitsFromFormat(format)), + kNoQualifiers) { + VIXL_ASSERT(IsValid()); + } + + // Return a Z register with a known lane size (like "z0.B"). + ZRegister VnB() const { return ZRegister(GetCode(), kBRegSize); } + ZRegister VnH() const { return ZRegister(GetCode(), kHRegSize); } + ZRegister VnS() const { return ZRegister(GetCode(), kSRegSize); } + ZRegister VnD() const { return ZRegister(GetCode(), kDRegSize); } + ZRegister VnQ() const { return ZRegister(GetCode(), kQRegSize); } + + template + ZRegister WithLaneSize(T format) const { + return ZRegister(GetCode(), format); + } + + ZRegister WithSameLaneSizeAs(const CPURegister& other) const { + VIXL_ASSERT(other.HasLaneSize()); + return this->WithLaneSize(other.GetLaneSizeInBits()); + } + + bool IsValid() const { return IsValidZRegister(); } +}; + +// Any SVE P register, with or without a qualifier or lane size specifier. +class PRegister : public CPURegister { + public: + VIXL_DECLARE_REGISTER_COMMON(PRegister, PRegister, CPURegister) + + explicit PRegister(int code) : CPURegister(code, kUnknownSize, kPRegister) { + VIXL_ASSERT(IsValid()); + } + + bool IsValid() const { + return IsValidPRegister() && !HasLaneSize() && IsUnqualified(); + } + + // Return a P register with a known lane size (like "p0.B"). + PRegisterWithLaneSize VnB() const; + PRegisterWithLaneSize VnH() const; + PRegisterWithLaneSize VnS() const; + PRegisterWithLaneSize VnD() const; + + template + PRegisterWithLaneSize WithLaneSize(T format) const; + + PRegisterWithLaneSize WithSameLaneSizeAs(const CPURegister& other) const; + + // SVE predicates are specified (in normal assembly) with a "/z" (zeroing) or + // "/m" (merging) suffix. These methods are VIXL's equivalents. + PRegisterZ Zeroing() const; + PRegisterM Merging() const; + + protected: + // Unchecked constructors, for use by derived classes. + PRegister(int code, EncodedSize encoded_lane_size) + : CPURegister(code, + kEncodedUnknownSize, + kPRegisterBank, + encoded_lane_size, + kNoQualifiers) {} + + PRegister(int code, Qualifiers qualifiers) + : CPURegister(code, + kEncodedUnknownSize, + kPRegisterBank, + kEncodedUnknownSize, + qualifiers) {} +}; + +// Any SVE P register with a known lane size (like "p0.B"). +class PRegisterWithLaneSize : public PRegister { + public: + VIXL_DECLARE_REGISTER_COMMON(PRegisterWithLaneSize, PRegister, PRegister) + + PRegisterWithLaneSize(int code, int lane_size_in_bits) + : PRegister(code, EncodeSizeInBits(lane_size_in_bits)) { + VIXL_ASSERT(IsValid()); + } + + PRegisterWithLaneSize(int code, VectorFormat format) + : PRegister(code, EncodeSizeInBits(LaneSizeInBitsFromFormat(format))) { + VIXL_ASSERT(IsValid()); + } + + bool IsValid() const { + return IsValidPRegister() && HasLaneSize() && IsUnqualified(); + } + + // Overload lane size accessors so we can assert `HasLaneSize()`. This allows + // tools such as clang-tidy to prove that the result of GetLaneSize* is + // non-zero. + + // TODO: Make these return 'int'. + unsigned GetLaneSizeInBits() const { + VIXL_ASSERT(HasLaneSize()); + return PRegister::GetLaneSizeInBits(); + } + + unsigned GetLaneSizeInBytes() const { + VIXL_ASSERT(HasLaneSize()); + return PRegister::GetLaneSizeInBytes(); + } +}; + +// Any SVE P register with the zeroing qualifier (like "p0/z"). +class PRegisterZ : public PRegister { + public: + VIXL_DECLARE_REGISTER_COMMON(PRegisterZ, PRegister, PRegister) + + explicit PRegisterZ(int code) : PRegister(code, kZeroing) { + VIXL_ASSERT(IsValid()); + } + + bool IsValid() const { + return IsValidPRegister() && !HasLaneSize() && IsZeroing(); + } +}; + +// Any SVE P register with the merging qualifier (like "p0/m"). +class PRegisterM : public PRegister { + public: + VIXL_DECLARE_REGISTER_COMMON(PRegisterM, PRegister, PRegister) + + explicit PRegisterM(int code) : PRegister(code, kMerging) { + VIXL_ASSERT(IsValid()); + } + + bool IsValid() const { + return IsValidPRegister() && !HasLaneSize() && IsMerging(); + } +}; + +inline PRegisterWithLaneSize PRegister::VnB() const { + return PRegisterWithLaneSize(GetCode(), kBRegSize); +} +inline PRegisterWithLaneSize PRegister::VnH() const { + return PRegisterWithLaneSize(GetCode(), kHRegSize); +} +inline PRegisterWithLaneSize PRegister::VnS() const { + return PRegisterWithLaneSize(GetCode(), kSRegSize); +} +inline PRegisterWithLaneSize PRegister::VnD() const { + return PRegisterWithLaneSize(GetCode(), kDRegSize); +} + +template +inline PRegisterWithLaneSize PRegister::WithLaneSize(T format) const { + return PRegisterWithLaneSize(GetCode(), format); +} + +inline PRegisterWithLaneSize PRegister::WithSameLaneSizeAs( + const CPURegister& other) const { + VIXL_ASSERT(other.HasLaneSize()); + return this->WithLaneSize(other.GetLaneSizeInBits()); +} + +inline PRegisterZ PRegister::Zeroing() const { return PRegisterZ(GetCode()); } +inline PRegisterM PRegister::Merging() const { return PRegisterM(GetCode()); } + +#define VIXL_REGISTER_WITH_SIZE_LIST(V) \ + V(WRegister, kWRegSize, Register) \ + V(XRegister, kXRegSize, Register) \ + V(QRegister, kQRegSize, VRegister) \ + V(DRegister, kDRegSize, VRegister) \ + V(SRegister, kSRegSize, VRegister) \ + V(HRegister, kHRegSize, VRegister) \ + V(BRegister, kBRegSize, VRegister) + +#define VIXL_DEFINE_REGISTER_WITH_SIZE(NAME, SIZE, PARENT) \ + class NAME : public PARENT { \ + public: \ + VIXL_CONSTEXPR NAME() : PARENT() {} \ + explicit NAME(int code) : PARENT(code, SIZE) {} \ + \ + explicit NAME(PARENT other) : PARENT(other) { \ + VIXL_ASSERT(GetSizeInBits() == SIZE); \ + } \ + \ + PARENT As##PARENT() const { return *this; } \ + \ + VIXL_CONSTEXPR int GetSizeInBits() const { return SIZE; } \ + \ + bool IsValid() const { \ + return PARENT::IsValid() && (PARENT::GetSizeInBits() == SIZE); \ + } \ + }; + +VIXL_REGISTER_WITH_SIZE_LIST(VIXL_DEFINE_REGISTER_WITH_SIZE) + +// No*Reg is used to provide default values for unused arguments, error cases +// and so on. Note that these (and the default constructors) all compare equal +// (using the Is() method). +const Register NoReg; +const VRegister NoVReg; +const CPURegister NoCPUReg; +const ZRegister NoZReg; + +// TODO: Ideally, these would use specialised register types (like XRegister and +// so on). However, doing so throws up template overloading problems elsewhere. +#define VIXL_DEFINE_REGISTERS(N) \ + const Register w##N = WRegister(N); \ + const Register x##N = XRegister(N); \ + const VRegister b##N = BRegister(N); \ + const VRegister h##N = HRegister(N); \ + const VRegister s##N = SRegister(N); \ + const VRegister d##N = DRegister(N); \ + const VRegister q##N = QRegister(N); \ + const VRegister v##N(N); \ + const ZRegister z##N(N); +AARCH64_REGISTER_CODE_LIST(VIXL_DEFINE_REGISTERS) +#undef VIXL_DEFINE_REGISTERS + +#define VIXL_DEFINE_P_REGISTERS(N) const PRegister p##N(N); +AARCH64_P_REGISTER_CODE_LIST(VIXL_DEFINE_P_REGISTERS) +#undef VIXL_DEFINE_P_REGISTERS + +// VIXL represents 'sp' with a unique code, to tell it apart from 'xzr'. +const Register wsp = WRegister(kSPRegInternalCode); +const Register sp = XRegister(kSPRegInternalCode); + +// Standard aliases. +const Register ip0 = x16; +const Register ip1 = x17; +const Register lr = x30; +const Register xzr = x31; +const Register wzr = w31; + +// AreAliased returns true if any of the named registers overlap. Arguments +// set to NoReg are ignored. The system stack pointer may be specified. +bool AreAliased(const CPURegister& reg1, + const CPURegister& reg2, + const CPURegister& reg3 = NoReg, + const CPURegister& reg4 = NoReg, + const CPURegister& reg5 = NoReg, + const CPURegister& reg6 = NoReg, + const CPURegister& reg7 = NoReg, + const CPURegister& reg8 = NoReg); + +// AreSameSizeAndType returns true if all of the specified registers have the +// same size, and are of the same type. The system stack pointer may be +// specified. Arguments set to NoReg are ignored, as are any subsequent +// arguments. At least one argument (reg1) must be valid (not NoCPUReg). +bool AreSameSizeAndType(const CPURegister& reg1, + const CPURegister& reg2, + const CPURegister& reg3 = NoCPUReg, + const CPURegister& reg4 = NoCPUReg, + const CPURegister& reg5 = NoCPUReg, + const CPURegister& reg6 = NoCPUReg, + const CPURegister& reg7 = NoCPUReg, + const CPURegister& reg8 = NoCPUReg); + +// AreEven returns true if all of the specified registers have even register +// indices. Arguments set to NoReg are ignored, as are any subsequent +// arguments. At least one argument (reg1) must be valid (not NoCPUReg). +bool AreEven(const CPURegister& reg1, + const CPURegister& reg2, + const CPURegister& reg3 = NoReg, + const CPURegister& reg4 = NoReg, + const CPURegister& reg5 = NoReg, + const CPURegister& reg6 = NoReg, + const CPURegister& reg7 = NoReg, + const CPURegister& reg8 = NoReg); + +// AreConsecutive returns true if all of the specified registers are +// consecutive in the register file. Arguments set to NoReg are ignored, as are +// any subsequent arguments. At least one argument (reg1) must be valid +// (not NoCPUReg). +bool AreConsecutive(const CPURegister& reg1, + const CPURegister& reg2, + const CPURegister& reg3 = NoCPUReg, + const CPURegister& reg4 = NoCPUReg); + +// AreSameFormat returns true if all of the specified registers have the same +// vector format. Arguments set to NoReg are ignored, as are any subsequent +// arguments. At least one argument (reg1) must be valid (not NoVReg). +bool AreSameFormat(const CPURegister& reg1, + const CPURegister& reg2, + const CPURegister& reg3 = NoCPUReg, + const CPURegister& reg4 = NoCPUReg); + +// AreSameLaneSize returns true if all of the specified registers have the same +// element lane size, B, H, S or D. It doesn't compare the type of registers. +// Arguments set to NoReg are ignored, as are any subsequent arguments. +// At least one argument (reg1) must be valid (not NoVReg). +// TODO: Remove this, and replace its uses with AreSameFormat. +bool AreSameLaneSize(const CPURegister& reg1, + const CPURegister& reg2, + const CPURegister& reg3 = NoCPUReg, + const CPURegister& reg4 = NoCPUReg); +} +} // namespace vixl::aarch64 + +#endif // VIXL_AARCH64_REGISTERS_AARCH64_H_ diff --git a/src/coreclr/jit/vixl/aarch64/simulator-constants-aarch64.h b/src/coreclr/jit/vixl/aarch64/simulator-constants-aarch64.h new file mode 100644 index 00000000000000..e2389f117d1e8d --- /dev/null +++ b/src/coreclr/jit/vixl/aarch64/simulator-constants-aarch64.h @@ -0,0 +1,192 @@ +// Copyright 2015, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef VIXL_AARCH64_SIMULATOR_CONSTANTS_AARCH64_H_ +#define VIXL_AARCH64_SIMULATOR_CONSTANTS_AARCH64_H_ + +#include "instructions-aarch64.h" + +namespace vixl { +namespace aarch64 { + +// Debug instructions. +// +// VIXL's macro-assembler and simulator support a few pseudo instructions to +// make debugging easier. These pseudo instructions do not exist on real +// hardware. +// +// TODO: Also consider allowing these pseudo-instructions to be disabled in the +// simulator, so that users can check that the input is a valid native code. +// (This isn't possible in all cases. Printf won't work, for example.) +// +// Each debug pseudo instruction is represented by a HLT instruction. The HLT +// immediate field is used to identify the type of debug pseudo instruction. + +enum DebugHltOpcode { + kUnreachableOpcode = 0xdeb0, + kPrintfOpcode, + kTraceOpcode, + kLogOpcode, + kRuntimeCallOpcode, + kSetCPUFeaturesOpcode, + kEnableCPUFeaturesOpcode, + kDisableCPUFeaturesOpcode, + kSaveCPUFeaturesOpcode, + kRestoreCPUFeaturesOpcode, + // Aliases. + kDebugHltFirstOpcode = kUnreachableOpcode, + kDebugHltLastOpcode = kLogOpcode +}; +VIXL_DEPRECATED("DebugHltOpcode", typedef DebugHltOpcode DebugHltOpcodes); + +// Each pseudo instruction uses a custom encoding for additional arguments, as +// described below. + +// Unreachable - kUnreachableOpcode +// +// Instruction which should never be executed. This is used as a guard in parts +// of the code that should not be reachable, such as in data encoded inline in +// the instructions. + +// Printf - kPrintfOpcode +// - arg_count: The number of arguments. +// - arg_pattern: A set of PrintfArgPattern values, packed into two-bit fields. +// +// Simulate a call to printf. +// +// Floating-point and integer arguments are passed in separate sets of registers +// in AAPCS64 (even for varargs functions), so it is not possible to determine +// the type of each argument without some information about the values that were +// passed in. This information could be retrieved from the printf format string, +// but the format string is not trivial to parse so we encode the relevant +// information with the HLT instruction. +// +// Also, the following registers are populated (as if for a native Aarch64 +// call): +// x0: The format string +// x1-x7: Optional arguments, if type == CPURegister::kRegister +// d0-d7: Optional arguments, if type == CPURegister::kVRegister +const unsigned kPrintfArgCountOffset = 1 * kInstructionSize; +const unsigned kPrintfArgPatternListOffset = 2 * kInstructionSize; +const unsigned kPrintfLength = 3 * kInstructionSize; + +const unsigned kPrintfMaxArgCount = 4; + +// The argument pattern is a set of two-bit-fields, each with one of the +// following values: +enum PrintfArgPattern { + kPrintfArgW = 1, + kPrintfArgX = 2, + // There is no kPrintfArgS because floats are always converted to doubles in C + // varargs calls. + kPrintfArgD = 3 +}; +static const unsigned kPrintfArgPatternBits = 2; + +// Trace - kTraceOpcode +// - parameter: TraceParameter stored as a uint32_t +// - command: TraceCommand stored as a uint32_t +// +// Allow for trace management in the generated code. This enables or disables +// automatic tracing of the specified information for every simulated +// instruction. +const unsigned kTraceParamsOffset = 1 * kInstructionSize; +const unsigned kTraceCommandOffset = 2 * kInstructionSize; +const unsigned kTraceLength = 3 * kInstructionSize; + +// Trace parameters. +enum TraceParameters { + LOG_DISASM = 1 << 0, // Log disassembly. + LOG_REGS = 1 << 1, // Log general purpose registers. + LOG_VREGS = 1 << 2, // Log SVE, NEON and floating-point registers. + LOG_SYSREGS = 1 << 3, // Log the flags and system registers. + LOG_WRITE = 1 << 4, // Log writes to memory. + LOG_BRANCH = 1 << 5, // Log taken branches. + + LOG_NONE = 0, + LOG_STATE = LOG_REGS | LOG_VREGS | LOG_SYSREGS, + LOG_ALL = LOG_DISASM | LOG_STATE | LOG_WRITE | LOG_BRANCH +}; + +// Trace commands. +enum TraceCommand { TRACE_ENABLE = 1, TRACE_DISABLE = 2 }; + +// Log - kLogOpcode +// - parameter: TraceParameter stored as a uint32_t +// +// Print the specified information once. This mechanism is separate from Trace. +// In particular, _all_ of the specified registers are printed, rather than just +// the registers that the instruction writes. +// +// Any combination of the TraceParameters values can be used, except that +// LOG_DISASM is not supported for Log. +const unsigned kLogParamsOffset = 1 * kInstructionSize; +const unsigned kLogLength = 2 * kInstructionSize; + +// Runtime call simulation - kRuntimeCallOpcode +enum RuntimeCallType { kCallRuntime, kTailCallRuntime }; + +const unsigned kRuntimeCallWrapperOffset = 1 * kInstructionSize; +// The size of a pointer on host. +const unsigned kRuntimeCallAddressSize = sizeof(uintptr_t); +const unsigned kRuntimeCallFunctionOffset = + kRuntimeCallWrapperOffset + kRuntimeCallAddressSize; +const unsigned kRuntimeCallTypeOffset = + kRuntimeCallFunctionOffset + kRuntimeCallAddressSize; +const unsigned kRuntimeCallLength = kRuntimeCallTypeOffset + sizeof(uint32_t); + +// Enable or disable CPU features - kSetCPUFeaturesOpcode +// - kEnableCPUFeaturesOpcode +// - kDisableCPUFeaturesOpcode +// - parameter[...]: A list of `CPUFeatures::Feature`s, encoded as +// ConfigureCPUFeaturesElementType and terminated with CPUFeatures::kNone. +// - [Padding to align to kInstructionSize.] +// +// 'Set' completely overwrites the existing CPU features. +// 'Enable' and 'Disable' update the existing CPU features. +// +// These mechanisms allows users to strictly check the use of CPU features in +// different regions of code. +// +// These have no effect on the set of 'seen' features (as reported by +// CPUFeaturesAuditor::HasSeen(...)). +typedef uint8_t ConfigureCPUFeaturesElementType; +const unsigned kConfigureCPUFeaturesListOffset = 1 * kInstructionSize; + +// Save or restore CPU features - kSaveCPUFeaturesOpcode +// - kRestoreCPUFeaturesOpcode +// +// These mechanisms provide a stack-like mechanism for preserving the CPU +// features, or restoring the last-preserved features. These pseudo-instructions +// take no arguments. +// +// These have no effect on the set of 'seen' features (as reported by +// CPUFeaturesAuditor::HasSeen(...)). + +} // namespace aarch64 +} // namespace vixl + +#endif // VIXL_AARCH64_SIMULATOR_CONSTANTS_AARCH64_H_ diff --git a/src/coreclr/jit/vixl/assembler-base-vixl.h b/src/coreclr/jit/vixl/assembler-base-vixl.h new file mode 100644 index 00000000000000..ee54dcbc217933 --- /dev/null +++ b/src/coreclr/jit/vixl/assembler-base-vixl.h @@ -0,0 +1,101 @@ +// Copyright 2016, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef VIXL_ASSEMBLER_BASE_H +#define VIXL_ASSEMBLER_BASE_H + +#include "code-buffer-vixl.h" + +namespace vixl { + +class CodeBufferCheckScope; + +namespace internal { + +class AssemblerBase { + public: + AssemblerBase() : allow_assembler_(false) {} + explicit AssemblerBase(size_t capacity) + : buffer_(capacity), allow_assembler_(false) {} + AssemblerBase(byte* buffer, size_t capacity) + : buffer_(buffer, capacity), allow_assembler_(false) {} + + virtual ~AssemblerBase() {} + + // Finalize a code buffer of generated instructions. This function must be + // called before executing or copying code from the buffer. + void FinalizeCode() { GetBuffer()->SetClean(); } + + ptrdiff_t GetCursorOffset() const { return GetBuffer().GetCursorOffset(); } + + // Return the address of the cursor. + template + T GetCursorAddress() const { + VIXL_STATIC_ASSERT(sizeof(T) >= sizeof(uintptr_t)); + return GetBuffer().GetOffsetAddress(GetCursorOffset()); + } + + size_t GetSizeOfCodeGenerated() const { return GetCursorOffset(); } + + // Accessors. + CodeBuffer* GetBuffer() { return &buffer_; } + const CodeBuffer& GetBuffer() const { return buffer_; } + bool AllowAssembler() const { return allow_assembler_; } + + protected: + void SetAllowAssembler(bool allow) { allow_assembler_ = allow; } + + // CodeBufferCheckScope must be able to temporarily allow the assembler. + friend class vixl::CodeBufferCheckScope; + + // Buffer where the code is emitted. + CodeBuffer buffer_; + + private: + bool allow_assembler_; + + public: + // Deprecated public interface. + + // Return the address of an offset in the buffer. + template + VIXL_DEPRECATED("GetBuffer().GetOffsetAddress(offset)", + T GetOffsetAddress(ptrdiff_t offset) const) { + return GetBuffer().GetOffsetAddress(offset); + } + + // Return the address of the start of the buffer. + template + VIXL_DEPRECATED("GetBuffer().GetStartAddress()", + T GetStartAddress() const) { + return GetBuffer().GetOffsetAddress(0); + } +}; + +} // namespace internal +} // namespace vixl + +#endif // VIXL_ASSEMBLER_BASE_H diff --git a/src/coreclr/jit/vixl/code-buffer-vixl.cc b/src/coreclr/jit/vixl/code-buffer-vixl.cc new file mode 100644 index 00000000000000..88dd5148fd71e7 --- /dev/null +++ b/src/coreclr/jit/vixl/code-buffer-vixl.cc @@ -0,0 +1,188 @@ +// Copyright 2017, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// extern "C" { +// #include +// } + +#include "code-buffer-vixl.h" +#include "utils-vixl.h" + +#define VIXL_CODE_BUFFER_MALLOC + +namespace vixl { + + +CodeBuffer::CodeBuffer(size_t capacity) + : buffer_(NULL), + managed_(true), + cursor_(NULL), + dirty_(false), + capacity_(capacity) { + if (capacity_ == 0) { + return; + } +#ifdef VIXL_CODE_BUFFER_MALLOC + buffer_ = reinterpret_cast(malloc(capacity_)); +#elif defined(VIXL_CODE_BUFFER_MMAP) + buffer_ = reinterpret_cast(mmap(NULL, + capacity, + PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANONYMOUS, + -1, + 0)); +#else +#error Unknown code buffer allocator. +#endif + VIXL_CHECK(buffer_ != NULL); + // Aarch64 instructions must be word aligned, we assert the default allocator + // always returns word align memory. + VIXL_ASSERT(IsWordAligned(buffer_)); + + cursor_ = buffer_; +} + + +CodeBuffer::CodeBuffer(byte* buffer, size_t capacity) + : buffer_(reinterpret_cast(buffer)), + managed_(false), + cursor_(reinterpret_cast(buffer)), + dirty_(false), + capacity_(capacity) { + VIXL_ASSERT(buffer_ != NULL); +} + + +CodeBuffer::~CodeBuffer() VIXL_NEGATIVE_TESTING_ALLOW_EXCEPTION { + VIXL_ASSERT(!IsDirty()); + if (managed_) { +#ifdef VIXL_CODE_BUFFER_MALLOC + free(buffer_); +#elif defined(VIXL_CODE_BUFFER_MMAP) + munmap(buffer_, capacity_); +#else +#error Unknown code buffer allocator. +#endif + } +} + + +void CodeBuffer::SetExecutable() { +#ifdef VIXL_CODE_BUFFER_MMAP + int ret = mprotect(buffer_, capacity_, PROT_READ | PROT_EXEC); + VIXL_CHECK(ret == 0); +#else + // This requires page-aligned memory blocks, which we can only guarantee with + // mmap. + VIXL_UNIMPLEMENTED(); +#endif +} + + +void CodeBuffer::SetWritable() { +#ifdef VIXL_CODE_BUFFER_MMAP + int ret = mprotect(buffer_, capacity_, PROT_READ | PROT_WRITE); + VIXL_CHECK(ret == 0); +#else + // This requires page-aligned memory blocks, which we can only guarantee with + // mmap. + VIXL_UNIMPLEMENTED(); +#endif +} + + +void CodeBuffer::EmitString(const char* string) { + VIXL_ASSERT(HasSpaceFor(strlen(string) + 1)); + char* dst = reinterpret_cast(cursor_); + dirty_ = true; + char* null_char = stpcpy(dst, string); + cursor_ = reinterpret_cast(null_char) + 1; +} + + +void CodeBuffer::EmitData(const void* data, size_t size) { + VIXL_ASSERT(HasSpaceFor(size)); + dirty_ = true; + memcpy(cursor_, data, size); + cursor_ = cursor_ + size; +} + + +void CodeBuffer::UpdateData(size_t offset, const void* data, size_t size) { + dirty_ = true; + byte* dst = buffer_ + offset; + VIXL_ASSERT(dst + size <= cursor_); + memcpy(dst, data, size); +} + + +void CodeBuffer::Align() { + byte* end = AlignUp(cursor_, 4); + const size_t padding_size = end - cursor_; + VIXL_ASSERT(padding_size <= 4); + EmitZeroedBytes(static_cast(padding_size)); +} + +void CodeBuffer::EmitZeroedBytes(int n) { + EnsureSpaceFor(n); + dirty_ = true; + memset(cursor_, 0, n); + cursor_ += n; +} + +void CodeBuffer::Reset() { +#ifdef VIXL_DEBUG + if (managed_) { + // Fill with zeros (there is no useful value common to A32 and T32). + memset(buffer_, 0, capacity_); + } +#endif + cursor_ = buffer_; + SetClean(); +} + + +void CodeBuffer::Grow(size_t new_capacity) { + VIXL_ASSERT(managed_); + VIXL_ASSERT(new_capacity > capacity_); + ptrdiff_t cursor_offset = GetCursorOffset(); +#ifdef VIXL_CODE_BUFFER_MALLOC + buffer_ = static_cast(realloc(buffer_, new_capacity)); + VIXL_CHECK(buffer_ != NULL); +#elif defined(VIXL_CODE_BUFFER_MMAP) + buffer_ = static_cast( + mremap(buffer_, capacity_, new_capacity, MREMAP_MAYMOVE)); + VIXL_CHECK(buffer_ != MAP_FAILED); +#else +#error Unknown code buffer allocator. +#endif + + cursor_ = buffer_ + cursor_offset; + capacity_ = new_capacity; +} + + +} // namespace vixl diff --git a/src/coreclr/jit/vixl/code-buffer-vixl.h b/src/coreclr/jit/vixl/code-buffer-vixl.h new file mode 100644 index 00000000000000..9a1efd4412b395 --- /dev/null +++ b/src/coreclr/jit/vixl/code-buffer-vixl.h @@ -0,0 +1,188 @@ +// Copyright 2017, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef VIXL_CODE_BUFFER_H +#define VIXL_CODE_BUFFER_H + +#include + +#include "globals-vixl.h" +#include "utils-vixl.h" + +namespace vixl { + +class CodeBuffer { + public: + static const size_t kDefaultCapacity = 4 * KBytes; + + explicit CodeBuffer(size_t capacity = kDefaultCapacity); + CodeBuffer(byte* buffer, size_t capacity); + ~CodeBuffer() VIXL_NEGATIVE_TESTING_ALLOW_EXCEPTION; + + void Reset(); + + // Make the buffer executable or writable. These states are mutually + // exclusive. + // Note that these require page-aligned memory blocks, which we can only + // guarantee with VIXL_CODE_BUFFER_MMAP. + void SetExecutable(); + void SetWritable(); + + ptrdiff_t GetOffsetFrom(ptrdiff_t offset) const { + ptrdiff_t cursor_offset = cursor_ - buffer_; + VIXL_ASSERT((offset >= 0) && (offset <= cursor_offset)); + return cursor_offset - offset; + } + VIXL_DEPRECATED("GetOffsetFrom", + ptrdiff_t OffsetFrom(ptrdiff_t offset) const) { + return GetOffsetFrom(offset); + } + + ptrdiff_t GetCursorOffset() const { return GetOffsetFrom(0); } + VIXL_DEPRECATED("GetCursorOffset", ptrdiff_t CursorOffset() const) { + return GetCursorOffset(); + } + + void Rewind(ptrdiff_t offset) { + byte* rewound_cursor = buffer_ + offset; + VIXL_ASSERT((buffer_ <= rewound_cursor) && (rewound_cursor <= cursor_)); + cursor_ = rewound_cursor; + } + + template + T GetOffsetAddress(ptrdiff_t offset) const { + VIXL_STATIC_ASSERT(sizeof(T) >= sizeof(uintptr_t)); + VIXL_ASSERT((offset >= 0) && (offset <= (cursor_ - buffer_))); + return reinterpret_cast(buffer_ + offset); + } + + // Return the address of the start or end of the emitted code. + template + T GetStartAddress() const { + VIXL_STATIC_ASSERT(sizeof(T) >= sizeof(uintptr_t)); + return GetOffsetAddress(0); + } + template + T GetEndAddress() const { + VIXL_STATIC_ASSERT(sizeof(T) >= sizeof(uintptr_t)); + return GetOffsetAddress(GetSizeInBytes()); + } + + size_t GetRemainingBytes() const { + VIXL_ASSERT((cursor_ >= buffer_) && (cursor_ <= (buffer_ + capacity_))); + return (buffer_ + capacity_) - cursor_; + } + VIXL_DEPRECATED("GetRemainingBytes", size_t RemainingBytes() const) { + return GetRemainingBytes(); + } + + size_t GetSizeInBytes() const { + VIXL_ASSERT((cursor_ >= buffer_) && (cursor_ <= (buffer_ + capacity_))); + return cursor_ - buffer_; + } + + // A code buffer can emit: + // * 8, 16, 32 or 64-bit data: constant. + // * 16 or 32-bit data: instruction. + // * string: debug info. + void Emit8(uint8_t data) { Emit(data); } + + void Emit16(uint16_t data) { Emit(data); } + + void Emit32(uint32_t data) { Emit(data); } + + void Emit64(uint64_t data) { Emit(data); } + + void EmitString(const char* string); + + void EmitData(const void* data, size_t size); + + template + void Emit(T value) { + VIXL_ASSERT(HasSpaceFor(sizeof(value))); + dirty_ = true; + memcpy(cursor_, &value, sizeof(value)); + cursor_ += sizeof(value); + } + + void UpdateData(size_t offset, const void* data, size_t size); + + // Align to 32bit. + void Align(); + + // Ensure there is enough space for and emit 'n' zero bytes. + void EmitZeroedBytes(int n); + + bool Is16bitAligned() const { return IsAligned<2>(cursor_); } + + bool Is32bitAligned() const { return IsAligned<4>(cursor_); } + + size_t GetCapacity() const { return capacity_; } + VIXL_DEPRECATED("GetCapacity", size_t capacity() const) { + return GetCapacity(); + } + + bool IsManaged() const { return managed_; } + + void Grow(size_t new_capacity); + + bool IsDirty() const { return dirty_; } + + void SetClean() { dirty_ = false; } + + bool HasSpaceFor(size_t amount) const { + return GetRemainingBytes() >= amount; + } + + void EnsureSpaceFor(size_t amount, bool* has_grown) { + bool is_full = !HasSpaceFor(amount); + if (is_full) Grow(capacity_ * 2 + amount); + VIXL_ASSERT(has_grown != NULL); + *has_grown = is_full; + } + void EnsureSpaceFor(size_t amount) { + bool placeholder; + EnsureSpaceFor(amount, &placeholder); + } + + private: + // Backing store of the buffer. + byte* buffer_; + // If true the backing store is allocated and deallocated by the buffer. The + // backing store can then grow on demand. If false the backing store is + // provided by the user and cannot be resized internally. + bool managed_; + // Pointer to the next location to be written. + byte* cursor_; + // True if there has been any write since the buffer was created or cleaned. + bool dirty_; + // Capacity in bytes of the backing store. + size_t capacity_; +}; + +} // namespace vixl + +#endif // VIXL_CODE_BUFFER_H diff --git a/src/coreclr/jit/vixl/code-generation-scopes-vixl.h b/src/coreclr/jit/vixl/code-generation-scopes-vixl.h new file mode 100644 index 00000000000000..b7ea2d92b001c9 --- /dev/null +++ b/src/coreclr/jit/vixl/code-generation-scopes-vixl.h @@ -0,0 +1,322 @@ +// Copyright 2016, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +#ifndef VIXL_CODE_GENERATION_SCOPES_H_ +#define VIXL_CODE_GENERATION_SCOPES_H_ + + +#include "assembler-base-vixl.h" +#include "macro-assembler-interface.h" + + +namespace vixl { + +// This scope will: +// - Allow code emission from the specified `Assembler`. +// - Optionally reserve space in the `CodeBuffer` (if it is managed by VIXL). +// - Optionally, on destruction, check the size of the generated code. +// (The size can be either exact or a maximum size.) +class CodeBufferCheckScope { + public: + // Tell whether or not the scope needs to ensure the associated CodeBuffer + // has enough space for the requested size. + enum BufferSpacePolicy { + kReserveBufferSpace, + kDontReserveBufferSpace, + + // Deprecated, but kept for backward compatibility. + kCheck = kReserveBufferSpace, + kNoCheck = kDontReserveBufferSpace + }; + + // Tell whether or not the scope should assert the amount of code emitted + // within the scope is consistent with the requested amount. + enum SizePolicy { + kNoAssert, // Do not check the size of the code emitted. + kExactSize, // The code emitted must be exactly size bytes. + kMaximumSize // The code emitted must be at most size bytes. + }; + + // This constructor implicitly calls `Open` to initialise the scope + // (`assembler` must not be `NULL`), so it is ready to use immediately after + // it has been constructed. + CodeBufferCheckScope(internal::AssemblerBase* assembler, + size_t size, + BufferSpacePolicy check_policy = kReserveBufferSpace, + SizePolicy size_policy = kMaximumSize) + : assembler_(NULL), initialised_(false) { + Open(assembler, size, check_policy, size_policy); + } + + // This constructor does not implicitly initialise the scope. Instead, the + // user is required to explicitly call the `Open` function before using the + // scope. + CodeBufferCheckScope() : assembler_(NULL), initialised_(false) { + // Nothing to do. + } + + virtual ~CodeBufferCheckScope() { Close(); } + + // This function performs the actual initialisation work. + void Open(internal::AssemblerBase* assembler, + size_t size, + BufferSpacePolicy check_policy = kReserveBufferSpace, + SizePolicy size_policy = kMaximumSize) { + VIXL_ASSERT(!initialised_); + VIXL_ASSERT(assembler != NULL); + assembler_ = assembler; + if (check_policy == kReserveBufferSpace) { + assembler->GetBuffer()->EnsureSpaceFor(size); + } +#ifdef VIXL_DEBUG + limit_ = assembler_->GetSizeOfCodeGenerated() + size; + assert_policy_ = size_policy; + previous_allow_assembler_ = assembler_->AllowAssembler(); + assembler_->SetAllowAssembler(true); +#else + USE(size_policy); +#endif + initialised_ = true; + } + + // This function performs the cleaning-up work. It must succeed even if the + // scope has not been opened. It is safe to call multiple times. + void Close() { +#ifdef VIXL_DEBUG + if (!initialised_) { + return; + } + assembler_->SetAllowAssembler(previous_allow_assembler_); + switch (assert_policy_) { + case kNoAssert: + break; + case kExactSize: + VIXL_ASSERT(assembler_->GetSizeOfCodeGenerated() == limit_); + break; + case kMaximumSize: + VIXL_ASSERT(assembler_->GetSizeOfCodeGenerated() <= limit_); + break; + default: + VIXL_UNREACHABLE(); + } +#endif + initialised_ = false; + } + + protected: + internal::AssemblerBase* assembler_; + SizePolicy assert_policy_; + size_t limit_; + bool previous_allow_assembler_; + bool initialised_; +}; + + +// This scope will: +// - Do the same as `CodeBufferCheckSCope`, but: +// - If managed by VIXL, always reserve space in the `CodeBuffer`. +// - Always check the size (exact or maximum) of the generated code on +// destruction. +// - Emit pools if the specified size would push them out of range. +// - Block pools emission for the duration of the scope. +// This scope allows the `Assembler` and `MacroAssembler` to be freely and +// safely mixed for its duration. +class EmissionCheckScope : public CodeBufferCheckScope { + public: + // This constructor implicitly calls `Open` (when `masm` is not `NULL`) to + // initialise the scope, so it is ready to use immediately after it has been + // constructed. + EmissionCheckScope(MacroAssemblerInterface* masm, + size_t size, + SizePolicy size_policy = kMaximumSize) { + Open(masm, size, size_policy); + } + + // This constructor does not implicitly initialise the scope. Instead, the + // user is required to explicitly call the `Open` function before using the + // scope. + EmissionCheckScope() {} + + virtual ~EmissionCheckScope() { Close(); } + + enum PoolPolicy { + // Do not forbid pool emission inside the scope. Pools will not be emitted + // on `Open` either. + kIgnorePools, + // Force pools to be generated on `Open` if necessary and block their + // emission inside the scope. + kBlockPools, + // Deprecated, but kept for backward compatibility. + kCheckPools = kBlockPools + }; + + void Open(MacroAssemblerInterface* masm, + size_t size, + SizePolicy size_policy = kMaximumSize) { + Open(masm, size, size_policy, kBlockPools); + } + + void Close() { + if (!initialised_) { + return; + } + if (masm_ == NULL) { + // Nothing to do. + return; + } + // Perform the opposite of `Open`, which is: + // - Check the code generation limit was not exceeded. + // - Release the pools. + CodeBufferCheckScope::Close(); + if (pool_policy_ == kBlockPools) { + masm_->ReleasePools(); + } + VIXL_ASSERT(!initialised_); + } + + protected: + void Open(MacroAssemblerInterface* masm, + size_t size, + SizePolicy size_policy, + PoolPolicy pool_policy) { + if (masm == NULL) { + // Nothing to do. + // We may reach this point in a context of conditional code generation. + // See `aarch64::MacroAssembler::MoveImmediateHelper()` for an example. + return; + } + masm_ = masm; + pool_policy_ = pool_policy; + if (pool_policy_ == kBlockPools) { + // To avoid duplicating the work to check that enough space is available + // in the buffer, do not use the more generic `EnsureEmitFor()`. It is + // done below when opening `CodeBufferCheckScope`. + masm->EnsureEmitPoolsFor(size); + masm->BlockPools(); + } + // The buffer should be checked *after* we emit the pools. + CodeBufferCheckScope::Open(masm->AsAssemblerBase(), + size, + kReserveBufferSpace, + size_policy); + VIXL_ASSERT(initialised_); + } + + // This constructor should only be used from code that is *currently + // generating* the pools, to avoid an infinite loop. + EmissionCheckScope(MacroAssemblerInterface* masm, + size_t size, + SizePolicy size_policy, + PoolPolicy pool_policy) { + Open(masm, size, size_policy, pool_policy); + } + + MacroAssemblerInterface* masm_; + PoolPolicy pool_policy_; +}; + +// Use this scope when you need a one-to-one mapping between methods and +// instructions. This scope will: +// - Do the same as `EmissionCheckScope`. +// - Block access to the MacroAssemblerInterface (using run-time assertions). +class ExactAssemblyScope : public EmissionCheckScope { + public: + // This constructor implicitly calls `Open` (when `masm` is not `NULL`) to + // initialise the scope, so it is ready to use immediately after it has been + // constructed. + ExactAssemblyScope(MacroAssemblerInterface* masm, + size_t size, + SizePolicy size_policy = kExactSize) { + Open(masm, size, size_policy); + } + + // This constructor does not implicitly initialise the scope. Instead, the + // user is required to explicitly call the `Open` function before using the + // scope. + ExactAssemblyScope() {} + + virtual ~ExactAssemblyScope() { Close(); } + + void Open(MacroAssemblerInterface* masm, + size_t size, + SizePolicy size_policy = kExactSize) { + Open(masm, size, size_policy, kBlockPools); + } + + void Close() { + if (!initialised_) { + return; + } + if (masm_ == NULL) { + // Nothing to do. + return; + } +#ifdef VIXL_DEBUG + masm_->SetAllowMacroInstructions(previous_allow_macro_assembler_); +#else + USE(previous_allow_macro_assembler_); +#endif + EmissionCheckScope::Close(); + } + + protected: + // This protected constructor allows overriding the pool policy. It is + // available to allow this scope to be used in code that handles generation + // of pools. + ExactAssemblyScope(MacroAssemblerInterface* masm, + size_t size, + SizePolicy assert_policy, + PoolPolicy pool_policy) { + Open(masm, size, assert_policy, pool_policy); + } + + void Open(MacroAssemblerInterface* masm, + size_t size, + SizePolicy size_policy, + PoolPolicy pool_policy) { + VIXL_ASSERT(size_policy != kNoAssert); + if (masm == NULL) { + // Nothing to do. + return; + } + // Rely on EmissionCheckScope::Open to initialise `masm_` and + // `pool_policy_`. + EmissionCheckScope::Open(masm, size, size_policy, pool_policy); +#ifdef VIXL_DEBUG + previous_allow_macro_assembler_ = masm->AllowMacroInstructions(); + masm->SetAllowMacroInstructions(false); +#endif + } + + private: + bool previous_allow_macro_assembler_; +}; + + +} // namespace vixl + +#endif // VIXL_CODE_GENERATION_SCOPES_H_ diff --git a/src/coreclr/jit/vixl/compiler-intrinsics-vixl.cc b/src/coreclr/jit/vixl/compiler-intrinsics-vixl.cc new file mode 100644 index 00000000000000..f6234fa6bf417b --- /dev/null +++ b/src/coreclr/jit/vixl/compiler-intrinsics-vixl.cc @@ -0,0 +1,146 @@ +// Copyright 2015, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "compiler-intrinsics-vixl.h" +#include "utils-vixl.h" + +namespace vixl { + + +int CountLeadingSignBitsFallBack(int64_t value, int width) { + VIXL_ASSERT(IsPowerOf2(width) && (width <= 64)); + if (width < 64) VIXL_ASSERT(IsIntN(width, value)); + if (value >= 0) { + return CountLeadingZeros(value, width) - 1; + } else { + return CountLeadingZeros(~value, width) - 1; + } +} + + +int CountLeadingZerosFallBack(uint64_t value, int width) { + VIXL_ASSERT(IsPowerOf2(width) && (width <= 64)); + if (value == 0) { + return width; + } + int count = 0; + value = value << (64 - width); + if ((value & UINT64_C(0xffffffff00000000)) == 0) { + count += 32; + value = value << 32; + } + if ((value & UINT64_C(0xffff000000000000)) == 0) { + count += 16; + value = value << 16; + } + if ((value & UINT64_C(0xff00000000000000)) == 0) { + count += 8; + value = value << 8; + } + if ((value & UINT64_C(0xf000000000000000)) == 0) { + count += 4; + value = value << 4; + } + if ((value & UINT64_C(0xc000000000000000)) == 0) { + count += 2; + value = value << 2; + } + if ((value & UINT64_C(0x8000000000000000)) == 0) { + count += 1; + } + count += (value == 0); + return count; +} + + +int CountSetBitsFallBack(uint64_t value, int width) { + VIXL_ASSERT(IsPowerOf2(width) && (width <= 64)); + + // Mask out unused bits to ensure that they are not counted. + value &= (UINT64_C(0xffffffffffffffff) >> (64 - width)); + + // Add up the set bits. + // The algorithm works by adding pairs of bit fields together iteratively, + // where the size of each bit field doubles each time. + // An example for an 8-bit value: + // Bits: h g f e d c b a + // \ | \ | \ | \ | + // value = h+g f+e d+c b+a + // \ | \ | + // value = h+g+f+e d+c+b+a + // \ | + // value = h+g+f+e+d+c+b+a + const uint64_t kMasks[] = { + UINT64_C(0x5555555555555555), + UINT64_C(0x3333333333333333), + UINT64_C(0x0f0f0f0f0f0f0f0f), + UINT64_C(0x00ff00ff00ff00ff), + UINT64_C(0x0000ffff0000ffff), + UINT64_C(0x00000000ffffffff), + }; + + for (unsigned i = 0; i < (sizeof(kMasks) / sizeof(kMasks[0])); i++) { + int shift = 1 << i; + value = ((value >> shift) & kMasks[i]) + (value & kMasks[i]); + } + + return static_cast(value); +} + + +int CountTrailingZerosFallBack(uint64_t value, int width) { + VIXL_ASSERT(IsPowerOf2(width) && (width <= 64)); + int count = 0; + value = value << (64 - width); + if ((value & UINT64_C(0xffffffff)) == 0) { + count += 32; + value = value >> 32; + } + if ((value & 0xffff) == 0) { + count += 16; + value = value >> 16; + } + if ((value & 0xff) == 0) { + count += 8; + value = value >> 8; + } + if ((value & 0xf) == 0) { + count += 4; + value = value >> 4; + } + if ((value & 0x3) == 0) { + count += 2; + value = value >> 2; + } + if ((value & 0x1) == 0) { + count += 1; + } + count += (value == 0); + return count - (64 - width); +} + + +} // namespace vixl diff --git a/src/coreclr/jit/vixl/compiler-intrinsics-vixl.h b/src/coreclr/jit/vixl/compiler-intrinsics-vixl.h new file mode 100644 index 00000000000000..50ed3579b7f8e2 --- /dev/null +++ b/src/coreclr/jit/vixl/compiler-intrinsics-vixl.h @@ -0,0 +1,167 @@ +// Copyright 2015, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +#ifndef VIXL_COMPILER_INTRINSICS_H +#define VIXL_COMPILER_INTRINSICS_H + +#include +#include "globals-vixl.h" + +namespace vixl { + +// Helper to check whether the version of GCC used is greater than the specified +// requirement. +#define MAJOR 1000000 +#define MINOR 1000 +#if defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) +#define GCC_VERSION_OR_NEWER(major, minor, patchlevel) \ + ((__GNUC__ * (MAJOR) + __GNUC_MINOR__ * (MINOR) + __GNUC_PATCHLEVEL__) >= \ + ((major) * (MAJOR) + ((minor)) * (MINOR) + (patchlevel))) +#elif defined(__GNUC__) && defined(__GNUC_MINOR__) +#define GCC_VERSION_OR_NEWER(major, minor, patchlevel) \ + ((__GNUC__ * (MAJOR) + __GNUC_MINOR__ * (MINOR)) >= \ + ((major) * (MAJOR) + ((minor)) * (MINOR) + (patchlevel))) +#else +#define GCC_VERSION_OR_NEWER(major, minor, patchlevel) 0 +#endif + + +#if defined(__clang__) && !defined(VIXL_NO_COMPILER_BUILTINS) + +// clang-format off +#define COMPILER_HAS_BUILTIN_CLRSB (__has_builtin(__builtin_clrsb)) +#define COMPILER_HAS_BUILTIN_CLZ (__has_builtin(__builtin_clz)) +#define COMPILER_HAS_BUILTIN_CTZ (__has_builtin(__builtin_ctz)) +#define COMPILER_HAS_BUILTIN_FFS (__has_builtin(__builtin_ffs)) +#define COMPILER_HAS_BUILTIN_POPCOUNT (__has_builtin(__builtin_popcount)) +// clang-format on + +#elif defined(__GNUC__) && !defined(VIXL_NO_COMPILER_BUILTINS) +// The documentation for these builtins is available at: +// https://gcc.gnu.org/onlinedocs/gcc-$MAJOR.$MINOR.$PATCHLEVEL/gcc//Other-Builtins.html + +// clang-format off +# define COMPILER_HAS_BUILTIN_CLRSB (GCC_VERSION_OR_NEWER(4, 7, 0)) +# define COMPILER_HAS_BUILTIN_CLZ (GCC_VERSION_OR_NEWER(3, 4, 0)) +# define COMPILER_HAS_BUILTIN_CTZ (GCC_VERSION_OR_NEWER(3, 4, 0)) +# define COMPILER_HAS_BUILTIN_FFS (GCC_VERSION_OR_NEWER(3, 4, 0)) +# define COMPILER_HAS_BUILTIN_POPCOUNT (GCC_VERSION_OR_NEWER(3, 4, 0)) +// clang-format on + +#else +// One can define VIXL_NO_COMPILER_BUILTINS to force using the manually +// implemented C++ methods. + +// clang-format off +#define COMPILER_HAS_BUILTIN_BSWAP false +#define COMPILER_HAS_BUILTIN_CLRSB false +#define COMPILER_HAS_BUILTIN_CLZ false +#define COMPILER_HAS_BUILTIN_CTZ false +#define COMPILER_HAS_BUILTIN_FFS false +#define COMPILER_HAS_BUILTIN_POPCOUNT false +// clang-format on + +#endif + + +template +inline bool IsPowerOf2(V value) { + return (value != 0) && ((value & (value - 1)) == 0); +} + + +// Declaration of fallback functions. +int CountLeadingSignBitsFallBack(int64_t value, int width); +int CountLeadingZerosFallBack(uint64_t value, int width); +int CountSetBitsFallBack(uint64_t value, int width); +int CountTrailingZerosFallBack(uint64_t value, int width); + + +// Implementation of intrinsics functions. +// TODO: The implementations could be improved for sizes different from 32bit +// and 64bit: we could mask the values and call the appropriate builtin. + +// Return the number of leading bits that match the topmost (sign) bit, +// excluding the topmost bit itself. +template +inline int CountLeadingSignBits(V value, int width = (sizeof(V) * 8)) { + VIXL_ASSERT(IsPowerOf2(width) && (width <= 64)); +#if COMPILER_HAS_BUILTIN_CLRSB + VIXL_ASSERT((LLONG_MIN <= value) && (value <= LLONG_MAX)); + int ll_width = sizeof(long long) * kBitsPerByte; // NOLINT(runtime/int) + int result = __builtin_clrsbll(value) - (ll_width - width); + // Check that the value fits in the specified width. + VIXL_ASSERT(result >= 0); + return result; +#else + VIXL_ASSERT((INT64_MIN <= value) && (value <= INT64_MAX)); + return CountLeadingSignBitsFallBack(value, width); +#endif +} + + +template +inline int CountLeadingZeros(V value, int width = (sizeof(V) * 8)) { +#if COMPILER_HAS_BUILTIN_CLZ + if (width == 32) { + return (value == 0) ? 32 : __builtin_clz(static_cast(value)); + } else if (width == 64) { + return (value == 0) ? 64 : __builtin_clzll(value); + } +#endif + return CountLeadingZerosFallBack(value, width); +} + + +template +inline int CountSetBits(V value, int width = (sizeof(V) * 8)) { +#if COMPILER_HAS_BUILTIN_POPCOUNT + if (width == 32) { + return __builtin_popcount(static_cast(value)); + } else if (width == 64) { + return __builtin_popcountll(value); + } +#endif + return CountSetBitsFallBack(value, width); +} + + +template +inline int CountTrailingZeros(V value, int width = (sizeof(V) * 8)) { +#if COMPILER_HAS_BUILTIN_CTZ + if (width == 32) { + return (value == 0) ? 32 : __builtin_ctz(static_cast(value)); + } else if (width == 64) { + return (value == 0) ? 64 : __builtin_ctzll(value); + } +#endif + return CountTrailingZerosFallBack(value, width); +} + +} // namespace vixl + +#endif // VIXL_COMPILER_INTRINSICS_H diff --git a/src/coreclr/jit/vixl/cpu-features.cc b/src/coreclr/jit/vixl/cpu-features.cc new file mode 100644 index 00000000000000..80fa036bc0d222 --- /dev/null +++ b/src/coreclr/jit/vixl/cpu-features.cc @@ -0,0 +1,162 @@ +// Copyright 2018, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include + +#include "cpu-features.h" +#include "globals-vixl.h" +#include "utils-vixl.h" + +#if defined(__aarch64__) && defined(VIXL_INCLUDE_TARGET_AARCH64) +#include "aarch64/cpu-aarch64.h" +#define VIXL_USE_AARCH64_CPU_HELPERS +#endif + +namespace vixl { + +CPUFeatures CPUFeatures::All() { + CPUFeatures all; + // all.features_.set(); + return all; +} + +CPUFeatures CPUFeatures::InferFromIDRegisters() { + // This function assumes that kIDRegisterEmulation is available. + CPUFeatures features(CPUFeatures::kIDRegisterEmulation); +#ifdef VIXL_USE_AARCH64_CPU_HELPERS + // Note that the Linux kernel filters these values during emulation, so the + // results may not exactly match the expected hardware support. + features.Combine(aarch64::CPU::InferCPUFeaturesFromIDRegisters()); +#endif + return features; +} + +CPUFeatures CPUFeatures::InferFromOS(QueryIDRegistersOption option) { +#ifdef VIXL_USE_AARCH64_CPU_HELPERS + return aarch64::CPU::InferCPUFeaturesFromOS(option); +#else + USE(option); + return CPUFeatures(); +#endif +} + +void CPUFeatures::Combine(const CPUFeatures& other) { + // features_ |= other.features_; +} + +void CPUFeatures::Combine(Feature feature) { + // if (feature != CPUFeatures::kNone) features_.set(feature); +} + +void CPUFeatures::Remove(const CPUFeatures& other) { + // features_ &= ~other.features_; +} + +void CPUFeatures::Remove(Feature feature) { + // if (feature != CPUFeatures::kNone) features_.reset(feature); +} + +bool CPUFeatures::Has(const CPUFeatures& other) const { + return true; + (features_ & other.features_) == other.features_; +} + +bool CPUFeatures::Has(Feature feature) const { + return true; + // (feature == CPUFeatures::kNone) || features_[feature]; +} + +// size_t CPUFeatures::Count() const { return features_.count(); } + +// std::ostream& operator<<(std::ostream& os, CPUFeatures::Feature feature) { +// // clang-format off +// switch (feature) { +// #define VIXL_FORMAT_FEATURE(SYMBOL, NAME, CPUINFO) \ +// case CPUFeatures::SYMBOL: \ +// return os << NAME; +// VIXL_CPU_FEATURE_LIST(VIXL_FORMAT_FEATURE) +// #undef VIXL_FORMAT_FEATURE +// case CPUFeatures::kNone: +// return os << "none"; +// case CPUFeatures::kNumberOfFeatures: +// VIXL_UNREACHABLE(); +// } +// // clang-format on +// VIXL_UNREACHABLE(); +// return os; +// } + +CPUFeatures::const_iterator CPUFeatures::begin() const { + // For iterators in general, it's undefined to increment `end()`, but here we + // control the implementation and it is safe to do this. + return ++end(); +} + +CPUFeatures::const_iterator CPUFeatures::end() const { + return const_iterator(this, kNone); +} + +// std::ostream& operator<<(std::ostream& os, const CPUFeatures& features) { +// bool need_separator = false; +// for (CPUFeatures::Feature feature : features) { +// if (need_separator) os << ", "; +// need_separator = true; +// os << feature; +// } +// return os; +// } + +bool CPUFeaturesConstIterator::operator==( + const CPUFeaturesConstIterator& other) const { + VIXL_ASSERT(IsValid()); + return true; + //(cpu_features_ == other.cpu_features_) && (feature_ == other.feature_); +} + +CPUFeaturesConstIterator& CPUFeaturesConstIterator::operator++() { // Prefix + VIXL_ASSERT(IsValid()); + // do { + // // Find the next feature. The order is unspecified. + // feature_ = static_cast(feature_ + 1); + // if (feature_ == CPUFeatures::kNumberOfFeatures) { + // feature_ = CPUFeatures::kNone; + // VIXL_STATIC_ASSERT(CPUFeatures::kNone == -1); + // } + // VIXL_ASSERT(CPUFeatures::kNone <= feature_); + // VIXL_ASSERT(feature_ < CPUFeatures::kNumberOfFeatures); + // // cpu_features_->Has(kNone) is always true, so this will terminate even if + // // the features list is empty. + // } while (!cpu_features_->Has(feature_)); + return *this; +} + +CPUFeaturesConstIterator CPUFeaturesConstIterator::operator++(int) { // Postfix + CPUFeaturesConstIterator result = *this; + ++(*this); + return result; +} + +} // namespace vixl diff --git a/src/coreclr/jit/vixl/cpu-features.h b/src/coreclr/jit/vixl/cpu-features.h new file mode 100644 index 00000000000000..2b7516b8fc8a61 --- /dev/null +++ b/src/coreclr/jit/vixl/cpu-features.h @@ -0,0 +1,479 @@ +// Copyright 2018, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef VIXL_CPU_FEATURES_H +#define VIXL_CPU_FEATURES_H + +// #include +// #include + +#include "globals-vixl.h" + +namespace vixl { + + +// VIXL aims to handle and detect all architectural features that are likely to +// influence code-generation decisions at EL0 (user-space). +// +// - There may be multiple VIXL feature flags for a given architectural +// extension. This occurs where the extension allow components to be +// implemented independently, or where kernel support is needed, and is likely +// to be fragmented. +// +// For example, Pointer Authentication (kPAuth*) has a separate feature flag +// for access to PACGA, and to indicate that the QARMA algorithm is +// implemented. +// +// - Conversely, some extensions have configuration options that do not affect +// EL0, so these are presented as a single VIXL feature. +// +// For example, the RAS extension (kRAS) has several variants, but the only +// feature relevant to VIXL is the addition of the ESB instruction so we only +// need a single flag. +// +// - VIXL offers separate flags for separate features even if they're +// architecturally linked. +// +// For example, the architecture requires kFPHalf and kNEONHalf to be equal, +// but they have separate hardware ID register fields so VIXL presents them as +// separate features. +// +// - VIXL can detect every feature for which it can generate code. +// +// - VIXL can detect some features for which it cannot generate code. +// +// The CPUFeatures::Feature enum — derived from the macro list below — is +// frequently extended. New features may be added to the list at any point, and +// no assumptions should be made about the numerical values assigned to each +// enum constant. The symbolic names can be considered to be stable. +// +// The debug descriptions are used only for debug output. The 'cpuinfo' strings +// are informative; VIXL does not use /proc/cpuinfo for feature detection. + +// clang-format off +#define VIXL_CPU_FEATURE_LIST(V) \ + /* If set, the OS traps and emulates MRS accesses to relevant (EL1) ID_* */ \ + /* registers, so that the detailed feature registers can be read */ \ + /* directly. */ \ + \ + /* Constant name Debug description Linux 'cpuinfo' string. */ \ + V(kIDRegisterEmulation, "ID register emulation", "cpuid") \ + \ + V(kFP, "FP", "fp") \ + V(kNEON, "NEON", "asimd") \ + V(kCRC32, "CRC32", "crc32") \ + V(kDGH, "DGH", "dgh") \ + /* Speculation control features. */ \ + V(kCSV2, "CSV2", NULL) \ + V(kSCXTNUM, "SCXTNUM", NULL) \ + V(kCSV3, "CSV3", NULL) \ + V(kSB, "SB", "sb") \ + V(kSPECRES, "SPECRES", NULL) \ + V(kSSBS, "SSBS", NULL) \ + V(kSSBSControl, "SSBS (PSTATE control)", "ssbs") \ + /* Cryptographic support instructions. */ \ + V(kAES, "AES", "aes") \ + V(kSHA1, "SHA1", "sha1") \ + V(kSHA2, "SHA2", "sha2") \ + /* A form of PMULL{2} with a 128-bit (1Q) result. */ \ + V(kPmull1Q, "Pmull1Q", "pmull") \ + /* Atomic operations on memory: CAS, LDADD, STADD, SWP, etc. */ \ + V(kAtomics, "Atomics", "atomics") \ + /* Limited ordering regions: LDLAR, STLLR and their variants. */ \ + V(kLORegions, "LORegions", NULL) \ + /* Rounding doubling multiply add/subtract: SQRDMLAH and SQRDMLSH. */ \ + V(kRDM, "RDM", "asimdrdm") \ + /* Scalable Vector Extension. */ \ + V(kSVE, "SVE", "sve") \ + V(kSVEF64MM, "SVE F64MM", "svef64mm") \ + V(kSVEF32MM, "SVE F32MM", "svef32mm") \ + V(kSVEI8MM, "SVE I8MM", "svei8imm") \ + V(kSVEBF16, "SVE BFloat16", "svebf16") \ + /* SDOT and UDOT support (in NEON). */ \ + V(kDotProduct, "DotProduct", "asimddp") \ + /* Int8 matrix multiplication (in NEON). */ \ + V(kI8MM, "NEON I8MM", "i8mm") \ + /* Half-precision (FP16) support for FP and NEON, respectively. */ \ + V(kFPHalf, "FPHalf", "fphp") \ + V(kNEONHalf, "NEONHalf", "asimdhp") \ + /* BFloat16 support (in both FP and NEON.) */ \ + V(kBF16, "FP/NEON BFloat 16", "bf16") \ + /* The RAS extension, including the ESB instruction. */ \ + V(kRAS, "RAS", NULL) \ + /* Data cache clean to the point of persistence: DC CVAP. */ \ + V(kDCPoP, "DCPoP", "dcpop") \ + /* Data cache clean to the point of deep persistence: DC CVADP. */ \ + V(kDCCVADP, "DCCVADP", "dcpodp") \ + /* Cryptographic support instructions. */ \ + V(kSHA3, "SHA3", "sha3") \ + V(kSHA512, "SHA512", "sha512") \ + V(kSM3, "SM3", "sm3") \ + V(kSM4, "SM4", "sm4") \ + /* Pointer authentication for addresses. */ \ + V(kPAuth, "PAuth", "paca") \ + /* Pointer authentication for addresses uses QARMA. */ \ + V(kPAuthQARMA, "PAuthQARMA", NULL) \ + /* Generic authentication (using the PACGA instruction). */ \ + V(kPAuthGeneric, "PAuthGeneric", "pacg") \ + /* Generic authentication uses QARMA. */ \ + V(kPAuthGenericQARMA, "PAuthGenericQARMA", NULL) \ + /* JavaScript-style FP -> integer conversion instruction: FJCVTZS. */ \ + V(kJSCVT, "JSCVT", "jscvt") \ + /* Complex number support for NEON: FCMLA and FCADD. */ \ + V(kFcma, "Fcma", "fcma") \ + /* RCpc-based model (for weaker release consistency): LDAPR and variants. */ \ + V(kRCpc, "RCpc", "lrcpc") \ + V(kRCpcImm, "RCpc (imm)", "ilrcpc") \ + /* Flag manipulation instructions: SETF{8,16}, CFINV, RMIF. */ \ + V(kFlagM, "FlagM", "flagm") \ + /* Unaligned single-copy atomicity. */ \ + V(kUSCAT, "USCAT", "uscat") \ + /* FP16 fused multiply-add or -subtract long: FMLAL{2}, FMLSL{2}. */ \ + V(kFHM, "FHM", "asimdfhm") \ + /* Data-independent timing (for selected instructions). */ \ + V(kDIT, "DIT", "dit") \ + /* Branch target identification. */ \ + V(kBTI, "BTI", "bti") \ + /* Flag manipulation instructions: {AX,XA}FLAG */ \ + V(kAXFlag, "AXFlag", "flagm2") \ + /* Random number generation extension, */ \ + V(kRNG, "RNG", "rng") \ + /* Floating-point round to {32,64}-bit integer. */ \ + V(kFrintToFixedSizedInt,"Frint (bounded)", "frint") \ + /* Memory Tagging Extension. */ \ + V(kMTEInstructions, "MTE (EL0 instructions)", NULL) \ + V(kMTE, "MTE", NULL) \ + /* PAuth extensions. */ \ + V(kPAuthEnhancedPAC, "PAuth EnhancedPAC", NULL) \ + V(kPAuthEnhancedPAC2, "PAuth EnhancedPAC2", NULL) \ + V(kPAuthFPAC, "PAuth FPAC", NULL) \ + V(kPAuthFPACCombined, "PAuth FPACCombined", NULL) +// clang-format on + + +class CPUFeaturesConstIterator; + +// A representation of the set of features known to be supported by the target +// device. Each feature is represented by a simple boolean flag. +// +// - When the Assembler is asked to assemble an instruction, it asserts (in +// debug mode) that the necessary features are available. +// +// - TODO: The MacroAssembler relies on the Assembler's assertions, but in +// some cases it may be useful for macros to generate a fall-back sequence +// in case features are not available. +// +// - The Simulator assumes by default that all features are available, but it +// is possible to configure it to fail if the simulated code uses features +// that are not enabled. +// +// The Simulator also offers pseudo-instructions to allow features to be +// enabled and disabled dynamically. This is useful when you want to ensure +// that some features are constrained to certain areas of code. +// +// - The base Disassembler knows nothing about CPU features, but the +// PrintDisassembler can be configured to annotate its output with warnings +// about unavailable features. The Simulator uses this feature when +// instruction trace is enabled. +// +// - The Decoder-based components -- the Simulator and PrintDisassembler -- +// rely on a CPUFeaturesAuditor visitor. This visitor keeps a list of +// features actually encountered so that a large block of code can be +// examined (either directly or through simulation), and the required +// features analysed later. +// +// Expected usage: +// +// // By default, VIXL uses CPUFeatures::AArch64LegacyBaseline(), for +// // compatibility with older version of VIXL. +// MacroAssembler masm; +// +// // Generate code only for the current CPU. +// masm.SetCPUFeatures(CPUFeatures::InferFromOS()); +// +// // Turn off feature checking entirely. +// masm.SetCPUFeatures(CPUFeatures::All()); +// +// Feature set manipulation: +// +// CPUFeatures f; // The default constructor gives an empty set. +// // Individual features can be added (or removed). +// f.Combine(CPUFeatures::kFP, CPUFeatures::kNEON, CPUFeatures::AES); +// f.Remove(CPUFeatures::kNEON); +// +// // Some helpers exist for extensions that provide several features. +// f.Remove(CPUFeatures::All()); +// f.Combine(CPUFeatures::AArch64LegacyBaseline()); +// +// // Chained construction is also possible. +// CPUFeatures g = +// f.With(CPUFeatures::kPmull1Q).Without(CPUFeatures::kCRC32); +// +// // Features can be queried. Where multiple features are given, they are +// // combined with logical AND. +// if (h.Has(CPUFeatures::kNEON)) { ... } +// if (h.Has(CPUFeatures::kFP, CPUFeatures::kNEON)) { ... } +// if (h.Has(g)) { ... } +// // If the empty set is requested, the result is always 'true'. +// VIXL_ASSERT(h.Has(CPUFeatures())); +// +// // For debug and reporting purposes, features can be enumerated (or +// // printed directly): +// std::cout << CPUFeatures::kNEON; // Prints something like "NEON". +// std::cout << f; // Prints something like "FP, NEON, CRC32". +class CPUFeatures { + public: + // clang-format off + // Individual features. + // These should be treated as opaque tokens. User code should not rely on + // specific numeric values or ordering. + enum Feature { + // Refer to VIXL_CPU_FEATURE_LIST (above) for the list of feature names that + // this class supports. + + kNone = -1, +#define VIXL_DECLARE_FEATURE(SYMBOL, NAME, CPUINFO) SYMBOL, + VIXL_CPU_FEATURE_LIST(VIXL_DECLARE_FEATURE) +#undef VIXL_DECLARE_FEATURE + kNumberOfFeatures + }; + // clang-format on + + // By default, construct with no features enabled. + CPUFeatures() : features_{} {} + + // Construct with some features already enabled. + template + CPUFeatures(T first, U... others) : features_{} { + Combine(first, others...); + } + + // Construct with all features enabled. This can be used to disable feature + // checking: `Has(...)` returns true regardless of the argument. + static CPUFeatures All(); + + // Construct an empty CPUFeatures. This is equivalent to the default + // constructor, but is provided for symmetry and convenience. + static CPUFeatures None() { return CPUFeatures(); } + + // The presence of these features was assumed by version of VIXL before this + // API was added, so using this set by default ensures API compatibility. + static CPUFeatures AArch64LegacyBaseline() { + return CPUFeatures(kFP, kNEON, kCRC32); + } + + // Construct a new CPUFeatures object using ID registers. This assumes that + // kIDRegisterEmulation is present. + static CPUFeatures InferFromIDRegisters(); + + enum QueryIDRegistersOption { + kDontQueryIDRegisters, + kQueryIDRegistersIfAvailable + }; + + // Construct a new CPUFeatures object based on what the OS reports. + static CPUFeatures InferFromOS( + QueryIDRegistersOption option = kQueryIDRegistersIfAvailable); + + // Combine another CPUFeatures object into this one. Features that already + // exist in this set are left unchanged. + void Combine(const CPUFeatures& other); + + // Combine a specific feature into this set. If it already exists in the set, + // the set is left unchanged. + void Combine(Feature feature); + + // Combine multiple features (or feature sets) into this set. + template + void Combine(T first, U... others) { + Combine(first); + Combine(others...); + } + + // Remove features in another CPUFeatures object from this one. + void Remove(const CPUFeatures& other); + + // Remove a specific feature from this set. This has no effect if the feature + // doesn't exist in the set. + void Remove(Feature feature0); + + // Remove multiple features (or feature sets) from this set. + template + void Remove(T first, U... others) { + Remove(first); + Remove(others...); + } + + // Chaining helpers for convenient construction by combining other CPUFeatures + // or individual Features. + template + CPUFeatures With(T... others) const { + CPUFeatures f(*this); + f.Combine(others...); + return f; + } + + template + CPUFeatures Without(T... others) const { + CPUFeatures f(*this); + f.Remove(others...); + return f; + } + + // Test whether the `other` feature set is equal to or a subset of this one. + bool Has(const CPUFeatures& other) const; + + // Test whether a single feature exists in this set. + // Note that `Has(kNone)` always returns true. + bool Has(Feature feature) const; + + // Test whether all of the specified features exist in this set. + template + bool Has(T first, U... others) const { + return Has(first) && Has(others...); + } + + // Return the number of enabled features. + size_t Count() const; + bool HasNoFeatures() const { return Count() == 0; } + + // Check for equivalence. + bool operator==(const CPUFeatures& other) const { + return Has(other) && other.Has(*this); + } + bool operator!=(const CPUFeatures& other) const { return !(*this == other); } + + typedef CPUFeaturesConstIterator const_iterator; + + const_iterator begin() const; + const_iterator end() const; + + private: + //AHTODO + // Each bit represents a feature. This set will be extended as needed. + // std::bitset features_; + int features_; + + // friend std::ostream& operator<<(std::ostream& os, + // const vixl::CPUFeatures& features); +}; + +// std::ostream& operator<<(std::ostream& os, vixl::CPUFeatures::Feature feature); +// std::ostream& operator<<(std::ostream& os, const vixl::CPUFeatures& features); + +// This is not a proper C++ iterator type, but it simulates enough of +// ForwardIterator that simple loops can be written. +class CPUFeaturesConstIterator { + public: + CPUFeaturesConstIterator(const CPUFeatures* cpu_features = NULL, + CPUFeatures::Feature start = CPUFeatures::kNone) + : cpu_features_(cpu_features), feature_(start) { + VIXL_ASSERT(IsValid()); + } + + bool operator==(const CPUFeaturesConstIterator& other) const; + bool operator!=(const CPUFeaturesConstIterator& other) const { + return !(*this == other); + } + CPUFeaturesConstIterator& operator++(); + CPUFeaturesConstIterator operator++(int); + + CPUFeatures::Feature operator*() const { + VIXL_ASSERT(IsValid()); + return feature_; + } + + // For proper support of C++'s simplest "Iterator" concept, this class would + // have to define member types (such as CPUFeaturesIterator::pointer) to make + // it appear as if it iterates over Feature objects in memory. That is, we'd + // need CPUFeatures::iterator to behave like jitstd::vector::iterator. + // This is at least partially possible -- the jitstd::vector specialisation + // does something similar -- but it doesn't seem worthwhile for a + // special-purpose debug helper, so they are omitted here. + private: + const CPUFeatures* cpu_features_; + CPUFeatures::Feature feature_; + + bool IsValid() const { + if (cpu_features_ == NULL) { + return feature_ == CPUFeatures::kNone; + } + return cpu_features_->Has(feature_); + } +}; + +// A convenience scope for temporarily modifying a CPU features object. This +// allows features to be enabled for short sequences. +// +// Expected usage: +// +// { +// CPUFeaturesScope cpu(&masm, CPUFeatures::kCRC32); +// // This scope can now use CRC32, as well as anything else that was enabled +// // before the scope. +// +// ... +// +// // At the end of the scope, the original CPU features are restored. +// } +class CPUFeaturesScope { + public: + // Start a CPUFeaturesScope on any object that implements + // `CPUFeatures* GetCPUFeatures()`. + template + explicit CPUFeaturesScope(T* cpu_features_wrapper) + : cpu_features_(cpu_features_wrapper->GetCPUFeatures()), + old_features_(*cpu_features_) {} + + // Start a CPUFeaturesScope on any object that implements + // `CPUFeatures* GetCPUFeatures()`, with the specified features enabled. + template + CPUFeaturesScope(T* cpu_features_wrapper, U first, V... features) + : cpu_features_(cpu_features_wrapper->GetCPUFeatures()), + old_features_(*cpu_features_) { + cpu_features_->Combine(first, features...); + } + + ~CPUFeaturesScope() { *cpu_features_ = old_features_; } + + // For advanced usage, the CPUFeatures object can be accessed directly. + // The scope will restore the original state when it ends. + + CPUFeatures* GetCPUFeatures() const { return cpu_features_; } + + void SetCPUFeatures(const CPUFeatures& cpu_features) { + *cpu_features_ = cpu_features; + } + + private: + CPUFeatures* const cpu_features_; + const CPUFeatures old_features_; +}; + + +} // namespace vixl + +#endif // VIXL_CPU_FEATURES_H diff --git a/src/coreclr/jit/vixl/globals-vixl.h b/src/coreclr/jit/vixl/globals-vixl.h new file mode 100644 index 00000000000000..91167d6f2656ec --- /dev/null +++ b/src/coreclr/jit/vixl/globals-vixl.h @@ -0,0 +1,307 @@ +// Copyright 2015, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef VIXL_GLOBALS_H +#define VIXL_GLOBALS_H + +#define VIXL_NEGATIVE_TESTING +#define VIXL_DEBUG + +#define VIXL_INCLUDE_TARGET_A64 + +// #if __cplusplus < 201402L +// #error VIXL requires C++14 +// #endif + +// Get standard C99 macros for integer types. +#ifndef __STDC_CONSTANT_MACROS +#define __STDC_CONSTANT_MACROS +#endif + +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS +#endif + +#ifndef __STDC_FORMAT_MACROS +#define __STDC_FORMAT_MACROS +#endif + +extern "C" { +#include +#include +} + +#include +#include +#include +#include +#include + +#include "platform-vixl.h" + +#ifdef VIXL_NEGATIVE_TESTING +#include +// #include +#include +#endif + +#include "error.h" + +namespace vixl { + +typedef uint8_t byte; + +const int KBytes = 1024; +const int MBytes = 1024 * KBytes; + +const int kBitsPerByteLog2 = 3; +const int kBitsPerByte = 1 << kBitsPerByteLog2; + +template +struct Unsigned; + +template <> +struct Unsigned<32> { + typedef uint32_t type; +}; + +template <> +struct Unsigned<64> { + typedef uint64_t type; +}; + +} // namespace vixl + +// Detect the host's pointer size. +// #if (UINTPTR_MAX == UINT32_MAX) +// #define VIXL_HOST_POINTER_32 +// #elif (UINTPTR_MAX == UINT64_MAX) +#define VIXL_HOST_POINTER_64 +// #else +// #error "Unsupported host pointer size." +// #endif + +// #ifdef VIXL_NEGATIVE_TESTING +// #define VIXL_ABORT() \ +// do { \ +// std::ostringstream oss; \ +// oss << "Aborting in " << __FILE__ << ", line " << __LINE__ << std::endl; \ +// throw std::runtime_error(oss.str()); \ +// } while (false) +// #define VIXL_ABORT_WITH_MSG(msg) \ +// do { \ +// std::ostringstream oss; \ +// oss << (msg) << "in " << __FILE__ << ", line " << __LINE__ << std::endl; \ +// throw std::runtime_error(oss.str()); \ +// } while (false) +// #define VIXL_CHECK(condition) \ +// do { \ +// if (!(condition)) { \ +// std::ostringstream oss; \ +// oss << "Assertion failed (" #condition ")\nin "; \ +// oss << __FILE__ << ", line " << __LINE__ << std::endl; \ +// throw std::runtime_error(oss.str()); \ +// } \ +// } while (false) +// #else +#define VIXL_ABORT() \ + do { \ + printf("Aborting in %s, line %i\n", __FILE__, __LINE__); \ + NO_WAY("Vixl abort"); \ + } while (false); + +#define VIXL_ABORT_WITH_MSG(msg) \ + do { \ + printf("%sin %s, line %i\n", (msg), __FILE__, __LINE__); \ + NO_WAY(msg); \ + } while (false); + +#define VIXL_CHECK(condition) \ + do { \ + if (!(condition)) { \ + printf("Assertion failed (%s)\nin %s, line %i\n", \ + #condition, \ + __FILE__, \ + __LINE__); \ + NO_WAY("Vixl check"); \ + } \ + } while (false); + +// #endif +#ifdef VIXL_DEBUG +#define VIXL_ASSERT(condition) VIXL_CHECK(condition) +#define VIXL_UNIMPLEMENTED() \ + do { \ + VIXL_ABORT_WITH_MSG("UNIMPLEMENTED "); \ + } while (false) +#define VIXL_UNREACHABLE() \ + do { \ + VIXL_ABORT_WITH_MSG("UNREACHABLE "); \ + } while (false) +#else +#define VIXL_ASSERT(condition) ((void)0) +#define VIXL_UNIMPLEMENTED() ((void)0) +#define VIXL_UNREACHABLE() ((void)0) +#endif +// This is not as powerful as template based assertions, but it is simple. +// It assumes that the descriptions are unique. If this starts being a problem, +// we can switch to a different implemention. +#define VIXL_CONCAT(a, b) a##b +#if __cplusplus >= 201103L +#define VIXL_STATIC_ASSERT_LINE(line_unused, condition, message) \ + static_assert(condition, message) +#else +#define VIXL_STATIC_ASSERT_LINE(line, condition, message_unused) \ + typedef char VIXL_CONCAT(STATIC_ASSERT_LINE_, line)[(condition) ? 1 : -1] \ + __attribute__((unused)) +#endif +#define VIXL_STATIC_ASSERT(condition) \ + VIXL_STATIC_ASSERT_LINE(__LINE__, condition, "") +#define VIXL_STATIC_ASSERT_MESSAGE(condition, message) \ + VIXL_STATIC_ASSERT_LINE(__LINE__, condition, message) + +#define VIXL_WARNING(message) \ + do { \ + printf("WARNING in %s, line %i: %s", __FILE__, __LINE__, message); \ + } while (false) + +template +inline void USE(const T1&) {} + +template +inline void USE(const T1&, const T2&) {} + +template +inline void USE(const T1&, const T2&, const T3&) {} + +template +inline void USE(const T1&, const T2&, const T3&, const T4&) {} + +#define VIXL_ALIGNMENT_EXCEPTION() \ + do { \ + VIXL_ABORT_WITH_MSG("ALIGNMENT EXCEPTION\t"); \ + } while (0) + +// The clang::fallthrough attribute is used along with the Wimplicit-fallthrough +// argument to annotate intentional fall-through between switch labels. +// For more information please refer to: +// http://clang.llvm.org/docs/AttributeReference.html#fallthrough-clang-fallthrough +#ifndef __has_warning +#define __has_warning(x) 0 +#endif + +// Fallthrough annotation for Clang and C++11(201103L). +#if __has_warning("-Wimplicit-fallthrough") && __cplusplus >= 201103L +#define VIXL_FALLTHROUGH() [[clang::fallthrough]] +// Fallthrough annotation for GCC >= 7. +#elif __GNUC__ >= 7 +#define VIXL_FALLTHROUGH() __attribute__((fallthrough)) +#else +#define VIXL_FALLTHROUGH() \ + do { \ + } while (0) +#endif + +#if __cplusplus >= 201103L +#define VIXL_NO_RETURN [[noreturn]] +#else +#define VIXL_NO_RETURN __attribute__((noreturn)) +#endif +#ifdef VIXL_DEBUG +#define VIXL_NO_RETURN_IN_DEBUG_MODE VIXL_NO_RETURN +#else +#define VIXL_NO_RETURN_IN_DEBUG_MODE +#endif + +#if __cplusplus >= 201103L +#define VIXL_OVERRIDE override +#define VIXL_CONSTEXPR constexpr +#define VIXL_HAS_CONSTEXPR 1 +#else +#define VIXL_OVERRIDE +#define VIXL_CONSTEXPR +#endif + +// With VIXL_NEGATIVE_TESTING on, VIXL_ASSERT and VIXL_CHECK will throw +// exceptions but C++11 marks destructors as noexcept(true) by default. +#if defined(VIXL_NEGATIVE_TESTING) && __cplusplus >= 201103L +#define VIXL_NEGATIVE_TESTING_ALLOW_EXCEPTION noexcept(false) +#else +#define VIXL_NEGATIVE_TESTING_ALLOW_EXCEPTION +#endif + +#ifdef VIXL_INCLUDE_SIMULATOR_AARCH64 +#ifndef VIXL_AARCH64_GENERATE_SIMULATOR_CODE +#define VIXL_AARCH64_GENERATE_SIMULATOR_CODE 1 +#endif +#else +#ifndef VIXL_AARCH64_GENERATE_SIMULATOR_CODE +#define VIXL_AARCH64_GENERATE_SIMULATOR_CODE 0 +#endif +#if VIXL_AARCH64_GENERATE_SIMULATOR_CODE +#warning "Generating Simulator instructions without Simulator support." +#endif +#endif + +// We do not have a simulator for AArch32, although we can pretend we do so that +// tests that require running natively can be skipped. +#ifndef __arm__ +#define VIXL_INCLUDE_SIMULATOR_AARCH32 +#ifndef VIXL_AARCH32_GENERATE_SIMULATOR_CODE +#define VIXL_AARCH32_GENERATE_SIMULATOR_CODE 1 +#endif +#else +#ifndef VIXL_AARCH32_GENERATE_SIMULATOR_CODE +#define VIXL_AARCH32_GENERATE_SIMULATOR_CODE 0 +#endif +#endif + +#ifdef USE_SIMULATOR +#error "Please see the release notes for USE_SIMULATOR." +#endif + +// Target Architecture/ISA +#ifdef VIXL_INCLUDE_TARGET_A64 +#ifndef VIXL_INCLUDE_TARGET_AARCH64 +#define VIXL_INCLUDE_TARGET_AARCH64 +#endif +#endif + +#if defined(VIXL_INCLUDE_TARGET_A32) && defined(VIXL_INCLUDE_TARGET_T32) +#ifndef VIXL_INCLUDE_TARGET_AARCH32 +#define VIXL_INCLUDE_TARGET_AARCH32 +#endif +#elif defined(VIXL_INCLUDE_TARGET_A32) +#ifndef VIXL_INCLUDE_TARGET_A32_ONLY +#define VIXL_INCLUDE_TARGET_A32_ONLY +#endif +#else +#ifndef VIXL_INCLUDE_TARGET_T32_ONLY +#define VIXL_INCLUDE_TARGET_T32_ONLY +#endif +#endif + +#endif // VIXL_GLOBALS_H diff --git a/src/coreclr/jit/vixl/invalset-vixl.h b/src/coreclr/jit/vixl/invalset-vixl.h new file mode 100644 index 00000000000000..22a7731ab9d74c --- /dev/null +++ b/src/coreclr/jit/vixl/invalset-vixl.h @@ -0,0 +1,927 @@ +// Copyright 2015, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef VIXL_INVALSET_H_ +#define VIXL_INVALSET_H_ + +#include + +#include "jitstd/algorithm.h" +#include +#include + +#include "globals-vixl.h" + +namespace vixl { + +// We define a custom data structure template and its iterator as `std` +// containers do not fit the performance requirements for some of our use cases. +// +// The structure behaves like an iterable unordered set with special properties +// and restrictions. "InvalSet" stands for "Invalidatable Set". +// +// Restrictions and requirements: +// - Adding an element already present in the set is illegal. In debug mode, +// this is checked at insertion time. +// - The templated class `ElementType` must provide comparison operators so that +// `jitstd::sort()` can be used. +// - A key must be available to represent invalid elements. +// - Elements with an invalid key must compare higher or equal to any other +// element. +// +// Use cases and performance considerations: +// Our use cases present two specificities that allow us to design this +// structure to provide fast insertion *and* fast search and deletion +// operations: +// - Elements are (generally) inserted in order (sorted according to their key). +// - A key is available to mark elements as invalid (deleted). +// The backing `jitstd::vector` allows for fast insertions. When +// searching for an element we ensure the elements are sorted (this is generally +// the case) and perform a binary search. When deleting an element we do not +// free the associated memory immediately. Instead, an element to be deleted is +// marked with the 'invalid' key. Other methods of the container take care of +// ignoring entries marked as invalid. +// To avoid the overhead of the `jitstd::vector` container when only few entries +// are used, a number of elements are preallocated. + +// 'ElementType' and 'KeyType' are respectively the types of the elements and +// their key. The structure only reclaims memory when safe to do so, if the +// number of elements that can be reclaimed is greater than `RECLAIM_FROM` and +// greater than ` / RECLAIM_FACTOR. +// clang-format off +#define TEMPLATE_INVALSET_P_DECL \ + class ElementType, \ + unsigned N_PREALLOCATED_ELEMENTS, \ + class KeyType, \ + KeyType INVALID_KEY, \ + size_t RECLAIM_FROM, \ + unsigned RECLAIM_FACTOR +// clang-format on + +#define TEMPLATE_INVALSET_P_DEF \ + ElementType, N_PREALLOCATED_ELEMENTS, KeyType, INVALID_KEY, RECLAIM_FROM, \ + RECLAIM_FACTOR + +template +class InvalSetIterator; // Forward declaration. + +template +class InvalSet { + public: + InvalSet(); + ~InvalSet() VIXL_NEGATIVE_TESTING_ALLOW_EXCEPTION; + + static const size_t kNPreallocatedElements = N_PREALLOCATED_ELEMENTS; + static const KeyType kInvalidKey = INVALID_KEY; + + // C++ STL iterator interface. + typedef InvalSetIterator > iterator; + iterator begin(); + iterator end(); + + // It is illegal to insert an element already present in the set. + void insert(const ElementType& element); + + // Looks for the specified element in the set and - if found - deletes it. + // The return value is the number of elements erased: either 0 or 1. + size_t erase(const ElementType& element); + + // This indicates the number of (valid) elements stored in this set. + size_t size() const; + + // Returns true if no elements are stored in the set. + // Note that this does not mean the the backing storage is empty: it can still + // contain invalid elements. + bool empty() const; + + void clear(); + + const ElementType GetMinElement(); + + // This returns the key of the minimum element in the set. + KeyType GetMinElementKey(); + + static bool IsValid(const ElementType& element); + static KeyType GetKey(const ElementType& element); + static void SetKey(ElementType* element, KeyType key); + + typedef ElementType _ElementType; + typedef KeyType _KeyType; + + protected: + // Returns a pointer to the element in vector_ if it was found, or NULL + // otherwise. + ElementType* Search(const ElementType& element); + + // The argument *must* point to an element stored in *this* set. + // This function is not allowed to move elements in the backing vector + // storage. + void EraseInternal(ElementType* element); + + // The elements in the range searched must be sorted. + ElementType* BinarySearch(const ElementType& element, + ElementType* start, + ElementType* end) const; + + // Sort the elements. + enum SortType { + // The 'hard' version guarantees that invalid elements are moved to the end + // of the container. + kHardSort, + // The 'soft' version only guarantees that the elements will be sorted. + // Invalid elements may still be present anywhere in the set. + kSoftSort + }; + void Sort(SortType sort_type); + + // Delete the elements that have an invalid key. The complexity is linear + // with the size of the vector. + void Clean(); + + const ElementType Front() const; + const ElementType Back() const; + + // Delete invalid trailing elements and return the last valid element in the + // set. + const ElementType CleanBack(); + + // Returns a pointer to the start or end of the backing storage. + const ElementType* StorageBegin() const; + const ElementType* StorageEnd() const; + ElementType* StorageBegin(); + ElementType* StorageEnd(); + + // Returns the index of the element within the backing storage. The element + // must belong to the backing storage. + size_t GetElementIndex(const ElementType* element) const; + + // Returns the element at the specified index in the backing storage. + const ElementType* GetElementAt(size_t index) const; + ElementType* GetElementAt(size_t index); + + static const ElementType* GetFirstValidElement(const ElementType* from, + const ElementType* end); + + void CacheMinElement(); + const ElementType GetCachedMinElement() const; + + bool ShouldReclaimMemory() const; + void ReclaimMemory(); + + bool IsUsingVector() const { return vector_ != NULL; } + void SetSorted(bool sorted) { sorted_ = sorted; } + + // We cache some data commonly required by users to improve performance. + // We cannot cache pointers to elements as we do not control the backing + // storage. + bool valid_cached_min_; + size_t cached_min_index_; // Valid iff `valid_cached_min_` is true. + KeyType cached_min_key_; // Valid iff `valid_cached_min_` is true. + + // Indicates whether the elements are sorted. + bool sorted_; + + // This represents the number of (valid) elements in this set. + size_t size_; + + // The backing storage is either the array of preallocated elements or the + // vector. The structure starts by using the preallocated elements, and + // transitions (permanently) to using the vector once more than + // kNPreallocatedElements are used. + // Elements are only invalidated when using the vector. The preallocated + // storage always only contains valid elements. + ElementType preallocated_[kNPreallocatedElements]; + jitstd::vector* vector_; + + // Iterators acquire and release this monitor. While a set is acquired, + // certain operations are illegal to ensure that the iterator will + // correctly iterate over the elements in the set. + int monitor_; +#ifdef VIXL_DEBUG + int monitor() const { return monitor_; } + void Acquire() { monitor_++; } + void Release() { + monitor_--; + VIXL_ASSERT(monitor_ >= 0); + } +#endif + + private: +// The copy constructor and assignment operator are not used and the defaults +// are unsafe, so disable them (without an implementation). +#if __cplusplus >= 201103L + InvalSet(const InvalSet& other) = delete; + InvalSet operator=(const InvalSet& other) = delete; +#else + InvalSet(const InvalSet& other); + InvalSet operator=(const InvalSet& other); +#endif + + friend class InvalSetIterator >; +}; + + +template +class InvalSetIterator : public jitstd::iterator { + private: + // Redefine types to mirror the associated set types. + typedef typename S::_ElementType ElementType; + typedef typename S::_KeyType KeyType; + + public: + explicit InvalSetIterator(S* inval_set = NULL); + + // This class implements the standard copy-swap idiom. + ~InvalSetIterator(); + InvalSetIterator(const InvalSetIterator& other); + InvalSetIterator& operator=(InvalSetIterator other); +#if __cplusplus >= 201103L + InvalSetIterator(InvalSetIterator&& other) noexcept; +#endif + + friend void swap(InvalSetIterator& a, InvalSetIterator& b) { + using std::swap; + swap(a.using_vector_, b.using_vector_); + swap(a.index_, b.index_); + swap(a.inval_set_, b.inval_set_); + } + + // Return true if the iterator is at the end of the set. + bool Done() const; + + // Move this iterator to the end of the set. + void Finish(); + + // Delete the current element and advance the iterator to point to the next + // element. + void DeleteCurrentAndAdvance(); + + static bool IsValid(const ElementType& element); + static KeyType GetKey(const ElementType& element); + + // Extra helpers to support the forward-iterator interface. + InvalSetIterator& operator++(); // Pre-increment. + InvalSetIterator operator++(int); // Post-increment. + bool operator==(const InvalSetIterator& rhs) const; + bool operator!=(const InvalSetIterator& rhs) const { + return !(*this == rhs); + } + ElementType& operator*() { return *Current(); } + const ElementType& operator*() const { return *Current(); } + ElementType* operator->() { return Current(); } + const ElementType* operator->() const { return Current(); } + + protected: + void MoveToValidElement(); + + // Indicates if the iterator is looking at the vector or at the preallocated + // elements. + bool using_vector_; + // Used when looking at the preallocated elements, or in debug mode when using + // the vector to track how many times the iterator has advanced. + size_t index_; + typename jitstd::vector::iterator iterator_; + S* inval_set_; + + // TODO: These helpers are deprecated and will be removed in future versions + // of VIXL. + ElementType* Current() const; + void Advance(); +}; + + +template +InvalSet::InvalSet() + : valid_cached_min_(false), sorted_(true), size_(0), vector_(NULL) { +#ifdef VIXL_DEBUG + monitor_ = 0; +#endif +} + + +template +InvalSet::~InvalSet() + VIXL_NEGATIVE_TESTING_ALLOW_EXCEPTION { + VIXL_ASSERT(monitor_ == 0); + delete vector_; +} + + +template +typename InvalSet::iterator +InvalSet::begin() { + return iterator(this); +} + + +template +typename InvalSet::iterator +InvalSet::end() { + iterator end(this); + end.Finish(); + return end; +} + + +template +void InvalSet::insert(const ElementType& element) { + VIXL_ASSERT(monitor() == 0); + VIXL_ASSERT(IsValid(element)); + VIXL_ASSERT(Search(element) == NULL); + SetSorted(empty() || (sorted_ && (element > CleanBack()))); + if (IsUsingVector()) { + vector_->push_back(element); + } else { + if (size_ < kNPreallocatedElements) { + preallocated_[size_] = element; + } else { + // Transition to using the vector. + // AHTODO + // vector_ = + // new jitstd::vector(preallocated_, preallocated_ + size_, compiler->getAllocator(CMK_Codegen)); + vector_->push_back(element); + } + } + size_++; + + if (valid_cached_min_ && (element < GetMinElement())) { + cached_min_index_ = IsUsingVector() ? vector_->size() - 1 : size_ - 1; + cached_min_key_ = GetKey(element); + valid_cached_min_ = true; + } + + if (ShouldReclaimMemory()) { + ReclaimMemory(); + } +} + + +template +size_t InvalSet::erase(const ElementType& element) { + VIXL_ASSERT(monitor() == 0); + VIXL_ASSERT(IsValid(element)); + ElementType* local_element = Search(element); + if (local_element != NULL) { + EraseInternal(local_element); + return 1; + } + return 0; +} + + +template +ElementType* InvalSet::Search( + const ElementType& element) { + VIXL_ASSERT(monitor() == 0); + if (empty()) { + return NULL; + } + if (ShouldReclaimMemory()) { + ReclaimMemory(); + } + if (!sorted_) { + Sort(kHardSort); + } + if (!valid_cached_min_) { + CacheMinElement(); + } + return BinarySearch(element, GetElementAt(cached_min_index_), StorageEnd()); +} + + +template +size_t InvalSet::size() const { + return size_; +} + + +template +bool InvalSet::empty() const { + return size_ == 0; +} + + +template +void InvalSet::clear() { + VIXL_ASSERT(monitor() == 0); + size_ = 0; + if (IsUsingVector()) { + vector_->clear(); + } + SetSorted(true); + valid_cached_min_ = false; +} + + +template +const ElementType InvalSet::GetMinElement() { + VIXL_ASSERT(monitor() == 0); + VIXL_ASSERT(!empty()); + CacheMinElement(); + return *GetElementAt(cached_min_index_); +} + + +template +KeyType InvalSet::GetMinElementKey() { + VIXL_ASSERT(monitor() == 0); + if (valid_cached_min_) { + return cached_min_key_; + } else { + return GetKey(GetMinElement()); + } +} + + +template +bool InvalSet::IsValid(const ElementType& element) { + return GetKey(element) != kInvalidKey; +} + + +template +void InvalSet::EraseInternal(ElementType* element) { + // Note that this function must be safe even while an iterator has acquired + // this set. + VIXL_ASSERT(element != NULL); + size_t deleted_index = GetElementIndex(element); + if (IsUsingVector()) { + VIXL_ASSERT((&(vector_->front()) <= element) && + (element <= &(vector_->back()))); + SetKey(element, kInvalidKey); + } else { + VIXL_ASSERT((preallocated_ <= element) && + (element < (preallocated_ + kNPreallocatedElements))); + ElementType* end = preallocated_ + kNPreallocatedElements; + size_t copy_size = sizeof(*element) * (end - element - 1); + memmove(element, element + 1, copy_size); + } + size_--; + + if (valid_cached_min_ && (deleted_index == cached_min_index_)) { + if (sorted_ && !empty()) { + const ElementType* min = GetFirstValidElement(element, StorageEnd()); + cached_min_index_ = GetElementIndex(min); + cached_min_key_ = GetKey(*min); + valid_cached_min_ = true; + } else { + valid_cached_min_ = false; + } + } +} + + +template +ElementType* InvalSet::BinarySearch( + const ElementType& element, ElementType* start, ElementType* end) const { + if (start == end) { + return NULL; + } + VIXL_ASSERT(sorted_); + VIXL_ASSERT(start < end); + VIXL_ASSERT(!empty()); + + // Perform a binary search through the elements while ignoring invalid + // elements. + ElementType* elements = start; + size_t low = 0; + size_t high = (end - start) - 1; + while (low < high) { + // Find valid bounds. + while (!IsValid(elements[low]) && (low < high)) ++low; + while (!IsValid(elements[high]) && (low < high)) --high; + VIXL_ASSERT(low <= high); + // Avoid overflow when computing the middle index. + size_t middle = low + (high - low) / 2; + if ((middle == low) || (middle == high)) { + break; + } + while ((middle < high - 1) && !IsValid(elements[middle])) ++middle; + while ((low + 1 < middle) && !IsValid(elements[middle])) --middle; + if (!IsValid(elements[middle])) { + break; + } + if (elements[middle] < element) { + low = middle; + } else { + high = middle; + } + } + + if (elements[low] == element) return &elements[low]; + if (elements[high] == element) return &elements[high]; + return NULL; +} + + +template +void InvalSet::Sort(SortType sort_type) { + if (sort_type == kSoftSort) { + if (sorted_) { + return; + } + } + VIXL_ASSERT(monitor() == 0); + if (empty()) { + return; + } + + Clean(); + + struct compare + { + bool operator()(ElementType& elem1, ElementType& elem2) + { + return elem1 < elem2; + } + }; + + jitstd::sort(StorageBegin(), StorageEnd(), compare()); + + SetSorted(true); + cached_min_index_ = 0; + cached_min_key_ = GetKey(Front()); + valid_cached_min_ = true; +} + + +template +void InvalSet::Clean() { + VIXL_ASSERT(monitor() == 0); + if (empty() || !IsUsingVector()) { + return; + } + // Manually iterate through the vector storage to discard invalid elements. + ElementType* start = &(vector_->front()); + ElementType* end = start + vector_->size(); + ElementType* c = start; + ElementType* first_invalid; + ElementType* first_valid; + ElementType* next_invalid; + + while ((c < end) && IsValid(*c)) c++; + first_invalid = c; + + while (c < end) { + while ((c < end) && !IsValid(*c)) c++; + first_valid = c; + while ((c < end) && IsValid(*c)) c++; + next_invalid = c; + + ptrdiff_t n_moved_elements = (next_invalid - first_valid); + memmove(first_invalid, first_valid, n_moved_elements * sizeof(*c)); + first_invalid = first_invalid + n_moved_elements; + c = next_invalid; + } + + // Delete the trailing invalid elements. + vector_->erase(vector_->begin() + (first_invalid - start), vector_->end()); + VIXL_ASSERT(vector_->size() == size_); + + if (sorted_) { + valid_cached_min_ = true; + cached_min_index_ = 0; + cached_min_key_ = GetKey(*GetElementAt(0)); + } else { + valid_cached_min_ = false; + } +} + + +template +const ElementType InvalSet::Front() const { + VIXL_ASSERT(!empty()); + return IsUsingVector() ? vector_->front() : preallocated_[0]; +} + + +template +const ElementType InvalSet::Back() const { + VIXL_ASSERT(!empty()); + return IsUsingVector() ? vector_->back() : preallocated_[size_ - 1]; +} + + +template +const ElementType InvalSet::CleanBack() { + VIXL_ASSERT(monitor() == 0); + if (IsUsingVector()) { + // Delete the invalid trailing elements. + typename jitstd::vector::reverse_iterator it = vector_->rbegin(); + while (!IsValid(*it)) { + it++; + } + // AHTODO: Fix me + // vector_->erase(it.base(), vector_->end()); + } + return Back(); +} + + +template +const ElementType* InvalSet::StorageBegin() const { + return IsUsingVector() ? &(vector_->front()) : preallocated_; +} + + +template +const ElementType* InvalSet::StorageEnd() const { + return IsUsingVector() ? &(vector_->back()) + 1 : preallocated_ + size_; +} + + +template +ElementType* InvalSet::StorageBegin() { + return IsUsingVector() ? &(vector_->front()) : preallocated_; +} + + +template +ElementType* InvalSet::StorageEnd() { + return IsUsingVector() ? &(vector_->back()) + 1 : preallocated_ + size_; +} + + +template +size_t InvalSet::GetElementIndex( + const ElementType* element) const { + VIXL_ASSERT((StorageBegin() <= element) && (element < StorageEnd())); + return element - StorageBegin(); +} + + +template +const ElementType* InvalSet::GetElementAt( + size_t index) const { + VIXL_ASSERT((IsUsingVector() && (index < vector_->size())) || + (index < size_)); + return StorageBegin() + index; +} + +template +ElementType* InvalSet::GetElementAt(size_t index) { + VIXL_ASSERT((IsUsingVector() && (index < vector_->size())) || + (index < size_)); + return StorageBegin() + index; +} + +template +const ElementType* InvalSet::GetFirstValidElement( + const ElementType* from, const ElementType* end) { + while ((from < end) && !IsValid(*from)) { + from++; + } + return from; +} + + +template +void InvalSet::CacheMinElement() { + VIXL_ASSERT(monitor() == 0); + VIXL_ASSERT(!empty()); + + if (valid_cached_min_) { + return; + } + + if (sorted_) { + const ElementType* min = GetFirstValidElement(StorageBegin(), StorageEnd()); + cached_min_index_ = GetElementIndex(min); + cached_min_key_ = GetKey(*min); + valid_cached_min_ = true; + } else { + Sort(kHardSort); + } + VIXL_ASSERT(valid_cached_min_); +} + + +template +bool InvalSet::ShouldReclaimMemory() const { + if (!IsUsingVector()) { + return false; + } + size_t n_invalid_elements = vector_->size() - size_; + return (n_invalid_elements > RECLAIM_FROM) && + (n_invalid_elements > vector_->size() / RECLAIM_FACTOR); +} + + +template +void InvalSet::ReclaimMemory() { + VIXL_ASSERT(monitor() == 0); + Clean(); +} + + +template +InvalSetIterator::InvalSetIterator(S* inval_set) + : using_vector_((inval_set != NULL) && inval_set->IsUsingVector()), + index_(0), + inval_set_(inval_set) { + if (inval_set != NULL) { + inval_set->Sort(S::kSoftSort); +#ifdef VIXL_DEBUG + inval_set->Acquire(); +#endif + if (using_vector_) { + iterator_ = typename jitstd::vector::iterator( + inval_set_->vector_->begin()); + } + MoveToValidElement(); + } +} + + +template +InvalSetIterator::~InvalSetIterator() { +#ifdef VIXL_DEBUG + if (inval_set_ != NULL) inval_set_->Release(); +#endif +} + + +template +typename S::_ElementType* InvalSetIterator::Current() const { + VIXL_ASSERT(!Done()); + // if (using_vector_) { + // return &(*iterator_); + // } else { + return &(inval_set_->preallocated_[index_]); + // } +} + + +template +void InvalSetIterator::Advance() { + ++(*this); +} + + +template +bool InvalSetIterator::Done() const { + if (using_vector_) { + //AHTODO + bool done = true; //(iterator_ == inval_set_->vector_->end()); + VIXL_ASSERT(done == (index_ == inval_set_->size())); + return done; + } else { + return index_ == inval_set_->size(); + } +} + + +template +void InvalSetIterator::Finish() { + VIXL_ASSERT(inval_set_->sorted_); + if (using_vector_) { + iterator_ = inval_set_->vector_->end(); + } + index_ = inval_set_->size(); +} + + +template +void InvalSetIterator::DeleteCurrentAndAdvance() { + if (using_vector_) { + inval_set_->EraseInternal(&(*iterator_)); + MoveToValidElement(); + } else { + inval_set_->EraseInternal(inval_set_->preallocated_ + index_); + } +} + + +template +bool InvalSetIterator::IsValid(const ElementType& element) { + return S::IsValid(element); +} + + +template +typename S::_KeyType InvalSetIterator::GetKey(const ElementType& element) { + return S::GetKey(element); +} + + +template +void InvalSetIterator::MoveToValidElement() { + if (using_vector_) { + while ((iterator_ != inval_set_->vector_->end()) && !IsValid(*iterator_)) { + iterator_++; + } + } else { + VIXL_ASSERT(inval_set_->empty() || IsValid(inval_set_->preallocated_[0])); + // Nothing to do. + } +} + + +template +InvalSetIterator::InvalSetIterator(const InvalSetIterator& other) + : using_vector_(other.using_vector_), + index_(other.index_), + inval_set_(other.inval_set_) { +#ifdef VIXL_DEBUG + if (inval_set_ != NULL) inval_set_->Acquire(); +#endif +} + + +#if __cplusplus >= 201103L +template +InvalSetIterator::InvalSetIterator(InvalSetIterator&& other) noexcept + : using_vector_(false), index_(0), inval_set_(NULL) { + swap(*this, other); +} +#endif + + +template +InvalSetIterator& InvalSetIterator::operator=(InvalSetIterator other) { + swap(*this, other); + return *this; +} + + +template +bool InvalSetIterator::operator==(const InvalSetIterator& rhs) const { + bool equal = (inval_set_ == rhs.inval_set_); + + // If the inval_set_ matches, using_vector_ must also match. + VIXL_ASSERT(!equal || (using_vector_ == rhs.using_vector_)); + + if (using_vector_) { + equal = equal && (iterator_ == rhs.iterator_); + // In debug mode, index_ is maintained even with using_vector_. + VIXL_ASSERT(!equal || (index_ == rhs.index_)); + } else { + equal = equal && (index_ == rhs.index_); +#ifdef DEBUG + // If not using_vector_, iterator_ should be default-initialised. + typename jitstd::vector::iterator default_iterator; + VIXL_ASSERT(iterator_ == default_iterator); + VIXL_ASSERT(rhs.iterator_ == default_iterator); +#endif + } + return equal; +} + + +template +InvalSetIterator& InvalSetIterator::operator++() { + // Pre-increment. + VIXL_ASSERT(!Done()); + if (using_vector_) { + iterator_++; +#ifdef VIXL_DEBUG + index_++; +#endif + MoveToValidElement(); + } else { + index_++; + } + return *this; +} + + +template +InvalSetIterator InvalSetIterator::operator++(int /* unused */) { + // Post-increment. + VIXL_ASSERT(!Done()); + InvalSetIterator old(*this); + ++(*this); + return old; +} + + +#undef TEMPLATE_INVALSET_P_DECL +#undef TEMPLATE_INVALSET_P_DEF + +} // namespace vixl + +#endif // VIXL_INVALSET_H_ diff --git a/src/coreclr/jit/vixl/macro-assembler-interface.h b/src/coreclr/jit/vixl/macro-assembler-interface.h new file mode 100644 index 00000000000000..3c0421f2c708a3 --- /dev/null +++ b/src/coreclr/jit/vixl/macro-assembler-interface.h @@ -0,0 +1,75 @@ +// Copyright 2016, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef VIXL_MACRO_ASSEMBLER_INTERFACE_H +#define VIXL_MACRO_ASSEMBLER_INTERFACE_H + +#include "assembler-base-vixl.h" + +namespace vixl { + +class MacroAssemblerInterface { + public: + virtual internal::AssemblerBase* AsAssemblerBase() = 0; + + virtual ~MacroAssemblerInterface() VIXL_NEGATIVE_TESTING_ALLOW_EXCEPTION {} + + virtual bool AllowMacroInstructions() const = 0; + virtual bool ArePoolsBlocked() const = 0; + + protected: + virtual void SetAllowMacroInstructions(bool allow) = 0; + + virtual void BlockPools() = 0; + virtual void ReleasePools() = 0; + virtual void EnsureEmitPoolsFor(size_t size) = 0; + + // Emit the branch over a literal/veneer pool, and any necessary padding + // before it. + virtual void EmitPoolHeader() = 0; + // When this is called, the label used for branching over the pool is bound. + // This can also generate additional padding, which must correspond to the + // alignment_ value passed to the PoolManager (which needs to keep track of + // the exact size of the generated pool). + virtual void EmitPoolFooter() = 0; + + // Emit n bytes of padding that does not have to be executable. + virtual void EmitPaddingBytes(int n) = 0; + // Emit n bytes of padding that has to be executable. Implementations must + // make sure this is a multiple of the instruction size. + virtual void EmitNopBytes(int n) = 0; + + // The following scopes need access to the above method in order to implement + // pool blocking and temporarily disable the macro-assembler. + friend class ExactAssemblyScope; + friend class EmissionCheckScope; + template + friend class PoolManager; +}; + +} // namespace vixl + +#endif // VIXL_MACRO_ASSEMBLER_INTERFACE_H diff --git a/src/coreclr/jit/vixl/platform-vixl.h b/src/coreclr/jit/vixl/platform-vixl.h new file mode 100644 index 00000000000000..47f754a0c514f2 --- /dev/null +++ b/src/coreclr/jit/vixl/platform-vixl.h @@ -0,0 +1,39 @@ +// Copyright 2014, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef PLATFORM_H +#define PLATFORM_H + +// Define platform specific functionalities. +extern "C" { +#include +} + +namespace vixl { +inline void HostBreakpoint() { /*raise(2);*/ } +} // namespace vixl + +#endif diff --git a/src/coreclr/jit/vixl/pool-manager-impl.h b/src/coreclr/jit/vixl/pool-manager-impl.h new file mode 100644 index 00000000000000..bbc0e9c5573cd0 --- /dev/null +++ b/src/coreclr/jit/vixl/pool-manager-impl.h @@ -0,0 +1,522 @@ +// Copyright 2017, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef VIXL_POOL_MANAGER_IMPL_H_ +#define VIXL_POOL_MANAGER_IMPL_H_ + +#include "pool-manager.h" + +#include +#include "assembler-base-vixl.h" + +namespace vixl { + + +template +T PoolManager::Emit(MacroAssemblerInterface* masm, + T pc, + int num_bytes, + ForwardReference* new_reference, + LocationBase* new_object, + EmitOption option) { + // Make sure that the buffer still has the alignment we think it does. + VIXL_ASSERT(IsAligned(masm->AsAssemblerBase() + ->GetBuffer() + ->GetStartAddress(), + buffer_alignment_)); + + // We should not call this method when the pools are blocked. + VIXL_ASSERT(!IsBlocked()); + if (objects_.empty()) return pc; + + // Emit header. + if (option == kBranchRequired) { + masm->EmitPoolHeader(); + // TODO: The pc at this point might not actually be aligned according to + // alignment_. This is to support the current AARCH32 MacroAssembler which + // does not have a fixed size instruction set. In practice, the pc will be + // aligned to the alignment instructions need for the current instruction + // set, so we do not need to align it here. All other calculations do take + // the alignment into account, which only makes the checkpoint calculations + // more conservative when we use T32. Uncomment the following assertion if + // the AARCH32 MacroAssembler is modified to only support one ISA at the + // time. + // VIXL_ASSERT(pc == AlignUp(pc, alignment_)); + pc += header_size_; + } else { + // If the header is optional, we might need to add some extra padding to + // meet the minimum location of the first object. + if (pc < objects_[0].min_location_) { + int32_t padding = objects_[0].min_location_ - pc; + masm->EmitNopBytes(padding); + pc += padding; + } + } + + PoolObject* existing_object = GetObjectIfTracked(new_object); + + // Go through all objects and emit one by one. + for (objects_iter iter = objects_.begin(); iter != objects_.end();) { + PoolObject& current = *iter; + if (ShouldSkipObject(¤t, + pc, + num_bytes, + new_reference, + new_object, + existing_object)) { + ++iter; + continue; + } + LocationBase* label_base = current.label_base_; + T aligned_pc = AlignUp(pc, current.alignment_); + masm->EmitPaddingBytes(aligned_pc - pc); + pc = aligned_pc; + VIXL_ASSERT(pc >= current.min_location_); + VIXL_ASSERT(pc <= current.max_location_); + // First call SetLocation, which will also resolve the references, and then + // call EmitPoolObject, which might add a new reference. + label_base->SetLocation(masm->AsAssemblerBase(), pc); + label_base->EmitPoolObject(masm); + int object_size = label_base->GetPoolObjectSizeInBytes(); + if (label_base->ShouldDeletePoolObjectOnPlacement()) { + label_base->MarkBound(); + iter = RemoveAndDelete(iter); + } else { + VIXL_ASSERT(!current.label_base_->ShouldDeletePoolObjectOnPlacement()); + current.label_base_->UpdatePoolObject(¤t); + VIXL_ASSERT(current.alignment_ >= label_base->GetPoolObjectAlignment()); + ++iter; + } + pc += object_size; + } + + // Recalculate the checkpoint before emitting the footer. The footer might + // call Bind() which will check if we need to emit. + RecalculateCheckpoint(); + + // Always emit footer - this might add some padding. + masm->EmitPoolFooter(); + pc = AlignUp(pc, alignment_); + + return pc; +} + +template +bool PoolManager::ShouldSkipObject(PoolObject* pool_object, + T pc, + int num_bytes, + ForwardReference* new_reference, + LocationBase* new_object, + PoolObject* existing_object) const { + // We assume that all objects before this have been skipped and all objects + // after this will be emitted, therefore we will emit the whole pool. Add + // the header size and alignment, as well as the number of bytes we are + // planning to emit. + T max_actual_location = pc + num_bytes + max_pool_size_; + + if (new_reference != NULL) { + // If we're adding a new object, also assume that it will have to be emitted + // before the object we are considering to skip. + VIXL_ASSERT(new_object != NULL); + T new_object_alignment = std::max(new_reference->object_alignment_, + new_object->GetPoolObjectAlignment()); + if ((existing_object != NULL) && + (existing_object->alignment_ > new_object_alignment)) { + new_object_alignment = existing_object->alignment_; + } + max_actual_location += + (new_object->GetPoolObjectSizeInBytes() + new_object_alignment - 1); + } + + // Hard limit. + if (max_actual_location >= pool_object->max_location_) return false; + + // Use heuristic. + return (pc < pool_object->skip_until_location_hint_); +} + +template +T PoolManager::UpdateCheckpointForObject(T checkpoint, + const PoolObject* object) { + checkpoint -= object->label_base_->GetPoolObjectSizeInBytes(); + if (checkpoint > object->max_location_) checkpoint = object->max_location_; + checkpoint = AlignDown(checkpoint, object->alignment_); + return checkpoint; +} + +template +static T MaxCheckpoint() { + return std::numeric_limits::max(); +} + +template +static inline bool CheckCurrentPC(T pc, T checkpoint) { + VIXL_ASSERT(pc <= checkpoint); + // We must emit the pools if we are at the checkpoint now. + return pc == checkpoint; +} + +template +static inline bool CheckFuturePC(T pc, T checkpoint) { + // We do not need to emit the pools now if the projected future PC will be + // equal to the checkpoint (we will need to emit the pools then). + return pc > checkpoint; +} + +template +bool PoolManager::MustEmit(T pc, + int num_bytes, + ForwardReference* reference, + LocationBase* label_base) const { + // Check if we are at or past the checkpoint. + if (CheckCurrentPC(pc, checkpoint_)) return true; + + // Check if the future PC will be past the checkpoint. + pc += num_bytes; + if (CheckFuturePC(pc, checkpoint_)) return true; + + // No new reference - nothing to do. + if (reference == NULL) { + VIXL_ASSERT(label_base == NULL); + return false; + } + + if (objects_.empty()) { + // Basic assertions that restrictions on the new (and only) reference are + // possible to satisfy. + VIXL_ASSERT(AlignUp(pc + header_size_, alignment_) >= + reference->min_object_location_); + VIXL_ASSERT(pc <= reference->max_object_location_); + return false; + } + + // Check if the object is already being tracked. + const PoolObject* existing_object = GetObjectIfTracked(label_base); + if (existing_object != NULL) { + // If the existing_object is already in existing_objects_ and its new + // alignment and new location restrictions are not stricter, skip the more + // expensive check. + if ((reference->min_object_location_ <= existing_object->min_location_) && + (reference->max_object_location_ >= existing_object->max_location_) && + (reference->object_alignment_ <= existing_object->alignment_)) { + return false; + } + } + + // Create a temporary object. + PoolObject temp(label_base); + temp.RestrictRange(reference->min_object_location_, + reference->max_object_location_); + temp.RestrictAlignment(reference->object_alignment_); + if (existing_object != NULL) { + temp.RestrictRange(existing_object->min_location_, + existing_object->max_location_); + temp.RestrictAlignment(existing_object->alignment_); + } + + // Check if the new reference can be added after the end of the current pool. + // If yes, we don't need to emit. + T last_reachable = AlignDown(temp.max_location_, temp.alignment_); + const PoolObject& last = objects_.back(); + T after_pool = AlignDown(last.max_location_, last.alignment_) + + last.label_base_->GetPoolObjectSizeInBytes(); + // The current object can be placed at the end of the pool, even if the last + // object is placed at the last possible location. + if (last_reachable >= after_pool) return false; + // The current object can be placed after the code we are about to emit and + // after the existing pool (with a pessimistic size estimate). + if (last_reachable >= pc + num_bytes + max_pool_size_) return false; + + // We're not in a trivial case, so we need to recalculate the checkpoint. + + // Check (conservatively) if we can fit it into the objects_ array, without + // breaking our assumptions. Here we want to recalculate the checkpoint as + // if the new reference was added to the PoolManager but without actually + // adding it (as removing it is non-trivial). + + T checkpoint = MaxCheckpoint(); + // Will temp be the last object in objects_? + if (PoolObjectLessThan(last, temp)) { + checkpoint = UpdateCheckpointForObject(checkpoint, &temp); + if (checkpoint < temp.min_location_) return true; + } + + bool temp_not_placed_yet = true; + for (int i = static_cast(objects_.size()) - 1; i >= 0; --i) { + const PoolObject& current = objects_[i]; + if (temp_not_placed_yet && PoolObjectLessThan(current, temp)) { + checkpoint = UpdateCheckpointForObject(checkpoint, &temp); + if (checkpoint < temp.min_location_) return true; + if (CheckFuturePC(pc, checkpoint)) return true; + temp_not_placed_yet = false; + } + if (current.label_base_ == label_base) continue; + checkpoint = UpdateCheckpointForObject(checkpoint, ¤t); + if (checkpoint < current.min_location_) return true; + if (CheckFuturePC(pc, checkpoint)) return true; + } + // temp is the object with the smallest max_location_. + if (temp_not_placed_yet) { + checkpoint = UpdateCheckpointForObject(checkpoint, &temp); + if (checkpoint < temp.min_location_) return true; + } + + // Take the header into account. + checkpoint -= header_size_; + checkpoint = AlignDown(checkpoint, alignment_); + + return CheckFuturePC(pc, checkpoint); +} + +template +void PoolManager::RecalculateCheckpoint(SortOption sort_option) { + // TODO: Improve the max_pool_size_ estimate by starting from the + // min_location_ of the first object, calculating the end of the pool as if + // all objects were placed starting from there, and in the end adding the + // maximum object alignment found minus one (which is the maximum extra + // padding we would need if we were to relocate the pool to a different + // address). + max_pool_size_ = 0; + + if (objects_.empty()) { + checkpoint_ = MaxCheckpoint(); + return; + } + + // Sort objects by their max_location_. + if (sort_option == kSortRequired) { + std::sort(objects_.begin(), objects_.end(), PoolObjectLessThan); + } + + // Add the header size and header and footer max alignment to the maximum + // pool size. + max_pool_size_ += header_size_ + 2 * (alignment_ - 1); + + T checkpoint = MaxCheckpoint(); + int last_object_index = static_cast(objects_.size()) - 1; + for (int i = last_object_index; i >= 0; --i) { + // Bring back the checkpoint by the size of the current object, unless + // we need to bring it back more, then align. + PoolObject& current = objects_[i]; + checkpoint = UpdateCheckpointForObject(checkpoint, ¤t); + VIXL_ASSERT(checkpoint >= current.min_location_); + max_pool_size_ += (current.alignment_ - 1 + + current.label_base_->GetPoolObjectSizeInBytes()); + } + // Take the header into account. + checkpoint -= header_size_; + checkpoint = AlignDown(checkpoint, alignment_); + + // Update the checkpoint of the pool manager. + checkpoint_ = checkpoint; + + // NOTE: To handle min_location_ in the generic case, we could make a second + // pass of the objects_ vector, increasing the checkpoint as needed, while + // maintaining the alignment requirements. + // It should not be possible to have any issues with min_location_ with actual + // code, since there should always be some kind of branch over the pool, + // whether introduced by the pool emission or by the user, which will make + // sure the min_location_ requirement is satisfied. It's possible that the + // user could emit code in the literal pool and intentionally load the first + // value and then fall-through into the pool, but that is not a supported use + // of VIXL and we will assert in that case. +} + +template +bool PoolManager::PoolObjectLessThan(const PoolObject& a, + const PoolObject& b) { + if (a.max_location_ != b.max_location_) + return (a.max_location_ < b.max_location_); + int a_size = a.label_base_->GetPoolObjectSizeInBytes(); + int b_size = b.label_base_->GetPoolObjectSizeInBytes(); + if (a_size != b_size) return (a_size < b_size); + if (a.alignment_ != b.alignment_) return (a.alignment_ < b.alignment_); + if (a.min_location_ != b.min_location_) + return (a.min_location_ < b.min_location_); + return false; +} + +template +void PoolManager::AddObjectReference(const ForwardReference* reference, + LocationBase* label_base) { + VIXL_ASSERT(reference->object_alignment_ <= buffer_alignment_); + VIXL_ASSERT(label_base->GetPoolObjectAlignment() <= buffer_alignment_); + + PoolObject* object = GetObjectIfTracked(label_base); + + if (object == NULL) { + PoolObject new_object(label_base); + new_object.RestrictRange(reference->min_object_location_, + reference->max_object_location_); + new_object.RestrictAlignment(reference->object_alignment_); + Insert(new_object); + } else { + object->RestrictRange(reference->min_object_location_, + reference->max_object_location_); + object->RestrictAlignment(reference->object_alignment_); + + // Move the object, if needed. + if (objects_.size() != 1) { + PoolObject new_object(*object); + ptrdiff_t distance = std::distance(objects_.data(), object); + objects_.erase(objects_.begin() + distance); + Insert(new_object); + } + } + // No need to sort, we inserted the object in an already sorted array. + RecalculateCheckpoint(kNoSortRequired); +} + +template +void PoolManager::Insert(const PoolObject& new_object) { + bool inserted = false; + // Place the object in the right position. + for (objects_iter iter = objects_.begin(); iter != objects_.end(); ++iter) { + PoolObject& current = *iter; + if (!PoolObjectLessThan(current, new_object)) { + objects_.insert(iter, new_object); + inserted = true; + break; + } + } + if (!inserted) { + objects_.push_back(new_object); + } +} + +template +void PoolManager::RemoveAndDelete(PoolObject* object) { + for (objects_iter iter = objects_.begin(); iter != objects_.end(); ++iter) { + PoolObject& current = *iter; + if (current.label_base_ == object->label_base_) { + (void)RemoveAndDelete(iter); + return; + } + } + VIXL_UNREACHABLE(); +} + +template +typename PoolManager::objects_iter PoolManager::RemoveAndDelete( + objects_iter iter) { + PoolObject& object = *iter; + LocationBase* label_base = object.label_base_; + + // Check if we also need to delete the LocationBase object. + if (label_base->ShouldBeDeletedOnPoolManagerDestruction()) { + delete_on_destruction_.push_back(label_base); + } + if (label_base->ShouldBeDeletedOnPlacementByPoolManager()) { + VIXL_ASSERT(!label_base->ShouldBeDeletedOnPoolManagerDestruction()); + delete label_base; + } + + return objects_.erase(iter); +} + +template +T PoolManager::Bind(MacroAssemblerInterface* masm, + LocationBase* object, + T location) { + PoolObject* existing_object = GetObjectIfTracked(object); + int alignment; + T min_location; + if (existing_object == NULL) { + alignment = object->GetMaxAlignment(); + min_location = object->GetMinLocation(); + } else { + alignment = existing_object->alignment_; + min_location = existing_object->min_location_; + } + + // Align if needed, and add necessary padding to reach the min_location_. + T aligned_location = AlignUp(location, alignment); + masm->EmitNopBytes(aligned_location - location); + location = aligned_location; + while (location < min_location) { + masm->EmitNopBytes(alignment); + location += alignment; + } + + object->SetLocation(masm->AsAssemblerBase(), location); + object->MarkBound(); + + if (existing_object != NULL) { + RemoveAndDelete(existing_object); + // No need to sort, we removed the object from a sorted array. + RecalculateCheckpoint(kNoSortRequired); + } + + // We assume that the maximum padding we can possibly add here is less + // than the header alignment - hence that we're not going to go past our + // checkpoint. + VIXL_ASSERT(!CheckFuturePC(location, checkpoint_)); + return location; +} + +template +void PoolManager::Release(T pc) { + USE(pc); + if (--monitor_ == 0) { + // Ensure the pool has not been blocked for too long. + VIXL_ASSERT(pc <= checkpoint_); + } +} + +template +PoolManager::~PoolManager() VIXL_NEGATIVE_TESTING_ALLOW_EXCEPTION { +#ifdef VIXL_DEBUG + // Check for unbound objects. + for (objects_iter iter = objects_.begin(); iter != objects_.end(); ++iter) { + // There should not be any bound objects left in the pool. For unbound + // objects, we will check in the destructor of the object itself. + VIXL_ASSERT(!(*iter).label_base_->IsBound()); + } +#endif + // Delete objects the pool manager owns. + for (typename jitstd::vector*>::iterator + iter = delete_on_destruction_.begin(), + end = delete_on_destruction_.end(); + iter != end; + ++iter) { + delete *iter; + } +} + +template +int PoolManager::GetPoolSizeForTest() const { + // Iterate over objects and return their cumulative size. This does not take + // any padding into account, just the size of the objects themselves. + int size = 0; + for (const_objects_iter iter = objects_.begin(); iter != objects_.end(); + ++iter) { + size += (*iter).label_base_->GetPoolObjectSizeInBytes(); + } + return size; +} +} + +#endif // VIXL_POOL_MANAGER_IMPL_H_ diff --git a/src/coreclr/jit/vixl/pool-manager.h b/src/coreclr/jit/vixl/pool-manager.h new file mode 100644 index 00000000000000..1f56e09d67b84f --- /dev/null +++ b/src/coreclr/jit/vixl/pool-manager.h @@ -0,0 +1,555 @@ +// Copyright 2017, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef VIXL_POOL_MANAGER_H_ +#define VIXL_POOL_MANAGER_H_ + +#include + +#include +#include +#include +#include + +#include "globals-vixl.h" +#include "macro-assembler-interface.h" +#include "utils-vixl.h" + +namespace vixl { + +class TestPoolManager; + +// There are four classes declared in this header file: +// PoolManager, PoolObject, ForwardReference and LocationBase. + +// The PoolManager manages both literal and veneer pools, and is designed to be +// shared between AArch32 and AArch64. A pool is represented as an abstract +// collection of references to objects. The manager does not need to know +// architecture-specific details about literals and veneers; the actual +// emission of the pool objects is delegated. +// +// Literal and Label will derive from LocationBase. The MacroAssembler will +// create these objects as instructions that reference pool objects are +// encountered, and ask the PoolManager to track them. The PoolManager will +// create an internal PoolObject object for each object derived from +// LocationBase. Some of these PoolObject objects will be deleted when placed +// (e.g. the ones corresponding to Literals), whereas others will be updated +// with a new range when placed (e.g. Veneers) and deleted when Bind() is +// called on the PoolManager with their corresponding object as a parameter. +// +// A ForwardReference represents a reference to a PoolObject that will be +// placed later in the instruction stream. Each ForwardReference may only refer +// to one PoolObject, but many ForwardReferences may refer to the same +// object. +// +// A PoolObject represents an object that has not yet been placed. The final +// location of a PoolObject (and hence the LocationBase object to which it +// corresponds) is constrained mostly by the instructions that refer to it, but +// PoolObjects can also have inherent constraints, such as alignment. +// +// LocationBase objects, unlike PoolObject objects, can be used outside of the +// pool manager (e.g. as manually placed literals, which may still have +// forward references that need to be resolved). +// +// At the moment, each LocationBase will have at most one PoolObject that keeps +// the relevant information for placing this object in the pool. When that +// object is placed, all forward references of the object are resolved. For +// that reason, we do not need to keep track of the ForwardReference objects in +// the PoolObject. + +// T is an integral type used for representing locations. For a 32-bit +// architecture it will typically be int32_t, whereas for a 64-bit +// architecture it will be int64_t. +template +class ForwardReference; +template +class PoolObject; +template +class PoolManager; + +// Represents an object that has a size and alignment, and either has a known +// location or has not been placed yet. An object of a subclass of LocationBase +// will typically keep track of a number of ForwardReferences when it has not +// yet been placed, but LocationBase does not assume or implement that +// functionality. LocationBase provides virtual methods for emitting the +// object, updating all the forward references, and giving the PoolManager +// information on the lifetime of this object and the corresponding PoolObject. +template +class LocationBase { + public: + // The size of a LocationBase object is restricted to 4KB, in order to avoid + // situations where the size of the pool becomes larger than the range of + // an unconditional branch. This cannot happen without having large objects, + // as typically the range of an unconditional branch is the larger range + // an instruction supports. + // TODO: This would ideally be an architecture-specific value, perhaps + // another template parameter. + static const int kMaxObjectSize = 4 * KBytes; + + // By default, LocationBase objects are aligned naturally to their size. + LocationBase(uint32_t type, int size) + : pool_object_size_(size), + pool_object_alignment_(size), + pool_object_type_(type), + is_bound_(false), + location_(0) { + VIXL_ASSERT(size > 0); + VIXL_ASSERT(size <= kMaxObjectSize); + VIXL_ASSERT(IsPowerOf2(size)); + } + + // Allow alignment to be specified, as long as it is smaller than the size. + LocationBase(uint32_t type, int size, int alignment) + : pool_object_size_(size), + pool_object_alignment_(alignment), + pool_object_type_(type), + is_bound_(false), + location_(0) { + VIXL_ASSERT(size > 0); + VIXL_ASSERT(size <= kMaxObjectSize); + VIXL_ASSERT(IsPowerOf2(alignment)); + VIXL_ASSERT(alignment <= size); + } + + // Constructor for locations that are already bound. + explicit LocationBase(T location) + : pool_object_size_(-1), + pool_object_alignment_(-1), + pool_object_type_(0), + is_bound_(true), + location_(location) {} + + virtual ~LocationBase() VIXL_NEGATIVE_TESTING_ALLOW_EXCEPTION {} + + // The PoolManager should assume ownership of some objects, and delete them + // after they have been placed. This can happen for example for literals that + // are created internally to the MacroAssembler and the user doesn't get a + // handle to. By default, the PoolManager will not do this. + virtual bool ShouldBeDeletedOnPlacementByPoolManager() const { return false; } + // The PoolManager should assume ownership of some objects, and delete them + // when it is destroyed. By default, the PoolManager will not do this. + virtual bool ShouldBeDeletedOnPoolManagerDestruction() const { return false; } + + // Emit the PoolObject. Derived classes will implement this method to emit + // the necessary data and/or code (for example, to emit a literal or a + // veneer). This should not add padding, as it is added explicitly by the pool + // manager. + virtual void EmitPoolObject(MacroAssemblerInterface* masm) = 0; + + // Resolve the references to this object. Will encode the necessary offset + // in the instruction corresponding to each reference and then delete it. + // TODO: An alternative here would be to provide a ResolveReference() + // method that only asks the LocationBase to resolve a specific reference + // (thus allowing the pool manager to resolve some of the references only). + // This would mean we need to have some kind of API to get all the references + // to a LabelObject. + virtual void ResolveReferences(internal::AssemblerBase* assembler) = 0; + + // Returns true when the PoolObject corresponding to this LocationBase object + // needs to be removed from the pool once placed, and false if it needs to + // be updated instead (in which case UpdatePoolObject will be called). + virtual bool ShouldDeletePoolObjectOnPlacement() const { return true; } + + // Update the PoolObject after placing it, if necessary. This will happen for + // example in the case of a placed veneer, where we need to use a new updated + // range and a new reference (from the newly added branch instruction). + // By default, this does nothing, to avoid forcing objects that will not need + // this to have an empty implementation. + virtual void UpdatePoolObject(PoolObject*) {} + + // Implement heuristics for emitting this object. If a margin is to be used + // as a hint during pool emission, we will try not to emit the object if we + // are further away from the maximum reachable location by more than the + // margin. + virtual bool UsePoolObjectEmissionMargin() const { return false; } + virtual T GetPoolObjectEmissionMargin() const { + VIXL_ASSERT(UsePoolObjectEmissionMargin() == false); + return 0; + } + + int GetPoolObjectSizeInBytes() const { return pool_object_size_; } + int GetPoolObjectAlignment() const { return pool_object_alignment_; } + uint32_t GetPoolObjectType() const { return pool_object_type_; } + + bool IsBound() const { return is_bound_; } + T GetLocation() const { return location_; } + + // This function can be called multiple times before the object is marked as + // bound with MarkBound() below. This is because some objects (e.g. the ones + // used to represent labels) can have veneers; every time we place a veneer + // we need to keep track of the location in order to resolve the references + // to the object. Reusing the location_ field for this is convenient. + void SetLocation(internal::AssemblerBase* assembler, T location) { + VIXL_ASSERT(!is_bound_); + location_ = location; + ResolveReferences(assembler); + } + + void MarkBound() { + VIXL_ASSERT(!is_bound_); + is_bound_ = true; + } + + // The following two functions are used when an object is bound by a call to + // PoolManager::Bind(). + virtual int GetMaxAlignment() const { + VIXL_ASSERT(!ShouldDeletePoolObjectOnPlacement()); + return 1; + } + virtual T GetMinLocation() const { + VIXL_ASSERT(!ShouldDeletePoolObjectOnPlacement()); + return 0; + } + + private: + // The size of the corresponding PoolObject, in bytes. + int pool_object_size_; + // The alignment of the corresponding PoolObject; this must be a power of two. + int pool_object_alignment_; + + // Different derived classes should have different type values. This can be + // used internally by the PoolManager for grouping of objects. + uint32_t pool_object_type_; + // Has the object been bound to a location yet? + bool is_bound_; + + protected: + // See comment on SetLocation() for the use of this field. + T location_; +}; + +template +class PoolObject { + public: + // By default, PoolObjects have no inherent position constraints. + explicit PoolObject(LocationBase* parent) + : label_base_(parent), + min_location_(0), + max_location_(std::numeric_limits::max()), + alignment_(parent->GetPoolObjectAlignment()), + skip_until_location_hint_(0), + type_(parent->GetPoolObjectType()) { + VIXL_ASSERT(IsPowerOf2(alignment_)); + UpdateLocationHint(); + } + + // Reset the minimum and maximum location and the alignment of the object. + // This function is public in order to allow the LocationBase corresponding to + // this PoolObject to update the PoolObject when placed, e.g. in the case of + // veneers. The size and type of the object cannot be modified. + void Update(T min, T max, int alignment) { + // We don't use RestrictRange here as the new range is independent of the + // old range (and the maximum location is typically larger). + min_location_ = min; + max_location_ = max; + RestrictAlignment(alignment); + UpdateLocationHint(); + } + + private: + void RestrictRange(T min, T max) { + VIXL_ASSERT(min <= max_location_); + VIXL_ASSERT(max >= min_location_); + min_location_ = std::max(min_location_, min); + max_location_ = min(max_location_, max); + UpdateLocationHint(); + } + + void RestrictAlignment(int alignment) { + VIXL_ASSERT(IsPowerOf2(alignment)); + VIXL_ASSERT(IsPowerOf2(alignment_)); + alignment_ = std::max(alignment_, alignment); + } + + void UpdateLocationHint() { + if (label_base_->UsePoolObjectEmissionMargin()) { + skip_until_location_hint_ = + max_location_ - label_base_->GetPoolObjectEmissionMargin(); + } + } + + // The LocationBase that this pool object represents. + LocationBase* label_base_; + + // Hard, precise location constraints for the start location of the object. + // They are both inclusive, that is the start location of the object can be + // at any location between min_location_ and max_location_, themselves + // included. + T min_location_; + T max_location_; + + // The alignment must be a power of two. + int alignment_; + + // Avoid generating this object until skip_until_location_hint_. This + // supports cases where placing the object in the pool has an inherent cost + // that could be avoided in some other way. Veneers are a typical example; we + // would prefer to branch directly (over a pool) rather than use veneers, so + // this value can be set using some heuristic to leave them in the pool. + // This value is only a hint, which will be ignored if it has to in order to + // meet the hard constraints we have. + T skip_until_location_hint_; + + // Used only to group objects of similar type together. The PoolManager does + // not know what the types represent. + uint32_t type_; + + friend class PoolManager; +}; + +// Class that represents a forward reference. It is the responsibility of +// LocationBase objects to keep track of forward references and patch them when +// an object is placed - this class is only used by the PoolManager in order to +// restrict the requirements on PoolObjects it is tracking. +template +class ForwardReference { + public: + ForwardReference(T location, + int size, + T min_object_location, + T max_object_location, + int object_alignment = 1) + : location_(location), + size_(size), + object_alignment_(object_alignment), + min_object_location_(min_object_location), + max_object_location_(max_object_location) { + VIXL_ASSERT(AlignDown(max_object_location, object_alignment) >= + min_object_location); + } + + bool LocationIsEncodable(T location) const { + return location >= min_object_location_ && + location <= max_object_location_ && + IsAligned(location, object_alignment_); + } + + T GetLocation() const { return location_; } + T GetMinLocation() const { return min_object_location_; } + T GetMaxLocation() const { return max_object_location_; } + int GetAlignment() const { return object_alignment_; } + + // Needed for InvalSet. + void SetLocationToInvalidateOnly(T location) { location_ = location; } + + private: + // The location of the thing that contains the reference. For example, this + // can be the location of the branch or load instruction. + T location_; + + // The size of the instruction that makes the reference, in bytes. + int size_; + + // The alignment that the object must satisfy for this reference - must be a + // power of two. + int object_alignment_; + + // Specify the possible locations where the object could be stored. AArch32's + // PC offset, and T32's PC alignment calculations should be applied by the + // Assembler, not here. The PoolManager deals only with simple locationes. + // Including min_object_adddress_ is necessary to handle AArch32 some + // instructions which have a minimum offset of 0, but also have the implicit + // PC offset. + // Note that this structure cannot handle sparse ranges, such as A32's ADR, + // but doing so is costly and probably not useful in practice. The min and + // and max object location both refer to the beginning of the object, are + // inclusive and are not affected by the object size. E.g. if + // max_object_location_ is equal to X, we can place the object at location X + // regardless of its size. + T min_object_location_; + T max_object_location_; + + friend class PoolManager; +}; + + +template +class PoolManager { + public: + PoolManager(int header_size, int alignment, int buffer_alignment) + : header_size_(header_size), + alignment_(alignment), + buffer_alignment_(buffer_alignment), + checkpoint_(std::numeric_limits::max()), + max_pool_size_(0), + monitor_(0) {} + + ~PoolManager() VIXL_NEGATIVE_TESTING_ALLOW_EXCEPTION; + + // Check if we will need to emit the pool at location 'pc', when planning to + // generate a certain number of bytes. This optionally takes a + // ForwardReference we are about to generate, in which case the size of the + // reference must be included in 'num_bytes'. + bool MustEmit(T pc, + int num_bytes = 0, + ForwardReference* reference = NULL, + LocationBase* object = NULL) const; + + enum EmitOption { kBranchRequired, kNoBranchRequired }; + + // Emit the pool at location 'pc', using 'masm' as the macroassembler. + // The branch over the header can be optionally omitted using 'option'. + // Returns the new PC after pool emission. + // This expects a number of bytes that are about to be emitted, to be taken + // into account in heuristics for pool object emission. + // This also optionally takes a forward reference and an object as + // parameters, to be used in the case where emission of the pool is triggered + // by adding a new reference to the pool that does not fit. The pool manager + // will need this information in order to apply its heuristics correctly. + T Emit(MacroAssemblerInterface* masm, + T pc, + int num_bytes = 0, + ForwardReference* new_reference = NULL, + LocationBase* new_object = NULL, + EmitOption option = kBranchRequired); + + // Add 'reference' to 'object'. Should not be preceded by a call to MustEmit() + // that returned true, unless Emit() has been successfully afterwards. + void AddObjectReference(const ForwardReference* reference, + LocationBase* object); + + // This is to notify the pool that a LocationBase has been bound to a location + // and does not need to be tracked anymore. + // This will happen, for example, for Labels, which are manually bound by the + // user. + // This can potentially add some padding bytes in order to meet the object + // requirements, and will return the new location. + T Bind(MacroAssemblerInterface* masm, LocationBase* object, T location); + + // Functions for blocking and releasing the pools. + void Block() { monitor_++; } + void Release(T pc); + bool IsBlocked() const { return monitor_ != 0; } + + private: + typedef typename jitstd::vector >::iterator objects_iter; + typedef + typename jitstd::vector >::const_iterator const_objects_iter; + + PoolObject* GetObjectIfTracked(LocationBase* label) { + return const_cast*>( + static_cast*>(this)->GetObjectIfTracked(label)); + } + + const PoolObject* GetObjectIfTracked(LocationBase* label) const { + for (const_objects_iter iter = objects_.begin(); iter != objects_.end(); + ++iter) { + const PoolObject& current = *iter; + if (current.label_base_ == label) return ¤t; + } + return NULL; + } + + // Helper function for calculating the checkpoint. + enum SortOption { kSortRequired, kNoSortRequired }; + void RecalculateCheckpoint(SortOption sort_option = kSortRequired); + + // Comparison function for using std::sort() on objects_. PoolObject A is + // ordered before PoolObject B when A should be emitted before B. The + // comparison depends on the max_location_, size_, alignment_ and + // min_location_. + static bool PoolObjectLessThan(const PoolObject& a, + const PoolObject& b); + + // Helper function used in the checkpoint calculation. 'checkpoint' is the + // current checkpoint, which is modified to take 'object' into account. The + // new checkpoint is returned. + static T UpdateCheckpointForObject(T checkpoint, const PoolObject* object); + + // Helper function to add a new object into a sorted objects_ array. + void Insert(const PoolObject& new_object); + + // Helper functions to remove an object from objects_ and delete the + // corresponding LocationBase object, if necessary. This will be called + // either after placing the object, or when Bind() is called. + void RemoveAndDelete(PoolObject* object); + objects_iter RemoveAndDelete(objects_iter iter); + + // Helper function to check if we should skip emitting an object. + bool ShouldSkipObject(PoolObject* pool_object, + T pc, + int num_bytes, + ForwardReference* new_reference, + LocationBase* new_object, + PoolObject* existing_object) const; + + // Used only for debugging. + void DumpCurrentState(T pc) const; + + // Methods used for testing only, via the test friend classes. + bool PoolIsEmptyForTest() const { return objects_.empty(); } + T GetCheckpointForTest() const { return checkpoint_; } + int GetPoolSizeForTest() const; + + // The objects we are tracking references to. The objects_ vector is sorted + // at all times between calls to the public members of the PoolManager. It + // is sorted every time we add, delete or update a PoolObject. + // TODO: Consider a more efficient data structure here, to allow us to delete + // elements as we emit them. + jitstd::vector > objects_; + + // Objects to be deleted on pool destruction. + jitstd::vector*> delete_on_destruction_; + + // The header_size_ and alignment_ values are hardcoded for each instance of + // PoolManager. The PoolManager does not know how to emit the header, and + // relies on the EmitPoolHeader and EndPool methods of the + // MacroAssemblerInterface for that. It will also emit padding if necessary, + // both for the header and at the end of the pool, according to alignment_, + // and using the EmitNopBytes and EmitPaddingBytes method of the + // MacroAssemblerInterface. + + // The size of the header, in bytes. + int header_size_; + // The alignment of the header - must be a power of two. + int alignment_; + // The alignment of the buffer - we cannot guarantee any object alignment + // larger than this alignment. When a buffer is grown, this alignment has + // to be guaranteed. + // TODO: Consider extending this to describe the guaranteed alignment as the + // modulo of a known number. + int buffer_alignment_; + + // The current checkpoint. This is the latest location at which the pool + // *must* be emitted. This should not be visible outside the pool manager + // and should only be updated in RecalculateCheckpoint. + T checkpoint_; + + // Maximum size of the pool, assuming we need the maximum possible padding + // for each object and for the header. It is only updated in + // RecalculateCheckpoint. + T max_pool_size_; + + // Indicates whether the emission of this pool is blocked. + int monitor_; + + friend class vixl::TestPoolManager; +}; + + +} // namespace vixl + +#endif // VIXL_POOL_MANAGER_H_ diff --git a/src/coreclr/jit/vixl/utils-vixl.cc b/src/coreclr/jit/vixl/utils-vixl.cc new file mode 100644 index 00000000000000..41b558686ad9e4 --- /dev/null +++ b/src/coreclr/jit/vixl/utils-vixl.cc @@ -0,0 +1,555 @@ +// Copyright 2015, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include + +#include "utils-vixl.h" + +namespace vixl { + +// The default NaN values (for FPCR.DN=1). +const double kFP64DefaultNaN = RawbitsToDouble(UINT64_C(0x7ff8000000000000)); +const float kFP32DefaultNaN = RawbitsToFloat(0x7fc00000); +const Float16 kFP16DefaultNaN = RawbitsToFloat16(0x7e00); + +// Floating-point zero values. +const Float16 kFP16PositiveZero = RawbitsToFloat16(0x0); +const Float16 kFP16NegativeZero = RawbitsToFloat16(0x8000); + +// Floating-point infinity values. +const Float16 kFP16PositiveInfinity = RawbitsToFloat16(0x7c00); +const Float16 kFP16NegativeInfinity = RawbitsToFloat16(0xfc00); +const float kFP32PositiveInfinity = RawbitsToFloat(0x7f800000); +const float kFP32NegativeInfinity = RawbitsToFloat(0xff800000); +const double kFP64PositiveInfinity = + RawbitsToDouble(UINT64_C(0x7ff0000000000000)); +const double kFP64NegativeInfinity = + RawbitsToDouble(UINT64_C(0xfff0000000000000)); + +bool IsZero(Float16 value) { + uint16_t bits = Float16ToRawbits(value); + return (bits == Float16ToRawbits(kFP16PositiveZero) || + bits == Float16ToRawbits(kFP16NegativeZero)); +} + +uint16_t Float16ToRawbits(Float16 value) { return value.rawbits_; } + +uint32_t FloatToRawbits(float value) { + uint32_t bits = 0; + memcpy(&bits, &value, 4); + return bits; +} + + +uint64_t DoubleToRawbits(double value) { + uint64_t bits = 0; + memcpy(&bits, &value, 8); + return bits; +} + + +Float16 RawbitsToFloat16(uint16_t bits) { + Float16 f; + f.rawbits_ = bits; + return f; +} + + +float RawbitsToFloat(uint32_t bits) { + float value = 0.0; + memcpy(&value, &bits, 4); + return value; +} + + +double RawbitsToDouble(uint64_t bits) { + double value = 0.0; + memcpy(&value, &bits, 8); + return value; +} + + +uint32_t Float16Sign(internal::SimFloat16 val) { + uint16_t rawbits = Float16ToRawbits(val); + return ExtractUnsignedBitfield32(15, 15, rawbits); +} + + +uint32_t Float16Exp(internal::SimFloat16 val) { + uint16_t rawbits = Float16ToRawbits(val); + return ExtractUnsignedBitfield32(14, 10, rawbits); +} + +uint32_t Float16Mantissa(internal::SimFloat16 val) { + uint16_t rawbits = Float16ToRawbits(val); + return ExtractUnsignedBitfield32(9, 0, rawbits); +} + + +uint32_t FloatSign(float val) { + uint32_t rawbits = FloatToRawbits(val); + return ExtractUnsignedBitfield32(31, 31, rawbits); +} + + +uint32_t FloatExp(float val) { + uint32_t rawbits = FloatToRawbits(val); + return ExtractUnsignedBitfield32(30, 23, rawbits); +} + + +uint32_t FloatMantissa(float val) { + uint32_t rawbits = FloatToRawbits(val); + return ExtractUnsignedBitfield32(22, 0, rawbits); +} + + +uint32_t DoubleSign(double val) { + uint64_t rawbits = DoubleToRawbits(val); + return static_cast(ExtractUnsignedBitfield64(63, 63, rawbits)); +} + + +uint32_t DoubleExp(double val) { + uint64_t rawbits = DoubleToRawbits(val); + return static_cast(ExtractUnsignedBitfield64(62, 52, rawbits)); +} + + +uint64_t DoubleMantissa(double val) { + uint64_t rawbits = DoubleToRawbits(val); + return ExtractUnsignedBitfield64(51, 0, rawbits); +} + + +internal::SimFloat16 Float16Pack(uint16_t sign, + uint16_t exp, + uint16_t mantissa) { + uint16_t bits = (sign << 15) | (exp << 10) | mantissa; + return RawbitsToFloat16(bits); +} + + +float FloatPack(uint32_t sign, uint32_t exp, uint32_t mantissa) { + uint32_t bits = (sign << 31) | (exp << 23) | mantissa; + return RawbitsToFloat(bits); +} + + +double DoublePack(uint64_t sign, uint64_t exp, uint64_t mantissa) { + uint64_t bits = (sign << 63) | (exp << 52) | mantissa; + return RawbitsToDouble(bits); +} + + +int Float16Classify(Float16 value) { + uint16_t bits = Float16ToRawbits(value); + uint16_t exponent_max = (1 << 5) - 1; + uint16_t exponent_mask = exponent_max << 10; + uint16_t mantissa_mask = (1 << 10) - 1; + + uint16_t exponent = (bits & exponent_mask) >> 10; + uint16_t mantissa = bits & mantissa_mask; + if (exponent == 0) { + if (mantissa == 0) { + return FP_ZERO; + } + return FP_SUBNORMAL; + } else if (exponent == exponent_max) { + if (mantissa == 0) { + return FP_INFINITE; + } + return FP_NAN; + } + return FP_NORMAL; +} + + +unsigned CountClearHalfWords(uint64_t imm, unsigned reg_size) { + VIXL_ASSERT((reg_size % 8) == 0); + int count = 0; + for (unsigned i = 0; i < (reg_size / 16); i++) { + if ((imm & 0xffff) == 0) { + count++; + } + imm >>= 16; + } + return count; +} + + +int BitCount(uint64_t value) { return CountSetBits(value); } + +// Float16 definitions. + +Float16::Float16(double dvalue) { + rawbits_ = + Float16ToRawbits(FPToFloat16(dvalue, FPTieEven, kIgnoreDefaultNaN)); +} + +namespace internal { + +SimFloat16 SimFloat16::operator-() const { + return RawbitsToFloat16(rawbits_ ^ 0x8000); +} + +// SimFloat16 definitions. +SimFloat16 SimFloat16::operator+(SimFloat16 rhs) const { + return static_cast(*this) + static_cast(rhs); +} + +SimFloat16 SimFloat16::operator-(SimFloat16 rhs) const { + return static_cast(*this) - static_cast(rhs); +} + +SimFloat16 SimFloat16::operator*(SimFloat16 rhs) const { + return static_cast(*this) * static_cast(rhs); +} + +SimFloat16 SimFloat16::operator/(SimFloat16 rhs) const { + return static_cast(*this) / static_cast(rhs); +} + +bool SimFloat16::operator<(SimFloat16 rhs) const { + return static_cast(*this) < static_cast(rhs); +} + +bool SimFloat16::operator>(SimFloat16 rhs) const { + return static_cast(*this) > static_cast(rhs); +} + +bool SimFloat16::operator==(SimFloat16 rhs) const { + if (IsNaN(*this) || IsNaN(rhs)) { + return false; + } else if (IsZero(rhs) && IsZero(*this)) { + // +0 and -0 should be treated as equal. + return true; + } + return this->rawbits_ == rhs.rawbits_; +} + +bool SimFloat16::operator!=(SimFloat16 rhs) const { return !(*this == rhs); } + +bool SimFloat16::operator==(double rhs) const { + return static_cast(*this) == static_cast(rhs); +} + +SimFloat16::operator double() const { + return FPToDouble(*this, kIgnoreDefaultNaN); +} + +Int64 BitCount(Uint32 value) { return CountSetBits(value.Get()); } + +} // namespace internal + +float FPToFloat(Float16 value, UseDefaultNaN DN, bool* exception) { + uint16_t bits = Float16ToRawbits(value); + uint32_t sign = bits >> 15; + uint32_t exponent = + ExtractUnsignedBitfield32(kFloat16MantissaBits + kFloat16ExponentBits - 1, + kFloat16MantissaBits, + bits); + uint32_t mantissa = + ExtractUnsignedBitfield32(kFloat16MantissaBits - 1, 0, bits); + + switch (Float16Classify(value)) { + case FP_ZERO: + return (sign == 0) ? 0.0f : -0.0f; + + case FP_INFINITE: + return (sign == 0) ? kFP32PositiveInfinity : kFP32NegativeInfinity; + + case FP_SUBNORMAL: { + // Calculate shift required to put mantissa into the most-significant bits + // of the destination mantissa. + int shift = CountLeadingZeros(mantissa << (32 - 10)); + + // Shift mantissa and discard implicit '1'. + mantissa <<= (kFloatMantissaBits - kFloat16MantissaBits) + shift + 1; + mantissa &= (1 << kFloatMantissaBits) - 1; + + // Adjust the exponent for the shift applied, and rebias. + exponent = exponent - shift + (-15 + 127); + break; + } + + case FP_NAN: + if (IsSignallingNaN(value)) { + if (exception != NULL) { + *exception = true; + } + } + if (DN == kUseDefaultNaN) return kFP32DefaultNaN; + + // Convert NaNs as the processor would: + // - The sign is propagated. + // - The payload (mantissa) is transferred entirely, except that the top + // bit is forced to '1', making the result a quiet NaN. The unused + // (low-order) payload bits are set to 0. + exponent = (1 << kFloatExponentBits) - 1; + + // Increase bits in mantissa, making low-order bits 0. + mantissa <<= (kFloatMantissaBits - kFloat16MantissaBits); + mantissa |= 1 << 22; // Force a quiet NaN. + break; + + case FP_NORMAL: + // Increase bits in mantissa, making low-order bits 0. + mantissa <<= (kFloatMantissaBits - kFloat16MantissaBits); + + // Change exponent bias. + exponent += (-15 + 127); + break; + + default: + VIXL_UNREACHABLE(); + } + return RawbitsToFloat((sign << 31) | (exponent << kFloatMantissaBits) | + mantissa); +} + + +float FPToFloat(double value, + FPRounding round_mode, + UseDefaultNaN DN, + bool* exception) { + // Only the FPTieEven rounding mode is implemented. + VIXL_ASSERT((round_mode == FPTieEven) || (round_mode == FPRoundOdd)); + USE(round_mode); + + switch (std::fpclassify(value)) { + case FP_NAN: { + if (IsSignallingNaN(value)) { + if (exception != NULL) { + *exception = true; + } + } + if (DN == kUseDefaultNaN) return kFP32DefaultNaN; + + // Convert NaNs as the processor would: + // - The sign is propagated. + // - The payload (mantissa) is transferred as much as possible, except + // that the top bit is forced to '1', making the result a quiet NaN. + uint64_t raw = DoubleToRawbits(value); + + uint32_t sign = raw >> 63; + uint32_t exponent = (1 << 8) - 1; + uint32_t payload = + static_cast(ExtractUnsignedBitfield64(50, 52 - 23, raw)); + payload |= (1 << 22); // Force a quiet NaN. + + return RawbitsToFloat((sign << 31) | (exponent << 23) | payload); + } + + case FP_ZERO: + case FP_INFINITE: { + // In a C++ cast, any value representable in the target type will be + // unchanged. This is always the case for +/-0.0 and infinities. + return static_cast(value); + } + + case FP_NORMAL: + case FP_SUBNORMAL: { + // Convert double-to-float as the processor would, assuming that FPCR.FZ + // (flush-to-zero) is not set. + uint64_t raw = DoubleToRawbits(value); + // Extract the IEEE-754 double components. + uint32_t sign = raw >> 63; + // Extract the exponent and remove the IEEE-754 encoding bias. + int32_t exponent = + static_cast(ExtractUnsignedBitfield64(62, 52, raw)) - 1023; + // Extract the mantissa and add the implicit '1' bit. + uint64_t mantissa = ExtractUnsignedBitfield64(51, 0, raw); + if (std::fpclassify(value) == FP_NORMAL) { + mantissa |= (UINT64_C(1) << 52); + } + return FPRoundToFloat(sign, exponent, mantissa, round_mode); + } + } + + VIXL_UNREACHABLE(); + return value; +} + +// TODO: We should consider implementing a full FPToDouble(Float16) +// conversion function (for performance reasons). +double FPToDouble(Float16 value, UseDefaultNaN DN, bool* exception) { + // We can rely on implicit float to double conversion here. + return FPToFloat(value, DN, exception); +} + + +double FPToDouble(float value, UseDefaultNaN DN, bool* exception) { + switch (std::fpclassify(value)) { + case FP_NAN: { + if (IsSignallingNaN(value)) { + if (exception != NULL) { + *exception = true; + } + } + if (DN == kUseDefaultNaN) return kFP64DefaultNaN; + + // Convert NaNs as the processor would: + // - The sign is propagated. + // - The payload (mantissa) is transferred entirely, except that the top + // bit is forced to '1', making the result a quiet NaN. The unused + // (low-order) payload bits are set to 0. + uint32_t raw = FloatToRawbits(value); + + uint64_t sign = raw >> 31; + uint64_t exponent = (1 << 11) - 1; + uint64_t payload = ExtractUnsignedBitfield64(21, 0, raw); + payload <<= (52 - 23); // The unused low-order bits should be 0. + payload |= (UINT64_C(1) << 51); // Force a quiet NaN. + + return RawbitsToDouble((sign << 63) | (exponent << 52) | payload); + } + + case FP_ZERO: + case FP_NORMAL: + case FP_SUBNORMAL: + case FP_INFINITE: { + // All other inputs are preserved in a standard cast, because every value + // representable using an IEEE-754 float is also representable using an + // IEEE-754 double. + return static_cast(value); + } + } + + VIXL_UNREACHABLE(); + return static_cast(value); +} + + +Float16 FPToFloat16(float value, + FPRounding round_mode, + UseDefaultNaN DN, + bool* exception) { + // Only the FPTieEven rounding mode is implemented. + VIXL_ASSERT(round_mode == FPTieEven); + USE(round_mode); + + uint32_t raw = FloatToRawbits(value); + int32_t sign = raw >> 31; + int32_t exponent = ExtractUnsignedBitfield32(30, 23, raw) - 127; + uint32_t mantissa = ExtractUnsignedBitfield32(22, 0, raw); + + switch (std::fpclassify(value)) { + case FP_NAN: { + if (IsSignallingNaN(value)) { + if (exception != NULL) { + *exception = true; + } + } + if (DN == kUseDefaultNaN) return kFP16DefaultNaN; + + // Convert NaNs as the processor would: + // - The sign is propagated. + // - The payload (mantissa) is transferred as much as possible, except + // that the top bit is forced to '1', making the result a quiet NaN. + uint16_t result = (sign == 0) ? Float16ToRawbits(kFP16PositiveInfinity) + : Float16ToRawbits(kFP16NegativeInfinity); + result |= mantissa >> (kFloatMantissaBits - kFloat16MantissaBits); + result |= (1 << 9); // Force a quiet NaN; + return RawbitsToFloat16(result); + } + + case FP_ZERO: + return (sign == 0) ? kFP16PositiveZero : kFP16NegativeZero; + + case FP_INFINITE: + return (sign == 0) ? kFP16PositiveInfinity : kFP16NegativeInfinity; + + case FP_NORMAL: + case FP_SUBNORMAL: { + // Convert float-to-half as the processor would, assuming that FPCR.FZ + // (flush-to-zero) is not set. + + // Add the implicit '1' bit to the mantissa. + mantissa += (1 << 23); + return FPRoundToFloat16(sign, exponent, mantissa, round_mode); + } + } + + VIXL_UNREACHABLE(); + return kFP16PositiveZero; +} + + +Float16 FPToFloat16(double value, + FPRounding round_mode, + UseDefaultNaN DN, + bool* exception) { + // Only the FPTieEven rounding mode is implemented. + VIXL_ASSERT(round_mode == FPTieEven); + USE(round_mode); + + uint64_t raw = DoubleToRawbits(value); + int32_t sign = raw >> 63; + int64_t exponent = ExtractUnsignedBitfield64(62, 52, raw) - 1023; + uint64_t mantissa = ExtractUnsignedBitfield64(51, 0, raw); + + switch (std::fpclassify(value)) { + case FP_NAN: { + if (IsSignallingNaN(value)) { + if (exception != NULL) { + *exception = true; + } + } + if (DN == kUseDefaultNaN) return kFP16DefaultNaN; + + // Convert NaNs as the processor would: + // - The sign is propagated. + // - The payload (mantissa) is transferred as much as possible, except + // that the top bit is forced to '1', making the result a quiet NaN. + uint16_t result = (sign == 0) ? Float16ToRawbits(kFP16PositiveInfinity) + : Float16ToRawbits(kFP16NegativeInfinity); + result |= mantissa >> (kDoubleMantissaBits - kFloat16MantissaBits); + result |= (1 << 9); // Force a quiet NaN; + return RawbitsToFloat16(result); + } + + case FP_ZERO: + return (sign == 0) ? kFP16PositiveZero : kFP16NegativeZero; + + case FP_INFINITE: + return (sign == 0) ? kFP16PositiveInfinity : kFP16NegativeInfinity; + case FP_NORMAL: + case FP_SUBNORMAL: { + // Convert double-to-half as the processor would, assuming that FPCR.FZ + // (flush-to-zero) is not set. + + // Add the implicit '1' bit to the mantissa. + mantissa += (UINT64_C(1) << 52); + return FPRoundToFloat16(sign, exponent, mantissa, round_mode); + } + } + + VIXL_UNREACHABLE(); + return kFP16PositiveZero; +} + +} // namespace vixl diff --git a/src/coreclr/jit/vixl/utils-vixl.h b/src/coreclr/jit/vixl/utils-vixl.h new file mode 100644 index 00000000000000..3caab0ea640c1f --- /dev/null +++ b/src/coreclr/jit/vixl/utils-vixl.h @@ -0,0 +1,1402 @@ +// Copyright 2015, VIXL authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// * Neither the name of ARM Limited nor the names of its contributors may be +// used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef VIXL_UTILS_H +#define VIXL_UTILS_H + +#include +#include +#include +#include +#include + +#include "compiler-intrinsics-vixl.h" +#include "globals-vixl.h" +#include "../jit.h" + +namespace vixl { + +// Macros for compile-time format checking. +#if GCC_VERSION_OR_NEWER(4, 4, 0) +#define PRINTF_CHECK(format_index, varargs_index) \ + __attribute__((format(gnu_printf, format_index, varargs_index))) +#else +#define PRINTF_CHECK(format_index, varargs_index) +#endif + +#ifdef __GNUC__ +#define VIXL_HAS_DEPRECATED_WITH_MSG +#elif defined(__clang__) +#ifdef __has_extension(attribute_deprecated_with_message) +#define VIXL_HAS_DEPRECATED_WITH_MSG +#endif +#endif + +#ifdef VIXL_HAS_DEPRECATED_WITH_MSG +#define VIXL_DEPRECATED(replaced_by, declarator) \ + __attribute__((deprecated("Use \"" replaced_by "\" instead"))) declarator +#else +#define VIXL_DEPRECATED(replaced_by, declarator) declarator +#endif + +#ifdef VIXL_DEBUG +#define VIXL_UNREACHABLE_OR_FALLTHROUGH() VIXL_UNREACHABLE() +#else +#define VIXL_UNREACHABLE_OR_FALLTHROUGH() VIXL_FALLTHROUGH() +#endif + +template +constexpr size_t ArrayLength(const T (&)[n]) { + return n; +} + +inline uint64_t GetUintMask(unsigned bits) { + VIXL_ASSERT(bits <= 64); + uint64_t base = (bits >= 64) ? 0 : (UINT64_C(1) << bits); + return base - 1; +} + +inline uint64_t GetSignMask(unsigned bits) { + VIXL_ASSERT(bits <= 64); + return UINT64_C(1) << (bits - 1); +} + +// Check number width. +// TODO: Refactor these using templates. +inline bool IsIntN(unsigned n, uint32_t x) { + VIXL_ASSERT((0 < n) && (n <= 32)); + return x <= static_cast(INT32_MAX >> (32 - n)); +} +inline bool IsIntN(unsigned n, int32_t x) { + VIXL_ASSERT((0 < n) && (n <= 32)); + if (n == 32) return true; + int32_t limit = INT32_C(1) << (n - 1); + return (-limit <= x) && (x < limit); +} +inline bool IsIntN(unsigned n, uint64_t x) { + VIXL_ASSERT((0 < n) && (n <= 64)); + return x <= static_cast(INT64_MAX >> (64 - n)); +} +inline bool IsIntN(unsigned n, int64_t x) { + VIXL_ASSERT((0 < n) && (n <= 64)); + if (n == 64) return true; + int64_t limit = INT64_C(1) << (n - 1); + return (-limit <= x) && (x < limit); +} +VIXL_DEPRECATED("IsIntN", inline bool is_intn(unsigned n, int64_t x)) { + return IsIntN(n, x); +} + +inline bool IsUintN(unsigned n, uint32_t x) { + VIXL_ASSERT((0 < n) && (n <= 32)); + if (n >= 32) return true; + return !(x >> n); +} +inline bool IsUintN(unsigned n, int32_t x) { + VIXL_ASSERT((0 < n) && (n < 32)); + // Convert to an unsigned integer to avoid implementation-defined behavior. + return !(static_cast(x) >> n); +} +inline bool IsUintN(unsigned n, uint64_t x) { + VIXL_ASSERT((0 < n) && (n <= 64)); + if (n >= 64) return true; + return !(x >> n); +} +inline bool IsUintN(unsigned n, int64_t x) { + VIXL_ASSERT((0 < n) && (n < 64)); + // Convert to an unsigned integer to avoid implementation-defined behavior. + return !(static_cast(x) >> n); +} +VIXL_DEPRECATED("IsUintN", inline bool is_uintn(unsigned n, int64_t x)) { + return IsUintN(n, x); +} + +inline uint64_t TruncateToUintN(unsigned n, uint64_t x) { + VIXL_ASSERT((0 < n) && (n < 64)); + return static_cast(x) & ((UINT64_C(1) << n) - 1); +} +VIXL_DEPRECATED("TruncateToUintN", + inline uint64_t truncate_to_intn(unsigned n, int64_t x)) { + return TruncateToUintN(n, x); +} + +// clang-format off +#define INT_1_TO_32_LIST(V) \ +V(1) V(2) V(3) V(4) V(5) V(6) V(7) V(8) \ +V(9) V(10) V(11) V(12) V(13) V(14) V(15) V(16) \ +V(17) V(18) V(19) V(20) V(21) V(22) V(23) V(24) \ +V(25) V(26) V(27) V(28) V(29) V(30) V(31) V(32) + +#define INT_33_TO_63_LIST(V) \ +V(33) V(34) V(35) V(36) V(37) V(38) V(39) V(40) \ +V(41) V(42) V(43) V(44) V(45) V(46) V(47) V(48) \ +V(49) V(50) V(51) V(52) V(53) V(54) V(55) V(56) \ +V(57) V(58) V(59) V(60) V(61) V(62) V(63) + +#define INT_1_TO_63_LIST(V) INT_1_TO_32_LIST(V) INT_33_TO_63_LIST(V) + +// clang-format on + +#define DECLARE_IS_INT_N(N) \ + inline bool IsInt##N(int64_t x) { return IsIntN(N, x); } \ + VIXL_DEPRECATED("IsInt" #N, inline bool is_int##N(int64_t x)) { \ + return IsIntN(N, x); \ + } + +#define DECLARE_IS_UINT_N(N) \ + inline bool IsUint##N(int64_t x) { return IsUintN(N, x); } \ + VIXL_DEPRECATED("IsUint" #N, inline bool is_uint##N(int64_t x)) { \ + return IsUintN(N, x); \ + } + +#define DECLARE_TRUNCATE_TO_UINT_32(N) \ + inline uint32_t TruncateToUint##N(uint64_t x) { \ + return static_cast(TruncateToUintN(N, x)); \ + } \ + VIXL_DEPRECATED("TruncateToUint" #N, \ + inline uint32_t truncate_to_int##N(int64_t x)) { \ + return TruncateToUint##N(x); \ + } + +INT_1_TO_63_LIST(DECLARE_IS_INT_N) +INT_1_TO_63_LIST(DECLARE_IS_UINT_N) +INT_1_TO_32_LIST(DECLARE_TRUNCATE_TO_UINT_32) + +#undef DECLARE_IS_INT_N +#undef DECLARE_IS_UINT_N +#undef DECLARE_TRUNCATE_TO_INT_N + +// Bit field extraction. +inline uint64_t ExtractUnsignedBitfield64(int msb, int lsb, uint64_t x) { + VIXL_ASSERT((static_cast(msb) < sizeof(x) * 8) && (lsb >= 0) && + (msb >= lsb)); + if ((msb == 63) && (lsb == 0)) return x; + return (x >> lsb) & ((static_cast(1) << (1 + msb - lsb)) - 1); +} + + +inline uint32_t ExtractUnsignedBitfield32(int msb, int lsb, uint64_t x) { + VIXL_ASSERT((static_cast(msb) < sizeof(x) * 8) && (lsb >= 0) && + (msb >= lsb)); + return TruncateToUint32(ExtractUnsignedBitfield64(msb, lsb, x)); +} + + +inline int64_t ExtractSignedBitfield64(int msb, int lsb, uint64_t x) { + VIXL_ASSERT((static_cast(msb) < sizeof(x) * 8) && (lsb >= 0) && + (msb >= lsb)); + uint64_t temp = ExtractUnsignedBitfield64(msb, lsb, x); + // If the highest extracted bit is set, sign extend. + if ((temp >> (msb - lsb)) == 1) { + temp |= ~UINT64_C(0) << (msb - lsb); + } + int64_t result; + memcpy(&result, &temp, sizeof(result)); + return result; +} + +inline int32_t ExtractSignedBitfield32(int msb, int lsb, uint64_t x) { + VIXL_ASSERT((static_cast(msb) < sizeof(x) * 8) && (lsb >= 0) && + (msb >= lsb)); + uint32_t temp = TruncateToUint32(ExtractSignedBitfield64(msb, lsb, x)); + int32_t result; + memcpy(&result, &temp, sizeof(result)); + return result; +} + +inline uint64_t RotateRight(uint64_t value, + unsigned int rotate, + unsigned int width) { + VIXL_ASSERT((width > 0) && (width <= 64)); + uint64_t width_mask = ~UINT64_C(0) >> (64 - width); + rotate &= 63; + if (rotate > 0) { + value &= width_mask; + value = (value << (width - rotate)) | (value >> rotate); + } + return value & width_mask; +} + + +// Wrapper class for passing FP16 values through the assembler. +// This is purely to aid with type checking/casting. +class Float16 { + public: + explicit Float16(double dvalue); + Float16() : rawbits_(0x0) {} + friend uint16_t Float16ToRawbits(Float16 value); + friend Float16 RawbitsToFloat16(uint16_t bits); + + protected: + uint16_t rawbits_; +}; + +// Floating point representation. +uint16_t Float16ToRawbits(Float16 value); + + +uint32_t FloatToRawbits(float value); +VIXL_DEPRECATED("FloatToRawbits", + inline uint32_t float_to_rawbits(float value)) { + return FloatToRawbits(value); +} + +uint64_t DoubleToRawbits(double value); +VIXL_DEPRECATED("DoubleToRawbits", + inline uint64_t double_to_rawbits(double value)) { + return DoubleToRawbits(value); +} + +Float16 RawbitsToFloat16(uint16_t bits); + +float RawbitsToFloat(uint32_t bits); +VIXL_DEPRECATED("RawbitsToFloat", + inline float rawbits_to_float(uint32_t bits)) { + return RawbitsToFloat(bits); +} + +double RawbitsToDouble(uint64_t bits); +VIXL_DEPRECATED("RawbitsToDouble", + inline double rawbits_to_double(uint64_t bits)) { + return RawbitsToDouble(bits); +} + +// Convert unsigned to signed numbers in a well-defined way (using two's +// complement representations). +inline int64_t RawbitsToInt64(uint64_t bits) { + return (bits >= UINT64_C(0x8000000000000000)) + ? (-static_cast(-bits - 1) - 1) + : static_cast(bits); +} + +inline int32_t RawbitsToInt32(uint32_t bits) { + return (bits >= UINT64_C(0x80000000)) ? (-static_cast(-bits - 1) - 1) + : static_cast(bits); +} + +namespace internal { + +// Internal simulation class used solely by the simulator to +// provide an abstraction layer for any half-precision arithmetic. +class SimFloat16 : public Float16 { + public: + // TODO: We should investigate making this constructor explicit. + // This is currently difficult to do due to a number of templated + // functions in the simulator which rely on returning double values. + SimFloat16(double dvalue) : Float16(dvalue) {} // NOLINT(runtime/explicit) + SimFloat16(Float16 f) { // NOLINT(runtime/explicit) + this->rawbits_ = Float16ToRawbits(f); + } + SimFloat16() : Float16() {} + SimFloat16 operator-() const; + SimFloat16 operator+(SimFloat16 rhs) const; + SimFloat16 operator-(SimFloat16 rhs) const; + SimFloat16 operator*(SimFloat16 rhs) const; + SimFloat16 operator/(SimFloat16 rhs) const; + bool operator<(SimFloat16 rhs) const; + bool operator>(SimFloat16 rhs) const; + bool operator==(SimFloat16 rhs) const; + bool operator!=(SimFloat16 rhs) const; + // This is necessary for conversions peformed in (macro asm) Fmov. + bool operator==(double rhs) const; + operator double() const; +}; +} // namespace internal + +uint32_t Float16Sign(internal::SimFloat16 value); + +uint32_t Float16Exp(internal::SimFloat16 value); + +uint32_t Float16Mantissa(internal::SimFloat16 value); + +uint32_t FloatSign(float value); +VIXL_DEPRECATED("FloatSign", inline uint32_t float_sign(float value)) { + return FloatSign(value); +} + +uint32_t FloatExp(float value); +VIXL_DEPRECATED("FloatExp", inline uint32_t float_exp(float value)) { + return FloatExp(value); +} + +uint32_t FloatMantissa(float value); +VIXL_DEPRECATED("FloatMantissa", inline uint32_t float_mantissa(float value)) { + return FloatMantissa(value); +} + +uint32_t DoubleSign(double value); +VIXL_DEPRECATED("DoubleSign", inline uint32_t double_sign(double value)) { + return DoubleSign(value); +} + +uint32_t DoubleExp(double value); +VIXL_DEPRECATED("DoubleExp", inline uint32_t double_exp(double value)) { + return DoubleExp(value); +} + +uint64_t DoubleMantissa(double value); +VIXL_DEPRECATED("DoubleMantissa", + inline uint64_t double_mantissa(double value)) { + return DoubleMantissa(value); +} + +internal::SimFloat16 Float16Pack(uint16_t sign, + uint16_t exp, + uint16_t mantissa); + +float FloatPack(uint32_t sign, uint32_t exp, uint32_t mantissa); +VIXL_DEPRECATED("FloatPack", + inline float float_pack(uint32_t sign, + uint32_t exp, + uint32_t mantissa)) { + return FloatPack(sign, exp, mantissa); +} + +double DoublePack(uint64_t sign, uint64_t exp, uint64_t mantissa); +VIXL_DEPRECATED("DoublePack", + inline double double_pack(uint32_t sign, + uint32_t exp, + uint64_t mantissa)) { + return DoublePack(sign, exp, mantissa); +} + +// An fpclassify() function for 16-bit half-precision floats. +int Float16Classify(Float16 value); +VIXL_DEPRECATED("Float16Classify", inline int float16classify(uint16_t value)) { + return Float16Classify(RawbitsToFloat16(value)); +} + +bool IsZero(Float16 value); + +inline bool IsPositiveZero(double value) { + return (value == 0.0) && (_copysign(1.0, value) > 0.0); +} + +inline bool IsNaN(float value) { return _isnan(value); } + +inline bool IsNaN(double value) { return _isnan(value); } + +inline bool IsNaN(Float16 value) { return Float16Classify(value) == FP_NAN; } + +inline bool IsInf(float value) { return isinf(value); } + +inline bool IsInf(double value) { return isinf(value); } + +inline bool IsInf(Float16 value) { + return Float16Classify(value) == FP_INFINITE; +} + + +// NaN tests. +inline bool IsSignallingNaN(double num) { + const uint64_t kFP64QuietNaNMask = UINT64_C(0x0008000000000000); + uint64_t raw = DoubleToRawbits(num); + if (IsNaN(num) && ((raw & kFP64QuietNaNMask) == 0)) { + return true; + } + return false; +} + + +inline bool IsSignallingNaN(float num) { + const uint32_t kFP32QuietNaNMask = 0x00400000; + uint32_t raw = FloatToRawbits(num); + if (IsNaN(num) && ((raw & kFP32QuietNaNMask) == 0)) { + return true; + } + return false; +} + + +inline bool IsSignallingNaN(Float16 num) { + const uint16_t kFP16QuietNaNMask = 0x0200; + return IsNaN(num) && ((Float16ToRawbits(num) & kFP16QuietNaNMask) == 0); +} + + +template +inline bool IsQuietNaN(T num) { + return IsNaN(num) && !IsSignallingNaN(num); +} + + +// Convert the NaN in 'num' to a quiet NaN. +inline double ToQuietNaN(double num) { + const uint64_t kFP64QuietNaNMask = UINT64_C(0x0008000000000000); + VIXL_ASSERT(IsNaN(num)); + return RawbitsToDouble(DoubleToRawbits(num) | kFP64QuietNaNMask); +} + + +inline float ToQuietNaN(float num) { + const uint32_t kFP32QuietNaNMask = 0x00400000; + VIXL_ASSERT(IsNaN(num)); + return RawbitsToFloat(FloatToRawbits(num) | kFP32QuietNaNMask); +} + + +inline internal::SimFloat16 ToQuietNaN(internal::SimFloat16 num) { + const uint16_t kFP16QuietNaNMask = 0x0200; + VIXL_ASSERT(IsNaN(num)); + return internal::SimFloat16( + RawbitsToFloat16(Float16ToRawbits(num) | kFP16QuietNaNMask)); +} + + +// Fused multiply-add. +inline double FusedMultiplyAdd(double op1, double op2, double a) { + return fma(op1, op2, a); +} + + +inline float FusedMultiplyAdd(float op1, float op2, float a) { + return fmaf(op1, op2, a); +} + + +inline uint64_t LowestSetBit(uint64_t value) { return value & -value; } + + +template +inline int HighestSetBitPosition(T value) { + VIXL_ASSERT(value != 0); + return (sizeof(value) * 8 - 1) - CountLeadingZeros(value); +} + + +template +inline int WhichPowerOf2(V value) { + VIXL_ASSERT(IsPowerOf2(value)); + return CountTrailingZeros(value); +} + + +unsigned CountClearHalfWords(uint64_t imm, unsigned reg_size); + + +int BitCount(uint64_t value); + + +template +T ReverseBits(T value) { + VIXL_ASSERT((sizeof(value) == 1) || (sizeof(value) == 2) || + (sizeof(value) == 4) || (sizeof(value) == 8)); + T result = 0; + for (unsigned i = 0; i < (sizeof(value) * 8); i++) { + result = (result << 1) | (value & 1); + value >>= 1; + } + return result; +} + + +template +inline T SignExtend(T val, int size_in_bits) { + VIXL_ASSERT(size_in_bits > 0); + T mask = (T(2) << (size_in_bits - 1)) - T(1); + val &= mask; + T sign_bits = -((val >> (size_in_bits - 1)) << size_in_bits); + val |= sign_bits; + return val; +} + + +template +T ReverseBytes(T value, int block_bytes_log2) { + VIXL_ASSERT((sizeof(value) == 4) || (sizeof(value) == 8)); + VIXL_ASSERT((1U << block_bytes_log2) <= sizeof(value)); + // Split the 64-bit value into an 8-bit array, where b[0] is the least + // significant byte, and b[7] is the most significant. + uint8_t bytes[8]; + uint64_t mask = UINT64_C(0xff00000000000000); + for (int i = 7; i >= 0; i--) { + bytes[i] = (static_cast(value) & mask) >> (i * 8); + mask >>= 8; + } + + // Permutation tables for REV instructions. + // permute_table[0] is used by REV16_x, REV16_w + // permute_table[1] is used by REV32_x, REV_w + // permute_table[2] is used by REV_x + VIXL_ASSERT((0 < block_bytes_log2) && (block_bytes_log2 < 4)); + static const uint8_t permute_table[3][8] = {{6, 7, 4, 5, 2, 3, 0, 1}, + {4, 5, 6, 7, 0, 1, 2, 3}, + {0, 1, 2, 3, 4, 5, 6, 7}}; + uint64_t temp = 0; + for (int i = 0; i < 8; i++) { + temp <<= 8; + temp |= bytes[permute_table[block_bytes_log2 - 1][i]]; + } + + T result; + VIXL_STATIC_ASSERT(sizeof(result) <= sizeof(temp)); + memcpy(&result, &temp, sizeof(result)); + return result; +} + +template +inline bool IsMultiple(T value) { + VIXL_ASSERT(IsPowerOf2(MULTIPLE)); + return (value & (MULTIPLE - 1)) == 0; +} + +template +inline bool IsMultiple(T value, unsigned multiple) { + VIXL_ASSERT(IsPowerOf2(multiple)); + return (value & (multiple - 1)) == 0; +} + +template +inline bool IsAligned(T pointer, int alignment) { + VIXL_ASSERT(IsPowerOf2(alignment)); + return (pointer & (alignment - 1)) == 0; +} + +// Pointer alignment +// TODO: rename/refactor to make it specific to instructions. +template +inline bool IsAligned(T pointer) { + VIXL_ASSERT(sizeof(pointer) == sizeof(intptr_t)); // NOLINT(runtime/sizeof) + // Use C-style casts to get static_cast behaviour for integral types (T), and + // reinterpret_cast behaviour for other types. + return IsAligned((intptr_t)(pointer), ALIGN); +} + +template +bool IsWordAligned(T pointer) { + return IsAligned<4>(pointer); +} + +// Increment a pointer until it has the specified alignment. The alignment must +// be a power of two. +template +T AlignUp(T pointer, + typename Unsigned::type alignment) { + VIXL_ASSERT(IsPowerOf2(alignment)); + // Use C-style casts to get static_cast behaviour for integral types (T), and + // reinterpret_cast behaviour for other types. + + typename Unsigned::type pointer_raw = + (typename Unsigned::type) pointer; + VIXL_STATIC_ASSERT(sizeof(pointer) <= sizeof(pointer_raw)); + + size_t mask = alignment - 1; + T result = (T)((pointer_raw + mask) & ~mask); + VIXL_ASSERT(result >= pointer); + + return result; +} + +// Decrement a pointer until it has the specified alignment. The alignment must +// be a power of two. +template +T AlignDown(T pointer, + typename Unsigned::type alignment) { + VIXL_ASSERT(IsPowerOf2(alignment)); + // Use C-style casts to get static_cast behaviour for integral types (T), and + // reinterpret_cast behaviour for other types. + + typename Unsigned::type pointer_raw = + (typename Unsigned::type) pointer; + VIXL_STATIC_ASSERT(sizeof(pointer) <= sizeof(pointer_raw)); + + size_t mask = alignment - 1; + return (T)(pointer_raw & ~mask); +} + + +template +inline T ExtractBit(T value, unsigned bit) { + return (value >> bit) & T(1); +} + +template +inline Td ExtractBits(Ts value, int least_significant_bit, Td mask) { + return Td((value >> least_significant_bit) & Ts(mask)); +} + +template +inline void AssignBit(Td& dst, // NOLINT(runtime/references) + int bit, + Ts value) { + VIXL_ASSERT((value == Ts(0)) || (value == Ts(1))); + VIXL_ASSERT(bit >= 0); + VIXL_ASSERT(bit < static_cast(sizeof(Td) * 8)); + Td mask(1); + dst &= ~(mask << bit); + dst |= Td(value) << bit; +} + +template +inline void AssignBits(Td& dst, // NOLINT(runtime/references) + int least_significant_bit, + Ts mask, + Ts value) { + VIXL_ASSERT(least_significant_bit >= 0); + VIXL_ASSERT(least_significant_bit < static_cast(sizeof(Td) * 8)); + VIXL_ASSERT(((Td(mask) << least_significant_bit) >> least_significant_bit) == + Td(mask)); + VIXL_ASSERT((value & mask) == value); + dst &= ~(Td(mask) << least_significant_bit); + dst |= Td(value) << least_significant_bit; +} + +class VFP { + public: + static uint32_t FP32ToImm8(float imm) { + // bits: aBbb.bbbc.defg.h000.0000.0000.0000.0000 + uint32_t bits = FloatToRawbits(imm); + // bit7: a000.0000 + uint32_t bit7 = ((bits >> 31) & 0x1) << 7; + // bit6: 0b00.0000 + uint32_t bit6 = ((bits >> 29) & 0x1) << 6; + // bit5_to_0: 00cd.efgh + uint32_t bit5_to_0 = (bits >> 19) & 0x3f; + return static_cast(bit7 | bit6 | bit5_to_0); + } + static uint32_t FP64ToImm8(double imm) { + // bits: aBbb.bbbb.bbcd.efgh.0000.0000.0000.0000 + // 0000.0000.0000.0000.0000.0000.0000.0000 + uint64_t bits = DoubleToRawbits(imm); + // bit7: a000.0000 + uint64_t bit7 = ((bits >> 63) & 0x1) << 7; + // bit6: 0b00.0000 + uint64_t bit6 = ((bits >> 61) & 0x1) << 6; + // bit5_to_0: 00cd.efgh + uint64_t bit5_to_0 = (bits >> 48) & 0x3f; + + return static_cast(bit7 | bit6 | bit5_to_0); + } + static float Imm8ToFP32(uint32_t imm8) { + // Imm8: abcdefgh (8 bits) + // Single: aBbb.bbbc.defg.h000.0000.0000.0000.0000 (32 bits) + // where B is b ^ 1 + uint32_t bits = imm8; + uint32_t bit7 = (bits >> 7) & 0x1; + uint32_t bit6 = (bits >> 6) & 0x1; + uint32_t bit5_to_0 = bits & 0x3f; + uint32_t result = (bit7 << 31) | ((32 - bit6) << 25) | (bit5_to_0 << 19); + + return RawbitsToFloat(result); + } + static double Imm8ToFP64(uint32_t imm8) { + // Imm8: abcdefgh (8 bits) + // Double: aBbb.bbbb.bbcd.efgh.0000.0000.0000.0000 + // 0000.0000.0000.0000.0000.0000.0000.0000 (64 bits) + // where B is b ^ 1 + uint32_t bits = imm8; + uint64_t bit7 = (bits >> 7) & 0x1; + uint64_t bit6 = (bits >> 6) & 0x1; + uint64_t bit5_to_0 = bits & 0x3f; + uint64_t result = (bit7 << 63) | ((256 - bit6) << 54) | (bit5_to_0 << 48); + return RawbitsToDouble(result); + } + static bool IsImmFP32(float imm) { + // Valid values will have the form: + // aBbb.bbbc.defg.h000.0000.0000.0000.0000 + uint32_t bits = FloatToRawbits(imm); + // bits[19..0] are cleared. + if ((bits & 0x7ffff) != 0) { + return false; + } + + + // bits[29..25] are all set or all cleared. + uint32_t b_pattern = (bits >> 16) & 0x3e00; + if (b_pattern != 0 && b_pattern != 0x3e00) { + return false; + } + // bit[30] and bit[29] are opposite. + if (((bits ^ (bits << 1)) & 0x40000000) == 0) { + return false; + } + return true; + } + static bool IsImmFP64(double imm) { + // Valid values will have the form: + // aBbb.bbbb.bbcd.efgh.0000.0000.0000.0000 + // 0000.0000.0000.0000.0000.0000.0000.0000 + uint64_t bits = DoubleToRawbits(imm); + // bits[47..0] are cleared. + if ((bits & 0x0000ffffffffffff) != 0) { + return false; + } + // bits[61..54] are all set or all cleared. + uint32_t b_pattern = (bits >> 48) & 0x3fc0; + if ((b_pattern != 0) && (b_pattern != 0x3fc0)) { + return false; + } + // bit[62] and bit[61] are opposite. + if (((bits ^ (bits << 1)) & (UINT64_C(1) << 62)) == 0) { + return false; + } + return true; + } +}; + +class BitField { + // ForEachBitHelper is a functor that will call + // bool ForEachBitHelper::execute(ElementType id) const + // and expects a boolean in return whether to continue (if true) + // or stop (if false) + // check_set will check if the bits are on (true) or off(false) + template + bool ForEachBit(const ForEachBitHelper& helper) { + for (int i = 0; static_cast(i) < bitfield_.size(); i++) { + if (bitfield_[i] == check_set) + if (!helper.execute(i)) return false; + } + return true; + } + + public: + explicit BitField(Compiler* compiler, unsigned size) : bitfield_(size, 0, compiler->getAllocator(CMK_Codegen)) {} + + void Set(int i) { + VIXL_ASSERT((i >= 0) && (static_cast(i) < bitfield_.size())); + bitfield_[i] = true; + } + + void Unset(int i) { + VIXL_ASSERT((i >= 0) && (static_cast(i) < bitfield_.size())); + bitfield_[i] = true; + } + + bool IsSet(int i) const { return bitfield_[i]; } + + // For each bit not set in the bitfield call the execute functor + // execute. + // ForEachBitSetHelper::execute returns true if the iteration through + // the bits can continue, otherwise it will stop. + // struct ForEachBitSetHelper { + // bool execute(int /*id*/) { return false; } + // }; + template + bool ForEachBitNotSet(const ForEachBitNotSetHelper& helper) { + return ForEachBit(helper); + } + + // For each bit set in the bitfield call the execute functor + // execute. + template + bool ForEachBitSet(const ForEachBitSetHelper& helper) { + return ForEachBit(helper); + } + + private: + jitstd::vector bitfield_; +}; + +namespace internal { + +typedef int64_t Int64; +class Uint64; +class Uint128; + +class Uint32 { + uint32_t data_; + + public: + // Unlike uint32_t, Uint32 has a default constructor. + Uint32() { data_ = 0; } + explicit Uint32(uint32_t data) : data_(data) {} + inline explicit Uint32(Uint64 data); + uint32_t Get() const { return data_; } + template + int32_t GetSigned() const { + return ExtractSignedBitfield32(N - 1, 0, data_); + } + int32_t GetSigned() const { return data_; } + Uint32 operator~() const { return Uint32(~data_); } + Uint32 operator-() const { return Uint32(-data_); } + bool operator==(Uint32 value) const { return data_ == value.data_; } + bool operator!=(Uint32 value) const { return data_ != value.data_; } + bool operator>(Uint32 value) const { return data_ > value.data_; } + Uint32 operator+(Uint32 value) const { return Uint32(data_ + value.data_); } + Uint32 operator-(Uint32 value) const { return Uint32(data_ - value.data_); } + Uint32 operator&(Uint32 value) const { return Uint32(data_ & value.data_); } + Uint32 operator&=(Uint32 value) { + data_ &= value.data_; + return *this; + } + Uint32 operator^(Uint32 value) const { return Uint32(data_ ^ value.data_); } + Uint32 operator^=(Uint32 value) { + data_ ^= value.data_; + return *this; + } + Uint32 operator|(Uint32 value) const { return Uint32(data_ | value.data_); } + Uint32 operator|=(Uint32 value) { + data_ |= value.data_; + return *this; + } + // Unlike uint32_t, the shift functions can accept negative shift and + // return 0 when the shift is too big. + Uint32 operator>>(int shift) const { + if (shift == 0) return *this; + if (shift < 0) { + int tmp = -shift; + if (tmp >= 32) return Uint32(0); + return Uint32(data_ << tmp); + } + int tmp = shift; + if (tmp >= 32) return Uint32(0); + return Uint32(data_ >> tmp); + } + Uint32 operator<<(int shift) const { + if (shift == 0) return *this; + if (shift < 0) { + int tmp = -shift; + if (tmp >= 32) return Uint32(0); + return Uint32(data_ >> tmp); + } + int tmp = shift; + if (tmp >= 32) return Uint32(0); + return Uint32(data_ << tmp); + } +}; + +class Uint64 { + uint64_t data_; + + public: + // Unlike uint64_t, Uint64 has a default constructor. + Uint64() { data_ = 0; } + explicit Uint64(uint64_t data) : data_(data) {} + explicit Uint64(Uint32 data) : data_(data.Get()) {} + inline explicit Uint64(Uint128 data); + uint64_t Get() const { return data_; } + int64_t GetSigned(int N) const { + return ExtractSignedBitfield64(N - 1, 0, data_); + } + int64_t GetSigned() const { return data_; } + Uint32 ToUint32() const { + VIXL_ASSERT((data_ >> 32) == 0); + return Uint32(static_cast(data_)); + } + Uint32 GetHigh32() const { return Uint32(data_ >> 32); } + Uint32 GetLow32() const { return Uint32(data_ & 0xffffffff); } + Uint64 operator~() const { return Uint64(~data_); } + Uint64 operator-() const { return Uint64(-data_); } + bool operator==(Uint64 value) const { return data_ == value.data_; } + bool operator!=(Uint64 value) const { return data_ != value.data_; } + Uint64 operator+(Uint64 value) const { return Uint64(data_ + value.data_); } + Uint64 operator-(Uint64 value) const { return Uint64(data_ - value.data_); } + Uint64 operator&(Uint64 value) const { return Uint64(data_ & value.data_); } + Uint64 operator&=(Uint64 value) { + data_ &= value.data_; + return *this; + } + Uint64 operator^(Uint64 value) const { return Uint64(data_ ^ value.data_); } + Uint64 operator^=(Uint64 value) { + data_ ^= value.data_; + return *this; + } + Uint64 operator|(Uint64 value) const { return Uint64(data_ | value.data_); } + Uint64 operator|=(Uint64 value) { + data_ |= value.data_; + return *this; + } + // Unlike uint64_t, the shift functions can accept negative shift and + // return 0 when the shift is too big. + Uint64 operator>>(int shift) const { + if (shift == 0) return *this; + if (shift < 0) { + int tmp = -shift; + if (tmp >= 64) return Uint64(0); + return Uint64(data_ << tmp); + } + int tmp = shift; + if (tmp >= 64) return Uint64(0); + return Uint64(data_ >> tmp); + } + Uint64 operator<<(int shift) const { + if (shift == 0) return *this; + if (shift < 0) { + int tmp = -shift; + if (tmp >= 64) return Uint64(0); + return Uint64(data_ >> tmp); + } + int tmp = shift; + if (tmp >= 64) return Uint64(0); + return Uint64(data_ << tmp); + } +}; + +class Uint128 { + uint64_t data_high_; + uint64_t data_low_; + + public: + Uint128() : data_high_(0), data_low_(0) {} + explicit Uint128(uint64_t data_low) : data_high_(0), data_low_(data_low) {} + explicit Uint128(Uint64 data_low) + : data_high_(0), data_low_(data_low.Get()) {} + Uint128(uint64_t data_high, uint64_t data_low) + : data_high_(data_high), data_low_(data_low) {} + Uint64 ToUint64() const { + VIXL_ASSERT(data_high_ == 0); + return Uint64(data_low_); + } + Uint64 GetHigh64() const { return Uint64(data_high_); } + Uint64 GetLow64() const { return Uint64(data_low_); } + Uint128 operator~() const { return Uint128(~data_high_, ~data_low_); } + bool operator==(Uint128 value) const { + return (data_high_ == value.data_high_) && (data_low_ == value.data_low_); + } + Uint128 operator&(Uint128 value) const { + return Uint128(data_high_ & value.data_high_, data_low_ & value.data_low_); + } + Uint128 operator&=(Uint128 value) { + data_high_ &= value.data_high_; + data_low_ &= value.data_low_; + return *this; + } + Uint128 operator|=(Uint128 value) { + data_high_ |= value.data_high_; + data_low_ |= value.data_low_; + return *this; + } + Uint128 operator>>(int shift) const { + VIXL_ASSERT((shift >= 0) && (shift < 128)); + if (shift == 0) return *this; + if (shift >= 64) { + return Uint128(0, data_high_ >> (shift - 64)); + } + uint64_t tmp = (data_high_ << (64 - shift)) | (data_low_ >> shift); + return Uint128(data_high_ >> shift, tmp); + } + Uint128 operator<<(int shift) const { + VIXL_ASSERT((shift >= 0) && (shift < 128)); + if (shift == 0) return *this; + if (shift >= 64) { + return Uint128(data_low_ << (shift - 64), 0); + } + uint64_t tmp = (data_high_ << shift) | (data_low_ >> (64 - shift)); + return Uint128(tmp, data_low_ << shift); + } +}; + +Uint32::Uint32(Uint64 data) : data_(data.ToUint32().Get()) {} +Uint64::Uint64(Uint128 data) : data_(data.ToUint64().Get()) {} + +Int64 BitCount(Uint32 value); + +// The algorithm used is adapted from the one described in section 8.2 of +// Hacker's Delight, by Henry S. Warren, Jr. +// template +// int64_t MultiplyHigh(T u, T v) { +// uint64_t u0, v0, w0, u1, v1, w1, w2, t; +// VIXL_STATIC_ASSERT((N == 8) || (N == 16) || (N == 32) || (N == 64)); +// uint64_t sign_mask = UINT64_C(1) << (N - 1); +// uint64_t sign_ext = 0; +// unsigned half_bits = N / 2; +// uint64_t half_mask = GetUintMask(half_bits); +// if (std::numeric_limits::is_signed) { +// sign_ext = UINT64_C(0xffffffffffffffff) << half_bits; +// } + +// VIXL_ASSERT(sizeof(u) == sizeof(uint64_t)); +// VIXL_ASSERT(sizeof(u) == sizeof(u0)); + +// u0 = u & half_mask; +// u1 = u >> half_bits | (((u & sign_mask) != 0) ? sign_ext : 0); +// v0 = v & half_mask; +// v1 = v >> half_bits | (((v & sign_mask) != 0) ? sign_ext : 0); + +// w0 = u0 * v0; +// t = u1 * v0 + (w0 >> half_bits); + +// w1 = t & half_mask; +// w2 = t >> half_bits | (((t & sign_mask) != 0) ? sign_ext : 0); +// w1 = u0 * v1 + w1; +// w1 = w1 >> half_bits | (((w1 & sign_mask) != 0) ? sign_ext : 0); + +// uint64_t value = u1 * v1 + w2 + w1; +// int64_t result; +// memcpy(&result, &value, sizeof(result)); +// return result; +// } + +} // namespace internal + +// The default NaN values (for FPCR.DN=1). +extern const double kFP64DefaultNaN; +extern const float kFP32DefaultNaN; +extern const Float16 kFP16DefaultNaN; + +// Floating-point infinity values. +extern const Float16 kFP16PositiveInfinity; +extern const Float16 kFP16NegativeInfinity; +extern const float kFP32PositiveInfinity; +extern const float kFP32NegativeInfinity; +extern const double kFP64PositiveInfinity; +extern const double kFP64NegativeInfinity; + +// Floating-point zero values. +extern const Float16 kFP16PositiveZero; +extern const Float16 kFP16NegativeZero; + +// AArch64 floating-point specifics. These match IEEE-754. +const unsigned kDoubleMantissaBits = 52; +const unsigned kDoubleExponentBits = 11; +const unsigned kFloatMantissaBits = 23; +const unsigned kFloatExponentBits = 8; +const unsigned kFloat16MantissaBits = 10; +const unsigned kFloat16ExponentBits = 5; + +enum FPRounding { + // The first four values are encodable directly by FPCR. + FPTieEven = 0x0, + FPPositiveInfinity = 0x1, + FPNegativeInfinity = 0x2, + FPZero = 0x3, + + // The final rounding modes are only available when explicitly specified by + // the instruction (such as with fcvta). It cannot be set in FPCR. + FPTieAway, + FPRoundOdd +}; + +enum UseDefaultNaN { kUseDefaultNaN, kIgnoreDefaultNaN }; + +// Assemble the specified IEEE-754 components into the target type and apply +// appropriate rounding. +// sign: 0 = positive, 1 = negative +// exponent: Unbiased IEEE-754 exponent. +// mantissa: The mantissa of the input. The top bit (which is not encoded for +// normal IEEE-754 values) must not be omitted. This bit has the +// value 'pow(2, exponent)'. +// +// The input value is assumed to be a normalized value. That is, the input may +// not be infinity or NaN. If the source value is subnormal, it must be +// normalized before calling this function such that the highest set bit in the +// mantissa has the value 'pow(2, exponent)'. +// +// Callers should use FPRoundToFloat or FPRoundToDouble directly, rather than +// calling a templated FPRound. +template +T FPRound(int64_t sign, + int64_t exponent, + uint64_t mantissa, + FPRounding round_mode) { + VIXL_ASSERT((sign == 0) || (sign == 1)); + + // Only FPTieEven and FPRoundOdd rounding modes are implemented. + VIXL_ASSERT((round_mode == FPTieEven) || (round_mode == FPRoundOdd)); + + // Rounding can promote subnormals to normals, and normals to infinities. For + // example, a double with exponent 127 (FLT_MAX_EXP) would appear to be + // encodable as a float, but rounding based on the low-order mantissa bits + // could make it overflow. With ties-to-even rounding, this value would become + // an infinity. + + // ---- Rounding Method ---- + // + // The exponent is irrelevant in the rounding operation, so we treat the + // lowest-order bit that will fit into the result ('onebit') as having + // the value '1'. Similarly, the highest-order bit that won't fit into + // the result ('halfbit') has the value '0.5'. The 'point' sits between + // 'onebit' and 'halfbit': + // + // These bits fit into the result. + // |---------------------| + // mantissa = 0bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + // || + // / | + // / halfbit + // onebit + // + // For subnormal outputs, the range of representable bits is smaller and + // the position of onebit and halfbit depends on the exponent of the + // input, but the method is otherwise similar. + // + // onebit(frac) + // | + // | halfbit(frac) halfbit(adjusted) + // | / / + // | | | + // 0b00.0 (exact) -> 0b00.0 (exact) -> 0b00 + // 0b00.0... -> 0b00.0... -> 0b00 + // 0b00.1 (exact) -> 0b00.0111..111 -> 0b00 + // 0b00.1... -> 0b00.1... -> 0b01 + // 0b01.0 (exact) -> 0b01.0 (exact) -> 0b01 + // 0b01.0... -> 0b01.0... -> 0b01 + // 0b01.1 (exact) -> 0b01.1 (exact) -> 0b10 + // 0b01.1... -> 0b01.1... -> 0b10 + // 0b10.0 (exact) -> 0b10.0 (exact) -> 0b10 + // 0b10.0... -> 0b10.0... -> 0b10 + // 0b10.1 (exact) -> 0b10.0111..111 -> 0b10 + // 0b10.1... -> 0b10.1... -> 0b11 + // 0b11.0 (exact) -> 0b11.0 (exact) -> 0b11 + // ... / | / | + // / | / | + // / | + // adjusted = frac - (halfbit(mantissa) & ~onebit(frac)); / | + // + // mantissa = (mantissa >> shift) + halfbit(adjusted); + + static const int mantissa_offset = 0; + static const int exponent_offset = mantissa_offset + mbits; + static const int sign_offset = exponent_offset + ebits; + VIXL_ASSERT(sign_offset == (sizeof(T) * 8 - 1)); + + // Bail out early for zero inputs. + if (mantissa == 0) { + return static_cast(sign << sign_offset); + } + + // If all bits in the exponent are set, the value is infinite or NaN. + // This is true for all binary IEEE-754 formats. + static const int infinite_exponent = (1 << ebits) - 1; + static const int max_normal_exponent = infinite_exponent - 1; + + // Apply the exponent bias to encode it for the result. Doing this early makes + // it easy to detect values that will be infinite or subnormal. + exponent += max_normal_exponent >> 1; + + if (exponent > max_normal_exponent) { + // Overflow: the input is too large for the result type to represent. + if (round_mode == FPTieEven) { + // FPTieEven rounding mode handles overflows using infinities. + exponent = infinite_exponent; + mantissa = 0; + } else { + VIXL_ASSERT(round_mode == FPRoundOdd); + // FPRoundOdd rounding mode handles overflows using the largest magnitude + // normal number. + exponent = max_normal_exponent; + mantissa = (UINT64_C(1) << exponent_offset) - 1; + } + return static_cast((sign << sign_offset) | + (exponent << exponent_offset) | + (mantissa << mantissa_offset)); + } + + // Calculate the shift required to move the top mantissa bit to the proper + // place in the destination type. + const int highest_significant_bit = 63 - CountLeadingZeros(mantissa); + int shift = highest_significant_bit - mbits; + + if (exponent <= 0) { + // The output will be subnormal (before rounding). + // For subnormal outputs, the shift must be adjusted by the exponent. The +1 + // is necessary because the exponent of a subnormal value (encoded as 0) is + // the same as the exponent of the smallest normal value (encoded as 1). + shift += -exponent + 1; + + // Handle inputs that would produce a zero output. + // + // Shifts higher than highest_significant_bit+1 will always produce a zero + // result. A shift of exactly highest_significant_bit+1 might produce a + // non-zero result after rounding. + if (shift > (highest_significant_bit + 1)) { + if (round_mode == FPTieEven) { + // The result will always be +/-0.0. + return static_cast(sign << sign_offset); + } else { + VIXL_ASSERT(round_mode == FPRoundOdd); + VIXL_ASSERT(mantissa != 0); + // For FPRoundOdd, if the mantissa is too small to represent and + // non-zero return the next "odd" value. + return static_cast((sign << sign_offset) | 1); + } + } + + // Properly encode the exponent for a subnormal output. + exponent = 0; + } else { + // Clear the topmost mantissa bit, since this is not encoded in IEEE-754 + // normal values. + mantissa &= ~(UINT64_C(1) << highest_significant_bit); + } + + // The casts below are only well-defined for unsigned integers. + // VIXL_STATIC_ASSERT(std::numeric_limits::is_integer); + // VIXL_STATIC_ASSERT(!std::numeric_limits::is_signed); + + if (shift > 0) { + if (round_mode == FPTieEven) { + // We have to shift the mantissa to the right. Some precision is lost, so + // we need to apply rounding. + uint64_t onebit_mantissa = (mantissa >> (shift)) & 1; + uint64_t halfbit_mantissa = (mantissa >> (shift - 1)) & 1; + uint64_t adjustment = (halfbit_mantissa & ~onebit_mantissa); + uint64_t adjusted = mantissa - adjustment; + T halfbit_adjusted = (adjusted >> (shift - 1)) & 1; + + T result = + static_cast((sign << sign_offset) | (exponent << exponent_offset) | + ((mantissa >> shift) << mantissa_offset)); + + // A very large mantissa can overflow during rounding. If this happens, + // the exponent should be incremented and the mantissa set to 1.0 + // (encoded as 0). Applying halfbit_adjusted after assembling the float + // has the nice side-effect that this case is handled for free. + // + // This also handles cases where a very large finite value overflows to + // infinity, or where a very large subnormal value overflows to become + // normal. + return result + halfbit_adjusted; + } else { + VIXL_ASSERT(round_mode == FPRoundOdd); + // If any bits at position halfbit or below are set, onebit (ie. the + // bottom bit of the resulting mantissa) must be set. + uint64_t fractional_bits = mantissa & ((UINT64_C(1) << shift) - 1); + if (fractional_bits != 0) { + mantissa |= UINT64_C(1) << shift; + } + + return static_cast((sign << sign_offset) | + (exponent << exponent_offset) | + ((mantissa >> shift) << mantissa_offset)); + } + } else { + // We have to shift the mantissa to the left (or not at all). The input + // mantissa is exactly representable in the output mantissa, so apply no + // rounding correction. + return static_cast((sign << sign_offset) | + (exponent << exponent_offset) | + ((mantissa << -shift) << mantissa_offset)); + } +} + + +// See FPRound for a description of this function. +inline double FPRoundToDouble(int64_t sign, + int64_t exponent, + uint64_t mantissa, + FPRounding round_mode) { + uint64_t bits = + FPRound(sign, + exponent, + mantissa, + round_mode); + return RawbitsToDouble(bits); +} + + +// See FPRound for a description of this function. +inline Float16 FPRoundToFloat16(int64_t sign, + int64_t exponent, + uint64_t mantissa, + FPRounding round_mode) { + return RawbitsToFloat16( + FPRound( + sign, exponent, mantissa, round_mode)); +} + + +// See FPRound for a description of this function. +static inline float FPRoundToFloat(int64_t sign, + int64_t exponent, + uint64_t mantissa, + FPRounding round_mode) { + uint32_t bits = + FPRound(sign, + exponent, + mantissa, + round_mode); + return RawbitsToFloat(bits); +} + + +float FPToFloat(Float16 value, UseDefaultNaN DN, bool* exception = NULL); +float FPToFloat(double value, + FPRounding round_mode, + UseDefaultNaN DN, + bool* exception = NULL); + +double FPToDouble(Float16 value, UseDefaultNaN DN, bool* exception = NULL); +double FPToDouble(float value, UseDefaultNaN DN, bool* exception = NULL); + +Float16 FPToFloat16(float value, + FPRounding round_mode, + UseDefaultNaN DN, + bool* exception = NULL); + +Float16 FPToFloat16(double value, + FPRounding round_mode, + UseDefaultNaN DN, + bool* exception = NULL); + +// Like static_cast(value), but with specialisations for the Float16 type. +template +T StaticCastFPTo(F value) { + return static_cast(value); +} + +template <> +inline float StaticCastFPTo(Float16 value) { + return FPToFloat(value, kIgnoreDefaultNaN); +} + +template <> +inline double StaticCastFPTo(Float16 value) { + return FPToDouble(value, kIgnoreDefaultNaN); +} + +template <> +inline Float16 StaticCastFPTo(float value) { + return FPToFloat16(value, FPTieEven, kIgnoreDefaultNaN); +} + +template <> +inline Float16 StaticCastFPTo(double value) { + return FPToFloat16(value, FPTieEven, kIgnoreDefaultNaN); +} + +template +uint64_t FPToRawbitsWithSize(unsigned size_in_bits, T value) { + switch (size_in_bits) { + case 16: + return Float16ToRawbits(StaticCastFPTo(value)); + case 32: + return FloatToRawbits(StaticCastFPTo(value)); + case 64: + return DoubleToRawbits(StaticCastFPTo(value)); + } + VIXL_UNREACHABLE(); + return 0; +} + +template +T RawbitsWithSizeToFP(unsigned size_in_bits, uint64_t value) { + VIXL_ASSERT(IsUintN(size_in_bits, value)); + switch (size_in_bits) { + case 16: + return StaticCastFPTo(RawbitsToFloat16(static_cast(value))); + case 32: + return StaticCastFPTo(RawbitsToFloat(static_cast(value))); + case 64: + return StaticCastFPTo(RawbitsToDouble(value)); + } + VIXL_UNREACHABLE(); + return 0; +} + +} // namespace vixl + +#endif // VIXL_UTILS_H diff --git a/src/coreclr/md/compiler/importhelper.cpp b/src/coreclr/md/compiler/importhelper.cpp index a18af9a6a3d780..dc16bdac2f72d7 100644 --- a/src/coreclr/md/compiler/importhelper.cpp +++ b/src/coreclr/md/compiler/importhelper.cpp @@ -16,9 +16,6 @@ #include "strongnameinternal.h" #include "sstring.h" -#define COM_RUNTIME_LIBRARY "ComRuntimeLibrary" - - //******************************************************************************* // Find the MethodSpec by Method and Instantiation //******************************************************************************* @@ -2477,7 +2474,6 @@ ImportHelper::ImportTypeDef( LPCUTF8 szModuleImport; mdToken tkOuterRes = mdTokenNil; HRESULT hr = S_OK; - BOOL bBCL = false; _ASSERTE(pMiniMdEmit && pCommonImport && ptkType); _ASSERTE(TypeFromToken(tdImport) == mdtTypeDef && tdImport != mdTypeDefNil); @@ -2494,43 +2490,7 @@ ImportHelper::ImportTypeDef( } IfFailGo(static_cast(pMiniMdEmit)->CommonGetScopeProps(0, &MvidEmit)); - if (pCommonAssemImport == NULL && strcmp(szModuleImport, COM_RUNTIME_LIBRARY) == 0) - { - const BYTE *pBlob; // Blob with dispid. - ULONG cbBlob; // Length of blob. - WCHAR wzBlob[40]; // Wide char format of guid. - int ix; // Loop control. - - hr = pCommonImport->CommonGetCustomAttributeByName(1, INTEROP_GUID_TYPE, (const void **)&pBlob, &cbBlob); - if (hr != S_FALSE) - { - // Should be in format. Total length == 41 - // <0x0001><0x24>01234567-0123-0123-0123-001122334455<0x0000> - if ((cbBlob == 41) || (GET_UNALIGNED_VAL16(pBlob) == 1)) - { - for (ix=1; ix<=36; ++ix) - wzBlob[ix] = pBlob[ix+2]; - wzBlob[0] = '{'; - wzBlob[37] = '}'; - wzBlob[38] = 0; - // It's ok that we ignore the hr here. It's not needed, but I - // don't want to remove it in case a code analysis tool will complain - // about not capturing return codes. - hr = LPCWSTRToGuid(wzBlob, &GuidImport) ? S_OK : E_FAIL; - } - } - bBCL = (GuidImport == LIBID_ComPlusRuntime); - } - - // Compute the ResolutionScope for the imported type. - if (bBCL) - { - // This is the case that we are referring to SPCL but client does not provide the manifest for - // SPCL!! Do not generate ModuleRef to the SPCL. But instead we should just leave the - // ResolutionScope empty - tkOuterRes = mdTokenNil; - } - else if (MvidAssemImport == MvidAssemEmit && MvidImport == MvidEmit) + if (MvidAssemImport == MvidAssemEmit && MvidImport == MvidEmit) { // The TypeDef is in the same Assembly and the Same scope. if (bReturnTd) @@ -2979,9 +2939,6 @@ HRESULT ImportHelper::CreateModuleRefFromScope( // S_OK or error. *ptkModuleRef = TokenFromRid(iRecordEmit, mdtModuleRef); IfFailGo(pMiniMdEmit->UpdateENCLog(*ptkModuleRef)); - // It is a bug to create an ModuleRef to SPCL - _ASSERTE(strcmp(szName, COM_RUNTIME_LIBRARY) != 0); - // Set the name of ModuleRef. IfFailGo(pMiniMdEmit->PutString(TBL_ModuleRef, ModuleRefRec::COL_Name, pRecordEmit, szName)); diff --git a/src/coreclr/md/compiler/mdutil.cpp b/src/coreclr/md/compiler/mdutil.cpp index 8fb1551ef7ceea..05b56a25875bb0 100644 --- a/src/coreclr/md/compiler/mdutil.cpp +++ b/src/coreclr/md/compiler/mdutil.cpp @@ -265,11 +265,7 @@ HRESULT LOADEDMODULES::FindCachedReadOnlyEntry( { // If the name matches... LPCWSTR pszName = pRegMeta->GetNameOfDBFile(); - #ifdef FEATURE_CASE_SENSITIVE_FILESYSTEM - if (u16_strcmp(szName, pszName) == 0) - #else if (SString::_wcsicmp(szName, pszName) == 0) - #endif { ULONG cRefs; @@ -299,11 +295,7 @@ HRESULT LOADEDMODULES::FindCachedReadOnlyEntry( { // If the name matches... LPCWSTR pszName = pRegMeta->GetNameOfDBFile(); - #ifdef FEATURE_CASE_SENSITIVE_FILESYSTEM - if (u16_strcmp(szName, pszName) == 0) - #else if (SString::_wcsicmp(szName, pszName) == 0) - #endif { ULONG cRefs; diff --git a/src/coreclr/md/enc/stgio.cpp b/src/coreclr/md/enc/stgio.cpp index 5853fb71bde669..c4bcb14deb20c4 100644 --- a/src/coreclr/md/enc/stgio.cpp +++ b/src/coreclr/md/enc/stgio.cpp @@ -232,7 +232,7 @@ HRESULT StgIO::Open( // Return code. // most of the security risk anyway). if ((fFlags & DBPROP_TMODEF_TRYLOADLIBRARY) != 0) { - m_hModule = WszLoadLibraryEx(szName, NULL, LOAD_LIBRARY_AS_IMAGE_RESOURCE); + m_hModule = WszLoadLibrary(szName, NULL, LOAD_LIBRARY_AS_IMAGE_RESOURCE); if (m_hModule != NULL) { m_iType = STGIO_HMODULE; diff --git a/src/coreclr/nativeaot/Bootstrap/base/CMakeLists.txt b/src/coreclr/nativeaot/Bootstrap/base/CMakeLists.txt index 3ffc81ac648b09..22c194d7fafb74 100644 --- a/src/coreclr/nativeaot/Bootstrap/base/CMakeLists.txt +++ b/src/coreclr/nativeaot/Bootstrap/base/CMakeLists.txt @@ -12,7 +12,7 @@ install_bootstrapper_object(bootstrapper aotsdk) if (CLR_CMAKE_TARGET_WIN32) add_library(bootstrapper.GuardCF OBJECT ${SOURCES}) install_bootstrapper_object(bootstrapper.GuardCF aotsdk) - target_compile_options(bootstrapper.GuardCF PRIVATE $<$,$>:/guard:cf>) + set_target_properties(bootstrapper.GuardCF PROPERTIES CLR_CONTROL_FLOW_GUARD ON) else() add_library(stdc++compat STATIC ../stdcppshim.cpp) install_static_library(stdc++compat aotsdk nativeaot) diff --git a/src/coreclr/nativeaot/Bootstrap/dll/CMakeLists.txt b/src/coreclr/nativeaot/Bootstrap/dll/CMakeLists.txt index 14eb3ece8e1e04..263518e4b006f3 100644 --- a/src/coreclr/nativeaot/Bootstrap/dll/CMakeLists.txt +++ b/src/coreclr/nativeaot/Bootstrap/dll/CMakeLists.txt @@ -13,5 +13,5 @@ install_bootstrapper_object(bootstrapperdll aotsdk) if (CLR_CMAKE_TARGET_WIN32) add_library(bootstrapperdll.GuardCF STATIC ${SOURCES}) install_bootstrapper_object(bootstrapperdll.GuardCF aotsdk) - target_compile_options(bootstrapperdll.GuardCF PRIVATE $<$,$>:/guard:cf>) + set_target_properties(bootstrapperdll.GuardCF PROPERTIES CLR_CONTROL_FLOW_GUARD ON) endif() diff --git a/src/coreclr/nativeaot/Bootstrap/main.cpp b/src/coreclr/nativeaot/Bootstrap/main.cpp index cc78cf8d6710a9..c2ff85b50e81fd 100644 --- a/src/coreclr/nativeaot/Bootstrap/main.cpp +++ b/src/coreclr/nativeaot/Bootstrap/main.cpp @@ -93,7 +93,7 @@ static char& __unbox_z = __stop___unbox; #endif // _MSC_VER -extern "C" bool RhInitialize(); +extern "C" bool RhInitialize(bool isDll); extern "C" void RhSetRuntimeInitializationCallback(int (*fPtr)()); extern "C" bool RhRegisterOSModule(void * pModule, @@ -164,7 +164,13 @@ extern "C" void __managed__Startup(); static int InitializeRuntime() { - if (!RhInitialize()) + if (!RhInitialize( +#ifdef NATIVEAOT_DLL + /* isDll */ true +#else + /* isDll */ false +#endif + )) return -1; void * osModule = PalGetModuleHandleFromPointer((void*)&NATIVEAOT_ENTRYPOINT); diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets index 32eefb307eb0fd..256b344888cc07 100644 --- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets +++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets @@ -50,13 +50,10 @@ Text="RuntimeIdentifier is required for native compilation. Try running dotnet publish with the -r option value specified." /> - - + - - @@ -96,7 +93,10 @@ + + diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets index 409fcb654e919d..1f5b2cd681095c 100644 --- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets +++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets @@ -50,6 +50,8 @@ The .NET Foundation licenses this file to you under the MIT license. libeventpipe-disabled libeventpipe-enabled + + true @@ -121,7 +123,7 @@ The .NET Foundation licenses this file to you under the MIT license. - + diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets index b73da221f44b0b..74c2b457b9ad85 100644 --- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets +++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets @@ -263,7 +263,7 @@ The .NET Foundation licenses this file to you under the MIT license. - + @@ -280,9 +280,6 @@ The .NET Foundation licenses this file to you under the MIT license. - - - @@ -331,6 +328,7 @@ The .NET Foundation licenses this file to you under the MIT license. + diff --git a/src/coreclr/nativeaot/CMakeLists.txt b/src/coreclr/nativeaot/CMakeLists.txt index 74bf4449e24c7c..557a70ed48db97 100644 --- a/src/coreclr/nativeaot/CMakeLists.txt +++ b/src/coreclr/nativeaot/CMakeLists.txt @@ -3,20 +3,11 @@ if(WIN32) endif (WIN32) if(MSVC) - add_compile_options($<$:/EHa->) # Native AOT runtime does not use C++ exception handling - add_compile_options($<$:/EHs->) - - # CFG runtime checks in C++ code are unnecessary overhead unless Native AOT compiler produces CFG compliant code as well - # and CFG is enabled in the linker - if(CMAKE_CXX_FLAGS MATCHES "/guard:cf") - string(REPLACE "/guard:cf" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - endif() - if(CMAKE_C_FLAGS MATCHES "/guard:cf") - string(REPLACE "/guard:cf" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") - endif() + set_property(DIRECTORY PROPERTY CLR_EH_OPTION /EHa-s-) # Native AOT runtime does not use C++ exception handling + set_property(DIRECTORY PROPERTY CLR_CONTROL_FLOW_GUARD OFF) # The code generated by the Native AOT compiler doesn't work with Link Time Code Generation - add_compile_options($<$:/GL->) + set(CMAKE_INTERPROCEDURAL_OPTIMIZATION OFF) # Sets the options that create the fastest code in the majority of cases add_compile_options($<$,$>:/O2>) diff --git a/src/coreclr/nativeaot/Common/src/Internal/Runtime/CompilerHelpers/StartupCodeHelpers.cs b/src/coreclr/nativeaot/Common/src/Internal/Runtime/CompilerHelpers/StartupCodeHelpers.cs index 79a824895df94b..21c9282c1ecf87 100644 --- a/src/coreclr/nativeaot/Common/src/Internal/Runtime/CompilerHelpers/StartupCodeHelpers.cs +++ b/src/coreclr/nativeaot/Common/src/Internal/Runtime/CompilerHelpers/StartupCodeHelpers.cs @@ -139,7 +139,7 @@ private static unsafe void InitializeGlobalTablesForModule(TypeManagerHandle typ // Call write barrier directly. Assigning object reference does a type check. Debug.Assert((uint)moduleIndex < (uint)gcStaticBaseSpines.Length); ref object rawSpineIndexData = ref Unsafe.As(ref Unsafe.As(gcStaticBaseSpines).Data); - InternalCalls.RhpAssignRef(ref Unsafe.Add(ref rawSpineIndexData, moduleIndex), spine); + Unsafe.Add(ref rawSpineIndexData, moduleIndex) = spine; } // Initialize frozen object segment for the module with GC present @@ -229,7 +229,7 @@ private static unsafe object[] InitializeStatics(IntPtr gcStaticRegionStart, int // Call write barrier directly. Assigning object reference does a type check. Debug.Assert(currentBase < spine.Length); - InternalCalls.RhpAssignRef(ref Unsafe.Add(ref rawSpineData, currentBase), obj); + Unsafe.Add(ref rawSpineData, currentBase) = obj; // Update the base pointer to point to the pinned object *pBlock = *(IntPtr*)Unsafe.AsPointer(ref obj); diff --git a/src/coreclr/nativeaot/Common/src/Internal/Runtime/MethodTable.cs b/src/coreclr/nativeaot/Common/src/Internal/Runtime/MethodTable.cs index 4f0d64a453dcfc..5d4941da1b9689 100644 --- a/src/coreclr/nativeaot/Common/src/Internal/Runtime/MethodTable.cs +++ b/src/coreclr/nativeaot/Common/src/Internal/Runtime/MethodTable.cs @@ -506,20 +506,19 @@ internal MethodTable* GenericDefinition get { Debug.Assert(IsGeneric); + + uint offset = GetFieldOffset(EETypeField.ETF_GenericDefinition); + if (IsDynamicType || !SupportsRelativePointers) - return GetField>(EETypeField.ETF_GenericDefinition).Value; + return GetField>(offset).Value; - return GetField>(EETypeField.ETF_GenericDefinition).Value; + return GetField>(offset).Value; } #if TYPE_LOADER_IMPLEMENTATION set { Debug.Assert(IsGeneric && IsDynamicType); - uint cbOffset = GetFieldOffset(EETypeField.ETF_GenericDefinition); - fixed (MethodTable* pThis = &this) - { - *((MethodTable**)((byte*)pThis + cbOffset)) = value; - } + GetField(EETypeField.ETF_GenericDefinition) = (IntPtr)value; } #endif } @@ -533,11 +532,7 @@ internal static int GetGenericCompositionSize(int numArguments) internal void SetGenericComposition(IntPtr data) { Debug.Assert(IsGeneric && IsDynamicType); - uint cbOffset = GetFieldOffset(EETypeField.ETF_GenericComposition); - fixed (MethodTable* pThis = &this) - { - *((IntPtr*)((byte*)pThis + cbOffset)) = data; - } + GetField(EETypeField.ETF_GenericComposition) = data; } #endif @@ -589,10 +584,12 @@ internal GenericVariance* GenericVariance if (IsGeneric) return GenericDefinition->GenericVariance; + uint offset = GetFieldOffset(EETypeField.ETF_GenericComposition); + if (IsDynamicType || !SupportsRelativePointers) - return GetField>(EETypeField.ETF_GenericComposition).Value; + return GetField>(offset).Value; - return GetField>(EETypeField.ETF_GenericComposition).Value; + return GetField>(offset).Value; } } @@ -869,18 +866,18 @@ internal DispatchMap* DispatchMap if (!HasDispatchMap) return null; + uint offset = GetFieldOffset(EETypeField.ETF_DispatchMap); + if (IsDynamicType || !SupportsRelativePointers) - return GetField>(EETypeField.ETF_DispatchMap).Value; + return GetField>(offset).Value; - return GetField>(EETypeField.ETF_DispatchMap).Value; + return GetField>(offset).Value; } #if TYPE_LOADER_IMPLEMENTATION set { Debug.Assert(IsDynamicType && HasDispatchMap); - - fixed (MethodTable* pThis = &this) - *(DispatchMap**)((byte*)pThis + GetFieldOffset(EETypeField.ETF_DispatchMap)) = value; + GetField(EETypeField.ETF_DispatchMap) = (IntPtr)value; } #endif } @@ -892,18 +889,18 @@ internal IntPtr FinalizerCode { Debug.Assert(IsFinalizable); + uint offset = GetFieldOffset(EETypeField.ETF_Finalizer); + if (IsDynamicType || !SupportsRelativePointers) - return GetField(EETypeField.ETF_Finalizer).Value; + return GetField(offset).Value; - return GetField(EETypeField.ETF_Finalizer).Value; + return GetField(offset).Value; } #if TYPE_LOADER_IMPLEMENTATION set { Debug.Assert(IsDynamicType && IsFinalizable); - - fixed (MethodTable* pThis = &this) - *(IntPtr*)((byte*)pThis + GetFieldOffset(EETypeField.ETF_Finalizer)) = value; + GetField(EETypeField.ETF_Finalizer) = value; } #endif } @@ -995,14 +992,8 @@ internal MethodTable* RelatedParameterType internal unsafe IntPtr* GetVTableStartAddress() { - byte* pResult; - // EETypes are always in unmanaged memory, so 'leaking' the 'fixed pointer' is safe. - fixed (MethodTable* pThis = &this) - pResult = (byte*)pThis; - - pResult += sizeof(MethodTable); - return (IntPtr*)pResult; + return (IntPtr*)((byte*)Unsafe.AsPointer(ref this) + sizeof(MethodTable)); } private static IntPtr FollowRelativePointer(int* pDist) @@ -1053,10 +1044,12 @@ internal byte* OptionalFieldsPtr if (!HasOptionalFields) return null; + uint offset = GetFieldOffset(EETypeField.ETF_OptionalFieldsPtr); + if (IsDynamicType || !SupportsRelativePointers) - return GetField>(EETypeField.ETF_OptionalFieldsPtr).Value; + return GetField>(offset).Value; - return GetField>(EETypeField.ETF_OptionalFieldsPtr).Value; + return GetField>(offset).Value; } #if TYPE_LOADER_IMPLEMENTATION set @@ -1065,11 +1058,7 @@ internal byte* OptionalFieldsPtr _uFlags |= (uint)EETypeFlags.OptionalFieldsFlag; - uint cbOptionalFieldsOffset = GetFieldOffset(EETypeField.ETF_OptionalFieldsPtr); - fixed (MethodTable* pThis = &this) - { - *(byte**)((byte*)pThis + cbOptionalFieldsOffset) = value; - } + GetField(EETypeField.ETF_OptionalFieldsPtr) = (IntPtr)value; } #endif } @@ -1079,21 +1068,13 @@ internal MethodTable* DynamicTemplateType get { Debug.Assert(IsDynamicType); - uint cbOffset = GetFieldOffset(EETypeField.ETF_DynamicTemplateType); - fixed (MethodTable* pThis = &this) - { - return *(MethodTable**)((byte*)pThis + cbOffset); - } + return GetField>(EETypeField.ETF_DynamicTemplateType).Value; } #if TYPE_LOADER_IMPLEMENTATION set { Debug.Assert(IsDynamicType); - uint cbOffset = GetFieldOffset(EETypeField.ETF_DynamicTemplateType); - fixed (MethodTable* pThis = &this) - { - *(MethodTable**)((byte*)pThis + cbOffset) = value; - } + GetField(EETypeField.ETF_DynamicTemplateType) = (IntPtr)value; } #endif } @@ -1103,21 +1084,13 @@ internal IntPtr DynamicGcStaticsData get { Debug.Assert((RareFlags & EETypeRareFlags.IsDynamicTypeWithGcStatics) != 0); - uint cbOffset = GetFieldOffset(EETypeField.ETF_DynamicGcStatics); - fixed (MethodTable* pThis = &this) - { - return *(IntPtr*)((byte*)pThis + cbOffset); - } + return GetField(EETypeField.ETF_DynamicGcStatics); } #if TYPE_LOADER_IMPLEMENTATION set { Debug.Assert((RareFlags & EETypeRareFlags.IsDynamicTypeWithGcStatics) != 0); - uint cbOffset = GetFieldOffset(EETypeField.ETF_DynamicGcStatics); - fixed (MethodTable* pThis = &this) - { - *(IntPtr*)((byte*)pThis + cbOffset) = value; - } + GetField(EETypeField.ETF_DynamicGcStatics) = value; } #endif } @@ -1127,21 +1100,13 @@ internal IntPtr DynamicNonGcStaticsData get { Debug.Assert((RareFlags & EETypeRareFlags.IsDynamicTypeWithNonGcStatics) != 0); - uint cbOffset = GetFieldOffset(EETypeField.ETF_DynamicNonGcStatics); - fixed (MethodTable* pThis = &this) - { - return *(IntPtr*)((byte*)pThis + cbOffset); - } + return GetField(EETypeField.ETF_DynamicNonGcStatics); } #if TYPE_LOADER_IMPLEMENTATION set { Debug.Assert((RareFlags & EETypeRareFlags.IsDynamicTypeWithNonGcStatics) != 0); - uint cbOffset = GetFieldOffset(EETypeField.ETF_DynamicNonGcStatics); - fixed (MethodTable* pThis = &this) - { - *(IntPtr*)((byte*)pThis + cbOffset) = value; - } + GetField(EETypeField.ETF_DynamicNonGcStatics) = value; } #endif } @@ -1151,21 +1116,13 @@ internal IntPtr DynamicThreadStaticsIndex get { Debug.Assert((RareFlags & EETypeRareFlags.IsDynamicTypeWithThreadStatics) != 0); - uint cbOffset = GetFieldOffset(EETypeField.ETF_DynamicThreadStaticOffset); - fixed (MethodTable* pThis = &this) - { - return *(IntPtr*)((byte*)pThis + cbOffset); - } + return GetField(EETypeField.ETF_DynamicThreadStaticOffset); } #if TYPE_LOADER_IMPLEMENTATION set { Debug.Assert((RareFlags & EETypeRareFlags.IsDynamicTypeWithThreadStatics) != 0); - uint cbOffset = GetFieldOffset(EETypeField.ETF_DynamicThreadStaticOffset); - fixed (MethodTable* pThis = &this) - { - *(IntPtr*)((byte*)pThis + cbOffset) = value; - } + GetField(EETypeField.ETF_DynamicThreadStaticOffset) = value; } #endif } @@ -1174,11 +1131,13 @@ internal TypeManagerHandle TypeManager { get { + uint offset = GetFieldOffset(EETypeField.ETF_TypeManagerIndirection); + IntPtr typeManagerIndirection; if (IsDynamicType || !SupportsRelativePointers) - typeManagerIndirection = GetField(EETypeField.ETF_TypeManagerIndirection).Value; + typeManagerIndirection = GetField(offset).Value; else - typeManagerIndirection = GetField(EETypeField.ETF_TypeManagerIndirection).Value; + typeManagerIndirection = GetField(offset).Value; return *(TypeManagerHandle*)typeManagerIndirection; } @@ -1188,17 +1147,17 @@ internal IntPtr PointerToTypeManager { get { + uint offset = GetFieldOffset(EETypeField.ETF_TypeManagerIndirection); + if (IsDynamicType || !SupportsRelativePointers) - return GetField(EETypeField.ETF_TypeManagerIndirection).Value; + return GetField(offset).Value; - return GetField(EETypeField.ETF_TypeManagerIndirection).Value; + return GetField(offset).Value; } set { Debug.Assert(IsDynamicType); - uint cbOffset = GetFieldOffset(EETypeField.ETF_TypeManagerIndirection); - // This is always a pointer to a pointer to a type manager - *(TypeManagerHandle**)((byte*)Unsafe.AsPointer(ref this) + cbOffset) = (TypeManagerHandle*)value; + GetField(EETypeField.ETF_TypeManagerIndirection) = value; } } #endif @@ -1226,8 +1185,7 @@ internal void* WritableData { Debug.Assert(IsDynamicType && SupportsWritableData); - uint cbOffset = GetFieldOffset(EETypeField.ETF_WritableData); - *(void**)((byte*)Unsafe.AsPointer(ref this) + cbOffset) = value; + GetField(EETypeField.ETF_WritableData) = (IntPtr)value; } #endif } @@ -1417,11 +1375,13 @@ public uint GetFieldOffset(EETypeField eField) return 0; } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public ref T GetField(EETypeField eField) { return ref Unsafe.As(ref *((byte*)Unsafe.AsPointer(ref this) + GetFieldOffset(eField))); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public ref T GetField(uint offset) { return ref Unsafe.As(ref *((byte*)Unsafe.AsPointer(ref this) + offset)); @@ -1465,13 +1425,7 @@ internal readonly struct Pointer { private readonly IntPtr _value; - public IntPtr Value - { - get - { - return _value; - } - } + public IntPtr Value => _value; } // Wrapper around pointers @@ -1480,30 +1434,7 @@ public IntPtr Value { private readonly T* _value; - public T* Value - { - get - { - return _value; - } - } - } - - // Wrapper around pointers that might be indirected through IAT - [StructLayout(LayoutKind.Sequential)] - internal readonly unsafe struct IatAwarePointer where T : unmanaged - { - private readonly T* _value; - - public T* Value - { - get - { - if (((int)_value & IndirectionConstants.IndirectionCellPointer) == 0) - return _value; - return *(T**)((byte*)_value - IndirectionConstants.IndirectionCellPointer); - } - } + public T* Value => _value; } // Wrapper around relative pointers @@ -1512,13 +1443,7 @@ internal readonly struct RelativePointer { private readonly int _value; - public unsafe IntPtr Value - { - get - { - return (IntPtr)((byte*)Unsafe.AsPointer(ref Unsafe.AsRef(in _value)) + _value); - } - } + public unsafe IntPtr Value => (IntPtr)((byte*)Unsafe.AsPointer(ref Unsafe.AsRef(in _value)) + _value); } // Wrapper around relative pointers @@ -1527,35 +1452,7 @@ public unsafe IntPtr Value { private readonly int _value; - public T* Value - { - get - { - return (T*)((byte*)Unsafe.AsPointer(ref Unsafe.AsRef(in _value)) + _value); - } - } - } - - // Wrapper around relative pointers that might be indirected through IAT - [StructLayout(LayoutKind.Sequential)] - internal readonly unsafe struct IatAwareRelativePointer where T : unmanaged - { - private readonly int _value; - - public T* Value - { - get - { - if ((_value & IndirectionConstants.IndirectionCellPointer) == 0) - { - return (T*)((byte*)Unsafe.AsPointer(ref Unsafe.AsRef(in _value)) + _value); - } - else - { - return *(T**)((byte*)Unsafe.AsPointer(ref Unsafe.AsRef(in _value)) + (_value & ~IndirectionConstants.IndirectionCellPointer)); - } - } - } + public T* Value => (T*)((byte*)Unsafe.AsPointer(ref Unsafe.AsRef(in _value)) + _value); } // Abstracts a list of MethodTable pointers that could either be relative diff --git a/src/coreclr/nativeaot/Common/src/System/Runtime/RhFailFastReason.cs b/src/coreclr/nativeaot/Common/src/System/Runtime/RhFailFastReason.cs new file mode 100644 index 00000000000000..09116734dbd548 --- /dev/null +++ b/src/coreclr/nativeaot/Common/src/System/Runtime/RhFailFastReason.cs @@ -0,0 +1,15 @@ +// 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 +{ + internal enum RhFailFastReason + { + Unknown = 0, + InternalError = 1, // "Runtime internal error" + UnhandledException = 2, // "unhandled exception" + UnhandledExceptionFromPInvoke = 3, // "Unhandled exception: an unmanaged exception was thrown out of a managed-to-native transition." + EnvironmentFailFast = 4, + AssertionFailure = 5, + } +} diff --git a/src/coreclr/nativeaot/Runtime.Base/src/System/Object.cs b/src/coreclr/nativeaot/Runtime.Base/src/System/Object.cs index 08d6279a064bc9..c120368b8cb642 100644 --- a/src/coreclr/nativeaot/Runtime.Base/src/System/Object.cs +++ b/src/coreclr/nativeaot/Runtime.Base/src/System/Object.cs @@ -45,14 +45,6 @@ internal MethodTable* MethodTable } } - internal EETypePtr EETypePtr - { - get - { - return new EETypePtr(new IntPtr(m_pEEType)); - } - } - [StructLayout(LayoutKind.Sequential)] private class RawData { @@ -74,7 +66,9 @@ internal ref byte GetRawData() /// internal uint GetRawDataSize() { - return EETypePtr.BaseSize - (uint)sizeof(ObjHeader) - (uint)sizeof(MethodTable*); + return m_pEEType->BaseSize - (uint)sizeof(ObjHeader) - (uint)sizeof(MethodTable*); } + + internal MethodTable* GetMethodTable() => m_pEEType; } } diff --git a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/ExceptionHandling.cs b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/ExceptionHandling.cs index 30ec1ff6051afc..6afba425d789b9 100644 --- a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/ExceptionHandling.cs +++ b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/ExceptionHandling.cs @@ -4,23 +4,18 @@ using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - +#if NATIVEAOT using Internal.Runtime; +#else +using System.Diagnostics.CodeAnalysis; +using System.Runtime.ExceptionServices; +#endif // Disable: Filter expression is a constant. We know. We just can't do an unfiltered catch. #pragma warning disable 7095 namespace System.Runtime { - public enum RhFailFastReason - { - Unknown = 0, - InternalError = 1, // "Runtime internal error" - UnhandledException = 2, // "unhandled exception" - UnhandledExceptionFromPInvoke = 3, // "Unhandled exception: an unmanaged exception was thrown out of a managed-to-native transition." - EnvironmentFailFast = 4, - } - internal static unsafe partial class EH { internal static UIntPtr MaxSP @@ -47,6 +42,9 @@ private struct RhEHClause internal byte* _filterAddress; internal byte* _handlerAddress; internal void* _pTargetType; +#if !NATIVEAOT + internal bool _isSameTry; +#endif /// /// We expect the stackwalker to adjust return addresses to point at 'return address - 1' so that we @@ -72,18 +70,33 @@ private struct EHEnum #pragma warning disable IDE0060 // This is a fail-fast function used by the runtime as a last resort that will terminate the process with // as little effort as possible. No guarantee is made about the semantics of this fail-fast. - internal static void FallbackFailFast(RhFailFastReason reason, object unhandledException) +#if !NATIVEAOT + [DoesNotReturn] +#endif + internal static void FallbackFailFast(RhFailFastReason reason, object? unhandledException) { +#if NATIVEAOT InternalCalls.RhpFallbackFailFast(); +#else + // TODO-NewEH: Debugging the FailFasts is difficult, debugger doesn't stop here, but + // only after the process exits. The Debugger.Break() is a temporary solution to + // help during development. Figure out how to do it properly. + System.Diagnostics.Debugger.Break(); + Environment.FailFast(reason.ToString()); +#endif } #pragma warning restore IDE0060 // Given an address pointing somewhere into a managed module, get the classlib-defined fail-fast // function and invoke it. Any failure to find and invoke the function, or if it returns, results in // MRT-defined fail-fast behavior. - internal static void FailFastViaClasslib(RhFailFastReason reason, object unhandledException, +#if !NATIVEAOT + [DoesNotReturn] +#endif + internal static void FailFastViaClasslib(RhFailFastReason reason, object? unhandledException, IntPtr classlibAddress) { +#if NATIVEAOT // Find the classlib function that will fail fast. This is a RuntimeExport function from the // classlib module, and is therefore managed-callable. IntPtr pFailFastFunction = (IntPtr)InternalCalls.RhpGetClasslibFunctionFromCodeAddress(classlibAddress, @@ -107,6 +120,7 @@ internal static void FailFastViaClasslib(RhFailFastReason reason, object unhandl } // The classlib's function should never return and should not throw. If it does, then we fail our way... +#endif FallbackFailFast(reason, unhandledException); } @@ -137,6 +151,7 @@ private struct OSCONTEXT private static void OnFirstChanceExceptionViaClassLib(object exception) { +#if NATIVEAOT IntPtr pOnFirstChanceFunction = (IntPtr)InternalCalls.RhpGetClasslibFunctionFromEEType(exception.GetMethodTable(), ClassLibFunctionId.OnFirstChance); @@ -153,10 +168,21 @@ private static void OnFirstChanceExceptionViaClassLib(object exception) { // disallow all exceptions leaking out of callbacks } +#else + try + { + AppContext.OnFirstChanceException(exception); + } + catch when (true) + { + // disallow all exceptions leaking out of callbacks + } +#endif } private static void OnUnhandledExceptionViaClassLib(object exception) { +#if NATIVEAOT IntPtr pOnUnhandledExceptionFunction = (IntPtr)InternalCalls.RhpGetClasslibFunctionFromEEType(exception.GetMethodTable(), ClassLibFunctionId.OnUnhandledException); @@ -173,12 +199,16 @@ private static void OnUnhandledExceptionViaClassLib(object exception) { // disallow all exceptions leaking out of callbacks } +#else + Debug.Assert(false, "Unhandled exceptions should be processed by the native runtime only"); +#endif } [MethodImpl(MethodImplOptions.NoInlining)] internal static unsafe void UnhandledExceptionFailFastViaClasslib( RhFailFastReason reason, object unhandledException, IntPtr classlibAddress, ref ExInfo exInfo) { +#if NATIVEAOT IntPtr pFailFastFunction = (IntPtr)InternalCalls.RhpGetClasslibFunctionFromCodeAddress(classlibAddress, ClassLibFunctionId.FailFast); @@ -209,6 +239,12 @@ internal static unsafe void UnhandledExceptionFailFastViaClasslib( // The classlib's function should never return and should not throw. If it does, then we fail our way... FallbackFailFast(reason, unhandledException); +#else + FailFastViaClasslib( + reason, + unhandledException, + classlibAddress); +#endif } private enum RhEHFrameType @@ -218,16 +254,17 @@ private enum RhEHFrameType } private static void AppendExceptionStackFrameViaClasslib(object exception, IntPtr ip, + UIntPtr sp, ref ExInfo exInfo, ref bool isFirstRethrowFrame, ref bool isFirstFrame) { + int flags = (isFirstFrame ? (int)RhEHFrameType.RH_EH_FIRST_FRAME : 0) | + (isFirstRethrowFrame ? (int)RhEHFrameType.RH_EH_FIRST_RETHROW_FRAME : 0); +#if NATIVEAOT IntPtr pAppendStackFrame = (IntPtr)InternalCalls.RhpGetClasslibFunctionFromCodeAddress(ip, ClassLibFunctionId.AppendExceptionStackFrame); if (pAppendStackFrame != IntPtr.Zero) { - int flags = (isFirstFrame ? (int)RhEHFrameType.RH_EH_FIRST_FRAME : 0) | - (isFirstRethrowFrame ? (int)RhEHFrameType.RH_EH_FIRST_RETHROW_FRAME : 0); - try { ((delegate*)pAppendStackFrame)(exception, ip, flags); @@ -241,6 +278,17 @@ private static void AppendExceptionStackFrameViaClasslib(object exception, IntPt isFirstRethrowFrame = false; isFirstFrame = false; } +#else +#pragma warning disable CS8500 + fixed (EH.ExInfo* pExInfo = &exInfo) + { + InternalCalls.RhpAppendExceptionStackFrame(ObjectHandleOnStack.Create(ref exception), ip, sp, flags, pExInfo); + } +#pragma warning restore CS8500 + // Clear flags only if we called the function + isFirstRethrowFrame = false; + isFirstFrame = false; +#endif } // Given an ExceptionID and an address pointing somewhere into a managed module, get @@ -248,6 +296,7 @@ private static void AppendExceptionStackFrameViaClasslib(object exception, IntPt // This finds the classlib-defined GetRuntimeException function and asks it for the exception object. internal static Exception GetClasslibException(ExceptionIDs id, IntPtr address) { +#if NATIVEAOT // Find the classlib function that will give us the exception object we want to throw. This // is a RuntimeExport function from the classlib module, and is therefore managed-callable. IntPtr pGetRuntimeExceptionFunction = @@ -263,7 +312,24 @@ internal static Exception GetClasslibException(ExceptionIDs id, IntPtr address) { // disallow all exceptions leaking out of callbacks } - +#else + Exception? e = id switch + { + ExceptionIDs.AccessViolation => new AccessViolationException(), + ExceptionIDs.Arithmetic => new ArithmeticException(), + ExceptionIDs.AmbiguousImplementation => new AmbiguousImplementationException(), + ExceptionIDs.ArrayTypeMismatch => new ArrayTypeMismatchException(), + ExceptionIDs.DataMisaligned => new DataMisalignedException(), + ExceptionIDs.DivideByZero => new DivideByZeroException(), + ExceptionIDs.EntrypointNotFound => new EntryPointNotFoundException(), + ExceptionIDs.IndexOutOfRange => new IndexOutOfRangeException(), + ExceptionIDs.InvalidCast => new InvalidCastException(), + ExceptionIDs.NullReference => new NullReferenceException(), + ExceptionIDs.OutOfMemory => new OutOfMemoryException(), + ExceptionIDs.Overflow => new OverflowException(), + _ => null + }; +#endif // If the helper fails to yield an object, then we fail-fast. if (e == null) { @@ -272,7 +338,7 @@ internal static Exception GetClasslibException(ExceptionIDs id, IntPtr address) return e; } - +#if NATIVEAOT // Given an ExceptionID and an MethodTable address, get an exception object of a type that the module containing // the given address will understand. This finds the classlib-defined GetRuntimeException function and asks // it for the exception object. @@ -367,6 +433,7 @@ public static Exception GetRuntimeException(ExceptionIDs id) } } #endif +#endif // NATIVEAOT private enum HwExceptionCode : uint { @@ -379,12 +446,15 @@ private enum HwExceptionCode : uint STATUS_INTEGER_DIVIDE_BY_ZERO = 0xC0000094u, STATUS_INTEGER_OVERFLOW = 0xC0000095u, } - [StructLayout(LayoutKind.Explicit, Size = AsmOffsets.SIZEOF__PAL_LIMITED_CONTEXT)] public struct PAL_LIMITED_CONTEXT { [FieldOffset(AsmOffsets.OFFSETOF__PAL_LIMITED_CONTEXT__IP)] internal IntPtr IP; +#if !NATIVEAOT + [FieldOffset(AsmOffsets.OFFSETOF__PAL_LIMITED_CONTEXT__FP)] + internal UIntPtr FP; +#endif // the rest of the struct is left unspecified. } @@ -475,14 +545,17 @@ internal object ThrownException // // Called by RhpThrowHwEx // +#if NATIVEAOT [RuntimeExport("RhThrowHwEx")] +#endif public static void RhThrowHwEx(uint exceptionCode, ref ExInfo exInfo) { +#if NATIVEAOT // trigger a GC (only if gcstress) to ensure we can stackwalk at this point GCStress.TriggerGC(); InternalCalls.RhpValidateExInfoStack(); - +#endif IntPtr faultingCodeAddress = exInfo._pExContext->IP; bool instructionFault = true; ExceptionIDs exceptionId = default(ExceptionIDs); @@ -502,9 +575,11 @@ public static void RhThrowHwEx(uint exceptionCode, ref ExInfo exInfo) exceptionId = ExceptionIDs.NullReference; break; +#if NATIVEAOT case (uint)HwExceptionCode.STATUS_REDHAWK_THREAD_ABORT: exceptionToThrow = InternalCalls.RhpGetThreadAbortException(); break; +#endif case (uint)HwExceptionCode.STATUS_DATATYPE_MISALIGNMENT: exceptionId = ExceptionIDs.DataMisaligned; @@ -544,14 +619,17 @@ public static void RhThrowHwEx(uint exceptionCode, ref ExInfo exInfo) private const uint MaxTryRegionIdx = 0xFFFFFFFFu; +#if NATIVEAOT [RuntimeExport("RhThrowEx")] +#endif public static void RhThrowEx(object exceptionObj, ref ExInfo exInfo) { +#if NATIVEAOT // trigger a GC (only if gcstress) to ensure we can stackwalk at this point GCStress.TriggerGC(); InternalCalls.RhpValidateExInfoStack(); - +#endif // Transform attempted throws of null to a throw of NullReferenceException. if (exceptionObj == null) { @@ -564,14 +642,17 @@ public static void RhThrowEx(object exceptionObj, ref ExInfo exInfo) FallbackFailFast(RhFailFastReason.InternalError, null); } +#if NATIVEAOT [RuntimeExport("RhRethrow")] +#endif public static void RhRethrow(ref ExInfo activeExInfo, ref ExInfo exInfo) { +#if NATIVEAOT // trigger a GC (only if gcstress) to ensure we can stackwalk at this point GCStress.TriggerGC(); InternalCalls.RhpValidateExInfoStack(); - +#endif // We need to copy the exception object to this stack location because collided unwinds // will cause the original stack location to go dead. object rethrownException = activeExInfo.ThrownException; @@ -623,7 +704,7 @@ private static void DispatchEx(scoped ref StackFrameIterator frameIter, ref ExIn DebugScanCallFrame(exInfo._passNumber, frameIter.ControlPC, frameIter.SP); - UpdateStackTrace(exceptionObj, exInfo._frameIter.FramePointer, (IntPtr)frameIter.OriginalControlPC, ref isFirstRethrowFrame, ref prevFramePtr, ref isFirstFrame); + UpdateStackTrace(exceptionObj, exInfo._frameIter.FramePointer, (IntPtr)frameIter.OriginalControlPC, frameIter.SP, ref isFirstRethrowFrame, ref prevFramePtr, ref isFirstFrame, ref exInfo); byte* pHandler; if (FindFirstPassHandler(exceptionObj, startIdx, ref frameIter, @@ -637,9 +718,10 @@ private static void DispatchEx(scoped ref StackFrameIterator frameIter, ref ExIn } } -#if FEATURE_OBJCMARSHAL if (unwoundReversePInvoke) { +#if NATIVEAOT +#if FEATURE_OBJCMARSHAL // We did not find any managed handlers before hitting a reverse P/Invoke boundary. // See if the classlib has a handler to propagate the exception to native code. IntPtr pGetHandlerClasslibFunction = (IntPtr)InternalCalls.RhpGetClasslibFunctionFromCodeAddress((IntPtr)prevControlPC, @@ -656,10 +738,18 @@ private static void DispatchEx(scoped ref StackFrameIterator frameIter, ref ExIn catchingTryRegionIdx = MaxTryRegionIdx; } } - } #endif // FEATURE_OBJCMARSHAL +#else // !NATIVEAOT + handlingFrameSP = frameIter.SP; + catchingTryRegionIdx = MaxTryRegionIdx; +#endif // !NATIVEAOT + } - if (pCatchHandler == null && pReversePInvokePropagationCallback == IntPtr.Zero) + if (pCatchHandler == null && pReversePInvokePropagationCallback == IntPtr.Zero +#if !NATIVEAOT + && !unwoundReversePInvoke +#endif + ) { OnUnhandledExceptionViaClassLib(exceptionObj); @@ -672,7 +762,7 @@ private static void DispatchEx(scoped ref StackFrameIterator frameIter, ref ExIn // We FailFast above if the exception goes unhandled. Therefore, we cannot run the second pass // without a catch handler or propagation callback. - Debug.Assert(pCatchHandler != null || pReversePInvokePropagationCallback != IntPtr.Zero, "We should have a handler if we're starting the second pass"); + Debug.Assert(pCatchHandler != null || pReversePInvokePropagationCallback != IntPtr.Zero || unwoundReversePInvoke, "We should have a handler if we're starting the second pass"); // ------------------------------------------------ // @@ -685,9 +775,11 @@ private static void DispatchEx(scoped ref StackFrameIterator frameIter, ref ExIn // 'collapse' funclets which gets confused when we walk out of the dispatch code and encounter the // 'main body' without first encountering the funclet. The thunks used to invoke 2nd-pass // funclets will always toggle this mode off before invoking them. +#if NATIVEAOT InternalCalls.RhpSetThreadDoNotTriggerGC(); - +#endif exInfo._passNumber = 2; + exInfo._idxCurClause = catchingTryRegionIdx; startIdx = MaxTryRegionIdx; unwoundReversePInvoke = false; isValid = frameIter.Init(exInfo._pExContext, (exInfo._kind & ExKind.InstructionFaultFlag) != 0); @@ -698,9 +790,11 @@ private static void DispatchEx(scoped ref StackFrameIterator frameIter, ref ExIn if (unwoundReversePInvoke) { +#if NATIVEAOT Debug.Assert(pReversePInvokePropagationCallback != IntPtr.Zero, "Unwound to a reverse P/Invoke in the second pass. We should have a propagation handler."); - Debug.Assert(frameIter.SP == handlingFrameSP, "Encountered a different reverse P/Invoke frame in the second pass."); Debug.Assert(frameIter.PreviousTransitionFrame != IntPtr.Zero, "Should have a transition frame for reverse P/Invoke."); +#endif + Debug.Assert(frameIter.SP == handlingFrameSP, "Encountered a different reverse P/Invoke frame in the second pass."); // Found the native frame that called the reverse P/invoke. // It is not possible to run managed second pass handlers on a native frame. break; @@ -723,9 +817,11 @@ private static void DispatchEx(scoped ref StackFrameIterator frameIter, ref ExIn #if FEATURE_OBJCMARSHAL if (pReversePInvokePropagationCallback != IntPtr.Zero) { +#if NATIVEAOT InternalCalls.RhpCallPropagateExceptionCallback( pReversePInvokePropagationContext, pReversePInvokePropagationCallback, frameIter.RegisterSet, ref exInfo, frameIter.PreviousTransitionFrame); // the helper should jump to propagation handler and not return +#endif Debug.Assert(false, "unreachable"); FallbackFailFast(RhFailFastReason.InternalError, null); } @@ -738,8 +834,18 @@ private static void DispatchEx(scoped ref StackFrameIterator frameIter, ref ExIn // // ------------------------------------------------ exInfo._idxCurClause = catchingTryRegionIdx; +#if NATIVEAOT InternalCalls.RhpCallCatchFunclet( exceptionObj, pCatchHandler, frameIter.RegisterSet, ref exInfo); +#else // NATIVEAOT +#pragma warning disable CS8500 + fixed (EH.ExInfo* pExInfo = &exInfo) + { + InternalCalls.RhpCallCatchFunclet( + ObjectHandleOnStack.Create(ref exceptionObj), pCatchHandler, frameIter.RegisterSet, pExInfo); + } +#pragma warning restore CS8500 +#endif // NATIVEAOT // currently, RhpCallCatchFunclet will resume after the catch Debug.Assert(false, "unreachable"); FallbackFailFast(RhFailFastReason.InternalError, null); @@ -759,8 +865,8 @@ private static void DebugVerifyHandlingFrame(UIntPtr handlingFrameSP) "Handling frame must have a valid stack frame pointer"); } - private static void UpdateStackTrace(object exceptionObj, UIntPtr curFramePtr, IntPtr ip, - ref bool isFirstRethrowFrame, ref UIntPtr prevFramePtr, ref bool isFirstFrame) + private static void UpdateStackTrace(object exceptionObj, UIntPtr curFramePtr, IntPtr ip, UIntPtr sp, + ref bool isFirstRethrowFrame, ref UIntPtr prevFramePtr, ref bool isFirstFrame, ref ExInfo exInfo) { // We use the fact that all funclet stack frames belonging to the same logical method activation // will have the same FramePointer value. Additionally, the stackwalker will return a sequence of @@ -768,9 +874,11 @@ private static void UpdateStackTrace(object exceptionObj, UIntPtr curFramePtr, I // want to know about funclets, so we strip them out by only reporting the first frame of a // sequence of funclets. This is correct because the leafmost funclet is first in the sequence // and corresponds to the current 'IP state' of the method. +#if NATIVEAOT if ((prevFramePtr == UIntPtr.Zero) || (curFramePtr != prevFramePtr)) +#endif { - AppendExceptionStackFrameViaClasslib(exceptionObj, ip, + AppendExceptionStackFrameViaClasslib(exceptionObj, ip, sp, ref exInfo, ref isFirstRethrowFrame, ref isFirstFrame); } prevFramePtr = curFramePtr; @@ -811,7 +919,11 @@ private static bool FindFirstPassHandler(object exception, uint idxStart, // Now, we continue skipping while the try region is identical to the one that invoked the // previous dispatch. - if ((ehClause._tryStartOffset == lastTryStart) && (ehClause._tryEndOffset == lastTryEnd)) + if ((ehClause._tryStartOffset == lastTryStart) && (ehClause._tryEndOffset == lastTryEnd) +#if !NATIVEAOT + && (ehClause._isSameTry) +#endif + ) continue; // We are done skipping. This is required to handle empty finally block markers that are used @@ -832,7 +944,7 @@ private static bool FindFirstPassHandler(object exception, uint idxStart, // most containing. if (clauseKind == RhEHClauseKind.RH_EH_CLAUSE_TYPED) { - if (ShouldTypedClauseCatchThisException(exception, (MethodTable*)ehClause._pTargetType)) + if (ShouldTypedClauseCatchThisException(exception, (MethodTable*)ehClause._pTargetType, !frameIter.IsRuntimeWrappedExceptions)) { pHandler = ehClause._handlerAddress; tryRegionIdx = curIdx; @@ -847,7 +959,11 @@ private static bool FindFirstPassHandler(object exception, uint idxStart, try { shouldInvokeHandler = +#if NATIVEAOT InternalCalls.RhpCallFilterFunclet(exception, pFilterFunclet, frameIter.RegisterSet); +#else + InternalCalls.RhpCallFilterFunclet(ObjectHandleOnStack.Create(ref exception), pFilterFunclet, frameIter.RegisterSet); +#endif } catch when (true) { @@ -866,7 +982,7 @@ private static bool FindFirstPassHandler(object exception, uint idxStart, return false; } -#if DEBUG && !INPLACE_RUNTIME +#if DEBUG && !INPLACE_RUNTIME && NATIVEAOT private static MethodTable* s_pLowLevelObjectType; private static void AssertNotRuntimeObject(MethodTable* pClauseType) { @@ -888,16 +1004,42 @@ private static void AssertNotRuntimeObject(MethodTable* pClauseType) Debug.Assert(!pClauseType->IsEquivalentTo(s_pLowLevelObjectType)); } -#endif // DEBUG && !INPLACE_RUNTIME +#endif // DEBUG && !INPLACE_RUNTIME && NATIVEAOT - private static bool ShouldTypedClauseCatchThisException(object exception, MethodTable* pClauseType) + private static bool ShouldTypedClauseCatchThisException(object exception, MethodTable* pClauseType, bool tryUnwrapException) { +#if NATIVEAOT #if DEBUG && !INPLACE_RUNTIME AssertNotRuntimeObject(pClauseType); #endif return TypeCast.IsInstanceOfException(pClauseType, exception); +#else + bool retry = false; + do + { + MethodTable* mt = RuntimeHelpers.GetMethodTable(exception); + while (mt != null) + { + if (pClauseType == mt) + { + return true; + } + + mt = mt->ParentMethodTable; + } + + if (tryUnwrapException && exception is RuntimeWrappedException ex) + { + exception = ex.WrappedException; + retry = true; + } + } + while (retry); + + return false; +#endif } private static void InvokeSecondPass(ref ExInfo exInfo, uint idxStart) @@ -935,7 +1077,11 @@ private static void InvokeSecondPass(ref ExInfo exInfo, uint idxStart, uint idxL // Now, we continue skipping while the try region is identical to the one that invoked the // previous dispatch. - if ((ehClause._tryStartOffset == lastTryStart) && (ehClause._tryEndOffset == lastTryEnd)) +if ((ehClause._tryStartOffset == lastTryStart) && (ehClause._tryEndOffset == lastTryEnd) +#if !NATIVEAOT + && (ehClause._isSameTry) +#endif + ) continue; // We are done skipping. This is required to handle empty finally block markers that are used @@ -966,11 +1112,21 @@ private static void InvokeSecondPass(ref ExInfo exInfo, uint idxStart, uint idxL byte* pFinallyHandler = ehClause._handlerAddress; exInfo._idxCurClause = curIdx; +#if NATIVEAOT InternalCalls.RhpCallFinallyFunclet(pFinallyHandler, exInfo._frameIter.RegisterSet); +#else // NATIVEAOT +#pragma warning disable CS8500 + fixed (EH.ExInfo* pExInfo = &exInfo) + { + InternalCalls.RhpCallFinallyFunclet(pFinallyHandler, exInfo._frameIter.RegisterSet, pExInfo); + } +#pragma warning restore CS8500 +#endif // NATIVEAOT exInfo._idxCurClause = MaxTryRegionIdx; } } +#if NATIVEAOT #pragma warning disable IDE0060 [UnmanagedCallersOnly(EntryPoint = "RhpFailFastForPInvokeExceptionPreemp", CallConvs = new Type[] { typeof(CallConvCdecl) })] public static void RhpFailFastForPInvokeExceptionPreemp(IntPtr PInvokeCallsiteReturnAddr, void* pExceptionRecord, void* pContextRecord) @@ -983,6 +1139,6 @@ public static void RhpFailFastForPInvokeExceptionCoop(IntPtr classlibBreadcrumb, FailFastViaClasslib(RhFailFastReason.UnhandledExceptionFromPInvoke, null, classlibBreadcrumb); } #pragma warning restore IDE0060 - +#endif } // static class EH } diff --git a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/ExceptionIDs.cs b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/ExceptionIDs.cs index 022a964020c182..764bd124d67741 100644 --- a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/ExceptionIDs.cs +++ b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/ExceptionIDs.cs @@ -3,7 +3,12 @@ namespace System.Runtime { - public enum ExceptionIDs +#if NATIVEAOT + public +#else + internal +#endif + enum ExceptionIDs { OutOfMemory = 1, Arithmetic = 2, diff --git a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/InternalCalls.cs b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/InternalCalls.cs index 3c9d6c86ffc323..01475cf9addef4 100644 --- a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/InternalCalls.cs +++ b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/InternalCalls.cs @@ -257,34 +257,14 @@ internal static extern unsafe IntPtr RhpCallPropagateExceptionCallback( [MethodImpl(MethodImplOptions.InternalCall)] internal static extern unsafe void RhpCopyContextFromExInfo(void* pOSContext, int cbOSContext, EH.PAL_LIMITED_CONTEXT* pPalContext); - [RuntimeImport(Redhawk.BaseName, "RhpGetNumThunkBlocksPerMapping")] - [MethodImpl(MethodImplOptions.InternalCall)] - internal static extern int RhpGetNumThunkBlocksPerMapping(); - - [RuntimeImport(Redhawk.BaseName, "RhpGetNumThunksPerBlock")] - [MethodImpl(MethodImplOptions.InternalCall)] - internal static extern int RhpGetNumThunksPerBlock(); - - [RuntimeImport(Redhawk.BaseName, "RhpGetThunkSize")] - [MethodImpl(MethodImplOptions.InternalCall)] - internal static extern int RhpGetThunkSize(); - - [RuntimeImport(Redhawk.BaseName, "RhpGetThunkDataBlockAddress")] - [MethodImpl(MethodImplOptions.InternalCall)] - internal static extern IntPtr RhpGetThunkDataBlockAddress(IntPtr thunkStubAddress); - - [RuntimeImport(Redhawk.BaseName, "RhpGetThunkStubsBlockAddress")] - [MethodImpl(MethodImplOptions.InternalCall)] - internal static extern IntPtr RhpGetThunkStubsBlockAddress(IntPtr thunkDataAddress); - - [RuntimeImport(Redhawk.BaseName, "RhpGetThunkBlockSize")] - [MethodImpl(MethodImplOptions.InternalCall)] - internal static extern int RhpGetThunkBlockSize(); - [RuntimeImport(Redhawk.BaseName, "RhpGetThreadAbortException")] [MethodImpl(MethodImplOptions.InternalCall)] internal static extern Exception RhpGetThreadAbortException(); + [RuntimeImport(Redhawk.BaseName, "RhCurrentNativeThreadId")] + [MethodImpl(MethodImplOptions.InternalCall)] + internal static extern unsafe IntPtr RhCurrentNativeThreadId(); + //------------------------------------------------------------------------------------------------------------ // PInvoke-based internal calls // @@ -310,18 +290,6 @@ internal static extern unsafe IntPtr RhpCallPropagateExceptionCallback( [UnmanagedCallConv(CallConvs = new Type[] { typeof(CallConvCdecl) })] internal static extern ulong RhpGetTickCount64(); - [DllImport(Redhawk.BaseName)] - [UnmanagedCallConv(CallConvs = new Type[] { typeof(CallConvCdecl) })] - internal static extern void RhpAcquireThunkPoolLock(); - - [DllImport(Redhawk.BaseName)] - [UnmanagedCallConv(CallConvs = new Type[] { typeof(CallConvCdecl) })] - internal static extern void RhpReleaseThunkPoolLock(); - - [DllImport(Redhawk.BaseName)] - [UnmanagedCallConv(CallConvs = new Type[] { typeof(CallConvCdecl) })] - internal static extern IntPtr RhAllocateThunksMapping(); - // Enters a no GC region, possibly doing a blocking GC if there is not enough // memory available to satisfy the caller's request. [DllImport(Redhawk.BaseName)] diff --git a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/MethodTable.Runtime.cs b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/MethodTable.Runtime.cs index 676c508ffe4aac..deb071aa30024f 100644 --- a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/MethodTable.Runtime.cs +++ b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/MethodTable.Runtime.cs @@ -15,13 +15,11 @@ internal unsafe partial struct MethodTable internal MethodTable* GetArrayEEType() { #if INPLACE_RUNTIME - return EETypePtr.EETypePtrOf().ToPointer(); + return MethodTable.Of(); #else - fixed (MethodTable* pThis = &this) - { - void* pGetArrayEEType = InternalCalls.RhpGetClasslibFunctionFromEEType(new IntPtr(pThis), ClassLibFunctionId.GetSystemArrayEEType); - return ((delegate* )pGetArrayEEType)(); - } + MethodTable* pThis = (MethodTable*)Unsafe.Pointer(ref this); + void* pGetArrayEEType = InternalCalls.RhpGetClasslibFunctionFromEEType(pThis, ClassLibFunctionId.GetSystemArrayEEType); + return ((delegate* )pGetArrayEEType)(); #endif } @@ -35,7 +33,7 @@ internal Exception GetClasslibException(ExceptionIDs id) return RelatedParameterType->GetClasslibException(id); } - return EH.GetClasslibExceptionFromEEType(id, GetAssociatedModuleAddress()); + return EH.GetClasslibExceptionFromEEType(id, (MethodTable*)Unsafe.AsPointer(ref this)); #endif } #pragma warning restore CA1822 @@ -47,32 +45,7 @@ internal IntPtr GetClasslibFunction(ClassLibFunctionId id) internal static bool AreSameType(MethodTable* mt1, MethodTable* mt2) { - if (mt1 == mt2) - return true; - - return mt1->IsEquivalentTo(mt2); - } - - internal bool IsEquivalentTo(MethodTable* pOtherEEType) - { - fixed (MethodTable* pThis = &this) - { - if (pThis == pOtherEEType) - return true; - - MethodTable* pThisEEType = pThis; - - if (pThisEEType == pOtherEEType) - return true; - - if (pThisEEType->IsParameterizedType && pOtherEEType->IsParameterizedType) - { - return pThisEEType->RelatedParameterType->IsEquivalentTo(pOtherEEType->RelatedParameterType) && - pThisEEType->ParameterizedTypeShape == pOtherEEType->ParameterizedTypeShape; - } - } - - return false; + return mt1 == mt2; } } diff --git a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/RuntimeExports.cs b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/RuntimeExports.cs index 359c0919363581..a09ead7b426c0b 100644 --- a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/RuntimeExports.cs +++ b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/RuntimeExports.cs @@ -253,7 +253,7 @@ public static unsafe void RhUnbox(object? obj, ref byte data, MethodTable* pUnbo Debug.Assert((pUnboxToEEType == null) || UnboxAnyTypeCompare(pEEType, pUnboxToEEType) || pUnboxToEEType->IsNullable); if (pUnboxToEEType != null && pUnboxToEEType->IsNullable) { - Debug.Assert(pUnboxToEEType->NullableType->IsEquivalentTo(pEEType)); + Debug.Assert(pUnboxToEEType->NullableType == pEEType); // Set the first field of the Nullable to true to indicate the value is present. Unsafe.As(ref data) = true; @@ -332,42 +332,6 @@ private static unsafe int RhpCalculateStackTraceWorker(IntPtr* pOutputBuffer, ui return success ? (int)nFrames : -(int)nFrames; } - [RuntimeExport("RhCreateThunksHeap")] - public static object RhCreateThunksHeap(IntPtr commonStubAddress) - { - return ThunksHeap.CreateThunksHeap(commonStubAddress); - } - - [RuntimeExport("RhAllocateThunk")] - public static IntPtr RhAllocateThunk(object thunksHeap) - { - return ((ThunksHeap)thunksHeap).AllocateThunk(); - } - - [RuntimeExport("RhFreeThunk")] - public static void RhFreeThunk(object thunksHeap, IntPtr thunkAddress) - { - ((ThunksHeap)thunksHeap).FreeThunk(thunkAddress); - } - - [RuntimeExport("RhSetThunkData")] - public static void RhSetThunkData(object thunksHeap, IntPtr thunkAddress, IntPtr context, IntPtr target) - { - ((ThunksHeap)thunksHeap).SetThunkData(thunkAddress, context, target); - } - - [RuntimeExport("RhTryGetThunkData")] - public static bool RhTryGetThunkData(object thunksHeap, IntPtr thunkAddress, out IntPtr context, out IntPtr target) - { - return ((ThunksHeap)thunksHeap).TryGetThunkData(thunkAddress, out context, out target); - } - - [RuntimeExport("RhGetThunkSize")] - public static int RhGetThunkSize() - { - return InternalCalls.RhpGetThunkSize(); - } - [RuntimeExport("RhGetRuntimeHelperForType")] internal static unsafe IntPtr RhGetRuntimeHelperForType(MethodTable* pEEType, RuntimeHelperKind kind) { diff --git a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/StackFrameIterator.cs b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/StackFrameIterator.cs index 9a772bd3e3370f..0fb4935828520b 100644 --- a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/StackFrameIterator.cs +++ b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/StackFrameIterator.cs @@ -2,6 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Runtime.InteropServices; +#if !NATIVEAOT +using System.Runtime.ExceptionServices; +#endif namespace System.Runtime { @@ -10,11 +13,31 @@ internal unsafe struct REGDISPLAY { [FieldOffset(AsmOffsets.OFFSETOF__REGDISPLAY__SP)] internal UIntPtr SP; +#if !NATIVEAOT + [FieldOffset(AsmOffsets.OFFSETOF__REGDISPLAY__ControlPC)] + internal IntPtr ControlPC; + [FieldOffset(AsmOffsets.OFFSETOF__REGDISPLAY__m_pCurrentContext)] + internal EH.PAL_LIMITED_CONTEXT* m_pCurrentContext; +#endif } [StructLayout(LayoutKind.Explicit, Size = AsmOffsets.SIZEOF__StackFrameIterator)] internal unsafe struct StackFrameIterator { +#if !NATIVEAOT + [FieldOffset(AsmOffsets.OFFSETOF__StackFrameIterator__m_pRegDisplay)] + private REGDISPLAY* _pRegDisplay; + + [FieldOffset(AsmOffsets.OFFSETOF__StackFrameIterator__m_AdjustedControlPC)] + internal byte* ControlPC; + internal byte* OriginalControlPC { get { return (byte*)_pRegDisplay->ControlPC; } } + internal void* RegisterSet { get { return _pRegDisplay; } } + internal UIntPtr SP { get { return _pRegDisplay->SP; } } + internal UIntPtr FramePointer { get { return _pRegDisplay->m_pCurrentContext->FP; } } + [FieldOffset(AsmOffsets.OFFSETOF__StackFrameIterator__m_isRuntimeWrappedExceptions)] + private byte _IsRuntimeWrappedExceptions; + internal bool IsRuntimeWrappedExceptions {get { return _IsRuntimeWrappedExceptions != 0; }} +#else // NATIVEAOT [FieldOffset(AsmOffsets.OFFSETOF__StackFrameIterator__m_FramePointer)] private UIntPtr _framePointer; [FieldOffset(AsmOffsets.OFFSETOF__StackFrameIterator__m_ControlPC)] @@ -32,6 +55,10 @@ internal unsafe struct StackFrameIterator internal UIntPtr SP { get { return _regDisplay.SP; } } internal UIntPtr FramePointer { get { return _framePointer; } } internal IntPtr PreviousTransitionFrame { get { return _pPreviousTransitionFrame; } } +#pragma warning disable CA1822 + internal bool IsRuntimeWrappedExceptions {get { return false; }} +#pragma warning restore CA1822 +#endif // NATIVEAOT internal bool Init(EH.PAL_LIMITED_CONTEXT* pStackwalkCtx, bool instructionFault = false) { diff --git a/src/coreclr/nativeaot/Runtime/CMakeLists.txt b/src/coreclr/nativeaot/Runtime/CMakeLists.txt index ec7b6d0e3679d1..2784cdbb4db606 100644 --- a/src/coreclr/nativeaot/Runtime/CMakeLists.txt +++ b/src/coreclr/nativeaot/Runtime/CMakeLists.txt @@ -68,6 +68,7 @@ include_directories(inc) include_directories(.) include_directories(${GC_DIR}) include_directories(${GC_DIR}/env) +include_directories(${CMAKE_CURRENT_BINARY_DIR}/eventpipe/inc) if (WIN32) set(GC_HEADERS @@ -246,7 +247,6 @@ else() if(NOT CLR_CMAKE_TARGET_MACCATALYST AND NOT CLR_CMAKE_TARGET_IOS AND NOT CLR_CMAKE_TARGET_TVOS) add_definitions(-DFEATURE_READONLY_GS_COOKIE) endif() - add_definitions(-DNO_UI_ASSERT) include(unix/configure.cmake) include(${CLR_SRC_NATIVE_DIR}/minipal/configure.cmake) include_directories(${CMAKE_CURRENT_BINARY_DIR}) diff --git a/src/coreclr/nativeaot/Runtime/Crst.h b/src/coreclr/nativeaot/Runtime/Crst.h index 31e43008da1506..b4112a174b2744 100644 --- a/src/coreclr/nativeaot/Runtime/Crst.h +++ b/src/coreclr/nativeaot/Runtime/Crst.h @@ -18,10 +18,8 @@ enum CrstType CrstInterfaceDispatchGlobalLists, CrstStressLog, CrstRestrictedCallouts, - CrstObjectiveCMarshalCallouts, CrstGcStressControl, CrstThreadStore, - CrstThunkPool, CrstYieldProcessorNormalized, CrstEventPipe, CrstEventPipeConfig, diff --git a/src/coreclr/nativeaot/Runtime/DebugHeader.cpp b/src/coreclr/nativeaot/Runtime/DebugHeader.cpp index 121fdec1019e0f..0519a3098d2458 100644 --- a/src/coreclr/nativeaot/Runtime/DebugHeader.cpp +++ b/src/coreclr/nativeaot/Runtime/DebugHeader.cpp @@ -107,9 +107,6 @@ struct DotNetRuntimeDebugHeader GlobalValueEntry (* volatile GlobalEntries)[GlobalEntriesArraySize] = nullptr; }; -#ifdef TARGET_WINDOWS -#pragma comment (linker, "/EXPORT:DotNetRuntimeDebugHeader,DATA") -#endif extern "C" struct DotNetRuntimeDebugHeader DotNetRuntimeDebugHeader; struct DotNetRuntimeDebugHeader DotNetRuntimeDebugHeader = {}; @@ -132,7 +129,7 @@ struct DotNetRuntimeDebugHeader DotNetRuntimeDebugHeader = {}; { \ s_GlobalEntries[currentGlobalPos] = { #Name, Name }; \ ++currentGlobalPos; \ - ASSERT(currentGlobalPos <= GlobalEntriesArraySize) \ + ASSERT(currentGlobalPos <= GlobalEntriesArraySize); \ } while(0) \ extern "C" void PopulateDebugHeaders() diff --git a/src/coreclr/nativeaot/Runtime/EtwEvents.h b/src/coreclr/nativeaot/Runtime/EtwEvents.h index 583c5745cac1c4..a02d7577f25180 100644 --- a/src/coreclr/nativeaot/Runtime/EtwEvents.h +++ b/src/coreclr/nativeaot/Runtime/EtwEvents.h @@ -413,7 +413,7 @@ extern "C" __declspec(selectany) MCGEN_TRACE_CONTEXT MICROSOFT_WINDOWS_DOTNETRUN #define FireEtXplatSetGCHandle(HandleID, ObjectID, Kind, Generation, AppDomainID, ClrInstanceID) (MICROSOFT_WINDOWS_DOTNETRUNTIME_PROVIDER_Context.IsEnabled && PalEventEnabled(Microsoft_Windows_DotNETRuntimeHandle, &SetGCHandle)) ? Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_SetGCHandle(Microsoft_Windows_DotNETRuntimeHandle, &SetGCHandle, HandleID, ObjectID, Kind, Generation, AppDomainID, ClrInstanceID) : 0 RH_ETW_INLINE uint32_t -Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_BulkType(REGHANDLE RegHandle, const EVENT_DESCRIPTOR * Descriptor, uint32_t Count, uint16_t ClrInstanceID, ULONG Values_Len_, const PVOID Values) +Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_BulkType(REGHANDLE RegHandle, const EVENT_DESCRIPTOR * Descriptor, uint32_t Count, uint16_t ClrInstanceID, ULONG Values_Len_, const void* Values) { EVENT_DATA_DESCRIPTOR EventData[11]; EventDataDescCreate(&EventData[0], &Count, sizeof(uint32_t)); @@ -423,7 +423,7 @@ Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_BulkType(REGHANDLE RegHa } RH_ETW_INLINE uint32_t -Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_DestroyGCHandle(REGHANDLE RegHandle, const EVENT_DESCRIPTOR * Descriptor, void* HandleID, uint16_t ClrInstanceID) +Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_DestroyGCHandle(REGHANDLE RegHandle, const EVENT_DESCRIPTOR * Descriptor, const void* HandleID, uint16_t ClrInstanceID) { EVENT_DATA_DESCRIPTOR EventData[2]; EventDataDescCreate(&EventData[0], &HandleID, sizeof(void*)); @@ -432,7 +432,7 @@ Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_DestroyGCHandle(REGHANDL } RH_ETW_INLINE uint32_t -Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_Exception(REGHANDLE RegHandle, const EVENT_DESCRIPTOR * Descriptor, LPCWSTR ExceptionType, LPCWSTR ExceptionMessage, void* ExceptionEIP, uint32_t ExceptionHRESULT, uint16_t ExceptionFlags, uint16_t ClrInstanceID) +Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_Exception(REGHANDLE RegHandle, const EVENT_DESCRIPTOR * Descriptor, LPCWSTR ExceptionType, LPCWSTR ExceptionMessage, const void* ExceptionEIP, uint32_t ExceptionHRESULT, uint16_t ExceptionFlags, uint16_t ClrInstanceID) { EVENT_DATA_DESCRIPTOR EventData[6]; EventDataDescCreate(&EventData[0], (ExceptionType != NULL) ? ExceptionType : L"", (ExceptionType != NULL) ? (ULONG)((wcslen(ExceptionType) + 1) * sizeof(WCHAR)) : (ULONG)sizeof(L"")); @@ -484,7 +484,7 @@ Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_GCAllocationTick_V3(REGH } RH_ETW_INLINE uint32_t -Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_GCBulkEdge(REGHANDLE RegHandle, const EVENT_DESCRIPTOR * Descriptor, uint32_t Index, uint32_t Count, uint16_t ClrInstanceID, ULONG Values_Len_, const PVOID Values) +Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_GCBulkEdge(REGHANDLE RegHandle, const EVENT_DESCRIPTOR * Descriptor, uint32_t Index, uint32_t Count, uint16_t ClrInstanceID, ULONG Values_Len_, const void* Values) { EVENT_DATA_DESCRIPTOR EventData[6]; EventDataDescCreate(&EventData[0], &Index, sizeof(uint32_t)); @@ -495,7 +495,7 @@ Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_GCBulkEdge(REGHANDLE Reg } RH_ETW_INLINE uint32_t -Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_GCBulkMovedObjectRanges(REGHANDLE RegHandle, const EVENT_DESCRIPTOR * Descriptor, uint32_t Index, uint32_t Count, uint16_t ClrInstanceID, ULONG Values_Len_, const PVOID Values) +Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_GCBulkMovedObjectRanges(REGHANDLE RegHandle, const EVENT_DESCRIPTOR * Descriptor, uint32_t Index, uint32_t Count, uint16_t ClrInstanceID, ULONG Values_Len_, const void* Values) { EVENT_DATA_DESCRIPTOR EventData[7]; EventDataDescCreate(&EventData[0], &Index, sizeof(uint32_t)); @@ -506,7 +506,7 @@ Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_GCBulkMovedObjectRanges( } RH_ETW_INLINE uint32_t -Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_GCBulkNode(REGHANDLE RegHandle, const EVENT_DESCRIPTOR * Descriptor, uint32_t Index, uint32_t Count, uint16_t ClrInstanceID, ULONG Values_Len_, const PVOID Values) +Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_GCBulkNode(REGHANDLE RegHandle, const EVENT_DESCRIPTOR * Descriptor, uint32_t Index, uint32_t Count, uint16_t ClrInstanceID, ULONG Values_Len_, const void* Values) { EVENT_DATA_DESCRIPTOR EventData[8]; EventDataDescCreate(&EventData[0], &Index, sizeof(uint32_t)); @@ -517,7 +517,7 @@ Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_GCBulkNode(REGHANDLE Reg } RH_ETW_INLINE uint32_t -Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_GCBulkRCW(REGHANDLE RegHandle, const EVENT_DESCRIPTOR * Descriptor, uint32_t Count, uint16_t ClrInstanceID, ULONG Values_Len_, const PVOID Values) +Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_GCBulkRCW(REGHANDLE RegHandle, const EVENT_DESCRIPTOR * Descriptor, uint32_t Count, uint16_t ClrInstanceID, ULONG Values_Len_, const void* Values) { EVENT_DATA_DESCRIPTOR EventData[9]; EventDataDescCreate(&EventData[0], &Count, sizeof(uint32_t)); @@ -527,7 +527,7 @@ Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_GCBulkRCW(REGHANDLE RegH } RH_ETW_INLINE uint32_t -Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_GCBulkRootCCW(REGHANDLE RegHandle, const EVENT_DESCRIPTOR * Descriptor, uint32_t Count, uint16_t ClrInstanceID, ULONG Values_Len_, const PVOID Values) +Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_GCBulkRootCCW(REGHANDLE RegHandle, const EVENT_DESCRIPTOR * Descriptor, uint32_t Count, uint16_t ClrInstanceID, ULONG Values_Len_, const void* Values) { EVENT_DATA_DESCRIPTOR EventData[10]; EventDataDescCreate(&EventData[0], &Count, sizeof(uint32_t)); @@ -537,7 +537,7 @@ Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_GCBulkRootCCW(REGHANDLE } RH_ETW_INLINE uint32_t -Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_GCBulkRootConditionalWeakTableElementEdge(REGHANDLE RegHandle, const EVENT_DESCRIPTOR * Descriptor, uint32_t Index, uint32_t Count, uint16_t ClrInstanceID, ULONG Values_Len_, const PVOID Values) +Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_GCBulkRootConditionalWeakTableElementEdge(REGHANDLE RegHandle, const EVENT_DESCRIPTOR * Descriptor, uint32_t Index, uint32_t Count, uint16_t ClrInstanceID, ULONG Values_Len_, const void* Values) { EVENT_DATA_DESCRIPTOR EventData[7]; EventDataDescCreate(&EventData[0], &Index, sizeof(uint32_t)); @@ -548,7 +548,7 @@ Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_GCBulkRootConditionalWea } RH_ETW_INLINE uint32_t -Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_GCBulkRootEdge(REGHANDLE RegHandle, const EVENT_DESCRIPTOR * Descriptor, uint32_t Index, uint32_t Count, uint16_t ClrInstanceID, ULONG Values_Len_, const PVOID Values) +Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_GCBulkRootEdge(REGHANDLE RegHandle, const EVENT_DESCRIPTOR * Descriptor, uint32_t Index, uint32_t Count, uint16_t ClrInstanceID, ULONG Values_Len_, const void* Values) { EVENT_DATA_DESCRIPTOR EventData[8]; EventDataDescCreate(&EventData[0], &Index, sizeof(uint32_t)); @@ -559,7 +559,7 @@ Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_GCBulkRootEdge(REGHANDLE } RH_ETW_INLINE uint32_t -Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_GCBulkSurvivingObjectRanges(REGHANDLE RegHandle, const EVENT_DESCRIPTOR * Descriptor, uint32_t Index, uint32_t Count, uint16_t ClrInstanceID, ULONG Values_Len_, const PVOID Values) +Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_GCBulkSurvivingObjectRanges(REGHANDLE RegHandle, const EVENT_DESCRIPTOR * Descriptor, uint32_t Index, uint32_t Count, uint16_t ClrInstanceID, ULONG Values_Len_, const void* Values) { EVENT_DATA_DESCRIPTOR EventData[6]; EventDataDescCreate(&EventData[0], &Index, sizeof(uint32_t)); @@ -608,7 +608,7 @@ Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_GCFreeSegment_V1(REGHAND } RH_ETW_INLINE uint32_t -Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_GCGenerationRange(REGHANDLE RegHandle, const EVENT_DESCRIPTOR * Descriptor, uint8_t Generation, void* RangeStart, uint64_t RangeUsedLength, uint64_t RangeReservedLength, uint16_t ClrInstanceID) +Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_GCGenerationRange(REGHANDLE RegHandle, const EVENT_DESCRIPTOR * Descriptor, uint8_t Generation, const void* RangeStart, uint64_t RangeUsedLength, uint64_t RangeReservedLength, uint16_t ClrInstanceID) { EVENT_DATA_DESCRIPTOR EventData[5]; EventDataDescCreate(&EventData[0], &Generation, sizeof(uint8_t)); @@ -697,7 +697,7 @@ Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_GCNoUserData(REGHANDLE R } RH_ETW_INLINE uint32_t -Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_GCPerHeapHistory_V3(REGHANDLE RegHandle, const EVENT_DESCRIPTOR * Descriptor, uint16_t ClrInstanceID, void* FreeListAllocated, void* FreeListRejected, void* EndOfSegAllocated, void* CondemnedAllocated, void* PinnedAllocated, void* PinnedAllocatedAdvance, uint32_t RunningFreeListEfficiency, uint32_t CondemnReasons0, uint32_t CondemnReasons1, uint32_t CompactMechanisms, uint32_t ExpandMechanisms, uint32_t HeapIndex, void* ExtraGen0Commit, uint32_t Count, ULONG Values_Len_, const PVOID Values) +Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_GCPerHeapHistory_V3(REGHANDLE RegHandle, const EVENT_DESCRIPTOR * Descriptor, uint16_t ClrInstanceID, const void* FreeListAllocated, const void* FreeListRejected, const void* EndOfSegAllocated, const void* CondemnedAllocated, const void* PinnedAllocated, const void* PinnedAllocatedAdvance, uint32_t RunningFreeListEfficiency, uint32_t CondemnReasons0, uint32_t CondemnReasons1, uint32_t CompactMechanisms, uint32_t ExpandMechanisms, uint32_t HeapIndex, const void* ExtraGen0Commit, uint32_t Count, ULONG Values_Len_, const void* Values) { EVENT_DATA_DESCRIPTOR EventData[26]; EventDataDescCreate(&EventData[0], &ClrInstanceID, sizeof(uint16_t)); @@ -792,7 +792,7 @@ Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_ModuleLoadUnload_V2(REGH } RH_ETW_INLINE uint32_t -Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_SetGCHandle(REGHANDLE RegHandle, const EVENT_DESCRIPTOR * Descriptor, void* HandleID, void* ObjectID, uint32_t Kind, uint32_t Generation, uint64_t AppDomainID, uint16_t ClrInstanceID) +Template_MICROSOFT_WINDOWS_NATIVEAOT_GC_PUBLIC_PROVIDER_SetGCHandle(REGHANDLE RegHandle, const EVENT_DESCRIPTOR * Descriptor, const void* HandleID, const void* ObjectID, uint32_t Kind, uint32_t Generation, uint64_t AppDomainID, uint16_t ClrInstanceID) { EVENT_DATA_DESCRIPTOR EventData[6]; EventDataDescCreate(&EventData[0], &HandleID, sizeof(void*)); @@ -854,4 +854,37 @@ TemplateEventDescriptor(REGHANDLE RegHandle, const EVENT_DESCRIPTOR * Descriptor #endif // FEATURE_ETW +#define FireEtXplatGCFinalizersEnd_V1(Count, ClrInstanceID) 0 +#define FireEtXplatGCHeapStats_V2(GenerationSize0,TotalPromotedSize0,GenerationSize1,TotalPromotedSize1,GenerationSize2,TotalPromotedSize2,GenerationSize3,TotalPromotedSize3,FinalizationPromotedSize,FinalizationPromotedCount,PinnedObjectCount,SinkBlockCount,GCHandleCount,ClrInstanceID,GenerationSize4,TotalPromotedSize4) 0 +#define FireEtXplatGCSuspendEEEnd_V1(ClrInstanceID) 0 +#define FireEtXplatGCAllocationTick_V4(AllocationAmount,AllocationKind,ClrInstanceID,AllocationAmount64,TypeID,TypeName,HeapIndex,Address,ObjectSize) 0 +#define FireEtXplatGCFinalizersBegin_V1(ClrInstanceID) 0 +#define FireEtXplatGCSampledObjectAllocationHigh(Address,TypeID,ObjectCountForTypeSample,TotalSizeForTypeSample,ClrInstanceID) 0 +#define FireEtXplatFinalizeObject(TypeID,ObjectID,ClrInstanceID) 0 +#define FireEtXplatGCSampledObjectAllocationLow(Address,TypeID,ObjectCountForTypeSample,TotalSizeForTypeSample,ClrInstanceID) 0 +#define FireEtXplatPinObjectAtGCTime(HandleID,ObjectID,ObjectSize,TypeName,ClrInstanceID) 0 +#define FireEtXplatGCBulkRootStaticVar(Count,AppDomainID,ClrInstanceID,Values_ElementSize, Values) 0 +#define FireEtXplatThreadPoolWorkerThreadStart(ActiveWorkerThreadCount,RetiredWorkerThreadCount,ClrInstanceID) 0 +#define FireEtXplatThreadPoolWorkerThreadStop(ActiveWorkerThreadCount,RetiredWorkerThreadCount,ClrInstanceID) 0 +#define FireEtXplatThreadPoolWorkerThreadAdjustmentSample(Throughput,ClrInstanceID) 0 +#define FireEtXplatThreadPoolWorkerThreadAdjustmentAdjustment(AverageThroughput,NewWorkerThreadCount,Reason,ClrInstanceID) 0 +#define FireEtXplatThreadPoolWorkerThreadAdjustmentStats(Duration,Throughput,ThreadWave,ThroughputWave,ThroughputErrorEstimate,AverageThroughputErrorEstimate,ThroughputRatio,Confidence,NewControlSetting,NewThreadWaveMagnitude,ClrInstanceID) 0 +#define FireEtXplatThreadPoolWorkerThreadWait(ActiveWorkerThreadCount,RetiredWorkerThreadCount,ClrInstanceID) 0 +#define FireEtXplatThreadPoolMinMaxThreads(MinWorkerThreads,MaxWorkerThreads,MinIOCompletionThreads,MaxIOCompletionThreads,ClrInstanceID) 0 +#define FireEtXplatThreadPoolWorkingThreadCount(Count,ClrInstanceID) 0 +#define FireEtXplatThreadPoolIOEnqueue(NativeOverlapped,Overlapped,MultiDequeues,ClrInstanceID) 0 +#define FireEtXplatThreadPoolIODequeue(NativeOverlapped,Overlapped,ClrInstanceID) 0 +#define FireEtXplatThreadPoolIOPack(NativeOverlapped,Overlapped,ClrInstanceID) 0 +#define FireEtXplatContentionStart_V2(ContentionFlags,ClrInstanceID,LockID,AssociatedObjectID,LockOwnerThreadID) 0 +#define FireEtXplatContentionStop_V1(ContentionFlags,ClrInstanceID,DurationNs) 0 +#define FireEtXplatContentionLockCreated(LockID,AssociatedObjectID,ClrInstanceID) 0 +#define FireEtXplatIncreaseMemoryPressure(BytesAllocated,ClrInstanceID) 0 +#define FireEtXplatDecreaseMemoryPressure(BytesFreed,ClrInstanceID) 0 +#define FireEtXplatGCGlobalHeapHistory_V4(FinalYoungestDesired,NumHeaps,CondemnedGeneration,Gen0ReductionCount,Reason,GlobalMechanisms,ClrInstanceID,PauseMode,MemoryPressure,CondemnReasons0,CondemnReasons1,Count,Values_ElementSize, Values) 0 +#define FireEtXplatGenAwareBegin(Count,ClrInstanceID) 0 +#define FireEtXplatGenAwareEnd(Count,ClrInstanceID) 0 +#define FireEtXplatGCLOHCompact(ClrInstanceID,Count,Values_ElementSize, Values) 0 +#define FireEtXplatGCFitBucketInfo(ClrInstanceID,BucketKind,TotalSize,Count,Values_ElementSize, Values) 0 + + #endif // !__RH_ETW_DEFS_INCLUDED diff --git a/src/coreclr/nativeaot/Runtime/Full/CMakeLists.txt b/src/coreclr/nativeaot/Runtime/Full/CMakeLists.txt index 3cbaa6e2f253a6..7d4539c9cff606 100644 --- a/src/coreclr/nativeaot/Runtime/Full/CMakeLists.txt +++ b/src/coreclr/nativeaot/Runtime/Full/CMakeLists.txt @@ -6,7 +6,7 @@ project(Runtime) # Include auto-generated files on include path set(CMAKE_INCLUDE_CURRENT_DIR ON) -if (CLR_CMAKE_TARGET_APPLE AND NOT CLR_CMAKE_TARGET_OSX) +if (CLR_CMAKE_TARGET_APPLE) list(APPEND RUNTIME_SOURCES_ARCH_ASM ${ARCH_SOURCES_DIR}/ThunkPoolThunks.${ASM_SUFFIX} ) @@ -27,8 +27,10 @@ if (CLR_CMAKE_TARGET_WIN32) endif (CLR_CMAKE_TARGET_WIN32) add_library(Runtime.WorkstationGC STATIC ${COMMON_RUNTIME_SOURCES} ${FULL_RUNTIME_SOURCES} ${RUNTIME_SOURCES_ARCH_ASM} ${RUNTIME_ARCH_ASM_OBJECTS}) +add_dependencies(Runtime.WorkstationGC aot_eventing_headers) add_library(Runtime.ServerGC STATIC ${COMMON_RUNTIME_SOURCES} ${FULL_RUNTIME_SOURCES} ${RUNTIME_SOURCES_ARCH_ASM} ${SERVER_GC_SOURCES} ${RUNTIME_ARCH_ASM_OBJECTS}) +add_dependencies(Runtime.ServerGC aot_eventing_headers) if (CLR_CMAKE_TARGET_WIN32 AND CLR_CMAKE_TARGET_ARCH_AMD64) add_library(Runtime.VxsortEnabled STATIC ${VXSORT_SOURCES}) @@ -40,11 +42,11 @@ target_compile_definitions(Runtime.ServerGC PRIVATE -DFEATURE_SVR_GC) if (CLR_CMAKE_TARGET_WIN32) add_library(Runtime.ServerGC.GuardCF STATIC ${COMMON_RUNTIME_SOURCES} ${FULL_RUNTIME_SOURCES} ${RUNTIME_SOURCES_ARCH_ASM} ${SERVER_GC_SOURCES} ${RUNTIME_ARCH_ASM_OBJECTS}) target_compile_definitions(Runtime.ServerGC.GuardCF PRIVATE -DFEATURE_SVR_GC) - target_compile_options(Runtime.ServerGC.GuardCF PRIVATE $<$,$>:/guard:cf>) + set_target_properties(Runtime.ServerGC.GuardCF PROPERTIES CLR_CONTROL_FLOW_GUARD ON) if (CLR_CMAKE_TARGET_ARCH_AMD64) add_library(Runtime.VxsortEnabled.GuardCF STATIC ${VXSORT_SOURCES}) - target_compile_options(Runtime.VxsortEnabled.GuardCF PRIVATE $<$,$>:/guard:cf>) + set_target_properties(Runtime.VxsortEnabled.GuardCF PROPERTIES CLR_CONTROL_FLOW_GUARD ON) endif (CLR_CMAKE_TARGET_ARCH_AMD64) endif (CLR_CMAKE_TARGET_WIN32) @@ -55,7 +57,7 @@ set(ASM_OFFSETS_CSPP ${RUNTIME_DIR}/../Runtime.Base/src/AsmOffsets.cspp) if(WIN32) set(COMPILER_LANGUAGE "") - set(PREPROCESSOR_FLAGS -EP) + set(PREPROCESSOR_FLAGS -EP -nologo) set(ASM_OFFSETS_CPP ${RUNTIME_DIR}/windows/AsmOffsets.cpp) else() set(COMPILER_LANGUAGE -x c++) @@ -101,4 +103,5 @@ if (CLR_CMAKE_TARGET_WIN32) install_static_library(Runtime.VxsortEnabled.GuardCF aotsdk nativeaot) endif (CLR_CMAKE_TARGET_ARCH_AMD64) install_static_library(Runtime.ServerGC.GuardCF aotsdk nativeaot) + add_dependencies(Runtime.ServerGC.GuardCF aot_eventing_headers) endif (CLR_CMAKE_TARGET_WIN32) diff --git a/src/coreclr/nativeaot/Runtime/MiscHelpers.cpp b/src/coreclr/nativeaot/Runtime/MiscHelpers.cpp index 6df37cf23b9d36..1fb99cd776229d 100644 --- a/src/coreclr/nativeaot/Runtime/MiscHelpers.cpp +++ b/src/coreclr/nativeaot/Runtime/MiscHelpers.cpp @@ -340,18 +340,6 @@ COOP_PINVOKE_HELPER(uint8_t *, RhGetCodeTarget, (uint8_t * pCodeOrg)) return pCodeOrg; } -extern CrstStatic g_ThunkPoolLock; - -EXTERN_C NATIVEAOT_API void __cdecl RhpAcquireThunkPoolLock() -{ - g_ThunkPoolLock.Enter(); -} - -EXTERN_C NATIVEAOT_API void __cdecl RhpReleaseThunkPoolLock() -{ - g_ThunkPoolLock.Leave(); -} - EXTERN_C NATIVEAOT_API uint64_t __cdecl RhpGetTickCount64() { return PalGetTickCount64(); diff --git a/src/coreclr/nativeaot/Runtime/PalRedhawk.h b/src/coreclr/nativeaot/Runtime/PalRedhawk.h index d15969eab3784b..f79926dc001fed 100644 --- a/src/coreclr/nativeaot/Runtime/PalRedhawk.h +++ b/src/coreclr/nativeaot/Runtime/PalRedhawk.h @@ -512,11 +512,6 @@ typedef enum _EXCEPTION_DISPOSITION { #define INVALID_HANDLE_VALUE ((HANDLE)(intptr_t)-1) -#define DLL_PROCESS_ATTACH 1 -#define DLL_THREAD_ATTACH 2 -#define DLL_THREAD_DETACH 3 -#define DLL_PROCESS_DETACH 0 - #define INFINITE 0xFFFFFFFF #define DUPLICATE_CLOSE_SOURCE 0x00000001 @@ -533,19 +528,6 @@ typedef enum _EXCEPTION_DISPOSITION { #define PAGE_GUARD 0x100 #define PAGE_NOCACHE 0x200 #define PAGE_WRITECOMBINE 0x400 -#define MEM_COMMIT 0x1000 -#define MEM_RESERVE 0x2000 -#define MEM_DECOMMIT 0x4000 -#define MEM_RELEASE 0x8000 -#define MEM_FREE 0x10000 -#define MEM_PRIVATE 0x20000 -#define MEM_MAPPED 0x40000 -#define MEM_RESET 0x80000 -#define MEM_TOP_DOWN 0x100000 -#define MEM_WRITE_WATCH 0x200000 -#define MEM_PHYSICAL 0x400000 -#define MEM_LARGE_PAGES 0x20000000 -#define MEM_4MB_PAGES 0x80000000 #define WAIT_OBJECT_0 0 #define WAIT_TIMEOUT 258 @@ -710,8 +692,8 @@ inline uint8_t * PalNtCurrentTeb() EXTERN_C void * __cdecl _alloca(size_t); #pragma intrinsic(_alloca) -REDHAWK_PALIMPORT _Ret_maybenull_ _Post_writable_byte_size_(size) void* REDHAWK_PALAPI PalVirtualAlloc(_In_opt_ void* pAddress, uintptr_t size, uint32_t allocationType, uint32_t protect); -REDHAWK_PALIMPORT UInt32_BOOL REDHAWK_PALAPI PalVirtualFree(_In_ void* pAddress, uintptr_t size, uint32_t freeType); +REDHAWK_PALIMPORT _Ret_maybenull_ _Post_writable_byte_size_(size) void* REDHAWK_PALAPI PalVirtualAlloc(uintptr_t size, uint32_t protect); +REDHAWK_PALIMPORT void REDHAWK_PALAPI PalVirtualFree(_In_ void* pAddress, uintptr_t size); REDHAWK_PALIMPORT UInt32_BOOL REDHAWK_PALAPI PalVirtualProtect(_In_ void* pAddress, uintptr_t size, uint32_t protect); REDHAWK_PALIMPORT void PalFlushInstructionCache(_In_ void* pAddress, size_t size); REDHAWK_PALIMPORT void REDHAWK_PALAPI PalSleep(uint32_t milliseconds); diff --git a/src/coreclr/nativeaot/Runtime/PalRedhawkFunctions.h b/src/coreclr/nativeaot/Runtime/PalRedhawkFunctions.h index 4c176593b9ff05..9bb0a9da6b8f40 100644 --- a/src/coreclr/nativeaot/Runtime/PalRedhawkFunctions.h +++ b/src/coreclr/nativeaot/Runtime/PalRedhawkFunctions.h @@ -13,12 +13,6 @@ inline UInt32_BOOL PalCloseHandle(HANDLE arg1) return CloseHandle(arg1); } -extern "C" UInt32_BOOL __stdcall CreateDirectoryW(LPCWSTR, LPSECURITY_ATTRIBUTES); -inline UInt32_BOOL PalCreateDirectoryW(LPCWSTR arg1, LPSECURITY_ATTRIBUTES arg2) -{ - return CreateDirectoryW(arg1, arg2); -} - extern "C" void __stdcall DeleteCriticalSection(CRITICAL_SECTION *); inline void PalDeleteCriticalSection(CRITICAL_SECTION * arg1) { @@ -77,12 +71,6 @@ inline uint32_t PalGetEnvironmentVariable(_In_opt_ LPCSTR lpName, _Out_writes_to } #endif -extern "C" void * __stdcall GetProcAddress(HANDLE, const char *); -inline void * PalGetProcAddress(HANDLE arg1, const char * arg2) -{ - return GetProcAddress(arg1, arg2); -} - extern "C" UInt32_BOOL __stdcall InitializeCriticalSectionEx(CRITICAL_SECTION *, uint32_t, uint32_t); inline UInt32_BOOL PalInitializeCriticalSectionEx(CRITICAL_SECTION * arg1, uint32_t arg2, uint32_t arg3) { @@ -101,18 +89,6 @@ inline void PalLeaveCriticalSection(CRITICAL_SECTION * arg1) LeaveCriticalSection(arg1); } -extern "C" HANDLE __stdcall LoadLibraryExW(const WCHAR *, HANDLE, uint32_t); -inline HANDLE PalLoadLibraryExW(const WCHAR * arg1, HANDLE arg2, uint32_t arg3) -{ - return LoadLibraryExW(arg1, arg2, arg3); -} - -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) -{ - RaiseException(arg1, arg2, arg3, arg4); -} - extern "C" UInt32_BOOL __stdcall ResetEvent(HANDLE); inline UInt32_BOOL PalResetEvent(HANDLE arg1) { diff --git a/src/coreclr/nativeaot/Runtime/Portable/CMakeLists.txt b/src/coreclr/nativeaot/Runtime/Portable/CMakeLists.txt index ea7b5a348eb233..5d19a4eb9eda04 100644 --- a/src/coreclr/nativeaot/Runtime/Portable/CMakeLists.txt +++ b/src/coreclr/nativeaot/Runtime/Portable/CMakeLists.txt @@ -13,7 +13,7 @@ set(ASM_OFFSETS_CSPP ${RUNTIME_DIR}/../Runtime.Base/src/AsmOffsets.cspp) if(WIN32) set(COMPILER_LANGUAGE "") - set(PREPROCESSOR_FLAGS -EP) + set(PREPROCESSOR_FLAGS -EP -nologo) set(ASM_OFFSETS_CPP ${RUNTIME_DIR}/windows/AsmOffsets.cpp) else() set(COMPILER_LANGUAGE -x c++) diff --git a/src/coreclr/nativeaot/Runtime/RhConfigValues.h b/src/coreclr/nativeaot/Runtime/RhConfigValues.h index a58486a6c6dc9d..334bf2f8445c3c 100644 --- a/src/coreclr/nativeaot/Runtime/RhConfigValues.h +++ b/src/coreclr/nativeaot/Runtime/RhConfigValues.h @@ -10,9 +10,6 @@ // very few configuration values are exposed in this manner. // -// By default, print assert to console and break in the debugger, if attached. Set to 0 for a pop-up dialog on assert. -DEBUG_CONFIG_VALUE_WITH_DEFAULT(BreakOnAssert, 1) - RETAIL_CONFIG_VALUE(StressLogLevel) RETAIL_CONFIG_VALUE(TotalStressLogSize) RETAIL_CONFIG_VALUE(gcServer) diff --git a/src/coreclr/nativeaot/Runtime/ThunksMapping.cpp b/src/coreclr/nativeaot/Runtime/ThunksMapping.cpp index 2b877fc9bfd226..cd4c2ffe732159 100644 --- a/src/coreclr/nativeaot/Runtime/ThunksMapping.cpp +++ b/src/coreclr/nativeaot/Runtime/ThunksMapping.cpp @@ -94,7 +94,7 @@ EXTERN_C NATIVEAOT_API void* __cdecl RhAllocateThunksMapping() { #ifdef WIN32 - void * pNewMapping = PalVirtualAlloc(NULL, THUNKS_MAP_SIZE * 2, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE); + void * pNewMapping = PalVirtualAlloc(THUNKS_MAP_SIZE * 2, PAGE_READWRITE); if (pNewMapping == NULL) return NULL; @@ -108,7 +108,7 @@ EXTERN_C NATIVEAOT_API void* __cdecl RhAllocateThunksMapping() // reduce it to RW for the data section. For the stubs section we need to increase to RWX to generate the stubs // instructions. After this we go back to RX for the stubs section before the stubs are used and should not be // changed anymore. - void * pNewMapping = PalVirtualAlloc(NULL, THUNKS_MAP_SIZE * 2, MEM_RESERVE | MEM_COMMIT, PAGE_EXECUTE_READ); + void * pNewMapping = PalVirtualAlloc(THUNKS_MAP_SIZE * 2, PAGE_EXECUTE_READ); if (pNewMapping == NULL) return NULL; @@ -118,7 +118,7 @@ EXTERN_C NATIVEAOT_API void* __cdecl RhAllocateThunksMapping() if (!PalVirtualProtect(pDataSection, THUNKS_MAP_SIZE, PAGE_READWRITE) || !PalVirtualProtect(pThunksSection, THUNKS_MAP_SIZE, PAGE_EXECUTE_READWRITE)) { - PalVirtualFree(pNewMapping, 0, MEM_RELEASE); + PalVirtualFree(pNewMapping, THUNKS_MAP_SIZE * 2); return NULL; } @@ -244,7 +244,7 @@ EXTERN_C NATIVEAOT_API void* __cdecl RhAllocateThunksMapping() #else if (!PalVirtualProtect(pThunksSection, THUNKS_MAP_SIZE, PAGE_EXECUTE_READ)) { - PalVirtualFree(pNewMapping, 0, MEM_RELEASE); + PalVirtualFree(pNewMapping, THUNKS_MAP_SIZE * 2); return NULL; } #endif @@ -288,7 +288,7 @@ EXTERN_C NATIVEAOT_API void* __cdecl RhAllocateThunksMapping() { int thunkDataSize = thunkDataMappingSize * thunkDataMappingCount; - g_pThunkStubData = (uintptr_t)PalVirtualAlloc(NULL, thunkDataSize, MEM_RESERVE, PAGE_READWRITE); + g_pThunkStubData = (uintptr_t)VirtualAlloc(NULL, thunkDataSize, MEM_RESERVE, PAGE_READWRITE); if (g_pThunkStubData == NULL) { @@ -298,7 +298,7 @@ EXTERN_C NATIVEAOT_API void* __cdecl RhAllocateThunksMapping() void* pThunkDataBlock = (int8_t*)g_pThunkStubData + nextThunkDataMapping * thunkDataMappingSize; - if (PalVirtualAlloc(pThunkDataBlock, thunkDataMappingSize, MEM_COMMIT, PAGE_READWRITE) == NULL) + if (VirtualAlloc(pThunkDataBlock, thunkDataMappingSize, MEM_COMMIT, PAGE_READWRITE) == NULL) { return NULL; } diff --git a/src/coreclr/nativeaot/Runtime/allocheap.cpp b/src/coreclr/nativeaot/Runtime/allocheap.cpp index 5183e4ebcd2f14..70fe21d98a5709 100644 --- a/src/coreclr/nativeaot/Runtime/allocheap.cpp +++ b/src/coreclr/nativeaot/Runtime/allocheap.cpp @@ -120,7 +120,7 @@ AllocHeap::~AllocHeap() { BlockListElem *pCur = m_blockList.PopHead(); if (pCur->GetStart() != m_pbInitialMem || m_fShouldFreeInitialMem) - PalVirtualFree(pCur->GetStart(), pCur->GetLength(), MEM_RELEASE); + PalVirtualFree(pCur->GetStart(), pCur->GetLength()); delete pCur; } } @@ -279,7 +279,7 @@ bool AllocHeap::_AllocNewBlock(uintptr_t cbMem) cbMem = ALIGN_UP(cbMem, OS_PAGE_SIZE); uint8_t * pbMem = reinterpret_cast - (PalVirtualAlloc(NULL, cbMem, MEM_COMMIT, m_roProtectType)); + (PalVirtualAlloc(cbMem, m_roProtectType)); if (pbMem == NULL) return false; @@ -287,7 +287,7 @@ bool AllocHeap::_AllocNewBlock(uintptr_t cbMem) BlockListElem *pBlockListElem = new (nothrow) BlockListElem(pbMem, cbMem); if (pBlockListElem == NULL) { - PalVirtualFree(pbMem, 0, MEM_RELEASE); + PalVirtualFree(pbMem, cbMem); return false; } diff --git a/src/coreclr/nativeaot/Runtime/clretwallmain.h b/src/coreclr/nativeaot/Runtime/clretwallmain.h deleted file mode 100644 index 6a293ebb838f2d..00000000000000 --- a/src/coreclr/nativeaot/Runtime/clretwallmain.h +++ /dev/null @@ -1,817 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -// shipping criteria: no EVENTPIPE-NATIVEAOT-TODO left in the codebase -// @TODO: Use genEventing.py to generate this file. Update script to handle -// nativeaot runtime and allow generating separate declaration and -// implementation files -// FireEtw* functions handle both EventPipe and ETW. The naming matches the -// generated output of genEventing.py used in shared code and other runtimes. -#ifndef CLR_ETW_ALL_MAIN_H -#define CLR_ETW_ALL_MAIN_H - -BOOL EventEnabledDestroyGCHandle(void); -ULONG FireEtwDestroyGCHandle( - void* HandleID, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledExceptionThrown_V1(void); -ULONG FireEtwExceptionThrown_V1( - const WCHAR* ExceptionType, - const WCHAR* ExceptionMessage, - void* ExceptionEIP, - const unsigned int ExceptionHRESULT, - const unsigned short ExceptionFlags, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCBulkEdge(void); -ULONG FireEtwGCBulkEdge( - const unsigned int Index, - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCBulkMovedObjectRanges(void); -ULONG FireEtwGCBulkMovedObjectRanges( - const unsigned int Index, - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCBulkNode(void); -ULONG FireEtwGCBulkNode( - const unsigned int Index, - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCBulkRCW(void); -ULONG FireEtwGCBulkRCW( - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCBulkRootCCW(void); -ULONG FireEtwGCBulkRootCCW( - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCBulkRootConditionalWeakTableElementEdge(void); -ULONG FireEtwGCBulkRootConditionalWeakTableElementEdge( - const unsigned int Index, - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCBulkRootEdge(void); -ULONG FireEtwGCBulkRootEdge( - const unsigned int Index, - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCBulkSurvivingObjectRanges(void); -ULONG FireEtwGCBulkSurvivingObjectRanges( - const unsigned int Index, - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCCreateConcurrentThread_V1(void); -ULONG FireEtwGCCreateConcurrentThread_V1( - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCCreateSegment_V1(void); -ULONG FireEtwGCCreateSegment_V1( - const unsigned __int64 Address, - const unsigned __int64 Size, - const unsigned int Type, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCEnd_V1(void); -ULONG FireEtwGCEnd_V1( - const unsigned int Count, - const unsigned int Depth, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCFreeSegment_V1(void); -ULONG FireEtwGCFreeSegment_V1( - const unsigned __int64 Address, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCGenerationRange(void); -ULONG FireEtwGCGenerationRange( - const unsigned char Generation, - void* RangeStart, - const unsigned __int64 RangeUsedLength, - const unsigned __int64 RangeReservedLength, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCHeapStats_V1(void); -ULONG FireEtwGCHeapStats_V1( - const unsigned __int64 GenerationSize0, - const unsigned __int64 TotalPromotedSize0, - const unsigned __int64 GenerationSize1, - const unsigned __int64 TotalPromotedSize1, - const unsigned __int64 GenerationSize2, - const unsigned __int64 TotalPromotedSize2, - const unsigned __int64 GenerationSize3, - const unsigned __int64 TotalPromotedSize3, - const unsigned __int64 FinalizationPromotedSize, - const unsigned __int64 FinalizationPromotedCount, - const unsigned int PinnedObjectCount, - const unsigned int SinkBlockCount, - const unsigned int GCHandleCount, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCJoin_V2(void); -ULONG FireEtwGCJoin_V2( - const unsigned int Heap, - const unsigned int JoinTime, - const unsigned int JoinType, - const unsigned short ClrInstanceID, - const unsigned int JoinID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCMarkFinalizeQueueRoots(void); -ULONG FireEtwGCMarkFinalizeQueueRoots( - const unsigned int HeapNum, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCMarkHandles(void); -ULONG FireEtwGCMarkHandles( - const unsigned int HeapNum, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCMarkOlderGenerationRoots(void); -ULONG FireEtwGCMarkOlderGenerationRoots( - const unsigned int HeapNum, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCMarkStackRoots(void); -ULONG FireEtwGCMarkStackRoots( - const unsigned int HeapNum, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCMarkWithType(void); -ULONG FireEtwGCMarkWithType( - const unsigned int HeapNum, - const unsigned short ClrInstanceID, - const unsigned int Type, - const unsigned __int64 Bytes, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCPerHeapHistory_V3(void); -ULONG FireEtwGCPerHeapHistory_V3( - const unsigned short ClrInstanceID, - void* FreeListAllocated, - void* FreeListRejected, - void* EndOfSegAllocated, - void* CondemnedAllocated, - void* PinnedAllocated, - void* PinnedAllocatedAdvance, - const unsigned int RunningFreeListEfficiency, - const unsigned int CondemnReasons0, - const unsigned int CondemnReasons1, - const unsigned int CompactMechanisms, - const unsigned int ExpandMechanisms, - const unsigned int HeapIndex, - void* ExtraGen0Commit, - const unsigned int Count, - int Values_ElementSize, - void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCTerminateConcurrentThread_V1(void); -ULONG FireEtwGCTerminateConcurrentThread_V1( - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCTriggered(void); -ULONG FireEtwGCTriggered( - const unsigned int Reason, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledModuleLoad_V2(void); -ULONG FireEtwModuleLoad_V2( - const unsigned __int64 ModuleID, - const unsigned __int64 AssemblyID, - const unsigned int ModuleFlags, - const unsigned int Reserved1, - const WCHAR* ModuleILPath, - const WCHAR* ModuleNativePath, - const unsigned short ClrInstanceID, - const GUID* ManagedPdbSignature, - const unsigned int ManagedPdbAge, - const WCHAR* ManagedPdbBuildPath, - const GUID* NativePdbSignature, - const unsigned int NativePdbAge, - const WCHAR* NativePdbBuildPath, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledSetGCHandle(void); -ULONG FireEtwSetGCHandle( - void* HandleID, - void* ObjectID, - const unsigned int Kind, - const unsigned int Generation, - const unsigned __int64 AppDomainID, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCStart_V2(void); -ULONG FireEtwGCStart_V2( - const unsigned int Count, - const unsigned int Depth, - const unsigned int Reason, - const unsigned int Type, - const unsigned short ClrInstanceID, - const unsigned __int64 ClientSequenceNumber, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - - -BOOL EventEnabledGCRestartEEEnd_V1(void); -ULONG FireEtwGCRestartEEEnd_V1( - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCRestartEEBegin_V1(void); -ULONG FireEtwGCRestartEEBegin_V1( - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCSuspendEEEnd_V1(void); -ULONG FireEtwGCSuspendEEEnd_V1( - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCSuspendEEBegin_V1(void); -ULONG FireEtwGCSuspendEEBegin_V1( - const unsigned int Reason, - const unsigned int Count, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledDecreaseMemoryPressure(void); -ULONG FireEtwDecreaseMemoryPressure( - const unsigned __int64 BytesFreed, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledFinalizeObject(void); -ULONG FireEtwFinalizeObject( - const void* TypeID, - const void* ObjectID, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCFinalizersBegin_V1(void); -ULONG FireEtwGCFinalizersBegin_V1( - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCFinalizersEnd_V1(void); -ULONG FireEtwGCFinalizersEnd_V1( - const unsigned int Count, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledContentionStart_V2(void); -ULONG FireEtwContentionStart_V2( - const unsigned char ContentionFlags, - const unsigned short ClrInstanceID, - const void* LockID, - const void* AssociatedObjectID, - const unsigned __int64 LockOwnerThreadID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledContentionStop_V1(void); -ULONG FireEtwContentionStop_V1( - const unsigned char ContentionFlags, - const unsigned short ClrInstanceID, - const double DurationNs, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledContentionLockCreated(void); -ULONG FireEtwContentionLockCreated( - const void* LockID, - const void* AssociatedObjectID, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledThreadPoolWorkerThreadStart(void); -uint32_t FireEtwThreadPoolWorkerThreadStart( - const unsigned int ActiveWorkerThreadCount, - const unsigned int RetiredWorkerThreadCount, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -uint32_t FireEtwThreadPoolWorkerThreadStop( - const unsigned int ActiveWorkerThreadCount, - const unsigned int RetiredWorkerThreadCount, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -uint32_t FireEtwThreadPoolWorkerThreadWait( - const unsigned int ActiveWorkerThreadCount, - const unsigned int RetiredWorkerThreadCount, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledThreadPoolMinMaxThreads(void); -uint32_t FireEtwThreadPoolMinMaxThreads( - const unsigned short MinWorkerThreads, - const unsigned short MaxWorkerThreads, - const unsigned short MinIOCompletionThreads, - const unsigned short MaxIOCompletionThreads, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledThreadPoolWorkerThreadAdjustmentSample(void); -uint32_t FireEtwThreadPoolWorkerThreadAdjustmentSample( - const double Throughput, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledThreadPoolWorkerThreadAdjustmentAdjustment(void); -uint32_t FireEtwThreadPoolWorkerThreadAdjustmentAdjustment( - const double AverageThroughput, - const unsigned int NewWorkerThreadCount, - const unsigned int Reason, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledThreadPoolWorkerThreadAdjustmentStats(void); -uint32_t FireEtwThreadPoolWorkerThreadAdjustmentStats( - const double Duration, - const double Throughput, - const double ThreadWave, - const double ThroughputWave, - const double ThroughputErrorEstimate, - const double AverageThroughputErrorEstimate, - const double ThroughputRatio, - const double Confidence, - const double NewControlSetting, - const unsigned short NewThreadWaveMagnitude, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledThreadPoolIOEnqueue(void); -uint32_t FireEtwThreadPoolIOEnqueue( - const void* NativeOverlapped, - const void* Overlapped, - const BOOL MultiDequeues, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledThreadPoolIODequeue(void); -uint32_t FireEtwThreadPoolIODequeue( - const void* NativeOverlapped, - const void* Overlapped, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledThreadPoolWorkingThreadCount(void); -uint32_t FireEtwThreadPoolWorkingThreadCount( - const unsigned int Count, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledThreadPoolIOPack(void); -uint32_t FireEtwThreadPoolIOPack( - const void* NativeOverlapped, - const void* Overlapped, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCAllocationTick_V4(void); -ULONG FireEtwGCAllocationTick_V4( - const unsigned int AllocationAmount, - const unsigned int AllocationKind, - const unsigned short ClrInstanceID, - const unsigned __int64 AllocationAmount64, - const void* TypeID, - const WCHAR* TypeName, - const unsigned int HeapIndex, - const void* Address, - const unsigned __int64 ObjectSize, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCHeapStats_V2(void); -ULONG FireEtwGCHeapStats_V2( - const unsigned __int64 GenerationSize0, - const unsigned __int64 TotalPromotedSize0, - const unsigned __int64 GenerationSize1, - const unsigned __int64 TotalPromotedSize1, - const unsigned __int64 GenerationSize2, - const unsigned __int64 TotalPromotedSize2, - const unsigned __int64 GenerationSize3, - const unsigned __int64 TotalPromotedSize3, - const unsigned __int64 FinalizationPromotedSize, - const unsigned __int64 FinalizationPromotedCount, - const unsigned int PinnedObjectCount, - const unsigned int SinkBlockCount, - const unsigned int GCHandleCount, - const unsigned short ClrInstanceID, - const unsigned __int64 GenerationSize4, - const unsigned __int64 TotalPromotedSize4, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCSampledObjectAllocationHigh(void); -ULONG FireEtwGCSampledObjectAllocationHigh( - const void* Address, - const void* TypeID, - const unsigned int ObjectCountForTypeSample, - const unsigned __int64 TotalSizeForTypeSample, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCSampledObjectAllocationLow(void); -ULONG FireEtwGCSampledObjectAllocationLow( - const void* Address, - const void* TypeID, - const unsigned int ObjectCountForTypeSample, - const unsigned __int64 TotalSizeForTypeSample, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledPinObjectAtGCTime(void); -ULONG FireEtwPinObjectAtGCTime( - const void* HandleID, - const void* ObjectID, - const unsigned __int64 ObjectSize, - const WCHAR* TypeName, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCBulkRootStaticVar(void); -ULONG FireEtwGCBulkRootStaticVar( - const unsigned int Count, - const unsigned __int64 AppDomainID, - const unsigned short ClrInstanceID, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledIncreaseMemoryPressure(void); -ULONG FireEtwIncreaseMemoryPressure( - const unsigned __int64 BytesAllocated, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCGlobalHeapHistory_V4(void); -ULONG FireEtwGCGlobalHeapHistory_V4( - const unsigned __int64 FinalYoungestDesired, - const signed int NumHeaps, - const unsigned int CondemnedGeneration, - const unsigned int Gen0ReductionCount, - const unsigned int Reason, - const unsigned int GlobalMechanisms, - const unsigned short ClrInstanceID, - const unsigned int PauseMode, - const unsigned int MemoryPressure, - const unsigned int CondemnReasons0, - const unsigned int CondemnReasons1, - const unsigned int Count, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGenAwareBegin(void); -ULONG FireEtwGenAwareBegin( - const unsigned int Count, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGenAwareEnd(void); -ULONG FireEtwGenAwareEnd( - const unsigned int Count, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCLOHCompact(void); -ULONG FireEtwGCLOHCompact( - const unsigned short ClrInstanceID, - const unsigned short Count, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -BOOL EventEnabledGCFitBucketInfo(void); -ULONG FireEtwGCFitBucketInfo( - const unsigned short ClrInstanceID, - const unsigned short BucketKind, - const unsigned __int64 TotalSize, - const unsigned short Count, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - -#ifdef FEATURE_ETW - -// ================================================================== -// Events currently only fired via ETW (private runtime provider) -// ================================================================== - -ULONG FireEtwGCSettings( - const unsigned __int64 SegmentSize, - const unsigned __int64 LargeObjectSegmentSize, - const BOOL ServerGC, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -); - -ULONG FireEtwPinPlugAtGCTime( - const void* PlugStart, - const void* PlugEnd, - const void* GapBeforeSize, - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -); - -ULONG FireEtwBGCBegin( - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -); - -ULONG FireEtwBGC1stNonConEnd( - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -); - -ULONG FireEtwBGC1stConEnd( - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -); - -ULONG FireEtwBGC2ndNonConBegin( - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -); - -ULONG FireEtwBGC2ndNonConEnd( - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -); - -ULONG FireEtwBGC2ndConBegin( - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -); - -ULONG FireEtwBGC2ndConEnd( - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -); - -ULONG FireEtwBGCDrainMark( - const unsigned __int64 Objects, - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -); - -ULONG FireEtwBGCRevisit( - const unsigned __int64 Pages, - const unsigned __int64 Objects, - const unsigned int IsLarge, - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -); - -ULONG FireEtwBGCOverflow( - const unsigned __int64 Min, - const unsigned __int64 Max, - const unsigned __int64 Objects, - const unsigned int IsLarge, - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -); - -ULONG FireEtwBGCAllocWaitBegin( - const unsigned int Reason, - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -); - -ULONG FireEtwBGCAllocWaitEnd( - const unsigned int Reason, - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -); - -ULONG FireEtwGCFullNotify_V1( - const unsigned int GenNumber, - const unsigned int IsAlloc, - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -); - -ULONG FireEtwPrvSetGCHandle( - const void* HandleID, - const void* ObjectID, - const unsigned int Kind, - const unsigned int Generation, - const unsigned __int64 AppDomainID, - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -); - -ULONG FireEtwPrvDestroyGCHandle( - const void* HandleID, - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -); - -#else - -#define FireEtwBGC1stConEnd(ClrInstanceID) -#define FireEtwBGC1stNonConEnd(ClrInstanceID) -#define FireEtwBGC2ndConBegin(ClrInstanceID) -#define FireEtwBGC2ndConEnd(ClrInstanceID) -#define FireEtwBGC2ndNonConBegin(ClrInstanceID) -#define FireEtwBGC2ndNonConEnd(ClrInstanceID) -#define FireEtwBGCAllocWaitBegin(Reason, ClrInstanceID) -#define FireEtwBGCAllocWaitEnd(Reason, ClrInstanceID) -#define FireEtwBGCBegin(ClrInstanceID) -#define FireEtwBGCDrainMark(Objects, ClrInstanceID) -#define FireEtwBGCOverflow(Min, Max, Objects, IsLarge, ClrInstanceID) -#define FireEtwBGCRevisit(Pages, Objects, IsLarge, ClrInstanceID) -#define FireEtwGCFullNotify_V1(GenNumber, IsAlloc, ClrInstanceID) -#define FireEtwGCSettings(SegmentSize, LargeObjectSegmentSize, ServerGC) -#define FireEtwPinPlugAtGCTime(PlugStart, PlugEnd, GapBeforeSize, ClrInstanceID) -#define FireEtwPrvDestroyGCHandle(HandleID, ClrInstanceID) -#define FireEtwPrvSetGCHandle(HandleID, ObjectID, Kind, Generation, AppDomainID, ClrInstanceID) - -#endif // FEATURE_ETW - -#endif // __CLR_ETW_ALL_MAIN_H__ \ No newline at end of file diff --git a/src/coreclr/nativeaot/Runtime/clreventpipewriteevents.h b/src/coreclr/nativeaot/Runtime/clreventpipewriteevents.h deleted file mode 100644 index 92da9196ec901e..00000000000000 --- a/src/coreclr/nativeaot/Runtime/clreventpipewriteevents.h +++ /dev/null @@ -1,599 +0,0 @@ - -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -// Work In Progress to add native events to EventPipe -// shipping criteria: no EVENTPIPE-NATIVEAOT-TODO left in the codebase -// @TODO: Audit native events in NativeAOT Runtime - -BOOL EventPipeEventEnabledDestroyGCHandle(void); -ULONG EventPipeWriteEventDestroyGCHandle( - const void* HandleID, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledExceptionThrown_V1(void); -ULONG EventPipeWriteEventExceptionThrown_V1( - const WCHAR* ExceptionType, - const WCHAR* ExceptionMessage, - const void* ExceptionEIP, - const unsigned int ExceptionHRESULT, - const unsigned short ExceptionFlags, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCBulkEdge(void); -ULONG EventPipeWriteEventGCBulkEdge( - const unsigned int Index, - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCBulkMovedObjectRanges(void); -ULONG EventPipeWriteEventGCBulkMovedObjectRanges( - const unsigned int Index, - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCBulkNode(void); -ULONG EventPipeWriteEventGCBulkNode( - const unsigned int Index, - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCBulkRCW(void); -ULONG EventPipeWriteEventGCBulkRCW( - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCBulkRootCCW(void); -ULONG EventPipeWriteEventGCBulkRootCCW( - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCBulkRootConditionalWeakTableElementEdge(void); -ULONG EventPipeWriteEventGCBulkRootConditionalWeakTableElementEdge( - const unsigned int Index, - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCBulkRootEdge(void); -ULONG EventPipeWriteEventGCBulkRootEdge( - const unsigned int Index, - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCBulkSurvivingObjectRanges(void); -ULONG EventPipeWriteEventGCBulkSurvivingObjectRanges( - const unsigned int Index, - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCCreateConcurrentThread_V1(void); -ULONG EventPipeWriteEventGCCreateConcurrentThread_V1( - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCCreateSegment_V1(void); -ULONG EventPipeWriteEventGCCreateSegment_V1( - const unsigned __int64 Address, - const unsigned __int64 Size, - const unsigned int Type, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCEnd_V1(void); -ULONG EventPipeWriteEventGCEnd_V1( - const unsigned int Count, - const unsigned int Depth, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCFreeSegment_V1(void); -ULONG EventPipeWriteEventGCFreeSegment_V1( - const unsigned __int64 Address, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCGenerationRange(void); -ULONG EventPipeWriteEventGCGenerationRange( - const unsigned char Generation, - const void* RangeStart, - const unsigned __int64 RangeUsedLength, - const unsigned __int64 RangeReservedLength, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCHeapStats_V1(void); -ULONG EventPipeWriteEventGCHeapStats_V1( - const unsigned __int64 GenerationSize0, - const unsigned __int64 TotalPromotedSize0, - const unsigned __int64 GenerationSize1, - const unsigned __int64 TotalPromotedSize1, - const unsigned __int64 GenerationSize2, - const unsigned __int64 TotalPromotedSize2, - const unsigned __int64 GenerationSize3, - const unsigned __int64 TotalPromotedSize3, - const unsigned __int64 FinalizationPromotedSize, - const unsigned __int64 FinalizationPromotedCount, - const unsigned int PinnedObjectCount, - const unsigned int SinkBlockCount, - const unsigned int GCHandleCount, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCJoin_V2(void); -ULONG EventPipeWriteEventGCJoin_V2( - const unsigned int Heap, - const unsigned int JoinTime, - const unsigned int JoinType, - const unsigned short ClrInstanceID, - const unsigned int JoinID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCMarkFinalizeQueueRoots(void); -ULONG EventPipeWriteEventGCMarkFinalizeQueueRoots( - const unsigned int HeapNum, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCMarkHandles(void); -ULONG EventPipeWriteEventGCMarkHandles( - const unsigned int HeapNum, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCMarkOlderGenerationRoots(void); -ULONG EventPipeWriteEventGCMarkOlderGenerationRoots( - const unsigned int HeapNum, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCMarkStackRoots(void); -ULONG EventPipeWriteEventGCMarkStackRoots( - const unsigned int HeapNum, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCMarkWithType(void); -ULONG EventPipeWriteEventGCMarkWithType( - const unsigned int HeapNum, - const unsigned short ClrInstanceID, - const unsigned int Type, - const unsigned __int64 Bytes, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCPerHeapHistory_V3(void); -ULONG EventPipeWriteEventGCPerHeapHistory_V3( - const unsigned short ClrInstanceID, - const void* FreeListAllocated, - const void* FreeListRejected, - const void* EndOfSegAllocated, - const void* CondemnedAllocated, - const void* PinnedAllocated, - const void* PinnedAllocatedAdvance, - const unsigned int RunningFreeListEfficiency, - const unsigned int CondemnReasons0, - const unsigned int CondemnReasons1, - const unsigned int CompactMechanisms, - const unsigned int ExpandMechanisms, - const unsigned int HeapIndex, - const void* ExtraGen0Commit, - const unsigned int Count, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCTerminateConcurrentThread_V1(void); -ULONG EventPipeWriteEventGCTerminateConcurrentThread_V1( - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCTriggered(void); -ULONG EventPipeWriteEventGCTriggered( - const unsigned int Reason, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledModuleLoad_V2(void); -ULONG EventPipeWriteEventModuleLoad_V2( - const unsigned __int64 ModuleID, - const unsigned __int64 AssemblyID, - const unsigned int ModuleFlags, - const unsigned int Reserved1, - const WCHAR* ModuleILPath, - const WCHAR* ModuleNativePath, - const unsigned short ClrInstanceID, - const GUID* ManagedPdbSignature, - const unsigned int ManagedPdbAge, - const WCHAR* ManagedPdbBuildPath, - const GUID* NativePdbSignature, - const unsigned int NativePdbAge, - const WCHAR* NativePdbBuildPath, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledSetGCHandle(void); -ULONG EventPipeWriteEventSetGCHandle( - const void* HandleID, - const void* ObjectID, - const unsigned int Kind, - const unsigned int Generation, - const unsigned __int64 AppDomainID, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCStart_V2(void); -ULONG EventPipeWriteEventGCStart_V2( - const unsigned int Count, - const unsigned int Depth, - const unsigned int Reason, - const unsigned int Type, - const unsigned short ClrInstanceID, - const unsigned __int64 ClientSequenceNumber, - const GUID * ActivityId,// = nullptr, - const GUID * RelatedActivityId// = nullptr -); -BOOL EventPipeEventEnabledGCRestartEEEnd_V1(void); -ULONG EventPipeWriteEventGCRestartEEEnd_V1( - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCRestartEEBegin_V1(void); -ULONG EventPipeWriteEventGCRestartEEBegin_V1( - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCSuspendEEEnd_V1(void); -ULONG EventPipeWriteEventGCSuspendEEEnd_V1( - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCSuspendEEBegin_V1(void); -ULONG EventPipeWriteEventGCSuspendEEBegin_V1( - const unsigned int Reason, - const unsigned int Count, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledDecreaseMemoryPressure(void); -ULONG EventPipeWriteEventDecreaseMemoryPressure( - const unsigned __int64 BytesFreed, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledFinalizeObject(void); -ULONG EventPipeWriteEventFinalizeObject( - const void* TypeID, - const void* ObjectID, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCFinalizersBegin_V1(void); -ULONG EventPipeWriteEventGCFinalizersBegin_V1( - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCFinalizersEnd_V1(void); -ULONG EventPipeWriteEventGCFinalizersEnd_V1( - const unsigned int Count, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledContentionStart_V2(void); -ULONG EventPipeWriteEventContentionStart_V2( - const unsigned char ContentionFlags, - const unsigned short ClrInstanceID, - const void* LockID, - const void* AssociatedObjectID, - const unsigned __int64 LockOwnerThreadID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledContentionStop_V1(void); -ULONG EventPipeWriteEventContentionStop_V1( - const unsigned char ContentionFlags, - const unsigned short ClrInstanceID, - const double DurationNs, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledContentionLockCreated(void); -ULONG EventPipeWriteEventContentionLockCreated( - const void* LockID, - const void* AssociatedObjectID, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledThreadPoolWorkerThreadStart(void); -ULONG EventPipeWriteEventThreadPoolWorkerThreadStart( - const unsigned int ActiveWorkerThreadCount, - const unsigned int RetiredWorkerThreadCount, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledThreadPoolWorkerThreadStop(void); -ULONG EventPipeWriteEventThreadPoolWorkerThreadStop( - const unsigned int ActiveWorkerThreadCount, - const unsigned int RetiredWorkerThreadCount, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledThreadPoolWorkerThreadWait(void); -ULONG EventPipeWriteEventThreadPoolWorkerThreadWait( - const unsigned int ActiveWorkerThreadCount, - const unsigned int RetiredWorkerThreadCount, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledThreadPoolMinMaxThreads(void); -ULONG EventPipeWriteEventThreadPoolMinMaxThreads( - const unsigned short MinWorkerThreads, - const unsigned short MaxWorkerThreads, - const unsigned short MinIOCompletionThreads, - const unsigned short MaxIOCompletionThreads, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledThreadPoolWorkerThreadAdjustmentSample(void); -ULONG EventPipeWriteEventThreadPoolWorkerThreadAdjustmentSample( - const double Throughput, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledThreadPoolWorkerThreadAdjustmentAdjustment(void); -ULONG EventPipeWriteEventThreadPoolWorkerThreadAdjustmentAdjustment( - const double AverageThroughput, - const unsigned int NewWorkerThreadCount, - const unsigned int Reason, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledThreadPoolWorkerThreadAdjustmentStats(void); -ULONG EventPipeWriteEventThreadPoolWorkerThreadAdjustmentStats( - const double Duration, - const double Throughput, - const double ThreadWave, - const double ThroughputWave, - const double ThroughputErrorEstimate, - const double AverageThroughputErrorEstimate, - const double ThroughputRatio, - const double Confidence, - const double NewControlSetting, - const unsigned short NewThreadWaveMagnitude, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledThreadPoolIOEnqueue(void); -ULONG EventPipeWriteEventThreadPoolIOEnqueue( - const void* NativeOverlapped, - const void* Overlapped, - const BOOL MultiDequeues, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledThreadPoolIODequeue(void); -ULONG EventPipeWriteEventThreadPoolIODequeue( - const void* NativeOverlapped, - const void* Overlapped, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledThreadPoolWorkingThreadCount(void); -ULONG EventPipeWriteEventThreadPoolWorkingThreadCount( - const unsigned int Count, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledThreadPoolIOPack(void); -ULONG EventPipeWriteEventThreadPoolIOPack( - const void* NativeOverlapped, - const void* Overlapped, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCAllocationTick_V4(void); -ULONG EventPipeWriteEventGCAllocationTick_V4( - const unsigned int AllocationAmount, - const unsigned int AllocationKind, - const unsigned short ClrInstanceID, - const unsigned __int64 AllocationAmount64, - const void* TypeID, - const WCHAR* TypeName, - const unsigned int HeapIndex, - const void* Address, - const unsigned __int64 ObjectSize, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCHeapStats_V2(void); -ULONG EventPipeWriteEventGCHeapStats_V2( - const unsigned __int64 GenerationSize0, - const unsigned __int64 TotalPromotedSize0, - const unsigned __int64 GenerationSize1, - const unsigned __int64 TotalPromotedSize1, - const unsigned __int64 GenerationSize2, - const unsigned __int64 TotalPromotedSize2, - const unsigned __int64 GenerationSize3, - const unsigned __int64 TotalPromotedSize3, - const unsigned __int64 FinalizationPromotedSize, - const unsigned __int64 FinalizationPromotedCount, - const unsigned int PinnedObjectCount, - const unsigned int SinkBlockCount, - const unsigned int GCHandleCount, - const unsigned short ClrInstanceID, - const unsigned __int64 GenerationSize4, - const unsigned __int64 TotalPromotedSize4, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCSampledObjectAllocationHigh(void); -ULONG EventPipeWriteEventGCSampledObjectAllocationHigh( - const void* Address, - const void* TypeID, - const unsigned int ObjectCountForTypeSample, - const unsigned __int64 TotalSizeForTypeSample, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCSampledObjectAllocationLow(void); -ULONG EventPipeWriteEventGCSampledObjectAllocationLow( - const void* Address, - const void* TypeID, - const unsigned int ObjectCountForTypeSample, - const unsigned __int64 TotalSizeForTypeSample, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledPinObjectAtGCTime(void); -ULONG EventPipeWriteEventPinObjectAtGCTime( - const void* HandleID, - const void* ObjectID, - const unsigned __int64 ObjectSize, - const WCHAR* TypeName, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCBulkRootStaticVar(void); -ULONG EventPipeWriteEventGCBulkRootStaticVar( - const unsigned int Count, - const unsigned __int64 AppDomainID, - const unsigned short ClrInstanceID, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledIncreaseMemoryPressure(void); -ULONG EventPipeWriteEventIncreaseMemoryPressure( - const unsigned __int64 BytesAllocated, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCGlobalHeapHistory_V4(void); -ULONG EventPipeWriteEventGCGlobalHeapHistory_V4( - const unsigned __int64 FinalYoungestDesired, - const signed int NumHeaps, - const unsigned int CondemnedGeneration, - const unsigned int Gen0ReductionCount, - const unsigned int Reason, - const unsigned int GlobalMechanisms, - const unsigned short ClrInstanceID, - const unsigned int PauseMode, - const unsigned int MemoryPressure, - const unsigned int CondemnReasons0, - const unsigned int CondemnReasons1, - const unsigned int Count, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGenAwareBegin(void); -ULONG EventPipeWriteEventGenAwareBegin( - const unsigned int Count, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGenAwareEnd(void); -ULONG EventPipeWriteEventGenAwareEnd( - const unsigned int Count, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCLOHCompact(void); -ULONG EventPipeWriteEventGCLOHCompact( - const unsigned short ClrInstanceID, - const unsigned short Count, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); -BOOL EventPipeEventEnabledGCFitBucketInfo(void); -ULONG EventPipeWriteEventGCFitBucketInfo( - const unsigned short ClrInstanceID, - const unsigned short BucketKind, - const unsigned __int64 TotalSize, - const unsigned short Count, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -); - diff --git a/src/coreclr/nativeaot/Runtime/eventpipe/CMakeLists.txt b/src/coreclr/nativeaot/Runtime/eventpipe/CMakeLists.txt index 27f07197287994..674a26218da171 100644 --- a/src/coreclr/nativeaot/Runtime/eventpipe/CMakeLists.txt +++ b/src/coreclr/nativeaot/Runtime/eventpipe/CMakeLists.txt @@ -1,10 +1,78 @@ project(Runtime) +include(FindPython) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(EVENT_MANIFEST ${VM_DIR}/ClrEtwAll.man) +set(EVENT_EXCLUSIONS ${VM_DIR}/ClrEtwAllMeta.lst) +set(EVENT_INCLUSION_FILE ${CMAKE_CURRENT_SOURCE_DIR}/gen-eventing-event-inc.lst) +set(GENERATED_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/inc) +set(NONEXTERN_ARG "--nonextern") +set(NOXPLATHEADER_ARG "--noxplatheader") + +# Platform agnostic source generation, clretwallmain.h/cpp, disabledclretwallmain.cpp, clreventpipewriteevents.h, etmdummy.h +set (GEN_EVENTPIPE_PLAT_AGNOSTIC_SOURCES ${GENERATED_INCLUDE_DIR}/clretwallmain.cpp) + +set (GEN_EVENTPIPE_PLAT_AGNOSTIC_DISABLED_SOURCES ${GENERATED_INCLUDE_DIR}/disabledclretwallmain.cpp) + +set(GENERATE_PLAT_AGNOSTIC_SCRIPT ${CLR_DIR}/scripts/genEventing.py) + +set (EventingHeaders + ${GENERATED_INCLUDE_DIR}/etmdummy.h + ${GENERATED_INCLUDE_DIR}/clretwallmain.h + ${GENERATED_INCLUDE_DIR}/clreventpipewriteevents.h + ${GENERATED_INCLUDE_DIR}/clrproviders.h + ${GENERATED_INCLUDE_DIR}/disabledclretwallmain.cpp + ${GENERATED_INCLUDE_DIR}/clretwallmain.cpp +) + +add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/aot_eventing_headers.timestamp + COMMAND ${Python_EXECUTABLE} ${GENERATE_PLAT_AGNOSTIC_SCRIPT} --man ${EVENT_MANIFEST} --incdir ${GENERATED_INCLUDE_DIR} --inc ${EVENT_INCLUSION_FILE} --dummy ${GENERATED_INCLUDE_DIR}/etmdummy.h --runtimeflavor nativeaot ${NONEXTERN_ARG} ${NOXPLATHEADER_ARG} + COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/aot_eventing_headers.timestamp + DEPENDS ${EVENT_MANIFEST} ${GENERATE_PLAT_AGNOSTIC_SCRIPT} + VERBATIM +) + +set_source_files_properties(${EventingHeaders} PROPERTIES GENERATED TRUE) + +add_custom_target(aot_eventing_headers DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/aot_eventing_headers.timestamp) + +# EventPipe provider source, currently dotnetruntime provider and helper file +set(GENERATE_EVENTPIPE_SCRIPT ${CLR_DIR}/scripts/genEventPipe.py) +set(GENERATE_COMMAND ${Python_EXECUTABLE} ${GENERATE_EVENTPIPE_SCRIPT} --man ${EVENT_MANIFEST} --exc ${EVENT_EXCLUSIONS} --inc ${EVENT_INCLUSION_FILE} --intermediate ${CMAKE_CURRENT_BINARY_DIR} --runtimeflavor nativeaot ${NONEXTERN_ARG}) + +execute_process( + COMMAND ${GENERATE_COMMAND} --dry-run + RESULT_VARIABLE GEN_EVENTPIPE_RESULT + OUTPUT_VARIABLE GEN_EVENTPIPE_SOURCE_PATHS + ERROR_VARIABLE GEN_EVENTPIPE_ERRORS +) + +if (NOT GEN_EVENTPIPE_RESULT EQUAL 0) + message(FATAL_ERROR "Failed to generate EventPipe: ${GEN_EVENTPIPE_ERRORS}") +endif() + +string(REPLACE "\n" ";" GEN_EVENTPIPE_SOURCE_PATHS ${GEN_EVENTPIPE_SOURCE_PATHS}) # turn the outputted list of files into a CMake list + +set (GEN_EVENTPIPE_PROVIDER_SOURCES "") +foreach(GEN_EVENTPIPE_SOURCE_PATH ${GEN_EVENTPIPE_SOURCE_PATHS}) + file(TO_CMAKE_PATH ${GEN_EVENTPIPE_SOURCE_PATH} GEN_EVENTPIPE_SOURCE) + list(APPEND GEN_EVENTPIPE_PROVIDER_SOURCES ${GEN_EVENTPIPE_SOURCE}) +endforeach() + +# Generate the provider source files via python auto-gen +add_custom_command(OUTPUT ${GEN_EVENTPIPE_PROVIDER_SOURCES} + COMMAND ${GENERATE_COMMAND} + DEPENDS ${GENERATE_EVENTPIPE_SCRIPT} ${EVENT_MANIFEST} ${EVENT_EXCLUSIONS}) + +set_source_files_properties(${GEN_EVENTPIPE_PROVIDER_SOURCES} PROPERTIES GENERATED TRUE) + set(EP_GENERATED_HEADER_PATH "${GENERATED_INCLUDE_DIR}") include (${CLR_SRC_NATIVE_DIR}/eventpipe/configure.cmake) include_directories(${EP_GENERATED_HEADER_PATH}) -set(CMAKE_INCLUDE_CURRENT_DIR ON) set(AOT_EVENTPIPE_SHIM_DIR "${CMAKE_CURRENT_SOURCE_DIR}") set (CONTAINER_SOURCES "") @@ -12,7 +80,6 @@ set (CONTAINER_HEADERS "") set (MINIPAL_SOURCES "") set (EVENTPIPE_SOURCES "") set (EVENTPIPE_HEADERS "") -set (GEN_EVENTPIPE_SOURCES "") # Use TCP for EventPipe on mobile platforms if (CLR_CMAKE_HOST_IOS OR CLR_CMAKE_HOST_TVOS OR CLR_CMAKE_HOST_ANDROID) @@ -80,12 +147,8 @@ set_source_files_properties(${CONTAINER_SOURCES} PROPERTIES LANGUAGE CXX) set_source_files_properties(${EVENTPIPE_SOURCES} PROPERTIES LANGUAGE CXX) if(CLR_CMAKE_HOST_UNIX) - if (CMAKE_VERSION VERSION_GREATER 3.11 OR CMAKE_VERSION VERSION_EQUAL 3.11) set_source_files_properties(${CONTAINER_SOURCES} PROPERTIES COMPILE_OPTIONS -xc++) set_source_files_properties(${EVENTPIPE_SOURCES} PROPERTIES COMPILE_OPTIONS -xc++) - else(CMAKE_VERSION VERSION_GREATER 3.11 OR CMAKE_VERSION VERSION_EQUAL 3.11) - add_compile_options(-xc++) - endif() endif(CLR_CMAKE_HOST_UNIX) if (WIN32) @@ -94,7 +157,7 @@ endif() list(APPEND AOT_EVENTPIPE_SHIM_SOURCES ${AOT_EVENTPIPE_SHIM_DIR}/ep-rt-aot.cpp - ${AOT_EVENTPIPE_SHIM_DIR}/ds-rt-aot.cpp + ${AOT_EVENTPIPE_SHIM_DIR}/ds-rt-aot.cpp ) list(APPEND AOT_EVENTPIPE_SHIM_HEADERS @@ -105,14 +168,9 @@ list(APPEND AOT_EVENTPIPE_SHIM_HEADERS ${AOT_EVENTPIPE_SHIM_DIR}/ep-rt-types-aot.h ) -list(APPEND GEN_EVENTPIPE_SOURCES - ${AOT_EVENTPIPE_SHIM_DIR}/clretwallmain.cpp - ${AOT_EVENTPIPE_SHIM_DIR}/dotnetruntime.cpp -) list(APPEND AOT_EVENTPIPE_MANAGED_TO_NATIVE_SOURCES ${RUNTIME_DIR}/eventpipeinternal.cpp - ${RUNTIME_DIR}/eventpipeadapter.h ${RUNTIME_DIR}/EnabledEventPipeInterface.cpp ${RUNTIME_DIR}/runtimeeventinternal.cpp ) @@ -140,7 +198,8 @@ list(APPEND EVENTPIPE_SOURCES ${AOT_EVENTPIPE_MANAGED_TO_NATIVE_SOURCES} ${AOT_EVENTTRACE_SOURCES} ${SHARED_EVENTPIPE_CONFIG_HEADERS} - ${GEN_EVENTPIPE_SOURCES} + ${GEN_EVENTPIPE_PROVIDER_SOURCES} + ${GEN_EVENTPIPE_PLAT_AGNOSTIC_SOURCES} ${CONTAINER_SOURCES} ${CONTAINER_HEADERS} ${MINIPAL_SOURCES} @@ -151,17 +210,22 @@ list(APPEND AOT_EVENTPIPE_DISABLED_SOURCES ${RUNTIME_DIR}/disabledeventpipeinternal.cpp ${RUNTIME_DIR}/disabledeventtrace.cpp ${RUNTIME_DIR}/disabledruntimeeventinternal.cpp - ${AOT_EVENTPIPE_SHIM_DIR}/disabledclretwallmain.cpp + ${GEN_EVENTPIPE_PLAT_AGNOSTIC_DISABLED_SOURCES} ) add_library(eventpipe-enabled STATIC ${EVENTPIPE_SOURCES}) +add_dependencies(eventpipe-enabled aot_eventing_headers) + add_library(eventpipe-disabled STATIC ${AOT_EVENTPIPE_DISABLED_SOURCES}) +add_dependencies(eventpipe-disabled aot_eventing_headers) if (CLR_CMAKE_TARGET_WIN32) add_library(eventpipe-enabled.GuardCF STATIC ${EVENTPIPE_SOURCES}) + add_dependencies(eventpipe-enabled.GuardCF aot_eventing_headers) add_library(eventpipe-disabled.GuardCF STATIC ${AOT_EVENTPIPE_DISABLED_SOURCES}) - target_compile_options(eventpipe-enabled.GuardCF PRIVATE $<$,$>:/guard:cf>) - target_compile_options(eventpipe-disabled.GuardCF PRIVATE $<$,$>:/guard:cf>) + add_dependencies(eventpipe-disabled.GuardCF aot_eventing_headers) + set_target_properties(eventpipe-enabled.GuardCF PROPERTIES CLR_CONTROL_FLOW_GUARD ON) + set_target_properties(eventpipe-disabled.GuardCF PROPERTIES CLR_CONTROL_FLOW_GUARD ON) endif (CLR_CMAKE_TARGET_WIN32) install_static_library(eventpipe-enabled aotsdk nativeaot) diff --git a/src/coreclr/nativeaot/Runtime/eventpipe/clretwallmain.cpp b/src/coreclr/nativeaot/Runtime/eventpipe/clretwallmain.cpp deleted file mode 100644 index 8f93bd946af66c..00000000000000 --- a/src/coreclr/nativeaot/Runtime/eventpipe/clretwallmain.cpp +++ /dev/null @@ -1,1253 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -// shipping criteria: no EVENTPIPE-NATIVEAOT-TODO left in the codebase -// @TODO: Use genEventing.py to generate this file. Update script to handle -// nativeaot runtime and allow generating separate declaration and -// implementation files - -#include -#include - -#include "clretwallmain.h" -#include "clreventpipewriteevents.h" -#include "EtwEvents.h" - -BOOL EventEnabledDestroyGCHandle(void) {return EventPipeEventEnabledDestroyGCHandle();} - -ULONG FireEtwDestroyGCHandle( - void* HandleID, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventDestroyGCHandle(HandleID,ClrInstanceID,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXplatDestroyGCHandle(HandleID,ClrInstanceID); -#endif - return status; -} - -BOOL EventEnabledExceptionThrown_V1(void) {return EventPipeEventEnabledExceptionThrown_V1();} - -ULONG FireEtwExceptionThrown_V1( - const WCHAR* ExceptionType, - const WCHAR* ExceptionMessage, - void* ExceptionEIP, - const unsigned int ExceptionHRESULT, - const unsigned short ExceptionFlags, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventExceptionThrown_V1(ExceptionType,ExceptionMessage,ExceptionEIP,ExceptionHRESULT,ExceptionFlags,ClrInstanceID,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXplatExceptionThrown_V1(ExceptionType,ExceptionMessage,ExceptionEIP,ExceptionHRESULT,ExceptionFlags,ClrInstanceID); -#endif - return status; -} - -BOOL EventEnabledGCBulkEdge(void) {return EventPipeEventEnabledGCBulkEdge();} - -ULONG FireEtwGCBulkEdge( - const unsigned int Index, - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - void* Values, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCBulkEdge(Index,Count,ClrInstanceID,Values_ElementSize, Values,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXplatGCBulkEdge(Index,Count,ClrInstanceID,Values_ElementSize, Values); -#endif - return status; -} - -BOOL EventEnabledGCBulkMovedObjectRanges(void) {return EventPipeEventEnabledGCBulkMovedObjectRanges();} - -ULONG FireEtwGCBulkMovedObjectRanges( - const unsigned int Index, - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - void* Values, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCBulkMovedObjectRanges(Index,Count,ClrInstanceID,Values_ElementSize, Values,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXplatGCBulkMovedObjectRanges(Index,Count,ClrInstanceID,Values_ElementSize, Values); -#endif - return status; -} - -BOOL EventEnabledGCBulkNode(void) {return EventPipeEventEnabledGCBulkNode();} - -ULONG FireEtwGCBulkNode( - const unsigned int Index, - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - void* Values, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCBulkNode(Index,Count,ClrInstanceID,Values_ElementSize, Values,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXplatGCBulkNode(Index,Count,ClrInstanceID,Values_ElementSize, Values); -#endif - return status; -} - -BOOL EventEnabledGCBulkRCW(void) {return EventPipeEventEnabledGCBulkRCW();} - -ULONG FireEtwGCBulkRCW( - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - void* Values, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCBulkRCW(Count,ClrInstanceID,Values_ElementSize, Values,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXplatGCBulkRCW(Count,ClrInstanceID,Values_ElementSize, Values); -#endif - return status; -} - -BOOL EventEnabledGCBulkRootCCW(void) {return EventPipeEventEnabledGCBulkRootCCW();} - -ULONG FireEtwGCBulkRootCCW( - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - void* Values, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCBulkRootCCW(Count,ClrInstanceID,Values_ElementSize, Values,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXplatGCBulkRootCCW(Count,ClrInstanceID,Values_ElementSize, Values); -#endif - return status; -} - -BOOL EventEnabledGCBulkRootConditionalWeakTableElementEdge(void) {return EventPipeEventEnabledGCBulkRootConditionalWeakTableElementEdge();} - -ULONG FireEtwGCBulkRootConditionalWeakTableElementEdge( - const unsigned int Index, - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - void* Values, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCBulkRootConditionalWeakTableElementEdge(Index,Count,ClrInstanceID,Values_ElementSize, Values,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXplatGCBulkRootConditionalWeakTableElementEdge(Index,Count,ClrInstanceID,Values_ElementSize, Values); -#endif - return status; -} - -BOOL EventEnabledGCBulkRootEdge(void) {return EventPipeEventEnabledGCBulkRootEdge();} - -ULONG FireEtwGCBulkRootEdge( - const unsigned int Index, - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - void* Values, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCBulkRootEdge(Index,Count,ClrInstanceID,Values_ElementSize, Values,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXplatGCBulkRootEdge(Index,Count,ClrInstanceID,Values_ElementSize, Values); -#endif - return status; -} - -BOOL EventEnabledGCBulkSurvivingObjectRanges(void) {return EventPipeEventEnabledGCBulkSurvivingObjectRanges();} - -ULONG FireEtwGCBulkSurvivingObjectRanges( - const unsigned int Index, - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - void* Values, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCBulkSurvivingObjectRanges(Index,Count,ClrInstanceID,Values_ElementSize, Values,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXplatGCBulkSurvivingObjectRanges(Index,Count,ClrInstanceID,Values_ElementSize, Values); -#endif - return status; -} - -BOOL EventEnabledGCCreateConcurrentThread_V1(void) {return EventPipeEventEnabledGCCreateConcurrentThread_V1();} - -ULONG FireEtwGCCreateConcurrentThread_V1( - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCCreateConcurrentThread_V1(ClrInstanceID,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXplatGCCreateConcurrentThread_V1(ClrInstanceID); -#endif - return status; -} - -BOOL EventEnabledGCCreateSegment_V1(void) {return EventPipeEventEnabledGCCreateSegment_V1();} - -ULONG FireEtwGCCreateSegment_V1( - const unsigned __int64 Address, - const unsigned __int64 Size, - const unsigned int Type, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCCreateSegment_V1(Address,Size,Type,ClrInstanceID,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXplatGCCreateSegment_V1(Address,Size,Type,ClrInstanceID); -#endif - return status; -} - -BOOL EventEnabledGCEnd_V1(void) {return EventPipeEventEnabledGCEnd_V1();} - -ULONG FireEtwGCEnd_V1( - const unsigned int Count, - const unsigned int Depth, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCEnd_V1(Count,Depth,ClrInstanceID,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXplatGCEnd_V1(Count,Depth,ClrInstanceID); -#endif - return status; -} - -BOOL EventEnabledGCFreeSegment_V1(void) {return EventPipeEventEnabledGCFreeSegment_V1();} - -ULONG FireEtwGCFreeSegment_V1( - const unsigned __int64 Address, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCFreeSegment_V1(Address,ClrInstanceID,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXplatGCFreeSegment_V1(Address,ClrInstanceID); -#endif - return status; -} - -BOOL EventEnabledGCGenerationRange(void) {return EventPipeEventEnabledGCGenerationRange();} - -ULONG FireEtwGCGenerationRange( - const unsigned char Generation, - void* RangeStart, - const unsigned __int64 RangeUsedLength, - const unsigned __int64 RangeReservedLength, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCGenerationRange(Generation,RangeStart,RangeUsedLength,RangeReservedLength,ClrInstanceID,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXplatGCGenerationRange(Generation,RangeStart,RangeUsedLength,RangeReservedLength,ClrInstanceID); -#endif - return status; -} - -BOOL EventEnabledGCHeapStats_V1(void) {return EventPipeEventEnabledGCHeapStats_V1();} - -ULONG FireEtwGCHeapStats_V1( - const unsigned __int64 GenerationSize0, - const unsigned __int64 TotalPromotedSize0, - const unsigned __int64 GenerationSize1, - const unsigned __int64 TotalPromotedSize1, - const unsigned __int64 GenerationSize2, - const unsigned __int64 TotalPromotedSize2, - const unsigned __int64 GenerationSize3, - const unsigned __int64 TotalPromotedSize3, - const unsigned __int64 FinalizationPromotedSize, - const unsigned __int64 FinalizationPromotedCount, - const unsigned int PinnedObjectCount, - const unsigned int SinkBlockCount, - const unsigned int GCHandleCount, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCHeapStats_V1(GenerationSize0,TotalPromotedSize0,GenerationSize1,TotalPromotedSize1,GenerationSize2,TotalPromotedSize2,GenerationSize3,TotalPromotedSize3,FinalizationPromotedSize,FinalizationPromotedCount,PinnedObjectCount,SinkBlockCount,GCHandleCount,ClrInstanceID,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXplatGCHeapStats_V1(GenerationSize0,TotalPromotedSize0,GenerationSize1,TotalPromotedSize1,GenerationSize2,TotalPromotedSize2,GenerationSize3,TotalPromotedSize3,FinalizationPromotedSize,FinalizationPromotedCount,PinnedObjectCount,SinkBlockCount,GCHandleCount,ClrInstanceID); -#endif - return status; -} - -BOOL EventEnabledGCJoin_V2(void) {return EventPipeEventEnabledGCJoin_V2();} - -ULONG FireEtwGCJoin_V2( - const unsigned int Heap, - const unsigned int JoinTime, - const unsigned int JoinType, - const unsigned short ClrInstanceID, - const unsigned int JoinID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCJoin_V2(Heap,JoinTime,JoinType,ClrInstanceID,JoinID,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXplatGCJoin_V2(Heap,JoinTime,JoinType,ClrInstanceID,JoinID); -#endif - return status; -} - -BOOL EventEnabledGCMarkFinalizeQueueRoots(void) {return EventPipeEventEnabledGCMarkFinalizeQueueRoots();} - -ULONG FireEtwGCMarkFinalizeQueueRoots( - const unsigned int HeapNum, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCMarkFinalizeQueueRoots(HeapNum,ClrInstanceID,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXplatGCMarkFinalizeQueueRoots(HeapNum,ClrInstanceID); -#endif - return status; -} - -BOOL EventEnabledGCMarkHandles(void) {return EventPipeEventEnabledGCMarkHandles();} - -ULONG FireEtwGCMarkHandles( - const unsigned int HeapNum, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCMarkHandles(HeapNum,ClrInstanceID,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXplatGCMarkHandles(HeapNum,ClrInstanceID); -#endif - return status; -} - -BOOL EventEnabledGCMarkOlderGenerationRoots(void) {return EventPipeEventEnabledGCMarkOlderGenerationRoots();} - -ULONG FireEtwGCMarkOlderGenerationRoots( - const unsigned int HeapNum, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCMarkOlderGenerationRoots(HeapNum,ClrInstanceID,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXplatGCMarkOlderGenerationRoots(HeapNum,ClrInstanceID); -#endif - return status; -} - -BOOL EventEnabledGCMarkStackRoots(void) {return EventPipeEventEnabledGCMarkStackRoots();} - -ULONG FireEtwGCMarkStackRoots( - const unsigned int HeapNum, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCMarkStackRoots(HeapNum,ClrInstanceID,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXplatGCMarkStackRoots(HeapNum,ClrInstanceID); -#endif - return status; -} - -BOOL EventEnabledGCMarkWithType(void) {return EventPipeEventEnabledGCMarkWithType();} - -ULONG FireEtwGCMarkWithType( - const unsigned int HeapNum, - const unsigned short ClrInstanceID, - const unsigned int Type, - const unsigned __int64 Bytes, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCMarkWithType(HeapNum,ClrInstanceID,Type,Bytes,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXplatGCMarkWithType(HeapNum,ClrInstanceID,Type,Bytes); -#endif - return status; -} - -BOOL EventEnabledGCPerHeapHistory_V3(void) {return EventPipeEventEnabledGCPerHeapHistory_V3();} - -ULONG FireEtwGCPerHeapHistory_V3( - const unsigned short ClrInstanceID, - void* FreeListAllocated, - void* FreeListRejected, - void* EndOfSegAllocated, - void* CondemnedAllocated, - void* PinnedAllocated, - void* PinnedAllocatedAdvance, - const unsigned int RunningFreeListEfficiency, - const unsigned int CondemnReasons0, - const unsigned int CondemnReasons1, - const unsigned int CompactMechanisms, - const unsigned int ExpandMechanisms, - const unsigned int HeapIndex, - void* ExtraGen0Commit, - const unsigned int Count, - int Values_ElementSize, - void* Values, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCPerHeapHistory_V3(ClrInstanceID,FreeListAllocated,FreeListRejected,EndOfSegAllocated,CondemnedAllocated,PinnedAllocated,PinnedAllocatedAdvance,RunningFreeListEfficiency,CondemnReasons0,CondemnReasons1,CompactMechanisms,ExpandMechanisms,HeapIndex,ExtraGen0Commit,Count,Values_ElementSize, Values,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXplatGCPerHeapHistory_V3(ClrInstanceID,FreeListAllocated,FreeListRejected,EndOfSegAllocated,CondemnedAllocated,PinnedAllocated,PinnedAllocatedAdvance,RunningFreeListEfficiency,CondemnReasons0,CondemnReasons1,CompactMechanisms,ExpandMechanisms,HeapIndex,ExtraGen0Commit,Count,Values_ElementSize, Values); -#endif - return status; -} - -BOOL EventEnabledGCTerminateConcurrentThread_V1(void) {return EventPipeEventEnabledGCTerminateConcurrentThread_V1();} - -ULONG FireEtwGCTerminateConcurrentThread_V1( - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCTerminateConcurrentThread_V1(ClrInstanceID,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXplatGCTerminateConcurrentThread_V1(ClrInstanceID); -#endif - return status; -} - -BOOL EventEnabledGCTriggered(void) {return EventPipeEventEnabledGCTriggered();} - -ULONG FireEtwGCTriggered( - const unsigned int Reason, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCTriggered(Reason,ClrInstanceID,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXplatGCTriggered(Reason,ClrInstanceID); -#endif - return status; -} - -BOOL EventEnabledModuleLoad_V2(void) {return EventPipeEventEnabledModuleLoad_V2();} - -ULONG FireEtwModuleLoad_V2( - const unsigned __int64 ModuleID, - const unsigned __int64 AssemblyID, - const unsigned int ModuleFlags, - const unsigned int Reserved1, - const WCHAR* ModuleILPath, - const WCHAR* ModuleNativePath, - const unsigned short ClrInstanceID, - const GUID* ManagedPdbSignature, - const unsigned int ManagedPdbAge, - const WCHAR* ManagedPdbBuildPath, - const GUID* NativePdbSignature, - const unsigned int NativePdbAge, - const WCHAR* NativePdbBuildPath, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventModuleLoad_V2(ModuleID,AssemblyID,ModuleFlags,Reserved1,ModuleILPath,ModuleNativePath,ClrInstanceID,ManagedPdbSignature,ManagedPdbAge,ManagedPdbBuildPath,NativePdbSignature,NativePdbAge,NativePdbBuildPath,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXplatModuleLoad_V2(ModuleID,AssemblyID,ModuleFlags,Reserved1,ModuleILPath,ModuleNativePath,ClrInstanceID,ManagedPdbSignature,ManagedPdbAge,ManagedPdbBuildPath,NativePdbSignature,NativePdbAge,NativePdbBuildPath); -#endif - return status; -} - -BOOL EventEnabledSetGCHandle(void) {return EventPipeEventEnabledSetGCHandle();} - -ULONG FireEtwSetGCHandle( - void* HandleID, - void* ObjectID, - const unsigned int Kind, - const unsigned int Generation, - const unsigned __int64 AppDomainID, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventSetGCHandle(HandleID,ObjectID,Kind,Generation,AppDomainID,ClrInstanceID,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXplatSetGCHandle(HandleID,ObjectID,Kind,Generation,AppDomainID,ClrInstanceID); -#endif - return status; -} - -BOOL EventEnabledGCStart_V2(void) {return EventPipeEventEnabledGCStart_V2();} - -ULONG FireEtwGCStart_V2( - const unsigned int Count, - const unsigned int Depth, - const unsigned int Reason, - const unsigned int Type, - const unsigned short ClrInstanceID, - const unsigned __int64 ClientSequenceNumber, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCStart_V2(Count,Depth,Reason,Type,ClrInstanceID,ClientSequenceNumber,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXplatGCStart_V2(Count,Depth,Reason,Type,ClrInstanceID,ClientSequenceNumber); -#endif - return status; -} - - -BOOL EventEnabledGCRestartEEEnd_V1(void) {return EventPipeEventEnabledGCRestartEEEnd_V1();} - -ULONG FireEtwGCRestartEEEnd_V1( - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCRestartEEEnd_V1(ClrInstanceID,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXplatGCRestartEEEnd_V1(ClrInstanceID); -#endif - return status; -} - -BOOL EventEnabledGCRestartEEBegin_V1(void) {return EventPipeEventEnabledGCRestartEEBegin_V1();} - -ULONG FireEtwGCRestartEEBegin_V1( - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCRestartEEBegin_V1(ClrInstanceID,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXplatGCRestartEEBegin_V1(ClrInstanceID); -#endif - return status; -} - -BOOL EventEnabledGCSuspendEEEnd_V1(void) {return EventPipeEventEnabledGCSuspendEEEnd_V1();} - -ULONG FireEtwGCSuspendEEEnd_V1( - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCSuspendEEEnd_V1(ClrInstanceID,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXPlatGCSuspendEEEnd_V1(ClrInstanceID); -#endif - return status; -} - -BOOL EventEnabledGCSuspendEEBegin_V1(void) {return EventPipeEventEnabledGCSuspendEEBegin_V1();} - -ULONG FireEtwGCSuspendEEBegin_V1( - const unsigned int Reason, - const unsigned int Count, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCSuspendEEBegin_V1(Reason,Count,ClrInstanceID,ActivityId,RelatedActivityId); -#ifndef TARGET_UNIX - status &= FireEtXplatGCSuspendEEBegin_V1(Reason,Count,ClrInstanceID); -#endif - return status; -} - -BOOL EventEnabledDecreaseMemoryPressure(void) {return EventPipeEventEnabledDecreaseMemoryPressure();} - -ULONG FireEtwDecreaseMemoryPressure( - const unsigned __int64 BytesFreed, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventDecreaseMemoryPressure(BytesFreed,ClrInstanceID,ActivityId,RelatedActivityId); - return status; -} - -BOOL EventEnabledFinalizeObject(void) {return EventPipeEventEnabledFinalizeObject();} - -ULONG FireEtwFinalizeObject( - const void* TypeID, - const void* ObjectID, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventFinalizeObject(TypeID,ObjectID,ClrInstanceID,ActivityId,RelatedActivityId); - return status; -} - -BOOL EventEnabledGCFinalizersBegin_V1(void) {return EventPipeEventEnabledGCFinalizersBegin_V1();} - -ULONG FireEtwGCFinalizersBegin_V1( - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCFinalizersBegin_V1(ClrInstanceID,ActivityId,RelatedActivityId); - return status; -} - -BOOL EventEnabledGCFinalizersEnd_V1(void) {return EventPipeEventEnabledGCFinalizersEnd_V1();} - -ULONG FireEtwGCFinalizersEnd_V1( - const unsigned int Count, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCFinalizersEnd_V1(Count,ClrInstanceID,ActivityId,RelatedActivityId); - return status; -} - -BOOL EventEnabledContentionStart_V2(void) {return EventPipeEventEnabledContentionStart_V2();} - -ULONG FireEtwContentionStart_V2( - const unsigned char ContentionFlags, - const unsigned short ClrInstanceID, - const void* LockID, - const void* AssociatedObjectID, - const unsigned __int64 LockOwnerThreadID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventContentionStart_V2(ContentionFlags,ClrInstanceID,LockID,AssociatedObjectID,LockOwnerThreadID,ActivityId,RelatedActivityId); - return status; -} - -BOOL EventEnabledContentionStop_V1(void) {return EventPipeEventEnabledContentionStop_V1();} - -ULONG FireEtwContentionStop_V1( - const unsigned char ContentionFlags, - const unsigned short ClrInstanceID, - const double DurationNs, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventContentionStop_V1(ContentionFlags,ClrInstanceID,DurationNs,ActivityId,RelatedActivityId); - return status; -} - -BOOL EventEnabledContentionLockCreated(void) {return EventPipeEventEnabledContentionLockCreated();} - -ULONG FireEtwContentionLockCreated( - const void* LockID, - const void* AssociatedObjectID, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventContentionLockCreated(LockID,AssociatedObjectID,ClrInstanceID,ActivityId,RelatedActivityId); - return status; -} - -BOOL EventEnabledThreadPoolWorkerThreadStart(void) {return EventPipeEventEnabledThreadPoolWorkerThreadStart();} - -uint32_t FireEtwThreadPoolWorkerThreadStart( - const unsigned int ActiveWorkerThreadCount, - const unsigned int RetiredWorkerThreadCount, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - uint32_t status = EventPipeWriteEventThreadPoolWorkerThreadStart(ActiveWorkerThreadCount,RetiredWorkerThreadCount,ClrInstanceID,ActivityId,RelatedActivityId); - return status; -} - -uint32_t FireEtwThreadPoolWorkerThreadStop( - const unsigned int ActiveWorkerThreadCount, - const unsigned int RetiredWorkerThreadCount, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - uint32_t status = EventPipeWriteEventThreadPoolWorkerThreadStop(ActiveWorkerThreadCount,RetiredWorkerThreadCount,ClrInstanceID,ActivityId,RelatedActivityId); - return status; -} - -uint32_t FireEtwThreadPoolWorkerThreadWait( - const unsigned int ActiveWorkerThreadCount, - const unsigned int RetiredWorkerThreadCount, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - uint32_t status = EventPipeWriteEventThreadPoolWorkerThreadWait(ActiveWorkerThreadCount,RetiredWorkerThreadCount,ClrInstanceID,ActivityId,RelatedActivityId); - return status; -} - -BOOL EventEnabledThreadPoolMinMaxThreads(void) {return EventPipeEventEnabledThreadPoolMinMaxThreads();} - -uint32_t FireEtwThreadPoolMinMaxThreads( - const unsigned short MinWorkerThreads, - const unsigned short MaxWorkerThreads, - const unsigned short MinIOCompletionThreads, - const unsigned short MaxIOCompletionThreads, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - uint32_t status = EventPipeWriteEventThreadPoolMinMaxThreads(MinWorkerThreads,MaxWorkerThreads,MinIOCompletionThreads,MaxIOCompletionThreads,ClrInstanceID,ActivityId,RelatedActivityId); - return status; -} - -BOOL EventEnabledThreadPoolWorkerThreadAdjustmentSample(void) {return EventPipeEventEnabledThreadPoolWorkerThreadAdjustmentSample();} - -uint32_t FireEtwThreadPoolWorkerThreadAdjustmentSample( - const double Throughput, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - uint32_t status = EventPipeWriteEventThreadPoolWorkerThreadAdjustmentSample(Throughput,ClrInstanceID,ActivityId,RelatedActivityId); - return status; -} - -BOOL EventEnabledThreadPoolWorkerThreadAdjustmentAdjustment(void) {return EventPipeEventEnabledThreadPoolWorkerThreadAdjustmentAdjustment();} - -uint32_t FireEtwThreadPoolWorkerThreadAdjustmentAdjustment( - const double AverageThroughput, - const unsigned int NewWorkerThreadCount, - const unsigned int Reason, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - uint32_t status = EventPipeWriteEventThreadPoolWorkerThreadAdjustmentAdjustment(AverageThroughput,NewWorkerThreadCount,Reason,ClrInstanceID,ActivityId,RelatedActivityId); - return status; -} - -BOOL EventEnabledThreadPoolWorkerThreadAdjustmentStats(void) {return EventPipeEventEnabledThreadPoolWorkerThreadAdjustmentStats();} - -uint32_t FireEtwThreadPoolWorkerThreadAdjustmentStats( - const double Duration, - const double Throughput, - const double ThreadWave, - const double ThroughputWave, - const double ThroughputErrorEstimate, - const double AverageThroughputErrorEstimate, - const double ThroughputRatio, - const double Confidence, - const double NewControlSetting, - const unsigned short NewThreadWaveMagnitude, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - uint32_t status = EventPipeWriteEventThreadPoolWorkerThreadAdjustmentStats(Duration,Throughput,ThreadWave,ThroughputWave,ThroughputErrorEstimate,AverageThroughputErrorEstimate,ThroughputRatio,Confidence,NewControlSetting,NewThreadWaveMagnitude,ClrInstanceID,ActivityId,RelatedActivityId); - return status; -} - -BOOL EventEnabledThreadPoolIOEnqueue(void) {return EventPipeEventEnabledThreadPoolIOEnqueue();} - -uint32_t FireEtwThreadPoolIOEnqueue( - const void* NativeOverlapped, - const void* Overlapped, - const BOOL MultiDequeues, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - uint32_t status = EventPipeWriteEventThreadPoolIOEnqueue(NativeOverlapped,Overlapped,MultiDequeues,ClrInstanceID,ActivityId,RelatedActivityId); - return status; -} - -BOOL EventEnabledThreadPoolIODequeue(void) {return EventPipeEventEnabledThreadPoolIODequeue();} - -uint32_t FireEtwThreadPoolIODequeue( - const void* NativeOverlapped, - const void* Overlapped, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - uint32_t status = EventPipeWriteEventThreadPoolIODequeue(NativeOverlapped,Overlapped,ClrInstanceID,ActivityId,RelatedActivityId); - return status; -} - -BOOL EventEnabledThreadPoolWorkingThreadCount(void) {return EventPipeEventEnabledThreadPoolWorkingThreadCount();} - -uint32_t FireEtwThreadPoolWorkingThreadCount( - const unsigned int Count, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - uint32_t status = EventPipeWriteEventThreadPoolWorkingThreadCount(Count,ClrInstanceID,ActivityId,RelatedActivityId); - return status; -} - -BOOL EventEnabledThreadPoolIOPack(void) {return EventPipeEventEnabledThreadPoolIOPack();} - -uint32_t FireEtwThreadPoolIOPack( - const void* NativeOverlapped, - const void* Overlapped, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - uint32_t status = EventPipeWriteEventThreadPoolIOPack(NativeOverlapped,Overlapped,ClrInstanceID,ActivityId,RelatedActivityId); - return status; -} - -BOOL EventEnabledGCAllocationTick_V4(void) {return EventPipeEventEnabledGCAllocationTick_V4();} - -ULONG FireEtwGCAllocationTick_V4( - const unsigned int AllocationAmount, - const unsigned int AllocationKind, - const unsigned short ClrInstanceID, - const unsigned __int64 AllocationAmount64, - const void* TypeID, - const WCHAR* TypeName, - const unsigned int HeapIndex, - const void* Address, - const unsigned __int64 ObjectSize, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCAllocationTick_V4(AllocationAmount,AllocationKind,ClrInstanceID,AllocationAmount64,TypeID,TypeName,HeapIndex,Address,ObjectSize,ActivityId,RelatedActivityId); - return status; -} - -BOOL EventEnabledGCHeapStats_V2(void) {return EventPipeEventEnabledGCHeapStats_V2();} - -ULONG FireEtwGCHeapStats_V2( - const unsigned __int64 GenerationSize0, - const unsigned __int64 TotalPromotedSize0, - const unsigned __int64 GenerationSize1, - const unsigned __int64 TotalPromotedSize1, - const unsigned __int64 GenerationSize2, - const unsigned __int64 TotalPromotedSize2, - const unsigned __int64 GenerationSize3, - const unsigned __int64 TotalPromotedSize3, - const unsigned __int64 FinalizationPromotedSize, - const unsigned __int64 FinalizationPromotedCount, - const unsigned int PinnedObjectCount, - const unsigned int SinkBlockCount, - const unsigned int GCHandleCount, - const unsigned short ClrInstanceID, - const unsigned __int64 GenerationSize4, - const unsigned __int64 TotalPromotedSize4, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCHeapStats_V2(GenerationSize0,TotalPromotedSize0,GenerationSize1,TotalPromotedSize1,GenerationSize2,TotalPromotedSize2,GenerationSize3,TotalPromotedSize3,FinalizationPromotedSize,FinalizationPromotedCount,PinnedObjectCount,SinkBlockCount,GCHandleCount,ClrInstanceID,GenerationSize4,TotalPromotedSize4,ActivityId,RelatedActivityId); - return status; -} - -BOOL EventEnabledGCSampledObjectAllocationHigh(void) {return EventPipeEventEnabledGCSampledObjectAllocationHigh();} - -ULONG FireEtwGCSampledObjectAllocationHigh( - const void* Address, - const void* TypeID, - const unsigned int ObjectCountForTypeSample, - const unsigned __int64 TotalSizeForTypeSample, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCSampledObjectAllocationHigh(Address,TypeID,ObjectCountForTypeSample,TotalSizeForTypeSample,ClrInstanceID,ActivityId,RelatedActivityId); - return status; -} - -BOOL EventEnabledGCSampledObjectAllocationLow(void) {return EventPipeEventEnabledGCSampledObjectAllocationLow();} - -ULONG FireEtwGCSampledObjectAllocationLow( - const void* Address, - const void* TypeID, - const unsigned int ObjectCountForTypeSample, - const unsigned __int64 TotalSizeForTypeSample, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCSampledObjectAllocationLow(Address,TypeID,ObjectCountForTypeSample,TotalSizeForTypeSample,ClrInstanceID,ActivityId,RelatedActivityId); - return status; -} - -BOOL EventEnabledPinObjectAtGCTime(void) {return EventPipeEventEnabledPinObjectAtGCTime();} - -ULONG FireEtwPinObjectAtGCTime( - const void* HandleID, - const void* ObjectID, - const unsigned __int64 ObjectSize, - const WCHAR* TypeName, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventPinObjectAtGCTime(HandleID,ObjectID,ObjectSize,TypeName,ClrInstanceID,ActivityId,RelatedActivityId); - return status; -} - -BOOL EventEnabledGCBulkRootStaticVar(void) {return EventPipeEventEnabledGCBulkRootStaticVar();} - -ULONG FireEtwGCBulkRootStaticVar( - const unsigned int Count, - const unsigned __int64 AppDomainID, - const unsigned short ClrInstanceID, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCBulkRootStaticVar(Count,AppDomainID,ClrInstanceID,Values_ElementSize, Values,ActivityId,RelatedActivityId); - return status; -} - -BOOL EventEnabledIncreaseMemoryPressure(void) {return EventPipeEventEnabledIncreaseMemoryPressure();} - -ULONG FireEtwIncreaseMemoryPressure( - const unsigned __int64 BytesAllocated, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventIncreaseMemoryPressure(BytesAllocated,ClrInstanceID,ActivityId,RelatedActivityId); - return status; -} - -BOOL EventEnabledGCGlobalHeapHistory_V4(void) {return EventPipeEventEnabledGCGlobalHeapHistory_V4();} - -ULONG FireEtwGCGlobalHeapHistory_V4( - const unsigned __int64 FinalYoungestDesired, - const signed int NumHeaps, - const unsigned int CondemnedGeneration, - const unsigned int Gen0ReductionCount, - const unsigned int Reason, - const unsigned int GlobalMechanisms, - const unsigned short ClrInstanceID, - const unsigned int PauseMode, - const unsigned int MemoryPressure, - const unsigned int CondemnReasons0, - const unsigned int CondemnReasons1, - const unsigned int Count, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCGlobalHeapHistory_V4(FinalYoungestDesired,NumHeaps,CondemnedGeneration,Gen0ReductionCount,Reason,GlobalMechanisms,ClrInstanceID,PauseMode,MemoryPressure,CondemnReasons0,CondemnReasons1,Count,Values_ElementSize, Values,ActivityId,RelatedActivityId); - return status; -} - -BOOL EventEnabledGenAwareBegin(void) {return EventPipeEventEnabledGenAwareBegin();} - -ULONG FireEtwGenAwareBegin( - const unsigned int Count, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGenAwareBegin(Count,ClrInstanceID,ActivityId,RelatedActivityId); - return status; -} - -BOOL EventEnabledGenAwareEnd(void) {return EventPipeEventEnabledGenAwareEnd();} - -ULONG FireEtwGenAwareEnd( - const unsigned int Count, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGenAwareEnd(Count,ClrInstanceID,ActivityId,RelatedActivityId); - return status; -} - -BOOL EventEnabledGCLOHCompact(void) {return EventPipeEventEnabledGCLOHCompact();} - -ULONG FireEtwGCLOHCompact( - const unsigned short ClrInstanceID, - const unsigned short Count, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCLOHCompact(ClrInstanceID,Count,Values_ElementSize, Values,ActivityId,RelatedActivityId); - return status; -} - -BOOL EventEnabledGCFitBucketInfo(void) {return EventPipeEventEnabledGCFitBucketInfo();} - -ULONG FireEtwGCFitBucketInfo( - const unsigned short ClrInstanceID, - const unsigned short BucketKind, - const unsigned __int64 TotalSize, - const unsigned short Count, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId, - const GUID * RelatedActivityId -) -{ - ULONG status = EventPipeWriteEventGCFitBucketInfo(ClrInstanceID,BucketKind,TotalSize,Count,Values_ElementSize, Values,ActivityId,RelatedActivityId); - return status; -} - -#ifdef FEATURE_ETW - -// ================================================================== -// Events currently only fired via ETW (private runtime provider) -// ================================================================== - -ULONG FireEtwGCSettings( - const unsigned __int64 SegmentSize, - const unsigned __int64 LargeObjectSegmentSize, - const BOOL ServerGC, - const GUID* ActivityId, - const GUID* RelatedActivityId -) -{ - return FireEtXplatGCSettings(SegmentSize,LargeObjectSegmentSize,ServerGC); -} - -ULONG FireEtwPinPlugAtGCTime( - const void* PlugStart, - const void* PlugEnd, - const void* GapBeforeSize, - const unsigned short ClrInstanceID, - const GUID* ActivityId, - const GUID* RelatedActivityId -) -{ - return FireEtXplatPinPlugAtGCTime(PlugStart,PlugEnd,GapBeforeSize,ClrInstanceID); -} - -ULONG FireEtwBGCBegin( - const unsigned short ClrInstanceID, - const GUID* ActivityId, - const GUID* RelatedActivityId -) -{ - return FireEtXplatBGCBegin(ClrInstanceID); -} - -ULONG FireEtwBGC1stNonConEnd( - const unsigned short ClrInstanceID, - const GUID* ActivityId, - const GUID* RelatedActivityId -) -{ - return FireEtXplatBGC1stNonConEnd(ClrInstanceID); -} - -ULONG FireEtwBGC1stConEnd( - const unsigned short ClrInstanceID, - const GUID* ActivityId, - const GUID* RelatedActivityId -) -{ - return FireEtXplatBGC1stConEnd(ClrInstanceID); -} - -ULONG FireEtwBGC2ndNonConBegin( - const unsigned short ClrInstanceID, - const GUID* ActivityId, - const GUID* RelatedActivityId -) -{ - return FireEtXplatBGC2ndNonConBegin(ClrInstanceID); -} - -ULONG FireEtwBGC2ndNonConEnd( - const unsigned short ClrInstanceID, - const GUID* ActivityId, - const GUID* RelatedActivityId -) -{ - return FireEtXplatBGC2ndNonConEnd(ClrInstanceID); -} - -ULONG FireEtwBGC2ndConBegin( - const unsigned short ClrInstanceID, - const GUID* ActivityId, - const GUID* RelatedActivityId -) -{ - return FireEtXplatBGC2ndConBegin(ClrInstanceID); -} - -ULONG FireEtwBGC2ndConEnd( - const unsigned short ClrInstanceID, - const GUID* ActivityId, - const GUID* RelatedActivityId -) -{ - return FireEtXplatBGC2ndConEnd(ClrInstanceID); -} - -ULONG FireEtwBGCDrainMark( - const unsigned __int64 Objects, - const unsigned short ClrInstanceID, - const GUID* ActivityId, - const GUID* RelatedActivityId -) -{ - return FireEtXplatBGCDrainMark(Objects,ClrInstanceID); -} - -ULONG FireEtwBGCRevisit( - const unsigned __int64 Pages, - const unsigned __int64 Objects, - const unsigned int IsLarge, - const unsigned short ClrInstanceID, - const GUID* ActivityId, - const GUID* RelatedActivityId -) -{ - return FireEtXplatBGCRevisit(Pages,Objects,IsLarge,ClrInstanceID); -} - -ULONG FireEtwBGCOverflow( - const unsigned __int64 Min, - const unsigned __int64 Max, - const unsigned __int64 Objects, - const unsigned int IsLarge, - const unsigned short ClrInstanceID, - const GUID* ActivityId, - const GUID* RelatedActivityId -) -{ - return FireEtXplatBGCOverflow(Min,Max,Objects,IsLarge,ClrInstanceID); -} - -ULONG FireEtwBGCAllocWaitBegin( - const unsigned int Reason, - const unsigned short ClrInstanceID, - const GUID* ActivityId, - const GUID* RelatedActivityId -) -{ - return FireEtXplatBGCAllocWaitBegin(Reason,ClrInstanceID); -} - -ULONG FireEtwBGCAllocWaitEnd( - const unsigned int Reason, - const unsigned short ClrInstanceID, - const GUID* ActivityId, - const GUID* RelatedActivityId -) -{ - return FireEtXplatBGCAllocWaitEnd(Reason,ClrInstanceID); -} - -ULONG FireEtwGCFullNotify_V1( - const unsigned int GenNumber, - const unsigned int IsAlloc, - const unsigned short ClrInstanceID, - const GUID* ActivityId, - const GUID* RelatedActivityId -) -{ - return FireEtXplatGCFullNotify_V1(GenNumber,IsAlloc,ClrInstanceID); -} - -ULONG FireEtwPrvSetGCHandle( - const void* HandleID, - const void* ObjectID, - const unsigned int Kind, - const unsigned int Generation, - const unsigned __int64 AppDomainID, - const unsigned short ClrInstanceID, - const GUID* ActivityId, - const GUID* RelatedActivityId -) -{ - return FireEtXplatPrvSetGCHandle(HandleID,ObjectID,Kind,Generation,AppDomainID,ClrInstanceID); -} - -ULONG FireEtwPrvDestroyGCHandle( - const void* HandleID, - const unsigned short ClrInstanceID, - const GUID* ActivityId, - const GUID* RelatedActivityId -) -{ - return FireEtXplatPrvDestroyGCHandle(HandleID,ClrInstanceID); -} - -#endif // FEATURE_ETW diff --git a/src/coreclr/nativeaot/Runtime/eventpipe/disabledclretwallmain.cpp b/src/coreclr/nativeaot/Runtime/eventpipe/disabledclretwallmain.cpp deleted file mode 100644 index b99853641cefc4..00000000000000 --- a/src/coreclr/nativeaot/Runtime/eventpipe/disabledclretwallmain.cpp +++ /dev/null @@ -1,877 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -// shipping criteria: no EVENTPIPE-NATIVEAOT-TODO left in the codebase -// @TODO: Use genEventing.py to generate this file. Update script to handle -// nativeaot runtime and allow generating separate declaration and -// implementation files - -#include -#include - -#ifndef ERROR_SUCCESS -#define ERROR_SUCCESS 0L -#endif - -BOOL EventEnabledDestroyGCHandle(void) { return 0; } -ULONG FireEtwDestroyGCHandle( - void* HandleID, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledExceptionThrown_V1(void) { return 0; } -ULONG FireEtwExceptionThrown_V1( - const WCHAR* ExceptionType, - const WCHAR* ExceptionMessage, - void* ExceptionEIP, - const unsigned int ExceptionHRESULT, - const unsigned short ExceptionFlags, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCBulkEdge(void) { return 0; } -ULONG FireEtwGCBulkEdge( - const unsigned int Index, - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCBulkMovedObjectRanges(void) { return 0; } -ULONG FireEtwGCBulkMovedObjectRanges( - const unsigned int Index, - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCBulkNode(void) { return 0; } -ULONG FireEtwGCBulkNode( - const unsigned int Index, - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCBulkRCW(void) { return 0; } -ULONG FireEtwGCBulkRCW( - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCBulkRootCCW(void) { return 0; } -ULONG FireEtwGCBulkRootCCW( - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCBulkRootConditionalWeakTableElementEdge(void) { return 0; } -ULONG FireEtwGCBulkRootConditionalWeakTableElementEdge( - const unsigned int Index, - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCBulkRootEdge(void) { return 0; } -ULONG FireEtwGCBulkRootEdge( - const unsigned int Index, - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCBulkSurvivingObjectRanges(void) { return 0; } -ULONG FireEtwGCBulkSurvivingObjectRanges( - const unsigned int Index, - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCCreateConcurrentThread_V1(void) { return 0; } -ULONG FireEtwGCCreateConcurrentThread_V1( - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCCreateSegment_V1(void) { return 0; } -ULONG FireEtwGCCreateSegment_V1( - const unsigned __int64 Address, - const unsigned __int64 Size, - const unsigned int Type, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCEnd_V1(void) { return 0; } -ULONG FireEtwGCEnd_V1( - const unsigned int Count, - const unsigned int Depth, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCFreeSegment_V1(void) { return 0; } -ULONG FireEtwGCFreeSegment_V1( - const unsigned __int64 Address, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCGenerationRange(void) { return 0; } -ULONG FireEtwGCGenerationRange( - const unsigned char Generation, - void* RangeStart, - const unsigned __int64 RangeUsedLength, - const unsigned __int64 RangeReservedLength, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCHeapStats_V1(void) { return 0; } -ULONG FireEtwGCHeapStats_V1( - const unsigned __int64 GenerationSize0, - const unsigned __int64 TotalPromotedSize0, - const unsigned __int64 GenerationSize1, - const unsigned __int64 TotalPromotedSize1, - const unsigned __int64 GenerationSize2, - const unsigned __int64 TotalPromotedSize2, - const unsigned __int64 GenerationSize3, - const unsigned __int64 TotalPromotedSize3, - const unsigned __int64 FinalizationPromotedSize, - const unsigned __int64 FinalizationPromotedCount, - const unsigned int PinnedObjectCount, - const unsigned int SinkBlockCount, - const unsigned int GCHandleCount, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCJoin_V2(void) { return 0; } -ULONG FireEtwGCJoin_V2( - const unsigned int Heap, - const unsigned int JoinTime, - const unsigned int JoinType, - const unsigned short ClrInstanceID, - const unsigned int JoinID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCMarkFinalizeQueueRoots(void) { return 0; } -ULONG FireEtwGCMarkFinalizeQueueRoots( - const unsigned int HeapNum, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCMarkHandles(void) { return 0; } -ULONG FireEtwGCMarkHandles( - const unsigned int HeapNum, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCMarkOlderGenerationRoots(void) { return 0; } -ULONG FireEtwGCMarkOlderGenerationRoots( - const unsigned int HeapNum, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCMarkStackRoots(void) { return 0; } -ULONG FireEtwGCMarkStackRoots( - const unsigned int HeapNum, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCMarkWithType(void) { return 0; } -ULONG FireEtwGCMarkWithType( - const unsigned int HeapNum, - const unsigned short ClrInstanceID, - const unsigned int Type, - const unsigned __int64 Bytes, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCPerHeapHistory_V3(void) { return 0; } -ULONG FireEtwGCPerHeapHistory_V3( - const unsigned short ClrInstanceID, - void* FreeListAllocated, - void* FreeListRejected, - void* EndOfSegAllocated, - void* CondemnedAllocated, - void* PinnedAllocated, - void* PinnedAllocatedAdvance, - const unsigned int RunningFreeListEfficiency, - const unsigned int CondemnReasons0, - const unsigned int CondemnReasons1, - const unsigned int CompactMechanisms, - const unsigned int ExpandMechanisms, - const unsigned int HeapIndex, - void* ExtraGen0Commit, - const unsigned int Count, - int Values_ElementSize, - void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCTerminateConcurrentThread_V1(void) { return 0; } -ULONG FireEtwGCTerminateConcurrentThread_V1( - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCTriggered(void) { return 0; } -ULONG FireEtwGCTriggered( - const unsigned int Reason, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledModuleLoad_V2(void) { return 0; } -ULONG FireEtwModuleLoad_V2( - const unsigned __int64 ModuleID, - const unsigned __int64 AssemblyID, - const unsigned int ModuleFlags, - const unsigned int Reserved1, - const WCHAR* ModuleILPath, - const WCHAR* ModuleNativePath, - const unsigned short ClrInstanceID, - const GUID* ManagedPdbSignature, - const unsigned int ManagedPdbAge, - const WCHAR* ManagedPdbBuildPath, - const GUID* NativePdbSignature, - const unsigned int NativePdbAge, - const WCHAR* NativePdbBuildPath, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledSetGCHandle(void) { return 0; } -ULONG FireEtwSetGCHandle( - void* HandleID, - void* ObjectID, - const unsigned int Kind, - const unsigned int Generation, - const unsigned __int64 AppDomainID, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCStart_V2(void) { return 0; } -ULONG FireEtwGCStart_V2( - const unsigned int Count, - const unsigned int Depth, - const unsigned int Reason, - const unsigned int Type, - const unsigned short ClrInstanceID, - const unsigned __int64 ClientSequenceNumber, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - - -BOOL EventEnabledGCRestartEEEnd_V1(void) { return 0; } -ULONG FireEtwGCRestartEEEnd_V1( - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCRestartEEBegin_V1(void) { return 0; } -ULONG FireEtwGCRestartEEBegin_V1( - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCSuspendEEEnd_V1(void) { return 0; } -ULONG FireEtwGCSuspendEEEnd_V1( - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCSuspendEEBegin_V1(void) { return 0; } -ULONG FireEtwGCSuspendEEBegin_V1( - const unsigned int Reason, - const unsigned int Count, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledDecreaseMemoryPressure(void) { return 0; } -ULONG FireEtwDecreaseMemoryPressure( - const unsigned __int64 BytesFreed, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledFinalizeObject(void) { return 0; } -ULONG FireEtwFinalizeObject( - const void* TypeID, - const void* ObjectID, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCFinalizersBegin_V1(void) { return 0; } -ULONG FireEtwGCFinalizersBegin_V1( - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCFinalizersEnd_V1(void) { return 0; } -ULONG FireEtwGCFinalizersEnd_V1( - const unsigned int Count, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledContentionStart_V2(void) { return 0; } -ULONG FireEtwContentionStart_V2( - const unsigned char ContentionFlags, - const unsigned short ClrInstanceID, - const void* LockID, - const void* AssociatedObjectID, - const unsigned __int64 LockOwnerThreadID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledContentionStop_V1(void) { return 0; } -ULONG FireEtwContentionStop_V1( - const unsigned char ContentionFlags, - const unsigned short ClrInstanceID, - const double DurationNs, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledContentionLockCreated(void) { return 0; } -ULONG FireEtwContentionLockCreated( - const void* LockID, - const void* AssociatedObjectID, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledThreadPoolWorkerThreadStart(void) { return 0; } -uint32_t FireEtwThreadPoolWorkerThreadStart( - const unsigned int ActiveWorkerThreadCount, - const unsigned int RetiredWorkerThreadCount, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -uint32_t FireEtwThreadPoolWorkerThreadStop( - const unsigned int ActiveWorkerThreadCount, - const unsigned int RetiredWorkerThreadCount, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -uint32_t FireEtwThreadPoolWorkerThreadWait( - const unsigned int ActiveWorkerThreadCount, - const unsigned int RetiredWorkerThreadCount, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledThreadPoolMinMaxThreads(void) { return 0; } -uint32_t FireEtwThreadPoolMinMaxThreads( - const unsigned short MinWorkerThreads, - const unsigned short MaxWorkerThreads, - const unsigned short MinIOCompletionThreads, - const unsigned short MaxIOCompletionThreads, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledThreadPoolWorkerThreadAdjustmentSample(void) { return 0; } -uint32_t FireEtwThreadPoolWorkerThreadAdjustmentSample( - const double Throughput, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledThreadPoolWorkerThreadAdjustmentAdjustment(void) { return 0; } -uint32_t FireEtwThreadPoolWorkerThreadAdjustmentAdjustment( - const double AverageThroughput, - const unsigned int NewWorkerThreadCount, - const unsigned int Reason, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledThreadPoolWorkerThreadAdjustmentStats(void) { return 0; } -uint32_t FireEtwThreadPoolWorkerThreadAdjustmentStats( - const double Duration, - const double Throughput, - const double ThreadWave, - const double ThroughputWave, - const double ThroughputErrorEstimate, - const double AverageThroughputErrorEstimate, - const double ThroughputRatio, - const double Confidence, - const double NewControlSetting, - const unsigned short NewThreadWaveMagnitude, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledThreadPoolIOEnqueue(void) { return 0; } -uint32_t FireEtwThreadPoolIOEnqueue( - const void* NativeOverlapped, - const void* Overlapped, - const BOOL MultiDequeues, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledThreadPoolIODequeue(void) { return 0; } -uint32_t FireEtwThreadPoolIODequeue( - const void* NativeOverlapped, - const void* Overlapped, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledThreadPoolWorkingThreadCount(void) { return 0; } -uint32_t FireEtwThreadPoolWorkingThreadCount( - const unsigned int Count, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledThreadPoolIOPack(void) { return 0; } -uint32_t FireEtwThreadPoolIOPack( - const void* NativeOverlapped, - const void* Overlapped, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCAllocationTick_V4(void) { return 0; } -ULONG FireEtwGCAllocationTick_V4( - const unsigned int AllocationAmount, - const unsigned int AllocationKind, - const unsigned short ClrInstanceID, - const unsigned __int64 AllocationAmount64, - const void* TypeID, - const WCHAR* TypeName, - const unsigned int HeapIndex, - const void* Address, - const unsigned __int64 ObjectSize, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCHeapStats_V2(void) { return 0; } -ULONG FireEtwGCHeapStats_V2( - const unsigned __int64 GenerationSize0, - const unsigned __int64 TotalPromotedSize0, - const unsigned __int64 GenerationSize1, - const unsigned __int64 TotalPromotedSize1, - const unsigned __int64 GenerationSize2, - const unsigned __int64 TotalPromotedSize2, - const unsigned __int64 GenerationSize3, - const unsigned __int64 TotalPromotedSize3, - const unsigned __int64 FinalizationPromotedSize, - const unsigned __int64 FinalizationPromotedCount, - const unsigned int PinnedObjectCount, - const unsigned int SinkBlockCount, - const unsigned int GCHandleCount, - const unsigned short ClrInstanceID, - const unsigned __int64 GenerationSize4, - const unsigned __int64 TotalPromotedSize4, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCSampledObjectAllocationHigh(void) { return 0; } -ULONG FireEtwGCSampledObjectAllocationHigh( - const void* Address, - const void* TypeID, - const unsigned int ObjectCountForTypeSample, - const unsigned __int64 TotalSizeForTypeSample, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCSampledObjectAllocationLow(void) { return 0; } -ULONG FireEtwGCSampledObjectAllocationLow( - const void* Address, - const void* TypeID, - const unsigned int ObjectCountForTypeSample, - const unsigned __int64 TotalSizeForTypeSample, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledPinObjectAtGCTime(void) { return 0; } -ULONG FireEtwPinObjectAtGCTime( - const void* HandleID, - const void* ObjectID, - const unsigned __int64 ObjectSize, - const WCHAR* TypeName, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCBulkRootStaticVar(void) { return 0; } -ULONG FireEtwGCBulkRootStaticVar( - const unsigned int Count, - const unsigned __int64 AppDomainID, - const unsigned short ClrInstanceID, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledIncreaseMemoryPressure(void) { return 0; } -ULONG FireEtwIncreaseMemoryPressure( - const unsigned __int64 BytesAllocated, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCGlobalHeapHistory_V4(void) { return 0; } -ULONG FireEtwGCGlobalHeapHistory_V4( - const unsigned __int64 FinalYoungestDesired, - const signed int NumHeaps, - const unsigned int CondemnedGeneration, - const unsigned int Gen0ReductionCount, - const unsigned int Reason, - const unsigned int GlobalMechanisms, - const unsigned short ClrInstanceID, - const unsigned int PauseMode, - const unsigned int MemoryPressure, - const unsigned int CondemnReasons0, - const unsigned int CondemnReasons1, - const unsigned int Count, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGenAwareBegin(void) { return 0; } -ULONG FireEtwGenAwareBegin( - const unsigned int Count, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGenAwareEnd(void) { return 0; } -ULONG FireEtwGenAwareEnd( - const unsigned int Count, - const unsigned short ClrInstanceID, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCLOHCompact(void) { return 0; } -ULONG FireEtwGCLOHCompact( - const unsigned short ClrInstanceID, - const unsigned short Count, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -BOOL EventEnabledGCFitBucketInfo(void) { return 0; } -ULONG FireEtwGCFitBucketInfo( - const unsigned short ClrInstanceID, - const unsigned short BucketKind, - const unsigned __int64 TotalSize, - const unsigned short Count, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId = nullptr, - const GUID * RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -#ifdef FEATURE_ETW - -// ================================================================== -// Events currently only fired via ETW (private runtime provider) -// ================================================================== - -ULONG FireEtwGCSettings( - const unsigned __int64 SegmentSize, - const unsigned __int64 LargeObjectSegmentSize, - const BOOL ServerGC, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -ULONG FireEtwPinPlugAtGCTime( - const void* PlugStart, - const void* PlugEnd, - const void* GapBeforeSize, - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -ULONG FireEtwBGCBegin( - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -ULONG FireEtwBGC1stNonConEnd( - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -ULONG FireEtwBGC1stConEnd( - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -ULONG FireEtwBGC2ndNonConBegin( - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -ULONG FireEtwBGC2ndNonConEnd( - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -ULONG FireEtwBGC2ndConBegin( - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -ULONG FireEtwBGC2ndConEnd( - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -ULONG FireEtwBGCDrainMark( - const unsigned __int64 Objects, - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -ULONG FireEtwBGCRevisit( - const unsigned __int64 Pages, - const unsigned __int64 Objects, - const unsigned int IsLarge, - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -ULONG FireEtwBGCOverflow( - const unsigned __int64 Min, - const unsigned __int64 Max, - const unsigned __int64 Objects, - const unsigned int IsLarge, - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -ULONG FireEtwBGCAllocWaitBegin( - const unsigned int Reason, - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -ULONG FireEtwBGCAllocWaitEnd( - const unsigned int Reason, - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -ULONG FireEtwGCFullNotify_V1( - const unsigned int GenNumber, - const unsigned int IsAlloc, - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -ULONG FireEtwPrvSetGCHandle( - const void* HandleID, - const void* ObjectID, - const unsigned int Kind, - const unsigned int Generation, - const unsigned __int64 AppDomainID, - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -ULONG FireEtwPrvDestroyGCHandle( - const void* HandleID, - const unsigned short ClrInstanceID, - const GUID* ActivityId = nullptr, - const GUID* RelatedActivityId = nullptr -) -{ return ERROR_SUCCESS; } - -#endif // FEATURE_ETW \ No newline at end of file diff --git a/src/coreclr/nativeaot/Runtime/eventpipe/dotnetruntime.cpp b/src/coreclr/nativeaot/Runtime/eventpipe/dotnetruntime.cpp deleted file mode 100644 index 95560af0fac9a7..00000000000000 --- a/src/coreclr/nativeaot/Runtime/eventpipe/dotnetruntime.cpp +++ /dev/null @@ -1,3027 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -// Work In Progress to add native events to EventPipe -// shipping criteria: no EVENTPIPE-NATIVEAOT-TODO left in the codebase -// @TODO: Audit native events in NativeAOT Runtime - -#include -#include - -#include -#include -#include - -#ifndef ERROR_WRITE_FAULT -#define ERROR_WRITE_FAULT 29L -#endif - -#ifndef ERROR_SUCCESS -#define ERROR_SUCCESS 0 -#endif - -bool ResizeBuffer(uint8_t *&buffer, size_t& size, size_t currLen, size_t newSize, bool &fixedBuffer); - -void InitProvidersAndEvents(void); -void InitDotNETRuntime(void); - -bool WriteToBuffer(const BYTE *src, size_t len, BYTE *&buffer, size_t& offset, size_t& size, bool &fixedBuffer); - - -template -bool WriteToBuffer(const T &value, BYTE *&buffer, size_t& offset, size_t& size, bool &fixedBuffer) -{ - if (sizeof(T) + offset > size) - { - if (!ResizeBuffer(buffer, size, offset, size + sizeof(T), fixedBuffer)) - return false; - } - - memcpy(buffer + offset, (char *)&value, sizeof(T)); - offset += sizeof(T); - return true; -} - -bool WriteToBuffer(const BYTE *src, size_t len, BYTE *&buffer, size_t& offset, size_t& size, bool &fixedBuffer) -{ - if (!src) return true; - if (offset + len > size) - { - if (!ResizeBuffer(buffer, size, offset, size + len, fixedBuffer)) - return false; - } - - memcpy(buffer + offset, src, len); - offset += len; - return true; -} - -bool WriteToBuffer(const WCHAR* str, BYTE *&buffer, size_t& offset, size_t& size, bool &fixedBuffer) -{ - if (str == NULL) - return true; - - size_t byteCount = (ep_rt_utf16_string_len(reinterpret_cast(str)) + 1) * sizeof(*str); - if (offset + byteCount > size) - { - if (!ResizeBuffer(buffer, size, offset, size + byteCount, fixedBuffer)) - return false; - } - - memcpy(buffer + offset, str, byteCount); - offset += byteCount; - return true; -} - -bool ResizeBuffer(BYTE *&buffer, size_t& size, size_t currLen, size_t newSize, bool &fixedBuffer) -{ - newSize = (size_t)(newSize * 1.5); - _ASSERTE(newSize > size); // check for overflow - - if (newSize < 32) - newSize = 32; - - BYTE *newBuffer = new (nothrow) BYTE[newSize]; - - if (newBuffer == NULL) - return false; - - memcpy(newBuffer, buffer, currLen); - - if (!fixedBuffer) - delete[] buffer; - - buffer = newBuffer; - size = newSize; - fixedBuffer = false; - - return true; -} - -// shipping criteria: no EVENTPIPE-NATIVEAOT-TODO left in the codebase -// @TODO - Events need to be audited -const WCHAR* DotNETRuntimeName = W("Microsoft-Windows-DotNETRuntime"); -EventPipeProvider *EventPipeProviderDotNETRuntime = nullptr; -EventPipeEvent *EventPipeEventDestroyGCHandle = nullptr; -EventPipeEvent *EventPipeEventExceptionThrown_V1 = nullptr; -EventPipeEvent *EventPipeEventGCBulkEdge = nullptr; -EventPipeEvent *EventPipeEventGCBulkMovedObjectRanges = nullptr; -EventPipeEvent *EventPipeEventGCBulkNode = nullptr; -EventPipeEvent *EventPipeEventGCBulkRCW = nullptr; -EventPipeEvent *EventPipeEventGCBulkRootCCW = nullptr; -EventPipeEvent *EventPipeEventGCBulkRootConditionalWeakTableElementEdge = nullptr; -EventPipeEvent *EventPipeEventGCBulkRootEdge = nullptr; -EventPipeEvent *EventPipeEventGCBulkSurvivingObjectRanges = nullptr; -EventPipeEvent *EventPipeEventGCCreateConcurrentThread_V1 = nullptr; -EventPipeEvent *EventPipeEventGCCreateSegment_V1 = nullptr; -EventPipeEvent *EventPipeEventGCEnd_V1 = nullptr; -EventPipeEvent *EventPipeEventGCFreeSegment_V1 = nullptr; -EventPipeEvent *EventPipeEventGCGenerationRange = nullptr; -EventPipeEvent *EventPipeEventGCHeapStats_V1 = nullptr; -EventPipeEvent *EventPipeEventGCJoin_V2 = nullptr; -EventPipeEvent *EventPipeEventGCMarkFinalizeQueueRoots = nullptr; -EventPipeEvent *EventPipeEventGCMarkHandles = nullptr; -EventPipeEvent *EventPipeEventGCMarkOlderGenerationRoots = nullptr; -EventPipeEvent *EventPipeEventGCMarkStackRoots = nullptr; -EventPipeEvent *EventPipeEventGCMarkWithType = nullptr; -EventPipeEvent *EventPipeEventGCPerHeapHistory_V3 = nullptr; -EventPipeEvent *EventPipeEventGCTerminateConcurrentThread_V1 = nullptr; -EventPipeEvent *EventPipeEventGCTriggered = nullptr; -EventPipeEvent *EventPipeEventModuleLoad_V2 = nullptr; -EventPipeEvent *EventPipeEventSetGCHandle = nullptr; -EventPipeEvent *EventPipeEventGCStart_V2 = nullptr; -EventPipeEvent *EventPipeEventGCRestartEEEnd_V1 = nullptr; -EventPipeEvent *EventPipeEventGCRestartEEBegin_V1 = nullptr; -EventPipeEvent *EventPipeEventGCSuspendEEEnd_V1 = nullptr; -EventPipeEvent *EventPipeEventGCSuspendEEBegin_V1 = nullptr; -EventPipeEvent *EventPipeEventDecreaseMemoryPressure = nullptr; -EventPipeEvent *EventPipeEventFinalizeObject = nullptr; -EventPipeEvent *EventPipeEventGCFinalizersBegin_V1 = nullptr; -EventPipeEvent *EventPipeEventGCFinalizersEnd_V1 = nullptr; -EventPipeEvent *EventPipeEventContentionStart_V2 = nullptr; -EventPipeEvent *EventPipeEventContentionStop_V1 = nullptr; -EventPipeEvent *EventPipeEventContentionLockCreated = nullptr; -EventPipeEvent *EventPipeEventThreadPoolWorkerThreadStart = nullptr; -EventPipeEvent *EventPipeEventThreadPoolWorkerThreadStop = nullptr; -EventPipeEvent *EventPipeEventThreadPoolWorkerThreadWait = nullptr; -EventPipeEvent *EventPipeEventThreadPoolMinMaxThreads = nullptr; -EventPipeEvent *EventPipeEventThreadPoolWorkerThreadAdjustmentSample = nullptr; -EventPipeEvent *EventPipeEventThreadPoolWorkerThreadAdjustmentAdjustment = nullptr; -EventPipeEvent *EventPipeEventThreadPoolWorkerThreadAdjustmentStats = nullptr; -EventPipeEvent *EventPipeEventThreadPoolIOEnqueue = nullptr; -EventPipeEvent *EventPipeEventThreadPoolIODequeue = nullptr; -EventPipeEvent *EventPipeEventThreadPoolWorkingThreadCount = nullptr; -EventPipeEvent *EventPipeEventThreadPoolIOPack = nullptr; -EventPipeEvent *EventPipeEventGCAllocationTick_V4 = nullptr; -EventPipeEvent *EventPipeEventGCHeapStats_V2 = nullptr; -EventPipeEvent *EventPipeEventGCSampledObjectAllocationHigh = nullptr; -EventPipeEvent *EventPipeEventGCSampledObjectAllocationLow = nullptr; -EventPipeEvent *EventPipeEventPinObjectAtGCTime = nullptr; -EventPipeEvent *EventPipeEventGCBulkRootStaticVar = nullptr; -EventPipeEvent *EventPipeEventIncreaseMemoryPressure = nullptr; -EventPipeEvent *EventPipeEventGCGlobalHeapHistory_V4 = nullptr; -EventPipeEvent *EventPipeEventGenAwareBegin = nullptr; -EventPipeEvent *EventPipeEventGenAwareEnd = nullptr; -EventPipeEvent *EventPipeEventGCLOHCompact = nullptr; -EventPipeEvent *EventPipeEventGCFitBucketInfo = nullptr; - -BOOL EventPipeEventEnabledDestroyGCHandle(void) -{ - return ep_event_is_enabled(EventPipeEventDestroyGCHandle); -} - -ULONG EventPipeWriteEventDestroyGCHandle( - const void* HandleID, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledDestroyGCHandle()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(HandleID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventDestroyGCHandle, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledExceptionThrown_V1(void) -{ - return ep_event_is_enabled(EventPipeEventExceptionThrown_V1); -} - -ULONG EventPipeWriteEventExceptionThrown_V1( - const WCHAR* ExceptionType, - const WCHAR* ExceptionMessage, - const void* ExceptionEIP, - const unsigned int ExceptionHRESULT, - const unsigned short ExceptionFlags, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledExceptionThrown_V1()) - return ERROR_SUCCESS; - - size_t size = 144; - BYTE stackBuffer[144]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - if (!ExceptionType) { ExceptionType = W("NULL"); } - if (!ExceptionMessage) { ExceptionMessage = W("NULL"); } - success &= WriteToBuffer(ExceptionType, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ExceptionMessage, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ExceptionEIP, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ExceptionHRESULT, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ExceptionFlags, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventExceptionThrown_V1, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCBulkEdge(void) -{ - return ep_event_is_enabled(EventPipeEventGCBulkEdge); -} - -ULONG EventPipeWriteEventGCBulkEdge( - const unsigned int Index, - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCBulkEdge()) - return ERROR_SUCCESS; - - size_t size = 42; - BYTE stackBuffer[42]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(Index, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(Count, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer((const BYTE *)Values, (int)Values_ElementSize * (int)Count, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCBulkEdge, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCBulkMovedObjectRanges(void) -{ - return ep_event_is_enabled(EventPipeEventGCBulkMovedObjectRanges); -} - -ULONG EventPipeWriteEventGCBulkMovedObjectRanges( - const unsigned int Index, - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCBulkMovedObjectRanges()) - return ERROR_SUCCESS; - - size_t size = 42; - BYTE stackBuffer[42]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(Index, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(Count, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer((const BYTE *)Values, (int)Values_ElementSize * (int)Count, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCBulkMovedObjectRanges, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCBulkNode(void) -{ - return ep_event_is_enabled(EventPipeEventGCBulkNode); -} - -ULONG EventPipeWriteEventGCBulkNode( - const unsigned int Index, - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCBulkNode()) - return ERROR_SUCCESS; - - size_t size = 42; - BYTE stackBuffer[42]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(Index, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(Count, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer((const BYTE *)Values, (int)Values_ElementSize * (int)Count, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCBulkNode, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCBulkRCW(void) -{ - return ep_event_is_enabled(EventPipeEventGCBulkRCW); -} - -ULONG EventPipeWriteEventGCBulkRCW( - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCBulkRCW()) - return ERROR_SUCCESS; - - size_t size = 38; - BYTE stackBuffer[38]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(Count, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer((const BYTE *)Values, (int)(Values_ElementSize), buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCBulkRCW, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCBulkRootCCW(void) -{ - return ep_event_is_enabled(EventPipeEventGCBulkRootCCW); -} - -ULONG EventPipeWriteEventGCBulkRootCCW( - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCBulkRootCCW()) - return ERROR_SUCCESS; - - size_t size = 38; - BYTE stackBuffer[38]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(Count, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer((const BYTE *)Values, (int)(Values_ElementSize), buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCBulkRootCCW, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCBulkRootConditionalWeakTableElementEdge(void) -{ - return ep_event_is_enabled(EventPipeEventGCBulkRootConditionalWeakTableElementEdge); -} - -ULONG EventPipeWriteEventGCBulkRootConditionalWeakTableElementEdge( - const unsigned int Index, - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCBulkRootConditionalWeakTableElementEdge()) - return ERROR_SUCCESS; - - size_t size = 42; - BYTE stackBuffer[42]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(Index, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(Count, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer((const BYTE *)Values, (int)Values_ElementSize * (int)Count, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCBulkRootConditionalWeakTableElementEdge, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCBulkRootEdge(void) -{ - return ep_event_is_enabled(EventPipeEventGCBulkRootEdge); -} - -ULONG EventPipeWriteEventGCBulkRootEdge( - const unsigned int Index, - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCBulkRootEdge()) - return ERROR_SUCCESS; - - size_t size = 42; - BYTE stackBuffer[42]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(Index, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(Count, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer((const BYTE *)Values, (int)Values_ElementSize * (int)Count, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCBulkRootEdge, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCBulkSurvivingObjectRanges(void) -{ - return ep_event_is_enabled(EventPipeEventGCBulkSurvivingObjectRanges); -} - -ULONG EventPipeWriteEventGCBulkSurvivingObjectRanges( - const unsigned int Index, - const unsigned int Count, - const unsigned short ClrInstanceID, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCBulkSurvivingObjectRanges()) - return ERROR_SUCCESS; - - size_t size = 42; - BYTE stackBuffer[42]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(Index, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(Count, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer((const BYTE *)Values, (int)Values_ElementSize * (int)Count, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCBulkSurvivingObjectRanges, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCCreateConcurrentThread_V1(void) -{ - return ep_event_is_enabled(EventPipeEventGCCreateConcurrentThread_V1); -} - -ULONG EventPipeWriteEventGCCreateConcurrentThread_V1( - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCCreateConcurrentThread_V1()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCCreateConcurrentThread_V1, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCCreateSegment_V1(void) -{ - return ep_event_is_enabled(EventPipeEventGCCreateSegment_V1); -} - -ULONG EventPipeWriteEventGCCreateSegment_V1( - const unsigned __int64 Address, - const unsigned __int64 Size, - const unsigned int Type, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCCreateSegment_V1()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(Address, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(Size, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(Type, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCCreateSegment_V1, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCEnd_V1(void) -{ - return ep_event_is_enabled(EventPipeEventGCEnd_V1); -} - -ULONG EventPipeWriteEventGCEnd_V1( - const unsigned int Count, - const unsigned int Depth, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCEnd_V1()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(Count, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(Depth, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCEnd_V1, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCFreeSegment_V1(void) -{ - return ep_event_is_enabled(EventPipeEventGCFreeSegment_V1); -} - -ULONG EventPipeWriteEventGCFreeSegment_V1( - const unsigned __int64 Address, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCFreeSegment_V1()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(Address, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCFreeSegment_V1, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCGenerationRange(void) -{ - return ep_event_is_enabled(EventPipeEventGCGenerationRange); -} - -ULONG EventPipeWriteEventGCGenerationRange( - const unsigned char Generation, - const void* RangeStart, - const unsigned __int64 RangeUsedLength, - const unsigned __int64 RangeReservedLength, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCGenerationRange()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(Generation, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(RangeStart, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(RangeUsedLength, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(RangeReservedLength, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCGenerationRange, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCHeapStats_V1(void) -{ - return ep_event_is_enabled(EventPipeEventGCHeapStats_V1); -} - -ULONG EventPipeWriteEventGCHeapStats_V1( - const unsigned __int64 GenerationSize0, - const unsigned __int64 TotalPromotedSize0, - const unsigned __int64 GenerationSize1, - const unsigned __int64 TotalPromotedSize1, - const unsigned __int64 GenerationSize2, - const unsigned __int64 TotalPromotedSize2, - const unsigned __int64 GenerationSize3, - const unsigned __int64 TotalPromotedSize3, - const unsigned __int64 FinalizationPromotedSize, - const unsigned __int64 FinalizationPromotedCount, - const unsigned int PinnedObjectCount, - const unsigned int SinkBlockCount, - const unsigned int GCHandleCount, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCHeapStats_V1()) - return ERROR_SUCCESS; - - size_t size = 94; - BYTE stackBuffer[94]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(GenerationSize0, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(TotalPromotedSize0, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(GenerationSize1, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(TotalPromotedSize1, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(GenerationSize2, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(TotalPromotedSize2, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(GenerationSize3, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(TotalPromotedSize3, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(FinalizationPromotedSize, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(FinalizationPromotedCount, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(PinnedObjectCount, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(SinkBlockCount, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(GCHandleCount, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCHeapStats_V1, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCJoin_V2(void) -{ - return ep_event_is_enabled(EventPipeEventGCJoin_V2); -} - -ULONG EventPipeWriteEventGCJoin_V2( - const unsigned int Heap, - const unsigned int JoinTime, - const unsigned int JoinType, - const unsigned short ClrInstanceID, - const unsigned int JoinID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCJoin_V2()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(Heap, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(JoinTime, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(JoinType, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(JoinID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCJoin_V2, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCMarkFinalizeQueueRoots(void) -{ - return ep_event_is_enabled(EventPipeEventGCMarkFinalizeQueueRoots); -} - -ULONG EventPipeWriteEventGCMarkFinalizeQueueRoots( - const unsigned int HeapNum, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCMarkFinalizeQueueRoots()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(HeapNum, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCMarkFinalizeQueueRoots, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCMarkHandles(void) -{ - return ep_event_is_enabled(EventPipeEventGCMarkHandles); -} - -ULONG EventPipeWriteEventGCMarkHandles( - const unsigned int HeapNum, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCMarkHandles()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(HeapNum, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCMarkHandles, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCMarkOlderGenerationRoots(void) -{ - return ep_event_is_enabled(EventPipeEventGCMarkOlderGenerationRoots); -} - -ULONG EventPipeWriteEventGCMarkOlderGenerationRoots( - const unsigned int HeapNum, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCMarkOlderGenerationRoots()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(HeapNum, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCMarkOlderGenerationRoots, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCMarkStackRoots(void) -{ - return ep_event_is_enabled(EventPipeEventGCMarkStackRoots); -} - -ULONG EventPipeWriteEventGCMarkStackRoots( - const unsigned int HeapNum, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCMarkStackRoots()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(HeapNum, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCMarkStackRoots, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCMarkWithType(void) -{ - return ep_event_is_enabled(EventPipeEventGCMarkWithType); -} - -ULONG EventPipeWriteEventGCMarkWithType( - const unsigned int HeapNum, - const unsigned short ClrInstanceID, - const unsigned int Type, - const unsigned __int64 Bytes, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCMarkWithType()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(HeapNum, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(Type, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(Bytes, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCMarkWithType, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCPerHeapHistory_V3(void) -{ - return ep_event_is_enabled(EventPipeEventGCPerHeapHistory_V3); -} - -ULONG EventPipeWriteEventGCPerHeapHistory_V3( - const unsigned short ClrInstanceID, - const void* FreeListAllocated, - const void* FreeListRejected, - const void* EndOfSegAllocated, - const void* CondemnedAllocated, - const void* PinnedAllocated, - const void* PinnedAllocatedAdvance, - const unsigned int RunningFreeListEfficiency, - const unsigned int CondemnReasons0, - const unsigned int CondemnReasons1, - const unsigned int CompactMechanisms, - const unsigned int ExpandMechanisms, - const unsigned int HeapIndex, - const void* ExtraGen0Commit, - const unsigned int Count, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCPerHeapHistory_V3()) - return ERROR_SUCCESS; - - size_t size = 118; - BYTE stackBuffer[118]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(FreeListAllocated, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(FreeListRejected, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(EndOfSegAllocated, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(CondemnedAllocated, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(PinnedAllocated, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(PinnedAllocatedAdvance, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(RunningFreeListEfficiency, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(CondemnReasons0, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(CondemnReasons1, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(CompactMechanisms, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ExpandMechanisms, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(HeapIndex, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ExtraGen0Commit, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(Count, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer((const BYTE *)Values, (int)Values_ElementSize * (int)Count, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCPerHeapHistory_V3, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCTerminateConcurrentThread_V1(void) -{ - return ep_event_is_enabled(EventPipeEventGCTerminateConcurrentThread_V1); -} - -ULONG EventPipeWriteEventGCTerminateConcurrentThread_V1( - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCTerminateConcurrentThread_V1()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCTerminateConcurrentThread_V1, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCTriggered(void) -{ - return ep_event_is_enabled(EventPipeEventGCTriggered); -} - -ULONG EventPipeWriteEventGCTriggered( - const unsigned int Reason, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCTriggered()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(Reason, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCTriggered, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledModuleLoad_V2(void) -{ - return ep_event_is_enabled(EventPipeEventModuleLoad_V2); -} - -ULONG EventPipeWriteEventModuleLoad_V2( - const unsigned __int64 ModuleID, - const unsigned __int64 AssemblyID, - const unsigned int ModuleFlags, - const unsigned int Reserved1, - const WCHAR* ModuleILPath, - const WCHAR* ModuleNativePath, - const unsigned short ClrInstanceID, - const GUID* ManagedPdbSignature, - const unsigned int ManagedPdbAge, - const WCHAR* ManagedPdbBuildPath, - const GUID* NativePdbSignature, - const unsigned int NativePdbAge, - const WCHAR* NativePdbBuildPath, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledModuleLoad_V2()) - return ERROR_SUCCESS; - - size_t size = 290; - BYTE stackBuffer[290]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - if (!ModuleILPath) { ModuleILPath = W("NULL"); } - if (!ModuleNativePath) { ModuleNativePath = W("NULL"); } - if (!ManagedPdbBuildPath) { ManagedPdbBuildPath = W("NULL"); } - if (!NativePdbBuildPath) { NativePdbBuildPath = W("NULL"); } - success &= WriteToBuffer(ModuleID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(AssemblyID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ModuleFlags, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(Reserved1, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ModuleILPath, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ModuleNativePath, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(*ManagedPdbSignature, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ManagedPdbAge, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ManagedPdbBuildPath, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(*NativePdbSignature, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(NativePdbAge, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(NativePdbBuildPath, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventModuleLoad_V2, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledSetGCHandle(void) -{ - return ep_event_is_enabled(EventPipeEventSetGCHandle); -} - -ULONG EventPipeWriteEventSetGCHandle( - const void* HandleID, - const void* ObjectID, - const unsigned int Kind, - const unsigned int Generation, - const unsigned __int64 AppDomainID, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledSetGCHandle()) - return ERROR_SUCCESS; - - size_t size = 34; - BYTE stackBuffer[34]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(HandleID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ObjectID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(Kind, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(Generation, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(AppDomainID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventSetGCHandle, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCStart_V2(void) -{ - return ep_event_is_enabled(EventPipeEventGCStart_V2); -} - -ULONG EventPipeWriteEventGCStart_V2( - const unsigned int Count, - const unsigned int Depth, - const unsigned int Reason, - const unsigned int Type, - const unsigned short ClrInstanceID, - const unsigned __int64 ClientSequenceNumber, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCStart_V2()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(Count, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(Depth, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(Reason, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(Type, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClientSequenceNumber, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCStart_V2, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCRestartEEEnd_V1(void) -{ - return ep_event_is_enabled(EventPipeEventGCRestartEEEnd_V1); -} - -ULONG EventPipeWriteEventGCRestartEEEnd_V1( - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCRestartEEEnd_V1()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCRestartEEEnd_V1, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCRestartEEBegin_V1(void) -{ - return ep_event_is_enabled(EventPipeEventGCRestartEEBegin_V1); -} - -ULONG EventPipeWriteEventGCRestartEEBegin_V1( - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCRestartEEBegin_V1()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCRestartEEBegin_V1, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCSuspendEEEnd_V1(void) -{ - return ep_event_is_enabled(EventPipeEventGCSuspendEEEnd_V1); -} - -ULONG EventPipeWriteEventGCSuspendEEEnd_V1( - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCSuspendEEEnd_V1()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCSuspendEEEnd_V1, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCSuspendEEBegin_V1(void) -{ - return ep_event_is_enabled(EventPipeEventGCSuspendEEBegin_V1); -} - -ULONG EventPipeWriteEventGCSuspendEEBegin_V1( - const unsigned int Reason, - const unsigned int Count, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCSuspendEEBegin_V1()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(Reason, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(Count, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCSuspendEEBegin_V1, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledDecreaseMemoryPressure(void) -{ - return ep_event_is_enabled(EventPipeEventDecreaseMemoryPressure); -} - -ULONG EventPipeWriteEventDecreaseMemoryPressure( - const unsigned __int64 BytesFreed, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledDecreaseMemoryPressure()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(BytesFreed, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventDecreaseMemoryPressure, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledFinalizeObject(void) -{ - return ep_event_is_enabled(EventPipeEventFinalizeObject); -} - -ULONG EventPipeWriteEventFinalizeObject( - const void* TypeID, - const void* ObjectID, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledFinalizeObject()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(TypeID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ObjectID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventFinalizeObject, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCFinalizersBegin_V1(void) -{ - return ep_event_is_enabled(EventPipeEventGCFinalizersBegin_V1); -} - -ULONG EventPipeWriteEventGCFinalizersBegin_V1( - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCFinalizersBegin_V1()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCFinalizersBegin_V1, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCFinalizersEnd_V1(void) -{ - return ep_event_is_enabled(EventPipeEventGCFinalizersEnd_V1); -} - -ULONG EventPipeWriteEventGCFinalizersEnd_V1( - const unsigned int Count, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCFinalizersEnd_V1()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(Count, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCFinalizersEnd_V1, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledContentionStart_V2(void) -{ - return ep_event_is_enabled(EventPipeEventContentionStart_V2); -} - -ULONG EventPipeWriteEventContentionStart_V2( - const unsigned char ContentionFlags, - const unsigned short ClrInstanceID, - const void* LockID, - const void* AssociatedObjectID, - const unsigned __int64 LockOwnerThreadID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledContentionStart_V2()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(ContentionFlags, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(LockID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(AssociatedObjectID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(LockOwnerThreadID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventContentionStart_V2, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledContentionStop_V1(void) -{ - return ep_event_is_enabled(EventPipeEventContentionStop_V1); -} - -ULONG EventPipeWriteEventContentionStop_V1( - const unsigned char ContentionFlags, - const unsigned short ClrInstanceID, - const double DurationNs, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledContentionStop_V1()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(ContentionFlags, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(DurationNs, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventContentionStop_V1, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledContentionLockCreated(void) -{ - return ep_event_is_enabled(EventPipeEventContentionLockCreated); -} - -ULONG EventPipeWriteEventContentionLockCreated( - const void* LockID, - const void* AssociatedObjectID, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledContentionLockCreated()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(LockID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(AssociatedObjectID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventContentionLockCreated, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledThreadPoolWorkerThreadStart(void) -{ - return ep_event_is_enabled(EventPipeEventThreadPoolWorkerThreadStart); -} - -ULONG EventPipeWriteEventThreadPoolWorkerThreadStart( - const unsigned int ActiveWorkerThreadCount, - const unsigned int RetiredWorkerThreadCount, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledThreadPoolWorkerThreadStart()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(ActiveWorkerThreadCount, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(RetiredWorkerThreadCount, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventThreadPoolWorkerThreadStart, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledThreadPoolWorkerThreadStop(void) -{ - return ep_event_is_enabled(EventPipeEventThreadPoolWorkerThreadStop); -} - -ULONG EventPipeWriteEventThreadPoolWorkerThreadStop( - const unsigned int ActiveWorkerThreadCount, - const unsigned int RetiredWorkerThreadCount, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledThreadPoolWorkerThreadStop()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(ActiveWorkerThreadCount, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(RetiredWorkerThreadCount, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventThreadPoolWorkerThreadStop, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledThreadPoolWorkerThreadWait(void) -{ - return ep_event_is_enabled(EventPipeEventThreadPoolWorkerThreadWait); -} - -ULONG EventPipeWriteEventThreadPoolWorkerThreadWait( - const unsigned int ActiveWorkerThreadCount, - const unsigned int RetiredWorkerThreadCount, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledThreadPoolWorkerThreadWait()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(ActiveWorkerThreadCount, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(RetiredWorkerThreadCount, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventThreadPoolWorkerThreadWait, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledThreadPoolMinMaxThreads(void) -{ - return ep_event_is_enabled(EventPipeEventThreadPoolMinMaxThreads); -} - -ULONG EventPipeWriteEventThreadPoolMinMaxThreads( - const unsigned short MinWorkerThreads, - const unsigned short MaxWorkerThreads, - const unsigned short MinIOCompletionThreads, - const unsigned short MaxIOCompletionThreads, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledThreadPoolMinMaxThreads()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(MinWorkerThreads, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(MaxWorkerThreads, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(MinIOCompletionThreads, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(MaxIOCompletionThreads, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventThreadPoolMinMaxThreads, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledThreadPoolWorkerThreadAdjustmentSample(void) -{ - return ep_event_is_enabled(EventPipeEventThreadPoolWorkerThreadAdjustmentSample); -} - -ULONG EventPipeWriteEventThreadPoolWorkerThreadAdjustmentSample( - const double Throughput, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledThreadPoolWorkerThreadAdjustmentSample()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(Throughput, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventThreadPoolWorkerThreadAdjustmentSample, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledThreadPoolWorkerThreadAdjustmentAdjustment(void) -{ - return ep_event_is_enabled(EventPipeEventThreadPoolWorkerThreadAdjustmentAdjustment); -} - -ULONG EventPipeWriteEventThreadPoolWorkerThreadAdjustmentAdjustment( - const double AverageThroughput, - const unsigned int NewWorkerThreadCount, - const unsigned int Reason, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledThreadPoolWorkerThreadAdjustmentAdjustment()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(AverageThroughput, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(NewWorkerThreadCount, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(Reason, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventThreadPoolWorkerThreadAdjustmentAdjustment, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledThreadPoolWorkerThreadAdjustmentStats(void) -{ - return ep_event_is_enabled(EventPipeEventThreadPoolWorkerThreadAdjustmentStats); -} - -ULONG EventPipeWriteEventThreadPoolWorkerThreadAdjustmentStats( - const double Duration, - const double Throughput, - const double ThreadWave, - const double ThroughputWave, - const double ThroughputErrorEstimate, - const double AverageThroughputErrorEstimate, - const double ThroughputRatio, - const double Confidence, - const double NewControlSetting, - const unsigned short NewThreadWaveMagnitude, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledThreadPoolWorkerThreadAdjustmentStats()) - return ERROR_SUCCESS; - - size_t size = 76; - BYTE stackBuffer[76]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(Duration, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(Throughput, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ThreadWave, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ThroughputWave, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ThroughputErrorEstimate, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(AverageThroughputErrorEstimate, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ThroughputRatio, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(Confidence, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(NewControlSetting, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(NewThreadWaveMagnitude, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventThreadPoolWorkerThreadAdjustmentStats, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledThreadPoolIOEnqueue(void) -{ - return ep_event_is_enabled(EventPipeEventThreadPoolIOEnqueue); -} - -ULONG EventPipeWriteEventThreadPoolIOEnqueue( - const void* NativeOverlapped, - const void* Overlapped, - const BOOL MultiDequeues, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledThreadPoolIOEnqueue()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(NativeOverlapped, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(Overlapped, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(MultiDequeues, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventThreadPoolIOEnqueue, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledThreadPoolIODequeue(void) -{ - return ep_event_is_enabled(EventPipeEventThreadPoolIODequeue); -} - -ULONG EventPipeWriteEventThreadPoolIODequeue( - const void* NativeOverlapped, - const void* Overlapped, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledThreadPoolIODequeue()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(NativeOverlapped, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(Overlapped, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventThreadPoolIODequeue, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledThreadPoolWorkingThreadCount(void) -{ - return ep_event_is_enabled(EventPipeEventThreadPoolWorkingThreadCount); -} - -ULONG EventPipeWriteEventThreadPoolWorkingThreadCount( - const unsigned int Count, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledThreadPoolWorkingThreadCount()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(Count, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventThreadPoolWorkingThreadCount, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledThreadPoolIOPack(void) -{ - return ep_event_is_enabled(EventPipeEventThreadPoolIOPack); -} - -ULONG EventPipeWriteEventThreadPoolIOPack( - const void* NativeOverlapped, - const void* Overlapped, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledThreadPoolIOPack()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(NativeOverlapped, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(Overlapped, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventThreadPoolIOPack, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCAllocationTick_V4(void) -{ - return ep_event_is_enabled(EventPipeEventGCAllocationTick_V4); -} - -ULONG EventPipeWriteEventGCAllocationTick_V4( - const unsigned int AllocationAmount, - const unsigned int AllocationKind, - const unsigned short ClrInstanceID, - const unsigned __int64 AllocationAmount64, - const void* TypeID, - const WCHAR* TypeName, - const unsigned int HeapIndex, - const void* Address, - const unsigned __int64 ObjectSize, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCAllocationTick_V4()) - return ERROR_SUCCESS; - - size_t size = 110; - BYTE stackBuffer[110]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - if (!TypeName) { TypeName = W("NULL"); } - success &= WriteToBuffer(AllocationAmount, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(AllocationKind, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(AllocationAmount64, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(TypeID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(TypeName, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(HeapIndex, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(Address, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ObjectSize, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCAllocationTick_V4, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCHeapStats_V2(void) -{ - return ep_event_is_enabled(EventPipeEventGCHeapStats_V2); -} - -ULONG EventPipeWriteEventGCHeapStats_V2( - const unsigned __int64 GenerationSize0, - const unsigned __int64 TotalPromotedSize0, - const unsigned __int64 GenerationSize1, - const unsigned __int64 TotalPromotedSize1, - const unsigned __int64 GenerationSize2, - const unsigned __int64 TotalPromotedSize2, - const unsigned __int64 GenerationSize3, - const unsigned __int64 TotalPromotedSize3, - const unsigned __int64 FinalizationPromotedSize, - const unsigned __int64 FinalizationPromotedCount, - const unsigned int PinnedObjectCount, - const unsigned int SinkBlockCount, - const unsigned int GCHandleCount, - const unsigned short ClrInstanceID, - const unsigned __int64 GenerationSize4, - const unsigned __int64 TotalPromotedSize4, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCHeapStats_V2()) - return ERROR_SUCCESS; - - size_t size = 110; - BYTE stackBuffer[110]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(GenerationSize0, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(TotalPromotedSize0, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(GenerationSize1, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(TotalPromotedSize1, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(GenerationSize2, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(TotalPromotedSize2, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(GenerationSize3, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(TotalPromotedSize3, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(FinalizationPromotedSize, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(FinalizationPromotedCount, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(PinnedObjectCount, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(SinkBlockCount, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(GCHandleCount, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(GenerationSize4, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(TotalPromotedSize4, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCHeapStats_V2, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCSampledObjectAllocationHigh(void) -{ - return ep_event_is_enabled(EventPipeEventGCSampledObjectAllocationHigh); -} - -ULONG EventPipeWriteEventGCSampledObjectAllocationHigh( - const void* Address, - const void* TypeID, - const unsigned int ObjectCountForTypeSample, - const unsigned __int64 TotalSizeForTypeSample, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCSampledObjectAllocationHigh()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(Address, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(TypeID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ObjectCountForTypeSample, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(TotalSizeForTypeSample, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCSampledObjectAllocationHigh, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCSampledObjectAllocationLow(void) -{ - return ep_event_is_enabled(EventPipeEventGCSampledObjectAllocationLow); -} - -ULONG EventPipeWriteEventGCSampledObjectAllocationLow( - const void* Address, - const void* TypeID, - const unsigned int ObjectCountForTypeSample, - const unsigned __int64 TotalSizeForTypeSample, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCSampledObjectAllocationLow()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(Address, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(TypeID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ObjectCountForTypeSample, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(TotalSizeForTypeSample, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCSampledObjectAllocationLow, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledPinObjectAtGCTime(void) -{ - return ep_event_is_enabled(EventPipeEventPinObjectAtGCTime); -} - -ULONG EventPipeWriteEventPinObjectAtGCTime( - const void* HandleID, - const void* ObjectID, - const unsigned __int64 ObjectSize, - const WCHAR* TypeName, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledPinObjectAtGCTime()) - return ERROR_SUCCESS; - - size_t size = 90; - BYTE stackBuffer[90]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - if (!TypeName) { TypeName = W("NULL"); } - success &= WriteToBuffer(HandleID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ObjectID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ObjectSize, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(TypeName, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventPinObjectAtGCTime, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCBulkRootStaticVar(void) -{ - return ep_event_is_enabled(EventPipeEventGCBulkRootStaticVar); -} - -ULONG EventPipeWriteEventGCBulkRootStaticVar( - const unsigned int Count, - const unsigned __int64 AppDomainID, - const unsigned short ClrInstanceID, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCBulkRootStaticVar()) - return ERROR_SUCCESS; - - size_t size = 46; - BYTE stackBuffer[46]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(Count, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(AppDomainID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer((const BYTE *)Values, (int)(Values_ElementSize), buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCBulkRootStaticVar, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledIncreaseMemoryPressure(void) -{ - return ep_event_is_enabled(EventPipeEventIncreaseMemoryPressure); -} - -ULONG EventPipeWriteEventIncreaseMemoryPressure( - const unsigned __int64 BytesAllocated, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledIncreaseMemoryPressure()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(BytesAllocated, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventIncreaseMemoryPressure, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCGlobalHeapHistory_V4(void) -{ - return ep_event_is_enabled(EventPipeEventGCGlobalHeapHistory_V4); -} - -ULONG EventPipeWriteEventGCGlobalHeapHistory_V4( - const unsigned __int64 FinalYoungestDesired, - const signed int NumHeaps, - const unsigned int CondemnedGeneration, - const unsigned int Gen0ReductionCount, - const unsigned int Reason, - const unsigned int GlobalMechanisms, - const unsigned short ClrInstanceID, - const unsigned int PauseMode, - const unsigned int MemoryPressure, - const unsigned int CondemnReasons0, - const unsigned int CondemnReasons1, - const unsigned int Count, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCGlobalHeapHistory_V4()) - return ERROR_SUCCESS; - - size_t size = 82; - BYTE stackBuffer[82]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(FinalYoungestDesired, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(NumHeaps, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(CondemnedGeneration, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(Gen0ReductionCount, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(Reason, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(GlobalMechanisms, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(PauseMode, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(MemoryPressure, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(CondemnReasons0, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(CondemnReasons1, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(Count, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer((const BYTE *)Values, (int)Values_ElementSize * (int)Count, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCGlobalHeapHistory_V4, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGenAwareBegin(void) -{ - return ep_event_is_enabled(EventPipeEventGenAwareBegin); -} - -ULONG EventPipeWriteEventGenAwareBegin( - const unsigned int Count, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGenAwareBegin()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(Count, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGenAwareBegin, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGenAwareEnd(void) -{ - return ep_event_is_enabled(EventPipeEventGenAwareEnd); -} - -ULONG EventPipeWriteEventGenAwareEnd( - const unsigned int Count, - const unsigned short ClrInstanceID, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGenAwareEnd()) - return ERROR_SUCCESS; - - size_t size = 32; - BYTE stackBuffer[32]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(Count, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGenAwareEnd, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCLOHCompact(void) -{ - return ep_event_is_enabled(EventPipeEventGCLOHCompact); -} - -ULONG EventPipeWriteEventGCLOHCompact( - const unsigned short ClrInstanceID, - const unsigned short Count, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCLOHCompact()) - return ERROR_SUCCESS; - - size_t size = 36; - BYTE stackBuffer[36]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(Count, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer((const BYTE *)Values, (int)Values_ElementSize * (int)Count, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCLOHCompact, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -BOOL EventPipeEventEnabledGCFitBucketInfo(void) -{ - return ep_event_is_enabled(EventPipeEventGCFitBucketInfo); -} - -ULONG EventPipeWriteEventGCFitBucketInfo( - const unsigned short ClrInstanceID, - const unsigned short BucketKind, - const unsigned __int64 TotalSize, - const unsigned short Count, - int Values_ElementSize, - const void* Values, - const GUID * ActivityId, - const GUID * RelatedActivityId) -{ - if (!EventPipeEventEnabledGCFitBucketInfo()) - return ERROR_SUCCESS; - - size_t size = 46; - BYTE stackBuffer[46]; - BYTE *buffer = stackBuffer; - size_t offset = 0; - bool fixedBuffer = true; - bool success = true; - - success &= WriteToBuffer(ClrInstanceID, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(BucketKind, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(TotalSize, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer(Count, buffer, offset, size, fixedBuffer); - success &= WriteToBuffer((const BYTE *)Values, (int)Values_ElementSize * (int)Count, buffer, offset, size, fixedBuffer); - - if (!success) - { - if (!fixedBuffer) - delete[] buffer; - return ERROR_WRITE_FAULT; - } - - EventPipeAdapter::WriteEvent(EventPipeEventGCFitBucketInfo, (BYTE *)buffer, (unsigned int)offset, ActivityId, RelatedActivityId); - - if (!fixedBuffer) - delete[] buffer; - - - return ERROR_SUCCESS; -} - -void InitProvidersAndEvents(void) -{ - InitDotNETRuntime(); -} - -void InitDotNETRuntime(void) -{ - // shipping criteria: no EVENTPIPE-NATIVEAOT-TODO left in the codebase - EventPipeProviderDotNETRuntime = EventPipeAdapter::CreateProvider(DotNETRuntimeName, reinterpret_cast(EventPipeEtwCallbackDotNETRuntime)); - EventPipeEventDestroyGCHandle = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,31,2,0,EP_EVENT_LEVEL_INFORMATIONAL,true); - EventPipeEventExceptionThrown_V1 = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,80,8589967360,1,EP_EVENT_LEVEL_ERROR,true); - EventPipeEventGCBulkEdge = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,19,1048576,0,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventGCBulkMovedObjectRanges = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,22,4194304,0,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventGCBulkNode = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,18,1048576,0,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventGCBulkRCW = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,37,1048576,0,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventGCBulkRootCCW = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,36,1048576,0,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventGCBulkRootConditionalWeakTableElementEdge = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,17,1048576,0,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventGCBulkRootEdge = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,16,1048576,0,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventGCBulkSurvivingObjectRanges = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,21,4194304,0,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventGCCreateConcurrentThread_V1 = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,11,65537,1,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventGCCreateSegment_V1 = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,5,1,1,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventGCEnd_V1 = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,2,1,1,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventGCFreeSegment_V1 = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,6,1,1,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventGCGenerationRange = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,23,4194304,0,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventGCHeapStats_V1 = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,4,1,1,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventGCJoin_V2 = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,203,1,2,EP_EVENT_LEVEL_VERBOSE,true); - EventPipeEventGCMarkFinalizeQueueRoots = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,26,1,0,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventGCMarkHandles = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,27,1,0,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventGCMarkOlderGenerationRoots = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,28,1,0,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventGCMarkStackRoots = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,25,1,0,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventGCMarkWithType = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,202,1,0,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventGCPerHeapHistory_V3 = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,204,1,3,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventGCTerminateConcurrentThread_V1 = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,12,65537,1,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventGCTriggered = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,35,1,0,EP_EVENT_LEVEL_INFORMATIONAL,true); - EventPipeEventModuleLoad_V2 = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,152,536870920,2,EP_EVENT_LEVEL_INFORMATIONAL,true); - EventPipeEventSetGCHandle = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,30,2,0,EP_EVENT_LEVEL_INFORMATIONAL,true); - EventPipeEventGCStart_V2 = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,1,1,2,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventGCRestartEEEnd_V1 = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,3,1,1,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventGCRestartEEBegin_V1 = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,7,1,1,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventGCSuspendEEEnd_V1 = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,8,1,1,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventGCSuspendEEBegin_V1 = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,9,1,1,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventDecreaseMemoryPressure = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,201,1,0,EP_EVENT_LEVEL_VERBOSE,true); - EventPipeEventFinalizeObject = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,29,1,0,EP_EVENT_LEVEL_VERBOSE,false); - EventPipeEventGCFinalizersBegin_V1 = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,14,1,1,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventGCFinalizersEnd_V1 = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,13,1,1,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventContentionStart_V2 = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,81,16384,2,EP_EVENT_LEVEL_INFORMATIONAL,true); - EventPipeEventContentionStop_V1 = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,91,16384,1,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventContentionLockCreated = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,90,16384,0,EP_EVENT_LEVEL_INFORMATIONAL,true); - EventPipeEventThreadPoolWorkerThreadStart = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,50,65536,0,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventThreadPoolWorkerThreadStop = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,51,65536,0,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventThreadPoolWorkerThreadWait = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,57,65536,0,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventThreadPoolMinMaxThreads = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,59,65536,0,EP_EVENT_LEVEL_INFORMATIONAL,true); - EventPipeEventThreadPoolWorkerThreadAdjustmentSample = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,54,65536,0,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventThreadPoolWorkerThreadAdjustmentAdjustment = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,55,65536,0,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventThreadPoolWorkerThreadAdjustmentStats = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,56,65536,0,EP_EVENT_LEVEL_VERBOSE,true); - EventPipeEventThreadPoolIOEnqueue = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,63,2147549184,0,EP_EVENT_LEVEL_VERBOSE,true); - EventPipeEventThreadPoolIODequeue = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,64,2147549184,0,EP_EVENT_LEVEL_VERBOSE,true); - EventPipeEventThreadPoolIOPack = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,65,65536,0,EP_EVENT_LEVEL_VERBOSE,true); - EventPipeEventThreadPoolWorkingThreadCount = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,60,65536,0,EP_EVENT_LEVEL_VERBOSE,true); - EventPipeEventGCAllocationTick_V4 = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,10,1,4,EP_EVENT_LEVEL_VERBOSE,true); - EventPipeEventGCHeapStats_V2 = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,4,1,2,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventGCSampledObjectAllocationHigh = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,20,2097152,0,EP_EVENT_LEVEL_INFORMATIONAL,true); - EventPipeEventGCSampledObjectAllocationLow = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,32,33554432,0,EP_EVENT_LEVEL_INFORMATIONAL,true); - EventPipeEventPinObjectAtGCTime = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,33,1,0,EP_EVENT_LEVEL_VERBOSE,false); - EventPipeEventGCBulkRootStaticVar = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,38,1048576,0,EP_EVENT_LEVEL_INFORMATIONAL,false); - EventPipeEventIncreaseMemoryPressure = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,200,1,0,EP_EVENT_LEVEL_VERBOSE,true); - EventPipeEventGCGlobalHeapHistory_V4 = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,205,1,4,EP_EVENT_LEVEL_INFORMATIONAL,true); - EventPipeEventGenAwareBegin = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,206,1048576,0,EP_EVENT_LEVEL_INFORMATIONAL,true); - EventPipeEventGenAwareEnd = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,207,1048576,0,EP_EVENT_LEVEL_INFORMATIONAL,true); - EventPipeEventGCLOHCompact = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,208,1,0,EP_EVENT_LEVEL_INFORMATIONAL,true); - EventPipeEventGCFitBucketInfo = EventPipeAdapter::AddEvent(EventPipeProviderDotNETRuntime,209,1,0,EP_EVENT_LEVEL_VERBOSE,true); -} - -bool DotNETRuntimeProvider_IsEnabled(unsigned char level, unsigned long long keyword) -{ - if (!ep_enabled()) - return false; - - EVENTPIPE_TRACE_CONTEXT& context = MICROSOFT_WINDOWS_DOTNETRUNTIME_PROVIDER_DOTNET_Context.EventPipeProvider; - if (!context.IsEnabled) - return false; - - if (level > context.Level) - return false; - - return (keyword == (ULONGLONG)0) || (keyword & context.EnabledKeywordsBitmask) != 0; -} diff --git a/src/coreclr/nativeaot/Runtime/eventpipe/ds-rt-aot.cpp b/src/coreclr/nativeaot/Runtime/eventpipe/ds-rt-aot.cpp index a411cf71a84d94..06cffb449d2721 100644 --- a/src/coreclr/nativeaot/Runtime/eventpipe/ds-rt-aot.cpp +++ b/src/coreclr/nativeaot/Runtime/eventpipe/ds-rt-aot.cpp @@ -180,7 +180,7 @@ ds_rt_aot_transport_get_default_name ( const ep_char8_t *suffix) { STATIC_CONTRACT_NOTHROW; - + #ifdef TARGET_UNIX EP_ASSERT (name != NULL); @@ -202,7 +202,7 @@ ds_rt_aot_transport_get_default_name ( // also try to use 0 as the value. if (!aot_ipc_get_process_id_disambiguation_key (id, &disambiguation_key)) EP_ASSERT (disambiguation_key == 0); - + // Get a temp file location format_result = ep_rt_temp_path_get (format_buffer, name_len); if (format_result == 0) { @@ -238,8 +238,8 @@ uint32_t ds_rt_aot_set_environment_variable (const ep_char16_t *name, const ep_char16_t *value) { #ifdef TARGET_UNIX - ep_char8_t *nameNarrow = ep_rt_utf16le_to_utf8_string (name, ep_rt_utf16_string_len (name)); - ep_char8_t *valueNarrow = ep_rt_utf16le_to_utf8_string (value, ep_rt_utf16_string_len (value)); + ep_char8_t *nameNarrow = ep_rt_utf16le_to_utf8_string (name); + ep_char8_t *valueNarrow = ep_rt_utf16le_to_utf8_string (value); int32_t ret_value = setenv(nameNarrow, valueNarrow, 1); free(nameNarrow); free(valueNarrow); diff --git a/src/coreclr/nativeaot/Runtime/eventpipe/ds-rt-aot.h b/src/coreclr/nativeaot/Runtime/eventpipe/ds-rt-aot.h index 98f065968e6fc8..5a7ecaa7b2889d 100644 --- a/src/coreclr/nativeaot/Runtime/eventpipe/ds-rt-aot.h +++ b/src/coreclr/nativeaot/Runtime/eventpipe/ds-rt-aot.h @@ -157,7 +157,7 @@ uint32_t ds_rt_config_value_get_default_port_suspend (void) { STATIC_CONTRACT_NOTHROW; - + uint64_t value; if (RhConfig::Environment::TryGetIntegerValue("DefaultDiagnosticPortSuspend", &value)) { @@ -192,7 +192,7 @@ ds_rt_generate_core_dump ( } const ep_char16_t *dumpName = ds_generate_core_dump_command_payload_get_dump_name (payload); int32_t dumpType = static_cast(ds_generate_core_dump_command_payload_get_dump_type (payload)); - ep_char8_t *dumpNameUtf8 = ep_rt_utf16le_to_utf8_string (dumpName, ep_rt_utf16_string_len (dumpName)); + ep_char8_t *dumpNameUtf8 = ep_rt_utf16le_to_utf8_string (dumpName); extern bool PalGenerateCoreDump(const char* dumpName, int dumpType, uint32_t flags, char* errorMessageBuffer, int cbErrorMessageBuffer); if (PalGenerateCoreDump(dumpNameUtf8, dumpType, flags, errorMessageBuffer, cbErrorMessageBuffer)) { diff --git a/src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.cpp b/src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.cpp index 43fad22110c090..d87900ddd79d77 100644 --- a/src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.cpp +++ b/src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.cpp @@ -94,7 +94,7 @@ ep_rt_aot_entrypoint_assembly_name_get_utf8 (void) if (extension != NULL) { len = extension - process_name_const; } - entrypoint_assembly_name_local = ep_rt_utf16_to_utf8_string(reinterpret_cast(process_name_const), len); + entrypoint_assembly_name_local = ep_rt_utf16_to_utf8_string_n(reinterpret_cast(process_name_const), len); #else const ep_char8_t* process_name_const = strrchr(wszModuleFileName, DIRECTORY_SEPARATOR_CHAR); if (process_name_const != NULL) { @@ -132,7 +132,7 @@ ep_rt_aot_diagnostics_command_line_get (void) // TODO: revisit commandline for AOT #ifdef TARGET_WINDOWS const ep_char16_t* command_line = reinterpret_cast(::GetCommandLineW()); - return ep_rt_utf16_to_utf8_string(command_line, -1); + return ep_rt_utf16_to_utf8_string(command_line); #elif TARGET_LINUX FILE *cmdline_file = ::fopen("/proc/self/cmdline", "r"); if (cmdline_file == nullptr) @@ -431,6 +431,13 @@ ep_rt_aot_system_timestamp_get (void) return static_cast(((static_cast(value.dwHighDateTime)) << 32) | static_cast(value.dwLowDateTime)); } +int32_t +ep_rt_aot_get_os_page_size (void) +{ + STATIC_CONTRACT_NOTHROW; + return (int32_t)OS_PAGE_SIZE; +} + ep_rt_file_handle_t ep_rt_aot_file_open_write (const ep_char8_t *path) { @@ -438,7 +445,7 @@ ep_rt_aot_file_open_write (const ep_char8_t *path) return INVALID_HANDLE_VALUE; #ifdef TARGET_WINDOWS - ep_char16_t *path_utf16 = ep_rt_utf8_to_utf16le_string (path, -1); + ep_char16_t *path_utf16 = ep_rt_utf8_to_utf16le_string (path); if (!path_utf16) return INVALID_HANDLE_VALUE; @@ -502,7 +509,7 @@ uint8_t * ep_rt_aot_valloc0 (size_t buffer_size) { STATIC_CONTRACT_NOTHROW; - return reinterpret_cast(PalVirtualAlloc (NULL, buffer_size, MEM_COMMIT, PAGE_READWRITE)); + return reinterpret_cast(PalVirtualAlloc (buffer_size, PAGE_READWRITE)); } void @@ -513,7 +520,7 @@ ep_rt_aot_vfree ( STATIC_CONTRACT_NOTHROW; if (buffer) - PalVirtualFree (buffer, 0, MEM_RELEASE); + PalVirtualFree (buffer, buffer_size); } void @@ -768,7 +775,7 @@ void ep_rt_aot_os_environment_get_utf16 (dn_vector_ptr_t *env_array) #else ep_char8_t **next = NULL; for (next = environ; *next != NULL; ++next) - dn_vector_ptr_push_back (env_array, ep_rt_utf8_to_utf16le_string (*next, -1)); + dn_vector_ptr_push_back (env_array, ep_rt_utf8_to_utf16le_string (*next)); #endif } diff --git a/src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.h b/src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.h index ec315c0d170979..466fd369be9412 100644 --- a/src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.h +++ b/src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.h @@ -18,6 +18,7 @@ #include #include #include +#include #include "rhassert.h" #include @@ -928,8 +929,12 @@ int32_t ep_rt_system_get_alloc_granularity (void) { STATIC_CONTRACT_NOTHROW; - // return static_cast(g_SystemInfo.dwAllocationGranularity); +#ifdef TARGET_WINDOWS return 0x10000; +#else + extern int32_t ep_rt_aot_get_os_page_size (void); + return ep_rt_aot_get_os_page_size(); +#endif } static @@ -1208,24 +1213,6 @@ ep_rt_utf8_string_compare_ignore_case ( return _stricmp (reinterpret_cast(str1), reinterpret_cast(str2)); } -static -inline -bool -ep_rt_utf8_string_is_null_or_empty (const ep_char8_t *str) -{ - STATIC_CONTRACT_NOTHROW; - - if (str == NULL) - return true; - - while (*str) { - if (!isspace (*str)) - return false; - str++; - } - return true; -} - static inline ep_char8_t * @@ -1314,49 +1301,6 @@ ep_rt_utf8_string_replace ( return false; } - -static -ep_char16_t * -ep_rt_utf8_to_utf16le_string ( - const ep_char8_t *str, - size_t len) -{ - STATIC_CONTRACT_NOTHROW; - - if (!str) - return NULL; - - if (len == (size_t) -1) { - len = strlen(str); - } - - if (len == 0) { - // Return an empty string if the length is 0 - CHAR16_T * lpDestEmptyStr = reinterpret_cast(malloc(1 * sizeof(CHAR16_T))); - if(lpDestEmptyStr==NULL) { - return NULL; - } - *lpDestEmptyStr = '\0'; - return reinterpret_cast(lpDestEmptyStr); - } - - int32_t flags = MINIPAL_MB_NO_REPLACE_INVALID_CHARS | MINIPAL_TREAT_AS_LITTLE_ENDIAN; - - size_t ret = minipal_get_length_utf8_to_utf16 (str, len, flags); - - if (ret <= 0) - return NULL; - - CHAR16_T * lpDestStr = reinterpret_cast(malloc((ret + 1) * sizeof(CHAR16_T))); - if(lpDestStr==NULL) { - return NULL; - } - ret = minipal_convert_utf8_to_utf16 (str, len, lpDestStr, ret, flags); - lpDestStr[ret] = '\0'; - - return reinterpret_cast(lpDestStr); -} - static inline ep_char16_t * @@ -1374,6 +1318,13 @@ ep_rt_utf16_string_dup (const ep_char16_t *str) return str_dup; } +static +ep_char8_t * +ep_rt_utf8_string_alloc (size_t len) +{ + return reinterpret_cast(malloc(len)); +} + static inline void @@ -1397,52 +1348,10 @@ ep_rt_utf16_string_len (const ep_char16_t *str) } static -ep_char8_t * -ep_rt_utf16_to_utf8_string ( - const ep_char16_t *str, - size_t len) -{ - STATIC_CONTRACT_NOTHROW; - if (!str) - return NULL; - - if (len == (size_t) -1) { - len = ep_rt_utf16_string_len (str); - } - - if (len == 0) { - // Return an empty string if the length is 0 - char * lpDestEmptyStr = reinterpret_cast(malloc(1 * sizeof(char))); - if(lpDestEmptyStr==NULL) { - return NULL; - } - *lpDestEmptyStr = '\0'; - return reinterpret_cast(lpDestEmptyStr); - } - - size_t ret = minipal_get_length_utf16_to_utf8 (reinterpret_cast(str), len, 0); - - if (ret <= 0) - return NULL; - - char* lpDestStr = reinterpret_cast(malloc((ret + 1) * sizeof(char))); - if(lpDestStr==NULL) { - return NULL; - } - ret = minipal_convert_utf16_to_utf8 (reinterpret_cast(str), len, lpDestStr, ret, 0); - lpDestStr[ret] = '\0'; - - return reinterpret_cast(lpDestStr); -} - -static -inline -ep_char8_t * -ep_rt_utf16le_to_utf8_string ( - const ep_char16_t *str, - size_t len) +ep_char16_t * +ep_rt_utf16_string_alloc (size_t len) { - return ep_rt_utf16_to_utf8_string (str, len); + return reinterpret_cast(malloc(len * sizeof(ep_char16_t))); } static diff --git a/src/coreclr/nativeaot/Runtime/eventpipe/gen-eventing-event-inc.lst b/src/coreclr/nativeaot/Runtime/eventpipe/gen-eventing-event-inc.lst new file mode 100644 index 00000000000000..197989f134389b --- /dev/null +++ b/src/coreclr/nativeaot/Runtime/eventpipe/gen-eventing-event-inc.lst @@ -0,0 +1,81 @@ +# Native runtime events supported by aot runtime. + +BGC1stConEnd +BGC1stNonConEnd +BGC2ndConBegin +BGC2ndConEnd +BGC2ndNonConBegin +BGC2ndNonConEnd +BGCAllocWaitBegin +BGCAllocWaitEnd +BGCBegin +BGCDrainMark +BGCOverflow +BGCRevisit +ContentionLockCreated +ContentionStart_V2 +ContentionStop_V1 +DecreaseMemoryPressure +DestroyGCHandle +ExceptionThrown_V1 +FinalizeObject +GCAllocationTick_V4 +GCBulkEdge +GCBulkMovedObjectRanges +GCBulkNode +GCBulkRCW +GCBulkRootCCW +GCBulkRootConditionalWeakTableElementEdge +GCBulkRootEdge +GCBulkRootStaticVar +GCBulkSurvivingObjectRanges +GCCreateConcurrentThread_V1 +GCCreateSegment_V1 +GCEnd_V1 +GCFinalizersBegin_V1 +GCFinalizersEnd_V1 +GCFitBucketInfo +GCFreeSegment_V1 +GCFullNotify_V1 +GCGenerationRange +GCGlobalHeapHistory_V4 +GCHeapStats_V1 +GCHeapStats_V2 +GCJoin_V2 +GCLOHCompact +GCMarkFinalizeQueueRoots +GCMarkHandles +GCMarkOlderGenerationRoots +GCMarkStackRoots +GCMarkWithType +GCPerHeapHistory_V3 +GCRestartEEBegin_V1 +GCRestartEEEnd_V1 +GCSampledObjectAllocationHigh +GCSampledObjectAllocationLow +GCSettings +GCStart_V2 +GCSuspendEEBegin_V1 +GCSuspendEEEnd_V1 +GCTerminateConcurrentThread_V1 +GCTriggered +GenAwareBegin +GenAwareEnd +IncreaseMemoryPressure +ModuleLoad_V2 +PinObjectAtGCTime +PinPlugAtGCTime +PrvDestroyGCHandle +PrvSetGCHandle +SetGCHandle +ThreadPoolIODequeue +ThreadPoolIOEnqueue +ThreadPoolIOPack +ThreadPoolMinMaxThreads +ThreadPoolWorkerThreadAdjustmentAdjustment +ThreadPoolWorkerThreadAdjustmentSample +ThreadPoolWorkerThreadAdjustmentStats +ThreadPoolWorkerThreadStart +ThreadPoolWorkerThreadStop +ThreadPoolWorkerThreadWait +ThreadPoolWorkingThreadCount diff --git a/src/coreclr/nativeaot/Runtime/eventpipeadapter.h b/src/coreclr/nativeaot/Runtime/eventpipeadapter.h deleted file mode 100644 index b43c4be3dc7786..00000000000000 --- a/src/coreclr/nativeaot/Runtime/eventpipeadapter.h +++ /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. - -#ifndef EVENTPIPE_ADAPTER_H -#define EVENTPIPE_ADAPTER_H - -#if defined(FEATURE_PERFTRACING) - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "CommonTypes.h" - -class EventPipeAdapter final -{ -public: - static inline EventPipeProvider * CreateProvider(const WCHAR* providerName, EventPipeCallback callback, void* pCallbackContext = nullptr) - { - ep_char8_t *providerNameUTF8 = ep_rt_utf16_to_utf8_string(reinterpret_cast(providerName), -1); - EventPipeProvider * provider = ep_create_provider (providerNameUTF8, callback, pCallbackContext); - ep_rt_utf8_string_free (providerNameUTF8); - return provider; - } - - static inline EventPipeEvent * AddEvent( - EventPipeProvider *provider, - uint32_t eventID, - int64_t keywords, - uint32_t eventVersion, - EventPipeEventLevel level, - bool needStack, - uint8_t *metadata = NULL, - uint32_t metadataLen = 0) - { - return ep_provider_add_event(provider, eventID, keywords, eventVersion, level, needStack, metadata, metadataLen); - } - - static inline void WriteEvent( - EventPipeEvent *ep_event, - uint8_t *data, - uint32_t dataLen, - const GUID * activityId, - const GUID * relatedActivityId) - { - ep_write_event( - ep_event, - data, - dataLen, - reinterpret_cast(activityId), - reinterpret_cast(relatedActivityId)); - } - - static inline void WriteEvent( - EventPipeEvent *ep_event, - EventData *data, - uint32_t dataLen, - const GUID * activityId, - const GUID * relatedActivityId) - { - ep_write_event_2( - ep_event, - data, - dataLen, - reinterpret_cast(activityId), - reinterpret_cast(relatedActivityId)); - } -}; - -#endif // FEATURE_PERFTRACING -#endif // EVENTPIPE_ADAPTER_H diff --git a/src/coreclr/nativeaot/Runtime/eventpipeinternal.cpp b/src/coreclr/nativeaot/Runtime/eventpipeinternal.cpp index ca66bcab379059..0e4f52a80b379f 100644 --- a/src/coreclr/nativeaot/Runtime/eventpipeinternal.cpp +++ b/src/coreclr/nativeaot/Runtime/eventpipeinternal.cpp @@ -2,8 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. #include "common.h" -#include "eventpipeadapter.h" #include "PalRedhawk.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifdef FEATURE_PERFTRACING @@ -59,16 +68,16 @@ EXTERN_C NATIVEAOT_API uint64_t __cdecl RhEventPipeInternal_Enable( for (uint32_t i = 0; i < numProviders; ++i) { ep_provider_config_init ( &configProviders[i], - ep_rt_utf16_to_utf8_string (reinterpret_cast(nativeProviders[i].pProviderName), -1), + ep_rt_utf16_to_utf8_string (reinterpret_cast(nativeProviders[i].pProviderName)), nativeProviders[i].keywords, static_cast(nativeProviders[i].loggingLevel), - ep_rt_utf16_to_utf8_string (reinterpret_cast(nativeProviders[i].pFilterData), -1)); + ep_rt_utf16_to_utf8_string (reinterpret_cast(nativeProviders[i].pFilterData))); } } ep_char8_t *outputPathUTF8 = NULL; if (outputFile) - outputPathUTF8 = ep_rt_utf16_to_utf8_string (reinterpret_cast(outputFile), -1); + outputPathUTF8 = ep_rt_utf16_to_utf8_string (reinterpret_cast(outputFile)); EventPipeSessionID result = ep_enable ( outputPathUTF8, circularBufferSizeInMB, @@ -105,7 +114,9 @@ EXTERN_C NATIVEAOT_API intptr_t __cdecl RhEventPipeInternal_CreateProvider( EventPipeCallback pCallbackFunc, void* pCallbackContext) { - EventPipeProvider* pProvider = EventPipeAdapter::CreateProvider(providerName, pCallbackFunc, pCallbackContext); + ep_char8_t *providerNameUTF8 = ep_rt_utf16_to_utf8_string(reinterpret_cast(providerName)); + EventPipeProvider * pProvider = ep_create_provider (providerNameUTF8, pCallbackFunc, pCallbackContext); + ep_rt_utf8_string_free (providerNameUTF8); return reinterpret_cast(pProvider); } @@ -122,7 +133,7 @@ EXTERN_C NATIVEAOT_API intptr_t __cdecl RhEventPipeInternal_DefineEvent( _ASSERTE(provHandle != 0); EventPipeProvider *pProvider = reinterpret_cast(provHandle); - pEvent = EventPipeAdapter::AddEvent(pProvider, eventID, keywords, eventVersion, (EventPipeEventLevel)level, /* needStack = */ true, (uint8_t *)pMetadata, metadataLength); + pEvent = ep_provider_add_event(pProvider, eventID, keywords, eventVersion, (EventPipeEventLevel)level, /* needStack = */ true, (uint8_t *)pMetadata, metadataLength); _ASSERTE(pEvent != NULL); return reinterpret_cast(pEvent); @@ -133,7 +144,7 @@ EXTERN_C NATIVEAOT_API intptr_t __cdecl RhEventPipeInternal_GetProvider(const WC EventPipeProvider * provider = NULL; if (providerName) { - ep_char8_t *providerNameUTF8 = ep_rt_utf16_to_utf8_string(reinterpret_cast(providerName), -1); + ep_char8_t *providerNameUTF8 = ep_rt_utf16_to_utf8_string(reinterpret_cast(providerName)); provider = ep_get_provider (providerNameUTF8); ep_rt_utf8_string_free(providerNameUTF8); } @@ -222,7 +233,7 @@ EXTERN_C NATIVEAOT_API void __cdecl RhEventPipeInternal_WriteEventData( { _ASSERTE(eventHandle != 0); EventPipeEvent *pEvent = reinterpret_cast(eventHandle); - EventPipeAdapter::WriteEvent(pEvent, pEventData, eventDataCount, pActivityId, pRelatedActivityId); + ep_write_event_2(pEvent, pEventData, eventDataCount, reinterpret_cast(pActivityId), reinterpret_cast(pRelatedActivityId)); } EXTERN_C NATIVEAOT_API UInt32_BOOL __cdecl RhEventPipeInternal_GetSessionInfo(uint64_t sessionID, EventPipeSessionInfo *pSessionInfo) diff --git a/src/coreclr/nativeaot/Runtime/gcrhenv.cpp b/src/coreclr/nativeaot/Runtime/gcrhenv.cpp index 3ec488605c1b33..4146c936fdeee2 100644 --- a/src/coreclr/nativeaot/Runtime/gcrhenv.cpp +++ b/src/coreclr/nativeaot/Runtime/gcrhenv.cpp @@ -489,23 +489,6 @@ void RedhawkGCInterface::ScanStaticRoots(GcScanRootFunction pfnScanCallback, voi UNREFERENCED_PARAMETER(pContext); } -// Enumerate all the object roots located in handle tables. It is only safe to call this from the context of a -// GC. -// -// static -void RedhawkGCInterface::ScanHandleTableRoots(GcScanRootFunction pfnScanCallback, void *pContext) -{ -#if !defined(DACCESS_COMPILE) && defined(FEATURE_EVENT_TRACE) - ScanRootsContext sContext; - sContext.m_pfnCallback = pfnScanCallback; - sContext.m_pContext = pContext; - Ref_ScanPointers(2, 2, (EnumGcRefScanContext*)&sContext, ScanRootsCallbackWrapper); -#else - UNREFERENCED_PARAMETER(pfnScanCallback); - UNREFERENCED_PARAMETER(pContext); -#endif // !DACCESS_COMPILE -} - #ifndef DACCESS_COMPILE uint32_t RedhawkGCInterface::GetGCDescSize(void * pType) diff --git a/src/coreclr/nativeaot/Runtime/gcrhinterface.h b/src/coreclr/nativeaot/Runtime/gcrhinterface.h index 3a70dcb5327c88..b9279e00902157 100644 --- a/src/coreclr/nativeaot/Runtime/gcrhinterface.h +++ b/src/coreclr/nativeaot/Runtime/gcrhinterface.h @@ -141,7 +141,6 @@ class RedhawkGCInterface static void ScanObject(void *pObject, GcScanObjectFunction pfnScanCallback, void *pContext); static void ScanStackRoots(Thread *pThread, GcScanRootFunction pfnScanCallback, void *pContext); static void ScanStaticRoots(GcScanRootFunction pfnScanCallback, void *pContext); - static void ScanHandleTableRoots(GcScanRootFunction pfnScanCallback, void *pContext); // Returns size GCDesc. Used by type cloning. static uint32_t GetGCDescSize(void * pType); diff --git a/src/coreclr/nativeaot/Runtime/rhassert.cpp b/src/coreclr/nativeaot/Runtime/rhassert.cpp index 4ff9062578f6d4..c80437d314125a 100644 --- a/src/coreclr/nativeaot/Runtime/rhassert.cpp +++ b/src/coreclr/nativeaot/Runtime/rhassert.cpp @@ -7,91 +7,32 @@ #include "PalRedhawk.h" #include "rhassert.h" - -#include "RhConfig.h" - #ifdef _DEBUG -#define MB_ABORTRETRYIGNORE 0x00000002L -#define IDABORT 3 -#define IDRETRY 4 -#define IDIGNORE 5 - void Assert(const char * expr, const char * file, uint32_t line_num, const char * message) { -#ifndef DACCESS_COMPILE -#ifdef NO_UI_ASSERT + printf( + "--------------------------------------------------\n" + "Debug Assertion Violation\n\n" + "%s%s%s" + "Expression: '%s'\n\n" + "File: %s, Line: %u\n" + "--------------------------------------------------\n", + message ? ("Message: ") : (""), + message ? (message) : (""), + message ? ("\n\n") : (""), + expr, file, line_num); + + // Flush standard output before failing fast to make sure the assertion failure message + // is retained when tests are being run with redirected stdout. + fflush(stdout); + + // If there's no debugger attached, we just FailFast + if (!PalIsDebuggerPresent()) + PalRaiseFailFastException(NULL, NULL, FAIL_FAST_GENERATE_EXCEPTION_ADDRESS); + + // If there is a debugger attached, we break and then allow continuation. PalDebugBreak(); -#else - if (g_pRhConfig->GetBreakOnAssert()) - { - printf( - "--------------------------------------------------\n" - "Debug Assertion Violation\n\n" - "%s%s%s" - "Expression: '%s'\n\n" - "File: %s, Line: %u\n" - "--------------------------------------------------\n", - message ? ("Message: ") : (""), - message ? (message) : (""), - message ? ("\n\n") : (""), - expr, file, line_num); - - // Flush standard output before failing fast to make sure the assertion failure message - // is retained when tests are being run with redirected stdout. - fflush(stdout); - - // If there's no debugger attached, we just FailFast - if (!PalIsDebuggerPresent()) - PalRaiseFailFastException(NULL, NULL, FAIL_FAST_GENERATE_EXCEPTION_ADDRESS); - - // If there is a debugger attached, we break and then allow continuation. - PalDebugBreak(); - return; - } - - char buffer[4096]; - - sprintf_s(buffer, ARRAY_SIZE(buffer), - "--------------------------------------------------\n" - "Debug Assertion Violation\n\n" - "%s%s%s" - "Expression: '%s'\n\n" - "File: %s, Line: %u\n" - "--------------------------------------------------\n" - "Abort: Exit Immediately\n" - "Retry: DebugBreak()\n" - "Ignore: Keep Going\n" - "--------------------------------------------------\n", - message ? ("Message: ") : (""), - message ? (message) : (""), - message ? ("\n\n") : (""), - expr, file, line_num); - - HANDLE hMod = PalLoadLibraryExW(L"user32.dll", NULL, 0); - int32_t (* pfn)(HANDLE, char *, const char *, uint32_t) = - (int32_t (*)(HANDLE, char *, const char *, uint32_t))PalGetProcAddress(hMod, "MessageBoxA"); - - int32_t result = pfn(NULL, buffer, "Redhawk Assert", MB_ABORTRETRYIGNORE); - - switch (result) - { - case IDABORT: - PalTerminateCurrentProcess(42); - break; - case IDRETRY: - PalDebugBreak(); - break; - case IDIGNORE: - break; - } -#endif -#else - UNREFERENCED_PARAMETER(expr); - UNREFERENCED_PARAMETER(file); - UNREFERENCED_PARAMETER(line_num); - UNREFERENCED_PARAMETER(message); -#endif //!DACCESS_COMPILE } #endif // _DEBUG diff --git a/src/coreclr/nativeaot/Runtime/startup.cpp b/src/coreclr/nativeaot/Runtime/startup.cpp index 32cbab53cb8304..59968f939cd934 100644 --- a/src/coreclr/nativeaot/Runtime/startup.cpp +++ b/src/coreclr/nativeaot/Runtime/startup.cpp @@ -49,8 +49,6 @@ static bool DetectCPUFeatures(); extern RhConfig * g_pRhConfig; -CrstStatic g_ThunkPoolLock; - #if defined(HOST_X86) || defined(HOST_AMD64) || defined(HOST_ARM64) // This field is inspected from the generated code to determine what intrinsics are available. EXTERN_C int g_cpuFeatures; @@ -170,9 +168,6 @@ static bool InitDLL(HANDLE hPalInstance) return false; #endif - if (!g_ThunkPoolLock.InitNoThrow(CrstType::CrstThunkPool)) - return false; - return true; } @@ -297,6 +292,10 @@ static void UninitDLL() Thread* g_threadPerformingShutdown = NULL; #endif +#if defined(_WIN32) && defined(FEATURE_PERFTRACING) +bool g_safeToShutdownTracing; +#endif + static void __cdecl OnProcessExit() { #ifdef _WIN32 @@ -309,8 +308,16 @@ static void __cdecl OnProcessExit() #endif #ifdef FEATURE_PERFTRACING - EventPipe_Shutdown(); - DiagnosticServer_Shutdown(); +#ifdef _WIN32 + // We forgo shutting down event pipe if it wouldn't be safe and could lead to a hang. + // If there was an active trace session, the trace will likely be corrupted without + // orderly shutdown. See https://github.com/dotnet/runtime/issues/89346. + if (g_safeToShutdownTracing) +#endif + { + EventPipe_Shutdown(); + DiagnosticServer_Shutdown(); + } #endif } @@ -348,7 +355,7 @@ void RuntimeThreadShutdown(void* thread) #endif } -extern "C" bool RhInitialize() +extern "C" bool RhInitialize(bool isDll) { if (!PalInit()) return false; @@ -357,6 +364,10 @@ extern "C" bool RhInitialize() atexit(&OnProcessExit); #endif +#if defined(_WIN32) && defined(FEATURE_PERFTRACING) + g_safeToShutdownTracing = !isDll; +#endif + if (!InitDLL(PalGetModuleHandleFromPointer((void*)&RhInitialize))) return false; diff --git a/src/coreclr/nativeaot/Runtime/unix/PalRedhawkUnix.cpp b/src/coreclr/nativeaot/Runtime/unix/PalRedhawkUnix.cpp index 5b184882830a80..886c331d09ff76 100644 --- a/src/coreclr/nativeaot/Runtime/unix/PalRedhawkUnix.cpp +++ b/src/coreclr/nativeaot/Runtime/unix/PalRedhawkUnix.cpp @@ -70,10 +70,6 @@ using std::nullptr_t; #define PAGE_READWRITE 0x04 #define PAGE_EXECUTE_READ 0x20 #define PAGE_EXECUTE_READWRITE 0x40 -#define MEM_COMMIT 0x1000 -#define MEM_RESERVE 0x2000 -#define MEM_DECOMMIT 0x4000 -#define MEM_RELEASE 0x8000 #define WAIT_OBJECT_0 0 #define WAIT_TIMEOUT 258 @@ -792,79 +788,25 @@ static int W32toUnixAccessControl(uint32_t flProtect) return prot; } -REDHAWK_PALEXPORT _Ret_maybenull_ _Post_writable_byte_size_(size) void* REDHAWK_PALAPI PalVirtualAlloc(_In_opt_ void* pAddress, size_t size, uint32_t allocationType, uint32_t protect) +REDHAWK_PALEXPORT _Ret_maybenull_ _Post_writable_byte_size_(size) void* REDHAWK_PALAPI PalVirtualAlloc(size_t size, uint32_t protect) { - // TODO: thread safety! - - if ((allocationType & ~(MEM_RESERVE | MEM_COMMIT)) != 0) - { - // TODO: Implement - return NULL; - } - - ASSERT(((size_t)pAddress & (OS_PAGE_SIZE - 1)) == 0); - - // Align size to whole pages - size = (size + (OS_PAGE_SIZE - 1)) & ~(OS_PAGE_SIZE - 1); int unixProtect = W32toUnixAccessControl(protect); - if (allocationType & (MEM_RESERVE | MEM_COMMIT)) - { - // For Windows compatibility, let the PalVirtualAlloc reserve memory with 64k alignment. - static const size_t Alignment = 64 * 1024; - - size_t alignedSize = size + (Alignment - OS_PAGE_SIZE); - int flags = MAP_ANON | MAP_PRIVATE; + int flags = MAP_ANON | MAP_PRIVATE; #if defined(HOST_APPLE) && defined(HOST_ARM64) - if (unixProtect & PROT_EXEC) - { - flags |= MAP_JIT; - } -#endif - - void * pRetVal = mmap(pAddress, alignedSize, unixProtect, flags, -1, 0); - - if (pRetVal != MAP_FAILED) - { - void * pAlignedRetVal = (void *)(((size_t)pRetVal + (Alignment - 1)) & ~(Alignment - 1)); - size_t startPadding = (size_t)pAlignedRetVal - (size_t)pRetVal; - if (startPadding != 0) - { - int ret = munmap(pRetVal, startPadding); - ASSERT(ret == 0); - } - - size_t endPadding = alignedSize - (startPadding + size); - if (endPadding != 0) - { - int ret = munmap((void *)((size_t)pAlignedRetVal + size), endPadding); - ASSERT(ret == 0); - } - - pRetVal = pAlignedRetVal; - } - - return pRetVal; - } - - if (allocationType & MEM_COMMIT) + if (unixProtect & PROT_EXEC) { - int ret = mprotect(pAddress, size, unixProtect); - return (ret == 0) ? pAddress : NULL; + flags |= MAP_JIT; } +#endif - return NULL; + return mmap(NULL, size, unixProtect, flags, -1, 0); } -REDHAWK_PALEXPORT UInt32_BOOL REDHAWK_PALAPI PalVirtualFree(_In_ void* pAddress, size_t size, uint32_t freeType) +REDHAWK_PALEXPORT void REDHAWK_PALAPI PalVirtualFree(_In_ void* pAddress, size_t size) { - ASSERT(((freeType & MEM_RELEASE) != MEM_RELEASE) || size == 0); - ASSERT((freeType & (MEM_RELEASE | MEM_DECOMMIT)) != (MEM_RELEASE | MEM_DECOMMIT)); - ASSERT(freeType != 0); - - // UNIXTODO: Implement this function - return UInt32_TRUE; + munmap(pAddress, size); } REDHAWK_PALEXPORT UInt32_BOOL REDHAWK_PALAPI PalVirtualProtect(_In_ void* pAddress, size_t size, uint32_t protect) diff --git a/src/coreclr/nativeaot/Runtime/windows/PalRedhawkMinWin.cpp b/src/coreclr/nativeaot/Runtime/windows/PalRedhawkMinWin.cpp index 964a3b52b09e42..eee2b7d3c1ae32 100644 --- a/src/coreclr/nativeaot/Runtime/windows/PalRedhawkMinWin.cpp +++ b/src/coreclr/nativeaot/Runtime/windows/PalRedhawkMinWin.cpp @@ -692,22 +692,15 @@ REDHAWK_PALEXPORT char* PalCopyTCharAsChar(const TCHAR* toCopy) return converted; } -REDHAWK_PALEXPORT _Ret_maybenull_ _Post_writable_byte_size_(size) void* REDHAWK_PALAPI PalVirtualAlloc(_In_opt_ void* pAddress, uintptr_t size, uint32_t allocationType, uint32_t protect) +REDHAWK_PALEXPORT _Ret_maybenull_ _Post_writable_byte_size_(size) void* REDHAWK_PALAPI PalVirtualAlloc(uintptr_t size, uint32_t protect) { - return VirtualAlloc(pAddress, size, allocationType, protect); + return VirtualAlloc(NULL, size, MEM_RESERVE | MEM_COMMIT, protect); } -#pragma warning (push) -#pragma warning (disable:28160) // warnings about invalid potential parameter combinations that would cause VirtualFree to fail - those are asserted for below -REDHAWK_PALEXPORT UInt32_BOOL REDHAWK_PALAPI PalVirtualFree(_In_ void* pAddress, uintptr_t size, uint32_t freeType) +REDHAWK_PALEXPORT void REDHAWK_PALAPI PalVirtualFree(_In_ void* pAddress, uintptr_t size) { - assert(((freeType & MEM_RELEASE) != MEM_RELEASE) || size == 0); - assert((freeType & (MEM_RELEASE | MEM_DECOMMIT)) != (MEM_RELEASE | MEM_DECOMMIT)); - assert(freeType != 0); - - return VirtualFree(pAddress, size, freeType); + VirtualFree(pAddress, 0, MEM_RELEASE); } -#pragma warning (pop) REDHAWK_PALEXPORT UInt32_BOOL REDHAWK_PALAPI PalVirtualProtect(_In_ void* pAddress, uintptr_t size, uint32_t protect) { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/CompatibilitySuppressions.xml b/src/coreclr/nativeaot/System.Private.CoreLib/src/CompatibilitySuppressions.xml index d5fbde8e348dc3..173a55afbadd50 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/CompatibilitySuppressions.xml +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/CompatibilitySuppressions.xml @@ -744,10 +744,6 @@ CP0001 T:Internal.Runtime.CompilerHelpers.ThrowHelpers - - CP0001 - T:Internal.Runtime.CompilerServices.FixupRuntimeTypeHandle - CP0001 T:Internal.Runtime.CompilerServices.FunctionPointerOps @@ -896,10 +892,6 @@ CP0001 T:System.Runtime.InteropServices.UnsafeGCHandle - - CP0001 - T:System.Runtime.RhFailFastReason - CP0001 T:System.Runtime.RuntimeImportAttribute @@ -946,7 +938,7 @@ CP0002 - M:System.Reflection.MethodBase.GetParametersNoCopy + M:System.Reflection.MethodBase.GetParametersAsSpan CP0002 @@ -959,43 +951,29 @@ CP0015 M:System.Diagnostics.Tracing.EventSource.Write``1(System.String,``0):[T:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute] - ref/net8.0/System.Private.CoreLib.dll - lib/net8.0/System.Private.CoreLib.dll CP0015 M:System.Diagnostics.Tracing.EventSource.Write``1(System.String,System.Diagnostics.Tracing.EventSourceOptions@,``0@):[T:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute] - ref/net8.0/System.Private.CoreLib.dll - lib/net8.0/System.Private.CoreLib.dll CP0015 M:System.Diagnostics.Tracing.EventSource.Write``1(System.String,System.Diagnostics.Tracing.EventSourceOptions@,System.Guid@,System.Guid@,``0@):[T:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute] - ref/net8.0/System.Private.CoreLib.dll - lib/net8.0/System.Private.CoreLib.dll CP0015 M:System.Diagnostics.Tracing.EventSource.WriteEvent(System.Int32,System.Object[]):[T:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute] - ref/net8.0/System.Private.CoreLib.dll - lib/net8.0/System.Private.CoreLib.dll CP0015 M:System.Diagnostics.Tracing.EventSource.WriteEventCore(System.Int32,System.Int32,System.Diagnostics.Tracing.EventSource.EventData*):[T:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute] - ref/net8.0/System.Private.CoreLib.dll - lib/net8.0/System.Private.CoreLib.dll CP0015 M:System.Diagnostics.Tracing.EventSource.WriteEventWithRelatedActivityId(System.Int32,System.Guid,System.Object[]):[T:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute] - ref/net8.0/System.Private.CoreLib.dll - lib/net8.0/System.Private.CoreLib.dll CP0015 M:System.Diagnostics.Tracing.EventSource.WriteEventWithRelatedActivityIdCore(System.Int32,System.Guid*,System.Int32,System.Diagnostics.Tracing.EventSource.EventData*):[T:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute] - ref/net8.0/System.Private.CoreLib.dll - lib/net8.0/System.Private.CoreLib.dll diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/DeveloperExperience/DeveloperExperience.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/DeveloperExperience/DeveloperExperience.cs index 5fd8c51adb8e06..c772cd2b0f0c4b 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/DeveloperExperience/DeveloperExperience.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/DeveloperExperience/DeveloperExperience.cs @@ -32,9 +32,9 @@ private static bool IsMetadataStackTraceResolutionDisabled() return disableMetadata; } - public virtual string CreateStackTraceString(IntPtr ip, bool includeFileInfo) + public virtual string CreateStackTraceString(IntPtr ip, bool includeFileInfo, out bool isStackTraceHidden) { - string methodName = GetMethodName(ip, out IntPtr methodStart); + string methodName = GetMethodName(ip, out IntPtr methodStart, out isStackTraceHidden); if (methodName != null) { if (ip != methodStart) @@ -58,7 +58,7 @@ public virtual string CreateStackTraceString(IntPtr ip, bool includeFileInfo) return $"{fileNameWithoutExtension}!+0x{rva:x}"; } - internal static string GetMethodName(IntPtr ip, out IntPtr methodStart) + internal static string GetMethodName(IntPtr ip, out IntPtr methodStart, out bool isStackTraceHidden) { methodStart = IntPtr.Zero; if (!IsMetadataStackTraceResolutionDisabled()) @@ -69,10 +69,11 @@ internal static string GetMethodName(IntPtr ip, out IntPtr methodStart) methodStart = RuntimeImports.RhFindMethodStartAddress(ip); if (methodStart != IntPtr.Zero) { - return stackTraceCallbacks.TryGetMethodNameFromStartAddress(methodStart); + return stackTraceCallbacks.TryGetMethodNameFromStartAddress(methodStart, out isStackTraceHidden); } } } + isStackTraceHidden = false; return null; } @@ -101,14 +102,6 @@ public virtual void TryGetMethodBase(IntPtr methodStartAddress, out MethodBase m } } - public virtual bool OnContractFailure(string? stackTrace, ContractFailureKind contractFailureKind, string? displayMessage, string userMessage, string conditionText, Exception innerException) - { - Debug.WriteLine("Assertion failed: " + (displayMessage ?? "")); - if (Debugger.IsAttached) - Debugger.Break(); - return false; - } - public static DeveloperExperience Default { get diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Extensions/NonPortable/CustomAttributeInheritanceRules.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Extensions/NonPortable/CustomAttributeInheritanceRules.cs index 56259b1b895215..bb7d373739edce 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Extensions/NonPortable/CustomAttributeInheritanceRules.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Extensions/NonPortable/CustomAttributeInheritanceRules.cs @@ -235,7 +235,7 @@ public sealed override ParameterInfo GetParent(ParameterInfo e) if (e.Position >= 0) { - return methodParent.GetParametersNoCopy()[e.Position]; + return methodParent.GetParametersAsSpan()[e.Position]; } else { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Extensions/NonPortable/CustomAttributeInstantiator.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Extensions/NonPortable/CustomAttributeInstantiator.cs index 1d29f988599356..8c1ee196f32eac 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Extensions/NonPortable/CustomAttributeInstantiator.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Extensions/NonPortable/CustomAttributeInstantiator.cs @@ -40,11 +40,11 @@ public static Attribute Instantiate(this CustomAttributeData cad) // Find the public constructor that matches the supplied arguments. // ConstructorInfo? matchingCtor = null; - ParameterInfo[]? matchingParameters = null; + ReadOnlySpan matchingParameters = default; IList constructorArguments = cad.ConstructorArguments; foreach (ConstructorInfo ctor in attributeType.GetConstructors(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)) { - ParameterInfo[] parameters = ctor.GetParametersNoCopy(); + ReadOnlySpan parameters = ctor.GetParametersAsSpan(); if (parameters.Length != constructorArguments.Count) continue; int i; @@ -68,7 +68,7 @@ public static Attribute Instantiate(this CustomAttributeData cad) // // Found the right constructor. Instantiate the Attribute. // - int arity = matchingParameters!.Length; + int arity = matchingParameters.Length; object?[] invokeArguments = new object[arity]; for (int i = 0; i < arity; i++) { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/Augments/RuntimeAugments.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/Augments/RuntimeAugments.cs index 3aaf11fd0ef336..ce194bb2fcad52 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/Augments/RuntimeAugments.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/Augments/RuntimeAugments.cs @@ -569,11 +569,6 @@ public static bool HasCctor(RuntimeTypeHandle typeHandle) return typeHandle.ToEETypePtr().HasCctor; } - public static RuntimeTypeHandle RuntimeTypeHandleOf() - { - return new RuntimeTypeHandle(EETypePtr.EETypePtrOf()); - } - public static IntPtr ResolveDispatchOnType(RuntimeTypeHandle instanceType, RuntimeTypeHandle interfaceType, int slot) { return RuntimeImports.RhResolveDispatchOnType(CreateEETypePtr(instanceType), CreateEETypePtr(interfaceType), checked((ushort)slot)); @@ -811,7 +806,7 @@ public static string TryGetMethodDisplayStringFromIp(IntPtr ip) if (ip == IntPtr.Zero) return null; - return callbacks.TryGetMethodNameFromStartAddress(ip); + return callbacks.TryGetMethodNameFromStartAddress(ip, out _); } private static volatile ReflectionExecutionDomainCallbacks s_reflectionExecutionDomainCallbacks; @@ -819,7 +814,7 @@ public static string TryGetMethodDisplayStringFromIp(IntPtr ip) public static object CreateThunksHeap(IntPtr commonStubAddress) { - object newHeap = RuntimeImports.RhCreateThunksHeap(commonStubAddress); + object? newHeap = ThunksHeap.CreateThunksHeap(commonStubAddress); if (newHeap == null) throw new OutOfMemoryException(); return newHeap; @@ -827,7 +822,7 @@ public static object CreateThunksHeap(IntPtr commonStubAddress) public static IntPtr AllocateThunk(object thunksHeap) { - IntPtr newThunk = RuntimeImports.RhAllocateThunk(thunksHeap); + IntPtr newThunk = ((ThunksHeap)thunksHeap).AllocateThunk(); if (newThunk == IntPtr.Zero) throw new OutOfMemoryException(); return newThunk; @@ -835,22 +830,22 @@ public static IntPtr AllocateThunk(object thunksHeap) public static void FreeThunk(object thunksHeap, IntPtr thunkAddress) { - RuntimeImports.RhFreeThunk(thunksHeap, thunkAddress); + ((ThunksHeap)thunksHeap).FreeThunk(thunkAddress); } public static void SetThunkData(object thunksHeap, IntPtr thunkAddress, IntPtr context, IntPtr target) { - RuntimeImports.RhSetThunkData(thunksHeap, thunkAddress, context, target); + ((ThunksHeap)thunksHeap).SetThunkData(thunkAddress, context, target); } public static bool TryGetThunkData(object thunksHeap, IntPtr thunkAddress, out IntPtr context, out IntPtr target) { - return RuntimeImports.RhTryGetThunkData(thunksHeap, thunkAddress, out context, out target); + return ((ThunksHeap)thunksHeap).TryGetThunkData(thunkAddress, out context, out target); } public static int GetThunkSize() { - return RuntimeImports.RhGetThunkSize(); + return RuntimeImports.RhpGetThunkSize(); } public static Delegate CreateObjectArrayDelegate(Type delegateType, Func invoker) diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/Augments/StackTraceMetadataCallbacks.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/Augments/StackTraceMetadataCallbacks.cs index 86fa2082186d77..fbfb2172541fb5 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/Augments/StackTraceMetadataCallbacks.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/Augments/StackTraceMetadataCallbacks.cs @@ -22,7 +22,8 @@ public abstract class StackTraceMetadataCallbacks /// Return null if stack trace information is not available. /// /// Memory address representing the start of a method + /// Returns a value indicating whether the method should be hidden in stack traces /// Formatted method name or null if metadata for the method is not available - public abstract string TryGetMethodNameFromStartAddress(IntPtr methodStartAddress); + public abstract string TryGetMethodNameFromStartAddress(IntPtr methodStartAddress, out bool isStackTraceHidden); } } diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerServices/FixupRuntimeTypeHandle.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerServices/FixupRuntimeTypeHandle.cs deleted file mode 100644 index 53ce39b83a4ca0..00000000000000 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerServices/FixupRuntimeTypeHandle.cs +++ /dev/null @@ -1,39 +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 Internal.Runtime; - -namespace Internal.Runtime.CompilerServices -{ - public unsafe struct FixupRuntimeTypeHandle - { - private IntPtr _value; - - public FixupRuntimeTypeHandle(RuntimeTypeHandle runtimeTypeHandle) - { - _value = *(IntPtr*)&runtimeTypeHandle; - } - - public RuntimeTypeHandle RuntimeTypeHandle - { - get - { - // Managed debugger uses this logic to figure out the interface's type - // Update managed debugger too whenever this is changed. - // See CordbObjectValue::WalkPtrAndTypeData in debug\dbi\values.cpp - - if (((_value.ToInt64()) & IndirectionConstants.IndirectionCellPointer) != 0) - { - return *(RuntimeTypeHandle*)(_value.ToInt64() - IndirectionConstants.IndirectionCellPointer); - } - else - { - RuntimeTypeHandle returnValue = default(RuntimeTypeHandle); - *(IntPtr*)&returnValue = _value; - return returnValue; - } - } - } - } -} diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/MethodTable.Runtime.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/MethodTable.Runtime.cs index 474f550bbb63df..a4ee0179f159bb 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/MethodTable.Runtime.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/MethodTable.Runtime.cs @@ -12,10 +12,15 @@ namespace Internal.Runtime internal unsafe partial struct MethodTable { #if !INPLACE_RUNTIME - internal MethodTable* GetArrayEEType() + internal static MethodTable* GetArrayEEType() { - return EETypePtr.EETypePtrOf().ToPointer(); + return MethodTable.Of(); + } + + internal static bool AreSameType(MethodTable* mt1, MethodTable* mt2) + { + return mt1 == mt2; } #endif } diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/ThreadStatics.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/ThreadStatics.cs index 61061564af7292..33b4ce5fcb60a6 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/ThreadStatics.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/ThreadStatics.cs @@ -36,7 +36,7 @@ internal static unsafe object GetInlinedThreadStaticBaseSlow(ref object? threadS { Debug.Assert(threadStorage == null); // Allocate an object that will represent a memory block for all thread static fields - TypeManagerHandle typeManager = EETypePtr.EETypePtrOf().ToPointer()->TypeManager; + TypeManagerHandle typeManager = MethodTable.Of()->TypeManager; object threadStaticBase = AllocateThreadStaticStorageForType(typeManager, 0); // register the storage location with the thread for GC reporting. 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 5b97cc9d8464c4..77ffe18b4c4f17 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 @@ -111,7 +111,6 @@ - @@ -201,6 +200,7 @@ + @@ -347,6 +347,9 @@ Internal\Runtime\CanonTypeKind.cs + + System\Runtime\RhFailFastReason.cs + Internal\Runtime\MethodTable.cs @@ -538,9 +541,6 @@ Runtime.Base\src\System\Runtime\StackFrameIterator.cs - - Runtime.Base\src\System\Runtime\ThunkPool.cs - Runtime.Base\src\System\Runtime\TypeCast.cs diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/ActivatorImplementation.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/ActivatorImplementation.cs index c4c9c1ed397c29..b5ff4f3480157d 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/ActivatorImplementation.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/ActivatorImplementation.cs @@ -99,7 +99,7 @@ public static object CreateInstance( binder ??= Type.DefaultBinder; MethodBase invokeMethod = binder.BindToMethod(bindingAttr, matches.ToArray(), ref args, null, culture, null, out object? state); - if (invokeMethod.GetParametersNoCopy().Length == 0) + if (invokeMethod.GetParametersAsSpan().Length == 0) { if (args.Length != 0) { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Array.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Array.NativeAot.cs index 1cb5604cefbd58..8115756c8dca58 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Array.NativeAot.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Array.NativeAot.cs @@ -52,7 +52,7 @@ internal unsafe bool IsSzArray [RuntimeExport("GetSystemArrayEEType")] private static unsafe MethodTable* GetSystemArrayEEType() { - return EETypePtr.EETypePtrOf().ToPointer(); + return MethodTable.Of(); } [RequiresDynamicCode("The code for an array of the specified type might not be available.")] diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/CrashInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/CrashInfo.cs index 8a2f33c93f1f8c..0998720acaf408 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/CrashInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/CrashInfo.cs @@ -111,6 +111,7 @@ private bool WriteHeader(RhFailFastReason reason, ulong crashingThreadId, string CrashReason crashReason = reason switch { + RhFailFastReason.AssertionFailure or RhFailFastReason.EnvironmentFailFast => CrashReason.EnvironmentFailFast, RhFailFastReason.InternalError => CrashReason.InternalFailFast, RhFailFastReason.UnhandledException or @@ -249,7 +250,7 @@ private bool WriteStackFrame(StackFrame frame, int maxNameSize) if (!WriteHexValue("offset"u8, frame.GetNativeOffset())) return false; - string method = DeveloperExperience.GetMethodName(ip, out IntPtr _); + string method = DeveloperExperience.GetMethodName(ip, out _, out _); if (method != null) { if (!WriteStringValue("name"u8, method, maxNameSize)) diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Diagnostics/StackFrame.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Diagnostics/StackFrame.NativeAot.cs index e920b34259fede..24a8a13afd3e9e 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Diagnostics/StackFrame.NativeAot.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Diagnostics/StackFrame.NativeAot.cs @@ -142,7 +142,7 @@ internal bool HasMethod() /// private bool AppendStackFrameWithoutMethodBase(StringBuilder builder) { - builder.Append(DeveloperExperience.Default.CreateStackTraceString(_ipAddress, includeFileInfo: false)); + builder.Append(DeveloperExperience.Default.CreateStackTraceString(_ipAddress, includeFileInfo: false, out _)); return true; } @@ -161,11 +161,15 @@ internal void AppendToStackTrace(StringBuilder builder) { if (_ipAddress != Exception.EdiSeparator) { - // Passing a default string for "at" in case SR.UsingResourceKeys() is true - // as this is a special case and we don't want to have "Word_At" on stack traces. - string word_At = SR.UsingResourceKeys() ? "at" : SR.Word_At; - builder.Append(" ").Append(word_At).Append(' '); - builder.AppendLine(DeveloperExperience.Default.CreateStackTraceString(_ipAddress, _needFileInfo)); + string s = DeveloperExperience.Default.CreateStackTraceString(_ipAddress, _needFileInfo, out bool isStackTraceHidden); + if (!isStackTraceHidden) + { + // Passing a default string for "at" in case SR.UsingResourceKeys() is true + // as this is a special case and we don't want to have "Word_At" on stack traces. + string word_At = SR.UsingResourceKeys() ? "at" : SR.Word_At; + builder.Append(" ").Append(word_At).Append(' '); + builder.AppendLine(s); + } } if (_isLastFrameFromForeignExceptionStackTrace) { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Environment.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Environment.NativeAot.cs index 10312e4473b902..857d69d67e296d 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Environment.NativeAot.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Environment.NativeAot.cs @@ -35,23 +35,16 @@ public static void Exit(int exitCode) // to assign blame for crashes. Don't mess with this, such as by making it call // another managed helper method, unless you consult with some CLR Watson experts. [DoesNotReturn] - public static void FailFast(string message) => + public static void FailFast(string? message) => RuntimeExceptionHelpers.FailFast(message); [DoesNotReturn] - public static void FailFast(string message, Exception exception) => + public static void FailFast(string? message, Exception? exception) => RuntimeExceptionHelpers.FailFast(message, exception); - internal static void FailFast(string message, Exception exception, string _ /*errorSource*/) - { - // TODO: errorSource originates from CoreCLR (See: https://github.com/dotnet/coreclr/pull/15895) - // For now, we ignore errorSource but we should distinguish the way FailFast prints exception message using errorSource - bool result = DeveloperExperience.Default.OnContractFailure(exception.StackTrace, ContractFailureKind.Assert, message, null, null, null); - if (!result) - { - RuntimeExceptionHelpers.FailFast(message, exception); - } - } + // Used by System.Diagnostics.Debug.Assert/Fail + internal static void FailFast(string? message, Exception? exception, string errorSource) => + RuntimeExceptionHelpers.FailFast(message, exception, errorSource: errorSource, reason: RhFailFastReason.AssertionFailure); private static int GetProcessorCount() => Runtime.RuntimeImports.RhGetProcessCpuCount(); 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 5ebcfc6c0771c1..3d263d5de6b63d 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 @@ -869,7 +869,6 @@ public static TimeSpan GetTotalPauseDuration() return new TimeSpan(RuntimeImports.RhGetTotalPauseDuration()); } - [System.Runtime.Versioning.RequiresPreviewFeaturesAttribute("RefreshMemoryLimit is in preview.")] public static void RefreshMemoryLimit() { ulong heapHardLimit = (AppContext.GetData("GCHeapHardLimit") as ulong?) ?? ulong.MaxValue; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/ConstructorInvoker.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/ConstructorInvoker.cs index 4ae10a2fe866e8..0d98883bfaa9dc 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/ConstructorInvoker.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/ConstructorInvoker.cs @@ -18,7 +18,7 @@ public sealed class ConstructorInvoker internal ConstructorInvoker(RuntimeConstructorInfo constructor) { _methodBaseInvoker = constructor.MethodInvoker; - _parameterCount = constructor.GetParametersNoCopy().Length; + _parameterCount = constructor.GetParametersAsSpan().Length; _declaringTypeHandle = constructor.DeclaringType.TypeHandle; } diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/DynamicInvokeInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/DynamicInvokeInfo.cs index 04caa2251bbdd5..516df984232882 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/DynamicInvokeInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/DynamicInvokeInfo.cs @@ -61,7 +61,7 @@ public DynamicInvokeInfo(MethodBase method, IntPtr invokeThunk) // _isValueTypeInstanceMethod = method.DeclaringType?.IsValueType ?? false; - ParameterInfo[] parameters = method.GetParametersNoCopy(); + ReadOnlySpan parameters = method.GetParametersAsSpan(); _argumentCount = parameters.Length; @@ -579,7 +579,7 @@ private unsafe ref byte InvokeDirectWithFewArguments( private unsafe object? GetCoercedDefaultValue(int index, in ArgumentInfo argumentInfo) { - object? defaultValue = Method.GetParametersNoCopy()[index].DefaultValue; + object? defaultValue = Method.GetParametersAsSpan()[index].DefaultValue; if (defaultValue == DBNull.Value) throw new ArgumentException(SR.Arg_VarMissNull, "parameters"); diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/MethodBase.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/MethodBase.NativeAot.cs index ecc6242f7e7905..37db7595ab5851 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/MethodBase.NativeAot.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/MethodBase.NativeAot.cs @@ -16,7 +16,7 @@ public abstract partial class MethodBase : MemberInfo public static MethodBase GetCurrentMethod() { throw NotImplemented.ByDesign; } //Implemented by toolchain. // This is not an api but needs to be declared public so that System.Private.Reflection.Core can access (and override it) - public virtual ParameterInfo[] GetParametersNoCopy() => GetParameters(); + public virtual ReadOnlySpan GetParametersAsSpan() => GetParameters(); // // MethodBase MetadataDefinitionMethod { get; } diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs index c200a702c7a430..4d617f522ab21e 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs @@ -17,7 +17,7 @@ public sealed class MethodInvoker internal MethodInvoker(RuntimeMethodInfo method) { _methodBaseInvoker = method.MethodInvoker; - _parameterCount = method.GetParametersNoCopy().Length; + _parameterCount = method.GetParametersAsSpan().Length; } internal MethodInvoker(RuntimeConstructorInfo constructor) diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/MemberPolicies.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/MemberPolicies.cs index db486a10486e6d..b765a8394ad9f0 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/MemberPolicies.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/MemberPolicies.cs @@ -88,8 +88,8 @@ protected static bool AreNamesAndSignaturesEqual(MethodInfo method1, MethodInfo if (method1.Name != method2.Name) return false; - ParameterInfo[] p1 = method1.GetParametersNoCopy(); - ParameterInfo[] p2 = method2.GetParametersNoCopy(); + ReadOnlySpan p1 = method1.GetParametersAsSpan(); + ReadOnlySpan p2 = method2.GetParametersAsSpan(); if (p1.Length != p2.Length) return false; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/Shared.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/Shared.cs index ae8598c75e9f7b..3c5486b89819ca 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/Shared.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/Shared.cs @@ -40,7 +40,7 @@ public static bool QualifiesBasedOnParameterCount(this MethodBase methodBase, Bi #endregion #region ArgumentTypes - ParameterInfo[] parameterInfos = methodBase.GetParametersNoCopy(); + ReadOnlySpan parameterInfos = methodBase.GetParametersAsSpan(); if (argumentTypes.Length != parameterInfos.Length) { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/CustomAttributes/RuntimeCustomAttributeData.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/CustomAttributes/RuntimeCustomAttributeData.cs index a181e5deec7e49..10072b006c00ef 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/CustomAttributes/RuntimeCustomAttributeData.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/CustomAttributes/RuntimeCustomAttributeData.cs @@ -72,7 +72,7 @@ protected static ConstructorInfo ResolveAttributeConstructor( int parameterCount = parameterTypes.Length; foreach (ConstructorInfo candidate in attributeType.GetConstructors(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)) { - ParameterInfo[] candidateParameters = candidate.GetParametersNoCopy(); + ReadOnlySpan candidateParameters = candidate.GetParametersAsSpan(); if (parameterCount != candidateParameters.Length) continue; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/EventInfos/RuntimeEventInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/EventInfos/RuntimeEventInfo.cs index 8b0ba5c6e55fb0..2ad4e585957e2a 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/EventInfos/RuntimeEventInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/EventInfos/RuntimeEventInfo.cs @@ -110,7 +110,7 @@ public sealed override MethodInfo RemoveMethod public sealed override string ToString() { MethodInfo addMethod = this.AddMethod; - ParameterInfo[] parameters = addMethod.GetParametersNoCopy(); + ReadOnlySpan parameters = addMethod.GetParametersAsSpan(); if (parameters.Length == 0) throw new InvalidOperationException(); // Legacy: Why is a ToString() intentionally throwing an exception? RuntimeParameterInfo runtimeParameterInfo = (RuntimeParameterInfo)(parameters[0]); diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/Helpers.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/Helpers.cs index 354d56e6a26dee..ced17c84f44b44 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/Helpers.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/Helpers.cs @@ -109,7 +109,12 @@ public static TypeLoadException CreateTypeLoadException(string typeName, string public static string EscapeTypeNameIdentifier(this string identifier) { // Some characters in a type name need to be escaped + + // We're avoiding calling into MemoryExtensions here as it has paths that lead to reflection, + // and that would lead to an infinite loop given that this is the implementation of reflection. +#pragma warning disable CA1870 // Use a cached 'SearchValues' instance if (identifier != null && identifier.IndexOfAny(s_charsToEscape) != -1) +#pragma warning restore CA1870 { StringBuilder sbEscapedName = new StringBuilder(identifier.Length); foreach (char c in identifier) diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/ReflectionCoreCallbacksImplementation.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/ReflectionCoreCallbacksImplementation.cs index c156d8e938d186..80b877e6fc0e8d 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/ReflectionCoreCallbacksImplementation.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/ReflectionCoreCallbacksImplementation.cs @@ -304,7 +304,7 @@ private static RuntimeMethodInfo LookupMethodForCreateDelegate(RuntimeTypeInfo r bindingFlags |= BindingFlags.IgnoreCase; } RuntimeMethodInfo invokeMethod = runtimeDelegateType.GetInvokeMethod(); - ParameterInfo[] parameters = invokeMethod.GetParametersNoCopy(); + ReadOnlySpan parameters = invokeMethod.GetParametersAsSpan(); int numParameters = parameters.Length; Type[] parameterTypes = new Type[numParameters]; for (int i = 0; i < numParameters; i++) diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/CustomMethodMapper.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/CustomMethodMapper.cs index 0de913d3bc8855..0469a7bd2ed2b5 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/CustomMethodMapper.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/CustomMethodMapper.cs @@ -30,7 +30,7 @@ public static MethodBaseInvoker GetCustomMethodInvokerIfNeeded(this MethodBase m if (!map.TryGetValue(methodBase.MetadataDefinitionMethod, out CustomMethodInvokerAction? action)) return null; - ParameterInfo[] parameterInfos = methodBase.GetParametersNoCopy(); + ReadOnlySpan parameterInfos = methodBase.GetParametersAsSpan(); Type[] parameterTypes = new Type[parameterInfos.Length]; for (int i = 0; i < parameterInfos.Length; i++) { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeConstructorInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeConstructorInfo.cs index 1b56abb1e39b11..d41c672a5161ac 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeConstructorInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeConstructorInfo.cs @@ -54,7 +54,7 @@ public sealed override ParameterInfo[] GetParameters() return result; } - public sealed override ParameterInfo[] GetParametersNoCopy() + public sealed override ReadOnlySpan GetParametersAsSpan() { return RuntimeParameters; } diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeMethodInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeMethodInfo.cs index 397105b40863e8..ba041558a334c1 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeMethodInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeMethodInfo.cs @@ -151,7 +151,7 @@ public sealed override ParameterInfo[] GetParameters() return result; } - public sealed override ParameterInfo[] GetParametersNoCopy() + public sealed override ReadOnlySpan GetParametersAsSpan() { return RuntimeParameters; } @@ -325,18 +325,16 @@ internal Delegate CreateDelegateNoThrowOnBindFailure(RuntimeTypeInfo runtimeDele return null; } -#pragma warning disable CA1859 // Use concrete types when possible for improved performance https://github.com/dotnet/roslyn-analyzers/issues/6751 - IList delegateParameters = invokeMethod.GetParametersNoCopy(); - IList targetParameters = this.GetParametersNoCopy(); -#pragma warning restore CA1859 - IEnumerator delegateParameterEnumerator = delegateParameters.GetEnumerator(); - IEnumerator targetParameterEnumerator = targetParameters.GetEnumerator(); + ReadOnlySpan delegateParameters = invokeMethod.GetParametersAsSpan(); + ReadOnlySpan targetParameters = this.GetParametersAsSpan(); + ReadOnlySpan.Enumerator delegateParameterEnumerator = delegateParameters.GetEnumerator(); + ReadOnlySpan.Enumerator targetParameterEnumerator = targetParameters.GetEnumerator(); bool isStatic = this.IsStatic; bool isOpen; if (isStatic) { - if (delegateParameters.Count == targetParameters.Count) + if (delegateParameters.Length == targetParameters.Length) { // Open static: This is the "typical" case of calling a static method. isOpen = true; @@ -358,7 +356,7 @@ internal Delegate CreateDelegateNoThrowOnBindFailure(RuntimeTypeInfo runtimeDele } else { - if (delegateParameters.Count == targetParameters.Count) + if (delegateParameters.Length == targetParameters.Length) { // Closed instance: This is the "typical" case of invoking an instance method. isOpen = false; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.BindingFlags.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.BindingFlags.cs index 35ae4a96ea7c28..bee3e2f9d1aad5 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.BindingFlags.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.BindingFlags.cs @@ -33,8 +33,7 @@ protected sealed override ConstructorInfo GetConstructorImpl(BindingFlags bindin if (types.Length == 0 && candidates.Count == 1) { ConstructorInfo firstCandidate = candidates[0]; - ParameterInfo[] parameters = firstCandidate.GetParametersNoCopy(); - if (parameters.Length == 0) + if (firstCandidate.GetParametersAsSpan().Length == 0) return firstCandidate; } diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.InvokeMember.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.InvokeMember.cs index b0e4ddcd9f41de..bf63ff4ca89444 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.InvokeMember.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.InvokeMember.cs @@ -363,7 +363,7 @@ internal abstract partial class RuntimeTypeInfo #region Invoke if (finalists == null && argCnt == 0 && - finalist.GetParametersNoCopy().Length == 0 && + finalist.GetParametersAsSpan().Length == 0 && (bindingFlags & BindingFlags.OptionalParamBinding) == 0) { //if (useCache && argCnt == props[0].GetParameters().Length) diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/RuntimeImports.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/RuntimeImports.cs index 6c6d682cda5d62..a2cba6759a0ac6 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/RuntimeImports.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/RuntimeImports.cs @@ -342,6 +342,38 @@ internal static IntPtr RhHandleAllocDependent(object primary, object secondary) [RuntimeImport(RuntimeLibrary, "RhHandleSetDependentSecondary")] internal static extern void RhHandleSetDependentSecondary(IntPtr handle, object secondary); + // + // calls to runtime for thunk pool + // + + [RuntimeImport(RuntimeLibrary, "RhpGetNumThunkBlocksPerMapping")] + [MethodImpl(MethodImplOptions.InternalCall)] + internal static extern int RhpGetNumThunkBlocksPerMapping(); + + [RuntimeImport(RuntimeLibrary, "RhpGetNumThunksPerBlock")] + [MethodImpl(MethodImplOptions.InternalCall)] + internal static extern int RhpGetNumThunksPerBlock(); + + [RuntimeImport(RuntimeLibrary, "RhpGetThunkSize")] + [MethodImpl(MethodImplOptions.InternalCall)] + internal static extern int RhpGetThunkSize(); + + [RuntimeImport(RuntimeLibrary, "RhpGetThunkDataBlockAddress")] + [MethodImpl(MethodImplOptions.InternalCall)] + internal static extern IntPtr RhpGetThunkDataBlockAddress(IntPtr thunkStubAddress); + + [RuntimeImport(RuntimeLibrary, "RhpGetThunkStubsBlockAddress")] + [MethodImpl(MethodImplOptions.InternalCall)] + internal static extern IntPtr RhpGetThunkStubsBlockAddress(IntPtr thunkDataAddress); + + [RuntimeImport(RuntimeLibrary, "RhpGetThunkBlockSize")] + [MethodImpl(MethodImplOptions.InternalCall)] + internal static extern int RhpGetThunkBlockSize(); + + [LibraryImport(RuntimeLibrary, EntryPoint = "RhAllocateThunksMapping")] + [UnmanagedCallConv(CallConvs = new Type[] { typeof(CallConvCdecl) })] + internal static partial IntPtr RhAllocateThunksMapping(); + // // calls to runtime for type equality checks // @@ -467,30 +499,6 @@ internal static unsafe int RhCompatibleReentrantWaitAny(bool alertable, int time [RuntimeImport(RuntimeLibrary, "RhpResolveInterfaceMethod")] internal static extern IntPtr RhpResolveInterfaceMethod(object pObject, IntPtr pCell); - [MethodImplAttribute(MethodImplOptions.InternalCall)] - [RuntimeImport(RuntimeLibrary, "RhCreateThunksHeap")] - internal static extern object RhCreateThunksHeap(IntPtr commonStubAddress); - - [MethodImplAttribute(MethodImplOptions.InternalCall)] - [RuntimeImport(RuntimeLibrary, "RhAllocateThunk")] - internal static extern IntPtr RhAllocateThunk(object thunksHeap); - - [MethodImplAttribute(MethodImplOptions.InternalCall)] - [RuntimeImport(RuntimeLibrary, "RhFreeThunk")] - internal static extern void RhFreeThunk(object thunksHeap, IntPtr thunkAddress); - - [MethodImplAttribute(MethodImplOptions.InternalCall)] - [RuntimeImport(RuntimeLibrary, "RhSetThunkData")] - internal static extern void RhSetThunkData(object thunksHeap, IntPtr thunkAddress, IntPtr context, IntPtr target); - - [MethodImplAttribute(MethodImplOptions.InternalCall)] - [RuntimeImport(RuntimeLibrary, "RhTryGetThunkData")] - internal static extern bool RhTryGetThunkData(object thunksHeap, IntPtr thunkAddress, out IntPtr context, out IntPtr target); - - [MethodImplAttribute(MethodImplOptions.InternalCall)] - [RuntimeImport(RuntimeLibrary, "RhGetThunkSize")] - internal static extern int RhGetThunkSize(); - [MethodImplAttribute(MethodImplOptions.InternalCall)] [RuntimeImport(RuntimeLibrary, "RhResolveDispatchOnType")] internal static extern unsafe IntPtr RhResolveDispatchOnType(EETypePtr instanceType, EETypePtr interfaceType, ushort slot, EETypePtr* pGenericContext); diff --git a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/ThunkPool.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/ThunkPool.cs similarity index 84% rename from src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/ThunkPool.cs rename to src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/ThunkPool.cs index d8f9d7c31cb59c..5996a37b81a548 100644 --- a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/ThunkPool.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/ThunkPool.cs @@ -41,10 +41,10 @@ namespace System.Runtime internal static class Constants { public static readonly int ThunkDataSize = 2 * IntPtr.Size; - public static readonly int ThunkCodeSize = InternalCalls.RhpGetThunkSize(); - public static readonly int NumThunksPerBlock = InternalCalls.RhpGetNumThunksPerBlock(); - public static readonly int NumThunkBlocksPerMapping = InternalCalls.RhpGetNumThunkBlocksPerMapping(); - public static readonly uint ThunkBlockSize = (uint)InternalCalls.RhpGetThunkBlockSize(); + public static readonly int ThunkCodeSize = RuntimeImports.RhpGetThunkSize(); + public static readonly int NumThunksPerBlock = RuntimeImports.RhpGetNumThunksPerBlock(); + public static readonly int NumThunkBlocksPerMapping = RuntimeImports.RhpGetNumThunkBlocksPerMapping(); + public static readonly uint ThunkBlockSize = (uint)RuntimeImports.RhpGetThunkBlockSize(); public static readonly nuint ThunkBlockSizeMask = ThunkBlockSize - 1; } @@ -86,15 +86,15 @@ private unsafe ThunksHeap(IntPtr commonStubAddress) _allocatedBlocks = new AllocatedBlock(); - InternalCalls.RhpAcquireThunkPoolLock(); - - IntPtr thunkStubsBlock = ThunkBlocks.GetNewThunksBlock(); - - InternalCalls.RhpReleaseThunkPoolLock(); + IntPtr thunkStubsBlock; + lock (this) + { + thunkStubsBlock = ThunkBlocks.GetNewThunksBlock(); + } if (thunkStubsBlock != IntPtr.Zero) { - IntPtr thunkDataBlock = InternalCalls.RhpGetThunkDataBlockAddress(thunkStubsBlock); + IntPtr thunkDataBlock = RuntimeImports.RhpGetThunkDataBlockAddress(thunkStubsBlock); // Address of the first thunk data cell should be at the beginning of the thunks data block (page-aligned) Debug.Assert(((nuint)(nint)thunkDataBlock % Constants.ThunkBlockSize) == 0); @@ -150,7 +150,7 @@ private unsafe bool ExpandHeap() if (thunkStubsBlock != IntPtr.Zero) { - IntPtr thunkDataBlock = InternalCalls.RhpGetThunkDataBlockAddress(thunkStubsBlock); + IntPtr thunkDataBlock = RuntimeImports.RhpGetThunkDataBlockAddress(thunkStubsBlock); // Address of the first thunk data cell should be at the beginning of the thunks data block (page-aligned) Debug.Assert(((nuint)(nint)thunkDataBlock % Constants.ThunkBlockSize) == 0); @@ -183,28 +183,26 @@ public unsafe IntPtr AllocateThunk() Debug.Assert(_nextAvailableThunkPtr != IntPtr.Zero); - InternalCalls.RhpAcquireThunkPoolLock(); - - IntPtr nextAvailableThunkPtr = _nextAvailableThunkPtr; - IntPtr nextNextAvailableThunkPtr = *((IntPtr*)(nextAvailableThunkPtr)); - - if (nextNextAvailableThunkPtr == IntPtr.Zero) + IntPtr nextAvailableThunkPtr; + lock (this) { - if (!ExpandHeap()) + nextAvailableThunkPtr = _nextAvailableThunkPtr; + IntPtr nextNextAvailableThunkPtr = *((IntPtr*)(nextAvailableThunkPtr)); + + if (nextNextAvailableThunkPtr == IntPtr.Zero) { - InternalCalls.RhpReleaseThunkPoolLock(); - return IntPtr.Zero; + if (!ExpandHeap()) + { + return IntPtr.Zero; + } + + nextAvailableThunkPtr = _nextAvailableThunkPtr; + nextNextAvailableThunkPtr = *((IntPtr*)(nextAvailableThunkPtr)); + Debug.Assert(nextNextAvailableThunkPtr != IntPtr.Zero); } - nextAvailableThunkPtr = _nextAvailableThunkPtr; - nextNextAvailableThunkPtr = *((IntPtr*)(nextAvailableThunkPtr)); - Debug.Assert(nextNextAvailableThunkPtr != IntPtr.Zero); + _nextAvailableThunkPtr = nextNextAvailableThunkPtr; } - - _nextAvailableThunkPtr = nextNextAvailableThunkPtr; - - InternalCalls.RhpReleaseThunkPoolLock(); - Debug.Assert(nextAvailableThunkPtr != IntPtr.Zero); #if DEBUG @@ -216,7 +214,7 @@ public unsafe IntPtr AllocateThunk() Debug.Assert((thunkIndex % Constants.ThunkDataSize) == 0); thunkIndex /= Constants.ThunkDataSize; - IntPtr thunkAddress = InternalCalls.RhpGetThunkStubsBlockAddress(nextAvailableThunkPtr) + thunkIndex * Constants.ThunkCodeSize; + IntPtr thunkAddress = RuntimeImports.RhpGetThunkStubsBlockAddress(nextAvailableThunkPtr) + thunkIndex * Constants.ThunkCodeSize; return SetThumbBit(thunkAddress); } @@ -227,23 +225,20 @@ public unsafe void FreeThunk(IntPtr thunkAddress) // or at least change it to a per-heap lock instead of a global lock. IntPtr dataAddress = TryGetThunkDataAddress(thunkAddress); - if (dataAddress == IntPtr.Zero) - EH.FallbackFailFast(RhFailFastReason.InternalError, null); + Debug.Assert(dataAddress != IntPtr.Zero); #if DEBUG - if (!IsThunkInHeap(thunkAddress)) - EH.FallbackFailFast(RhFailFastReason.InternalError, null); + Debug.Assert(IsThunkInHeap(thunkAddress)); // Debug flag indicating the thunk is no longer used *((IntPtr*)(dataAddress + IntPtr.Size)) = new IntPtr(-1); #endif - InternalCalls.RhpAcquireThunkPoolLock(); - - *((IntPtr*)(dataAddress)) = _nextAvailableThunkPtr; - _nextAvailableThunkPtr = dataAddress; - - InternalCalls.RhpReleaseThunkPoolLock(); + lock (this) + { + *((IntPtr*)(dataAddress)) = _nextAvailableThunkPtr; + _nextAvailableThunkPtr = dataAddress; + } } private bool IsThunkInHeap(IntPtr thunkAddress) @@ -281,7 +276,7 @@ private static IntPtr TryGetThunkDataAddress(IntPtr thunkAddress) int thunkIndex = (int)((thunkAddressValue - currentThunksBlockAddress) / (nuint)Constants.ThunkCodeSize); // Compute the address of the data block that corresponds to the current thunk - IntPtr thunkDataBlockAddress = InternalCalls.RhpGetThunkDataBlockAddress((IntPtr)((nint)thunkAddressValue)); + IntPtr thunkDataBlockAddress = RuntimeImports.RhpGetThunkDataBlockAddress((IntPtr)((nint)thunkAddressValue)); return thunkDataBlockAddress + thunkIndex * Constants.ThunkDataSize; } @@ -321,13 +316,8 @@ public unsafe bool TryGetThunkData(IntPtr thunkAddress, out IntPtr context, out public unsafe void SetThunkData(IntPtr thunkAddress, IntPtr context, IntPtr target) { IntPtr dataAddress = TryGetThunkDataAddress(thunkAddress); - if (dataAddress == IntPtr.Zero) - EH.FallbackFailFast(RhFailFastReason.InternalError, null); - -#if DEBUG - if (!IsThunkInHeap(thunkAddress)) - EH.FallbackFailFast(RhFailFastReason.InternalError, null); -#endif + Debug.Assert(dataAddress != IntPtr.Zero); + Debug.Assert(IsThunkInHeap(thunkAddress)); // Update the data that will be used by the thunk that was allocated *((IntPtr*)(dataAddress)) = context; @@ -356,7 +346,7 @@ public static unsafe IntPtr GetNewThunksBlock() } else { - nextThunksBlock = InternalCalls.RhAllocateThunksMapping(); + nextThunksBlock = RuntimeImports.RhAllocateThunksMapping(); if (nextThunksBlock == IntPtr.Zero) { @@ -373,7 +363,7 @@ public static unsafe IntPtr GetNewThunksBlock() // Each mapping consists of multiple blocks of thunk stubs/data pairs. Keep track of those // so that we do not create a new mapping until all blocks in the sections we just mapped are consumed IntPtr currentThunksBlock = nextThunksBlock; - int thunkBlockSize = InternalCalls.RhpGetThunkBlockSize(); + int thunkBlockSize = RuntimeImports.RhpGetThunkBlockSize(); for (int i = 0; i < Constants.NumThunkBlocksPerMapping; i++) { s_currentlyMappedThunkBlocks[i] = currentThunksBlock; @@ -386,7 +376,7 @@ public static unsafe IntPtr GetNewThunksBlock() // Setup the thunks in the new block as a linked list of thunks. // Use the first data field of the thunk to build the linked list. - IntPtr dataAddress = InternalCalls.RhpGetThunkDataBlockAddress(nextThunksBlock); + IntPtr dataAddress = RuntimeImports.RhpGetThunkDataBlockAddress(nextThunksBlock); for (int i = 0; i < Constants.NumThunksPerBlock; i++) { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeExceptionHelpers.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeExceptionHelpers.cs index d156c034bdb247..88f21fdf0561ba 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeExceptionHelpers.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeExceptionHelpers.cs @@ -118,47 +118,28 @@ public class RuntimeExceptionHelpers } } - private static string GetStringForFailFastReason(RhFailFastReason reason) - { - switch (reason) + private static string GetStringForFailFastReason(RhFailFastReason reason) => reason switch { - case RhFailFastReason.InternalError: - return "Runtime internal error"; - case RhFailFastReason.UnhandledException: - return "Unhandled exception: a managed exception was not handled before reaching unmanaged code"; - case RhFailFastReason.UnhandledExceptionFromPInvoke: - return "Unhandled exception: an unmanaged exception was thrown out of a managed-to-native transition"; - case RhFailFastReason.EnvironmentFailFast: - return "Environment.FailFast was called"; - default: - return "Unknown reason."; - } - } - - [DoesNotReturn] - public static void FailFast(string message) - { - FailFast(message, null, RhFailFastReason.EnvironmentFailFast, IntPtr.Zero, IntPtr.Zero); - } - - [DoesNotReturn] - public static void FailFast(string message, Exception? exception) - { - FailFast(message, exception, RhFailFastReason.EnvironmentFailFast, IntPtr.Zero, IntPtr.Zero); - } + RhFailFastReason.InternalError => "Runtime internal error", + RhFailFastReason.UnhandledException => "Unhandled exception: a managed exception was not handled before reaching unmanaged code", + RhFailFastReason.UnhandledExceptionFromPInvoke => "Unhandled exception: an unmanaged exception was thrown out of a managed-to-native transition", + RhFailFastReason.EnvironmentFailFast => "Environment.FailFast was called", + RhFailFastReason.AssertionFailure => "Assertion failure", + _ => "Unknown reason." + }; // Used to report exceptions that *logically* go unhandled in the Fx code. For example, an // exception that escapes from a ThreadPool workitem, or from a void-returning async method. public static void ReportUnhandledException(Exception exception) { - FailFast(GetStringForFailFastReason(RhFailFastReason.UnhandledException), exception, RhFailFastReason.UnhandledException, IntPtr.Zero, IntPtr.Zero); + FailFast(exception: exception, reason: RhFailFastReason.UnhandledException); } // This is the classlib-provided fail-fast function that will be invoked whenever the runtime // needs to cause the process to exit. It is the classlib's opportunity to customize the // termination behavior in whatever way necessary. [RuntimeExport("FailFast")] - public static void RuntimeFailFast(RhFailFastReason reason, Exception? exception, IntPtr pExAddress, IntPtr pExContext) + internal static void RuntimeFailFast(RhFailFastReason reason, Exception? exception, IntPtr pExAddress, IntPtr pExContext) { if (!SafeToPerformRichExceptionSupport) return; @@ -167,7 +148,7 @@ public static void RuntimeFailFast(RhFailFastReason reason, Exception? exception // back into the dispatcher. try { - FailFast(message: null, exception, reason, pExAddress, pExContext); + FailFast(exception: exception, reason: reason, pExAddress: pExAddress, pExContext: pExContext); } catch { @@ -199,7 +180,9 @@ internal unsafe struct EXCEPTION_RECORD private static ulong s_crashingThreadId; [DoesNotReturn] - internal static unsafe void FailFast(string? message, Exception? exception, RhFailFastReason reason, IntPtr pExAddress, IntPtr pExContext) + internal static unsafe void FailFast(string? message = null, Exception? exception = null, string? errorSource = null, + RhFailFastReason reason = RhFailFastReason.EnvironmentFailFast, + IntPtr pExAddress = 0, IntPtr pExContext = 0) { IntPtr triageBufferAddress = IntPtr.Zero; int triageBufferSize = 0; @@ -209,33 +192,43 @@ internal static unsafe void FailFast(string? message, Exception? exception, RhFa ulong previousThreadId = Interlocked.CompareExchange(ref s_crashingThreadId, currentThreadId, 0); if (previousThreadId == 0) { - message ??= GetStringForFailFastReason(reason); - CrashInfo crashInfo = new(); - crashInfo.Open(reason, s_crashingThreadId, message); + crashInfo.Open(reason, s_crashingThreadId, message ?? GetStringForFailFastReason(reason)); bool minimalFailFast = (exception == PreallocatedOutOfMemoryException.Instance); if (!minimalFailFast) { - string prefix; - string outputMessage; - if (exception != null) + Internal.Console.Error.Write(((exception == null) || (reason is RhFailFastReason.EnvironmentFailFast or RhFailFastReason.AssertionFailure)) ? + "Process terminated. " : "Unhandled exception. "); + + if (errorSource != null) + { + Internal.Console.Error.Write(errorSource); + Internal.Console.Error.WriteLine(); + } + + if (message != null) { - prefix = "Unhandled Exception: "; - outputMessage = exception.ToString(); + Internal.Console.Error.Write(message); + Internal.Console.Error.WriteLine(); } - else + + if (errorSource == null && message == null && (exception == null || reason is RhFailFastReason.EnvironmentFailFast)) + { + Internal.Console.Error.Write(GetStringForFailFastReason(reason)); + Internal.Console.Error.WriteLine(); + } + + if (reason is RhFailFastReason.EnvironmentFailFast) { - prefix = "Process terminated. "; - outputMessage = message; + Internal.Console.Error.Write(new StackTrace().ToString()); } - Internal.Console.Error.Write(prefix); - if (outputMessage != null) + if ((exception != null) && (reason is not RhFailFastReason.AssertionFailure)) { - Internal.Console.Error.Write(outputMessage); + Internal.Console.Error.Write(exception.ToString()); + Internal.Console.Error.WriteLine(); } - Internal.Console.Error.Write(Environment.NewLine); if (exception != null) { diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/ExecutionEnvironmentImplementation.MappingTables.cs b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/ExecutionEnvironmentImplementation.MappingTables.cs index d96bfb65c52d53..8611b4b9f845a0 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/ExecutionEnvironmentImplementation.MappingTables.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/ExecutionEnvironmentImplementation.MappingTables.cs @@ -1036,7 +1036,7 @@ public LowLevelList ParameterTypeHandles { get { - ParameterInfo[] parameters = _methodBase.GetParametersNoCopy(); + ReadOnlySpan parameters = _methodBase.GetParametersAsSpan(); LowLevelList result = new LowLevelList(parameters.Length); for (int i = 0; i < parameters.Length; i++) @@ -1081,7 +1081,7 @@ public bool[] ReturnTypeAndParametersByRefFlags { get { - ParameterInfo[] parameters = _methodBase.GetParametersNoCopy(); + ReadOnlySpan parameters = _methodBase.GetParametersAsSpan(); bool[] result = new bool[parameters.Length + 1]; MethodInfo reflectionMethodInfo = _methodBase as MethodInfo; @@ -1101,8 +1101,8 @@ private void GetReturnTypeAndParameterTypesAndMDHandles(ref Handle[] handles, re { Debug.Assert(_metadataReader != null && !_methodHandle.Equals(default(MethodHandle))); - _returnTypeAndParametersHandlesCache = new Handle[_methodBase.GetParametersNoCopy().Length + 1]; - _returnTypeAndParametersTypesCache = new Type[_methodBase.GetParametersNoCopy().Length + 1]; + _returnTypeAndParametersHandlesCache = new Handle[_methodBase.GetParametersAsSpan().Length + 1]; + _returnTypeAndParametersTypesCache = new Type[_methodBase.GetParametersAsSpan().Length + 1]; MethodSignature signature = _methodHandle.GetMethod(_metadataReader).Signature.GetMethodSignature(_metadataReader); @@ -1116,7 +1116,7 @@ private void GetReturnTypeAndParameterTypesAndMDHandles(ref Handle[] handles, re foreach (Handle paramSigHandle in signature.Parameters) { _returnTypeAndParametersHandlesCache[index] = paramSigHandle; - _returnTypeAndParametersTypesCache[index] = _methodBase.GetParametersNoCopy()[index - 1].ParameterType; + _returnTypeAndParametersTypesCache[index] = _methodBase.GetParametersAsSpan()[index - 1].ParameterType; index++; } } diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/PayForPlayExperience/MissingMetadataExceptionCreator.cs b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/PayForPlayExperience/MissingMetadataExceptionCreator.cs index e77ca531981980..5dd4ab441f9deb 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/PayForPlayExperience/MissingMetadataExceptionCreator.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/PayForPlayExperience/MissingMetadataExceptionCreator.cs @@ -43,7 +43,7 @@ public static string ComputeUsefulPertainantIfPossible(MemberInfo memberInfo) // write out actual parameters friendlyName.Append('('); first = true; - foreach (ParameterInfo parameter in method.GetParametersNoCopy()) + foreach (ParameterInfo parameter in method.GetParametersAsSpan()) { if (!first) friendlyName.Append(','); diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/TypeLoader/ConstraintValidatorSupport.cs b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/TypeLoader/ConstraintValidatorSupport.cs index 76e62e41bb8aa8..3fc11330cc5084 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/TypeLoader/ConstraintValidatorSupport.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/TypeLoader/ConstraintValidatorSupport.cs @@ -289,7 +289,7 @@ private static bool HasExplicitOrImplicitPublicDefaultConstructor(this Type type foreach (var ctor in type.GetConstructors()) { - if (!ctor.IsStatic && ctor.IsPublic && ctor.GetParametersNoCopy().Length == 0) + if (!ctor.IsStatic && ctor.IsPublic && ctor.GetParametersAsSpan().Length == 0) return true; } return false; diff --git a/src/coreclr/nativeaot/System.Private.StackTraceMetadata/src/Internal/StackTraceMetadata/StackTraceMetadata.cs b/src/coreclr/nativeaot/System.Private.StackTraceMetadata/src/Internal/StackTraceMetadata/StackTraceMetadata.cs index a203b7acbf94ac..ab9ae2967f2bb6 100644 --- a/src/coreclr/nativeaot/System.Private.StackTraceMetadata/src/Internal/StackTraceMetadata/StackTraceMetadata.cs +++ b/src/coreclr/nativeaot/System.Private.StackTraceMetadata/src/Internal/StackTraceMetadata/StackTraceMetadata.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using System.Reflection.Runtime.General; using Internal.Metadata.NativeFormat; using Internal.NativeFormat; @@ -42,7 +43,7 @@ internal static void Initialize() /// /// Locate the containing module for a method and try to resolve its name based on start address. /// - public static unsafe string GetMethodNameFromStartAddressIfAvailable(IntPtr methodStartAddress) + public static unsafe string GetMethodNameFromStartAddressIfAvailable(IntPtr methodStartAddress, out bool isStackTraceHidden) { IntPtr moduleStartAddress = RuntimeAugments.GetOSModuleFromPointer(methodStartAddress); int rva = (int)((byte*)methodStartAddress - (byte*)moduleStartAddress); @@ -50,18 +51,38 @@ public static unsafe string GetMethodNameFromStartAddressIfAvailable(IntPtr meth { if (moduleInfo.Handle.OsModuleBase == moduleStartAddress) { - string name = _perModuleMethodNameResolverHashtable.GetOrCreateValue(moduleInfo.Handle.GetIntPtrUNSAFE()).GetMethodNameFromRvaIfAvailable(rva); - if (name != null) + string name = _perModuleMethodNameResolverHashtable.GetOrCreateValue(moduleInfo.Handle.GetIntPtrUNSAFE()).GetMethodNameFromRvaIfAvailable(rva, out isStackTraceHidden); + if (name != null || isStackTraceHidden) return name; } } + isStackTraceHidden = false; + // We haven't found information in the stack trace metadata tables, but maybe reflection will have this if (IsReflectionExecutionAvailable() && ReflectionExecution.TryGetMethodMetadataFromStartAddress(methodStartAddress, out MetadataReader reader, out TypeDefinitionHandle typeHandle, out MethodHandle methodHandle)) { + foreach (CustomAttributeHandle cah in reader.GetTypeDefinition(typeHandle).CustomAttributes) + { + if (cah.IsCustomAttributeOfType(reader, "System.Diagnostics", "StackTraceHiddenAttribute")) + { + isStackTraceHidden = true; + break; + } + } + + foreach (CustomAttributeHandle cah in reader.GetMethod(methodHandle).CustomAttributes) + { + if (cah.IsCustomAttributeOfType(reader, "System.Diagnostics", "StackTraceHiddenAttribute")) + { + isStackTraceHidden = true; + break; + } + } + return MethodNameFormatter.FormatMethodName(reader, typeHandle, methodHandle); } @@ -127,9 +148,9 @@ protected override PerModuleMethodNameResolver CreateValueFromKey(IntPtr key) /// private sealed class StackTraceMetadataCallbacksImpl : StackTraceMetadataCallbacks { - public override string TryGetMethodNameFromStartAddress(IntPtr methodStartAddress) + public override string TryGetMethodNameFromStartAddress(IntPtr methodStartAddress, out bool isStackTraceHidden) { - return GetMethodNameFromStartAddressIfAvailable(methodStartAddress); + return GetMethodNameFromStartAddressIfAvailable(methodStartAddress, out isStackTraceHidden); } } @@ -256,6 +277,7 @@ private unsafe void PopulateRvaToTokenMap(TypeManagerHandle handle, byte* pMap, _stacktraceDatas[current++] = new StackTraceData { Rva = methodRva, + IsHidden = (command & StackTraceDataCommand.IsStackTraceHidden) != 0, OwningType = currentOwningType, Name = currentName, Signature = currentSignature, @@ -274,8 +296,10 @@ private unsafe void PopulateRvaToTokenMap(TypeManagerHandle handle, byte* pMap, /// /// Try to resolve method name based on its address using the stack trace metadata /// - public string GetMethodNameFromRvaIfAvailable(int rva) + public string GetMethodNameFromRvaIfAvailable(int rva, out bool isStackTraceHidden) { + isStackTraceHidden = false; + if (_stacktraceDatas == null) { // No stack trace metadata for this module @@ -290,12 +314,43 @@ public string GetMethodNameFromRvaIfAvailable(int rva) } StackTraceData data = _stacktraceDatas[index]; + + isStackTraceHidden = data.IsHidden; + + if (data.OwningType.IsNull(_metadataReader)) + { + Debug.Assert(data.Name.IsNull(_metadataReader) && data.Signature.IsNull(_metadataReader)); + Debug.Assert(isStackTraceHidden); + return null; + } + return MethodNameFormatter.FormatMethodName(_metadataReader, data.OwningType, data.Name, data.Signature, data.GenericArguments); } private struct StackTraceData : IComparable { - public int Rva { get; init; } + private const int IsHiddenFlag = 0x2; + + private readonly int _rvaAndIsHiddenBit; + + public int Rva + { + get => _rvaAndIsHiddenBit & ~IsHiddenFlag; + init + { + Debug.Assert((value & IsHiddenFlag) == 0); + _rvaAndIsHiddenBit = value | (_rvaAndIsHiddenBit & IsHiddenFlag); + } + } + public bool IsHidden + { + get => (_rvaAndIsHiddenBit & IsHiddenFlag) != 0; + init + { + if (value) + _rvaAndIsHiddenBit |= IsHiddenFlag; + } + } public Handle OwningType { get; init; } public ConstantStringValueHandle Name { get; init; } public MethodSignatureHandle Signature { get; init; } diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/MethodTable.Runtime.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/MethodTable.Runtime.cs index 7bbf342467efe6..b0d08b06e521b9 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/MethodTable.Runtime.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/MethodTable.Runtime.cs @@ -3,6 +3,7 @@ using System; using System.Diagnostics; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Internal.Runtime.TypeLoader; @@ -19,11 +20,8 @@ internal partial struct MethodTable internal unsafe RuntimeTypeHandle ToRuntimeTypeHandle() { - fixed (MethodTable* pThis = &this) - { - IntPtr result = (IntPtr)pThis; - return *(RuntimeTypeHandle*)&result; - } + IntPtr result = (IntPtr)Unsafe.AsPointer(ref this); + return *(RuntimeTypeHandle*)&result; } } } diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.MetadataSignatureParsing.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.MetadataSignatureParsing.cs index 07674dded3541c..1a1cd76cc4ddfd 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.MetadataSignatureParsing.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.MetadataSignatureParsing.cs @@ -173,12 +173,23 @@ internal static NativeParser GetNativeParserForSignature(RuntimeSignature signat private bool CompareTypeSigWithType(ref NativeParser parser, TypeManagerHandle moduleHandle, Handle typeHandle) { - while (typeHandle.HandleType == HandleType.TypeSpecification) + while (typeHandle.HandleType == HandleType.TypeSpecification + || typeHandle.HandleType == HandleType.ModifiedType) { - typeHandle = typeHandle - .ToTypeSpecificationHandle(_metadataReader) - .GetTypeSpecification(_metadataReader) - .Signature; + if (typeHandle.HandleType == HandleType.TypeSpecification) + { + typeHandle = typeHandle + .ToTypeSpecificationHandle(_metadataReader) + .GetTypeSpecification(_metadataReader) + .Signature; + } + else + { + typeHandle = typeHandle + .ToModifiedTypeHandle(_metadataReader) + .GetModifiedType(_metadataReader) + .Type; + } } // startOffset lets us backtrack to the TypeSignatureKind for external types since the TypeLoader diff --git a/src/coreclr/nativeaot/Test.CoreLib/src/Internal/Runtime/MethodTable.Runtime.cs b/src/coreclr/nativeaot/Test.CoreLib/src/Internal/Runtime/MethodTable.Runtime.cs new file mode 100644 index 00000000000000..c2805338037e97 --- /dev/null +++ b/src/coreclr/nativeaot/Test.CoreLib/src/Internal/Runtime/MethodTable.Runtime.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; + +namespace Internal.Runtime +{ + // Extensions to MethodTable that are specific to the use in the CoreLib. + internal unsafe partial struct MethodTable + { +#if !INPLACE_RUNTIME + internal static MethodTable* GetArrayEEType() + { + + return EETypePtr.EETypePtrOf().ToPointer(); + } +#endif + } +} diff --git a/src/coreclr/nativeaot/Test.CoreLib/src/System/Array.cs b/src/coreclr/nativeaot/Test.CoreLib/src/System/Array.cs index edf23307c5498e..33e35805e4df40 100644 --- a/src/coreclr/nativeaot/Test.CoreLib/src/System/Array.cs +++ b/src/coreclr/nativeaot/Test.CoreLib/src/System/Array.cs @@ -14,7 +14,7 @@ public partial class Array [RuntimeExport("GetSystemArrayEEType")] private static unsafe MethodTable* GetSystemArrayEEType() { - return EETypePtr.EETypePtrOf().ToPointer(); + return MethodTable.Of(); } } } diff --git a/src/coreclr/nativeaot/Test.CoreLib/src/System/Diagnostics/Debug.cs b/src/coreclr/nativeaot/Test.CoreLib/src/System/Diagnostics/Debug.cs new file mode 100644 index 00000000000000..0a5cb92cc30f40 --- /dev/null +++ b/src/coreclr/nativeaot/Test.CoreLib/src/System/Diagnostics/Debug.cs @@ -0,0 +1,31 @@ +// 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.CompilerServices; + +namespace System.Diagnostics +{ + internal static class Debug + { + [System.Diagnostics.Conditional("DEBUG")] + [MethodImpl(MethodImplOptions.NoInlining)] + internal static void Assert(bool condition, string message) + { + if (!condition) + { + RuntimeImports.RhpFallbackFailFast(); + } + } + + [System.Diagnostics.Conditional("DEBUG")] + [MethodImpl(MethodImplOptions.NoInlining)] + internal static void Assert(bool condition) + { + if (!condition) + { + RuntimeImports.RhpFallbackFailFast(); + } + } + } +} diff --git a/src/coreclr/nativeaot/Test.CoreLib/src/System/RuntimeExceptionHelpers.cs b/src/coreclr/nativeaot/Test.CoreLib/src/System/RuntimeExceptionHelpers.cs index 6edb3c990c0af8..96ced473053227 100644 --- a/src/coreclr/nativeaot/Test.CoreLib/src/System/RuntimeExceptionHelpers.cs +++ b/src/coreclr/nativeaot/Test.CoreLib/src/System/RuntimeExceptionHelpers.cs @@ -84,7 +84,7 @@ public static Exception GetRuntimeException(ExceptionIDs id) // needs to cause the process to exit. It is the classlib's opportunity to customize the // termination behavior in whatever way necessary. [RuntimeExport("FailFast")] - public static void RuntimeFailFast(RhFailFastReason reason, Exception exception, IntPtr pExAddress, IntPtr pExContext) + internal static void RuntimeFailFast(RhFailFastReason reason, Exception exception, IntPtr pExAddress, IntPtr pExContext) { RuntimeImports.RhpFallbackFailFast(); } diff --git a/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj b/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj index f4c83b553a3662..ead38a5b7c312f 100644 --- a/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj +++ b/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj @@ -59,18 +59,12 @@ Runtime.Base\src\System\Runtime\StackFrameIterator.cs - - Runtime.Base\src\System\Runtime\ThunkPool.cs - Runtime.Base\src\System\Runtime\TypeCast.cs Runtime.Base\src\System\Runtime\InteropServices\UnsafeGCHandle.cs - - Runtime.Base\src\System\Runtime\InteropServices\UnmanagedType.cs - Runtime.Base\src\RhBaseName.cs @@ -97,6 +91,9 @@ System\Runtime\MethodTable.Constants.cs + + System\Runtime\RhFailFastReason.cs + System\Runtime\MethodTable.cs @@ -127,9 +124,6 @@ System\Diagnostics\ConditionalAttribute.cs - - System\Diagnostics\Debug.cs - System\Exception.cs @@ -199,6 +193,9 @@ System\Runtime\InteropServices\UnmanagedCallersOnlyAttribute.cs + + Runtime.Base\src\System\Runtime\InteropServices\UnmanagedType.cs + System\Runtime\InteropServices\OutAttribute.cs @@ -224,11 +221,13 @@ System\Runtime\CompilerServices\Unsafe.cs + + diff --git a/src/coreclr/pal/inc/pal.h b/src/coreclr/pal/inc/pal.h index 84744d64d2f689..023cc0845396c6 100644 --- a/src/coreclr/pal/inc/pal.h +++ b/src/coreclr/pal/inc/pal.h @@ -2678,12 +2678,6 @@ BOOL PALAPI PAL_GetCpuLimit(UINT* val); -PALIMPORT -size_t -PALAPI -PAL_GetLogicalProcessorCacheSizeFromOS(); -#define GetLogicalProcessorCacheSizeFromOS PAL_GetLogicalProcessorCacheSizeFromOS - typedef BOOL(*UnwindReadMemoryCallback)(PVOID address, PVOID buffer, SIZE_T size); PALIMPORT BOOL PALAPI PAL_VirtualUnwind(CONTEXT *context, KNONVOLATILE_CONTEXT_POINTERS *contextPointers); @@ -2832,20 +2826,13 @@ PALAPI UnmapViewOfFile( IN LPCVOID lpBaseAddress); - -PALIMPORT -HMODULE -PALAPI -LoadLibraryW( - IN LPCWSTR lpLibFileName); - PALIMPORT HMODULE PALAPI LoadLibraryExW( IN LPCWSTR lpLibFileName, - IN /*Reserved*/ HANDLE hFile, - IN DWORD dwFlags); + IN /*Reserved*/ HANDLE hFile = NULL, + IN DWORD dwFlags = 0); PALIMPORT NATIVE_LIBRARY_HANDLE @@ -2925,14 +2912,6 @@ BOOL PALAPI PAL_LOADMarkSectionAsNotNeeded(void * ptr); -#ifdef UNICODE -#define LoadLibrary LoadLibraryW -#define LoadLibraryEx LoadLibraryExW -#else -#define LoadLibrary LoadLibraryA -#define LoadLibraryEx LoadLibraryExA -#endif - PALIMPORT FARPROC PALAPI @@ -3035,24 +3014,6 @@ VirtualProtect( IN DWORD flNewProtect, OUT PDWORD lpflOldProtect); -typedef struct _MEMORYSTATUSEX { - DWORD dwLength; - DWORD dwMemoryLoad; - DWORDLONG ullTotalPhys; - DWORDLONG ullAvailPhys; - DWORDLONG ullTotalPageFile; - DWORDLONG ullAvailPageFile; - DWORDLONG ullTotalVirtual; - DWORDLONG ullAvailVirtual; - DWORDLONG ullAvailExtendedVirtual; -} MEMORYSTATUSEX, *LPMEMORYSTATUSEX; - -PALIMPORT -BOOL -PALAPI -GlobalMemoryStatusEx( - IN OUT LPMEMORYSTATUSEX lpBuffer); - typedef struct _MEMORY_BASIC_INFORMATION { PVOID BaseAddress; PVOID AllocationBase_PAL_Undefined; @@ -4107,6 +4068,9 @@ PALIMPORT ULONG __cdecl strtoul(const char *, char **, int); PALIMPORT ULONGLONG __cdecl strtoull(const char *, char **, int); PALIMPORT double __cdecl atof(const char *); PALIMPORT double __cdecl strtod(const char *, char **); +PALIMPORT size_t __cdecl strspn (const char *, const char *); +PALIMPORT long int __cdecl strtol (const char *, char **, int); +PALIMPORT char * __cdecl stpcpy (char *, const char *); PALIMPORT int __cdecl isprint(int); PALIMPORT int __cdecl isspace(int); PALIMPORT int __cdecl isalpha(int); diff --git a/src/coreclr/pal/inc/palprivate.h b/src/coreclr/pal/inc/palprivate.h index 1801f014443b34..35a05cec3b908d 100644 --- a/src/coreclr/pal/inc/palprivate.h +++ b/src/coreclr/pal/inc/palprivate.h @@ -128,12 +128,6 @@ OpenMutexA( IN BOOL bInheritHandle, IN LPCSTR lpName); -PALIMPORT -HMODULE -PALAPI -LoadLibraryA( - IN LPCSTR lpLibFileName); - PALIMPORT HMODULE PALAPI diff --git a/src/coreclr/pal/inc/rt/cpp/io.h b/src/coreclr/pal/inc/rt/cpp/algorithm similarity index 89% rename from src/coreclr/pal/inc/rt/cpp/io.h rename to src/coreclr/pal/inc/rt/cpp/algorithm index 64f3a52df7307b..e42c1852c13992 100644 --- a/src/coreclr/pal/inc/rt/cpp/io.h +++ b/src/coreclr/pal/inc/rt/cpp/algorithm @@ -4,9 +4,9 @@ // // =========================================================================== -// File: io.h +// File: math.h // // =========================================================================== -// dummy io.h for PAL +// dummy math.h for PAL #include "palrt.h" diff --git a/src/coreclr/pal/inc/rt/conio.h b/src/coreclr/pal/inc/rt/cpp/bitset similarity index 88% rename from src/coreclr/pal/inc/rt/conio.h rename to src/coreclr/pal/inc/rt/cpp/bitset index 9dd9c0a06d2968..e42c1852c13992 100644 --- a/src/coreclr/pal/inc/rt/conio.h +++ b/src/coreclr/pal/inc/rt/cpp/bitset @@ -4,9 +4,9 @@ // // =========================================================================== -// File: conio.h +// File: math.h // // =========================================================================== -// dummy conio.h for PAL +// dummy math.h for PAL #include "palrt.h" diff --git a/src/coreclr/pal/inc/rt/verrsrc.h b/src/coreclr/pal/inc/rt/cpp/cassert similarity index 87% rename from src/coreclr/pal/inc/rt/verrsrc.h rename to src/coreclr/pal/inc/rt/cpp/cassert index 0bd71033246bec..e42c1852c13992 100644 --- a/src/coreclr/pal/inc/rt/verrsrc.h +++ b/src/coreclr/pal/inc/rt/cpp/cassert @@ -4,9 +4,9 @@ // // =========================================================================== -// File: verrsrc.h +// File: math.h // // =========================================================================== -// dummy verrsrc.h for PAL +// dummy math.h for PAL #include "palrt.h" diff --git a/src/coreclr/pal/inc/rt/winternl.h b/src/coreclr/pal/inc/rt/cpp/cctype similarity index 87% rename from src/coreclr/pal/inc/rt/winternl.h rename to src/coreclr/pal/inc/rt/cpp/cctype index a5e42c6678bc28..e42c1852c13992 100644 --- a/src/coreclr/pal/inc/rt/winternl.h +++ b/src/coreclr/pal/inc/rt/cpp/cctype @@ -4,9 +4,9 @@ // // =========================================================================== -// File: winternl.h +// File: math.h // // =========================================================================== -// dummy winternl.h for PAL +// dummy math.h for PAL #include "palrt.h" diff --git a/src/coreclr/pal/inc/rt/cpp/cmath b/src/coreclr/pal/inc/rt/cpp/cmath new file mode 100644 index 00000000000000..e42c1852c13992 --- /dev/null +++ b/src/coreclr/pal/inc/rt/cpp/cmath @@ -0,0 +1,12 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// + +// +// =========================================================================== +// File: math.h +// +// =========================================================================== +// dummy math.h for PAL + +#include "palrt.h" diff --git a/src/coreclr/pal/inc/rt/cpp/cstdarg b/src/coreclr/pal/inc/rt/cpp/cstdarg new file mode 100644 index 00000000000000..e42c1852c13992 --- /dev/null +++ b/src/coreclr/pal/inc/rt/cpp/cstdarg @@ -0,0 +1,12 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// + +// +// =========================================================================== +// File: math.h +// +// =========================================================================== +// dummy math.h for PAL + +#include "palrt.h" diff --git a/src/coreclr/pal/inc/rt/cpp/cstddef b/src/coreclr/pal/inc/rt/cpp/cstddef new file mode 100644 index 00000000000000..e42c1852c13992 --- /dev/null +++ b/src/coreclr/pal/inc/rt/cpp/cstddef @@ -0,0 +1,12 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// + +// +// =========================================================================== +// File: math.h +// +// =========================================================================== +// dummy math.h for PAL + +#include "palrt.h" diff --git a/src/coreclr/pal/inc/rt/cpp/cstdio b/src/coreclr/pal/inc/rt/cpp/cstdio new file mode 100644 index 00000000000000..e42c1852c13992 --- /dev/null +++ b/src/coreclr/pal/inc/rt/cpp/cstdio @@ -0,0 +1,12 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// + +// +// =========================================================================== +// File: math.h +// +// =========================================================================== +// dummy math.h for PAL + +#include "palrt.h" diff --git a/src/coreclr/pal/inc/rt/cpp/cstring b/src/coreclr/pal/inc/rt/cpp/cstring new file mode 100644 index 00000000000000..e42c1852c13992 --- /dev/null +++ b/src/coreclr/pal/inc/rt/cpp/cstring @@ -0,0 +1,12 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// + +// +// =========================================================================== +// File: math.h +// +// =========================================================================== +// dummy math.h for PAL + +#include "palrt.h" diff --git a/src/coreclr/pal/inc/rt/cpp/inttypes.h b/src/coreclr/pal/inc/rt/cpp/inttypes.h new file mode 100644 index 00000000000000..e42c1852c13992 --- /dev/null +++ b/src/coreclr/pal/inc/rt/cpp/inttypes.h @@ -0,0 +1,12 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// + +// +// =========================================================================== +// File: math.h +// +// =========================================================================== +// dummy math.h for PAL + +#include "palrt.h" diff --git a/src/coreclr/pal/inc/rt/cpp/limits b/src/coreclr/pal/inc/rt/cpp/limits new file mode 100644 index 00000000000000..e42c1852c13992 --- /dev/null +++ b/src/coreclr/pal/inc/rt/cpp/limits @@ -0,0 +1,12 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// + +// +// =========================================================================== +// File: math.h +// +// =========================================================================== +// dummy math.h for PAL + +#include "palrt.h" diff --git a/src/coreclr/pal/inc/rt/cpp/ostream b/src/coreclr/pal/inc/rt/cpp/ostream new file mode 100644 index 00000000000000..e42c1852c13992 --- /dev/null +++ b/src/coreclr/pal/inc/rt/cpp/ostream @@ -0,0 +1,12 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// + +// +// =========================================================================== +// File: math.h +// +// =========================================================================== +// dummy math.h for PAL + +#include "palrt.h" diff --git a/src/coreclr/pal/inc/rt/cpp/signal.h b/src/coreclr/pal/inc/rt/cpp/signal.h new file mode 100644 index 00000000000000..e42c1852c13992 --- /dev/null +++ b/src/coreclr/pal/inc/rt/cpp/signal.h @@ -0,0 +1,12 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// + +// +// =========================================================================== +// File: math.h +// +// =========================================================================== +// dummy math.h for PAL + +#include "palrt.h" diff --git a/src/coreclr/pal/inc/rt/cpp/sstream b/src/coreclr/pal/inc/rt/cpp/sstream new file mode 100644 index 00000000000000..e42c1852c13992 --- /dev/null +++ b/src/coreclr/pal/inc/rt/cpp/sstream @@ -0,0 +1,12 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// + +// +// =========================================================================== +// File: math.h +// +// =========================================================================== +// dummy math.h for PAL + +#include "palrt.h" diff --git a/src/coreclr/pal/inc/rt/cpp/sys/auxv.h b/src/coreclr/pal/inc/rt/cpp/sys/auxv.h new file mode 100644 index 00000000000000..e42c1852c13992 --- /dev/null +++ b/src/coreclr/pal/inc/rt/cpp/sys/auxv.h @@ -0,0 +1,12 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// + +// +// =========================================================================== +// File: math.h +// +// =========================================================================== +// dummy math.h for PAL + +#include "palrt.h" diff --git a/src/coreclr/pal/inc/rt/cpp/utility b/src/coreclr/pal/inc/rt/cpp/utility new file mode 100644 index 00000000000000..e42c1852c13992 --- /dev/null +++ b/src/coreclr/pal/inc/rt/cpp/utility @@ -0,0 +1,12 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// + +// +// =========================================================================== +// File: math.h +// +// =========================================================================== +// dummy math.h for PAL + +#include "palrt.h" diff --git a/src/coreclr/pal/inc/rt/cpp/vector b/src/coreclr/pal/inc/rt/cpp/vector new file mode 100644 index 00000000000000..e42c1852c13992 --- /dev/null +++ b/src/coreclr/pal/inc/rt/cpp/vector @@ -0,0 +1,12 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// + +// +// =========================================================================== +// File: math.h +// +// =========================================================================== +// dummy math.h for PAL + +#include "palrt.h" diff --git a/src/coreclr/pal/inc/rt/dbghelp.h b/src/coreclr/pal/inc/rt/dbghelp.h deleted file mode 100644 index 1d231d34fc3989..00000000000000 --- a/src/coreclr/pal/inc/rt/dbghelp.h +++ /dev/null @@ -1,36 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -/*++ BUILD Version: 0000 Increment this if a change has global effects - - - -Module Name: - - dbghelp.h - -Abstract: - - This module defines the prototypes and constants required for the image - help routines. - - Contains debugging support routines that are redistributable. - -Revision History: - ---*/ - -#ifndef _DBGHELP_ -#define _DBGHELP_ - -#if _MSC_VER > 1020 -#pragma once -#endif - -// -// options that are set/returned by SymSetOptions() & SymGetOptions() -// these are used as a mask -// -#define SYMOPT_LOAD_LINES 0x00000010 - -#endif // _DBGHELP_ diff --git a/src/coreclr/pal/inc/rt/palrt.h b/src/coreclr/pal/inc/rt/palrt.h index fffc116766f9c0..2d8eb0a0685410 100644 --- a/src/coreclr/pal/inc/rt/palrt.h +++ b/src/coreclr/pal/inc/rt/palrt.h @@ -630,10 +630,6 @@ typedef unsigned int ALG_ID; // 1 null termination #define LOCALE_NAME_MAX_LENGTH 85 -#define CSTR_LESS_THAN 1 -#define CSTR_EQUAL 2 -#define CSTR_GREATER_THAN 3 - #ifdef __cplusplus /* @@ -736,22 +732,13 @@ typename std::remove_reference::type&& move( T&& t ); typedef DWORD OLE_COLOR; -#define PF_COMPARE_EXCHANGE_DOUBLE 2 - -typedef VOID (NTAPI * WAITORTIMERCALLBACKFUNC) (PVOID, BOOLEAN ); - typedef HANDLE HWND; -#define IS_TEXT_UNICODE_SIGNATURE 0x0008 -#define IS_TEXT_UNICODE_UNICODE_MASK 0x000F - typedef struct _LIST_ENTRY { struct _LIST_ENTRY *Flink; struct _LIST_ENTRY *Blink; } LIST_ENTRY, *PLIST_ENTRY; -typedef VOID (NTAPI *WAITORTIMERCALLBACK)(PVOID, BOOLEAN); - // PORTABILITY_ASSERT and PORTABILITY_WARNING macros are meant to be used to // mark places in the code that needs attention for portability. The usual // usage pattern is: @@ -866,11 +853,6 @@ interface ITypeInfo; interface ITypeLib; interface IMoniker; -typedef VOID (WINAPI *LPOVERLAPPED_COMPLETION_ROUTINE)( - DWORD dwErrorCode, - DWORD dwNumberOfBytesTransferred, - LPOVERLAPPED lpOverlapped); - // // Debug APIs // @@ -1108,26 +1090,6 @@ typedef LONG (WINAPI *PTOP_LEVEL_EXCEPTION_FILTER)( ); typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER; -/******************* ntdef ************************************/ - -#ifndef ANYSIZE_ARRAY -#define ANYSIZE_ARRAY 1 // winnt -#endif - -/******************* winnt ************************************/ - -typedef struct LIST_ENTRY32 { - ULONG Flink; - ULONG Blink; -} LIST_ENTRY32; -typedef LIST_ENTRY32 *PLIST_ENTRY32; - -typedef struct LIST_ENTRY64 { - ULONGLONG Flink; - ULONGLONG Blink; -} LIST_ENTRY64; -typedef LIST_ENTRY64 *PLIST_ENTRY64; - /******************** PAL RT APIs *******************************/ typedef struct _HSATELLITE *HSATELLITE; @@ -1165,4 +1127,118 @@ CoCreateGuid(OUT GUID * pguid); #endif // RC_INVOKED +#ifndef INT64_C +# define INT64_C(v) v +# define UINT64_C(v) v ## ULL + +# define INT32_C(v) v +# define UINT32_C(v) v ## ULL + +# define INT16_C(c) c +# define UINT16_C(c) c + +#define isinf(x) __builtin_isinf_sign (x) + +# define PTRDIFF_MAX (9223372036854775807L) + +# define __PRI64_PREFIX "l" +# define __PRIPTR_PREFIX "l" + +# define PRId8 "d" +# define PRId16 "d" +# define PRId32 "d" +# define PRId64 __PRI64_PREFIX "d" + +# define PRIx8 "x" +# define PRIx16 "x" +# define PRIx32 "x" +# define PRIx64 __PRI64_PREFIX "x" + +# define PRIdPTR __PRIPTR_PREFIX "d" +# define PRIiPTR __PRIPTR_PREFIX "i" +# define PRIoPTR __PRIPTR_PREFIX "o" +# define PRIuPTR __PRIPTR_PREFIX "u" +# define PRIxPTR __PRIPTR_PREFIX "x" +# define PRIXPTR __PRIPTR_PREFIX "X" + +# define LLONG_MAX 9223372036854775807LL +# define LLONG_MIN (-LLONG_MAX - 1LL) + +#endif //INT64_C + + +#ifndef FP_NAN + +enum + { + FP_NAN = +# define FP_NAN 0 + FP_NAN, + FP_INFINITE = +# define FP_INFINITE 1 + FP_INFINITE, + FP_ZERO = +# define FP_ZERO 2 + FP_ZERO, + FP_SUBNORMAL = +# define FP_SUBNORMAL 3 + FP_SUBNORMAL, + FP_NORMAL = +# define FP_NORMAL 4 + FP_NORMAL + }; + +#endif + +#ifdef __cplusplus + +extern "C++" +namespace std { +template +class numeric_limits { + public: + static constexpr _Ty Max() { static_assert(sizeof(_Ty) != sizeof(_Ty), "func must be specialized!"); return _Ty(); } + static constexpr _Ty Min() { static_assert(sizeof(_Ty) != sizeof(_Ty), "func must be specialized!"); return _Ty(); } +}; + +template <> +class numeric_limits { +public: + static constexpr int32_t Max() { return 0x7fffffff; } + static constexpr int32_t Min() { return -0x7fffffff - 1; } +}; + +template <> +class numeric_limits { +public: + static constexpr uint32_t Max() { return 0xffffffff; } + static constexpr uint32_t Min() { return 0; } +}; + +template <> +class numeric_limits { + public: + static constexpr int64_t Max() { return 0x7fffffffffffffffi64; } + + static constexpr int64_t Min() { return -0x7fffffffffffffffi64 - 1; } +}; + + constexpr int + fpclassify(float __x) + { return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, + FP_SUBNORMAL, FP_ZERO, __x); } + + constexpr int + fpclassify(double __x) + { return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, + FP_SUBNORMAL, FP_ZERO, __x); } + + constexpr int + fpclassify(long double __x) + { return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, + FP_SUBNORMAL, FP_ZERO, __x); } + +} // namespace std +#endif + #endif // __PALRT_H__ diff --git a/src/coreclr/pal/inc/rt/winresrc.h b/src/coreclr/pal/inc/rt/winresrc.h index b0843d15f1f2a9..88af2984da3366 100644 --- a/src/coreclr/pal/inc/rt/winresrc.h +++ b/src/coreclr/pal/inc/rt/winresrc.h @@ -10,5 +10,4 @@ // winresrc.h for PAL // Included in .rc files. -#include "winver.h" #include "palrt.h" diff --git a/src/coreclr/pal/inc/rt/winver.h b/src/coreclr/pal/inc/rt/winver.h deleted file mode 100644 index b0f441e1a1d410..00000000000000 --- a/src/coreclr/pal/inc/rt/winver.h +++ /dev/null @@ -1,29 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// - -// -// =========================================================================== -// File: winver.h -// -// =========================================================================== -// winver.h for PAL -// Included in .rc files. - -#define VS_VERSION_INFO 1 -#define VS_FFI_FILEFLAGSMASK 0x0000003FL - -#define VS_FF_DEBUG 0x00000001L -#define VS_FF_PRERELEASE 0x00000002L -#define VS_FF_PATCHED 0x00000004L -#define VS_FF_PRIVATEBUILD 0x00000008L -#define VS_FF_INFOINFERRED 0x00000010L -#define VS_FF_SPECIALBUILD 0x00000020L - -#define VFT_UNKNOWN 0x00000000L -#define VFT_APP 0x00000001L -#define VFT_DLL 0x00000002L - -#define VFT2_UNKNOWN 0x00000000L - -#define VOS__WINDOWS32 0x00000004L diff --git a/src/coreclr/pal/inc/unixasmmacrosloongarch64.inc b/src/coreclr/pal/inc/unixasmmacrosloongarch64.inc index 345d2e492b72d1..2ff98d29ecf546 100644 --- a/src/coreclr/pal/inc/unixasmmacrosloongarch64.inc +++ b/src/coreclr/pal/inc/unixasmmacrosloongarch64.inc @@ -447,7 +447,7 @@ __RedirectionFuncName SETS "|?RedirectedHandledJITCaseFor":CC:"$reason":CC:"@Thr // Stack alignment. This check is necessary as this function can be // entered before complete execution of the prolog of another function. - andi $t4, $fp, 15 + andi $t4, $fp, 0xf sub.d $sp, $sp, $t4 @@ -482,3 +482,19 @@ $__RedirectionStubEndFuncName EMIT_BREAKPOINT #endif .endm + +//----------------------------------------------------------------------------- +// Macro used to check (in debug builds only) whether the stack is 16-bytes aligned (a requirement before calling +// out into C++/OS code). Invoke this directly after your prolog (if the stack frame size is fixed) or directly +// before a call (if you have a frame pointer and a dynamic stack). A breakpoint will be invoked if the stack +// is misaligned. +// +.macro CHECK_STACK_ALIGNMENT + +#ifdef _DEBUG + andi $t4, $sp, 0xf + beq $t4, $r0, 0f + EMIT_BREAKPOINT +0: +#endif +.endm diff --git a/src/coreclr/pal/inc/unixasmmacrosriscv64.inc b/src/coreclr/pal/inc/unixasmmacrosriscv64.inc index 2151b0c26e4235..56da9af150dc6c 100644 --- a/src/coreclr/pal/inc/unixasmmacrosriscv64.inc +++ b/src/coreclr/pal/inc/unixasmmacrosriscv64.inc @@ -323,3 +323,19 @@ C_FUNC(\Name\()_End): // TODO RISCV NYI sw ra, 0(zero) .endm + +//----------------------------------------------------------------------------- +// Macro used to check (in debug builds only) whether the stack is 16-bytes aligned (a requirement before calling +// out into C++/OS code). Invoke this directly after your prolog (if the stack frame size is fixed) or directly +// before a call (if you have a frame pointer and a dynamic stack). A breakpoint will be invoked if the stack +// is misaligned. +// +.macro CHECK_STACK_ALIGNMENT + +#ifdef _DEBUG + andi t4, sp, 0xf + beq t4, zero, 0f + EMIT_BREAKPOINT +0: +#endif +.endm diff --git a/src/coreclr/pal/prebuilt/corerror/mscorurt.rc b/src/coreclr/pal/prebuilt/corerror/mscorurt.rc index c0df09d91187b1..67c5f9d48fec1d 100644 --- a/src/coreclr/pal/prebuilt/corerror/mscorurt.rc +++ b/src/coreclr/pal/prebuilt/corerror/mscorurt.rc @@ -291,12 +291,7 @@ BEGIN MSG_FOR_URT_HR(CORDBG_E_ASSEMBLY_UPDATES_APPLIED) "The operation is not supported because assembly updates have been applied." MSG_FOR_URT_HR(PEFMT_E_64BIT) "File is PE32+." MSG_FOR_URT_HR(PEFMT_E_32BIT) "File is PE32" - MSG_FOR_URT_HR(CLR_E_BIND_ASSEMBLY_VERSION_TOO_LOW) "The bound assembly has a version that is lower than that of the request." - MSG_FOR_URT_HR(CLR_E_BIND_ASSEMBLY_PUBLIC_KEY_MISMATCH) "The assembly version has a public key token that does not match that of the request." - MSG_FOR_URT_HR(CLR_E_BIND_IMAGE_UNAVAILABLE) "The requested image was not found or is unavailable." - MSG_FOR_URT_HR(CLR_E_BIND_UNRECOGNIZED_IDENTITY_FORMAT) "The provided identity format is not recognized." - MSG_FOR_URT_HR(CLR_E_BIND_ASSEMBLY_NOT_FOUND) "A binding for the specified assembly name was not found." - MSG_FOR_URT_HR(CLR_E_BIND_TYPE_NOT_FOUND) "A binding for the specified type name was not found." + MSG_FOR_URT_HR(CLR_E_BIND_ARCHITECTURE_MISMATCH) "The assembly architecture is not compatible with the current process architecture." MSG_FOR_URT_HR(CLR_E_GC_OOM) "Failfast due to an OOM during a GC" MSG_FOR_URT_HR(CLR_E_GC_BAD_AFFINITY_CONFIG) "GCHeapAffinitizeMask or GCHeapAffinitizeRanges didn't specify any CPUs the current process is affinitized to." MSG_FOR_URT_HR(CLR_E_GC_BAD_AFFINITY_CONFIG_FORMAT) "GCHeapAffinitizeRanges configuration string has invalid format." diff --git a/src/coreclr/pal/prebuilt/inc/corerror.h b/src/coreclr/pal/prebuilt/inc/corerror.h index e073dea06de5bb..994648cb25ea7b 100644 --- a/src/coreclr/pal/prebuilt/inc/corerror.h +++ b/src/coreclr/pal/prebuilt/inc/corerror.h @@ -363,12 +363,7 @@ #define PEFMT_E_64BIT EMAKEHR(0x1d02) #define PEFMT_E_32BIT EMAKEHR(0x1d0b) #define CLDB_E_INTERNALERROR EMAKEHR(0x1fff) -#define CLR_E_BIND_ASSEMBLY_VERSION_TOO_LOW EMAKEHR(0x2000) -#define CLR_E_BIND_ASSEMBLY_PUBLIC_KEY_MISMATCH EMAKEHR(0x2001) -#define CLR_E_BIND_IMAGE_UNAVAILABLE EMAKEHR(0x2002) -#define CLR_E_BIND_UNRECOGNIZED_IDENTITY_FORMAT EMAKEHR(0x2003) -#define CLR_E_BIND_ASSEMBLY_NOT_FOUND EMAKEHR(0x2004) -#define CLR_E_BIND_TYPE_NOT_FOUND EMAKEHR(0x2005) +#define CLR_E_BIND_ARCHITECTURE_MISMATCH EMAKEHR(0x2006) #define CLR_E_GC_OOM EMAKEHR(0x2009) #define CLR_E_GC_BAD_AFFINITY_CONFIG EMAKEHR(0x200a) #define CLR_E_GC_BAD_AFFINITY_CONFIG_FORMAT EMAKEHR(0x200b) diff --git a/src/coreclr/pal/prebuilt/inc/fxver.h b/src/coreclr/pal/prebuilt/inc/fxver.h index 7297587490de46..b88f7e9c9514a1 100644 --- a/src/coreclr/pal/prebuilt/inc/fxver.h +++ b/src/coreclr/pal/prebuilt/inc/fxver.h @@ -1,7 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +// Our custom .rc parser on Unix follows the #ifdef and #include rules +// Use #ifndef here to avoid dummy verrsrc.h +#ifndef HOST_UNIX #include +#endif #define QUOTE_MACRO_HELPER(x) #x #define QUOTE_MACRO(x) QUOTE_MACRO_HELPER(x) diff --git a/src/coreclr/pal/src/CMakeLists.txt b/src/coreclr/pal/src/CMakeLists.txt index 26f0fa0295dece..0fe6c0f04e590a 100644 --- a/src/coreclr/pal/src/CMakeLists.txt +++ b/src/coreclr/pal/src/CMakeLists.txt @@ -33,8 +33,6 @@ if(CORECLR_SET_RPATH) set(MACOSX_RPATH ON) endif(CORECLR_SET_RPATH) -cmake_policy(SET CMP0042 NEW) - # Include directories include_directories(include) diff --git a/src/coreclr/pal/src/config.h.in b/src/coreclr/pal/src/config.h.in index 89cbc3ecafacf3..e52db481c01c8b 100644 --- a/src/coreclr/pal/src/config.h.in +++ b/src/coreclr/pal/src/config.h.in @@ -45,7 +45,6 @@ #cmakedefine01 HAVE_SYSCTL #cmakedefine01 HAVE_SYSCTLBYNAME #cmakedefine01 HAVE_SYSCONF -#cmakedefine01 HAVE_SYSINFO #cmakedefine01 HAVE_GMTIME_R #cmakedefine01 HAVE_TIMEGM #cmakedefine01 HAVE_POLL @@ -68,12 +67,9 @@ #cmakedefine HAVE_UNW_GET_SAVE_LOC #cmakedefine HAVE_UNW_GET_ACCESSORS #cmakedefine HAVE_UNW_AARCH64_X19 -#cmakedefine01 HAVE_XSWDEV -#cmakedefine01 HAVE_XSW_USAGE #cmakedefine01 HAVE_PUBLIC_XSTATE_STRUCT #cmakedefine01 HAVE__FPX_SW_BYTES_WITH_XSTATE_BV #cmakedefine01 HAVE_PR_SET_PTRACER -#cmakedefine01 HAVE_SWAPCTL #cmakedefine01 HAVE_STAT_TIMESPEC #cmakedefine01 HAVE_STAT_TIM @@ -89,7 +85,6 @@ #cmakedefine01 HAVE_PTHREAD_RWLOCK_T #cmakedefine01 HAVE_PRWATCH_T #cmakedefine SIZEOF_OFF_T @SIZEOF_OFF_T@ -#cmakedefine01 HAVE_DIRENT_D_TYPE #cmakedefine01 HAVE_FPREGS_WITH_CW #cmakedefine01 HAVE_YIELD_SYSCALL diff --git a/src/coreclr/pal/src/configure.cmake b/src/coreclr/pal/src/configure.cmake index 63e67f2997539d..c82e416e02e6f3 100644 --- a/src/coreclr/pal/src/configure.cmake +++ b/src/coreclr/pal/src/configure.cmake @@ -117,7 +117,6 @@ if(CLR_CMAKE_TARGET_LINUX) else() check_function_exists(sysctl HAVE_SYSCTL) endif() -check_function_exists(sysinfo HAVE_SYSINFO) check_function_exists(sysconf HAVE_SYSCONF) check_function_exists(gmtime_r HAVE_GMTIME_R) check_function_exists(timegm HAVE_TIMEGM) @@ -150,8 +149,6 @@ check_struct_has_member ("struct tm" tm_gmtoff time.h HAVE_TM_GMTOFF) check_struct_has_member ("ucontext_t" uc_mcontext.gregs[0] ucontext.h HAVE_GREGSET_T) check_struct_has_member ("ucontext_t" uc_mcontext.__gregs[0] ucontext.h HAVE___GREGSET_T) check_struct_has_member ("ucontext_t" uc_mcontext.fpregs->__glibc_reserved1[0] ucontext.h HAVE_FPSTATE_GLIBC_RESERVED1) -check_struct_has_member ("struct sysinfo" mem_unit "sys/sysinfo.h" HAVE_SYSINFO_WITH_MEM_UNIT) -check_struct_has_member ("struct dirent" d_type dirent.h HAVE_DIRENT_D_TYPE) check_struct_has_member ("struct _fpchip_state" cw sys/ucontext.h HAVE_FPREGS_WITH_CW) set(CMAKE_EXTRA_INCLUDE_FILES machine/reg.h) @@ -173,13 +170,19 @@ check_type_size(prwatch_t PRWATCH_T) set(CMAKE_EXTRA_INCLUDE_FILE) check_type_size(off_t SIZEOF_OFF_T) +set(CMAKE_EXTRA_INCLUDE_FILES sys/auxv.h) +set(CMAKE_EXTRA_INCLUDE_FILES cmath) +set(CMAKE_EXTRA_INCLUDE_FILES sstream) +set(CMAKE_EXTRA_INCLUDE_FILES bitset) +set(CMAKE_EXTRA_INCLUDE_FILES inttypes.h) + + check_cxx_symbol_exists(SYS_yield sys/syscall.h HAVE_YIELD_SYSCALL) check_cxx_symbol_exists(INFTIM poll.h HAVE_INFTIM) check_cxx_symbol_exists(CHAR_BIT limits.h HAVE_CHAR_BIT) check_cxx_symbol_exists(_DEBUG sys/user.h USER_H_DEFINES_DEBUG) check_cxx_symbol_exists(_SC_PHYS_PAGES unistd.h HAVE__SC_PHYS_PAGES) check_cxx_symbol_exists(_SC_AVPHYS_PAGES unistd.h HAVE__SC_AVPHYS_PAGES) -check_cxx_symbol_exists(swapctl sys/swap.h HAVE_SWAPCTL) check_cxx_source_runs(" #include @@ -955,29 +958,6 @@ if(NOT CLR_CMAKE_USE_SYSTEM_LIBUNWIND) list(REMOVE_AT CMAKE_REQUIRED_INCLUDES 0 1) endif() -check_cxx_source_compiles(" -#include -#include -#include - -int main(int argc, char **argv) -{ - struct xswdev xsw; - - return 0; -}" HAVE_XSWDEV) - -check_cxx_source_compiles(" -#include -#include - -int main(int argc, char **argv) -{ - struct xsw_usage xsu; - - return 0; -}" HAVE_XSW_USAGE) - check_cxx_source_compiles(" #include @@ -1312,4 +1292,8 @@ check_prototype_definition( ${STATFS_INCLUDES} HAVE_NON_LEGACY_STATFS) +set(CMAKE_REQUIRED_LIBRARIES cmath) +set(CMAKE_REQUIRED_LIBRARIES sstream) + + configure_file(${CMAKE_CURRENT_LIST_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) diff --git a/src/coreclr/pal/src/eventprovider/lttngprovider/CMakeLists.txt b/src/coreclr/pal/src/eventprovider/lttngprovider/CMakeLists.txt index 715718bad4bcad..d116c0095ea55f 100644 --- a/src/coreclr/pal/src/eventprovider/lttngprovider/CMakeLists.txt +++ b/src/coreclr/pal/src/eventprovider/lttngprovider/CMakeLists.txt @@ -1,7 +1,7 @@ -include(FindPythonInterp) +include(FindPython) set (GENERATE_SCRIPT ${CLR_DIR}/scripts/genLttngProvider.py) -set(GENERATE_COMMAND ${PYTHON_EXECUTABLE} ${GENERATE_SCRIPT} --man ${EVENT_MANIFEST} --intermediate ${CMAKE_CURRENT_BINARY_DIR}) +set(GENERATE_COMMAND ${Python_EXECUTABLE} ${GENERATE_SCRIPT} --man ${EVENT_MANIFEST} --intermediate ${CMAKE_CURRENT_BINARY_DIR}) execute_process( COMMAND ${GENERATE_COMMAND} --dry-run diff --git a/src/coreclr/pal/src/file/filetime.cpp b/src/coreclr/pal/src/file/filetime.cpp index ea8ca6bd0535ad..2500d234d8b65a 100644 --- a/src/coreclr/pal/src/file/filetime.cpp +++ b/src/coreclr/pal/src/file/filetime.cpp @@ -188,35 +188,6 @@ GetSystemTimeAsFileTime( } -#ifdef __APPLE__ -/*++ -Function: - FILECFAbsoluteTimeToFileTime - -Convert a CFAbsoluteTime value to a win32 FILETIME structure, as described -in MSDN documentation. CFAbsoluteTime is the number of seconds elapsed since -00:00 01 January 2001 UTC (Mac OS X epoch), while FILETIME represents a -64-bit number of 100-nanosecond intervals that have passed since 00:00 -01 January 1601 UTC (win32 epoch). ---*/ -FILETIME FILECFAbsoluteTimeToFileTime( CFAbsoluteTime sec ) -{ - __int64 Result; - FILETIME Ret; - - Result = ((__int64)sec + SECS_BETWEEN_1601_AND_2001_EPOCHS) * SECS_TO_100NS; - - Ret.dwLowDateTime = (DWORD)Result; - Ret.dwHighDateTime = (DWORD)(Result >> 32); - - TRACE("CFAbsoluteTime = [%9f] converts to Win32 FILETIME = [%#x:%#x]\n", - sec, Ret.dwHighDateTime, Ret.dwLowDateTime); - - return Ret; -} -#endif // __APPLE__ - - /*++ Function: FILEUnixTimeToFileTime diff --git a/src/coreclr/pal/src/include/pal/filetime.h b/src/coreclr/pal/src/include/pal/filetime.h index 5a06cb5c3063e6..cf177058be47cb 100644 --- a/src/coreclr/pal/src/include/pal/filetime.h +++ b/src/coreclr/pal/src/include/pal/filetime.h @@ -63,12 +63,6 @@ extern "C" FILETIME FILEUnixTimeToFileTime( time_t sec, long nsec ); -#ifdef __APPLE__ -#include - -FILETIME FILECFAbsoluteTimeToFileTime( CFAbsoluteTime sec ); -#endif // __APPLE__ - #ifdef __cplusplus } #endif // __cplusplus diff --git a/src/coreclr/pal/src/include/pal/palinternal.h b/src/coreclr/pal/src/include/pal/palinternal.h index a7c5ba129c90fa..c8cded47fe201a 100644 --- a/src/coreclr/pal/src/include/pal/palinternal.h +++ b/src/coreclr/pal/src/include/pal/palinternal.h @@ -182,6 +182,9 @@ function_name() to call the system's implementation #define strrchr DUMMY_strrchr #define strpbrk DUMMY_strpbrk #define strtod DUMMY_strtod +#define strspn DUMMY_strspn +#define strtol DUMMY_strtol +#define stpcpy DUMMY_stpcpy #define tolower DUMMY_tolower #define toupper DUMMY_toupper #define isprint DUMMY_isprint @@ -375,6 +378,9 @@ function_name() to call the system's implementation #undef strtoul #undef strtoull #undef strtod +#undef strspn +#undef strtol +#undef stpcpy #undef strtok #undef strdup #undef tolower diff --git a/src/coreclr/pal/src/loader/module.cpp b/src/coreclr/pal/src/loader/module.cpp index 6de530e80a5ccf..f0651d3bad5861 100644 --- a/src/coreclr/pal/src/loader/module.cpp +++ b/src/coreclr/pal/src/loader/module.cpp @@ -104,34 +104,6 @@ static BOOL LOADCallDllMainSafe(MODSTRUCT *module, DWORD dwReason, LPVOID lpRese /* API function definitions ***************************************************/ -/*++ -Function: - LoadLibraryA - -See MSDN doc. ---*/ -HMODULE -PALAPI -LoadLibraryA( - IN LPCSTR lpLibFileName) -{ - return LoadLibraryExA(lpLibFileName, nullptr, 0); -} - -/*++ -Function: - LoadLibraryW - -See MSDN doc. ---*/ -HMODULE -PALAPI -LoadLibraryW( - IN LPCWSTR lpLibFileName) -{ - return LoadLibraryExW(lpLibFileName, nullptr, 0); -} - /*++ Function: LoadLibraryExA @@ -154,7 +126,7 @@ LoadLibraryExA( HMODULE hModule = nullptr; - PERF_ENTRY(LoadLibraryA); + PERF_ENTRY(LoadLibraryExA); ENTRY("LoadLibraryExA (lpLibFileName=%p (%s)) \n", (lpLibFileName) ? lpLibFileName : "NULL", (lpLibFileName) ? lpLibFileName : "NULL"); diff --git a/src/coreclr/pal/src/misc/sysinfo.cpp b/src/coreclr/pal/src/misc/sysinfo.cpp index cd7f0304b955a9..499b905180950e 100644 --- a/src/coreclr/pal/src/misc/sysinfo.cpp +++ b/src/coreclr/pal/src/misc/sysinfo.cpp @@ -40,20 +40,12 @@ Revision History: #include #endif -#if HAVE_SYSINFO -#include -#endif - #include #if HAVE_SYS_VMPARAM_H #include #endif // HAVE_SYS_VMPARAM_H -#if HAVE_XSWDEV -#include -#endif // HAVE_XSWDEV - #if HAVE_MACH_VM_TYPES_H #include #endif // HAVE_MACH_VM_TYPES_H @@ -92,10 +84,6 @@ Revision History: #include -#if HAVE_SWAPCTL -#include -#endif - SET_DEFAULT_DEBUG_CHANNEL(MISC); #ifndef __APPLE__ @@ -267,228 +255,6 @@ static uint64_t GetMemorySizeMultiplier(char units) return 1; } -#ifndef __APPLE__ -// Try to read the MemAvailable entry from /proc/meminfo. -// Return true if the /proc/meminfo existed, the entry was present and we were able to parse it. -static bool ReadMemAvailable(uint64_t* memAvailable) -{ - bool foundMemAvailable = false; - FILE* memInfoFile = fopen("/proc/meminfo", "r"); - if (memInfoFile != NULL) - { - char *line = nullptr; - size_t lineLen = 0; - - while (getline(&line, &lineLen, memInfoFile) != -1) - { - char units = '\0'; - uint64_t available; - int fieldsParsed = sscanf(line, "MemAvailable: %" SCNu64 " %cB", &available, &units); - - if (fieldsParsed >= 1) - { - uint64_t multiplier = GetMemorySizeMultiplier(units); - *memAvailable = available * multiplier; - foundMemAvailable = true; - break; - } - } - - free(line); - fclose(memInfoFile); - } - - return foundMemAvailable; -} -#endif // __APPLE__ - -/*++ -Function: - GlobalMemoryStatusEx - -GlobalMemoryStatusEx - -Retrieves information about the system's current usage of both physical and virtual memory. - -Return Values - -This function returns a BOOL to indicate its success status. - ---*/ -BOOL -PALAPI -GlobalMemoryStatusEx( - IN OUT LPMEMORYSTATUSEX lpBuffer) -{ - - PERF_ENTRY(GlobalMemoryStatusEx); - ENTRY("GlobalMemoryStatusEx (lpBuffer=%p)\n", lpBuffer); - - lpBuffer->dwMemoryLoad = 0; - lpBuffer->ullTotalPhys = 0; - lpBuffer->ullAvailPhys = 0; - lpBuffer->ullTotalPageFile = 0; - lpBuffer->ullAvailPageFile = 0; - lpBuffer->ullTotalVirtual = 0; - lpBuffer->ullAvailVirtual = 0; - lpBuffer->ullAvailExtendedVirtual = 0; - - BOOL fRetVal = FALSE; - int rc; - - // Get the physical memory size -#if HAVE_SYSCONF && HAVE__SC_PHYS_PAGES - uint64_t physical_memory; - - // Get the Physical memory size - physical_memory = ((uint64_t)sysconf( _SC_PHYS_PAGES )) * ((uint64_t) sysconf( _SC_PAGE_SIZE )); - lpBuffer->ullTotalPhys = (DWORDLONG)physical_memory; - fRetVal = TRUE; -#elif HAVE_SYSCTL - int64_t physical_memory; - size_t length; - // Get the Physical memory size - int mib[] = { CTL_HW, HW_MEMSIZE }; - length = sizeof(INT64); - rc = sysctl(mib, 2, &physical_memory, &length, NULL, 0); - if (rc != 0) - { - ASSERT("sysctl failed for HW_MEMSIZE (%d)\n", errno); - } - else - { - lpBuffer->ullTotalPhys = (DWORDLONG)physical_memory; - fRetVal = TRUE; - } - -#endif // HAVE_SYSCTL - - // Get swap file size, consider the ability to get the values optional - // (don't return FALSE from the GlobalMemoryStatusEx) -#if HAVE_XSW_USAGE - // This is available on OSX - struct xsw_usage xsu; - int mib[] = { CTL_HW, VM_SWAPUSAGE }; - size_t length = sizeof(xsu); - rc = sysctl(mib, 2, &xsu, &length, NULL, 0); - if (rc == 0) - { - lpBuffer->ullTotalPageFile = xsu.xsu_total; - lpBuffer->ullAvailPageFile = xsu.xsu_avail; - } -#elif HAVE_XSWDEV - // E.g. FreeBSD - struct xswdev xsw; - int mib[3]; - size_t length = 2; - rc = sysctlnametomib("vm.swap_info", mib, &length); - if (rc == 0) - { - int pagesize = getpagesize(); - // Aggregate the information for all swap files on the system - for (mib[2] = 0; ; mib[2]++) - { - length = sizeof(xsw); - rc = sysctl(mib, 3, &xsw, &length, NULL, 0); - if ((rc < 0) || (xsw.xsw_version != XSWDEV_VERSION)) - { - // All the swap files were processed or coreclr was built against - // a version of headers not compatible with the current XSWDEV_VERSION. - break; - } - - DWORDLONG avail = xsw.xsw_nblks - xsw.xsw_used; - lpBuffer->ullTotalPageFile += (DWORDLONG)xsw.xsw_nblks * pagesize; - lpBuffer->ullAvailPageFile += (DWORDLONG)avail * pagesize; - } - } -#elif HAVE_SWAPCTL - struct anoninfo ai; - if (swapctl(SC_AINFO, &ai) != -1) - { - int pagesize = getpagesize(); - lpBuffer->ullTotalPageFile = ai.ani_max * pagesize; - lpBuffer->ullAvailPageFile = ai.ani_free * pagesize; - } -#elif HAVE_SYSINFO - // Linux - struct sysinfo info; - rc = sysinfo(&info); - if (rc == 0) - { - lpBuffer->ullTotalPageFile = info.totalswap; - lpBuffer->ullAvailPageFile = info.freeswap; -#if HAVE_SYSINFO_WITH_MEM_UNIT - // A newer version of the sysinfo structure represents all the sizes - // in mem_unit instead of bytes - lpBuffer->ullTotalPageFile *= info.mem_unit; - lpBuffer->ullAvailPageFile *= info.mem_unit; -#endif // HAVE_SYSINFO_WITH_MEM_UNIT - } -#endif // HAVE_SYSINFO - - // Get the physical memory in use - from it, we can get the physical memory available. - // We do this only when we have the total physical memory available. - if (lpBuffer->ullTotalPhys > 0) - { -#ifndef __APPLE__ - static volatile bool tryReadMemInfo = true; - - if (tryReadMemInfo) - { - // Ensure that we don't try to read the /proc/meminfo in successive calls to the GlobalMemoryStatusEx - // if we have failed to access the file or the file didn't contain the MemAvailable value. - tryReadMemInfo = ReadMemAvailable((uint64_t*)&lpBuffer->ullAvailPhys); - } - - if (!tryReadMemInfo) - { - // The /proc/meminfo doesn't exist or it doesn't contain the MemAvailable row or the format of the row is invalid - // Fall back to getting the available pages using sysconf. - lpBuffer->ullAvailPhys = sysconf(SYSCONF_PAGES) * sysconf(_SC_PAGE_SIZE); - } - - INT64 used_memory = lpBuffer->ullTotalPhys - lpBuffer->ullAvailPhys; - lpBuffer->dwMemoryLoad = (DWORD)((used_memory * 100) / lpBuffer->ullTotalPhys); -#else - vm_size_t page_size; - mach_port_t mach_port; - mach_msg_type_number_t count; - vm_statistics_data_t vm_stats; - mach_port = mach_host_self(); - count = sizeof(vm_stats) / sizeof(natural_t); - if (KERN_SUCCESS == host_page_size(mach_port, &page_size)) - { - if (KERN_SUCCESS == host_statistics(mach_port, HOST_VM_INFO, (host_info_t)&vm_stats, &count)) - { - lpBuffer->ullAvailPhys = (int64_t)vm_stats.free_count * (int64_t)page_size; - INT64 used_memory = ((INT64)vm_stats.active_count + (INT64)vm_stats.inactive_count + (INT64)vm_stats.wire_count) * (INT64)page_size; - lpBuffer->dwMemoryLoad = (DWORD)((used_memory * 100) / lpBuffer->ullTotalPhys); - } - } - mach_port_deallocate(mach_task_self(), mach_port); -#endif // __APPLE__ - } - -#ifndef TARGET_RISCV64 - // There is no API to get the total virtual address space size on - // Unix, so we use a constant value representing 128TB, which is - // the approximate size of total user virtual address space on - // the currently supported Unix systems. - static const UINT64 VMSize = (1ull << 47); -#else // TARGET_RISCV64 - // For RISC-V Linux Kernel SV39 virtual memory limit is 256gb. - static const UINT64 VMSize = (1ull << 38); -#endif // TARGET_RISCV64 - lpBuffer->ullTotalVirtual = VMSize; - lpBuffer->ullAvailVirtual = lpBuffer->ullAvailPhys; - - LOGEXIT("GlobalMemoryStatusEx returns %d\n", fRetVal); - PERF_EXIT(GlobalMemoryStatusEx); - - return fRetVal; -} - bool PAL_ReadMemoryValueFromFile(const char* filename, uint64_t* val) { @@ -524,151 +290,3 @@ PAL_ReadMemoryValueFromFile(const char* filename, uint64_t* val) free(line); return result; } - -#define UPDATE_CACHE_SIZE_AND_LEVEL(NEW_CACHE_SIZE, NEW_CACHE_LEVEL) if (NEW_CACHE_SIZE > cacheSize) { cacheSize = NEW_CACHE_SIZE; cacheLevel = NEW_CACHE_LEVEL; } - -size_t -PALAPI -PAL_GetLogicalProcessorCacheSizeFromOS() -{ - size_t cacheLevel = 0; - size_t cacheSize = 0; - size_t size; - -#ifdef _SC_LEVEL1_DCACHE_SIZE - size = ( size_t) sysconf(_SC_LEVEL1_DCACHE_SIZE); - UPDATE_CACHE_SIZE_AND_LEVEL(size, 1) -#endif -#ifdef _SC_LEVEL2_CACHE_SIZE - size = ( size_t) sysconf(_SC_LEVEL2_CACHE_SIZE); - UPDATE_CACHE_SIZE_AND_LEVEL(size, 2) -#endif -#ifdef _SC_LEVEL3_CACHE_SIZE - size = ( size_t) sysconf(_SC_LEVEL3_CACHE_SIZE); - UPDATE_CACHE_SIZE_AND_LEVEL(size, 3) -#endif -#ifdef _SC_LEVEL4_CACHE_SIZE - size = ( size_t) sysconf(_SC_LEVEL4_CACHE_SIZE); - UPDATE_CACHE_SIZE_AND_LEVEL(size, 4) -#endif - -#if defined(TARGET_LINUX) && !defined(HOST_ARM) && !defined(HOST_X86) - if (cacheSize == 0) - { - // - // Fallback to retrieve cachesize via /sys/.. if sysconf was not available - // for the platform. Currently musl and arm64 should be only cases to use - // this method to determine cache size. - // - size_t level; - char path_to_size_file[] = "/sys/devices/system/cpu/cpu0/cache/index-/size"; - char path_to_level_file[] = "/sys/devices/system/cpu/cpu0/cache/index-/level"; - int index = 40; - _ASSERTE(path_to_size_file[index] == '-'); - _ASSERTE(path_to_level_file[index] == '-'); - - for (int i = 0; i < 5; i++) - { - path_to_size_file[index] = (char)(48 + i); - - if (PAL_ReadMemoryValueFromFile(path_to_size_file, &size)) - { - path_to_level_file[index] = (char)(48 + i); - - if (PAL_ReadMemoryValueFromFile(path_to_level_file, &level)) - { - UPDATE_CACHE_SIZE_AND_LEVEL(size, level) - } - else - { - cacheSize = std::max(cacheSize, size); - } - } - } - } -#endif - -#if (defined(HOST_ARM64) || defined(HOST_LOONGARCH64)) && !defined(TARGET_OSX) - if (cacheSize == 0) - { - // We expect to get the L3 cache size for Arm64 but currently expected to be missing that info - // from most of the machines with an exceptions on some machines. - // - // _SC_LEVEL*_*CACHE_SIZE is not yet present. Work is in progress to enable this for arm64 - // - // /sys/devices/system/cpu/cpu*/cache/index*/ is also not yet present in most systems. - // Arm64 patch is in Linux kernel tip. - // - // midr_el1 is available in "/sys/devices/system/cpu/cpu0/regs/identification/midr_el1", - // but without an exhaustive list of ARM64 processors any decode of midr_el1 - // Would likely be incomplete - - // Published information on ARM64 architectures is limited. - // If we use recent high core count chips as a guide for state of the art, we find - // total L3 cache to be 1-2MB/core. As always, there are exceptions. - - // Estimate cache size based on CPU count - // Assume lower core count are lighter weight parts which are likely to have smaller caches - // Assume L3$/CPU grows linearly from 256K to 1.5M/CPU as logicalCPUs grows from 2 to 12 CPUs - DWORD logicalCPUs = PAL_GetLogicalCpuCountFromOS(); - - cacheSize = logicalCPUs*std::min(1536, std::max(256, (int)logicalCPUs*128))*1024; - } -#endif - -#if HAVE_SYSCTLBYNAME - if (cacheSize == 0) - { - int64_t cacheSizeFromSysctl = 0; - size_t sz = sizeof(cacheSizeFromSysctl); - const bool success = false - // 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: 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; - if (success) - { - _ASSERTE(cacheSizeFromSysctl > 0); - cacheSize = ( size_t) cacheSizeFromSysctl; - } - } -#endif - -#if (defined(HOST_ARM64) || defined(HOST_LOONGARCH64)) && !defined(TARGET_OSX) - if (cacheLevel != 3) - { - // We expect to get the L3 cache size for Arm64 but currently expected to be missing that info - // from most of the machines. - // Hence, just use the following heuristics at best depending on the CPU count - // 1 ~ 4 : 4 MB - // 5 ~ 16 : 8 MB - // 17 ~ 64 : 16 MB - // 65+ : 32 MB - DWORD logicalCPUs = PAL_GetLogicalCpuCountFromOS(); - if (logicalCPUs < 5) - { - cacheSize = 4; - } - else if (logicalCPUs < 17) - { - cacheSize = 8; - } - else if (logicalCPUs < 65) - { - cacheSize = 16; - } - else - { - cacheSize = 32; - } - - cacheSize *= (1024 * 1024); - } -#endif - - return cacheSize; -} diff --git a/src/coreclr/pal/tests/palsuite/CMakeLists.txt b/src/coreclr/pal/tests/palsuite/CMakeLists.txt index e3698bfc25775a..f9166670e12408 100644 --- a/src/coreclr/pal/tests/palsuite/CMakeLists.txt +++ b/src/coreclr/pal/tests/palsuite/CMakeLists.txt @@ -487,7 +487,6 @@ add_executable_clr(paltests miscellaneous/GetLastError/test1/test.cpp miscellaneous/GetSystemInfo/test1/test.cpp miscellaneous/GetTickCount/test1/test.cpp - miscellaneous/GlobalMemoryStatusEx/test1/test.cpp miscellaneous/InterlockedCompareExchange/test1/test.cpp miscellaneous/InterlockedCompareExchange/test2/test.cpp miscellaneous/InterlockedCompareExchange64/test1/test.cpp diff --git a/src/coreclr/pal/tests/palsuite/compilableTests.txt b/src/coreclr/pal/tests/palsuite/compilableTests.txt index 37191618934cfc..8b388c44004b90 100644 --- a/src/coreclr/pal/tests/palsuite/compilableTests.txt +++ b/src/coreclr/pal/tests/palsuite/compilableTests.txt @@ -387,7 +387,6 @@ miscellaneous/GetEnvironmentVariableW/test6/paltest_getenvironmentvariablew_test miscellaneous/GetLastError/test1/paltest_getlasterror_test1 miscellaneous/GetSystemInfo/test1/paltest_getsysteminfo_test1 miscellaneous/GetTickCount/test1/paltest_gettickcount_test1 -miscellaneous/GlobalMemoryStatusEx/test1/paltest_globalmemorystatusex_test1 miscellaneous/InterlockedCompareExchange/test1/paltest_interlockedcompareexchange_test1 miscellaneous/InterlockedCompareExchange/test2/paltest_interlockedcompareexchange_test2 miscellaneous/InterlockedCompareExchange64/test1/paltest_interlockedcompareexchange64_test1 diff --git a/src/coreclr/pal/tests/palsuite/eventprovider/CMakeLists.txt b/src/coreclr/pal/tests/palsuite/eventprovider/CMakeLists.txt index 1546971e22f2e4..a7a599b9404c0c 100644 --- a/src/coreclr/pal/tests/palsuite/eventprovider/CMakeLists.txt +++ b/src/coreclr/pal/tests/palsuite/eventprovider/CMakeLists.txt @@ -6,10 +6,10 @@ set(SOURCES set(EVENT_MANIFEST ${VM_DIR}/ClrEtwAll.man) set(TEST_GENERATOR ${CLR_DIR}/scripts/genEventingTests.py) -include(FindPythonInterp) +include(FindPython) add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/clralltestevents.cpp - COMMAND ${PYTHON_EXECUTABLE} ${TEST_GENERATOR} --testdir "${CMAKE_CURRENT_BINARY_DIR}" --man "${EVENT_MANIFEST}" + COMMAND ${Python_EXECUTABLE} ${TEST_GENERATOR} --testdir "${CMAKE_CURRENT_BINARY_DIR}" --man "${EVENT_MANIFEST}" DEPENDS ${EVENT_MANIFEST} ${TEST_GENERATOR} COMMENT "Updating clralltestevents.cpp" ) diff --git a/src/coreclr/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test1/FreeLibrary.cpp b/src/coreclr/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test1/FreeLibrary.cpp index 528a1cca29fc8d..84c9fbbdef386a 100644 --- a/src/coreclr/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test1/FreeLibrary.cpp +++ b/src/coreclr/pal/tests/palsuite/filemapping_memmgt/FreeLibrary/test1/FreeLibrary.cpp @@ -34,14 +34,14 @@ PALTEST(filemapping_memmgt_FreeLibrary_test1_paltest_freelibrary_test1, "filemap { return (FAIL); } - + /*Load library (DLL). */ - hLib = LoadLibrary(LibraryName); + hLib = LoadLibraryExA(LibraryName, NULL, 0); if(hLib == NULL) { - Fail("ERROR:%u:Unable to load library %s\n", - GetLastError(), + Fail("ERROR:%u:Unable to load library %s\n", + GetLastError(), LibraryName); } @@ -54,10 +54,10 @@ PALTEST(filemapping_memmgt_FreeLibrary_test1_paltest_freelibrary_test1, "filemap Fail(""); } - /* Call the FreeLibrary API. */ + /* Call the FreeLibrary API. */ if (!FreeLibrary(hLib)) { - Fail("ERROR:%u: Unable to free library \"%s\"\n", + Fail("ERROR:%u: Unable to free library \"%s\"\n", GetLastError(), LibraryName); } @@ -83,7 +83,7 @@ BOOL PALAPI TestDll(HMODULE hLib, int testResult) #else char FunctName[] = "DllTest"; #endif - FARPROC DllAddr; + FARPROC DllAddr; /* Attempt to grab the proc address of the dll function. * This one should succeed.*/ @@ -92,12 +92,12 @@ BOOL PALAPI TestDll(HMODULE hLib, int testResult) DllAddr = GetProcAddress(hLib, FunctName); if(DllAddr == NULL) { - Trace("ERROR: Unable to load function \"%s\" library \"%s\"\n", + Trace("ERROR: Unable to load function \"%s\" library \"%s\"\n", FunctName, LibraryName); return (FALSE); } - /* Run the function in the DLL, + /* Run the function in the DLL, * to ensure that the DLL was loaded properly.*/ RetVal = DllAddr(); if (RetVal != 1) @@ -117,8 +117,8 @@ BOOL PALAPI TestDll(HMODULE hLib, int testResult) if(DllAddr != NULL) { Trace("ERROR: Able to load function \"%s\" from free'd" - " library \"%s\"\n", - FunctName, + " library \"%s\"\n", + FunctName, LibraryName); return (FALSE); } diff --git a/src/coreclr/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test1/GetModuleFileNameA.cpp b/src/coreclr/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test1/GetModuleFileNameA.cpp index c5fc79f7ad96e5..c962a468396e5b 100644 --- a/src/coreclr/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test1/GetModuleFileNameA.cpp +++ b/src/coreclr/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameA/test1/GetModuleFileNameA.cpp @@ -44,7 +44,7 @@ PALTEST(filemapping_memmgt_GetModuleFileNameA_test1_paltest_getmodulefilenamea_t //load a module - ModuleHandle = LoadLibrary(ModuleName); + ModuleHandle = LoadLibraryExA(ModuleName, NULL, 0); if(!ModuleHandle) { Fail("Failed to call LoadLibrary API!\n"); diff --git a/src/coreclr/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test1/GetModuleFileNameW.cpp b/src/coreclr/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test1/GetModuleFileNameW.cpp index db9daafd9b16a9..cb2077b84c1e69 100644 --- a/src/coreclr/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test1/GetModuleFileNameW.cpp +++ b/src/coreclr/pal/tests/palsuite/filemapping_memmgt/GetModuleFileNameW/test1/GetModuleFileNameW.cpp @@ -50,7 +50,7 @@ PALTEST(filemapping_memmgt_GetModuleFileNameW_test1_paltest_getmodulefilenamew_t lpModuleName = convert(ModuleName); //load a module - ModuleHandle = LoadLibrary(lpModuleName); + ModuleHandle = LoadLibraryExW(lpModuleName, NULL, 0); //free the memory free(lpModuleName); diff --git a/src/coreclr/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test1/test1.cpp b/src/coreclr/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test1/test1.cpp index 183177fb3841c7..c0825ec73d02bc 100644 --- a/src/coreclr/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test1/test1.cpp +++ b/src/coreclr/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test1/test1.cpp @@ -6,9 +6,9 @@ ** Source: test1.c (filemapping_memmgt\getprocaddress\test1) ** ** Purpose: Positive test the GetProcAddress API. -** The first test calls GetProcAddress to retrieve the -** address of SimpleFunction inside testlib by its name, -** then calls the function and checks that it worked. +** The first test calls GetProcAddress to retrieve the +** address of SimpleFunction inside testlib by its name, +** then calls the function and checks that it worked. ** ** **===========================================================================*/ @@ -43,7 +43,7 @@ PALTEST(filemapping_memmgt_GetProcAddress_test1_paltest_getprocaddress_test1, "f /* load a module */ - hModule = LoadLibrary(lpModuleName); + hModule = LoadLibraryExA(lpModuleName, NULL, 0); if(!hModule) { Fail("Unexpected error: " @@ -54,7 +54,7 @@ PALTEST(filemapping_memmgt_GetProcAddress_test1_paltest_getprocaddress_test1, "f /* * Test 1 * - * Get the address of a function + * Get the address of a function */ procAddressByName = (SIMPLEFUNCTION) GetProcAddress(hModule,FunctionName); if(!procAddressByName) @@ -67,7 +67,7 @@ PALTEST(filemapping_memmgt_GetProcAddress_test1_paltest_getprocaddress_test1, "f err = FreeLibrary(hModule); if(0 == err) { - Fail("Unexpected error: Failed to FreeLibrary %s\n", + Fail("Unexpected error: Failed to FreeLibrary %s\n", lpModuleName); } Fail(""); @@ -76,14 +76,14 @@ PALTEST(filemapping_memmgt_GetProcAddress_test1_paltest_getprocaddress_test1, "f /* Call the function to see that it really worked */ /* Simple function adds 1 to the argument passed */ if( 2 != ((procAddressByName)(1))) - { + { Trace("ERROR: Problem calling the function by its address.\n"); - + /* Cleanup */ err = FreeLibrary(hModule); if(0 == err) { - Fail("Unexpected error: Failed to FreeLibrary %s\n", + Fail("Unexpected error: Failed to FreeLibrary %s\n", lpModuleName); } Fail(""); @@ -93,7 +93,7 @@ PALTEST(filemapping_memmgt_GetProcAddress_test1_paltest_getprocaddress_test1, "f err = FreeLibrary(hModule); if(0 == err) { - Fail("Unexpected error: Failed to FreeLibrary %s\n", + Fail("Unexpected error: Failed to FreeLibrary %s\n", lpModuleName); } diff --git a/src/coreclr/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test2/test2.cpp b/src/coreclr/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test2/test2.cpp index 8556a67086e57b..f9be2d82a895ad 100644 --- a/src/coreclr/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test2/test2.cpp +++ b/src/coreclr/pal/tests/palsuite/filemapping_memmgt/GetProcAddress/test2/test2.cpp @@ -6,8 +6,8 @@ ** Source: test2.c (filemapping_memmgt\getprocaddress\test2) ** ** Purpose: This test tries to call GetProcAddress with -** a NULL handle, with a NULL function name, with an empty -** function name, with an invalid name and with an +** a NULL handle, with a NULL function name, with an empty +** function name, with an invalid name and with an ** invalid ordinal value. ** ** @@ -39,7 +39,7 @@ PALTEST(filemapping_memmgt_GetProcAddress_test2_paltest_getprocaddress_test2, "f } /* load a module */ - hModule = LoadLibrary(lpModuleName); + hModule = LoadLibraryExA(lpModuleName, NULL, 0); if(!hModule) { Fail("Unexpected error: " @@ -63,7 +63,7 @@ PALTEST(filemapping_memmgt_GetProcAddress_test2_paltest_getprocaddress_test2, "f err = FreeLibrary(hModule); if(0 == err) { - Fail("Unexpected error: Failed to FreeLibrary %s\n", + Fail("Unexpected error: Failed to FreeLibrary %s\n", lpModuleName); } Fail(""); @@ -86,7 +86,7 @@ PALTEST(filemapping_memmgt_GetProcAddress_test2_paltest_getprocaddress_test2, "f err = FreeLibrary(hModule); if(0 == err) { - Fail("Unexpected error: Failed to FreeLibrary %s\n", + Fail("Unexpected error: Failed to FreeLibrary %s\n", lpModuleName); } Fail(""); @@ -109,7 +109,7 @@ PALTEST(filemapping_memmgt_GetProcAddress_test2_paltest_getprocaddress_test2, "f err = FreeLibrary(hModule); if(0 == err) { - Fail("Unexpected error: Failed to FreeLibrary %s\n", + Fail("Unexpected error: Failed to FreeLibrary %s\n", lpModuleName); } Fail(""); @@ -132,7 +132,7 @@ PALTEST(filemapping_memmgt_GetProcAddress_test2_paltest_getprocaddress_test2, "f err = FreeLibrary(hModule); if(0 == err) { - Fail("Unexpected error: Failed to FreeLibrary %s\n", + Fail("Unexpected error: Failed to FreeLibrary %s\n", lpModuleName); } Fail(""); @@ -142,7 +142,7 @@ PALTEST(filemapping_memmgt_GetProcAddress_test2_paltest_getprocaddress_test2, "f err = FreeLibrary(hModule); if(0 == err) { - Fail("Unexpected error: Failed to FreeLibrary %s\n", + Fail("Unexpected error: Failed to FreeLibrary %s\n", lpModuleName); } diff --git a/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test1/LoadLibraryA.cpp b/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test1/LoadLibraryA.cpp index 2ab9fe39860639..53c564fad8bbc8 100644 --- a/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test1/LoadLibraryA.cpp +++ b/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test1/LoadLibraryA.cpp @@ -6,7 +6,7 @@ ** Source: loadlibrarya.c ** ** Purpose: Positive test the LoadLibrary API. -** Call LoadLibrary to map a module into the calling +** Call LoadLibrary to map a module into the calling ** process address space(DLL file) ** ** @@ -34,7 +34,7 @@ PALTEST(loader_LoadLibraryA_test1_paltest_loadlibrarya_test1, "loader/LoadLibrar } /* load a module */ - ModuleHandle = LoadLibrary(ModuleName); + ModuleHandle = LoadLibraryExA(ModuleName, NULL, 0); if(!ModuleHandle) { Fail("Failed to call LoadLibrary API!\n"); diff --git a/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test2/LoadLibraryA.cpp b/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test2/LoadLibraryA.cpp index 7b26fec41db9fb..ca8e52c408cc13 100644 --- a/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test2/LoadLibraryA.cpp +++ b/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test2/LoadLibraryA.cpp @@ -6,7 +6,7 @@ ** Source: loadlibrarya.c ** ** Purpose: Negative test the LoadLibraryA API. -** Call LoadLibraryA with a not exist module Name +** Call LoadLibraryA with a not exist module Name ** ** **============================================================*/ @@ -24,12 +24,12 @@ PALTEST(loader_LoadLibraryA_test2_paltest_loadlibrarya_test2, "loader/LoadLibrar { return FAIL; } - + /*try to load a not exist module */ - ModuleHandle = LoadLibraryA(pModuleName); + ModuleHandle = LoadLibraryExA(pModuleName, NULL, 0); if(NULL != ModuleHandle) { - Trace("Failed to call LoadLibraryA with a not exist mudule name, " + Trace("Failed to call LoadLibraryExA with a not exist mudule name, " "a NULL module handle is expected, but no NULL module handle " "is returned, error code=%u\n", GetLastError()); diff --git a/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test3/loadlibrarya.cpp b/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test3/loadlibrarya.cpp index af8782a2801657..cbb41f3457baef 100644 --- a/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test3/loadlibrarya.cpp +++ b/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test3/loadlibrarya.cpp @@ -25,15 +25,15 @@ PALTEST(loader_LoadLibraryA_test3_paltest_loadlibrarya_test3, "loader/LoadLibrar } /*load a module by passing a NULL module name*/ - ModuleHandle = LoadLibraryA(NULL); + ModuleHandle = LoadLibraryExA(NULL, NULL, 0); if(NULL != ModuleHandle) { - Fail("\nFailed to call loadlibrarya API for a negative test, " - "call loadibrarya with NULL moudle name, a NULL module " + Fail("\nFailed to call LoadLibraryExA API for a negative test, " + "call LoadLibraryExA with NULL moudle name, a NULL module " "handle is expected, but no NULL module handle is returned, " - "error code =%u\n", GetLastError()); + "error code =%u\n", GetLastError()); } - + PAL_Terminate(); return PASS; } diff --git a/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test5/loadlibrarya.cpp b/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test5/loadlibrarya.cpp index beceabf82fdb69..b8f609001f2424 100644 --- a/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test5/loadlibrarya.cpp +++ b/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test5/loadlibrarya.cpp @@ -39,11 +39,11 @@ PALTEST(loader_LoadLibraryA_test5_paltest_loadlibrarya_test5, "loader/LoadLibrar /* load a module which does not have the file extension, * but has a trailing dot */ - ModuleHandle = LoadLibraryA(ModuleName); + ModuleHandle = LoadLibraryExA(ModuleName, NULL, 0); if(NULL != ModuleHandle) { - Trace("Failed to call LoadLibraryA API for a negative test " - "call LoadLibraryA with module name which does not have " + Trace("Failed to call LoadLibraryExA API for a negative test " + "call LoadLibraryExA with module name which does not have " "extension except a trailing dot, a NULL module handle is" "expected, but no NULL module handle is returned, " "error code = %u\n", GetLastError()); diff --git a/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test7/LoadLibraryA.cpp b/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test7/LoadLibraryA.cpp index 78948e61698dab..1ad2a754fd60e7 100644 --- a/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test7/LoadLibraryA.cpp +++ b/src/coreclr/pal/tests/palsuite/loader/LoadLibraryA/test7/LoadLibraryA.cpp @@ -6,7 +6,7 @@ ** Source: loadlibrarya.c ** ** Purpose: Positive test the LoadLibrary API by calling it multiple times. -** Call LoadLibrary to map a module into the calling +** Call LoadLibrary to map a module into the calling ** process address space(DLL file) ** ** @@ -24,7 +24,7 @@ PALTEST(loader_LoadLibraryA_test7_paltest_loadlibrarya_test7, "loader/LoadLibraryA/test7/paltest_loadlibrarya_test7") { HMODULE ModuleHandle; - HMODULE ReturnHandle; + HMODULE ReturnHandle; int err; /* Initialize the PAL environment */ @@ -35,36 +35,36 @@ PALTEST(loader_LoadLibraryA_test7_paltest_loadlibrarya_test7, "loader/LoadLibrar } /* load a module */ - ModuleHandle = LoadLibrary(ModuleName); + ModuleHandle = LoadLibraryExA(ModuleName, NULL, 0); if(!ModuleHandle) { - Fail("Error[%u]:Failed to call LoadLibrary API!\n", GetLastError()); + Fail("Error[%u]:Failed to call LoadLibrary API!\n", GetLastError()); } - /* Call LoadLibrary again, should return same handle as returned for first time */ - ReturnHandle = LoadLibrary(ModuleName); - if(!ReturnHandle) + /* Call LoadLibrary again, should return same handle as returned for first time */ + ReturnHandle = LoadLibraryExA(ModuleName, NULL, 0); + if(!ReturnHandle) { - Fail("Error[%u]:Failed to call LoadLibrary API second time!\n", GetLastError()); + Fail("Error[%u]:Failed to call LoadLibrary API second time!\n", GetLastError()); } - + if(ModuleHandle != ReturnHandle) { - Fail("Error[%u]:Failed to return the same handle while calling LoadLibrary API twice!\n", GetLastError()); + Fail("Error[%u]:Failed to return the same handle while calling LoadLibrary API twice!\n", GetLastError()); } - + Trace("Value of handle ModuleHandle[%x], ReturnHandle[%x]\n", ModuleHandle, ReturnHandle); /* decrement the reference count of the loaded dll */ err = FreeLibrary(ModuleHandle); - + if(0 == err) { Fail("Error[%u]:Failed to FreeLibrary API!\n", GetLastError()); } - + /* Try Freeing a library again, should not fail */ err = FreeLibrary(ReturnHandle); - + if(0 == err) { Fail("Error[%u][%d]: Was not successful in freeing a Library twice using FreeLibrary!\n", GetLastError(), err); @@ -72,7 +72,7 @@ PALTEST(loader_LoadLibraryA_test7_paltest_loadlibrarya_test7, "loader/LoadLibrar /* Try Freeing a library again, should fail */ err = FreeLibrary(ReturnHandle); - + if(1 != err) { Fail("Error[%u][%d]: Was successful in freeing a Library thrice using FreeLibrary!\n", GetLastError(), err); diff --git a/src/coreclr/pal/tests/palsuite/loader/LoadLibraryW/test1/LoadLibraryW.cpp b/src/coreclr/pal/tests/palsuite/loader/LoadLibraryW/test1/LoadLibraryW.cpp index 26d6f2adefeb7a..52c564f52d22f4 100644 --- a/src/coreclr/pal/tests/palsuite/loader/LoadLibraryW/test1/LoadLibraryW.cpp +++ b/src/coreclr/pal/tests/palsuite/loader/LoadLibraryW/test1/LoadLibraryW.cpp @@ -38,7 +38,7 @@ PALTEST(loader_LoadLibraryW_test1_paltest_loadlibraryw_test1, "loader/LoadLibrar lpModuleName = convert(ModuleName); /* load a module */ - ModuleHandle = LoadLibrary(lpModuleName); + ModuleHandle = LoadLibraryExW(lpModuleName, NULL, 0); /* free the memory */ free(lpModuleName); diff --git a/src/coreclr/pal/tests/palsuite/loader/LoadLibraryW/test2/loadlibraryw.cpp b/src/coreclr/pal/tests/palsuite/loader/LoadLibraryW/test2/loadlibraryw.cpp index f563bb0243f505..7a2cebfb816f72 100644 --- a/src/coreclr/pal/tests/palsuite/loader/LoadLibraryW/test2/loadlibraryw.cpp +++ b/src/coreclr/pal/tests/palsuite/loader/LoadLibraryW/test2/loadlibraryw.cpp @@ -6,7 +6,7 @@ ** Source: loadlibraryw.c ** ** Purpose: Negative test the LoadLibraryW API. -** Call LoadLibraryW with a not exist module Name +** Call LoadLibraryW with a not exist module Name ** ** **============================================================*/ @@ -26,20 +26,20 @@ PALTEST(loader_LoadLibraryW_test2_paltest_loadlibraryw_test2, "loader/LoadLibrar { return FAIL; } - + /* convert a normal string to a wide one */ pwModuleName = convert((char *)pModuleName); /*try to load a not exist module */ - ModuleHandle = LoadLibraryW(pwModuleName); - + ModuleHandle = LoadLibraryExW(pwModuleName); + /* free the memory */ free(pwModuleName); - + if(NULL != ModuleHandle) { - Trace("Failed to call LoadLibraryW with a not exist mudule name, " + Trace("Failed to call LoadLibraryExW with a not exist mudule name, " "a NULL module handle is expected, but no NULL module handle " "is returned, error code=%u\n", GetLastError()); diff --git a/src/coreclr/pal/tests/palsuite/loader/LoadLibraryW/test3/loadlibraryw.cpp b/src/coreclr/pal/tests/palsuite/loader/LoadLibraryW/test3/loadlibraryw.cpp index 4c943597e42861..7581955d208c17 100644 --- a/src/coreclr/pal/tests/palsuite/loader/LoadLibraryW/test3/loadlibraryw.cpp +++ b/src/coreclr/pal/tests/palsuite/loader/LoadLibraryW/test3/loadlibraryw.cpp @@ -26,15 +26,15 @@ PALTEST(loader_LoadLibraryW_test3_paltest_loadlibraryw_test3, "loader/LoadLibrar } /* load a module with a NULL module name */ - ModuleHandle = LoadLibraryW(NULL); + ModuleHandle = LoadLibraryExW(NULL); if(NULL != ModuleHandle) { Fail("\nFailed to call loadlibraryw API for a negative test, " "call loadibraryw with NULL moudle name, a NULL module " "handle is expected, but no NULL module handle is returned, " - "error code =%u\n", GetLastError()); + "error code =%u\n", GetLastError()); } - + PAL_Terminate(); return PASS; } diff --git a/src/coreclr/pal/tests/palsuite/loader/LoadLibraryW/test5/loadlibraryw.cpp b/src/coreclr/pal/tests/palsuite/loader/LoadLibraryW/test5/loadlibraryw.cpp index e6c97ad555df7f..6249fb776c96c5 100644 --- a/src/coreclr/pal/tests/palsuite/loader/LoadLibraryW/test5/loadlibraryw.cpp +++ b/src/coreclr/pal/tests/palsuite/loader/LoadLibraryW/test5/loadlibraryw.cpp @@ -41,15 +41,15 @@ PALTEST(loader_LoadLibraryW_test5_paltest_loadlibraryw_test5, "loader/LoadLibrar lpModuleName = convert(ModuleName); /* load a module */ - ModuleHandle = LoadLibraryW(lpModuleName); + ModuleHandle = LoadLibraryExW(lpModuleName); /* free the memory */ free(lpModuleName); if(NULL != ModuleHandle) { - Trace("Failed to call LoadLibraryW API for a negative test " - "call LoadLibraryW with module name which does not have " + Trace("Failed to call LoadLibraryExW API for a negative test " + "call LoadLibraryExW with module name which does not have " "extension except a trailing dot, a NULL module handle is" "expected, but no NULL module handle is returned, " "error code = %u\n", GetLastError()); diff --git a/src/coreclr/pal/tests/palsuite/miscellaneous/GlobalMemoryStatusEx/test1/test.cpp b/src/coreclr/pal/tests/palsuite/miscellaneous/GlobalMemoryStatusEx/test1/test.cpp deleted file mode 100644 index 49e01ffdb40752..00000000000000 --- a/src/coreclr/pal/tests/palsuite/miscellaneous/GlobalMemoryStatusEx/test1/test.cpp +++ /dev/null @@ -1,55 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -/*============================================================ -** -** Source : test.c -** -** Purpose: Test for GlobalMemoryStatusEx() function -** -** -**=========================================================*/ - -#include - -PALTEST(miscellaneous_GlobalMemoryStatusEx_test1_paltest_globalmemorystatusex_test1, "miscellaneous/GlobalMemoryStatusEx/test1/paltest_globalmemorystatusex_test1") -{ - - MEMORYSTATUSEX memoryStatus; - - /* - * Initialize the PAL and return FAILURE if this fails - */ - - if(0 != (PAL_Initialize(argc, argv))) - { - return FAIL; - } - - if (!GlobalMemoryStatusEx(&memoryStatus)) - { - Fail("ERROR: GlobalMemoryStatusEx failed."); - } - - printf("GlobalMemoryStatusEx:\n"); - printf(" ullTotalPhys: %" PRIu64 "\n", memoryStatus.ullTotalPhys); - printf(" ullAvailPhys: %" PRIu64 "\n", memoryStatus.ullAvailPhys); - printf(" ullTotalVirtual: %" PRIu64 "\n", memoryStatus.ullTotalVirtual); - printf(" ullAvailVirtual: %" PRIu64 "\n", memoryStatus.ullAvailVirtual); - printf(" ullTotalPageFile: %" PRIu64 "\n", memoryStatus.ullTotalPageFile); - printf(" ullAvailPageFile: %" PRIu64 "\n", memoryStatus.ullAvailPageFile); - printf(" ullAvailExtendedVirtual: %" PRIu64 "\n", memoryStatus.ullAvailExtendedVirtual); - printf(" dwMemoryLoad: %u\n", memoryStatus.dwMemoryLoad); - - if (memoryStatus.ullTotalPhys == 0 || - memoryStatus.ullAvailPhys == 0 || - memoryStatus.ullTotalVirtual == 0 || - memoryStatus.ullAvailVirtual == 0 - ) - { - Fail("ERROR: GlobalMemoryStatusEx succeeded, but returned zero physical of virtual memory sizes."); - } - - PAL_Terminate(); - return PASS; -} diff --git a/src/coreclr/pal/tests/palsuite/paltestlist.txt b/src/coreclr/pal/tests/palsuite/paltestlist.txt index e2fdbdd79f4117..7491006cc7e607 100644 --- a/src/coreclr/pal/tests/palsuite/paltestlist.txt +++ b/src/coreclr/pal/tests/palsuite/paltestlist.txt @@ -340,7 +340,6 @@ miscellaneous/GetEnvironmentVariableW/test5/paltest_getenvironmentvariablew_test miscellaneous/GetEnvironmentVariableW/test6/paltest_getenvironmentvariablew_test6 miscellaneous/GetLastError/test1/paltest_getlasterror_test1 miscellaneous/GetSystemInfo/test1/paltest_getsysteminfo_test1 -miscellaneous/GlobalMemoryStatusEx/test1/paltest_globalmemorystatusex_test1 miscellaneous/GetTickCount/test1/paltest_gettickcount_test1 miscellaneous/InterlockedCompareExchange/test1/paltest_interlockedcompareexchange_test1 miscellaneous/InterlockedCompareExchange/test2/paltest_interlockedcompareexchange_test2 diff --git a/src/coreclr/pgosupport.cmake b/src/coreclr/pgosupport.cmake index 719ac14ad990b4..a0a2b2ab305dd7 100644 --- a/src/coreclr/pgosupport.cmake +++ b/src/coreclr/pgosupport.cmake @@ -59,9 +59,11 @@ function(add_pgo TargetName) message("Cannot use PGO optimization built with Ninja from MSBuild. Re-run build with Ninja to apply PGO information") else(NOT EXISTS ${ProfilePath}) if(CLR_CMAKE_HOST_WIN32) - set_property(TARGET ${TargetName} APPEND_STRING PROPERTY LINK_FLAGS_RELEASE " /LTCG /USEPROFILE:PGD=\"${ProfilePath}\"") - set_property(TARGET ${TargetName} APPEND_STRING PROPERTY LINK_FLAGS_RELWITHDEBINFO " /LTCG /USEPROFILE:PGD=\"${ProfilePath}\"") - add_compile_definitions(WITH_NATIVE_PGO) + # Temporarily disabling PGO until updated files with new linker flag are available. + # https://github.com/dotnet/runtime/pull/89311 + # set_property(TARGET ${TargetName} APPEND_STRING PROPERTY LINK_FLAGS_RELEASE " /LTCG /USEPROFILE:PGD=\"${ProfilePath}\"") + # set_property(TARGET ${TargetName} APPEND_STRING PROPERTY LINK_FLAGS_RELWITHDEBINFO " /LTCG /USEPROFILE:PGD=\"${ProfilePath}\"") + # add_compile_definitions(WITH_NATIVE_PGO) else(CLR_CMAKE_HOST_WIN32) if(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELEASE OR UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELWITHDEBINFO) if((CMAKE_CXX_COMPILER_ID MATCHES "Clang") AND (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)) diff --git a/src/coreclr/scripts/antigen_run.py b/src/coreclr/scripts/antigen_run.py index 1d979a68f6b86f..1fc744879f3839 100644 --- a/src/coreclr/scripts/antigen_run.py +++ b/src/coreclr/scripts/antigen_run.py @@ -213,7 +213,13 @@ def main(main_args): # Run tool such that issues are placed in a temp folder with TempDir() as temp_location: antigen_log = path.join(temp_location, get_antigen_filename(tag_name)) - run_command([path_to_tool, "-c", path_to_corerun, "-o", temp_location, "-d", str(run_duration)], _exit_on_fail=True, _output_file= antigen_log) + env_variable = {} + if 'x86' in coreclr_args.run_configuration or 'x64' in coreclr_args.run_configuration: + # For x86 and x64, set this environment variable so Antigen process would + # get the hardware acceleration of Avx512 and through that, Antigen will + # generate code containing Avx512 specific intrinsic methods. + env_variable["DOTNET_PreferredVectorBitWidth"] = "512" + run_command([path_to_tool, "-c", path_to_corerun, "-o", temp_location, "-d", str(run_duration)], _exit_on_fail=True, _output_file= antigen_log, _env= env_variable) # Copy issues for upload print("Copying issues to " + output_directory) diff --git a/src/coreclr/scripts/genEventPipe.py b/src/coreclr/scripts/genEventPipe.py index a7d3a6021cdb12..527180028a9fb7 100644 --- a/src/coreclr/scripts/genEventPipe.py +++ b/src/coreclr/scripts/genEventPipe.py @@ -72,26 +72,6 @@ def generateMethodSignatureWrite(eventName, template, extern, runtimeFlavor): sig_pieces.append(")") return ''.join(sig_pieces) -def includeProvider(providerName, runtimeFlavor): - if runtimeFlavor.coreclr and providerName == "Microsoft-DotNETRuntimeMonoProfiler": - return False - else: - return True - -def includeEvent(inclusionList, providerName, eventName): - if len(inclusionList) == 0: - return True - if providerName in inclusionList and eventName in inclusionList[providerName]: - return True - elif providerName in inclusionList and "*" in inclusionList[providerName]: - return True - elif "*" in inclusionList and eventName in inclusionList["*"]: - return True - elif "*" in inclusionList and "*" in inclusionList["*"]: - return True - else: - return False - def generateClrEventPipeWriteEventsImpl( providerName, eventNodes, allTemplates, extern, target_cpp, runtimeFlavor, inclusionList, exclusionList): providerPrettyName = providerName.replace("Windows-", '') @@ -123,7 +103,7 @@ def generateClrEventPipeWriteEventsImpl( eventIsEnabledFunc = "" if runtimeFlavor.coreclr: eventIsEnabledFunc = "EventPipeAdapter::EventIsEnabled" - elif runtimeFlavor.mono: + elif (runtimeFlavor.mono or runtimeFlavor.nativeaot): eventIsEnabledFunc = "ep_event_is_enabled" # generate EventPipeEventEnabled function @@ -163,7 +143,7 @@ def generateClrEventPipeWriteEventsImpl( " EventPipeAdapter::WriteEvent(EventPipeEvent" + eventName + ", (BYTE*) nullptr, 0, ActivityId, RelatedActivityId);\n") - elif runtimeFlavor.mono: + elif (runtimeFlavor.mono or runtimeFlavor.nativeaot): WriteEventImpl.append( " ep_write_event (EventPipeEvent" + eventName + @@ -175,7 +155,7 @@ def generateClrEventPipeWriteEventsImpl( createProviderFunc = "" if runtimeFlavor.coreclr: createProviderFunc = "EventPipeAdapter::CreateProvider" - elif runtimeFlavor.mono: + elif (runtimeFlavor.mono or runtimeFlavor.nativeaot): createProviderFunc = "create_provider" eventPipeCallbackCastExpr = "" @@ -198,9 +178,9 @@ def generateClrEventPipeWriteEventsImpl( WriteEventImpl.append( " EventPipeProvider" + providerPrettyName + - " = " + createProviderFunc + "(SL(" + + " = " + createProviderFunc + "(" + providerPrettyName + - "Name), " + eventPipeCallbackCastExpr + "(" + callbackName + "));\n") + "Name, " + eventPipeCallbackCastExpr + "(" + callbackName + "));\n") for eventNode in eventNodes: eventName = eventNode.getAttribute('symbol') templateName = eventNode.getAttribute('template') @@ -226,9 +206,11 @@ def generateClrEventPipeWriteEventsImpl( addEventFunc = "EventPipeAdapter::AddEvent" elif runtimeFlavor.mono: addEventFunc = "provider_add_event" + elif runtimeFlavor.nativeaot: + addEventFunc = "ep_provider_add_event" - initEvent = """ EventPipeEvent%s = %s(EventPipeProvider%s,%s,%s,%s,%s,%s); -""" % (eventName, addEventFunc, providerPrettyName, eventValue, eventKeywordsMask, eventVersion, eventLevel, needStack) + initEvent = """ EventPipeEvent%s = %s(EventPipeProvider%s,%s,%s,%s,%s,%s%s); +""" % (eventName, addEventFunc, providerPrettyName, eventValue, eventKeywordsMask, eventVersion, eventLevel, needStack, (",NULL,0" if runtimeFlavor.nativeaot else "")) WriteEventImpl.append(initEvent) WriteEventImpl.append("}") @@ -260,7 +242,7 @@ def winTypeToFixedWidthType(t): parameter = fnSig.getParam(paramName) if parameter.winType == "win:UnicodeString": - if runtimeFlavor.coreclr: + if (runtimeFlavor.coreclr or runtimeFlavor.nativeaot): pack_list.append( " if (!%s) { %s = W(\"NULL\"); }" % (parameter.name, parameter.name)) @@ -283,7 +265,7 @@ def winTypeToFixedWidthType(t): " success &= write_buffer((const uint8_t *)%s, %s, &buffer, &offset, &size, &fixedBuffer);" % (paramName, size)) emittedWriteToBuffer = True - elif runtimeFlavor.coreclr: + elif (runtimeFlavor.coreclr or runtimeFlavor.nativeaot): pack_list.append( " success &= WriteToBuffer((const BYTE *)%s, %s, buffer, offset, size, fixedBuffer);" % (paramName, size)) @@ -299,7 +281,7 @@ def winTypeToFixedWidthType(t): " success &= write_buffer((const uint8_t *)%s, %s, &buffer, &offset, &size, &fixedBuffer);" % (paramName, size)) emittedWriteToBuffer = True - elif runtimeFlavor.coreclr: + elif (runtimeFlavor.coreclr or runtimeFlavor.nativeaot): pack_list.append( " success &= WriteToBuffer((const BYTE *)%s, %s, buffer, offset, size, fixedBuffer);" % (paramName, size)) @@ -374,7 +356,7 @@ def winTypeToFixedWidthType(t): " success &= write_buffer((const uint8_t *)%s, sizeof(%s), &buffer, &offset, &size, &fixedBuffer);" % (parameter.name,parameter.name,)) emittedWriteToBuffer = True - elif runtimeFlavor.coreclr: + elif (runtimeFlavor.coreclr or runtimeFlavor.nativeaot): pack_list.append( " success &= WriteToBuffer(%s, buffer, offset, size, fixedBuffer);" % (parameter.name,)) @@ -394,7 +376,7 @@ def winTypeToFixedWidthType(t): header += """ bool fixedBuffer = true; bool success = true; """ - if runtimeFlavor.coreclr: + if (runtimeFlavor.coreclr or runtimeFlavor.nativeaot): checking = """ if (!success) { if (!fixedBuffer) @@ -411,18 +393,21 @@ def winTypeToFixedWidthType(t): elif runtimeFlavor.mono: body = " ep_write_event (EventPipeEvent" + \ eventName + ", (uint8_t *)buffer, (uint32_t)offset, ActivityId, RelatedActivityId);\n" + elif runtimeFlavor.nativeaot: + body = " ep_write_event (EventPipeEvent" + \ + eventName + ", (uint8_t *)buffer, (uint32_t)offset, reinterpret_cast(ActivityId), reinterpret_cast(RelatedActivityId));\n" header += "\n" footer = "" if emittedWriteToBuffer: - if runtimeFlavor.coreclr: + if (runtimeFlavor.coreclr or runtimeFlavor.nativeaot): footer = """ if (!fixedBuffer) delete[] buffer; """ - if runtimeFlavor.coreclr: + if (runtimeFlavor.coreclr or runtimeFlavor.nativeaot): footer += """ return ERROR_SUCCESS; """ @@ -725,6 +710,111 @@ def getMonoEventPipeHelperFileImplPrefix(): def getMonoEventPipeHelperFileImplSuffix(): return "#endif\n" +def getAotEventPipeHelperFileImplPrefix(): + return """ +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +%s + +bool ResizeBuffer(BYTE *&buffer, size_t& size, size_t currLen, size_t newSize, bool &fixedBuffer) +{ + newSize = (size_t)(newSize * 1.5); + _ASSERTE(newSize > size); // check for overflow + + if (newSize < 32) + newSize = 32; + + BYTE *newBuffer = new (nothrow) BYTE[newSize]; + + if (newBuffer == NULL) + return false; + + memcpy(newBuffer, buffer, currLen); + + if (!fixedBuffer) + delete[] buffer; + + buffer = newBuffer; + size = newSize; + fixedBuffer = false; + + return true; +} + +bool WriteToBuffer(const BYTE *src, size_t len, BYTE *&buffer, size_t& offset, size_t& size, bool &fixedBuffer) +{ + if (!src) return true; + if (offset + len > size) + { + if (!ResizeBuffer(buffer, size, offset, size + len, fixedBuffer)) + return false; + } + + memcpy(buffer + offset, src, len); + offset += len; + return true; +} + +bool WriteToBuffer(const WCHAR* str, BYTE *&buffer, size_t& offset, size_t& size, bool &fixedBuffer) +{ + if (!str) return true; + size_t byteCount = (ep_rt_utf16_string_len(reinterpret_cast(str)) + 1) * sizeof(*str); + + if (offset + byteCount > size) + { + if (!ResizeBuffer(buffer, size, offset, size + byteCount, fixedBuffer)) + return false; + } + + memcpy(buffer + offset, str, byteCount); + offset += byteCount; + return true; +} + +bool WriteToBuffer(const char *str, BYTE *&buffer, size_t& offset, size_t& size, bool &fixedBuffer) +{ + if (!str) return true; + size_t len = strlen(str) + 1; + if (offset + len > size) + { + if (!ResizeBuffer(buffer, size, offset, size + len, fixedBuffer)) + return false; + } + + memcpy(buffer + offset, str, len); + offset += len; + return true; +} + +EventPipeProvider * create_provider(const WCHAR* providerName, EventPipeCallback callback, void* pCallbackContext = nullptr) +{ + ep_char8_t *providerNameUTF8 = ep_rt_utf16_to_utf8_string(reinterpret_cast(providerName)); + EventPipeProvider * provider = ep_create_provider (providerNameUTF8, callback, pCallbackContext); + ep_rt_utf8_string_free (providerNameUTF8); + return provider; +} + +""" % (getCoreCLRMonoNativeAotTypeAdaptionDefines()) + +def getAotEventPipeHelperFileImplSuffix(): + return "" + + def generateEventPipeHelperFile(etwmanifest, eventpipe_directory, target_cpp, runtimeFlavor, extern, dryRun): eventpipehelpersPath = os.path.join(eventpipe_directory, "eventpipehelpers" + (".cpp" if target_cpp else ".c")) if dryRun: @@ -736,6 +826,8 @@ def generateEventPipeHelperFile(etwmanifest, eventpipe_directory, target_cpp, ru helper.write(getCoreCLREventPipeHelperFileImplPrefix()) elif runtimeFlavor.mono: helper.write(getMonoEventPipeHelperFileImplPrefix()) + elif runtimeFlavor.nativeaot: + helper.write(getAotEventPipeHelperFileImplPrefix()) tree = DOM.parse(etwmanifest) @@ -767,7 +859,7 @@ def generateEventPipeHelperFile(etwmanifest, eventpipe_directory, target_cpp, ru helper.write(" Init" + providerPrettyName + "();\n") helper.write("}\n") - if runtimeFlavor.coreclr: + if (runtimeFlavor.coreclr or runtimeFlavor.nativeaot): helper.write(getCoreCLREventPipeHelperFileImplSuffix()) elif runtimeFlavor.mono: helper.write(getMonoEventPipeHelperFileImplSuffix()) @@ -1025,11 +1117,72 @@ def getMonoEventPipeImplFilePrefix(): g_free (provider_name_utf8); return provider; } -""" % (getCoreCLRMonoTypeAdaptionDefines()) +""" % (getCoreCLRMonoNativeAotTypeAdaptionDefines()) def getMonoEventPipeImplFileSuffix(): return "#endif\n" +def getAotEventPipeImplFilePrefix(): + return """ +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +%s + +bool ResizeBuffer(BYTE *&buffer, size_t& size, size_t currLen, size_t newSize, bool &fixedBuffer); +bool WriteToBuffer(const WCHAR* str, BYTE *&buffer, size_t& offset, size_t& size, bool &fixedBuffer); +bool WriteToBuffer(const BYTE *src, size_t len, BYTE *&buffer, size_t& offset, size_t& size, bool &fixedBuffer); + +EventPipeProvider * create_provider(const WCHAR*, EventPipeCallback, void* pCallbackContext = nullptr); + +template +bool WriteToBuffer(const T &value, BYTE *&buffer, size_t& offset, size_t& size, bool &fixedBuffer) +{ + if (sizeof(T) + offset > size) + { + if (!ResizeBuffer(buffer, size, offset, size + sizeof(T), fixedBuffer)) + return false; + } + + memcpy(buffer + offset, (char *)&value, sizeof(T)); + offset += sizeof(T); + return true; +} + +""" % (getCoreCLRMonoNativeAotTypeAdaptionDefines()) + +def getAotEventPipeImplFileSuffix(): + return """ +bool DotNETRuntimeProvider_IsEnabled(unsigned char level, unsigned long long keyword) +{ + if (!ep_enabled()) + return false; + + EVENTPIPE_TRACE_CONTEXT& context = MICROSOFT_WINDOWS_DOTNETRUNTIME_PROVIDER_DOTNET_Context.EventPipeProvider; + if (!context.IsEnabled) + return false; + + if (level > context.Level) + return false; + + return (keyword == (ULONGLONG)0) || (keyword & context.EnabledKeywordsBitmask) != 0; +} +""" + def generateEventPipeImplFiles( etwmanifest, eventpipe_directory, extern, target_cpp, runtimeFlavor, inclusionList, exclusionList, dryRun): tree = DOM.parse(etwmanifest) @@ -1074,6 +1227,8 @@ def generateEventPipeImplFiles( header = getCoreCLREventPipeImplFilePrefix() elif runtimeFlavor.mono: header = getMonoEventPipeImplFilePrefix() + elif runtimeFlavor.nativeaot: + header = getAotEventPipeImplFilePrefix() eventpipeImpl.write(header + "\n") eventpipeImpl.write( @@ -1106,6 +1261,8 @@ def generateEventPipeImplFiles( eventpipeImpl.write(getCoreCLREventPipeImplFileSuffix()) elif runtimeFlavor.mono: eventpipeImpl.write(getMonoEventPipeImplFileSuffix()) + elif runtimeFlavor.nativeaot: + eventpipeImpl.write(getAotEventPipeImplFileSuffix()) def generateEventPipeFiles( etwmanifest, intermediate, extern, target_cpp, runtimeFlavor, inclusionList, exclusionList, dryRun): diff --git a/src/coreclr/scripts/genEventing.py b/src/coreclr/scripts/genEventing.py index cef36174956b80..1086de5e881633 100644 --- a/src/coreclr/scripts/genEventing.py +++ b/src/coreclr/scripts/genEventing.py @@ -13,19 +13,26 @@ import os import xml.dom.minidom as DOM -from utilities import open_for_update +from utilities import open_for_update, parseInclusionList class RuntimeFlavor: def __init__(self, runtime): if runtime.lower() == "coreclr": self.coreclr = True self.mono = False + self.nativeaot = False elif runtime.lower() == "mono": self.coreclr = False self.mono = True + self.nativeaot = False + elif runtime.lower() == "nativeaot": + self.coreclr = False + self.mono = False + self.nativeaot = True else: self.coreclr = True self.mono = False + self.nativeaot = False stdprolog=""" // Licensed to the .NET Foundation under one or more agreements. @@ -105,19 +112,77 @@ def __init__(self, runtime): "BYTE" : "uint8_t", } +aotPalDataTypeMapping={ + #constructed types + "win:null" :" ", + "win:Int64" :"const __int64", + "win:ULong" :"const ULONG", + "win:count" :"*", + "win:Struct" :"const void", + #actual spec + "win:GUID" :"const GUID", + "win:AnsiString" :"LPCSTR", + "win:UnicodeString" :"const WCHAR*", + "win:Double" :"const double", + "win:Int32" :"const signed int", + "win:Boolean" :"const BOOL", + "win:UInt64" :"const unsigned __int64", + "win:UInt32" :"const unsigned int", + "win:UInt16" :"const unsigned short", + "win:UInt8" :"const unsigned char", + "win:Pointer" :"const void*", + "win:Binary" :"const BYTE", +} + +aotEventPipeDataTypeMapping={ + "BOOL" : "BOOL", + "LPCGUID" : "const GUID *", + "UCHAR" : "UCHAR", + "ULONG" : "ULONG", + "ULONGLONG" : "ULONGLONG", + "WCHAR" : "WCHAR", + "BYTE" : "BYTE", +} + def getEventPipeDataTypeMapping(runtimeFlavor): if runtimeFlavor.coreclr: return coreCLREventPipeDataTypeMapping elif runtimeFlavor.mono: return monoEventPipeDataTypeMapping + elif runtimeFlavor.nativeaot: + return aotEventPipeDataTypeMapping def getPalDataTypeMapping(runtimeFlavor): if runtimeFlavor.coreclr: return coreCLRPalDataTypeMapping elif runtimeFlavor.mono: return monoPalDataTypeMapping - -def getCoreCLRMonoTypeAdaptionDefines(): + elif runtimeFlavor.nativeaot: + return aotPalDataTypeMapping + +def includeProvider(providerName, runtimeFlavor): + if (runtimeFlavor.coreclr or runtimeFlavor.nativeaot) and providerName == "Microsoft-DotNETRuntimeMonoProfiler": + return False + elif runtimeFlavor.nativeaot and (providerName == "Microsoft-Windows-DotNETRuntimeRundown" or providerName == "Microsoft-Windows-DotNETRuntimeStress" or providerName == "Microsoft-Windows-DotNETRuntimePrivate"): + return False + else: + return True + +def includeEvent(inclusionList, providerName, eventName): + if len(inclusionList) == 0: + return True + if providerName in inclusionList and eventName in inclusionList[providerName]: + return True + elif providerName in inclusionList and "*" in inclusionList[providerName]: + return True + elif "*" in inclusionList and eventName in inclusionList["*"]: + return True + elif "*" in inclusionList and "*" in inclusionList["*"]: + return True + else: + return False + +def getCoreCLRMonoNativeAotTypeAdaptionDefines(): return """ #ifndef W #define W(str) L##str @@ -345,37 +410,61 @@ def parseTemplateNodes(templateNodes): return allTemplates -def generateClrallEvents(eventNodes,allTemplates, target_cpp, runtimeFlavor, write_xplatheader): +def generateClrallEvents(eventNodes, allTemplates, target_cpp, runtimeFlavor, write_xplatheader, providerName, inclusionList, generatedFileType): clrallEvents = [] for eventNode in eventNodes: - eventName = eventNode.getAttribute('symbol') + eventName = eventNode.getAttribute('symbol') + + if not includeEvent(inclusionList, providerName, eventName): + continue + templateName = eventNode.getAttribute('template') #generate EventEnabled - if not target_cpp: - clrallEvents.append("static ") - clrallEvents.append("inline %s EventEnabled" % (getEventPipeDataTypeMapping(runtimeFlavor)["BOOL"])) - clrallEvents.append(eventName) - clrallEvents.append("(void) {return ") - clrallEvents.append("EventPipeEventEnabled" + eventName + "()") - - if runtimeFlavor.coreclr or write_xplatheader: - if os.name == 'posix': - clrallEvents.append(" || (XplatEventLogger" + - ("::" if target_cpp else "_") + - "IsEventLoggingEnabled() && EventXplatEnabled" + - eventName + "());}\n\n") + if includeProvider (providerName, runtimeFlavor): + if not target_cpp: + clrallEvents.append("static ") + if generatedFileType == "header-impl": + clrallEvents.append("inline ") + clrallEvents.append("%s EventEnabled" % (getEventPipeDataTypeMapping(runtimeFlavor)["BOOL"])) + clrallEvents.append(eventName) + clrallEvents.append("(void)") + if generatedFileType == "header": + clrallEvents.append(";\n") + elif generatedFileType == "source-impl-noop": + clrallEvents.append(" { return 0; }\n") else: - clrallEvents.append(" || EventXplatEnabled" + eventName + "();}\n\n") - else: - clrallEvents.append(";}\n\n") + clrallEvents.append(" {return ") + clrallEvents.append("EventPipeEventEnabled" + eventName + "()") + + # @TODO Need to add this to nativeaot after switching to using genEtwProvider.py where this fn will be implemented + if runtimeFlavor.coreclr or write_xplatheader: + if os.name == 'posix': + clrallEvents.append(" || (XplatEventLogger" + + ("::" if target_cpp else "_") + + "IsEventLoggingEnabled() && EventXplatEnabled" + + eventName + "());}\n\n") + else: + clrallEvents.append(" || EventXplatEnabled" + eventName + "();}\n\n") + else: + clrallEvents.append(";}\n\n") #generate FireEtw functions fnptype = [] fnbody = [] + # native AOT vars that ifdef's on Etw for the clretwallmainHeader + fnptypeAotNotWindowsName = "" + fnptypeAotNotWindowsSignature = "" + if not target_cpp: clrallEvents.append("static ") - fnptype.append("inline %s FireEtw" % (getEventPipeDataTypeMapping(runtimeFlavor)["ULONG"])) + if generatedFileType == "header" and providerName=="Microsoft-Windows-DotNETRuntimePrivate": + fnptype.append("#ifdef FEATURE_ETW\n") + if not runtimeFlavor.nativeaot: + fnptype.append("inline ") + fnptype.append("%s FireEtw" % (getEventPipeDataTypeMapping(runtimeFlavor)["ULONG"])) + fnptypeAotNotWindowsName = fnptypeAotNotWindowsName + "#define FireEtw" + eventName + "(" + fnptype.append(eventName) fnptype.append("(\n") @@ -403,6 +492,7 @@ def generateClrallEvents(eventNodes,allTemplates, target_cpp, runtimeFlavor, wri fnptypeline.append(" ") fnptypeline.append(fnparam.name) fnptypeline.append(",\n") + fnptypeAotNotWindowsSignature = fnptypeAotNotWindowsSignature + fnparam.name + "," #fnsignature for params in fnSig.paramlist: @@ -418,33 +508,68 @@ def generateClrallEvents(eventNodes,allTemplates, target_cpp, runtimeFlavor, wri #remove trailing commas if len(line) > 0: del line[-1] + fnptypeAotNotWindowsSignature = fnptypeAotNotWindowsSignature[:-1] #add activity IDs fnptypeline.append(lindent) - fnptypeline.append("%s ActivityId%s\n" % (getEventPipeDataTypeMapping(runtimeFlavor)["LPCGUID"], " = nullptr," if target_cpp else ",")) + # source file can't have the parameter initializer + fnptypeline.append("%s ActivityId%s\n" % (getEventPipeDataTypeMapping(runtimeFlavor)["LPCGUID"], " = nullptr," if (target_cpp and (generatedFileType == "header" or generatedFileType == "header-impl")) else ",")) fnptypeline.append(lindent) - fnptypeline.append("%s RelatedActivityId%s" % (getEventPipeDataTypeMapping(runtimeFlavor)["LPCGUID"], " = nullptr" if target_cpp else "")) + fnptypeline.append("%s RelatedActivityId" % (getEventPipeDataTypeMapping(runtimeFlavor)["LPCGUID"])) + if (target_cpp and (generatedFileType == "header" or generatedFileType == "header-impl")): + fnptypeline.append(" = nullptr") + else: + fnptypeline.append("") fnptype.extend(fnptypeline) - fnptype.append("\n)\n{\n") - fnbody.append(lindent) - - fnbody.append("%s status = EventPipeWriteEvent" % (getEventPipeDataTypeMapping(runtimeFlavor)["ULONG"]) + eventName + "(" + ''.join(line)) - if len(line) > 0: - fnbody.append(",") + fnptype.append("\n)") + if generatedFileType == "header": + fnptype.append(";\n") + if providerName=="Microsoft-Windows-DotNETRuntimePrivate": + fnptype.append("#else\n") + fnptype.append(fnptypeAotNotWindowsName) + fnptype.append(fnptypeAotNotWindowsSignature) + fnptype.append(")") + fnptype.append("\n") + fnptype.append("#endif // FEATURE_ETW\n") + else: + fnptype.append("\n") + elif generatedFileType == "source-impl-noop": + fnptype.append("\n{ return ERROR_SUCCESS; }\n\n") + else: + fnptype.append("\n{\n") + fnbody.append(lindent) - fnbody.append("ActivityId,RelatedActivityId);\n") + if not (runtimeFlavor.nativeaot and not providerName == "Microsoft-Windows-DotNETRuntime"): + fnbody.append("%s status = EventPipeWriteEvent" % (getEventPipeDataTypeMapping(runtimeFlavor)["ULONG"]) + eventName + "(" + ''.join(line)) + if len(line) > 0: + fnbody.append(",") - if runtimeFlavor.coreclr or write_xplatheader: - fnbody.append(lindent) - fnbody.append("status &= FireEtXplat" + eventName + "(" + ''.join(line) + ");\n") + fnbody.append("ActivityId,RelatedActivityId);\n") - fnbody.append(lindent) - fnbody.append("return status;\n") - fnbody.append("}\n\n") + if runtimeFlavor.coreclr or write_xplatheader: + fnbody.append(lindent) + fnbody.append("status &= FireEtXplat" + eventName + "(" + ''.join(line) + ");\n") + + if runtimeFlavor.nativeaot: + if providerName == "Microsoft-Windows-DotNETRuntime": + fnbody.append("#ifndef TARGET_UNIX\n") + fnbody.append(lindent) + fnbody.append("status &= ") + else: + fnbody.append("return ") + fnbody.append("FireEtXplat" + eventName + "(" + ''.join(line) + ");\n") + if providerName == "Microsoft-Windows-DotNETRuntime": + fnbody.append("#endif\n") + + if not (runtimeFlavor.nativeaot and not providerName == "Microsoft-Windows-DotNETRuntime"): + fnbody.append(lindent) + fnbody.append("return status;\n") + fnbody.append("}\n\n") clrallEvents.extend(fnptype) - clrallEvents.extend(fnbody) + if not (runtimeFlavor.nativeaot and (generatedFileType == "header" or generatedFileType == "source-impl-noop")): + clrallEvents.extend(fnbody) return ''.join(clrallEvents) @@ -500,10 +625,13 @@ def generateClrXplatEvents(eventNodes, allTemplates, extern, runtimeFlavor): return ''.join(clrallEvents) -def generateClrEventPipeWriteEvents(eventNodes, allTemplates, extern, target_cpp, runtimeFlavor): +def generateClrEventPipeWriteEvents(eventNodes, allTemplates, extern, target_cpp, runtimeFlavor, providerName, inclusion_list): clrallEvents = [] for eventNode in eventNodes: eventName = eventNode.getAttribute('symbol') + if not includeEvent(inclusion_list, providerName, eventName): + continue + templateName = eventNode.getAttribute('template') #generate EventPipeEventEnabled and EventPipeWriteEvent functions @@ -636,7 +764,80 @@ def getKeywordsMaskCombined(keywords, keywordsToMask): return mask -def generatePlatformIndependentFiles(sClrEtwAllMan, incDir, etmDummyFile, extern, write_xplatheader, target_cpp, runtimeFlavor): +def updateclreventsfile(write_xplatheader, target_cpp, runtimeFlavor, eventpipe_trace_context_typedef, dotnet_trace_context_typedef_windows, tree, clrallevents, inclusion_list, generatedFileType): + is_windows = os.name == 'nt' + with open_for_update(clrallevents) as Clrallevents: + Clrallevents.write(stdprolog) + if generatedFileType=="header-impl": + if runtimeFlavor.mono: + Clrallevents.write(getCoreCLRMonoNativeAotTypeAdaptionDefines() + "\n") + if runtimeFlavor.coreclr or write_xplatheader: + Clrallevents.write('#include "clrxplatevents.h"\n') + Clrallevents.write('#include "clreventpipewriteevents.h"\n') + elif generatedFileType == "header": + Clrallevents.write('#ifndef CLR_ETW_ALL_MAIN_H\n') + Clrallevents.write('#define CLR_ETW_ALL_MAIN_H\n\n') + elif generatedFileType == "source-impl": + Clrallevents.write('#include \n') + Clrallevents.write('#include \n') + Clrallevents.write('#include "clretwallmain.h"\n') + Clrallevents.write('#include "clreventpipewriteevents.h"\n') + Clrallevents.write('#include "EtwEvents.h"\n\n') + elif generatedFileType == "source-impl-noop": + Clrallevents.write('#include \n') + Clrallevents.write('#include \n\n') + Clrallevents.write('#ifndef ERROR_SUCCESS\n') + Clrallevents.write('#define ERROR_SUCCESS 0L\n') + Clrallevents.write('#endif\n\n') + + # define DOTNET_TRACE_CONTEXT depending on the platform + if is_windows and not runtimeFlavor.nativeaot: + Clrallevents.write(eventpipe_trace_context_typedef) # define EVENTPIPE_TRACE_CONTEXT + if runtimeFlavor.coreclr or write_xplatheader: + Clrallevents.write(dotnet_trace_context_typedef_windows + "\n") + else: + Clrallevents.write("\n") + + if not is_windows and not write_xplatheader and not runtimeFlavor.nativeaot: + Clrallevents.write(eventpipe_trace_context_typedef) # define EVENTPIPE_TRACE_CONTEXT + Clrallevents.write("\n") + + # Hack to write etw specific information to nativeaot + nativeaotEtwflag = False + for providerNode in tree.getElementsByTagName('provider'): + providerName = providerNode.getAttribute('name') + templateNodes = providerNode.getElementsByTagName('template') + allTemplates = parseTemplateNodes(templateNodes) + eventNodes = providerNode.getElementsByTagName('event') + + if generatedFileType == "source-impl" and providerName == "Microsoft-Windows-DotNETRuntimePrivate" and not nativeaotEtwflag: + nativeaotEtwflag = True + Clrallevents.write("\n#ifdef FEATURE_ETW\n\n") + Clrallevents.write("// ==================================================================\n") + Clrallevents.write("// Events currently only fired via ETW (private runtime provider)\n") + Clrallevents.write("// ==================================================================\n\n") + nativeaotEtwflag = False + + #vm header: + Clrallevents.write(generateClrallEvents(eventNodes, allTemplates, target_cpp, runtimeFlavor, write_xplatheader, providerName, inclusion_list, generatedFileType)) + + providerName = providerNode.getAttribute('name') + providerSymbol = providerNode.getAttribute('symbol') + + eventpipeProviderCtxName = providerSymbol + "_EVENTPIPE_Context" + if is_windows and not (write_xplatheader or runtimeFlavor.nativeaot): + Clrallevents.write(('constexpr ' if target_cpp else 'static const ') + 'EVENTPIPE_TRACE_CONTEXT ' + eventpipeProviderCtxName + ' = { W("' + providerName + '"), 0, false, 0 };\n') + + if not is_windows and not write_xplatheader and not runtimeFlavor.nativeaot: + Clrallevents.write('__attribute__((weak)) EVENTPIPE_TRACE_CONTEXT ' + eventpipeProviderCtxName + ' = { W("' + providerName + '"), 0, false, 0 };\n') + + if runtimeFlavor.nativeaot and providerName == "Microsoft-Windows-DotNETRuntimePrivate" and generatedFileType == "source-impl": + Clrallevents.write("#endif // FEATURE_ETW\n") + + if generatedFileType == "header": + Clrallevents.write("#endif // __CLR_ETW_ALL_MAIN_H__\n") + +def generatePlatformIndependentFiles(sClrEtwAllMan, incDir, etmDummyFile, extern, write_xplatheader, target_cpp, runtimeFlavor, inclusion_list): generateEtmDummyHeader(sClrEtwAllMan,etmDummyFile) tree = DOM.parse(sClrEtwAllMan) @@ -695,46 +896,16 @@ def generatePlatformIndependentFiles(sClrEtwAllMan, incDir, etmDummyFile, extern #endif // DOTNET_TRACE_CONTEXT_DEF """ - # Write the main header for FireETW* functions - clrallevents = os.path.join(incDir, "clretwallmain.h") is_windows = os.name == 'nt' - with open_for_update(clrallevents) as Clrallevents: - Clrallevents.write(stdprolog) - if runtimeFlavor.mono: - Clrallevents.write(getCoreCLRMonoTypeAdaptionDefines() + "\n") - if runtimeFlavor.coreclr or write_xplatheader: - Clrallevents.write('#include "clrxplatevents.h"\n') - Clrallevents.write('#include "clreventpipewriteevents.h"\n') - - # define DOTNET_TRACE_CONTEXT depending on the platform - if is_windows: - Clrallevents.write(eventpipe_trace_context_typedef) # define EVENTPIPE_TRACE_CONTEXT - if runtimeFlavor.coreclr or write_xplatheader: - Clrallevents.write(dotnet_trace_context_typedef_windows + "\n") - else: - Clrallevents.write("\n") - - if not is_windows and not write_xplatheader: - Clrallevents.write(eventpipe_trace_context_typedef) # define EVENTPIPE_TRACE_CONTEXT - Clrallevents.write("\n") - - for providerNode in tree.getElementsByTagName('provider'): - templateNodes = providerNode.getElementsByTagName('template') - allTemplates = parseTemplateNodes(templateNodes) - eventNodes = providerNode.getElementsByTagName('event') - - #vm header: - Clrallevents.write(generateClrallEvents(eventNodes, allTemplates, target_cpp, runtimeFlavor, write_xplatheader)) - - providerName = providerNode.getAttribute('name') - providerSymbol = providerNode.getAttribute('symbol') - eventpipeProviderCtxName = providerSymbol + "_EVENTPIPE_Context" - if is_windows: - Clrallevents.write(('constexpr ' if target_cpp else 'static const ') + 'EVENTPIPE_TRACE_CONTEXT ' + eventpipeProviderCtxName + ' = { W("' + providerName + '"), 0, false, 0 };\n') - - if not is_windows and not write_xplatheader: - Clrallevents.write('__attribute__((weak)) EVENTPIPE_TRACE_CONTEXT ' + eventpipeProviderCtxName + ' = { W("' + providerName + '"), 0, false, 0 };\n') + # Write the main source(s) for FireETW* functions + # nativeaot requires header and source file to be separated as well as a noop implementation + if runtimeFlavor.nativeaot: + updateclreventsfile(write_xplatheader, target_cpp, runtimeFlavor, eventpipe_trace_context_typedef, dotnet_trace_context_typedef_windows, tree, os.path.join(incDir, "clretwallmain.cpp"), inclusion_list, "source-impl") + updateclreventsfile(write_xplatheader, target_cpp, runtimeFlavor, eventpipe_trace_context_typedef, dotnet_trace_context_typedef_windows, tree, os.path.join(incDir, "clretwallmain.h"), inclusion_list, "header") + updateclreventsfile(write_xplatheader, target_cpp, runtimeFlavor, eventpipe_trace_context_typedef, dotnet_trace_context_typedef_windows, tree, os.path.join(incDir, "disabledclretwallmain.cpp"), inclusion_list, "source-impl-noop") + else: + updateclreventsfile(write_xplatheader, target_cpp, runtimeFlavor, eventpipe_trace_context_typedef, dotnet_trace_context_typedef_windows, tree, os.path.join(incDir, "clretwallmain.h"), inclusion_list, "header-impl") if write_xplatheader: clrproviders = os.path.join(incDir, "clrproviders.h") @@ -746,7 +917,7 @@ def generatePlatformIndependentFiles(sClrEtwAllMan, incDir, etmDummyFile, extern ULONGLONG const Keyword; } EVENT_DESCRIPTOR; """) - if not is_windows: + if not is_windows and not runtimeFlavor.nativeaot: Clrproviders.write(eventpipe_trace_context_typedef) # define EVENTPIPE_TRACE_CONTEXT Clrproviders.write(lttng_trace_context_typedef) # define LTTNG_TRACE_CONTEXT Clrproviders.write(dotnet_trace_context_typedef_unix + "\n") @@ -760,7 +931,7 @@ def generatePlatformIndependentFiles(sClrEtwAllMan, incDir, etmDummyFile, extern providerSymbol = str(providerNode.getAttribute('symbol')) nbProviders += 1 nbKeywords = 0 - if not is_windows: + if not is_windows and not runtimeFlavor.nativeaot: eventpipeProviderCtxName = providerSymbol + "_EVENTPIPE_Context" Clrproviders.write('__attribute__((weak)) EVENTPIPE_TRACE_CONTEXT ' + eventpipeProviderCtxName + ' = { W("' + providerName + '"), 0, false, 0 };\n') lttngProviderCtxName = providerSymbol + "_LTTNG_Context" @@ -787,7 +958,7 @@ def generatePlatformIndependentFiles(sClrEtwAllMan, incDir, etmDummyFile, extern allProviders.append("&" + providerSymbol + "_LTTNG_Context") # define and initialize runtime providers' DOTNET_TRACE_CONTEXT depending on the platform - if not is_windows: + if not is_windows and not runtimeFlavor.nativeaot: Clrproviders.write('#define NB_PROVIDERS ' + str(nbProviders) + '\n') Clrproviders.write(('constexpr ' if target_cpp else 'static const ') + 'LTTNG_TRACE_CONTEXT * ALL_LTTNG_PROVIDERS_CONTEXT[NB_PROVIDERS] = { ') Clrproviders.write(', '.join(allProviders)) @@ -799,12 +970,13 @@ def generatePlatformIndependentFiles(sClrEtwAllMan, incDir, etmDummyFile, extern Clreventpipewriteevents.write(stdprolog + "\n") for providerNode in tree.getElementsByTagName('provider'): + providerName = providerNode.getAttribute('name') templateNodes = providerNode.getElementsByTagName('template') allTemplates = parseTemplateNodes(templateNodes) eventNodes = providerNode.getElementsByTagName('event') #eventpipe: create clreventpipewriteevents.h - Clreventpipewriteevents.write(generateClrEventPipeWriteEvents(eventNodes, allTemplates, extern, target_cpp, runtimeFlavor) + "\n") + Clreventpipewriteevents.write(generateClrEventPipeWriteEvents(eventNodes, allTemplates, extern, target_cpp, runtimeFlavor, providerName, inclusion_list) + "\n") # Write secondary headers for FireEtXplat* and EventPipe* functions if write_xplatheader: @@ -831,8 +1003,10 @@ def main(argv): required = parser.add_argument_group('required arguments') required.add_argument('--man', type=str, required=True, help='full path to manifest containing the description of events') - required.add_argument('--inc', type=str, default=None, + required.add_argument('--incdir', type=str, default=None, help='full path to directory where the header files will be generated') + required.add_argument('--inc', type=str,default="", + help='full path to inclusion list') required.add_argument('--dummy', type=str,default=None, help='full path to file that will have dummy definitions of FireEtw functions') required.add_argument('--runtimeflavor', type=str,default="CoreCLR", @@ -847,7 +1021,8 @@ def main(argv): return 1 sClrEtwAllMan = args.man - incdir = args.inc + incdir = args.incdir + inclusion_filename = args.inc etmDummyFile = args.dummy runtimeFlavor = RuntimeFlavor(args.runtimeflavor) extern = not args.nonextern @@ -859,7 +1034,9 @@ def main(argv): target_cpp = False write_xplatheader = False - generatePlatformIndependentFiles(sClrEtwAllMan, incdir, etmDummyFile, extern, write_xplatheader, target_cpp, runtimeFlavor) + inclusion_list = parseInclusionList(inclusion_filename) + + generatePlatformIndependentFiles(sClrEtwAllMan, incdir, etmDummyFile, extern, write_xplatheader, target_cpp, runtimeFlavor, inclusion_list) if __name__ == '__main__': return_code = main(sys.argv[1:]) diff --git a/src/coreclr/scripts/jitutil.py b/src/coreclr/scripts/jitutil.py index 5a6b4ddc6c1072..7fad27c07a34fc 100644 --- a/src/coreclr/scripts/jitutil.py +++ b/src/coreclr/scripts/jitutil.py @@ -494,6 +494,29 @@ def determine_jit_name(host_os, target_os=None, host_arch=None, target_arch=None raise RuntimeError("Unknown host OS.") +def get_deepest_existing_directory(path): + """ Given a path, find the deepest existing directory containing it. This + might be the path itself, or a parent directory. If no such directory + is found, None is returned. + + Args: + path (str) : path to check + + Returns: + As described above + """ + path = os.path.abspath(path) + lastPath = "" + + # When os.path.dirname() is called on the root directory ("C:\\" on Windows or "/" on Linux), + # if returns itself. + while not os.path.isdir(path) and path != lastPath: + lastPath = path + path = os.path.dirname(path) + + return path if os.path.isdir(path) else None + + ################################################################################ ## ## Azure Storage functions @@ -753,28 +776,26 @@ def download_files(paths, target_dir, verbose=True, fail_if_not_found=True, is_a shutil.copy2(item_path, download_path) if verbose: - logging.info("Uncompress %s", download_path) + logging.info("Uncompress %s => %s", download_path, target_dir) if item_path.lower().endswith(".zip"): - with zipfile.ZipFile(download_path, "r") as file_handle: - file_handle.extractall(temp_location) + with zipfile.ZipFile(download_path, "r") as zip: + zip.extractall(target_dir) + archive_names = zip.namelist() else: - with tarfile.open(download_path, "r") as file_handle: - file_handle.extractall(temp_location) - - # Copy everything that was extracted to the target directory. - copy_directory(temp_location, target_dir, verbose_copy=verbose, - match_func=lambda path: not path.endswith(".zip") and not path.endswith(".tar.gz")) - - # The caller wants to know where all the files ended up, so compute that. - for dirpath, _, files in os.walk(temp_location, topdown=True): - for file_name in files: - if not file_name.endswith(".zip") and not file_name.endswith(".tar.gz"): - full_file_path = os.path.join(dirpath, file_name) - target_path = full_file_path.replace(temp_location, target_dir) - local_paths.append(target_path) + with tarfile.open(download_path, "r") as tar: + tar.extractall(target_dir) + archive_names = tar.getnames() + + for archive_name in archive_names: + if archive_name.endswith("/"): + # Directory + continue + + target_path = os.path.join(target_dir, archive_name.replace("/", os.path.sep)) + local_paths.append(target_path) else: - # Not a zip file; download directory to target directory + # Not an archive download_path = os.path.join(target_dir, item_name) if is_item_url: ok = download_one_url(item_path, download_path, fail_if_not_found=fail_if_not_found, is_azure_storage=is_azure_storage, display_progress=display_progress) diff --git a/src/coreclr/scripts/paltests.proj b/src/coreclr/scripts/paltests.proj new file mode 100644 index 00000000000000..167208f4ecb087 --- /dev/null +++ b/src/coreclr/scripts/paltests.proj @@ -0,0 +1,44 @@ + + + true + $(_Creator) + $(_HelixAccessToken) + $(_HelixBuild) + $(_HelixSource) + $(_HelixTargetQueues) + $(_HelixType) + + + + + + + + + + + + + + + + + @(PalTestArchive) + ./runpaltestshelix.sh + 0:10 + + + + diff --git a/src/coreclr/scripts/superpmi-asmdiffs-checked-release.proj b/src/coreclr/scripts/superpmi-asmdiffs-checked-release.proj index 1565f6d3468854..aa5deb1582397e 100644 --- a/src/coreclr/scripts/superpmi-asmdiffs-checked-release.proj +++ b/src/coreclr/scripts/superpmi-asmdiffs-checked-release.proj @@ -29,7 +29,7 @@ %HELIX_CORRELATION_PAYLOAD% %HELIX_WORKITEM_UPLOAD_ROOT% $(Python) $(ProductDirectory)\superpmi_asmdiffs_checked_release.py --diff_with_release -base_jit_directory $(ProductDirectory)\base -diff_jit_directory $(ProductDirectory)\diff -log_directory $(SuperpmiLogsLocation) - 1:00 + 3:00 diff --git a/src/coreclr/scripts/superpmi-collect.proj b/src/coreclr/scripts/superpmi-collect.proj index 4abaafd082910c..ee0d16efd1b0a7 100644 --- a/src/coreclr/scripts/superpmi-collect.proj +++ b/src/coreclr/scripts/superpmi-collect.proj @@ -124,10 +124,19 @@ + + + + -ilc_rsps + + + -assemblies + + - $(Python) $(SuperPMIDirectory)$(FileSeparatorChar)superpmi.py collect --clean -log_level DEBUG --$(CollectionType) $(PmiArguments) -assemblies $(AssembliesDirectoryOnHelix) -arch $(Architecture) -build_type $(BuildConfig) -core_root $(SuperPMIDirectory) + $(Python) $(SuperPMIDirectory)$(FileSeparatorChar)superpmi.py collect --clean -log_level DEBUG --$(CollectionType) $(PmiArguments) $(InputKind) $(AssembliesDirectoryOnHelix) -arch $(Architecture) -build_type $(BuildConfig) -core_root $(SuperPMIDirectory) 2:00 diff --git a/src/coreclr/scripts/superpmi-diffs.proj b/src/coreclr/scripts/superpmi-diffs.proj index 8b7aae5803de89..1d7b5fd0597f3b 100644 --- a/src/coreclr/scripts/superpmi-diffs.proj +++ b/src/coreclr/scripts/superpmi-diffs.proj @@ -57,7 +57,7 @@ $(Python) $(ProductDirectory)/superpmi_diffs.py -type $(SuperPmiDiffType) -base_jit_directory $(ProductDirectory)/base -diff_jit_directory $(ProductDirectory)/diff $(SuperPmiBaseJitOptionsArg) $(SuperPmiDiffJitOptionsArg) -log_directory $(SuperpmiLogsLocation) - 2:00 + 3:00 diff --git a/src/coreclr/scripts/superpmi.py b/src/coreclr/scripts/superpmi.py index 543dba0da7ccad..b9bd822524226c 100644 --- a/src/coreclr/scripts/superpmi.py +++ b/src/coreclr/scripts/superpmi.py @@ -40,7 +40,8 @@ from jitutil import TempDir, ChangeDir, remove_prefix, is_zero_length_file, is_nonzero_length_file, \ make_safe_filename, find_file, download_one_url, download_files, report_azure_error, \ require_azure_storage_libraries, authenticate_using_azure, \ - create_unique_directory_name, create_unique_file_name, get_files_from_path, determine_jit_name + create_unique_directory_name, create_unique_file_name, get_files_from_path, determine_jit_name, \ + get_deepest_existing_directory locale.setlocale(locale.LC_ALL, '') # Use '' for auto, or force e.g. to 'en_US.UTF-8' @@ -286,7 +287,9 @@ def add_core_root_arguments(parser, build_type_default, build_type_help): collect_parser.add_argument("--pmi", action="store_true", help="Run PMI on a set of directories or assemblies.") collect_parser.add_argument("--crossgen2", action="store_true", help="Run crossgen2 on a set of directories or assemblies.") +collect_parser.add_argument("--nativeaot", action="store_true", help="Run nativeaot on a set of directories or 'ilc.rsps' files.") collect_parser.add_argument("-assemblies", dest="assemblies", nargs="+", default=[], help="A list of managed dlls or directories to recursively use while collecting with PMI or crossgen2. Required if --pmi or --crossgen2 is specified.") +collect_parser.add_argument("-ilc_rsps", dest="ilc_rsps", nargs="+", default=[], help="For --nativeaot only. A list of 'ilc.rsp' files.") collect_parser.add_argument("-exclude", dest="exclude", nargs="+", default=[], help="A list of files or directories to exclude from the files and directories specified by `-assemblies`.") collect_parser.add_argument("-pmi_location", help="Path to pmi.dll to use during PMI run. Optional; pmi.dll will be downloaded from Azure Storage if necessary.") collect_parser.add_argument("-pmi_path", metavar="PMIPATH_DIR", nargs='*', help="Specify a \"load path\" where assemblies can be found during pmi.dll run. Optional; the argument values are translated to PMIPATH environment variable.") @@ -679,6 +682,12 @@ def __init__(self, coreclr_args): if coreclr_args.tiered_compilation or coreclr_args.tiered_pgo: raise RuntimeError("Tiering options have no effect for pmi or crossgen2 collections.") + if coreclr_args.nativeaot: + self.ilc_rsps = coreclr_args.ilc_rsps + self.exclude = coreclr_args.exclude + if coreclr_args.tiered_compilation or coreclr_args.tiered_pgo: + raise RuntimeError("Tiering options have no effect for nativeaot collections.") + if coreclr_args.tiered_compilation and coreclr_args.tiered_pgo: raise RuntimeError("Pass only one tiering option.") @@ -740,7 +749,7 @@ def collect(self): self.temp_location = temp_location - if self.coreclr_args.crossgen2: + if self.coreclr_args.crossgen2 or self.coreclr_args.nativeaot: jit_name = os.path.basename(self.jit_path) # There are issues when running SuperPMI and crossgen2 when using the same JIT binary. # Therefore, we produce a copy of the JIT binary for SuperPMI to use. @@ -851,17 +860,37 @@ def set_and_report_env(env, root_env, dotnet_env = None): # If we need them, collect all the assemblies we're going to use for the collection(s). # Remove the files matching the `-exclude` arguments (case-insensitive) from the list. - if self.coreclr_args.pmi or self.coreclr_args.crossgen2: - assemblies = [] - for item in self.assemblies: - assemblies += get_files_from_path(item, match_func=lambda file: any(file.endswith(extension) for extension in [".dll", ".exe"]) and (self.exclude is None or not any(e.lower() in file.lower() for e in self.exclude))) - if len(assemblies) == 0: - logging.error("No assemblies found using `-assemblies` and `-exclude` arguments!") + if self.coreclr_args.pmi or self.coreclr_args.crossgen2 or self.coreclr_args.nativeaot: + + def filter_file(file): + if self.coreclr_args.nativeaot: + extensions = [".ilc.rsp"] + else: + extensions = [".dll", ".exe"] + return any(file.endswith(extension) for extension in extensions) and (self.exclude is None or not any(e.lower() in file.lower() for e in self.exclude)) + + if self.coreclr_args.nativeaot: + ilc_rsps = [] + for item in self.ilc_rsps: + ilc_rsps += get_files_from_path(item, match_func=filter_file) + if len(ilc_rsps) == 0: + logging.error("No 'ilc.rsp' files found using `-ilc_rsps` and `-exclude` arguments!") + else: + logging.debug("Using ilc_rsps:") + for item in ilc_rsps: + logging.debug(" %s", item) + logging.debug("") # add trailing empty line else: - logging.debug("Using assemblies:") - for item in assemblies: - logging.debug(" %s", item) - logging.debug("") # add trailing empty line + assemblies = [] + for item in self.assemblies: + assemblies += get_files_from_path(item, match_func=filter_file) + if len(assemblies) == 0: + logging.error("No assemblies found using `-assemblies` and `-exclude` arguments!") + else: + logging.debug("Using assemblies:") + for item in assemblies: + logging.debug(" %s", item) + logging.debug("") # add trailing empty line ################################################################################################ Do collection using given collection command (e.g., script) if self.collection_command is not None: @@ -1101,6 +1130,168 @@ async def run_crossgen2(print_prefix, assembly, self): os.environ.update(old_env) ################################################################################################ end of "self.coreclr_args.crossgen2 is True" + ################################################################################################ Do collection using nativeaot + if self.coreclr_args.nativeaot is True: + logging.debug("Starting collection using nativeaot") + + async def run_nativeaot(print_prefix, original_rsp_filepath, self): + if not original_rsp_filepath.endswith(".ilc.rsp"): + raise RuntimeError(f"Expected a '.ilc.rsp' file for nativeaot, but got {original_rsp_filepath}") + + # The contents of the rsp contain many knobs and arguments that represent customer scenarios. + # Make a copy of the .ilc.rsp file as we are going to modify it. We do not want to modify the original one. + # The modifications include re-writing paths for references, input assembly and the output. + # We do this because the current paths in the rsp *may* not exist by the time we want to run ilc. + rsp_filepath = os.path.join(self.temp_location, make_safe_filename("nativeaot_" + original_rsp_filepath) + ".rsp") + shutil.copyfile(original_rsp_filepath, rsp_filepath) + + rsp_file = open(rsp_filepath, "r") + rsp_contents = rsp_file.readlines() + rsp_file.close() + + original_input_filepath = "" + + for line in rsp_contents: + if not line.startswith("-"): + original_input_filepath = line + + if original_input_filepath == "": + raise RuntimeError(f"Unable to find input file in {original_rsp_filepath}") + + input_filename = os.path.basename(original_input_filepath) + + # The ilc.rsp files are stored in the 'native' folders, ex: 'ComWrappers/ComWrappers/native/ComWrappers.ilc.rsp' + test_native_directory = os.path.abspath(os.path.join(original_rsp_filepath, "..")) # ex: 'ComWrappers/ComWrappers/native/' + test_output_directory = os.path.join(test_native_directory, "..") # ex: 'ComWrappers/ComWrappers/' + test_directory = os.path.join(test_output_directory, "..") # ex: 'ComWrappers/' + + # The corresponding input assemblies are in the folder above 'native', ex: 'ComWrappers/ComWrappers/' + test_input_filepath = os.path.join(test_output_directory, input_filename) + + # Blow away references, output, input assembly and directpinvokelist as we are going to use new ones. + rsp_file = open(rsp_filepath, "w") + def filter_rsp_argument(line): + if line.startswith("-r:") or line.startswith("-o:") or not line.startswith("-") or line.startswith("--directpinvokelist:"): + return False + else: + return True + rsp_contents = list(filter(filter_rsp_argument, rsp_contents)) + + # Fix-up paths for files located in the test's directories. + def map_rsp_argument(line): + if line.startswith("--exportsfile:"): + arg_path = os.path.join(test_native_directory, os.path.basename(line[len("--exportsfile:"):])) + return f"--exportsfile:{arg_path}" + elif line.startswith("--descriptor:"): + arg_path = os.path.join(test_directory, os.path.basename(line[len("--descriptor:"):])) + return f"--descriptor:{arg_path}" + elif line.startswith("--substitution:"): + arg_path = os.path.join(test_directory, os.path.basename(line[len("--substitution:"):])) + return f"--substitution:{arg_path}" + else: + return line + rsp_contents = list(map(map_rsp_argument, rsp_contents)) + + rsp_file.writelines(rsp_contents) + rsp_file.close() + + nativeaot_output_filename = os.path.splitext(input_filename)[0] + if self.coreclr_args.host_os.lower() == "windows": + root_nativeaot_output_filename = make_safe_filename("nativeaot_" + nativeaot_output_filename) + ".out.obj" + else: + root_nativeaot_output_filename = make_safe_filename("nativeaot_" + nativeaot_output_filename) + ".out.a" + nativeaot_output_assembly_filename = os.path.join(self.temp_location, root_nativeaot_output_filename) + try: + if os.path.exists(nativeaot_output_assembly_filename): + os.remove(nativeaot_output_assembly_filename) + except OSError as ose: + if "[WinError 32] The process cannot access the file because it is being used by another " \ + "process:" in format(ose): + logging.warning("Skipping file %s. Got error: %s", nativeaot_output_assembly_filename, ose) + return + else: + raise ose + + root_output_filename = make_safe_filename("nativeaot_" + nativeaot_output_filename + "_") + + with open(rsp_filepath, "a") as rsp_write_handle: + rsp_write_handle.write(test_input_filepath + "\n") + if self.coreclr_args.host_os.lower() == "windows": + rsp_write_handle.write("--directpinvokelist:" + os.path.join(self.core_root, "build", "WindowsAPIs.txt") + "\n") + rsp_write_handle.write("-o:" + nativeaot_output_assembly_filename + "\n") + rsp_write_handle.write("-r:" + os.path.join(self.coreclr_args.nativeaot_aotsdk_path, "System.*.dll") + "\n") + rsp_write_handle.write("-r:" + os.path.join(self.core_root, "System.*.dll") + "\n") + rsp_write_handle.write("-r:" + os.path.join(self.core_root, "Microsoft.*.dll") + "\n") + rsp_write_handle.write("-r:" + os.path.join(self.core_root, "mscorlib.dll") + "\n") + rsp_write_handle.write("-r:" + os.path.join(self.core_root, "netstandard.dll") + "\n") + rsp_write_handle.write("--jitpath:" + os.path.join(self.core_root, self.collection_shim_name) + "\n") + for var, value in dotnet_env.items(): + rsp_write_handle.write("--codegenopt:" + var + "=" + value + "\n") + + # Log what is in the response file + write_file_to_log(rsp_filepath) + + command = [self.coreclr_args.nativeaot_tool_path, "@" + rsp_filepath] + command_string = " ".join(command) + logging.debug("%s%s", print_prefix, command_string) + + begin_time = datetime.datetime.now() + + try: + stdout_file_handle, stdout_filepath = tempfile.mkstemp(suffix=".stdout", prefix=root_output_filename, dir=self.temp_location) + stderr_file_handle, stderr_filepath = tempfile.mkstemp(suffix=".stderr", prefix=root_output_filename, dir=self.temp_location) + + proc = await asyncio.create_subprocess_shell( + command_string, + stdout=stdout_file_handle, + stderr=stderr_file_handle) + + await proc.communicate() + + os.close(stdout_file_handle) + os.close(stderr_file_handle) + + # No need to keep zero-length files + if is_zero_length_file(stdout_filepath): + os.remove(stdout_filepath) + if is_zero_length_file(stderr_filepath): + os.remove(stderr_filepath) + + return_code = proc.returncode + if return_code != 0: + logging.debug("'%s': Error return code: %s", command_string, return_code) + write_file_to_log(stdout_filepath, log_level=logging.DEBUG) + + write_file_to_log(stderr_filepath, log_level=logging.DEBUG) + except OSError as ose: + if "[WinError 32] The process cannot access the file because it is being used by another " \ + "process:" in format(ose): + logging.warning("Skipping file %s. Got error: %s", root_output_filename, ose) + else: + raise ose + + # Delete the response file unless we are skipping cleanup + if not self.coreclr_args.skip_cleanup: + os.remove(rsp_filepath) + + elapsed_time = datetime.datetime.now() - begin_time + logging.debug("%sDone. Elapsed time: %s", print_prefix, elapsed_time) + + # Set environment variables. + nativeaot_command_env = env_copy.copy() + set_and_report_env(nativeaot_command_env, root_env) + + old_env = os.environ.copy() + os.environ.update(nativeaot_command_env) + + ilc_rsps = list(filter(lambda ilc_rsp: ilc_rsp.endswith(".ilc.rsp"), ilc_rsps)) + helper = AsyncSubprocessHelper(ilc_rsps, verbose=True) + helper.run_to_completion(run_nativeaot, self) + + os.environ.clear() + os.environ.update(old_env) + ################################################################################################ end of "self.coreclr_args.nativeaot is True" + mc_files = [os.path.join(self.temp_location, item) for item in os.listdir(self.temp_location) if item.endswith(".mc")] if len(mc_files) == 0: raise RuntimeError("No .mc files generated.") @@ -1310,8 +1501,8 @@ def save_repro_mc_files(temp_location, coreclr_args, artifacts_base_name, repro_ repro_files = [] for item in mc_files: repro_files.append(os.path.join(repro_location, os.path.basename(item))) - logging.debug("Copying %s -> %s", item, repro_location) - shutil.copy2(item, repro_location) + logging.debug("Moving %s -> %s", item, repro_location) + shutil.move(item, repro_location) logging.info("") logging.info("Repro {} .mc file(s) created for failures:".format(len(repro_files))) @@ -1376,7 +1567,7 @@ def replay(self): common_flags = [ "-v", "ewi", # display errors, warnings, missing, jit info - "-r", os.path.join(temp_location, "repro") # Repro name, create .mc repro files + "-r", os.path.join(temp_location, "repro") # Repro name prefix, create .mc repro files ] if self.coreclr_args.altjit: @@ -1724,7 +1915,7 @@ def replay_with_asm_diffs(self): "-v", "ewi", # display errors, warnings, missing, jit info "-f", fail_mcl_file, # Failing mc List "-diffsInfo", diffs_info, # Information about diffs - "-r", os.path.join(temp_location, "repro"), # Repro name, create .mc repro files + "-r", os.path.join(temp_location, "repro"), # Repro name prefix, 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, ] @@ -3198,8 +3389,23 @@ def process_mch_files_arg(coreclr_args): logging.info("Found download cache directory \"%s\" and --force_download not set; skipping download", mch_cache_dir) return [ mch_cache_dir ] + # MCH files can be large. Log the disk space before and after the download. + root_space_directory = get_deepest_existing_directory(coreclr_args.spmi_location) + if root_space_directory is not None: + before_total, _, before_free = shutil.disk_usage(root_space_directory) + before_total_gb = int(before_total / 1024 / 1024 / 1024) + before_free_gb = int(before_free / 1024 / 1024 / 1024) + logging.debug("Disk usage (%s): total %s GB; free %s GB", root_space_directory, format(before_total_gb, ','), format(before_free_gb, ',')) + local_mch_paths = download_mch_from_azure(coreclr_args, mch_cache_dir) + if root_space_directory is not None: + after_total, _, after_free = shutil.disk_usage(root_space_directory) + after_total_gb = int(after_total / 1024 / 1024 / 1024) + after_free_gb = int(after_free / 1024 / 1024 / 1024) + consumed_gb = before_free_gb - after_free_gb + logging.debug("Disk usage (%s): total %s GB; free %s GB; consumed by download %s GB", root_space_directory, format(after_total_gb, ','), format(after_free_gb, ','), format(consumed_gb, ',')) + # Add the private store files if coreclr_args.private_store is not None: # Only include the directories corresponding to the current JIT/EE version, target OS, and MCH architecture (this is the @@ -4053,12 +4259,23 @@ def verify_base_diff_args(): lambda unused: True, "Unable to set crossgen2") + coreclr_args.verify(args, + "nativeaot", + lambda unused: True, + "Unable to set nativeaot") + coreclr_args.verify(args, "assemblies", lambda unused: True, "Unable to set assemblies", modify_arg=lambda items: [item for item in items if os.path.isdir(item) or os.path.isfile(item)]) + coreclr_args.verify(args, + "ilc_rsps", + lambda unused: True, + "Unable to set ilc_rsps", + modify_arg=lambda items: [item for item in items if os.path.isdir(item) or os.path.isfile(item)]) + coreclr_args.verify(args, "exclude", lambda unused: True, @@ -4140,14 +4357,18 @@ def verify_base_diff_args(): lambda unused: True, "Unable to set pmi_path") - if (args.collection_command is None) and (args.pmi is False) and (args.crossgen2 is False) and not coreclr_args.skip_collection_step: - print("Either a collection command or `--pmi` or `--crossgen2` or `--skip_collection_step` must be specified") + if (args.collection_command is None) and (args.pmi is False) and (args.crossgen2 is False) and (args.nativeaot is False) and not coreclr_args.skip_collection_step: + print("Either a collection command or `--pmi` or `--crossgen2` or `--nativeaot` or `--skip_collection_step` must be specified") sys.exit(1) if (args.collection_command is not None) and (len(args.assemblies) > 0): print("Don't specify `-assemblies` if a collection command is given") sys.exit(1) + if (args.collection_command is not None) and (len(args.ilc_rsps) > 0): + print("Don't specify `-ilc_rsps` if a collection command is given") + sys.exit(1) + if (args.collection_command is not None) and (len(args.exclude) > 0): print("Don't specify `-exclude` if a collection command is given") sys.exit(1) @@ -4156,6 +4377,10 @@ def verify_base_diff_args(): print("Specify `-assemblies` if `--pmi` or `--crossgen2` is given") sys.exit(1) + if ((args.nativeaot is True)) and (len(args.ilc_rsps) == 0): + print("Specify `-ilc_rsps` if `--nativeaot` is given") + sys.exit(1) + if not args.pmi: if args.pmi_path is not None: logging.warning("Warning: -pmi_path is set but --pmi is not.") @@ -4164,8 +4389,11 @@ def verify_base_diff_args(): if args.collection_command is None and args.merge_mch_files is not True and not coreclr_args.skip_collection_step: assert args.collection_args is None - assert (args.pmi is True) or (args.crossgen2 is True) - assert len(args.assemblies) > 0 + if args.nativeaot: + assert len(args.ilc_rsps) > 0 + else: + assert (args.pmi is True) or (args.crossgen2 is True) + assert len(args.assemblies) > 0 if coreclr_args.merge_mch_files: assert len(coreclr_args.mch_files) > 0 @@ -4192,6 +4420,32 @@ def verify_base_diff_args(): if coreclr_args.dotnet_tool_path is not None: logging.debug("Using dotnet tool %s", coreclr_args.dotnet_tool_path) + if coreclr_args.nativeaot: + # Can we find nativeaot? + nativeaot_tool_name = "ilc.exe" if platform.system() == "Windows" else "ilc" + nativeaot_tool_path = os.path.abspath(os.path.join(coreclr_args.core_root, "ilc-published", nativeaot_tool_name)) + nativeaot_aotsdk_path = os.path.abspath(os.path.join(coreclr_args.core_root, "aotsdk")) + if not os.path.exists(nativeaot_tool_path): + print("`--nativeaot` is specified, but couldn't find " + nativeaot_tool_path + ". (Is it built?)") + sys.exit(1) + if not os.path.exists(nativeaot_aotsdk_path): + print("`--nativeaot` is specified, but couldn't find directory " + nativeaot_aotsdk_path + ". (Is it built?)") + sys.exit(1) + + # dotnet will not be used to run ilc.exe, but we need to establish the dotnet tool path regardless + dotnet_script_name = "dotnet.cmd" if platform.system() == "Windows" else "dotnet.sh" + dotnet_tool_path = os.path.abspath(os.path.join(coreclr_args.runtime_repo_location, dotnet_script_name)) + if not os.path.exists(dotnet_tool_path): + dotnet_tool_name = determine_dotnet_tool_name(coreclr_args) + dotnet_tool_path = find_tool(coreclr_args, dotnet_tool_name, search_core_root=False, search_product_location=False, search_path=True, throw_on_not_found=False) # Only search path + + coreclr_args.nativeaot_tool_path = nativeaot_tool_path + coreclr_args.nativeaot_aotsdk_path = nativeaot_aotsdk_path + coreclr_args.dotnet_tool_path = dotnet_tool_path + logging.debug("Using nativeaot tool %s", coreclr_args.nativeaot_tool_path) + if coreclr_args.dotnet_tool_path is not None: + logging.debug("Using dotnet tool %s", coreclr_args.dotnet_tool_path) + if coreclr_args.temp_dir is not None: coreclr_args.temp_dir = os.path.abspath(coreclr_args.temp_dir) logging.debug("Using temp_dir %s", coreclr_args.temp_dir) diff --git a/src/coreclr/scripts/superpmi_collect_setup.py b/src/coreclr/scripts/superpmi_collect_setup.py index f93cd287e15161..6e4cacef63e7d5 100644 --- a/src/coreclr/scripts/superpmi_collect_setup.py +++ b/src/coreclr/scripts/superpmi_collect_setup.py @@ -28,7 +28,7 @@ # | Arch | windows | Linux | macOS | # |-------|-------------------------|--------------------------------------------------------------------------------------------------------------------------------------|----------------| # | x86 | Windows.10.Amd64.X86.Rt | - | - | -# | x64 | Windows.10.Amd64.X86.Rt | Ubuntu.1804.Amd64 | OSX.1014.Amd64 | +# | x64 | Windows.10.Amd64.X86.Rt | Ubuntu.2204.Amd64 | OSX.1014.Amd64 | # | arm | - | (Ubuntu.1804.Arm32)Ubuntu.2004.ArmArch@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm32v7 | - | # | arm64 | Windows.11.Arm64 | (Ubuntu.1804.Arm64)Ubuntu.2004.ArmArch@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm64v8 | OSX.1100.ARM64 | # @@ -47,7 +47,7 @@ parser = argparse.ArgumentParser(description="description") -parser.add_argument("-collection_type", required=True, help="Type of the SPMI collection to be done (crossgen2, pmi, run, run_tiered, run_pgo)") +parser.add_argument("-collection_type", required=True, help="Type of the SPMI collection to be done (nativeaot, crossgen2, pmi, run, run_tiered, run_pgo)") parser.add_argument("-collection_name", required=True, help="Name of the SPMI collection to be done (e.g., libraries, libraries_tests, coreclr_tests, benchmarks)") parser.add_argument("-payload_directory", required=True, help="Path to payload directory to create: subdirectories are created for the correlation payload as well as the per-partition work items") parser.add_argument("-source_directory", required=True, help="Path to source directory") @@ -60,7 +60,7 @@ is_windows = platform.system() == "Windows" -legal_collection_types = [ "crossgen2", "pmi", "run", "run_tiered", "run_pgo" ] +legal_collection_types = [ "nativeaot", "crossgen2", "pmi", "run", "run_tiered", "run_pgo" ] directories_to_ignore = [ "runtimes", # This appears to be the result of a nuget package that includes a bunch of native code @@ -261,7 +261,7 @@ def setup_args(args): coreclr_args.verify(args, "max_size", - lambda max_size: coreclr_args.collection_type not in [ "pmi", "crossgen2" ] or max_size > 0, + lambda max_size: coreclr_args.collection_type not in [ "pmi", "crossgen2", "nativeaot" ] or max_size > 0, "Please enter valid positive numeric max_size", modify_arg=lambda max_size: int( max_size) * 1000 * 1000 if max_size is not None and max_size.isnumeric() else 0 @@ -302,7 +302,7 @@ def sorter_by_size(pair): if not os.path.isfile(curr_file_path): continue - if not name.endswith(".dll") and not name.endswith(".exe"): + if not name.endswith(".dll") and not name.endswith(".exe") and not name.endswith(".ilc.rsp") and not name.endswith(".xml") and not name.endswith(".exports"): continue size = os.path.getsize(curr_file_path) @@ -439,13 +439,15 @@ def main(main_args): superpmi_src_directory = os.path.join(source_directory, 'src', 'coreclr', 'scripts') + tests_directory = os.path.join(source_directory, 'src', 'tests') + # Correlation payload directories (sent to every Helix machine). # Currently, all the Core_Root files, superpmi script files, and pmi.dll go in the same place. superpmi_dst_directory = os.path.join(correlation_payload_directory, "superpmi") core_root_dst_directory = superpmi_dst_directory # Workitem directories - # input_artifacts is only used for pmi/crossgen2 collections. + # input_artifacts is only used for pmi/crossgen2/nativeaot collections. input_artifacts = "" arch = coreclr_args.arch @@ -463,7 +465,7 @@ def main(main_args): elif arch == "arm64": helix_queue = "(Ubuntu.1804.Arm64)Ubuntu.2004.ArmArch@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm64v8" else: - helix_queue = "Ubuntu.1804.Amd64" + helix_queue = "Ubuntu.2204.Amd64" elif platform_name == "osx": helix_queue = "OSX.1100.ARM64" if arch == "arm64" else "OSX.1014.Amd64" @@ -475,10 +477,12 @@ def main(main_args): # Copy Core_Root if platform_name == "windows": - acceptable_copy = lambda path: any(path.endswith(extension) for extension in [".py", ".dll", ".exe", ".json"]) + acceptable_copy = lambda path: any(path.endswith(extension) for extension in [".py", ".dll", ".exe", ".json", ".txt", ".xml", ".exports"]) else: - acceptable_extensions = [".py", ".dll", ".json"] + acceptable_extensions = [".py", ".dll", ".json", ".txt", ".xml", ".exports"] acceptable_extensions.append(".so" if platform_name == "linux" else ".dylib") + if platform_name == "linux": + acceptable_extensions.append(".so.1") # Need to accept files without any extension, which is how executable file's names look. acceptable_copy = lambda path: (os.path.basename(path).find(".") == -1) or any(path.endswith(extension) for extension in acceptable_extensions) @@ -489,7 +493,7 @@ def main(main_args): # Setup benchmarks setup_benchmark(workitem_payload_directory, arch) else: - # Setup for pmi/crossgen2 runs + # Setup for pmi/crossgen2/nativeaot runs # For libraries tests, copy all the test files to the single # The reason is there are lot of dependencies with *.Tests.dll and to ensure we do not get @@ -555,6 +559,11 @@ def make_readable(folder_name): # Details: https://bugs.python.org/issue26660 print('Ignoring PermissionError: {0}'.format(pe_error)) + # Build nativeaot tests + if coreclr_args.collection_type == "nativeaot": + tests_build_file = "build.cmd" if is_windows else "build.sh" + run_command([os.path.join(tests_directory, tests_build_file), "nativeaot", arch, coreclr_args.build_type, "tree", "nativeaot/SmokeTests"], source_directory) + # NOTE: we can't use the build machine ".dotnet" to run on all platforms. E.g., the Windows x86 build uses a # Windows x64 .dotnet\dotnet.exe that can't load a 32-bit shim. Thus, we always use corerun from Core_Root to invoke crossgen2. # The following will copy .dotnet to the correlation payload in case we change our mind, and need or want to use it for some scenarios. @@ -584,6 +593,10 @@ def make_readable(folder_name): 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"))] + if coreclr_args.collection_name == "smoke_tests": + if coreclr_args.collection_type != "nativeaot": + raise RuntimeError("Collection 'smoke_tests' is only available for 'nativeaot' collections.") + partition_files(coreclr_args.input_directory, input_artifacts, coreclr_args.max_size, exclude_directories, exclude_files) diff --git a/src/coreclr/tools/Common/CommandLineHelpers.cs b/src/coreclr/tools/Common/CommandLineHelpers.cs index 205592c1c91dca..3fb977a3047a6a 100644 --- a/src/coreclr/tools/Common/CommandLineHelpers.cs +++ b/src/coreclr/tools/Common/CommandLineHelpers.cs @@ -210,7 +210,7 @@ public static void MakeReproPackage(string makeReproPath, string outputFilePath, foreach (CliOption option in res.CommandResult.Command.Options) { OptionResult optionResult = res.GetResult(option); - if (optionResult is null || option.Name == "make-repro-path") + if (optionResult is null || option.Name == "--make-repro-path") { continue; } @@ -233,7 +233,7 @@ public static void MakeReproPackage(string makeReproPath, string outputFilePath, } foreach (string inputFile in dictionary.Values) { - rspFile.Add($"--{option.Name}:{ConvertFromOriginalPathToReproPackagePath(input: true, inputFile)}"); + rspFile.Add($"{option.Name}:{ConvertFromOriginalPathToReproPackagePath(input: true, inputFile)}"); } } else @@ -241,7 +241,7 @@ public static void MakeReproPackage(string makeReproPath, string outputFilePath, foreach (string optInList in values) { if (!string.IsNullOrEmpty(optInList)) - rspFile.Add($"--{option.Name}:{optInList}"); + rspFile.Add($"{option.Name}:{optInList}"); } } } @@ -254,11 +254,11 @@ public static void MakeReproPackage(string makeReproPath, string outputFilePath, // if output option is used, overwrite the path to the repro package stringVal = ConvertFromOriginalPathToReproPackagePath(input: false, stringVal); } - rspFile.Add($"--{option.Name}:{stringVal}"); + rspFile.Add($"{option.Name}:{stringVal}"); } else { - rspFile.Add($"--{option.Name}:{val}"); + rspFile.Add($"{option.Name}:{val}"); } } } diff --git a/src/coreclr/tools/Common/Compiler/CompilerTypeSystemContext.Validation.cs b/src/coreclr/tools/Common/Compiler/CompilerTypeSystemContext.Validation.cs index 999e4b6d3c5829..ff4404eba19377 100644 --- a/src/coreclr/tools/Common/Compiler/CompilerTypeSystemContext.Validation.cs +++ b/src/coreclr/tools/Common/Compiler/CompilerTypeSystemContext.Validation.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using Internal.TypeSystem; +using Internal.TypeSystem.Ecma; using Debug = System.Diagnostics.Debug; @@ -301,11 +302,20 @@ private static TypeDesc EnsureLoadableTypeUncached(TypeDesc type) // Validate classes, structs, enums, interfaces, and delegates Debug.Assert(type.IsDefType); - // Don't validate generic definitions + // Don't validate generic definitions much other than by checking for illegal recursion. if (type.IsGenericDefinition) { + // Check for illegal recursion + if (type is EcmaType ecmaType && ILCompiler.LazyGenericsSupport.CheckForECMAIllegalGenericRecursion(ecmaType)) + { + ThrowHelper.ThrowTypeLoadException(ExceptionStringID.ClassLoadGeneral, type); + } return type; } + else if (type.HasInstantiation) + { + ((CompilerTypeSystemContext)type.Context).EnsureLoadableType(type.GetTypeDefinition()); + } // System.__Canon or System.__UniversalCanon if (type.IsCanonicalDefinitionType(CanonicalFormKind.Any)) diff --git a/src/coreclr/tools/Common/Compiler/GenericCycleDetection/GraphBuilder.cs b/src/coreclr/tools/Common/Compiler/GenericCycleDetection/GraphBuilder.cs index 3b6c24ebd787dd..dda635a8b8c271 100644 --- a/src/coreclr/tools/Common/Compiler/GenericCycleDetection/GraphBuilder.cs +++ b/src/coreclr/tools/Common/Compiler/GenericCycleDetection/GraphBuilder.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.Collections.Generic; using System.Reflection.Metadata; using System.Reflection.Metadata.Ecma335; @@ -14,6 +15,146 @@ internal static partial class LazyGenericsSupport { private sealed partial class GraphBuilder { + // Generate the illegal recursion graph as specified in ECMA 335 II.9.2 Generics and recursive inheritance graphs + public GraphBuilder(EcmaType type) + { + _graph = new Graph(); + + if (type.HasInstantiation) + { + HashSet types = new HashSet(); + List typesToProcess = new List(); + typesToProcess.Add(type); + while (typesToProcess.Count > 0) + { + var processType = typesToProcess[typesToProcess.Count - 1]; + typesToProcess.RemoveAt(typesToProcess.Count - 1); + + if (processType.IsParameterizedType) + { + if (processType.GetParameterType() is InstantiatedType instantiatedType) + { + AddProcessType(instantiatedType.GetTypeDefinition()); + WalkFormals(instantiatedType, expanded: true); + } + } + else if (processType.GetTypeDefinition() == processType) + { + if (processType.HasInstantiation && processType is EcmaType ecmaProcessType) + { + AddSpecializedType(ecmaProcessType.BaseType); + foreach (var t in ecmaProcessType.ExplicitlyImplementedInterfaces) + { + AddSpecializedType(t); + } + + void AddSpecializedType(TypeDesc typeToSpecialize) + { + if (typeToSpecialize != null) + { + var specializedType = typeToSpecialize.InstantiateSignature(processType.Instantiation, default(Instantiation)); + AddProcessType(specializedType); + } + } + } + } + else if (processType is InstantiatedType instantiatedType) + { + AddProcessType(instantiatedType.GetTypeDefinition()); + WalkFormals(instantiatedType, expanded: false); + } + + void WalkFormals(InstantiatedType instantiatedType, bool expanded) + { + for (int i = 0; i < instantiatedType.Instantiation.Length; i++) + { + var formal = instantiatedType.GetTypeDefinition().Instantiation[i] as GenericParameterDesc; + if (instantiatedType.Instantiation[i] is GenericParameterDesc genParam) + { + AddEdge(genParam, formal, expanded); + } + else + { + foreach (var genParameter in GetGenericParameters(instantiatedType.Instantiation[i])) + { + AddEdge(genParameter, formal, true); + } + } + } + } + + void AddProcessType(TypeDesc type) + { + if (type == null) + return; + + if (types.Add(type)) + { + typesToProcess.Add(type); + } + + if (type is ParameterizedType paramType) + { + AddProcessType(paramType.GetParameterType()); + } + + foreach (var instType in type.Instantiation) + { + AddProcessType(instType); + } + } + + void AddEdge(GenericParameterDesc from, GenericParameterDesc to, bool flagged) + { + EcmaGenericParameter fromEcma = from as EcmaGenericParameter; + EcmaGenericParameter toEcma = to as EcmaGenericParameter; + if (fromEcma == null || toEcma == null) + return; + _graph.AddEdge(fromEcma, toEcma, flagged); + } + + IEnumerable GetGenericParameters(TypeDesc t) + { + if (t is GenericParameterDesc genParamDesc) + { + yield return genParamDesc; + } + else if (t is ParameterizedType paramType) + { + foreach (var genParamType in GetGenericParameters(paramType.GetParameterType())) + { + yield return genParamType; + } + } + else if (t.HasInstantiation) + { + foreach (var instType in t.Instantiation) + { + foreach (var genParamType in GetGenericParameters(instType)) + { + yield return genParamType; + } + } + } + else if (t is FunctionPointerType fptrType) + { + foreach (var genParamType in GetGenericParameters(fptrType.Signature.ReturnType)) + { + yield return genParamType; + } + foreach (var parameterType in fptrType.Signature) + { + foreach (var genParamType in GetGenericParameters(parameterType)) + { + yield return genParamType; + } + } + } + } + } + } + } + public GraphBuilder(EcmaModule assembly) { _graph = new Graph(); @@ -126,8 +267,10 @@ private void LookForVirtualOverrides(EcmaMethod method) || interfaceMethod.Signature.IsStatic != method.Signature.IsStatic) continue; - MethodDesc impl = methodOwningType.ResolveInterfaceMethodToVirtualMethodOnType(interfaceMethod)?.GetMethodDefinition(); - if (impl == method) + MethodDesc impl = interfaceMethod.Signature.IsStatic ? + methodOwningType.ResolveInterfaceMethodToStaticVirtualMethodOnType(interfaceMethod) : + methodOwningType.ResolveInterfaceMethodToVirtualMethodOnType(interfaceMethod); + if (impl?.GetMethodDefinition() == method) { RecordBinding(this, interfaceMethod.Instantiation, method.Instantiation); // Continue the loop in case this method implements multiple interfaces diff --git a/src/coreclr/tools/Common/Compiler/GenericCycleDetection/ModuleCycleInfo.cs b/src/coreclr/tools/Common/Compiler/GenericCycleDetection/ModuleCycleInfo.cs index b5a81581c58a05..5d0a4f36cc1d04 100644 --- a/src/coreclr/tools/Common/Compiler/GenericCycleDetection/ModuleCycleInfo.cs +++ b/src/coreclr/tools/Common/Compiler/GenericCycleDetection/ModuleCycleInfo.cs @@ -72,6 +72,22 @@ protected override ModuleCycleInfo CreateValueFromKey(EcmaModule key) } } + internal static bool CheckForECMAIllegalGenericRecursion(EcmaType type) + { + GraphBuilder gb = new GraphBuilder(type); + Graph graph = gb.Graph; + + var flaggedCycleData = graph.ComputeVerticesInvolvedInAFlaggedCycle(); + + foreach (var _ in flaggedCycleData) + { + // If the list isn't empty, there is an illegal generic recursion + return true; + } + + return false; + } + internal sealed class GenericCycleDetector { private readonly CycleInfoHashtable _hashtable = new CycleInfoHashtable(); diff --git a/src/coreclr/tools/Common/Compiler/HardwareIntrinsicHelpers.cs b/src/coreclr/tools/Common/Compiler/HardwareIntrinsicHelpers.cs index 28c19ee96de776..1e778e97c67f3e 100644 --- a/src/coreclr/tools/Common/Compiler/HardwareIntrinsicHelpers.cs +++ b/src/coreclr/tools/Common/Compiler/HardwareIntrinsicHelpers.cs @@ -220,6 +220,7 @@ private static class Arm64IntrinsicConstants public const int Atomics = 0x0080; public const int Rcpc = 0x0100; public const int VectorT128 = 0x0200; + public const int Rcpc2 = 0x0400; public static void AddToBuilder(InstructionSetSupportBuilder builder, int flags) { @@ -241,6 +242,8 @@ public static void AddToBuilder(InstructionSetSupportBuilder builder, int flags) builder.AddSupportedInstructionSet("lse"); if ((flags & Rcpc) != 0) builder.AddSupportedInstructionSet("rcpc"); + if ((flags & Rcpc2) != 0) + builder.AddSupportedInstructionSet("rcpc2"); } public static int FromInstructionSet(InstructionSet instructionSet) @@ -269,6 +272,7 @@ public static int FromInstructionSet(InstructionSet instructionSet) InstructionSet.ARM64_Sha256_Arm64 => Sha256, InstructionSet.ARM64_Atomics => Atomics, InstructionSet.ARM64_Rcpc => Rcpc, + InstructionSet.ARM64_Rcpc2 => Rcpc2, // Vector Sizes InstructionSet.ARM64_VectorT128 => VectorT128, diff --git a/src/coreclr/tools/Common/InstructionSetHelpers.cs b/src/coreclr/tools/Common/InstructionSetHelpers.cs index 089f112915572a..e3236467f93145 100644 --- a/src/coreclr/tools/Common/InstructionSetHelpers.cs +++ b/src/coreclr/tools/Common/InstructionSetHelpers.cs @@ -186,7 +186,6 @@ public static InstructionSetSupport ConfigureInstructionSetSupport(string instru optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("lse"); optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("dotprod"); optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("rdma"); - optimisticInstructionSetSupportBuilder.AddSupportedInstructionSet("rcpc"); } // Vector can always be part of the optimistic set, we only want to optionally exclude it from the supported set diff --git a/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSet.cs b/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSet.cs index 32b60ecbcda7da..51c1a4854d71f4 100644 --- a/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSet.cs +++ b/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSet.cs @@ -53,6 +53,7 @@ public enum ReadyToRunInstructionSet VectorT128=39, VectorT256=40, VectorT512=41, + Rcpc2=42, } } diff --git a/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSetHelper.cs b/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSetHelper.cs index f593808be32989..57629f66b9c6f5 100644 --- a/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSetHelper.cs +++ b/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSetHelper.cs @@ -45,6 +45,7 @@ public static class ReadyToRunInstructionSetHelper case InstructionSet.ARM64_Dczva: return null; case InstructionSet.ARM64_Rcpc: return ReadyToRunInstructionSet.Rcpc; case InstructionSet.ARM64_VectorT128: return ReadyToRunInstructionSet.VectorT128; + case InstructionSet.ARM64_Rcpc2: return ReadyToRunInstructionSet.Rcpc2; default: throw new Exception("Unknown instruction set"); } diff --git a/src/coreclr/tools/Common/Internal/Runtime/RuntimeConstants.cs b/src/coreclr/tools/Common/Internal/Runtime/RuntimeConstants.cs index 24d4076b202b7b..1c4a195a21d3d2 100644 --- a/src/coreclr/tools/Common/Internal/Runtime/RuntimeConstants.cs +++ b/src/coreclr/tools/Common/Internal/Runtime/RuntimeConstants.cs @@ -3,21 +3,6 @@ namespace Internal.Runtime { - internal static class IndirectionConstants - { - /// - /// Flag set on pointers to indirection cells to distinguish them - /// from pointers to the object directly - /// - public const int IndirectionCellPointer = 0x1; - - /// - /// Flag set on RVAs to indirection cells to distinguish them - /// from RVAs to the object directly - /// - public const uint RVAPointsToIndirection = 0x80000000u; - } - internal static class GCStaticRegionConstants { /// diff --git a/src/coreclr/tools/Common/Internal/Runtime/StackTraceData.cs b/src/coreclr/tools/Common/Internal/Runtime/StackTraceData.cs index 2db0523ae28431..46fb51450a9d81 100644 --- a/src/coreclr/tools/Common/Internal/Runtime/StackTraceData.cs +++ b/src/coreclr/tools/Common/Internal/Runtime/StackTraceData.cs @@ -9,5 +9,7 @@ internal static class StackTraceDataCommand public const byte UpdateName = 0x02; public const byte UpdateSignature = 0x04; public const byte UpdateGenericSignature = 0x08; // Just a shortcut - sig metadata has the info + + public const byte IsStackTraceHidden = 0x10; } } diff --git a/src/coreclr/tools/Common/JitInterface/CorInfoInstructionSet.cs b/src/coreclr/tools/Common/JitInterface/CorInfoInstructionSet.cs index f26abd68262391..d7bc2e56ebd2a4 100644 --- a/src/coreclr/tools/Common/JitInterface/CorInfoInstructionSet.cs +++ b/src/coreclr/tools/Common/JitInterface/CorInfoInstructionSet.cs @@ -30,6 +30,7 @@ public enum InstructionSet ARM64_Dczva = InstructionSet_ARM64.Dczva, ARM64_Rcpc = InstructionSet_ARM64.Rcpc, ARM64_VectorT128 = InstructionSet_ARM64.VectorT128, + ARM64_Rcpc2 = InstructionSet_ARM64.Rcpc2, ARM64_ArmBase_Arm64 = InstructionSet_ARM64.ArmBase_Arm64, ARM64_AdvSimd_Arm64 = InstructionSet_ARM64.AdvSimd_Arm64, ARM64_Aes_Arm64 = InstructionSet_ARM64.Aes_Arm64, @@ -185,14 +186,15 @@ public enum InstructionSet_ARM64 Dczva = 12, Rcpc = 13, VectorT128 = 14, - ArmBase_Arm64 = 15, - AdvSimd_Arm64 = 16, - Aes_Arm64 = 17, - Crc32_Arm64 = 18, - Dp_Arm64 = 19, - Rdm_Arm64 = 20, - Sha1_Arm64 = 21, - Sha256_Arm64 = 22, + Rcpc2 = 15, + ArmBase_Arm64 = 16, + AdvSimd_Arm64 = 17, + Aes_Arm64 = 18, + Crc32_Arm64 = 19, + Dp_Arm64 = 20, + Rdm_Arm64 = 21, + Sha1_Arm64 = 22, + Sha256_Arm64 = 23, } public enum InstructionSet_X64 @@ -1147,7 +1149,7 @@ private static InstructionSetFlags ExpandInstructionSetByReverseImplicationHelpe { ("armv8.1-a", TargetArchitecture.ARM64), "armv8-a lse crc rdma" }, { ("armv8.2-a", TargetArchitecture.ARM64), "armv8.1-a" }, { ("armv8.3-a", TargetArchitecture.ARM64), "armv8.2-a rcpc" }, - { ("armv8.4-a", TargetArchitecture.ARM64), "armv8.3-a dotprod" }, + { ("armv8.4-a", TargetArchitecture.ARM64), "armv8.3-a dotprod rcpc2" }, { ("armv8.5-a", TargetArchitecture.ARM64), "armv8.4-a" }, { ("armv8.6-a", TargetArchitecture.ARM64), "armv8.5-a" }, { ("apple-m1", TargetArchitecture.ARM64), "armv8.5-a" }, @@ -1195,6 +1197,7 @@ public static IEnumerable ArchitectureToValidInstructionSets yield return new InstructionSetInfo("Dczva", "", InstructionSet.ARM64_Dczva, false); yield return new InstructionSetInfo("rcpc", "", InstructionSet.ARM64_Rcpc, true); yield return new InstructionSetInfo("vectort128", "VectorT128", InstructionSet.ARM64_VectorT128, true); + yield return new InstructionSetInfo("rcpc2", "", InstructionSet.ARM64_Rcpc2, true); break; case TargetArchitecture.X64: diff --git a/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt b/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt index 3c669e1ea95fea..ba4db589c81a0f 100644 --- a/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt +++ b/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt @@ -167,6 +167,7 @@ instructionset ,ARM64 , , , ,Vector128 instructionset ,ARM64 , , , ,Dczva , instructionset ,ARM64 , ,Rcpc ,26 ,Rcpc ,rcpc instructionset ,ARM64 ,VectorT128 , ,39 ,VectorT128 ,vectort128 +instructionset ,ARM64 , ,Rcpc2 ,42 ,Rcpc2 ,rcpc2 instructionset64bit,ARM64 ,ArmBase instructionset64bit,ARM64 ,AdvSimd @@ -203,7 +204,7 @@ instructionsetgroup ,armv8-a ,ARM64 ,neon instructionsetgroup ,armv8.1-a ,ARM64 ,armv8-a lse crc rdma instructionsetgroup ,armv8.2-a ,ARM64 ,armv8.1-a instructionsetgroup ,armv8.3-a ,ARM64 ,armv8.2-a rcpc -instructionsetgroup ,armv8.4-a ,ARM64 ,armv8.3-a dotprod +instructionsetgroup ,armv8.4-a ,ARM64 ,armv8.3-a dotprod rcpc2 instructionsetgroup ,armv8.5-a ,ARM64 ,armv8.4-a instructionsetgroup ,armv8.6-a ,ARM64 ,armv8.5-a diff --git a/src/coreclr/tools/Common/TypeSystem/Common/CastingHelper.cs b/src/coreclr/tools/Common/TypeSystem/Common/CastingHelper.cs index 3036ce1f67b9a4..7a2e6e17d3bfe6 100644 --- a/src/coreclr/tools/Common/TypeSystem/Common/CastingHelper.cs +++ b/src/coreclr/tools/Common/TypeSystem/Common/CastingHelper.cs @@ -391,7 +391,9 @@ private static bool CanCastToClassOrInterface(this TypeDesc thisType, TypeDesc o private static bool CanCastToInterface(this TypeDesc thisType, TypeDesc otherType, StackOverflowProtect protect) { - if (!otherType.HasVariance) + // Interfaces that don't have variance can still behave variantly when arrays are involved. + bool arrayCovariance = thisType.IsSzArray && otherType.HasInstantiation; + if (!otherType.HasVariance && !arrayCovariance) { return thisType.CanCastToNonVariantInterface(otherType); } @@ -404,7 +406,7 @@ private static bool CanCastToInterface(this TypeDesc thisType, TypeDesc otherTyp foreach (var interfaceType in thisType.RuntimeInterfaces) { - if (interfaceType.CanCastByVarianceToInterfaceOrDelegate(otherType, protect)) + if (interfaceType.CanCastByVarianceToInterfaceOrDelegate(otherType, protect, arrayCovariance)) { return true; } @@ -432,7 +434,7 @@ private static bool CanCastToNonVariantInterface(this TypeDesc thisType, TypeDes return false; } - private static bool CanCastByVarianceToInterfaceOrDelegate(this TypeDesc thisType, TypeDesc otherType, StackOverflowProtect protectInput) + private static bool CanCastByVarianceToInterfaceOrDelegate(this TypeDesc thisType, TypeDesc otherType, StackOverflowProtect protectInput, bool arrayCovariance = false) { if (thisType == otherType) { @@ -467,23 +469,24 @@ private static bool CanCastByVarianceToInterfaceOrDelegate(this TypeDesc thisTyp if (!arg.IsEquivalentTo(targetArg)) { - GenericParameterDesc openArgType = (GenericParameterDesc)instantiationOpen[i]; + GenericVariance variance = arrayCovariance + ? GenericVariance.Covariant : ((GenericParameterDesc)instantiationOpen[i]).Variance; - switch (openArgType.Variance) + switch (variance) { case GenericVariance.Covariant: - if (!arg.IsBoxedAndCanCastTo(targetArg, protect)) + if (!arg.IsBoxedAndCanCastTo(targetArg, protect, arrayCovariance)) return false; break; case GenericVariance.Contravariant: - if (!targetArg.IsBoxedAndCanCastTo(arg, protect)) + if (!targetArg.IsBoxedAndCanCastTo(arg, protect, arrayCovariance)) return false; break; default: // non-variant - Debug.Assert(openArgType.Variance == GenericVariance.None); + Debug.Assert(variance == GenericVariance.None); return false; } } @@ -548,7 +551,7 @@ private static bool CanCastToClass(this TypeDesc thisType, TypeDesc otherType, S return false; } - private static bool IsBoxedAndCanCastTo(this TypeDesc thisType, TypeDesc otherType, StackOverflowProtect protect) + private static bool IsBoxedAndCanCastTo(this TypeDesc thisType, TypeDesc otherType, StackOverflowProtect protect, bool arrayCovariance) { TypeDesc fromUnderlyingType = thisType.UnderlyingType; @@ -564,6 +567,14 @@ private static bool IsBoxedAndCanCastTo(this TypeDesc thisType, TypeDesc otherTy return genericVariableFromParam.CanCastToInternal(otherType, protect); } } + else if (arrayCovariance && fromUnderlyingType.IsPrimitive) + { + TypeDesc toUnderlyingType = otherType.UnderlyingType; + if (GetNormalizedIntegralArrayElementType(fromUnderlyingType) == GetNormalizedIntegralArrayElementType(toUnderlyingType)) + { + return true; + } + } return false; } diff --git a/src/coreclr/tools/Common/TypeSystem/Common/MetadataVirtualMethodAlgorithm.cs b/src/coreclr/tools/Common/TypeSystem/Common/MetadataVirtualMethodAlgorithm.cs index 8d2b8a4e3fd3fe..330296b18dbfa4 100644 --- a/src/coreclr/tools/Common/TypeSystem/Common/MetadataVirtualMethodAlgorithm.cs +++ b/src/coreclr/tools/Common/TypeSystem/Common/MetadataVirtualMethodAlgorithm.cs @@ -614,6 +614,8 @@ private static MethodDesc ResolveInterfaceMethodToVirtualMethodOnType(MethodDesc { Debug.Assert(!interfaceMethod.Signature.IsStatic); + // This would be a default interface method resolution. The algorithm below would sort of work, but doesn't handle + // things like diamond cases and it's better not to let it resolve as such. if (currentType.IsInterface) return null; @@ -781,7 +783,7 @@ private static DefaultInterfaceMethodResolution ResolveInterfaceMethodToDefaultI // If we're asking about an interface, include the interface in the list. consideredInterfaces = new DefType[currentType.RuntimeInterfaces.Length + 1]; Array.Copy(currentType.RuntimeInterfaces, consideredInterfaces, currentType.RuntimeInterfaces.Length); - consideredInterfaces[consideredInterfaces.Length - 1] = (DefType)currentType.InstantiateAsOpen(); + consideredInterfaces[consideredInterfaces.Length - 1] = currentType.IsGenericDefinition ? (DefType)currentType.InstantiateAsOpen() : currentType; } foreach (MetadataType runtimeInterface in consideredInterfaces) @@ -921,6 +923,11 @@ public static IEnumerable EnumAllVirtualSlots(MetadataType type) /// MethodDesc of the resolved virtual static method, null when not found (runtime lookup must be used) public static MethodDesc ResolveInterfaceMethodToStaticVirtualMethodOnType(MethodDesc interfaceMethod, MetadataType currentType) { + // This would be a default interface method resolution. The algorithm below would sort of work, but doesn't handle + // things like diamond cases and it's better not to let it resolve as such. + if (currentType.IsInterface) + return null; + // Search for match on a per-level in the type hierarchy for (MetadataType typeToCheck = currentType; typeToCheck != null; typeToCheck = typeToCheck.MetadataBaseType) { diff --git a/src/coreclr/tools/Common/TypeSystem/Ecma/SymbolReader/UnmanagedPdbSymbolReader.cs b/src/coreclr/tools/Common/TypeSystem/Ecma/SymbolReader/UnmanagedPdbSymbolReader.cs index c791a509f02a99..107170e743fbc7 100644 --- a/src/coreclr/tools/Common/TypeSystem/Ecma/SymbolReader/UnmanagedPdbSymbolReader.cs +++ b/src/coreclr/tools/Common/TypeSystem/Ecma/SymbolReader/UnmanagedPdbSymbolReader.cs @@ -68,7 +68,7 @@ protected override object CreateObject(IntPtr externalComObject, CreateObjectFla Debug.Assert(flags == CreateObjectFlags.UniqueInstance); var iid = ICLRMetaHost.IID; - if (Marshal.QueryInterface(externalComObject, ref iid, out IntPtr hostPtr) != 0) + if (Marshal.QueryInterface(externalComObject, in iid, out IntPtr hostPtr) != 0) { throw new ArgumentException("Expected ICLRMetaHost COM interface"); } @@ -284,7 +284,7 @@ private CoCreateWrapperCache() { } Debug.Assert(flags == CreateObjectFlags.UniqueInstance); var iid = new Guid("AA544D42-28CB-11d3-BD22-0000F80849BD"); - if (Marshal.QueryInterface(externalComObject, ref iid, out IntPtr ppv) != 0) + if (Marshal.QueryInterface(externalComObject, in iid, out IntPtr ppv) != 0) { return null; } diff --git a/src/coreclr/tools/Common/TypeSystem/Interop/IL/InlineArrayType.cs b/src/coreclr/tools/Common/TypeSystem/Interop/IL/InlineArrayType.cs index c0b52d45c99686..b52b12a868bd1c 100644 --- a/src/coreclr/tools/Common/TypeSystem/Interop/IL/InlineArrayType.cs +++ b/src/coreclr/tools/Common/TypeSystem/Interop/IL/InlineArrayType.cs @@ -379,17 +379,13 @@ public override MethodIL EmitIL() { var emitter = new ILEmitter(); var codeStream = emitter.NewCodeStream(); - _ = emitter.NewLocal(Context.GetWellKnownType(WellKnownType.Boolean)); var elementType = _owningType.ElementType; // Getter: // return ((ElementType*)(&this))[index]; // // Setter: - // fixed (InlineArray* pThis = &this) - //{ - // ((ElementType*)pThis)[(ulong)index] = (ElementType)value; - //} + // ((ElementType*)(&this)[(ulong)index] = (ElementType)value; var vThis = emitter.NewLocal(_owningType.MakeByRefType()); codeStream.EmitLdArg(0); diff --git a/src/coreclr/tools/Directory.Build.props b/src/coreclr/tools/Directory.Build.props index 4b443b53152bbe..6386652c7af513 100644 --- a/src/coreclr/tools/Directory.Build.props +++ b/src/coreclr/tools/Directory.Build.props @@ -12,4 +12,15 @@ true DEBUG;$(DefineConstants) + + + + 4.5.0 + diff --git a/src/coreclr/tools/aot/Directory.Build.props b/src/coreclr/tools/aot/Directory.Build.props deleted file mode 100644 index 5a5e0e9914b730..00000000000000 --- a/src/coreclr/tools/aot/Directory.Build.props +++ /dev/null @@ -1,6 +0,0 @@ - - - - true - - diff --git a/src/coreclr/tools/aot/Directory.Build.targets b/src/coreclr/tools/aot/Directory.Build.targets new file mode 100644 index 00000000000000..4f855d71288f72 --- /dev/null +++ b/src/coreclr/tools/aot/Directory.Build.targets @@ -0,0 +1,6 @@ + + + + true + + diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Compilation.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Compilation.cs index b6a0997701b732..1fda33a405bb77 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Compilation.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Compilation.cs @@ -400,17 +400,15 @@ public GenericDictionaryLookup ComputeGenericLookup(MethodDesc contextMethod, Re { int dictionaryOffset = dictionarySlot * pointerSize; - bool indirectLastOffset = lookup.LookupResultReferenceType(_nodeFactory) == GenericLookupResultReferenceType.Indirect; - if (contextSource == GenericContextSource.MethodParameter) { - return GenericDictionaryLookup.CreateFixedLookup(contextSource, dictionaryOffset, indirectLastOffset: indirectLastOffset); + return GenericDictionaryLookup.CreateFixedLookup(contextSource, dictionaryOffset); } else { int vtableSlot = VirtualMethodSlotHelper.GetGenericDictionarySlot(_nodeFactory, contextMethod.OwningType); int vtableOffset = EETypeNode.GetVTableOffset(pointerSize) + vtableSlot * pointerSize; - return GenericDictionaryLookup.CreateFixedLookup(contextSource, vtableOffset, dictionaryOffset, indirectLastOffset: indirectLastOffset); + return GenericDictionaryLookup.CreateFixedLookup(contextSource, vtableOffset, dictionaryOffset); } } else diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilationModuleGroup.Aot.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilationModuleGroup.Aot.cs index 896967d28ada31..abb8502239cbcc 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilationModuleGroup.Aot.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilationModuleGroup.Aot.cs @@ -45,12 +45,6 @@ public partial class CompilationModuleGroup : IInliningPolicy /// public abstract bool ShouldReferenceThroughImportTable(TypeDesc type); - /// - /// If true, there may be type system constructs that will not be linked into the same module as the current compilation and therefore - /// accessed through the target platform's import mechanism (ie, Import Address Table on Windows) - /// - public abstract bool CanHaveReferenceThroughImportTable { get; } - /// /// If true, instance methods will only be generated once their owning type is created. /// 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 0e03ed4a6a843c..5c85554bb8c67b 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerTypeSystemContext.ValueTypeMethods.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerTypeSystemContext.ValueTypeMethods.cs @@ -113,8 +113,14 @@ public bool IsAsyncStateMachineType(MetadataType type) && Array.IndexOf(type.RuntimeInterfaces, _iAsyncStateMachineType) >= 0; } - private static bool RequiresAttributeGetFieldHelperMethod(TypeDesc attributeTypeDef) + private bool RequiresAttributeGetFieldHelperMethod(TypeDesc attributeTypeDef) { + _objectEqualsMethod ??= GetWellKnownType(WellKnownType.Object).GetMethod("Equals", null); + + // If the classlib doesn't have Object.Equals, we don't need this. + if (_objectEqualsMethod == null) + return false; + foreach (FieldDesc field in attributeTypeDef.GetFields()) { if (field.IsStatic) diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/CompilerGeneratedState.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/CompilerGeneratedState.cs index 8150abeca61b1e..6a5e2ed77cdf08 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/CompilerGeneratedState.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/CompilerGeneratedState.cs @@ -158,8 +158,10 @@ referencedMethod.OwningType is MetadataType generatedType && break; case ILOpcode.stsfld: + case ILOpcode.ldsfld: { // Same as above, but stsfld instead of a call to the constructor + // Ldsfld may also trigger a cctor that creates a closure environment FieldDesc? field = methodBody.GetObject(reader.ReadILToken()) as FieldDesc; if (field == null) continue; @@ -417,6 +419,7 @@ void MapGeneratedTypeTypeParameters( break; case ILOpcode.stsfld: + case ILOpcode.ldsfld: { if (body.GetObject(reader.ReadILToken()) is FieldDesc { OwningType: MetadataType owningType } && compilerGeneratedType == owningType.GetTypeDefinition()) 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 1e9f7679b44cc3..19a747cbcca6a5 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/EETypeNode.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/EETypeNode.cs @@ -372,16 +372,8 @@ public sealed override IEnumerable GetConditionalSt DefType defType = _type.GetClosestDefType(); - // Interfaces don't have vtables and we don't need to track their slot use. - // The only exception are those interfaces that provide IDynamicInterfaceCastable implementations; - // those have slots and we dispatch on them. - bool needsDependenciesForVirtualMethodImpls = !defType.IsInterface - || ((MetadataType)defType).IsDynamicInterfaceCastableImplementation(); - // If we're producing a full vtable, none of the dependencies are conditional. - needsDependenciesForVirtualMethodImpls &= !factory.VTable(defType).HasFixedSlots; - - if (needsDependenciesForVirtualMethodImpls) + if (!factory.VTable(defType).HasFixedSlots) { bool isNonInterfaceAbstractType = !defType.IsInterface && ((MetadataType)defType).IsAbstract; @@ -436,6 +428,12 @@ public sealed override IEnumerable GetConditionalSt ((System.Collections.IStructuralEquatable)defType.RuntimeInterfaces).Equals(_type.RuntimeInterfaces, EqualityComparer.Default)); + // Interfaces don't have vtables and we don't need to track their instance method slot use. + // The only exception are those interfaces that provide IDynamicInterfaceCastable implementations; + // those have slots and we dispatch on them. + bool needsDependenciesForInstanceInterfaceMethodImpls = !defType.IsInterface + || ((MetadataType)defType).IsDynamicInterfaceCastableImplementation(); + // Add conditional dependencies for interface methods the type implements. For example, if the type T implements // interface IFoo which has a method M1, add a dependency on T.M1 dependent on IFoo.M1 being called, since it's // possible for any IFoo object to actually be an instance of T. @@ -456,6 +454,9 @@ public sealed override IEnumerable GetConditionalSt bool isStaticInterfaceMethod = interfaceMethod.Signature.IsStatic; + if (!isStaticInterfaceMethod && !needsDependenciesForInstanceInterfaceMethodImpls) + continue; + MethodDesc implMethod = isStaticInterfaceMethod ? defType.ResolveInterfaceMethodToStaticVirtualMethodOnType(interfaceMethod) : defType.ResolveInterfaceMethodToVirtualMethodOnType(interfaceMethod); @@ -1143,9 +1144,9 @@ protected void OutputGenericInstantiationDetails(NodeFactory factory, ref Object { IEETypeNode typeDefNode = factory.NecessaryTypeSymbol(_type.GetTypeDefinition()); if (factory.Target.SupportsRelativePointers) - objData.EmitRelativeRelocOrIndirectionReference(typeDefNode); + objData.EmitReloc(typeDefNode, RelocType.IMAGE_REL_BASED_RELPTR32); else - objData.EmitPointerRelocOrIndirectionReference(typeDefNode); + objData.EmitPointerReloc(typeDefNode); ISymbolNode compositionNode = _type.Instantiation.Length > 1 ? factory.GenericComposition(_type.Instantiation) diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericLookupResult.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericLookupResult.cs index 9385a960e61ae0..0cf2a6bb44e4a5 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericLookupResult.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericLookupResult.cs @@ -11,13 +11,6 @@ namespace ILCompiler.DependencyAnalysis { - public enum GenericLookupResultReferenceType - { - Direct, // The slot stores a direct pointer to the target - Indirect, // The slot is an indirection cell which points to the direct pointer - ConditionalIndirect, // The slot may be a direct pointer or an indirection cell, depending on the last digit - } - // Represents a generic lookup within a canonical method body. // TODO: unify with NativeFormat.FixupSignatureKind public enum LookupResultType @@ -54,12 +47,6 @@ public enum LookupResultType UnboxingMethod, // UnboxingMethod } - public interface IGenericLookupResultTocWriter - { - void WriteData(GenericLookupResultReferenceType referenceType, LookupResultType slotType, TypeSystemEntity context); - void WriteIntegerSlot(int value); - } - public struct GenericLookupResultContext { private readonly TypeSystemEntity _canonicalOwner; @@ -157,25 +144,14 @@ public virtual void EmitDictionaryEntry(ref ObjectDataBuilder builder, NodeFacto { builder.EmitZeroPointer(); } - else if (LookupResultReferenceType(factory) == GenericLookupResultReferenceType.ConditionalIndirect) - { - builder.EmitPointerRelocOrIndirectionReference(target); - } else { builder.EmitPointerReloc(target); } } - public virtual GenericLookupResultReferenceType LookupResultReferenceType(NodeFactory factory) - { - return GenericLookupResultReferenceType.Direct; - } - public abstract NativeLayoutVertexNode TemplateDictionaryNode(NodeFactory factory); - public abstract void WriteDictionaryTocData(NodeFactory factory, IGenericLookupResultTocWriter writer); - // Call this api to get non-reloc dependencies that arise from use of a dictionary lookup public virtual IEnumerable> NonRelocDependenciesFromUsage(NodeFactory factory) { @@ -259,23 +235,6 @@ public override NativeLayoutVertexNode TemplateDictionaryNode(NodeFactory factor return factory.NativeLayout.TypeHandleDictionarySlot(_type); } - public override GenericLookupResultReferenceType LookupResultReferenceType(NodeFactory factory) - { - if (factory.CompilationModuleGroup.CanHaveReferenceThroughImportTable) - { - return GenericLookupResultReferenceType.ConditionalIndirect; - } - else - { - return GenericLookupResultReferenceType.Direct; - } - } - - public override void WriteDictionaryTocData(NodeFactory factory, IGenericLookupResultTocWriter writer) - { - writer.WriteData(LookupResultReferenceType(factory), LookupResultType.MethodTable, _type); - } - protected override int CompareToImpl(GenericLookupResult other, TypeSystemComparer comparer) { return comparer.Compare(_type, ((TypeHandleGenericLookupResult)other)._type); @@ -334,23 +293,6 @@ public override NativeLayoutVertexNode TemplateDictionaryNode(NodeFactory factor return factory.NativeLayout.UnwrapNullableTypeDictionarySlot(_type); } - public override GenericLookupResultReferenceType LookupResultReferenceType(NodeFactory factory) - { - if (factory.CompilationModuleGroup.CanHaveReferenceThroughImportTable) - { - return GenericLookupResultReferenceType.ConditionalIndirect; - } - else - { - return GenericLookupResultReferenceType.Direct; - } - } - - public override void WriteDictionaryTocData(NodeFactory factory, IGenericLookupResultTocWriter writer) - { - writer.WriteData(LookupResultReferenceType(factory), LookupResultType.UnwrapNullable, _type); - } - protected override int CompareToImpl(GenericLookupResult other, TypeSystemComparer comparer) { return comparer.Compare(_type, ((UnwrapNullableTypeHandleGenericLookupResult)other)._type); @@ -401,11 +343,6 @@ public override NativeLayoutVertexNode TemplateDictionaryNode(NodeFactory factor return factory.NativeLayout.MethodLdTokenDictionarySlot(_method); } - public override void WriteDictionaryTocData(NodeFactory factory, IGenericLookupResultTocWriter writer) - { - writer.WriteData(LookupResultReferenceType(factory), LookupResultType.MethodLdToken, _method); - } - protected override int CompareToImpl(GenericLookupResult other, TypeSystemComparer comparer) { return comparer.Compare(_method, ((MethodHandleGenericLookupResult)other)._method); @@ -456,11 +393,6 @@ public override NativeLayoutVertexNode TemplateDictionaryNode(NodeFactory factor return factory.NativeLayout.FieldLdTokenDictionarySlot(_field); } - public override void WriteDictionaryTocData(NodeFactory factory, IGenericLookupResultTocWriter writer) - { - writer.WriteData(LookupResultReferenceType(factory), LookupResultType.FieldLdToken, _field); - } - protected override int CompareToImpl(GenericLookupResult other, TypeSystemComparer comparer) { return comparer.Compare(_field, ((FieldHandleGenericLookupResult)other)._field); @@ -501,18 +433,6 @@ public override ISymbolNode GetTarget(NodeFactory factory, GenericLookupResultCo return factory.MethodGenericDictionary(instantiatedMethod); } - public override GenericLookupResultReferenceType LookupResultReferenceType(NodeFactory factory) - { - if (factory.CompilationModuleGroup.CanHaveReferenceThroughImportTable) - { - return GenericLookupResultReferenceType.ConditionalIndirect; - } - else - { - return GenericLookupResultReferenceType.Direct; - } - } - public override void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb) { sb.Append("MethodDictionary_"); @@ -527,11 +447,6 @@ public override NativeLayoutVertexNode TemplateDictionaryNode(NodeFactory factor return factory.NativeLayout.MethodDictionaryDictionarySlot(_method); } - public override void WriteDictionaryTocData(NodeFactory factory, IGenericLookupResultTocWriter writer) - { - writer.WriteData(LookupResultReferenceType(factory), LookupResultType.MethodDictionary, _method); - } - protected override int CompareToImpl(GenericLookupResult other, TypeSystemComparer comparer) { return comparer.Compare(_method, ((MethodDictionaryGenericLookupResult)other)._method); @@ -600,12 +515,6 @@ public override NativeLayoutVertexNode TemplateDictionaryNode(NodeFactory factor factory.MethodEntrypoint(canonMethod, getUnboxingStubNode)); } - public override void WriteDictionaryTocData(NodeFactory factory, IGenericLookupResultTocWriter writer) - { - LookupResultType lookupResult = LookupResultType.Method; - writer.WriteData(LookupResultReferenceType(factory), lookupResult, _method); - } - protected override int CompareToImpl(GenericLookupResult other, TypeSystemComparer comparer) { var otherEntry = (MethodEntryGenericLookupResult)other; @@ -672,11 +581,6 @@ public override NativeLayoutVertexNode TemplateDictionaryNode(NodeFactory factor return factory.NativeLayout.InterfaceCellDictionarySlot(_method); } - public override void WriteDictionaryTocData(NodeFactory factory, IGenericLookupResultTocWriter writer) - { - writer.WriteData(LookupResultReferenceType(factory), LookupResultType.InterfaceDispatchCell, _method); - } - protected override int CompareToImpl(GenericLookupResult other, TypeSystemComparer comparer) { return comparer.Compare(_method, ((VirtualDispatchCellGenericLookupResult)other)._method); @@ -728,11 +632,6 @@ public override NativeLayoutVertexNode TemplateDictionaryNode(NodeFactory factor return factory.NativeLayout.NonGcStaticDictionarySlot(_type); } - public override void WriteDictionaryTocData(NodeFactory factory, IGenericLookupResultTocWriter writer) - { - writer.WriteData(LookupResultReferenceType(factory), LookupResultType.NonGcStatic, _type); - } - protected override int CompareToImpl(GenericLookupResult other, TypeSystemComparer comparer) { return comparer.Compare(_type, ((TypeNonGCStaticBaseGenericLookupResult)other)._type); @@ -784,12 +683,6 @@ public override NativeLayoutVertexNode TemplateDictionaryNode(NodeFactory factor return factory.NativeLayout.ThreadStaticBaseIndexDictionarySlotNode(_type); } - public override void WriteDictionaryTocData(NodeFactory factory, IGenericLookupResultTocWriter writer) - { - // TODO - throw new NotImplementedException(); - } - protected override int CompareToImpl(GenericLookupResult other, TypeSystemComparer comparer) { return comparer.Compare(_type, ((TypeThreadStaticBaseIndexGenericLookupResult)other)._type); @@ -842,11 +735,6 @@ public override NativeLayoutVertexNode TemplateDictionaryNode(NodeFactory factor return factory.NativeLayout.GcStaticDictionarySlot(_type); } - public override void WriteDictionaryTocData(NodeFactory factory, IGenericLookupResultTocWriter writer) - { - writer.WriteData(LookupResultReferenceType(factory), LookupResultType.GcStatic, _type); - } - protected override int CompareToImpl(GenericLookupResult other, TypeSystemComparer comparer) { return comparer.Compare(_type, ((TypeGCStaticBaseGenericLookupResult)other)._type); @@ -897,11 +785,6 @@ public override NativeLayoutVertexNode TemplateDictionaryNode(NodeFactory factor return factory.NativeLayout.AllocateObjectDictionarySlot(_type); } - public override void WriteDictionaryTocData(NodeFactory factory, IGenericLookupResultTocWriter writer) - { - writer.WriteData(LookupResultReferenceType(factory), LookupResultType.AllocObject, _type); - } - protected override int CompareToImpl(GenericLookupResult other, TypeSystemComparer comparer) { return comparer.Compare(_type, ((ObjectAllocatorGenericLookupResult)other)._type); @@ -950,11 +833,6 @@ public override NativeLayoutVertexNode TemplateDictionaryNode(NodeFactory factor return factory.NativeLayout.DefaultConstructorDictionarySlot(_type); } - public override void WriteDictionaryTocData(NodeFactory factory, IGenericLookupResultTocWriter writer) - { - writer.WriteData(LookupResultReferenceType(factory), LookupResultType.DefaultCtor, _type); - } - protected override int CompareToImpl(GenericLookupResult other, TypeSystemComparer comparer) { return comparer.Compare(_type, ((DefaultConstructorLookupResult)other)._type); @@ -1075,12 +953,6 @@ public override NativeLayoutVertexNode TemplateDictionaryNode(NodeFactory factor return factory.NativeLayout.ConstrainedMethodUse(_constrainedMethod, _constraintType, _directCall); } - public override void WriteDictionaryTocData(NodeFactory factory, IGenericLookupResultTocWriter writer) - { - // TODO - throw new NotImplementedException(); - } - protected override int CompareToImpl(GenericLookupResult other, TypeSystemComparer comparer) { var otherResult = (ConstrainedMethodUseLookupResult)other; diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/IndirectionExtensions.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/IndirectionExtensions.cs deleted file mode 100644 index 26102d18873e3b..00000000000000 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/IndirectionExtensions.cs +++ /dev/null @@ -1,32 +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 Internal.Runtime; - -namespace ILCompiler.DependencyAnalysis -{ - internal static class IndirectionExtensions - { - /// - /// Use this api to generate a reloc to a symbol that may be an indirection cell or not as a pointer - /// - /// symbol to reference - /// value to OR in to the reloc to represent to runtime code that this pointer is an indirection. Defaults to IndirectionConstants.IndirectionCellPointer - /// Delta from symbol start for value - public static void EmitPointerRelocOrIndirectionReference(ref this ObjectDataBuilder builder, ISymbolNode symbol, int delta = 0, int indirectionBit = IndirectionConstants.IndirectionCellPointer) - { - if (symbol.RepresentsIndirectionCell) - delta |= indirectionBit; - - builder.EmitReloc(symbol, (builder.TargetPointerSize == 8) ? RelocType.IMAGE_REL_BASED_DIR64 : RelocType.IMAGE_REL_BASED_HIGHLOW, delta); - } - - public static void EmitRelativeRelocOrIndirectionReference(ref this ObjectDataBuilder builder, ISymbolNode symbol, int delta = 0, int indirectionBit = IndirectionConstants.IndirectionCellPointer) - { - if (symbol.RepresentsIndirectionCell) - delta |= indirectionBit; - - builder.EmitReloc(symbol, RelocType.IMAGE_REL_BASED_RELPTR32, delta); - } - } -} 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 38104d7ab015c9..c2ac4568c748c9 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/InterfaceDispatchMapNode.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/InterfaceDispatchMapNode.cs @@ -73,7 +73,7 @@ public static bool MightHaveInterfaceDispatchMap(TypeDesc type, NodeFactory fact if (!type.IsArray && !type.IsDefType) return false; - // Interfaces don't have a dispatch map because we dispatch them based on the + // Interfaces don't have a dispatch map for instance methods because we dispatch them based on the // dispatch map of the implementing class. // The only exception are IDynamicInterfaceCastable scenarios that dispatch // using the interface dispatch map. @@ -83,8 +83,9 @@ public static bool MightHaveInterfaceDispatchMap(TypeDesc type, NodeFactory fact // wasn't marked as [DynamicInterfaceCastableImplementation]" and "we couldn't find an // implementation". We don't want to use the custom attribute for that at runtime because // that's reflection and this should work without reflection. - if (type.IsInterface) - return ((MetadataType)type).IsDynamicInterfaceCastableImplementation(); + bool isInterface = type.IsInterface; + if (isInterface && ((MetadataType)type).IsDynamicInterfaceCastableImplementation()) + return true; DefType declType = type.GetClosestDefType(); @@ -112,6 +113,11 @@ public static bool MightHaveInterfaceDispatchMap(TypeDesc type, NodeFactory fact Debug.Assert(declMethod.IsVirtual); + // Only static methods get placed in dispatch maps of interface types (modulo + // IDynamicInterfaceCastable we already handled above). + if (isInterface && !declMethod.Signature.IsStatic) + continue; + if (interfaceOnDefinitionType != null) declMethod = factory.TypeSystemContext.GetMethodForInstantiatedType(declMethod.GetTypicalMethodDefinition(), interfaceOnDefinitionType); @@ -154,6 +160,10 @@ private void EmitDispatchMap(ref ObjectDataBuilder builder, NodeFactory factory) var staticImplementations = new List<(int InterfaceIndex, int InterfaceMethodSlot, int ImplMethodSlot, int Context)>(); var staticDefaultImplementations = new List<(int InterfaceIndex, int InterfaceMethodSlot, int ImplMethodSlot, int Context)>(); + bool isInterface = declType.IsInterface; + bool needsEntriesForInstanceInterfaceMethodImpls = !isInterface + || ((MetadataType)declType).IsDynamicInterfaceCastableImplementation(); + // Resolve all the interfaces, but only emit non-static and non-default implementations for (int interfaceIndex = 0; interfaceIndex < declTypeRuntimeInterfaces.Length; interfaceIndex++) { @@ -166,6 +176,10 @@ private void EmitDispatchMap(ref ObjectDataBuilder builder, NodeFactory factory) for (int interfaceMethodSlot = 0; interfaceMethodSlot < virtualSlots.Count; interfaceMethodSlot++) { MethodDesc declMethod = virtualSlots[interfaceMethodSlot]; + + if (!declMethod.Signature.IsStatic && !needsEntriesForInstanceInterfaceMethodImpls) + continue; + if(!interfaceType.IsTypeDefinition) declMethod = factory.TypeSystemContext.GetMethodForInstantiatedType(declMethod.GetTypicalMethodDefinition(), (InstantiatedType)interfaceDefinitionType); @@ -244,9 +258,17 @@ private void EmitDispatchMap(ref ObjectDataBuilder builder, NodeFactory factory) // For default interface methods, the generic context is acquired by indexing // into the interface list of the owning type. Debug.Assert(providingInterfaceDefinitionType != null); - int indexOfInterface = Array.IndexOf(declTypeDefinitionRuntimeInterfaces, providingInterfaceDefinitionType); - Debug.Assert(indexOfInterface >= 0); - genericContext = StaticVirtualMethodContextSource.ContextFromFirstInterface + indexOfInterface; + if (declTypeDefinition.HasSameTypeDefinition(providingInterfaceDefinitionType) && + providingInterfaceDefinitionType == declTypeDefinition.InstantiateAsOpen()) + { + genericContext = StaticVirtualMethodContextSource.ContextFromThisClass; + } + else + { + int indexOfInterface = Array.IndexOf(declTypeDefinitionRuntimeInterfaces, providingInterfaceDefinitionType); + Debug.Assert(indexOfInterface >= 0); + genericContext = StaticVirtualMethodContextSource.ContextFromFirstInterface + indexOfInterface; + } } staticDefaultImplementations.Add(( interfaceIndex, diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/SealedVTableNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/SealedVTableNode.cs index bb67f884264dd3..a8460e80d0b413 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/SealedVTableNode.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/SealedVTableNode.cs @@ -108,17 +108,21 @@ public bool BuildSealedVTableSlots(NodeFactory factory, bool relocsOnly) _sealedVTableEntries = new List(); - // Interfaces don't have any virtual slots with the exception of interfaces that provide + // Interfaces don't have any instance virtual slots with the exception of interfaces that provide // IDynamicInterfaceCastable implementation. // Normal interface don't need one because the dispatch is done at the class level. // For IDynamicInterfaceCastable, we don't have an implementing class. - if (_type.IsInterface && !((MetadataType)_type).IsDynamicInterfaceCastableImplementation()) - return true; + bool isInterface = declType.IsInterface; + bool needsEntriesForInstanceInterfaceMethodImpls = !isInterface + || ((MetadataType)declType).IsDynamicInterfaceCastableImplementation(); IReadOnlyList virtualSlots = factory.VTable(declType).Slots; for (int i = 0; i < virtualSlots.Count; i++) { + if (!virtualSlots[i].Signature.IsStatic && !needsEntriesForInstanceInterfaceMethodImpls) + continue; + MethodDesc implMethod = declType.FindVirtualFunctionTargetMethodOnObjectType(virtualSlots[i]); if (implMethod.CanMethodBeInSealedVTable()) @@ -143,6 +147,10 @@ public bool BuildSealedVTableSlots(NodeFactory factory, bool relocsOnly) for (int interfaceMethodSlot = 0; interfaceMethodSlot < virtualSlots.Count; interfaceMethodSlot++) { MethodDesc declMethod = virtualSlots[interfaceMethodSlot]; + + if (!declMethod.Signature.IsStatic && !needsEntriesForInstanceInterfaceMethodImpls) + continue; + if (!interfaceType.IsTypeDefinition) declMethod = factory.TypeSystemContext.GetMethodForInstantiatedType(declMethod.GetTypicalMethodDefinition(), (InstantiatedType)interfaceDefinitionType); diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/StackTraceMethodMappingNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/StackTraceMethodMappingNode.cs index 7845ac28a1b89d..1c5fc8658e8be2 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/StackTraceMethodMappingNode.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/StackTraceMethodMappingNode.cs @@ -121,6 +121,12 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false) command |= StackTraceDataCommand.UpdateSignature; } } + + if (entry.IsHidden) + { + command |= StackTraceDataCommand.IsStackTraceHidden; + } + objData.EmitByte(commandReservation, command); objData.EmitReloc(factory.MethodEntrypoint(entry.Method), RelocType.IMAGE_REL_BASED_RELPTR32); } diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/Target_ARM/ARMReadyToRunGenericHelperNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/Target_ARM/ARMReadyToRunGenericHelperNode.cs index 6423bf2ecaf06e..ab985e89a9b902 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/Target_ARM/ARMReadyToRunGenericHelperNode.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/Target_ARM/ARMReadyToRunGenericHelperNode.cs @@ -39,24 +39,6 @@ protected void EmitDictionaryLookup(NodeFactory factory, ref ARMEmitter encoder, // Load the generic dictionary cell encoder.EmitLDR(result, context, dictionarySlot * factory.Target.PointerSize); - - switch (lookup.LookupResultReferenceType(factory)) - { - case GenericLookupResultReferenceType.Indirect: - // Do another indirection - encoder.EmitLDR(result, result); - break; - - case GenericLookupResultReferenceType.ConditionalIndirect: - // Test result, 0x1 - // JEQ L1 - // mov result, [result-1] - // L1: - throw new NotImplementedException(); - - default: - break; - } } protected sealed override void EmitCode(NodeFactory factory, ref ARMEmitter encoder, bool relocsOnly) diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/Target_ARM64/ARM64ReadyToRunGenericHelperNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/Target_ARM64/ARM64ReadyToRunGenericHelperNode.cs index f0b69d1967a286..01f55b542daf15 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/Target_ARM64/ARM64ReadyToRunGenericHelperNode.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/Target_ARM64/ARM64ReadyToRunGenericHelperNode.cs @@ -50,24 +50,6 @@ protected void EmitDictionaryLookup(NodeFactory factory, ref ARM64Emitter encode encoder.EmitCMP(result, 0); encoder.EmitJE(GetBadSlotHelper(factory)); } - - switch (lookup.LookupResultReferenceType(factory)) - { - case GenericLookupResultReferenceType.Indirect: - // Do another indirection - encoder.EmitLDR(result, result); - break; - - case GenericLookupResultReferenceType.ConditionalIndirect: - // Test result, 0x1 - // JEQ L1 - // mov result, [result-1] - // L1: - throw new NotImplementedException(); - - default: - break; - } } protected sealed override void EmitCode(NodeFactory factory, ref ARM64Emitter encoder, bool relocsOnly) diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/Target_LoongArch64/LoongArch64ReadyToRunGenericHelperNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/Target_LoongArch64/LoongArch64ReadyToRunGenericHelperNode.cs index 493470b7ef2f36..374062c2f07a89 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/Target_LoongArch64/LoongArch64ReadyToRunGenericHelperNode.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/Target_LoongArch64/LoongArch64ReadyToRunGenericHelperNode.cs @@ -39,24 +39,6 @@ protected void EmitDictionaryLookup(NodeFactory factory, ref LoongArch64Emitter // Load the generic dictionary cell encoder.EmitLD(result, context, dictionarySlot * factory.Target.PointerSize); - - switch (lookup.LookupResultReferenceType(factory)) - { - case GenericLookupResultReferenceType.Indirect: - // Do another indirection - encoder.EmitLD(result, result, 0); - break; - - case GenericLookupResultReferenceType.ConditionalIndirect: - // andi temp, result, 0x1 - // BEQZ temp L1 - // addi.d result, result,-1 - // L1: - throw new NotImplementedException(); - - default: - break; - } } protected sealed override void EmitCode(NodeFactory factory, ref LoongArch64Emitter encoder, bool relocsOnly) diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/Target_X64/X64ReadyToRunGenericHelperNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/Target_X64/X64ReadyToRunGenericHelperNode.cs index 4c506a3b18d536..1981ed6e1c5035 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/Target_X64/X64ReadyToRunGenericHelperNode.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/Target_X64/X64ReadyToRunGenericHelperNode.cs @@ -52,25 +52,6 @@ protected void EmitDictionaryLookup(NodeFactory factory, ref X64Emitter encoder, encoder.EmitCompareToZero(result); encoder.EmitJE(GetBadSlotHelper(factory)); } - - switch (lookup.LookupResultReferenceType(factory)) - { - case GenericLookupResultReferenceType.Indirect: - // Do another indirection - loadEntry = new AddrMode(result, null, 0, 0, AddrModeSize.Int64); - encoder.EmitMOV(result, ref loadEntry); - break; - - case GenericLookupResultReferenceType.ConditionalIndirect: - // Test result, 0x1 - // JEQ L1 - // mov result, [result-1] - // L1: - throw new NotImplementedException(); - - default: - break; - } } protected sealed override void EmitCode(NodeFactory factory, ref X64Emitter encoder, bool relocsOnly) diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/GeneratingMetadataManager.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/GeneratingMetadataManager.cs index ee984bb51fc68a..1e7442fec74862 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/GeneratingMetadataManager.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/GeneratingMetadataManager.cs @@ -11,6 +11,8 @@ using ILCompiler.Metadata; using ILCompiler.DependencyAnalysis; +using Debug = System.Diagnostics.Debug; + namespace ILCompiler { /// @@ -73,17 +75,24 @@ protected void ComputeMetadata( (GetMetadataCategory(method) & MetadataCategory.RuntimeMapping) != 0) continue; - if (!_stackTraceEmissionPolicy.ShouldIncludeMethod(method)) - continue; + MethodStackTraceVisibilityFlags stackVisibility = _stackTraceEmissionPolicy.GetMethodVisibility(method); + bool isHidden = (stackVisibility & MethodStackTraceVisibilityFlags.IsHidden) != 0; - StackTraceRecordData record = CreateStackTraceRecord(transform, method); + if ((stackVisibility & MethodStackTraceVisibilityFlags.HasMetadata) != 0) + { + StackTraceRecordData record = CreateStackTraceRecord(transform, method, isHidden); - stackTraceRecords.Add(record); + stackTraceRecords.Add(record); - writer.AdditionalRootRecords.Add(record.OwningType); - writer.AdditionalRootRecords.Add(record.MethodName); - writer.AdditionalRootRecords.Add(record.MethodSignature); - writer.AdditionalRootRecords.Add(record.MethodInstantiationArgumentCollection); + writer.AdditionalRootRecords.Add(record.OwningType); + writer.AdditionalRootRecords.Add(record.MethodName); + writer.AdditionalRootRecords.Add(record.MethodSignature); + writer.AdditionalRootRecords.Add(record.MethodInstantiationArgumentCollection); + } + else if (isHidden) + { + stackTraceRecords.Add(new StackTraceRecordData(method, null, null, null, null, isHidden)); + } } var ms = new MemoryStream(); @@ -178,13 +187,22 @@ record ??= transformed.GetTransformedTypeReference(definition); // Generate stack trace metadata mapping foreach (var stackTraceRecord in stackTraceRecords) { - StackTraceMapping mapping = new StackTraceMapping( - stackTraceRecord.Method, - writer.GetRecordHandle(stackTraceRecord.OwningType), - writer.GetRecordHandle(stackTraceRecord.MethodSignature), - writer.GetRecordHandle(stackTraceRecord.MethodName), - stackTraceRecord.MethodInstantiationArgumentCollection != null ? writer.GetRecordHandle(stackTraceRecord.MethodInstantiationArgumentCollection) : 0); - stackTraceMapping.Add(mapping); + if (stackTraceRecord.OwningType != null) + { + StackTraceMapping mapping = new StackTraceMapping( + stackTraceRecord.Method, + writer.GetRecordHandle(stackTraceRecord.OwningType), + writer.GetRecordHandle(stackTraceRecord.MethodSignature), + writer.GetRecordHandle(stackTraceRecord.MethodName), + stackTraceRecord.MethodInstantiationArgumentCollection != null ? writer.GetRecordHandle(stackTraceRecord.MethodInstantiationArgumentCollection) : 0, + stackTraceRecord.IsHidden); + stackTraceMapping.Add(mapping); + } + else + { + Debug.Assert(stackTraceRecord.IsHidden); + stackTraceMapping.Add(new StackTraceMapping(stackTraceRecord.Method, 0, 0, 0, 0, stackTraceRecord.IsHidden)); + } } } diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/GenericDictionaryLookup.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/GenericDictionaryLookup.cs index 7c65a3906d9148..e995ee491be6ce 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/GenericDictionaryLookup.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/GenericDictionaryLookup.cs @@ -22,7 +22,6 @@ public struct GenericDictionaryLookup private readonly short _offset1; private readonly short _offset2; - private readonly bool _indirectLastOffset; /// /// Gets the information about the source of the generic context for shared code. @@ -106,38 +105,28 @@ public int this[int index] } } - public bool IndirectLastOffset - { - get - { - Debug.Assert(!UseHelper && !UseNull); - return _indirectLastOffset; - } - } - - private GenericDictionaryLookup(GenericContextSource contextSource, int offset1, int offset2, object helperObject, bool indirectLastOffset) + private GenericDictionaryLookup(GenericContextSource contextSource, int offset1, int offset2, object helperObject) { ContextSource = contextSource; _offset1 = checked((short)offset1); _offset2 = checked((short)offset2); _helperObject = helperObject; - _indirectLastOffset = indirectLastOffset; } - public static GenericDictionaryLookup CreateFixedLookup(GenericContextSource contextSource, int offset1, int offset2 = UseHelperOffset, bool indirectLastOffset = false) + public static GenericDictionaryLookup CreateFixedLookup(GenericContextSource contextSource, int offset1, int offset2 = UseHelperOffset) { Debug.Assert(offset1 != UseHelperOffset); - return new GenericDictionaryLookup(contextSource, offset1, offset2, null, indirectLastOffset); + return new GenericDictionaryLookup(contextSource, offset1, offset2, null); } public static GenericDictionaryLookup CreateHelperLookup(GenericContextSource contextSource, ReadyToRunHelperId helperId, object helperObject) { - return new GenericDictionaryLookup(contextSource, UseHelperOffset, checked((short)helperId), helperObject, indirectLastOffset: false); + return new GenericDictionaryLookup(contextSource, UseHelperOffset, checked((short)helperId), helperObject); } public static GenericDictionaryLookup CreateNullLookup(GenericContextSource contextSource) { - return new GenericDictionaryLookup(contextSource, UseNullOffset, 0, null, false); + return new GenericDictionaryLookup(contextSource, UseNullOffset, 0, null); } } diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/ILScanner.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/ILScanner.cs index e3749583ec895d..c05eba9f5571cc 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/ILScanner.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/ILScanner.cs @@ -411,8 +411,8 @@ private sealed class ScannedDevirtualizationManager : DevirtualizationManager private HashSet _constructedTypes = new HashSet(); private HashSet _canonConstructedTypes = new HashSet(); private HashSet _unsealedTypes = new HashSet(); - private Dictionary> _interfaceImplementators = new(); - private HashSet _disqualifiedInterfaces = new(); + private Dictionary> _implementators = new(); + private HashSet _disqualifiedTypes = new(); public ScannedDevirtualizationManager(NodeFactory factory, ImmutableArray> markedNodes) { @@ -437,8 +437,8 @@ public ScannedDevirtualizationManager(NodeFactory factory, ImmutableArray, etc. if (baseInterface.HasInstantiation) - _disqualifiedInterfaces.Add(baseInterface); + _disqualifiedTypes.Add(baseInterface); } } } @@ -513,22 +528,23 @@ public ScannedDevirtualizationManager(NodeFactory factory, ImmutableArray implList; - if (!_interfaceImplementators.TryGetValue(type, out implList)) + if (!_implementators.TryGetValue(type, out implList)) { implList = new(); - _interfaceImplementators[type] = implList; + _implementators[type] = implList; } implList.Add(implType); } @@ -604,13 +620,23 @@ protected override MethodDesc ResolveVirtualMethod(MethodDesc declMethod, DefTyp public override TypeDesc[] GetImplementingClasses(TypeDesc type) { - if (_disqualifiedInterfaces.Contains(type)) + if (_disqualifiedTypes.Contains(type)) return null; - if (type.IsInterface && _interfaceImplementators.TryGetValue(type, out HashSet implementations)) + if (_implementators.TryGetValue(type, out HashSet implementations)) { - var types = new TypeDesc[implementations.Count]; + TypeDesc[] types; int index = 0; + if (!type.IsInterface && type is not MetadataType { IsAbstract: true }) + { + types = new TypeDesc[implementations.Count + 1]; + types[index++] = type; + } + else + { + types = new TypeDesc[implementations.Count]; + } + foreach (TypeDesc implementation in implementations) { types[index++] = implementation; diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/MetadataManager.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/MetadataManager.cs index 8658068c1ebe4d..73133b10de83a7 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/MetadataManager.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/MetadataManager.cs @@ -619,7 +619,7 @@ protected abstract void ComputeMetadata(NodeFactory factory, out List> fieldMappings, out List stackTraceMapping); - protected StackTraceRecordData CreateStackTraceRecord(Metadata.MetadataTransform transform, MethodDesc method) + protected StackTraceRecordData CreateStackTraceRecord(Metadata.MetadataTransform transform, MethodDesc method, bool isHidden) { // In the metadata, we only represent the generic definition MethodDesc methodToGenerateMetadataFor = method.GetTypicalMethodDefinition(); @@ -668,7 +668,7 @@ protected StackTraceRecordData CreateStackTraceRecord(Metadata.MetadataTransform methodInst = null; } - return new StackTraceRecordData(method, owningType, signature, name, methodInst); + return new StackTraceRecordData(method, owningType, signature, name, methodInst, isHidden); } /// @@ -950,10 +950,11 @@ public readonly struct StackTraceMapping public readonly int MethodSignatureHandle; public readonly int MethodNameHandle; public readonly int MethodInstantiationArgumentCollectionHandle; + public readonly bool IsHidden; - public StackTraceMapping(MethodDesc method, int owningTypeHandle, int methodSignatureHandle, int methodNameHandle, int methodInstantiationArgumentCollectionHandle) - => (Method, OwningTypeHandle, MethodSignatureHandle, MethodNameHandle, MethodInstantiationArgumentCollectionHandle) - = (method, owningTypeHandle, methodSignatureHandle, methodNameHandle, methodInstantiationArgumentCollectionHandle); + public StackTraceMapping(MethodDesc method, int owningTypeHandle, int methodSignatureHandle, int methodNameHandle, int methodInstantiationArgumentCollectionHandle, bool isHidden) + => (Method, OwningTypeHandle, MethodSignatureHandle, MethodNameHandle, MethodInstantiationArgumentCollectionHandle, IsHidden) + = (method, owningTypeHandle, methodSignatureHandle, methodNameHandle, methodInstantiationArgumentCollectionHandle, isHidden); } public readonly struct StackTraceRecordData @@ -963,10 +964,11 @@ public readonly struct StackTraceRecordData public readonly MetadataRecord MethodSignature; public readonly MetadataRecord MethodName; public readonly MetadataRecord MethodInstantiationArgumentCollection; + public readonly bool IsHidden; - public StackTraceRecordData(MethodDesc method, MetadataRecord owningType, MetadataRecord methodSignature, MetadataRecord methodName, MetadataRecord methodInstantiationArgumentCollection) - => (Method, OwningType, MethodSignature, MethodName, MethodInstantiationArgumentCollection) - = (method, owningType, methodSignature, methodName, methodInstantiationArgumentCollection); + public StackTraceRecordData(MethodDesc method, MetadataRecord owningType, MetadataRecord methodSignature, MetadataRecord methodName, MetadataRecord methodInstantiationArgumentCollection, bool isHidden) + => (Method, OwningType, MethodSignature, MethodName, MethodInstantiationArgumentCollection, IsHidden) + = (method, owningType, methodSignature, methodName, methodInstantiationArgumentCollection, isHidden); } [Flags] diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/MultiFileCompilationModuleGroup.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/MultiFileCompilationModuleGroup.cs index c7976377f17da5..031508b7cc5f26 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/MultiFileCompilationModuleGroup.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/MultiFileCompilationModuleGroup.cs @@ -78,14 +78,6 @@ public sealed override bool ShouldReferenceThroughImportTable(TypeDesc type) { return false; } - - public override bool CanHaveReferenceThroughImportTable - { - get - { - return false; - } - } } /// diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/SingleFileCompilationModuleGroup.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/SingleFileCompilationModuleGroup.cs index 09e08d12ab3b60..b47ec12f743190 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/SingleFileCompilationModuleGroup.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/SingleFileCompilationModuleGroup.cs @@ -63,14 +63,6 @@ public override bool ShouldReferenceThroughImportTable(TypeDesc type) return false; } - public override bool CanHaveReferenceThroughImportTable - { - get - { - return false; - } - } - public override bool AllowInstanceMethodOptimization(MethodDesc method) { return true; diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/SingleMethodCompilationModuleGroup.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/SingleMethodCompilationModuleGroup.cs index f2e08919821083..38f5fa90b74ab6 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/SingleMethodCompilationModuleGroup.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/SingleMethodCompilationModuleGroup.cs @@ -74,14 +74,6 @@ public override bool ShouldReferenceThroughImportTable(TypeDesc type) return false; } - public override bool CanHaveReferenceThroughImportTable - { - get - { - return false; - } - } - public override bool AllowInstanceMethodOptimization(MethodDesc method) { return false; diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/StackTraceEmissionPolicy.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/StackTraceEmissionPolicy.cs index 08c891f95d5352..ea04f63db0baf8 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/StackTraceEmissionPolicy.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/StackTraceEmissionPolicy.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; using Internal.TypeSystem; namespace ILCompiler @@ -10,14 +11,14 @@ namespace ILCompiler /// public abstract class StackTraceEmissionPolicy { - public abstract bool ShouldIncludeMethod(MethodDesc method); + public abstract MethodStackTraceVisibilityFlags GetMethodVisibility(MethodDesc method); } public class NoStackTraceEmissionPolicy : StackTraceEmissionPolicy { - public override bool ShouldIncludeMethod(MethodDesc method) + public override MethodStackTraceVisibilityFlags GetMethodVisibility(MethodDesc method) { - return false; + return default; } } @@ -27,9 +28,26 @@ public override bool ShouldIncludeMethod(MethodDesc method) /// public class EcmaMethodStackTraceEmissionPolicy : StackTraceEmissionPolicy { - public override bool ShouldIncludeMethod(MethodDesc method) + public override MethodStackTraceVisibilityFlags GetMethodVisibility(MethodDesc method) { - return method.GetTypicalMethodDefinition() is Internal.TypeSystem.Ecma.EcmaMethod; + MethodStackTraceVisibilityFlags result = 0; + + if (method.HasCustomAttribute("System.Diagnostics", "StackTraceHiddenAttribute") + || (method.OwningType is MetadataType mdType && mdType.HasCustomAttribute("System.Diagnostics", "StackTraceHiddenAttribute"))) + { + result |= MethodStackTraceVisibilityFlags.IsHidden; + } + + return method.GetTypicalMethodDefinition() is Internal.TypeSystem.Ecma.EcmaMethod + ? result | MethodStackTraceVisibilityFlags.HasMetadata + : result; } } + + [Flags] + public enum MethodStackTraceVisibilityFlags + { + HasMetadata = 0x1, + IsHidden = 0x2, + } } diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/UsageBasedMetadataManager.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/UsageBasedMetadataManager.cs index e680bf80f2dfa7..0d4a855e736ed0 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/UsageBasedMetadataManager.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/UsageBasedMetadataManager.cs @@ -1093,7 +1093,7 @@ private void ProcessAttribute(TypeDesc type, XPathNavigator nav) string internalValue = GetAttribute(nav, "internal"); if (!string.IsNullOrEmpty(internalValue)) { - if (!IsRemoveAttributeInstances(internalValue) || !nav.IsEmptyElement) + if (!IsRemoveAttributeInstances(internalValue)) { LogWarning(nav, DiagnosticId.UnrecognizedInternalAttribute, internalValue); } diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/VirtualMethodCallHelper.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/VirtualMethodCallHelper.cs index a9de1fce5e3a52..ec398d37433966 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/VirtualMethodCallHelper.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/VirtualMethodCallHelper.cs @@ -93,9 +93,8 @@ private static int GetNumberOfSlotsInCurrentType(NodeFactory factory, TypeDesc i { if (implType.IsInterface) { - // We normally don't need to ask about vtable slots of interfaces. It's not wrong to ask - // that question, but we currently only ask it for IDynamicInterfaceCastable implementations. - Debug.Assert(((MetadataType)implType).IsDynamicInterfaceCastableImplementation()); + // Interface types don't have physically assigned virtual slots, so the number of slots + // is always 0. They may have sealed slots. return (implType.HasGenericDictionarySlot() && countDictionarySlots) ? 1 : 0; } diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/IL/Stubs/StartupCode/StartupCodeMainMethod.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/IL/Stubs/StartupCode/StartupCodeMainMethod.cs index 2b88c59e1c0cc3..c86852973e527d 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/IL/Stubs/StartupCode/StartupCodeMainMethod.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/IL/Stubs/StartupCode/StartupCodeMainMethod.cs @@ -193,6 +193,9 @@ public override bool IsUnmanagedCallersOnly } } + public override bool HasCustomAttribute(string attributeNamespace, string attributeName) + => attributeNamespace == "System.Diagnostics" && attributeName == "StackTraceHiddenAttribute"; + /// /// Wraps the main method in a layer of indirection. This is necessary to protect the startup code /// infrastructure from situations when the owning type of the main method cannot be loaded, and codegen @@ -271,6 +274,9 @@ public override MethodIL EmitIL() return emit.Link(this); } + + public override bool HasCustomAttribute(string attributeNamespace, string attributeName) + => attributeNamespace == "System.Diagnostics" && attributeName == "StackTraceHiddenAttribute"; } } } diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/ILCompiler.Compiler.csproj b/src/coreclr/tools/aot/ILCompiler.Compiler/ILCompiler.Compiler.csproj index 67b81c5aa0b5c0..b67f3fa966e0d1 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/ILCompiler.Compiler.csproj +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/ILCompiler.Compiler.csproj @@ -417,7 +417,6 @@ - diff --git a/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ILCompiler.Reflection.ReadyToRun.csproj b/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ILCompiler.Reflection.ReadyToRun.csproj index 0b17c2a6313d96..032944c1033506 100644 --- a/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ILCompiler.Reflection.ReadyToRun.csproj +++ b/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ILCompiler.Reflection.ReadyToRun.csproj @@ -16,6 +16,11 @@ AnyCPU;x64 AnyCPU false + + false diff --git a/src/coreclr/tools/aot/ILCompiler.RyuJit/JitInterface/CorInfoImpl.RyuJit.cs b/src/coreclr/tools/aot/ILCompiler.RyuJit/JitInterface/CorInfoImpl.RyuJit.cs index 128f72f8818e4b..b7505162e07125 100644 --- a/src/coreclr/tools/aot/ILCompiler.RyuJit/JitInterface/CorInfoImpl.RyuJit.cs +++ b/src/coreclr/tools/aot/ILCompiler.RyuJit/JitInterface/CorInfoImpl.RyuJit.cs @@ -275,17 +275,11 @@ private void ComputeLookup(ref CORINFO_RESOLVED_TOKEN pResolvedToken, object ent lookup.runtimeLookup.helper = CorInfoHelpFunc.CORINFO_HELP_RUNTIMEHANDLE_CLASS; } - lookup.runtimeLookup.indirections = (ushort)(genericLookup.NumberOfIndirections + (genericLookup.IndirectLastOffset ? 1 : 0)); + lookup.runtimeLookup.indirections = (ushort)genericLookup.NumberOfIndirections; lookup.runtimeLookup.offset0 = (IntPtr)genericLookup[0]; if (genericLookup.NumberOfIndirections > 1) { lookup.runtimeLookup.offset1 = (IntPtr)genericLookup[1]; - if (genericLookup.IndirectLastOffset) - lookup.runtimeLookup.offset2 = IntPtr.Zero; - } - else if (genericLookup.IndirectLastOffset) - { - lookup.runtimeLookup.offset1 = IntPtr.Zero; } lookup.runtimeLookup.sizeOffset = CORINFO.CORINFO_NO_SIZE_CHECK; lookup.runtimeLookup.testForNull = false; @@ -1064,11 +1058,6 @@ private CorInfoHelpFunc getCastingHelper(ref CORINFO_RESOLVED_TOKEN pResolvedTok else if (type.IsDefType) { helper = CorInfoHelpFunc.CORINFO_HELP_ISINSTANCEOFCLASS; -#if !SUPPORT_JIT - // When this assert is hit, we'll have to do something with the class checks in RyuJIT - // Frozen strings might end up failing inlined checks generated by RyuJIT for sealed classes. - Debug.Assert(!_compilation.NodeFactory.CompilationModuleGroup.CanHaveReferenceThroughImportTable); -#endif } else { @@ -2207,12 +2196,6 @@ private int getExactClasses(CORINFO_CLASS_STRUCT_* baseType, int maxExactClasses return 1; } - if (!type.IsInterface) - { - // TODO: handle classes - return 0; - } - TypeDesc[] implClasses = _compilation.GetImplementingClasses(type); if (implClasses == null || implClasses.Length > maxExactClasses) { diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/Extensions/CecilExtensions.cs b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/Extensions/CecilExtensions.cs similarity index 100% rename from src/coreclr/tools/aot/Mono.Linker.Tests/Extensions/CecilExtensions.cs rename to src/coreclr/tools/aot/ILCompiler.Trimming.Tests/Extensions/CecilExtensions.cs diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/Extensions/NiceIO.cs b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/Extensions/NiceIO.cs similarity index 100% rename from src/coreclr/tools/aot/Mono.Linker.Tests/Extensions/NiceIO.cs rename to src/coreclr/tools/aot/ILCompiler.Trimming.Tests/Extensions/NiceIO.cs diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/Mono.Linker.Tests.csproj b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/ILCompiler.Trimming.Tests.csproj similarity index 80% rename from src/coreclr/tools/aot/Mono.Linker.Tests/Mono.Linker.Tests.csproj rename to src/coreclr/tools/aot/ILCompiler.Trimming.Tests/ILCompiler.Trimming.Tests.csproj index f8e77764b9c254..a8d2f877e69aa9 100644 --- a/src/coreclr/tools/aot/Mono.Linker.Tests/Mono.Linker.Tests.csproj +++ b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/ILCompiler.Trimming.Tests.csproj @@ -19,10 +19,10 @@ - + - - + + @@ -45,8 +45,10 @@ $(ArtifactsBinDir) - $(RepoRoot)/src/tools/illink/test/ + $(ToolsProjectRoot)illink/test/ + + diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCases/TestCase.cs b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCases/TestCase.cs similarity index 100% rename from src/coreclr/tools/aot/Mono.Linker.Tests/TestCases/TestCase.cs rename to src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCases/TestCase.cs diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCases/TestDatabase.cs b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCases/TestDatabase.cs similarity index 96% rename from src/coreclr/tools/aot/Mono.Linker.Tests/TestCases/TestDatabase.cs rename to src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCases/TestDatabase.cs index 07147b1110323d..31cd4455663e2e 100644 --- a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCases/TestDatabase.cs +++ b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCases/TestDatabase.cs @@ -29,6 +29,11 @@ public static IEnumerable Generics () return TestNamesBySuiteName (); } + public static IEnumerable InlineArrays () + { + return TestNamesBySuiteName(); + } + public static IEnumerable LinkXml() { return TestNamesBySuiteName(); diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCases/TestSuites.cs b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCases/TestSuites.cs similarity index 94% rename from src/coreclr/tools/aot/Mono.Linker.Tests/TestCases/TestSuites.cs rename to src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCases/TestSuites.cs index 883582cc5d9df2..744fb23e416f98 100644 --- a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCases/TestSuites.cs +++ b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCases/TestSuites.cs @@ -30,6 +30,13 @@ public void Generics (string t) Run (t); } + [Theory] + [MemberData(nameof(TestDatabase.InlineArrays), MemberType = typeof(TestDatabase))] + public void InlineArrays(string t) + { + Run(t); + } + [Theory] [MemberData (nameof (TestDatabase.LinkXml), MemberType = typeof (TestDatabase))] public void LinkXml (string t) diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/AssemblyChecker.cs b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/AssemblyChecker.cs similarity index 98% rename from src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/AssemblyChecker.cs rename to src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/AssemblyChecker.cs index 7280796f5abc4e..83d7b1a7987190 100644 --- a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/AssemblyChecker.cs +++ b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/AssemblyChecker.cs @@ -19,7 +19,7 @@ namespace Mono.Linker.Tests.TestCasesRunner { - public class AssemblyChecker + partial class AssemblyChecker { class LinkedEntity { @@ -40,7 +40,7 @@ class LinkedMethodEntity : LinkedEntity private readonly BaseAssemblyResolver originalsResolver; private readonly ReaderParameters originalReaderParameters; private readonly AssemblyDefinition originalAssembly; - private readonly ILCompilerTestCaseResult testResult; + private readonly TrimmedTestCaseResult testResult; private readonly Dictionary linkedMembers; private readonly HashSet verifiedGeneratedFields = new HashSet (); @@ -67,7 +67,7 @@ public AssemblyChecker ( BaseAssemblyResolver originalsResolver, ReaderParameters originalReaderParameters, AssemblyDefinition original, - ILCompilerTestCaseResult testResult) + TrimmedTestCaseResult testResult) { this.originalsResolver = originalsResolver; this.originalReaderParameters = originalReaderParameters; @@ -138,34 +138,6 @@ public void Verify () string.Join ("\n ", linkedMembers.Values.Select (e => e.Entity.GetDisplayName ()))); } - static bool IsCompilerGeneratedMemberName (string memberName) - { - return memberName.Length > 0 && memberName[0] == '<'; - } - - static bool IsCompilerGeneratedMember (IMemberDefinition member) - { - // Top-level methods are generated with names like - // <
$>g__MethodName|0_1(). While the names are generated by - // the compiler, don't consider the method to be compiler-generated - // for the purpose of Kept validation, because they are attributable - // in source like any other method. - if (member is MethodDefinition method && method.Name.Contains ("
$")) - return false; - - if (IsCompilerGeneratedMemberName (member.Name)) - return true; - - if (member.DeclaringType != null) - return IsCompilerGeneratedMember (member.DeclaringType); - - return false; - } - - static bool IsDelegateBackingFieldsType (TypeDefinition type) => type.Name == "<>O"; - - static bool IsPrivateImplementationDetailsType (TypeDefinition type) => string.IsNullOrEmpty (type.Namespace) && type.Name.StartsWith (""); - private void PopulateLinkedMembers () { foreach (TypeDesc type in testResult.TrimmingResults.AllEETypes) { diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/AssemblyQualifiedToken.cs b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/AssemblyQualifiedToken.cs similarity index 100% rename from src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/AssemblyQualifiedToken.cs rename to src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/AssemblyQualifiedToken.cs diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/ILCompilerOptions.cs b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/ILCompilerOptions.cs similarity index 100% rename from src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/ILCompilerOptions.cs rename to src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/ILCompilerOptions.cs diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/ILCompilerTestPInvokePolicy.cs b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/ILCompilerTestPInvokePolicy.cs similarity index 100% rename from src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/ILCompilerTestPInvokePolicy.cs rename to src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/ILCompilerTestPInvokePolicy.cs diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/ILInputCompiler.cs b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/ILInputCompiler.cs similarity index 100% rename from src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/ILInputCompiler.cs rename to src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/ILInputCompiler.cs diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/MemberAssertionsCollector.cs b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/MemberAssertionsCollector.cs similarity index 97% rename from src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/MemberAssertionsCollector.cs rename to src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/MemberAssertionsCollector.cs index 4e59125d7a50bb..6b7958c92c4d89 100644 --- a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/MemberAssertionsCollector.cs +++ b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/MemberAssertionsCollector.cs @@ -37,7 +37,7 @@ public MemberAssertionsCollector(Type type) private CompilerTypeSystemContext CreateTypeSystemContext () { - ILCompilerDriver.ComputeDefaultOptions (out var targetOS, out var targetArchitecture); + TrimmingDriver.ComputeDefaultOptions (out var targetOS, out var targetArchitecture); var targetDetails = new TargetDetails (targetArchitecture, targetOS, TargetAbi.NativeAot); CompilerTypeSystemContext typeSystemContext = new CompilerTypeSystemContext (targetDetails, SharedGenericsMode.CanonicalReferenceTypes, DelegateFeature.All); @@ -49,7 +49,7 @@ private CompilerTypeSystemContext CreateTypeSystemContext () references.Add (assembly.GetName ().Name!, assembly.Location!); } typeSystemContext.ReferenceFilePaths = references; - typeSystemContext.SetSystemModule (typeSystemContext.GetModuleForSimpleName (ILCompilerDriver.DefaultSystemModule)); + typeSystemContext.SetSystemModule (typeSystemContext.GetModuleForSimpleName (TrimmingDriver.DefaultSystemModule)); return typeSystemContext; } diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/NameUtils.cs b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/NameUtils.cs similarity index 100% rename from src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/NameUtils.cs rename to src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/NameUtils.cs diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/ResultChecker.cs b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/ResultChecker.cs similarity index 96% rename from src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/ResultChecker.cs rename to src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/ResultChecker.cs index a39ebe53305a44..ab4a0b94d76f6e 100644 --- a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/ResultChecker.cs +++ b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/ResultChecker.cs @@ -45,7 +45,7 @@ public ResultChecker (BaseAssemblyResolver originalsResolver, _linkedReaderParameters = linkedReaderParameters; } - public virtual void Check (ILCompilerTestCaseResult testResult) + public virtual void Check (TrimmedTestCaseResult testResult) { InitializeResolvers (testResult); @@ -85,12 +85,12 @@ bool HasActiveSkipKeptItemsValidationAttribute(ICustomAttributeProvider provider } } - protected virtual AssemblyChecker CreateAssemblyChecker (AssemblyDefinition original, ILCompilerTestCaseResult testResult) + protected virtual AssemblyChecker CreateAssemblyChecker (AssemblyDefinition original, TrimmedTestCaseResult testResult) { return new AssemblyChecker (_originalsResolver, _originalReaderParameters, original, testResult); } - private void InitializeResolvers (ILCompilerTestCaseResult linkedResult) + private void InitializeResolvers (TrimmedTestCaseResult linkedResult) { _originalsResolver.AddSearchDirectory (linkedResult.ExpectationsAssemblyPath.Parent.ToString ()); } @@ -103,7 +103,7 @@ protected AssemblyDefinition ResolveOriginalsAssembly (string assemblyName) return _originalsResolver.Resolve (new AssemblyNameReference (cleanAssemblyName, null), _originalReaderParameters); } - private static void PerformOutputAssemblyChecks (AssemblyDefinition original, ILCompilerTestCaseResult testResult) + private static void PerformOutputAssemblyChecks (AssemblyDefinition original, TrimmedTestCaseResult testResult) { var assembliesToCheck = original.MainModule.Types.SelectMany (t => t.CustomAttributes).Where (ExpectationsProvider.IsAssemblyAssertion); var actionAssemblies = new HashSet (); @@ -147,16 +147,16 @@ private static void PerformOutputAssemblyChecks (AssemblyDefinition original, IL } #pragma warning disable IDE0060 // Remove unused parameter - private static void PerformOutputSymbolChecks (AssemblyDefinition original, ILCompilerTestCaseResult testResult) + private static void PerformOutputSymbolChecks (AssemblyDefinition original, TrimmedTestCaseResult testResult) #pragma warning restore IDE0060 // Remove unused parameter { // While NativeAOT has symbols, verifying them is rather difficult } - protected virtual void AdditionalChecking (ILCompilerTestCaseResult linkResult, AssemblyDefinition original) + protected virtual void AdditionalChecking (TrimmedTestCaseResult linkResult, AssemblyDefinition original) { bool checkRemainingErrors = !HasAttribute (linkResult.TestCase.FindTypeDefinition (original), nameof (SkipRemainingErrorsValidationAttribute)); - VerifyLoggedMessages (original, linkResult.LogWriter, checkRemainingErrors); + VerifyLoggedMessages (original, linkResult.Logger, checkRemainingErrors); } private static bool IsProducedByNativeAOT (CustomAttribute attr) @@ -180,12 +180,12 @@ private static IEnumerable GetAttributeProviders (Asse yield return assembly; } - protected virtual void InitialChecking (ILCompilerTestCaseResult testResult, AssemblyDefinition original) + protected virtual void InitialChecking (TrimmedTestCaseResult testResult, AssemblyDefinition original) { // PE verifier is done here in ILLinker, but that's not possible with NativeAOT } - private void VerifyLoggedMessages (AssemblyDefinition original, TestLogWriter logger, bool checkRemainingErrors) + private void VerifyLoggedMessages (AssemblyDefinition original, TrimmingTestLogger logger, bool checkRemainingErrors) { List loggedMessages = logger.GetLoggedMessages (); List<(ICustomAttributeProvider, CustomAttribute)> expectedNoWarningsAttributes = new (); diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/TestCaseCollector.cs b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TestCaseCollector.cs similarity index 100% rename from src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/TestCaseCollector.cs rename to src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TestCaseCollector.cs diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/TestCaseCompilationMetadataProvider.cs b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TestCaseCompilationMetadataProvider.cs similarity index 97% rename from src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/TestCaseCompilationMetadataProvider.cs rename to src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TestCaseCompilationMetadataProvider.cs index e97a51a5c2c737..4ff90c22300d4c 100644 --- a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/TestCaseCompilationMetadataProvider.cs +++ b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TestCaseCompilationMetadataProvider.cs @@ -129,9 +129,11 @@ public virtual IEnumerable GetCommonReferencedAssemblies (NPath workingD yield return Path.Combine (referenceDir, "mscorlib.dll"); yield return Path.Combine (referenceDir, "System.Collections.dll"); + yield return Path.Combine (referenceDir, "System.Collections.Immutable.dll"); yield return Path.Combine (referenceDir, "System.ComponentModel.TypeConverter.dll"); yield return Path.Combine (referenceDir, "System.Console.dll"); yield return Path.Combine (referenceDir, "System.Linq.Expressions.dll"); + yield return Path.Combine (referenceDir, "System.Memory.dll"); yield return Path.Combine (referenceDir, "System.ObjectModel.dll"); yield return Path.Combine (referenceDir, "System.Runtime.dll"); yield return Path.Combine (referenceDir, "System.Runtime.Extensions.dll"); @@ -208,7 +210,7 @@ private SetupCompileInfo CreateSetupCompileAssemblyInfo (CustomAttribute attribu References = ((CustomAttributeArgument[]) ctorArguments[2].Value)?.Select (arg => arg.Value.ToString ()).ToArray (), Defines = ((CustomAttributeArgument[]) ctorArguments[3].Value)?.Select (arg => arg.Value.ToString ()).ToArray (), Resources = ResourcesForAttributeArgument (ctorArguments[4]), - AdditionalArguments = (string) ctorArguments[5].Value, + AdditionalArguments = ((CustomAttributeArgument[]) ctorArguments[5].Value)?.Select (arg => arg.Value.ToString ()).ToArray (), CompilerToUse = (string) ctorArguments[6].Value, AddAsReference = ctorArguments.Count >= 8 ? (bool) ctorArguments[7].Value : true, RemoveFromLinkerInput = ctorArguments.Count >= 9 ? (bool) ctorArguments[8].Value : false, diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/TestCaseCompiler.cs b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TestCaseCompiler.cs similarity index 99% rename from src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/TestCaseCompiler.cs rename to src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TestCaseCompiler.cs index 17a68c58fd5f47..acc353524a3d1d 100644 --- a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/TestCaseCompiler.cs +++ b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TestCaseCompiler.cs @@ -94,7 +94,7 @@ protected virtual CompilerOptions CreateOptionsForSupportingAssembly (SetupCompi { var allDefines = defines.Concat (setupCompileInfo.Defines ?? Array.Empty ()).ToArray (); var allReferences = references.Concat (setupCompileInfo.References?.Select (p => MakeSupportingAssemblyReferencePathAbsolute (outputDirectory, p)) ?? Array.Empty ()).ToArray (); - string[]? additionalArguments = string.IsNullOrEmpty (setupCompileInfo.AdditionalArguments) ? null : new[] { setupCompileInfo.AdditionalArguments }; + string[]? additionalArguments = setupCompileInfo.AdditionalArguments; return new CompilerOptions { OutputPath = outputDirectory.Combine (setupCompileInfo.OutputName), SourceFiles = sourceFiles, diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/TestCaseLinkerOptions.cs b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TestCaseLinkerOptions.cs similarity index 100% rename from src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/TestCaseLinkerOptions.cs rename to src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TestCaseLinkerOptions.cs diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/TestCaseMetadataProvider.cs b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TestCaseMetadataProvider.cs similarity index 96% rename from src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/TestCaseMetadataProvider.cs rename to src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TestCaseMetadataProvider.cs index 6aef3b5ba767d8..fb3e0610b88416 100644 --- a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/TestCaseMetadataProvider.cs +++ b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TestCaseMetadataProvider.cs @@ -115,6 +115,13 @@ public virtual IEnumerable GetLinkAttributesFiles () .Select (GetSourceAndRelativeDestinationValue); } + public IEnumerable GetDeleteBefore () + { + return _testCaseTypeDefinition.CustomAttributes + .Where (attr => attr.AttributeType.Name == nameof (DeleteBeforeAttribute)) + .Select (attr => (string)attr.ConstructorArguments[0].Value); + } + public virtual IEnumerable GetExtraLinkerReferences () { var netcoreappDir = Path.GetDirectoryName (typeof (object).Assembly.Location)!; diff --git a/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TestCaseSandbox.cs b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TestCaseSandbox.cs new file mode 100644 index 00000000000000..2b70191db53078 --- /dev/null +++ b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TestCaseSandbox.cs @@ -0,0 +1,26 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +using System.Collections.Generic; +using System.IO; +using Mono.Linker.Tests.Cases.Expectations.Assertions; +using Mono.Linker.Tests.Extensions; +using Mono.Linker.Tests.TestCases; + +namespace Mono.Linker.Tests.TestCasesRunner +{ + partial class TestCaseSandbox + { + private const string _linkerAssemblyPath = "";//typeof (Trimmer).Assembly.Location; + + private static partial NPath GetArtifactsTestPath () + { + // Converts paths like /root-folder/runtime/artifacts/bin/Mono.Linker.Tests/x64/Debug/Mono.Linker.Tests.dll + // to /root-folder/runtime/artifacts/bin/ILLink.testcases/ + string artifacts = (string) AppContext.GetData ("Mono.Linker.Tests.ArtifactsDir")!; + string tests = Path.Combine (artifacts, "ILLink.testcases"); + return new NPath (tests); + } + } +} diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/TestInfraMultiFileCompilationModuleGroup.cs b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TestInfraMultiFileCompilationModuleGroup.cs similarity index 100% rename from src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/TestInfraMultiFileCompilationModuleGroup.cs rename to src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TestInfraMultiFileCompilationModuleGroup.cs diff --git a/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TestRunner.cs b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TestRunner.cs new file mode 100644 index 00000000000000..39d8747f1116d7 --- /dev/null +++ b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TestRunner.cs @@ -0,0 +1,55 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Mono.Cecil; +using Mono.Linker.Tests.Extensions; +using Mono.Linker.Tests.TestCases; +using Xunit.Sdk; + +namespace Mono.Linker.Tests.TestCasesRunner +{ + public partial class TestRunner + { + partial void IgnoreTest (string reason) + { + throw new IgnoreTestException (reason); + } + + static IEnumerable additionalDefines = new string[] { "NATIVEAOT" }; + private partial IEnumerable? GetAdditionalDefines () => additionalDefines; + + private static T GetResultOfTaskThatMakesAssertions (Task task) + { + try { + return task.Result; + } catch (AggregateException e) { + if (e.InnerException != null) { + if (e.InnerException is XunitException) + throw e.InnerException; + } + + throw; + } + } + + protected partial TrimmingCustomizations? CustomizeTrimming (TrimmingDriver linker, TestCaseMetadataProvider metadataProvider) + => null; + + static partial void AddOutputDirectory (TestCaseSandbox sandbox, ManagedCompilationResult compilationResult, TrimmingArgumentBuilder builder) + { + builder.AddOutputDirectory (sandbox.OutputDirectory.Combine (compilationResult.InputAssemblyPath.FileNameWithoutExtension + ".obj")); + } + + static partial void AddInputReference (NPath inputReference, TrimmingArgumentBuilder builder) + { + // It's important to add all assemblies as "link" assemblies since the default configuration + // is to run the compiler in multi-file mode which will not process anything which is just in the reference set. + builder.AddLinkAssembly (inputReference); + builder.AddReference (inputReference); + } + } +} diff --git a/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TrimmedTestCaseResult.cs b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TrimmedTestCaseResult.cs new file mode 100644 index 00000000000000..ed54092b7005b9 --- /dev/null +++ b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TrimmedTestCaseResult.cs @@ -0,0 +1,38 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using ILCompiler; +using Mono.Linker.Tests.Extensions; +using Mono.Linker.Tests.TestCases; + +namespace Mono.Linker.Tests.TestCasesRunner +{ + partial class TrimmedTestCaseResult + { + public readonly ILScanResults TrimmingResults; + + public TrimmedTestCaseResult ( + TestCase testCase, + NPath inputAssemblyPath, + NPath outputAssemblyPath, + NPath expectationsAssemblyPath, + TestCaseSandbox sandbox, + TestCaseMetadataProvider metadataProvider, + ManagedCompilationResult compilationResult, + TrimmingTestLogger logger, + TrimmingCustomizations? customizations, + ILScanResults trimmingResults) + { + // Ignore outputAssemblyPath because ILCompiler trimming tests don't write output assemblies. + // Ignore TrimmingCustomizatoins which are not used by ILCompiler trimming tests. + TestCase = testCase; + InputAssemblyPath = inputAssemblyPath; + ExpectationsAssemblyPath = expectationsAssemblyPath; + Sandbox = sandbox; + MetadataProvider = metadataProvider; + CompilationResult = compilationResult; + Logger = logger; + TrimmingResults = trimmingResults; + } + } +} diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/ILCompilerOptionsBuilder.cs b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TrimmingArgumentBuilder.cs similarity index 94% rename from src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/ILCompilerOptionsBuilder.cs rename to src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TrimmingArgumentBuilder.cs index 196fd5fec3a2a0..b32391dad4b178 100644 --- a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/ILCompilerOptionsBuilder.cs +++ b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TrimmingArgumentBuilder.cs @@ -8,16 +8,16 @@ namespace Mono.Linker.Tests.TestCasesRunner { - public class ILCompilerOptionsBuilder + public class TrimmingArgumentBuilder { - //public TrimmerOptions Options { get; } = new(); private readonly TestCaseMetadataProvider _metadataProvider; - public readonly ILCompilerOptions Options; + private ILCompilerOptions? _options; + private ILCompilerOptions Options => _options ?? throw new InvalidOperationException ("Invalid state: Build() was already called"); - public ILCompilerOptionsBuilder (TestCaseMetadataProvider metadataProvider) + public TrimmingArgumentBuilder (TestCaseMetadataProvider metadataProvider) { - Options = new ILCompilerOptions (); + _options = new ILCompilerOptions (); _metadataProvider = metadataProvider; string runtimeBinDir = (string) AppContext.GetData ("Mono.Linker.Tests.RuntimeBinDirectory")!; @@ -260,5 +260,12 @@ private static void AppendExpandedPaths (Dictionary dictionary, throw new Exception ("No files matching " + pattern); } } + + public ILCompilerOptions Build () + { + var options = Options; + _options = null; + return options; + } } } diff --git a/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TrimmingCustomizations.cs b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TrimmingCustomizations.cs new file mode 100644 index 00000000000000..f6ef0009a701f2 --- /dev/null +++ b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TrimmingCustomizations.cs @@ -0,0 +1,11 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; + +namespace Mono.Linker.Tests.TestCasesRunner +{ + public class TrimmingCustomizations + { + } +} diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/ILCompilerDriver.cs b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TrimmingDriver.cs similarity index 98% rename from src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/ILCompilerDriver.cs rename to src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TrimmingDriver.cs index 275d035c66843e..3c04578d393c90 100644 --- a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/ILCompilerDriver.cs +++ b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TrimmingDriver.cs @@ -16,11 +16,11 @@ namespace Mono.Linker.Tests.TestCasesRunner { - public class ILCompilerDriver + public class TrimmingDriver { internal const string DefaultSystemModule = "System.Private.CoreLib"; - public ILScanResults Trim (ILCompilerOptions options, ILogWriter logWriter) + public ILScanResults Trim (ILCompilerOptions options, TrimmingCustomizations? customizations, ILogWriter logWriter) { ComputeDefaultOptions (out var targetOS, out var targetArchitecture); var targetDetails = new TargetDetails (targetArchitecture, targetOS, TargetAbi.NativeAot); diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/TestLogWriter.cs b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TrimmingTestLogger.cs similarity index 93% rename from src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/TestLogWriter.cs rename to src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TrimmingTestLogger.cs index 0ef6c8fb995a7f..9e1bec7a057093 100644 --- a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/TestLogWriter.cs +++ b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TrimmingTestLogger.cs @@ -8,14 +8,14 @@ namespace Mono.Linker.Tests.TestCasesRunner { - public class TestLogWriter : ILogWriter + public class TrimmingTestLogger : ILogWriter { private readonly StringWriter _infoStringWriter; private readonly TextWriter _infoWriter; private readonly List _messageContainers; - public TestLogWriter () + public TrimmingTestLogger () { _infoStringWriter = new StringWriter (); _infoWriter = TextWriter.Synchronized (_infoStringWriter); diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/Tests/DocumentationSignatureParserTests.cs b/src/coreclr/tools/aot/ILCompiler.Trimming.Tests/Tests/DocumentationSignatureParserTests.cs similarity index 100% rename from src/coreclr/tools/aot/Mono.Linker.Tests/Tests/DocumentationSignatureParserTests.cs rename to src/coreclr/tools/aot/ILCompiler.Trimming.Tests/Tests/DocumentationSignatureParserTests.cs diff --git a/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/CastingTests.cs b/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/CastingTests.cs index fdf12612f40037..e4f67f970768f2 100644 --- a/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/CastingTests.cs +++ b/src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/CastingTests.cs @@ -95,18 +95,36 @@ public void TestSameSizeArrayTypeCasting() public void TestArrayInterfaceCasting() { TypeDesc intType = _context.GetWellKnownType(WellKnownType.Int32); + TypeDesc byteType = _context.GetWellKnownType(WellKnownType.Byte); + TypeDesc objectType = _context.GetWellKnownType(WellKnownType.Object); + TypeDesc stringType = _context.GetWellKnownType(WellKnownType.String); + TypeDesc intBasedEnumType = _testModule.GetType("Casting", "IntBasedEnum"); MetadataType iListType = _context.SystemModule.GetType("System.Collections", "IList"); MetadataType iListOfTType = _context.SystemModule.GetType("System.Collections.Generic", "IList`1"); InstantiatedType iListOfIntType = iListOfTType.MakeInstantiatedType(intType); + InstantiatedType iListOfObjectType = iListOfTType.MakeInstantiatedType(objectType); + InstantiatedType iListOfStringType = iListOfTType.MakeInstantiatedType(stringType); TypeDesc intSzArrayType = intType.MakeArrayType(); + TypeDesc byteSzArrayType = byteType.MakeArrayType(); + TypeDesc objectSzArrayType = objectType.MakeArrayType(); + TypeDesc stringSzArrayType = stringType.MakeArrayType(); TypeDesc intArrayType = intType.MakeArrayType(1); + TypeDesc intBasedEnumSzArrayType = intBasedEnumType.MakeArrayType(); Assert.True(intSzArrayType.CanCastTo(iListOfIntType)); Assert.True(intSzArrayType.CanCastTo(iListType)); Assert.False(intArrayType.CanCastTo(iListOfIntType)); Assert.True(intArrayType.CanCastTo(iListType)); + + Assert.True(intBasedEnumSzArrayType.CanCastTo(iListOfIntType)); + Assert.False(byteSzArrayType.CanCastTo(iListOfIntType)); + + Assert.True(stringSzArrayType.CanCastTo(iListOfObjectType)); + Assert.True(stringSzArrayType.CanCastTo(iListOfStringType)); + Assert.True(objectSzArrayType.CanCastTo(iListOfObjectType)); + Assert.False(objectSzArrayType.CanCastTo(iListOfStringType)); } [Fact] diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/ILCompilerTestCaseResult.cs b/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/ILCompilerTestCaseResult.cs deleted file mode 100644 index 5229431b282e6e..00000000000000 --- a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/ILCompilerTestCaseResult.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using ILCompiler; -using Mono.Linker.Tests.Extensions; -using Mono.Linker.Tests.TestCases; - -namespace Mono.Linker.Tests.TestCasesRunner -{ - public class ILCompilerTestCaseResult - { - public readonly TestCase TestCase; - public readonly NPath InputAssemblyPath; - public readonly NPath ExpectationsAssemblyPath; - public readonly TestCaseSandbox Sandbox; - public readonly TestCaseMetadataProvider MetadataProvider; - public readonly ManagedCompilationResult CompilationResult; - public readonly ILScanResults TrimmingResults; - public readonly TestLogWriter LogWriter; - - public ILCompilerTestCaseResult (TestCase testCase, NPath inputAssemblyPath, NPath expectationsAssemblyPath, TestCaseSandbox sandbox, TestCaseMetadataProvider metadataProvider, ManagedCompilationResult compilationResult, ILScanResults trimmingResults, TestLogWriter logWriter) - { - TestCase = testCase; - InputAssemblyPath = inputAssemblyPath; - ExpectationsAssemblyPath = expectationsAssemblyPath; - Sandbox = sandbox; - MetadataProvider = metadataProvider; - CompilationResult = compilationResult; - TrimmingResults = trimmingResults; - LogWriter = logWriter; - } - } -} diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/ObjectFactory.cs b/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/ObjectFactory.cs deleted file mode 100644 index f99a06ad15062d..00000000000000 --- a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/ObjectFactory.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using Mono.Cecil; -using Mono.Linker.Tests.TestCases; - -namespace Mono.Linker.Tests.TestCasesRunner -{ - public class ObjectFactory - { - public virtual TestCaseSandbox CreateSandbox (TestCase testCase) - { - return new TestCaseSandbox (testCase); - } - - public virtual TestCaseCompiler CreateCompiler (TestCaseSandbox sandbox, TestCaseCompilationMetadataProvider metadataProvider) - { - return new TestCaseCompiler (sandbox, metadataProvider); - } - - public virtual ILCompilerDriver CreateTrimmer () - { - return new ILCompilerDriver (); - } - - public virtual TestCaseMetadataProvider CreateMetadataProvider (TestCase testCase, AssemblyDefinition expectationsAssemblyDefinition) - { - return new TestCaseMetadataProvider (testCase, expectationsAssemblyDefinition); - } - - public virtual TestCaseCompilationMetadataProvider CreateCompilationMetadataProvider (TestCase testCase, AssemblyDefinition fullTestCaseAssemblyDefinition) - { - return new TestCaseCompilationMetadataProvider (testCase, fullTestCaseAssemblyDefinition); - } - - public virtual ILCompilerOptionsBuilder CreateTrimmerOptionsBuilder (TestCaseMetadataProvider metadataProvider) - { - return new ILCompilerOptionsBuilder (metadataProvider); - } - } -} diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/PathUtilities.cs b/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/PathUtilities.cs deleted file mode 100644 index ebb2439b80bafd..00000000000000 --- a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/PathUtilities.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using System; -using System.IO; -using System.Runtime.CompilerServices; - -namespace Mono.Linker.Tests.TestCasesRunner -{ - public static class PathUtilities - { -#if NET8_0 - public const string TFMDirectoryName = "net8.0"; -#elif NET7_0 - public const string TFMDirectoryName = "net7.0"; -#elif NET6_0 - public const string TFMDirectoryName = "net6.0"; -#else -#error "Unknown TFM" -#endif - - public static string GetTestsSourceRootDirectory ([CallerFilePath] string? thisFile = null) => - Path.GetFullPath((string)AppContext.GetData("Mono.Linker.Tests.LinkerTestDir")!); - - public static string GetTestAssemblyRoot (string assemblyName) - { - var artifactsBinDirectory = (string) AppContext.GetData ("Mono.Linker.Tests.ArtifactsBinDir")!; - var configuration = (string) AppContext.GetData ("Mono.Linker.Tests.Configuration")!; - return Path.GetFullPath (Path.Combine (artifactsBinDirectory, assemblyName, configuration, TFMDirectoryName)); - } - } -} diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/SetupCompileInfo.cs b/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/SetupCompileInfo.cs deleted file mode 100644 index 37883af7d3bdaf..00000000000000 --- a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/SetupCompileInfo.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using Mono.Linker.Tests.Extensions; - -#nullable disable - -namespace Mono.Linker.Tests.TestCasesRunner -{ - public class SetupCompileInfo - { - public string OutputName; - public NPath[] SourceFiles; - public string[] Defines; - public string[] References; - public SourceAndDestinationPair[] Resources; - public string AdditionalArguments; - public string CompilerToUse; - public bool AddAsReference; - public bool RemoveFromLinkerInput; - public string OutputSubFolder; - } -} diff --git a/src/coreclr/tools/aot/crossgen2/crossgen2.csproj b/src/coreclr/tools/aot/crossgen2/crossgen2.csproj index 504ec3c23264ff..9df088cd4c2492 100644 --- a/src/coreclr/tools/aot/crossgen2/crossgen2.csproj +++ b/src/coreclr/tools/aot/crossgen2/crossgen2.csproj @@ -7,8 +7,7 @@ false false - - true + true linux-x64;linux-musl-x64;linux-arm;linux-musl-arm;linux-arm64;linux-musl-arm64;freebsd-x64;freebsd-arm64;osx-x64;osx-arm64;win-x64;win-x86;win-arm64 $(PackageRID) false @@ -39,8 +38,8 @@ $(MicrosoftNetCoreAppRuntimePackNativeDir) false - .dwarf - --flat + .dwarf + --flat diff --git a/src/coreclr/tools/superpmi/superpmi-shared/agnostic.h b/src/coreclr/tools/superpmi/superpmi-shared/agnostic.h index 2155d6a1003aed..82bcb14d3a169d 100644 --- a/src/coreclr/tools/superpmi/superpmi-shared/agnostic.h +++ b/src/coreclr/tools/superpmi/superpmi-shared/agnostic.h @@ -567,6 +567,12 @@ struct Agnostic_GetArgType_Value DWORD exceptionCode; }; +struct Agnostic_GetExactClassesResult +{ + int numClasses; + DWORD classes; +}; + // Agnostic_ConfigIntInfo combines as a single key the name // and defaultValue of a integer config query. // Note: nameIndex is treated as a DWORD index to the name string. diff --git a/src/coreclr/tools/superpmi/superpmi-shared/lwmlist.h b/src/coreclr/tools/superpmi/superpmi-shared/lwmlist.h index 57bad5441147af..c09cd84b059e4d 100644 --- a/src/coreclr/tools/superpmi/superpmi-shared/lwmlist.h +++ b/src/coreclr/tools/superpmi/superpmi-shared/lwmlist.h @@ -48,7 +48,7 @@ LWM(GetAddrOfCaptureThreadGlobal, DWORD, DLDL) LWM(GetArgClass, Agnostic_GetArgClass_Key, Agnostic_GetArgClass_Value) LWM(GetArgNext, DWORDLONG, DWORDLONG) LWM(GetArgType, Agnostic_GetArgType_Key, Agnostic_GetArgType_Value) -LWM(GetExactClasses, DLD, DLD) +LWM(GetExactClasses, DLD, Agnostic_GetExactClassesResult) LWM(GetArrayInitializationData, DLD, DWORDLONG) LWM(GetArrayRank, DWORDLONG, DWORD) LWM(GetArrayIntrinsicID, DWORDLONG, DWORD) diff --git a/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp b/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp index fa13ac1f4c0fc2..a7c6d9b9d3fabc 100644 --- a/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp +++ b/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp @@ -2747,24 +2747,31 @@ CorInfoTypeWithMod MethodContext::repGetArgType(CORINFO_SIG_INFO* sig, void MethodContext::recGetExactClasses(CORINFO_CLASS_HANDLE baseType, int maxExactClasses, CORINFO_CLASS_HANDLE* exactClsRet, int result) { if (GetExactClasses == nullptr) - GetExactClasses = new LightWeightMap(); + GetExactClasses = new LightWeightMap(); DLD key; ZeroMemory(&key, sizeof(key)); key.A = CastHandle(baseType); key.B = maxExactClasses; - DLD value; - ZeroMemory(&value, sizeof(value)); - value.A = CastHandle(*exactClsRet); - value.B = result; + Assert(result >= 0); + + DWORDLONG* exactClassesAgnostic = new DWORDLONG[result]; + for (int i = 0; i < result; i++) + exactClassesAgnostic[i] = CastHandle(exactClsRet[i]); + + Agnostic_GetExactClassesResult value; + value.numClasses = result; + value.classes = GetExactClasses->AddBuffer((unsigned char*)exactClassesAgnostic, (unsigned int)(result * sizeof(DWORDLONG))); + + delete[] exactClassesAgnostic; GetExactClasses->Add(key, value); } -void MethodContext::dmpGetExactClasses(DLD key, DLD value) +void MethodContext::dmpGetExactClasses(DLD key, const Agnostic_GetExactClassesResult& value) { - printf("GetExactClasses key baseType-%016" PRIX64 ", key maxExactCls %u, value exactCls %016" PRIX64 ", value exactClsCount %u", - key.A, key.B, value.A, value.B); + printf("GetExactClasses key baseType-%016" PRIX64 ", maxExactCls-%u, value numClasses-%d", + key.A, key.B, value.numClasses); } int MethodContext::repGetExactClasses(CORINFO_CLASS_HANDLE baseType, int maxExactClasses, CORINFO_CLASS_HANDLE* exactClsRet) { @@ -2773,10 +2780,19 @@ int MethodContext::repGetExactClasses(CORINFO_CLASS_HANDLE baseType, int maxExac key.A = CastHandle(baseType); key.B = maxExactClasses; - DLD value = LookupByKeyOrMiss(GetExactClasses, key, ": key %016" PRIX64 " %08X", key.A, key.B); + Agnostic_GetExactClassesResult value = LookupByKeyOrMiss(GetExactClasses, key, ": key %016" PRIX64 " %08X", key.A, key.B); - *exactClsRet = (CORINFO_CLASS_HANDLE)value.A; - return value.B; + Assert(maxExactClasses >= value.numClasses); + + unsigned char* buffer = GetExactClasses->GetBuffer(value.classes); + for (int i = 0; i < value.numClasses; i++) + { + DWORDLONG handle; + memcpy(&handle, &buffer[i * sizeof(DWORDLONG)], sizeof(handle)); + exactClsRet[i] = (CORINFO_CLASS_HANDLE)handle; + } + + return value.numClasses; } void MethodContext::recGetArgNext(CORINFO_ARG_LIST_HANDLE args, CORINFO_ARG_LIST_HANDLE result) diff --git a/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.h b/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.h index fd132c6cafa8ad..2af725f63f7aec 100644 --- a/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.h +++ b/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.h @@ -378,7 +378,7 @@ class MethodContext int maxExactClasses, CORINFO_CLASS_HANDLE* exactClsRet, int result); - void dmpGetExactClasses(DLD key, DLD value); + void dmpGetExactClasses(DLD key, const Agnostic_GetExactClassesResult& value); int repGetExactClasses(CORINFO_CLASS_HANDLE baseType, int maxExactClasses, CORINFO_CLASS_HANDLE* exactClsRet); diff --git a/src/coreclr/tools/superpmi/superpmi-shared/spmiutil.cpp b/src/coreclr/tools/superpmi/superpmi-shared/spmiutil.cpp index 1e4e4c92cdfd96..b21fc595293859 100644 --- a/src/coreclr/tools/superpmi/superpmi-shared/spmiutil.cpp +++ b/src/coreclr/tools/superpmi/superpmi-shared/spmiutil.cpp @@ -138,7 +138,7 @@ bool LoadRealJitLib(HMODULE& jitLib, WCHAR* jitLibPath) LogError("LoadRealJitLib - No real jit path"); return false; } - jitLib = ::LoadLibraryW(jitLibPath); + jitLib = ::LoadLibraryExW(jitLibPath, NULL, 0); if (jitLib == NULL) { LogError("LoadRealJitLib - LoadLibrary failed to load '%ws' (0x%08x)", jitLibPath, ::GetLastError()); diff --git a/src/coreclr/tools/superpmi/superpmi/commandline.cpp b/src/coreclr/tools/superpmi/superpmi/commandline.cpp index 3df93390beb5d2..9686ee51f0332b 100644 --- a/src/coreclr/tools/superpmi/superpmi/commandline.cpp +++ b/src/coreclr/tools/superpmi/superpmi/commandline.cpp @@ -12,6 +12,7 @@ #include "mclist.h" #include "methodcontext.h" #include "logging.h" +#include "spmiutil.h" // NOTE: this is parsed by parallelsuperpmi.cpp::ProcessChildStdOut() to determine if an incorrect // argument usage error has occurred. @@ -21,8 +22,8 @@ void CommandLine::DumpHelp(const char* program) { printf("%s\n", g_SuperPMIUsageFirstLine); printf("\n"); - printf("Usage: %s [options] jitname [jitname2] filename.mc\n", program); - printf(" jitname" PLATFORM_SHARED_LIB_SUFFIX_A " - path of jit to be tested\n"); + printf("Usage: %s [options] [jitname] [jitname2] filename.mc\n", program); + printf(" jitname" PLATFORM_SHARED_LIB_SUFFIX_A " - optional path of jit to be tested (default is JIT in same directory as %s)\n", program); printf(" jitname2" PLATFORM_SHARED_LIB_SUFFIX_A " - optional path of second jit to be tested\n"); printf(" filename.mc - load method contexts from filename.mc\n"); printf(" -j[it] Name - optionally -jit can be used to specify jits\n"); @@ -289,6 +290,13 @@ bool CommandLine::Parse(int argc, char* argv[], /* OUT */ Options* o) } else { + if (o->nameOfJit2 != nullptr) + { + LogError("Too many JITs specified."); + DumpHelp(argv[0]); + return false; + } + o->nameOfJit2 = tempStr; } } @@ -637,24 +645,6 @@ bool CommandLine::Parse(int argc, char* argv[], /* OUT */ Options* o) // Do some argument validation. - if (o->nameOfJit == nullptr) - { - LogError("Missing name of a Jit."); - DumpHelp(argv[0]); - return false; - } - if (o->nameOfInputMethodContextFile == nullptr) - { - LogError("Missing name of an input file."); - DumpHelp(argv[0]); - return false; - } - if (o->diffsInfo != nullptr && !o->applyDiff) - { - LogError("-diffsInfo specified without -applyDiff."); - DumpHelp(argv[0]); - return false; - } if (o->targetArchitecture != nullptr) { if ((0 != _stricmp(o->targetArchitecture, "amd64")) && @@ -669,12 +659,170 @@ bool CommandLine::Parse(int argc, char* argv[], /* OUT */ Options* o) return false; } } + + SPMI_TARGET_ARCHITECTURE defaultSpmiTargetArchitecture = GetSpmiTargetArchitecture(); + SetSuperPmiTargetArchitecture(o->targetArchitecture); + + if (o->nameOfInputMethodContextFile == nullptr) + { + LogError("Missing name of an input file."); + DumpHelp(argv[0]); + return false; + } + + if (o->nameOfJit == nullptr) + { + // Try to find a JIT in the same directory as superpmi.exe. If found (based on targetArchitecture), use it. + + bool allowDefaultJIT = true; + + const char* hostOSTag = ""; + const char* jitHostOSPrefix = ""; + const char* jitHostOSExtension = ""; + +#if defined(HOST_OSX) // NOTE: HOST_UNIX is also defined for HOST_OSX + hostOSTag = "unix"; + jitHostOSPrefix = "lib"; + jitHostOSExtension = ".dylib"; +#elif defined(HOST_UNIX) + hostOSTag = "unix"; + jitHostOSPrefix = "lib"; + jitHostOSExtension = ".so"; +#elif defined(HOST_WINDOWS) + hostOSTag = "win"; + jitHostOSExtension = ".dll"; +#else + allowDefaultJIT = false; +#endif + + const char* hostArch = ""; + +#if defined(HOST_AMD64) + hostArch = "x64"; +#elif defined(HOST_X86) + hostArch = "x86"; +#elif defined(HOST_ARM) + hostArch = "arm"; +#elif defined(HOST_ARM64) + hostArch = "arm64"; +#else + allowDefaultJIT = false; +#endif + + const char* targetArch = ""; + + switch (GetSpmiTargetArchitecture()) + { + case SPMI_TARGET_ARCHITECTURE_AMD64: + targetArch = "x64"; + break; + case SPMI_TARGET_ARCHITECTURE_X86: + targetArch = "x86"; + break; + case SPMI_TARGET_ARCHITECTURE_ARM: + targetArch = "arm"; + break; + case SPMI_TARGET_ARCHITECTURE_ARM64: + targetArch = "arm64"; + break; + default: + allowDefaultJIT = false; + break; + } + + size_t programPathLen = 0; + char* programPath = nullptr; + const char* lastSlash = strrchr(argv[0], DIRECTORY_SEPARATOR_CHAR_A); + if (lastSlash == nullptr) + { + allowDefaultJIT = false; + } + else + { + programPathLen = lastSlash - argv[0] + 1; + programPath = new char[programPathLen]; + strncpy_s(programPath, programPathLen, argv[0], programPathLen - 1); + } + + if (allowDefaultJIT) + { + const char* jitOSName = nullptr; + + if (defaultSpmiTargetArchitecture != GetSpmiTargetArchitecture()) + { + // SuperPMI doesn't know about "target OS" so always assume host OS. + + switch (GetSpmiTargetArchitecture()) + { + case SPMI_TARGET_ARCHITECTURE_AMD64: + case SPMI_TARGET_ARCHITECTURE_X86: + jitOSName = hostOSTag; + break; + case SPMI_TARGET_ARCHITECTURE_ARM: + case SPMI_TARGET_ARCHITECTURE_ARM64: + jitOSName = "universal"; + break; + default: + // Can't get here if `allowDefaultJIT` was properly set above. + break; + } + } + + const char* const jitBaseName = "clrjit"; + size_t len = programPathLen + strlen(jitHostOSPrefix) + strlen(jitBaseName) + strlen(jitHostOSExtension) + 1; + if (jitOSName != nullptr) + { + len += 3 /* underscores */ + strlen(jitOSName) + strlen(targetArch) + strlen(hostArch); + } + char* tempStr = new char[len]; + if (jitOSName == nullptr) + { + sprintf_s(tempStr, len, "%s%c%s%s%s", + programPath, + DIRECTORY_SEPARATOR_CHAR_A, + jitHostOSPrefix, + jitBaseName, + jitHostOSExtension); + } + else + { + sprintf_s(tempStr, len, "%s%c%s%s_%s_%s_%s%s", + programPath, + DIRECTORY_SEPARATOR_CHAR_A, + jitHostOSPrefix, + jitBaseName, + jitOSName, + targetArch, + hostArch, + jitHostOSExtension); + } + + o->nameOfJit = tempStr; + + LogInfo("Using default JIT: %s", o->nameOfJit); + } + else + { + LogError("Missing name of a Jit."); + DumpHelp(argv[0]); + return false; + } + } + + if (o->diffsInfo != nullptr && !o->applyDiff) + { + LogError("-diffsInfo specified without -applyDiff."); + DumpHelp(argv[0]); + return false; + } + if (o->skipCleanup && !o->parallel) { LogError("-skipCleanup requires -parallel."); DumpHelp(argv[0]); return false; } + return true; } diff --git a/src/coreclr/tools/superpmi/superpmi/jitinstance.cpp b/src/coreclr/tools/superpmi/superpmi/jitinstance.cpp index f8c81c47b765a5..37825ebf437cf6 100644 --- a/src/coreclr/tools/superpmi/superpmi/jitinstance.cpp +++ b/src/coreclr/tools/superpmi/superpmi/jitinstance.cpp @@ -177,7 +177,7 @@ HRESULT JitInstance::StartUp(char* PathToJit, bool copyJit, bool breakOnDebugBre #endif // !TARGET_UNIX // Load Library - hLib = ::LoadLibraryA(PathToTempJit); + hLib = ::LoadLibraryExA(PathToTempJit, NULL, 0); if (hLib == 0) { LogError("LoadLibrary failed (0x%08x)", ::GetLastError()); @@ -237,7 +237,7 @@ bool JitInstance::reLoad(MethodContext* firstContext) FreeLibrary(hLib); // Load Library - hLib = ::LoadLibraryA(PathToTempJit); + hLib = ::LoadLibraryExA(PathToTempJit, NULL, 0); if (hLib == 0) { LogError("LoadLibrary failed (0x%08x)", ::GetLastError()); diff --git a/src/coreclr/tools/superpmi/superpmi/neardiffer.cpp b/src/coreclr/tools/superpmi/superpmi/neardiffer.cpp index 4fa300725cb721..923d3d087015ef 100644 --- a/src/coreclr/tools/superpmi/superpmi/neardiffer.cpp +++ b/src/coreclr/tools/superpmi/superpmi/neardiffer.cpp @@ -91,7 +91,7 @@ bool NearDiffer::InitAsmDiff() coreDisToolsLibrary = coreCLRLoadedPath; #endif // TARGET_UNIX - HMODULE hCoreDisToolsLib = ::LoadLibraryW(coreDisToolsLibrary); + HMODULE hCoreDisToolsLib = ::LoadLibraryExW(coreDisToolsLibrary, NULL, 0); if (hCoreDisToolsLib == 0) { LogError("LoadLibrary(%s) failed (0x%08x)", MAKEDLLNAME_A("coredistools"), ::GetLastError()); @@ -1247,28 +1247,68 @@ bool NearDiffer::compare(MethodContext* mc, CompileResult* cr1, CompileResult* c // is a sum of their sizes. The following is to adjust their sizes and the roDataBlock_{1,2} pointers. if (GetSpmiTargetArchitecture() == SPMI_TARGET_ARCHITECTURE_ARM64) { - BYTE* nativeEntry_1; - ULONG nativeSizeOfCode_1; - CorJitResult jitResult_1; - - BYTE* nativeEntry_2; - ULONG nativeSizeOfCode_2; - CorJitResult jitResult_2; - - cr1->repCompileMethod(&nativeEntry_1, &nativeSizeOfCode_1, &jitResult_1); - cr2->repCompileMethod(&nativeEntry_2, &nativeSizeOfCode_2, &jitResult_2); + if (hotCodeSize_1 > 0) + { + BYTE* nativeEntry_1; + ULONG nativeSizeOfCode_1; + CorJitResult jitResult_1; + cr1->repCompileMethod(&nativeEntry_1, &nativeSizeOfCode_1, &jitResult_1); + roDataSize_1 = hotCodeSize_1 - nativeSizeOfCode_1; + roDataBlock_1 = hotCodeBlock_1 + nativeSizeOfCode_1; + orig_roDataBlock_1 = (void*)((size_t)orig_hotCodeBlock_1 + nativeSizeOfCode_1); + hotCodeSize_1 = nativeSizeOfCode_1; + } - roDataSize_1 = hotCodeSize_1 - nativeSizeOfCode_1; - roDataSize_2 = hotCodeSize_2 - nativeSizeOfCode_2; + if (hotCodeSize_2 > 0) + { + BYTE* nativeEntry_2; + ULONG nativeSizeOfCode_2; + CorJitResult jitResult_2; + cr2->repCompileMethod(&nativeEntry_2, &nativeSizeOfCode_2, &jitResult_2); + roDataSize_2 = hotCodeSize_2 - nativeSizeOfCode_2; + roDataBlock_2 = hotCodeBlock_2 + nativeSizeOfCode_2; + orig_roDataBlock_2 = (void*)((size_t)orig_hotCodeBlock_2 + nativeSizeOfCode_2); + hotCodeSize_2 = nativeSizeOfCode_2; + } - roDataBlock_1 = hotCodeBlock_1 + nativeSizeOfCode_1; - roDataBlock_2 = hotCodeBlock_2 + nativeSizeOfCode_2; + auto rewriteUnsupportedInstrs = [](unsigned char* bytes, size_t numBytes) { + for (size_t i = 0; i < numBytes; i += 4) + { + uint32_t inst; + memcpy(&inst, &bytes[i], 4); - orig_roDataBlock_1 = (void*)((size_t)orig_hotCodeBlock_1 + nativeSizeOfCode_1); - orig_roDataBlock_2 = (void*)((size_t)orig_hotCodeBlock_2 + nativeSizeOfCode_2); + const uint32_t ldapurMask = 0b00111111111000000000110000000000; + const uint32_t ldapurBits = 0b00011001010000000000000000000000; + const uint32_t ldurBits = 0b00111000010000000000000000000000; - hotCodeSize_1 = nativeSizeOfCode_1; - hotCodeSize_2 = nativeSizeOfCode_2; + const uint32_t stlurMask = 0b00111111111000000000110000000000; + const uint32_t stlurBits = 0b00011001000000000000000000000000; + const uint32_t sturBits = 0b00111000000000000000000000000000; + if ((inst & ldapurMask) == ldapurBits) + { + inst ^= (ldapurBits ^ ldurBits); + memcpy(&bytes[i], &inst, 4); + } + else if ((inst & stlurMask) == stlurBits) + { + inst ^= (stlurBits ^ sturBits); + memcpy(&bytes[i], &inst, 4); + } + } + }; + + // As of 2023-09-13, our coredistools does not support stlur/ldapur + // instructions, so we rewrite them into supported stur/ldur + // instructions before passing them to the near differ. This means we + // will miss diffs when changing stlur<->stur and ldapur<->ldur, + // but this is better than the decode failure that otherwise results + // (which shows up as a zero-sized diff unconditionally). + // This code should be removed once a new coredistools is compiled that + // supports new instructions. + rewriteUnsupportedInstrs(hotCodeBlock_1, hotCodeSize_1); + rewriteUnsupportedInstrs(coldCodeBlock_1, coldCodeSize_1); + rewriteUnsupportedInstrs(hotCodeBlock_2, hotCodeSize_2); + rewriteUnsupportedInstrs(coldCodeBlock_2, coldCodeSize_2); } LogDebug("HCS1 %d CCS1 %d RDS1 %d xcpnt1 %d flag1 %08X, HCB %p CCB %p RDB %p ohcb %p occb %p odb %p", hotCodeSize_1, diff --git a/src/coreclr/tools/superpmi/superpmi/superpmi.cpp b/src/coreclr/tools/superpmi/superpmi/superpmi.cpp index 73bc99b6e5d68f..5be8d10acbfbdc 100644 --- a/src/coreclr/tools/superpmi/superpmi/superpmi.cpp +++ b/src/coreclr/tools/superpmi/superpmi/superpmi.cpp @@ -197,8 +197,6 @@ int __cdecl main(int argc, char* argv[]) SetBreakOnException(o.breakOnException); - SetSuperPmiTargetArchitecture(o.targetArchitecture); - if (o.methodStatsTypes != NULL && (strchr(o.methodStatsTypes, '*') != NULL || strchr(o.methodStatsTypes, 't') != NULL || strchr(o.methodStatsTypes, 'T') != NULL)) diff --git a/src/coreclr/tools/superpmi/superpmi/superpmi.h b/src/coreclr/tools/superpmi/superpmi/superpmi.h index c56a74e16af82c..190b8d5d9ec091 100644 --- a/src/coreclr/tools/superpmi/superpmi/superpmi.h +++ b/src/coreclr/tools/superpmi/superpmi/superpmi.h @@ -22,4 +22,6 @@ enum class SpmiResult Misses = 3 }; +extern void SetSuperPmiTargetArchitecture(const char* targetArchitecture); + #endif diff --git a/src/coreclr/utilcode/ccomprc.cpp b/src/coreclr/utilcode/ccomprc.cpp index c9556d7f320845..f5300892f28c69 100644 --- a/src/coreclr/utilcode/ccomprc.cpp +++ b/src/coreclr/utilcode/ccomprc.cpp @@ -555,7 +555,7 @@ HRESULT CCompRC::LoadResourceFile(HRESOURCEDLL * pHInst, LPCWSTR lpFileName) dwLoadLibraryFlags = 0; } - if((*pHInst = WszLoadLibraryEx(lpFileName, NULL, dwLoadLibraryFlags)) == NULL) + if((*pHInst = WszLoadLibrary(lpFileName, NULL, dwLoadLibraryFlags)) == NULL) { return HRESULT_FROM_GetLastError(); } @@ -618,7 +618,7 @@ HRESULT CCompRC::LoadLibraryHelper(HRESOURCEDLL *pHInst, PathString rcPathName(rcPath); - if (!rcPathName.EndsWith(W("\\"))) + if (!rcPathName.EndsWith(SL(W("\\")))) { rcPathName.Append(W("\\")); } diff --git a/src/coreclr/utilcode/clrhost.cpp b/src/coreclr/utilcode/clrhost.cpp index 188418fccdfa60..0bf016eb883490 100644 --- a/src/coreclr/utilcode/clrhost.cpp +++ b/src/coreclr/utilcode/clrhost.cpp @@ -66,7 +66,7 @@ static void SetupHashStack () PAL_TRY(void *, unused, NULL) { FHashStack func; - HMODULE hmod = LoadLibraryExA ("mscorrfs.dll", NULL, 0); + HMODULE hmod = WszLoadLibrary(W("mscorrfs.dll"), NULL, 0); if (hmod) { func = (FHashStack)GetProcAddress (hmod, "HashStack"); if (func == 0) { @@ -132,7 +132,7 @@ HMODULE CLRLoadLibrary(LPCWSTR lpLibFileName) HMODULE CLRLoadLibraryEx(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags) { WRAPPER_NO_CONTRACT; - return WszLoadLibraryEx(lpLibFileName, hFile, dwFlags); + return WszLoadLibrary(lpLibFileName, hFile, dwFlags); } BOOL CLRFreeLibrary(HMODULE hModule) diff --git a/src/coreclr/utilcode/ex.cpp b/src/coreclr/utilcode/ex.cpp index 8f6bdd0569221b..7b65514b83d0bb 100644 --- a/src/coreclr/utilcode/ex.cpp +++ b/src/coreclr/utilcode/ex.cpp @@ -1154,7 +1154,7 @@ void GetHRMsg(HRESULT hr, SString &result, BOOL bNoGeekStuff/* = FALSE*/) } CONTRACTL_END; - result = W(""); // Make sure this routine isn't an inadvertent data-leak exploit! + result.Set(W("")); // Make sure this routine isn't an inadvertent data-leak exploit! SString strDescr; BOOL fHaveDescr = FALSE; @@ -1220,7 +1220,7 @@ void GenerateTopLevelHRExceptionMessage(HRESULT hresult, SString &result) } CONTRACTL_END; - result = W(""); // Make sure this routine isn't an inadvertent data-leak exploit! + result.Set(W("")); // Make sure this routine isn't an inadvertent data-leak exploit! GetHRMsg(hresult, result); } diff --git a/src/coreclr/utilcode/longfilepathwrappers.cpp b/src/coreclr/utilcode/longfilepathwrappers.cpp index 120b3c04c9322d..3346584f765fb1 100644 --- a/src/coreclr/utilcode/longfilepathwrappers.cpp +++ b/src/coreclr/utilcode/longfilepathwrappers.cpp @@ -618,7 +618,7 @@ HRESULT LongFile::NormalizePath(SString & path) if (fullpath.BeginsWith(SL(UNCPathPrefix)) && prefixLen != prefix.GetCount() - (COUNT_T)u16_strlen(UNCPATHPREFIX)) { //Remove the leading '\\' from the UNC path to be replaced with UNCExtendedPathPrefix - fullpath.Replace(fullpath.Begin(), (COUNT_T)u16_strlen(UNCPATHPREFIX), UNCExtendedPathPrefix); + fullpath.Replace(fullpath.Begin(), (COUNT_T)u16_strlen(UNCPATHPREFIX), SL(UNCExtendedPathPrefix)); path.CloseBuffer(); path.Set(fullpath); } diff --git a/src/coreclr/utilcode/stacktrace.cpp b/src/coreclr/utilcode/stacktrace.cpp index 215e6624626937..028ca7d60aa407 100644 --- a/src/coreclr/utilcode/stacktrace.cpp +++ b/src/coreclr/utilcode/stacktrace.cpp @@ -32,7 +32,7 @@ HINSTANCE LoadImageHlp() STATIC_CONTRACT_CANNOT_TAKE_LOCK; SCAN_IGNORE_FAULT; // Faults from Wsz funcs are handled. - return LoadLibraryExA("imagehlp.dll", NULL, 0); + return WszLoadLibrary(W("imagehlp.dll"), NULL, 0); } HINSTANCE LoadDbgHelp() @@ -41,7 +41,7 @@ HINSTANCE LoadDbgHelp() STATIC_CONTRACT_GC_NOTRIGGER; SCAN_IGNORE_FAULT; // Faults from Wsz funcs are handled. - return LoadLibraryExA("dbghelp.dll", NULL, 0); + return WszLoadLibrary(W("dbghelp.dll"), NULL, 0); } /**************************************************************************** diff --git a/src/coreclr/utilcode/util.cpp b/src/coreclr/utilcode/util.cpp index 5d1c43d15d60df..6fc4b2b668cbde 100644 --- a/src/coreclr/utilcode/util.cpp +++ b/src/coreclr/utilcode/util.cpp @@ -216,7 +216,7 @@ namespace _ASSERTE(wszDllPath != nullptr); // We've got the name of the DLL to load, so load it. - HModuleHolder hDll = WszLoadLibraryEx(wszDllPath, nullptr, GetLoadWithAlteredSearchPathFlag()); + HModuleHolder hDll = WszLoadLibrary(wszDllPath, nullptr, GetLoadWithAlteredSearchPathFlag()); if (hDll == nullptr) return HRESULT_FROM_GetLastError(); diff --git a/src/coreclr/vm/.vscode/c_cpp_properties.json b/src/coreclr/vm/.vscode/c_cpp_properties.json index 16279d8db9e741..3312369826feba 100644 --- a/src/coreclr/vm/.vscode/c_cpp_properties.json +++ b/src/coreclr/vm/.vscode/c_cpp_properties.json @@ -40,7 +40,7 @@ "TARGET_AMD64=1", "TARGET_64BIT=1", "DEBUGGING_SUPPORTED", - "EnC_SUPPORTED", + "FEATURE_METADATA_UPDATER", "FEATURE_ARRAYSTUB_AS_IL", "FEATURE_BASICFREEZE", "FEATURE_CODE_VERSIONING", diff --git a/src/coreclr/vm/CMakeLists.txt b/src/coreclr/vm/CMakeLists.txt index 16ae71c162a472..d8054a250af411 100644 --- a/src/coreclr/vm/CMakeLists.txt +++ b/src/coreclr/vm/CMakeLists.txt @@ -71,6 +71,7 @@ set(VM_SOURCES_DAC_AND_WKS_COMMON eetwain.cpp encee.cpp excep.cpp + exinfo.cpp exstate.cpp field.cpp formattype.cpp @@ -168,6 +169,7 @@ set(VM_HEADERS_DAC_AND_WKS_COMMON eehash.inl encee.h excep.h + exinfo.h exstate.h field.h fptrstubs.h @@ -707,6 +709,7 @@ else(CLR_CMAKE_TARGET_WIN32) ${ARCH_SOURCES_DIR}/redirectedhandledjitcase.S ${ARCH_SOURCES_DIR}/theprestubamd64.S ${ARCH_SOURCES_DIR}/thunktemplates.S + ${ARCH_SOURCES_DIR}/Context.S ${ARCH_SOURCES_DIR}/unixasmhelpers.S ${ARCH_SOURCES_DIR}/umthunkstub.S ${ARCH_SOURCES_DIR}/virtualcallstubamd64.S @@ -788,7 +791,6 @@ if(CLR_CMAKE_TARGET_ARCH_AMD64) ) elseif(CLR_CMAKE_TARGET_ARCH_I386) set(VM_SOURCES_DAC_AND_WKS_ARCH - exinfo.cpp ${ARCH_SOURCES_DIR}/cgenx86.cpp ${ARCH_SOURCES_DIR}/excepx86.cpp ${ARCH_SOURCES_DIR}/gmsx86.cpp @@ -796,7 +798,6 @@ elseif(CLR_CMAKE_TARGET_ARCH_I386) ) set(VM_HEADERS_DAC_AND_WKS_ARCH - exinfo.h ${ARCH_SOURCES_DIR}/cgencpu.h ${ARCH_SOURCES_DIR}/excepcpu.h ${ARCH_SOURCES_DIR}/gmscpu.h diff --git a/src/coreclr/vm/amd64/CallDescrWorkerAMD64.asm b/src/coreclr/vm/amd64/CallDescrWorkerAMD64.asm index 8d4e4e5094293f..af0ca575b05661 100644 --- a/src/coreclr/vm/amd64/CallDescrWorkerAMD64.asm +++ b/src/coreclr/vm/amd64/CallDescrWorkerAMD64.asm @@ -94,7 +94,7 @@ Arg4: movsd xmm3, real8 ptr 18h[rsp]; DoCall: call qword ptr [rbx+CallDescrData__pTarget] ; call target function - +CallDescrWorkerInternalReturnAddress: ; Save FP return value mov ecx, dword ptr [rbx+CallDescrData__fpReturnSize] @@ -126,6 +126,9 @@ ReturnsDouble: movsd real8 ptr [rbx+CallDescrData__returnValue], xmm0 jmp Epilog +PATCH_LABEL CallDescrWorkerInternalReturnAddressOffset + dq CallDescrWorkerInternalReturnAddress - CallDescrWorkerInternal + NESTED_END CallDescrWorkerInternal, _TEXT end diff --git a/src/coreclr/vm/amd64/Context.S b/src/coreclr/vm/amd64/Context.S new file mode 100644 index 00000000000000..0721c45f56727c --- /dev/null +++ b/src/coreclr/vm/amd64/Context.S @@ -0,0 +1,61 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +.intel_syntax noprefix +#include "unixasmmacros.inc" +#include "asmconstants.h" + +// Some constants for CONTEXT.ContextFlags. The arch bit (CONTEXT_AMD64) is normally set in these flag constants below. Since +// this is already arch-specific code and the arch bit is not relevant, the arch bit is excluded from the flag constants below +// for simpler tests. +#define CONTEXT_CONTROL 1 +#define CONTEXT_INTEGER 2 + +// Signature: EXTERN_C void STDCALL ClrRestoreNonvolatileContextWorker(PCONTEXT ContextRecord, DWORD64 ssp); +NESTED_ENTRY ClrRestoreNonvolatileContextWorker, _TEXT, NoHandler + push_nonvol_reg rbp + set_cfa_register rbp, 0 + END_PROLOGUE + + mov r10, rdi + mov r11, rsi + + test byte ptr [r10 + OFFSETOF__CONTEXT__ContextFlags], CONTEXT_INTEGER + je Done_Restore_CONTEXT_INTEGER + mov rbx, [r10 + OFFSETOF__CONTEXT__Rbx] + mov rcx, [r10 + OFFSETOF__CONTEXT__Rcx] + mov rdx, [r10 + OFFSETOF__CONTEXT__Rdx] + mov r8, [r10 + OFFSETOF__CONTEXT__R8] + mov r9, [r10 + OFFSETOF__CONTEXT__R9] + mov rbp, [r10 + OFFSETOF__CONTEXT__Rbp] + mov rsi, [r10 + OFFSETOF__CONTEXT__Rsi] + mov rdi, [r10 + OFFSETOF__CONTEXT__Rdi] + mov r12, [r10 + OFFSETOF__CONTEXT__R12] + mov r13, [r10 + OFFSETOF__CONTEXT__R13] + mov r14, [r10 + OFFSETOF__CONTEXT__R14] + mov r15, [r10 + OFFSETOF__CONTEXT__R15] + Done_Restore_CONTEXT_INTEGER: + + test byte ptr [r10 + OFFSETOF__CONTEXT__ContextFlags], CONTEXT_CONTROL + je Done_Restore_CONTEXT_CONTROL + + test r11, r11 + je No_Ssp_Update + rdsspq rax + sub r11, rax + shr r11, 3 + incsspq r11 + No_Ssp_Update: + + // When user-mode shadow stacks are enabled, and for example the intent is to continue execution in managed code after + // exception handling, iret and ret can't be used because their shadow stack enforcement would not allow that transition, + // and using them would require writing to the shadow stack, which is not preferable. Instead, iret is partially + // simulated. + mov rsp, [r10 + OFFSETOF__CONTEXT__Rsp] + jmp qword ptr [r10 + OFFSETOF__CONTEXT__Rip] + Done_Restore_CONTEXT_CONTROL: + + // The function was not asked to restore the control registers so we return back to the caller + pop rbp + ret +NESTED_END ClrRestoreNonvolatileContextWorker, _TEXT diff --git a/src/coreclr/vm/amd64/Context.asm b/src/coreclr/vm/amd64/Context.asm index 71bc2566f8acc9..a7165983cf4fa1 100644 --- a/src/coreclr/vm/amd64/Context.asm +++ b/src/coreclr/vm/amd64/Context.asm @@ -21,43 +21,50 @@ NESTED_ENTRY ClrRestoreNonvolatileContextWorker, _TEXT set_frame rbp, 0 END_PROLOGUE - test byte ptr [rcx + OFFSETOF__CONTEXT__ContextFlags], CONTEXT_FLOATING_POINT + mov r10, rcx + mov r11, rdx + + test byte ptr [r10 + OFFSETOF__CONTEXT__ContextFlags], CONTEXT_FLOATING_POINT je Done_Restore_CONTEXT_FLOATING_POINT - fxrstor [rcx + OFFSETOF__CONTEXT__FltSave] + fxrstor [r10 + OFFSETOF__CONTEXT__FltSave] Done_Restore_CONTEXT_FLOATING_POINT: - test byte ptr [rcx + OFFSETOF__CONTEXT__ContextFlags], CONTEXT_INTEGER + test byte ptr [r10 + OFFSETOF__CONTEXT__ContextFlags], CONTEXT_INTEGER je Done_Restore_CONTEXT_INTEGER - mov rbx, [rcx + OFFSETOF__CONTEXT__Rbx] - mov rbp, [rcx + OFFSETOF__CONTEXT__Rbp] - mov rsi, [rcx + OFFSETOF__CONTEXT__Rsi] - mov rdi, [rcx + OFFSETOF__CONTEXT__Rdi] - mov r12, [rcx + OFFSETOF__CONTEXT__R12] - mov r13, [rcx + OFFSETOF__CONTEXT__R13] - mov r14, [rcx + OFFSETOF__CONTEXT__R14] - mov r15, [rcx + OFFSETOF__CONTEXT__R15] + mov rbx, [r10 + OFFSETOF__CONTEXT__Rbx] + mov rcx, [r10 + OFFSETOF__CONTEXT__Rcx] + mov rdx, [r10 + OFFSETOF__CONTEXT__Rdx] + mov r8, [r10 + OFFSETOF__CONTEXT__R8] + mov r9, [r10 + OFFSETOF__CONTEXT__R9] + mov rbp, [r10 + OFFSETOF__CONTEXT__Rbp] + mov rsi, [r10 + OFFSETOF__CONTEXT__Rsi] + mov rdi, [r10 + OFFSETOF__CONTEXT__Rdi] + mov r12, [r10 + OFFSETOF__CONTEXT__R12] + mov r13, [r10 + OFFSETOF__CONTEXT__R13] + mov r14, [r10 + OFFSETOF__CONTEXT__R14] + mov r15, [r10 + OFFSETOF__CONTEXT__R15] Done_Restore_CONTEXT_INTEGER: - test byte ptr [rcx + OFFSETOF__CONTEXT__ContextFlags], CONTEXT_CONTROL + test byte ptr [r10 + OFFSETOF__CONTEXT__ContextFlags], CONTEXT_CONTROL je Done_Restore_CONTEXT_CONTROL - test rdx, rdx + test r11, r11 je No_Ssp_Update rdsspq rax - sub rdx, rax - shr rdx, 3 - incsspq rdx + sub r11, rax + shr r11, 3 + incsspq r11 No_Ssp_Update: ; When user-mode shadow stacks are enabled, and for example the intent is to continue execution in managed code after ; exception handling, iret and ret can't be used because their shadow stack enforcement would not allow that transition, ; and using them would require writing to the shadow stack, which is not preferable. Instead, iret is partially ; simulated. - mov eax, [rcx + OFFSETOF__CONTEXT__EFlags] + mov eax, [r10 + OFFSETOF__CONTEXT__EFlags] push rax popfq - mov rsp, [rcx + OFFSETOF__CONTEXT__Rsp] - jmp qword ptr [rcx + OFFSETOF__CONTEXT__Rip] + mov rsp, [r10 + OFFSETOF__CONTEXT__Rsp] + jmp qword ptr [r10 + OFFSETOF__CONTEXT__Rip] Done_Restore_CONTEXT_CONTROL: ; The function was not asked to restore the control registers so we return back to the caller diff --git a/src/coreclr/vm/amd64/asmconstants.h b/src/coreclr/vm/amd64/asmconstants.h index ebe9cb81042e5f..cac0ba0f2d382c 100644 --- a/src/coreclr/vm/amd64/asmconstants.h +++ b/src/coreclr/vm/amd64/asmconstants.h @@ -576,6 +576,81 @@ ASMCONSTANTS_C_ASSERT(CallCountingStubData__TargetForMethod == offsetof(CallCoun #define CallCountingStubData__TargetForThresholdReached 0x10 ASMCONSTANTS_C_ASSERT(CallCountingStubData__TargetForThresholdReached == offsetof(CallCountingStubData, TargetForThresholdReached)) +#ifdef PROFILING_SUPPORTED +#define PROFILE_ENTER 0x1 +#define PROFILE_LEAVE 0x2 +#define PROFILE_TAILCALL 0x4 + +#define ASMCONSTANTS_C_ASSERT_OFFSET(type, field) \ + ASMCONSTANTS_C_ASSERT(type##__##field == offsetof(type, field)) + +#if defined(UNIX_AMD64_ABI) + #define SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA__buffer 0x8*16 + ASMCONSTANTS_C_ASSERT(SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA__buffer == + sizeof((*(PROFILE_PLATFORM_SPECIFIC_DATA*)0).buffer)) + #define SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA 0x8*22 + SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA__buffer +#else + #define SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA__buffer 0 + #define SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA 0x8*12 +#endif // UNIX_AMD64_ABI +ASMCONSTANT_SIZEOF_ASSERT(PROFILE_PLATFORM_SPECIFIC_DATA) + +#define PROFILE_PLATFORM_SPECIFIC_DATA__functionId 0x0 +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, functionId) +#define PROFILE_PLATFORM_SPECIFIC_DATA__rbp 0x8 +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, rbp) +#define PROFILE_PLATFORM_SPECIFIC_DATA__probeRsp 0x10 +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, probeRsp) +#define PROFILE_PLATFORM_SPECIFIC_DATA__ip 0x18 +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, ip) +#define PROFILE_PLATFORM_SPECIFIC_DATA__profiledRsp 0x20 +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, profiledRsp) +#define PROFILE_PLATFORM_SPECIFIC_DATA__rax 0x28 +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, rax) +#define PROFILE_PLATFORM_SPECIFIC_DATA__hiddenArg 0x30 +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, hiddenArg) +#define PROFILE_PLATFORM_SPECIFIC_DATA__flt0 0x38 +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, flt0) +#define PROFILE_PLATFORM_SPECIFIC_DATA__flt1 0x40 +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, flt1) +#define PROFILE_PLATFORM_SPECIFIC_DATA__flt2 0x48 +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, flt2) +#define PROFILE_PLATFORM_SPECIFIC_DATA__flt3 0x50 +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, flt3) +#if defined(UNIX_AMD64_ABI) + #define PROFILE_PLATFORM_SPECIFIC_DATA__flt4 0x58 + ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, flt4) + #define PROFILE_PLATFORM_SPECIFIC_DATA__flt5 0x60 + ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, flt5) + #define PROFILE_PLATFORM_SPECIFIC_DATA__flt6 0x68 + ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, flt6) + #define PROFILE_PLATFORM_SPECIFIC_DATA__flt7 0x70 + ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, flt7) + #define PROFILE_PLATFORM_SPECIFIC_DATA__rdi 0x78 + ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, rdi) + #define PROFILE_PLATFORM_SPECIFIC_DATA__rsi 0x80 + ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, rsi) + #define PROFILE_PLATFORM_SPECIFIC_DATA__rdx 0x88 + ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, rdx) + #define PROFILE_PLATFORM_SPECIFIC_DATA__rcx 0x90 + ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, rcx) + #define PROFILE_PLATFORM_SPECIFIC_DATA__r8 0x98 + ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, r8) + #define PROFILE_PLATFORM_SPECIFIC_DATA__r9 0xa0 + ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, r9) + #define PROFILE_PLATFORM_SPECIFIC_DATA__flags 0xa8 +#else // !UNIX_AMD64_ABI + #define PROFILE_PLATFORM_SPECIFIC_DATA__flags 0x58 +#endif // UNIX_AMD64_ABI +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, flags) +#if defined(UNIX_AMD64_ABI) + #define PROFILE_PLATFORM_SPECIFIC_DATA__buffer 0xb0 + ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, buffer) +#endif + +#undef ASMCONSTANTS_C_ASSERT_OFFSET +#endif // PROFILING_SUPPORTED + #undef ASMCONSTANTS_RUNTIME_ASSERT #undef ASMCONSTANTS_C_ASSERT #ifndef UNIX_AMD64_ABI diff --git a/src/coreclr/vm/amd64/asmhelpers.S b/src/coreclr/vm/amd64/asmhelpers.S index 9f45f9f39d5996..8d83938246a2c9 100644 --- a/src/coreclr/vm/amd64/asmhelpers.S +++ b/src/coreclr/vm/amd64/asmhelpers.S @@ -8,45 +8,12 @@ #define real4 dword #define real8 qword -# -# file: profile.cpp -# typedef struct _PROFILE_PLATFORM_SPECIFIC_DATA -# { -# FunctionID *functionId; # function ID comes in the r11 register -# void *rbp; -# void *probersp; -# void *ip; -# void *profiledRsp; -# UINT64 rax; -# LPVOID hiddenArg; -# UINT64 flt0; -# UINT64 flt1; -# UINT64 flt2; -# UINT64 flt3; -# UINT64 flt4; -# UINT64 flt5; -# UINT64 flt6; -# UINT64 flt7; -# UINT64 rdi; -# UINT64 rsi; -# UINT64 rdx; -# UINT64 rcx; -# UINT64 r8; -# UINT64 r9; -# UINT32 flags; -# UINT64 buffer[PROFILE_PLATFORM_SPECIFIC_DATA_BUFFER_SIZE]; -# } PROFILE_PLATFORM_SPECIFIC_DATA, *PPROFILE_PLATFORM_SPECIFIC_DATA; - # On linux arguments can be passed in non-sequential registers. Integer arguments are # passed in sequential integer registers and floating point registers are passed in # sequential floating point registers. This presents a problem when we go to pass the # struct argument as a COR_PRF_FUNCTION_ARGUMENT_RANGE which expects the arguments are # in one contiguous range. This space is a scratch space that the ArgIterator can use # to copy the structs to so they are sequential. -.equ SIZEOF_PROFILE_STRUCT_BUFFER, 0x8*16 - -# Space for register spilling -.equ SIZEOF_PROFILE_PLATFORM_SPECIFIC_DATA, 0x8*22 + SIZEOF_PROFILE_STRUCT_BUFFER # Pad the frame size by 0x8 so when the xmm0 and xmm1 register store/restore happens # we can align to 16 and be guaranteed to not exceed the frame size @@ -57,11 +24,7 @@ # data struct that we spill the general purpose registers to, then space to # spill xmm0 and xmm1, then finally 8 bytes of padding to ensure that the xmm # register reads/writes are aligned on 16 bytes. -.equ SIZEOF_STACK_FRAME, SIZEOF_PROFILE_PLATFORM_SPECIFIC_DATA + STACK_FUDGE_FACTOR - -.equ PROFILE_ENTER, 0x1 -.equ PROFILE_LEAVE, 0x2 -.equ PROFILE_TAILCALL, 0x4 +.equ SIZEOF_STACK_FRAME, SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA + STACK_FUDGE_FACTOR # *********************************************************** # NOTE: @@ -102,29 +65,29 @@ NESTED_ENTRY ProfileEnterNaked, _TEXT, NoHandler # setup ProfilePlatformSpecificData structure xor r11, r11 # nullify r11 - mov [rsp + 0x0], r11 # r11 is null -- struct functionId field - save_reg_postrsp rbp, 0x8 # -- struct rbp field - mov [rsp + 0x10], rax # caller rsp -- struct probeRsp field - mov [rsp + 0x18], r10 # return address -- struct ip field - mov [rsp + 0x20], r15 # -- struct profiledRsp field - mov [rsp + 0x28], r11 # return value -- struct rax field - mov [rsp + 0x30], r11 # r11 is null -- struct hiddenArg field - movsd real8 ptr [rsp + 0x38], xmm0 # -- struct flt0 field - movsd real8 ptr [rsp + 0x40], xmm1 # -- struct flt1 field - movsd real8 ptr [rsp + 0x48], xmm2 # -- struct flt2 field - movsd real8 ptr [rsp + 0x50], xmm3 # -- struct flt3 field - movsd real8 ptr [rsp + 0x58], xmm4 # -- struct flt4 field - movsd real8 ptr [rsp + 0x60], xmm5 # -- struct flt5 field - movsd real8 ptr [rsp + 0x68], xmm6 # -- struct flt6 field - movsd real8 ptr [rsp + 0x70], xmm7 # -- struct flt7 field - mov [rsp + 0x78], rdi # -- struct rdi field - mov [rsp + 0x80], rsi # -- struct rsi field - mov [rsp + 0x88], rdx # -- struct rdx field - mov [rsp + 0x90], rcx # -- struct rcx field - mov [rsp + 0x98], r8 # -- struct r8 field - mov [rsp + 0xa0], r9 # -- struct r9 field - mov r10, 0x1 # PROFILE_ENTER - mov [rsp + 0xa8], r10d # -- struct flags field + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__functionId], r11 + save_reg_postrsp rbp, PROFILE_PLATFORM_SPECIFIC_DATA__rbp + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__probeRsp], rax # caller rsp + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__ip], r10 # return address + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__profiledRsp], r15 + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__rax], r11 # return value + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__hiddenArg], r11 # r11 is null + movsd real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt0], xmm0 + movsd real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt1], xmm1 + movsd real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt2], xmm2 + movsd real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt3], xmm3 + movsd real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt4], xmm4 + movsd real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt5], xmm5 + movsd real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt6], xmm6 + movsd real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt7], xmm7 + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__rdi], rdi + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__rsi], rsi + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__rdx], rdx + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__rcx], rcx + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__r8], r8 + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__r9], r9 + mov r10, PROFILE_ENTER + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flags], r10d END_PROLOGUE @@ -134,22 +97,22 @@ NESTED_ENTRY ProfileEnterNaked, _TEXT, NoHandler call C_FUNC(ProfileEnter) # restore fp return registers - movsd xmm0, real8 ptr [rsp + 0x38] # -- struct flt0 field - movsd xmm1, real8 ptr [rsp + 0x40] # -- struct flt1 field - movsd xmm2, real8 ptr [rsp + 0x48] # -- struct flt2 field - movsd xmm3, real8 ptr [rsp + 0x50] # -- struct flt3 field - movsd xmm4, real8 ptr [rsp + 0x58] # -- struct flt4 field - movsd xmm5, real8 ptr [rsp + 0x60] # -- struct flt5 field - movsd xmm6, real8 ptr [rsp + 0x68] # -- struct flt6 field - movsd xmm7, real8 ptr [rsp + 0x70] # -- struct flt7 field + movsd xmm0, real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt0] + movsd xmm1, real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt1] + movsd xmm2, real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt2] + movsd xmm3, real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt3] + movsd xmm4, real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt4] + movsd xmm5, real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt5] + movsd xmm6, real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt6] + movsd xmm7, real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt7] # restore arg registers - mov rdi, [rsp + 0x78] - mov rsi, [rsp + 0x80] - mov rdx, [rsp + 0x88] - mov rcx, [rsp + 0x90] - mov r8, [rsp + 0x98] - mov r9, [rsp + 0xa0] + mov rdi, [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__rdi] + mov rsi, [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__rsi] + mov rdx, [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__rdx] + mov rcx, [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__rcx] + mov r8, [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__r8] + mov r9, [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__r9] # begin epilogue free_stack SIZEOF_STACK_FRAME @@ -182,29 +145,29 @@ NESTED_ENTRY ProfileLeaveNaked, _TEXT, NoHandler # setup ProfilePlatformSpecificData structure xor r11, r11 # nullify r11 - mov [rsp + 0x0], r11 # r11 is null -- struct functionId field - save_reg_postrsp rbp, 0x8 # -- struct rbp field - mov [rsp + 0x10], rbx # caller rsp -- struct probeRsp field - mov [rsp + 0x18], r10 # return address -- struct ip field - mov [rsp + 0x20], rsi # -- struct profiledRsp field - mov [rsp + 0x28], rax # return value -- struct rax field - mov [rsp + 0x30], r11 # r11 is null -- struct hiddenArg field - movsd real8 ptr [rsp + 0x38], xmm0 # -- struct flt0 field - movsd real8 ptr [rsp + 0x40], xmm1 # -- struct flt1 field - movsd real8 ptr [rsp + 0x48], xmm2 # -- struct flt2 field - movsd real8 ptr [rsp + 0x50], xmm3 # -- struct flt3 field - movsd real8 ptr [rsp + 0x58], xmm4 # -- struct flt4 field - movsd real8 ptr [rsp + 0x60], xmm5 # -- struct flt5 field - movsd real8 ptr [rsp + 0x68], xmm6 # -- struct flt6 field - movsd real8 ptr [rsp + 0x70], xmm7 # -- struct flt7 field - mov [rsp + 0x78], r11 # -- struct rdi field - mov [rsp + 0x80], r11 # -- struct rsi field - mov [rsp + 0x88], rdx # -- struct rdx field - mov [rsp + 0x90], r11 # -- struct rcx field - mov [rsp + 0x98], r11 # -- struct r8 field - mov [rsp + 0xa0], r11 # -- struct r9 field - mov r10, 0x2 # PROFILE_LEAVE - mov [rsp + 0xa8], r10d # flags -- struct flags field + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__functionId], r11 # r11 is null + save_reg_postrsp rbp, PROFILE_PLATFORM_SPECIFIC_DATA__rbp + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__probeRsp], rbx # caller rsp + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__ip], r10 # return address + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__profiledRsp], rsi + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__rax], rax # return value + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__hiddenArg], r11 # r11 is null + movsd real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt0], xmm0 + movsd real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt1], xmm1 + movsd real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt2], xmm2 + movsd real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt3], xmm3 + movsd real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt4], xmm4 + movsd real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt5], xmm5 + movsd real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt6], xmm6 + movsd real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt7], xmm7 + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__rdi], r11 + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__rsi], r11 + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__rdx], rdx + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__rcx], r11 + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__r8], r11 + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__r9], r11 + mov r10, PROFILE_LEAVE + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flags], r10d END_PROLOGUE @@ -213,17 +176,17 @@ NESTED_ENTRY ProfileLeaveNaked, _TEXT, NoHandler call C_FUNC(ProfileLeave) # restore fp return registers - movsd xmm0, real8 ptr [rsp + 0x38] # -- struct flt0 field - movsd xmm1, real8 ptr [rsp + 0x40] # -- struct flt1 field - movsd xmm2, real8 ptr [rsp + 0x48] # -- struct flt2 field - movsd xmm3, real8 ptr [rsp + 0x50] # -- struct flt3 field - movsd xmm4, real8 ptr [rsp + 0x58] # -- struct flt4 field - movsd xmm5, real8 ptr [rsp + 0x60] # -- struct flt5 field - movsd xmm6, real8 ptr [rsp + 0x68] # -- struct flt6 field - movsd xmm7, real8 ptr [rsp + 0x70] # -- struct flt7 field + movsd xmm0, real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt0] + movsd xmm1, real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt1] + movsd xmm2, real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt2] + movsd xmm3, real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt3] + movsd xmm4, real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt4] + movsd xmm5, real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt5] + movsd xmm6, real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt6] + movsd xmm7, real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt7] # restore int return register - mov rax, [rsp + 0x28] + mov rax, [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__rax] # begin epilogue free_stack SIZEOF_STACK_FRAME @@ -256,29 +219,29 @@ NESTED_ENTRY ProfileTailcallNaked, _TEXT, NoHandler # setup ProfilePlatformSpecificData structure xor r11, r11 # nullify r11 - mov [rsp + 0x0], r11 # r11 is null -- struct functionId field - save_reg_postrsp rbp, 0x8 # -- struct rbp field - mov [rsp + 0x10], rbx # caller rsp -- struct probeRsp field - mov [rsp + 0x18], r10 # return address -- struct ip field - mov [rsp + 0x20], rsi # -- struct profiledRsp field - mov [rsp + 0x28], rax # return value -- struct rax field - mov [rsp + 0x30], r11 # r11 is null -- struct hiddenArg field - movsd real8 ptr [rsp + 0x38], xmm0 # -- struct flt0 field - movsd real8 ptr [rsp + 0x40], xmm1 # -- struct flt1 field - movsd real8 ptr [rsp + 0x48], xmm2 # -- struct flt2 field - movsd real8 ptr [rsp + 0x50], xmm3 # -- struct flt3 field - movsd real8 ptr [rsp + 0x58], xmm4 # -- struct flt4 field - movsd real8 ptr [rsp + 0x60], xmm5 # -- struct flt5 field - movsd real8 ptr [rsp + 0x68], xmm6 # -- struct flt6 field - movsd real8 ptr [rsp + 0x70], xmm7 # -- struct flt7 field - mov [rsp + 0x78], r11 # -- struct rdi field - mov [rsp + 0x80], r11 # -- struct rsi field - mov [rsp + 0x88], rdx # -- struct rdx field - mov [rsp + 0x90], r11 # -- struct rcx field - mov [rsp + 0x98], r11 # -- struct r8 field - mov [rsp + 0xa0], r11 # -- struct r9 field - mov r10, 0x2 # PROFILE_LEAVE - mov [rsp + 0xa8], r10d # flags -- struct flags field + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__functionId], r11 # r11 is null + save_reg_postrsp rbp, PROFILE_PLATFORM_SPECIFIC_DATA__rbp + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__probeRsp], rbx # caller rsp + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__ip], r10 # return address + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__profiledRsp], rsi + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__rax], rax # return value + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__hiddenArg], r11 # r11 is null + movsd real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt0], xmm0 + movsd real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt1], xmm1 + movsd real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt2], xmm2 + movsd real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt3], xmm3 + movsd real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt4], xmm4 + movsd real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt5], xmm5 + movsd real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt6], xmm6 + movsd real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt7], xmm7 + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__rdi], r11 + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__rsi], r11 + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__rdx], rdx + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__rcx], r11 + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__r8], r11 + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__r9], r11 + mov r10, PROFILE_LEAVE + mov [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flags], r10d END_PROLOGUE @@ -287,17 +250,17 @@ NESTED_ENTRY ProfileTailcallNaked, _TEXT, NoHandler call C_FUNC(ProfileTailcall) # restore fp return registers - movsd xmm0, real8 ptr [rsp + 0x38] # -- struct flt0 field - movsd xmm1, real8 ptr [rsp + 0x40] # -- struct flt1 field - movsd xmm2, real8 ptr [rsp + 0x48] # -- struct flt2 field - movsd xmm3, real8 ptr [rsp + 0x50] # -- struct flt3 field - movsd xmm4, real8 ptr [rsp + 0x58] # -- struct flt4 field - movsd xmm5, real8 ptr [rsp + 0x60] # -- struct flt5 field - movsd xmm6, real8 ptr [rsp + 0x68] # -- struct flt6 field - movsd xmm7, real8 ptr [rsp + 0x70] # -- struct flt7 field + movsd xmm0, real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt0] + movsd xmm1, real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt1] + movsd xmm2, real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt2] + movsd xmm3, real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt3] + movsd xmm4, real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt4] + movsd xmm5, real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt5] + movsd xmm6, real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt6] + movsd xmm7, real8 ptr [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__flt7] # restore int return register - mov rax, [rsp + 0x28] + mov rax, [rsp + PROFILE_PLATFORM_SPECIFIC_DATA__rax] # begin epilogue free_stack SIZEOF_STACK_FRAME diff --git a/src/coreclr/vm/amd64/calldescrworkeramd64.S b/src/coreclr/vm/amd64/calldescrworkeramd64.S index 532192bf4fb9f7..329979c120a647 100644 --- a/src/coreclr/vm/amd64/calldescrworkeramd64.S +++ b/src/coreclr/vm/amd64/calldescrworkeramd64.S @@ -95,7 +95,7 @@ LOCAL_LABEL(NoStackArguments): movsd xmm7, [rax + 112] LOCAL_LABEL(NoFloatArguments): call qword ptr [rbx + CallDescrData__pTarget] // call target function - +LOCAL_LABEL(CallDescrWorkerInternalReturnAddress): // Save FP return value mov ecx, dword ptr [rbx + CallDescrData__fpReturnSize] @@ -159,6 +159,7 @@ LOCAL_LABEL(ReturnsDouble): movsd real8 ptr [rbx+CallDescrData__returnValue], xmm0 jmp LOCAL_LABEL(Epilog) -NESTED_END CallDescrWorkerInternal, _TEXT - +PATCH_LABEL CallDescrWorkerInternalReturnAddressOffset + .quad LOCAL_LABEL(CallDescrWorkerInternalReturnAddress) - C_FUNC(CallDescrWorkerInternal) +NESTED_END CallDescrWorkerInternal, _TEXT diff --git a/src/coreclr/vm/amd64/cgencpu.h b/src/coreclr/vm/amd64/cgencpu.h index fbd0351dd1c73f..5dcaf12dfb8120 100644 --- a/src/coreclr/vm/amd64/cgencpu.h +++ b/src/coreclr/vm/amd64/cgencpu.h @@ -277,7 +277,47 @@ struct EHContext { #include "stublinkeramd64.h" +//********************************************************************** +// Profiling +//********************************************************************** + +#ifdef PROFILING_SUPPORTED + +#define PROFILE_PLATFORM_SPECIFIC_DATA_BUFFER_SIZE 16 + +typedef struct _PROFILE_PLATFORM_SPECIFIC_DATA +{ + FunctionID functionId; + void *rbp; + void *probeRsp; + void *ip; + void *profiledRsp; + UINT64 rax; + LPVOID hiddenArg; + UINT64 flt0; // floats stored as doubles + UINT64 flt1; + UINT64 flt2; + UINT64 flt3; +#if defined(UNIX_AMD64_ABI) + UINT64 flt4; + UINT64 flt5; + UINT64 flt6; + UINT64 flt7; + UINT64 rdi; + UINT64 rsi; + UINT64 rdx; + UINT64 rcx; + UINT64 r8; + UINT64 r9; +#endif + UINT32 flags; +#if defined(UNIX_AMD64_ABI) + // A buffer to copy structs in to so they are sequential for GetFunctionEnter3Info. + UINT64 buffer[PROFILE_PLATFORM_SPECIFIC_DATA_BUFFER_SIZE]; +#endif +} PROFILE_PLATFORM_SPECIFIC_DATA, *PPROFILE_PLATFORM_SPECIFIC_DATA; +#endif // PROFILING_SUPPORTED //********************************************************************** // Exception handling @@ -342,7 +382,7 @@ inline void SetSP(CONTEXT *context, TADDR rsp) context->Rsp = rsp; } -#if defined(TARGET_WINDOWS) && !defined(DACCESS_COMPILE) +#if !defined(DACCESS_COMPILE) inline DWORD64 GetSSP(const CONTEXT * context) { CONTRACTL @@ -353,13 +393,15 @@ inline DWORD64 GetSSP(const CONTEXT * context) PRECONDITION(CheckPointer(context)); } CONTRACTL_END; - +#ifdef TARGET_WINDOWS XSAVE_CET_U_FORMAT* pCET = (XSAVE_CET_U_FORMAT*)LocateXStateFeature(const_cast(context), XSTATE_CET_U, NULL); if ((pCET != NULL) && (pCET->Ia32CetUMsr != 0)) { return pCET->Ia32Pl3SspMsr; } - +#else + // TODO: implement when we enable Intel CET on Unix +#endif return 0; } @@ -374,14 +416,18 @@ inline void SetSSP(CONTEXT *context, DWORD64 ssp) } CONTRACTL_END; +#ifdef TARGET_WINDOWS XSAVE_CET_U_FORMAT* pCET = (XSAVE_CET_U_FORMAT*)LocateXStateFeature(context, XSTATE_CET_U, NULL); if (pCET != NULL) { pCET->Ia32Pl3SspMsr = ssp; pCET->Ia32CetUMsr = 1; } +#else + // TODO: implement when we enable Intel CET on Unix +#endif } -#endif // TARGET_WINDOWS && !DACCESS_COMPILE +#endif // !DACCESS_COMPILE #define SetFP(context, ebp) inline TADDR GetFP(const CONTEXT * context) diff --git a/src/coreclr/vm/amd64/jithelpers_fast.S b/src/coreclr/vm/amd64/jithelpers_fast.S index 32890b471b26c1..72f91a18061579 100644 --- a/src/coreclr/vm/amd64/jithelpers_fast.S +++ b/src/coreclr/vm/amd64/jithelpers_fast.S @@ -32,16 +32,16 @@ LEAF_ENTRY JIT_CheckedWriteBarrier, _TEXT // See if this is in GCHeap PREPARE_EXTERNAL_VAR g_lowest_address, rax cmp rdi, [rax] - // jb NotInHeap + // jb LOCAL_LABEL(NotInHeap) .byte 0x72, 0x12 PREPARE_EXTERNAL_VAR g_highest_address, rax cmp rdi, [rax] - // jnb NotInHeap + // jnb LOCAL_LABEL(NotInHeap) .byte 0x73, 0x06 jmp [rip + C_FUNC(JIT_WriteBarrier_Loc)] - NotInHeap: + LOCAL_LABEL(NotInHeap): // See comment above about possible AV mov [rdi], rsi ret @@ -85,16 +85,16 @@ LEAF_ENTRY JIT_WriteBarrier, _TEXT add rax, r10 cmp byte ptr [rax], 0x0 .byte 0x75, 0x06 - // jne CheckCardTable + // jne LOCAL_LABEL(CheckCardTable) mov byte ptr [rax], 0xFF NOP_3_BYTE // padding for alignment of constant // Check the lower and upper ephemeral region bounds - CheckCardTable: + LOCAL_LABEL(CheckCardTable): cmp rsi, r11 .byte 0x72,0x3D - // jb Exit + // jb LOCAL_LABEL(Exit) NOP_3_BYTE // padding for alignment of constant @@ -102,7 +102,7 @@ LEAF_ENTRY JIT_WriteBarrier, _TEXT cmp rsi, r10 .byte 0x73,0x2B - // jae Exit + // jae LOCAL_LABEL(Exit) nop // padding for alignment of constant @@ -112,10 +112,10 @@ LEAF_ENTRY JIT_WriteBarrier, _TEXT shr rdi, 0x0B cmp byte ptr [rdi + rax], 0xFF .byte 0x75, 0x02 - // jne UpdateCardTable + // jne LOCAL_LABEL(UpdateCardTable) REPRET - UpdateCardTable: + LOCAL_LABEL(UpdateCardTable): mov byte ptr [rdi + rax], 0xFF #ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES @@ -126,17 +126,17 @@ LEAF_ENTRY JIT_WriteBarrier, _TEXT cmp byte ptr [rdi + rax], 0xFF .byte 0x75, 0x02 - // jne UpdateCardBundle_WriteWatch_PostGrow64 + // jne LOCAL_LABEL(UpdateCardBundle_WriteWatch_PostGrow64) REPRET - UpdateCardBundle_WriteWatch_PostGrow64: + LOCAL_LABEL(UpdateCardBundle_WriteWatch_PostGrow64): mov byte ptr [rdi + rax], 0xFF #endif ret .balign 16 - Exit: + LOCAL_LABEL(Exit): REPRET NOP_3_BYTE @@ -184,7 +184,7 @@ LEAF_ENTRY JIT_WriteBarrier, _TEXT // Check the lower and upper ephemeral region bounds cmp rsi, rax - // jb Exit + // jb LOCAL_LABEL(Exit) .byte 0x72, 0x36 nop // padding for alignment of constant @@ -192,7 +192,7 @@ LEAF_ENTRY JIT_WriteBarrier, _TEXT movabs r8, 0xF0F0F0F0F0F0F0F0 cmp rsi, r8 - // jae Exit + // jae LOCAL_LABEL(Exit) .byte 0x73, 0x26 nop // padding for alignment of constant @@ -203,10 +203,10 @@ LEAF_ENTRY JIT_WriteBarrier, _TEXT shr rdi, 0Bh cmp byte ptr [rdi + rax], 0FFh .byte 0x75, 0x02 - // jne UpdateCardTable + // jne LOCAL_LABEL(UpdateCardTable) REPRET - UpdateCardTable: + LOCAL_LABEL(UpdateCardTable): mov byte ptr [rdi + rax], 0FFh #ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES @@ -220,17 +220,17 @@ LEAF_ENTRY JIT_WriteBarrier, _TEXT cmp byte ptr [rdi + rax], 0FFh .byte 0x75, 0x02 - // jne UpdateCardBundle + // jne LOCAL_LABEL(UpdateCardBundle) REPRET - UpdateCardBundle: + LOCAL_LABEL(UpdateCardBundle): mov byte ptr [rdi + rax], 0FFh #endif ret .balign 16 - Exit: + LOCAL_LABEL(Exit): REPRET #endif @@ -277,30 +277,30 @@ LEAF_ENTRY JIT_ByRefWriteBarrier, _TEXT // See if this is in GCHeap PREPARE_EXTERNAL_VAR g_lowest_address, rax cmp rdi, [rax] - jb NotInHeap_ByRefWriteBarrier + jb LOCAL_LABEL(NotInHeap_ByRefWriteBarrier) PREPARE_EXTERNAL_VAR g_highest_address, rax cmp rdi, [rax] - jnb NotInHeap_ByRefWriteBarrier + jnb LOCAL_LABEL(NotInHeap_ByRefWriteBarrier) #ifdef WRITE_BARRIER_CHECK // **ALSO update the shadow GC heap if that is enabled** // Do not perform the work if g_GCShadow is 0 PREPARE_EXTERNAL_VAR g_GCShadow, rax cmp qword ptr [rax], 0 - je NoShadow_ByRefWriteBarrier + je LOCAL_LABEL(NoShadow_ByRefWriteBarrier) // If we end up outside of the heap don't corrupt random memory mov r10, rdi PREPARE_EXTERNAL_VAR g_lowest_address, rax sub r10, [rax] - jb NoShadow_ByRefWriteBarrier + jb LOCAL_LABEL(NoShadow_ByRefWriteBarrier) // Check that our adjusted destination is somewhere in the shadow gc PREPARE_EXTERNAL_VAR g_GCShadow, rax add r10, [rax] PREPARE_EXTERNAL_VAR g_GCShadowEnd, rax cmp r10, [rax] - jnb NoShadow_ByRefWriteBarrier + jnb LOCAL_LABEL(NoShadow_ByRefWriteBarrier) // Write ref into real GC mov [rdi], rcx @@ -315,73 +315,73 @@ LEAF_ENTRY JIT_ByRefWriteBarrier, _TEXT mov r11, [rdi] mov rax, [r10] cmp rax, r11 - je DoneShadow_ByRefWriteBarrier + je LOCAL_LABEL(DoneShadow_ByRefWriteBarrier) movabs r11, INVALIDGCVALUE mov [r10], r11 - jmp DoneShadow_ByRefWriteBarrier + jmp LOCAL_LABEL(DoneShadow_ByRefWriteBarrier) // If we don't have a shadow GC we won't have done the write yet - NoShadow_ByRefWriteBarrier: + LOCAL_LABEL(NoShadow_ByRefWriteBarrier): mov [rdi], rcx // If we had a shadow GC then we already wrote to the real GC at the same time // as the shadow GC so we want to jump over the real write immediately above. // Additionally we know for sure that we are inside the heap and therefore don't // need to replicate the above checks. - DoneShadow_ByRefWriteBarrier: + LOCAL_LABEL(DoneShadow_ByRefWriteBarrier): #endif #ifdef FEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP // Update the write watch table if necessary PREPARE_EXTERNAL_VAR g_sw_ww_enabled_for_gc_heap, rax cmp byte ptr [rax], 0x0 - je CheckCardTable_ByRefWriteBarrier + je LOCAL_LABEL(CheckCardTable_ByRefWriteBarrier) mov rax, rdi shr rax, 0xC // SoftwareWriteWatch::AddressToTableByteIndexShift PREPARE_EXTERNAL_VAR g_sw_ww_table, r10 add rax, qword ptr [r10] cmp byte ptr [rax], 0x0 - jne CheckCardTable_ByRefWriteBarrier + jne LOCAL_LABEL(CheckCardTable_ByRefWriteBarrier) mov byte ptr [rax], 0xFF #endif - CheckCardTable_ByRefWriteBarrier: + LOCAL_LABEL(CheckCardTable_ByRefWriteBarrier): // See if we can just quick out PREPARE_EXTERNAL_VAR g_ephemeral_low, rax cmp rcx, [rax] - jb Exit_ByRefWriteBarrier + jb LOCAL_LABEL(Exit_ByRefWriteBarrier) PREPARE_EXTERNAL_VAR g_ephemeral_high, rax cmp rcx, [rax] - jnb Exit_ByRefWriteBarrier + jnb LOCAL_LABEL(Exit_ByRefWriteBarrier) mov rax, rcx PREPARE_EXTERNAL_VAR g_region_shr, rcx mov cl, [rcx] test cl, cl - je SkipCheck_ByRefWriteBarrier + je LOCAL_LABEL(SkipCheck_ByRefWriteBarrier) // check if the source is in gen 2 - then it's not an ephemeral pointer shr rax, cl PREPARE_EXTERNAL_VAR g_region_to_generation_table, r10 mov r10, [r10] cmp byte ptr [rax + r10], 0x82 - je Exit_ByRefWriteBarrier + je LOCAL_LABEL(Exit_ByRefWriteBarrier) // check if the destination happens to be in gen 0 mov rax, rdi shr rax, cl cmp byte ptr [rax + r10], 0 - je Exit_ByRefWriteBarrier - SkipCheck_ByRefWriteBarrier: + je LOCAL_LABEL(Exit_ByRefWriteBarrier) + LOCAL_LABEL(SkipCheck_ByRefWriteBarrier): PREPARE_EXTERNAL_VAR g_card_table, r10 mov r10, [r10] PREPARE_EXTERNAL_VAR g_region_use_bitwise_write_barrier, rax cmp byte ptr [rax], 0 - je CheckCardTableByte_ByRefWriteBarrier + je LOCAL_LABEL(CheckCardTableByte_ByRefWriteBarrier) // compute card table bit mov ecx, edi @@ -400,15 +400,15 @@ LEAF_ENTRY JIT_ByRefWriteBarrier, _TEXT shr rcx, 0xB // Check if this card table bit is already set test byte ptr [rcx + r10], al - je SetCardTableBit_ByRefWriteBarrier + je LOCAL_LABEL(SetCardTableBit_ByRefWriteBarrier) REPRET - SetCardTableBit_ByRefWriteBarrier: + LOCAL_LABEL(SetCardTableBit_ByRefWriteBarrier): lock or byte ptr [rcx + r10], al - jmp CheckCardBundle_ByRefWriteBarrier + jmp LOCAL_LABEL(CheckCardBundle_ByRefWriteBarrier) - CheckCardTableByte_ByRefWriteBarrier: + LOCAL_LABEL(CheckCardTableByte_ByRefWriteBarrier): // move current rdi value into rcx and then increment the pointers mov rcx, rdi add rsi, 0x8 @@ -416,12 +416,12 @@ LEAF_ENTRY JIT_ByRefWriteBarrier, _TEXT shr rcx, 0xB cmp byte ptr [rcx + r10], 0xFF - jne SetCardTableByte_ByRefWriteBarrier + jne LOCAL_LABEL(SetCardTableByte_ByRefWriteBarrier) REPRET - SetCardTableByte_ByRefWriteBarrier: + LOCAL_LABEL(SetCardTableByte_ByRefWriteBarrier): mov byte ptr [rcx + r10], 0xFF - CheckCardBundle_ByRefWriteBarrier: + LOCAL_LABEL(CheckCardBundle_ByRefWriteBarrier): #ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES // Shift rcx by 0x0A more to get the card bundle byte (we shifted by 0x0B already) @@ -433,17 +433,17 @@ LEAF_ENTRY JIT_ByRefWriteBarrier, _TEXT // Check if this bundle byte is dirty cmp byte ptr [rcx], 0xFF - jne UpdateCardBundle_ByRefWriteBarrier + jne LOCAL_LABEL(UpdateCardBundle_ByRefWriteBarrier) REPRET - UpdateCardBundle_ByRefWriteBarrier: + LOCAL_LABEL(UpdateCardBundle_ByRefWriteBarrier): mov byte ptr [rcx], 0xFF #endif ret .balign 16 - NotInHeap_ByRefWriteBarrier: + LOCAL_LABEL(NotInHeap_ByRefWriteBarrier): // If WRITE_BARRIER_CHECK then we won't have already done the mov and should do it here // If !WRITE_BARRIER_CHECK we want _NotInHeap and _Leave to be the same and have both // 16 byte aligned. @@ -451,7 +451,7 @@ LEAF_ENTRY JIT_ByRefWriteBarrier, _TEXT // rcx is [rsi] mov [rdi], rcx #endif - Exit_ByRefWriteBarrier: + LOCAL_LABEL(Exit_ByRefWriteBarrier): // Increment the pointers before leaving add rdi, 0x8 add rsi, 0x8 diff --git a/src/coreclr/vm/amd64/profiler.cpp b/src/coreclr/vm/amd64/profiler.cpp index a290016b131ff8..26d9b970a7da2e 100644 --- a/src/coreclr/vm/amd64/profiler.cpp +++ b/src/coreclr/vm/amd64/profiler.cpp @@ -12,52 +12,12 @@ #include "common.h" #ifdef PROFILING_SUPPORTED +#include "asmconstants.h" #include "proftoeeinterfaceimpl.h" #include "argdestination.h" MethodDesc *FunctionIdToMethodDesc(FunctionID functionID); -// TODO: move these to some common.h file -// FLAGS -#define PROFILE_ENTER 0x1 -#define PROFILE_LEAVE 0x2 -#define PROFILE_TAILCALL 0x4 - -#define PROFILE_PLATFORM_SPECIFIC_DATA_BUFFER_SIZE 16 - -typedef struct _PROFILE_PLATFORM_SPECIFIC_DATA -{ - FunctionID functionId; - void *rbp; - void *probeRsp; - void *ip; - void *profiledRsp; - UINT64 rax; - LPVOID hiddenArg; - UINT64 flt0; // floats stored as doubles - UINT64 flt1; - UINT64 flt2; - UINT64 flt3; -#if defined(UNIX_AMD64_ABI) - UINT64 flt4; - UINT64 flt5; - UINT64 flt6; - UINT64 flt7; - UINT64 rdi; - UINT64 rsi; - UINT64 rdx; - UINT64 rcx; - UINT64 r8; - UINT64 r9; -#endif - UINT32 flags; -#if defined(UNIX_AMD64_ABI) - // A buffer to copy structs in to so they are sequential for GetFunctionEnter3Info. - UINT64 buffer[PROFILE_PLATFORM_SPECIFIC_DATA_BUFFER_SIZE]; -#endif -} PROFILE_PLATFORM_SPECIFIC_DATA, *PPROFILE_PLATFORM_SPECIFIC_DATA; - - /* * ProfileGetIPFromPlatformSpecificHandle * diff --git a/src/coreclr/vm/appdomain.cpp b/src/coreclr/vm/appdomain.cpp index ab6a99b5af76a8..51aec1b9e1c69d 100644 --- a/src/coreclr/vm/appdomain.cpp +++ b/src/coreclr/vm/appdomain.cpp @@ -1139,7 +1139,7 @@ void SystemDomain::Init() // At this point m_SystemDirectory should already be canonicalized m_BaseLibrary.Append(m_SystemDirectory); - if (!m_BaseLibrary.EndsWith(DIRECTORY_SEPARATOR_CHAR_W)) + if (!m_BaseLibrary.EndsWith(SString{ DIRECTORY_SEPARATOR_CHAR_W })) { m_BaseLibrary.Append(DIRECTORY_SEPARATOR_CHAR_W); } @@ -1399,6 +1399,10 @@ void SystemDomain::LoadBaseSystemClasses() g_pICastableInterface = CoreLibBinder::GetClass(CLASS__ICASTABLE); #endif // FEATURE_ICASTABLE +#ifdef FEATURE_EH_FUNCLETS + g_pEHClass = CoreLibBinder::GetClass(CLASS__EH); +#endif + // Make sure that FCall mapping for Monitor.Enter is initialized. We need it in case Monitor.Enter is used only as JIT helper. // For more details, see comment in code:JITutil_MonEnterWorker around "__me = GetEEFuncEntryPointMacro(JIT_MonEnter)". ECall::GetFCallImpl(CoreLibBinder::GetMethod(METHOD__MONITOR__ENTER)); diff --git a/src/coreclr/vm/appdomain.hpp b/src/coreclr/vm/appdomain.hpp index 2103ba6c654593..cc974b4a726707 100644 --- a/src/coreclr/vm/appdomain.hpp +++ b/src/coreclr/vm/appdomain.hpp @@ -1066,12 +1066,6 @@ class BaseDomain } #endif // FEATURE_COMINTEROP || FEATURE_COMWRAPPERS - OBJECTHANDLE CreateVariableHandle(OBJECTREF object, UINT type) - { - WRAPPER_NO_CONTRACT; - return ::CreateVariableHandle(m_handleStore, object, type); - } - OBJECTHANDLE CreateDependentHandle(OBJECTREF primary, OBJECTREF secondary) { WRAPPER_NO_CONTRACT; @@ -2451,12 +2445,24 @@ class SystemDomain : public BaseDomain } static FrozenObjectHeapManager* GetFrozenObjectHeapManager() { - WRAPPER_NO_CONTRACT; - if (m_FrozenObjectHeapManager == NULL) + CONTRACTL + { + THROWS; + MODE_COOPERATIVE; + } + CONTRACTL_END; + + if (VolatileLoad(&m_FrozenObjectHeapManager) == nullptr) { LazyInitFrozenObjectsHeap(); } - return m_FrozenObjectHeapManager; + return VolatileLoad(&m_FrozenObjectHeapManager); + } + static FrozenObjectHeapManager* GetFrozenObjectHeapManagerNoThrow() + { + LIMITED_METHOD_CONTRACT; + + return VolatileLoad(&m_FrozenObjectHeapManager); } #endif // DACCESS_COMPILE diff --git a/src/coreclr/vm/arm/asmconstants.h b/src/coreclr/vm/arm/asmconstants.h index b3b16f1ed62c9c..a03ca4e7211a3f 100644 --- a/src/coreclr/vm/arm/asmconstants.h +++ b/src/coreclr/vm/arm/asmconstants.h @@ -235,5 +235,30 @@ ASMCONSTANTS_C_ASSERT(CallCountingStubData__TargetForMethod == offsetof(CallCoun #define CallCountingStubData__TargetForThresholdReached 0x08 ASMCONSTANTS_C_ASSERT(CallCountingStubData__TargetForThresholdReached == offsetof(CallCountingStubData, TargetForThresholdReached)) +#ifdef PROFILING_SUPPORTED +#define PROFILE_ENTER 0x1 +#define PROFILE_LEAVE 0x2 +#define PROFILE_TAILCALL 0x4 + +#define SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA 104 +ASMCONSTANTS_C_ASSERT(SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA == sizeof(PROFILE_PLATFORM_SPECIFIC_DATA)) + +#define ASMCONSTANTS_C_ASSERT_OFFSET(type, field) \ + ASMCONSTANTS_C_ASSERT(type##__##field == offsetof(type, field)) + +#define PROFILE_PLATFORM_SPECIFIC_DATA__functionId 80 +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, functionId) +#define PROFILE_PLATFORM_SPECIFIC_DATA__probeSp 84 +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, probeSp) +#define PROFILE_PLATFORM_SPECIFIC_DATA__profiledSp 88 +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, profiledSp) +#define PROFILE_PLATFORM_SPECIFIC_DATA__hiddenArg 92 +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, hiddenArg) +#define PROFILE_PLATFORM_SPECIFIC_DATA__flags 96 +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, flags) + +#undef ASMCONSTANTS_C_ASSERT_OFFSET +#endif // PROFILING_SUPPORTED + #undef ASMCONSTANTS_RUNTIME_ASSERT #undef ASMCONSTANTS_C_ASSERT diff --git a/src/coreclr/vm/arm/asmhelpers.S b/src/coreclr/vm/arm/asmhelpers.S index fbe856a6a43e32..997bd9ff74e7d4 100644 --- a/src/coreclr/vm/arm/asmhelpers.S +++ b/src/coreclr/vm/arm/asmhelpers.S @@ -71,6 +71,7 @@ LOCAL_LABEL(LNoFloatingPoint): // Note that remoting expect target in r4. ldr r4, [r5,#CallDescrData__pTarget] blx r4 +LOCAL_LABEL(CallDescrWorkerInternalReturnAddress): ldr r3, [r5,#CallDescrData__fpReturnSize] @@ -126,6 +127,9 @@ LOCAL_LABEL(LReturnDone): EPILOG_STACK_RESTORE_OFFSET r7, #8 EPILOG_POP "{r4,r5,r7,pc}" +PATCH_LABEL CallDescrWorkerInternalReturnAddressOffset + .word LOCAL_LABEL(CallDescrWorkerInternalReturnAddress) - C_FUNC(CallDescrWorkerInternal) + NESTED_END CallDescrWorkerInternal,_TEXT // ------------------------------------------------------------------ @@ -338,11 +342,8 @@ LEAF_ENTRY JIT_ProfilerEnterLeaveTailcallStub, _TEXT bx lr LEAF_END JIT_ProfilerEnterLeaveTailcallStub, _TEXT -#define PROFILE_ENTER 1 -#define PROFILE_LEAVE 2 -#define PROFILE_TAILCALL 4 // size of profiler data structure plus alignment padding -#define SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA 104+4 +#define PADDED_SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA+4 // typedef struct _PROFILE_PLATFORM_SPECIFIC_DATA // { @@ -381,23 +382,23 @@ NESTED_ENTRY \helper\()Naked, _TEXT, NoHandler CHECK_STACK_ALIGNMENT // set the other args, starting with functionID - str r0, [sp, #80] + str r0, [sp, PROFILE_PLATFORM_SPECIFIC_DATA__functionId] // probeSp is the original sp when this stub was called - add r2, sp, SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA+20 - str r2, [sp, #84] + add r2, sp, PADDED_SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA+20 + str r2, [sp, PROFILE_PLATFORM_SPECIFIC_DATA__probeSp] // get the address of the arguments from the frame pointer, store in profiledSp add r2, r11, #8 - str r2, [sp, #88] + str r2, [sp, PROFILE_PLATFORM_SPECIFIC_DATA__profiledSp] // clear hiddenArg movw r2, #0 - str r2, [sp, #92] + str r2, [sp, PROFILE_PLATFORM_SPECIFIC_DATA__hiddenArg] // set the flag to indicate what hook this is movw r2, \flags - str r2, [sp, #96] + str r2, [sp, PROFILE_PLATFORM_SPECIFIC_DATA__flags] // sp is the address of PROFILE_PLATFORM_SPECIFIC_DATA, then call to C++ mov r1, sp diff --git a/src/coreclr/vm/arm/cgencpu.h b/src/coreclr/vm/arm/cgencpu.h index d31700e3477a40..f60822ccaa87c2 100644 --- a/src/coreclr/vm/arm/cgencpu.h +++ b/src/coreclr/vm/arm/cgencpu.h @@ -174,6 +174,33 @@ struct EHContext { #define ARGUMENTREGISTERS_SIZE sizeof(ArgumentRegisters) + +//********************************************************************** +// Profiling +//********************************************************************** + +#ifdef PROFILING_SUPPORTED + +typedef struct _PROFILE_PLATFORM_SPECIFIC_DATA +{ + UINT32 r0; // Keep r0 & r1 contiguous to make returning 64-bit results easier + UINT32 r1; + void *R11; + void *Pc; + union // Float arg registers as 32-bit (s0-s15) and 64-bit (d0-d7) + { + UINT32 s[16]; + UINT64 d[8]; + }; + FunctionID functionId; + void *probeSp; // stack pointer of managed function + void *profiledSp; // location of arguments on stack + LPVOID hiddenArg; + UINT32 flags; +} PROFILE_PLATFORM_SPECIFIC_DATA, *PPROFILE_PLATFORM_SPECIFIC_DATA; + +#endif // PROFILING_SUPPORTED + //********************************************************************** // Exception handling //********************************************************************** @@ -996,7 +1023,7 @@ inline BOOL ClrFlushInstructionCache(LPCVOID pCodeAddr, size_t sizeOfCode, bool // Precode to shuffle this and retbuf for closed delegates over static methods with return buffer struct ThisPtrRetBufPrecode { - static const int Type = 0x46; + static const int Type = 0x01; // mov r12, r0 // mov r0, r1 diff --git a/src/coreclr/vm/arm/profiler.cpp b/src/coreclr/vm/arm/profiler.cpp index eba128093324fb..410417a667a01f 100644 --- a/src/coreclr/vm/arm/profiler.cpp +++ b/src/coreclr/vm/arm/profiler.cpp @@ -13,34 +13,10 @@ #ifdef PROFILING_SUPPORTED #include "proftoeeinterfaceimpl.h" +#include "asmconstants.h" MethodDesc *FunctionIdToMethodDesc(FunctionID functionID); -// TODO: move these to some common.h file -// FLAGS -#define PROFILE_ENTER 0x1 -#define PROFILE_LEAVE 0x2 -#define PROFILE_TAILCALL 0x4 - -typedef struct _PROFILE_PLATFORM_SPECIFIC_DATA -{ - UINT32 r0; // Keep r0 & r1 contiguous to make returning 64-bit results easier - UINT32 r1; - void *R11; - void *Pc; - union // Float arg registers as 32-bit (s0-s15) and 64-bit (d0-d7) - { - UINT32 s[16]; - UINT64 d[8]; - }; - FunctionID functionId; - void *probeSp; // stack pointer of managed function - void *profiledSp; // location of arguments on stack - LPVOID hiddenArg; - UINT32 flags; -} PROFILE_PLATFORM_SPECIFIC_DATA, *PPROFILE_PLATFORM_SPECIFIC_DATA; - - /* * ProfileGetIPFromPlatformSpecificHandle * diff --git a/src/coreclr/vm/arm/stubs.cpp b/src/coreclr/vm/arm/stubs.cpp index 36eaeb51cdc5de..771d2440967022 100644 --- a/src/coreclr/vm/arm/stubs.cpp +++ b/src/coreclr/vm/arm/stubs.cpp @@ -1585,6 +1585,7 @@ void InlinedCallFrame::UpdateRegDisplay(const PREGDISPLAY pRD) pRD->pContext = NULL; *(pRD->pPC) = m_pCallerReturnAddress; + pRD->ControlPC = m_pCallerReturnAddress; pRD->SP = (DWORD) dac_cast(m_pCallSiteSP); pRD->IsCallerContextValid = FALSE; diff --git a/src/coreclr/vm/arm64/CallDescrWorkerARM64.asm b/src/coreclr/vm/arm64/CallDescrWorkerARM64.asm index 502d5a84d2306e..f8290ca633b290 100644 --- a/src/coreclr/vm/arm64/CallDescrWorkerARM64.asm +++ b/src/coreclr/vm/arm64/CallDescrWorkerARM64.asm @@ -4,6 +4,7 @@ #include "ksarm64.h" #include "asmconstants.h" +#include "asmmacros.h" @@ -72,6 +73,7 @@ LNoFloatingPoint ;; call pTarget ldr x9, [x19,#CallDescrData__pTarget] blr x9 +LCallDescrWorkerInternalReturnAddress ldr w3, [x19,#CallDescrData__fpReturnSize] @@ -140,6 +142,10 @@ LReturnDone EPILOG_RESTORE_REG x19, #16 ;the stack slot at sp+24 is empty for 16 byte alligment EPILOG_RESTORE_REG_PAIR fp, lr, #32! EPILOG_RETURN + + PATCH_LABEL CallDescrWorkerInternalReturnAddressOffset + DCQ LCallDescrWorkerInternalReturnAddress - CallDescrWorkerInternal + NESTED_END END diff --git a/src/coreclr/vm/arm64/asmconstants.h b/src/coreclr/vm/arm64/asmconstants.h index 5210438aad3deb..fe378e24c2f0f1 100644 --- a/src/coreclr/vm/arm64/asmconstants.h +++ b/src/coreclr/vm/arm64/asmconstants.h @@ -233,5 +233,45 @@ ASMCONSTANTS_C_ASSERT(CallCountingStubData__TargetForMethod == offsetof(CallCoun #define CallCountingStubData__TargetForThresholdReached 0x10 ASMCONSTANTS_C_ASSERT(CallCountingStubData__TargetForThresholdReached == offsetof(CallCountingStubData, TargetForThresholdReached)) +#ifdef PROFILING_SUPPORTED +#define PROFILE_ENTER 0x1 +#define PROFILE_LEAVE 0x2 +#define PROFILE_TAILCALL 0x4 + +#define SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA 320 +ASMCONSTANTS_C_ASSERT(SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA == sizeof(PROFILE_PLATFORM_SPECIFIC_DATA)) +ASMCONSTANTS_C_ASSERT((SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA & 0xf) == 0) + +#define ASMCONSTANTS_C_ASSERT_OFFSET(type, field) \ + ASMCONSTANTS_C_ASSERT(type##__##field == offsetof(type, field)) + +#define PROFILE_PLATFORM_SPECIFIC_DATA__Fp 0 +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, Fp) +#define PROFILE_PLATFORM_SPECIFIC_DATA__Pc 8 +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, Pc) +#define PROFILE_PLATFORM_SPECIFIC_DATA__x8 16 +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, x8) +#define PROFILE_PLATFORM_SPECIFIC_DATA__argumentRegisters 24 +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, argumentRegisters) +#define PROFILE_PLATFORM_SPECIFIC_DATA__functionId 88 +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, functionId) +#define PROFILE_PLATFORM_SPECIFIC_DATA__floatArgumentRegisters 96 +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, floatArgumentRegisters) +#define PROFILE_PLATFORM_SPECIFIC_DATA__probeSp 224 +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, probeSp) +#define PROFILE_PLATFORM_SPECIFIC_DATA__profiledSp 232 +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, profiledSp) +#define PROFILE_PLATFORM_SPECIFIC_DATA__hiddenArg 240 +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, hiddenArg) +#define PROFILE_PLATFORM_SPECIFIC_DATA__flags 248 +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, flags) +#define PROFILE_PLATFORM_SPECIFIC_DATA__unused 252 +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, unused) +#define PROFILE_PLATFORM_SPECIFIC_DATA__buffer 256 +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, buffer) + +#undef ASMCONSTANTS_C_ASSERT_OFFSET +#endif // PROFILING_SUPPORTED + #undef ASMCONSTANTS_RUNTIME_ASSERT #undef ASMCONSTANTS_C_ASSERT diff --git a/src/coreclr/vm/arm64/asmhelpers.S b/src/coreclr/vm/arm64/asmhelpers.S index cdbe24ec427a98..49d4c4ea34ad7a 100644 --- a/src/coreclr/vm/arm64/asmhelpers.S +++ b/src/coreclr/vm/arm64/asmhelpers.S @@ -208,7 +208,7 @@ LEAF_END ThePreStubPatch, _TEXT WRITE_BARRIER_ENTRY JIT_UpdateWriteBarrierState PROLOG_SAVE_REG_PAIR_INDEXED fp, lr, -16 - // x0-x7 will contain intended new state + // x0-x7, x10 will contain intended new state // x8 will preserve skipEphemeralCheck // x12 will be used for pointers @@ -223,33 +223,36 @@ WRITE_BARRIER_ENTRY JIT_UpdateWriteBarrierState ldr x1, [x12] #endif -#ifdef WRITE_BARRIER_CHECK - PREPARE_EXTERNAL_VAR g_GCShadow, x12 - ldr x2, [x12] -#endif - #ifdef FEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP PREPARE_EXTERNAL_VAR g_sw_ww_table, x12 - ldr x3, [x12] + ldr x2, [x12] #endif PREPARE_EXTERNAL_VAR g_ephemeral_low, x12 - ldr x4, [x12] + ldr x3, [x12] PREPARE_EXTERNAL_VAR g_ephemeral_high, x12 - ldr x5, [x12] + ldr x4, [x12] cbz x8, LOCAL_LABEL(EphemeralCheckEnabled) - movz x4, #0 - movn x5, #0 + movz x3, #0 + movn x4, #0 LOCAL_LABEL(EphemeralCheckEnabled): PREPARE_EXTERNAL_VAR g_lowest_address, x12 - ldr x6, [x12] + ldr x5, [x12] PREPARE_EXTERNAL_VAR g_highest_address, x12 + ldr x6, [x12] + +#ifdef WRITE_BARRIER_CHECK + PREPARE_EXTERNAL_VAR g_GCShadow, x12 ldr x7, [x12] + PREPARE_EXTERNAL_VAR g_GCShadowEnd, x12 + ldr x10, [x12] +#endif + // Update wbs state PREPARE_EXTERNAL_VAR JIT_WriteBarrier_Table_Loc, x12 ldr x12, [x12] @@ -258,7 +261,11 @@ LOCAL_LABEL(EphemeralCheckEnabled): stp x0, x1, [x12], 16 stp x2, x3, [x12], 16 stp x4, x5, [x12], 16 - stp x6, x7, [x12], 16 + str x6, [x12], 8 +#ifdef WRITE_BARRIER_CHECK + stp x7, x10, [x12], 16 +#endif + EPILOG_RESTORE_REG_PAIR_INDEXED fp, lr, 16 EPILOG_RETURN @@ -367,8 +374,7 @@ WRITE_BARRIER_ENTRY JIT_WriteBarrier add x12, x13, x12 // if (pShadow >= g_GCShadowEnd) goto end - PREPARE_EXTERNAL_VAR g_GCShadowEnd, x13 - ldr x13, [x13] + ldr x13, LOCAL_LABEL(wbs_GCShadowEnd) cmp x12, x13 bhs LOCAL_LABEL(ShadowUpdateEnd) @@ -460,8 +466,6 @@ LOCAL_LABEL(wbs_card_table): .quad 0 LOCAL_LABEL(wbs_card_bundle_table): .quad 0 -LOCAL_LABEL(wbs_GCShadow): - .quad 0 LOCAL_LABEL(wbs_sw_ww_table): .quad 0 LOCAL_LABEL(wbs_ephemeral_low): @@ -472,6 +476,12 @@ LOCAL_LABEL(wbs_lowest_address): .quad 0 LOCAL_LABEL(wbs_highest_address): .quad 0 +#ifdef WRITE_BARRIER_CHECK +LOCAL_LABEL(wbs_GCShadow): + .quad 0 +LOCAL_LABEL(wbs_GCShadowEnd): + .quad 0 +#endif WRITE_BARRIER_END JIT_WriteBarrier_Table @@ -928,12 +938,6 @@ LEAF_ENTRY JIT_ProfilerEnterLeaveTailcallStub, _TEXT ret lr LEAF_END JIT_ProfilerEnterLeaveTailcallStub, _TEXT -// ------------------------------------------------------------------ -#define PROFILE_ENTER 1 -#define PROFILE_LEAVE 2 -#define PROFILE_TAILCALL 4 -#define SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA 320 - // ------------------------------------------------------------------ .macro GenerateProfileHelper helper, flags NESTED_ENTRY \helper\()Naked, _TEXT, NoHandler @@ -947,21 +951,21 @@ NESTED_ENTRY \helper\()Naked, _TEXT, NoHandler // Values of other volatile registers are not preserved. PROLOG_SAVE_REG_PAIR_INDEXED fp, lr, -SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA // Allocate space and save Fp, Pc. - SAVE_ARGUMENT_REGISTERS sp, 16 // Save x8 and argument registers (x0-x7). - str xzr, [sp, 88] // Clear functionId. - SAVE_FLOAT_ARGUMENT_REGISTERS sp, 96 // Save floating-point/SIMD registers (q0-q7). - add x12, fp, SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA // Compute probeSp - initial value of Sp on entry to the helper. - stp x12, x11, [sp, 224] // Save probeSp, profiledSp. - str xzr, [sp, 240] // Clear hiddenArg. + SAVE_ARGUMENT_REGISTERS sp, PROFILE_PLATFORM_SPECIFIC_DATA__x8 // Save x8 and argument registers (x0-x7). + str xzr, [sp, PROFILE_PLATFORM_SPECIFIC_DATA__functionId] // Clear functionId. + SAVE_FLOAT_ARGUMENT_REGISTERS sp, PROFILE_PLATFORM_SPECIFIC_DATA__floatArgumentRegisters + add x12, fp, SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA // Compute probeSp - initial value of Sp on entry to the helper. + stp x12, x11, [sp, PROFILE_PLATFORM_SPECIFIC_DATA__probeSp] // Save probeSp, profiledSp. + str xzr, [sp, PROFILE_PLATFORM_SPECIFIC_DATA__hiddenArg] // Clear hiddenArg. mov w12, \flags - stp w12, wzr, [sp, 248] // Save flags and clear unused field. + stp w12, wzr, [sp, PROFILE_PLATFORM_SPECIFIC_DATA__flags] // Save flags and clear unused field. mov x0, x10 mov x1, sp bl C_FUNC(\helper) - RESTORE_ARGUMENT_REGISTERS sp, 16 // Restore x8 and argument registers. - RESTORE_FLOAT_ARGUMENT_REGISTERS sp, 96 // Restore floating-point/SIMD registers. + RESTORE_ARGUMENT_REGISTERS sp, PROFILE_PLATFORM_SPECIFIC_DATA__x8 // Restore x8 and argument registers. + RESTORE_FLOAT_ARGUMENT_REGISTERS sp, PROFILE_PLATFORM_SPECIFIC_DATA__floatArgumentRegisters // Restore floating-point/SIMD registers. EPILOG_RESTORE_REG_PAIR_INDEXED fp, lr, SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA EPILOG_RETURN diff --git a/src/coreclr/vm/arm64/asmhelpers.asm b/src/coreclr/vm/arm64/asmhelpers.asm index d2222c8e10895f..d72d3ad7863e12 100644 --- a/src/coreclr/vm/arm64/asmhelpers.asm +++ b/src/coreclr/vm/arm64/asmhelpers.asm @@ -278,7 +278,7 @@ ThePreStubPatchLabel WRITE_BARRIER_ENTRY JIT_UpdateWriteBarrierState PROLOG_SAVE_REG_PAIR fp, lr, #-16! - ; x0-x7 will contain intended new state + ; x0-x7, x10 will contain intended new state ; x8 will preserve skipEphemeralCheck ; x12 will be used for pointers @@ -293,33 +293,36 @@ ThePreStubPatchLabel ldr x1, [x12, g_card_bundle_table] #endif -#ifdef WRITE_BARRIER_CHECK - adrp x12, $g_GCShadow - ldr x2, [x12, $g_GCShadow] -#endif - #ifdef FEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP adrp x12, g_sw_ww_table - ldr x3, [x12, g_sw_ww_table] + ldr x2, [x12, g_sw_ww_table] #endif adrp x12, g_ephemeral_low - ldr x4, [x12, g_ephemeral_low] + ldr x3, [x12, g_ephemeral_low] adrp x12, g_ephemeral_high - ldr x5, [x12, g_ephemeral_high] + ldr x4, [x12, g_ephemeral_high] ; Check skipEphemeralCheck cbz x8, EphemeralCheckEnabled - movz x4, #0 - movn x5, #0 + movz x3, #0 + movn x4, #0 EphemeralCheckEnabled adrp x12, g_lowest_address - ldr x6, [x12, g_lowest_address] + ldr x5, [x12, g_lowest_address] adrp x12, g_highest_address - ldr x7, [x12, g_highest_address] + ldr x6, [x12, g_highest_address] + +#ifdef WRITE_BARRIER_CHECK + adrp x12, $g_GCShadow + ldr x7, [x12, $g_GCShadow] + + adrp x12, $g_GCShadowEnd + ldr x10, [x12, $g_GCShadowEnd] +#endif ; Update wbs state adrp x12, JIT_WriteBarrier_Table_Loc @@ -328,7 +331,10 @@ EphemeralCheckEnabled stp x0, x1, [x12], 16 stp x2, x3, [x12], 16 stp x4, x5, [x12], 16 - stp x6, x7, [x12], 16 + str x6, [x12], 8 +#ifdef WRITE_BARRIER_CHECK + stp x7, x10, [x12], 16 +#endif EPILOG_RESTORE_REG_PAIR fp, lr, #16! EPILOG_RETURN @@ -343,8 +349,6 @@ wbs_card_table DCQ 0 wbs_card_bundle_table DCQ 0 -wbs_GCShadow - DCQ 0 wbs_sw_ww_table DCQ 0 wbs_ephemeral_low @@ -355,6 +359,12 @@ wbs_lowest_address DCQ 0 wbs_highest_address DCQ 0 +#ifdef WRITE_BARRIER_CHECK +wbs_GCShadow + DCQ 0 +wbs_GCShadowEnd + DCQ 0 +#endif WRITE_BARRIER_END JIT_WriteBarrier_Table ; void JIT_ByRefWriteBarrier @@ -433,8 +443,7 @@ NotInHeap add x12, x13, x12 ; if (pShadow >= $g_GCShadowEnd) goto end - adrp x13, $g_GCShadowEnd - ldr x13, [x13, $g_GCShadowEnd] + ldr x13, wbs_GCShadowEnd cmp x12, x13 bhs ShadowUpdateEnd diff --git a/src/coreclr/vm/arm64/calldescrworkerarm64.S b/src/coreclr/vm/arm64/calldescrworkerarm64.S index ccb4c3f73b649e..06b88344359466 100644 --- a/src/coreclr/vm/arm64/calldescrworkerarm64.S +++ b/src/coreclr/vm/arm64/calldescrworkerarm64.S @@ -69,6 +69,7 @@ LOCAL_LABEL(NoFloatingPoint): // call pTarget ldr x9, [x19,#CallDescrData__pTarget] blr x9 +LOCAL_LABEL(CallDescrWorkerInternalReturnAddress): ldr w3, [x19,#CallDescrData__fpReturnSize] @@ -138,4 +139,8 @@ LOCAL_LABEL(ReturnDone): EPILOG_RESTORE_REG x19, 16 //the stack slot at sp+24 is empty for 16 byte alligment EPILOG_RESTORE_REG_PAIR_INDEXED fp, lr, 32 EPILOG_RETURN + +PATCH_LABEL CallDescrWorkerInternalReturnAddressOffset + .quad LOCAL_LABEL(CallDescrWorkerInternalReturnAddress) - C_FUNC(CallDescrWorkerInternal) + NESTED_END CallDescrWorkerInternal, _TEXT diff --git a/src/coreclr/vm/arm64/cgencpu.h b/src/coreclr/vm/arm64/cgencpu.h index 4350390843e57d..3ec3d6ea3b1a13 100644 --- a/src/coreclr/vm/arm64/cgencpu.h +++ b/src/coreclr/vm/arm64/cgencpu.h @@ -165,6 +165,33 @@ struct FloatArgumentRegisters { #define NUM_FLOAT_ARGUMENT_REGISTERS 8 +//********************************************************************** +// Profiling +//********************************************************************** + +#ifdef PROFILING_SUPPORTED + +#define PROFILE_PLATFORM_SPECIFIC_DATA_BUFFER_SIZE (NUM_FLOAT_ARGUMENT_REGISTERS * sizeof(double)) + +typedef struct _PROFILE_PLATFORM_SPECIFIC_DATA +{ + void* Fp; + void* Pc; + void* x8; + ArgumentRegisters argumentRegisters; + FunctionID functionId; + FloatArgumentRegisters floatArgumentRegisters; + void* probeSp; + void* profiledSp; + void* hiddenArg; + UINT32 flags; + UINT32 unused; + BYTE buffer[PROFILE_PLATFORM_SPECIFIC_DATA_BUFFER_SIZE]; +} PROFILE_PLATFORM_SPECIFIC_DATA, *PPROFILE_PLATFORM_SPECIFIC_DATA; + +#endif // PROFILING_SUPPORTED + + //********************************************************************** // Exception handling //********************************************************************** diff --git a/src/coreclr/vm/arm64/profiler.cpp b/src/coreclr/vm/arm64/profiler.cpp index f46f9e6a7f5620..471677347ea578 100644 --- a/src/coreclr/vm/arm64/profiler.cpp +++ b/src/coreclr/vm/arm64/profiler.cpp @@ -4,30 +4,9 @@ #include "common.h" #ifdef PROFILING_SUPPORTED +#include "asmconstants.h" #include "proftoeeinterfaceimpl.h" -#define PROFILE_ENTER 1 -#define PROFILE_LEAVE 2 -#define PROFILE_TAILCALL 4 - -#define PROFILE_PLATFORM_SPECIFIC_DATA_BUFFER_SIZE (NUM_FLOAT_ARGUMENT_REGISTERS * sizeof(double)) - -typedef struct _PROFILE_PLATFORM_SPECIFIC_DATA -{ - void* Fp; - void* Pc; - void* x8; - ArgumentRegisters argumentRegisters; - FunctionID functionId; - FloatArgumentRegisters floatArgumentRegisters; - void* probeSp; - void* profiledSp; - void* hiddenArg; - UINT32 flags; - UINT32 unused; - BYTE buffer[PROFILE_PLATFORM_SPECIFIC_DATA_BUFFER_SIZE]; -} PROFILE_PLATFORM_SPECIFIC_DATA, *PPROFILE_PLATFORM_SPECIFIC_DATA; - UINT_PTR ProfileGetIPFromPlatformSpecificHandle(void* pPlatformSpecificHandle) { LIMITED_METHOD_CONTRACT; diff --git a/src/coreclr/vm/arm64/stubs.cpp b/src/coreclr/vm/arm64/stubs.cpp index 4ae26363fd2d24..cc5dbf7d66b8d5 100644 --- a/src/coreclr/vm/arm64/stubs.cpp +++ b/src/coreclr/vm/arm64/stubs.cpp @@ -699,7 +699,7 @@ void InlinedCallFrame::UpdateRegDisplay(const PREGDISPLAY pRD) pRD->pCurrentContextPointers->X28 = NULL; pRD->ControlPC = m_pCallerReturnAddress; - pRD->SP = (DWORD) dac_cast(m_pCallSiteSP); + pRD->SP = (DWORD64) dac_cast(m_pCallSiteSP); // reset pContext; it's only valid for active (top-most) frame pRD->pContext = NULL; diff --git a/src/coreclr/vm/assembly.cpp b/src/coreclr/vm/assembly.cpp index d196eee3fd9504..8833aa45742b30 100644 --- a/src/coreclr/vm/assembly.cpp +++ b/src/coreclr/vm/assembly.cpp @@ -397,14 +397,6 @@ Assembly *Assembly::CreateDynamic(AssemblyBinder* pBinder, NativeAssemblyNamePar if (pAssemblyNameParts->_pName == NULL || pAssemblyNameParts->_pName[0] == '\0') COMPlusThrow(kArgumentException, W("ArgumentNull_AssemblyNameName")); - if (COMCharacter::nativeIsWhiteSpace(pAssemblyNameParts->_pName[0]) - || u16_strchr(pAssemblyNameParts->_pName, '\\') != NULL - || u16_strchr(pAssemblyNameParts->_pName, ':') != NULL - || u16_strchr(pAssemblyNameParts->_pName, '/') != NULL) - { - COMPlusThrow(kArgumentException, W("InvalidAssemblyName")); - } - // Set up the assembly manifest metadata // When we create dynamic assembly, we always use a working copy of IMetaDataAssemblyEmit // to store temporary runtime assembly information. This is to preserve the invariant that @@ -1132,7 +1124,7 @@ void Assembly::AddDiagnosticStartupHookPath(LPCWSTR wszPath) size_t cchDiagnosticStartupHookPathsLocal = 0; if (nullptr != wszDiagnosticStartupHookPathsLocal) { - cchDiagnosticStartupHookPathsLocal = u16_strlen(wszDiagnosticStartupHookPathsLocal); + cchDiagnosticStartupHookPathsLocal = u16_strlen(wszDiagnosticStartupHookPathsLocal); // Add 1 for the path separator cchDiagnosticStartupHookPathsNew += cchDiagnosticStartupHookPathsLocal + 1; } @@ -1634,11 +1626,14 @@ OBJECTREF Assembly::GetExposedObject() BOOL Assembly::FileNotFound(HRESULT hr) { LIMITED_METHOD_CONTRACT; - return IsHRESULTForExceptionKind(hr, kFileNotFoundException) || + if (IsHRESULTForExceptionKind(hr, kFileNotFoundException)) + return TRUE; + #ifdef FEATURE_COMINTEROP - (hr == RO_E_METADATA_NAME_NOT_FOUND) || + return hr == RO_E_METADATA_NAME_NOT_FOUND; +#else + return FALSE; #endif //FEATURE_COMINTEROP - (hr == CLR_E_BIND_TYPE_NOT_FOUND); } diff --git a/src/coreclr/vm/assemblynative.cpp b/src/coreclr/vm/assemblynative.cpp index eac1381922c532..340096c919e989 100644 --- a/src/coreclr/vm/assemblynative.cpp +++ b/src/coreclr/vm/assemblynative.cpp @@ -137,8 +137,6 @@ Assembly* AssemblyNative::LoadFromPEImage(AssemblyBinder* pBinder, PEImage *pIma Assembly *pLoadedAssembly = NULL; ReleaseHolder pAssembly; - DWORD dwMessageID = IDS_EE_FILELOAD_ERROR_GENERIC; - // Set the caller's assembly to be CoreLib DomainAssembly *pCallersAssembly = SystemDomain::System()->SystemAssembly()->GetDomainAssembly(); @@ -155,15 +153,22 @@ Assembly* AssemblyNative::LoadFromPEImage(AssemblyBinder* pBinder, PEImage *pIma if (hr != S_OK) { - // Give a more specific message for the case when we found the assembly with the same name already loaded. + StackSString name; + spec.GetDisplayName(0, name); if (hr == COR_E_FILELOAD) { - dwMessageID = IDS_HOST_ASSEMBLY_RESOLVER_ASSEMBLY_ALREADY_LOADED_IN_CONTEXT; + // Give a more specific message for the case when we found the assembly with the same name already loaded. + // Show the assembly name, since we know the error is about the assembly name. + StackSString errorString; + errorString.LoadResource(CCompRC::Error, IDS_HOST_ASSEMBLY_RESOLVER_ASSEMBLY_ALREADY_LOADED_IN_CONTEXT); + COMPlusThrow(kFileLoadException, IDS_EE_FILELOAD_ERROR_GENERIC, name, errorString); + } + else + { + // Propagate the actual HResult to the FileLoadException + // Use the path if this load request was for a file path, display name otherwise + EEFileLoadException::Throw(pImage->GetPath().IsEmpty() ? name : pImage->GetPath(), hr); } - - StackSString name; - spec.GetDisplayName(0, name); - COMPlusThrowHR(COR_E_FILELOAD, dwMessageID, name); } PEAssemblyHolder pPEAssembly(PEAssembly::Open(pAssembly->GetPEImage(), pAssembly)); @@ -1393,7 +1398,7 @@ extern "C" void QCALLTYPE AssemblyNative_ApplyUpdate( _ASSERTE(ilDelta != nullptr); _ASSERTE(ilDeltaLength > 0); -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER GCX_COOP(); { if (CORDebuggerAttached()) @@ -1428,7 +1433,7 @@ extern "C" BOOL QCALLTYPE AssemblyNative_IsApplyUpdateSupported() BEGIN_QCALL; -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER result = CORDebuggerAttached() || g_pConfig->ForceEnc() || g_pConfig->DebugAssembliesModifiable(); #endif diff --git a/src/coreclr/vm/assemblyspec.cpp b/src/coreclr/vm/assemblyspec.cpp index abad61ac7d5d36..416f0491365d74 100644 --- a/src/coreclr/vm/assemblyspec.cpp +++ b/src/coreclr/vm/assemblyspec.cpp @@ -505,7 +505,7 @@ Assembly *AssemblySpec::LoadAssembly(LPCWSTR pFilePath) pILImage = PEImage::OpenImage(pFilePath, MDInternalImport_Default, - Bundle::ProbeAppBundle(pFilePath)); + Bundle::ProbeAppBundle(SString{ SString::Literal, pFilePath })); // Need to verify that this is a valid CLR assembly. if (!pILImage->CheckILFormat()) diff --git a/src/coreclr/vm/callingconvention.h b/src/coreclr/vm/callingconvention.h index 716cb8f582f4e8..1c1f27ffc25293 100644 --- a/src/coreclr/vm/callingconvention.h +++ b/src/coreclr/vm/callingconvention.h @@ -1826,7 +1826,7 @@ int ArgIteratorTemplate::GetNextOffset() pMethodTable = thValueType.AsNativeValueType(); } _ASSERTE(pMethodTable != nullptr); - flags = MethodTable::GetRiscv64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable); + flags = MethodTable::GetRiscV64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable); if (flags & STRUCT_HAS_FLOAT_FIELDS_MASK) { cFPRegs = (flags & STRUCT_FLOAT_FIELD_ONLY_TWO) ? 2 : 1; @@ -2040,7 +2040,7 @@ void ArgIteratorTemplate::ComputeReturnFlags() assert(!thValueType.IsTypeDesc()); MethodTable *pMethodTable = thValueType.AsMethodTable(); - flags = (MethodTable::GetRiscv64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable) & 0xff) << RETURN_FP_SIZE_SHIFT; + flags = (MethodTable::GetRiscV64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable) & 0xff) << RETURN_FP_SIZE_SHIFT; break; } #else diff --git a/src/coreclr/vm/ceeload.cpp b/src/coreclr/vm/ceeload.cpp index 709ec1e5042984..f3e3a882d3878a 100644 --- a/src/coreclr/vm/ceeload.cpp +++ b/src/coreclr/vm/ceeload.cpp @@ -183,7 +183,7 @@ BOOL Module::SetTransientFlagInterlocked(DWORD dwFlag) } } -#if defined(PROFILING_SUPPORTED) || defined(EnC_SUPPORTED) +#if defined(PROFILING_SUPPORTED) || defined(FEATURE_METADATA_UPDATER) void Module::UpdateNewlyAddedTypes() { CONTRACTL @@ -241,7 +241,7 @@ void Module::UpdateNewlyAddedTypes() m_dwExportedTypeCount = countExportedTypesAfterProfilerUpdate; m_dwCustomAttributeCount = countCustomAttributeCount; } -#endif // PROFILING_SUPPORTED || EnC_SUPPORTED +#endif // PROFILING_SUPPORTED || FEATURE_METADATA_UPDATER #if PROFILING_SUPPORTED void Module::NotifyProfilerLoadFinished(HRESULT hr) @@ -578,7 +578,7 @@ Module *Module::Create(Assembly *pAssembly, PEAssembly *pPEAssembly, AllocMemTra // Create the module -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER if (::IsEditAndContinueCapable(pAssembly, pPEAssembly)) { // if file is EnCCapable, always create an EnC-module, but EnC won't necessarily be enabled. @@ -588,7 +588,7 @@ Module *Module::Create(Assembly *pAssembly, PEAssembly *pPEAssembly, AllocMemTra pModule = new (pMemory) EditAndContinueModule(pAssembly, pPEAssembly); } else -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER { void* pMemory = pamTracker->Track(pAssembly->GetHighFrequencyHeap()->AllocMem(S_SIZE_T(sizeof(Module)))); pModule = new (pMemory) Module(pAssembly, pPEAssembly); @@ -616,9 +616,9 @@ void Module::ApplyMetaData() HRESULT hr = S_OK; ULONG ulCount; -#if defined(PROFILING_SUPPORTED) || defined(EnC_SUPPORTED) +#if defined(PROFILING_SUPPORTED) || defined(FEATURE_METADATA_UPDATER) UpdateNewlyAddedTypes(); -#endif // PROFILING_SUPPORTED || EnC_SUPPORTED +#endif // PROFILING_SUPPORTED || FEATURE_METADATA_UPDATER // Ensure for TypeRef ulCount = GetMDImport()->GetCountWithTokenKind(mdtTypeRef) + 1; @@ -1453,7 +1453,7 @@ BOOL Module::IsRuntimeWrapExceptions() { CONTRACTL { - THROWS; + NOTHROW; if (IsRuntimeWrapExceptionsStatusComputed()) GC_NOTRIGGER; else GC_TRIGGERS; MODE_ANY; } @@ -5122,7 +5122,7 @@ void Module::EnumMemoryRegions(CLRDataEnumMemoryFlags flags, ECall::EnumFCallMethods(); -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER m_ClassList.EnumMemoryRegions(); DPTR(PTR_EnCEEClassData) classData = m_ClassList.Table(); @@ -5137,7 +5137,7 @@ void Module::EnumMemoryRegions(CLRDataEnumMemoryFlags flags, classData++; } -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER } FieldDesc *Module::LookupFieldDef(mdFieldDef token) diff --git a/src/coreclr/vm/ceeload.h b/src/coreclr/vm/ceeload.h index 77ef721e7711d3..4d714d2024196d 100644 --- a/src/coreclr/vm/ceeload.h +++ b/src/coreclr/vm/ceeload.h @@ -67,9 +67,9 @@ class CodeVersionManager; class TieredCompilationManager; class JITInlineTrackingMap; -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER class EnCEEClassData; -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER // Hash table parameter of available classes (name -> module/class) hash #define AVAILABLE_CLASSES_HASH_BUCKETS 1024 @@ -950,10 +950,10 @@ class Module : public ModuleBase return (m_dwTransientFlags & IS_EDIT_AND_CONTINUE) != 0; } -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER // Holds a table of EnCEEClassData object for classes in this module that have been modified CUnorderedArray m_ClassList; -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER private: void EnableEditAndContinue() diff --git a/src/coreclr/vm/ceemain.cpp b/src/coreclr/vm/ceemain.cpp index 1fd898684cf1c1..91494083dc9113 100644 --- a/src/coreclr/vm/ceemain.cpp +++ b/src/coreclr/vm/ceemain.cpp @@ -1986,12 +1986,10 @@ static HRESULT GetThreadUICultureNames(__inout StringArrayList* pCultureNames) sParentCulture = sCulture; #endif // !TARGET_UNIX } - // (LPCWSTR) to restrict the size to null terminated size - pCultureNames->AppendIfNotThere((LPCWSTR)sCulture); - // Disabling for Dev10 for consistency with managed resource lookup (see AppCompat bug notes in ResourceFallbackManager.cs) - // Also, this is in the wrong order - put after the parent culture chain. - //AddThreadPreferredUILanguages(pCultureNames); - pCultureNames->AppendIfNotThere((LPCWSTR)sParentCulture); + sCulture.Normalize(); + sParentCulture.Normalize(); + pCultureNames->AppendIfNotThere(sCulture); + pCultureNames->AppendIfNotThere(sParentCulture); pCultureNames->Append(SString::Empty()); } EX_CATCH diff --git a/src/coreclr/vm/cgensys.h b/src/coreclr/vm/cgensys.h index d36adf056358dc..1396d7558c29fe 100644 --- a/src/coreclr/vm/cgensys.h +++ b/src/coreclr/vm/cgensys.h @@ -22,7 +22,7 @@ class ComPlusCallMethodDesc; #include -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER void ResumeAtJit(PT_CONTEXT pContext, LPVOID oldFP); #endif diff --git a/src/coreclr/vm/class.cpp b/src/coreclr/vm/class.cpp index 52099dc2ffe5d4..0062632396c955 100644 --- a/src/coreclr/vm/class.cpp +++ b/src/coreclr/vm/class.cpp @@ -247,7 +247,7 @@ MethodTable *MethodTable::LoadEnclosingMethodTable(ClassLoadLevel targetLevel) } -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER //******************************************************************************* VOID EEClass::FixupFieldDescForEnC(MethodTable * pMT, EnCFieldDesc *pFD, mdFieldDef fieldDef) @@ -843,7 +843,7 @@ HRESULT EEClass::AddMethodDesc( return S_OK; } -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER //--------------------------------------------------------------------------------------- // @@ -1118,7 +1118,7 @@ ClassLoader::LoadExactParentAndInterfacesTransitively(MethodTable *pMT) namespace { -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER void CreateAllEnCStaticFields(MethodTable* pMT, MethodTable* pMTCanon, EditAndContinueModule* pModule) { CONTRACTL @@ -1188,7 +1188,7 @@ namespace } } } -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER } // CLASS_LOAD_EXACTPARENTS phase of loading: @@ -1221,7 +1221,7 @@ void ClassLoader::LoadExactParents(MethodTable* pMT) PropagateCovariantReturnMethodImplSlots(pMT); } -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER // Generics for EnC - create static FieldDescs. // Instance FieldDescs don't need to be created here because they // are added during type load by reading the updated metadata tables. @@ -1236,7 +1236,7 @@ void ClassLoader::LoadExactParents(MethodTable* pMT) CreateAllEnCStaticFields(pMT, pMTCanon, (EditAndContinueModule*)pModule); } } -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER // We can now mark this type as having exact parents pMT->SetHasExactParent(); diff --git a/src/coreclr/vm/class.h b/src/coreclr/vm/class.h index fe2990b64d5ade..8d5785dd48a64c 100644 --- a/src/coreclr/vm/class.h +++ b/src/coreclr/vm/class.h @@ -778,7 +778,7 @@ class EEClass // DO NOT CREATE A NEW EEClass USING NEW! static EEClass * CreateMinimalClass(LoaderHeap *pHeap, AllocMemTracker *pamTracker); #endif // !DACCESS_COMPILE -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER // Add a new method to an already loaded type for EnC static HRESULT AddMethod(MethodTable* pMT, mdMethodDef methodDef, MethodDesc** ppMethod); private: @@ -799,7 +799,7 @@ class EEClass // DO NOT CREATE A NEW EEClass USING NEW! FieldDesc** ppNewFD); public: static VOID FixupFieldDescForEnC(MethodTable * pMT, EnCFieldDesc *pFD, mdFieldDef fieldDef); -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER inline DWORD IsComImport() { @@ -1319,7 +1319,7 @@ class EEClass // DO NOT CREATE A NEW EEClass USING NEW! m_VMFlags |= VMFLAG_DELEGATE; } -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER inline BOOL HasEnCStaticFields() { LIMITED_METHOD_CONTRACT; @@ -1330,7 +1330,7 @@ class EEClass // DO NOT CREATE A NEW EEClass USING NEW! LIMITED_METHOD_CONTRACT; m_VMFlags |= VMFLAG_ENC_STATIC_FIELDS; } -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER BOOL HasFixedAddressVTStatics() { @@ -1707,9 +1707,9 @@ class EEClass // DO NOT CREATE A NEW EEClass USING NEW! #endif VMFLAG_DELEGATE = 0x00000002, -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER VMFLAG_ENC_STATIC_FIELDS = 0x00000004, -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER // VMFLAG_UNUSED = 0x00000018, diff --git a/src/coreclr/vm/clrex.h b/src/coreclr/vm/clrex.h index 2918c5cd3b6cf9..3a17cd2e720823 100644 --- a/src/coreclr/vm/clrex.h +++ b/src/coreclr/vm/clrex.h @@ -353,7 +353,7 @@ class EEResourceException : public EEException InlineSString<32> m_resourceName; public: - EEResourceException(RuntimeExceptionKind kind, const SString &resourceName); + EEResourceException(RuntimeExceptionKind kind, const WCHAR* resourceName); // Unmanaged message text containing only the resource name (GC safe) void GetMessage(SString &result); @@ -1029,7 +1029,7 @@ inline EEMessageException::EEMessageException(RuntimeExceptionKind kind, HRESULT } -inline EEResourceException::EEResourceException(RuntimeExceptionKind kind, const SString &resourceName) +inline EEResourceException::EEResourceException(RuntimeExceptionKind kind, const WCHAR* resourceName) : EEException(kind), m_resourceName(resourceName) { diff --git a/src/coreclr/vm/clrtracelogging.cpp b/src/coreclr/vm/clrtracelogging.cpp deleted file mode 100644 index 81bf7d60134b4d..00000000000000 --- a/src/coreclr/vm/clrtracelogging.cpp +++ /dev/null @@ -1,39 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -//***************************************************************************** -// clrttracelogging.cpp -// Telemetry Logging for clr.dll -// -//***************************************************************************** - -#include "common.h" -#include "clrtracelogging.h" -#include "TraceLoggingProvider.h" -#include "MicrosoftTelemetry.h" - -TRACELOGGING_DEFINE_PROVIDER(g_hClrProvider, CLR_PROVIDER_NAME, CLR_PROVIDER_ID, TraceLoggingOptionMicrosoftTelemetry()); - -// Used for initialization and deconstruction. -static CLRTraceLog::Provider g_clrTraceProvider(g_hClrProvider); - -//--- CLRTraceLogProvider - -// static -void CLRTraceLog::Logger::LogTargetFrameworkAttribute(LPCWSTR targetFrameworkAttribute, const char * assemblyName) -{ - STANDARD_VM_CONTRACT; - - EX_TRY - { - TraceLoggingWrite(g_hClrProvider,"CLR.AssemblyInfo", - TraceLoggingWideString(targetFrameworkAttribute, "TARGET_FRAMEWORK_ATTRIBUTE"), - TraceLoggingString(assemblyName, "ASSEMBLY_NAME"), - TraceLoggingKeyword(MICROSOFT_KEYWORD_TELEMETRY)); - } - EX_CATCH{} - EX_END_CATCH(SwallowAllExceptions) - -} -//--- CLRTraceLog - diff --git a/src/coreclr/vm/codeman.cpp b/src/coreclr/vm/codeman.cpp index 6468794ad52171..8f8fa45d853dc6 100644 --- a/src/coreclr/vm/codeman.cpp +++ b/src/coreclr/vm/codeman.cpp @@ -1492,6 +1492,11 @@ void EEJitManager::SetCpuInfo() CPUCompileFlags.Set(InstructionSet_Rcpc); } + if (((cpuFeatures & ARM64IntrinsicConstants_Rcpc2) != 0) && CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_EnableArm64Rcpc2)) + { + CPUCompileFlags.Set(InstructionSet_Rcpc2); + } + if (((cpuFeatures & ARM64IntrinsicConstants_Crc32) != 0) && CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_EnableArm64Crc32)) { CPUCompileFlags.Set(InstructionSet_Crc32); diff --git a/src/coreclr/vm/codeman.h b/src/coreclr/vm/codeman.h index 8e547e4cc17cef..6fe87885da111f 100644 --- a/src/coreclr/vm/codeman.h +++ b/src/coreclr/vm/codeman.h @@ -2635,7 +2635,7 @@ class EECodeInfo #if defined(TARGET_AMD64) void GetOffsetsFromUnwindInfo(ULONG* pRSPOffset, ULONG* pRBPOffset); - + ULONG GetFrameOffsetFromUnwindInfo(); #if defined(_DEBUG) && defined(HAVE_GCCOVER) // Find first funclet inside (pvFuncletStart, pvFuncletStart + cbCode) static LPVOID findNextFunclet (LPVOID pvFuncletStart, SIZE_T cbCode, LPVOID *ppvFuncletEnd); diff --git a/src/coreclr/vm/commodule.cpp b/src/coreclr/vm/commodule.cpp index df3874f7209507..46e66b5e4a6d75 100644 --- a/src/coreclr/vm/commodule.cpp +++ b/src/coreclr/vm/commodule.cpp @@ -612,17 +612,6 @@ extern "C" void QCALLTYPE RuntimeModule_GetScopeName(QCall::ModuleHandle pModule END_QCALL; } -static void ReplaceNiExtension(SString& fileName, PCWSTR pwzOldSuffix, PCWSTR pwzNewSuffix) -{ - STANDARD_VM_CONTRACT; - - if (fileName.EndsWithCaseInsensitive(pwzOldSuffix)) - { - COUNT_T oldSuffixLen = (COUNT_T)u16_strlen(pwzOldSuffix); - fileName.Replace(fileName.End() - oldSuffixLen, oldSuffixLen, pwzNewSuffix); - } -} - /*============================GetFullyQualifiedName============================= **Action: **Returns: @@ -640,9 +629,12 @@ extern "C" void QCALLTYPE RuntimeModule_GetFullyQualifiedName(QCall::ModuleHandl if (pModule->IsPEFile()) { LPCWSTR fileName = pModule->GetPath(); - if (*fileName != 0) { - retString.Set(fileName); - } else { + if (*fileName != W('\0')) + { + retString.Set(fileName); + } + else + { retString.Set(W("")); } } diff --git a/src/coreclr/vm/comsynchronizable.cpp b/src/coreclr/vm/comsynchronizable.cpp index 72b2a41410534d..7df5589fea22d9 100644 --- a/src/coreclr/vm/comsynchronizable.cpp +++ b/src/coreclr/vm/comsynchronizable.cpp @@ -475,17 +475,6 @@ FCIMPL1(void, ThreadNative::Sleep, INT32 iTime) } FCIMPLEND -FCIMPL1(INT32, ThreadNative::GetManagedThreadId, ThreadBaseObject* th) { - FCALL_CONTRACT; - - FC_GC_POLL_NOT_NEEDED(); - if (th == NULL) - FCThrow(kNullReferenceException); - - return th->GetManagedThreadId(); -} -FCIMPLEND - NOINLINE static Object* GetCurrentThreadHelper() { FCALL_CONTRACT; diff --git a/src/coreclr/vm/comsynchronizable.h b/src/coreclr/vm/comsynchronizable.h index eacf29640078bb..a069d109a79d15 100644 --- a/src/coreclr/vm/comsynchronizable.h +++ b/src/coreclr/vm/comsynchronizable.h @@ -69,7 +69,6 @@ friend class ThreadBaseObject; #endif // FEATURE_COMINTEROP_APARTMENT_SUPPORT - static FCDECL1(INT32, GetManagedThreadId, ThreadBaseObject* th); static FCDECL0(INT32, GetOptimalMaxSpinWaitsPerSpinIteration); static FCDECL1(void, SpinWait, int iterations); static FCDECL0(Object*, GetCurrentThread); diff --git a/src/coreclr/vm/corelib.h b/src/coreclr/vm/corelib.h index 96576a85813125..0dd79fb124f820 100644 --- a/src/coreclr/vm/corelib.h +++ b/src/coreclr/vm/corelib.h @@ -1183,6 +1183,17 @@ DEFINE_METHOD(CASTHELPERS, UNBOX, Unbox, SM_Ptr DEFINE_METHOD(CASTHELPERS, STELEMREF, StelemRef, SM_Array_IntPtr_Obj_RetVoid) DEFINE_METHOD(CASTHELPERS, LDELEMAREF, LdelemaRef, SM_Array_IntPtr_PtrVoid_RetRefObj) +#ifdef FEATURE_EH_FUNCLETS +DEFINE_CLASS(EH, Runtime, EH) +DEFINE_METHOD(EH, RH_THROW_EX, RhThrowEx, SM_Obj_RefExInfo_RetVoid) +DEFINE_METHOD(EH, RH_THROWHW_EX, RhThrowHwEx, SM_UInt_RefExInfo_RetVoid) +DEFINE_METHOD(EH, RH_RETHROW, RhRethrow, SM_RefExInfo_RefExInfo_RetVoid) +#endif // FEATURE_EH_FUNCLETS + +#ifndef FOR_ILLINK +DEFINE_CLASS(EXINFO, Runtime, EH+ExInfo) +#endif // FOR_ILLINK + DEFINE_CLASS_U(System, GCMemoryInfoData, GCMemoryInfoData) DEFINE_FIELD_U(_highMemoryLoadThresholdBytes, GCMemoryInfoData, highMemLoadThresholdBytes) DEFINE_FIELD_U(_totalAvailableMemoryBytes, GCMemoryInfoData, totalAvailableMemoryBytes) diff --git a/src/coreclr/vm/dbginterface.h b/src/coreclr/vm/dbginterface.h index 85b9785bccbb9b..830b273b133792 100644 --- a/src/coreclr/vm/dbginterface.h +++ b/src/coreclr/vm/dbginterface.h @@ -174,7 +174,7 @@ class DebugInterface // // EnC functions // -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER // Notify that an existing method has been edited in a loaded type virtual HRESULT UpdateFunction(MethodDesc* md, SIZE_T enCVersion) = 0; @@ -199,7 +199,7 @@ class DebugInterface // Used by FixContextAndResume virtual void SendSetThreadContextNeeded(CONTEXT *context) = 0; virtual BOOL IsOutOfProcessSetContextEnabled() = 0; -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER // Get debugger variable information for a specific version of a method virtual void GetVarInfo(MethodDesc * fd, // [IN] method of interest diff --git a/src/coreclr/vm/debugdebugger.cpp b/src/coreclr/vm/debugdebugger.cpp index 71f6f9ba3193ec..fc6e7a5019e725 100644 --- a/src/coreclr/vm/debugdebugger.cpp +++ b/src/coreclr/vm/debugdebugger.cpp @@ -525,7 +525,7 @@ FCIMPL4(void, DebugStackTrace::GetStackFramesInternal, // have updated PDBs from EnC, we can at best look at the module's version number as a rough guess // to if this file has been updated. bool fIsEnc = false; -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER if (pModule->IsEditAndContinueEnabled()) { EditAndContinueModule *eacm = (EditAndContinueModule *)pModule; @@ -785,10 +785,10 @@ FCIMPL4(void, DebugStackTrace::GetStackFramesInternal, else { // Set the pdb path (assembly file name) - SString assemblyPath = pPEAssembly->GetIdentityPath(); + const SString& assemblyPath = pPEAssembly->GetIdentityPath(); if (!assemblyPath.IsEmpty()) { - OBJECTREF obj = (OBJECTREF)StringObject::NewString(assemblyPath); + OBJECTREF obj = (OBJECTREF)StringObject::NewString(assemblyPath.GetUnicode()); pStackFrameHelper->rgAssemblyPath->SetAt(iNumValidFrames, obj); } } diff --git a/src/coreclr/vm/dllimport.cpp b/src/coreclr/vm/dllimport.cpp index 37aab6a3f530d7..c0f90289a01682 100644 --- a/src/coreclr/vm/dllimport.cpp +++ b/src/coreclr/vm/dllimport.cpp @@ -3316,8 +3316,12 @@ BOOL NDirect::MarshalingRequired( FALLTHROUGH; case ELEMENT_TYPE_VALUETYPE: + case ELEMENT_TYPE_GENERICINST: { TypeHandle hndArgType = arg.GetTypeHandleThrowing(pModule, &emptyTypeContext); + bool isValidGeneric = IsValidForGenericMarshalling(hndArgType.GetMethodTable(), false, runtimeMarshallingEnabled); + if(!hndArgType.IsValueType() || !isValidGeneric) + return true; if (hndArgType.GetMethodTable()->IsInt128OrHasInt128Fields()) { diff --git a/src/coreclr/vm/dwbucketmanager.hpp b/src/coreclr/vm/dwbucketmanager.hpp index 167685f78a597c..82532aa5b42b4b 100644 --- a/src/coreclr/vm/dwbucketmanager.hpp +++ b/src/coreclr/vm/dwbucketmanager.hpp @@ -960,11 +960,9 @@ bool BaseBucketParamsManager::GetFileVersionInfoForModule(Module* pModule, USHOR // if we failed to get the version info from the native image then fall back to the IL image. if (!succeeded) { - LPCWSTR modulePath = pPEAssembly->GetPath().GetUnicode(); - if (modulePath != NULL && modulePath != SString::Empty() && SUCCEEDED(DwGetFileVersionInfo(modulePath, major, minor, build, revision))) - { - succeeded = true; - } + const SString& modulePath = pPEAssembly->GetPath(); + _ASSERTE(modulePath.IsNormalized()); + succeeded = !modulePath.IsEmpty() && SUCCEEDED(DwGetFileVersionInfo(modulePath.GetUnicode(), major, minor, build, revision)); } } diff --git a/src/coreclr/vm/dwreport.cpp b/src/coreclr/vm/dwreport.cpp index 875936fed09a42..83e42a27d18e17 100644 --- a/src/coreclr/vm/dwreport.cpp +++ b/src/coreclr/vm/dwreport.cpp @@ -18,7 +18,6 @@ #include #include #include "dbginterface.h" -#include #include "dlwrap.h" #include "eventreporter.h" #include "utilcode.h" diff --git a/src/coreclr/vm/ecalllist.h b/src/coreclr/vm/ecalllist.h index 39e9a3a44d1cd4..c8c83502cfbab2 100644 --- a/src/coreclr/vm/ecalllist.h +++ b/src/coreclr/vm/ecalllist.h @@ -371,7 +371,6 @@ FCFuncStart(gThreadFuncs) FCFuncElement("Initialize", ThreadNative::Initialize) FCFuncElement("SpinWaitInternal", ThreadNative::SpinWait) FCFuncElement("GetCurrentThreadNative", ThreadNative::GetCurrentThread) - FCFuncElement("get_ManagedThreadId", ThreadNative::GetManagedThreadId) FCFuncElement("InternalFinalize", ThreadNative::Finalize) FCFuncElement("get_IsAlive", ThreadNative::IsAlive) FCFuncElement("IsBackgroundNative", ThreadNative::IsBackground) diff --git a/src/coreclr/vm/eeconfig.cpp b/src/coreclr/vm/eeconfig.cpp index 0f1de4d4fe788a..66a7fc6aea1acb 100644 --- a/src/coreclr/vm/eeconfig.cpp +++ b/src/coreclr/vm/eeconfig.cpp @@ -240,6 +240,7 @@ HRESULT EEConfig::Init() #if defined(FEATURE_PGO) fTieredPGO = false; tieredPGO_InstrumentOnlyHotCode = false; + tieredPGO_ScalableCountThreshold = 13; #endif #if defined(FEATURE_READYTORUN) @@ -782,6 +783,13 @@ HRESULT EEConfig::sync() fTieredPGO |= CLRConfig::GetConfigValue(CLRConfig::INTERNAL_WritePGOData) != 0; tieredPGO_InstrumentOnlyHotCode = CLRConfig::GetConfigValue(CLRConfig::UNSUPPORTED_TieredPGO_InstrumentOnlyHotCode) == 1; + DWORD scalableCountThreshold = CLRConfig::GetConfigValue(CLRConfig::UNSUPPORTED_TieredPGO_ScalableCountThreshold); + + if ((scalableCountThreshold > 0) && (scalableCountThreshold < 20)) + { + tieredPGO_ScalableCountThreshold = scalableCountThreshold; + } + // We need quick jit for TieredPGO if (!fTieredCompilation_QuickJit) { diff --git a/src/coreclr/vm/eeconfig.h b/src/coreclr/vm/eeconfig.h index 6394f1b998c0f6..9c850714883c4d 100644 --- a/src/coreclr/vm/eeconfig.h +++ b/src/coreclr/vm/eeconfig.h @@ -94,6 +94,7 @@ class EEConfig #if defined(FEATURE_PGO) bool TieredPGO(void) const { LIMITED_METHOD_CONTRACT; return fTieredPGO; } bool TieredPGO_InstrumentOnlyHotCode(void) const { LIMITED_METHOD_CONTRACT; return tieredPGO_InstrumentOnlyHotCode; } + DWORD TieredPGO_ScalableCountThreshold() const { LIMITED_METHOD_CONTRACT; return tieredPGO_ScalableCountThreshold; } #endif #if defined(FEATURE_READYTORUN) @@ -658,6 +659,7 @@ class EEConfig #if defined(FEATURE_PGO) bool fTieredPGO; bool tieredPGO_InstrumentOnlyHotCode; + DWORD tieredPGO_ScalableCountThreshold; #endif #if defined(FEATURE_READYTORUN) diff --git a/src/coreclr/vm/eedbginterface.h b/src/coreclr/vm/eedbginterface.h index 07666d607a2a3c..bd38ff5e30f9de 100644 --- a/src/coreclr/vm/eedbginterface.h +++ b/src/coreclr/vm/eedbginterface.h @@ -18,7 +18,7 @@ #include "field.h" #include "stackwalk.h" -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER #include "encee.h" #endif @@ -168,7 +168,7 @@ class EEDebugInterface #ifndef DACCESS_COMPILE -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER // Apply an EnC edit virtual HRESULT EnCApplyChanges(EditAndContinueModule *pModule, @@ -183,7 +183,7 @@ class EEDebugInterface void *debuggerFuncHandle, SIZE_T resumeIP, CONTEXT *pContext) = 0; -#endif //EnC_SUPPORTED +#endif //FEATURE_METADATA_UPDATER // // New methods to support the new debugger. diff --git a/src/coreclr/vm/eedbginterfaceimpl.cpp b/src/coreclr/vm/eedbginterfaceimpl.cpp index 352a534d5c1a88..08adac7213348b 100644 --- a/src/coreclr/vm/eedbginterfaceimpl.cpp +++ b/src/coreclr/vm/eedbginterfaceimpl.cpp @@ -1088,7 +1088,7 @@ void EEDbgInterfaceImpl::MarkDebuggerUnattached(void) } -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER // Apply an EnC edit to the specified module HRESULT EEDbgInterfaceImpl::EnCApplyChanges(EditAndContinueModule *pModule, @@ -1131,7 +1131,7 @@ void EEDbgInterfaceImpl::ResumeInUpdatedFunction(EditAndContinueModule *pModule, pContext); } -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER bool EEDbgInterfaceImpl::CrawlFrameIsGcSafe(CrawlFrame *pCF) { diff --git a/src/coreclr/vm/eedbginterfaceimpl.h b/src/coreclr/vm/eedbginterfaceimpl.h index f97c115ff6a95d..5b3332e49d1b95 100644 --- a/src/coreclr/vm/eedbginterfaceimpl.h +++ b/src/coreclr/vm/eedbginterfaceimpl.h @@ -220,7 +220,7 @@ class EEDbgInterfaceImpl : public EEDebugInterface void MarkDebuggerUnattached(void); -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER // Apply an EnC edit to the specified module // This function should never return. @@ -236,7 +236,7 @@ class EEDbgInterfaceImpl : public EEDebugInterface void *debuggerFuncHandle, SIZE_T resumeIP, T_CONTEXT *pContext); - #endif // EnC_SUPPORTED + #endif // FEATURE_METADATA_UPDATER bool CrawlFrameIsGcSafe(CrawlFrame *pCF); diff --git a/src/coreclr/vm/eepolicy.cpp b/src/coreclr/vm/eepolicy.cpp index af27338544e861..c88d6206a06a87 100644 --- a/src/coreclr/vm/eepolicy.cpp +++ b/src/coreclr/vm/eepolicy.cpp @@ -298,7 +298,7 @@ inline void LogCallstackForLogWorker(Thread* pThread) { WordAt.Insert(WordAt.Begin(), W(" ")); } - WordAt += W(" "); + WordAt.Append(W(" ")); CallStackLogger logger; @@ -484,8 +484,10 @@ void EEPolicy::LogFatalError(UINT exitCode, UINT_PTR address, LPCWSTR pszMessage // Format the string InlineSString<80> ssMessage; - ssMessage.FormatMessage(FORMAT_MESSAGE_FROM_STRING, W("at IP 0x%1 (0x%2) with exit code 0x%3."), 0, 0, addressString, runtimeBaseAddressString, - exitCodeString); + ssMessage.FormatMessage(FORMAT_MESSAGE_FROM_STRING, W("at IP 0x%1 (0x%2) with exit code 0x%3."), 0, 0, + SString{ SString::Literal, addressString }, + SString{ SString::Literal, runtimeBaseAddressString }, + SString{ SString::Literal, exitCodeString }); reporter.AddDescription(ssMessage); } @@ -624,7 +626,7 @@ void DECLSPEC_NORETURN EEPolicy::HandleFatalStackOverflow(EXCEPTION_POINTERS *pE // 2. In native code with no explicit frame above the topmost managed frame // 3. In native code with a explicit frame(s) above the topmost managed frame // The FaultingExceptionFrame's context needs to point to the topmost managed code frame except for the case 3. - // In that case, it needs to point to the actual frame where the stack overflow happened, otherwise the stack + // In that case, it needs to point to the actual frame where the stack overflow happened, otherwise the stack // walker would skip the explicit frame(s) and misbehave. Thread *pThread = GetThreadNULLOk(); if (pThread) diff --git a/src/coreclr/vm/eetwain.cpp b/src/coreclr/vm/eetwain.cpp index bb06173bca5237..b0886fcadebee4 100644 --- a/src/coreclr/vm/eetwain.cpp +++ b/src/coreclr/vm/eetwain.cpp @@ -792,7 +792,7 @@ bool VarIsInReg(ICorDebugInfo::VarLoc varLoc) } } -#ifdef FEATURE_ENC_SUPPORTED +#ifdef FEATURE_REMAP_FUNCTION /***************************************************************************** * Last chance for the runtime support to do fixups in the context * before execution continues inside an EnC updated function. @@ -1471,7 +1471,7 @@ HRESULT EECodeManager::FixContextForEnC(PCONTEXT pCtx, return hr; } -#endif // !EnC_SUPPORTED +#endif // !FEATURE_METADATA_UPDATER #endif // #ifndef DACCESS_COMPILE @@ -4458,7 +4458,7 @@ FCIMPL1(void, GCReporting::Unregister, GCFrame* frame) // Destroy the GCFrame. _ASSERTE(frame != NULL); - frame->Pop(); + frame->Remove(); } FCIMPLEND #endif // !DACCESS_COMPILE diff --git a/src/coreclr/vm/encee.cpp b/src/coreclr/vm/encee.cpp index 3339462ad7fe77..eef50b18936a2d 100644 --- a/src/coreclr/vm/encee.cpp +++ b/src/coreclr/vm/encee.cpp @@ -21,7 +21,7 @@ #include "../debug/daccess/gcinterface.dac.h" #endif // DACCESS_COMPILE -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER // can't get this on the helper thread at runtime in ResolveField, so make it static and get when add a field. #ifdef _DEBUG @@ -737,7 +737,7 @@ HRESULT EditAndContinueModule::ResumeInUpdatedFunction( } -#ifdef FEATURE_ENC_SUPPORTED +#ifdef FEATURE_REMAP_FUNCTION //--------------------------------------------------------------------------------------- // // FixContextAndResume - Modify the thread context for EnC remap and resume execution @@ -873,7 +873,7 @@ NOINLINE void EditAndContinueModule::FixContextAndResume( LOG((LF_ENC, LL_ERROR, "**Error** EnCModule::ResumeInUpdatedFunction returned from ResumeAtJit")); _ASSERTE(!"Should not return from ResumeAtJit()"); } -#endif // #ifdef FEATURE_ENC_SUPPORTED +#endif // #ifdef FEATURE_REMAP_FUNCTION #endif // #ifndef DACCESS_COMPILE @@ -1825,4 +1825,4 @@ PTR_EnCFieldDesc EncApproxFieldDescIterator::NextEnC() return fd; } -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER diff --git a/src/coreclr/vm/encee.h b/src/coreclr/vm/encee.h index 0fe0a9d8d8229b..04a469c14fe8c9 100644 --- a/src/coreclr/vm/encee.h +++ b/src/coreclr/vm/encee.h @@ -17,7 +17,7 @@ #include "field.h" #include "class.h" -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER class FieldDesc; struct EnCAddedField; @@ -247,14 +247,14 @@ class EditAndContinueModule : public Module SIZE_T newILOffset, T_CONTEXT *pContext); -#ifdef FEATURE_ENC_SUPPORTED +#ifdef FEATURE_REMAP_FUNCTION // Modify the thread context for EnC remap and resume execution void FixContextAndResume(MethodDesc *pMD, void *oldDebuggerFuncHandle, T_CONTEXT *pContext, EECodeInfo *pOldCodeInfo, EECodeInfo *pNewCodeInfo); -#endif // FEATURE_ENC_SUPPORTED +#endif // FEATURE_REMAP_FUNCTION // Get a pointer to the value of a field added by EnC or return NULL if it doesn't exist PTR_CBYTE ResolveField(OBJECTREF thisPointer, @@ -372,7 +372,7 @@ class EnCSyncBlockInfo // The DPTR is actually defined in syncblk.h to make it visible to SyncBlock // typedef DPTR(EnCSyncBlockInfo) PTR_EnCSyncBlockInfo; -#endif // !EnC_SUPPORTED +#endif // !FEATURE_METADATA_UPDATER //--------------------------------------------------------------------------------------- @@ -407,7 +407,7 @@ class EncApproxFieldDescIterator final OnlyEncFields, }; -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER // Create and initialize the iterator EncApproxFieldDescIterator(MethodTable *pMT, int iteratorType, uint32_t flags = None); @@ -423,7 +423,7 @@ class EncApproxFieldDescIterator final PTR_FieldDesc Next() { WRAPPER_NO_CONTRACT; return m_nonEnCIter.Next(); } int Count() { WRAPPER_NO_CONTRACT; return m_nonEnCIter.Count(); } -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER int GetIteratorType() { @@ -437,7 +437,7 @@ class EncApproxFieldDescIterator final // We delegate to this for alll non-EnC specific stuff ApproxFieldDescIterator m_nonEnCIter; -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER // Return the next available EnC FieldDesc or NULL when done PTR_EnCFieldDesc NextEnC(); diff --git a/src/coreclr/vm/eventing/CMakeLists.txt b/src/coreclr/vm/eventing/CMakeLists.txt index 9252e944bfd1fe..efa1fc160ebe33 100644 --- a/src/coreclr/vm/eventing/CMakeLists.txt +++ b/src/coreclr/vm/eventing/CMakeLists.txt @@ -26,7 +26,7 @@ set(GENEVENTING_SCRIPT ${CLR_DIR}/scripts/genEventing.py) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/eventing_headers.timestamp - COMMAND ${Python_EXECUTABLE} ${GENEVENTING_SCRIPT} --man ${EVENT_MANIFEST} --inc ${GENERATED_INCLUDE_DIR} --dummy ${GENERATED_INCLUDE_DIR}/etmdummy.h ${NONEXTERN_ARG} ${NOXPLATHEADER_ARG} + COMMAND ${Python_EXECUTABLE} ${GENEVENTING_SCRIPT} --man ${EVENT_MANIFEST} --incdir ${GENERATED_INCLUDE_DIR} --dummy ${GENERATED_INCLUDE_DIR}/etmdummy.h ${NONEXTERN_ARG} ${NOXPLATHEADER_ARG} COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/eventing_headers.timestamp DEPENDS ${EVENT_MANIFEST} ${GENEVENTING_SCRIPT} VERBATIM diff --git a/src/coreclr/vm/eventing/EtwProvider/CMakeLists.txt b/src/coreclr/vm/eventing/EtwProvider/CMakeLists.txt index 3bc2b8c675e5eb..95276c407ddd37 100644 --- a/src/coreclr/vm/eventing/EtwProvider/CMakeLists.txt +++ b/src/coreclr/vm/eventing/EtwProvider/CMakeLists.txt @@ -1,4 +1,4 @@ -include(FindPythonInterp) +include(FindPython) set(ETW_PROVIDER_SCRIPT ${CLR_DIR}/scripts/genEtwProvider.py) @@ -15,7 +15,7 @@ set_source_files_properties(${ETW_PROVIDER_OUTPUTS} PROPERTIES GENERATED TRUE) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/eventprovider.timestamp - COMMAND ${PYTHON_EXECUTABLE} ${ETW_PROVIDER_SCRIPT} --man ${EVENT_MANIFEST} --exc ${EVENT_EXCLUSIONS} --intermediate ${GENERATED_INCLUDE_DIR} + COMMAND ${Python_EXECUTABLE} ${ETW_PROVIDER_SCRIPT} --man ${EVENT_MANIFEST} --exc ${EVENT_EXCLUSIONS} --intermediate ${GENERATED_INCLUDE_DIR} COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/eventprovider.timestamp DEPENDS ${EVENT_MANIFEST} ${EVENT_EXCLUSIONS} ${ETW_PROVIDER_SCRIPT}) diff --git a/src/coreclr/vm/eventing/eventpipe/CMakeLists.txt b/src/coreclr/vm/eventing/eventpipe/CMakeLists.txt index 6e12937e0364c2..666761a1123928 100644 --- a/src/coreclr/vm/eventing/eventpipe/CMakeLists.txt +++ b/src/coreclr/vm/eventing/eventpipe/CMakeLists.txt @@ -65,12 +65,8 @@ set_source_files_properties(${CONTAINER_SOURCES} PROPERTIES LANGUAGE CXX) set_source_files_properties(${EVENTPIPE_SOURCES} PROPERTIES LANGUAGE CXX) if(CLR_CMAKE_HOST_UNIX) - if (CMAKE_VERSION VERSION_GREATER 3.11 OR CMAKE_VERSION VERSION_EQUAL 3.11) set_source_files_properties(${CONTAINER_SOURCES} PROPERTIES COMPILE_OPTIONS -xc++) set_source_files_properties(${EVENTPIPE_SOURCES} PROPERTIES COMPILE_OPTIONS -xc++) - else(CMAKE_VERSION VERSION_GREATER 3.11 OR CMAKE_VERSION VERSION_EQUAL 3.11) - add_compile_options(-xc++) - endif() endif(CLR_CMAKE_HOST_UNIX) list(APPEND CORECLR_EVENTPIPE_SHIM_SOURCES diff --git a/src/coreclr/vm/eventing/eventpipe/ds-rt-coreclr.h b/src/coreclr/vm/eventing/eventpipe/ds-rt-coreclr.h index 57f5c125742fab..e6036353d8b9f7 100644 --- a/src/coreclr/vm/eventing/eventpipe/ds-rt-coreclr.h +++ b/src/coreclr/vm/eventing/eventpipe/ds-rt-coreclr.h @@ -166,7 +166,7 @@ ds_rt_config_value_get_ports (void) STATIC_CONTRACT_NOTHROW; CLRConfigStringHolder value(CLRConfig::GetConfigValue (CLRConfig::EXTERNAL_DOTNET_DiagnosticPorts)); - return ep_rt_utf16_to_utf8_string (reinterpret_cast(value.GetValue ()), -1); + return ep_rt_utf16_to_utf8_string (reinterpret_cast(value.GetValue ())); } static diff --git a/src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h b/src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h index 7cf15a2a59b12a..f5a07a3f1adaa2 100644 --- a/src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h +++ b/src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h @@ -12,6 +12,7 @@ #include #include #include +#include #include "fstream.h" #include "typestring.h" #include "clrversion.h" @@ -507,7 +508,7 @@ ep_rt_config_value_get_config (void) { STATIC_CONTRACT_NOTHROW; CLRConfigStringHolder value(CLRConfig::GetConfigValue (CLRConfig::INTERNAL_EventPipeConfig)); - return ep_rt_utf16_to_utf8_string (reinterpret_cast(value.GetValue ()), -1); + return ep_rt_utf16_to_utf8_string (reinterpret_cast(value.GetValue ())); } static @@ -517,7 +518,7 @@ ep_rt_config_value_get_output_path (void) { STATIC_CONTRACT_NOTHROW; CLRConfigStringHolder value(CLRConfig::GetConfigValue (CLRConfig::INTERNAL_EventPipeOutputPath)); - return ep_rt_utf16_to_utf8_string (reinterpret_cast(value.GetValue ()), -1); + return ep_rt_utf16_to_utf8_string (reinterpret_cast(value.GetValue ())); } static @@ -1047,7 +1048,7 @@ ep_rt_file_open_write (const ep_char8_t *path) { STATIC_CONTRACT_NOTHROW; - ep_char16_t *path_utf16 = ep_rt_utf8_to_utf16le_string (path, -1); + ep_char16_t *path_utf16 = ep_rt_utf8_to_utf16le_string (path); ep_return_null_if_nok (path_utf16 != NULL); CFileStream *file_stream = new (nothrow) CFileStream (); @@ -1332,24 +1333,6 @@ ep_rt_utf8_string_compare_ignore_case ( return _stricmp (reinterpret_cast(str1), reinterpret_cast(str2)); } -static -inline -bool -ep_rt_utf8_string_is_null_or_empty (const ep_char8_t *str) -{ - STATIC_CONTRACT_NOTHROW; - - if (str == NULL) - return true; - - while (*str) { - if (!isspace (*str)) - return false; - str++; - } - return true; -} - static inline ep_char8_t * @@ -1430,38 +1413,6 @@ ep_rt_utf8_string_replace ( return false; } -static -ep_char16_t * -ep_rt_utf8_to_utf16le_string ( - const ep_char8_t *str, - size_t len) -{ - STATIC_CONTRACT_NOTHROW; - - if (!str) - return NULL; - - COUNT_T len_utf16 = WszMultiByteToWideChar (CP_UTF8, 0, str, static_cast(len), 0, 0); - if (len_utf16 == 0) - return NULL; - - if (static_cast(len) != -1) - len_utf16 += 1; - - ep_char16_t *str_utf16 = reinterpret_cast(malloc (len_utf16 * sizeof (ep_char16_t))); - if (!str_utf16) - return NULL; - - len_utf16 = WszMultiByteToWideChar (CP_UTF8, 0, str, static_cast(len), reinterpret_cast(str_utf16), len_utf16); - if (len_utf16 == 0) { - free (str_utf16); - return NULL; - } - - str_utf16 [len_utf16 - 1] = 0; - return str_utf16; -} - static inline ep_char16_t * @@ -1479,6 +1430,13 @@ ep_rt_utf16_string_dup (const ep_char16_t *str) return str_dup; } +static +ep_char8_t * +ep_rt_utf8_string_alloc (size_t len) +{ + return reinterpret_cast(malloc(len)); +} + static inline void @@ -1502,45 +1460,10 @@ ep_rt_utf16_string_len (const ep_char16_t *str) } static -ep_char8_t * -ep_rt_utf16_to_utf8_string ( - const ep_char16_t *str, - size_t len) -{ - STATIC_CONTRACT_NOTHROW; - - if (!str) - return NULL; - - COUNT_T size_utf8 = WszWideCharToMultiByte (CP_UTF8, 0, reinterpret_cast(str), static_cast(len), NULL, 0, NULL, NULL); - if (size_utf8 == 0) - return NULL; - - if (static_cast(len) != -1) - size_utf8 += 1; - - ep_char8_t *str_utf8 = reinterpret_cast(malloc (size_utf8)); - if (!str_utf8) - return NULL; - - size_utf8 = WszWideCharToMultiByte (CP_UTF8, 0, reinterpret_cast(str), static_cast(len), reinterpret_cast(str_utf8), size_utf8, NULL, NULL); - if (size_utf8 == 0) { - free (str_utf8); - return NULL; - } - - str_utf8 [size_utf8 - 1] = 0; - return str_utf8; -} - -static -inline -ep_char8_t * -ep_rt_utf16le_to_utf8_string ( - const ep_char16_t *str, - size_t len) +ep_char16_t * +ep_rt_utf16_string_alloc (size_t len) { - return ep_rt_utf16_to_utf8_string (str, len); + return reinterpret_cast(malloc(len * sizeof(ep_char16_t))); } static @@ -1583,7 +1506,7 @@ ep_rt_diagnostics_command_line_get (void) extern ep_char8_t *volatile _ep_rt_coreclr_diagnostics_cmd_line; ep_char8_t *old_cmd_line = _ep_rt_coreclr_diagnostics_cmd_line; - ep_char8_t *new_cmd_line = ep_rt_utf16_to_utf8_string (reinterpret_cast(GetCommandLineForDiagnostics ()), -1); + ep_char8_t *new_cmd_line = ep_rt_utf16_to_utf8_string (reinterpret_cast(GetCommandLineForDiagnostics ())); if (old_cmd_line && ep_rt_utf8_string_compare (old_cmd_line, new_cmd_line) == 0) { // same as old, so free the new one ep_rt_utf8_string_free (new_cmd_line); diff --git a/src/coreclr/vm/eventpipeadapter.h b/src/coreclr/vm/eventpipeadapter.h index 97ee4fd05478d5..f344d206629c12 100644 --- a/src/coreclr/vm/eventpipeadapter.h +++ b/src/coreclr/vm/eventpipeadapter.h @@ -42,10 +42,10 @@ class EventPipeProviderConfigurationAdapter final for (uint32_t i = 0; i < providerConfigsLen; ++i) { ep_provider_config_init ( &m_providerConfigs[i], - ep_rt_utf16_to_utf8_string (reinterpret_cast(providerConfigs[i].providerName), -1), + ep_rt_utf16_to_utf8_string (reinterpret_cast(providerConfigs[i].providerName)), providerConfigs[i].keywords, static_cast(providerConfigs[i].loggingLevel), - ep_rt_utf16_to_utf8_string (reinterpret_cast(providerConfigs[i].filterData), -1)); + ep_rt_utf16_to_utf8_string (reinterpret_cast(providerConfigs[i].filterData))); } } } @@ -213,7 +213,7 @@ class EventPipeAdapter final ep_char8_t *outputPathUTF8 = NULL; if (outputPath) - outputPathUTF8 = ep_rt_utf16_to_utf8_string (reinterpret_cast(outputPath), -1); + outputPathUTF8 = ep_rt_utf16_to_utf8_string (reinterpret_cast(outputPath)); EventPipeSessionID result = ep_enable ( outputPathUTF8, circularBufferSizeInMB, @@ -318,7 +318,7 @@ class EventPipeAdapter final ep_add_provider_to_session (provider, session); } - static inline EventPipeProvider * CreateProvider(const SString &providerName, EventPipeCallback callback, void* callbackContext = nullptr) + static inline EventPipeProvider * CreateProvider(const WCHAR* providerName, EventPipeCallback callback, void* callbackContext = nullptr) { CONTRACTL { @@ -328,7 +328,7 @@ class EventPipeAdapter final } CONTRACTL_END; - ep_char8_t *providerNameUTF8 = ep_rt_utf16_to_utf8_string(reinterpret_cast(providerName.GetUnicode ()), -1); + ep_char8_t *providerNameUTF8 = ep_rt_utf16_to_utf8_string(reinterpret_cast(providerName)); EventPipeProvider * provider = ep_create_provider (providerNameUTF8, callback, callbackContext); ep_rt_utf8_string_free (providerNameUTF8); return provider; @@ -360,7 +360,7 @@ class EventPipeAdapter final if (!providerName) return NULL; - ep_char8_t *providerNameUTF8 = ep_rt_utf16_to_utf8_string(reinterpret_cast(providerName), -1); + ep_char8_t *providerNameUTF8 = ep_rt_utf16_to_utf8_string(reinterpret_cast(providerName)); EventPipeProvider * provider = ep_get_provider (providerNameUTF8); ep_rt_utf8_string_free(providerNameUTF8); return provider; diff --git a/src/coreclr/vm/eventreporter.cpp b/src/coreclr/vm/eventreporter.cpp index 0e2444376b8eb7..2065ed5ea32045 100644 --- a/src/coreclr/vm/eventreporter.cpp +++ b/src/coreclr/vm/eventreporter.cpp @@ -557,7 +557,7 @@ void LogCallstackForEventReporterWorker(EventReporter& reporter) { WordAt.Insert(WordAt.Begin(), W(" ")); } - WordAt += W(" "); + WordAt.Append(W(" ")); LogCallstackData data = { &reporter, &WordAt @@ -679,7 +679,9 @@ void DoReportForUnhandledNativeException(PEXCEPTION_POINTERS pExceptionInfo) FormatInteger(addressString, ARRAY_SIZE(addressString), "%p", (SIZE_T)pExceptionInfo->ExceptionRecord->ExceptionAddress); StackSString s; - s.FormatMessage(FORMAT_MESSAGE_FROM_STRING, W("exception code %1, exception address %2"), 0, 0, exceptionCodeString, addressString); + s.FormatMessage(FORMAT_MESSAGE_FROM_STRING, W("exception code %1, exception address %2"), 0, 0, + SString{ SString::Literal, exceptionCodeString }, + SString{ SString::Literal, addressString }); reporter.AddDescription(s); if (pThread) { diff --git a/src/coreclr/vm/eventtrace.cpp b/src/coreclr/vm/eventtrace.cpp index 9498f00edf4329..5c3dae9ab256dc 100644 --- a/src/coreclr/vm/eventtrace.cpp +++ b/src/coreclr/vm/eventtrace.cpp @@ -4359,7 +4359,7 @@ VOID ETW::LoaderLog::SendModuleEvent(Module *pModule, DWORD dwEventOptions, BOOL } LPCWSTR pEmptyString = W(""); - SString moduleName = SString::Empty(); + SString moduleName{ SString::Empty() }; if(!bIsDynamicAssembly) { diff --git a/src/coreclr/vm/excep.cpp b/src/coreclr/vm/excep.cpp index 5be645ad496d7d..4311f7a8f7a0d2 100644 --- a/src/coreclr/vm/excep.cpp +++ b/src/coreclr/vm/excep.cpp @@ -55,12 +55,7 @@ #include "gccover.h" #endif // HAVE_GCCOVER -#ifndef TARGET_UNIX -// Windows uses 64kB as the null-reference area -#define NULL_AREA_SIZE (64 * 1024) -#else // !TARGET_UNIX -#define NULL_AREA_SIZE GetOsPageSize() -#endif // !TARGET_UNIX +#include "exinfo.h" //---------------------------------------------------------------------------- // @@ -2879,6 +2874,22 @@ VOID DECLSPEC_NORETURN RealCOMPlusThrow(OBJECTREF throwable) RealCOMPlusThrow(throwable, FALSE); } +#ifdef USE_CHECKED_OBJECTREFS +VOID DECLSPEC_NORETURN RealCOMPlusThrow(Object *exceptionObj) +{ + CONTRACTL + { + THROWS; + GC_TRIGGERS; + MODE_COOPERATIVE; + } + CONTRACTL_END; + + OBJECTREF throwable = ObjectToOBJECTREF(exceptionObj); + RealCOMPlusThrow(throwable, FALSE); +} +#endif // USE_CHECKED_OBJECTREFS + // this function finds the managed callback to get a resource // string from the then current local domain and calls it // this could be a lot of work @@ -5081,7 +5092,7 @@ static SString GetExceptionMessageWrapper(Thread* pThread, OBJECTREF throwable) GetExceptionMessage(throwable, result); UNINSTALL_NESTED_EXCEPTION_HANDLER(); - return result; + return SString{ result }; } void STDMETHODCALLTYPE @@ -5767,6 +5778,7 @@ extern "C" void QCALLTYPE FileLoadException_GetMessageForHR(UINT32 hresult, QCal case COR_E_BADIMAGEFORMAT: case COR_E_NEWER_RUNTIME: case COR_E_ASSEMBLYEXPECTED: + case CLR_E_BIND_ARCHITECTURE_MISMATCH: bNoGeekStuff = TRUE; break; } @@ -6037,7 +6049,7 @@ CreateCOMPlusExceptionObject(Thread *pThread, EXCEPTION_RECORD *pExceptionRecord ThreadPreventAsyncHolder preventAsync; ResetProcessorStateHolder procState; - INSTALL_UNWIND_AND_CONTINUE_HANDLER; + INSTALL_UNWIND_AND_CONTINUE_HANDLER_EX; GCPROTECT_BEGIN(result) @@ -6052,7 +6064,7 @@ CreateCOMPlusExceptionObject(Thread *pThread, EXCEPTION_RECORD *pExceptionRecord GCPROTECT_END(); - UNINSTALL_UNWIND_AND_CONTINUE_HANDLER; + UNINSTALL_UNWIND_AND_CONTINUE_HANDLER_EX(true); } EX_CATCH { @@ -6553,6 +6565,46 @@ static LONG HandleManagedFaultFilter(EXCEPTION_POINTERS* ep, LPVOID pv) return EXCEPTION_CONTINUE_SEARCH; } +void HandleManagedFaultNew(EXCEPTION_RECORD* pExceptionRecord, CONTEXT* pContext) +{ + WRAPPER_NO_CONTRACT; + + FrameWithCookie frameWithCookie; + FaultingExceptionFrame *frame = &frameWithCookie; +#if defined(FEATURE_EH_FUNCLETS) + *frame->GetGSCookiePtr() = GetProcessGSCookie(); +#endif // FEATURE_EH_FUNCLETS + pContext->ContextFlags |= CONTEXT_EXCEPTION_ACTIVE; + frame->InitAndLink(pContext); + + CONTEXT ctx = {}; + ctx.ContextFlags = CONTEXT_CONTROL | CONTEXT_INTEGER; + REGDISPLAY rd; + Thread *pThread = GetThread(); + + ExInfo exInfo(pThread, &ctx, &rd, ExKind::HardwareFault); + + DWORD exceptionCode = pExceptionRecord->ExceptionCode; + if (exceptionCode == STATUS_ACCESS_VIOLATION) + { + if (pExceptionRecord->ExceptionInformation[1] < NULL_AREA_SIZE) + { + exceptionCode = 0; //STATUS_REDHAWK_NULL_REFERENCE; + } + } + + GCPROTECT_BEGIN(exInfo.m_exception); + PREPARE_NONVIRTUAL_CALLSITE(METHOD__EH__RH_THROWHW_EX); + DECLARE_ARGHOLDER_ARRAY(args, 2); + args[ARGNUM_0] = DWORD_TO_ARGHOLDER(exceptionCode); + args[ARGNUM_1] = PTR_TO_ARGHOLDER(&exInfo); + + //Ex.RhThrowHwEx(exceptionCode, &exInfo) + CALL_MANAGED_METHOD_NORET(args) + + GCPROTECT_END(); +} + void HandleManagedFault(EXCEPTION_RECORD* pExceptionRecord, CONTEXT* pContext) { WRAPPER_NO_CONTRACT; @@ -6822,6 +6874,12 @@ VEH_ACTION WINAPI CLRVectoredExceptionHandler(PEXCEPTION_POINTERS pExceptionInfo // // Not an Out-of-memory situation, so no need for a forbid fault region here // +#ifdef FEATURE_EH_FUNCLETS + if (g_isNewExceptionHandlingEnabled) + { + EEPolicy::HandleStackOverflow(); + } +#endif // FEATURE_EH_FUNCLETS return VEH_CONTINUE_SEARCH; } @@ -7517,7 +7575,14 @@ LONG WINAPI CLRVectoredExceptionHandlerShim(PEXCEPTION_POINTERS pExceptionInfo) // // HandleManagedFault may never return, so we cannot use a forbid fault region around it. // - HandleManagedFault(pExceptionInfo->ExceptionRecord, pExceptionInfo->ContextRecord); + if (g_isNewExceptionHandlingEnabled) + { + HandleManagedFaultNew(pExceptionInfo->ExceptionRecord, pExceptionInfo->ContextRecord); + } + else + { + HandleManagedFault(pExceptionInfo->ExceptionRecord, pExceptionInfo->ContextRecord); + } return EXCEPTION_CONTINUE_EXECUTION; } #endif // FEATURE_EH_FUNCLETS @@ -7707,7 +7772,7 @@ void UnwindAndContinueRethrowHelperInsideCatch(Frame* pEntryFrame, Exception* pE // This does the work of the Unwind and Continue Hanlder after the catch clause of that handler. The stack has been // unwound by the time this is called. Keep that in mind when deciding where to put new code :) // -VOID DECLSPEC_NORETURN UnwindAndContinueRethrowHelperAfterCatch(Frame* pEntryFrame, Exception* pException) +VOID DECLSPEC_NORETURN UnwindAndContinueRethrowHelperAfterCatch(Frame* pEntryFrame, Exception* pException, bool nativeRethrow) { STATIC_CONTRACT_THROWS; STATIC_CONTRACT_GC_TRIGGERS; @@ -7723,7 +7788,16 @@ VOID DECLSPEC_NORETURN UnwindAndContinueRethrowHelperAfterCatch(Frame* pEntryFra Exception::Delete(pException); - RaiseTheExceptionInternalOnly(orThrowable, FALSE); +#ifdef FEATURE_EH_FUNCLETS + if (g_isNewExceptionHandlingEnabled && !nativeRethrow) + { + DispatchManagedException(orThrowable); + } + else +#endif // FEATURE_EH_FUNCLETS + { + RaiseTheExceptionInternalOnly(orThrowable, FALSE); + } } thread_local DWORD t_dwCurrentExceptionCode; @@ -9294,8 +9368,17 @@ void SetupInitialThrowBucketDetails(UINT_PTR adjustedIp) // being thrown, then get them. ThreadExceptionState *pExState = pThread->GetExceptionState(); +#ifdef FEATURE_EH_FUNCLETS // Ensure that the exception tracker exists - _ASSERTE(pExState->GetCurrentExceptionTracker() != NULL); + if (g_isNewExceptionHandlingEnabled) + { + _ASSERTE(pExState->GetCurrentExInfo() != NULL); + } + else +#endif // FEATURE_EH_FUNCLETS + { + _ASSERTE(pExState->GetCurrentExceptionTracker() != NULL); + } // Switch to COOP mode GCX_COOP(); @@ -9319,7 +9402,18 @@ void SetupInitialThrowBucketDetails(UINT_PTR adjustedIp) BOOL fIsPreallocatedException = CLRException::IsPreallocatedExceptionObject(gc.oCurrentThrowable); // Get the WatsonBucketTracker for the current exception - PTR_EHWatsonBucketTracker pWatsonBucketTracker = pExState->GetCurrentExceptionTracker()->GetWatsonBucketTracker(); + PTR_EHWatsonBucketTracker pWatsonBucketTracker; +#ifdef FEATURE_EH_FUNCLETS + if (g_isNewExceptionHandlingEnabled) + { + pWatsonBucketTracker = pExState->GetCurrentExInfo()->GetWatsonBucketTracker(); + + } + else +#endif // FEATURE_EH_FUNCLETS + { + pWatsonBucketTracker = pExState->GetCurrentExceptionTracker()->GetWatsonBucketTracker(); + } // Get the innermost exception object (if any) gc.oInnerMostExceptionThrowable = ((EXCEPTIONREF)gc.oCurrentThrowable)->GetBaseException(); @@ -11027,7 +11121,7 @@ VOID ThrowBadFormatWorker(UINT resID, LPCWSTR imageName DEBUGARG(_In_z_ const ch { resStr.LoadResource(CCompRC::Error, BFA_BAD_IL); // "Bad IL format." } - msgStr += resStr; + msgStr.Append(resStr); if ((imageName != NULL) && (imageName[0] != 0)) { @@ -11035,19 +11129,19 @@ VOID ThrowBadFormatWorker(UINT resID, LPCWSTR imageName DEBUGARG(_In_z_ const ch if (suffixResStr.LoadResource(CCompRC::Optional, COR_E_BADIMAGEFORMAT)) // "The format of the file '%1' is invalid." { SString suffixMsgStr; - suffixMsgStr.FormatMessage(FORMAT_MESSAGE_FROM_STRING, (LPCWSTR)suffixResStr, 0, 0, imageName); - msgStr.AppendASCII(" "); - msgStr += suffixMsgStr; + suffixMsgStr.FormatMessage(FORMAT_MESSAGE_FROM_STRING, (LPCWSTR)suffixResStr, 0, 0, SString{ SString::Literal, imageName }); + msgStr.Append(W(" ")); + msgStr.Append(suffixMsgStr); } } #ifdef _DEBUG if (0 != strcmp(cond, "FALSE")) { - msgStr += W(" (Failed condition: "); // this is in DEBUG only - not going to localize it. + msgStr.Append(W(" (Failed condition: ")); // this is in DEBUG only - not going to localize it. SString condStr(SString::Ascii, cond); - msgStr += condStr; - msgStr += W(")"); + msgStr.Append(condStr); + msgStr.Append(W(")")); } #endif ThrowHR(COR_E_BADIMAGEFORMAT, msgStr); @@ -11616,7 +11710,8 @@ VOID GetAssemblyDetailInfo(SString &sType, SString sAlcName; pPEAssembly->GetAssemblyBinder()->GetNameForDiagnostics(sAlcName); - if (pPEAssembly->GetPath().IsEmpty()) + SString assemblyPath{ pPEAssembly->GetPath() }; + if (assemblyPath.IsEmpty()) { detailsUtf8.Printf("Type %s originates from '%s' in the context '%s' in a byte array", sType.GetUTF8(), @@ -11629,7 +11724,7 @@ VOID GetAssemblyDetailInfo(SString &sType, sType.GetUTF8(), sAssemblyDisplayName.GetUTF8(), sAlcName.GetUTF8(), - pPEAssembly->GetPath().GetUTF8()); + assemblyPath.GetUTF8()); } sAssemblyDetailInfo.Append(detailsUtf8.GetUnicode()); diff --git a/src/coreclr/vm/excep.h b/src/coreclr/vm/excep.h index 082ba7b91a4c9c..a1cc0556b0d2a3 100644 --- a/src/coreclr/vm/excep.h +++ b/src/coreclr/vm/excep.h @@ -46,6 +46,13 @@ enum LFH { #include "runtimeexceptionkind.h" +#ifndef TARGET_UNIX +// Windows uses 64kB as the null-reference area +#define NULL_AREA_SIZE (64 * 1024) +#else // !TARGET_UNIX +#define NULL_AREA_SIZE GetOsPageSize() +#endif // !TARGET_UNIX + class IJitManager; // @@ -249,6 +256,7 @@ VOID DECLSPEC_NORETURN RealCOMPlusThrowNonLocalized(RuntimeExceptionKind reKind, //========================================================================== VOID DECLSPEC_NORETURN RealCOMPlusThrow(OBJECTREF throwable); +VOID DECLSPEC_NORETURN RealCOMPlusThrow(Object *exceptionObj); //========================================================================== // Throw an undecorated runtime exception. @@ -747,6 +755,9 @@ LONG WatsonLastChance( bool DebugIsEECxxException(EXCEPTION_RECORD* pExceptionRecord); +#ifndef FEATURE_EH_FUNCLETS +#define g_isNewExceptionHandlingEnabled false +#endif inline void CopyOSContext(T_CONTEXT* pDest, T_CONTEXT* pSrc) { @@ -756,6 +767,12 @@ inline void CopyOSContext(T_CONTEXT* pDest, T_CONTEXT* pSrc) #endif // TARGET_AMD64 memcpyNoGCRefs(pDest, pSrc, sizeof(T_CONTEXT) - cbReadOnlyPost); +#ifdef TARGET_AMD64 + if (g_isNewExceptionHandlingEnabled) + { + pDest->ContextFlags = (pDest->ContextFlags & ~(CONTEXT_XSTATE | CONTEXT_FLOATING_POINT)) | CONTEXT_AMD64; + } +#endif // TARGET_AMD64 } void SaveCurrentExceptionInfo(PEXCEPTION_RECORD pRecord, PT_CONTEXT pContext); diff --git a/src/coreclr/vm/exceptionhandling.cpp b/src/coreclr/vm/exceptionhandling.cpp index 0621ae03efe4f4..82ba3b349b39a5 100644 --- a/src/coreclr/vm/exceptionhandling.cpp +++ b/src/coreclr/vm/exceptionhandling.cpp @@ -17,6 +17,8 @@ #include "utilcode.h" #include "interoplibinterface.h" #include "corinfo.h" +#include "exceptionhandlingqcalls.h" +#include "exinfo.h" #if defined(TARGET_X86) #define USE_CURRENT_CONTEXT_IN_FILTER @@ -234,6 +236,8 @@ void InitializeExceptionHandling() // Initialize the lock used for synchronizing access to the stacktrace in the exception object g_StackTraceArrayLock.Init(LOCK_TYPE_DEFAULT, TRUE); + g_isNewExceptionHandlingEnabled = CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_EnableNewExceptionHandling) != 0; + #ifdef TARGET_UNIX // Register handler of hardware exceptions like null reference in PAL PAL_SetHardwareExceptionHandler(HandleHardwareException, IsSafeToHandleHardwareException); @@ -804,7 +808,7 @@ UINT_PTR ExceptionTracker::FinishSecondPass( { CopyOSContext(pThread->m_OSContext, pContextRecord); SetIP(pThread->m_OSContext, (PCODE)uResumePC); -#if defined(TARGET_UNIX) && !(defined(TARGET_AMD64) || defined(TARGET_ARM64) || defined(TARGET_ARM)) +#if defined(TARGET_UNIX) && defined(TARGET_X86) uAbortAddr = NULL; #else uAbortAddr = (UINT_PTR)COMPlusCheckForAbort(uResumePC); @@ -862,6 +866,48 @@ UINT_PTR ExceptionTracker::FinishSecondPass( void CleanUpForSecondPass(Thread* pThread, bool fIsSO, LPVOID MemoryStackFpForFrameChain, LPVOID MemoryStackFp); +EXTERN_C EXCEPTION_DISPOSITION +ProcessCLRExceptionNew(IN PEXCEPTION_RECORD pExceptionRecord, + IN PVOID pEstablisherFrame, + IN OUT PCONTEXT pContextRecord, + IN OUT PDISPATCHER_CONTEXT pDispatcherContext + ) +{ + // + // This method doesn't always return, so it will leave its + // state on the thread if using dynamic contracts. + // + STATIC_CONTRACT_MODE_ANY; + STATIC_CONTRACT_GC_TRIGGERS; + STATIC_CONTRACT_THROWS; + +#ifndef HOST_UNIX + if (!(pExceptionRecord->ExceptionFlags & EXCEPTION_UNWINDING)) + { + Thread* pThread = GetThread(); + ClrUnwindEx(pExceptionRecord, + (UINT_PTR)pThread, + INVALID_RESUME_ADDRESS, + pDispatcherContext->EstablisherFrame); + } + else + { + GCX_COOP(); + FrameWithCookie frameWithCookie; + FaultingExceptionFrame *frame = &frameWithCookie; + #if defined(FEATURE_EH_FUNCLETS) + *frame->GetGSCookiePtr() = GetProcessGSCookie(); + #endif // FEATURE_EH_FUNCLETS + frame->InitAndLink(pContextRecord); + + OBJECTREF oref = ExceptionTracker::CreateThrowable(pExceptionRecord, FALSE); + DispatchManagedException(oref); + } +#endif // !HOST_UNIX + EEPOLICY_HANDLE_FATAL_ERROR_WITH_MESSAGE(COR_E_EXECUTIONENGINE, _T("SEH exception leaked into managed code")); + UNREACHABLE(); +} + EXTERN_C EXCEPTION_DISPOSITION ProcessCLRException(IN PEXCEPTION_RECORD pExceptionRecord, IN PVOID pEstablisherFrame, @@ -877,6 +923,12 @@ ProcessCLRException(IN PEXCEPTION_RECORD pExceptionRecord, STATIC_CONTRACT_GC_TRIGGERS; STATIC_CONTRACT_THROWS; + if (g_isNewExceptionHandlingEnabled) + { + ProcessCLRExceptionNew(pExceptionRecord, pEstablisherFrame, pContextRecord, pDispatcherContext); + UNREACHABLE(); + } + // We must preserve this so that GCStress=4 eh processing doesnt kill last error. DWORD dwLastError = GetLastError(); @@ -4363,14 +4415,16 @@ static void DoEHLog( // Function to update the current context for exception propagation. // // Arguments: -// exception - the PAL_SEHException representing the propagating exception. +// callback - the exception propagation callback +// callbackCtx - the exception propagation callback context // currentContext - the current context to update. // static VOID UpdateContextForPropagationCallback( - PAL_SEHException& ex, + Interop::ManagedToNativeExceptionCallback callback, + void *callbackCtx, CONTEXT* startContext) { - _ASSERTE(ex.ManagedToNativeExceptionCallback != NULL); + _ASSERTE(callback != NULL); #ifdef TARGET_AMD64 @@ -4380,7 +4434,7 @@ static VOID UpdateContextForPropagationCallback( startContext->Rsp -= sizeof(void*); // Pass the context for the callback as the first argument. - startContext->Rdi = (DWORD64)ex.ManagedToNativeExceptionCallbackContext; + startContext->Rdi = (DWORD64)callbackCtx; #elif defined(TARGET_ARM64) @@ -4389,7 +4443,7 @@ static VOID UpdateContextForPropagationCallback( startContext->Lr = GetIP(startContext); // Pass the context for the callback as the first argument. - startContext->X0 = (DWORD64)ex.ManagedToNativeExceptionCallbackContext; + startContext->X0 = (DWORD64)callbackCtx; #elif defined(TARGET_ARM) @@ -4398,7 +4452,7 @@ static VOID UpdateContextForPropagationCallback( startContext->Lr = GetIP(startContext); // Pass the context for the callback as the first argument. - startContext->R0 = (DWORD)ex.ManagedToNativeExceptionCallbackContext; + startContext->R0 = (DWORD)callbackCtx; #else @@ -4409,7 +4463,22 @@ static VOID UpdateContextForPropagationCallback( #endif // The last thing to do is set the supplied callback function. - SetIP(startContext, (PCODE)ex.ManagedToNativeExceptionCallback); + SetIP(startContext, (PCODE)callback); +} + +//--------------------------------------------------------------------------------------- +// +// Function to update the current context for exception propagation. +// +// Arguments: +// exception - the PAL_SEHException representing the propagating exception. +// currentContext - the current context to update. +// +static VOID UpdateContextForPropagationCallback( + PAL_SEHException& ex, + CONTEXT* startContext) +{ + UpdateContextForPropagationCallback(ex.ManagedToNativeExceptionCallback, ex.ManagedToNativeExceptionCallbackContext, startContext); } //--------------------------------------------------------------------------------------- @@ -4840,6 +4909,13 @@ VOID DECLSPEC_NORETURN UnwindManagedExceptionPass1(PAL_SEHException& ex, CONTEXT VOID DECLSPEC_NORETURN DispatchManagedException(PAL_SEHException& ex, bool isHardwareException) { + if (g_isNewExceptionHandlingEnabled) + { + GCX_COOP(); + OBJECTREF throwable = ExceptionTracker::CreateThrowable(ex.GetExceptionRecord(), FALSE); + DispatchManagedException(throwable); + } + do { try @@ -5362,7 +5438,39 @@ BOOL HandleHardwareException(PAL_SEHException* ex) fef.InitAndLink(ex->GetContextRecord()); } - DispatchManagedException(*ex, true /* isHardwareException */); + if (g_isNewExceptionHandlingEnabled) + { + REGDISPLAY rd; + Thread *pThread = GetThread(); + + CONTEXT ctx = {}; + ctx.ContextFlags = CONTEXT_CONTROL | CONTEXT_INTEGER; + ExInfo exInfo(pThread, &ctx /*ex->GetContextRecord()*/, &rd, ExKind::HardwareFault); + + DWORD exceptionCode = ex->GetExceptionRecord()->ExceptionCode; + if (exceptionCode == STATUS_ACCESS_VIOLATION) + { + if (ex->GetExceptionRecord()->ExceptionInformation[1] < NULL_AREA_SIZE) + { + exceptionCode = 0; //STATUS_REDHAWK_NULL_REFERENCE; + } + } + + GCPROTECT_BEGIN(exInfo.m_exception); + PREPARE_NONVIRTUAL_CALLSITE(METHOD__EH__RH_THROWHW_EX); + DECLARE_ARGHOLDER_ARRAY(args, 2); + args[ARGNUM_0] = DWORD_TO_ARGHOLDER(exceptionCode); + args[ARGNUM_1] = PTR_TO_ARGHOLDER(&exInfo); + + //Ex.RhThrowHwEx(exceptionCode, &exInfo) + CALL_MANAGED_METHOD_NORET(args) + + GCPROTECT_END(); + } + else + { + DispatchManagedException(*ex, true /* isHardwareException */); + } UNREACHABLE(); } else @@ -5411,6 +5519,64 @@ BOOL HandleHardwareException(PAL_SEHException* ex) #endif // TARGET_UNIX +VOID DECLSPEC_NORETURN DispatchManagedException(OBJECTREF throwable) +{ + STATIC_CONTRACT_THROWS; + STATIC_CONTRACT_GC_TRIGGERS; + STATIC_CONTRACT_MODE_COOPERATIVE; + + GCPROTECT_BEGIN(throwable); + + _ASSERTE(IsException(throwable->GetMethodTable())); + + ExceptionPreserveStackTrace(throwable); + + CONTEXT ctx = {}; + ctx.ContextFlags = CONTEXT_CONTROL | CONTEXT_INTEGER; + REGDISPLAY rd; + Thread *pThread = GetThread(); + ExInfo exInfo(pThread, &ctx, &rd, ExKind::Throw); + + if (pThread->IsAbortInitiated () && IsExceptionOfType(kThreadAbortException,&throwable)) + { + pThread->ResetPreparingAbort(); + + if (pThread->GetFrame() == FRAME_TOP) + { + // There is no more managed code on stack. + pThread->ResetAbort(); + } + } + + GCPROTECT_BEGIN(exInfo.m_exception); + + PREPARE_NONVIRTUAL_CALLSITE(METHOD__EH__RH_THROW_EX); + DECLARE_ARGHOLDER_ARRAY(args, 2); + args[ARGNUM_0] = OBJECTREF_TO_ARGHOLDER(throwable); + args[ARGNUM_1] = PTR_TO_ARGHOLDER(&exInfo); + + //Ex.RhThrowEx(throwable, &exInfo) + CRITICAL_CALLSITE; + CALL_MANAGED_METHOD_NORET(args) + + GCPROTECT_END(); + GCPROTECT_END(); + + UNREACHABLE(); +} + +VOID DECLSPEC_NORETURN DispatchManagedException(RuntimeExceptionKind reKind) +{ + STATIC_CONTRACT_THROWS; + STATIC_CONTRACT_GC_TRIGGERS; + STATIC_CONTRACT_MODE_COOPERATIVE; + + EEException ex(reKind); + OBJECTREF throwable = ex.CreateThrowable(); + + DispatchManagedException(throwable); +} + #ifndef TARGET_UNIX void ClrUnwindEx(EXCEPTION_RECORD* pExceptionRecord, UINT_PTR ReturnValue, UINT_PTR TargetIP, UINT_PTR TargetFrameSp) { @@ -6032,10 +6198,18 @@ CallDescrWorkerUnwindFrameChainHandler(IN PEXCEPTION_RECORD pExceptionReco return ExceptionContinueSearch; } - EXCEPTION_DISPOSITION retVal = ProcessCLRException(pExceptionRecord, - pEstablisherFrame, - pContextRecord, - pDispatcherContext); + EXCEPTION_DISPOSITION retVal; + if (!g_isNewExceptionHandlingEnabled) + { + retVal = ProcessCLRException(pExceptionRecord, + pEstablisherFrame, + pContextRecord, + pDispatcherContext); + } + else + { + retVal = ExceptionContinueSearch; + } if (retVal == ExceptionContinueSearch) { @@ -6258,6 +6432,49 @@ bool ExceptionTracker::StackRange::IsConsistent() } #endif // _DEBUG + +bool ExceptionTracker::IsInStackRegionUnwoundBySpecifiedException(CrawlFrame * pCF, PTR_ExInfo pExInfo) +{ + LIMITED_METHOD_CONTRACT; + + _ASSERTE(pCF != NULL); + + // The tracker must be in the second pass, and its stack range must not be empty. + if ( (pExInfo == NULL) || + (pExInfo->m_passNumber == 1) || + (pExInfo->m_sfLowBound.IsMaxVal() && + pExInfo->m_sfHighBound.IsNull())) + { + return false; + } + + CallerStackFrame csfToCheck; + if (pCF->IsFrameless()) + { + csfToCheck = CallerStackFrame::FromRegDisplay(pCF->GetRegisterSet()); + } + else + { + csfToCheck = CallerStackFrame((UINT_PTR)pCF->GetFrame()); + } + + StackFrame sfLowerBound = pExInfo->m_sfLowBound; + StackFrame sfUpperBound = pExInfo->m_sfHighBound; + +#ifndef STACK_RANGE_BOUNDS_ARE_CALLER_SP + if ((sfLowerBound < csfToCheck) && (csfToCheck <= sfUpperBound)) +#else // !STACK_RANGE_BOUNDS_ARE_CALLER_SP + if ((sfLowerBound <= csfToCheck) && (csfToCheck < sfUpperBound)) +#endif // STACK_RANGE_BOUNDS_ARE_CALLER_SP + { + return true; + } + else + { + return false; + } +} + // Determine if the given StackFrame is in the stack region unwound by the specified ExceptionTracker. // This is used by the stackwalker to skip funclets. Refer to the calls to this method in StackWalkFramesEx() // for more information. @@ -6371,8 +6588,17 @@ bool ExceptionTracker::IsInStackRegionUnwoundByCurrentException(CrawlFrame * pCF LIMITED_METHOD_CONTRACT; Thread * pThread = pCF->pThread; - PTR_ExceptionTracker pCurrentTracker = pThread->GetExceptionState()->GetCurrentExceptionTracker(); - return ExceptionTracker::IsInStackRegionUnwoundBySpecifiedException(pCF, pCurrentTracker); + + if (!g_isNewExceptionHandlingEnabled) + { + PTR_ExceptionTracker pCurrentTracker = pThread->GetExceptionState()->GetCurrentExceptionTracker(); + return ExceptionTracker::IsInStackRegionUnwoundBySpecifiedException(pCF, pCurrentTracker); + } + else + { + PTR_ExInfo pCurrentExInfo = pThread->GetExceptionState()->GetCurrentExInfo(); + return ExceptionTracker::IsInStackRegionUnwoundBySpecifiedException(pCF, pCurrentExInfo); + } } @@ -6399,11 +6625,44 @@ bool ExceptionTracker::HasFrameBeenUnwoundByAnyActiveException(CrawlFrame * pCF) // Enumerate all (nested) exception trackers and see if any of them has unwound the // specified CrawlFrame. Thread * pTargetThread = pCF->pThread; + bool fHasFrameBeenUnwound = false; + + if (g_isNewExceptionHandlingEnabled) + { + { + CallerStackFrame csfToCheck; + if (pCF->IsFrameless()) + { + csfToCheck = CallerStackFrame::FromRegDisplay(pCF->GetRegisterSet()); + } + else + { + csfToCheck = CallerStackFrame((UINT_PTR)pCF->GetFrame()); + } + STRESS_LOG4(LF_EH|LF_GCROOTS, LL_INFO100, "CrawlFrame (%p): Frameless: %s %s: %p\n", + pCF, pCF->IsFrameless() ? "Yes" : "No", pCF->IsFrameless() ? "CallerSP" : "Address", csfToCheck.SP); + } + + PTR_ExInfo pTopExInfo = pTargetThread->GetExceptionState()->GetCurrentExInfo(); + for (PTR_ExInfo pCurrentExInfo = pTopExInfo; pCurrentExInfo != NULL; pCurrentExInfo = dac_cast(pCurrentExInfo->m_pPrevExInfo)) + { + STRESS_LOG2(LF_EH|LF_GCROOTS, LL_INFO100, "Checking lower bound %p, upper bound %p\n", (void*)pCurrentExInfo->m_sfLowBound.SP, (void*)pCurrentExInfo->m_sfHighBound.SP); + if (ExceptionTracker::IsInStackRegionUnwoundBySpecifiedException(pCF, pCurrentExInfo)) + { + fHasFrameBeenUnwound = true; + break; + } + } + + if (fHasFrameBeenUnwound) + STRESS_LOG0(LF_EH|LF_GCROOTS, LL_INFO100, "Has already been unwound\n"); + + return fHasFrameBeenUnwound; + } + PTR_ExceptionTracker pTopTracker = pTargetThread->GetExceptionState()->GetCurrentExceptionTracker(); PTR_ExceptionTracker pCurrentTracker = pTopTracker; - bool fHasFrameBeenUnwound = false; - while (pCurrentTracker != NULL) { bool fSkipCurrentTracker = false; @@ -6867,6 +7126,29 @@ StackFrame ExceptionTracker::FindParentStackFrameHelper(CrawlFrame* pCF, } } + if (g_isNewExceptionHandlingEnabled) + { + for (PTR_ExInfo pCurrentExInfo = pThread->GetExceptionState()->GetCurrentExInfo(); + pCurrentExInfo != NULL; + pCurrentExInfo = pCurrentExInfo->m_pPrevExInfo) + { + // Check if the ExInfo has just been created. + if (pCurrentExInfo->m_sfLowBound.IsMaxVal() && pCurrentExInfo->m_sfHighBound.IsNull()) + { + continue; + } + + CallerStackFrame csfFunclet = pCurrentExInfo->m_csfEHClause; + if (csfCurrent == csfFunclet) + { + sfResult = (StackFrame)pCurrentExInfo->m_csfEnclosingClause; + break; + } + } + + goto lExit; + } + for (pCurrentTracker = pThread->GetExceptionState()->m_pCurrentTracker; pCurrentTracker != NULL; pCurrentTracker = pCurrentTracker->m_pPrevNestedInfo) @@ -7199,5 +7481,759 @@ void ExceptionTracker::ResetThreadAbortStatus(PTR_Thread pThread, CrawlFrame *pC } #endif //!DACCESS_COMPILE -#endif // FEATURE_EH_FUNCLETS +#ifndef DACCESS_COMPILE +// Mark the pinvoke frame as invoking CallCatchFunclet (and similar) for collided unwind detection +void MarkInlinedCallFrameAsFuncletCall(Frame* pFrame) +{ + _ASSERTE(pFrame->GetVTablePtr() == InlinedCallFrame::GetMethodFrameVPtr()); + InlinedCallFrame* pInlinedCallFrame = (InlinedCallFrame*)pFrame; + pInlinedCallFrame->m_Datum = (PTR_NDirectMethodDesc)((TADDR)pInlinedCallFrame->m_Datum | (TADDR)InlinedCallFrameMarker::ExceptionHandlingHelper | (TADDR)InlinedCallFrameMarker::SecondPassFuncletCaller); +} + +// Mark the pinvoke frame as invoking any exception handling helper +void MarkInlinedCallFrameAsEHHelperCall(Frame* pFrame) +{ + _ASSERTE(pFrame->GetVTablePtr() == InlinedCallFrame::GetMethodFrameVPtr()); + InlinedCallFrame* pInlinedCallFrame = (InlinedCallFrame*)pFrame; + pInlinedCallFrame->m_Datum = (PTR_NDirectMethodDesc)((TADDR)pInlinedCallFrame->m_Datum | (TADDR)InlinedCallFrameMarker::ExceptionHandlingHelper); +} + +extern "C" void QCALLTYPE AppendExceptionStackFrame(QCall::ObjectHandleOnStack exceptionObj, SIZE_T ip, SIZE_T sp, int flags, ExInfo *pExInfo) +{ + QCALL_CONTRACT; + + BEGIN_QCALL; + GCX_COOP(); + + Thread* pThread = GET_THREAD(); + Frame* pFrame = pThread->GetFrame(); + MarkInlinedCallFrameAsFuncletCall(pFrame); + + bool canAllocateMemory = !(exceptionObj.Get() == CLRException::GetPreallocatedOutOfMemoryException()) && + !(exceptionObj.Get() == CLRException::GetPreallocatedStackOverflowException()); + + MethodDesc *pMD = pExInfo->m_frameIter.m_crawl.GetFunction(); +#if _DEBUG + EECodeInfo codeInfo(ip); + _ASSERTE(codeInfo.IsValid()); + _ASSERTE(pMD == codeInfo.GetMethodDesc()); +#endif // _DEBUG + + pExInfo->m_stackTraceInfo.AppendElement(canAllocateMemory, ip, sp, pMD, &pExInfo->m_frameIter.m_crawl); + pExInfo->m_stackTraceInfo.SaveStackTrace(canAllocateMemory, pExInfo->m_hThrowable, /*bReplaceStack*/FALSE, /*bSkipLastElement*/FALSE); + + END_QCALL; +} + +UINT_PTR GetEstablisherFrame(REGDISPLAY* pvRegDisplay, ExInfo* exInfo) +{ +#ifdef HOST_AMD64 + _ASSERTE(exInfo->m_frameIter.m_crawl.GetRegisterSet() == pvRegDisplay); + if (exInfo->m_frameIter.m_crawl.GetCodeInfo()->HasFrameRegister()) + { + ULONG frameOffset = exInfo->m_frameIter.m_crawl.GetCodeInfo()->GetFrameOffsetFromUnwindInfo(); + return pvRegDisplay->pCurrentContext->Rbp - 16 * frameOffset; + } + else + { + return pvRegDisplay->SP; + } +#elif defined(HOST_ARM64) + return pvRegDisplay->SP; +#elif defined(HOST_ARM) + return pvRegDisplay->SP; +#elif defined(HOST_X86) + return pvRegDisplay->SP; +#elif defined(HOST_RISCV64) + return pvRegDisplay->SP; +#elif defined(HOST_LOONGARCH64) + return pvRegDisplay->SP; +#endif +} + +extern "C" void * QCALLTYPE CallCatchFunclet(QCall::ObjectHandleOnStack exceptionObj, BYTE* pHandlerIP, REGDISPLAY* pvRegDisplay, ExInfo* exInfo) +{ + QCALL_CONTRACT; + + BEGIN_QCALL; + GCX_COOP_NO_DTOR(); + + Thread* pThread = GET_THREAD(); + Frame* pFrame = pThread->GetFrame(); + MarkInlinedCallFrameAsFuncletCall(pFrame); + HandlerFn* pfnHandler = (HandlerFn*)pHandlerIP; + exInfo->m_sfHighBound = exInfo->m_frameIter.m_crawl.GetRegisterSet()->SP; + DWORD_PTR dwResumePC; + + if (pHandlerIP != NULL) + { + _ASSERTE(exInfo->m_sfCallerOfActualHandlerFrame == EECodeManager::GetCallerSp(pvRegDisplay)); + OBJECTREF throwable = exceptionObj.Get(); + throwable = PossiblyUnwrapThrowable(throwable, exInfo->m_frameIter.m_crawl.GetAssembly()); + + UINT_PTR establisherFrame = GetEstablisherFrame(pvRegDisplay, exInfo); + + exInfo->m_csfEHClause = CallerStackFrame((UINT_PTR)GetCurrentSP()); + exInfo->m_csfEnclosingClause = CallerStackFrame::FromRegDisplay(exInfo->m_frameIter.m_crawl.GetRegisterSet()); + + MethodDesc *pMD = exInfo->m_frameIter.m_crawl.GetFunction(); + // Profiler, debugger and ETW events + exInfo->MakeCallbacksRelatedToHandler(true, pThread, pMD, &exInfo->m_ClauseForCatch, (DWORD_PTR)pHandlerIP, GetSP(pvRegDisplay->pCurrentContext)); + +#ifdef USE_FUNCLET_CALL_HELPER + // Invoke the catch funclet. + // Since the actual caller of the funclet is the assembly helper, pass the reference + // to the CallerStackFrame instance so that it can be updated. + CallerStackFrame* pCallerStackFrame = &exInfo->m_csfEHClause; + UINT_PTR *pFuncletCallerSP = &(pCallerStackFrame->SP); + dwResumePC = CallEHFunclet(OBJECTREFToObject(throwable), + CastHandlerFn(pfnHandler), + GetFirstNonVolatileRegisterAddress(pvRegDisplay->pCurrentContext), + pFuncletCallerSP); +#else + dwResumePC = pfnHandler(establisherFrame, OBJECTREFToObject(throwable)); +#endif + // Profiler, debugger and ETW events + exInfo->MakeCallbacksRelatedToHandler(false, pThread, pMD, &exInfo->m_ClauseForCatch, (DWORD_PTR)pHandlerIP, GetSP(pvRegDisplay->pCurrentContext)); + SetIP(pvRegDisplay->pCurrentContext, dwResumePC); + } + + UINT_PTR targetSp = GetSP(pvRegDisplay->pCurrentContext); + + while (pFrame < (void*)targetSp) + { + pFrame->ExceptionUnwind(); + pFrame->Pop(pThread); + pFrame = pThread->GetFrame(); + } + + GCFrame* pGCFrame = pThread->GetGCFrame(); + while (pGCFrame && pGCFrame < (void*)targetSp) + { + pGCFrame->Pop(); + pGCFrame = pThread->GetGCFrame(); + } + + ExInfo* pExInfo = pThread->GetExceptionState()->GetCurrentExInfo(); + +#ifdef HOST_UNIX + Interop::ManagedToNativeExceptionCallback propagateExceptionCallback = pExInfo->m_propagateExceptionCallback; + void* propagateExceptionContext = pExInfo->m_propagateExceptionContext; +#endif // HOST_UNIX + + // Pop ExInfos + while (pExInfo && pExInfo < (void*)targetSp) + { + if (pExInfo->m_hThrowable) + { + if (!CLRException::IsPreallocatedExceptionHandle(pExInfo->m_hThrowable)) + { + DestroyHandle(pExInfo->m_hThrowable); + } + pExInfo->m_hThrowable = NULL; + } + pExInfo->m_stackTraceInfo.FreeStackTrace(); + pExInfo = pExInfo->m_pPrevExInfo; + } + + pThread->GetExceptionState()->SetCurrentExInfo(pExInfo); + + pThread->SafeSetLastThrownObject(NULL); + + ExceptionTracker::UpdateNonvolatileRegisters(pvRegDisplay->pCurrentContext, pvRegDisplay, FALSE); + if (pHandlerIP != NULL) + { + ClrRestoreNonvolatileContext(pvRegDisplay->pCurrentContext); + } + else + { +#ifdef HOST_UNIX + if (propagateExceptionCallback) + { + // A propagation callback was supplied. + STRESS_LOG3(LF_EH, LL_INFO100, "Deferring exception propagation to Callback = %p, IP = %p, SP = %p \n", propagateExceptionCallback, GetIP(pvRegDisplay->pCurrentContext), GetSP(pvRegDisplay->pCurrentContext)); + + UpdateContextForPropagationCallback(propagateExceptionCallback, propagateExceptionContext, pvRegDisplay->pCurrentContext); + GCX_PREEMP_NO_DTOR(); + ClrRestoreNonvolatileContext(pvRegDisplay->pCurrentContext); + } +#endif // HOST_UNIX + // Throw exception from the caller context +#if defined(HOST_AMD64) + ULONG64* returnAddress = (ULONG64*)targetSp; + *returnAddress = pvRegDisplay->pCurrentContext->Rip; +#elif defined(HOST_X86) + ULONG32* returnAddress = (ULONG32*)targetSp; + *returnAddress = pvRegDisplay->pCurrentContext->Eip; +#elif defined(HOST_ARM64) + pvRegDisplay->pCurrentContext->Lr = GetIP(pvRegDisplay->pCurrentContext); +#elif defined(HOST_ARM) + pvRegDisplay->pCurrentContext->Lr = GetIP(pvRegDisplay->pCurrentContext); +#elif defined(HOST_RISCV) || defined(HOST_LOONGARCH64) + pvRegDisplay->pCurrentContext->Ra = GetIP(pvRegDisplay->pCurrentContext); +#endif + SetIP(pvRegDisplay->pCurrentContext, (PCODE)(void (*)(Object*))RealCOMPlusThrow); +#if defined(HOST_AMD64) + SetSP(pvRegDisplay->pCurrentContext, targetSp - 8); +#elif defined(HOST_X86) + SetSP(pvRegDisplay->pCurrentContext, targetSp - 4); +#endif +#ifdef HOST_AMD64 +#ifdef UNIX_AMD64_ABI +#define FIRST_ARG_REG Rdi +#else +#define FIRST_ARG_REG Rcx +#endif +#elif defined(HOST_X86) +#define FIRST_ARG_REG Ecx +#elif defined(HOST_ARM64) +#define FIRST_ARG_REG X0 +#elif defined(HOST_ARM) +#define FIRST_ARG_REG R0 +#elif defined(HOST_RISCV64) || defined(HOST_LOONGARCH64) +#define FIRST_ARG_REG A0 +#endif + + pvRegDisplay->pCurrentContext->FIRST_ARG_REG = (size_t)OBJECTREFToObject(exceptionObj.Get()); +#undef FIRST_ARG_REG + ClrRestoreNonvolatileContext(pvRegDisplay->pCurrentContext); + } + END_QCALL; + return NULL; +} + +extern "C" void QCALLTYPE CallFinallyFunclet(BYTE* pHandlerIP, REGDISPLAY* pvRegDisplay, ExInfo* exInfo) +{ + QCALL_CONTRACT; + + BEGIN_QCALL; + GCX_COOP(); + Thread* pThread = GET_THREAD(); + Frame* pFrame = pThread->GetFrame(); + MarkInlinedCallFrameAsFuncletCall(pFrame); + HandlerFn* pfnHandler = (HandlerFn*)pHandlerIP; + UINT_PTR establisherFrame = GetEstablisherFrame(pvRegDisplay, exInfo); + exInfo->m_csfEHClause = CallerStackFrame((UINT_PTR)GetCurrentSP()); + exInfo->m_csfEnclosingClause = CallerStackFrame::FromRegDisplay(exInfo->m_frameIter.m_crawl.GetRegisterSet()); + exInfo->m_sfHighBound = exInfo->m_frameIter.m_crawl.GetRegisterSet()->SP; + + MethodDesc *pMD = exInfo->m_frameIter.m_crawl.GetFunction(); + // Profiler, debugger and ETW events + exInfo->MakeCallbacksRelatedToHandler(true, pThread, pMD, &exInfo->m_CurrentClause, (DWORD_PTR)pHandlerIP, GetSP(pvRegDisplay->pCurrentContext)); +#ifdef USE_FUNCLET_CALL_HELPER + // Invoke the finally funclet. + // Since the actual caller of the funclet is the assembly helper, pass the reference + // to the CallerStackFrame instance so that it can be updated. + CallerStackFrame* pCallerStackFrame = &exInfo->m_csfEHClause; + UINT_PTR *pFuncletCallerSP = &(pCallerStackFrame->SP); + DWORD_PTR dwResumePC = CallEHFunclet(NULL, + CastHandlerFn(pfnHandler), + GetFirstNonVolatileRegisterAddress(pvRegDisplay->pCurrentContext), + pFuncletCallerSP); +#else + DWORD_PTR dwResumePC = pfnHandler(establisherFrame, NULL); +#endif + // Profiler, debugger and ETW events + exInfo->MakeCallbacksRelatedToHandler(false, pThread, pMD, &exInfo->m_CurrentClause, (DWORD_PTR)pHandlerIP, GetSP(pvRegDisplay->pCurrentContext) ); + END_QCALL; +} + +extern "C" BOOL QCALLTYPE CallFilterFunclet(QCall::ObjectHandleOnStack exceptionObj, BYTE* pFilterIP, REGDISPLAY* pvRegDisplay) +{ + QCALL_CONTRACT; + + DWORD_PTR dwResult = 0; + + BEGIN_QCALL; + GCX_COOP(); + + Thread* pThread = GET_THREAD(); + Frame* pFrame = pThread->GetFrame(); + MarkInlinedCallFrameAsEHHelperCall(pFrame); + + ExInfo* pExInfo = pThread->GetExceptionState()->GetCurrentExInfo(); + OBJECTREF throwable = exceptionObj.Get(); + throwable = PossiblyUnwrapThrowable(throwable, pExInfo->m_frameIter.m_crawl.GetAssembly()); + + HandlerFn* pfnHandler = (HandlerFn*)pFilterIP; + UINT_PTR establisherFrame = GetEstablisherFrame(pvRegDisplay, pExInfo); + pExInfo->m_csfEHClause = CallerStackFrame((UINT_PTR)GetCurrentSP()); + pExInfo->m_csfEnclosingClause = CallerStackFrame::FromRegDisplay(pExInfo->m_frameIter.m_crawl.GetRegisterSet()); + MethodDesc *pMD = pExInfo->m_frameIter.m_crawl.GetFunction(); + // Profiler, debugger and ETW events + pExInfo->MakeCallbacksRelatedToHandler(true, pThread, pMD, &pExInfo->m_CurrentClause, (DWORD_PTR)pFilterIP, GetSP(pvRegDisplay->pCurrentContext)); +#ifdef USE_FUNCLET_CALL_HELPER + // Invoke the filter funclet. + // Since the actual caller of the funclet is the assembly helper, pass the reference + // to the CallerStackFrame instance so that it can be updated. + CallerStackFrame* pCallerStackFrame = &pExInfo->m_csfEHClause; + UINT_PTR *pFuncletCallerSP = &(pCallerStackFrame->SP); + // For invoking IL filter funclet, we pass the CallerSP to the funclet using which + // it will retrieve the framepointer for accessing the locals in the parent + // method. + dwResult = CallEHFilterFunclet(OBJECTREFToObject(throwable), + GetFrameRestoreBase(pvRegDisplay->pCallerContext), + CastHandlerFn(pfnHandler), + pFuncletCallerSP); +#else + dwResult = pfnHandler(establisherFrame, OBJECTREFToObject(throwable)); +#endif + + // Profiler, debugger and ETW events + pExInfo->MakeCallbacksRelatedToHandler(false, pThread, pMD, &pExInfo->m_CurrentClause, (DWORD_PTR)pFilterIP, GetSP(pvRegDisplay->pCurrentContext)); + END_QCALL; + + return dwResult == EXCEPTION_EXECUTE_HANDLER; +} + + +struct ExtendedEHClauseEnumerator : EH_CLAUSE_ENUMERATOR +{ + StackFrameIterator *pFrameIter; + unsigned EHCount; +}; + +extern "C" BOOL QCALLTYPE EHEnumInitFromStackFrameIterator(StackFrameIterator *pFrameIter, BYTE** pMethodStartAddress, EH_CLAUSE_ENUMERATOR * pEHEnum) +{ + QCALL_CONTRACT; + + ExtendedEHClauseEnumerator *pExtendedEHEnum = (ExtendedEHClauseEnumerator*)pEHEnum; + pExtendedEHEnum->pFrameIter = pFrameIter; + + BEGIN_QCALL; + Thread* pThread = GET_THREAD(); + Frame* pFrame = pThread->GetFrame(); + MarkInlinedCallFrameAsEHHelperCall(pFrame); + + IJitManager* pJitMan = pFrameIter->m_crawl.GetJitManager(); + const METHODTOKEN& MethToken = pFrameIter->m_crawl.GetMethodToken(); + *pMethodStartAddress = (BYTE*)pJitMan->JitTokenToStartAddress(MethToken); + pExtendedEHEnum->EHCount = pJitMan->InitializeEHEnumeration(MethToken, pEHEnum); + + END_QCALL; + + return pExtendedEHEnum->EHCount != 0; +} + +extern "C" BOOL QCALLTYPE EHEnumNext(EH_CLAUSE_ENUMERATOR* pEHEnum, RhEHClause* pEHClause) +{ + QCALL_CONTRACT; + BOOL result = FALSE; + + BEGIN_QCALL; + Thread* pThread = GET_THREAD(); + Frame* pFrame = pThread->GetFrame(); + MarkInlinedCallFrameAsEHHelperCall(pFrame); + + ExtendedEHClauseEnumerator *pExtendedEHEnum = (ExtendedEHClauseEnumerator*)pEHEnum; + StackFrameIterator *pFrameIter = pExtendedEHEnum->pFrameIter; + + if (pEHEnum->iCurrentPos < pExtendedEHEnum->EHCount) + { + IJitManager* pJitMan = pFrameIter->m_crawl.GetJitManager(); + const METHODTOKEN& MethToken = pFrameIter->m_crawl.GetMethodToken(); + + EE_ILEXCEPTION_CLAUSE EHClause; + memset(&EHClause, 0, sizeof(EE_ILEXCEPTION_CLAUSE)); + PTR_EXCEPTION_CLAUSE_TOKEN pEHClauseToken = pJitMan->GetNextEHClause(pEHEnum, &EHClause); + Thread* pThread = GET_THREAD(); + ExInfo* pExInfo = pThread->GetExceptionState()->GetCurrentExInfo(); + pExInfo->m_CurrentClause = EHClause; + + pEHClause->_tryStartOffset = EHClause.TryStartPC; + pEHClause->_tryEndOffset = EHClause.TryEndPC; + // TODO-NewEH: The GetCodeAddressForRelOffset is expensive when the code is hot/cold split. Postpone this to + // later when we really need the address. + if (IsFilterHandler(&EHClause)) + { + pEHClause->_filterAddress = (BYTE*)pJitMan->GetCodeAddressForRelOffset(MethToken, EHClause.FilterOffset); + } + pEHClause->_handlerAddress = (BYTE*)pJitMan->GetCodeAddressForRelOffset(MethToken, EHClause.HandlerStartPC); + + result = TRUE; + pEHClause->_isSameTry = (EHClause.Flags & 0x10) != 0; // CORINFO_EH_CLAUSE_SAMETRY + + // Clear special flags - like COR_ILEXCEPTION_CLAUSE_CACHED_CLASS + ULONG flags = (CorExceptionFlag)(EHClause.Flags & 0x0f); + + if (flags & COR_ILEXCEPTION_CLAUSE_DUPLICATED) + { + result = FALSE; + } + else if (flags == COR_ILEXCEPTION_CLAUSE_NONE) + { + pEHClause->_clauseKind = RH_EH_CLAUSE_TYPED; + pEHClause->_pTargetType = pJitMan->ResolveEHClause(&EHClause, &pFrameIter->m_crawl).AsMethodTable(); + } + else if (flags & COR_ILEXCEPTION_CLAUSE_FILTER) + { + pEHClause->_clauseKind = RH_EH_CLAUSE_FILTER; + } + else if (flags & COR_ILEXCEPTION_CLAUSE_FINALLY) + { + pEHClause->_clauseKind = RH_EH_CLAUSE_FAULT; + } + else if (flags & COR_ILEXCEPTION_CLAUSE_FAULT) + { + pEHClause->_clauseKind = RH_EH_CLAUSE_FAULT; + } + else + { + result = FALSE; + } + } + END_QCALL; + + return result; +} + +extern uint32_t g_exceptionCount; + +MethodDesc * GetUserMethodForILStub(Thread * pThread, UINT_PTR uStubSP, MethodDesc * pILStubMD, Frame ** ppFrameOut); + +extern "C" bool QCALLTYPE SfiInit(StackFrameIterator* pThis, CONTEXT* pStackwalkCtx, bool instructionFault) +{ + QCALL_CONTRACT; + + bool result = false; + BEGIN_QCALL; + + Thread* pThread = GET_THREAD(); + Frame* pFrame = pThread->GetFrame(); + MarkInlinedCallFrameAsEHHelperCall(pFrame); + + // we already fixed the context in HijackHandler, so let's + // just clear the thread state. + pThread->ResetThrowControlForThread(); + + // Skip the SfiInit pinvoke frame + pFrame = pThread->GetFrame()->PtrNextFrame(); + + ExInfo* pExInfo = pThread->GetExceptionState()->GetCurrentExInfo(); + REGDISPLAY* pRD = pExInfo->m_pRD; + + if (pExInfo->m_passNumber == 1) + { + GCX_COOP(); + pThread->SafeSetThrowables(pExInfo->m_exception); + EEToProfilerExceptionInterfaceWrapper::ExceptionThrown(pThread); + UpdatePerformanceMetrics(&pThis->m_crawl, false, ((uint8_t)pExInfo->m_kind & (uint8_t)ExKind::RethrowFlag) == 0); + } + else // pExInfo->m_passNumber == 2 + { + // Clear the enclosing clause to indicate we have not processed any 2nd pass funclet yet. + pExInfo->m_csfEnclosingClause.Clear(); + if (pExInfo->m_idxCurClause != 0xffffffff) // the reverse pinvoke case doesn't have the m_idxCurClause set + { + EECodeManager::EnsureCallerContextIsValid(pRD, NULL); + pExInfo->m_sfCallerOfActualHandlerFrame = CallerStackFrame::FromRegDisplay(pRD); + + // the 1st pass has just ended, so the m_CurrentClause is the catch clause + pExInfo->m_ClauseForCatch = pExInfo->m_CurrentClause; + + MethodDesc *pMD = pExInfo->m_frameIter.m_crawl.GetFunction(); + TADDR sp = GetRegdisplaySP(pRD); + if (pMD->IsILStub()) + { + MethodDesc * pUserMDForILStub = NULL; + Frame * pILStubFrame = NULL; + if (!pExInfo->m_frameIter.m_crawl.IsFunclet()) // only make this callback on the main method body of IL stubs + { + pUserMDForILStub = GetUserMethodForILStub(pThread, sp, pMD, &pILStubFrame); + } + // + // NotifyOfCHFFilter has two behaviors + // * Notifify debugger, get interception info and unwind (function will not return) + // In this case, m_sfResumeStackFrame is expected to be NULL or the frame of interception. + // We NULL it out because we get the interception event after this point. + // * Notifify debugger and return. + // In this case the normal EH proceeds and we need to reset m_sfResumeStackFrame to the sf catch handler. + + // TODO-NewEH: New exception handling debugger events completion + /* + EXCEPTION_POINTERS ptrs; + EEToDebuggerExceptionInterfaceWrapper::NotifyOfCHFFilter(&ptrs, pILStubFrame); + */ + } + else + { + // We don't need to do anything special for continuable exceptions after calling + // this callback. We are going to start unwinding anyway. + PCODE uMethodStartPC = pExInfo->m_frameIter.m_crawl.GetCodeInfo()->GetStartAddress(); + EEToDebuggerExceptionInterfaceWrapper::FirstChanceManagedExceptionCatcherFound(pThread, pMD, (TADDR) uMethodStartPC, sp, + &pExInfo->m_ClauseForCatch); + EEToProfilerExceptionInterfaceWrapper::ExceptionSearchCatcherFound(pMD); + } + } + pExInfo->m_ExceptionFlags.SetUnwindHasStarted(); + EEToDebuggerExceptionInterfaceWrapper::ManagedExceptionUnwindBegin(pThread); + } + + pThread->FillRegDisplay(pRD, pStackwalkCtx); + + new (pThis) StackFrameIterator(); + result = pThis->Init(pThread, pFrame, pRD, THREAD_EXECUTING_MANAGED_CODE | HANDLESKIPPEDFRAMES/* | FUNCTIONSONLY*/) != FALSE; + + while (result && pThis->GetFrameState() != StackFrameIterator::SFITER_FRAMELESS_METHOD) + { + if (pExInfo->m_passNumber == 1) + { + Frame *pFrame = pThis->m_crawl.GetFrame(); + if (pFrame != FRAME_TOP) + { + MethodDesc *pMD = pFrame->GetFunction(); + if (pMD != NULL) + { + GCX_COOP(); + bool canAllocateMemory = !(pExInfo->m_exception == CLRException::GetPreallocatedOutOfMemoryException()) && + !(pExInfo->m_exception == CLRException::GetPreallocatedStackOverflowException()); + + pExInfo->m_stackTraceInfo.AppendElement(canAllocateMemory, NULL, GetRegdisplaySP(pExInfo->m_frameIter.m_crawl.GetRegisterSet()), pMD, &pExInfo->m_frameIter.m_crawl); + } + } + } + StackWalkAction retVal = pThis->Next(); + result = (retVal != SWA_FAILED); + } + + if (pExInfo->m_passNumber == 1) + { + MethodDesc *pMD = pThis->m_crawl.GetFunction(); + EEToProfilerExceptionInterfaceWrapper::ExceptionSearchFunctionEnter(pMD); + + // Notify the debugger that we are on the first pass for a managed exception. + // Note that this callback is made for every managed frame. + EEToDebuggerExceptionInterfaceWrapper::FirstChanceManagedException(pThread, GetControlPC(pThis->m_crawl.GetRegisterSet()), GetRegdisplaySP(pThis->m_crawl.GetRegisterSet())); + } + pExInfo->m_sfLowBound = GetRegdisplaySP(pThis->m_crawl.GetRegisterSet()); + + pThis->ResetNextExInfoForSP(pThis->m_crawl.GetRegisterSet()->SP); + + _ASSERTE(!result || pThis->GetFrameState() == StackFrameIterator::SFITER_FRAMELESS_METHOD); + + END_QCALL; + + if (result) + { + TADDR controlPC = pThis->m_crawl.GetRegisterSet()->ControlPC; + if (!pThis->m_crawl.HasFaulted()) + { + controlPC -= STACKWALK_CONTROLPC_ADJUST_OFFSET; + } + pThis->SetAdjustedControlPC(controlPC); + pThis->UpdateIsRuntimeWrappedExceptions(); + } + + return result; +} + +extern "C" size_t CallDescrWorkerInternalReturnAddressOffset; + +extern "C" bool QCALLTYPE SfiNext(StackFrameIterator* pThis, uint* uExCollideClauseIdx, bool* fUnwoundReversePInvoke) +{ + QCALL_CONTRACT; + + StackWalkAction retVal = SWA_FAILED; + + BEGIN_QCALL; + + Thread* pThread = GET_THREAD(); + Frame* pFrame = pThread->GetFrame(); + MarkInlinedCallFrameAsEHHelperCall(pFrame); + + // we already fixed the context in HijackHandler, so let's + // just clear the thread state. + pThread->ResetThrowControlForThread(); + + ExInfo* pExInfo = pThis->GetNextExInfo(); + ExInfo* pTopExInfo = pThread->GetExceptionState()->GetCurrentExInfo(); + + // Check for reverse pinvoke (but eliminate the case when the caller is managed) or CallDescrWorkerInternal. + if (!ExecutionManager::IsManagedCode(GetIP(pThis->m_crawl.GetRegisterSet()->pCallerContext))) + { + bool invalidRevPInvoke; +#ifdef USE_GC_INFO_DECODER + GcInfoDecoder gcInfoDecoder(pThis->m_crawl.GetCodeInfo()->GetGCInfoToken(), DECODE_REVERSE_PINVOKE_VAR); + invalidRevPInvoke = gcInfoDecoder.GetReversePInvokeFrameStackSlot() != NO_REVERSE_PINVOKE_FRAME; +#else // USE_GC_INFO_DECODER + hdrInfo gcHdrInfo; + DecodeGCHdrInfo(pThis->m_crawl.GetCodeInfo()->GetGCInfoToken(), 0, &gcHdrInfo); + invalidRevPInvoke = gcHdrInfo.revPInvokeOffset != INVALID_REV_PINVOKE_OFFSET; +#endif // USE_GC_INFO_DECODER + + if (invalidRevPInvoke) + { +#ifdef HOST_UNIX + void* callbackCxt = NULL; + Interop::ManagedToNativeExceptionCallback callback = Interop::GetPropagatingExceptionCallback( + pThis->m_crawl.GetCodeInfo(), + pTopExInfo->m_hThrowable, + &callbackCxt); + + if (callback != NULL) + { + pTopExInfo->m_propagateExceptionCallback = callback; + pTopExInfo->m_propagateExceptionContext = callbackCxt; + } +#endif // HOST_UNIX + } + else + { + // TODO-NewEH: Currently there are two other cases of internal VM->managed transitions. The FastCallFinalize and COMToCLRDispatchHelperWithStack + // Either add handling those here as well or rewrite all these perf critical places in C#, so that CallDescrWorker is the only path that + // needs to be handled here. + size_t CallDescrWorkerInternalReturnAddress = (size_t)CallDescrWorkerInternal + CallDescrWorkerInternalReturnAddressOffset; + if (GetIP(pThis->m_crawl.GetRegisterSet()->pCallerContext) == CallDescrWorkerInternalReturnAddress) + { + invalidRevPInvoke = true; + } + } + + if (fUnwoundReversePInvoke) + { + *fUnwoundReversePInvoke = invalidRevPInvoke; + } + + if (invalidRevPInvoke) + { + // Unwind to the caller of the managed code + retVal = pThis->Next(); + _ASSERTE(retVal != SWA_FAILED); + goto Exit; + } + } + else + { + if (fUnwoundReversePInvoke) + { + *fUnwoundReversePInvoke = false; + } + } + + do + { + *uExCollideClauseIdx = 0xffffffff; + bool doingFuncletUnwind = pThis->m_crawl.IsFunclet(); + + retVal = pThis->Next(); + if (retVal == SWA_FAILED) + { + break; + } + + if (pThis->GetFrameState() == StackFrameIterator::SFITER_DONE) + { + retVal = SWA_FAILED; + break; + } + + if (!pThis->m_crawl.IsFrameless()) + { + // Detect collided unwind + pFrame = pThis->m_crawl.GetFrame(); + + if (InlinedCallFrame::FrameHasActiveCall(pFrame)) + { + InlinedCallFrame* pInlinedCallFrame = (InlinedCallFrame*)pFrame; + if (((TADDR)pInlinedCallFrame->m_Datum & 6) == 6) + { + // passing through CallCatchFunclet et al + if (doingFuncletUnwind) + { + // Unwind the CallCatchFunclet + retVal = pThis->Next(); + if (retVal == SWA_FAILED) + { + _ASSERTE_MSG(FALSE, "StackFrameIterator::Next failed"); + break; + } + + if ((pThis->GetNextExInfo()->m_passNumber == 1) || + (pThis->GetNextExInfo()->m_idxCurClause == 0xFFFFFFFF)) + { + _ASSERTE_MSG(FALSE, "did not expect to collide with a 1st-pass ExInfo during a EH stackwalk"); + EEPOLICY_HANDLE_FATAL_ERROR(COR_E_EXECUTIONENGINE); + } + else + { + *uExCollideClauseIdx = pExInfo->m_idxCurClause; + pExInfo->m_kind = (ExKind)((uint8_t)pExInfo->m_kind | (uint8_t)ExKind::SupersededFlag); + + // Unwind until we hit the frame of the prevExInfo + ExInfo* pPrevExInfo = pThis->GetNextExInfo(); + do + { + retVal = pThis->Next(); + } + while ((retVal == SWA_CONTINUE) && pThis->m_crawl.GetRegisterSet()->SP != pPrevExInfo->m_pRD->SP); + _ASSERTE(retVal != SWA_FAILED); + + pThis->ResetNextExInfoForSP(pThis->m_crawl.GetRegisterSet()->SP); + } + } + } + } + else if (pTopExInfo->m_passNumber == 1) + { + MethodDesc *pMD = pFrame->GetFunction(); + if (pMD != NULL) + { + GCX_COOP(); + bool canAllocateMemory = !(pTopExInfo->m_exception == CLRException::GetPreallocatedOutOfMemoryException()) && + !(pTopExInfo->m_exception == CLRException::GetPreallocatedStackOverflowException()); + + pTopExInfo->m_stackTraceInfo.AppendElement(canAllocateMemory, NULL, GetRegdisplaySP(pTopExInfo->m_frameIter.m_crawl.GetRegisterSet()), pMD, &pTopExInfo->m_frameIter.m_crawl); + } + } + } + } + while (retVal != SWA_FAILED && (pThis->GetFrameState() != StackFrameIterator::SFITER_FRAMELESS_METHOD)); + + _ASSERTE(retVal == SWA_FAILED || pThis->GetFrameState() == StackFrameIterator::SFITER_FRAMELESS_METHOD); + + if (pTopExInfo->m_passNumber == 1) + { + MethodDesc *pMD = pThis->m_crawl.GetFunction(); + EEToProfilerExceptionInterfaceWrapper::ExceptionSearchFunctionEnter(pMD); + + // Notify the debugger that we are on the first pass for a managed exception. + // Note that this callback is made for every managed frame. + EEToDebuggerExceptionInterfaceWrapper::FirstChanceManagedException(pThread, GetControlPC(pThis->m_crawl.GetRegisterSet()), GetRegdisplaySP(pThis->m_crawl.GetRegisterSet())); + } + +Exit:; + END_QCALL; + + if (retVal != SWA_FAILED) + { + TADDR controlPC = pThis->m_crawl.GetRegisterSet()->ControlPC; + if (!pThis->m_crawl.HasFaulted()) + { + controlPC -= STACKWALK_CONTROLPC_ADJUST_OFFSET; + } + pThis->SetAdjustedControlPC(controlPC); + pThis->UpdateIsRuntimeWrappedExceptions(); + + return true; + } + + return false; +} + +namespace AsmOffsetsAsserts +{ +// Verify that the offsets into CONTEXT, REGDISPLAY, ExInfo and StackFrameIterator that the new managed exception handling +// use match between the managed code and the native ones. +#define public +#define const static constexpr + + #include "../System.Private.CoreLib/src/System/Runtime/ExceptionServices/AsmOffsets.cs" + +#undef public +#undef const +}; + +#endif + +#endif // FEATURE_EH_FUNCLETS diff --git a/src/coreclr/vm/exceptionhandling.h b/src/coreclr/vm/exceptionhandling.h index d8eb19e6ef208a..3e196f63bd0904 100644 --- a/src/coreclr/vm/exceptionhandling.h +++ b/src/coreclr/vm/exceptionhandling.h @@ -22,6 +22,9 @@ ProcessCLRException(IN PEXCEPTION_RECORD pExceptionRecord, IN OUT PT_CONTEXT pContextRecord, IN OUT PT_DISPATCHER_CONTEXT pDispatcherContext); +VOID DECLSPEC_NORETURN DispatchManagedException(OBJECTREF throwable); +VOID DECLSPEC_NORETURN DispatchManagedException(RuntimeExceptionKind reKind); + enum CLRUnwindStatus { UnwindPending, FirstPassComplete, SecondPassComplete }; enum TrackerMemoryType @@ -39,6 +42,19 @@ enum EHFuncletType Catch = 0x0004, }; +struct ExInfo; +typedef DPTR(ExInfo) PTR_ExInfo; + +// These values are or-ed into the InlinedCallFrame::m_Datum field. +// The bit 0 is used for unrelated purposes (see comments on the +// InlinedCallFrame::m_Datum field for details). +enum class InlinedCallFrameMarker +{ + ExceptionHandlingHelper = 2, + SecondPassFuncletCaller = 4, + Mask = ExceptionHandlingHelper | SecondPassFuncletCaller +}; + typedef DPTR(class ExceptionTracker) PTR_ExceptionTracker; class ExceptionTracker { @@ -243,6 +259,7 @@ class ExceptionTracker static StackFrame GetStackFrameForParentCheck(CrawlFrame * pCF); static bool IsInStackRegionUnwoundBySpecifiedException(CrawlFrame * pCF, PTR_ExceptionTracker pExceptionTracker); + static bool IsInStackRegionUnwoundBySpecifiedException(CrawlFrame * pCF, PTR_ExInfo pExInfo); static bool IsInStackRegionUnwoundByCurrentException(CrawlFrame * pCF); static bool HasFrameBeenUnwoundByAnyActiveException(CrawlFrame * pCF); diff --git a/src/coreclr/vm/exceptionhandlingqcalls.h b/src/coreclr/vm/exceptionhandlingqcalls.h new file mode 100644 index 00000000000000..2a1d77ecb94d91 --- /dev/null +++ b/src/coreclr/vm/exceptionhandlingqcalls.h @@ -0,0 +1,27 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// + +#ifndef EXCEPTION_HANDLING_QCALLS_H +#define EXCEPTION_HANDLING_QCALLS_H + +#ifdef FEATURE_EH_FUNCLETS + +struct RhEHClause; +struct ExInfo; + +#ifndef DACCESS_COMPILE + +extern "C" void * QCALLTYPE CallCatchFunclet(QCall::ObjectHandleOnStack exceptionObj, BYTE* pHandlerIP, REGDISPLAY* pvRegDisplay, ExInfo* exInfo); +extern "C" void QCALLTYPE CallFinallyFunclet(BYTE* pHandlerIP, REGDISPLAY* pvRegDisplay, ExInfo* exInfo); +extern "C" BOOL QCALLTYPE CallFilterFunclet(QCall::ObjectHandleOnStack exceptionObj, BYTE* pFilterP, REGDISPLAY* pvRegDisplay); +extern "C" void QCALLTYPE AppendExceptionStackFrame(QCall::ObjectHandleOnStack exceptionObj, SIZE_T ip, SIZE_T sp, int flags, ExInfo *pExInfo); +extern "C" BOOL QCALLTYPE EHEnumInitFromStackFrameIterator(StackFrameIterator *pFrameIter, BYTE** pMethodStartAddress, EH_CLAUSE_ENUMERATOR * pEHEnum); +extern "C" BOOL QCALLTYPE EHEnumNext(EH_CLAUSE_ENUMERATOR* pEHEnum, RhEHClause* pEHClause); +extern "C" bool QCALLTYPE SfiInit(StackFrameIterator* pThis, CONTEXT* pStackwalkCtx, bool instructionFault); +extern "C" bool QCALLTYPE SfiNext(StackFrameIterator* pThis, unsigned int* uExCollideClauseIdx, bool* fUnwoundReversePInvoke); +#endif // DACCESS_COMPILE + +#endif // FEATURE_EH_FUNCLETS + +#endif // EXCEPTION_HANDLING_QCALLS_H \ No newline at end of file diff --git a/src/coreclr/vm/exceptmacros.h b/src/coreclr/vm/exceptmacros.h index 1627e3d3d65cc4..d19966c609d325 100644 --- a/src/coreclr/vm/exceptmacros.h +++ b/src/coreclr/vm/exceptmacros.h @@ -116,10 +116,16 @@ struct _EXCEPTION_REGISTRATION_RECORD; class Thread; class Frame; class Exception; +struct REGDISPLAY; + +#ifdef FEATURE_EH_FUNCLETS +struct ExInfo; +#endif VOID DECLSPEC_NORETURN RealCOMPlusThrowOM(); #include +#include //========================================================================== // Macros to allow catching exceptions from within the EE. These are lightweight @@ -261,12 +267,12 @@ VOID DECLSPEC_NORETURN RaiseTheExceptionInternalOnly(OBJECTREF throwable, BOOL r #define INSTALL_UNWIND_AND_CONTINUE_HANDLER #define UNINSTALL_UNWIND_AND_CONTINUE_HANDLER -#define INSTALL_UNWIND_AND_CONTINUE_HANDLER_NO_PROBE -#define UNINSTALL_UNWIND_AND_CONTINUE_HANDLER_NO_PROBE +#define INSTALL_UNWIND_AND_CONTINUE_HANDLER_EX +#define UNINSTALL_UNWIND_AND_CONTINUE_HANDLER_EX #else // DACCESS_COMPILE void UnwindAndContinueRethrowHelperInsideCatch(Frame* pEntryFrame, Exception* pException); -VOID DECLSPEC_NORETURN UnwindAndContinueRethrowHelperAfterCatch(Frame* pEntryFrame, Exception* pException); +VOID DECLSPEC_NORETURN UnwindAndContinueRethrowHelperAfterCatch(Frame* pEntryFrame, Exception* pException, bool nativeRethrow); #ifdef TARGET_UNIX VOID DECLSPEC_NORETURN DispatchManagedException(PAL_SEHException& ex, bool isHardwareException); @@ -310,12 +316,13 @@ VOID DECLSPEC_NORETURN DispatchManagedException(PAL_SEHException& ex, bool isHar #define INSTALL_MANAGED_EXCEPTION_DISPATCHER #define UNINSTALL_MANAGED_EXCEPTION_DISPATCHER + #define INSTALL_UNHANDLED_MANAGED_EXCEPTION_TRAP #define UNINSTALL_UNHANDLED_MANAGED_EXCEPTION_TRAP #endif // TARGET_UNIX -#define INSTALL_UNWIND_AND_CONTINUE_HANDLER_NO_PROBE \ +#define INSTALL_UNWIND_AND_CONTINUE_HANDLER_EX \ { \ MAKE_CURRENT_THREAD_AVAILABLE(); \ Exception* __pUnCException = NULL; \ @@ -327,7 +334,7 @@ VOID DECLSPEC_NORETURN DispatchManagedException(PAL_SEHException& ex, bool isHar DEBUG_ASSURE_NO_RETURN_BEGIN(IUACH) #define INSTALL_UNWIND_AND_CONTINUE_HANDLER \ - INSTALL_UNWIND_AND_CONTINUE_HANDLER_NO_PROBE \ + INSTALL_UNWIND_AND_CONTINUE_HANDLER_EX \ /* The purpose of the INSTALL_UNWIND_AND_CONTINUE_HANDLER is to translate an exception to a managed */ \ /* exception before it hits managed code. */ @@ -342,7 +349,7 @@ VOID DECLSPEC_NORETURN DispatchManagedException(PAL_SEHException& ex, bool isHar SCAN_EHMARKER_TRY(); \ DEBUG_ASSURE_NO_RETURN_BEGIN(IUACH); -#define UNINSTALL_UNWIND_AND_CONTINUE_HANDLER_NO_PROBE \ +#define UNINSTALL_UNWIND_AND_CONTINUE_HANDLER_EX(nativeRethrow) \ DEBUG_ASSURE_NO_RETURN_END(IUACH) \ SCAN_EHMARKER_END_TRY(); \ } \ @@ -359,12 +366,12 @@ VOID DECLSPEC_NORETURN DispatchManagedException(PAL_SEHException& ex, bool isHar if (__fExceptionCaught) \ { \ SCAN_EHMARKER_CATCH(); \ - UnwindAndContinueRethrowHelperAfterCatch(__pUnCEntryFrame, __pUnCException); \ + UnwindAndContinueRethrowHelperAfterCatch(__pUnCEntryFrame, __pUnCException, nativeRethrow); \ } \ } \ #define UNINSTALL_UNWIND_AND_CONTINUE_HANDLER \ - UNINSTALL_UNWIND_AND_CONTINUE_HANDLER_NO_PROBE; + UNINSTALL_UNWIND_AND_CONTINUE_HANDLER_EX(false); #endif // DACCESS_COMPILE diff --git a/src/coreclr/vm/exinfo.cpp b/src/coreclr/vm/exinfo.cpp index a4d6c8092f38ed..e98e547e5d26ac 100644 --- a/src/coreclr/vm/exinfo.cpp +++ b/src/coreclr/vm/exinfo.cpp @@ -8,6 +8,11 @@ #include "exinfo.h" #include "dbginterface.h" +#ifdef FEATURE_EH_FUNCLETS +#include "eetoprofinterfacewrapper.inl" +#include "eedbginterfaceimpl.inl" +#endif + #ifndef FEATURE_EH_FUNCLETS #ifndef DACCESS_COMPILE // @@ -300,4 +305,132 @@ void ExInfo::SetExceptionCode(const EXCEPTION_RECORD *pCER) DacError(E_UNEXPECTED); #endif // !DACCESS_COMPILE } +#else // !FEATURE_EH_FUNCLETS + +#ifndef DACCESS_COMPILE + +ExInfo::ExInfo(Thread *pThread, CONTEXT *pCtx, REGDISPLAY *pRD, ExKind exceptionKind) : + m_pExContext(pCtx), + m_exception((Object*)NULL), + m_kind(exceptionKind), + m_passNumber(1), + m_idxCurClause(0xffffffff), + m_notifyDebuggerSP(NULL), + m_pRD(pRD), + m_pFrame(pThread->GetFrame()), + m_ClauseForCatch({}), +#ifdef HOST_UNIX + m_propagateExceptionCallback(NULL), + m_propagateExceptionContext(NULL), +#endif // HOST_UNIX + m_hThrowable(NULL), + m_CurrentClause({}) +{ + m_pPrevExInfo = pThread->GetExceptionState()->GetCurrentExInfo(); + m_stackTraceInfo.Init(); + m_stackTraceInfo.AllocateStackTrace(); + m_sfLowBound.SetMaxVal(); + pThread->GetExceptionState()->SetCurrentExInfo(this); +} + +#endif // DACCESS_COMPILE + +bool IsFilterStartOffset(EE_ILEXCEPTION_CLAUSE* pEHClause, DWORD_PTR dwHandlerStartPC) +{ + EECodeInfo codeInfo((PCODE)dwHandlerStartPC); + _ASSERTE(codeInfo.IsValid()); + + return pEHClause->FilterOffset == codeInfo.GetRelOffset(); +} + +void ExInfo::MakeCallbacksRelatedToHandler( + bool fBeforeCallingHandler, + Thread* pThread, + MethodDesc* pMD, + EE_ILEXCEPTION_CLAUSE* pEHClause, + DWORD_PTR dwHandlerStartPC, + StackFrame sf + ) +{ + // Here we need to make an extra check for filter handlers because we could be calling the catch handler + // associated with a filter handler and yet the EH clause we have saved is for the filter handler. + BOOL fIsFilterHandler = IsFilterHandler(pEHClause) && IsFilterStartOffset(pEHClause, dwHandlerStartPC); + BOOL fIsFaultOrFinallyHandler = IsFaultOrFinally(pEHClause); + + if (fBeforeCallingHandler) + { + StackFrame sfToStore = sf; + if ((m_pPrevExInfo != NULL) && + (m_pPrevExInfo->m_csfEnclosingClause == m_csfEnclosingClause)) + { + // If this is a nested exception which has the same enclosing clause as the previous exception, + // we should just propagate the clause info from the previous exception. + sfToStore = m_pPrevExInfo->m_EHClauseInfo.GetStackFrameForEHClause(); + } + m_EHClauseInfo.SetInfo(COR_PRF_CLAUSE_NONE, (UINT_PTR)dwHandlerStartPC, sfToStore); + + if (pMD->IsILStub()) + { + return; + } + + if (fIsFilterHandler) + { + m_EHClauseInfo.SetEHClauseType(COR_PRF_CLAUSE_FILTER); + EEToDebuggerExceptionInterfaceWrapper::ExceptionFilter(pMD, (TADDR) dwHandlerStartPC, pEHClause->FilterOffset, (BYTE*)sf.SP); + + EEToProfilerExceptionInterfaceWrapper::ExceptionSearchFilterEnter(pMD); + ETW::ExceptionLog::ExceptionFilterBegin(pMD, (PVOID)dwHandlerStartPC); + } + else + { + EEToDebuggerExceptionInterfaceWrapper::ExceptionHandle(pMD, (TADDR) dwHandlerStartPC, pEHClause->HandlerStartPC, (BYTE*)sf.SP); + + if (fIsFaultOrFinallyHandler) + { + m_EHClauseInfo.SetEHClauseType(COR_PRF_CLAUSE_FINALLY); + EEToProfilerExceptionInterfaceWrapper::ExceptionUnwindFinallyEnter(pMD); + ETW::ExceptionLog::ExceptionFinallyBegin(pMD, (PVOID)dwHandlerStartPC); + } + else + { + m_EHClauseInfo.SetEHClauseType(COR_PRF_CLAUSE_CATCH); + EEToProfilerExceptionInterfaceWrapper::ExceptionCatcherEnter(pThread, pMD); + + DACNotify::DoExceptionCatcherEnterNotification(pMD, pEHClause->HandlerStartPC); + ETW::ExceptionLog::ExceptionCatchBegin(pMD, (PVOID)dwHandlerStartPC); + } + } + } + else + { + if (pMD->IsILStub()) + { + return; + } + + if (fIsFilterHandler) + { + ETW::ExceptionLog::ExceptionFilterEnd(); + EEToProfilerExceptionInterfaceWrapper::ExceptionSearchFilterLeave(); + } + else + { + if (fIsFaultOrFinallyHandler) + { + ETW::ExceptionLog::ExceptionFinallyEnd(); + EEToProfilerExceptionInterfaceWrapper::ExceptionUnwindFinallyLeave(); + } + else + { + ETW::ExceptionLog::ExceptionCatchEnd(); + ETW::ExceptionLog::ExceptionThrownEnd(); + EEToProfilerExceptionInterfaceWrapper::ExceptionCatcherLeave(); + } + } + + m_EHClauseInfo.ResetInfo(); + } +} + #endif // !FEATURE_EH_FUNCLETS diff --git a/src/coreclr/vm/exinfo.h b/src/coreclr/vm/exinfo.h index a270843eec9c81..e83bead1bcb797 100644 --- a/src/coreclr/vm/exinfo.h +++ b/src/coreclr/vm/exinfo.h @@ -159,5 +159,112 @@ class ExInfo PTR_ExInfo GetEHTrackerForPreallocatedException(OBJECTREF oPreAllocThrowable, PTR_ExInfo pStartingEHTracker); #endif // TARGET_X86 +#else // !FEATURE_EH_FUNCLETS + +enum RhEHClauseKind +{ + RH_EH_CLAUSE_TYPED = 0, + RH_EH_CLAUSE_FAULT = 1, + RH_EH_CLAUSE_FILTER = 2, + RH_EH_CLAUSE_UNUSED = 3, +}; + +struct RhEHClause +{ + RhEHClauseKind _clauseKind; + unsigned _tryStartOffset; + unsigned _tryEndOffset; + BYTE *_filterAddress; + BYTE *_handlerAddress; + void *_pTargetType; + BOOL _isSameTry; +}; + +enum class ExKind : uint8_t +{ + None = 0, + Throw = 1, + HardwareFault = 2, + KindMask = 3, + + RethrowFlag = 4, + + SupersededFlag = 8, + + InstructionFaultFlag = 0x10 +}; + +struct ExInfo +{ + ExInfo(Thread *pThread, CONTEXT *pCtx, REGDISPLAY *pRD, ExKind exceptionKind); + + void MakeCallbacksRelatedToHandler( + bool fBeforeCallingHandler, + Thread* pThread, + MethodDesc* pMD, + EE_ILEXCEPTION_CLAUSE* pEHClause, + DWORD_PTR dwHandlerStartPC, + StackFrame sf); + + // Previous ExInfo in the chain of exceptions rethrown from their catch / finally handlers + PTR_ExInfo m_pPrevExInfo; + // Context used by the stack frame iterator + CONTEXT* m_pExContext; + // actual exception object reference + OBJECTREF m_exception; + // Kind of the exception (software, hardware, rethrown) + ExKind m_kind; + // Exception handling pass (1 or 2) + uint8_t m_passNumber; + // Index of the current exception handling clause + uint32_t m_idxCurClause; + // Stack frame iterator used to walk stack frames while handling the exception + StackFrameIterator m_frameIter; + volatile size_t m_notifyDebuggerSP; + REGDISPLAY *m_pRD; + // Stack trace of the current exception + StackTraceInfo m_stackTraceInfo; + // Initial explicit frame + Frame* m_pFrame; + + // Low and high bounds of the stack unwound by the exception. They are updated during 2nd pass only. + StackFrame m_sfLowBound; + StackFrame m_sfHighBound; + // Stack frame of the caller of the currently running exception handling clause (catch, finally, filter) + CallerStackFrame m_csfEHClause; + // Stack frame of the caller of the code that encloses the currently running exception handling clause + CallerStackFrame m_csfEnclosingClause; + // Stack frame of the caller of the catch handler + StackFrame m_sfCallerOfActualHandlerFrame; + // The exception handling clause for the catch handler that was identified during pass 1 + EE_ILEXCEPTION_CLAUSE m_ClauseForCatch; + +#ifdef TARGET_UNIX + // Exception propagation callback and context for ObjectiveC exception propagation support + void(*m_propagateExceptionCallback)(void* context); + void *m_propagateExceptionContext; +#endif // TARGET_UNIX + + // thrown exception object handle + OBJECTHANDLE m_hThrowable; + + // The following fields are for profiler / debugger use only + EE_ILEXCEPTION_CLAUSE m_CurrentClause; + DebuggerExState m_DebuggerExState; + EHClauseInfo m_EHClauseInfo; + ExceptionFlags m_ExceptionFlags; + +#ifndef TARGET_UNIX + EHWatsonBucketTracker m_WatsonBucketTracker; + + inline PTR_EHWatsonBucketTracker GetWatsonBucketTracker() + { + LIMITED_METHOD_CONTRACT; + return PTR_EHWatsonBucketTracker(PTR_HOST_MEMBER_TADDR(ExInfo, this, m_WatsonBucketTracker)); + } +#endif // !TARGET_UNIX + +}; + #endif // !FEATURE_EH_FUNCLETS #endif // __ExInfo_h__ diff --git a/src/coreclr/vm/exstate.cpp b/src/coreclr/vm/exstate.cpp index fc3df10c0f6473..41c0b8c044536c 100644 --- a/src/coreclr/vm/exstate.cpp +++ b/src/coreclr/vm/exstate.cpp @@ -22,6 +22,10 @@ OBJECTHANDLE ThreadExceptionState::GetThrowableAsHandle() { return m_pCurrentTracker->m_hThrowable; } + else if (m_pExInfo) + { + return m_pExInfo->m_hThrowable; + } return NULL; #else // FEATURE_EH_FUNCLETS @@ -34,6 +38,7 @@ ThreadExceptionState::ThreadExceptionState() { #ifdef FEATURE_EH_FUNCLETS m_pCurrentTracker = NULL; + m_pExInfo = NULL; #endif // FEATURE_EH_FUNCLETS m_flag = TEF_None; @@ -109,6 +114,10 @@ OBJECTREF ThreadExceptionState::GetThrowable() { return ObjectFromHandle(m_pCurrentTracker->m_hThrowable); } + if (m_pExInfo && m_pExInfo->m_exception != NULL) + { + return m_pExInfo->m_exception; + } #else // FEATURE_EH_FUNCLETS if (m_currentExInfo.m_hThrowable) { @@ -175,7 +184,7 @@ void ThreadExceptionState::SetThrowable(OBJECTREF throwable DEBUG_ARG(SetThrowab #endif // FEATURE_INTERPRETER ) { - CONSISTENCY_CHECK(CheckPointer(m_pCurrentTracker)); + CONSISTENCY_CHECK(CheckPointer(m_pCurrentTracker, NULL_OK) || CheckPointer(m_pExInfo)); } #endif @@ -183,6 +192,11 @@ void ThreadExceptionState::SetThrowable(OBJECTREF throwable DEBUG_ARG(SetThrowab { m_pCurrentTracker->m_hThrowable = hNewThrowable; } + if (m_pExInfo != NULL) + { + _ASSERTE(m_pExInfo->m_hThrowable == NULL); + m_pExInfo->m_hThrowable = hNewThrowable; + } #else // FEATURE_EH_FUNCLETS m_currentExInfo.m_hThrowable = hNewThrowable; #endif // FEATURE_EH_FUNCLETS @@ -194,8 +208,15 @@ DWORD ThreadExceptionState::GetExceptionCode() LIMITED_METHOD_CONTRACT; #ifdef FEATURE_EH_FUNCLETS - _ASSERTE(m_pCurrentTracker); - return m_pCurrentTracker->m_ExceptionCode; + if (m_pCurrentTracker) + { + return m_pCurrentTracker->m_ExceptionCode; + } + _ASSERTE(m_pExInfo); + { + GCX_COOP(); + return ((EXCEPTIONREF)m_pExInfo->m_exception)->GetXCode(); + } #else // FEATURE_EH_FUNCLETS return m_currentExInfo.m_ExceptionCode; #endif // FEATURE_EH_FUNCLETS @@ -227,7 +248,7 @@ BOOL ThreadExceptionState::IsExceptionInProgress() LIMITED_METHOD_DAC_CONTRACT; #ifdef FEATURE_EH_FUNCLETS - return (m_pCurrentTracker != NULL); + return (m_pCurrentTracker != NULL) || (m_pExInfo != NULL); #else // FEATURE_EH_FUNCLETS return (m_currentExInfo.m_pBottomMostHandler != NULL); #endif // FEATURE_EH_FUNCLETS @@ -307,6 +328,10 @@ PTR_CONTEXT ThreadExceptionState::GetContextRecord() { return m_pCurrentTracker->m_ptrs.ContextRecord; } + else if (m_pExInfo) + { + return dac_cast(m_pExInfo->m_pExContext); + } else { return NULL; @@ -324,6 +349,10 @@ ExceptionFlags* ThreadExceptionState::GetFlags() { return &(m_pCurrentTracker->m_ExceptionFlags); } + else if (m_pExInfo) + { + return &(m_pExInfo->m_ExceptionFlags); + } else { _ASSERTE(!"GetFlags() called when there is no current exception"); @@ -347,6 +376,10 @@ DebuggerExState* ThreadExceptionState::GetDebuggerState() { return &(m_pCurrentTracker->m_DebuggerExState); } + else if (m_pExInfo) + { + return &(m_pExInfo->m_DebuggerExState); + } else { _ASSERTE(!"unexpected use of GetDebuggerState() when no exception in flight"); diff --git a/src/coreclr/vm/exstate.h b/src/coreclr/vm/exstate.h index cc3d25a76f1cb3..6905a29e17fbcb 100644 --- a/src/coreclr/vm/exstate.h +++ b/src/coreclr/vm/exstate.h @@ -24,6 +24,11 @@ class EHClauseInfo; extern StackWalkAction COMPlusUnwindCallback(CrawlFrame *pCf, ThrowCallbackType *pData); +#ifdef FEATURE_EH_FUNCLETS +struct ExInfo; +typedef DPTR(ExInfo) PTR_ExInfo; +#endif // !FEATURE_EH_FUNCLETS + // // This class serves as a forwarding and abstraction layer for the EH subsystem. // Since we have two different implementations, this class is needed to unify @@ -145,12 +150,24 @@ class ThreadExceptionState #ifdef FEATURE_EH_FUNCLETS PTR_ExceptionTracker m_pCurrentTracker; ExceptionTracker m_OOMTracker; + PTR_ExInfo m_pExInfo; public: PTR_ExceptionTracker GetCurrentExceptionTracker() { LIMITED_METHOD_CONTRACT; return m_pCurrentTracker; } + PTR_ExInfo GetCurrentExInfo() + { + LIMITED_METHOD_CONTRACT; + return m_pExInfo; + } + + void SetCurrentExInfo(PTR_ExInfo pExInfo) + { + LIMITED_METHOD_CONTRACT; + m_pExInfo = pExInfo; + } #else ExInfo m_currentExInfo; public: diff --git a/src/coreclr/vm/fcall.cpp b/src/coreclr/vm/fcall.cpp index 4140a80f802d84..20461bef798808 100644 --- a/src/coreclr/vm/fcall.cpp +++ b/src/coreclr/vm/fcall.cpp @@ -41,6 +41,13 @@ NOINLINE LPVOID __FCThrow(LPVOID __me, RuntimeExceptionKind reKind, UINT resID, _ASSERTE((reKind != kExecutionEngineException) || !"Don't throw kExecutionEngineException from here. Go to EEPolicy directly, or throw something better."); +#ifdef FEATURE_EH_FUNCLETS + if (g_isNewExceptionHandlingEnabled) + { + DispatchManagedException(reKind); + } +#endif // FEATURE_EH_FUNCLETS + if (resID == 0) { // If we have an string to add use NonLocalized otherwise just throw the exception. diff --git a/src/coreclr/vm/fcall.h b/src/coreclr/vm/fcall.h index 0bd5e01991ed63..e403918072c04e 100644 --- a/src/coreclr/vm/fcall.h +++ b/src/coreclr/vm/fcall.h @@ -582,8 +582,9 @@ LPVOID __FCThrowArgument(LPVOID me, enum RuntimeExceptionKind reKind, LPCWSTR ar HELPER_METHOD_FRAME_BEGIN_EX_BODY(ret, helperFrame, gcpoll, allowGC) \ /* TODO TURN THIS ON!!! */ \ /* gcpoll; */ \ + if (g_isNewExceptionHandlingEnabled) __helperframe.Push(); \ INSTALL_MANAGED_EXCEPTION_DISPATCHER; \ - __helperframe.Push(); \ + if (!g_isNewExceptionHandlingEnabled) __helperframe.Push(); \ MAKE_CURRENT_THREAD_AVAILABLE_EX(__helperframe.GetThread()); \ INSTALL_UNWIND_AND_CONTINUE_HANDLER_FOR_HMF(&__helperframe); @@ -616,8 +617,9 @@ LPVOID __FCThrowArgument(LPVOID me, enum RuntimeExceptionKind reKind, LPCWSTR ar #define HELPER_METHOD_FRAME_END_EX(gcpoll,allowGC) \ UNINSTALL_UNWIND_AND_CONTINUE_HANDLER; \ - __helperframe.Pop(); \ + if (!g_isNewExceptionHandlingEnabled) __helperframe.Pop(); \ UNINSTALL_MANAGED_EXCEPTION_DISPATCHER; \ + if (g_isNewExceptionHandlingEnabled) __helperframe.Pop(); \ HELPER_METHOD_FRAME_END_EX_BODY(gcpoll,allowGC); #define HELPER_METHOD_FRAME_END_EX_NOTHROW(gcpoll,allowGC) \ diff --git a/src/coreclr/vm/field.cpp b/src/coreclr/vm/field.cpp index 3e64040135ddac..9b70f06e38da5b 100644 --- a/src/coreclr/vm/field.cpp +++ b/src/coreclr/vm/field.cpp @@ -229,7 +229,7 @@ PTR_VOID FieldDesc::GetStaticAddressHandle(PTR_VOID base) CONTRACTL_END _ASSERTE(IsStatic()); -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER if (IsEnCNew()) { EnCFieldDesc * pFD = dac_cast(this); @@ -254,7 +254,7 @@ PTR_VOID FieldDesc::GetStaticAddressHandle(PTR_VOID base) #endif // !DACCESS_COMPILE return retVal; } -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER if (IsRVA()) @@ -443,14 +443,14 @@ PTR_VOID FieldDesc::GetAddress(PTR_VOID o) // the field desc is for the EnCHelper, not the new EnC field #endif -#if defined(EnC_SUPPORTED) && !defined(DACCESS_COMPILE) +#if defined(FEATURE_METADATA_UPDATER) && !defined(DACCESS_COMPILE) // EnC added fields aren't at a simple offset like normal fields. if (IsEnCNew()) { // We'll have to go through some effort to compute the address of this field. return ((EnCFieldDesc *)this)->GetAddress(o); } -#endif // defined(EnC_SUPPORTED) && !defined(DACCESS_COMPILE) +#endif // defined(FEATURE_METADATA_UPDATER) && !defined(DACCESS_COMPILE) return GetAddressNoThrowNoGC(o); } @@ -465,7 +465,7 @@ void *FieldDesc::GetInstanceAddress(OBJECTREF o) DWORD dwOffset = m_dwOffset; // GetOffset() -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER // EnC added fields aren't at a simple offset like normal fields. if (dwOffset == FIELD_OFFSET_NEW_ENC) // IsEnCNew() { diff --git a/src/coreclr/vm/frames.cpp b/src/coreclr/vm/frames.cpp index 4cccc1e6dfc429..90c21e54aa813b 100644 --- a/src/coreclr/vm/frames.cpp +++ b/src/coreclr/vm/frames.cpp @@ -1020,6 +1020,50 @@ void GCFrame::Pop() Thread::ObjectRefNew(&m_pObjRefs[i]); // Unprotect them #endif } + +void GCFrame::Remove() +{ + CONTRACTL + { + NOTHROW; + GC_NOTRIGGER; + MODE_COOPERATIVE; + PRECONDITION(m_pCurThread != NULL); + } + CONTRACTL_END; + + GCFrame *pPrevFrame = NULL; + GCFrame *pFrame = m_pCurThread->GetGCFrame(); + while (pFrame != NULL) + { + if (pFrame == this) + { + if (pPrevFrame) + { + pPrevFrame->m_Next = m_Next; + } + else + { + m_pCurThread->SetGCFrame(m_Next); + } + + m_Next = NULL; + +#ifdef _DEBUG + m_pCurThread->EnableStressHeap(); + for(UINT i = 0; i < m_numObjRefs; i++) + Thread::ObjectRefNew(&m_pObjRefs[i]); // Unprotect them +#endif + break; + } + + pPrevFrame = pFrame; + pFrame = pFrame->m_Next; + } + + _ASSERTE_MSG(pFrame != NULL, "GCFrame not found in the current thread's stack"); +} + #endif // !DACCESS_COMPILE // diff --git a/src/coreclr/vm/frames.h b/src/coreclr/vm/frames.h index cba39a808a9866..907cc2e0e3eb74 100644 --- a/src/coreclr/vm/frames.h +++ b/src/coreclr/vm/frames.h @@ -2435,6 +2435,8 @@ class GCFrame // Push and pop this frame from the thread's stack. void Push(Thread* pThread); void Pop(); + // Remove this frame from any position in the thread's stack + void Remove(); #endif // DACCESS_COMPILE @@ -2809,7 +2811,7 @@ class InlinedCallFrame : public Frame #ifdef HOST_64BIT // See code:GenericPInvokeCalliHelper - return ((m_Datum != NULL) && !(dac_cast(m_Datum) & 0x1)); + return ((m_Datum != NULL) && !(dac_cast(m_Datum) & 0x3)); #else // HOST_64BIT return ((dac_cast(m_Datum) & ~0xffff) != 0); #endif // HOST_64BIT @@ -2869,8 +2871,11 @@ class InlinedCallFrame : public Frame virtual void UpdateRegDisplay(const PREGDISPLAY); // m_Datum contains MethodDesc ptr or - // - on AMD64: CALLI target address (if lowest bit is set) - // - on X86: argument stack size (if value is <64k) + // - on 64 bit host: CALLI target address (if lowest bit is set) + // - on windows x86 host: argument stack size (if value is <64k) + // When m_Datum contains MethodDesc ptr, then on other than windows x86 host + // - bit 1 set indicates invoking new exception handling helpers + // - bit 2 indicates CallCatchFunclet or CallFinallyFunclet // See code:HasFunction. PTR_NDirectMethodDesc m_Datum; diff --git a/src/coreclr/vm/frozenobjectheap.cpp b/src/coreclr/vm/frozenobjectheap.cpp index 45492155d2089c..8f11f3c8c74d64 100644 --- a/src/coreclr/vm/frozenobjectheap.cpp +++ b/src/coreclr/vm/frozenobjectheap.cpp @@ -10,7 +10,8 @@ #define FOH_COMMIT_SIZE (64 * 1024) FrozenObjectHeapManager::FrozenObjectHeapManager(): - m_Crst(CrstFrozenObjectHeap, CRST_UNSAFE_COOPGC), + m_Crst(CrstFrozenObjectHeap, CRST_UNSAFE_ANYMODE), + m_SegmentRegistrationCrst(CrstFrozenObjectHeap), m_CurrentSegment(nullptr) { } @@ -18,7 +19,9 @@ FrozenObjectHeapManager::FrozenObjectHeapManager(): // Allocates an object of the give size (including header) on a frozen segment. // May return nullptr if object is too large (larger than FOH_COMMIT_SIZE) // in such cases caller is responsible to find a more appropriate heap to allocate it -Object* FrozenObjectHeapManager::TryAllocateObject(PTR_MethodTable type, size_t objectSize, bool publish) + +Object* FrozenObjectHeapManager::TryAllocateObject(PTR_MethodTable type, size_t objectSize, + void(*initFunc)(Object*, void*), void* pParam) { CONTRACTL { @@ -33,64 +36,83 @@ Object* FrozenObjectHeapManager::TryAllocateObject(PTR_MethodTable type, size_t #else // FEATURE_BASICFREEZE Object* obj = nullptr; - { - CrstHolder ch(&m_Crst); - - _ASSERT(type != nullptr); - _ASSERT(FOH_COMMIT_SIZE >= MIN_OBJECT_SIZE); - - // Currently we don't support frozen objects with special alignment requirements - // TODO: We should also give up on arrays of doubles on 32-bit platforms. - // (we currently never allocate them on frozen segments) - #ifdef FEATURE_64BIT_ALIGNMENT - if (type->RequiresAlign8()) - { - // Align8 objects are not supported yet - return nullptr; - } - #endif + FrozenObjectSegment* curSeg = nullptr; + uint8_t* curSegmentCurrent = nullptr; + size_t curSegSizeCommitted = 0; - // NOTE: objectSize is expected be the full size including header - _ASSERT(objectSize >= MIN_OBJECT_SIZE); - - if (objectSize > FOH_COMMIT_SIZE) + { + GCX_PREEMP(); { - // The current design doesn't allow objects larger than FOH_COMMIT_SIZE and - // since FrozenObjectHeap is just an optimization, let's not fill it with huge objects. - return nullptr; - } - - if (m_CurrentSegment == nullptr) + CrstHolder ch(&m_Crst); + + _ASSERT(type != nullptr); + _ASSERT(FOH_COMMIT_SIZE >= MIN_OBJECT_SIZE); + + // Currently we don't support frozen objects with special alignment requirements + // TODO: We should also give up on arrays of doubles on 32-bit platforms. + // (we currently never allocate them on frozen segments) +#ifdef FEATURE_64BIT_ALIGNMENT + if (type->RequiresAlign8()) + { + // Align8 objects are not supported yet + return nullptr; + } +#endif + + // NOTE: objectSize is expected be the full size including header + _ASSERT(objectSize >= MIN_OBJECT_SIZE); + + if (objectSize > FOH_COMMIT_SIZE) + { + // The current design doesn't allow objects larger than FOH_COMMIT_SIZE and + // since FrozenObjectHeap is just an optimization, let's not fill it with huge objects. + return nullptr; + } + + obj = m_CurrentSegment == nullptr ? nullptr : m_CurrentSegment->TryAllocateObject(type, objectSize); + // obj is nullptr if the current segment is full or hasn't been allocated yet + if (obj == nullptr) + { + size_t newSegmentSize = FOH_SEGMENT_DEFAULT_SIZE; + if (m_CurrentSegment != nullptr) + { + // Double the reserved size to reduce the number of frozen segments in apps with lots of frozen objects + // Use the same size in case if prevSegmentSize*2 operation overflows. + const size_t prevSegmentSize = m_CurrentSegment->m_Size; + newSegmentSize = max(prevSegmentSize, prevSegmentSize * 2); + } + + m_CurrentSegment = new FrozenObjectSegment(newSegmentSize); + m_FrozenSegments.Append(m_CurrentSegment); + + // Try again + obj = m_CurrentSegment->TryAllocateObject(type, objectSize); + + // This time it's not expected to be null + _ASSERT(obj != nullptr); + } + + if (initFunc != nullptr) + { + initFunc(obj, pParam); + } + + curSeg = m_CurrentSegment; + curSegSizeCommitted = curSeg->m_SizeCommitted; + curSegmentCurrent = curSeg->m_pCurrent; + } // end of m_Crst lock + + // Let GC know about the new segment or changes in it. + // We do it under a new lock because the main one (m_Crst) can be used by Profiler in a GC's thread + // and that might cause deadlocks since RegisterFrozenSegment may stuck on GC's lock. { - // Create the first segment on first allocation - m_CurrentSegment = new FrozenObjectSegment(FOH_SEGMENT_DEFAULT_SIZE); - m_FrozenSegments.Append(m_CurrentSegment); - _ASSERT(m_CurrentSegment != nullptr); + CrstHolder regLock(&m_SegmentRegistrationCrst); + curSeg->RegisterOrUpdate(curSegmentCurrent, curSegSizeCommitted); } - obj = m_CurrentSegment->TryAllocateObject(type, objectSize); - - // The only case where it can be null is when the current segment is full and we need - // to create a new one - if (obj == nullptr) - { - // Double the reserved size to reduce the number of frozen segments in apps with lots of frozen objects - // Use the same size in case if prevSegmentSize*2 operation overflows. - size_t prevSegmentSize = m_CurrentSegment->GetSize(); - m_CurrentSegment = new FrozenObjectSegment(max(prevSegmentSize, prevSegmentSize * 2)); - m_FrozenSegments.Append(m_CurrentSegment); - - // Try again - obj = m_CurrentSegment->TryAllocateObject(type, objectSize); + } // end of GCX_PREEMP - // This time it's not expected to be null - _ASSERT(obj != nullptr); - } - } - if (publish) - { - PublishFrozenObject(obj); - } + PublishFrozenObject(obj); return obj; #endif // !FEATURE_BASICFREEZE @@ -101,10 +123,10 @@ Object* FrozenObjectHeapManager::TryAllocateObject(PTR_MethodTable type, size_t FrozenObjectSegment::FrozenObjectSegment(size_t sizeHint) : m_pStart(nullptr), m_pCurrent(nullptr), + m_pCurrentRegistered(nullptr), m_SizeCommitted(0), m_Size(sizeHint), m_SegmentHandle(nullptr) - COMMA_INDEBUG(m_ObjectsCount(0)) { _ASSERT(m_Size > FOH_COMMIT_SIZE); _ASSERT(m_Size % FOH_COMMIT_SIZE == 0); @@ -135,34 +157,61 @@ FrozenObjectSegment::FrozenObjectSegment(size_t sizeHint) : ThrowOutOfMemory(); } + m_pStart = static_cast(committedAlloc); + m_pCurrent = m_pStart + sizeof(ObjHeader); + m_SizeCommitted = FOH_COMMIT_SIZE; + // ClrVirtualAlloc is expected to be PageSize-aligned so we can expect // DATA_ALIGNMENT alignment as well _ASSERT(IS_ALIGNED(committedAlloc, DATA_ALIGNMENT)); +} - segment_info si; - si.pvMem = committedAlloc; - si.ibFirstObject = sizeof(ObjHeader); - si.ibAllocated = si.ibFirstObject; - si.ibCommit = FOH_COMMIT_SIZE; - si.ibReserved = m_Size; - - m_SegmentHandle = GCHeapUtilities::GetGCHeap()->RegisterFrozenSegment(&si); - if (m_SegmentHandle == nullptr) +void FrozenObjectSegment::RegisterOrUpdate(uint8_t* current, size_t sizeCommited) +{ + CONTRACTL { - ClrVirtualFree(alloc, 0, MEM_RELEASE); - ThrowOutOfMemory(); + THROWS; + MODE_PREEMPTIVE; } + CONTRACTL_END - m_pStart = static_cast(committedAlloc); - m_pCurrent = m_pStart + sizeof(ObjHeader); - m_SizeCommitted = si.ibCommit; - INDEBUG(m_ObjectsCount = 0); - return; + if (m_pCurrentRegistered == nullptr) + { + segment_info si; + si.pvMem = m_pStart; + si.ibFirstObject = sizeof(ObjHeader); + si.ibAllocated = (size_t)current - (size_t)si.pvMem; + si.ibCommit = sizeCommited; + si.ibReserved = m_Size; + + assert((size_t)current >= (size_t)si.pvMem); + + // NOTE: RegisterFrozenSegment may take a GC lock inside. + m_SegmentHandle = GCHeapUtilities::GetGCHeap()->RegisterFrozenSegment(&si); + if (m_SegmentHandle == nullptr) + { + ThrowOutOfMemory(); + } + m_pCurrentRegistered = current; + } + else + { + if (current > m_pCurrentRegistered) + { + GCHeapUtilities::GetGCHeap()->UpdateFrozenSegment( + m_SegmentHandle, current, m_pStart + sizeCommited); + m_pCurrentRegistered = current; + } + else + { + // Some other thread already advanced it. + } + } } Object* FrozenObjectSegment::TryAllocateObject(PTR_MethodTable type, size_t objectSize) { - _ASSERT(m_pStart != nullptr && m_Size > 0 && m_SegmentHandle != nullptr); // Expected to be inited + _ASSERT((m_pStart != nullptr) && (m_Size > 0)); _ASSERT(IS_ALIGNED(m_pCurrent, DATA_ALIGNMENT)); _ASSERT(IS_ALIGNED(objectSize, DATA_ALIGNMENT)); _ASSERT(objectSize <= FOH_COMMIT_SIZE); @@ -194,16 +243,11 @@ Object* FrozenObjectSegment::TryAllocateObject(PTR_MethodTable type, size_t obje m_SizeCommitted += FOH_COMMIT_SIZE; } - INDEBUG(m_ObjectsCount++); - Object* object = reinterpret_cast(m_pCurrent); object->SetMethodTable(type); m_pCurrent += objectSize; - // Notify GC that we bumped the pointer and, probably, committed more memory in the reserved part - GCHeapUtilities::GetGCHeap()->UpdateFrozenSegment(m_SegmentHandle, m_pCurrent, m_pStart + m_SizeCommitted); - return object; } diff --git a/src/coreclr/vm/frozenobjectheap.h b/src/coreclr/vm/frozenobjectheap.h index d2c0bb62f134af..e191731d64dd5b 100644 --- a/src/coreclr/vm/frozenobjectheap.h +++ b/src/coreclr/vm/frozenobjectheap.h @@ -27,10 +27,12 @@ class FrozenObjectHeapManager { public: FrozenObjectHeapManager(); - Object* TryAllocateObject(PTR_MethodTable type, size_t objectSize, bool publish = true); + Object* TryAllocateObject(PTR_MethodTable type, size_t objectSize, + void(*initFunc)(Object*,void*) = nullptr, void* pParam = nullptr); private: Crst m_Crst; + Crst m_SegmentRegistrationCrst; SArray m_FrozenSegments; FrozenObjectSegment* m_CurrentSegment; @@ -43,10 +45,7 @@ class FrozenObjectSegment public: FrozenObjectSegment(size_t sizeHint); Object* TryAllocateObject(PTR_MethodTable type, size_t objectSize); - size_t GetSize() const - { - return m_Size; - } + void RegisterOrUpdate(uint8_t* current, size_t sizeCommited); private: Object* GetFirstObject() const; @@ -55,12 +54,20 @@ class FrozenObjectSegment // Start of the reserved memory, the first object starts at "m_pStart + sizeof(ObjHeader)" (its pMT) uint8_t* m_pStart; + // NOTE: To handle potential race conditions, only m_[x]Registered fields should be accessed + // externally as they guarantee that GC is aware of the current state of the segment. + // Pointer to the end of the current segment, ready to be used as a pMT for a new object // meaning that "m_pCurrent - sizeof(ObjHeader)" is the actual start of the new object (header). // // m_pCurrent <= m_SizeCommitted uint8_t* m_pCurrent; + // Last known value of m_pCurrent that GC is aware of. + // + // m_pCurrentRegistered <= m_pCurrent + uint8_t* m_pCurrentRegistered; + // Memory committed in the current segment // // m_SizeCommitted <= m_pStart + FOH_SIZE_RESERVED @@ -70,10 +77,10 @@ class FrozenObjectSegment size_t m_Size; segment_handle m_SegmentHandle; - INDEBUG(size_t m_ObjectsCount); friend class ProfilerObjectEnum; friend class ProfToEEInterfaceImpl; + friend class FrozenObjectHeapManager; }; #endif // _FROZENOBJECTHEAP_H diff --git a/src/coreclr/vm/gcenv.ee.cpp b/src/coreclr/vm/gcenv.ee.cpp index dc28e791de0cf7..8d9f676d967a8e 100644 --- a/src/coreclr/vm/gcenv.ee.cpp +++ b/src/coreclr/vm/gcenv.ee.cpp @@ -115,16 +115,28 @@ static void ScanStackRoots(Thread * pThread, promote_func* fn, ScanContext* sc) IsGCSpecialThread() || (GetThread() == ThreadSuspend::GetSuspensionThread() && ThreadStore::HoldingThreadStore())); +#if defined(FEATURE_CONSERVATIVE_GC) || defined(USE_FEF) Frame* pTopFrame = pThread->GetFrame(); Object ** topStack = (Object **)pTopFrame; - if ((pTopFrame != ((Frame*)-1)) - && (pTopFrame->GetVTablePtr() == InlinedCallFrame::GetMethodFrameVPtr())) { - // It is an InlinedCallFrame. Get SP from it. + if (InlinedCallFrame::FrameHasActiveCall(pTopFrame)) + { + // It is an InlinedCallFrame with active call. Get SP from it. InlinedCallFrame* pInlinedFrame = (InlinedCallFrame*)pTopFrame; topStack = (Object **)pInlinedFrame->GetCallSiteSP(); } +#endif // FEATURE_CONSERVATIVE_GC || USE_FEF +#ifdef USE_FEF + // We only set the stack_limit when FEF (FaultingExceptionFrame) is enabled, because without the + // FEF, the code above would have to check if hardware exception is being handled and get the limit + // from the exception frame. Since the stack_limit is strictly necessary only on Unix and FEF is + // not enabled on Window x86 only, it is sufficient to keep the stack_limit set to 0 in this case. + // See the comment on the stack_limit usage in the PromoteCarefully function for more details. sc->stack_limit = (uintptr_t)topStack; +#else // USE_FEF + // It should be set to 0 in the ScanContext constructor + _ASSERTE(sc->stack_limit == 0); +#endif // USE_FEF #ifdef FEATURE_CONSERVATIVE_GC if (g_pConfig->GetGCConservative()) diff --git a/src/coreclr/vm/gchandleutilities.h b/src/coreclr/vm/gchandleutilities.h index 2dc3a1059d6e7f..1f0e7013f22b61 100644 --- a/src/coreclr/vm/gchandleutilities.h +++ b/src/coreclr/vm/gchandleutilities.h @@ -197,19 +197,6 @@ inline OBJECTHANDLE CreateGlobalRefcountedHandle(OBJECTREF object) return CreateGlobalHandleCommon(object, HNDTYPE_REFCOUNTED); } -// Creates a variable-strength handle -inline OBJECTHANDLE CreateVariableHandle(IGCHandleStore* store, OBJECTREF object, uint32_t type) -{ - OBJECTHANDLE hnd = store->CreateHandleWithExtraInfo(OBJECTREFToObject(object), HNDTYPE_VARIABLE, (void*)((uintptr_t)type)); - if (!hnd) - { - COMPlusThrowOM(); - } - - DiagHandleCreated(hnd, object); - return hnd; -} - // Handle object manipulation convenience functions inline void StoreObjectInHandle(OBJECTHANDLE handle, OBJECTREF object) @@ -299,11 +286,6 @@ inline void DestroyDependentHandle(OBJECTHANDLE handle) DestroyHandleCommon(handle, HNDTYPE_DEPENDENT); } -inline void DestroyVariableHandle(OBJECTHANDLE handle) -{ - DestroyHandleCommon(handle, HNDTYPE_VARIABLE); -} - inline void DestroyGlobalHandle(OBJECTHANDLE handle) { DestroyHandleCommon(handle, HNDTYPE_DEFAULT); diff --git a/src/coreclr/vm/gchelpers.cpp b/src/coreclr/vm/gchelpers.cpp index e3c882f623b244..81839c06c5f7d1 100644 --- a/src/coreclr/vm/gchelpers.cpp +++ b/src/coreclr/vm/gchelpers.cpp @@ -555,18 +555,18 @@ OBJECTREF TryAllocateFrozenSzArray(MethodTable* pArrayMT, INT32 cElements) #endif FrozenObjectHeapManager* foh = SystemDomain::GetFrozenObjectHeapManager(); - ArrayBase* orArray = static_cast(foh->TryAllocateObject(pArrayMT, PtrAlign(totalSize), /*publish*/ false)); + ArrayBase* orArray = static_cast( + foh->TryAllocateObject(pArrayMT, PtrAlign(totalSize), [](Object* obj, void* elemCntPtr){ + // Initialize newly allocated object before publish + static_cast(obj)->m_NumComponents = *static_cast(elemCntPtr); + }, &cElements)); + if (orArray == nullptr) { // We failed to allocate on a frozen segment, fallback to AllocateSzArray // E.g. if the array is too big to fit on a frozen segment return NULL; } - orArray->m_NumComponents = cElements; - - // Publish needs to be postponed in this case because we need to specify array length - PublishObjectAndNotify(orArray, GC_ALLOC_NO_FLAGS); - return ObjectToOBJECTREF(orArray); } @@ -968,12 +968,15 @@ STRINGREF AllocateString(DWORD cchStringLength, bool preferFrozenHeap, bool* pIs if (preferFrozenHeap) { FrozenObjectHeapManager* foh = SystemDomain::GetFrozenObjectHeapManager(); - orString = static_cast(foh->TryAllocateObject(g_pStringClass, totalSize, /* publish = */false)); + + orString = static_cast(foh->TryAllocateObject( + g_pStringClass, totalSize, [](Object* obj, void* pStrLen) { + // Initialize newly allocated object before publish + static_cast(obj)->SetStringLength(*static_cast(pStrLen)); + }, &cchStringLength)); + if (orString != nullptr) { - orString->SetStringLength(cchStringLength); - // Publish needs to be postponed in this case because we need to specify string length - PublishObjectAndNotify(orString, GC_ALLOC_NO_FLAGS); _ASSERTE(orString->GetBuffer()[cchStringLength] == W('\0')); orStringRef = ObjectToSTRINGREF(orString); *pIsFrozen = true; @@ -1024,6 +1027,7 @@ void AllocateComClassObject(ComClassFactory* pComClsFac, OBJECTREF* ppRefClass) // AllocateObject will throw OutOfMemoryException so don't need to check // for NULL return value from it. OBJECTREF AllocateObject(MethodTable *pMT + , GC_ALLOC_FLAGS flags #ifdef FEATURE_COMINTEROP , bool fHandleCom #endif @@ -1068,7 +1072,6 @@ OBJECTREF AllocateObject(MethodTable *pMT #endif // FEATURE_COMINTEROP else { - GC_ALLOC_FLAGS flags = GC_ALLOC_NO_FLAGS; if (pMT->ContainsPointers()) flags |= GC_ALLOC_CONTAINS_REF; @@ -1139,7 +1142,7 @@ OBJECTREF TryAllocateFrozenObject(MethodTable* pObjMT) #endif // FEATURE_64BIT_ALIGNMENT FrozenObjectHeapManager* foh = SystemDomain::GetFrozenObjectHeapManager(); - Object* orObject = foh->TryAllocateObject(pObjMT, PtrAlign(pObjMT->GetBaseSize()), /*publish*/ true); + Object* orObject = foh->TryAllocateObject(pObjMT, PtrAlign(pObjMT->GetBaseSize())); return ObjectToOBJECTREF(orObject); } diff --git a/src/coreclr/vm/gchelpers.h b/src/coreclr/vm/gchelpers.h index 3528ef8bb47b43..242a0156964d81 100644 --- a/src/coreclr/vm/gchelpers.h +++ b/src/coreclr/vm/gchelpers.h @@ -53,11 +53,25 @@ OBJECTREF DupArrayForCloning(BASEARRAYREF pRef); // for NULL return value from them. OBJECTREF AllocateObject(MethodTable *pMT + , GC_ALLOC_FLAGS flags #ifdef FEATURE_COMINTEROP , bool fHandleCom = true #endif ); +inline OBJECTREF AllocateObject(MethodTable *pMT +#ifdef FEATURE_COMINTEROP + , bool fHandleCom = true +#endif + ) +{ + return AllocateObject(pMT, GC_ALLOC_NO_FLAGS +#ifdef FEATURE_COMINTEROP + , fHandleCom +#endif + ); +} + extern int StompWriteBarrierEphemeral(bool isRuntimeSuspended); extern int StompWriteBarrierResize(bool isRuntimeSuspended, bool bReqUpperBoundsCheck); extern int SwitchToWriteWatchBarrier(bool isRuntimeSuspended); diff --git a/src/coreclr/vm/generics.cpp b/src/coreclr/vm/generics.cpp index fe2f438c266e03..396e99123a7043 100644 --- a/src/coreclr/vm/generics.cpp +++ b/src/coreclr/vm/generics.cpp @@ -216,15 +216,6 @@ ClassLoader::CreateTypeHandleForNonCanonicalGenericInstantiation( BOOL fHasDynamicInterfaceMap = FALSE; #endif // FEATURE_COMINTEROP - // Collectible types have some special restrictions - if (pAllocator->IsCollectible()) - { - if (pOldMT->HasFixedAddressVTStatics()) - { - ClassLoader::ThrowTypeLoadException(pTypeKey, IDS_CLASSLOAD_COLLECTIBLEFIXEDVTATTR); - } - } - // The number of bytes used for GC info size_t cbGC = pOldMT->ContainsPointers() ? ((CGCDesc*) pOldMT)->GetSize() : 0; diff --git a/src/coreclr/vm/genmeth.cpp b/src/coreclr/vm/genmeth.cpp index 58f13c0892e9b4..96bbc53a25e484 100644 --- a/src/coreclr/vm/genmeth.cpp +++ b/src/coreclr/vm/genmeth.cpp @@ -118,12 +118,12 @@ static MethodDesc* CreateMethodDesc(LoaderAllocator *pAllocator, pMD->SetIsIntrinsic(); } -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER if (pTemplateMD->IsEnCAddedMethod()) { pMD->SetIsEnCAddedMethod(); } -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER pMD->SetMemberDef(token); pMD->SetSlot(pTemplateMD->GetSlot()); diff --git a/src/coreclr/vm/i386/asmhelpers.S b/src/coreclr/vm/i386/asmhelpers.S index e0b87813592ddd..ff777550bfab58 100644 --- a/src/coreclr/vm/i386/asmhelpers.S +++ b/src/coreclr/vm/i386/asmhelpers.S @@ -214,6 +214,8 @@ LOCAL_LABEL(donestack): CHECK_STACK_ALIGNMENT call [ebx + CallDescrData__pTarget] +LOCAL_LABEL(CallDescrWorkerInternalReturnAddress): + #ifdef _DEBUG nop // This is a tag that we use in an assert. Fcalls expect to // be called from Jitted code or from certain blessed call sites like @@ -252,6 +254,10 @@ LOCAL_LABEL(ReturnsFloat): LOCAL_LABEL(ReturnsDouble): fstp QWORD PTR [ebx + CallDescrData__returnValue] // Spill the Double return value jmp LOCAL_LABEL(Epilog) + +PATCH_LABEL CallDescrWorkerInternalReturnAddressOffset + .word LOCAL_LABEL(CallDescrWorkerInternalReturnAddress) - C_FUNC(CallDescrWorkerInternal) + NESTED_END CallDescrWorkerInternal, _TEXT #ifdef _DEBUG diff --git a/src/coreclr/vm/i386/cgenx86.cpp b/src/coreclr/vm/i386/cgenx86.cpp index 48d943697ee367..496c7c3f34366b 100644 --- a/src/coreclr/vm/i386/cgenx86.cpp +++ b/src/coreclr/vm/i386/cgenx86.cpp @@ -962,7 +962,7 @@ extern "C" VOID STDCALL StubRareDisableTHROWWorker(Thread *pThread) ////////////////////////////////////////////////////////////////////////////// /*********************************************************************/ -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER #pragma warning (disable : 4731) void ResumeAtJit(PCONTEXT pContext, LPVOID oldESP) { @@ -1017,7 +1017,7 @@ void ResumeAtJit(PCONTEXT pContext, LPVOID oldESP) } } #pragma warning (default : 4731) -#endif // !EnC_SUPPORTED +#endif // !FEATURE_METADATA_UPDATER #ifndef TARGET_UNIX diff --git a/src/coreclr/vm/interoplibinterface_comwrappers.cpp b/src/coreclr/vm/interoplibinterface_comwrappers.cpp index 93fa6a448d4687..4b41b68b8e6151 100644 --- a/src/coreclr/vm/interoplibinterface_comwrappers.cpp +++ b/src/coreclr/vm/interoplibinterface_comwrappers.cpp @@ -5,6 +5,7 @@ // Runtime headers #include "common.h" +#include "simplerwlock.hpp" #include "rcwrefcache.h" #ifdef FEATURE_COMINTEROP_APARTMENT_SUPPORT #include "olecontexthelpers.h" @@ -257,32 +258,36 @@ namespace using Element = SHash::element_t; using Iterator = SHash::Iterator; - class LockHolder : public CrstHolder + class ReaderLock final { + SimpleReadLockHolder _lock; public: - LockHolder(_In_ ExtObjCxtCache *cache) - : CrstHolder(&cache->_lock) - { - // This cache must be locked in Cooperative mode - // since releases of wrappers can occur during a GC. - CONTRACTL - { - NOTHROW; - GC_NOTRIGGER; - MODE_COOPERATIVE; - } - CONTRACTL_END; - } + ReaderLock(_In_ ExtObjCxtCache* cache) + : _lock{ &cache->_lock } + { } + + ~ReaderLock() = default; + }; + + class WriterLock final + { + SimpleWriteLockHolder _lock; + public: + WriterLock(_In_ ExtObjCxtCache* cache) + : _lock{ &cache->_lock } + { } + + ~WriterLock() = default; }; private: friend struct InteropLibImports::RuntimeCallContext; SHash _hashMap; - Crst _lock; + SimpleRWLock _lock; ExtObjCxtRefCache* _refCache; ExtObjCxtCache() - : _lock(CrstExternalObjectContextCache, CRST_UNSAFE_COOPGC) + : _lock(COOPERATIVE, LOCK_TYPE_DEFAULT) , _refCache(GetAppDomain()->GetRCWRefCache()) { } ~ExtObjCxtCache() = default; @@ -292,7 +297,7 @@ namespace bool IsLockHeld() { WRAPPER_NO_CONTRACT; - return (_lock.OwnedByCurrentThread() != FALSE); + return (_lock.LockTaken() != FALSE); } #endif // _DEBUG @@ -343,7 +348,7 @@ namespace // Determine the count of objects to return. SIZE_T objCountMax = 0; { - LockHolder lock(this); + ReaderLock lock(this); Iterator end = _hashMap.End(); for (Iterator curr = _hashMap.Begin(); curr != end; ++curr) { @@ -365,7 +370,7 @@ namespace SIZE_T objCount = 0; if (0 < objCountMax) { - LockHolder lock(this); + ReaderLock lock(this); Iterator end = _hashMap.End(); for (Iterator curr = _hashMap.Begin(); curr != end; ++curr) { @@ -823,11 +828,22 @@ namespace if (!uniqueInstance) { bool objectFound = false; + bool tryRemove = false; { - // Query the external object cache - ExtObjCxtCache::LockHolder lock(cache); + // Perform a quick look up to determine if we know of the object and if + // we need to perform a more expensive cleanup operation below. + ExtObjCxtCache::ReaderLock lock(cache); extObjCxt = cache->Find(cacheKey); + objectFound = extObjCxt != NULL; + tryRemove = objectFound && extObjCxt->IsSet(ExternalObjectContext::Flags_Detached); + } + if (tryRemove) + { + // Perform the slower cleanup operation that may be appropriate + // if the object still exists and has been detached. + ExtObjCxtCache::WriterLock lock(cache); + extObjCxt = cache->Find(cacheKey); objectFound = extObjCxt != NULL; if (objectFound && extObjCxt->IsSet(ExternalObjectContext::Flags_Detached)) { @@ -958,7 +974,7 @@ namespace else { // Attempt to insert the new context into the cache. - ExtObjCxtCache::LockHolder lock(cache); + ExtObjCxtCache::WriterLock lock(cache); extObjCxt = cache->FindOrAdd(cacheKey, resultHolder.GetContext()); } @@ -980,7 +996,7 @@ namespace { // Failed to set the context; one must already exist. // Remove from the cache above as well. - ExtObjCxtCache::LockHolder lock(cache); + ExtObjCxtCache::WriterLock lock(cache); cache->Remove(resultHolder.GetContext()); COMPlusThrow(kNotSupportedException); diff --git a/src/coreclr/vm/interoputil.cpp b/src/coreclr/vm/interoputil.cpp index d2dc577b30cf71..d9e5d43759626a 100644 --- a/src/coreclr/vm/interoputil.cpp +++ b/src/coreclr/vm/interoputil.cpp @@ -919,9 +919,9 @@ int InternalWideToAnsi(_In_reads_(iNumWideChars) LPCWSTR szWideString, int iNumW if (retval == 0) { - INSTALL_UNWIND_AND_CONTINUE_HANDLER; + INSTALL_UNWIND_AND_CONTINUE_HANDLER_EX; COMPlusThrowHR(HRESULT_FROM_WIN32(lastError)); - UNINSTALL_UNWIND_AND_CONTINUE_HANDLER; + UNINSTALL_UNWIND_AND_CONTINUE_HANDLER_EX(true); } if (DefaultCharUsed) @@ -952,9 +952,9 @@ int InternalWideToAnsi(_In_reads_(iNumWideChars) LPCWSTR szWideString, int iNumW if (retval == 0) { - INSTALL_UNWIND_AND_CONTINUE_HANDLER; + INSTALL_UNWIND_AND_CONTINUE_HANDLER_EX; COMPlusThrowHR(HRESULT_FROM_WIN32(lastError)); - UNINSTALL_UNWIND_AND_CONTINUE_HANDLER; + UNINSTALL_UNWIND_AND_CONTINUE_HANDLER_EX(true); } } diff --git a/src/coreclr/vm/jithelpers.cpp b/src/coreclr/vm/jithelpers.cpp index e225a6e3834b76..3156e9807ec7a5 100644 --- a/src/coreclr/vm/jithelpers.cpp +++ b/src/coreclr/vm/jithelpers.cpp @@ -56,6 +56,8 @@ #include "excep.h" #endif +#include "exinfo.h" + //======================================================================== // // This file contains implementation of all JIT helpers. The helpers are @@ -4214,6 +4216,39 @@ HCIMPLEND /*************************************************************/ +#ifdef FEATURE_EH_FUNCLETS +void ThrowNew(OBJECTREF oref) +{ + if (oref == 0) + DispatchManagedException(kNullReferenceException); + else + if (!IsException(oref->GetMethodTable())) + { + GCPROTECT_BEGIN(oref); + + WrapNonCompliantException(&oref); + + GCPROTECT_END(); + } + else + { // We know that the object derives from System.Exception + + // If the flag indicating ForeignExceptionRaise has been set, + // then do not clear the "_stackTrace" field of the exception object. + if (GetThread()->GetExceptionState()->IsRaisingForeignException()) + { + ((EXCEPTIONREF)oref)->SetStackTraceString(NULL); + } + else + { + ((EXCEPTIONREF)oref)->ClearStackTracePreservingRemoteStackTrace(); + } + } + + DispatchManagedException(oref); +} +#endif // FEATURE_EH_FUNCLETS + HCIMPL1(void, IL_Throw, Object* obj) { FCALL_CONTRACT; @@ -4232,6 +4267,13 @@ HCIMPL1(void, IL_Throw, Object* obj) g_ExceptionEIP = (LPVOID)__helperframe.GetReturnAddress(); #endif // defined(_DEBUG) && defined(TARGET_X86) +#ifdef FEATURE_EH_FUNCLETS + if (g_isNewExceptionHandlingEnabled) + { + ThrowNew(oref); + UNREACHABLE(); + } +#endif if (oref == 0) COMPlusThrow(kNullReferenceException); @@ -4267,6 +4309,31 @@ HCIMPLEND /*************************************************************/ +#ifdef FEATURE_EH_FUNCLETS +void RethrowNew() +{ + CONTEXT ctx = {}; + ctx.ContextFlags = CONTEXT_CONTROL | CONTEXT_INTEGER; + REGDISPLAY rd; + Thread *pThread = GetThread(); + + ExInfo *pActiveExInfo = pThread->GetExceptionState()->GetCurrentExInfo(); + + ExInfo exInfo(pThread, &ctx, &rd, ExKind::None); + + GCPROTECT_BEGIN(exInfo.m_exception); + PREPARE_NONVIRTUAL_CALLSITE(METHOD__EH__RH_RETHROW); + DECLARE_ARGHOLDER_ARRAY(args, 2); + + args[ARGNUM_0] = PTR_TO_ARGHOLDER(pActiveExInfo); + args[ARGNUM_1] = PTR_TO_ARGHOLDER(&exInfo); + + //Ex.RhRethrow(ref ExInfo activeExInfo, ref ExInfo exInfo) + CALL_MANAGED_METHOD_NORET(args) + GCPROTECT_END(); +} +#endif // FEATURE_EH_FUNCLETS + HCIMPL0(void, IL_Rethrow) { FCALL_CONTRACT; @@ -4275,6 +4342,14 @@ HCIMPL0(void, IL_Rethrow) HELPER_METHOD_FRAME_BEGIN_ATTRIB_NOPOLL(Frame::FRAME_ATTR_EXCEPTION); // Set up a frame +#ifdef FEATURE_EH_FUNCLETS + if (g_isNewExceptionHandlingEnabled) + { + RethrowNew(); + UNREACHABLE(); + } +#endif + OBJECTREF throwable = GetThread()->GetThrowable(); if (throwable != NULL) { @@ -4935,8 +5010,6 @@ HCIMPL0(void, JIT_PInvokeEndRarePath) thread->HandleThreadAbort(); HELPER_METHOD_FRAME_END(); - InlinedCallFrame* frame = (InlinedCallFrame*)thread->m_pFrame; - thread->m_pFrame->Pop(thread); END_PRESERVE_LAST_ERROR; @@ -6004,8 +6077,8 @@ HCIMPLEND // Helpers for scalable approximate counters // -// Here 13 means we count accurately up to 2^13 = 8192 and -// then start counting probabialistically. +// Here threshold = 13 means we count accurately up to 2^13 = 8192 and +// then start counting probabilistically. // // See docs/design/features/ScalableApproximateCounting.md // @@ -6016,22 +6089,22 @@ HCIMPL1(void, JIT_CountProfile32, volatile LONG* pCounter) LONG count = *pCounter; LONG delta = 1; + DWORD threshold = g_pConfig->TieredPGO_ScalableCountThreshold(); if (count > 0) { DWORD logCount = 0; BitScanReverse(&logCount, count); - if (logCount >= 13) + if (logCount >= threshold) { - delta = 1 << (logCount - 12); + delta = 1 << (logCount - (threshold - 1)); const unsigned rand = HandleHistogramProfileRand(); const bool update = (rand & (delta - 1)) == 0; if (!update) { return; } - } } @@ -6046,15 +6119,16 @@ HCIMPL1(void, JIT_CountProfile64, volatile LONG64* pCounter) LONG64 count = *pCounter; LONG64 delta = 1; + DWORD threshold = g_pConfig->TieredPGO_ScalableCountThreshold(); if (count > 0) { DWORD logCount = 0; BitScanReverse64(&logCount, count); - if (logCount >= 13) + if (logCount >= threshold) { - delta = 1LL << (logCount - 12); + delta = 1LL << (logCount - (threshold - 1)); const unsigned rand = HandleHistogramProfileRand(); const bool update = (rand & (delta - 1)) == 0; if (!update) diff --git a/src/coreclr/vm/jitinterface.cpp b/src/coreclr/vm/jitinterface.cpp index 3f5c8f1e7cc302..9471239e25a87a 100644 --- a/src/coreclr/vm/jitinterface.cpp +++ b/src/coreclr/vm/jitinterface.cpp @@ -92,11 +92,11 @@ __thread uint32_t t_GCThreadStaticBlocksSize; // #define JIT_TO_EE_TRANSITION() MAKE_CURRENT_THREAD_AVAILABLE_EX(m_pThread); \ - INSTALL_UNWIND_AND_CONTINUE_HANDLER_NO_PROBE; \ + INSTALL_UNWIND_AND_CONTINUE_HANDLER_EX; \ COOPERATIVE_TRANSITION_BEGIN(); \ #define EE_TO_JIT_TRANSITION() COOPERATIVE_TRANSITION_END(); \ - UNINSTALL_UNWIND_AND_CONTINUE_HANDLER_NO_PROBE; + UNINSTALL_UNWIND_AND_CONTINUE_HANDLER_EX(true); #define JIT_TO_EE_TRANSITION_LEAF() #define EE_TO_JIT_TRANSITION_LEAF() @@ -5982,10 +5982,7 @@ CorInfoHelpFunc CEEInfo::getCastingHelper(CORINFO_RESOLVED_TOKEN * pResolvedToke JIT_TO_EE_TRANSITION(); - bool fClassMustBeRestored; - result = getCastingHelperStatic(TypeHandle(pResolvedToken->hClass), fThrowing, &fClassMustBeRestored); - if (fClassMustBeRestored) - classMustBeLoadedBeforeCodeIsRun(pResolvedToken->hClass); + result = getCastingHelperStatic(TypeHandle(pResolvedToken->hClass), fThrowing); EE_TO_JIT_TRANSITION(); @@ -5993,15 +5990,13 @@ CorInfoHelpFunc CEEInfo::getCastingHelper(CORINFO_RESOLVED_TOKEN * pResolvedToke } /***********************************************************************/ -CorInfoHelpFunc CEEInfo::getCastingHelperStatic(TypeHandle clsHnd, bool fThrowing, bool * pfClassMustBeRestored) +CorInfoHelpFunc CEEInfo::getCastingHelperStatic(TypeHandle clsHnd, bool fThrowing) { STANDARD_VM_CONTRACT; // Slow helper is the default int helper = CORINFO_HELP_ISINSTANCEOFANY; - *pfClassMustBeRestored = false; - if (clsHnd == TypeHandle(g_pCanonMethodTableClass)) { // In shared code just use the catch-all helper for type variables, as the same @@ -6014,9 +6009,6 @@ CorInfoHelpFunc CEEInfo::getCastingHelperStatic(TypeHandle clsHnd, bool fThrowin else if (!clsHnd.IsTypeDesc() && clsHnd.AsMethodTable()->HasVariance()) { - // Casting to variant type requires the type to be fully loaded - *pfClassMustBeRestored = true; - _ASSERTE(helper == CORINFO_HELP_ISINSTANCEOFANY); } else @@ -6036,12 +6028,6 @@ CorInfoHelpFunc CEEInfo::getCastingHelperStatic(TypeHandle clsHnd, bool fThrowin else if (clsHnd.IsArray()) { - if (clsHnd.GetInternalCorElementType() != ELEMENT_TYPE_SZARRAY) - { - // Casting to multidimensional array type requires restored pointer to EEClass to fetch rank - *pfClassMustBeRestored = true; - } - // If it is an array, use the fast array helper helper = CORINFO_HELP_ISINSTANCEOFARRAY; } @@ -9541,7 +9527,7 @@ uint32_t CEEInfo::getRISCV64PassStructInRegisterFlags(CORINFO_CLASS_HANDLE cls) uint32_t size = STRUCT_NO_FLOAT_FIELD; #if defined(TARGET_RISCV64) - size = (uint32_t)MethodTable::GetRiscv64PassStructInRegisterFlags(cls); + size = (uint32_t)MethodTable::GetRiscV64PassStructInRegisterFlags(cls); #endif // TARGET_RISCV64 EE_TO_JIT_TRANSITION_LEAF(); @@ -12578,12 +12564,12 @@ CORJIT_FLAGS GetDebuggerCompileFlags(Module* pModule, CORJIT_FLAGS flags) flags.Set(CORJIT_FLAGS::CORJIT_FLAG_DEBUG_CODE); #endif // _DEBUG -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER if (pModule->IsEditAndContinueEnabled()) { flags.Set(CORJIT_FLAGS::CORJIT_FLAG_DEBUG_EnC); } -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER // Debug info is always tracked flags.Set(CORJIT_FLAGS::CORJIT_FLAG_DEBUG_INFO); @@ -14730,6 +14716,43 @@ void EECodeInfo::GetOffsetsFromUnwindInfo(ULONG* pRSPOffset, ULONG* pRBPOffset) } #undef kRBP +ULONG EECodeInfo::GetFrameOffsetFromUnwindInfo() +{ + WRAPPER_NO_CONTRACT; + + SUPPORTS_DAC; + + // moduleBase is a target address. + TADDR moduleBase = GetModuleBase(); + + DWORD unwindInfo = RUNTIME_FUNCTION__GetUnwindInfoAddress(GetFunctionEntry()); + + if ((unwindInfo & RUNTIME_FUNCTION_INDIRECT) != 0) + { + unwindInfo = RUNTIME_FUNCTION__GetUnwindInfoAddress(PTR_RUNTIME_FUNCTION(moduleBase + (unwindInfo & ~RUNTIME_FUNCTION_INDIRECT))); + } + + UNWIND_INFO * pInfo = GetUnwindInfoHelper(unwindInfo); + _ASSERTE((pInfo->Flags & UNW_FLAG_CHAININFO) == 0); + + // Either we are not using a frame pointer, or we are using rbp as the frame pointer. + if ( (pInfo->FrameRegister != 0) && (pInfo->FrameRegister != kRBP) ) + { + _ASSERTE(!"GetRbpOffset() - non-RBP frame pointer used, violating assumptions of the security stackwalk cache"); + DebugBreak(); + } + + ULONG frameOffset = pInfo->FrameOffset; +#ifdef UNIX_AMD64_ABI + if ((frameOffset == 15) && (pInfo->UnwindCode[0].UnwindOp == UWOP_SET_FPREG_LARGE)) + { + frameOffset = *(ULONG*)&pInfo->UnwindCode[1]; + } +#endif + + return frameOffset; +} + #if defined(_DEBUG) && defined(HAVE_GCCOVER) diff --git a/src/coreclr/vm/jitinterface.h b/src/coreclr/vm/jitinterface.h index b6e5eff8ff427d..49350450a3d625 100644 --- a/src/coreclr/vm/jitinterface.h +++ b/src/coreclr/vm/jitinterface.h @@ -430,7 +430,7 @@ class CEEInfo : public ICorJitInfo static unsigned getClassGClayoutStatic(TypeHandle th, BYTE* gcPtrs); static CorInfoHelpFunc getNewHelperStatic(MethodTable * pMT, bool * pHasSideEffects); static CorInfoHelpFunc getNewArrHelperStatic(TypeHandle clsHnd); - static CorInfoHelpFunc getCastingHelperStatic(TypeHandle clsHnd, bool fThrowing, bool * pfClassMustBeRestored); + static CorInfoHelpFunc getCastingHelperStatic(TypeHandle clsHnd, bool fThrowing); // Returns that compilation flags that are shared between JIT and NGen static CORJIT_FLAGS GetBaseCompileFlags(MethodDesc * ftn); diff --git a/src/coreclr/vm/loongarch64/asmconstants.h b/src/coreclr/vm/loongarch64/asmconstants.h index 38c383543bcb1a..cba342b8d58afb 100644 --- a/src/coreclr/vm/loongarch64/asmconstants.h +++ b/src/coreclr/vm/loongarch64/asmconstants.h @@ -254,5 +254,40 @@ ASMCONSTANTS_C_ASSERT(CallCountingStubData__TargetForMethod == offsetof(CallCoun #define CallCountingStubData__TargetForThresholdReached 0x10 ASMCONSTANTS_C_ASSERT(CallCountingStubData__TargetForThresholdReached == offsetof(CallCountingStubData, TargetForThresholdReached)) +#ifdef PROFILING_SUPPORTED +#define PROFILE_ENTER 1 +#define PROFILE_LEAVE 2 +#define PROFILE_TAILCALL 4 + +// NOTE: this should be 16-byte aligned as stack size. +#define SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA 0x140 +ASMCONSTANTS_C_ASSERT(SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA == (sizeof(PROFILE_PLATFORM_SPECIFIC_DATA)+8)) +ASMCONSTANTS_C_ASSERT((SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA & 0xf) == 0) + +#define PROFILE_PLATFORM_SPECIFIC_DATA__Fp 0 +#define PROFILE_PLATFORM_SPECIFIC_DATA__Pc 8 +#define PROFILE_PLATFORM_SPECIFIC_DATA__probeSp 16 +#define PROFILE_PLATFORM_SPECIFIC_DATA__profiledSp 24 +#define PROFILE_PLATFORM_SPECIFIC_DATA__hiddenArg 32 +#define PROFILE_PLATFORM_SPECIFIC_DATA__functionId 40 +#define PROFILE_PLATFORM_SPECIFIC_DATA__flags 48 +#define PROFILE_PLATFORM_SPECIFIC_DATA__argumentRegisters 56 +#define PROFILE_PLATFORM_SPECIFIC_DATA__floatArgumentRegisters 120 + +#define ASMCONSTANTS_C_ASSERT_OFFSET(type, field) \ + ASMCONSTANTS_C_ASSERT(type##__##field == offsetof(type, field)) +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, Fp) +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, Pc) +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, probeSp) +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, profiledSp) +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, hiddenArg) +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, functionId) +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, flags) +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, argumentRegisters) +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, floatArgumentRegisters) +#undef ASMCONSTANTS_C_ASSERT_OFFSET + +#endif // PROFILING_SUPPORTED + #undef ASMCONSTANTS_RUNTIME_ASSERT #undef ASMCONSTANTS_C_ASSERT diff --git a/src/coreclr/vm/loongarch64/asmhelpers.S b/src/coreclr/vm/loongarch64/asmhelpers.S index bd7edee56e2fee..56fb0c0b9247a8 100644 --- a/src/coreclr/vm/loongarch64/asmhelpers.S +++ b/src/coreclr/vm/loongarch64/asmhelpers.S @@ -631,6 +631,46 @@ LEAF_ENTRY JIT_GetSharedGCStaticBase_SingleAppDomain, _TEXT bl JIT_GetSharedGCStaticBase_Helper LEAF_END JIT_GetSharedGCStaticBase_SingleAppDomain, _TEXT +// Make sure the `FaultingExceptionFrame_StackAlloc` is 16-byte aligned. +#define FaultingExceptionFrame_StackAlloc (SIZEOF__GSCookie + SIZEOF__FaultingExceptionFrame + 0x8) +#define FaultingExceptionFrame_FrameOffset SIZEOF__GSCookie + +.macro GenerateRedirectedStubWithFrame stub, target + + // + // This is the primary function to which execution will be redirected to. + // + NESTED_ENTRY \stub, _TEXT, NoHandler + + // + // IN: ra: original IP before redirect + // + + PROLOG_SAVE_REG_PAIR_INDEXED 22, 1, 16 + + // alloc stack for FaultingExceptionFrame. + addi.d $sp, $sp, -FaultingExceptionFrame_StackAlloc + + // stack must be 16 bytes aligned + CHECK_STACK_ALIGNMENT + + // Save pointer to FEF for GetFrameFromRedirectedStubStackFrame + addi.d $a0, $sp, FaultingExceptionFrame_FrameOffset + + // Prepare to initialize to NULL + st.d $r0, $a0, 0 // Initialize vtbl (it is not strictly necessary) + st.d $r0, $a0, FaultingExceptionFrame__m_fFilterExecuted // Initialize BOOL for personality routine + + bl C_FUNC(\target) + // Target should not return. + EMIT_BREAKPOINT + + NESTED_END \stub, _TEXT + +.endm + +GenerateRedirectedStubWithFrame RedirectForThreadAbort, ThrowControlForThread + // ------------------------------------------------------------------ // ResolveWorkerChainLookupAsmStub // @@ -1026,12 +1066,6 @@ LEAF_ENTRY JIT_ProfilerEnterLeaveTailcallStub, _TEXT jirl $r0, $ra, 0 LEAF_END JIT_ProfilerEnterLeaveTailcallStub, _TEXT -// ------------------------------------------------------------------ -#define PROFILE_ENTER 1 -#define PROFILE_LEAVE 2 -#define PROFILE_TAILCALL 4 -#define SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA 272 - // ------------------------------------------------------------------ .macro GenerateProfileHelper helper, flags NESTED_ENTRY \helper\()Naked, _TEXT, NoHandler @@ -1044,27 +1078,27 @@ NESTED_ENTRY \helper\()Naked, _TEXT, NoHandler // Values of $a0-$a7, $fa0-$fa7, $fp are preserved. // Values of other volatile registers are not preserved. - // $fp,$ra + // $fp,$ra PROLOG_SAVE_REG_PAIR_INDEXED 22, 1, SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA // Allocate space and save Fp, Pc. - SAVE_ARGUMENT_REGISTERS $sp, 16 // Save $t0 and argument registers ($a0-$a7). - st.d $zero, $sp, 88 // Clear functionId. - SAVE_FLOAT_ARGUMENT_REGISTERS $sp, 96 // Save floating-point/SIMD registers ($fa0-$fa7). - addi.d $t3, $fp, SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA // Compute probeSp - initial value of Sp on entry to the helper. - st.d $t3, $sp, 224 // Save probeSp. - st.d $t2, $sp, 232 // Save profiledSp. - - st.d $zero, $sp, 240 // Clear hiddenArg. - addi.d $t3, $zero, \flags - st.w $t3, $sp, 248 // Save flags. - st.d $zero, $sp, 256 // clear unused field. - - ori $a1, $t1, 0 - ori $a2, $sp, 0 + + SAVE_ARGUMENT_REGISTERS $sp, PROFILE_PLATFORM_SPECIFIC_DATA__argumentRegisters + SAVE_FLOAT_ARGUMENT_REGISTERS $sp, PROFILE_PLATFORM_SPECIFIC_DATA__floatArgumentRegisters + st.d $zero, $sp, PROFILE_PLATFORM_SPECIFIC_DATA__functionId + addi.d $t3, $sp, SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA // Compute probeSp - initial value of Sp on entry to the helper. + st.d $t3, $sp, PROFILE_PLATFORM_SPECIFIC_DATA__probeSp + st.d $t2, $sp, PROFILE_PLATFORM_SPECIFIC_DATA__profiledSp + + st.d $zero, $sp, PROFILE_PLATFORM_SPECIFIC_DATA__hiddenArg + addi.w $t3, $zero, \flags + st.w $t3, $sp, PROFILE_PLATFORM_SPECIFIC_DATA__flags + + ori $a0, $t1, 0 + ori $a1, $sp, 0 bl C_FUNC(\helper) - RESTORE_ARGUMENT_REGISTERS $sp, 16 // Restore $t0 and argument registers. - RESTORE_FLOAT_ARGUMENT_REGISTERS $sp, 96 // Restore floating-point/SIMD registers. - // $fp, $ra + RESTORE_ARGUMENT_REGISTERS $sp, PROFILE_PLATFORM_SPECIFIC_DATA__argumentRegisters + RESTORE_FLOAT_ARGUMENT_REGISTERS $sp, PROFILE_PLATFORM_SPECIFIC_DATA__floatArgumentRegisters + // $fp, $ra EPILOG_RESTORE_REG_PAIR_INDEXED 22, 1, SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA EPILOG_RETURN diff --git a/src/coreclr/vm/loongarch64/calldescrworkerloongarch64.S b/src/coreclr/vm/loongarch64/calldescrworkerloongarch64.S index 66373c23e79d45..4c7069c40eff08 100644 --- a/src/coreclr/vm/loongarch64/calldescrworkerloongarch64.S +++ b/src/coreclr/vm/loongarch64/calldescrworkerloongarch64.S @@ -72,6 +72,7 @@ LOCAL_LABEL(NoFloatingPoint): // call pTarget jirl $ra, $t4, 0 +LOCAL_LABEL(CallDescrWorkerInternalReturnAddress): ld.w $a3, $s0, CallDescrData__fpReturnSize @@ -205,4 +206,8 @@ LOCAL_LABEL(ReturnDone): EPILOG_RESTORE_REG 23, 16 EPILOG_RESTORE_REG_PAIR_INDEXED 22, 1, 0x20 jirl $r0, $ra, 0 + +PATCH_LABEL CallDescrWorkerInternalReturnAddressOffset + .quad LOCAL_LABEL(CallDescrWorkerInternalReturnAddress) - C_FUNC(CallDescrWorkerInternal) + NESTED_END CallDescrWorkerInternal, _TEXT diff --git a/src/coreclr/vm/loongarch64/cgencpu.h b/src/coreclr/vm/loongarch64/cgencpu.h index 6a11a3a57b756f..6979fa11a96759 100644 --- a/src/coreclr/vm/loongarch64/cgencpu.h +++ b/src/coreclr/vm/loongarch64/cgencpu.h @@ -114,15 +114,14 @@ struct CalleeSavedRegisters { // will probably have to communicate this back to the PromoteCallerStack // routine to avoid a double promotion. //-------------------------------------------------------------------- +#define NUM_ARGUMENT_REGISTERS 8 typedef DPTR(struct ArgumentRegisters) PTR_ArgumentRegisters; struct ArgumentRegisters { - INT64 a[8]; // a0 ....a7 + INT64 a[NUM_ARGUMENT_REGISTERS]; // a0 ....a7 }; -#define NUM_ARGUMENT_REGISTERS 8 #define ARGUMENTREGISTERS_SIZE sizeof(ArgumentRegisters) - //-------------------------------------------------------------------- // This represents the floating point argument registers which are saved // as part of the NegInfo for a FramedMethodFrame. Note that these @@ -130,13 +129,34 @@ struct ArgumentRegisters { // C++ helpers will need to preserve the values in these volatile // registers. //-------------------------------------------------------------------- +#define NUM_FLOAT_ARGUMENT_REGISTERS 8 typedef DPTR(struct FloatArgumentRegisters) PTR_FloatArgumentRegisters; struct FloatArgumentRegisters { - //TODO: not supports LOONGARCH-SIMD. - double f[8]; // f0-f7 + double f[NUM_FLOAT_ARGUMENT_REGISTERS]; // fa0-fa7 }; -#define NUM_FLOAT_ARGUMENT_REGISTERS 8 +#ifdef PROFILING_SUPPORTED +//********************************************************************** +// Profiling +//********************************************************************** + +typedef struct _PROFILE_PLATFORM_SPECIFIC_DATA +{ + void* Fp; + void* Pc; + void* probeSp; + void* profiledSp; + void* hiddenArg; + FunctionID functionId; + UINT32 flags; + ArgumentRegisters argumentRegisters; + FloatArgumentRegisters floatArgumentRegisters; + // Scratch space to reconstruct struct passed two registers: + // one float register and one general register. Including the return args. + BYTE buffer[sizeof(ArgumentRegisters) + sizeof(FloatArgumentRegisters)]; +} PROFILE_PLATFORM_SPECIFIC_DATA, *PPROFILE_PLATFORM_SPECIFIC_DATA; + +#endif // PROFILING_SUPPORTED //********************************************************************** // Exception handling diff --git a/src/coreclr/vm/loongarch64/profiler.cpp b/src/coreclr/vm/loongarch64/profiler.cpp index 4668e7b9d9d73d..2afa6bf836ea4d 100644 --- a/src/coreclr/vm/loongarch64/profiler.cpp +++ b/src/coreclr/vm/loongarch64/profiler.cpp @@ -5,29 +5,7 @@ #ifdef PROFILING_SUPPORTED #include "proftoeeinterfaceimpl.h" - -#define PROFILE_ENTER 1 -#define PROFILE_LEAVE 2 -#define PROFILE_TAILCALL 4 - -// Scratch space to store HFA return values (max 16 bytes) -#define PROFILE_PLATFORM_SPECIFIC_DATA_BUFFER_SIZE 16 - -typedef struct _PROFILE_PLATFORM_SPECIFIC_DATA -{ - void* Fp; - void* Pc; - void* x8; - ArgumentRegisters argumentRegisters; - FunctionID functionId; - FloatArgumentRegisters floatArgumentRegisters; - void* probeSp; - void* profiledSp; - void* hiddenArg; - UINT32 flags; - UINT32 unused; - BYTE buffer[PROFILE_PLATFORM_SPECIFIC_DATA_BUFFER_SIZE]; -} PROFILE_PLATFORM_SPECIFIC_DATA, *PPROFILE_PLATFORM_SPECIFIC_DATA; +#include "asmconstants.h" UINT_PTR ProfileGetIPFromPlatformSpecificHandle(void* pPlatformSpecificHandle) { @@ -57,6 +35,7 @@ ProfileArgIterator::ProfileArgIterator(MetaSig* pSig, void* pPlatformSpecificHan _ASSERTE(pPlatformSpecificHandle != nullptr); m_handle = pPlatformSpecificHandle; + m_bufferPos = 0; PROFILE_PLATFORM_SPECIFIC_DATA* pData = reinterpret_cast(pPlatformSpecificHandle); #ifdef _DEBUG @@ -90,7 +69,7 @@ ProfileArgIterator::ProfileArgIterator(MetaSig* pSig, void* pPlatformSpecificHan } else { - // On ARM64 the generic instantiation parameter comes after the optional "this" pointer. + // On LoongArch64 the generic instantiation parameter comes after the optional "this" pointer. if (m_argIterator.HasThis()) { pData->hiddenArg = (void*)pData->argumentRegisters.a[1]; @@ -139,12 +118,41 @@ LPVOID ProfileArgIterator::GetNextArgAddr() return nullptr; } + LPVOID pArg = nullptr; + if (TransitionBlock::IsFloatArgumentRegisterOffset(argOffset)) { - return (LPBYTE)&pData->floatArgumentRegisters + (argOffset - TransitionBlock::GetOffsetOfFloatArgumentRegisters()); - } + pArg = (LPBYTE)&pData->floatArgumentRegisters + (argOffset - TransitionBlock::GetOffsetOfFloatArgumentRegisters()); - LPVOID pArg = nullptr; + ArgLocDesc* pArgLocDesc = m_argIterator.GetArgLocDescForStructInRegs(); + + if (pArgLocDesc) + { + if (pArgLocDesc->m_cFloatReg == 1) + { + UINT32 bufferPos = m_bufferPos; + + UINT64* dst = (UINT64*)&pData->buffer[bufferPos]; + m_bufferPos += 16; + if (pArgLocDesc->m_structFields & STRUCT_FLOAT_FIELD_FIRST) + { + *dst++ = *(UINT64*)pArg; + *dst = pData->argumentRegisters.a[pArgLocDesc->m_idxGenReg]; + } + else + { + _ASSERTE(pArgLocDesc->m_structFields & STRUCT_FLOAT_FIELD_SECOND); + *dst++ = pData->argumentRegisters.a[pArgLocDesc->m_idxGenReg]; + *dst = *(UINT64*)pArg; + } + return (LPBYTE)&pData->buffer[bufferPos]; + } + + _ASSERTE(pArgLocDesc->m_cFloatReg == 2); + } + + return pArg; + } if (TransitionBlock::IsArgumentRegisterOffset(argOffset)) { @@ -226,66 +234,39 @@ LPVOID ProfileArgIterator::GetReturnBufferAddr(void) if (m_argIterator.HasRetBuffArg()) { - if ((pData->flags & PROFILE_ENTER) != 0) - { - return (LPVOID)pData->x8; - } - else - { - // On ARM64 there is no requirement for the method to preserve the value stored in x8. - // In order to workaround this JIT will explicitly return the return buffer address in x0. - _ASSERTE((pData->flags & PROFILE_LEAVE) != 0); - return (LPVOID)pData->argumentRegisters.a[0]; - } + return (LPVOID)pData->argumentRegisters.a[0]; } UINT fpReturnSize = m_argIterator.GetFPReturnSize(); + if (fpReturnSize != 0) { - TypeHandle thReturnValueType; - m_argIterator.GetSig()->GetReturnTypeNormalized(&thReturnValueType); - if (!thReturnValueType.IsNull() && thReturnValueType.IsHFA()) + if ((fpReturnSize & (UINT)STRUCT_FLOAT_FIELD_ONLY_ONE) || (fpReturnSize & (UINT)STRUCT_FLOAT_FIELD_ONLY_TWO)) { - UINT hfaFieldSize = fpReturnSize / 4; - UINT totalSize = m_argIterator.GetSig()->GetReturnTypeSize(); - _ASSERTE(totalSize % hfaFieldSize == 0); - _ASSERTE(totalSize <= 16); + return &pData->floatArgumentRegisters.f[0]; + } + else + { + // If the return type is a structure including floating types and return by floating register. + // As we shared the scratch space, before calling the GetReturnBufferAddr, + // Make sure within the PROFILE_LEAVE stage!!! + _ASSERTE((pData->flags & PROFILE_LEAVE) != 0); - BYTE *dest = pData->buffer; - for (UINT floatRegIdx = 0; floatRegIdx < totalSize / hfaFieldSize; ++floatRegIdx) + // using the tail 16 bytes for return structure. + UINT64* dst = (UINT64*)&pData->buffer[sizeof(pData->buffer) - 16]; + if (fpReturnSize & (UINT)STRUCT_FLOAT_FIELD_FIRST) { - if (hfaFieldSize == 4) - { - *(UINT32*)dest = *(UINT32*)&pData->floatArgumentRegisters.f[floatRegIdx]; - dest += 4; - } - else if (hfaFieldSize == 8) - { - *(UINT64*)dest = *(UINT64*)&pData->floatArgumentRegisters.f[floatRegIdx]; - dest += 8; - } - else - { - _ASSERTE(!"unimplemented on LOONGARCH yet!"); -#if 0 - _ASSERTE(hfaFieldSize == 16); - *(NEON128*)dest = pData->floatArgumentRegisters.f[floatRegIdx]; - dest += 16; -#endif - } - - if (floatRegIdx > 8) - { - // There's only space for 8 arguments in buffer - _ASSERTE(FALSE); - break; - } + *(double*)dst = pData->floatArgumentRegisters.f[0]; + *(dst + 1) = pData->argumentRegisters.a[0]; } - - return pData->buffer; + else + { + _ASSERTE(fpReturnSize & (UINT)STRUCT_FLOAT_FIELD_SECOND); + *dst = pData->argumentRegisters.a[0]; + *(double*)(dst + 1) = pData->floatArgumentRegisters.f[0]; + } + return dst; } - - return &pData->floatArgumentRegisters.f[0]; } if (!m_argIterator.GetSig()->IsReturnTypeVoid()) diff --git a/src/coreclr/vm/loongarch64/stubs.cpp b/src/coreclr/vm/loongarch64/stubs.cpp index d39901c086cb19..d0ab7f832cccf4 100644 --- a/src/coreclr/vm/loongarch64/stubs.cpp +++ b/src/coreclr/vm/loongarch64/stubs.cpp @@ -952,12 +952,6 @@ PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(T_CONTEXT * pContext) return *ppContext; } -void RedirectForThreadAbort() -{ - // ThreadAbort is not supported in .net core - throw "NYI"; -} - #if !defined(DACCESS_COMPILE) FaultingExceptionFrame *GetFrameFromRedirectedStubStackFrame (DISPATCHER_CONTEXT *pDispatcherContext) { diff --git a/src/coreclr/vm/loongarch64/unixstubs.cpp b/src/coreclr/vm/loongarch64/unixstubs.cpp index d51902a949f26c..878d5b003686b6 100644 --- a/src/coreclr/vm/loongarch64/unixstubs.cpp +++ b/src/coreclr/vm/loongarch64/unixstubs.cpp @@ -2,11 +2,3 @@ // The .NET Foundation licenses this file to you under the MIT license. #include "common.h" - -extern "C" -{ - void RedirectForThrowControl() - { - PORTABILITY_ASSERT("Implement for PAL"); - } -}; diff --git a/src/coreclr/vm/memberload.cpp b/src/coreclr/vm/memberload.cpp index 7192bd3a53ec1c..a329702e3a56c0 100644 --- a/src/coreclr/vm/memberload.cpp +++ b/src/coreclr/vm/memberload.cpp @@ -693,7 +693,7 @@ FieldDesc* MemberLoader::GetFieldDescFromFieldDef(Module *pModule, pFD->GetApproxEnclosingMethodTable()->CheckRestore(); -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER if (pModule->IsEditAndContinueEnabled() && pFD->IsEnCNew()) { EnCFieldDesc *pEnCFD = (EnCFieldDesc*)pFD; @@ -705,7 +705,7 @@ FieldDesc* MemberLoader::GetFieldDescFromFieldDef(Module *pModule, pEnCFD->Fixup(fieldDef); } } -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER return pFD; } @@ -1167,7 +1167,7 @@ MemberLoader::FindMethod( } } -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER // In the event the method wasn't found and the current module has // EnC enabled, try the slow path and go through all available methods. if (md == NULL @@ -1202,7 +1202,7 @@ MemberLoader::FindMethod( } } } -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER RETURN md; } @@ -1566,7 +1566,7 @@ MemberLoader::FindField(MethodTable* pMT, LPCUTF8 pszName, PCCOR_SIGNATURE pSign return pFD; } -#if defined(EnC_SUPPORTED) && !defined(DACCESS_COMPILE) +#if defined(FEATURE_METADATA_UPDATER) && !defined(DACCESS_COMPILE) if (pModule != NULL && pModule->IsFullModule() && ((Module*)pModule)->IsEditAndContinueEnabled()) @@ -1611,7 +1611,7 @@ MemberLoader::FindField(MethodTable* pMT, LPCUTF8 pszName, PCCOR_SIGNATURE pSign return pCurrentFD; } } -#endif // defined(EnC_SUPPORTED) && !defined(DACCESS_COMPILE) +#endif // defined(FEATURE_METADATA_UPDATER) && !defined(DACCESS_COMPILE) return NULL; } diff --git a/src/coreclr/vm/metasig.h b/src/coreclr/vm/metasig.h index 6adf044a0170df..dc2173f0440211 100644 --- a/src/coreclr/vm/metasig.h +++ b/src/coreclr/vm/metasig.h @@ -182,6 +182,9 @@ DEFINE_METASIG(SM(Obj_IntPtr_RetVoid, j I, v)) DEFINE_METASIG(SM(Obj_IntPtr_RetBool, j I, F)) DEFINE_METASIG(SM(Obj_IntPtr_IntPtr_Int_RetIntPtr, j I I i, I)) DEFINE_METASIG(SM(IntPtr_IntPtr_RefIntPtr_RetObj, I I r(I), j)) +DEFINE_METASIG_T(SM(Obj_RefExInfo_RetVoid, j r(g(EXINFO)), v)) +DEFINE_METASIG_T(SM(UInt_RefExInfo_RetVoid, K r(g(EXINFO)), v)) +DEFINE_METASIG_T(SM(RefExInfo_RefExInfo_RetVoid, r(g(EXINFO)) r(g(EXINFO)), v)) #ifdef FEATURE_COMINTEROP DEFINE_METASIG(SM(Obj_IntPtr_RefIntPtr_RefBool_RetIntPtr, j I r(I) r(F), I)) DEFINE_METASIG(SM(Obj_IntPtr_RefIntPtr_RetIntPtr, j I r(I), I)) diff --git a/src/coreclr/vm/method.cpp b/src/coreclr/vm/method.cpp index 29910d6cb4c1c3..e34ee89ac8ae58 100644 --- a/src/coreclr/vm/method.cpp +++ b/src/coreclr/vm/method.cpp @@ -3038,8 +3038,8 @@ bool MethodDesc::DetermineAndSetIsEligibleForTieredCompilation() // Functional requirement - These methods have no IL that could be optimized !IsWrapperStub() && - // Policy - Generating optimized code is not disabled - !IsJitOptimizationDisabledForSpecificMethod()) + // Functions with NoOptimization or AggressiveOptimization don't participate in tiering + !IsJitOptimizationLevelRequested()) { m_wFlags3AndTokenRemainder |= enum_flag3_IsEligibleForTieredCompilation; _ASSERTE(IsVersionable()); @@ -3065,6 +3065,17 @@ bool MethodDesc::IsJitOptimizationDisabledForSpecificMethod() return (!IsNoMetadata() && IsMiNoOptimization(GetImplAttrs())); } +bool MethodDesc::IsJitOptimizationLevelRequested() +{ + if (IsNoMetadata()) + { + return false; + } + + const DWORD attrs = GetImplAttrs(); + return IsMiNoOptimization(attrs) || IsMiAggressiveOptimization(attrs); +} + bool MethodDesc::IsJitOptimizationDisabledForAllMethodsInChunk() { WRAPPER_NO_CONTRACT; diff --git a/src/coreclr/vm/method.hpp b/src/coreclr/vm/method.hpp index 12b3c86e0f7414..411129c6c6393e 100644 --- a/src/coreclr/vm/method.hpp +++ b/src/coreclr/vm/method.hpp @@ -1124,6 +1124,7 @@ class MethodDesc bool IsJitOptimizationDisabled(); bool IsJitOptimizationDisabledForAllMethodsInChunk(); bool IsJitOptimizationDisabledForSpecificMethod(); + bool IsJitOptimizationLevelRequested(); private: // This function is not intended to be called in most places, and is named as such to discourage calling it accidentally @@ -1682,7 +1683,7 @@ class MethodDesc m_wFlags |= mdcHasNativeCodeSlot; } -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER inline BOOL IsEnCAddedMethod() { LIMITED_METHOD_DAC_CONTRACT; @@ -1700,7 +1701,7 @@ class MethodDesc LIMITED_METHOD_DAC_CONTRACT; return FALSE; } -#endif // !EnC_SUPPORTED +#endif // !FEATURE_METADATA_UPDATER inline BOOL IsIntrinsic() { diff --git a/src/coreclr/vm/methodtable.cpp b/src/coreclr/vm/methodtable.cpp index 1016a80971b7a0..32fb17a629d80c 100644 --- a/src/coreclr/vm/methodtable.cpp +++ b/src/coreclr/vm/methodtable.cpp @@ -3405,7 +3405,7 @@ int MethodTable::GetLoongArch64PassStructInRegisterFlags(CORINFO_CLASS_HANDLE cl } else if (pFieldStart[0].GetSize() == 8) { - _ASSERTE(pMethodTable->GetNativeSize() == 8); + _ASSERTE((pMethodTable->GetNativeSize() == 8) || (pMethodTable->GetNativeSize() == 16)); size = STRUCT_FIRST_FIELD_DOUBLE; } } @@ -3534,7 +3534,7 @@ int MethodTable::GetLoongArch64PassStructInRegisterFlags(CORINFO_CLASS_HANDLE cl #if defined(TARGET_RISCV64) -bool MethodTable::IsRiscv64OnlyOneField(MethodTable * pMT) +bool MethodTable::IsRiscV64OnlyOneField(MethodTable * pMT) { TypeHandle th(pMT); @@ -3568,7 +3568,7 @@ bool MethodTable::IsRiscv64OnlyOneField(MethodTable * pMT) pMethodTable = pFieldStart->GetApproxFieldTypeHandleThrowing().GetMethodTable(); if (pMethodTable->GetNumIntroducedInstanceFields() == 1) { - ret = IsRiscv64OnlyOneField(pMethodTable); + ret = IsRiscV64OnlyOneField(pMethodTable); } } } @@ -3621,7 +3621,7 @@ bool MethodTable::IsRiscv64OnlyOneField(MethodTable * pMT) if (nfc == NativeFieldCategory::NESTED) { pMethodTable = pNativeFieldDescs->GetNestedNativeMethodTable(); - ret = IsRiscv64OnlyOneField(pMethodTable); + ret = IsRiscV64OnlyOneField(pMethodTable); } else if (nfc != NativeFieldCategory::ILLEGAL) { @@ -3640,7 +3640,7 @@ bool MethodTable::IsRiscv64OnlyOneField(MethodTable * pMT) return ret; } -int MethodTable::GetRiscv64PassStructInRegisterFlags(CORINFO_CLASS_HANDLE cls) +int MethodTable::GetRiscV64PassStructInRegisterFlags(CORINFO_CLASS_HANDLE cls) { TypeHandle th(cls); @@ -3679,7 +3679,7 @@ int MethodTable::GetRiscv64PassStructInRegisterFlags(CORINFO_CLASS_HANDLE cls) else if (fieldType == ELEMENT_TYPE_VALUETYPE) { pMethodTable = pFieldStart->GetApproxFieldTypeHandleThrowing().GetMethodTable(); - size = GetRiscv64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable); + size = GetRiscV64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable); } } else if (numIntroducedFields == 2) @@ -3722,9 +3722,9 @@ int MethodTable::GetRiscv64PassStructInRegisterFlags(CORINFO_CLASS_HANDLE cls) else if (fieldType == ELEMENT_TYPE_VALUETYPE) { pMethodTable = pFieldFirst->GetApproxFieldTypeHandleThrowing().GetMethodTable(); - if (IsRiscv64OnlyOneField(pMethodTable)) + if (IsRiscV64OnlyOneField(pMethodTable)) { - size = GetRiscv64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable); + size = GetRiscV64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable); if ((size & STRUCT_FLOAT_FIELD_ONLY_ONE) != 0) { size = pFieldFirst[0].GetSize() == 8 ? STRUCT_FIRST_FIELD_DOUBLE : STRUCT_FLOAT_FIELD_FIRST; @@ -3778,9 +3778,9 @@ int MethodTable::GetRiscv64PassStructInRegisterFlags(CORINFO_CLASS_HANDLE cls) else if (fieldType == ELEMENT_TYPE_VALUETYPE) { pMethodTable = pFieldSecond[0].GetApproxFieldTypeHandleThrowing().GetMethodTable(); - if (IsRiscv64OnlyOneField(pMethodTable)) + if (IsRiscV64OnlyOneField(pMethodTable)) { - int size2 = GetRiscv64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable); + int size2 = GetRiscV64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable); if ((size2 & STRUCT_FLOAT_FIELD_ONLY_ONE) != 0) { if (pFieldSecond[0].GetSize() == 8) @@ -3901,7 +3901,7 @@ int MethodTable::GetRiscv64PassStructInRegisterFlags(CORINFO_CLASS_HANDLE cls) if (nfc == NativeFieldCategory::NESTED) { pMethodTable = pNativeFieldDescs->GetNestedNativeMethodTable(); - size = GetRiscv64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable); + size = GetRiscV64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable); return size; } else if (nfc == NativeFieldCategory::FLOAT) @@ -3985,13 +3985,13 @@ int MethodTable::GetRiscv64PassStructInRegisterFlags(CORINFO_CLASS_HANDLE cls) MethodTable* pMethodTable2 = pNativeFieldDescs->GetNestedNativeMethodTable(); - if (!IsRiscv64OnlyOneField(pMethodTable2)) + if (!IsRiscV64OnlyOneField(pMethodTable2)) { size = STRUCT_NO_FLOAT_FIELD; goto _End_arg; } - size = GetRiscv64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable2); + size = GetRiscV64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable2); if ((size & STRUCT_FLOAT_FIELD_ONLY_ONE) != 0) { if (pFieldStart->GetSize() == 8) @@ -4021,7 +4021,7 @@ int MethodTable::GetRiscv64PassStructInRegisterFlags(CORINFO_CLASS_HANDLE cls) } else if (pFieldStart[0].GetSize() == 8) { - _ASSERTE(pMethodTable->GetNativeSize() == 8); + _ASSERTE((pMethodTable->GetNativeSize() == 8) || (pMethodTable->GetNativeSize() == 16)); size = STRUCT_FIRST_FIELD_DOUBLE; } } @@ -4059,6 +4059,12 @@ int MethodTable::GetRiscv64PassStructInRegisterFlags(CORINFO_CLASS_HANDLE cls) { size |= STRUCT_SECOND_FIELD_SIZE_IS8; } + + // Pass with two integer registers in `struct {int a, int b, float/double c}` cases + if ((size | STRUCT_FIRST_FIELD_SIZE_IS8 | STRUCT_FLOAT_FIELD_SECOND) == size) + { + size = STRUCT_NO_FLOAT_FIELD; + } } else if (fieldType == ELEMENT_TYPE_VALUETYPE) { @@ -4075,13 +4081,13 @@ int MethodTable::GetRiscv64PassStructInRegisterFlags(CORINFO_CLASS_HANDLE cls) MethodTable* pMethodTable2 = pNativeFieldDescs[1].GetNestedNativeMethodTable(); - if (!IsRiscv64OnlyOneField(pMethodTable2)) + if (!IsRiscV64OnlyOneField(pMethodTable2)) { size = STRUCT_NO_FLOAT_FIELD; goto _End_arg; } - if ((GetRiscv64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable2) & STRUCT_FLOAT_FIELD_ONLY_ONE) != 0) + if ((GetRiscV64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable2) & STRUCT_FLOAT_FIELD_ONLY_ONE) != 0) { if (pFieldStart[1].GetSize() == 4) { @@ -4187,8 +4193,9 @@ void MethodTable::AllocateRegularStaticBox(FieldDesc* pField, Object** boxedStat THROWS; GC_TRIGGERS; MODE_COOPERATIVE; - CONTRACTL_END; } + CONTRACTL_END + _ASSERT(pField->IsStatic() && !pField->IsSpecialStatic() && pField->IsByValue()); // Static fields are not pinned in collectible types so we need to protect the address @@ -4207,7 +4214,7 @@ void MethodTable::AllocateRegularStaticBox(FieldDesc* pField, Object** boxedStat { LOG((LF_CLASSLOADER, LL_INFO10000, "\tInstantiating static of type %s\n", pFieldMT->GetDebugClassName())); const bool canBeFrozen = !pFieldMT->ContainsPointers() && !Collectible(); - OBJECTREF obj = AllocateStaticBox(pFieldMT, hasFixedAddr, NULL, canBeFrozen); + OBJECTREF obj = AllocateStaticBox(pFieldMT, hasFixedAddr, canBeFrozen); SetObjectReference((OBJECTREF*)(boxedStaticHandle), obj); } } @@ -4215,15 +4222,15 @@ void MethodTable::AllocateRegularStaticBox(FieldDesc* pField, Object** boxedStat } //========================================================================================== -OBJECTREF MethodTable::AllocateStaticBox(MethodTable* pFieldMT, BOOL fPinned, OBJECTHANDLE* pHandle, bool canBeFrozen) +OBJECTREF MethodTable::AllocateStaticBox(MethodTable* pFieldMT, BOOL fPinned, bool canBeFrozen) { CONTRACTL { THROWS; GC_TRIGGERS; MODE_COOPERATIVE; - CONTRACTL_END; } + CONTRACTL_END _ASSERTE(pFieldMT->IsValueType()); @@ -4235,7 +4242,6 @@ OBJECTREF MethodTable::AllocateStaticBox(MethodTable* pFieldMT, BOOL fPinned, OB { // In case if we don't plan to collect this handle we may try to allocate it on FOH _ASSERT(!pFieldMT->ContainsPointers()); - _ASSERT(pHandle == nullptr); FrozenObjectHeapManager* foh = SystemDomain::GetFrozenObjectHeapManager(); obj = ObjectToOBJECTREF(foh->TryAllocateObject(pFieldMT, pFieldMT->GetBaseSize())); // obj can be null in case if struct is huge (>64kb) @@ -4245,25 +4251,7 @@ OBJECTREF MethodTable::AllocateStaticBox(MethodTable* pFieldMT, BOOL fPinned, OB } } - obj = AllocateObject(pFieldMT); - - // Pin the object if necessary - if (fPinned) - { - LOG((LF_CLASSLOADER, LL_INFO10000, "\tSTATICS:Pinning static (VT fixed address attribute) of type %s\n", pFieldMT->GetDebugClassName())); - OBJECTHANDLE oh = GetAppDomain()->CreatePinningHandle(obj); - if (pHandle) - { - *pHandle = oh; - } - } - else - { - if (pHandle) - { - *pHandle = NULL; - } - } + obj = AllocateObject(pFieldMT, fPinned ? GC_ALLOC_PINNED_OBJECT_HEAP : GC_ALLOC_NO_FLAGS); return obj; } @@ -8752,10 +8740,10 @@ MethodDesc* MethodTable::GetParallelMethodDesc(MethodDesc* pDefMD) } CONTRACTL_END; -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER if (pDefMD->IsEnCAddedMethod()) return GetParallelMethodDescForEnC(this, pDefMD); -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER return GetMethodDescForSlot(pDefMD->GetSlot()); } diff --git a/src/coreclr/vm/methodtable.h b/src/coreclr/vm/methodtable.h index 69f16bec6ebdd4..2023c44d898a68 100644 --- a/src/coreclr/vm/methodtable.h +++ b/src/coreclr/vm/methodtable.h @@ -775,8 +775,8 @@ class MethodTable #endif #if defined(TARGET_RISCV64) - static bool IsRiscv64OnlyOneField(MethodTable * pMT); - static int GetRiscv64PassStructInRegisterFlags(CORINFO_CLASS_HANDLE clh); + static bool IsRiscV64OnlyOneField(MethodTable * pMT); + static int GetRiscV64PassStructInRegisterFlags(CORINFO_CLASS_HANDLE clh); #endif #if defined(UNIX_AMD64_ABI_ITF) @@ -859,7 +859,7 @@ class MethodTable void AllocateRegularStaticBoxes(); void AllocateRegularStaticBox(FieldDesc* pField, Object** boxedStaticHandle); - static OBJECTREF AllocateStaticBox(MethodTable* pFieldMT, BOOL fPinned, OBJECTHANDLE* pHandle = 0, bool canBeFrozen = false); + static OBJECTREF AllocateStaticBox(MethodTable* pFieldMT, BOOL fPinned, bool canBeFrozen = false); void CheckRestore(); diff --git a/src/coreclr/vm/methodtablebuilder.cpp b/src/coreclr/vm/methodtablebuilder.cpp index 47024106985eee..44ddcf546064bb 100644 --- a/src/coreclr/vm/methodtablebuilder.cpp +++ b/src/coreclr/vm/methodtablebuilder.cpp @@ -1680,13 +1680,13 @@ MethodTableBuilder::BuildMethodTableThrowing( // in setupmethodtable if (((pAllocator->IsCollectible() || pModule->IsReflection() || bmtGenerics->HasInstantiation() || !pModule->IsStaticStoragePrepared(cl)) && (bmtVT->GetClassCtorSlotIndex() != INVALID_SLOT_INDEX || bmtEnumFields->dwNumStaticFields !=0)) -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER // Classes in modules that have been edited (would do on class level if there were a // way to tell if the class had been edited) also have dynamic statics as the number // of statics might have changed, so can't use the static module-wide storage || (pModule->IsEditAndContinueEnabled() && ((EditAndContinueModule*)pModule)->GetApplyChangesCount() > CorDB_DEFAULT_ENC_FUNCTION_VERSION) -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER ) { // We will need a dynamic id @@ -3816,11 +3816,11 @@ VOID MethodTableBuilder::InitializeFieldDescs(FieldDesc *pFieldDescList, // Track whether any field in this type requires 8-byte alignment BOOL fFieldRequiresAlign8 = HasParent() ? GetParentMethodTable()->RequiresAlign8() : FALSE; #endif -#if defined(EnC_SUPPORTED) +#if defined(FEATURE_METADATA_UPDATER) bool isEnCField = pFieldDescList != NULL && pFieldDescList->IsEnCNew(); #else bool isEnCField = false; -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER for (i = 0; i < bmtMetaData->cFields; i++) { @@ -3906,11 +3906,6 @@ VOID MethodTableBuilder::InitializeFieldDescs(FieldDesc *pFieldDescList, { IfFailThrow(COR_E_TYPELOAD); } - - if (bmtFP->fHasFixedAddressValueTypes && GetAssembly()->IsCollectible()) - { - BuildMethodTableThrowException(IDS_CLASSLOAD_COLLECTIBLEFIXEDVTATTR); - } } @@ -6210,10 +6205,10 @@ MethodTableBuilder::InitMethodDesc( if (IsMdStatic(dwMemberAttrs)) pNewMD->SetStatic(); -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER if (fEnC) pNewMD->SetIsEnCAddedMethod(); -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER #ifdef _DEBUG // Mark as many methods as synchronized as possible. diff --git a/src/coreclr/vm/mlinfo.cpp b/src/coreclr/vm/mlinfo.cpp index 8d23d5d5ac597e..8e50860a73bffa 100644 --- a/src/coreclr/vm/mlinfo.cpp +++ b/src/coreclr/vm/mlinfo.cpp @@ -1067,43 +1067,43 @@ OleColorMarshalingInfo *EEMarshalingData::GetOleColorMarshalingInfo() } #endif // FEATURE_COMINTEROP -namespace +bool IsValidForGenericMarshalling(MethodTable* pMT, bool isFieldScenario, bool builtInMarshallingEnabled) { - bool IsValidForGenericMarshalling(MethodTable* pMT, bool isFieldScenario, bool builtInMarshallingEnabled = true) - { - _ASSERTE(pMT != NULL); + _ASSERTE(pMT != NULL); - // Not generic, so passes "generic" test - if (!pMT->HasInstantiation()) - return true; + // Not generic, so passes "generic" test + if (!pMT->HasInstantiation()) + return true; - // We can't block generic types for field scenarios for back-compat reasons. - if (isFieldScenario) - return true; + // We can't block generic types for field scenarios for back-compat reasons. + if (isFieldScenario) + return true; - // Built-in marshalling considers the blittability for a generic type. - if (builtInMarshallingEnabled && !pMT->IsBlittable()) - return false; - - // Generics (blittable when built-in is enabled) are allowed to be marshalled with the following exceptions: - // * Nullable: We don't want to be locked into the default behavior as we may want special handling later - // * Span: Not supported by built-in marshalling - // * ReadOnlySpan: Not supported by built-in marshalling - // * Vector64: Represents the __m64 ABI primitive which requires currently unimplemented handling - // * Vector128: Represents the __m128 ABI primitive which requires currently unimplemented handling - // * Vector256: Represents the __m256 ABI primitive which requires currently unimplemented handling - // * Vector512: Represents the __m512 ABI primitive which requires currently unimplemented handling - // * Vector: Has a variable size (either __m128 or __m256) and isn't readily usable for interop scenarios - return !pMT->HasSameTypeDefAs(g_pNullableClass) - && !pMT->HasSameTypeDefAs(CoreLibBinder::GetClass(CLASS__SPAN)) - && !pMT->HasSameTypeDefAs(CoreLibBinder::GetClass(CLASS__READONLY_SPAN)) - && !pMT->HasSameTypeDefAs(CoreLibBinder::GetClass(CLASS__VECTOR64T)) - && !pMT->HasSameTypeDefAs(CoreLibBinder::GetClass(CLASS__VECTOR128T)) - && !pMT->HasSameTypeDefAs(CoreLibBinder::GetClass(CLASS__VECTOR256T)) - && !pMT->HasSameTypeDefAs(CoreLibBinder::GetClass(CLASS__VECTOR512T)) - && !pMT->HasSameTypeDefAs(CoreLibBinder::GetClass(CLASS__VECTORT)); - } + // Built-in marshalling considers the blittability for a generic type. + if (builtInMarshallingEnabled && !pMT->IsBlittable()) + return false; + + // Generics (blittable when built-in is enabled) are allowed to be marshalled with the following exceptions: + // * Nullable: We don't want to be locked into the default behavior as we may want special handling later + // * Span: Not supported by built-in marshalling + // * ReadOnlySpan: Not supported by built-in marshalling + // * Vector64: Represents the __m64 ABI primitive which requires currently unimplemented handling + // * Vector128: Represents the __m128 ABI primitive which requires currently unimplemented handling + // * Vector256: Represents the __m256 ABI primitive which requires currently unimplemented handling + // * Vector512: Represents the __m512 ABI primitive which requires currently unimplemented handling + // * Vector: Has a variable size (either __m128 or __m256) and isn't readily usable for interop scenarios + return !pMT->HasSameTypeDefAs(g_pNullableClass) + && !pMT->HasSameTypeDefAs(CoreLibBinder::GetClass(CLASS__SPAN)) + && !pMT->HasSameTypeDefAs(CoreLibBinder::GetClass(CLASS__READONLY_SPAN)) + && !pMT->HasSameTypeDefAs(CoreLibBinder::GetClass(CLASS__VECTOR64T)) + && !pMT->HasSameTypeDefAs(CoreLibBinder::GetClass(CLASS__VECTOR128T)) + && !pMT->HasSameTypeDefAs(CoreLibBinder::GetClass(CLASS__VECTOR256T)) + && !pMT->HasSameTypeDefAs(CoreLibBinder::GetClass(CLASS__VECTOR512T)) + && !pMT->HasSameTypeDefAs(CoreLibBinder::GetClass(CLASS__VECTORT)); +} +namespace +{ MarshalInfo::MarshalType GetDisabledMarshallerType( Module* pModule, SigPointer sig, diff --git a/src/coreclr/vm/mlinfo.h b/src/coreclr/vm/mlinfo.h index 326c31c8ba465d..93a0f554d30af4 100644 --- a/src/coreclr/vm/mlinfo.h +++ b/src/coreclr/vm/mlinfo.h @@ -287,6 +287,8 @@ class EEMarshalingData struct ItfMarshalInfo; +bool IsValidForGenericMarshalling(MethodTable* pMT, bool isFieldScenario, bool builtInMarshallingEnabled = true); + class MarshalInfo { public: diff --git a/src/coreclr/vm/multicorejit.cpp b/src/coreclr/vm/multicorejit.cpp index eb7c5c53cea9d4..d052cbeb3d9031 100644 --- a/src/coreclr/vm/multicorejit.cpp +++ b/src/coreclr/vm/multicorejit.cpp @@ -997,7 +997,7 @@ HRESULT MulticoreJitRecorder::StartProfile(const WCHAR * pRoot, const WCHAR * pF if (g_MulticoreJitEnabled && (lenFile > 0)) { - m_fullFileName = pRoot; + m_fullFileName.Set(pRoot); // Append separator if root does not end with one unsigned len = m_fullFileName.GetCount(); @@ -1146,7 +1146,7 @@ void MulticoreJitManager::SetProfileRoot(const WCHAR * pProfilePath) { if (InterlockedCompareExchange(& m_fSetProfileRootCalled, SETPROFILEROOTCALLED, 0) == 0) // Only allow the first call per appdomain { - m_profileRoot = pProfilePath; + m_profileRoot.Set(pProfilePath); } } } diff --git a/src/coreclr/vm/nativeimage.cpp b/src/coreclr/vm/nativeimage.cpp index 9eb02777e5d262..49f797f8962544 100644 --- a/src/coreclr/vm/nativeimage.cpp +++ b/src/coreclr/vm/nativeimage.cpp @@ -131,7 +131,7 @@ NativeImage *NativeImage::Open( } } - SString path = componentModule->GetPath(); + SString path{ componentModule->GetPath() }; SString::Iterator lastPathSeparatorIter = path.End(); size_t pathDirLength = 0; if (PEAssembly::FindLastPathSeparator(path, lastPathSeparatorIter)) @@ -142,7 +142,7 @@ NativeImage *NativeImage::Open( SString compositeImageFileName(SString::Utf8, nativeImageFileName); SString fullPath; fullPath.Set(path, path.Begin(), (COUNT_T)pathDirLength); - fullPath += compositeImageFileName; + fullPath.Append(compositeImageFileName); LPWSTR searchPathsConfig; IfFailThrow(CLRConfig::GetConfigValue(CLRConfig::INTERNAL_NativeImageSearchPaths, &searchPathsConfig)); @@ -194,7 +194,7 @@ NativeImage *NativeImage::Open( } fullPath.Append(DIRECTORY_SEPARATOR_CHAR_W); - fullPath += compositeImageFileName; + fullPath.Append(compositeImageFileName); EX_TRY { diff --git a/src/coreclr/vm/nativelibrary.cpp b/src/coreclr/vm/nativelibrary.cpp index 6fcfc0f9488c93..c4460d91a5c01d 100644 --- a/src/coreclr/vm/nativelibrary.cpp +++ b/src/coreclr/vm/nativelibrary.cpp @@ -144,8 +144,8 @@ namespace SString::Iterator i = m_message.Begin(); if (!m_message.Find(i, new_message)) { - m_message += new_message; - m_message += SString(SString::Utf8, "\n"); + m_message.Append(new_message); + m_message.AppendUTF8("\n"); } #else m_message = SString(SString::Utf8, message); @@ -475,7 +475,7 @@ namespace NATIVE_LIBRARY_HANDLE hmod = NULL; - SString path = pAssembly->GetPEAssembly()->GetPath(); + SString path{ pAssembly->GetPEAssembly()->GetPath() }; SString::Iterator lastPathSeparatorIter = path.End(); if (PEAssembly::FindLastPathSeparator(path, lastPathSeparatorIter)) @@ -606,9 +606,9 @@ namespace // or an existing known extension. This is done due to issues with case-sensitive file systems // on Windows. The Windows loader always appends ".DLL" as opposed to the more common ".dll". if (libNameIsRelativePath - && !libName.EndsWith(W(".")) - && !libName.EndsWithCaseInsensitive(W(".dll")) - && !libName.EndsWithCaseInsensitive(W(".exe"))) + && !libName.EndsWith(SL(W("."))) + && !libName.EndsWithCaseInsensitive(SL(W(".dll"))) + && !libName.EndsWithCaseInsensitive(SL(W(".exe")))) { libNameVariations[varCount++] = NameSuffixFmt; } @@ -665,7 +665,7 @@ namespace // We try to dlopen with such variations on the original. NameVariations prefixSuffixCombinations[MaxVariationCount] = {}; int numberOfVariations = ARRAY_SIZE(prefixSuffixCombinations); - DetermineLibNameVariations(prefixSuffixCombinations, &numberOfVariations, wszLibName, libNameIsRelativePath); + DetermineLibNameVariations(prefixSuffixCombinations, &numberOfVariations, SString{ SString::Literal, wszLibName }, libNameIsRelativePath); for (int i = 0; i < numberOfVariations; i++) { SString currLibNameVariation; diff --git a/src/coreclr/vm/object.h b/src/coreclr/vm/object.h index 9bf9dbae875642..bb6459a340c650 100644 --- a/src/coreclr/vm/object.h +++ b/src/coreclr/vm/object.h @@ -1343,12 +1343,6 @@ class ThreadBaseObject : public Object void SetInternal(Thread *it); void ClearInternal(); - INT32 GetManagedThreadId() - { - LIMITED_METHOD_CONTRACT; - return m_ManagedThreadId; - } - void SetManagedThreadId(INT32 id) { LIMITED_METHOD_CONTRACT; diff --git a/src/coreclr/vm/peimage.cpp b/src/coreclr/vm/peimage.cpp index 55fc458c83762c..84d31686d49ce3 100644 --- a/src/coreclr/vm/peimage.cpp +++ b/src/coreclr/vm/peimage.cpp @@ -141,11 +141,11 @@ ULONG PEImage::Release() result=InterlockedDecrement(&m_refCount); if (result == 0 ) { - LOG((LF_LOADER, LL_INFO100, "PEImage: Closing Image %s\n", m_path.GetUTF8())); + LOG((LF_LOADER, LL_INFO100, "PEImage: Closing %p\n", this)); if(m_bInHashMap) { PEImageLocator locator(this); - PEImage* deleted = (PEImage *)s_Images->DeleteValue(GetPathHash(), &locator); + PEImage* deleted = (PEImage *)s_Images->DeleteValue(m_pathHash, &locator); _ASSERTE(deleted == this); } } @@ -186,7 +186,7 @@ CHECK PEImage::CheckCanonicalFullPath(const SString &path) { // Drive path i++; - SString sDrivePath(SString::Literal, ":\\"); + SString sDrivePath(SString::Literal, W(":\\")); CCHECK(path.Skip(i, sDrivePath)); } else @@ -249,12 +249,7 @@ BOOL PEImage::CompareImage(UPTR u1, UPTR u2) EX_TRY { SString path(SString::Literal, pLocator->m_pPath); - -#ifdef FEATURE_CASE_SENSITIVE_FILESYSTEM - if (pImage->GetPath().Equals(path)) -#else if (pImage->GetPath().EqualsCaseInsensitive(path)) -#endif { ret = TRUE; } @@ -623,6 +618,7 @@ void PEImage::EnumMemoryRegions(CLRDataEnumMemoryFlags flags) PEImage::PEImage(): m_path(), + m_pathHash(0), m_refCount(1), m_bInHashMap(FALSE), m_bundleFileLocation(), diff --git a/src/coreclr/vm/peimage.h b/src/coreclr/vm/peimage.h index d30e561890c79e..e7bfc11d319f12 100644 --- a/src/coreclr/vm/peimage.h +++ b/src/coreclr/vm/peimage.h @@ -132,8 +132,6 @@ class PEImage final PTR_PEImageLayout GetLoadedLayout(); PTR_PEImageLayout GetFlatLayout(); - BOOL HasPath(); - ULONG GetPathHash(); const SString& GetPath(); const SString& GetPathToLoad(); LPCWSTR GetPathForErrorMessages() { return GetPath(); } @@ -288,6 +286,7 @@ class PEImage final // ------------------------------------------------------------ SString m_path; + ULONG m_pathHash; LONG m_refCount; // means this is a unique (deduped) instance. diff --git a/src/coreclr/vm/peimage.inl b/src/coreclr/vm/peimage.inl index 6bb3c9320cb5f0..726c0d65b6bf5a 100644 --- a/src/coreclr/vm/peimage.inl +++ b/src/coreclr/vm/peimage.inl @@ -286,8 +286,9 @@ inline void PEImage::Init(LPCWSTR pPath, BundleFileLocation bundleFileLocation) } CONTRACTL_END; - m_path = pPath; + m_path.Set(pPath); m_path.Normalize(); + m_pathHash = m_path.HashCaseInsensitive(); m_bundleFileLocation = bundleFileLocation; SetModuleFileNameHintForDAC(); } @@ -310,11 +311,7 @@ inline PTR_PEImage PEImage::FindByPath(LPCWSTR pPath, BOOL isInBundle /* = TRUE int CaseHashHelper(const WCHAR *buffer, COUNT_T count); PEImageLocator locator(pPath, isInBundle); -#ifdef FEATURE_CASE_SENSITIVE_FILESYSTEM - DWORD dwHash=path.Hash(); -#else DWORD dwHash = CaseHashHelper(pPath, (COUNT_T) u16_strlen(pPath)); -#endif return (PEImage *) s_Images->LookupValue(dwHash, &locator); } @@ -366,7 +363,7 @@ inline void PEImage::AddToHashMap() CONTRACTL_END; _ASSERTE(s_hashLock.OwnedByCurrentThread()); - s_Images->InsertValue(GetPathHash(),this); + s_Images->InsertValue(m_pathHash,this); m_bInHashMap=TRUE; } @@ -378,31 +375,6 @@ inline BOOL PEImage::Has32BitNTHeaders() return GetOrCreateLayout(PEImageLayout::LAYOUT_ANY)->Has32BitNTHeaders(); } -inline BOOL PEImage::HasPath() -{ - LIMITED_METHOD_CONTRACT; - - return !GetPath().IsEmpty(); -} - -inline ULONG PEImage::GetPathHash() -{ - CONTRACT(ULONG) - { - PRECONDITION(HasPath()); - MODE_ANY; - GC_NOTRIGGER; - THROWS; - } - CONTRACT_END; - -#ifdef FEATURE_CASE_SENSITIVE_FILESYSTEM - RETURN m_path.Hash(); -#else - RETURN m_path.HashCaseInsensitive(); -#endif -} - inline void PEImage::GetPEKindAndMachine(DWORD* pdwKind, DWORD* pdwMachine) { CONTRACTL diff --git a/src/coreclr/vm/peimagelayout.cpp b/src/coreclr/vm/peimagelayout.cpp index c756c451649b34..931472d9afe75b 100644 --- a/src/coreclr/vm/peimagelayout.cpp +++ b/src/coreclr/vm/peimagelayout.cpp @@ -534,7 +534,10 @@ LoadedImageLayout::LoadedImageLayout(PEImage* pOwner, HRESULT* loadFailure) IfFailThrow(Init(m_Module, true)); - LOG((LF_LOADER, LL_INFO1000, "PEImage: Opened HMODULE %s\n", pOwner->GetPath().GetUTF8())); +#ifdef LOGGING + SString ownerPath{ pOwner->GetPath() }; + LOG((LF_LOADER, LL_INFO1000, "PEImage: Opened HMODULE %s\n", ownerPath.GetUTF8())); +#endif // LOGGING #else HANDLE hFile = pOwner->GetFileHandle(); @@ -548,8 +551,11 @@ LoadedImageLayout::LoadedImageLayout(PEImage* pOwner, HRESULT* loadFailure) return; } +#ifdef LOGGING + SString ownerPath{ pOwner->GetPath() }; LOG((LF_LOADER, LL_INFO1000, "PEImage: image %s (hFile %p) mapped @ %p\n", - pOwner->GetPath().GetUTF8(), hFile, (void*)m_LoadedFile)); + ownerPath.GetUTF8(), hFile, (void*)m_LoadedFile)); +#endif // LOGGING IfFailThrow(Init((void*)m_LoadedFile)); @@ -616,7 +622,10 @@ FlatImageLayout::FlatImageLayout(PEImage* pOwner) INT64 offset = pOwner->GetOffset(); INT64 size = pOwner->GetSize(); - LOG((LF_LOADER, LL_INFO100, "PEImage: Opening flat %s\n", pOwner->GetPath().GetUTF8())); +#ifdef LOGGING + SString ownerPath{ pOwner->GetPath() }; + LOG((LF_LOADER, LL_INFO100, "PEImage: Opening flat %s\n", ownerPath.GetUTF8())); +#endif // LOGGING // If a size is not specified, load the whole file if (size == 0) @@ -862,7 +871,7 @@ void* FlatImageLayout::LoadImageByCopyingParts(SIZE_T* m_imageParts) const return base; } -#if TARGET_WINDOWS +#ifdef TARGET_WINDOWS // VirtualAlloc2 typedef PVOID(WINAPI* VirtualAlloc2Fn)( @@ -900,7 +909,7 @@ static bool HavePlaceholderAPI() if (pMapViewOfFile3 == NULL) { - HMODULE hm = LoadLibraryW(_T("kernelbase.dll")); + HMODULE hm = WszLoadLibrary(W("kernelbase.dll"), NULL, LOAD_LIBRARY_SEARCH_SYSTEM32); if (hm != NULL) { pVirtualAlloc2 = (VirtualAlloc2Fn)GetProcAddress(hm, "VirtualAlloc2"); diff --git a/src/coreclr/vm/precode.h b/src/coreclr/vm/precode.h index d7f6b4cac1a74d..3f6a2f532c4e67 100644 --- a/src/coreclr/vm/precode.h +++ b/src/coreclr/vm/precode.h @@ -11,7 +11,7 @@ #define PRECODE_ALIGNMENT sizeof(void*) -#if defined(HOST_AMD64) +#if defined(TARGET_AMD64) #define OFFSETOF_PRECODE_TYPE 0 #define OFFSETOF_PRECODE_TYPE_CALL_OR_JMP 5 @@ -19,7 +19,7 @@ #define SIZEOF_PRECODE_BASE 16 -#elif defined(HOST_X86) +#elif defined(TARGET_X86) EXTERN_C VOID STDCALL PrecodeRemotingThunk(); @@ -29,27 +29,27 @@ EXTERN_C VOID STDCALL PrecodeRemotingThunk(); #define SIZEOF_PRECODE_BASE 8 -#elif defined(HOST_ARM64) +#elif defined(TARGET_ARM64) #define SIZEOF_PRECODE_BASE CODE_SIZE_ALIGN #define OFFSETOF_PRECODE_TYPE 0 -#elif defined(HOST_ARM) +#elif defined(TARGET_ARM) -#define SIZEOF_PRECODE_BASE CODE_SIZE_ALIGN -#define OFFSETOF_PRECODE_TYPE 3 +#define SIZEOF_PRECODE_BASE CODE_SIZE_ALIGN * 2 +#define OFFSETOF_PRECODE_TYPE 7 -#elif defined(HOST_LOONGARCH64) +#elif defined(TARGET_LOONGARCH64) #define SIZEOF_PRECODE_BASE CODE_SIZE_ALIGN #define OFFSETOF_PRECODE_TYPE 0 -#elif defined(HOST_RISCV64) +#elif defined(TARGET_RISCV64) #define SIZEOF_PRECODE_BASE CODE_SIZE_ALIGN #define OFFSETOF_PRECODE_TYPE 0 -#endif // HOST_AMD64 +#endif // TARGET_AMD64 #ifndef DACCESS_COMPILE // Given an address in a slot, figure out if the prestub will be called @@ -61,14 +61,14 @@ BOOL DoesSlotCallPrestub(PCODE pCode); // Invalid precode type struct InvalidPrecode { -#if defined(HOST_AMD64) || defined(HOST_X86) +#if defined(TARGET_AMD64) || defined(TARGET_X86) // int3 static const int Type = 0xCC; -#elif defined(HOST_ARM64) || defined(HOST_ARM) +#elif defined(TARGET_ARM64) || defined(TARGET_ARM) static const int Type = 0; -#elif defined(HOST_LOONGARCH64) +#elif defined(TARGET_LOONGARCH64) static const int Type = 0xff; -#elif defined(HOST_RISCV64) +#elif defined(TARGET_RISCV64) static const int Type = 0xff; #endif }; @@ -90,25 +90,25 @@ extern "C" void StubPrecodeCode_End(); // Regular precode struct StubPrecode { -#if defined(HOST_AMD64) +#if defined(TARGET_AMD64) static const BYTE Type = 0x4C; static const SIZE_T CodeSize = 24; -#elif defined(HOST_X86) +#elif defined(TARGET_X86) static const BYTE Type = 0xA1; static const SIZE_T CodeSize = 24; -#elif defined(HOST_ARM64) +#elif defined(TARGET_ARM64) static const int Type = 0x4A; static const SIZE_T CodeSize = 24; -#elif defined(HOST_ARM) - static const int Type = 0xCF; +#elif defined(TARGET_ARM) + static const int Type = 0xFF; static const SIZE_T CodeSize = 12; -#elif defined(HOST_LOONGARCH64) +#elif defined(TARGET_LOONGARCH64) static const int Type = 0x4; static const SIZE_T CodeSize = 24; -#elif defined(HOST_RISCV64) +#elif defined(TARGET_RISCV64) static const int Type = 0x17; static const SIZE_T CodeSize = 24; -#endif // HOST_AMD64 +#endif // TARGET_AMD64 BYTE m_code[CodeSize]; @@ -189,7 +189,7 @@ typedef DPTR(StubPrecode) PTR_StubPrecode; // (This is fake precode. VTable slot does not point to it.) struct NDirectImportPrecode : StubPrecode { - static const int Type = 0x01; + static const int Type = 0x05; void Init(NDirectImportPrecode* pPrecodeRX, MethodDesc* pMD, LoaderAllocator *pLoaderAllocator); @@ -224,31 +224,31 @@ extern "C" void FixupPrecodeCode_End(); // The fixup precode is simple jump once patched. It does not have the two instruction overhead of regular precode. struct FixupPrecode { -#if defined(HOST_AMD64) +#if defined(TARGET_AMD64) static const int Type = 0xFF; static const SIZE_T CodeSize = 24; static const int FixupCodeOffset = 6; -#elif defined(HOST_X86) +#elif defined(TARGET_X86) static const int Type = 0xFF; static const SIZE_T CodeSize = 24; static const int FixupCodeOffset = 6; -#elif defined(HOST_ARM64) +#elif defined(TARGET_ARM64) static const int Type = 0x0B; static const SIZE_T CodeSize = 24; static const int FixupCodeOffset = 8; -#elif defined(HOST_ARM) - static const int Type = 0xFF; +#elif defined(TARGET_ARM) + static const int Type = 0xCF; static const SIZE_T CodeSize = 12; static const int FixupCodeOffset = 4 + THUMB_CODE; -#elif defined(HOST_LOONGARCH64) +#elif defined(TARGET_LOONGARCH64) static const int Type = 0x3; static const SIZE_T CodeSize = 32; static const int FixupCodeOffset = 12; -#elif defined(HOST_RISCV64) +#elif defined(TARGET_RISCV64) static const int Type = 0x97; static const SIZE_T CodeSize = 32; static const int FixupCodeOffset = 10; -#endif // HOST_AMD64 +#endif // TARGET_AMD64 BYTE m_code[CodeSize]; @@ -614,4 +614,8 @@ static_assert_no_msg(FixupPrecode::Type != NDirectImportPrecode::Type); static_assert_no_msg(FixupPrecode::Type != ThisPtrRetBufPrecode::Type); static_assert_no_msg(NDirectImportPrecode::Type != ThisPtrRetBufPrecode::Type); +// Verify that the base type for each precode fits into each specific precode type +static_assert_no_msg(sizeof(Precode) <= sizeof(NDirectImportPrecode)); +static_assert_no_msg(sizeof(Precode) <= sizeof(FixupPrecode)); +static_assert_no_msg(sizeof(Precode) <= sizeof(ThisPtrRetBufPrecode)); #endif // __PRECODE_H__ diff --git a/src/coreclr/vm/prestub.cpp b/src/coreclr/vm/prestub.cpp index 32944952301648..90768a47b51578 100644 --- a/src/coreclr/vm/prestub.cpp +++ b/src/coreclr/vm/prestub.cpp @@ -3561,8 +3561,7 @@ PCODE DynamicHelperFixup(TransitionBlock * pTransitionBlock, TADDR * pCell, DWOR case ENCODE_ISINSTANCEOF_HELPER: case ENCODE_CHKCAST_HELPER: { - bool fClassMustBeRestored; - CorInfoHelpFunc helpFunc = CEEInfo::getCastingHelperStatic(th, /* throwing */ (kind == ENCODE_CHKCAST_HELPER), &fClassMustBeRestored); + CorInfoHelpFunc helpFunc = CEEInfo::getCastingHelperStatic(th, /* throwing */ (kind == ENCODE_CHKCAST_HELPER)); pHelper = DynamicHelpers::CreateHelperArgMove(pModule->GetLoaderAllocator(), th.AsTAddr(), CEEJitInfo::getHelperFtnStatic(helpFunc)); } break; diff --git a/src/coreclr/vm/profilingenumerators.cpp b/src/coreclr/vm/profilingenumerators.cpp index 1d19a87324be92..c55d40ffbeed9e 100644 --- a/src/coreclr/vm/profilingenumerators.cpp +++ b/src/coreclr/vm/profilingenumerators.cpp @@ -103,7 +103,12 @@ BOOL ProfilerObjectEnum::Init() } CONTRACTL_END; - FrozenObjectHeapManager* foh = SystemDomain::GetFrozenObjectHeapManager(); + FrozenObjectHeapManager* foh = SystemDomain::GetFrozenObjectHeapManagerNoThrow(); + if (foh == nullptr) + { + return TRUE; + } + CrstHolder ch(&foh->m_Crst); const unsigned segmentsCount = foh->m_FrozenSegments.GetCount(); @@ -113,7 +118,6 @@ BOOL ProfilerObjectEnum::Init() for (unsigned segmentIdx = 0; segmentIdx < segmentsCount; segmentIdx++) { const FrozenObjectSegment* segment = segments[segmentIdx]; - Object* currentObj = segment->GetFirstObject(); while (currentObj != nullptr) { diff --git a/src/coreclr/vm/proftoeeinterfaceimpl.cpp b/src/coreclr/vm/proftoeeinterfaceimpl.cpp index 1f2e4f26001859..11853acdcf86ee 100644 --- a/src/coreclr/vm/proftoeeinterfaceimpl.cpp +++ b/src/coreclr/vm/proftoeeinterfaceimpl.cpp @@ -7672,7 +7672,12 @@ HRESULT ProfToEEInterfaceImpl::GetNonGCHeapBounds(ULONG cObjectRanges, return E_INVALIDARG; } - FrozenObjectHeapManager* foh = SystemDomain::GetFrozenObjectHeapManager(); + FrozenObjectHeapManager* foh = SystemDomain::GetFrozenObjectHeapManagerNoThrow(); + if (foh == nullptr) + { + *pcObjectRanges = 0; + return S_OK; + } CrstHolder ch(&foh->m_Crst); const unsigned segmentsCount = foh->m_FrozenSegments.GetCount(); diff --git a/src/coreclr/vm/proftoeeinterfaceimpl.h b/src/coreclr/vm/proftoeeinterfaceimpl.h index 83fe29b641eef3..885752ec97eb3f 100644 --- a/src/coreclr/vm/proftoeeinterfaceimpl.h +++ b/src/coreclr/vm/proftoeeinterfaceimpl.h @@ -56,14 +56,18 @@ class ProfileArgIterator private: void *m_handle; ArgIterator m_argIterator; -#if defined(UNIX_AMD64_ABI) || defined(TARGET_ARM64) +#if defined(UNIX_AMD64_ABI) || defined(TARGET_ARM64) || defined(TARGET_RISCV64) || defined(TARGET_LOONGARCH64) UINT64 m_bufferPos; -#if defined(UNIX_AMD64_ABI) +#if defined(UNIX_AMD64_ABI) || defined(TARGET_RISCV64) // On certain architectures we can pass args in non-sequential registers, // this function will copy the struct so it is laid out as it would be in memory // so it can be passed to the profiler - LPVOID CopyStructFromRegisters(); + LPVOID CopyStructFromRegisters( +#ifdef TARGET_RISCV64 + const ArgLocDesc* argLocDesc +#endif + ); #endif #if defined(TARGET_ARM64) @@ -72,7 +76,7 @@ class ProfileArgIterator LPVOID CopyStructFromFPRegs(int idxFPReg, int cntFPRegs, int hfaFieldSize); #endif -#endif // UNIX_AMD64_ABI || TARGET_ARM64 +#endif // UNIX_AMD64_ABI || TARGET_ARM64 || TARGET_RISCV64 || TARGET_LOONGARCH64 public: ProfileArgIterator(MetaSig * pMetaSig, void* platformSpecificHandle); diff --git a/src/coreclr/vm/qcallentrypoints.cpp b/src/coreclr/vm/qcallentrypoints.cpp index bf8039efb201f4..0725bd7a87f097 100644 --- a/src/coreclr/vm/qcallentrypoints.cpp +++ b/src/coreclr/vm/qcallentrypoints.cpp @@ -74,6 +74,8 @@ #include +#include "exceptionhandlingqcalls.h" + static const Entry s_QCall[] = { DllImportEntry(Enum_GetValuesAndNames) @@ -321,6 +323,16 @@ static const Entry s_QCall[] = DllImportEntry(ComWeakRefToObject) DllImportEntry(ObjectToComWeakRef) #endif +#ifdef FEATURE_EH_FUNCLETS + DllImportEntry(SfiInit) + DllImportEntry(SfiNext) + DllImportEntry(CallCatchFunclet) + DllImportEntry(CallFilterFunclet) + DllImportEntry(CallFinallyFunclet) + DllImportEntry(EHEnumInitFromStackFrameIterator) + DllImportEntry(EHEnumNext) + DllImportEntry(AppendExceptionStackFrame) +#endif // FEATURE_EH_FUNCLETS }; const void* QCallResolveDllImport(const char* name) diff --git a/src/coreclr/vm/readytoruninfo.cpp b/src/coreclr/vm/readytoruninfo.cpp index 2c186cf7adeaff..e75373db8855aa 100644 --- a/src/coreclr/vm/readytoruninfo.cpp +++ b/src/coreclr/vm/readytoruninfo.cpp @@ -429,7 +429,8 @@ static void LogR2r(const char *msg, PEAssembly *pPEAssembly) if (r2rLogFile == NULL) return; - fprintf(r2rLogFile, "%s: \"%s\".\n", msg, pPEAssembly->GetPath().GetUTF8()); + SString assemblyPath{ pPEAssembly->GetPath() }; + fprintf(r2rLogFile, "%s: \"%s\".\n", msg, assemblyPath.GetUTF8()); fflush(r2rLogFile); } @@ -1904,7 +1905,7 @@ uint32_t ReadyToRun_TypeGenericInfoMap::GetGenericArgumentCount(mdTypeDef input, uint32_t count = ((uint8_t)typeGenericInfo & (uint8_t)ReadyToRunTypeGenericInfo::GenericCountMask); if (count > 2) foundResult = false; - + if (!foundResult) { HENUMInternalHolder hEnumTyPars(pImport); @@ -1922,7 +1923,7 @@ HRESULT ReadyToRun_TypeGenericInfoMap::GetGenericArgumentCountNoThrow(mdTypeDef uint32_t count = ((uint8_t)typeGenericInfo & (uint8_t)ReadyToRunTypeGenericInfo::GenericCountMask); if (count > 2) foundResult = false; - + if (!foundResult) { HENUMInternalHolder hEnumTyPars(pImport); diff --git a/src/coreclr/vm/reflectioninvocation.cpp b/src/coreclr/vm/reflectioninvocation.cpp index 0c1f94cd03c790..72cf39758b1fdb 100644 --- a/src/coreclr/vm/reflectioninvocation.cpp +++ b/src/coreclr/vm/reflectioninvocation.cpp @@ -1982,7 +1982,7 @@ extern "C" void QCALLTYPE Enum_GetValuesAndNames(QCall::TypeHandle pEnumType, QC { GCX_COOP(); - struct gc { + struct { BASEARRAYREF values; PTRARRAYREF names; } gc; diff --git a/src/coreclr/vm/rexcep.h b/src/coreclr/vm/rexcep.h index bf424b7135b7d9..3f2c1cee117ae3 100644 --- a/src/coreclr/vm/rexcep.h +++ b/src/coreclr/vm/rexcep.h @@ -95,7 +95,7 @@ DEFINE_EXCEPTION(g_SystemNS, ApplicationException, false, C DEFINE_EXCEPTION(g_SystemNS, ArithmeticException, false, COR_E_ARITHMETIC) DEFINE_EXCEPTION(g_SystemNS, ArgumentException, false, - COR_E_ARGUMENT, STD_CTL_SCODE(449), STD_CTL_SCODE(450), CLR_E_BIND_UNRECOGNIZED_IDENTITY_FORMAT) + COR_E_ARGUMENT, STD_CTL_SCODE(449), STD_CTL_SCODE(450)) DEFINE_EXCEPTION(g_SystemNS, ArgumentOutOfRangeException, false, COR_E_ARGUMENTOUTOFRANGE, HRESULT_FROM_WIN32(ERROR_NO_UNICODE_TRANSLATION)) DEFINE_EXCEPTION(g_SystemNS, ArrayTypeMismatchException, false, COR_E_ARRAYTYPEMISMATCH) @@ -144,7 +144,7 @@ DEFINE_EXCEPTION(g_SystemNS, FieldAccessException, false, C DEFINE_EXCEPTION(g_IONS, FileLoadException, true, COR_E_FILELOAD, FUSION_E_INVALID_NAME, - FUSION_E_PRIVATE_ASM_DISALLOWED, + FUSION_E_PRIVATE_ASM_DISALLOWED, FUSION_E_REF_DEF_MISMATCH, HRESULT_FROM_WIN32(ERROR_TOO_MANY_OPEN_FILES), HRESULT_FROM_WIN32(ERROR_SHARING_VIOLATION), HRESULT_FROM_WIN32(ERROR_LOCK_VIOLATION), @@ -162,9 +162,7 @@ DEFINE_EXCEPTION(g_IONS, FileNotFoundException, true, HRESULT_FROM_WIN32(ERROR_WRONG_TARGET_NAME), INET_E_UNKNOWN_PROTOCOL, INET_E_CONNECTION_TIMEOUT, INET_E_CANNOT_CONNECT, INET_E_RESOURCE_NOT_FOUND, INET_E_OBJECT_NOT_FOUND, INET_E_DOWNLOAD_FAILURE, INET_E_DATA_NOT_AVAILABLE, - HRESULT_FROM_WIN32(ERROR_DLL_NOT_FOUND), - CLR_E_BIND_ASSEMBLY_VERSION_TOO_LOW, CLR_E_BIND_ASSEMBLY_PUBLIC_KEY_MISMATCH, - CLR_E_BIND_ASSEMBLY_NOT_FOUND) + HRESULT_FROM_WIN32(ERROR_DLL_NOT_FOUND)) DEFINE_EXCEPTION(g_SystemNS, FormatException, false, COR_E_FORMAT) @@ -250,7 +248,7 @@ DEFINE_EXCEPTION(g_SystemNS, TypeInitializationException, false, C #ifdef FEATURE_COMINTEROP DEFINE_EXCEPTION(g_SystemNS, TypeLoadException, false, COR_E_TYPELOAD, - RO_E_METADATA_NAME_NOT_FOUND, CLR_E_BIND_TYPE_NOT_FOUND) + RO_E_METADATA_NAME_NOT_FOUND) #else DEFINE_EXCEPTION(g_SystemNS, TypeLoadException, false, COR_E_TYPELOAD) #endif diff --git a/src/coreclr/vm/riscv64/asmconstants.h b/src/coreclr/vm/riscv64/asmconstants.h index 1089bfe9fecb44..eb421593523d50 100644 --- a/src/coreclr/vm/riscv64/asmconstants.h +++ b/src/coreclr/vm/riscv64/asmconstants.h @@ -250,5 +250,36 @@ ASMCONSTANTS_C_ASSERT(CallCountingStubData__TargetForMethod == offsetof(CallCoun #define CallCountingStubData__TargetForThresholdReached 0x10 ASMCONSTANTS_C_ASSERT(CallCountingStubData__TargetForThresholdReached == offsetof(CallCountingStubData, TargetForThresholdReached)) +#ifdef PROFILING_SUPPORTED +#define PROFILE_ENTER 1 +#define PROFILE_LEAVE 2 +#define PROFILE_TAILCALL 4 + +// NOTE: this should be 16-byte aligned as stack size. +#define SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA 0x140 +ASMCONSTANTS_C_ASSERT(SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA == (sizeof(PROFILE_PLATFORM_SPECIFIC_DATA)+8)) +ASMCONSTANTS_C_ASSERT((SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA & 0xf) == 0) + +#define PROFILE_PLATFORM_SPECIFIC_DATA__argumentRegisters 16 +#define PROFILE_PLATFORM_SPECIFIC_DATA__functionId 80 +#define PROFILE_PLATFORM_SPECIFIC_DATA__floatArgumentRegisters 88 +#define PROFILE_PLATFORM_SPECIFIC_DATA__probeSp 152 +#define PROFILE_PLATFORM_SPECIFIC_DATA__profiledSp 160 +#define PROFILE_PLATFORM_SPECIFIC_DATA__hiddenArg 168 +#define PROFILE_PLATFORM_SPECIFIC_DATA__flags 176 + +#define ASMCONSTANTS_C_ASSERT_OFFSET(type, field) \ + ASMCONSTANTS_C_ASSERT(type##__##field == offsetof(type, field)) +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, argumentRegisters) +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, functionId) +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, floatArgumentRegisters) +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, probeSp) +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, profiledSp) +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, hiddenArg) +ASMCONSTANTS_C_ASSERT_OFFSET(PROFILE_PLATFORM_SPECIFIC_DATA, flags) +#undef ASMCONSTANTS_C_ASSERT_OFFSET + +#endif // PROFILING_SUPPORTED + #undef ASMCONSTANTS_RUNTIME_ASSERT #undef ASMCONSTANTS_C_ASSERT diff --git a/src/coreclr/vm/riscv64/asmhelpers.S b/src/coreclr/vm/riscv64/asmhelpers.S index 85ee7c30dbb645..d692f591a2e580 100644 --- a/src/coreclr/vm/riscv64/asmhelpers.S +++ b/src/coreclr/vm/riscv64/asmhelpers.S @@ -539,6 +539,46 @@ LOCAL_LABEL(JIT_GetSharedGCStaticBase_SingleAppDomain_CallHelper): call JIT_GetSharedGCStaticBase_Helper LEAF_END JIT_GetSharedGCStaticBase_SingleAppDomain, _TEXT +// Make sure the `FaultingExceptionFrame_StackAlloc` is 16-byte aligned. +#define FaultingExceptionFrame_StackAlloc (SIZEOF__GSCookie + SIZEOF__FaultingExceptionFrame + 0x8) +#define FaultingExceptionFrame_FrameOffset SIZEOF__GSCookie + +.macro GenerateRedirectedStubWithFrame stub, target + + // + // This is the primary function to which execution will be redirected to. + // + NESTED_ENTRY \stub, _TEXT, NoHandler + + // + // IN: ra: original IP before redirect + // + + PROLOG_SAVE_REG_PAIR_INDEXED fp, ra, 16 + + // alloc stack for FaultingExceptionFrame. + addi sp, sp, -FaultingExceptionFrame_StackAlloc + + // stack must be 16 bytes aligned + CHECK_STACK_ALIGNMENT + + // Save pointer to FEF for GetFrameFromRedirectedStubStackFrame + addi a0, sp, FaultingExceptionFrame_FrameOffset + + // Prepare to initialize to NULL + sd zero, 0(a0) // Initialize vtbl (it is not strictly necessary) + sd zero, FaultingExceptionFrame__m_fFilterExecuted(a0) // Initialize BOOL for personality routine + + call C_FUNC(\target) + // Target should not return. + EMIT_BREAKPOINT + + NESTED_END \stub, _TEXT + +.endm + +GenerateRedirectedStubWithFrame RedirectForThreadAbort, ThrowControlForThread + // ------------------------------------------------------------------ // ResolveWorkerChainLookupAsmStub // @@ -894,43 +934,36 @@ LEAF_ENTRY JIT_ProfilerEnterLeaveTailcallStub, _TEXT ret LEAF_END JIT_ProfilerEnterLeaveTailcallStub, _TEXT -// ------------------------------------------------------------------ -#define PROFILE_ENTER 1 -#define PROFILE_LEAVE 2 -#define PROFILE_TAILCALL 4 -#define SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA 272 - // ------------------------------------------------------------------ .macro GenerateProfileHelper helper, flags NESTED_ENTRY \helper\()Naked, _TEXT, NoHandler // On entry: - // t1 = functionIDOrClientID - // t2 = profiledSp + // t0 = functionIDOrClientID + // t1 = profiledSp // t6 = throwable // // On exit: // Values of a0-a7, fa0-fa7, fp are preserved. // Values of other volatile registers are not preserved. + // Fill in PROFILE_PLATFORM_SPECIFIC_DATA struct PROLOG_SAVE_REG_PAIR_INDEXED fp, ra, SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA // Allocate space and save Fp, Pc. - SAVE_ARGUMENT_REGISTERS sp, 16 // Save t0 and argument registers (a0-a7). - sd zero, 88(sp) // Clear functionId. - SAVE_FLOAT_ARGUMENT_REGISTERS sp, 96 // Save floating-point/SIMD registers (fa0-fa7). - addi t6, fp, SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA // Compute probeSp - initial value of Sp on entry to the helper. - sd t6, 224(sp) // Save probeSp. - sd t2, 232(sp) // Save profiledSp. - - sd zero, 240(sp) // Clear hiddenArg. + SAVE_ARGUMENT_REGISTERS sp, PROFILE_PLATFORM_SPECIFIC_DATA__argumentRegisters + sd zero, PROFILE_PLATFORM_SPECIFIC_DATA__functionId(sp) + SAVE_FLOAT_ARGUMENT_REGISTERS sp, PROFILE_PLATFORM_SPECIFIC_DATA__floatArgumentRegisters + addi t6, sp, SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA // Compute probeSp - initial value of Sp on entry to the helper. + sd t6, PROFILE_PLATFORM_SPECIFIC_DATA__probeSp(sp) + sd t1, PROFILE_PLATFORM_SPECIFIC_DATA__profiledSp(sp) + sd zero, PROFILE_PLATFORM_SPECIFIC_DATA__hiddenArg(sp) addi t6, zero, \flags - sw t6, 248(sp) // Save flags. - sw zero, 252(sp) // clear unused field. + sd t6, PROFILE_PLATFORM_SPECIFIC_DATA__flags(sp) - addi a1, t1, 0 - addi a2, sp, 0 + addi a0, t0, 0 + addi a1, sp, 0 call C_FUNC(\helper) - RESTORE_ARGUMENT_REGISTERS sp, 16 // Restore t0 and argument registers. - RESTORE_FLOAT_ARGUMENT_REGISTERS sp, 96 // Restore floating-point/SIMD registers. + RESTORE_ARGUMENT_REGISTERS sp, PROFILE_PLATFORM_SPECIFIC_DATA__argumentRegisters + RESTORE_FLOAT_ARGUMENT_REGISTERS sp, PROFILE_PLATFORM_SPECIFIC_DATA__floatArgumentRegisters EPILOG_RESTORE_REG_PAIR_INDEXED fp, ra, SIZEOF__PROFILE_PLATFORM_SPECIFIC_DATA EPILOG_RETURN diff --git a/src/coreclr/vm/riscv64/calldescrworkerriscv64.S b/src/coreclr/vm/riscv64/calldescrworkerriscv64.S index b244fa46a2fc03..2139787bee1490 100644 --- a/src/coreclr/vm/riscv64/calldescrworkerriscv64.S +++ b/src/coreclr/vm/riscv64/calldescrworkerriscv64.S @@ -70,6 +70,7 @@ LOCAL_LABEL(NoFloatingPoint): // call pTarget jalr t4 +LOCAL_LABEL(CallDescrWorkerInternalReturnAddress): lw a3, CallDescrData__fpReturnSize(s1) @@ -202,4 +203,8 @@ LOCAL_LABEL(ReturnDone): EPILOG_RESTORE_REG s1, 16 EPILOG_RESTORE_REG_PAIR_INDEXED fp, ra, 0x20 ret + +PATCH_LABEL CallDescrWorkerInternalReturnAddressOffset + .quad LOCAL_LABEL(CallDescrWorkerInternalReturnAddress) - C_FUNC(CallDescrWorkerInternal) + NESTED_END CallDescrWorkerInternal, _TEXT diff --git a/src/coreclr/vm/riscv64/cgencpu.h b/src/coreclr/vm/riscv64/cgencpu.h index 8ed6fbc4a44d90..2549ec22e60bcb 100644 --- a/src/coreclr/vm/riscv64/cgencpu.h +++ b/src/coreclr/vm/riscv64/cgencpu.h @@ -107,7 +107,7 @@ struct CalleeSavedRegisters { #define NUM_ARGUMENT_REGISTERS 8 typedef DPTR(struct ArgumentRegisters) PTR_ArgumentRegisters; struct ArgumentRegisters { - INT64 a[8]; // a0 ....a7 + INT64 a[NUM_ARGUMENT_REGISTERS]; // a0 ....a7 }; #define ARGUMENTREGISTERS_SIZE sizeof(ArgumentRegisters) @@ -124,9 +124,30 @@ struct ArgumentRegisters { typedef DPTR(struct FloatArgumentRegisters) PTR_FloatArgumentRegisters; struct FloatArgumentRegisters { //TODO: not supports RISCV64-SIMD. - double f[8]; // f0-f7 + double f[NUM_FLOAT_ARGUMENT_REGISTERS]; // f0-f7 }; +//********************************************************************** +// Profiling +//********************************************************************** + +#ifdef PROFILING_SUPPORTED + +struct PROFILE_PLATFORM_SPECIFIC_DATA +{ + void* Fp; + void* Pc; + ArgumentRegisters argumentRegisters; + FunctionID functionId; + FloatArgumentRegisters floatArgumentRegisters; + void* probeSp; + void* profiledSp; + void* hiddenArg; + UINT64 flags; + // Scratch space to reconstruct struct passed in two registers + BYTE buffer[sizeof(ArgumentRegisters) + sizeof(FloatArgumentRegisters)]; +}; +#endif // PROFILING_SUPPORTED //********************************************************************** // Exception handling @@ -359,8 +380,6 @@ class StubLinkerCPU : public StubLinker void EmitLoad(FloatReg dest, IntReg srcAddr, int offset = 0); void EmitStore(IntReg src, IntReg destAddr, int offset = 0); void EmitStore(FloatReg src, IntReg destAddr, int offset = 0); - - void EmitRet(IntReg reg); }; extern "C" void SinglecastDelegateInvokeStub(); @@ -425,7 +444,7 @@ struct HijackArgs // Precode to shuffle this and retbuf for closed delegates over static methods with return buffer struct ThisPtrRetBufPrecode { - static const int Type = 0x2; + static const int Type = 0x93; UINT32 m_rgCode[6]; TADDR m_pTarget; diff --git a/src/coreclr/vm/riscv64/profiler.cpp b/src/coreclr/vm/riscv64/profiler.cpp index 5b9feb0e4ebdd0..1cff4dfaa45e1d 100644 --- a/src/coreclr/vm/riscv64/profiler.cpp +++ b/src/coreclr/vm/riscv64/profiler.cpp @@ -4,35 +4,11 @@ #include "common.h" #ifdef PROFILING_SUPPORTED +#include "asmconstants.h" #include "proftoeeinterfaceimpl.h" -#define PROFILE_ENTER 1 -#define PROFILE_LEAVE 2 -#define PROFILE_TAILCALL 4 - -// Scratch space to store HFA return values (max 16 bytes) -#define PROFILE_PLATFORM_SPECIFIC_DATA_BUFFER_SIZE 16 - -typedef struct _PROFILE_PLATFORM_SPECIFIC_DATA -{ - void* Fp; - void* Pc; - void* x8; - ArgumentRegisters argumentRegisters; - FunctionID functionId; - FloatArgumentRegisters floatArgumentRegisters; - void* probeSp; - void* profiledSp; - void* hiddenArg; - UINT32 flags; - UINT32 unused; - BYTE buffer[PROFILE_PLATFORM_SPECIFIC_DATA_BUFFER_SIZE]; -} PROFILE_PLATFORM_SPECIFIC_DATA, *PPROFILE_PLATFORM_SPECIFIC_DATA; - UINT_PTR ProfileGetIPFromPlatformSpecificHandle(void* pPlatformSpecificHandle) { - // TODO-RISCV64-CQ: copied codes from loongarch however not yet tested. - _ASSERTE(!"RISCV64:NYI"); LIMITED_METHOD_CONTRACT; PROFILE_PLATFORM_SPECIFIC_DATA* pData = reinterpret_cast(pPlatformSpecificHandle); @@ -41,8 +17,6 @@ UINT_PTR ProfileGetIPFromPlatformSpecificHandle(void* pPlatformSpecificHandle) void ProfileSetFunctionIDInPlatformSpecificHandle(void* pPlatformSpecificHandle, FunctionID functionId) { - // TODO-RISCV64-CQ: copied codes from loongarch however not yet tested. - _ASSERTE(!"RISCV64:NYI"); LIMITED_METHOD_CONTRACT; _ASSERTE(pPlatformSpecificHandle != nullptr); @@ -53,15 +27,12 @@ void ProfileSetFunctionIDInPlatformSpecificHandle(void* pPlatformSpecificHandle, } ProfileArgIterator::ProfileArgIterator(MetaSig* pSig, void* pPlatformSpecificHandle) - : m_argIterator(pSig) + : m_argIterator(pSig), m_bufferPos(0) { - // TODO-RISCV64-CQ: copied codes from loongarch however not yet tested. - _ASSERTE(!"RISCV64:NYI"); WRAPPER_NO_CONTRACT; _ASSERTE(pSig != nullptr); _ASSERTE(pPlatformSpecificHandle != nullptr); - m_handle = pPlatformSpecificHandle; PROFILE_PLATFORM_SPECIFIC_DATA* pData = reinterpret_cast(pPlatformSpecificHandle); @@ -119,17 +90,77 @@ ProfileArgIterator::ProfileArgIterator(MetaSig* pSig, void* pPlatformSpecificHan ProfileArgIterator::~ProfileArgIterator() { - // TODO-RISCV64-CQ: copied codes from loongarch however not yet tested. - _ASSERTE(!"RISCV64:NYI"); LIMITED_METHOD_CONTRACT; m_handle = nullptr; } +LPVOID ProfileArgIterator::CopyStructFromRegisters(const ArgLocDesc* sir) +{ + struct Func + { + static inline const BYTE* postIncrement(const BYTE *&p, int offset) + { + const BYTE* orig = p; + p += offset; + return orig; + } + }; + + WRAPPER_NO_CONTRACT; + _ASSERTE(m_handle); + PROFILE_PLATFORM_SPECIFIC_DATA* pData = reinterpret_cast(m_handle); + + struct { bool isFloat, is8; } fields[] = { + { sir->m_structFields & (STRUCT_FLOAT_FIELD_FIRST | STRUCT_FLOAT_FIELD_ONLY_TWO | STRUCT_FLOAT_FIELD_ONLY_ONE), + sir->m_structFields & STRUCT_FIRST_FIELD_SIZE_IS8 }, + { sir->m_structFields & (STRUCT_FLOAT_FIELD_SECOND | STRUCT_FLOAT_FIELD_ONLY_TWO), + sir->m_structFields & STRUCT_SECOND_FIELD_SIZE_IS8 }, + }; + int fieldCount = (sir->m_structFields & STRUCT_FLOAT_FIELD_ONLY_ONE) ? 1 : 2; + UINT64 bufferPosBegin = m_bufferPos; + const double *fRegBegin = &pData->floatArgumentRegisters.f[sir->m_idxFloatReg], *fReg = fRegBegin; + const double *fRegEnd = &pData->floatArgumentRegisters.f[0] + NUM_FLOAT_ARGUMENT_REGISTERS; + const INT64 *aRegBegin = &pData->argumentRegisters.a[sir->m_idxGenReg], *aReg = aRegBegin; + const INT64 *aRegEnd = &pData->argumentRegisters.a[0] + NUM_ARGUMENT_REGISTERS; + const BYTE *stackBegin = (BYTE*)pData->profiledSp + sir->m_byteStackIndex, *stack = stackBegin; + + for (int i = 0; i < fieldCount; ++i) + { + bool inFloatReg = fields[i].isFloat && fReg < fRegEnd; + bool inGenReg = aReg < aRegEnd; + + if (fields[i].is8) + { + UINT64 alignedTo8 = ALIGN_UP(m_bufferPos, 8); + _ASSERTE(alignedTo8 + 8 <= sizeof(pData->buffer)); + m_bufferPos = alignedTo8; + const INT64* src = + inFloatReg ? (const INT64*)fReg++ : + inGenReg ? aReg++ : (const INT64*)Func::postIncrement(stack, 8); + *((INT64*)&pData->buffer[m_bufferPos]) = *src; + m_bufferPos += 8; + } + else + { + _ASSERTE(m_bufferPos + 4 <= sizeof(pData->buffer)); + const INT32* src = + inFloatReg ? (const INT32*)fReg++ : + inGenReg ? (const INT32*)aReg++ : (const INT32*)Func::postIncrement(stack, 4); + *((INT32*)&pData->buffer[m_bufferPos]) = *src; + m_bufferPos += 4; + } + } + // Sanity checks, make sure we've run through (and not overrun) all locations from ArgLocDesc + _ASSERTE(sir->m_cFloatReg < 0 || fReg - fRegBegin == sir->m_cFloatReg); + _ASSERTE(sir->m_cGenReg < 0 || aReg - aRegBegin == sir->m_cGenReg); + _ASSERTE(sir->m_byteStackSize < 0 || stack - stackBegin == sir->m_byteStackSize); + + return &pData->buffer[bufferPosBegin]; +} + LPVOID ProfileArgIterator::GetNextArgAddr() { - // TODO-RISCV64-CQ: copied codes from loongarch however not yet tested. - _ASSERTE(!"RISCV64:NYI"); WRAPPER_NO_CONTRACT; _ASSERTE(m_handle != nullptr); @@ -143,27 +174,56 @@ LPVOID ProfileArgIterator::GetNextArgAddr() } int argOffset = m_argIterator.GetNextOffset(); - if (argOffset == TransitionBlock::InvalidOffset) { return nullptr; } + const ArgLocDesc* sir = m_argIterator.GetArgLocDescForStructInRegs(); + if (sir) + { + // If both fields are in registers of same kind (either float or general) and both are 8 bytes, no need to copy. + // We can get away with returning a ptr to argumentRegisters since the struct would have the same layout. + if ((sir->m_cFloatReg ^ sir->m_cGenReg) != 2 || + (sir->m_structFields & STRUCT_HAS_8BYTES_FIELDS_MASK) != STRUCT_HAS_8BYTES_FIELDS_MASK) + { + return CopyStructFromRegisters(sir); + } + } + + int argSize = m_argIterator.IsArgPassedByRef() ? sizeof(void*) : m_argIterator.GetArgSize(); if (TransitionBlock::IsFloatArgumentRegisterOffset(argOffset)) { - return (LPBYTE)&pData->floatArgumentRegisters + (argOffset - TransitionBlock::GetOffsetOfFloatArgumentRegisters()); + int offset = argOffset - TransitionBlock::GetOffsetOfFloatArgumentRegisters(); + _ASSERTE(offset + argSize <= sizeof(pData->floatArgumentRegisters)); + return (LPBYTE)&pData->floatArgumentRegisters + offset; } LPVOID pArg = nullptr; if (TransitionBlock::IsArgumentRegisterOffset(argOffset)) { - pArg = (LPBYTE)&pData->argumentRegisters + (argOffset - TransitionBlock::GetOffsetOfArgumentRegisters()); + int offset = argOffset - TransitionBlock::GetOffsetOfArgumentRegisters(); + if (offset + argSize > sizeof(pData->argumentRegisters)) + { + // Struct partially spilled on stack + const int regIndex = NUM_ARGUMENT_REGISTERS - 1; // first part of struct must be in last register + _ASSERTE(regIndex == offset / sizeof(pData->argumentRegisters.a[0])); + const int neededSpace = 2 * sizeof(INT64); + _ASSERTE(argSize <= neededSpace); + _ASSERTE(m_bufferPos + neededSpace <= sizeof(pData->buffer)); + INT64* dest = (INT64*)&pData->buffer[m_bufferPos]; + dest[0] = pData->argumentRegisters.a[regIndex]; + // spilled part must be first on stack (if we copy too much, that's ok) + dest[1] = *(INT64*)pData->profiledSp; + m_bufferPos += neededSpace; + return dest; + } + pArg = (LPBYTE)&pData->argumentRegisters + offset; } else { _ASSERTE(TransitionBlock::IsStackArgumentOffset(argOffset)); - pArg = (LPBYTE)pData->profiledSp + (argOffset - TransitionBlock::GetOffsetOfArgs()); } @@ -177,8 +237,6 @@ LPVOID ProfileArgIterator::GetNextArgAddr() LPVOID ProfileArgIterator::GetHiddenArgValue(void) { - // TODO-RISCV64-CQ: copied codes from loongarch however not yet tested. - _ASSERTE(!"RISCV64:NYI"); LIMITED_METHOD_CONTRACT; PROFILE_PLATFORM_SPECIFIC_DATA* pData = reinterpret_cast(m_handle); @@ -188,8 +246,6 @@ LPVOID ProfileArgIterator::GetHiddenArgValue(void) LPVOID ProfileArgIterator::GetThis(void) { - // TODO-RISCV64-CQ: copied codes from loongarch however not yet tested. - _ASSERTE(!"RISCV64:NYI"); CONTRACTL { NOTHROW; @@ -223,8 +279,6 @@ LPVOID ProfileArgIterator::GetThis(void) LPVOID ProfileArgIterator::GetReturnBufferAddr(void) { - // TODO-RISCV64-CQ: copied codes from loongarch however not yet tested. - _ASSERTE(!"RISCV64:NYI"); CONTRACTL { NOTHROW; @@ -242,66 +296,29 @@ LPVOID ProfileArgIterator::GetReturnBufferAddr(void) if (m_argIterator.HasRetBuffArg()) { - if ((pData->flags & PROFILE_ENTER) != 0) - { - return (LPVOID)pData->x8; - } - else - { - // On ARM64 there is no requirement for the method to preserve the value stored in x8. - // In order to workaround this JIT will explicitly return the return buffer address in x0. - _ASSERTE((pData->flags & PROFILE_LEAVE) != 0); - return (LPVOID)pData->argumentRegisters.a[0]; - } + // On RISC-V the method is not required to preserve the return buffer address passed in a0. + // However, JIT does that anyway if leave hook needs to be generated. + _ASSERTE((pData->flags & PROFILE_LEAVE) != 0); + return (LPVOID)pData->argumentRegisters.a[0]; } UINT fpReturnSize = m_argIterator.GetFPReturnSize(); - if (fpReturnSize != 0) + if (fpReturnSize) { - TypeHandle thReturnValueType; - m_argIterator.GetSig()->GetReturnTypeNormalized(&thReturnValueType); - if (!thReturnValueType.IsNull() && thReturnValueType.IsHFA()) + if ((fpReturnSize & STRUCT_HAS_8BYTES_FIELDS_MASK) == STRUCT_HAS_8BYTES_FIELDS_MASK || + (fpReturnSize & STRUCT_FLOAT_FIELD_ONLY_ONE)) { - UINT hfaFieldSize = fpReturnSize / 4; - UINT totalSize = m_argIterator.GetSig()->GetReturnTypeSize(); - _ASSERTE(totalSize % hfaFieldSize == 0); - _ASSERTE(totalSize <= 16); - - BYTE *dest = pData->buffer; - for (UINT floatRegIdx = 0; floatRegIdx < totalSize / hfaFieldSize; ++floatRegIdx) - { - if (hfaFieldSize == 4) - { - *(UINT32*)dest = *(UINT32*)&pData->floatArgumentRegisters.f[floatRegIdx]; - dest += 4; - } - else if (hfaFieldSize == 8) - { - *(UINT64*)dest = *(UINT64*)&pData->floatArgumentRegisters.f[floatRegIdx]; - dest += 8; - } - else - { - _ASSERTE(!"unimplemented on RISCV64 yet!"); -#if 0 - _ASSERTE(hfaFieldSize == 16); - *(NEON128*)dest = pData->floatArgumentRegisters.f[floatRegIdx]; - dest += 16; -#endif - } - - if (floatRegIdx > 8) - { - // There's only space for 8 arguments in buffer - _ASSERTE(FALSE); - break; - } - } - - return pData->buffer; + return &pData->floatArgumentRegisters.f[0]; } - - return &pData->floatArgumentRegisters.f[0]; + ArgLocDesc sir; + sir.m_idxFloatReg = 0; + sir.m_cFloatReg = -1; + sir.m_idxGenReg = 0; + sir.m_cGenReg = -1; + sir.m_byteStackIndex = 0; + sir.m_byteStackSize = -1; + sir.m_structFields = fpReturnSize; + return CopyStructFromRegisters(&sir); } if (!m_argIterator.GetSig()->IsReturnTypeVoid()) @@ -312,8 +329,4 @@ LPVOID ProfileArgIterator::GetReturnBufferAddr(void) return nullptr; } -#undef PROFILE_ENTER -#undef PROFILE_LEAVE -#undef PROFILE_TAILCALL - #endif // PROFILING_SUPPORTED diff --git a/src/coreclr/vm/riscv64/stubs.cpp b/src/coreclr/vm/riscv64/stubs.cpp index 82e48ff0e9b3e3..dd4c11c8a0f11d 100644 --- a/src/coreclr/vm/riscv64/stubs.cpp +++ b/src/coreclr/vm/riscv64/stubs.cpp @@ -476,7 +476,23 @@ void HelperMethodFrame::UpdateRegDisplay(const PREGDISPLAY pRD) #ifndef DACCESS_COMPILE void ThisPtrRetBufPrecode::Init(MethodDesc* pMD, LoaderAllocator *pLoaderAllocator) { - _ASSERTE(!"RISCV64: not implementation on riscv64!!!"); + WRAPPER_NO_CONTRACT; + + //Initially + //a0 -This ptr + //a1 -ReturnBuffer + m_rgCode[0] = 0x00050f93; // addi t6, a0, 0x0 + m_rgCode[1] = 0x00058513; // addi a0, a1, 0x0 + m_rgCode[2] = 0x000f8593; // addi a1, t6, 0x0 + m_rgCode[3] = 0x00000f97; // auipc t6, 0 + m_rgCode[4] = 0x00cfbf83; // ld t6, 12(t6) + m_rgCode[5] = 0x000f8067; // jalr x0, 0(t6) + + _ASSERTE((UINT32*)&m_pTarget == &m_rgCode[6]); + _ASSERTE(6 == ARRAY_SIZE(m_rgCode)); + + m_pTarget = GetPreStubEntryPoint(); + m_pMethodDesc = (TADDR)pMD; } #endif // !DACCESS_COMPILE @@ -833,12 +849,6 @@ PTR_CONTEXT GetCONTEXTFromRedirectedStubStackFrame(T_CONTEXT * pContext) return *ppContext; } -void RedirectForThreadAbort() -{ - // ThreadAbort is not supported in .net core - throw "NYI"; -} - #if !defined(DACCESS_COMPILE) FaultingExceptionFrame *GetFrameFromRedirectedStubStackFrame (DISPATCHER_CONTEXT *pDispatcherContext) { @@ -948,7 +958,15 @@ void UMEntryThunkCode::Encode(UMEntryThunkCode *pEntryThunkCodeRX, BYTE* pTarget void UMEntryThunkCode::Poison() { - _ASSERTE(!"RISCV64: not implementation on riscv64!!!"); + ExecutableWriterHolder thunkWriterHolder(this, sizeof(UMEntryThunkCode)); + UMEntryThunkCode *pThisRW = thunkWriterHolder.GetRW(); + + pThisRW->m_pTargetCode = (TADDR)UMEntryThunk::ReportViolation; + + // ld a0, 24(t6) + pThisRW->m_code[1] = 0x018fb503; + + ClrFlushInstructionCache(&m_code,sizeof(m_code)); } #endif // DACCESS_COMPILE diff --git a/src/coreclr/vm/riscv64/unixstubs.cpp b/src/coreclr/vm/riscv64/unixstubs.cpp index d51902a949f26c..878d5b003686b6 100644 --- a/src/coreclr/vm/riscv64/unixstubs.cpp +++ b/src/coreclr/vm/riscv64/unixstubs.cpp @@ -2,11 +2,3 @@ // The .NET Foundation licenses this file to you under the MIT license. #include "common.h" - -extern "C" -{ - void RedirectForThrowControl() - { - PORTABILITY_ASSERT("Implement for PAL"); - } -}; diff --git a/src/coreclr/vm/siginfo.cpp b/src/coreclr/vm/siginfo.cpp index b9807b51ba4af8..eb35f3a372538f 100644 --- a/src/coreclr/vm/siginfo.cpp +++ b/src/coreclr/vm/siginfo.cpp @@ -4962,11 +4962,6 @@ void PromoteCarefully(promote_func fn, #if !defined(DACCESS_COMPILE) - // - // Sanity check the stack scan limit - // - assert(sc->stack_limit != 0); - // Note that the base is at a higher address than the limit, since the stack // grows downwards. // To check whether the object is in the stack or not, we also need to check the sc->stack_limit. diff --git a/src/coreclr/vm/stackwalk.cpp b/src/coreclr/vm/stackwalk.cpp index cb1f63a52b41df..e67334bd51fc7f 100644 --- a/src/coreclr/vm/stackwalk.cpp +++ b/src/coreclr/vm/stackwalk.cpp @@ -19,11 +19,12 @@ #endif // FEATURE_INTERPRETER #include "gcinfodecoder.h" - #ifdef FEATURE_EH_FUNCLETS #define PROCESS_EXPLICIT_FRAME_BEFORE_MANAGED_FRAME #endif +#include "exinfo.h" + CrawlFrame::CrawlFrame() { LIMITED_METHOD_DAC_CONTRACT; @@ -1108,8 +1109,11 @@ void StackFrameIterator::CommonCtor(Thread * pThread, PTR_Frame pFrame, ULONG32 m_sfParent = StackFrame(); ResetGCRefReportingState(); m_fDidFuncletReportGCReferences = true; + m_isRuntimeWrappedExceptions = false; #endif // FEATURE_EH_FUNCLETS - + m_forceReportingWhileSkipping = ForceGCReportingStage::Off; + m_movedPastFirstExInfo = false; + m_fFuncletNotSeen = false; #if defined(RECORD_RESUMABLE_FRAME_SP) m_pvResumableFrameTargetSP = NULL; #endif @@ -1209,6 +1213,13 @@ BOOL StackFrameIterator::Init(Thread * pThread, m_exInfoWalk.WalkToPosition(dac_cast(m_pStartFrame), false); #endif // ELIMINATE_FEF +#ifdef FEATURE_EH_FUNCLETS + if (g_isNewExceptionHandlingEnabled) + { + m_pNextExInfo = pThread->GetExceptionState()->GetCurrentExInfo(); + } +#endif // FEATURE_EH_FUNCLETS + // // These fields are used in the iteration and will be updated on a per-frame basis: // @@ -1613,9 +1624,34 @@ StackWalkAction StackFrameIterator::Filter(void) #if defined(FEATURE_EH_FUNCLETS) ExceptionTracker* pTracker = m_crawl.pThread->GetExceptionState()->GetCurrentExceptionTracker(); + ExInfo* pExInfo = m_crawl.pThread->GetExceptionState()->GetCurrentExInfo(); fRecheckCurrentFrame = false; fSkipFuncletCallback = true; + if ((m_flags & GC_FUNCLET_REFERENCE_REPORTING) && (pExInfo != NULL) && (m_crawl.GetRegisterSet()->SP > (SIZE_T)pExInfo)) + { + if (!m_movedPastFirstExInfo) + { + if ((pExInfo->m_passNumber == 2) && !pExInfo->m_csfEnclosingClause.IsNull() && m_sfFuncletParent.IsNull()) + { + // We are in the 2nd pass and we have already called an exceptionally called + // a finally funclet, but we have not seen any funclet on the call stack yet. + // Simulate that we have actualy seen a finally funclet during this pass and + // that it didn't report GC references to ensure that the references will be + // reported by the parent correctly. + m_sfFuncletParent = (StackFrame)pExInfo->m_csfEnclosingClause; + m_sfParent = m_sfFuncletParent; + m_fProcessNonFilterFunclet = true; + m_fDidFuncletReportGCReferences = false; + m_fFuncletNotSeen = true; + STRESS_LOG3(LF_GCROOTS, LL_INFO100, + "STACKWALK: Moved over first ExInfo @ %p in second pass, SP: %p, Enclosing clause: %p\n", + pExInfo, (void*)m_crawl.GetRegisterSet()->SP, (void*)m_sfFuncletParent.SP); + } + m_movedPastFirstExInfo = true; + } + } + // by default, there is no funclet for the current frame // that reported GC references m_crawl.fShouldParentToFuncletSkipReportingGCReferences = false; @@ -1812,6 +1848,17 @@ StackWalkAction StackFrameIterator::Filter(void) // can use it. m_sfParent = m_sfIntermediaryFuncletParent; fSkipFuncletCallback = false; + + if (g_isNewExceptionHandlingEnabled) + { + if (!ExecutionManager::IsManagedCode(GetIP(m_crawl.GetRegisterSet()->pCallerContext))) + { + // Initiate force reporting of references in the new managed exception handling code frames. + // These frames are still alive when we are in a finally funclet. + m_forceReportingWhileSkipping = ForceGCReportingStage::LookForManagedFrame; + STRESS_LOG0(LF_GCROOTS, LL_INFO100, "STACKWALK: Setting m_forceReportingWhileSkipping = ForceGCReportingStage::LookForManagedFrame\n"); + } + } } } } @@ -1825,6 +1872,7 @@ StackWalkAction StackFrameIterator::Filter(void) { // Get a reference to the funclet's parent frame. m_sfFuncletParent = ExceptionTracker::FindParentStackFrameForStackWalk(&m_crawl, true); + _ASSERTE(!m_fFuncletNotSeen); if (m_sfFuncletParent.IsNull()) { @@ -1850,6 +1898,17 @@ StackWalkAction StackFrameIterator::Filter(void) // can use it. m_sfParent = m_sfFuncletParent; + if (g_isNewExceptionHandlingEnabled) + { + if (!ExecutionManager::IsManagedCode(GetIP(m_crawl.GetRegisterSet()->pCallerContext))) + { + // Initiate force reporting of references in the new managed exception handling code frames. + // These frames are still alive when we are in a finally funclet. + m_forceReportingWhileSkipping = ForceGCReportingStage::LookForManagedFrame; + STRESS_LOG0(LF_GCROOTS, LL_INFO100, "STACKWALK: Setting m_forceReportingWhileSkipping = ForceGCReportingStage::LookForManagedFrame\n"); + } + } + // For non-filter funclets, we will make the callback for the funclet // but skip all the frames until we reach the parent method. When we do, // we will make a callback for it as well and then continue to make callbacks @@ -2012,10 +2071,15 @@ StackWalkAction StackFrameIterator::Filter(void) // check if the parent frame of the funclet is also handling an exception. if it is, then we will need to // report roots for it since the catch handler may use references inside it. - STRESS_LOG0(LF_GCROOTS, LL_INFO100, - "STACKWALK: Reached parent of funclet which didn't report GC roots, since funclet is already unwound.\n"); + if (g_isNewExceptionHandlingEnabled) + { + STRESS_LOG2(LF_GCROOTS, LL_INFO100, + "STACKWALK: Reached parent of funclet which didn't report GC roots, since funclet is already unwound, pExInfo->m_sfCallerOfActualHandlerFrame=%p, m_sfFuncletParent=%p\n", (void*)pExInfo->m_sfCallerOfActualHandlerFrame.SP, (void*)m_sfFuncletParent.SP); + } - if (pTracker->GetCallerOfActualHandlingFrame() == m_sfFuncletParent) + _ASSERT(pExInfo != NULL || pTracker != NULL); + if ((pExInfo && pExInfo->m_sfCallerOfActualHandlerFrame == m_sfFuncletParent) || + (pTracker && pTracker->GetCallerOfActualHandlingFrame() == m_sfFuncletParent)) { // we should not skip reporting for this parent frame shouldSkipReporting = false; @@ -2030,15 +2094,29 @@ StackWalkAction StackFrameIterator::Filter(void) // would report garbage values as live objects. So instead parent can use the IP of the resume // address of catch funclet to report live GC references. m_crawl.fShouldParentFrameUseUnwindTargetPCforGCReporting = true; - // Store catch clause info. Helps retrieve IP of resume address. - m_crawl.ehClauseForCatch = pTracker->GetEHClauseForCatch(); - - STRESS_LOG3(LF_GCROOTS, LL_INFO100, - "STACKWALK: Parent of funclet which didn't report GC roots is handling an exception at 0x%p" - "(EH handler range [%x, %x) ), so we need to specially report roots to ensure variables alive" - " in its handler stay live.\n", - pTracker->GetCatchToCallPC(), m_crawl.ehClauseForCatch.HandlerStartPC, - m_crawl.ehClauseForCatch.HandlerEndPC); + + if (g_isNewExceptionHandlingEnabled) + { + m_crawl.ehClauseForCatch = pExInfo->m_ClauseForCatch; + STRESS_LOG2(LF_GCROOTS, LL_INFO100, + "STACKWALK: Parent of funclet which didn't report GC roots is handling an exception" + "(EH handler range [%x, %x) ), so we need to specially report roots to ensure variables alive" + " in its handler stay live.\n", + m_crawl.ehClauseForCatch.HandlerStartPC, + m_crawl.ehClauseForCatch.HandlerEndPC); + } + else + { + // Store catch clause info. Helps retrieve IP of resume address. + m_crawl.ehClauseForCatch = pTracker->GetEHClauseForCatch(); + + STRESS_LOG3(LF_GCROOTS, LL_INFO100, + "STACKWALK: Parent of funclet which didn't report GC roots is handling an exception at 0x%p" + "(EH handler range [%x, %x) ), so we need to specially report roots to ensure variables alive" + " in its handler stay live.\n", + pTracker->GetCatchToCallPC(), m_crawl.ehClauseForCatch.HandlerStartPC, + m_crawl.ehClauseForCatch.HandlerEndPC); + } } else if (!m_crawl.IsFunclet()) { @@ -2047,11 +2125,29 @@ StackWalkAction StackFrameIterator::Filter(void) // parent is a funclet since the leaf funclet didn't report any references and // we might have a catch handler below us that might contain GC roots. m_fDidFuncletReportGCReferences = true; + STRESS_LOG0(LF_GCROOTS, LL_INFO100, + "STACKWALK: Reached parent of funclet which didn't report GC roots is not a funclet, resetting m_fDidFuncletReportGCReferences to true\n"); } - STRESS_LOG4(LF_GCROOTS, LL_INFO100, - "Funclet didn't report references: handling frame: %p, m_sfFuncletParent = %p, is funclet: %d, skip reporting %d\n", - pTracker->GetEstablisherOfActualHandlingFrame().SP, m_sfFuncletParent.SP, m_crawl.IsFunclet(), shouldSkipReporting); + if (g_isNewExceptionHandlingEnabled) + { + _ASSERTE(!ExceptionTracker::HasFrameBeenUnwoundByAnyActiveException(&m_crawl)); + if (m_fFuncletNotSeen && m_crawl.IsFunclet()) + { + _ASSERTE(!m_fProcessIntermediaryNonFilterFunclet); + _ASSERTE(m_crawl.fShouldCrawlframeReportGCReferences); + m_fDidFuncletReportGCReferences = true; + shouldSkipReporting = false; + m_crawl.fShouldParentFrameUseUnwindTargetPCforGCReporting = true; + m_crawl.ehClauseForCatch = pExInfo->m_ClauseForCatch; + } + } + else + { + STRESS_LOG4(LF_GCROOTS, LL_INFO100, + "Funclet didn't report references: handling frame: %p, m_sfFuncletParent = %p, is funclet: %d, skip reporting %d\n", + pTracker->GetEstablisherOfActualHandlingFrame().SP, m_sfFuncletParent.SP, m_crawl.IsFunclet(), shouldSkipReporting); + } } m_crawl.fShouldParentToFuncletSkipReportingGCReferences = shouldSkipReporting; @@ -2109,7 +2205,7 @@ StackWalkAction StackFrameIterator::Filter(void) } else if (fSkipFuncletCallback && (m_flags & GC_FUNCLET_REFERENCE_REPORTING)) { - if (!m_sfParent.IsNull()) + if (!m_sfParent.IsNull() && (m_forceReportingWhileSkipping == ForceGCReportingStage::Off)) { STRESS_LOG4(LF_GCROOTS, LL_INFO100, "STACKWALK: %s: not making callback for this frame, SPOfParent = %p, \ @@ -2122,6 +2218,22 @@ StackWalkAction StackFrameIterator::Filter(void) // don't stop here break; } + + if (m_forceReportingWhileSkipping == ForceGCReportingStage::LookForManagedFrame) + { + // State indicating that the next marker frame should turn off the reporting again. That would be the caller of the managed RhThrowEx + m_forceReportingWhileSkipping = ForceGCReportingStage::LookForMarkerFrame; + STRESS_LOG0(LF_GCROOTS, LL_INFO100, "STACKWALK: Setting m_forceReportingWhileSkipping = ForceGCReportingStage::LookForMarkerFrame\n"); + } + +#ifdef _DEBUG + if (m_forceReportingWhileSkipping != ForceGCReportingStage::Off) + { + STRESS_LOG3(LF_GCROOTS, LL_INFO100, + "STACKWALK: Force callback for skipped function m_crawl.pFunc = %pM (%s.%s)\n", m_crawl.pFunc, m_crawl.pFunc->m_pszDebugClassName, m_crawl.pFunc->m_pszDebugMethodName); + _ASSERTE((m_crawl.pFunc->GetMethodTable() == g_pEHClass) || (strcmp(m_crawl.pFunc->m_pszDebugClassName, "ILStubClass") == 0) || (strcmp(m_crawl.pFunc->m_pszDebugMethodName, "CallFinallyFunclet") == 0)); + } +#endif } } } @@ -2215,6 +2327,11 @@ StackWalkAction StackFrameIterator::Filter(void) fStop = true; } } + if (m_forceReportingWhileSkipping == ForceGCReportingStage::LookForMarkerFrame) + { + m_forceReportingWhileSkipping = ForceGCReportingStage::Off; + STRESS_LOG0(LF_GCROOTS, LL_INFO100, "STACKWALK: Setting m_forceReportingWhileSkipping = ForceGCReportingStage::Off\n"); + } break; case SFITER_INITIAL_NATIVE_CONTEXT: @@ -3234,6 +3351,15 @@ void StackFrameIterator::PostProcessingForNoFrameTransition() #endif // ELIMINATE_FEF } // StackFrameIterator::PostProcessingForNoFrameTransition() +#ifdef FEATURE_EH_FUNCLETS +void StackFrameIterator::ResetNextExInfoForSP(TADDR SP) +{ + while (m_pNextExInfo && (SP > (TADDR)(m_pNextExInfo))) + { + m_pNextExInfo = m_pNextExInfo->m_pPrevExInfo; + } +} +#endif // FEATURE_EH_FUNCLETS #if defined(TARGET_AMD64) && !defined(DACCESS_COMPILE) static CrstStatic g_StackwalkCacheLock; // Global StackwalkCache lock; only used on AMD64 diff --git a/src/coreclr/vm/stackwalk.h b/src/coreclr/vm/stackwalk.h index a85c85650a5778..fd0fa7c4c6e63e 100644 --- a/src/coreclr/vm/stackwalk.h +++ b/src/coreclr/vm/stackwalk.h @@ -63,11 +63,15 @@ StackWalkAction StackWalkFunctions(Thread * thread, PSTACKWALKFRAMESCALLBACK pCa #define StackWalkFunctions(thread, callBack, userdata) thread->StackWalkFrames(METHODSONLY, (callBack),(userData)) */ +namespace AsmOffsetsAsserts +{ + class AsmOffsets; +}; class CrawlFrame { public: - + friend class AsmOffsetsAsserts::AsmOffsets; #ifdef TARGET_X86 friend StackWalkAction TAStackCrawlCallBack(CrawlFrame* pCf, void* data); #endif // TARGET_X86 @@ -567,6 +571,7 @@ class ExInfoWalker class StackFrameIterator { + friend class AsmOffsetsAsserts::AsmOffsets; public: // This constructor is for the usage pattern of creating an uninitialized StackFrameIterator and then // calling Init() on it. @@ -604,6 +609,36 @@ class StackFrameIterator // advance to the next frame according to the stackwalk flags StackWalkAction Next(void); +#ifdef FEATURE_EH_FUNCLETS + void ResetNextExInfoForSP(TADDR SP); + + ExInfo* GetNextExInfo() + { + return m_pNextExInfo; + } + + void SetAdjustedControlPC(TADDR pc) + { + m_AdjustedControlPC = pc; + } + + void UpdateIsRuntimeWrappedExceptions() + { + CONTRACTL + { + MODE_ANY; + GC_TRIGGERS; + NOTHROW; + } + CONTRACTL_END + +#if defined(FEATURE_EH_FUNCLETS) && !defined(DACCESS_COMPILE) + m_isRuntimeWrappedExceptions = (m_crawl.pFunc != NULL) && m_crawl.pFunc->GetModule()->IsRuntimeWrapExceptions(); +#endif // FEATURE_EH_FUNCLETS && !DACCESS_COMPILE + } + +#endif // FEATURE_EH_FUNCLETS + enum FrameState { SFITER_UNINITIALIZED, // uninitialized @@ -626,6 +661,24 @@ class StackFrameIterator #endif // _DEBUG private: + + // For the new exception handling that uses managed code to dispatch the + // exceptions, we need to force the stack walker to report GC references + // in the exception handling code frames, since they are alive. This is + // different from the old exception handling where no frames below the + // funclets upto the parent frame are alive. + enum class ForceGCReportingStage : BYTE + { + Off = 0, + // The stack walker has hit a funclet, we are looking for the first managed + // frame that would be one of the managed exception handling code frames + LookForManagedFrame = 1, + // The stack walker has already hit a managed exception handling code frame, + // we are looking for a marker frame which indicates the native caller of + // the managed exception handling code + LookForMarkerFrame = 2 + }; + // This is a helper for the two constructors. void CommonCtor(Thread * pThread, PTR_Frame pFrame, ULONG32 flags); @@ -672,6 +725,7 @@ class StackFrameIterator if (!ResetOnlyIntermediaryState) { + m_fFuncletNotSeen = false; m_sfFuncletParent = StackFrame(); m_fProcessNonFilterFunclet = false; } @@ -692,7 +746,6 @@ class StackFrameIterator // This is the real starting explicit frame. If m_pStartFrame is NULL, // then this is equal to m_pThread->GetFrame(). Otherwise this is equal to m_pStartFrame. INDEBUG(PTR_Frame m_pRealStartFrame); - ULONG32 m_flags; // StackWalkFrames flags. ICodeManagerFlags m_codeManFlags; ExecutionManager::ScanFlag m_scanFlag; @@ -717,11 +770,21 @@ class StackFrameIterator StackFrame m_sfIntermediaryFuncletParent; bool m_fProcessIntermediaryNonFilterFunclet; bool m_fDidFuncletReportGCReferences; + bool m_isRuntimeWrappedExceptions; #endif // FEATURE_EH_FUNCLETS - + // State of forcing of GC reference reporting for managed exception handling methods (RhExThrow, RhDispatchEx etc) + ForceGCReportingStage m_forceReportingWhileSkipping; + // The stack walk has moved past the first ExInfo location on the stack + bool m_movedPastFirstExInfo; + // Indicates that no funclet was seen during the current stack walk yet + bool m_fFuncletNotSeen; #if defined(RECORD_RESUMABLE_FRAME_SP) LPVOID m_pvResumableFrameTargetSP; #endif // RECORD_RESUMABLE_FRAME_SP +#ifdef FEATURE_EH_FUNCLETS + ExInfo* m_pNextExInfo; + TADDR m_AdjustedControlPC; +#endif // FEATURE_EH_FUNCLETS }; void SetUpRegdisplayForStackWalk(Thread * pThread, T_CONTEXT * pContext, REGDISPLAY * pRegdisplay); diff --git a/src/coreclr/vm/syncblk.cpp b/src/coreclr/vm/syncblk.cpp index bd235093b2d9c9..13ab5daf4aa836 100644 --- a/src/coreclr/vm/syncblk.cpp +++ b/src/coreclr/vm/syncblk.cpp @@ -992,11 +992,11 @@ void SyncBlockCache::DeleteSyncBlock(SyncBlock *psb) #endif // !TARGET_UNIX } -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER // clean up EnC info if (psb->m_pEnCInfo) psb->m_pEnCInfo->Cleanup(); -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER // Destruct the SyncBlock, but don't reclaim its memory. (Overridden // operator delete). @@ -2930,7 +2930,7 @@ bool SyncBlock::SetInteropInfo(InteropSyncBlockInfo* pInteropInfo) NULL) == NULL); } -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER // Store information about fields added to this object by EnC // This must be called from a thread in the AppDomain of this object instance void SyncBlock::SetEnCInfo(EnCSyncBlockInfo *pEnCInfo) @@ -2944,7 +2944,7 @@ void SyncBlock::SetEnCInfo(EnCSyncBlockInfo *pEnCInfo) _ASSERTE( m_pEnCInfo == NULL ); m_pEnCInfo = pEnCInfo; } -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER #endif // !DACCESS_COMPILE #if defined(HOST_64BIT) && defined(_DEBUG) diff --git a/src/coreclr/vm/syncblk.h b/src/coreclr/vm/syncblk.h index 7fba11541532ff..a0def9916569fd 100644 --- a/src/coreclr/vm/syncblk.h +++ b/src/coreclr/vm/syncblk.h @@ -71,10 +71,10 @@ class AwareLock; class Thread; class AppDomain; -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER class EnCSyncBlockInfo; typedef DPTR(EnCSyncBlockInfo) PTR_EnCSyncBlockInfo; -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER #include "eventstore.hpp" #include "synch.h" @@ -990,10 +990,10 @@ class SyncBlock PTR_InteropSyncBlockInfo m_pInteropInfo; protected: -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER // And if the object has new fields added via EnC, this is a list of them PTR_EnCSyncBlockInfo m_pEnCInfo; -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER // We thread two different lists through this link. When the SyncBlock is // active, we create a list of waiting threads here. When the SyncBlock is @@ -1025,9 +1025,9 @@ class SyncBlock public: SyncBlock(DWORD indx) : m_Monitor(indx) -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER , m_pEnCInfo(PTR_NULL) -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER , m_dwHashCode(0) , m_BSTRTrailByte(0) { @@ -1125,7 +1125,7 @@ class SyncBlock // True if the InteropInfo block was successfully set with the passed in value. bool SetInteropInfo(InteropSyncBlockInfo* pInteropInfo); -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER // Get information about fields added to this object by the Debugger's Edit and Continue support PTR_EnCSyncBlockInfo GetEnCInfo() { @@ -1135,7 +1135,7 @@ class SyncBlock // Store information about fields added to this object by the Debugger's Edit and Continue support void SetEnCInfo(EnCSyncBlockInfo *pEnCInfo); -#endif // EnC_SUPPORTED +#endif // FEATURE_METADATA_UPDATER DWORD GetHashCode() { diff --git a/src/coreclr/vm/threads.cpp b/src/coreclr/vm/threads.cpp index edbd6a011f33b3..fccbcc7bb3bfb1 100644 --- a/src/coreclr/vm/threads.cpp +++ b/src/coreclr/vm/threads.cpp @@ -7284,11 +7284,11 @@ static void ManagedThreadBase_DispatchMiddle(ManagedThreadCallState *pCallState) // // Without unwind_and_continue_handler below, the exception will fly up the stack to // this point, where it will be rethrown and thus leak out. - INSTALL_UNWIND_AND_CONTINUE_HANDLER; + INSTALL_UNWIND_AND_CONTINUE_HANDLER_EX; EX_RETHROW; - UNINSTALL_UNWIND_AND_CONTINUE_HANDLER; + UNINSTALL_UNWIND_AND_CONTINUE_HANDLER_EX(true); } } EX_END_CATCH(SwallowAllExceptions); @@ -8206,7 +8206,7 @@ void Thread::InitializeSpecialUserModeApc() WRAPPER_NO_CONTRACT; static_assert_no_msg(OFFSETOF__APC_CALLBACK_DATA__ContextRecord == offsetof(CLONE_APC_CALLBACK_DATA, ContextRecord)); - HMODULE hKernel32 = WszLoadLibraryEx(WINDOWS_KERNEL32_DLLNAME_W, NULL, LOAD_LIBRARY_SEARCH_SYSTEM32); + HMODULE hKernel32 = WszLoadLibrary(WINDOWS_KERNEL32_DLLNAME_W, NULL, LOAD_LIBRARY_SEARCH_SYSTEM32); // See if QueueUserAPC2 exists QueueUserAPC2Proc pfnQueueUserAPC2Proc = (QueueUserAPC2Proc)GetProcAddress(hKernel32, "QueueUserAPC2"); @@ -8233,13 +8233,13 @@ void Thread::InitializeSpecialUserModeApc() #endif // FEATURE_SPECIAL_USER_MODE_APC #if !(defined(TARGET_WINDOWS) && defined(TARGET_X86)) -#if defined(TARGET_WINDOWS) && defined(TARGET_AMD64) +#if defined(TARGET_AMD64) EXTERN_C void STDCALL ClrRestoreNonvolatileContextWorker(PCONTEXT ContextRecord, DWORD64 ssp); #endif void ClrRestoreNonvolatileContext(PCONTEXT ContextRecord) { -#if defined(TARGET_WINDOWS) && defined(TARGET_AMD64) +#if defined(TARGET_AMD64) DWORD64 ssp = GetSSP(ContextRecord); __asan_handle_no_return(); ClrRestoreNonvolatileContextWorker(ContextRecord, ssp); diff --git a/src/coreclr/vm/threads.h b/src/coreclr/vm/threads.h index 1665565c5e6406..f69d3df1e7493c 100644 --- a/src/coreclr/vm/threads.h +++ b/src/coreclr/vm/threads.h @@ -192,15 +192,9 @@ struct ThreadLocalBlock ThreadStaticHandleTable * m_pThreadStaticHandleTable; - // Need to keep a list of the pinning handles we've created - // so they can be cleaned up when the thread dies - ObjectHandleList m_PinningHandleList; - public: #ifndef DACCESS_COMPILE - void AddPinningHandleToList(OBJECTHANDLE oh); - void FreePinningHandles(); void AllocateThreadStaticHandles(Module * pModule, ThreadLocalModule * pThreadLocalModule); OBJECTHANDLE AllocateStaticFieldObjRefPtrs(int nRequested, OBJECTHANDLE* ppLazyAllocate = NULL); void InitThreadStaticHandleTable(); diff --git a/src/coreclr/vm/threadstatics.cpp b/src/coreclr/vm/threadstatics.cpp index e3430acf8e4ff2..d09d90c83c12e2 100644 --- a/src/coreclr/vm/threadstatics.cpp +++ b/src/coreclr/vm/threadstatics.cpp @@ -110,9 +110,6 @@ void ThreadLocalBlock::FreeTable() delete m_pThreadStaticHandleTable; m_pThreadStaticHandleTable = NULL; } - - // Free any pinning handles we may have created - FreePinningHandles(); } void ThreadLocalBlock::EnsureModuleIndex(ModuleIndex index) @@ -278,37 +275,6 @@ void ThreadLocalModule::SetClassFlags(MethodTable* pMT, DWORD dwFlags) } } -void ThreadLocalBlock::AddPinningHandleToList(OBJECTHANDLE oh) -{ - CONTRACTL - { - THROWS; - GC_NOTRIGGER; - MODE_ANY; - } - CONTRACTL_END; - ObjectHandleList::NodeType* pNewNode = new ObjectHandleList::NodeType(oh); - m_PinningHandleList.LinkHead(pNewNode); -} - -void ThreadLocalBlock::FreePinningHandles() -{ - CONTRACTL - { - NOTHROW; - GC_NOTRIGGER; - MODE_ANY; - } - CONTRACTL_END; - // Destroy all pinning handles in the list, and free the nodes - ObjectHandleList::NodeType* pHandleNode; - while ((pHandleNode = m_PinningHandleList.UnlinkHead()) != NULL) - { - DestroyPinningHandle(pHandleNode->data); - delete pHandleNode; - } -} - void ThreadLocalBlock::AllocateThreadStaticHandles(Module * pModule, PTR_ThreadLocalModule pThreadLocalModule) { CONTRACTL @@ -412,21 +378,12 @@ void ThreadLocalBlock::AllocateThreadStaticBoxes(MethodTable * pMT) TypeHandle th = pField->GetFieldTypeHandleThrowing(); MethodTable* pFieldMT = th.GetMethodTable(); - // AllocateStaticBox will pin this object if this class is FixedAddressVTStatics. - // We save this pinning handle in a list attached to the ThreadLocalBlock. When - // the thread dies, we release all the pinning handles in the list. - - OBJECTHANDLE handle; - OBJECTREF obj = MethodTable::AllocateStaticBox(pFieldMT, pMT->HasFixedAddressVTStatics(), &handle); + OBJECTREF obj = MethodTable::AllocateStaticBox(pFieldMT, pMT->HasFixedAddressVTStatics()); PTR_BYTE pStaticBase = pMT->GetGCThreadStaticsBasePointer(); _ASSERTE(pStaticBase != NULL); SetObjectReference( (OBJECTREF*)(pStaticBase + pField->GetOffset()), obj ); - - // If we created a pinning handle, save it to the list - if (handle != NULL) - AddPinningHandleToList(handle); } pField++; diff --git a/src/coreclr/vm/threadsuspend.cpp b/src/coreclr/vm/threadsuspend.cpp index 1a454a8dc54c12..4cf13a424dc722 100644 --- a/src/coreclr/vm/threadsuspend.cpp +++ b/src/coreclr/vm/threadsuspend.cpp @@ -963,6 +963,14 @@ BOOL Thread::ReadyForAsyncException() return FALSE; } +#ifdef FEATURE_EH_FUNCLETS + if (g_isNewExceptionHandlingEnabled) + { + // TODO: make thread abort work for the new exception handling + return FALSE; + } +#endif // FEATURE_EH_FUNCLETS + REGDISPLAY rd; Frame *pStartFrame = NULL; @@ -2255,7 +2263,16 @@ void Thread::HandleThreadAbort () exceptObj = CLRException::GetThrowableFromException(&eeExcept); } - RaiseTheExceptionInternalOnly(exceptObj, FALSE); +#ifdef FEATURE_EH_FUNCLETS + if (g_isNewExceptionHandlingEnabled) + { + DispatchManagedException(exceptObj); + } + else +#endif // FEATURE_EH_FUNCLETS + { + RaiseTheExceptionInternalOnly(exceptObj, FALSE); + } } END_PRESERVE_LAST_ERROR; @@ -3955,10 +3972,27 @@ ThrowControlForThread( STRESS_LOG0(LF_SYNC, LL_INFO100, "ThrowControlForThread Aborting\n"); - // Here we raise an exception. - INSTALL_MANAGED_EXCEPTION_DISPATCHER - RaiseComPlusException(); - UNINSTALL_MANAGED_EXCEPTION_DISPATCHER +#ifdef FEATURE_EH_FUNCLETS + if (g_isNewExceptionHandlingEnabled) + { + GCX_COOP(); + + EXCEPTION_RECORD exceptionRecord = {0}; + exceptionRecord.NumberParameters = MarkAsThrownByUs(exceptionRecord.ExceptionInformation); + exceptionRecord.ExceptionCode = EXCEPTION_COMPLUS; + exceptionRecord.ExceptionFlags = 0; + + OBJECTREF throwable = ExceptionTracker::CreateThrowable(&exceptionRecord, TRUE); + DispatchManagedException(throwable); + } + else +#endif // FEATURE_EH_FUNCLETS + { + // Here we raise an exception. + INSTALL_MANAGED_EXCEPTION_DISPATCHER + RaiseComPlusException(); + UNINSTALL_MANAGED_EXCEPTION_DISPATCHER + } } #if defined(FEATURE_HIJACK) && !defined(TARGET_UNIX) diff --git a/src/coreclr/vm/tieredcompilation.cpp b/src/coreclr/vm/tieredcompilation.cpp index ac068b067fde72..586f1945f5bd16 100644 --- a/src/coreclr/vm/tieredcompilation.cpp +++ b/src/coreclr/vm/tieredcompilation.cpp @@ -98,11 +98,7 @@ NativeCodeVersion::OptimizationTier TieredCompilationManager::GetInitialOptimiza return NativeCodeVersion::OptimizationTierOptimized; } - if (pMethodDesc->RequestedAggressiveOptimization()) - { - // Methods flagged with MethodImplOptions.AggressiveOptimization start with and stay at tier 1 - return NativeCodeVersion::OptimizationTier1; - } + _ASSERT(!pMethodDesc->RequestedAggressiveOptimization()); if (!pMethodDesc->GetLoaderAllocator()->GetCallCountingManager()->IsCallCountingEnabled(NativeCodeVersion(pMethodDesc))) { @@ -1075,50 +1071,40 @@ CORJIT_FLAGS TieredCompilationManager::GetJitFlags(PrepareCodeConfig *config) return flags; } - NativeCodeVersion::OptimizationTier newOptimizationTier; - if (!methodDesc->RequestedAggressiveOptimization()) + _ASSERT(!methodDesc->RequestedAggressiveOptimization()); + + if (g_pConfig->TieredCompilation_QuickJit()) { NativeCodeVersion::OptimizationTier currentTier = nativeCodeVersion.GetOptimizationTier(); - - if (g_pConfig->TieredCompilation_QuickJit()) + if (currentTier == NativeCodeVersion::OptimizationTier::OptimizationTier0Instrumented) { - if (currentTier == NativeCodeVersion::OptimizationTier::OptimizationTier0Instrumented) - { - flags.Set(CORJIT_FLAGS::CORJIT_FLAG_BBINSTR); - flags.Set(CORJIT_FLAGS::CORJIT_FLAG_TIER0); - return flags; - } - - if (currentTier == NativeCodeVersion::OptimizationTier::OptimizationTier1Instrumented) - { - flags.Set(CORJIT_FLAGS::CORJIT_FLAG_BBINSTR); - flags.Set(CORJIT_FLAGS::CORJIT_FLAG_TIER1); - return flags; - } - - _ASSERTE(!nativeCodeVersion.IsFinalTier()); + flags.Set(CORJIT_FLAGS::CORJIT_FLAG_BBINSTR); flags.Set(CORJIT_FLAGS::CORJIT_FLAG_TIER0); - if (g_pConfig->TieredPGO() && g_pConfig->TieredPGO_InstrumentOnlyHotCode()) - { - // If we plan to only instrument hot code we have to make an exception - // for cold methods with loops so if those self promote to OSR they need - // some profile to optimize, so here we allow JIT to enable instrumentation - // if current method has loops and is eligible for OSR. - flags.Set(CORJIT_FLAGS::CORJIT_FLAG_BBINSTR_IF_LOOPS); - } return flags; } - newOptimizationTier = NativeCodeVersion::OptimizationTierOptimized; - } - else - { - newOptimizationTier = NativeCodeVersion::OptimizationTier1; - flags.Set(CORJIT_FLAGS::CORJIT_FLAG_TIER1); + if (currentTier == NativeCodeVersion::OptimizationTier::OptimizationTier1Instrumented) + { + flags.Set(CORJIT_FLAGS::CORJIT_FLAG_BBINSTR); + flags.Set(CORJIT_FLAGS::CORJIT_FLAG_TIER1); + return flags; + } + + _ASSERTE(!nativeCodeVersion.IsFinalTier()); + flags.Set(CORJIT_FLAGS::CORJIT_FLAG_TIER0); + if (g_pConfig->TieredPGO() && g_pConfig->TieredPGO_InstrumentOnlyHotCode()) + { + // If we plan to only instrument hot code we have to make an exception + // for cold methods with loops so if those self promote to OSR they need + // some profile to optimize, so here we allow JIT to enable instrumentation + // if current method has loops and is eligible for OSR. + flags.Set(CORJIT_FLAGS::CORJIT_FLAG_BBINSTR_IF_LOOPS); + } + return flags; } methodDesc->GetLoaderAllocator()->GetCallCountingManager()->DisableCallCounting(nativeCodeVersion); - nativeCodeVersion.SetOptimizationTier(newOptimizationTier); + nativeCodeVersion.SetOptimizationTier(NativeCodeVersion::OptimizationTierOptimized); #ifdef FEATURE_INTERPRETER flags.Set(CORJIT_FLAGS::CORJIT_FLAG_MAKEFINALCODE); #endif diff --git a/src/coreclr/vm/typestring.cpp b/src/coreclr/vm/typestring.cpp index 88550d898378a8..e92e6d525312ee 100644 --- a/src/coreclr/vm/typestring.cpp +++ b/src/coreclr/vm/typestring.cpp @@ -801,15 +801,14 @@ void TypeString::AppendType(TypeNameBuilder& tnb, TypeHandle ty, Instantiation t StackSString ss; AppendType(ss, retAndArgTypes[0], format); - SString ssOpening(SString::Literal, "("); - ss += ssOpening; - + ss.Append(W("(")); + SString ssComma(SString::Literal, ", "); DWORD cArgs = fnPtr->GetNumArgs(); for (DWORD i = 1; i <= cArgs; i++) { if (i != 1) - ss += ssComma; + ss.Append(ssComma); AppendType(ss, retAndArgTypes[i], format); } @@ -817,20 +816,18 @@ void TypeString::AppendType(TypeNameBuilder& tnb, TypeHandle ty, Instantiation t if ((fnPtr->GetCallConv() & IMAGE_CEE_CS_CALLCONV_MASK) == IMAGE_CEE_CS_CALLCONV_VARARG) { if (cArgs) - ss += ssComma; + ss.Append(ssComma); + + ss.Append(W("...")); + } - SString ssEllipsis(SString::Literal, "..."); - ss += ssEllipsis; - } + ss.Append(W(")")); - SString ssClosing(SString::Literal, ")"); - ss += ssClosing; - tnb.AddNameNoEscaping(ss); } else - { - tnb.AddNameNoEscaping(W("")); + { + tnb.AddNameNoEscaping(W("")); } } @@ -941,13 +938,11 @@ void TypeString::AppendMethodImpl(SString& ss, MethodDesc *pMD, Instantiation ty { if (pMD->IsLCGMethod()) { - SString sss(SString::Literal, "DynamicClass"); - ss += sss; + ss.AppendUTF8("DynamicClass"); } else if (pMD->IsILStub()) { - SString sss(SString::Literal, ILStubResolver::GetStubClassName(pMD)); - ss += sss; + ss.AppendUTF8(ILStubResolver::GetStubClassName(pMD)); } } else @@ -956,10 +951,8 @@ void TypeString::AppendMethodImpl(SString& ss, MethodDesc *pMD, Instantiation ty AppendType(ss, th, typeInstantiation, format); } - SString sss1(SString::Literal, NAMESPACE_SEPARATOR_STR); - ss += sss1; - SString sss2(SString::Utf8, pMD->GetName()); - ss += sss2; + ss.AppendUTF8(NAMESPACE_SEPARATOR_STR); + ss.AppendUTF8(pMD->GetName()); if (pMD->HasMethodInstantiation() && !pMD->IsGenericMethodDefinition()) { @@ -972,40 +965,34 @@ void TypeString::AppendMethodImpl(SString& ss, MethodDesc *pMD, Instantiation ty SigFormat sigFormatter(pMD, th); const char* sigStr = sigFormatter.GetCStringParmsOnly(); - SString sss(SString::Utf8, sigStr); - ss += sss; + ss.AppendUTF8(sigStr); } - if (format & FormatStubInfo) { + if (format & FormatStubInfo) + { if (pMD->IsInstantiatingStub()) { - SString sss(SString::Literal, "{inst-stub}"); - ss += sss; + ss.AppendUTF8("{inst-stub}"); } if (pMD->IsUnboxingStub()) { - SString sss(SString::Literal, "{unbox-stub}"); - ss += sss; + ss.AppendUTF8("{unbox-stub}"); } if (pMD->IsSharedByGenericMethodInstantiations()) { - SString sss(SString::Literal, "{method-shared}"); - ss += sss; + ss.AppendUTF8("{method-shared}"); } else if (pMD->IsSharedByGenericInstantiations()) { - SString sss(SString::Literal, "{shared}"); - ss += sss; + ss.AppendUTF8("{shared}"); } if (pMD->RequiresInstMethodTableArg()) { - SString sss(SString::Literal, "{requires-mt-arg}"); - ss += sss; + ss.AppendUTF8("{requires-mt-arg}"); } if (pMD->RequiresInstMethodDescArg()) { - SString sss(SString::Literal, "{requires-mdesc-arg}"); - ss += sss; + ss.AppendUTF8("{requires-mdesc-arg}"); } } } diff --git a/src/coreclr/vm/util.cpp b/src/coreclr/vm/util.cpp index 03c95681360552..7412b03b3b4aed 100644 --- a/src/coreclr/vm/util.cpp +++ b/src/coreclr/vm/util.cpp @@ -951,7 +951,7 @@ static HMODULE CLRLoadLibraryExWorker(LPCWSTR lpLibFileName, HANDLE hFile, DWORD ErrorModeHolder errorMode{}; { INDEBUG(PEDecoder::ForceRelocForDLL(lpLibFileName)); - hMod = WszLoadLibraryEx(lpLibFileName, hFile, dwFlags); + hMod = WszLoadLibrary(lpLibFileName, hFile, dwFlags); *pLastError = GetLastError(); } return hMod; diff --git a/src/coreclr/vm/vars.cpp b/src/coreclr/vm/vars.cpp index e8d4789b296444..99d95f6a977bf9 100644 --- a/src/coreclr/vm/vars.cpp +++ b/src/coreclr/vm/vars.cpp @@ -107,6 +107,10 @@ GVAL_IMPL_INIT(DWORD, g_debuggerWordTLSIndex, TLS_OUT_OF_INDEXES); GVAL_IMPL_INIT(DWORD, g_TlsIndex, TLS_OUT_OF_INDEXES); MethodTable* g_pCastHelpers; +#ifdef FEATURE_EH_FUNCLETS +GPTR_IMPL(MethodTable, g_pEHClass); +GVAL_IMPL(bool, g_isNewExceptionHandlingEnabled); +#endif #ifndef DACCESS_COMPILE @@ -178,7 +182,7 @@ bool g_fEEInit = false; // code:IsAtProcessExit to read this. GVAL_IMPL(bool, g_fProcessDetach); -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER GVAL_IMPL_INIT(bool, g_metadataUpdatesApplied, false); #endif diff --git a/src/coreclr/vm/vars.hpp b/src/coreclr/vm/vars.hpp index 5110be83ed1bca..37d9da98eb1f3f 100644 --- a/src/coreclr/vm/vars.hpp +++ b/src/coreclr/vm/vars.hpp @@ -389,6 +389,11 @@ GVAL_DECL(DWORD, g_debuggerWordTLSIndex); #endif GVAL_DECL(DWORD, g_TlsIndex); +#ifdef FEATURE_EH_FUNCLETS +GPTR_DECL(MethodTable, g_pEHClass); +GVAL_DECL(bool, g_isNewExceptionHandlingEnabled); +#endif + // Global System Information extern SYSTEM_INFO g_SystemInfo; @@ -472,7 +477,7 @@ EXTERN DWORD g_fFastExitProcess; EXTERN BOOL g_fFatalErrorOccurredOnGCThread; EXTERN Volatile g_fForbidEnterEE; GVAL_DECL(bool, g_fProcessDetach); -#ifdef EnC_SUPPORTED +#ifdef FEATURE_METADATA_UPDATER GVAL_DECL(bool, g_metadataUpdatesApplied); #endif EXTERN bool g_fManagedAttach; diff --git a/src/installer/managed/Microsoft.NET.HostModel/AppHost/PEUtils.cs b/src/installer/managed/Microsoft.NET.HostModel/AppHost/PEUtils.cs index 0d0b33ed55569e..1bfc80fcfca492 100644 --- a/src/installer/managed/Microsoft.NET.HostModel/AppHost/PEUtils.cs +++ b/src/installer/managed/Microsoft.NET.HostModel/AppHost/PEUtils.cs @@ -1,8 +1,11 @@ // 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.Buffers.Binary; using System.IO; using System.IO.MemoryMappedFiles; +using System.Reflection.PortableExecutable; namespace Microsoft.NET.HostModel.AppHost { @@ -15,29 +18,13 @@ public static class PEUtils /// true if the accessor represents a PE image, false otherwise. internal static unsafe bool IsPEImage(MemoryMappedViewAccessor accessor) { - byte* pointer = null; + if (accessor.Capacity < PEOffsets.DosStub.PESignatureOffset + sizeof(uint)) + return false; - try - { - accessor.SafeMemoryMappedViewHandle.AcquirePointer(ref pointer); - byte* bytes = pointer + accessor.PointerOffset; - - // https://en.wikipedia.org/wiki/Portable_Executable - // Validate that we're looking at Windows PE file - if (((ushort*)bytes)[0] != PEOffsets.DosImageSignature - || accessor.Capacity < PEOffsets.DosStub.PESignatureOffset + sizeof(uint)) - { - return false; - } - return true; - } - finally - { - if (pointer != null) - { - accessor.SafeMemoryMappedViewHandle.ReleasePointer(); - } - } + // https://en.wikipedia.org/wiki/Portable_Executable + // Validate that we're looking at Windows PE file + ushort signature = AsLittleEndian(accessor.ReadUInt16(0)); + return signature == PEOffsets.DosImageSignature; } public static bool IsPEImage(string filePath) @@ -60,40 +47,15 @@ public static bool IsPEImage(string filePath) /// The memory accessor which has the apphost file opened. internal static unsafe void SetWindowsGraphicalUserInterfaceBit(MemoryMappedViewAccessor accessor) { - byte* pointer = null; - - try - { - accessor.SafeMemoryMappedViewHandle.AcquirePointer(ref pointer); - byte* bytes = pointer + accessor.PointerOffset; - - // https://en.wikipedia.org/wiki/Portable_Executable - uint peHeaderOffset = ((uint*)(bytes + PEOffsets.DosStub.PESignatureOffset))[0]; - - if (accessor.Capacity < peHeaderOffset + PEOffsets.PEHeader.Subsystem + sizeof(ushort)) - { - throw new AppHostNotPEFileException("Subsystem offset out of file range."); - } - - ushort* subsystem = ((ushort*)(bytes + peHeaderOffset + PEOffsets.PEHeader.Subsystem)); - - // https://docs.microsoft.com/en-us/windows/desktop/Debug/pe-format#windows-subsystem - // The subsystem of the prebuilt apphost should be set to CUI - if (subsystem[0] != (ushort)PEOffsets.Subsystem.WindowsCui) - { - throw new AppHostNotCUIException(subsystem[0]); - } - - // Set the subsystem to GUI - subsystem[0] = (ushort)PEOffsets.Subsystem.WindowsGui; - } - finally - { - if (pointer != null) - { - accessor.SafeMemoryMappedViewHandle.ReleasePointer(); - } - } + // https://learn.microsoft.com/windows/win32/debug/pe-format#windows-subsystem + // The subsystem of the prebuilt apphost should be set to CUI + uint peHeaderOffset; + ushort subsystem = GetWindowsSubsystem(accessor, out peHeaderOffset); + if (subsystem != (ushort)Subsystem.WindowsCui) + throw new AppHostNotCUIException(subsystem); + + // Set the subsystem to GUI + accessor.Write(peHeaderOffset + PEOffsets.PEHeader.Subsystem, AsLittleEndian((ushort)Subsystem.WindowsGui)); } public static unsafe void SetWindowsGraphicalUserInterfaceBit(string filePath) @@ -113,32 +75,7 @@ public static unsafe void SetWindowsGraphicalUserInterfaceBit(string filePath) /// The memory accessor which has the apphost file opened. internal static unsafe ushort GetWindowsGraphicalUserInterfaceBit(MemoryMappedViewAccessor accessor) { - byte* pointer = null; - - try - { - accessor.SafeMemoryMappedViewHandle.AcquirePointer(ref pointer); - byte* bytes = pointer + accessor.PointerOffset; - - // https://en.wikipedia.org/wiki/Portable_Executable - uint peHeaderOffset = ((uint*)(bytes + PEOffsets.DosStub.PESignatureOffset))[0]; - - if (accessor.Capacity < peHeaderOffset + PEOffsets.PEHeader.Subsystem + sizeof(ushort)) - { - throw new AppHostNotPEFileException("Subsystem offset out of file range."); - } - - ushort* subsystem = ((ushort*)(bytes + peHeaderOffset + PEOffsets.PEHeader.Subsystem)); - - return subsystem[0]; - } - finally - { - if (pointer != null) - { - accessor.SafeMemoryMappedViewHandle.ReleasePointer(); - } - } + return GetWindowsSubsystem(accessor, out _); } public static unsafe ushort GetWindowsGraphicalUserInterfaceBit(string filePath) @@ -151,5 +88,25 @@ public static unsafe ushort GetWindowsGraphicalUserInterfaceBit(string filePath) } } } + + private static ushort GetWindowsSubsystem(MemoryMappedViewAccessor accessor, out uint peHeaderOffset) + { + // https://en.wikipedia.org/wiki/Portable_Executable + if (accessor.Capacity < PEOffsets.DosStub.PESignatureOffset + sizeof(uint)) + throw new AppHostNotPEFileException("PESignature offset out of file range."); + + peHeaderOffset = AsLittleEndian(accessor.ReadUInt32(PEOffsets.DosStub.PESignatureOffset)); + if (accessor.Capacity < peHeaderOffset + PEOffsets.PEHeader.Subsystem + sizeof(ushort)) + throw new AppHostNotPEFileException("Subsystem offset out of file range."); + + // https://learn.microsoft.com/windows/win32/debug/pe-format#windows-subsystem + return AsLittleEndian(accessor.ReadUInt16(peHeaderOffset + PEOffsets.PEHeader.Subsystem)); + } + + private static ushort AsLittleEndian(ushort value) + => BitConverter.IsLittleEndian ? value : BinaryPrimitives.ReverseEndianness(value); + + private static uint AsLittleEndian(uint value) + => BitConverter.IsLittleEndian ? value : BinaryPrimitives.ReverseEndianness(value); } } diff --git a/src/installer/managed/Microsoft.NET.HostModel/ComHost/ClsidMap.cs b/src/installer/managed/Microsoft.NET.HostModel/ComHost/ClsidMap.cs index a8cbb02294ea23..4d7dcd09a00a63 100644 --- a/src/installer/managed/Microsoft.NET.HostModel/ComHost/ClsidMap.cs +++ b/src/installer/managed/Microsoft.NET.HostModel/ComHost/ClsidMap.cs @@ -18,6 +18,8 @@ namespace Microsoft.NET.HostModel.ComHost { public static class ClsidMap { + private static readonly JsonSerializerOptions s_jsonOptions = new JsonSerializerOptions { DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull }; + private struct ClsidEntry { [JsonPropertyName("type")] @@ -65,7 +67,7 @@ public static void Create(MetadataReader metadataReader, string clsidMapPath) using (StreamWriter writer = File.CreateText(clsidMapPath)) { - writer.Write(JsonSerializer.Serialize(clsidMap, new JsonSerializerOptions { DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull })); + writer.Write(JsonSerializer.Serialize(clsidMap, s_jsonOptions)); } } diff --git a/src/installer/managed/Microsoft.NET.HostModel/Microsoft.NET.HostModel.csproj b/src/installer/managed/Microsoft.NET.HostModel/Microsoft.NET.HostModel.csproj index de2e9ac36a7949..cdd3751e3c289a 100644 --- a/src/installer/managed/Microsoft.NET.HostModel/Microsoft.NET.HostModel.csproj +++ b/src/installer/managed/Microsoft.NET.HostModel/Microsoft.NET.HostModel.csproj @@ -4,7 +4,7 @@ netstandard2.0 Abstractions for modifying .NET host binaries false - true + true true true true @@ -15,7 +15,6 @@ MicrosoftAspNetCore true - Microsoft.Net.HostModel.PGO $(DefineConstants);HOST_MODEL diff --git a/src/installer/pkg/projects/Directory.Build.targets b/src/installer/pkg/projects/Directory.Build.targets index 322aaa31468f0b..74420fa76bb1f7 100644 --- a/src/installer/pkg/projects/Directory.Build.targets +++ b/src/installer/pkg/projects/Directory.Build.targets @@ -16,71 +16,7 @@ $(PackageOutputPath) - - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(%(VersionPropItem.Identity)) - - - @@ -118,12 +54,6 @@ - - - - - - + <_SymbolFiles Condition="'$(TargetOS)' == 'windows'" + Include="$(DotNetHostBinDir)PDB/dotnet.pdb" + IsSymbolFile="true" + IsNative="true" /> + <_SymbolFiles Condition="'$(TargetOS)' != 'windows'" + Include="$(DotNetHostBinDir)dotnet$(ExeSuffix)$(SymbolsSuffix)" IsSymbolFile="true" IsNative="true" /> diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Ref.sfxproj b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Ref.sfxproj index 97018934e5b75d..65ba460d088ab2 100644 --- a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Ref.sfxproj +++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Ref.sfxproj @@ -5,7 +5,7 @@ TargetingPack true dotnet-targeting-pack - $(SharedFrameworkName).PGO + false NetCore.TargetingPack A set of .NET APIs that are included in the default .NET application model. Contains reference assemblies, documentation, and other design-time assets. diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.props b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.props index 6907e829c384f3..7b4f7b877ee742 100644 --- a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.props +++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.props @@ -66,8 +66,13 @@ - - + <_HostFiles Include="$(DotNetHostBinDir)/$(LibPrefix)hostpolicy$(LibSuffix)" /> + <_HostFiles Include="$(DotNetHostBinDir)/$(LibPrefix)hostfxr$(LibSuffix)" PackOnly="true" /> + + + <_HostSymbolFiles Include="@(_HostFiles->'%(RootDir)%(Directory)PDB/%(Filename)$(SymbolsSuffix)')" Condition="'$(TargetOS)' == 'windows'" /> + <_HostSymbolFiles Include="@(_HostFiles->'%(RootDir)%(Directory)%(Filename)%(Extension)$(SymbolsSuffix)')" Condition="'$(TargetOS)' != 'windows'" /> + <_SymbolFilesToPackage Include="@(_HostSymbolFiles->Exists())" IsNative="true" /> @@ -114,7 +119,7 @@ tools/$(CoreCLRCrossTargetComponentDirName)_$(TargetArchitecture) - tools diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.sfxproj b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.sfxproj index ba597425bcfc1d..cb73211c5175ae 100644 --- a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.sfxproj +++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.sfxproj @@ -7,11 +7,12 @@ dotnet-runtime-internal dotnet-runtime dotnet-runtime-internal - $(SharedFrameworkName).PGO true + false dotnet-runtime-symbols NetCore.SharedFramework true + true diff --git a/src/installer/tests/Assets/Projects/AppWithSubDirs/AppWithSubDirs.csproj b/src/installer/tests/Assets/Projects/AppWithSubDirs/AppWithSubDirs.csproj new file mode 100644 index 00000000000000..0bf7fe92f94437 --- /dev/null +++ b/src/installer/tests/Assets/Projects/AppWithSubDirs/AppWithSubDirs.csproj @@ -0,0 +1,13 @@ + + + + $(NetCoreAppCurrent) + Exe + + + + + + + + diff --git a/src/installer/tests/Assets/TestProjects/AppWithSubDirs/Program.cs b/src/installer/tests/Assets/Projects/AppWithSubDirs/Program.cs similarity index 100% rename from src/installer/tests/Assets/TestProjects/AppWithSubDirs/Program.cs rename to src/installer/tests/Assets/Projects/AppWithSubDirs/Program.cs diff --git a/src/installer/tests/Assets/TestProjects/AppWithSubDirs/Sentence/Conjunction/word b/src/installer/tests/Assets/Projects/AppWithSubDirs/Sentence/Conjunction/word similarity index 100% rename from src/installer/tests/Assets/TestProjects/AppWithSubDirs/Sentence/Conjunction/word rename to src/installer/tests/Assets/Projects/AppWithSubDirs/Sentence/Conjunction/word diff --git a/src/installer/tests/Assets/TestProjects/AppWithSubDirs/Sentence/Interjection/word b/src/installer/tests/Assets/Projects/AppWithSubDirs/Sentence/Interjection/word similarity index 100% rename from src/installer/tests/Assets/TestProjects/AppWithSubDirs/Sentence/Interjection/word rename to src/installer/tests/Assets/Projects/AppWithSubDirs/Sentence/Interjection/word diff --git a/src/installer/tests/Assets/TestProjects/AppWithSubDirs/Sentence/Noun/Adjective/Article/word b/src/installer/tests/Assets/Projects/AppWithSubDirs/Sentence/Noun/Adjective/Article/word similarity index 100% rename from src/installer/tests/Assets/TestProjects/AppWithSubDirs/Sentence/Noun/Adjective/Article/word rename to src/installer/tests/Assets/Projects/AppWithSubDirs/Sentence/Noun/Adjective/Article/word diff --git a/src/installer/tests/Assets/TestProjects/AppWithSubDirs/Sentence/Noun/Adjective/Preposition/word b/src/installer/tests/Assets/Projects/AppWithSubDirs/Sentence/Noun/Adjective/Preposition/word similarity index 100% rename from src/installer/tests/Assets/TestProjects/AppWithSubDirs/Sentence/Noun/Adjective/Preposition/word rename to src/installer/tests/Assets/Projects/AppWithSubDirs/Sentence/Noun/Adjective/Preposition/word diff --git a/src/installer/tests/Assets/TestProjects/AppWithSubDirs/Sentence/Noun/Adjective/word b/src/installer/tests/Assets/Projects/AppWithSubDirs/Sentence/Noun/Adjective/word similarity index 100% rename from src/installer/tests/Assets/TestProjects/AppWithSubDirs/Sentence/Noun/Adjective/word rename to src/installer/tests/Assets/Projects/AppWithSubDirs/Sentence/Noun/Adjective/word diff --git a/src/installer/tests/Assets/TestProjects/AppWithSubDirs/Sentence/Noun/Pronoun/Another/word b/src/installer/tests/Assets/Projects/AppWithSubDirs/Sentence/Noun/Pronoun/Another/word similarity index 100% rename from src/installer/tests/Assets/TestProjects/AppWithSubDirs/Sentence/Noun/Pronoun/Another/word rename to src/installer/tests/Assets/Projects/AppWithSubDirs/Sentence/Noun/Pronoun/Another/word diff --git a/src/installer/tests/Assets/TestProjects/AppWithSubDirs/Sentence/Noun/Pronoun/word b/src/installer/tests/Assets/Projects/AppWithSubDirs/Sentence/Noun/Pronoun/word similarity index 100% rename from src/installer/tests/Assets/TestProjects/AppWithSubDirs/Sentence/Noun/Pronoun/word rename to src/installer/tests/Assets/Projects/AppWithSubDirs/Sentence/Noun/Pronoun/word diff --git a/src/installer/tests/Assets/TestProjects/AppWithSubDirs/Sentence/Noun/word b/src/installer/tests/Assets/Projects/AppWithSubDirs/Sentence/Noun/word similarity index 100% rename from src/installer/tests/Assets/TestProjects/AppWithSubDirs/Sentence/Noun/word rename to src/installer/tests/Assets/Projects/AppWithSubDirs/Sentence/Noun/word diff --git a/src/installer/tests/Assets/TestProjects/AppWithSubDirs/Sentence/Verb/Adverb/word b/src/installer/tests/Assets/Projects/AppWithSubDirs/Sentence/Verb/Adverb/word similarity index 100% rename from src/installer/tests/Assets/TestProjects/AppWithSubDirs/Sentence/Verb/Adverb/word rename to src/installer/tests/Assets/Projects/AppWithSubDirs/Sentence/Verb/Adverb/word diff --git a/src/installer/tests/Assets/TestProjects/AppWithSubDirs/Sentence/Verb/word b/src/installer/tests/Assets/Projects/AppWithSubDirs/Sentence/Verb/word similarity index 100% rename from src/installer/tests/Assets/TestProjects/AppWithSubDirs/Sentence/Verb/word rename to src/installer/tests/Assets/Projects/AppWithSubDirs/Sentence/Verb/word diff --git a/src/installer/tests/Assets/TestProjects/AppWithSubDirs/Sentence/word b/src/installer/tests/Assets/Projects/AppWithSubDirs/Sentence/word similarity index 100% rename from src/installer/tests/Assets/TestProjects/AppWithSubDirs/Sentence/word rename to src/installer/tests/Assets/Projects/AppWithSubDirs/Sentence/word diff --git a/src/installer/tests/Assets/Projects/AppWithSubDirs/empty b/src/installer/tests/Assets/Projects/AppWithSubDirs/empty new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/src/installer/tests/Assets/Projects/Directory.Build.props b/src/installer/tests/Assets/Projects/Directory.Build.props new file mode 100644 index 00000000000000..becedfd8430157 --- /dev/null +++ b/src/installer/tests/Assets/Projects/Directory.Build.props @@ -0,0 +1,11 @@ + + + + + true + true + false + false + $(ArtifactsDir)tests\host\$(TargetOS).$(TargetArchitecture).$(Configuration)\$(MSBuildProjectName) + + diff --git a/src/installer/tests/Assets/Projects/Directory.Build.targets b/src/installer/tests/Assets/Projects/Directory.Build.targets new file mode 100644 index 00000000000000..74fb272013ea8d --- /dev/null +++ b/src/installer/tests/Assets/Projects/Directory.Build.targets @@ -0,0 +1,5 @@ + + + + + diff --git a/src/installer/tests/Assets/Projects/HelloWorld/HelloWorld.csproj b/src/installer/tests/Assets/Projects/HelloWorld/HelloWorld.csproj new file mode 100644 index 00000000000000..e71444bd29bbfe --- /dev/null +++ b/src/installer/tests/Assets/Projects/HelloWorld/HelloWorld.csproj @@ -0,0 +1,8 @@ + + + + $(NetCoreAppCurrent) + Exe + + + diff --git a/src/installer/tests/Assets/TestProjects/StandaloneApp20/Program.cs b/src/installer/tests/Assets/Projects/HelloWorld/Program.cs similarity index 74% rename from src/installer/tests/Assets/TestProjects/StandaloneApp20/Program.cs rename to src/installer/tests/Assets/Projects/HelloWorld/Program.cs index 27cd1bfd191c1a..b206495c013c97 100644 --- a/src/installer/tests/Assets/TestProjects/StandaloneApp20/Program.cs +++ b/src/installer/tests/Assets/Projects/HelloWorld/Program.cs @@ -2,8 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Runtime.InteropServices; -namespace StandaloneApp +namespace HelloWorld { public static class Program { @@ -11,6 +12,7 @@ public static void Main(string[] args) { Console.WriteLine("Hello World!"); Console.WriteLine(string.Join(Environment.NewLine, args)); + Console.WriteLine(RuntimeInformation.FrameworkDescription); } } } diff --git a/src/installer/tests/Assets/TestProjects/AppWithSubDirs/AppWithSubDirs.csproj b/src/installer/tests/Assets/TestProjects/AppWithSubDirs/AppWithSubDirs.csproj deleted file mode 100644 index c7b0d3830d26dd..00000000000000 --- a/src/installer/tests/Assets/TestProjects/AppWithSubDirs/AppWithSubDirs.csproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - $(NetCoreAppCurrent) - Exe - $(MNAVersion) - $(TestTargetRid) - true - - - - - - - - - - - diff --git a/src/installer/tests/Assets/TestProjects/BundleProbeTester/BundleProbeTester.csproj b/src/installer/tests/Assets/TestProjects/BundleProbeTester/BundleProbeTester.csproj deleted file mode 100644 index cb2391b1e49181..00000000000000 --- a/src/installer/tests/Assets/TestProjects/BundleProbeTester/BundleProbeTester.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - $(NetCoreAppCurrent) - Exe - $(TestTargetRid) - $(MNAVersion) - true - - - - true - - - diff --git a/src/installer/tests/Assets/TestProjects/BundleProbeTester/Program.cs b/src/installer/tests/Assets/TestProjects/BundleProbeTester/Program.cs deleted file mode 100644 index fdd1fdeb32f243..00000000000000 --- a/src/installer/tests/Assets/TestProjects/BundleProbeTester/Program.cs +++ /dev/null @@ -1,96 +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.Runtime.InteropServices; - -namespace BundleProbeTester -{ - public static class Program - { - // The return type on BundleProbeDelegate is byte instead of bool because - // using non-blitable bool type caused a failure (incorrect value) on linux-musl-x64. - // The bundle-probe callback is only called from native code in the product - // Therefore the type on this test is adjusted to circumvent the failure. - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - public delegate byte BundleProbeDelegate([MarshalAs(UnmanagedType.LPUTF8Str)] string path, IntPtr offset, IntPtr size, IntPtr compressedSize); - - unsafe static bool Probe(BundleProbeDelegate bundleProbe, string path, bool isExpected) - { - Int64 size, offset, compressedSize; - bool exists = bundleProbe(path, (IntPtr)(&offset), (IntPtr)(&size), (IntPtr)(&compressedSize)) != 0; - - switch (exists, isExpected) - { - case (true, true): - if (compressedSize < 0 || compressedSize > size) - { - Console.WriteLine($"Invalid compressedSize obtained for {path} within bundle."); - return false; - } - - if (size > 0 && offset > 0) - { - return true; - } - - Console.WriteLine($"Invalid location obtained for {path} within bundle."); - return false; - - case (true, false): - Console.WriteLine($"Unexpected file {path} found in bundle."); - return false; - - case (false, true): - Console.WriteLine($"Expected file {path} not found in bundle."); - return false; - - case (false, false): - return true; - } - } - - public static int Main(string[] args) - { - bool isSingleFile = args.Length > 0 && args[0].Equals("SingleFile"); - object probeObject = System.AppDomain.CurrentDomain.GetData("BUNDLE_PROBE"); - - if (!isSingleFile) - { - if (probeObject != null) - { - Console.WriteLine("BUNDLE_PROBE property passed in for a non-single-file app"); - return -1; - } - - Console.WriteLine("No BUNDLE_PROBE"); - return 0; - } - - if (probeObject == null) - { - Console.WriteLine("BUNDLE_PROBE property not passed in for a single-file app"); - return -2; - } - - string probeString = probeObject as string; - IntPtr probePtr = (IntPtr)Convert.ToUInt64(probeString, 16); - BundleProbeDelegate bundleProbeDelegate = Marshal.GetDelegateForFunctionPointer(probePtr); - bool success = - Probe(bundleProbeDelegate, "BundleProbeTester.dll", isExpected: true) && - Probe(bundleProbeDelegate, "BundleProbeTester.runtimeconfig.json", isExpected: true) && - Probe(bundleProbeDelegate, "System.Private.CoreLib.dll", isExpected: true) && - Probe(bundleProbeDelegate, "hostpolicy.dll", isExpected: false) && - Probe(bundleProbeDelegate, "--", isExpected: false) && - Probe(bundleProbeDelegate, "", isExpected: false); - - if (!success) - { - return -3; - } - - Console.WriteLine("BUNDLE_PROBE OK"); - return 0; - } - } -} diff --git a/src/installer/tests/Assets/TestProjects/HostApiInvokerApp/HostApiInvokerApp.csproj b/src/installer/tests/Assets/TestProjects/HostApiInvokerApp/HostApiInvokerApp.csproj index d040ee25bcfec7..056d9ce8dfef62 100644 --- a/src/installer/tests/Assets/TestProjects/HostApiInvokerApp/HostApiInvokerApp.csproj +++ b/src/installer/tests/Assets/TestProjects/HostApiInvokerApp/HostApiInvokerApp.csproj @@ -3,6 +3,7 @@ $(NetCoreAppCurrent) Exe + $(TestTargetRid) $(MNAVersion) WINDOWS;$(DefineConstants) true diff --git a/src/installer/tests/Assets/TestProjects/HostApiInvokerApp/HostRuntimeContract.cs b/src/installer/tests/Assets/TestProjects/HostApiInvokerApp/HostRuntimeContract.cs index a2a4d6161acea4..f9f1b15295eaa8 100644 --- a/src/installer/tests/Assets/TestProjects/HostApiInvokerApp/HostRuntimeContract.cs +++ b/src/installer/tests/Assets/TestProjects/HostApiInvokerApp/HostRuntimeContract.cs @@ -15,7 +15,7 @@ internal struct host_runtime_contract public nint size; public void* context; public delegate* unmanaged[Stdcall] get_runtime_property; - public IntPtr bundle_probe; + public delegate* unmanaged[Stdcall] bundle_probe; public IntPtr pinvoke_override; } @@ -68,12 +68,52 @@ static string GetProperty(string name, host_runtime_contract contract) } } + public static void Test_bundle_probe(string[] args) + { + host_runtime_contract contract = GetContract(); + if (contract.bundle_probe == null) + { + Console.WriteLine("host_runtime_contract.bundle_probe is not set"); + return; + } + + bool success = true; + foreach (string path in args) + { + Probe(contract, path); + } + + unsafe static void Probe(host_runtime_contract contract, string path) + { + Span pathSpan = stackalloc byte[Encoding.UTF8.GetMaxByteCount(path.Length)]; + byte* pathPtr = (byte*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(pathSpan)); + int pathLen = Encoding.UTF8.GetBytes(path, pathSpan); + pathSpan[pathLen] = 0; + + Int64 size, offset, compressedSize; + bool exists = contract.bundle_probe(pathPtr, (IntPtr)(&offset), (IntPtr)(&size), (IntPtr)(&compressedSize)) != 0; + + Console.WriteLine($"{nameof(host_runtime_contract.get_runtime_property)}: {path} - found = {exists}"); + if (exists) + { + if (compressedSize < 0 || compressedSize > size) + throw new Exception($"Invalid compressedSize obtained for {path} within bundle."); + + if (size <= 0 || offset <= 0) + throw new Exception($"Invalid location obtained for {path} within bundle."); + } + } + } + public static bool RunTest(string apiToTest, string[] args) { switch (apiToTest) { case $"{nameof(host_runtime_contract)}.{nameof(host_runtime_contract.get_runtime_property)}": - Test_get_runtime_property(args); + Test_get_runtime_property(args[1..]); + break; + case $"{nameof(host_runtime_contract)}.{nameof(host_runtime_contract.bundle_probe)}": + Test_bundle_probe(args[1..]); break; default: return false; diff --git a/src/installer/tests/Assets/TestProjects/StandaloneApp20/StandaloneApp20.csproj b/src/installer/tests/Assets/TestProjects/StandaloneApp20/StandaloneApp20.csproj deleted file mode 100644 index c64a9063bf1ac2..00000000000000 --- a/src/installer/tests/Assets/TestProjects/StandaloneApp20/StandaloneApp20.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - StandaloneApp - netcoreapp2.0 - Exe - $(TestTargetRid) - 2.0.7 - true - - - diff --git a/src/installer/tests/Assets/TestProjects/StandaloneApp21/Program.cs b/src/installer/tests/Assets/TestProjects/StandaloneApp21/Program.cs deleted file mode 100644 index 27cd1bfd191c1a..00000000000000 --- a/src/installer/tests/Assets/TestProjects/StandaloneApp21/Program.cs +++ /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. - -using System; - -namespace StandaloneApp -{ - public static class Program - { - public static void Main(string[] args) - { - Console.WriteLine("Hello World!"); - Console.WriteLine(string.Join(Environment.NewLine, args)); - } - } -} diff --git a/src/installer/tests/Assets/TestProjects/StandaloneApp21/StandaloneApp21.csproj b/src/installer/tests/Assets/TestProjects/StandaloneApp21/StandaloneApp21.csproj deleted file mode 100644 index 30176d9509a85b..00000000000000 --- a/src/installer/tests/Assets/TestProjects/StandaloneApp21/StandaloneApp21.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - StandaloneApp - netcoreapp2.1 - Exe - $(TestTargetRid) - 2.1.0 - true - - - diff --git a/src/installer/tests/Assets/TestUtils/TestProjects.props b/src/installer/tests/Assets/TestUtils/TestProjects.props index cf1e7d798e71bc..1ace72f7f050e5 100644 --- a/src/installer/tests/Assets/TestUtils/TestProjects.props +++ b/src/installer/tests/Assets/TestUtils/TestProjects.props @@ -5,7 +5,7 @@ --> - net8.0 + net9.0 false - 8.0 + 9.0 diff --git a/src/installer/tests/Directory.Build.props b/src/installer/tests/Directory.Build.props index 1db6d7ecfa76f1..11472eb328a4da 100644 --- a/src/installer/tests/Directory.Build.props +++ b/src/installer/tests/Directory.Build.props @@ -4,13 +4,15 @@ $(InstallerProjectRoot)tests\ $(TestDir)Assets\ + $(ArtifactsDir)tests\host\$(TargetOS).$(TargetArchitecture).$(Configuration)\ $(ArtifactsObjDir)TestStabilizedPackages\ $(ArtifactsObjDir)TestPackageCache\ $(ArtifactsObjDir)TestNuGetConfig\NuGet.config $(ArtifactsObjDir)ExtraNupkgsForTestRestore\ $(TargetArchitecture) $(NetCoreAppToolCurrent) - --filter category!=failing -v detailed + category!=failing + --filter $(TestCaseFilter) -v detailed $(TestRunnerAdditionalArguments) --blame-crash-dump-type full $(TestRunnerAdditionalArguments) --blame-hang-timeout 5m --blame-hang-dump-type full diff --git a/src/installer/tests/Directory.Build.targets b/src/installer/tests/Directory.Build.targets index 15d3a8fde34433..ecd79411081d4d 100644 --- a/src/installer/tests/Directory.Build.targets +++ b/src/installer/tests/Directory.Build.targets @@ -1,14 +1,8 @@ - - - - + @@ -31,6 +35,7 @@ - + + $(PackageRID) $(MSBuildProjectName) - - $(ArtifactsDir)tests/$(Configuration)/ - $(TestsOutputRootDir)$(TestsOutputName)/ + $(TestArtifactsOutputRoot)$(TestsOutputName)/ + but the tests should just use the framework on which they are run if possible Explicitly remove + the item if the target framework version for the test matches the referenced package version. --> - + + + + $(DotNetTool) + $(TestCaseFilter) + + + + diff --git a/src/installer/tests/HostActivation.Tests/DependencyResolution/RidAssetResolution.cs b/src/installer/tests/HostActivation.Tests/DependencyResolution/RidAssetResolution.cs index afbf30a0ba4fa1..a244619b6b53c1 100644 --- a/src/installer/tests/HostActivation.Tests/DependencyResolution/RidAssetResolution.cs +++ b/src/installer/tests/HostActivation.Tests/DependencyResolution/RidAssetResolution.cs @@ -89,6 +89,12 @@ protected TestApp UpdateAppConfigForTest(TestApp app, TestSetup setup, bool copy return app; } + // The fallback RID is a compile-time define for the host. On Windows, it is always win10 and on + // other platforms, it matches the build RID (non-portable for source-builds, portable otherwise) + private static string FallbackRid = OperatingSystem.IsWindows() + ? $"win10-{RepoDirectoriesProvider.Default.BuildArchitecture}" + : RepoDirectoriesProvider.Default.BuildRID; + protected const string UnknownRid = "unknown-rid"; private const string LinuxAssembly = "linux/LinuxAssembly.dll"; @@ -168,6 +174,18 @@ public void RidSpecificAssembly_CurrentRid(string rid, bool hasRuntimeFallbacks, excludedPath); } + [Fact] + public void RidSpecificAssembly_FallbackRid() + { + // When there is no RID graph and the host is configured to use the RID graph, it should still be able to + // resolve an exact match to the fallback RID + string assetPath = $"{FallbackRid}/{FallbackRid}Asset"; + RunTest( + p => p.WithAssemblyGroup(FallbackRid, g => g.WithAsset(assetPath)), + new TestSetup() { Rid = null, HasRidGraph = false, UseRidGraph = true }, + new ResolvedPaths() { IncludedAssemblyPaths = assetPath }); + } + [Theory] [InlineData(true)] [InlineData(false)] @@ -255,6 +273,18 @@ public void RidSpecificNativeLibrary_CurrentRid(string rid, bool hasRuntimeFallb excludedPath); } + [Fact] + public void RidSpecificNativeLibrary_FallbackRid() + { + // When there is no RID graph and the host is configured to use the RID graph, it should still be able to + // resolve an exact match to the fallback RID + string assetPath = $"{FallbackRid}/{FallbackRid}Asset"; + RunTest( + p => p.WithNativeLibraryGroup(FallbackRid, g => g.WithAsset(assetPath)), + new TestSetup() { Rid = null, HasRidGraph = false, UseRidGraph = true }, + new ResolvedPaths() { IncludedNativeLibraryPaths = $"{FallbackRid}/" }); + } + [Theory] [InlineData(true)] [InlineData(false)] diff --git a/src/installer/tests/HostActivation.Tests/DotnetArgValidation.cs b/src/installer/tests/HostActivation.Tests/DotnetArgValidation.cs index 20e7e97a628e96..12501889471756 100644 --- a/src/installer/tests/HostActivation.Tests/DotnetArgValidation.cs +++ b/src/installer/tests/HostActivation.Tests/DotnetArgValidation.cs @@ -82,6 +82,35 @@ public void InvalidFileOrCommand_NoSDK_ListsPossibleIssues() .And.FindAnySdk(false); } + [Fact] + public void DotNetInfo_NoSDK() + { + sharedTestState.BuiltDotNet.Exec("--info") + .CaptureStdOut() + .CaptureStdErr() + .Execute() + .Should().Pass() + .And.HaveStdOutMatching($@"Architecture:\s*{RepoDirectoriesProvider.Default.BuildArchitecture}") + .And.HaveStdOutMatching($@"RID:\s*{RepoDirectoriesProvider.Default.BuildRID}"); + } + + [Fact] + public void DotNetInfo_WithSDK() + { + DotNetCli dotnet = new DotNetBuilder(sharedTestState.BaseDirectory.Location, RepoDirectoriesProvider.Default.BuiltDotnet, "withSdk") + .AddMicrosoftNETCoreAppFrameworkMockHostPolicy("1.0.0") + .AddMockSDK("1.0.0", "1.0.0") + .Build(); + + dotnet.Exec("--info") + .WorkingDirectory(sharedTestState.BaseDirectory.Location) + .CaptureStdOut() + .CaptureStdErr() + .Execute() + .Should().Pass() + .And.NotHaveStdOutMatching($@"RID:\s*{RepoDirectoriesProvider.Default.BuildRID}"); + } + // Return a non-existent path that contains a mix of / and \ private string GetNonexistentAndUnnormalizedPath() { diff --git a/src/installer/tests/HostActivation.Tests/HostVersionCompatibility.cs b/src/installer/tests/HostActivation.Tests/HostVersionCompatibility.cs index 0a32e944a375fa..b53d546c9131d9 100644 --- a/src/installer/tests/HostActivation.Tests/HostVersionCompatibility.cs +++ b/src/installer/tests/HostActivation.Tests/HostVersionCompatibility.cs @@ -19,136 +19,99 @@ public HostVersionCompatibility(SharedTestState fixture) } [Fact] - public void Latest_Host_Is_Backwards_Compatible_With_Older_Runtime_20() + public void LatestHost_OldRuntime_BackwardsCompatible_60() { - Latest_Host_Is_Backwards_Compatible_With_Older_Runtime(sharedTestState.Fixture20); + LatestHost_OldRuntime_BackwardsCompatible(sharedTestState.Fixture60); } - [Fact] - public void Latest_Host_Is_Backwards_Compatible_With_Older_Runtime_21() + private void LatestHost_OldRuntime_BackwardsCompatible(TestProjectFixture previousVersionFixture) { - Latest_Host_Is_Backwards_Compatible_With_Older_Runtime(sharedTestState.Fixture21); - } - - private void Latest_Host_Is_Backwards_Compatible_With_Older_Runtime(TestProjectFixture previousVersionFixture) - { - if (!IsRidSupported()) - { - return; - } - TestProjectFixture fixture = previousVersionFixture.Copy(); string appExe = fixture.TestProject.AppExe; - Assert.NotEqual(fixture.Framework, sharedTestState.FixtureLatest.Framework); - Assert.NotEqual(fixture.RepoDirProvider.MicrosoftNETCoreAppVersion, sharedTestState.FixtureLatest.RepoDirProvider.MicrosoftNETCoreAppVersion); - - // Baseline (no changes) - Command.Create(appExe) - .EnableTracingAndCaptureOutputs() - .Execute() - .Should().Pass() - .And.HaveStdOutContaining("Hello World") - .And.HaveStdErrContaining($"--- Invoked apphost [version: {fixture.RepoDirProvider.MicrosoftNETCoreAppVersion}"); + Assert.NotEqual(fixture.Framework, RepoDirectoriesProvider.Default.Tfm); + Assert.NotEqual(fixture.RepoDirProvider.MicrosoftNETCoreAppVersion, RepoDirectoriesProvider.Default.MicrosoftNETCoreAppVersion); // Use the newer apphost // This emulates the case when: // 1) Newer runtime installed // 2) Newer runtime uninstalled (installer preserves newer apphost) - File.Copy(sharedTestState.FixtureLatest.TestProject.AppExe, fixture.TestProject.AppExe, true); + fixture.TestProject.BuiltApp.CreateAppHost(); Command.Create(appExe) .EnableTracingAndCaptureOutputs() .Execute() .Should().Pass() .And.HaveStdOutContaining("Hello World") - .And.HaveStdErrContaining($"--- Invoked apphost [version: {sharedTestState.FixtureLatest.RepoDirProvider.MicrosoftNETCoreAppVersion}"); + .And.HaveStdErrContaining($"--- Invoked apphost [version: {RepoDirectoriesProvider.Default.MicrosoftNETCoreAppVersion}"); // Use the newer apphost and hostFxr // This emulates the case when: // 1) Newer runtime installed // 2) A roll-forward to the newer runtime did not occur - File.Copy(sharedTestState.FixtureLatest.TestProject.HostFxrDll, fixture.TestProject.HostFxrDll, true); + File.Copy(Binaries.HostFxr.FilePath, fixture.TestProject.HostFxrDll, true); Command.Create(appExe) .EnableTracingAndCaptureOutputs() .Execute() .Should().Pass() .And.HaveStdOutContaining("Hello World") - .And.HaveStdErrContaining($"--- Invoked apphost [version: {sharedTestState.FixtureLatest.RepoDirProvider.MicrosoftNETCoreAppVersion}"); + .And.HaveStdErrContaining($"--- Invoked apphost [version: {RepoDirectoriesProvider.Default.MicrosoftNETCoreAppVersion}"); } [Fact] - public void Old_Host_Is_Forward_Compatible_With_Latest_Runtime_20() + public void OldHost_LatestRuntime_ForwardCompatible_60() { - Old_Host_Is_Forward_Compatible_With_Latest_Runtime(sharedTestState.Fixture20); + OldHost_LatestRuntime_ForwardCompatible(sharedTestState.Fixture60); } - [Fact] - public void Old_Host_Is_Forward_Compatible_With_Latest_Runtime_21() + private void OldHost_LatestRuntime_ForwardCompatible(TestProjectFixture previousVersionFixture) { - Old_Host_Is_Forward_Compatible_With_Latest_Runtime(sharedTestState.Fixture21); - } - - private void Old_Host_Is_Forward_Compatible_With_Latest_Runtime(TestProjectFixture previousVersionFixture) - { - if (!IsRidSupported()) - { - return; - } - TestProjectFixture fixture = sharedTestState.FixtureLatest.Copy(); string appExe = fixture.TestProject.AppExe; Assert.NotEqual(fixture.Framework, previousVersionFixture.Framework); Assert.NotEqual(fixture.RepoDirProvider.MicrosoftNETCoreAppVersion, previousVersionFixture.RepoDirProvider.MicrosoftNETCoreAppVersion); - // Baseline (no changes) - Command.Create(appExe) - .EnableTracingAndCaptureOutputs() - .Execute() - .Should().Pass() - .And.HaveStdOutContaining("Hello World") - .And.HaveStdErrContaining($"--- Invoked apphost [version: {fixture.RepoDirProvider.MicrosoftNETCoreAppVersion}"); - - // Use the older apphost and hostfxr + // Use the older apphost // This emulates the case when: - // 1) One-off deployment of older runtime (not in global location) - // 2) Older apphost executed, but found newer runtime because of multi-level lookup - // Note that we currently don't have multi-level on hostfxr so we will always find the older\one-off hostfxr + // 1) Newer runtime installed + // 2) App rolls forward to newer runtime File.Copy(previousVersionFixture.TestProject.AppExe, fixture.TestProject.AppExe, true); - File.Copy(previousVersionFixture.TestProject.HostFxrDll, fixture.TestProject.HostFxrDll, true); Command.Create(appExe) .EnableTracingAndCaptureOutputs() .Execute() .Should().Pass() .And.HaveStdOutContaining("Hello World") .And.HaveStdErrContaining($"--- Invoked apphost [version: {previousVersionFixture.RepoDirProvider.MicrosoftNETCoreAppVersion}"); - } - private static bool IsRidSupported() - { - // Some current Linux RIDs are not supported in 2.0\2.1; just test for Ubuntu 16. - return ( - OperatingSystem.IsWindows() || - OperatingSystem.IsMacOS() || - (OperatingSystem.IsLinux() && RuntimeInformation.RuntimeIdentifier == "ubuntu.16.04-x64") - ); + // Use the older apphost and hostfxr + // This emulates the case when: + // 1) One-off deployment of older runtime (not in global location) + // 2) Older apphost executed, but found newer runtime because of multi-level lookup on Windows + // Note that we don't have multi-level on hostfxr so we will always find the older\one-off hostfxr + if (OperatingSystem.IsWindows()) + { + File.Copy(previousVersionFixture.TestProject.HostFxrDll, fixture.TestProject.HostFxrDll, true); + Command.Create(appExe) + .EnableTracingAndCaptureOutputs() + .Execute() + .Should().Pass() + .And.HaveStdOutContaining("Hello World") + .And.HaveStdErrContaining($"--- Invoked apphost [version: {previousVersionFixture.RepoDirProvider.MicrosoftNETCoreAppVersion}"); + } } public class SharedTestState : IDisposable { private static RepoDirectoriesProvider RepoDirectories { get; set; } - public TestProjectFixture Fixture20 { get; } - public TestProjectFixture Fixture21 { get; } + public TestProjectFixture Fixture60 { get; } public TestProjectFixture FixtureLatest { get; } public SharedTestState() { RepoDirectories = new RepoDirectoriesProvider(); - // If these versions are changed, also change the corresponding .csproj - Fixture20 = CreateTestFixture("StandaloneApp20", "netcoreapp2.0", "2.0.7"); - Fixture21 = CreateTestFixture("StandaloneApp21", "netcoreapp2.1", "2.1.0"); + Fixture60 = CreateTestFixture("StandaloneApp6x", "net6.0", "6.0"); var fixtureLatest = new TestProjectFixture("StandaloneApp", RepoDirectories); fixtureLatest @@ -160,8 +123,7 @@ public SharedTestState() public void Dispose() { - Fixture20.Dispose(); - Fixture21.Dispose(); + Fixture60.Dispose(); FixtureLatest.Dispose(); } @@ -171,13 +133,9 @@ private static TestProjectFixture CreateTestFixture(string testName, string netC // Use standalone instead of framework-dependent for ease of deployment. var publishFixture = new TestProjectFixture(testName, repoDirectories, framework: netCoreAppFramework, assemblyName: "StandaloneApp"); - - if (IsRidSupported()) - { - publishFixture - .EnsureRestoredForRid(publishFixture.CurrentRid) - .PublishProject(runtime: publishFixture.CurrentRid, selfContained: true); - } + publishFixture + .EnsureRestoredForRid(publishFixture.CurrentRid) + .PublishProject(runtime: publishFixture.CurrentRid, selfContained: true); return publishFixture; } diff --git a/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleExtractToSpecificPath.cs b/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleExtractToSpecificPath.cs index 36f5ec5adcfd13..c9553d23d90ce1 100644 --- a/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleExtractToSpecificPath.cs +++ b/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleExtractToSpecificPath.cs @@ -1,21 +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; +using System.IO; +using System.Threading; using BundleTests.Helpers; using Microsoft.DotNet.Cli.Build.Framework; using Microsoft.DotNet.CoreSetup.Test; using Microsoft.NET.HostModel.Bundle; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices; -using System.Threading; using Xunit; namespace AppHost.Bundle.Tests { - public class BundleExtractToSpecificPath : BundleTestBase, IClassFixture + public class BundleExtractToSpecificPath : IClassFixture { private SharedTestState sharedTestState; @@ -25,52 +22,48 @@ public BundleExtractToSpecificPath(SharedTestState fixture) } [Fact] - private void Bundle_Extraction_To_Specific_Path_Succeeds() + private void AbsolutePath() { - var fixture = sharedTestState.TestFixture.Copy(); - var hostName = BundleHelper.GetHostName(fixture); - - // Publish the bundle - BundleOptions options = BundleOptions.BundleNativeBinaries; - Bundler bundler = BundleSelfContainedApp(fixture, out string singleFile, options); + SingleFileTestApp app = sharedTestState.SelfContainedApp; + var bundledApp = sharedTestState.BundledApp; // Verify expected files in the bundle directory - var bundleDir = BundleHelper.GetBundleDir(fixture); - bundleDir.Should().HaveFile(hostName); - bundleDir.Should().NotHaveFiles(BundleHelper.GetBundledFiles(fixture)); + var bundleDir = Directory.GetParent(bundledApp.Path); + bundleDir.Should().OnlyHaveFiles(new[] + { + Binaries.GetExeFileNameForCurrentPlatform(app.Name), + $"{app.Name}.pdb" + }); - // Create a directory for extraction. - var extractBaseDir = BundleHelper.GetExtractionRootDir(fixture); - extractBaseDir.Should().NotHaveDirectory(BundleHelper.GetAppBaseName(fixture)); + // Directory for extraction. + string extractBaseDir = app.GetNewExtractionRootPath(); // Run the bundled app for the first time, and extract files to // $DOTNET_BUNDLE_EXTRACT_BASE_DIR//bundle-id - Command.Create(singleFile) + Command.Create(bundledApp.Path) .CaptureStdErr() .CaptureStdOut() - .EnvironmentVariable(BundleHelper.DotnetBundleExtractBaseEnvVariable, extractBaseDir.FullName) + .EnvironmentVariable(BundleHelper.DotnetBundleExtractBaseEnvVariable, extractBaseDir) .Execute() - .Should() - .Pass() - .And - .HaveStdOutContaining("Hello World"); - - var extractDir = BundleHelper.GetExtractionDir(fixture, bundler); - extractDir.Should().HaveFiles(BundleHelper.GetExtractedFiles(fixture, BundleOptions.BundleNativeBinaries)); - extractDir.Should().NotHaveFiles(BundleHelper.GetFilesNeverExtracted(fixture)); + .Should().Pass() + .And.HaveStdOutContaining("Hello World"); + + var extractDir = app.GetExtractionDir(extractBaseDir, bundledApp.Manifest); + extractDir.Should().OnlyHaveFiles(BundleHelper.GetExtractedFiles(bundledApp.Manifest, bundledApp.Options)); } [InlineData("./foo", BundleOptions.BundleAllContent)] [InlineData("../foo", BundleOptions.BundleAllContent)] [InlineData("foo", BundleOptions.BundleAllContent)] [InlineData("foo/bar", BundleOptions.BundleAllContent)] + [InlineData("foo\\bar", BundleOptions.BundleAllContent)] [InlineData("./foo", BundleOptions.BundleNativeBinaries)] [InlineData("../foo", BundleOptions.BundleNativeBinaries)] [InlineData("foo", BundleOptions.BundleNativeBinaries)] [InlineData("foo/bar", BundleOptions.BundleNativeBinaries)] [InlineData("foo\\bar", BundleOptions.BundleNativeBinaries)] [Theory] - private void Bundle_Extraction_To_Relative_Path_Succeeds(string relativePath, BundleOptions bundleOptions) + private void RelativePath(string relativePath, BundleOptions bundleOptions) { // As we don't modify user defined environment variables, we will not convert // any forward slashes to the standard Windows dir separator ('\'), thus @@ -84,56 +77,47 @@ private void Bundle_Extraction_To_Relative_Path_Succeeds(string relativePath, Bu if (relativePath == "foo\\bar" && !OperatingSystem.IsWindows()) return; - var fixture = sharedTestState.TestFixture.Copy(); - var bundler = BundleSelfContainedApp(fixture, out var singleFile, bundleOptions); + Manifest manifest; + string singleFile = sharedTestState.SelfContainedApp.Bundle(bundleOptions, out manifest); // Run the bundled app (extract files to ) - var cmd = Command.Create(singleFile); - cmd.WorkingDirectory(Path.GetDirectoryName(singleFile)) + Command.Create(singleFile) + .WorkingDirectory(Path.GetDirectoryName(singleFile)) .CaptureStdErr() .CaptureStdOut() .EnvironmentVariable(BundleHelper.DotnetBundleExtractBaseEnvVariable, relativePath) .Execute() - .Should() - .Pass() - .And - .HaveStdOutContaining("Hello World"); - - var extractedFiles = BundleHelper.GetExtractedFiles(fixture, bundleOptions); - var extractedDir = new DirectoryInfo(Path.Combine(Path.GetDirectoryName(singleFile), - relativePath, - fixture.TestProject.ProjectName, - bundler.BundleManifest.BundleID)); - - extractedDir.Should().HaveFiles(extractedFiles); + .Should().Pass() + .And.HaveStdOutContaining("Hello World"); + + using (TestArtifact extractionRoot = new TestArtifact(Path.Combine(Path.GetDirectoryName(singleFile), relativePath))) + { + var extractedDir = sharedTestState.SelfContainedApp.GetExtractionDir(extractionRoot.Location, manifest); + var extractedFiles = BundleHelper.GetExtractedFiles(manifest, bundleOptions); + extractedDir.Should().OnlyHaveFiles(extractedFiles); + } } [Fact] - private void Bundle_extraction_is_reused() + private void ExtractionDirectoryReused() { - var fixture = sharedTestState.TestFixture.Copy(); - - // Publish the bundle - BundleOptions options = BundleOptions.BundleNativeBinaries; - Bundler bundler = BundleSelfContainedApp(fixture, out string singleFile, options); + SingleFileTestApp app = sharedTestState.SelfContainedApp; + var bundledApp = sharedTestState.BundledApp; - // Create a directory for extraction. - var extractBaseDir = BundleHelper.GetExtractionRootDir(fixture); + // Directory for extraction. + string extractBaseDir = app.GetNewExtractionRootPath(); // Run the bunded app for the first time, and extract files to // $DOTNET_BUNDLE_EXTRACT_BASE_DIR//bundle-id - Command.Create(singleFile) + Command.Create(bundledApp.Path) .CaptureStdErr() .CaptureStdOut() - .EnvironmentVariable(BundleHelper.DotnetBundleExtractBaseEnvVariable, extractBaseDir.FullName) + .EnvironmentVariable(BundleHelper.DotnetBundleExtractBaseEnvVariable, extractBaseDir) .Execute() - .Should() - .Pass() - .And - .HaveStdOutContaining("Hello World"); - - var extractDir = BundleHelper.GetExtractionDir(fixture, bundler); + .Should().Pass() + .And.HaveStdOutContaining("Hello World"); + var extractDir = app.GetExtractionDir(extractBaseDir, bundledApp.Manifest); extractDir.Refresh(); DateTime firstWriteTime = extractDir.LastWriteTimeUtc; @@ -143,73 +127,63 @@ private void Bundle_extraction_is_reused() } // Run the bundled app again (reuse extracted files) - Command.Create(singleFile) + Command.Create(bundledApp.Path) .CaptureStdErr() .CaptureStdOut() - .EnvironmentVariable(BundleHelper.DotnetBundleExtractBaseEnvVariable, extractBaseDir.FullName) + .EnvironmentVariable(BundleHelper.DotnetBundleExtractBaseEnvVariable, extractBaseDir) .Execute() - .Should() - .Pass() - .And - .HaveStdOutContaining("Hello World"); + .Should().Pass() + .And.HaveStdOutContaining("Hello World"); extractDir.Should().NotBeModifiedAfter(firstWriteTime); } [Fact] - private void Bundle_extraction_can_recover_missing_files() + private void RecoverMissingFiles() { - var fixture = sharedTestState.TestFixture.Copy(); - var hostName = BundleHelper.GetHostName(fixture); - var appName = Path.GetFileNameWithoutExtension(hostName); + SingleFileTestApp app = sharedTestState.SelfContainedApp; + var bundledApp = sharedTestState.BundledApp; - // Publish the bundle - BundleOptions options = BundleOptions.BundleNativeBinaries; - Bundler bundler = BundleSelfContainedApp(fixture, out string singleFile, options); - - // Create a directory for extraction. - var extractBaseDir = BundleHelper.GetExtractionRootDir(fixture); + // Directory for extraction. + string extractBaseDir = app.GetNewExtractionRootPath(); // Run the bunded app for the first time, and extract files to // $DOTNET_BUNDLE_EXTRACT_BASE_DIR//bundle-id - Command.Create(singleFile) + Command.Create(bundledApp.Path) .CaptureStdErr() .CaptureStdOut() - .EnvironmentVariable(BundleHelper.DotnetBundleExtractBaseEnvVariable, extractBaseDir.FullName) + .EnvironmentVariable(BundleHelper.DotnetBundleExtractBaseEnvVariable, extractBaseDir) .Execute() - .Should() - .Pass() - .And - .HaveStdOutContaining("Hello World"); + .Should().Pass() + .And.HaveStdOutContaining("Hello World"); // Remove the extracted files, but keep the extraction directory - var extractDir = BundleHelper.GetExtractionDir(fixture, bundler); - var extractedFiles = BundleHelper.GetExtractedFiles(fixture, BundleOptions.BundleNativeBinaries); + var extractDir = app.GetExtractionDir(extractBaseDir, bundledApp.Manifest); + var extractedFiles = BundleHelper.GetExtractedFiles(bundledApp.Manifest, bundledApp.Options); - Array.ForEach(extractedFiles, file => File.Delete(Path.Combine(extractDir.FullName, file))); + foreach (string file in extractedFiles) + File.Delete(Path.Combine(extractDir.FullName, file)); extractDir.Should().Exist(); extractDir.Should().NotHaveFiles(extractedFiles); // Run the bundled app again (recover deleted files) - Command.Create(singleFile) + Command.Create(bundledApp.Path) .CaptureStdErr() .CaptureStdOut() - .EnvironmentVariable(BundleHelper.DotnetBundleExtractBaseEnvVariable, extractBaseDir.FullName) + .EnvironmentVariable(BundleHelper.DotnetBundleExtractBaseEnvVariable, extractBaseDir) .Execute() - .Should() - .Pass() - .And - .HaveStdOutContaining("Hello World"); + .Should().Pass() + .And.HaveStdOutContaining("Hello World"); - extractDir.Should().HaveFiles(extractedFiles); + extractDir.Should().OnlyHaveFiles(extractedFiles); } [Fact] - private void Bundle_extraction_to_nonexisting_default() + private void NonexistentDefault_Fails() { string nonExistentPath = Path.Combine( - sharedTestState.DefaultBundledAppFixture.TestProject.OutputDirectory, + Path.GetDirectoryName(sharedTestState.BundledApp.Path), "nonexistent"); string defaultExpansionEnvVariable = OperatingSystem.IsWindows() ? "TMP" : "HOME"; @@ -217,7 +191,7 @@ private void Bundle_extraction_to_nonexisting_default() $"Failed to determine default extraction location. Check if 'TMP'" : $"Default extraction directory [{nonExistentPath}] either doesn't exist or is not accessible for read/write."; - Command.Create(sharedTestState.DefaultBundledAppExecutablePath) + Command.Create(sharedTestState.BundledApp.Path) .CaptureStdErr() .CaptureStdOut() .EnvironmentVariable(defaultExpansionEnvVariable, nonExistentPath) @@ -227,56 +201,51 @@ private void Bundle_extraction_to_nonexisting_default() [Fact] [SkipOnPlatform(TestPlatforms.Windows, "On Windows the default extraction path is determined by calling GetTempPath which looks at multiple places and can't really be undefined.")] - private void Bundle_extraction_fallsback_to_getpwuid_when_HOME_env_var_is_undefined() + private void UndefinedHOME_getpwuidFallback() { string home = Environment.GetEnvironmentVariable("HOME"); - // suppose we are testing on a system where HOME is not set, use System.Environment (which also fallsback to getpwuid) if (string.IsNullOrEmpty(home)) { + // HOME is not set. Use System.Environment (which also fallsback to getpwuid) home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); } - DirectoryInfo sharedExtractDirInfo = BundleHelper.GetExtractionDir(sharedTestState.TestFixture, sharedTestState.DefaultBundledAppBundler); - string sharedExtractDir = sharedExtractDirInfo.FullName; - string extractDirSubPath = sharedExtractDir.Substring(sharedExtractDir.LastIndexOf("extract/") + "extract/".Length); - string realExtractDir = Path.Combine(home, ".net", extractDirSubPath); - var expectedExtractDir = new DirectoryInfo(realExtractDir); - - Command.Create(sharedTestState.DefaultBundledAppExecutablePath) + var bundledApp = sharedTestState.BundledApp; + Command.Create(bundledApp.Path) .CaptureStdErr() .CaptureStdOut() .EnvironmentVariable("HOME", null) .Execute() - .Should() - .Pass() - .And - .HaveStdOutContaining("Hello World"); + .Should().Pass() + .And.HaveStdOutContaining("Hello World"); - var extractedFiles = BundleHelper.GetExtractedFiles(sharedTestState.TestFixture, BundleOptions.BundleNativeBinaries); + DirectoryInfo expectedExtractDir = sharedTestState.SelfContainedApp.GetExtractionDir(Path.Combine(home, ".net"), bundledApp.Manifest); + var extractedFiles = BundleHelper.GetExtractedFiles(bundledApp.Manifest, bundledApp.Options); expectedExtractDir.Should().HaveFiles(extractedFiles); } - public class SharedTestState : SharedTestStateBase, IDisposable + public class SharedTestState : IDisposable { - public TestProjectFixture TestFixture { get; } + public (string Path, Manifest Manifest, BundleOptions Options) BundledApp{ get; } - public TestProjectFixture DefaultBundledAppFixture { get; } - public string DefaultBundledAppExecutablePath { get; } - public Bundler DefaultBundledAppBundler { get; } + public SingleFileTestApp SelfContainedApp { get; } public SharedTestState() { - TestFixture = PreparePublishedSelfContainedTestProject("StandaloneApp"); + SelfContainedApp = SingleFileTestApp.CreateSelfContained("HelloWorld"); + + // Copy over mockcoreclr so that the app will have a native binary + File.Copy(Binaries.CoreClr.MockPath, Path.Combine(SelfContainedApp.NonBundledLocation, Binaries.CoreClr.MockName)); - DefaultBundledAppFixture = TestFixture.Copy(); - DefaultBundledAppBundler = BundleSelfContainedApp(DefaultBundledAppFixture, out var singleFile, BundleOptions.BundleNativeBinaries); - DefaultBundledAppExecutablePath = singleFile; + // Create a bundled app that can be used by multiple tests + BundleOptions options = BundleOptions.BundleNativeBinaries; + string bundlePath = SelfContainedApp.Bundle(options, out Manifest manifest); + BundledApp = (bundlePath, manifest, options); } public void Dispose() { - DefaultBundledAppFixture.Dispose(); - TestFixture.Dispose(); + SelfContainedApp.Dispose(); } } } diff --git a/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleProbe.cs b/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleProbe.cs index 8679f834a638aa..1c61a709d3b503 100644 --- a/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleProbe.cs +++ b/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleProbe.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Linq; using BundleTests.Helpers; using Microsoft.DotNet.Cli.Build.Framework; using Microsoft.DotNet.CoreSetup.Test; @@ -19,35 +20,45 @@ public BundleProbe(SharedTestState fixture) } [Fact] - private void Bundle_Probe_Not_Passed_For_Non_Single_File_App() + private void NonSingleFileApp_NoProbe() { var fixture = sharedTestState.TestFixture.Copy(); string appExe = BundleHelper.GetHostPath(fixture); - Command.Create(appExe) + Command.Create(appExe, "host_runtime_contract.bundle_probe") .CaptureStdErr() .CaptureStdOut() .Execute() - .Should() - .Pass() - .And - .HaveStdOutContaining("No BUNDLE_PROBE"); + .Should().Pass() + .And.HaveStdOutContaining("host_runtime_contract.bundle_probe is not set"); } [Fact] - private void Bundle_Probe_Passed_For_Single_File_App() + private void SingleFileApp_ProbeFiles() { var fixture = sharedTestState.TestFixture.Copy(); string singleFile = BundleSelfContainedApp(fixture); - Command.Create(singleFile, "SingleFile") + (string Path, bool ShouldBeFound)[] itemsToProbe = new[] + { + ($"{fixture.TestProject.AssemblyName}.dll", true), + ($"{fixture.TestProject.AssemblyName}.runtimeconfig.json", true), + ("System.Private.CoreLib.dll", true), + ("hostpolicy.dll", false), + ("--", false), + (string.Empty, false), + }; + + var result = Command.Create(singleFile, $"host_runtime_contract.bundle_probe {string.Join(" ", itemsToProbe.Select(i => i.Path))}") .CaptureStdErr() .CaptureStdOut() - .Execute() - .Should() - .Pass() - .And - .HaveStdOutContaining("BUNDLE_PROBE OK"); + .Execute(); + + result.Should().Pass(); + foreach (var item in itemsToProbe) + { + result.Should().HaveStdOutContaining($"{item.Path} - found = {item.ShouldBeFound}"); + } } public class SharedTestState : SharedTestStateBase, IDisposable @@ -56,7 +67,7 @@ public class SharedTestState : SharedTestStateBase, IDisposable public SharedTestState() { - TestFixture = PreparePublishedSelfContainedTestProject("BundleProbeTester"); + TestFixture = PreparePublishedSelfContainedTestProject("HostApiInvokerApp"); } public void Dispose() diff --git a/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundledAppWithSubDirs.cs b/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundledAppWithSubDirs.cs index 028aad8a06ef91..a84a781267afea 100644 --- a/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundledAppWithSubDirs.cs +++ b/src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundledAppWithSubDirs.cs @@ -4,7 +4,6 @@ using System; using System.IO; using BundleTests.Helpers; -using Microsoft.DotNet.Cli.Build; using Microsoft.DotNet.Cli.Build.Framework; using Microsoft.DotNet.CoreSetup.Test; using Microsoft.NET.HostModel.AppHost; @@ -22,47 +21,43 @@ public BundledAppWithSubDirs(SharedTestState fixture) sharedTestState = fixture; } - private void RunTheApp(string path, TestProjectFixture fixture) + private void RunTheApp(string path, bool selfContained) { - RunTheApp(path, fixture.BuiltDotnet) - .Should() - .Pass() - .And - .HaveStdOutContaining("Wow! We now say hello to the big world and you."); + RunTheApp(path, selfContained ? null : RepoDirectoriesProvider.Default.BuiltDotnet) + .Should().Pass() + .And.HaveStdOutContaining("Wow! We now say hello to the big world and you."); } - private CommandResult RunTheApp(string path, DotNetCli dotnet) + private CommandResult RunTheApp(string path, string dotnetRoot) { return Command.Create(path) .EnableTracingAndCaptureOutputs() - .DotNetRoot(dotnet.BinPath) + .DotNetRoot(dotnetRoot) .MultilevelLookup(false) .Execute(); } [InlineData(BundleOptions.None)] - [InlineData(BundleOptions.BundleNativeBinaries)] [InlineData(BundleOptions.BundleAllContent)] [Theory] - public void Bundled_Framework_dependent_App_Run_Succeeds(BundleOptions options) + public void FrameworkDependent(BundleOptions options) { - var fixture = sharedTestState.TestFrameworkDependentFixture.Copy(); - UseFrameworkDependentHost(fixture); - var singleFile = BundleHelper.BundleApp(fixture, options); + var singleFile = sharedTestState.FrameworkDependentApp.Bundle(options); - // Run the bundled app (extract files) - RunTheApp(singleFile, fixture); + // Run the bundled app + RunTheApp(singleFile, selfContained: false); - // Run the bundled app again (reuse extracted files) - RunTheApp(singleFile, fixture); + if (options.HasFlag(BundleOptions.BundleAllContent)) + { + // Run the bundled app again (reuse extracted files) + RunTheApp(singleFile, selfContained: false); + } } [Fact] - public void Bundle_Framework_dependent_NoBundleEntryPoint() + public void FrameworkDependent_NoBundleEntryPoint() { - var fixture = sharedTestState.TestFrameworkDependentFixture.Copy(); - UseFrameworkDependentHost(fixture); - var singleFile = BundleHelper.BundleApp(fixture, BundleOptions.None); + var singleFile = sharedTestState.FrameworkDependentApp.Bundle(BundleOptions.None); string dotnetWithMockHostFxr = SharedFramework.CalculateUniqueTestDirectory(Path.Combine(TestArtifact.TestArtifactsPath, "guiErrors")); using (new TestArtifact(dotnetWithMockHostFxr)) @@ -74,7 +69,7 @@ public void Bundle_Framework_dependent_NoBundleEntryPoint() var dotnet = dotnetBuilder.Build(); // Run the bundled app (extract files) - RunTheApp(singleFile, dotnet) + RunTheApp(singleFile, dotnet.BinPath) .Should() .Fail() .And.HaveStdErrContaining("You must install or update .NET to run this application.") @@ -84,15 +79,12 @@ public void Bundle_Framework_dependent_NoBundleEntryPoint() } [InlineData(BundleOptions.None)] - [InlineData(BundleOptions.BundleNativeBinaries)] [InlineData(BundleOptions.BundleAllContent)] [Theory] [PlatformSpecific(TestPlatforms.Windows)] // GUI app host is only supported on Windows. - public void Bundled_Framework_dependent_App_GUI_DownlevelHostFxr_ErrorDialog(BundleOptions options) + public void FrameworkDependent_GUI_DownlevelHostFxr_ErrorDialog(BundleOptions options) { - var fixture = sharedTestState.TestFrameworkDependentFixture.Copy(); - UseFrameworkDependentHost(fixture); - var singleFile = BundleHelper.BundleApp(fixture, options); + var singleFile = sharedTestState.FrameworkDependentApp.Bundle(options); PEUtils.SetWindowsGraphicalUserInterfaceBit(singleFile); string dotnetWithMockHostFxr = SharedFramework.CalculateUniqueTestDirectory(Path.Combine(TestArtifact.TestArtifactsPath, "bundleErrors")); @@ -125,158 +117,93 @@ public void Bundled_Framework_dependent_App_GUI_DownlevelHostFxr_ErrorDialog(Bun } [InlineData(BundleOptions.None)] - [InlineData(BundleOptions.BundleNativeBinaries)] - [InlineData(BundleOptions.BundleAllContent)] - [Theory] - public void Bundled_Self_Contained_App_Run_Succeeds(BundleOptions options) - { - var fixture = sharedTestState.TestSelfContainedFixture.Copy(); - var singleFile = BundleSelfContainedApp(fixture, options); - - // Run the bundled app (extract files) - RunTheApp(singleFile, fixture); - - // Run the bundled app again (reuse extracted files) - RunTheApp(singleFile, fixture); - } - - [InlineData(BundleOptions.None)] - [InlineData(BundleOptions.BundleNativeBinaries)] [InlineData(BundleOptions.BundleAllContent)] + [InlineData(BundleOptions.EnableCompression)] + [InlineData(BundleOptions.BundleAllContent | BundleOptions.EnableCompression)] [Theory] - public void Bundled_Self_Contained_NoCompression_App_Run_Succeeds(BundleOptions options) + public void SelfContained(BundleOptions options) { - var fixture = sharedTestState.TestSelfContainedFixture.Copy(); - var singleFile = BundleSelfContainedApp(fixture, options, disableCompression: true); + var singleFile = sharedTestState.SelfContainedApp.Bundle(options); - // Run the bundled app (extract files) - RunTheApp(singleFile, fixture); + // Run the bundled app + RunTheApp(singleFile, selfContained: true); - // Run the bundled app again (reuse extracted files) - RunTheApp(singleFile, fixture); + if (options.HasFlag(BundleOptions.BundleAllContent)) + { + // Run the bundled app again (reuse extracted files) + RunTheApp(singleFile, selfContained: true); + } } [InlineData(BundleOptions.None)] - [InlineData(BundleOptions.BundleNativeBinaries)] [InlineData(BundleOptions.BundleAllContent)] [Theory] - public void Bundled_Self_Contained_Targeting50_App_Run_Succeeds(BundleOptions options) + public void SelfContained_Targeting50(BundleOptions options) { - var fixture = sharedTestState.TestSelfContainedFixture.Copy(); - var singleFile = BundleSelfContainedApp(fixture, options, new Version(5, 0)); + var singleFile = sharedTestState.SelfContainedApp.Bundle(options, new Version(5, 0)); - // Run the bundled app (extract files) - RunTheApp(singleFile, fixture); + // Run the bundled app + RunTheApp(singleFile, selfContained: true); - // Run the bundled app again (reuse extracted files) - RunTheApp(singleFile, fixture); + if (options.HasFlag(BundleOptions.BundleAllContent)) + { + // Run the bundled app again (reuse extracted files) + RunTheApp(singleFile, selfContained: true); + } } [InlineData(BundleOptions.BundleAllContent)] [Theory] - public void Bundled_Framework_dependent_Targeting50_App_Run_Succeeds(BundleOptions options) + public void FrameworkDependent_Targeting50(BundleOptions options) { - var fixture = sharedTestState.TestSelfContainedFixture.Copy(); - UseFrameworkDependentHost(fixture); - var singleFile = BundleHelper.BundleApp(fixture, options, new Version(5, 0)); + var singleFile = sharedTestState.FrameworkDependentApp.Bundle(options, new Version(5, 0)); - // Run the bundled app (extract files) - RunTheApp(singleFile, fixture); - - // Run the bundled app again (reuse extracted files) - RunTheApp(singleFile, fixture); - } + // Run the bundled app + RunTheApp(singleFile, selfContained: false); - [Fact] - public void Bundled_Self_Contained_Targeting50_WithCompression_Throws() - { - var fixture = sharedTestState.TestSelfContainedFixture.Copy(); - UseSingleFileSelfContainedHost(fixture); - // compression must be off when targeting 5.0 - var options = BundleOptions.EnableCompression; - - Assert.Throws(()=>BundleHelper.BundleApp(fixture, options, new Version(5, 0))); + if (options.HasFlag(BundleOptions.BundleAllContent)) + { + // Run the bundled app again (reuse extracted files) + RunTheApp(singleFile, selfContained: false); + } } [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/54234")] // NOTE: when enabling this test take a look at commented code marked by "ACTIVE ISSUE:" in SharedTestState - public void Bundled_Self_Contained_Composite_App_Run_Succeeds() + public void SelfContained_R2R_Composite() { - var fixture = sharedTestState.TestSelfContainedFixtureComposite.Copy(); - var singleFile = BundleSelfContainedApp(fixture, BundleOptions.None, disableCompression: true); + var singleFile = sharedTestState.SelfContainedCompositeApp.Bundle(BundleOptions.None); // Run the app - RunTheApp(singleFile, fixture); - } - - [InlineData(BundleOptions.None)] - [InlineData(BundleOptions.BundleNativeBinaries)] - [InlineData(BundleOptions.BundleAllContent)] - [Theory] - public void Bundled_With_Empty_File_Succeeds(BundleOptions options) - { - var fixture = sharedTestState.TestAppWithEmptyFileFixture.Copy(); - var singleFile = BundleSelfContainedApp(fixture, options); - - // Run the app - RunTheApp(singleFile, fixture); + RunTheApp(singleFile, selfContained: true); } public class SharedTestState : SharedTestStateBase, IDisposable { - public TestProjectFixture TestFrameworkDependentFixture { get; set; } - public TestProjectFixture TestSelfContainedFixture { get; set; } - public TestProjectFixture TestAppWithEmptyFileFixture { get; set; } - public TestProjectFixture TestSelfContainedFixtureComposite { get; set; } + public SingleFileTestApp FrameworkDependentApp { get; } + public SingleFileTestApp SelfContainedApp { get; } + public SingleFileTestApp SelfContainedCompositeApp { get; } public SharedTestState() { - TestFrameworkDependentFixture = new TestProjectFixture("AppWithSubDirs", RepoDirectories); - BundleHelper.AddLongNameContentToAppWithSubDirs(TestFrameworkDependentFixture); - TestFrameworkDependentFixture - .EnsureRestoredForRid(TestFrameworkDependentFixture.CurrentRid) - .PublishProject(runtime: TestFrameworkDependentFixture.CurrentRid, - selfContained: false, - outputDirectory: BundleHelper.GetPublishPath(TestFrameworkDependentFixture)); - - TestSelfContainedFixture = new TestProjectFixture("AppWithSubDirs", RepoDirectories); - BundleHelper.AddLongNameContentToAppWithSubDirs(TestSelfContainedFixture); - TestSelfContainedFixture - .EnsureRestoredForRid(TestSelfContainedFixture.CurrentRid) - .PublishProject(runtime: TestSelfContainedFixture.CurrentRid, - selfContained: true, - outputDirectory: BundleHelper.GetPublishPath(TestSelfContainedFixture)); - - TestAppWithEmptyFileFixture = new TestProjectFixture("AppWithSubDirs", RepoDirectories); - BundleHelper.AddLongNameContentToAppWithSubDirs(TestAppWithEmptyFileFixture); - BundleHelper.AddEmptyContentToApp(TestAppWithEmptyFileFixture); - TestAppWithEmptyFileFixture - .EnsureRestoredForRid(TestAppWithEmptyFileFixture.CurrentRid) - .PublishProject(runtime: TestAppWithEmptyFileFixture.CurrentRid, - selfContained: true, - outputDirectory: BundleHelper.GetPublishPath(TestAppWithEmptyFileFixture)); - - TestSelfContainedFixtureComposite = new TestProjectFixture("AppWithSubDirs", RepoDirectories); - BundleHelper.AddLongNameContentToAppWithSubDirs(TestSelfContainedFixtureComposite); - TestSelfContainedFixtureComposite - .EnsureRestoredForRid(TestSelfContainedFixtureComposite.CurrentRid) - .PublishProject(runtime: TestSelfContainedFixtureComposite.CurrentRid, - // ACTIVE ISSUE: https://github.com/dotnet/runtime/issues/54234 - // uncomment extraArgs when fixed. - selfContained: true, - outputDirectory: BundleHelper.GetPublishPath(TestSelfContainedFixtureComposite) /*, - extraArgs: new string[] { - "/p:PublishReadyToRun=true", - "/p:PublishReadyToRunComposite=true" } */); + FrameworkDependentApp = SingleFileTestApp.CreateFrameworkDependent("AppWithSubDirs"); + BundleHelper.AddLongNameContentToAppWithSubDirs(FrameworkDependentApp.NonBundledLocation); + + SelfContainedApp = SingleFileTestApp.CreateSelfContained("AppWithSubDirs"); + BundleHelper.AddLongNameContentToAppWithSubDirs(SelfContainedApp.NonBundledLocation); + + // ACTIVE ISSUE: https://github.com/dotnet/runtime/issues/54234 + // This should be an app built with the equivalent of PublishReadyToRun=true and PublishReadyToRunComposite=true + SelfContainedCompositeApp = SingleFileTestApp.CreateSelfContained("AppWithSubDirs"); + BundleHelper.AddLongNameContentToAppWithSubDirs(SelfContainedCompositeApp.NonBundledLocation); } public void Dispose() { - TestFrameworkDependentFixture.Dispose(); - TestSelfContainedFixture.Dispose(); - TestAppWithEmptyFileFixture.Dispose(); - TestSelfContainedFixtureComposite.Dispose(); + FrameworkDependentApp.Dispose(); + SelfContainedApp.Dispose(); + SelfContainedCompositeApp.Dispose(); } } } diff --git a/src/installer/tests/Microsoft.NET.HostModel.Tests/Helpers/BundleHelper.cs b/src/installer/tests/Microsoft.NET.HostModel.Tests/Helpers/BundleHelper.cs index a559f73d72fc25..d64afd8d1c8223 100644 --- a/src/installer/tests/Microsoft.NET.HostModel.Tests/Helpers/BundleHelper.cs +++ b/src/installer/tests/Microsoft.NET.HostModel.Tests/Helpers/BundleHelper.cs @@ -52,46 +52,39 @@ public static string GetAppBaseName(TestProjectFixture fixture) return Path.GetFileNameWithoutExtension(GetAppName(fixture)); } - public static string[] GetBundledFiles(TestProjectFixture fixture) + public static List GetExtractedFiles(Manifest manifest, BundleOptions bundleOptions) { - string appBaseName = GetAppBaseName(fixture); - return new string[] { $"{appBaseName}.dll", $"{appBaseName}.deps.json", $"{appBaseName}.runtimeconfig.json" }; - } - - public static string[] GetExtractedFiles(TestProjectFixture fixture, BundleOptions bundleOptions) - { - switch (bundleOptions & ~BundleOptions.EnableCompression) + List expected = new List(); + foreach (FileEntry file in manifest.Files) { - case BundleOptions.None: - case BundleOptions.BundleOtherFiles: - case BundleOptions.BundleSymbolFiles: - throw new ArgumentException($"Bundle option {bundleOptions} doesn't extract any files to disk."); + if (!ShouldBeExtracted(file.Type, bundleOptions)) + continue; - case BundleOptions.BundleAllContent: - return Directory.GetFiles(GetPublishPath(fixture)) - .Select(f => Path.GetFileName(f)) - .Except(GetFilesNeverExtracted(fixture)).ToArray(); + expected.Add(file.RelativePath); + } - case BundleOptions.BundleNativeBinaries: - return new string[] { Path.GetFileName(fixture.TestProject.CoreClrDll) }; + return expected; - default: - throw new ArgumentException("Unsupported bundle option."); + static bool ShouldBeExtracted(FileType type, BundleOptions options) + { + switch (type) + { + case FileType.Assembly: + case FileType.DepsJson: + case FileType.RuntimeConfigJson: + return options.HasFlag(BundleOptions.BundleAllContent); + case FileType.NativeBinary: + return options.HasFlag(BundleOptions.BundleNativeBinaries); + case FileType.Symbols: + return options.HasFlag(BundleOptions.BundleSymbolFiles); + case FileType.Unknown: + return options.HasFlag(BundleOptions.BundleOtherFiles); + default: + return false; + } } } - public static string[] GetFilesNeverExtracted(TestProjectFixture fixture) - { - string appBaseName = GetAppBaseName(fixture); - return new string[] { $"{appBaseName}", - $"{appBaseName}.dll", - $"{appBaseName}.exe", - $"{appBaseName}.pdb", - $"{appBaseName}.runtimeconfig.dev.json", - Path.GetFileName(fixture.TestProject.HostFxrDll), - Path.GetFileName(fixture.TestProject.HostPolicyDll) }; - } - public static string GetPublishPath(TestProjectFixture fixture) { return Path.Combine(fixture.TestProject.ProjectDirectory, "publish"); @@ -217,13 +210,13 @@ public static Bundler Bundle(TestProjectFixture fixture, BundleOptions options = return BundleApp(fixture, out singleFile, options, copyExcludedFiles:false); } - public static void AddLongNameContentToAppWithSubDirs(TestProjectFixture fixture) + public static void AddLongNameContentToAppWithSubDirs(string projectDirectory) { // For tests using the AppWithSubDirs, One of the sub-directories with a really long name // is generated during test-runs rather than being checked in as a test asset. // This prevents git-clone of the repo from failing if long-file-name support is not enabled on windows. var longDirName = "This is a really, really, really, really, really, really, really, really, really, really, really, really, really, really long file name for punctuation"; - var longDirPath = Path.Combine(fixture.TestProject.ProjectDirectory, "Sentence", longDirName); + var longDirPath = Path.Combine(projectDirectory, "Sentence", longDirName); Directory.CreateDirectory(longDirPath); using (var writer = File.CreateText(Path.Combine(longDirPath, "word"))) { 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 232410be8f2596..b4d038b99b5ce3 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 @@ -11,6 +11,7 @@ using Microsoft.NET.HostModel.AppHost; using Microsoft.DotNet.CoreSetup.Test; using System.Diagnostics; +using System.Reflection.PortableExecutable; namespace Microsoft.NET.HostModel.Tests { @@ -111,7 +112,9 @@ public void ItCanSetWindowsGUISubsystem() BitConverter .ToUInt16(File.ReadAllBytes(destinationFilePath), SubsystemOffset) .Should() - .Be(2); + .Be((ushort)Subsystem.WindowsGui); + + Assert.Equal((ushort)Subsystem.WindowsGui, PEUtils.GetWindowsGraphicalUserInterfaceBit(destinationFilePath)); } } @@ -153,6 +156,7 @@ public void ItFailsToSetGUISubsystemWithWrongDefault() string destinationFilePath = Path.Combine(testDirectory.Path, "DestinationAppHost.exe.mock"); string appBinaryFilePath = "Test/App/Binary/Path.dll"; + Assert.Equal(42, PEUtils.GetWindowsGraphicalUserInterfaceBit(sourceAppHostMock)); Assert.Throws(() => HostWriter.CreateAppHost( sourceAppHostMock, diff --git a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.Bundle.Tests/BundleAndRun.cs b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.Bundle.Tests/BundleAndRun.cs index bca81f3178cd8b..69813ce270ec69 100644 --- a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.Bundle.Tests/BundleAndRun.cs +++ b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.Bundle.Tests/BundleAndRun.cs @@ -8,6 +8,7 @@ using Microsoft.DotNet.CoreSetup.Test; using BundleTests.Helpers; using System.Runtime.InteropServices; +using System.Text; namespace Microsoft.NET.HostModel.Tests { @@ -20,33 +21,21 @@ public BundleAndRun(BundleAndRun.SharedTestState fixture) sharedTestState = fixture; } - private void RunTheApp(string path) + private void RunTheApp(string path, bool selfContained) { Command.Create(path) .CaptureStdErr() .CaptureStdOut() + .DotNetRoot(selfContained ? null : RepoDirectoriesProvider.Default.BuiltDotnet) .Execute() - .Should() - .Pass() - .And - .HaveStdOutContaining("Wow! We now say hello to the big world and you."); - } - - private void CheckFileSigned(string path) - { - // Check if the file is signed (it should have been signed by the bundler) - Command.Create("codesign", $"-v {path}") - .CaptureStdErr() - .CaptureStdOut() - .Execute() - .Should() - .Pass(); + .Should().Pass() + .And.HaveStdOutContaining("Hello World!"); } - private string MakeUniversalBinary(string path, string rid) + private string MakeUniversalBinary(string path, Architecture architecture) { string fatApp = path + ".fat"; - string arch = BundleHelper.GetTargetArch(rid) == Architecture.Arm64 ? "arm64" : "x86_64"; + string arch = architecture == Architecture.Arm64 ? "arm64" : "x86_64"; // We will create a universal binary with just one arch slice and run it. // It is enough for testing purposes. The code that finds the releavant slice @@ -61,87 +50,62 @@ private string MakeUniversalBinary(string path, string rid) return fatApp; } - private void BundleRun(TestProjectFixture fixture, string publishPath) + [Theory] + [InlineData(true)] + [InlineData(false)] + private void RunApp(bool selfContained) { - var hostName = BundleHelper.GetHostName(fixture); - - // Run the App normally - RunTheApp(Path.Combine(publishPath, hostName)); - // Bundle to a single-file - string singleFile = BundleHelper.BundleApp(fixture); + string singleFile = selfContained + ? sharedTestState.SelfContainedApp.Bundle() + : sharedTestState.FrameworkDependentApp.Bundle(); - // check that the file structure is understood by codesign - var targetOS = BundleHelper.GetTargetOS(fixture.CurrentRid); - if (targetOS == OSPlatform.OSX) - { - CheckFileSigned(singleFile); - } - - // Run the extracted app - RunTheApp(singleFile); + // Run the bundled app + RunTheApp(singleFile, selfContained); - if (targetOS == OSPlatform.OSX) + if (OperatingSystem.IsMacOS()) { - string fatApp = MakeUniversalBinary(singleFile, fixture.CurrentRid); + string fatApp = MakeUniversalBinary(singleFile, RuntimeInformation.OSArchitecture); // Run the fat app - RunTheApp(fatApp); + RunTheApp(fatApp, selfContained); } } - private string RelativePath(string path) - { - return Path.GetRelativePath(Directory.GetCurrentDirectory(), path) - .TrimEnd(Path.DirectorySeparatorChar); - } - - [Fact] - public void TestWithAbsolutePaths() + [Theory] + [InlineData(true)] + [InlineData(false)] + public void AdditionalContentAfterBundleMetadata(bool selfContained) { - var fixture = sharedTestState.TestFixture.Copy(); - string publishDir = BundleHelper.GetPublishPath(fixture); - BundleRun(fixture, publishDir); - } + string singleFile = selfContained + ? sharedTestState.SelfContainedApp.Bundle() + : sharedTestState.FrameworkDependentApp.Bundle(); - [Fact] - public void TestWithRelativePaths() - { - var fixture = sharedTestState.TestFixture.Copy(); - string publishDir = RelativePath(BundleHelper.GetPublishPath(fixture)); - BundleRun(fixture, publishDir); - } + using (var file = File.OpenWrite(singleFile)) + { + file.Position = file.Length; + var blob = Encoding.UTF8.GetBytes("Mock signature at the end of the bundle"); + file.Write(blob, 0, blob.Length); + } - [Fact] - public void TestWithRelativePathsDirSeparator() - { - var fixture = sharedTestState.TestFixture.Copy(); - string publishDir = RelativePath(BundleHelper.GetPublishPath(fixture)) + Path.DirectorySeparatorChar; - BundleRun(fixture, publishDir); + RunTheApp(singleFile, selfContained); } public class SharedTestState : IDisposable { - public TestProjectFixture TestFixture { get; set; } - public TestProjectFixture LegacyFixture { get; set; } - public RepoDirectoriesProvider RepoDirectories { get; set; } + public SingleFileTestApp FrameworkDependentApp { get; } + public SingleFileTestApp SelfContainedApp { get; } public SharedTestState() { - RepoDirectories = new RepoDirectoriesProvider(); - - TestFixture = new TestProjectFixture("AppWithSubDirs", RepoDirectories); - BundleHelper.AddLongNameContentToAppWithSubDirs(TestFixture); - TestFixture - .EnsureRestoredForRid(TestFixture.CurrentRid) - .PublishProject(runtime: TestFixture.CurrentRid, - selfContained: true, - outputDirectory: BundleHelper.GetPublishPath(TestFixture)); + FrameworkDependentApp = SingleFileTestApp.CreateFrameworkDependent("HelloWorld"); + SelfContainedApp = SingleFileTestApp.CreateSelfContained("HelloWorld"); } public void Dispose() { - TestFixture.Dispose(); + FrameworkDependentApp.Dispose(); + SelfContainedApp.Dispose(); } } } diff --git a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.Bundle.Tests/BundlerConsistencyTests.cs b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.Bundle.Tests/BundlerConsistencyTests.cs index c7f0e0b7a0ccac..3b4233887a72ef 100644 --- a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.Bundle.Tests/BundlerConsistencyTests.cs +++ b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.Bundle.Tests/BundlerConsistencyTests.cs @@ -1,17 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using BundleTests.Helpers; -using FluentAssertions; -using Microsoft.DotNet.Cli.Build.Framework; -using Microsoft.DotNet.CoreSetup.Test; -using Microsoft.NET.HostModel.Bundle; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices; -using System.Text; +using FluentAssertions; +using Microsoft.DotNet.Cli.Build.Framework; +using Microsoft.DotNet.CoreSetup.Test; +using Microsoft.NET.HostModel.Bundle; using Xunit; namespace Microsoft.NET.HostModel.Tests @@ -25,72 +23,69 @@ public BundlerConsistencyTests(SharedTestState fixture) sharedTestState = fixture; } + private static string BundlerHostName = Binaries.GetExeFileNameForCurrentPlatform(SharedTestState.AppName); + private Bundler CreateBundlerInstance(BundleOptions bundleOptions = BundleOptions.None, Version version = null, bool macosCodesign = true) + => new Bundler(BundlerHostName, SharedFramework.CalculateUniqueTestDirectory($"{sharedTestState.App.Location}-bundle"), bundleOptions, targetFrameworkVersion: version, macosCodesign: macosCodesign); + [Fact] - public void TestWithEmptySpecFails() + public void EnableCompression_Before60_Fails() { - var fixture = sharedTestState.TestFixture.Copy(); + // compression must be off when targeting pre-6.0 + Assert.Throws(() => + CreateBundlerInstance(BundleOptions.EnableCompression, new Version(5, 0))); + } - var hostName = BundleHelper.GetHostName(fixture); - var bundleDir = BundleHelper.GetBundleDir(fixture); - var targetOS = BundleHelper.GetTargetOS(fixture.CurrentRid); - var targetArch = BundleHelper.GetTargetArch(fixture.CurrentRid); - Bundler bundler = new Bundler(hostName, bundleDir.FullName, targetOS: targetOS, targetArch: targetArch); + [Theory] + [InlineData(null)] + [InlineData("")] + [InlineData(" ")] + public void InvalidFileSpec_Fails(string invalidSpecPath) + { + FileSpec invalidSourcePath = new FileSpec(invalidSpecPath, BundlerHostName); + Assert.False(invalidSourcePath.IsValid()); - FileSpec[][] invalidSpecs = - { - new FileSpec[] {new FileSpec(hostName, null) }, - new FileSpec[] {new FileSpec(hostName, "") }, - new FileSpec[] {new FileSpec(hostName, " ") } - }; + FileSpec invalidBundlePath = new FileSpec(BundlerHostName, invalidSpecPath); + Assert.False(invalidBundlePath.IsValid()); - foreach (var invalidSpec in invalidSpecs) - { - Assert.Throws(() => bundler.GenerateBundle(invalidSpec)); - } + Bundler bundler = CreateBundlerInstance(); + Assert.Throws(() => bundler.GenerateBundle(new[] { invalidSourcePath })); + Assert.Throws(() => bundler.GenerateBundle(new[] { invalidBundlePath })); } [Fact] - public void TestWithoutSpecifyingHostFails() + public void NoHostInFileSpecs_Fails() { - var fixture = sharedTestState.TestFixture.Copy(); - - var hostName = BundleHelper.GetHostName(fixture); - var appName = Path.GetFileNameWithoutExtension(hostName); - var bundleDir = BundleHelper.GetBundleDir(fixture); - var targetOS = BundleHelper.GetTargetOS(fixture.CurrentRid); - var targetArch = BundleHelper.GetTargetArch(fixture.CurrentRid); + var appName = Path.GetFileNameWithoutExtension(BundlerHostName); - // Generate a file specification without the apphost - var fileSpecs = new List(); - string[] files = { $"{appName}.dll", $"{appName}.deps.json", $"{appName}.runtimeconfig.json" }; - Array.ForEach(files, x => fileSpecs.Add(new FileSpec(x, x))); - - Bundler bundler = new Bundler(hostName, bundleDir.FullName, targetOS: targetOS, targetArch: targetArch); + // File specification without the apphost + var fileSpecs = new FileSpec[] + { + new FileSpec($"{appName}.dll", $"{appName}.dll"), + new FileSpec($"{appName}.deps.json", $"{appName}.deps.json"), + new FileSpec($"{appName}.runtimeconfig.json", $"{appName}.runtimeconfig.json") + }; + Bundler bundler = CreateBundlerInstance(); Assert.Throws(() => bundler.GenerateBundle(fileSpecs)); } [Fact] - public void TestWithExactDuplicateEntriesPasses() + public void ExactDuplicateEntries() { - var fixture = sharedTestState.TestFixture.Copy(); - - var hostName = BundleHelper.GetHostName(fixture); - var bundleDir = BundleHelper.GetBundleDir(fixture); - var targetOS = BundleHelper.GetTargetOS(fixture.CurrentRid); - var targetArch = BundleHelper.GetTargetArch(fixture.CurrentRid); - - // Generate a file specification with duplicate entries - var fileSpecs = new List(); - fileSpecs.Add(new FileSpec(BundleHelper.GetHostPath(fixture), BundleHelper.GetHostName(fixture))); - string appPath = BundleHelper.GetAppPath(fixture); - fileSpecs.Add(new FileSpec(appPath, "rel/app.repeat.dll")); - fileSpecs.Add(new FileSpec(appPath, "rel/app.repeat.dll")); - string systemLibPath = Path.Join(BundleHelper.GetPublishPath(fixture), "System.dll"); - fileSpecs.Add(new FileSpec(systemLibPath, "rel/system.repeat.dll")); - fileSpecs.Add(new FileSpec(systemLibPath, "rel/system.repeat.dll")); - - Bundler bundler = new Bundler(hostName, bundleDir.FullName, targetOS: targetOS, targetArch: targetArch); + string appPath = sharedTestState.App.AppDll; + string systemLibPath = sharedTestState.SystemDll; + + // File specification with duplicate entries with matching source paths + var fileSpecs = new FileSpec[] + { + new FileSpec(Binaries.AppHost.FilePath, BundlerHostName), + new FileSpec(appPath, "rel/app.repeat.dll"), + new FileSpec(appPath, "rel/app.repeat.dll"), + new FileSpec(systemLibPath, "rel/system.repeat.dll"), + new FileSpec(systemLibPath, "rel/system.repeat.dll") + }; + + Bundler bundler = CreateBundlerInstance(); bundler.GenerateBundle(fileSpecs); // Exact duplicates are not duplicated in the bundle @@ -99,45 +94,35 @@ public void TestWithExactDuplicateEntriesPasses() } [Fact] - public void TestWithDuplicateEntriesFails() + public void DuplicateBundleRelativePath_Fails() { - var fixture = sharedTestState.TestFixture.Copy(); - - var hostName = BundleHelper.GetHostName(fixture); - var bundleDir = BundleHelper.GetBundleDir(fixture); - var targetOS = BundleHelper.GetTargetOS(fixture.CurrentRid); - var targetArch = BundleHelper.GetTargetArch(fixture.CurrentRid); - - // Generate a file specification with duplicate entries - var fileSpecs = new List(); - fileSpecs.Add(new FileSpec(BundleHelper.GetHostPath(fixture), BundleHelper.GetHostName(fixture))); - fileSpecs.Add(new FileSpec(BundleHelper.GetAppPath(fixture), "rel/app.repeat")); - fileSpecs.Add(new FileSpec(Path.Join(BundleHelper.GetPublishPath(fixture), "System.dll"), "rel/app.repeat")); + // File specification with duplicate entries with different source paths + var fileSpecs = new FileSpec[] + { + new FileSpec(Binaries.AppHost.FilePath, BundlerHostName), + new FileSpec(sharedTestState.App.AppDll, "rel/app.repeat"), + new FileSpec(sharedTestState.SystemDll, "rel/app.repeat"), + }; - Bundler bundler = new Bundler(hostName, bundleDir.FullName, targetOS: targetOS, targetArch: targetArch); + Bundler bundler = CreateBundlerInstance(); Assert.Throws(() => bundler.GenerateBundle(fileSpecs)) .Message .Should().Contain("rel/app.repeat") - .And.Contain(BundleHelper.GetAppPath(fixture)); + .And.Contain(sharedTestState.App.AppDll); } [Fact] - public void TestWithCaseSensitiveDuplicateEntriesPasses() + public void CaseSensitiveBundleRelativePath() { - var fixture = sharedTestState.TestFixture.Copy(); - - var hostName = BundleHelper.GetHostName(fixture); - var bundleDir = BundleHelper.GetBundleDir(fixture); - var targetOS = BundleHelper.GetTargetOS(fixture.CurrentRid); - var targetArch = BundleHelper.GetTargetArch(fixture.CurrentRid); - - // Generate a file specification with duplicate entries - var fileSpecs = new List(); - fileSpecs.Add(new FileSpec(BundleHelper.GetHostPath(fixture), BundleHelper.GetHostName(fixture))); - fileSpecs.Add(new FileSpec(BundleHelper.GetAppPath(fixture), "rel/app.repeat.dll")); - fileSpecs.Add(new FileSpec(Path.Join(BundleHelper.GetPublishPath(fixture), "System.dll"), "rel/app.Repeat.dll")); + // File specification with entries with bundle paths differing only in casing + var fileSpecs = new FileSpec[] + { + new FileSpec(Binaries.AppHost.FilePath, BundlerHostName), + new FileSpec(sharedTestState.App.AppDll, "rel/app.repeat.dll"), + new FileSpec(sharedTestState.SystemDll, "rel/app.Repeat.dll"), + }; - Bundler bundler = new Bundler(hostName, bundleDir.FullName, targetOS: targetOS, targetArch: targetArch); + Bundler bundler = CreateBundlerInstance(); bundler.GenerateBundle(fileSpecs); bundler.BundleManifest.Files.Where(entry => entry.RelativePath.Equals("rel/app.repeat.dll")).Single().Type.Should().Be(FileType.Assembly); @@ -146,27 +131,21 @@ public void TestWithCaseSensitiveDuplicateEntriesPasses() private (string bundleFileName, string bundleId) CreateSampleBundle(bool bundleMultipleFiles) { - var fixture = sharedTestState.TestFixture.Copy(); - - var hostName = BundleHelper.GetHostName(fixture); - var bundleDir = Directory.CreateDirectory( - Path.Combine(BundleHelper.GetBundleDir(fixture).FullName, Path.GetRandomFileName())); - var targetOS = BundleHelper.GetTargetOS(fixture.CurrentRid); - var targetArch = BundleHelper.GetTargetArch(fixture.CurrentRid); - - var fileSpecs = new List(); - fileSpecs.Add(new FileSpec(BundleHelper.GetHostPath(fixture), BundleHelper.GetHostName(fixture))); + var fileSpecs = new List() + { + new FileSpec(Binaries.AppHost.FilePath, BundlerHostName) + }; if (bundleMultipleFiles) { - fileSpecs.Add(new FileSpec(BundleHelper.GetAppPath(fixture), "rel/app.repeat.dll")); + fileSpecs.Add(new FileSpec(sharedTestState.App.AppDll, "rel/app.repeat.dll")); } - Bundler bundler = new Bundler(hostName, bundleDir.FullName, targetOS: targetOS, targetArch: targetArch); + Bundler bundler = CreateBundlerInstance(); return (bundler.GenerateBundle(fileSpecs), bundler.BundleManifest.BundleID); } [Fact] - public void TestWithIdenticalBundlesShouldBeBinaryEqualPasses() + public void IdenticalBundles_BinaryEqual() { var firstBundle = CreateSampleBundle(true); byte[] firstBundleContent = File.ReadAllBytes(firstBundle.bundleFileName); @@ -180,7 +159,7 @@ public void TestWithIdenticalBundlesShouldBeBinaryEqualPasses() } [Fact] - public void TestWithUniqueBundlesShouldHaveUniqueBundleIdsPasses() + public void UniqueBundles_UniqueBundleIds() { string firstBundle = CreateSampleBundle(true).bundleId; string secondBundle = CreateSampleBundle(false).bundleId; @@ -189,26 +168,21 @@ public void TestWithUniqueBundlesShouldHaveUniqueBundleIdsPasses() } [Fact] - public void TestWithMultipleDuplicateEntriesFails() + public void MultipleDuplicateBundleRelativePath_Fails() { - var fixture = sharedTestState.TestFixture.Copy(); - - var hostName = BundleHelper.GetHostName(fixture); - var bundleDir = BundleHelper.GetBundleDir(fixture); - var targetOS = BundleHelper.GetTargetOS(fixture.CurrentRid); - var targetArch = BundleHelper.GetTargetArch(fixture.CurrentRid); - - // Generate a file specification with duplicate entries - var fileSpecs = new List(); - fileSpecs.Add(new FileSpec(BundleHelper.GetHostPath(fixture), BundleHelper.GetHostName(fixture))); - string appPath = BundleHelper.GetAppPath(fixture); - fileSpecs.Add(new FileSpec(appPath, "rel/app.repeat.dll")); - fileSpecs.Add(new FileSpec(appPath, "rel/app.repeat.dll")); - string systemLibPath = Path.Join(BundleHelper.GetPublishPath(fixture), "System.dll"); - fileSpecs.Add(new FileSpec(appPath, "rel/system.repeat.dll")); - fileSpecs.Add(new FileSpec(systemLibPath, "rel/system.repeat.dll")); - - Bundler bundler = new Bundler(hostName, bundleDir.FullName, targetOS: targetOS, targetArch: targetArch); + // File specification with a mix of duplicate entries with different/matching source paths + string appPath = sharedTestState.App.AppDll; + string systemLibPath = sharedTestState.SystemDll; + var fileSpecs = new FileSpec[] + { + new FileSpec(Binaries.AppHost.FilePath, BundlerHostName), + new FileSpec(appPath, "rel/app.repeat.dll"), + new FileSpec(appPath, "rel/app.repeat.dll"), + new FileSpec(appPath, "rel/system.repeat.dll"), + new FileSpec(systemLibPath, "rel/system.repeat.dll"), + }; + + Bundler bundler = CreateBundlerInstance(); Assert.Throws(() => bundler.GenerateBundle(fileSpecs)) .Message .Should().Contain("rel/system.repeat.dll") @@ -218,41 +192,36 @@ public void TestWithMultipleDuplicateEntriesFails() } [Fact] - public void TestBaseNameComputation() + public void BaseNameComputation() { - var fixture = sharedTestState.TestFixture.Copy(); - var publishPath = BundleHelper.GetPublishPath(fixture); - var bundleDir = BundleHelper.GetBundleDir(fixture); - var targetOS = BundleHelper.GetTargetOS(fixture.CurrentRid); - var targetArch = BundleHelper.GetTargetArch(fixture.CurrentRid); - - // Rename the host from "StandaloneApp" to "Stand.Alone.App" to check that baseName computation + // Create an app with multiple periods in its name to check that baseName computation // (and consequently deps.json and runtimeconfig.json name computations) in the bundler // work correctly in the presence of "."s in the hostName. - var originalBaseName = "StandaloneApp"; - var newBaseName = "Stand.Alone.App"; - var exe = OperatingSystem.IsWindows() ? ".exe" : string.Empty; - - void rename(string extension) + using (var app = TestApp.CreateEmpty("App.With.Periods")) { - File.Move(Path.Combine(publishPath, originalBaseName + extension), Path.Combine(publishPath, newBaseName + extension)); + app.PopulateFrameworkDependent(Constants.MicrosoftNETCoreApp, RepoDirectoriesProvider.Default.MicrosoftNETCoreAppVersion); + + string hostName = Path.GetFileName(app.AppExe); + string depsJsonName = Path.GetFileName(app.DepsJson); + string runtimeConfigName = Path.GetFileName(app.RuntimeConfigJson); + FileSpec[] fileSpecs = new FileSpec[] + { + new FileSpec(Binaries.AppHost.FilePath, hostName), + new FileSpec(app.AppDll, Path.GetRelativePath(app.Location, app.AppDll)), + new FileSpec(app.DepsJson, depsJsonName), + new FileSpec(app.RuntimeConfigJson, runtimeConfigName), + }; + + var bundleDir = Directory.CreateDirectory(SharedFramework.CalculateUniqueTestDirectory(Path.Combine(app.Location, "bundle"))); + var bundler = new Bundler(hostName, bundleDir.FullName); + bundler.GenerateBundle(fileSpecs); + + + bundler.BundleManifest.Files.Where(entry => entry.RelativePath.Equals(depsJsonName)).Single().Type.Should().Be(FileType.DepsJson); + bundler.BundleManifest.Files.Where(entry => entry.RelativePath.Equals(runtimeConfigName)).Single().Type.Should().Be(FileType.RuntimeConfigJson); + bundleDir.Should().NotHaveFile(depsJsonName); + bundleDir.Should().NotHaveFile(runtimeConfigName); } - rename(exe); - rename(".deps.json"); - rename(".runtimeconfig.json"); - - var hostName = newBaseName + exe; - var depsJson = newBaseName + ".deps.json"; - var runtimeconfigJson = newBaseName + ".runtimeconfig.json"; - - var bundler = new Bundler(hostName, bundleDir.FullName, targetOS: targetOS, targetArch: targetArch); - BundleHelper.GenerateBundle(bundler, publishPath, bundleDir.FullName); - - string[] jsonFiles = { depsJson, runtimeconfigJson }; - - bundler.BundleManifest.Files.Where(entry => entry.RelativePath.Equals(depsJson)).Single().Type.Should().Be(FileType.DepsJson); - bundler.BundleManifest.Files.Where(entry => entry.RelativePath.Equals(runtimeconfigJson)).Single().Type.Should().Be(FileType.RuntimeConfigJson); - bundleDir.Should().NotHaveFiles(jsonFiles); } [InlineData(BundleOptions.None)] @@ -261,126 +230,137 @@ void rename(string extension) [InlineData(BundleOptions.BundleAllContent)] [InlineData(BundleOptions.BundleSymbolFiles)] [Theory] - public void TestFilesAlwaysBundled(BundleOptions options) + public void BundleOptions_IncludedExcludedFiles(BundleOptions options) { - var fixture = sharedTestState.TestFixture.Copy(); - var bundler = BundleHelper.Bundle(fixture, options); - var bundledFiles = BundleHelper.GetBundledFiles(fixture); + TestApp app = sharedTestState.App; + string devJsonName = Path.GetFileName(app.RuntimeDevConfigJson); + string appSymbolName = $"{app.Name}.pdb"; + string otherContentName = "other.txt"; + FileSpec[] fileSpecs = new FileSpec[] + { + new FileSpec(Binaries.AppHost.FilePath, BundlerHostName), + new FileSpec(app.AppDll, Path.GetRelativePath(app.Location, app.AppDll)), + new FileSpec(app.DepsJson, Path.GetRelativePath(app.Location, app.DepsJson)), + new FileSpec(app.RuntimeConfigJson, Path.GetRelativePath(app.Location, app.RuntimeConfigJson)), + new FileSpec(app.RuntimeConfigJson, devJsonName), + new FileSpec(Path.Combine(app.Location, appSymbolName), appSymbolName), + new FileSpec(Binaries.CoreClr.FilePath, Binaries.CoreClr.FileName), + new FileSpec(app.RuntimeConfigJson, otherContentName), + }; - Array.ForEach(bundledFiles, file => bundler.BundleManifest.Contains(file).Should().BeTrue()); - } + Bundler bundler = CreateBundlerInstance(options); + bundler.GenerateBundle(fileSpecs); - [InlineData(BundleOptions.None)] - [InlineData(BundleOptions.BundleNativeBinaries)] - [InlineData(BundleOptions.BundleOtherFiles)] - [InlineData(BundleOptions.BundleAllContent)] - [InlineData(BundleOptions.BundleSymbolFiles)] - [Theory] - public void TestFilesNeverBundled(BundleOptions options) - { - var fixture = sharedTestState.TestFixture.Copy(); - var appBaseName = BundleHelper.GetAppBaseName(fixture); - string publishPath = BundleHelper.GetPublishPath(fixture); - - // Make up a app.runtimeconfig.dev.json file in the publish directory. - File.Copy(Path.Combine(publishPath, $"{appBaseName}.runtimeconfig.json"), - Path.Combine(publishPath, $"{appBaseName}.runtimeconfig.dev.json")); + // App's dll, .deps.json, and .runtimeconfig.json should always be bundled + Assert.True(bundler.BundleManifest.Contains(Path.GetFileName(app.AppDll))); + Assert.True(bundler.BundleManifest.Contains(Path.GetFileName(app.DepsJson))); + Assert.True(bundler.BundleManifest.Contains(Path.GetFileName(app.RuntimeConfigJson))); - var bundler = BundleHelper.Bundle(fixture, options); + // App's .runtimeconfig.dev.json is always excluded + Assert.False(bundler.BundleManifest.Contains(devJsonName)); - bundler.BundleManifest.Contains($"{appBaseName}.runtimeconfig.dev.json").Should().BeFalse(); - } + // Symbols should only be bundled if option is explicitly set + bundler.BundleManifest.Contains(appSymbolName).Should().Be(options.HasFlag(BundleOptions.BundleSymbolFiles)); - [InlineData(BundleOptions.None)] - [InlineData(BundleOptions.BundleSymbolFiles)] - [Theory] - public void TestBundlingSymbols(BundleOptions options) - { - var fixture = sharedTestState.TestFixture.Copy(); - var appBaseName = BundleHelper.GetAppBaseName(fixture); - var bundler = BundleHelper.Bundle(fixture, options); + // Native libararies should only be bundled if option is explicitly set + bundler.BundleManifest.Contains(Binaries.CoreClr.FileName).Should().Be(options.HasFlag(BundleOptions.BundleNativeBinaries)); - bundler.BundleManifest.Contains($"{appBaseName}.pdb").Should().Be(options.HasFlag(BundleOptions.BundleSymbolFiles)); + // Other files should only be bundled if option is explicitly set + bundler.BundleManifest.Contains(otherContentName).Should().Be(options.HasFlag(BundleOptions.BundleOtherFiles)); } - [InlineData(BundleOptions.None)] - [InlineData(BundleOptions.BundleNativeBinaries)] - [Theory] - public void TestBundlingNativeBinaries(BundleOptions options) + [Fact] + public void FileSizes() { - var fixture = sharedTestState.TestFixture.Copy(); - var coreclr = Path.GetFileName(fixture.TestProject.CoreClrDll); - var bundler = BundleHelper.Bundle(fixture, options); + var app = sharedTestState.App; + List fileSpecs = new List + { + new FileSpec(Binaries.AppHost.FilePath, BundlerHostName), + new FileSpec(app.AppDll, Path.GetRelativePath(app.Location, app.AppDll)), + new FileSpec(app.DepsJson, Path.GetRelativePath(app.Location, app.DepsJson)), + new FileSpec(app.RuntimeConfigJson, Path.GetRelativePath(app.Location, app.RuntimeConfigJson)), + }; + fileSpecs.AddRange(SingleFileTestApp.GetRuntimeFilesToBundle()); - bundler.BundleManifest.Contains($"{coreclr}").Should().Be(options.HasFlag(BundleOptions.BundleNativeBinaries)); + Bundler bundler = CreateBundlerInstance(); + bundler.GenerateBundle(fileSpecs); + foreach (FileEntry file in bundler.BundleManifest.Files) + { + var spec = fileSpecs.Single(f => f.BundleRelativePath == file.RelativePath); + Assert.True(file.Size == new FileInfo(spec.SourcePath).Length); + } } [Fact] - public void TestFileSizes() + public void AssemblyAlignment() { - var fixture = sharedTestState.TestFixture.Copy(); - var bundler = BundleHelper.Bundle(fixture); - var publishPath = BundleHelper.GetPublishPath(fixture); + var app = sharedTestState.App; + List fileSpecs = new List + { + new FileSpec(Binaries.AppHost.FilePath, BundlerHostName), + new FileSpec(app.AppDll, Path.GetRelativePath(app.Location, app.AppDll)), + }; + fileSpecs.AddRange(SingleFileTestApp.GetRuntimeFilesToBundle()); - bundler.BundleManifest.Files.ForEach(file => - Assert.True(file.Size == new FileInfo(Path.Combine(publishPath, file.RelativePath)).Length)); - } + Bundler bundler = CreateBundlerInstance(); + bundler.GenerateBundle(fileSpecs); - [Fact] - public void TestAssemblyAlignment() - { - var fixture = sharedTestState.TestFixture.Copy(); - var bundler = BundleHelper.Bundle(fixture); - var targetOS = BundleHelper.GetTargetOS(fixture.CurrentRid); - var targetArch = BundleHelper.GetTargetArch(fixture.CurrentRid); - var alignment = (targetOS == OSPlatform.Linux && targetArch == Architecture.Arm64) ? 4096 : 16; - bundler.BundleManifest.Files.ForEach(file => + var alignment = OperatingSystem.IsLinux() && RuntimeInformation.OSArchitecture == Architecture.Arm64 ? 4096 : 16; + bundler.BundleManifest.Files.ForEach(file => Assert.True((file.Type != FileType.Assembly) || (file.Offset % alignment == 0))); } - [Fact] - public void TestWithAdditionalContentAfterBundleMetadata() + [Theory] + [InlineData(true)] + [InlineData(false)] + [PlatformSpecific(TestPlatforms.OSX)] + public void Codesign(bool shouldCodesign) { - var fixture = sharedTestState.TestFixture.Copy(); - string singleFile = BundleHelper.BundleApp(fixture); + TestApp app = sharedTestState.App; + FileSpec[] fileSpecs = new FileSpec[] + { + new FileSpec(Binaries.AppHost.FilePath, BundlerHostName), + new FileSpec(app.AppDll, Path.GetRelativePath(app.Location, app.AppDll)), + new FileSpec(app.DepsJson, Path.GetRelativePath(app.Location, app.DepsJson)), + new FileSpec(app.RuntimeConfigJson, Path.GetRelativePath(app.Location, app.RuntimeConfigJson)), + }; + + Bundler bundler = CreateBundlerInstance(macosCodesign: shouldCodesign); + string bundledApp = bundler.GenerateBundle(fileSpecs); - using (var file = File.OpenWrite(singleFile)) + // Check if the file is signed + CommandResult result = Command.Create("codesign", $"-v {bundledApp}") + .CaptureStdErr() + .CaptureStdOut() + .Execute(expectedToFail: !shouldCodesign); + + if (shouldCodesign) { - file.Position = file.Length; - var blob = Encoding.UTF8.GetBytes("Mock signature at the end of the bundle"); - file.Write(blob, 0, blob.Length); + result.Should().Pass(); + } + else + { + result.Should().Fail(); } - - Command.Create(singleFile) - .CaptureStdErr() - .CaptureStdOut() - .Execute() - .Should() - .Pass() - .And - .HaveStdOutContaining("Hello World!"); } public class SharedTestState : IDisposable { - public TestProjectFixture TestFixture { get; set; } - public RepoDirectoriesProvider RepoDirectories { get; set; } + public const string AppName = "HelloWorld"; + public TestApp App { get; } + public string SystemDll { get; } public SharedTestState() { - RepoDirectories = new RepoDirectoriesProvider(); - - TestFixture = new TestProjectFixture("StandaloneApp", RepoDirectories); - TestFixture - .EnsureRestoredForRid(TestFixture.CurrentRid) - .PublishProject(runtime: TestFixture.CurrentRid, - selfContained: true, - outputDirectory: BundleHelper.GetPublishPath(TestFixture)); + App = TestApp.CreateFromBuiltAssets(AppName); + + var builtDotNet = new DotNet.Cli.Build.DotNetCli(RepoDirectoriesProvider.Default.BuiltDotnet); + SystemDll = Path.Combine(builtDotNet.GreatestVersionSharedFxPath, "System.dll"); } public void Dispose() { - TestFixture.Dispose(); + App.Dispose(); } } } diff --git a/src/installer/tests/TestUtils/Assertions/CommandResultAssertions.cs b/src/installer/tests/TestUtils/Assertions/CommandResultAssertions.cs index f939ba1388336b..f312913aff8a05 100644 --- a/src/installer/tests/TestUtils/Assertions/CommandResultAssertions.cs +++ b/src/installer/tests/TestUtils/Assertions/CommandResultAssertions.cs @@ -74,6 +74,13 @@ public AndConstraint HaveStdOutMatching(string pattern, return new AndConstraint(this); } + public AndConstraint NotHaveStdOutMatching(string pattern, RegexOptions options = RegexOptions.None) + { + Execute.Assertion.ForCondition(!Regex.IsMatch(Result.StdOut, pattern, options)) + .FailWith($"The command output matched a pattern is should not have matched. Pattern: '{pattern}'{GetDiagnosticsInfo()}"); + return new AndConstraint(this); + } + public AndConstraint HaveStdErr() { Execute.Assertion.ForCondition(!string.IsNullOrEmpty(Result.StdErr)) diff --git a/src/installer/tests/TestUtils/Binaries.cs b/src/installer/tests/TestUtils/Binaries.cs index 566e28f92d710e..9299a76481bede 100644 --- a/src/installer/tests/TestUtils/Binaries.cs +++ b/src/installer/tests/TestUtils/Binaries.cs @@ -2,8 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections.Generic; using System.IO; +using System.Linq; +using System.Reflection.Metadata; using System.Runtime.InteropServices; +using Microsoft.DotNet.Cli.Build; namespace Microsoft.DotNet.CoreSetup.Test { @@ -38,7 +42,7 @@ public static class AppHost public static class CoreClr { public static string FileName = GetSharedLibraryFileNameForCurrentPlatform("coreclr"); - public static string FilePath = Path.Combine(RepoDirectoriesProvider.Default.HostArtifacts, FileName); + public static string FilePath = Path.Combine(new DotNetCli(RepoDirectoriesProvider.Default.BuiltDotnet).GreatestVersionSharedFxPath, FileName); public static string MockName = GetSharedLibraryFileNameForCurrentPlatform("mockcoreclr"); public static string MockPath = Path.Combine(RepoDirectoriesProvider.Default.HostTestArtifacts, MockName); @@ -81,5 +85,28 @@ public static class SingleFileHost public static string FileName = GetExeFileNameForCurrentPlatform("singlefilehost"); public static string FilePath = Path.Combine(RepoDirectoriesProvider.Default.HostArtifacts, FileName); } + + public static (IEnumerable Assemblies, IEnumerable NativeLibraries) GetRuntimeFiles() + { + var runtimePackDir = new DotNetCli(RepoDirectoriesProvider.Default.BuiltDotnet).GreatestVersionSharedFxPath; + var assemblies = Directory.GetFiles(runtimePackDir, "*.dll").Where(f => IsAssembly(f)); + + (string prefix, string suffix) = Binaries.GetSharedLibraryPrefixSuffix(); + var nativeLibraries = Directory.GetFiles(runtimePackDir, $"{prefix}*{suffix}").Where(f => !IsAssembly(f) && Path.GetExtension(f) != ".json"); + + return (assemblies, nativeLibraries); + + static bool IsAssembly(string filePath) + { + if (Path.GetExtension(filePath) != ".dll") + return false; + + using (var fs = File.OpenRead(filePath)) + using (var peReader = new System.Reflection.PortableExecutable.PEReader(fs)) + { + return peReader.HasMetadata && peReader.GetMetadataReader().IsAssembly; + } + } + } } } diff --git a/src/installer/tests/TestUtils/NetCoreAppBuilder.cs b/src/installer/tests/TestUtils/NetCoreAppBuilder.cs index 33b5a56ee67328..23f4578d9d8ccf 100644 --- a/src/installer/tests/TestUtils/NetCoreAppBuilder.cs +++ b/src/installer/tests/TestUtils/NetCoreAppBuilder.cs @@ -288,13 +288,13 @@ public static NetCoreAppBuilder PortableForNETCoreApp(TestApp sourceApp) }; } - public static NetCoreAppBuilder ForNETCoreApp(string name, string runtime) + public static NetCoreAppBuilder ForNETCoreApp(string name, string runtime, string version = "3.0") { return new NetCoreAppBuilder() { _sourceApp = null, Name = name, - Framework = ".NETCoreApp,Version=v3.0", + Framework = $".NETCoreApp,Version=v{version}", Runtime = runtime }; } diff --git a/src/installer/tests/TestUtils/RepoDirectoriesProvider.cs b/src/installer/tests/TestUtils/RepoDirectoriesProvider.cs index 958c9df4ae67ce..f82c61c18a91d8 100644 --- a/src/installer/tests/TestUtils/RepoDirectoriesProvider.cs +++ b/src/installer/tests/TestUtils/RepoDirectoriesProvider.cs @@ -7,7 +7,7 @@ namespace Microsoft.DotNet.CoreSetup.Test { - public class RepoDirectoriesProvider + public sealed class RepoDirectoriesProvider { public static readonly RepoDirectoriesProvider Default = new RepoDirectoriesProvider(); @@ -26,6 +26,7 @@ public class RepoDirectoriesProvider public string BuiltDotnet { get; } public string NugetPackages { get; } public string DotnetSDK { get; } + public string TestAssetsOutput { get; } private string _testContextVariableFilePath { get; } private ImmutableDictionary _testContextVariables { get; } @@ -53,6 +54,7 @@ public RepoDirectoriesProvider( MicrosoftNETCoreAppVersion = microsoftNETCoreAppVersion ?? GetTestContextVariable("MNA_VERSION"); Tfm = GetTestContextVariable("MNA_TFM"); TestAssetsFolder = GetTestContextVariable("TEST_ASSETS"); + TestAssetsOutput = GetTestContextVariable("TEST_ASSETS_OUTPUT"); Configuration = GetTestContextVariable("BUILD_CONFIGURATION"); diff --git a/src/installer/tests/TestUtils/SingleFileTestApp.cs b/src/installer/tests/TestUtils/SingleFileTestApp.cs new file mode 100644 index 00000000000000..fbdcbc84a39b14 --- /dev/null +++ b/src/installer/tests/TestUtils/SingleFileTestApp.cs @@ -0,0 +1,195 @@ +// 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.Reflection; +using Microsoft.NET.HostModel.Bundle; + +namespace Microsoft.DotNet.CoreSetup.Test +{ + public class SingleFileTestApp : TestArtifact + { + public string AppName { get; } + public string NonBundledLocation => builtApp.Location; + + private readonly TestApp builtApp; + private readonly bool selfContained; + + public SingleFileTestApp(string appName, bool selfContained, string location) + : base(location) + { + AppName = appName; + this.selfContained = selfContained; + + builtApp = new TestApp(Path.Combine(Location, "builtApp"), AppName); + Directory.CreateDirectory(builtApp.Location); + PopulateBuiltAppDirectory(); + } + + /// + /// Create a framework-dependent single-file test app from pre-built output of . + /// + /// Name of pre-built app + /// + /// The is expected to be in + /// and have been built as framework-dependent + /// + public static SingleFileTestApp CreateFrameworkDependent(string appName) + => Create(appName, selfContained: false); + + /// + /// Create a self-contained single-file test app from pre-built output of . + /// + /// Name of pre-built app + /// + /// The is expected to be in + /// and have been built as framework-dependent + /// + public static SingleFileTestApp CreateSelfContained(string appName) + => Create(appName, selfContained: true); + + private static SingleFileTestApp Create(string appName, bool selfContained) + { + var (location, parentPath) = GetNewTestArtifactPath(appName); + return new SingleFileTestApp(appName, selfContained, location) + { + DirectoryToDelete = parentPath + }; + } + + public static IReadOnlyList GetRuntimeFilesToBundle() + { + var runtimeAssemblies = Binaries.GetRuntimeFiles().Assemblies; + List fileSpecs = new List(); + foreach (var asset in runtimeAssemblies) + { + fileSpecs.Add(new FileSpec(asset, Path.GetFileName(asset))); + } + + fileSpecs.Sort((a, b) => string.CompareOrdinal(a.BundleRelativePath, b.BundleRelativePath)); + return fileSpecs; + } + + public string Bundle(BundleOptions options = BundleOptions.None, Version? bundleVersion = null) + { + return Bundle(options, out _, bundleVersion); + } + + public string Bundle(BundleOptions options, out Manifest manifest, Version? bundleVersion = null) + { + string bundleDirectory = SharedFramework.CalculateUniqueTestDirectory(Path.Combine(Location, "bundle")); + var bundler = new Bundler( + Binaries.GetExeFileNameForCurrentPlatform(AppName), + bundleDirectory, + options, + targetFrameworkVersion: bundleVersion, + macosCodesign: true); + + // Get all files in the source directory and all sub-directories. + string[] sources = Directory.GetFiles(builtApp.Location, searchPattern: "*", searchOption: SearchOption.AllDirectories); + List fileSpecs = new List(sources.Length); + foreach (var file in sources) + { + fileSpecs.Add(new FileSpec(file, Path.GetRelativePath(builtApp.Location, file))); + } + + // If this is a self-contained app, add the runtime assemblies to the bundle + if (selfContained) + { + fileSpecs.AddRange(GetRuntimeFilesToBundle()); + } + + // Sort the file specs to keep the bundle construction deterministic. + fileSpecs.Sort((a, b) => string.CompareOrdinal(a.BundleRelativePath, b.BundleRelativePath)); + var singleFile = bundler.GenerateBundle(fileSpecs); + + // Copy excluded files to the bundle directory. This mimics the SDK behaviour where + // files excluded by the bundler are copied to the publish directory. + foreach (FileSpec spec in fileSpecs) + { + if (!spec.Excluded) + continue; + + var outputFilePath = Path.Combine(bundleDirectory, spec.BundleRelativePath); + Directory.CreateDirectory(Path.GetDirectoryName(outputFilePath)); + File.Copy(spec.SourcePath, outputFilePath, true); + } + + manifest = bundler.BundleManifest; + return singleFile; + } + + public string GetNewExtractionRootPath() + { + return SharedFramework.CalculateUniqueTestDirectory(Path.Combine(Location, "extract")); + } + + public DirectoryInfo GetExtractionDir(string root, Manifest manifest) + { + return new DirectoryInfo(Path.Combine(root, Name, manifest.BundleID)); + } + + private void PopulateBuiltAppDirectory() + { + // Copy the compiled app output - the app is expected to have been built as framework-dependent + TestArtifact.CopyRecursive( + Path.Combine(RepoDirectoriesProvider.Default.TestAssetsOutput, AppName), + builtApp.Location); + + // Remove any runtimeconfig.json or deps.json - we will be creating new ones + File.Delete(builtApp.RuntimeConfigJson); + File.Delete(builtApp.DepsJson); + + var shortVersion = RepoDirectoriesProvider.Default.Tfm[3..]; // trim "net" from beginning + var builder = NetCoreAppBuilder.ForNETCoreApp(AppName, RepoDirectoriesProvider.Default.TargetRID, shortVersion); + + // Update the .runtimeconfig.json + builder.WithRuntimeConfig(c => + { + c.WithTfm(RepoDirectoriesProvider.Default.Tfm); + c = selfContained + ? c.WithIncludedFramework(Constants.MicrosoftNETCoreApp, RepoDirectoriesProvider.Default.MicrosoftNETCoreAppVersion) + : c.WithFramework(Constants.MicrosoftNETCoreApp, RepoDirectoriesProvider.Default.MicrosoftNETCoreAppVersion); + }); + + // Add runtime libraries and assets for generating the .deps.json. + // Native libraries are excluded - matches DropFromSingleFile setting in RuntimeList.xml. + // All assets are configured to not be on disk as this app is just for bundling purposes. + // We can grab the runtime assets from their original location and avoid copying everything + builder.WithProject(AppName, "1.0.0", p => p + .WithAssemblyGroup(string.Empty, g => g + .WithAsset(Path.GetFileName(builtApp.AppDll), f => f.NotOnDisk()))); + if (selfContained) + { + builder.WithRuntimePack($"{Constants.MicrosoftNETCoreApp}.Runtime.{RepoDirectoriesProvider.Default.TargetRID}", RepoDirectoriesProvider.Default.MicrosoftNETCoreAppVersion, l => l + .WithAssemblyGroup(string.Empty, g => + { + foreach (var file in Binaries.GetRuntimeFiles().Assemblies) + { + var fileVersion = FileVersionInfo.GetVersionInfo(file).FileVersion; + var asmVersion = AssemblyName.GetAssemblyName(file).Version!.ToString(); + g.WithAsset( + Path.GetFileName(file), + f => f.WithVersion(asmVersion, fileVersion!).NotOnDisk()); + } + })); + } + + // Write out the app + builder.Build(builtApp); + + // Create the apphost for the app + if (selfContained) + { + builtApp.CreateSingleFileHost(); + } + else + { + builtApp.CreateAppHost(); + } + } + } +} diff --git a/src/installer/tests/TestUtils/TestApp.cs b/src/installer/tests/TestUtils/TestApp.cs index a804e8ee6b438c..487903bf41963e 100644 --- a/src/installer/tests/TestUtils/TestApp.cs +++ b/src/installer/tests/TestUtils/TestApp.cs @@ -50,6 +50,15 @@ public static TestApp CreateEmpty(string name) }; } + public static TestApp CreateFromBuiltAssets(string appName) + { + TestApp app = CreateEmpty(appName); + TestArtifact.CopyRecursive( + Path.Combine(RepoDirectoriesProvider.Default.TestAssetsOutput, appName), + app.Location); + return app; + } + public void PopulateFrameworkDependent(string fxName, string fxVersion, Action customizer = null) { var builder = NetCoreAppBuilder.PortableForNETCoreApp(this); @@ -67,10 +76,16 @@ public void PopulateFrameworkDependent(string fxName, string fxVersion, Action CreateAppHost(Binaries.AppHost.FilePath, isWindowsGui, copyResources); + + public void CreateSingleFileHost(bool isWindowsGui = false, bool copyResources = true) + => CreateAppHost(Binaries.SingleFileHost.FilePath, isWindowsGui, copyResources); + + public void CreateAppHost(string hostSourcePath, bool isWindowsGui = false, bool copyResources = true) { // Use the live-built apphost and HostModel to create the apphost to run HostWriter.CreateAppHost( - Binaries.AppHost.FilePath, + hostSourcePath, AppExe, Path.GetFileName(AppDll), windowsGraphicalUserInterface: isWindowsGui, @@ -101,7 +116,7 @@ public void PopulateSelfContained(MockedComponent mock, Action { foreach (var file in assemblies) @@ -173,28 +188,5 @@ private void LoadAssets() HostFxrDll = Path.Combine(Location, Binaries.HostFxr.FileName); CoreClrDll = Path.Combine(Location, Binaries.CoreClr.FileName); } - - private static (IEnumerable Assemblies, IEnumerable NativeLibraries) GetRuntimeFiles() - { - var runtimePackDir = new DotNetCli(RepoDirectoriesProvider.Default.BuiltDotnet).GreatestVersionSharedFxPath; - var assemblies = Directory.GetFiles(runtimePackDir, "*.dll").Where(f => IsAssembly(f)); - - (string prefix, string suffix) = Binaries.GetSharedLibraryPrefixSuffix(); - var nativeLibraries = Directory.GetFiles(runtimePackDir, $"{prefix}*{suffix}").Where(f => !IsAssembly(f)); - - return (assemblies, nativeLibraries); - - static bool IsAssembly(string filePath) - { - if (Path.GetExtension(filePath) != ".dll") - return false; - - using (var fs = File.OpenRead(filePath)) - using (var peReader = new System.Reflection.PortableExecutable.PEReader(fs)) - { - return peReader.HasMetadata && peReader.GetMetadataReader().IsAssembly; - } - } - } } } diff --git a/src/libraries/Common/src/Interop/Interop.TimeZoneDisplayNameType.cs b/src/libraries/Common/src/Interop/Interop.TimeZoneDisplayNameType.cs index 570eb0eb4b1ecd..698cdd54aebdf7 100644 --- a/src/libraries/Common/src/Interop/Interop.TimeZoneDisplayNameType.cs +++ b/src/libraries/Common/src/Interop/Interop.TimeZoneDisplayNameType.cs @@ -13,6 +13,7 @@ internal enum TimeZoneDisplayNameType DaylightSavings = 2, GenericLocation = 3, ExemplarCity = 4, + TimeZoneName = 5, } } } diff --git a/src/libraries/Common/src/Interop/Interop.TimeZoneInfo.iOS.cs b/src/libraries/Common/src/Interop/Interop.TimeZoneInfo.iOS.cs new file mode 100644 index 00000000000000..9575fc3dc3359c --- /dev/null +++ b/src/libraries/Common/src/Interop/Interop.TimeZoneInfo.iOS.cs @@ -0,0 +1,21 @@ +// 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; + +internal static partial class Interop +{ + internal static partial class Globalization + { + [LibraryImport(Libraries.GlobalizationNative, EntryPoint = "GlobalizationNative_GetTimeZoneDisplayNameNative", StringMarshalling = StringMarshalling.Utf16)] + internal static unsafe partial ResultCode GetTimeZoneDisplayNameNative( + string localeName, + int lNameLength, + string timeZoneId, + int idLength, + TimeZoneDisplayNameType type, + char* result, + int resultLength); + } +} diff --git a/src/libraries/Common/src/Roslyn/DiagnosticDescriptorHelper.cs b/src/libraries/Common/src/Roslyn/DiagnosticDescriptorHelper.cs index d11fdd8b5aaa03..8c5783ff9bd0b4 100644 --- a/src/libraries/Common/src/Roslyn/DiagnosticDescriptorHelper.cs +++ b/src/libraries/Common/src/Roslyn/DiagnosticDescriptorHelper.cs @@ -17,7 +17,7 @@ public static DiagnosticDescriptor Create( LocalizableString? description = null, params string[] customTags) { - string helpLink = $"https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/{id.ToLowerInvariant()}.md"; + string helpLink = $"https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/{id.ToLowerInvariant()}"; return new DiagnosticDescriptor(id, title, messageFormat, category, defaultSeverity, isEnabledByDefault, description, helpLink, customTags); } diff --git a/src/libraries/Common/src/SourceGenerators/TypeModelHelper.cs b/src/libraries/Common/src/SourceGenerators/TypeModelHelper.cs new file mode 100644 index 00000000000000..73c19d61ca1225 --- /dev/null +++ b/src/libraries/Common/src/SourceGenerators/TypeModelHelper.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 Microsoft.CodeAnalysis; +using System.Collections.Generic; + +namespace SourceGenerators +{ + internal static class TypeModelHelper + { + public static List? GetAllTypeArgumentsInScope(this INamedTypeSymbol type) + { + if (!type.IsGenericType) + { + return null; + } + + List? args = null; + TraverseContainingTypes(type); + return args; + + void TraverseContainingTypes(INamedTypeSymbol current) + { + if (current.ContainingType is INamedTypeSymbol parent) + { + TraverseContainingTypes(parent); + } + + if (!current.TypeArguments.IsEmpty) + { + (args ??= new()).AddRange(current.TypeArguments); + } + } + } + } +} diff --git a/src/libraries/Common/src/System/Net/Security/SslClientAuthenticationOptionsExtensions.cs b/src/libraries/Common/src/System/Net/Security/SslClientAuthenticationOptionsExtensions.cs index 337fff63df3242..d1ad29435f9be0 100644 --- a/src/libraries/Common/src/System/Net/Security/SslClientAuthenticationOptionsExtensions.cs +++ b/src/libraries/Common/src/System/Net/Security/SslClientAuthenticationOptionsExtensions.cs @@ -14,6 +14,7 @@ internal static class SslClientAuthenticationOptionsExtensions { public static SslClientAuthenticationOptions ShallowClone(this SslClientAuthenticationOptions options) { + // Use non-default values to verify the clone works fine. var clone = new SslClientAuthenticationOptions() { AllowRenegotiation = options.AllowRenegotiation, @@ -33,7 +34,10 @@ public static SslClientAuthenticationOptions ShallowClone(this SslClientAuthenti #if DEBUG // Try to detect if a property gets added that we're not copying correctly. - foreach (PropertyInfo pi in typeof(SslClientAuthenticationOptions).GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly)) + // The property count is guard for new properties that also needs to be added above. + PropertyInfo[] properties = typeof(SslClientAuthenticationOptions).GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly)!; + Debug.Assert(properties.Length == 13); + foreach (PropertyInfo pi in properties) { object? origValue = pi.GetValue(options); object? cloneValue = pi.GetValue(clone); diff --git a/src/libraries/Common/src/System/Net/TlsStream.cs b/src/libraries/Common/src/System/Net/TlsStream.cs index 047253159127ea..503253099aac17 100644 --- a/src/libraries/Common/src/System/Net/TlsStream.cs +++ b/src/libraries/Common/src/System/Net/TlsStream.cs @@ -5,6 +5,8 @@ using System.Net.Sockets; using System.Security.Authentication; using System.Security.Cryptography.X509Certificates; +using System.Threading; +using System.Threading.Tasks; namespace System.Net { @@ -46,6 +48,11 @@ public void EndAuthenticateAsClient(IAsyncResult asyncResult) _sslStream.EndAuthenticateAsClient(asyncResult); } + public override void Write(byte[] buffer, int offset, int size) + { + _sslStream.Write(buffer, offset, size); + } + public override IAsyncResult BeginWrite(byte[] buffer, int offset, int size, AsyncCallback? callback, object? state) { return _sslStream.BeginWrite(buffer, offset, size, callback, state); @@ -56,9 +63,9 @@ public override void EndWrite(IAsyncResult result) _sslStream.EndWrite(result); } - public override void Write(byte[] buffer, int offset, int size) + public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) { - _sslStream.Write(buffer, offset, size); + return _sslStream.WriteAsync(buffer, offset, count, cancellationToken); } public override int Read(byte[] buffer, int offset, int size) @@ -66,6 +73,11 @@ public override int Read(byte[] buffer, int offset, int size) return _sslStream.Read(buffer, offset, size); } + public override Task ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) + { + return _sslStream.ReadAsync(buffer, offset, count, cancellationToken); + } + public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback? callback, object? state) { return _sslStream.BeginRead(buffer, offset, count, callback, state); diff --git a/src/libraries/Common/src/System/Security/Cryptography/HashOneShotHelpers.cs b/src/libraries/Common/src/System/Security/Cryptography/HashOneShotHelpers.cs index f80e69c8bf53a8..aa0e462f6fdbd6 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/HashOneShotHelpers.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/HashOneShotHelpers.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using Internal.Cryptography; +using System.Diagnostics; using System.IO; namespace System.Security.Cryptography @@ -12,18 +13,11 @@ internal static class HashOneShotHelpers { internal static byte[] HashData(HashAlgorithmName hashAlgorithm, ReadOnlySpan source) { - return hashAlgorithm.Name switch - { - HashAlgorithmNames.SHA256 => SHA256.HashData(source), - HashAlgorithmNames.SHA1 => SHA1.HashData(source), - HashAlgorithmNames.SHA512 => SHA512.HashData(source), - HashAlgorithmNames.SHA384 => SHA384.HashData(source), - HashAlgorithmNames.SHA3_256 => SHA3_256.HashData(source), - HashAlgorithmNames.SHA3_384 => SHA3_384.HashData(source), - HashAlgorithmNames.SHA3_512 => SHA3_512.HashData(source), - HashAlgorithmNames.MD5 when Helpers.HasMD5 => MD5.HashData(source), - _ => throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name)), - }; + int hashSizeInBytes = HashSize(hashAlgorithm); + byte[] result = new byte[hashSizeInBytes]; + int written = HashProviderDispenser.OneShotHashProvider.HashData(hashAlgorithm.Name!, source, result); + Debug.Assert(written == hashSizeInBytes); + return result; } internal static bool TryHashData( @@ -32,34 +26,30 @@ internal static bool TryHashData( Span destination, out int bytesWritten) { - return hashAlgorithm.Name switch + int hashSizeInBytes = HashSize(hashAlgorithm); + + if (destination.Length < hashSizeInBytes) { - HashAlgorithmNames.SHA256 => SHA256.TryHashData(source, destination, out bytesWritten), - HashAlgorithmNames.SHA1 => SHA1.TryHashData(source, destination, out bytesWritten), - HashAlgorithmNames.SHA512 => SHA512.TryHashData(source, destination, out bytesWritten), - HashAlgorithmNames.SHA384 => SHA384.TryHashData(source, destination, out bytesWritten), - HashAlgorithmNames.SHA3_256 => SHA3_256.TryHashData(source, destination, out bytesWritten), - HashAlgorithmNames.SHA3_384 => SHA3_384.TryHashData(source, destination, out bytesWritten), - HashAlgorithmNames.SHA3_512 => SHA3_512.TryHashData(source, destination, out bytesWritten), - HashAlgorithmNames.MD5 when Helpers.HasMD5 => MD5.TryHashData(source, destination, out bytesWritten), - _ => throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name)), - }; + bytesWritten = 0; + return false; + } + + bytesWritten = HashProviderDispenser.OneShotHashProvider.HashData(hashAlgorithm.Name!, source, destination); + Debug.Assert(bytesWritten == hashSizeInBytes); + return true; } internal static byte[] HashData(HashAlgorithmName hashAlgorithm, Stream source) { - return hashAlgorithm.Name switch + ArgumentNullException.ThrowIfNull(source); + + if (!source.CanRead) { - HashAlgorithmNames.SHA256 => SHA256.HashData(source), - HashAlgorithmNames.SHA1 => SHA1.HashData(source), - HashAlgorithmNames.SHA512 => SHA512.HashData(source), - HashAlgorithmNames.SHA384 => SHA384.HashData(source), - HashAlgorithmNames.SHA3_256 => SHA3_256.HashData(source), - HashAlgorithmNames.SHA3_384 => SHA3_384.HashData(source), - HashAlgorithmNames.SHA3_512 => SHA3_512.HashData(source), - HashAlgorithmNames.MD5 when Helpers.HasMD5 => MD5.HashData(source), - _ => throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name)), - }; + throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); + } + + int hashSizeInBytes = HashSize(hashAlgorithm); + return LiteHashProvider.HashStream(hashAlgorithm.Name!, hashSizeInBytes, source); } internal static int MacData( @@ -68,18 +58,96 @@ internal static int MacData( ReadOnlySpan source, Span destination) { - return hashAlgorithm.Name switch + int macSizeInBytes = MacSize(hashAlgorithm); + + if (destination.Length < macSizeInBytes) + { + throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); + } + + int written = HashProviderDispenser.OneShotHashProvider.MacData(hashAlgorithm.Name!, key, source, destination); + Debug.Assert(written == macSizeInBytes); + return written; + } + + private static int HashSize(HashAlgorithmName hashAlgorithm) + { + switch (hashAlgorithm.Name) { - HashAlgorithmNames.SHA256 => HMACSHA256.HashData(key, source, destination), - HashAlgorithmNames.SHA1 => HMACSHA1.HashData(key, source, destination), - HashAlgorithmNames.SHA512 => HMACSHA512.HashData(key, source, destination), - HashAlgorithmNames.SHA384 => HMACSHA384.HashData(key, source, destination), - HashAlgorithmNames.SHA3_256 => HMACSHA3_256.HashData(key, source, destination), - HashAlgorithmNames.SHA3_384 => HMACSHA3_384.HashData(key, source, destination), - HashAlgorithmNames.SHA3_512 => HMACSHA3_512.HashData(key, source, destination), - HashAlgorithmNames.MD5 when Helpers.HasMD5 => HMACMD5.HashData(key, source, destination), - _ => throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name)), - }; + case HashAlgorithmNames.SHA256: + return SHA256.HashSizeInBytes; + case HashAlgorithmNames.SHA1: + return SHA1.HashSizeInBytes; + case HashAlgorithmNames.SHA512: + return SHA512.HashSizeInBytes; + case HashAlgorithmNames.SHA384: + return SHA384.HashSizeInBytes; + case HashAlgorithmNames.SHA3_256: + if (!HashProviderDispenser.HashSupported(HashAlgorithmNames.SHA3_256)) + { + throw new PlatformNotSupportedException(); + } + + return SHA3_256.HashSizeInBytes; + case HashAlgorithmNames.SHA3_384: + if (!HashProviderDispenser.HashSupported(HashAlgorithmNames.SHA3_384)) + { + throw new PlatformNotSupportedException(); + } + + return SHA3_384.HashSizeInBytes; + case HashAlgorithmNames.SHA3_512: + if (!HashProviderDispenser.HashSupported(HashAlgorithmNames.SHA3_512)) + { + throw new PlatformNotSupportedException(); + } + + return SHA3_512.HashSizeInBytes; + case HashAlgorithmNames.MD5 when Helpers.HasMD5: + return MD5.HashSizeInBytes; + default: + throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name)); + } + } + + private static int MacSize(HashAlgorithmName hashAlgorithm) + { + switch (hashAlgorithm.Name) + { + case HashAlgorithmNames.SHA256: + return HMACSHA256.HashSizeInBytes; + case HashAlgorithmNames.SHA1: + return HMACSHA1.HashSizeInBytes; + case HashAlgorithmNames.SHA512: + return HMACSHA512.HashSizeInBytes; + case HashAlgorithmNames.SHA384: + return HMACSHA384.HashSizeInBytes; + case HashAlgorithmNames.SHA3_256: + if (!HashProviderDispenser.MacSupported(HashAlgorithmNames.SHA3_256)) + { + throw new PlatformNotSupportedException(); + } + + return HMACSHA3_256.HashSizeInBytes; + case HashAlgorithmNames.SHA3_384: + if (!HashProviderDispenser.MacSupported(HashAlgorithmNames.SHA3_384)) + { + throw new PlatformNotSupportedException(); + } + + return HMACSHA3_384.HashSizeInBytes; + case HashAlgorithmNames.SHA3_512: + if (!HashProviderDispenser.MacSupported(HashAlgorithmNames.SHA3_512)) + { + throw new PlatformNotSupportedException(); + } + + return HMACSHA3_512.HashSizeInBytes; + case HashAlgorithmNames.MD5 when Helpers.HasMD5: + return HMACMD5.HashSizeInBytes; + default: + throw new CryptographicException(SR.Format(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name)); + } } } } diff --git a/src/libraries/Common/src/System/Threading/Tasks/TaskToAsyncResult.cs b/src/libraries/Common/src/System/Threading/Tasks/TaskToAsyncResult.cs index fdfd25e5892a27..0075f897ff4625 100644 --- a/src/libraries/Common/src/System/Threading/Tasks/TaskToAsyncResult.cs +++ b/src/libraries/Common/src/System/Threading/Tasks/TaskToAsyncResult.cs @@ -52,6 +52,7 @@ public static void End(IAsyncResult asyncResult) => Unwrap(asyncResult).GetAwaiter().GetResult(); /// Waits for the wrapped by the returned by to complete. + /// The type of the result produced. /// The for which to wait. /// The result of the wrapped by the . /// is null. @@ -85,6 +86,7 @@ public static Task Unwrap(IAsyncResult asyncResult) } /// Extracts the underlying from an created by . + /// The type of the result produced by the returned task. /// The created by . /// The wrapped by the . /// is null. diff --git a/src/libraries/Common/tests/SourceGenerators/RoslynTestUtils.cs b/src/libraries/Common/tests/SourceGenerators/RoslynTestUtils.cs index 2b4568a79eaba0..e67289721d8af9 100644 --- a/src/libraries/Common/tests/SourceGenerators/RoslynTestUtils.cs +++ b/src/libraries/Common/tests/SourceGenerators/RoslynTestUtils.cs @@ -91,7 +91,7 @@ public static async Task AssertNoDiagnostic(this Project proj, params string[] i } } - private static Project WithDocuments(this Project project, IEnumerable sources, IEnumerable? sourceNames = null) + public static Project WithDocuments(this Project project, IEnumerable sources, IEnumerable? sourceNames = null) { int count = 0; Project result = project; diff --git a/src/libraries/Common/tests/StaticTestGenerator/Directory.Build.props b/src/libraries/Common/tests/StaticTestGenerator/Directory.Build.props index 41245684e20523..b99ed2c670567c 100644 --- a/src/libraries/Common/tests/StaticTestGenerator/Directory.Build.props +++ b/src/libraries/Common/tests/StaticTestGenerator/Directory.Build.props @@ -1,2 +1,10 @@ - - \ No newline at end of file + + + + + false + false + + + \ No newline at end of file diff --git a/src/libraries/Common/tests/StaticTestGenerator/Program.cs b/src/libraries/Common/tests/StaticTestGenerator/Program.cs index 8154590e664614..049129edb8d269 100644 --- a/src/libraries/Common/tests/StaticTestGenerator/Program.cs +++ b/src/libraries/Common/tests/StaticTestGenerator/Program.cs @@ -1128,7 +1128,7 @@ public void WriteLine(string format, params object[] args) } "; - private string GetCsprojTemplate(string targetFramework) => + private static string GetCsprojTemplate(string targetFramework) => $@" Exe diff --git a/src/libraries/Common/tests/StaticTestGenerator/StaticTestGenerator.csproj b/src/libraries/Common/tests/StaticTestGenerator/StaticTestGenerator.csproj index ae6943c0f9245e..a0c787b8bc5282 100644 --- a/src/libraries/Common/tests/StaticTestGenerator/StaticTestGenerator.csproj +++ b/src/libraries/Common/tests/StaticTestGenerator/StaticTestGenerator.csproj @@ -1,17 +1,13 @@ + + net8.0 Exe - net7.0 - false true true - enable - false - - - + @@ -20,4 +16,5 @@ + diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Cancellation.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Cancellation.cs index 4afc8a7d0dfaa4..dea298f2ee90eb 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Cancellation.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Cancellation.cs @@ -28,7 +28,6 @@ public HttpClientHandler_Cancellation_Test(ITestOutputHelper output) : base(outp [Theory] [InlineData(false, CancellationMode.Token)] [InlineData(true, CancellationMode.Token)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/36634", TestPlatforms.Browser)] // out of memory public async Task PostAsync_CancelDuringRequestContentSend_TaskCanceledQuickly(bool chunkedTransfer, CancellationMode mode) { if (LoopbackServerFactory.Version >= HttpVersion20.Value && chunkedTransfer) @@ -42,6 +41,12 @@ public async Task PostAsync_CancelDuringRequestContentSend_TaskCanceledQuickly(b return; } + if (PlatformDetection.IsBrowser && LoopbackServerFactory.Version < HttpVersion20.Value) + { + // Browser request streaming is only supported on HTTP/2 or higher + return; + } + var serverRelease = new TaskCompletionSource(); await LoopbackServerFactory.CreateClientAndServerAsync(async uri => { @@ -58,6 +63,13 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => req.Content = new ByteAtATimeContent(int.MaxValue, waitToSend.Task, contentSending, millisecondDelayBetweenBytes: 1); req.Headers.TransferEncodingChunked = chunkedTransfer; + if (PlatformDetection.IsBrowser) + { +#if !NETFRAMEWORK + req.Options.Set(new HttpRequestOptionsKey("WebAssemblyEnableStreamingRequest"), true); +#endif + } + Task resp = client.SendAsync(TestAsync, req, HttpCompletionOption.ResponseHeadersRead, cts.Token); waitToSend.SetResult(true); await Task.WhenAny(contentSending.Task, resp); diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs index fe4c61a9577b6c..d7acae1b1c9406 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs @@ -1886,9 +1886,11 @@ await connection.ReadRequestHeaderAndSendCustomResponseAsync( } [Theory] - [InlineData(false)] - [InlineData(true)] - public async Task PostAsync_ThrowFromContentCopy_RequestFails(bool syncFailure) + [InlineData(false, false)] + [InlineData(false, true)] + [InlineData(true, false)] + [InlineData(true, true)] + public async Task PostAsync_ThrowFromContentCopy_RequestFails(bool syncFailure, bool enableWasmStreaming) { if (UseVersion == HttpVersion30) { @@ -1896,6 +1898,18 @@ public async Task PostAsync_ThrowFromContentCopy_RequestFails(bool syncFailure) return; } + if (enableWasmStreaming && !PlatformDetection.IsBrowser) + { + // enableWasmStreaming makes only sense on Browser platform + return; + } + + if (enableWasmStreaming && PlatformDetection.IsBrowser && UseVersion < HttpVersion20.Value) + { + // Browser request streaming is only supported on HTTP/2 or higher + return; + } + await LoopbackServer.CreateServerAsync(async (server, uri) => { Task responseTask = server.AcceptConnectionAsync(async connection => @@ -1914,8 +1928,20 @@ await LoopbackServer.CreateServerAsync(async (server, uri) => canReadFunc: () => true, readFunc: (buffer, offset, count) => throw error, readAsyncFunc: (buffer, offset, count, cancellationToken) => syncFailure ? throw error : Task.Delay(1).ContinueWith(_ => throw error))); + var request = new HttpRequestMessage(HttpMethod.Post, uri); + request.Content = content; + + if (PlatformDetection.IsBrowser) + { + if (enableWasmStreaming) + { +#if !NETFRAMEWORK + request.Options.Set(new HttpRequestOptionsKey("WebAssemblyEnableStreamingRequest"), true); +#endif + } + } - Assert.Same(error, await Assert.ThrowsAsync(() => client.PostAsync(uri, content))); + Assert.Same(error, await Assert.ThrowsAsync(() => client.SendAsync(request))); } }); } diff --git a/src/libraries/Common/tests/System/Net/Http/ResponseStreamTest.cs b/src/libraries/Common/tests/System/Net/Http/ResponseStreamTest.cs index 992851b166befa..e38204ffc031e3 100644 --- a/src/libraries/Common/tests/System/Net/Http/ResponseStreamTest.cs +++ b/src/libraries/Common/tests/System/Net/Http/ResponseStreamTest.cs @@ -229,9 +229,217 @@ await client.GetAsync(remoteServer.EchoUri, HttpCompletionOption.ResponseHeaders } #if NETCOREAPP - [OuterLoop] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser))] public async Task BrowserHttpHandler_Streaming() + { + var WebAssemblyEnableStreamingRequestKey = new HttpRequestOptionsKey("WebAssemblyEnableStreamingRequest"); + var WebAssemblyEnableStreamingResponseKey = new HttpRequestOptionsKey("WebAssemblyEnableStreamingResponse"); + + var req = new HttpRequestMessage(HttpMethod.Post, Configuration.Http.RemoteHttp2Server.BaseUri + "echobody.ashx"); + + req.Options.Set(WebAssemblyEnableStreamingRequestKey, true); + req.Options.Set(WebAssemblyEnableStreamingResponseKey, true); + + byte[] body = new byte[1024 * 1024]; + Random.Shared.NextBytes(body); + + int readOffset = 0; + req.Content = new StreamContent(new DelegateStream( + canReadFunc: () => true, + readFunc: (buffer, offset, count) => throw new FormatException(), + readAsyncFunc: async (buffer, offset, count, cancellationToken) => + { + await Task.Delay(1); + if (readOffset < body.Length) + { + int send = Math.Min(body.Length - readOffset, count); + body.AsSpan(readOffset, send).CopyTo(buffer.AsSpan(offset, send)); + readOffset += send; + return send; + } + return 0; + })); + + using (HttpClient client = CreateHttpClientForRemoteServer(Configuration.Http.RemoteHttp2Server)) + // we need to switch off Response buffering of default ResponseContentRead option + using (HttpResponseMessage response = await client.SendAsync(req, HttpCompletionOption.ResponseHeadersRead)) + { + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + // Streaming requests can't set Content-Length + Assert.False(response.Headers.Contains("X-HttpRequest-Headers-ContentLength")); + // Streaming response uses StreamContent + Assert.Equal(typeof(StreamContent), response.Content.GetType()); + + var stream = await response.Content.ReadAsStreamAsync(); + Assert.Equal("ReadOnlyStream", stream.GetType().Name); + var buffer = new byte[1024 * 1024]; + int totalCount = 0; + int fetchedCount = 0; + do + { + fetchedCount = await stream.ReadAsync(buffer, 0, buffer.Length); + Assert.True(body.AsSpan(totalCount, fetchedCount).SequenceEqual(buffer.AsSpan(0, fetchedCount))); + totalCount += fetchedCount; + } while (fetchedCount != 0); + Assert.Equal(body.Length, totalCount); + } + } + + [OuterLoop] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser))] + public async Task BrowserHttpHandler_StreamingRequest() + { + var WebAssemblyEnableStreamingRequestKey = new HttpRequestOptionsKey("WebAssemblyEnableStreamingRequest"); + + var req = new HttpRequestMessage(HttpMethod.Post, Configuration.Http.Http2RemoteVerifyUploadServer); + + req.Options.Set(WebAssemblyEnableStreamingRequestKey, true); + + int size = 1500 * 1024 * 1024; + int multipartOverhead = 125 + 4 /* "test" */; + int remaining = size; + var content = new MultipartFormDataContent(); + content.Add(new StreamContent(new DelegateStream( + canReadFunc: () => true, + readFunc: (buffer, offset, count) => throw new FormatException(), + readAsyncFunc: (buffer, offset, count, cancellationToken) => + { + if (remaining > 0) + { + int send = Math.Min(remaining, count); + buffer.AsSpan(offset, send).Fill(65); + remaining -= send; + return Task.FromResult(send); + } + return Task.FromResult(0); + })), "test"); + req.Content = content; + + req.Content.Headers.Add("Content-MD5-Skip", "browser"); + + using (HttpClient client = CreateHttpClientForRemoteServer(Configuration.Http.RemoteHttp2Server)) + using (HttpResponseMessage response = await client.SendAsync(req)) + { + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.Equal((size + multipartOverhead).ToString(), Assert.Single(response.Headers.GetValues("X-HttpRequest-Body-Length"))); + // Streaming requests can't set Content-Length + Assert.False(response.Headers.Contains("X-HttpRequest-Headers-ContentLength")); + } + } + + // Duplicate of PostAsync_ThrowFromContentCopy_RequestFails using remote server + [OuterLoop] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser))] + [InlineData(false)] + [InlineData(true)] + public async Task BrowserHttpHandler_StreamingRequest_ThrowFromContentCopy_RequestFails(bool syncFailure) + { + var WebAssemblyEnableStreamingRequestKey = new HttpRequestOptionsKey("WebAssemblyEnableStreamingRequest"); + + var req = new HttpRequestMessage(HttpMethod.Post, Configuration.Http.Http2RemoteEchoServer); + + req.Options.Set(WebAssemblyEnableStreamingRequestKey, true); + + Exception error = new FormatException(); + req.Content = new StreamContent(new DelegateStream( + canSeekFunc: () => true, + lengthFunc: () => 12345678, + positionGetFunc: () => 0, + canReadFunc: () => true, + readFunc: (buffer, offset, count) => throw new FormatException(), + readAsyncFunc: (buffer, offset, count, cancellationToken) => syncFailure ? throw error : Task.Delay(1).ContinueWith(_ => throw error))); + + using (HttpClient client = CreateHttpClientForRemoteServer(Configuration.Http.RemoteHttp2Server)) + { + Assert.Same(error, await Assert.ThrowsAsync(() => client.SendAsync(req))); + } + } + + public static TheoryData CancelRequestReadFunctions + => new TheoryData>> + { + { false, () => Task.FromResult(0) }, + { true, () => Task.FromResult(0) }, + { false, () => Task.FromResult(1) }, + { true, () => Task.FromResult(1) }, + { false, () => throw new FormatException() }, + { true, () => throw new FormatException() }, + }; + + [OuterLoop] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser))] + [MemberData(nameof(CancelRequestReadFunctions))] + public async Task BrowserHttpHandler_StreamingRequest_CancelRequest(bool cancelAsync, Func> readFunc) + { + var WebAssemblyEnableStreamingRequestKey = new HttpRequestOptionsKey("WebAssemblyEnableStreamingRequest"); + + var req = new HttpRequestMessage(HttpMethod.Post, Configuration.Http.Http2RemoteEchoServer); + + req.Options.Set(WebAssemblyEnableStreamingRequestKey, true); + + using var cts = new CancellationTokenSource(); + var token = cts.Token; + int readNotCancelledCount = 0, readCancelledCount = 0; + req.Content = new StreamContent(new DelegateStream( + canReadFunc: () => true, + readFunc: (buffer, offset, count) => throw new FormatException(), + readAsyncFunc: async (buffer, offset, count, cancellationToken) => + { + if (cancelAsync) await Task.Delay(1); + Assert.Equal(token.IsCancellationRequested, cancellationToken.IsCancellationRequested); + if (!token.IsCancellationRequested) + { + readNotCancelledCount++; + cts.Cancel(); + } + else + { + readCancelledCount++; + } + return await readFunc(); + })); + + using (HttpClient client = CreateHttpClientForRemoteServer(Configuration.Http.RemoteHttp2Server)) + { + TaskCanceledException ex = await Assert.ThrowsAsync(() => client.SendAsync(req, token)); + Assert.Equal(token, ex.CancellationToken); + Assert.Equal(1, readNotCancelledCount); + Assert.Equal(0, readCancelledCount); + } + } + + [OuterLoop] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser))] + public async Task BrowserHttpHandler_StreamingRequest_Http1Fails() + { + var WebAssemblyEnableStreamingRequestKey = new HttpRequestOptionsKey("WebAssemblyEnableStreamingRequest"); + + var req = new HttpRequestMessage(HttpMethod.Post, Configuration.Http.RemoteHttp11Server.BaseUri); + + req.Options.Set(WebAssemblyEnableStreamingRequestKey, true); + + int readCount = 0; + req.Content = new StreamContent(new DelegateStream( + canReadFunc: () => true, + readFunc: (buffer, offset, count) => throw new FormatException(), + readAsyncFunc: (buffer, offset, count, cancellationToken) => + { + readCount++; + return Task.FromResult(1); + })); + + using (HttpClient client = CreateHttpClientForRemoteServer(Configuration.Http.RemoteHttp11Server)) + { + HttpRequestException ex = await Assert.ThrowsAsync(() => client.SendAsync(req)); + Assert.Equal("TypeError: Failed to fetch", ex.Message); + Assert.Equal(1, readCount); + } + } + + [OuterLoop] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser))] + public async Task BrowserHttpHandler_StreamingResponse() { var WebAssemblyEnableStreamingResponseKey = new HttpRequestOptionsKey("WebAssemblyEnableStreamingResponse"); @@ -244,6 +452,7 @@ public async Task BrowserHttpHandler_Streaming() // we need to switch off Response buffering of default ResponseContentRead option using (HttpResponseMessage response = await client.SendAsync(req, HttpCompletionOption.ResponseHeadersRead)) { + // Streaming response uses StreamContent Assert.Equal(typeof(StreamContent), response.Content.GetType()); Assert.Equal("application/octet-stream", response.Content.Headers.ContentType.MediaType); diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/GenericHandler.cs b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/GenericHandler.cs index 846a30fd9951ef..31fa23f16de688 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/GenericHandler.cs +++ b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/GenericHandler.cs @@ -88,6 +88,11 @@ public async Task Invoke(HttpContext context) await LargeResponseHandler.InvokeAsync(context); return; } + if (path.Equals(new PathString("/echobody.ashx"))) + { + await EchoBodyHandler.InvokeAsync(context); + return; + } // Default handling. await EchoHandler.InvokeAsync(context); diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/EchoBodyHandler.cs b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/EchoBodyHandler.cs new file mode 100644 index 00000000000000..3ddf4f62535e6d --- /dev/null +++ b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/EchoBodyHandler.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; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Http.Features; + +namespace NetCoreServer +{ + public class EchoBodyHandler + { + public static async Task InvokeAsync(HttpContext context) + { + context.Features.Get().MaxRequestBodySize = null; + + // Report back original request method verb. + context.Response.Headers["X-HttpRequest-Method"] = context.Request.Method; + + // Report back original entity-body related request headers. + string contentLength = context.Request.Headers["Content-Length"]; + if (!string.IsNullOrEmpty(contentLength)) + { + context.Response.Headers["X-HttpRequest-Headers-ContentLength"] = contentLength; + } + + string transferEncoding = context.Request.Headers["Transfer-Encoding"]; + if (!string.IsNullOrEmpty(transferEncoding)) + { + context.Response.Headers["X-HttpRequest-Headers-TransferEncoding"] = transferEncoding; + } + + context.Response.StatusCode = 200; + context.Response.ContentType = context.Request.ContentType; + await context.Request.Body.CopyToAsync(context.Response.Body); + } + } +} diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/VerifyUploadHandler.cs b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/VerifyUploadHandler.cs index e4c6cb63c55603..5876d6303caffb 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/VerifyUploadHandler.cs +++ b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/VerifyUploadHandler.cs @@ -6,6 +6,7 @@ using System.Security.Cryptography; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Http.Features; namespace NetCoreServer { @@ -13,6 +14,8 @@ public class VerifyUploadHandler { public static async Task InvokeAsync(HttpContext context) { + context.Features.Get().MaxRequestBodySize = null; + // Report back original request method verb. context.Response.Headers["X-HttpRequest-Method"] = context.Request.Method; @@ -29,12 +32,15 @@ public static async Task InvokeAsync(HttpContext context) context.Response.Headers["X-HttpRequest-Headers-TransferEncoding"] = transferEncoding; } - // Get request body. - byte[] requestBodyBytes = await ReadAllRequestBytesAsync(context); + // Compute MD5 hash of received request body. + (byte[] md5Bytes, int bodyLength) = await ComputeMD5HashRequestBodyAsync(context); + + // Report back the actual body length. + context.Response.Headers["X-HttpRequest-Body-Length"] = bodyLength.ToString(); - // Skip MD5 checksum for empty request body + // Skip MD5 checksum for empty request body // or for requests which opt to skip it due to [ActiveIssue("https://github.com/dotnet/runtime/issues/37669", TestPlatforms.Browser)] - if (requestBodyBytes.Length == 0 || !string.IsNullOrEmpty(context.Request.Headers["Content-MD5-Skip"])) + if (bodyLength == 0 || !string.IsNullOrEmpty(context.Request.Headers["Content-MD5-Skip"])) { context.Response.StatusCode = 200; return; @@ -49,13 +55,7 @@ public static async Task InvokeAsync(HttpContext context) return; } - // Compute MD5 hash of received request body. - string actualHash; - using (MD5 md5 = MD5.Create()) - { - byte[] hash = md5.ComputeHash(requestBodyBytes); - actualHash = Convert.ToBase64String(hash); - } + string actualHash = Convert.ToBase64String(md5Bytes); if (expectedHash == actualHash) { @@ -66,21 +66,22 @@ public static async Task InvokeAsync(HttpContext context) context.Response.StatusCode = 400; context.Response.SetStatusDescription("Received request body fails MD5 checksum"); } - } - private static async Task ReadAllRequestBytesAsync(HttpContext context) + private static async Task<(byte[] MD5Hash, int BodyLength)> ComputeMD5HashRequestBodyAsync(HttpContext context) { Stream requestStream = context.Request.Body; byte[] buffer = new byte[16 * 1024]; - using (MemoryStream ms = new MemoryStream()) + using (MD5 md5 = MD5.Create()) { - int read; + int read, size = 0; while ((read = await requestStream.ReadAsync(buffer, 0, buffer.Length)) > 0) { - ms.Write(buffer, 0, read); + size += read; + md5.TransformBlock(buffer, 0, read, buffer, 0); } - return ms.ToArray(); + md5.TransformFinalBlock(buffer, 0, read); + return (md5.Hash, size); } } } diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/NetCoreServer.csproj b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/NetCoreServer.csproj index a654a21e298c06..a458eb3eeec5ed 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/NetCoreServer.csproj +++ b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/NetCoreServer.csproj @@ -26,6 +26,7 @@ + diff --git a/src/libraries/Common/tests/System/TimeProviderTests.cs b/src/libraries/Common/tests/System/TimeProviderTests.cs index 5afb4fcb9a1945..fb9d13310e332a 100644 --- a/src/libraries/Common/tests/System/TimeProviderTests.cs +++ b/src/libraries/Common/tests/System/TimeProviderTests.cs @@ -109,6 +109,7 @@ public static IEnumerable TimersProvidersData() } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [MemberData(nameof(TimersProvidersData))] public void TestProviderTimer(TimeProvider provider, int MaxMilliseconds) { @@ -215,6 +216,7 @@ private static void CancelAfter(TimeProvider provider, CancellationTokenSource c #endif // NETFRAMEWORK [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [MemberData(nameof(TimersProvidersListData))] public static void CancellationTokenSourceWithTimer(TimeProvider provider) { diff --git a/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/PropsFileEntry.cs b/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/PropsFileEntry.cs index cc1e71565c3197..c664fa8c9de7ad 100644 --- a/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/PropsFileEntry.cs +++ b/src/libraries/Common/tests/TestUtilities.Unicode/System/Text/Unicode/PropsFileEntry.cs @@ -11,10 +11,8 @@ namespace System.Text.Unicode { // Represents an entry in a Unicode props file. // The expected format is "XXXX[..YYYY] ; [# ]". - internal sealed class PropsFileEntry + internal sealed partial class PropsFileEntry { - private static readonly Regex _regex = new Regex(@"^\s*(?[0-9a-f]{4,})(\.\.(?[0-9a-f]{4,}))?\s*;\s*(?.+?)\s*(#\s*(?.*))?$", RegexOptions.IgnoreCase); - public readonly int FirstCodePoint; public readonly int LastCodePoint; public readonly string PropName; @@ -34,7 +32,7 @@ private PropsFileEntry(uint firstCodePoint, uint lastCodePoint, string propName) public static bool TryParseLine(string line, [NotNullWhen(true)] out PropsFileEntry? value) { - Match match = _regex.Match(line); + Match match = GetRegex().Match(line); if (!match.Success) { @@ -53,5 +51,8 @@ public static bool TryParseLine(string line, [NotNullWhen(true)] out PropsFileEn value = new PropsFileEntry(firstCodePoint, lastCodePoint, match.Groups["propName"].Value); return true; } + + [GeneratedRegex(@"^\s*(?[0-9a-f]{4,})(\.\.(?[0-9a-f]{4,}))?\s*;\s*(?.+?)\s*(#\s*(?.*))?$", RegexOptions.IgnoreCase)] + private static partial Regex GetRegex(); } } diff --git a/src/libraries/Common/tests/TestUtilities/System/Buffers/BoundedMemory.Unix.cs b/src/libraries/Common/tests/TestUtilities/System/Buffers/BoundedMemory.Unix.cs index b127a2a72491e9..c8197b0055092f 100644 --- a/src/libraries/Common/tests/TestUtilities/System/Buffers/BoundedMemory.Unix.cs +++ b/src/libraries/Common/tests/TestUtilities/System/Buffers/BoundedMemory.Unix.cs @@ -30,6 +30,8 @@ public UnixImplementation(int elementCount) public override bool IsReadonly => false; + public override int Length => _elementCount; + public override Memory Memory => _memoryManager.Memory; public override Span Span @@ -83,10 +85,7 @@ protected override void Dispose(bool disposing) // no-op; the handle will be disposed separately } - public override Span GetSpan() - { - throw new NotImplementedException(); - } + public override Span GetSpan() => _impl.Span; public override MemoryHandle Pin(int elementIndex) { diff --git a/src/libraries/Common/tests/TestUtilities/System/Buffers/BoundedMemory.Windows.cs b/src/libraries/Common/tests/TestUtilities/System/Buffers/BoundedMemory.Windows.cs index 7b1cbbafc72dbc..96f40d61492e52 100644 --- a/src/libraries/Common/tests/TestUtilities/System/Buffers/BoundedMemory.Windows.cs +++ b/src/libraries/Common/tests/TestUtilities/System/Buffers/BoundedMemory.Windows.cs @@ -81,6 +81,8 @@ internal WindowsImplementation(VirtualAllocHandle handle, int byteOffsetIntoHand public override bool IsReadonly => (Protection != VirtualAllocProtection.PAGE_READWRITE); + public override int Length => _elementCount; + internal VirtualAllocProtection Protection { get @@ -189,10 +191,7 @@ protected override void Dispose(bool disposing) // no-op; the handle will be disposed separately } - public override Span GetSpan() - { - throw new NotImplementedException(); - } + public override Span GetSpan() => _impl.Span; public override MemoryHandle Pin(int elementIndex) { diff --git a/src/libraries/Common/tests/TestUtilities/System/Buffers/BoundedMemory.cs b/src/libraries/Common/tests/TestUtilities/System/Buffers/BoundedMemory.cs index d70b30721fdbd9..81d359cc80e926 100644 --- a/src/libraries/Common/tests/TestUtilities/System/Buffers/BoundedMemory.cs +++ b/src/libraries/Common/tests/TestUtilities/System/Buffers/BoundedMemory.cs @@ -14,6 +14,9 @@ public abstract class BoundedMemory : IDisposable where T : unmanaged ///
public abstract bool IsReadonly { get; } + /// Gets the length of the instance. + public abstract int Length { get; } + /// /// Gets the which represents this native memory. /// This instance must be kept alive while working with the . @@ -44,5 +47,23 @@ public abstract class BoundedMemory : IDisposable where T : unmanaged /// OS does not support marking the memory block as read+write. /// public abstract void MakeWriteable(); + + /// + /// Gets the which represents this native memory. + /// This instance must be kept alive while working with the . + /// + public static implicit operator Span(BoundedMemory boundedMemory) => boundedMemory.Span; + + /// + /// Gets the which represents this native memory. + /// This instance must be kept alive while working with the . + /// + public static implicit operator ReadOnlySpan(BoundedMemory boundedMemory) => boundedMemory.Span; + + /// + /// Gets a reference to the element at the specified index. + /// This instance must be kept alive while working with the reference. + /// + public ref T this[int index] => ref Span[index]; } } diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs index c0bbcaa90df2c9..431bc77820d0b8 100644 --- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs +++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs @@ -66,6 +66,7 @@ public static partial class PlatformDetection public static bool IsS390xProcess => (int)RuntimeInformation.ProcessArchitecture == 5; // Architecture.S390x public static bool IsArmv6Process => (int)RuntimeInformation.ProcessArchitecture == 7; // Architecture.Armv6 public static bool IsPpc64leProcess => (int)RuntimeInformation.ProcessArchitecture == 8; // Architecture.Ppc64le + public static bool IsRiscV64Process => (int)RuntimeInformation.ProcessArchitecture == 9; // Architecture.RiscV64; public static bool IsX64Process => RuntimeInformation.ProcessArchitecture == Architecture.X64; public static bool IsX86Process => RuntimeInformation.ProcessArchitecture == Architecture.X86; public static bool IsNotX86Process => !IsX86Process; diff --git a/src/libraries/Common/tests/TestUtilities/TestUtilities.csproj b/src/libraries/Common/tests/TestUtilities/TestUtilities.csproj index cbb1f4ed69be90..2273e3bd088a28 100644 --- a/src/libraries/Common/tests/TestUtilities/TestUtilities.csproj +++ b/src/libraries/Common/tests/TestUtilities/TestUtilities.csproj @@ -107,13 +107,15 @@ - + + + diff --git a/src/libraries/Directory.Build.props b/src/libraries/Directory.Build.props index 9d6f6c385bb4dc..32fc46a35d8d7c 100644 --- a/src/libraries/Directory.Build.props +++ b/src/libraries/Directory.Build.props @@ -6,6 +6,10 @@ we only enable it in specific projects. so to avoid duplicating this property in coreclr, we can first scope it to src/libraries. This property needs to be declared before the ..\..\Directory.Build.props import. --> true + + + false diff --git a/src/libraries/Directory.Build.targets b/src/libraries/Directory.Build.targets index cb644757a2d95a..184155c6edce61 100644 --- a/src/libraries/Directory.Build.targets +++ b/src/libraries/Directory.Build.targets @@ -125,10 +125,8 @@ - - - + diff --git a/src/libraries/Microsoft.Bcl.AsyncInterfaces/Microsoft.Bcl.AsyncInterfaces.sln b/src/libraries/Microsoft.Bcl.AsyncInterfaces/Microsoft.Bcl.AsyncInterfaces.sln index 65b512f07a18df..54d14ae5c2cf66 100644 --- a/src/libraries/Microsoft.Bcl.AsyncInterfaces/Microsoft.Bcl.AsyncInterfaces.sln +++ b/src/libraries/Microsoft.Bcl.AsyncInterfaces/Microsoft.Bcl.AsyncInterfaces.sln @@ -7,12 +7,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.AsyncInterfac EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.AsyncInterfaces.Tests", "tests\Microsoft.Bcl.AsyncInterfaces.Tests.csproj", "{51D9518A-464D-4257-9567-3BDCFF24F3EE}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{E30F71EB-6C3B-4052-84F7-36EAA178A45E}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{0AE44453-273B-4F0E-9901-A87891A73C1B}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{D0F1936C-CF7C-4448-9F90-B9DEABE89EBB}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{59CE8DDB-AFFD-4C6F-B09F-94DE4DD0AAEA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{0225750F-4DC0-4C71-9B33-314ACA0EF682}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{272C69D8-6BED-4CE0-BD62-9F993989374E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{FCA0C2EA-4A82-4B3F-A9B5-E0B5200866BF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{9957B23B-3C95-4200-A6D9-F05BAF6DC7A7}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{6614EF7F-23FC-4809-AFF5-1ADBF1B6422C}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{111B1B5B-A004-4C05-9A8C-E0931DADA5FB}" @@ -21,6 +29,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{85204CF5-0C8 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{D6A9108E-553B-445E-A037-FA4F3140A279}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{F4939A3B-3316-4166-8AE6-34E1D0863CF5}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{1AC9674D-927D-49C4-BB42-6FF353C84275}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{670FB605-56DB-45F0-9B48-F8A62AFE5BD9}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{8F627B90-170F-4BCE-A626-7688EC714FB4}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -43,10 +59,6 @@ Global {51D9518A-464D-4257-9567-3BDCFF24F3EE}.Debug|Any CPU.Build.0 = Debug|Any CPU {51D9518A-464D-4257-9567-3BDCFF24F3EE}.Release|Any CPU.ActiveCfg = Release|Any CPU {51D9518A-464D-4257-9567-3BDCFF24F3EE}.Release|Any CPU.Build.0 = Release|Any CPU - {E30F71EB-6C3B-4052-84F7-36EAA178A45E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E30F71EB-6C3B-4052-84F7-36EAA178A45E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E30F71EB-6C3B-4052-84F7-36EAA178A45E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E30F71EB-6C3B-4052-84F7-36EAA178A45E}.Release|Any CPU.Build.0 = Release|Any CPU {0AE44453-273B-4F0E-9901-A87891A73C1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0AE44453-273B-4F0E-9901-A87891A73C1B}.Debug|Any CPU.Build.0 = Debug|Any CPU {0AE44453-273B-4F0E-9901-A87891A73C1B}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -55,6 +67,26 @@ Global {D0F1936C-CF7C-4448-9F90-B9DEABE89EBB}.Debug|Any CPU.Build.0 = Debug|Any CPU {D0F1936C-CF7C-4448-9F90-B9DEABE89EBB}.Release|Any CPU.ActiveCfg = Release|Any CPU {D0F1936C-CF7C-4448-9F90-B9DEABE89EBB}.Release|Any CPU.Build.0 = Release|Any CPU + {59CE8DDB-AFFD-4C6F-B09F-94DE4DD0AAEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {59CE8DDB-AFFD-4C6F-B09F-94DE4DD0AAEA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {59CE8DDB-AFFD-4C6F-B09F-94DE4DD0AAEA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {59CE8DDB-AFFD-4C6F-B09F-94DE4DD0AAEA}.Release|Any CPU.Build.0 = Release|Any CPU + {0225750F-4DC0-4C71-9B33-314ACA0EF682}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0225750F-4DC0-4C71-9B33-314ACA0EF682}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0225750F-4DC0-4C71-9B33-314ACA0EF682}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0225750F-4DC0-4C71-9B33-314ACA0EF682}.Release|Any CPU.Build.0 = Release|Any CPU + {272C69D8-6BED-4CE0-BD62-9F993989374E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {272C69D8-6BED-4CE0-BD62-9F993989374E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {272C69D8-6BED-4CE0-BD62-9F993989374E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {272C69D8-6BED-4CE0-BD62-9F993989374E}.Release|Any CPU.Build.0 = Release|Any CPU + {FCA0C2EA-4A82-4B3F-A9B5-E0B5200866BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FCA0C2EA-4A82-4B3F-A9B5-E0B5200866BF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FCA0C2EA-4A82-4B3F-A9B5-E0B5200866BF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FCA0C2EA-4A82-4B3F-A9B5-E0B5200866BF}.Release|Any CPU.Build.0 = Release|Any CPU + {9957B23B-3C95-4200-A6D9-F05BAF6DC7A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9957B23B-3C95-4200-A6D9-F05BAF6DC7A7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9957B23B-3C95-4200-A6D9-F05BAF6DC7A7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9957B23B-3C95-4200-A6D9-F05BAF6DC7A7}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -64,9 +96,16 @@ Global {51D9518A-464D-4257-9567-3BDCFF24F3EE} = {6614EF7F-23FC-4809-AFF5-1ADBF1B6422C} {73E7C25C-AEBC-4F4F-B8D1-0CC49D5B92DE} = {111B1B5B-A004-4C05-9A8C-E0931DADA5FB} {4D4BED71-8904-4A74-88CD-63D002CCACD0} = {85204CF5-0C88-4BBB-9E70-D8CCED82ED3D} - {E30F71EB-6C3B-4052-84F7-36EAA178A45E} = {D6A9108E-553B-445E-A037-FA4F3140A279} {0AE44453-273B-4F0E-9901-A87891A73C1B} = {D6A9108E-553B-445E-A037-FA4F3140A279} {D0F1936C-CF7C-4448-9F90-B9DEABE89EBB} = {D6A9108E-553B-445E-A037-FA4F3140A279} + {59CE8DDB-AFFD-4C6F-B09F-94DE4DD0AAEA} = {F4939A3B-3316-4166-8AE6-34E1D0863CF5} + {0225750F-4DC0-4C71-9B33-314ACA0EF682} = {F4939A3B-3316-4166-8AE6-34E1D0863CF5} + {F4939A3B-3316-4166-8AE6-34E1D0863CF5} = {8F627B90-170F-4BCE-A626-7688EC714FB4} + {272C69D8-6BED-4CE0-BD62-9F993989374E} = {1AC9674D-927D-49C4-BB42-6FF353C84275} + {FCA0C2EA-4A82-4B3F-A9B5-E0B5200866BF} = {1AC9674D-927D-49C4-BB42-6FF353C84275} + {1AC9674D-927D-49C4-BB42-6FF353C84275} = {8F627B90-170F-4BCE-A626-7688EC714FB4} + {9957B23B-3C95-4200-A6D9-F05BAF6DC7A7} = {670FB605-56DB-45F0-9B48-F8A62AFE5BD9} + {670FB605-56DB-45F0-9B48-F8A62AFE5BD9} = {8F627B90-170F-4BCE-A626-7688EC714FB4} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {A835CEDB-E9E2-49EE-8499-BD7FDD984E53} diff --git a/src/libraries/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj b/src/libraries/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj index 0f0f1ce3deafce..5f97a10f5c3df3 100644 --- a/src/libraries/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj +++ b/src/libraries/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj @@ -10,10 +10,9 @@ Commonly Used Types: System.IAsyncDisposable System.Collections.Generic.IAsyncEnumerable System.Collections.Generic.IAsyncEnumerator - - false + true @@ -45,8 +44,9 @@ System.Collections.Generic.IAsyncEnumerator System.Private.CoreLib\System\Runtime\CompilerServices\EnumeratorCancellationAttribute.cs - + + diff --git a/src/libraries/Microsoft.Bcl.AsyncInterfaces/src/PACKAGE.md b/src/libraries/Microsoft.Bcl.AsyncInterfaces/src/PACKAGE.md new file mode 100644 index 00000000000000..e0c6e8ae9adaae --- /dev/null +++ b/src/libraries/Microsoft.Bcl.AsyncInterfaces/src/PACKAGE.md @@ -0,0 +1,64 @@ +## About + +As of C# 8, the C# language has support for producing and consuming asynchronous iterators. The library types in support of those features are available in .NET Core 3.0 and newer as well as in .NET Standard 2.1. This library provides the necessary definitions of those types to support these language features on .NET Framework and on .NET Standard 2.0. This library is not necessary nor recommended when targeting versions of .NET that include the relevant support. + +## Key Features + + + +* Enables the use of C# async iterators on older .NET platforms + +## How to Use + + + +```C# +using System; +using System.Collections.Generic; +using System.Threading.Tasks; + +internal static class Program +{ + private static async Task Main() + { + Console.WriteLine("Starting..."); + await foreach (var value in GetValuesAsync()) + { + Console.WriteLine(value); + } + Console.WriteLine("Finished!"); + + static async IAsyncEnumerable GetValuesAsync() + { + for (int i = 0; i < 10; i++) + { + await Task.Delay(TimeSpan.FromSeconds(1)); + yield return i; + } + } + } +} +``` + +## Main Types + + + +The main types provided by this library are: + +* `IAsyncEnumerable` +* `IAsyncEnumerator` +* `IAsyncDisposable` + +## Additional Documentation + + + +* [C# Feature Specification](https://learn.microsoft.com/dotnet/csharp/language-reference/proposals/csharp-8.0/async-streams) +* [Walkthrough article](https://learn.microsoft.com/archive/msdn-magazine/2019/november/csharp-iterating-with-async-enumerables-in-csharp-8) + +## Feedback & Contributing + + + +Microsoft.Bcl.AsyncInterfaces is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). \ No newline at end of file diff --git a/src/libraries/Microsoft.Bcl.Cryptography/Microsoft.Bcl.Cryptography.sln b/src/libraries/Microsoft.Bcl.Cryptography/Microsoft.Bcl.Cryptography.sln index e64d650ad586f9..7b4972e18f9fc4 100644 --- a/src/libraries/Microsoft.Bcl.Cryptography/Microsoft.Bcl.Cryptography.sln +++ b/src/libraries/Microsoft.Bcl.Cryptography/Microsoft.Bcl.Cryptography.sln @@ -7,12 +7,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.Cryptography" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.Cryptography.Tests", "tests\Microsoft.Bcl.Cryptography.Tests.csproj", "{E66D17AB-BBAF-4F2B-AC9C-8E89BDCC6191}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{B61AD28A-1FB4-478D-B75D-77852F65BBA4}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{E9271403-BEF5-46E9-B68B-16EF69AA7149}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{A4C2BDDC-1AFB-45A8-9E9B-4AD7396A4DF2}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{777AF5DE-3EB3-4E62-A0D8-CA10D77B5343}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{94384409-052F-4697-B235-8990C851B6A4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{A243E975-A17E-4DA8-91AC-7FCB52EAB921}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{7C971319-753D-4D49-B242-994260ABD9AF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{E4477F0C-A13A-4C1A-9A70-0A287E09E9EA}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{8C3BD4AD-1A56-4204-9826-F8B74251D19F}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{7E9F6DE1-771B-4E25-A603-EC43D0291C8B}" @@ -21,6 +29,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{98708A22-726 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{34897637-11A1-48A4-AF1F-E11463A61D0B}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{568C437D-072B-48BA-BBB4-20F39E2ADA15}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{AEDD1BBB-88D7-4CC1-9262-D94341DAD308}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{3AFC9F72-C997-4066-86FD-EDA22F432C73}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{98BFC458-097E-4C6C-BAE8-03199531D531}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -43,10 +59,6 @@ Global {E66D17AB-BBAF-4F2B-AC9C-8E89BDCC6191}.Debug|Any CPU.Build.0 = Debug|Any CPU {E66D17AB-BBAF-4F2B-AC9C-8E89BDCC6191}.Release|Any CPU.ActiveCfg = Release|Any CPU {E66D17AB-BBAF-4F2B-AC9C-8E89BDCC6191}.Release|Any CPU.Build.0 = Release|Any CPU - {B61AD28A-1FB4-478D-B75D-77852F65BBA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B61AD28A-1FB4-478D-B75D-77852F65BBA4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B61AD28A-1FB4-478D-B75D-77852F65BBA4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B61AD28A-1FB4-478D-B75D-77852F65BBA4}.Release|Any CPU.Build.0 = Release|Any CPU {E9271403-BEF5-46E9-B68B-16EF69AA7149}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E9271403-BEF5-46E9-B68B-16EF69AA7149}.Debug|Any CPU.Build.0 = Debug|Any CPU {E9271403-BEF5-46E9-B68B-16EF69AA7149}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -55,6 +67,26 @@ Global {A4C2BDDC-1AFB-45A8-9E9B-4AD7396A4DF2}.Debug|Any CPU.Build.0 = Debug|Any CPU {A4C2BDDC-1AFB-45A8-9E9B-4AD7396A4DF2}.Release|Any CPU.ActiveCfg = Release|Any CPU {A4C2BDDC-1AFB-45A8-9E9B-4AD7396A4DF2}.Release|Any CPU.Build.0 = Release|Any CPU + {777AF5DE-3EB3-4E62-A0D8-CA10D77B5343}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {777AF5DE-3EB3-4E62-A0D8-CA10D77B5343}.Debug|Any CPU.Build.0 = Debug|Any CPU + {777AF5DE-3EB3-4E62-A0D8-CA10D77B5343}.Release|Any CPU.ActiveCfg = Release|Any CPU + {777AF5DE-3EB3-4E62-A0D8-CA10D77B5343}.Release|Any CPU.Build.0 = Release|Any CPU + {94384409-052F-4697-B235-8990C851B6A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {94384409-052F-4697-B235-8990C851B6A4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {94384409-052F-4697-B235-8990C851B6A4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {94384409-052F-4697-B235-8990C851B6A4}.Release|Any CPU.Build.0 = Release|Any CPU + {A243E975-A17E-4DA8-91AC-7FCB52EAB921}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A243E975-A17E-4DA8-91AC-7FCB52EAB921}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A243E975-A17E-4DA8-91AC-7FCB52EAB921}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A243E975-A17E-4DA8-91AC-7FCB52EAB921}.Release|Any CPU.Build.0 = Release|Any CPU + {7C971319-753D-4D49-B242-994260ABD9AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7C971319-753D-4D49-B242-994260ABD9AF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7C971319-753D-4D49-B242-994260ABD9AF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7C971319-753D-4D49-B242-994260ABD9AF}.Release|Any CPU.Build.0 = Release|Any CPU + {E4477F0C-A13A-4C1A-9A70-0A287E09E9EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E4477F0C-A13A-4C1A-9A70-0A287E09E9EA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E4477F0C-A13A-4C1A-9A70-0A287E09E9EA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E4477F0C-A13A-4C1A-9A70-0A287E09E9EA}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -64,9 +96,16 @@ Global {E66D17AB-BBAF-4F2B-AC9C-8E89BDCC6191} = {8C3BD4AD-1A56-4204-9826-F8B74251D19F} {63655B2E-6A06-4E48-9F01-D0B910063165} = {7E9F6DE1-771B-4E25-A603-EC43D0291C8B} {B0716D7E-B824-4866-A1ED-DF31BA2970B9} = {98708A22-7268-4EDB-AE37-70AA958A772A} - {B61AD28A-1FB4-478D-B75D-77852F65BBA4} = {34897637-11A1-48A4-AF1F-E11463A61D0B} {E9271403-BEF5-46E9-B68B-16EF69AA7149} = {34897637-11A1-48A4-AF1F-E11463A61D0B} {A4C2BDDC-1AFB-45A8-9E9B-4AD7396A4DF2} = {34897637-11A1-48A4-AF1F-E11463A61D0B} + {777AF5DE-3EB3-4E62-A0D8-CA10D77B5343} = {568C437D-072B-48BA-BBB4-20F39E2ADA15} + {94384409-052F-4697-B235-8990C851B6A4} = {568C437D-072B-48BA-BBB4-20F39E2ADA15} + {568C437D-072B-48BA-BBB4-20F39E2ADA15} = {98BFC458-097E-4C6C-BAE8-03199531D531} + {A243E975-A17E-4DA8-91AC-7FCB52EAB921} = {AEDD1BBB-88D7-4CC1-9262-D94341DAD308} + {7C971319-753D-4D49-B242-994260ABD9AF} = {AEDD1BBB-88D7-4CC1-9262-D94341DAD308} + {AEDD1BBB-88D7-4CC1-9262-D94341DAD308} = {98BFC458-097E-4C6C-BAE8-03199531D531} + {E4477F0C-A13A-4C1A-9A70-0A287E09E9EA} = {3AFC9F72-C997-4066-86FD-EDA22F432C73} + {3AFC9F72-C997-4066-86FD-EDA22F432C73} = {98BFC458-097E-4C6C-BAE8-03199531D531} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {EAA35B12-9858-4428-8510-F09B19933FB9} diff --git a/src/libraries/Microsoft.Bcl.Cryptography/ref/Microsoft.Bcl.Cryptography.csproj b/src/libraries/Microsoft.Bcl.Cryptography/ref/Microsoft.Bcl.Cryptography.csproj index 8e799cf5606680..ef8ae599f15b4c 100644 --- a/src/libraries/Microsoft.Bcl.Cryptography/ref/Microsoft.Bcl.Cryptography.csproj +++ b/src/libraries/Microsoft.Bcl.Cryptography/ref/Microsoft.Bcl.Cryptography.csproj @@ -1,11 +1,13 @@ + - $(NetCoreAppCurrent);netstandard2.0;$(NetFrameworkMinimum) + netstandard2.0;$(NetFrameworkMinimum);$(NetCoreAppMinimum) + diff --git a/src/libraries/Microsoft.Bcl.Cryptography/src/Microsoft.Bcl.Cryptography.csproj b/src/libraries/Microsoft.Bcl.Cryptography/src/Microsoft.Bcl.Cryptography.csproj index 07291c966fb077..b2004663e45823 100644 --- a/src/libraries/Microsoft.Bcl.Cryptography/src/Microsoft.Bcl.Cryptography.csproj +++ b/src/libraries/Microsoft.Bcl.Cryptography/src/Microsoft.Bcl.Cryptography.csproj @@ -1,13 +1,9 @@ - $(NetCoreAppCurrent);netstandard2.0;$(NetFrameworkMinimum) + netstandard2.0;$(NetFrameworkMinimum);$(NetCoreAppMinimum) true true - - true Provides support for some cryptographic primitives for .NET Framework and .NET Standard. Commonly Used Types: @@ -16,8 +12,9 @@ System.Security.Cryptography.SP800108HmacCounterKdf false + - true + true true diff --git a/src/libraries/Microsoft.Bcl.Numerics/Microsoft.Bcl.Numerics.sln b/src/libraries/Microsoft.Bcl.Numerics/Microsoft.Bcl.Numerics.sln new file mode 100644 index 00000000000000..2490a78a68c41c --- /dev/null +++ b/src/libraries/Microsoft.Bcl.Numerics/Microsoft.Bcl.Numerics.sln @@ -0,0 +1,113 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{CAEE0409-CCC3-4EA6-AB54-177FD305D42D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.Numerics", "ref\Microsoft.Bcl.Numerics.csproj", "{73E7C25C-AEBC-4F4F-B8D1-0CC49D5B92DE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.Numerics", "src\Microsoft.Bcl.Numerics.csproj", "{4D4BED71-8904-4A74-88CD-63D002CCACD0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.Numerics.Tests", "tests\Microsoft.Bcl.Numerics.Tests.csproj", "{51D9518A-464D-4257-9567-3BDCFF24F3EE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{0AE44453-273B-4F0E-9901-A87891A73C1B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{D0F1936C-CF7C-4448-9F90-B9DEABE89EBB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{21224EF3-8706-4C95-8009-ADCA451B1513}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{5455F8B5-6A95-42AE-9D6E-AA13D0324D9A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{53C6C9CF-FF18-46A0-984F-F56B5963D3F1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{DBBC7B68-FB1F-438F-B0D8-EDA8000A7D8D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{8FA7D6DC-A098-4991-96B1-5A6AA6064A0C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{6614EF7F-23FC-4809-AFF5-1ADBF1B6422C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{111B1B5B-A004-4C05-9A8C-E0931DADA5FB}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{85204CF5-0C88-4BBB-9E70-D8CCED82ED3D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{D6A9108E-553B-445E-A037-FA4F3140A279}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{0B6D6DEB-1D82-4C19-98F5-7CCDB5AEBACA}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{9EC77498-07C2-4E35-BB08-98A192D72A58}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{C62FCD0A-8212-4342-AE80-7E7E648A713C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{84DB9E5E-D290-46B3-ABB5-7E53CBDEBEC3}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CAEE0409-CCC3-4EA6-AB54-177FD305D42D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CAEE0409-CCC3-4EA6-AB54-177FD305D42D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CAEE0409-CCC3-4EA6-AB54-177FD305D42D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CAEE0409-CCC3-4EA6-AB54-177FD305D42D}.Release|Any CPU.Build.0 = Release|Any CPU + {73E7C25C-AEBC-4F4F-B8D1-0CC49D5B92DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {73E7C25C-AEBC-4F4F-B8D1-0CC49D5B92DE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {73E7C25C-AEBC-4F4F-B8D1-0CC49D5B92DE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {73E7C25C-AEBC-4F4F-B8D1-0CC49D5B92DE}.Release|Any CPU.Build.0 = Release|Any CPU + {4D4BED71-8904-4A74-88CD-63D002CCACD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4D4BED71-8904-4A74-88CD-63D002CCACD0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4D4BED71-8904-4A74-88CD-63D002CCACD0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4D4BED71-8904-4A74-88CD-63D002CCACD0}.Release|Any CPU.Build.0 = Release|Any CPU + {51D9518A-464D-4257-9567-3BDCFF24F3EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {51D9518A-464D-4257-9567-3BDCFF24F3EE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {51D9518A-464D-4257-9567-3BDCFF24F3EE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {51D9518A-464D-4257-9567-3BDCFF24F3EE}.Release|Any CPU.Build.0 = Release|Any CPU + {0AE44453-273B-4F0E-9901-A87891A73C1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0AE44453-273B-4F0E-9901-A87891A73C1B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0AE44453-273B-4F0E-9901-A87891A73C1B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0AE44453-273B-4F0E-9901-A87891A73C1B}.Release|Any CPU.Build.0 = Release|Any CPU + {D0F1936C-CF7C-4448-9F90-B9DEABE89EBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D0F1936C-CF7C-4448-9F90-B9DEABE89EBB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D0F1936C-CF7C-4448-9F90-B9DEABE89EBB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D0F1936C-CF7C-4448-9F90-B9DEABE89EBB}.Release|Any CPU.Build.0 = Release|Any CPU + {21224EF3-8706-4C95-8009-ADCA451B1513}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {21224EF3-8706-4C95-8009-ADCA451B1513}.Debug|Any CPU.Build.0 = Debug|Any CPU + {21224EF3-8706-4C95-8009-ADCA451B1513}.Release|Any CPU.ActiveCfg = Release|Any CPU + {21224EF3-8706-4C95-8009-ADCA451B1513}.Release|Any CPU.Build.0 = Release|Any CPU + {5455F8B5-6A95-42AE-9D6E-AA13D0324D9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5455F8B5-6A95-42AE-9D6E-AA13D0324D9A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5455F8B5-6A95-42AE-9D6E-AA13D0324D9A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5455F8B5-6A95-42AE-9D6E-AA13D0324D9A}.Release|Any CPU.Build.0 = Release|Any CPU + {53C6C9CF-FF18-46A0-984F-F56B5963D3F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {53C6C9CF-FF18-46A0-984F-F56B5963D3F1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {53C6C9CF-FF18-46A0-984F-F56B5963D3F1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {53C6C9CF-FF18-46A0-984F-F56B5963D3F1}.Release|Any CPU.Build.0 = Release|Any CPU + {DBBC7B68-FB1F-438F-B0D8-EDA8000A7D8D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DBBC7B68-FB1F-438F-B0D8-EDA8000A7D8D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DBBC7B68-FB1F-438F-B0D8-EDA8000A7D8D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DBBC7B68-FB1F-438F-B0D8-EDA8000A7D8D}.Release|Any CPU.Build.0 = Release|Any CPU + {8FA7D6DC-A098-4991-96B1-5A6AA6064A0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8FA7D6DC-A098-4991-96B1-5A6AA6064A0C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8FA7D6DC-A098-4991-96B1-5A6AA6064A0C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8FA7D6DC-A098-4991-96B1-5A6AA6064A0C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {CAEE0409-CCC3-4EA6-AB54-177FD305D42D} = {6614EF7F-23FC-4809-AFF5-1ADBF1B6422C} + {51D9518A-464D-4257-9567-3BDCFF24F3EE} = {6614EF7F-23FC-4809-AFF5-1ADBF1B6422C} + {73E7C25C-AEBC-4F4F-B8D1-0CC49D5B92DE} = {111B1B5B-A004-4C05-9A8C-E0931DADA5FB} + {4D4BED71-8904-4A74-88CD-63D002CCACD0} = {85204CF5-0C88-4BBB-9E70-D8CCED82ED3D} + {0AE44453-273B-4F0E-9901-A87891A73C1B} = {D6A9108E-553B-445E-A037-FA4F3140A279} + {D0F1936C-CF7C-4448-9F90-B9DEABE89EBB} = {D6A9108E-553B-445E-A037-FA4F3140A279} + {21224EF3-8706-4C95-8009-ADCA451B1513} = {0B6D6DEB-1D82-4C19-98F5-7CCDB5AEBACA} + {5455F8B5-6A95-42AE-9D6E-AA13D0324D9A} = {0B6D6DEB-1D82-4C19-98F5-7CCDB5AEBACA} + {0B6D6DEB-1D82-4C19-98F5-7CCDB5AEBACA} = {84DB9E5E-D290-46B3-ABB5-7E53CBDEBEC3} + {53C6C9CF-FF18-46A0-984F-F56B5963D3F1} = {9EC77498-07C2-4E35-BB08-98A192D72A58} + {DBBC7B68-FB1F-438F-B0D8-EDA8000A7D8D} = {9EC77498-07C2-4E35-BB08-98A192D72A58} + {9EC77498-07C2-4E35-BB08-98A192D72A58} = {84DB9E5E-D290-46B3-ABB5-7E53CBDEBEC3} + {8FA7D6DC-A098-4991-96B1-5A6AA6064A0C} = {C62FCD0A-8212-4342-AE80-7E7E648A713C} + {C62FCD0A-8212-4342-AE80-7E7E648A713C} = {84DB9E5E-D290-46B3-ABB5-7E53CBDEBEC3} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A835CEDB-E9E2-49EE-8499-BD7FDD984E53} + EndGlobalSection +EndGlobal diff --git a/src/libraries/Microsoft.NETCore.Platforms/tests/AssemblyInfo.cs b/src/libraries/Microsoft.Bcl.Numerics/ref/Microsoft.Bcl.Numerics.Forwards.cs similarity index 57% rename from src/libraries/Microsoft.NETCore.Platforms/tests/AssemblyInfo.cs rename to src/libraries/Microsoft.Bcl.Numerics/ref/Microsoft.Bcl.Numerics.Forwards.cs index f5a33895866d57..641ce5525675f4 100644 --- a/src/libraries/Microsoft.NETCore.Platforms/tests/AssemblyInfo.cs +++ b/src/libraries/Microsoft.Bcl.Numerics/ref/Microsoft.Bcl.Numerics.Forwards.cs @@ -1,6 +1,4 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Xunit; - -[assembly: SkipOnPlatform(TestPlatforms.Browser, "MSBuild is not supported on Browser")] \ No newline at end of file +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.MathF))] diff --git a/src/libraries/Microsoft.Bcl.Numerics/ref/Microsoft.Bcl.Numerics.cs b/src/libraries/Microsoft.Bcl.Numerics/ref/Microsoft.Bcl.Numerics.cs new file mode 100644 index 00000000000000..d952814464f676 --- /dev/null +++ b/src/libraries/Microsoft.Bcl.Numerics/ref/Microsoft.Bcl.Numerics.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. +// ------------------------------------------------------------------------------ +// Changes to this file must follow the https://aka.ms/api-review process. +// ------------------------------------------------------------------------------ + +namespace System +{ + public static partial class MathF + { + public const float E = 2.7182817f; + public const float PI = 3.1415927f; + public static float Abs(float x) { throw null; } + public static float Acos(float x) { throw null; } + public static float Asin(float x) { throw null; } + public static float Atan(float x) { throw null; } + public static float Atan2(float y, float x) { throw null; } + public static float Ceiling(float x) { throw null; } + public static float Cos(float x) { throw null; } + public static float Cosh(float x) { throw null; } + public static float Exp(float x) { throw null; } + public static float Floor(float x) { throw null; } + public static float IEEERemainder(float x, float y) { throw null; } + public static float Log(float x) { throw null; } + public static float Log(float x, float y) { throw null; } + public static float Log10(float x) { throw null; } + public static float Max(float x, float y) { throw null; } + public static float Min(float x, float y) { throw null; } + public static float Pow(float x, float y) { throw null; } + public static float Round(float x) { throw null; } + public static float Round(float x, int digits) { throw null; } + public static float Round(float x, int digits, System.MidpointRounding mode) { throw null; } + public static float Round(float x, System.MidpointRounding mode) { throw null; } + public static int Sign(float x) { throw null; } + public static float Sin(float x) { throw null; } + public static float Sinh(float x) { throw null; } + public static float Sqrt(float x) { throw null; } + public static float Tan(float x) { throw null; } + public static float Tanh(float x) { throw null; } + public static float Truncate(float x) { throw null; } + } +} diff --git a/src/libraries/Microsoft.Bcl.Numerics/ref/Microsoft.Bcl.Numerics.csproj b/src/libraries/Microsoft.Bcl.Numerics/ref/Microsoft.Bcl.Numerics.csproj new file mode 100644 index 00000000000000..36d3ac9605c195 --- /dev/null +++ b/src/libraries/Microsoft.Bcl.Numerics/ref/Microsoft.Bcl.Numerics.csproj @@ -0,0 +1,12 @@ + + + + netstandard2.0;$(NetFrameworkMinimum);netstandard2.1 + + + + + + + + diff --git a/src/libraries/Microsoft.Bcl.Numerics/src/Microsoft.Bcl.Numerics.csproj b/src/libraries/Microsoft.Bcl.Numerics/src/Microsoft.Bcl.Numerics.csproj new file mode 100644 index 00000000000000..5d6b96dc6a29a8 --- /dev/null +++ b/src/libraries/Microsoft.Bcl.Numerics/src/Microsoft.Bcl.Numerics.csproj @@ -0,0 +1,24 @@ + + + + netstandard2.0;$(NetFrameworkMinimum);netstandard2.1 + true + true + + + Provides the System.MathF for .NET Standard 2.0 + + true + + + + + + + + + + + diff --git a/src/libraries/Microsoft.Bcl.Numerics/src/PACKAGE.md b/src/libraries/Microsoft.Bcl.Numerics/src/PACKAGE.md new file mode 100644 index 00000000000000..5ce176a315dedb --- /dev/null +++ b/src/libraries/Microsoft.Bcl.Numerics/src/PACKAGE.md @@ -0,0 +1,45 @@ +## About + +As of .NET Core 2.0 and .NET Standard 2.1, the C# language has support for math (System.MathF) functions with floats. This library provides the necessary definitions of those types to support these language features on .NET Framework and on .NET Standard 2.0. This library is not necessary nor recommended when targeting versions of .NET that include the relevant support. + +## Key Features + + + +* Enables the use of MathF on older .NET platforms + +## How to Use + + + +```C# +using System; + +internal static class Program +{ + private static async Task Main() + { + Console.WriteLine(MathF.Max(1f, 5f)); // returns 5f + } +} +``` + +## Main Types + + + +The main types provided by this library are: + +* `System.MathF` + +## Additional Documentation + + + +* [API documentation](https://learn.microsoft.com/dotnet/api/system.mathf) + +## Feedback & Contributing + + + +Microsoft.Bcl.Numerics is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). \ No newline at end of file diff --git a/src/libraries/Microsoft.Bcl.Numerics/src/System/MathF.cs b/src/libraries/Microsoft.Bcl.Numerics/src/System/MathF.cs new file mode 100644 index 00000000000000..128a3174ad0c4e --- /dev/null +++ b/src/libraries/Microsoft.Bcl.Numerics/src/System/MathF.cs @@ -0,0 +1,332 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +/*============================================================ +** +** Purpose: Some single-precision floating-point math operations +** +===========================================================*/ + +//This class contains only static members and doesn't require serialization. + +//For most of this implementation for .NET Framework we just defer to System.Math and do a cast internally from single to double. +//We do this because it safer and less likely to break people since that is what they are alrady doing. Also, adding in the +//extra pinvokes needed to not do this route would probably incur an extra overhead that would be undersired. + +//For any version of .NET Core this just forwards directly to the MathF implementation inside the runtime. + +//There are a few cases where .NET Framework handles things differently than .NET Core does. For example, it returns -0 and +0 +//when using things like Min/Max, and they count as different values from each other. This is fixed in .NET Core, but since its +//inherent in .NET Framework we decided to leave that behavior as is for this BCL. + +using System.Diagnostics.Contracts; + +namespace System +{ + /// + /// Provides constants and static methods for trigonometric, logarithmic, and other common mathematical functions. + /// + public static class MathF + { + /// + /// Represents the ratio of the circumference of a circle to its diameter, specified by the constant, p. + /// + public const float PI = 3.14159265f; + + /// + /// Represents the natural logarithmic base, specified by the constant, e. + /// + public const float E = 2.71828183f; + + private static float NegativeZero = Int32BitsToSingle(unchecked((int)0x80000000)); + + private static unsafe float Int32BitsToSingle(int value) + { + return *((float*)&value); + } + + [Pure] + private static unsafe bool IsNegative(float f) + { + return (*(uint*)(&f) & 0x80000000) == 0x80000000; + } + + /// + /// Returns the absolute value of a single-precision floating-point number. + /// + /// The number to take the absolute value of. + /// The absolute value of + public static float Abs(float x) => Math.Abs(x); + + /// + /// Returns the angle whose cosine is the specified number. + /// + /// The number to take the acos of. + /// The acos of + public static float Acos(float x) => (float)Math.Acos(x); + + /// + /// Returns the angle whose sine is the specified number. + /// + /// The number to take the asin of. + /// The asin of + public static float Asin(float x) => (float)Math.Asin(x); + + /// + /// Returns the angle whose tangent is the specified number. + /// + /// The number to take the atan of. + /// The atan of + public static float Atan(float x) => (float)Math.Atan(x); + + /// + /// Returns the angle whose tangent is the quotient of two specified numbers. + /// + /// The first number. + /// The second number. + /// The angle whose tangent is the quotient of and + public static float Atan2(float y, float x) => (float)Math.Atan2(y, x); + + /// + /// Returns the smallest integral value that is greater than or equal to the specified single-precision floating-point number. + /// + /// The number to take the ceiling of. + /// The ceiling of + public static float Ceiling(float x) => (float)Math.Ceiling(x); + + /// + /// Returns the cosine of the specified angle. + /// + /// The angle to take the cosine of. + /// The cosine of + public static float Cos(float x) => (float)Math.Cos(x); + + /// + /// Returns the hyperbolic cosine of the specified angle. + /// + /// The angle to take the hyperbolic cosine of. + /// The hyperbolic cosine of + public static float Cosh(float x) => (float)Math.Cosh(x); + + /// + /// Returns e raised to the specified power. + /// + /// The number to raise e to. + /// e raised to the power of + public static float Exp(float x) => (float)Math.Exp(x); + + /// + /// Returns the largest integral value less than or equal to the specified single-precision floating-point number. + /// + /// The number to take the floor of. + /// The floor of + public static float Floor(float x) => (float)Math.Floor(x); + + /// + /// Returns the remainder resulting from the division of a specified number by another specified number. + /// + /// The numerator + /// The denominator + /// The result of dividing by + public static float IEEERemainder(float x, float y) + { + if (float.IsNaN(x)) + { + return x; // IEEE 754-2008: NaN payload must be preserved + } + + if (float.IsNaN(y)) + { + return y; // IEEE 754-2008: NaN payload must be preserved + } + + var regularMod = x % y; + + if (float.IsNaN(regularMod)) + { + return float.NaN; + } + + if ((regularMod == 0) && IsNegative(x)) + { + return NegativeZero; + } + + var alternativeResult = (regularMod - (Abs(y) * Sign(x))); + + if (Abs(alternativeResult) == Abs(regularMod)) + { + var divisionResult = x / y; + var roundedResult = Round(divisionResult); + + if (Abs(roundedResult) > Abs(divisionResult)) + { + return alternativeResult; + } + else + { + return regularMod; + } + } + + if (Abs(alternativeResult) < Abs(regularMod)) + { + return alternativeResult; + } + else + { + return regularMod; + } + } + + /// + /// Returns the natural (base e) logarithm of a specified number. + /// + /// The number to take the natural log of. + /// The natural log of + public static float Log(float x) => (float)Math.Log(x); + + /// + /// Returns the logarithm of a specified number in a specified base. + /// + /// The number to take the log of. + /// The base of the log + /// The log of with base + public static float Log(float x, float y) + { + if (float.IsNaN(x)) + { + return x; // IEEE 754-2008: NaN payload must be preserved + } + + if (float.IsNaN(y)) + { + return y; // IEEE 754-2008: NaN payload must be preserved + } + + if (y == 1) + { + return float.NaN; + } + + if ((x != 1) && ((y == 0) || float.IsPositiveInfinity(y))) + { + return float.NaN; + } + + return Log(x) / Log(y); + } + + /// + /// Returns the base 10 logarithm of a specified number. + /// + /// The number to take the base 10 log of. + /// The base 10 log of + public static float Log10(float x) => (float)Math.Log10(x); + + /// + /// Returns the larger of two single-precision floating-point numbers. + /// + /// The first number to compare. + /// The second number to compare. + /// The larger of and + public static float Max(float x, float y) => Math.Max(x, y); + + /// + /// Returns the smaller of two single-precision floating-point numbers. + /// + /// The first number to compare. + /// The second number to compare. + /// The smaller of and + public static float Min(float x, float y) => Math.Min(x, y); + + /// + /// Returns a specified number raised to the specified power. + /// + /// The base number. + /// The specified power. + /// raised to the power of + public static float Pow(float x, float y) => (float)Math.Pow(x, y); + + /// + /// Rounds a single-precision floating-point value to the nearest integral value, and rounds midpoint values to the nearest even number. + /// + /// The number to round. + /// The rounded representation of + public static float Round(float x) => (float)Math.Round(x); + + /// + /// Rounds a single-precision floating-point value to a specified number of fractional digits, and rounds midpoint values to the nearest even number. + /// + /// The number to round. + /// How many fractional digits to keep. + /// The rounded representation of with fractional digits + public static float Round(float x, int digits) => (float)Math.Round(x, digits); + + /// + /// Rounds a single-precision floating-point value to a specified number of fractional digits using the specified rounding convention. + /// + /// The number to round. + /// How many fractional digits to keep. + /// The rounding convention to use. + /// The rounded representation of with fractional digits using rounding convention + public static float Round(float x, int digits, MidpointRounding mode) => (float)Math.Round(x, digits, mode); + + /// + /// Rounds a single-precision floating-point value to an integer using the specified rounding convention. + /// + /// The number to round. + /// The rounding convention to use. + /// The rounded representation of using rounding convention + public static float Round(float x, MidpointRounding mode) => (float)Math.Round(x, mode); + + /// + /// Returns an integer that indicates the sign of a single-precision floating-point number. + /// + /// The number check the sign of. + /// The sign of + public static int Sign(float x) => Math.Sign(x); + + /// + /// Returns the sine of the specified angle. + /// + /// The angle to take the sine of. + /// The sine of + public static float Sin(float x) => (float)Math.Sin(x); + + /// + /// Returns the hyperbolic sine of the specified angle. + /// + /// The angle to take the hyperbolic sine of. + /// The hyperbolic sine of + public static float Sinh(float x) => (float)Math.Sinh(x); + + /// + /// Returns the square root of a specified number. + /// + /// The number to take the square root of. + /// The square root of + public static float Sqrt(float x) => (float)Math.Sqrt(x); + + /// + /// Returns the tangent of the specified angle. + /// + /// The angle to take the tangent of. + /// The tangent of + public static float Tan(float x) => (float)Math.Tan(x); + + /// + /// Returns the hyperbolic tangent of the specified angle. + /// + /// The angle to take the hyperbolic tangent of. + /// The hyperbolic tangent of + public static float Tanh(float x) => (float)Math.Tanh(x); + + /// + /// Calculates the integral part of a specified single-precision floating-point number. + /// + /// The number to truncate. + /// The truncated representation of + public static float Truncate(float x) => (float)Math.Truncate(x); + } +} diff --git a/src/libraries/Microsoft.Bcl.Numerics/src/System/Microsoft.Bcl.Numerics.Forwards.cs b/src/libraries/Microsoft.Bcl.Numerics/src/System/Microsoft.Bcl.Numerics.Forwards.cs new file mode 100644 index 00000000000000..641ce5525675f4 --- /dev/null +++ b/src/libraries/Microsoft.Bcl.Numerics/src/System/Microsoft.Bcl.Numerics.Forwards.cs @@ -0,0 +1,4 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.MathF))] diff --git a/src/libraries/Microsoft.Bcl.Numerics/tests/MathF.cs b/src/libraries/Microsoft.Bcl.Numerics/tests/MathF.cs new file mode 100644 index 00000000000000..3aa148a2161564 --- /dev/null +++ b/src/libraries/Microsoft.Bcl.Numerics/tests/MathF.cs @@ -0,0 +1,1169 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Xunit; +using System.Collections.Generic; +using System.Runtime.CompilerServices; + +#pragma warning disable xUnit1025 // reporting duplicate test cases due to not distinguishing 0.0 from -0.0 + +namespace System.Tests +{ + public static class MathFTests + { + // binary32 (float) has a machine epsilon of 2^-23 (approx. 1.19e-07). However, this + // is slightly too accurate when writing tests meant to run against libm implementations + // for various platforms. 2^-21 (approx. 4.76e-07) seems to be as accurate as we can get. + // + // The tests themselves will take CrossPlatformMachineEpsilon and adjust it according to the expected result + // so that the delta used for comparison will compare the most significant digits and ignore + // any digits that are outside the single precision range (6-9 digits). + + // For example, a test with an expect result in the format of 0.xxxxxxxxx will use + // CrossPlatformMachineEpsilon for the variance, while an expected result in the format of 0.0xxxxxxxxx + // will use CrossPlatformMachineEpsilon / 10 and expected result in the format of x.xxxxxx will + // use CrossPlatformMachineEpsilon * 10. + private const float CrossPlatformMachineEpsilon = 4.76837158e-07f; + + // The existing estimate functions either have an error of no more than 1.5 * 2^-12 (approx. 3.66e-04) + // or perform one Newton-Raphson iteration which, for the currently tested values, gives an error of + // no more than approx. 1.5 * 2^-7 (approx 1.17e-02). + private const double CrossPlatformMachineEpsilonForEstimates = 1.171875e-02f; + + [Fact] + public static void E() + { + Assert.Equal(2.71828183f, MathF.E); + } + + [Fact] + public static void Pi() + { + Assert.Equal(3.14159265f, MathF.PI); + } + + [Theory] + [InlineData(float.NegativeInfinity, float.PositiveInfinity, 0.0f)] + [InlineData(-3.14159265f, 3.14159265f, CrossPlatformMachineEpsilon * 10)] // value: -(pi) expected: (pi) + [InlineData(-2.71828183f, 2.71828183f, CrossPlatformMachineEpsilon * 10)] // value: -(e) expected: (e) + [InlineData(-2.30258509f, 2.30258509f, CrossPlatformMachineEpsilon * 10)] // value: -(ln(10)) expected: (ln(10)) + [InlineData(-1.57079633f, 1.57079633f, CrossPlatformMachineEpsilon * 10)] // value: -(pi / 2) expected: (pi / 2) + [InlineData(-1.44269504f, 1.44269504f, CrossPlatformMachineEpsilon * 10)] // value: -(log2(e)) expected: (log2(e)) + [InlineData(-1.41421356f, 1.41421356f, CrossPlatformMachineEpsilon * 10)] // value: -(sqrt(2)) expected: (sqrt(2)) + [InlineData(-1.12837917f, 1.12837917f, CrossPlatformMachineEpsilon * 10)] // value: -(2 / sqrt(pi)) expected: (2 / sqrt(pi)) + [InlineData(-1.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(-0.785398163f, 0.785398163f, CrossPlatformMachineEpsilon)] // value: -(pi / 4) expected: (pi / 4) + [InlineData(-0.707106781f, 0.707106781f, CrossPlatformMachineEpsilon)] // value: -(1 / sqrt(2)) expected: (1 / sqrt(2)) + [InlineData(-0.693147181f, 0.693147181f, CrossPlatformMachineEpsilon)] // value: -(ln(2)) expected: (ln(2)) + [InlineData(-0.636619772f, 0.636619772f, CrossPlatformMachineEpsilon)] // value: -(2 / pi) expected: (2 / pi) + [InlineData(-0.434294482f, 0.434294482f, CrossPlatformMachineEpsilon)] // value: -(log10(e)) expected: (log10(e)) + [InlineData(-0.318309886f, 0.318309886f, CrossPlatformMachineEpsilon)] // value: -(1 / pi) expected: (1 / pi) + [InlineData(-0.0f, 0.0f, 0.0f)] + [InlineData(float.NaN, float.NaN, 0.0f)] + [InlineData(0.0f, 0.0f, 0.0f)] + [InlineData(0.318309886f, 0.318309886f, CrossPlatformMachineEpsilon)] // value: (1 / pi) expected: (1 / pi) + [InlineData(0.434294482f, 0.434294482f, CrossPlatformMachineEpsilon)] // value: (log10(e)) expected: (log10(e)) + [InlineData(0.636619772f, 0.636619772f, CrossPlatformMachineEpsilon)] // value: (2 / pi) expected: (2 / pi) + [InlineData(0.693147181f, 0.693147181f, CrossPlatformMachineEpsilon)] // value: (ln(2)) expected: (ln(2)) + [InlineData(0.707106781f, 0.707106781f, CrossPlatformMachineEpsilon)] // value: (1 / sqrt(2)) expected: (1 / sqrt(2)) + [InlineData(0.785398163f, 0.785398163f, CrossPlatformMachineEpsilon)] // value: (pi / 4) expected: (pi / 4) + [InlineData(1.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(1.12837917f, 1.12837917f, CrossPlatformMachineEpsilon * 10)] // value: (2 / sqrt(pi)) expected: (2 / sqrt(pi)) + [InlineData(1.41421356f, 1.41421356f, CrossPlatformMachineEpsilon * 10)] // value: (sqrt(2)) expected: (sqrt(2)) + [InlineData(1.44269504f, 1.44269504f, CrossPlatformMachineEpsilon * 10)] // value: (log2(e)) expected: (log2(e)) + [InlineData(1.57079633f, 1.57079633f, CrossPlatformMachineEpsilon * 10)] // value: (pi / 2) expected: (pi / 2) + [InlineData(2.30258509f, 2.30258509f, CrossPlatformMachineEpsilon * 10)] // value: (ln(10)) expected: (ln(10)) + [InlineData(2.71828183f, 2.71828183f, CrossPlatformMachineEpsilon * 10)] // value: (e) expected: (e) + [InlineData(3.14159265f, 3.14159265f, CrossPlatformMachineEpsilon * 10)] // value: (pi) expected: (pi) + [InlineData(float.PositiveInfinity, float.PositiveInfinity, 0.0f)] + public static void Abs(float value, float expectedResult, float allowedVariance) + { + AssertExtensions.Equal(expectedResult, MathF.Abs(value), allowedVariance); + } + + [Theory] + [InlineData(float.NegativeInfinity, float.NaN, 0.0f)] + [InlineData(-3.14159265f, float.NaN, 0.0f)] // value: -(pi) + [InlineData(-2.71828183f, float.NaN, 0.0f)] // value: -(e) + [InlineData(-1.41421356f, float.NaN, 0.0f)] // value: -(sqrt(2)) + [InlineData(-1.0f, 3.14159265f, CrossPlatformMachineEpsilon * 10)] // expected: (pi) + [InlineData(-0.911733915f, 2.71828183f, CrossPlatformMachineEpsilon * 10)] // expected: (e) + [InlineData(-0.668201510f, 2.30258509f, CrossPlatformMachineEpsilon * 10)] // expected: (ln(10)) + [InlineData(-0.0f, 1.57079633f, CrossPlatformMachineEpsilon * 10)] // expected: (pi / 2) + [InlineData(float.NaN, float.NaN, 0.0f)] + [InlineData(0.0f, 1.57079633f, CrossPlatformMachineEpsilon * 10)] // expected: (pi / 2) + [InlineData(0.127751218f, 1.44269504f, CrossPlatformMachineEpsilon * 10)] // expected: (log2(e)) + [InlineData(0.155943695f, 1.41421356f, CrossPlatformMachineEpsilon * 10)] // expected: (sqrt(2)) + [InlineData(0.428125148f, 1.12837917f, CrossPlatformMachineEpsilon * 10)] // expected: (2 / sqrt(pi)) + [InlineData(0.540302306f, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(0.707106781f, 0.785398163f, CrossPlatformMachineEpsilon)] // expected: (pi / 4), value: (1 / sqrt(2)) + [InlineData(0.760244597f, 0.707106781f, CrossPlatformMachineEpsilon)] // expected: (1 / sqrt(2)) + [InlineData(0.769238901f, 0.693147181f, CrossPlatformMachineEpsilon)] // expected: (ln(2)) + [InlineData(0.804109828f, 0.636619772f, CrossPlatformMachineEpsilon)] // expected: (2 / pi) + [InlineData(0.907167129f, 0.434294482f, CrossPlatformMachineEpsilon)] // expected: (log10(e)) + [InlineData(0.949765715f, 0.318309886f, CrossPlatformMachineEpsilon)] // expected: (1 / pi) + [InlineData(1.0f, 0.0f, 0.0f)] + [InlineData(1.41421356f, float.NaN, 0.0f)] // value: (sqrt(2)) + [InlineData(2.71828183f, float.NaN, 0.0f)] // value: (e) + [InlineData(3.14159265f, float.NaN, 0.0f)] // value: (pi) + [InlineData(float.PositiveInfinity, float.NaN, 0.0f)] + public static void Acos(float value, float expectedResult, float allowedVariance) + { + AssertExtensions.Equal(expectedResult, MathF.Acos(value), allowedVariance); + } + + [Theory] + [InlineData(float.NegativeInfinity, float.NaN, 0.0f)] + [InlineData(-3.14159265f, float.NaN, 0.0f)] // value: -(pi) + [InlineData(-2.71828183f, float.NaN, 0.0f)] // value: -(e) + [InlineData(-1.41421356f, float.NaN, 0.0f)] // value: -(sqrt(2)) + [InlineData(-1.0f, -1.57079633f, CrossPlatformMachineEpsilon * 10)] // expected: -(pi / 2) + [InlineData(-0.991806244f, -1.44269504f, CrossPlatformMachineEpsilon * 10)] // expected: -(log2(e)) + [InlineData(-0.987765946f, -1.41421356f, CrossPlatformMachineEpsilon * 10)] // expected: -(sqrt(2)) + [InlineData(-0.903719457f, -1.12837917f, CrossPlatformMachineEpsilon * 10)] // expected: -(2 / sqrt(pi)) + [InlineData(-0.841470985f, -1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(-0.743980337f, -0.839007561f, CrossPlatformMachineEpsilon)] // expected: -(pi - ln(10)) + [InlineData(-0.707106781f, -0.785398163f, CrossPlatformMachineEpsilon)] // expected: -(pi / 4), value: (1 / sqrt(2)) + [InlineData(-0.649636939f, -0.707106781f, CrossPlatformMachineEpsilon)] // expected: -(1 / sqrt(2)) + [InlineData(-0.638961276f, -0.693147181f, CrossPlatformMachineEpsilon)] // expected: -(ln(2)) + [InlineData(-0.594480769f, -0.636619772f, CrossPlatformMachineEpsilon)] // expected: -(2 / pi) + [InlineData(-0.420770483f, -0.434294482f, CrossPlatformMachineEpsilon)] // expected: -(log10(e)) + [InlineData(-0.410781291f, -0.423310825f, CrossPlatformMachineEpsilon)] // expected: -(pi - e) + [InlineData(-0.312961796f, -0.318309886f, CrossPlatformMachineEpsilon)] // expected: -(1 / pi) + [InlineData(-0.0f, -0.0f, 0.0f)] + [InlineData(float.NaN, float.NaN, 0.0f)] + [InlineData(0.0f, 0.0f, 0.0f)] + [InlineData(0.312961796f, 0.318309886f, CrossPlatformMachineEpsilon)] // expected: (1 / pi) + [InlineData(0.410781291f, 0.423310825f, CrossPlatformMachineEpsilon)] // expected: (pi - e) + [InlineData(0.420770483f, 0.434294482f, CrossPlatformMachineEpsilon)] // expected: (log10(e)) + [InlineData(0.594480769f, 0.636619772f, CrossPlatformMachineEpsilon)] // expected: (2 / pi) + [InlineData(0.638961276f, 0.693147181f, CrossPlatformMachineEpsilon)] // expected: (ln(2)) + [InlineData(0.649636939f, 0.707106781f, CrossPlatformMachineEpsilon)] // expected: (1 / sqrt(2)) + [InlineData(0.707106781f, 0.785398163f, CrossPlatformMachineEpsilon)] // expected: (pi / 4), value: (1 / sqrt(2)) + [InlineData(0.743980337f, 0.839007561f, CrossPlatformMachineEpsilon)] // expected: (pi - ln(10)) + [InlineData(0.841470985f, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(0.903719457f, 1.12837917f, CrossPlatformMachineEpsilon * 10)] // expected: (2 / sqrt(pi)) + [InlineData(0.987765946f, 1.41421356f, CrossPlatformMachineEpsilon * 10)] // expected: (sqrt(2)) + [InlineData(0.991806244f, 1.44269504f, CrossPlatformMachineEpsilon * 10)] // expected: (log2(e)) + [InlineData(1.0f, 1.57079633f, CrossPlatformMachineEpsilon * 10)] // expected: (pi / 2) + [InlineData(1.41421356f, float.NaN, 0.0f)] // value: (sqrt(2)) + [InlineData(2.71828183f, float.NaN, 0.0f)] // value: (e) + [InlineData(3.14159265f, float.NaN, 0.0f)] // value: (pi) + [InlineData(float.PositiveInfinity, float.NaN, 0.0f)] + public static void Asin(float value, float expectedResult, float allowedVariance) + { + AssertExtensions.Equal(expectedResult, MathF.Asin(value), allowedVariance); + } + + [Theory] + [InlineData(float.NegativeInfinity, -1.57079633f, CrossPlatformMachineEpsilon * 10)] // expected: -(pi / 2) + [InlineData(-7.76357567f, -1.44269504f, CrossPlatformMachineEpsilon * 10)] // expected: -(log2(e)) + [InlineData(-6.33411917f, -1.41421356f, CrossPlatformMachineEpsilon * 10)] // expected: -(sqrt(2)) + [InlineData(-2.11087684f, -1.12837917f, CrossPlatformMachineEpsilon * 10)] // expected: -(2 / sqrt(pi)) + [InlineData(-1.55740772f, -1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(-1.11340715f, -0.839007561f, CrossPlatformMachineEpsilon)] // expected: -(pi - ln(10)) + [InlineData(-1.0f, -0.785398163f, CrossPlatformMachineEpsilon)] // expected: -(pi / 4) + [InlineData(-0.854510432f, -0.707106781f, CrossPlatformMachineEpsilon)] // expected: -(1 / sqrt(2)) + [InlineData(-0.830640878f, -0.693147181f, CrossPlatformMachineEpsilon)] // expected: -(ln(2)) + [InlineData(-0.739302950f, -0.636619772f, CrossPlatformMachineEpsilon)] // expected: -(2 / pi) + [InlineData(-0.463829067f, -0.434294482f, CrossPlatformMachineEpsilon)] // expected: -(log10(e)) + [InlineData(-0.450549534f, -0.423310825f, CrossPlatformMachineEpsilon)] // expected: -(pi - e) + [InlineData(-0.329514733f, -0.318309886f, CrossPlatformMachineEpsilon)] // expected: -(1 / pi) + [InlineData(-0.0f, -0.0f, 0.0f)] + [InlineData(float.NaN, float.NaN, 0.0f)] + [InlineData(0.0f, 0.0f, 0.0f)] + [InlineData(0.329514733f, 0.318309886f, CrossPlatformMachineEpsilon)] // expected: (1 / pi) + [InlineData(0.450549534f, 0.423310825f, CrossPlatformMachineEpsilon)] // expected: (pi - e) + [InlineData(0.463829067f, 0.434294482f, CrossPlatformMachineEpsilon)] // expected: (log10(e)) + [InlineData(0.739302950f, 0.636619772f, CrossPlatformMachineEpsilon)] // expected: (2 / pi) + [InlineData(0.830640878f, 0.693147181f, CrossPlatformMachineEpsilon)] // expected: (ln(2)) + [InlineData(0.854510432f, 0.707106781f, CrossPlatformMachineEpsilon)] // expected: (1 / sqrt(2)) + [InlineData(1.0f, 0.785398163f, CrossPlatformMachineEpsilon)] // expected: (pi / 4) + [InlineData(1.11340715f, 0.839007561f, CrossPlatformMachineEpsilon)] // expected: (pi - ln(10)) + [InlineData(1.55740772f, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(2.11087684f, 1.12837917f, CrossPlatformMachineEpsilon * 10)] // expected: (2 / sqrt(pi)) + [InlineData(6.33411917f, 1.41421356f, CrossPlatformMachineEpsilon * 10)] // expected: (sqrt(2)) + [InlineData(7.76357567f, 1.44269504f, CrossPlatformMachineEpsilon * 10)] // expected: (log2(e)) + [InlineData(float.PositiveInfinity, 1.57079633f, CrossPlatformMachineEpsilon * 10)] // expected: (pi / 2) + public static void Atan(float value, float expectedResult, float allowedVariance) + { + AssertExtensions.Equal(expectedResult, MathF.Atan(value), allowedVariance); + } + + [Theory] + [InlineData(float.NegativeInfinity, -1.0f, -1.57079633f, CrossPlatformMachineEpsilon * 10)] // expected: -(pi / 2) + [InlineData(float.NegativeInfinity, -0.0f, -1.57079633f, CrossPlatformMachineEpsilon * 10)] // expected: -(pi / 2) + [InlineData(float.NegativeInfinity, float.NaN, float.NaN, 0.0f)] + [InlineData(float.NegativeInfinity, 0.0f, -1.57079633f, CrossPlatformMachineEpsilon * 10)] // expected: -(pi / 2) + [InlineData(float.NegativeInfinity, 1.0f, -1.57079633f, CrossPlatformMachineEpsilon * 10)] // expected: -(pi / 2) + [InlineData(-1.0f, -1.0f, -2.35619449f, CrossPlatformMachineEpsilon * 10)] // expected: -(3 * pi / 4) + [InlineData(-1.0f, -0.0f, -1.57079633f, CrossPlatformMachineEpsilon * 10)] // expected: -(pi / 2) + [InlineData(-1.0f, float.NaN, float.NaN, 0.0f)] + [InlineData(-1.0f, 0.0f, -1.57079633f, CrossPlatformMachineEpsilon * 10)] // expected: -(pi / 2) + [InlineData(-1.0f, 1.0f, -0.785398163f, CrossPlatformMachineEpsilon)] // expected: -(pi / 4) + [InlineData(-1.0f, float.PositiveInfinity, -0.0f, 0.0f)] + [InlineData(-0.991806244f, -0.127751218f, -1.69889761f, CrossPlatformMachineEpsilon * 10)] // expected: -(pi - log2(e)) + [InlineData(-0.991806244f, 0.127751218f, -1.44269504f, CrossPlatformMachineEpsilon * 10)] // expected: -(log2(e)) + [InlineData(-0.987765946f, -0.155943695f, -1.72737909f, CrossPlatformMachineEpsilon * 10)] // expected: -(pi - sqrt(2)) + [InlineData(-0.987765946f, 0.155943695f, -1.41421356f, CrossPlatformMachineEpsilon * 10)] // expected: -(sqrt(2)) + [InlineData(-0.903719457f, -0.428125148f, -2.01321349f, CrossPlatformMachineEpsilon * 10)] // expected: -(pi - (2 / sqrt(pi)) + [InlineData(-0.903719457f, 0.428125148f, -1.12837917f, CrossPlatformMachineEpsilon * 10)] // expected: -(2 / sqrt(pi) + [InlineData(-0.841470985f, -0.540302306f, -2.14159265f, CrossPlatformMachineEpsilon * 10)] // expected: -(pi - 1) + [InlineData(-0.841470985f, 0.540302306f, -1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(-0.743980337f, -0.668201510f, -2.30258509f, CrossPlatformMachineEpsilon * 10)] // expected: -(ln(10)) + [InlineData(-0.743980337f, 0.668201510f, -0.839007561f, CrossPlatformMachineEpsilon)] // expected: -(pi - ln(10)) + [InlineData(-0.707106781f, -0.707106781f, -2.35619449f, CrossPlatformMachineEpsilon * 10)] // expected: -(3 * pi / 4), y: -(1 / sqrt(2)) x: -(1 / sqrt(2)) + [InlineData(-0.707106781f, 0.707106781f, -0.785398163f, CrossPlatformMachineEpsilon)] // expected: -(pi / 4), y: -(1 / sqrt(2)) x: (1 / sqrt(2)) + [InlineData(-0.649636939f, -0.760244597f, -2.43448587f, CrossPlatformMachineEpsilon * 10)] // expected: -(pi - (1 / sqrt(2)) + [InlineData(-0.649636939f, 0.760244597f, -0.707106781f, CrossPlatformMachineEpsilon)] // expected: -(1 / sqrt(2)) + [InlineData(-0.638961276f, -0.769238901f, -2.44844547f, CrossPlatformMachineEpsilon * 10)] // expected: -(pi - ln(2)) + [InlineData(-0.638961276f, 0.769238901f, -0.693147181f, CrossPlatformMachineEpsilon)] // expected: -(ln(2)) + [InlineData(-0.594480769f, -0.804109828f, -2.50497288f, CrossPlatformMachineEpsilon * 10)] // expected: -(pi - (2 / pi)) + [InlineData(-0.594480769f, 0.804109828f, -0.636619772f, CrossPlatformMachineEpsilon)] // expected: -(2 / pi) + [InlineData(-0.420770483f, -0.907167129f, -2.70729817f, CrossPlatformMachineEpsilon * 10)] // expected: -(pi - log10(e)) + [InlineData(-0.420770483f, 0.907167129f, -0.434294482f, CrossPlatformMachineEpsilon)] // expected: -(log10(e)) + [InlineData(-0.410781291f, -0.911733915f, -2.71828183f, CrossPlatformMachineEpsilon * 10)] // expected: -(e) + [InlineData(-0.410781291f, 0.911733915f, -0.423310825f, CrossPlatformMachineEpsilon)] // expected: -(pi - e) + [InlineData(-0.312961796f, -0.949765715f, -2.82328277f, CrossPlatformMachineEpsilon * 10)] // expected: -(pi - (1 / pi)) + [InlineData(-0.312961796f, 0.949765715f, -0.318309886f, CrossPlatformMachineEpsilon)] // expected: -(1 / pi) + [InlineData(-0.0f, float.NegativeInfinity, -3.14159265f, CrossPlatformMachineEpsilon * 10)] // expected: -(pi) + [InlineData(-0.0f, -1.0f, -3.14159265f, CrossPlatformMachineEpsilon * 10)] // expected: -(pi) + [InlineData(-0.0f, -0.0f, -3.14159265f, CrossPlatformMachineEpsilon * 10)] // expected: -(pi) + [InlineData(-0.0f, float.NaN, float.NaN, 0.0f)] + [InlineData(-0.0f, 0.0f, -0.0f, 0.0f)] + [InlineData(-0.0f, 1.0f, -0.0f, 0.0f)] + [InlineData(-0.0f, float.PositiveInfinity, -0.0f, 0.0f)] + [InlineData(float.NaN, float.NegativeInfinity, float.NaN, 0.0f)] + [InlineData(float.NaN, -1.0f, float.NaN, 0.0f)] + [InlineData(float.NaN, -0.0f, float.NaN, 0.0f)] + [InlineData(float.NaN, float.NaN, float.NaN, 0.0f)] + [InlineData(float.NaN, 0.0f, float.NaN, 0.0f)] + [InlineData(float.NaN, 1.0f, float.NaN, 0.0f)] + [InlineData(float.NaN, float.PositiveInfinity, float.NaN, 0.0f)] + [InlineData(0.0f, float.NegativeInfinity, 3.14159265f, CrossPlatformMachineEpsilon * 10)] // expected: (pi) + [InlineData(0.0f, -1.0f, 3.14159265f, CrossPlatformMachineEpsilon * 10)] // expected: (pi) + [InlineData(0.0f, -0.0f, 3.14159265f, CrossPlatformMachineEpsilon * 10)] // expected: (pi) + [InlineData(0.0f, float.NaN, float.NaN, 0.0f)] + [InlineData(0.0f, 0.0f, 0.0f, 0.0f)] + [InlineData(0.0f, 1.0f, 0.0f, 0.0f)] + [InlineData(0.0f, float.PositiveInfinity, 0.0f, 0.0f)] + [InlineData(0.312961796f, -0.949765715f, 2.82328277f, CrossPlatformMachineEpsilon * 10)] // expected: (pi - (1 / pi)) + [InlineData(0.312961796f, 0.949765715f, 0.318309886f, CrossPlatformMachineEpsilon)] // expected: (1 / pi) + [InlineData(0.410781291f, -0.911733915f, 2.71828183f, CrossPlatformMachineEpsilon * 10)] // expected: (e) + [InlineData(0.410781291f, 0.911733915f, 0.423310825f, CrossPlatformMachineEpsilon)] // expected: (pi - e) + [InlineData(0.420770483f, -0.907167129f, 2.70729817f, CrossPlatformMachineEpsilon * 10)] // expected: (pi - log10(e)) + [InlineData(0.420770483f, 0.907167129f, 0.434294482f, CrossPlatformMachineEpsilon)] // expected: (log10(e)) + [InlineData(0.594480769f, -0.804109828f, 2.50497288f, CrossPlatformMachineEpsilon * 10)] // expected: (pi - (2 / pi)) + [InlineData(0.594480769f, 0.804109828f, 0.636619772f, CrossPlatformMachineEpsilon)] // expected: (2 / pi) + [InlineData(0.638961276f, -0.769238901f, 2.44844547f, CrossPlatformMachineEpsilon * 10)] // expected: (pi - ln(2)) + [InlineData(0.638961276f, 0.769238901f, 0.693147181f, CrossPlatformMachineEpsilon)] // expected: (ln(2)) + [InlineData(0.649636939f, -0.760244597f, 2.43448587f, CrossPlatformMachineEpsilon * 10)] // expected: (pi - (1 / sqrt(2)) + [InlineData(0.649636939f, 0.760244597f, 0.707106781f, CrossPlatformMachineEpsilon)] // expected: (1 / sqrt(2)) + [InlineData(0.707106781f, -0.707106781f, 2.35619449f, CrossPlatformMachineEpsilon * 10)] // expected: (3 * pi / 4), y: (1 / sqrt(2)) x: -(1 / sqrt(2)) + [InlineData(0.707106781f, 0.707106781f, 0.785398163f, CrossPlatformMachineEpsilon)] // expected: (pi / 4), y: (1 / sqrt(2)) x: (1 / sqrt(2)) + [InlineData(0.743980337f, -0.668201510f, 2.30258509f, CrossPlatformMachineEpsilon * 10)] // expected: (ln(10)) + [InlineData(0.743980337f, 0.668201510f, 0.839007561f, CrossPlatformMachineEpsilon)] // expected: (pi - ln(10)) + [InlineData(0.841470985f, -0.540302306f, 2.14159265f, CrossPlatformMachineEpsilon * 10)] // expected: (pi - 1) + [InlineData(0.841470985f, 0.540302306f, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(0.903719457f, -0.428125148f, 2.01321349f, CrossPlatformMachineEpsilon * 10)] // expected: (pi - (2 / sqrt(pi)) + [InlineData(0.903719457f, 0.428125148f, 1.12837917f, CrossPlatformMachineEpsilon * 10)] // expected: (2 / sqrt(pi)) + [InlineData(0.987765946f, -0.155943695f, 1.72737909f, CrossPlatformMachineEpsilon * 10)] // expected: (pi - sqrt(2)) + [InlineData(0.987765946f, 0.155943695f, 1.41421356f, CrossPlatformMachineEpsilon * 10)] // expected: (sqrt(2)) + [InlineData(0.991806244f, -0.127751218f, 1.69889761f, CrossPlatformMachineEpsilon * 10)] // expected: (pi - log2(e)) + [InlineData(0.991806244f, 0.127751218f, 1.44269504f, CrossPlatformMachineEpsilon * 10)] // expected: (log2(e)) + [InlineData(1.0f, -1.0f, 2.35619449f, CrossPlatformMachineEpsilon * 10)] // expected: (3 * pi / 4) + [InlineData(1.0f, -0.0f, 1.57079633f, CrossPlatformMachineEpsilon * 10)] // expected: (pi / 2) + [InlineData(1.0f, float.NaN, float.NaN, 0.0f)] + [InlineData(1.0f, 0.0f, 1.57079633f, CrossPlatformMachineEpsilon * 10)] // expected: (pi / 2) + [InlineData(1.0f, 1.0f, 0.785398163f, CrossPlatformMachineEpsilon)] // expected: (pi / 4) + [InlineData(1.0f, float.PositiveInfinity, 0.0f, 0.0f)] + [InlineData(float.PositiveInfinity, -1.0f, 1.57079633f, CrossPlatformMachineEpsilon * 10)] // expected: (pi / 2) + [InlineData(float.PositiveInfinity, -0.0f, 1.57079633f, CrossPlatformMachineEpsilon * 10)] // expected: (pi / 2) + [InlineData(float.PositiveInfinity, float.NaN, float.NaN, 0.0f)] + [InlineData(float.PositiveInfinity, 0.0f, 1.57079633f, CrossPlatformMachineEpsilon * 10)] // expected: (pi / 2) + [InlineData(float.PositiveInfinity, 1.0f, 1.57079633f, CrossPlatformMachineEpsilon * 10)] // expected: (pi / 2) + public static void Atan2(float y, float x, float expectedResult, float allowedVariance) + { + AssertExtensions.Equal(expectedResult, MathF.Atan2(y, x), allowedVariance); + } + + [Theory] + [InlineData(float.NegativeInfinity, float.NegativeInfinity, 0.0f)] + [InlineData(-3.14159265f, -3.0f, 0.0f)] // value: -(pi) + [InlineData(-2.71828183f, -2.0f, 0.0f)] // value: -(e) + [InlineData(-2.30258509f, -2.0f, 0.0f)] // value: -(ln(10)) + [InlineData(-1.57079633f, -1.0f, 0.0f)] // value: -(pi / 2) + [InlineData(-1.44269504f, -1.0f, 0.0f)] // value: -(log2(e)) + [InlineData(-1.41421356f, -1.0f, 0.0f)] // value: -(sqrt(2)) + [InlineData(-1.12837917f, -1.0f, 0.0f)] // value: -(2 / sqrt(pi)) + [InlineData(-1.0f, -1.0f, 0.0f)] +#if NETFRAMEWORK + [InlineData(-0.785398163f, 0.0f, 0.0f)] // value: (pi / 4) + [InlineData(-0.707106781f, 0.0f, 0.0f)] // value: (1 / sqrt(2)) + [InlineData(-0.693147181f, 0.0f, 0.0f)] // value: (ln(2)) + [InlineData(-0.636619772f, 0.0f, 0.0f)] // value: (2 / pi) + [InlineData(-0.434294482f, 0.0f, 0.0f)] // value: (log10(e)) + [InlineData(-0.318309886f, 0.0f, 0.0f)] // value: (1 / pi) + [InlineData(-0.0f, -0.0f, 0.0f)] +#else + [InlineData(-0.785398163f, -0.0f, 0.0f)] // value: (pi / 4) + [InlineData(-0.707106781f, -0.0f, 0.0f)] // value: (1 / sqrt(2)) + [InlineData(-0.693147181f, -0.0f, 0.0f)] // value: (ln(2)) + [InlineData(-0.636619772f, -0.0f, 0.0f)] // value: (2 / pi) + [InlineData(-0.434294482f, -0.0f, 0.0f)] // value: (log10(e)) + [InlineData(-0.318309886f, -0.0f, 0.0f)] // value: (1 / pi) + [InlineData(-0.0f, -0.0f, 0.0f)] +#endif + [InlineData(float.NaN, float.NaN, 0.0f)] + [InlineData(0.0f, 0.0f, 0.0f)] + [InlineData(0.318309886f, 1.0f, 0.0f)] // value: (1 / pi) + [InlineData(0.434294482f, 1.0f, 0.0f)] // value: (log10(e)) + [InlineData(0.636619772f, 1.0f, 0.0f)] // value: (2 / pi) + [InlineData(0.693147181f, 1.0f, 0.0f)] // value: (ln(2)) + [InlineData(0.707106781f, 1.0f, 0.0f)] // value: (1 / sqrt(2)) + [InlineData(0.785398163f, 1.0f, 0.0f)] // value: (pi / 4) + [InlineData(1.0f, 1.0f, 0.0f)] + [InlineData(1.12837917f, 2.0f, 0.0f)] // value: (2 / sqrt(pi)) + [InlineData(1.41421356f, 2.0f, 0.0f)] // value: (sqrt(2)) + [InlineData(1.44269504f, 2.0f, 0.0f)] // value: (log2(e)) + [InlineData(1.57079633f, 2.0f, 0.0f)] // value: (pi / 2) + [InlineData(2.30258509f, 3.0f, 0.0f)] // value: (ln(10)) + [InlineData(2.71828183f, 3.0f, 0.0f)] // value: (e) + [InlineData(3.14159265f, 4.0f, 0.0f)] // value: (pi) + [InlineData(float.PositiveInfinity, float.PositiveInfinity, 0.0f)] + public static void Ceiling(float value, float expectedResult, float allowedVariance) + { + AssertExtensions.Equal(expectedResult, MathF.Ceiling(value), allowedVariance); + } + + [Theory] + [InlineData(float.NegativeInfinity, float.NaN, 0.0f)] + [InlineData(-3.14159265f, -1.0f, CrossPlatformMachineEpsilon * 10)] // value: -(pi) + [InlineData(-2.71828183f, -0.911733918f, CrossPlatformMachineEpsilon)] // value: -(e) + [InlineData(-2.30258509f, -0.668201510f, CrossPlatformMachineEpsilon)] // value: -(ln(10)) + [InlineData(-1.57079633f, 0.0f, CrossPlatformMachineEpsilon)] // value: -(pi / 2) + [InlineData(-1.44269504f, 0.127751218f, CrossPlatformMachineEpsilon)] // value: -(log2(e)) + [InlineData(-1.41421356f, 0.155943695f, CrossPlatformMachineEpsilon)] // value: -(sqrt(2)) + [InlineData(-1.12837917f, 0.428125148f, CrossPlatformMachineEpsilon)] // value: -(2 / sqrt(pi)) + [InlineData(-1.0f, 0.540302306f, CrossPlatformMachineEpsilon)] + [InlineData(-0.785398163f, 0.707106781f, CrossPlatformMachineEpsilon)] // value: -(pi / 4), expected: (1 / sqrt(2)) + [InlineData(-0.707106781f, 0.760244597f, CrossPlatformMachineEpsilon)] // value: -(1 / sqrt(2)) + [InlineData(-0.693147181f, 0.769238901f, CrossPlatformMachineEpsilon)] // value: -(ln(2)) + [InlineData(-0.636619772f, 0.804109828f, CrossPlatformMachineEpsilon)] // value: -(2 / pi) + [InlineData(-0.434294482f, 0.907167129f, CrossPlatformMachineEpsilon)] // value: -(log10(e)) + [InlineData(-0.318309886f, 0.949765715f, CrossPlatformMachineEpsilon)] // value: -(1 / pi) + [InlineData(-0.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(float.NaN, float.NaN, 0.0f)] + [InlineData(0.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(0.318309886f, 0.949765715f, CrossPlatformMachineEpsilon)] // value: (1 / pi) + [InlineData(0.434294482f, 0.907167129f, CrossPlatformMachineEpsilon)] // value: (log10(e)) + [InlineData(0.636619772f, 0.804109828f, CrossPlatformMachineEpsilon)] // value: (2 / pi) + [InlineData(0.693147181f, 0.769238901f, CrossPlatformMachineEpsilon)] // value: (ln(2)) + [InlineData(0.707106781f, 0.760244597f, CrossPlatformMachineEpsilon)] // value: (1 / sqrt(2)) + [InlineData(0.785398163f, 0.707106781f, CrossPlatformMachineEpsilon)] // value: (pi / 4), expected: (1 / sqrt(2)) + [InlineData(1.0f, 0.540302306f, CrossPlatformMachineEpsilon)] + [InlineData(1.12837917f, 0.428125148f, CrossPlatformMachineEpsilon)] // value: (2 / sqrt(pi)) + [InlineData(1.41421356f, 0.155943695f, CrossPlatformMachineEpsilon)] // value: (sqrt(2)) + [InlineData(1.44269504f, 0.127751218f, CrossPlatformMachineEpsilon)] // value: (log2(e)) + [InlineData(1.57079633f, 0.0f, CrossPlatformMachineEpsilon)] // value: (pi / 2) + [InlineData(2.30258509f, -0.668201510f, CrossPlatformMachineEpsilon)] // value: (ln(10)) + [InlineData(2.71828183f, -0.911733918f, CrossPlatformMachineEpsilon)] // value: (e) + [InlineData(3.14159265f, -1.0f, CrossPlatformMachineEpsilon * 10)] // value: (pi) + [InlineData(float.PositiveInfinity, float.NaN, 0.0f)] + public static void Cos(float value, float expectedResult, float allowedVariance) + { + AssertExtensions.Equal(expectedResult, MathF.Cos(value), allowedVariance); + } + + [Theory] + [InlineData(float.NegativeInfinity, float.PositiveInfinity, 0.0f)] + [InlineData(-3.14159265f, 11.5919533f, CrossPlatformMachineEpsilon * 100)] // value: (pi) + [InlineData(-2.71828183f, 7.61012514f, CrossPlatformMachineEpsilon * 10)] // value: (e) + [InlineData(-2.30258509f, 5.05f, CrossPlatformMachineEpsilon * 10)] // value: (ln(10)) + [InlineData(-1.57079633f, 2.50917848f, CrossPlatformMachineEpsilon * 10)] // value: (pi / 2) + [InlineData(-1.44269504f, 2.23418810f, CrossPlatformMachineEpsilon * 10)] // value: (log2(e)) + [InlineData(-1.41421356f, 2.17818356f, CrossPlatformMachineEpsilon * 10)] // value: (sqrt(2)) + [InlineData(-1.12837917f, 1.70710014f, CrossPlatformMachineEpsilon * 10)] // value: (2 / sqrt(pi)) + [InlineData(-1.0f, 1.54308063f, CrossPlatformMachineEpsilon * 10)] + [InlineData(-0.785398163f, 1.32460909f, CrossPlatformMachineEpsilon * 10)] // value: (pi / 4) + [InlineData(-0.707106781f, 1.26059184f, CrossPlatformMachineEpsilon * 10)] // value: (1 / sqrt(2)) + [InlineData(-0.693147181f, 1.25f, CrossPlatformMachineEpsilon * 10)] // value: (ln(2)) + [InlineData(-0.636619772f, 1.20957949f, CrossPlatformMachineEpsilon * 10)] // value: (2 / pi) + [InlineData(-0.434294482f, 1.09579746f, CrossPlatformMachineEpsilon * 10)] // value: (log10(e)) + [InlineData(-0.318309886f, 1.05108979f, CrossPlatformMachineEpsilon * 10)] // value: (1 / pi) + [InlineData(-0.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(float.NaN, float.NaN, 0.0f)] + [InlineData(0.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(0.318309886f, 1.05108979f, CrossPlatformMachineEpsilon * 10)] // value: (1 / pi) + [InlineData(0.434294482f, 1.09579746f, CrossPlatformMachineEpsilon * 10)] // value: (log10(e)) + [InlineData(0.636619772f, 1.20957949f, CrossPlatformMachineEpsilon * 10)] // value: (2 / pi) + [InlineData(0.693147181f, 1.25f, CrossPlatformMachineEpsilon * 10)] // value: (ln(2)) + [InlineData(0.707106781f, 1.26059184f, CrossPlatformMachineEpsilon * 10)] // value: (1 / sqrt(2)) + [InlineData(0.785398163f, 1.32460909f, CrossPlatformMachineEpsilon * 10)] // value: (pi / 4) + [InlineData(1.0f, 1.54308063f, CrossPlatformMachineEpsilon * 10)] + [InlineData(1.12837917f, 1.70710014f, CrossPlatformMachineEpsilon * 10)] // value: (2 / sqrt(pi)) + [InlineData(1.41421356f, 2.17818356f, CrossPlatformMachineEpsilon * 10)] // value: (sqrt(2)) + [InlineData(1.44269504f, 2.23418810f, CrossPlatformMachineEpsilon * 10)] // value: (log2(e)) + [InlineData(1.57079633f, 2.50917848f, CrossPlatformMachineEpsilon * 10)] // value: (pi / 2) + [InlineData(2.30258509f, 5.05f, CrossPlatformMachineEpsilon * 10)] // value: (ln(10)) + [InlineData(2.71828183f, 7.61012514f, CrossPlatformMachineEpsilon * 10)] // value: (e) + [InlineData(3.14159265f, 11.5919533f, CrossPlatformMachineEpsilon * 100)] // value: (pi) + [InlineData(float.PositiveInfinity, float.PositiveInfinity, 0.0f)] + public static void Cosh(float value, float expectedResult, float allowedVariance) + { + AssertExtensions.Equal(expectedResult, MathF.Cosh(value), allowedVariance); + } + + [Theory] + [InlineData(float.NegativeInfinity, 0.0f, CrossPlatformMachineEpsilon)] + [InlineData(-3.14159265f, 0.0432139183f, CrossPlatformMachineEpsilon / 10)] // value: -(pi) + [InlineData(-2.71828183f, 0.0659880358f, CrossPlatformMachineEpsilon / 10)] // value: -(e) + [InlineData(-2.30258509f, 0.1f, CrossPlatformMachineEpsilon)] // value: -(ln(10)) + [InlineData(-1.57079633f, 0.207879576f, CrossPlatformMachineEpsilon)] // value: -(pi / 2) + [InlineData(-1.44269504f, 0.236290088f, CrossPlatformMachineEpsilon)] // value: -(log2(e)) + [InlineData(-1.41421356f, 0.243116734f, CrossPlatformMachineEpsilon)] // value: -(sqrt(2)) + [InlineData(-1.12837917f, 0.323557264f, CrossPlatformMachineEpsilon)] // value: -(2 / sqrt(pi)) + [InlineData(-1.0f, 0.367879441f, CrossPlatformMachineEpsilon)] + [InlineData(-0.785398163f, 0.455938128f, CrossPlatformMachineEpsilon)] // value: -(pi / 4) + [InlineData(-0.707106781f, 0.493068691f, CrossPlatformMachineEpsilon)] // value: -(1 / sqrt(2)) + [InlineData(-0.693147181f, 0.5f, CrossPlatformMachineEpsilon)] // value: -(ln(2)) + [InlineData(-0.636619772f, 0.529077808f, CrossPlatformMachineEpsilon)] // value: -(2 / pi) + [InlineData(-0.434294482f, 0.647721485f, CrossPlatformMachineEpsilon)] // value: -(log10(e)) + [InlineData(-0.318309886f, 0.727377349f, CrossPlatformMachineEpsilon)] // value: -(1 / pi) + [InlineData(-0.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(float.NaN, float.NaN, 0.0f)] + [InlineData(0.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(0.318309886f, 1.37480223f, CrossPlatformMachineEpsilon * 10)] // value: (1 / pi) + [InlineData(0.434294482f, 1.54387344f, CrossPlatformMachineEpsilon * 10)] // value: (log10(e)) + [InlineData(0.636619772f, 1.89008116f, CrossPlatformMachineEpsilon * 10)] // value: (2 / pi) + [InlineData(0.693147181f, 2.0f, CrossPlatformMachineEpsilon * 10)] // value: (ln(2)) + [InlineData(0.707106781f, 2.02811498f, CrossPlatformMachineEpsilon * 10)] // value: (1 / sqrt(2)) + [InlineData(0.785398163f, 2.19328005f, CrossPlatformMachineEpsilon * 10)] // value: (pi / 4) + [InlineData(1.0f, 2.71828183f, CrossPlatformMachineEpsilon * 10)] // expected: (e) + [InlineData(1.12837917f, 3.09064302f, CrossPlatformMachineEpsilon * 10)] // value: (2 / sqrt(pi)) + [InlineData(1.41421356f, 4.11325038f, CrossPlatformMachineEpsilon * 10)] // value: (sqrt(2)) + [InlineData(1.44269504f, 4.23208611f, CrossPlatformMachineEpsilon * 10)] // value: (log2(e)) + [InlineData(1.57079633f, 4.81047738f, CrossPlatformMachineEpsilon * 10)] // value: (pi / 2) + [InlineData(2.30258509f, 10.0f, CrossPlatformMachineEpsilon * 100)] // value: (ln(10)) + [InlineData(2.71828183f, 15.1542622f, CrossPlatformMachineEpsilon * 100)] // value: (e) + [InlineData(3.14159265f, 23.1406926f, CrossPlatformMachineEpsilon * 100)] // value: (pi) + [InlineData(float.PositiveInfinity, float.PositiveInfinity, 0.0f)] + public static void Exp(float value, float expectedResult, float allowedVariance) + { + AssertExtensions.Equal(expectedResult, MathF.Exp(value), allowedVariance); + } + + [Theory] + [InlineData(float.NegativeInfinity, float.NegativeInfinity, 0.0f)] + [InlineData(-3.14159265f, -4.0f, 0.0f)] // value: -(pi) + [InlineData(-2.71828183f, -3.0f, 0.0f)] // value: -(e) + [InlineData(-2.30258509f, -3.0f, 0.0f)] // value: -(ln(10)) + [InlineData(-1.57079633f, -2.0f, 0.0f)] // value: -(pi / 2) + [InlineData(-1.44269504f, -2.0f, 0.0f)] // value: -(log2(e)) + [InlineData(-1.41421356f, -2.0f, 0.0f)] // value: -(sqrt(2)) + [InlineData(-1.12837917f, -2.0f, 0.0f)] // value: -(2 / sqrt(pi)) + [InlineData(-1.0f, -1.0f, 0.0f)] + [InlineData(-0.785398163f, -1.0f, 0.0f)] // value: -(pi / 4) + [InlineData(-0.707106781f, -1.0f, 0.0f)] // value: -(1 / sqrt(2)) + [InlineData(-0.693147181f, -1.0f, 0.0f)] // value: -(ln(2)) + [InlineData(-0.636619772f, -1.0f, 0.0f)] // value: -(2 / pi) + [InlineData(-0.434294482f, -1.0f, 0.0f)] // value: -(log10(e)) + [InlineData(-0.318309886f, -1.0f, 0.0f)] // value: -(1 / pi) + [InlineData(-0.0f, -0.0f, 0.0f)] + [InlineData(float.NaN, float.NaN, 0.0f)] + [InlineData(0.0f, 0.0f, 0.0f)] + [InlineData(0.318309886f, 0.0f, 0.0f)] // value: (1 / pi) + [InlineData(0.434294482f, 0.0f, 0.0f)] // value: (log10(e)) + [InlineData(0.636619772f, 0.0f, 0.0f)] // value: (2 / pi) + [InlineData(0.693147181f, 0.0f, 0.0f)] // value: (ln(2)) + [InlineData(0.707106781f, 0.0f, 0.0f)] // value: (1 / sqrt(2)) + [InlineData(0.785398163f, 0.0f, 0.0f)] // value: (pi / 4) + [InlineData(1.0f, 1.0f, 0.0f)] + [InlineData(1.12837917f, 1.0f, 0.0f)] // value: (2 / sqrt(pi)) + [InlineData(1.41421356f, 1.0f, 0.0f)] // value: (sqrt(2)) + [InlineData(1.44269504f, 1.0f, 0.0f)] // value: (log2(e)) + [InlineData(1.57079633f, 1.0f, 0.0f)] // value: (pi / 2) + [InlineData(2.30258509f, 2.0f, 0.0f)] // value: (ln(10)) + [InlineData(2.71828183f, 2.0f, 0.0f)] // value: (e) + [InlineData(3.14159265f, 3.0f, 0.0f)] // value: (pi) + [InlineData(float.PositiveInfinity, float.PositiveInfinity, 0.0f)] + public static void Floor(float value, float expectedResult, float allowedVariance) + { + AssertExtensions.Equal(expectedResult, MathF.Floor(value), allowedVariance); + } + + [Fact] + public static void IEEERemainder() + { + Assert.Equal(-1.0f, MathF.IEEERemainder(3.0f, 2.0f)); + Assert.Equal(0.0f, MathF.IEEERemainder(4.0f, 2.0f)); + Assert.Equal(1.0f, MathF.IEEERemainder(10.0f, 3.0f)); + Assert.Equal(-1.0f, MathF.IEEERemainder(11.0f, 3.0f)); + Assert.Equal(-2.0f, MathF.IEEERemainder(28.0f, 5.0f)); + AssertExtensions.Equal(1.8f, MathF.IEEERemainder(17.8f, 4.0f), CrossPlatformMachineEpsilon * 10); + AssertExtensions.Equal(1.4f, MathF.IEEERemainder(17.8f, 4.1f), CrossPlatformMachineEpsilon * 10); + AssertExtensions.Equal(0.1000004f, MathF.IEEERemainder(-16.3f, 4.1f), CrossPlatformMachineEpsilon / 10); + AssertExtensions.Equal(1.4f, MathF.IEEERemainder(17.8f, -4.1f), CrossPlatformMachineEpsilon * 10); + AssertExtensions.Equal(-1.4f, MathF.IEEERemainder(-17.8f, -4.1f), CrossPlatformMachineEpsilon * 10); + } + + [Theory] + [InlineData(float.NegativeInfinity, float.NaN, 0.0f)] + [InlineData(-3.14159265f, float.NaN, 0.0f)] // value: -(pi) + [InlineData(-2.71828183f, float.NaN, 0.0f)] // value: -(e) + [InlineData(-1.41421356f, float.NaN, 0.0f)] // value: -(sqrt(2)) + [InlineData(-1.0f, float.NaN, 0.0f)] + [InlineData(-0.693147181f, float.NaN, 0.0f)] // value: -(ln(2)) + [InlineData(-0.434294482f, float.NaN, 0.0f)] // value: -(log10(e)) + [InlineData(-0.0f, float.NegativeInfinity, 0.0f)] + [InlineData(float.NaN, float.NaN, 0.0f)] + [InlineData(0.0f, float.NegativeInfinity, 0.0f)] + [InlineData(0.0432139183f, -3.14159265f, CrossPlatformMachineEpsilon * 10)] // expected: -(pi) + [InlineData(0.0659880358f, -2.71828183f, CrossPlatformMachineEpsilon * 10)] // expected: -(e) + [InlineData(0.1f, -2.30258509f, CrossPlatformMachineEpsilon * 10)] // expected: -(ln(10)) + [InlineData(0.207879576f, -1.57079633f, CrossPlatformMachineEpsilon * 10)] // expected: -(pi / 2) + [InlineData(0.236290088f, -1.44269504f, CrossPlatformMachineEpsilon * 10)] // expected: -(log2(e)) + [InlineData(0.243116734f, -1.41421356f, CrossPlatformMachineEpsilon * 10)] // expected: -(sqrt(2)) + [InlineData(0.323557264f, -1.12837917f, CrossPlatformMachineEpsilon * 10)] // expected: -(2 / sqrt(pi)) + [InlineData(0.367879441f, -1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(0.455938128f, -0.785398163f, CrossPlatformMachineEpsilon)] // expected: -(pi / 4) + [InlineData(0.493068691f, -0.707106781f, CrossPlatformMachineEpsilon)] // expected: -(1 / sqrt(2)) + [InlineData(0.5f, -0.693147181f, CrossPlatformMachineEpsilon)] // expected: -(ln(2)) + [InlineData(0.529077808f, -0.636619772f, CrossPlatformMachineEpsilon)] // expected: -(2 / pi) + [InlineData(0.647721485f, -0.434294482f, CrossPlatformMachineEpsilon)] // expected: -(log10(e)) + [InlineData(0.727377349f, -0.318309886f, CrossPlatformMachineEpsilon)] // expected: -(1 / pi) + [InlineData(1.0f, 0.0f, 0.0f)] + [InlineData(1.37480223f, 0.318309886f, CrossPlatformMachineEpsilon)] // expected: (1 / pi) + [InlineData(1.54387344f, 0.434294482f, CrossPlatformMachineEpsilon)] // expected: (log10(e)) + [InlineData(1.89008116f, 0.636619772f, CrossPlatformMachineEpsilon)] // expected: (2 / pi) + [InlineData(2.0f, 0.693147181f, CrossPlatformMachineEpsilon)] // expected: (ln(2)) + [InlineData(2.02811498f, 0.707106781f, CrossPlatformMachineEpsilon)] // expected: (1 / sqrt(2)) + [InlineData(2.19328005f, 0.785398163f, CrossPlatformMachineEpsilon)] // expected: (pi / 4) + [InlineData(2.71828183f, 1.0f, CrossPlatformMachineEpsilon * 10)] // value: (e) + [InlineData(3.09064302f, 1.12837917f, CrossPlatformMachineEpsilon * 10)] // expected: (2 / sqrt(pi)) + [InlineData(4.11325038f, 1.41421356f, CrossPlatformMachineEpsilon * 10)] // expected: (sqrt(2)) + [InlineData(4.23208611f, 1.44269504f, CrossPlatformMachineEpsilon * 10)] // expected: (log2(e)) + [InlineData(4.81047738f, 1.57079633f, CrossPlatformMachineEpsilon * 10)] // expected: (pi / 2) + [InlineData(10.0f, 2.30258509f, CrossPlatformMachineEpsilon * 10)] // expected: (ln(10)) + [InlineData(15.1542622f, 2.71828183f, CrossPlatformMachineEpsilon * 10)] // expected: (e) + [InlineData(23.1406926f, 3.14159265f, CrossPlatformMachineEpsilon * 10)] // expected: (pi) + [InlineData(float.PositiveInfinity, float.PositiveInfinity, 0.0f)] + public static void Log(float value, float expectedResult, float allowedVariance) + { + AssertExtensions.Equal(expectedResult, MathF.Log(value), allowedVariance); + } + + [Fact] + public static void LogWithBase() + { + Assert.Equal(1.0f, MathF.Log(3.0f, 3.0f)); + AssertExtensions.Equal(2.40217350f, MathF.Log(14.0f, 3.0f), CrossPlatformMachineEpsilon * 10); + Assert.Equal(float.NegativeInfinity, MathF.Log(0.0f, 3.0f)); + Assert.Equal(float.NaN, MathF.Log(-3.0f, 3.0f)); + Assert.Equal(float.NaN, MathF.Log(float.NaN, 3.0f)); + Assert.Equal(float.PositiveInfinity, MathF.Log(float.PositiveInfinity, 3.0f)); + Assert.Equal(float.NaN, MathF.Log(float.NegativeInfinity, 3.0f)); + } + + [Theory] + [InlineData(float.NegativeInfinity, float.NaN, 0.0f)] + [InlineData(-3.14159265f, float.NaN, 0.0f)] // value: -(pi) + [InlineData(-2.71828183f, float.NaN, 0.0f)] // value: -(e) + [InlineData(-1.41421356f, float.NaN, 0.0f)] // value: -(sqrt(2)) + [InlineData(-1.0f, float.NaN, 0.0f)] + [InlineData(-0.693147181f, float.NaN, 0.0f)] // value: -(ln(2)) + [InlineData(-0.434294482f, float.NaN, 0.0f)] // value: -(log10(e)) + [InlineData(-0.0f, float.NegativeInfinity, 0.0f)] + [InlineData(float.NaN, float.NaN, 0.0f)] + [InlineData(0.0f, float.NegativeInfinity, 0.0f)] + [InlineData(0.000721784159f, -3.14159265f, CrossPlatformMachineEpsilon * 10)] // expected: -(pi) + [InlineData(0.00191301410f, -2.71828183f, CrossPlatformMachineEpsilon * 10)] // expected: -(e) + [InlineData(0.00498212830f, -2.30258509f, CrossPlatformMachineEpsilon * 10)] // expected: -(ln(10)) + [InlineData(0.0268660410f, -1.57079633f, CrossPlatformMachineEpsilon * 10)] // expected: -(pi / 2) + [InlineData(0.0360831928f, -1.44269504f, CrossPlatformMachineEpsilon * 10)] // expected: -(log2(e)) + [InlineData(0.0385288847f, -1.41421356f, CrossPlatformMachineEpsilon * 10)] // expected: -(sqrt(2)) + [InlineData(0.0744082059f, -1.12837917f, CrossPlatformMachineEpsilon * 10)] // expected: -(2 / sqrt(pi)) + [InlineData(0.1f, -1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(0.163908636f, -0.785398163f, CrossPlatformMachineEpsilon)] // expected: -(pi / 4) + [InlineData(0.196287760f, -0.707106781f, CrossPlatformMachineEpsilon)] // expected: -(1 / sqrt(2)) + [InlineData(0.202699566f, -0.693147181f, CrossPlatformMachineEpsilon)] // expected: -(ln(2)) + [InlineData(0.230876765f, -0.636619772f, CrossPlatformMachineEpsilon)] // expected: -(2 / pi) + [InlineData(0.367879441f, -0.434294482f, CrossPlatformMachineEpsilon)] // expected: -(log10(e)) + [InlineData(0.480496373f, -0.318309886f, CrossPlatformMachineEpsilon)] // expected: -(1 / pi) + [InlineData(1.0f, 0.0f, 0.0f)] + [InlineData(2.08118116f, 0.318309886f, CrossPlatformMachineEpsilon)] // expected: (1 / pi) + [InlineData(2.71828183f, 0.434294482f, CrossPlatformMachineEpsilon)] // expected: (log10(e)) value: (e) + [InlineData(4.33131503f, 0.636619772f, CrossPlatformMachineEpsilon)] // expected: (2 / pi) + [InlineData(4.93340967f, 0.693147181f, CrossPlatformMachineEpsilon)] // expected: (ln(2)) + [InlineData(5.09456117f, 0.707106781f, CrossPlatformMachineEpsilon)] // expected: (1 / sqrt(2)) + [InlineData(6.10095980f, 0.785398163f, CrossPlatformMachineEpsilon)] // expected: (pi / 4) + [InlineData(10.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(13.4393779f, 1.12837917f, CrossPlatformMachineEpsilon * 10)] // expected: (2 / sqrt(pi)) + [InlineData(25.9545535f, 1.41421356f, CrossPlatformMachineEpsilon * 10)] // expected: (sqrt(2)) + [InlineData(27.7137338f, 1.44269504f, CrossPlatformMachineEpsilon * 10)] // expected: (log2(e)) + [InlineData(37.2217105f, 1.57079633f, CrossPlatformMachineEpsilon * 10)] // expected: (pi / 2) + [InlineData(200.717432f, 2.30258509f, CrossPlatformMachineEpsilon * 10)] // expected: (ln(10)) + [InlineData(522.735300f, 2.71828183f, CrossPlatformMachineEpsilon * 10)] // expected: (e) + [InlineData(1385.45573f, 3.14159265f, CrossPlatformMachineEpsilon * 10)] // expected: (pi) + [InlineData(float.PositiveInfinity, float.PositiveInfinity, 0.0f)] + public static void Log10(float value, float expectedResult, float allowedVariance) + { + AssertExtensions.Equal(expectedResult, MathF.Log10(value), allowedVariance); + } + + [Theory] + [InlineData(float.NegativeInfinity, float.PositiveInfinity, float.PositiveInfinity)] + [InlineData(float.PositiveInfinity, float.NegativeInfinity, float.PositiveInfinity)] + [InlineData(float.MinValue, float.MaxValue, float.MaxValue)] + [InlineData(float.MaxValue, float.MinValue, float.MaxValue)] + [InlineData(float.NaN, float.NaN, float.NaN)] + [InlineData(float.NaN, 1.0f, float.NaN)] + [InlineData(1.0f, float.NaN, float.NaN)] + [InlineData(float.PositiveInfinity, float.NaN, float.NaN)] + [InlineData(float.NegativeInfinity, float.NaN, float.NaN)] + [InlineData(float.NaN, float.PositiveInfinity, float.NaN)] + [InlineData(float.NaN, float.NegativeInfinity, float.NaN)] + [InlineData(-0.0f, 0.0f, 0.0f)] +#if NETFRAMEWORK + [InlineData(0.0f, -0.0f, -0.0f)] +#else + [InlineData(0.0f, -0.0f, 0.0f)] +#endif + [InlineData(2.0f, -3.0f, 2.0f)] + [InlineData(-3.0f, 2.0f, 2.0f)] + [InlineData(3.0f, -2.0f, 3.0f)] + [InlineData(-2.0f, 3.0f, 3.0f)] + public static void Max(float x, float y, float expectedResult) + { + AssertExtensions.Equal(expectedResult, MathF.Max(x, y), 0.0f); + } + + [Theory] + [InlineData(float.NegativeInfinity, float.PositiveInfinity, float.NegativeInfinity)] + [InlineData(float.PositiveInfinity, float.NegativeInfinity, float.NegativeInfinity)] + [InlineData(float.MinValue, float.MaxValue, float.MinValue)] + [InlineData(float.MaxValue, float.MinValue, float.MinValue)] + [InlineData(float.NaN, float.NaN, float.NaN)] + [InlineData(float.NaN, 1.0f, float.NaN)] + [InlineData(1.0f, float.NaN, float.NaN)] + [InlineData(float.PositiveInfinity, float.NaN, float.NaN)] + [InlineData(float.NegativeInfinity, float.NaN, float.NaN)] + [InlineData(float.NaN, float.PositiveInfinity, float.NaN)] + [InlineData(float.NaN, float.NegativeInfinity, float.NaN)] +#if NETFRAMEWORK + [InlineData(-0.0f, 0.0f, 0.0f)] +#else + [InlineData(-0.0f, 0.0f, -0.0f)] +#endif + [InlineData(0.0f, -0.0f, -0.0f)] + [InlineData(2.0f, -3.0f, -3.0f)] + [InlineData(-3.0f, 2.0f, -3.0f)] + [InlineData(3.0f, -2.0f, -2.0f)] + [InlineData(-2.0f, 3.0f, -2.0f)] + public static void Min(float x, float y, float expectedResult) + { + AssertExtensions.Equal(expectedResult, MathF.Min(x, y), 0.0f); + } + + + [Theory] + [InlineData(float.NegativeInfinity, float.NegativeInfinity, 0.0f, 0.0f)] + [InlineData(float.NegativeInfinity, -1.0f, -0.0f, 0.0f)] + [InlineData(float.NegativeInfinity, -0.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(float.NegativeInfinity, float.NaN, float.NaN, 0.0f)] + [InlineData(float.NegativeInfinity, 0.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(float.NegativeInfinity, 1.0f, float.NegativeInfinity, 0.0f)] + [InlineData(float.NegativeInfinity, float.PositiveInfinity, float.PositiveInfinity, 0.0f)] + [InlineData(-10.0f, float.NegativeInfinity, 0.0f, 0.0f)] + [InlineData(-10.0f, -1.57079633f, float.NaN, 0.0f)] // y: -(pi / 2) + [InlineData(-10.0f, -1.0f, -0.1f, CrossPlatformMachineEpsilon)] + [InlineData(-10.0f, -0.785398163f, float.NaN, 0.0f)] // y: -(pi / 4) + [InlineData(-10.0f, -0.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(-10.0f, float.NaN, float.NaN, 0.0f)] + [InlineData(-10.0f, 0.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(-10.0f, 0.785398163f, float.NaN, 0.0f)] // y: (pi / 4) + [InlineData(-10.0f, 1.0f, -10.0f, CrossPlatformMachineEpsilon * 100)] + [InlineData(-10.0f, 1.57079633f, float.NaN, 0.0f)] // y: (pi / 2) + [InlineData(-10.0f, float.PositiveInfinity, float.PositiveInfinity, 0.0f)] + [InlineData(-2.71828183f, float.NegativeInfinity, 0.0f, 0.0f)] // x: -(e) + [InlineData(-2.71828183f, -1.57079633f, float.NaN, 0.0f)] // x: -(e) y: -(pi / 2) + [InlineData(-2.71828183f, -1.0f, -0.367879441f, CrossPlatformMachineEpsilon)] // x: -(e) + [InlineData(-2.71828183f, -0.785398163f, float.NaN, 0.0f)] // x: -(e) y: -(pi / 4) + [InlineData(-2.71828183f, -0.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] // x: -(e) + [InlineData(-2.71828183f, float.NaN, float.NaN, 0.0f)] + [InlineData(-2.71828183f, 0.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] // x: -(e) + [InlineData(-2.71828183f, 0.785398163f, float.NaN, 0.0f)] // x: -(e) y: (pi / 4) + [InlineData(-2.71828183f, 1.0f, -2.71828183f, CrossPlatformMachineEpsilon * 10)] // x: -(e) expected: (e) + [InlineData(-2.71828183f, 1.57079633f, float.NaN, 0.0f)] // x: -(e) y: (pi / 2) + [InlineData(-2.71828183f, float.PositiveInfinity, float.PositiveInfinity, 0.0f)] + [InlineData(-1.0f, -1.0f, -1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(-1.0f, -0.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(-1.0f, float.NaN, float.NaN, 0.0f)] + [InlineData(-1.0f, 0.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(-1.0f, 1.0f, -1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(-0.0f, float.NegativeInfinity, float.PositiveInfinity, 0.0f)] + [InlineData(-0.0f, -3.0f, float.NegativeInfinity, 0.0f)] + [InlineData(-0.0f, -2.0f, float.PositiveInfinity, 0.0f)] + [InlineData(-0.0f, -1.57079633f, float.PositiveInfinity, 0.0f)] // y: -(pi / 2) + [InlineData(-0.0f, -1.0f, float.NegativeInfinity, 0.0f)] + [InlineData(-0.0f, -0.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(-0.0f, float.NaN, float.NaN, 0.0f)] + [InlineData(-0.0f, 0.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(-0.0f, 1.0f, -0.0f, 0.0f)] + [InlineData(-0.0f, 1.57079633f, 0.0f, 0.0f)] // y: -(pi / 2) + [InlineData(-0.0f, 2.0f, 0.0f, 0.0f)] + [InlineData(-0.0f, 3.0f, -0.0f, 0.0f)] + [InlineData(-0.0f, float.PositiveInfinity, 0.0f, 0.0f)] + [InlineData(float.NaN, float.NegativeInfinity, float.NaN, 0.0f)] + [InlineData(float.NaN, -1.0f, float.NaN, 0.0f)] + [InlineData(float.NaN, float.NaN, float.NaN, 0.0f)] + [InlineData(float.NaN, 1.0f, float.NaN, 0.0f)] + [InlineData(float.NaN, float.PositiveInfinity, float.NaN, 0.0f)] + [InlineData(0.0f, float.NegativeInfinity, float.PositiveInfinity, 0.0f)] + [InlineData(0.0f, -3.0f, float.PositiveInfinity, 0.0f)] + [InlineData(0.0f, -2.0f, float.PositiveInfinity, 0.0f)] + [InlineData(0.0f, -1.57079633f, float.PositiveInfinity, 0.0f)] // y: -(pi / 2) + [InlineData(0.0f, -1.0f, float.PositiveInfinity, 0.0f)] + [InlineData(0.0f, -0.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(0.0f, float.NaN, float.NaN, 0.0f)] + [InlineData(0.0f, 0.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(0.0f, 1.0f, 0.0f, 0.0f)] + [InlineData(0.0f, 1.57079633f, 0.0f, 0.0f)] // y: -(pi / 2) + [InlineData(0.0f, 2.0f, 0.0f, 0.0f)] + [InlineData(0.0f, 3.0f, 0.0f, 0.0f)] + [InlineData(0.0f, float.PositiveInfinity, 0.0f, 0.0f)] + [InlineData(1.0f, float.NegativeInfinity, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(1.0f, -1.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(1.0f, -0.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(1.0f, 0.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(1.0f, 1.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(1.0f, float.PositiveInfinity, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(2.71828183f, float.NegativeInfinity, 0.0f, 0.0f)] + [InlineData(2.71828183f, -3.14159265f, 0.0432139183f, CrossPlatformMachineEpsilon / 10)] // x: (e) y: -(pi) + [InlineData(2.71828183f, -2.71828183f, 0.0659880358f, CrossPlatformMachineEpsilon / 10)] // x: (e) y: -(e) + [InlineData(2.71828183f, -2.30258509f, 0.1f, CrossPlatformMachineEpsilon)] // x: (e) y: -(ln(10)) + [InlineData(2.71828183f, -1.57079633f, 0.207879576f, CrossPlatformMachineEpsilon)] // x: (e) y: -(pi / 2) + [InlineData(2.71828183f, -1.44269504f, 0.236290088f, CrossPlatformMachineEpsilon)] // x: (e) y: -(log2(e)) + [InlineData(2.71828183f, -1.41421356f, 0.243116734f, CrossPlatformMachineEpsilon)] // x: (e) y: -(sqrt(2)) + [InlineData(2.71828183f, -1.12837917f, 0.323557264f, CrossPlatformMachineEpsilon)] // x: (e) y: -(2 / sqrt(pi)) + [InlineData(2.71828183f, -1.0f, 0.367879441f, CrossPlatformMachineEpsilon)] // x: (e) + [InlineData(2.71828183f, -0.785398163f, 0.455938128f, CrossPlatformMachineEpsilon)] // x: (e) y: -(pi / 4) + [InlineData(2.71828183f, -0.707106781f, 0.493068691f, CrossPlatformMachineEpsilon)] // x: (e) y: -(1 / sqrt(2)) + [InlineData(2.71828183f, -0.693147181f, 0.5f, CrossPlatformMachineEpsilon)] // x: (e) y: -(ln(2)) + [InlineData(2.71828183f, -0.636619772f, 0.529077808f, CrossPlatformMachineEpsilon)] // x: (e) y: -(2 / pi) + [InlineData(2.71828183f, -0.434294482f, 0.647721485f, CrossPlatformMachineEpsilon)] // x: (e) y: -(log10(e)) + [InlineData(2.71828183f, -0.318309886f, 0.727377349f, CrossPlatformMachineEpsilon)] // x: (e) y: -(1 / pi) + [InlineData(2.71828183f, -0.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] // x: (e) + [InlineData(2.71828183f, float.NaN, float.NaN, 0.0f)] + [InlineData(2.71828183f, 0.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] // x: (e) + [InlineData(2.71828183f, 0.318309886f, 1.37480223f, CrossPlatformMachineEpsilon * 10)] // x: (e) y: (1 / pi) + [InlineData(2.71828183f, 0.434294482f, 1.54387344f, CrossPlatformMachineEpsilon * 10)] // x: (e) y: (log10(e)) + [InlineData(2.71828183f, 0.636619772f, 1.89008116f, CrossPlatformMachineEpsilon * 10)] // x: (e) y: (2 / pi) + [InlineData(2.71828183f, 0.693147181f, 2.0f, CrossPlatformMachineEpsilon * 10)] // x: (e) y: (ln(2)) + [InlineData(2.71828183f, 0.707106781f, 2.02811498f, CrossPlatformMachineEpsilon * 10)] // x: (e) y: (1 / sqrt(2)) + [InlineData(2.71828183f, 0.785398163f, 2.19328005f, CrossPlatformMachineEpsilon * 10)] // x: (e) y: (pi / 4) + [InlineData(2.71828183f, 1.0f, 2.71828183f, CrossPlatformMachineEpsilon * 10)] // x: (e) expected: (e) + [InlineData(2.71828183f, 1.12837917f, 3.09064302f, CrossPlatformMachineEpsilon * 10)] // x: (e) y: (2 / sqrt(pi)) + [InlineData(2.71828183f, 1.41421356f, 4.11325038f, CrossPlatformMachineEpsilon * 10)] // x: (e) y: (sqrt(2)) + [InlineData(2.71828183f, 1.44269504f, 4.23208611f, CrossPlatformMachineEpsilon * 10)] // x: (e) y: (log2(e)) + [InlineData(2.71828183f, 1.57079633f, 4.81047738f, CrossPlatformMachineEpsilon * 10)] // x: (e) y: (pi / 2) + [InlineData(2.71828183f, 2.30258509f, 10.0f, CrossPlatformMachineEpsilon * 100)] // x: (e) y: (ln(10)) + [InlineData(2.71828183f, 2.71828183f, 15.1542622f, CrossPlatformMachineEpsilon * 100)] // x: (e) y: (e) + [InlineData(2.71828183f, 3.14159265f, 23.1406926f, CrossPlatformMachineEpsilon * 100)] // x: (e) y: (pi) + [InlineData(2.71828183f, float.PositiveInfinity, float.PositiveInfinity, 0.0f)] // x: (e) + [InlineData(10.0f, float.NegativeInfinity, 0.0f, 0.0f)] + [InlineData(10.0f, -3.14159265f, 0.000721784159f, CrossPlatformMachineEpsilon / 1000)] // y: -(pi) + [InlineData(10.0f, -2.71828183f, 0.00191301410f, CrossPlatformMachineEpsilon / 100)] // y: -(e) + [InlineData(10.0f, -2.30258509f, 0.00498212830f, CrossPlatformMachineEpsilon / 100)] // y: -(ln(10)) + [InlineData(10.0f, -1.57079633f, 0.0268660410f, CrossPlatformMachineEpsilon / 10)] // y: -(pi / 2) + [InlineData(10.0f, -1.44269504f, 0.0360831928f, CrossPlatformMachineEpsilon / 10)] // y: -(log2(e)) + [InlineData(10.0f, -1.41421356f, 0.0385288847f, CrossPlatformMachineEpsilon / 10)] // y: -(sqrt(2)) + [InlineData(10.0f, -1.12837917f, 0.0744082059f, CrossPlatformMachineEpsilon / 10)] // y: -(2 / sqrt(pi)) + [InlineData(10.0f, -1.0f, 0.1f, CrossPlatformMachineEpsilon)] + [InlineData(10.0f, -0.785398163f, 0.163908636f, CrossPlatformMachineEpsilon)] // y: -(pi / 4) + [InlineData(10.0f, -0.707106781f, 0.196287760f, CrossPlatformMachineEpsilon)] // y: -(1 / sqrt(2)) + [InlineData(10.0f, -0.693147181f, 0.202699566f, CrossPlatformMachineEpsilon)] // y: -(ln(2)) + [InlineData(10.0f, -0.636619772f, 0.230876765f, CrossPlatformMachineEpsilon)] // y: -(2 / pi) + [InlineData(10.0f, -0.434294482f, 0.367879441f, CrossPlatformMachineEpsilon)] // y: -(log10(e)) + [InlineData(10.0f, -0.318309886f, 0.480496373f, CrossPlatformMachineEpsilon)] // y: -(1 / pi) + [InlineData(10.0f, -0.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(10.0f, float.NaN, float.NaN, 0.0f)] + [InlineData(10.0f, 0.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(10.0f, 0.318309886f, 2.08118116f, CrossPlatformMachineEpsilon * 10)] // y: (1 / pi) + [InlineData(10.0f, 0.434294482f, 2.71828183f, CrossPlatformMachineEpsilon * 10)] // y: (log10(e)) expected: (e) + [InlineData(10.0f, 0.636619772f, 4.33131503f, CrossPlatformMachineEpsilon * 10)] // y: (2 / pi) + [InlineData(10.0f, 0.693147181f, 4.93340967f, CrossPlatformMachineEpsilon * 10)] // y: (ln(2)) + [InlineData(10.0f, 0.707106781f, 5.09456117f, CrossPlatformMachineEpsilon * 10)] // y: (1 / sqrt(2)) + [InlineData(10.0f, 0.785398163f, 6.10095980f, CrossPlatformMachineEpsilon * 10)] // y: (pi / 4) + [InlineData(10.0f, 1.0f, 10.0f, CrossPlatformMachineEpsilon * 100)] + [InlineData(10.0f, 1.12837917f, 13.4393779f, CrossPlatformMachineEpsilon * 100)] // y: (2 / sqrt(pi)) + [InlineData(10.0f, 1.41421356f, 25.9545535f, CrossPlatformMachineEpsilon * 100)] // y: (sqrt(2)) + [InlineData(10.0f, 1.44269504f, 27.7137338f, CrossPlatformMachineEpsilon * 100)] // y: (log2(e)) + [InlineData(10.0f, 1.57079633f, 37.2217105f, CrossPlatformMachineEpsilon * 100)] // y: (pi / 2) + [InlineData(10.0f, 2.30258509f, 200.717432f, CrossPlatformMachineEpsilon * 1000)] // y: (ln(10)) + [InlineData(10.0f, 2.71828183f, 522.735300f, CrossPlatformMachineEpsilon * 1000)] // y: (e) + [InlineData(10.0f, 3.14159265f, 1385.45573f, CrossPlatformMachineEpsilon * 10000)] // y: (pi) + [InlineData(10.0f, float.PositiveInfinity, float.PositiveInfinity, 0.0f)] + [InlineData(float.PositiveInfinity, float.NegativeInfinity, 0.0f, 0.0f)] + [InlineData(float.PositiveInfinity, -1.0f, 0.0f, 0.0f)] + [InlineData(float.PositiveInfinity, -0.0f, 1.0f, 0.0f)] + [InlineData(float.PositiveInfinity, float.NaN, float.NaN, 0.0f)] + [InlineData(float.PositiveInfinity, 0.0f, 1.0f, 0.0f)] + [InlineData(float.PositiveInfinity, 1.0f, float.PositiveInfinity, 0.0f)] + [InlineData(float.PositiveInfinity, float.PositiveInfinity, float.PositiveInfinity, 0.0f)] + public static void Pow(float x, float y, float expectedResult, float allowedVariance) + { + AssertExtensions.Equal(expectedResult, MathF.Pow(x, y), allowedVariance); + } + + public static IEnumerable Round_Digits_TestData + { + get + { + yield return new object[] { float.NaN, float.NaN, 3, MidpointRounding.ToEven }; + yield return new object[] { float.PositiveInfinity, float.PositiveInfinity, 3, MidpointRounding.ToEven }; + yield return new object[] { float.NegativeInfinity, float.NegativeInfinity, 3, MidpointRounding.ToEven }; + yield return new object[] { 0, 0, 3, MidpointRounding.ToEven }; + yield return new object[] { 3.42156f, 3.422f, 3, MidpointRounding.ToEven }; + yield return new object[] { -3.42156f, -3.422f, 3, MidpointRounding.ToEven }; + + yield return new object[] { float.NaN, float.NaN, 3, MidpointRounding.AwayFromZero }; + yield return new object[] { float.PositiveInfinity, float.PositiveInfinity, 3, MidpointRounding.AwayFromZero }; + yield return new object[] { float.NegativeInfinity, float.NegativeInfinity, 3, MidpointRounding.AwayFromZero }; + yield return new object[] { 0, 0, 3, MidpointRounding.AwayFromZero }; + yield return new object[] { 3.42156f, 3.422f, 3, MidpointRounding.AwayFromZero }; + yield return new object[] { -3.42156f, -3.422f, 3, MidpointRounding.AwayFromZero }; + } + } + + [Fact] + public static void Round() + { + Assert.Equal(0.0f, MathF.Round(0.0f)); + Assert.Equal(1.0f, MathF.Round(1.4f)); + Assert.Equal(2.0f, MathF.Round(1.5f)); + Assert.Equal(2e7f, MathF.Round(2e7f)); + Assert.Equal(0.0f, MathF.Round(-0.0f)); + Assert.Equal(-1.0f, MathF.Round(-1.4f)); + Assert.Equal(-2.0f, MathF.Round(-1.5f)); + Assert.Equal(-2e7f, MathF.Round(-2e7f)); + } + + [Theory] + [InlineData(MidpointRounding.ToEven)] + [InlineData(MidpointRounding.AwayFromZero)] + public static void Round_Digits_ByMidpointRounding(MidpointRounding mode) + { + Assert.Equal(float.PositiveInfinity, MathF.Round(float.PositiveInfinity, 3, mode)); + Assert.Equal(float.NegativeInfinity, MathF.Round(float.NegativeInfinity, 3, mode)); + } + + [Theory] + [MemberData(nameof(Round_Digits_TestData))] + public static void Round_Digits(float x, float expected, int digits, MidpointRounding mode) + { + AssertExtensions.Equal(expected, MathF.Round(x, digits, mode), CrossPlatformMachineEpsilon * 10); + } + + [Fact] + public static void Sign() + { + Assert.Equal(0, MathF.Sign(0.0f)); + Assert.Equal(0, MathF.Sign(-0.0f)); + Assert.Equal(-1, MathF.Sign(-3.14f)); + Assert.Equal(1, MathF.Sign(3.14f)); + Assert.Equal(-1, MathF.Sign(float.NegativeInfinity)); + Assert.Equal(1, MathF.Sign(float.PositiveInfinity)); + Assert.Throws(() => MathF.Sign(float.NaN)); + } + + [Theory] + [InlineData(float.NegativeInfinity, float.NaN, 0.0f)] + [InlineData(-3.14159265f, -0.0f, CrossPlatformMachineEpsilon)] // value: -(pi) + [InlineData(-2.71828183f, -0.410781291f, CrossPlatformMachineEpsilon)] // value: -(e) + [InlineData(-2.30258509f, -0.743980337f, CrossPlatformMachineEpsilon)] // value: -(ln(10)) + [InlineData(-1.57079633f, -1.0f, CrossPlatformMachineEpsilon * 10)] // value: -(pi / 2) + [InlineData(-1.44269504f, -0.991806244f, CrossPlatformMachineEpsilon)] // value: -(log2(e)) + [InlineData(-1.41421356f, -0.987765946f, CrossPlatformMachineEpsilon)] // value: -(sqrt(2)) + [InlineData(-1.12837917f, -0.903719457f, CrossPlatformMachineEpsilon)] // value: -(2 / sqrt(pi)) + [InlineData(-1.0f, -0.841470985f, CrossPlatformMachineEpsilon)] + [InlineData(-0.785398163f, -0.707106781f, CrossPlatformMachineEpsilon)] // value: -(pi / 4), expected: -(1 / sqrt(2)) + [InlineData(-0.707106781f, -0.649636939f, CrossPlatformMachineEpsilon)] // value: -(1 / sqrt(2)) + [InlineData(-0.693147181f, -0.638961276f, CrossPlatformMachineEpsilon)] // value: -(ln(2)) + [InlineData(-0.636619772f, -0.594480769f, CrossPlatformMachineEpsilon)] // value: -(2 / pi) + [InlineData(-0.434294482f, -0.420770483f, CrossPlatformMachineEpsilon)] // value: -(log10(e)) + [InlineData(-0.318309886f, -0.312961796f, CrossPlatformMachineEpsilon)] // value: -(1 / pi) + [InlineData(-0.0f, -0.0f, 0.0f)] + [InlineData(float.NaN, float.NaN, 0.0f)] + [InlineData(0.0f, 0.0f, 0.0f)] + [InlineData(0.318309886f, 0.312961796f, CrossPlatformMachineEpsilon)] // value: (1 / pi) + [InlineData(0.434294482f, 0.420770483f, CrossPlatformMachineEpsilon)] // value: (log10(e)) + [InlineData(0.636619772f, 0.594480769f, CrossPlatformMachineEpsilon)] // value: (2 / pi) + [InlineData(0.693147181f, 0.638961276f, CrossPlatformMachineEpsilon)] // value: (ln(2)) + [InlineData(0.707106781f, 0.649636939f, CrossPlatformMachineEpsilon)] // value: (1 / sqrt(2)) + [InlineData(0.785398163f, 0.707106781f, CrossPlatformMachineEpsilon)] // value: (pi / 4), expected: (1 / sqrt(2)) + [InlineData(1.0f, 0.841470985f, CrossPlatformMachineEpsilon)] + [InlineData(1.12837917f, 0.903719457f, CrossPlatformMachineEpsilon)] // value: (2 / sqrt(pi)) + [InlineData(1.41421356f, 0.987765946f, CrossPlatformMachineEpsilon)] // value: (sqrt(2)) + [InlineData(1.44269504f, 0.991806244f, CrossPlatformMachineEpsilon)] // value: (log2(e)) + [InlineData(1.57079633f, 1.0f, CrossPlatformMachineEpsilon * 10)] // value: (pi / 2) + [InlineData(2.30258509f, 0.743980337f, CrossPlatformMachineEpsilon)] // value: (ln(10)) + [InlineData(2.71828183f, 0.410781291f, CrossPlatformMachineEpsilon)] // value: (e) + [InlineData(3.14159265f, 0.0f, CrossPlatformMachineEpsilon)] // value: (pi) + [InlineData(float.PositiveInfinity, float.NaN, 0.0f)] + public static void Sin(float value, float expectedResult, float allowedVariance) + { + AssertExtensions.Equal(expectedResult, MathF.Sin(value), allowedVariance); + } + + [Theory] + [InlineData(float.NegativeInfinity, float.NegativeInfinity, 0.0f)] + [InlineData(-3.14159265f, -11.5487394f, CrossPlatformMachineEpsilon * 100)] // value: -(pi) + [InlineData(-2.71828183f, -7.54413710f, CrossPlatformMachineEpsilon * 10)] // value: -(e) + [InlineData(-2.30258509f, -4.95f, CrossPlatformMachineEpsilon * 10)] // value: -(ln(10)) + [InlineData(-1.57079633f, -2.30129890f, CrossPlatformMachineEpsilon * 10)] // value: -(pi / 2) + [InlineData(-1.44269504f, -1.99789801f, CrossPlatformMachineEpsilon * 10)] // value: -(log2(e)) + [InlineData(-1.41421356f, -1.93506682f, CrossPlatformMachineEpsilon * 10)] // value: -(sqrt(2)) + [InlineData(-1.12837917f, -1.38354288f, CrossPlatformMachineEpsilon * 10)] // value: -(2 / sqrt(pi)) + [InlineData(-1.0f, -1.17520119f, CrossPlatformMachineEpsilon * 10)] + [InlineData(-0.785398163f, -0.868670961f, CrossPlatformMachineEpsilon)] // value: -(pi / 4) + [InlineData(-0.707106781f, -0.767523145f, CrossPlatformMachineEpsilon)] // value: -(1 / sqrt(2)) + [InlineData(-0.693147181f, -0.75f, CrossPlatformMachineEpsilon)] // value: -(ln(2)) + [InlineData(-0.636619772f, -0.680501678f, CrossPlatformMachineEpsilon)] // value: -(2 / pi) + [InlineData(-0.434294482f, -0.448075979f, CrossPlatformMachineEpsilon)] // value: -(log10(e)) + [InlineData(-0.318309886f, -0.323712439f, CrossPlatformMachineEpsilon)] // value: -(1 / pi) + [InlineData(-0.0f, -0.0f, 0.0f)] + [InlineData(float.NaN, float.NaN, 0.0f)] + [InlineData(0.0f, 0.0f, 0.0f)] + [InlineData(0.318309886f, 0.323712439f, CrossPlatformMachineEpsilon)] // value: (1 / pi) + [InlineData(0.434294482f, 0.448075979f, CrossPlatformMachineEpsilon)] // value: (log10(e)) + [InlineData(0.636619772f, 0.680501678f, CrossPlatformMachineEpsilon)] // value: (2 / pi) + [InlineData(0.693147181f, 0.75f, CrossPlatformMachineEpsilon)] // value: (ln(2)) + [InlineData(0.707106781f, 0.767523145f, CrossPlatformMachineEpsilon)] // value: (1 / sqrt(2)) + [InlineData(0.785398163f, 0.868670961f, CrossPlatformMachineEpsilon)] // value: (pi / 4) + [InlineData(1.0f, 1.17520119f, CrossPlatformMachineEpsilon * 10)] + [InlineData(1.12837917f, 1.38354288f, CrossPlatformMachineEpsilon * 10)] // value: (2 / sqrt(pi)) + [InlineData(1.41421356f, 1.93506682f, CrossPlatformMachineEpsilon * 10)] // value: (sqrt(2)) + [InlineData(1.44269504f, 1.99789801f, CrossPlatformMachineEpsilon * 10)] // value: (log2(e)) + [InlineData(1.57079633f, 2.30129890f, CrossPlatformMachineEpsilon * 10)] // value: (pi / 2) + [InlineData(2.30258509f, 4.95f, CrossPlatformMachineEpsilon * 10)] // value: (ln(10)) + [InlineData(2.71828183f, 7.54413710f, CrossPlatformMachineEpsilon * 10)] // value: (e) + [InlineData(3.14159265f, 11.5487394f, CrossPlatformMachineEpsilon * 100)] // value: (pi) + [InlineData(float.PositiveInfinity, float.PositiveInfinity, 0.0f)] + public static void Sinh(float value, float expectedResult, float allowedVariance) + { + AssertExtensions.Equal(expectedResult, MathF.Sinh(value), allowedVariance); + } + + [Theory] + [InlineData(float.NegativeInfinity, float.NaN, 0.0f)] + [InlineData(-3.14159265f, float.NaN, 0.0f)] // value: (pi) + [InlineData(-2.71828183f, float.NaN, 0.0f)] // value: (e) + [InlineData(-2.30258509f, float.NaN, 0.0f)] // value: (ln(10)) + [InlineData(-1.57079633f, float.NaN, 0.0f)] // value: (pi / 2) + [InlineData(-1.44269504f, float.NaN, 0.0f)] // value: (log2(e)) + [InlineData(-1.41421356f, float.NaN, 0.0f)] // value: (sqrt(2)) + [InlineData(-1.12837917f, float.NaN, 0.0f)] // value: (2 / sqrt(pi)) + [InlineData(-1.0f, float.NaN, 0.0f)] + [InlineData(-0.785398163f, float.NaN, 0.0f)] // value: (pi / 4) + [InlineData(-0.707106781f, float.NaN, 0.0f)] // value: (1 / sqrt(2)) + [InlineData(-0.693147181f, float.NaN, 0.0f)] // value: (ln(2)) + [InlineData(-0.636619772f, float.NaN, 0.0f)] // value: (2 / pi) + [InlineData(-0.434294482f, float.NaN, 0.0f)] // value: (log10(e)) + [InlineData(-0.318309886f, float.NaN, 0.0f)] // value: (1 / pi) + [InlineData(-0.0f, -0.0f, 0.0f)] + [InlineData(float.NaN, float.NaN, 0.0f)] + [InlineData(0.0f, 0.0f, 0.0f)] + [InlineData(0.318309886f, 0.564189584f, CrossPlatformMachineEpsilon)] // value: (1 / pi) + [InlineData(0.434294482f, 0.659010229f, CrossPlatformMachineEpsilon)] // value: (log10(e)) + [InlineData(0.636619772f, 0.797884561f, CrossPlatformMachineEpsilon)] // value: (2 / pi) + [InlineData(0.693147181f, 0.832554611f, CrossPlatformMachineEpsilon)] // value: (ln(2)) + [InlineData(0.707106781f, 0.840896415f, CrossPlatformMachineEpsilon)] // value: (1 / sqrt(2)) + [InlineData(0.785398163f, 0.886226925f, CrossPlatformMachineEpsilon)] // value: (pi / 4) + [InlineData(1.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(1.12837917f, 1.06225193f, CrossPlatformMachineEpsilon * 10)] // value: (2 / sqrt(pi)) + [InlineData(1.41421356f, 1.18920712f, CrossPlatformMachineEpsilon * 10)] // value: (sqrt(2)) + [InlineData(1.44269504f, 1.20112241f, CrossPlatformMachineEpsilon * 10)] // value: (log2(e)) + [InlineData(1.57079633f, 1.25331414f, CrossPlatformMachineEpsilon * 10)] // value: (pi / 2) + [InlineData(2.30258509f, 1.51742713f, CrossPlatformMachineEpsilon * 10)] // value: (ln(10)) + [InlineData(2.71828183f, 1.64872127f, CrossPlatformMachineEpsilon * 10)] // value: (e) + [InlineData(3.14159265f, 1.77245385F, CrossPlatformMachineEpsilon * 10)] // value: (pi) + [InlineData(float.PositiveInfinity, float.PositiveInfinity, 0.0f)] + public static void Sqrt(float value, float expectedResult, float allowedVariance) + { + AssertExtensions.Equal(expectedResult, MathF.Sqrt(value), allowedVariance); + } + + [Theory] + [InlineData(float.NegativeInfinity, float.NaN, 0.0f)] + [InlineData(-3.14159265f, -0.0f, CrossPlatformMachineEpsilon)] // value: -(pi) + [InlineData(-2.71828183f, 0.450549534f, CrossPlatformMachineEpsilon)] // value: -(e) + [InlineData(-2.30258509f, 1.11340715f, CrossPlatformMachineEpsilon * 10)] // value: -(ln(10)) + [InlineData(-1.57079633f, 22877332.0f, 10.0f)] // value: -(pi / 2) + [InlineData(-1.44269504f, -7.76357567f, CrossPlatformMachineEpsilon * 10)] // value: -(log2(e)) + [InlineData(-1.41421356f, -6.33411917f, CrossPlatformMachineEpsilon * 10)] // value: -(sqrt(2)) + [InlineData(-1.12837917f, -2.11087684f, CrossPlatformMachineEpsilon * 10)] // value: -(2 / sqrt(pi)) + [InlineData(-1.0f, -1.55740772f, CrossPlatformMachineEpsilon * 10)] + [InlineData(-0.785398163f, -1.0f, CrossPlatformMachineEpsilon * 10)] // value: -(pi / 4) + [InlineData(-0.707106781f, -0.854510432f, CrossPlatformMachineEpsilon)] // value: -(1 / sqrt(2)) + [InlineData(-0.693147181f, -0.830640878f, CrossPlatformMachineEpsilon)] // value: -(ln(2)) + [InlineData(-0.636619772f, -0.739302950f, CrossPlatformMachineEpsilon)] // value: -(2 / pi) + [InlineData(-0.434294482f, -0.463829067f, CrossPlatformMachineEpsilon)] // value: -(log10(e)) + [InlineData(-0.318309886f, -0.329514733f, CrossPlatformMachineEpsilon)] // value: -(1 / pi) + [InlineData(-0.0f, -0.0f, 0.0f)] + [InlineData(float.NaN, float.NaN, 0.0f)] + [InlineData(0.0f, 0.0f, 0.0f)] + [InlineData(0.318309886f, 0.329514733f, CrossPlatformMachineEpsilon)] // value: (1 / pi) + [InlineData(0.434294482f, 0.463829067f, CrossPlatformMachineEpsilon)] // value: (log10(e)) + [InlineData(0.636619772f, 0.739302950f, CrossPlatformMachineEpsilon)] // value: (2 / pi) + [InlineData(0.693147181f, 0.830640878f, CrossPlatformMachineEpsilon)] // value: (ln(2)) + [InlineData(0.707106781f, 0.854510432f, CrossPlatformMachineEpsilon)] // value: (1 / sqrt(2)) + [InlineData(0.785398163f, 1.0f, CrossPlatformMachineEpsilon * 10)] // value: (pi / 4) + [InlineData(1.0f, 1.55740772f, CrossPlatformMachineEpsilon * 10)] + [InlineData(1.12837917f, 2.11087684f, CrossPlatformMachineEpsilon * 10)] // value: (2 / sqrt(pi)) + [InlineData(1.41421356f, 6.33411917f, CrossPlatformMachineEpsilon * 10)] // value: (sqrt(2)) + [InlineData(1.44269504f, 7.76357567f, CrossPlatformMachineEpsilon * 10)] // value: (log2(e)) + [InlineData(1.57079633f, -22877332.0f, 10.0f)] // value: (pi / 2) + [InlineData(2.30258509f, -1.11340715f, CrossPlatformMachineEpsilon * 10)] // value: (ln(10)) + [InlineData(2.71828183f, -0.450549534f, CrossPlatformMachineEpsilon)] // value: (e) + [InlineData(3.14159265f, 0.0f, CrossPlatformMachineEpsilon)] // value: (pi) + [InlineData(float.PositiveInfinity, float.NaN, 0.0f)] + public static void Tan(float value, float expectedResult, float allowedVariance) + { + AssertExtensions.Equal(expectedResult, MathF.Tan(value), allowedVariance); + } + + [Theory] + [InlineData(float.NegativeInfinity, -1.0f, CrossPlatformMachineEpsilon * 10)] + [InlineData(-3.14159265f, -0.996272076f, CrossPlatformMachineEpsilon)] // value: -(pi) + [InlineData(-2.71828183f, -0.991328916f, CrossPlatformMachineEpsilon)] // value: -(e) + [InlineData(-2.30258509f, -0.980198020f, CrossPlatformMachineEpsilon)] // value: -(ln(10)) + [InlineData(-1.57079633f, -0.917152336f, CrossPlatformMachineEpsilon)] // value: -(pi / 2) + [InlineData(-1.44269504f, -0.894238946f, CrossPlatformMachineEpsilon)] // value: -(log2(e)) + [InlineData(-1.41421356f, -0.888385562f, CrossPlatformMachineEpsilon)] // value: -(sqrt(2)) + [InlineData(-1.12837917f, -0.810463806f, CrossPlatformMachineEpsilon)] // value: -(2 / sqrt(pi)) + [InlineData(-1.0f, -0.761594156f, CrossPlatformMachineEpsilon)] + [InlineData(-0.785398163f, -0.655794203f, CrossPlatformMachineEpsilon)] // value: -(pi / 4) + [InlineData(-0.707106781f, -0.608859365f, CrossPlatformMachineEpsilon)] // value: -(1 / sqrt(2)) + [InlineData(-0.693147181f, -0.6f, CrossPlatformMachineEpsilon)] // value: -(ln(2)) + [InlineData(-0.636619772f, -0.562593600f, CrossPlatformMachineEpsilon)] // value: -(2 / pi) + [InlineData(-0.434294482f, -0.408904012f, CrossPlatformMachineEpsilon)] // value: -(log10(e)) + [InlineData(-0.318309886f, -0.307977913f, CrossPlatformMachineEpsilon)] // value: -(1 / pi) + [InlineData(-0.0f, -0.0f, 0.0f)] + [InlineData(float.NaN, float.NaN, 0.0f)] + [InlineData(0.0f, 0.0f, 0.0f)] + [InlineData(0.318309886f, 0.307977913f, CrossPlatformMachineEpsilon)] // value: (1 / pi) + [InlineData(0.434294482f, 0.408904012f, CrossPlatformMachineEpsilon)] // value: (log10(e)) + [InlineData(0.636619772f, 0.562593600f, CrossPlatformMachineEpsilon)] // value: (2 / pi) + [InlineData(0.693147181f, 0.6f, CrossPlatformMachineEpsilon)] // value: (ln(2)) + [InlineData(0.707106781f, 0.608859365f, CrossPlatformMachineEpsilon)] // value: (1 / sqrt(2)) + [InlineData(0.785398163f, 0.655794203f, CrossPlatformMachineEpsilon)] // value: (pi / 4) + [InlineData(1.0f, 0.761594156f, CrossPlatformMachineEpsilon)] + [InlineData(1.12837917f, 0.810463806f, CrossPlatformMachineEpsilon)] // value: (2 / sqrt(pi)) + [InlineData(1.41421356f, 0.888385562f, CrossPlatformMachineEpsilon)] // value: (sqrt(2)) + [InlineData(1.44269504f, 0.894238946f, CrossPlatformMachineEpsilon)] // value: (log2(e)) + [InlineData(1.57079633f, 0.917152336f, CrossPlatformMachineEpsilon)] // value: (pi / 2) + [InlineData(2.30258509f, 0.980198020f, CrossPlatformMachineEpsilon)] // value: (ln(10)) + [InlineData(2.71828183f, 0.991328916f, CrossPlatformMachineEpsilon)] // value: (e) + [InlineData(3.14159265f, 0.996272076f, CrossPlatformMachineEpsilon)] // value: (pi) + [InlineData(float.PositiveInfinity, 1.0f, CrossPlatformMachineEpsilon * 10)] + public static void Tanh(float value, float expectedResult, float allowedVariance) + { + AssertExtensions.Equal(expectedResult, MathF.Tanh(value), allowedVariance); + } + + [Fact] + public static void Truncate() + { + Assert.Equal(0.0f, MathF.Truncate(0.12345f)); + Assert.Equal(3.0f, MathF.Truncate(3.14159f)); + Assert.Equal(-3.0f, MathF.Truncate(-3.14159f)); + } + + public static IEnumerable Round_ToEven_TestData() + { + yield return new object[] { 1f, 1f }; + yield return new object[] { 0.5f, 0f }; + yield return new object[] { 1.5f, 2f }; + yield return new object[] { 2.5f, 2f }; + yield return new object[] { 3.5f, 4f }; + yield return new object[] { 0.49999997f, 0f }; + yield return new object[] { 1.5f, 2f }; + yield return new object[] { 2.5f, 2f }; + yield return new object[] { 3.5f, 4f }; + yield return new object[] { 4.5f, 4f }; + yield return new object[] { 3.1415927f, 3f }; + yield return new object[] { 2.7182817f, 3f }; + yield return new object[] { 1385.4557f, 1385f }; + yield return new object[] { 3423.4343f, 3423f }; + yield return new object[] { 535345.5f, 535346f }; + yield return new object[] { 535345.5f, 535346f }; + yield return new object[] { 535345.5f, 535346f }; + yield return new object[] { 535345.4f, 535345f }; + yield return new object[] { 535345.6f, 535346f }; + yield return new object[] { -2.7182817f, -3f }; + yield return new object[] { 10f, 10f }; + yield return new object[] { -10f, -10f }; + yield return new object[] { -0f, -0f }; + yield return new object[] { 0f, 0f }; + yield return new object[] { float.NaN, float.NaN }; + yield return new object[] { float.PositiveInfinity, float.PositiveInfinity }; + yield return new object[] { float.NegativeInfinity, float.NegativeInfinity }; + yield return new object[] { 3.4028235E+38f, 3.4028235E+38f }; + yield return new object[] { -3.4028235E+38f, -3.4028235E+38f }; + } + + [Theory] + [MemberData(nameof(Round_ToEven_TestData))] + public static void Round_ToEven_0(float value, float expected) + { + // Math.Round has special fast paths when MidpointRounding is a const + // Don't replace it with a variable + Assert.Equal(expected, MathF.Round(value, MidpointRounding.ToEven)); + Assert.Equal(expected, MathF.Round(value, 0, MidpointRounding.ToEven)); + } + + public static IEnumerable Round_AwayFromZero_TestData() + { + yield return new object[] { 1f, 1f }; + yield return new object[] { 0.5f, 1f }; + yield return new object[] { 1.5f, 2f }; + yield return new object[] { 2.5f, 3f }; + yield return new object[] { 3.5f, 4f }; + yield return new object[] { 0.49999997f, 0f }; + yield return new object[] { 1.5f, 2f }; + yield return new object[] { 2.5f, 3f }; + yield return new object[] { 3.5f, 4f }; + yield return new object[] { 4.5f, 5f }; + yield return new object[] { 3.1415927f, 3f }; + yield return new object[] { 2.7182817f, 3f }; + yield return new object[] { 1385.4557f, 1385f }; + yield return new object[] { 3423.4343f, 3423f }; + yield return new object[] { 535345.5f, 535346f }; + yield return new object[] { 535345.5f, 535346f }; + yield return new object[] { 535345.5f, 535346f }; + yield return new object[] { 535345.4f, 535345f }; + yield return new object[] { 535345.6f, 535346f }; + yield return new object[] { -2.7182817f, -3f }; + yield return new object[] { 10f, 10f }; + yield return new object[] { -10f, -10f }; + yield return new object[] { -0f, -0f }; + yield return new object[] { 0f, 0f }; + yield return new object[] { float.NaN, float.NaN }; + yield return new object[] { float.PositiveInfinity, float.PositiveInfinity }; + yield return new object[] { float.NegativeInfinity, float.NegativeInfinity }; + yield return new object[] { 3.4028235E+38f, 3.4028235E+38f }; + yield return new object[] { -3.4028235E+38f, -3.4028235E+38f }; + } + + [Theory] + [MemberData(nameof(Round_AwayFromZero_TestData))] + public static void Round_AwayFromZero_0(float value, float expected) + { + // Math.Round has special fast paths when MidpointRounding is a const + // Don't replace it with a variable + Assert.Equal(expected, MathF.Round(value, MidpointRounding.AwayFromZero)); + Assert.Equal(expected, MathF.Round(value, 0, MidpointRounding.AwayFromZero)); + } + } +} diff --git a/src/libraries/Microsoft.Bcl.Numerics/tests/Microsoft.Bcl.Numerics.Tests.csproj b/src/libraries/Microsoft.Bcl.Numerics/tests/Microsoft.Bcl.Numerics.Tests.csproj new file mode 100644 index 00000000000000..8f2abec46041a7 --- /dev/null +++ b/src/libraries/Microsoft.Bcl.Numerics/tests/Microsoft.Bcl.Numerics.Tests.csproj @@ -0,0 +1,15 @@ + + + + $(NetFrameworkMinimum);$(NetCoreAppCurrent) + + + + + + + + + + + diff --git a/src/libraries/Microsoft.Bcl.TimeProvider/Microsoft.Bcl.TimeProvider.sln b/src/libraries/Microsoft.Bcl.TimeProvider/Microsoft.Bcl.TimeProvider.sln index 2528c6b87142f2..7ef408541c64ad 100644 --- a/src/libraries/Microsoft.Bcl.TimeProvider/Microsoft.Bcl.TimeProvider.sln +++ b/src/libraries/Microsoft.Bcl.TimeProvider/Microsoft.Bcl.TimeProvider.sln @@ -7,12 +7,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.TimeProvider" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.TimeProvider.Tests", "tests\Microsoft.Bcl.TimeProvider.Tests.csproj", "{8DBA87BA-C9C5-48AF-9D34-4B9877B28F9E}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{A8FF8B4E-A39C-4CBC-82C4-AC6C051D4386}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{4FB1DB0F-1371-4635-8160-6AB3B3D3BB04}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{6D351E62-CB41-4E2A-B7E7-55FAC33C6B16}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{E993DE92-F571-45CF-A879-87ADA3CCEF7E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{5E7E6A50-109D-45DA-A70C-B00AB5BCF964}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{F2D0E933-5501-4516-A2D8-DBD723B87A96}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{DD361556-5404-40DF-B2F3-6557A0207C89}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{D851DE65-D4F7-46B2-82B1-098DF24E2A07}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{B7AA510C-BBAF-4D08-A81C-56A134460112}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{88C727A1-C9E9-4381-AC3A-5213CAE17602}" @@ -21,6 +29,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C2DE61FC-AB3 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{2DA8DE52-952C-4E9B-8C4D-5FF6AC27CA62}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{F0432FE3-6BCD-4B1C-BF81-2CDEDA0B8F50}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{2AFD2061-9ECF-4C29-A140-D799EF345CAE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{B30FFA4F-3D3E-424C-94A5-0A9F10E6ABB6}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{33861368-2ED3-4E31-BF8A-A3F53CD17330}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -43,10 +59,6 @@ Global {8DBA87BA-C9C5-48AF-9D34-4B9877B28F9E}.Debug|Any CPU.Build.0 = Debug|Any CPU {8DBA87BA-C9C5-48AF-9D34-4B9877B28F9E}.Release|Any CPU.ActiveCfg = Release|Any CPU {8DBA87BA-C9C5-48AF-9D34-4B9877B28F9E}.Release|Any CPU.Build.0 = Release|Any CPU - {A8FF8B4E-A39C-4CBC-82C4-AC6C051D4386}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A8FF8B4E-A39C-4CBC-82C4-AC6C051D4386}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A8FF8B4E-A39C-4CBC-82C4-AC6C051D4386}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A8FF8B4E-A39C-4CBC-82C4-AC6C051D4386}.Release|Any CPU.Build.0 = Release|Any CPU {4FB1DB0F-1371-4635-8160-6AB3B3D3BB04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4FB1DB0F-1371-4635-8160-6AB3B3D3BB04}.Debug|Any CPU.Build.0 = Debug|Any CPU {4FB1DB0F-1371-4635-8160-6AB3B3D3BB04}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -55,6 +67,26 @@ Global {6D351E62-CB41-4E2A-B7E7-55FAC33C6B16}.Debug|Any CPU.Build.0 = Debug|Any CPU {6D351E62-CB41-4E2A-B7E7-55FAC33C6B16}.Release|Any CPU.ActiveCfg = Release|Any CPU {6D351E62-CB41-4E2A-B7E7-55FAC33C6B16}.Release|Any CPU.Build.0 = Release|Any CPU + {E993DE92-F571-45CF-A879-87ADA3CCEF7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E993DE92-F571-45CF-A879-87ADA3CCEF7E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E993DE92-F571-45CF-A879-87ADA3CCEF7E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E993DE92-F571-45CF-A879-87ADA3CCEF7E}.Release|Any CPU.Build.0 = Release|Any CPU + {5E7E6A50-109D-45DA-A70C-B00AB5BCF964}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5E7E6A50-109D-45DA-A70C-B00AB5BCF964}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5E7E6A50-109D-45DA-A70C-B00AB5BCF964}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5E7E6A50-109D-45DA-A70C-B00AB5BCF964}.Release|Any CPU.Build.0 = Release|Any CPU + {F2D0E933-5501-4516-A2D8-DBD723B87A96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F2D0E933-5501-4516-A2D8-DBD723B87A96}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F2D0E933-5501-4516-A2D8-DBD723B87A96}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F2D0E933-5501-4516-A2D8-DBD723B87A96}.Release|Any CPU.Build.0 = Release|Any CPU + {DD361556-5404-40DF-B2F3-6557A0207C89}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DD361556-5404-40DF-B2F3-6557A0207C89}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DD361556-5404-40DF-B2F3-6557A0207C89}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DD361556-5404-40DF-B2F3-6557A0207C89}.Release|Any CPU.Build.0 = Release|Any CPU + {D851DE65-D4F7-46B2-82B1-098DF24E2A07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D851DE65-D4F7-46B2-82B1-098DF24E2A07}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D851DE65-D4F7-46B2-82B1-098DF24E2A07}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D851DE65-D4F7-46B2-82B1-098DF24E2A07}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -64,9 +96,16 @@ Global {8DBA87BA-C9C5-48AF-9D34-4B9877B28F9E} = {B7AA510C-BBAF-4D08-A81C-56A134460112} {A4806044-E9CE-4744-86A3-7B0968466474} = {88C727A1-C9E9-4381-AC3A-5213CAE17602} {6BF3C14F-036A-4A04-90EC-82ADC2900805} = {C2DE61FC-AB38-4E50-8892-1363AFFCEC63} - {A8FF8B4E-A39C-4CBC-82C4-AC6C051D4386} = {2DA8DE52-952C-4E9B-8C4D-5FF6AC27CA62} {4FB1DB0F-1371-4635-8160-6AB3B3D3BB04} = {2DA8DE52-952C-4E9B-8C4D-5FF6AC27CA62} {6D351E62-CB41-4E2A-B7E7-55FAC33C6B16} = {2DA8DE52-952C-4E9B-8C4D-5FF6AC27CA62} + {E993DE92-F571-45CF-A879-87ADA3CCEF7E} = {F0432FE3-6BCD-4B1C-BF81-2CDEDA0B8F50} + {5E7E6A50-109D-45DA-A70C-B00AB5BCF964} = {F0432FE3-6BCD-4B1C-BF81-2CDEDA0B8F50} + {F0432FE3-6BCD-4B1C-BF81-2CDEDA0B8F50} = {33861368-2ED3-4E31-BF8A-A3F53CD17330} + {F2D0E933-5501-4516-A2D8-DBD723B87A96} = {2AFD2061-9ECF-4C29-A140-D799EF345CAE} + {DD361556-5404-40DF-B2F3-6557A0207C89} = {2AFD2061-9ECF-4C29-A140-D799EF345CAE} + {2AFD2061-9ECF-4C29-A140-D799EF345CAE} = {33861368-2ED3-4E31-BF8A-A3F53CD17330} + {D851DE65-D4F7-46B2-82B1-098DF24E2A07} = {B30FFA4F-3D3E-424C-94A5-0A9F10E6ABB6} + {B30FFA4F-3D3E-424C-94A5-0A9F10E6ABB6} = {33861368-2ED3-4E31-BF8A-A3F53CD17330} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {B3004FFF-3524-4627-A3E5-BBEEBE4BF1AC} diff --git a/src/libraries/Microsoft.Bcl.TimeProvider/ref/Microsoft.Bcl.TimeProvider.csproj b/src/libraries/Microsoft.Bcl.TimeProvider/ref/Microsoft.Bcl.TimeProvider.csproj index 11d55537a3a3b3..9c27611bb69466 100644 --- a/src/libraries/Microsoft.Bcl.TimeProvider/ref/Microsoft.Bcl.TimeProvider.csproj +++ b/src/libraries/Microsoft.Bcl.TimeProvider/ref/Microsoft.Bcl.TimeProvider.csproj @@ -1,18 +1,23 @@ + - $(NetCoreAppCurrent);netstandard2.0;$(NetFrameworkMinimum) + netstandard2.0;$(NetFrameworkMinimum);$(NetCoreAppMinimum) + + + + + - - - - + + - + + diff --git a/src/libraries/Microsoft.Bcl.TimeProvider/src/Microsoft.Bcl.TimeProvider.csproj b/src/libraries/Microsoft.Bcl.TimeProvider/src/Microsoft.Bcl.TimeProvider.csproj index 95e508e6f0d2ba..2d45a39328571e 100644 --- a/src/libraries/Microsoft.Bcl.TimeProvider/src/Microsoft.Bcl.TimeProvider.csproj +++ b/src/libraries/Microsoft.Bcl.TimeProvider/src/Microsoft.Bcl.TimeProvider.csproj @@ -1,23 +1,18 @@ - $(NetCoreAppCurrent);netstandard2.0;$(NetFrameworkMinimum) + netstandard2.0;$(NetFrameworkMinimum);$(NetCoreAppMinimum) true - - true Provides support for system time abstraction primitives for .NET Framework and .NET Standard. Commonly Used Types: System.TimeProvider System.ITimer - - false + - true + true true diff --git a/src/libraries/Microsoft.Bcl.TimeProvider/src/PACKAGE.md b/src/libraries/Microsoft.Bcl.TimeProvider/src/PACKAGE.md new file mode 100644 index 00000000000000..f3c9c372cf2caf --- /dev/null +++ b/src/libraries/Microsoft.Bcl.TimeProvider/src/PACKAGE.md @@ -0,0 +1,57 @@ +## About + +Microsoft.Bcl.TimeProvider provides time abstraction support for apps targeting .NET 7 and earlier, as well as those intended for the .NET Framework. For apps targeting .NET 8 and newer versions, referencing this package is unnecessary, as the types it contains are already included in the .NET 8 and higher platform versions. + +## Key Features + +* Provides a common abstraction for time-related operations. + +## How to Use + +```csharp +using System; + +// A class that uses TimeProvider to get the current time in Utc coordinates +public class UtcClock +{ + private readonly TimeProvider _timeProvider; + + // Constructor that takes a TimeProvider as a dependency + public Clock(TimeProvider timeProvider) + { + _timeProvider = timeProvider; + } + + // A method that returns the current time as a string + public string GetTime() + { + return _timeProvider.GetLocalNow().ToString("HH:mm:ss"); + } +} + +// A class that inherits from TimeProvider and overrides the GetLocalNow method +public class UtcTimeProvider : TimeProvider +{ + // Override the GetLocalNow method to always return UTC time + public override DateTimeOffset GetLocalNow() + { + return TimeProvider.System.GetUtcNow(); + } +} + +``` + +## Main Types + +The main types provided by this library are: + +* `TimeProvider` +* `TimeProviderTaskExtensions` + +## Additional Documentation + +* [API documentation](https://learn.microsoft.com/dotnet/api/system.timeprovider) + +## Feedback & Contributing + +Microsoft.Bcl.TimeProvider is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). \ No newline at end of file diff --git a/src/libraries/Microsoft.CSharp/Microsoft.CSharp.sln b/src/libraries/Microsoft.CSharp/Microsoft.CSharp.sln index d3459462257ee7..7207dd4e74f6f1 100644 --- a/src/libraries/Microsoft.CSharp/Microsoft.CSharp.sln +++ b/src/libraries/Microsoft.CSharp/Microsoft.CSharp.sln @@ -21,6 +21,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{C89FC14C-795C-469E-A053-A2844C0B7AA8}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{780BF284-2765-4B96-A817-CE9AEB1BC979}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{84957D3F-C9E3-4191-8BD1-D0492F5D0B69}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{465840D4-5267-4DC2-A675-A32BE9584745}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{DB79B0FC-557E-4FCE-871B-F53F790DBD60}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{54EA706E-28CA-4CCF-82CC-6B211E683C2E}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{E6224881-0E5B-4FDC-99C4-DDE6E59F806B}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{85A4D137-FEEC-4F3C-9358-F2BFFFF6D2DE}" @@ -29,6 +39,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E4FC7A8F-502 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{9C11B257-64B7-4EC9-BF3E-4859FB66281D}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{D293C8E5-5C86-4096-9F9D-0129396A1AD7}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{ABC2DBF6-FE78-44B1-86B8-D759660B5462}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{8C230199-AEBC-4299-A612-5025FC987A41}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{1725BEE8-1704-4D2D-BD98-CFEC326A5DEA}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -79,6 +97,26 @@ Global {C89FC14C-795C-469E-A053-A2844C0B7AA8}.Debug|Any CPU.Build.0 = Debug|Any CPU {C89FC14C-795C-469E-A053-A2844C0B7AA8}.Release|Any CPU.ActiveCfg = Release|Any CPU {C89FC14C-795C-469E-A053-A2844C0B7AA8}.Release|Any CPU.Build.0 = Release|Any CPU + {780BF284-2765-4B96-A817-CE9AEB1BC979}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {780BF284-2765-4B96-A817-CE9AEB1BC979}.Debug|Any CPU.Build.0 = Debug|Any CPU + {780BF284-2765-4B96-A817-CE9AEB1BC979}.Release|Any CPU.ActiveCfg = Release|Any CPU + {780BF284-2765-4B96-A817-CE9AEB1BC979}.Release|Any CPU.Build.0 = Release|Any CPU + {84957D3F-C9E3-4191-8BD1-D0492F5D0B69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {84957D3F-C9E3-4191-8BD1-D0492F5D0B69}.Debug|Any CPU.Build.0 = Debug|Any CPU + {84957D3F-C9E3-4191-8BD1-D0492F5D0B69}.Release|Any CPU.ActiveCfg = Release|Any CPU + {84957D3F-C9E3-4191-8BD1-D0492F5D0B69}.Release|Any CPU.Build.0 = Release|Any CPU + {465840D4-5267-4DC2-A675-A32BE9584745}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {465840D4-5267-4DC2-A675-A32BE9584745}.Debug|Any CPU.Build.0 = Debug|Any CPU + {465840D4-5267-4DC2-A675-A32BE9584745}.Release|Any CPU.ActiveCfg = Release|Any CPU + {465840D4-5267-4DC2-A675-A32BE9584745}.Release|Any CPU.Build.0 = Release|Any CPU + {DB79B0FC-557E-4FCE-871B-F53F790DBD60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DB79B0FC-557E-4FCE-871B-F53F790DBD60}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DB79B0FC-557E-4FCE-871B-F53F790DBD60}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DB79B0FC-557E-4FCE-871B-F53F790DBD60}.Release|Any CPU.Build.0 = Release|Any CPU + {54EA706E-28CA-4CCF-82CC-6B211E683C2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {54EA706E-28CA-4CCF-82CC-6B211E683C2E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {54EA706E-28CA-4CCF-82CC-6B211E683C2E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {54EA706E-28CA-4CCF-82CC-6B211E683C2E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -95,6 +133,14 @@ Global {BB30502C-6FBE-467E-AE6B-380EC60BD666} = {9C11B257-64B7-4EC9-BF3E-4859FB66281D} {B78B9BD0-6D82-400A-A373-C42051D9C3D8} = {9C11B257-64B7-4EC9-BF3E-4859FB66281D} {7223E4B2-40ED-48FB-9BFA-07002AD674DB} = {9C11B257-64B7-4EC9-BF3E-4859FB66281D} + {780BF284-2765-4B96-A817-CE9AEB1BC979} = {D293C8E5-5C86-4096-9F9D-0129396A1AD7} + {84957D3F-C9E3-4191-8BD1-D0492F5D0B69} = {D293C8E5-5C86-4096-9F9D-0129396A1AD7} + {D293C8E5-5C86-4096-9F9D-0129396A1AD7} = {1725BEE8-1704-4D2D-BD98-CFEC326A5DEA} + {465840D4-5267-4DC2-A675-A32BE9584745} = {ABC2DBF6-FE78-44B1-86B8-D759660B5462} + {DB79B0FC-557E-4FCE-871B-F53F790DBD60} = {ABC2DBF6-FE78-44B1-86B8-D759660B5462} + {ABC2DBF6-FE78-44B1-86B8-D759660B5462} = {1725BEE8-1704-4D2D-BD98-CFEC326A5DEA} + {54EA706E-28CA-4CCF-82CC-6B211E683C2E} = {8C230199-AEBC-4299-A612-5025FC987A41} + {8C230199-AEBC-4299-A612-5025FC987A41} = {1725BEE8-1704-4D2D-BD98-CFEC326A5DEA} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {A1ECF510-F5DB-4E7F-853E-DD3C0CE04C12} diff --git a/src/libraries/Microsoft.Extensions.Caching.Abstractions/Microsoft.Extensions.Caching.Abstractions.sln b/src/libraries/Microsoft.Extensions.Caching.Abstractions/Microsoft.Extensions.Caching.Abstractions.sln index 795aa1a253654a..adf3c27de3b84d 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Abstractions/Microsoft.Extensions.Caching.Abstractions.sln +++ b/src/libraries/Microsoft.Extensions.Caching.Abstractions/Microsoft.Extensions.Caching.Abstractions.sln @@ -7,18 +7,34 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primit EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primitives", "..\Microsoft.Extensions.Primitives\src\Microsoft.Extensions.Primitives.csproj", "{9556B0C4-098C-45E3-A7EB-1A219B7F941C}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{AADD31E2-3BD3-44F9-811C-4F6AD28EA7E5}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{E1D67575-BF5F-43EB-A81E-6043A427FBEF}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{22B98A76-A2BE-47ED-82F2-9BD0EF50B22D}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{62920990-3992-4020-BE2A-82061DD47813}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{4094B781-6FCF-4ED4-ABD5-D273FCB81909}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{BA707680-8926-4BA5-8F8E-1FAA55908831}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{4F2ACC77-7868-425C-B9A1-C6A68488EA47}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{F6FDA9BD-309C-4271-90DF-DADB15482EBD}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{4B23C940-1856-48C0-94F2-66D4ADC41EA4}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{F5D1F8C5-8A12-4EE8-9ABA-D393EBBCB1AA}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{CF895AB4-6805-4E7D-B8B3-7D363C7D6027}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{CE894530-F3D6-4868-B0B1-5FF935ACE502}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{BE5C90DD-DCAE-4934-96B7-59DFD8746EE5}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{50277FC9-3A7E-4EAE-8BF7-5CC23005D042}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{649B9C54-4FF3-4EEB-8FF8-F50CCD3F8EFB}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -41,10 +57,6 @@ Global {9556B0C4-098C-45E3-A7EB-1A219B7F941C}.Debug|Any CPU.Build.0 = Debug|Any CPU {9556B0C4-098C-45E3-A7EB-1A219B7F941C}.Release|Any CPU.ActiveCfg = Release|Any CPU {9556B0C4-098C-45E3-A7EB-1A219B7F941C}.Release|Any CPU.Build.0 = Release|Any CPU - {AADD31E2-3BD3-44F9-811C-4F6AD28EA7E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AADD31E2-3BD3-44F9-811C-4F6AD28EA7E5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AADD31E2-3BD3-44F9-811C-4F6AD28EA7E5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AADD31E2-3BD3-44F9-811C-4F6AD28EA7E5}.Release|Any CPU.Build.0 = Release|Any CPU {E1D67575-BF5F-43EB-A81E-6043A427FBEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E1D67575-BF5F-43EB-A81E-6043A427FBEF}.Debug|Any CPU.Build.0 = Debug|Any CPU {E1D67575-BF5F-43EB-A81E-6043A427FBEF}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -53,6 +65,26 @@ Global {22B98A76-A2BE-47ED-82F2-9BD0EF50B22D}.Debug|Any CPU.Build.0 = Debug|Any CPU {22B98A76-A2BE-47ED-82F2-9BD0EF50B22D}.Release|Any CPU.ActiveCfg = Release|Any CPU {22B98A76-A2BE-47ED-82F2-9BD0EF50B22D}.Release|Any CPU.Build.0 = Release|Any CPU + {62920990-3992-4020-BE2A-82061DD47813}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {62920990-3992-4020-BE2A-82061DD47813}.Debug|Any CPU.Build.0 = Debug|Any CPU + {62920990-3992-4020-BE2A-82061DD47813}.Release|Any CPU.ActiveCfg = Release|Any CPU + {62920990-3992-4020-BE2A-82061DD47813}.Release|Any CPU.Build.0 = Release|Any CPU + {4094B781-6FCF-4ED4-ABD5-D273FCB81909}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4094B781-6FCF-4ED4-ABD5-D273FCB81909}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4094B781-6FCF-4ED4-ABD5-D273FCB81909}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4094B781-6FCF-4ED4-ABD5-D273FCB81909}.Release|Any CPU.Build.0 = Release|Any CPU + {BA707680-8926-4BA5-8F8E-1FAA55908831}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BA707680-8926-4BA5-8F8E-1FAA55908831}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BA707680-8926-4BA5-8F8E-1FAA55908831}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BA707680-8926-4BA5-8F8E-1FAA55908831}.Release|Any CPU.Build.0 = Release|Any CPU + {4F2ACC77-7868-425C-B9A1-C6A68488EA47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4F2ACC77-7868-425C-B9A1-C6A68488EA47}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4F2ACC77-7868-425C-B9A1-C6A68488EA47}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4F2ACC77-7868-425C-B9A1-C6A68488EA47}.Release|Any CPU.Build.0 = Release|Any CPU + {F6FDA9BD-309C-4271-90DF-DADB15482EBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F6FDA9BD-309C-4271-90DF-DADB15482EBD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F6FDA9BD-309C-4271-90DF-DADB15482EBD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F6FDA9BD-309C-4271-90DF-DADB15482EBD}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -62,9 +94,16 @@ Global {3CE7A561-5A2F-4AF3-8CC2-8148BC5CCE90} = {4B23C940-1856-48C0-94F2-66D4ADC41EA4} {5904EB23-3221-4992-A1F9-70F8B5478DF2} = {F5D1F8C5-8A12-4EE8-9ABA-D393EBBCB1AA} {9556B0C4-098C-45E3-A7EB-1A219B7F941C} = {F5D1F8C5-8A12-4EE8-9ABA-D393EBBCB1AA} - {AADD31E2-3BD3-44F9-811C-4F6AD28EA7E5} = {CF895AB4-6805-4E7D-B8B3-7D363C7D6027} {E1D67575-BF5F-43EB-A81E-6043A427FBEF} = {CF895AB4-6805-4E7D-B8B3-7D363C7D6027} {22B98A76-A2BE-47ED-82F2-9BD0EF50B22D} = {CF895AB4-6805-4E7D-B8B3-7D363C7D6027} + {62920990-3992-4020-BE2A-82061DD47813} = {CE894530-F3D6-4868-B0B1-5FF935ACE502} + {4094B781-6FCF-4ED4-ABD5-D273FCB81909} = {CE894530-F3D6-4868-B0B1-5FF935ACE502} + {CE894530-F3D6-4868-B0B1-5FF935ACE502} = {649B9C54-4FF3-4EEB-8FF8-F50CCD3F8EFB} + {BA707680-8926-4BA5-8F8E-1FAA55908831} = {BE5C90DD-DCAE-4934-96B7-59DFD8746EE5} + {4F2ACC77-7868-425C-B9A1-C6A68488EA47} = {BE5C90DD-DCAE-4934-96B7-59DFD8746EE5} + {BE5C90DD-DCAE-4934-96B7-59DFD8746EE5} = {649B9C54-4FF3-4EEB-8FF8-F50CCD3F8EFB} + {F6FDA9BD-309C-4271-90DF-DADB15482EBD} = {50277FC9-3A7E-4EAE-8BF7-5CC23005D042} + {50277FC9-3A7E-4EAE-8BF7-5CC23005D042} = {649B9C54-4FF3-4EEB-8FF8-F50CCD3F8EFB} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {68BF65EA-B5BA-44C6-8463-45BA1F186520} diff --git a/src/libraries/Microsoft.Extensions.Caching.Abstractions/ref/Microsoft.Extensions.Caching.Abstractions.csproj b/src/libraries/Microsoft.Extensions.Caching.Abstractions/ref/Microsoft.Extensions.Caching.Abstractions.csproj index 734e3c1c6a9c27..73cf9b98a15878 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Abstractions/ref/Microsoft.Extensions.Caching.Abstractions.csproj +++ b/src/libraries/Microsoft.Extensions.Caching.Abstractions/ref/Microsoft.Extensions.Caching.Abstractions.csproj @@ -1,17 +1,25 @@ + $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) - - - + + + + + + + + + diff --git a/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/CompatibilitySuppressions.xml b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/CompatibilitySuppressions.xml new file mode 100644 index 00000000000000..2a3161e554f89e --- /dev/null +++ b/src/libraries/Microsoft.Extensions.Caching.Abstractions/src/CompatibilitySuppressions.xml @@ -0,0 +1,32 @@ + + + + + CP0002 + M:Microsoft.Extensions.Caching.Memory.IMemoryCache.GetCurrentStatistics + lib/net6.0/Microsoft.Extensions.Caching.Abstractions.dll + lib/netstandard2.0/Microsoft.Extensions.Caching.Abstractions.dll + true + + + CP0002 + M:Microsoft.Extensions.Caching.Memory.IMemoryCache.GetCurrentStatistics + lib/net7.0/Microsoft.Extensions.Caching.Abstractions.dll + lib/netstandard2.0/Microsoft.Extensions.Caching.Abstractions.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/Microsoft.Extensions.Caching.Abstractions.dll + right + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/Microsoft.Extensions.Caching.Abstractions.dll + right + true + + \ No newline at end of file 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 74d8b6521253e4..a16e9c621872f7 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 @@ -33,6 +33,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Loggin 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}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.SourceGeneration", "..\Microsoft.Extensions.Options\gen\Microsoft.Extensions.Options.SourceGeneration.csproj", "{C66BFC12-83ED-4131-8F16-C366185E4687}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\ref\Microsoft.Extensions.Options.csproj", "{1958AE1D-55EA-4550-BE58-0AFDBB2EDB8A}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\src\Microsoft.Extensions.Options.csproj", "{5A9310B4-82AB-46F8-83C1-72D21A6A761F}" @@ -41,12 +43,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primit EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primitives", "..\Microsoft.Extensions.Primitives\src\Microsoft.Extensions.Primitives.csproj", "{DA43AA92-35BA-4B84-BAA2-C3BB56C8BB3B}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{8B3671D1-A834-4456-89A7-40B5F13FC8D4}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{88C1F3B9-B92E-4847-AF86-A437FA34382B}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{94673D00-C1BB-48F3-8A1B-75DDEA247AB0}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{AC487C8F-3F9C-4E47-BB15-B46BA7494E4E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{76A0849D-0723-4FE5-B325-58AA7CF13D30}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{3F1F4584-53BA-4183-ABFA-9EAE22368383}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{DCBAFAAB-3812-4F34-9DE7-A406A349A38E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{A89B7280-FEAC-45F2-A4A0-F302C471BB26}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{D430F7D3-0FCA-4C78-9BBA-2E525DF7EABE}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{FF162B75-76DC-493E-8AE1-23CBDAC2A7A2}" @@ -55,6 +65,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{67719AA1-52D EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{C77F6550-84B5-4C20-8541-8B6118A8651A}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{DD1F186A-F6F9-4409-8CB3-81EBE93D68E5}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{F530EA49-31FE-4827-BAE5-94F5701DD604}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{B35F055C-220D-4BF0-80A8-C39C4E4F0A7F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{22F11B95-D5E6-4F26-9C0C-E8D3A7F3F0A6}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -129,6 +147,10 @@ Global {C76753D0-F564-45E9-AA60-A846EFE0A414}.Debug|Any CPU.Build.0 = Debug|Any CPU {C76753D0-F564-45E9-AA60-A846EFE0A414}.Release|Any CPU.ActiveCfg = Release|Any CPU {C76753D0-F564-45E9-AA60-A846EFE0A414}.Release|Any CPU.Build.0 = Release|Any CPU + {C66BFC12-83ED-4131-8F16-C366185E4687}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C66BFC12-83ED-4131-8F16-C366185E4687}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C66BFC12-83ED-4131-8F16-C366185E4687}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C66BFC12-83ED-4131-8F16-C366185E4687}.Release|Any CPU.Build.0 = Release|Any CPU {1958AE1D-55EA-4550-BE58-0AFDBB2EDB8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1958AE1D-55EA-4550-BE58-0AFDBB2EDB8A}.Debug|Any CPU.Build.0 = Debug|Any CPU {1958AE1D-55EA-4550-BE58-0AFDBB2EDB8A}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -145,10 +167,6 @@ Global {DA43AA92-35BA-4B84-BAA2-C3BB56C8BB3B}.Debug|Any CPU.Build.0 = Debug|Any CPU {DA43AA92-35BA-4B84-BAA2-C3BB56C8BB3B}.Release|Any CPU.ActiveCfg = Release|Any CPU {DA43AA92-35BA-4B84-BAA2-C3BB56C8BB3B}.Release|Any CPU.Build.0 = Release|Any CPU - {8B3671D1-A834-4456-89A7-40B5F13FC8D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8B3671D1-A834-4456-89A7-40B5F13FC8D4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8B3671D1-A834-4456-89A7-40B5F13FC8D4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8B3671D1-A834-4456-89A7-40B5F13FC8D4}.Release|Any CPU.Build.0 = Release|Any CPU {88C1F3B9-B92E-4847-AF86-A437FA34382B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {88C1F3B9-B92E-4847-AF86-A437FA34382B}.Debug|Any CPU.Build.0 = Debug|Any CPU {88C1F3B9-B92E-4847-AF86-A437FA34382B}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -157,6 +175,26 @@ Global {94673D00-C1BB-48F3-8A1B-75DDEA247AB0}.Debug|Any CPU.Build.0 = Debug|Any CPU {94673D00-C1BB-48F3-8A1B-75DDEA247AB0}.Release|Any CPU.ActiveCfg = Release|Any CPU {94673D00-C1BB-48F3-8A1B-75DDEA247AB0}.Release|Any CPU.Build.0 = Release|Any CPU + {AC487C8F-3F9C-4E47-BB15-B46BA7494E4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AC487C8F-3F9C-4E47-BB15-B46BA7494E4E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AC487C8F-3F9C-4E47-BB15-B46BA7494E4E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AC487C8F-3F9C-4E47-BB15-B46BA7494E4E}.Release|Any CPU.Build.0 = Release|Any CPU + {76A0849D-0723-4FE5-B325-58AA7CF13D30}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {76A0849D-0723-4FE5-B325-58AA7CF13D30}.Debug|Any CPU.Build.0 = Debug|Any CPU + {76A0849D-0723-4FE5-B325-58AA7CF13D30}.Release|Any CPU.ActiveCfg = Release|Any CPU + {76A0849D-0723-4FE5-B325-58AA7CF13D30}.Release|Any CPU.Build.0 = Release|Any CPU + {3F1F4584-53BA-4183-ABFA-9EAE22368383}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3F1F4584-53BA-4183-ABFA-9EAE22368383}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3F1F4584-53BA-4183-ABFA-9EAE22368383}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3F1F4584-53BA-4183-ABFA-9EAE22368383}.Release|Any CPU.Build.0 = Release|Any CPU + {DCBAFAAB-3812-4F34-9DE7-A406A349A38E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DCBAFAAB-3812-4F34-9DE7-A406A349A38E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DCBAFAAB-3812-4F34-9DE7-A406A349A38E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DCBAFAAB-3812-4F34-9DE7-A406A349A38E}.Release|Any CPU.Build.0 = Release|Any CPU + {A89B7280-FEAC-45F2-A4A0-F302C471BB26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A89B7280-FEAC-45F2-A4A0-F302C471BB26}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A89B7280-FEAC-45F2-A4A0-F302C471BB26}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A89B7280-FEAC-45F2-A4A0-F302C471BB26}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -183,9 +221,17 @@ Global {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} - {8B3671D1-A834-4456-89A7-40B5F13FC8D4} = {C77F6550-84B5-4C20-8541-8B6118A8651A} + {C66BFC12-83ED-4131-8F16-C366185E4687} = {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} + {AC487C8F-3F9C-4E47-BB15-B46BA7494E4E} = {DD1F186A-F6F9-4409-8CB3-81EBE93D68E5} + {76A0849D-0723-4FE5-B325-58AA7CF13D30} = {DD1F186A-F6F9-4409-8CB3-81EBE93D68E5} + {DD1F186A-F6F9-4409-8CB3-81EBE93D68E5} = {22F11B95-D5E6-4F26-9C0C-E8D3A7F3F0A6} + {3F1F4584-53BA-4183-ABFA-9EAE22368383} = {F530EA49-31FE-4827-BAE5-94F5701DD604} + {DCBAFAAB-3812-4F34-9DE7-A406A349A38E} = {F530EA49-31FE-4827-BAE5-94F5701DD604} + {F530EA49-31FE-4827-BAE5-94F5701DD604} = {22F11B95-D5E6-4F26-9C0C-E8D3A7F3F0A6} + {A89B7280-FEAC-45F2-A4A0-F302C471BB26} = {B35F055C-220D-4BF0-80A8-C39C4E4F0A7F} + {B35F055C-220D-4BF0-80A8-C39C4E4F0A7F} = {22F11B95-D5E6-4F26-9C0C-E8D3A7F3F0A6} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {38ED157C-646E-43DD-B8B0-562DD5715E27} diff --git a/src/libraries/Microsoft.Extensions.Caching.Memory/src/PACKAGE.md b/src/libraries/Microsoft.Extensions.Caching.Memory/src/PACKAGE.md new file mode 100644 index 00000000000000..a9e1c0e00615d6 --- /dev/null +++ b/src/libraries/Microsoft.Extensions.Caching.Memory/src/PACKAGE.md @@ -0,0 +1,89 @@ +## About + + + +Provides implementations for local and distributed in-memory cache. It stores and retrieves data in a fast and efficient way. + +## Key Features + + + +* A concrete implementation of the IMemoryCache interface, which represents a local in-memory cache that stores and retrieves data in a fast and efficient way +* A distributed cache that supports higher scale-out than local cache +* Expiration and eviction policies for its entries +* Entry prioritization for when the cache size limit is exceeded and needs to be compacted by entry eviction +* Track of cache statictics + +## How to Use + + + +Use Microsoft.Extensions.Caching.Memory over System.Runtime.Caching when working with ASP.NET Core as it provides better integration support. For example, IMemoryCache works natively with ASP.NET Core dependency injection. + +Local in-memory serialization: +```csharp +using Microsoft.Extensions.Caching.Memory; + +using MemoryCache cache = new(new MemoryCacheOptions()); + +object valueToCache = new(); +string key = "key"; + +using (ICacheEntry entry = cache.CreateEntry(key)) +{ + // Entries are committed after they are disposed therefore it does not exist yet. + Console.WriteLine($"Exists: {cache.TryGetValue(key, out _)}\n"); + + entry.Value = valueToCache; + entry.SlidingExpiration = TimeSpan.FromSeconds(2); +} + +bool exists = cache.TryGetValue(key, out object? cachedValue); +Console.WriteLine($"Exists: {exists}" ); +Console.WriteLine($"cachedValue is valueToCache? {object.ReferenceEquals(cachedValue, valueToCache)}\n"); + +Console.WriteLine("Wait for the sliding expiration..."); +Thread.Sleep(TimeSpan.FromSeconds(2)); + +Console.WriteLine("Exists: " + cache.TryGetValue(key, out _)); + +// You can also use the acceleration extensions to set and get entries +string key2 = "key2"; +object value2 = new(); + +cache.Set("key2", value2); + +object? cachedValue2 = cache.Get(key2); +Console.WriteLine($"cachedValue2 is value2? {object.ReferenceEquals(cachedValue2, value2)}"); +``` + +## Main Types + + + +The main types provided by this library are: + +* `Microsoft.Extensions.Caching.Memory.MemoryCache` +* `Microsoft.Extensions.Caching.Memory.MemoryCacheOptions` +* `Microsoft.Extensions.Caching.Distributed.MemoryDistributedCache` +* `Microsoft.Extensions.Caching.Memory.MemoryDistributedCacheOptions` + +## Additional Documentation + + + +* [Conceptual documentation](https://learn.microsoft.com/dotnet/core/extensions/caching) +* [Cache in-memory in ASP.NET Core](https://learn.microsoft.com/aspnet/core/performance/caching/memory) +* [API documentation](https://learn.microsoft.com/dotnet/api/microsoft.extensions.caching.memory) + +## Related Packages + + + +[Microsoft.Extensions.Caching.Abstractions](https://www.nuget.org/packages/Microsoft.Extensions.Caching.Abstractions) + +## Feedback & Contributing + + + +Microsoft.Extensions.Caching.Memory is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). diff --git a/src/libraries/Microsoft.Extensions.Configuration.Abstractions/Microsoft.Extensions.Configuration.Abstractions.sln b/src/libraries/Microsoft.Extensions.Configuration.Abstractions/Microsoft.Extensions.Configuration.Abstractions.sln index bd7ea7708ccbee..f827b05854a4e6 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Abstractions/Microsoft.Extensions.Configuration.Abstractions.sln +++ b/src/libraries/Microsoft.Extensions.Configuration.Abstractions/Microsoft.Extensions.Configuration.Abstractions.sln @@ -7,18 +7,34 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primit EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primitives", "..\Microsoft.Extensions.Primitives\src\Microsoft.Extensions.Primitives.csproj", "{EEE9E1A2-8512-4154-8B5D-532244B896CD}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{7BD8F65C-820D-4F70-A02A-2F46FF105634}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{CB6528FF-88EB-402B-910C-9C64EABA0436}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{92E86957-5217-456B-B9CA-E0C204822367}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{E98D77D5-E88C-4E0A-A6BE-F97B48370A96}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{CFA06A25-EE15-40BC-A852-0E5AD8B40E26}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{39D78422-EB39-4395-BC79-1C81500CD9DE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{1368685E-816B-4C75-94E2-2B00556FFE66}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{A8F94EE5-E485-4753-89F7-5CEF2F0A3B06}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{B8E3F471-7DA8-4D1D-9468-21542AAD0A2B}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{343DB133-E1E0-4FC0-896C-DA15D0C58AD5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{0FE1CBCE-E173-4926-9CD1-64D7AE63A994}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{53E613E6-9657-4256-A4A5-479D23F0E43B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{792105CF-78A4-4DD2-BE6C-D86C6A666351}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{C4D83B0C-9760-433B-AC79-356CA66491E9}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{55758363-1568-48F4-9512-8DFE87E6867E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -41,10 +57,6 @@ Global {EEE9E1A2-8512-4154-8B5D-532244B896CD}.Debug|Any CPU.Build.0 = Debug|Any CPU {EEE9E1A2-8512-4154-8B5D-532244B896CD}.Release|Any CPU.ActiveCfg = Release|Any CPU {EEE9E1A2-8512-4154-8B5D-532244B896CD}.Release|Any CPU.Build.0 = Release|Any CPU - {7BD8F65C-820D-4F70-A02A-2F46FF105634}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7BD8F65C-820D-4F70-A02A-2F46FF105634}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7BD8F65C-820D-4F70-A02A-2F46FF105634}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7BD8F65C-820D-4F70-A02A-2F46FF105634}.Release|Any CPU.Build.0 = Release|Any CPU {CB6528FF-88EB-402B-910C-9C64EABA0436}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CB6528FF-88EB-402B-910C-9C64EABA0436}.Debug|Any CPU.Build.0 = Debug|Any CPU {CB6528FF-88EB-402B-910C-9C64EABA0436}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -53,6 +65,26 @@ Global {92E86957-5217-456B-B9CA-E0C204822367}.Debug|Any CPU.Build.0 = Debug|Any CPU {92E86957-5217-456B-B9CA-E0C204822367}.Release|Any CPU.ActiveCfg = Release|Any CPU {92E86957-5217-456B-B9CA-E0C204822367}.Release|Any CPU.Build.0 = Release|Any CPU + {E98D77D5-E88C-4E0A-A6BE-F97B48370A96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E98D77D5-E88C-4E0A-A6BE-F97B48370A96}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E98D77D5-E88C-4E0A-A6BE-F97B48370A96}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E98D77D5-E88C-4E0A-A6BE-F97B48370A96}.Release|Any CPU.Build.0 = Release|Any CPU + {CFA06A25-EE15-40BC-A852-0E5AD8B40E26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CFA06A25-EE15-40BC-A852-0E5AD8B40E26}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CFA06A25-EE15-40BC-A852-0E5AD8B40E26}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CFA06A25-EE15-40BC-A852-0E5AD8B40E26}.Release|Any CPU.Build.0 = Release|Any CPU + {39D78422-EB39-4395-BC79-1C81500CD9DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {39D78422-EB39-4395-BC79-1C81500CD9DE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {39D78422-EB39-4395-BC79-1C81500CD9DE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {39D78422-EB39-4395-BC79-1C81500CD9DE}.Release|Any CPU.Build.0 = Release|Any CPU + {1368685E-816B-4C75-94E2-2B00556FFE66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1368685E-816B-4C75-94E2-2B00556FFE66}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1368685E-816B-4C75-94E2-2B00556FFE66}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1368685E-816B-4C75-94E2-2B00556FFE66}.Release|Any CPU.Build.0 = Release|Any CPU + {A8F94EE5-E485-4753-89F7-5CEF2F0A3B06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A8F94EE5-E485-4753-89F7-5CEF2F0A3B06}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A8F94EE5-E485-4753-89F7-5CEF2F0A3B06}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A8F94EE5-E485-4753-89F7-5CEF2F0A3B06}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -62,9 +94,16 @@ Global {711119F1-7759-49B9-8B66-EF72F4163729} = {B8E3F471-7DA8-4D1D-9468-21542AAD0A2B} {CAA4A23C-2C58-4C93-87BA-CCC87260F20A} = {343DB133-E1E0-4FC0-896C-DA15D0C58AD5} {EEE9E1A2-8512-4154-8B5D-532244B896CD} = {343DB133-E1E0-4FC0-896C-DA15D0C58AD5} - {7BD8F65C-820D-4F70-A02A-2F46FF105634} = {0FE1CBCE-E173-4926-9CD1-64D7AE63A994} {CB6528FF-88EB-402B-910C-9C64EABA0436} = {0FE1CBCE-E173-4926-9CD1-64D7AE63A994} {92E86957-5217-456B-B9CA-E0C204822367} = {0FE1CBCE-E173-4926-9CD1-64D7AE63A994} + {E98D77D5-E88C-4E0A-A6BE-F97B48370A96} = {53E613E6-9657-4256-A4A5-479D23F0E43B} + {CFA06A25-EE15-40BC-A852-0E5AD8B40E26} = {53E613E6-9657-4256-A4A5-479D23F0E43B} + {53E613E6-9657-4256-A4A5-479D23F0E43B} = {55758363-1568-48F4-9512-8DFE87E6867E} + {39D78422-EB39-4395-BC79-1C81500CD9DE} = {792105CF-78A4-4DD2-BE6C-D86C6A666351} + {1368685E-816B-4C75-94E2-2B00556FFE66} = {792105CF-78A4-4DD2-BE6C-D86C6A666351} + {792105CF-78A4-4DD2-BE6C-D86C6A666351} = {55758363-1568-48F4-9512-8DFE87E6867E} + {A8F94EE5-E485-4753-89F7-5CEF2F0A3B06} = {C4D83B0C-9760-433B-AC79-356CA66491E9} + {C4D83B0C-9760-433B-AC79-356CA66491E9} = {55758363-1568-48F4-9512-8DFE87E6867E} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {35095991-4720-4061-A85F-72B39261D8C0} diff --git a/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/PACKAGE.md b/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/PACKAGE.md index 9a93ad1f76eb74..e744e1b9e73df1 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/PACKAGE.md +++ b/src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/PACKAGE.md @@ -1,18 +1,21 @@ ## About + + Provides abstractions of key-value pair based configuration. Interfaces defined in this package are implemented by classes in [Microsoft.Extensions.Configuration](https://www.nuget.org/packages/Microsoft.Extensions.Configuration/) and other configuration packages. -Commonly used types: +## Key Features + + -- [Microsoft.Extensions.Configuration.IConfiguration](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration.iconfiguration) -- [Microsoft.Extensions.Configuration.IConfigurationBuilder](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration.iconfigurationbuilder) -- [Microsoft.Extensions.Configuration.IConfigurationProvider](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration.iconfigurationprovider) -- [Microsoft.Extensions.Configuration.IConfigurationRoot](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration.iconfigurationroot) -- [Microsoft.Extensions.Configuration.IConfigurationSection](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration.iconfigurationsection) +* Abstractions for string key-value pair configuration sources and sections +* Path conventions of keys establishing a heirachy of values +* Support for multiple configuration sources, aggregating and defining precdence for values +* Support for reload on change -For more information, see the documentation: [Configuration in .NET](https://learn.microsoft.com/dotnet/core/extensions/configuration). +## How to Use -## Example + The example below shows a small code sample using this library and trying out the `ConfigurationKeyName` attribute available since .NET 6: @@ -39,3 +42,41 @@ var config = new ConfigurationBuilder() var options = config.Get(); Console.WriteLine(options.NamedProperty); // returns "value for named property" ``` + +## Main Types + + + +The main types provided by this library are: + +* `Microsoft.Extensions.Configuration.IConfiguration` +* `Microsoft.Extensions.Configuration.IConfigurationBuilder` +* `Microsoft.Extensions.Configuration.IConfigurationProvider` +* `Microsoft.Extensions.Configuration.IConfigurationRoot` +* `Microsoft.Extensions.Configuration.IConfigurationSection` + +## Additional Documentation + + + +* [Configuration in .NET](https://learn.microsoft.com/dotnet/core/extensions/configuration) +* [API documentation](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration) + +## Related Packages + + +* [Microsoft.Extensions.Configuration](https://www.nuget.org/packages/Microsoft.Extensions.Configuration) +* [Microsoft.Extensions.Configuration.Binder](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.Binder) +* [Microsoft.Extensions.Configuration.CommandLine](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.CommandLine) +* [Microsoft.Extensions.Configuration.EnvironmentVariables](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.EnvironmentVariables) +* [Microsoft.Extensions.Configuration.FileExtensions](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.FileExtensions) +* [Microsoft.Extensions.Configuration.Ini](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.Ini) +* [Microsoft.Extensions.Configuration.Json](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.Json) +* [Microsoft.Extensions.Configuration.UserSecrets](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.UserSecrets) +* [Microsoft.Extensions.Configuration.Xml](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.Xml) + +## Feedback & Contributing + + + +Microsoft.Extensions.Caching.Abstractions is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/Microsoft.Extensions.Configuration.Binder.sln b/src/libraries/Microsoft.Extensions.Configuration.Binder/Microsoft.Extensions.Configuration.Binder.sln index 328b6b9b5b19f8..ac38e3aec99f60 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/Microsoft.Extensions.Configuration.Binder.sln +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/Microsoft.Extensions.Configuration.Binder.sln @@ -55,6 +55,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Option EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.ConfigurationExtensions", "..\Microsoft.Extensions.Options.ConfigurationExtensions\src\Microsoft.Extensions.Options.ConfigurationExtensions.csproj", "{856C015E-982A-4834-88F7-3F8FFD33981C}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.SourceGeneration", "..\Microsoft.Extensions.Options\gen\Microsoft.Extensions.Options.SourceGeneration.csproj", "{F132C649-6660-4583-8AD1-36D38711A994}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\ref\Microsoft.Extensions.Options.csproj", "{2D5B1B6B-1557-4A14-BC00-C36A21BC97C4}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\src\Microsoft.Extensions.Options.csproj", "{78D796C3-227B-4648-9BCB-2A000852B2F7}" @@ -91,6 +93,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\Syst EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{94C9AA55-C6AD-41CC-B6C8-9186C27A6FFE}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{AA7E297B-0BD9-4E6B-96FE-BC69FC65DB64}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{D187AB48-A05A-4C8C-900D-7F2A3D87769A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{44059045-A065-4123-AF8C-107D06782422}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{EDE541FC-0F9D-4D3E-A513-7E74788B8C0B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{10106702-31E6-4D1A-BDE0-BB8F9F6C258D}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{AAE738F3-89AC-4406-B1D9-A61A2C3A1CF0}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{F43534CA-C419-405E-B239-CDE2BDC703BE}" @@ -99,6 +111,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{94EEF122-C30 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{CC3961B0-C62D-44B9-91DB-11D94A3F91A5}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{04FEFFC9-5F1D-47CA-885C-3D7F9643D63D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{948EC8B5-A259-4D8C-B911-EDE19F5BAE40}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{8F2204E7-8124-4F7C-B663-8731C7959001}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{B343C975-AC74-4843-899C-623B6E7A6321}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -217,6 +237,10 @@ Global {856C015E-982A-4834-88F7-3F8FFD33981C}.Debug|Any CPU.Build.0 = Debug|Any CPU {856C015E-982A-4834-88F7-3F8FFD33981C}.Release|Any CPU.ActiveCfg = Release|Any CPU {856C015E-982A-4834-88F7-3F8FFD33981C}.Release|Any CPU.Build.0 = Release|Any CPU + {F132C649-6660-4583-8AD1-36D38711A994}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F132C649-6660-4583-8AD1-36D38711A994}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F132C649-6660-4583-8AD1-36D38711A994}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F132C649-6660-4583-8AD1-36D38711A994}.Release|Any CPU.Build.0 = Release|Any CPU {2D5B1B6B-1557-4A14-BC00-C36A21BC97C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2D5B1B6B-1557-4A14-BC00-C36A21BC97C4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2D5B1B6B-1557-4A14-BC00-C36A21BC97C4}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -289,6 +313,26 @@ Global {94C9AA55-C6AD-41CC-B6C8-9186C27A6FFE}.Debug|Any CPU.Build.0 = Debug|Any CPU {94C9AA55-C6AD-41CC-B6C8-9186C27A6FFE}.Release|Any CPU.ActiveCfg = Release|Any CPU {94C9AA55-C6AD-41CC-B6C8-9186C27A6FFE}.Release|Any CPU.Build.0 = Release|Any CPU + {AA7E297B-0BD9-4E6B-96FE-BC69FC65DB64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AA7E297B-0BD9-4E6B-96FE-BC69FC65DB64}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AA7E297B-0BD9-4E6B-96FE-BC69FC65DB64}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AA7E297B-0BD9-4E6B-96FE-BC69FC65DB64}.Release|Any CPU.Build.0 = Release|Any CPU + {D187AB48-A05A-4C8C-900D-7F2A3D87769A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D187AB48-A05A-4C8C-900D-7F2A3D87769A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D187AB48-A05A-4C8C-900D-7F2A3D87769A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D187AB48-A05A-4C8C-900D-7F2A3D87769A}.Release|Any CPU.Build.0 = Release|Any CPU + {44059045-A065-4123-AF8C-107D06782422}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {44059045-A065-4123-AF8C-107D06782422}.Debug|Any CPU.Build.0 = Debug|Any CPU + {44059045-A065-4123-AF8C-107D06782422}.Release|Any CPU.ActiveCfg = Release|Any CPU + {44059045-A065-4123-AF8C-107D06782422}.Release|Any CPU.Build.0 = Release|Any CPU + {EDE541FC-0F9D-4D3E-A513-7E74788B8C0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EDE541FC-0F9D-4D3E-A513-7E74788B8C0B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EDE541FC-0F9D-4D3E-A513-7E74788B8C0B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EDE541FC-0F9D-4D3E-A513-7E74788B8C0B}.Release|Any CPU.Build.0 = Release|Any CPU + {10106702-31E6-4D1A-BDE0-BB8F9F6C258D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {10106702-31E6-4D1A-BDE0-BB8F9F6C258D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {10106702-31E6-4D1A-BDE0-BB8F9F6C258D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {10106702-31E6-4D1A-BDE0-BB8F9F6C258D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -334,12 +378,21 @@ Global {5DF5B4A7-D78A-400E-A49E-54F33CA51006} = {94EEF122-C307-4BF0-88FE-263B89B59F9F} {94C9AA55-C6AD-41CC-B6C8-9186C27A6FFE} = {94EEF122-C307-4BF0-88FE-263B89B59F9F} {D4B3EEA1-7394-49EA-A088-897C0CD26D11} = {CC3961B0-C62D-44B9-91DB-11D94A3F91A5} + {F132C649-6660-4583-8AD1-36D38711A994} = {CC3961B0-C62D-44B9-91DB-11D94A3F91A5} {9E2C43CF-2E01-4570-8C02-F678607DDAFF} = {CC3961B0-C62D-44B9-91DB-11D94A3F91A5} {05B7F752-4991-4DC8-9B06-8269211E7817} = {CC3961B0-C62D-44B9-91DB-11D94A3F91A5} {6E58AF2F-AB35-4279-9135-67E97BCE1432} = {CC3961B0-C62D-44B9-91DB-11D94A3F91A5} {D2FE6BEA-70F5-4AE3-8D29-DB6568A9DE49} = {CC3961B0-C62D-44B9-91DB-11D94A3F91A5} {47E22F0C-5F36-450B-8020-B83B36936597} = {CC3961B0-C62D-44B9-91DB-11D94A3F91A5} {4A2E7449-5480-4872-91B3-B5A479D6A787} = {CC3961B0-C62D-44B9-91DB-11D94A3F91A5} + {AA7E297B-0BD9-4E6B-96FE-BC69FC65DB64} = {04FEFFC9-5F1D-47CA-885C-3D7F9643D63D} + {D187AB48-A05A-4C8C-900D-7F2A3D87769A} = {04FEFFC9-5F1D-47CA-885C-3D7F9643D63D} + {04FEFFC9-5F1D-47CA-885C-3D7F9643D63D} = {B343C975-AC74-4843-899C-623B6E7A6321} + {44059045-A065-4123-AF8C-107D06782422} = {948EC8B5-A259-4D8C-B911-EDE19F5BAE40} + {EDE541FC-0F9D-4D3E-A513-7E74788B8C0B} = {948EC8B5-A259-4D8C-B911-EDE19F5BAE40} + {948EC8B5-A259-4D8C-B911-EDE19F5BAE40} = {B343C975-AC74-4843-899C-623B6E7A6321} + {10106702-31E6-4D1A-BDE0-BB8F9F6C258D} = {8F2204E7-8124-4F7C-B663-8731C7959001} + {8F2204E7-8124-4F7C-B663-8731C7959001} = {B343C975-AC74-4843-899C-623B6E7A6321} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {A97DC4BF-32F0-46E8-B91C-84D1E7F2A27E} diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/README.md b/src/libraries/Microsoft.Extensions.Configuration.Binder/README.md index 146f3b8a47a48e..142e14aefe84f4 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/README.md +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/README.md @@ -2,7 +2,7 @@ Provides the functionality to bind an object to data in configuration providers for [Microsoft.Extensions.Configuration](https://www.nuget.org/packages/Microsoft.Extensions.Configuration/). -Documentation can be found at https://learn.microsoft.com/dotnet/core/extensions/configuration +Documentation can be found at https://learn.microsoft.com/dotnet/core/extensions/configuration. ## Contribution Bar - [x] [We consider new features, new APIs, bug fixes, and performance changes](../README.md#contribution-bar) @@ -89,3 +89,42 @@ You can include a configuration file using a code like this in your `.csproj` fi ``` + +## Contributing changes to the source generator + +Along with the binder assembly that uses reflection, we ship a source generator assembly that provides a reflection and AOT compatible implementation. It works by intercepting regular binding calls and redirecting them to new routines that execute strongly typed binding logic. + +### Worfklow + +- [Build the .NET libraries and runtime assemblies](https://github.com/dotnet/runtime/tree/7ed33d80c92fa0b7ae740df60a460e984f2f442b#how-can-i-contribute) +- Make the generator changes in the `gen\` directory +- Validate the changes by running the source generator tests in `tests\SourceGeneratorTests` + +### Testing + +Here's a general command for running the the generator tests. They assume that you're making the changes in a Windows OS and running the from the `tests\SourceGeneratorTests\` directory. + +```ps +dotnet build /t:test +``` + +If applicable, add new tests to validate your contribution. See [this documentation](https://github.com/dotnet/runtime/blob/7ed33d80c92fa0b7ae740df60a460e984f2f442b/docs/workflow/README.md#full-instructions-on-building-and-testing-the-runtime-repo) for details. + +#### Stale generator bits + +Sometimes the SDK uses stale bits of the generator. This can lead to unexpected test behavior or failures. Killing `dotnet.exe` processes usually solves the issue, e.g. with `taskkill /F /IM dotnet.exe /T`. + +#### Updating baselines + +Some contributions might change the logic emitted by the generator. We maintain baseline [source files](https://github.com/dotnet/runtime/tree/e3e9758a10870a8f99a93a25e54ab2837d3abefc/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines) to track the code emitted to handle some core binding scenarios. + +If the emitted code changes, these tests will fail locally and in continuous integration checks (for PRs) changes. You would need to update the baseline source files, manually or by using the following commands (PowerShell): + +```ps +> $env:RepoRootDir = "D:\repos\dotnet_runtime" +> dotnet build t:test -f /p:UpdateBaselines=true +``` + +We have a [test helper](https://github.com/dotnet/runtime/blob/e3e9758a10870a8f99a93a25e54ab2837d3abefc/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/GeneratorTests.Helpers.cs#L105-L118) to update the baselines. It requires setting an environment variable called `RepoRootDir` to the root repo path. In additon, the `UpdateBaselines` MSBuild property needs to be set to `true`. + +After updating the baselines, inspect the changes to verify that they are valid. Note that the baseline tests will fail if the new code causes errors when building the resulting compilation. \ No newline at end of file diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/ConfigurationBindingGenerator.Emitter.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/ConfigurationBindingGenerator.Emitter.cs index 756e10bc26b8d5..7206d549041147 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/ConfigurationBindingGenerator.Emitter.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/ConfigurationBindingGenerator.Emitter.cs @@ -1,10 +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; using System.Collections.Immutable; -using System.Diagnostics; -using System.Text.RegularExpressions; using Microsoft.CodeAnalysis; using SourceGenerators; @@ -16,12 +13,6 @@ private sealed partial class Emitter { private readonly SourceProductionContext _context; private readonly SourceGenerationSpec _sourceGenSpec; - - private bool _emitBlankLineBeforeNextStatement; - private int _valueSuffixIndex; - - private static readonly Regex s_arrayBracketsRegex = new(Regex.Escape("[]")); - private readonly SourceWriter _writer = new(); public Emitter(SourceProductionContext context, SourceGenerationSpec sourceGenSpec) @@ -64,163 +55,6 @@ file static class {{Identifier.BindingExtensions}} _context.AddSource($"{Identifier.BindingExtensions}.g.cs", _writer.ToSourceText()); } - private void EmitBindCoreCall( - TypeSpec type, - string memberAccessExpr, - string configArgExpr, - InitializationKind initKind, - Action? writeOnSuccess = null) - { - Debug.Assert(type.CanInitialize); - - if (!type.NeedsMemberBinding) - { - EmitObjectInit(memberAccessExpr, initKind); - return; - } - - string tempIdentifier = GetIncrementalIdentifier(Identifier.temp); - if (initKind is InitializationKind.AssignmentWithNullCheck) - { - Debug.Assert(!type.IsValueType); - _writer.WriteLine($"{type.DisplayString}? {tempIdentifier} = {memberAccessExpr};"); - EmitBindCoreCall(tempIdentifier, InitializationKind.AssignmentWithNullCheck); - } - else if (initKind is InitializationKind.None && type.IsValueType) - { - EmitBindCoreCall(tempIdentifier, InitializationKind.Declaration); - _writer.WriteLine($"{memberAccessExpr} = {tempIdentifier};"); - } - else - { - EmitBindCoreCall(memberAccessExpr, initKind); - } - - void EmitBindCoreCall(string objExpression, InitializationKind initKind) - { - string bindCoreCall = $@"{nameof(MethodsToGen_CoreBindingHelper.BindCore)}({configArgExpr}, ref {objExpression}, {Identifier.binderOptions});"; - EmitObjectInit(objExpression, initKind); - _writer.WriteLine(bindCoreCall); - writeOnSuccess?.Invoke(objExpression); - } - - void EmitObjectInit(string objExpression, InitializationKind initKind) - { - if (initKind is not InitializationKind.None) - { - this.EmitObjectInit(type, objExpression, initKind, configArgExpr); - } - } - } - - private void EmitBindLogicFromString( - ParsableFromStringSpec type, - string sectionValueExpr, - string sectionPathExpr, - Action? writeOnSuccess, - bool checkForNullSectionValue, - bool useIncrementalStringValueIdentifier) - { - StringParsableTypeKind typeKind = type.StringParsableTypeKind; - Debug.Assert(typeKind is not StringParsableTypeKind.None); - - string nonNull_StringValue_Identifier = useIncrementalStringValueIdentifier ? GetIncrementalIdentifier(Identifier.value) : Identifier.value; - string stringValueToParse_Expr = checkForNullSectionValue ? nonNull_StringValue_Identifier : sectionValueExpr; - - string parsedValueExpr; - if (typeKind is StringParsableTypeKind.AssignFromSectionValue) - { - parsedValueExpr = stringValueToParse_Expr; - } - else if (typeKind is StringParsableTypeKind.Enum) - { - parsedValueExpr = $"ParseEnum<{type.DisplayString}>({stringValueToParse_Expr}, () => {sectionPathExpr})"; - } - else - { - parsedValueExpr = $"{type.ParseMethodName}({stringValueToParse_Expr}, () => {sectionPathExpr})"; - } - - if (!checkForNullSectionValue) - { - InvokeWriteOnSuccess(); - } - else - { - EmitStartBlock($"if ({sectionValueExpr} is string {nonNull_StringValue_Identifier})"); - InvokeWriteOnSuccess(); - EmitEndBlock(); - } - - void InvokeWriteOnSuccess() => writeOnSuccess?.Invoke(parsedValueExpr); - } - - private bool EmitObjectInit(TypeSpec type, string memberAccessExpr, InitializationKind initKind, string configArgExpr) - { - Debug.Assert(type.CanInitialize && initKind is not InitializationKind.None); - - string initExpr; - CollectionSpec? collectionType = type as CollectionSpec; - - string effectiveDisplayString = type.DisplayString; - if (collectionType is not null) - { - if (collectionType is EnumerableSpec { InitializationStrategy: InitializationStrategy.Array }) - { - initExpr = $"new {s_arrayBracketsRegex.Replace(effectiveDisplayString, "[0]", 1)}"; - } - else - { - effectiveDisplayString = (collectionType.ConcreteType ?? collectionType).DisplayString; - initExpr = $"new {effectiveDisplayString}()"; - } - } - else if (type.InitializationStrategy is InitializationStrategy.ParameterlessConstructor) - { - initExpr = $"new {effectiveDisplayString}()"; - } - else - { - Debug.Assert(type.InitializationStrategy is InitializationStrategy.ParameterizedConstructor); - string initMethodIdentifier = GetInitalizeMethodDisplayString(((ObjectSpec)type)); - initExpr = $"{initMethodIdentifier}({configArgExpr}, {Identifier.binderOptions})"; - } - - if (initKind == InitializationKind.Declaration) - { - Debug.Assert(!memberAccessExpr.Contains(".")); - _writer.WriteLine($"var {memberAccessExpr} = {initExpr};"); - } - else if (initKind == InitializationKind.AssignmentWithNullCheck) - { - if (collectionType is CollectionSpec - { - InitializationStrategy: InitializationStrategy.ParameterizedConstructor or InitializationStrategy.ToEnumerableMethod - }) - { - if (collectionType.InitializationStrategy is InitializationStrategy.ParameterizedConstructor) - { - _writer.WriteLine($"{memberAccessExpr} = {memberAccessExpr} is null ? {initExpr} : new {effectiveDisplayString}({memberAccessExpr});"); - } - else - { - _writer.WriteLine($"{memberAccessExpr} = {memberAccessExpr} is null ? {initExpr} : {memberAccessExpr}.{collectionType.ToEnumerableMethodCall!};"); - } - } - else - { - _writer.WriteLine($"{memberAccessExpr} ??= {initExpr};"); - } - } - else - { - Debug.Assert(initKind is InitializationKind.SimpleAssignment); - _writer.WriteLine($"{memberAccessExpr} = {initExpr};"); - } - - return true; - } - private void EmitInterceptsLocationAttrDecl() { _writer.WriteLine(); @@ -250,18 +84,6 @@ private void EmitUsingStatements() _writer.WriteLine($"using {@namespace};"); } } - - private void EmitIConfigurationHasValueOrChildrenCheck(bool voidReturn) - { - string returnPostfix = voidReturn ? string.Empty : " null"; - _writer.WriteLine($$""" - if (!{{Identifier.HasValueOrChildren}}({{Identifier.configuration}})) - { - return{{returnPostfix}}; - } - """); - _writer.WriteLine(); - } } } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/ConfigurationBindingGenerator.Parser.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/ConfigurationBindingGenerator.Parser.cs index 64db4eb58b1f77..2a6f5d2126e8c8 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/ConfigurationBindingGenerator.Parser.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/ConfigurationBindingGenerator.Parser.cs @@ -9,6 +9,7 @@ using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Operations; +using SourceGenerators; namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { @@ -51,25 +52,26 @@ public Parser(SourceProductionContext context, KnownTypeSymbols typeSymbols, Imm if (SymbolEqualityComparer.Default.Equals(candidateBinderType, _typeSymbols.ConfigurationBinder)) { - RegisterMethodInvocation_ConfigurationBinder(invocation); + ParseInvocation_ConfigurationBinder(invocation); } else if (SymbolEqualityComparer.Default.Equals(candidateBinderType, _typeSymbols.OptionsBuilderConfigurationExtensions)) { - RegisterMethodInvocation_OptionsBuilderExt(invocation); + ParseInvocation_OptionsBuilderExt(invocation); } else if (SymbolEqualityComparer.Default.Equals(candidateBinderType, _typeSymbols.OptionsConfigurationServiceCollectionExtensions)) { - RegisterMethodInvocation_ServiceCollectionExt(invocation); + ParseInvocation_ServiceCollectionExt(invocation); } } return _sourceGenSpec; } - private static bool IsValidRootConfigType(ITypeSymbol? type) + private bool IsValidRootConfigType(ITypeSymbol? type) { if (type is null || type.SpecialType is SpecialType.System_Object or SpecialType.System_Void || + !_typeSymbols.Compilation.IsSymbolAccessibleWithin(type, _typeSymbols.Compilation.Assembly) || type.TypeKind is TypeKind.TypeParameter or TypeKind.Pointer or TypeKind.Error || type.IsRefLikeType || ContainsGenericParameters(type)) @@ -118,7 +120,7 @@ type.TypeKind is TypeKind.TypeParameter or TypeKind.Pointer or TypeKind.Error || if (IsNullable(type, out ITypeSymbol? underlyingType)) { - spec = TryGetTypeSpec(underlyingType, Diagnostics.NullableUnderlyingTypeNotSupported, out TypeSpec? underlyingTypeSpec) + spec = MemberTypeIsBindable(type, underlyingType, Diagnostics.NullableUnderlyingTypeNotSupported, out TypeSpec? underlyingTypeSpec) ? new NullableSpec(type, underlyingTypeSpec) : null; } @@ -163,13 +165,7 @@ type.TypeKind is TypeKind.TypeParameter or TypeKind.Pointer or TypeKind.Error || RegisterTypeDiagnostic(type, diag); } - if (spec is null) - { - return null; - } - - string @namespace = spec.Namespace; - if (@namespace is not null and not "") + if (spec is { Namespace: string @namespace } && @namespace is not "") { _sourceGenSpec.Namespaces.Add(@namespace); } @@ -177,28 +173,36 @@ type.TypeKind is TypeKind.TypeParameter or TypeKind.Pointer or TypeKind.Error || return _createdSpecs[type] = spec; } - private void RegisterTypeForBindCoreMainGen(TypeSpec typeSpec) + private bool TryRegisterTypeForBindCoreMainGen(ComplexTypeSpec type) { - if (typeSpec.NeedsMemberBinding) + if (type.HasBindableMembers) { - RegisterTypeForMethodGen(MethodsToGen_CoreBindingHelper.BindCoreMain, typeSpec); - RegisterTypeForBindCoreGen(typeSpec); - _sourceGenSpec.MethodsToGen_CoreBindingHelper |= MethodsToGen_CoreBindingHelper.AsConfigWithChildren; + bool registeredForBindCoreGen = TryRegisterTypeForBindCoreGen(type); + Debug.Assert(registeredForBindCoreGen); + + RegisterTypeForMethodGen(MethodsToGen_CoreBindingHelper.BindCoreMain, type); + Register_AsConfigWithChildren_HelperForGen_IfRequired(type); + return true; } + + return false; } - private void RegisterTypeForBindCoreGen(TypeSpec typeSpec) + private bool TryRegisterTypeForBindCoreGen(ComplexTypeSpec type) { - if (typeSpec.NeedsMemberBinding) + if (type.HasBindableMembers) { - RegisterTypeForMethodGen(MethodsToGen_CoreBindingHelper.BindCore, typeSpec); + RegisterTypeForMethodGen(MethodsToGen_CoreBindingHelper.BindCore, type); + return true; } + + return false; } private void RegisterTypeForGetCoreGen(TypeSpec typeSpec) { RegisterTypeForMethodGen(MethodsToGen_CoreBindingHelper.GetCore, typeSpec); - _sourceGenSpec.MethodsToGen_CoreBindingHelper |= MethodsToGen_CoreBindingHelper.AsConfigWithChildren; + Register_AsConfigWithChildren_HelperForGen_IfRequired(typeSpec); } private void RegisterTypeForMethodGen(MethodsToGen_CoreBindingHelper method, TypeSpec type) @@ -212,11 +216,19 @@ private void RegisterTypeForMethodGen(MethodsToGen_CoreBindingHelper method, Typ _sourceGenSpec.MethodsToGen_CoreBindingHelper |= method; } + private void Register_AsConfigWithChildren_HelperForGen_IfRequired(TypeSpec possibleComplexType) + { + if (possibleComplexType is ComplexTypeSpec) + { + _sourceGenSpec.MethodsToGen_CoreBindingHelper |= MethodsToGen_CoreBindingHelper.AsConfigWithChildren; + } + } + /// /// Registers interceptors for root binding methods, except for ConfigurationBinder.Bind, - /// which is handled by + /// which is handled by /// - private void RegisterAsInterceptor(Enum method, IInvocationOperation operation) => + private void RegisterInterceptor(Enum method, IInvocationOperation operation) => _sourceGenSpec.InterceptionInfo.RegisterCacheEntry(method, new InterceptorLocationInfo(operation)); private static bool IsNullable(ITypeSymbol type, [NotNullWhen(true)] out ITypeSymbol? underlyingType) @@ -337,61 +349,33 @@ private bool IsParsableFromString(ITypeSymbol type, out StringParsableTypeKind t } } - private bool TryGetTypeSpec(ITypeSymbol type, DiagnosticDescriptor descriptor, out TypeSpec? spec) + private EnumerableSpec? CreateArraySpec(IArrayTypeSymbol arrayTypeSymbol) { - spec = GetOrCreateTypeSpec(type); + ITypeSymbol elementTypeSymbol = arrayTypeSymbol.ElementType; - if (spec is null) - { - RegisterUnsupportedType(type, descriptor); - return false; - } - - return true; - } - - private EnumerableSpec? CreateArraySpec(IArrayTypeSymbol arrayType) - { - if (!TryGetTypeSpec(arrayType.ElementType, Diagnostics.ElementTypeNotSupported, out TypeSpec elementSpec)) + if (!MemberTypeIsBindable(arrayTypeSymbol, elementTypeSymbol, Diagnostics.ElementTypeNotSupported, out TypeSpec elementTypeSpec)) { return null; } - // We want a BindCore method for List as a temp holder for the array values. We know the element type is supported. - EnumerableSpec listSpec = (GetOrCreateTypeSpec(_typeSymbols.List.Construct(arrayType.ElementType)) as EnumerableSpec)!; - RegisterTypeForBindCoreGen(listSpec); + // We want a BindCore method for List as a temp holder for the array values. + // Since the element type is supported, we can certainly a list of elements. + EnumerableSpec listTypeSpec = (EnumerableSpec)GetOrCreateTypeSpec(_typeSymbols.List.Construct(elementTypeSymbol)); - EnumerableSpec spec = new EnumerableSpec(arrayType) + EnumerableSpec spec = new EnumerableSpec(arrayTypeSymbol) { - ElementType = elementSpec, - ConcreteType = listSpec, - InitializationStrategy = InitializationStrategy.Array, + ElementType = elementTypeSpec, + InstantiationStrategy = InstantiationStrategy.Array, PopulationStrategy = CollectionPopulationStrategy.Cast_Then_Add, // Using the concrete list type as a temp holder. - ToEnumerableMethodCall = null, + TypeToInstantiate = listTypeSpec, + PopulationCastType = null, }; - Debug.Assert(spec.CanInitialize); - RegisterTypeForBindCoreGen(spec); - + bool registeredForBindCore = TryRegisterTypeForBindCoreGen(listTypeSpec) && TryRegisterTypeForBindCoreGen(spec); + Debug.Assert(registeredForBindCore); return spec; } - private bool IsSupportedArrayType(ITypeSymbol type) - { - if (type is not IArrayTypeSymbol arrayType) - { - return false; - } - - if (arrayType.Rank > 1) - { - RegisterUnsupportedType(arrayType, Diagnostics.MultiDimArraysNotSupported); - return false; - } - - return true; - } - private CollectionSpec? CreateCollectionSpec(INamedTypeSymbol type) { CollectionSpec? spec; @@ -405,38 +389,38 @@ private bool IsSupportedArrayType(ITypeSymbol type) spec = CreateEnumerableSpec(type); } - if (spec is not null) + if (spec is null) { - RegisterTypeForBindCoreGen(spec); - spec.InitExceptionMessage ??= spec.ElementType.InitExceptionMessage; + return null; } + bool registerForBindCoreGen = TryRegisterTypeForBindCoreGen(spec); + Debug.Assert(registerForBindCoreGen); return spec; } private DictionarySpec CreateDictionarySpec(INamedTypeSymbol type, ITypeSymbol keyType, ITypeSymbol elementType) { - if (!TryGetTypeSpec(keyType, Diagnostics.DictionaryKeyNotSupported, out TypeSpec keySpec) || - !TryGetTypeSpec(elementType, Diagnostics.ElementTypeNotSupported, out TypeSpec elementSpec)) + if (!MemberTypeIsBindable(type, keyType, Diagnostics.DictionaryKeyNotSupported, out TypeSpec keySpec) || + !MemberTypeIsBindable(type, elementType, Diagnostics.ElementTypeNotSupported, out TypeSpec elementSpec)) { return null; } - if (keySpec.SpecKind != TypeSpecKind.ParsableFromString) + if (keySpec.SpecKind is not TypeSpecKind.ParsableFromString) { RegisterUnsupportedType(type, Diagnostics.DictionaryKeyNotSupported); return null; } - InitializationStrategy constructionStrategy; + InstantiationStrategy constructionStrategy; CollectionPopulationStrategy populationStrategy; - INamedTypeSymbol? concreteType = null; + INamedTypeSymbol? typeToInstantiate = null; INamedTypeSymbol? populationCastType = null; - string? toEnumerableMethodCall = null; if (HasPublicParameterLessCtor(type)) { - constructionStrategy = InitializationStrategy.ParameterlessConstructor; + constructionStrategy = InstantiationStrategy.ParameterlessConstructor; if (HasAddMethod(type, keyType, elementType)) { @@ -455,17 +439,16 @@ private DictionarySpec CreateDictionarySpec(INamedTypeSymbol type, ITypeSymbol k } else if (IsInterfaceMatch(type, _typeSymbols.GenericIDictionary_Unbound) || IsInterfaceMatch(type, _typeSymbols.IDictionary)) { - concreteType = _typeSymbols.Dictionary; - constructionStrategy = InitializationStrategy.ParameterlessConstructor; + typeToInstantiate = _typeSymbols.Dictionary; + constructionStrategy = InstantiationStrategy.ParameterlessConstructor; populationStrategy = CollectionPopulationStrategy.Add; } else if (IsInterfaceMatch(type, _typeSymbols.IReadOnlyDictionary_Unbound)) { - concreteType = _typeSymbols.Dictionary; + typeToInstantiate = _typeSymbols.Dictionary; populationCastType = _typeSymbols.GenericIDictionary; - constructionStrategy = InitializationStrategy.ToEnumerableMethod; + constructionStrategy = InstantiationStrategy.ToEnumerableMethod; populationStrategy = CollectionPopulationStrategy.Cast_Then_Add; - toEnumerableMethodCall = "ToDictionary(pair => pair.Key, pair => pair.Value)"; _sourceGenSpec.Namespaces.Add("System.Linq"); } else @@ -474,38 +457,37 @@ private DictionarySpec CreateDictionarySpec(INamedTypeSymbol type, ITypeSymbol k return null; } + Debug.Assert(!(populationStrategy is CollectionPopulationStrategy.Cast_Then_Add && populationCastType is null)); + DictionarySpec spec = new(type) { KeyType = (ParsableFromStringSpec)keySpec, ElementType = elementSpec, - InitializationStrategy = constructionStrategy, + InstantiationStrategy = constructionStrategy, PopulationStrategy = populationStrategy, - ToEnumerableMethodCall = toEnumerableMethodCall, + TypeToInstantiate = ConstructGenericCollectionSpecIfRequired(typeToInstantiate, keyType, elementType) as DictionarySpec, + PopulationCastType = ConstructGenericCollectionSpecIfRequired(populationCastType, keyType, elementType) as DictionarySpec, }; - Debug.Assert(!(populationStrategy is CollectionPopulationStrategy.Cast_Then_Add && populationCastType is null)); - spec.ConcreteType = ConstructGenericCollectionSpecIfRequired(concreteType, keyType, elementType); - spec.PopulationCastType = ConstructGenericCollectionSpecIfRequired(populationCastType, keyType, elementType); - return spec; } private EnumerableSpec? CreateEnumerableSpec(INamedTypeSymbol type) { if (!TryGetElementType(type, out ITypeSymbol? elementType) || - !TryGetTypeSpec(elementType, Diagnostics.ElementTypeNotSupported, out TypeSpec elementSpec)) + !MemberTypeIsBindable(type, elementType, Diagnostics.ElementTypeNotSupported, out TypeSpec elementSpec)) { return null; } - InitializationStrategy constructionStrategy; + InstantiationStrategy instantiationStrategy; CollectionPopulationStrategy populationStrategy; - INamedTypeSymbol? concreteType = null; + INamedTypeSymbol? typeToInstantiate = null; INamedTypeSymbol? populationCastType = null; if (HasPublicParameterLessCtor(type)) { - constructionStrategy = InitializationStrategy.ParameterlessConstructor; + instantiationStrategy = InstantiationStrategy.ParameterlessConstructor; if (HasAddMethod(type, elementType)) { @@ -525,35 +507,35 @@ private DictionarySpec CreateDictionarySpec(INamedTypeSymbol type, ITypeSymbol k else if (IsInterfaceMatch(type, _typeSymbols.GenericICollection_Unbound) || IsInterfaceMatch(type, _typeSymbols.GenericIList_Unbound)) { - concreteType = _typeSymbols.List; - constructionStrategy = InitializationStrategy.ParameterlessConstructor; + typeToInstantiate = _typeSymbols.List; + instantiationStrategy = InstantiationStrategy.ParameterlessConstructor; populationStrategy = CollectionPopulationStrategy.Add; } else if (IsInterfaceMatch(type, _typeSymbols.GenericIEnumerable_Unbound)) { - concreteType = _typeSymbols.List; + typeToInstantiate = _typeSymbols.List; populationCastType = _typeSymbols.GenericICollection; - constructionStrategy = InitializationStrategy.ParameterizedConstructor; + instantiationStrategy = InstantiationStrategy.ParameterizedConstructor; populationStrategy = CollectionPopulationStrategy.Cast_Then_Add; } else if (IsInterfaceMatch(type, _typeSymbols.ISet_Unbound)) { - concreteType = _typeSymbols.HashSet; - constructionStrategy = InitializationStrategy.ParameterlessConstructor; + typeToInstantiate = _typeSymbols.HashSet; + instantiationStrategy = InstantiationStrategy.ParameterlessConstructor; populationStrategy = CollectionPopulationStrategy.Add; } else if (IsInterfaceMatch(type, _typeSymbols.IReadOnlySet_Unbound)) { - concreteType = _typeSymbols.HashSet; + typeToInstantiate = _typeSymbols.HashSet; populationCastType = _typeSymbols.ISet; - constructionStrategy = InitializationStrategy.ParameterizedConstructor; + instantiationStrategy = InstantiationStrategy.ParameterizedConstructor; populationStrategy = CollectionPopulationStrategy.Cast_Then_Add; } else if (IsInterfaceMatch(type, _typeSymbols.IReadOnlyList_Unbound) || IsInterfaceMatch(type, _typeSymbols.IReadOnlyCollection_Unbound)) { - concreteType = _typeSymbols.List; + typeToInstantiate = _typeSymbols.List; populationCastType = _typeSymbols.GenericICollection; - constructionStrategy = InitializationStrategy.ParameterizedConstructor; + instantiationStrategy = InstantiationStrategy.ParameterizedConstructor; populationStrategy = CollectionPopulationStrategy.Cast_Then_Add; } else @@ -562,40 +544,37 @@ private DictionarySpec CreateDictionarySpec(INamedTypeSymbol type, ITypeSymbol k return null; } - Register_AsConfigWithChildren_HelperForGen_IfRequired(elementSpec); + Debug.Assert(!(populationStrategy is CollectionPopulationStrategy.Cast_Then_Add && populationCastType is null)); EnumerableSpec spec = new(type) { ElementType = elementSpec, - InitializationStrategy = constructionStrategy, + InstantiationStrategy = instantiationStrategy, PopulationStrategy = populationStrategy, - ToEnumerableMethodCall = null, + TypeToInstantiate = ConstructGenericCollectionSpecIfRequired(typeToInstantiate, elementType) as EnumerableSpec, + PopulationCastType = ConstructGenericCollectionSpecIfRequired(populationCastType, elementType) as EnumerableSpec, }; - Debug.Assert(!(populationStrategy is CollectionPopulationStrategy.Cast_Then_Add && populationCastType is null)); - spec.ConcreteType = ConstructGenericCollectionSpecIfRequired(concreteType, elementType); - spec.PopulationCastType = ConstructGenericCollectionSpecIfRequired(populationCastType, elementType); - return spec; } - private ObjectSpec? CreateObjectSpec(INamedTypeSymbol type) + private ObjectSpec? CreateObjectSpec(INamedTypeSymbol objectSymbol) { // Add spec to cache before traversing properties to avoid stack overflow. - ObjectSpec objectSpec = new(type); - _createdSpecs.Add(type, objectSpec); + ObjectSpec objectSpec = new(objectSymbol); + _createdSpecs.Add(objectSymbol, objectSpec); string typeName = objectSpec.Name; IMethodSymbol? ctor = null; - DiagnosticDescriptor? diagnosticDescriptor = null; + DiagnosticDescriptor? initDiagDescriptor = null; - if (!(type.IsAbstract || type.TypeKind is TypeKind.Interface)) + if (!(objectSymbol.IsAbstract || objectSymbol.TypeKind is TypeKind.Interface)) { IMethodSymbol? parameterlessCtor = null; IMethodSymbol? parameterizedCtor = null; bool hasMultipleParameterizedCtors = false; - foreach (IMethodSymbol candidate in type.InstanceConstructors) + foreach (IMethodSymbol candidate in objectSymbol.InstanceConstructors) { if (candidate.DeclaredAccessibility is not Accessibility.Public) { @@ -616,35 +595,36 @@ private DictionarySpec CreateDictionarySpec(INamedTypeSymbol type, ITypeSymbol k } } - bool hasPublicParameterlessCtor = type.IsValueType || parameterlessCtor is not null; + bool hasPublicParameterlessCtor = objectSymbol.IsValueType || parameterlessCtor is not null; if (!hasPublicParameterlessCtor && hasMultipleParameterizedCtors) { - diagnosticDescriptor = Diagnostics.MultipleParameterizedConstructors; + initDiagDescriptor = Diagnostics.MultipleParameterizedConstructors; objectSpec.InitExceptionMessage = string.Format(Emitter.ExceptionMessages.MultipleParameterizedConstructors, typeName); } - ctor = type.IsValueType + ctor = objectSymbol.IsValueType // Roslyn ctor fetching APIs include paramerterless ctors for structs, unlike System.Reflection. ? parameterizedCtor ?? parameterlessCtor : parameterlessCtor ?? parameterizedCtor; } - objectSpec.InitializationStrategy = ctor?.Parameters.Length is 0 ? InitializationStrategy.ParameterlessConstructor : InitializationStrategy.ParameterizedConstructor; - if (ctor is null) { - diagnosticDescriptor = Diagnostics.MissingPublicInstanceConstructor; + initDiagDescriptor = Diagnostics.MissingPublicInstanceConstructor; objectSpec.InitExceptionMessage = string.Format(Emitter.ExceptionMessages.MissingPublicInstanceConstructor, typeName); } + else + { + objectSpec.InstantiationStrategy = ctor.Parameters.Length is 0 ? InstantiationStrategy.ParameterlessConstructor : InstantiationStrategy.ParameterizedConstructor; + } - if (diagnosticDescriptor is not null) + if (initDiagDescriptor is not null) { Debug.Assert(objectSpec.InitExceptionMessage is not null); - RegisterUnsupportedType(type, diagnosticDescriptor); - return objectSpec; + RegisterUnsupportedType(objectSymbol, initDiagDescriptor); } - INamedTypeSymbol current = type; + INamedTypeSymbol current = objectSymbol; while (current is not null) { ImmutableArray members = current.GetMembers(); @@ -653,12 +633,12 @@ private DictionarySpec CreateDictionarySpec(INamedTypeSymbol type, ITypeSymbol k if (member is IPropertySymbol { IsIndexer: false, IsImplicitlyDeclared: false } property) { string propertyName = property.Name; - TypeSpec? propertyTypeSpec = GetOrCreateTypeSpec(property.Type); + TypeSpec propertyTypeSpec = GetOrCreateTypeSpec(property.Type); - if (propertyTypeSpec?.CanInitialize is not true) + if (propertyTypeSpec?.CanBindTo is not true) { - InvocationDiagnosticInfo propertyDiagnostic = new InvocationDiagnosticInfo(Diagnostics.PropertyNotSupported, new string[] { propertyName, type.ToDisplayString() }); - RegisterTypeDiagnostic(causingType: type, propertyDiagnostic); + InvocationDiagnosticInfo propertyDiagnostic = new InvocationDiagnosticInfo(Diagnostics.PropertyNotSupported, new string[] { propertyName, objectSymbol.ToDisplayString() }); + RegisterTypeDiagnostic(causingType: objectSymbol, propertyDiagnostic); _invocationTargetTypeDiags.Add(propertyDiagnostic); } @@ -666,8 +646,8 @@ private DictionarySpec CreateDictionarySpec(INamedTypeSymbol type, ITypeSymbol k { AttributeData? attributeData = property.GetAttributes().FirstOrDefault(a => SymbolEqualityComparer.Default.Equals(a.AttributeClass, _typeSymbols.ConfigurationKeyNameAttribute)); string configKeyName = attributeData?.ConstructorArguments.FirstOrDefault().Value as string ?? propertyName; - PropertySpec spec = new(property) { Type = propertyTypeSpec, ConfigurationKeyName = configKeyName }; + objectSpec.Properties[propertyName] = spec; Register_AsConfigWithChildren_HelperForGen_IfRequired(propertyTypeSpec); } @@ -676,7 +656,7 @@ private DictionarySpec CreateDictionarySpec(INamedTypeSymbol type, ITypeSymbol k current = current.BaseType; } - if (objectSpec.InitializationStrategy is InitializationStrategy.ParameterizedConstructor) + if (objectSpec.InstantiationStrategy is InstantiationStrategy.ParameterizedConstructor) { List missingParameters = new(); List invalidParameters = new(); @@ -712,9 +692,9 @@ private DictionarySpec CreateDictionarySpec(INamedTypeSymbol type, ITypeSymbol k } else if (missingParameters.Count > 0) { - if (type.IsValueType) + if (objectSymbol.IsValueType) { - objectSpec.InitializationStrategy = InitializationStrategy.ParameterlessConstructor; + objectSpec.InstantiationStrategy = InstantiationStrategy.ParameterlessConstructor; } else { @@ -722,7 +702,7 @@ private DictionarySpec CreateDictionarySpec(INamedTypeSymbol type, ITypeSymbol k } } - if (objectSpec.CanInitialize) + if (objectSpec.CanInstantiate) { RegisterTypeForMethodGen(MethodsToGen_CoreBindingHelper.Initialize, objectSpec); } @@ -730,26 +710,25 @@ private DictionarySpec CreateDictionarySpec(INamedTypeSymbol type, ITypeSymbol k static string FormatParams(List names) => string.Join(",", names); } - Debug.Assert((objectSpec.CanInitialize && objectSpec.InitExceptionMessage is null) || - (!objectSpec.CanInitialize && objectSpec.InitExceptionMessage is not null)); - - if (objectSpec.NeedsMemberBinding) - { - RegisterTypeForBindCoreGen(objectSpec); - } + Debug.Assert((objectSpec.CanInstantiate && objectSpec.InitExceptionMessage is null) || + (!objectSpec.CanInstantiate && objectSpec.InitExceptionMessage is not null) || + (!objectSpec.CanInstantiate && (objectSymbol.IsAbstract || objectSymbol.TypeKind is TypeKind.Interface))); + TryRegisterTypeForBindCoreGen(objectSpec); return objectSpec; } - private void Register_AsConfigWithChildren_HelperForGen_IfRequired(TypeSpec type) + private bool MemberTypeIsBindable(ITypeSymbol containingTypeSymbol, ITypeSymbol memberTypeSymbol, DiagnosticDescriptor containingTypeDiagDescriptor, out TypeSpec? memberTypeSpec) { - if (type.SpecKind is TypeSpecKind.Object or - TypeSpecKind.Enumerable or - TypeSpecKind.Dictionary) + if (GetOrCreateTypeSpec(memberTypeSymbol) is TypeSpec { CanBindTo: true } spec) { - - _sourceGenSpec.MethodsToGen_CoreBindingHelper |= MethodsToGen_CoreBindingHelper.AsConfigWithChildren; + memberTypeSpec = spec; + return true; } + + RegisterUnsupportedType(containingTypeSymbol, containingTypeDiagDescriptor); + memberTypeSpec = null; + return false; } private bool TryGetElementType(INamedTypeSymbol type, out ITypeSymbol? elementType) @@ -792,6 +771,22 @@ private bool IsCandidateDictionary(INamedTypeSymbol type, out ITypeSymbol? keyTy private bool IsCollection(ITypeSymbol type) => type is INamedTypeSymbol namedType && GetInterface(namedType, _typeSymbols.IEnumerable) is not null; + private bool IsSupportedArrayType(ITypeSymbol type) + { + if (type is not IArrayTypeSymbol arrayType) + { + return false; + } + + if (arrayType.Rank > 1) + { + RegisterUnsupportedType(arrayType, Diagnostics.MultiDimArraysNotSupported); + return false; + } + + return true; + } + private static INamedTypeSymbol? GetInterface(INamedTypeSymbol type, INamedTypeSymbol @interface) { if (IsInterfaceMatch(type, @interface)) @@ -914,19 +909,4 @@ private void RegisterTypeDiagnostic(ITypeSymbol causingType, InvocationDiagnosti } } } - - public static class ParserExtensions - { - public static void RegisterCacheEntry(this Dictionary cache, TKey key, TEntry entry) - where TKey : notnull - where TValue : ICollection, new() - { - if (!cache.TryGetValue(key, out TValue? entryCollection)) - { - cache[key] = entryCollection = new TValue(); - } - - entryCollection.Add(entry); - } - } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Emitter/ConfigurationBinder.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Emitter/ConfigurationBinder.cs similarity index 89% rename from src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Emitter/ConfigurationBinder.cs rename to src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Emitter/ConfigurationBinder.cs index 64064887c7c70b..f1c7d5f7ff2150 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Emitter/ConfigurationBinder.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Emitter/ConfigurationBinder.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; -using SourceGenerators; +using System.Diagnostics; namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { @@ -101,13 +101,13 @@ private void EmitBindMethods_ConfigurationBinder() return; } - string objParamExpr = $"object? {Identifier.obj}"; + string instanceParamExpr = $"object? {Identifier.instance}"; if (ShouldEmitMethods(MethodsToGen_ConfigurationBinder.Bind_instance)) { EmitMethods( MethodsToGen_ConfigurationBinder.Bind_instance, - additionalParams: objParamExpr, + additionalParams: instanceParamExpr, configExpression: Identifier.configuration, configureOptions: false); } @@ -116,7 +116,7 @@ private void EmitBindMethods_ConfigurationBinder() { EmitMethods( MethodsToGen_ConfigurationBinder.Bind_instance_BinderOptions, - additionalParams: $"{objParamExpr}, {TypeDisplayString.NullableActionOfBinderOptions} {Identifier.configureOptions}", + additionalParams: $"{instanceParamExpr}, {TypeDisplayString.NullableActionOfBinderOptions} {Identifier.configureOptions}", configExpression: Identifier.configuration, configureOptions: true); } @@ -125,34 +125,30 @@ private void EmitBindMethods_ConfigurationBinder() { EmitMethods( MethodsToGen_ConfigurationBinder.Bind_key_instance, - additionalParams: $"string {Identifier.key}, {objParamExpr}", + additionalParams: $"string {Identifier.key}, {instanceParamExpr}", configExpression: $"{Expression.configurationGetSection}({Identifier.key})", configureOptions: false); } void EmitMethods(MethodsToGen_ConfigurationBinder method, string additionalParams, string configExpression, bool configureOptions) { - foreach (KeyValuePair> pair in _sourceGenSpec.InterceptionInfo_ConfigBinder.GetOverloadInfo(method)) + foreach ((ComplexTypeSpec type, List interceptorInfoList) in _sourceGenSpec.InterceptionInfo_ConfigBinder.GetOverloadInfo(method)) { - (TypeSpec type, List interceptorInfoList) = (pair.Key, pair.Value); - EmitBlankLineIfRequired(); _writer.WriteLine($"/// Attempts to bind the given object instance to configuration values by matching property names against configuration keys recursively."); EmitInterceptsLocationAnnotations(interceptorInfoList); - EmitStartBlock($"public static void {Identifier.Bind}_{type.DisplayString.ToIdentifierSubstring()}(this {Identifier.IConfiguration} {Identifier.configuration}, {additionalParams})"); + EmitStartBlock($"public static void {Identifier.Bind}_{type.IdentifierCompatibleSubstring}(this {Identifier.IConfiguration} {Identifier.configuration}, {additionalParams})"); - if (!EmitInitException(type) && type.NeedsMemberBinding) + if (type.HasBindableMembers) { + Debug.Assert(!type.IsValueType); string binderOptionsArg = configureOptions ? $"{Identifier.GetBinderOptions}({Identifier.configureOptions})" : $"{Identifier.binderOptions}: null"; EmitCheckForNullArgument_WithBlankLine(Identifier.configuration); - if (!type.IsValueType) - { - EmitCheckForNullArgument_WithBlankLine(Identifier.obj); - } + EmitCheckForNullArgument_WithBlankLine(Identifier.instance, voidReturn: true); _writer.WriteLine($$""" - var {{Identifier.typedObj}} = ({{type.EffectiveType.DisplayString}}){{Identifier.obj}}; - {{nameof(MethodsToGen_CoreBindingHelper.BindCore)}}({{configExpression}}, ref {{Identifier.typedObj}}, {{binderOptionsArg}}); + var {{Identifier.typedObj}} = ({{type.EffectiveType.DisplayString}}){{Identifier.instance}}; + {{nameof(MethodsToGen_CoreBindingHelper.BindCore)}}({{configExpression}}, ref {{Identifier.typedObj}}, defaultValueIfNotFound: false, {{binderOptionsArg}}); """); } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Emitter/CoreBindingHelpers.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Emitter/CoreBindingHelpers.cs similarity index 56% rename from src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Emitter/CoreBindingHelpers.cs rename to src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Emitter/CoreBindingHelpers.cs index f30408fad596dd..90531efe1b0c10 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Emitter/CoreBindingHelpers.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Emitter/CoreBindingHelpers.cs @@ -5,8 +5,8 @@ using System.Collections.Generic; using System.Diagnostics; using System.Linq; +using System.Text.RegularExpressions; using Microsoft.CodeAnalysis; -using SourceGenerators; namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { @@ -14,6 +14,10 @@ public sealed partial class ConfigurationBindingGenerator { private sealed partial class Emitter { + private int _valueSuffixIndex; + private bool _emitBlankLineBeforeNextStatement; + private static readonly Regex s_arrayBracketsRegex = new(Regex.Escape("[]")); + private bool ShouldEmitMethods(MethodsToGen_CoreBindingHelper methods) => (_sourceGenSpec.MethodsToGen_CoreBindingHelper & methods) != 0; private void EmitCoreBindingHelpers() @@ -82,36 +86,57 @@ private void EmitGetCoreMethod() EmitStartBlock($"{conditionKindExpr} ({Identifier.type} == typeof({type.DisplayString}))"); - if (effectiveType is ParsableFromStringSpec stringParsableType) + switch (effectiveType) { - _writer.WriteLine($$""" - if ({{Identifier.configuration}} is not {{Identifier.IConfigurationSection}} {{Identifier.section}}) + case ParsableFromStringSpec stringParsableType: { - throw new {{Identifier.InvalidOperationException}}(); + EmitCastToIConfigurationSection(); + EmitBindingLogic( + stringParsableType, + Expression.sectionValue, + Expression.sectionPath, + writeOnSuccess: parsedValueExpr => _writer.WriteLine($"return {parsedValueExpr};"), + checkForNullSectionValue: stringParsableType.StringParsableTypeKind is not StringParsableTypeKind.AssignFromSectionValue, + useDefaultValueIfSectionValueIsNull: false, + useIncrementalStringValueIdentifier: false); } - """); - - EmitBindLogicFromString( - stringParsableType, - Expression.sectionValue, - Expression.sectionPath, - writeOnSuccess: parsedValueExpr => _writer.WriteLine($"return {parsedValueExpr};"), - checkForNullSectionValue: stringParsableType.StringParsableTypeKind is not StringParsableTypeKind.AssignFromSectionValue, - useIncrementalStringValueIdentifier: false); - } - else if (!EmitInitException(effectiveType)) - { - EmitBindCoreCall(effectiveType, Identifier.obj, Identifier.configuration, InitializationKind.Declaration); - _writer.WriteLine($"return {Identifier.obj};"); + break; + case ConfigurationSectionSpec configurationSectionSpec: + { + EmitCastToIConfigurationSection(); + _writer.WriteLine($"return {Identifier.section};"); + } + break; + case ComplexTypeSpec complexType: + { + if (complexType.CanInstantiate) + { + EmitBindingLogic(complexType, Identifier.instance, Identifier.configuration, InitializationKind.Declaration, ValueDefaulting.CallSetter); + _writer.WriteLine($"return {Identifier.instance};"); + } + else if (type is ObjectSpec { InitExceptionMessage: string exMsg }) + { + _writer.WriteLine($@"throw new {Identifier.InvalidOperationException}(""{exMsg}"");"); + } + } + break; } - EmitEndBlock(); + EmitEndBlock(); // End if-check for input type. } _writer.WriteLine(); Emit_NotSupportedException_TypeNotDetectedAsInput(); EmitEndBlock(); _emitBlankLineBeforeNextStatement = true; + + void EmitCastToIConfigurationSection() => + _writer.WriteLine($$""" + if ({{Identifier.configuration}} is not {{Identifier.IConfigurationSection}} {{Identifier.section}}) + { + throw new {{Identifier.InvalidOperationException}}(); + } + """); } private void EmitGetValueCoreMethod() @@ -143,12 +168,13 @@ private void EmitGetValueCoreMethod() string conditionKindExpr = GetConditionKindExpr(ref isFirstType); EmitStartBlock($"{conditionKindExpr} ({Identifier.type} == typeof({type.DisplayString}))"); - EmitBindLogicFromString( + EmitBindingLogic( (ParsableFromStringSpec)type.EffectiveType, Identifier.value, Expression.sectionPath, writeOnSuccess: (parsedValueExpr) => _writer.WriteLine($"return {parsedValueExpr};"), checkForNullSectionValue: false, + useDefaultValueIfSectionValueIsNull: false, useIncrementalStringValueIdentifier: false); EmitEndBlock(); @@ -168,26 +194,23 @@ private void EmitBindCoreMainMethod() } EmitBlankLineIfRequired(); - EmitStartBlock($"public static void {nameof(MethodsToGen_CoreBindingHelper.BindCoreMain)}({Identifier.IConfiguration} {Identifier.configuration}, object {Identifier.obj}, Type {Identifier.type}, {TypeDisplayString.NullableActionOfBinderOptions} {Identifier.configureOptions})"); - EmitCheckForNullArgument_WithBlankLine(Identifier.configuration); - EmitCheckForNullArgument_WithBlankLine(Identifier.obj); + EmitStartBlock($"public static void {nameof(MethodsToGen_CoreBindingHelper.BindCoreMain)}({Identifier.IConfiguration} {Identifier.configuration}, object {Identifier.instance}, Type {Identifier.type}, {TypeDisplayString.NullableActionOfBinderOptions} {Identifier.configureOptions})"); + EmitCheckForNullArgument_WithBlankLine(Identifier.instance, voidReturn: true); EmitIConfigurationHasValueOrChildrenCheck(voidReturn: true); _writer.WriteLine($"{Identifier.BinderOptions}? {Identifier.binderOptions} = {Identifier.GetBinderOptions}({Identifier.configureOptions});"); _writer.WriteLine(); bool isFirstType = true; - foreach (TypeSpec type in targetTypes) + foreach (ComplexTypeSpec type in targetTypes) { - TypeSpec effectiveType = type.EffectiveType; + ComplexTypeSpec effectiveType = (ComplexTypeSpec)type.EffectiveType; + Debug.Assert(effectiveType.HasBindableMembers); string conditionKindExpr = GetConditionKindExpr(ref isFirstType); EmitStartBlock($"{conditionKindExpr} ({Identifier.type} == typeof({type.DisplayString}))"); - if (!EmitInitException(effectiveType)) - { - _writer.WriteLine($"var {Identifier.temp} = ({effectiveType.DisplayString}){Identifier.obj};"); - EmitBindCoreCall(type, Identifier.temp, Identifier.configuration, InitializationKind.None); - _writer.WriteLine($"return;"); - } + _writer.WriteLine($"var {Identifier.temp} = ({effectiveType.DisplayString}){Identifier.instance};"); + EmitBindingLogic(type, Identifier.temp, Identifier.configuration, InitializationKind.None, ValueDefaulting.None); + _writer.WriteLine($"return;"); EmitEndBlock(); } @@ -203,25 +226,23 @@ private void EmitBindCoreMethods() return; } - foreach (TypeSpec type in targetTypes) + foreach (ComplexTypeSpec type in targetTypes) { - Debug.Assert(type.NeedsMemberBinding); + Debug.Assert(type.HasBindableMembers); EmitBlankLineIfRequired(); EmitBindCoreMethod(type); } } - private void EmitBindCoreMethod(TypeSpec type) + private void EmitBindCoreMethod(ComplexTypeSpec type) { - Debug.Assert(type.CanInitialize); + string objParameterExpression = $"ref {type.DisplayString} {Identifier.instance}"; + EmitStartBlock(@$"public static void {nameof(MethodsToGen_CoreBindingHelper.BindCore)}({Identifier.IConfiguration} {Identifier.configuration}, {objParameterExpression}, bool defaultValueIfNotFound, {Identifier.BinderOptions}? {Identifier.binderOptions})"); - string objParameterExpression = $"ref {type.DisplayString} {Identifier.obj}"; - EmitStartBlock(@$"public static void {nameof(MethodsToGen_CoreBindingHelper.BindCore)}({Identifier.IConfiguration} {Identifier.configuration}, {objParameterExpression}, {Identifier.BinderOptions}? {Identifier.binderOptions})"); - - TypeSpec effectiveType = type.EffectiveType; + ComplexTypeSpec effectiveType = (ComplexTypeSpec)type.EffectiveType; if (effectiveType is EnumerableSpec enumerable) { - if (effectiveType.InitializationStrategy is InitializationStrategy.Array) + if (effectiveType.InstantiationStrategy is InstantiationStrategy.Array) { Debug.Assert(type == effectiveType); EmitPopulationImplForArray((EnumerableSpec)type); @@ -259,7 +280,7 @@ private void EmitInitializeMethods() private void EmitInitializeMethod(ObjectSpec type) { - Debug.Assert(type.CanInitialize); + Debug.Assert(type.CanInstantiate); List ctorParams = type.ConstructorParameters; IEnumerable initOnlyProps = type.Properties.Values.Where(prop => prop is { SetOnInit: true }); List ctorArgList = new(); @@ -286,7 +307,7 @@ private void EmitInitializeMethod(ObjectSpec type) foreach (PropertySpec property in initOnlyProps) { - if (property.ShouldBind() && property.MatchingCtorParam is null) + if (property.ShouldBindTo && property.MatchingCtorParam is null) { EmitBindImplForMember(property); } @@ -315,54 +336,53 @@ private void EmitInitializeMethod(ObjectSpec type) void EmitBindImplForMember(MemberSpec member) { TypeSpec memberType = member.Type; - bool errorOnFailedBinding = member.ErrorOnFailedBinding; - - string parsedMemberIdentifierDeclarationPrefix = $"{memberType.DisplayString} {member.Name}"; - string parsedMemberIdentifier; + string parsedMemberDeclarationLhs = $"{memberType.DisplayString} {member.Name}"; + string configKeyName = member.ConfigurationKeyName; + string parsedMemberAssignmentLhsExpr; - if (memberType is ParsableFromStringSpec { StringParsableTypeKind: StringParsableTypeKind.AssignFromSectionValue }) + switch (memberType) { - parsedMemberIdentifier = parsedMemberIdentifierDeclarationPrefix; + case ParsableFromStringSpec { StringParsableTypeKind: StringParsableTypeKind.AssignFromSectionValue }: + { + if (member is ParameterSpec parameter && parameter.ErrorOnFailedBinding) + { + string condition = $@"if ({Identifier.configuration}[""{configKeyName}""] is not {parsedMemberDeclarationLhs})"; + EmitThrowBlock(condition); + _writer.WriteLine(); + return; + } - if (errorOnFailedBinding) - { - string condition = $@" if ({Identifier.configuration}[""{member.ConfigurationKeyName}""] is not {memberType.DisplayString} {member.Name})"; - EmitThrowBlock(condition); - _writer.WriteLine(); - return; - } - } - else - { - parsedMemberIdentifier = member.Name; + parsedMemberAssignmentLhsExpr = parsedMemberDeclarationLhs; + } + break; + case ConfigurationSectionSpec: + { + _writer.WriteLine($"{parsedMemberDeclarationLhs} = {GetSectionFromConfigurationExpression(configKeyName)};"); + return; + } + default: + { + string bangExpr = memberType.IsValueType ? string.Empty : "!"; + string parsedMemberIdentifierDeclaration = $"{parsedMemberDeclarationLhs} = {member.DefaultValueExpr}{bangExpr};"; - string declarationSuffix; - if (errorOnFailedBinding) - { - declarationSuffix = ";"; - } - else - { - string bangExpr = memberType.IsValueType ? string.Empty : "!"; - declarationSuffix = memberType.CanInitialize - ? $" = {member.DefaultValueExpr}{bangExpr};" - : ";"; - } + _writer.WriteLine(parsedMemberIdentifierDeclaration); + _emitBlankLineBeforeNextStatement = false; - string parsedMemberIdentifierDeclaration = $"{parsedMemberIdentifierDeclarationPrefix}{declarationSuffix}"; - _writer.WriteLine(parsedMemberIdentifierDeclaration); - _emitBlankLineBeforeNextStatement = false; + parsedMemberAssignmentLhsExpr = member.Name; + } + break; } bool canBindToMember = this.EmitBindImplForMember( member, - parsedMemberIdentifier, - sectionPathExpr: GetSectionPathFromConfigurationExpression(member.ConfigurationKeyName), - canSet: true); + parsedMemberAssignmentLhsExpr, + sectionPathExpr: GetSectionPathFromConfigurationExpression(configKeyName), + canSet: true, + InitializationKind.None); if (canBindToMember) { - if (errorOnFailedBinding) + if (member is ParameterSpec parameter && parameter.ErrorOnFailedBinding) { // Add exception logic for parameter ctors; must be present in configuration object. EmitThrowBlock(condition: "else"); @@ -610,42 +630,53 @@ private void EmitPrimitiveParseMethod(ParsableFromStringSpec type) private void EmitPopulationImplForArray(EnumerableSpec type) { - EnumerableSpec concreteType = (EnumerableSpec)type.ConcreteType; + EnumerableSpec typeToInstantiate = (EnumerableSpec)type.TypeToInstantiate; // Create list and bind elements. string tempIdentifier = GetIncrementalIdentifier(Identifier.temp); - EmitBindCoreCall(concreteType, tempIdentifier, Identifier.configuration, InitializationKind.Declaration); + EmitBindingLogic(typeToInstantiate, tempIdentifier, Identifier.configuration, InitializationKind.Declaration, ValueDefaulting.None); // Resize array and add binded elements. _writer.WriteLine($$""" - {{Identifier.Int32}} {{Identifier.originalCount}} = {{Identifier.obj}}.{{Identifier.Length}}; - {{Identifier.Array}}.{{Identifier.Resize}}(ref {{Identifier.obj}}, {{Identifier.originalCount}} + {{tempIdentifier}}.{{Identifier.Count}}); - {{tempIdentifier}}.{{Identifier.CopyTo}}({{Identifier.obj}}, {{Identifier.originalCount}}); + {{Identifier.Int32}} {{Identifier.originalCount}} = {{Identifier.instance}}.{{Identifier.Length}}; + {{Identifier.Array}}.{{Identifier.Resize}}(ref {{Identifier.instance}}, {{Identifier.originalCount}} + {{tempIdentifier}}.{{Identifier.Count}}); + {{tempIdentifier}}.{{Identifier.CopyTo}}({{Identifier.instance}}, {{Identifier.originalCount}}); """); } private void EmitPopulationImplForEnumerableWithAdd(EnumerableSpec type) { - EmitCollectionCastIfRequired(type, out string objIdentifier); + EmitCollectionCastIfRequired(type, out string instanceIdentifier); Emit_Foreach_Section_In_ConfigChildren_StartBlock(); - TypeSpec elementType = type.ElementType; + string addExpr = $"{instanceIdentifier}.{Identifier.Add}"; - if (elementType is ParsableFromStringSpec stringParsableType) - { - EmitBindLogicFromString( - stringParsableType, - Expression.sectionValue, - Expression.sectionPath, - (parsedValueExpr) => _writer.WriteLine($"{objIdentifier}.{Identifier.Add}({parsedValueExpr});"), - checkForNullSectionValue: true, - useIncrementalStringValueIdentifier: false); - } - else + switch (type.ElementType) { - EmitBindCoreCall(elementType, Identifier.value, Identifier.section, InitializationKind.Declaration); - _writer.WriteLine($"{objIdentifier}.{Identifier.Add}({Identifier.value});"); + case ParsableFromStringSpec stringParsableType: + { + EmitBindingLogic( + stringParsableType, + Expression.sectionValue, + Expression.sectionPath, + (parsedValueExpr) => _writer.WriteLine($"{addExpr}({parsedValueExpr});"), + checkForNullSectionValue: true, + useDefaultValueIfSectionValueIsNull: false, + useIncrementalStringValueIdentifier: false); + } + break; + case ConfigurationSectionSpec configurationSection: + { + _writer.WriteLine($"{addExpr}({Identifier.section});"); + } + break; + case ComplexTypeSpec { CanInstantiate: true } complexType: + { + EmitBindingLogic(complexType, Identifier.value, Identifier.section, InitializationKind.Declaration, ValueDefaulting.None); + _writer.WriteLine($"{addExpr}({Identifier.value});"); + } + break; } EmitEndBlock(); @@ -653,7 +684,7 @@ private void EmitPopulationImplForEnumerableWithAdd(EnumerableSpec type) private void EmitBindCoreImplForDictionary(DictionarySpec type) { - EmitCollectionCastIfRequired(type, out string objIdentifier); + EmitCollectionCastIfRequired(type, out string instanceIdentifier); Emit_Foreach_Section_In_ConfigChildren_StartBlock(); @@ -661,73 +692,68 @@ private void EmitBindCoreImplForDictionary(DictionarySpec type) TypeSpec elementType = type.ElementType; // Parse key - EmitBindLogicFromString( + EmitBindingLogic( keyType, Expression.sectionKey, Expression.sectionPath, Emit_BindAndAddLogic_ForElement, checkForNullSectionValue: false, + useDefaultValueIfSectionValueIsNull: false, useIncrementalStringValueIdentifier: false); void Emit_BindAndAddLogic_ForElement(string parsedKeyExpr) { - if (elementType is ParsableFromStringSpec stringParsableElementType) - { - EmitBindLogicFromString( - stringParsableElementType, - Expression.sectionValue, - Expression.sectionPath, - writeOnSuccess: parsedValueExpr => _writer.WriteLine($"{objIdentifier}[{parsedKeyExpr}] = {parsedValueExpr};"), - checkForNullSectionValue: true, - useIncrementalStringValueIdentifier: false); - } - else // For complex types: + switch (elementType) { - Debug.Assert(elementType.CanInitialize); - - if (keyType.StringParsableTypeKind is not StringParsableTypeKind.AssignFromSectionValue) - { - // Save value to local to avoid parsing twice - during look-up and during add. - _writer.WriteLine($"{keyType.DisplayString} {Identifier.key} = {parsedKeyExpr};"); - parsedKeyExpr = Identifier.key; - } - - bool isValueType = elementType.IsValueType; - string expressionForElementIsNotNull = $"{Identifier.element} is not null"; - string elementTypeDisplayString = elementType.DisplayString + (elementType.IsValueType ? string.Empty : "?"); - - string expressionForElementExists = $"{objIdentifier}.{Identifier.TryGetValue}({parsedKeyExpr}, out {elementTypeDisplayString} {Identifier.element})"; - string conditionToUseExistingElement = expressionForElementExists; - - // If key already exists, bind to existing element instance if not null (for ref types). - if (!isValueType) - { - conditionToUseExistingElement += $" && {expressionForElementIsNotNull}"; - } + case ParsableFromStringSpec stringParsableElementType: + { + EmitBindingLogic( + stringParsableElementType, + Expression.sectionValue, + Expression.sectionPath, + writeOnSuccess: parsedValueExpr => _writer.WriteLine($"{instanceIdentifier}[{parsedKeyExpr}] = {parsedValueExpr};"), + checkForNullSectionValue: true, + useDefaultValueIfSectionValueIsNull: false, + useIncrementalStringValueIdentifier: false); + } + break; + case ConfigurationSectionSpec configurationSection: + { + _writer.WriteLine($"{instanceIdentifier}[{parsedKeyExpr}] = {Identifier.section};"); + } + break; + case ComplexTypeSpec complexElementType: + { + Debug.Assert(complexElementType.CanInstantiate); - EmitStartBlock($"if (!({conditionToUseExistingElement}))"); - EmitObjectInit(elementType, Identifier.element, InitializationKind.SimpleAssignment, Identifier.section); - EmitEndBlock(); + if (keyType.StringParsableTypeKind is not StringParsableTypeKind.AssignFromSectionValue) + { + // Save value to local to avoid parsing twice - during look-up and during add. + _writer.WriteLine($"{keyType.DisplayString} {Identifier.key} = {parsedKeyExpr};"); + parsedKeyExpr = Identifier.key; + } - if (elementType is CollectionSpec { InitializationStrategy: InitializationStrategy.ParameterizedConstructor or InitializationStrategy.ToEnumerableMethod } collectionSpec) - { - // This is a read-only collection. If the element exists and is not null, - // we need to copy its contents into a new instance & then append/bind to that. + bool isValueType = complexElementType.IsValueType; + string expressionForElementIsNotNull = $"{Identifier.element} is not null"; + string elementTypeDisplayString = complexElementType.DisplayString + (complexElementType.IsValueType ? string.Empty : "?"); - string initExpression = collectionSpec.InitializationStrategy is InitializationStrategy.ParameterizedConstructor - ? $"new {collectionSpec.ConcreteType.DisplayString}({Identifier.element})" - : $"{Identifier.element}.{collectionSpec.ToEnumerableMethodCall!}"; + string expressionForElementExists = $"{instanceIdentifier}.{Identifier.TryGetValue}({parsedKeyExpr}, out {elementTypeDisplayString} {Identifier.element})"; + string conditionToUseExistingElement = expressionForElementExists; - _writer.WriteLine($$""" - else + // If key already exists, bind to existing element instance if not null (for ref types). + if (!isValueType) { - {{Identifier.element}} = {{initExpression}}; + conditionToUseExistingElement += $" && {expressionForElementIsNotNull}"; } - """); - } - EmitBindCoreCall(elementType, Identifier.element, Identifier.section, InitializationKind.None); - _writer.WriteLine($"{objIdentifier}[{parsedKeyExpr}] = {Identifier.element};"); + EmitStartBlock($"if (!({conditionToUseExistingElement}))"); + EmitObjectInit(complexElementType, Identifier.element, InitializationKind.SimpleAssignment, Identifier.section); + EmitEndBlock(); + + EmitBindingLogic(complexElementType, Identifier.element, Identifier.section, InitializationKind.None, ValueDefaulting.None); + _writer.WriteLine($"{instanceIdentifier}[{parsedKeyExpr}] = {Identifier.element};"); + } + break; } } @@ -736,7 +762,7 @@ void Emit_BindAndAddLogic_ForElement(string parsedKeyExpr) private void EmitBindCoreImplForObject(ObjectSpec type) { - Debug.Assert(type.NeedsMemberBinding); + Debug.Assert(type.HasBindableMembers); string keyCacheFieldName = GetConfigKeyCacheFieldName(type); string validateMethodCallExpr = $"{Identifier.ValidateConfigurationKeys}(typeof({type.DisplayString}), {keyCacheFieldName}, {Identifier.configuration}, {Identifier.binderOptions});"; @@ -744,15 +770,16 @@ private void EmitBindCoreImplForObject(ObjectSpec type) foreach (PropertySpec property in type.Properties.Values) { - bool noSetter_And_IsReadonly = !property.CanSet && property.Type is CollectionSpec { InitializationStrategy: InitializationStrategy.ParameterizedConstructor }; - if (property.ShouldBind() && !noSetter_And_IsReadonly) + bool noSetter_And_IsReadonly = !property.CanSet && property.Type is CollectionSpec { InstantiationStrategy: InstantiationStrategy.ParameterizedConstructor }; + if (property.ShouldBindTo && !noSetter_And_IsReadonly) { - string containingTypeRef = property.IsStatic ? type.DisplayString : Identifier.obj; + string containingTypeRef = property.IsStatic ? type.DisplayString : Identifier.instance; EmitBindImplForMember( property, memberAccessExpr: $"{containingTypeRef}.{property.Name}", GetSectionPathFromConfigurationExpression(property.ConfigurationKeyName), - canSet: property.CanSet); + canSet: property.CanSet, + InitializationKind.Declaration); } } } @@ -761,59 +788,66 @@ private bool EmitBindImplForMember( MemberSpec member, string memberAccessExpr, string sectionPathExpr, - bool canSet) + bool canSet, + InitializationKind initializationKind) { TypeSpec effectiveMemberType = member.Type.EffectiveType; - if (effectiveMemberType is ParsableFromStringSpec stringParsableType) - { - if (canSet) - { - bool checkForNullSectionValue = member is ParameterSpec - ? true - : stringParsableType.StringParsableTypeKind is not StringParsableTypeKind.AssignFromSectionValue; - - string nullBangExpr = checkForNullSectionValue ? string.Empty : "!"; - - EmitBlankLineIfRequired(); - EmitBindLogicFromString( - stringParsableType, - $@"{Identifier.configuration}[""{member.ConfigurationKeyName}""]", - sectionPathExpr, - writeOnSuccess: parsedValueExpr => _writer.WriteLine($"{memberAccessExpr} = {parsedValueExpr}{nullBangExpr};"), - checkForNullSectionValue, - useIncrementalStringValueIdentifier: true); - } - - return true; - } - string sectionParseExpr = GetSectionFromConfigurationExpression(member.ConfigurationKeyName); - EmitBlankLineIfRequired(); - - if (effectiveMemberType.SpecKind is TypeSpecKind.IConfigurationSection) + switch (effectiveMemberType) { - _writer.WriteLine($"{memberAccessExpr} = {sectionParseExpr};"); - return true; - } + case ParsableFromStringSpec stringParsableType: + { + if (canSet) + { + bool useDefaultValueIfSectionValueIsNull = + initializationKind == InitializationKind.Declaration && + member is PropertySpec && + member.Type.IsValueType && + member.Type.SpecKind is not TypeSpecKind.Nullable; + + EmitBlankLineIfRequired(); + EmitBindingLogic( + stringParsableType, + $@"{Identifier.configuration}[""{member.ConfigurationKeyName}""]", + sectionPathExpr, + writeOnSuccess: parsedValueExpr => _writer.WriteLine($"{memberAccessExpr} = {parsedValueExpr};"), + checkForNullSectionValue: true, + useDefaultValueIfSectionValueIsNull, + useIncrementalStringValueIdentifier: true); + } + + return true; + } + case ConfigurationSectionSpec: + { + if (canSet) + { + EmitBlankLineIfRequired(); + _writer.WriteLine($"{memberAccessExpr} = {sectionParseExpr};"); + } - string sectionValidationCall = $"{MethodsToGen_CoreBindingHelper.AsConfigWithChildren}({sectionParseExpr})"; - string sectionIdentifier = GetIncrementalIdentifier(Identifier.section); + return true; + } + case ComplexTypeSpec complexType: + { + string sectionValidationCall = $"{MethodsToGen_CoreBindingHelper.AsConfigWithChildren}({sectionParseExpr})"; + string sectionIdentifier = GetIncrementalIdentifier(Identifier.section); - EmitStartBlock($"if ({sectionValidationCall} is {Identifier.IConfigurationSection} {sectionIdentifier})"); + EmitBlankLineIfRequired(); + EmitStartBlock($"if ({sectionValidationCall} is {Identifier.IConfigurationSection} {sectionIdentifier})"); + EmitBindingLogicForComplexMember(member, memberAccessExpr, sectionIdentifier, canSet); + EmitEndBlock(); - bool canInit = !EmitInitException(effectiveMemberType); - if (canInit) - { - EmitBindCoreCallForMember(member, memberAccessExpr, sectionIdentifier, canSet); + return complexType.CanInstantiate; + } + default: + return false; } - - EmitEndBlock(); - return canInit; } - private void EmitBindCoreCallForMember( + private void EmitBindingLogicForComplexMember( MemberSpec member, string memberAccessExpr, string configArgExpr, @@ -821,7 +855,7 @@ private void EmitBindCoreCallForMember( { TypeSpec memberType = member.Type; - TypeSpec effectiveMemberType = memberType.EffectiveType; + ComplexTypeSpec effectiveMemberType = (ComplexTypeSpec)memberType.EffectiveType; string tempIdentifier = GetIncrementalIdentifier(Identifier.temp); InitializationKind initKind; @@ -875,22 +909,235 @@ private void EmitBindCoreCallForMember( } }; - EmitBindCoreCall( + EmitBindingLogic( effectiveMemberType, targetObjAccessExpr, configArgExpr, initKind, - writeOnSuccess); + ValueDefaulting.None, + writeOnSuccess + ); + } + + private void EmitBindingLogic( + ComplexTypeSpec type, + string memberAccessExpr, + string configArgExpr, + InitializationKind initKind, + ValueDefaulting valueDefaulting, + Action? writeOnSuccess = null) + { + if (!type.HasBindableMembers) + { + if (initKind is not InitializationKind.None) + { + if (type.CanInstantiate) + { + EmitObjectInit(type, memberAccessExpr, initKind, configArgExpr); + } + else if (type is ObjectSpec { InitExceptionMessage: string exMsg }) + { + _writer.WriteLine($@"throw new {Identifier.InvalidOperationException}(""{exMsg}"");"); + } + } + + return; + } + + string tempIdentifier = GetIncrementalIdentifier(Identifier.temp); + if (initKind is InitializationKind.AssignmentWithNullCheck) + { + Debug.Assert(!type.IsValueType); + _writer.WriteLine($"{type.DisplayString}? {tempIdentifier} = {memberAccessExpr};"); + EmitBindingLogic(tempIdentifier, InitializationKind.AssignmentWithNullCheck); + } + else if (initKind is InitializationKind.None && type.IsValueType) + { + EmitBindingLogic(tempIdentifier, InitializationKind.Declaration); + _writer.WriteLine($"{memberAccessExpr} = {tempIdentifier};"); + } + else + { + EmitBindingLogic(memberAccessExpr, initKind); + } + + void EmitBindingLogic(string instanceToBindExpr, InitializationKind initKind) + { + string bindCoreCall = $@"{nameof(MethodsToGen_CoreBindingHelper.BindCore)}({configArgExpr}, ref {instanceToBindExpr}, defaultValueIfNotFound: {FormatDefaultValueIfNotFound()}, {Identifier.binderOptions});"; + + if (type.CanInstantiate) + { + if (initKind is not InitializationKind.None) + { + EmitObjectInit(type, instanceToBindExpr, initKind, configArgExpr); + } + + EmitBindCoreCall(); + } + else + { + Debug.Assert(!type.IsValueType); + + if (type is ObjectSpec { InitExceptionMessage: string exMsg }) + { + _writer.WriteLine($@"throw new {Identifier.InvalidOperationException}(""{exMsg}"");"); + } + else + { + EmitStartBlock($"if ({instanceToBindExpr} is not null)"); + EmitBindCoreCall(); + EmitEndBlock(); + } + } + + void EmitBindCoreCall() + { + _writer.WriteLine(bindCoreCall); + writeOnSuccess?.Invoke(instanceToBindExpr); + } + + string FormatDefaultValueIfNotFound() => valueDefaulting == ValueDefaulting.CallSetter ? "true" : "false"; + } + } + + private void EmitBindingLogic( + ParsableFromStringSpec type, + string sectionValueExpr, + string sectionPathExpr, + Action? writeOnSuccess, + bool checkForNullSectionValue, + bool useDefaultValueIfSectionValueIsNull, + bool useIncrementalStringValueIdentifier) + { + StringParsableTypeKind typeKind = type.StringParsableTypeKind; + Debug.Assert(typeKind is not StringParsableTypeKind.None); + + string nonNull_StringValue_Identifier = useIncrementalStringValueIdentifier ? GetIncrementalIdentifier(Identifier.value) : Identifier.value; + string stringValueToParse_Expr = checkForNullSectionValue ? nonNull_StringValue_Identifier : sectionValueExpr; + string parsedValueExpr = typeKind switch + { + StringParsableTypeKind.AssignFromSectionValue => stringValueToParse_Expr, + StringParsableTypeKind.Enum => $"ParseEnum<{type.DisplayString}>({stringValueToParse_Expr}, () => {sectionPathExpr})", + _ => $"{type.ParseMethodName}({stringValueToParse_Expr}, () => {sectionPathExpr})", + }; + + if (!checkForNullSectionValue) + { + InvokeWriteOnSuccess(); + } + else + { + EmitStartBlock($"if ({sectionValueExpr} is string {nonNull_StringValue_Identifier})"); + InvokeWriteOnSuccess(); + EmitEndBlock(); + } + + if (useDefaultValueIfSectionValueIsNull) + { + parsedValueExpr = $"default"; + EmitStartBlock($"else if (defaultValueIfNotFound)"); + InvokeWriteOnSuccess(); + EmitEndBlock(); + } + + void InvokeWriteOnSuccess() => writeOnSuccess?.Invoke(parsedValueExpr); + } + + private bool EmitObjectInit(ComplexTypeSpec type, string memberAccessExpr, InitializationKind initKind, string configArgExpr) + { + CollectionSpec? collectionType = type as CollectionSpec; + string initExpr; + + string effectiveDisplayString = type.DisplayString; + if (collectionType is not null) + { + if (collectionType is EnumerableSpec { InstantiationStrategy: InstantiationStrategy.Array }) + { + initExpr = $"new {s_arrayBracketsRegex.Replace(effectiveDisplayString, "[0]", 1)}"; + } + else + { + effectiveDisplayString = (collectionType.TypeToInstantiate ?? collectionType).DisplayString; + initExpr = $"new {effectiveDisplayString}()"; + } + } + else if (type.InstantiationStrategy is InstantiationStrategy.ParameterlessConstructor) + { + initExpr = $"new {effectiveDisplayString}()"; + } + else + { + Debug.Assert(type.InstantiationStrategy is InstantiationStrategy.ParameterizedConstructor); + string initMethodIdentifier = GetInitalizeMethodDisplayString(((ObjectSpec)type)); + initExpr = $"{initMethodIdentifier}({configArgExpr}, {Identifier.binderOptions})"; + } + + switch (initKind) + { + case InitializationKind.Declaration: + { + Debug.Assert(!memberAccessExpr.Contains(".")); + _writer.WriteLine($"var {memberAccessExpr} = {initExpr};"); + } + break; + case InitializationKind.AssignmentWithNullCheck: + { + if (collectionType is CollectionSpec + { + InstantiationStrategy: InstantiationStrategy.ParameterizedConstructor or InstantiationStrategy.ToEnumerableMethod + }) + { + if (collectionType.InstantiationStrategy is InstantiationStrategy.ParameterizedConstructor) + { + _writer.WriteLine($"{memberAccessExpr} = {memberAccessExpr} is null ? {initExpr} : new {effectiveDisplayString}({memberAccessExpr});"); + } + else + { + Debug.Assert(collectionType is DictionarySpec); + _writer.WriteLine($"{memberAccessExpr} = {memberAccessExpr} is null ? {initExpr} : {memberAccessExpr}.ToDictionary(pair => pair.Key, pair => pair.Value);"); + } + } + else + { + _writer.WriteLine($"{memberAccessExpr} ??= {initExpr};"); + } + } + break; + case InitializationKind.SimpleAssignment: + { + _writer.WriteLine($"{memberAccessExpr} = {initExpr};"); + } + break; + default: + { + Debug.Fail($"Invaild initialization kind: {initKind}"); + } + break; + } + + return true; + } + + private void EmitIConfigurationHasValueOrChildrenCheck(bool voidReturn) + { + string returnPostfix = voidReturn ? string.Empty : " null"; + _writer.WriteLine($$""" + if (!{{Identifier.HasValueOrChildren}}({{Identifier.configuration}})) + { + return{{returnPostfix}}; + } + """); + _writer.WriteLine(); } - private void EmitCollectionCastIfRequired(CollectionSpec type, out string objIdentifier) + private void EmitCollectionCastIfRequired(CollectionSpec type, out string instanceIdentifier) { - objIdentifier = Identifier.obj; + instanceIdentifier = Identifier.instance; if (type.PopulationStrategy is CollectionPopulationStrategy.Cast_Then_Add) { - objIdentifier = Identifier.temp; + instanceIdentifier = Identifier.temp; _writer.WriteLine($$""" - if ({{Identifier.obj}} is not {{type.PopulationCastType!.DisplayString}} {{objIdentifier}}) + if ({{Identifier.instance}} is not {{type.PopulationCastType!.DisplayString}} {{instanceIdentifier}}) { return; } @@ -926,7 +1173,7 @@ private static string GetConditionKindExpr(ref bool isFirstType) } private static string GetConfigKeyCacheFieldName(ObjectSpec type) => - $"s_configKeys_{type.DisplayString.ToIdentifierSubstring()}"; + $"s_configKeys_{type.IdentifierCompatibleSubstring}"; } } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Emitter/ExceptionMessages.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Emitter/ExceptionMessages.cs similarity index 100% rename from src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Emitter/ExceptionMessages.cs rename to src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Emitter/ExceptionMessages.cs diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Emitter/Helpers.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Emitter/Helpers.cs similarity index 89% rename from src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Emitter/Helpers.cs rename to src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Emitter/Helpers.cs index bad56b7ce3275a..a7db2fb5163979 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Emitter/Helpers.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Emitter/Helpers.cs @@ -12,10 +12,10 @@ public sealed partial class ConfigurationBindingGenerator { private sealed partial class Emitter { - private string? _emittedExtsTargetType; - internal static readonly AssemblyName s_assemblyName = typeof(ConfigurationBindingGenerator).Assembly.GetName(); + private string? _emittedExtsTargetType; + private enum InitializationKind { None = 0, @@ -23,6 +23,24 @@ private enum InitializationKind AssignmentWithNullCheck = 2, Declaration = 3, } + + /// + /// The type of defaulting for a property if it does not have a config entry. + /// This should only be applied for "Get" cases, not "Bind" and is also conditioned + /// on the source generated for a particular property as to whether it uses this value. + /// Note this is different than "InitializationKind.Declaration" since it only applied to + /// complex types and not arrays\enumerables. + /// + private enum ValueDefaulting + { + None = 0, + + /// + /// Call the setter with the default value for the property's Type. + /// + CallSetter = 1, + } + private static class Expression { public const string configurationGetSection = "configuration.GetSection"; @@ -45,6 +63,8 @@ private static class TypeDisplayString private static class Identifier { public const string binderOptions = nameof(binderOptions); + public const string config = nameof(config); + public const string configureBinder = nameof(configureBinder); public const string configureOptions = nameof(configureOptions); public const string configuration = nameof(configuration); public const string configSectionPath = nameof(configSectionPath); @@ -55,7 +75,7 @@ private static class Identifier public const string getPath = nameof(getPath); public const string key = nameof(key); public const string name = nameof(name); - public const string obj = nameof(obj); + public const string instance = nameof(instance); public const string optionsBuilder = nameof(optionsBuilder); public const string originalCount = nameof(originalCount); public const string section = nameof(section); @@ -140,7 +160,7 @@ private void EmitInterceptsLocationAnnotations(List inf { foreach (InterceptorLocationInfo info in infoList) { - _writer.WriteLine($@"[{Identifier.InterceptsLocation}Attribute(@""{info.FilePath}"", {info.LineNumber}, {info.CharacterNumber})]"); + _writer.WriteLine($@"[{Identifier.InterceptsLocation}(@""{info.FilePath}"", {info.LineNumber}, {info.CharacterNumber})]"); } } @@ -211,46 +231,26 @@ private void EmitBlankLineIfRequired() _emitBlankLineBeforeNextStatement = true; } - private void EmitCheckForNullArgument_WithBlankLine(string paramName) + private void EmitCheckForNullArgument_WithBlankLine(string paramName, bool voidReturn = false) { + string returnExpr = voidReturn + ? "return" + : $"throw new ArgumentNullException(nameof({paramName}))"; + _writer.WriteLine($$""" if ({{paramName}} is null) { - throw new ArgumentNullException(nameof({{paramName}})); + {{returnExpr}}; } """); _writer.WriteLine(); } - private bool EmitInitException(TypeSpec type) - { - Debug.Assert(type.InitializationStrategy is not InitializationStrategy.None); - - if (!type.CanInitialize) - { - _writer.WriteLine($@"throw new {Identifier.InvalidOperationException}(""{type.InitExceptionMessage}"");"); - return true; - } - - return false; - } - private string GetIncrementalIdentifier(string prefix) => $"{prefix}{_valueSuffixIndex++}"; private static string GetInitalizeMethodDisplayString(ObjectSpec type) => - $"{nameof(MethodsToGen_CoreBindingHelper.Initialize)}{type.DisplayString.ToIdentifierSubstring()}"; + $"{nameof(MethodsToGen_CoreBindingHelper.Initialize)}{type.IdentifierCompatibleSubstring}"; } } - - internal static class EmitterExtensions - { - public static string ToIdentifierSubstring(this string typeDisplayName) => - typeDisplayName - .Replace("[]", nameof(Array)) - .Replace(", ", string.Empty) - .Replace(".", string.Empty) - .Replace("<", string.Empty) - .Replace(">", string.Empty); - } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Emitter/OptionsBuilderConfigurationExtensions.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Emitter/OptionsBuilderConfigurationExtensions.cs similarity index 87% rename from src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Emitter/OptionsBuilderConfigurationExtensions.cs rename to src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Emitter/OptionsBuilderConfigurationExtensions.cs index d49198196fd491..7fd5d695eaf45a 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Emitter/OptionsBuilderConfigurationExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Emitter/OptionsBuilderConfigurationExtensions.cs @@ -30,25 +30,25 @@ private void EmitBindMethods_Extensions_OptionsBuilder() } const string documentation = @"/// Registers a configuration instance which will bind against."; - const string paramList = $"{Identifier.IConfiguration} {Identifier.configuration}"; + const string paramList = $"{Identifier.IConfiguration} {Identifier.config}"; if (ShouldEmitMethods(MethodsToGen_Extensions_OptionsBuilder.Bind_T)) { EmitMethodStartBlock(MethodsToGen_Extensions_OptionsBuilder.Bind_T, "Bind", paramList, documentation); - _writer.WriteLine($"return Bind({Identifier.optionsBuilder}, {Identifier.configuration}, {Identifier.configureOptions}: null);"); + _writer.WriteLine($"return Bind({Identifier.optionsBuilder}, {Identifier.config}, {Identifier.configureBinder}: null);"); EmitEndBlock(); } EmitMethodStartBlock( MethodsToGen_Extensions_OptionsBuilder.Bind_T_BinderOptions, "Bind", - paramList + $", {TypeDisplayString.NullableActionOfBinderOptions} {Identifier.configureOptions}", + paramList + $", {TypeDisplayString.NullableActionOfBinderOptions} {Identifier.configureBinder}", documentation); EmitCheckForNullArgument_WithBlankLine(Identifier.optionsBuilder); _writer.WriteLine($$""" - {{Identifier.Configure}}<{{Identifier.TOptions}}>({{Identifier.optionsBuilder}}.{{Identifier.Services}}, {{Identifier.optionsBuilder}}.Name, {{Identifier.configuration}}, {{Identifier.configureOptions}}); + {{Identifier.Configure}}<{{Identifier.TOptions}}>({{Identifier.optionsBuilder}}.{{Identifier.Services}}, {{Identifier.optionsBuilder}}.Name, {{Identifier.config}}, {{Identifier.configureBinder}}); return {{Identifier.optionsBuilder}}; """); @@ -63,19 +63,18 @@ private void EmitBindConfigurationMethod() } const string documentation = $@"/// Registers the dependency injection container to bind against the obtained from the DI service provider."; - string paramList = $"string {Identifier.configSectionPath}, {TypeDisplayString.NullableActionOfBinderOptions} {Identifier.configureOptions} = null"; + string paramList = $"string {Identifier.configSectionPath}, {TypeDisplayString.NullableActionOfBinderOptions} {Identifier.configureBinder} = null"; EmitMethodStartBlock(MethodsToGen_Extensions_OptionsBuilder.BindConfiguration, "BindConfiguration", paramList, documentation); EmitCheckForNullArgument_WithBlankLine(Identifier.optionsBuilder); EmitCheckForNullArgument_WithBlankLine(Identifier.configSectionPath); - EmitStartBlock($"{Identifier.optionsBuilder}.{Identifier.Configure}<{Identifier.IConfiguration}>(({Identifier.obj}, {Identifier.configuration}) =>"); - EmitCheckForNullArgument_WithBlankLine(Identifier.obj); - EmitCheckForNullArgument_WithBlankLine(Identifier.configuration); + EmitStartBlock($"{Identifier.optionsBuilder}.{Identifier.Configure}<{Identifier.IConfiguration}>(({Identifier.instance}, {Identifier.config}) =>"); + EmitCheckForNullArgument_WithBlankLine(Identifier.config); _writer.WriteLine($$""" - {{Identifier.IConfiguration}} {{Identifier.section}} = string.Equals(string.Empty, {{Identifier.configSectionPath}}, StringComparison.OrdinalIgnoreCase) ? {{Identifier.configuration}} : {{Identifier.configuration}}.{{Identifier.GetSection}}({{Identifier.configSectionPath}}); - {{nameof(MethodsToGen_CoreBindingHelper.BindCoreMain)}}({{Identifier.section}}, {{Identifier.obj}}, typeof({{Identifier.TOptions}}), {{Identifier.configureOptions}}); + {{Identifier.IConfiguration}} {{Identifier.section}} = string.Equals(string.Empty, {{Identifier.configSectionPath}}, StringComparison.OrdinalIgnoreCase) ? {{Identifier.config}} : {{Identifier.config}}.{{Identifier.GetSection}}({{Identifier.configSectionPath}}); + {{nameof(MethodsToGen_CoreBindingHelper.BindCoreMain)}}({{Identifier.section}}, {{Identifier.instance}}, typeof({{Identifier.TOptions}}), {{Identifier.configureBinder}}); """); EmitEndBlock(endBraceTrailingSource: ");"); diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Emitter/OptionsConfigurationServiceCollectionExtensions.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Emitter/OptionsConfigurationServiceCollectionExtensions.cs similarity index 84% rename from src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Emitter/OptionsConfigurationServiceCollectionExtensions.cs rename to src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Emitter/OptionsConfigurationServiceCollectionExtensions.cs index 0348eb5047e970..7577e0c49de4d0 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Emitter/OptionsConfigurationServiceCollectionExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Emitter/OptionsConfigurationServiceCollectionExtensions.cs @@ -24,12 +24,12 @@ private void EmitBindingExtensions_IServiceCollection() private void EmitConfigureMethods() { const string defaultNameExpr = "string.Empty"; - string configParam = $"{Identifier.IConfiguration} {Identifier.configuration}"; + string configParam = $"{Identifier.IConfiguration} {Identifier.config}"; if (ShouldEmitMethods(MethodsToGen_Extensions_ServiceCollection.Configure_T)) { EmitStartMethod(MethodsToGen_Extensions_ServiceCollection.Configure_T, configParam); - _writer.WriteLine($"return {Identifier.Configure}<{Identifier.TOptions}>({Identifier.services}, {defaultNameExpr}, {Identifier.configuration}, {Identifier.configureOptions}: null);"); + _writer.WriteLine($"return {Identifier.Configure}<{Identifier.TOptions}>({Identifier.services}, {defaultNameExpr}, {Identifier.config}, {Identifier.configureOptions}: null);"); EmitEndBlock(); } @@ -38,7 +38,7 @@ private void EmitConfigureMethods() EmitStartMethod( MethodsToGen_Extensions_ServiceCollection.Configure_T_name, paramList: $"string? {Identifier.name}, " + configParam); - _writer.WriteLine($"return {Identifier.Configure}<{Identifier.TOptions}>({Identifier.services}, {Identifier.name}, {Identifier.configuration}, {Identifier.configureOptions}: null);"); + _writer.WriteLine($"return {Identifier.Configure}<{Identifier.TOptions}>({Identifier.services}, {Identifier.name}, {Identifier.config}, {Identifier.configureOptions}: null);"); EmitEndBlock(); } @@ -47,22 +47,20 @@ private void EmitConfigureMethods() EmitStartMethod( MethodsToGen_Extensions_ServiceCollection.Configure_T_BinderOptions, paramList: configParam + $", {TypeDisplayString.NullableActionOfBinderOptions} {Identifier.configureOptions}"); - _writer.WriteLine($"return {Identifier.Configure}<{Identifier.TOptions}>({Identifier.services}, {defaultNameExpr}, {Identifier.configuration}, {Identifier.configureOptions});"); + _writer.WriteLine($"return {Identifier.Configure}<{Identifier.TOptions}>({Identifier.services}, {defaultNameExpr}, {Identifier.config}, {Identifier.configureOptions});"); EmitEndBlock(); } // Core Configure method that the other overloads call. // Like the others, it is public API that could be called directly by users. // So, it is always generated whenever a Configure overload is called. - string optionsNamespaceName = "Microsoft.Extensions.Options"; - EmitStartMethod(MethodsToGen_Extensions_ServiceCollection.Configure_T_name_BinderOptions, paramList: $"string? {Identifier.name}, " + configParam + $", {TypeDisplayString.NullableActionOfBinderOptions} {Identifier.configureOptions}"); EmitCheckForNullArgument_WithBlankLine(Identifier.services); - EmitCheckForNullArgument_WithBlankLine(Identifier.configuration); + EmitCheckForNullArgument_WithBlankLine(Identifier.config); _writer.WriteLine($$""" OptionsServiceCollectionExtensions.AddOptions({{Identifier.services}}); - {{Identifier.services}}.{{Identifier.AddSingleton}}<{{Identifier.IOptionsChangeTokenSource}}<{{Identifier.TOptions}}>>(new {{Identifier.ConfigurationChangeTokenSource}}<{{Identifier.TOptions}}>({{Identifier.name}}, {{Identifier.configuration}})); - return {{Identifier.services}}.{{Identifier.AddSingleton}}<{{optionsNamespaceName}}.IConfigureOptions<{{Identifier.TOptions}}>>(new {{optionsNamespaceName}}.ConfigureNamedOptions<{{Identifier.TOptions}}>({{Identifier.name}}, {{Identifier.obj}} => {{nameof(MethodsToGen_CoreBindingHelper.BindCoreMain)}}({{Identifier.configuration}}, {{Identifier.obj}}, typeof({{Identifier.TOptions}}){{Identifier.configureOptions}}))); + {{Identifier.services}}.{{Identifier.AddSingleton}}<{{Identifier.IOptionsChangeTokenSource}}<{{Identifier.TOptions}}>>(new {{Identifier.ConfigurationChangeTokenSource}}<{{Identifier.TOptions}}>({{Identifier.name}}, {{Identifier.config}})); + return {{Identifier.services}}.{{Identifier.AddSingleton}}>(new ConfigureNamedOptions<{{Identifier.TOptions}}>({{Identifier.name}}, {{Identifier.instance}} => {{nameof(MethodsToGen_CoreBindingHelper.BindCoreMain)}}({{Identifier.config}}, {{Identifier.instance}}, typeof({{Identifier.TOptions}}), {{Identifier.configureOptions}}))); """); EmitEndBlock(); } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Microsoft.Extensions.Configuration.Binder.SourceGeneration.csproj b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Microsoft.Extensions.Configuration.Binder.SourceGeneration.csproj index e895d18c5556c6..de629b1a641ac3 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Microsoft.Extensions.Configuration.Binder.SourceGeneration.csproj +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Microsoft.Extensions.Configuration.Binder.SourceGeneration.csproj @@ -10,7 +10,7 @@ - + @@ -23,34 +23,35 @@ + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/ConfigurationSectionSpec.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/ConfigurationSectionSpec.cs deleted file mode 100644 index ed1fcac7636ba7..00000000000000 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/ConfigurationSectionSpec.cs +++ /dev/null @@ -1,14 +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 Microsoft.CodeAnalysis; - -namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration -{ - internal sealed record ConfigurationSectionSpec : TypeSpec - { - public ConfigurationSectionSpec(ITypeSymbol type) : base(type) { } - - public override TypeSpecKind SpecKind => TypeSpecKind.IConfigurationSection; - } -} diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/InitializationStrategy.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/InitializationStrategy.cs deleted file mode 100644 index 866dd254e0181e..00000000000000 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/InitializationStrategy.cs +++ /dev/null @@ -1,14 +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 Microsoft.Extensions.Configuration.Binder.SourceGeneration -{ - internal enum InitializationStrategy - { - None = 0, - ParameterlessConstructor = 1, - ParameterizedConstructor = 2, - ToEnumerableMethod = 3, - Array = 4, - } -} diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Parser/BinderInvocation.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Parser/BinderInvocation.cs similarity index 100% rename from src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Parser/BinderInvocation.cs rename to src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Parser/BinderInvocation.cs diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Parser/ConfigurationBinder.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Parser/ConfigurationBinder.cs similarity index 80% rename from src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Parser/ConfigurationBinder.cs rename to src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Parser/ConfigurationBinder.cs index e24ce11fe4374c..3996142adf9089 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Parser/ConfigurationBinder.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Parser/ConfigurationBinder.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Collections.Generic; using System.Collections.Immutable; using System.Linq; using Microsoft.CodeAnalysis.Operations; @@ -14,31 +13,29 @@ public sealed partial class ConfigurationBindingGenerator { private sealed partial class Parser { - private void RegisterMethodInvocation_ConfigurationBinder(BinderInvocation invocation) + private void ParseInvocation_ConfigurationBinder(BinderInvocation invocation) { switch (invocation.Operation.TargetMethod.Name) { case nameof(MethodsToGen_ConfigurationBinder.Bind): { - RegisterBindInvocation(invocation); + ParseBindInvocation_ConfigurationBinder(invocation); } break; case nameof(MethodsToGen_ConfigurationBinder.Get): { - RegisterGetInvocation(invocation); + ParseGetInvocation(invocation); } break; case nameof(MethodsToGen_ConfigurationBinder.GetValue): { - RegisterGetValueInvocation(invocation); + ParseGetValueInvocation(invocation); } break; - default: - return; } } - private void RegisterBindInvocation(BinderInvocation invocation) + private void ParseBindInvocation_ConfigurationBinder(BinderInvocation invocation) { IInvocationOperation operation = invocation.Operation!; ImmutableArray @params = operation.TargetMethod.Parameters; @@ -72,7 +69,7 @@ private void RegisterBindInvocation(BinderInvocation invocation) return; } - int objectIndex = overload switch + int instanceIndex = overload switch { MethodsToGen_ConfigurationBinder.Bind_instance => 1, MethodsToGen_ConfigurationBinder.Bind_instance_BinderOptions => 1, @@ -80,13 +77,13 @@ private void RegisterBindInvocation(BinderInvocation invocation) _ => throw new InvalidOperationException() }; - IArgumentOperation objectArg = operation.Arguments[objectIndex]; - if (objectArg.Parameter.Type.SpecialType != SpecialType.System_Object) + IArgumentOperation instanceArg = GetArgumentForParameterAtIndex(operation.Arguments, instanceIndex); + if (instanceArg.Parameter.Type.SpecialType != SpecialType.System_Object) { return; } - ITypeSymbol? type = ResolveType(objectArg.Value)?.WithNullableAnnotation(NullableAnnotation.None); + ITypeSymbol? type = ResolveType(instanceArg.Value)?.WithNullableAnnotation(NullableAnnotation.None); if (!IsValidRootConfigType(type)) { @@ -102,7 +99,7 @@ private void RegisterBindInvocation(BinderInvocation invocation) if (GetTargetTypeForRootInvocationCore(type, invocation.Location) is TypeSpec typeSpec) { - RegisterAsInterceptor_ConfigBinder_BindMethod(overload, typeSpec, invocation.Operation); + RegisterInterceptor(overload, typeSpec, invocation.Operation); } static ITypeSymbol? ResolveType(IOperation conversionOperation) => @@ -122,7 +119,20 @@ private void RegisterBindInvocation(BinderInvocation invocation) }; } - private void RegisterGetInvocation(BinderInvocation invocation) + private static IArgumentOperation GetArgumentForParameterAtIndex(ImmutableArray arguments, int parameterIndex) + { + foreach (var argument in arguments) + { + if (argument.Parameter?.Ordinal == parameterIndex) + { + return argument; + } + } + + throw new InvalidOperationException(); + } + + private void ParseGetInvocation(BinderInvocation invocation) { IInvocationOperation operation = invocation.Operation!; IMethodSymbol targetMethod = operation.TargetMethod; @@ -161,7 +171,7 @@ private void RegisterGetInvocation(BinderInvocation invocation) } else { - ITypeOfOperation? typeOfOperation = operation.Arguments[1].ChildOperations.FirstOrDefault() as ITypeOfOperation; + ITypeOfOperation? typeOfOperation = GetArgumentForParameterAtIndex(operation.Arguments, 1).ChildOperations.FirstOrDefault() as ITypeOfOperation; type = typeOfOperation?.TypeOperand; if (paramCount is 2) @@ -176,13 +186,13 @@ private void RegisterGetInvocation(BinderInvocation invocation) if (GetTargetTypeForRootInvocation(type, invocation.Location) is TypeSpec typeSpec) { - RegisterAsInterceptor_ConfigBinder(overload, invocation.Operation); + RegisterInvocation(overload, invocation.Operation); RegisterTypeForGetCoreGen(typeSpec); } } - private void RegisterGetValueInvocation(BinderInvocation invocation) + private void ParseGetValueInvocation(BinderInvocation invocation) { IInvocationOperation operation = invocation.Operation!; IMethodSymbol targetMethod = operation.TargetMethod; @@ -221,7 +231,7 @@ private void RegisterGetValueInvocation(BinderInvocation invocation) return; } - ITypeOfOperation? typeOfOperation = operation.Arguments[1].ChildOperations.FirstOrDefault() as ITypeOfOperation; + ITypeOfOperation? typeOfOperation = GetArgumentForParameterAtIndex(operation.Arguments, 1).ChildOperations.FirstOrDefault() as ITypeOfOperation; type = typeOfOperation?.TypeOperand; if (paramCount is 3) @@ -245,23 +255,23 @@ private void RegisterGetValueInvocation(BinderInvocation invocation) if (IsParsableFromString(effectiveType, out _) && GetTargetTypeForRootInvocationCore(type, invocation.Location) is TypeSpec typeSpec) { - RegisterAsInterceptor_ConfigBinder(overload, invocation.Operation); + RegisterInvocation(overload, invocation.Operation); RegisterTypeForMethodGen(MethodsToGen_CoreBindingHelper.GetValueCore, typeSpec); } } - private void RegisterAsInterceptor_ConfigBinder(MethodsToGen_ConfigurationBinder overload, IInvocationOperation operation) + private void RegisterInvocation(MethodsToGen_ConfigurationBinder overload, IInvocationOperation operation) { _sourceGenSpec.MethodsToGen_ConfigurationBinder |= overload; - RegisterAsInterceptor(overload, operation); + RegisterInterceptor(overload, operation); } /// /// Registers generated Bind methods as interceptors. This is done differently from other root - /// methods because we need to + /// methods because we need to /// explicitly account for the type to bind, to avoid type-check issues for polymorphic objects. /// - private void RegisterAsInterceptor_ConfigBinder_BindMethod(MethodsToGen_ConfigurationBinder overload, TypeSpec typeSpec, IInvocationOperation operation) + private void RegisterInterceptor(MethodsToGen_ConfigurationBinder overload, TypeSpec typeSpec, IInvocationOperation operation) { _sourceGenSpec.MethodsToGen_ConfigurationBinder |= overload; _sourceGenSpec.InterceptionInfo_ConfigBinder.RegisterOverloadInfo(overload, typeSpec, operation); diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Parser/Diagnostics.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Parser/Diagnostics.cs similarity index 100% rename from src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Parser/Diagnostics.cs rename to src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Parser/Diagnostics.cs diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Parser/Extensions.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Parser/Extensions.cs new file mode 100644 index 00000000000000..fa0b3691ec4047 --- /dev/null +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Parser/Extensions.cs @@ -0,0 +1,68 @@ +// 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.Text; +using Microsoft.CodeAnalysis; +using SourceGenerators; + +namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration +{ + internal static class ParserExtensions + { + private static readonly SymbolDisplayFormat s_identifierCompatibleFormat = new SymbolDisplayFormat( + globalNamespaceStyle: SymbolDisplayGlobalNamespaceStyle.Omitted, + typeQualificationStyle: SymbolDisplayTypeQualificationStyle.NameAndContainingTypes, + genericsOptions: SymbolDisplayGenericsOptions.None, + miscellaneousOptions: SymbolDisplayMiscellaneousOptions.UseSpecialTypes); + + public static void RegisterCacheEntry(this Dictionary cache, TKey key, TEntry entry) + where TKey : notnull + where TValue : ICollection, new() + { + if (!cache.TryGetValue(key, out TValue? entryCollection)) + { + cache[key] = entryCollection = new TValue(); + } + + entryCollection.Add(entry); + } + + public static void Deconstruct(this KeyValuePair> source, out ComplexTypeSpec Key, out List Value) + { + Key = (ComplexTypeSpec)source.Key; + Value = source.Value; + } + + public static string ToIdentifierCompatibleSubstring(this ITypeSymbol type) + { + if (type is IArrayTypeSymbol arrayType) + { + int rank = arrayType.Rank; + string suffix = rank == 1 ? "Array" : $"Array{rank}D"; // Array, Array2D, Array3D, ... + return ToIdentifierCompatibleSubstring(arrayType.ElementType) + suffix; + } + + string displayString = type.ContainingType is null + ? type.Name + : type.ToDisplayString(s_identifierCompatibleFormat).Replace(".", string.Empty); + + if (type is not INamedTypeSymbol { IsGenericType: true } namedType) + { + return displayString; + } + + StringBuilder sb = new(displayString); + + if (namedType.GetAllTypeArgumentsInScope() is List typeArgsInScope) + { + foreach (ITypeSymbol genericArg in typeArgsInScope) + { + sb.Append(ToIdentifierCompatibleSubstring(genericArg)); + } + } + + return sb.ToString(); + } + } +} diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Parser/OptionsBuilderConfigurationExtensions.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Parser/OptionsBuilderConfigurationExtensions.cs similarity index 71% rename from src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Parser/OptionsBuilderConfigurationExtensions.cs rename to src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Parser/OptionsBuilderConfigurationExtensions.cs index a62e63c0d90d5e..9cf59a120e1fdc 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Parser/OptionsBuilderConfigurationExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Parser/OptionsBuilderConfigurationExtensions.cs @@ -12,7 +12,7 @@ public sealed partial class ConfigurationBindingGenerator { private sealed partial class Parser { - private void RegisterMethodInvocation_OptionsBuilderExt(BinderInvocation invocation) + private void ParseInvocation_OptionsBuilderExt(BinderInvocation invocation) { IMethodSymbol targetMethod = invocation.Operation.TargetMethod; ImmutableArray @params = targetMethod.Parameters; @@ -25,18 +25,18 @@ private void RegisterMethodInvocation_OptionsBuilderExt(BinderInvocation invocat return; } - TypeSpec typeSpec = GetTargetTypeForRootInvocation( - type: targetMethod.TypeArguments[0].WithNullableAnnotation(NullableAnnotation.None), - invocation.Location); + ITypeSymbol? typeSymbol = targetMethod.TypeArguments[0].WithNullableAnnotation(NullableAnnotation.None); + // This would violate generic type constraint; any such invocation could not have been included in the initial parser. + Debug.Assert(typeSymbol?.IsValueType is not true); - if (typeSpec is null) + if (GetTargetTypeForRootInvocation(typeSymbol, invocation.Location) is not ComplexTypeSpec typeSpec) { return; } if (targetMethod.Name is "Bind") { - RegisterBindInvocation(invocation, typeSpec); + ParseBindInvocation_OptionsBuilderExt(invocation, typeSpec); } else if (targetMethod.Name is "BindConfiguration") { @@ -44,7 +44,7 @@ private void RegisterMethodInvocation_OptionsBuilderExt(BinderInvocation invocat } } - private void RegisterBindInvocation(BinderInvocation invocation, TypeSpec typeSpec) + private void ParseBindInvocation_OptionsBuilderExt(BinderInvocation invocation, ComplexTypeSpec typeSpec) { IInvocationOperation operation = invocation.Operation!; IMethodSymbol targetMethod = operation.TargetMethod; @@ -66,14 +66,14 @@ 3 when SymbolEqualityComparer.Default.Equals(_typeSymbols.ActionOfBinderOptions, _ => MethodsToGen_Extensions_OptionsBuilder.None }; - if (overload is not MethodsToGen_Extensions_OptionsBuilder.None) + if (overload is not MethodsToGen_Extensions_OptionsBuilder.None && + TryRegisterTypeForMethodGen(MethodsToGen_Extensions_ServiceCollection.Configure_T_name_BinderOptions, typeSpec)) { - RegisterAsInterceptor_OptionsBuilder(overload, operation); - RegisterTypeForMethodGen(MethodsToGen_Extensions_ServiceCollection.Configure_T_name_BinderOptions, typeSpec); + RegisterInvocation(overload, operation); } } - private void ParseBindConfigurationInvocation(BinderInvocation invocation, TypeSpec typeSpec) + private void ParseBindConfigurationInvocation(BinderInvocation invocation, ComplexTypeSpec typeSpec) { IMethodSymbol targetMethod = invocation.Operation.TargetMethod; ImmutableArray @params = targetMethod.Parameters; @@ -83,17 +83,17 @@ private void ParseBindConfigurationInvocation(BinderInvocation invocation, TypeS if (paramCount is 3 && @params[1].Type.SpecialType is SpecialType.System_String && - SymbolEqualityComparer.Default.Equals(_typeSymbols.ActionOfBinderOptions, @params[2].Type)) + SymbolEqualityComparer.Default.Equals(_typeSymbols.ActionOfBinderOptions, @params[2].Type) && + TryRegisterTypeForBindCoreMainGen(typeSpec)) { - RegisterAsInterceptor_OptionsBuilder(MethodsToGen_Extensions_OptionsBuilder.BindConfiguration_T_path_BinderOptions, invocation.Operation); - RegisterTypeForBindCoreMainGen(typeSpec); + RegisterInvocation(MethodsToGen_Extensions_OptionsBuilder.BindConfiguration_T_path_BinderOptions, invocation.Operation); } } - private void RegisterAsInterceptor_OptionsBuilder(MethodsToGen_Extensions_OptionsBuilder overload, IInvocationOperation operation) + private void RegisterInvocation(MethodsToGen_Extensions_OptionsBuilder overload, IInvocationOperation operation) { _sourceGenSpec.MethodsToGen_OptionsBuilderExt |= overload; - RegisterAsInterceptor(overload, operation); + RegisterInterceptor(overload, operation); // Emitting refs to IOptionsChangeTokenSource, ConfigurationChangeTokenSource. _sourceGenSpec.Namespaces.Add("Microsoft.Extensions.Options"); diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Parser/OptionsConfigurationServiceCollectionExtensions.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Parser/OptionsConfigurationServiceCollectionExtensions.cs similarity index 69% rename from src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Parser/OptionsConfigurationServiceCollectionExtensions.cs rename to src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Parser/OptionsConfigurationServiceCollectionExtensions.cs index c356b29a69efff..e86231f32e42ab 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/Parser/OptionsConfigurationServiceCollectionExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Parser/OptionsConfigurationServiceCollectionExtensions.cs @@ -12,7 +12,7 @@ public sealed partial class ConfigurationBindingGenerator { private sealed partial class Parser { - private void RegisterMethodInvocation_ServiceCollectionExt(BinderInvocation invocation) + private void ParseInvocation_ServiceCollectionExt(BinderInvocation invocation) { IInvocationOperation operation = invocation.Operation!; IMethodSymbol targetMethod = operation.TargetMethod; @@ -69,24 +69,29 @@ @params[1].Type.SpecialType is SpecialType.System_String && return; } - TypeSpec typeSpec = GetTargetTypeForRootInvocation( - type: targetMethod.TypeArguments[0].WithNullableAnnotation(NullableAnnotation.None), - invocation.Location); + ITypeSymbol? typeSymbol = targetMethod.TypeArguments[0].WithNullableAnnotation(NullableAnnotation.None); + // This would violate generic type constraint; any such invocation could not have been included in the initial parser. + Debug.Assert(typeSymbol?.IsValueType is not true); - if (typeSpec is null) + if (GetTargetTypeForRootInvocation(typeSymbol, invocation.Location) is ComplexTypeSpec typeSpec && + TryRegisterTypeForMethodGen(overload, typeSpec)) { - return; + RegisterInterceptor(overload, operation); } - - RegisterTypeForMethodGen(overload, typeSpec); - RegisterAsInterceptor(overload, operation); } - private void RegisterTypeForMethodGen(MethodsToGen_Extensions_ServiceCollection overload, TypeSpec typeSpec) + private bool TryRegisterTypeForMethodGen(MethodsToGen_Extensions_ServiceCollection overload, ComplexTypeSpec typeSpec) { - _sourceGenSpec.MethodsToGen_ServiceCollectionExt |= overload; - _sourceGenSpec.Namespaces.Add("Microsoft.Extensions.DependencyInjection"); - RegisterTypeForBindCoreMainGen(typeSpec); + if (TryRegisterTypeForBindCoreMainGen(typeSpec)) + { + _sourceGenSpec.MethodsToGen_ServiceCollectionExt |= overload; + _sourceGenSpec.Namespaces.Add("Microsoft.Extensions.DependencyInjection"); + // Emitting refs to IOptionsChangeTokenSource, ConfigurationChangeTokenSource, IConfigureOptions<>, ConfigureNamedOptions<>. + _sourceGenSpec.Namespaces.Add("Microsoft.Extensions.Options"); + return true; + } + + return false; } } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/Strings.resx b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/Strings.resx index 3978cbaac6ce48..be66da59c6b5a7 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/Strings.resx +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/Strings.resx @@ -121,7 +121,7 @@ The collection type is not supported: '{0}'. - Binding logic was not generated for a binder call. Unsupported input patterns include generic calls and passing boxed objects. + Binding logic was not generated for a binder call. Unsupported input patterns include generic calls, passing boxed objects, and passing types that are not 'public' or 'internal'. The target type for a binder call could not be determined diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.cs.xlf b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.cs.xlf index c6672eaff0bcd8..963511c13bb89d 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.cs.xlf +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.cs.xlf @@ -8,8 +8,8 @@ - Binding logic was not generated for a binder call. Unsupported input patterns include generic calls and passing boxed objects. - Pro volání vazače se nevygenerovala logika vazby. Nepodporované vstupní vzory zahrnují obecná volání a předávání zabalených objektů. + Binding logic was not generated for a binder call. Unsupported input patterns include generic calls, passing boxed objects, and passing types that are not 'public' or 'internal'. + Pro volání vazače se nevygenerovala logika vazby. Nepodporované vstupní vzory zahrnují obecná volání a předávání zabalených objektů. diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.de.xlf b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.de.xlf index 5f353065a5f511..a1dff35e3e546d 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.de.xlf +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.de.xlf @@ -8,8 +8,8 @@ - Binding logic was not generated for a binder call. Unsupported input patterns include generic calls and passing boxed objects. - Für einen Binderaufruf wurde keine Bindungslogik generiert. Nicht unterstützte Eingabemuster umfassen generische Aufrufe und übergeben geschachtelte Objekte. + Binding logic was not generated for a binder call. Unsupported input patterns include generic calls, passing boxed objects, and passing types that are not 'public' or 'internal'. + Für einen Binderaufruf wurde keine Bindungslogik generiert. Nicht unterstützte Eingabemuster umfassen generische Aufrufe und übergeben geschachtelte Objekte. diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.es.xlf b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.es.xlf index cd54149e66c2fa..7c1a247685042b 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.es.xlf +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.es.xlf @@ -8,8 +8,8 @@ - Binding logic was not generated for a binder call. Unsupported input patterns include generic calls and passing boxed objects. - No se generó la lógica de enlace para una llamada de enlazador. Los patrones de entrada no admitidos incluyen llamadas genéricas y pasar objetos en cuadros. + Binding logic was not generated for a binder call. Unsupported input patterns include generic calls, passing boxed objects, and passing types that are not 'public' or 'internal'. + No se generó la lógica de enlace para una llamada de enlazador. Los patrones de entrada no admitidos incluyen llamadas genéricas y pasar objetos en cuadros. diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.fr.xlf b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.fr.xlf index b1c0753a49e8a5..89e1adcc6e7090 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.fr.xlf +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.fr.xlf @@ -8,8 +8,8 @@ - Binding logic was not generated for a binder call. Unsupported input patterns include generic calls and passing boxed objects. - La logique de liaison n’a pas été générée pour un appel de classeur. Les modèles d’entrée non pris en charge incluent les appels génériques et les objets boxed de passage. + Binding logic was not generated for a binder call. Unsupported input patterns include generic calls, passing boxed objects, and passing types that are not 'public' or 'internal'. + La logique de liaison n’a pas été générée pour un appel de classeur. Les modèles d’entrée non pris en charge incluent les appels génériques et les objets boxed de passage. diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.it.xlf b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.it.xlf index 27d10a7ee5f9f2..2be0cfee435fe0 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.it.xlf +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.it.xlf @@ -8,8 +8,8 @@ - Binding logic was not generated for a binder call. Unsupported input patterns include generic calls and passing boxed objects. - La logica di binding non è stata generata per una chiamata binder. I modelli di input non supportati includono chiamate generiche e il passaggio di oggetti in caselle. + Binding logic was not generated for a binder call. Unsupported input patterns include generic calls, passing boxed objects, and passing types that are not 'public' or 'internal'. + La logica di binding non è stata generata per una chiamata binder. I modelli di input non supportati includono chiamate generiche e il passaggio di oggetti in caselle. diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.ja.xlf b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.ja.xlf index 24621bcc8b3d22..e01da3965c2200 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.ja.xlf +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.ja.xlf @@ -8,8 +8,8 @@ - Binding logic was not generated for a binder call. Unsupported input patterns include generic calls and passing boxed objects. - バインダー呼び出しのバインド ロジックが生成されませんでした。サポートされていない入力パターンとしては、ジェネリック呼び出し、ボックス化されたオブジェクトの受け渡しなどがあります。 + Binding logic was not generated for a binder call. Unsupported input patterns include generic calls, passing boxed objects, and passing types that are not 'public' or 'internal'. + バインダー呼び出しのバインド ロジックが生成されませんでした。サポートされていない入力パターンとしては、ジェネリック呼び出し、ボックス化されたオブジェクトの受け渡しなどがあります。 diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.ko.xlf b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.ko.xlf index 217a0cd9f8e54c..ea5df3563d0afc 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.ko.xlf +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.ko.xlf @@ -8,8 +8,8 @@ - Binding logic was not generated for a binder call. Unsupported input patterns include generic calls and passing boxed objects. - 바인더 호출에 대한 바인딩 논리가 생성되지 않았습니다. 지원되지 않는 입력 패턴에는 제네릭 호출 및 boxed 개체 전달이 포함됩니다. + Binding logic was not generated for a binder call. Unsupported input patterns include generic calls, passing boxed objects, and passing types that are not 'public' or 'internal'. + 바인더 호출에 대한 바인딩 논리가 생성되지 않았습니다. 지원되지 않는 입력 패턴에는 제네릭 호출 및 boxed 개체 전달이 포함됩니다. diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.pl.xlf b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.pl.xlf index 0b24813a77a805..1902e1761213ec 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.pl.xlf +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.pl.xlf @@ -8,8 +8,8 @@ - Binding logic was not generated for a binder call. Unsupported input patterns include generic calls and passing boxed objects. - Nie wygenerowano logiki powiązania dla wywołania integratora. Nieobsługiwane wzorce wejściowe obejmują wywołania ogólne i przekazywanie obiektów w ramce. + Binding logic was not generated for a binder call. Unsupported input patterns include generic calls, passing boxed objects, and passing types that are not 'public' or 'internal'. + Nie wygenerowano logiki powiązania dla wywołania integratora. Nieobsługiwane wzorce wejściowe obejmują wywołania ogólne i przekazywanie obiektów w ramce. diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.pt-BR.xlf b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.pt-BR.xlf index 0ad700e64e9ebd..0d6a4c78cccfa3 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.pt-BR.xlf +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.pt-BR.xlf @@ -8,8 +8,8 @@ - Binding logic was not generated for a binder call. Unsupported input patterns include generic calls and passing boxed objects. - A lógica de associação não foi gerada para uma chamada de associador. Os padrões de entrada sem suporte incluem chamadas genéricas e passagem de objetos em caixa. + Binding logic was not generated for a binder call. Unsupported input patterns include generic calls, passing boxed objects, and passing types that are not 'public' or 'internal'. + A lógica de associação não foi gerada para uma chamada de associador. Os padrões de entrada sem suporte incluem chamadas genéricas e passagem de objetos em caixa. diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.ru.xlf b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.ru.xlf index 5e53330060c30b..084bdf15390828 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.ru.xlf +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.ru.xlf @@ -8,8 +8,8 @@ - Binding logic was not generated for a binder call. Unsupported input patterns include generic calls and passing boxed objects. - Логика привязки не была создана для вызова модуля привязки. К неподдерживаемым шаблонам ввода относятся универсальные вызовы и передача упакованных объектов. + Binding logic was not generated for a binder call. Unsupported input patterns include generic calls, passing boxed objects, and passing types that are not 'public' or 'internal'. + Логика привязки не была создана для вызова модуля привязки. К неподдерживаемым шаблонам ввода относятся универсальные вызовы и передача упакованных объектов. diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.tr.xlf b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.tr.xlf index cfaea488fd195d..520c93dd5a9b36 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.tr.xlf +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.tr.xlf @@ -8,8 +8,8 @@ - Binding logic was not generated for a binder call. Unsupported input patterns include generic calls and passing boxed objects. - Bir bağlayıcı çağrısı için bağlama mantığı oluşturulmadı. Desteklenmeyen giriş desenleri genel çağrılar ve geçici kutulu nesneler içeriyor. + Binding logic was not generated for a binder call. Unsupported input patterns include generic calls, passing boxed objects, and passing types that are not 'public' or 'internal'. + Bir bağlayıcı çağrısı için bağlama mantığı oluşturulmadı. Desteklenmeyen giriş desenleri genel çağrılar ve geçici kutulu nesneler içeriyor. diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.zh-Hans.xlf b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.zh-Hans.xlf index 3dfb711b39b4eb..00f3ca6bb825a2 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.zh-Hans.xlf @@ -8,8 +8,8 @@ - Binding logic was not generated for a binder call. Unsupported input patterns include generic calls and passing boxed objects. - 未为联编程序调用生成绑定逻辑。不支持的输入模式包括泛型调用和传递装箱对象。 + Binding logic was not generated for a binder call. Unsupported input patterns include generic calls, passing boxed objects, and passing types that are not 'public' or 'internal'. + 未为联编程序调用生成绑定逻辑。不支持的输入模式包括泛型调用和传递装箱对象。 diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.zh-Hant.xlf b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.zh-Hant.xlf index 9917b18949880e..6986500cff8892 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Resources/xlf/Strings.zh-Hant.xlf @@ -8,8 +8,8 @@ - Binding logic was not generated for a binder call. Unsupported input patterns include generic calls and passing boxed objects. - 未產生文件夾呼叫的繫結邏輯。不支援的輸入模式包括一般呼叫和傳遞方塊物件。 + Binding logic was not generated for a binder call. Unsupported input patterns include generic calls, passing boxed objects, and passing types that are not 'public' or 'internal'. + 未產生文件夾呼叫的繫結邏輯。不支援的輸入模式包括一般呼叫和傳遞方塊物件。 diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/InterceptorLocationInfo.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/InterceptorLocationInfo.cs similarity index 70% rename from src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/InterceptorLocationInfo.cs rename to src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/InterceptorLocationInfo.cs index d1dc4f4afa7e7e..441acbe6a7444f 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/InterceptorLocationInfo.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/InterceptorLocationInfo.cs @@ -15,28 +15,27 @@ internal sealed record InterceptorLocationInfo { public InterceptorLocationInfo(IInvocationOperation operation) { - SyntaxNode operationSyntax = operation.Syntax; - TextSpan operationSpan = operationSyntax.Span; - SyntaxTree operationSyntaxTree = operationSyntax.SyntaxTree; - - FilePath = GetInterceptorFilePath(operationSyntaxTree, operation.SemanticModel?.Compilation.Options.SourceReferenceResolver); - - FileLinePositionSpan span = operationSyntaxTree.GetLineSpan(operationSpan); - LineNumber = span.StartLinePosition.Line + 1; - - // Calculate the character offset to the end of the binding invocation detected. - int invocationLength = ((MemberAccessExpressionSyntax)((InvocationExpressionSyntax)operationSyntax).Expression).Expression.Span.Length; - CharacterNumber = span.StartLinePosition.Character + invocationLength + 2; + MemberAccessExpressionSyntax memberAccessExprSyntax = ((MemberAccessExpressionSyntax)((InvocationExpressionSyntax)operation.Syntax).Expression); + SyntaxTree operationSyntaxTree = operation.Syntax.SyntaxTree; + TextSpan memberNameSpan = memberAccessExprSyntax.Name.Span; + FileLinePositionSpan linePosSpan = operationSyntaxTree.GetLineSpan(memberNameSpan); + + LineNumber = linePosSpan.StartLinePosition.Line + 1; + CharacterNumber = linePosSpan.StartLinePosition.Character + 1; + FilePath = GetInterceptorFilePath(); + + // Use the same logic used by the interceptors API for resolving the source mapped value of a path. + // https://github.com/dotnet/roslyn/blob/f290437fcc75dad50a38c09e0977cce13a64f5ba/src/Compilers/CSharp/Portable/Compilation/CSharpCompilation.cs#L1063-L1064 + string GetInterceptorFilePath() + { + SourceReferenceResolver? sourceReferenceResolver = operation.SemanticModel?.Compilation.Options.SourceReferenceResolver; + return sourceReferenceResolver?.NormalizePath(operationSyntaxTree.FilePath, baseFilePath: null) ?? operationSyntaxTree.FilePath; + } } public string FilePath { get; } public int LineNumber { get; } public int CharacterNumber { get; } - - // Utilize the same logic used by the interceptors API for resolving the source mapped value of a path. - // https://github.com/dotnet/roslyn/blob/f290437fcc75dad50a38c09e0977cce13a64f5ba/src/Compilers/CSharp/Portable/Compilation/CSharpCompilation.cs#L1063-L1064 - private static string GetInterceptorFilePath(SyntaxTree tree, SourceReferenceResolver? resolver) => - resolver?.NormalizePath(tree.FilePath, baseFilePath: null) ?? tree.FilePath; } internal sealed record ConfigurationBinderInterceptorInfo @@ -52,7 +51,7 @@ public void RegisterOverloadInfo(MethodsToGen_ConfigurationBinder overload, Type } public OverloadInterceptorInfo GetOverloadInfo(MethodsToGen_ConfigurationBinder overload) => - DetermineOverload(overload, initIfNull: false) ?? throw new ArgumentNullException(nameof(overload)); + DetermineOverload(overload, initIfNull: false) ?? throw new ArgumentOutOfRangeException(nameof(overload)); private OverloadInterceptorInfo? DetermineOverload(MethodsToGen_ConfigurationBinder overload, bool initIfNull) { diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/KnownTypeSymbols.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/KnownTypeSymbols.cs similarity index 98% rename from src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/KnownTypeSymbols.cs rename to src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/KnownTypeSymbols.cs index e3a4f67ed396b4..e381dc9c7c43ee 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/KnownTypeSymbols.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/KnownTypeSymbols.cs @@ -13,6 +13,8 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { internal sealed record KnownTypeSymbols { + public CSharpCompilation Compilation { get; } + public INamedTypeSymbol String { get; } public INamedTypeSymbol? CultureInfo { get; } public INamedTypeSymbol? DateOnly { get; } @@ -57,6 +59,8 @@ internal sealed record KnownTypeSymbols public KnownTypeSymbols(CSharpCompilation compilation) { + Compilation = compilation; + // Primitives (needed because they are Microsoft.CodeAnalysis.SpecialType.None) CultureInfo = compilation.GetBestTypeByMetadataName(typeof(CultureInfo)); DateOnly = compilation.GetBestTypeByMetadataName("System.DateOnly"); diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/MemberSpec.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/Members/MemberSpec.cs similarity index 92% rename from src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/MemberSpec.cs rename to src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/Members/MemberSpec.cs index 4bf674f597502a..effd550482595d 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/MemberSpec.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/Members/MemberSpec.cs @@ -16,7 +16,6 @@ public MemberSpec(ISymbol member) } public string Name { get; } - public bool ErrorOnFailedBinding { get; protected set; } public string DefaultValueExpr { get; protected set; } public required TypeSpec Type { get; init; } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/ParameterSpec.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/Members/ParameterSpec.cs similarity index 94% rename from src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/ParameterSpec.cs rename to src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/Members/ParameterSpec.cs index 9b5e4360c11169..0f17a6247f74d2 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/ParameterSpec.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/Members/ParameterSpec.cs @@ -26,6 +26,8 @@ public ParameterSpec(IParameterSymbol parameter) : base(parameter) } } + public bool ErrorOnFailedBinding { get; private set; } + public RefKind RefKind { get; } public override bool CanGet => false; diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/PropertySpec.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/Members/PropertySpec.cs similarity index 95% rename from src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/PropertySpec.cs rename to src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/Members/PropertySpec.cs index 584e8d570b8a9f..4e9c468c4e3352 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/PropertySpec.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/Members/PropertySpec.cs @@ -29,6 +29,6 @@ public PropertySpec(IPropertySymbol property) : base(property) public override bool CanSet { get; } - public bool ShouldBind() => CanGet || CanSet; + public bool ShouldBindTo => CanGet || CanSet; } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/MethodsToGen.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/MethodsToGen.cs similarity index 91% rename from src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/MethodsToGen.cs rename to src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/MethodsToGen.cs index 2c582b20e8ebd6..6165a3e6d46dcb 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Helpers/MethodsToGen.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/MethodsToGen.cs @@ -27,17 +27,17 @@ internal enum MethodsToGen_ConfigurationBinder None = 0x0, /// - /// Bind(IConfiguration, object). + /// Bind(IConfiguration, object?). /// Bind_instance = 0x1, /// - /// Bind(IConfiguration, object, Action). + /// Bind(IConfiguration, object?, Action?). /// Bind_instance_BinderOptions = 0x2, /// - /// Bind(IConfiguration, string, object). + /// Bind(IConfiguration, string, object?). /// Bind_key_instance = 0x4, @@ -47,17 +47,17 @@ internal enum MethodsToGen_ConfigurationBinder Get_T = 0x8, /// - /// Get(IConfiguration, Action). + /// Get(IConfiguration, Action?). /// Get_T_BinderOptions = 0x10, /// - /// Get(IConfiguration, Type). + /// Get(IConfiguration, Type). /// Get_TypeOf = 0x20, /// - /// Get(IConfiguration, Type, Action). + /// Get(IConfiguration, Type, Action?). /// Get_TypeOf_BinderOptions = 0x40, @@ -67,7 +67,7 @@ internal enum MethodsToGen_ConfigurationBinder GetValue_TypeOf_key = 0x80, /// - /// GetValue(IConfiguration, Type, object). + /// GetValue(IConfiguration, Type, object?). /// GetValue_TypeOf_key_defaultValue = 0x100, diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/SourceGenerationSpec.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/SourceGenerationSpec.cs similarity index 100% rename from src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/SourceGenerationSpec.cs rename to src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/SourceGenerationSpec.cs diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/CollectionSpec.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/Types/CollectionSpec.cs similarity index 64% rename from src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/CollectionSpec.cs rename to src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/Types/CollectionSpec.cs index 280ecc4c536482..f565d245cc5502 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/CollectionSpec.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/Types/CollectionSpec.cs @@ -5,25 +5,19 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { - internal abstract record CollectionSpec : TypeSpec + internal abstract record CollectionSpec : ComplexTypeSpec { public CollectionSpec(ITypeSymbol type) : base(type) { } - public required TypeSpec ElementType { get; init; } - - public CollectionSpec? ConcreteType { get; set; } + public sealed override bool CanInstantiate => TypeToInstantiate?.CanInstantiate ?? InstantiationStrategy is not InstantiationStrategy.None; - public CollectionSpec? PopulationCastType { get; set; } + public required TypeSpec ElementType { get; init; } public required CollectionPopulationStrategy PopulationStrategy { get; init; } - public override bool CanInitialize => ConcreteType?.CanInitialize ?? CanInitComplexObject(); - - public override required InitializationStrategy InitializationStrategy { get; set; } + public required CollectionSpec? TypeToInstantiate { get; init; } - public required string? ToEnumerableMethodCall { get; init; } - - public sealed override bool NeedsMemberBinding => true; + public required CollectionSpec? PopulationCastType { get; init; } } internal sealed record EnumerableSpec : CollectionSpec @@ -31,6 +25,8 @@ internal sealed record EnumerableSpec : CollectionSpec public EnumerableSpec(ITypeSymbol type) : base(type) { } public override TypeSpecKind SpecKind => TypeSpecKind.Enumerable; + + public override bool HasBindableMembers => PopulationStrategy is not CollectionPopulationStrategy.Unknown && ElementType.CanBindTo; } internal sealed record DictionarySpec : CollectionSpec @@ -39,6 +35,8 @@ public DictionarySpec(INamedTypeSymbol type) : base(type) { } public override TypeSpecKind SpecKind => TypeSpecKind.Dictionary; + public override bool HasBindableMembers => PopulationStrategy is not CollectionPopulationStrategy.Unknown; + public required ParsableFromStringSpec KeyType { get; init; } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/Types/ComplexTypeSpec.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/Types/ComplexTypeSpec.cs new file mode 100644 index 00000000000000..da5a5130141a53 --- /dev/null +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/Types/ComplexTypeSpec.cs @@ -0,0 +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 Microsoft.CodeAnalysis; + +namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration +{ + internal abstract record ComplexTypeSpec : TypeSpec + { + public ComplexTypeSpec(ITypeSymbol type) : base(type) { } + + public InstantiationStrategy InstantiationStrategy { get; set; } + + public sealed override bool CanBindTo => CanInstantiate || HasBindableMembers; + + public sealed override TypeSpec EffectiveType => this; + + public abstract bool HasBindableMembers { get; } + } + + internal enum InstantiationStrategy + { + None = 0, + ParameterlessConstructor = 1, + ParameterizedConstructor = 2, + ToEnumerableMethod = 3, + Array = 4, + } +} diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/NullableSpec.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/Types/NullableSpec.cs similarity index 73% rename from src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/NullableSpec.cs rename to src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/Types/NullableSpec.cs index 9dcca27596e7ee..3de6d7d465ad98 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/NullableSpec.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/Types/NullableSpec.cs @@ -9,10 +9,11 @@ internal sealed record NullableSpec : TypeSpec { private readonly TypeSpec _underlyingType; - public NullableSpec(ITypeSymbol type, TypeSpec underlyingType) : base(type) - { - _underlyingType = underlyingType; - } + public NullableSpec(ITypeSymbol type, TypeSpec underlyingType) : base(type) => _underlyingType = underlyingType; + + public override bool CanBindTo => _underlyingType.CanBindTo; + + public override bool CanInstantiate => _underlyingType.CanInstantiate; public override TypeSpecKind SpecKind => TypeSpecKind.Nullable; diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/ObjectSpec.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/Types/ObjectSpec.cs similarity index 63% rename from src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/ObjectSpec.cs rename to src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/Types/ObjectSpec.cs index 8cc0ba68b49381..f6978fa9cf470a 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/ObjectSpec.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/Types/ObjectSpec.cs @@ -8,22 +8,20 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { - internal sealed record ObjectSpec : TypeSpec + internal sealed record ObjectSpec : ComplexTypeSpec { public ObjectSpec(INamedTypeSymbol type) : base(type) { } public override TypeSpecKind SpecKind => TypeSpecKind.Object; - public override InitializationStrategy InitializationStrategy { get; set; } + public override bool HasBindableMembers => Properties.Values.Any(p => p.ShouldBindTo); - public override bool CanInitialize => CanInitComplexObject(); + public override bool CanInstantiate => InstantiationStrategy is not InstantiationStrategy.None && InitExceptionMessage is null; public Dictionary Properties { get; } = new(StringComparer.OrdinalIgnoreCase); public List ConstructorParameters { get; } = new(); - public override bool NeedsMemberBinding => CanInitialize && - Properties.Values.Count > 0 && - Properties.Values.Any(p => p.ShouldBind()); + public string? InitExceptionMessage { get; set; } } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/ParsableFromStringSpec.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/Types/SimpleTypeSpec.cs similarity index 69% rename from src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/ParsableFromStringSpec.cs rename to src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/Types/SimpleTypeSpec.cs index e19e3e61d210f3..2dfe08dc5f547a 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/ParsableFromStringSpec.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/Types/SimpleTypeSpec.cs @@ -6,7 +6,25 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { - internal sealed record ParsableFromStringSpec : TypeSpec + internal abstract record SimpleTypeSpec : TypeSpec + { + public SimpleTypeSpec(ITypeSymbol type) : base(type) { } + + public sealed override bool CanBindTo => true; + + public sealed override TypeSpec EffectiveType => this; + + public sealed override bool CanInstantiate => true; + } + + internal sealed record ConfigurationSectionSpec : SimpleTypeSpec + { + public ConfigurationSectionSpec(ITypeSymbol type) : base(type) { } + + public override TypeSpecKind SpecKind => TypeSpecKind.IConfigurationSection; + } + + internal sealed record ParsableFromStringSpec : SimpleTypeSpec { public ParsableFromStringSpec(ITypeSymbol type) : base(type) { } @@ -36,7 +54,7 @@ internal enum StringParsableTypeKind None = 0, /// - /// Declared types that can be assigned directly from IConfigurationSection.Value, i.e. string and tyepof(object). + /// Declared types that can be assigned directly from IConfigurationSection.Value, i.e. string and typeof(object). /// AssignFromSectionValue = 1, Enum = 2, diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/TypeSpec.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/Types/TypeSpec.cs similarity index 69% rename from src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/TypeSpec.cs rename to src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/Types/TypeSpec.cs index 6f5e26bf3f6d38..651a40639f0ced 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Model/TypeSpec.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/gen/Specs/Types/TypeSpec.cs @@ -1,10 +1,12 @@ // 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 Microsoft.CodeAnalysis; namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { + [DebuggerDisplay("Name={DisplayString}, Kind={SpecKind}")] internal abstract record TypeSpec { private static readonly SymbolDisplayFormat s_minimalDisplayFormat = new SymbolDisplayFormat( @@ -15,36 +17,30 @@ internal abstract record TypeSpec public TypeSpec(ITypeSymbol type) { - IsValueType = type.IsValueType; Namespace = type.ContainingNamespace?.ToDisplayString(); DisplayString = type.ToDisplayString(s_minimalDisplayFormat); - Name = Namespace + "." + DisplayString.Replace(".", "+"); - IsInterface = type.TypeKind is TypeKind.Interface; + Name = (Namespace is null ? string.Empty : Namespace + ".") + DisplayString.Replace(".", "+"); + IdentifierCompatibleSubstring = type.ToIdentifierCompatibleSubstring(); + IsValueType = type.IsValueType; } public string Name { get; } public string DisplayString { get; } + public string IdentifierCompatibleSubstring { get; } + public string? Namespace { get; } public bool IsValueType { get; } public abstract TypeSpecKind SpecKind { get; } - public virtual InitializationStrategy InitializationStrategy { get; set; } - - public virtual string? InitExceptionMessage { get; set; } - - public virtual bool CanInitialize => true; - - public virtual bool NeedsMemberBinding { get; } - - public virtual TypeSpec EffectiveType => this; + public abstract bool CanBindTo { get; } - public bool IsInterface { get; } + public abstract bool CanInstantiate { get; } - protected bool CanInitComplexObject() => InitializationStrategy is not InitializationStrategy.None && InitExceptionMessage is null; + public abstract TypeSpec EffectiveType { get; } } internal enum TypeSpecKind diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/ref/Microsoft.Extensions.Configuration.Binder.csproj b/src/libraries/Microsoft.Extensions.Configuration.Binder/ref/Microsoft.Extensions.Configuration.Binder.csproj index 10ca36dc6cd5f7..71445f507e73b7 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/ref/Microsoft.Extensions.Configuration.Binder.csproj +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/ref/Microsoft.Extensions.Configuration.Binder.csproj @@ -1,4 +1,5 @@ + $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) @@ -11,13 +12,11 @@ - - - + diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/src/ConfigurationBinder.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/src/ConfigurationBinder.cs index 8651e4922e0d72..dfc35d80208553 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/src/ConfigurationBinder.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/src/ConfigurationBinder.cs @@ -91,6 +91,7 @@ public static class ConfigurationBinder Action? configureOptions) { ThrowHelper.ThrowIfNull(configuration); + ThrowHelper.ThrowIfNull(type); var options = new BinderOptions(); configureOptions?.Invoke(options); @@ -108,7 +109,10 @@ public static class ConfigurationBinder [RequiresDynamicCode(DynamicCodeWarningMessage)] [RequiresUnreferencedCode(InstanceGetTypeTrimmingWarningMessage)] public static void Bind(this IConfiguration configuration, string key, object? instance) - => configuration.GetSection(key).Bind(instance); + { + ThrowHelper.ThrowIfNull(configuration); + configuration.GetSection(key).Bind(instance); + } /// /// Attempts to bind the given object instance to configuration values by matching property names against configuration keys recursively. @@ -200,6 +204,9 @@ public static void Bind(this IConfiguration configuration, object? instance, Act Type type, string key, object? defaultValue) { + ThrowHelper.ThrowIfNull(configuration); + ThrowHelper.ThrowIfNull(type); + IConfigurationSection section = configuration.GetSection(key); string? value = section.Value; if (value != null) @@ -291,6 +298,11 @@ private static void BindInstance( return; } + if (config is null) + { + return; + } + var section = config as IConfigurationSection; string? configValue = section?.Value; if (configValue != null && TryConvertValue(type, configValue, section?.Path, out object? convertedValue, out Exception? error)) @@ -305,123 +317,120 @@ private static void BindInstance( return; } - if (config != null) + if (config.GetChildren().Any()) { - if (config.GetChildren().Any()) + // for arrays and read-only list-like interfaces, we concatenate on to what is already there, if we can + if (type.IsArray || IsImmutableArrayCompatibleInterface(type)) { - // for arrays and read-only list-like interfaces, we concatenate on to what is already there, if we can - if (type.IsArray || IsImmutableArrayCompatibleInterface(type)) + if (!bindingPoint.IsReadOnly) { - if (!bindingPoint.IsReadOnly) - { - bindingPoint.SetValue(BindArray(type, (IEnumerable?)bindingPoint.Value, config, options)); - } - - // for getter-only collection properties that we can't add to, nothing more we can do - return; + bindingPoint.SetValue(BindArray(type, (IEnumerable?)bindingPoint.Value, config, options)); } - // ----------------------------------------------------------------------------------------------------------------------------- - // | bindingPoint | bindingPoint | - // Interface | Value | IsReadOnly | Behavior - // ----------------------------------------------------------------------------------------------------------------------------- - // ISet | not null | true/false | Use the Value instance to populate the configuration - // ISet | null | false | Create HashSet instance to populate the configuration - // ISet | null | true | nothing - // IReadOnlySet | null/not null | false | Create HashSet instance, copy over existing values, and populate the configuration - // IReadOnlySet | null/not null | true | nothing - // ----------------------------------------------------------------------------------------------------------------------------- - if (TypeIsASetInterface(type)) - { - if (!bindingPoint.IsReadOnly || bindingPoint.Value is not null) - { - object? newValue = BindSet(type, (IEnumerable?)bindingPoint.Value, config, options); - if (!bindingPoint.IsReadOnly && newValue != null) - { - bindingPoint.SetValue(newValue); - } - } - - return; - } + // for getter-only collection properties that we can't add to, nothing more we can do + return; + } - // ----------------------------------------------------------------------------------------------------------------------------- - // | bindingPoint | bindingPoint | - // Interface | Value | IsReadOnly | Behavior - // ----------------------------------------------------------------------------------------------------------------------------- - // IDictionary | not null | true/false | Use the Value instance to populate the configuration - // IDictionary | null | false | Create Dictionary instance to populate the configuration - // IDictionary | null | true | nothing - // IReadOnlyDictionary | null/not null | false | Create Dictionary instance, copy over existing values, and populate the configuration - // IReadOnlyDictionary | null/not null | true | nothing - // ----------------------------------------------------------------------------------------------------------------------------- - if (TypeIsADictionaryInterface(type)) + // ----------------------------------------------------------------------------------------------------------------------------- + // | bindingPoint | bindingPoint | + // Interface | Value | IsReadOnly | Behavior + // ----------------------------------------------------------------------------------------------------------------------------- + // ISet | not null | true/false | Use the Value instance to populate the configuration + // ISet | null | false | Create HashSet instance to populate the configuration + // ISet | null | true | nothing + // IReadOnlySet | null/not null | false | Create HashSet instance, copy over existing values, and populate the configuration + // IReadOnlySet | null/not null | true | nothing + // ----------------------------------------------------------------------------------------------------------------------------- + if (TypeIsASetInterface(type)) + { + if (!bindingPoint.IsReadOnly || bindingPoint.Value is not null) { - if (!bindingPoint.IsReadOnly || bindingPoint.Value is not null) + object? newValue = BindSet(type, (IEnumerable?)bindingPoint.Value, config, options); + if (!bindingPoint.IsReadOnly && newValue != null) { - object? newValue = BindDictionaryInterface(bindingPoint.Value, type, config, options); - if (!bindingPoint.IsReadOnly && newValue != null) - { - bindingPoint.SetValue(newValue); - } + bindingPoint.SetValue(newValue); } - - return; } - // If we don't have an instance, try to create one - if (bindingPoint.Value is null) + return; + } + + // ----------------------------------------------------------------------------------------------------------------------------- + // | bindingPoint | bindingPoint | + // Interface | Value | IsReadOnly | Behavior + // ----------------------------------------------------------------------------------------------------------------------------- + // IDictionary | not null | true/false | Use the Value instance to populate the configuration + // IDictionary | null | false | Create Dictionary instance to populate the configuration + // IDictionary | null | true | nothing + // IReadOnlyDictionary | null/not null | false | Create Dictionary instance, copy over existing values, and populate the configuration + // IReadOnlyDictionary | null/not null | true | nothing + // ----------------------------------------------------------------------------------------------------------------------------- + if (TypeIsADictionaryInterface(type)) + { + if (!bindingPoint.IsReadOnly || bindingPoint.Value is not null) { - // if the binding point doesn't let us set a new instance, there's nothing more we can do - if (bindingPoint.IsReadOnly) + object? newValue = BindDictionaryInterface(bindingPoint.Value, type, config, options); + if (!bindingPoint.IsReadOnly && newValue != null) { - return; + bindingPoint.SetValue(newValue); } + } - Type? interfaceGenericType = type.IsInterface && type.IsConstructedGenericType ? type.GetGenericTypeDefinition() : null; + return; + } - if (interfaceGenericType is not null && - (interfaceGenericType == typeof(ICollection<>) || interfaceGenericType == typeof(IList<>))) - { - // For ICollection and IList we bind them to mutable List type. - Type genericType = typeof(List<>).MakeGenericType(type.GenericTypeArguments); - bindingPoint.SetValue(Activator.CreateInstance(genericType)); - } - else - { - bindingPoint.SetValue(CreateInstance(type, config, options)); - } + // If we don't have an instance, try to create one + if (bindingPoint.Value is null) + { + // if the binding point doesn't let us set a new instance, there's nothing more we can do + if (bindingPoint.IsReadOnly) + { + return; } - Debug.Assert(bindingPoint.Value is not null); - - // At this point we know that we have a non-null bindingPoint.Value, we just have to populate the items - // using the IDictionary<> or ICollection<> interfaces, or properties using reflection. - Type? dictionaryInterface = FindOpenGenericInterface(typeof(IDictionary<,>), type); + Type? interfaceGenericType = type.IsInterface && type.IsConstructedGenericType ? type.GetGenericTypeDefinition() : null; - if (dictionaryInterface != null) + if (interfaceGenericType is not null && + (interfaceGenericType == typeof(ICollection<>) || interfaceGenericType == typeof(IList<>))) { - BindDictionary(bindingPoint.Value, dictionaryInterface, config, options); + // For ICollection and IList we bind them to mutable List type. + Type genericType = typeof(List<>).MakeGenericType(type.GenericTypeArguments); + bindingPoint.SetValue(Activator.CreateInstance(genericType)); } else { - Type? collectionInterface = FindOpenGenericInterface(typeof(ICollection<>), type); - if (collectionInterface != null) - { - BindCollection(bindingPoint.Value, collectionInterface, config, options); - } - else - { - BindProperties(bindingPoint.Value, config, options); - } + bindingPoint.SetValue(CreateInstance(type, config, options)); } } + + Debug.Assert(bindingPoint.Value is not null); + + // At this point we know that we have a non-null bindingPoint.Value, we just have to populate the items + // using the IDictionary<> or ICollection<> interfaces, or properties using reflection. + Type? dictionaryInterface = FindOpenGenericInterface(typeof(IDictionary<,>), type); + + if (dictionaryInterface != null) + { + BindDictionary(bindingPoint.Value, dictionaryInterface, config, options); + } else { - if (isParentCollection) + Type? collectionInterface = FindOpenGenericInterface(typeof(ICollection<>), type); + if (collectionInterface != null) { - bindingPoint.TrySetValue(CreateInstance(type, config, options)); + BindCollection(bindingPoint.Value, collectionInterface, config, options); } + else + { + BindProperties(bindingPoint.Value, config, options); + } + } + } + else + { + if (isParentCollection) + { + bindingPoint.TrySetValue(CreateInstance(type, config, options)); } } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/src/Microsoft.Extensions.Configuration.Binder.csproj b/src/libraries/Microsoft.Extensions.Configuration.Binder/src/Microsoft.Extensions.Configuration.Binder.csproj index 4895df3a5e5398..9b6c3158a99cc7 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/src/Microsoft.Extensions.Configuration.Binder.csproj +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/src/Microsoft.Extensions.Configuration.Binder.csproj @@ -5,42 +5,38 @@ true true Provides the functionality to bind an object to data in configuration providers for Microsoft.Extensions.Configuration. This package enables you to represent the configuration data as strongly-typed classes defined in the application code. To bind a configuration, use the Microsoft.Extensions.Configuration.ConfigurationBinder.Get extension method on the IConfiguration object. To use this package, you also need to install a package for the configuration provider, for example, Microsoft.Extensions.Configuration.Json for the JSON provider. + false + true - + + + + + + + + + + - - - - - - - - + - - false - true - - - - - diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/src/PACKAGE.md b/src/libraries/Microsoft.Extensions.Configuration.Binder/src/PACKAGE.md index ffb402bece35f0..861b0687843ea0 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/src/PACKAGE.md +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/src/PACKAGE.md @@ -1,10 +1,23 @@ ## About + + Provides the functionality to bind an object to data in configuration providers for [Microsoft.Extensions.Configuration](https://www.nuget.org/packages/Microsoft.Extensions.Configuration/). This package enables you to represent the configuration data as strongly-typed classes defined in the application code. To bind a configuration, use the [Microsoft.Extensions.Configuration.ConfigurationBinder.Get](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration.configurationbinder.get) extension method on the `IConfiguration` object. To use this package, you also need to install a package for the [configuration provider](https://learn.microsoft.com/dotnet/core/extensions/configuration#configuration-providers), for example, [Microsoft.Extensions.Configuration.Json](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.Json/) for the JSON provider. -For more information, see the documentation: [Configuration in .NET](https://learn.microsoft.com/dotnet/core/extensions/configuration). +The types contained in this assembly use Reflection at runtime which is not friendly with linking or AOT. To better support linking and AOT as well as provide more efficient strongly-typed binding methods - this package also provides a source generator. This generator is enabled by default when a project sets `PublishAot` but can also be enabled using `true`. + +## Key Features + + + +* Configuring existing type instances from a configuration section (Bind) +* Constructing new configured type instances from a configuration section (Get & GetValue) +* Generating source to bind objects from a configuration section without a runtime reflection dependency. + +## How to Use + + -## Example The following example shows how to bind a JSON configuration section to .NET objects. ```cs @@ -42,7 +55,7 @@ class Program // Read nested objects Console.WriteLine("Endpoints: "); - + foreach (Endpoint endpoint in settings.Endpoints) { Console.WriteLine($"{endpoint.IPAddress}:{endpoint.Port}"); @@ -81,3 +94,45 @@ You can include a configuration file using a code like this in your `.csproj` fi ``` + +You can add the following property to enable the source generator. This requires a .NET 8.0 SDK or later. +```xml + + true + +``` + +## Main Types + + + +The main types provided by this library are: + +* `Microsoft.Extensions.Configuration.ConfigurationBinder` +* `Microsoft.Extensions.Configuration.BinderOptions` + +## Additional Documentation + + + +* [Configuration in .NET](https://learn.microsoft.com/dotnet/core/extensions/configuration) +* [API documentation](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration) + +## Related Packages + + +* [Microsoft.Extensions.Configuration](https://www.nuget.org/packages/Microsoft.Extensions.Configuration) +* [Microsoft.Extensions.Configuration.Abstractions](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.Abstractions) +* [Microsoft.Extensions.Configuration.CommandLine](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.CommandLine) +* [Microsoft.Extensions.Configuration.EnvironmentVariables](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.EnvironmentVariables) +* [Microsoft.Extensions.Configuration.FileExtensions](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.FileExtensions) +* [Microsoft.Extensions.Configuration.Ini](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.Ini) +* [Microsoft.Extensions.Configuration.Json](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.Json) +* [Microsoft.Extensions.Configuration.UserSecrets](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.UserSecrets) +* [Microsoft.Extensions.Configuration.Xml](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.Xml) + +## Feedback & Contributing + + + +Microsoft.Extensions.Configuration.Binder is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/src/buildTransitive/Microsoft.Extensions.Configuration.Binder.targets b/src/libraries/Microsoft.Extensions.Configuration.Binder/src/buildTransitive/Microsoft.Extensions.Configuration.Binder.targets index f091c7a57b23ae..fdfd48d12a75ad 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/src/buildTransitive/Microsoft.Extensions.Configuration.Binder.targets +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/src/buildTransitive/Microsoft.Extensions.Configuration.Binder.targets @@ -1,5 +1,10 @@ - + + $(InterceptorsPreviewNamespaces);Microsoft.Extensions.Configuration.Binder.SourceGeneration + + + @@ -8,8 +13,8 @@ - + <_Microsoft_Extensions_Configuration_Binder_Compatible_TargetFramework Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'netcoreapp2.0')) AND diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/Common/ConfigurationBinderTests.Helpers.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/Common/ConfigurationBinderTests.Helpers.cs index a1d1a72ffab20f..d6521ed86dfdec 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/Common/ConfigurationBinderTests.Helpers.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/Common/ConfigurationBinderTests.Helpers.cs @@ -160,5 +160,17 @@ public class CustomICollectionWithoutAnAddMethod : ICollection public int Count => _items.Count; public bool IsReadOnly => false; } + + public interface IGeolocation + { + public double Latitude { get; set; } + public double Longitude { get; set; } + } + + public sealed record GeolocationRecord : IGeolocation + { + public double Latitude { get; set; } + public double Longitude { get; set; } + } #endregion } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/Common/ConfigurationBinderTests.TestClasses.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/Common/ConfigurationBinderTests.TestClasses.cs index 1e537b407963d9..48474033ec1f8e 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/Common/ConfigurationBinderTests.TestClasses.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/Common/ConfigurationBinderTests.TestClasses.cs @@ -3,10 +3,12 @@ using System; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.ComponentModel; using System.Globalization; -using System.Text.Json; using System.Linq; +using System.Net; +using System.Text.Json; using Microsoft.Extensions.Configuration; using Xunit; @@ -441,6 +443,10 @@ public record NestedConfig(string MyProp); public class OptionWithCollectionProperties { private int _otherCode; + private int _otherCodeNullable; + private string _otherCodeString = "default"; + private object _otherCodeNull; + private Uri _otherCodeUri; private ICollection blacklist = new HashSet(); public ICollection Blacklist @@ -458,12 +464,37 @@ public ICollection Blacklist // ParsedBlacklist initialized using the setter of Blacklist. public ICollection ParsedBlacklist { get; private set; } = new HashSet(); - // This property not having any match in the configuration. Still the setter need to be called during the binding. + // This does not have a match in the configuration, however the setter should be called during the binding: public int OtherCode { get => _otherCode; set => _otherCode = value == 0 ? 2 : value; } + + // These do not have any match in the configuration, and the setters should not be called during the binding: + public int? OtherCodeNullable + { + get => _otherCodeNullable; + set => _otherCodeNullable = !value.HasValue ? 3 : value.Value; + } + + public string OtherCodeString + { + get => _otherCodeString; + set => _otherCodeString = value; + } + + public object? OtherCodeNull + { + get => _otherCodeNull; + set => _otherCodeNull = value is null ? 4 : value; + } + + public Uri OtherCodeUri + { + get => _otherCodeUri; + set => _otherCodeUri = value is null ? new Uri("hello") : value; + } } public interface ISomeInterface @@ -543,6 +574,47 @@ public struct DeeplyNested } } + public struct StructWithNestedStructAndSetterLogic + { + private string _string; + private int _int32; + + public string String + { + get => _string; + // Setter should not be called for missing values. + set { _string = string.IsNullOrEmpty(value) ? "Hello" : value; } + } + + public int Int32 + { + get => _int32; + set { _int32 = value == 0 ? 42 : value; } + } + + public Nested NestedStruct; + public Nested[] NestedStructs; + + public struct Nested + { + private string _string; + private int _int32; + + public string String + { + get => _string; + // Setter should not be called for missing values. + set { _string = string.IsNullOrEmpty(value) ? "Hello2" : value; } + } + + public int Int32 + { + get => _int32; + set { _int32 = value == 0 ? 43 : value; } + } + } + } + public class BaseClassWithVirtualProperty { private string? PrivateProperty { get; set; } @@ -667,12 +739,6 @@ public struct StructWithParameterlessAndParameterizedCtor public int MyInt { get; } } - public interface IGeolocation - { - public double Latitude { get; set; } - public double Longitude { get; set; } - } - [TypeConverter(typeof(GeolocationTypeConverter))] public struct Geolocation : IGeolocation { @@ -704,12 +770,6 @@ public sealed class GeolocationClass : IGeolocation public double Longitude { get; set; } } - public sealed record GeolocationRecord : IGeolocation - { - public double Latitude { get; set; } - public double Longitude { get; set; } - } - public class GeolocationWrapper { public Geolocation Location { get; set; } @@ -742,5 +802,97 @@ public record OidcProviderOptions { public string? Authority { get; set; } } + + public class AClass + { + public EndPointCollection EndPoints { get; init; } = new EndPointCollection(); + + public bool Property { get; set; } = false; + } + + public sealed class EndPointCollection : Collection, IEnumerable + { + public EndPointCollection() { } + + public void Add(string hostAndPort) + { + EndPoint? endpoint; + + if (IPAddress.TryParse(hostAndPort, out IPAddress? address)) + { + endpoint = new IPEndPoint(address, 0); + } + else + { + endpoint = new DnsEndPoint(hostAndPort, 0); + } + + Add(endpoint); + } + } + + internal abstract class AbstractBase + { + public int Value { get; set; } + } + + internal sealed class Derived : AbstractBase { } + + internal sealed class DerivedWithAnotherProp : AbstractBase + { + public int Value2 { get; set; } + } + + internal class ClassWithAbstractCtorParam + { + public AbstractBase AbstractProp { get; } + + public ClassWithAbstractCtorParam(AbstractBase abstractProp) => AbstractProp = abstractProp; + } + + internal class ClassWithOptionalAbstractCtorParam + { + public AbstractBase AbstractProp { get; } + + public ClassWithOptionalAbstractCtorParam(AbstractBase? abstractProp = null) => AbstractProp = abstractProp; + } + + internal class ClassWith_DirectlyAssignable_CtorParams + { + public IConfigurationSection MySection { get; } + public object MyObject { get; } + public string MyString { get; } + + public ClassWith_DirectlyAssignable_CtorParams(IConfigurationSection mySection, object myObject, string myString) => + (MySection, MyObject, MyString) = (mySection, myObject, myString); + } + + public class SharedChildInstance_Class + { + public string? ConnectionString { get; set; } + } + + public class ClassThatThrowsOnSetters + { + private int _myIntProperty; + + public ClassThatThrowsOnSetters() + { + _myIntProperty = 42; + } + + public int MyIntProperty + { + get => _myIntProperty; + set => throw new InvalidOperationException("Not expected"); + } + } + + public class SimplePoco + { + public string A { get; set; } + public string B { get; set; } + } + } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/Common/ConfigurationBinderTests.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/Common/ConfigurationBinderTests.cs index eea01092667e8d..7e635c1f0bdaa0 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/Common/ConfigurationBinderTests.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/Common/ConfigurationBinderTests.cs @@ -11,6 +11,7 @@ #if BUILDING_SOURCE_GENERATOR_TESTS using Microsoft.Extensions.Configuration; #endif +using Microsoft.Extensions.Configuration.Memory; using Microsoft.Extensions.Configuration.Test; using Xunit; @@ -30,7 +31,7 @@ public ConfigurationBinderTestsBase() } } - public sealed partial class ConfigurationBinderTests : ConfigurationBinderTestsBase + public partial class ConfigurationBinderTests : ConfigurationBinderTestsBase { [Fact] public void BindWithNestedTypesWithReadOnlyProperties() @@ -1580,6 +1581,53 @@ public void CanBindNestedStructProperties() Assert.True(bound.ReadWriteNestedStruct.DeeplyNested.Boolean); } + [Fact] + public void CanBindNestedStructProperties_SetterCalledWithMissingConfigEntry() + { + ConfigurationBuilder configurationBuilder = new(); + configurationBuilder.AddInMemoryCollection(new Dictionary + { + { "dmy", "dmy" }, + }); + + IConfiguration config = configurationBuilder.Build(); + + var bound = config.Get(); + Assert.Null(bound.String); + Assert.Null(bound.NestedStruct.String); + Assert.Equal(42, bound.Int32); + Assert.Equal(0, bound.NestedStruct.Int32); + } + + [Fact] + public void CanBindNestedStructProperties_SetterNotCalledWithMissingConfigSection() + { + ConfigurationBuilder configurationBuilder = new(); + configurationBuilder.AddInMemoryCollection(new Dictionary + { + // An empty value will not trigger defaulting. + }); + + IConfiguration config = configurationBuilder.Build(); + + var bound = config.Get(); + Assert.Null(bound.String); + Assert.Null(bound.NestedStruct.String); + Assert.Equal(0, bound.Int32); + Assert.Equal(0, bound.NestedStruct.Int32); + } + + [Fact] + public void CanBindNestedStructProperties_SetterCalledWithMissingConfig_Array() + { + var config = TestHelpers.GetConfigurationFromJsonString( + """{"value": [{ }]}"""); + + var bound = config.GetSection("value").Get(); + Assert.Null(bound[0].String); + Assert.Equal(0, bound[0].Int32); + } + [Fact] public void IgnoresReadOnlyNestedStructProperties() { @@ -1712,13 +1760,29 @@ public void EnsureCallingThePropertySetter() Assert.Equal(2, options.ParsedBlacklist.Count); // should be initialized when calling the options.Blacklist setter. Assert.Equal(401, options.HttpStatusCode); // exists in configuration and properly sets the property -#if BUILDING_SOURCE_GENERATOR_TESTS - // Setter not called if there's no matching configuration value. - Assert.Equal(0, options.OtherCode); -#else - // doesn't exist in configuration. the setter sets default value '2' + + // This doesn't exist in configuration but the setter should be called which defaults the to '2' from input of '0'. Assert.Equal(2, options.OtherCode); -#endif + + // These don't exist in configuration and setters are not called since they are nullable. + Assert.Equal(0, options.OtherCodeNullable); + Assert.Equal("default", options.OtherCodeString); + Assert.Null(options.OtherCodeNull); + Assert.Null(options.OtherCodeUri); + } + + [Fact] + public void EnsureNotCallingSettersWhenGivenExistingInstanceNotInConfig() + { + var builder = new ConfigurationBuilder(); + builder.AddInMemoryCollection(new KeyValuePair[] { }); + var config = builder.Build(); + + ClassThatThrowsOnSetters instance = new(); + + // The setter for MyIntProperty throws, so this verifies that the setter is not called. + config.GetSection("Dmy").Bind(instance); + Assert.Equal(42, instance.MyIntProperty); } [Fact] @@ -1940,12 +2004,17 @@ public void BindRootStructIsNoOp() } """); - StructWithNestedStructs.DeeplyNested obj = new(); #pragma warning disable SYSLIB1103 + StructWithNestedStructs.DeeplyNested obj = new(); configuration.Bind(obj); -#pragma warning restore SYSLIB1103 Assert.Equal(0, obj.Int32); Assert.False(obj.Boolean); + + StructWithNestedStructs.DeeplyNested? nullableObj = new(); + configuration.Bind(nullableObj); + Assert.Equal(0, obj.Int32); + Assert.False(obj.Boolean); +#pragma warning restore SYSLIB1103 } [Fact] @@ -2023,7 +2092,7 @@ public void ComplexObj_As_Dictionary_Element() [Fact] public void ComplexObj_As_Enumerable_Element() { - var configuration = TestHelpers.GetConfigurationFromJsonString("""{ "Enumerable": [{ "Latitude": 3, "Longitude": 4 }] }""") + var configuration = TestHelpers.GetConfigurationFromJsonString("""{ "Enumerable": [{ "Latitude": 3, "Longitude": 4 }] }""") .GetSection("Enumerable"); Geolocation obj = configuration.Get>()[0]; @@ -2098,14 +2167,9 @@ public void CanBindToObjectMembers() TestBind(options => config.GetSection("Local").Bind(RemoteAuthenticationOptions.s_NonGenericField), obj => RemoteAuthenticationOptions.s_NonGenericField); // No null refs. -#if BUILDING_SOURCE_GENERATOR_TESTS - - Assert.Throws(() => config.GetSection("Local").Bind(new RemoteAuthenticationOptions().NullGenericProp)); - Assert.Throws(() => config.GetSection("Local").Bind(RemoteAuthenticationOptions.s_NullNonGenericField)); -#else config.GetSection("Local").Bind(new RemoteAuthenticationOptions().NullGenericProp); config.GetSection("Local").Bind(RemoteAuthenticationOptions.s_NullNonGenericField); -#endif + static void TestBind(Action> configure, Func, OidcProviderOptions> getBindedProp) { var obj = new RemoteAuthenticationOptions(); @@ -2121,5 +2185,258 @@ public void BinderSupportsObjCreationInput() // No diagnostic warning SYSLIB1104. configuration.Bind(new GraphWithUnsupportedMember()); } + + [Fact] + public void TestNullHandling_Get() + { + // Null configuration. + IConfiguration? configuration = null; + + Assert.Throws(() => configuration.Get()); + Assert.Throws(() => configuration.Get(_ => { })); + Assert.Throws(() => configuration.Get()); + Assert.Throws(() => configuration.Get(_ => { })); + + // Null Type. + configuration = TestHelpers.GetConfigurationFromJsonString(@"{""Longitude"":1,""Latitude"":2}"); +#pragma warning disable SYSLIB1104 // The target type for a binder call could not be determined + Assert.Throws(() => configuration.Get(type: null)); + Assert.Throws(() => configuration.Get(type: null, _ => { })); +#pragma warning restore SYSLIB1104 // The target type for a binder call could not be determined + } + + [Fact] + public void TestNullHandling_GetValue() + { + string key = "Longitude"; + + // Null configuration. + Test(configuration: null, key); + + // Null type. + IConfiguration configuration = TestHelpers.GetConfigurationFromJsonString(@"{""Longitude"":1,""Latitude"":2}"); +#pragma warning disable SYSLIB1104 // The target type for a binder call could not be determined + Assert.Throws(() => configuration.GetValue(type: null, key)); + Assert.Throws(() => configuration.GetValue(type: null, key, defaultValue: null)); +#pragma warning restore SYSLIB1104 // The target type for a binder call could not be determined + + // Null key. + Test(configuration: configuration, key: null); + + void Test(IConfiguration? configuration, string? key) + { + Assert.Throws(() => configuration.GetValue(key)); + Assert.Throws(() => configuration.GetValue(key, defaultValue: null)); + Assert.Throws(() => configuration.GetValue(key)); + Assert.Throws(() => configuration.GetValue(key, defaultValue: default)); + TestUntypedOverloads(configuration: null, key); + } + + void TestUntypedOverloads(IConfiguration? configuration, string? key) + { + Assert.Throws(() => configuration.GetValue(typeof(GeolocationClass), key)); + Assert.Throws(() => configuration.GetValue(typeof(GeolocationClass), key, defaultValue: null)); + Assert.Throws(() => configuration.GetValue(typeof(GeolocationClass), key, new GeolocationClass())); + Assert.Throws(() => configuration.GetValue(typeof(Geolocation), key)); + Assert.Throws(() => configuration.GetValue(typeof(Geolocation), key, defaultValue: null)); + Assert.Throws(() => configuration.GetValue(typeof(Geolocation), key, default(Geolocation))); + } + } + + [Fact] + public void TestNullHandling_Bind() + { + // Null configuration. + IConfiguration? configuration = null; + GeolocationClass? location = new(); + Assert.Throws(() => configuration.Bind(location)); + Assert.Throws(() => configuration.Bind(location, _ => { })); + Assert.Throws(() => configuration.Bind("", location)); + + // Null object. + configuration = TestHelpers.GetConfigurationFromJsonString(@"{""Longitude"":1,""Latitude"":2}"); + location = null; + // Expect no exceptions. + configuration.Bind(location); + configuration.Bind(location, _ => { }); + configuration.Bind("", location); + } + + [Fact] + public void TestAbstractTypeAsNestedMemberForBinding() + { + // Regression test for https://github.com/dotnet/runtime/issues/91324. + + IConfiguration configuration = new ConfigurationBuilder().AddInMemoryCollection( + new KeyValuePair[] + { + new KeyValuePair("ConfigBindRepro:EndPoints:0", "localhost"), + new KeyValuePair("ConfigBindRepro:Property", "true") + }) + .Build(); + + AClass settings = new(); + configuration.GetSection("ConfigBindRepro").Bind(settings); + + Assert.Empty(settings.EndPoints); // Need custom binding feature to map "localhost" string into Endpoint instance. + Assert.True(settings.Property); + } + + [Fact] + public static void TestGettingAbstractType() + { + IConfiguration configuration = TestHelpers.GetConfigurationFromJsonString(@"{""Value"":1}"); + Assert.Throws(() => configuration.Get()); + } + + [Fact] + public static void TestBindingAbstractInstance() + { + // Regression tests for https://github.com/dotnet/runtime/issues/90974. + // We only bind members on the declared binding type, i.e. AbstractBase, even + // though the actual instances are derived types that may have their own properties. + + IConfiguration configuration = TestHelpers.GetConfigurationFromJsonString(@"{""Value"":1,""Value2"":2}"); + + AbstractBase d = new Derived(); + configuration.Bind(d); + Assert.Equal(1, d.Value); + + d = new DerivedWithAnotherProp(); + configuration.Bind(d); + Assert.Equal(1, d.Value); + +#if BUILDING_SOURCE_GENERATOR_TESTS + // Divergence from reflection impl: reflection binds using instance type, + // while src-gen can only use declared type (everything has to be known AOT). + // This could change if we add an explicit API to indicate the expected runtime type(s). + Assert.Equal(0, ((DerivedWithAnotherProp)d).Value2); +#else + Assert.Equal(2, ((DerivedWithAnotherProp)d).Value2); +#endif + } + + [Fact] + public static void TestBindingAbstractMember_AsCtorParam() + { + IConfiguration configuration = TestHelpers.GetConfigurationFromJsonString(@"{ ""AbstractProp"": {""Value"":1} }"); + Assert.Throws(configuration.Get); + Assert.Throws(configuration.Get); + } + + [Fact] + public void GetIConfigurationSection() + { + var configuration = TestHelpers.GetConfigurationFromJsonString(""" + { + "vaLue": "MyString", + } + """); + + var obj = configuration.GetSection("value").Get(); + Assert.Equal("MyString", obj.Value); + + configuration = TestHelpers.GetConfigurationFromJsonString(""" + { + "vaLue": [ "MyString", { "nested": "value" } ], + } + """); + + var list = configuration.GetSection("value").Get>(); + ValidateList(list); + + var dict = configuration.Get>>(); + Assert.Equal(1, dict.Count); + ValidateList(dict["vaLue"]); + + static void ValidateList(List list) + { + Assert.Equal(2, list.Count); + Assert.Equal("0", list[0].Key); + Assert.Equal("MyString", list[0].Value); + + Assert.Equal("1", list[1].Key); + var nestedSection = Assert.IsAssignableFrom(list[1].GetSection("nested")); + Assert.Equal("value", nestedSection.Value); + } + } + + [Fact] + public void NullableDictKeys() + { + var configuration = TestHelpers.GetConfigurationFromJsonString("""{ "1": "MyString" }"""); + var dict = configuration.Get>(); + Assert.Empty(dict); + } + + [Fact] + public void IConfigurationSectionAsCtorParam() + { + var configuration = TestHelpers.GetConfigurationFromJsonString(""" + { + "MySection": "MySection", + "MyObject": "MyObject", + "MyString": "MyString", + } + """); + + var obj = configuration.Get(); + Assert.Equal("MySection", obj.MySection.Value); + Assert.Equal("MyObject", obj.MyObject); + Assert.Equal("MyString", obj.MyString); + } + + [Fact] + public void SharedChildInstance() + { + var builder = new ConfigurationBuilder(); + builder.AddInMemoryCollection(new KeyValuePair[] + { + new("A:B:ConnectionString", "localhost"), + }); + + var config = builder.Build(); + + SharedChildInstance_Class instance = new(); + config.GetSection("A:B").Bind(instance); + Assert.Equal("localhost", instance.ConnectionString); + + // Binding to a new section should not set the value to null. + config.GetSection("A").Bind(instance); + Assert.Equal("localhost", instance.ConnectionString); + } + + [Fact] + public void CanBindToMockConfigurationSection() + { + const string expectedA = "hello"; + + var configSource = new MemoryConfigurationSource() + { + InitialData = new Dictionary() + { + [$":{nameof(SimplePoco.A)}"] = expectedA, + } + }; + var configRoot = new MockConfigurationRoot(new[] { configSource.Build(null) }); + var configSection = new ConfigurationSection(configRoot, string.Empty); + + SimplePoco result = new(); + configSection.Bind(result); + + Assert.Equal(expectedA, result.A); + Assert.Equal(default(string), result.B); + } + + // a mock configuration root that will return null for undefined Sections, + // as is common when Configuration interfaces are mocked + class MockConfigurationRoot : ConfigurationRoot, IConfigurationRoot + { + public MockConfigurationRoot(IList providers) : base(providers) + { } + + IConfigurationSection IConfiguration.GetSection(string key) => + this[key] is null ? null : new ConfigurationSection(this, key); + } } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/Collections.generated.txt b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/Collections.generated.txt index 528847cfeb3a37..ddd52c68b99892 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/Collections.generated.txt +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/Collections.generated.txt @@ -32,7 +32,7 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { #region IConfiguration extensions. /// Attempts to bind the configuration instance to a new instance of type T. - [InterceptsLocationAttribute(@"src-0.cs", 12, 17)] + [InterceptsLocation(@"src-0.cs", 12, 17)] public static T? Get(this IConfiguration configuration) => (T?)(GetCore(configuration, typeof(T), configureOptions: null) ?? default(T)); #endregion IConfiguration extensions. @@ -55,61 +55,61 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration if (type == typeof(Program.MyClassWithCustomCollections)) { - var obj = new Program.MyClassWithCustomCollections(); - BindCore(configuration, ref obj, binderOptions); - return obj; + var instance = new Program.MyClassWithCustomCollections(); + BindCore(configuration, ref instance, defaultValueIfNotFound: true, binderOptions); + return instance; } throw new NotSupportedException($"Unable to bind to type '{type}': generator did not detect the type as input."); } - public static void BindCore(IConfiguration configuration, ref Program.CustomDictionary obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Program.CustomDictionary instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { if (section.Value is string value) { - obj[section.Key] = ParseInt(value, () => section.Path); + instance[section.Key] = ParseInt(value, () => section.Path); } } } - public static void BindCore(IConfiguration configuration, ref Program.CustomList obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Program.CustomList instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { if (section.Value is string value) { - obj.Add(value); + instance.Add(value); } } } - public static void BindCore(IConfiguration configuration, ref List obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref List instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { if (section.Value is string value) { - obj.Add(ParseInt(value, () => section.Path)); + instance.Add(ParseInt(value, () => section.Path)); } } } - public static void BindCore(IConfiguration configuration, ref ICollection obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref ICollection instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { if (section.Value is string value) { - obj.Add(ParseInt(value, () => section.Path)); + instance.Add(ParseInt(value, () => section.Path)); } } } - public static void BindCore(IConfiguration configuration, ref IReadOnlyList obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref IReadOnlyList instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { - if (obj is not ICollection temp) + if (instance is not ICollection temp) { return; } @@ -123,31 +123,31 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration } } - public static void BindCore(IConfiguration configuration, ref Dictionary obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Dictionary instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { if (section.Value is string value) { - obj[section.Key] = ParseInt(value, () => section.Path); + instance[section.Key] = ParseInt(value, () => section.Path); } } } - public static void BindCore(IConfiguration configuration, ref IDictionary obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref IDictionary instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { if (section.Value is string value) { - obj[section.Key] = ParseInt(value, () => section.Path); + instance[section.Key] = ParseInt(value, () => section.Path); } } } - public static void BindCore(IConfiguration configuration, ref IReadOnlyDictionary obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref IReadOnlyDictionary instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { - if (obj is not IDictionary temp) + if (instance is not IDictionary temp) { return; } @@ -161,40 +161,40 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration } } - public static void BindCore(IConfiguration configuration, ref Program.MyClassWithCustomCollections obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Program.MyClassWithCustomCollections instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { ValidateConfigurationKeys(typeof(Program.MyClassWithCustomCollections), s_configKeys_ProgramMyClassWithCustomCollections, configuration, binderOptions); if (AsConfigWithChildren(configuration.GetSection("CustomDictionary")) is IConfigurationSection section1) { - Program.CustomDictionary? temp3 = obj.CustomDictionary; + Program.CustomDictionary? temp3 = instance.CustomDictionary; temp3 ??= new Program.CustomDictionary(); - BindCore(section1, ref temp3, binderOptions); - obj.CustomDictionary = temp3; + BindCore(section1, ref temp3, defaultValueIfNotFound: false, binderOptions); + instance.CustomDictionary = temp3; } if (AsConfigWithChildren(configuration.GetSection("CustomList")) is IConfigurationSection section4) { - Program.CustomList? temp6 = obj.CustomList; + Program.CustomList? temp6 = instance.CustomList; temp6 ??= new Program.CustomList(); - BindCore(section4, ref temp6, binderOptions); - obj.CustomList = temp6; + BindCore(section4, ref temp6, defaultValueIfNotFound: false, binderOptions); + instance.CustomList = temp6; } if (AsConfigWithChildren(configuration.GetSection("IReadOnlyList")) is IConfigurationSection section7) { - IReadOnlyList? temp9 = obj.IReadOnlyList; + IReadOnlyList? temp9 = instance.IReadOnlyList; temp9 = temp9 is null ? new List() : new List(temp9); - BindCore(section7, ref temp9, binderOptions); - obj.IReadOnlyList = temp9; + BindCore(section7, ref temp9, defaultValueIfNotFound: false, binderOptions); + instance.IReadOnlyList = temp9; } if (AsConfigWithChildren(configuration.GetSection("IReadOnlyDictionary")) is IConfigurationSection section10) { - IReadOnlyDictionary? temp12 = obj.IReadOnlyDictionary; + IReadOnlyDictionary? temp12 = instance.IReadOnlyDictionary; temp12 = temp12 is null ? new Dictionary() : temp12.ToDictionary(pair => pair.Key, pair => pair.Value); - BindCore(section10, ref temp12, binderOptions); - obj.IReadOnlyDictionary = temp12; + BindCore(section10, ref temp12, defaultValueIfNotFound: false, binderOptions); + instance.IReadOnlyDictionary = temp12; } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Bind.generated.txt b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Bind.generated.txt index 36ac12fd31f83d..fc0dda4b5b3ae9 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Bind.generated.txt +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Bind.generated.txt @@ -31,130 +31,137 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { #region IConfiguration extensions. /// Attempts to bind the given object instance to configuration values by matching property names against configuration keys recursively. - [InterceptsLocationAttribute(@"src-0.cs", 13, 18)] - public static void Bind_ProgramMyClass(this IConfiguration configuration, object? obj) + [InterceptsLocation(@"src-0.cs", 12, 14)] + public static void Bind_ProgramMyClass(this IConfiguration configuration, object? instance) { if (configuration is null) { throw new ArgumentNullException(nameof(configuration)); } - if (obj is null) + if (instance is null) { - throw new ArgumentNullException(nameof(obj)); + return; } - var typedObj = (Program.MyClass)obj; - BindCore(configuration, ref typedObj, binderOptions: null); + var typedObj = (Program.MyClass)instance; + BindCore(configuration, ref typedObj, defaultValueIfNotFound: false, binderOptions: null); } /// Attempts to bind the given object instance to configuration values by matching property names against configuration keys recursively. - [InterceptsLocationAttribute(@"src-0.cs", 14, 24)] - public static void Bind_ProgramMyClass(this IConfiguration configuration, object? obj, Action? configureOptions) + [InterceptsLocation(@"src-0.cs", 13, 20)] + public static void Bind_ProgramMyClass(this IConfiguration configuration, object? instance, Action? configureOptions) { if (configuration is null) { throw new ArgumentNullException(nameof(configuration)); } - if (obj is null) + if (instance is null) { - throw new ArgumentNullException(nameof(obj)); + return; } - var typedObj = (Program.MyClass)obj; - BindCore(configuration, ref typedObj, GetBinderOptions(configureOptions)); + var typedObj = (Program.MyClass)instance; + BindCore(configuration, ref typedObj, defaultValueIfNotFound: false, GetBinderOptions(configureOptions)); } /// Attempts to bind the given object instance to configuration values by matching property names against configuration keys recursively. - [InterceptsLocationAttribute(@"src-0.cs", 15, 24)] - public static void Bind_ProgramMyClass(this IConfiguration configuration, string key, object? obj) + [InterceptsLocation(@"src-0.cs", 14, 20)] + public static void Bind_ProgramMyClass(this IConfiguration configuration, string key, object? instance) { if (configuration is null) { throw new ArgumentNullException(nameof(configuration)); } - if (obj is null) + if (instance is null) { - throw new ArgumentNullException(nameof(obj)); + return; } - var typedObj = (Program.MyClass)obj; - BindCore(configuration.GetSection(key), ref typedObj, binderOptions: null); + var typedObj = (Program.MyClass)instance; + BindCore(configuration.GetSection(key), ref typedObj, defaultValueIfNotFound: false, binderOptions: null); } #endregion IConfiguration extensions. #region Core binding extensions. private readonly static Lazy> s_configKeys_ProgramMyClass = new(() => new HashSet(StringComparer.OrdinalIgnoreCase) { "MyString", "MyInt", "MyList", "MyDictionary", "MyComplexDictionary" }); - public static void BindCore(IConfiguration configuration, ref List obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref List instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { if (section.Value is string value) { - obj.Add(ParseInt(value, () => section.Path)); + instance.Add(ParseInt(value, () => section.Path)); } } } - public static void BindCore(IConfiguration configuration, ref Dictionary obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Dictionary instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { if (section.Value is string value) { - obj[section.Key] = value; + instance[section.Key] = value; } } } - public static void BindCore(IConfiguration configuration, ref Dictionary obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Dictionary instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { - if (!(obj.TryGetValue(section.Key, out Program.MyClass2? element) && element is not null)) + if (!(instance.TryGetValue(section.Key, out Program.MyClass2? element) && element is not null)) { element = new Program.MyClass2(); } - obj[section.Key] = element; + instance[section.Key] = element; } } - public static void BindCore(IConfiguration configuration, ref Program.MyClass obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Program.MyClass instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { ValidateConfigurationKeys(typeof(Program.MyClass), s_configKeys_ProgramMyClass, configuration, binderOptions); - obj.MyString = configuration["MyString"]!; + if (configuration["MyString"] is string value0) + { + instance.MyString = value0; + } if (configuration["MyInt"] is string value1) { - obj.MyInt = ParseInt(value1, () => configuration.GetSection("MyInt").Path); + instance.MyInt = ParseInt(value1, () => configuration.GetSection("MyInt").Path); + } + else if (defaultValueIfNotFound) + { + instance.MyInt = default; } if (AsConfigWithChildren(configuration.GetSection("MyList")) is IConfigurationSection section2) { - List? temp4 = obj.MyList; + List? temp4 = instance.MyList; temp4 ??= new List(); - BindCore(section2, ref temp4, binderOptions); - obj.MyList = temp4; + BindCore(section2, ref temp4, defaultValueIfNotFound: false, binderOptions); + instance.MyList = temp4; } if (AsConfigWithChildren(configuration.GetSection("MyDictionary")) is IConfigurationSection section5) { - Dictionary? temp7 = obj.MyDictionary; + Dictionary? temp7 = instance.MyDictionary; temp7 ??= new Dictionary(); - BindCore(section5, ref temp7, binderOptions); - obj.MyDictionary = temp7; + BindCore(section5, ref temp7, defaultValueIfNotFound: false, binderOptions); + instance.MyDictionary = temp7; } if (AsConfigWithChildren(configuration.GetSection("MyComplexDictionary")) is IConfigurationSection section8) { - Dictionary? temp10 = obj.MyComplexDictionary; + Dictionary? temp10 = instance.MyComplexDictionary; temp10 ??= new Dictionary(); - BindCore(section8, ref temp10, binderOptions); - obj.MyComplexDictionary = temp10; + BindCore(section8, ref temp10, defaultValueIfNotFound: false, binderOptions); + instance.MyComplexDictionary = temp10; } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Bind_Instance.generated.txt b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Bind_Instance.generated.txt index 02fb06957bb3d5..9cbc0a22c5c84d 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Bind_Instance.generated.txt +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Bind_Instance.generated.txt @@ -31,94 +31,101 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { #region IConfiguration extensions. /// Attempts to bind the given object instance to configuration values by matching property names against configuration keys recursively. - [InterceptsLocationAttribute(@"src-0.cs", 12, 20)] - public static void Bind_ProgramMyClass(this IConfiguration configuration, object? obj) + [InterceptsLocation(@"src-0.cs", 12, 20)] + public static void Bind_ProgramMyClass(this IConfiguration configuration, object? instance) { if (configuration is null) { throw new ArgumentNullException(nameof(configuration)); } - if (obj is null) + if (instance is null) { - throw new ArgumentNullException(nameof(obj)); + return; } - var typedObj = (Program.MyClass)obj; - BindCore(configuration, ref typedObj, binderOptions: null); + var typedObj = (Program.MyClass)instance; + BindCore(configuration, ref typedObj, defaultValueIfNotFound: false, binderOptions: null); } #endregion IConfiguration extensions. #region Core binding extensions. private readonly static Lazy> s_configKeys_ProgramMyClass = new(() => new HashSet(StringComparer.OrdinalIgnoreCase) { "MyString", "MyInt", "MyList", "MyDictionary", "MyComplexDictionary" }); - public static void BindCore(IConfiguration configuration, ref List obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref List instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { if (section.Value is string value) { - obj.Add(ParseInt(value, () => section.Path)); + instance.Add(ParseInt(value, () => section.Path)); } } } - public static void BindCore(IConfiguration configuration, ref Dictionary obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Dictionary instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { if (section.Value is string value) { - obj[section.Key] = value; + instance[section.Key] = value; } } } - public static void BindCore(IConfiguration configuration, ref Dictionary obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Dictionary instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { - if (!(obj.TryGetValue(section.Key, out Program.MyClass2? element) && element is not null)) + if (!(instance.TryGetValue(section.Key, out Program.MyClass2? element) && element is not null)) { element = new Program.MyClass2(); } - obj[section.Key] = element; + instance[section.Key] = element; } } - public static void BindCore(IConfiguration configuration, ref Program.MyClass obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Program.MyClass instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { ValidateConfigurationKeys(typeof(Program.MyClass), s_configKeys_ProgramMyClass, configuration, binderOptions); - obj.MyString = configuration["MyString"]!; + if (configuration["MyString"] is string value0) + { + instance.MyString = value0; + } if (configuration["MyInt"] is string value1) { - obj.MyInt = ParseInt(value1, () => configuration.GetSection("MyInt").Path); + instance.MyInt = ParseInt(value1, () => configuration.GetSection("MyInt").Path); + } + else if (defaultValueIfNotFound) + { + instance.MyInt = default; } if (AsConfigWithChildren(configuration.GetSection("MyList")) is IConfigurationSection section2) { - List? temp4 = obj.MyList; + List? temp4 = instance.MyList; temp4 ??= new List(); - BindCore(section2, ref temp4, binderOptions); - obj.MyList = temp4; + BindCore(section2, ref temp4, defaultValueIfNotFound: false, binderOptions); + instance.MyList = temp4; } if (AsConfigWithChildren(configuration.GetSection("MyDictionary")) is IConfigurationSection section5) { - Dictionary? temp7 = obj.MyDictionary; + Dictionary? temp7 = instance.MyDictionary; temp7 ??= new Dictionary(); - BindCore(section5, ref temp7, binderOptions); - obj.MyDictionary = temp7; + BindCore(section5, ref temp7, defaultValueIfNotFound: false, binderOptions); + instance.MyDictionary = temp7; } if (AsConfigWithChildren(configuration.GetSection("MyComplexDictionary")) is IConfigurationSection section8) { - Dictionary? temp10 = obj.MyComplexDictionary; + Dictionary? temp10 = instance.MyComplexDictionary; temp10 ??= new Dictionary(); - BindCore(section8, ref temp10, binderOptions); - obj.MyComplexDictionary = temp10; + BindCore(section8, ref temp10, defaultValueIfNotFound: false, binderOptions); + instance.MyComplexDictionary = temp10; } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Bind_Instance_BinderOptions.generated.txt b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Bind_Instance_BinderOptions.generated.txt index 4703980996b889..f3efa07fc0c5c2 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Bind_Instance_BinderOptions.generated.txt +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Bind_Instance_BinderOptions.generated.txt @@ -31,94 +31,101 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { #region IConfiguration extensions. /// Attempts to bind the given object instance to configuration values by matching property names against configuration keys recursively. - [InterceptsLocationAttribute(@"src-0.cs", 12, 20)] - public static void Bind_ProgramMyClass(this IConfiguration configuration, object? obj, Action? configureOptions) + [InterceptsLocation(@"src-0.cs", 12, 20)] + public static void Bind_ProgramMyClass(this IConfiguration configuration, object? instance, Action? configureOptions) { if (configuration is null) { throw new ArgumentNullException(nameof(configuration)); } - if (obj is null) + if (instance is null) { - throw new ArgumentNullException(nameof(obj)); + return; } - var typedObj = (Program.MyClass)obj; - BindCore(configuration, ref typedObj, GetBinderOptions(configureOptions)); + var typedObj = (Program.MyClass)instance; + BindCore(configuration, ref typedObj, defaultValueIfNotFound: false, GetBinderOptions(configureOptions)); } #endregion IConfiguration extensions. #region Core binding extensions. private readonly static Lazy> s_configKeys_ProgramMyClass = new(() => new HashSet(StringComparer.OrdinalIgnoreCase) { "MyString", "MyInt", "MyList", "MyDictionary", "MyComplexDictionary" }); - public static void BindCore(IConfiguration configuration, ref List obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref List instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { if (section.Value is string value) { - obj.Add(ParseInt(value, () => section.Path)); + instance.Add(ParseInt(value, () => section.Path)); } } } - public static void BindCore(IConfiguration configuration, ref Dictionary obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Dictionary instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { if (section.Value is string value) { - obj[section.Key] = value; + instance[section.Key] = value; } } } - public static void BindCore(IConfiguration configuration, ref Dictionary obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Dictionary instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { - if (!(obj.TryGetValue(section.Key, out Program.MyClass2? element) && element is not null)) + if (!(instance.TryGetValue(section.Key, out Program.MyClass2? element) && element is not null)) { element = new Program.MyClass2(); } - obj[section.Key] = element; + instance[section.Key] = element; } } - public static void BindCore(IConfiguration configuration, ref Program.MyClass obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Program.MyClass instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { ValidateConfigurationKeys(typeof(Program.MyClass), s_configKeys_ProgramMyClass, configuration, binderOptions); - obj.MyString = configuration["MyString"]!; + if (configuration["MyString"] is string value0) + { + instance.MyString = value0; + } if (configuration["MyInt"] is string value1) { - obj.MyInt = ParseInt(value1, () => configuration.GetSection("MyInt").Path); + instance.MyInt = ParseInt(value1, () => configuration.GetSection("MyInt").Path); + } + else if (defaultValueIfNotFound) + { + instance.MyInt = default; } if (AsConfigWithChildren(configuration.GetSection("MyList")) is IConfigurationSection section2) { - List? temp4 = obj.MyList; + List? temp4 = instance.MyList; temp4 ??= new List(); - BindCore(section2, ref temp4, binderOptions); - obj.MyList = temp4; + BindCore(section2, ref temp4, defaultValueIfNotFound: false, binderOptions); + instance.MyList = temp4; } if (AsConfigWithChildren(configuration.GetSection("MyDictionary")) is IConfigurationSection section5) { - Dictionary? temp7 = obj.MyDictionary; + Dictionary? temp7 = instance.MyDictionary; temp7 ??= new Dictionary(); - BindCore(section5, ref temp7, binderOptions); - obj.MyDictionary = temp7; + BindCore(section5, ref temp7, defaultValueIfNotFound: false, binderOptions); + instance.MyDictionary = temp7; } if (AsConfigWithChildren(configuration.GetSection("MyComplexDictionary")) is IConfigurationSection section8) { - Dictionary? temp10 = obj.MyComplexDictionary; + Dictionary? temp10 = instance.MyComplexDictionary; temp10 ??= new Dictionary(); - BindCore(section8, ref temp10, binderOptions); - obj.MyComplexDictionary = temp10; + BindCore(section8, ref temp10, defaultValueIfNotFound: false, binderOptions); + instance.MyComplexDictionary = temp10; } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Bind_Key_Instance.generated.txt b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Bind_Key_Instance.generated.txt index 99371296997168..89b82d31bc19ae 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Bind_Key_Instance.generated.txt +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Bind_Key_Instance.generated.txt @@ -31,94 +31,101 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { #region IConfiguration extensions. /// Attempts to bind the given object instance to configuration values by matching property names against configuration keys recursively. - [InterceptsLocationAttribute(@"src-0.cs", 12, 20)] - public static void Bind_ProgramMyClass(this IConfiguration configuration, string key, object? obj) + [InterceptsLocation(@"src-0.cs", 12, 20)] + public static void Bind_ProgramMyClass(this IConfiguration configuration, string key, object? instance) { if (configuration is null) { throw new ArgumentNullException(nameof(configuration)); } - if (obj is null) + if (instance is null) { - throw new ArgumentNullException(nameof(obj)); + return; } - var typedObj = (Program.MyClass)obj; - BindCore(configuration.GetSection(key), ref typedObj, binderOptions: null); + var typedObj = (Program.MyClass)instance; + BindCore(configuration.GetSection(key), ref typedObj, defaultValueIfNotFound: false, binderOptions: null); } #endregion IConfiguration extensions. #region Core binding extensions. private readonly static Lazy> s_configKeys_ProgramMyClass = new(() => new HashSet(StringComparer.OrdinalIgnoreCase) { "MyString", "MyInt", "MyList", "MyDictionary", "MyComplexDictionary" }); - public static void BindCore(IConfiguration configuration, ref List obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref List instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { if (section.Value is string value) { - obj.Add(ParseInt(value, () => section.Path)); + instance.Add(ParseInt(value, () => section.Path)); } } } - public static void BindCore(IConfiguration configuration, ref Dictionary obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Dictionary instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { if (section.Value is string value) { - obj[section.Key] = value; + instance[section.Key] = value; } } } - public static void BindCore(IConfiguration configuration, ref Dictionary obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Dictionary instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { - if (!(obj.TryGetValue(section.Key, out Program.MyClass2? element) && element is not null)) + if (!(instance.TryGetValue(section.Key, out Program.MyClass2? element) && element is not null)) { element = new Program.MyClass2(); } - obj[section.Key] = element; + instance[section.Key] = element; } } - public static void BindCore(IConfiguration configuration, ref Program.MyClass obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Program.MyClass instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { ValidateConfigurationKeys(typeof(Program.MyClass), s_configKeys_ProgramMyClass, configuration, binderOptions); - obj.MyString = configuration["MyString"]!; + if (configuration["MyString"] is string value0) + { + instance.MyString = value0; + } if (configuration["MyInt"] is string value1) { - obj.MyInt = ParseInt(value1, () => configuration.GetSection("MyInt").Path); + instance.MyInt = ParseInt(value1, () => configuration.GetSection("MyInt").Path); + } + else if (defaultValueIfNotFound) + { + instance.MyInt = default; } if (AsConfigWithChildren(configuration.GetSection("MyList")) is IConfigurationSection section2) { - List? temp4 = obj.MyList; + List? temp4 = instance.MyList; temp4 ??= new List(); - BindCore(section2, ref temp4, binderOptions); - obj.MyList = temp4; + BindCore(section2, ref temp4, defaultValueIfNotFound: false, binderOptions); + instance.MyList = temp4; } if (AsConfigWithChildren(configuration.GetSection("MyDictionary")) is IConfigurationSection section5) { - Dictionary? temp7 = obj.MyDictionary; + Dictionary? temp7 = instance.MyDictionary; temp7 ??= new Dictionary(); - BindCore(section5, ref temp7, binderOptions); - obj.MyDictionary = temp7; + BindCore(section5, ref temp7, defaultValueIfNotFound: false, binderOptions); + instance.MyDictionary = temp7; } if (AsConfigWithChildren(configuration.GetSection("MyComplexDictionary")) is IConfigurationSection section8) { - Dictionary? temp10 = obj.MyComplexDictionary; + Dictionary? temp10 = instance.MyComplexDictionary; temp10 ??= new Dictionary(); - BindCore(section8, ref temp10, binderOptions); - obj.MyComplexDictionary = temp10; + BindCore(section8, ref temp10, defaultValueIfNotFound: false, binderOptions); + instance.MyComplexDictionary = temp10; } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Bind_ParseTypeFromMethodParam.generated.txt b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Bind_ParseTypeFromMethodParam.generated.txt new file mode 100644 index 00000000000000..14753a4a1f8e4b --- /dev/null +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Bind_ParseTypeFromMethodParam.generated.txt @@ -0,0 +1,72 @@ +// +#nullable enable +#pragma warning disable CS0612, CS0618 // Suppress warnings about [Obsolete] member usage in generated code. + +namespace System.Runtime.CompilerServices +{ + using System; + using System.CodeDom.Compiler; + + [GeneratedCode("Microsoft.Extensions.Configuration.Binder.SourceGeneration", "42.42.42.42")] + [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] + file sealed class InterceptsLocationAttribute : Attribute + { + public InterceptsLocationAttribute(string filePath, int line, int column) + { + } + } +} + +namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration +{ + using Microsoft.Extensions.Configuration; + using System; + using System.CodeDom.Compiler; + using System.Collections.Generic; + using System.Globalization; + using System.Runtime.CompilerServices; + + [GeneratedCode("Microsoft.Extensions.Configuration.Binder.SourceGeneration", "42.42.42.42")] + file static class BindingExtensions + { + #region IConfiguration extensions. + /// Attempts to bind the given object instance to configuration values by matching property names against configuration keys recursively. + [InterceptsLocation(@"src-0.cs", 18, 16)] + public static void Bind_ProgramMyClass0(this IConfiguration configuration, object? instance) + { + } + + /// Attempts to bind the given object instance to configuration values by matching property names against configuration keys recursively. + [InterceptsLocation(@"src-0.cs", 23, 16)] + public static void Bind_ProgramMyClass1(this IConfiguration configuration, object? instance, Action? configureOptions) + { + } + + /// Attempts to bind the given object instance to configuration values by matching property names against configuration keys recursively. + [InterceptsLocation(@"src-0.cs", 28, 16)] + public static void Bind_ProgramMyClass2(this IConfiguration configuration, string key, object? instance) + { + } + #endregion IConfiguration extensions. + + #region Core binding extensions. + public static BinderOptions? GetBinderOptions(Action? configureOptions) + { + if (configureOptions is null) + { + return null; + } + + BinderOptions binderOptions = new(); + configureOptions(binderOptions); + + if (binderOptions.BindNonPublicProperties) + { + throw new NotSupportedException($"The configuration binding source generator does not support 'BinderOptions.BindNonPublicProperties'."); + } + + return binderOptions; + } + #endregion Core binding extensions. + } +} diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Get.generated.txt b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Get.generated.txt index 3e6ce1459b289a..5e7eeae29254a4 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Get.generated.txt +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Get.generated.txt @@ -31,19 +31,19 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { #region IConfiguration extensions. /// Attempts to bind the configuration instance to a new instance of type T. - [InterceptsLocationAttribute(@"src-0.cs", 12, 38)] + [InterceptsLocation(@"src-0.cs", 12, 38)] public static T? Get(this IConfiguration configuration) => (T?)(GetCore(configuration, typeof(T), configureOptions: null) ?? default(T)); /// Attempts to bind the configuration instance to a new instance of type T. - [InterceptsLocationAttribute(@"src-0.cs", 14, 36)] + [InterceptsLocation(@"src-0.cs", 14, 36)] public static T? Get(this IConfiguration configuration, Action? configureOptions) => (T?)(GetCore(configuration, typeof(T), configureOptions) ?? default(T)); /// Attempts to bind the configuration instance to a new instance of type T. - [InterceptsLocationAttribute(@"src-0.cs", 13, 36)] + [InterceptsLocation(@"src-0.cs", 13, 56)] public static object? Get(this IConfiguration configuration, Type type) => GetCore(configuration, type, configureOptions: null); /// Attempts to bind the configuration instance to a new instance of type T. - [InterceptsLocationAttribute(@"src-0.cs", 15, 36)] + [InterceptsLocation(@"src-0.cs", 15, 47)] public static object? Get(this IConfiguration configuration, Type type, Action? configureOptions) => GetCore(configuration, type, configureOptions); #endregion IConfiguration extensions. @@ -67,94 +67,105 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration if (type == typeof(Program.MyClass)) { - var obj = new Program.MyClass(); - BindCore(configuration, ref obj, binderOptions); - return obj; + var instance = new Program.MyClass(); + BindCore(configuration, ref instance, defaultValueIfNotFound: true, binderOptions); + return instance; } else if (type == typeof(Program.MyClass2)) { - var obj = new Program.MyClass2(); - BindCore(configuration, ref obj, binderOptions); - return obj; + var instance = new Program.MyClass2(); + BindCore(configuration, ref instance, defaultValueIfNotFound: true, binderOptions); + return instance; } throw new NotSupportedException($"Unable to bind to type '{type}': generator did not detect the type as input."); } - public static void BindCore(IConfiguration configuration, ref List obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref List instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { if (section.Value is string value) { - obj.Add(ParseInt(value, () => section.Path)); + instance.Add(ParseInt(value, () => section.Path)); } } } - public static void BindCore(IConfiguration configuration, ref int[] obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref int[] instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { var temp2 = new List(); - BindCore(configuration, ref temp2, binderOptions); - int originalCount = obj.Length; - Array.Resize(ref obj, originalCount + temp2.Count); - temp2.CopyTo(obj, originalCount); + BindCore(configuration, ref temp2, defaultValueIfNotFound: false, binderOptions); + int originalCount = instance.Length; + Array.Resize(ref instance, originalCount + temp2.Count); + temp2.CopyTo(instance, originalCount); } - public static void BindCore(IConfiguration configuration, ref Dictionary obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Dictionary instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { if (section.Value is string value) { - obj[section.Key] = value; + instance[section.Key] = value; } } } - public static void BindCore(IConfiguration configuration, ref Program.MyClass obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Program.MyClass instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { ValidateConfigurationKeys(typeof(Program.MyClass), s_configKeys_ProgramMyClass, configuration, binderOptions); - obj.MyString = configuration["MyString"]!; + if (configuration["MyString"] is string value4) + { + instance.MyString = value4; + } if (configuration["MyInt"] is string value5) { - obj.MyInt = ParseInt(value5, () => configuration.GetSection("MyInt").Path); + instance.MyInt = ParseInt(value5, () => configuration.GetSection("MyInt").Path); + } + else if (defaultValueIfNotFound) + { + instance.MyInt = default; } if (AsConfigWithChildren(configuration.GetSection("MyList")) is IConfigurationSection section6) { - List? temp8 = obj.MyList; + List? temp8 = instance.MyList; temp8 ??= new List(); - BindCore(section6, ref temp8, binderOptions); - obj.MyList = temp8; + BindCore(section6, ref temp8, defaultValueIfNotFound: false, binderOptions); + instance.MyList = temp8; } if (AsConfigWithChildren(configuration.GetSection("MyArray")) is IConfigurationSection section9) { - int[]? temp11 = obj.MyArray; + int[]? temp11 = instance.MyArray; temp11 ??= new int[0]; - BindCore(section9, ref temp11, binderOptions); - obj.MyArray = temp11; + BindCore(section9, ref temp11, defaultValueIfNotFound: false, binderOptions); + instance.MyArray = temp11; } if (AsConfigWithChildren(configuration.GetSection("MyDictionary")) is IConfigurationSection section12) { - Dictionary? temp14 = obj.MyDictionary; + Dictionary? temp14 = instance.MyDictionary; temp14 ??= new Dictionary(); - BindCore(section12, ref temp14, binderOptions); - obj.MyDictionary = temp14; + BindCore(section12, ref temp14, defaultValueIfNotFound: false, binderOptions); + instance.MyDictionary = temp14; } } - public static void BindCore(IConfiguration configuration, ref Program.MyClass2 obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Program.MyClass2 instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { ValidateConfigurationKeys(typeof(Program.MyClass2), s_configKeys_ProgramMyClass2, configuration, binderOptions); if (configuration["MyInt"] is string value15) { - obj.MyInt = ParseInt(value15, () => configuration.GetSection("MyInt").Path); + instance.MyInt = ParseInt(value15, () => configuration.GetSection("MyInt").Path); + } + else if (defaultValueIfNotFound) + { + instance.MyInt = default; } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/GetValue.generated.txt b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/GetValue.generated.txt index e4bcaf6a9b7c95..bf7e64bd31f90c 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/GetValue.generated.txt +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/GetValue.generated.txt @@ -30,19 +30,19 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { #region IConfiguration extensions. /// Extracts the value with the specified key and converts it to the specified type. - [InterceptsLocationAttribute(@"src-0.cs", 13, 18)] + [InterceptsLocation(@"src-0.cs", 13, 18)] public static T? GetValue(this IConfiguration configuration, string key) => (T?)(BindingExtensions.GetValueCore(configuration, typeof(T), key) ?? default(T)); /// Extracts the value with the specified key and converts it to the specified type. - [InterceptsLocationAttribute(@"src-0.cs", 16, 24)] + [InterceptsLocation(@"src-0.cs", 16, 24)] public static T? GetValue(this IConfiguration configuration, string key, T defaultValue) => (T?)(BindingExtensions.GetValueCore(configuration, typeof(T), key) ?? defaultValue); /// Extracts the value with the specified key and converts it to the specified type. - [InterceptsLocationAttribute(@"src-0.cs", 14, 24)] + [InterceptsLocation(@"src-0.cs", 14, 24)] public static object? GetValue(this IConfiguration configuration, Type type, string key) => BindingExtensions.GetValueCore(configuration, type, key); /// Extracts the value with the specified key and converts it to the specified type. - [InterceptsLocationAttribute(@"src-0.cs", 17, 24)] + [InterceptsLocation(@"src-0.cs", 17, 24)] public static object? GetValue(this IConfiguration configuration, Type type, string key, object? defaultValue) => BindingExtensions.GetValueCore(configuration, type, key) ?? defaultValue; #endregion IConfiguration extensions. diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/GetValue_T_Key.generated.txt b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/GetValue_T_Key.generated.txt index 2438cf530ca4ce..b86915b78303b2 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/GetValue_T_Key.generated.txt +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/GetValue_T_Key.generated.txt @@ -30,7 +30,7 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { #region IConfiguration extensions. /// Extracts the value with the specified key and converts it to the specified type. - [InterceptsLocationAttribute(@"src-0.cs", 10, 20)] + [InterceptsLocation(@"src-0.cs", 10, 20)] public static T? GetValue(this IConfiguration configuration, string key) => (T?)(BindingExtensions.GetValueCore(configuration, typeof(T), key) ?? default(T)); #endregion IConfiguration extensions. diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/GetValue_T_Key_DefaultValue.generated.txt b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/GetValue_T_Key_DefaultValue.generated.txt index e6db24d522f3c9..697f710dff3027 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/GetValue_T_Key_DefaultValue.generated.txt +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/GetValue_T_Key_DefaultValue.generated.txt @@ -30,7 +30,7 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { #region IConfiguration extensions. /// Extracts the value with the specified key and converts it to the specified type. - [InterceptsLocationAttribute(@"src-0.cs", 12, 20)] + [InterceptsLocation(@"src-0.cs", 12, 20)] public static T? GetValue(this IConfiguration configuration, string key, T defaultValue) => (T?)(BindingExtensions.GetValueCore(configuration, typeof(T), key) ?? defaultValue); #endregion IConfiguration extensions. diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/GetValue_TypeOf_Key.generated.txt b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/GetValue_TypeOf_Key.generated.txt index a36f9fafebcff8..b5a22e71ccefbf 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/GetValue_TypeOf_Key.generated.txt +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/GetValue_TypeOf_Key.generated.txt @@ -30,7 +30,7 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { #region IConfiguration extensions. /// Extracts the value with the specified key and converts it to the specified type. - [InterceptsLocationAttribute(@"src-0.cs", 10, 20)] + [InterceptsLocation(@"src-0.cs", 10, 20)] public static object? GetValue(this IConfiguration configuration, Type type, string key) => BindingExtensions.GetValueCore(configuration, type, key); #endregion IConfiguration extensions. diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/GetValue_TypeOf_Key_DefaultValue.generated.txt b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/GetValue_TypeOf_Key_DefaultValue.generated.txt index 356f6bb1a933e2..4a4564796e562f 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/GetValue_TypeOf_Key_DefaultValue.generated.txt +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/GetValue_TypeOf_Key_DefaultValue.generated.txt @@ -30,7 +30,7 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { #region IConfiguration extensions. /// Extracts the value with the specified key and converts it to the specified type. - [InterceptsLocationAttribute(@"src-0.cs", 11, 20)] + [InterceptsLocation(@"src-0.cs", 11, 20)] public static object? GetValue(this IConfiguration configuration, Type type, string key, object? defaultValue) => BindingExtensions.GetValueCore(configuration, type, key) ?? defaultValue; #endregion IConfiguration extensions. diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Get_T.generated.txt b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Get_T.generated.txt index 85d0901de3ff60..3fc5176bf50f09 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Get_T.generated.txt +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Get_T.generated.txt @@ -31,7 +31,7 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { #region IConfiguration extensions. /// Attempts to bind the configuration instance to a new instance of type T. - [InterceptsLocationAttribute(@"src-0.cs", 11, 40)] + [InterceptsLocation(@"src-0.cs", 11, 40)] public static T? Get(this IConfiguration configuration) => (T?)(GetCore(configuration, typeof(T), configureOptions: null) ?? default(T)); #endregion IConfiguration extensions. @@ -54,78 +54,85 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration if (type == typeof(Program.MyClass)) { - var obj = new Program.MyClass(); - BindCore(configuration, ref obj, binderOptions); - return obj; + var instance = new Program.MyClass(); + BindCore(configuration, ref instance, defaultValueIfNotFound: true, binderOptions); + return instance; } throw new NotSupportedException($"Unable to bind to type '{type}': generator did not detect the type as input."); } - public static void BindCore(IConfiguration configuration, ref List obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref List instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { if (section.Value is string value) { - obj.Add(ParseInt(value, () => section.Path)); + instance.Add(ParseInt(value, () => section.Path)); } } } - public static void BindCore(IConfiguration configuration, ref int[] obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref int[] instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { var temp1 = new List(); - BindCore(configuration, ref temp1, binderOptions); - int originalCount = obj.Length; - Array.Resize(ref obj, originalCount + temp1.Count); - temp1.CopyTo(obj, originalCount); + BindCore(configuration, ref temp1, defaultValueIfNotFound: false, binderOptions); + int originalCount = instance.Length; + Array.Resize(ref instance, originalCount + temp1.Count); + temp1.CopyTo(instance, originalCount); } - public static void BindCore(IConfiguration configuration, ref Dictionary obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Dictionary instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { if (section.Value is string value) { - obj[section.Key] = value; + instance[section.Key] = value; } } } - public static void BindCore(IConfiguration configuration, ref Program.MyClass obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Program.MyClass instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { ValidateConfigurationKeys(typeof(Program.MyClass), s_configKeys_ProgramMyClass, configuration, binderOptions); - obj.MyString = configuration["MyString"]!; + if (configuration["MyString"] is string value3) + { + instance.MyString = value3; + } if (configuration["MyInt"] is string value4) { - obj.MyInt = ParseInt(value4, () => configuration.GetSection("MyInt").Path); + instance.MyInt = ParseInt(value4, () => configuration.GetSection("MyInt").Path); + } + else if (defaultValueIfNotFound) + { + instance.MyInt = default; } if (AsConfigWithChildren(configuration.GetSection("MyList")) is IConfigurationSection section5) { - List? temp7 = obj.MyList; + List? temp7 = instance.MyList; temp7 ??= new List(); - BindCore(section5, ref temp7, binderOptions); - obj.MyList = temp7; + BindCore(section5, ref temp7, defaultValueIfNotFound: false, binderOptions); + instance.MyList = temp7; } if (AsConfigWithChildren(configuration.GetSection("MyArray")) is IConfigurationSection section8) { - int[]? temp10 = obj.MyArray; + int[]? temp10 = instance.MyArray; temp10 ??= new int[0]; - BindCore(section8, ref temp10, binderOptions); - obj.MyArray = temp10; + BindCore(section8, ref temp10, defaultValueIfNotFound: false, binderOptions); + instance.MyArray = temp10; } if (AsConfigWithChildren(configuration.GetSection("MyDictionary")) is IConfigurationSection section11) { - Dictionary? temp13 = obj.MyDictionary; + Dictionary? temp13 = instance.MyDictionary; temp13 ??= new Dictionary(); - BindCore(section11, ref temp13, binderOptions); - obj.MyDictionary = temp13; + BindCore(section11, ref temp13, defaultValueIfNotFound: false, binderOptions); + instance.MyDictionary = temp13; } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Get_T_BinderOptions.generated.txt b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Get_T_BinderOptions.generated.txt index d394cc7b269f74..81c23d7ceea65a 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Get_T_BinderOptions.generated.txt +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Get_T_BinderOptions.generated.txt @@ -31,7 +31,7 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { #region IConfiguration extensions. /// Attempts to bind the configuration instance to a new instance of type T. - [InterceptsLocationAttribute(@"src-0.cs", 11, 40)] + [InterceptsLocation(@"src-0.cs", 11, 40)] public static T? Get(this IConfiguration configuration, Action? configureOptions) => (T?)(GetCore(configuration, typeof(T), configureOptions) ?? default(T)); #endregion IConfiguration extensions. @@ -54,78 +54,85 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration if (type == typeof(Program.MyClass)) { - var obj = new Program.MyClass(); - BindCore(configuration, ref obj, binderOptions); - return obj; + var instance = new Program.MyClass(); + BindCore(configuration, ref instance, defaultValueIfNotFound: true, binderOptions); + return instance; } throw new NotSupportedException($"Unable to bind to type '{type}': generator did not detect the type as input."); } - public static void BindCore(IConfiguration configuration, ref List obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref List instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { if (section.Value is string value) { - obj.Add(ParseInt(value, () => section.Path)); + instance.Add(ParseInt(value, () => section.Path)); } } } - public static void BindCore(IConfiguration configuration, ref int[] obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref int[] instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { var temp1 = new List(); - BindCore(configuration, ref temp1, binderOptions); - int originalCount = obj.Length; - Array.Resize(ref obj, originalCount + temp1.Count); - temp1.CopyTo(obj, originalCount); + BindCore(configuration, ref temp1, defaultValueIfNotFound: false, binderOptions); + int originalCount = instance.Length; + Array.Resize(ref instance, originalCount + temp1.Count); + temp1.CopyTo(instance, originalCount); } - public static void BindCore(IConfiguration configuration, ref Dictionary obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Dictionary instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { if (section.Value is string value) { - obj[section.Key] = value; + instance[section.Key] = value; } } } - public static void BindCore(IConfiguration configuration, ref Program.MyClass obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Program.MyClass instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { ValidateConfigurationKeys(typeof(Program.MyClass), s_configKeys_ProgramMyClass, configuration, binderOptions); - obj.MyString = configuration["MyString"]!; + if (configuration["MyString"] is string value3) + { + instance.MyString = value3; + } if (configuration["MyInt"] is string value4) { - obj.MyInt = ParseInt(value4, () => configuration.GetSection("MyInt").Path); + instance.MyInt = ParseInt(value4, () => configuration.GetSection("MyInt").Path); + } + else if (defaultValueIfNotFound) + { + instance.MyInt = default; } if (AsConfigWithChildren(configuration.GetSection("MyList")) is IConfigurationSection section5) { - List? temp7 = obj.MyList; + List? temp7 = instance.MyList; temp7 ??= new List(); - BindCore(section5, ref temp7, binderOptions); - obj.MyList = temp7; + BindCore(section5, ref temp7, defaultValueIfNotFound: false, binderOptions); + instance.MyList = temp7; } if (AsConfigWithChildren(configuration.GetSection("MyArray")) is IConfigurationSection section8) { - int[]? temp10 = obj.MyArray; + int[]? temp10 = instance.MyArray; temp10 ??= new int[0]; - BindCore(section8, ref temp10, binderOptions); - obj.MyArray = temp10; + BindCore(section8, ref temp10, defaultValueIfNotFound: false, binderOptions); + instance.MyArray = temp10; } if (AsConfigWithChildren(configuration.GetSection("MyDictionary")) is IConfigurationSection section11) { - Dictionary? temp13 = obj.MyDictionary; + Dictionary? temp13 = instance.MyDictionary; temp13 ??= new Dictionary(); - BindCore(section11, ref temp13, binderOptions); - obj.MyDictionary = temp13; + BindCore(section11, ref temp13, defaultValueIfNotFound: false, binderOptions); + instance.MyDictionary = temp13; } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Get_TypeOf.generated.txt b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Get_TypeOf.generated.txt index 83cd88561310ab..eca2001123ff01 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Get_TypeOf.generated.txt +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Get_TypeOf.generated.txt @@ -31,7 +31,7 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { #region IConfiguration extensions. /// Attempts to bind the configuration instance to a new instance of type T. - [InterceptsLocationAttribute(@"src-0.cs", 11, 40)] + [InterceptsLocation(@"src-0.cs", 11, 51)] public static object? Get(this IConfiguration configuration, Type type) => GetCore(configuration, type, configureOptions: null); #endregion IConfiguration extensions. @@ -54,21 +54,25 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration if (type == typeof(Program.MyClass2)) { - var obj = new Program.MyClass2(); - BindCore(configuration, ref obj, binderOptions); - return obj; + var instance = new Program.MyClass2(); + BindCore(configuration, ref instance, defaultValueIfNotFound: true, binderOptions); + return instance; } throw new NotSupportedException($"Unable to bind to type '{type}': generator did not detect the type as input."); } - public static void BindCore(IConfiguration configuration, ref Program.MyClass2 obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Program.MyClass2 instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { ValidateConfigurationKeys(typeof(Program.MyClass2), s_configKeys_ProgramMyClass2, configuration, binderOptions); if (configuration["MyInt"] is string value1) { - obj.MyInt = ParseInt(value1, () => configuration.GetSection("MyInt").Path); + instance.MyInt = ParseInt(value1, () => configuration.GetSection("MyInt").Path); + } + else if (defaultValueIfNotFound) + { + instance.MyInt = default; } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Get_TypeOf_BinderOptions.generated.txt b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Get_TypeOf_BinderOptions.generated.txt index 91714c80cd0136..7883f4a50da0f6 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Get_TypeOf_BinderOptions.generated.txt +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ConfigurationBinder/Get_TypeOf_BinderOptions.generated.txt @@ -31,7 +31,7 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { #region IConfiguration extensions. /// Attempts to bind the configuration instance to a new instance of type T. - [InterceptsLocationAttribute(@"src-0.cs", 11, 20)] + [InterceptsLocation(@"src-0.cs", 11, 20)] public static object? Get(this IConfiguration configuration, Type type, Action? configureOptions) => GetCore(configuration, type, configureOptions); #endregion IConfiguration extensions. @@ -54,21 +54,25 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration if (type == typeof(Program.MyClass2)) { - var obj = new Program.MyClass2(); - BindCore(configuration, ref obj, binderOptions); - return obj; + var instance = new Program.MyClass2(); + BindCore(configuration, ref instance, defaultValueIfNotFound: true, binderOptions); + return instance; } throw new NotSupportedException($"Unable to bind to type '{type}': generator did not detect the type as input."); } - public static void BindCore(IConfiguration configuration, ref Program.MyClass2 obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Program.MyClass2 instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { ValidateConfigurationKeys(typeof(Program.MyClass2), s_configKeys_ProgramMyClass2, configuration, binderOptions); if (configuration["MyInt"] is string value1) { - obj.MyInt = ParseInt(value1, () => configuration.GetSection("MyInt").Path); + instance.MyInt = ParseInt(value1, () => configuration.GetSection("MyInt").Path); + } + else if (defaultValueIfNotFound) + { + instance.MyInt = default; } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/EmptyConfigType.generated.txt b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/EmptyConfigType.generated.txt new file mode 100644 index 00000000000000..404ce7561cc47c --- /dev/null +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/EmptyConfigType.generated.txt @@ -0,0 +1,104 @@ +// +#nullable enable +#pragma warning disable CS0612, CS0618 // Suppress warnings about [Obsolete] member usage in generated code. + +namespace System.Runtime.CompilerServices +{ + using System; + using System.CodeDom.Compiler; + + [GeneratedCode("Microsoft.Extensions.Configuration.Binder.SourceGeneration", "42.42.42.42")] + [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] + file sealed class InterceptsLocationAttribute : Attribute + { + public InterceptsLocationAttribute(string filePath, int line, int column) + { + } + } +} + +namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration +{ + using Microsoft.Extensions.Configuration; + using System; + using System.CodeDom.Compiler; + using System.Collections.Generic; + using System.Globalization; + using System.Runtime.CompilerServices; + + [GeneratedCode("Microsoft.Extensions.Configuration.Binder.SourceGeneration", "42.42.42.42")] + file static class BindingExtensions + { + #region IConfiguration extensions. + /// Attempts to bind the given object instance to configuration values by matching property names against configuration keys recursively. + [InterceptsLocation(@"src-0.cs", 12, 23)] + public static void Bind_TypeWithNoMembers(this IConfiguration configuration, object? instance) + { + } + + /// Attempts to bind the given object instance to configuration values by matching property names against configuration keys recursively. + [InterceptsLocation(@"src-0.cs", 15, 23)] + public static void Bind_TypeWithNoMembers_Wrapper(this IConfiguration configuration, object? instance) + { + if (configuration is null) + { + throw new ArgumentNullException(nameof(configuration)); + } + + if (instance is null) + { + return; + } + + var typedObj = (TypeWithNoMembers_Wrapper)instance; + BindCore(configuration, ref typedObj, defaultValueIfNotFound: false, binderOptions: null); + } + #endregion IConfiguration extensions. + + #region Core binding extensions. + private readonly static Lazy> s_configKeys_TypeWithNoMembers_Wrapper = new(() => new HashSet(StringComparer.OrdinalIgnoreCase) { "Member" }); + + public static void BindCore(IConfiguration configuration, ref TypeWithNoMembers_Wrapper instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) + { + ValidateConfigurationKeys(typeof(TypeWithNoMembers_Wrapper), s_configKeys_TypeWithNoMembers_Wrapper, configuration, binderOptions); + + if (AsConfigWithChildren(configuration.GetSection("Member")) is IConfigurationSection section0) + { + instance.Member ??= new TypeWithNoMembers(); + } + } + + + /// If required by the binder options, validates that there are no unknown keys in the input configuration object. + public static void ValidateConfigurationKeys(Type type, Lazy> keys, IConfiguration configuration, BinderOptions? binderOptions) + { + if (binderOptions?.ErrorOnUnknownConfiguration is true) + { + List? temp = null; + + foreach (IConfigurationSection section in configuration.GetChildren()) + { + if (!keys.Value.Contains(section.Key)) + { + (temp ??= new List()).Add($"'{section.Key}'"); + } + } + + if (temp is not null) + { + throw new InvalidOperationException($"'ErrorOnUnknownConfiguration' was set on the provided BinderOptions, but the following properties were not found on the instance of {type}: {string.Join(", ", temp)}"); + } + } + } + + public static IConfiguration? AsConfigWithChildren(IConfiguration configuration) + { + foreach (IConfigurationSection _ in configuration.GetChildren()) + { + return configuration; + } + return null; + } + #endregion Core binding extensions. + } +} diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/OptionsBuilder/BindConfiguration.generated.txt b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/OptionsBuilder/BindConfiguration.generated.txt index 88b35037c22c3f..44f1df2e78232d 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/OptionsBuilder/BindConfiguration.generated.txt +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/OptionsBuilder/BindConfiguration.generated.txt @@ -33,8 +33,8 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { #region OptionsBuilder extensions. /// Registers the dependency injection container to bind against the obtained from the DI service provider. - [InterceptsLocationAttribute(@"src-0.cs", 12, 24)] - public static OptionsBuilder BindConfiguration(this OptionsBuilder optionsBuilder, string configSectionPath, Action? configureOptions = null) where TOptions : class + [InterceptsLocation(@"src-0.cs", 12, 24)] + public static OptionsBuilder BindConfiguration(this OptionsBuilder optionsBuilder, string configSectionPath, Action? configureBinder = null) where TOptions : class { if (optionsBuilder is null) { @@ -46,20 +46,15 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration throw new ArgumentNullException(nameof(configSectionPath)); } - optionsBuilder.Configure((obj, configuration) => + optionsBuilder.Configure((instance, config) => { - if (obj is null) + if (config is null) { - throw new ArgumentNullException(nameof(obj)); + throw new ArgumentNullException(nameof(config)); } - if (configuration is null) - { - throw new ArgumentNullException(nameof(configuration)); - } - - IConfiguration section = string.Equals(string.Empty, configSectionPath, StringComparison.OrdinalIgnoreCase) ? configuration : configuration.GetSection(configSectionPath); - BindCoreMain(section, obj, typeof(TOptions), configureOptions); + IConfiguration section = string.Equals(string.Empty, configSectionPath, StringComparison.OrdinalIgnoreCase) ? config : config.GetSection(configSectionPath); + BindCoreMain(section, instance, typeof(TOptions), configureBinder); }); optionsBuilder.Services.AddSingleton, ConfigurationChangeTokenSource>(); @@ -70,16 +65,11 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration #region Core binding extensions. private readonly static Lazy> s_configKeys_ProgramMyClass = new(() => new HashSet(StringComparer.OrdinalIgnoreCase) { "MyString", "MyInt", "MyList" }); - public static void BindCoreMain(IConfiguration configuration, object obj, Type type, Action? configureOptions) + public static void BindCoreMain(IConfiguration configuration, object instance, Type type, Action? configureOptions) { - if (configuration is null) - { - throw new ArgumentNullException(nameof(configuration)); - } - - if (obj is null) + if (instance is null) { - throw new ArgumentNullException(nameof(obj)); + return; } if (!HasValueOrChildren(configuration)) @@ -91,42 +81,49 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration if (type == typeof(Program.MyClass)) { - var temp = (Program.MyClass)obj; - BindCore(configuration, ref temp, binderOptions); + var temp = (Program.MyClass)instance; + BindCore(configuration, ref temp, defaultValueIfNotFound: false, binderOptions); return; } throw new NotSupportedException($"Unable to bind to type '{type}': generator did not detect the type as input."); } - public static void BindCore(IConfiguration configuration, ref List obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref List instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { if (section.Value is string value) { - obj.Add(ParseInt(value, () => section.Path)); + instance.Add(ParseInt(value, () => section.Path)); } } } - public static void BindCore(IConfiguration configuration, ref Program.MyClass obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Program.MyClass instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { ValidateConfigurationKeys(typeof(Program.MyClass), s_configKeys_ProgramMyClass, configuration, binderOptions); - obj.MyString = configuration["MyString"]!; + if (configuration["MyString"] is string value1) + { + instance.MyString = value1; + } if (configuration["MyInt"] is string value2) { - obj.MyInt = ParseInt(value2, () => configuration.GetSection("MyInt").Path); + instance.MyInt = ParseInt(value2, () => configuration.GetSection("MyInt").Path); + } + else if (defaultValueIfNotFound) + { + instance.MyInt = default; } if (AsConfigWithChildren(configuration.GetSection("MyList")) is IConfigurationSection section3) { - List? temp5 = obj.MyList; + List? temp5 = instance.MyList; temp5 ??= new List(); - BindCore(section3, ref temp5, binderOptions); - obj.MyList = temp5; + BindCore(section3, ref temp5, defaultValueIfNotFound: false, binderOptions); + instance.MyList = temp5; } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/OptionsBuilder/Bind_T.generated.txt b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/OptionsBuilder/Bind_T.generated.txt index 633196e7a742d5..8d7c70a27b3f2e 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/OptionsBuilder/Bind_T.generated.txt +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/OptionsBuilder/Bind_T.generated.txt @@ -33,58 +33,53 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { #region OptionsBuilder extensions. /// Registers a configuration instance which will bind against. - [InterceptsLocationAttribute(@"src-0.cs", 15, 24)] - public static OptionsBuilder Bind(this OptionsBuilder optionsBuilder, IConfiguration configuration) where TOptions : class + [InterceptsLocation(@"src-0.cs", 15, 24)] + public static OptionsBuilder Bind(this OptionsBuilder optionsBuilder, IConfiguration config) where TOptions : class { - return Bind(optionsBuilder, configuration, configureOptions: null); + return Bind(optionsBuilder, config, configureBinder: null); } /// Registers a configuration instance which will bind against. - public static OptionsBuilder Bind(this OptionsBuilder optionsBuilder, IConfiguration configuration, Action? configureOptions) where TOptions : class + public static OptionsBuilder Bind(this OptionsBuilder optionsBuilder, IConfiguration config, Action? configureBinder) where TOptions : class { if (optionsBuilder is null) { throw new ArgumentNullException(nameof(optionsBuilder)); } - Configure(optionsBuilder.Services, optionsBuilder.Name, configuration, configureOptions); + Configure(optionsBuilder.Services, optionsBuilder.Name, config, configureBinder); return optionsBuilder; } #endregion OptionsBuilder extensions. #region IServiceCollection extensions. /// Registers a configuration instance which TOptions will bind against. - public static IServiceCollection Configure(this IServiceCollection services, string? name, IConfiguration configuration, Action? configureOptions) where TOptions : class + public static IServiceCollection Configure(this IServiceCollection services, string? name, IConfiguration config, Action? configureOptions) where TOptions : class { if (services is null) { throw new ArgumentNullException(nameof(services)); } - if (configuration is null) + if (config is null) { - throw new ArgumentNullException(nameof(configuration)); + throw new ArgumentNullException(nameof(config)); } OptionsServiceCollectionExtensions.AddOptions(services); - services.AddSingleton>(new ConfigurationChangeTokenSource(name, configuration)); - return services.AddSingleton>(new Microsoft.Extensions.Options.ConfigureNamedOptions(name, obj => BindCoreMain(configuration, obj, typeof(TOptions)configureOptions))); + services.AddSingleton>(new ConfigurationChangeTokenSource(name, config)); + return services.AddSingleton>(new ConfigureNamedOptions(name, instance => BindCoreMain(config, instance, typeof(TOptions), configureOptions))); } #endregion IServiceCollection extensions. #region Core binding extensions. private readonly static Lazy> s_configKeys_ProgramMyClass = new(() => new HashSet(StringComparer.OrdinalIgnoreCase) { "MyString", "MyInt", "MyList" }); - public static void BindCoreMain(IConfiguration configuration, object obj, Type type, Action? configureOptions) + public static void BindCoreMain(IConfiguration configuration, object instance, Type type, Action? configureOptions) { - if (configuration is null) + if (instance is null) { - throw new ArgumentNullException(nameof(configuration)); - } - - if (obj is null) - { - throw new ArgumentNullException(nameof(obj)); + return; } if (!HasValueOrChildren(configuration)) @@ -96,42 +91,49 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration if (type == typeof(Program.MyClass)) { - var temp = (Program.MyClass)obj; - BindCore(configuration, ref temp, binderOptions); + var temp = (Program.MyClass)instance; + BindCore(configuration, ref temp, defaultValueIfNotFound: false, binderOptions); return; } throw new NotSupportedException($"Unable to bind to type '{type}': generator did not detect the type as input."); } - public static void BindCore(IConfiguration configuration, ref List obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref List instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { if (section.Value is string value) { - obj.Add(ParseInt(value, () => section.Path)); + instance.Add(ParseInt(value, () => section.Path)); } } } - public static void BindCore(IConfiguration configuration, ref Program.MyClass obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Program.MyClass instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { ValidateConfigurationKeys(typeof(Program.MyClass), s_configKeys_ProgramMyClass, configuration, binderOptions); - obj.MyString = configuration["MyString"]!; + if (configuration["MyString"] is string value1) + { + instance.MyString = value1; + } if (configuration["MyInt"] is string value2) { - obj.MyInt = ParseInt(value2, () => configuration.GetSection("MyInt").Path); + instance.MyInt = ParseInt(value2, () => configuration.GetSection("MyInt").Path); + } + else if (defaultValueIfNotFound) + { + instance.MyInt = default; } if (AsConfigWithChildren(configuration.GetSection("MyList")) is IConfigurationSection section3) { - List? temp5 = obj.MyList; + List? temp5 = instance.MyList; temp5 ??= new List(); - BindCore(section3, ref temp5, binderOptions); - obj.MyList = temp5; + BindCore(section3, ref temp5, defaultValueIfNotFound: false, binderOptions); + instance.MyList = temp5; } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/OptionsBuilder/Bind_T_BinderOptions.generated.txt b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/OptionsBuilder/Bind_T_BinderOptions.generated.txt index fb5b4b4ad721d8..385079af1709a4 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/OptionsBuilder/Bind_T_BinderOptions.generated.txt +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/OptionsBuilder/Bind_T_BinderOptions.generated.txt @@ -33,52 +33,47 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { #region OptionsBuilder extensions. /// Registers a configuration instance which will bind against. - [InterceptsLocationAttribute(@"src-0.cs", 15, 24)] - public static OptionsBuilder Bind(this OptionsBuilder optionsBuilder, IConfiguration configuration, Action? configureOptions) where TOptions : class + [InterceptsLocation(@"src-0.cs", 15, 24)] + public static OptionsBuilder Bind(this OptionsBuilder optionsBuilder, IConfiguration config, Action? configureBinder) where TOptions : class { if (optionsBuilder is null) { throw new ArgumentNullException(nameof(optionsBuilder)); } - Configure(optionsBuilder.Services, optionsBuilder.Name, configuration, configureOptions); + Configure(optionsBuilder.Services, optionsBuilder.Name, config, configureBinder); return optionsBuilder; } #endregion OptionsBuilder extensions. #region IServiceCollection extensions. /// Registers a configuration instance which TOptions will bind against. - public static IServiceCollection Configure(this IServiceCollection services, string? name, IConfiguration configuration, Action? configureOptions) where TOptions : class + public static IServiceCollection Configure(this IServiceCollection services, string? name, IConfiguration config, Action? configureOptions) where TOptions : class { if (services is null) { throw new ArgumentNullException(nameof(services)); } - if (configuration is null) + if (config is null) { - throw new ArgumentNullException(nameof(configuration)); + throw new ArgumentNullException(nameof(config)); } OptionsServiceCollectionExtensions.AddOptions(services); - services.AddSingleton>(new ConfigurationChangeTokenSource(name, configuration)); - return services.AddSingleton>(new Microsoft.Extensions.Options.ConfigureNamedOptions(name, obj => BindCoreMain(configuration, obj, typeof(TOptions)configureOptions))); + services.AddSingleton>(new ConfigurationChangeTokenSource(name, config)); + return services.AddSingleton>(new ConfigureNamedOptions(name, instance => BindCoreMain(config, instance, typeof(TOptions), configureOptions))); } #endregion IServiceCollection extensions. #region Core binding extensions. private readonly static Lazy> s_configKeys_ProgramMyClass = new(() => new HashSet(StringComparer.OrdinalIgnoreCase) { "MyString", "MyInt", "MyList" }); - public static void BindCoreMain(IConfiguration configuration, object obj, Type type, Action? configureOptions) + public static void BindCoreMain(IConfiguration configuration, object instance, Type type, Action? configureOptions) { - if (configuration is null) + if (instance is null) { - throw new ArgumentNullException(nameof(configuration)); - } - - if (obj is null) - { - throw new ArgumentNullException(nameof(obj)); + return; } if (!HasValueOrChildren(configuration)) @@ -90,42 +85,49 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration if (type == typeof(Program.MyClass)) { - var temp = (Program.MyClass)obj; - BindCore(configuration, ref temp, binderOptions); + var temp = (Program.MyClass)instance; + BindCore(configuration, ref temp, defaultValueIfNotFound: false, binderOptions); return; } throw new NotSupportedException($"Unable to bind to type '{type}': generator did not detect the type as input."); } - public static void BindCore(IConfiguration configuration, ref List obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref List instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { if (section.Value is string value) { - obj.Add(ParseInt(value, () => section.Path)); + instance.Add(ParseInt(value, () => section.Path)); } } } - public static void BindCore(IConfiguration configuration, ref Program.MyClass obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Program.MyClass instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { ValidateConfigurationKeys(typeof(Program.MyClass), s_configKeys_ProgramMyClass, configuration, binderOptions); - obj.MyString = configuration["MyString"]!; + if (configuration["MyString"] is string value1) + { + instance.MyString = value1; + } if (configuration["MyInt"] is string value2) { - obj.MyInt = ParseInt(value2, () => configuration.GetSection("MyInt").Path); + instance.MyInt = ParseInt(value2, () => configuration.GetSection("MyInt").Path); + } + else if (defaultValueIfNotFound) + { + instance.MyInt = default; } if (AsConfigWithChildren(configuration.GetSection("MyList")) is IConfigurationSection section3) { - List? temp5 = obj.MyList; + List? temp5 = instance.MyList; temp5 ??= new List(); - BindCore(section3, ref temp5, binderOptions); - obj.MyList = temp5; + BindCore(section3, ref temp5, defaultValueIfNotFound: false, binderOptions); + instance.MyList = temp5; } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/Primitives.generated.txt b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/Primitives.generated.txt index 1bf110454ec7ba..a8373ca527095a 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/Primitives.generated.txt +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/Primitives.generated.txt @@ -31,163 +31,284 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { #region IConfiguration extensions. /// Attempts to bind the given object instance to configuration values by matching property names against configuration keys recursively. - [InterceptsLocationAttribute(@"src-0.cs", 13, 16)] - public static void Bind_ProgramMyClass(this IConfiguration configuration, object? obj) + [InterceptsLocation(@"src-0.cs", 13, 16)] + public static void Bind_ProgramMyClass(this IConfiguration configuration, object? instance) { if (configuration is null) { throw new ArgumentNullException(nameof(configuration)); } - if (obj is null) + if (instance is null) { - throw new ArgumentNullException(nameof(obj)); + return; } - var typedObj = (Program.MyClass)obj; - BindCore(configuration, ref typedObj, binderOptions: null); + var typedObj = (Program.MyClass)instance; + BindCore(configuration, ref typedObj, defaultValueIfNotFound: false, binderOptions: null); } #endregion IConfiguration extensions. #region Core binding extensions. - private readonly static Lazy> s_configKeys_ProgramMyClass = new(() => new HashSet(StringComparer.OrdinalIgnoreCase) { "Prop0", "Prop1", "Prop2", "Prop3", "Prop4", "Prop5", "Prop6", "Prop8", "Prop9", "Prop10", "Prop13", "Prop14", "Prop15", "Prop16", "Prop17", "Prop19", "Prop20", "Prop21", "Prop23", "Prop24", "Prop25", "Prop26", "Prop27", "Prop7", "Prop11", "Prop12", "Prop18", "Prop22" }); + private readonly static Lazy> s_configKeys_ProgramMyClass = new(() => new HashSet(StringComparer.OrdinalIgnoreCase) { "Prop0", "Prop1", "Prop2", "Prop3", "Prop4", "Prop5", "Prop6", "Prop8", "Prop9", "Prop10", "Prop13", "Prop14", "Prop15", "Prop16", "Prop17", "Prop19", "Prop20", "Prop21", "Prop23", "Prop24", "Prop25", "Prop26", "Prop27", "Prop7", "Prop11", "Prop12", "Prop18", "Prop22", "Prop28", "Prop29", "Prop30" }); - public static void BindCore(IConfiguration configuration, ref Program.MyClass obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Program.MyClass instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { ValidateConfigurationKeys(typeof(Program.MyClass), s_configKeys_ProgramMyClass, configuration, binderOptions); if (configuration["Prop0"] is string value0) { - obj.Prop0 = ParseBool(value0, () => configuration.GetSection("Prop0").Path); + instance.Prop0 = ParseBool(value0, () => configuration.GetSection("Prop0").Path); + } + else if (defaultValueIfNotFound) + { + instance.Prop0 = default; } if (configuration["Prop1"] is string value1) { - obj.Prop1 = ParseByte(value1, () => configuration.GetSection("Prop1").Path); + instance.Prop1 = ParseByte(value1, () => configuration.GetSection("Prop1").Path); + } + else if (defaultValueIfNotFound) + { + instance.Prop1 = default; } if (configuration["Prop2"] is string value2) { - obj.Prop2 = ParseSbyte(value2, () => configuration.GetSection("Prop2").Path); + instance.Prop2 = ParseSbyte(value2, () => configuration.GetSection("Prop2").Path); + } + else if (defaultValueIfNotFound) + { + instance.Prop2 = default; } if (configuration["Prop3"] is string value3) { - obj.Prop3 = ParseChar(value3, () => configuration.GetSection("Prop3").Path); + instance.Prop3 = ParseChar(value3, () => configuration.GetSection("Prop3").Path); + } + else if (defaultValueIfNotFound) + { + instance.Prop3 = default; } if (configuration["Prop4"] is string value4) { - obj.Prop4 = ParseDouble(value4, () => configuration.GetSection("Prop4").Path); + instance.Prop4 = ParseDouble(value4, () => configuration.GetSection("Prop4").Path); + } + else if (defaultValueIfNotFound) + { + instance.Prop4 = default; } - obj.Prop5 = configuration["Prop5"]!; + if (configuration["Prop5"] is string value5) + { + instance.Prop5 = value5; + } if (configuration["Prop6"] is string value6) { - obj.Prop6 = ParseInt(value6, () => configuration.GetSection("Prop6").Path); + instance.Prop6 = ParseInt(value6, () => configuration.GetSection("Prop6").Path); + } + else if (defaultValueIfNotFound) + { + instance.Prop6 = default; } if (configuration["Prop8"] is string value7) { - obj.Prop8 = ParseShort(value7, () => configuration.GetSection("Prop8").Path); + instance.Prop8 = ParseShort(value7, () => configuration.GetSection("Prop8").Path); + } + else if (defaultValueIfNotFound) + { + instance.Prop8 = default; } if (configuration["Prop9"] is string value8) { - obj.Prop9 = ParseLong(value8, () => configuration.GetSection("Prop9").Path); + instance.Prop9 = ParseLong(value8, () => configuration.GetSection("Prop9").Path); + } + else if (defaultValueIfNotFound) + { + instance.Prop9 = default; } if (configuration["Prop10"] is string value9) { - obj.Prop10 = ParseFloat(value9, () => configuration.GetSection("Prop10").Path); + instance.Prop10 = ParseFloat(value9, () => configuration.GetSection("Prop10").Path); + } + else if (defaultValueIfNotFound) + { + instance.Prop10 = default; } if (configuration["Prop13"] is string value10) { - obj.Prop13 = ParseUshort(value10, () => configuration.GetSection("Prop13").Path); + instance.Prop13 = ParseUshort(value10, () => configuration.GetSection("Prop13").Path); + } + else if (defaultValueIfNotFound) + { + instance.Prop13 = default; } if (configuration["Prop14"] is string value11) { - obj.Prop14 = ParseUint(value11, () => configuration.GetSection("Prop14").Path); + instance.Prop14 = ParseUint(value11, () => configuration.GetSection("Prop14").Path); + } + else if (defaultValueIfNotFound) + { + instance.Prop14 = default; } if (configuration["Prop15"] is string value12) { - obj.Prop15 = ParseUlong(value12, () => configuration.GetSection("Prop15").Path); + instance.Prop15 = ParseUlong(value12, () => configuration.GetSection("Prop15").Path); + } + else if (defaultValueIfNotFound) + { + instance.Prop15 = default; } - obj.Prop16 = configuration["Prop16"]!; + if (configuration["Prop16"] is string value13) + { + instance.Prop16 = value13; + } if (configuration["Prop17"] is string value14) { - obj.Prop17 = ParseCultureInfo(value14, () => configuration.GetSection("Prop17").Path); + instance.Prop17 = ParseCultureInfo(value14, () => configuration.GetSection("Prop17").Path); } if (configuration["Prop19"] is string value15) { - obj.Prop19 = ParseDateTime(value15, () => configuration.GetSection("Prop19").Path); + instance.Prop19 = ParseDateTime(value15, () => configuration.GetSection("Prop19").Path); + } + else if (defaultValueIfNotFound) + { + instance.Prop19 = default; } if (configuration["Prop20"] is string value16) { - obj.Prop20 = ParseDateTimeOffset(value16, () => configuration.GetSection("Prop20").Path); + instance.Prop20 = ParseDateTimeOffset(value16, () => configuration.GetSection("Prop20").Path); + } + else if (defaultValueIfNotFound) + { + instance.Prop20 = default; } if (configuration["Prop21"] is string value17) { - obj.Prop21 = ParseDecimal(value17, () => configuration.GetSection("Prop21").Path); + instance.Prop21 = ParseDecimal(value17, () => configuration.GetSection("Prop21").Path); + } + else if (defaultValueIfNotFound) + { + instance.Prop21 = default; } if (configuration["Prop23"] is string value18) { - obj.Prop23 = ParseInt(value18, () => configuration.GetSection("Prop23").Path); + instance.Prop23 = ParseTimeSpan(value18, () => configuration.GetSection("Prop23").Path); + } + else if (defaultValueIfNotFound) + { + instance.Prop23 = default; } if (configuration["Prop24"] is string value19) { - obj.Prop24 = ParseDateTime(value19, () => configuration.GetSection("Prop24").Path); + instance.Prop24 = ParseGuid(value19, () => configuration.GetSection("Prop24").Path); + } + else if (defaultValueIfNotFound) + { + instance.Prop24 = default; } if (configuration["Prop25"] is string value20) { - obj.Prop25 = ParseUri(value20, () => configuration.GetSection("Prop25").Path); + instance.Prop25 = ParseUri(value20, () => configuration.GetSection("Prop25").Path); } if (configuration["Prop26"] is string value21) { - obj.Prop26 = ParseVersion(value21, () => configuration.GetSection("Prop26").Path); + instance.Prop26 = ParseVersion(value21, () => configuration.GetSection("Prop26").Path); } if (configuration["Prop27"] is string value22) { - obj.Prop27 = ParseEnum(value22, () => configuration.GetSection("Prop27").Path); + instance.Prop27 = ParseEnum(value22, () => configuration.GetSection("Prop27").Path); + } + else if (defaultValueIfNotFound) + { + instance.Prop27 = default; } if (configuration["Prop7"] is string value23) { - obj.Prop7 = ParseInt128(value23, () => configuration.GetSection("Prop7").Path); + instance.Prop7 = ParseInt128(value23, () => configuration.GetSection("Prop7").Path); + } + else if (defaultValueIfNotFound) + { + instance.Prop7 = default; } if (configuration["Prop11"] is string value24) { - obj.Prop11 = ParseHalf(value24, () => configuration.GetSection("Prop11").Path); + instance.Prop11 = ParseHalf(value24, () => configuration.GetSection("Prop11").Path); + } + else if (defaultValueIfNotFound) + { + instance.Prop11 = default; } if (configuration["Prop12"] is string value25) { - obj.Prop12 = ParseUInt128(value25, () => configuration.GetSection("Prop12").Path); + instance.Prop12 = ParseUInt128(value25, () => configuration.GetSection("Prop12").Path); + } + else if (defaultValueIfNotFound) + { + instance.Prop12 = default; } if (configuration["Prop18"] is string value26) { - obj.Prop18 = ParseDateOnly(value26, () => configuration.GetSection("Prop18").Path); + instance.Prop18 = ParseDateOnly(value26, () => configuration.GetSection("Prop18").Path); + } + else if (defaultValueIfNotFound) + { + instance.Prop18 = default; } if (configuration["Prop22"] is string value27) { - obj.Prop22 = ParseByteArray(value27, () => configuration.GetSection("Prop22").Path); + instance.Prop22 = ParseTimeOnly(value27, () => configuration.GetSection("Prop22").Path); + } + else if (defaultValueIfNotFound) + { + instance.Prop22 = default; + } + + if (configuration["Prop28"] is string value28) + { + instance.Prop28 = ParseByteArray(value28, () => configuration.GetSection("Prop28").Path); + } + + if (configuration["Prop29"] is string value29) + { + instance.Prop29 = ParseInt(value29, () => configuration.GetSection("Prop29").Path); + } + else if (defaultValueIfNotFound) + { + instance.Prop29 = default; + } + + if (configuration["Prop30"] is string value30) + { + instance.Prop30 = ParseDateTime(value30, () => configuration.GetSection("Prop30").Path); + } + else if (defaultValueIfNotFound) + { + instance.Prop30 = default; } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ServiceCollection/Configure_T.generated.txt b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ServiceCollection/Configure_T.generated.txt index 7f626f0e27c527..3e38a484c82552 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ServiceCollection/Configure_T.generated.txt +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ServiceCollection/Configure_T.generated.txt @@ -21,6 +21,7 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; + using Microsoft.Extensions.Options; using System; using System.CodeDom.Compiler; using System.Collections.Generic; @@ -32,28 +33,28 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { #region IServiceCollection extensions. /// Registers a configuration instance which TOptions will bind against. - [InterceptsLocationAttribute(@"src-0.cs", 14, 18)] - public static IServiceCollection Configure(this IServiceCollection services, IConfiguration configuration) where TOptions : class + [InterceptsLocation(@"src-0.cs", 14, 18)] + public static IServiceCollection Configure(this IServiceCollection services, IConfiguration config) where TOptions : class { - return Configure(services, string.Empty, configuration, configureOptions: null); + return Configure(services, string.Empty, config, configureOptions: null); } /// Registers a configuration instance which TOptions will bind against. - public static IServiceCollection Configure(this IServiceCollection services, string? name, IConfiguration configuration, Action? configureOptions) where TOptions : class + public static IServiceCollection Configure(this IServiceCollection services, string? name, IConfiguration config, Action? configureOptions) where TOptions : class { if (services is null) { throw new ArgumentNullException(nameof(services)); } - if (configuration is null) + if (config is null) { - throw new ArgumentNullException(nameof(configuration)); + throw new ArgumentNullException(nameof(config)); } OptionsServiceCollectionExtensions.AddOptions(services); - services.AddSingleton>(new ConfigurationChangeTokenSource(name, configuration)); - return services.AddSingleton>(new Microsoft.Extensions.Options.ConfigureNamedOptions(name, obj => BindCoreMain(configuration, obj, typeof(TOptions)configureOptions))); + services.AddSingleton>(new ConfigurationChangeTokenSource(name, config)); + return services.AddSingleton>(new ConfigureNamedOptions(name, instance => BindCoreMain(config, instance, typeof(TOptions), configureOptions))); } #endregion IServiceCollection extensions. @@ -61,16 +62,11 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration private readonly static Lazy> s_configKeys_ProgramMyClass2 = new(() => new HashSet(StringComparer.OrdinalIgnoreCase) { "MyInt" }); private readonly static Lazy> s_configKeys_ProgramMyClass = new(() => new HashSet(StringComparer.OrdinalIgnoreCase) { "MyString", "MyInt", "MyList", "MyList2", "MyDictionary" }); - public static void BindCoreMain(IConfiguration configuration, object obj, Type type, Action? configureOptions) + public static void BindCoreMain(IConfiguration configuration, object instance, Type type, Action? configureOptions) { - if (configuration is null) + if (instance is null) { - throw new ArgumentNullException(nameof(configuration)); - } - - if (obj is null) - { - throw new ArgumentNullException(nameof(obj)); + return; } if (!HasValueOrChildren(configuration)) @@ -82,89 +78,100 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration if (type == typeof(Program.MyClass)) { - var temp = (Program.MyClass)obj; - BindCore(configuration, ref temp, binderOptions); + var temp = (Program.MyClass)instance; + BindCore(configuration, ref temp, defaultValueIfNotFound: false, binderOptions); return; } throw new NotSupportedException($"Unable to bind to type '{type}': generator did not detect the type as input."); } - public static void BindCore(IConfiguration configuration, ref List obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref List instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { if (section.Value is string value) { - obj.Add(ParseInt(value, () => section.Path)); + instance.Add(ParseInt(value, () => section.Path)); } } } - public static void BindCore(IConfiguration configuration, ref Program.MyClass2 obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Program.MyClass2 instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { ValidateConfigurationKeys(typeof(Program.MyClass2), s_configKeys_ProgramMyClass2, configuration, binderOptions); if (configuration["MyInt"] is string value1) { - obj.MyInt = ParseInt(value1, () => configuration.GetSection("MyInt").Path); + instance.MyInt = ParseInt(value1, () => configuration.GetSection("MyInt").Path); + } + else if (defaultValueIfNotFound) + { + instance.MyInt = default; } } - public static void BindCore(IConfiguration configuration, ref List obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref List instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { var value = new Program.MyClass2(); - BindCore(section, ref value, binderOptions); - obj.Add(value); + BindCore(section, ref value, defaultValueIfNotFound: false, binderOptions); + instance.Add(value); } } - public static void BindCore(IConfiguration configuration, ref Dictionary obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Dictionary instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { if (section.Value is string value) { - obj[section.Key] = value; + instance[section.Key] = value; } } } - public static void BindCore(IConfiguration configuration, ref Program.MyClass obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Program.MyClass instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { ValidateConfigurationKeys(typeof(Program.MyClass), s_configKeys_ProgramMyClass, configuration, binderOptions); - obj.MyString = configuration["MyString"]!; + if (configuration["MyString"] is string value3) + { + instance.MyString = value3; + } if (configuration["MyInt"] is string value4) { - obj.MyInt = ParseInt(value4, () => configuration.GetSection("MyInt").Path); + instance.MyInt = ParseInt(value4, () => configuration.GetSection("MyInt").Path); + } + else if (defaultValueIfNotFound) + { + instance.MyInt = default; } if (AsConfigWithChildren(configuration.GetSection("MyList")) is IConfigurationSection section5) { - List? temp7 = obj.MyList; + List? temp7 = instance.MyList; temp7 ??= new List(); - BindCore(section5, ref temp7, binderOptions); - obj.MyList = temp7; + BindCore(section5, ref temp7, defaultValueIfNotFound: false, binderOptions); + instance.MyList = temp7; } if (AsConfigWithChildren(configuration.GetSection("MyList2")) is IConfigurationSection section8) { - List? temp10 = obj.MyList2; + List? temp10 = instance.MyList2; temp10 ??= new List(); - BindCore(section8, ref temp10, binderOptions); - obj.MyList2 = temp10; + BindCore(section8, ref temp10, defaultValueIfNotFound: false, binderOptions); + instance.MyList2 = temp10; } if (AsConfigWithChildren(configuration.GetSection("MyDictionary")) is IConfigurationSection section11) { - Dictionary? temp13 = obj.MyDictionary; + Dictionary? temp13 = instance.MyDictionary; temp13 ??= new Dictionary(); - BindCore(section11, ref temp13, binderOptions); - obj.MyDictionary = temp13; + BindCore(section11, ref temp13, defaultValueIfNotFound: false, binderOptions); + instance.MyDictionary = temp13; } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ServiceCollection/Configure_T_BinderOptions.generated.txt b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ServiceCollection/Configure_T_BinderOptions.generated.txt index 5848c2412f9b78..186e93a49207b2 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ServiceCollection/Configure_T_BinderOptions.generated.txt +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ServiceCollection/Configure_T_BinderOptions.generated.txt @@ -21,6 +21,7 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; + using Microsoft.Extensions.Options; using System; using System.CodeDom.Compiler; using System.Collections.Generic; @@ -32,28 +33,28 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { #region IServiceCollection extensions. /// Registers a configuration instance which TOptions will bind against. - [InterceptsLocationAttribute(@"src-0.cs", 14, 18)] - public static IServiceCollection Configure(this IServiceCollection services, IConfiguration configuration, Action? configureOptions) where TOptions : class + [InterceptsLocation(@"src-0.cs", 14, 18)] + public static IServiceCollection Configure(this IServiceCollection services, IConfiguration config, Action? configureOptions) where TOptions : class { - return Configure(services, string.Empty, configuration, configureOptions); + return Configure(services, string.Empty, config, configureOptions); } /// Registers a configuration instance which TOptions will bind against. - public static IServiceCollection Configure(this IServiceCollection services, string? name, IConfiguration configuration, Action? configureOptions) where TOptions : class + public static IServiceCollection Configure(this IServiceCollection services, string? name, IConfiguration config, Action? configureOptions) where TOptions : class { if (services is null) { throw new ArgumentNullException(nameof(services)); } - if (configuration is null) + if (config is null) { - throw new ArgumentNullException(nameof(configuration)); + throw new ArgumentNullException(nameof(config)); } OptionsServiceCollectionExtensions.AddOptions(services); - services.AddSingleton>(new ConfigurationChangeTokenSource(name, configuration)); - return services.AddSingleton>(new Microsoft.Extensions.Options.ConfigureNamedOptions(name, obj => BindCoreMain(configuration, obj, typeof(TOptions)configureOptions))); + services.AddSingleton>(new ConfigurationChangeTokenSource(name, config)); + return services.AddSingleton>(new ConfigureNamedOptions(name, instance => BindCoreMain(config, instance, typeof(TOptions), configureOptions))); } #endregion IServiceCollection extensions. @@ -61,16 +62,11 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration private readonly static Lazy> s_configKeys_ProgramMyClass2 = new(() => new HashSet(StringComparer.OrdinalIgnoreCase) { "MyInt" }); private readonly static Lazy> s_configKeys_ProgramMyClass = new(() => new HashSet(StringComparer.OrdinalIgnoreCase) { "MyString", "MyInt", "MyList", "MyList2", "MyDictionary" }); - public static void BindCoreMain(IConfiguration configuration, object obj, Type type, Action? configureOptions) + public static void BindCoreMain(IConfiguration configuration, object instance, Type type, Action? configureOptions) { - if (configuration is null) + if (instance is null) { - throw new ArgumentNullException(nameof(configuration)); - } - - if (obj is null) - { - throw new ArgumentNullException(nameof(obj)); + return; } if (!HasValueOrChildren(configuration)) @@ -82,89 +78,100 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration if (type == typeof(Program.MyClass)) { - var temp = (Program.MyClass)obj; - BindCore(configuration, ref temp, binderOptions); + var temp = (Program.MyClass)instance; + BindCore(configuration, ref temp, defaultValueIfNotFound: false, binderOptions); return; } throw new NotSupportedException($"Unable to bind to type '{type}': generator did not detect the type as input."); } - public static void BindCore(IConfiguration configuration, ref List obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref List instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { if (section.Value is string value) { - obj.Add(ParseInt(value, () => section.Path)); + instance.Add(ParseInt(value, () => section.Path)); } } } - public static void BindCore(IConfiguration configuration, ref Program.MyClass2 obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Program.MyClass2 instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { ValidateConfigurationKeys(typeof(Program.MyClass2), s_configKeys_ProgramMyClass2, configuration, binderOptions); if (configuration["MyInt"] is string value1) { - obj.MyInt = ParseInt(value1, () => configuration.GetSection("MyInt").Path); + instance.MyInt = ParseInt(value1, () => configuration.GetSection("MyInt").Path); + } + else if (defaultValueIfNotFound) + { + instance.MyInt = default; } } - public static void BindCore(IConfiguration configuration, ref List obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref List instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { var value = new Program.MyClass2(); - BindCore(section, ref value, binderOptions); - obj.Add(value); + BindCore(section, ref value, defaultValueIfNotFound: false, binderOptions); + instance.Add(value); } } - public static void BindCore(IConfiguration configuration, ref Dictionary obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Dictionary instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { if (section.Value is string value) { - obj[section.Key] = value; + instance[section.Key] = value; } } } - public static void BindCore(IConfiguration configuration, ref Program.MyClass obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Program.MyClass instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { ValidateConfigurationKeys(typeof(Program.MyClass), s_configKeys_ProgramMyClass, configuration, binderOptions); - obj.MyString = configuration["MyString"]!; + if (configuration["MyString"] is string value3) + { + instance.MyString = value3; + } if (configuration["MyInt"] is string value4) { - obj.MyInt = ParseInt(value4, () => configuration.GetSection("MyInt").Path); + instance.MyInt = ParseInt(value4, () => configuration.GetSection("MyInt").Path); + } + else if (defaultValueIfNotFound) + { + instance.MyInt = default; } if (AsConfigWithChildren(configuration.GetSection("MyList")) is IConfigurationSection section5) { - List? temp7 = obj.MyList; + List? temp7 = instance.MyList; temp7 ??= new List(); - BindCore(section5, ref temp7, binderOptions); - obj.MyList = temp7; + BindCore(section5, ref temp7, defaultValueIfNotFound: false, binderOptions); + instance.MyList = temp7; } if (AsConfigWithChildren(configuration.GetSection("MyList2")) is IConfigurationSection section8) { - List? temp10 = obj.MyList2; + List? temp10 = instance.MyList2; temp10 ??= new List(); - BindCore(section8, ref temp10, binderOptions); - obj.MyList2 = temp10; + BindCore(section8, ref temp10, defaultValueIfNotFound: false, binderOptions); + instance.MyList2 = temp10; } if (AsConfigWithChildren(configuration.GetSection("MyDictionary")) is IConfigurationSection section11) { - Dictionary? temp13 = obj.MyDictionary; + Dictionary? temp13 = instance.MyDictionary; temp13 ??= new Dictionary(); - BindCore(section11, ref temp13, binderOptions); - obj.MyDictionary = temp13; + BindCore(section11, ref temp13, defaultValueIfNotFound: false, binderOptions); + instance.MyDictionary = temp13; } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ServiceCollection/Configure_T_name.generated.txt b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ServiceCollection/Configure_T_name.generated.txt index 91226d730166f1..7958adb1125338 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ServiceCollection/Configure_T_name.generated.txt +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ServiceCollection/Configure_T_name.generated.txt @@ -21,6 +21,7 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; + using Microsoft.Extensions.Options; using System; using System.CodeDom.Compiler; using System.Collections.Generic; @@ -32,28 +33,28 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { #region IServiceCollection extensions. /// Registers a configuration instance which TOptions will bind against. - [InterceptsLocationAttribute(@"src-0.cs", 14, 18)] - public static IServiceCollection Configure(this IServiceCollection services, string? name, IConfiguration configuration) where TOptions : class + [InterceptsLocation(@"src-0.cs", 14, 18)] + public static IServiceCollection Configure(this IServiceCollection services, string? name, IConfiguration config) where TOptions : class { - return Configure(services, name, configuration, configureOptions: null); + return Configure(services, name, config, configureOptions: null); } /// Registers a configuration instance which TOptions will bind against. - public static IServiceCollection Configure(this IServiceCollection services, string? name, IConfiguration configuration, Action? configureOptions) where TOptions : class + public static IServiceCollection Configure(this IServiceCollection services, string? name, IConfiguration config, Action? configureOptions) where TOptions : class { if (services is null) { throw new ArgumentNullException(nameof(services)); } - if (configuration is null) + if (config is null) { - throw new ArgumentNullException(nameof(configuration)); + throw new ArgumentNullException(nameof(config)); } OptionsServiceCollectionExtensions.AddOptions(services); - services.AddSingleton>(new ConfigurationChangeTokenSource(name, configuration)); - return services.AddSingleton>(new Microsoft.Extensions.Options.ConfigureNamedOptions(name, obj => BindCoreMain(configuration, obj, typeof(TOptions)configureOptions))); + services.AddSingleton>(new ConfigurationChangeTokenSource(name, config)); + return services.AddSingleton>(new ConfigureNamedOptions(name, instance => BindCoreMain(config, instance, typeof(TOptions), configureOptions))); } #endregion IServiceCollection extensions. @@ -61,16 +62,11 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration private readonly static Lazy> s_configKeys_ProgramMyClass2 = new(() => new HashSet(StringComparer.OrdinalIgnoreCase) { "MyInt" }); private readonly static Lazy> s_configKeys_ProgramMyClass = new(() => new HashSet(StringComparer.OrdinalIgnoreCase) { "MyString", "MyInt", "MyList", "MyList2", "MyDictionary" }); - public static void BindCoreMain(IConfiguration configuration, object obj, Type type, Action? configureOptions) + public static void BindCoreMain(IConfiguration configuration, object instance, Type type, Action? configureOptions) { - if (configuration is null) + if (instance is null) { - throw new ArgumentNullException(nameof(configuration)); - } - - if (obj is null) - { - throw new ArgumentNullException(nameof(obj)); + return; } if (!HasValueOrChildren(configuration)) @@ -82,89 +78,100 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration if (type == typeof(Program.MyClass)) { - var temp = (Program.MyClass)obj; - BindCore(configuration, ref temp, binderOptions); + var temp = (Program.MyClass)instance; + BindCore(configuration, ref temp, defaultValueIfNotFound: false, binderOptions); return; } throw new NotSupportedException($"Unable to bind to type '{type}': generator did not detect the type as input."); } - public static void BindCore(IConfiguration configuration, ref List obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref List instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { if (section.Value is string value) { - obj.Add(ParseInt(value, () => section.Path)); + instance.Add(ParseInt(value, () => section.Path)); } } } - public static void BindCore(IConfiguration configuration, ref Program.MyClass2 obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Program.MyClass2 instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { ValidateConfigurationKeys(typeof(Program.MyClass2), s_configKeys_ProgramMyClass2, configuration, binderOptions); if (configuration["MyInt"] is string value1) { - obj.MyInt = ParseInt(value1, () => configuration.GetSection("MyInt").Path); + instance.MyInt = ParseInt(value1, () => configuration.GetSection("MyInt").Path); + } + else if (defaultValueIfNotFound) + { + instance.MyInt = default; } } - public static void BindCore(IConfiguration configuration, ref List obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref List instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { var value = new Program.MyClass2(); - BindCore(section, ref value, binderOptions); - obj.Add(value); + BindCore(section, ref value, defaultValueIfNotFound: false, binderOptions); + instance.Add(value); } } - public static void BindCore(IConfiguration configuration, ref Dictionary obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Dictionary instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { if (section.Value is string value) { - obj[section.Key] = value; + instance[section.Key] = value; } } } - public static void BindCore(IConfiguration configuration, ref Program.MyClass obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Program.MyClass instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { ValidateConfigurationKeys(typeof(Program.MyClass), s_configKeys_ProgramMyClass, configuration, binderOptions); - obj.MyString = configuration["MyString"]!; + if (configuration["MyString"] is string value3) + { + instance.MyString = value3; + } if (configuration["MyInt"] is string value4) { - obj.MyInt = ParseInt(value4, () => configuration.GetSection("MyInt").Path); + instance.MyInt = ParseInt(value4, () => configuration.GetSection("MyInt").Path); + } + else if (defaultValueIfNotFound) + { + instance.MyInt = default; } if (AsConfigWithChildren(configuration.GetSection("MyList")) is IConfigurationSection section5) { - List? temp7 = obj.MyList; + List? temp7 = instance.MyList; temp7 ??= new List(); - BindCore(section5, ref temp7, binderOptions); - obj.MyList = temp7; + BindCore(section5, ref temp7, defaultValueIfNotFound: false, binderOptions); + instance.MyList = temp7; } if (AsConfigWithChildren(configuration.GetSection("MyList2")) is IConfigurationSection section8) { - List? temp10 = obj.MyList2; + List? temp10 = instance.MyList2; temp10 ??= new List(); - BindCore(section8, ref temp10, binderOptions); - obj.MyList2 = temp10; + BindCore(section8, ref temp10, defaultValueIfNotFound: false, binderOptions); + instance.MyList2 = temp10; } if (AsConfigWithChildren(configuration.GetSection("MyDictionary")) is IConfigurationSection section11) { - Dictionary? temp13 = obj.MyDictionary; + Dictionary? temp13 = instance.MyDictionary; temp13 ??= new Dictionary(); - BindCore(section11, ref temp13, binderOptions); - obj.MyDictionary = temp13; + BindCore(section11, ref temp13, defaultValueIfNotFound: false, binderOptions); + instance.MyDictionary = temp13; } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ServiceCollection/Configure_T_name_BinderOptions.generated.txt b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ServiceCollection/Configure_T_name_BinderOptions.generated.txt index 8c9ccaa71a779f..b87d0c0a259cc8 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ServiceCollection/Configure_T_name_BinderOptions.generated.txt +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Baselines/ServiceCollection/Configure_T_name_BinderOptions.generated.txt @@ -21,6 +21,7 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; + using Microsoft.Extensions.Options; using System; using System.CodeDom.Compiler; using System.Collections.Generic; @@ -32,22 +33,22 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration { #region IServiceCollection extensions. /// Registers a configuration instance which TOptions will bind against. - [InterceptsLocationAttribute(@"src-0.cs", 14, 18)] - public static IServiceCollection Configure(this IServiceCollection services, string? name, IConfiguration configuration, Action? configureOptions) where TOptions : class + [InterceptsLocation(@"src-0.cs", 14, 18)] + public static IServiceCollection Configure(this IServiceCollection services, string? name, IConfiguration config, Action? configureOptions) where TOptions : class { if (services is null) { throw new ArgumentNullException(nameof(services)); } - if (configuration is null) + if (config is null) { - throw new ArgumentNullException(nameof(configuration)); + throw new ArgumentNullException(nameof(config)); } OptionsServiceCollectionExtensions.AddOptions(services); - services.AddSingleton>(new ConfigurationChangeTokenSource(name, configuration)); - return services.AddSingleton>(new Microsoft.Extensions.Options.ConfigureNamedOptions(name, obj => BindCoreMain(configuration, obj, typeof(TOptions)configureOptions))); + services.AddSingleton>(new ConfigurationChangeTokenSource(name, config)); + return services.AddSingleton>(new ConfigureNamedOptions(name, instance => BindCoreMain(config, instance, typeof(TOptions), configureOptions))); } #endregion IServiceCollection extensions. @@ -55,16 +56,11 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration private readonly static Lazy> s_configKeys_ProgramMyClass2 = new(() => new HashSet(StringComparer.OrdinalIgnoreCase) { "MyInt" }); private readonly static Lazy> s_configKeys_ProgramMyClass = new(() => new HashSet(StringComparer.OrdinalIgnoreCase) { "MyString", "MyInt", "MyList", "MyList2", "MyDictionary" }); - public static void BindCoreMain(IConfiguration configuration, object obj, Type type, Action? configureOptions) + public static void BindCoreMain(IConfiguration configuration, object instance, Type type, Action? configureOptions) { - if (configuration is null) + if (instance is null) { - throw new ArgumentNullException(nameof(configuration)); - } - - if (obj is null) - { - throw new ArgumentNullException(nameof(obj)); + return; } if (!HasValueOrChildren(configuration)) @@ -76,89 +72,100 @@ namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration if (type == typeof(Program.MyClass)) { - var temp = (Program.MyClass)obj; - BindCore(configuration, ref temp, binderOptions); + var temp = (Program.MyClass)instance; + BindCore(configuration, ref temp, defaultValueIfNotFound: false, binderOptions); return; } throw new NotSupportedException($"Unable to bind to type '{type}': generator did not detect the type as input."); } - public static void BindCore(IConfiguration configuration, ref List obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref List instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { if (section.Value is string value) { - obj.Add(ParseInt(value, () => section.Path)); + instance.Add(ParseInt(value, () => section.Path)); } } } - public static void BindCore(IConfiguration configuration, ref Program.MyClass2 obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Program.MyClass2 instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { ValidateConfigurationKeys(typeof(Program.MyClass2), s_configKeys_ProgramMyClass2, configuration, binderOptions); if (configuration["MyInt"] is string value1) { - obj.MyInt = ParseInt(value1, () => configuration.GetSection("MyInt").Path); + instance.MyInt = ParseInt(value1, () => configuration.GetSection("MyInt").Path); + } + else if (defaultValueIfNotFound) + { + instance.MyInt = default; } } - public static void BindCore(IConfiguration configuration, ref List obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref List instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { var value = new Program.MyClass2(); - BindCore(section, ref value, binderOptions); - obj.Add(value); + BindCore(section, ref value, defaultValueIfNotFound: false, binderOptions); + instance.Add(value); } } - public static void BindCore(IConfiguration configuration, ref Dictionary obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Dictionary instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { foreach (IConfigurationSection section in configuration.GetChildren()) { if (section.Value is string value) { - obj[section.Key] = value; + instance[section.Key] = value; } } } - public static void BindCore(IConfiguration configuration, ref Program.MyClass obj, BinderOptions? binderOptions) + public static void BindCore(IConfiguration configuration, ref Program.MyClass instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) { ValidateConfigurationKeys(typeof(Program.MyClass), s_configKeys_ProgramMyClass, configuration, binderOptions); - obj.MyString = configuration["MyString"]!; + if (configuration["MyString"] is string value3) + { + instance.MyString = value3; + } if (configuration["MyInt"] is string value4) { - obj.MyInt = ParseInt(value4, () => configuration.GetSection("MyInt").Path); + instance.MyInt = ParseInt(value4, () => configuration.GetSection("MyInt").Path); + } + else if (defaultValueIfNotFound) + { + instance.MyInt = default; } if (AsConfigWithChildren(configuration.GetSection("MyList")) is IConfigurationSection section5) { - List? temp7 = obj.MyList; + List? temp7 = instance.MyList; temp7 ??= new List(); - BindCore(section5, ref temp7, binderOptions); - obj.MyList = temp7; + BindCore(section5, ref temp7, defaultValueIfNotFound: false, binderOptions); + instance.MyList = temp7; } if (AsConfigWithChildren(configuration.GetSection("MyList2")) is IConfigurationSection section8) { - List? temp10 = obj.MyList2; + List? temp10 = instance.MyList2; temp10 ??= new List(); - BindCore(section8, ref temp10, binderOptions); - obj.MyList2 = temp10; + BindCore(section8, ref temp10, defaultValueIfNotFound: false, binderOptions); + instance.MyList2 = temp10; } if (AsConfigWithChildren(configuration.GetSection("MyDictionary")) is IConfigurationSection section11) { - Dictionary? temp13 = obj.MyDictionary; + Dictionary? temp13 = instance.MyDictionary; temp13 ??= new Dictionary(); - BindCore(section11, ref temp13, binderOptions); - obj.MyDictionary = temp13; + BindCore(section11, ref temp13, defaultValueIfNotFound: false, binderOptions); + instance.MyDictionary = temp13; } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/ConfigurationBinderTests.Generator.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/ConfigurationBinderTests.Generator.cs new file mode 100644 index 00000000000000..5b6d824e87dbe9 --- /dev/null +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/ConfigurationBinderTests.Generator.cs @@ -0,0 +1,419 @@ +// 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 Microsoft.Extensions.Configuration; +using Xunit; + +namespace Microsoft.Extensions.SourceGeneration.Configuration.Binder.Tests +{ + public partial class ConfigurationBinderTests : ConfigurationBinderTestsBase + { + // These are regression tests for https://github.com/dotnet/runtime/issues/90851 + // Source Generator Interceptors rely on identifying an accurate invocation + // source location (line and character positions). These tests cover newline + // and whitespace scenarios to ensure the interceptors get wired up correctly. + + [Fact] + public void TestBindingInvocationsWithNewlines_GetMethodTypeArg() + { + IConfiguration configuration = TestHelpers.GetConfigurationFromJsonString(@"{""Longitude"":1,""Latitude"":2}"); + + // Newline between the configuration instance and the binding invocation (with the dot on the first line) + GeolocationRecord record1 = (GeolocationRecord)configuration. + Get(typeof(GeolocationRecord), _ => { }); + + AssertRecordIsBound(record1, 1, 2); + + // Newline between the configuration instance and the binding invocation (with the dot on the second line) + GeolocationRecord record2 = (GeolocationRecord)configuration + .Get(typeof(GeolocationRecord), _ => { }); + + AssertRecordIsBound(record2, 1, 2); + + // Newlines between the instance, the invocation, and the arguments + GeolocationRecord record3 = (GeolocationRecord)configuration + .Get( + typeof(GeolocationRecord), + _ => { } + ); + + AssertRecordIsBound(record3, 1, 2); + + // Newlines before and after the instance (with the dot on the first line) + GeolocationRecord record4 = (GeolocationRecord) + configuration. + Get(typeof(GeolocationRecord), _ => { }); + + AssertRecordIsBound(record4, 1, 2); + + // Newlines before and after the instance (with the dot on the second line) + GeolocationRecord record5 = (GeolocationRecord) + configuration + .Get(typeof(GeolocationRecord), _ => { }); + + AssertRecordIsBound(record5, 1, 2); + + // Newlines in every place possible + GeolocationRecord + record6 + = + ( + GeolocationRecord + ) + configuration + . + Get + ( + typeof + ( + GeolocationRecord + ) + , + _ + => + { + } + ) + ; + + AssertRecordIsBound(record6, 1, 2); + } + + [Fact] + public void TestBindingInvocationsWithNewlines_GetMethodGeneric() + { + IConfiguration configuration = TestHelpers.GetConfigurationFromJsonString(@"{""Longitude"":1,""Latitude"":2}"); + + // Newline between the invocation method name and the generic type argument + GeolocationRecord record1 = configuration.Get + (); + + AssertRecordIsBound(record1, 1, 2); + + // Newlines on either side of the generic type argument + GeolocationRecord record2 = configuration.Get< + GeolocationRecord + >(); + + AssertRecordIsBound(record2, 1, 2); + + // Newlines in every place possible + GeolocationRecord + record3 + = + configuration + . + Get + < + GeolocationRecord + > + () + ; + + AssertRecordIsBound(record3, 1, 2); + } + + [Fact] + public void TestBindingInvocationsWithNewlines_BindExtensionMethod() + { + // Newline between the configuration instance and the extension method invocation + GeolocationRecord record1 = new GeolocationRecord(); + TestHelpers.GetConfigurationFromJsonString(@"{""Longitude"":1,""Latitude"":2}") + .Bind(record1); + + AssertRecordIsBound(record1, 1, 2); + + // Newlines between the method that returns the instance and the extension method invocation + GeolocationRecord record2 = new GeolocationRecord(); + TestHelpers + .GetConfigurationFromJsonString(@"{""Longitude"":1,""Latitude"":2}") + .Bind(record2); + + AssertRecordIsBound(record2, 1, 2); + + // Newlines within the argument to the method returning the configuration and around the extension method argument + GeolocationRecord record3 = new GeolocationRecord(); + TestHelpers + .GetConfigurationFromJsonString(@"{""Longitude"":1, + ""Latitude"":2} + ") + .Bind( + record3 + ); + + AssertRecordIsBound(record3, 1, 2); + + // Newlines in every place possible + GeolocationRecord record4 = new GeolocationRecord(); + TestHelpers + . + GetConfigurationFromJsonString + ( + @"{""Longitude"":1, ""Latitude"":2}" + ) + . + Bind + ( + record4 + ) + ; + + AssertRecordIsBound(record4, 1, 2); + } + + [Fact] + public void TestBindingInvocationsWithNewlines_BindStaticMethod() + { + IConfiguration configuration = TestHelpers.GetConfigurationFromJsonString(@"{""Longitude"":1,""Latitude"":2}"); + + // Newline between the class and the static method invocation (with the dot on the first line) + GeolocationRecord record1 = new GeolocationRecord(); + ConfigurationBinder. + Bind(configuration, record1); + + // Newline between the class and the static method invocation (with the dot on the second line) + GeolocationRecord record2 = new GeolocationRecord(); + ConfigurationBinder + .Bind(configuration, record2); + + AssertRecordIsBound(record2, 1, 2); + + // Newline before the arguments + GeolocationRecord record3 = new GeolocationRecord(); + ConfigurationBinder.Bind( + configuration, record3); + + AssertRecordIsBound(record3, 1, 2); + + // Newlines in every place possible + GeolocationRecord record4 = new GeolocationRecord(); + ConfigurationBinder + . + Bind + ( + configuration + , + record4 + ) + ; + + AssertRecordIsBound(record4, 1, 2); + } + + [Fact] + public void TestBindingInvocationsWithNewlines_GetValueMethod() + { + IConfiguration configuration = TestHelpers.GetConfigurationFromJsonString(@"{""Longitude"":1,""Latitude"":2}"); + + // Newline between the configuration instance and the binding invocation (with the dot on the first line) + int lat1 = configuration. + GetValue("Latitude"); + + Assert.Equal(2, lat1); + + // Newline between the configuration instance and the binding invocation (with the dot on the second line) + int lat2 = configuration + .GetValue("Latitude"); + + Assert.Equal(2, lat2); + + // Newlines in every place possible + long + lat3 + = + configuration + . + GetValue + < + int + > + ( + "Latitude" + ) + ; + Assert.Equal(2, lat3); + + // Newlines and pragmas wrapped around the generic type argument + long lat4 = configuration.GetValue< +#if DEBUG + int +#else + long +#endif + >("Latitude"); + + Assert.Equal(2, lat4); + } + + private static void AssertRecordIsBound(GeolocationRecord record, int longitude, int latitude) + { + Assert.Equal((longitude, latitude), (record.Longitude, record.Latitude)); + } + + // These are regression tests for https://github.com/dotnet/runtime/issues/90976 + // Ensure that every emitted identifier name is unique, otherwise name clashes + // will occur and cause compilation to fail. + + [Fact] + public void NameClashTests_NamingPatternsThatCouldCauseClashes() + { + // Potential class between type with closed generic & non generic type. + // Both types start with same substring. The generic arg type's name is + // the same as the suffix of the non generic type's name. + // Manifested in https://github.com/dotnet/runtime/issues/90976. + + IConfiguration configuration = TestHelpers.GetConfigurationFromJsonString(@"{""Value"":1}"); + + var c1 = new Cint(); + var c2 = new C(); + + configuration.Bind(c1); + configuration.Bind(c2); + Assert.Equal(1, c1.Value); + Assert.Equal(1, c2.Value); + } + + internal class C + { + public int Value { get; set; } + } + + internal class Cint + { + public int Value { get; set; } + } + + [Fact] + public void NameClashTests_SameTypeName() + { + // Both types have the same name, but one is a nested type. + + IConfiguration configuration = TestHelpers.GetConfigurationFromJsonString(@"{""Value"":1}"); + + var c1 = new ClassWithThisIdentifier(); + var c2 = new ClassWithThisIdentifier_Wrapper.ClassWithThisIdentifier(); + + configuration.Bind(c1); + configuration.Bind(c2); + Assert.Equal(1, c1.Value); + Assert.Equal(1, c2.Value); + } + + internal class ClassWithThisIdentifier + { + public int Value { get; set; } + } + + internal class ClassWithThisIdentifier_Wrapper + { + internal class ClassWithThisIdentifier + { + public int Value { get; set; } + } + } + + /// + /// These are regression tests for https://github.com/dotnet/runtime/issues/90909. + /// Ensure that we don't emit root interceptors to handle types/members that + /// are inaccessible to the generated helpers. Tests for inaccessible transitive members + /// are covered in the shared (reflection/src-gen) , + /// e.g. . + /// + /// + /// In these cases, binding calls will fallback to reflection, as with all cases where + /// we can't correctly resolve the type, such as generic call patterns and boxed objects. + /// + [Fact] + public void MemberAccessibility_InaccessibleNestedTypeAsRootConfig() + { + IConfiguration configuration = TestHelpers.GetConfigurationFromJsonString(@"{""Value"":1}"); + + // Ensure no compilation errors; types are skipped. + +#pragma warning disable SYSLIB1104 // Binding logic was not generated for a binder call. + var c1 = new InaccessibleClass_1(); + configuration.Bind(c1); + var c2 = configuration.Get(); + var c3 = configuration.Get(); + + // Generic collections. + + configuration = TestHelpers + .GetConfigurationFromJsonString(@"{""Array"": [{""Value"":1}]}") + .GetSection("Array"); + var c4 = configuration.Get(); + var c5 = configuration.Get>(); + + // Generic types. + + Action? configureOptions = options => options.BindNonPublicProperties = true; + string GetNestedObjectPayload(string propName) => $$""" + { + "{{propName}}": { + "Value": 1 + } + } + """; + + configuration = TestHelpers.GetConfigurationFromJsonString(GetNestedObjectPayload("item1")); + var c6 = configuration.Get>(configureOptions); + + configuration = TestHelpers.GetConfigurationFromJsonString(GetNestedObjectPayload("protectedMember")); + var c7 = configuration.Get>(configureOptions); + var c8 = configuration.Get>(configureOptions); + + configuration = TestHelpers.GetConfigurationFromJsonString(GetNestedObjectPayload("publicMember")); + var c9 = configuration.Get>(configureOptions); + var c10 = configuration.Get>(configureOptions); +#pragma warning disable SYSLIB1104 + + // Reflection fallback. + + Assert.Equal(1, c1.Value); + Assert.Equal(1, c2.Value); + Assert.Equal(1, c3.Value); + + Assert.Equal(1, c4[0].Value); + Assert.Equal(1, c5[0].Value); + Assert.Equal(1, c6["item1"].Value); + + Assert.Equal(1, c7.GetProtectedMember.Value); + Assert.Equal(1, c8.GetProtectedMember.Value); + Assert.Equal(1, c9.PublicMember.Value); + Assert.Equal(1, c10.PublicMember.Value); + } + + private class InaccessibleClass_1() + { + public int Value { get; set; } + } + + protected record InaccessibleClass_2(int Value); + + protected internal class InaccessibleClass_3 + { + public InaccessibleClass_3(int value) => Value = value; + + public int Value { get; } + } + + internal class AccessibleGenericClass + { + protected T ProtectedMember { get; set; } + + public T GetProtectedMember => ProtectedMember; + } + + private class InaccessibleGenericClass + { + public T PublicMember { get; set; } + } + + public class AccessibleClass() + { + public int Value { get; set; } + } + } +} diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/ConfigurationBindingGeneratorTests.Baselines.Options.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/GeneratorTests.Baselines.Options.cs similarity index 57% rename from src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/ConfigurationBindingGeneratorTests.Baselines.Options.cs rename to src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/GeneratorTests.Baselines.Options.cs index c9eb9c70927f99..4480ab4066882c 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/ConfigurationBindingGeneratorTests.Baselines.Options.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/GeneratorTests.Baselines.Options.cs @@ -4,7 +4,7 @@ using System.Threading.Tasks; using Xunit; -namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration.Tests +namespace Microsoft.Extensions.SourceGeneration.Configuration.Binder.Tests { public partial class ConfigurationBindingGeneratorTests { @@ -20,7 +20,7 @@ public static void Main() { ConfigurationBuilder configurationBuilder = new(); IConfiguration config = configurationBuilder.Build(); - IConfigurationSection section = config.GetSection(""MySection""); + IConfigurationSection section = config.GetSection("MySection"); ServiceCollection services = new(); services.Configure({{paramList}}); @@ -60,6 +60,81 @@ public async Task Configure_T_BinderOptions() => public async Task Configure_T_name_BinderOptions() => await VerifyAgainstBaselineUsingFile("Configure_T_name_BinderOptions.generated.txt", GetConfigureSource(@""""", section, _ => { }"), extType: ExtensionClassType.ServiceCollection); + [Theory] + [InlineData("OptionsConfigurationServiceCollectionExtensions.Configure(config: section, services: services);")] + [InlineData("""OptionsConfigurationServiceCollectionExtensions.Configure(name: "", config: section, services: services);""")] + [InlineData("OptionsConfigurationServiceCollectionExtensions.Configure(configureBinder: _ => { }, config: section, services: services);")] + [InlineData("""OptionsConfigurationServiceCollectionExtensions.Configure(configureBinder: _ => { }, config: section, name: "", services: services);""")] + [InlineData("""OptionsConfigurationServiceCollectionExtensions.Configure(name: "", services: services, configureBinder: _ => { }, config: section);""")] + public async Task Configure_T_NamedParameters_OutOfOrder(string row) + { + string source = $$""" + using System.Collections.Generic; + using Microsoft.Extensions.Configuration; + using Microsoft.Extensions.DependencyInjection; + + public class Program + { + public static void Main() + { + ConfigurationBuilder configurationBuilder = new(); + IConfiguration config = configurationBuilder.Build(); + IConfigurationSection section = config.GetSection("MySection"); + ServiceCollection services = new(); + + {{row}} + } + + public class MyClass + { + public string MyString { get; set; } + public int MyInt { get; set; } + public List MyList { get; set; } + public Dictionary MyDictionary { get; set; } + } + } + """; + + await VerifyThatSourceIsGenerated(source); + } + + [Theory] + [InlineData("OptionsBuilderConfigurationExtensions.Bind(config: config, optionsBuilder: optionsBuilder);")] + [InlineData("OptionsBuilderConfigurationExtensions.Bind(configureBinder: _ => { }, config: config, optionsBuilder: optionsBuilder);")] + [InlineData("OptionsBuilderConfigurationExtensions.Bind(config: config, configureBinder: _ => { }, optionsBuilder: optionsBuilder);")] + public async Task Bind_T_NamedParameters_OutOfOrder(string row) + { + string source = $$""" + using System.Collections.Generic; + using Microsoft.Extensions.Configuration; + using Microsoft.Extensions.DependencyInjection; + using Microsoft.Extensions.Options; + + public class Program + { + public static void Main() + { + ConfigurationBuilder configurationBuilder = new(); + IConfiguration config = configurationBuilder.Build(); + var services = new ServiceCollection(); + OptionsBuilder optionsBuilder = new(services, ""); + + {{row}} + } + + public class MyClass + { + public string MyString { get; set; } + public int MyInt { get; set; } + public List MyList { get; set; } + public Dictionary MyDictionary { get; set; } + } + } + """; + + await VerifyThatSourceIsGenerated(source); + } + private string GetBindSource(string? configureActions = null) => $$""" using System.Collections.Generic; using Microsoft.Extensions.Configuration; diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/ConfigurationBindingGeneratorTests.Baselines.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/GeneratorTests.Baselines.cs similarity index 72% rename from src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/ConfigurationBindingGeneratorTests.Baselines.cs rename to src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/GeneratorTests.Baselines.cs index b5c3fb49c5e7eb..3c46f5f99818b1 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/ConfigurationBindingGeneratorTests.Baselines.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/GeneratorTests.Baselines.cs @@ -5,46 +5,121 @@ using System.Linq; using System.Threading.Tasks; using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp; using Xunit; -namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration.Tests +namespace Microsoft.Extensions.SourceGeneration.Configuration.Binder.Tests { public partial class ConfigurationBindingGeneratorTests { - private const string BindCallSampleCode = @" - using System.Collections.Generic; - using Microsoft.Extensions.Configuration; + [Fact] + public async Task Bind() => + await VerifyAgainstBaselineUsingFile("Bind.generated.txt", BindCallSampleCode, extType: ExtensionClassType.ConfigurationBinder); - public class Program + [Theory] + [InlineData("ConfigurationBinder.Bind(instance: configObj, configuration: config);")] + [InlineData("""ConfigurationBinder.Bind(key: "", instance: configObj, configuration: config);""")] + [InlineData("""ConfigurationBinder.Bind(instance: configObj, key: "", configuration: config);""")] + [InlineData("ConfigurationBinder.Bind(configureOptions: _ => { }, configuration: config, instance: configObj);")] + [InlineData("ConfigurationBinder.Bind(configuration: config, configureOptions: _ => { }, instance: configObj);")] + public async Task Bind_NamedParameters_OutOfOrder(string row) { - public static void Main() - { - ConfigurationBuilder configurationBuilder = new(); - IConfigurationRoot config = configurationBuilder.Build(); + string source = $$""" + using System.Collections.Generic; + using Microsoft.Extensions.Configuration; - MyClass configObj = new(); - config.Bind(configObj); - config.Bind(configObj, options => { }); - config.Bind(""key"", configObj); - } + public class Program + { + public static void Main() + { + ConfigurationBuilder configurationBuilder = new(); + IConfigurationRoot config = configurationBuilder.Build(); - public class MyClass - { - public string MyString { get; set; } - public int MyInt { get; set; } - public List MyList { get; set; } - public Dictionary MyDictionary { get; set; } - public Dictionary MyComplexDictionary { get; set; } - } + MyClass configObj = new(); + {{row}} + } - public class MyClass2 { } - }"; + public class MyClass + { + public string MyString { get; set; } + public int MyInt { get; set; } + public List MyList { get; set; } + public Dictionary MyDictionary { get; set; } + } + } + """; + + await VerifyThatSourceIsGenerated(source); + } + + [Theory] + [InlineData("var obj = ConfigurationBinder.Get(type: typeof(MyClass), configuration: config);")] + [InlineData("var obj = ConfigurationBinder.Get(configureOptions: _ => { }, configuration: config);")] + [InlineData("var obj = ConfigurationBinder.Get(configureOptions: _ => { }, type: typeof(MyClass), configuration: config);")] + [InlineData("var obj = ConfigurationBinder.Get(type: typeof(MyClass), configureOptions: _ => { }, configuration: config);")] + public async Task Get_TypeOf_NamedParametersOutOfOrder(string row) + { + string source = $$""" + using System.Collections.Generic; + using Microsoft.Extensions.Configuration; + + public class Program + { + public static void Main() + { + ConfigurationBuilder configurationBuilder = new(); + IConfigurationRoot config = configurationBuilder.Build(); + + MyClass configObj = new(); + {{row}} + } + + public class MyClass + { + public string MyString { get; set; } + public int MyInt { get; set; } + public List MyList { get; set; } + public Dictionary MyDictionary { get; set; } + } + } + """; + + await VerifyThatSourceIsGenerated(source); + } [Theory] - [InlineData(LanguageVersion.Preview)] - public async Task Bind(LanguageVersion langVersion) => - await VerifyAgainstBaselineUsingFile("Bind.generated.txt", BindCallSampleCode, langVersion, extType: ExtensionClassType.ConfigurationBinder); + [InlineData("""var str = ConfigurationBinder.GetValue(key: "key", configuration: config, type: typeof(string));""")] + [InlineData("""var str = ConfigurationBinder.GetValue(key: "key", configuration: config);""")] + [InlineData("""var str = ConfigurationBinder.GetValue(key: "key", defaultValue: "default", configuration: config);""")] + [InlineData("""var str = ConfigurationBinder.GetValue(configuration: config, key: "key", defaultValue: "default");""")] + [InlineData("""var str = ConfigurationBinder.GetValue(defaultValue: "default", key: "key", configuration: config, type: typeof(string));""")] + [InlineData("""var str = ConfigurationBinder.GetValue(defaultValue: "default", type: typeof(string), key: "key", configuration: config);""")] + public async Task GetValue_NamedParametersOutOfOrder(string row) + { + string source = $$""" + using System.Collections.Generic; + using Microsoft.Extensions.Configuration; + + public class Program + { + public static void Main() + { + ConfigurationBuilder configurationBuilder = new(); + IConfigurationRoot config = configurationBuilder.Build(); + {{row}} + } + + public class MyClass + { + public string MyString { get; set; } + public int MyInt { get; set; } + public List MyList { get; set; } + public Dictionary MyDictionary { get; set; } + } + } + """; + + await VerifyThatSourceIsGenerated(source); + } [Fact] public async Task Bind_Instance() @@ -148,6 +223,49 @@ public class MyClass2 { } await VerifyAgainstBaselineUsingFile("Bind_Key_Instance.generated.txt", source, extType: ExtensionClassType.ConfigurationBinder); } + [Fact] + public async Task Bind_CanParseTargetConfigType_FromMethodParam() + { + string source = """ + using System; + using Microsoft.Extensions.Configuration; + + public class Program + { + public static void Main() + { + ConfigurationBuilder configurationBuilder = new(); + IConfiguration config = configurationBuilder.Build(); + + BindOptions(config, new MyClass0()); + BindOptions(config, new MyClass1(), _ => { }); + BindOptions(config, "", new MyClass2()); + } + + private static void BindOptions(IConfiguration config, MyClass0 instance) + { + config.Bind(instance); + } + + private static void BindOptions(IConfiguration config, MyClass1 instance, Action? configureOptions) + { + config.Bind(instance, configureOptions); + } + + private static void BindOptions(IConfiguration config, string path, MyClass2 instance) + { + config.Bind(path, instance); + } + + public class MyClass0 { } + public class MyClass1 { } + public class MyClass2 { } + } + """; + + await VerifyAgainstBaselineUsingFile("Bind_ParseTypeFromMethodParam.generated.txt", source, extType: ExtensionClassType.ConfigurationBinder); + } + [Fact] public async Task Get() { @@ -163,9 +281,9 @@ public static void Main() IConfigurationRoot config = configurationBuilder.Build(); MyClass configObj = config.Get(); - configObj = config.Get(typeof(MyClass2)); + MyClass2 configObj2 = (MyClass2)config.Get(typeof(MyClass2)); configObj = config.Get(binderOptions => { }); - configObj = config.Get(typeof(MyClass2), binderOptions => { }); + configObj2 = (MyClass2)config.Get(typeof(MyClass2), binderOptions => { }); } public class MyClass @@ -302,7 +420,7 @@ public static void Main() ConfigurationBuilder configurationBuilder = new(); IConfigurationRoot config = configurationBuilder.Build(); - MyClass configObj = config.Get(typeof(MyClass2)); + MyClass2 configObj = (MyClass2)config.Get(typeof(MyClass2)); } public class MyClass @@ -590,9 +708,9 @@ public class MyClass public UInt128 Prop12 { get; set; } public DateOnly Prop18 { get; set; } public TimeOnly Prop22 { get; set; } - public byte[] Prop22 { get; set; } - public int Prop23 { get; set; } - public DateTime Prop24 { get; set; } + public byte[] Prop28 { get; set; } + public int Prop29 { get; set; } + public DateTime Prop30 { get; set; } } } """; @@ -613,7 +731,7 @@ public static void Main() { ConfigurationBuilder configurationBuilder = new(); IConfiguration config = configurationBuilder.Build(); - IConfigurationSection section = config.GetSection(""MySection""); + IConfigurationSection section = config.GetSection("MySection"); section.Get(); } @@ -647,12 +765,60 @@ public interface ICustomSet : ISet } """; - await VerifyAgainstBaselineUsingFile("Collections.generated.txt", source, assessDiagnostics: (d) => + await VerifyAgainstBaselineUsingFile("Collections.generated.txt", source, validateOutputCompDiags: false, assessDiagnostics: (d) => { - Console.WriteLine((d.Where(diag => diag.Id == Diagnostics.TypeNotSupported.Id).Count(), d.Where(diag => diag.Id == Diagnostics.PropertyNotSupported.Id).Count())); Assert.Equal(3, d.Where(diag => diag.Id == Diagnostics.TypeNotSupported.Id).Count()); Assert.Equal(6, d.Where(diag => diag.Id == Diagnostics.PropertyNotSupported.Id).Count()); }); } + + [Fact] + public async Task MinimalGenerationIfNoBindableMembers() + { + string source = """ + using System.Collections.Generic; + using Microsoft.Extensions.Configuration; + + public class Program + { + public static void Main() + { + ConfigurationBuilder configurationBuilder = new(); + IConfiguration configuration = configurationBuilder.Build(); + + TypeWithNoMembers obj = new(); + configuration.Bind(obj); + + TypeWithNoMembers_Wrapper obj2 = new(); + configuration.Bind(obj2); + + List obj3 = new(); + configuration.Bind(obj3); + } + } + + public class TypeWithNoMembers + { + } + + public class TypeWithNoMembers_Wrapper + { + public TypeWithNoMembers Member { get; set; } + } + + public abstract class AbstractType_CannotInit + { + } + """; + + await VerifyAgainstBaselineUsingFile( + "EmptyConfigType.generated.txt", + source, + assessDiagnostics: (d) => + { + Assert.Equal(2, d.Where(diag => diag.Id == Diagnostics.TypeNotSupported.Id).Count()); + }, + validateOutputCompDiags: false); + } } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/GeneratorTests.Helpers.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/GeneratorTests.Helpers.cs new file mode 100644 index 00000000000000..9d7c1b7d9408f3 --- /dev/null +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/GeneratorTests.Helpers.cs @@ -0,0 +1,186 @@ +// 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; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Configuration.Binder.SourceGeneration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Options; +using SourceGenerators.Tests; +using Xunit; + +namespace Microsoft.Extensions.SourceGeneration.Configuration.Binder.Tests +{ + public partial class ConfigurationBindingGeneratorTests + { + private const string BindCallSampleCode = """ + using System.Collections.Generic; + using Microsoft.Extensions.Configuration; + + public class Program + { + public static void Main() + { + ConfigurationBuilder configurationBuilder = new(); + IConfigurationRoot config = configurationBuilder.Build(); + + MyClass configObj = new(); + config.Bind(configObj); + config.Bind(configObj, options => { }); + config.Bind("key", configObj); + } + + public class MyClass + { + public string MyString { get; set; } + public int MyInt { get; set; } + public List MyList { get; set; } + public Dictionary MyDictionary { get; set; } + public Dictionary MyComplexDictionary { get; set; } + } + + public class MyClass2 { } + } + """; + + private static class Diagnostics + { + public static (string Id, string Title) TypeNotSupported = ("SYSLIB1100", "Did not generate binding logic for a type"); + public static (string Id, string Title) PropertyNotSupported = ("SYSLIB1101", "Did not generate binding logic for a property on a type"); + public static (string Id, string Title) ValueTypesInvalidForBind = ("SYSLIB1103", "Value types are invalid inputs to configuration 'Bind' methods"); + public static (string Id, string Title) CouldNotDetermineTypeInfo = ("SYSLIB1104", "The target type for a binder call could not be determined"); + } + + private static readonly Assembly[] s_compilationAssemblyRefs = new[] { + typeof(ConfigurationBinder).Assembly, + typeof(ConfigurationBuilder).Assembly, + typeof(CultureInfo).Assembly, + typeof(Dictionary<,>).Assembly, + typeof(Enumerable).Assembly, + typeof(IConfiguration).Assembly, + typeof(IServiceCollection).Assembly, + typeof(IServiceProvider).Assembly, + typeof(IDictionary).Assembly, + typeof(OptionsBuilder<>).Assembly, + typeof(OptionsConfigurationServiceCollectionExtensions).Assembly, + typeof(Uri).Assembly, + }; + + private enum ExtensionClassType + { + None, + ConfigurationBinder, + OptionsBuilder, + ServiceCollection, + } + + private static async Task VerifyThatSourceIsGenerated(string testSourceCode) + { + var (d, r) = await RunGenerator(testSourceCode); + Assert.Equal(1, r.Length); + Assert.Empty(d); + Assert.True(r[0].SourceText.Lines.Count > 10); + } + + private static async Task VerifyAgainstBaselineUsingFile( + string filename, + string testSourceCode, + Action>? assessDiagnostics = null, + ExtensionClassType extType = ExtensionClassType.None, + bool validateOutputCompDiags = true) + { + string path = extType is ExtensionClassType.None + ? Path.Combine("Baselines", filename) + : Path.Combine("Baselines", extType.ToString(), filename); + string baseline = LineEndingsHelper.Normalize(await File.ReadAllTextAsync(path).ConfigureAwait(false)); + string[] expectedLines = baseline.Replace("%VERSION%", typeof(ConfigurationBindingGenerator).Assembly.GetName().Version?.ToString()) + .Split(Environment.NewLine); + + var (d, r) = await RunGenerator(testSourceCode, validateOutputCompDiags); + bool success = RoslynTestUtils.CompareLines(expectedLines, r[0].SourceText, out string errorMessage); + +#if UPDATE_BASELINES + if (!success) + { + const string envVarName = "RepoRootDir" + string errMessage = $"To update baselines, specify a '{envVarName}' environment variable. See this assembly's README.md doc for more details." + + string? repoRootDir = Environment.GetEnvironmentVariable(envVarName); + Assert.True(repoRootDir is not null, errMessage); + + IEnumerable lines = r[0].SourceText.Lines.Select(l => l.ToString()); + string source = string.Join(Environment.NewLine, lines).TrimEnd(Environment.NewLine.ToCharArray()) + Environment.NewLine; + path = Path.Combine($"{repoRootDir}\\src\\libraries\\Microsoft.Extensions.Configuration.Binder\\tests\\SourceGenerationTests\\", path); + + await File.WriteAllTextAsync(path, source).ConfigureAwait(false); + success = true; + } +#endif + + Assert.Single(r); + (assessDiagnostics ?? ((d) => Assert.Empty(d))).Invoke(d); + Assert.True(success, errorMessage); + } + + private static async Task<(ImmutableArray, ImmutableArray)> RunGenerator( + string testSourceCode, + bool validateOutputCompDiags = false, + LanguageVersion langVersion = LanguageVersion.CSharp12, + IEnumerable? references = null) + { + using var workspace = RoslynTestUtils.CreateTestWorkspace(); + CSharpParseOptions parseOptions = new CSharpParseOptions(langVersion).WithFeatures(new[] { + new KeyValuePair("InterceptorsPreview", ""), + new KeyValuePair("InterceptorsPreviewNamespaces", "Microsoft.Extensions.Configuration.Binder.SourceGeneration") + }); + + Project proj = RoslynTestUtils.CreateTestProject(workspace, references ?? s_compilationAssemblyRefs, langVersion: langVersion) + .WithCompilationOptions(new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary).WithNullableContextOptions(NullableContextOptions.Annotations)) + .WithDocuments(new string[] { testSourceCode }) + .WithParseOptions(parseOptions); + + Assert.True(proj.Solution.Workspace.TryApplyChanges(proj.Solution)); + + Compilation comp = await proj.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); + CSharpGeneratorDriver cgd = CSharpGeneratorDriver.Create(new[] { new ConfigurationBindingGenerator().AsSourceGenerator() }, parseOptions: parseOptions); + GeneratorDriver gd = cgd.RunGeneratorsAndUpdateCompilation(comp, out Compilation outputCompilation, out _, CancellationToken.None); + GeneratorDriverRunResult runResult = gd.GetRunResult(); + + if (validateOutputCompDiags) + { + ImmutableArray diagnostics = outputCompilation.GetDiagnostics(); + Assert.False(diagnostics.Any(d => d.Severity > DiagnosticSeverity.Info)); + } + + return (runResult.Results[0].Diagnostics, runResult.Results[0].GeneratedSources); + } + + public static List GetAssemblyRefsWithAdditional(params Type[] additional) + { + List assemblies = new(s_compilationAssemblyRefs); + assemblies.AddRange(additional.Select(t => t.Assembly)); + return assemblies; + } + + public static HashSet GetFilteredAssemblyRefs(IEnumerable exclusions) + { + HashSet assemblies = new(s_compilationAssemblyRefs); + foreach (Type exclusion in exclusions) + { + assemblies.Remove(exclusion.Assembly); + } + return assemblies; + } + } +} diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/ConfigurationBindingGeneratorTests.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/GeneratorTests.cs similarity index 62% rename from src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/ConfigurationBindingGeneratorTests.cs rename to src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/GeneratorTests.cs index a512c5efe495b1..846e64d904d531 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/ConfigurationBindingGeneratorTests.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/GeneratorTests.cs @@ -6,58 +6,28 @@ using System.Collections.Generic; using System.Collections.Immutable; using System.Globalization; -using System.IO; using System.Linq; -using System.Reflection; using System.Text; using System.Text.Json; using System.Threading.Tasks; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; -using Microsoft.Extensions.SourceGeneration.Configuration.Binder.Tests; -using SourceGenerators.Tests; using Xunit; -namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration.Tests +namespace Microsoft.Extensions.SourceGeneration.Configuration.Binder.Tests { [ActiveIssue("https://github.com/dotnet/runtime/issues/52062", TestPlatforms.Browser)] public partial class ConfigurationBindingGeneratorTests : ConfigurationBinderTestsBase { - private static class Diagnostics - { - public static (string Id, string Title) TypeNotSupported = ("SYSLIB1100", "Did not generate binding logic for a type"); - public static (string Id, string Title) PropertyNotSupported = ("SYSLIB1101", "Did not generate binding logic for a property on a type"); - public static (string Id, string Title) ValueTypesInvalidForBind = ("SYSLIB1103", "Value types are invalid inputs to configuration 'Bind' methods"); - public static (string Id, string Title) CouldNotDetermineTypeInfo = ("SYSLIB1104", "The target type for a binder call could not be determined"); - } - - private static readonly Assembly[] s_compilationAssemblyRefs = new[] { - typeof(ConfigurationBinder).Assembly, - typeof(CultureInfo).Assembly, - typeof(IConfiguration).Assembly, - typeof(IServiceCollection).Assembly, - typeof(IDictionary).Assembly, - typeof(OptionsBuilder<>).Assembly, - typeof(OptionsConfigurationServiceCollectionExtensions).Assembly, - typeof(Uri).Assembly, - }; - - private enum ExtensionClassType - { - None, - ConfigurationBinder, - OptionsBuilder, - ServiceCollection, - } - [Theory] [InlineData(LanguageVersion.CSharp11)] [InlineData(LanguageVersion.CSharp10)] public async Task LangVersionMustBeCharp12OrHigher(LanguageVersion langVersion) { - var (d, r) = await RunGenerator(BindCallSampleCode, langVersion); + var (d, r) = await RunGenerator(BindCallSampleCode, langVersion: langVersion); Assert.Empty(r); Diagnostic diagnostic = Assert.Single(d); @@ -207,60 +177,7 @@ public class MyClass { } } [Fact] - public async Task BindCanParseMethodParam() - { - string source = """ - using System; - using Microsoft.AspNetCore.Builder; - using Microsoft.Extensions.Configuration; - using Microsoft.Extensions.DependencyInjection; - - public class Program - { - public static void Main() - { - ConfigurationBuilder configurationBuilder = new(); - IConfiguration config = configurationBuilder.Build(); - - BindOptions(config, new MyClass0()); - BindOptions(config, new MyClass1(), (_) => { }); - BindOptions(config, "", new MyClass2()); - } - - private void BindOptions(IConfiguration config, MyClass0 instance) - { - config.Bind(instance); - } - - private void BindOptions(IConfiguration config, MyClass1 instance, Action? configureOptions) - { - config.Bind(instance, configureOptions); - } - - private void BindOptions(IConfiguration config, string path, MyClass2 instance) - { - config.Bind(path, instance); - } - - public class MyClass0 { } - public class MyClass1 { } - public class MyClass2 { } - } - """; - - var (d, r) = await RunGenerator(source); - Assert.Single(r); - - string generatedSource = string.Join('\n', r[0].SourceText.Lines.Select(x => x.ToString())); - Assert.Contains("public static void Bind_ProgramMyClass0(this IConfiguration configuration, object? obj)", generatedSource); - Assert.Contains("public static void Bind_ProgramMyClass1(this IConfiguration configuration, object? obj, Action? configureOptions)", generatedSource); - Assert.Contains("public static void Bind_ProgramMyClass2(this IConfiguration configuration, string key, object? obj)", generatedSource); - - Assert.Empty(d); - } - - [Fact] - public async Task SucceedForMinimalInput() + public async Task SucceedWhenGivenMinimumRequiredReferences() { string source = """ using System; @@ -367,59 +284,8 @@ public class AnotherGraphWithUnsupportedMembers var (d, r) = await RunGenerator(source, references: GetAssemblyRefsWithAdditional(typeof(ImmutableArray<>), typeof(Encoding), typeof(JsonSerializer))); Assert.Single(r); - Assert.Equal(12, d.Where(diag => diag.Id == Diagnostics.TypeNotSupported.Id).Count()); - Assert.Equal(10, d.Where(diag => diag.Id == Diagnostics.PropertyNotSupported.Id).Count()); - } - - private static async Task VerifyAgainstBaselineUsingFile( - string filename, - string testSourceCode, - LanguageVersion languageVersion = LanguageVersion.Preview, - Action>? assessDiagnostics = null, - ExtensionClassType extType = ExtensionClassType.None) - { - string path = extType is ExtensionClassType.None - ? Path.Combine("Baselines", filename) - : Path.Combine("Baselines", extType.ToString(), filename); - string baseline = LineEndingsHelper.Normalize(await File.ReadAllTextAsync(path).ConfigureAwait(false)); - string[] expectedLines = baseline.Replace("%VERSION%", typeof(ConfigurationBindingGenerator).Assembly.GetName().Version?.ToString()) - .Split(Environment.NewLine); - - var (d, r) = await RunGenerator(testSourceCode, languageVersion); - bool success = RoslynTestUtils.CompareLines(expectedLines, r[0].SourceText, out string errorMessage); - -#if !SKIP_BASELINES - Assert.Single(r); - (assessDiagnostics ?? ((d) => Assert.Empty(d))).Invoke(d); - Assert.True(success, errorMessage); -#endif - } - - private static async Task<(ImmutableArray, ImmutableArray)> RunGenerator( - string testSourceCode, - LanguageVersion langVersion = LanguageVersion.Preview, - IEnumerable? references = null) => - await RoslynTestUtils.RunGenerator( - new ConfigurationBindingGenerator(), - references ?? s_compilationAssemblyRefs, - new[] { testSourceCode }, - langVersion: langVersion).ConfigureAwait(false); - - public static List GetAssemblyRefsWithAdditional(params Type[] additional) - { - List assemblies = new(s_compilationAssemblyRefs); - assemblies.AddRange(additional.Select(t => t.Assembly)); - return assemblies; - } - - public static HashSet GetFilteredAssemblyRefs(IEnumerable exclusions) - { - HashSet assemblies = new(s_compilationAssemblyRefs); - foreach (Type exclusion in exclusions) - { - assemblies.Remove(exclusion.Assembly); - } - return assemblies; + Assert.Equal(47, d.Where(diag => diag.Id == Diagnostics.TypeNotSupported.Id).Count()); + Assert.Equal(44, d.Where(diag => diag.Id == Diagnostics.PropertyNotSupported.Id).Count()); } } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Microsoft.Extensions.Configuration.Binder.SourceGeneration.Tests.csproj b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Microsoft.Extensions.Configuration.Binder.SourceGeneration.Tests.csproj index cfd45c365d42a0..fc8db157eddeea 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Microsoft.Extensions.Configuration.Binder.SourceGeneration.Tests.csproj +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/SourceGenerationTests/Microsoft.Extensions.Configuration.Binder.SourceGeneration.Tests.csproj @@ -5,13 +5,15 @@ SYSLIB1100,SYSLIB1101 $(Features);InterceptorsPreview + + $(InterceptorsPreviewNamespaces);Microsoft.Extensions.Configuration.Binder.SourceGeneration true $(DefineConstants);BUILDING_SOURCE_GENERATOR_TESTS;ROSLYN4_0_OR_GREATER;ROSLYN4_4_OR_GREATER $(DefineConstants);LAUNCH_DEBUGGER - $(DefineConstants);SKIP_BASELINES + $(DefineConstants);UPDATE_BASELINES @@ -28,6 +30,7 @@ + @@ -50,9 +53,10 @@ PreserveNewest - - - + + + + diff --git a/src/libraries/Microsoft.Extensions.Configuration.CommandLine/Microsoft.Extensions.Configuration.CommandLine.sln b/src/libraries/Microsoft.Extensions.Configuration.CommandLine/Microsoft.Extensions.Configuration.CommandLine.sln index bd073f9fdd0431..5b4aec3e1591fe 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.CommandLine/Microsoft.Extensions.Configuration.CommandLine.sln +++ b/src/libraries/Microsoft.Extensions.Configuration.CommandLine/Microsoft.Extensions.Configuration.CommandLine.sln @@ -29,12 +29,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primit EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primitives", "..\Microsoft.Extensions.Primitives\src\Microsoft.Extensions.Primitives.csproj", "{DD7282C4-85F7-4C0F-9E43-1EC487A5FD20}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{4E08739F-A5F9-44CD-B90C-398A33FDF172}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{085296E6-03AF-485A-BBF9-538E27DF269D}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{EFCE9CE3-9F0E-442A-97CF-01113E3F2A0A}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{4BC663D6-2D40-4DF3-9640-09321F1853BC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{04AE44D5-E27B-4901-914A-E1DEB97590DB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{62E274E9-604F-4EAC-8B77-EF2B3D1C605F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{834433EF-3AEC-4252-BBEC-F4FF2675DECA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{FB8F172A-2A4B-4955-818B-890D1E2F743B}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{54F971EC-DA31-4060-B0D3-CE89F62E4B40}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{9AF531D0-D6CC-4C76-90BD-ED0F725A604E}" @@ -43,6 +51,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{F8D4BCC4-4B1 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{24F3652F-573B-445E-8690-BE73B8F0A2C7}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{6798366E-2129-4EA8-99FD-725A4CA62DE4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{D2EEBBD5-2FC5-43FE-A272-BA15C362526A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{B38A6FBD-B121-4F74-84F9-9ABA6A7E52F6}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{6122803F-DF67-4481-95C8-699C26EE6B59}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -109,10 +125,6 @@ Global {DD7282C4-85F7-4C0F-9E43-1EC487A5FD20}.Debug|Any CPU.Build.0 = Debug|Any CPU {DD7282C4-85F7-4C0F-9E43-1EC487A5FD20}.Release|Any CPU.ActiveCfg = Release|Any CPU {DD7282C4-85F7-4C0F-9E43-1EC487A5FD20}.Release|Any CPU.Build.0 = Release|Any CPU - {4E08739F-A5F9-44CD-B90C-398A33FDF172}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4E08739F-A5F9-44CD-B90C-398A33FDF172}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4E08739F-A5F9-44CD-B90C-398A33FDF172}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4E08739F-A5F9-44CD-B90C-398A33FDF172}.Release|Any CPU.Build.0 = Release|Any CPU {085296E6-03AF-485A-BBF9-538E27DF269D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {085296E6-03AF-485A-BBF9-538E27DF269D}.Debug|Any CPU.Build.0 = Debug|Any CPU {085296E6-03AF-485A-BBF9-538E27DF269D}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -121,6 +133,26 @@ Global {EFCE9CE3-9F0E-442A-97CF-01113E3F2A0A}.Debug|Any CPU.Build.0 = Debug|Any CPU {EFCE9CE3-9F0E-442A-97CF-01113E3F2A0A}.Release|Any CPU.ActiveCfg = Release|Any CPU {EFCE9CE3-9F0E-442A-97CF-01113E3F2A0A}.Release|Any CPU.Build.0 = Release|Any CPU + {4BC663D6-2D40-4DF3-9640-09321F1853BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4BC663D6-2D40-4DF3-9640-09321F1853BC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4BC663D6-2D40-4DF3-9640-09321F1853BC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4BC663D6-2D40-4DF3-9640-09321F1853BC}.Release|Any CPU.Build.0 = Release|Any CPU + {04AE44D5-E27B-4901-914A-E1DEB97590DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {04AE44D5-E27B-4901-914A-E1DEB97590DB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {04AE44D5-E27B-4901-914A-E1DEB97590DB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {04AE44D5-E27B-4901-914A-E1DEB97590DB}.Release|Any CPU.Build.0 = Release|Any CPU + {62E274E9-604F-4EAC-8B77-EF2B3D1C605F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {62E274E9-604F-4EAC-8B77-EF2B3D1C605F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {62E274E9-604F-4EAC-8B77-EF2B3D1C605F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {62E274E9-604F-4EAC-8B77-EF2B3D1C605F}.Release|Any CPU.Build.0 = Release|Any CPU + {834433EF-3AEC-4252-BBEC-F4FF2675DECA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {834433EF-3AEC-4252-BBEC-F4FF2675DECA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {834433EF-3AEC-4252-BBEC-F4FF2675DECA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {834433EF-3AEC-4252-BBEC-F4FF2675DECA}.Release|Any CPU.Build.0 = Release|Any CPU + {FB8F172A-2A4B-4955-818B-890D1E2F743B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FB8F172A-2A4B-4955-818B-890D1E2F743B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FB8F172A-2A4B-4955-818B-890D1E2F743B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FB8F172A-2A4B-4955-818B-890D1E2F743B}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -141,9 +173,16 @@ Global {27EB8901-D9CB-4814-8565-8D2CE564F2C8} = {F8D4BCC4-4B13-4EFC-A5AE-38C26519EDDF} {DD7282C4-85F7-4C0F-9E43-1EC487A5FD20} = {F8D4BCC4-4B13-4EFC-A5AE-38C26519EDDF} {666035CA-DF32-4759-8E5D-5845F137FE2C} = {24F3652F-573B-445E-8690-BE73B8F0A2C7} - {4E08739F-A5F9-44CD-B90C-398A33FDF172} = {24F3652F-573B-445E-8690-BE73B8F0A2C7} {085296E6-03AF-485A-BBF9-538E27DF269D} = {24F3652F-573B-445E-8690-BE73B8F0A2C7} {EFCE9CE3-9F0E-442A-97CF-01113E3F2A0A} = {24F3652F-573B-445E-8690-BE73B8F0A2C7} + {4BC663D6-2D40-4DF3-9640-09321F1853BC} = {6798366E-2129-4EA8-99FD-725A4CA62DE4} + {04AE44D5-E27B-4901-914A-E1DEB97590DB} = {6798366E-2129-4EA8-99FD-725A4CA62DE4} + {6798366E-2129-4EA8-99FD-725A4CA62DE4} = {6122803F-DF67-4481-95C8-699C26EE6B59} + {62E274E9-604F-4EAC-8B77-EF2B3D1C605F} = {D2EEBBD5-2FC5-43FE-A272-BA15C362526A} + {834433EF-3AEC-4252-BBEC-F4FF2675DECA} = {D2EEBBD5-2FC5-43FE-A272-BA15C362526A} + {D2EEBBD5-2FC5-43FE-A272-BA15C362526A} = {6122803F-DF67-4481-95C8-699C26EE6B59} + {FB8F172A-2A4B-4955-818B-890D1E2F743B} = {B38A6FBD-B121-4F74-84F9-9ABA6A7E52F6} + {B38A6FBD-B121-4F74-84F9-9ABA6A7E52F6} = {6122803F-DF67-4481-95C8-699C26EE6B59} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {B21C5DA8-5B94-485F-913D-CDF943AFCAD6} diff --git a/src/libraries/Microsoft.Extensions.Configuration.CommandLine/src/PACKAGE.md b/src/libraries/Microsoft.Extensions.Configuration.CommandLine/src/PACKAGE.md index 39daac6e4ec6c0..3714573d5d449b 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.CommandLine/src/PACKAGE.md +++ b/src/libraries/Microsoft.Extensions.Configuration.CommandLine/src/PACKAGE.md @@ -1,14 +1,16 @@ ## About + + Command line configuration provider implementation for [Microsoft.Extensions.Configuration](https://www.nuget.org/packages/Microsoft.Extensions.Configuration/). This package enables you to read configuration parameters from the command line arguments of your application. You can use [CommandLineConfigurationExtensions.AddCommandLine](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration.commandlineconfigurationextensions.addcommandline) extension method on `IConfigurationBuilder` to add the command line configuration provider to the configuration builder. -For more information, see the documentation: [Command-line configuration provider](https://learn.microsoft.com/dotnet/core/extensions/configuration-providers#command-line-configuration-provider). +## How to Use -## Example + The following example shows how to read application configuration from the command line. You can use a command like `dotnet run --InputPath "c:\fizz" --OutputPath "c:\buzz"` to run it. -```cs +```C# using System; using Microsoft.Extensions.Configuration; @@ -20,10 +22,23 @@ class Program IConfiguration config = new ConfigurationBuilder() .AddCommandLine(args) .Build(); - + // Read configuration values Console.WriteLine($"InputPath: {config["InputPath"]}"); Console.WriteLine($"OutputPath: {config["OutputPath"]}"); } } ``` + +## Additional Documentation + + + +* [Command-line configuration provider](https://learn.microsoft.com/dotnet/core/extensions/configuration-providers#command-line-configuration-provider) +* [API documentation](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration.commandline) + +## Feedback & Contributing + + + +Microsoft.Extensions.Configuration.CommandLine is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). \ No newline at end of file diff --git a/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/Microsoft.Extensions.Configuration.EnvironmentVariables.sln b/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/Microsoft.Extensions.Configuration.EnvironmentVariables.sln index f8a3ae9bf515c7..969519febf700d 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/Microsoft.Extensions.Configuration.EnvironmentVariables.sln +++ b/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/Microsoft.Extensions.Configuration.EnvironmentVariables.sln @@ -29,12 +29,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primit EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primitives", "..\Microsoft.Extensions.Primitives\src\Microsoft.Extensions.Primitives.csproj", "{73CB2C25-1A22-479C-9FC0-CE65BFE272DB}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{8C9DCB50-7F83-47A4-9EF7-D10953B6C0E5}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{8931287A-8B13-415E-9043-2E2BB8A09F2D}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{45730CA0-CC0F-4D63-8E2E-08A4414599EC}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{B909A98C-3265-440A-8417-F3472E95EAF4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{6AFC4513-94DE-4B45-BC93-BF88BF13B9F0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{821C408A-ED16-48AE-8271-57683700638E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{87EB5422-095E-4882-9315-08014F2106B4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{516FFF77-9595-4378-A170-97B19F2B5E9D}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{24FA2158-5073-48F7-94DE-11DD7AAE86DD}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{96A7E0DD-290C-45D7-9556-1B45F474F72E}" @@ -43,6 +51,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D5A074D2-033 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{8F8CE472-78AF-419D-8D46-9DF1CAACD48E}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{CCB95EA0-6D55-44F2-A02F-88CE1C1BA70E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{D6DF2EC4-10BD-4C3A-A3FD-C7CFAB88B09E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{E288E955-B587-4543-B067-7A2A4CCF24B6}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{BC4071EB-9642-4C04-B19A-01F74B46BB9F}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -109,10 +125,6 @@ Global {73CB2C25-1A22-479C-9FC0-CE65BFE272DB}.Debug|Any CPU.Build.0 = Debug|Any CPU {73CB2C25-1A22-479C-9FC0-CE65BFE272DB}.Release|Any CPU.ActiveCfg = Release|Any CPU {73CB2C25-1A22-479C-9FC0-CE65BFE272DB}.Release|Any CPU.Build.0 = Release|Any CPU - {8C9DCB50-7F83-47A4-9EF7-D10953B6C0E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8C9DCB50-7F83-47A4-9EF7-D10953B6C0E5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8C9DCB50-7F83-47A4-9EF7-D10953B6C0E5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8C9DCB50-7F83-47A4-9EF7-D10953B6C0E5}.Release|Any CPU.Build.0 = Release|Any CPU {8931287A-8B13-415E-9043-2E2BB8A09F2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8931287A-8B13-415E-9043-2E2BB8A09F2D}.Debug|Any CPU.Build.0 = Debug|Any CPU {8931287A-8B13-415E-9043-2E2BB8A09F2D}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -121,6 +133,26 @@ Global {45730CA0-CC0F-4D63-8E2E-08A4414599EC}.Debug|Any CPU.Build.0 = Debug|Any CPU {45730CA0-CC0F-4D63-8E2E-08A4414599EC}.Release|Any CPU.ActiveCfg = Release|Any CPU {45730CA0-CC0F-4D63-8E2E-08A4414599EC}.Release|Any CPU.Build.0 = Release|Any CPU + {B909A98C-3265-440A-8417-F3472E95EAF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B909A98C-3265-440A-8417-F3472E95EAF4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B909A98C-3265-440A-8417-F3472E95EAF4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B909A98C-3265-440A-8417-F3472E95EAF4}.Release|Any CPU.Build.0 = Release|Any CPU + {6AFC4513-94DE-4B45-BC93-BF88BF13B9F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6AFC4513-94DE-4B45-BC93-BF88BF13B9F0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6AFC4513-94DE-4B45-BC93-BF88BF13B9F0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6AFC4513-94DE-4B45-BC93-BF88BF13B9F0}.Release|Any CPU.Build.0 = Release|Any CPU + {821C408A-ED16-48AE-8271-57683700638E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {821C408A-ED16-48AE-8271-57683700638E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {821C408A-ED16-48AE-8271-57683700638E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {821C408A-ED16-48AE-8271-57683700638E}.Release|Any CPU.Build.0 = Release|Any CPU + {87EB5422-095E-4882-9315-08014F2106B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {87EB5422-095E-4882-9315-08014F2106B4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {87EB5422-095E-4882-9315-08014F2106B4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {87EB5422-095E-4882-9315-08014F2106B4}.Release|Any CPU.Build.0 = Release|Any CPU + {516FFF77-9595-4378-A170-97B19F2B5E9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {516FFF77-9595-4378-A170-97B19F2B5E9D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {516FFF77-9595-4378-A170-97B19F2B5E9D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {516FFF77-9595-4378-A170-97B19F2B5E9D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -141,9 +173,16 @@ Global {3D1CF09A-2A49-4F79-89F3-C04EC00FFC32} = {D5A074D2-033F-4577-A5CC-568CAC9CC729} {73CB2C25-1A22-479C-9FC0-CE65BFE272DB} = {D5A074D2-033F-4577-A5CC-568CAC9CC729} {AB77DCB0-99E3-45F5-BD7A-96FF34FAC245} = {8F8CE472-78AF-419D-8D46-9DF1CAACD48E} - {8C9DCB50-7F83-47A4-9EF7-D10953B6C0E5} = {8F8CE472-78AF-419D-8D46-9DF1CAACD48E} {8931287A-8B13-415E-9043-2E2BB8A09F2D} = {8F8CE472-78AF-419D-8D46-9DF1CAACD48E} {45730CA0-CC0F-4D63-8E2E-08A4414599EC} = {8F8CE472-78AF-419D-8D46-9DF1CAACD48E} + {B909A98C-3265-440A-8417-F3472E95EAF4} = {CCB95EA0-6D55-44F2-A02F-88CE1C1BA70E} + {6AFC4513-94DE-4B45-BC93-BF88BF13B9F0} = {CCB95EA0-6D55-44F2-A02F-88CE1C1BA70E} + {CCB95EA0-6D55-44F2-A02F-88CE1C1BA70E} = {BC4071EB-9642-4C04-B19A-01F74B46BB9F} + {821C408A-ED16-48AE-8271-57683700638E} = {D6DF2EC4-10BD-4C3A-A3FD-C7CFAB88B09E} + {87EB5422-095E-4882-9315-08014F2106B4} = {D6DF2EC4-10BD-4C3A-A3FD-C7CFAB88B09E} + {D6DF2EC4-10BD-4C3A-A3FD-C7CFAB88B09E} = {BC4071EB-9642-4C04-B19A-01F74B46BB9F} + {516FFF77-9595-4378-A170-97B19F2B5E9D} = {E288E955-B587-4543-B067-7A2A4CCF24B6} + {E288E955-B587-4543-B067-7A2A4CCF24B6} = {BC4071EB-9642-4C04-B19A-01F74B46BB9F} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {FD52C33A-D95E-4E76-B817-12A125C4418A} diff --git a/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/src/PACKAGE.md b/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/src/PACKAGE.md index 84d2d9412cce76..eb9a67bfbfda25 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/src/PACKAGE.md +++ b/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/src/PACKAGE.md @@ -1,10 +1,13 @@ ## About + + Environment variables configuration provider implementation for [Microsoft.Extensions.Configuration](https://www.nuget.org/packages/Microsoft.Extensions.Configuration/). This package enables you to read configuration parameters from environment variables. You can use [EnvironmentVariablesExtensions.AddEnvironmentVariables](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration.environmentvariablesextensions.addenvironmentvariables) extension method on `IConfigurationBuilder` to add the environment variables configuration provider to the configuration builder. -For more information, see the documentation: [Environment variable configuration provider](https://learn.microsoft.com/dotnet/core/extensions/configuration-providers#environment-variable-configuration-provider). +## How to Use + + -## Example The following example shows how to read application configuration from environment variables. ```cs @@ -26,3 +29,16 @@ class Program } } ``` + +## Additional Documentation + + + +* [Environment variable configuration provider](https://learn.microsoft.com/dotnet/core/extensions/configuration-providers#environment-variable-configuration-provider) +* [API documentation](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration.environmentvariables) + +## Feedback & Contributing + + + +Microsoft.Extensions.Configuration.EnvironmentVariables is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). \ No newline at end of file diff --git a/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/tests/EnvironmentVariablesTest.cs b/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/tests/EnvironmentVariablesTest.cs index bf74d11775dcfe..cd03e816fb6568 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/tests/EnvironmentVariablesTest.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/tests/EnvironmentVariablesTest.cs @@ -284,6 +284,7 @@ public void AddEnvironmentVariablesUsingPrefixWithDoubleUnderscores_Bind_PrefixM } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void BindingDoesNotThrowIfReloadedDuringBinding() { var dic = new Dictionary diff --git a/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/Microsoft.Extensions.Configuration.FileExtensions.sln b/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/Microsoft.Extensions.Configuration.FileExtensions.sln index 522ab25b31b548..61201b5481b728 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/Microsoft.Extensions.Configuration.FileExtensions.sln +++ b/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/Microsoft.Extensions.Configuration.FileExtensions.sln @@ -31,12 +31,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primit EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primitives", "..\Microsoft.Extensions.Primitives\src\Microsoft.Extensions.Primitives.csproj", "{96F56B6D-B82D-433A-95CB-A35179529934}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{12943188-A4E3-44FC-A75E-8228362F2942}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{3064B45D-E4A3-47CC-8F7C-1635A647F738}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{C57D0E23-18B5-4EAE-8E69-433171C57C01}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{51626848-29B2-4B8D-9C16-CF36096EAEDC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{ECA79973-C00F-4FBD-A5A4-3398B132C5EE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{CBA98E95-E860-4C77-BA22-EF2A59D68B33}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{5F7F1A7E-99E3-44C1-BC2F-E96D5F05E39E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{FB0BCBFD-CA54-4D8D-BBAF-48500AE50D89}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{AD777611-BD18-4241-9426-24B01BD78A22}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{5D71F187-E70B-413D-9819-03F6C1D7AA34}" @@ -45,6 +53,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D55A8909-619 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{4DFFE138-A7D8-4B2D-9FA6-B26635D29EFF}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{6A27AADF-5939-4F52-87CB-DAE472C8B7C5}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{967C99B7-CBCD-4A8D-B0B7-605723E606C6}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{840D8F70-E951-4F75-BEAC-AF70A18CFC1C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{71728FB3-39A3-4C25-AF6D-C7E5DC8E0FEB}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -115,10 +131,6 @@ Global {96F56B6D-B82D-433A-95CB-A35179529934}.Debug|Any CPU.Build.0 = Debug|Any CPU {96F56B6D-B82D-433A-95CB-A35179529934}.Release|Any CPU.ActiveCfg = Release|Any CPU {96F56B6D-B82D-433A-95CB-A35179529934}.Release|Any CPU.Build.0 = Release|Any CPU - {12943188-A4E3-44FC-A75E-8228362F2942}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {12943188-A4E3-44FC-A75E-8228362F2942}.Debug|Any CPU.Build.0 = Debug|Any CPU - {12943188-A4E3-44FC-A75E-8228362F2942}.Release|Any CPU.ActiveCfg = Release|Any CPU - {12943188-A4E3-44FC-A75E-8228362F2942}.Release|Any CPU.Build.0 = Release|Any CPU {3064B45D-E4A3-47CC-8F7C-1635A647F738}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3064B45D-E4A3-47CC-8F7C-1635A647F738}.Debug|Any CPU.Build.0 = Debug|Any CPU {3064B45D-E4A3-47CC-8F7C-1635A647F738}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -127,6 +139,26 @@ Global {C57D0E23-18B5-4EAE-8E69-433171C57C01}.Debug|Any CPU.Build.0 = Debug|Any CPU {C57D0E23-18B5-4EAE-8E69-433171C57C01}.Release|Any CPU.ActiveCfg = Release|Any CPU {C57D0E23-18B5-4EAE-8E69-433171C57C01}.Release|Any CPU.Build.0 = Release|Any CPU + {51626848-29B2-4B8D-9C16-CF36096EAEDC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {51626848-29B2-4B8D-9C16-CF36096EAEDC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {51626848-29B2-4B8D-9C16-CF36096EAEDC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {51626848-29B2-4B8D-9C16-CF36096EAEDC}.Release|Any CPU.Build.0 = Release|Any CPU + {ECA79973-C00F-4FBD-A5A4-3398B132C5EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ECA79973-C00F-4FBD-A5A4-3398B132C5EE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ECA79973-C00F-4FBD-A5A4-3398B132C5EE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ECA79973-C00F-4FBD-A5A4-3398B132C5EE}.Release|Any CPU.Build.0 = Release|Any CPU + {CBA98E95-E860-4C77-BA22-EF2A59D68B33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CBA98E95-E860-4C77-BA22-EF2A59D68B33}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CBA98E95-E860-4C77-BA22-EF2A59D68B33}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CBA98E95-E860-4C77-BA22-EF2A59D68B33}.Release|Any CPU.Build.0 = Release|Any CPU + {5F7F1A7E-99E3-44C1-BC2F-E96D5F05E39E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5F7F1A7E-99E3-44C1-BC2F-E96D5F05E39E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5F7F1A7E-99E3-44C1-BC2F-E96D5F05E39E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5F7F1A7E-99E3-44C1-BC2F-E96D5F05E39E}.Release|Any CPU.Build.0 = Release|Any CPU + {FB0BCBFD-CA54-4D8D-BBAF-48500AE50D89}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FB0BCBFD-CA54-4D8D-BBAF-48500AE50D89}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FB0BCBFD-CA54-4D8D-BBAF-48500AE50D89}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FB0BCBFD-CA54-4D8D-BBAF-48500AE50D89}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -148,9 +180,16 @@ Global {D49BC1CE-AE45-47D1-A662-9F4C0300930D} = {D55A8909-6199-44E5-A5DC-339F3FC2BF2B} {7E4BF22A-B413-40E4-88C9-6579502B17F9} = {D55A8909-6199-44E5-A5DC-339F3FC2BF2B} {96F56B6D-B82D-433A-95CB-A35179529934} = {D55A8909-6199-44E5-A5DC-339F3FC2BF2B} - {12943188-A4E3-44FC-A75E-8228362F2942} = {4DFFE138-A7D8-4B2D-9FA6-B26635D29EFF} {3064B45D-E4A3-47CC-8F7C-1635A647F738} = {4DFFE138-A7D8-4B2D-9FA6-B26635D29EFF} {C57D0E23-18B5-4EAE-8E69-433171C57C01} = {4DFFE138-A7D8-4B2D-9FA6-B26635D29EFF} + {51626848-29B2-4B8D-9C16-CF36096EAEDC} = {6A27AADF-5939-4F52-87CB-DAE472C8B7C5} + {ECA79973-C00F-4FBD-A5A4-3398B132C5EE} = {6A27AADF-5939-4F52-87CB-DAE472C8B7C5} + {6A27AADF-5939-4F52-87CB-DAE472C8B7C5} = {71728FB3-39A3-4C25-AF6D-C7E5DC8E0FEB} + {CBA98E95-E860-4C77-BA22-EF2A59D68B33} = {967C99B7-CBCD-4A8D-B0B7-605723E606C6} + {5F7F1A7E-99E3-44C1-BC2F-E96D5F05E39E} = {967C99B7-CBCD-4A8D-B0B7-605723E606C6} + {967C99B7-CBCD-4A8D-B0B7-605723E606C6} = {71728FB3-39A3-4C25-AF6D-C7E5DC8E0FEB} + {FB0BCBFD-CA54-4D8D-BBAF-48500AE50D89} = {840D8F70-E951-4F75-BEAC-AF70A18CFC1C} + {840D8F70-E951-4F75-BEAC-AF70A18CFC1C} = {71728FB3-39A3-4C25-AF6D-C7E5DC8E0FEB} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {9E1D104F-EEB9-457A-9942-83E43C869D8C} diff --git a/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/src/PACKAGE.md b/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/src/PACKAGE.md index e43c909d83225c..4a4f404102c89a 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/src/PACKAGE.md +++ b/src/libraries/Microsoft.Extensions.Configuration.FileExtensions/src/PACKAGE.md @@ -1,9 +1,19 @@ ## About + + Provides a base class for file-based configuration providers used with [Microsoft.Extensions.Configuration](https://www.nuget.org/packages/Microsoft.Extensions.Configuration/) and extension methods for configuring them. -For more information, see the documentation: +## Additional Documentation + + + +* [Configuration in .NET](https://learn.microsoft.com/dotnet/core/extensions/configuration) +* [Microsoft.Extensions.Configuration.FileConfigurationProvider](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration.fileconfigurationprovider) +* [Microsoft.Extensions.Configuration.FileConfigurationExtensions](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration.fileconfigurationextensions) + +## Feedback & Contributing + + -- [Configuration in .NET](https://learn.microsoft.com/dotnet/core/extensions/configuration) -- [Microsoft.Extensions.Configuration.FileConfigurationProvider](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration.fileconfigurationprovider) -- [Microsoft.Extensions.Configuration.FileConfigurationExtensions](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration.fileconfigurationextensions) +Microsoft.Extensions.Configuration.FileExtensions is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). \ No newline at end of file diff --git a/src/libraries/Microsoft.Extensions.Configuration.Ini/Microsoft.Extensions.Configuration.Ini.sln b/src/libraries/Microsoft.Extensions.Configuration.Ini/Microsoft.Extensions.Configuration.Ini.sln index 532342014a6e62..a4fdf815e173e4 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Ini/Microsoft.Extensions.Configuration.Ini.sln +++ b/src/libraries/Microsoft.Extensions.Configuration.Ini/Microsoft.Extensions.Configuration.Ini.sln @@ -41,12 +41,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primit EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primitives", "..\Microsoft.Extensions.Primitives\src\Microsoft.Extensions.Primitives.csproj", "{3FAB6852-68A1-4317-B972-6B8088AB6DCF}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{A36DD3B7-0BD8-476B-9EE6-9748D6982E35}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{3C6E7802-EA64-4225-A695-583A1D08E3A6}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{5CF9010C-D0A8-4DCA-800C-57F38FC9D159}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{76674EB7-50F1-4581-84CC-5A10056641CC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{4E6BA64D-C5F3-4FFC-810D-E961F66953E8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{CC78BC0E-3C16-44F5-A27D-9AD31E511942}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{2BE466DA-9C38-4246-BB41-ADAA9BB978A3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{D564D0CE-D526-41AB-B6E1-63479CC610A9}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{2D219A1E-5D93-44B4-8BA2-64BA01E1FE93}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{54A3306A-C2A0-4C59-8BC9-B0389E079ADB}" @@ -55,6 +63,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E562A241-425 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{1FEF4F42-130B-4504-A561-17191FE763C3}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{3E16581F-C5C2-4935-BA70-0BE08A878F7B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{143C5C96-A4EE-4897-87A9-704A6CC8F888}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{9FF96548-EF43-40AE-A65B-B544678D8924}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{43D6D492-0108-42A2-9DB3-965DB8D9D5CA}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -145,10 +161,6 @@ Global {3FAB6852-68A1-4317-B972-6B8088AB6DCF}.Debug|Any CPU.Build.0 = Debug|Any CPU {3FAB6852-68A1-4317-B972-6B8088AB6DCF}.Release|Any CPU.ActiveCfg = Release|Any CPU {3FAB6852-68A1-4317-B972-6B8088AB6DCF}.Release|Any CPU.Build.0 = Release|Any CPU - {A36DD3B7-0BD8-476B-9EE6-9748D6982E35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A36DD3B7-0BD8-476B-9EE6-9748D6982E35}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A36DD3B7-0BD8-476B-9EE6-9748D6982E35}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A36DD3B7-0BD8-476B-9EE6-9748D6982E35}.Release|Any CPU.Build.0 = Release|Any CPU {3C6E7802-EA64-4225-A695-583A1D08E3A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3C6E7802-EA64-4225-A695-583A1D08E3A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {3C6E7802-EA64-4225-A695-583A1D08E3A6}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -157,6 +169,26 @@ Global {5CF9010C-D0A8-4DCA-800C-57F38FC9D159}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CF9010C-D0A8-4DCA-800C-57F38FC9D159}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CF9010C-D0A8-4DCA-800C-57F38FC9D159}.Release|Any CPU.Build.0 = Release|Any CPU + {76674EB7-50F1-4581-84CC-5A10056641CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {76674EB7-50F1-4581-84CC-5A10056641CC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {76674EB7-50F1-4581-84CC-5A10056641CC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {76674EB7-50F1-4581-84CC-5A10056641CC}.Release|Any CPU.Build.0 = Release|Any CPU + {4E6BA64D-C5F3-4FFC-810D-E961F66953E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4E6BA64D-C5F3-4FFC-810D-E961F66953E8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4E6BA64D-C5F3-4FFC-810D-E961F66953E8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4E6BA64D-C5F3-4FFC-810D-E961F66953E8}.Release|Any CPU.Build.0 = Release|Any CPU + {CC78BC0E-3C16-44F5-A27D-9AD31E511942}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CC78BC0E-3C16-44F5-A27D-9AD31E511942}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CC78BC0E-3C16-44F5-A27D-9AD31E511942}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CC78BC0E-3C16-44F5-A27D-9AD31E511942}.Release|Any CPU.Build.0 = Release|Any CPU + {2BE466DA-9C38-4246-BB41-ADAA9BB978A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2BE466DA-9C38-4246-BB41-ADAA9BB978A3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2BE466DA-9C38-4246-BB41-ADAA9BB978A3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2BE466DA-9C38-4246-BB41-ADAA9BB978A3}.Release|Any CPU.Build.0 = Release|Any CPU + {D564D0CE-D526-41AB-B6E1-63479CC610A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D564D0CE-D526-41AB-B6E1-63479CC610A9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D564D0CE-D526-41AB-B6E1-63479CC610A9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D564D0CE-D526-41AB-B6E1-63479CC610A9}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -183,9 +215,16 @@ Global {F3FA11C3-612D-4F2B-9A2B-5D3FDCF1C077} = {E562A241-4253-44F8-9E3F-2E03C4058D7B} {3FAB6852-68A1-4317-B972-6B8088AB6DCF} = {E562A241-4253-44F8-9E3F-2E03C4058D7B} {BAFE33FD-877B-4CC8-89CC-467576FC67FA} = {1FEF4F42-130B-4504-A561-17191FE763C3} - {A36DD3B7-0BD8-476B-9EE6-9748D6982E35} = {1FEF4F42-130B-4504-A561-17191FE763C3} {3C6E7802-EA64-4225-A695-583A1D08E3A6} = {1FEF4F42-130B-4504-A561-17191FE763C3} {5CF9010C-D0A8-4DCA-800C-57F38FC9D159} = {1FEF4F42-130B-4504-A561-17191FE763C3} + {76674EB7-50F1-4581-84CC-5A10056641CC} = {3E16581F-C5C2-4935-BA70-0BE08A878F7B} + {4E6BA64D-C5F3-4FFC-810D-E961F66953E8} = {3E16581F-C5C2-4935-BA70-0BE08A878F7B} + {3E16581F-C5C2-4935-BA70-0BE08A878F7B} = {43D6D492-0108-42A2-9DB3-965DB8D9D5CA} + {CC78BC0E-3C16-44F5-A27D-9AD31E511942} = {143C5C96-A4EE-4897-87A9-704A6CC8F888} + {2BE466DA-9C38-4246-BB41-ADAA9BB978A3} = {143C5C96-A4EE-4897-87A9-704A6CC8F888} + {143C5C96-A4EE-4897-87A9-704A6CC8F888} = {43D6D492-0108-42A2-9DB3-965DB8D9D5CA} + {D564D0CE-D526-41AB-B6E1-63479CC610A9} = {9FF96548-EF43-40AE-A65B-B544678D8924} + {9FF96548-EF43-40AE-A65B-B544678D8924} = {43D6D492-0108-42A2-9DB3-965DB8D9D5CA} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {4D8FAA33-E9C8-48FB-ADBF-5AE1D87E9B2C} diff --git a/src/libraries/Microsoft.Extensions.Configuration.Ini/src/PACKAGE.md b/src/libraries/Microsoft.Extensions.Configuration.Ini/src/PACKAGE.md index 7322364392c600..a987b88924d64d 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Ini/src/PACKAGE.md +++ b/src/libraries/Microsoft.Extensions.Configuration.Ini/src/PACKAGE.md @@ -1,13 +1,14 @@ ## About + + INI configuration provider implementation for [Microsoft.Extensions.Configuration](https://www.nuget.org/packages/Microsoft.Extensions.Configuration/). This package enables you to read configuration parameters from [INI files](https://en.wikipedia.org/wiki/INI_file). You can use [IniConfigurationExtensions.AddIniFile](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration.iniconfigurationextensions.addinifile) extension method on `IConfigurationBuilder` to add INI configuration provider to the configuration builder. -For more information, see the documentation: [INI configuration provider](https://learn.microsoft.com/dotnet/core/extensions/configuration-providers#ini-configuration-provider). +## How to Use -## Example -The following example shows how to read the application configuration from INI file. + -```cs +```C# using System; using Microsoft.Extensions.Configuration; @@ -47,3 +48,16 @@ You can include a configuration file using a code like this in your `.csproj` fi ``` + +## Additional Documentation + + + +* [INI configuration provider](https://learn.microsoft.com/dotnet/core/extensions/configuration-providers#ini-configuration-provider) +* [API documentation](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration.ini) + +## Feedback & Contributing + + + +Microsoft.Extensions.Configuration.Ini is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). \ No newline at end of file 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 5e3188a20a45c3..1e2d481a30df3b 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 @@ -73,6 +73,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\Syst EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{A49023C8-173A-4B8F-84B3-2FF37FE8344A}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{85BA5E06-42E3-470B-BC52-44E76AD95416}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{3D8AF2F2-E248-4E46-A4D9-3F6723B80A71}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{1652C69A-7217-4869-A63B-37046DA140AF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{C82D30A0-9EFB-4486-9083-2A4DA147FCA9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{3B645954-DC7E-427C-89B0-AA32825AB393}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{9C37B729-046B-4419-ADAD-18081467884C}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{1F57E720-CBFF-4648-A507-EFCBCECB5FD3}" @@ -81,6 +91,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{1789A282-9C0 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{B4A09B09-2C03-4FC7-B12F-5DD6FC10A5B1}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{4A53588F-1002-42FB-8717-D68E3FF3FBB8}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{BCE093E3-BDD7-42E6-B0D5-D3F8B1F9C642}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{21E6D03C-C9D3-413A-8173-7145A9D677C4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{D65A8E3B-3CD9-4EA7-91AA-697A66E538A9}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -235,6 +253,26 @@ Global {A49023C8-173A-4B8F-84B3-2FF37FE8344A}.Debug|Any CPU.Build.0 = Debug|Any CPU {A49023C8-173A-4B8F-84B3-2FF37FE8344A}.Release|Any CPU.ActiveCfg = Release|Any CPU {A49023C8-173A-4B8F-84B3-2FF37FE8344A}.Release|Any CPU.Build.0 = Release|Any CPU + {85BA5E06-42E3-470B-BC52-44E76AD95416}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85BA5E06-42E3-470B-BC52-44E76AD95416}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85BA5E06-42E3-470B-BC52-44E76AD95416}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85BA5E06-42E3-470B-BC52-44E76AD95416}.Release|Any CPU.Build.0 = Release|Any CPU + {3D8AF2F2-E248-4E46-A4D9-3F6723B80A71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3D8AF2F2-E248-4E46-A4D9-3F6723B80A71}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3D8AF2F2-E248-4E46-A4D9-3F6723B80A71}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3D8AF2F2-E248-4E46-A4D9-3F6723B80A71}.Release|Any CPU.Build.0 = Release|Any CPU + {1652C69A-7217-4869-A63B-37046DA140AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1652C69A-7217-4869-A63B-37046DA140AF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1652C69A-7217-4869-A63B-37046DA140AF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1652C69A-7217-4869-A63B-37046DA140AF}.Release|Any CPU.Build.0 = Release|Any CPU + {C82D30A0-9EFB-4486-9083-2A4DA147FCA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C82D30A0-9EFB-4486-9083-2A4DA147FCA9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C82D30A0-9EFB-4486-9083-2A4DA147FCA9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C82D30A0-9EFB-4486-9083-2A4DA147FCA9}.Release|Any CPU.Build.0 = Release|Any CPU + {3B645954-DC7E-427C-89B0-AA32825AB393}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3B645954-DC7E-427C-89B0-AA32825AB393}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3B645954-DC7E-427C-89B0-AA32825AB393}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3B645954-DC7E-427C-89B0-AA32825AB393}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -277,6 +315,14 @@ Global {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} + {85BA5E06-42E3-470B-BC52-44E76AD95416} = {4A53588F-1002-42FB-8717-D68E3FF3FBB8} + {3D8AF2F2-E248-4E46-A4D9-3F6723B80A71} = {4A53588F-1002-42FB-8717-D68E3FF3FBB8} + {4A53588F-1002-42FB-8717-D68E3FF3FBB8} = {D65A8E3B-3CD9-4EA7-91AA-697A66E538A9} + {1652C69A-7217-4869-A63B-37046DA140AF} = {BCE093E3-BDD7-42E6-B0D5-D3F8B1F9C642} + {C82D30A0-9EFB-4486-9083-2A4DA147FCA9} = {BCE093E3-BDD7-42E6-B0D5-D3F8B1F9C642} + {BCE093E3-BDD7-42E6-B0D5-D3F8B1F9C642} = {D65A8E3B-3CD9-4EA7-91AA-697A66E538A9} + {3B645954-DC7E-427C-89B0-AA32825AB393} = {21E6D03C-C9D3-413A-8173-7145A9D677C4} + {21E6D03C-C9D3-413A-8173-7145A9D677C4} = {D65A8E3B-3CD9-4EA7-91AA-697A66E538A9} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2D9A0B20-A56C-4FBA-805A-DAAA97615597} diff --git a/src/libraries/Microsoft.Extensions.Configuration.Json/src/PACKAGE.md b/src/libraries/Microsoft.Extensions.Configuration.Json/src/PACKAGE.md index ae1c6355100f3a..825b3dbe412d4d 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Json/src/PACKAGE.md +++ b/src/libraries/Microsoft.Extensions.Configuration.Json/src/PACKAGE.md @@ -1,10 +1,13 @@ ## 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: [JSON configuration provider](https://learn.microsoft.com/dotnet/core/extensions/configuration-providers#json-configuration-provider). +## How to Use + + -## Example The following example shows how to read application settings from the JSON configuration file. ```cs @@ -60,3 +63,16 @@ You can include a configuration file using a code like this in your `.csproj` fi ``` + +## Additional Documentation + + + +* [JSON configuration provider](https://learn.microsoft.com/dotnet/core/extensions/configuration-providers#json-configuration-provider) +* [API documentation](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration.json) + +## Feedback & Contributing + + + +Microsoft.Extensions.Configuration.Json is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). \ No newline at end of file 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 c01f0cc3dff1cd..55c7c7e951025b 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 @@ -71,6 +71,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\Syst EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{82700778-D9AD-4B9D-8A1C-CDC1A19E4D54}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{749491A3-83C6-4A6C-A3A7-049896871DDF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{C09A7367-B9D9-42BD-8EF2-538E53F756C7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{3714949E-81E5-4D12-9A8E-8673E2FF519C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{CA5EE848-4F1F-4424-97AE-77B9F399203E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{9EBF3CED-78E6-4DA5-9B23-FC0F91C11770}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{2434A707-1012-4104-81A0-1A1B25D9FEEA}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{9A8D52D9-CDB4-4F59-8014-94BF08B4FAB3}" @@ -79,6 +89,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B5EF5DDD-EB9 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{48CD61B8-2937-4229-8BAB-3F1167B54E61}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{6918E83F-B61D-4E29-9975-B3D3BF1CB91B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{AB733485-D500-4230-9A54-5DD3172AAC19}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{6C72D457-8386-4E1A-B5F7-9083A606BD28}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{1DBD9987-E1DF-4AA6-8909-97C83E7B2BEA}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -229,6 +247,26 @@ Global {82700778-D9AD-4B9D-8A1C-CDC1A19E4D54}.Debug|Any CPU.Build.0 = Debug|Any CPU {82700778-D9AD-4B9D-8A1C-CDC1A19E4D54}.Release|Any CPU.ActiveCfg = Release|Any CPU {82700778-D9AD-4B9D-8A1C-CDC1A19E4D54}.Release|Any CPU.Build.0 = Release|Any CPU + {749491A3-83C6-4A6C-A3A7-049896871DDF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {749491A3-83C6-4A6C-A3A7-049896871DDF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {749491A3-83C6-4A6C-A3A7-049896871DDF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {749491A3-83C6-4A6C-A3A7-049896871DDF}.Release|Any CPU.Build.0 = Release|Any CPU + {C09A7367-B9D9-42BD-8EF2-538E53F756C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C09A7367-B9D9-42BD-8EF2-538E53F756C7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C09A7367-B9D9-42BD-8EF2-538E53F756C7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C09A7367-B9D9-42BD-8EF2-538E53F756C7}.Release|Any CPU.Build.0 = Release|Any CPU + {3714949E-81E5-4D12-9A8E-8673E2FF519C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3714949E-81E5-4D12-9A8E-8673E2FF519C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3714949E-81E5-4D12-9A8E-8673E2FF519C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3714949E-81E5-4D12-9A8E-8673E2FF519C}.Release|Any CPU.Build.0 = Release|Any CPU + {CA5EE848-4F1F-4424-97AE-77B9F399203E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CA5EE848-4F1F-4424-97AE-77B9F399203E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CA5EE848-4F1F-4424-97AE-77B9F399203E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CA5EE848-4F1F-4424-97AE-77B9F399203E}.Release|Any CPU.Build.0 = Release|Any CPU + {9EBF3CED-78E6-4DA5-9B23-FC0F91C11770}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9EBF3CED-78E6-4DA5-9B23-FC0F91C11770}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9EBF3CED-78E6-4DA5-9B23-FC0F91C11770}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9EBF3CED-78E6-4DA5-9B23-FC0F91C11770}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -270,6 +308,14 @@ Global {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} + {749491A3-83C6-4A6C-A3A7-049896871DDF} = {6918E83F-B61D-4E29-9975-B3D3BF1CB91B} + {C09A7367-B9D9-42BD-8EF2-538E53F756C7} = {6918E83F-B61D-4E29-9975-B3D3BF1CB91B} + {6918E83F-B61D-4E29-9975-B3D3BF1CB91B} = {1DBD9987-E1DF-4AA6-8909-97C83E7B2BEA} + {3714949E-81E5-4D12-9A8E-8673E2FF519C} = {AB733485-D500-4230-9A54-5DD3172AAC19} + {CA5EE848-4F1F-4424-97AE-77B9F399203E} = {AB733485-D500-4230-9A54-5DD3172AAC19} + {AB733485-D500-4230-9A54-5DD3172AAC19} = {1DBD9987-E1DF-4AA6-8909-97C83E7B2BEA} + {9EBF3CED-78E6-4DA5-9B23-FC0F91C11770} = {6C72D457-8386-4E1A-B5F7-9083A606BD28} + {6C72D457-8386-4E1A-B5F7-9083A606BD28} = {1DBD9987-E1DF-4AA6-8909-97C83E7B2BEA} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {E7F79175-49DD-42AD-833B-AE64950FE3D2} diff --git a/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/src/PACKAGE.md b/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/src/PACKAGE.md index 4dba7ccd6bbb5d..1fe9ee6c98939e 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/src/PACKAGE.md +++ b/src/libraries/Microsoft.Extensions.Configuration.UserSecrets/src/PACKAGE.md @@ -1,8 +1,19 @@ ## About + + User secrets configuration provider implementation for [Microsoft.Extensions.Configuration](https://www.nuget.org/packages/Microsoft.Extensions.Configuration/). User secrets mechanism enables you to override application configuration settings with values stored in the local secrets file. You can use [UserSecretsConfigurationExtensions.AddUserSecrets](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration.usersecretsconfigurationextensions.addusersecrets) extension method on `IConfigurationBuilder` to add user secrets provider to the configuration builder. -For more information, see the documentation: +## Additional Documentation + + + +* [Configuration in .NET](https://learn.microsoft.com/dotnet/core/extensions/configuration) +* [Safe storage of app secrets in development in ASP.NET Core](https://learn.microsoft.com/aspnet/core/security/app-secrets) +* [API documentation](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration.usersecrets) + +## Feedback & Contributing + + -- [Configuration in .NET](https://learn.microsoft.com/dotnet/core/extensions/configuration) -- [Safe storage of app secrets in development in ASP.NET Core](https://learn.microsoft.com/aspnet/core/security/app-secrets) +Microsoft.Extensions.Configuration.UserSecrets is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). \ No newline at end of file diff --git a/src/libraries/Microsoft.Extensions.Configuration.Xml/Microsoft.Extensions.Configuration.Xml.sln b/src/libraries/Microsoft.Extensions.Configuration.Xml/Microsoft.Extensions.Configuration.Xml.sln index 96c63912e4c618..06a49cc8344c94 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Xml/Microsoft.Extensions.Configuration.Xml.sln +++ b/src/libraries/Microsoft.Extensions.Configuration.Xml/Microsoft.Extensions.Configuration.Xml.sln @@ -65,6 +65,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptograph EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography.Xml", "..\System.Security.Cryptography.Xml\src\System.Security.Cryptography.Xml.csproj", "{8CBDDA63-8388-42AF-934E-7C60832A9B1C}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{59DCA8A0-A480-441D-BC20-6BCDDDA7DBBD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{13FB1F3E-00B9-4A4F-AFB4-5E2D132FB397}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{1B1F4EE6-068A-4B4F-9EC8-115820BDF1C6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{3992766B-9A98-45F2-9B51-C9719ED3A783}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{4C6BFA35-7C99-498A-AE06-F64C23BD894D}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{AC596411-85F4-49FD-8A23-BE2983825CF1}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{AB0BAC3A-1FE6-4649-83DF-DC165669C74F}" @@ -73,6 +83,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{373E0EA7-D9A EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{A3D28D8F-E2E7-4A24-A8E6-12C51D7A55E9}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{E8CBBF0B-CA7F-46F8-BBA7-94520481757B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{F47ADA8B-C91C-44B9-8429-11FFEEA91D4F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{4782A3FC-8BF4-4A88-90D0-81260EA0FAE9}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{5AF32CB5-2C73-4084-AE6D-10ECCB45C857}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -211,6 +229,26 @@ Global {8CBDDA63-8388-42AF-934E-7C60832A9B1C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8CBDDA63-8388-42AF-934E-7C60832A9B1C}.Release|Any CPU.ActiveCfg = Release|Any CPU {8CBDDA63-8388-42AF-934E-7C60832A9B1C}.Release|Any CPU.Build.0 = Release|Any CPU + {59DCA8A0-A480-441D-BC20-6BCDDDA7DBBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {59DCA8A0-A480-441D-BC20-6BCDDDA7DBBD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {59DCA8A0-A480-441D-BC20-6BCDDDA7DBBD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {59DCA8A0-A480-441D-BC20-6BCDDDA7DBBD}.Release|Any CPU.Build.0 = Release|Any CPU + {13FB1F3E-00B9-4A4F-AFB4-5E2D132FB397}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {13FB1F3E-00B9-4A4F-AFB4-5E2D132FB397}.Debug|Any CPU.Build.0 = Debug|Any CPU + {13FB1F3E-00B9-4A4F-AFB4-5E2D132FB397}.Release|Any CPU.ActiveCfg = Release|Any CPU + {13FB1F3E-00B9-4A4F-AFB4-5E2D132FB397}.Release|Any CPU.Build.0 = Release|Any CPU + {1B1F4EE6-068A-4B4F-9EC8-115820BDF1C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1B1F4EE6-068A-4B4F-9EC8-115820BDF1C6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1B1F4EE6-068A-4B4F-9EC8-115820BDF1C6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1B1F4EE6-068A-4B4F-9EC8-115820BDF1C6}.Release|Any CPU.Build.0 = Release|Any CPU + {3992766B-9A98-45F2-9B51-C9719ED3A783}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3992766B-9A98-45F2-9B51-C9719ED3A783}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3992766B-9A98-45F2-9B51-C9719ED3A783}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3992766B-9A98-45F2-9B51-C9719ED3A783}.Release|Any CPU.Build.0 = Release|Any CPU + {4C6BFA35-7C99-498A-AE06-F64C23BD894D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4C6BFA35-7C99-498A-AE06-F64C23BD894D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4C6BFA35-7C99-498A-AE06-F64C23BD894D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4C6BFA35-7C99-498A-AE06-F64C23BD894D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -249,6 +287,14 @@ Global {38A073CB-D9DA-4075-B8A1-57B491AA0CDA} = {A3D28D8F-E2E7-4A24-A8E6-12C51D7A55E9} {03B854C7-609C-4C64-B7EA-266D65E2E548} = {A3D28D8F-E2E7-4A24-A8E6-12C51D7A55E9} {B9613E48-832E-496D-9788-C2304BBEAF1F} = {A3D28D8F-E2E7-4A24-A8E6-12C51D7A55E9} + {59DCA8A0-A480-441D-BC20-6BCDDDA7DBBD} = {E8CBBF0B-CA7F-46F8-BBA7-94520481757B} + {13FB1F3E-00B9-4A4F-AFB4-5E2D132FB397} = {E8CBBF0B-CA7F-46F8-BBA7-94520481757B} + {E8CBBF0B-CA7F-46F8-BBA7-94520481757B} = {5AF32CB5-2C73-4084-AE6D-10ECCB45C857} + {1B1F4EE6-068A-4B4F-9EC8-115820BDF1C6} = {F47ADA8B-C91C-44B9-8429-11FFEEA91D4F} + {3992766B-9A98-45F2-9B51-C9719ED3A783} = {F47ADA8B-C91C-44B9-8429-11FFEEA91D4F} + {F47ADA8B-C91C-44B9-8429-11FFEEA91D4F} = {5AF32CB5-2C73-4084-AE6D-10ECCB45C857} + {4C6BFA35-7C99-498A-AE06-F64C23BD894D} = {4782A3FC-8BF4-4A88-90D0-81260EA0FAE9} + {4782A3FC-8BF4-4A88-90D0-81260EA0FAE9} = {5AF32CB5-2C73-4084-AE6D-10ECCB45C857} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {830494DE-07B3-4C63-9D74-4A123677D469} diff --git a/src/libraries/Microsoft.Extensions.Configuration.Xml/ref/Microsoft.Extensions.Configuration.Xml.csproj b/src/libraries/Microsoft.Extensions.Configuration.Xml/ref/Microsoft.Extensions.Configuration.Xml.csproj index e9f36a80ea65bb..1986c147adf7fc 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Xml/ref/Microsoft.Extensions.Configuration.Xml.csproj +++ b/src/libraries/Microsoft.Extensions.Configuration.Xml/ref/Microsoft.Extensions.Configuration.Xml.csproj @@ -1,4 +1,5 @@ + $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) @@ -8,11 +9,8 @@ - - - - + @@ -21,4 +19,5 @@ + diff --git a/src/libraries/Microsoft.Extensions.Configuration.Xml/src/Microsoft.Extensions.Configuration.Xml.csproj b/src/libraries/Microsoft.Extensions.Configuration.Xml/src/Microsoft.Extensions.Configuration.Xml.csproj index 7cf288a00eb842..c53df5f0c31473 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Xml/src/Microsoft.Extensions.Configuration.Xml.csproj +++ b/src/libraries/Microsoft.Extensions.Configuration.Xml/src/Microsoft.Extensions.Configuration.Xml.csproj @@ -8,21 +8,21 @@ - - - - - + - - + + + + + + diff --git a/src/libraries/Microsoft.Extensions.Configuration.Xml/src/PACKAGE.md b/src/libraries/Microsoft.Extensions.Configuration.Xml/src/PACKAGE.md index d47be06c8dea3b..209645bc5a4732 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Xml/src/PACKAGE.md +++ b/src/libraries/Microsoft.Extensions.Configuration.Xml/src/PACKAGE.md @@ -1,10 +1,13 @@ ## About + + XML configuration provider implementation for [Microsoft.Extensions.Configuration](https://www.nuget.org/packages/Microsoft.Extensions.Configuration/). This package enables you to read configuration parameters from XML files. You can use [XmlConfigurationExtensions.AddXmlFile](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration.xmlconfigurationextensions.addxmlfile) extension method on `IConfigurationBuilder` to add XML configuration provider to the configuration builder. -For more information, see the documentation: [XML configuration provider](https://learn.microsoft.com/dotnet/core/extensions/configuration-providers#xml-configuration-provider). +## How to Use + + -## Example The following example shows how to read the application configuration from XML file. ```cs @@ -59,3 +62,16 @@ You can include a configuration file using a code like this in your `.csproj` fi ``` + +## Additional Documentation + + + +* [XML configuration provider](https://learn.microsoft.com/dotnet/core/extensions/configuration-providers#xml-configuration-provider) +* [API documentation](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration.xml) + +## Feedback & Contributing + + + +Microsoft.Extensions.Configuration.Xml is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). \ No newline at end of file diff --git a/src/libraries/Microsoft.Extensions.Configuration/Microsoft.Extensions.Configuration.sln b/src/libraries/Microsoft.Extensions.Configuration/Microsoft.Extensions.Configuration.sln index 9c83b58427f2fb..38e6d37d1411ce 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/Microsoft.Extensions.Configuration.sln +++ b/src/libraries/Microsoft.Extensions.Configuration/Microsoft.Extensions.Configuration.sln @@ -109,6 +109,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\Syst EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{41234DB5-1F3A-4E4A-8BD9-4A277C249666}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{341F69B0-6597-4F20-8D2A-E458CB15C436}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{220CB513-2766-4120-9CF0-B0A9B9E6F828}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{561FB58C-62B8-4617-848E-F39DE671D480}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{48D993F0-FACF-4960-8C69-16E1AEEC8909}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{9FBD9AB2-8125-45A0-8868-AA5321373BE9}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{CEC96DEF-9D43-4EFC-962B-B4F80EFA5C78}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{DC224BF8-12E5-4992-B750-B12011238C26}" @@ -117,6 +127,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{76107BEB-02C EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{DCF01C23-85A0-4385-B480-D1276ED99A92}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{D82FB13A-8138-4F91-95E9-B7436D57A59F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{DC64E88B-0F70-4178-AFF0-56CFA7089A9F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{8388958F-21BC-4DA2-97CA-931546D3C7A3}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{EA0F327E-6C34-4BAD-8913-5C18E8686405}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -343,6 +361,26 @@ Global {41234DB5-1F3A-4E4A-8BD9-4A277C249666}.Debug|Any CPU.Build.0 = Debug|Any CPU {41234DB5-1F3A-4E4A-8BD9-4A277C249666}.Release|Any CPU.ActiveCfg = Release|Any CPU {41234DB5-1F3A-4E4A-8BD9-4A277C249666}.Release|Any CPU.Build.0 = Release|Any CPU + {341F69B0-6597-4F20-8D2A-E458CB15C436}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {341F69B0-6597-4F20-8D2A-E458CB15C436}.Debug|Any CPU.Build.0 = Debug|Any CPU + {341F69B0-6597-4F20-8D2A-E458CB15C436}.Release|Any CPU.ActiveCfg = Release|Any CPU + {341F69B0-6597-4F20-8D2A-E458CB15C436}.Release|Any CPU.Build.0 = Release|Any CPU + {220CB513-2766-4120-9CF0-B0A9B9E6F828}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {220CB513-2766-4120-9CF0-B0A9B9E6F828}.Debug|Any CPU.Build.0 = Debug|Any CPU + {220CB513-2766-4120-9CF0-B0A9B9E6F828}.Release|Any CPU.ActiveCfg = Release|Any CPU + {220CB513-2766-4120-9CF0-B0A9B9E6F828}.Release|Any CPU.Build.0 = Release|Any CPU + {561FB58C-62B8-4617-848E-F39DE671D480}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {561FB58C-62B8-4617-848E-F39DE671D480}.Debug|Any CPU.Build.0 = Debug|Any CPU + {561FB58C-62B8-4617-848E-F39DE671D480}.Release|Any CPU.ActiveCfg = Release|Any CPU + {561FB58C-62B8-4617-848E-F39DE671D480}.Release|Any CPU.Build.0 = Release|Any CPU + {48D993F0-FACF-4960-8C69-16E1AEEC8909}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {48D993F0-FACF-4960-8C69-16E1AEEC8909}.Debug|Any CPU.Build.0 = Debug|Any CPU + {48D993F0-FACF-4960-8C69-16E1AEEC8909}.Release|Any CPU.ActiveCfg = Release|Any CPU + {48D993F0-FACF-4960-8C69-16E1AEEC8909}.Release|Any CPU.Build.0 = Release|Any CPU + {9FBD9AB2-8125-45A0-8868-AA5321373BE9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9FBD9AB2-8125-45A0-8868-AA5321373BE9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9FBD9AB2-8125-45A0-8868-AA5321373BE9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9FBD9AB2-8125-45A0-8868-AA5321373BE9}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -403,6 +441,14 @@ Global {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} + {341F69B0-6597-4F20-8D2A-E458CB15C436} = {D82FB13A-8138-4F91-95E9-B7436D57A59F} + {220CB513-2766-4120-9CF0-B0A9B9E6F828} = {D82FB13A-8138-4F91-95E9-B7436D57A59F} + {D82FB13A-8138-4F91-95E9-B7436D57A59F} = {EA0F327E-6C34-4BAD-8913-5C18E8686405} + {561FB58C-62B8-4617-848E-F39DE671D480} = {DC64E88B-0F70-4178-AFF0-56CFA7089A9F} + {48D993F0-FACF-4960-8C69-16E1AEEC8909} = {DC64E88B-0F70-4178-AFF0-56CFA7089A9F} + {DC64E88B-0F70-4178-AFF0-56CFA7089A9F} = {EA0F327E-6C34-4BAD-8913-5C18E8686405} + {9FBD9AB2-8125-45A0-8868-AA5321373BE9} = {8388958F-21BC-4DA2-97CA-931546D3C7A3} + {8388958F-21BC-4DA2-97CA-931546D3C7A3} = {EA0F327E-6C34-4BAD-8913-5C18E8686405} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {81EEF2A5-6387-4CC4-B7CD-908EEA4E5C79} diff --git a/src/libraries/Microsoft.Extensions.Configuration/src/PACKAGE.md b/src/libraries/Microsoft.Extensions.Configuration/src/PACKAGE.md index 92e93652f7a609..1d193afbda8667 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/src/PACKAGE.md +++ b/src/libraries/Microsoft.Extensions.Configuration/src/PACKAGE.md @@ -1,8 +1,82 @@ ## About + + `Microsoft.Extensions.Configuration` is combined with a core configuration abstraction under `Microsoft.Extensions.Configuration.Abstractions` that allows for building different kinds of configuration providers to retrieve key/value pair configuration values from in the form of `IConfiguration`. There are a number of built-in configuration provider implementations to read from environment variables, in-memory collections, JSON, INI or XML files. Aside from the built-in variations, there are more shipped libraries shipped by community for integration with various configuration service and other data sources. -For more information, see the documentation: +## Key Features + + + +* In-memory configuration provider +* Chained configuration provider for chaining multiple confiugration providers together. +* Base types that implement configuration abstraction interfaces that can be used when implementing other configuration providers. + +## How to Use + + + +```C# +using Microsoft.Extensions.Configuration; + +var configurationBuilder = new ConfigurationBuilder(); + +configurationBuilder.AddInMemoryCollection( + new Dictionary + { + ["Setting1"] = "value", + ["MyOptions:Enabled"] = bool.TrueString, + }); + +configurationBuilder.AddInMemoryCollection( + new Dictionary + { + ["Setting2"] = "value2", + ["MyOptions:Enabled"] = bool.FalseString, + }); + +var config = configurationBuilder.Build(); + +// note case-insensitive +Console.WriteLine(config["setting1"]); +Console.WriteLine(config["setting2"]); + +// note last in wins +Console.WriteLine(config["MyOptions:Enabled"]); +``` + +## Main Types + + + +The main types provided by this library are: + +* `Microsoft.Extensions.Configuration.ConfigurationBuilder` +* `Microsoft.Extensions.Configuration.ConfigurationManager` +* `Microsoft.Extensions.Configuration.ConfigurationRoot` +* `Microsoft.Extensions.Configuration.ConfigurationSection` + +## Additional Documentation + + - [Configuration in .NET](https://learn.microsoft.com/dotnet/core/extensions/configuration) - [Microsoft.Extensions.Configuration namespace](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration) + +## Related Packages + + +* [Microsoft.Extensions.Configuration.Binder](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.Binder) +* [Microsoft.Extensions.Configuration.CommandLine](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.CommandLine) +* [Microsoft.Extensions.Configuration.EnvironmentVariables](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.EnvironmentVariables) +* [Microsoft.Extensions.Configuration.FileExtensions](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.FileExtensions) +* [Microsoft.Extensions.Configuration.Ini](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.Ini) +* [Microsoft.Extensions.Configuration.Json](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.Json) +* [Microsoft.Extensions.Configuration.UserSecrets](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.UserSecrets) +* [Microsoft.Extensions.Configuration.Xml](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.Xml) + +## Feedback & Contributing + + + +Microsoft.Extensions.Configuration is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). diff --git a/src/libraries/Microsoft.Extensions.Configuration/tests/FunctionalTests/ConfigurationTests.cs b/src/libraries/Microsoft.Extensions.Configuration/tests/FunctionalTests/ConfigurationTests.cs index ced9dd64c3007a..cc5a7df5421417 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/tests/FunctionalTests/ConfigurationTests.cs +++ b/src/libraries/Microsoft.Extensions.Configuration/tests/FunctionalTests/ConfigurationTests.cs @@ -286,6 +286,7 @@ public void LoadAndCombineKeyValuePairsFromDifferentConfigurationProvidersWithAb } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void CanOverrideValuesWithNewConfigurationProvider() { WriteTestFiles(); @@ -940,6 +941,7 @@ await WaitForChange( } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void BindingDoesNotThrowIfReloadedDuringBinding() { WriteTestFiles(); diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/Microsoft.Extensions.DependencyInjection.Abstractions.sln b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/Microsoft.Extensions.DependencyInjection.Abstractions.sln index 27640ece4b3247..9ec285d66437a0 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/Microsoft.Extensions.DependencyInjection.Abstractions.sln +++ b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/Microsoft.Extensions.DependencyInjection.Abstractions.sln @@ -7,18 +7,34 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Depend EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyInjection.Abstractions", "src\Microsoft.Extensions.DependencyInjection.Abstractions.csproj", "{D1AEAA98-0D46-4E23-8644-6BD5EBCE32AF}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{A74051F2-F34C-4228-84B2-6E3D8A2D9F26}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{DAC5CD72-8A72-40C3-BD9D-703B7CB6FE04}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{B7469EEF-415C-485B-9FEC-3D9640400A7B}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{C1EC51FB-C819-4CC5-9600-42CCE195DE78}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{A3FEEE13-7E52-4C07-B34E-2E038FC8D401}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{208A6B66-AE7A-4F3B-952F-15DBD4082B09}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{0DE02827-B5FA-44D2-8734-BF35C64DCBA5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{8DE4021B-2C3E-4DB2-A33A-A26FBF527118}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{C494A755-24D9-4E80-AEC3-CF8FEBAFCAC6}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{09E0C315-2A88-4F30-93DA-E22625BF82AB}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{BF723277-314D-45F4-B29A-6A8683860A93}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{83FB9805-C27B-4039-A30D-7010422CCDCE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{AFDBFE98-A0B4-438E-80CA-76EF08ED147C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{C3153DA2-4E6B-4C20-BE3E-52EBFB82A7E4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{D0ECC80D-6923-404D-AF6E-852A7D7CCE0A}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -41,10 +57,6 @@ Global {D1AEAA98-0D46-4E23-8644-6BD5EBCE32AF}.Debug|Any CPU.Build.0 = Debug|Any CPU {D1AEAA98-0D46-4E23-8644-6BD5EBCE32AF}.Release|Any CPU.ActiveCfg = Release|Any CPU {D1AEAA98-0D46-4E23-8644-6BD5EBCE32AF}.Release|Any CPU.Build.0 = Release|Any CPU - {A74051F2-F34C-4228-84B2-6E3D8A2D9F26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A74051F2-F34C-4228-84B2-6E3D8A2D9F26}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A74051F2-F34C-4228-84B2-6E3D8A2D9F26}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A74051F2-F34C-4228-84B2-6E3D8A2D9F26}.Release|Any CPU.Build.0 = Release|Any CPU {DAC5CD72-8A72-40C3-BD9D-703B7CB6FE04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DAC5CD72-8A72-40C3-BD9D-703B7CB6FE04}.Debug|Any CPU.Build.0 = Debug|Any CPU {DAC5CD72-8A72-40C3-BD9D-703B7CB6FE04}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -53,6 +65,26 @@ Global {B7469EEF-415C-485B-9FEC-3D9640400A7B}.Debug|Any CPU.Build.0 = Debug|Any CPU {B7469EEF-415C-485B-9FEC-3D9640400A7B}.Release|Any CPU.ActiveCfg = Release|Any CPU {B7469EEF-415C-485B-9FEC-3D9640400A7B}.Release|Any CPU.Build.0 = Release|Any CPU + {C1EC51FB-C819-4CC5-9600-42CCE195DE78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C1EC51FB-C819-4CC5-9600-42CCE195DE78}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C1EC51FB-C819-4CC5-9600-42CCE195DE78}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C1EC51FB-C819-4CC5-9600-42CCE195DE78}.Release|Any CPU.Build.0 = Release|Any CPU + {A3FEEE13-7E52-4C07-B34E-2E038FC8D401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A3FEEE13-7E52-4C07-B34E-2E038FC8D401}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A3FEEE13-7E52-4C07-B34E-2E038FC8D401}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A3FEEE13-7E52-4C07-B34E-2E038FC8D401}.Release|Any CPU.Build.0 = Release|Any CPU + {208A6B66-AE7A-4F3B-952F-15DBD4082B09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {208A6B66-AE7A-4F3B-952F-15DBD4082B09}.Debug|Any CPU.Build.0 = Debug|Any CPU + {208A6B66-AE7A-4F3B-952F-15DBD4082B09}.Release|Any CPU.ActiveCfg = Release|Any CPU + {208A6B66-AE7A-4F3B-952F-15DBD4082B09}.Release|Any CPU.Build.0 = Release|Any CPU + {0DE02827-B5FA-44D2-8734-BF35C64DCBA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0DE02827-B5FA-44D2-8734-BF35C64DCBA5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0DE02827-B5FA-44D2-8734-BF35C64DCBA5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0DE02827-B5FA-44D2-8734-BF35C64DCBA5}.Release|Any CPU.Build.0 = Release|Any CPU + {8DE4021B-2C3E-4DB2-A33A-A26FBF527118}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8DE4021B-2C3E-4DB2-A33A-A26FBF527118}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8DE4021B-2C3E-4DB2-A33A-A26FBF527118}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8DE4021B-2C3E-4DB2-A33A-A26FBF527118}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -62,9 +94,16 @@ Global {B8B63EFF-64D9-49AB-ACE9-6182DADC7574} = {C494A755-24D9-4E80-AEC3-CF8FEBAFCAC6} {F170EDB3-E92B-456A-8749-F3ACE3471510} = {09E0C315-2A88-4F30-93DA-E22625BF82AB} {D1AEAA98-0D46-4E23-8644-6BD5EBCE32AF} = {09E0C315-2A88-4F30-93DA-E22625BF82AB} - {A74051F2-F34C-4228-84B2-6E3D8A2D9F26} = {BF723277-314D-45F4-B29A-6A8683860A93} {DAC5CD72-8A72-40C3-BD9D-703B7CB6FE04} = {BF723277-314D-45F4-B29A-6A8683860A93} {B7469EEF-415C-485B-9FEC-3D9640400A7B} = {BF723277-314D-45F4-B29A-6A8683860A93} + {C1EC51FB-C819-4CC5-9600-42CCE195DE78} = {83FB9805-C27B-4039-A30D-7010422CCDCE} + {A3FEEE13-7E52-4C07-B34E-2E038FC8D401} = {83FB9805-C27B-4039-A30D-7010422CCDCE} + {83FB9805-C27B-4039-A30D-7010422CCDCE} = {D0ECC80D-6923-404D-AF6E-852A7D7CCE0A} + {208A6B66-AE7A-4F3B-952F-15DBD4082B09} = {AFDBFE98-A0B4-438E-80CA-76EF08ED147C} + {0DE02827-B5FA-44D2-8734-BF35C64DCBA5} = {AFDBFE98-A0B4-438E-80CA-76EF08ED147C} + {AFDBFE98-A0B4-438E-80CA-76EF08ED147C} = {D0ECC80D-6923-404D-AF6E-852A7D7CCE0A} + {8DE4021B-2C3E-4DB2-A33A-A26FBF527118} = {C3153DA2-4E6B-4C20-BE3E-52EBFB82A7E4} + {C3153DA2-4E6B-4C20-BE3E-52EBFB82A7E4} = {D0ECC80D-6923-404D-AF6E-852A7D7CCE0A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {BD3A79CE-CF84-4543-99E4-D39D56E8DAEF} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/ref/Microsoft.Extensions.DependencyInjection.Abstractions.csproj b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/ref/Microsoft.Extensions.DependencyInjection.Abstractions.csproj index 9176b6cfb17f5c..522ab3503c7a1b 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/ref/Microsoft.Extensions.DependencyInjection.Abstractions.csproj +++ b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/ref/Microsoft.Extensions.DependencyInjection.Abstractions.csproj @@ -1,4 +1,5 @@ + $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.1;netstandard2.0;$(NetFrameworkMinimum) @@ -10,9 +11,6 @@ - - - @@ -20,4 +18,5 @@ + diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ActivatorUtilities.cs b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ActivatorUtilities.cs index eb7931489b557e..3ba30724d97f2b 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ActivatorUtilities.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ActivatorUtilities.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections.Concurrent; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Linq.Expressions; @@ -10,6 +11,10 @@ using System.Runtime.ExceptionServices; using Microsoft.Extensions.Internal; +#if NETCOREAPP +[assembly: System.Reflection.Metadata.MetadataUpdateHandler(typeof(Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ActivatorUtilitiesUpdateHandler))] +#endif + namespace Microsoft.Extensions.DependencyInjection { /// @@ -17,13 +22,21 @@ namespace Microsoft.Extensions.DependencyInjection /// public static class ActivatorUtilities { +#if NETCOREAPP + // Support caching of constructor metadata for the common case of types in non-collectible assemblies. + private static readonly ConcurrentDictionary s_constructorInfos = new(); + + // Support caching of constructor metadata for types in collectible assemblies. + private static readonly Lazy> s_collectibleConstructorInfos = new(); +#endif + #if NET8_0_OR_GREATER // Maximum number of fixed arguments for ConstructorInvoker.Invoke(arg1, etc). private const int FixedArgumentThreshold = 4; #endif private static readonly MethodInfo GetServiceInfo = - GetMethodInfo>((sp, t, r, c) => GetService(sp, t, r, c)); + GetMethodInfo>((sp, t, r, c, k) => GetService(sp, t, r, c, k)); /// /// Instantiate a type with constructor arguments provided directly and/or from an . @@ -47,6 +60,17 @@ public static object CreateInstance( throw new InvalidOperationException(SR.CannotCreateAbstractClasses); } + ConstructorInfoEx[]? constructors; +#if NETCOREAPP + if (!s_constructorInfos.TryGetValue(instanceType, out constructors)) + { + constructors = GetOrAddConstructors(instanceType); + } +#else + constructors = CreateConstructorInfoExs(instanceType); +#endif + + ConstructorInfoEx? constructor; IServiceProviderIsService? serviceProviderIsService = provider.GetService(); // if container supports using IServiceProviderIsService, we try to find the longest ctor that // (a) matches all parameters given to CreateInstance @@ -61,10 +85,11 @@ public static object CreateInstance( ConstructorMatcher bestMatcher = default; bool multipleBestLengthFound = false; - foreach (ConstructorInfo? constructor in instanceType.GetConstructors()) + for (int i = 0; i < constructors.Length; i++) { - var matcher = new ConstructorMatcher(constructor); - bool isPreferred = constructor.IsDefined(typeof(ActivatorUtilitiesConstructorAttribute), false); + constructor = constructors[i]; + ConstructorMatcher matcher = new(constructor); + bool isPreferred = constructor.IsPreferred; int length = matcher.Match(parameters, serviceProviderIsService); if (isPreferred) @@ -105,18 +130,79 @@ public static object CreateInstance( } } - Type?[] argumentTypes = new Type[parameters.Length]; - for (int i = 0; i < argumentTypes.Length; i++) + Type?[] argumentTypes; + if (parameters.Length == 0) { - argumentTypes[i] = parameters[i]?.GetType(); + argumentTypes = Type.EmptyTypes; + } + else + { + argumentTypes = new Type[parameters.Length]; + for (int i = 0; i < argumentTypes.Length; i++) + { + argumentTypes[i] = parameters[i]?.GetType(); + } } FindApplicableConstructor(instanceType, argumentTypes, out ConstructorInfo constructorInfo, out int?[] parameterMap); - var constructorMatcher = new ConstructorMatcher(constructorInfo); + + // Find the ConstructorInfoEx from the given constructorInfo. + constructor = null; + foreach (ConstructorInfoEx ctor in constructors) + { + if (ReferenceEquals(ctor.Info, constructorInfo)) + { + constructor = ctor; + break; + } + } + + Debug.Assert(constructor != null); + + var constructorMatcher = new ConstructorMatcher(constructor); constructorMatcher.MapParameters(parameterMap, parameters); return constructorMatcher.CreateInstance(provider); } +#if NETCOREAPP + private static ConstructorInfoEx[] GetOrAddConstructors( + [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type type) + { + // Not found. Do the slower work of checking for the value in the correct cache. + // Null and non-collectible load contexts use the default cache. + if (!type.Assembly.IsCollectible) + { + return s_constructorInfos.GetOrAdd(type, CreateConstructorInfoExs(type)); + } + + // Collectible load contexts should use the ConditionalWeakTable so they can be unloaded. + if (s_collectibleConstructorInfos.Value.TryGetValue(type, out ConstructorInfoEx[]? value)) + { + return value; + } + + value = CreateConstructorInfoExs(type); + + // ConditionalWeakTable doesn't support GetOrAdd() so use AddOrUpdate(). This means threads + // can have different instances for the same type, but that is OK since they are equivalent. + s_collectibleConstructorInfos.Value.AddOrUpdate(type, value); + return value; + } +#endif // NETCOREAPP + + private static ConstructorInfoEx[] CreateConstructorInfoExs( + [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type type) + { + ConstructorInfo[] constructors = type.GetConstructors(); + ConstructorInfoEx[]? value = new ConstructorInfoEx[constructors.Length]; + for (int i = 0; i < constructors.Length; i++) + { + value[i] = new ConstructorInfoEx(constructors[i]); + } + + return value; + } + /// /// Create a delegate that will instantiate a type with constructor arguments provided directly /// and/or from an . @@ -238,9 +324,9 @@ private static MethodInfo GetMethodInfo(Expression expr) return mc.Method; } - private static object? GetService(IServiceProvider sp, Type type, Type requiredBy, bool hasDefaultValue) + private static object? GetService(IServiceProvider sp, Type type, Type requiredBy, bool hasDefaultValue, object? key) { - object? service = sp.GetService(type); + object? service = key == null ? sp.GetService(type) : GetKeyedService(sp, type, key); if (service is null && !hasDefaultValue) { ThrowHelperUnableToResolveService(type, requiredBy); @@ -275,10 +361,12 @@ private static BlockExpression BuildFactoryExpression( } else { + var keyAttribute = (FromKeyedServicesAttribute?) Attribute.GetCustomAttribute(constructorParameter, typeof(FromKeyedServicesAttribute), inherit: false); var parameterTypeExpression = new Expression[] { serviceProvider, Expression.Constant(parameterType, typeof(Type)), Expression.Constant(constructor.DeclaringType, typeof(Type)), - Expression.Constant(hasDefaultValue) }; + Expression.Constant(hasDefaultValue), + Expression.Constant(keyAttribute?.Key) }; constructorArguments[i] = Expression.Call(GetServiceInfo, parameterTypeExpression); } @@ -349,10 +437,10 @@ private static ObjectFactory CreateFactoryReflection( if (matchedArgCount == 0) { // All injected; use a fast path. - Type[] types = GetParameterTypes(); + FactoryParameterContext[] parameters = GetFactoryParameterContext(); return useFixedValues ? - (serviceProvider, arguments) => ReflectionFactoryServiceOnlyFixed(invoker, types, declaringType, serviceProvider) : - (serviceProvider, arguments) => ReflectionFactoryServiceOnlySpan(invoker, types, declaringType, serviceProvider); + (serviceProvider, arguments) => ReflectionFactoryServiceOnlyFixed(invoker, parameters, declaringType, serviceProvider) : + (serviceProvider, arguments) => ReflectionFactoryServiceOnlySpan(invoker, parameters, declaringType, serviceProvider); } if (matchedArgCount == constructorParameters.Length) @@ -370,16 +458,6 @@ ObjectFactory InvokeCanonical() (serviceProvider, arguments) => ReflectionFactoryCanonicalFixed(invoker, parameters, declaringType, serviceProvider, arguments) : (serviceProvider, arguments) => ReflectionFactoryCanonicalSpan(invoker, parameters, declaringType, serviceProvider, arguments); } - - Type[] GetParameterTypes() - { - Type[] types = new Type[constructorParameters.Length]; - for (int i = 0; i < constructorParameters.Length; i++) - { - types[i] = constructorParameters[i].ParameterType; - } - return types; - } #else ParameterInfo[] constructorParameters = constructor.GetParameters(); if (constructorParameters.Length == 0) @@ -398,8 +476,15 @@ FactoryParameterContext[] GetFactoryParameterContext() for (int i = 0; i < constructorParameters.Length; i++) { ParameterInfo constructorParameter = constructorParameters[i]; + FromKeyedServicesAttribute? attr = (FromKeyedServicesAttribute?) + Attribute.GetCustomAttribute(constructorParameter, typeof(FromKeyedServicesAttribute), inherit: false); bool hasDefaultValue = ParameterDefaultValue.TryGetDefaultValue(constructorParameter, out object? defaultValue); - parameters[i] = new FactoryParameterContext(constructorParameter.ParameterType, hasDefaultValue, defaultValue, parameterMap[i] ?? -1); + parameters[i] = new FactoryParameterContext( + constructorParameter.ParameterType, + hasDefaultValue, + defaultValue, + parameterMap[i] ?? -1, + attr?.Key); } return parameters; @@ -409,18 +494,20 @@ FactoryParameterContext[] GetFactoryParameterContext() private readonly struct FactoryParameterContext { - public FactoryParameterContext(Type parameterType, bool hasDefaultValue, object? defaultValue, int argumentIndex) + public FactoryParameterContext(Type parameterType, bool hasDefaultValue, object? defaultValue, int argumentIndex, object? serviceKey) { ParameterType = parameterType; HasDefaultValue = hasDefaultValue; DefaultValue = defaultValue; ArgumentIndex = argumentIndex; + ServiceKey = serviceKey; } public Type ParameterType { get; } public bool HasDefaultValue { get; } public object? DefaultValue { get; } public int ArgumentIndex { get; } + public object? ServiceKey { get; } } private static void FindApplicableConstructor( @@ -551,58 +638,82 @@ private static bool TryCreateParameterMap(ParameterInfo[] constructorParameters, return true; } - private static object? GetService(IServiceProvider serviceProvider, ParameterInfo parameterInfo) + private sealed class ConstructorInfoEx { - // Handle keyed service - if (TryGetServiceKey(parameterInfo, out object? key)) + public readonly ConstructorInfo Info; + public readonly ParameterInfo[] Parameters; + public readonly bool IsPreferred; + private readonly object?[]? _parameterKeys; + + public ConstructorInfoEx(ConstructorInfo constructor) { - if (serviceProvider is IKeyedServiceProvider keyedServiceProvider) + Info = constructor; + Parameters = constructor.GetParameters(); + IsPreferred = constructor.IsDefined(typeof(ActivatorUtilitiesConstructorAttribute), inherit: false); + + for (int i = 0; i < Parameters.Length; i++) { - return keyedServiceProvider.GetKeyedService(parameterInfo.ParameterType, key); + FromKeyedServicesAttribute? attr = (FromKeyedServicesAttribute?) + Attribute.GetCustomAttribute(Parameters[i], typeof(FromKeyedServicesAttribute), inherit: false); + + if (attr is not null) + { + _parameterKeys ??= new object?[Parameters.Length]; + _parameterKeys[i] = attr.Key; + } } - throw new InvalidOperationException(SR.KeyedServicesNotSupported); } - // Try non keyed service - return serviceProvider.GetService(parameterInfo.ParameterType); - } - private static bool IsService(IServiceProviderIsService serviceProviderIsService, ParameterInfo parameterInfo) - { - // Handle keyed service - if (TryGetServiceKey(parameterInfo, out object? key)) + public bool IsService(IServiceProviderIsService serviceProviderIsService, int parameterIndex) { - if (serviceProviderIsService is IServiceProviderIsKeyedService serviceProviderIsKeyedService) + ParameterInfo parameterInfo = Parameters[parameterIndex]; + + // Handle keyed service + object? key = _parameterKeys?[parameterIndex]; + if (key is not null) { - return serviceProviderIsKeyedService.IsKeyedService(parameterInfo.ParameterType, key); + if (serviceProviderIsService is IServiceProviderIsKeyedService serviceProviderIsKeyedService) + { + return serviceProviderIsKeyedService.IsKeyedService(parameterInfo.ParameterType, key); + } + + throw new InvalidOperationException(SR.KeyedServicesNotSupported); } - throw new InvalidOperationException(SR.KeyedServicesNotSupported); + + // Use non-keyed service + return serviceProviderIsService.IsService(parameterInfo.ParameterType); } - // Try non keyed service - return serviceProviderIsService.IsService(parameterInfo.ParameterType); - } - private static bool TryGetServiceKey(ParameterInfo parameterInfo, out object? key) - { - foreach (var attribute in parameterInfo.GetCustomAttributes(false)) + public object? GetService(IServiceProvider serviceProvider, int parameterIndex) { - key = attribute.Key; - return true; + ParameterInfo parameterInfo = Parameters[parameterIndex]; + + // Handle keyed service + object? key = _parameterKeys?[parameterIndex]; + if (key is not null) + { + if (serviceProvider is IKeyedServiceProvider keyedServiceProvider) + { + return keyedServiceProvider.GetKeyedService(parameterInfo.ParameterType, key); + } + + throw new InvalidOperationException(SR.KeyedServicesNotSupported); + } + + // Use non-keyed service + return serviceProvider.GetService(parameterInfo.ParameterType); } - key = null; - return false; } private readonly struct ConstructorMatcher { - private readonly ConstructorInfo _constructor; - private readonly ParameterInfo[] _parameters; + private readonly ConstructorInfoEx _constructor; private readonly object?[] _parameterValues; - public ConstructorMatcher(ConstructorInfo constructor) + public ConstructorMatcher(ConstructorInfoEx constructor) { _constructor = constructor; - _parameters = _constructor.GetParameters(); - _parameterValues = new object?[_parameters.Length]; + _parameterValues = new object[constructor.Parameters.Length]; } public int Match(object[] givenParameters, IServiceProviderIsService serviceProviderIsService) @@ -612,10 +723,10 @@ public int Match(object[] givenParameters, IServiceProviderIsService serviceProv Type? givenType = givenParameters[givenIndex]?.GetType(); bool givenMatched = false; - for (int applyIndex = 0; applyIndex < _parameters.Length; applyIndex++) + for (int applyIndex = 0; applyIndex < _constructor.Parameters.Length; applyIndex++) { if (_parameterValues[applyIndex] == null && - _parameters[applyIndex].ParameterType.IsAssignableFrom(givenType)) + _constructor.Parameters[applyIndex].ParameterType.IsAssignableFrom(givenType)) { givenMatched = true; _parameterValues[applyIndex] = givenParameters[givenIndex]; @@ -630,12 +741,12 @@ public int Match(object[] givenParameters, IServiceProviderIsService serviceProv } // confirms the rest of ctor arguments match either as a parameter with a default value or as a service registered - for (int i = 0; i < _parameters.Length; i++) + for (int i = 0; i < _constructor.Parameters.Length; i++) { if (_parameterValues[i] == null && - !IsService(serviceProviderIsService, _parameters[i])) + !_constructor.IsService(serviceProviderIsService, i)) { - if (ParameterDefaultValue.TryGetDefaultValue(_parameters[i], out object? defaultValue)) + if (ParameterDefaultValue.TryGetDefaultValue(_constructor.Parameters[i], out object? defaultValue)) { _parameterValues[i] = defaultValue; } @@ -646,21 +757,21 @@ public int Match(object[] givenParameters, IServiceProviderIsService serviceProv } } - return _parameters.Length; + return _constructor.Parameters.Length; } public object CreateInstance(IServiceProvider provider) { - for (int index = 0; index < _parameters.Length; index++) + for (int index = 0; index < _constructor.Parameters.Length; index++) { if (_parameterValues[index] == null) { - object? value = GetService(provider, _parameters[index]); + object? value = _constructor.GetService(provider, index); if (value == null) { - if (!ParameterDefaultValue.TryGetDefaultValue(_parameters[index], out object? defaultValue)) + if (!ParameterDefaultValue.TryGetDefaultValue(_constructor.Parameters[index], out object? defaultValue)) { - throw new InvalidOperationException(SR.Format(SR.UnableToResolveService, _parameters[index].ParameterType, _constructor.DeclaringType)); + throw new InvalidOperationException(SR.Format(SR.UnableToResolveService, _constructor.Parameters[index].ParameterType, _constructor.Info.DeclaringType)); } else { @@ -677,7 +788,7 @@ public object CreateInstance(IServiceProvider provider) #if NETFRAMEWORK || NETSTANDARD2_0 try { - return _constructor.Invoke(_parameterValues); + return _constructor.Info.Invoke(_parameterValues); } catch (TargetInvocationException ex) when (ex.InnerException != null) { @@ -686,13 +797,13 @@ public object CreateInstance(IServiceProvider provider) throw; } #else - return _constructor.Invoke(BindingFlags.DoNotWrapExceptions, binder: null, parameters: _parameterValues, culture: null); + return _constructor.Info.Invoke(BindingFlags.DoNotWrapExceptions, binder: null, parameters: _parameterValues, culture: null); #endif } public void MapParameters(int?[] parameterMap, object[] givenParameters) { - for (int i = 0; i < _parameters.Length; i++) + for (int i = 0; i < _constructor.Parameters.Length; i++) { if (parameterMap[i] != null) { @@ -715,39 +826,39 @@ private static void ThrowMarkedCtorDoesNotTakeAllProvidedArguments() #if NET8_0_OR_GREATER // Use the faster ConstructorInvoker which also has alloc-free APIs when <= 4 parameters. private static object ReflectionFactoryServiceOnlyFixed( ConstructorInvoker invoker, - Type[] parameterTypes, + FactoryParameterContext[] parameters, Type declaringType, IServiceProvider serviceProvider) { - Debug.Assert(parameterTypes.Length >= 1 && parameterTypes.Length <= FixedArgumentThreshold); + Debug.Assert(parameters.Length >= 1 && parameters.Length <= FixedArgumentThreshold); Debug.Assert(FixedArgumentThreshold == 4); if (serviceProvider is null) ThrowHelperArgumentNullExceptionServiceProvider(); - switch (parameterTypes.Length) + switch (parameters.Length) { case 1: return invoker.Invoke( - GetService(serviceProvider, parameterTypes[0], declaringType, false)); + GetService(serviceProvider, parameters[0].ParameterType, declaringType, false, parameters[0].ServiceKey)); case 2: return invoker.Invoke( - GetService(serviceProvider, parameterTypes[0], declaringType, false), - GetService(serviceProvider, parameterTypes[1], declaringType, false)); + GetService(serviceProvider, parameters[0].ParameterType, declaringType, false, parameters[0].ServiceKey), + GetService(serviceProvider, parameters[1].ParameterType, declaringType, false, parameters[1].ServiceKey)); case 3: return invoker.Invoke( - GetService(serviceProvider, parameterTypes[0], declaringType, false), - GetService(serviceProvider, parameterTypes[1], declaringType, false), - GetService(serviceProvider, parameterTypes[2], declaringType, false)); + GetService(serviceProvider, parameters[0].ParameterType, declaringType, false, parameters[0].ServiceKey), + GetService(serviceProvider, parameters[1].ParameterType, declaringType, false, parameters[1].ServiceKey), + GetService(serviceProvider, parameters[2].ParameterType, declaringType, false, parameters[2].ServiceKey)); case 4: return invoker.Invoke( - GetService(serviceProvider, parameterTypes[0], declaringType, false), - GetService(serviceProvider, parameterTypes[1], declaringType, false), - GetService(serviceProvider, parameterTypes[2], declaringType, false), - GetService(serviceProvider, parameterTypes[3], declaringType, false)); + GetService(serviceProvider, parameters[0].ParameterType, declaringType, false, parameters[0].ServiceKey), + GetService(serviceProvider, parameters[1].ParameterType, declaringType, false, parameters[1].ServiceKey), + GetService(serviceProvider, parameters[2].ParameterType, declaringType, false, parameters[2].ServiceKey), + GetService(serviceProvider, parameters[3].ParameterType, declaringType, false, parameters[3].ServiceKey)); } return null!; @@ -755,17 +866,17 @@ private static object ReflectionFactoryServiceOnlyFixed( private static object ReflectionFactoryServiceOnlySpan( ConstructorInvoker invoker, - Type[] parameterTypes, + FactoryParameterContext[] parameters, Type declaringType, IServiceProvider serviceProvider) { if (serviceProvider is null) ThrowHelperArgumentNullExceptionServiceProvider(); - object?[] arguments = new object?[parameterTypes.Length]; - for (int i = 0; i < parameterTypes.Length; i++) + object?[] arguments = new object?[parameters.Length]; + for (int i = 0; i < parameters.Length; i++) { - arguments[i] = GetService(serviceProvider, parameterTypes[i], declaringType, false); + arguments[i] = GetService(serviceProvider, parameters[i].ParameterType, declaringType, false, parameters[i].ServiceKey); } return invoker.Invoke(arguments.AsSpan()); @@ -797,7 +908,8 @@ private static object ReflectionFactoryCanonicalFixed( serviceProvider, parameter1.ParameterType, declaringType, - parameter1.HasDefaultValue)) ?? parameter1.DefaultValue); + parameter1.HasDefaultValue, + parameter1.ServiceKey)) ?? parameter1.DefaultValue); case 2: { ref FactoryParameterContext parameter2 = ref parameters[1]; @@ -810,7 +922,8 @@ private static object ReflectionFactoryCanonicalFixed( serviceProvider, parameter1.ParameterType, declaringType, - parameter1.HasDefaultValue)) ?? parameter1.DefaultValue, + parameter1.HasDefaultValue, + parameter1.ServiceKey)) ?? parameter1.DefaultValue, ((parameter2.ArgumentIndex != -1) // Throws a NullReferenceException if arguments is null. Consistent with expression-based factory. ? arguments![parameter2.ArgumentIndex] @@ -818,7 +931,8 @@ private static object ReflectionFactoryCanonicalFixed( serviceProvider, parameter2.ParameterType, declaringType, - parameter2.HasDefaultValue)) ?? parameter2.DefaultValue); + parameter2.HasDefaultValue, + parameter2.ServiceKey)) ?? parameter2.DefaultValue); } case 3: { @@ -833,7 +947,8 @@ private static object ReflectionFactoryCanonicalFixed( serviceProvider, parameter1.ParameterType, declaringType, - parameter1.HasDefaultValue)) ?? parameter1.DefaultValue, + parameter1.HasDefaultValue, + parameter1.ServiceKey)) ?? parameter1.DefaultValue, ((parameter2.ArgumentIndex != -1) // Throws a NullReferenceException if arguments is null. Consistent with expression-based factory. ? arguments![parameter2.ArgumentIndex] @@ -841,7 +956,8 @@ private static object ReflectionFactoryCanonicalFixed( serviceProvider, parameter2.ParameterType, declaringType, - parameter2.HasDefaultValue)) ?? parameter2.DefaultValue, + parameter2.HasDefaultValue, + parameter2.ServiceKey)) ?? parameter2.DefaultValue, ((parameter3.ArgumentIndex != -1) // Throws a NullReferenceException if arguments is null. Consistent with expression-based factory. ? arguments![parameter3.ArgumentIndex] @@ -849,7 +965,8 @@ private static object ReflectionFactoryCanonicalFixed( serviceProvider, parameter3.ParameterType, declaringType, - parameter3.HasDefaultValue)) ?? parameter3.DefaultValue); + parameter3.HasDefaultValue, + parameter3.ServiceKey)) ?? parameter3.DefaultValue); } case 4: { @@ -865,7 +982,8 @@ private static object ReflectionFactoryCanonicalFixed( serviceProvider, parameter1.ParameterType, declaringType, - parameter1.HasDefaultValue)) ?? parameter1.DefaultValue, + parameter1.HasDefaultValue, + parameter1.ServiceKey)) ?? parameter1.DefaultValue, ((parameter2.ArgumentIndex != -1) // Throws a NullReferenceException if arguments is null. Consistent with expression-based factory. ? arguments![parameter2.ArgumentIndex] @@ -873,7 +991,8 @@ private static object ReflectionFactoryCanonicalFixed( serviceProvider, parameter2.ParameterType, declaringType, - parameter2.HasDefaultValue)) ?? parameter2.DefaultValue, + parameter2.HasDefaultValue, + parameter2.ServiceKey)) ?? parameter2.DefaultValue, ((parameter3.ArgumentIndex != -1) // Throws a NullReferenceException if arguments is null. Consistent with expression-based factory. ? arguments![parameter3.ArgumentIndex] @@ -881,7 +1000,8 @@ private static object ReflectionFactoryCanonicalFixed( serviceProvider, parameter3.ParameterType, declaringType, - parameter3.HasDefaultValue)) ?? parameter3.DefaultValue, + parameter3.HasDefaultValue, + parameter3.ServiceKey)) ?? parameter3.DefaultValue, ((parameter4.ArgumentIndex != -1) // Throws a NullReferenceException if arguments is null. Consistent with expression-based factory. ? arguments![parameter4.ArgumentIndex] @@ -889,7 +1009,8 @@ private static object ReflectionFactoryCanonicalFixed( serviceProvider, parameter4.ParameterType, declaringType, - parameter4.HasDefaultValue)) ?? parameter4.DefaultValue); + parameter4.HasDefaultValue, + parameter4.ServiceKey)) ?? parameter4.DefaultValue); } } @@ -918,7 +1039,8 @@ private static object ReflectionFactoryCanonicalSpan( serviceProvider, parameter.ParameterType, declaringType, - parameter.HasDefaultValue)) ?? parameter.DefaultValue; + parameter.HasDefaultValue, + parameter.ServiceKey)) ?? parameter.DefaultValue; } return invoker.Invoke(constructorArguments.AsSpan()); @@ -968,11 +1090,39 @@ private static object ReflectionFactoryCanonical( serviceProvider, parameter.ParameterType, declaringType, - parameter.HasDefaultValue)) ?? parameter.DefaultValue; + parameter.HasDefaultValue, + parameter.ServiceKey)) ?? parameter.DefaultValue; } return constructor.Invoke(BindingFlags.DoNotWrapExceptions, binder: null, constructorArguments, culture: null); } #endif // NET8_0_OR_GREATER + +#if NETCOREAPP + internal static class ActivatorUtilitiesUpdateHandler + { + public static void ClearCache(Type[]? _) + { + // Ignore the Type[] argument; just clear the caches. + s_constructorInfos.Clear(); + if (s_collectibleConstructorInfos.IsValueCreated) + { + s_collectibleConstructorInfos.Value.Clear(); + } + } + } +#endif + + private static object? GetKeyedService(IServiceProvider provider, Type type, object? serviceKey) + { + ThrowHelper.ThrowIfNull(provider); + + if (provider is IKeyedServiceProvider keyedServiceProvider) + { + return keyedServiceProvider.GetKeyedService(type, serviceKey); + } + + throw new InvalidOperationException(SR.KeyedServicesNotSupported); + } } } diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/CompatibilitySuppressions.xml b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/CompatibilitySuppressions.xml new file mode 100644 index 00000000000000..8223106e255aa7 --- /dev/null +++ b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/CompatibilitySuppressions.xml @@ -0,0 +1,18 @@ + + + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll + lib/netstandard2.1/Microsoft.Extensions.DependencyInjection.Abstractions.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll + lib/netstandard2.1/Microsoft.Extensions.DependencyInjection.Abstractions.dll + true + + \ No newline at end of file diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/Microsoft.Extensions.DependencyInjection.Abstractions.csproj b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/Microsoft.Extensions.DependencyInjection.Abstractions.csproj index 422c5bef17065a..8042e453a1d349 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/Microsoft.Extensions.DependencyInjection.Abstractions.csproj +++ b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/Microsoft.Extensions.DependencyInjection.Abstractions.csproj @@ -25,13 +25,11 @@ Microsoft.Extensions.DependencyInjection.IServiceCollection + - - - - + diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/PACKAGE.md b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/PACKAGE.md new file mode 100644 index 00000000000000..6c8a654b7f4ff1 --- /dev/null +++ b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/PACKAGE.md @@ -0,0 +1,34 @@ +## About +Supports the lower-level abstractions for the dependency injection (DI) software design pattern which is a technique for achieving Inversion of Control (IoC) between classes and their dependencies. + +## Key Features +- Interfaces for DI implementations which are provided in other packages including `Microsoft.Extensions.DependencyInjection`. +- An implementation of a service collection, which is used to add services to and later retrieve them either directly or through constructor injection. +- Interfaces, attributes and extensions methods to support various DI concepts including specifying a service's lifetime and supporting keyed services. + +## How to Use +This package is typically used with an implementation of the DI abstractions, such as `Microsoft.Extensions.DependencyInjection`. + +## Main Types +The main types provided by this library are: +* `Microsoft.Extensions.DependencyInjection.ActivatorUtilities` +* `Microsoft.Extensions.DependencyInjection.IServiceCollection` +* `Microsoft.Extensions.DependencyInjection.ServiceCollection` +* `Microsoft.Extensions.DependencyInjection.ServiceCollectionDescriptorExtensions` +* `Microsoft.Extensions.DependencyInjection.ServiceDescriptor` +* `Microsoft.Extensions.DependencyInjection.IServiceProviderFactory` + +## Additional Documentation +* [Conceptual documentation](https://learn.microsoft.com/dotnet/core/extensions/dependency-injection) +* API documentation + - [ActivatorUtilities](https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.defaultserviceproviderfactory) + - [ServiceCollection](https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.servicecollection) + - [ServiceDescriptor](https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.servicedescriptor) + +## Related Packages +- `Microsoft.Extensions.DependencyInjection` +- `Microsoft.Extensions.Hosting` +- `Microsoft.Extensions.Options` + +## Feedback & Contributing +Microsoft.Extensions.DependencyInjection.Abstractions is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection.Specification.Tests/src/CompatibilitySuppressions.xml b/src/libraries/Microsoft.Extensions.DependencyInjection.Specification.Tests/src/CompatibilitySuppressions.xml deleted file mode 100644 index c4c68039b773fb..00000000000000 --- a/src/libraries/Microsoft.Extensions.DependencyInjection.Specification.Tests/src/CompatibilitySuppressions.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - CP0002 - M:Microsoft.Extensions.DependencyInjection.Specification.DependencyInjectionSpecificationTests.TypeActivatorCreateInstanceUsesFirstMathchedConstructor(System.Object,System.String) - true - - \ No newline at end of file diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection.Specification.Tests/src/KeyedDependencyInjectionSpecificationTests.cs b/src/libraries/Microsoft.Extensions.DependencyInjection.Specification.Tests/src/KeyedDependencyInjectionSpecificationTests.cs index 32112c3e5f7691..a0dc73d58f820b 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection.Specification.Tests/src/KeyedDependencyInjectionSpecificationTests.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection.Specification.Tests/src/KeyedDependencyInjectionSpecificationTests.cs @@ -476,5 +476,41 @@ public ServiceProviderAccessor(IServiceProvider serviceProvider) public IServiceProvider ServiceProvider { get; } } + + [Fact] + public void SimpleServiceKeyedResolution() + { + // Arrange + var services = new ServiceCollection(); + services.AddKeyedTransient("simple"); + services.AddKeyedTransient("another"); + services.AddTransient(); + var provider = CreateServiceProvider(services); + var sut = provider.GetService(); + + // Act + var result = sut!.GetService("simple"); + + // Assert + Assert.True(result.GetType() == typeof(SimpleService)); + } + + public class SimpleParentWithDynamicKeyedService + { + private readonly IServiceProvider _serviceProvider; + + public SimpleParentWithDynamicKeyedService(IServiceProvider serviceProvider) + { + _serviceProvider = serviceProvider; + } + + public ISimpleService GetService(string name) => _serviceProvider.GetKeyedService(name)!; + } + + public interface ISimpleService { } + + public class SimpleService : ISimpleService { } + + public class AnotherSimpleService : ISimpleService { } } } diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/Microsoft.Extensions.DependencyInjection.sln b/src/libraries/Microsoft.Extensions.DependencyInjection/Microsoft.Extensions.DependencyInjection.sln index c5fc8100170801..9345a6ded34b0d 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/Microsoft.Extensions.DependencyInjection.sln +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/Microsoft.Extensions.DependencyInjection.sln @@ -15,16 +15,26 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Depend EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyInjection", "src\Microsoft.Extensions.DependencyInjection.csproj", "{C5ECD02C-FA5A-4B56-9CA2-47AD8989714A}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CollectibleAssembly", "tests\CollectibleAssembly\CollectibleAssembly.csproj", "{2C6983BB-3CB4-4EB7-9AF1-2F24FE1ECEAB}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyInjection.ExternalContainers.Tests", "tests\DI.External.Tests\Microsoft.Extensions.DependencyInjection.ExternalContainers.Tests.csproj", "{F11DD75C-122C-4B98-9EED-F71551F9562A}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyInjection.Tests", "tests\DI.Tests\Microsoft.Extensions.DependencyInjection.Tests.csproj", "{1EE6CA66-6585-459D-8889-666D4C2D4C27}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{75694FB9-6B49-4D17-9B26-8B75AD54FD62}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{FD3C8D4F-0EAA-4575-A685-F77C6D340E60}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{9E5124E4-BEDA-4B2D-9699-60E2A7B1881D}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{C85FD264-C77B-44F3-926C-D61C5DAD369E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{A2CD66D3-74F2-4608-A56E-F866CC494620}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{45502850-3207-49B0-9F5D-5DE95091DB5A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{B1E4A89A-6451-4484-B42B-4D1DF21B6961}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{7E8189DE-6BBA-4CD5-9BA6-DF5ADBD027D3}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{5F2D3A6A-76D3-4C22-A7F7-8D73D67A98F8}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{E168C5B8-F2EB-4BDE-942A-59C1EB130D59}" @@ -33,6 +43,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{74C4FAFF-491 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{28065F40-B930-4A5D-95D8-A3BD5F86CE11}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{0B56ECAF-7B4A-4135-A343-1577ACE09920}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{5DD887A4-ED78-4782-B372-34176C27F0C1}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{6FA0C03B-0901-4FD8-AF44-D4C9E5516C2F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{D6F10CF9-982E-4D09-A112-0CBFD2D46AFF}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -71,6 +89,10 @@ Global {C5ECD02C-FA5A-4B56-9CA2-47AD8989714A}.Debug|Any CPU.Build.0 = Debug|Any CPU {C5ECD02C-FA5A-4B56-9CA2-47AD8989714A}.Release|Any CPU.ActiveCfg = Release|Any CPU {C5ECD02C-FA5A-4B56-9CA2-47AD8989714A}.Release|Any CPU.Build.0 = Release|Any CPU + {2C6983BB-3CB4-4EB7-9AF1-2F24FE1ECEAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2C6983BB-3CB4-4EB7-9AF1-2F24FE1ECEAB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2C6983BB-3CB4-4EB7-9AF1-2F24FE1ECEAB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2C6983BB-3CB4-4EB7-9AF1-2F24FE1ECEAB}.Release|Any CPU.Build.0 = Release|Any CPU {F11DD75C-122C-4B98-9EED-F71551F9562A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F11DD75C-122C-4B98-9EED-F71551F9562A}.Debug|Any CPU.Build.0 = Debug|Any CPU {F11DD75C-122C-4B98-9EED-F71551F9562A}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -79,10 +101,6 @@ Global {1EE6CA66-6585-459D-8889-666D4C2D4C27}.Debug|Any CPU.Build.0 = Debug|Any CPU {1EE6CA66-6585-459D-8889-666D4C2D4C27}.Release|Any CPU.ActiveCfg = Release|Any CPU {1EE6CA66-6585-459D-8889-666D4C2D4C27}.Release|Any CPU.Build.0 = Release|Any CPU - {75694FB9-6B49-4D17-9B26-8B75AD54FD62}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {75694FB9-6B49-4D17-9B26-8B75AD54FD62}.Debug|Any CPU.Build.0 = Debug|Any CPU - {75694FB9-6B49-4D17-9B26-8B75AD54FD62}.Release|Any CPU.ActiveCfg = Release|Any CPU - {75694FB9-6B49-4D17-9B26-8B75AD54FD62}.Release|Any CPU.Build.0 = Release|Any CPU {FD3C8D4F-0EAA-4575-A685-F77C6D340E60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FD3C8D4F-0EAA-4575-A685-F77C6D340E60}.Debug|Any CPU.Build.0 = Debug|Any CPU {FD3C8D4F-0EAA-4575-A685-F77C6D340E60}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -91,12 +109,33 @@ Global {9E5124E4-BEDA-4B2D-9699-60E2A7B1881D}.Debug|Any CPU.Build.0 = Debug|Any CPU {9E5124E4-BEDA-4B2D-9699-60E2A7B1881D}.Release|Any CPU.ActiveCfg = Release|Any CPU {9E5124E4-BEDA-4B2D-9699-60E2A7B1881D}.Release|Any CPU.Build.0 = Release|Any CPU + {C85FD264-C77B-44F3-926C-D61C5DAD369E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C85FD264-C77B-44F3-926C-D61C5DAD369E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C85FD264-C77B-44F3-926C-D61C5DAD369E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C85FD264-C77B-44F3-926C-D61C5DAD369E}.Release|Any CPU.Build.0 = Release|Any CPU + {A2CD66D3-74F2-4608-A56E-F866CC494620}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A2CD66D3-74F2-4608-A56E-F866CC494620}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A2CD66D3-74F2-4608-A56E-F866CC494620}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A2CD66D3-74F2-4608-A56E-F866CC494620}.Release|Any CPU.Build.0 = Release|Any CPU + {45502850-3207-49B0-9F5D-5DE95091DB5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {45502850-3207-49B0-9F5D-5DE95091DB5A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {45502850-3207-49B0-9F5D-5DE95091DB5A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {45502850-3207-49B0-9F5D-5DE95091DB5A}.Release|Any CPU.Build.0 = Release|Any CPU + {B1E4A89A-6451-4484-B42B-4D1DF21B6961}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B1E4A89A-6451-4484-B42B-4D1DF21B6961}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B1E4A89A-6451-4484-B42B-4D1DF21B6961}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B1E4A89A-6451-4484-B42B-4D1DF21B6961}.Release|Any CPU.Build.0 = Release|Any CPU + {7E8189DE-6BBA-4CD5-9BA6-DF5ADBD027D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7E8189DE-6BBA-4CD5-9BA6-DF5ADBD027D3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7E8189DE-6BBA-4CD5-9BA6-DF5ADBD027D3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7E8189DE-6BBA-4CD5-9BA6-DF5ADBD027D3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {30201F60-A891-4C3F-A1A6-DDDD1C8525E3} = {5F2D3A6A-76D3-4C22-A7F7-8D73D67A98F8} + {2C6983BB-3CB4-4EB7-9AF1-2F24FE1ECEAB} = {5F2D3A6A-76D3-4C22-A7F7-8D73D67A98F8} {F11DD75C-122C-4B98-9EED-F71551F9562A} = {5F2D3A6A-76D3-4C22-A7F7-8D73D67A98F8} {1EE6CA66-6585-459D-8889-666D4C2D4C27} = {5F2D3A6A-76D3-4C22-A7F7-8D73D67A98F8} {047FD3F2-B3A0-4639-B4F0-40D29E61725D} = {E168C5B8-F2EB-4BDE-942A-59C1EB130D59} @@ -106,9 +145,16 @@ Global {9CD9F9EB-379C-44C1-9016-33DFEC821C76} = {74C4FAFF-491D-448C-8CA0-F8E5FC838CC5} {4532D9F9-1E0D-4A62-8038-D3454B255E86} = {74C4FAFF-491D-448C-8CA0-F8E5FC838CC5} {C5ECD02C-FA5A-4B56-9CA2-47AD8989714A} = {74C4FAFF-491D-448C-8CA0-F8E5FC838CC5} - {75694FB9-6B49-4D17-9B26-8B75AD54FD62} = {28065F40-B930-4A5D-95D8-A3BD5F86CE11} {FD3C8D4F-0EAA-4575-A685-F77C6D340E60} = {28065F40-B930-4A5D-95D8-A3BD5F86CE11} {9E5124E4-BEDA-4B2D-9699-60E2A7B1881D} = {28065F40-B930-4A5D-95D8-A3BD5F86CE11} + {C85FD264-C77B-44F3-926C-D61C5DAD369E} = {0B56ECAF-7B4A-4135-A343-1577ACE09920} + {A2CD66D3-74F2-4608-A56E-F866CC494620} = {0B56ECAF-7B4A-4135-A343-1577ACE09920} + {0B56ECAF-7B4A-4135-A343-1577ACE09920} = {D6F10CF9-982E-4D09-A112-0CBFD2D46AFF} + {45502850-3207-49B0-9F5D-5DE95091DB5A} = {5DD887A4-ED78-4782-B372-34176C27F0C1} + {B1E4A89A-6451-4484-B42B-4D1DF21B6961} = {5DD887A4-ED78-4782-B372-34176C27F0C1} + {5DD887A4-ED78-4782-B372-34176C27F0C1} = {D6F10CF9-982E-4D09-A112-0CBFD2D46AFF} + {7E8189DE-6BBA-4CD5-9BA6-DF5ADBD027D3} = {6FA0C03B-0901-4FD8-AF44-D4C9E5516C2F} + {6FA0C03B-0901-4FD8-AF44-D4C9E5516C2F} = {D6F10CF9-982E-4D09-A112-0CBFD2D46AFF} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {68A7BDA7-8093-433C-BF7A-8A6A7560BD02} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/CompatibilitySuppressions.xml b/src/libraries/Microsoft.Extensions.DependencyInjection/src/CompatibilitySuppressions.xml index 42539183a5a05d..46e967f1498e12 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/CompatibilitySuppressions.xml +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/CompatibilitySuppressions.xml @@ -30,4 +30,18 @@ lib/net7.0/Microsoft.Extensions.DependencyInjection.dll true + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/Microsoft.Extensions.DependencyInjection.dll + lib/netstandard2.1/Microsoft.Extensions.DependencyInjection.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/Microsoft.Extensions.DependencyInjection.dll + lib/netstandard2.1/Microsoft.Extensions.DependencyInjection.dll + true + \ No newline at end of file diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ILLink/ILLink.Substitutions.xml b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ILLink/ILLink.Substitutions.xml index eb381de19d6153..6aa354ee23683c 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ILLink/ILLink.Substitutions.xml +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ILLink/ILLink.Substitutions.xml @@ -3,5 +3,8 @@ + + + diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/Microsoft.Extensions.DependencyInjection.csproj b/src/libraries/Microsoft.Extensions.DependencyInjection/src/Microsoft.Extensions.DependencyInjection.csproj index ce7ac08140311d..9b57cba3409380 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/Microsoft.Extensions.DependencyInjection.csproj +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/Microsoft.Extensions.DependencyInjection.csproj @@ -22,6 +22,16 @@ + + + + + + + + @@ -30,23 +40,11 @@ + - - - - - - - - - - - - + diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/PACKAGE.md b/src/libraries/Microsoft.Extensions.DependencyInjection/src/PACKAGE.md new file mode 100644 index 00000000000000..91474fd46a2f29 --- /dev/null +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/PACKAGE.md @@ -0,0 +1,50 @@ +## About +Supports the dependency injection (DI) software design pattern which is a technique for achieving Inversion of Control (IoC) between classes and their dependencies. + +## Key Features +Provides an implementation of the DI interfaces found in the `Microsoft.Extensions.DependencyInjection.Abstractions` package. + +## How to Use +```cs +ServiceCollection services = new (); +services.AddSingleton(); +using ServiceProvider provider = services.BuildServiceProvider(); + +// The code below, following the IoC pattern, is typically only aware of the IMessageWriter interface, not the implementation. +IMessageWriter messageWriter = provider.GetService()!; +messageWriter.Write("Hello"); + +public interface IMessageWriter +{ + void Write(string message); +} + +internal class MessageWriter : IMessageWriter +{ + public void Write(string message) + { + Console.WriteLine($"MessageWriter.Write(message: \"{message}\")"); + } +} +``` + +## Main Types +The main types provided by this library are: +* `Microsoft.Extensions.DependencyInjection.DefaultServiceProviderFactory` +* `Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions` +* `Microsoft.Extensions.DependencyInjection.ServiceProvider` + +## Additional Documentation +* [Conceptual documentation](https://learn.microsoft.com/dotnet/core/extensions/dependency-injection) +* API documentation + - [DefaultServiceProviderFactory](https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.defaultserviceproviderfactory) + - [ServiceCollectionContainerBuilderExtensions](https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.servicecollectioncontainerbuilderextensions) + - [ServiceProvider](https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.serviceprovider) + +## Related Packages +- `Microsoft.Extensions.DependencyInjection.Abstractions` +- `Microsoft.Extensions.Hosting` +- `Microsoft.Extensions.Options` + +## Feedback & Contributing +Microsoft.Extensions.DependencyInjection is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceProvider.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceProvider.cs index aa178741fc4516..ff5efbe98cf334 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceProvider.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceProvider.cs @@ -37,6 +37,9 @@ public sealed class ServiceProvider : IServiceProvider, IKeyedServiceProvider, I internal static bool VerifyOpenGenericServiceTrimmability { get; } = AppContext.TryGetSwitch("Microsoft.Extensions.DependencyInjection.VerifyOpenGenericServiceTrimmability", out bool verifyOpenGenerics) ? verifyOpenGenerics : false; + internal static bool DisableDynamicEngine { get; } = + AppContext.TryGetSwitch("Microsoft.Extensions.DependencyInjection.DisableDynamicEngine", out bool disableDynamicEngine) ? disableDynamicEngine : false; + internal static bool VerifyAotCompatibility => #if NETFRAMEWORK || NETSTANDARD2_0 false; @@ -246,7 +249,7 @@ private ServiceProviderEngine GetEngine() #if NETFRAMEWORK || NETSTANDARD2_0 engine = CreateDynamicEngine(); #else - if (RuntimeFeature.IsDynamicCodeCompiled) + if (RuntimeFeature.IsDynamicCodeCompiled && !DisableDynamicEngine) { engine = CreateDynamicEngine(); } diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/CollectibleAssembly/CollectableClasses.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/CollectibleAssembly/CollectableClasses.cs new file mode 100644 index 00000000000000..cc9e925ae0ad8e --- /dev/null +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/CollectibleAssembly/CollectableClasses.cs @@ -0,0 +1,25 @@ +// 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.DependencyInjection; + +namespace CollectibleAssembly +{ + public class ClassToCreate + { + public object ClassAsCtorArgument { get; set; } + + public ClassToCreate(ClassAsCtorArgument obj) { ClassAsCtorArgument = obj; } + + public static object Create(ServiceProvider provider) + { + // Both the type to create (ClassToCreate) and the ctor's arg type (ClassAsCtorArgument) are + // located in this assembly, so both types need to be GC'd for this assembly to be collected. + return ActivatorUtilities.CreateInstance(provider, new ClassAsCtorArgument()); + } + } + + public class ClassAsCtorArgument + { + } +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/CollectibleAssembly/CollectibleAssembly.csproj b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/CollectibleAssembly/CollectibleAssembly.csproj new file mode 100644 index 00000000000000..82159cece28227 --- /dev/null +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/CollectibleAssembly/CollectibleAssembly.csproj @@ -0,0 +1,11 @@ + + + $(NetCoreAppCurrent);$(NetFrameworkMinimum) + true + + + + + + + diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ActivatorUtilitiesTests.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ActivatorUtilitiesTests.cs index 7572e6977a4c49..f6e7c2f3a8eb7c 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ActivatorUtilitiesTests.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ActivatorUtilitiesTests.cs @@ -2,8 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.IO; +using System.Reflection; using Microsoft.DotNet.RemoteExecutor; using Xunit; +using System.Runtime.CompilerServices; + +#if NETCOREAPP +using System.Runtime.Loader; +#endif namespace Microsoft.Extensions.DependencyInjection.Tests { @@ -233,6 +240,100 @@ public void CreateFactory_CreatesFactoryMethod_5Types_5Injected() Assert.NotNull(item.Z); } + [ConditionalTheory(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] + [InlineData(true)] +#if NETCOREAPP + [InlineData(false)] +#endif + public void CreateFactory_CreatesFactoryMethod_KeyedParams(bool useDynamicCode) + { + var options = new RemoteInvokeOptions(); + if (!useDynamicCode) + { + DisableDynamicCode(options); + } + + using var remoteHandle = RemoteExecutor.Invoke(static () => + { + var factory = ActivatorUtilities.CreateFactory(Type.EmptyTypes); + + var services = new ServiceCollection(); + services.AddSingleton(new A()); + services.AddKeyedSingleton("b", new B()); + services.AddKeyedSingleton("c", new C()); + using var provider = services.BuildServiceProvider(); + ClassWithAKeyedBKeyedC item = factory(provider, null); + + Assert.IsType>(factory); + Assert.NotNull(item.A); + Assert.NotNull(item.B); + Assert.NotNull(item.C); + }, options); + } + + [ConditionalTheory(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] + [InlineData(true)] +#if NETCOREAPP + [InlineData(false)] +#endif + public void CreateFactory_CreatesFactoryMethod_KeyedParams_5Types(bool useDynamicCode) + { + var options = new RemoteInvokeOptions(); + if (!useDynamicCode) + { + DisableDynamicCode(options); + } + + using var remoteHandle = RemoteExecutor.Invoke(static () => + { + var factory = ActivatorUtilities.CreateFactory(Type.EmptyTypes); + + var services = new ServiceCollection(); + services.AddSingleton(new A()); + services.AddKeyedSingleton("b", new B()); + services.AddKeyedSingleton("c", new C()); + services.AddSingleton(new S()); + services.AddSingleton(new Z()); + using var provider = services.BuildServiceProvider(); + ClassWithAKeyedBKeyedCSZ item = factory(provider, null); + + Assert.IsType>(factory); + Assert.NotNull(item.A); + Assert.NotNull(item.B); + Assert.NotNull(item.C); + }, options); + } + + [ConditionalTheory(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] + [InlineData(true)] +#if NETCOREAPP + [InlineData(false)] +#endif + public void CreateFactory_CreatesFactoryMethod_KeyedParams_1Injected(bool useDynamicCode) + { + var options = new RemoteInvokeOptions(); + if (!useDynamicCode) + { + DisableDynamicCode(options); + } + + using var remoteHandle = RemoteExecutor.Invoke(static () => + { + var factory = ActivatorUtilities.CreateFactory(new Type[] { typeof(A) }); + + var services = new ServiceCollection(); + services.AddKeyedSingleton("b", new B()); + services.AddKeyedSingleton("c", new C()); + using var provider = services.BuildServiceProvider(); + ClassWithAKeyedBKeyedC item = factory(provider, new object?[] { new A() }); + + Assert.IsType>(factory); + Assert.NotNull(item.A); + Assert.NotNull(item.B); + Assert.NotNull(item.C); + }, options); + } + [ConditionalTheory(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] [InlineData(true)] #if NETCOREAPP @@ -386,6 +487,125 @@ public void CreateFactory_RemoteExecutor_NoParameters_Success(bool useDynamicCod }, options); } +#if NETCOREAPP + [ActiveIssue("https://github.com/dotnet/runtime/issues/34072", TestRuntimes.Mono)] + [ConditionalTheory(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] + [InlineData(true)] + [InlineData(false)] + public void CreateInstance_CollectibleAssembly(bool useDynamicCode) + { + if (PlatformDetection.IsNonBundledAssemblyLoadingSupported) + { + RemoteInvokeOptions options = new(); + if (!useDynamicCode) + { + DisableDynamicCode(options); + } + + using var remoteHandle = RemoteExecutor.Invoke(static () => + { + Assert.False(Collectible_IsAssemblyLoaded()); + Collectible_LoadAndCreate(useCollectibleAssembly : true, out WeakReference asmWeakRef, out WeakReference typeWeakRef); + + for (int i = 0; (typeWeakRef.IsAlive || asmWeakRef.IsAlive) && (i < 10); i++) + { + GC.Collect(); + GC.WaitForPendingFinalizers(); + } + + // These should be GC'd. + Assert.False(asmWeakRef.IsAlive, "asmWeakRef.IsAlive"); + Assert.False(typeWeakRef.IsAlive, "typeWeakRef.IsAlive"); + Assert.False(Collectible_IsAssemblyLoaded()); + }, options); + } + } + + [ConditionalTheory(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] + [InlineData(true)] + [InlineData(false)] + public void CreateInstance_NormalAssembly(bool useDynamicCode) + { + RemoteInvokeOptions options = new(); + if (!useDynamicCode) + { + DisableDynamicCode(options); + } + + using var remoteHandle = RemoteExecutor.Invoke(static () => + { + Assert.False(Collectible_IsAssemblyLoaded()); + Collectible_LoadAndCreate(useCollectibleAssembly: false, out WeakReference asmWeakRef, out WeakReference typeWeakRef); + + for (int i = 0; (typeWeakRef.IsAlive || asmWeakRef.IsAlive) && (i < 10); i++) + { + GC.Collect(); + GC.WaitForPendingFinalizers(); + } + + // These will not be GC'd. + Assert.True(asmWeakRef.IsAlive, "alcWeakRef.IsAlive"); + Assert.True(typeWeakRef.IsAlive, "typeWeakRef.IsAlive"); + Assert.True(Collectible_IsAssemblyLoaded()); + }, options); + } + + [MethodImpl(MethodImplOptions.NoInlining)] + static void Collectible_LoadAndCreate(bool useCollectibleAssembly, out WeakReference asmWeakRef, out WeakReference typeWeakRef) + { + Assembly asm; + object obj; + + if (useCollectibleAssembly) + { + asm = MyLoadContext.LoadAsCollectable(); + obj = CreateWithActivator(asm); + Assert.True(obj.GetType().Assembly.IsCollectible); + } + else + { + asm = MyLoadContext.LoadNormal(); + obj = CreateWithActivator(asm); + Assert.False(obj.GetType().Assembly.IsCollectible); + } + + Assert.True(Collectible_IsAssemblyLoaded()); + asmWeakRef = new WeakReference(asm); + typeWeakRef = new WeakReference(obj.GetType()); + + static object CreateWithActivator(Assembly asm) + { + Type t = asm.GetType("CollectibleAssembly.ClassToCreate"); + MethodInfo mi = t.GetMethod("Create", BindingFlags.Static | BindingFlags.Public, new Type[] { typeof(ServiceProvider) }); + + object instance; + ServiceCollection services = new(); + using (ServiceProvider provider = services.BuildServiceProvider()) + { + instance = mi.Invoke(null, new object[] { provider }); + } + + return instance; + } + } + + static bool Collectible_IsAssemblyLoaded() + { + Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); + for (int i = 0; i < assemblies.Length; i++) + { + Assembly asm = assemblies[i]; + string asmName = Path.GetFileName(asm.Location); + if (asmName == "CollectibleAssembly.dll") + { + return true; + } + } + + return false; + } +#endif + private static void DisableDynamicCode(RemoteInvokeOptions options) { // We probably only need to set 'IsDynamicCodeCompiled' since only that is checked, @@ -401,6 +621,13 @@ internal class C { } internal class S { } internal class Z { } + internal class ClassWithAKeyedBKeyedC : ClassWithABC + { + public ClassWithAKeyedBKeyedC(A a, [FromKeyedServices("b")] B b, [FromKeyedServices("c")] C c) + : base(a, b, c) + { } + } + internal class ClassWithABCS : ClassWithABC { public S S { get; } @@ -414,6 +641,13 @@ internal class ClassWithABCSZ : ClassWithABCS public ClassWithABCSZ(A a, B b, C c, S s, Z z) : base(a, b, c, s) { Z = z; } } + internal class ClassWithAKeyedBKeyedCSZ : ClassWithABCSZ + { + public ClassWithAKeyedBKeyedCSZ(A a, [FromKeyedServices("b")] B b, [FromKeyedServices("c")] C c, S s, Z z) + : base(a, b, c, s, z) + { } + } + internal class ClassWithABC_FirstConstructorWithAttribute : ClassWithABC { [ActivatorUtilitiesConstructor] @@ -581,5 +815,36 @@ public ClassWithStringDefaultValue(string text = "DEFAULT") Text = text; } } -} +#if NETCOREAPP + internal class MyLoadContext : AssemblyLoadContext + { + private MyLoadContext() : base(isCollectible: true) + { + } + + public Assembly LoadAssembly() + { + Assembly asm = LoadFromAssemblyPath(GetPath()); + Assert.Equal(GetLoadContext(asm), this); + return asm; + } + + public static Assembly LoadAsCollectable() + { + MyLoadContext alc = new MyLoadContext(); + return alc.LoadAssembly(); + } + + public static Assembly LoadNormal() + { + return Assembly.LoadFrom(GetPath()); + } + + private static string GetPath() + { + return Path.Combine(Directory.GetCurrentDirectory(), "CollectibleAssembly.dll"); + } + } +#endif +} diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Microsoft.Extensions.DependencyInjection.Tests.csproj b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Microsoft.Extensions.DependencyInjection.Tests.csproj index 4ac3c02d7157a3..067508506a82fe 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Microsoft.Extensions.DependencyInjection.Tests.csproj +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/Microsoft.Extensions.DependencyInjection.Tests.csproj @@ -1,4 +1,4 @@ - + $(NetCoreAppCurrent);$(NetFrameworkMinimum) @@ -24,6 +24,7 @@ + diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/Microsoft.Extensions.DependencyModel.sln b/src/libraries/Microsoft.Extensions.DependencyModel/Microsoft.Extensions.DependencyModel.sln index 6ee0aaca0e6457..7faec76ce42e01 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/Microsoft.Extensions.DependencyModel.sln +++ b/src/libraries/Microsoft.Extensions.DependencyModel/Microsoft.Extensions.DependencyModel.sln @@ -41,6 +41,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\Syst EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{FA7201FE-097D-4197-BDEC-329986814D8D}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{69691ED6-ECDB-4AFB-87FA-BED4F8489746}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{0CA9C0FD-7D04-4EB8-9567-06171C795552}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{B9F77365-105E-4FED-B0CE-83568C16B46C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{718E999B-18AE-4A65-A010-BFF0B8E3FB39}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{417E717C-B67C-4CCF-BD8B-5662016DC17E}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{155C3F40-F63D-49DF-87D3-A3EEA27036E8}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{50BA55F5-BD05-4C05-910F-2BFD20BD3465}" @@ -49,6 +59,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{5725D7DF-DC3 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{55D04C80-4A8F-40AC-967D-3FA77C814D7B}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{9C13782D-F7D7-4F02-A39D-D7BD992EB257}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{D9691871-5357-4B81-9B4E-A94394515042}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{C5220846-E0E3-4326-B2C1-C3535910E354}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{FDECE2E5-8E54-4DF7-95D4-35BB8D8432AA}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -139,6 +157,26 @@ Global {FA7201FE-097D-4197-BDEC-329986814D8D}.Debug|Any CPU.Build.0 = Debug|Any CPU {FA7201FE-097D-4197-BDEC-329986814D8D}.Release|Any CPU.ActiveCfg = Release|Any CPU {FA7201FE-097D-4197-BDEC-329986814D8D}.Release|Any CPU.Build.0 = Release|Any CPU + {69691ED6-ECDB-4AFB-87FA-BED4F8489746}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {69691ED6-ECDB-4AFB-87FA-BED4F8489746}.Debug|Any CPU.Build.0 = Debug|Any CPU + {69691ED6-ECDB-4AFB-87FA-BED4F8489746}.Release|Any CPU.ActiveCfg = Release|Any CPU + {69691ED6-ECDB-4AFB-87FA-BED4F8489746}.Release|Any CPU.Build.0 = Release|Any CPU + {0CA9C0FD-7D04-4EB8-9567-06171C795552}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0CA9C0FD-7D04-4EB8-9567-06171C795552}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0CA9C0FD-7D04-4EB8-9567-06171C795552}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0CA9C0FD-7D04-4EB8-9567-06171C795552}.Release|Any CPU.Build.0 = Release|Any CPU + {B9F77365-105E-4FED-B0CE-83568C16B46C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B9F77365-105E-4FED-B0CE-83568C16B46C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B9F77365-105E-4FED-B0CE-83568C16B46C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B9F77365-105E-4FED-B0CE-83568C16B46C}.Release|Any CPU.Build.0 = Release|Any CPU + {718E999B-18AE-4A65-A010-BFF0B8E3FB39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {718E999B-18AE-4A65-A010-BFF0B8E3FB39}.Debug|Any CPU.Build.0 = Debug|Any CPU + {718E999B-18AE-4A65-A010-BFF0B8E3FB39}.Release|Any CPU.ActiveCfg = Release|Any CPU + {718E999B-18AE-4A65-A010-BFF0B8E3FB39}.Release|Any CPU.Build.0 = Release|Any CPU + {417E717C-B67C-4CCF-BD8B-5662016DC17E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {417E717C-B67C-4CCF-BD8B-5662016DC17E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {417E717C-B67C-4CCF-BD8B-5662016DC17E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {417E717C-B67C-4CCF-BD8B-5662016DC17E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -165,6 +203,14 @@ Global {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} + {69691ED6-ECDB-4AFB-87FA-BED4F8489746} = {9C13782D-F7D7-4F02-A39D-D7BD992EB257} + {0CA9C0FD-7D04-4EB8-9567-06171C795552} = {9C13782D-F7D7-4F02-A39D-D7BD992EB257} + {9C13782D-F7D7-4F02-A39D-D7BD992EB257} = {FDECE2E5-8E54-4DF7-95D4-35BB8D8432AA} + {B9F77365-105E-4FED-B0CE-83568C16B46C} = {D9691871-5357-4B81-9B4E-A94394515042} + {718E999B-18AE-4A65-A010-BFF0B8E3FB39} = {D9691871-5357-4B81-9B4E-A94394515042} + {D9691871-5357-4B81-9B4E-A94394515042} = {FDECE2E5-8E54-4DF7-95D4-35BB8D8432AA} + {417E717C-B67C-4CCF-BD8B-5662016DC17E} = {C5220846-E0E3-4326-B2C1-C3535910E354} + {C5220846-E0E3-4326-B2C1-C3535910E354} = {FDECE2E5-8E54-4DF7-95D4-35BB8D8432AA} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {810D114A-26F4-4151-9EFE-29A7F1BF62AA} diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/PACKAGE.md b/src/libraries/Microsoft.Extensions.DependencyModel/src/PACKAGE.md index f4d4a485899ebb..19b13040a8aea9 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/PACKAGE.md +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/PACKAGE.md @@ -1,16 +1,14 @@ ## About + + Provides abstractions for reading `.deps` files. When a .NET application is compiled, the SDK generates a JSON manifest file (`.deps.json`) that contains information about application dependencies. You can use `Microsoft.Extensions.DependencyModel` to read information from this manifest at run time. This is useful when you want to dynamically compile code (for example, using Roslyn Emit API) referencing the same dependencies as your main application. By default, the dependency manifest contains information about the application's target framework and runtime dependencies. Set the [PreserveCompilationContext](https://docs.microsoft.com/dotnet/core/project-sdk/msbuild-props#preservecompilationcontext) project property to `true` to additionally include information about reference assemblies used during compilation. -For more information, see the documentation: - -- [.deps.json file format](https://github.com/dotnet/sdk/blob/main/documentation/specs/runtime-configuration-file.md#appnamedepsjson) -- [Microsoft.Extensions.DependencyModel namespace](https://docs.microsoft.com/dotnet/api/microsoft.extensions.dependencymodel) -- [Microsoft.Extensions.DependencyModel.DependencyContext](https://docs.microsoft.com/dotnet/api/microsoft.extensions.dependencymodel.dependencycontext) +## How to Use -## Example + The following example shows how to display the list of assemblies used when compiling the current application. Include `true` in your project file to run this example. @@ -35,3 +33,17 @@ class Program } } ``` + +## Additional Documentation + + + +* [.deps.json file format](https://github.com/dotnet/sdk/blob/main/documentation/specs/runtime-configuration-file.md#appnamedepsjson) +* [Microsoft.Extensions.DependencyModel namespace](https://docs.microsoft.com/dotnet/api/microsoft.extensions.dependencymodel) +* [Microsoft.Extensions.DependencyModel.DependencyContext](https://docs.microsoft.com/dotnet/api/microsoft.extensions.dependencymodel.dependencycontext) + +## Feedback & Contributing + + + +Microsoft.Extensions.DependencyModel is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). \ No newline at end of file diff --git a/src/libraries/Microsoft.Extensions.Diagnostics.Abstractions/Microsoft.Extensions.Diagnostics.Abstractions.sln b/src/libraries/Microsoft.Extensions.Diagnostics.Abstractions/Microsoft.Extensions.Diagnostics.Abstractions.sln index 4e51f48f75fbaa..87e92fa7c67c60 100644 --- a/src/libraries/Microsoft.Extensions.Diagnostics.Abstractions/Microsoft.Extensions.Diagnostics.Abstractions.sln +++ b/src/libraries/Microsoft.Extensions.Diagnostics.Abstractions/Microsoft.Extensions.Diagnostics.Abstractions.sln @@ -1,8 +1,4 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.7.33711.374 -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", "{79CE8C7E-A4AF-413C-A54D-86F17073559C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.AsyncInterfaces", "..\Microsoft.Bcl.AsyncInterfaces\ref\Microsoft.Bcl.AsyncInterfaces.csproj", "{9052AC86-4B89-4311-BEF2-7C49FB72DC0F}" @@ -13,17 +9,63 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Depend EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyInjection.Abstractions", "..\Microsoft.Extensions.DependencyInjection.Abstractions\src\Microsoft.Extensions.DependencyInjection.Abstractions.csproj", "{527CCF66-AC37-487C-871E-A4F6B94E1731}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyInjection", "..\Microsoft.Extensions.DependencyInjection\ref\Microsoft.Extensions.DependencyInjection.csproj", "{7FC1EF40-C815-4046-956E-79E9A359BC46}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyInjection", "..\Microsoft.Extensions.DependencyInjection\src\Microsoft.Extensions.DependencyInjection.csproj", "{305A2903-7F06-48C7-92B6-B9D11B34DCC0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics.Abstractions", "ref\Microsoft.Extensions.Diagnostics.Abstractions.csproj", "{EF2C8F2A-6088-4A89-9AE2-9C2FDFB0241C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics.Abstractions", "src\Microsoft.Extensions.Diagnostics.Abstractions.csproj", "{0588387D-FB65-4BA9-A8B2-DA6790027CC2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics.Abstractions.Tests", "tests\Microsoft.Extensions.Diagnostics.Abstractions.Tests.csproj", "{CB373FE5-F976-4CB2-A04E-6188D67A5816}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.SourceGeneration", "..\Microsoft.Extensions.Options\gen\Microsoft.Extensions.Options.SourceGeneration.csproj", "{AA2E94ED-4C40-4028-84E5-7459EDB8F66E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\ref\Microsoft.Extensions.Options.csproj", "{DB82EB74-4E33-4552-968C-C159FA5F58D1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\src\Microsoft.Extensions.Options.csproj", "{D2AF2EAB-409E-48B8-8D48-BE21719FCAF2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primitives", "..\Microsoft.Extensions.Primitives\ref\Microsoft.Extensions.Primitives.csproj", "{F2B87668-F1C2-48ED-B91F-7BB03EA5F9A0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primitives", "..\Microsoft.Extensions.Primitives\src\Microsoft.Extensions.Primitives.csproj", "{3C3BAA89-2A16-46D8-B50B-101174989814}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.DiagnosticSource", "..\System.Diagnostics.DiagnosticSource\ref\System.Diagnostics.DiagnosticSource.csproj", "{EF6988FC-AE49-4E27-910F-A06434211988}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.DiagnosticSource", "..\System.Diagnostics.DiagnosticSource\src\System.Diagnostics.DiagnosticSource.csproj", "{A4117DE8-D141-4B09-9A83-4FA4E497FECC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{40058320-9546-45A9-9D6E-CC80EB2E4D95}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{2DB6B79C-C8B4-428F-AC57-1B5947C75021}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{25420CB4-919B-4299-A8CB-1190E22438F2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{69D08457-EC2F-4BC8-A562-6154C2D6D2DC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{50B9EFE8-8D38-4D22-9423-F27356D8EFA7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{67447640-728F-4EEE-B72C-D50AD846D633}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{A0ACAB64-B9CF-463F-8F91-03C27B844D81}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{C9E4ED0B-7843-41C3-8B7B-A26FFEFDE2D5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{15494052-EEA2-495F-8B49-CD5106285B5B}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{4DE63935-DCA9-4D63-9C1F-AAE79C89CA8B}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{7631380A-FB73-4241-9987-0891A21E9769}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{548DF5F7-790C-4A1C-89EB-BD904CA1BA86}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics.Abstractions", "src\Microsoft.Extensions.Diagnostics.Abstractions.csproj", "{0588387D-FB65-4BA9-A8B2-DA6790027CC2}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{D64F512B-CF20-4CE0-8FE8-1E65C1A84E90}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics.Abstractions", "ref\Microsoft.Extensions.Diagnostics.Abstractions.csproj", "{EF2C8F2A-6088-4A89-9AE2-9C2FDFB0241C}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{D4B78CD9-7251-426B-AA22-48BC8EDD396A}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics.Abstractions.Tests", "tests\Microsoft.Extensions.Diagnostics.Abstractions.Tests.csproj", "{CB373FE5-F976-4CB2-A04E-6188D67A5816}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{5B72137B-CC84-4E53-A26C-A5340E6705E4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{4DD04777-7D32-4165-B249-8F1719787B81}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{CAFF07D6-5F29-4D97-9618-78EC8B9BA082}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -51,31 +93,124 @@ Global {527CCF66-AC37-487C-871E-A4F6B94E1731}.Debug|Any CPU.Build.0 = Debug|Any CPU {527CCF66-AC37-487C-871E-A4F6B94E1731}.Release|Any CPU.ActiveCfg = Release|Any CPU {527CCF66-AC37-487C-871E-A4F6B94E1731}.Release|Any CPU.Build.0 = Release|Any CPU - {0588387D-FB65-4BA9-A8B2-DA6790027CC2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0588387D-FB65-4BA9-A8B2-DA6790027CC2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0588387D-FB65-4BA9-A8B2-DA6790027CC2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0588387D-FB65-4BA9-A8B2-DA6790027CC2}.Release|Any CPU.Build.0 = Release|Any CPU + {7FC1EF40-C815-4046-956E-79E9A359BC46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7FC1EF40-C815-4046-956E-79E9A359BC46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7FC1EF40-C815-4046-956E-79E9A359BC46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7FC1EF40-C815-4046-956E-79E9A359BC46}.Release|Any CPU.Build.0 = Release|Any CPU + {305A2903-7F06-48C7-92B6-B9D11B34DCC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {305A2903-7F06-48C7-92B6-B9D11B34DCC0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {305A2903-7F06-48C7-92B6-B9D11B34DCC0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {305A2903-7F06-48C7-92B6-B9D11B34DCC0}.Release|Any CPU.Build.0 = Release|Any CPU {EF2C8F2A-6088-4A89-9AE2-9C2FDFB0241C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EF2C8F2A-6088-4A89-9AE2-9C2FDFB0241C}.Debug|Any CPU.Build.0 = Debug|Any CPU {EF2C8F2A-6088-4A89-9AE2-9C2FDFB0241C}.Release|Any CPU.ActiveCfg = Release|Any CPU {EF2C8F2A-6088-4A89-9AE2-9C2FDFB0241C}.Release|Any CPU.Build.0 = Release|Any CPU + {0588387D-FB65-4BA9-A8B2-DA6790027CC2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0588387D-FB65-4BA9-A8B2-DA6790027CC2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0588387D-FB65-4BA9-A8B2-DA6790027CC2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0588387D-FB65-4BA9-A8B2-DA6790027CC2}.Release|Any CPU.Build.0 = Release|Any CPU {CB373FE5-F976-4CB2-A04E-6188D67A5816}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CB373FE5-F976-4CB2-A04E-6188D67A5816}.Debug|Any CPU.Build.0 = Debug|Any CPU {CB373FE5-F976-4CB2-A04E-6188D67A5816}.Release|Any CPU.ActiveCfg = Release|Any CPU {CB373FE5-F976-4CB2-A04E-6188D67A5816}.Release|Any CPU.Build.0 = Release|Any CPU + {AA2E94ED-4C40-4028-84E5-7459EDB8F66E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AA2E94ED-4C40-4028-84E5-7459EDB8F66E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AA2E94ED-4C40-4028-84E5-7459EDB8F66E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AA2E94ED-4C40-4028-84E5-7459EDB8F66E}.Release|Any CPU.Build.0 = Release|Any CPU + {DB82EB74-4E33-4552-968C-C159FA5F58D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DB82EB74-4E33-4552-968C-C159FA5F58D1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DB82EB74-4E33-4552-968C-C159FA5F58D1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DB82EB74-4E33-4552-968C-C159FA5F58D1}.Release|Any CPU.Build.0 = Release|Any CPU + {D2AF2EAB-409E-48B8-8D48-BE21719FCAF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D2AF2EAB-409E-48B8-8D48-BE21719FCAF2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D2AF2EAB-409E-48B8-8D48-BE21719FCAF2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D2AF2EAB-409E-48B8-8D48-BE21719FCAF2}.Release|Any CPU.Build.0 = Release|Any CPU + {F2B87668-F1C2-48ED-B91F-7BB03EA5F9A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F2B87668-F1C2-48ED-B91F-7BB03EA5F9A0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F2B87668-F1C2-48ED-B91F-7BB03EA5F9A0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F2B87668-F1C2-48ED-B91F-7BB03EA5F9A0}.Release|Any CPU.Build.0 = Release|Any CPU + {3C3BAA89-2A16-46D8-B50B-101174989814}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3C3BAA89-2A16-46D8-B50B-101174989814}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3C3BAA89-2A16-46D8-B50B-101174989814}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3C3BAA89-2A16-46D8-B50B-101174989814}.Release|Any CPU.Build.0 = Release|Any CPU + {EF6988FC-AE49-4E27-910F-A06434211988}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EF6988FC-AE49-4E27-910F-A06434211988}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EF6988FC-AE49-4E27-910F-A06434211988}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EF6988FC-AE49-4E27-910F-A06434211988}.Release|Any CPU.Build.0 = Release|Any CPU + {A4117DE8-D141-4B09-9A83-4FA4E497FECC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4117DE8-D141-4B09-9A83-4FA4E497FECC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4117DE8-D141-4B09-9A83-4FA4E497FECC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4117DE8-D141-4B09-9A83-4FA4E497FECC}.Release|Any CPU.Build.0 = Release|Any CPU + {40058320-9546-45A9-9D6E-CC80EB2E4D95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {40058320-9546-45A9-9D6E-CC80EB2E4D95}.Debug|Any CPU.Build.0 = Debug|Any CPU + {40058320-9546-45A9-9D6E-CC80EB2E4D95}.Release|Any CPU.ActiveCfg = Release|Any CPU + {40058320-9546-45A9-9D6E-CC80EB2E4D95}.Release|Any CPU.Build.0 = Release|Any CPU + {2DB6B79C-C8B4-428F-AC57-1B5947C75021}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2DB6B79C-C8B4-428F-AC57-1B5947C75021}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2DB6B79C-C8B4-428F-AC57-1B5947C75021}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2DB6B79C-C8B4-428F-AC57-1B5947C75021}.Release|Any CPU.Build.0 = Release|Any CPU + {25420CB4-919B-4299-A8CB-1190E22438F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {25420CB4-919B-4299-A8CB-1190E22438F2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {25420CB4-919B-4299-A8CB-1190E22438F2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {25420CB4-919B-4299-A8CB-1190E22438F2}.Release|Any CPU.Build.0 = Release|Any CPU + {69D08457-EC2F-4BC8-A562-6154C2D6D2DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {69D08457-EC2F-4BC8-A562-6154C2D6D2DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {69D08457-EC2F-4BC8-A562-6154C2D6D2DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {69D08457-EC2F-4BC8-A562-6154C2D6D2DC}.Release|Any CPU.Build.0 = Release|Any CPU + {50B9EFE8-8D38-4D22-9423-F27356D8EFA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {50B9EFE8-8D38-4D22-9423-F27356D8EFA7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {50B9EFE8-8D38-4D22-9423-F27356D8EFA7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {50B9EFE8-8D38-4D22-9423-F27356D8EFA7}.Release|Any CPU.Build.0 = Release|Any CPU + {67447640-728F-4EEE-B72C-D50AD846D633}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {67447640-728F-4EEE-B72C-D50AD846D633}.Debug|Any CPU.Build.0 = Debug|Any CPU + {67447640-728F-4EEE-B72C-D50AD846D633}.Release|Any CPU.ActiveCfg = Release|Any CPU + {67447640-728F-4EEE-B72C-D50AD846D633}.Release|Any CPU.Build.0 = Release|Any CPU + {A0ACAB64-B9CF-463F-8F91-03C27B844D81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A0ACAB64-B9CF-463F-8F91-03C27B844D81}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A0ACAB64-B9CF-463F-8F91-03C27B844D81}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A0ACAB64-B9CF-463F-8F91-03C27B844D81}.Release|Any CPU.Build.0 = Release|Any CPU + {C9E4ED0B-7843-41C3-8B7B-A26FFEFDE2D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C9E4ED0B-7843-41C3-8B7B-A26FFEFDE2D5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C9E4ED0B-7843-41C3-8B7B-A26FFEFDE2D5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C9E4ED0B-7843-41C3-8B7B-A26FFEFDE2D5}.Release|Any CPU.Build.0 = Release|Any CPU + {15494052-EEA2-495F-8B49-CD5106285B5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {15494052-EEA2-495F-8B49-CD5106285B5B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {15494052-EEA2-495F-8B49-CD5106285B5B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {15494052-EEA2-495F-8B49-CD5106285B5B}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {79CE8C7E-A4AF-413C-A54D-86F17073559C} = {4DE63935-DCA9-4D63-9C1F-AAE79C89CA8B} + {CB373FE5-F976-4CB2-A04E-6188D67A5816} = {4DE63935-DCA9-4D63-9C1F-AAE79C89CA8B} {9052AC86-4B89-4311-BEF2-7C49FB72DC0F} = {7631380A-FB73-4241-9987-0891A21E9769} - {FA353FC1-2D03-426A-8973-0CDA8DF5E5DD} = {548DF5F7-790C-4A1C-89EB-BD904CA1BA86} {D6778DF4-DA03-43E7-BD9D-2E2C35DCCE7F} = {7631380A-FB73-4241-9987-0891A21E9769} + {7FC1EF40-C815-4046-956E-79E9A359BC46} = {7631380A-FB73-4241-9987-0891A21E9769} + {EF2C8F2A-6088-4A89-9AE2-9C2FDFB0241C} = {7631380A-FB73-4241-9987-0891A21E9769} + {DB82EB74-4E33-4552-968C-C159FA5F58D1} = {7631380A-FB73-4241-9987-0891A21E9769} + {F2B87668-F1C2-48ED-B91F-7BB03EA5F9A0} = {7631380A-FB73-4241-9987-0891A21E9769} + {EF6988FC-AE49-4E27-910F-A06434211988} = {7631380A-FB73-4241-9987-0891A21E9769} + {69D08457-EC2F-4BC8-A562-6154C2D6D2DC} = {7631380A-FB73-4241-9987-0891A21E9769} + {FA353FC1-2D03-426A-8973-0CDA8DF5E5DD} = {548DF5F7-790C-4A1C-89EB-BD904CA1BA86} {527CCF66-AC37-487C-871E-A4F6B94E1731} = {548DF5F7-790C-4A1C-89EB-BD904CA1BA86} + {305A2903-7F06-48C7-92B6-B9D11B34DCC0} = {548DF5F7-790C-4A1C-89EB-BD904CA1BA86} {0588387D-FB65-4BA9-A8B2-DA6790027CC2} = {548DF5F7-790C-4A1C-89EB-BD904CA1BA86} - {EF2C8F2A-6088-4A89-9AE2-9C2FDFB0241C} = {7631380A-FB73-4241-9987-0891A21E9769} - {CB373FE5-F976-4CB2-A04E-6188D67A5816} = {4DE63935-DCA9-4D63-9C1F-AAE79C89CA8B} + {D2AF2EAB-409E-48B8-8D48-BE21719FCAF2} = {548DF5F7-790C-4A1C-89EB-BD904CA1BA86} + {3C3BAA89-2A16-46D8-B50B-101174989814} = {548DF5F7-790C-4A1C-89EB-BD904CA1BA86} + {A4117DE8-D141-4B09-9A83-4FA4E497FECC} = {548DF5F7-790C-4A1C-89EB-BD904CA1BA86} + {AA2E94ED-4C40-4028-84E5-7459EDB8F66E} = {D64F512B-CF20-4CE0-8FE8-1E65C1A84E90} + {40058320-9546-45A9-9D6E-CC80EB2E4D95} = {D64F512B-CF20-4CE0-8FE8-1E65C1A84E90} + {2DB6B79C-C8B4-428F-AC57-1B5947C75021} = {D64F512B-CF20-4CE0-8FE8-1E65C1A84E90} + {25420CB4-919B-4299-A8CB-1190E22438F2} = {D64F512B-CF20-4CE0-8FE8-1E65C1A84E90} + {50B9EFE8-8D38-4D22-9423-F27356D8EFA7} = {D4B78CD9-7251-426B-AA22-48BC8EDD396A} + {67447640-728F-4EEE-B72C-D50AD846D633} = {D4B78CD9-7251-426B-AA22-48BC8EDD396A} + {D4B78CD9-7251-426B-AA22-48BC8EDD396A} = {CAFF07D6-5F29-4D97-9618-78EC8B9BA082} + {A0ACAB64-B9CF-463F-8F91-03C27B844D81} = {5B72137B-CC84-4E53-A26C-A5340E6705E4} + {C9E4ED0B-7843-41C3-8B7B-A26FFEFDE2D5} = {5B72137B-CC84-4E53-A26C-A5340E6705E4} + {5B72137B-CC84-4E53-A26C-A5340E6705E4} = {CAFF07D6-5F29-4D97-9618-78EC8B9BA082} + {15494052-EEA2-495F-8B49-CD5106285B5B} = {4DD04777-7D32-4165-B249-8F1719787B81} + {4DD04777-7D32-4165-B249-8F1719787B81} = {CAFF07D6-5F29-4D97-9618-78EC8B9BA082} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {450DA749-CBDC-4BDC-950F-8A491CF59D49} diff --git a/src/libraries/Microsoft.Extensions.Diagnostics/Microsoft.Extensions.Diagnostics.sln b/src/libraries/Microsoft.Extensions.Diagnostics/Microsoft.Extensions.Diagnostics.sln index 5b249c373b11c6..ebc921037a6d05 100644 --- a/src/libraries/Microsoft.Extensions.Diagnostics/Microsoft.Extensions.Diagnostics.sln +++ b/src/libraries/Microsoft.Extensions.Diagnostics/Microsoft.Extensions.Diagnostics.sln @@ -1,14 +1,24 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.6.33801.468 -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", "{B6663ACE-6FE4-4BB4-8B35-AB98EF62EAAE}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.AsyncInterfaces", "..\Microsoft.Bcl.AsyncInterfaces\ref\Microsoft.Bcl.AsyncInterfaces.csproj", "{E7A3B914-598D-4ABC-B973-6CC444DAFE52}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.AsyncInterfaces", "..\Microsoft.Bcl.AsyncInterfaces\src\Microsoft.Bcl.AsyncInterfaces.csproj", "{280FDDEA-50B1-4BD3-83B1-475B15829538}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Configuration.Abstractions", "..\Microsoft.Extensions.Configuration.Abstractions\ref\Microsoft.Extensions.Configuration.Abstractions.csproj", "{2D529E61-474E-45C6-8A7E-35AAD70B9801}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Configuration.Abstractions", "..\Microsoft.Extensions.Configuration.Abstractions\src\Microsoft.Extensions.Configuration.Abstractions.csproj", "{30E93D8B-4B53-4DC1-A5E3-FCAC1E37303D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Configuration.Binder.SourceGeneration", "..\Microsoft.Extensions.Configuration.Binder\gen\Microsoft.Extensions.Configuration.Binder.SourceGeneration.csproj", "{1F3CFA6D-3142-4616-8A46-F05C7BBF1EC6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Configuration.Binder", "..\Microsoft.Extensions.Configuration.Binder\ref\Microsoft.Extensions.Configuration.Binder.csproj", "{D835A0A8-C213-461F-8B41-6F2715DBEC43}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Configuration.Binder", "..\Microsoft.Extensions.Configuration.Binder\src\Microsoft.Extensions.Configuration.Binder.csproj", "{ECF14067-8633-4DDA-8EAE-124989F8E09E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Configuration", "..\Microsoft.Extensions.Configuration\ref\Microsoft.Extensions.Configuration.csproj", "{57AF678A-3671-4B9E-9608-053E2197D0A4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Configuration", "..\Microsoft.Extensions.Configuration\src\Microsoft.Extensions.Configuration.csproj", "{A77E804D-4576-4962-A248-92E538ED997C}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyInjection.Abstractions", "..\Microsoft.Extensions.DependencyInjection.Abstractions\ref\Microsoft.Extensions.DependencyInjection.Abstractions.csproj", "{CE53C256-EE31-4E4A-8A05-70350840448F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyInjection.Abstractions", "..\Microsoft.Extensions.DependencyInjection.Abstractions\src\Microsoft.Extensions.DependencyInjection.Abstractions.csproj", "{3B8833A4-2E9E-47BD-93DE-65934DCEB9A6}" @@ -17,61 +27,67 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Depend EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyInjection", "..\Microsoft.Extensions.DependencyInjection\src\Microsoft.Extensions.DependencyInjection.csproj", "{1D851FA7-2F3C-4E3C-8F22-AF5E13D9BEE6}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics.Abstractions", "..\Microsoft.Extensions.Diagnostics.Abstractions\ref\Microsoft.Extensions.Diagnostics.Abstractions.csproj", "{AA790584-200C-4301-8545-8B2854B2F6CC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics.Abstractions", "..\Microsoft.Extensions.Diagnostics.Abstractions\src\Microsoft.Extensions.Diagnostics.Abstractions.csproj", "{40525D17-4553-405E-8B21-4603B07D126A}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics", "ref\Microsoft.Extensions.Diagnostics.csproj", "{EF75497C-6CB7-4471-980A-619EA1AB8CF6}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics", "src\Microsoft.Extensions.Diagnostics.csproj", "{09E28D94-B771-48EB-800C-5A80C2C0055C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics.Tests", "tests\Microsoft.Extensions.Diagnostics.Tests.csproj", "{43DBAD84-A865-4F5F-AB76-7F3EB6784E99}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.DiagnosticSource", "..\System.Diagnostics.DiagnosticSource\ref\System.Diagnostics.DiagnosticSource.csproj", "{F452AA57-7BEC-4E64-BAB5-166078865EC4}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.ConfigurationExtensions", "..\Microsoft.Extensions.Options.ConfigurationExtensions\ref\Microsoft.Extensions.Options.ConfigurationExtensions.csproj", "{F2C0D619-8CAF-4F81-B681-3F75AF79661F}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.DiagnosticSource", "..\System.Diagnostics.DiagnosticSource\src\System.Diagnostics.DiagnosticSource.csproj", "{AE5566CE-EC5E-47B0-B5A3-89E90B3893F0}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.ConfigurationExtensions", "..\Microsoft.Extensions.Options.ConfigurationExtensions\src\Microsoft.Extensions.Options.ConfigurationExtensions.csproj", "{A2853038-B04A-4BAA-B0B4-0481457003B8}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{ED105ED3-0060-4035-AD5E-1F857F94C2DF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.SourceGeneration", "..\Microsoft.Extensions.Options\gen\Microsoft.Extensions.Options.SourceGeneration.csproj", "{14375EFA-3F3D-4D48-8C83-56356BCF8DB3}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{0A0D7CB1-3864-478F-98FC-5AA53C6A72C2}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\ref\Microsoft.Extensions.Options.csproj", "{DBAB1C82-A3A0-4ADC-95BC-B87557C61C42}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{3FEA305D-0B5F-46A6-8E18-587387FCBFBF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\src\Microsoft.Extensions.Options.csproj", "{B233AB55-788C-48B6-9557-098B8D0DDBFF}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{3D040E9F-C39B-49C6-8C87-68D427AECA8F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primitives", "..\Microsoft.Extensions.Primitives\ref\Microsoft.Extensions.Primitives.csproj", "{6BB43905-3DBD-47E4-A38F-2BE319300B15}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{76DC9C4C-EE53-47E6-B6BF-7B135EA8CAF3}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primitives", "..\Microsoft.Extensions.Primitives\src\Microsoft.Extensions.Primitives.csproj", "{711B2905-FDC7-4D67-B40B-9DEFF042CB01}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{9BF048D0-411D-4C2A-8C32-3A3255501D27}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.DiagnosticSource", "..\System.Diagnostics.DiagnosticSource\ref\System.Diagnostics.DiagnosticSource.csproj", "{F452AA57-7BEC-4E64-BAB5-166078865EC4}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A447D0CB-601B-479E-A2B2-76E48F5D4D61}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.DiagnosticSource", "..\System.Diagnostics.DiagnosticSource\src\System.Diagnostics.DiagnosticSource.csproj", "{AE5566CE-EC5E-47B0-B5A3-89E90B3893F0}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{66953A8A-9E31-486F-AF8E-7310F6707E4F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{ED105ED3-0060-4035-AD5E-1F857F94C2DF}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics.Abstractions", "..\Microsoft.Extensions.Diagnostics.Abstractions\ref\Microsoft.Extensions.Diagnostics.Abstractions.csproj", "{AA790584-200C-4301-8545-8B2854B2F6CC}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{0A0D7CB1-3864-478F-98FC-5AA53C6A72C2}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics.Abstractions", "..\Microsoft.Extensions.Diagnostics.Abstractions\src\Microsoft.Extensions.Diagnostics.Abstractions.csproj", "{40525D17-4553-405E-8B21-4603B07D126A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{3FEA305D-0B5F-46A6-8E18-587387FCBFBF}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Configuration.Abstractions", "..\Microsoft.Extensions.Configuration.Abstractions\ref\Microsoft.Extensions.Configuration.Abstractions.csproj", "{2D529E61-474E-45C6-8A7E-35AAD70B9801}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{3D040E9F-C39B-49C6-8C87-68D427AECA8F}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Configuration.Abstractions", "..\Microsoft.Extensions.Configuration.Abstractions\src\Microsoft.Extensions.Configuration.Abstractions.csproj", "{30E93D8B-4B53-4DC1-A5E3-FCAC1E37303D}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{5AA24760-2385-4BFA-B32C-9AF2BCE647AB}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics.Abstractions.Tests", "..\Microsoft.Extensions.Diagnostics.Abstractions\tests\Microsoft.Extensions.Diagnostics.Abstractions.Tests.csproj", "{2DC4F9C2-7C2B-4B8C-9AB3-74F3F06D359B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{62124842-8535-4697-896E-1D3177F8D501}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.ConfigurationExtensions", "..\Microsoft.Extensions.Options.ConfigurationExtensions\src\Microsoft.Extensions.Options.ConfigurationExtensions.csproj", "{A2853038-B04A-4BAA-B0B4-0481457003B8}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{852F0BAC-D11B-4A19-B1CC-1EED41C7AA22}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Configuration", "..\Microsoft.Extensions.Configuration\src\Microsoft.Extensions.Configuration.csproj", "{A77E804D-4576-4962-A248-92E538ED997C}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{063D2ABE-3766-42D4-9C3C-0C6B78C7D744}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\ref\Microsoft.Extensions.Options.csproj", "{DBAB1C82-A3A0-4ADC-95BC-B87557C61C42}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{3A80CEDD-891C-4867-9AD1-4A1734DBD34F}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primitives", "..\Microsoft.Extensions.Primitives\ref\Microsoft.Extensions.Primitives.csproj", "{6BB43905-3DBD-47E4-A38F-2BE319300B15}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{76DC9C4C-EE53-47E6-B6BF-7B135EA8CAF3}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primitives", "..\Microsoft.Extensions.Primitives\src\Microsoft.Extensions.Primitives.csproj", "{711B2905-FDC7-4D67-B40B-9DEFF042CB01}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{9BF048D0-411D-4C2A-8C32-3A3255501D27}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\src\Microsoft.Extensions.Options.csproj", "{B233AB55-788C-48B6-9557-098B8D0DDBFF}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A447D0CB-601B-479E-A2B2-76E48F5D4D61}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Configuration.Binder", "..\Microsoft.Extensions.Configuration.Binder\src\Microsoft.Extensions.Configuration.Binder.csproj", "{ECF14067-8633-4DDA-8EAE-124989F8E09E}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{66953A8A-9E31-486F-AF8E-7310F6707E4F}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Configuration.Binder", "..\Microsoft.Extensions.Configuration.Binder\ref\Microsoft.Extensions.Configuration.Binder.csproj", "{D835A0A8-C213-461F-8B41-6F2715DBEC43}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{C3E784CB-8296-4960-B679-9A5D3153D5B5}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.ConfigurationExtensions", "..\Microsoft.Extensions.Options.ConfigurationExtensions\ref\Microsoft.Extensions.Options.ConfigurationExtensions.csproj", "{F2C0D619-8CAF-4F81-B681-3F75AF79661F}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{0D3332C5-9EE4-4051-BD99-EEC2036C3E80}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Configuration", "..\Microsoft.Extensions.Configuration\ref\Microsoft.Extensions.Configuration.csproj", "{57AF678A-3671-4B9E-9608-053E2197D0A4}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{F30454AC-DA27-4412-BFC2-C43498B6B304}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{BAA0DDCC-9BB2-4535-9DE8-6B2DE3E7F65F}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -91,6 +107,34 @@ Global {280FDDEA-50B1-4BD3-83B1-475B15829538}.Debug|Any CPU.Build.0 = Debug|Any CPU {280FDDEA-50B1-4BD3-83B1-475B15829538}.Release|Any CPU.ActiveCfg = Release|Any CPU {280FDDEA-50B1-4BD3-83B1-475B15829538}.Release|Any CPU.Build.0 = Release|Any CPU + {2D529E61-474E-45C6-8A7E-35AAD70B9801}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2D529E61-474E-45C6-8A7E-35AAD70B9801}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2D529E61-474E-45C6-8A7E-35AAD70B9801}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2D529E61-474E-45C6-8A7E-35AAD70B9801}.Release|Any CPU.Build.0 = Release|Any CPU + {30E93D8B-4B53-4DC1-A5E3-FCAC1E37303D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {30E93D8B-4B53-4DC1-A5E3-FCAC1E37303D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {30E93D8B-4B53-4DC1-A5E3-FCAC1E37303D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {30E93D8B-4B53-4DC1-A5E3-FCAC1E37303D}.Release|Any CPU.Build.0 = Release|Any CPU + {1F3CFA6D-3142-4616-8A46-F05C7BBF1EC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F3CFA6D-3142-4616-8A46-F05C7BBF1EC6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F3CFA6D-3142-4616-8A46-F05C7BBF1EC6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F3CFA6D-3142-4616-8A46-F05C7BBF1EC6}.Release|Any CPU.Build.0 = Release|Any CPU + {D835A0A8-C213-461F-8B41-6F2715DBEC43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D835A0A8-C213-461F-8B41-6F2715DBEC43}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D835A0A8-C213-461F-8B41-6F2715DBEC43}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D835A0A8-C213-461F-8B41-6F2715DBEC43}.Release|Any CPU.Build.0 = Release|Any CPU + {ECF14067-8633-4DDA-8EAE-124989F8E09E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ECF14067-8633-4DDA-8EAE-124989F8E09E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ECF14067-8633-4DDA-8EAE-124989F8E09E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ECF14067-8633-4DDA-8EAE-124989F8E09E}.Release|Any CPU.Build.0 = Release|Any CPU + {57AF678A-3671-4B9E-9608-053E2197D0A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {57AF678A-3671-4B9E-9608-053E2197D0A4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {57AF678A-3671-4B9E-9608-053E2197D0A4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {57AF678A-3671-4B9E-9608-053E2197D0A4}.Release|Any CPU.Build.0 = Release|Any CPU + {A77E804D-4576-4962-A248-92E538ED997C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A77E804D-4576-4962-A248-92E538ED997C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A77E804D-4576-4962-A248-92E538ED997C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A77E804D-4576-4962-A248-92E538ED997C}.Release|Any CPU.Build.0 = Release|Any CPU {CE53C256-EE31-4E4A-8A05-70350840448F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CE53C256-EE31-4E4A-8A05-70350840448F}.Debug|Any CPU.Build.0 = Debug|Any CPU {CE53C256-EE31-4E4A-8A05-70350840448F}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -107,6 +151,14 @@ Global {1D851FA7-2F3C-4E3C-8F22-AF5E13D9BEE6}.Debug|Any CPU.Build.0 = Debug|Any CPU {1D851FA7-2F3C-4E3C-8F22-AF5E13D9BEE6}.Release|Any CPU.ActiveCfg = Release|Any CPU {1D851FA7-2F3C-4E3C-8F22-AF5E13D9BEE6}.Release|Any CPU.Build.0 = Release|Any CPU + {AA790584-200C-4301-8545-8B2854B2F6CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AA790584-200C-4301-8545-8B2854B2F6CC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AA790584-200C-4301-8545-8B2854B2F6CC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AA790584-200C-4301-8545-8B2854B2F6CC}.Release|Any CPU.Build.0 = Release|Any CPU + {40525D17-4553-405E-8B21-4603B07D126A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {40525D17-4553-405E-8B21-4603B07D126A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {40525D17-4553-405E-8B21-4603B07D126A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {40525D17-4553-405E-8B21-4603B07D126A}.Release|Any CPU.Build.0 = Release|Any CPU {EF75497C-6CB7-4471-980A-619EA1AB8CF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EF75497C-6CB7-4471-980A-619EA1AB8CF6}.Debug|Any CPU.Build.0 = Debug|Any CPU {EF75497C-6CB7-4471-980A-619EA1AB8CF6}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -119,6 +171,34 @@ Global {43DBAD84-A865-4F5F-AB76-7F3EB6784E99}.Debug|Any CPU.Build.0 = Debug|Any CPU {43DBAD84-A865-4F5F-AB76-7F3EB6784E99}.Release|Any CPU.ActiveCfg = Release|Any CPU {43DBAD84-A865-4F5F-AB76-7F3EB6784E99}.Release|Any CPU.Build.0 = Release|Any CPU + {F2C0D619-8CAF-4F81-B681-3F75AF79661F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F2C0D619-8CAF-4F81-B681-3F75AF79661F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F2C0D619-8CAF-4F81-B681-3F75AF79661F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F2C0D619-8CAF-4F81-B681-3F75AF79661F}.Release|Any CPU.Build.0 = Release|Any CPU + {A2853038-B04A-4BAA-B0B4-0481457003B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A2853038-B04A-4BAA-B0B4-0481457003B8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A2853038-B04A-4BAA-B0B4-0481457003B8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A2853038-B04A-4BAA-B0B4-0481457003B8}.Release|Any CPU.Build.0 = Release|Any CPU + {14375EFA-3F3D-4D48-8C83-56356BCF8DB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {14375EFA-3F3D-4D48-8C83-56356BCF8DB3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {14375EFA-3F3D-4D48-8C83-56356BCF8DB3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {14375EFA-3F3D-4D48-8C83-56356BCF8DB3}.Release|Any CPU.Build.0 = Release|Any CPU + {DBAB1C82-A3A0-4ADC-95BC-B87557C61C42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DBAB1C82-A3A0-4ADC-95BC-B87557C61C42}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DBAB1C82-A3A0-4ADC-95BC-B87557C61C42}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DBAB1C82-A3A0-4ADC-95BC-B87557C61C42}.Release|Any CPU.Build.0 = Release|Any CPU + {B233AB55-788C-48B6-9557-098B8D0DDBFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B233AB55-788C-48B6-9557-098B8D0DDBFF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B233AB55-788C-48B6-9557-098B8D0DDBFF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B233AB55-788C-48B6-9557-098B8D0DDBFF}.Release|Any CPU.Build.0 = Release|Any CPU + {6BB43905-3DBD-47E4-A38F-2BE319300B15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6BB43905-3DBD-47E4-A38F-2BE319300B15}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6BB43905-3DBD-47E4-A38F-2BE319300B15}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6BB43905-3DBD-47E4-A38F-2BE319300B15}.Release|Any CPU.Build.0 = Release|Any CPU + {711B2905-FDC7-4D67-B40B-9DEFF042CB01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {711B2905-FDC7-4D67-B40B-9DEFF042CB01}.Debug|Any CPU.Build.0 = Debug|Any CPU + {711B2905-FDC7-4D67-B40B-9DEFF042CB01}.Release|Any CPU.ActiveCfg = Release|Any CPU + {711B2905-FDC7-4D67-B40B-9DEFF042CB01}.Release|Any CPU.Build.0 = Release|Any CPU {F452AA57-7BEC-4E64-BAB5-166078865EC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F452AA57-7BEC-4E64-BAB5-166078865EC4}.Debug|Any CPU.Build.0 = Debug|Any CPU {F452AA57-7BEC-4E64-BAB5-166078865EC4}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -143,102 +223,71 @@ Global {3D040E9F-C39B-49C6-8C87-68D427AECA8F}.Debug|Any CPU.Build.0 = Debug|Any CPU {3D040E9F-C39B-49C6-8C87-68D427AECA8F}.Release|Any CPU.ActiveCfg = Release|Any CPU {3D040E9F-C39B-49C6-8C87-68D427AECA8F}.Release|Any CPU.Build.0 = Release|Any CPU - {AA790584-200C-4301-8545-8B2854B2F6CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AA790584-200C-4301-8545-8B2854B2F6CC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AA790584-200C-4301-8545-8B2854B2F6CC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AA790584-200C-4301-8545-8B2854B2F6CC}.Release|Any CPU.Build.0 = Release|Any CPU - {40525D17-4553-405E-8B21-4603B07D126A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {40525D17-4553-405E-8B21-4603B07D126A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {40525D17-4553-405E-8B21-4603B07D126A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {40525D17-4553-405E-8B21-4603B07D126A}.Release|Any CPU.Build.0 = Release|Any CPU - {2D529E61-474E-45C6-8A7E-35AAD70B9801}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2D529E61-474E-45C6-8A7E-35AAD70B9801}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2D529E61-474E-45C6-8A7E-35AAD70B9801}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2D529E61-474E-45C6-8A7E-35AAD70B9801}.Release|Any CPU.Build.0 = Release|Any CPU - {30E93D8B-4B53-4DC1-A5E3-FCAC1E37303D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {30E93D8B-4B53-4DC1-A5E3-FCAC1E37303D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {30E93D8B-4B53-4DC1-A5E3-FCAC1E37303D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {30E93D8B-4B53-4DC1-A5E3-FCAC1E37303D}.Release|Any CPU.Build.0 = Release|Any CPU - {2DC4F9C2-7C2B-4B8C-9AB3-74F3F06D359B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2DC4F9C2-7C2B-4B8C-9AB3-74F3F06D359B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2DC4F9C2-7C2B-4B8C-9AB3-74F3F06D359B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2DC4F9C2-7C2B-4B8C-9AB3-74F3F06D359B}.Release|Any CPU.Build.0 = Release|Any CPU - {A2853038-B04A-4BAA-B0B4-0481457003B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A2853038-B04A-4BAA-B0B4-0481457003B8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A2853038-B04A-4BAA-B0B4-0481457003B8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A2853038-B04A-4BAA-B0B4-0481457003B8}.Release|Any CPU.Build.0 = Release|Any CPU - {A77E804D-4576-4962-A248-92E538ED997C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A77E804D-4576-4962-A248-92E538ED997C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A77E804D-4576-4962-A248-92E538ED997C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A77E804D-4576-4962-A248-92E538ED997C}.Release|Any CPU.Build.0 = Release|Any CPU - {DBAB1C82-A3A0-4ADC-95BC-B87557C61C42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DBAB1C82-A3A0-4ADC-95BC-B87557C61C42}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DBAB1C82-A3A0-4ADC-95BC-B87557C61C42}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DBAB1C82-A3A0-4ADC-95BC-B87557C61C42}.Release|Any CPU.Build.0 = Release|Any CPU - {6BB43905-3DBD-47E4-A38F-2BE319300B15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6BB43905-3DBD-47E4-A38F-2BE319300B15}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6BB43905-3DBD-47E4-A38F-2BE319300B15}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6BB43905-3DBD-47E4-A38F-2BE319300B15}.Release|Any CPU.Build.0 = Release|Any CPU - {711B2905-FDC7-4D67-B40B-9DEFF042CB01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {711B2905-FDC7-4D67-B40B-9DEFF042CB01}.Debug|Any CPU.Build.0 = Debug|Any CPU - {711B2905-FDC7-4D67-B40B-9DEFF042CB01}.Release|Any CPU.ActiveCfg = Release|Any CPU - {711B2905-FDC7-4D67-B40B-9DEFF042CB01}.Release|Any CPU.Build.0 = Release|Any CPU - {B233AB55-788C-48B6-9557-098B8D0DDBFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B233AB55-788C-48B6-9557-098B8D0DDBFF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B233AB55-788C-48B6-9557-098B8D0DDBFF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B233AB55-788C-48B6-9557-098B8D0DDBFF}.Release|Any CPU.Build.0 = Release|Any CPU - {ECF14067-8633-4DDA-8EAE-124989F8E09E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {ECF14067-8633-4DDA-8EAE-124989F8E09E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {ECF14067-8633-4DDA-8EAE-124989F8E09E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {ECF14067-8633-4DDA-8EAE-124989F8E09E}.Release|Any CPU.Build.0 = Release|Any CPU - {D835A0A8-C213-461F-8B41-6F2715DBEC43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D835A0A8-C213-461F-8B41-6F2715DBEC43}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D835A0A8-C213-461F-8B41-6F2715DBEC43}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D835A0A8-C213-461F-8B41-6F2715DBEC43}.Release|Any CPU.Build.0 = Release|Any CPU - {F2C0D619-8CAF-4F81-B681-3F75AF79661F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F2C0D619-8CAF-4F81-B681-3F75AF79661F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F2C0D619-8CAF-4F81-B681-3F75AF79661F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F2C0D619-8CAF-4F81-B681-3F75AF79661F}.Release|Any CPU.Build.0 = Release|Any CPU - {57AF678A-3671-4B9E-9608-053E2197D0A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {57AF678A-3671-4B9E-9608-053E2197D0A4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {57AF678A-3671-4B9E-9608-053E2197D0A4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {57AF678A-3671-4B9E-9608-053E2197D0A4}.Release|Any CPU.Build.0 = Release|Any CPU + {5AA24760-2385-4BFA-B32C-9AF2BCE647AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5AA24760-2385-4BFA-B32C-9AF2BCE647AB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5AA24760-2385-4BFA-B32C-9AF2BCE647AB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5AA24760-2385-4BFA-B32C-9AF2BCE647AB}.Release|Any CPU.Build.0 = Release|Any CPU + {62124842-8535-4697-896E-1D3177F8D501}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {62124842-8535-4697-896E-1D3177F8D501}.Debug|Any CPU.Build.0 = Debug|Any CPU + {62124842-8535-4697-896E-1D3177F8D501}.Release|Any CPU.ActiveCfg = Release|Any CPU + {62124842-8535-4697-896E-1D3177F8D501}.Release|Any CPU.Build.0 = Release|Any CPU + {852F0BAC-D11B-4A19-B1CC-1EED41C7AA22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {852F0BAC-D11B-4A19-B1CC-1EED41C7AA22}.Debug|Any CPU.Build.0 = Debug|Any CPU + {852F0BAC-D11B-4A19-B1CC-1EED41C7AA22}.Release|Any CPU.ActiveCfg = Release|Any CPU + {852F0BAC-D11B-4A19-B1CC-1EED41C7AA22}.Release|Any CPU.Build.0 = Release|Any CPU + {063D2ABE-3766-42D4-9C3C-0C6B78C7D744}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {063D2ABE-3766-42D4-9C3C-0C6B78C7D744}.Debug|Any CPU.Build.0 = Debug|Any CPU + {063D2ABE-3766-42D4-9C3C-0C6B78C7D744}.Release|Any CPU.ActiveCfg = Release|Any CPU + {063D2ABE-3766-42D4-9C3C-0C6B78C7D744}.Release|Any CPU.Build.0 = Release|Any CPU + {3A80CEDD-891C-4867-9AD1-4A1734DBD34F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3A80CEDD-891C-4867-9AD1-4A1734DBD34F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3A80CEDD-891C-4867-9AD1-4A1734DBD34F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3A80CEDD-891C-4867-9AD1-4A1734DBD34F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {B6663ACE-6FE4-4BB4-8B35-AB98EF62EAAE} = {76DC9C4C-EE53-47E6-B6BF-7B135EA8CAF3} + {43DBAD84-A865-4F5F-AB76-7F3EB6784E99} = {76DC9C4C-EE53-47E6-B6BF-7B135EA8CAF3} {E7A3B914-598D-4ABC-B973-6CC444DAFE52} = {9BF048D0-411D-4C2A-8C32-3A3255501D27} - {280FDDEA-50B1-4BD3-83B1-475B15829538} = {A447D0CB-601B-479E-A2B2-76E48F5D4D61} + {2D529E61-474E-45C6-8A7E-35AAD70B9801} = {9BF048D0-411D-4C2A-8C32-3A3255501D27} + {D835A0A8-C213-461F-8B41-6F2715DBEC43} = {9BF048D0-411D-4C2A-8C32-3A3255501D27} + {57AF678A-3671-4B9E-9608-053E2197D0A4} = {9BF048D0-411D-4C2A-8C32-3A3255501D27} {CE53C256-EE31-4E4A-8A05-70350840448F} = {9BF048D0-411D-4C2A-8C32-3A3255501D27} - {3B8833A4-2E9E-47BD-93DE-65934DCEB9A6} = {A447D0CB-601B-479E-A2B2-76E48F5D4D61} {C175A982-E0E0-4E22-8A3B-0A9C00EE7730} = {9BF048D0-411D-4C2A-8C32-3A3255501D27} - {1D851FA7-2F3C-4E3C-8F22-AF5E13D9BEE6} = {A447D0CB-601B-479E-A2B2-76E48F5D4D61} + {AA790584-200C-4301-8545-8B2854B2F6CC} = {9BF048D0-411D-4C2A-8C32-3A3255501D27} {EF75497C-6CB7-4471-980A-619EA1AB8CF6} = {9BF048D0-411D-4C2A-8C32-3A3255501D27} - {09E28D94-B771-48EB-800C-5A80C2C0055C} = {A447D0CB-601B-479E-A2B2-76E48F5D4D61} - {43DBAD84-A865-4F5F-AB76-7F3EB6784E99} = {76DC9C4C-EE53-47E6-B6BF-7B135EA8CAF3} + {F2C0D619-8CAF-4F81-B681-3F75AF79661F} = {9BF048D0-411D-4C2A-8C32-3A3255501D27} + {DBAB1C82-A3A0-4ADC-95BC-B87557C61C42} = {9BF048D0-411D-4C2A-8C32-3A3255501D27} + {6BB43905-3DBD-47E4-A38F-2BE319300B15} = {9BF048D0-411D-4C2A-8C32-3A3255501D27} {F452AA57-7BEC-4E64-BAB5-166078865EC4} = {9BF048D0-411D-4C2A-8C32-3A3255501D27} - {AE5566CE-EC5E-47B0-B5A3-89E90B3893F0} = {A447D0CB-601B-479E-A2B2-76E48F5D4D61} - {ED105ED3-0060-4035-AD5E-1F857F94C2DF} = {66953A8A-9E31-486F-AF8E-7310F6707E4F} - {0A0D7CB1-3864-478F-98FC-5AA53C6A72C2} = {66953A8A-9E31-486F-AF8E-7310F6707E4F} - {3FEA305D-0B5F-46A6-8E18-587387FCBFBF} = {66953A8A-9E31-486F-AF8E-7310F6707E4F} {3D040E9F-C39B-49C6-8C87-68D427AECA8F} = {9BF048D0-411D-4C2A-8C32-3A3255501D27} - {AA790584-200C-4301-8545-8B2854B2F6CC} = {9BF048D0-411D-4C2A-8C32-3A3255501D27} - {40525D17-4553-405E-8B21-4603B07D126A} = {A447D0CB-601B-479E-A2B2-76E48F5D4D61} - {2D529E61-474E-45C6-8A7E-35AAD70B9801} = {9BF048D0-411D-4C2A-8C32-3A3255501D27} + {280FDDEA-50B1-4BD3-83B1-475B15829538} = {A447D0CB-601B-479E-A2B2-76E48F5D4D61} {30E93D8B-4B53-4DC1-A5E3-FCAC1E37303D} = {A447D0CB-601B-479E-A2B2-76E48F5D4D61} - {2DC4F9C2-7C2B-4B8C-9AB3-74F3F06D359B} = {76DC9C4C-EE53-47E6-B6BF-7B135EA8CAF3} - {A2853038-B04A-4BAA-B0B4-0481457003B8} = {A447D0CB-601B-479E-A2B2-76E48F5D4D61} + {ECF14067-8633-4DDA-8EAE-124989F8E09E} = {A447D0CB-601B-479E-A2B2-76E48F5D4D61} {A77E804D-4576-4962-A248-92E538ED997C} = {A447D0CB-601B-479E-A2B2-76E48F5D4D61} - {DBAB1C82-A3A0-4ADC-95BC-B87557C61C42} = {9BF048D0-411D-4C2A-8C32-3A3255501D27} - {6BB43905-3DBD-47E4-A38F-2BE319300B15} = {9BF048D0-411D-4C2A-8C32-3A3255501D27} - {711B2905-FDC7-4D67-B40B-9DEFF042CB01} = {A447D0CB-601B-479E-A2B2-76E48F5D4D61} + {3B8833A4-2E9E-47BD-93DE-65934DCEB9A6} = {A447D0CB-601B-479E-A2B2-76E48F5D4D61} + {1D851FA7-2F3C-4E3C-8F22-AF5E13D9BEE6} = {A447D0CB-601B-479E-A2B2-76E48F5D4D61} + {40525D17-4553-405E-8B21-4603B07D126A} = {A447D0CB-601B-479E-A2B2-76E48F5D4D61} + {09E28D94-B771-48EB-800C-5A80C2C0055C} = {A447D0CB-601B-479E-A2B2-76E48F5D4D61} + {A2853038-B04A-4BAA-B0B4-0481457003B8} = {A447D0CB-601B-479E-A2B2-76E48F5D4D61} {B233AB55-788C-48B6-9557-098B8D0DDBFF} = {A447D0CB-601B-479E-A2B2-76E48F5D4D61} - {ECF14067-8633-4DDA-8EAE-124989F8E09E} = {A447D0CB-601B-479E-A2B2-76E48F5D4D61} - {D835A0A8-C213-461F-8B41-6F2715DBEC43} = {9BF048D0-411D-4C2A-8C32-3A3255501D27} - {F2C0D619-8CAF-4F81-B681-3F75AF79661F} = {9BF048D0-411D-4C2A-8C32-3A3255501D27} - {57AF678A-3671-4B9E-9608-053E2197D0A4} = {9BF048D0-411D-4C2A-8C32-3A3255501D27} + {711B2905-FDC7-4D67-B40B-9DEFF042CB01} = {A447D0CB-601B-479E-A2B2-76E48F5D4D61} + {AE5566CE-EC5E-47B0-B5A3-89E90B3893F0} = {A447D0CB-601B-479E-A2B2-76E48F5D4D61} + {1F3CFA6D-3142-4616-8A46-F05C7BBF1EC6} = {66953A8A-9E31-486F-AF8E-7310F6707E4F} + {14375EFA-3F3D-4D48-8C83-56356BCF8DB3} = {66953A8A-9E31-486F-AF8E-7310F6707E4F} + {ED105ED3-0060-4035-AD5E-1F857F94C2DF} = {66953A8A-9E31-486F-AF8E-7310F6707E4F} + {0A0D7CB1-3864-478F-98FC-5AA53C6A72C2} = {66953A8A-9E31-486F-AF8E-7310F6707E4F} + {3FEA305D-0B5F-46A6-8E18-587387FCBFBF} = {66953A8A-9E31-486F-AF8E-7310F6707E4F} + {5AA24760-2385-4BFA-B32C-9AF2BCE647AB} = {C3E784CB-8296-4960-B679-9A5D3153D5B5} + {62124842-8535-4697-896E-1D3177F8D501} = {C3E784CB-8296-4960-B679-9A5D3153D5B5} + {C3E784CB-8296-4960-B679-9A5D3153D5B5} = {BAA0DDCC-9BB2-4535-9DE8-6B2DE3E7F65F} + {852F0BAC-D11B-4A19-B1CC-1EED41C7AA22} = {0D3332C5-9EE4-4051-BD99-EEC2036C3E80} + {063D2ABE-3766-42D4-9C3C-0C6B78C7D744} = {0D3332C5-9EE4-4051-BD99-EEC2036C3E80} + {0D3332C5-9EE4-4051-BD99-EEC2036C3E80} = {BAA0DDCC-9BB2-4535-9DE8-6B2DE3E7F65F} + {3A80CEDD-891C-4867-9AD1-4A1734DBD34F} = {F30454AC-DA27-4412-BFC2-C43498B6B304} + {F30454AC-DA27-4412-BFC2-C43498B6B304} = {BAA0DDCC-9BB2-4535-9DE8-6B2DE3E7F65F} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {7D279EE5-E38F-4125-AE82-6ADE52D72F26} diff --git a/src/libraries/Microsoft.Extensions.Diagnostics/tests/MetricsSubscriptionManagerTests.cs b/src/libraries/Microsoft.Extensions.Diagnostics/tests/MetricsSubscriptionManagerTests.cs new file mode 100644 index 00000000000000..60049f6820e963 --- /dev/null +++ b/src/libraries/Microsoft.Extensions.Diagnostics/tests/MetricsSubscriptionManagerTests.cs @@ -0,0 +1,44 @@ +// 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.Metrics; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Diagnostics.Metrics; +using Microsoft.Extensions.Options; +using Xunit; + +namespace Microsoft.Extensions.Diagnostics.Tests +{ + public class MetricsSubscriptionManagerTests + { + [Fact] + public void AddMetrics_InitializesListeners() + { + var serviceCollection = new ServiceCollection(); + serviceCollection.AddMetrics(); // Duplicate call, should not add things twice. + serviceCollection.AddMetrics(l => l.AddListener()); + var serviceProvider = serviceCollection.BuildServiceProvider(); + + // Make sure the subscription manager is started. + serviceProvider.GetRequiredService().Validate(); + + var listeners = serviceProvider.GetRequiredService>(); + + var listener = Assert.Single(listeners); + var fakeListener = Assert.IsType(listener); + Assert.Equal(1, fakeListener.InitializeCount); + } + + private class FakeListener : IMetricsListener + { + public string Name => "Fake"; + public int InitializeCount { get; private set; } + public MeasurementHandlers GetMeasurementHandlers() => new MeasurementHandlers(); + public void Initialize(IObservableInstrumentsSource source) => InitializeCount++; + public bool InstrumentPublished(Instrument instrument, out object? userState) => throw new NotImplementedException(); + public void MeasurementsCompleted(Instrument instrument, object? userState) => throw new NotImplementedException(); + } + } +} diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/Microsoft.Extensions.FileProviders.Abstractions.sln b/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/Microsoft.Extensions.FileProviders.Abstractions.sln index 3904fbb3cc3f06..973340798318f5 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/Microsoft.Extensions.FileProviders.Abstractions.sln +++ b/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/Microsoft.Extensions.FileProviders.Abstractions.sln @@ -7,18 +7,34 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primit EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primitives", "..\Microsoft.Extensions.Primitives\src\Microsoft.Extensions.Primitives.csproj", "{E7FEEB55-F4A7-4677-AFD5-7DE90A4897AE}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{A138F8C7-DBF9-43D8-993D-D8B8609FAE2B}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{D84E4D42-84EA-41B1-A689-00E964FED8DD}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{4F62F683-8B2A-46EE-BC34-5CC192DE0C32}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{9CC188A7-707F-4B20-8B78-D66CC06BDA6B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{3E5B825A-F1D4-4068-B9A2-B3871E5DE574}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{68DD4E47-0A1E-46E0-BECB-CFBF26358D79}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{6C5C35AC-875D-44AB-AD37-080742F5B9E9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{C914EBC9-0C74-4163-ABCE-70DC5C976706}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{BE15F96C-8AA4-4F7D-9A69-9924531A6136}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D948D4F3-4232-4FEA-936D-5F554D335FEA}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{1EB544B8-7931-492C-BB70-82C96C195BCD}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{5BC2401B-E368-4524-85B1-5A6E2B80BB01}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{CEEC0CF7-E2D1-4AB5-B774-8E9780E7EA71}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{0FAD4E08-F95B-491E-B7F6-C951C5365F74}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{B1A7794E-65A0-427A-9D3B-5754217793AC}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -41,10 +57,6 @@ Global {E7FEEB55-F4A7-4677-AFD5-7DE90A4897AE}.Debug|Any CPU.Build.0 = Debug|Any CPU {E7FEEB55-F4A7-4677-AFD5-7DE90A4897AE}.Release|Any CPU.ActiveCfg = Release|Any CPU {E7FEEB55-F4A7-4677-AFD5-7DE90A4897AE}.Release|Any CPU.Build.0 = Release|Any CPU - {A138F8C7-DBF9-43D8-993D-D8B8609FAE2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A138F8C7-DBF9-43D8-993D-D8B8609FAE2B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A138F8C7-DBF9-43D8-993D-D8B8609FAE2B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A138F8C7-DBF9-43D8-993D-D8B8609FAE2B}.Release|Any CPU.Build.0 = Release|Any CPU {D84E4D42-84EA-41B1-A689-00E964FED8DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D84E4D42-84EA-41B1-A689-00E964FED8DD}.Debug|Any CPU.Build.0 = Debug|Any CPU {D84E4D42-84EA-41B1-A689-00E964FED8DD}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -53,6 +65,26 @@ Global {4F62F683-8B2A-46EE-BC34-5CC192DE0C32}.Debug|Any CPU.Build.0 = Debug|Any CPU {4F62F683-8B2A-46EE-BC34-5CC192DE0C32}.Release|Any CPU.ActiveCfg = Release|Any CPU {4F62F683-8B2A-46EE-BC34-5CC192DE0C32}.Release|Any CPU.Build.0 = Release|Any CPU + {9CC188A7-707F-4B20-8B78-D66CC06BDA6B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9CC188A7-707F-4B20-8B78-D66CC06BDA6B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9CC188A7-707F-4B20-8B78-D66CC06BDA6B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9CC188A7-707F-4B20-8B78-D66CC06BDA6B}.Release|Any CPU.Build.0 = Release|Any CPU + {3E5B825A-F1D4-4068-B9A2-B3871E5DE574}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3E5B825A-F1D4-4068-B9A2-B3871E5DE574}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3E5B825A-F1D4-4068-B9A2-B3871E5DE574}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3E5B825A-F1D4-4068-B9A2-B3871E5DE574}.Release|Any CPU.Build.0 = Release|Any CPU + {68DD4E47-0A1E-46E0-BECB-CFBF26358D79}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {68DD4E47-0A1E-46E0-BECB-CFBF26358D79}.Debug|Any CPU.Build.0 = Debug|Any CPU + {68DD4E47-0A1E-46E0-BECB-CFBF26358D79}.Release|Any CPU.ActiveCfg = Release|Any CPU + {68DD4E47-0A1E-46E0-BECB-CFBF26358D79}.Release|Any CPU.Build.0 = Release|Any CPU + {6C5C35AC-875D-44AB-AD37-080742F5B9E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6C5C35AC-875D-44AB-AD37-080742F5B9E9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6C5C35AC-875D-44AB-AD37-080742F5B9E9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6C5C35AC-875D-44AB-AD37-080742F5B9E9}.Release|Any CPU.Build.0 = Release|Any CPU + {C914EBC9-0C74-4163-ABCE-70DC5C976706}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C914EBC9-0C74-4163-ABCE-70DC5C976706}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C914EBC9-0C74-4163-ABCE-70DC5C976706}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C914EBC9-0C74-4163-ABCE-70DC5C976706}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -62,9 +94,16 @@ Global {F985DC40-F983-4464-B866-3BD17EE3B6B1} = {BE15F96C-8AA4-4F7D-9A69-9924531A6136} {DD99D42D-60FD-45D8-9F55-BE3AE38626D0} = {D948D4F3-4232-4FEA-936D-5F554D335FEA} {E7FEEB55-F4A7-4677-AFD5-7DE90A4897AE} = {D948D4F3-4232-4FEA-936D-5F554D335FEA} - {A138F8C7-DBF9-43D8-993D-D8B8609FAE2B} = {1EB544B8-7931-492C-BB70-82C96C195BCD} {D84E4D42-84EA-41B1-A689-00E964FED8DD} = {1EB544B8-7931-492C-BB70-82C96C195BCD} {4F62F683-8B2A-46EE-BC34-5CC192DE0C32} = {1EB544B8-7931-492C-BB70-82C96C195BCD} + {9CC188A7-707F-4B20-8B78-D66CC06BDA6B} = {5BC2401B-E368-4524-85B1-5A6E2B80BB01} + {3E5B825A-F1D4-4068-B9A2-B3871E5DE574} = {5BC2401B-E368-4524-85B1-5A6E2B80BB01} + {5BC2401B-E368-4524-85B1-5A6E2B80BB01} = {B1A7794E-65A0-427A-9D3B-5754217793AC} + {68DD4E47-0A1E-46E0-BECB-CFBF26358D79} = {CEEC0CF7-E2D1-4AB5-B774-8E9780E7EA71} + {6C5C35AC-875D-44AB-AD37-080742F5B9E9} = {CEEC0CF7-E2D1-4AB5-B774-8E9780E7EA71} + {CEEC0CF7-E2D1-4AB5-B774-8E9780E7EA71} = {B1A7794E-65A0-427A-9D3B-5754217793AC} + {C914EBC9-0C74-4163-ABCE-70DC5C976706} = {0FAD4E08-F95B-491E-B7F6-C951C5365F74} + {0FAD4E08-F95B-491E-B7F6-C951C5365F74} = {B1A7794E-65A0-427A-9D3B-5754217793AC} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {ADEB1F74-B672-4B9F-A221-7A548028621F} diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Composite/Microsoft.Extensions.FileProviders.Composite.sln b/src/libraries/Microsoft.Extensions.FileProviders.Composite/Microsoft.Extensions.FileProviders.Composite.sln index 0c7e2bc7fef204..08c8ed1d5dcccd 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Composite/Microsoft.Extensions.FileProviders.Composite.sln +++ b/src/libraries/Microsoft.Extensions.FileProviders.Composite/Microsoft.Extensions.FileProviders.Composite.sln @@ -15,12 +15,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primit EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primitives", "..\Microsoft.Extensions.Primitives\src\Microsoft.Extensions.Primitives.csproj", "{FC76C7E7-C2C3-43D0-99AE-C77E8402FBE3}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{2E4B702C-0850-4030-BC13-8C36F9171B93}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{79F0E6DD-E665-4CAD-9C1D-D3570DBDA5FB}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{9FA8F495-A781-4D1E-8793-EB08E862AA37}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{03B4234A-E0E5-41E8-9477-DD6BC1062931}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{CAC0C5B3-60CC-4F10-8BEC-DD9AE08F8A87}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{A77B5D0D-74E0-4EF4-AA41-60910A5ACC26}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{4B88EE77-3CC0-46F7-9F1F-113EE59B9B11}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{33CB0531-474C-4419-B49A-1550854FB27C}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{3237C857-6C3B-42C4-83B1-7AE4B4C74021}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{C329135D-8725-4ABA-A2AE-63F51114EAF5}" @@ -29,6 +37,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{998B15B4-464 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{94912E31-E514-4648-BD9F-3259A8116AC0}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{B6DA6974-633C-47A5-BE72-16549D0FBE8A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{3CF434A0-5238-4AAC-BD4D-74A78F634CE7}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{09E5A07D-B2F6-4690-9BC9-26D94B860D43}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{62343EA1-8A9C-43B2-86BC-F6922BCFFAC7}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -67,10 +83,6 @@ Global {FC76C7E7-C2C3-43D0-99AE-C77E8402FBE3}.Debug|Any CPU.Build.0 = Debug|Any CPU {FC76C7E7-C2C3-43D0-99AE-C77E8402FBE3}.Release|Any CPU.ActiveCfg = Release|Any CPU {FC76C7E7-C2C3-43D0-99AE-C77E8402FBE3}.Release|Any CPU.Build.0 = Release|Any CPU - {2E4B702C-0850-4030-BC13-8C36F9171B93}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2E4B702C-0850-4030-BC13-8C36F9171B93}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2E4B702C-0850-4030-BC13-8C36F9171B93}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2E4B702C-0850-4030-BC13-8C36F9171B93}.Release|Any CPU.Build.0 = Release|Any CPU {79F0E6DD-E665-4CAD-9C1D-D3570DBDA5FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {79F0E6DD-E665-4CAD-9C1D-D3570DBDA5FB}.Debug|Any CPU.Build.0 = Debug|Any CPU {79F0E6DD-E665-4CAD-9C1D-D3570DBDA5FB}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -79,6 +91,26 @@ Global {9FA8F495-A781-4D1E-8793-EB08E862AA37}.Debug|Any CPU.Build.0 = Debug|Any CPU {9FA8F495-A781-4D1E-8793-EB08E862AA37}.Release|Any CPU.ActiveCfg = Release|Any CPU {9FA8F495-A781-4D1E-8793-EB08E862AA37}.Release|Any CPU.Build.0 = Release|Any CPU + {03B4234A-E0E5-41E8-9477-DD6BC1062931}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {03B4234A-E0E5-41E8-9477-DD6BC1062931}.Debug|Any CPU.Build.0 = Debug|Any CPU + {03B4234A-E0E5-41E8-9477-DD6BC1062931}.Release|Any CPU.ActiveCfg = Release|Any CPU + {03B4234A-E0E5-41E8-9477-DD6BC1062931}.Release|Any CPU.Build.0 = Release|Any CPU + {CAC0C5B3-60CC-4F10-8BEC-DD9AE08F8A87}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CAC0C5B3-60CC-4F10-8BEC-DD9AE08F8A87}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CAC0C5B3-60CC-4F10-8BEC-DD9AE08F8A87}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CAC0C5B3-60CC-4F10-8BEC-DD9AE08F8A87}.Release|Any CPU.Build.0 = Release|Any CPU + {A77B5D0D-74E0-4EF4-AA41-60910A5ACC26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A77B5D0D-74E0-4EF4-AA41-60910A5ACC26}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A77B5D0D-74E0-4EF4-AA41-60910A5ACC26}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A77B5D0D-74E0-4EF4-AA41-60910A5ACC26}.Release|Any CPU.Build.0 = Release|Any CPU + {4B88EE77-3CC0-46F7-9F1F-113EE59B9B11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4B88EE77-3CC0-46F7-9F1F-113EE59B9B11}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4B88EE77-3CC0-46F7-9F1F-113EE59B9B11}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4B88EE77-3CC0-46F7-9F1F-113EE59B9B11}.Release|Any CPU.Build.0 = Release|Any CPU + {33CB0531-474C-4419-B49A-1550854FB27C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {33CB0531-474C-4419-B49A-1550854FB27C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {33CB0531-474C-4419-B49A-1550854FB27C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {33CB0531-474C-4419-B49A-1550854FB27C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -92,9 +124,16 @@ Global {4A904B1E-5710-4D31-A734-33C734C9D989} = {998B15B4-464F-40EB-92DA-61637BE9C838} {7A8F66B3-8D37-4D83-B54F-0955EC11F675} = {998B15B4-464F-40EB-92DA-61637BE9C838} {FC76C7E7-C2C3-43D0-99AE-C77E8402FBE3} = {998B15B4-464F-40EB-92DA-61637BE9C838} - {2E4B702C-0850-4030-BC13-8C36F9171B93} = {94912E31-E514-4648-BD9F-3259A8116AC0} {79F0E6DD-E665-4CAD-9C1D-D3570DBDA5FB} = {94912E31-E514-4648-BD9F-3259A8116AC0} {9FA8F495-A781-4D1E-8793-EB08E862AA37} = {94912E31-E514-4648-BD9F-3259A8116AC0} + {03B4234A-E0E5-41E8-9477-DD6BC1062931} = {B6DA6974-633C-47A5-BE72-16549D0FBE8A} + {CAC0C5B3-60CC-4F10-8BEC-DD9AE08F8A87} = {B6DA6974-633C-47A5-BE72-16549D0FBE8A} + {B6DA6974-633C-47A5-BE72-16549D0FBE8A} = {62343EA1-8A9C-43B2-86BC-F6922BCFFAC7} + {A77B5D0D-74E0-4EF4-AA41-60910A5ACC26} = {3CF434A0-5238-4AAC-BD4D-74A78F634CE7} + {4B88EE77-3CC0-46F7-9F1F-113EE59B9B11} = {3CF434A0-5238-4AAC-BD4D-74A78F634CE7} + {3CF434A0-5238-4AAC-BD4D-74A78F634CE7} = {62343EA1-8A9C-43B2-86BC-F6922BCFFAC7} + {33CB0531-474C-4419-B49A-1550854FB27C} = {09E5A07D-B2F6-4690-9BC9-26D94B860D43} + {09E5A07D-B2F6-4690-9BC9-26D94B860D43} = {62343EA1-8A9C-43B2-86BC-F6922BCFFAC7} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2C4F880D-DD85-46A9-881C-94C75D87D8A9} diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Physical/Microsoft.Extensions.FileProviders.Physical.sln b/src/libraries/Microsoft.Extensions.FileProviders.Physical/Microsoft.Extensions.FileProviders.Physical.sln index d5052afde1c48b..ba5b87033f3f7a 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Physical/Microsoft.Extensions.FileProviders.Physical.sln +++ b/src/libraries/Microsoft.Extensions.FileProviders.Physical/Microsoft.Extensions.FileProviders.Physical.sln @@ -19,12 +19,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primit EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primitives", "..\Microsoft.Extensions.Primitives\src\Microsoft.Extensions.Primitives.csproj", "{C55245FA-CAA6-43F7-917C-602E97BC8D52}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{BC01147D-7462-4367-A2BA-E00A54A76D6E}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{9ECEF693-0104-4829-85E6-9CC81A8A0FA1}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{FE431CFB-8AC4-4118-95D7-7EBE1722CB66}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{95F48786-2334-4200-8B52-E1CA9A2F365F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{51E5638C-7F4A-427E-A65A-2D768C2A5926}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{A07F79B0-BD41-4552-861D-A247F4A2ECAF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{B8816CC2-4B2D-4BF5-BEA8-CB7FEA7A94DC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{C6AD925F-E5B1-4E80-8569-F5CFE0CA7347}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{19152DEB-C902-49AF-A864-27D7E18B3DD1}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{496923C9-6CEE-4E94-A711-4CA3D99FB074}" @@ -33,6 +41,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{7DDADA4C-8D2 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{4A7AB018-13B5-44F7-BFF2-AE38E425BDD2}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{A1651C23-E749-42FE-89F6-890C8849E730}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{125A217E-565D-4561-8712-AA5199C628C4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{50C7BFD1-1EBE-4540-8A64-4FAFEAD689F0}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{059996EB-6B80-4F8D-93B1-F8B48364FF39}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -79,10 +95,6 @@ Global {C55245FA-CAA6-43F7-917C-602E97BC8D52}.Debug|Any CPU.Build.0 = Debug|Any CPU {C55245FA-CAA6-43F7-917C-602E97BC8D52}.Release|Any CPU.ActiveCfg = Release|Any CPU {C55245FA-CAA6-43F7-917C-602E97BC8D52}.Release|Any CPU.Build.0 = Release|Any CPU - {BC01147D-7462-4367-A2BA-E00A54A76D6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BC01147D-7462-4367-A2BA-E00A54A76D6E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BC01147D-7462-4367-A2BA-E00A54A76D6E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BC01147D-7462-4367-A2BA-E00A54A76D6E}.Release|Any CPU.Build.0 = Release|Any CPU {9ECEF693-0104-4829-85E6-9CC81A8A0FA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9ECEF693-0104-4829-85E6-9CC81A8A0FA1}.Debug|Any CPU.Build.0 = Debug|Any CPU {9ECEF693-0104-4829-85E6-9CC81A8A0FA1}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -91,6 +103,26 @@ Global {FE431CFB-8AC4-4118-95D7-7EBE1722CB66}.Debug|Any CPU.Build.0 = Debug|Any CPU {FE431CFB-8AC4-4118-95D7-7EBE1722CB66}.Release|Any CPU.ActiveCfg = Release|Any CPU {FE431CFB-8AC4-4118-95D7-7EBE1722CB66}.Release|Any CPU.Build.0 = Release|Any CPU + {95F48786-2334-4200-8B52-E1CA9A2F365F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {95F48786-2334-4200-8B52-E1CA9A2F365F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {95F48786-2334-4200-8B52-E1CA9A2F365F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {95F48786-2334-4200-8B52-E1CA9A2F365F}.Release|Any CPU.Build.0 = Release|Any CPU + {51E5638C-7F4A-427E-A65A-2D768C2A5926}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {51E5638C-7F4A-427E-A65A-2D768C2A5926}.Debug|Any CPU.Build.0 = Debug|Any CPU + {51E5638C-7F4A-427E-A65A-2D768C2A5926}.Release|Any CPU.ActiveCfg = Release|Any CPU + {51E5638C-7F4A-427E-A65A-2D768C2A5926}.Release|Any CPU.Build.0 = Release|Any CPU + {A07F79B0-BD41-4552-861D-A247F4A2ECAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A07F79B0-BD41-4552-861D-A247F4A2ECAF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A07F79B0-BD41-4552-861D-A247F4A2ECAF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A07F79B0-BD41-4552-861D-A247F4A2ECAF}.Release|Any CPU.Build.0 = Release|Any CPU + {B8816CC2-4B2D-4BF5-BEA8-CB7FEA7A94DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B8816CC2-4B2D-4BF5-BEA8-CB7FEA7A94DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B8816CC2-4B2D-4BF5-BEA8-CB7FEA7A94DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B8816CC2-4B2D-4BF5-BEA8-CB7FEA7A94DC}.Release|Any CPU.Build.0 = Release|Any CPU + {C6AD925F-E5B1-4E80-8569-F5CFE0CA7347}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C6AD925F-E5B1-4E80-8569-F5CFE0CA7347}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C6AD925F-E5B1-4E80-8569-F5CFE0CA7347}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C6AD925F-E5B1-4E80-8569-F5CFE0CA7347}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -106,9 +138,16 @@ Global {55A66A71-A400-4A36-9A19-9F8B549647D7} = {7DDADA4C-8D27-4582-93DD-ABE98D76B3FF} {DBE052B4-23A7-4F40-BFFE-9604E39AAACF} = {7DDADA4C-8D27-4582-93DD-ABE98D76B3FF} {C55245FA-CAA6-43F7-917C-602E97BC8D52} = {7DDADA4C-8D27-4582-93DD-ABE98D76B3FF} - {BC01147D-7462-4367-A2BA-E00A54A76D6E} = {4A7AB018-13B5-44F7-BFF2-AE38E425BDD2} {9ECEF693-0104-4829-85E6-9CC81A8A0FA1} = {4A7AB018-13B5-44F7-BFF2-AE38E425BDD2} {FE431CFB-8AC4-4118-95D7-7EBE1722CB66} = {4A7AB018-13B5-44F7-BFF2-AE38E425BDD2} + {95F48786-2334-4200-8B52-E1CA9A2F365F} = {A1651C23-E749-42FE-89F6-890C8849E730} + {51E5638C-7F4A-427E-A65A-2D768C2A5926} = {A1651C23-E749-42FE-89F6-890C8849E730} + {A1651C23-E749-42FE-89F6-890C8849E730} = {059996EB-6B80-4F8D-93B1-F8B48364FF39} + {A07F79B0-BD41-4552-861D-A247F4A2ECAF} = {125A217E-565D-4561-8712-AA5199C628C4} + {B8816CC2-4B2D-4BF5-BEA8-CB7FEA7A94DC} = {125A217E-565D-4561-8712-AA5199C628C4} + {125A217E-565D-4561-8712-AA5199C628C4} = {059996EB-6B80-4F8D-93B1-F8B48364FF39} + {C6AD925F-E5B1-4E80-8569-F5CFE0CA7347} = {50C7BFD1-1EBE-4540-8A64-4FAFEAD689F0} + {50C7BFD1-1EBE-4540-8A64-4FAFEAD689F0} = {059996EB-6B80-4F8D-93B1-F8B48364FF39} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {4B425DE1-F167-465F-97A1-FA1E8C63DFB8} diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Physical/ref/Microsoft.Extensions.FileProviders.Physical.cs b/src/libraries/Microsoft.Extensions.FileProviders.Physical/ref/Microsoft.Extensions.FileProviders.Physical.cs index 7b5c0b3433e0d0..2f5f3fce7fdad4 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Physical/ref/Microsoft.Extensions.FileProviders.Physical.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Physical/ref/Microsoft.Extensions.FileProviders.Physical.cs @@ -43,7 +43,7 @@ public enum ExclusionFilters System = 4, Sensitive = 7, } - public partial class PhysicalDirectoryInfo : Microsoft.Extensions.FileProviders.IFileInfo + public partial class PhysicalDirectoryInfo : Microsoft.Extensions.FileProviders.IFileInfo, Microsoft.Extensions.FileProviders.IDirectoryContents, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { public PhysicalDirectoryInfo(System.IO.DirectoryInfo info) { } public bool Exists { get { throw null; } } @@ -53,6 +53,8 @@ public PhysicalDirectoryInfo(System.IO.DirectoryInfo info) { } public string Name { get { throw null; } } public string PhysicalPath { get { throw null; } } public System.IO.Stream CreateReadStream() { throw null; } + public System.Collections.Generic.IEnumerator GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } public partial class PhysicalFileInfo : Microsoft.Extensions.FileProviders.IFileInfo { diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Internal/PhysicalDirectoryContents.cs b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Internal/PhysicalDirectoryContents.cs index 68a0b4cf9590d7..309002378237b3 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Internal/PhysicalDirectoryContents.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/Internal/PhysicalDirectoryContents.cs @@ -4,9 +4,7 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; using System.IO; -using System.Linq; using Microsoft.Extensions.FileProviders.Physical; namespace Microsoft.Extensions.FileProviders.Internal @@ -16,9 +14,7 @@ namespace Microsoft.Extensions.FileProviders.Internal /// public class PhysicalDirectoryContents : IDirectoryContents { - private IEnumerable? _entries; - private readonly string _directory; - private readonly ExclusionFilters _filters; + private readonly PhysicalDirectoryInfo _info; /// /// Initializes an instance of @@ -37,52 +33,14 @@ public PhysicalDirectoryContents(string directory, ExclusionFilters filters) { ThrowHelper.ThrowIfNull(directory); - _directory = directory; - _filters = filters; + _info = new PhysicalDirectoryInfo(new DirectoryInfo(directory), filters); } - /// - public bool Exists => Directory.Exists(_directory); + /// + public bool Exists => _info.Exists; - /// - public IEnumerator GetEnumerator() - { - EnsureInitialized(); - return _entries.GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - EnsureInitialized(); - return _entries.GetEnumerator(); - } - - [MemberNotNull(nameof(_entries))] - private void EnsureInitialized() - { - try - { - _entries = new DirectoryInfo(_directory) - .EnumerateFileSystemInfos() - .Where(info => !FileSystemInfoHelper.IsExcluded(info, _filters)) - .Select(info => - { - if (info is FileInfo file) - { - return new PhysicalFileInfo(file); - } - else if (info is DirectoryInfo dir) - { - return new PhysicalDirectoryInfo(dir); - } - // shouldn't happen unless BCL introduces new implementation of base type - throw new InvalidOperationException(SR.UnexpectedFileSystemInfo); - }); - } - catch (Exception ex) when (ex is DirectoryNotFoundException || ex is IOException) - { - _entries = Enumerable.Empty(); - } - } + /// + public IEnumerator GetEnumerator() => _info.GetEnumerator(); + IEnumerator IEnumerable.GetEnumerator() => _info.GetEnumerator(); } } diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PhysicalDirectoryInfo.cs b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PhysicalDirectoryInfo.cs index bc4d543d00c0d6..d1b9e1c08e2fe5 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PhysicalDirectoryInfo.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PhysicalDirectoryInfo.cs @@ -2,16 +2,22 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.IO; +using System.Linq; namespace Microsoft.Extensions.FileProviders.Physical { /// /// Represents a directory on a physical filesystem /// - public class PhysicalDirectoryInfo : IFileInfo + public class PhysicalDirectoryInfo : IFileInfo, IDirectoryContents { private readonly DirectoryInfo _info; + private IEnumerable? _entries; + private readonly ExclusionFilters _filters; /// /// Initializes an instance of that wraps an instance of @@ -22,6 +28,12 @@ public PhysicalDirectoryInfo(DirectoryInfo info) _info = info; } + internal PhysicalDirectoryInfo(DirectoryInfo info, ExclusionFilters filters) + { + _info = info; + _filters = filters; + } + /// public bool Exists => _info.Exists; @@ -55,5 +67,40 @@ public Stream CreateReadStream() { throw new InvalidOperationException(SR.CannotCreateStream); } + + /// + public IEnumerator GetEnumerator() + { + EnsureInitialized(); + return _entries.GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + EnsureInitialized(); + return _entries.GetEnumerator(); + } + + [MemberNotNull(nameof(_entries))] + private void EnsureInitialized() + { + try + { + _entries = _info + .EnumerateFileSystemInfos() + .Where(info => !FileSystemInfoHelper.IsExcluded(info, _filters)) + .Select(info => info switch + { + FileInfo file => new PhysicalFileInfo(file), + DirectoryInfo dir => new PhysicalDirectoryInfo(dir), + // shouldn't happen unless BCL introduces new implementation of base type + _ => throw new InvalidOperationException(SR.UnexpectedFileSystemInfo) + }); + } + catch (Exception ex) when (ex is DirectoryNotFoundException or IOException) + { + _entries = Enumerable.Empty(); + } + } } } diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/PhysicalFileProviderTests.cs b/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/PhysicalFileProviderTests.cs index 9cf0dfecd80d20..cf1e6f7598a25c 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/PhysicalFileProviderTests.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Physical/tests/PhysicalFileProviderTests.cs @@ -663,15 +663,39 @@ public void GetDirectoryContentsReturnsRootDirectoryContentsForEmptyPath() { using (var root = new TempDirectory(GetTestFilePath())) { - File.Create(Path.Combine(root.Path, "File" + Guid.NewGuid().ToString())); - Directory.CreateDirectory(Path.Combine(root.Path, "Dir" + Guid.NewGuid().ToString())); + string fileName = "File" + Guid.NewGuid().ToString(); + string subDirectoryName = "Dir" + Guid.NewGuid().ToString(); + root.CreateFile(fileName); + root.CreateFolder(subDirectoryName); + root.CreateFile(Path.Combine(subDirectoryName, fileName)); using (var provider = new PhysicalFileProvider(root.Path)) { var contents = provider.GetDirectoryContents(string.Empty); Assert.Collection(contents.OrderBy(c => c.Name), - item => Assert.IsType(item), - item => Assert.IsType(item)); + item => + { + // Directory + Assert.True(item.Exists); + Assert.Equal(subDirectoryName, item.Name); + Assert.True(item.IsDirectory); + var directory = Assert.IsAssignableFrom(item); + Assert.True(directory.Exists); + // Single file in directory + var file = Assert.Single(directory); + Assert.True(file.Exists); + Assert.Equal(fileName, file.Name); + Assert.False(file.IsDirectory); + Assert.False(file is IDirectoryContents); + }, + item => + { + // File + Assert.True(item.Exists); + Assert.Equal(fileName, item.Name); + Assert.False(item.IsDirectory); + Assert.False(item is IDirectoryContents); + }); } } } diff --git a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/Microsoft.Extensions.FileSystemGlobbing.sln b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/Microsoft.Extensions.FileSystemGlobbing.sln index 24b2e3db061435..e506a20631332a 100644 --- a/src/libraries/Microsoft.Extensions.FileSystemGlobbing/Microsoft.Extensions.FileSystemGlobbing.sln +++ b/src/libraries/Microsoft.Extensions.FileSystemGlobbing/Microsoft.Extensions.FileSystemGlobbing.sln @@ -7,12 +7,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.FileSy EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.FileSystemGlobbing.Tests", "tests\Microsoft.Extensions.FileSystemGlobbing.Tests.csproj", "{79B284F9-326E-4FEB-9A32-EA72A31B4B60}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{6AD7132C-D2D1-4F7E-8382-DB608F9F8781}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{7A85F84A-4E74-471D-8F9C-3D06D5D8BD74}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{404A8198-B2DF-42AB-BA33-69509A8E0C91}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{41434677-8D75-4375-A24C-D9A1004FB758}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{D50F036B-C776-4C6D-BAC8-53F7F0D13CBD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{272E2AC2-D943-4A3B-BA7C-002C726F30AE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{6BB6EE1A-A9B2-4EA4-99CC-673E6FDF3AF1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{1EBD4A59-F3D2-4B06-8D80-2E6935F7D0D4}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{7438714C-BB16-491E-8D9C-A2B7CB0EFA35}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{4A9C0071-CAD0-4ABB-A489-04280BA258A5}" @@ -21,6 +29,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{AE2C386A-473 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{2EF45468-C4F8-4194-9720-592D0186B585}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{E75B0897-7E50-4614-8AF0-FEFD894ADD53}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{2AC2257A-CF0F-4352-88B3-AA442186BDDD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{78FAE809-8C32-4C9B-AEF1-FF2655E2B7D6}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{C76FCB88-D877-440A-94D7-DF3016705AA2}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -43,10 +59,6 @@ Global {79B284F9-326E-4FEB-9A32-EA72A31B4B60}.Debug|Any CPU.Build.0 = Debug|Any CPU {79B284F9-326E-4FEB-9A32-EA72A31B4B60}.Release|Any CPU.ActiveCfg = Release|Any CPU {79B284F9-326E-4FEB-9A32-EA72A31B4B60}.Release|Any CPU.Build.0 = Release|Any CPU - {6AD7132C-D2D1-4F7E-8382-DB608F9F8781}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6AD7132C-D2D1-4F7E-8382-DB608F9F8781}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6AD7132C-D2D1-4F7E-8382-DB608F9F8781}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6AD7132C-D2D1-4F7E-8382-DB608F9F8781}.Release|Any CPU.Build.0 = Release|Any CPU {7A85F84A-4E74-471D-8F9C-3D06D5D8BD74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7A85F84A-4E74-471D-8F9C-3D06D5D8BD74}.Debug|Any CPU.Build.0 = Debug|Any CPU {7A85F84A-4E74-471D-8F9C-3D06D5D8BD74}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -55,6 +67,26 @@ Global {404A8198-B2DF-42AB-BA33-69509A8E0C91}.Debug|Any CPU.Build.0 = Debug|Any CPU {404A8198-B2DF-42AB-BA33-69509A8E0C91}.Release|Any CPU.ActiveCfg = Release|Any CPU {404A8198-B2DF-42AB-BA33-69509A8E0C91}.Release|Any CPU.Build.0 = Release|Any CPU + {41434677-8D75-4375-A24C-D9A1004FB758}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {41434677-8D75-4375-A24C-D9A1004FB758}.Debug|Any CPU.Build.0 = Debug|Any CPU + {41434677-8D75-4375-A24C-D9A1004FB758}.Release|Any CPU.ActiveCfg = Release|Any CPU + {41434677-8D75-4375-A24C-D9A1004FB758}.Release|Any CPU.Build.0 = Release|Any CPU + {D50F036B-C776-4C6D-BAC8-53F7F0D13CBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D50F036B-C776-4C6D-BAC8-53F7F0D13CBD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D50F036B-C776-4C6D-BAC8-53F7F0D13CBD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D50F036B-C776-4C6D-BAC8-53F7F0D13CBD}.Release|Any CPU.Build.0 = Release|Any CPU + {272E2AC2-D943-4A3B-BA7C-002C726F30AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {272E2AC2-D943-4A3B-BA7C-002C726F30AE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {272E2AC2-D943-4A3B-BA7C-002C726F30AE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {272E2AC2-D943-4A3B-BA7C-002C726F30AE}.Release|Any CPU.Build.0 = Release|Any CPU + {6BB6EE1A-A9B2-4EA4-99CC-673E6FDF3AF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6BB6EE1A-A9B2-4EA4-99CC-673E6FDF3AF1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6BB6EE1A-A9B2-4EA4-99CC-673E6FDF3AF1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6BB6EE1A-A9B2-4EA4-99CC-673E6FDF3AF1}.Release|Any CPU.Build.0 = Release|Any CPU + {1EBD4A59-F3D2-4B06-8D80-2E6935F7D0D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1EBD4A59-F3D2-4B06-8D80-2E6935F7D0D4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1EBD4A59-F3D2-4B06-8D80-2E6935F7D0D4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1EBD4A59-F3D2-4B06-8D80-2E6935F7D0D4}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -64,9 +96,16 @@ Global {79B284F9-326E-4FEB-9A32-EA72A31B4B60} = {7438714C-BB16-491E-8D9C-A2B7CB0EFA35} {ECFF7A87-0D5F-4EA1-9FED-1126A51B5D55} = {4A9C0071-CAD0-4ABB-A489-04280BA258A5} {A9547748-8B4F-450E-B0E3-CD9A1A80B319} = {AE2C386A-473E-46FF-97DB-4CB1727122BB} - {6AD7132C-D2D1-4F7E-8382-DB608F9F8781} = {2EF45468-C4F8-4194-9720-592D0186B585} {7A85F84A-4E74-471D-8F9C-3D06D5D8BD74} = {2EF45468-C4F8-4194-9720-592D0186B585} {404A8198-B2DF-42AB-BA33-69509A8E0C91} = {2EF45468-C4F8-4194-9720-592D0186B585} + {41434677-8D75-4375-A24C-D9A1004FB758} = {E75B0897-7E50-4614-8AF0-FEFD894ADD53} + {D50F036B-C776-4C6D-BAC8-53F7F0D13CBD} = {E75B0897-7E50-4614-8AF0-FEFD894ADD53} + {E75B0897-7E50-4614-8AF0-FEFD894ADD53} = {C76FCB88-D877-440A-94D7-DF3016705AA2} + {272E2AC2-D943-4A3B-BA7C-002C726F30AE} = {2AC2257A-CF0F-4352-88B3-AA442186BDDD} + {6BB6EE1A-A9B2-4EA4-99CC-673E6FDF3AF1} = {2AC2257A-CF0F-4352-88B3-AA442186BDDD} + {2AC2257A-CF0F-4352-88B3-AA442186BDDD} = {C76FCB88-D877-440A-94D7-DF3016705AA2} + {1EBD4A59-F3D2-4B06-8D80-2E6935F7D0D4} = {78FAE809-8C32-4C9B-AEF1-FF2655E2B7D6} + {78FAE809-8C32-4C9B-AEF1-FF2655E2B7D6} = {C76FCB88-D877-440A-94D7-DF3016705AA2} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {4FA3B475-4D82-4A80-8625-D5C98B8FF794} diff --git a/src/libraries/Microsoft.Extensions.HostFactoryResolver/Microsoft.Extensions.HostFactoryResolver.sln b/src/libraries/Microsoft.Extensions.HostFactoryResolver/Microsoft.Extensions.HostFactoryResolver.sln index 538754e057c3da..11fcaf752a369b 100644 --- a/src/libraries/Microsoft.Extensions.HostFactoryResolver/Microsoft.Extensions.HostFactoryResolver.sln +++ b/src/libraries/Microsoft.Extensions.HostFactoryResolver/Microsoft.Extensions.HostFactoryResolver.sln @@ -47,6 +47,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Depend EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyInjection", "..\Microsoft.Extensions.DependencyInjection\src\Microsoft.Extensions.DependencyInjection.csproj", "{0B776D27-DC71-432D-AC41-7BCDA6F2001D}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics.Abstractions", "..\Microsoft.Extensions.Diagnostics.Abstractions\ref\Microsoft.Extensions.Diagnostics.Abstractions.csproj", "{BDD4F886-F31A-4A54-8D09-352364BD1A11}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics.Abstractions", "..\Microsoft.Extensions.Diagnostics.Abstractions\src\Microsoft.Extensions.Diagnostics.Abstractions.csproj", "{E448C7D4-D00F-4663-9D5B-C90F3C746617}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics", "..\Microsoft.Extensions.Diagnostics\ref\Microsoft.Extensions.Diagnostics.csproj", "{C4040013-E2E5-4D9D-B076-BC0A1B833D01}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics", "..\Microsoft.Extensions.Diagnostics\src\Microsoft.Extensions.Diagnostics.csproj", "{6D9E9140-E7EA-4BE2-84A8-AC5E3791D8EB}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.FileProviders.Abstractions", "..\Microsoft.Extensions.FileProviders.Abstractions\ref\Microsoft.Extensions.FileProviders.Abstractions.csproj", "{F07F74E4-0F9E-41B4-924C-380E1DF698E2}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.FileProviders.Abstractions", "..\Microsoft.Extensions.FileProviders.Abstractions\src\Microsoft.Extensions.FileProviders.Abstractions.csproj", "{A44460E9-1ADD-4059-966B-677F6971FB5D}" @@ -141,6 +149,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Option EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.ConfigurationExtensions", "..\Microsoft.Extensions.Options.ConfigurationExtensions\src\Microsoft.Extensions.Options.ConfigurationExtensions.csproj", "{4B4E38AB-2BB4-4958-A791-440252601444}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.SourceGeneration", "..\Microsoft.Extensions.Options\gen\Microsoft.Extensions.Options.SourceGeneration.csproj", "{14313E39-4A4C-405A-BF84-849A09DF3F09}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\ref\Microsoft.Extensions.Options.csproj", "{7E258A29-16B0-4C3A-B822-2E94BEC6B7AD}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\src\Microsoft.Extensions.Options.csproj", "{3BAC864E-1F70-48B1-A7B3-C46DD997D9EA}" @@ -187,6 +197,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\Syst EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{1D04506B-4530-4BC4-B0F7-7E46DF497454}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{93C2DD99-4499-419A-8613-A46D02BD2AD4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{870BE181-02C8-4C71-9991-8ED85D7F29A6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{9C21017D-500C-47B2-AA9B-6AAA156CD63E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{DCB15115-80DF-4B22-9810-64DD14938696}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{09B61863-39B4-45FE-9EE6-D486DC386F51}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{41A601F5-19D8-45A9-AE63-33F040315BA6}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{42F6092F-A377-42AF-A595-C382F04899A5}" @@ -195,6 +215,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{549715BC-A4E EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{64423F79-97D4-45E8-9F06-6CFB06A36C0F}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{1B8DE64E-4034-4A22-8807-365AA93AFB60}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{3006C4D8-92EA-4340-B762-705D544B5955}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{1EA8CD0F-7062-477B-8CC1-8300E9220CD2}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{5C102397-5951-4E65-94C0-9816C0D27DB4}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -297,6 +325,22 @@ Global {0B776D27-DC71-432D-AC41-7BCDA6F2001D}.Debug|Any CPU.Build.0 = Debug|Any CPU {0B776D27-DC71-432D-AC41-7BCDA6F2001D}.Release|Any CPU.ActiveCfg = Release|Any CPU {0B776D27-DC71-432D-AC41-7BCDA6F2001D}.Release|Any CPU.Build.0 = Release|Any CPU + {BDD4F886-F31A-4A54-8D09-352364BD1A11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BDD4F886-F31A-4A54-8D09-352364BD1A11}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BDD4F886-F31A-4A54-8D09-352364BD1A11}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BDD4F886-F31A-4A54-8D09-352364BD1A11}.Release|Any CPU.Build.0 = Release|Any CPU + {E448C7D4-D00F-4663-9D5B-C90F3C746617}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E448C7D4-D00F-4663-9D5B-C90F3C746617}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E448C7D4-D00F-4663-9D5B-C90F3C746617}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E448C7D4-D00F-4663-9D5B-C90F3C746617}.Release|Any CPU.Build.0 = Release|Any CPU + {C4040013-E2E5-4D9D-B076-BC0A1B833D01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C4040013-E2E5-4D9D-B076-BC0A1B833D01}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C4040013-E2E5-4D9D-B076-BC0A1B833D01}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C4040013-E2E5-4D9D-B076-BC0A1B833D01}.Release|Any CPU.Build.0 = Release|Any CPU + {6D9E9140-E7EA-4BE2-84A8-AC5E3791D8EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6D9E9140-E7EA-4BE2-84A8-AC5E3791D8EB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6D9E9140-E7EA-4BE2-84A8-AC5E3791D8EB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6D9E9140-E7EA-4BE2-84A8-AC5E3791D8EB}.Release|Any CPU.Build.0 = Release|Any CPU {F07F74E4-0F9E-41B4-924C-380E1DF698E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F07F74E4-0F9E-41B4-924C-380E1DF698E2}.Debug|Any CPU.Build.0 = Debug|Any CPU {F07F74E4-0F9E-41B4-924C-380E1DF698E2}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -485,6 +529,10 @@ Global {4B4E38AB-2BB4-4958-A791-440252601444}.Debug|Any CPU.Build.0 = Debug|Any CPU {4B4E38AB-2BB4-4958-A791-440252601444}.Release|Any CPU.ActiveCfg = Release|Any CPU {4B4E38AB-2BB4-4958-A791-440252601444}.Release|Any CPU.Build.0 = Release|Any CPU + {14313E39-4A4C-405A-BF84-849A09DF3F09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {14313E39-4A4C-405A-BF84-849A09DF3F09}.Debug|Any CPU.Build.0 = Debug|Any CPU + {14313E39-4A4C-405A-BF84-849A09DF3F09}.Release|Any CPU.ActiveCfg = Release|Any CPU + {14313E39-4A4C-405A-BF84-849A09DF3F09}.Release|Any CPU.Build.0 = Release|Any CPU {7E258A29-16B0-4C3A-B822-2E94BEC6B7AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7E258A29-16B0-4C3A-B822-2E94BEC6B7AD}.Debug|Any CPU.Build.0 = Debug|Any CPU {7E258A29-16B0-4C3A-B822-2E94BEC6B7AD}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -577,6 +625,26 @@ Global {1D04506B-4530-4BC4-B0F7-7E46DF497454}.Debug|Any CPU.Build.0 = Debug|Any CPU {1D04506B-4530-4BC4-B0F7-7E46DF497454}.Release|Any CPU.ActiveCfg = Release|Any CPU {1D04506B-4530-4BC4-B0F7-7E46DF497454}.Release|Any CPU.Build.0 = Release|Any CPU + {93C2DD99-4499-419A-8613-A46D02BD2AD4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {93C2DD99-4499-419A-8613-A46D02BD2AD4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {93C2DD99-4499-419A-8613-A46D02BD2AD4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {93C2DD99-4499-419A-8613-A46D02BD2AD4}.Release|Any CPU.Build.0 = Release|Any CPU + {870BE181-02C8-4C71-9991-8ED85D7F29A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {870BE181-02C8-4C71-9991-8ED85D7F29A6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {870BE181-02C8-4C71-9991-8ED85D7F29A6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {870BE181-02C8-4C71-9991-8ED85D7F29A6}.Release|Any CPU.Build.0 = Release|Any CPU + {9C21017D-500C-47B2-AA9B-6AAA156CD63E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9C21017D-500C-47B2-AA9B-6AAA156CD63E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9C21017D-500C-47B2-AA9B-6AAA156CD63E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9C21017D-500C-47B2-AA9B-6AAA156CD63E}.Release|Any CPU.Build.0 = Release|Any CPU + {DCB15115-80DF-4B22-9810-64DD14938696}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DCB15115-80DF-4B22-9810-64DD14938696}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DCB15115-80DF-4B22-9810-64DD14938696}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DCB15115-80DF-4B22-9810-64DD14938696}.Release|Any CPU.Build.0 = Release|Any CPU + {09B61863-39B4-45FE-9EE6-D486DC386F51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {09B61863-39B4-45FE-9EE6-D486DC386F51}.Debug|Any CPU.Build.0 = Debug|Any CPU + {09B61863-39B4-45FE-9EE6-D486DC386F51}.Release|Any CPU.ActiveCfg = Release|Any CPU + {09B61863-39B4-45FE-9EE6-D486DC386F51}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -611,6 +679,8 @@ Global {749A707E-3EE2-478B-B0F0-A37045598C76} = {42F6092F-A377-42AF-A595-C382F04899A5} {69CAD162-EEED-4906-968D-99D4DA84E7C9} = {42F6092F-A377-42AF-A595-C382F04899A5} {1C6D51CA-020A-4936-A646-3DB4207D90C3} = {42F6092F-A377-42AF-A595-C382F04899A5} + {BDD4F886-F31A-4A54-8D09-352364BD1A11} = {42F6092F-A377-42AF-A595-C382F04899A5} + {C4040013-E2E5-4D9D-B076-BC0A1B833D01} = {42F6092F-A377-42AF-A595-C382F04899A5} {F07F74E4-0F9E-41B4-924C-380E1DF698E2} = {42F6092F-A377-42AF-A595-C382F04899A5} {2A25B3CE-4488-4F1B-906C-5F9440EF6C14} = {42F6092F-A377-42AF-A595-C382F04899A5} {04292EC0-2D60-4594-A7A9-F128F74C7132} = {42F6092F-A377-42AF-A595-C382F04899A5} @@ -645,6 +715,8 @@ Global {94F88257-62C7-4F38-A838-5C327E61B3CC} = {549715BC-A4E3-49F5-A8AC-84D2F65FAC0F} {117EACAD-89DC-48F1-895B-BC750EE39121} = {549715BC-A4E3-49F5-A8AC-84D2F65FAC0F} {0B776D27-DC71-432D-AC41-7BCDA6F2001D} = {549715BC-A4E3-49F5-A8AC-84D2F65FAC0F} + {E448C7D4-D00F-4663-9D5B-C90F3C746617} = {549715BC-A4E3-49F5-A8AC-84D2F65FAC0F} + {6D9E9140-E7EA-4BE2-84A8-AC5E3791D8EB} = {549715BC-A4E3-49F5-A8AC-84D2F65FAC0F} {A44460E9-1ADD-4059-966B-677F6971FB5D} = {549715BC-A4E3-49F5-A8AC-84D2F65FAC0F} {98F4DDD9-F3C5-47E1-8B3F-AA4893642DFA} = {549715BC-A4E3-49F5-A8AC-84D2F65FAC0F} {D8D0E8B9-8D10-4E94-9CEF-EF38097BA193} = {549715BC-A4E3-49F5-A8AC-84D2F65FAC0F} @@ -670,12 +742,21 @@ Global {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} + {14313E39-4A4C-405A-BF84-849A09DF3F09} = {64423F79-97D4-45E8-9F06-6CFB06A36C0F} {BE1F44EC-1298-412C-BEF9-4578CA6DE547} = {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} + {93C2DD99-4499-419A-8613-A46D02BD2AD4} = {1B8DE64E-4034-4A22-8807-365AA93AFB60} + {870BE181-02C8-4C71-9991-8ED85D7F29A6} = {1B8DE64E-4034-4A22-8807-365AA93AFB60} + {1B8DE64E-4034-4A22-8807-365AA93AFB60} = {5C102397-5951-4E65-94C0-9816C0D27DB4} + {9C21017D-500C-47B2-AA9B-6AAA156CD63E} = {3006C4D8-92EA-4340-B762-705D544B5955} + {DCB15115-80DF-4B22-9810-64DD14938696} = {3006C4D8-92EA-4340-B762-705D544B5955} + {3006C4D8-92EA-4340-B762-705D544B5955} = {5C102397-5951-4E65-94C0-9816C0D27DB4} + {09B61863-39B4-45FE-9EE6-D486DC386F51} = {1EA8CD0F-7062-477B-8CC1-8300E9220CD2} + {1EA8CD0F-7062-477B-8CC1-8300E9220CD2} = {5C102397-5951-4E65-94C0-9816C0D27DB4} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {80C3C947-5A43-4A55-9E1C-D62738588863} diff --git a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/HostFactoryResolverTests.cs b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/HostFactoryResolverTests.cs index b35db51ec0da2d..5e82fe9954cd23 100644 --- a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/HostFactoryResolverTests.cs +++ b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/HostFactoryResolverTests.cs @@ -285,6 +285,7 @@ public void ApplicationNameSetFromArgument() [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] [DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(NoSpecialEntryPointPattern.Program))] [ActiveIssue("https://github.com/dotnet/runtime/issues/73420", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void NoSpecialEntryPointPatternCanRunInParallel() { var factory = HostFactoryResolver.ResolveServiceProviderFactory(typeof(NoSpecialEntryPointPattern.Program).Assembly, s_WaitTimeout); diff --git a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/Microsoft.Extensions.Hosting.Abstractions.sln b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/Microsoft.Extensions.Hosting.Abstractions.sln index 22105c948a3063..4a0ce06c5af1bf 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/Microsoft.Extensions.Hosting.Abstractions.sln +++ b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/Microsoft.Extensions.Hosting.Abstractions.sln @@ -11,6 +11,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Depend EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyInjection.Abstractions", "..\Microsoft.Extensions.DependencyInjection.Abstractions\src\Microsoft.Extensions.DependencyInjection.Abstractions.csproj", "{60641184-B841-4F48-A917-76618114916A}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics.Abstractions", "..\Microsoft.Extensions.Diagnostics.Abstractions\ref\Microsoft.Extensions.Diagnostics.Abstractions.csproj", "{E134FF77-0925-4370-85C0-10EFC5F7ED26}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics.Abstractions", "..\Microsoft.Extensions.Diagnostics.Abstractions\src\Microsoft.Extensions.Diagnostics.Abstractions.csproj", "{E726C5B9-3E85-4A04-945E-F196B8790B58}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.FileProviders.Abstractions", "..\Microsoft.Extensions.FileProviders.Abstractions\ref\Microsoft.Extensions.FileProviders.Abstractions.csproj", "{08064208-D005-4C34-B152-D03C7D173D60}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.FileProviders.Abstractions", "..\Microsoft.Extensions.FileProviders.Abstractions\src\Microsoft.Extensions.FileProviders.Abstractions.csproj", "{17917EA7-19F2-4CC0-AD52-B04AA4D254F8}" @@ -29,22 +33,52 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Loggin EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj", "{3426C067-2EFF-4666-8EE7-EE550C44DE8E}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.SourceGeneration", "..\Microsoft.Extensions.Options\gen\Microsoft.Extensions.Options.SourceGeneration.csproj", "{52A08EB3-0680-4C2A-BA78-7110D9ABBC8C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\ref\Microsoft.Extensions.Options.csproj", "{320005A1-5A96-4C1C-AAC5-F9714B93CA1D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\src\Microsoft.Extensions.Options.csproj", "{7FB59953-BA25-4A9E-864D-219E8CCFEEFE}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primitives", "..\Microsoft.Extensions.Primitives\ref\Microsoft.Extensions.Primitives.csproj", "{99CF7377-8E77-4EDB-B04F-E546ACCCE84D}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primitives", "..\Microsoft.Extensions.Primitives\src\Microsoft.Extensions.Primitives.csproj", "{A7370C94-090B-4F79-A964-8029481D60FC}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.DiagnosticSource", "..\System.Diagnostics.DiagnosticSource\ref\System.Diagnostics.DiagnosticSource.csproj", "{BE9283F7-19A3-4349-B9EE-656466A9CD62}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.DiagnosticSource", "..\System.Diagnostics.DiagnosticSource\src\System.Diagnostics.DiagnosticSource.csproj", "{72EC9B5C-B125-4B84-87DD-6AC0C92C4A74}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{EFB29682-1F77-4E0E-AB8E-418196CFC20F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{BBDA0B2E-BC21-4B90-8704-60600A84CB35}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{984774FC-974E-422D-9C34-5DE60308EC02}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{AE4B08F2-A568-4B2E-BAED-065172234D58}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{CF9B2C75-3FDD-4F6F-9912-E10DB3BA294B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{A16D86E0-B553-4F60-8A5D-F3750BE424E6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{6C3499A5-13E4-48D4-8D45-54B0E96C7287}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{86ABC01C-98A6-40EC-ACB2-62DBED79C5E8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{EEE0C0A5-DE33-4F7E-A7CB-3A4D1E2B5CA6}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{39B9C1F2-8309-41E5-B048-921219977818}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{6C6C2D2B-C83F-4513-A9BB-33F8204B9EA9}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{BC6A7FDF-74EB-4DA1-9C71-4A8D46D39C15}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{CE599F12-D209-41F2-964F-BECBE6D1812D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{2B99B657-DF9B-4557-84F8-9A9FBB66F844}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{4C8454BC-F18B-43BB-A78C-FE788383DAED}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{66291335-CC8C-4DCE-9742-CDE6E6D950C2}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -75,6 +109,14 @@ Global {60641184-B841-4F48-A917-76618114916A}.Debug|Any CPU.Build.0 = Debug|Any CPU {60641184-B841-4F48-A917-76618114916A}.Release|Any CPU.ActiveCfg = Release|Any CPU {60641184-B841-4F48-A917-76618114916A}.Release|Any CPU.Build.0 = Release|Any CPU + {E134FF77-0925-4370-85C0-10EFC5F7ED26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E134FF77-0925-4370-85C0-10EFC5F7ED26}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E134FF77-0925-4370-85C0-10EFC5F7ED26}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E134FF77-0925-4370-85C0-10EFC5F7ED26}.Release|Any CPU.Build.0 = Release|Any CPU + {E726C5B9-3E85-4A04-945E-F196B8790B58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E726C5B9-3E85-4A04-945E-F196B8790B58}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E726C5B9-3E85-4A04-945E-F196B8790B58}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E726C5B9-3E85-4A04-945E-F196B8790B58}.Release|Any CPU.Build.0 = Release|Any CPU {08064208-D005-4C34-B152-D03C7D173D60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {08064208-D005-4C34-B152-D03C7D173D60}.Debug|Any CPU.Build.0 = Debug|Any CPU {08064208-D005-4C34-B152-D03C7D173D60}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -111,6 +153,18 @@ Global {3426C067-2EFF-4666-8EE7-EE550C44DE8E}.Debug|Any CPU.Build.0 = Debug|Any CPU {3426C067-2EFF-4666-8EE7-EE550C44DE8E}.Release|Any CPU.ActiveCfg = Release|Any CPU {3426C067-2EFF-4666-8EE7-EE550C44DE8E}.Release|Any CPU.Build.0 = Release|Any CPU + {52A08EB3-0680-4C2A-BA78-7110D9ABBC8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {52A08EB3-0680-4C2A-BA78-7110D9ABBC8C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {52A08EB3-0680-4C2A-BA78-7110D9ABBC8C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {52A08EB3-0680-4C2A-BA78-7110D9ABBC8C}.Release|Any CPU.Build.0 = Release|Any CPU + {320005A1-5A96-4C1C-AAC5-F9714B93CA1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {320005A1-5A96-4C1C-AAC5-F9714B93CA1D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {320005A1-5A96-4C1C-AAC5-F9714B93CA1D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {320005A1-5A96-4C1C-AAC5-F9714B93CA1D}.Release|Any CPU.Build.0 = Release|Any CPU + {7FB59953-BA25-4A9E-864D-219E8CCFEEFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7FB59953-BA25-4A9E-864D-219E8CCFEEFE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7FB59953-BA25-4A9E-864D-219E8CCFEEFE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7FB59953-BA25-4A9E-864D-219E8CCFEEFE}.Release|Any CPU.Build.0 = Release|Any CPU {99CF7377-8E77-4EDB-B04F-E546ACCCE84D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {99CF7377-8E77-4EDB-B04F-E546ACCCE84D}.Debug|Any CPU.Build.0 = Debug|Any CPU {99CF7377-8E77-4EDB-B04F-E546ACCCE84D}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -119,6 +173,14 @@ Global {A7370C94-090B-4F79-A964-8029481D60FC}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7370C94-090B-4F79-A964-8029481D60FC}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7370C94-090B-4F79-A964-8029481D60FC}.Release|Any CPU.Build.0 = Release|Any CPU + {BE9283F7-19A3-4349-B9EE-656466A9CD62}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BE9283F7-19A3-4349-B9EE-656466A9CD62}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BE9283F7-19A3-4349-B9EE-656466A9CD62}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BE9283F7-19A3-4349-B9EE-656466A9CD62}.Release|Any CPU.Build.0 = Release|Any CPU + {72EC9B5C-B125-4B84-87DD-6AC0C92C4A74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {72EC9B5C-B125-4B84-87DD-6AC0C92C4A74}.Debug|Any CPU.Build.0 = Debug|Any CPU + {72EC9B5C-B125-4B84-87DD-6AC0C92C4A74}.Release|Any CPU.ActiveCfg = Release|Any CPU + {72EC9B5C-B125-4B84-87DD-6AC0C92C4A74}.Release|Any CPU.Build.0 = Release|Any CPU {EFB29682-1F77-4E0E-AB8E-418196CFC20F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EFB29682-1F77-4E0E-AB8E-418196CFC20F}.Debug|Any CPU.Build.0 = Debug|Any CPU {EFB29682-1F77-4E0E-AB8E-418196CFC20F}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -131,6 +193,30 @@ Global {984774FC-974E-422D-9C34-5DE60308EC02}.Debug|Any CPU.Build.0 = Debug|Any CPU {984774FC-974E-422D-9C34-5DE60308EC02}.Release|Any CPU.ActiveCfg = Release|Any CPU {984774FC-974E-422D-9C34-5DE60308EC02}.Release|Any CPU.Build.0 = Release|Any CPU + {AE4B08F2-A568-4B2E-BAED-065172234D58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AE4B08F2-A568-4B2E-BAED-065172234D58}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AE4B08F2-A568-4B2E-BAED-065172234D58}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AE4B08F2-A568-4B2E-BAED-065172234D58}.Release|Any CPU.Build.0 = Release|Any CPU + {CF9B2C75-3FDD-4F6F-9912-E10DB3BA294B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CF9B2C75-3FDD-4F6F-9912-E10DB3BA294B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CF9B2C75-3FDD-4F6F-9912-E10DB3BA294B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CF9B2C75-3FDD-4F6F-9912-E10DB3BA294B}.Release|Any CPU.Build.0 = Release|Any CPU + {A16D86E0-B553-4F60-8A5D-F3750BE424E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A16D86E0-B553-4F60-8A5D-F3750BE424E6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A16D86E0-B553-4F60-8A5D-F3750BE424E6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A16D86E0-B553-4F60-8A5D-F3750BE424E6}.Release|Any CPU.Build.0 = Release|Any CPU + {6C3499A5-13E4-48D4-8D45-54B0E96C7287}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6C3499A5-13E4-48D4-8D45-54B0E96C7287}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6C3499A5-13E4-48D4-8D45-54B0E96C7287}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6C3499A5-13E4-48D4-8D45-54B0E96C7287}.Release|Any CPU.Build.0 = Release|Any CPU + {86ABC01C-98A6-40EC-ACB2-62DBED79C5E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {86ABC01C-98A6-40EC-ACB2-62DBED79C5E8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {86ABC01C-98A6-40EC-ACB2-62DBED79C5E8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {86ABC01C-98A6-40EC-ACB2-62DBED79C5E8}.Release|Any CPU.Build.0 = Release|Any CPU + {EEE0C0A5-DE33-4F7E-A7CB-3A4D1E2B5CA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EEE0C0A5-DE33-4F7E-A7CB-3A4D1E2B5CA6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EEE0C0A5-DE33-4F7E-A7CB-3A4D1E2B5CA6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EEE0C0A5-DE33-4F7E-A7CB-3A4D1E2B5CA6}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -139,23 +225,39 @@ Global {D1DAA13A-B302-46AB-965A-7610EE55F588} = {39B9C1F2-8309-41E5-B048-921219977818} {47F05662-AD13-4955-A205-0FCE6913FDDB} = {39B9C1F2-8309-41E5-B048-921219977818} {963867EB-DEAF-487E-A3E8-71AE9379AD53} = {39B9C1F2-8309-41E5-B048-921219977818} + {E134FF77-0925-4370-85C0-10EFC5F7ED26} = {39B9C1F2-8309-41E5-B048-921219977818} {08064208-D005-4C34-B152-D03C7D173D60} = {39B9C1F2-8309-41E5-B048-921219977818} {7CCF5CE0-3840-4AA1-810F-138D001F2486} = {39B9C1F2-8309-41E5-B048-921219977818} {C4FD2984-3E22-47AF-8584-FF908D9D3E43} = {39B9C1F2-8309-41E5-B048-921219977818} + {320005A1-5A96-4C1C-AAC5-F9714B93CA1D} = {39B9C1F2-8309-41E5-B048-921219977818} {99CF7377-8E77-4EDB-B04F-E546ACCCE84D} = {39B9C1F2-8309-41E5-B048-921219977818} + {BE9283F7-19A3-4349-B9EE-656466A9CD62} = {39B9C1F2-8309-41E5-B048-921219977818} + {AE4B08F2-A568-4B2E-BAED-065172234D58} = {39B9C1F2-8309-41E5-B048-921219977818} {E9CC25E1-367A-41E4-A710-5C5AB7475F40} = {6C6C2D2B-C83F-4513-A9BB-33F8204B9EA9} {7F238E01-3021-4F87-B463-A4AB5B91F753} = {6C6C2D2B-C83F-4513-A9BB-33F8204B9EA9} {60641184-B841-4F48-A917-76618114916A} = {6C6C2D2B-C83F-4513-A9BB-33F8204B9EA9} + {E726C5B9-3E85-4A04-945E-F196B8790B58} = {6C6C2D2B-C83F-4513-A9BB-33F8204B9EA9} {17917EA7-19F2-4CC0-AD52-B04AA4D254F8} = {6C6C2D2B-C83F-4513-A9BB-33F8204B9EA9} {664450C6-102A-435A-875B-3445B3332E90} = {6C6C2D2B-C83F-4513-A9BB-33F8204B9EA9} {3426C067-2EFF-4666-8EE7-EE550C44DE8E} = {6C6C2D2B-C83F-4513-A9BB-33F8204B9EA9} + {7FB59953-BA25-4A9E-864D-219E8CCFEEFE} = {6C6C2D2B-C83F-4513-A9BB-33F8204B9EA9} {A7370C94-090B-4F79-A964-8029481D60FC} = {6C6C2D2B-C83F-4513-A9BB-33F8204B9EA9} + {72EC9B5C-B125-4B84-87DD-6AC0C92C4A74} = {6C6C2D2B-C83F-4513-A9BB-33F8204B9EA9} {3A11089C-B572-4F57-AB9A-B9F54D2CD1DE} = {BC6A7FDF-74EB-4DA1-9C71-4A8D46D39C15} {95E4261F-F449-48A5-83AF-3BA144A023A3} = {BC6A7FDF-74EB-4DA1-9C71-4A8D46D39C15} {40F96C08-9936-47DA-AA41-E54954F02EE8} = {BC6A7FDF-74EB-4DA1-9C71-4A8D46D39C15} + {52A08EB3-0680-4C2A-BA78-7110D9ABBC8C} = {BC6A7FDF-74EB-4DA1-9C71-4A8D46D39C15} {EFB29682-1F77-4E0E-AB8E-418196CFC20F} = {BC6A7FDF-74EB-4DA1-9C71-4A8D46D39C15} {BBDA0B2E-BC21-4B90-8704-60600A84CB35} = {BC6A7FDF-74EB-4DA1-9C71-4A8D46D39C15} {984774FC-974E-422D-9C34-5DE60308EC02} = {BC6A7FDF-74EB-4DA1-9C71-4A8D46D39C15} + {CF9B2C75-3FDD-4F6F-9912-E10DB3BA294B} = {CE599F12-D209-41F2-964F-BECBE6D1812D} + {A16D86E0-B553-4F60-8A5D-F3750BE424E6} = {CE599F12-D209-41F2-964F-BECBE6D1812D} + {CE599F12-D209-41F2-964F-BECBE6D1812D} = {66291335-CC8C-4DCE-9742-CDE6E6D950C2} + {6C3499A5-13E4-48D4-8D45-54B0E96C7287} = {2B99B657-DF9B-4557-84F8-9A9FBB66F844} + {86ABC01C-98A6-40EC-ACB2-62DBED79C5E8} = {2B99B657-DF9B-4557-84F8-9A9FBB66F844} + {2B99B657-DF9B-4557-84F8-9A9FBB66F844} = {66291335-CC8C-4DCE-9742-CDE6E6D950C2} + {EEE0C0A5-DE33-4F7E-A7CB-3A4D1E2B5CA6} = {4C8454BC-F18B-43BB-A78C-FE788383DAED} + {4C8454BC-F18B-43BB-A78C-FE788383DAED} = {66291335-CC8C-4DCE-9742-CDE6E6D950C2} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {7897D6F2-D18F-4ABB-9698-593AE45059C5} diff --git a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/PACKAGE.md b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/PACKAGE.md new file mode 100644 index 00000000000000..f017c0b7193271 --- /dev/null +++ b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/PACKAGE.md @@ -0,0 +1,43 @@ +## About +Contains abstractions to host user code in an application by encapsulating an application's resources and lifetime functionality including: +- Dependency injection (DI). +- Logging. +- Configuration. +- Starting, stopping and obtaining notifications. + +This package is also used to wire up specific application models like ASP.NET Core that are built on top of hosting. + +## Key Features +* Provides the `BackgroundService` base class and the `IHostedService` interface for implementing worker services. +* Provides interfaces used to configure and start\stop a host. +* Provides types to obtain environment settings such as an application name and paths. + +## How to Use +See the Conceptual documentation below for using `BackgroundService` and `IHostedService` to host worker services. + +## Main Types +The main types provided by this library are: + +* `Microsoft.Extensions.Hosting.BackgroundService` +* `Microsoft.Extensions.Hosting.IHostBuilder` +* `Microsoft.Extensions.Hosting.IHostedService` + +## Additional Documentation +* Conceptual documentation + - [Worker services in .NET](https://learn.microsoft.com/dotnet/core/extensions/workers) + - [Implement the IHostedService interface](https://learn.microsoft.com/dotnet/core/extensions/timer-service) +* API documentation + - [BackgroundService](https://learn.microsoft.com/dotnet/api/microsoft.extensions.hosting.backgroundservice) + - [IHostBuilder](https://learn.microsoft.com/dotnet/api/microsoft.extensions.hosting.ihostbuilder) + - [IHostedService](https://learn.microsoft.com/dotnet/api/microsoft.extensions.hosting.ihostedservice) + +## Related Packages +- `Microsoft.Extensions.Hosting` +- `Microsoft.Extensions.Configuration.Abstractions` +- `Microsoft.Extensions.DependencyInjection.Abstractions` +- `Microsoft.Extensions.Diagnostics.Abstractions` +- `Microsoft.Extensions.FileProviders.Abstractions` +- `Microsoft.Extensions.Logging.Abstractions` + +## Feedback & Contributing +Microsoft.Extensions.Hosting.Abstractions is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). 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 5dddad667af873..7fc11dab72e0c4 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 @@ -47,6 +47,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Depend EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyInjection", "..\Microsoft.Extensions.DependencyInjection\src\Microsoft.Extensions.DependencyInjection.csproj", "{4067DFDE-ECAE-42EE-BFC9-920BC95B2109}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics.Abstractions", "..\Microsoft.Extensions.Diagnostics.Abstractions\ref\Microsoft.Extensions.Diagnostics.Abstractions.csproj", "{EBF2037F-2F40-4E6D-B790-8254E1201080}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics.Abstractions", "..\Microsoft.Extensions.Diagnostics.Abstractions\src\Microsoft.Extensions.Diagnostics.Abstractions.csproj", "{064D2FE8-D638-4E0A-821F-002ED3571D72}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics", "..\Microsoft.Extensions.Diagnostics\ref\Microsoft.Extensions.Diagnostics.csproj", "{E7CCB629-F791-445B-8BED-7537B5314572}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics", "..\Microsoft.Extensions.Diagnostics\src\Microsoft.Extensions.Diagnostics.csproj", "{079248AE-6567-497E-ACF7-3A0F8A0F7981}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.FileProviders.Abstractions", "..\Microsoft.Extensions.FileProviders.Abstractions\ref\Microsoft.Extensions.FileProviders.Abstractions.csproj", "{B8C25E82-EF3B-4448-939B-781FEC478870}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.FileProviders.Abstractions", "..\Microsoft.Extensions.FileProviders.Abstractions\src\Microsoft.Extensions.FileProviders.Abstractions.csproj", "{D8C3A422-16FC-4992-A501-EE53DAA0EDD1}" @@ -111,6 +119,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Option EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.ConfigurationExtensions", "..\Microsoft.Extensions.Options.ConfigurationExtensions\src\Microsoft.Extensions.Options.ConfigurationExtensions.csproj", "{2E027B76-275A-4FCE-9774-A2F8C3CD0C7E}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.SourceGeneration", "..\Microsoft.Extensions.Options\gen\Microsoft.Extensions.Options.SourceGeneration.csproj", "{AA0DB387-9639-4997-A4B7-555EF45BFB4A}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\ref\Microsoft.Extensions.Options.csproj", "{3765CD5F-C4BF-40F4-8223-0434957D49E5}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\src\Microsoft.Extensions.Options.csproj", "{C206A9B3-F9FE-4771-93F4-7AC7930CF844}" @@ -157,6 +167,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\Syst EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{25474DE2-4D3D-4950-BDA7-CF6FE3CCD940}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{78496963-2F57-410C-B89F-539700E2901D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{3C8144E2-A75B-4D18-9F8A-7E69BBB23F46}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{16A5B90D-A9CC-4B3D-8C6F-D91D51CBC91A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{72CF4F8C-96CE-4E3E-876E-AC607A855237}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{37919F9F-4E5B-40F4-A638-80107902D4BF}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{9504A671-7FF4-41AA-AF67-5EBD0CF86561}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{087E4FD9-3846-4EE2-A8E5-28BD1CCA777C}" @@ -165,6 +185,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{192FD259-E55 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{694561D4-7901-4727-B87C-109C7CED0404}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{578F9128-4119-40F9-8276-3643FA73D2D6}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{495ED7E7-5804-4509-BCD4-354556D7D1A2}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{341A9CE3-A519-4EDF-8E80-25D982C281D3}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{2D6EEE82-E5EB-423E-AFB3-6941FACCF1A2}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -267,6 +295,22 @@ Global {4067DFDE-ECAE-42EE-BFC9-920BC95B2109}.Debug|Any CPU.Build.0 = Debug|Any CPU {4067DFDE-ECAE-42EE-BFC9-920BC95B2109}.Release|Any CPU.ActiveCfg = Release|Any CPU {4067DFDE-ECAE-42EE-BFC9-920BC95B2109}.Release|Any CPU.Build.0 = Release|Any CPU + {EBF2037F-2F40-4E6D-B790-8254E1201080}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EBF2037F-2F40-4E6D-B790-8254E1201080}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EBF2037F-2F40-4E6D-B790-8254E1201080}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EBF2037F-2F40-4E6D-B790-8254E1201080}.Release|Any CPU.Build.0 = Release|Any CPU + {064D2FE8-D638-4E0A-821F-002ED3571D72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {064D2FE8-D638-4E0A-821F-002ED3571D72}.Debug|Any CPU.Build.0 = Debug|Any CPU + {064D2FE8-D638-4E0A-821F-002ED3571D72}.Release|Any CPU.ActiveCfg = Release|Any CPU + {064D2FE8-D638-4E0A-821F-002ED3571D72}.Release|Any CPU.Build.0 = Release|Any CPU + {E7CCB629-F791-445B-8BED-7537B5314572}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E7CCB629-F791-445B-8BED-7537B5314572}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E7CCB629-F791-445B-8BED-7537B5314572}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E7CCB629-F791-445B-8BED-7537B5314572}.Release|Any CPU.Build.0 = Release|Any CPU + {079248AE-6567-497E-ACF7-3A0F8A0F7981}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {079248AE-6567-497E-ACF7-3A0F8A0F7981}.Debug|Any CPU.Build.0 = Debug|Any CPU + {079248AE-6567-497E-ACF7-3A0F8A0F7981}.Release|Any CPU.ActiveCfg = Release|Any CPU + {079248AE-6567-497E-ACF7-3A0F8A0F7981}.Release|Any CPU.Build.0 = Release|Any CPU {B8C25E82-EF3B-4448-939B-781FEC478870}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B8C25E82-EF3B-4448-939B-781FEC478870}.Debug|Any CPU.Build.0 = Debug|Any CPU {B8C25E82-EF3B-4448-939B-781FEC478870}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -395,6 +439,10 @@ Global {2E027B76-275A-4FCE-9774-A2F8C3CD0C7E}.Debug|Any CPU.Build.0 = Debug|Any CPU {2E027B76-275A-4FCE-9774-A2F8C3CD0C7E}.Release|Any CPU.ActiveCfg = Release|Any CPU {2E027B76-275A-4FCE-9774-A2F8C3CD0C7E}.Release|Any CPU.Build.0 = Release|Any CPU + {AA0DB387-9639-4997-A4B7-555EF45BFB4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AA0DB387-9639-4997-A4B7-555EF45BFB4A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AA0DB387-9639-4997-A4B7-555EF45BFB4A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AA0DB387-9639-4997-A4B7-555EF45BFB4A}.Release|Any CPU.Build.0 = Release|Any CPU {3765CD5F-C4BF-40F4-8223-0434957D49E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3765CD5F-C4BF-40F4-8223-0434957D49E5}.Debug|Any CPU.Build.0 = Debug|Any CPU {3765CD5F-C4BF-40F4-8223-0434957D49E5}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -487,6 +535,26 @@ Global {25474DE2-4D3D-4950-BDA7-CF6FE3CCD940}.Debug|Any CPU.Build.0 = Debug|Any CPU {25474DE2-4D3D-4950-BDA7-CF6FE3CCD940}.Release|Any CPU.ActiveCfg = Release|Any CPU {25474DE2-4D3D-4950-BDA7-CF6FE3CCD940}.Release|Any CPU.Build.0 = Release|Any CPU + {78496963-2F57-410C-B89F-539700E2901D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {78496963-2F57-410C-B89F-539700E2901D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {78496963-2F57-410C-B89F-539700E2901D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {78496963-2F57-410C-B89F-539700E2901D}.Release|Any CPU.Build.0 = Release|Any CPU + {3C8144E2-A75B-4D18-9F8A-7E69BBB23F46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3C8144E2-A75B-4D18-9F8A-7E69BBB23F46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3C8144E2-A75B-4D18-9F8A-7E69BBB23F46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3C8144E2-A75B-4D18-9F8A-7E69BBB23F46}.Release|Any CPU.Build.0 = Release|Any CPU + {16A5B90D-A9CC-4B3D-8C6F-D91D51CBC91A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {16A5B90D-A9CC-4B3D-8C6F-D91D51CBC91A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {16A5B90D-A9CC-4B3D-8C6F-D91D51CBC91A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {16A5B90D-A9CC-4B3D-8C6F-D91D51CBC91A}.Release|Any CPU.Build.0 = Release|Any CPU + {72CF4F8C-96CE-4E3E-876E-AC607A855237}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {72CF4F8C-96CE-4E3E-876E-AC607A855237}.Debug|Any CPU.Build.0 = Debug|Any CPU + {72CF4F8C-96CE-4E3E-876E-AC607A855237}.Release|Any CPU.ActiveCfg = Release|Any CPU + {72CF4F8C-96CE-4E3E-876E-AC607A855237}.Release|Any CPU.Build.0 = Release|Any CPU + {37919F9F-4E5B-40F4-A638-80107902D4BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {37919F9F-4E5B-40F4-A638-80107902D4BF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {37919F9F-4E5B-40F4-A638-80107902D4BF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {37919F9F-4E5B-40F4-A638-80107902D4BF}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -505,6 +573,8 @@ Global {E7387064-C6EB-438E-8893-4F478403E568} = {087E4FD9-3846-4EE2-A8E5-28BD1CCA777C} {05E9D59A-7FA1-4BE3-953E-F99109AFBCA3} = {087E4FD9-3846-4EE2-A8E5-28BD1CCA777C} {B8625AE9-AEF9-4A41-B208-60F0526BE5B6} = {087E4FD9-3846-4EE2-A8E5-28BD1CCA777C} + {EBF2037F-2F40-4E6D-B790-8254E1201080} = {087E4FD9-3846-4EE2-A8E5-28BD1CCA777C} + {E7CCB629-F791-445B-8BED-7537B5314572} = {087E4FD9-3846-4EE2-A8E5-28BD1CCA777C} {B8C25E82-EF3B-4448-939B-781FEC478870} = {087E4FD9-3846-4EE2-A8E5-28BD1CCA777C} {0B5BA863-7777-471F-8393-EBBD41D10D9E} = {087E4FD9-3846-4EE2-A8E5-28BD1CCA777C} {1A3EF133-CC86-4CC9-BBB8-333D41563AC3} = {087E4FD9-3846-4EE2-A8E5-28BD1CCA777C} @@ -540,6 +610,8 @@ Global {CE8EDD88-76E2-4154-A41C-45B2004634BD} = {192FD259-E55F-40C5-82EE-9E924EA6C3CB} {AF0F4768-8A3D-42CF-ACA9-79E989EB4A72} = {192FD259-E55F-40C5-82EE-9E924EA6C3CB} {4067DFDE-ECAE-42EE-BFC9-920BC95B2109} = {192FD259-E55F-40C5-82EE-9E924EA6C3CB} + {064D2FE8-D638-4E0A-821F-002ED3571D72} = {192FD259-E55F-40C5-82EE-9E924EA6C3CB} + {079248AE-6567-497E-ACF7-3A0F8A0F7981} = {192FD259-E55F-40C5-82EE-9E924EA6C3CB} {D8C3A422-16FC-4992-A501-EE53DAA0EDD1} = {192FD259-E55F-40C5-82EE-9E924EA6C3CB} {410F3407-0106-442D-9BA2-88395D62BF2C} = {192FD259-E55F-40C5-82EE-9E924EA6C3CB} {9C03BBD2-3EC8-4E82-9C3E-E4C869A65611} = {192FD259-E55F-40C5-82EE-9E924EA6C3CB} @@ -565,12 +637,21 @@ Global {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} + {AA0DB387-9639-4997-A4B7-555EF45BFB4A} = {694561D4-7901-4727-B87C-109C7CED0404} {E89B69FA-5B8B-4921-97BF-AA8FB60C7A15} = {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} + {78496963-2F57-410C-B89F-539700E2901D} = {578F9128-4119-40F9-8276-3643FA73D2D6} + {3C8144E2-A75B-4D18-9F8A-7E69BBB23F46} = {578F9128-4119-40F9-8276-3643FA73D2D6} + {578F9128-4119-40F9-8276-3643FA73D2D6} = {2D6EEE82-E5EB-423E-AFB3-6941FACCF1A2} + {16A5B90D-A9CC-4B3D-8C6F-D91D51CBC91A} = {495ED7E7-5804-4509-BCD4-354556D7D1A2} + {72CF4F8C-96CE-4E3E-876E-AC607A855237} = {495ED7E7-5804-4509-BCD4-354556D7D1A2} + {495ED7E7-5804-4509-BCD4-354556D7D1A2} = {2D6EEE82-E5EB-423E-AFB3-6941FACCF1A2} + {37919F9F-4E5B-40F4-A638-80107902D4BF} = {341A9CE3-A519-4EDF-8E80-25D982C281D3} + {341A9CE3-A519-4EDF-8E80-25D982C281D3} = {2D6EEE82-E5EB-423E-AFB3-6941FACCF1A2} 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 58d1fca086c7de..d8a2363e23212e 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 @@ -47,6 +47,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Depend EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyInjection", "..\Microsoft.Extensions.DependencyInjection\src\Microsoft.Extensions.DependencyInjection.csproj", "{C913A82A-3C17-4991-8F66-9D9F0B841E5E}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics.Abstractions", "..\Microsoft.Extensions.Diagnostics.Abstractions\ref\Microsoft.Extensions.Diagnostics.Abstractions.csproj", "{230CCF86-346A-4630-BD85-598786B8EF1D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics.Abstractions", "..\Microsoft.Extensions.Diagnostics.Abstractions\src\Microsoft.Extensions.Diagnostics.Abstractions.csproj", "{CA0D9981-F876-4287-9004-CADF6FC3857B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics", "..\Microsoft.Extensions.Diagnostics\ref\Microsoft.Extensions.Diagnostics.csproj", "{2A14AAD0-A0D8-4F60-9856-A6A1864C9574}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics", "..\Microsoft.Extensions.Diagnostics\src\Microsoft.Extensions.Diagnostics.csproj", "{37802587-1E56-4DFD-A402-DB290D76B892}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.FileProviders.Abstractions", "..\Microsoft.Extensions.FileProviders.Abstractions\ref\Microsoft.Extensions.FileProviders.Abstractions.csproj", "{2D1CD2A4-2440-47AB-9C43-33C595ECE5F1}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.FileProviders.Abstractions", "..\Microsoft.Extensions.FileProviders.Abstractions\src\Microsoft.Extensions.FileProviders.Abstractions.csproj", "{67A6FA6A-F171-4A00-80ED-113736B2B5B5}" @@ -111,6 +119,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Option EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.ConfigurationExtensions", "..\Microsoft.Extensions.Options.ConfigurationExtensions\src\Microsoft.Extensions.Options.ConfigurationExtensions.csproj", "{83D8F9FB-0A8D-4E48-A7CF-D169432A41AD}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.SourceGeneration", "..\Microsoft.Extensions.Options\gen\Microsoft.Extensions.Options.SourceGeneration.csproj", "{E5CD419F-E73D-4BFF-B9D8-ACDE673E31BF}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\ref\Microsoft.Extensions.Options.csproj", "{70A40879-BA02-4860-9A55-D13DE8A456D8}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\src\Microsoft.Extensions.Options.csproj", "{5DBF21B8-1E05-4774-A63D-E6C22CDFEA1A}" @@ -161,6 +171,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\Syst EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{C50BBD27-2445-4DF4-9A1D-C7919D016BBC}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{CB6E9B8A-23D7-4729-BD1C-BFB1A674B3E8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{BE9E89C9-DF1D-4017-ACA4-94E140012552}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{71157AAE-7328-4F43-9271-9382DE0AA535}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{875A08A8-21BC-497A-87A7-9BF1DB1E4753}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{EE488D47-ACB9-471D-AD00-4B5AFA059DE2}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{6D06A6CA-BD7E-44A3-8BE5-E071E1B27993}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{BFC0CC54-6781-45CB-865F-72E9FABBD023}" @@ -169,6 +189,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{76933DF1-12A EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{0D30E826-4EE9-4404-A74D-5255FDB76A12}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{54C0A08B-8701-4156-95C2-FE76F944D6DD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{8DB6681D-8F84-41AF-BA16-63710F908AD3}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{EA444929-AF9D-4323-A5F8-21977E55DB5F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{2E68F57E-9A7D-4FC4-B8CC-93A1448786C1}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -271,6 +299,22 @@ Global {C913A82A-3C17-4991-8F66-9D9F0B841E5E}.Debug|Any CPU.Build.0 = Debug|Any CPU {C913A82A-3C17-4991-8F66-9D9F0B841E5E}.Release|Any CPU.ActiveCfg = Release|Any CPU {C913A82A-3C17-4991-8F66-9D9F0B841E5E}.Release|Any CPU.Build.0 = Release|Any CPU + {230CCF86-346A-4630-BD85-598786B8EF1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {230CCF86-346A-4630-BD85-598786B8EF1D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {230CCF86-346A-4630-BD85-598786B8EF1D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {230CCF86-346A-4630-BD85-598786B8EF1D}.Release|Any CPU.Build.0 = Release|Any CPU + {CA0D9981-F876-4287-9004-CADF6FC3857B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CA0D9981-F876-4287-9004-CADF6FC3857B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CA0D9981-F876-4287-9004-CADF6FC3857B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CA0D9981-F876-4287-9004-CADF6FC3857B}.Release|Any CPU.Build.0 = Release|Any CPU + {2A14AAD0-A0D8-4F60-9856-A6A1864C9574}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2A14AAD0-A0D8-4F60-9856-A6A1864C9574}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2A14AAD0-A0D8-4F60-9856-A6A1864C9574}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2A14AAD0-A0D8-4F60-9856-A6A1864C9574}.Release|Any CPU.Build.0 = Release|Any CPU + {37802587-1E56-4DFD-A402-DB290D76B892}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {37802587-1E56-4DFD-A402-DB290D76B892}.Debug|Any CPU.Build.0 = Debug|Any CPU + {37802587-1E56-4DFD-A402-DB290D76B892}.Release|Any CPU.ActiveCfg = Release|Any CPU + {37802587-1E56-4DFD-A402-DB290D76B892}.Release|Any CPU.Build.0 = Release|Any CPU {2D1CD2A4-2440-47AB-9C43-33C595ECE5F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2D1CD2A4-2440-47AB-9C43-33C595ECE5F1}.Debug|Any CPU.Build.0 = Debug|Any CPU {2D1CD2A4-2440-47AB-9C43-33C595ECE5F1}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -399,6 +443,10 @@ Global {83D8F9FB-0A8D-4E48-A7CF-D169432A41AD}.Debug|Any CPU.Build.0 = Debug|Any CPU {83D8F9FB-0A8D-4E48-A7CF-D169432A41AD}.Release|Any CPU.ActiveCfg = Release|Any CPU {83D8F9FB-0A8D-4E48-A7CF-D169432A41AD}.Release|Any CPU.Build.0 = Release|Any CPU + {E5CD419F-E73D-4BFF-B9D8-ACDE673E31BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E5CD419F-E73D-4BFF-B9D8-ACDE673E31BF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E5CD419F-E73D-4BFF-B9D8-ACDE673E31BF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E5CD419F-E73D-4BFF-B9D8-ACDE673E31BF}.Release|Any CPU.Build.0 = Release|Any CPU {70A40879-BA02-4860-9A55-D13DE8A456D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {70A40879-BA02-4860-9A55-D13DE8A456D8}.Debug|Any CPU.Build.0 = Debug|Any CPU {70A40879-BA02-4860-9A55-D13DE8A456D8}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -499,6 +547,26 @@ Global {C50BBD27-2445-4DF4-9A1D-C7919D016BBC}.Debug|Any CPU.Build.0 = Debug|Any CPU {C50BBD27-2445-4DF4-9A1D-C7919D016BBC}.Release|Any CPU.ActiveCfg = Release|Any CPU {C50BBD27-2445-4DF4-9A1D-C7919D016BBC}.Release|Any CPU.Build.0 = Release|Any CPU + {CB6E9B8A-23D7-4729-BD1C-BFB1A674B3E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CB6E9B8A-23D7-4729-BD1C-BFB1A674B3E8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CB6E9B8A-23D7-4729-BD1C-BFB1A674B3E8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CB6E9B8A-23D7-4729-BD1C-BFB1A674B3E8}.Release|Any CPU.Build.0 = Release|Any CPU + {BE9E89C9-DF1D-4017-ACA4-94E140012552}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BE9E89C9-DF1D-4017-ACA4-94E140012552}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BE9E89C9-DF1D-4017-ACA4-94E140012552}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BE9E89C9-DF1D-4017-ACA4-94E140012552}.Release|Any CPU.Build.0 = Release|Any CPU + {71157AAE-7328-4F43-9271-9382DE0AA535}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {71157AAE-7328-4F43-9271-9382DE0AA535}.Debug|Any CPU.Build.0 = Debug|Any CPU + {71157AAE-7328-4F43-9271-9382DE0AA535}.Release|Any CPU.ActiveCfg = Release|Any CPU + {71157AAE-7328-4F43-9271-9382DE0AA535}.Release|Any CPU.Build.0 = Release|Any CPU + {875A08A8-21BC-497A-87A7-9BF1DB1E4753}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {875A08A8-21BC-497A-87A7-9BF1DB1E4753}.Debug|Any CPU.Build.0 = Debug|Any CPU + {875A08A8-21BC-497A-87A7-9BF1DB1E4753}.Release|Any CPU.ActiveCfg = Release|Any CPU + {875A08A8-21BC-497A-87A7-9BF1DB1E4753}.Release|Any CPU.Build.0 = Release|Any CPU + {EE488D47-ACB9-471D-AD00-4B5AFA059DE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EE488D47-ACB9-471D-AD00-4B5AFA059DE2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EE488D47-ACB9-471D-AD00-4B5AFA059DE2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EE488D47-ACB9-471D-AD00-4B5AFA059DE2}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -517,6 +585,8 @@ Global {8E08B694-3806-492C-BCEC-7B74420E3041} = {BFC0CC54-6781-45CB-865F-72E9FABBD023} {749A4A89-3CA2-49E1-B03C-3AB1A1C6FAFD} = {BFC0CC54-6781-45CB-865F-72E9FABBD023} {F5C79255-45C9-464F-A5A7-EB9678B3F9AD} = {BFC0CC54-6781-45CB-865F-72E9FABBD023} + {230CCF86-346A-4630-BD85-598786B8EF1D} = {BFC0CC54-6781-45CB-865F-72E9FABBD023} + {2A14AAD0-A0D8-4F60-9856-A6A1864C9574} = {BFC0CC54-6781-45CB-865F-72E9FABBD023} {2D1CD2A4-2440-47AB-9C43-33C595ECE5F1} = {BFC0CC54-6781-45CB-865F-72E9FABBD023} {C6B1BE99-1AC3-4D2A-BD5B-74DBD8449C17} = {BFC0CC54-6781-45CB-865F-72E9FABBD023} {C114AFF6-377C-4694-B869-3B590317E87A} = {BFC0CC54-6781-45CB-865F-72E9FABBD023} @@ -553,6 +623,8 @@ Global {B1AEB3DD-F8D6-48D1-8DB4-B232DA4103A0} = {76933DF1-12AA-4B5B-8863-EF38F10B1EC9} {C9B7388B-0963-49A3-AB52-3E3B724EE2A9} = {76933DF1-12AA-4B5B-8863-EF38F10B1EC9} {C913A82A-3C17-4991-8F66-9D9F0B841E5E} = {76933DF1-12AA-4B5B-8863-EF38F10B1EC9} + {CA0D9981-F876-4287-9004-CADF6FC3857B} = {76933DF1-12AA-4B5B-8863-EF38F10B1EC9} + {37802587-1E56-4DFD-A402-DB290D76B892} = {76933DF1-12AA-4B5B-8863-EF38F10B1EC9} {67A6FA6A-F171-4A00-80ED-113736B2B5B5} = {76933DF1-12AA-4B5B-8863-EF38F10B1EC9} {07A9935C-015D-43DD-9CDE-809301151F7C} = {76933DF1-12AA-4B5B-8863-EF38F10B1EC9} {BAE78100-3020-4AAE-BDBF-ACF9D1D1BA2F} = {76933DF1-12AA-4B5B-8863-EF38F10B1EC9} @@ -579,12 +651,21 @@ Global {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} + {E5CD419F-E73D-4BFF-B9D8-ACDE673E31BF} = {0D30E826-4EE9-4404-A74D-5255FDB76A12} {72D5BDD7-85ED-4CBF-9659-5AE4BD863A4C} = {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} + {CB6E9B8A-23D7-4729-BD1C-BFB1A674B3E8} = {54C0A08B-8701-4156-95C2-FE76F944D6DD} + {BE9E89C9-DF1D-4017-ACA4-94E140012552} = {54C0A08B-8701-4156-95C2-FE76F944D6DD} + {54C0A08B-8701-4156-95C2-FE76F944D6DD} = {2E68F57E-9A7D-4FC4-B8CC-93A1448786C1} + {71157AAE-7328-4F43-9271-9382DE0AA535} = {8DB6681D-8F84-41AF-BA16-63710F908AD3} + {875A08A8-21BC-497A-87A7-9BF1DB1E4753} = {8DB6681D-8F84-41AF-BA16-63710F908AD3} + {8DB6681D-8F84-41AF-BA16-63710F908AD3} = {2E68F57E-9A7D-4FC4-B8CC-93A1448786C1} + {EE488D47-ACB9-471D-AD00-4B5AFA059DE2} = {EA444929-AF9D-4323-A5F8-21977E55DB5F} + {EA444929-AF9D-4323-A5F8-21977E55DB5F} = {2E68F57E-9A7D-4FC4-B8CC-93A1448786C1} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {81854B5B-5AA0-49DC-9B7B-9E2DB24D7507} diff --git a/src/libraries/Microsoft.Extensions.Hosting.WindowsServices/src/Microsoft.Extensions.Hosting.WindowsServices.csproj b/src/libraries/Microsoft.Extensions.Hosting.WindowsServices/src/Microsoft.Extensions.Hosting.WindowsServices.csproj index 827ed114b0cf64..8a6564c371c173 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.WindowsServices/src/Microsoft.Extensions.Hosting.WindowsServices.csproj +++ b/src/libraries/Microsoft.Extensions.Hosting.WindowsServices/src/Microsoft.Extensions.Hosting.WindowsServices.csproj @@ -9,9 +9,6 @@ - + + + + diff --git a/src/libraries/Microsoft.Extensions.Hosting.WindowsServices/src/PACKAGE.md b/src/libraries/Microsoft.Extensions.Hosting.WindowsServices/src/PACKAGE.md new file mode 100644 index 00000000000000..65908c6aaa7b63 --- /dev/null +++ b/src/libraries/Microsoft.Extensions.Hosting.WindowsServices/src/PACKAGE.md @@ -0,0 +1,44 @@ +## About +Supports using Windows Services with the hosting infrastructure. + +## Key Features +* Can configure a host to be a Windows Service. + +## How to Use +From a Worker Service app created using the Visual Studio template: +```cs +IHost host = Host.CreateDefaultBuilder(args) + .ConfigureServices(services => + { + services.AddHostedService(); + }) + // Configure as a Windows Service + .UseWindowsService(options => + { + options.ServiceName = "My Service"; + }) + .Build(); + +host.Run(); +``` + +## Main Types +The main types provided by this library are: +* `Microsoft.Extensions.Hosting.WindowsServiceLifetimeHostBuilderExtensions` +* `Microsoft.Extensions.Hosting.WindowsServices.WindowsServiceLifetime` + +## Additional Documentation +* [WindowsServiceLifetime](https://learn.microsoft.com/dotnet/api/microsoft.extensions.hosting.windowsservices.windowsservicelifetime) +* [WindowsServiceLifetimeHostBuilderExtensions](https://learn.microsoft.com/dotnet/api/microsoft.extensions.hosting.windowsservicelifetimehostbuilderextensions) +* [Create Windows Service using BackgroundService](https://learn.microsoft.com/dotnet/core/extensions/windows-service) +* [Host ASP.NET Core in a Windows Service](https://learn.microsoft.com/aspnet/core/host-and-deploy/windows-service?tabs=visual-studio) + +## Related Packages +- `Microsoft.Extensions.Hosting` +- `System.ServiceProcess.ServiceController` + +## Feedback & Contributing + + + +Microsoft.Extensions.Hosting.WindowsServices is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). diff --git a/src/libraries/Microsoft.Extensions.Hosting/Microsoft.Extensions.Hosting.sln b/src/libraries/Microsoft.Extensions.Hosting/Microsoft.Extensions.Hosting.sln index 3b0d013e478b87..1f52fec20a33b4 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/Microsoft.Extensions.Hosting.sln +++ b/src/libraries/Microsoft.Extensions.Hosting/Microsoft.Extensions.Hosting.sln @@ -1,8 +1,4 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.7.33711.374 -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", "{BCAE2699-A994-48FE-B9B0-5580D267BD2E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.AsyncInterfaces", "..\Microsoft.Bcl.AsyncInterfaces\ref\Microsoft.Bcl.AsyncInterfaces.csproj", "{47ACDB6F-34CB-478D-9E43-F3662EE5838D}" @@ -51,6 +47,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Depend EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyInjection", "..\Microsoft.Extensions.DependencyInjection\src\Microsoft.Extensions.DependencyInjection.csproj", "{6C6DDBF6-AAF3-4A2A-8CB1-C7A630B7C49F}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics.Abstractions", "..\Microsoft.Extensions.Diagnostics.Abstractions\ref\Microsoft.Extensions.Diagnostics.Abstractions.csproj", "{982C5C02-DD1E-452C-B5BC-13207D2CB14F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics.Abstractions", "..\Microsoft.Extensions.Diagnostics.Abstractions\src\Microsoft.Extensions.Diagnostics.Abstractions.csproj", "{FB173557-75BD-4943-B813-0AD13E0337A3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics", "..\Microsoft.Extensions.Diagnostics\ref\Microsoft.Extensions.Diagnostics.csproj", "{A9181F84-BD47-4B46-AD71-908E289A695E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics", "..\Microsoft.Extensions.Diagnostics\src\Microsoft.Extensions.Diagnostics.csproj", "{5B630ECF-5C4D-4F66-9AB9-59B014520A5C}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.FileProviders.Abstractions", "..\Microsoft.Extensions.FileProviders.Abstractions\ref\Microsoft.Extensions.FileProviders.Abstractions.csproj", "{24220AD7-03ED-427A-BFC8-114C475EAD0F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.FileProviders.Abstractions", "..\Microsoft.Extensions.FileProviders.Abstractions\src\Microsoft.Extensions.FileProviders.Abstractions.csproj", "{0A021166-613C-430C-8460-50F1E0DF7AD8}" @@ -115,6 +119,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Option EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.ConfigurationExtensions", "..\Microsoft.Extensions.Options.ConfigurationExtensions\src\Microsoft.Extensions.Options.ConfigurationExtensions.csproj", "{0AEAD15B-CD38-4462-A36C-655ED8D0CBD1}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.SourceGeneration", "..\Microsoft.Extensions.Options\gen\Microsoft.Extensions.Options.SourceGeneration.csproj", "{85C80343-56B0-4D77-8A5F-8E4A773F103C}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\ref\Microsoft.Extensions.Options.csproj", "{DD121F9F-3548-4247-8E10-FB584FC0827C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\src\Microsoft.Extensions.Options.csproj", "{25C5119A-AAFB-4C74-9E12-F747CA4D80E7}" @@ -161,6 +167,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\Syst EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{0813853E-8C78-429A-B01A-3FB2EF1898F8}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{549FCDB5-9443-4309-B4BF-05B954598BB0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{C01638F8-A351-46CD-88FC-AE3DBB4CF0BC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{6914525A-4D84-4ED1-9B74-ED7C529C9FF4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{F44D3D54-91AE-4708-ACEF-03466C82594C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{B36E82D9-D804-403B-AA91-DAC04F79FCBB}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{06E9ED4F-D3CF-4216-A8C7-E8A0AB16E33D}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{E041754F-1A93-443A-9294-87DC1C30B471}" @@ -169,13 +185,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{59A29BF0-B76 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{A9A8D649-4C09-4FD1-9837-EE7B9D902253}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics", "..\Microsoft.Extensions.Diagnostics\src\Microsoft.Extensions.Diagnostics.csproj", "{5B630ECF-5C4D-4F66-9AB9-59B014520A5C}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{A946CE10-3582-4BA0-92CA-92D356344C91}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics.Abstractions", "..\Microsoft.Extensions.Diagnostics.Abstractions\src\Microsoft.Extensions.Diagnostics.Abstractions.csproj", "{FB173557-75BD-4943-B813-0AD13E0337A3}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{C47E3FF0-6FEC-49AE-B66C-C67CBC47A606}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics.Abstractions", "..\Microsoft.Extensions.Diagnostics.Abstractions\ref\Microsoft.Extensions.Diagnostics.Abstractions.csproj", "{982C5C02-DD1E-452C-B5BC-13207D2CB14F}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{71475D1B-D7B2-40B6-9228-E97900F0FD2B}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics", "..\Microsoft.Extensions.Diagnostics\ref\Microsoft.Extensions.Diagnostics.csproj", "{A9181F84-BD47-4B46-AD71-908E289A695E}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{E88EEE4C-2DFE-4C8E-B822-EA42282D0C59}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -279,6 +295,22 @@ Global {6C6DDBF6-AAF3-4A2A-8CB1-C7A630B7C49F}.Debug|Any CPU.Build.0 = Debug|Any CPU {6C6DDBF6-AAF3-4A2A-8CB1-C7A630B7C49F}.Release|Any CPU.ActiveCfg = Release|Any CPU {6C6DDBF6-AAF3-4A2A-8CB1-C7A630B7C49F}.Release|Any CPU.Build.0 = Release|Any CPU + {982C5C02-DD1E-452C-B5BC-13207D2CB14F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {982C5C02-DD1E-452C-B5BC-13207D2CB14F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {982C5C02-DD1E-452C-B5BC-13207D2CB14F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {982C5C02-DD1E-452C-B5BC-13207D2CB14F}.Release|Any CPU.Build.0 = Release|Any CPU + {FB173557-75BD-4943-B813-0AD13E0337A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FB173557-75BD-4943-B813-0AD13E0337A3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FB173557-75BD-4943-B813-0AD13E0337A3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FB173557-75BD-4943-B813-0AD13E0337A3}.Release|Any CPU.Build.0 = Release|Any CPU + {A9181F84-BD47-4B46-AD71-908E289A695E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A9181F84-BD47-4B46-AD71-908E289A695E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A9181F84-BD47-4B46-AD71-908E289A695E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A9181F84-BD47-4B46-AD71-908E289A695E}.Release|Any CPU.Build.0 = Release|Any CPU + {5B630ECF-5C4D-4F66-9AB9-59B014520A5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5B630ECF-5C4D-4F66-9AB9-59B014520A5C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5B630ECF-5C4D-4F66-9AB9-59B014520A5C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5B630ECF-5C4D-4F66-9AB9-59B014520A5C}.Release|Any CPU.Build.0 = Release|Any CPU {24220AD7-03ED-427A-BFC8-114C475EAD0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {24220AD7-03ED-427A-BFC8-114C475EAD0F}.Debug|Any CPU.Build.0 = Debug|Any CPU {24220AD7-03ED-427A-BFC8-114C475EAD0F}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -407,6 +439,10 @@ Global {0AEAD15B-CD38-4462-A36C-655ED8D0CBD1}.Debug|Any CPU.Build.0 = Debug|Any CPU {0AEAD15B-CD38-4462-A36C-655ED8D0CBD1}.Release|Any CPU.ActiveCfg = Release|Any CPU {0AEAD15B-CD38-4462-A36C-655ED8D0CBD1}.Release|Any CPU.Build.0 = Release|Any CPU + {85C80343-56B0-4D77-8A5F-8E4A773F103C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85C80343-56B0-4D77-8A5F-8E4A773F103C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85C80343-56B0-4D77-8A5F-8E4A773F103C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85C80343-56B0-4D77-8A5F-8E4A773F103C}.Release|Any CPU.Build.0 = Release|Any CPU {DD121F9F-3548-4247-8E10-FB584FC0827C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DD121F9F-3548-4247-8E10-FB584FC0827C}.Debug|Any CPU.Build.0 = Debug|Any CPU {DD121F9F-3548-4247-8E10-FB584FC0827C}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -499,110 +535,123 @@ Global {0813853E-8C78-429A-B01A-3FB2EF1898F8}.Debug|Any CPU.Build.0 = Debug|Any CPU {0813853E-8C78-429A-B01A-3FB2EF1898F8}.Release|Any CPU.ActiveCfg = Release|Any CPU {0813853E-8C78-429A-B01A-3FB2EF1898F8}.Release|Any CPU.Build.0 = Release|Any CPU - {5B630ECF-5C4D-4F66-9AB9-59B014520A5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5B630ECF-5C4D-4F66-9AB9-59B014520A5C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5B630ECF-5C4D-4F66-9AB9-59B014520A5C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5B630ECF-5C4D-4F66-9AB9-59B014520A5C}.Release|Any CPU.Build.0 = Release|Any CPU - {FB173557-75BD-4943-B813-0AD13E0337A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FB173557-75BD-4943-B813-0AD13E0337A3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FB173557-75BD-4943-B813-0AD13E0337A3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FB173557-75BD-4943-B813-0AD13E0337A3}.Release|Any CPU.Build.0 = Release|Any CPU - {982C5C02-DD1E-452C-B5BC-13207D2CB14F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {982C5C02-DD1E-452C-B5BC-13207D2CB14F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {982C5C02-DD1E-452C-B5BC-13207D2CB14F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {982C5C02-DD1E-452C-B5BC-13207D2CB14F}.Release|Any CPU.Build.0 = Release|Any CPU - {A9181F84-BD47-4B46-AD71-908E289A695E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A9181F84-BD47-4B46-AD71-908E289A695E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A9181F84-BD47-4B46-AD71-908E289A695E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A9181F84-BD47-4B46-AD71-908E289A695E}.Release|Any CPU.Build.0 = Release|Any CPU + {549FCDB5-9443-4309-B4BF-05B954598BB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {549FCDB5-9443-4309-B4BF-05B954598BB0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {549FCDB5-9443-4309-B4BF-05B954598BB0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {549FCDB5-9443-4309-B4BF-05B954598BB0}.Release|Any CPU.Build.0 = Release|Any CPU + {C01638F8-A351-46CD-88FC-AE3DBB4CF0BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C01638F8-A351-46CD-88FC-AE3DBB4CF0BC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C01638F8-A351-46CD-88FC-AE3DBB4CF0BC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C01638F8-A351-46CD-88FC-AE3DBB4CF0BC}.Release|Any CPU.Build.0 = Release|Any CPU + {6914525A-4D84-4ED1-9B74-ED7C529C9FF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6914525A-4D84-4ED1-9B74-ED7C529C9FF4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6914525A-4D84-4ED1-9B74-ED7C529C9FF4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6914525A-4D84-4ED1-9B74-ED7C529C9FF4}.Release|Any CPU.Build.0 = Release|Any CPU + {F44D3D54-91AE-4708-ACEF-03466C82594C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F44D3D54-91AE-4708-ACEF-03466C82594C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F44D3D54-91AE-4708-ACEF-03466C82594C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F44D3D54-91AE-4708-ACEF-03466C82594C}.Release|Any CPU.Build.0 = Release|Any CPU + {B36E82D9-D804-403B-AA91-DAC04F79FCBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B36E82D9-D804-403B-AA91-DAC04F79FCBB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B36E82D9-D804-403B-AA91-DAC04F79FCBB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B36E82D9-D804-403B-AA91-DAC04F79FCBB}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {BCAE2699-A994-48FE-B9B0-5580D267BD2E} = {06E9ED4F-D3CF-4216-A8C7-E8A0AB16E33D} + {2A882DCC-96C1-4EDF-A7F0-B526EC81533F} = {06E9ED4F-D3CF-4216-A8C7-E8A0AB16E33D} + {495208B7-31BB-4802-A769-CEE4917BDF75} = {06E9ED4F-D3CF-4216-A8C7-E8A0AB16E33D} + {33C3D8F0-297F-4471-92B0-F4E8717F10E3} = {06E9ED4F-D3CF-4216-A8C7-E8A0AB16E33D} {47ACDB6F-34CB-478D-9E43-F3662EE5838D} = {E041754F-1A93-443A-9294-87DC1C30B471} - {C24E4188-27CB-4E00-A5F0-62AE23D536EE} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} {EDAC3418-1D4E-4216-9371-0A36EA1E13FE} = {E041754F-1A93-443A-9294-87DC1C30B471} - {020874FC-11A2-4FC7-8929-527462F8819A} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} - {53A78CBA-7270-4F79-84EF-09F669729079} = {A9A8D649-4C09-4FD1-9837-EE7B9D902253} {670AB88D-85C9-4674-A652-C27488ED73F9} = {E041754F-1A93-443A-9294-87DC1C30B471} - {3411D565-223A-44B5-864C-E30F826001B4} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} {4AB3E652-6709-4011-AC2F-C379A0415BAC} = {E041754F-1A93-443A-9294-87DC1C30B471} - {ECA6E734-3908-45B4-9DFA-FDDA49AD620D} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} {3D657A5A-C7DF-4817-864F-944755DCE6DF} = {E041754F-1A93-443A-9294-87DC1C30B471} - {0C041643-1217-466B-AF2E-1E44C7B117B1} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} {BD938E1D-6FC8-4D46-B103-B4D35761CEA2} = {E041754F-1A93-443A-9294-87DC1C30B471} - {6DB8DE55-5419-48EA-B4CD-2880E00409FB} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} {1C07ECD0-F69E-4E35-9C68-E4063B5D97EC} = {E041754F-1A93-443A-9294-87DC1C30B471} - {0A738527-821F-4089-B64E-3C0F4714DC78} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} {37A36947-2652-4AFD-BCF8-AAFD4D4D2827} = {E041754F-1A93-443A-9294-87DC1C30B471} - {EA9E6747-867B-4312-94B3-624EEB1C7A7A} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} {13BC7AAA-7831-4500-9D28-A93FA4CA3C74} = {E041754F-1A93-443A-9294-87DC1C30B471} - {EB889E78-AE59-4D41-AC29-8BC4D58BCE16} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} {135F551E-ACB8-4073-ABB5-A1FA558455DE} = {E041754F-1A93-443A-9294-87DC1C30B471} - {0EEA7382-25A8-4FB0-AE9A-4ECDF2FF6FB7} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} {5532E155-E423-4FFD-B009-80B4281D36BA} = {E041754F-1A93-443A-9294-87DC1C30B471} - {6C6DDBF6-AAF3-4A2A-8CB1-C7A630B7C49F} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} + {982C5C02-DD1E-452C-B5BC-13207D2CB14F} = {E041754F-1A93-443A-9294-87DC1C30B471} + {A9181F84-BD47-4B46-AD71-908E289A695E} = {E041754F-1A93-443A-9294-87DC1C30B471} {24220AD7-03ED-427A-BFC8-114C475EAD0F} = {E041754F-1A93-443A-9294-87DC1C30B471} - {0A021166-613C-430C-8460-50F1E0DF7AD8} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} {376BB9D1-6C3E-4BB1-B13A-F0750D2BE01F} = {E041754F-1A93-443A-9294-87DC1C30B471} - {1E3D564C-A79E-4E28-8E13-626EE7780831} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} {E4157F2E-F11D-48C6-A146-B4D12D9211F7} = {E041754F-1A93-443A-9294-87DC1C30B471} - {9C06E60B-2D45-4284-B7C8-7AE6D8194CE0} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} {2F25C0DB-E010-4802-8030-C88E2D09D3B0} = {E041754F-1A93-443A-9294-87DC1C30B471} - {973CE6DA-B55D-4E55-88D5-53BE69D44410} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} {0D7771CB-B3D1-4FF4-A523-40BFD3B12A84} = {E041754F-1A93-443A-9294-87DC1C30B471} - {F5CF1FC4-8F56-49BD-BFC2-5AD42AE6302D} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} - {2A882DCC-96C1-4EDF-A7F0-B526EC81533F} = {06E9ED4F-D3CF-4216-A8C7-E8A0AB16E33D} - {495208B7-31BB-4802-A769-CEE4917BDF75} = {06E9ED4F-D3CF-4216-A8C7-E8A0AB16E33D} - {33C3D8F0-297F-4471-92B0-F4E8717F10E3} = {06E9ED4F-D3CF-4216-A8C7-E8A0AB16E33D} - {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} {42E1BF94-6FE0-4017-9702-55913BD95EDE} = {E041754F-1A93-443A-9294-87DC1C30B471} - {8845E6FF-94B2-4994-A8F4-DF30844A2168} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} {15AD68F8-6C58-41A3-99B3-558C42A6E7A5} = {E041754F-1A93-443A-9294-87DC1C30B471} - {99C8FB58-8718-4E76-AEFA-3C42F2F729B1} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} {28C9D427-83BA-46A6-BEF5-6994A07F2258} = {E041754F-1A93-443A-9294-87DC1C30B471} - {F3230087-28E2-4ADF-A7D1-D48C5D9CFFE9} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} {098CEEE6-91D3-4A7C-A5D5-6BB329BB2B7B} = {E041754F-1A93-443A-9294-87DC1C30B471} - {B729474D-0E96-4296-B317-450EE24F6B48} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} {9ADBD2EE-D390-490C-BBEA-F844FE6F371E} = {E041754F-1A93-443A-9294-87DC1C30B471} - {2D4DBF5A-3BF4-4846-89F2-6FCDB80BF295} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} {465AE1C4-84DD-4864-916A-74D89DC3BBBC} = {E041754F-1A93-443A-9294-87DC1C30B471} - {D466E363-F930-4D26-AE55-0256182961DD} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} {D69326FC-CD05-4690-91C0-1537A80ACBFF} = {E041754F-1A93-443A-9294-87DC1C30B471} - {518D4AE0-FBFF-493A-A2DF-8ACBA842AE19} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} {014EE6B4-BE08-4E50-9EBD-0D7A0CB7A76E} = {E041754F-1A93-443A-9294-87DC1C30B471} - {0AEAD15B-CD38-4462-A36C-655ED8D0CBD1} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} {DD121F9F-3548-4247-8E10-FB584FC0827C} = {E041754F-1A93-443A-9294-87DC1C30B471} - {25C5119A-AAFB-4C74-9E12-F747CA4D80E7} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} {45235656-E284-4682-BE70-9A284FD73243} = {E041754F-1A93-443A-9294-87DC1C30B471} - {D975AE29-0CA2-43FC-90A0-B266DF7D4C2A} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} {FA490103-0140-473C-A572-72D529249234} = {E041754F-1A93-443A-9294-87DC1C30B471} {F90D2ED9-A38D-4E0B-AB9C-651FD24F23E2} = {E041754F-1A93-443A-9294-87DC1C30B471} {28726AEF-2732-4832-8930-074ACD9DC732} = {E041754F-1A93-443A-9294-87DC1C30B471} - {0BC9E4F4-5C34-4B90-80AB-2933992D99A6} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} {34ECA788-A105-411B-AE8B-17B7CC1D703D} = {E041754F-1A93-443A-9294-87DC1C30B471} + {9DB83E87-F09F-4DE0-8127-8C9509F0649B} = {E041754F-1A93-443A-9294-87DC1C30B471} + {000F87DC-0D56-4B37-8A0E-F7BCB3C3B61A} = {E041754F-1A93-443A-9294-87DC1C30B471} + {C595A27A-FA05-4BC8-9048-402338D7AF76} = {E041754F-1A93-443A-9294-87DC1C30B471} + {1E3D79D4-51D6-46C6-BF0F-DF51A47C5952} = {E041754F-1A93-443A-9294-87DC1C30B471} + {C24E4188-27CB-4E00-A5F0-62AE23D536EE} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} + {020874FC-11A2-4FC7-8929-527462F8819A} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} + {3411D565-223A-44B5-864C-E30F826001B4} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} + {ECA6E734-3908-45B4-9DFA-FDDA49AD620D} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} + {0C041643-1217-466B-AF2E-1E44C7B117B1} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} + {6DB8DE55-5419-48EA-B4CD-2880E00409FB} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} + {0A738527-821F-4089-B64E-3C0F4714DC78} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} + {EA9E6747-867B-4312-94B3-624EEB1C7A7A} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} + {EB889E78-AE59-4D41-AC29-8BC4D58BCE16} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} + {0EEA7382-25A8-4FB0-AE9A-4ECDF2FF6FB7} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} + {6C6DDBF6-AAF3-4A2A-8CB1-C7A630B7C49F} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} + {FB173557-75BD-4943-B813-0AD13E0337A3} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} + {5B630ECF-5C4D-4F66-9AB9-59B014520A5C} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} + {0A021166-613C-430C-8460-50F1E0DF7AD8} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} + {1E3D564C-A79E-4E28-8E13-626EE7780831} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} + {9C06E60B-2D45-4284-B7C8-7AE6D8194CE0} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} + {973CE6DA-B55D-4E55-88D5-53BE69D44410} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} + {F5CF1FC4-8F56-49BD-BFC2-5AD42AE6302D} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} + {8845E6FF-94B2-4994-A8F4-DF30844A2168} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} + {99C8FB58-8718-4E76-AEFA-3C42F2F729B1} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} + {F3230087-28E2-4ADF-A7D1-D48C5D9CFFE9} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} + {B729474D-0E96-4296-B317-450EE24F6B48} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} + {2D4DBF5A-3BF4-4846-89F2-6FCDB80BF295} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} + {D466E363-F930-4D26-AE55-0256182961DD} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} + {518D4AE0-FBFF-493A-A2DF-8ACBA842AE19} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} + {0AEAD15B-CD38-4462-A36C-655ED8D0CBD1} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} + {25C5119A-AAFB-4C74-9E12-F747CA4D80E7} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} + {D975AE29-0CA2-43FC-90A0-B266DF7D4C2A} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} + {0BC9E4F4-5C34-4B90-80AB-2933992D99A6} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} {A5DD36AF-F0AD-4616-AB91-BC63E89B2744} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} {4ED9C0A9-C1EF-47ED-99F8-74B7411C971B} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} - {9DB83E87-F09F-4DE0-8127-8C9509F0649B} = {E041754F-1A93-443A-9294-87DC1C30B471} + {B41AA17B-5129-41CC-8EA4-250B80BABF87} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} + {0813853E-8C78-429A-B01A-3FB2EF1898F8} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} + {53A78CBA-7270-4F79-84EF-09F669729079} = {A9A8D649-4C09-4FD1-9837-EE7B9D902253} + {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} + {85C80343-56B0-4D77-8A5F-8E4A773F103C} = {A9A8D649-4C09-4FD1-9837-EE7B9D902253} {CCF8862C-E2D7-45B0-96EF-54134178DA5A} = {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} - {000F87DC-0D56-4B37-8A0E-F7BCB3C3B61A} = {E041754F-1A93-443A-9294-87DC1C30B471} - {C595A27A-FA05-4BC8-9048-402338D7AF76} = {E041754F-1A93-443A-9294-87DC1C30B471} - {B41AA17B-5129-41CC-8EA4-250B80BABF87} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} {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} - {1E3D79D4-51D6-46C6-BF0F-DF51A47C5952} = {E041754F-1A93-443A-9294-87DC1C30B471} - {0813853E-8C78-429A-B01A-3FB2EF1898F8} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} - {5B630ECF-5C4D-4F66-9AB9-59B014520A5C} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} - {FB173557-75BD-4943-B813-0AD13E0337A3} = {59A29BF0-B76B-41F8-A733-E2A0847AB992} - {982C5C02-DD1E-452C-B5BC-13207D2CB14F} = {E041754F-1A93-443A-9294-87DC1C30B471} - {A9181F84-BD47-4B46-AD71-908E289A695E} = {E041754F-1A93-443A-9294-87DC1C30B471} + {549FCDB5-9443-4309-B4BF-05B954598BB0} = {A946CE10-3582-4BA0-92CA-92D356344C91} + {C01638F8-A351-46CD-88FC-AE3DBB4CF0BC} = {A946CE10-3582-4BA0-92CA-92D356344C91} + {A946CE10-3582-4BA0-92CA-92D356344C91} = {E88EEE4C-2DFE-4C8E-B822-EA42282D0C59} + {6914525A-4D84-4ED1-9B74-ED7C529C9FF4} = {C47E3FF0-6FEC-49AE-B66C-C67CBC47A606} + {F44D3D54-91AE-4708-ACEF-03466C82594C} = {C47E3FF0-6FEC-49AE-B66C-C67CBC47A606} + {C47E3FF0-6FEC-49AE-B66C-C67CBC47A606} = {E88EEE4C-2DFE-4C8E-B822-EA42282D0C59} + {B36E82D9-D804-403B-AA91-DAC04F79FCBB} = {71475D1B-D7B2-40B6-9228-E97900F0FD2B} + {71475D1B-D7B2-40B6-9228-E97900F0FD2B} = {E88EEE4C-2DFE-4C8E-B822-EA42282D0C59} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {971198CC-ACB9-4718-9024-42A87E02E503} diff --git a/src/libraries/Microsoft.Extensions.Hosting/src/CompatibilitySuppressions.xml b/src/libraries/Microsoft.Extensions.Hosting/src/CompatibilitySuppressions.xml index bcbbda259455e9..227beeab33e1b0 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/src/CompatibilitySuppressions.xml +++ b/src/libraries/Microsoft.Extensions.Hosting/src/CompatibilitySuppressions.xml @@ -1,7 +1,6 @@  - CP0014 M:Microsoft.Extensions.Hosting.Host.CreateApplicationBuilder:[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] diff --git a/src/libraries/Microsoft.Extensions.Hosting/src/PACKAGE.md b/src/libraries/Microsoft.Extensions.Hosting/src/PACKAGE.md new file mode 100644 index 00000000000000..836433b1a4bba5 --- /dev/null +++ b/src/libraries/Microsoft.Extensions.Hosting/src/PACKAGE.md @@ -0,0 +1,81 @@ +## About + + + +Contains the .NET Generic Host `HostBuilder` which layers on the `Microsoft.Extensions.Hosting.Abstractions` package. + +## Key Features + + + +* Contains the .NET Generic Host `HostBuilder`. + +## How to Use + + + +For a console app project: +```C# + using (IHost host = new HostBuilder().Build()) + { + var lifetime = host.Services.GetRequiredService(); + + lifetime.ApplicationStarted.Register(() => + { + Console.WriteLine("Started"); + }); + lifetime.ApplicationStopping.Register(() => + { + Console.WriteLine("Stopping firing"); + Console.WriteLine("Stopping end"); + }); + lifetime.ApplicationStopped.Register(() => + { + Console.WriteLine("Stopped firing"); + Console.WriteLine("Stopped end"); + }); + + host.Start(); + + // Listens for Ctrl+C. + host.WaitForShutdown(); + } +``` + +## Main Types + + + +The main types provided by this library are: + +* `Microsoft.Extensions.Host`. +* `Microsoft.Extensions.Hosting.HostApplicationBuilder` +* `Microsoft.Extensions.Hosting.HostBuilder` +* `Microsoft.Extensions.Hosting.IHostedService` +* `Microsoft.Extensions.Hosting.IHostedLifecycleService` + +## Additional Documentation + + + +* [Generic host](https://learn.microsoft.com/dotnet/core/extensions/generic-host) +* API documentation + - [Host](https://learn.microsoft.com/dotnet/api/microsoft.extensions.hosting.host) + - [HostApplicationBuilder](https://learn.microsoft.com/dotnet/api/microsoft.extensions.hosting.hostapplicationbuilder) + - [HostBuilder](https://learn.microsoft.com/dotnet/api/microsoft.extensions.hosting.hostbuilder) + +## Related Packages + + + +- `Microsoft.Extensions.Configuration` +- `Microsoft.Extensions.DependencyInjection` +- `Microsoft.Extensions.Hosting.Abstractions` +- `Microsoft.Extensions.Logging` +- `Microsoft.Extensions.Options` + +## Feedback & Contributing + + + +Microsoft.Extensions.Hosting is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). diff --git a/src/libraries/Microsoft.Extensions.Http/Microsoft.Extensions.Http.sln b/src/libraries/Microsoft.Extensions.Http/Microsoft.Extensions.Http.sln index 7e9a298e94c1d5..127ab92e837f47 100644 --- a/src/libraries/Microsoft.Extensions.Http/Microsoft.Extensions.Http.sln +++ b/src/libraries/Microsoft.Extensions.Http/Microsoft.Extensions.Http.sln @@ -1,14 +1,24 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.7.33920.267 -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", "{DE515C8F-654E-4434-8F3F-014ECD86369D}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.AsyncInterfaces", "..\Microsoft.Bcl.AsyncInterfaces\ref\Microsoft.Bcl.AsyncInterfaces.csproj", "{7110AF00-8902-4693-8697-64B89F6ADFEB}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.AsyncInterfaces", "..\Microsoft.Bcl.AsyncInterfaces\src\Microsoft.Bcl.AsyncInterfaces.csproj", "{8E552A7E-0C8C-49C2-8988-19469A732E26}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Configuration.Abstractions", "..\Microsoft.Extensions.Configuration.Abstractions\ref\Microsoft.Extensions.Configuration.Abstractions.csproj", "{E5AA98EF-5984-4BC4-9C74-996DB070BEB3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Configuration.Abstractions", "..\Microsoft.Extensions.Configuration.Abstractions\src\Microsoft.Extensions.Configuration.Abstractions.csproj", "{65753AD0-5912-4EC7-A109-51AD5CC2A631}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Configuration.Binder.SourceGeneration", "..\Microsoft.Extensions.Configuration.Binder\gen\Microsoft.Extensions.Configuration.Binder.SourceGeneration.csproj", "{0946F780-A82A-478E-A3A6-08C00A9B56BB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Configuration.Binder", "..\Microsoft.Extensions.Configuration.Binder\ref\Microsoft.Extensions.Configuration.Binder.csproj", "{DCFA391D-345B-4272-81EB-2C46DB12F760}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Configuration.Binder", "..\Microsoft.Extensions.Configuration.Binder\src\Microsoft.Extensions.Configuration.Binder.csproj", "{02CBE5AC-8D26-4865-830C-39EAA631316F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Configuration", "..\Microsoft.Extensions.Configuration\ref\Microsoft.Extensions.Configuration.csproj", "{B69CDA6C-D2C9-4A23-BDC7-D2EAE11503C4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Configuration", "..\Microsoft.Extensions.Configuration\src\Microsoft.Extensions.Configuration.csproj", "{64B7B55F-C630-45FF-AE38-B88E33054559}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyInjection.Abstractions", "..\Microsoft.Extensions.DependencyInjection.Abstractions\ref\Microsoft.Extensions.DependencyInjection.Abstractions.csproj", "{35FEC7D0-BA1A-49B3-B183-309CC182E60B}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyInjection.Abstractions", "..\Microsoft.Extensions.DependencyInjection.Abstractions\src\Microsoft.Extensions.DependencyInjection.Abstractions.csproj", "{A0EBE0C7-F63B-477C-BDE5-6B57AB9DB540}" @@ -17,6 +27,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Depend EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyInjection", "..\Microsoft.Extensions.DependencyInjection\src\Microsoft.Extensions.DependencyInjection.csproj", "{B792E72A-0513-4359-B754-D0372610DDCE}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics.Abstractions", "..\Microsoft.Extensions.Diagnostics.Abstractions\ref\Microsoft.Extensions.Diagnostics.Abstractions.csproj", "{1C037F40-BDCD-4DFD-B6BE-3244D22065F3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics.Abstractions", "..\Microsoft.Extensions.Diagnostics.Abstractions\src\Microsoft.Extensions.Diagnostics.Abstractions.csproj", "{6FE46896-2751-47A8-816D-839AA45144F2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics", "..\Microsoft.Extensions.Diagnostics\ref\Microsoft.Extensions.Diagnostics.csproj", "{C914A1FF-48C4-42AD-9581-6846FFD8BF5B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics", "..\Microsoft.Extensions.Diagnostics\src\Microsoft.Extensions.Diagnostics.csproj", "{C1325BED-B16C-42B3-B0F6-94D6BB737376}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Http", "ref\Microsoft.Extensions.Http.csproj", "{D4D155B6-2A90-4ECD-97F9-A288F7979375}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Http", "src\Microsoft.Extensions.Http.csproj", "{1236A517-6B61-4A62-9495-1C945EDA4D12}" @@ -37,6 +55,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Loggin EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging", "..\Microsoft.Extensions.Logging\src\Microsoft.Extensions.Logging.csproj", "{65079F8F-0653-4474-B105-551A9B6F102B}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.ConfigurationExtensions", "..\Microsoft.Extensions.Options.ConfigurationExtensions\ref\Microsoft.Extensions.Options.ConfigurationExtensions.csproj", "{933CC409-0AD9-4C63-997F-9E4EA9A0F977}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.ConfigurationExtensions", "..\Microsoft.Extensions.Options.ConfigurationExtensions\src\Microsoft.Extensions.Options.ConfigurationExtensions.csproj", "{9EC12899-D011-4E8A-B8E8-FD44BE7516CA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.SourceGeneration", "..\Microsoft.Extensions.Options\gen\Microsoft.Extensions.Options.SourceGeneration.csproj", "{34143E09-2676-4D22-B454-B719EF0629DA}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\ref\Microsoft.Extensions.Options.csproj", "{BECC7A6E-1438-4EAC-B34B-276DEF463769}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\src\Microsoft.Extensions.Options.csproj", "{A12B92C6-071A-4C61-8934-371DBB240873}" @@ -57,6 +81,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{4F6E71CD-E4CE-4FF6-AAD9-3A07A0ADBE0D}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{DFABB1CD-6617-4548-8C8A-5EF3A420064A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{B970690E-B4ED-455B-BBCE-352502CCF51F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{7EE1562B-61F6-4793-AFCD-CADBDFBEE0BB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{5FE5DB86-05C2-4C42-88CA-EBA6B80D4157}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{A94D324B-E4DC-457B-AF34-9466FEAEA7D9}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{AC22531E-0F15-4324-9241-2BD562CB7C6B}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{ACFC297E-FE60-47EE-99A0-501E795FF4D6}" @@ -65,17 +99,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{96EA71C4-C73 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{D1CE7D63-2182-40E3-83E0-618DA3770779}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Configuration", "..\Microsoft.Extensions.Configuration\src\Microsoft.Extensions.Configuration.csproj", "{64B7B55F-C630-45FF-AE38-B88E33054559}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Configuration", "..\Microsoft.Extensions.Configuration\ref\Microsoft.Extensions.Configuration.csproj", "{B69CDA6C-D2C9-4A23-BDC7-D2EAE11503C4}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Configuration.Abstractions", "..\Microsoft.Extensions.Configuration.Abstractions\src\Microsoft.Extensions.Configuration.Abstractions.csproj", "{65753AD0-5912-4EC7-A109-51AD5CC2A631}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{FDC92BCB-A135-47C1-A3A3-30D5D743D0A1}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Configuration.Abstractions", "..\Microsoft.Extensions.Configuration.Abstractions\ref\Microsoft.Extensions.Configuration.Abstractions.csproj", "{E5AA98EF-5984-4BC4-9C74-996DB070BEB3}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{E60DFD51-6528-4986-B895-74FBE060E903}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics", "..\Microsoft.Extensions.Diagnostics\src\Microsoft.Extensions.Diagnostics.csproj", "{C1325BED-B16C-42B3-B0F6-94D6BB737376}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{F4AA4F86-5C36-4C01-A53D-3EF100F8D639}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics", "..\Microsoft.Extensions.Diagnostics\ref\Microsoft.Extensions.Diagnostics.csproj", "{C914A1FF-48C4-42AD-9581-6846FFD8BF5B}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{FB594D2B-E686-434A-B07D-4D50C82F63D8}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -95,6 +125,34 @@ Global {8E552A7E-0C8C-49C2-8988-19469A732E26}.Debug|Any CPU.Build.0 = Debug|Any CPU {8E552A7E-0C8C-49C2-8988-19469A732E26}.Release|Any CPU.ActiveCfg = Release|Any CPU {8E552A7E-0C8C-49C2-8988-19469A732E26}.Release|Any CPU.Build.0 = Release|Any CPU + {E5AA98EF-5984-4BC4-9C74-996DB070BEB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E5AA98EF-5984-4BC4-9C74-996DB070BEB3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E5AA98EF-5984-4BC4-9C74-996DB070BEB3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E5AA98EF-5984-4BC4-9C74-996DB070BEB3}.Release|Any CPU.Build.0 = Release|Any CPU + {65753AD0-5912-4EC7-A109-51AD5CC2A631}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {65753AD0-5912-4EC7-A109-51AD5CC2A631}.Debug|Any CPU.Build.0 = Debug|Any CPU + {65753AD0-5912-4EC7-A109-51AD5CC2A631}.Release|Any CPU.ActiveCfg = Release|Any CPU + {65753AD0-5912-4EC7-A109-51AD5CC2A631}.Release|Any CPU.Build.0 = Release|Any CPU + {0946F780-A82A-478E-A3A6-08C00A9B56BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0946F780-A82A-478E-A3A6-08C00A9B56BB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0946F780-A82A-478E-A3A6-08C00A9B56BB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0946F780-A82A-478E-A3A6-08C00A9B56BB}.Release|Any CPU.Build.0 = Release|Any CPU + {DCFA391D-345B-4272-81EB-2C46DB12F760}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DCFA391D-345B-4272-81EB-2C46DB12F760}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DCFA391D-345B-4272-81EB-2C46DB12F760}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DCFA391D-345B-4272-81EB-2C46DB12F760}.Release|Any CPU.Build.0 = Release|Any CPU + {02CBE5AC-8D26-4865-830C-39EAA631316F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {02CBE5AC-8D26-4865-830C-39EAA631316F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {02CBE5AC-8D26-4865-830C-39EAA631316F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {02CBE5AC-8D26-4865-830C-39EAA631316F}.Release|Any CPU.Build.0 = Release|Any CPU + {B69CDA6C-D2C9-4A23-BDC7-D2EAE11503C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B69CDA6C-D2C9-4A23-BDC7-D2EAE11503C4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B69CDA6C-D2C9-4A23-BDC7-D2EAE11503C4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B69CDA6C-D2C9-4A23-BDC7-D2EAE11503C4}.Release|Any CPU.Build.0 = Release|Any CPU + {64B7B55F-C630-45FF-AE38-B88E33054559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {64B7B55F-C630-45FF-AE38-B88E33054559}.Debug|Any CPU.Build.0 = Debug|Any CPU + {64B7B55F-C630-45FF-AE38-B88E33054559}.Release|Any CPU.ActiveCfg = Release|Any CPU + {64B7B55F-C630-45FF-AE38-B88E33054559}.Release|Any CPU.Build.0 = Release|Any CPU {35FEC7D0-BA1A-49B3-B183-309CC182E60B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {35FEC7D0-BA1A-49B3-B183-309CC182E60B}.Debug|Any CPU.Build.0 = Debug|Any CPU {35FEC7D0-BA1A-49B3-B183-309CC182E60B}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -111,6 +169,22 @@ Global {B792E72A-0513-4359-B754-D0372610DDCE}.Debug|Any CPU.Build.0 = Debug|Any CPU {B792E72A-0513-4359-B754-D0372610DDCE}.Release|Any CPU.ActiveCfg = Release|Any CPU {B792E72A-0513-4359-B754-D0372610DDCE}.Release|Any CPU.Build.0 = Release|Any CPU + {1C037F40-BDCD-4DFD-B6BE-3244D22065F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1C037F40-BDCD-4DFD-B6BE-3244D22065F3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1C037F40-BDCD-4DFD-B6BE-3244D22065F3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1C037F40-BDCD-4DFD-B6BE-3244D22065F3}.Release|Any CPU.Build.0 = Release|Any CPU + {6FE46896-2751-47A8-816D-839AA45144F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6FE46896-2751-47A8-816D-839AA45144F2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6FE46896-2751-47A8-816D-839AA45144F2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6FE46896-2751-47A8-816D-839AA45144F2}.Release|Any CPU.Build.0 = Release|Any CPU + {C914A1FF-48C4-42AD-9581-6846FFD8BF5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C914A1FF-48C4-42AD-9581-6846FFD8BF5B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C914A1FF-48C4-42AD-9581-6846FFD8BF5B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C914A1FF-48C4-42AD-9581-6846FFD8BF5B}.Release|Any CPU.Build.0 = Release|Any CPU + {C1325BED-B16C-42B3-B0F6-94D6BB737376}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C1325BED-B16C-42B3-B0F6-94D6BB737376}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C1325BED-B16C-42B3-B0F6-94D6BB737376}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C1325BED-B16C-42B3-B0F6-94D6BB737376}.Release|Any CPU.Build.0 = Release|Any CPU {D4D155B6-2A90-4ECD-97F9-A288F7979375}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D4D155B6-2A90-4ECD-97F9-A288F7979375}.Debug|Any CPU.Build.0 = Debug|Any CPU {D4D155B6-2A90-4ECD-97F9-A288F7979375}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -151,6 +225,18 @@ Global {65079F8F-0653-4474-B105-551A9B6F102B}.Debug|Any CPU.Build.0 = Debug|Any CPU {65079F8F-0653-4474-B105-551A9B6F102B}.Release|Any CPU.ActiveCfg = Release|Any CPU {65079F8F-0653-4474-B105-551A9B6F102B}.Release|Any CPU.Build.0 = Release|Any CPU + {933CC409-0AD9-4C63-997F-9E4EA9A0F977}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {933CC409-0AD9-4C63-997F-9E4EA9A0F977}.Debug|Any CPU.Build.0 = Debug|Any CPU + {933CC409-0AD9-4C63-997F-9E4EA9A0F977}.Release|Any CPU.ActiveCfg = Release|Any CPU + {933CC409-0AD9-4C63-997F-9E4EA9A0F977}.Release|Any CPU.Build.0 = Release|Any CPU + {9EC12899-D011-4E8A-B8E8-FD44BE7516CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9EC12899-D011-4E8A-B8E8-FD44BE7516CA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9EC12899-D011-4E8A-B8E8-FD44BE7516CA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9EC12899-D011-4E8A-B8E8-FD44BE7516CA}.Release|Any CPU.Build.0 = Release|Any CPU + {34143E09-2676-4D22-B454-B719EF0629DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {34143E09-2676-4D22-B454-B719EF0629DA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {34143E09-2676-4D22-B454-B719EF0629DA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {34143E09-2676-4D22-B454-B719EF0629DA}.Release|Any CPU.Build.0 = Release|Any CPU {BECC7A6E-1438-4EAC-B34B-276DEF463769}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BECC7A6E-1438-4EAC-B34B-276DEF463769}.Debug|Any CPU.Build.0 = Debug|Any CPU {BECC7A6E-1438-4EAC-B34B-276DEF463769}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -191,68 +277,80 @@ Global {4F6E71CD-E4CE-4FF6-AAD9-3A07A0ADBE0D}.Debug|Any CPU.Build.0 = Debug|Any CPU {4F6E71CD-E4CE-4FF6-AAD9-3A07A0ADBE0D}.Release|Any CPU.ActiveCfg = Release|Any CPU {4F6E71CD-E4CE-4FF6-AAD9-3A07A0ADBE0D}.Release|Any CPU.Build.0 = Release|Any CPU - {64B7B55F-C630-45FF-AE38-B88E33054559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {64B7B55F-C630-45FF-AE38-B88E33054559}.Debug|Any CPU.Build.0 = Debug|Any CPU - {64B7B55F-C630-45FF-AE38-B88E33054559}.Release|Any CPU.ActiveCfg = Release|Any CPU - {64B7B55F-C630-45FF-AE38-B88E33054559}.Release|Any CPU.Build.0 = Release|Any CPU - {B69CDA6C-D2C9-4A23-BDC7-D2EAE11503C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B69CDA6C-D2C9-4A23-BDC7-D2EAE11503C4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B69CDA6C-D2C9-4A23-BDC7-D2EAE11503C4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B69CDA6C-D2C9-4A23-BDC7-D2EAE11503C4}.Release|Any CPU.Build.0 = Release|Any CPU - {65753AD0-5912-4EC7-A109-51AD5CC2A631}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {65753AD0-5912-4EC7-A109-51AD5CC2A631}.Debug|Any CPU.Build.0 = Debug|Any CPU - {65753AD0-5912-4EC7-A109-51AD5CC2A631}.Release|Any CPU.ActiveCfg = Release|Any CPU - {65753AD0-5912-4EC7-A109-51AD5CC2A631}.Release|Any CPU.Build.0 = Release|Any CPU - {E5AA98EF-5984-4BC4-9C74-996DB070BEB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E5AA98EF-5984-4BC4-9C74-996DB070BEB3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E5AA98EF-5984-4BC4-9C74-996DB070BEB3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E5AA98EF-5984-4BC4-9C74-996DB070BEB3}.Release|Any CPU.Build.0 = Release|Any CPU - {C1325BED-B16C-42B3-B0F6-94D6BB737376}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C1325BED-B16C-42B3-B0F6-94D6BB737376}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C1325BED-B16C-42B3-B0F6-94D6BB737376}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C1325BED-B16C-42B3-B0F6-94D6BB737376}.Release|Any CPU.Build.0 = Release|Any CPU - {C914A1FF-48C4-42AD-9581-6846FFD8BF5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C914A1FF-48C4-42AD-9581-6846FFD8BF5B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C914A1FF-48C4-42AD-9581-6846FFD8BF5B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C914A1FF-48C4-42AD-9581-6846FFD8BF5B}.Release|Any CPU.Build.0 = Release|Any CPU + {DFABB1CD-6617-4548-8C8A-5EF3A420064A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DFABB1CD-6617-4548-8C8A-5EF3A420064A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DFABB1CD-6617-4548-8C8A-5EF3A420064A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DFABB1CD-6617-4548-8C8A-5EF3A420064A}.Release|Any CPU.Build.0 = Release|Any CPU + {B970690E-B4ED-455B-BBCE-352502CCF51F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B970690E-B4ED-455B-BBCE-352502CCF51F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B970690E-B4ED-455B-BBCE-352502CCF51F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B970690E-B4ED-455B-BBCE-352502CCF51F}.Release|Any CPU.Build.0 = Release|Any CPU + {7EE1562B-61F6-4793-AFCD-CADBDFBEE0BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7EE1562B-61F6-4793-AFCD-CADBDFBEE0BB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7EE1562B-61F6-4793-AFCD-CADBDFBEE0BB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7EE1562B-61F6-4793-AFCD-CADBDFBEE0BB}.Release|Any CPU.Build.0 = Release|Any CPU + {5FE5DB86-05C2-4C42-88CA-EBA6B80D4157}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5FE5DB86-05C2-4C42-88CA-EBA6B80D4157}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5FE5DB86-05C2-4C42-88CA-EBA6B80D4157}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5FE5DB86-05C2-4C42-88CA-EBA6B80D4157}.Release|Any CPU.Build.0 = Release|Any CPU + {A94D324B-E4DC-457B-AF34-9466FEAEA7D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A94D324B-E4DC-457B-AF34-9466FEAEA7D9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A94D324B-E4DC-457B-AF34-9466FEAEA7D9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A94D324B-E4DC-457B-AF34-9466FEAEA7D9}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {DE515C8F-654E-4434-8F3F-014ECD86369D} = {AC22531E-0F15-4324-9241-2BD562CB7C6B} + {58A1E42E-5DA1-452A-B39C-A1819171970A} = {AC22531E-0F15-4324-9241-2BD562CB7C6B} {7110AF00-8902-4693-8697-64B89F6ADFEB} = {ACFC297E-FE60-47EE-99A0-501E795FF4D6} - {8E552A7E-0C8C-49C2-8988-19469A732E26} = {96EA71C4-C73B-4C6C-AA06-05635B20A2DC} + {E5AA98EF-5984-4BC4-9C74-996DB070BEB3} = {ACFC297E-FE60-47EE-99A0-501E795FF4D6} + {DCFA391D-345B-4272-81EB-2C46DB12F760} = {ACFC297E-FE60-47EE-99A0-501E795FF4D6} + {B69CDA6C-D2C9-4A23-BDC7-D2EAE11503C4} = {ACFC297E-FE60-47EE-99A0-501E795FF4D6} {35FEC7D0-BA1A-49B3-B183-309CC182E60B} = {ACFC297E-FE60-47EE-99A0-501E795FF4D6} - {A0EBE0C7-F63B-477C-BDE5-6B57AB9DB540} = {96EA71C4-C73B-4C6C-AA06-05635B20A2DC} {E004A4D8-CDC5-40F7-A6CD-94DA232F6B1B} = {ACFC297E-FE60-47EE-99A0-501E795FF4D6} - {B792E72A-0513-4359-B754-D0372610DDCE} = {96EA71C4-C73B-4C6C-AA06-05635B20A2DC} + {1C037F40-BDCD-4DFD-B6BE-3244D22065F3} = {ACFC297E-FE60-47EE-99A0-501E795FF4D6} + {C914A1FF-48C4-42AD-9581-6846FFD8BF5B} = {ACFC297E-FE60-47EE-99A0-501E795FF4D6} {D4D155B6-2A90-4ECD-97F9-A288F7979375} = {ACFC297E-FE60-47EE-99A0-501E795FF4D6} - {1236A517-6B61-4A62-9495-1C945EDA4D12} = {96EA71C4-C73B-4C6C-AA06-05635B20A2DC} - {58A1E42E-5DA1-452A-B39C-A1819171970A} = {AC22531E-0F15-4324-9241-2BD562CB7C6B} - {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} {85615392-9242-4CAF-A0FE-A439FF615462} = {ACFC297E-FE60-47EE-99A0-501E795FF4D6} - {BAFF07C7-1F5F-4706-B7D7-9D5D309CBFE2} = {96EA71C4-C73B-4C6C-AA06-05635B20A2DC} {40143A60-7177-4173-90D4-2891584748CA} = {ACFC297E-FE60-47EE-99A0-501E795FF4D6} - {65079F8F-0653-4474-B105-551A9B6F102B} = {96EA71C4-C73B-4C6C-AA06-05635B20A2DC} + {933CC409-0AD9-4C63-997F-9E4EA9A0F977} = {ACFC297E-FE60-47EE-99A0-501E795FF4D6} {BECC7A6E-1438-4EAC-B34B-276DEF463769} = {ACFC297E-FE60-47EE-99A0-501E795FF4D6} - {A12B92C6-071A-4C61-8934-371DBB240873} = {96EA71C4-C73B-4C6C-AA06-05635B20A2DC} {DE012146-4D34-44CC-8701-53C42F2943D2} = {ACFC297E-FE60-47EE-99A0-501E795FF4D6} - {68B501BC-5281-4BC8-B631-C34013E4505E} = {96EA71C4-C73B-4C6C-AA06-05635B20A2DC} {9E199047-514B-4D38-A8A3-0F5F18547F88} = {ACFC297E-FE60-47EE-99A0-501E795FF4D6} + {4F6E71CD-E4CE-4FF6-AAD9-3A07A0ADBE0D} = {ACFC297E-FE60-47EE-99A0-501E795FF4D6} + {8E552A7E-0C8C-49C2-8988-19469A732E26} = {96EA71C4-C73B-4C6C-AA06-05635B20A2DC} + {65753AD0-5912-4EC7-A109-51AD5CC2A631} = {96EA71C4-C73B-4C6C-AA06-05635B20A2DC} + {02CBE5AC-8D26-4865-830C-39EAA631316F} = {96EA71C4-C73B-4C6C-AA06-05635B20A2DC} + {64B7B55F-C630-45FF-AE38-B88E33054559} = {96EA71C4-C73B-4C6C-AA06-05635B20A2DC} + {A0EBE0C7-F63B-477C-BDE5-6B57AB9DB540} = {96EA71C4-C73B-4C6C-AA06-05635B20A2DC} + {B792E72A-0513-4359-B754-D0372610DDCE} = {96EA71C4-C73B-4C6C-AA06-05635B20A2DC} + {6FE46896-2751-47A8-816D-839AA45144F2} = {96EA71C4-C73B-4C6C-AA06-05635B20A2DC} + {C1325BED-B16C-42B3-B0F6-94D6BB737376} = {96EA71C4-C73B-4C6C-AA06-05635B20A2DC} + {1236A517-6B61-4A62-9495-1C945EDA4D12} = {96EA71C4-C73B-4C6C-AA06-05635B20A2DC} + {BAFF07C7-1F5F-4706-B7D7-9D5D309CBFE2} = {96EA71C4-C73B-4C6C-AA06-05635B20A2DC} + {65079F8F-0653-4474-B105-551A9B6F102B} = {96EA71C4-C73B-4C6C-AA06-05635B20A2DC} + {9EC12899-D011-4E8A-B8E8-FD44BE7516CA} = {96EA71C4-C73B-4C6C-AA06-05635B20A2DC} + {A12B92C6-071A-4C61-8934-371DBB240873} = {96EA71C4-C73B-4C6C-AA06-05635B20A2DC} + {68B501BC-5281-4BC8-B631-C34013E4505E} = {96EA71C4-C73B-4C6C-AA06-05635B20A2DC} {1A02FCFD-12D4-4F46-8AD4-8C052E7BF0F8} = {96EA71C4-C73B-4C6C-AA06-05635B20A2DC} + {0946F780-A82A-478E-A3A6-08C00A9B56BB} = {D1CE7D63-2182-40E3-83E0-618DA3770779} + {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} + {34143E09-2676-4D22-B454-B719EF0629DA} = {D1CE7D63-2182-40E3-83E0-618DA3770779} {B11D1627-86EC-4E6D-A184-868DD220AB9B} = {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} - {4F6E71CD-E4CE-4FF6-AAD9-3A07A0ADBE0D} = {ACFC297E-FE60-47EE-99A0-501E795FF4D6} - {64B7B55F-C630-45FF-AE38-B88E33054559} = {96EA71C4-C73B-4C6C-AA06-05635B20A2DC} - {B69CDA6C-D2C9-4A23-BDC7-D2EAE11503C4} = {ACFC297E-FE60-47EE-99A0-501E795FF4D6} - {65753AD0-5912-4EC7-A109-51AD5CC2A631} = {96EA71C4-C73B-4C6C-AA06-05635B20A2DC} - {E5AA98EF-5984-4BC4-9C74-996DB070BEB3} = {ACFC297E-FE60-47EE-99A0-501E795FF4D6} - {C1325BED-B16C-42B3-B0F6-94D6BB737376} = {96EA71C4-C73B-4C6C-AA06-05635B20A2DC} - {C914A1FF-48C4-42AD-9581-6846FFD8BF5B} = {ACFC297E-FE60-47EE-99A0-501E795FF4D6} + {DFABB1CD-6617-4548-8C8A-5EF3A420064A} = {FDC92BCB-A135-47C1-A3A3-30D5D743D0A1} + {B970690E-B4ED-455B-BBCE-352502CCF51F} = {FDC92BCB-A135-47C1-A3A3-30D5D743D0A1} + {FDC92BCB-A135-47C1-A3A3-30D5D743D0A1} = {FB594D2B-E686-434A-B07D-4D50C82F63D8} + {7EE1562B-61F6-4793-AFCD-CADBDFBEE0BB} = {E60DFD51-6528-4986-B895-74FBE060E903} + {5FE5DB86-05C2-4C42-88CA-EBA6B80D4157} = {E60DFD51-6528-4986-B895-74FBE060E903} + {E60DFD51-6528-4986-B895-74FBE060E903} = {FB594D2B-E686-434A-B07D-4D50C82F63D8} + {A94D324B-E4DC-457B-AF34-9466FEAEA7D9} = {F4AA4F86-5C36-4C01-A53D-3EF100F8D639} + {F4AA4F86-5C36-4C01-A53D-3EF100F8D639} = {FB594D2B-E686-434A-B07D-4D50C82F63D8} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {02FCA09C-178B-4DE0-98E0-BCCDEBA97903} diff --git a/src/libraries/Microsoft.Extensions.Http/src/CompatibilitySuppressions.xml b/src/libraries/Microsoft.Extensions.Http/src/CompatibilitySuppressions.xml new file mode 100644 index 00000000000000..e936b6f1d8b4b4 --- /dev/null +++ b/src/libraries/Microsoft.Extensions.Http/src/CompatibilitySuppressions.xml @@ -0,0 +1,60 @@ + + + + + CP0001 + T:Microsoft.Extensions.DependencyInjection.ISocketsHttpHandlerBuilder + lib/net6.0/Microsoft.Extensions.Http.dll + lib/netstandard2.0/Microsoft.Extensions.Http.dll + true + + + CP0001 + T:Microsoft.Extensions.DependencyInjection.SocketsHttpHandlerBuilderExtensions + lib/net6.0/Microsoft.Extensions.Http.dll + lib/netstandard2.0/Microsoft.Extensions.Http.dll + true + + + CP0001 + T:Microsoft.Extensions.DependencyInjection.ISocketsHttpHandlerBuilder + lib/net7.0/Microsoft.Extensions.Http.dll + lib/netstandard2.0/Microsoft.Extensions.Http.dll + true + + + CP0001 + T:Microsoft.Extensions.DependencyInjection.SocketsHttpHandlerBuilderExtensions + lib/net7.0/Microsoft.Extensions.Http.dll + lib/netstandard2.0/Microsoft.Extensions.Http.dll + true + + + CP0002 + M:Microsoft.Extensions.DependencyInjection.HttpClientBuilderExtensions.UseSocketsHttpHandler(Microsoft.Extensions.DependencyInjection.IHttpClientBuilder,System.Action{Microsoft.Extensions.DependencyInjection.ISocketsHttpHandlerBuilder}) + lib/net6.0/Microsoft.Extensions.Http.dll + lib/netstandard2.0/Microsoft.Extensions.Http.dll + true + + + CP0002 + M:Microsoft.Extensions.DependencyInjection.HttpClientBuilderExtensions.UseSocketsHttpHandler(Microsoft.Extensions.DependencyInjection.IHttpClientBuilder,System.Action{System.Net.Http.SocketsHttpHandler,System.IServiceProvider}) + lib/net6.0/Microsoft.Extensions.Http.dll + lib/netstandard2.0/Microsoft.Extensions.Http.dll + true + + + CP0002 + M:Microsoft.Extensions.DependencyInjection.HttpClientBuilderExtensions.UseSocketsHttpHandler(Microsoft.Extensions.DependencyInjection.IHttpClientBuilder,System.Action{Microsoft.Extensions.DependencyInjection.ISocketsHttpHandlerBuilder}) + lib/net7.0/Microsoft.Extensions.Http.dll + lib/netstandard2.0/Microsoft.Extensions.Http.dll + true + + + CP0002 + M:Microsoft.Extensions.DependencyInjection.HttpClientBuilderExtensions.UseSocketsHttpHandler(Microsoft.Extensions.DependencyInjection.IHttpClientBuilder,System.Action{System.Net.Http.SocketsHttpHandler,System.IServiceProvider}) + lib/net7.0/Microsoft.Extensions.Http.dll + lib/netstandard2.0/Microsoft.Extensions.Http.dll + true + + \ No newline at end of file diff --git a/src/libraries/Microsoft.Extensions.Http/src/Microsoft.Extensions.Http.csproj b/src/libraries/Microsoft.Extensions.Http/src/Microsoft.Extensions.Http.csproj index 598f8974c25935..4347cefc9b530d 100644 --- a/src/libraries/Microsoft.Extensions.Http/src/Microsoft.Extensions.Http.csproj +++ b/src/libraries/Microsoft.Extensions.Http/src/Microsoft.Extensions.Http.csproj @@ -33,7 +33,7 @@ System.Net.Http.IHttpClientFactory - + diff --git a/src/libraries/Microsoft.Extensions.Http/src/PACKAGE.md b/src/libraries/Microsoft.Extensions.Http/src/PACKAGE.md new file mode 100644 index 00000000000000..294cb308cc7a9b --- /dev/null +++ b/src/libraries/Microsoft.Extensions.Http/src/PACKAGE.md @@ -0,0 +1,81 @@ +## About + + + +[Microsoft.Extensions.Http](https://www.nuget.org/packages/Microsoft.Extensions.Http) package provides `AddHttpClient` extension methods for `IServiceCollection`, `IHttpClientFactory` interface and its default implementation. This provides the ability to set up named `HttpClient` configurations in a DI container and later retrieve them via an injected `IHttpClientFactory` instance. + +## Key Features + + + +* The package allows to fluently set up multiple `HttpClient` configurations for applications that use DI via `AddHttpClient` extension method. +* `HttpClientFactory` caches `HttpMessageHandler` instances per configuration name, which allows to reuse resources between `HttpClient` instances to avoid port exhaustion. +* `HttpClientFactory` manages lifetime of `HttpMessageHandler` instances and recycles connections to track DNS changes. + +## How to Use + + + +Note that lifetime management of `HttpClient` instances created by `HttpClientFactory` is completely different from instances created manually. The strategies are to use either short-lived clients created by `HttpClientFactory` or long-lived clients with `PooledConnectionLifetime` set up. For more information, see the [HttpClient lifetime management section](https://learn.microsoft.com/dotnet/core/extensions/httpclient-factory#httpclient-lifetime-management) in the conceptual docs and [Guidelines for using HTTP clients](https://learn.microsoft.com/dotnet/fundamentals/networking/http/httpclient-guidelines). + +### Configuring HttpClient + +```c# +builder.Services.AddHttpClient("foo"); // adding an HttpClient named "foo" with a default configuration + +builder.Services.AddHttpClient("example", c => c.BaseAddress = new Uri("https://www.example.com")) // configuring HttpClient itself + .AddHttpMessageHandler() // adding additional delegating handlers to form a message handler chain + .ConfigurePrimaryHttpMessageHandler(b => new HttpClientHandler() { AllowAutoRedirect = false }) // configuring primary handler + .SetHandlerLifetime(TimeSpan.FromMinutes(30)); // changing the handler recycling interval +``` + +### Using the configured HttpClient + +```c# +public class MyService +{ + public MyService(IHttpClientFactory httpClientFactory) + { + _httpClientFactory = httpClientFactory; // injecting the factory + } + + private Task GetExampleAsync(Uri uri, CancellationToken ct) + { + HttpClient exampleClient = _httpClientFactory.CreateClient("example"); // creating the client for the specified name + return exampleClient.GetStringAsync(uri, ct); // using the client + } +} +``` + +## Main Types + + + +The main types provided by this library are: + +* `IHttpClientFactory` +* `IHttpMessageHandlerFactory` +* `HttpClientFactoryServiceCollectionExtensions` + +## Additional Documentation + + + +* [Conceptual documentation](https://learn.microsoft.com/dotnet/core/extensions/httpclient-factory) + * Also see [HttpClient guidelines](https://learn.microsoft.com/dotnet/fundamentals/networking/http/httpclient-guidelines) conceptual doc +* [API documentation](https://learn.microsoft.com/dotnet/api/system.net.http?view=dotnet-plat-ext-7.0) + * Also see [`AddHttpClient` extension method](https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.httpclientfactoryservicecollectionextensions?view=dotnet-plat-ext-7.0) API doc + +## Related Packages + + + +* [Microsoft.Extensions.DependencyInjection](https://www.nuget.org/packages/Microsoft.Extensions.DependencyInjection/) +* [Microsoft.Extensions.Http.Polly](https://www.nuget.org/packages/Microsoft.Extensions.Http.Polly) +* [Microsoft.Extensions.Http.Telemetry](https://www.nuget.org/packages/Microsoft.Extensions.Http.Telemetry) + +## Feedback & Contributing + + + +Microsoft.Extensions.Http is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). diff --git a/src/libraries/Microsoft.Extensions.Http/tests/Microsoft.Extensions.Http.Tests/DependencyInjection/HttpClientFactoryServiceCollectionExtensionsTest.cs b/src/libraries/Microsoft.Extensions.Http/tests/Microsoft.Extensions.Http.Tests/DependencyInjection/HttpClientFactoryServiceCollectionExtensionsTest.cs index f537d8ca617f6f..fab5ad4fc1fdc9 100644 --- a/src/libraries/Microsoft.Extensions.Http/tests/Microsoft.Extensions.Http.Tests/DependencyInjection/HttpClientFactoryServiceCollectionExtensionsTest.cs +++ b/src/libraries/Microsoft.Extensions.Http/tests/Microsoft.Extensions.Http.Tests/DependencyInjection/HttpClientFactoryServiceCollectionExtensionsTest.cs @@ -1204,6 +1204,7 @@ public async Task AddHttpClient_MessageHandler_Scope_TransientDependency() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported), nameof(PlatformDetection.IsReflectionEmitSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void AddHttpClient_GetAwaiterAndResult_InSingleThreadedSynchronizationContext_ShouldNotHangs() { // Arrange @@ -1367,6 +1368,7 @@ public void SuppressScope_True_InScope_DoesNotCreateScope() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91673", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void AddHttpClient_ConfigurePrimaryHttpMessageHandler_ApplyChangesPrimaryHandler() { // Arrange 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 4647569062bba6..4064dd66cbf19b 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 @@ -23,12 +23,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Loggin EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.0.Tests", "tests\Microsoft.Extensions.Logging.Generators.Tests\Microsoft.Extensions.Logging.Generators.Roslyn4.0.Tests.csproj", "{1CB869A7-2EEC-4A53-9C33-DF9E0C75825B}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{E718874C-9D26-4FB6-9CFB-0AD5818C1F75}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{852D4E16-58C3-47C2-A6BC-A5B12B37209F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{6645D0C4-83D1-4426-B9CD-67096CB7A60F}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{848C51FA-3CCE-4402-8E5F-C670B6A9FEBC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{80116AFB-28C4-42BE-89CC-6FEC58235C05}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{7AC0D7D3-C720-4FB0-840E-347898CF5FEA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{06C934AC-F891-41CF-A4C4-7D6A82018AEC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{F3186815-B9A5-455F-B0DF-E39D4235C24F}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{4DE63935-DCA9-4D63-9C1F-AAE79C89CA8B}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{7631380A-FB73-4241-9987-0891A21E9769}" @@ -37,6 +45,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{548DF5F7-790 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{03F31CEE-D63E-4E7F-949F-139B33DC3385}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{87F606D1-D311-4EDC-9A37-8F008B55597C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{8215F79E-510B-4CA1-B775-50C47BB58360}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{14DFA192-3C7E-4F10-B5FD-3953BC82A6B1}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{58760833-B4F5-429D-9ABD-15FDF83E25CD}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -91,10 +107,6 @@ Global {1CB869A7-2EEC-4A53-9C33-DF9E0C75825B}.Debug|Any CPU.Build.0 = Debug|Any CPU {1CB869A7-2EEC-4A53-9C33-DF9E0C75825B}.Release|Any CPU.ActiveCfg = Release|Any CPU {1CB869A7-2EEC-4A53-9C33-DF9E0C75825B}.Release|Any CPU.Build.0 = Release|Any CPU - {E718874C-9D26-4FB6-9CFB-0AD5818C1F75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E718874C-9D26-4FB6-9CFB-0AD5818C1F75}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E718874C-9D26-4FB6-9CFB-0AD5818C1F75}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E718874C-9D26-4FB6-9CFB-0AD5818C1F75}.Release|Any CPU.Build.0 = Release|Any CPU {852D4E16-58C3-47C2-A6BC-A5B12B37209F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {852D4E16-58C3-47C2-A6BC-A5B12B37209F}.Debug|Any CPU.Build.0 = Debug|Any CPU {852D4E16-58C3-47C2-A6BC-A5B12B37209F}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -103,6 +115,26 @@ Global {6645D0C4-83D1-4426-B9CD-67096CB7A60F}.Debug|Any CPU.Build.0 = Debug|Any CPU {6645D0C4-83D1-4426-B9CD-67096CB7A60F}.Release|Any CPU.ActiveCfg = Release|Any CPU {6645D0C4-83D1-4426-B9CD-67096CB7A60F}.Release|Any CPU.Build.0 = Release|Any CPU + {848C51FA-3CCE-4402-8E5F-C670B6A9FEBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {848C51FA-3CCE-4402-8E5F-C670B6A9FEBC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {848C51FA-3CCE-4402-8E5F-C670B6A9FEBC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {848C51FA-3CCE-4402-8E5F-C670B6A9FEBC}.Release|Any CPU.Build.0 = Release|Any CPU + {80116AFB-28C4-42BE-89CC-6FEC58235C05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {80116AFB-28C4-42BE-89CC-6FEC58235C05}.Debug|Any CPU.Build.0 = Debug|Any CPU + {80116AFB-28C4-42BE-89CC-6FEC58235C05}.Release|Any CPU.ActiveCfg = Release|Any CPU + {80116AFB-28C4-42BE-89CC-6FEC58235C05}.Release|Any CPU.Build.0 = Release|Any CPU + {7AC0D7D3-C720-4FB0-840E-347898CF5FEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7AC0D7D3-C720-4FB0-840E-347898CF5FEA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7AC0D7D3-C720-4FB0-840E-347898CF5FEA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7AC0D7D3-C720-4FB0-840E-347898CF5FEA}.Release|Any CPU.Build.0 = Release|Any CPU + {06C934AC-F891-41CF-A4C4-7D6A82018AEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {06C934AC-F891-41CF-A4C4-7D6A82018AEC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {06C934AC-F891-41CF-A4C4-7D6A82018AEC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {06C934AC-F891-41CF-A4C4-7D6A82018AEC}.Release|Any CPU.Build.0 = Release|Any CPU + {F3186815-B9A5-455F-B0DF-E39D4235C24F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F3186815-B9A5-455F-B0DF-E39D4235C24F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F3186815-B9A5-455F-B0DF-E39D4235C24F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F3186815-B9A5-455F-B0DF-E39D4235C24F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -120,9 +152,16 @@ Global {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} - {E718874C-9D26-4FB6-9CFB-0AD5818C1F75} = {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} + {848C51FA-3CCE-4402-8E5F-C670B6A9FEBC} = {87F606D1-D311-4EDC-9A37-8F008B55597C} + {80116AFB-28C4-42BE-89CC-6FEC58235C05} = {87F606D1-D311-4EDC-9A37-8F008B55597C} + {87F606D1-D311-4EDC-9A37-8F008B55597C} = {58760833-B4F5-429D-9ABD-15FDF83E25CD} + {7AC0D7D3-C720-4FB0-840E-347898CF5FEA} = {8215F79E-510B-4CA1-B775-50C47BB58360} + {06C934AC-F891-41CF-A4C4-7D6A82018AEC} = {8215F79E-510B-4CA1-B775-50C47BB58360} + {8215F79E-510B-4CA1-B775-50C47BB58360} = {58760833-B4F5-429D-9ABD-15FDF83E25CD} + {F3186815-B9A5-455F-B0DF-E39D4235C24F} = {14DFA192-3C7E-4F10-B5FD-3953BC82A6B1} + {14DFA192-3C7E-4F10-B5FD-3953BC82A6B1} = {58760833-B4F5-429D-9ABD-15FDF83E25CD} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {450DA749-CBDC-4BDC-950F-8A491CF59D49} diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/DiagnosticDescriptors.cs b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/DiagnosticDescriptors.cs index ec89ae4a42bc9a..409ab6de3f51c9 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/DiagnosticDescriptors.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/DiagnosticDescriptors.cs @@ -201,7 +201,7 @@ public static class DiagnosticDescriptors DiagnosticSeverity.Warning, isEnabledByDefault: true); - public static DiagnosticDescriptor LoggingUnsupportedLanguageVersion { get; } = new DiagnosticDescriptor( + public static DiagnosticDescriptor LoggingUnsupportedLanguageVersion { get; } = DiagnosticDescriptorHelper.Create( id: "SYSLIB1026", title: new LocalizableResourceString(nameof(SR.LoggingUnsupportedLanguageVersionTitle), SR.ResourceManager, typeof(FxResources.Microsoft.Extensions.Logging.Generators.SR)), messageFormat: new LocalizableResourceString(nameof(SR.LoggingUnsupportedLanguageVersionMessageFormat), SR.ResourceManager, typeof(FxResources.Microsoft.Extensions.Logging.Generators.SR)), diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/LoggerMessageGenerator.Roslyn3.11.cs b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/LoggerMessageGenerator.Roslyn3.11.cs index 746abc621d5dfd..6a40625ba62da8 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/LoggerMessageGenerator.Roslyn3.11.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/LoggerMessageGenerator.Roslyn3.11.cs @@ -7,6 +7,8 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Text; +#pragma warning disable RS1035 // IIncrementalGenerator isn't available for the target configuration + [assembly: System.Resources.NeutralResourcesLanguage("en-us")] namespace Microsoft.Extensions.Logging.Generators 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 db0c78fb49df05..085cade3966b96 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 @@ -4,8 +4,6 @@ $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) true true - - $(NoWarn);AD0001 true Logging abstractions for Microsoft.Extensions.Logging. diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/PACKAGE.md b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/PACKAGE.md new file mode 100644 index 00000000000000..400958a0a194a4 --- /dev/null +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/PACKAGE.md @@ -0,0 +1,164 @@ +## About + + + +`Microsoft.Extensions.Logging.Abstractions` provides abstractions of logging. Interfaces defined in this package are implemented by classes in [Microsoft.Extensions.Logging](https://www.nuget.org/packages/Microsoft.Extensions.Logging/) and other logging packages. + +This package includes a logging source generator that produces highly efficient and optimized code for logging message methods. + +## Key Features + + + +* Define main logging abstraction interfaces like ILogger, ILoggerFactory, ILoggerProvider, etc. + +## How to Use + + + +#### Custom logger provider implementation example + +```C# +using Microsoft.Extensions.Logging; + +public sealed class ColorConsoleLogger : ILogger +{ + private readonly string _name; + private readonly Func _getCurrentConfig; + + public ColorConsoleLogger( + string name, + Func getCurrentConfig) => + (_name, _getCurrentConfig) = (name, getCurrentConfig); + + public IDisposable? BeginScope(TState state) where TState : notnull => default!; + + public bool IsEnabled(LogLevel logLevel) => + _getCurrentConfig().LogLevelToColorMap.ContainsKey(logLevel); + + public void Log( + LogLevel logLevel, + EventId eventId, + TState state, + Exception? exception, + Func formatter) + { + if (!IsEnabled(logLevel)) + { + return; + } + + ColorConsoleLoggerConfiguration config = _getCurrentConfig(); + if (config.EventId == 0 || config.EventId == eventId.Id) + { + ConsoleColor originalColor = Console.ForegroundColor; + + Console.ForegroundColor = config.LogLevelToColorMap[logLevel]; + Console.WriteLine($"[{eventId.Id,2}: {logLevel,-12}]"); + + Console.ForegroundColor = originalColor; + Console.Write($" {_name} - "); + + Console.ForegroundColor = config.LogLevelToColorMap[logLevel]; + Console.Write($"{formatter(state, exception)}"); + + Console.ForegroundColor = originalColor; + Console.WriteLine(); + } + } +} + +``` + +#### Create logs + +```csharp + +// Worker class that uses logger implementation of teh interface ILogger + +public sealed class Worker : BackgroundService +{ + private readonly ILogger _logger; + + public Worker(ILogger logger) => + _logger = logger; + + protected override async Task ExecuteAsync(CancellationToken stoppingToken) + { + while (!stoppingToken.IsCancellationRequested) + { + _logger.LogInformation("Worker running at: {time}", DateTimeOffset.UtcNow); + await Task.Delay(1_000, stoppingToken); + } + } +} + +``` + +#### Use source generator + +```csharp +public static partial class Log +{ + [LoggerMessage( + EventId = 0, + Level = LogLevel.Critical, + Message = "Could not open socket to `{hostName}`")] + public static partial void CouldNotOpenSocket(this ILogger logger, string hostName); +} + +public partial class InstanceLoggingExample +{ + private readonly ILogger _logger; + + public InstanceLoggingExample(ILogger logger) + { + _logger = logger; + } + + [LoggerMessage( + EventId = 0, + Level = LogLevel.Critical, + Message = "Could not open socket to `{hostName}`")] + public partial void CouldNotOpenSocket(string hostName); +} + +``` + +## Main Types + + + +The main types provided by this library are: + +* `Microsoft.Extensions.Logging.ILogger` +* `Microsoft.Extensions.Logging.ILoggerProvider` +* `Microsoft.Extensions.Logging.ILoggerFactory` +* `Microsoft.Extensions.Logging.ILogger` +* `Microsoft.Extensions.Logging.LogLevel` +* `Microsoft.Extensions.Logging.Logger` +* `Microsoft.Extensions.Logging.LoggerMessage` +* `Microsoft.Extensions.Logging.Abstractions.NullLogger` + +## Additional Documentation + + + +* [Conceptual documentation](https://learn.microsoft.com/dotnet/core/extensions/logging) +* [API documentation](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging) + +## Related Packages + + +[Microsoft.Extensions.Logging](https://www.nuget.org/packages/Microsoft.Extensions.Logging) +[Microsoft.Extensions.Logging.Console](https://www.nuget.org/packages/Microsoft.Extensions.Logging.Console) +[Microsoft.Extensions.Logging.Debug](https://www.nuget.org/packages/Microsoft.Extensions.Logging.Debug) +[Microsoft.Extensions.Logging.EventSource](https://www.nuget.org/packages/Microsoft.Extensions.Logging.EventSource) +[Microsoft.Extensions.Logging.EventLog](https://www.nuget.org/packages/Microsoft.Extensions.Logging.EventLog) +[Microsoft.Extensions.Logging.TraceSource](https://www.nuget.org/packages/Microsoft.Extensions.Logging.TraceSource) + +## Feedback & Contributing + + + +Microsoft.Extensions.Logging.Abstractions is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). \ No newline at end of file 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 6d1032db3ab21f..d3bcec2ebd569c 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 @@ -47,6 +47,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Option EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.ConfigurationExtensions", "..\Microsoft.Extensions.Options.ConfigurationExtensions\src\Microsoft.Extensions.Options.ConfigurationExtensions.csproj", "{4467B594-D9A5-432C-A1CC-07F9C9CED010}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.SourceGeneration", "..\Microsoft.Extensions.Options\gen\Microsoft.Extensions.Options.SourceGeneration.csproj", "{28A7A861-15D3-4FB9-BF74-57C835A32727}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\ref\Microsoft.Extensions.Options.csproj", "{8B2D67D3-9D41-45F0-9CDB-EFC9944C98AA}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\src\Microsoft.Extensions.Options.csproj", "{93C7964F-6A2F-48C7-A3EA-322401532E8C}" @@ -67,12 +69,30 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{F0673641-1B37-485D-9CEA-DB45AC93AA75}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{F0259C06-98B1-4F6D-9B4A-DF7F7C54B7BB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{6F3A4754-E4C7-4862-A32E-DBF6AD96B733}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{18E48841-1DCF-43B1-B006-6C181C40136E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{E76EB0ED-26B7-4852-B503-29239800FC41}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{0869A065-1C81-4332-BAA8-A882C6F8E7AC}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{3B592E91-F7DB-4B78-A1CE-CB1CA436220E}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{ED0ADAC4-705C-421A-A8D2-69CFFFCF734B}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{B51C2035-38E7-4F22-9F9B-A49DC2B6C92F}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{D7763B6D-EFA4-4393-B548-EBA806172FA1}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{B93E3A68-BEC3-42B4-B560-F5E9E4BF94B8}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{E9C3F9BB-5B4C-49A7-9E30-741645E3F179}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{D92654ED-DCD4-4A51-8F85-AE965D4E4B0C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -175,6 +195,10 @@ Global {4467B594-D9A5-432C-A1CC-07F9C9CED010}.Debug|Any CPU.Build.0 = Debug|Any CPU {4467B594-D9A5-432C-A1CC-07F9C9CED010}.Release|Any CPU.ActiveCfg = Release|Any CPU {4467B594-D9A5-432C-A1CC-07F9C9CED010}.Release|Any CPU.Build.0 = Release|Any CPU + {28A7A861-15D3-4FB9-BF74-57C835A32727}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28A7A861-15D3-4FB9-BF74-57C835A32727}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28A7A861-15D3-4FB9-BF74-57C835A32727}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28A7A861-15D3-4FB9-BF74-57C835A32727}.Release|Any CPU.Build.0 = Release|Any CPU {8B2D67D3-9D41-45F0-9CDB-EFC9944C98AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B2D67D3-9D41-45F0-9CDB-EFC9944C98AA}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B2D67D3-9D41-45F0-9CDB-EFC9944C98AA}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -215,6 +239,26 @@ Global {F0673641-1B37-485D-9CEA-DB45AC93AA75}.Debug|Any CPU.Build.0 = Debug|Any CPU {F0673641-1B37-485D-9CEA-DB45AC93AA75}.Release|Any CPU.ActiveCfg = Release|Any CPU {F0673641-1B37-485D-9CEA-DB45AC93AA75}.Release|Any CPU.Build.0 = Release|Any CPU + {F0259C06-98B1-4F6D-9B4A-DF7F7C54B7BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F0259C06-98B1-4F6D-9B4A-DF7F7C54B7BB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F0259C06-98B1-4F6D-9B4A-DF7F7C54B7BB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F0259C06-98B1-4F6D-9B4A-DF7F7C54B7BB}.Release|Any CPU.Build.0 = Release|Any CPU + {6F3A4754-E4C7-4862-A32E-DBF6AD96B733}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6F3A4754-E4C7-4862-A32E-DBF6AD96B733}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6F3A4754-E4C7-4862-A32E-DBF6AD96B733}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6F3A4754-E4C7-4862-A32E-DBF6AD96B733}.Release|Any CPU.Build.0 = Release|Any CPU + {18E48841-1DCF-43B1-B006-6C181C40136E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {18E48841-1DCF-43B1-B006-6C181C40136E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {18E48841-1DCF-43B1-B006-6C181C40136E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {18E48841-1DCF-43B1-B006-6C181C40136E}.Release|Any CPU.Build.0 = Release|Any CPU + {E76EB0ED-26B7-4852-B503-29239800FC41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E76EB0ED-26B7-4852-B503-29239800FC41}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E76EB0ED-26B7-4852-B503-29239800FC41}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E76EB0ED-26B7-4852-B503-29239800FC41}.Release|Any CPU.Build.0 = Release|Any CPU + {0869A065-1C81-4332-BAA8-A882C6F8E7AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0869A065-1C81-4332-BAA8-A882C6F8E7AC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0869A065-1C81-4332-BAA8-A882C6F8E7AC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0869A065-1C81-4332-BAA8-A882C6F8E7AC}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -251,9 +295,18 @@ Global {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} + {28A7A861-15D3-4FB9-BF74-57C835A32727} = {B51C2035-38E7-4F22-9F9B-A49DC2B6C92F} {2BD666C1-CC16-4A64-B915-06701A1B54BA} = {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} + {F0259C06-98B1-4F6D-9B4A-DF7F7C54B7BB} = {D7763B6D-EFA4-4393-B548-EBA806172FA1} + {6F3A4754-E4C7-4862-A32E-DBF6AD96B733} = {D7763B6D-EFA4-4393-B548-EBA806172FA1} + {D7763B6D-EFA4-4393-B548-EBA806172FA1} = {D92654ED-DCD4-4A51-8F85-AE965D4E4B0C} + {18E48841-1DCF-43B1-B006-6C181C40136E} = {B93E3A68-BEC3-42B4-B560-F5E9E4BF94B8} + {E76EB0ED-26B7-4852-B503-29239800FC41} = {B93E3A68-BEC3-42B4-B560-F5E9E4BF94B8} + {B93E3A68-BEC3-42B4-B560-F5E9E4BF94B8} = {D92654ED-DCD4-4A51-8F85-AE965D4E4B0C} + {0869A065-1C81-4332-BAA8-A882C6F8E7AC} = {E9C3F9BB-5B4C-49A7-9E30-741645E3F179} + {E9C3F9BB-5B4C-49A7-9E30-741645E3F179} = {D92654ED-DCD4-4A51-8F85-AE965D4E4B0C} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {E5154479-615B-4978-AE5A-A7DE55907E36} diff --git a/src/libraries/Microsoft.Extensions.Logging.Configuration/ref/Microsoft.Extensions.Logging.Configuration.csproj b/src/libraries/Microsoft.Extensions.Logging.Configuration/ref/Microsoft.Extensions.Logging.Configuration.csproj index ce9864ef7e0965..49ac44f12e2871 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Configuration/ref/Microsoft.Extensions.Logging.Configuration.csproj +++ b/src/libraries/Microsoft.Extensions.Logging.Configuration/ref/Microsoft.Extensions.Logging.Configuration.csproj @@ -1,4 +1,5 @@ + $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) @@ -11,9 +12,6 @@ - - - @@ -23,4 +21,5 @@ + diff --git a/src/libraries/Microsoft.Extensions.Logging.Configuration/src/Microsoft.Extensions.Logging.Configuration.csproj b/src/libraries/Microsoft.Extensions.Logging.Configuration/src/Microsoft.Extensions.Logging.Configuration.csproj index c0074144e78d9f..42a9022b55cc50 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Configuration/src/Microsoft.Extensions.Logging.Configuration.csproj +++ b/src/libraries/Microsoft.Extensions.Logging.Configuration/src/Microsoft.Extensions.Logging.Configuration.csproj @@ -4,6 +4,8 @@ $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) true $(Features);InterceptorsPreview + + $(InterceptorsPreviewNamespaces);Microsoft.Extensions.Configuration.Binder.SourceGeneration true true Configuration support for Microsoft.Extensions.Logging. @@ -20,25 +22,22 @@ - - - - + + - - + - - - - + 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 24cbc019287ec7..a5e6035963e573 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 @@ -55,6 +55,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Option EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.ConfigurationExtensions", "..\Microsoft.Extensions.Options.ConfigurationExtensions\src\Microsoft.Extensions.Options.ConfigurationExtensions.csproj", "{D3E483FC-DF73-4CD8-AFAA-1DA752F49304}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.SourceGeneration", "..\Microsoft.Extensions.Options\gen\Microsoft.Extensions.Options.SourceGeneration.csproj", "{CD1A607B-CB38-4381-BF23-FCEFD3B8C54F}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\ref\Microsoft.Extensions.Options.csproj", "{AC6EFD37-CF1C-4893-B2BA-41826794F711}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\src\Microsoft.Extensions.Options.csproj", "{6316940A-1032-4A41-8D2E-4A9E08B612F6}" @@ -95,6 +97,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\Syst EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{C9F3D8F9-8646-432E-82FC-2E4E8411CFFE}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{86AD3CC6-85A5-41F4-88EC-C324BBBE24B1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{CB4946DA-CD15-4729-B8C9-281773DC5C65}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{37EC2137-0726-4E00-B116-5BA33254028C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{E4B50474-4BA4-4E81-A570-4E8127AB3BB5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{4E37DDCC-96C2-479B-8E8D-A9352B295A74}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{A7BC3DE4-5E79-4552-8E42-D1D13B7293CB}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{AB19DE2B-6A14-4CDA-94EF-845BAF293051}" @@ -103,6 +115,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{F3BAE0A3-1AF EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{561502B1-98F5-40E0-B9D5-0F720E88E657}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{EEC72C1F-23B2-4486-B81F-46DFC2266BD3}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{8EA484F8-18AF-4CE6-AFEF-31EBE0400D43}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{EB5E73CD-8E86-4C9F-9804-CD9938434B44}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{54582BF4-47BD-4876-8D58-C293BABF9E73}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -221,6 +241,10 @@ Global {D3E483FC-DF73-4CD8-AFAA-1DA752F49304}.Debug|Any CPU.Build.0 = Debug|Any CPU {D3E483FC-DF73-4CD8-AFAA-1DA752F49304}.Release|Any CPU.ActiveCfg = Release|Any CPU {D3E483FC-DF73-4CD8-AFAA-1DA752F49304}.Release|Any CPU.Build.0 = Release|Any CPU + {CD1A607B-CB38-4381-BF23-FCEFD3B8C54F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CD1A607B-CB38-4381-BF23-FCEFD3B8C54F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CD1A607B-CB38-4381-BF23-FCEFD3B8C54F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CD1A607B-CB38-4381-BF23-FCEFD3B8C54F}.Release|Any CPU.Build.0 = Release|Any CPU {AC6EFD37-CF1C-4893-B2BA-41826794F711}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AC6EFD37-CF1C-4893-B2BA-41826794F711}.Debug|Any CPU.Build.0 = Debug|Any CPU {AC6EFD37-CF1C-4893-B2BA-41826794F711}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -301,6 +325,26 @@ Global {C9F3D8F9-8646-432E-82FC-2E4E8411CFFE}.Debug|Any CPU.Build.0 = Debug|Any CPU {C9F3D8F9-8646-432E-82FC-2E4E8411CFFE}.Release|Any CPU.ActiveCfg = Release|Any CPU {C9F3D8F9-8646-432E-82FC-2E4E8411CFFE}.Release|Any CPU.Build.0 = Release|Any CPU + {86AD3CC6-85A5-41F4-88EC-C324BBBE24B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {86AD3CC6-85A5-41F4-88EC-C324BBBE24B1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {86AD3CC6-85A5-41F4-88EC-C324BBBE24B1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {86AD3CC6-85A5-41F4-88EC-C324BBBE24B1}.Release|Any CPU.Build.0 = Release|Any CPU + {CB4946DA-CD15-4729-B8C9-281773DC5C65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CB4946DA-CD15-4729-B8C9-281773DC5C65}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CB4946DA-CD15-4729-B8C9-281773DC5C65}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CB4946DA-CD15-4729-B8C9-281773DC5C65}.Release|Any CPU.Build.0 = Release|Any CPU + {37EC2137-0726-4E00-B116-5BA33254028C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {37EC2137-0726-4E00-B116-5BA33254028C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {37EC2137-0726-4E00-B116-5BA33254028C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {37EC2137-0726-4E00-B116-5BA33254028C}.Release|Any CPU.Build.0 = Release|Any CPU + {E4B50474-4BA4-4E81-A570-4E8127AB3BB5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E4B50474-4BA4-4E81-A570-4E8127AB3BB5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E4B50474-4BA4-4E81-A570-4E8127AB3BB5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E4B50474-4BA4-4E81-A570-4E8127AB3BB5}.Release|Any CPU.Build.0 = Release|Any CPU + {4E37DDCC-96C2-479B-8E8D-A9352B295A74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4E37DDCC-96C2-479B-8E8D-A9352B295A74}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4E37DDCC-96C2-479B-8E8D-A9352B295A74}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4E37DDCC-96C2-479B-8E8D-A9352B295A74}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -348,12 +392,21 @@ Global {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} + {CD1A607B-CB38-4381-BF23-FCEFD3B8C54F} = {561502B1-98F5-40E0-B9D5-0F720E88E657} {9D77F47E-EA44-4FA4-A04F-ED022D91F429} = {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} + {86AD3CC6-85A5-41F4-88EC-C324BBBE24B1} = {EEC72C1F-23B2-4486-B81F-46DFC2266BD3} + {CB4946DA-CD15-4729-B8C9-281773DC5C65} = {EEC72C1F-23B2-4486-B81F-46DFC2266BD3} + {EEC72C1F-23B2-4486-B81F-46DFC2266BD3} = {54582BF4-47BD-4876-8D58-C293BABF9E73} + {37EC2137-0726-4E00-B116-5BA33254028C} = {8EA484F8-18AF-4CE6-AFEF-31EBE0400D43} + {E4B50474-4BA4-4E81-A570-4E8127AB3BB5} = {8EA484F8-18AF-4CE6-AFEF-31EBE0400D43} + {8EA484F8-18AF-4CE6-AFEF-31EBE0400D43} = {54582BF4-47BD-4876-8D58-C293BABF9E73} + {4E37DDCC-96C2-479B-8E8D-A9352B295A74} = {EB5E73CD-8E86-4C9F-9804-CD9938434B44} + {EB5E73CD-8E86-4C9F-9804-CD9938434B44} = {54582BF4-47BD-4876-8D58-C293BABF9E73} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C1591684-381C-4761-A20A-4B7FA24E5557} diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/ref/Microsoft.Extensions.Logging.Console.csproj b/src/libraries/Microsoft.Extensions.Logging.Console/ref/Microsoft.Extensions.Logging.Console.csproj index 6ac2f32359d4c9..537f64f4fe43f5 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Console/ref/Microsoft.Extensions.Logging.Console.csproj +++ b/src/libraries/Microsoft.Extensions.Logging.Console/ref/Microsoft.Extensions.Logging.Console.csproj @@ -1,4 +1,5 @@ + $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) true @@ -11,11 +12,8 @@ - - - - + @@ -26,4 +24,5 @@ + 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 0dceab438f82f3..8ae9d3eaa61cf4 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 @@ -8,6 +8,8 @@ true true $(Features);InterceptorsPreview + + $(InterceptorsPreviewNamespaces);Microsoft.Extensions.Configuration.Binder.SourceGeneration true true Console logger provider implementation for Microsoft.Extensions.Logging. @@ -28,31 +30,28 @@ - - - - - - + + + + - + - - - - @@ -62,8 +61,4 @@ - - - - diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/src/PACKAGE.md b/src/libraries/Microsoft.Extensions.Logging.Console/src/PACKAGE.md new file mode 100644 index 00000000000000..69823b6d4d3faa --- /dev/null +++ b/src/libraries/Microsoft.Extensions.Logging.Console/src/PACKAGE.md @@ -0,0 +1,106 @@ +## About + + +`Microsoft.Extensions.Logging.Console` provides a Console logger provider implementation for Microsoft.Extensions.Logging. It provides extension methods for the [ILoggingBuilder](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.iloggingbuilder) and [ILoggerProviderConfiguration](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.configuration.iloggerproviderconfiguration-1) classes. + +## Key Features + + + +* Allow logging to the console using the [Microsoft.Extensions.Logging](https://www.nuget.org/packages/Microsoft.Extensions.Logging/) package. +* Provide extension methods for the [ILoggingBuilder](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.iloggingbuilder) and [ILoggerProviderConfiguration](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.configuration.iloggerproviderconfiguration-1) classes. + +## How to Use + + +```csharp +using System; +using Microsoft.Extensions.Logging; + +namespace ConsoleLoggerSample +{ + class Program + { + static void Main(string[] args) + { + // Create a logger factory with a console provider + using ILoggerFactory loggerFactory = LoggerFactory.Create(builder => builder.AddConsole()); + + // Create a logger with the category name of the current class + ILogger logger = loggerFactory.CreateLogger(); + + // Log some messages with different log levels and message templates + logger.LogTrace("This is a trace message."); + logger.LogDebug("This is a debug message."); + logger.LogInformation("Hello {Name}!", "World"); + logger.LogWarning("This is a warning message."); + logger.LogError("This is an error message."); + logger.LogCritical("This is a critical message."); + + // Use structured logging to capture complex data + var person = new Person { Name = "Alice", Age = 25 }; + logger.LogInformation("Created a new person: {@Person}", person); + + // Use exception logging to capture the details of an exception + try + { + throw new Exception("Something went wrong."); + } + catch (Exception ex) + { + logger.LogError(ex, "An exception occurred."); + } + + Console.WriteLine("Press any key to exit."); + Console.ReadKey(); + } + } + + // A simple class to demonstrate structured logging + class Person + { + public string Name { get; set; } + public int Age { get; set; } + } +} + +``` + +## Main Types + + + +The main types provided by this library are: + +* `ConsoleLoggerProvider` +* `ConsoleLoggerSettings` +* `ConsoleLoggerOptions` +* `ConsoleLoggerExtensions` +* `ConsoleFormatter` +* `ConsoleFormatterOptions` +* `JsonConsoleFormatterOptions` +* `SimpleConsoleFormatterOptions` + +## Additional Documentation + + + +* [Conceptual documentation](https://learn.microsoft.com/dotnet/core/extensions/logging) +* [Console log formatter](https://learn.microsoft.com/dotnet/core/extensions/console-log-formatter) +* [API documentation](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging) + +## Related Packages + + +[Microsoft.Extensions.Logging.Abstractions](https://www.nuget.org/packages/Microsoft.Extensions.Logging.Abstractions) +[Microsoft.Extensions.Logging](https://www.nuget.org/packages/Microsoft.Extensions.Logging) +[Microsoft.Extensions.Logging.Debug](https://www.nuget.org/packages/Microsoft.Extensions.Logging.Debug) +[Microsoft.Extensions.Logging.EventSource](https://www.nuget.org/packages/Microsoft.Extensions.Logging.EventSource) +[Microsoft.Extensions.Logging.EventLog](https://www.nuget.org/packages/Microsoft.Extensions.Logging.EventLog) +[Microsoft.Extensions.Logging.TraceSource](https://www.nuget.org/packages/Microsoft.Extensions.Logging.TraceSource) + +## Feedback & Contributing + + + +Microsoft.Extensions.Logging.Console is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). \ No newline at end of file diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/ConsoleFormatterTests.cs b/src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/ConsoleFormatterTests.cs index 6da081c4e86ab0..573006673d8889 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/ConsoleFormatterTests.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/ConsoleFormatterTests.cs @@ -74,6 +74,7 @@ internal static (ConsoleLogger Logger, ConsoleSink Sink, ConsoleSink ErrorSink, } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void ConsoleLoggerOptions_TimeStampFormat_IsReloaded() { // Arrange @@ -87,6 +88,7 @@ public void ConsoleLoggerOptions_TimeStampFormat_IsReloaded() } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [MemberData(nameof(FormatterNames))] public void InvalidLogLevel_Throws(string formatterName) { @@ -101,6 +103,7 @@ public void InvalidLogLevel_Throws(string formatterName) } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [MemberData(nameof(FormatterNamesAndLevels))] public void NoMessageOrException_Noop(string formatterName, LogLevel level) { @@ -120,6 +123,7 @@ public void NoMessageOrException_Noop(string formatterName, LogLevel level) } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [MemberData(nameof(FormatterNamesAndLevels))] public void Log_LogsCorrectTimestamp(string formatterName, LogLevel level) { 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 99b49170ed8e1d..945f00905c8e36 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 @@ -76,6 +76,7 @@ public void AddConsoleFormatter_NullConfigure_Throws() } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [MemberData(nameof(FormatterNames))] public void AddConsole_ConsoleLoggerOptionsFromConfigFile_IsReadFromLoggingConfiguration(string formatterName) { @@ -155,6 +156,7 @@ private class CustomOptions : ConsoleFormatterOptions } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void AddSimpleConsole_ChangeProperties_IsReadFromLoggingConfiguration() { var configuration = new ConfigurationBuilder().AddInMemoryCollection(new[] { @@ -185,6 +187,7 @@ public void AddSimpleConsole_ChangeProperties_IsReadFromLoggingConfiguration() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void AddSimpleConsole_OutsideConfig_TakesProperty() { var configuration = new ConfigurationBuilder().AddInMemoryCollection(new[] { @@ -215,6 +218,7 @@ public void AddSimpleConsole_OutsideConfig_TakesProperty() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void AddSystemdConsole_ChangeProperties_IsReadFromLoggingConfiguration() { var configuration = new ConfigurationBuilder().AddInMemoryCollection(new[] { @@ -241,6 +245,7 @@ public void AddSystemdConsole_ChangeProperties_IsReadFromLoggingConfiguration() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void AddSystemdConsole_OutsideConfig_TakesProperty() { var configuration = new ConfigurationBuilder().AddInMemoryCollection(new[] { @@ -271,6 +276,7 @@ public void AddSystemdConsole_OutsideConfig_TakesProperty() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void AddJsonConsole_ChangeProperties_IsReadFromLoggingConfiguration() { var configuration = new ConfigurationBuilder().AddInMemoryCollection(new[] { @@ -299,6 +305,7 @@ public void AddJsonConsole_ChangeProperties_IsReadFromLoggingConfiguration() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void AddJsonConsole_OutsideConfig_TakesProperty() { var configuration = new ConfigurationBuilder().AddInMemoryCollection(new[] { @@ -333,6 +340,7 @@ public void AddJsonConsole_OutsideConfig_TakesProperty() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void AddConsole_NullFormatterNameUsingSystemdFormat_AnyDeprecatedPropertiesOverwriteFormatterOptions() { var configs = new[] { @@ -378,6 +386,7 @@ public void AddConsole_MaxQueueLengthSetToNegativeOrZero_Throws(int invalidMaxQu } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void AddConsole_MaxQueueLengthLargerThanZero_ConfiguredProperly() { var configs = new[] { @@ -399,6 +408,7 @@ public void AddConsole_MaxQueueLengthLargerThanZero_ConfiguredProperly() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void AddConsole_NullFormatterName_UsingSystemdFormat_IgnoreFormatterOptionsAndUseDeprecatedInstead() { var configuration = new ConfigurationBuilder().AddInMemoryCollection(new[] { @@ -431,6 +441,7 @@ public void AddConsole_NullFormatterName_UsingSystemdFormat_IgnoreFormatterOptio } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void AddConsole_NullFormatterName_UsingDefaultFormat_IgnoreFormatterOptionsAndUseDeprecatedInstead() { var configuration = new ConfigurationBuilder().AddInMemoryCollection(new[] { @@ -470,6 +481,7 @@ public void AddConsole_NullFormatterName_UsingDefaultFormat_IgnoreFormatterOptio } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [InlineData("missingFormatter")] [InlineData("simple")] [InlineData("Simple")] @@ -513,6 +525,7 @@ public void AddConsole_FormatterNameIsSet_UsingDefaultFormat_IgnoreDeprecatedAnd } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [InlineData("missingFormatter")] [InlineData("systemd")] [InlineData("Systemd")] diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/ConsoleLoggerProcessorTests.cs b/src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/ConsoleLoggerProcessorTests.cs index dfc7eaae8fe24c..618d4cc9fb84f7 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/ConsoleLoggerProcessorTests.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/ConsoleLoggerProcessorTests.cs @@ -15,6 +15,7 @@ public class ConsoleLoggerProcessorTests private const string _loggerName = "test"; [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void LogAfterDisposeWritesLog() { // Arrange @@ -63,6 +64,7 @@ public void LogsFlushedAfterDispose() } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [InlineData(-1)] [InlineData(0)] public static void MaxQueueLength_SetInvalid_Throws(int invalidMaxQueueLength) diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/ConsoleLoggerTest.cs b/src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/ConsoleLoggerTest.cs index 0994980590122b..f0ef3d6cd7e1d1 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/ConsoleLoggerTest.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/ConsoleLoggerTest.cs @@ -174,6 +174,7 @@ internal static string GetJsonLogLevelString(LogLevel logLevel) } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void LogsWhenMessageIsNotProvided() { // Arrange @@ -206,6 +207,7 @@ public void LogsWhenMessageIsNotProvided() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void DoesNotLog_NewLine_WhenNoExceptionIsProvided() { // Arrange @@ -234,6 +236,7 @@ public void DoesNotLog_NewLine_WhenNoExceptionIsProvided() } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [InlineData(null, 0)] [InlineData(null, 1)] [InlineData("missingFormatter", 0)] @@ -276,6 +279,7 @@ public void Options_FormatterNameNull_UsesDeprecatedProperties(string formatterN } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [InlineData("Route with name 'Simple' was not found.")] public void Writes_NewLine_WhenExceptionIsProvided(string message) { @@ -300,6 +304,7 @@ public void Writes_NewLine_WhenExceptionIsProvided(string message) } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void ThrowsException_WhenNoFormatterIsProvided() { // Arrange @@ -311,6 +316,7 @@ public void ThrowsException_WhenNoFormatterIsProvided() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void LogsWhenNullFilterGiven() { // Arrange @@ -332,6 +338,7 @@ public void LogsWhenNullFilterGiven() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void WriteCritical_LogsCorrectColors() { // Arrange @@ -353,6 +360,7 @@ public void WriteCritical_LogsCorrectColors() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void WriteError_LogsCorrectColors() { // Arrange @@ -374,6 +382,7 @@ public void WriteError_LogsCorrectColors() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void WriteWarning_LogsCorrectColors() { // Arrange @@ -395,6 +404,7 @@ public void WriteWarning_LogsCorrectColors() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void WriteInformation_LogsCorrectColors() { // Arrange @@ -446,6 +456,7 @@ public void AddConsole_IsOutputRedirected_ColorDisabled() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void WriteDebug_LogsCorrectColors() { // Arrange @@ -467,6 +478,7 @@ public void WriteDebug_LogsCorrectColors() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void WriteTrace_LogsCorrectColors() { // Arrange @@ -488,6 +500,7 @@ public void WriteTrace_LogsCorrectColors() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void WriteAllLevelsDisabledColors_LogsNoColors() { // Arrange @@ -512,6 +525,7 @@ public void WriteAllLevelsDisabledColors_LogsNoColors() } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [MemberData(nameof(FormatsAndLevels))] public void Log_LogsCorrectTimestamp(ConsoleLoggerFormat format, LogLevel level) { @@ -553,6 +567,7 @@ public void Log_LogsCorrectTimestamp(ConsoleLoggerFormat format, LogLevel level) } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [MemberData(nameof(FormatsAndLevels))] public void WriteCore_LogsCorrectTimestampInUtc(ConsoleLoggerFormat format, LogLevel level) { @@ -594,6 +609,7 @@ public void WriteCore_LogsCorrectTimestampInUtc(ConsoleLoggerFormat format, LogL } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [MemberData(nameof(FormatsAndLevels))] public void WriteCore_LogsCorrectMessages(ConsoleLoggerFormat format, LogLevel level) { @@ -638,6 +654,7 @@ public void WriteCore_LogsCorrectMessages(ConsoleLoggerFormat format, LogLevel l } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void NoLogScope_DoesNotWriteAnyScopeContentToOutput() { // Arrange @@ -659,6 +676,7 @@ public void NoLogScope_DoesNotWriteAnyScopeContentToOutput() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void WritingScopes_LogsWithCorrectColors() { // Arrange @@ -685,6 +703,7 @@ public void WritingScopes_LogsWithCorrectColors() } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [MemberData(nameof(Formats))] public void WritingScopes_LogsExpectedMessage(ConsoleLoggerFormat format) { @@ -736,6 +755,7 @@ public void WritingScopes_LogsExpectedMessage(ConsoleLoggerFormat format) } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [MemberData(nameof(Formats))] public void WritingNestedScope_LogsNullScopeName(ConsoleLoggerFormat format) { @@ -785,6 +805,7 @@ public void WritingNestedScope_LogsNullScopeName(ConsoleLoggerFormat format) } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [MemberData(nameof(Formats))] public void WritingNestedScopes_LogsExpectedMessage(ConsoleLoggerFormat format) { @@ -843,6 +864,7 @@ public void WritingNestedScopes_LogsExpectedMessage(ConsoleLoggerFormat format) } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [MemberData(nameof(Formats))] public void WritingMultipleScopes_LogsExpectedMessage(ConsoleLoggerFormat format) { @@ -912,6 +934,7 @@ public void WritingMultipleScopes_LogsExpectedMessage(ConsoleLoggerFormat format } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void CallingBeginScopeOnLogger_AlwaysReturnsNewDisposableInstance() { // Arrange @@ -930,6 +953,7 @@ public void CallingBeginScopeOnLogger_AlwaysReturnsNewDisposableInstance() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void CallingBeginScopeOnLogger_ReturnsNonNullableInstance() { // Arrange @@ -945,6 +969,7 @@ public void CallingBeginScopeOnLogger_ReturnsNonNullableInstance() } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [MemberData(nameof(Formats))] public void ConsoleLoggerLogsToError_WhenOverErrorLevel(ConsoleLoggerFormat format) { @@ -995,6 +1020,7 @@ public void ConsoleLoggerLogsToError_WhenOverErrorLevel(ConsoleLoggerFormat form } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [MemberData(nameof(FormatsAndLevels))] public void WriteCore_NullMessageWithException(ConsoleLoggerFormat format, LogLevel level) { @@ -1039,6 +1065,7 @@ public void WriteCore_NullMessageWithException(ConsoleLoggerFormat format, LogLe } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [MemberData(nameof(FormatsAndLevels))] public void WriteCore_EmptyMessageWithException(ConsoleLoggerFormat format, LogLevel level) { @@ -1082,6 +1109,7 @@ public void WriteCore_EmptyMessageWithException(ConsoleLoggerFormat format, LogL } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [MemberData(nameof(FormatsAndLevels))] public void WriteCore_MessageWithNullException(ConsoleLoggerFormat format, LogLevel level) { @@ -1122,6 +1150,7 @@ public void WriteCore_MessageWithNullException(ConsoleLoggerFormat format, LogLe } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [MemberData(nameof(Levels))] public void WriteCore_NullMessageWithNullException(LogLevel level) { @@ -1140,6 +1169,7 @@ public void WriteCore_NullMessageWithNullException(LogLevel level) } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void IsEnabledReturnsCorrectValue() { var logger = SetUp().Logger; @@ -1154,6 +1184,7 @@ public static void IsEnabledReturnsCorrectValue() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void ConsoleLoggerOptions_DisableColors_IsAppliedToLoggers() { // Arrange @@ -1188,6 +1219,7 @@ public void ConsoleLoggerOptions_SetInvalidBufferMode_Throws() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void ConsoleLoggerOptions_DisableColors_IsReadFromLoggingConfiguration() { var configuration = new ConfigurationBuilder().AddInMemoryCollection(new[] { new KeyValuePair("Console:DisableColors", "true") }).Build(); @@ -1205,6 +1237,7 @@ public void ConsoleLoggerOptions_DisableColors_IsReadFromLoggingConfiguration() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void ConsoleLoggerOptions_TimeStampFormat_IsReloaded() { // Arrange @@ -1219,6 +1252,7 @@ public void ConsoleLoggerOptions_TimeStampFormat_IsReloaded() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void ConsoleLoggerOptions_TimeStampFormat_IsReadFromLoggingConfiguration() { var configuration = new ConfigurationBuilder().AddInMemoryCollection(new[] { new KeyValuePair("Console:TimeStampFormat", "yyyyMMddHHmmss") }).Build(); @@ -1236,6 +1270,7 @@ public void ConsoleLoggerOptions_TimeStampFormat_IsReadFromLoggingConfiguration( } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void ConsoleLoggerOptions_TimeStampFormat_MultipleReloads() { var monitor = new TestOptionsMonitor(new ConsoleLoggerOptions()); @@ -1250,6 +1285,7 @@ public void ConsoleLoggerOptions_TimeStampFormat_MultipleReloads() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void ConsoleLoggerOptions_IncludeScopes_IsAppliedToLoggers() { // Arrange @@ -1264,6 +1300,7 @@ public void ConsoleLoggerOptions_IncludeScopes_IsAppliedToLoggers() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void ConsoleLoggerOptions_LogAsErrorLevel_IsReadFromLoggingConfiguration() { var configuration = new ConfigurationBuilder().AddInMemoryCollection(new[] { new KeyValuePair("Console:LogToStandardErrorThreshold", "Warning") }).Build(); @@ -1281,6 +1318,7 @@ public void ConsoleLoggerOptions_LogAsErrorLevel_IsReadFromLoggingConfiguration( } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void ConsoleLoggerOptions_LogAsErrorLevel_IsAppliedToLoggers() { // Arrange @@ -1295,6 +1333,7 @@ public void ConsoleLoggerOptions_LogAsErrorLevel_IsAppliedToLoggers() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void ConsoleLoggerOptions_UpdateQueueOptions_UpdatesConsoleLoggerProcessorProperties() { // Arrange @@ -1314,6 +1353,7 @@ public void ConsoleLoggerOptions_UpdateQueueOptions_UpdatesConsoleLoggerProcesso } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void ConsoleLoggerOptions_UseUtcTimestamp_IsAppliedToLoggers() { // Arrange @@ -1328,6 +1368,7 @@ public void ConsoleLoggerOptions_UseUtcTimestamp_IsAppliedToLoggers() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void ConsoleLoggerOptions_IncludeScopes_IsReadFromLoggingConfiguration() { var configuration = new ConfigurationBuilder().AddInMemoryCollection(new[] { new KeyValuePair("Console:IncludeScopes", "true") }).Build(); diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/JsonConsoleFormatterTests.cs b/src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/JsonConsoleFormatterTests.cs index 0ef491abbc1723..153ba5503eeb47 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/JsonConsoleFormatterTests.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/JsonConsoleFormatterTests.cs @@ -18,6 +18,7 @@ namespace Microsoft.Extensions.Logging.Console.Test public class JsonConsoleFormatterTests : ConsoleFormatterTests { [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void NoLogScope_DoesNotWriteAnyScopeContentToOutput_Json() { // Arrange @@ -79,6 +80,7 @@ public void Log_TimestampFormatSet_ContainsTimestamp() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void Log_NullMessage_LogsWhenMessageIsNotProvided() { // Arrange @@ -123,6 +125,7 @@ public void Log_NullMessage_LogsWhenMessageIsNotProvided() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void Log_ExceptionWithMessage_ExtractsInfo() { // Arrange @@ -177,6 +180,7 @@ public void Log_ExceptionWithMessage_ExtractsInfo() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void Log_IncludeScopes_ContainsDuplicateNamedPropertiesInScope_AcceptableJson() { // Arrange @@ -210,6 +214,7 @@ public void Log_IncludeScopes_ContainsDuplicateNamedPropertiesInScope_Acceptable } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void Log_StateAndScopeAreCollections_IncludesMessageAndCollectionValues() { // Arrange @@ -245,6 +250,7 @@ public void Log_StateAndScopeAreCollections_IncludesMessageAndCollectionValues() } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [MemberData(nameof(SpecialCaseValues))] public void Log_StateAndScopeContainsSpecialCaseValue_SerializesValueAsExpected(object value, string expectedJsonValue) { @@ -275,6 +281,7 @@ public void Log_StateAndScopeContainsSpecialCaseValue_SerializesValueAsExpected( } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [MemberData(nameof(FloatingPointValues))] public void Log_StateAndScopeContainsFloatingPointType_SerializesValue(object value) { @@ -314,6 +321,7 @@ static void AssertMessageValue(string message, string propertyName) } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void Log_StateAndScopeContainsNullValue_SerializesNull() { // Arrange @@ -343,6 +351,7 @@ public void Log_StateAndScopeContainsNullValue_SerializesNull() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void Log_ScopeIsIEnumerable_SerializesKeyValuePair() { // Arrange diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/SimpleConsoleFormatterTests.cs b/src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/SimpleConsoleFormatterTests.cs index 3bb1fa491ecea0..26bd40775bb371 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/SimpleConsoleFormatterTests.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/SimpleConsoleFormatterTests.cs @@ -10,6 +10,7 @@ namespace Microsoft.Extensions.Logging.Console.Test public class SimpleConsoleFormatterTests : ConsoleFormatterTests { [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [InlineData(LoggerColorBehavior.Default)] [InlineData(LoggerColorBehavior.Enabled)] [InlineData(LoggerColorBehavior.Disabled)] @@ -54,6 +55,7 @@ public void Log_WritingScopes_LogsWithCorrectColorsWhenColorEnabled(LoggerColorB } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void Log_NoLogScope_DoesNotWriteAnyScopeContentToOutput() { // Arrange @@ -109,6 +111,7 @@ public void Log_SingleLine_LogsWhenMessageIsNotProvided() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void Log_SingleLine_LogsWhenBothMessageAndExceptionProvided() { // Arrange 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 85abab99c11b73..563292a17f208e 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 @@ -29,6 +29,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Loggin EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging", "..\Microsoft.Extensions.Logging\src\Microsoft.Extensions.Logging.csproj", "{7B89700F-897A-4CE8-B789-C9F915631845}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.SourceGeneration", "..\Microsoft.Extensions.Options\gen\Microsoft.Extensions.Options.SourceGeneration.csproj", "{79A27ACF-3616-4F3A-912A-85B066CAFBB7}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\ref\Microsoft.Extensions.Options.csproj", "{B39EB467-7C81-482C-A1EA-D6B183E43DE9}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\src\Microsoft.Extensions.Options.csproj", "{6BDC5518-F6BA-4506-B9E6-505EDEEE340F}" @@ -49,12 +51,30 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{17936926-B6EA-4194-AC9B-E7274BBF58B9}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{AD3D11F1-8E50-4728-9ADE-90CFC857852C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{FA3CC022-8C7A-4F25-B3E5-55807B2B52C2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{EEA44216-44E1-4D42-85E0-50667F4F1372}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{5A2C5964-E515-47DD-B605-263FDD0FFA9C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{EC051CA0-5FE0-4E40-AEB8-53DE784FCC3E}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{33C65345-4AE9-41DF-8CC8-5C81979DBD03}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{FC2F4F53-DFE7-4A0B-A85C-D266FDD51526}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{B1578203-268C-45C3-B62C-3D5CFC340AB4}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{B57846B6-4EB4-475F-AF4D-A4317F6B7754}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{A3955AC6-1263-49DE-9D9A-85B0C58A4DBF}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{D3C33399-9FC9-4F62-9883-D6D338D0233B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{48EC3A74-596C-4075-A2E6-D73B2360DB14}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -121,6 +141,10 @@ Global {7B89700F-897A-4CE8-B789-C9F915631845}.Debug|Any CPU.Build.0 = Debug|Any CPU {7B89700F-897A-4CE8-B789-C9F915631845}.Release|Any CPU.ActiveCfg = Release|Any CPU {7B89700F-897A-4CE8-B789-C9F915631845}.Release|Any CPU.Build.0 = Release|Any CPU + {79A27ACF-3616-4F3A-912A-85B066CAFBB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {79A27ACF-3616-4F3A-912A-85B066CAFBB7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {79A27ACF-3616-4F3A-912A-85B066CAFBB7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {79A27ACF-3616-4F3A-912A-85B066CAFBB7}.Release|Any CPU.Build.0 = Release|Any CPU {B39EB467-7C81-482C-A1EA-D6B183E43DE9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B39EB467-7C81-482C-A1EA-D6B183E43DE9}.Debug|Any CPU.Build.0 = Debug|Any CPU {B39EB467-7C81-482C-A1EA-D6B183E43DE9}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -161,6 +185,26 @@ Global {17936926-B6EA-4194-AC9B-E7274BBF58B9}.Debug|Any CPU.Build.0 = Debug|Any CPU {17936926-B6EA-4194-AC9B-E7274BBF58B9}.Release|Any CPU.ActiveCfg = Release|Any CPU {17936926-B6EA-4194-AC9B-E7274BBF58B9}.Release|Any CPU.Build.0 = Release|Any CPU + {AD3D11F1-8E50-4728-9ADE-90CFC857852C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AD3D11F1-8E50-4728-9ADE-90CFC857852C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AD3D11F1-8E50-4728-9ADE-90CFC857852C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AD3D11F1-8E50-4728-9ADE-90CFC857852C}.Release|Any CPU.Build.0 = Release|Any CPU + {FA3CC022-8C7A-4F25-B3E5-55807B2B52C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA3CC022-8C7A-4F25-B3E5-55807B2B52C2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA3CC022-8C7A-4F25-B3E5-55807B2B52C2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA3CC022-8C7A-4F25-B3E5-55807B2B52C2}.Release|Any CPU.Build.0 = Release|Any CPU + {EEA44216-44E1-4D42-85E0-50667F4F1372}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EEA44216-44E1-4D42-85E0-50667F4F1372}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EEA44216-44E1-4D42-85E0-50667F4F1372}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EEA44216-44E1-4D42-85E0-50667F4F1372}.Release|Any CPU.Build.0 = Release|Any CPU + {5A2C5964-E515-47DD-B605-263FDD0FFA9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5A2C5964-E515-47DD-B605-263FDD0FFA9C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5A2C5964-E515-47DD-B605-263FDD0FFA9C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5A2C5964-E515-47DD-B605-263FDD0FFA9C}.Release|Any CPU.Build.0 = Release|Any CPU + {EC051CA0-5FE0-4E40-AEB8-53DE784FCC3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EC051CA0-5FE0-4E40-AEB8-53DE784FCC3E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EC051CA0-5FE0-4E40-AEB8-53DE784FCC3E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EC051CA0-5FE0-4E40-AEB8-53DE784FCC3E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -188,9 +232,18 @@ Global {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} + {79A27ACF-3616-4F3A-912A-85B066CAFBB7} = {B1578203-268C-45C3-B62C-3D5CFC340AB4} {6861E718-D940-4E2A-A2EC-CB4F2EB68848} = {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} + {AD3D11F1-8E50-4728-9ADE-90CFC857852C} = {B57846B6-4EB4-475F-AF4D-A4317F6B7754} + {FA3CC022-8C7A-4F25-B3E5-55807B2B52C2} = {B57846B6-4EB4-475F-AF4D-A4317F6B7754} + {B57846B6-4EB4-475F-AF4D-A4317F6B7754} = {48EC3A74-596C-4075-A2E6-D73B2360DB14} + {EEA44216-44E1-4D42-85E0-50667F4F1372} = {A3955AC6-1263-49DE-9D9A-85B0C58A4DBF} + {5A2C5964-E515-47DD-B605-263FDD0FFA9C} = {A3955AC6-1263-49DE-9D9A-85B0C58A4DBF} + {A3955AC6-1263-49DE-9D9A-85B0C58A4DBF} = {48EC3A74-596C-4075-A2E6-D73B2360DB14} + {EC051CA0-5FE0-4E40-AEB8-53DE784FCC3E} = {D3C33399-9FC9-4F62-9883-D6D338D0233B} + {D3C33399-9FC9-4F62-9883-D6D338D0233B} = {48EC3A74-596C-4075-A2E6-D73B2360DB14} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {4842DEC4-687D-48D9-B1FE-FF5456C0B60B} diff --git a/src/libraries/Microsoft.Extensions.Logging.Debug/src/PACKAGE.md b/src/libraries/Microsoft.Extensions.Logging.Debug/src/PACKAGE.md new file mode 100644 index 00000000000000..97b378f4350c57 --- /dev/null +++ b/src/libraries/Microsoft.Extensions.Logging.Debug/src/PACKAGE.md @@ -0,0 +1,100 @@ +## About + + +`Microsoft.Extensions.Logging.Debug` provides a Debug output logger provider implementation for Microsoft.Extensions.Logging. This logger logs messages to a debugger monitor by writing messages with `System.Diagnostics.Debug.WriteLine()`. + +## Key Features + + + +* Allow logging to the debugger output. +* Provide extensions method for the [ILoggingBuilder](https://docs.microsoft.com/dotnet/api/microsoft.extensions.logging.iloggingbuilder) class to easily enable this Debug logger. + +## How to Use + + +```csharp +using System; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Debug; + +namespace DebugLoggerSample +{ + class Program + { + static void Main(string[] args) + { + // Create a logger factory with a debug provider + using ILoggerFactory loggerFactory = LoggerFactory.Create(builder => builder.AddDebug()); + + // Create a logger with the category name of the current class + ILogger logger = loggerFactory.CreateLogger(); + + // Log some messages with different log levels and message templates + logger.LogTrace("This is a trace message."); + logger.LogDebug("This is a debug message."); + logger.LogInformation("Hello {Name}!", "World"); + logger.LogWarning("This is a warning message."); + logger.LogError("This is an error message."); + logger.LogCritical("This is a critical message."); + + // Use structured logging to capture complex data + var person = new Person { Name = "Alice", Age = 25 }; + logger.LogInformation("Created a new person: {@Person}", person); + + // Use exception logging to capture the details of an exception + try + { + throw new Exception("Something went wrong."); + } + catch (Exception ex) + { + logger.LogError(ex, "An exception occurred."); + } + + Console.WriteLine("Press any key to exit."); + Console.ReadKey(); + } + } + + // A simple class to demonstrate structured logging + class Person + { + public string Name { get; set; } + public int Age { get; set; } + } +} + +``` + +## Main Types + + + +The main types provided by this library are: + +* `DebugLoggerProvider` +* `DebugLoggerFactoryExtensions` + +## Additional Documentation + + + +* [Conceptual documentation](https://learn.microsoft.com/dotnet/core/extensions/logging) +* [API documentation](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging) + +## Related Packages +[Microsoft.Extensions.Logging.Abstractions](https://www.nuget.org/packages/Microsoft.Extensions.Logging.Abstractions) +[Microsoft.Extensions.Logging](https://www.nuget.org/packages/Microsoft.Extensions.Logging) +[Microsoft.Extensions.Logging.Console](https://www.nuget.org/packages/Microsoft.Extensions.Logging.Console) +[Microsoft.Extensions.Logging.EventSource](https://www.nuget.org/packages/Microsoft.Extensions.Logging.EventSource) +[Microsoft.Extensions.Logging.EventLog](https://www.nuget.org/packages/Microsoft.Extensions.Logging.EventLog) +[Microsoft.Extensions.Logging.TraceSource](https://www.nuget.org/packages/Microsoft.Extensions.Logging.TraceSource) + + + +## Feedback & Contributing + + + +Microsoft.Extensions.Logging.Debug is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). \ No newline at end of file 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 c4160dc5a83b43..7704349e524f27 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 @@ -29,6 +29,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Loggin EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging", "..\Microsoft.Extensions.Logging\src\Microsoft.Extensions.Logging.csproj", "{515F097D-9FFB-4728-8B9E-18CFA6916AD3}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.SourceGeneration", "..\Microsoft.Extensions.Options\gen\Microsoft.Extensions.Options.SourceGeneration.csproj", "{618F18BC-549D-4DAA-8551-3726CCA9A478}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\ref\Microsoft.Extensions.Options.csproj", "{D41F65C3-1D86-44FA-BE07-9E95392E2519}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\src\Microsoft.Extensions.Options.csproj", "{85B1195D-CA73-412B-A1DB-66A2ECCFDB60}" @@ -55,12 +57,30 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{A58AB418-69E1-41C8-A8DD-257924073646}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{33358624-4070-44F4-8F87-0C1ADE0C45B9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{1EF5F352-80CE-43C7-9D64-84E9093B977B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{5BBAD765-61AC-4B0C-8622-F69025B151CF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{D4E79343-CF72-43B4-A321-AE58ADEA91B1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{3B773172-E0CC-405B-83D6-4A314838F718}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{7787FAA0-0A1A-4FBE-B29A-A17EB080BEE1}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{FD104C22-7ECA-47DD-8877-26AC1E0E5ECC}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{677D11A9-4811-41EA-8F93-F8DB15BF27DD}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{16797022-28AE-4250-970B-7A27D77C97FD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{D782F54C-7681-4A49-ACE6-6A68C9833973}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{3C843288-881E-47C8-AFE4-5E27CFAE1F90}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{225E0292-CAF3-4173-939F-843D6C99684F}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -127,6 +147,10 @@ Global {515F097D-9FFB-4728-8B9E-18CFA6916AD3}.Debug|Any CPU.Build.0 = Debug|Any CPU {515F097D-9FFB-4728-8B9E-18CFA6916AD3}.Release|Any CPU.ActiveCfg = Release|Any CPU {515F097D-9FFB-4728-8B9E-18CFA6916AD3}.Release|Any CPU.Build.0 = Release|Any CPU + {618F18BC-549D-4DAA-8551-3726CCA9A478}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {618F18BC-549D-4DAA-8551-3726CCA9A478}.Debug|Any CPU.Build.0 = Debug|Any CPU + {618F18BC-549D-4DAA-8551-3726CCA9A478}.Release|Any CPU.ActiveCfg = Release|Any CPU + {618F18BC-549D-4DAA-8551-3726CCA9A478}.Release|Any CPU.Build.0 = Release|Any CPU {D41F65C3-1D86-44FA-BE07-9E95392E2519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D41F65C3-1D86-44FA-BE07-9E95392E2519}.Debug|Any CPU.Build.0 = Debug|Any CPU {D41F65C3-1D86-44FA-BE07-9E95392E2519}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -179,6 +203,26 @@ Global {A58AB418-69E1-41C8-A8DD-257924073646}.Debug|Any CPU.Build.0 = Debug|Any CPU {A58AB418-69E1-41C8-A8DD-257924073646}.Release|Any CPU.ActiveCfg = Release|Any CPU {A58AB418-69E1-41C8-A8DD-257924073646}.Release|Any CPU.Build.0 = Release|Any CPU + {33358624-4070-44F4-8F87-0C1ADE0C45B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {33358624-4070-44F4-8F87-0C1ADE0C45B9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {33358624-4070-44F4-8F87-0C1ADE0C45B9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {33358624-4070-44F4-8F87-0C1ADE0C45B9}.Release|Any CPU.Build.0 = Release|Any CPU + {1EF5F352-80CE-43C7-9D64-84E9093B977B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1EF5F352-80CE-43C7-9D64-84E9093B977B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1EF5F352-80CE-43C7-9D64-84E9093B977B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1EF5F352-80CE-43C7-9D64-84E9093B977B}.Release|Any CPU.Build.0 = Release|Any CPU + {5BBAD765-61AC-4B0C-8622-F69025B151CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5BBAD765-61AC-4B0C-8622-F69025B151CF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5BBAD765-61AC-4B0C-8622-F69025B151CF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5BBAD765-61AC-4B0C-8622-F69025B151CF}.Release|Any CPU.Build.0 = Release|Any CPU + {D4E79343-CF72-43B4-A321-AE58ADEA91B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D4E79343-CF72-43B4-A321-AE58ADEA91B1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D4E79343-CF72-43B4-A321-AE58ADEA91B1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D4E79343-CF72-43B4-A321-AE58ADEA91B1}.Release|Any CPU.Build.0 = Release|Any CPU + {3B773172-E0CC-405B-83D6-4A314838F718}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3B773172-E0CC-405B-83D6-4A314838F718}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3B773172-E0CC-405B-83D6-4A314838F718}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3B773172-E0CC-405B-83D6-4A314838F718}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -209,9 +253,18 @@ Global {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} + {618F18BC-549D-4DAA-8551-3726CCA9A478} = {677D11A9-4811-41EA-8F93-F8DB15BF27DD} {F47FCBE9-78EB-40FE-B2F9-3D5DD4BDF9DF} = {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} + {33358624-4070-44F4-8F87-0C1ADE0C45B9} = {16797022-28AE-4250-970B-7A27D77C97FD} + {1EF5F352-80CE-43C7-9D64-84E9093B977B} = {16797022-28AE-4250-970B-7A27D77C97FD} + {16797022-28AE-4250-970B-7A27D77C97FD} = {225E0292-CAF3-4173-939F-843D6C99684F} + {5BBAD765-61AC-4B0C-8622-F69025B151CF} = {D782F54C-7681-4A49-ACE6-6A68C9833973} + {D4E79343-CF72-43B4-A321-AE58ADEA91B1} = {D782F54C-7681-4A49-ACE6-6A68C9833973} + {D782F54C-7681-4A49-ACE6-6A68C9833973} = {225E0292-CAF3-4173-939F-843D6C99684F} + {3B773172-E0CC-405B-83D6-4A314838F718} = {3C843288-881E-47C8-AFE4-5E27CFAE1F90} + {3C843288-881E-47C8-AFE4-5E27CFAE1F90} = {225E0292-CAF3-4173-939F-843D6C99684F} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {88E9AE9C-34A3-4853-8244-9158CC50902D} 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 4d6252d76b2769..6580e0272562fa 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 @@ -33,6 +33,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Loggin EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging", "..\Microsoft.Extensions.Logging\src\Microsoft.Extensions.Logging.csproj", "{4B621745-2446-4A51-96C1-E1F9D4FCE1E3}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.SourceGeneration", "..\Microsoft.Extensions.Options\gen\Microsoft.Extensions.Options.SourceGeneration.csproj", "{97074CAA-5BD7-41F3-8E99-D6D405A3D5EA}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\ref\Microsoft.Extensions.Options.csproj", "{61F1BF49-0040-47CC-BBA9-14E80CECD6CC}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\src\Microsoft.Extensions.Options.csproj", "{9B8BD276-447B-4E93-AC2F-2F5E9E355E8C}" @@ -73,6 +75,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\Syst EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{5A956452-F322-4C4F-8689-D2B425764293}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{421CAC3B-0778-481F-8F4F-9448FE06B21B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{C4E92A10-CD1A-4D3F-A80F-C7528191CFDD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{C388A006-2F94-4E56-8504-B9D15C8713E8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{167F0F24-9BDC-45CA-B349-FDE922363367}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{3C1D15F2-0A7D-4130-B649-58B4DFA09D4D}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{AFF4CCE7-94BD-42B0-8310-8D4CD00F18D3}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{5A06587C-82E8-4B40-9C0A-DD06CB986625}" @@ -81,6 +93,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{887BF6A4-CB2 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{590E1BD9-E5AD-456B-B954-E26EA0BFE405}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{98D7969E-7743-4E1C-9AC0-BC69D3C3077D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{F0B21609-F6B0-42AD-A307-69E4CD6B5110}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{372A905D-3C3E-4A93-A052-38FB7B9E7E15}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{20D789C5-A75B-4A2D-914E-16D9E7BF51C8}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -155,6 +175,10 @@ Global {4B621745-2446-4A51-96C1-E1F9D4FCE1E3}.Debug|Any CPU.Build.0 = Debug|Any CPU {4B621745-2446-4A51-96C1-E1F9D4FCE1E3}.Release|Any CPU.ActiveCfg = Release|Any CPU {4B621745-2446-4A51-96C1-E1F9D4FCE1E3}.Release|Any CPU.Build.0 = Release|Any CPU + {97074CAA-5BD7-41F3-8E99-D6D405A3D5EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {97074CAA-5BD7-41F3-8E99-D6D405A3D5EA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {97074CAA-5BD7-41F3-8E99-D6D405A3D5EA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {97074CAA-5BD7-41F3-8E99-D6D405A3D5EA}.Release|Any CPU.Build.0 = Release|Any CPU {61F1BF49-0040-47CC-BBA9-14E80CECD6CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {61F1BF49-0040-47CC-BBA9-14E80CECD6CC}.Debug|Any CPU.Build.0 = Debug|Any CPU {61F1BF49-0040-47CC-BBA9-14E80CECD6CC}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -235,6 +259,26 @@ Global {5A956452-F322-4C4F-8689-D2B425764293}.Debug|Any CPU.Build.0 = Debug|Any CPU {5A956452-F322-4C4F-8689-D2B425764293}.Release|Any CPU.ActiveCfg = Release|Any CPU {5A956452-F322-4C4F-8689-D2B425764293}.Release|Any CPU.Build.0 = Release|Any CPU + {421CAC3B-0778-481F-8F4F-9448FE06B21B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {421CAC3B-0778-481F-8F4F-9448FE06B21B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {421CAC3B-0778-481F-8F4F-9448FE06B21B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {421CAC3B-0778-481F-8F4F-9448FE06B21B}.Release|Any CPU.Build.0 = Release|Any CPU + {C4E92A10-CD1A-4D3F-A80F-C7528191CFDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C4E92A10-CD1A-4D3F-A80F-C7528191CFDD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C4E92A10-CD1A-4D3F-A80F-C7528191CFDD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C4E92A10-CD1A-4D3F-A80F-C7528191CFDD}.Release|Any CPU.Build.0 = Release|Any CPU + {C388A006-2F94-4E56-8504-B9D15C8713E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C388A006-2F94-4E56-8504-B9D15C8713E8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C388A006-2F94-4E56-8504-B9D15C8713E8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C388A006-2F94-4E56-8504-B9D15C8713E8}.Release|Any CPU.Build.0 = Release|Any CPU + {167F0F24-9BDC-45CA-B349-FDE922363367}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {167F0F24-9BDC-45CA-B349-FDE922363367}.Debug|Any CPU.Build.0 = Debug|Any CPU + {167F0F24-9BDC-45CA-B349-FDE922363367}.Release|Any CPU.ActiveCfg = Release|Any CPU + {167F0F24-9BDC-45CA-B349-FDE922363367}.Release|Any CPU.Build.0 = Release|Any CPU + {3C1D15F2-0A7D-4130-B649-58B4DFA09D4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3C1D15F2-0A7D-4130-B649-58B4DFA09D4D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3C1D15F2-0A7D-4130-B649-58B4DFA09D4D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3C1D15F2-0A7D-4130-B649-58B4DFA09D4D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -271,12 +315,21 @@ Global {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} + {97074CAA-5BD7-41F3-8E99-D6D405A3D5EA} = {590E1BD9-E5AD-456B-B954-E26EA0BFE405} {EBF082B5-11B0-4514-BC86-F1D009382F90} = {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} + {421CAC3B-0778-481F-8F4F-9448FE06B21B} = {98D7969E-7743-4E1C-9AC0-BC69D3C3077D} + {C4E92A10-CD1A-4D3F-A80F-C7528191CFDD} = {98D7969E-7743-4E1C-9AC0-BC69D3C3077D} + {98D7969E-7743-4E1C-9AC0-BC69D3C3077D} = {20D789C5-A75B-4A2D-914E-16D9E7BF51C8} + {C388A006-2F94-4E56-8504-B9D15C8713E8} = {F0B21609-F6B0-42AD-A307-69E4CD6B5110} + {167F0F24-9BDC-45CA-B349-FDE922363367} = {F0B21609-F6B0-42AD-A307-69E4CD6B5110} + {F0B21609-F6B0-42AD-A307-69E4CD6B5110} = {20D789C5-A75B-4A2D-914E-16D9E7BF51C8} + {3C1D15F2-0A7D-4130-B649-58B4DFA09D4D} = {372A905D-3C3E-4A93-A052-38FB7B9E7E15} + {372A905D-3C3E-4A93-A052-38FB7B9E7E15} = {20D789C5-A75B-4A2D-914E-16D9E7BF51C8} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {67B715CE-2E67-4605-BFB0-CA65F345C3A5} diff --git a/src/libraries/Microsoft.Extensions.Logging.EventSource/src/Microsoft.Extensions.Logging.EventSource.csproj b/src/libraries/Microsoft.Extensions.Logging.EventSource/src/Microsoft.Extensions.Logging.EventSource.csproj index 3f4ab0080443cc..1c0dd46623db03 100644 --- a/src/libraries/Microsoft.Extensions.Logging.EventSource/src/Microsoft.Extensions.Logging.EventSource.csproj +++ b/src/libraries/Microsoft.Extensions.Logging.EventSource/src/Microsoft.Extensions.Logging.EventSource.csproj @@ -36,9 +36,6 @@ - - - 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 69282f77cfb174..f476f5edfb7e74 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 @@ -29,6 +29,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Loggin EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging", "..\Microsoft.Extensions.Logging\src\Microsoft.Extensions.Logging.csproj", "{C0A5172A-162E-4CD8-B4E4-C8AE137EBC64}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.SourceGeneration", "..\Microsoft.Extensions.Options\gen\Microsoft.Extensions.Options.SourceGeneration.csproj", "{A78E92E0-2B40-422E-A77B-E94ADE714502}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\ref\Microsoft.Extensions.Options.csproj", "{0BC6E16E-E4E8-4159-9A0B-B92C9D0CFB92}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\src\Microsoft.Extensions.Options.csproj", "{15D8CD42-77C9-4DEC-9C53-E6C6C766A646}" @@ -49,12 +51,30 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{4A46E882-070F-4EE6-B0BF-67CC1609B9D7}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{0DE6DDCB-D85C-42C3-A2C5-7DA1609CB216}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{71B91EA8-DA26-4B39-9545-52190FBA633D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{281E65FE-6C80-4051-A5A1-D762463B20F2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{55C8C54F-1661-4B41-9D98-DD6DEABD4483}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{BA16D62A-70ED-4A22-A05A-243CA692FBD2}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{C9FA428B-8564-4791-8CBF-2438F4783124}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{DFF3B3E7-DC70-46BC-8EDC-DC73CD69F7FC}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{E852D5A7-219C-4E2B-A327-6C6B988E65FC}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{05ABF419-55CC-431B-845C-9899458A3DC5}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{96C73C16-CDE9-4C23-A9E6-C22465829774}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{7626EEF9-BA57-4B2B-B6E7-1D740442A732}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{6FA64FDC-D2DB-43E4-82EC-74CBAA042BD1}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -121,6 +141,10 @@ Global {C0A5172A-162E-4CD8-B4E4-C8AE137EBC64}.Debug|Any CPU.Build.0 = Debug|Any CPU {C0A5172A-162E-4CD8-B4E4-C8AE137EBC64}.Release|Any CPU.ActiveCfg = Release|Any CPU {C0A5172A-162E-4CD8-B4E4-C8AE137EBC64}.Release|Any CPU.Build.0 = Release|Any CPU + {A78E92E0-2B40-422E-A77B-E94ADE714502}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A78E92E0-2B40-422E-A77B-E94ADE714502}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A78E92E0-2B40-422E-A77B-E94ADE714502}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A78E92E0-2B40-422E-A77B-E94ADE714502}.Release|Any CPU.Build.0 = Release|Any CPU {0BC6E16E-E4E8-4159-9A0B-B92C9D0CFB92}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0BC6E16E-E4E8-4159-9A0B-B92C9D0CFB92}.Debug|Any CPU.Build.0 = Debug|Any CPU {0BC6E16E-E4E8-4159-9A0B-B92C9D0CFB92}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -161,6 +185,26 @@ Global {4A46E882-070F-4EE6-B0BF-67CC1609B9D7}.Debug|Any CPU.Build.0 = Debug|Any CPU {4A46E882-070F-4EE6-B0BF-67CC1609B9D7}.Release|Any CPU.ActiveCfg = Release|Any CPU {4A46E882-070F-4EE6-B0BF-67CC1609B9D7}.Release|Any CPU.Build.0 = Release|Any CPU + {0DE6DDCB-D85C-42C3-A2C5-7DA1609CB216}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0DE6DDCB-D85C-42C3-A2C5-7DA1609CB216}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0DE6DDCB-D85C-42C3-A2C5-7DA1609CB216}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0DE6DDCB-D85C-42C3-A2C5-7DA1609CB216}.Release|Any CPU.Build.0 = Release|Any CPU + {71B91EA8-DA26-4B39-9545-52190FBA633D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {71B91EA8-DA26-4B39-9545-52190FBA633D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {71B91EA8-DA26-4B39-9545-52190FBA633D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {71B91EA8-DA26-4B39-9545-52190FBA633D}.Release|Any CPU.Build.0 = Release|Any CPU + {281E65FE-6C80-4051-A5A1-D762463B20F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {281E65FE-6C80-4051-A5A1-D762463B20F2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {281E65FE-6C80-4051-A5A1-D762463B20F2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {281E65FE-6C80-4051-A5A1-D762463B20F2}.Release|Any CPU.Build.0 = Release|Any CPU + {55C8C54F-1661-4B41-9D98-DD6DEABD4483}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {55C8C54F-1661-4B41-9D98-DD6DEABD4483}.Debug|Any CPU.Build.0 = Debug|Any CPU + {55C8C54F-1661-4B41-9D98-DD6DEABD4483}.Release|Any CPU.ActiveCfg = Release|Any CPU + {55C8C54F-1661-4B41-9D98-DD6DEABD4483}.Release|Any CPU.Build.0 = Release|Any CPU + {BA16D62A-70ED-4A22-A05A-243CA692FBD2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BA16D62A-70ED-4A22-A05A-243CA692FBD2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BA16D62A-70ED-4A22-A05A-243CA692FBD2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BA16D62A-70ED-4A22-A05A-243CA692FBD2}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -188,9 +232,18 @@ Global {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} + {A78E92E0-2B40-422E-A77B-E94ADE714502} = {E852D5A7-219C-4E2B-A327-6C6B988E65FC} {FC7A7BE7-332C-4970-8744-50CCBABAF0F4} = {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} + {0DE6DDCB-D85C-42C3-A2C5-7DA1609CB216} = {05ABF419-55CC-431B-845C-9899458A3DC5} + {71B91EA8-DA26-4B39-9545-52190FBA633D} = {05ABF419-55CC-431B-845C-9899458A3DC5} + {05ABF419-55CC-431B-845C-9899458A3DC5} = {6FA64FDC-D2DB-43E4-82EC-74CBAA042BD1} + {281E65FE-6C80-4051-A5A1-D762463B20F2} = {96C73C16-CDE9-4C23-A9E6-C22465829774} + {55C8C54F-1661-4B41-9D98-DD6DEABD4483} = {96C73C16-CDE9-4C23-A9E6-C22465829774} + {96C73C16-CDE9-4C23-A9E6-C22465829774} = {6FA64FDC-D2DB-43E4-82EC-74CBAA042BD1} + {BA16D62A-70ED-4A22-A05A-243CA692FBD2} = {7626EEF9-BA57-4B2B-B6E7-1D740442A732} + {7626EEF9-BA57-4B2B-B6E7-1D740442A732} = {6FA64FDC-D2DB-43E4-82EC-74CBAA042BD1} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {3375EACB-CFC1-4E7B-8A64-C346BD35E354} diff --git a/src/libraries/Microsoft.Extensions.Logging/Microsoft.Extensions.Logging.sln b/src/libraries/Microsoft.Extensions.Logging/Microsoft.Extensions.Logging.sln index 477181406d46e1..46e50f957ce78c 100644 --- a/src/libraries/Microsoft.Extensions.Logging/Microsoft.Extensions.Logging.sln +++ b/src/libraries/Microsoft.Extensions.Logging/Microsoft.Extensions.Logging.sln @@ -89,6 +89,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Option EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.ConfigurationExtensions", "..\Microsoft.Extensions.Options.ConfigurationExtensions\src\Microsoft.Extensions.Options.ConfigurationExtensions.csproj", "{02437B60-112D-49D7-8C95-6118A147CC2A}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.SourceGeneration", "..\Microsoft.Extensions.Options\gen\Microsoft.Extensions.Options.SourceGeneration.csproj", "{D5F7EDA2-2AA7-4598-AB90-45065C0FD0E2}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\ref\Microsoft.Extensions.Options.csproj", "{17CBE7CC-5614-4CEB-8498-FC81B4A0FEF6}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\src\Microsoft.Extensions.Options.csproj", "{4FAEF817-3333-4813-86FF-F0255E000F7D}" @@ -135,6 +137,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\Syst EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{34C22E86-B0A3-457D-B8D9-7CF47AAF2570}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{DEFD9E94-9CC5-4809-AA49-E6CBE529ED67}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{0B8BE486-3926-4371-A292-7739E6232614}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{238EA941-009B-4DC8-9566-A66C30A78F7B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{33A6822A-D1EC-440D-99E1-C43615C33B5A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{E5F2D216-04F6-4851-925E-5387EF12BFEE}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{5C4849A9-0DE8-4184-85B0-11FC5A0833A9}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{E70034C8-3FE8-4A9E-9D2C-569FB4AE2AD7}" @@ -143,6 +155,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D8928AB2-293 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{BCF59319-979C-42FA-9B5E-19EFCC91D288}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{B4CF32E8-EF3E-45F0-A9B6-E1BE262A3141}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{0F09DCDA-7E65-4E01-A59D-FB214455B335}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{CD32BF8E-747B-42A3-B806-C7BB15533000}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{5C0E15B5-607F-4BCD-BC07-FC59C0FC38D1}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -329,6 +349,10 @@ Global {02437B60-112D-49D7-8C95-6118A147CC2A}.Debug|Any CPU.Build.0 = Debug|Any CPU {02437B60-112D-49D7-8C95-6118A147CC2A}.Release|Any CPU.ActiveCfg = Release|Any CPU {02437B60-112D-49D7-8C95-6118A147CC2A}.Release|Any CPU.Build.0 = Release|Any CPU + {D5F7EDA2-2AA7-4598-AB90-45065C0FD0E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D5F7EDA2-2AA7-4598-AB90-45065C0FD0E2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D5F7EDA2-2AA7-4598-AB90-45065C0FD0E2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D5F7EDA2-2AA7-4598-AB90-45065C0FD0E2}.Release|Any CPU.Build.0 = Release|Any CPU {17CBE7CC-5614-4CEB-8498-FC81B4A0FEF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {17CBE7CC-5614-4CEB-8498-FC81B4A0FEF6}.Debug|Any CPU.Build.0 = Debug|Any CPU {17CBE7CC-5614-4CEB-8498-FC81B4A0FEF6}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -421,6 +445,26 @@ Global {34C22E86-B0A3-457D-B8D9-7CF47AAF2570}.Debug|Any CPU.Build.0 = Debug|Any CPU {34C22E86-B0A3-457D-B8D9-7CF47AAF2570}.Release|Any CPU.ActiveCfg = Release|Any CPU {34C22E86-B0A3-457D-B8D9-7CF47AAF2570}.Release|Any CPU.Build.0 = Release|Any CPU + {DEFD9E94-9CC5-4809-AA49-E6CBE529ED67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DEFD9E94-9CC5-4809-AA49-E6CBE529ED67}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DEFD9E94-9CC5-4809-AA49-E6CBE529ED67}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DEFD9E94-9CC5-4809-AA49-E6CBE529ED67}.Release|Any CPU.Build.0 = Release|Any CPU + {0B8BE486-3926-4371-A292-7739E6232614}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0B8BE486-3926-4371-A292-7739E6232614}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0B8BE486-3926-4371-A292-7739E6232614}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0B8BE486-3926-4371-A292-7739E6232614}.Release|Any CPU.Build.0 = Release|Any CPU + {238EA941-009B-4DC8-9566-A66C30A78F7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {238EA941-009B-4DC8-9566-A66C30A78F7B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {238EA941-009B-4DC8-9566-A66C30A78F7B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {238EA941-009B-4DC8-9566-A66C30A78F7B}.Release|Any CPU.Build.0 = Release|Any CPU + {33A6822A-D1EC-440D-99E1-C43615C33B5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {33A6822A-D1EC-440D-99E1-C43615C33B5A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {33A6822A-D1EC-440D-99E1-C43615C33B5A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {33A6822A-D1EC-440D-99E1-C43615C33B5A}.Release|Any CPU.Build.0 = Release|Any CPU + {E5F2D216-04F6-4851-925E-5387EF12BFEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E5F2D216-04F6-4851-925E-5387EF12BFEE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E5F2D216-04F6-4851-925E-5387EF12BFEE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E5F2D216-04F6-4851-925E-5387EF12BFEE}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -488,12 +532,21 @@ Global {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} + {D5F7EDA2-2AA7-4598-AB90-45065C0FD0E2} = {BCF59319-979C-42FA-9B5E-19EFCC91D288} {CDA036E5-80B8-4854-81ED-4664E203B0D0} = {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} + {DEFD9E94-9CC5-4809-AA49-E6CBE529ED67} = {B4CF32E8-EF3E-45F0-A9B6-E1BE262A3141} + {0B8BE486-3926-4371-A292-7739E6232614} = {B4CF32E8-EF3E-45F0-A9B6-E1BE262A3141} + {B4CF32E8-EF3E-45F0-A9B6-E1BE262A3141} = {5C0E15B5-607F-4BCD-BC07-FC59C0FC38D1} + {238EA941-009B-4DC8-9566-A66C30A78F7B} = {0F09DCDA-7E65-4E01-A59D-FB214455B335} + {33A6822A-D1EC-440D-99E1-C43615C33B5A} = {0F09DCDA-7E65-4E01-A59D-FB214455B335} + {0F09DCDA-7E65-4E01-A59D-FB214455B335} = {5C0E15B5-607F-4BCD-BC07-FC59C0FC38D1} + {E5F2D216-04F6-4851-925E-5387EF12BFEE} = {CD32BF8E-747B-42A3-B806-C7BB15533000} + {CD32BF8E-747B-42A3-B806-C7BB15533000} = {5C0E15B5-607F-4BCD-BC07-FC59C0FC38D1} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {B57B7C13-740F-4482-B7B6-B5E87014ACB1} diff --git a/src/libraries/Microsoft.Extensions.Logging/src/PACKAGE.md b/src/libraries/Microsoft.Extensions.Logging/src/PACKAGE.md new file mode 100644 index 00000000000000..87c2d2b79ee29d --- /dev/null +++ b/src/libraries/Microsoft.Extensions.Logging/src/PACKAGE.md @@ -0,0 +1,146 @@ +## About + + + +`Microsoft.Extensions.Logging` is combined with a core logging abstraction under `Microsoft.Extensions.Logging.Abstractions`. This abstraction is available in our basic built-in implementations like console, event log, and debug (Debug.WriteLine) logging. + +## Key Features + + + +* Provide concrete implementations of ILoggerFactory +* Provide extension methods for service collections, logger builder, and activity tracking +* Provide logging filtering extension methods for logger builder + +## How to Use + + +Prior to .NET 6, we only had two forms possible for doing logging, using `Microsoft.Extensions.Logging`: + +```cs +public class LoggingSample1 +{ + private ILogger _logger; + + public LoggingSample1(ILogger logger) + { + _logger = logger; + } + + public void LogMethod(string name) + { + _logger.LogInformation("Hello {name}", name); + } +} +``` + +Here are some problems with the LoggingSample1 sample using `LogInformation`, `LogWarning`, etc.: + +1. We can provide event ID through these APIs, but they are not required today. Which leads to bad usages in real systems that want to react or detect specific event issues being logged. +2. Parameters passed are processed before LogLevel checks; this leads to unnecessary code paths getting triggered even when logging is disabled for a log level. +3. It requires parsing of message string on every use to find templates to substitute. + +Because of these problems, the more efficient runtime approach recommended as best practices is to use LoggerMessage.Define APIs instead, illustrated below with LoggingSample2: + +```cs +public class LoggingSample2 +{ + private ILogger _logger; + + public LoggingSample2(ILogger logger) + { + _logger = logger; + } + + public void LogMethod(string name) + { + Log.LogName(_logger, name); + } + + private static class Log + { + private static readonly Action _logName = LoggerMessage.Define(LogLevel.Information, 0, @"Hello {name}"); + + public static void LogName(ILogger logger, string name) + { + _logName(logger, name, null!); + } + } +} +``` + +To reach a balance between performance and usability we added the compile-time logging source generator feature in .NET 6, to learn more about it and learn how to use a source generator to create log messages check out [this documentation](https://learn.microsoft.com/dotnet/core/extensions/logger-message-generator). + +```csharp + +public partial class InstanceLoggingExample +{ + private readonly ILogger _logger; + + public InstanceLoggingExample(ILogger logger) + { + _logger = logger; + } + + [LoggerMessage( + EventId = 0, + Level = LogLevel.Critical, + Message = "Could not open socket to `{hostName}`")] + public partial void CouldNotOpenSocket(string hostName); +} +``` + +#### Baggage and Tags for `ActivityTrackingOptions` + +.NET 5.0 exposed a new feature that allows configuring the logger builder with the `ActivityTrackingOption` to add the tracing context Span Id, Trace Id, Parent Id, Trace state, and Trace flags to the logging scope. The tracing context usually carried in `Activity.Current`. + +.NET 6.0 Preview 1 extended this feature to include more tracing context properties which are the Baggage and the Tags: + +```cs + var loggerFactory = LoggerFactory.Create(logging => + { + logging.Configure(options => + { + options.ActivityTrackingOptions = ActivityTrackingOptions.Tags | ActivityTrackingOptions.Baggage; + }).AddSimpleConsole(options => + { + options.IncludeScopes = true; + }); + }); +``` + +## Main Types + + + +The main types provided by this library are: + +* LoggingServiceCollectionExtensions +* LoggerFactory +* LoggerFactoryOptions +* LoggingBuilderExtensions +* ActivityTrackingOptions +* FilterLoggingBuilderExtensions + +## Additional Documentation + + + +* [Conceptual documentation](https://learn.microsoft.com/dotnet/core/extensions/logging) +* [API documentation](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging) + +## Related Packages + + +[Microsoft.Extensions.Logging.Abstractions](https://www.nuget.org/packages/Microsoft.Extensions.Logging.Abstractions) +[Microsoft.Extensions.Logging.Console](https://www.nuget.org/packages/Microsoft.Extensions.Logging.Console) +[Microsoft.Extensions.Logging.Debug](https://www.nuget.org/packages/Microsoft.Extensions.Logging.Debug) +[Microsoft.Extensions.Logging.EventSource](https://www.nuget.org/packages/Microsoft.Extensions.Logging.EventSource) +[Microsoft.Extensions.Logging.EventLog](https://www.nuget.org/packages/Microsoft.Extensions.Logging.EventLog) +[Microsoft.Extensions.Logging.TraceSource](https://www.nuget.org/packages/Microsoft.Extensions.Logging.TraceSource) + +## Feedback & Contributing + + + +Microsoft.Extensions.Logging is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). \ No newline at end of file diff --git a/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/Microsoft.Extensions.Options.ConfigurationExtensions.sln b/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/Microsoft.Extensions.Options.ConfigurationExtensions.sln index 47792933bec7ed..15e486ef599886 100644 --- a/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/Microsoft.Extensions.Options.ConfigurationExtensions.sln +++ b/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/Microsoft.Extensions.Options.ConfigurationExtensions.sln @@ -1,5 +1,4 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{E6903177-761B-4A40-BD67-85095C73119D}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.AsyncInterfaces", "..\Microsoft.Bcl.AsyncInterfaces\ref\Microsoft.Bcl.AsyncInterfaces.csproj", "{12321E9E-FB5F-4D8C-8F9A-C03E1862EF8B}" @@ -32,6 +31,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Option EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.ConfigurationExtensions", "src\Microsoft.Extensions.Options.ConfigurationExtensions.csproj", "{4E761C7D-24C5-430B-AD84-1634164C6AF4}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.ConfigurationExtensions.SourceGeneration.Tests", "tests\SourceGenerationTests\Microsoft.Extensions.Options.ConfigurationExtensions.SourceGeneration.Tests.csproj", "{A30F67CA-BDBF-4C1F-92F5-C41967C02F24}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.ConfigurationExtensions.UnitTests", "tests\UnitTests\Microsoft.Extensions.Options.ConfigurationExtensions.UnitTests.csproj", "{2F5EC71C-0F0C-49AE-ADD8-42753384D91F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.SourceGeneration", "..\Microsoft.Extensions.Options\gen\Microsoft.Extensions.Options.SourceGeneration.csproj", "{13292F01-310D-434D-BC4D-7E102ABE17BB}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\ref\Microsoft.Extensions.Options.csproj", "{3C4B33AA-C88E-4E36-B06D-AC8BE4FDCB5B}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\src\Microsoft.Extensions.Options.csproj", "{AAB799C3-8D63-4334-A9AE-D645EC848174}" @@ -40,12 +45,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primit EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primitives", "..\Microsoft.Extensions.Primitives\src\Microsoft.Extensions.Primitives.csproj", "{616C55BF-AE90-47F2-A005-980CADDBD990}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{A4F07FE2-F9C0-400D-A5A5-EF9A24407593}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{69B3A343-3883-4F35-8B8A-2A126A9B0762}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{9621BAB7-9AFF-4CAD-BFFF-B6BC1341155C}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{0E0027B4-8633-40E0-BB3C-6A09BA077006}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{32F49285-E4F8-486F-AF11-323D963878F5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{DF497533-79F3-46AB-9A1D-B7899A70385E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{183A92AF-23BC-4BAC-821D-152B5B22E6BA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{C7BF47CB-D4A1-42C6-B0F2-4C84850C7080}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{3467065B-1F80-427C-81C1-09114914817F}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{1FFB0A3C-B679-431A-B36B-123EE6166D14}" @@ -54,9 +67,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E6347567-2D2 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{F4006304-5C88-478E-A93C-621D71A5097F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Extensions.Options.ConfigurationExtensions.UnitTests", "tests\UnitTests\Microsoft.Extensions.Options.ConfigurationExtensions.UnitTests.csproj", "{2F5EC71C-0F0C-49AE-ADD8-42753384D91F}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{29852EC8-54F4-4C93-A9AA-D86D2B532042}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{803A30F9-9A35-41E7-8204-C53DEE990987}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Extensions.Options.ConfigurationExtensions.SourceGeneration.Tests", "tests\SourceGenerationTests\Microsoft.Extensions.Options.ConfigurationExtensions.SourceGeneration.Tests.csproj", "{A30F67CA-BDBF-4C1F-92F5-C41967C02F24}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{021C6847-732A-4B75-BE9A-97C5DBEE63BE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{5BBFEB3E-A06E-4282-AF60-E1BCBB6D1966}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -128,6 +145,18 @@ Global {4E761C7D-24C5-430B-AD84-1634164C6AF4}.Debug|Any CPU.Build.0 = Debug|Any CPU {4E761C7D-24C5-430B-AD84-1634164C6AF4}.Release|Any CPU.ActiveCfg = Release|Any CPU {4E761C7D-24C5-430B-AD84-1634164C6AF4}.Release|Any CPU.Build.0 = Release|Any CPU + {A30F67CA-BDBF-4C1F-92F5-C41967C02F24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A30F67CA-BDBF-4C1F-92F5-C41967C02F24}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A30F67CA-BDBF-4C1F-92F5-C41967C02F24}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A30F67CA-BDBF-4C1F-92F5-C41967C02F24}.Release|Any CPU.Build.0 = Release|Any CPU + {2F5EC71C-0F0C-49AE-ADD8-42753384D91F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2F5EC71C-0F0C-49AE-ADD8-42753384D91F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2F5EC71C-0F0C-49AE-ADD8-42753384D91F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2F5EC71C-0F0C-49AE-ADD8-42753384D91F}.Release|Any CPU.Build.0 = Release|Any CPU + {13292F01-310D-434D-BC4D-7E102ABE17BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {13292F01-310D-434D-BC4D-7E102ABE17BB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {13292F01-310D-434D-BC4D-7E102ABE17BB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {13292F01-310D-434D-BC4D-7E102ABE17BB}.Release|Any CPU.Build.0 = Release|Any CPU {3C4B33AA-C88E-4E36-B06D-AC8BE4FDCB5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3C4B33AA-C88E-4E36-B06D-AC8BE4FDCB5B}.Debug|Any CPU.Build.0 = Debug|Any CPU {3C4B33AA-C88E-4E36-B06D-AC8BE4FDCB5B}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -144,10 +173,6 @@ Global {616C55BF-AE90-47F2-A005-980CADDBD990}.Debug|Any CPU.Build.0 = Debug|Any CPU {616C55BF-AE90-47F2-A005-980CADDBD990}.Release|Any CPU.ActiveCfg = Release|Any CPU {616C55BF-AE90-47F2-A005-980CADDBD990}.Release|Any CPU.Build.0 = Release|Any CPU - {A4F07FE2-F9C0-400D-A5A5-EF9A24407593}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A4F07FE2-F9C0-400D-A5A5-EF9A24407593}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A4F07FE2-F9C0-400D-A5A5-EF9A24407593}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A4F07FE2-F9C0-400D-A5A5-EF9A24407593}.Release|Any CPU.Build.0 = Release|Any CPU {69B3A343-3883-4F35-8B8A-2A126A9B0762}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {69B3A343-3883-4F35-8B8A-2A126A9B0762}.Debug|Any CPU.Build.0 = Debug|Any CPU {69B3A343-3883-4F35-8B8A-2A126A9B0762}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -156,24 +181,34 @@ Global {9621BAB7-9AFF-4CAD-BFFF-B6BC1341155C}.Debug|Any CPU.Build.0 = Debug|Any CPU {9621BAB7-9AFF-4CAD-BFFF-B6BC1341155C}.Release|Any CPU.ActiveCfg = Release|Any CPU {9621BAB7-9AFF-4CAD-BFFF-B6BC1341155C}.Release|Any CPU.Build.0 = Release|Any CPU - {3D3A3D75-D40C-4FAB-8F39-23B90A6FD1EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3D3A3D75-D40C-4FAB-8F39-23B90A6FD1EB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3D3A3D75-D40C-4FAB-8F39-23B90A6FD1EB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3D3A3D75-D40C-4FAB-8F39-23B90A6FD1EB}.Release|Any CPU.Build.0 = Release|Any CPU - {2F5EC71C-0F0C-49AE-ADD8-42753384D91F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2F5EC71C-0F0C-49AE-ADD8-42753384D91F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2F5EC71C-0F0C-49AE-ADD8-42753384D91F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2F5EC71C-0F0C-49AE-ADD8-42753384D91F}.Release|Any CPU.Build.0 = Release|Any CPU - {A30F67CA-BDBF-4C1F-92F5-C41967C02F24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A30F67CA-BDBF-4C1F-92F5-C41967C02F24}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A30F67CA-BDBF-4C1F-92F5-C41967C02F24}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A30F67CA-BDBF-4C1F-92F5-C41967C02F24}.Release|Any CPU.Build.0 = Release|Any CPU + {0E0027B4-8633-40E0-BB3C-6A09BA077006}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0E0027B4-8633-40E0-BB3C-6A09BA077006}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0E0027B4-8633-40E0-BB3C-6A09BA077006}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0E0027B4-8633-40E0-BB3C-6A09BA077006}.Release|Any CPU.Build.0 = Release|Any CPU + {32F49285-E4F8-486F-AF11-323D963878F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {32F49285-E4F8-486F-AF11-323D963878F5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {32F49285-E4F8-486F-AF11-323D963878F5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {32F49285-E4F8-486F-AF11-323D963878F5}.Release|Any CPU.Build.0 = Release|Any CPU + {DF497533-79F3-46AB-9A1D-B7899A70385E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DF497533-79F3-46AB-9A1D-B7899A70385E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DF497533-79F3-46AB-9A1D-B7899A70385E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DF497533-79F3-46AB-9A1D-B7899A70385E}.Release|Any CPU.Build.0 = Release|Any CPU + {183A92AF-23BC-4BAC-821D-152B5B22E6BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {183A92AF-23BC-4BAC-821D-152B5B22E6BA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {183A92AF-23BC-4BAC-821D-152B5B22E6BA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {183A92AF-23BC-4BAC-821D-152B5B22E6BA}.Release|Any CPU.Build.0 = Release|Any CPU + {C7BF47CB-D4A1-42C6-B0F2-4C84850C7080}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C7BF47CB-D4A1-42C6-B0F2-4C84850C7080}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C7BF47CB-D4A1-42C6-B0F2-4C84850C7080}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C7BF47CB-D4A1-42C6-B0F2-4C84850C7080}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {E6903177-761B-4A40-BD67-85095C73119D} = {3467065B-1F80-427C-81C1-09114914817F} + {A30F67CA-BDBF-4C1F-92F5-C41967C02F24} = {3467065B-1F80-427C-81C1-09114914817F} + {2F5EC71C-0F0C-49AE-ADD8-42753384D91F} = {3467065B-1F80-427C-81C1-09114914817F} {12321E9E-FB5F-4D8C-8F9A-C03E1862EF8B} = {1FFB0A3C-B679-431A-B36B-123EE6166D14} {871819C7-366E-47E9-B737-ADB9715B0BCA} = {1FFB0A3C-B679-431A-B36B-123EE6166D14} {3C53F87D-1638-4F8B-99E0-5FDA13A5AEC2} = {1FFB0A3C-B679-431A-B36B-123EE6166D14} @@ -193,12 +228,17 @@ Global {AAB799C3-8D63-4334-A9AE-D645EC848174} = {E6347567-2D24-4E99-8F15-3657FF95AB6D} {616C55BF-AE90-47F2-A005-980CADDBD990} = {E6347567-2D24-4E99-8F15-3657FF95AB6D} {8F355290-0867-40A2-8F92-E9A3C5F5BAAF} = {F4006304-5C88-478E-A93C-621D71A5097F} - {A4F07FE2-F9C0-400D-A5A5-EF9A24407593} = {F4006304-5C88-478E-A93C-621D71A5097F} + {13292F01-310D-434D-BC4D-7E102ABE17BB} = {F4006304-5C88-478E-A93C-621D71A5097F} {69B3A343-3883-4F35-8B8A-2A126A9B0762} = {F4006304-5C88-478E-A93C-621D71A5097F} {9621BAB7-9AFF-4CAD-BFFF-B6BC1341155C} = {F4006304-5C88-478E-A93C-621D71A5097F} - {3D3A3D75-D40C-4FAB-8F39-23B90A6FD1EB} = {3467065B-1F80-427C-81C1-09114914817F} - {2F5EC71C-0F0C-49AE-ADD8-42753384D91F} = {3467065B-1F80-427C-81C1-09114914817F} - {A30F67CA-BDBF-4C1F-92F5-C41967C02F24} = {3467065B-1F80-427C-81C1-09114914817F} + {0E0027B4-8633-40E0-BB3C-6A09BA077006} = {29852EC8-54F4-4C93-A9AA-D86D2B532042} + {32F49285-E4F8-486F-AF11-323D963878F5} = {29852EC8-54F4-4C93-A9AA-D86D2B532042} + {29852EC8-54F4-4C93-A9AA-D86D2B532042} = {5BBFEB3E-A06E-4282-AF60-E1BCBB6D1966} + {DF497533-79F3-46AB-9A1D-B7899A70385E} = {803A30F9-9A35-41E7-8204-C53DEE990987} + {183A92AF-23BC-4BAC-821D-152B5B22E6BA} = {803A30F9-9A35-41E7-8204-C53DEE990987} + {803A30F9-9A35-41E7-8204-C53DEE990987} = {5BBFEB3E-A06E-4282-AF60-E1BCBB6D1966} + {C7BF47CB-D4A1-42C6-B0F2-4C84850C7080} = {021C6847-732A-4B75-BE9A-97C5DBEE63BE} + {021C6847-732A-4B75-BE9A-97C5DBEE63BE} = {5BBFEB3E-A06E-4282-AF60-E1BCBB6D1966} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {3A661B81-588D-49A6-A245-E9B7EA9C3FE4} diff --git a/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/ref/Microsoft.Extensions.Options.ConfigurationExtensions.csproj b/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/ref/Microsoft.Extensions.Options.ConfigurationExtensions.csproj index 1c3449e5735322..67ab4702f5b137 100644 --- a/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/ref/Microsoft.Extensions.Options.ConfigurationExtensions.csproj +++ b/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/ref/Microsoft.Extensions.Options.ConfigurationExtensions.csproj @@ -1,4 +1,5 @@ + $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) @@ -11,9 +12,6 @@ - - - @@ -24,4 +22,5 @@ + diff --git a/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/src/Microsoft.Extensions.Options.ConfigurationExtensions.csproj b/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/src/Microsoft.Extensions.Options.ConfigurationExtensions.csproj index 6a94f1a4e81f75..7ebe9baf9402c9 100644 --- a/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/src/Microsoft.Extensions.Options.ConfigurationExtensions.csproj +++ b/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/src/Microsoft.Extensions.Options.ConfigurationExtensions.csproj @@ -11,18 +11,14 @@ - + - - - - diff --git a/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/src/PACKAGE.md b/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/src/PACKAGE.md new file mode 100644 index 00000000000000..c893fd4f0e3204 --- /dev/null +++ b/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/src/PACKAGE.md @@ -0,0 +1,145 @@ +## About + +`Microsoft.Extensions.Options.ConfigurationExtensions` provides additional configuration-specific functionality related to Options. + +## Key Features + +* Extension methods for OptionsBuilder for configuration binding +* Extension methods for IServiceCollection for Options configuration +* ConfigurationChangeTokenSource for monitoring configuration changes + +## How to Use + +#### Options Configuration binding + +```csharp +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Options; + +class Program +{ + // appsettings.json contents: + // { + // "MyOptions": { + // "Setting1": "Value1", + // "Setting2": "Value2" + // } + // } + + static void Main(string[] args) + { + IConfiguration configuration = new ConfigurationBuilder() + .SetBasePath(Environment.CurrentDirectory) + .AddJsonFile("appsettings.json") + .Build(); + + IServiceCollection services = new ServiceCollection(); + + // Bind the configuration to MyOptions + services.Configure(configuration.GetSection("MyOptions")); + + IServiceProvider serviceProvider = services.BuildServiceProvider(); + + // Retrieve MyOptions using dependency injection + var myOptions = serviceProvider.GetRequiredService>().Value; + + // Access the bound configuration values + Console.WriteLine($"Setting1: {myOptions.Setting1}"); + Console.WriteLine($"Setting2: {myOptions.Setting2}"); + } +} + +public class MyOptions +{ + public string Setting1 { get; set; } + public string Setting2 { get; set; } +} + +``` + +#### Monitoring options configuration changes + +```csharp +// Assume we have a class that represents some options +public class MyOptions +{ + public string Name { get; set; } + public int Age { get; set; } +} + +// appsettings.json contents: +// { +// "MyOptions": { +// "Name": "Alice", +// "Age": 25 +// } +// } + +// Assume we have a configuration object that contains some settings +var config = new ConfigurationBuilder() + .AddJsonFile("appsettings.json") + .Build(); + +// We can use the ConfigurationChangeTokenSource to create a change token source for the options +var changeTokenSource = new ConfigurationChangeTokenSource(config.GetSection("MyOptions")); + +// We can register the change token source with the options monitor +services.AddOptions() + .Configure(options => + { + // Configure the options with the configuration values + config.GetSection("MyOptions").Bind(options); + }) + .AddChangeTokenSource(changeTokenSource); + +// Now we can inject the options monitor into any class that needs them +public class MyClass +{ + private readonly IOptionsMonitor _optionsMonitor; + + public MyClass(IOptionsMonitor optionsMonitor) + { + _optionsMonitor = optionsMonitor; + } + + public void DoSomething() + { + // Can access the current options value like this + var options = _optionsMonitor.CurrentValue; + var name = options.Name; + var age = options.Age; + // Do something with name and age + + // Can also register a callback to be notified when the options change + _optionsMonitor.OnChange(newOptions => + { + // Do something when the options change + }); + } +} + +``` + +## Main Types + +The main types provided by this library are: + +* `ConfigurationChangeTokenSource` +* `OptionsBuilderConfigurationExtensions` +* `OptionsConfigurationServiceCollectionExtensions` + +## Additional Documentation + +* [Conceptual documentation](https://learn.microsoft.com/aspnet/core/fundamentals/configuration/options) +* [API documentation](https://learn.microsoft.com/dotnet/api/microsoft.extensions.options) + +## Related Packages + +* [Microsoft.Extensions.Options](https://www.nuget.org/packages/Microsoft.Extensions.Options) +* [Microsoft.Extensions.Configuration](https://www.nuget.org/packages/Microsoft.Extensions.Configuration) +* [Microsoft.Extensions.DependencyInjection](https://www.nuget.org/packages/Microsoft.Extensions.DependencyInjection) + +## Feedback & Contributing + +Microsoft.Extensions.Options.ConfigurationExtensions is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). \ No newline at end of file diff --git a/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/tests/Common/ConfigurationExtensionsTests.cs b/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/tests/Common/ConfigurationExtensionsTests.cs new file mode 100644 index 00000000000000..8c76472a2c339b --- /dev/null +++ b/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/tests/Common/ConfigurationExtensionsTests.cs @@ -0,0 +1,76 @@ +// 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 Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Xunit; + +namespace Microsoft.Extensions.Options.ConfigurationExtensions.Tests +{ + public partial class ConfigurationExtensionsTests + { + private static IConfiguration s_emptyConfig { get; } = new ConfigurationBuilder().Build(); + + [Fact] + public void TestNullHandling_OptionsBuilderExt_Bind() + { + // Null options builder. + OptionsBuilder? optionsBuilder = null; + Assert.Throws(() => optionsBuilder!.Bind(s_emptyConfig)); + Assert.Throws(() => optionsBuilder!.Bind(s_emptyConfig, _ => { })); + + // Null configuration. + optionsBuilder = CreateOptionsBuilder(); + Assert.Throws(() => optionsBuilder.Bind(config: null!)); + Assert.Throws(() => optionsBuilder.Bind(config: null!, _ => { })); + + // Null configureBinder. + optionsBuilder.Bind(s_emptyConfig, configureBinder: null); + } + + [Fact] + public void TestNullHandling_OptionsBuilderExt_BindConfiguration() + { + // Null options builder. + string configSectionPath = "FakeSectionPath"; + OptionsBuilder? optionsBuilder = null; + Assert.Throws(() => optionsBuilder!.BindConfiguration(configSectionPath)); + + // Null config section path. + optionsBuilder = CreateOptionsBuilder(); + Assert.Throws(() => optionsBuilder.BindConfiguration(configSectionPath: null!)); + + // Null configureBinder. + optionsBuilder.BindConfiguration(configSectionPath, configureBinder: null); + } + + [Fact] + public void TestNullHandling_IServiceCollectionExt_Configure() + { + // Null services + IServiceCollection? services = null; + string name = "Name"; + Assert.Throws(() => services!.Configure(s_emptyConfig)); + Assert.Throws(() => services!.Configure(name, s_emptyConfig)); + + // Null config. + services = new ServiceCollection(); + Assert.Throws(() => services.Configure(config: null!)); + Assert.Throws(() => services.Configure(name, config: null!)); + + // Null name. + services.Configure(name: null!, s_emptyConfig); + + // Null configureBinder. + services.Configure(s_emptyConfig, configureBinder: null); + services.Configure(name, s_emptyConfig, configureBinder: null); + } + + private static OptionsBuilder CreateOptionsBuilder() + { + var services = new ServiceCollection(); + return new OptionsBuilder(services, Options.DefaultName); + } + } +} diff --git a/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/tests/Common/OptionsBuilderConfigurationExtensionsTests.cs b/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/tests/Common/OptionsBuilderConfigurationExtensionsTests.cs index 6d1d4a018f097e..d90122ef74d8bc 100644 --- a/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/tests/Common/OptionsBuilderConfigurationExtensionsTests.cs +++ b/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/tests/Common/OptionsBuilderConfigurationExtensionsTests.cs @@ -31,7 +31,8 @@ public static void BindConfiguration_ThrowsForNullConfigurationSectionPath() Assert.Throws("configSectionPath", () => { - optionsBuilder.BindConfiguration(configSectionPath); + optionsBuilder + .BindConfiguration(configSectionPath); }); } @@ -170,8 +171,8 @@ public static void BindConfiguration_UpdatesOptionOnConfigurationUpdate() services.AddSingleton(new ConfigurationBuilder() .Add(configSource) .Build()); - OptionsBuilder optionsBuilder = services.AddOptions(); - _ = optionsBuilder.BindConfiguration(configSectionName); + _ = services.AddOptions() + .BindConfiguration(configSectionName); using ServiceProvider serviceProvider = services.BuildServiceProvider(); var optionsMonitor = serviceProvider.GetRequiredService>(); bool updateHasRun = false; diff --git a/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/tests/SourceGenerationTests/ConfigurationExtensionsTest.Generator.cs b/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/tests/SourceGenerationTests/ConfigurationExtensionsTest.Generator.cs new file mode 100644 index 00000000000000..9b3aff8c495a77 --- /dev/null +++ b/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/tests/SourceGenerationTests/ConfigurationExtensionsTest.Generator.cs @@ -0,0 +1,177 @@ +// 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 Xunit; + +namespace Microsoft.Extensions.Options.ConfigurationExtensions.Tests +{ + public partial class ConfigurationExtensionsTests + { + // These are regression tests for https://github.com/dotnet/runtime/issues/90851 + // Source Generator Interceptors rely on identifying an accurate invocation + // source location (line and character positions). These tests cover newline + // and whitespace scenarios to ensure the interceptors get wired up correctly. + + [Fact] + public void TestBindingInvocationsWithNewlines_BindExtension() + { + OptionsBuilder? optionsBuilder = CreateOptionsBuilder(); + + // Newline between instance and invocation using configureBinder argument (with the dot on the first line) + optionsBuilder. + Bind(s_emptyConfig, configureBinder: null); + + // Newline between instance and invocation using configureBinder argument (with the dot on the second line) + optionsBuilder + .Bind(s_emptyConfig, configureBinder: null); + + // Newline between instance and invocation (with the dot on the first line) + optionsBuilder. + Bind(s_emptyConfig); + + // Newline between instance and invocation (with the dot on the second line) + optionsBuilder + .Bind(s_emptyConfig); + + // Newlines in every place possible + optionsBuilder + . + Bind + ( + s_emptyConfig + , + configureBinder + : + null + ) + ; + } + + [Fact] + public void TestBindingInvocationsWithNewlines_BindConfigurationExtension() + { + OptionsBuilder? optionsBuilder = CreateOptionsBuilder(); + + // Newline between instance and invocation using configureBinder argument (with the dot on the first line) + optionsBuilder. + BindConfiguration(configSectionPath: "path", + _ => { }); + + // Newline between instance and invocation using configureBinder argument (with the dot on the second line) + optionsBuilder + .BindConfiguration(configSectionPath: "path", + _ => { }); + + // Newlines between the instance and invocation and within the arguments. No indentation before invocation. + optionsBuilder. + BindConfiguration( + configSectionPath: "path", + _ => { }); + + // Newlines in every place possible + optionsBuilder + . + BindConfiguration + ( + configSectionPath + : + "path" + , + _ + => + { + } + ) + ; + } + + [Fact] + public void TestBindingInvocationsWithNewlines_ConfigureExtension() + { + OptionsBuilder? optionsBuilder = CreateOptionsBuilder(); + IServiceCollection services = new ServiceCollection(); + + // Newlines between each method call + services + .Configure(s_emptyConfig) + .AddOptions(); + + // Newlines in every place possible + services + . + Configure + < + FakeOptions + > + ( + name + : + null! + , + s_emptyConfig + ) + ; + } + + [Fact] + public void TestBindingInvocationsWithNewlines_StaticCalls() + { + OptionsBuilder? optionsBuilder = CreateOptionsBuilder(); + IServiceCollection services = new ServiceCollection(); + + // Bind: Newlines in every place possible + OptionsBuilderConfigurationExtensions + . + Bind + ( + optionsBuilder + , + s_emptyConfig + ) + ; + + // // BindConfiguration: Newlines in every place possible + OptionsBuilderConfigurationExtensions + . + BindConfiguration + ( + optionsBuilder + , + "path" + ); + + // Configure: Newlines in every place possible + OptionsConfigurationServiceCollectionExtensions + . + Configure + < + FakeOptions + > + ( + services + , + s_emptyConfig + ) + ; + } + + [Fact] + public void TestBindAndConfigureWithNamedParameters() + { + OptionsBuilder? optionsBuilder = CreateOptionsBuilder(); + IServiceCollection services = new ServiceCollection(); + + OptionsBuilderConfigurationExtensions.Bind(config: s_emptyConfig, optionsBuilder: optionsBuilder); + OptionsBuilderConfigurationExtensions.Bind(configureBinder: _ => { }, config: s_emptyConfig, optionsBuilder: optionsBuilder); + + OptionsBuilderConfigurationExtensions.BindConfiguration(configureBinder: _ => { }, configSectionPath: "path", optionsBuilder: optionsBuilder); + + OptionsConfigurationServiceCollectionExtensions.Configure(config: s_emptyConfig, services: services); + OptionsConfigurationServiceCollectionExtensions.Configure(name: "", config: s_emptyConfig, services: services); + OptionsConfigurationServiceCollectionExtensions.Configure(configureBinder: _ => { }, config: s_emptyConfig, services: services); + OptionsConfigurationServiceCollectionExtensions.Configure(name: "", configureBinder: _ => { }, config: s_emptyConfig, services: services); + } + } +} diff --git a/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/tests/SourceGenerationTests/Microsoft.Extensions.Options.ConfigurationExtensions.SourceGeneration.Tests.csproj b/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/tests/SourceGenerationTests/Microsoft.Extensions.Options.ConfigurationExtensions.SourceGeneration.Tests.csproj index 0676fddc289826..2bdacc95ff39e6 100644 --- a/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/tests/SourceGenerationTests/Microsoft.Extensions.Options.ConfigurationExtensions.SourceGeneration.Tests.csproj +++ b/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/tests/SourceGenerationTests/Microsoft.Extensions.Options.ConfigurationExtensions.SourceGeneration.Tests.csproj @@ -4,6 +4,8 @@ $(NetCoreAppCurrent);$(NetFrameworkMinimum) $(DefineConstants);BUILDING_SOURCE_GENERATOR_TESTS;ROSLYN4_0_OR_GREATER;ROSLYN4_4_OR_GREATER $(Features);InterceptorsPreview + + $(InterceptorsPreviewNamespaces);Microsoft.Extensions.Configuration.Binder.SourceGeneration true true @@ -20,10 +22,12 @@ + - + + diff --git a/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/tests/UnitTests/Microsoft.Extensions.Options.ConfigurationExtensions.UnitTests.csproj b/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/tests/UnitTests/Microsoft.Extensions.Options.ConfigurationExtensions.UnitTests.csproj index 3a5db72bf30f7d..512e0018a400c0 100644 --- a/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/tests/UnitTests/Microsoft.Extensions.Options.ConfigurationExtensions.UnitTests.csproj +++ b/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/tests/UnitTests/Microsoft.Extensions.Options.ConfigurationExtensions.UnitTests.csproj @@ -16,10 +16,11 @@ + - + \ No newline at end of file diff --git a/src/libraries/Microsoft.Extensions.Options.DataAnnotations/Microsoft.Extensions.Options.DataAnnotations.sln b/src/libraries/Microsoft.Extensions.Options.DataAnnotations/Microsoft.Extensions.Options.DataAnnotations.sln index d715b3d075d4c9..9c550cb81b04f4 100644 --- a/src/libraries/Microsoft.Extensions.Options.DataAnnotations/Microsoft.Extensions.Options.DataAnnotations.sln +++ b/src/libraries/Microsoft.Extensions.Options.DataAnnotations/Microsoft.Extensions.Options.DataAnnotations.sln @@ -11,6 +11,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Option EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.DataAnnotations", "src\Microsoft.Extensions.Options.DataAnnotations.csproj", "{9022313F-BEEA-426E-8185-096E0516D1B6}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.SourceGeneration", "..\Microsoft.Extensions.Options\gen\Microsoft.Extensions.Options.SourceGeneration.csproj", "{AE2D1BFD-FD06-4227-98A7-14604F9D0EFC}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\ref\Microsoft.Extensions.Options.csproj", "{8F8A5D2D-A829-4E0E-9DCC-57FF2C89C544}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "..\Microsoft.Extensions.Options\src\Microsoft.Extensions.Options.csproj", "{72D4F48A-A93B-471F-B9C7-64BC9BF22A09}" @@ -19,18 +21,34 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primit EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primitives", "..\Microsoft.Extensions.Primitives\src\Microsoft.Extensions.Primitives.csproj", "{065B4B16-B618-41D8-B1DE-F31AFC9E6C84}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{E0E82350-04CF-40E3-AE98-54F5F7F55F6E}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{47E4AB7D-BC64-4323-B723-CD2B7DA9BB88}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{BBFDDC90-8F98-4DD7-8A18-8E2345C18904}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{78B102D5-FBC0-4304-B14D-D6CFF50A30DA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{D7C772DD-9024-422B-BFBF-BB1F943FC50F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{5DA74E5E-D6D2-4B8C-A628-F71F752764B5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{43AC8A36-3FA3-4756-B373-6D3A4BE66E6E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{C4BCAFFB-8697-47CA-9BAF-7834E4785C56}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{DE5517CB-9721-49A0-9ECB-BC08460946AC}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A3B06CF1-069F-41FF-89BB-9BAEEC5B0FF6}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{5B543880-D43D-48B8-9C46-CEE391D03B73}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{237F45C3-B835-4C47-A298-604D5BFC60DC}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{7BBDC2A5-AD5A-49CC-B548-F1E2BC4B192C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{C02550C2-AE19-4F57-B3A3-B46343F45433}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{B330B03E-004E-4696-91B0-0F8E2644AEE0}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -61,6 +79,10 @@ Global {9022313F-BEEA-426E-8185-096E0516D1B6}.Debug|Any CPU.Build.0 = Debug|Any CPU {9022313F-BEEA-426E-8185-096E0516D1B6}.Release|Any CPU.ActiveCfg = Release|Any CPU {9022313F-BEEA-426E-8185-096E0516D1B6}.Release|Any CPU.Build.0 = Release|Any CPU + {AE2D1BFD-FD06-4227-98A7-14604F9D0EFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AE2D1BFD-FD06-4227-98A7-14604F9D0EFC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AE2D1BFD-FD06-4227-98A7-14604F9D0EFC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AE2D1BFD-FD06-4227-98A7-14604F9D0EFC}.Release|Any CPU.Build.0 = Release|Any CPU {8F8A5D2D-A829-4E0E-9DCC-57FF2C89C544}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8F8A5D2D-A829-4E0E-9DCC-57FF2C89C544}.Debug|Any CPU.Build.0 = Debug|Any CPU {8F8A5D2D-A829-4E0E-9DCC-57FF2C89C544}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -77,10 +99,6 @@ Global {065B4B16-B618-41D8-B1DE-F31AFC9E6C84}.Debug|Any CPU.Build.0 = Debug|Any CPU {065B4B16-B618-41D8-B1DE-F31AFC9E6C84}.Release|Any CPU.ActiveCfg = Release|Any CPU {065B4B16-B618-41D8-B1DE-F31AFC9E6C84}.Release|Any CPU.Build.0 = Release|Any CPU - {E0E82350-04CF-40E3-AE98-54F5F7F55F6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E0E82350-04CF-40E3-AE98-54F5F7F55F6E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E0E82350-04CF-40E3-AE98-54F5F7F55F6E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E0E82350-04CF-40E3-AE98-54F5F7F55F6E}.Release|Any CPU.Build.0 = Release|Any CPU {47E4AB7D-BC64-4323-B723-CD2B7DA9BB88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {47E4AB7D-BC64-4323-B723-CD2B7DA9BB88}.Debug|Any CPU.Build.0 = Debug|Any CPU {47E4AB7D-BC64-4323-B723-CD2B7DA9BB88}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -89,6 +107,26 @@ Global {BBFDDC90-8F98-4DD7-8A18-8E2345C18904}.Debug|Any CPU.Build.0 = Debug|Any CPU {BBFDDC90-8F98-4DD7-8A18-8E2345C18904}.Release|Any CPU.ActiveCfg = Release|Any CPU {BBFDDC90-8F98-4DD7-8A18-8E2345C18904}.Release|Any CPU.Build.0 = Release|Any CPU + {78B102D5-FBC0-4304-B14D-D6CFF50A30DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {78B102D5-FBC0-4304-B14D-D6CFF50A30DA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {78B102D5-FBC0-4304-B14D-D6CFF50A30DA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {78B102D5-FBC0-4304-B14D-D6CFF50A30DA}.Release|Any CPU.Build.0 = Release|Any CPU + {D7C772DD-9024-422B-BFBF-BB1F943FC50F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D7C772DD-9024-422B-BFBF-BB1F943FC50F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D7C772DD-9024-422B-BFBF-BB1F943FC50F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D7C772DD-9024-422B-BFBF-BB1F943FC50F}.Release|Any CPU.Build.0 = Release|Any CPU + {5DA74E5E-D6D2-4B8C-A628-F71F752764B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5DA74E5E-D6D2-4B8C-A628-F71F752764B5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5DA74E5E-D6D2-4B8C-A628-F71F752764B5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5DA74E5E-D6D2-4B8C-A628-F71F752764B5}.Release|Any CPU.Build.0 = Release|Any CPU + {43AC8A36-3FA3-4756-B373-6D3A4BE66E6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {43AC8A36-3FA3-4756-B373-6D3A4BE66E6E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {43AC8A36-3FA3-4756-B373-6D3A4BE66E6E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {43AC8A36-3FA3-4756-B373-6D3A4BE66E6E}.Release|Any CPU.Build.0 = Release|Any CPU + {C4BCAFFB-8697-47CA-9BAF-7834E4785C56}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C4BCAFFB-8697-47CA-9BAF-7834E4785C56}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C4BCAFFB-8697-47CA-9BAF-7834E4785C56}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C4BCAFFB-8697-47CA-9BAF-7834E4785C56}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -104,9 +142,17 @@ Global {9022313F-BEEA-426E-8185-096E0516D1B6} = {A3B06CF1-069F-41FF-89BB-9BAEEC5B0FF6} {72D4F48A-A93B-471F-B9C7-64BC9BF22A09} = {A3B06CF1-069F-41FF-89BB-9BAEEC5B0FF6} {065B4B16-B618-41D8-B1DE-F31AFC9E6C84} = {A3B06CF1-069F-41FF-89BB-9BAEEC5B0FF6} - {E0E82350-04CF-40E3-AE98-54F5F7F55F6E} = {5B543880-D43D-48B8-9C46-CEE391D03B73} + {AE2D1BFD-FD06-4227-98A7-14604F9D0EFC} = {5B543880-D43D-48B8-9C46-CEE391D03B73} {47E4AB7D-BC64-4323-B723-CD2B7DA9BB88} = {5B543880-D43D-48B8-9C46-CEE391D03B73} {BBFDDC90-8F98-4DD7-8A18-8E2345C18904} = {5B543880-D43D-48B8-9C46-CEE391D03B73} + {78B102D5-FBC0-4304-B14D-D6CFF50A30DA} = {237F45C3-B835-4C47-A298-604D5BFC60DC} + {D7C772DD-9024-422B-BFBF-BB1F943FC50F} = {237F45C3-B835-4C47-A298-604D5BFC60DC} + {237F45C3-B835-4C47-A298-604D5BFC60DC} = {B330B03E-004E-4696-91B0-0F8E2644AEE0} + {5DA74E5E-D6D2-4B8C-A628-F71F752764B5} = {7BBDC2A5-AD5A-49CC-B548-F1E2BC4B192C} + {43AC8A36-3FA3-4756-B373-6D3A4BE66E6E} = {7BBDC2A5-AD5A-49CC-B548-F1E2BC4B192C} + {7BBDC2A5-AD5A-49CC-B548-F1E2BC4B192C} = {B330B03E-004E-4696-91B0-0F8E2644AEE0} + {C4BCAFFB-8697-47CA-9BAF-7834E4785C56} = {C02550C2-AE19-4F57-B3A3-B46343F45433} + {C02550C2-AE19-4F57-B3A3-B46343F45433} = {B330B03E-004E-4696-91B0-0F8E2644AEE0} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {976CC898-9F51-4F78-825C-EF31520CD788} diff --git a/src/libraries/Microsoft.Extensions.Options.DataAnnotations/src/DataAnnotationValidateOptions.cs b/src/libraries/Microsoft.Extensions.Options.DataAnnotations/src/DataAnnotationValidateOptions.cs index e8f4b606882cf9..5b734edf32738c 100644 --- a/src/libraries/Microsoft.Extensions.Options.DataAnnotations/src/DataAnnotationValidateOptions.cs +++ b/src/libraries/Microsoft.Extensions.Options.DataAnnotations/src/DataAnnotationValidateOptions.cs @@ -95,7 +95,8 @@ private static bool TryValidateOptions(object options, string qualifiedName, Lis foreach (PropertyInfo propertyInfo in options.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public)) { - if (propertyInfo.GetMethod is null) + // Indexers are properties which take parameters. Ignore them. + if (propertyInfo.GetMethod is null || propertyInfo.GetMethod.GetParameters().Length > 0) { continue; } diff --git a/src/libraries/Microsoft.Extensions.Options/Microsoft.Extensions.Options.sln b/src/libraries/Microsoft.Extensions.Options/Microsoft.Extensions.Options.sln index 3935bd84d4004e..f573db34f03047 100644 --- a/src/libraries/Microsoft.Extensions.Options/Microsoft.Extensions.Options.sln +++ b/src/libraries/Microsoft.Extensions.Options/Microsoft.Extensions.Options.sln @@ -47,6 +47,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Depend EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyInjection", "..\Microsoft.Extensions.DependencyInjection\src\Microsoft.Extensions.DependencyInjection.csproj", "{250B3EA5-65A4-4D62-B0F9-5BAAFE53BD7A}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics.Abstractions", "..\Microsoft.Extensions.Diagnostics.Abstractions\ref\Microsoft.Extensions.Diagnostics.Abstractions.csproj", "{E0E112CC-3B5C-46AC-9541-D53BB36FB1E2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics.Abstractions", "..\Microsoft.Extensions.Diagnostics.Abstractions\src\Microsoft.Extensions.Diagnostics.Abstractions.csproj", "{8E120FF0-27B9-4DE0-85FA-B0BE18867898}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics", "..\Microsoft.Extensions.Diagnostics\ref\Microsoft.Extensions.Diagnostics.csproj", "{EFDDE3C6-3CBC-480B-AA19-0C93913DB53A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Diagnostics", "..\Microsoft.Extensions.Diagnostics\src\Microsoft.Extensions.Diagnostics.csproj", "{5E97D652-E1A3-46CF-B577-C1216A9FD079}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.FileProviders.Abstractions", "..\Microsoft.Extensions.FileProviders.Abstractions\ref\Microsoft.Extensions.FileProviders.Abstractions.csproj", "{05161D6B-0451-43B9-B648-71B7628F2A78}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.FileProviders.Abstractions", "..\Microsoft.Extensions.FileProviders.Abstractions\src\Microsoft.Extensions.FileProviders.Abstractions.csproj", "{6A4A1183-A0CF-4270-8EF9-12018D9DADB9}" @@ -109,12 +117,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Option EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.DataAnnotations", "..\Microsoft.Extensions.Options.DataAnnotations\src\Microsoft.Extensions.Options.DataAnnotations.csproj", "{3A6E2FA4-B745-4E4B-A82E-98CAD1177E77}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.SourceGeneration", "gen\Microsoft.Extensions.Options.SourceGeneration.csproj", "{2B8ED012-22B5-47DD-A879-FD2AFD4C067D}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "ref\Microsoft.Extensions.Options.csproj", "{D0CAEF2C-FB83-4C32-80BD-1F516AD13FAA}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options", "src\Microsoft.Extensions.Options.csproj", "{9BA945E7-0970-4CA2-A54B-F8D9B3E69917}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.SourceGeneration", "gen\Microsoft.Extensions.Options.SourceGeneration.csproj", "{2B8ED012-22B5-47DD-A879-FD2AFD4C067D}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.Tests", "tests\Microsoft.Extensions.Options.Tests\Microsoft.Extensions.Options.Tests.csproj", "{94CAA850-ABDB-4A1E-B18B-19DA0DE75CFD}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Options.SourceGeneration.Unit.Tests", "tests\SourceGeneration.Unit.Tests\Microsoft.Extensions.Options.SourceGeneration.Unit.Tests.csproj", "{D3B6805B-F10E-4A19-99FC-55506892BC18}" @@ -127,10 +135,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primit EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Collections.Concurrent", "..\System.Collections.Concurrent\ref\System.Collections.Concurrent.csproj", "{3CE1FDFB-3BFD-463E-AC82-4E5302F0AB2F}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Collections.NonGeneric", "..\System.Collections.NonGeneric\ref\System.Collections.NonGeneric.csproj", "{CF8F7B21-6C98-4390-8E94-653587E2B084}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Collections", "..\System.Collections\ref\System.Collections.csproj", "{6AE427EF-C018-4075-A4C8-BF3831C5F88C}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ComponentModel.Annotations", "..\System.ComponentModel.Annotations\ref\System.ComponentModel.Annotations.csproj", "{173C1D16-0E90-480C-8A37-0322F86F9B25}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ComponentModel.Annotations", "..\System.ComponentModel.Annotations\src\System.ComponentModel.Annotations.csproj", "{90548F7B-C673-42C9-BD88-A6E6550ECE1C}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ComponentModel.Primitives", "..\System.ComponentModel.Primitives\ref\System.ComponentModel.Primitives.csproj", "{90349C97-F971-47ED-B25C-E3379E317268}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ComponentModel.TypeConverter", "..\System.ComponentModel.TypeConverter\ref\System.ComponentModel.TypeConverter.csproj", "{7D765777-8952-4728-AE5D-4493A5BC0C08}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ComponentModel", "..\System.ComponentModel\ref\System.ComponentModel.csproj", "{51F8FF5B-9CC9-4205-BB61-A968962D917F}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.DiagnosticSource", "..\System.Diagnostics.DiagnosticSource\ref\System.Diagnostics.DiagnosticSource.csproj", "{6A1A3AFF-C018-498A-80A0-532396132AD5}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.DiagnosticSource", "..\System.Diagnostics.DiagnosticSource\src\System.Diagnostics.DiagnosticSource.csproj", "{429C9D71-4BBD-489D-9C86-EC240F652008}" @@ -143,6 +161,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.EventLog EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Memory", "..\System.Memory\ref\System.Memory.csproj", "{990280EA-CDBD-480A-8224-DBCBA8B6D6DB}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ObjectModel", "..\System.ObjectModel\ref\System.ObjectModel.csproj", "{00A79938-3E8B-430F-8F02-B1FD88CDF2E6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Resources.Writer", "..\System.Resources.Writer\ref\System.Resources.Writer.csproj", "{E71C107F-4371-4BCF-A387-3CAF90653173}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{62065BFE-5477-44DD-A328-582B0F050EC3}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{02425B61-8D98-4F4A-88AE-F77D4837DF9E}" @@ -165,6 +187,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\Syst EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{D7CEC738-5D2D-4FCB-9268-9650EB01BF31}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{87219539-82DC-4605-BFFA-69547203AEB3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{401090CE-81C8-4C6C-8F12-DF962AE8CB1C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{B21B1C26-B5FD-4A30-B8C9-69DE311B6F03}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{6D9421F9-E06A-4984-AD31-C587A6200CF7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{759C53AF-4A71-475D-96C1-418D99CF636F}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{7C1317AA-5F4C-42A4-80F3-856BA5E204AF}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{72A090A3-FE14-4F4E-B266-EFFB5C736462}" @@ -173,6 +205,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{7028EE0A-D31 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{C25891DB-FBAC-4B92-9BB9-A8181B5A0EF1}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{EEA4A938-C9F5-45E5-BF34-AA10FFC34377}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{7B675C35-5AB4-45A8-A5DF-32A2B586C070}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{C0B95665-ADCD-477C-83C5-8CF7FB2C9093}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{93E96311-7199-450E-B6DD-C295A09EA7AF}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -275,6 +315,22 @@ Global {250B3EA5-65A4-4D62-B0F9-5BAAFE53BD7A}.Debug|Any CPU.Build.0 = Debug|Any CPU {250B3EA5-65A4-4D62-B0F9-5BAAFE53BD7A}.Release|Any CPU.ActiveCfg = Release|Any CPU {250B3EA5-65A4-4D62-B0F9-5BAAFE53BD7A}.Release|Any CPU.Build.0 = Release|Any CPU + {E0E112CC-3B5C-46AC-9541-D53BB36FB1E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E0E112CC-3B5C-46AC-9541-D53BB36FB1E2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E0E112CC-3B5C-46AC-9541-D53BB36FB1E2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E0E112CC-3B5C-46AC-9541-D53BB36FB1E2}.Release|Any CPU.Build.0 = Release|Any CPU + {8E120FF0-27B9-4DE0-85FA-B0BE18867898}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E120FF0-27B9-4DE0-85FA-B0BE18867898}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E120FF0-27B9-4DE0-85FA-B0BE18867898}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E120FF0-27B9-4DE0-85FA-B0BE18867898}.Release|Any CPU.Build.0 = Release|Any CPU + {EFDDE3C6-3CBC-480B-AA19-0C93913DB53A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EFDDE3C6-3CBC-480B-AA19-0C93913DB53A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EFDDE3C6-3CBC-480B-AA19-0C93913DB53A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EFDDE3C6-3CBC-480B-AA19-0C93913DB53A}.Release|Any CPU.Build.0 = Release|Any CPU + {5E97D652-E1A3-46CF-B577-C1216A9FD079}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5E97D652-E1A3-46CF-B577-C1216A9FD079}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5E97D652-E1A3-46CF-B577-C1216A9FD079}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5E97D652-E1A3-46CF-B577-C1216A9FD079}.Release|Any CPU.Build.0 = Release|Any CPU {05161D6B-0451-43B9-B648-71B7628F2A78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {05161D6B-0451-43B9-B648-71B7628F2A78}.Debug|Any CPU.Build.0 = Debug|Any CPU {05161D6B-0451-43B9-B648-71B7628F2A78}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -399,6 +455,10 @@ Global {3A6E2FA4-B745-4E4B-A82E-98CAD1177E77}.Debug|Any CPU.Build.0 = Debug|Any CPU {3A6E2FA4-B745-4E4B-A82E-98CAD1177E77}.Release|Any CPU.ActiveCfg = Release|Any CPU {3A6E2FA4-B745-4E4B-A82E-98CAD1177E77}.Release|Any CPU.Build.0 = Release|Any CPU + {2B8ED012-22B5-47DD-A879-FD2AFD4C067D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2B8ED012-22B5-47DD-A879-FD2AFD4C067D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2B8ED012-22B5-47DD-A879-FD2AFD4C067D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2B8ED012-22B5-47DD-A879-FD2AFD4C067D}.Release|Any CPU.Build.0 = Release|Any CPU {D0CAEF2C-FB83-4C32-80BD-1F516AD13FAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D0CAEF2C-FB83-4C32-80BD-1F516AD13FAA}.Debug|Any CPU.Build.0 = Debug|Any CPU {D0CAEF2C-FB83-4C32-80BD-1F516AD13FAA}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -411,6 +471,14 @@ Global {94CAA850-ABDB-4A1E-B18B-19DA0DE75CFD}.Debug|Any CPU.Build.0 = Debug|Any CPU {94CAA850-ABDB-4A1E-B18B-19DA0DE75CFD}.Release|Any CPU.ActiveCfg = Release|Any CPU {94CAA850-ABDB-4A1E-B18B-19DA0DE75CFD}.Release|Any CPU.Build.0 = Release|Any CPU + {D3B6805B-F10E-4A19-99FC-55506892BC18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D3B6805B-F10E-4A19-99FC-55506892BC18}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D3B6805B-F10E-4A19-99FC-55506892BC18}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D3B6805B-F10E-4A19-99FC-55506892BC18}.Release|Any CPU.Build.0 = Release|Any CPU + {D7C2C4C7-CF28-4E2B-8749-31D7E6072588}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D7C2C4C7-CF28-4E2B-8749-31D7E6072588}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D7C2C4C7-CF28-4E2B-8749-31D7E6072588}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D7C2C4C7-CF28-4E2B-8749-31D7E6072588}.Release|Any CPU.Build.0 = Release|Any CPU {36C471D8-1D7A-4C81-8B05-2EED0984FBB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {36C471D8-1D7A-4C81-8B05-2EED0984FBB4}.Debug|Any CPU.Build.0 = Debug|Any CPU {36C471D8-1D7A-4C81-8B05-2EED0984FBB4}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -423,10 +491,34 @@ Global {3CE1FDFB-3BFD-463E-AC82-4E5302F0AB2F}.Debug|Any CPU.Build.0 = Debug|Any CPU {3CE1FDFB-3BFD-463E-AC82-4E5302F0AB2F}.Release|Any CPU.ActiveCfg = Release|Any CPU {3CE1FDFB-3BFD-463E-AC82-4E5302F0AB2F}.Release|Any CPU.Build.0 = Release|Any CPU + {CF8F7B21-6C98-4390-8E94-653587E2B084}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CF8F7B21-6C98-4390-8E94-653587E2B084}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CF8F7B21-6C98-4390-8E94-653587E2B084}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CF8F7B21-6C98-4390-8E94-653587E2B084}.Release|Any CPU.Build.0 = Release|Any CPU {6AE427EF-C018-4075-A4C8-BF3831C5F88C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6AE427EF-C018-4075-A4C8-BF3831C5F88C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6AE427EF-C018-4075-A4C8-BF3831C5F88C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6AE427EF-C018-4075-A4C8-BF3831C5F88C}.Release|Any CPU.Build.0 = Release|Any CPU + {173C1D16-0E90-480C-8A37-0322F86F9B25}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {173C1D16-0E90-480C-8A37-0322F86F9B25}.Debug|Any CPU.Build.0 = Debug|Any CPU + {173C1D16-0E90-480C-8A37-0322F86F9B25}.Release|Any CPU.ActiveCfg = Release|Any CPU + {173C1D16-0E90-480C-8A37-0322F86F9B25}.Release|Any CPU.Build.0 = Release|Any CPU + {90548F7B-C673-42C9-BD88-A6E6550ECE1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {90548F7B-C673-42C9-BD88-A6E6550ECE1C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {90548F7B-C673-42C9-BD88-A6E6550ECE1C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {90548F7B-C673-42C9-BD88-A6E6550ECE1C}.Release|Any CPU.Build.0 = Release|Any CPU + {90349C97-F971-47ED-B25C-E3379E317268}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {90349C97-F971-47ED-B25C-E3379E317268}.Debug|Any CPU.Build.0 = Debug|Any CPU + {90349C97-F971-47ED-B25C-E3379E317268}.Release|Any CPU.ActiveCfg = Release|Any CPU + {90349C97-F971-47ED-B25C-E3379E317268}.Release|Any CPU.Build.0 = Release|Any CPU + {7D765777-8952-4728-AE5D-4493A5BC0C08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7D765777-8952-4728-AE5D-4493A5BC0C08}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7D765777-8952-4728-AE5D-4493A5BC0C08}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7D765777-8952-4728-AE5D-4493A5BC0C08}.Release|Any CPU.Build.0 = Release|Any CPU + {51F8FF5B-9CC9-4205-BB61-A968962D917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {51F8FF5B-9CC9-4205-BB61-A968962D917F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {51F8FF5B-9CC9-4205-BB61-A968962D917F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {51F8FF5B-9CC9-4205-BB61-A968962D917F}.Release|Any CPU.Build.0 = Release|Any CPU {6A1A3AFF-C018-498A-80A0-532396132AD5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6A1A3AFF-C018-498A-80A0-532396132AD5}.Debug|Any CPU.Build.0 = Debug|Any CPU {6A1A3AFF-C018-498A-80A0-532396132AD5}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -451,6 +543,14 @@ Global {990280EA-CDBD-480A-8224-DBCBA8B6D6DB}.Debug|Any CPU.Build.0 = Debug|Any CPU {990280EA-CDBD-480A-8224-DBCBA8B6D6DB}.Release|Any CPU.ActiveCfg = Release|Any CPU {990280EA-CDBD-480A-8224-DBCBA8B6D6DB}.Release|Any CPU.Build.0 = Release|Any CPU + {00A79938-3E8B-430F-8F02-B1FD88CDF2E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {00A79938-3E8B-430F-8F02-B1FD88CDF2E6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {00A79938-3E8B-430F-8F02-B1FD88CDF2E6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {00A79938-3E8B-430F-8F02-B1FD88CDF2E6}.Release|Any CPU.Build.0 = Release|Any CPU + {E71C107F-4371-4BCF-A387-3CAF90653173}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E71C107F-4371-4BCF-A387-3CAF90653173}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E71C107F-4371-4BCF-A387-3CAF90653173}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E71C107F-4371-4BCF-A387-3CAF90653173}.Release|Any CPU.Build.0 = Release|Any CPU {62065BFE-5477-44DD-A328-582B0F050EC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {62065BFE-5477-44DD-A328-582B0F050EC3}.Debug|Any CPU.Build.0 = Debug|Any CPU {62065BFE-5477-44DD-A328-582B0F050EC3}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -495,22 +595,26 @@ Global {D7CEC738-5D2D-4FCB-9268-9650EB01BF31}.Debug|Any CPU.Build.0 = Debug|Any CPU {D7CEC738-5D2D-4FCB-9268-9650EB01BF31}.Release|Any CPU.ActiveCfg = Release|Any CPU {D7CEC738-5D2D-4FCB-9268-9650EB01BF31}.Release|Any CPU.Build.0 = Release|Any CPU - {2B8ED012-22B5-47DD-A879-FD2AFD4C067D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2B8ED012-22B5-47DD-A879-FD2AFD4C067D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2B8ED012-22B5-47DD-A879-FD2AFD4C067D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2B8ED012-22B5-47DD-A879-FD2AFD4C067D}.Release|Any CPU.Build.0 = Release|Any CPU - {D3B6805B-F10E-4A19-99FC-55506892BC18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D3B6805B-F10E-4A19-99FC-55506892BC18}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D3B6805B-F10E-4A19-99FC-55506892BC18}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D3B6805B-F10E-4A19-99FC-55506892BC18}.Release|Any CPU.Build.0 = Release|Any CPU - {D7C2C4C7-CF28-4E2B-8749-31D7E6072588}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D7C2C4C7-CF28-4E2B-8749-31D7E6072588}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D7C2C4C7-CF28-4E2B-8749-31D7E6072588}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D7C2C4C7-CF28-4E2B-8749-31D7E6072588}.Release|Any CPU.Build.0 = Release|Any CPU - {90548F7B-C673-42C9-BD88-A6E6550ECE1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {90548F7B-C673-42C9-BD88-A6E6550ECE1C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {90548F7B-C673-42C9-BD88-A6E6550ECE1C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {90548F7B-C673-42C9-BD88-A6E6550ECE1C}.Release|Any CPU.Build.0 = Release|Any CPU + {87219539-82DC-4605-BFFA-69547203AEB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {87219539-82DC-4605-BFFA-69547203AEB3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {87219539-82DC-4605-BFFA-69547203AEB3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {87219539-82DC-4605-BFFA-69547203AEB3}.Release|Any CPU.Build.0 = Release|Any CPU + {401090CE-81C8-4C6C-8F12-DF962AE8CB1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {401090CE-81C8-4C6C-8F12-DF962AE8CB1C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {401090CE-81C8-4C6C-8F12-DF962AE8CB1C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {401090CE-81C8-4C6C-8F12-DF962AE8CB1C}.Release|Any CPU.Build.0 = Release|Any CPU + {B21B1C26-B5FD-4A30-B8C9-69DE311B6F03}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B21B1C26-B5FD-4A30-B8C9-69DE311B6F03}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B21B1C26-B5FD-4A30-B8C9-69DE311B6F03}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B21B1C26-B5FD-4A30-B8C9-69DE311B6F03}.Release|Any CPU.Build.0 = Release|Any CPU + {6D9421F9-E06A-4984-AD31-C587A6200CF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6D9421F9-E06A-4984-AD31-C587A6200CF7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6D9421F9-E06A-4984-AD31-C587A6200CF7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6D9421F9-E06A-4984-AD31-C587A6200CF7}.Release|Any CPU.Build.0 = Release|Any CPU + {759C53AF-4A71-475D-96C1-418D99CF636F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {759C53AF-4A71-475D-96C1-418D99CF636F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {759C53AF-4A71-475D-96C1-418D99CF636F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {759C53AF-4A71-475D-96C1-418D99CF636F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -518,6 +622,8 @@ Global GlobalSection(NestedProjects) = preSolution {F5A58A9D-3C44-4E3C-A661-1CECA84108D9} = {7C1317AA-5F4C-42A4-80F3-856BA5E204AF} {94CAA850-ABDB-4A1E-B18B-19DA0DE75CFD} = {7C1317AA-5F4C-42A4-80F3-856BA5E204AF} + {D3B6805B-F10E-4A19-99FC-55506892BC18} = {7C1317AA-5F4C-42A4-80F3-856BA5E204AF} + {D7C2C4C7-CF28-4E2B-8749-31D7E6072588} = {7C1317AA-5F4C-42A4-80F3-856BA5E204AF} {201C7D67-FB1D-4259-9DB4-BF188007F9EA} = {72A090A3-FE14-4F4E-B266-EFFB5C736462} {5EA013FF-FCA7-4F0B-8EB7-14D8472A0830} = {72A090A3-FE14-4F4E-B266-EFFB5C736462} {5E90DFC5-7D40-42E4-ADF6-7090015B7211} = {72A090A3-FE14-4F4E-B266-EFFB5C736462} @@ -529,6 +635,8 @@ Global {692645D6-1F0B-4DB0-85EB-7D4042857B2D} = {72A090A3-FE14-4F4E-B266-EFFB5C736462} {A29E2B35-847A-4304-BF0F-B0DFDC4384A1} = {72A090A3-FE14-4F4E-B266-EFFB5C736462} {AB7510FB-A8B8-426E-A5FB-D292F1423D5A} = {72A090A3-FE14-4F4E-B266-EFFB5C736462} + {E0E112CC-3B5C-46AC-9541-D53BB36FB1E2} = {72A090A3-FE14-4F4E-B266-EFFB5C736462} + {EFDDE3C6-3CBC-480B-AA19-0C93913DB53A} = {72A090A3-FE14-4F4E-B266-EFFB5C736462} {05161D6B-0451-43B9-B648-71B7628F2A78} = {72A090A3-FE14-4F4E-B266-EFFB5C736462} {92B8FC4A-A8B5-4799-831D-F82A4BE16B39} = {72A090A3-FE14-4F4E-B266-EFFB5C736462} {6F7512BA-9B15-4395-AE05-C546F0770344} = {72A090A3-FE14-4F4E-B266-EFFB5C736462} @@ -546,10 +654,17 @@ Global {D0CAEF2C-FB83-4C32-80BD-1F516AD13FAA} = {72A090A3-FE14-4F4E-B266-EFFB5C736462} {36C471D8-1D7A-4C81-8B05-2EED0984FBB4} = {72A090A3-FE14-4F4E-B266-EFFB5C736462} {3CE1FDFB-3BFD-463E-AC82-4E5302F0AB2F} = {72A090A3-FE14-4F4E-B266-EFFB5C736462} + {CF8F7B21-6C98-4390-8E94-653587E2B084} = {72A090A3-FE14-4F4E-B266-EFFB5C736462} {6AE427EF-C018-4075-A4C8-BF3831C5F88C} = {72A090A3-FE14-4F4E-B266-EFFB5C736462} + {173C1D16-0E90-480C-8A37-0322F86F9B25} = {72A090A3-FE14-4F4E-B266-EFFB5C736462} + {90349C97-F971-47ED-B25C-E3379E317268} = {72A090A3-FE14-4F4E-B266-EFFB5C736462} + {7D765777-8952-4728-AE5D-4493A5BC0C08} = {72A090A3-FE14-4F4E-B266-EFFB5C736462} + {51F8FF5B-9CC9-4205-BB61-A968962D917F} = {72A090A3-FE14-4F4E-B266-EFFB5C736462} {6A1A3AFF-C018-498A-80A0-532396132AD5} = {72A090A3-FE14-4F4E-B266-EFFB5C736462} {11773B90-8DAC-4B51-A4B6-7C64FD6942BD} = {72A090A3-FE14-4F4E-B266-EFFB5C736462} {990280EA-CDBD-480A-8224-DBCBA8B6D6DB} = {72A090A3-FE14-4F4E-B266-EFFB5C736462} + {00A79938-3E8B-430F-8F02-B1FD88CDF2E6} = {72A090A3-FE14-4F4E-B266-EFFB5C736462} + {E71C107F-4371-4BCF-A387-3CAF90653173} = {72A090A3-FE14-4F4E-B266-EFFB5C736462} {B0249028-C048-40B8-B102-BCE7928965C3} = {72A090A3-FE14-4F4E-B266-EFFB5C736462} {9F1389B4-A9A5-422F-89F5-A2D431292F0C} = {72A090A3-FE14-4F4E-B266-EFFB5C736462} {6E2398EA-A64A-4493-A79B-63D2F072A690} = {72A090A3-FE14-4F4E-B266-EFFB5C736462} @@ -564,6 +679,8 @@ Global {D4256787-48E0-473F-8C06-359C1BCFC8AB} = {7028EE0A-D314-4F48-91CA-51A1633BC3F4} {0F2B84D6-6C2E-4216-A8CD-DF91908F4194} = {7028EE0A-D314-4F48-91CA-51A1633BC3F4} {250B3EA5-65A4-4D62-B0F9-5BAAFE53BD7A} = {7028EE0A-D314-4F48-91CA-51A1633BC3F4} + {8E120FF0-27B9-4DE0-85FA-B0BE18867898} = {7028EE0A-D314-4F48-91CA-51A1633BC3F4} + {5E97D652-E1A3-46CF-B577-C1216A9FD079} = {7028EE0A-D314-4F48-91CA-51A1633BC3F4} {6A4A1183-A0CF-4270-8EF9-12018D9DADB9} = {7028EE0A-D314-4F48-91CA-51A1633BC3F4} {3C56A02F-4DD8-4253-99E7-34E088A6A9D7} = {7028EE0A-D314-4F48-91CA-51A1633BC3F4} {36D778AF-5EC3-433F-B03D-EB244DB3C227} = {7028EE0A-D314-4F48-91CA-51A1633BC3F4} @@ -580,6 +697,7 @@ Global {3A6E2FA4-B745-4E4B-A82E-98CAD1177E77} = {7028EE0A-D314-4F48-91CA-51A1633BC3F4} {9BA945E7-0970-4CA2-A54B-F8D9B3E69917} = {7028EE0A-D314-4F48-91CA-51A1633BC3F4} {AAB5D437-EFB2-4BAC-BA0F-7323BA691B89} = {7028EE0A-D314-4F48-91CA-51A1633BC3F4} + {90548F7B-C673-42C9-BD88-A6E6550ECE1C} = {7028EE0A-D314-4F48-91CA-51A1633BC3F4} {429C9D71-4BBD-489D-9C86-EC240F652008} = {7028EE0A-D314-4F48-91CA-51A1633BC3F4} {99007CDD-4840-4B94-8A8A-FECF72BCEE3F} = {7028EE0A-D314-4F48-91CA-51A1633BC3F4} {9175023F-6982-45CD-B360-C4FC1E145B25} = {7028EE0A-D314-4F48-91CA-51A1633BC3F4} @@ -589,16 +707,21 @@ Global {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} + {2B8ED012-22B5-47DD-A879-FD2AFD4C067D} = {C25891DB-FBAC-4B92-9BB9-A8181B5A0EF1} {62065BFE-5477-44DD-A328-582B0F050EC3} = {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} - {2B8ED012-22B5-47DD-A879-FD2AFD4C067D} = {C25891DB-FBAC-4B92-9BB9-A8181B5A0EF1} - {D3B6805B-F10E-4A19-99FC-55506892BC18} = {7C1317AA-5F4C-42A4-80F3-856BA5E204AF} - {D7C2C4C7-CF28-4E2B-8749-31D7E6072588} = {7C1317AA-5F4C-42A4-80F3-856BA5E204AF} - {90548F7B-C673-42C9-BD88-A6E6550ECE1C} = {7028EE0A-D314-4F48-91CA-51A1633BC3F4} + {87219539-82DC-4605-BFFA-69547203AEB3} = {EEA4A938-C9F5-45E5-BF34-AA10FFC34377} + {401090CE-81C8-4C6C-8F12-DF962AE8CB1C} = {EEA4A938-C9F5-45E5-BF34-AA10FFC34377} + {EEA4A938-C9F5-45E5-BF34-AA10FFC34377} = {93E96311-7199-450E-B6DD-C295A09EA7AF} + {B21B1C26-B5FD-4A30-B8C9-69DE311B6F03} = {7B675C35-5AB4-45A8-A5DF-32A2B586C070} + {6D9421F9-E06A-4984-AD31-C587A6200CF7} = {7B675C35-5AB4-45A8-A5DF-32A2B586C070} + {7B675C35-5AB4-45A8-A5DF-32A2B586C070} = {93E96311-7199-450E-B6DD-C295A09EA7AF} + {759C53AF-4A71-475D-96C1-418D99CF636F} = {C0B95665-ADCD-477C-83C5-8CF7FB2C9093} + {C0B95665-ADCD-477C-83C5-8CF7FB2C9093} = {93E96311-7199-450E-B6DD-C295A09EA7AF} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {FE89CDC6-6313-439C-85D7-A81D5DF593E9} diff --git a/src/libraries/Microsoft.Extensions.Options/gen/Emitter.cs b/src/libraries/Microsoft.Extensions.Options/gen/Emitter.cs index adbaa874ad7f37..e11a5e52ffb282 100644 --- a/src/libraries/Microsoft.Extensions.Options/gen/Emitter.cs +++ b/src/libraries/Microsoft.Extensions.Options/gen/Emitter.cs @@ -3,10 +3,12 @@ using System; using System.Collections.Generic; +using System.Collections.Immutable; using System.Linq; using System.Threading; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.DotnetRuntime.Extensions; namespace Microsoft.Extensions.Options.Generators { @@ -25,6 +27,7 @@ internal sealed class Emitter : EmitterBase private string _staticValidationAttributeHolderClassFQN; private string _staticValidatorHolderClassFQN; private string _modifier; + private string _TryGetValueNullableAnnotation; private sealed record StaticFieldInfo(string FieldTypeFQN, int FieldOrder, string FieldName, IList InstantiationLines); @@ -37,13 +40,14 @@ public Emitter(Compilation compilation, bool emitPreamble = true) : base(emitPre else { _modifier = "internal"; - string suffix = $"_{new Random().Next():X8}"; + string suffix = $"_{GetNonRandomizedHashCode(compilation.SourceModule.Name):X8}"; _staticValidationAttributeHolderClassName += suffix; _staticValidatorHolderClassName += suffix; } _staticValidationAttributeHolderClassFQN = $"global::{StaticFieldHolderClassesNamespace}.{_staticValidationAttributeHolderClassName}"; _staticValidatorHolderClassFQN = $"global::{StaticFieldHolderClassesNamespace}.{_staticValidatorHolderClassName}"; + _TryGetValueNullableAnnotation = GetNullableAnnotationStringForTryValidateValueToUseInGeneratedCode(compilation); } public string Emit( @@ -65,6 +69,31 @@ public string Emit( return Capture(); } + /// + /// Returns the nullable annotation string to use in the code generation according to the first parameter of + /// is nullable annotated. + /// + /// The to consider for analysis. + /// "!" if the first parameter is not nullable annotated, otherwise an empty string. + /// + /// In .NET 8.0 we have changed the nullable annotation on first parameter of the method cref="System.ComponentModel.DataAnnotations.Validator.TryValidateValue(object, ValidationContext, ICollection{ValidationResult}, IEnumerable{ValidationAttribute})"/> + /// The source generator need to detect if we need to append "!" to the first parameter of the method call when running on down-level versions. + /// + private static string GetNullableAnnotationStringForTryValidateValueToUseInGeneratedCode(Compilation compilation) + { + INamedTypeSymbol? validatorTypeSymbol = compilation.GetBestTypeByMetadataName("System.ComponentModel.DataAnnotations.Validator"); + if (validatorTypeSymbol is not null) + { + ImmutableArray members = validatorTypeSymbol.GetMembers("TryValidateValue"); + if (members.Length == 1 && members[0] is IMethodSymbol tryValidateValueMethod) + { + return tryValidateValueMethod.Parameters[0].NullableAnnotation == NullableAnnotation.NotAnnotated ? "!" : string.Empty; + } + } + + return "!"; + } + private void GenValidatorType(ValidatorType vt, ref Dictionary staticValidationAttributesDict, ref Dictionary staticValidatorsDict) { if (vt.Namespace.Length > 0) @@ -161,7 +190,7 @@ private void GenModelSelfValidationIfNecessary(ValidatedModel modelToValidate) { if (modelToValidate.SelfValidates) { - OutLn($"builder.AddResults(((global::System.ComponentModel.DataAnnotations.IValidatableObject)options).Validate(context));"); + OutLn($"(builder ??= new()).AddResults(((global::System.ComponentModel.DataAnnotations.IValidatableObject)options).Validate(context));"); OutLn(); } } @@ -182,8 +211,7 @@ private void GenModelValidationMethod( OutLn($"public {(makeStatic ? "static " : string.Empty)}global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, {modelToValidate.Name} options)"); OutOpenBrace(); - OutLn($"var baseName = (string.IsNullOrEmpty(name) ? \"{modelToValidate.SimpleName}\" : name) + \".\";"); - OutLn($"var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder();"); + OutLn($"global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null;"); OutLn($"var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options);"); int capacity = modelToValidate.MembersToValidate.Max(static vm => vm.ValidationAttributes.Count); @@ -199,33 +227,33 @@ private void GenModelValidationMethod( { if (vm.ValidationAttributes.Count > 0) { - GenMemberValidation(vm, ref staticValidationAttributesDict, cleanListsBeforeUse); + GenMemberValidation(vm, modelToValidate.SimpleName, ref staticValidationAttributesDict, cleanListsBeforeUse); cleanListsBeforeUse = true; OutLn(); } if (vm.TransValidatorType is not null) { - GenTransitiveValidation(vm, ref staticValidatorsDict); + GenTransitiveValidation(vm, modelToValidate.SimpleName, ref staticValidatorsDict); OutLn(); } if (vm.EnumerationValidatorType is not null) { - GenEnumerationValidation(vm, ref staticValidatorsDict); + GenEnumerationValidation(vm, modelToValidate.SimpleName, ref staticValidatorsDict); OutLn(); } } GenModelSelfValidationIfNecessary(modelToValidate); - OutLn($"return builder.Build();"); + OutLn($"return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build();"); OutCloseBrace(); } - private void GenMemberValidation(ValidatedMember vm, ref Dictionary staticValidationAttributesDict, bool cleanListsBeforeUse) + private void GenMemberValidation(ValidatedMember vm, string modelName, ref Dictionary staticValidationAttributesDict, bool cleanListsBeforeUse) { OutLn($"context.MemberName = \"{vm.Name}\";"); - OutLn($"context.DisplayName = baseName + \"{vm.Name}\";"); + OutLn($"context.DisplayName = string.IsNullOrEmpty(name) ? \"{modelName}.{vm.Name}\" : $\"{{name}}.{vm.Name}\";"); if (cleanListsBeforeUse) { @@ -239,9 +267,9 @@ private void GenMemberValidation(ValidatedMember vm, ref Dictionary staticValidatorsDict) + private void GenTransitiveValidation(ValidatedMember vm, string modelName, ref Dictionary staticValidatorsDict) { string callSequence; if (vm.TransValidateTypeIsSynthetic) @@ -321,20 +349,22 @@ private void GenTransitiveValidation(ValidatedMember vm, ref Dictionary staticValidatorsDict) + private void GenEnumerationValidation(ValidatedMember vm, string modelName, ref Dictionary staticValidatorsDict) { var valueAccess = (vm.IsValueType && vm.IsNullable) ? ".Value" : string.Empty; var enumeratedValueAccess = (vm.EnumeratedIsNullable && vm.EnumeratedIsValueType) ? ".Value" : string.Empty; @@ -365,14 +395,16 @@ private void GenEnumerationValidation(ValidatedMember vm, ref Dictionary + /// Returns a non-randomized hash code for the given string. + /// We always return a positive value. + /// + internal static int GetNonRandomizedHashCode(string s) + { + uint result = 2166136261u; + foreach (char c in s) + { + result = (c ^ result) * 16777619; + } + return Math.Abs((int)result); + } } } diff --git a/src/libraries/Microsoft.Extensions.Options/gen/Generator.cs b/src/libraries/Microsoft.Extensions.Options/gen/Generator.cs index d50acf275c67e6..34533fc0a96b05 100644 --- a/src/libraries/Microsoft.Extensions.Options/gen/Generator.cs +++ b/src/libraries/Microsoft.Extensions.Options/gen/Generator.cs @@ -13,7 +13,7 @@ namespace Microsoft.Extensions.Options.Generators { [Generator] - public class Generator : IIncrementalGenerator + public class OptionsValidatorGenerator : IIncrementalGenerator { public void Initialize(IncrementalGeneratorInitializationContext context) { diff --git a/src/libraries/Microsoft.Extensions.Options/gen/Microsoft.Extensions.Options.SourceGeneration.csproj b/src/libraries/Microsoft.Extensions.Options/gen/Microsoft.Extensions.Options.SourceGeneration.csproj index 41ceaf6739c333..5571341b06060e 100644 --- a/src/libraries/Microsoft.Extensions.Options/gen/Microsoft.Extensions.Options.SourceGeneration.csproj +++ b/src/libraries/Microsoft.Extensions.Options/gen/Microsoft.Extensions.Options.SourceGeneration.csproj @@ -20,6 +20,7 @@ + diff --git a/src/libraries/Microsoft.Extensions.Options/gen/Parser.cs b/src/libraries/Microsoft.Extensions.Options/gen/Parser.cs index 0c8e216e488c7f..010b89562a9179 100644 --- a/src/libraries/Microsoft.Extensions.Options/gen/Parser.cs +++ b/src/libraries/Microsoft.Extensions.Options/gen/Parser.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using System.Collections.Immutable; using System.Globalization; using System.Linq; using System.Text; @@ -240,6 +241,13 @@ private static bool HasOpenGenerics(ITypeSymbol type, out string genericType) type = ((INamedTypeSymbol)type).TypeArguments[0]; } + // Check first if the type is IEnumerable interface + if (SymbolEqualityComparer.Default.Equals(type.OriginalDefinition, _symbolHolder.GenericIEnumerableSymbol)) + { + return ((INamedTypeSymbol)type).TypeArguments[0]; + } + + // Check first if the type implement IEnumerable interface foreach (var implementingInterface in type.AllInterfaces) { if (SymbolEqualityComparer.Default.Equals(implementingInterface.OriginalDefinition, _compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T))) @@ -462,14 +470,36 @@ private List GetMembersToValidate(ITypeSymbol modelType, bool s var validationAttr = new ValidationAttributeInfo(attributeType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)); validationAttrs.Add(validationAttr); - foreach (var constructorArgument in attribute.ConstructorArguments) + ImmutableArray parameters = attribute.AttributeConstructor?.Parameters ?? ImmutableArray.Empty; + bool lastParameterDeclaredWithParamsKeyword = parameters.Length > 0 && parameters[parameters.Length - 1].IsParams; + + ImmutableArray arguments = attribute.ConstructorArguments; + + for (int i = 0; i < arguments.Length; i++) { - validationAttr.ConstructorArguments.Add(GetArgumentExpression(constructorArgument.Type!, constructorArgument.Value)); + TypedConstant argument = arguments[i]; + if (argument.Kind == TypedConstantKind.Array) + { + bool isParams = lastParameterDeclaredWithParamsKeyword && i == arguments.Length - 1; + validationAttr.ConstructorArguments.Add(GetArrayArgumentExpression(argument.Values, isParams)); + } + else + { + validationAttr.ConstructorArguments.Add(GetArgumentExpression(argument.Type!, argument.Value)); + } } foreach (var namedArgument in attribute.NamedArguments) { - validationAttr.Properties.Add(namedArgument.Key, GetArgumentExpression(namedArgument.Value.Type!, namedArgument.Value.Value)); + if (namedArgument.Value.Kind == TypedConstantKind.Array) + { + bool isParams = lastParameterDeclaredWithParamsKeyword && namedArgument.Key == parameters[parameters.Length - 1].Name; + validationAttr.Properties.Add(namedArgument.Key, GetArrayArgumentExpression(namedArgument.Value.Values, isParams)); + } + else + { + validationAttr.Properties.Add(namedArgument.Key, GetArgumentExpression(namedArgument.Value.Type!, namedArgument.Value.Value)); + } } } } @@ -630,6 +660,32 @@ private bool CanValidate(ITypeSymbol validatorType, ISymbol modelType) return false; } + private string GetArrayArgumentExpression(ImmutableArray value, bool isParams) + { + var sb = new StringBuilder(); + if (!isParams) + { + sb.Append("new[] { "); + } + + for (int i = 0; i < value.Length; i++) + { + sb.Append(GetArgumentExpression(value[i].Type!, value[i].Value)); + + if (i < value.Length - 1) + { + sb.Append(", "); + } + } + + if (!isParams) + { + sb.Append(" }"); + } + + return sb.ToString(); + } + private string GetArgumentExpression(ITypeSymbol type, object? value) { if (value == null) diff --git a/src/libraries/Microsoft.Extensions.Options/gen/SymbolHolder.cs b/src/libraries/Microsoft.Extensions.Options/gen/SymbolHolder.cs index c78106e1bc4a27..55d382e4036219 100644 --- a/src/libraries/Microsoft.Extensions.Options/gen/SymbolHolder.cs +++ b/src/libraries/Microsoft.Extensions.Options/gen/SymbolHolder.cs @@ -14,7 +14,8 @@ internal sealed record class SymbolHolder( INamedTypeSymbol DataTypeAttributeSymbol, INamedTypeSymbol ValidateOptionsSymbol, INamedTypeSymbol IValidatableObjectSymbol, + INamedTypeSymbol GenericIEnumerableSymbol, INamedTypeSymbol TypeSymbol, - INamedTypeSymbol? ValidateObjectMembersAttributeSymbol, - INamedTypeSymbol? ValidateEnumeratedItemsAttributeSymbol); + INamedTypeSymbol ValidateObjectMembersAttributeSymbol, + INamedTypeSymbol ValidateEnumeratedItemsAttributeSymbol); } diff --git a/src/libraries/Microsoft.Extensions.Options/gen/SymbolLoader.cs b/src/libraries/Microsoft.Extensions.Options/gen/SymbolLoader.cs index 6f805e91a05858..94035cedacbf98 100644 --- a/src/libraries/Microsoft.Extensions.Options/gen/SymbolLoader.cs +++ b/src/libraries/Microsoft.Extensions.Options/gen/SymbolLoader.cs @@ -15,19 +15,11 @@ internal static class SymbolLoader internal const string TypeOfType = "System.Type"; internal const string ValidateObjectMembersAttribute = "Microsoft.Extensions.Options.ValidateObjectMembersAttribute"; internal const string ValidateEnumeratedItemsAttribute = "Microsoft.Extensions.Options.ValidateEnumeratedItemsAttribute"; + internal const string GenericIEnumerableType = "System.Collections.Generic.IEnumerable`1"; public static bool TryLoad(Compilation compilation, out SymbolHolder? symbolHolder) { - INamedTypeSymbol? GetSymbol(string metadataName, bool optional = false) - { - var symbol = compilation.GetTypeByMetadataName(metadataName); - if (symbol == null && !optional) - { - return null; - } - - return symbol; - } + INamedTypeSymbol? GetSymbol(string metadataName) => compilation.GetTypeByMetadataName(metadataName); // required var optionsValidatorSymbol = GetSymbol(OptionsValidatorAttribute); @@ -35,7 +27,10 @@ public static bool TryLoad(Compilation compilation, out SymbolHolder? symbolHold var dataTypeAttributeSymbol = GetSymbol(DataTypeAttribute); var ivalidatableObjectSymbol = GetSymbol(IValidatableObjectType); var validateOptionsSymbol = GetSymbol(IValidateOptionsType); + var genericIEnumerableSymbol = GetSymbol(GenericIEnumerableType); var typeSymbol = GetSymbol(TypeOfType); + var validateObjectMembersAttribute = GetSymbol(ValidateObjectMembersAttribute); + var validateEnumeratedItemsAttribute = GetSymbol(ValidateEnumeratedItemsAttribute); #pragma warning disable S1067 // Expressions should not be too complex if (optionsValidatorSymbol == null || @@ -43,7 +38,10 @@ public static bool TryLoad(Compilation compilation, out SymbolHolder? symbolHold dataTypeAttributeSymbol == null || ivalidatableObjectSymbol == null || validateOptionsSymbol == null || - typeSymbol == null) + genericIEnumerableSymbol == null || + typeSymbol == null || + validateObjectMembersAttribute == null || + validateEnumeratedItemsAttribute == null) { symbolHolder = default; return false; @@ -56,11 +54,10 @@ public static bool TryLoad(Compilation compilation, out SymbolHolder? symbolHold dataTypeAttributeSymbol, validateOptionsSymbol, ivalidatableObjectSymbol, + genericIEnumerableSymbol, typeSymbol, - - // optional - GetSymbol(ValidateObjectMembersAttribute, optional: true), - GetSymbol(ValidateEnumeratedItemsAttribute, optional: true)); + validateObjectMembersAttribute, + validateEnumeratedItemsAttribute); return true; } diff --git a/src/libraries/Microsoft.Extensions.Options/src/PACKAGE.md b/src/libraries/Microsoft.Extensions.Options/src/PACKAGE.md new file mode 100644 index 00000000000000..ee0cc2ab6f99ee --- /dev/null +++ b/src/libraries/Microsoft.Extensions.Options/src/PACKAGE.md @@ -0,0 +1,170 @@ +## About +`Microsoft.Extensions.Options` provides a strongly typed way of specifying and accessing settings using dependency injection and acts as a bridge between configuration, DI, and higher level libraries. This library is the glue for how an app developer uses DI to configure the behavior of a library like HttpClient Factory. This also enables user to get a strongly-typed view of their configuration. + +Within this package, you'll find an options validation source generator that generates exceptionally efficient and optimized code for validating options. + +## Key Features + +* Offer the IValidateOptions interface for the validation of options, along with several generic ValidateOptions classes that implement this interface. +* OptionsBuilder to configure options. +* Provide extension methods for service collections and options builder to register options and validate options. +* Supply a set of generic ConfigureNamedOptions classes that implement the IConfigureNamedOptions interface for configuring named options. +* Provide a source generator that generates validation code for options. +* Options caching, managing and monitoring. + +## How to Use + +#### Options validation example + +```C# +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Options; + +var builder = WebApplication.CreateBuilder(args); + +builder.Services.AddControllersWithViews(); + +// Load the configuration and validate it +builder.Services.AddOptions() + .Bind(builder.Configuration.GetSection(MyConfigOptions.MyConfig)) + .ValidateDataAnnotations(); +var app = builder.Build(); + + +// Declare the option class to validate +public class MyConfigOptions +{ + public const string MyConfig = "MyConfig"; + + [RegularExpression(@"^[a-zA-Z''-'\s]{1,40}$")] + public string Key1 { get; set; } + [Range(0, 1000, + ErrorMessage = "Value for {0} must be between {1} and {2}.")] + public int Key2 { get; set; } + public int Key3 { get; set; } +} +``` + +#### Using IValidateOptions to validate options + +```C# +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Options; + +var builder = WebApplication.CreateBuilder(args); + +builder.Services.AddControllersWithViews(); + +// Configuration to validate +builder.Services.Configure(builder.Configuration.GetSection( + MyConfigOptions.MyConfig)); + +// OPtions validation through the DI container +builder.Services.AddSingleton, MyConfigValidation>(); + +var app = builder.Build(); + +public class MyConfigValidation : IValidateOptions +{ + public MyConfigOptions _config { get; private set; } + + public MyConfigValidation(IConfiguration config) + { + _config = config.GetSection(MyConfigOptions.MyConfig) + .Get(); + } + + public ValidateOptionsResult Validate(string name, MyConfigOptions options) + { + string? vor = null; + var rx = new Regex(@"^[a-zA-Z''-'\s]{1,40}$"); + var match = rx.Match(options.Key1!); + + if (string.IsNullOrEmpty(match.Value)) + { + vor = $"{options.Key1} doesn't match RegEx \n"; + } + + if ( options.Key2 < 0 || options.Key2 > 1000) + { + vor = $"{options.Key2} doesn't match Range 0 - 1000 \n"; + } + + if (_config.Key2 != default) + { + if(_config.Key3 <= _config.Key2) + { + vor += "Key3 must be > than Key2."; + } + } + + if (vor != null) + { + return ValidateOptionsResult.Fail(vor); + } + + return ValidateOptionsResult.Success; + } +} + +``` + +#### Options Validation Source Generator Example + +```C# +using System; +using System.ComponentModel.DataAnnotations; +using Microsoft.Extensions.Options; + +public class MyConfigOptions +{ + [RegularExpression(@"^[a-zA-Z''-'\s]{1,40}$")] + public string Key1 { get; set; } + + [Range(0, 1000, + ErrorMessage = "Value for {0} must be between {1} and {2}.")] + public int Key2 { get; set; } + public int Key3 { get; set; } +} + +[OptionsValidator] +public partial class MyConfigValidation : IValidateOptions +{ + // Source generator will automatically provide the implementation of IValidateOptions + // Then you can add the validation to the DI Container using the following code: + // + // builder.Services.AddSingleton, MyConfigValidation>(); + // builder.Services.AddOptions() + // .Bind(builder.Configuration.GetSection(MyConfigOptions.MyConfig)) + // .ValidateDataAnnotations(); +} + +``` + +## Main Types + +The main types provided by this library are: + +* `IOptions`, `IOptionsFactory`, and `IOptionsMonitor` +* `IValidateOptions` and `ValidateOptions` +* `OptionsBuilder`, `OptionsFactory`, `OptionsMonitor`, and `OptionsManager` +* `OptionsServiceCollectionExtensions` +* `OptionsValidatorAttribute` + +## Additional Documentation + +* [Conceptual documentation](https://learn.microsoft.com/aspnet/core/fundamentals/configuration/options) +* [API documentation](https://learn.microsoft.com/dotnet/api/microsoft.extensions.options) + +## Related Packages + +[Microsoft.Extensions.Logging](https://www.nuget.org/packages/Microsoft.Extensions.Logging) +[Microsoft.Extensions.Configuration](https://www.nuget.org/packages/Microsoft.Extensions.Configuration) + +## Feedback & Contributing + +Microsoft.Extensions.Options is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). \ No newline at end of file diff --git a/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Main.cs b/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Main.cs index f3e0513a885f22..aa51c9dfbae73a 100644 --- a/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Main.cs +++ b/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Main.cs @@ -70,31 +70,30 @@ partial struct MyOptionsValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::HelloWorld.MyOptions options) { - var baseName = (string.IsNullOrEmpty(name) ? "MyOptions" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "Val1"; - context.DisplayName = baseName + "Val1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "MyOptions.Val1" : $"{name}.Val1"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val1!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val1, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } context.MemberName = "Val2"; - context.DisplayName = baseName + "Val2"; + context.DisplayName = string.IsNullOrEmpty(name) ? "MyOptions.Val2" : $"{name}.Val2"; validationResults.Clear(); validationAttributes.Clear(); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val2!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val2, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1611,7 +1610,7 @@ public partial class FirstModelValidator : IValidateOptions // Run the generator with C# 7.0 and verify that it fails. var (diagnostics, generatedSources) = await RoslynTestUtils.RunGenerator( - new Generator(), refAssemblies.ToArray(), new[] { source }, includeBaseReferences: true, LanguageVersion.CSharp7).ConfigureAwait(false); + new OptionsValidatorGenerator(), refAssemblies.ToArray(), new[] { source }, includeBaseReferences: true, LanguageVersion.CSharp7).ConfigureAwait(false); Assert.NotEmpty(diagnostics); Assert.Equal("SYSLIB1216", diagnostics[0].Id); @@ -1619,7 +1618,7 @@ public partial class FirstModelValidator : IValidateOptions // Run the generator with C# 8.0 and verify that it succeeds. (diagnostics, generatedSources) = await RoslynTestUtils.RunGenerator( - new Generator(), refAssemblies.ToArray(), new[] { source }, includeBaseReferences: true, LanguageVersion.CSharp8).ConfigureAwait(false); + new OptionsValidatorGenerator(), refAssemblies.ToArray(), new[] { source }, includeBaseReferences: true, LanguageVersion.CSharp8).ConfigureAwait(false); Assert.Empty(diagnostics); Assert.Single(generatedSources); @@ -1639,6 +1638,129 @@ public partial class FirstModelValidator : IValidateOptions Assert.Equal(0, diags.Length); } + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser), nameof(PlatformDetection.IsNetCore))] + public async Task DataAnnotationAttributesWithParams() + { + var (diagnostics, generatedSources) = await RunGenerator(@""" + public class MyOptions + { + [Required] + public string P1 { get; set; } + + [Length(10, 20)] + public string P2 { get; set; } + + [AllowedValues(10, 20, 30)] + public int P3 { get; set; } + + [DeniedValues(""One"", ""Ten"", ""Hundred"")] + public string P4 { get; set; } + } + + [OptionsValidator] + public partial class MyOptionsValidator : IValidateOptions + { + } + """); + + Assert.Empty(diagnostics); + Assert.Single(generatedSources); + + var generatedSource = """ + + // + #nullable enable + #pragma warning disable CS1591 // Compensate for https://github.com/dotnet/roslyn/issues/54103 + namespace Test +{ + partial class MyOptionsValidator + { + /// + /// Validates a specific named options instance (or all when is ). + /// + /// The name of the options instance being validated. + /// The options instance. + /// Validation result. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] + public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::Test.MyOptions options) + { + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; + var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); + var validationResults = new global::System.Collections.Generic.List(); + var validationAttributes = new global::System.Collections.Generic.List(1); + + context.MemberName = "P1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "MyOptions.P1" : $"{name}.P1"; + validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1, context, validationResults, validationAttributes)) + { + (builder ??= new()).AddResults(validationResults); + } + + context.MemberName = "P2"; + context.DisplayName = string.IsNullOrEmpty(name) ? "MyOptions.P2" : $"{name}.P2"; + validationResults.Clear(); + validationAttributes.Clear(); + validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P2, context, validationResults, validationAttributes)) + { + (builder ??= new()).AddResults(validationResults); + } + + context.MemberName = "P3"; + context.DisplayName = string.IsNullOrEmpty(name) ? "MyOptions.P3" : $"{name}.P3"; + validationResults.Clear(); + validationAttributes.Clear(); + validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A3); + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P3, context, validationResults, validationAttributes)) + { + (builder ??= new()).AddResults(validationResults); + } + + context.MemberName = "P4"; + context.DisplayName = string.IsNullOrEmpty(name) ? "MyOptions.P4" : $"{name}.P4"; + validationResults.Clear(); + validationAttributes.Clear(); + validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A4); + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P4, context, validationResults, validationAttributes)) + { + (builder ??= new()).AddResults(validationResults); + } + + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); + } + } +} +namespace __OptionValidationStaticInstances +{ + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] + file static class __Attributes + { + internal static readonly global::System.ComponentModel.DataAnnotations.RequiredAttribute A1 = new global::System.ComponentModel.DataAnnotations.RequiredAttribute(); + + internal static readonly global::System.ComponentModel.DataAnnotations.LengthAttribute A2 = new global::System.ComponentModel.DataAnnotations.LengthAttribute( + (int)10, + (int)20); + + internal static readonly global::System.ComponentModel.DataAnnotations.AllowedValuesAttribute A3 = new global::System.ComponentModel.DataAnnotations.AllowedValuesAttribute( + (int)10, (int)20, (int)30); + + internal static readonly global::System.ComponentModel.DataAnnotations.DeniedValuesAttribute A4 = new global::System.ComponentModel.DataAnnotations.DeniedValuesAttribute( + "One", "Ten", "Hundred"); + } +} +namespace __OptionValidationStaticInstances +{ + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] + file static class __Validators + { + } +} + +"""; + Assert.Equal(generatedSource.Replace("\r\n", "\n"), generatedSources[0].SourceText.ToString().Replace("\r\n", "\n")); + } + private static CSharpCompilation CreateCompilationForOptionsSource(string assemblyName, string source, string? refAssemblyPath = null) { // Ensure the generated source compiles @@ -1677,7 +1799,7 @@ private static CSharpCompilation CreateCompilationForOptionsSource(string assemb refAssemblies.Add(refAssembly); } - return await RoslynTestUtils.RunGenerator(new Generator(), refAssemblies.ToArray(), new List { source }, includeBaseReferences: true, languageVersion).ConfigureAwait(false); + return await RoslynTestUtils.RunGenerator(new OptionsValidatorGenerator(), refAssemblies.ToArray(), new List { source }, includeBaseReferences: true, languageVersion).ConfigureAwait(false); } private static async Task<(IReadOnlyList diagnostics, ImmutableArray generatedSources)> RunGenerator( @@ -1734,7 +1856,7 @@ private static CSharpCompilation CreateCompilationForOptionsSource(string assemb assemblies.Add(Assembly.GetAssembly(typeof(Microsoft.Extensions.Options.ValidateObjectMembersAttribute))!); } - var result = await RoslynTestUtils.RunGenerator(new Generator(), assemblies.ToArray(), new[] { text }) + var result = await RoslynTestUtils.RunGenerator(new OptionsValidatorGenerator(), assemblies.ToArray(), new[] { text }) .ConfigureAwait(false); return result; diff --git a/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/OptionsRuntimeTests.cs b/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/OptionsRuntimeTests.cs index 1ac4618014ba92..6109bccd296463 100644 --- a/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/OptionsRuntimeTests.cs +++ b/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/OptionsRuntimeTests.cs @@ -25,10 +25,15 @@ public void TestValidationSuccessResults() { Tall = 10, Id = "1", - Children = new() + Children1 = new() { - new ChildOptions() { Name = "C1" }, - new ChildOptions() { Name = "C2" } + new ChildOptions() { Name = "C1-1" }, + new ChildOptions() { Name = "C1-2" } + }, + Children2 = new List() + { + new ChildOptions() { Name = "C2-1" }, + new ChildOptions() { Name = "C2-2" } }, NestedList = new() { @@ -126,12 +131,19 @@ public void TestValidationWithEnumeration() { Tall = 10, Id = "1", - Children = new() + Children1 = new() { new ChildOptions(), new ChildOptions(), new ChildOptions() - } + }, + Children2 = new List() + { + new ChildOptions(), + new ChildOptions(), + new ChildOptions() + }, + } }; @@ -142,9 +154,12 @@ public void TestValidationWithEnumeration() Assert.True(result1.Failed); Assert.Equal(new List { - "Name: The MyOptions.Nested.Children[0].Name field is required.", - "Name: The MyOptions.Nested.Children[1].Name field is required.", - "Name: The MyOptions.Nested.Children[2].Name field is required.", + "Name: The MyOptions.Nested.Children1[0].Name field is required.", + "Name: The MyOptions.Nested.Children1[1].Name field is required.", + "Name: The MyOptions.Nested.Children1[2].Name field is required.", + "Name: The MyOptions.Nested.Children2[0].Name field is required.", + "Name: The MyOptions.Nested.Children2[1].Name field is required.", + "Name: The MyOptions.Nested.Children2[2].Name field is required.", }, result1.Failures); @@ -152,13 +167,40 @@ public void TestValidationWithEnumeration() Assert.True(result2.Failed); Assert.Equal(new List { - "DataAnnotation validation failed for 'MyOptions.Nested.Children[0]' members: 'Name' with the error: 'The Name field is required.'.", - "DataAnnotation validation failed for 'MyOptions.Nested.Children[1]' members: 'Name' with the error: 'The Name field is required.'.", - "DataAnnotation validation failed for 'MyOptions.Nested.Children[2]' members: 'Name' with the error: 'The Name field is required.'.", + "DataAnnotation validation failed for 'MyOptions.Nested.Children1[0]' members: 'Name' with the error: 'The Name field is required.'.", + "DataAnnotation validation failed for 'MyOptions.Nested.Children1[1]' members: 'Name' with the error: 'The Name field is required.'.", + "DataAnnotation validation failed for 'MyOptions.Nested.Children1[2]' members: 'Name' with the error: 'The Name field is required.'.", + "DataAnnotation validation failed for 'MyOptions.Nested.Children2[0]' members: 'Name' with the error: 'The Name field is required.'.", + "DataAnnotation validation failed for 'MyOptions.Nested.Children2[1]' members: 'Name' with the error: 'The Name field is required.'.", + "DataAnnotation validation failed for 'MyOptions.Nested.Children2[2]' members: 'Name' with the error: 'The Name field is required.'.", }, result2.Failures); } + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))] + public void TestObjectsWithIndexerProperties() + { + DataAnnotationValidateOptions dataAnnotationValidateOptions1 = new("MyDictionaryOptions"); + MyDictionaryOptionsOptionsValidator sourceGenOptionsValidator1 = new(); + + var options1 = new MyDictionaryOptions(); + ValidateOptionsResult result1 = sourceGenOptionsValidator1.Validate("MyDictionaryOptions", options1); + ValidateOptionsResult result2 = dataAnnotationValidateOptions1.Validate("MyDictionaryOptions", options1); + + Assert.True(result1.Succeeded); + Assert.True(result2.Succeeded); + + DataAnnotationValidateOptions> dataAnnotationValidateOptions2 = new("MyListOptions"); + MyListOptionsOptionsValidator sourceGenOptionsValidator2 = new(); + + var options2 = new MyListOptions() { Prop = "test" }; + result1 = sourceGenOptionsValidator2.Validate("MyListOptions", options2); + result2 = dataAnnotationValidateOptions2.Validate("MyListOptions", options2); + + Assert.True(result1.Succeeded); + Assert.True(result2.Succeeded); + } + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))] public void TestValidationWithCyclicReferences() { @@ -193,6 +235,37 @@ public void TestValidationWithCyclicReferences() ValidateOptionsResult result2 = dataAnnotationValidateOptions.Validate("MyOptions", options); Assert.True(result1.Succeeded); } + +#if NET8_0_OR_GREATER + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))] + public void TestNewDataAnnotationFailures() + { + NewAttributesValidator sourceGenValidator = new(); + + OptionsUsingNewAttributes validOptions = new() + { + P1 = "123456", P2 = 2, P3 = 4, P4 = "c", P5 = "d" + }; + + ValidateOptionsResult result = sourceGenValidator.Validate("OptionsUsingNewAttributes", validOptions); + Assert.True(result.Succeeded); + + OptionsUsingNewAttributes invalidOptions = new() + { + P1 = "123", P2 = 4, P3 = 1, P4 = "e", P5 = "c" + }; + + result = sourceGenValidator.Validate("OptionsUsingNewAttributes", invalidOptions); + + Assert.Equal(new []{ + "P1: The field OptionsUsingNewAttributes.P1 must be a string or collection type with a minimum length of '5' and maximum length of '10'.", + "P2: The OptionsUsingNewAttributes.P2 field does not equal any of the values specified in AllowedValuesAttribute.", + "P3: The OptionsUsingNewAttributes.P3 field equals one of the values specified in DeniedValuesAttribute.", + "P4: The OptionsUsingNewAttributes.P4 field does not equal any of the values specified in AllowedValuesAttribute.", + "P5: The OptionsUsingNewAttributes.P5 field equals one of the values specified in DeniedValuesAttribute." + }, result.Failures); + } +#endif // NET8_0_OR_GREATER } public class MyOptions @@ -219,7 +292,10 @@ public class NestedOptions public string? Id { get; set; } [ValidateEnumeratedItems] - public List? Children { get; set; } + public List? Children1 { get; set; } + + [ValidateEnumeratedItems] + public IEnumerable? Children2 { get; set; } #pragma warning disable SYSLIB1211 // Source gen does static analysis for circular reference. We need to disable it for this test. [ValidateEnumeratedItems] @@ -249,4 +325,35 @@ public struct MyOptionsStruct public partial class MySourceGenOptionsValidator : IValidateOptions { } + + public class MyDictionaryOptions : Dictionary { [Required] public string Prop { get; set; } = "test"; } + [OptionsValidator] public partial class MyDictionaryOptionsOptionsValidator : IValidateOptions { } + + public class MyListOptions : List { [Required] public T Prop { get; set; } = default; } + [OptionsValidator] public partial class MyListOptionsOptionsValidator : IValidateOptions> { } + +#if NET8_0_OR_GREATER + public class OptionsUsingNewAttributes + { + [Length(5, 10)] + public string P1 { get; set; } + + [AllowedValues(1, 2, 3)] + public int P2 { get; set; } + + [DeniedValues(1, 2, 3)] + public int P3 { get; set; } + + [AllowedValues(new object?[] { "a", "b", "c" })] + public string P4 { get; set; } + + [DeniedValues(new object?[] { "a", "b", "c" })] + public string P5 { get; set; } + } + + [OptionsValidator] + public partial class NewAttributesValidator : IValidateOptions + { + } +#endif // NET8_0_OR_GREATER } \ No newline at end of file diff --git a/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Baselines/NetCoreApp/Validators.g.cs b/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Baselines/NetCoreApp/Validators.g.cs index a467ed2dd6c007..cc1ebda6414e6b 100644 --- a/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Baselines/NetCoreApp/Validators.g.cs +++ b/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Baselines/NetCoreApp/Validators.g.cs @@ -14,22 +14,21 @@ internal sealed partial class __ThirdModelNoNamespaceValidator__ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public static global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::ThirdModelNoNamespace options) { - var baseName = (string.IsNullOrEmpty(name) ? "ThirdModelNoNamespace" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P5"; - context.DisplayName = baseName + "P5"; + context.DisplayName = string.IsNullOrEmpty(name) ? "ThirdModelNoNamespace.P5" : $"{name}.P5"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } partial class FirstValidatorNoNamespace @@ -43,32 +42,31 @@ partial class FirstValidatorNoNamespace [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::FirstModelNoNamespace options) { - var baseName = (string.IsNullOrEmpty(name) ? "FirstModelNoNamespace" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P1"; - context.DisplayName = baseName + "P1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "FirstModelNoNamespace.P1" : $"{name}.P1"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } if (options.P2 is not null) { - builder.AddResult(global::__OptionValidationStaticInstances.__Validators.V1.Validate(baseName + "P2", options.P2)); + (builder ??= new()).AddResult(global::__OptionValidationStaticInstances.__Validators.V1.Validate(string.IsNullOrEmpty(name) ? "FirstModelNoNamespace.P2" : $"{name}.P2", options.P2)); } if (options.P3 is not null) { - builder.AddResult(global::__ThirdModelNoNamespaceValidator__.Validate(baseName + "P3", options.P3)); + (builder ??= new()).AddResult(global::__ThirdModelNoNamespaceValidator__.Validate(string.IsNullOrEmpty(name) ? "FirstModelNoNamespace.P3" : $"{name}.P3", options.P3)); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } partial class SecondValidatorNoNamespace @@ -82,22 +80,21 @@ partial class SecondValidatorNoNamespace [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::SecondModelNoNamespace options) { - var baseName = (string.IsNullOrEmpty(name) ? "SecondModelNoNamespace" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P4"; - context.DisplayName = baseName + "P4"; + context.DisplayName = string.IsNullOrEmpty(name) ? "SecondModelNoNamespace.P4" : $"{name}.P4"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P4!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P4, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } namespace CustomAttr @@ -113,31 +110,30 @@ partial class FirstValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::CustomAttr.FirstModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "FirstModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "P1"; - context.DisplayName = baseName + "P1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "FirstModel.P1" : $"{name}.P1"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A3); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } context.MemberName = "P2"; - context.DisplayName = baseName + "P2"; + context.DisplayName = string.IsNullOrEmpty(name) ? "FirstModel.P2" : $"{name}.P2"; validationResults.Clear(); validationAttributes.Clear(); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A4); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P2!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P2, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -155,22 +151,21 @@ internal sealed partial class __SecondModelValidator__ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public static global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::Enumeration.SecondModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "SecondModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P6"; - context.DisplayName = baseName + "P6"; + context.DisplayName = string.IsNullOrEmpty(name) ? "SecondModel.P6" : $"{name}.P6"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P6!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P6, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -188,21 +183,20 @@ internal sealed partial class __ThirdModelValidator__ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public static global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::Enumeration.ThirdModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "ThirdModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "Value"; - context.DisplayName = baseName + "Value"; + context.DisplayName = string.IsNullOrEmpty(name) ? "ThirdModel.Value" : $"{name}.Value"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A5); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Value!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Value, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -219,8 +213,7 @@ partial struct FirstValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::Enumeration.FirstModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "FirstModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); if (options.P1 is not null) @@ -230,11 +223,11 @@ partial struct FirstValidator { if (o is not null) { - builder.AddResult(global::Enumeration.__SecondModelValidator__.Validate(baseName + $"P1[{count}]", o)); + (builder ??= new()).AddResult(global::Enumeration.__SecondModelValidator__.Validate(string.IsNullOrEmpty(name) ? $"FirstModel.P1[{count}]" : $"{name}.P1[{count}]", o)); } else { - builder.AddError(baseName + $"P1[{count}] is null"); + (builder ??= new()).AddError(string.IsNullOrEmpty(name) ? $"FirstModel.P1[{count}] is null" : $"{name}.P1[{count}] is null"); } count++; } @@ -247,11 +240,11 @@ partial struct FirstValidator { if (o is not null) { - builder.AddResult(global::__OptionValidationStaticInstances.__Validators.V2.Validate(baseName + $"P2[{count}]", o)); + (builder ??= new()).AddResult(global::__OptionValidationStaticInstances.__Validators.V2.Validate(string.IsNullOrEmpty(name) ? $"FirstModel.P2[{count}]" : $"{name}.P2[{count}]", o)); } else { - builder.AddError(baseName + $"P2[{count}] is null"); + (builder ??= new()).AddError(string.IsNullOrEmpty(name) ? $"FirstModel.P2[{count}] is null" : $"{name}.P2[{count}] is null"); } count++; } @@ -264,7 +257,7 @@ partial struct FirstValidator { if (o is not null) { - builder.AddResult(global::Enumeration.__SecondModelValidator__.Validate(baseName + $"P3[{count}]", o)); + (builder ??= new()).AddResult(global::Enumeration.__SecondModelValidator__.Validate(string.IsNullOrEmpty(name) ? $"FirstModel.P3[{count}]" : $"{name}.P3[{count}]", o)); } count++; } @@ -275,7 +268,7 @@ partial struct FirstValidator var count = 0; foreach (var o in options.P4) { - builder.AddResult(global::Enumeration.__ThirdModelValidator__.Validate(baseName + $"P4[{count++}]", o)); + (builder ??= new()).AddResult(global::Enumeration.__ThirdModelValidator__.Validate(string.IsNullOrEmpty(name) ? $"FirstModel.P4[{count++}] is null" : $"{name}.P4[{count++}] is null", o)); } } @@ -286,7 +279,7 @@ partial struct FirstValidator { if (o is not null) { - builder.AddResult(global::Enumeration.__ThirdModelValidator__.Validate(baseName + $"P5[{count}]", o.Value)); + (builder ??= new()).AddResult(global::Enumeration.__ThirdModelValidator__.Validate(string.IsNullOrEmpty(name) ? $"FirstModel.P5[{count}]" : $"{name}.P5[{count}]", o.Value)); } count++; } @@ -299,7 +292,7 @@ partial struct FirstValidator { if (o is not null) { - builder.AddResult(global::Enumeration.__ThirdModelValidator__.Validate(baseName + $"P51[{count}]", o.Value)); + (builder ??= new()).AddResult(global::Enumeration.__ThirdModelValidator__.Validate(string.IsNullOrEmpty(name) ? $"FirstModel.P51[{count}]" : $"{name}.P51[{count}]", o.Value)); } count++; } @@ -312,11 +305,11 @@ partial struct FirstValidator { if (o is not null) { - builder.AddResult(global::Enumeration.__SecondModelValidator__.Validate(baseName + $"P6[{count}]", o)); + (builder ??= new()).AddResult(global::Enumeration.__SecondModelValidator__.Validate(string.IsNullOrEmpty(name) ? $"FirstModel.P6[{count}]" : $"{name}.P6[{count}]", o)); } else { - builder.AddError(baseName + $"P6[{count}] is null"); + (builder ??= new()).AddError(string.IsNullOrEmpty(name) ? $"FirstModel.P6[{count}] is null" : $"{name}.P6[{count}] is null"); } count++; } @@ -328,11 +321,11 @@ partial struct FirstValidator { if (o is not null) { - builder.AddResult(global::Enumeration.__SecondModelValidator__.Validate(baseName + $"P7[{count}]", o)); + (builder ??= new()).AddResult(global::Enumeration.__SecondModelValidator__.Validate(string.IsNullOrEmpty(name) ? $"FirstModel.P7[{count}]" : $"{name}.P7[{count}]", o)); } else { - builder.AddError(baseName + $"P7[{count}] is null"); + (builder ??= new()).AddError(string.IsNullOrEmpty(name) ? $"FirstModel.P7[{count}] is null" : $"{name}.P7[{count}] is null"); } count++; } @@ -345,17 +338,17 @@ partial struct FirstValidator { if (o is not null) { - builder.AddResult(global::Enumeration.__SecondModelValidator__.Validate(baseName + $"P8[{count}]", o)); + (builder ??= new()).AddResult(global::Enumeration.__SecondModelValidator__.Validate(string.IsNullOrEmpty(name) ? $"FirstModel.P8[{count}]" : $"{name}.P8[{count}]", o)); } else { - builder.AddError(baseName + $"P8[{count}] is null"); + (builder ??= new()).AddError(string.IsNullOrEmpty(name) ? $"FirstModel.P8[{count}] is null" : $"{name}.P8[{count}] is null"); } count++; } } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -372,22 +365,21 @@ partial struct SecondValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::Enumeration.SecondModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "SecondModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P6"; - context.DisplayName = baseName + "P6"; + context.DisplayName = string.IsNullOrEmpty(name) ? "SecondModel.P6" : $"{name}.P6"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P6!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P6, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -404,22 +396,21 @@ partial struct FirstValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::FileScopedNamespace.FirstModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "FirstModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P1"; - context.DisplayName = baseName + "P1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "FirstModel.P1" : $"{name}.P1"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -436,21 +427,20 @@ partial struct FirstValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::FunnyStrings.FirstModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "FirstModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "P1"; - context.DisplayName = baseName + "P1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "FirstModel.P1" : $"{name}.P1"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A6); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -468,22 +458,21 @@ internal sealed partial class __SecondModelValidator__ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public static global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::Generics.SecondModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "SecondModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P4"; - context.DisplayName = baseName + "P4"; + context.DisplayName = string.IsNullOrEmpty(name) ? "SecondModel.P4" : $"{name}.P4"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P4!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P4, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -500,27 +489,26 @@ partial class FirstValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::Generics.FirstModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "FirstModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P1"; - context.DisplayName = baseName + "P1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "FirstModel.P1" : $"{name}.P1"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } if (options.P3 is not null) { - builder.AddResult(global::Generics.__SecondModelValidator__.Validate(baseName + "P3", options.P3)); + (builder ??= new()).AddResult(global::Generics.__SecondModelValidator__.Validate(string.IsNullOrEmpty(name) ? "FirstModel.P3" : $"{name}.P3", options.P3)); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -537,27 +525,26 @@ partial struct MultiValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::MultiModelValidator.FirstModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "FirstModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P1"; - context.DisplayName = baseName + "P1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "FirstModel.P1" : $"{name}.P1"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } if (options.P2 is not null) { - builder.AddResult(global::__OptionValidationStaticInstances.__Validators.V3.Validate(baseName + "P2", options.P2)); + (builder ??= new()).AddResult(global::__OptionValidationStaticInstances.__Validators.V3.Validate(string.IsNullOrEmpty(name) ? "FirstModel.P2" : $"{name}.P2", options.P2)); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } /// /// Validates a specific named options instance (or all when is ). @@ -568,22 +555,21 @@ partial struct MultiValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::MultiModelValidator.SecondModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "SecondModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P3"; - context.DisplayName = baseName + "P3"; + context.DisplayName = string.IsNullOrEmpty(name) ? "SecondModel.P3" : $"{name}.P3"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P3!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P3, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -601,22 +587,21 @@ internal sealed partial class __ThirdModelValidator__ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public static global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::Nested.Container1.ThirdModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "ThirdModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P6"; - context.DisplayName = baseName + "P6"; + context.DisplayName = string.IsNullOrEmpty(name) ? "ThirdModel.P6" : $"{name}.P6"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P6!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P6, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -635,22 +620,21 @@ partial record struct FifthValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::Nested.Container1.SecondModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "SecondModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P5"; - context.DisplayName = baseName + "P5"; + context.DisplayName = string.IsNullOrEmpty(name) ? "SecondModel.P5" : $"{name}.P5"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -672,34 +656,33 @@ partial struct FirstValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::Nested.Container1.FirstModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "FirstModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P1"; - context.DisplayName = baseName + "P1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "FirstModel.P1" : $"{name}.P1"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } if (options.P2 is not null) { - builder.AddResult(global::__OptionValidationStaticInstances.__Validators.V4.Validate(baseName + "P2", options.P2)); + (builder ??= new()).AddResult(global::__OptionValidationStaticInstances.__Validators.V4.Validate(string.IsNullOrEmpty(name) ? "FirstModel.P2" : $"{name}.P2", options.P2)); } - builder.AddResult(global::Nested.__ThirdModelValidator__.Validate(baseName + "P3", options.P3)); + (builder ??= new()).AddResult(global::Nested.__ThirdModelValidator__.Validate(string.IsNullOrEmpty(name) ? "FirstModel.P3" : $"{name}.P3", options.P3)); if (options.P4 is not null) { - builder.AddResult(global::__OptionValidationStaticInstances.__Validators.V5.Validate(baseName + "P4", options.P4)); + (builder ??= new()).AddResult(global::__OptionValidationStaticInstances.__Validators.V5.Validate(string.IsNullOrEmpty(name) ? "FirstModel.P4" : $"{name}.P4", options.P4)); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -720,22 +703,21 @@ partial struct FourthValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::Nested.Container1.SecondModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "SecondModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P5"; - context.DisplayName = baseName + "P5"; + context.DisplayName = string.IsNullOrEmpty(name) ? "SecondModel.P5" : $"{name}.P5"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -757,22 +739,21 @@ partial struct SecondValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::Nested.Container1.SecondModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "SecondModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P5"; - context.DisplayName = baseName + "P5"; + context.DisplayName = string.IsNullOrEmpty(name) ? "SecondModel.P5" : $"{name}.P5"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -795,22 +776,21 @@ partial struct ThirdValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::Nested.Container1.SecondModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "SecondModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P5"; - context.DisplayName = baseName + "P5"; + context.DisplayName = string.IsNullOrEmpty(name) ? "SecondModel.P5" : $"{name}.P5"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -829,22 +809,21 @@ partial class FirstValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::RandomMembers.FirstModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "FirstModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P1"; - context.DisplayName = baseName + "P1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "FirstModel.P1" : $"{name}.P1"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -862,22 +841,21 @@ internal sealed partial class __ThirdModelValidator__ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public static global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::RecordTypes.ThirdModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "ThirdModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P6"; - context.DisplayName = baseName + "P6"; + context.DisplayName = string.IsNullOrEmpty(name) ? "ThirdModel.P6" : $"{name}.P6"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P6!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P6, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -894,34 +872,33 @@ partial record struct FirstValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::RecordTypes.FirstModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "FirstModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P1"; - context.DisplayName = baseName + "P1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "FirstModel.P1" : $"{name}.P1"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } if (options.P2 is not null) { - builder.AddResult(global::__OptionValidationStaticInstances.__Validators.V6.Validate(baseName + "P2", options.P2)); + (builder ??= new()).AddResult(global::__OptionValidationStaticInstances.__Validators.V6.Validate(string.IsNullOrEmpty(name) ? "FirstModel.P2" : $"{name}.P2", options.P2)); } if (options.P3 is not null) { - builder.AddResult(global::__OptionValidationStaticInstances.__Validators.V7.Validate(baseName + "P3", options.P3)); + (builder ??= new()).AddResult(global::__OptionValidationStaticInstances.__Validators.V7.Validate(string.IsNullOrEmpty(name) ? "FirstModel.P3" : $"{name}.P3", options.P3)); } - builder.AddResult(global::RecordTypes.__ThirdModelValidator__.Validate(baseName + "P4", options.P4)); + (builder ??= new()).AddResult(global::RecordTypes.__ThirdModelValidator__.Validate(string.IsNullOrEmpty(name) ? "FirstModel.P4" : $"{name}.P4", options.P4)); - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -938,22 +915,21 @@ partial record struct SecondValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::RecordTypes.SecondModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "SecondModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P5"; - context.DisplayName = baseName + "P5"; + context.DisplayName = string.IsNullOrEmpty(name) ? "SecondModel.P5" : $"{name}.P5"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -970,22 +946,21 @@ partial record class ThirdValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::RecordTypes.SecondModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "SecondModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P5"; - context.DisplayName = baseName + "P5"; + context.DisplayName = string.IsNullOrEmpty(name) ? "SecondModel.P5" : $"{name}.P5"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1003,26 +978,25 @@ internal sealed partial class __SecondModelValidator__ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public static global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::RepeatedTypes.SecondModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "SecondModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "P4"; - context.DisplayName = baseName + "P4"; + context.DisplayName = string.IsNullOrEmpty(name) ? "SecondModel.P4" : $"{name}.P4"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P4!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P4, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } if (options.P4 is not null) { - builder.AddResult(global::RepeatedTypes.__ThirdModelValidator__.Validate(baseName + "P4", options.P4)); + (builder ??= new()).AddResult(global::RepeatedTypes.__ThirdModelValidator__.Validate(string.IsNullOrEmpty(name) ? "SecondModel.P4" : $"{name}.P4", options.P4)); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1040,22 +1014,21 @@ internal sealed partial class __ThirdModelValidator__ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public static global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::RepeatedTypes.ThirdModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "ThirdModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P5"; - context.DisplayName = baseName + "P5"; + context.DisplayName = string.IsNullOrEmpty(name) ? "ThirdModel.P5" : $"{name}.P5"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1072,56 +1045,55 @@ partial class FirstValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::RepeatedTypes.FirstModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "FirstModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "P1"; - context.DisplayName = baseName + "P1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "FirstModel.P1" : $"{name}.P1"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } if (options.P1 is not null) { - builder.AddResult(global::RepeatedTypes.__SecondModelValidator__.Validate(baseName + "P1", options.P1)); + (builder ??= new()).AddResult(global::RepeatedTypes.__SecondModelValidator__.Validate(string.IsNullOrEmpty(name) ? "FirstModel.P1" : $"{name}.P1", options.P1)); } context.MemberName = "P2"; - context.DisplayName = baseName + "P2"; + context.DisplayName = string.IsNullOrEmpty(name) ? "FirstModel.P2" : $"{name}.P2"; validationResults.Clear(); validationAttributes.Clear(); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P2!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P2, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } if (options.P2 is not null) { - builder.AddResult(global::RepeatedTypes.__SecondModelValidator__.Validate(baseName + "P2", options.P2)); + (builder ??= new()).AddResult(global::RepeatedTypes.__SecondModelValidator__.Validate(string.IsNullOrEmpty(name) ? "FirstModel.P2" : $"{name}.P2", options.P2)); } context.MemberName = "P3"; - context.DisplayName = baseName + "P3"; + context.DisplayName = string.IsNullOrEmpty(name) ? "FirstModel.P3" : $"{name}.P3"; validationResults.Clear(); validationAttributes.Clear(); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P3!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P3, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } if (options.P3 is not null) { - builder.AddResult(global::RepeatedTypes.__ThirdModelValidator__.Validate(baseName + "P3", options.P3)); + (builder ??= new()).AddResult(global::RepeatedTypes.__ThirdModelValidator__.Validate(string.IsNullOrEmpty(name) ? "FirstModel.P3" : $"{name}.P3", options.P3)); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1138,23 +1110,22 @@ partial struct FirstValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::SelfValidation.FirstModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "FirstModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "P1"; - context.DisplayName = baseName + "P1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "FirstModel.P1" : $"{name}.P1"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - builder.AddResults(((global::System.ComponentModel.DataAnnotations.IValidatableObject)options).Validate(context)); + (builder ??= new()).AddResults(((global::System.ComponentModel.DataAnnotations.IValidatableObject)options).Validate(context)); - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1172,21 +1143,20 @@ internal sealed partial class __RangeAttributeModelDoubleValidator__ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public static global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.RangeAttributeModelDouble options) { - var baseName = (string.IsNullOrEmpty(name) ? "RangeAttributeModelDouble" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "Val"; - context.DisplayName = baseName + "Val"; + context.DisplayName = string.IsNullOrEmpty(name) ? "RangeAttributeModelDouble.Val" : $"{name}.Val"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A7); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1204,21 +1174,20 @@ internal sealed partial class __RequiredAttributeModelValidator__ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public static global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.RequiredAttributeModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "RequiredAttributeModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "Val"; - context.DisplayName = baseName + "Val"; + context.DisplayName = string.IsNullOrEmpty(name) ? "RequiredAttributeModel.Val" : $"{name}.Val"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1236,36 +1205,35 @@ internal sealed partial class __TypeWithoutOptionsValidatorValidator__ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public static global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.TypeWithoutOptionsValidator options) { - var baseName = (string.IsNullOrEmpty(name) ? "TypeWithoutOptionsValidator" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "Val1"; - context.DisplayName = baseName + "Val1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "TypeWithoutOptionsValidator.Val1" : $"{name}.Val1"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val1!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val1, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } context.MemberName = "Val2"; - context.DisplayName = baseName + "Val2"; + context.DisplayName = string.IsNullOrEmpty(name) ? "TypeWithoutOptionsValidator.Val2" : $"{name}.Val2"; validationResults.Clear(); validationAttributes.Clear(); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A8); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val2!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val2, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } if (options.YetAnotherComplexVal is not null) { - builder.AddResult(global::TestClasses.OptionsValidation.__RangeAttributeModelDoubleValidator__.Validate(baseName + "YetAnotherComplexVal", options.YetAnotherComplexVal)); + (builder ??= new()).AddResult(global::TestClasses.OptionsValidation.__RangeAttributeModelDoubleValidator__.Validate(string.IsNullOrEmpty(name) ? "TypeWithoutOptionsValidator.YetAnotherComplexVal" : $"{name}.YetAnotherComplexVal", options.YetAnotherComplexVal)); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1282,31 +1250,30 @@ partial class AttributePropertyModelValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.AttributePropertyModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "AttributePropertyModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "Val1"; - context.DisplayName = baseName + "Val1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "AttributePropertyModel.Val1" : $"{name}.Val1"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A9); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val1!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val1, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } context.MemberName = "Val2"; - context.DisplayName = baseName + "Val2"; + context.DisplayName = string.IsNullOrEmpty(name) ? "AttributePropertyModel.Val2" : $"{name}.Val2"; validationResults.Clear(); validationAttributes.Clear(); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A10); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val2!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val2, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1323,21 +1290,20 @@ partial class ComplexModelValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.ComplexModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "ComplexModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); if (options.ComplexVal is not null) { - builder.AddResult(global::TestClasses.OptionsValidation.__RequiredAttributeModelValidator__.Validate(baseName + "ComplexVal", options.ComplexVal)); + (builder ??= new()).AddResult(global::TestClasses.OptionsValidation.__RequiredAttributeModelValidator__.Validate(string.IsNullOrEmpty(name) ? "ComplexModel.ComplexVal" : $"{name}.ComplexVal", options.ComplexVal)); } if (options.ValWithoutOptionsValidator is not null) { - builder.AddResult(global::TestClasses.OptionsValidation.__TypeWithoutOptionsValidatorValidator__.Validate(baseName + "ValWithoutOptionsValidator", options.ValWithoutOptionsValidator)); + (builder ??= new()).AddResult(global::TestClasses.OptionsValidation.__TypeWithoutOptionsValidatorValidator__.Validate(string.IsNullOrEmpty(name) ? "ComplexModel.ValWithoutOptionsValidator" : $"{name}.ValWithoutOptionsValidator", options.ValWithoutOptionsValidator)); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1354,21 +1320,20 @@ partial class CustomTypeCustomValidationAttributeModelValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.CustomTypeCustomValidationAttributeModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "CustomTypeCustomValidationAttributeModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "Val"; - context.DisplayName = baseName + "Val"; + context.DisplayName = string.IsNullOrEmpty(name) ? "CustomTypeCustomValidationAttributeModel.Val" : $"{name}.Val"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A11); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1385,21 +1350,20 @@ partial class CustomValidationAttributeModelValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.CustomValidationAttributeModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "CustomValidationAttributeModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "Val"; - context.DisplayName = baseName + "Val"; + context.DisplayName = string.IsNullOrEmpty(name) ? "CustomValidationAttributeModel.Val" : $"{name}.Val"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A12); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1416,21 +1380,20 @@ partial class DataTypeAttributeModelValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.DataTypeAttributeModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "DataTypeAttributeModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "Val"; - context.DisplayName = baseName + "Val"; + context.DisplayName = string.IsNullOrEmpty(name) ? "DataTypeAttributeModel.Val" : $"{name}.Val"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A13); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1447,41 +1410,40 @@ partial class DerivedModelValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.DerivedModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "DerivedModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "DerivedVal"; - context.DisplayName = baseName + "DerivedVal"; + context.DisplayName = string.IsNullOrEmpty(name) ? "DerivedModel.DerivedVal" : $"{name}.DerivedVal"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.DerivedVal!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.DerivedVal, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } context.MemberName = "VirtualValWithAttr"; - context.DisplayName = baseName + "VirtualValWithAttr"; + context.DisplayName = string.IsNullOrEmpty(name) ? "DerivedModel.VirtualValWithAttr" : $"{name}.VirtualValWithAttr"; validationResults.Clear(); validationAttributes.Clear(); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.VirtualValWithAttr!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.VirtualValWithAttr, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } context.MemberName = "Val"; - context.DisplayName = baseName + "Val"; + context.DisplayName = string.IsNullOrEmpty(name) ? "DerivedModel.Val" : $"{name}.Val"; validationResults.Clear(); validationAttributes.Clear(); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1498,21 +1460,20 @@ partial class EmailAttributeModelValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.EmailAttributeModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "EmailAttributeModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "Val"; - context.DisplayName = baseName + "Val"; + context.DisplayName = string.IsNullOrEmpty(name) ? "EmailAttributeModel.Val" : $"{name}.Val"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A14); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1529,41 +1490,40 @@ partial class LeafModelValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.LeafModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "LeafModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "VirtualValWithoutAttr"; - context.DisplayName = baseName + "VirtualValWithoutAttr"; + context.DisplayName = string.IsNullOrEmpty(name) ? "LeafModel.VirtualValWithoutAttr" : $"{name}.VirtualValWithoutAttr"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.VirtualValWithoutAttr!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.VirtualValWithoutAttr, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } context.MemberName = "DerivedVal"; - context.DisplayName = baseName + "DerivedVal"; + context.DisplayName = string.IsNullOrEmpty(name) ? "LeafModel.DerivedVal" : $"{name}.DerivedVal"; validationResults.Clear(); validationAttributes.Clear(); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.DerivedVal!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.DerivedVal, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } context.MemberName = "Val"; - context.DisplayName = baseName + "Val"; + context.DisplayName = string.IsNullOrEmpty(name) ? "LeafModel.Val" : $"{name}.Val"; validationResults.Clear(); validationAttributes.Clear(); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1580,52 +1540,51 @@ partial class MultipleAttributeModelValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.MultipleAttributeModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "MultipleAttributeModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "Val1"; - context.DisplayName = baseName + "Val1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "MultipleAttributeModel.Val1" : $"{name}.Val1"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A15); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val1!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val1, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } context.MemberName = "Val2"; - context.DisplayName = baseName + "Val2"; + context.DisplayName = string.IsNullOrEmpty(name) ? "MultipleAttributeModel.Val2" : $"{name}.Val2"; validationResults.Clear(); validationAttributes.Clear(); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A16); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val2!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val2, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } context.MemberName = "Val3"; - context.DisplayName = baseName + "Val3"; + context.DisplayName = string.IsNullOrEmpty(name) ? "MultipleAttributeModel.Val3" : $"{name}.Val3"; validationResults.Clear(); validationAttributes.Clear(); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A17); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val3!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val3, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } context.MemberName = "Val4"; - context.DisplayName = baseName + "Val4"; + context.DisplayName = string.IsNullOrEmpty(name) ? "MultipleAttributeModel.Val4" : $"{name}.Val4"; validationResults.Clear(); validationAttributes.Clear(); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A18); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val4!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val4, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1642,21 +1601,20 @@ partial class RangeAttributeModelDateValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.RangeAttributeModelDate options) { - var baseName = (string.IsNullOrEmpty(name) ? "RangeAttributeModelDate" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "Val"; - context.DisplayName = baseName + "Val"; + context.DisplayName = string.IsNullOrEmpty(name) ? "RangeAttributeModelDate.Val" : $"{name}.Val"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A19); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1673,21 +1631,20 @@ partial class RangeAttributeModelDoubleValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.RangeAttributeModelDouble options) { - var baseName = (string.IsNullOrEmpty(name) ? "RangeAttributeModelDouble" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "Val"; - context.DisplayName = baseName + "Val"; + context.DisplayName = string.IsNullOrEmpty(name) ? "RangeAttributeModelDouble.Val" : $"{name}.Val"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A7); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1704,21 +1661,20 @@ partial class RangeAttributeModelIntValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.RangeAttributeModelInt options) { - var baseName = (string.IsNullOrEmpty(name) ? "RangeAttributeModelInt" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "Val"; - context.DisplayName = baseName + "Val"; + context.DisplayName = string.IsNullOrEmpty(name) ? "RangeAttributeModelInt.Val" : $"{name}.Val"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A16); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1735,21 +1691,20 @@ partial class RegularExpressionAttributeModelValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.RegularExpressionAttributeModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "RegularExpressionAttributeModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "Val"; - context.DisplayName = baseName + "Val"; + context.DisplayName = string.IsNullOrEmpty(name) ? "RegularExpressionAttributeModel.Val" : $"{name}.Val"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A20); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1766,21 +1721,20 @@ partial class RequiredAttributeModelValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.RequiredAttributeModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "RequiredAttributeModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "Val"; - context.DisplayName = baseName + "Val"; + context.DisplayName = string.IsNullOrEmpty(name) ? "RequiredAttributeModel.Val" : $"{name}.Val"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1798,22 +1752,21 @@ internal sealed partial class __SecondModelValidator__ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public static global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::ValueTypes.SecondModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "SecondModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P4"; - context.DisplayName = baseName + "P4"; + context.DisplayName = string.IsNullOrEmpty(name) ? "SecondModel.P4" : $"{name}.P4"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P4!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P4, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1830,34 +1783,33 @@ partial struct FirstValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::ValueTypes.FirstModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "FirstModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P1"; - context.DisplayName = baseName + "P1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "FirstModel.P1" : $"{name}.P1"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } if (options.P2 is not null) { - builder.AddResult(global::ValueTypes.__SecondModelValidator__.Validate(baseName + "P2", options.P2.Value)); + (builder ??= new()).AddResult(global::ValueTypes.__SecondModelValidator__.Validate(string.IsNullOrEmpty(name) ? "FirstModel.P2" : $"{name}.P2", options.P2.Value)); } - builder.AddResult(global::ValueTypes.__SecondModelValidator__.Validate(baseName + "P3", options.P3)); + (builder ??= new()).AddResult(global::ValueTypes.__SecondModelValidator__.Validate(string.IsNullOrEmpty(name) ? "FirstModel.P3" : $"{name}.P3", options.P3)); if (options.P4 is not null) { - builder.AddResult(global::ValueTypes.__SecondModelValidator__.Validate(baseName + "P4", options.P4.Value)); + (builder ??= new()).AddResult(global::ValueTypes.__SecondModelValidator__.Validate(string.IsNullOrEmpty(name) ? "FirstModel.P4" : $"{name}.P4", options.P4.Value)); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } diff --git a/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Baselines/NetFX/Validators.g.cs b/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Baselines/NetFX/Validators.g.cs index 9c68710f2a5ec2..ebdcb1ad6d6ba7 100644 --- a/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Baselines/NetFX/Validators.g.cs +++ b/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Baselines/NetFX/Validators.g.cs @@ -14,22 +14,21 @@ internal sealed partial class __ThirdModelNoNamespaceValidator__ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public static global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::ThirdModelNoNamespace options) { - var baseName = (string.IsNullOrEmpty(name) ? "ThirdModelNoNamespace" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P5"; - context.DisplayName = baseName + "P5"; + context.DisplayName = string.IsNullOrEmpty(name) ? "ThirdModelNoNamespace.P5" : $"{name}.P5"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } partial class FirstValidatorNoNamespace @@ -43,32 +42,31 @@ partial class FirstValidatorNoNamespace [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::FirstModelNoNamespace options) { - var baseName = (string.IsNullOrEmpty(name) ? "FirstModelNoNamespace" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P1"; - context.DisplayName = baseName + "P1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "FirstModelNoNamespace.P1" : $"{name}.P1"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } if (options.P2 is not null) { - builder.AddResult(global::__OptionValidationStaticInstances.__Validators.V1.Validate(baseName + "P2", options.P2)); + (builder ??= new()).AddResult(global::__OptionValidationStaticInstances.__Validators.V1.Validate(string.IsNullOrEmpty(name) ? "FirstModelNoNamespace.P2" : $"{name}.P2", options.P2)); } if (options.P3 is not null) { - builder.AddResult(global::__ThirdModelNoNamespaceValidator__.Validate(baseName + "P3", options.P3)); + (builder ??= new()).AddResult(global::__ThirdModelNoNamespaceValidator__.Validate(string.IsNullOrEmpty(name) ? "FirstModelNoNamespace.P3" : $"{name}.P3", options.P3)); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } partial class SecondValidatorNoNamespace @@ -82,22 +80,21 @@ partial class SecondValidatorNoNamespace [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::SecondModelNoNamespace options) { - var baseName = (string.IsNullOrEmpty(name) ? "SecondModelNoNamespace" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P4"; - context.DisplayName = baseName + "P4"; + context.DisplayName = string.IsNullOrEmpty(name) ? "SecondModelNoNamespace.P4" : $"{name}.P4"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P4!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P4, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } namespace CustomAttr @@ -113,31 +110,30 @@ partial class FirstValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::CustomAttr.FirstModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "FirstModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "P1"; - context.DisplayName = baseName + "P1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "FirstModel.P1" : $"{name}.P1"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A3); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } context.MemberName = "P2"; - context.DisplayName = baseName + "P2"; + context.DisplayName = string.IsNullOrEmpty(name) ? "FirstModel.P2" : $"{name}.P2"; validationResults.Clear(); validationAttributes.Clear(); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A4); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P2!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P2, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -155,22 +151,21 @@ internal sealed partial class __SecondModelValidator__ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public static global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::Enumeration.SecondModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "SecondModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P6"; - context.DisplayName = baseName + "P6"; + context.DisplayName = string.IsNullOrEmpty(name) ? "SecondModel.P6" : $"{name}.P6"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P6!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P6, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -188,21 +183,20 @@ internal sealed partial class __ThirdModelValidator__ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public static global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::Enumeration.ThirdModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "ThirdModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "Value"; - context.DisplayName = baseName + "Value"; + context.DisplayName = string.IsNullOrEmpty(name) ? "ThirdModel.Value" : $"{name}.Value"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A5); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Value!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Value, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -219,8 +213,7 @@ partial struct FirstValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::Enumeration.FirstModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "FirstModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); if (options.P1 is not null) @@ -230,11 +223,11 @@ partial struct FirstValidator { if (o is not null) { - builder.AddResult(global::Enumeration.__SecondModelValidator__.Validate(baseName + $"P1[{count}]", o)); + (builder ??= new()).AddResult(global::Enumeration.__SecondModelValidator__.Validate(string.IsNullOrEmpty(name) ? $"FirstModel.P1[{count}]" : $"{name}.P1[{count}]", o)); } else { - builder.AddError(baseName + $"P1[{count}] is null"); + (builder ??= new()).AddError(string.IsNullOrEmpty(name) ? $"FirstModel.P1[{count}] is null" : $"{name}.P1[{count}] is null"); } count++; } @@ -247,11 +240,11 @@ partial struct FirstValidator { if (o is not null) { - builder.AddResult(global::__OptionValidationStaticInstances.__Validators.V2.Validate(baseName + $"P2[{count}]", o)); + (builder ??= new()).AddResult(global::__OptionValidationStaticInstances.__Validators.V2.Validate(string.IsNullOrEmpty(name) ? $"FirstModel.P2[{count}]" : $"{name}.P2[{count}]", o)); } else { - builder.AddError(baseName + $"P2[{count}] is null"); + (builder ??= new()).AddError(string.IsNullOrEmpty(name) ? $"FirstModel.P2[{count}] is null" : $"{name}.P2[{count}] is null"); } count++; } @@ -264,7 +257,7 @@ partial struct FirstValidator { if (o is not null) { - builder.AddResult(global::Enumeration.__SecondModelValidator__.Validate(baseName + $"P3[{count}]", o)); + (builder ??= new()).AddResult(global::Enumeration.__SecondModelValidator__.Validate(string.IsNullOrEmpty(name) ? $"FirstModel.P3[{count}]" : $"{name}.P3[{count}]", o)); } count++; } @@ -275,7 +268,7 @@ partial struct FirstValidator var count = 0; foreach (var o in options.P4) { - builder.AddResult(global::Enumeration.__ThirdModelValidator__.Validate(baseName + $"P4[{count++}]", o)); + (builder ??= new()).AddResult(global::Enumeration.__ThirdModelValidator__.Validate(string.IsNullOrEmpty(name) ? $"FirstModel.P4[{count++}] is null" : $"{name}.P4[{count++}] is null", o)); } } @@ -286,7 +279,7 @@ partial struct FirstValidator { if (o is not null) { - builder.AddResult(global::Enumeration.__ThirdModelValidator__.Validate(baseName + $"P5[{count}]", o.Value)); + (builder ??= new()).AddResult(global::Enumeration.__ThirdModelValidator__.Validate(string.IsNullOrEmpty(name) ? $"FirstModel.P5[{count}]" : $"{name}.P5[{count}]", o.Value)); } count++; } @@ -299,7 +292,7 @@ partial struct FirstValidator { if (o is not null) { - builder.AddResult(global::Enumeration.__ThirdModelValidator__.Validate(baseName + $"P51[{count}]", o.Value)); + (builder ??= new()).AddResult(global::Enumeration.__ThirdModelValidator__.Validate(string.IsNullOrEmpty(name) ? $"FirstModel.P51[{count}]" : $"{name}.P51[{count}]", o.Value)); } count++; } @@ -312,11 +305,11 @@ partial struct FirstValidator { if (o is not null) { - builder.AddResult(global::Enumeration.__SecondModelValidator__.Validate(baseName + $"P6[{count}]", o)); + (builder ??= new()).AddResult(global::Enumeration.__SecondModelValidator__.Validate(string.IsNullOrEmpty(name) ? $"FirstModel.P6[{count}]" : $"{name}.P6[{count}]", o)); } else { - builder.AddError(baseName + $"P6[{count}] is null"); + (builder ??= new()).AddError(string.IsNullOrEmpty(name) ? $"FirstModel.P6[{count}] is null" : $"{name}.P6[{count}] is null"); } count++; } @@ -328,11 +321,11 @@ partial struct FirstValidator { if (o is not null) { - builder.AddResult(global::Enumeration.__SecondModelValidator__.Validate(baseName + $"P7[{count}]", o)); + (builder ??= new()).AddResult(global::Enumeration.__SecondModelValidator__.Validate(string.IsNullOrEmpty(name) ? $"FirstModel.P7[{count}]" : $"{name}.P7[{count}]", o)); } else { - builder.AddError(baseName + $"P7[{count}] is null"); + (builder ??= new()).AddError(string.IsNullOrEmpty(name) ? $"FirstModel.P7[{count}] is null" : $"{name}.P7[{count}] is null"); } count++; } @@ -345,17 +338,17 @@ partial struct FirstValidator { if (o is not null) { - builder.AddResult(global::Enumeration.__SecondModelValidator__.Validate(baseName + $"P8[{count}]", o)); + (builder ??= new()).AddResult(global::Enumeration.__SecondModelValidator__.Validate(string.IsNullOrEmpty(name) ? $"FirstModel.P8[{count}]" : $"{name}.P8[{count}]", o)); } else { - builder.AddError(baseName + $"P8[{count}] is null"); + (builder ??= new()).AddError(string.IsNullOrEmpty(name) ? $"FirstModel.P8[{count}] is null" : $"{name}.P8[{count}] is null"); } count++; } } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -372,22 +365,21 @@ partial struct SecondValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::Enumeration.SecondModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "SecondModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P6"; - context.DisplayName = baseName + "P6"; + context.DisplayName = string.IsNullOrEmpty(name) ? "SecondModel.P6" : $"{name}.P6"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P6!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P6, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -404,22 +396,21 @@ partial struct FirstValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::FileScopedNamespace.FirstModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "FirstModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P1"; - context.DisplayName = baseName + "P1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "FirstModel.P1" : $"{name}.P1"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -436,21 +427,20 @@ partial struct FirstValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::FunnyStrings.FirstModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "FirstModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "P1"; - context.DisplayName = baseName + "P1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "FirstModel.P1" : $"{name}.P1"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A6); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -468,22 +458,21 @@ internal sealed partial class __SecondModelValidator__ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public static global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::Generics.SecondModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "SecondModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P4"; - context.DisplayName = baseName + "P4"; + context.DisplayName = string.IsNullOrEmpty(name) ? "SecondModel.P4" : $"{name}.P4"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P4!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P4, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -500,27 +489,26 @@ partial class FirstValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::Generics.FirstModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "FirstModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P1"; - context.DisplayName = baseName + "P1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "FirstModel.P1" : $"{name}.P1"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } if (options.P3 is not null) { - builder.AddResult(global::Generics.__SecondModelValidator__.Validate(baseName + "P3", options.P3)); + (builder ??= new()).AddResult(global::Generics.__SecondModelValidator__.Validate(string.IsNullOrEmpty(name) ? "FirstModel.P3" : $"{name}.P3", options.P3)); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -537,27 +525,26 @@ partial struct MultiValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::MultiModelValidator.FirstModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "FirstModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P1"; - context.DisplayName = baseName + "P1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "FirstModel.P1" : $"{name}.P1"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } if (options.P2 is not null) { - builder.AddResult(global::__OptionValidationStaticInstances.__Validators.V3.Validate(baseName + "P2", options.P2)); + (builder ??= new()).AddResult(global::__OptionValidationStaticInstances.__Validators.V3.Validate(string.IsNullOrEmpty(name) ? "FirstModel.P2" : $"{name}.P2", options.P2)); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } /// /// Validates a specific named options instance (or all when is ). @@ -568,22 +555,21 @@ partial struct MultiValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::MultiModelValidator.SecondModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "SecondModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P3"; - context.DisplayName = baseName + "P3"; + context.DisplayName = string.IsNullOrEmpty(name) ? "SecondModel.P3" : $"{name}.P3"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P3!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P3, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -601,22 +587,21 @@ internal sealed partial class __ThirdModelValidator__ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public static global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::Nested.Container1.ThirdModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "ThirdModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P6"; - context.DisplayName = baseName + "P6"; + context.DisplayName = string.IsNullOrEmpty(name) ? "ThirdModel.P6" : $"{name}.P6"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P6!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P6, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -635,22 +620,21 @@ partial record struct FifthValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::Nested.Container1.SecondModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "SecondModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P5"; - context.DisplayName = baseName + "P5"; + context.DisplayName = string.IsNullOrEmpty(name) ? "SecondModel.P5" : $"{name}.P5"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -672,34 +656,33 @@ partial struct FirstValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::Nested.Container1.FirstModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "FirstModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P1"; - context.DisplayName = baseName + "P1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "FirstModel.P1" : $"{name}.P1"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } if (options.P2 is not null) { - builder.AddResult(global::__OptionValidationStaticInstances.__Validators.V4.Validate(baseName + "P2", options.P2)); + (builder ??= new()).AddResult(global::__OptionValidationStaticInstances.__Validators.V4.Validate(string.IsNullOrEmpty(name) ? "FirstModel.P2" : $"{name}.P2", options.P2)); } - builder.AddResult(global::Nested.__ThirdModelValidator__.Validate(baseName + "P3", options.P3)); + (builder ??= new()).AddResult(global::Nested.__ThirdModelValidator__.Validate(string.IsNullOrEmpty(name) ? "FirstModel.P3" : $"{name}.P3", options.P3)); if (options.P4 is not null) { - builder.AddResult(global::__OptionValidationStaticInstances.__Validators.V5.Validate(baseName + "P4", options.P4)); + (builder ??= new()).AddResult(global::__OptionValidationStaticInstances.__Validators.V5.Validate(string.IsNullOrEmpty(name) ? "FirstModel.P4" : $"{name}.P4", options.P4)); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -720,22 +703,21 @@ partial struct FourthValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::Nested.Container1.SecondModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "SecondModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P5"; - context.DisplayName = baseName + "P5"; + context.DisplayName = string.IsNullOrEmpty(name) ? "SecondModel.P5" : $"{name}.P5"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -757,22 +739,21 @@ partial struct SecondValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::Nested.Container1.SecondModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "SecondModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P5"; - context.DisplayName = baseName + "P5"; + context.DisplayName = string.IsNullOrEmpty(name) ? "SecondModel.P5" : $"{name}.P5"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -795,22 +776,21 @@ partial struct ThirdValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::Nested.Container1.SecondModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "SecondModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P5"; - context.DisplayName = baseName + "P5"; + context.DisplayName = string.IsNullOrEmpty(name) ? "SecondModel.P5" : $"{name}.P5"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -829,22 +809,21 @@ partial class FirstValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::RandomMembers.FirstModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "FirstModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P1"; - context.DisplayName = baseName + "P1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "FirstModel.P1" : $"{name}.P1"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -862,22 +841,21 @@ internal sealed partial class __ThirdModelValidator__ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public static global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::RecordTypes.ThirdModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "ThirdModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P6"; - context.DisplayName = baseName + "P6"; + context.DisplayName = string.IsNullOrEmpty(name) ? "ThirdModel.P6" : $"{name}.P6"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P6!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P6, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -894,34 +872,33 @@ partial record struct FirstValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::RecordTypes.FirstModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "FirstModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P1"; - context.DisplayName = baseName + "P1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "FirstModel.P1" : $"{name}.P1"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } if (options.P2 is not null) { - builder.AddResult(global::__OptionValidationStaticInstances.__Validators.V6.Validate(baseName + "P2", options.P2)); + (builder ??= new()).AddResult(global::__OptionValidationStaticInstances.__Validators.V6.Validate(string.IsNullOrEmpty(name) ? "FirstModel.P2" : $"{name}.P2", options.P2)); } if (options.P3 is not null) { - builder.AddResult(global::__OptionValidationStaticInstances.__Validators.V7.Validate(baseName + "P3", options.P3)); + (builder ??= new()).AddResult(global::__OptionValidationStaticInstances.__Validators.V7.Validate(string.IsNullOrEmpty(name) ? "FirstModel.P3" : $"{name}.P3", options.P3)); } - builder.AddResult(global::RecordTypes.__ThirdModelValidator__.Validate(baseName + "P4", options.P4)); + (builder ??= new()).AddResult(global::RecordTypes.__ThirdModelValidator__.Validate(string.IsNullOrEmpty(name) ? "FirstModel.P4" : $"{name}.P4", options.P4)); - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -938,22 +915,21 @@ partial record struct SecondValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::RecordTypes.SecondModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "SecondModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P5"; - context.DisplayName = baseName + "P5"; + context.DisplayName = string.IsNullOrEmpty(name) ? "SecondModel.P5" : $"{name}.P5"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -970,22 +946,21 @@ partial record class ThirdValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::RecordTypes.SecondModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "SecondModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P5"; - context.DisplayName = baseName + "P5"; + context.DisplayName = string.IsNullOrEmpty(name) ? "SecondModel.P5" : $"{name}.P5"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1003,26 +978,25 @@ internal sealed partial class __SecondModelValidator__ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public static global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::RepeatedTypes.SecondModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "SecondModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "P4"; - context.DisplayName = baseName + "P4"; + context.DisplayName = string.IsNullOrEmpty(name) ? "SecondModel.P4" : $"{name}.P4"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P4!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P4, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } if (options.P4 is not null) { - builder.AddResult(global::RepeatedTypes.__ThirdModelValidator__.Validate(baseName + "P4", options.P4)); + (builder ??= new()).AddResult(global::RepeatedTypes.__ThirdModelValidator__.Validate(string.IsNullOrEmpty(name) ? "SecondModel.P4" : $"{name}.P4", options.P4)); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1040,22 +1014,21 @@ internal sealed partial class __ThirdModelValidator__ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public static global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::RepeatedTypes.ThirdModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "ThirdModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P5"; - context.DisplayName = baseName + "P5"; + context.DisplayName = string.IsNullOrEmpty(name) ? "ThirdModel.P5" : $"{name}.P5"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P5, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1072,56 +1045,55 @@ partial class FirstValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::RepeatedTypes.FirstModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "FirstModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "P1"; - context.DisplayName = baseName + "P1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "FirstModel.P1" : $"{name}.P1"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } if (options.P1 is not null) { - builder.AddResult(global::RepeatedTypes.__SecondModelValidator__.Validate(baseName + "P1", options.P1)); + (builder ??= new()).AddResult(global::RepeatedTypes.__SecondModelValidator__.Validate(string.IsNullOrEmpty(name) ? "FirstModel.P1" : $"{name}.P1", options.P1)); } context.MemberName = "P2"; - context.DisplayName = baseName + "P2"; + context.DisplayName = string.IsNullOrEmpty(name) ? "FirstModel.P2" : $"{name}.P2"; validationResults.Clear(); validationAttributes.Clear(); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P2!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P2, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } if (options.P2 is not null) { - builder.AddResult(global::RepeatedTypes.__SecondModelValidator__.Validate(baseName + "P2", options.P2)); + (builder ??= new()).AddResult(global::RepeatedTypes.__SecondModelValidator__.Validate(string.IsNullOrEmpty(name) ? "FirstModel.P2" : $"{name}.P2", options.P2)); } context.MemberName = "P3"; - context.DisplayName = baseName + "P3"; + context.DisplayName = string.IsNullOrEmpty(name) ? "FirstModel.P3" : $"{name}.P3"; validationResults.Clear(); validationAttributes.Clear(); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P3!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P3, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } if (options.P3 is not null) { - builder.AddResult(global::RepeatedTypes.__ThirdModelValidator__.Validate(baseName + "P3", options.P3)); + (builder ??= new()).AddResult(global::RepeatedTypes.__ThirdModelValidator__.Validate(string.IsNullOrEmpty(name) ? "FirstModel.P3" : $"{name}.P3", options.P3)); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1138,23 +1110,22 @@ partial struct FirstValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::SelfValidation.FirstModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "FirstModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "P1"; - context.DisplayName = baseName + "P1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "FirstModel.P1" : $"{name}.P1"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - builder.AddResults(((global::System.ComponentModel.DataAnnotations.IValidatableObject)options).Validate(context)); + (builder ??= new()).AddResults(((global::System.ComponentModel.DataAnnotations.IValidatableObject)options).Validate(context)); - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1172,21 +1143,20 @@ internal sealed partial class __RangeAttributeModelDoubleValidator__ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public static global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.RangeAttributeModelDouble options) { - var baseName = (string.IsNullOrEmpty(name) ? "RangeAttributeModelDouble" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "Val"; - context.DisplayName = baseName + "Val"; + context.DisplayName = string.IsNullOrEmpty(name) ? "RangeAttributeModelDouble.Val" : $"{name}.Val"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A7); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1204,21 +1174,20 @@ internal sealed partial class __RequiredAttributeModelValidator__ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public static global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.RequiredAttributeModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "RequiredAttributeModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "Val"; - context.DisplayName = baseName + "Val"; + context.DisplayName = string.IsNullOrEmpty(name) ? "RequiredAttributeModel.Val" : $"{name}.Val"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1236,36 +1205,35 @@ internal sealed partial class __TypeWithoutOptionsValidatorValidator__ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public static global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.TypeWithoutOptionsValidator options) { - var baseName = (string.IsNullOrEmpty(name) ? "TypeWithoutOptionsValidator" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "Val1"; - context.DisplayName = baseName + "Val1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "TypeWithoutOptionsValidator.Val1" : $"{name}.Val1"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val1!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val1, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } context.MemberName = "Val2"; - context.DisplayName = baseName + "Val2"; + context.DisplayName = string.IsNullOrEmpty(name) ? "TypeWithoutOptionsValidator.Val2" : $"{name}.Val2"; validationResults.Clear(); validationAttributes.Clear(); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A8); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val2!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val2, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } if (options.YetAnotherComplexVal is not null) { - builder.AddResult(global::TestClasses.OptionsValidation.__RangeAttributeModelDoubleValidator__.Validate(baseName + "YetAnotherComplexVal", options.YetAnotherComplexVal)); + (builder ??= new()).AddResult(global::TestClasses.OptionsValidation.__RangeAttributeModelDoubleValidator__.Validate(string.IsNullOrEmpty(name) ? "TypeWithoutOptionsValidator.YetAnotherComplexVal" : $"{name}.YetAnotherComplexVal", options.YetAnotherComplexVal)); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1282,31 +1250,30 @@ partial class AttributePropertyModelValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.AttributePropertyModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "AttributePropertyModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "Val1"; - context.DisplayName = baseName + "Val1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "AttributePropertyModel.Val1" : $"{name}.Val1"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A9); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val1!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val1, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } context.MemberName = "Val2"; - context.DisplayName = baseName + "Val2"; + context.DisplayName = string.IsNullOrEmpty(name) ? "AttributePropertyModel.Val2" : $"{name}.Val2"; validationResults.Clear(); validationAttributes.Clear(); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A10); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val2!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val2, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1323,21 +1290,20 @@ partial class ComplexModelValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.ComplexModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "ComplexModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); if (options.ComplexVal is not null) { - builder.AddResult(global::TestClasses.OptionsValidation.__RequiredAttributeModelValidator__.Validate(baseName + "ComplexVal", options.ComplexVal)); + (builder ??= new()).AddResult(global::TestClasses.OptionsValidation.__RequiredAttributeModelValidator__.Validate(string.IsNullOrEmpty(name) ? "ComplexModel.ComplexVal" : $"{name}.ComplexVal", options.ComplexVal)); } if (options.ValWithoutOptionsValidator is not null) { - builder.AddResult(global::TestClasses.OptionsValidation.__TypeWithoutOptionsValidatorValidator__.Validate(baseName + "ValWithoutOptionsValidator", options.ValWithoutOptionsValidator)); + (builder ??= new()).AddResult(global::TestClasses.OptionsValidation.__TypeWithoutOptionsValidatorValidator__.Validate(string.IsNullOrEmpty(name) ? "ComplexModel.ValWithoutOptionsValidator" : $"{name}.ValWithoutOptionsValidator", options.ValWithoutOptionsValidator)); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1354,21 +1320,20 @@ partial class CustomTypeCustomValidationAttributeModelValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.CustomTypeCustomValidationAttributeModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "CustomTypeCustomValidationAttributeModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "Val"; - context.DisplayName = baseName + "Val"; + context.DisplayName = string.IsNullOrEmpty(name) ? "CustomTypeCustomValidationAttributeModel.Val" : $"{name}.Val"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A11); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1385,21 +1350,20 @@ partial class CustomValidationAttributeModelValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.CustomValidationAttributeModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "CustomValidationAttributeModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "Val"; - context.DisplayName = baseName + "Val"; + context.DisplayName = string.IsNullOrEmpty(name) ? "CustomValidationAttributeModel.Val" : $"{name}.Val"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A12); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1416,21 +1380,20 @@ partial class DataTypeAttributeModelValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.DataTypeAttributeModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "DataTypeAttributeModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "Val"; - context.DisplayName = baseName + "Val"; + context.DisplayName = string.IsNullOrEmpty(name) ? "DataTypeAttributeModel.Val" : $"{name}.Val"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A13); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1447,41 +1410,40 @@ partial class DerivedModelValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.DerivedModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "DerivedModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "DerivedVal"; - context.DisplayName = baseName + "DerivedVal"; + context.DisplayName = string.IsNullOrEmpty(name) ? "DerivedModel.DerivedVal" : $"{name}.DerivedVal"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.DerivedVal!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.DerivedVal, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } context.MemberName = "VirtualValWithAttr"; - context.DisplayName = baseName + "VirtualValWithAttr"; + context.DisplayName = string.IsNullOrEmpty(name) ? "DerivedModel.VirtualValWithAttr" : $"{name}.VirtualValWithAttr"; validationResults.Clear(); validationAttributes.Clear(); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.VirtualValWithAttr!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.VirtualValWithAttr, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } context.MemberName = "Val"; - context.DisplayName = baseName + "Val"; + context.DisplayName = string.IsNullOrEmpty(name) ? "DerivedModel.Val" : $"{name}.Val"; validationResults.Clear(); validationAttributes.Clear(); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1498,21 +1460,20 @@ partial class EmailAttributeModelValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.EmailAttributeModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "EmailAttributeModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "Val"; - context.DisplayName = baseName + "Val"; + context.DisplayName = string.IsNullOrEmpty(name) ? "EmailAttributeModel.Val" : $"{name}.Val"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A14); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1529,41 +1490,40 @@ partial class LeafModelValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.LeafModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "LeafModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "VirtualValWithoutAttr"; - context.DisplayName = baseName + "VirtualValWithoutAttr"; + context.DisplayName = string.IsNullOrEmpty(name) ? "LeafModel.VirtualValWithoutAttr" : $"{name}.VirtualValWithoutAttr"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.VirtualValWithoutAttr!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.VirtualValWithoutAttr, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } context.MemberName = "DerivedVal"; - context.DisplayName = baseName + "DerivedVal"; + context.DisplayName = string.IsNullOrEmpty(name) ? "LeafModel.DerivedVal" : $"{name}.DerivedVal"; validationResults.Clear(); validationAttributes.Clear(); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.DerivedVal!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.DerivedVal, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } context.MemberName = "Val"; - context.DisplayName = baseName + "Val"; + context.DisplayName = string.IsNullOrEmpty(name) ? "LeafModel.Val" : $"{name}.Val"; validationResults.Clear(); validationAttributes.Clear(); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1580,52 +1540,51 @@ partial class MultipleAttributeModelValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.MultipleAttributeModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "MultipleAttributeModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "Val1"; - context.DisplayName = baseName + "Val1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "MultipleAttributeModel.Val1" : $"{name}.Val1"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A15); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val1!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val1, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } context.MemberName = "Val2"; - context.DisplayName = baseName + "Val2"; + context.DisplayName = string.IsNullOrEmpty(name) ? "MultipleAttributeModel.Val2" : $"{name}.Val2"; validationResults.Clear(); validationAttributes.Clear(); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A16); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val2!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val2, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } context.MemberName = "Val3"; - context.DisplayName = baseName + "Val3"; + context.DisplayName = string.IsNullOrEmpty(name) ? "MultipleAttributeModel.Val3" : $"{name}.Val3"; validationResults.Clear(); validationAttributes.Clear(); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A17); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val3!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val3, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } context.MemberName = "Val4"; - context.DisplayName = baseName + "Val4"; + context.DisplayName = string.IsNullOrEmpty(name) ? "MultipleAttributeModel.Val4" : $"{name}.Val4"; validationResults.Clear(); validationAttributes.Clear(); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A18); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val4!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val4, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1642,21 +1601,20 @@ partial class RangeAttributeModelDateValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.RangeAttributeModelDate options) { - var baseName = (string.IsNullOrEmpty(name) ? "RangeAttributeModelDate" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "Val"; - context.DisplayName = baseName + "Val"; + context.DisplayName = string.IsNullOrEmpty(name) ? "RangeAttributeModelDate.Val" : $"{name}.Val"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A8); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1673,21 +1631,20 @@ partial class RangeAttributeModelDoubleValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.RangeAttributeModelDouble options) { - var baseName = (string.IsNullOrEmpty(name) ? "RangeAttributeModelDouble" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "Val"; - context.DisplayName = baseName + "Val"; + context.DisplayName = string.IsNullOrEmpty(name) ? "RangeAttributeModelDouble.Val" : $"{name}.Val"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A7); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1704,21 +1661,20 @@ partial class RangeAttributeModelIntValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.RangeAttributeModelInt options) { - var baseName = (string.IsNullOrEmpty(name) ? "RangeAttributeModelInt" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "Val"; - context.DisplayName = baseName + "Val"; + context.DisplayName = string.IsNullOrEmpty(name) ? "RangeAttributeModelInt.Val" : $"{name}.Val"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A16); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1735,21 +1691,20 @@ partial class RegularExpressionAttributeModelValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.RegularExpressionAttributeModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "RegularExpressionAttributeModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "Val"; - context.DisplayName = baseName + "Val"; + context.DisplayName = string.IsNullOrEmpty(name) ? "RegularExpressionAttributeModel.Val" : $"{name}.Val"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A19); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1766,21 +1721,20 @@ partial class RequiredAttributeModelValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.RequiredAttributeModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "RequiredAttributeModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(1); context.MemberName = "Val"; - context.DisplayName = baseName + "Val"; + context.DisplayName = string.IsNullOrEmpty(name) ? "RequiredAttributeModel.Val" : $"{name}.Val"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1798,22 +1752,21 @@ internal sealed partial class __SecondModelValidator__ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public static global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::ValueTypes.SecondModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "SecondModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P4"; - context.DisplayName = baseName + "P4"; + context.DisplayName = string.IsNullOrEmpty(name) ? "SecondModel.P4" : $"{name}.P4"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P4!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P4, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } @@ -1830,34 +1783,33 @@ partial struct FirstValidator [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::ValueTypes.FirstModel options) { - var baseName = (string.IsNullOrEmpty(name) ? "FirstModel" : name) + "."; - var builder = new global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder(); + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); var validationResults = new global::System.Collections.Generic.List(); var validationAttributes = new global::System.Collections.Generic.List(2); context.MemberName = "P1"; - context.DisplayName = baseName + "P1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "FirstModel.P1" : $"{name}.P1"; validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A1); validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A2); - if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1!, context, validationResults, validationAttributes)) + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1, context, validationResults, validationAttributes)) { - builder.AddResults(validationResults); + (builder ??= new()).AddResults(validationResults); } if (options.P2 is not null) { - builder.AddResult(global::ValueTypes.__SecondModelValidator__.Validate(baseName + "P2", options.P2.Value)); + (builder ??= new()).AddResult(global::ValueTypes.__SecondModelValidator__.Validate(string.IsNullOrEmpty(name) ? "FirstModel.P2" : $"{name}.P2", options.P2.Value)); } - builder.AddResult(global::ValueTypes.__SecondModelValidator__.Validate(baseName + "P3", options.P3)); + (builder ??= new()).AddResult(global::ValueTypes.__SecondModelValidator__.Validate(string.IsNullOrEmpty(name) ? "FirstModel.P3" : $"{name}.P3", options.P3)); if (options.P4 is not null) { - builder.AddResult(global::ValueTypes.__SecondModelValidator__.Validate(baseName + "P4", options.P4.Value)); + (builder ??= new()).AddResult(global::ValueTypes.__SecondModelValidator__.Validate(string.IsNullOrEmpty(name) ? "FirstModel.P4" : $"{name}.P4", options.P4.Value)); } - return builder.Build(); + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } } diff --git a/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/EmitterTests.cs b/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/EmitterTests.cs index fe3e007e0464d8..af91cab872c88f 100644 --- a/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/EmitterTests.cs +++ b/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/EmitterTests.cs @@ -32,7 +32,7 @@ public async Task TestEmitter() } var (d, r) = await RoslynTestUtils.RunGenerator( - new Generator(), + new OptionsValidatorGenerator(), new[] { Assembly.GetAssembly(typeof(RequiredAttribute))!, diff --git a/src/libraries/Microsoft.Extensions.Primitives/Microsoft.Extensions.Primitives.sln b/src/libraries/Microsoft.Extensions.Primitives/Microsoft.Extensions.Primitives.sln index 2dcf9cd2b36ab5..a1e7da32e323cf 100644 --- a/src/libraries/Microsoft.Extensions.Primitives/Microsoft.Extensions.Primitives.sln +++ b/src/libraries/Microsoft.Extensions.Primitives/Microsoft.Extensions.Primitives.sln @@ -7,12 +7,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primit EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Primitives.Tests", "tests\Microsoft.Extensions.Primitives.Tests.csproj", "{43DBAD84-A865-4F5F-AB76-7F3EB6784E99}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{9E533FC4-A2C1-4021-8102-DE440A731236}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{87AA8A4F-2785-4E1D-BAB2-3C6414C8D387}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{959348BC-2D38-41F4-9F3D-2E1CD18D9477}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{AB1FA57B-0C7A-4181-B28C-2D8B63AF602B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{92CF1194-29BD-444D-952E-77EEA741D8DD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{53929125-1EA0-4510-B345-BA0A3BAFF33E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{C363A5DE-43B7-405E-AD76-5A9D4591DEC0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{99B9F0A6-46B8-4B04-B887-7ACE1EF0DD61}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{76DC9C4C-EE53-47E6-B6BF-7B135EA8CAF3}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{9BF048D0-411D-4C2A-8C32-3A3255501D27}" @@ -21,6 +29,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A447D0CB-601 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{069D6714-DE43-45C4-BABC-C8246B974CA7}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{759FB424-166D-4160-90E2-F862915F67C8}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{4BBBFF2A-3743-47F7-AA29-7AD31E06CE89}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{E1F5E7C2-888F-459D-B07C-88E20ABA4BDA}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{A49D97EC-EF0D-4622-8589-6FBC7188E7EE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -43,10 +59,6 @@ Global {43DBAD84-A865-4F5F-AB76-7F3EB6784E99}.Debug|Any CPU.Build.0 = Debug|Any CPU {43DBAD84-A865-4F5F-AB76-7F3EB6784E99}.Release|Any CPU.ActiveCfg = Release|Any CPU {43DBAD84-A865-4F5F-AB76-7F3EB6784E99}.Release|Any CPU.Build.0 = Release|Any CPU - {9E533FC4-A2C1-4021-8102-DE440A731236}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9E533FC4-A2C1-4021-8102-DE440A731236}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9E533FC4-A2C1-4021-8102-DE440A731236}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9E533FC4-A2C1-4021-8102-DE440A731236}.Release|Any CPU.Build.0 = Release|Any CPU {87AA8A4F-2785-4E1D-BAB2-3C6414C8D387}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {87AA8A4F-2785-4E1D-BAB2-3C6414C8D387}.Debug|Any CPU.Build.0 = Debug|Any CPU {87AA8A4F-2785-4E1D-BAB2-3C6414C8D387}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -55,6 +67,26 @@ Global {959348BC-2D38-41F4-9F3D-2E1CD18D9477}.Debug|Any CPU.Build.0 = Debug|Any CPU {959348BC-2D38-41F4-9F3D-2E1CD18D9477}.Release|Any CPU.ActiveCfg = Release|Any CPU {959348BC-2D38-41F4-9F3D-2E1CD18D9477}.Release|Any CPU.Build.0 = Release|Any CPU + {AB1FA57B-0C7A-4181-B28C-2D8B63AF602B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AB1FA57B-0C7A-4181-B28C-2D8B63AF602B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AB1FA57B-0C7A-4181-B28C-2D8B63AF602B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AB1FA57B-0C7A-4181-B28C-2D8B63AF602B}.Release|Any CPU.Build.0 = Release|Any CPU + {92CF1194-29BD-444D-952E-77EEA741D8DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {92CF1194-29BD-444D-952E-77EEA741D8DD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {92CF1194-29BD-444D-952E-77EEA741D8DD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {92CF1194-29BD-444D-952E-77EEA741D8DD}.Release|Any CPU.Build.0 = Release|Any CPU + {53929125-1EA0-4510-B345-BA0A3BAFF33E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {53929125-1EA0-4510-B345-BA0A3BAFF33E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {53929125-1EA0-4510-B345-BA0A3BAFF33E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {53929125-1EA0-4510-B345-BA0A3BAFF33E}.Release|Any CPU.Build.0 = Release|Any CPU + {C363A5DE-43B7-405E-AD76-5A9D4591DEC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C363A5DE-43B7-405E-AD76-5A9D4591DEC0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C363A5DE-43B7-405E-AD76-5A9D4591DEC0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C363A5DE-43B7-405E-AD76-5A9D4591DEC0}.Release|Any CPU.Build.0 = Release|Any CPU + {99B9F0A6-46B8-4B04-B887-7ACE1EF0DD61}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {99B9F0A6-46B8-4B04-B887-7ACE1EF0DD61}.Debug|Any CPU.Build.0 = Debug|Any CPU + {99B9F0A6-46B8-4B04-B887-7ACE1EF0DD61}.Release|Any CPU.ActiveCfg = Release|Any CPU + {99B9F0A6-46B8-4B04-B887-7ACE1EF0DD61}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -64,9 +96,16 @@ Global {43DBAD84-A865-4F5F-AB76-7F3EB6784E99} = {76DC9C4C-EE53-47E6-B6BF-7B135EA8CAF3} {EF75497C-6CB7-4471-980A-619EA1AB8CF6} = {9BF048D0-411D-4C2A-8C32-3A3255501D27} {09E28D94-B771-48EB-800C-5A80C2C0055C} = {A447D0CB-601B-479E-A2B2-76E48F5D4D61} - {9E533FC4-A2C1-4021-8102-DE440A731236} = {069D6714-DE43-45C4-BABC-C8246B974CA7} {87AA8A4F-2785-4E1D-BAB2-3C6414C8D387} = {069D6714-DE43-45C4-BABC-C8246B974CA7} {959348BC-2D38-41F4-9F3D-2E1CD18D9477} = {069D6714-DE43-45C4-BABC-C8246B974CA7} + {AB1FA57B-0C7A-4181-B28C-2D8B63AF602B} = {759FB424-166D-4160-90E2-F862915F67C8} + {92CF1194-29BD-444D-952E-77EEA741D8DD} = {759FB424-166D-4160-90E2-F862915F67C8} + {759FB424-166D-4160-90E2-F862915F67C8} = {A49D97EC-EF0D-4622-8589-6FBC7188E7EE} + {53929125-1EA0-4510-B345-BA0A3BAFF33E} = {4BBBFF2A-3743-47F7-AA29-7AD31E06CE89} + {C363A5DE-43B7-405E-AD76-5A9D4591DEC0} = {4BBBFF2A-3743-47F7-AA29-7AD31E06CE89} + {4BBBFF2A-3743-47F7-AA29-7AD31E06CE89} = {A49D97EC-EF0D-4622-8589-6FBC7188E7EE} + {99B9F0A6-46B8-4B04-B887-7ACE1EF0DD61} = {E1F5E7C2-888F-459D-B07C-88E20ABA4BDA} + {E1F5E7C2-888F-459D-B07C-88E20ABA4BDA} = {A49D97EC-EF0D-4622-8589-6FBC7188E7EE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {7D279EE5-E38F-4125-AE82-6ADE52D72F26} diff --git a/src/libraries/Microsoft.Extensions.Primitives/src/Microsoft.Extensions.Primitives.csproj b/src/libraries/Microsoft.Extensions.Primitives/src/Microsoft.Extensions.Primitives.csproj index 72e3e7cb4abb0f..10b1465ea60f6c 100644 --- a/src/libraries/Microsoft.Extensions.Primitives/src/Microsoft.Extensions.Primitives.csproj +++ b/src/libraries/Microsoft.Extensions.Primitives/src/Microsoft.Extensions.Primitives.csproj @@ -1,4 +1,5 @@ + $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) true @@ -26,9 +27,7 @@ Microsoft.Extensions.Primitives.StringSegment - - - + diff --git a/src/libraries/Microsoft.Extensions.Primitives/src/PACKAGE.md b/src/libraries/Microsoft.Extensions.Primitives/src/PACKAGE.md new file mode 100644 index 00000000000000..432abfa969f057 --- /dev/null +++ b/src/libraries/Microsoft.Extensions.Primitives/src/PACKAGE.md @@ -0,0 +1,109 @@ +## About + +`Microsoft.Extensions.Primitives` contains isolated types that are used in many places within console or ASP.NET Core applications using framework extensions. + +## Key Features + +* IChangeToken: An interface that represents a token that can notify when a change occurs. This can be used to trigger actions or invalidate caches when something changes. For example, the configuration and file providers libraries use this interface to reload settings or files when they are modified. +* StringValues: A struct that represents a single string or an array of strings. This can be used to efficiently store and manipulate multiple values that are logically a single value. For example, the HTTP headers and query strings libraries use this struct to handle multiple values for the same key. +* StringSegment: A struct that represents a substring of another string. This can be used to avoid allocating new strings when performing operations on parts of a string. For example, the configuration and logging libraries use this struct to parse and format strings. + +## How to Use + +#### IChangeToken with configuration example + +```C# +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Primitives; +using System; + +class Program +{ + static void Main(string[] args) + { + // Create a configuration builder + var configurationBuilder = new ConfigurationBuilder() + .SetBasePath(Environment.CurrentDirectory) + // appsettings.json expected to have the following contents: + // { + // "SomeKey": "SomeValue" + // } + .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true); + + // Build the configuration + IConfiguration configuration = configurationBuilder.Build(); + + // Create a change token for the configuration + IChangeToken changeToken = configuration.GetReloadToken(); + + // Attach a change callback + IDisposable changeTokenRegistration = changeToken.RegisterChangeCallback(state => + { + Console.WriteLine("Configuration changed!"); + IConfigurationRoot root = (IConfigurationRoot)state; + var someValue = root["SomeKey"]; // Access the updated configuration value + Console.WriteLine($"New value of SomeKey: {someValue}"); + }, configuration); + + // go and update the value of the key SomeKey in appsettings.json. + // The change callback will be invoked when the file is saved. + Console.WriteLine("Listening for configuration changes. Press any key to exit."); + Console.ReadKey(); + + // Clean up the change token registration when no longer needed + changeTokenRegistration.Dispose(); + } +} +``` +#### StringValues example + +```C# +using System; +using Microsoft.Extensions.Primitives; + +namespace StringValuesSample +{ + class Program + { + static void Main(string[] args) + { + // Create a StringValues object from a single string or an array of strings + StringValues single = "Hello"; + StringValues multiple = new string[] { "Hello", "World" }; + + // Use the implicit conversion to string or the ToString method to get the values + Console.WriteLine($"Single: {single}"); // Single: Hello + Console.WriteLine($"Multiple: {multiple}"); // Multiple: Hello,World + + // Use the indexer, the Count property, and the IsNullOrEmpty method to access the values + Console.WriteLine($"Multiple[1]: {multiple[1]}"); // Multiple[1]: World + Console.WriteLine($"Single.Count: {single.Count}"); // Single.Count: 1 + Console.WriteLine($"Multiple.IsNullOrEmpty: {StringValues.IsNullOrEmpty(multiple)}"); // Multiple.IsNullOrEmpty: False + + // Use the Equals method or the == operator to compare two StringValues objects + Console.WriteLine($"single == \"Hello\": {single == "Hello"}"); // single == "Hello": True + Console.WriteLine($"multiple == \"Hello\": {multiple == "Hello"}"); // multiple == "Hello": False + } + } +} +``` +## Main Types + +The main types provided by this library are: + +* `IChangeToken` +* `StringValues` +* `StringSegment` + +## Additional Documentation + +* [Conceptual documentation](https://learn.microsoft.com/dotnet/core/extensions/primitives) +* [API documentation](https://learn.microsoft.com/dotnet/api/microsoft.extensions.primitives) + +## Related Packages + +* [Microsoft.Extensions.Configuration](https://www.nuget.org/packages/Microsoft.Extensions.Configuration) + +## Feedback & Contributing + +Microsoft.Extensions.Primitives is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). \ No newline at end of file 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 611ac6d7d33814..6fb1e563f27794 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 @@ -26,13 +26,15 @@ PrivateAssets="all" Private="true" IncludeReferenceAssemblyInPackage="true" /> - + - + diff --git a/src/libraries/Microsoft.NET.WebAssembly.Threading/src/CompatibilitySuppressions.xml b/src/libraries/Microsoft.NET.WebAssembly.Threading/src/CompatibilitySuppressions.xml index 26a2ff56955993..cbecb005c817ae 100644 --- a/src/libraries/Microsoft.NET.WebAssembly.Threading/src/CompatibilitySuppressions.xml +++ b/src/libraries/Microsoft.NET.WebAssembly.Threading/src/CompatibilitySuppressions.xml @@ -1,7 +1,8 @@  + PKV006 - net7.0 + net8.0 \ No newline at end of file diff --git a/src/libraries/Microsoft.NETCore.Platforms/Microsoft.NETCore.Platforms.sln b/src/libraries/Microsoft.NETCore.Platforms/Microsoft.NETCore.Platforms.sln index 90b82606258c8b..736dbcc4b53afe 100644 --- a/src/libraries/Microsoft.NETCore.Platforms/Microsoft.NETCore.Platforms.sln +++ b/src/libraries/Microsoft.NETCore.Platforms/Microsoft.NETCore.Platforms.sln @@ -1,63 +1,24 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{39BCA125-321F-490F-AD4E-28DCB4406969}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NETCore.Platforms", "src\Microsoft.NETCore.Platforms.csproj", "{BFFF96CC-06AA-4291-9F93-3E77F23DBB11}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NETCore.Platforms.Tests", "tests\Microsoft.NETCore.Platforms.Tests.csproj", "{0C60F372-5C73-4BFA-9B91-5659C88F9750}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{89E78703-8B4C-4911-A4E6-794E7DC4D581}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{45449066-3A31-43E5-B705-20D667080A23}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{2E3568B1-EC27-4F02-BC0E-71DD3FD7735B}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{E4827496-6F39-4CA0-8F4A-ACDE9DFEBE5C}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{F96FBD24-3BB3-4D02-9884-4D90F94DD3C0}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{E8010E1D-FDAF-481D-AA34-3B115B667E4B}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {39BCA125-321F-490F-AD4E-28DCB4406969}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {39BCA125-321F-490F-AD4E-28DCB4406969}.Debug|Any CPU.Build.0 = Debug|Any CPU - {39BCA125-321F-490F-AD4E-28DCB4406969}.Release|Any CPU.ActiveCfg = Release|Any CPU - {39BCA125-321F-490F-AD4E-28DCB4406969}.Release|Any CPU.Build.0 = Release|Any CPU {BFFF96CC-06AA-4291-9F93-3E77F23DBB11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BFFF96CC-06AA-4291-9F93-3E77F23DBB11}.Debug|Any CPU.Build.0 = Debug|Any CPU {BFFF96CC-06AA-4291-9F93-3E77F23DBB11}.Release|Any CPU.ActiveCfg = Release|Any CPU {BFFF96CC-06AA-4291-9F93-3E77F23DBB11}.Release|Any CPU.Build.0 = Release|Any CPU - {0C60F372-5C73-4BFA-9B91-5659C88F9750}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0C60F372-5C73-4BFA-9B91-5659C88F9750}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0C60F372-5C73-4BFA-9B91-5659C88F9750}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0C60F372-5C73-4BFA-9B91-5659C88F9750}.Release|Any CPU.Build.0 = Release|Any CPU - {89E78703-8B4C-4911-A4E6-794E7DC4D581}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {89E78703-8B4C-4911-A4E6-794E7DC4D581}.Debug|Any CPU.Build.0 = Debug|Any CPU - {89E78703-8B4C-4911-A4E6-794E7DC4D581}.Release|Any CPU.ActiveCfg = Release|Any CPU - {89E78703-8B4C-4911-A4E6-794E7DC4D581}.Release|Any CPU.Build.0 = Release|Any CPU - {45449066-3A31-43E5-B705-20D667080A23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {45449066-3A31-43E5-B705-20D667080A23}.Debug|Any CPU.Build.0 = Debug|Any CPU - {45449066-3A31-43E5-B705-20D667080A23}.Release|Any CPU.ActiveCfg = Release|Any CPU - {45449066-3A31-43E5-B705-20D667080A23}.Release|Any CPU.Build.0 = Release|Any CPU - {2E3568B1-EC27-4F02-BC0E-71DD3FD7735B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2E3568B1-EC27-4F02-BC0E-71DD3FD7735B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2E3568B1-EC27-4F02-BC0E-71DD3FD7735B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2E3568B1-EC27-4F02-BC0E-71DD3FD7735B}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {39BCA125-321F-490F-AD4E-28DCB4406969} = {E4827496-6F39-4CA0-8F4A-ACDE9DFEBE5C} - {0C60F372-5C73-4BFA-9B91-5659C88F9750} = {E4827496-6F39-4CA0-8F4A-ACDE9DFEBE5C} {BFFF96CC-06AA-4291-9F93-3E77F23DBB11} = {F96FBD24-3BB3-4D02-9884-4D90F94DD3C0} - {89E78703-8B4C-4911-A4E6-794E7DC4D581} = {E8010E1D-FDAF-481D-AA34-3B115B667E4B} - {45449066-3A31-43E5-B705-20D667080A23} = {E8010E1D-FDAF-481D-AA34-3B115B667E4B} - {2E3568B1-EC27-4F02-BC0E-71DD3FD7735B} = {E8010E1D-FDAF-481D-AA34-3B115B667E4B} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {E946A528-C3E7-48EC-AD6D-AE84ED2B11AC} diff --git a/src/libraries/Microsoft.NETCore.Platforms/readme.md b/src/libraries/Microsoft.NETCore.Platforms/readme.md index 6c76386f17d073..cca951daaab5fa 100644 --- a/src/libraries/Microsoft.NETCore.Platforms/readme.md +++ b/src/libraries/Microsoft.NETCore.Platforms/readme.md @@ -1,5 +1,5 @@ # Runtime IDs -The package `Microsoft.NETCore.Platforms` defines the runtime identifiers (RIDs) used by .NET packages to represent runtime-specific assets in NuGet packages. +The `Microsoft.NETCore.Platforms` transport package contains the portable and non-portable runtime identifier graph files for redistribution in the dotnet/sdk repository. ## What is a RID? A RID is an opaque string that identifies a platform. RIDs have relationships to other RIDs by "importing" the other RID. In that way a RID is a directed graph of compatible RIDs. @@ -76,80 +76,4 @@ runtimes/win/lib/netstandard1.0/foo.dll When resolving for netstandard1.5/win7-x64 will select `lib/netstandard1.5/foo.dll` for the compile asset and `runtimes/win/lib/netstandard1.0/foo.dll` for the runtime asset. ## Adding new RIDs - -### Why do I need to add a new RID? -NuGet's extensibility mechanism for platform-specific assets requires a RID be defined for any platform that needs assets specific to that platform. Unlike TFMs, which have a known relationship in NuGet (eg net4.5 is compatible with net4.0), RIDs are opaque strings which NuGet knows nothing about. The definition and relationship of RIDs comes solely from the `runtime.json` files within the root of the packages referenced by the project. -As such, whenever we want to put a new RID in a project.json in order to get assets specific for that RID we have to define the rid in some package. Typically that package is `Microsoft.NETCore.Platforms` if the RID is "official". If you'd like to prototype you can put the RID in any other package and so long as that package is referenced you can use that RID. - -### Do I really need to add a new RID? -If you're prototyping on a platform that is compatible with an existing platform then you can reuse the RID for that existing platform. New RIDs are only needed when an asset needs to be different on a particular platform. - -`Microsoft.NETCore.Platforms` attempts to define all RIDs that packages may need, and as such will define RIDs for platforms that we don't actually cross compile for. This is to support higher-level packages, 3rd party packages, that may need to cross-compile for that RID. - -### Adding a new OS -Add a new `RuntimeGroup` item in `runtimeGroups.props`. - -For example: -```xml - - linux - x86;x64;arm - 42.0;43.0 - -``` - -This will create a new RID for `myLinuxDistro` where `myLinuxDistro` should be the string used for the `ID=` value in the `/etc/os-release` file. - -Whenever modifying the `runtimeGroups.props` make sure to pack the project via the `dotnet pack` command and inspect if the generated package contains the desired changes. - -RuntimeGroup items have the following format: -- `Identity`: the base string for the RID, without version architecture, or qualifiers. -- `Parent`: the base string for the parent of this RID. This RID will be imported by the baseRID, architecture-specific, and qualifier-specific RIDs (with the latter two appending appropriate architecture and qualifiers). -- `Versions`: A list of strings delimited by semi-colons that represent the versions for this RID. -- `TreatVersionsAsCompatible`: Default is true. When true, version-specific RIDs will import the previous version-specific RID in the Versions list, with the first version importing the version-less RID. When false all version-specific RIDs will import the version-less RID (bypassing previous version-specific RIDs) -- `OmitVersionDelimiter`: Default is false. When true no characters will separate the base RID and version (EG: win7). When false a '.' will separate the base RID and version (EG: osx.10.12). -- `ApplyVersionsToParent`: Default is false. When true, version-specific RIDs will import version-specific Parent RIDs similar to is done for architecture and qualifier (see Parent above). -- `Architectures`: A list of strings delimited by semi-colons that represent the architectures for this RID. -- `AdditionalQualifiers`: A list of strings delimited by semi-colons that represent the additional qualifiers for this RID. Additional qualifers do not stack, each only applies to the qualifier-less RIDs (so as not to cause combinatorial exponential growth of RIDs). - -### Adding a new version to an existing OS -Find the existing `RuntimeGroup` in `runtimeGroups.props` and add the version to the list of `Versions`, separated by a semi-colon. - -If the version you are adding needs to be treated as not-compatible with previous versions and the `RuntimeGroup` has not set `TreatVersionsAsCompatible`=`false` then you may create a new `RuntimeGroup` to represent the new compatibility band. - -### Checking your work -After making a change to `runtimeGroups.props` you can examine the resulting changes in `runtime.json` and `runtime.compatibility.json`. - -`runtime.json` is the graph representation of the RIDs and is what ships in the package. - -`runtime.compatibility.json` is a flattened version of the graph that shows the RID precedence for each RID in the graph. - -### Version compatibility -Version compatibility is represented through imports. If a platform is considered compatible with another version of the same platform, or a specific version of another platform, then it can import that platform. This permits packages to reuse assets that were built for the imported platform on the compatible platform. Compatibility here is a bit nebulous because inevitably different platforms will have observable differences that can cause compatibility problems. For the purposes of RIDs we'll try to represent compatibility as versions of a platform that are explicitly advertised as being compatible with a previous version and/or another platform and don't have any known broad breaking changes. It is usually better to opt to treat platforms as compatible since that enables the scenario of building an asset for a particular version and using that in future versions, otherwise you force people to cross-compile for all future versions the moment they target a specific version. - -## Appendix : details of RID graph generation - -### Naming convention -We use the following convention in all newly-defined RIDs. Some RIDs (win7-x64, win8-x64) predate this convention and don't follow it, but all new RIDs should follow it. -`[os name].[version]-[architecture]-[additional qualifiers]`, for example `osx.10.10-x64` or `ubuntu.14.04-x64` -- `[os name]` can contain any characters other than `.` -- `[version]` can contain any characters other than `-`. Typically a numeric version like 14.04 or 10.0. -- `[architecture]` can contain any characters other than `-`. Typically: `x86`, `x64`, `arm`, `arm64` -- `[additional qualifiers]` can be things like `aot`. Used to further differentiate different platforms. - -For all of these we strive to make them something that can be uniquely discoverable at runtime, so that a RID may be computed from an executing application. As such these properties should be derivable from `/etc/os-release` or similar platform APIs / data. - -### Import convention -Imports should be used when the added RID is considered compatible with an existing RID. - -1. Architecture-specific RIDs should first import the architecture-less RID. EG: `osx.10.11-x64` should first import `osx.10.11`. -2. Architecture-specific RIDs that are compatible with a previous version RID for the same OS should then import the previous version, architecture specific RID. EG: `osx.10.11-x64` should then import `osx.10.10-x64`. If there is no earlier compatible/supported version, then a versionless RID should be imported. EG: `osx.10.10-x64` should import `osx-x64`. -3. Architecture-less RIDs that are compatible with a previous version RID for the same OS should then import the previous version, architecture neutral RID. EG: `osx.10.11` should import `osx.10.10`. If there is no earlier compatible/supported version, then a versionless RID should be imported. EG: `osx.10.10` should import `osx`. -4. Version-less RIDs should import an OS category. EG: `osx-x64` should import `unix-x64`, `osx` should import `unix`. - -### Advanced RuntimeGroup metadata -The following options can be used under special circumstances but break the normal precedence rules we try to establish by generating the RID graph from common logic. These options make it possible to create a RID fallback chain that doesn't match the rest of the RIDs and therefore is hard for developers/package authors to reason about. Only use these options for cases where you know what you are doing and have carefully reviewed the resulting RID fallbacks using the CompatibliltyMap. - -- `OmitRIDs`: A list of strings delimited by semi-colons that represent RIDs calculated from this RuntimeGroup that should be omitted from the RuntimeGraph. These RIDs will not be referenced nor defined. -- `OmitRIDDefinitions`: A list of strings delimited by semi-colons that represent RIDs calculated from this RuntimeGroup that should be omitted from the RuntimeGraph. These RIDs will not be defined by this RuntimeGroup, but will be referenced: useful in case some other RuntimeGroup (or runtime.json template) defines them. -- `OmitRIDReferences`: A list of strings delimited by semi-colons that represent RIDs calculated from this RuntimeGroup that should be omitted from the RuntimeGraph. These RIDs will be defined but not referenced by this RuntimeGroup. +The RID graphs should be only updated with new base OSes, architectures, or C standard libraries. The RID graphs shouldn't be updated with new OS flavor- and version-specific RIDs anymore. Build from source automatically adds the non-portable distro RID encoded via the `OutputRID` property into the RID graph which allows build tools to target that RID. \ No newline at end of file diff --git a/src/libraries/Microsoft.NETCore.Platforms/src/AssemblyResolver.cs b/src/libraries/Microsoft.NETCore.Platforms/src/AssemblyResolver.cs deleted file mode 100644 index 81cbce457a734e..00000000000000 --- a/src/libraries/Microsoft.NETCore.Platforms/src/AssemblyResolver.cs +++ /dev/null @@ -1,111 +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.Diagnostics; -using System.Diagnostics.CodeAnalysis; -using System.IO; -using System.Reflection; - -namespace Microsoft.NETCore.Platforms.BuildTasks -{ - /// - /// Used to enable app-local assembly unification. - /// - internal static class AssemblyResolver - { - static AssemblyResolver() - { - AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve; - } - - /// - /// Call to enable the assembly resolver for the current AppDomain. - /// - public static void Enable() - { - // intentionally empty. This is just meant to ensure the static constructor - // has run. - } - - [UnconditionalSuppressMessage("SingleFile", "IL3000:Avoid accessing Assembly file path when publishing as a single file", - Justification = "The code has a fallback to use AppDomain.CurrentDomain.BaseDirectory so it will work correctly in single-file")] - private static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args) - { - // apply any existing policy - AssemblyName referenceName = new AssemblyName(AppDomain.CurrentDomain.ApplyPolicy(args.Name)); - - string fileName = referenceName.Name + ".dll"; - string assemblyPath; - string probingPath; - Assembly assm; - - // look next to requesting assembly - assemblyPath = args.RequestingAssembly?.Location; - if (!string.IsNullOrEmpty(assemblyPath)) - { - probingPath = Path.Combine(Path.GetDirectoryName(assemblyPath), fileName); - Debug.WriteLine($"Considering {probingPath} based on RequestingAssembly"); - if (Probe(probingPath, referenceName.Version, out assm)) - { - return assm; - } - } - - // look next to the executing assembly - assemblyPath = Assembly.GetExecutingAssembly().Location; - if (!string.IsNullOrEmpty(assemblyPath)) - { - probingPath = Path.Combine(Path.GetDirectoryName(assemblyPath), fileName); - - Debug.WriteLine($"Considering {probingPath} based on ExecutingAssembly"); - if (Probe(probingPath, referenceName.Version, out assm)) - { - return assm; - } - } - - // look in AppDomain base directory - probingPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, fileName); - Debug.WriteLine($"Considering {probingPath} based on BaseDirectory"); - if (Probe(probingPath, referenceName.Version, out assm)) - { - return assm; - } - - // look in current directory - Debug.WriteLine($"Considering {fileName}"); - if (Probe(fileName, referenceName.Version, out assm)) - { - return assm; - } - - return null; - } - - /// - /// Considers a path to load for satisfying an assembly ref and loads it - /// if the file exists and version is sufficient. - /// - /// Path to consider for load - /// Minimum version to consider - /// loaded assembly - /// true if assembly was loaded - private static bool Probe(string filePath, Version minimumVersion, out Assembly assembly) - { - if (File.Exists(filePath)) - { - AssemblyName name = AssemblyName.GetAssemblyName(filePath); - - if (name.Version >= minimumVersion) - { - assembly = Assembly.Load(name); - return true; - } - } - - assembly = null; - return false; - } - } -} diff --git a/src/libraries/Microsoft.NETCore.Platforms/src/BuildTask.Desktop.cs b/src/libraries/Microsoft.NETCore.Platforms/src/BuildTask.Desktop.cs deleted file mode 100644 index 29af5f186cfb41..00000000000000 --- a/src/libraries/Microsoft.NETCore.Platforms/src/BuildTask.Desktop.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 Microsoft.NETCore.Platforms.BuildTasks -{ - public partial class BuildTask - { - static BuildTask() - { - AssemblyResolver.Enable(); - } - } -} diff --git a/src/libraries/Microsoft.NETCore.Platforms/src/BuildTask.cs b/src/libraries/Microsoft.NETCore.Platforms/src/BuildTask.cs deleted file mode 100644 index 98e17c3b0c566c..00000000000000 --- a/src/libraries/Microsoft.NETCore.Platforms/src/BuildTask.cs +++ /dev/null @@ -1,151 +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 Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using System; - -namespace Microsoft.NETCore.Platforms.BuildTasks -{ - public abstract partial class BuildTask : ITask - { - private Log _log; - - internal Log Log - { - get { return _log ??= new Log(new TaskLoggingHelper(this)); } - } - - public BuildTask() - { - } - - public IBuildEngine BuildEngine - { - get; - set; - } - - public ITaskHost HostObject - { - get; - set; - } - - public abstract bool Execute(); - } - - internal sealed class Log : ILog - { - private readonly TaskLoggingHelper _logger; - public Log(TaskLoggingHelper logger) - { - _logger = logger; - } - - public void LogError(string message, params object[] messageArgs) - { - _logger.LogError(message, messageArgs); - } - - public void LogErrorFromException(Exception exception, bool showStackTrace) - { - _logger.LogErrorFromException(exception, showStackTrace); - } - - public void LogMessage(string message, params object[] messageArgs) - { - _logger.LogMessage(message, messageArgs); - } - - public void LogMessage(LogImportance importance, string message, params object[] messageArgs) - { - _logger.LogMessage((MessageImportance)importance, message, messageArgs); - } - - public void LogWarning(string message, params object[] messageArgs) - { - _logger.LogWarning(message, messageArgs); - } - - public bool HasLoggedErrors { get { return _logger.HasLoggedErrors; } } - } - - public enum LogImportance - { - Low = MessageImportance.Low, - Normal = MessageImportance.Normal, - High = MessageImportance.High - } - - - public interface ILog - { - // - // Summary: - // Logs an error with the specified message. - // - // Parameters: - // message: - // The message. - // - // messageArgs: - // Optional arguments for formatting the message string. - // - // Exceptions: - // T:System.ArgumentNullException: - // message is null. - void LogError(string message, params object[] messageArgs); - - // - // Summary: - // Logs a message with the specified string. - // - // Parameters: - // message: - // The message. - // - // messageArgs: - // The arguments for formatting the message. - // - // Exceptions: - // T:System.ArgumentNullException: - // message is null. - void LogMessage(string message, params object[] messageArgs); - - // - // Summary: - // Logs a message with the specified string and importance. - // - // Parameters: - // importance: - // One of the enumeration values that specifies the importance of the message. - // - // message: - // The message. - // - // messageArgs: - // The arguments for formatting the message. - // - // Exceptions: - // T:System.ArgumentNullException: - // message is null. - void LogMessage(LogImportance importance, string message, params object[] messageArgs); - - // - // Summary: - // Logs a warning with the specified message. - // - // Parameters: - // message: - // The message. - // - // messageArgs: - // Optional arguments for formatting the message string. - // - // Exceptions: - // T:System.ArgumentNullException: - // message is null. - void LogWarning(string message, params object[] messageArgs); - } -} diff --git a/src/libraries/Microsoft.NETCore.Platforms/src/Directory.Build.props b/src/libraries/Microsoft.NETCore.Platforms/src/Directory.Build.props new file mode 100644 index 00000000000000..75e6b0abd56ae6 --- /dev/null +++ b/src/libraries/Microsoft.NETCore.Platforms/src/Directory.Build.props @@ -0,0 +1,9 @@ + + + + false + + + + + \ No newline at end of file diff --git a/src/libraries/Microsoft.NETCore.Platforms/src/Extensions.cs b/src/libraries/Microsoft.NETCore.Platforms/src/Extensions.cs deleted file mode 100644 index 2456407d682e7d..00000000000000 --- a/src/libraries/Microsoft.NETCore.Platforms/src/Extensions.cs +++ /dev/null @@ -1,46 +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.Generic; -using System.Linq; -using Microsoft.Build.Framework; - -namespace Microsoft.NETCore.Platforms.BuildTasks -{ - public static class Extensions - { - public static string GetString(this ITaskItem taskItem, string metadataName) - { - var metadataValue = taskItem.GetMetadata(metadataName)?.Trim(); - return string.IsNullOrEmpty(metadataValue) ? null : metadataValue; - } - - public static bool GetBoolean(this ITaskItem taskItem, string metadataName, bool defaultValue = false) - { - bool result; - var metadataValue = taskItem.GetMetadata(metadataName); - if (!bool.TryParse(metadataValue, out result)) - { - result = defaultValue; - } - return result; - } - - public static IEnumerable GetStrings(this ITaskItem taskItem, string metadataName) - { - var metadataValue = taskItem.GetMetadata(metadataName)?.Trim(); - if (!string.IsNullOrEmpty(metadataValue)) - { - return metadataValue.Split(';').Where(v => !string.IsNullOrEmpty(v.Trim())).ToArray(); - } - - return Enumerable.Empty(); - } - - public static IEnumerable NullAsEmpty(this IEnumerable source) - { - return source ?? Enumerable.Empty(); - } - - } -} diff --git a/src/libraries/Microsoft.NETCore.Platforms/src/GenerateRuntimeGraph.cs b/src/libraries/Microsoft.NETCore.Platforms/src/GenerateRuntimeGraph.cs deleted file mode 100644 index f431e274e8dca3..00000000000000 --- a/src/libraries/Microsoft.NETCore.Platforms/src/GenerateRuntimeGraph.cs +++ /dev/null @@ -1,427 +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.IO; -using System.Linq; -using System.Text; -using System.Xml.Linq; -using Microsoft.Build.Framework; -using Newtonsoft.Json; -using NuGet.RuntimeModel; - -namespace Microsoft.NETCore.Platforms.BuildTasks -{ - public class GenerateRuntimeGraph : BuildTask - { - - /// - /// A set of RuntimeGroups that can be used to generate a runtime graph - /// Identity: the base string for the RID, without version architecture, or qualifiers. - /// Parent: the base string for the parent of this RID. This RID will be imported by the baseRID, architecture-specific, - /// and qualifier-specific RIDs (with the latter two appending appropriate architecture and qualifiers). - /// Versions: A list of strings delimited by semi-colons that represent the versions for this RID. - /// TreatVersionsAsCompatible: Default is true. When true, version-specific RIDs will import the previous - /// version-specific RID in the Versions list, with the first version importing the version-less RID. - /// When false all version-specific RIDs will import the version-less RID (bypassing previous version-specific RIDs) - /// OmitVersionDelimiter: Default is false. When true no characters will separate the base RID and version (EG: win7). - /// When false a '.' will separate the base RID and version (EG: osx.10.12). - /// ApplyVersionsToParent: Default is false. When true, version-specific RIDs will import version-specific Parent RIDs - /// similar to is done for architecture and qualifier (see Parent above). - /// Architectures: A list of strings delimited by semi-colons that represent the architectures for this RID. - /// AdditionalQualifiers: A list of strings delimited by semi-colons that represent the additional qualifiers for this RID. - /// Additional qualifers do not stack, each only applies to the qualifier-less RIDs (so as not to cause combinatorial - /// exponential growth of RIDs). - /// - /// The following options can be used under special circumstances but break the normal precedence rules we try to establish - /// by generating the RID graph from common logic. These options make it possible to create a RID fallback chain that doesn't - /// match the rest of the RIDs and therefore is hard for developers/package authors to reason about. - /// Only use these options for cases where you know what you are doing and have carefully reviewed the resulting RID fallbacks - /// using the CompatibliltyMap. - /// OmitRIDs: A list of strings delimited by semi-colons that represent RIDs calculated from this RuntimeGroup that should - /// be omitted from the RuntimeGraph. These RIDs will not be referenced nor defined. - /// OmitRIDDefinitions: A list of strings delimited by semi-colons that represent RIDs calculated from this RuntimeGroup - /// that should be omitted from the RuntimeGraph. These RIDs will not be defined by this RuntimeGroup, but will be - /// referenced: useful in case some other RuntimeGroup (or runtime.json template) defines them. - /// OmitRIDReferences: A list of strings delimited by semi-colons that represent RIDs calculated from this RuntimeGroup - /// that should be omitted from the RuntimeGraph. These RIDs will be defined but not referenced by this RuntimeGroup. - /// - public ITaskItem[] RuntimeGroups - { - get; - set; - } - - /// - /// Additional runtime identifiers to add to the graph. - /// - public string[] AdditionalRuntimeIdentifiers - { - get; - set; - } - - /// - /// Parent RID to use for any unknown AdditionalRuntimeIdentifier. - /// - public string AdditionalRuntimeIdentifierParent - { - get; - set; - } - - /// - /// Optional source Runtime.json to use as a starting point when merging additional RuntimeGroups - /// - public string SourceRuntimeJson - { - get; - set; - } - - /// - /// Where to write the final runtime.json - /// - public string RuntimeJson - { - get; - set; - } - - /// - /// Optionally, other runtime.jsons which may contain imported RIDs - /// - public string[] ExternalRuntimeJsons - { - get; - set; - } - - /// - /// When defined, specifies the file to write compatibility precedence for each RID in the graph. - /// - public string CompatibilityMap - { - get; - set; - } - - - /// - /// True to write the generated runtime.json to RuntimeJson and compatibility map to CompatibilityMap, otherwise files are read and diffed - /// with generated versions and an error is emitted if they differ. - /// Setting UpdateRuntimeFiles will overwrite files even when the file is marked ReadOnly. - /// - public bool UpdateRuntimeFiles - { - get; - set; - } - - /// - /// When defined, specifies the file to write a DGML representation of the runtime graph. - /// - public string RuntimeDirectedGraph - { - get; - set; - } - - public override bool Execute() - { - if (RuntimeGroups != null && RuntimeGroups.Length != 0 && RuntimeJson == null) - { - Log.LogError($"{nameof(RuntimeJson)} argument must be specified when {nameof(RuntimeGroups)} is specified."); - return false; - } - - RuntimeGraph runtimeGraph; - if (!string.IsNullOrEmpty(SourceRuntimeJson)) - { - if (!File.Exists(SourceRuntimeJson)) - { - Log.LogError($"{nameof(SourceRuntimeJson)} did not exist at {SourceRuntimeJson}."); - return false; - } - - runtimeGraph = JsonRuntimeFormat.ReadRuntimeGraph(SourceRuntimeJson); - } - else - { - runtimeGraph = new RuntimeGraph(); - } - - List runtimeGroups = RuntimeGroups.NullAsEmpty().Select(i => new RuntimeGroup(i)).ToList(); - - AddRuntimeIdentifiers(runtimeGroups); - - foreach (var runtimeGroup in runtimeGroups) - { - runtimeGraph = SafeMerge(runtimeGraph, runtimeGroup); - } - - Dictionary externalRids = new Dictionary(); - if (ExternalRuntimeJsons != null) - { - foreach (var externalRuntimeJson in ExternalRuntimeJsons) - { - RuntimeGraph externalRuntimeGraph = JsonRuntimeFormat.ReadRuntimeGraph(externalRuntimeJson); - - foreach (var runtime in externalRuntimeGraph.Runtimes.Keys) - { - // don't check for duplicates, we merely care what is external - externalRids.Add(runtime, externalRuntimeJson); - } - } - } - - ValidateImports(runtimeGraph, externalRids); - - if (!string.IsNullOrEmpty(RuntimeJson)) - { - if (UpdateRuntimeFiles) - { - EnsureWritable(RuntimeJson); - WriteRuntimeGraph(RuntimeJson, runtimeGraph); - - } - else - { - // validate that existing file matches generated file - if (!File.Exists(RuntimeJson)) - { - Log.LogError($"{nameof(RuntimeJson)} did not exist at {RuntimeJson} and {nameof(UpdateRuntimeFiles)} was not specified."); - } - else - { - var existingRuntimeGraph = JsonRuntimeFormat.ReadRuntimeGraph(RuntimeJson); - - if (!existingRuntimeGraph.Equals(runtimeGraph)) - { - Log.LogError($"The generated {nameof(RuntimeJson)} differs from {RuntimeJson} and {nameof(UpdateRuntimeFiles)} was not specified. Please specify {nameof(UpdateRuntimeFiles)}=true to commit the changes."); - } - } - } - } - - if (!string.IsNullOrEmpty(CompatibilityMap)) - { - var compatibilityMap = GetCompatibilityMap(runtimeGraph); - if (UpdateRuntimeFiles) - { - EnsureWritable(CompatibilityMap); - WriteCompatibilityMap(compatibilityMap, CompatibilityMap); - } - else - { - // validate that existing file matches generated file - if (!File.Exists(CompatibilityMap)) - { - Log.LogError($"{nameof(CompatibilityMap)} did not exist at {CompatibilityMap} and {nameof(UpdateRuntimeFiles)} was not specified."); - } - else - { - var existingCompatibilityMap = ReadCompatibilityMap(CompatibilityMap); - - if (!CompatibilityMapEquals(existingCompatibilityMap, compatibilityMap)) - { - Log.LogError($"The generated {nameof(CompatibilityMap)} differs from {CompatibilityMap} and {nameof(UpdateRuntimeFiles)} was not specified. Please specify {nameof(UpdateRuntimeFiles)}=true to commit the changes."); - } - } - } - } - - if (!string.IsNullOrEmpty(RuntimeDirectedGraph)) - { - WriteRuntimeGraph(runtimeGraph, RuntimeDirectedGraph); - } - - return !Log.HasLoggedErrors; - } - - private static void EnsureWritable(string file) - { - if (File.Exists(file)) - { - var existingAttributes = File.GetAttributes(file); - - if ((existingAttributes & FileAttributes.ReadOnly) != 0) - { - File.SetAttributes(file, existingAttributes &= ~FileAttributes.ReadOnly); - } - } - } - - public static void WriteRuntimeGraph(string filePath, RuntimeGraph runtimeGraph) - { - using (var fileStream = new FileStream(filePath, FileMode.Create)) - using (var textWriter = new StreamWriter(fileStream)) - using (var jsonWriter = new JsonTextWriter(textWriter)) - using (var writer = new JsonObjectWriter(jsonWriter)) - { - jsonWriter.Formatting = Formatting.Indented; - - // workaround https://github.com/NuGet/Home/issues/9532 - writer.WriteObjectStart(); - - JsonRuntimeFormat.WriteRuntimeGraph(writer, runtimeGraph); - - writer.WriteObjectEnd(); - } - } - - private RuntimeGraph SafeMerge(RuntimeGraph existingGraph, RuntimeGroup runtimeGroup) - { - var runtimeGraph = runtimeGroup.GetRuntimeGraph(); - - foreach (var existingRuntimeDescription in existingGraph.Runtimes.Values) - { - RuntimeDescription newRuntimeDescription; - - if (runtimeGraph.Runtimes.TryGetValue(existingRuntimeDescription.RuntimeIdentifier, out newRuntimeDescription)) - { - // overlapping RID, ensure that the imports match (same ordering and content) - if (!existingRuntimeDescription.InheritedRuntimes.SequenceEqual(newRuntimeDescription.InheritedRuntimes)) - { - Log.LogError($"RuntimeGroup {runtimeGroup.BaseRID} defines RID {newRuntimeDescription.RuntimeIdentifier} with imports {string.Join(";", newRuntimeDescription.InheritedRuntimes)} which differ from existing imports {string.Join(";", existingRuntimeDescription.InheritedRuntimes)}. You may avoid this by specifying {nameof(RuntimeGroup.OmitRIDDefinitions)} metadata with {newRuntimeDescription.RuntimeIdentifier}."); - } - } - } - - return RuntimeGraph.Merge(existingGraph, runtimeGraph); - } - - private void ValidateImports(RuntimeGraph runtimeGraph, Dictionary externalRIDs) - { - foreach (var runtimeDescription in runtimeGraph.Runtimes.Values) - { - string externalRuntimeJson; - - if (externalRIDs.TryGetValue(runtimeDescription.RuntimeIdentifier, out externalRuntimeJson)) - { - Log.LogError($"Runtime {runtimeDescription.RuntimeIdentifier} is defined in both this RuntimeGraph and {externalRuntimeJson}."); - } - - foreach (var import in runtimeDescription.InheritedRuntimes) - { - if (!runtimeGraph.Runtimes.ContainsKey(import) && !externalRIDs.ContainsKey(import)) - { - Log.LogError($"Runtime {runtimeDescription.RuntimeIdentifier} imports {import} which is not defined."); - } - } - } - } - - private void AddRuntimeIdentifiers(ICollection runtimeGroups) - { - if (AdditionalRuntimeIdentifiers == null || AdditionalRuntimeIdentifiers.Length == 0) - { - return; - } - - RuntimeGroupCollection runtimeGroupCollection = new RuntimeGroupCollection(runtimeGroups); - - foreach (string additionalRuntimeIdentifier in AdditionalRuntimeIdentifiers) - { - runtimeGroupCollection.AddRuntimeIdentifier(additionalRuntimeIdentifier, AdditionalRuntimeIdentifierParent); - } - } - - private static Dictionary> GetCompatibilityMap(RuntimeGraph graph) - { - Dictionary> compatibilityMap = new Dictionary>(); - - foreach (var rid in graph.Runtimes.Keys.OrderBy(rid => rid, StringComparer.Ordinal)) - { - compatibilityMap.Add(rid, graph.ExpandRuntime(rid)); - } - - return compatibilityMap; - } - - private static IDictionary> ReadCompatibilityMap(string mapFile) - { - var serializer = new JsonSerializer(); - using (var file = File.OpenText(mapFile)) - using (var jsonTextReader = new JsonTextReader(file) { MaxDepth = null }) - { - return serializer.Deserialize>>(jsonTextReader); - } - } - - private static void WriteCompatibilityMap(Dictionary> compatibilityMap, string mapFile) - { - var serializer = new JsonSerializer() - { - Formatting = Formatting.Indented, - StringEscapeHandling = StringEscapeHandling.EscapeNonAscii - }; - - string directory = Path.GetDirectoryName(mapFile); - if (!string.IsNullOrEmpty(directory) && !Directory.Exists(directory)) - { - Directory.CreateDirectory(directory); - } - - using (var file = File.CreateText(mapFile)) - { - serializer.Serialize(file, compatibilityMap); - } - } - - private static bool CompatibilityMapEquals(IDictionary> left, Dictionary> right) - { - if (left.Count != right.Count) - { - return false; - } - - foreach (var leftPair in left) - { - IEnumerable rightValue; - - if (!right.TryGetValue(leftPair.Key, out rightValue)) - { - return false; - } - - if (!rightValue.SequenceEqual(leftPair.Value)) - { - return false; - } - } - - return true; - } - - private static readonly XNamespace s_dgmlns = @"http://schemas.microsoft.com/vs/2009/dgml"; - private static void WriteRuntimeGraph(RuntimeGraph graph, string dependencyGraphFilePath) - { - - var doc = new XDocument(new XElement(s_dgmlns + "DirectedGraph")); - var nodesElement = new XElement(s_dgmlns + "Nodes"); - var linksElement = new XElement(s_dgmlns + "Links"); - doc.Root.Add(nodesElement); - doc.Root.Add(linksElement); - - foreach (var runtimeDescription in graph.Runtimes.Values) - { - nodesElement.Add(new XElement(s_dgmlns + "Node", - new XAttribute("Id", runtimeDescription.RuntimeIdentifier))); - - foreach (var import in runtimeDescription.InheritedRuntimes) - { - linksElement.Add(new XElement(s_dgmlns + "Link", - new XAttribute("Source", runtimeDescription.RuntimeIdentifier), - new XAttribute("Target", import))); - } - } - - using (var file = File.Create(dependencyGraphFilePath)) - { - doc.Save(file); - } - } - } -} 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 86e98f21dbb1ea..958cf0e65df499 100644 --- a/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj +++ b/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj @@ -1,86 +1,63 @@ + $(NetCoreAppToolCurrent);$(NetFrameworkToolCurrent) - Microsoft.NETCore.Platforms.BuildTasks + true + false + true + Provides runtime information required to resolve target framework, platform, and runtime specific implementations of .NET packages. + $(NoWarn);NU5128 - disable false false false false - false - - true - false - $(MSBuildProjectName) - true - Provides runtime information required to resolve target framework, platform, and runtime specific implementations of .NETCore packages. - $(NoWarn);NU5128 - true - - $(MSBuildProjectName) - UpdateRuntimeJson;$(BeforePack) <_generateRuntimeGraphTargetFramework Condition="'$(MSBuildRuntimeType)' == 'core'">$(NetCoreAppToolCurrent) - <_generateRuntimeGraphTargetFramework Condition="'$(MSBuildRuntimeType)' != 'core'">net472 + <_generateRuntimeGraphTargetFramework Condition="'$(MSBuildRuntimeType)' != 'core'">$(NetFrameworkToolCurrent) <_generateRuntimeGraphTask>$([MSBuild]::NormalizePath('$(BaseOutputPath)', $(Configuration), '$(_generateRuntimeGraphTargetFramework)', '$(AssemblyName).dll')) - - $(AdditionalRuntimeIdentifiers);$(OutputRID) - - - - + + + + - - - - - - - + - - - - + + + + + + + + - - - - - - - - - - - - - - + + + + + + + diff --git a/src/libraries/Microsoft.NETCore.Platforms/src/PortableRuntimeIdentifierGraph.json b/src/libraries/Microsoft.NETCore.Platforms/src/PortableRuntimeIdentifierGraph.json new file mode 100644 index 00000000000000..f6f7fbf597cfb8 --- /dev/null +++ b/src/libraries/Microsoft.NETCore.Platforms/src/PortableRuntimeIdentifierGraph.json @@ -0,0 +1,475 @@ +{ + "runtimes": { + "android": { + "#import": [ + "linux-bionic" + ] + }, + "android-arm": { + "#import": [ + "android", + "linux-bionic-arm" + ] + }, + "android-arm64": { + "#import": [ + "android", + "linux-bionic-arm64" + ] + }, + "android-x64": { + "#import": [ + "android", + "linux-bionic-x64" + ] + }, + "android-x86": { + "#import": [ + "android", + "linux-bionic-x86" + ] + }, + "any": { + "#import": [ + "base" + ] + }, + "base": { + "#import": [] + }, + "browser": { + "#import": [ + "any" + ] + }, + "browser-wasm": { + "#import": [ + "browser" + ] + }, + "freebsd": { + "#import": [ + "unix" + ] + }, + "freebsd-arm64": { + "#import": [ + "freebsd", + "unix-arm64" + ] + }, + "freebsd-x64": { + "#import": [ + "freebsd", + "unix-x64" + ] + }, + "haiku": { + "#import": [ + "unix" + ] + }, + "haiku-x64": { + "#import": [ + "haiku", + "unix-x64" + ] + }, + "illumos": { + "#import": [ + "unix" + ] + }, + "illumos-x64": { + "#import": [ + "illumos", + "unix-x64" + ] + }, + "ios": { + "#import": [ + "unix" + ] + }, + "ios-arm": { + "#import": [ + "ios", + "unix-arm" + ] + }, + "ios-arm64": { + "#import": [ + "ios", + "unix-arm64" + ] + }, + "ios-x64": { + "#import": [ + "ios", + "unix-x64" + ] + }, + "ios-x86": { + "#import": [ + "ios", + "unix-x86" + ] + }, + "iossimulator": { + "#import": [ + "ios" + ] + }, + "iossimulator-arm64": { + "#import": [ + "iossimulator", + "ios-arm64" + ] + }, + "iossimulator-x64": { + "#import": [ + "iossimulator", + "ios-x64" + ] + }, + "iossimulator-x86": { + "#import": [ + "iossimulator", + "ios-x86" + ] + }, + "linux": { + "#import": [ + "unix" + ] + }, + "linux-arm": { + "#import": [ + "linux", + "unix-arm" + ] + }, + "linux-arm64": { + "#import": [ + "linux", + "unix-arm64" + ] + }, + "linux-armel": { + "#import": [ + "linux", + "unix-armel" + ] + }, + "linux-armv6": { + "#import": [ + "linux", + "unix-armv6" + ] + }, + "linux-bionic": { + "#import": [ + "linux" + ] + }, + "linux-bionic-arm": { + "#import": [ + "linux-bionic", + "linux-arm" + ] + }, + "linux-bionic-arm64": { + "#import": [ + "linux-bionic", + "linux-arm64" + ] + }, + "linux-bionic-x64": { + "#import": [ + "linux-bionic", + "linux-x64" + ] + }, + "linux-bionic-x86": { + "#import": [ + "linux-bionic", + "linux-x86" + ] + }, + "linux-loongarch64": { + "#import": [ + "linux", + "unix-loongarch64" + ] + }, + "linux-mips64": { + "#import": [ + "linux", + "unix-mips64" + ] + }, + "linux-musl": { + "#import": [ + "linux" + ] + }, + "linux-musl-arm": { + "#import": [ + "linux-musl", + "linux-arm" + ] + }, + "linux-musl-arm64": { + "#import": [ + "linux-musl", + "linux-arm64" + ] + }, + "linux-musl-armel": { + "#import": [ + "linux-musl", + "linux-armel" + ] + }, + "linux-musl-armv6": { + "#import": [ + "linux-musl", + "linux-armv6" + ] + }, + "linux-musl-ppc64le": { + "#import": [ + "linux-musl", + "linux-ppc64le" + ] + }, + "linux-musl-riscv64": { + "#import": [ + "linux-musl", + "linux-riscv64" + ] + }, + "linux-musl-s390x": { + "#import": [ + "linux-musl", + "linux-s390x" + ] + }, + "linux-musl-x64": { + "#import": [ + "linux-musl", + "linux-x64" + ] + }, + "linux-musl-x86": { + "#import": [ + "linux-musl", + "linux-x86" + ] + }, + "linux-ppc64le": { + "#import": [ + "linux", + "unix-ppc64le" + ] + }, + "linux-riscv64": { + "#import": [ + "linux", + "unix-riscv64" + ] + }, + "linux-s390x": { + "#import": [ + "linux", + "unix-s390x" + ] + }, + "linux-x64": { + "#import": [ + "linux", + "unix-x64" + ] + }, + "linux-x86": { + "#import": [ + "linux", + "unix-x86" + ] + }, + "maccatalyst": { + "#import": [ + "ios" + ] + }, + "maccatalyst-arm64": { + "#import": [ + "maccatalyst", + "ios-arm64" + ] + }, + "maccatalyst-x64": { + "#import": [ + "maccatalyst", + "ios-x64" + ] + }, + "osx": { + "#import": [ + "unix" + ] + }, + "osx-arm64": { + "#import": [ + "osx", + "unix-arm64" + ] + }, + "osx-x64": { + "#import": [ + "osx", + "unix-x64" + ] + }, + "solaris": { + "#import": [ + "unix" + ] + }, + "solaris-x64": { + "#import": [ + "solaris", + "unix-x64" + ] + }, + "tvos": { + "#import": [ + "unix" + ] + }, + "tvos-arm64": { + "#import": [ + "tvos", + "unix-arm64" + ] + }, + "tvos-x64": { + "#import": [ + "tvos", + "unix-x64" + ] + }, + "tvossimulator": { + "#import": [ + "tvos" + ] + }, + "tvossimulator-arm64": { + "#import": [ + "tvossimulator", + "tvos-arm64" + ] + }, + "tvossimulator-x64": { + "#import": [ + "tvossimulator", + "tvos-x64" + ] + }, + "unix": { + "#import": [ + "any" + ] + }, + "unix-arm": { + "#import": [ + "unix" + ] + }, + "unix-arm64": { + "#import": [ + "unix" + ] + }, + "unix-armel": { + "#import": [ + "unix" + ] + }, + "unix-armv6": { + "#import": [ + "unix" + ] + }, + "unix-loongarch64": { + "#import": [ + "unix" + ] + }, + "unix-mips64": { + "#import": [ + "unix" + ] + }, + "unix-ppc64le": { + "#import": [ + "unix" + ] + }, + "unix-riscv64": { + "#import": [ + "unix" + ] + }, + "unix-s390x": { + "#import": [ + "unix" + ] + }, + "unix-x64": { + "#import": [ + "unix" + ] + }, + "unix-x86": { + "#import": [ + "unix" + ] + }, + "wasi": { + "#import": [ + "any" + ] + }, + "wasi-wasm": { + "#import": [ + "wasi" + ] + }, + "win": { + "#import": [ + "any" + ] + }, + "win-arm": { + "#import": [ + "win" + ] + }, + "win-arm64": { + "#import": [ + "win" + ] + }, + "win-x64": { + "#import": [ + "win" + ] + }, + "win-x86": { + "#import": [ + "win" + ] + } + } + } \ No newline at end of file diff --git a/src/libraries/Microsoft.NETCore.Platforms/src/RID.cs b/src/libraries/Microsoft.NETCore.Platforms/src/RID.cs deleted file mode 100644 index b464d5f0f54e37..00000000000000 --- a/src/libraries/Microsoft.NETCore.Platforms/src/RID.cs +++ /dev/null @@ -1,208 +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.Diagnostics; -using System.Text; - -namespace Microsoft.NETCore.Platforms.BuildTasks -{ - public class RID - { - internal const char VersionDelimiter = '.'; - internal const char ArchitectureDelimiter = '-'; - internal const char QualifierDelimiter = '-'; - - public string BaseRID { get; set; } - public bool OmitVersionDelimiter { get; set; } - public RuntimeVersion Version { get; set; } - public string Architecture { get; set; } - public string Qualifier { get; set; } - - public override string ToString() - { - StringBuilder builder = new StringBuilder(BaseRID); - - if (HasVersion) - { - if (!OmitVersionDelimiter) - { - builder.Append(VersionDelimiter); - } - builder.Append(Version); - } - - if (HasArchitecture) - { - builder.Append(ArchitectureDelimiter); - builder.Append(Architecture); - } - - if (HasQualifier) - { - builder.Append(QualifierDelimiter); - builder.Append(Qualifier); - } - - return builder.ToString(); - } - - private enum RIDPart : int - { - Base = 0, - Version, - Architecture, - Qualifier, - Max = Qualifier - } - - public static RID Parse(string runtimeIdentifier, bool noQualifier) - { - string[] parts = new string[(int)RIDPart.Max + 1]; - bool omitVersionDelimiter = true; - RIDPart parseState = RIDPart.Base; - - int partStart = 0, partLength; - - // qualifier is indistinguishable from arch so we cannot distinguish it for parsing purposes - Debug.Assert(ArchitectureDelimiter == QualifierDelimiter); - - for (int i = 0; i < runtimeIdentifier.Length; i++) - { - char current = runtimeIdentifier[i]; - partLength = i - partStart; - - switch (parseState) - { - case RIDPart.Base: - // treat any number as the start of the version - if (current == VersionDelimiter || (current >= '0' && current <= '9')) - { - SetPart(); - partStart = i; - if (current == VersionDelimiter) - { - omitVersionDelimiter = false; - partStart = i + 1; - } - parseState = RIDPart.Version; - } - // version might be omitted - else if (current == ArchitectureDelimiter) - { - // The qualifier delimiter and architecture delimiter are the same. - // When there is no qualifier, there will be one delimiter past the base part - // for the architecture. - // So if we see another delimiter later in the string (for the architecture), - // extend the base part instead of starting the architecture part. - if (noQualifier && runtimeIdentifier.IndexOf(ArchitectureDelimiter, i + 1) != -1) - { - break; - } - // ensure there's no version later in the string - if (runtimeIdentifier.IndexOf(VersionDelimiter, i) != -1) - { - break; - } - SetPart(); - partStart = i + 1; // skip delimiter - parseState = RIDPart.Architecture; - } - break; - case RIDPart.Version: - if (current == ArchitectureDelimiter) - { - SetPart(); - partStart = i + 1; // skip delimiter - parseState = RIDPart.Architecture; - } - break; - case RIDPart.Architecture: - if (current == QualifierDelimiter) - { - SetPart(); - partStart = i + 1; // skip delimiter - parseState = RIDPart.Qualifier; - } - break; - default: - break; - } - } - - partLength = runtimeIdentifier.Length - partStart; - if (partLength > 0) - { - SetPart(); - } - - string GetPart(RIDPart part) - { - return parts[(int)part]; - } - - void SetPart() - { - if (partLength == 0) - { - throw new ArgumentException($"Unexpected delimiter at position {partStart} in \"{runtimeIdentifier}\""); - } - - parts[(int)parseState] = runtimeIdentifier.Substring(partStart, partLength); - } - - string version = GetPart(RIDPart.Version); - - if (version == null) - { - omitVersionDelimiter = false; - } - - return new RID() - { - BaseRID = GetPart(RIDPart.Base), - OmitVersionDelimiter = omitVersionDelimiter, - Version = version == null ? null : new RuntimeVersion(version), - Architecture = GetPart(RIDPart.Architecture), - Qualifier = GetPart(RIDPart.Qualifier) - }; - } - - public bool HasVersion => Version != null; - - public bool HasArchitecture => Architecture != null; - - public bool HasQualifier => Qualifier != null; - - public override bool Equals(object obj) - { - return Equals(obj as RID); - } - - public bool Equals(RID obj) - { - return object.ReferenceEquals(obj, this) || - (obj is not null && - BaseRID == obj.BaseRID && - (Version == null || OmitVersionDelimiter == obj.OmitVersionDelimiter) && - Version == obj.Version && - Architecture == obj.Architecture && - Qualifier == obj.Qualifier); - - } - - public override int GetHashCode() - { -#if NETFRAMEWORK - return BaseRID.GetHashCode(); -#else - HashCode hashCode = default; - hashCode.Add(BaseRID); - hashCode.Add(Version); - hashCode.Add(Architecture); - hashCode.Add(Qualifier); - return hashCode.ToHashCode(); -#endif - } - } -} diff --git a/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroup.cs b/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroup.cs deleted file mode 100644 index 9d5c169cb526df..00000000000000 --- a/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroup.cs +++ /dev/null @@ -1,298 +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 Microsoft.Build.Framework; -using NuGet.RuntimeModel; -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Microsoft.NETCore.Platforms.BuildTasks -{ - public class RuntimeGroup - { - private const string rootRID = "any"; - - public RuntimeGroup(ITaskItem item) - { - BaseRID = item.ItemSpec; - Parent = item.GetString(nameof(Parent)); - Versions = new HashSet(item.GetStrings(nameof(Versions)).Select(v => new RuntimeVersion(v))); - TreatVersionsAsCompatible = item.GetBoolean(nameof(TreatVersionsAsCompatible), true); - OmitVersionDelimiter = item.GetBoolean(nameof(OmitVersionDelimiter)); - ApplyVersionsToParent = item.GetBoolean(nameof(ApplyVersionsToParent)); - Architectures = new HashSet(item.GetStrings(nameof(Architectures))); - AdditionalQualifiers = new HashSet(item.GetStrings(nameof(AdditionalQualifiers))); - OmitRIDs = new HashSet(item.GetStrings(nameof(OmitRIDs))); - OmitRIDDefinitions = new HashSet(item.GetStrings(nameof(OmitRIDDefinitions))); - OmitRIDReferences = new HashSet(item.GetStrings(nameof(OmitRIDReferences))); - } - - public RuntimeGroup(string baseRID, string parent, bool treatVersionsAsCompatible = true, bool omitVersionDelimiter = false, bool applyVersionsToParent = false, IEnumerable additionalQualifiers = null) - { - BaseRID = baseRID; - Parent = parent; - Versions = new HashSet(); - TreatVersionsAsCompatible = treatVersionsAsCompatible; - OmitVersionDelimiter = omitVersionDelimiter; - ApplyVersionsToParent = applyVersionsToParent; - Architectures = new HashSet(); - AdditionalQualifiers = new HashSet(additionalQualifiers.NullAsEmpty()); - OmitRIDs = new HashSet(); - OmitRIDDefinitions = new HashSet(); - OmitRIDReferences = new HashSet(); - } - - public string BaseRID { get; } - public string Parent { get; } - public ICollection Versions { get; } - public bool TreatVersionsAsCompatible { get; } - public bool OmitVersionDelimiter { get; } - public bool ApplyVersionsToParent { get; } - public ICollection Architectures { get; } - public ICollection AdditionalQualifiers { get; } - public ICollection OmitRIDs { get; } - public ICollection OmitRIDDefinitions { get; } - public ICollection OmitRIDReferences { get; } - - public void ApplyRid(RID rid) - { - if (!rid.BaseRID.Equals(BaseRID, StringComparison.Ordinal)) - { - throw new ArgumentException($"Cannot apply {nameof(RID)} with {nameof(RID.BaseRID)} {rid.BaseRID} to {nameof(RuntimeGroup)} with {nameof(RuntimeGroup.BaseRID)} {BaseRID}.", nameof(rid)); - } - - if (rid.HasArchitecture) - { - Architectures.Add(rid.Architecture); - } - - if (rid.HasVersion) - { - Versions.Add(rid.Version); - } - - if (rid.HasQualifier) - { - AdditionalQualifiers.Add(rid.Qualifier); - } - } - - internal sealed class RIDMapping - { - public RIDMapping(RID runtimeIdentifier) - { - RuntimeIdentifier = runtimeIdentifier; - Imports = Enumerable.Empty(); - } - - public RIDMapping(RID runtimeIdentifier, IEnumerable imports) - { - RuntimeIdentifier = runtimeIdentifier; - Imports = imports; - } - - public RID RuntimeIdentifier { get; } - - public IEnumerable Imports { get; } - } - - - internal RID CreateRuntime(string baseRid, RuntimeVersion version = null, string architecture = null, string qualifier = null) - { - return new RID() - { - BaseRID = baseRid, - Version = version, - OmitVersionDelimiter = OmitVersionDelimiter, - Architecture = architecture, - Qualifier = qualifier - }; - } - - internal IEnumerable GetRIDMappings() - { - // base => - // Parent - yield return Parent == null ? - new RIDMapping(CreateRuntime(BaseRID)) : - new RIDMapping(CreateRuntime(BaseRID), new[] { CreateRuntime(Parent) }); - - foreach (var architecture in Architectures) - { - // base + arch => - // base, - // parent + arch - var imports = new List() - { - CreateRuntime(BaseRID) - }; - - if (!IsNullOrRoot(Parent)) - { - imports.Add(CreateRuntime(Parent, architecture: architecture)); - } - - yield return new RIDMapping(CreateRuntime(BaseRID, architecture: architecture), imports); - } - - RuntimeVersion lastVersion = null; - foreach (var version in Versions) - { - // base + version => - // base + lastVersion, - // parent + version (optionally) - var imports = new List() - { - CreateRuntime(BaseRID, version: lastVersion) - }; - - if (ApplyVersionsToParent) - { - imports.Add(CreateRuntime(Parent, version: version)); - } - - yield return new RIDMapping(CreateRuntime(BaseRID, version: version), imports); - - foreach (var architecture in Architectures) - { - // base + version + architecture => - // base + version, - // base + lastVersion + architecture, - // parent + version + architecture (optionally) - var archImports = new List() - { - CreateRuntime(BaseRID, version: version), - CreateRuntime(BaseRID, version: lastVersion, architecture: architecture) - }; - - if (ApplyVersionsToParent) - { - archImports.Add(CreateRuntime(Parent, version: version, architecture: architecture)); - } - - yield return new RIDMapping(CreateRuntime(BaseRID, version: version, architecture: architecture), archImports); - } - - if (TreatVersionsAsCompatible) - { - lastVersion = version; - } - } - - foreach (var qualifier in AdditionalQualifiers) - { - // base + qual => - // base, - // parent + qual - yield return new RIDMapping(CreateRuntime(BaseRID, qualifier: qualifier), - new[] - { - CreateRuntime(BaseRID), - IsNullOrRoot(Parent) ? CreateRuntime(qualifier) : CreateRuntime(Parent, qualifier:qualifier) - }); - - foreach (var architecture in Architectures) - { - // base + arch + qualifier => - // base + qualifier, - // base + arch - // parent + arch + qualifier - var imports = new List() - { - CreateRuntime(BaseRID, qualifier: qualifier), - CreateRuntime(BaseRID, architecture: architecture) - }; - - if (!IsNullOrRoot(Parent)) - { - imports.Add(CreateRuntime(Parent, architecture: architecture, qualifier: qualifier)); - } - - yield return new RIDMapping(CreateRuntime(BaseRID, architecture: architecture, qualifier: qualifier), imports); - } - - lastVersion = null; - foreach (var version in Versions) - { - // base + version + qualifier => - // base + version, - // base + lastVersion + qualifier - // parent + version + qualifier (optionally) - var imports = new List() - { - CreateRuntime(BaseRID, version: version), - CreateRuntime(BaseRID, version: lastVersion, qualifier: qualifier) - }; - - if (ApplyVersionsToParent) - { - imports.Add(CreateRuntime(Parent, version: version, qualifier: qualifier)); - } - - yield return new RIDMapping(CreateRuntime(BaseRID, version: version, qualifier: qualifier), imports); - - foreach (var architecture in Architectures) - { - // base + version + architecture + qualifier => - // base + version + qualifier, - // base + version + architecture, - // base + version, - // base + lastVersion + architecture + qualifier, - // parent + version + architecture + qualifier (optionally) - var archImports = new List() - { - CreateRuntime(BaseRID, version: version, qualifier: qualifier), - CreateRuntime(BaseRID, version: version, architecture: architecture), - CreateRuntime(BaseRID, version: version), - CreateRuntime(BaseRID, version: lastVersion, architecture: architecture, qualifier: qualifier) - }; - - if (ApplyVersionsToParent) - { - imports.Add(CreateRuntime(Parent, version: version, architecture: architecture, qualifier: qualifier)); - } - - yield return new RIDMapping(CreateRuntime(BaseRID, version: version, architecture: architecture, qualifier: qualifier), archImports); - } - - if (TreatVersionsAsCompatible) - { - lastVersion = version; - } - } - } - } - - private static bool IsNullOrRoot(string rid) - { - return rid == null || rid == rootRID; - } - - - public IEnumerable GetRuntimeDescriptions() - { - foreach (var mapping in GetRIDMappings()) - { - var rid = mapping.RuntimeIdentifier.ToString(); - - if (OmitRIDs.Contains(rid) || OmitRIDDefinitions.Contains(rid)) - { - continue; - } - - var imports = mapping.Imports - .Select(i => i.ToString()) - .Where(i => !OmitRIDs.Contains(i) && !OmitRIDReferences.Contains(i)) - .ToArray(); - - yield return new RuntimeDescription(rid, imports); - } - } - - public RuntimeGraph GetRuntimeGraph() - { - return new RuntimeGraph(GetRuntimeDescriptions()); - } - } -} diff --git a/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs b/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs deleted file mode 100644 index ec4762d71424cd..00000000000000 --- a/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs +++ /dev/null @@ -1,160 +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 Microsoft.Build.Framework; -using NuGet.RuntimeModel; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; - -namespace Microsoft.NETCore.Platforms.BuildTasks -{ - public class RuntimeGroupCollection - { - private readonly ICollection allRuntimeGroups; - private readonly Dictionary> runtimeGroupsByBaseRID; - private readonly HashSet knownRIDs; - - public RuntimeGroupCollection(ICollection runtimeGroups) - { - allRuntimeGroups = runtimeGroups; - runtimeGroupsByBaseRID = runtimeGroups.GroupBy(rg => rg.BaseRID).ToDictionary(g => g.Key, g => new List(g.AsEnumerable())); - - knownRIDs = new HashSet(allRuntimeGroups.SelectMany(rg => rg.GetRIDMappings()).Select(mapping => mapping.RuntimeIdentifier)); - } - - /// - /// Locate an existing RuntimeGroup to append to. - /// Existing group must have matching baseRID, then we choose based on closest version, - /// and prefer matching arch and qualifier. - /// If no match is found, then a new RID hierarchy is created. - /// - /// - /// - public void AddRuntimeIdentifier(string runtimeIdentifier, string parent) - { - // don't parse qualifier since we don't use them and they are ambiguous with `-` in base RID - RID rid = RID.Parse(runtimeIdentifier, noQualifier: true); - - AddRuntimeIdentifier(rid, parent); - } - - public void AddRuntimeIdentifier(RID rid, string parent) - { - // Do nothing if we already know about the RID - if (knownRIDs.Contains(rid)) - { - return; - } - - RuntimeGroup runtimeGroup = null; - - if (runtimeGroupsByBaseRID.TryGetValue(rid.BaseRID, out var candidateRuntimeGroups)) - { - RuntimeVersion closestVersion = null; - - foreach (var candidate in candidateRuntimeGroups) - { - if (rid.HasVersion) - { - // Find the closest previous version - foreach (var version in candidate.Versions) - { - // a previous version - if (version <= rid.Version) - { - // haven't yet found a match or this is a closer match - if (closestVersion == null || version > closestVersion) - { - closestVersion = version; - runtimeGroup = candidate; - } - else if (version == closestVersion) - { - // found a tie in version, examine other fields - considerCandidate(); - } - } - } - } - - // if we don't have a version, or if we couldn't find any match, consider other fields - if (!rid.HasVersion) - { - considerCandidate(); - } - - // if we don't have a match yet, take this as it matches on baseRID - runtimeGroup ??= candidate; - - void considerCandidate() - { - // is this a better match? - if (!rid.HasArchitecture || candidate.Architectures.Contains(rid.Architecture)) - { - if (!rid.HasQualifier || candidate.AdditionalQualifiers.Contains(rid.Qualifier)) - { - // matched on arch and qualifier. - runtimeGroup = candidate; - } - else if (rid.HasArchitecture && !runtimeGroup.Architectures.Contains(rid.Architecture)) - { - // matched only on arch and existing match doesn't match arch - runtimeGroup = candidate; - } - } - } - } - - Debug.Assert(runtimeGroup != null, "Empty candidates?"); - } - else - { - // This is an unknown base RID, we'll need to add a new group. - if (string.IsNullOrEmpty(parent)) - { - throw new InvalidOperationException($"AdditionalRuntimeIdentifier {rid} was specified, which could not be found in any existing {nameof(RuntimeGroup)}, and no {nameof(parent)} was specified."); - } - - runtimeGroup = new RuntimeGroup(rid.BaseRID, parent); - - AddRuntimeGroup(runtimeGroup); - } - - runtimeGroup.ApplyRid(rid); - - // Compute the portion of the RID graph produced from this modified RuntimeGroup - var ridMappings = runtimeGroup.GetRIDMappings(); - - // Record any newly defined RIDs in our set of known RIDs - foreach (RID definedRID in ridMappings.Select(mapping => mapping.RuntimeIdentifier)) - { - knownRIDs.Add(definedRID); - } - - // Make sure that any RID imported is added as well. This allows users to specify - // a single new RID and we'll add any new RIDs up the parent chain that might be needed. - foreach (RID importedRID in ridMappings.SelectMany(mapping => mapping.Imports)) - { - // This should not introduce any new RuntimeGroups, so we specify parent as null - AddRuntimeIdentifier(importedRID, null); - } - - } - - private void AddRuntimeGroup(RuntimeGroup runtimeGroup) - { - List baseRuntimeGroups; - - if (!runtimeGroupsByBaseRID.TryGetValue(runtimeGroup.BaseRID, out baseRuntimeGroups)) - { - runtimeGroupsByBaseRID[runtimeGroup.BaseRID] = baseRuntimeGroups = new List(); - } - - baseRuntimeGroups.Add(runtimeGroup); - allRuntimeGroups.Add(runtimeGroup); - } - - } -} diff --git a/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeVersion.cs b/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeVersion.cs deleted file mode 100644 index ca7b1dbd47406c..00000000000000 --- a/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeVersion.cs +++ /dev/null @@ -1,140 +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; - -namespace Microsoft.NETCore.Platforms.BuildTasks -{ - - /// - /// A Version class that also supports a single integer (major only) - /// - public sealed class RuntimeVersion : IComparable, IComparable, IEquatable - { - private readonly string versionString; - private readonly Version version; - private readonly bool hasMinor; - - public RuntimeVersion(string versionString) - { - // intentionally don't support the type of version that omits the separators as it is abiguous. - // for example Windows 8.1 was encoded as win81, where as Windows 10.0 was encoded as win10 - this.versionString = versionString; - string toParse = versionString; -#if NETCOREAPP - if (!toParse.Contains('.')) -#else - if (toParse.IndexOf('.') == -1) -#endif - { - toParse += ".0"; - hasMinor = false; - } - else - { - hasMinor = true; - } - version = Version.Parse(toParse); - } - - public int CompareTo(object obj) - { - if (obj == null) - { - return 1; - } - - if (obj is RuntimeVersion version) - { - return CompareTo(version); - } - - throw new ArgumentException($"Cannot compare {nameof(RuntimeVersion)} to object of type {obj.GetType()}.", nameof(obj)); - } - - public int CompareTo(RuntimeVersion other) - { - if (other == null) - { - return 1; - } - - int versionResult = version.CompareTo(other?.version); - - if (versionResult == 0) - { - if (!hasMinor && other.hasMinor) - { - return -1; - } - - if (hasMinor && !other.hasMinor) - { - return 1; - } - - return string.CompareOrdinal(versionString, other.versionString); - } - - return versionResult; - } - - public bool Equals(RuntimeVersion other) - { - return object.ReferenceEquals(other, this) || - (other != null && - versionString.Equals(other.versionString, StringComparison.Ordinal)); - } - - public override bool Equals(object obj) - { - return Equals(obj as RuntimeVersion); - } - - public override int GetHashCode() - { - return versionString.GetHashCode(); - } - - public override string ToString() - { - return versionString; - } - - public static bool operator ==(RuntimeVersion v1, RuntimeVersion v2) - { - if (v2 is null) - { - return (v1 is null) ? true : false; - } - - return ReferenceEquals(v2, v1) ? true : v2.Equals(v1); - } - - public static bool operator !=(RuntimeVersion v1, RuntimeVersion v2) => !(v1 == v2); - - public static bool operator <(RuntimeVersion v1, RuntimeVersion v2) - { - if (v1 is null) - { - return !(v2 is null); - } - - return v1.CompareTo(v2) < 0; - } - - public static bool operator <=(RuntimeVersion v1, RuntimeVersion v2) - { - if (v1 is null) - { - return true; - } - - return v1.CompareTo(v2) <= 0; - } - - public static bool operator >(RuntimeVersion v1, RuntimeVersion v2) => v2 < v1; - - public static bool operator >=(RuntimeVersion v1, RuntimeVersion v2) => v2 <= v1; - } -} diff --git a/src/libraries/Microsoft.NETCore.Platforms/src/UpdateRuntimeIdentifierGraph.cs b/src/libraries/Microsoft.NETCore.Platforms/src/UpdateRuntimeIdentifierGraph.cs new file mode 100644 index 00000000000000..867da09df9b670 --- /dev/null +++ b/src/libraries/Microsoft.NETCore.Platforms/src/UpdateRuntimeIdentifierGraph.cs @@ -0,0 +1,54 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.IO; +using Microsoft.Build.Framework; +using Microsoft.Build.Utilities; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; + +namespace Microsoft.NETCore.Platforms +{ + public class UpdateRuntimeIdentifierGraph : Task + { + [Required] + public string? InputFile { get; set; } + + [Required] + public string? OutputFile { get; set; } + + // ItemSpec should be a RID, and "Imports" metadata should be a semicolon-separated list of RIDs that the ItemSpec RID imports + [Required] + public ITaskItem[]? AdditionalRuntimeIdentifiers { get; set; } + + public override bool Execute() + { + JToken json; + + using (StreamReader streamReader = File.OpenText(InputFile!)) + using (JsonTextReader jsonReader = new JsonTextReader(streamReader)) + { + json = JObject.ReadFrom(jsonReader); + } + + JObject runtimes = (JObject)json["runtimes"]!; + foreach (ITaskItem rid in AdditionalRuntimeIdentifiers!) + { + // Skip the RID if it's already in the graph + if (runtimes.ContainsKey(rid.ItemSpec)) + { + continue; + } + + string[] importedRids = rid.GetMetadata("Imports").Split(';'); + runtimes.Add(rid.ItemSpec, new JObject(new JProperty("#import", new JArray(importedRids)))); + } + + using StreamWriter streamWriter = File.CreateText(OutputFile!); + using JsonTextWriter jsonWriter = new(streamWriter) { Formatting = Formatting.Indented }; + json.WriteTo(jsonWriter); + + return true; + } + } +} diff --git a/src/libraries/Microsoft.NETCore.Platforms/src/runtime.compatibility.json b/src/libraries/Microsoft.NETCore.Platforms/src/runtime.compatibility.json deleted file mode 100644 index 085cb7b518ff72..00000000000000 --- a/src/libraries/Microsoft.NETCore.Platforms/src/runtime.compatibility.json +++ /dev/null @@ -1,11768 +0,0 @@ -{ - "alpine": [ - "alpine", - "linux-musl", - "linux", - "unix", - "any", - "base" - ], - "alpine-arm": [ - "alpine-arm", - "alpine", - "linux-musl-arm", - "linux-musl", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "alpine-arm64": [ - "alpine-arm64", - "alpine", - "linux-musl-arm64", - "linux-musl", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "alpine-armv6": [ - "alpine-armv6", - "alpine", - "linux-musl-armv6", - "linux-musl", - "linux-armv6", - "linux", - "unix-armv6", - "unix", - "any", - "base" - ], - "alpine-ppc64le": [ - "alpine-ppc64le", - "alpine", - "linux-musl-ppc64le", - "linux-musl", - "linux-ppc64le", - "linux", - "unix-ppc64le", - "unix", - "any", - "base" - ], - "alpine-s390x": [ - "alpine-s390x", - "alpine", - "linux-musl-s390x", - "linux-musl", - "linux-s390x", - "linux", - "unix-s390x", - "unix", - "any", - "base" - ], - "alpine-x64": [ - "alpine-x64", - "alpine", - "linux-musl-x64", - "linux-musl", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "alpine-x86": [ - "alpine-x86", - "alpine", - "linux-musl-x86", - "linux-musl", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "alpine.3.10": [ - "alpine.3.10", - "alpine.3.9", - "alpine.3.8", - "alpine.3.7", - "alpine.3.6", - "alpine", - "linux-musl", - "linux", - "unix", - "any", - "base" - ], - "alpine.3.10-arm": [ - "alpine.3.10-arm", - "alpine.3.10", - "alpine.3.9-arm", - "alpine.3.9", - "alpine.3.8-arm", - "alpine.3.8", - "alpine.3.7-arm", - "alpine.3.7", - "alpine.3.6-arm", - "alpine.3.6", - "alpine-arm", - "alpine", - "linux-musl-arm", - "linux-musl", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "alpine.3.10-arm64": [ - "alpine.3.10-arm64", - "alpine.3.10", - "alpine.3.9-arm64", - "alpine.3.9", - "alpine.3.8-arm64", - "alpine.3.8", - "alpine.3.7-arm64", - "alpine.3.7", - "alpine.3.6-arm64", - "alpine.3.6", - "alpine-arm64", - "alpine", - "linux-musl-arm64", - "linux-musl", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "alpine.3.10-armv6": [ - "alpine.3.10-armv6", - "alpine.3.10", - "alpine.3.9-armv6", - "alpine.3.9", - "alpine.3.8-armv6", - "alpine.3.8", - "alpine.3.7-armv6", - "alpine.3.7", - "alpine.3.6-armv6", - "alpine.3.6", - "alpine-armv6", - "alpine", - "linux-musl-armv6", - "linux-musl", - "linux-armv6", - "linux", - "unix-armv6", - "unix", - "any", - "base" - ], - "alpine.3.10-ppc64le": [ - "alpine.3.10-ppc64le", - "alpine.3.10", - "alpine.3.9-ppc64le", - "alpine.3.9", - "alpine.3.8-ppc64le", - "alpine.3.8", - "alpine.3.7-ppc64le", - "alpine.3.7", - "alpine.3.6-ppc64le", - "alpine.3.6", - "alpine-ppc64le", - "alpine", - "linux-musl-ppc64le", - "linux-musl", - "linux-ppc64le", - "linux", - "unix-ppc64le", - "unix", - "any", - "base" - ], - "alpine.3.10-s390x": [ - "alpine.3.10-s390x", - "alpine.3.10", - "alpine.3.9-s390x", - "alpine.3.9", - "alpine.3.8-s390x", - "alpine.3.8", - "alpine.3.7-s390x", - "alpine.3.7", - "alpine.3.6-s390x", - "alpine.3.6", - "alpine-s390x", - "alpine", - "linux-musl-s390x", - "linux-musl", - "linux-s390x", - "linux", - "unix-s390x", - "unix", - "any", - "base" - ], - "alpine.3.10-x64": [ - "alpine.3.10-x64", - "alpine.3.10", - "alpine.3.9-x64", - "alpine.3.9", - "alpine.3.8-x64", - "alpine.3.8", - "alpine.3.7-x64", - "alpine.3.7", - "alpine.3.6-x64", - "alpine.3.6", - "alpine-x64", - "alpine", - "linux-musl-x64", - "linux-musl", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "alpine.3.10-x86": [ - "alpine.3.10-x86", - "alpine.3.10", - "alpine.3.9-x86", - "alpine.3.9", - "alpine.3.8-x86", - "alpine.3.8", - "alpine.3.7-x86", - "alpine.3.7", - "alpine.3.6-x86", - "alpine.3.6", - "alpine-x86", - "alpine", - "linux-musl-x86", - "linux-musl", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "alpine.3.11": [ - "alpine.3.11", - "alpine.3.10", - "alpine.3.9", - "alpine.3.8", - "alpine.3.7", - "alpine.3.6", - "alpine", - "linux-musl", - "linux", - "unix", - "any", - "base" - ], - "alpine.3.11-arm": [ - "alpine.3.11-arm", - "alpine.3.11", - "alpine.3.10-arm", - "alpine.3.10", - "alpine.3.9-arm", - "alpine.3.9", - "alpine.3.8-arm", - "alpine.3.8", - "alpine.3.7-arm", - "alpine.3.7", - "alpine.3.6-arm", - "alpine.3.6", - "alpine-arm", - "alpine", - "linux-musl-arm", - "linux-musl", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "alpine.3.11-arm64": [ - "alpine.3.11-arm64", - "alpine.3.11", - "alpine.3.10-arm64", - "alpine.3.10", - "alpine.3.9-arm64", - "alpine.3.9", - "alpine.3.8-arm64", - "alpine.3.8", - "alpine.3.7-arm64", - "alpine.3.7", - "alpine.3.6-arm64", - "alpine.3.6", - "alpine-arm64", - "alpine", - "linux-musl-arm64", - "linux-musl", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "alpine.3.11-armv6": [ - "alpine.3.11-armv6", - "alpine.3.11", - "alpine.3.10-armv6", - "alpine.3.10", - "alpine.3.9-armv6", - "alpine.3.9", - "alpine.3.8-armv6", - "alpine.3.8", - "alpine.3.7-armv6", - "alpine.3.7", - "alpine.3.6-armv6", - "alpine.3.6", - "alpine-armv6", - "alpine", - "linux-musl-armv6", - "linux-musl", - "linux-armv6", - "linux", - "unix-armv6", - "unix", - "any", - "base" - ], - "alpine.3.11-ppc64le": [ - "alpine.3.11-ppc64le", - "alpine.3.11", - "alpine.3.10-ppc64le", - "alpine.3.10", - "alpine.3.9-ppc64le", - "alpine.3.9", - "alpine.3.8-ppc64le", - "alpine.3.8", - "alpine.3.7-ppc64le", - "alpine.3.7", - "alpine.3.6-ppc64le", - "alpine.3.6", - "alpine-ppc64le", - "alpine", - "linux-musl-ppc64le", - "linux-musl", - "linux-ppc64le", - "linux", - "unix-ppc64le", - "unix", - "any", - "base" - ], - "alpine.3.11-s390x": [ - "alpine.3.11-s390x", - "alpine.3.11", - "alpine.3.10-s390x", - "alpine.3.10", - "alpine.3.9-s390x", - "alpine.3.9", - "alpine.3.8-s390x", - "alpine.3.8", - "alpine.3.7-s390x", - "alpine.3.7", - "alpine.3.6-s390x", - "alpine.3.6", - "alpine-s390x", - "alpine", - "linux-musl-s390x", - "linux-musl", - "linux-s390x", - "linux", - "unix-s390x", - "unix", - "any", - "base" - ], - "alpine.3.11-x64": [ - "alpine.3.11-x64", - "alpine.3.11", - "alpine.3.10-x64", - "alpine.3.10", - "alpine.3.9-x64", - "alpine.3.9", - "alpine.3.8-x64", - "alpine.3.8", - "alpine.3.7-x64", - "alpine.3.7", - "alpine.3.6-x64", - "alpine.3.6", - "alpine-x64", - "alpine", - "linux-musl-x64", - "linux-musl", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "alpine.3.11-x86": [ - "alpine.3.11-x86", - "alpine.3.11", - "alpine.3.10-x86", - "alpine.3.10", - "alpine.3.9-x86", - "alpine.3.9", - "alpine.3.8-x86", - "alpine.3.8", - "alpine.3.7-x86", - "alpine.3.7", - "alpine.3.6-x86", - "alpine.3.6", - "alpine-x86", - "alpine", - "linux-musl-x86", - "linux-musl", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "alpine.3.12": [ - "alpine.3.12", - "alpine.3.11", - "alpine.3.10", - "alpine.3.9", - "alpine.3.8", - "alpine.3.7", - "alpine.3.6", - "alpine", - "linux-musl", - "linux", - "unix", - "any", - "base" - ], - "alpine.3.12-arm": [ - "alpine.3.12-arm", - "alpine.3.12", - "alpine.3.11-arm", - "alpine.3.11", - "alpine.3.10-arm", - "alpine.3.10", - "alpine.3.9-arm", - "alpine.3.9", - "alpine.3.8-arm", - "alpine.3.8", - "alpine.3.7-arm", - "alpine.3.7", - "alpine.3.6-arm", - "alpine.3.6", - "alpine-arm", - "alpine", - "linux-musl-arm", - "linux-musl", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "alpine.3.12-arm64": [ - "alpine.3.12-arm64", - "alpine.3.12", - "alpine.3.11-arm64", - "alpine.3.11", - "alpine.3.10-arm64", - "alpine.3.10", - "alpine.3.9-arm64", - "alpine.3.9", - "alpine.3.8-arm64", - "alpine.3.8", - "alpine.3.7-arm64", - "alpine.3.7", - "alpine.3.6-arm64", - "alpine.3.6", - "alpine-arm64", - "alpine", - "linux-musl-arm64", - "linux-musl", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "alpine.3.12-armv6": [ - "alpine.3.12-armv6", - "alpine.3.12", - "alpine.3.11-armv6", - "alpine.3.11", - "alpine.3.10-armv6", - "alpine.3.10", - "alpine.3.9-armv6", - "alpine.3.9", - "alpine.3.8-armv6", - "alpine.3.8", - "alpine.3.7-armv6", - "alpine.3.7", - "alpine.3.6-armv6", - "alpine.3.6", - "alpine-armv6", - "alpine", - "linux-musl-armv6", - "linux-musl", - "linux-armv6", - "linux", - "unix-armv6", - "unix", - "any", - "base" - ], - "alpine.3.12-ppc64le": [ - "alpine.3.12-ppc64le", - "alpine.3.12", - "alpine.3.11-ppc64le", - "alpine.3.11", - "alpine.3.10-ppc64le", - "alpine.3.10", - "alpine.3.9-ppc64le", - "alpine.3.9", - "alpine.3.8-ppc64le", - "alpine.3.8", - "alpine.3.7-ppc64le", - "alpine.3.7", - "alpine.3.6-ppc64le", - "alpine.3.6", - "alpine-ppc64le", - "alpine", - "linux-musl-ppc64le", - "linux-musl", - "linux-ppc64le", - "linux", - "unix-ppc64le", - "unix", - "any", - "base" - ], - "alpine.3.12-s390x": [ - "alpine.3.12-s390x", - "alpine.3.12", - "alpine.3.11-s390x", - "alpine.3.11", - "alpine.3.10-s390x", - "alpine.3.10", - "alpine.3.9-s390x", - "alpine.3.9", - "alpine.3.8-s390x", - "alpine.3.8", - "alpine.3.7-s390x", - "alpine.3.7", - "alpine.3.6-s390x", - "alpine.3.6", - "alpine-s390x", - "alpine", - "linux-musl-s390x", - "linux-musl", - "linux-s390x", - "linux", - "unix-s390x", - "unix", - "any", - "base" - ], - "alpine.3.12-x64": [ - "alpine.3.12-x64", - "alpine.3.12", - "alpine.3.11-x64", - "alpine.3.11", - "alpine.3.10-x64", - "alpine.3.10", - "alpine.3.9-x64", - "alpine.3.9", - "alpine.3.8-x64", - "alpine.3.8", - "alpine.3.7-x64", - "alpine.3.7", - "alpine.3.6-x64", - "alpine.3.6", - "alpine-x64", - "alpine", - "linux-musl-x64", - "linux-musl", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "alpine.3.12-x86": [ - "alpine.3.12-x86", - "alpine.3.12", - "alpine.3.11-x86", - "alpine.3.11", - "alpine.3.10-x86", - "alpine.3.10", - "alpine.3.9-x86", - "alpine.3.9", - "alpine.3.8-x86", - "alpine.3.8", - "alpine.3.7-x86", - "alpine.3.7", - "alpine.3.6-x86", - "alpine.3.6", - "alpine-x86", - "alpine", - "linux-musl-x86", - "linux-musl", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "alpine.3.13": [ - "alpine.3.13", - "alpine.3.12", - "alpine.3.11", - "alpine.3.10", - "alpine.3.9", - "alpine.3.8", - "alpine.3.7", - "alpine.3.6", - "alpine", - "linux-musl", - "linux", - "unix", - "any", - "base" - ], - "alpine.3.13-arm": [ - "alpine.3.13-arm", - "alpine.3.13", - "alpine.3.12-arm", - "alpine.3.12", - "alpine.3.11-arm", - "alpine.3.11", - "alpine.3.10-arm", - "alpine.3.10", - "alpine.3.9-arm", - "alpine.3.9", - "alpine.3.8-arm", - "alpine.3.8", - "alpine.3.7-arm", - "alpine.3.7", - "alpine.3.6-arm", - "alpine.3.6", - "alpine-arm", - "alpine", - "linux-musl-arm", - "linux-musl", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "alpine.3.13-arm64": [ - "alpine.3.13-arm64", - "alpine.3.13", - "alpine.3.12-arm64", - "alpine.3.12", - "alpine.3.11-arm64", - "alpine.3.11", - "alpine.3.10-arm64", - "alpine.3.10", - "alpine.3.9-arm64", - "alpine.3.9", - "alpine.3.8-arm64", - "alpine.3.8", - "alpine.3.7-arm64", - "alpine.3.7", - "alpine.3.6-arm64", - "alpine.3.6", - "alpine-arm64", - "alpine", - "linux-musl-arm64", - "linux-musl", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "alpine.3.13-armv6": [ - "alpine.3.13-armv6", - "alpine.3.13", - "alpine.3.12-armv6", - "alpine.3.12", - "alpine.3.11-armv6", - "alpine.3.11", - "alpine.3.10-armv6", - "alpine.3.10", - "alpine.3.9-armv6", - "alpine.3.9", - "alpine.3.8-armv6", - "alpine.3.8", - "alpine.3.7-armv6", - "alpine.3.7", - "alpine.3.6-armv6", - "alpine.3.6", - "alpine-armv6", - "alpine", - "linux-musl-armv6", - "linux-musl", - "linux-armv6", - "linux", - "unix-armv6", - "unix", - "any", - "base" - ], - "alpine.3.13-ppc64le": [ - "alpine.3.13-ppc64le", - "alpine.3.13", - "alpine.3.12-ppc64le", - "alpine.3.12", - "alpine.3.11-ppc64le", - "alpine.3.11", - "alpine.3.10-ppc64le", - "alpine.3.10", - "alpine.3.9-ppc64le", - "alpine.3.9", - "alpine.3.8-ppc64le", - "alpine.3.8", - "alpine.3.7-ppc64le", - "alpine.3.7", - "alpine.3.6-ppc64le", - "alpine.3.6", - "alpine-ppc64le", - "alpine", - "linux-musl-ppc64le", - "linux-musl", - "linux-ppc64le", - "linux", - "unix-ppc64le", - "unix", - "any", - "base" - ], - "alpine.3.13-s390x": [ - "alpine.3.13-s390x", - "alpine.3.13", - "alpine.3.12-s390x", - "alpine.3.12", - "alpine.3.11-s390x", - "alpine.3.11", - "alpine.3.10-s390x", - "alpine.3.10", - "alpine.3.9-s390x", - "alpine.3.9", - "alpine.3.8-s390x", - "alpine.3.8", - "alpine.3.7-s390x", - "alpine.3.7", - "alpine.3.6-s390x", - "alpine.3.6", - "alpine-s390x", - "alpine", - "linux-musl-s390x", - "linux-musl", - "linux-s390x", - "linux", - "unix-s390x", - "unix", - "any", - "base" - ], - "alpine.3.13-x64": [ - "alpine.3.13-x64", - "alpine.3.13", - "alpine.3.12-x64", - "alpine.3.12", - "alpine.3.11-x64", - "alpine.3.11", - "alpine.3.10-x64", - "alpine.3.10", - "alpine.3.9-x64", - "alpine.3.9", - "alpine.3.8-x64", - "alpine.3.8", - "alpine.3.7-x64", - "alpine.3.7", - "alpine.3.6-x64", - "alpine.3.6", - "alpine-x64", - "alpine", - "linux-musl-x64", - "linux-musl", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "alpine.3.13-x86": [ - "alpine.3.13-x86", - "alpine.3.13", - "alpine.3.12-x86", - "alpine.3.12", - "alpine.3.11-x86", - "alpine.3.11", - "alpine.3.10-x86", - "alpine.3.10", - "alpine.3.9-x86", - "alpine.3.9", - "alpine.3.8-x86", - "alpine.3.8", - "alpine.3.7-x86", - "alpine.3.7", - "alpine.3.6-x86", - "alpine.3.6", - "alpine-x86", - "alpine", - "linux-musl-x86", - "linux-musl", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "alpine.3.14": [ - "alpine.3.14", - "alpine.3.13", - "alpine.3.12", - "alpine.3.11", - "alpine.3.10", - "alpine.3.9", - "alpine.3.8", - "alpine.3.7", - "alpine.3.6", - "alpine", - "linux-musl", - "linux", - "unix", - "any", - "base" - ], - "alpine.3.14-arm": [ - "alpine.3.14-arm", - "alpine.3.14", - "alpine.3.13-arm", - "alpine.3.13", - "alpine.3.12-arm", - "alpine.3.12", - "alpine.3.11-arm", - "alpine.3.11", - "alpine.3.10-arm", - "alpine.3.10", - "alpine.3.9-arm", - "alpine.3.9", - "alpine.3.8-arm", - "alpine.3.8", - "alpine.3.7-arm", - "alpine.3.7", - "alpine.3.6-arm", - "alpine.3.6", - "alpine-arm", - "alpine", - "linux-musl-arm", - "linux-musl", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "alpine.3.14-arm64": [ - "alpine.3.14-arm64", - "alpine.3.14", - "alpine.3.13-arm64", - "alpine.3.13", - "alpine.3.12-arm64", - "alpine.3.12", - "alpine.3.11-arm64", - "alpine.3.11", - "alpine.3.10-arm64", - "alpine.3.10", - "alpine.3.9-arm64", - "alpine.3.9", - "alpine.3.8-arm64", - "alpine.3.8", - "alpine.3.7-arm64", - "alpine.3.7", - "alpine.3.6-arm64", - "alpine.3.6", - "alpine-arm64", - "alpine", - "linux-musl-arm64", - "linux-musl", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "alpine.3.14-armv6": [ - "alpine.3.14-armv6", - "alpine.3.14", - "alpine.3.13-armv6", - "alpine.3.13", - "alpine.3.12-armv6", - "alpine.3.12", - "alpine.3.11-armv6", - "alpine.3.11", - "alpine.3.10-armv6", - "alpine.3.10", - "alpine.3.9-armv6", - "alpine.3.9", - "alpine.3.8-armv6", - "alpine.3.8", - "alpine.3.7-armv6", - "alpine.3.7", - "alpine.3.6-armv6", - "alpine.3.6", - "alpine-armv6", - "alpine", - "linux-musl-armv6", - "linux-musl", - "linux-armv6", - "linux", - "unix-armv6", - "unix", - "any", - "base" - ], - "alpine.3.14-ppc64le": [ - "alpine.3.14-ppc64le", - "alpine.3.14", - "alpine.3.13-ppc64le", - "alpine.3.13", - "alpine.3.12-ppc64le", - "alpine.3.12", - "alpine.3.11-ppc64le", - "alpine.3.11", - "alpine.3.10-ppc64le", - "alpine.3.10", - "alpine.3.9-ppc64le", - "alpine.3.9", - "alpine.3.8-ppc64le", - "alpine.3.8", - "alpine.3.7-ppc64le", - "alpine.3.7", - "alpine.3.6-ppc64le", - "alpine.3.6", - "alpine-ppc64le", - "alpine", - "linux-musl-ppc64le", - "linux-musl", - "linux-ppc64le", - "linux", - "unix-ppc64le", - "unix", - "any", - "base" - ], - "alpine.3.14-s390x": [ - "alpine.3.14-s390x", - "alpine.3.14", - "alpine.3.13-s390x", - "alpine.3.13", - "alpine.3.12-s390x", - "alpine.3.12", - "alpine.3.11-s390x", - "alpine.3.11", - "alpine.3.10-s390x", - "alpine.3.10", - "alpine.3.9-s390x", - "alpine.3.9", - "alpine.3.8-s390x", - "alpine.3.8", - "alpine.3.7-s390x", - "alpine.3.7", - "alpine.3.6-s390x", - "alpine.3.6", - "alpine-s390x", - "alpine", - "linux-musl-s390x", - "linux-musl", - "linux-s390x", - "linux", - "unix-s390x", - "unix", - "any", - "base" - ], - "alpine.3.14-x64": [ - "alpine.3.14-x64", - "alpine.3.14", - "alpine.3.13-x64", - "alpine.3.13", - "alpine.3.12-x64", - "alpine.3.12", - "alpine.3.11-x64", - "alpine.3.11", - "alpine.3.10-x64", - "alpine.3.10", - "alpine.3.9-x64", - "alpine.3.9", - "alpine.3.8-x64", - "alpine.3.8", - "alpine.3.7-x64", - "alpine.3.7", - "alpine.3.6-x64", - "alpine.3.6", - "alpine-x64", - "alpine", - "linux-musl-x64", - "linux-musl", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "alpine.3.14-x86": [ - "alpine.3.14-x86", - "alpine.3.14", - "alpine.3.13-x86", - "alpine.3.13", - "alpine.3.12-x86", - "alpine.3.12", - "alpine.3.11-x86", - "alpine.3.11", - "alpine.3.10-x86", - "alpine.3.10", - "alpine.3.9-x86", - "alpine.3.9", - "alpine.3.8-x86", - "alpine.3.8", - "alpine.3.7-x86", - "alpine.3.7", - "alpine.3.6-x86", - "alpine.3.6", - "alpine-x86", - "alpine", - "linux-musl-x86", - "linux-musl", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "alpine.3.15": [ - "alpine.3.15", - "alpine.3.14", - "alpine.3.13", - "alpine.3.12", - "alpine.3.11", - "alpine.3.10", - "alpine.3.9", - "alpine.3.8", - "alpine.3.7", - "alpine.3.6", - "alpine", - "linux-musl", - "linux", - "unix", - "any", - "base" - ], - "alpine.3.15-arm": [ - "alpine.3.15-arm", - "alpine.3.15", - "alpine.3.14-arm", - "alpine.3.14", - "alpine.3.13-arm", - "alpine.3.13", - "alpine.3.12-arm", - "alpine.3.12", - "alpine.3.11-arm", - "alpine.3.11", - "alpine.3.10-arm", - "alpine.3.10", - "alpine.3.9-arm", - "alpine.3.9", - "alpine.3.8-arm", - "alpine.3.8", - "alpine.3.7-arm", - "alpine.3.7", - "alpine.3.6-arm", - "alpine.3.6", - "alpine-arm", - "alpine", - "linux-musl-arm", - "linux-musl", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "alpine.3.15-arm64": [ - "alpine.3.15-arm64", - "alpine.3.15", - "alpine.3.14-arm64", - "alpine.3.14", - "alpine.3.13-arm64", - "alpine.3.13", - "alpine.3.12-arm64", - "alpine.3.12", - "alpine.3.11-arm64", - "alpine.3.11", - "alpine.3.10-arm64", - "alpine.3.10", - "alpine.3.9-arm64", - "alpine.3.9", - "alpine.3.8-arm64", - "alpine.3.8", - "alpine.3.7-arm64", - "alpine.3.7", - "alpine.3.6-arm64", - "alpine.3.6", - "alpine-arm64", - "alpine", - "linux-musl-arm64", - "linux-musl", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "alpine.3.15-armv6": [ - "alpine.3.15-armv6", - "alpine.3.15", - "alpine.3.14-armv6", - "alpine.3.14", - "alpine.3.13-armv6", - "alpine.3.13", - "alpine.3.12-armv6", - "alpine.3.12", - "alpine.3.11-armv6", - "alpine.3.11", - "alpine.3.10-armv6", - "alpine.3.10", - "alpine.3.9-armv6", - "alpine.3.9", - "alpine.3.8-armv6", - "alpine.3.8", - "alpine.3.7-armv6", - "alpine.3.7", - "alpine.3.6-armv6", - "alpine.3.6", - "alpine-armv6", - "alpine", - "linux-musl-armv6", - "linux-musl", - "linux-armv6", - "linux", - "unix-armv6", - "unix", - "any", - "base" - ], - "alpine.3.15-ppc64le": [ - "alpine.3.15-ppc64le", - "alpine.3.15", - "alpine.3.14-ppc64le", - "alpine.3.14", - "alpine.3.13-ppc64le", - "alpine.3.13", - "alpine.3.12-ppc64le", - "alpine.3.12", - "alpine.3.11-ppc64le", - "alpine.3.11", - "alpine.3.10-ppc64le", - "alpine.3.10", - "alpine.3.9-ppc64le", - "alpine.3.9", - "alpine.3.8-ppc64le", - "alpine.3.8", - "alpine.3.7-ppc64le", - "alpine.3.7", - "alpine.3.6-ppc64le", - "alpine.3.6", - "alpine-ppc64le", - "alpine", - "linux-musl-ppc64le", - "linux-musl", - "linux-ppc64le", - "linux", - "unix-ppc64le", - "unix", - "any", - "base" - ], - "alpine.3.15-s390x": [ - "alpine.3.15-s390x", - "alpine.3.15", - "alpine.3.14-s390x", - "alpine.3.14", - "alpine.3.13-s390x", - "alpine.3.13", - "alpine.3.12-s390x", - "alpine.3.12", - "alpine.3.11-s390x", - "alpine.3.11", - "alpine.3.10-s390x", - "alpine.3.10", - "alpine.3.9-s390x", - "alpine.3.9", - "alpine.3.8-s390x", - "alpine.3.8", - "alpine.3.7-s390x", - "alpine.3.7", - "alpine.3.6-s390x", - "alpine.3.6", - "alpine-s390x", - "alpine", - "linux-musl-s390x", - "linux-musl", - "linux-s390x", - "linux", - "unix-s390x", - "unix", - "any", - "base" - ], - "alpine.3.15-x64": [ - "alpine.3.15-x64", - "alpine.3.15", - "alpine.3.14-x64", - "alpine.3.14", - "alpine.3.13-x64", - "alpine.3.13", - "alpine.3.12-x64", - "alpine.3.12", - "alpine.3.11-x64", - "alpine.3.11", - "alpine.3.10-x64", - "alpine.3.10", - "alpine.3.9-x64", - "alpine.3.9", - "alpine.3.8-x64", - "alpine.3.8", - "alpine.3.7-x64", - "alpine.3.7", - "alpine.3.6-x64", - "alpine.3.6", - "alpine-x64", - "alpine", - "linux-musl-x64", - "linux-musl", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "alpine.3.15-x86": [ - "alpine.3.15-x86", - "alpine.3.15", - "alpine.3.14-x86", - "alpine.3.14", - "alpine.3.13-x86", - "alpine.3.13", - "alpine.3.12-x86", - "alpine.3.12", - "alpine.3.11-x86", - "alpine.3.11", - "alpine.3.10-x86", - "alpine.3.10", - "alpine.3.9-x86", - "alpine.3.9", - "alpine.3.8-x86", - "alpine.3.8", - "alpine.3.7-x86", - "alpine.3.7", - "alpine.3.6-x86", - "alpine.3.6", - "alpine-x86", - "alpine", - "linux-musl-x86", - "linux-musl", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "alpine.3.16": [ - "alpine.3.16", - "alpine.3.15", - "alpine.3.14", - "alpine.3.13", - "alpine.3.12", - "alpine.3.11", - "alpine.3.10", - "alpine.3.9", - "alpine.3.8", - "alpine.3.7", - "alpine.3.6", - "alpine", - "linux-musl", - "linux", - "unix", - "any", - "base" - ], - "alpine.3.16-arm": [ - "alpine.3.16-arm", - "alpine.3.16", - "alpine.3.15-arm", - "alpine.3.15", - "alpine.3.14-arm", - "alpine.3.14", - "alpine.3.13-arm", - "alpine.3.13", - "alpine.3.12-arm", - "alpine.3.12", - "alpine.3.11-arm", - "alpine.3.11", - "alpine.3.10-arm", - "alpine.3.10", - "alpine.3.9-arm", - "alpine.3.9", - "alpine.3.8-arm", - "alpine.3.8", - "alpine.3.7-arm", - "alpine.3.7", - "alpine.3.6-arm", - "alpine.3.6", - "alpine-arm", - "alpine", - "linux-musl-arm", - "linux-musl", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "alpine.3.16-arm64": [ - "alpine.3.16-arm64", - "alpine.3.16", - "alpine.3.15-arm64", - "alpine.3.15", - "alpine.3.14-arm64", - "alpine.3.14", - "alpine.3.13-arm64", - "alpine.3.13", - "alpine.3.12-arm64", - "alpine.3.12", - "alpine.3.11-arm64", - "alpine.3.11", - "alpine.3.10-arm64", - "alpine.3.10", - "alpine.3.9-arm64", - "alpine.3.9", - "alpine.3.8-arm64", - "alpine.3.8", - "alpine.3.7-arm64", - "alpine.3.7", - "alpine.3.6-arm64", - "alpine.3.6", - "alpine-arm64", - "alpine", - "linux-musl-arm64", - "linux-musl", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "alpine.3.16-armv6": [ - "alpine.3.16-armv6", - "alpine.3.16", - "alpine.3.15-armv6", - "alpine.3.15", - "alpine.3.14-armv6", - "alpine.3.14", - "alpine.3.13-armv6", - "alpine.3.13", - "alpine.3.12-armv6", - "alpine.3.12", - "alpine.3.11-armv6", - "alpine.3.11", - "alpine.3.10-armv6", - "alpine.3.10", - "alpine.3.9-armv6", - "alpine.3.9", - "alpine.3.8-armv6", - "alpine.3.8", - "alpine.3.7-armv6", - "alpine.3.7", - "alpine.3.6-armv6", - "alpine.3.6", - "alpine-armv6", - "alpine", - "linux-musl-armv6", - "linux-musl", - "linux-armv6", - "linux", - "unix-armv6", - "unix", - "any", - "base" - ], - "alpine.3.16-ppc64le": [ - "alpine.3.16-ppc64le", - "alpine.3.16", - "alpine.3.15-ppc64le", - "alpine.3.15", - "alpine.3.14-ppc64le", - "alpine.3.14", - "alpine.3.13-ppc64le", - "alpine.3.13", - "alpine.3.12-ppc64le", - "alpine.3.12", - "alpine.3.11-ppc64le", - "alpine.3.11", - "alpine.3.10-ppc64le", - "alpine.3.10", - "alpine.3.9-ppc64le", - "alpine.3.9", - "alpine.3.8-ppc64le", - "alpine.3.8", - "alpine.3.7-ppc64le", - "alpine.3.7", - "alpine.3.6-ppc64le", - "alpine.3.6", - "alpine-ppc64le", - "alpine", - "linux-musl-ppc64le", - "linux-musl", - "linux-ppc64le", - "linux", - "unix-ppc64le", - "unix", - "any", - "base" - ], - "alpine.3.16-s390x": [ - "alpine.3.16-s390x", - "alpine.3.16", - "alpine.3.15-s390x", - "alpine.3.15", - "alpine.3.14-s390x", - "alpine.3.14", - "alpine.3.13-s390x", - "alpine.3.13", - "alpine.3.12-s390x", - "alpine.3.12", - "alpine.3.11-s390x", - "alpine.3.11", - "alpine.3.10-s390x", - "alpine.3.10", - "alpine.3.9-s390x", - "alpine.3.9", - "alpine.3.8-s390x", - "alpine.3.8", - "alpine.3.7-s390x", - "alpine.3.7", - "alpine.3.6-s390x", - "alpine.3.6", - "alpine-s390x", - "alpine", - "linux-musl-s390x", - "linux-musl", - "linux-s390x", - "linux", - "unix-s390x", - "unix", - "any", - "base" - ], - "alpine.3.16-x64": [ - "alpine.3.16-x64", - "alpine.3.16", - "alpine.3.15-x64", - "alpine.3.15", - "alpine.3.14-x64", - "alpine.3.14", - "alpine.3.13-x64", - "alpine.3.13", - "alpine.3.12-x64", - "alpine.3.12", - "alpine.3.11-x64", - "alpine.3.11", - "alpine.3.10-x64", - "alpine.3.10", - "alpine.3.9-x64", - "alpine.3.9", - "alpine.3.8-x64", - "alpine.3.8", - "alpine.3.7-x64", - "alpine.3.7", - "alpine.3.6-x64", - "alpine.3.6", - "alpine-x64", - "alpine", - "linux-musl-x64", - "linux-musl", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "alpine.3.16-x86": [ - "alpine.3.16-x86", - "alpine.3.16", - "alpine.3.15-x86", - "alpine.3.15", - "alpine.3.14-x86", - "alpine.3.14", - "alpine.3.13-x86", - "alpine.3.13", - "alpine.3.12-x86", - "alpine.3.12", - "alpine.3.11-x86", - "alpine.3.11", - "alpine.3.10-x86", - "alpine.3.10", - "alpine.3.9-x86", - "alpine.3.9", - "alpine.3.8-x86", - "alpine.3.8", - "alpine.3.7-x86", - "alpine.3.7", - "alpine.3.6-x86", - "alpine.3.6", - "alpine-x86", - "alpine", - "linux-musl-x86", - "linux-musl", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "alpine.3.17": [ - "alpine.3.17", - "alpine.3.16", - "alpine.3.15", - "alpine.3.14", - "alpine.3.13", - "alpine.3.12", - "alpine.3.11", - "alpine.3.10", - "alpine.3.9", - "alpine.3.8", - "alpine.3.7", - "alpine.3.6", - "alpine", - "linux-musl", - "linux", - "unix", - "any", - "base" - ], - "alpine.3.17-arm": [ - "alpine.3.17-arm", - "alpine.3.17", - "alpine.3.16-arm", - "alpine.3.16", - "alpine.3.15-arm", - "alpine.3.15", - "alpine.3.14-arm", - "alpine.3.14", - "alpine.3.13-arm", - "alpine.3.13", - "alpine.3.12-arm", - "alpine.3.12", - "alpine.3.11-arm", - "alpine.3.11", - "alpine.3.10-arm", - "alpine.3.10", - "alpine.3.9-arm", - "alpine.3.9", - "alpine.3.8-arm", - "alpine.3.8", - "alpine.3.7-arm", - "alpine.3.7", - "alpine.3.6-arm", - "alpine.3.6", - "alpine-arm", - "alpine", - "linux-musl-arm", - "linux-musl", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "alpine.3.17-arm64": [ - "alpine.3.17-arm64", - "alpine.3.17", - "alpine.3.16-arm64", - "alpine.3.16", - "alpine.3.15-arm64", - "alpine.3.15", - "alpine.3.14-arm64", - "alpine.3.14", - "alpine.3.13-arm64", - "alpine.3.13", - "alpine.3.12-arm64", - "alpine.3.12", - "alpine.3.11-arm64", - "alpine.3.11", - "alpine.3.10-arm64", - "alpine.3.10", - "alpine.3.9-arm64", - "alpine.3.9", - "alpine.3.8-arm64", - "alpine.3.8", - "alpine.3.7-arm64", - "alpine.3.7", - "alpine.3.6-arm64", - "alpine.3.6", - "alpine-arm64", - "alpine", - "linux-musl-arm64", - "linux-musl", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "alpine.3.17-armv6": [ - "alpine.3.17-armv6", - "alpine.3.17", - "alpine.3.16-armv6", - "alpine.3.16", - "alpine.3.15-armv6", - "alpine.3.15", - "alpine.3.14-armv6", - "alpine.3.14", - "alpine.3.13-armv6", - "alpine.3.13", - "alpine.3.12-armv6", - "alpine.3.12", - "alpine.3.11-armv6", - "alpine.3.11", - "alpine.3.10-armv6", - "alpine.3.10", - "alpine.3.9-armv6", - "alpine.3.9", - "alpine.3.8-armv6", - "alpine.3.8", - "alpine.3.7-armv6", - "alpine.3.7", - "alpine.3.6-armv6", - "alpine.3.6", - "alpine-armv6", - "alpine", - "linux-musl-armv6", - "linux-musl", - "linux-armv6", - "linux", - "unix-armv6", - "unix", - "any", - "base" - ], - "alpine.3.17-ppc64le": [ - "alpine.3.17-ppc64le", - "alpine.3.17", - "alpine.3.16-ppc64le", - "alpine.3.16", - "alpine.3.15-ppc64le", - "alpine.3.15", - "alpine.3.14-ppc64le", - "alpine.3.14", - "alpine.3.13-ppc64le", - "alpine.3.13", - "alpine.3.12-ppc64le", - "alpine.3.12", - "alpine.3.11-ppc64le", - "alpine.3.11", - "alpine.3.10-ppc64le", - "alpine.3.10", - "alpine.3.9-ppc64le", - "alpine.3.9", - "alpine.3.8-ppc64le", - "alpine.3.8", - "alpine.3.7-ppc64le", - "alpine.3.7", - "alpine.3.6-ppc64le", - "alpine.3.6", - "alpine-ppc64le", - "alpine", - "linux-musl-ppc64le", - "linux-musl", - "linux-ppc64le", - "linux", - "unix-ppc64le", - "unix", - "any", - "base" - ], - "alpine.3.17-s390x": [ - "alpine.3.17-s390x", - "alpine.3.17", - "alpine.3.16-s390x", - "alpine.3.16", - "alpine.3.15-s390x", - "alpine.3.15", - "alpine.3.14-s390x", - "alpine.3.14", - "alpine.3.13-s390x", - "alpine.3.13", - "alpine.3.12-s390x", - "alpine.3.12", - "alpine.3.11-s390x", - "alpine.3.11", - "alpine.3.10-s390x", - "alpine.3.10", - "alpine.3.9-s390x", - "alpine.3.9", - "alpine.3.8-s390x", - "alpine.3.8", - "alpine.3.7-s390x", - "alpine.3.7", - "alpine.3.6-s390x", - "alpine.3.6", - "alpine-s390x", - "alpine", - "linux-musl-s390x", - "linux-musl", - "linux-s390x", - "linux", - "unix-s390x", - "unix", - "any", - "base" - ], - "alpine.3.17-x64": [ - "alpine.3.17-x64", - "alpine.3.17", - "alpine.3.16-x64", - "alpine.3.16", - "alpine.3.15-x64", - "alpine.3.15", - "alpine.3.14-x64", - "alpine.3.14", - "alpine.3.13-x64", - "alpine.3.13", - "alpine.3.12-x64", - "alpine.3.12", - "alpine.3.11-x64", - "alpine.3.11", - "alpine.3.10-x64", - "alpine.3.10", - "alpine.3.9-x64", - "alpine.3.9", - "alpine.3.8-x64", - "alpine.3.8", - "alpine.3.7-x64", - "alpine.3.7", - "alpine.3.6-x64", - "alpine.3.6", - "alpine-x64", - "alpine", - "linux-musl-x64", - "linux-musl", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "alpine.3.17-x86": [ - "alpine.3.17-x86", - "alpine.3.17", - "alpine.3.16-x86", - "alpine.3.16", - "alpine.3.15-x86", - "alpine.3.15", - "alpine.3.14-x86", - "alpine.3.14", - "alpine.3.13-x86", - "alpine.3.13", - "alpine.3.12-x86", - "alpine.3.12", - "alpine.3.11-x86", - "alpine.3.11", - "alpine.3.10-x86", - "alpine.3.10", - "alpine.3.9-x86", - "alpine.3.9", - "alpine.3.8-x86", - "alpine.3.8", - "alpine.3.7-x86", - "alpine.3.7", - "alpine.3.6-x86", - "alpine.3.6", - "alpine-x86", - "alpine", - "linux-musl-x86", - "linux-musl", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "alpine.3.18": [ - "alpine.3.18", - "alpine.3.17", - "alpine.3.16", - "alpine.3.15", - "alpine.3.14", - "alpine.3.13", - "alpine.3.12", - "alpine.3.11", - "alpine.3.10", - "alpine.3.9", - "alpine.3.8", - "alpine.3.7", - "alpine.3.6", - "alpine", - "linux-musl", - "linux", - "unix", - "any", - "base" - ], - "alpine.3.18-arm": [ - "alpine.3.18-arm", - "alpine.3.18", - "alpine.3.17-arm", - "alpine.3.17", - "alpine.3.16-arm", - "alpine.3.16", - "alpine.3.15-arm", - "alpine.3.15", - "alpine.3.14-arm", - "alpine.3.14", - "alpine.3.13-arm", - "alpine.3.13", - "alpine.3.12-arm", - "alpine.3.12", - "alpine.3.11-arm", - "alpine.3.11", - "alpine.3.10-arm", - "alpine.3.10", - "alpine.3.9-arm", - "alpine.3.9", - "alpine.3.8-arm", - "alpine.3.8", - "alpine.3.7-arm", - "alpine.3.7", - "alpine.3.6-arm", - "alpine.3.6", - "alpine-arm", - "alpine", - "linux-musl-arm", - "linux-musl", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "alpine.3.18-arm64": [ - "alpine.3.18-arm64", - "alpine.3.18", - "alpine.3.17-arm64", - "alpine.3.17", - "alpine.3.16-arm64", - "alpine.3.16", - "alpine.3.15-arm64", - "alpine.3.15", - "alpine.3.14-arm64", - "alpine.3.14", - "alpine.3.13-arm64", - "alpine.3.13", - "alpine.3.12-arm64", - "alpine.3.12", - "alpine.3.11-arm64", - "alpine.3.11", - "alpine.3.10-arm64", - "alpine.3.10", - "alpine.3.9-arm64", - "alpine.3.9", - "alpine.3.8-arm64", - "alpine.3.8", - "alpine.3.7-arm64", - "alpine.3.7", - "alpine.3.6-arm64", - "alpine.3.6", - "alpine-arm64", - "alpine", - "linux-musl-arm64", - "linux-musl", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "alpine.3.18-armv6": [ - "alpine.3.18-armv6", - "alpine.3.18", - "alpine.3.17-armv6", - "alpine.3.17", - "alpine.3.16-armv6", - "alpine.3.16", - "alpine.3.15-armv6", - "alpine.3.15", - "alpine.3.14-armv6", - "alpine.3.14", - "alpine.3.13-armv6", - "alpine.3.13", - "alpine.3.12-armv6", - "alpine.3.12", - "alpine.3.11-armv6", - "alpine.3.11", - "alpine.3.10-armv6", - "alpine.3.10", - "alpine.3.9-armv6", - "alpine.3.9", - "alpine.3.8-armv6", - "alpine.3.8", - "alpine.3.7-armv6", - "alpine.3.7", - "alpine.3.6-armv6", - "alpine.3.6", - "alpine-armv6", - "alpine", - "linux-musl-armv6", - "linux-musl", - "linux-armv6", - "linux", - "unix-armv6", - "unix", - "any", - "base" - ], - "alpine.3.18-ppc64le": [ - "alpine.3.18-ppc64le", - "alpine.3.18", - "alpine.3.17-ppc64le", - "alpine.3.17", - "alpine.3.16-ppc64le", - "alpine.3.16", - "alpine.3.15-ppc64le", - "alpine.3.15", - "alpine.3.14-ppc64le", - "alpine.3.14", - "alpine.3.13-ppc64le", - "alpine.3.13", - "alpine.3.12-ppc64le", - "alpine.3.12", - "alpine.3.11-ppc64le", - "alpine.3.11", - "alpine.3.10-ppc64le", - "alpine.3.10", - "alpine.3.9-ppc64le", - "alpine.3.9", - "alpine.3.8-ppc64le", - "alpine.3.8", - "alpine.3.7-ppc64le", - "alpine.3.7", - "alpine.3.6-ppc64le", - "alpine.3.6", - "alpine-ppc64le", - "alpine", - "linux-musl-ppc64le", - "linux-musl", - "linux-ppc64le", - "linux", - "unix-ppc64le", - "unix", - "any", - "base" - ], - "alpine.3.18-s390x": [ - "alpine.3.18-s390x", - "alpine.3.18", - "alpine.3.17-s390x", - "alpine.3.17", - "alpine.3.16-s390x", - "alpine.3.16", - "alpine.3.15-s390x", - "alpine.3.15", - "alpine.3.14-s390x", - "alpine.3.14", - "alpine.3.13-s390x", - "alpine.3.13", - "alpine.3.12-s390x", - "alpine.3.12", - "alpine.3.11-s390x", - "alpine.3.11", - "alpine.3.10-s390x", - "alpine.3.10", - "alpine.3.9-s390x", - "alpine.3.9", - "alpine.3.8-s390x", - "alpine.3.8", - "alpine.3.7-s390x", - "alpine.3.7", - "alpine.3.6-s390x", - "alpine.3.6", - "alpine-s390x", - "alpine", - "linux-musl-s390x", - "linux-musl", - "linux-s390x", - "linux", - "unix-s390x", - "unix", - "any", - "base" - ], - "alpine.3.18-x64": [ - "alpine.3.18-x64", - "alpine.3.18", - "alpine.3.17-x64", - "alpine.3.17", - "alpine.3.16-x64", - "alpine.3.16", - "alpine.3.15-x64", - "alpine.3.15", - "alpine.3.14-x64", - "alpine.3.14", - "alpine.3.13-x64", - "alpine.3.13", - "alpine.3.12-x64", - "alpine.3.12", - "alpine.3.11-x64", - "alpine.3.11", - "alpine.3.10-x64", - "alpine.3.10", - "alpine.3.9-x64", - "alpine.3.9", - "alpine.3.8-x64", - "alpine.3.8", - "alpine.3.7-x64", - "alpine.3.7", - "alpine.3.6-x64", - "alpine.3.6", - "alpine-x64", - "alpine", - "linux-musl-x64", - "linux-musl", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "alpine.3.18-x86": [ - "alpine.3.18-x86", - "alpine.3.18", - "alpine.3.17-x86", - "alpine.3.17", - "alpine.3.16-x86", - "alpine.3.16", - "alpine.3.15-x86", - "alpine.3.15", - "alpine.3.14-x86", - "alpine.3.14", - "alpine.3.13-x86", - "alpine.3.13", - "alpine.3.12-x86", - "alpine.3.12", - "alpine.3.11-x86", - "alpine.3.11", - "alpine.3.10-x86", - "alpine.3.10", - "alpine.3.9-x86", - "alpine.3.9", - "alpine.3.8-x86", - "alpine.3.8", - "alpine.3.7-x86", - "alpine.3.7", - "alpine.3.6-x86", - "alpine.3.6", - "alpine-x86", - "alpine", - "linux-musl-x86", - "linux-musl", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "alpine.3.6": [ - "alpine.3.6", - "alpine", - "linux-musl", - "linux", - "unix", - "any", - "base" - ], - "alpine.3.6-arm": [ - "alpine.3.6-arm", - "alpine.3.6", - "alpine-arm", - "alpine", - "linux-musl-arm", - "linux-musl", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "alpine.3.6-arm64": [ - "alpine.3.6-arm64", - "alpine.3.6", - "alpine-arm64", - "alpine", - "linux-musl-arm64", - "linux-musl", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "alpine.3.6-armv6": [ - "alpine.3.6-armv6", - "alpine.3.6", - "alpine-armv6", - "alpine", - "linux-musl-armv6", - "linux-musl", - "linux-armv6", - "linux", - "unix-armv6", - "unix", - "any", - "base" - ], - "alpine.3.6-ppc64le": [ - "alpine.3.6-ppc64le", - "alpine.3.6", - "alpine-ppc64le", - "alpine", - "linux-musl-ppc64le", - "linux-musl", - "linux-ppc64le", - "linux", - "unix-ppc64le", - "unix", - "any", - "base" - ], - "alpine.3.6-s390x": [ - "alpine.3.6-s390x", - "alpine.3.6", - "alpine-s390x", - "alpine", - "linux-musl-s390x", - "linux-musl", - "linux-s390x", - "linux", - "unix-s390x", - "unix", - "any", - "base" - ], - "alpine.3.6-x64": [ - "alpine.3.6-x64", - "alpine.3.6", - "alpine-x64", - "alpine", - "linux-musl-x64", - "linux-musl", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "alpine.3.6-x86": [ - "alpine.3.6-x86", - "alpine.3.6", - "alpine-x86", - "alpine", - "linux-musl-x86", - "linux-musl", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "alpine.3.7": [ - "alpine.3.7", - "alpine.3.6", - "alpine", - "linux-musl", - "linux", - "unix", - "any", - "base" - ], - "alpine.3.7-arm": [ - "alpine.3.7-arm", - "alpine.3.7", - "alpine.3.6-arm", - "alpine.3.6", - "alpine-arm", - "alpine", - "linux-musl-arm", - "linux-musl", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "alpine.3.7-arm64": [ - "alpine.3.7-arm64", - "alpine.3.7", - "alpine.3.6-arm64", - "alpine.3.6", - "alpine-arm64", - "alpine", - "linux-musl-arm64", - "linux-musl", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "alpine.3.7-armv6": [ - "alpine.3.7-armv6", - "alpine.3.7", - "alpine.3.6-armv6", - "alpine.3.6", - "alpine-armv6", - "alpine", - "linux-musl-armv6", - "linux-musl", - "linux-armv6", - "linux", - "unix-armv6", - "unix", - "any", - "base" - ], - "alpine.3.7-ppc64le": [ - "alpine.3.7-ppc64le", - "alpine.3.7", - "alpine.3.6-ppc64le", - "alpine.3.6", - "alpine-ppc64le", - "alpine", - "linux-musl-ppc64le", - "linux-musl", - "linux-ppc64le", - "linux", - "unix-ppc64le", - "unix", - "any", - "base" - ], - "alpine.3.7-s390x": [ - "alpine.3.7-s390x", - "alpine.3.7", - "alpine.3.6-s390x", - "alpine.3.6", - "alpine-s390x", - "alpine", - "linux-musl-s390x", - "linux-musl", - "linux-s390x", - "linux", - "unix-s390x", - "unix", - "any", - "base" - ], - "alpine.3.7-x64": [ - "alpine.3.7-x64", - "alpine.3.7", - "alpine.3.6-x64", - "alpine.3.6", - "alpine-x64", - "alpine", - "linux-musl-x64", - "linux-musl", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "alpine.3.7-x86": [ - "alpine.3.7-x86", - "alpine.3.7", - "alpine.3.6-x86", - "alpine.3.6", - "alpine-x86", - "alpine", - "linux-musl-x86", - "linux-musl", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "alpine.3.8": [ - "alpine.3.8", - "alpine.3.7", - "alpine.3.6", - "alpine", - "linux-musl", - "linux", - "unix", - "any", - "base" - ], - "alpine.3.8-arm": [ - "alpine.3.8-arm", - "alpine.3.8", - "alpine.3.7-arm", - "alpine.3.7", - "alpine.3.6-arm", - "alpine.3.6", - "alpine-arm", - "alpine", - "linux-musl-arm", - "linux-musl", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "alpine.3.8-arm64": [ - "alpine.3.8-arm64", - "alpine.3.8", - "alpine.3.7-arm64", - "alpine.3.7", - "alpine.3.6-arm64", - "alpine.3.6", - "alpine-arm64", - "alpine", - "linux-musl-arm64", - "linux-musl", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "alpine.3.8-armv6": [ - "alpine.3.8-armv6", - "alpine.3.8", - "alpine.3.7-armv6", - "alpine.3.7", - "alpine.3.6-armv6", - "alpine.3.6", - "alpine-armv6", - "alpine", - "linux-musl-armv6", - "linux-musl", - "linux-armv6", - "linux", - "unix-armv6", - "unix", - "any", - "base" - ], - "alpine.3.8-ppc64le": [ - "alpine.3.8-ppc64le", - "alpine.3.8", - "alpine.3.7-ppc64le", - "alpine.3.7", - "alpine.3.6-ppc64le", - "alpine.3.6", - "alpine-ppc64le", - "alpine", - "linux-musl-ppc64le", - "linux-musl", - "linux-ppc64le", - "linux", - "unix-ppc64le", - "unix", - "any", - "base" - ], - "alpine.3.8-s390x": [ - "alpine.3.8-s390x", - "alpine.3.8", - "alpine.3.7-s390x", - "alpine.3.7", - "alpine.3.6-s390x", - "alpine.3.6", - "alpine-s390x", - "alpine", - "linux-musl-s390x", - "linux-musl", - "linux-s390x", - "linux", - "unix-s390x", - "unix", - "any", - "base" - ], - "alpine.3.8-x64": [ - "alpine.3.8-x64", - "alpine.3.8", - "alpine.3.7-x64", - "alpine.3.7", - "alpine.3.6-x64", - "alpine.3.6", - "alpine-x64", - "alpine", - "linux-musl-x64", - "linux-musl", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "alpine.3.8-x86": [ - "alpine.3.8-x86", - "alpine.3.8", - "alpine.3.7-x86", - "alpine.3.7", - "alpine.3.6-x86", - "alpine.3.6", - "alpine-x86", - "alpine", - "linux-musl-x86", - "linux-musl", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "alpine.3.9": [ - "alpine.3.9", - "alpine.3.8", - "alpine.3.7", - "alpine.3.6", - "alpine", - "linux-musl", - "linux", - "unix", - "any", - "base" - ], - "alpine.3.9-arm": [ - "alpine.3.9-arm", - "alpine.3.9", - "alpine.3.8-arm", - "alpine.3.8", - "alpine.3.7-arm", - "alpine.3.7", - "alpine.3.6-arm", - "alpine.3.6", - "alpine-arm", - "alpine", - "linux-musl-arm", - "linux-musl", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "alpine.3.9-arm64": [ - "alpine.3.9-arm64", - "alpine.3.9", - "alpine.3.8-arm64", - "alpine.3.8", - "alpine.3.7-arm64", - "alpine.3.7", - "alpine.3.6-arm64", - "alpine.3.6", - "alpine-arm64", - "alpine", - "linux-musl-arm64", - "linux-musl", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "alpine.3.9-armv6": [ - "alpine.3.9-armv6", - "alpine.3.9", - "alpine.3.8-armv6", - "alpine.3.8", - "alpine.3.7-armv6", - "alpine.3.7", - "alpine.3.6-armv6", - "alpine.3.6", - "alpine-armv6", - "alpine", - "linux-musl-armv6", - "linux-musl", - "linux-armv6", - "linux", - "unix-armv6", - "unix", - "any", - "base" - ], - "alpine.3.9-ppc64le": [ - "alpine.3.9-ppc64le", - "alpine.3.9", - "alpine.3.8-ppc64le", - "alpine.3.8", - "alpine.3.7-ppc64le", - "alpine.3.7", - "alpine.3.6-ppc64le", - "alpine.3.6", - "alpine-ppc64le", - "alpine", - "linux-musl-ppc64le", - "linux-musl", - "linux-ppc64le", - "linux", - "unix-ppc64le", - "unix", - "any", - "base" - ], - "alpine.3.9-s390x": [ - "alpine.3.9-s390x", - "alpine.3.9", - "alpine.3.8-s390x", - "alpine.3.8", - "alpine.3.7-s390x", - "alpine.3.7", - "alpine.3.6-s390x", - "alpine.3.6", - "alpine-s390x", - "alpine", - "linux-musl-s390x", - "linux-musl", - "linux-s390x", - "linux", - "unix-s390x", - "unix", - "any", - "base" - ], - "alpine.3.9-x64": [ - "alpine.3.9-x64", - "alpine.3.9", - "alpine.3.8-x64", - "alpine.3.8", - "alpine.3.7-x64", - "alpine.3.7", - "alpine.3.6-x64", - "alpine.3.6", - "alpine-x64", - "alpine", - "linux-musl-x64", - "linux-musl", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "alpine.3.9-x86": [ - "alpine.3.9-x86", - "alpine.3.9", - "alpine.3.8-x86", - "alpine.3.8", - "alpine.3.7-x86", - "alpine.3.7", - "alpine.3.6-x86", - "alpine.3.6", - "alpine-x86", - "alpine", - "linux-musl-x86", - "linux-musl", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "android": [ - "android", - "linux-bionic", - "linux", - "unix", - "any", - "base" - ], - "android-arm": [ - "android-arm", - "android", - "linux-bionic-arm", - "linux-bionic", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "android-arm64": [ - "android-arm64", - "android", - "linux-bionic-arm64", - "linux-bionic", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "android-x64": [ - "android-x64", - "android", - "linux-bionic-x64", - "linux-bionic", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "android-x86": [ - "android-x86", - "android", - "linux-bionic-x86", - "linux-bionic", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "android.21": [ - "android.21", - "android", - "linux-bionic", - "linux", - "unix", - "any", - "base" - ], - "android.21-arm": [ - "android.21-arm", - "android.21", - "android-arm", - "android", - "linux-bionic-arm", - "linux-bionic", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "android.21-arm64": [ - "android.21-arm64", - "android.21", - "android-arm64", - "android", - "linux-bionic-arm64", - "linux-bionic", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "android.21-x64": [ - "android.21-x64", - "android.21", - "android-x64", - "android", - "linux-bionic-x64", - "linux-bionic", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "android.21-x86": [ - "android.21-x86", - "android.21", - "android-x86", - "android", - "linux-bionic-x86", - "linux-bionic", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "android.22": [ - "android.22", - "android.21", - "android", - "linux-bionic", - "linux", - "unix", - "any", - "base" - ], - "android.22-arm": [ - "android.22-arm", - "android.22", - "android.21-arm", - "android.21", - "android-arm", - "android", - "linux-bionic-arm", - "linux-bionic", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "android.22-arm64": [ - "android.22-arm64", - "android.22", - "android.21-arm64", - "android.21", - "android-arm64", - "android", - "linux-bionic-arm64", - "linux-bionic", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "android.22-x64": [ - "android.22-x64", - "android.22", - "android.21-x64", - "android.21", - "android-x64", - "android", - "linux-bionic-x64", - "linux-bionic", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "android.22-x86": [ - "android.22-x86", - "android.22", - "android.21-x86", - "android.21", - "android-x86", - "android", - "linux-bionic-x86", - "linux-bionic", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "android.23": [ - "android.23", - "android.22", - "android.21", - "android", - "linux-bionic", - "linux", - "unix", - "any", - "base" - ], - "android.23-arm": [ - "android.23-arm", - "android.23", - "android.22-arm", - "android.22", - "android.21-arm", - "android.21", - "android-arm", - "android", - "linux-bionic-arm", - "linux-bionic", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "android.23-arm64": [ - "android.23-arm64", - "android.23", - "android.22-arm64", - "android.22", - "android.21-arm64", - "android.21", - "android-arm64", - "android", - "linux-bionic-arm64", - "linux-bionic", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "android.23-x64": [ - "android.23-x64", - "android.23", - "android.22-x64", - "android.22", - "android.21-x64", - "android.21", - "android-x64", - "android", - "linux-bionic-x64", - "linux-bionic", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "android.23-x86": [ - "android.23-x86", - "android.23", - "android.22-x86", - "android.22", - "android.21-x86", - "android.21", - "android-x86", - "android", - "linux-bionic-x86", - "linux-bionic", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "android.24": [ - "android.24", - "android.23", - "android.22", - "android.21", - "android", - "linux-bionic", - "linux", - "unix", - "any", - "base" - ], - "android.24-arm": [ - "android.24-arm", - "android.24", - "android.23-arm", - "android.23", - "android.22-arm", - "android.22", - "android.21-arm", - "android.21", - "android-arm", - "android", - "linux-bionic-arm", - "linux-bionic", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "android.24-arm64": [ - "android.24-arm64", - "android.24", - "android.23-arm64", - "android.23", - "android.22-arm64", - "android.22", - "android.21-arm64", - "android.21", - "android-arm64", - "android", - "linux-bionic-arm64", - "linux-bionic", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "android.24-x64": [ - "android.24-x64", - "android.24", - "android.23-x64", - "android.23", - "android.22-x64", - "android.22", - "android.21-x64", - "android.21", - "android-x64", - "android", - "linux-bionic-x64", - "linux-bionic", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "android.24-x86": [ - "android.24-x86", - "android.24", - "android.23-x86", - "android.23", - "android.22-x86", - "android.22", - "android.21-x86", - "android.21", - "android-x86", - "android", - "linux-bionic-x86", - "linux-bionic", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "android.25": [ - "android.25", - "android.24", - "android.23", - "android.22", - "android.21", - "android", - "linux-bionic", - "linux", - "unix", - "any", - "base" - ], - "android.25-arm": [ - "android.25-arm", - "android.25", - "android.24-arm", - "android.24", - "android.23-arm", - "android.23", - "android.22-arm", - "android.22", - "android.21-arm", - "android.21", - "android-arm", - "android", - "linux-bionic-arm", - "linux-bionic", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "android.25-arm64": [ - "android.25-arm64", - "android.25", - "android.24-arm64", - "android.24", - "android.23-arm64", - "android.23", - "android.22-arm64", - "android.22", - "android.21-arm64", - "android.21", - "android-arm64", - "android", - "linux-bionic-arm64", - "linux-bionic", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "android.25-x64": [ - "android.25-x64", - "android.25", - "android.24-x64", - "android.24", - "android.23-x64", - "android.23", - "android.22-x64", - "android.22", - "android.21-x64", - "android.21", - "android-x64", - "android", - "linux-bionic-x64", - "linux-bionic", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "android.25-x86": [ - "android.25-x86", - "android.25", - "android.24-x86", - "android.24", - "android.23-x86", - "android.23", - "android.22-x86", - "android.22", - "android.21-x86", - "android.21", - "android-x86", - "android", - "linux-bionic-x86", - "linux-bionic", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "android.26": [ - "android.26", - "android.25", - "android.24", - "android.23", - "android.22", - "android.21", - "android", - "linux-bionic", - "linux", - "unix", - "any", - "base" - ], - "android.26-arm": [ - "android.26-arm", - "android.26", - "android.25-arm", - "android.25", - "android.24-arm", - "android.24", - "android.23-arm", - "android.23", - "android.22-arm", - "android.22", - "android.21-arm", - "android.21", - "android-arm", - "android", - "linux-bionic-arm", - "linux-bionic", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "android.26-arm64": [ - "android.26-arm64", - "android.26", - "android.25-arm64", - "android.25", - "android.24-arm64", - "android.24", - "android.23-arm64", - "android.23", - "android.22-arm64", - "android.22", - "android.21-arm64", - "android.21", - "android-arm64", - "android", - "linux-bionic-arm64", - "linux-bionic", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "android.26-x64": [ - "android.26-x64", - "android.26", - "android.25-x64", - "android.25", - "android.24-x64", - "android.24", - "android.23-x64", - "android.23", - "android.22-x64", - "android.22", - "android.21-x64", - "android.21", - "android-x64", - "android", - "linux-bionic-x64", - "linux-bionic", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "android.26-x86": [ - "android.26-x86", - "android.26", - "android.25-x86", - "android.25", - "android.24-x86", - "android.24", - "android.23-x86", - "android.23", - "android.22-x86", - "android.22", - "android.21-x86", - "android.21", - "android-x86", - "android", - "linux-bionic-x86", - "linux-bionic", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "android.27": [ - "android.27", - "android.26", - "android.25", - "android.24", - "android.23", - "android.22", - "android.21", - "android", - "linux-bionic", - "linux", - "unix", - "any", - "base" - ], - "android.27-arm": [ - "android.27-arm", - "android.27", - "android.26-arm", - "android.26", - "android.25-arm", - "android.25", - "android.24-arm", - "android.24", - "android.23-arm", - "android.23", - "android.22-arm", - "android.22", - "android.21-arm", - "android.21", - "android-arm", - "android", - "linux-bionic-arm", - "linux-bionic", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "android.27-arm64": [ - "android.27-arm64", - "android.27", - "android.26-arm64", - "android.26", - "android.25-arm64", - "android.25", - "android.24-arm64", - "android.24", - "android.23-arm64", - "android.23", - "android.22-arm64", - "android.22", - "android.21-arm64", - "android.21", - "android-arm64", - "android", - "linux-bionic-arm64", - "linux-bionic", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "android.27-x64": [ - "android.27-x64", - "android.27", - "android.26-x64", - "android.26", - "android.25-x64", - "android.25", - "android.24-x64", - "android.24", - "android.23-x64", - "android.23", - "android.22-x64", - "android.22", - "android.21-x64", - "android.21", - "android-x64", - "android", - "linux-bionic-x64", - "linux-bionic", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "android.27-x86": [ - "android.27-x86", - "android.27", - "android.26-x86", - "android.26", - "android.25-x86", - "android.25", - "android.24-x86", - "android.24", - "android.23-x86", - "android.23", - "android.22-x86", - "android.22", - "android.21-x86", - "android.21", - "android-x86", - "android", - "linux-bionic-x86", - "linux-bionic", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "android.28": [ - "android.28", - "android.27", - "android.26", - "android.25", - "android.24", - "android.23", - "android.22", - "android.21", - "android", - "linux-bionic", - "linux", - "unix", - "any", - "base" - ], - "android.28-arm": [ - "android.28-arm", - "android.28", - "android.27-arm", - "android.27", - "android.26-arm", - "android.26", - "android.25-arm", - "android.25", - "android.24-arm", - "android.24", - "android.23-arm", - "android.23", - "android.22-arm", - "android.22", - "android.21-arm", - "android.21", - "android-arm", - "android", - "linux-bionic-arm", - "linux-bionic", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "android.28-arm64": [ - "android.28-arm64", - "android.28", - "android.27-arm64", - "android.27", - "android.26-arm64", - "android.26", - "android.25-arm64", - "android.25", - "android.24-arm64", - "android.24", - "android.23-arm64", - "android.23", - "android.22-arm64", - "android.22", - "android.21-arm64", - "android.21", - "android-arm64", - "android", - "linux-bionic-arm64", - "linux-bionic", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "android.28-x64": [ - "android.28-x64", - "android.28", - "android.27-x64", - "android.27", - "android.26-x64", - "android.26", - "android.25-x64", - "android.25", - "android.24-x64", - "android.24", - "android.23-x64", - "android.23", - "android.22-x64", - "android.22", - "android.21-x64", - "android.21", - "android-x64", - "android", - "linux-bionic-x64", - "linux-bionic", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "android.28-x86": [ - "android.28-x86", - "android.28", - "android.27-x86", - "android.27", - "android.26-x86", - "android.26", - "android.25-x86", - "android.25", - "android.24-x86", - "android.24", - "android.23-x86", - "android.23", - "android.22-x86", - "android.22", - "android.21-x86", - "android.21", - "android-x86", - "android", - "linux-bionic-x86", - "linux-bionic", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "android.29": [ - "android.29", - "android.28", - "android.27", - "android.26", - "android.25", - "android.24", - "android.23", - "android.22", - "android.21", - "android", - "linux-bionic", - "linux", - "unix", - "any", - "base" - ], - "android.29-arm": [ - "android.29-arm", - "android.29", - "android.28-arm", - "android.28", - "android.27-arm", - "android.27", - "android.26-arm", - "android.26", - "android.25-arm", - "android.25", - "android.24-arm", - "android.24", - "android.23-arm", - "android.23", - "android.22-arm", - "android.22", - "android.21-arm", - "android.21", - "android-arm", - "android", - "linux-bionic-arm", - "linux-bionic", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "android.29-arm64": [ - "android.29-arm64", - "android.29", - "android.28-arm64", - "android.28", - "android.27-arm64", - "android.27", - "android.26-arm64", - "android.26", - "android.25-arm64", - "android.25", - "android.24-arm64", - "android.24", - "android.23-arm64", - "android.23", - "android.22-arm64", - "android.22", - "android.21-arm64", - "android.21", - "android-arm64", - "android", - "linux-bionic-arm64", - "linux-bionic", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "android.29-x64": [ - "android.29-x64", - "android.29", - "android.28-x64", - "android.28", - "android.27-x64", - "android.27", - "android.26-x64", - "android.26", - "android.25-x64", - "android.25", - "android.24-x64", - "android.24", - "android.23-x64", - "android.23", - "android.22-x64", - "android.22", - "android.21-x64", - "android.21", - "android-x64", - "android", - "linux-bionic-x64", - "linux-bionic", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "android.29-x86": [ - "android.29-x86", - "android.29", - "android.28-x86", - "android.28", - "android.27-x86", - "android.27", - "android.26-x86", - "android.26", - "android.25-x86", - "android.25", - "android.24-x86", - "android.24", - "android.23-x86", - "android.23", - "android.22-x86", - "android.22", - "android.21-x86", - "android.21", - "android-x86", - "android", - "linux-bionic-x86", - "linux-bionic", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "android.30": [ - "android.30", - "android.29", - "android.28", - "android.27", - "android.26", - "android.25", - "android.24", - "android.23", - "android.22", - "android.21", - "android", - "linux-bionic", - "linux", - "unix", - "any", - "base" - ], - "android.30-arm": [ - "android.30-arm", - "android.30", - "android.29-arm", - "android.29", - "android.28-arm", - "android.28", - "android.27-arm", - "android.27", - "android.26-arm", - "android.26", - "android.25-arm", - "android.25", - "android.24-arm", - "android.24", - "android.23-arm", - "android.23", - "android.22-arm", - "android.22", - "android.21-arm", - "android.21", - "android-arm", - "android", - "linux-bionic-arm", - "linux-bionic", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "android.30-arm64": [ - "android.30-arm64", - "android.30", - "android.29-arm64", - "android.29", - "android.28-arm64", - "android.28", - "android.27-arm64", - "android.27", - "android.26-arm64", - "android.26", - "android.25-arm64", - "android.25", - "android.24-arm64", - "android.24", - "android.23-arm64", - "android.23", - "android.22-arm64", - "android.22", - "android.21-arm64", - "android.21", - "android-arm64", - "android", - "linux-bionic-arm64", - "linux-bionic", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "android.30-x64": [ - "android.30-x64", - "android.30", - "android.29-x64", - "android.29", - "android.28-x64", - "android.28", - "android.27-x64", - "android.27", - "android.26-x64", - "android.26", - "android.25-x64", - "android.25", - "android.24-x64", - "android.24", - "android.23-x64", - "android.23", - "android.22-x64", - "android.22", - "android.21-x64", - "android.21", - "android-x64", - "android", - "linux-bionic-x64", - "linux-bionic", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "android.30-x86": [ - "android.30-x86", - "android.30", - "android.29-x86", - "android.29", - "android.28-x86", - "android.28", - "android.27-x86", - "android.27", - "android.26-x86", - "android.26", - "android.25-x86", - "android.25", - "android.24-x86", - "android.24", - "android.23-x86", - "android.23", - "android.22-x86", - "android.22", - "android.21-x86", - "android.21", - "android-x86", - "android", - "linux-bionic-x86", - "linux-bionic", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "android.31": [ - "android.31", - "android.30", - "android.29", - "android.28", - "android.27", - "android.26", - "android.25", - "android.24", - "android.23", - "android.22", - "android.21", - "android", - "linux-bionic", - "linux", - "unix", - "any", - "base" - ], - "android.31-arm": [ - "android.31-arm", - "android.31", - "android.30-arm", - "android.30", - "android.29-arm", - "android.29", - "android.28-arm", - "android.28", - "android.27-arm", - "android.27", - "android.26-arm", - "android.26", - "android.25-arm", - "android.25", - "android.24-arm", - "android.24", - "android.23-arm", - "android.23", - "android.22-arm", - "android.22", - "android.21-arm", - "android.21", - "android-arm", - "android", - "linux-bionic-arm", - "linux-bionic", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "android.31-arm64": [ - "android.31-arm64", - "android.31", - "android.30-arm64", - "android.30", - "android.29-arm64", - "android.29", - "android.28-arm64", - "android.28", - "android.27-arm64", - "android.27", - "android.26-arm64", - "android.26", - "android.25-arm64", - "android.25", - "android.24-arm64", - "android.24", - "android.23-arm64", - "android.23", - "android.22-arm64", - "android.22", - "android.21-arm64", - "android.21", - "android-arm64", - "android", - "linux-bionic-arm64", - "linux-bionic", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "android.31-x64": [ - "android.31-x64", - "android.31", - "android.30-x64", - "android.30", - "android.29-x64", - "android.29", - "android.28-x64", - "android.28", - "android.27-x64", - "android.27", - "android.26-x64", - "android.26", - "android.25-x64", - "android.25", - "android.24-x64", - "android.24", - "android.23-x64", - "android.23", - "android.22-x64", - "android.22", - "android.21-x64", - "android.21", - "android-x64", - "android", - "linux-bionic-x64", - "linux-bionic", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "android.31-x86": [ - "android.31-x86", - "android.31", - "android.30-x86", - "android.30", - "android.29-x86", - "android.29", - "android.28-x86", - "android.28", - "android.27-x86", - "android.27", - "android.26-x86", - "android.26", - "android.25-x86", - "android.25", - "android.24-x86", - "android.24", - "android.23-x86", - "android.23", - "android.22-x86", - "android.22", - "android.21-x86", - "android.21", - "android-x86", - "android", - "linux-bionic-x86", - "linux-bionic", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "android.32": [ - "android.32", - "android.31", - "android.30", - "android.29", - "android.28", - "android.27", - "android.26", - "android.25", - "android.24", - "android.23", - "android.22", - "android.21", - "android", - "linux-bionic", - "linux", - "unix", - "any", - "base" - ], - "android.32-arm": [ - "android.32-arm", - "android.32", - "android.31-arm", - "android.31", - "android.30-arm", - "android.30", - "android.29-arm", - "android.29", - "android.28-arm", - "android.28", - "android.27-arm", - "android.27", - "android.26-arm", - "android.26", - "android.25-arm", - "android.25", - "android.24-arm", - "android.24", - "android.23-arm", - "android.23", - "android.22-arm", - "android.22", - "android.21-arm", - "android.21", - "android-arm", - "android", - "linux-bionic-arm", - "linux-bionic", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "android.32-arm64": [ - "android.32-arm64", - "android.32", - "android.31-arm64", - "android.31", - "android.30-arm64", - "android.30", - "android.29-arm64", - "android.29", - "android.28-arm64", - "android.28", - "android.27-arm64", - "android.27", - "android.26-arm64", - "android.26", - "android.25-arm64", - "android.25", - "android.24-arm64", - "android.24", - "android.23-arm64", - "android.23", - "android.22-arm64", - "android.22", - "android.21-arm64", - "android.21", - "android-arm64", - "android", - "linux-bionic-arm64", - "linux-bionic", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "android.32-x64": [ - "android.32-x64", - "android.32", - "android.31-x64", - "android.31", - "android.30-x64", - "android.30", - "android.29-x64", - "android.29", - "android.28-x64", - "android.28", - "android.27-x64", - "android.27", - "android.26-x64", - "android.26", - "android.25-x64", - "android.25", - "android.24-x64", - "android.24", - "android.23-x64", - "android.23", - "android.22-x64", - "android.22", - "android.21-x64", - "android.21", - "android-x64", - "android", - "linux-bionic-x64", - "linux-bionic", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "android.32-x86": [ - "android.32-x86", - "android.32", - "android.31-x86", - "android.31", - "android.30-x86", - "android.30", - "android.29-x86", - "android.29", - "android.28-x86", - "android.28", - "android.27-x86", - "android.27", - "android.26-x86", - "android.26", - "android.25-x86", - "android.25", - "android.24-x86", - "android.24", - "android.23-x86", - "android.23", - "android.22-x86", - "android.22", - "android.21-x86", - "android.21", - "android-x86", - "android", - "linux-bionic-x86", - "linux-bionic", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "any": [ - "any", - "base" - ], - "aot": [ - "aot", - "any", - "base" - ], - "arch": [ - "arch", - "linux", - "unix", - "any", - "base" - ], - "arch-x64": [ - "arch-x64", - "arch", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "base": [ - "base" - ], - "browser": [ - "browser", - "any", - "base" - ], - "browser-wasm": [ - "browser-wasm", - "browser", - "any", - "base" - ], - "centos": [ - "centos", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "centos-arm64": [ - "centos-arm64", - "centos", - "rhel-arm64", - "rhel", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "centos-x64": [ - "centos-x64", - "centos", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "centos.7": [ - "centos.7", - "centos", - "rhel.7", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "centos.7-x64": [ - "centos.7-x64", - "centos.7", - "centos-x64", - "rhel.7-x64", - "centos", - "rhel.7", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "centos.8": [ - "centos.8", - "centos", - "rhel.8", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "centos.8-arm64": [ - "centos.8-arm64", - "centos.8", - "centos-arm64", - "rhel.8-arm64", - "centos", - "rhel.8", - "rhel-arm64", - "rhel", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "centos.8-x64": [ - "centos.8-x64", - "centos.8", - "centos-x64", - "rhel.8-x64", - "centos", - "rhel.8", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "centos.9": [ - "centos.9", - "centos", - "rhel.9", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "centos.9-arm64": [ - "centos.9-arm64", - "centos.9", - "centos-arm64", - "rhel.9-arm64", - "centos", - "rhel.9", - "rhel-arm64", - "rhel", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "centos.9-x64": [ - "centos.9-x64", - "centos.9", - "centos-x64", - "rhel.9-x64", - "centos", - "rhel.9", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "debian": [ - "debian", - "linux", - "unix", - "any", - "base" - ], - "debian-arm": [ - "debian-arm", - "debian", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "debian-arm64": [ - "debian-arm64", - "debian", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "debian-armel": [ - "debian-armel", - "debian", - "linux-armel", - "linux", - "unix-armel", - "unix", - "any", - "base" - ], - "debian-x64": [ - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "debian-x86": [ - "debian-x86", - "debian", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "debian.10": [ - "debian.10", - "debian", - "linux", - "unix", - "any", - "base" - ], - "debian.10-arm": [ - "debian.10-arm", - "debian.10", - "debian-arm", - "debian", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "debian.10-arm64": [ - "debian.10-arm64", - "debian.10", - "debian-arm64", - "debian", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "debian.10-armel": [ - "debian.10-armel", - "debian.10", - "debian-armel", - "debian", - "linux-armel", - "linux", - "unix-armel", - "unix", - "any", - "base" - ], - "debian.10-x64": [ - "debian.10-x64", - "debian.10", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "debian.10-x86": [ - "debian.10-x86", - "debian.10", - "debian-x86", - "debian", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "debian.11": [ - "debian.11", - "debian", - "linux", - "unix", - "any", - "base" - ], - "debian.11-arm": [ - "debian.11-arm", - "debian.11", - "debian-arm", - "debian", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "debian.11-arm64": [ - "debian.11-arm64", - "debian.11", - "debian-arm64", - "debian", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "debian.11-armel": [ - "debian.11-armel", - "debian.11", - "debian-armel", - "debian", - "linux-armel", - "linux", - "unix-armel", - "unix", - "any", - "base" - ], - "debian.11-x64": [ - "debian.11-x64", - "debian.11", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "debian.11-x86": [ - "debian.11-x86", - "debian.11", - "debian-x86", - "debian", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "debian.12": [ - "debian.12", - "debian", - "linux", - "unix", - "any", - "base" - ], - "debian.12-arm": [ - "debian.12-arm", - "debian.12", - "debian-arm", - "debian", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "debian.12-arm64": [ - "debian.12-arm64", - "debian.12", - "debian-arm64", - "debian", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "debian.12-armel": [ - "debian.12-armel", - "debian.12", - "debian-armel", - "debian", - "linux-armel", - "linux", - "unix-armel", - "unix", - "any", - "base" - ], - "debian.12-x64": [ - "debian.12-x64", - "debian.12", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "debian.12-x86": [ - "debian.12-x86", - "debian.12", - "debian-x86", - "debian", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "debian.8": [ - "debian.8", - "debian", - "linux", - "unix", - "any", - "base" - ], - "debian.8-arm": [ - "debian.8-arm", - "debian.8", - "debian-arm", - "debian", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "debian.8-arm64": [ - "debian.8-arm64", - "debian.8", - "debian-arm64", - "debian", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "debian.8-armel": [ - "debian.8-armel", - "debian.8", - "debian-armel", - "debian", - "linux-armel", - "linux", - "unix-armel", - "unix", - "any", - "base" - ], - "debian.8-x64": [ - "debian.8-x64", - "debian.8", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "debian.8-x86": [ - "debian.8-x86", - "debian.8", - "debian-x86", - "debian", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "debian.9": [ - "debian.9", - "debian", - "linux", - "unix", - "any", - "base" - ], - "debian.9-arm": [ - "debian.9-arm", - "debian.9", - "debian-arm", - "debian", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "debian.9-arm64": [ - "debian.9-arm64", - "debian.9", - "debian-arm64", - "debian", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "debian.9-armel": [ - "debian.9-armel", - "debian.9", - "debian-armel", - "debian", - "linux-armel", - "linux", - "unix-armel", - "unix", - "any", - "base" - ], - "debian.9-x64": [ - "debian.9-x64", - "debian.9", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "debian.9-x86": [ - "debian.9-x86", - "debian.9", - "debian-x86", - "debian", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "exherbo": [ - "exherbo", - "linux", - "unix", - "any", - "base" - ], - "exherbo-x64": [ - "exherbo-x64", - "exherbo", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "fedora": [ - "fedora", - "linux", - "unix", - "any", - "base" - ], - "fedora-arm64": [ - "fedora-arm64", - "fedora", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "fedora-x64": [ - "fedora-x64", - "fedora", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "fedora.23": [ - "fedora.23", - "fedora", - "linux", - "unix", - "any", - "base" - ], - "fedora.23-arm64": [ - "fedora.23-arm64", - "fedora.23", - "fedora-arm64", - "fedora", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "fedora.23-x64": [ - "fedora.23-x64", - "fedora.23", - "fedora-x64", - "fedora", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "fedora.24": [ - "fedora.24", - "fedora", - "linux", - "unix", - "any", - "base" - ], - "fedora.24-arm64": [ - "fedora.24-arm64", - "fedora.24", - "fedora-arm64", - "fedora", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "fedora.24-x64": [ - "fedora.24-x64", - "fedora.24", - "fedora-x64", - "fedora", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "fedora.25": [ - "fedora.25", - "fedora", - "linux", - "unix", - "any", - "base" - ], - "fedora.25-arm64": [ - "fedora.25-arm64", - "fedora.25", - "fedora-arm64", - "fedora", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "fedora.25-x64": [ - "fedora.25-x64", - "fedora.25", - "fedora-x64", - "fedora", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "fedora.26": [ - "fedora.26", - "fedora", - "linux", - "unix", - "any", - "base" - ], - "fedora.26-arm64": [ - "fedora.26-arm64", - "fedora.26", - "fedora-arm64", - "fedora", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "fedora.26-x64": [ - "fedora.26-x64", - "fedora.26", - "fedora-x64", - "fedora", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "fedora.27": [ - "fedora.27", - "fedora", - "linux", - "unix", - "any", - "base" - ], - "fedora.27-arm64": [ - "fedora.27-arm64", - "fedora.27", - "fedora-arm64", - "fedora", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "fedora.27-x64": [ - "fedora.27-x64", - "fedora.27", - "fedora-x64", - "fedora", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "fedora.28": [ - "fedora.28", - "fedora", - "linux", - "unix", - "any", - "base" - ], - "fedora.28-arm64": [ - "fedora.28-arm64", - "fedora.28", - "fedora-arm64", - "fedora", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "fedora.28-x64": [ - "fedora.28-x64", - "fedora.28", - "fedora-x64", - "fedora", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "fedora.29": [ - "fedora.29", - "fedora", - "linux", - "unix", - "any", - "base" - ], - "fedora.29-arm64": [ - "fedora.29-arm64", - "fedora.29", - "fedora-arm64", - "fedora", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "fedora.29-x64": [ - "fedora.29-x64", - "fedora.29", - "fedora-x64", - "fedora", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "fedora.30": [ - "fedora.30", - "fedora", - "linux", - "unix", - "any", - "base" - ], - "fedora.30-arm64": [ - "fedora.30-arm64", - "fedora.30", - "fedora-arm64", - "fedora", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "fedora.30-x64": [ - "fedora.30-x64", - "fedora.30", - "fedora-x64", - "fedora", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "fedora.31": [ - "fedora.31", - "fedora", - "linux", - "unix", - "any", - "base" - ], - "fedora.31-arm64": [ - "fedora.31-arm64", - "fedora.31", - "fedora-arm64", - "fedora", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "fedora.31-x64": [ - "fedora.31-x64", - "fedora.31", - "fedora-x64", - "fedora", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "fedora.32": [ - "fedora.32", - "fedora", - "linux", - "unix", - "any", - "base" - ], - "fedora.32-arm64": [ - "fedora.32-arm64", - "fedora.32", - "fedora-arm64", - "fedora", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "fedora.32-x64": [ - "fedora.32-x64", - "fedora.32", - "fedora-x64", - "fedora", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "fedora.33": [ - "fedora.33", - "fedora", - "linux", - "unix", - "any", - "base" - ], - "fedora.33-arm64": [ - "fedora.33-arm64", - "fedora.33", - "fedora-arm64", - "fedora", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "fedora.33-x64": [ - "fedora.33-x64", - "fedora.33", - "fedora-x64", - "fedora", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "fedora.34": [ - "fedora.34", - "fedora", - "linux", - "unix", - "any", - "base" - ], - "fedora.34-arm64": [ - "fedora.34-arm64", - "fedora.34", - "fedora-arm64", - "fedora", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "fedora.34-x64": [ - "fedora.34-x64", - "fedora.34", - "fedora-x64", - "fedora", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "fedora.35": [ - "fedora.35", - "fedora", - "linux", - "unix", - "any", - "base" - ], - "fedora.35-arm64": [ - "fedora.35-arm64", - "fedora.35", - "fedora-arm64", - "fedora", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "fedora.35-x64": [ - "fedora.35-x64", - "fedora.35", - "fedora-x64", - "fedora", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "fedora.36": [ - "fedora.36", - "fedora", - "linux", - "unix", - "any", - "base" - ], - "fedora.36-arm64": [ - "fedora.36-arm64", - "fedora.36", - "fedora-arm64", - "fedora", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "fedora.36-x64": [ - "fedora.36-x64", - "fedora.36", - "fedora-x64", - "fedora", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "fedora.37": [ - "fedora.37", - "fedora", - "linux", - "unix", - "any", - "base" - ], - "fedora.37-arm64": [ - "fedora.37-arm64", - "fedora.37", - "fedora-arm64", - "fedora", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "fedora.37-x64": [ - "fedora.37-x64", - "fedora.37", - "fedora-x64", - "fedora", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "fedora.38": [ - "fedora.38", - "fedora", - "linux", - "unix", - "any", - "base" - ], - "fedora.38-arm64": [ - "fedora.38-arm64", - "fedora.38", - "fedora-arm64", - "fedora", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "fedora.38-x64": [ - "fedora.38-x64", - "fedora.38", - "fedora-x64", - "fedora", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "fedora.39": [ - "fedora.39", - "fedora", - "linux", - "unix", - "any", - "base" - ], - "fedora.39-arm64": [ - "fedora.39-arm64", - "fedora.39", - "fedora-arm64", - "fedora", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "fedora.39-x64": [ - "fedora.39-x64", - "fedora.39", - "fedora-x64", - "fedora", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "freebsd": [ - "freebsd", - "unix", - "any", - "base" - ], - "freebsd-arm64": [ - "freebsd-arm64", - "freebsd", - "unix-arm64", - "unix", - "any", - "base" - ], - "freebsd-x64": [ - "freebsd-x64", - "freebsd", - "unix-x64", - "unix", - "any", - "base" - ], - "freebsd.12": [ - "freebsd.12", - "freebsd", - "unix", - "any", - "base" - ], - "freebsd.12-arm64": [ - "freebsd.12-arm64", - "freebsd.12", - "freebsd-arm64", - "freebsd", - "unix-arm64", - "unix", - "any", - "base" - ], - "freebsd.12-x64": [ - "freebsd.12-x64", - "freebsd.12", - "freebsd-x64", - "freebsd", - "unix-x64", - "unix", - "any", - "base" - ], - "freebsd.13": [ - "freebsd.13", - "freebsd.12", - "freebsd", - "unix", - "any", - "base" - ], - "freebsd.13-arm64": [ - "freebsd.13-arm64", - "freebsd.13", - "freebsd.12-arm64", - "freebsd.12", - "freebsd-arm64", - "freebsd", - "unix-arm64", - "unix", - "any", - "base" - ], - "freebsd.13-x64": [ - "freebsd.13-x64", - "freebsd.13", - "freebsd.12-x64", - "freebsd.12", - "freebsd-x64", - "freebsd", - "unix-x64", - "unix", - "any", - "base" - ], - "gentoo": [ - "gentoo", - "linux", - "unix", - "any", - "base" - ], - "gentoo-x64": [ - "gentoo-x64", - "gentoo", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "illumos": [ - "illumos", - "unix", - "any", - "base" - ], - "illumos-x64": [ - "illumos-x64", - "illumos", - "unix-x64", - "unix", - "any", - "base" - ], - "ios": [ - "ios", - "unix", - "any", - "base" - ], - "ios-arm": [ - "ios-arm", - "ios", - "unix-arm", - "unix", - "any", - "base" - ], - "ios-arm64": [ - "ios-arm64", - "ios", - "unix-arm64", - "unix", - "any", - "base" - ], - "ios-x64": [ - "ios-x64", - "ios", - "unix-x64", - "unix", - "any", - "base" - ], - "ios-x86": [ - "ios-x86", - "ios", - "unix-x86", - "unix", - "any", - "base" - ], - "ios.10": [ - "ios.10", - "ios", - "unix", - "any", - "base" - ], - "ios.10-arm": [ - "ios.10-arm", - "ios.10", - "ios-arm", - "ios", - "unix-arm", - "unix", - "any", - "base" - ], - "ios.10-arm64": [ - "ios.10-arm64", - "ios.10", - "ios-arm64", - "ios", - "unix-arm64", - "unix", - "any", - "base" - ], - "ios.10-x64": [ - "ios.10-x64", - "ios.10", - "ios-x64", - "ios", - "unix-x64", - "unix", - "any", - "base" - ], - "ios.10-x86": [ - "ios.10-x86", - "ios.10", - "ios-x86", - "ios", - "unix-x86", - "unix", - "any", - "base" - ], - "ios.11": [ - "ios.11", - "ios.10", - "ios", - "unix", - "any", - "base" - ], - "ios.11-arm64": [ - "ios.11-arm64", - "ios.11", - "ios.10-arm64", - "ios.10", - "ios-arm64", - "ios", - "unix-arm64", - "unix", - "any", - "base" - ], - "ios.11-x64": [ - "ios.11-x64", - "ios.11", - "ios.10-x64", - "ios.10", - "ios-x64", - "ios", - "unix-x64", - "unix", - "any", - "base" - ], - "ios.12": [ - "ios.12", - "ios.11", - "ios.10", - "ios", - "unix", - "any", - "base" - ], - "ios.12-arm64": [ - "ios.12-arm64", - "ios.12", - "ios.11-arm64", - "ios.11", - "ios.10-arm64", - "ios.10", - "ios-arm64", - "ios", - "unix-arm64", - "unix", - "any", - "base" - ], - "ios.12-x64": [ - "ios.12-x64", - "ios.12", - "ios.11-x64", - "ios.11", - "ios.10-x64", - "ios.10", - "ios-x64", - "ios", - "unix-x64", - "unix", - "any", - "base" - ], - "ios.13": [ - "ios.13", - "ios.12", - "ios.11", - "ios.10", - "ios", - "unix", - "any", - "base" - ], - "ios.13-arm64": [ - "ios.13-arm64", - "ios.13", - "ios.12-arm64", - "ios.12", - "ios.11-arm64", - "ios.11", - "ios.10-arm64", - "ios.10", - "ios-arm64", - "ios", - "unix-arm64", - "unix", - "any", - "base" - ], - "ios.13-x64": [ - "ios.13-x64", - "ios.13", - "ios.12-x64", - "ios.12", - "ios.11-x64", - "ios.11", - "ios.10-x64", - "ios.10", - "ios-x64", - "ios", - "unix-x64", - "unix", - "any", - "base" - ], - "ios.14": [ - "ios.14", - "ios.13", - "ios.12", - "ios.11", - "ios.10", - "ios", - "unix", - "any", - "base" - ], - "ios.14-arm64": [ - "ios.14-arm64", - "ios.14", - "ios.13-arm64", - "ios.13", - "ios.12-arm64", - "ios.12", - "ios.11-arm64", - "ios.11", - "ios.10-arm64", - "ios.10", - "ios-arm64", - "ios", - "unix-arm64", - "unix", - "any", - "base" - ], - "ios.14-x64": [ - "ios.14-x64", - "ios.14", - "ios.13-x64", - "ios.13", - "ios.12-x64", - "ios.12", - "ios.11-x64", - "ios.11", - "ios.10-x64", - "ios.10", - "ios-x64", - "ios", - "unix-x64", - "unix", - "any", - "base" - ], - "ios.15": [ - "ios.15", - "ios.14", - "ios.13", - "ios.12", - "ios.11", - "ios.10", - "ios", - "unix", - "any", - "base" - ], - "ios.15-arm64": [ - "ios.15-arm64", - "ios.15", - "ios.14-arm64", - "ios.14", - "ios.13-arm64", - "ios.13", - "ios.12-arm64", - "ios.12", - "ios.11-arm64", - "ios.11", - "ios.10-arm64", - "ios.10", - "ios-arm64", - "ios", - "unix-arm64", - "unix", - "any", - "base" - ], - "ios.15-x64": [ - "ios.15-x64", - "ios.15", - "ios.14-x64", - "ios.14", - "ios.13-x64", - "ios.13", - "ios.12-x64", - "ios.12", - "ios.11-x64", - "ios.11", - "ios.10-x64", - "ios.10", - "ios-x64", - "ios", - "unix-x64", - "unix", - "any", - "base" - ], - "iossimulator": [ - "iossimulator", - "ios", - "unix", - "any", - "base" - ], - "iossimulator-arm64": [ - "iossimulator-arm64", - "iossimulator", - "ios-arm64", - "ios", - "unix-arm64", - "unix", - "any", - "base" - ], - "iossimulator-x64": [ - "iossimulator-x64", - "iossimulator", - "ios-x64", - "ios", - "unix-x64", - "unix", - "any", - "base" - ], - "iossimulator-x86": [ - "iossimulator-x86", - "iossimulator", - "ios-x86", - "ios", - "unix-x86", - "unix", - "any", - "base" - ], - "iossimulator.10": [ - "iossimulator.10", - "iossimulator", - "ios", - "unix", - "any", - "base" - ], - "iossimulator.10-arm64": [ - "iossimulator.10-arm64", - "iossimulator.10", - "iossimulator-arm64", - "iossimulator", - "ios-arm64", - "ios", - "unix-arm64", - "unix", - "any", - "base" - ], - "iossimulator.10-x64": [ - "iossimulator.10-x64", - "iossimulator.10", - "iossimulator-x64", - "iossimulator", - "ios-x64", - "ios", - "unix-x64", - "unix", - "any", - "base" - ], - "iossimulator.10-x86": [ - "iossimulator.10-x86", - "iossimulator.10", - "iossimulator-x86", - "iossimulator", - "ios-x86", - "ios", - "unix-x86", - "unix", - "any", - "base" - ], - "iossimulator.11": [ - "iossimulator.11", - "iossimulator.10", - "iossimulator", - "ios", - "unix", - "any", - "base" - ], - "iossimulator.11-arm64": [ - "iossimulator.11-arm64", - "iossimulator.11", - "iossimulator.10-arm64", - "iossimulator.10", - "iossimulator-arm64", - "iossimulator", - "ios-arm64", - "ios", - "unix-arm64", - "unix", - "any", - "base" - ], - "iossimulator.11-x64": [ - "iossimulator.11-x64", - "iossimulator.11", - "iossimulator.10-x64", - "iossimulator.10", - "iossimulator-x64", - "iossimulator", - "ios-x64", - "ios", - "unix-x64", - "unix", - "any", - "base" - ], - "iossimulator.12": [ - "iossimulator.12", - "iossimulator.11", - "iossimulator.10", - "iossimulator", - "ios", - "unix", - "any", - "base" - ], - "iossimulator.12-arm64": [ - "iossimulator.12-arm64", - "iossimulator.12", - "iossimulator.11-arm64", - "iossimulator.11", - "iossimulator.10-arm64", - "iossimulator.10", - "iossimulator-arm64", - "iossimulator", - "ios-arm64", - "ios", - "unix-arm64", - "unix", - "any", - "base" - ], - "iossimulator.12-x64": [ - "iossimulator.12-x64", - "iossimulator.12", - "iossimulator.11-x64", - "iossimulator.11", - "iossimulator.10-x64", - "iossimulator.10", - "iossimulator-x64", - "iossimulator", - "ios-x64", - "ios", - "unix-x64", - "unix", - "any", - "base" - ], - "iossimulator.13": [ - "iossimulator.13", - "iossimulator.12", - "iossimulator.11", - "iossimulator.10", - "iossimulator", - "ios", - "unix", - "any", - "base" - ], - "iossimulator.13-arm64": [ - "iossimulator.13-arm64", - "iossimulator.13", - "iossimulator.12-arm64", - "iossimulator.12", - "iossimulator.11-arm64", - "iossimulator.11", - "iossimulator.10-arm64", - "iossimulator.10", - "iossimulator-arm64", - "iossimulator", - "ios-arm64", - "ios", - "unix-arm64", - "unix", - "any", - "base" - ], - "iossimulator.13-x64": [ - "iossimulator.13-x64", - "iossimulator.13", - "iossimulator.12-x64", - "iossimulator.12", - "iossimulator.11-x64", - "iossimulator.11", - "iossimulator.10-x64", - "iossimulator.10", - "iossimulator-x64", - "iossimulator", - "ios-x64", - "ios", - "unix-x64", - "unix", - "any", - "base" - ], - "iossimulator.14": [ - "iossimulator.14", - "iossimulator.13", - "iossimulator.12", - "iossimulator.11", - "iossimulator.10", - "iossimulator", - "ios", - "unix", - "any", - "base" - ], - "iossimulator.14-arm64": [ - "iossimulator.14-arm64", - "iossimulator.14", - "iossimulator.13-arm64", - "iossimulator.13", - "iossimulator.12-arm64", - "iossimulator.12", - "iossimulator.11-arm64", - "iossimulator.11", - "iossimulator.10-arm64", - "iossimulator.10", - "iossimulator-arm64", - "iossimulator", - "ios-arm64", - "ios", - "unix-arm64", - "unix", - "any", - "base" - ], - "iossimulator.14-x64": [ - "iossimulator.14-x64", - "iossimulator.14", - "iossimulator.13-x64", - "iossimulator.13", - "iossimulator.12-x64", - "iossimulator.12", - "iossimulator.11-x64", - "iossimulator.11", - "iossimulator.10-x64", - "iossimulator.10", - "iossimulator-x64", - "iossimulator", - "ios-x64", - "ios", - "unix-x64", - "unix", - "any", - "base" - ], - "iossimulator.15": [ - "iossimulator.15", - "iossimulator.14", - "iossimulator.13", - "iossimulator.12", - "iossimulator.11", - "iossimulator.10", - "iossimulator", - "ios", - "unix", - "any", - "base" - ], - "iossimulator.15-arm64": [ - "iossimulator.15-arm64", - "iossimulator.15", - "iossimulator.14-arm64", - "iossimulator.14", - "iossimulator.13-arm64", - "iossimulator.13", - "iossimulator.12-arm64", - "iossimulator.12", - "iossimulator.11-arm64", - "iossimulator.11", - "iossimulator.10-arm64", - "iossimulator.10", - "iossimulator-arm64", - "iossimulator", - "ios-arm64", - "ios", - "unix-arm64", - "unix", - "any", - "base" - ], - "iossimulator.15-x64": [ - "iossimulator.15-x64", - "iossimulator.15", - "iossimulator.14-x64", - "iossimulator.14", - "iossimulator.13-x64", - "iossimulator.13", - "iossimulator.12-x64", - "iossimulator.12", - "iossimulator.11-x64", - "iossimulator.11", - "iossimulator.10-x64", - "iossimulator.10", - "iossimulator-x64", - "iossimulator", - "ios-x64", - "ios", - "unix-x64", - "unix", - "any", - "base" - ], - "linux": [ - "linux", - "unix", - "any", - "base" - ], - "linux-arm": [ - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "linux-arm64": [ - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "linux-armel": [ - "linux-armel", - "linux", - "unix-armel", - "unix", - "any", - "base" - ], - "linux-armv6": [ - "linux-armv6", - "linux", - "unix-armv6", - "unix", - "any", - "base" - ], - "linux-bionic": [ - "linux-bionic", - "linux", - "unix", - "any", - "base" - ], - "linux-bionic-arm": [ - "linux-bionic-arm", - "linux-bionic", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "linux-bionic-arm64": [ - "linux-bionic-arm64", - "linux-bionic", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "linux-bionic-x64": [ - "linux-bionic-x64", - "linux-bionic", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "linux-bionic-x86": [ - "linux-bionic-x86", - "linux-bionic", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "linux-loongarch64": [ - "linux-loongarch64", - "linux", - "unix-loongarch64", - "unix", - "any", - "base" - ], - "linux-mips64": [ - "linux-mips64", - "linux", - "unix-mips64", - "unix", - "any", - "base" - ], - "linux-musl": [ - "linux-musl", - "linux", - "unix", - "any", - "base" - ], - "linux-musl-arm": [ - "linux-musl-arm", - "linux-musl", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "linux-musl-arm64": [ - "linux-musl-arm64", - "linux-musl", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "linux-musl-armel": [ - "linux-musl-armel", - "linux-musl", - "linux-armel", - "linux", - "unix-armel", - "unix", - "any", - "base" - ], - "linux-musl-armv6": [ - "linux-musl-armv6", - "linux-musl", - "linux-armv6", - "linux", - "unix-armv6", - "unix", - "any", - "base" - ], - "linux-musl-ppc64le": [ - "linux-musl-ppc64le", - "linux-musl", - "linux-ppc64le", - "linux", - "unix-ppc64le", - "unix", - "any", - "base" - ], - "linux-musl-riscv64": [ - "linux-musl-riscv64", - "linux-musl", - "linux-riscv64", - "linux", - "unix-riscv64", - "unix", - "any", - "base" - ], - "linux-musl-s390x": [ - "linux-musl-s390x", - "linux-musl", - "linux-s390x", - "linux", - "unix-s390x", - "unix", - "any", - "base" - ], - "linux-musl-x64": [ - "linux-musl-x64", - "linux-musl", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "linux-musl-x86": [ - "linux-musl-x86", - "linux-musl", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "linux-ppc64le": [ - "linux-ppc64le", - "linux", - "unix-ppc64le", - "unix", - "any", - "base" - ], - "linux-riscv64": [ - "linux-riscv64", - "linux", - "unix-riscv64", - "unix", - "any", - "base" - ], - "linux-s390x": [ - "linux-s390x", - "linux", - "unix-s390x", - "unix", - "any", - "base" - ], - "linux-x64": [ - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "linux-x86": [ - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "linuxmint.17": [ - "linuxmint.17", - "ubuntu.14.04", - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "linuxmint.17-x64": [ - "linuxmint.17-x64", - "linuxmint.17", - "ubuntu.14.04-x64", - "ubuntu.14.04", - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "linuxmint.17.1": [ - "linuxmint.17.1", - "linuxmint.17", - "ubuntu.14.04", - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "linuxmint.17.1-x64": [ - "linuxmint.17.1-x64", - "linuxmint.17.1", - "linuxmint.17-x64", - "linuxmint.17", - "ubuntu.14.04-x64", - "ubuntu.14.04", - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "linuxmint.17.2": [ - "linuxmint.17.2", - "linuxmint.17.1", - "linuxmint.17", - "ubuntu.14.04", - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "linuxmint.17.2-x64": [ - "linuxmint.17.2-x64", - "linuxmint.17.2", - "linuxmint.17.1-x64", - "linuxmint.17.1", - "linuxmint.17-x64", - "linuxmint.17", - "ubuntu.14.04-x64", - "ubuntu.14.04", - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "linuxmint.17.3": [ - "linuxmint.17.3", - "linuxmint.17.2", - "linuxmint.17.1", - "linuxmint.17", - "ubuntu.14.04", - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "linuxmint.17.3-x64": [ - "linuxmint.17.3-x64", - "linuxmint.17.3", - "linuxmint.17.2-x64", - "linuxmint.17.2", - "linuxmint.17.1-x64", - "linuxmint.17.1", - "linuxmint.17-x64", - "linuxmint.17", - "ubuntu.14.04-x64", - "ubuntu.14.04", - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "linuxmint.18": [ - "linuxmint.18", - "ubuntu.16.04", - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "linuxmint.18-x64": [ - "linuxmint.18-x64", - "linuxmint.18", - "ubuntu.16.04-x64", - "ubuntu.16.04", - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "linuxmint.18.1": [ - "linuxmint.18.1", - "linuxmint.18", - "ubuntu.16.04", - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "linuxmint.18.1-x64": [ - "linuxmint.18.1-x64", - "linuxmint.18.1", - "linuxmint.18-x64", - "linuxmint.18", - "ubuntu.16.04-x64", - "ubuntu.16.04", - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "linuxmint.18.2": [ - "linuxmint.18.2", - "linuxmint.18.1", - "linuxmint.18", - "ubuntu.16.04", - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "linuxmint.18.2-x64": [ - "linuxmint.18.2-x64", - "linuxmint.18.2", - "linuxmint.18.1-x64", - "linuxmint.18.1", - "linuxmint.18-x64", - "linuxmint.18", - "ubuntu.16.04-x64", - "ubuntu.16.04", - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "linuxmint.18.3": [ - "linuxmint.18.3", - "linuxmint.18.2", - "linuxmint.18.1", - "linuxmint.18", - "ubuntu.16.04", - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "linuxmint.18.3-x64": [ - "linuxmint.18.3-x64", - "linuxmint.18.3", - "linuxmint.18.2-x64", - "linuxmint.18.2", - "linuxmint.18.1-x64", - "linuxmint.18.1", - "linuxmint.18-x64", - "linuxmint.18", - "ubuntu.16.04-x64", - "ubuntu.16.04", - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "linuxmint.19": [ - "linuxmint.19", - "ubuntu.18.04", - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "linuxmint.19-x64": [ - "linuxmint.19-x64", - "linuxmint.19", - "ubuntu.18.04-x64", - "ubuntu.18.04", - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "linuxmint.19.1": [ - "linuxmint.19.1", - "linuxmint.19", - "ubuntu.18.04", - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "linuxmint.19.1-x64": [ - "linuxmint.19.1-x64", - "linuxmint.19.1", - "linuxmint.19-x64", - "linuxmint.19", - "ubuntu.18.04-x64", - "ubuntu.18.04", - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "linuxmint.19.2": [ - "linuxmint.19.2", - "linuxmint.19.1", - "linuxmint.19", - "ubuntu.18.04", - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "linuxmint.19.2-x64": [ - "linuxmint.19.2-x64", - "linuxmint.19.2", - "linuxmint.19.1-x64", - "linuxmint.19.1", - "linuxmint.19-x64", - "linuxmint.19", - "ubuntu.18.04-x64", - "ubuntu.18.04", - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "maccatalyst": [ - "maccatalyst", - "ios", - "unix", - "any", - "base" - ], - "maccatalyst-arm64": [ - "maccatalyst-arm64", - "maccatalyst", - "ios-arm64", - "ios", - "unix-arm64", - "unix", - "any", - "base" - ], - "maccatalyst-x64": [ - "maccatalyst-x64", - "maccatalyst", - "ios-x64", - "ios", - "unix-x64", - "unix", - "any", - "base" - ], - "maccatalyst.13": [ - "maccatalyst.13", - "maccatalyst", - "ios", - "unix", - "any", - "base" - ], - "maccatalyst.13-arm64": [ - "maccatalyst.13-arm64", - "maccatalyst.13", - "maccatalyst-arm64", - "maccatalyst", - "ios-arm64", - "ios", - "unix-arm64", - "unix", - "any", - "base" - ], - "maccatalyst.13-x64": [ - "maccatalyst.13-x64", - "maccatalyst.13", - "maccatalyst-x64", - "maccatalyst", - "ios-x64", - "ios", - "unix-x64", - "unix", - "any", - "base" - ], - "maccatalyst.14": [ - "maccatalyst.14", - "maccatalyst.13", - "maccatalyst", - "ios", - "unix", - "any", - "base" - ], - "maccatalyst.14-arm64": [ - "maccatalyst.14-arm64", - "maccatalyst.14", - "maccatalyst.13-arm64", - "maccatalyst.13", - "maccatalyst-arm64", - "maccatalyst", - "ios-arm64", - "ios", - "unix-arm64", - "unix", - "any", - "base" - ], - "maccatalyst.14-x64": [ - "maccatalyst.14-x64", - "maccatalyst.14", - "maccatalyst.13-x64", - "maccatalyst.13", - "maccatalyst-x64", - "maccatalyst", - "ios-x64", - "ios", - "unix-x64", - "unix", - "any", - "base" - ], - "maccatalyst.15": [ - "maccatalyst.15", - "maccatalyst.14", - "maccatalyst.13", - "maccatalyst", - "ios", - "unix", - "any", - "base" - ], - "maccatalyst.15-arm64": [ - "maccatalyst.15-arm64", - "maccatalyst.15", - "maccatalyst.14-arm64", - "maccatalyst.14", - "maccatalyst.13-arm64", - "maccatalyst.13", - "maccatalyst-arm64", - "maccatalyst", - "ios-arm64", - "ios", - "unix-arm64", - "unix", - "any", - "base" - ], - "maccatalyst.15-x64": [ - "maccatalyst.15-x64", - "maccatalyst.15", - "maccatalyst.14-x64", - "maccatalyst.14", - "maccatalyst.13-x64", - "maccatalyst.13", - "maccatalyst-x64", - "maccatalyst", - "ios-x64", - "ios", - "unix-x64", - "unix", - "any", - "base" - ], - "manjaro": [ - "manjaro", - "arch", - "linux", - "unix", - "any", - "base" - ], - "manjaro-x64": [ - "manjaro-x64", - "manjaro", - "arch-x64", - "arch", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "miraclelinux": [ - "miraclelinux", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "miraclelinux-x64": [ - "miraclelinux-x64", - "miraclelinux", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "miraclelinux.8": [ - "miraclelinux.8", - "miraclelinux", - "rhel.8", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "miraclelinux.8-x64": [ - "miraclelinux.8-x64", - "miraclelinux.8", - "miraclelinux-x64", - "rhel.8-x64", - "miraclelinux", - "rhel.8", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "miraclelinux.9": [ - "miraclelinux.9", - "miraclelinux", - "rhel.9", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "miraclelinux.9-x64": [ - "miraclelinux.9-x64", - "miraclelinux.9", - "miraclelinux-x64", - "rhel.9-x64", - "miraclelinux", - "rhel.9", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ol": [ - "ol", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "ol-x64": [ - "ol-x64", - "ol", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ol.7": [ - "ol.7", - "ol", - "rhel.7", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "ol.7-x64": [ - "ol.7-x64", - "ol.7", - "ol-x64", - "rhel.7-x64", - "ol", - "rhel.7", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ol.7.0": [ - "ol.7.0", - "ol.7", - "rhel.7.0", - "ol", - "rhel.7", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "ol.7.0-x64": [ - "ol.7.0-x64", - "ol.7.0", - "ol.7-x64", - "rhel.7.0-x64", - "ol.7", - "rhel.7.0", - "ol-x64", - "rhel.7-x64", - "ol", - "rhel.7", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ol.7.1": [ - "ol.7.1", - "ol.7.0", - "rhel.7.1", - "ol.7", - "rhel.7.0", - "ol", - "rhel.7", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "ol.7.1-x64": [ - "ol.7.1-x64", - "ol.7.1", - "ol.7.0-x64", - "rhel.7.1-x64", - "ol.7.0", - "rhel.7.1", - "ol.7-x64", - "rhel.7.0-x64", - "ol.7", - "rhel.7.0", - "ol-x64", - "rhel.7-x64", - "ol", - "rhel.7", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ol.7.2": [ - "ol.7.2", - "ol.7.1", - "rhel.7.2", - "ol.7.0", - "rhel.7.1", - "ol.7", - "rhel.7.0", - "ol", - "rhel.7", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "ol.7.2-x64": [ - "ol.7.2-x64", - "ol.7.2", - "ol.7.1-x64", - "rhel.7.2-x64", - "ol.7.1", - "rhel.7.2", - "ol.7.0-x64", - "rhel.7.1-x64", - "ol.7.0", - "rhel.7.1", - "ol.7-x64", - "rhel.7.0-x64", - "ol.7", - "rhel.7.0", - "ol-x64", - "rhel.7-x64", - "ol", - "rhel.7", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ol.7.3": [ - "ol.7.3", - "ol.7.2", - "rhel.7.3", - "ol.7.1", - "rhel.7.2", - "ol.7.0", - "rhel.7.1", - "ol.7", - "rhel.7.0", - "ol", - "rhel.7", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "ol.7.3-x64": [ - "ol.7.3-x64", - "ol.7.3", - "ol.7.2-x64", - "rhel.7.3-x64", - "ol.7.2", - "rhel.7.3", - "ol.7.1-x64", - "rhel.7.2-x64", - "ol.7.1", - "rhel.7.2", - "ol.7.0-x64", - "rhel.7.1-x64", - "ol.7.0", - "rhel.7.1", - "ol.7-x64", - "rhel.7.0-x64", - "ol.7", - "rhel.7.0", - "ol-x64", - "rhel.7-x64", - "ol", - "rhel.7", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ol.7.4": [ - "ol.7.4", - "ol.7.3", - "rhel.7.4", - "ol.7.2", - "rhel.7.3", - "ol.7.1", - "rhel.7.2", - "ol.7.0", - "rhel.7.1", - "ol.7", - "rhel.7.0", - "ol", - "rhel.7", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "ol.7.4-x64": [ - "ol.7.4-x64", - "ol.7.4", - "ol.7.3-x64", - "rhel.7.4-x64", - "ol.7.3", - "rhel.7.4", - "ol.7.2-x64", - "rhel.7.3-x64", - "ol.7.2", - "rhel.7.3", - "ol.7.1-x64", - "rhel.7.2-x64", - "ol.7.1", - "rhel.7.2", - "ol.7.0-x64", - "rhel.7.1-x64", - "ol.7.0", - "rhel.7.1", - "ol.7-x64", - "rhel.7.0-x64", - "ol.7", - "rhel.7.0", - "ol-x64", - "rhel.7-x64", - "ol", - "rhel.7", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ol.7.5": [ - "ol.7.5", - "ol.7.4", - "rhel.7.5", - "ol.7.3", - "rhel.7.4", - "ol.7.2", - "rhel.7.3", - "ol.7.1", - "rhel.7.2", - "ol.7.0", - "rhel.7.1", - "ol.7", - "rhel.7.0", - "ol", - "rhel.7", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "ol.7.5-x64": [ - "ol.7.5-x64", - "ol.7.5", - "ol.7.4-x64", - "rhel.7.5-x64", - "ol.7.4", - "rhel.7.5", - "ol.7.3-x64", - "rhel.7.4-x64", - "ol.7.3", - "rhel.7.4", - "ol.7.2-x64", - "rhel.7.3-x64", - "ol.7.2", - "rhel.7.3", - "ol.7.1-x64", - "rhel.7.2-x64", - "ol.7.1", - "rhel.7.2", - "ol.7.0-x64", - "rhel.7.1-x64", - "ol.7.0", - "rhel.7.1", - "ol.7-x64", - "rhel.7.0-x64", - "ol.7", - "rhel.7.0", - "ol-x64", - "rhel.7-x64", - "ol", - "rhel.7", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ol.7.6": [ - "ol.7.6", - "ol.7.5", - "rhel.7.6", - "ol.7.4", - "rhel.7.5", - "ol.7.3", - "rhel.7.4", - "ol.7.2", - "rhel.7.3", - "ol.7.1", - "rhel.7.2", - "ol.7.0", - "rhel.7.1", - "ol.7", - "rhel.7.0", - "ol", - "rhel.7", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "ol.7.6-x64": [ - "ol.7.6-x64", - "ol.7.6", - "ol.7.5-x64", - "rhel.7.6-x64", - "ol.7.5", - "rhel.7.6", - "ol.7.4-x64", - "rhel.7.5-x64", - "ol.7.4", - "rhel.7.5", - "ol.7.3-x64", - "rhel.7.4-x64", - "ol.7.3", - "rhel.7.4", - "ol.7.2-x64", - "rhel.7.3-x64", - "ol.7.2", - "rhel.7.3", - "ol.7.1-x64", - "rhel.7.2-x64", - "ol.7.1", - "rhel.7.2", - "ol.7.0-x64", - "rhel.7.1-x64", - "ol.7.0", - "rhel.7.1", - "ol.7-x64", - "rhel.7.0-x64", - "ol.7", - "rhel.7.0", - "ol-x64", - "rhel.7-x64", - "ol", - "rhel.7", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ol.8": [ - "ol.8", - "ol", - "rhel.8", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "ol.8-x64": [ - "ol.8-x64", - "ol.8", - "ol-x64", - "rhel.8-x64", - "ol", - "rhel.8", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ol.8.0": [ - "ol.8.0", - "ol.8", - "rhel.8.0", - "ol", - "rhel.8", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "ol.8.0-x64": [ - "ol.8.0-x64", - "ol.8.0", - "ol.8-x64", - "rhel.8.0-x64", - "ol.8", - "rhel.8.0", - "ol-x64", - "rhel.8-x64", - "ol", - "rhel.8", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "omnios": [ - "omnios", - "illumos", - "unix", - "any", - "base" - ], - "omnios-x64": [ - "omnios-x64", - "omnios", - "illumos-x64", - "illumos", - "unix-x64", - "unix", - "any", - "base" - ], - "omnios.15": [ - "omnios.15", - "omnios", - "illumos", - "unix", - "any", - "base" - ], - "omnios.15-x64": [ - "omnios.15-x64", - "omnios.15", - "omnios-x64", - "omnios", - "illumos-x64", - "illumos", - "unix-x64", - "unix", - "any", - "base" - ], - "openindiana": [ - "openindiana", - "illumos", - "unix", - "any", - "base" - ], - "openindiana-x64": [ - "openindiana-x64", - "openindiana", - "illumos-x64", - "illumos", - "unix-x64", - "unix", - "any", - "base" - ], - "opensuse": [ - "opensuse", - "linux", - "unix", - "any", - "base" - ], - "opensuse-x64": [ - "opensuse-x64", - "opensuse", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "opensuse.13.2": [ - "opensuse.13.2", - "opensuse", - "linux", - "unix", - "any", - "base" - ], - "opensuse.13.2-x64": [ - "opensuse.13.2-x64", - "opensuse.13.2", - "opensuse-x64", - "opensuse", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "opensuse.15.0": [ - "opensuse.15.0", - "opensuse", - "linux", - "unix", - "any", - "base" - ], - "opensuse.15.0-x64": [ - "opensuse.15.0-x64", - "opensuse.15.0", - "opensuse-x64", - "opensuse", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "opensuse.15.1": [ - "opensuse.15.1", - "opensuse", - "linux", - "unix", - "any", - "base" - ], - "opensuse.15.1-x64": [ - "opensuse.15.1-x64", - "opensuse.15.1", - "opensuse-x64", - "opensuse", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "opensuse.42.1": [ - "opensuse.42.1", - "opensuse", - "linux", - "unix", - "any", - "base" - ], - "opensuse.42.1-x64": [ - "opensuse.42.1-x64", - "opensuse.42.1", - "opensuse-x64", - "opensuse", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "opensuse.42.2": [ - "opensuse.42.2", - "opensuse", - "linux", - "unix", - "any", - "base" - ], - "opensuse.42.2-x64": [ - "opensuse.42.2-x64", - "opensuse.42.2", - "opensuse-x64", - "opensuse", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "opensuse.42.3": [ - "opensuse.42.3", - "opensuse", - "linux", - "unix", - "any", - "base" - ], - "opensuse.42.3-x64": [ - "opensuse.42.3-x64", - "opensuse.42.3", - "opensuse-x64", - "opensuse", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "osx": [ - "osx", - "unix", - "any", - "base" - ], - "osx-arm64": [ - "osx-arm64", - "osx", - "unix-arm64", - "unix", - "any", - "base" - ], - "osx-x64": [ - "osx-x64", - "osx", - "unix-x64", - "unix", - "any", - "base" - ], - "osx.10.10": [ - "osx.10.10", - "osx", - "unix", - "any", - "base" - ], - "osx.10.10-arm64": [ - "osx.10.10-arm64", - "osx.10.10", - "osx-arm64", - "osx", - "unix-arm64", - "unix", - "any", - "base" - ], - "osx.10.10-x64": [ - "osx.10.10-x64", - "osx.10.10", - "osx-x64", - "osx", - "unix-x64", - "unix", - "any", - "base" - ], - "osx.10.11": [ - "osx.10.11", - "osx.10.10", - "osx", - "unix", - "any", - "base" - ], - "osx.10.11-arm64": [ - "osx.10.11-arm64", - "osx.10.11", - "osx.10.10-arm64", - "osx.10.10", - "osx-arm64", - "osx", - "unix-arm64", - "unix", - "any", - "base" - ], - "osx.10.11-x64": [ - "osx.10.11-x64", - "osx.10.11", - "osx.10.10-x64", - "osx.10.10", - "osx-x64", - "osx", - "unix-x64", - "unix", - "any", - "base" - ], - "osx.10.12": [ - "osx.10.12", - "osx.10.11", - "osx.10.10", - "osx", - "unix", - "any", - "base" - ], - "osx.10.12-arm64": [ - "osx.10.12-arm64", - "osx.10.12", - "osx.10.11-arm64", - "osx.10.11", - "osx.10.10-arm64", - "osx.10.10", - "osx-arm64", - "osx", - "unix-arm64", - "unix", - "any", - "base" - ], - "osx.10.12-x64": [ - "osx.10.12-x64", - "osx.10.12", - "osx.10.11-x64", - "osx.10.11", - "osx.10.10-x64", - "osx.10.10", - "osx-x64", - "osx", - "unix-x64", - "unix", - "any", - "base" - ], - "osx.10.13": [ - "osx.10.13", - "osx.10.12", - "osx.10.11", - "osx.10.10", - "osx", - "unix", - "any", - "base" - ], - "osx.10.13-arm64": [ - "osx.10.13-arm64", - "osx.10.13", - "osx.10.12-arm64", - "osx.10.12", - "osx.10.11-arm64", - "osx.10.11", - "osx.10.10-arm64", - "osx.10.10", - "osx-arm64", - "osx", - "unix-arm64", - "unix", - "any", - "base" - ], - "osx.10.13-x64": [ - "osx.10.13-x64", - "osx.10.13", - "osx.10.12-x64", - "osx.10.12", - "osx.10.11-x64", - "osx.10.11", - "osx.10.10-x64", - "osx.10.10", - "osx-x64", - "osx", - "unix-x64", - "unix", - "any", - "base" - ], - "osx.10.14": [ - "osx.10.14", - "osx.10.13", - "osx.10.12", - "osx.10.11", - "osx.10.10", - "osx", - "unix", - "any", - "base" - ], - "osx.10.14-arm64": [ - "osx.10.14-arm64", - "osx.10.14", - "osx.10.13-arm64", - "osx.10.13", - "osx.10.12-arm64", - "osx.10.12", - "osx.10.11-arm64", - "osx.10.11", - "osx.10.10-arm64", - "osx.10.10", - "osx-arm64", - "osx", - "unix-arm64", - "unix", - "any", - "base" - ], - "osx.10.14-x64": [ - "osx.10.14-x64", - "osx.10.14", - "osx.10.13-x64", - "osx.10.13", - "osx.10.12-x64", - "osx.10.12", - "osx.10.11-x64", - "osx.10.11", - "osx.10.10-x64", - "osx.10.10", - "osx-x64", - "osx", - "unix-x64", - "unix", - "any", - "base" - ], - "osx.10.15": [ - "osx.10.15", - "osx.10.14", - "osx.10.13", - "osx.10.12", - "osx.10.11", - "osx.10.10", - "osx", - "unix", - "any", - "base" - ], - "osx.10.15-arm64": [ - "osx.10.15-arm64", - "osx.10.15", - "osx.10.14-arm64", - "osx.10.14", - "osx.10.13-arm64", - "osx.10.13", - "osx.10.12-arm64", - "osx.10.12", - "osx.10.11-arm64", - "osx.10.11", - "osx.10.10-arm64", - "osx.10.10", - "osx-arm64", - "osx", - "unix-arm64", - "unix", - "any", - "base" - ], - "osx.10.15-x64": [ - "osx.10.15-x64", - "osx.10.15", - "osx.10.14-x64", - "osx.10.14", - "osx.10.13-x64", - "osx.10.13", - "osx.10.12-x64", - "osx.10.12", - "osx.10.11-x64", - "osx.10.11", - "osx.10.10-x64", - "osx.10.10", - "osx-x64", - "osx", - "unix-x64", - "unix", - "any", - "base" - ], - "osx.10.16": [ - "osx.10.16", - "osx.10.15", - "osx.10.14", - "osx.10.13", - "osx.10.12", - "osx.10.11", - "osx.10.10", - "osx", - "unix", - "any", - "base" - ], - "osx.10.16-arm64": [ - "osx.10.16-arm64", - "osx.10.16", - "osx.10.15-arm64", - "osx.10.15", - "osx.10.14-arm64", - "osx.10.14", - "osx.10.13-arm64", - "osx.10.13", - "osx.10.12-arm64", - "osx.10.12", - "osx.10.11-arm64", - "osx.10.11", - "osx.10.10-arm64", - "osx.10.10", - "osx-arm64", - "osx", - "unix-arm64", - "unix", - "any", - "base" - ], - "osx.10.16-x64": [ - "osx.10.16-x64", - "osx.10.16", - "osx.10.15-x64", - "osx.10.15", - "osx.10.14-x64", - "osx.10.14", - "osx.10.13-x64", - "osx.10.13", - "osx.10.12-x64", - "osx.10.12", - "osx.10.11-x64", - "osx.10.11", - "osx.10.10-x64", - "osx.10.10", - "osx-x64", - "osx", - "unix-x64", - "unix", - "any", - "base" - ], - "osx.11.0": [ - "osx.11.0", - "osx.10.16", - "osx.10.15", - "osx.10.14", - "osx.10.13", - "osx.10.12", - "osx.10.11", - "osx.10.10", - "osx", - "unix", - "any", - "base" - ], - "osx.11.0-arm64": [ - "osx.11.0-arm64", - "osx.11.0", - "osx.10.16-arm64", - "osx.10.16", - "osx.10.15-arm64", - "osx.10.15", - "osx.10.14-arm64", - "osx.10.14", - "osx.10.13-arm64", - "osx.10.13", - "osx.10.12-arm64", - "osx.10.12", - "osx.10.11-arm64", - "osx.10.11", - "osx.10.10-arm64", - "osx.10.10", - "osx-arm64", - "osx", - "unix-arm64", - "unix", - "any", - "base" - ], - "osx.11.0-x64": [ - "osx.11.0-x64", - "osx.11.0", - "osx.10.16-x64", - "osx.10.16", - "osx.10.15-x64", - "osx.10.15", - "osx.10.14-x64", - "osx.10.14", - "osx.10.13-x64", - "osx.10.13", - "osx.10.12-x64", - "osx.10.12", - "osx.10.11-x64", - "osx.10.11", - "osx.10.10-x64", - "osx.10.10", - "osx-x64", - "osx", - "unix-x64", - "unix", - "any", - "base" - ], - "osx.12": [ - "osx.12", - "osx.11.0", - "osx.10.16", - "osx.10.15", - "osx.10.14", - "osx.10.13", - "osx.10.12", - "osx.10.11", - "osx.10.10", - "osx", - "unix", - "any", - "base" - ], - "osx.12-arm64": [ - "osx.12-arm64", - "osx.12", - "osx.11.0-arm64", - "osx.11.0", - "osx.10.16-arm64", - "osx.10.16", - "osx.10.15-arm64", - "osx.10.15", - "osx.10.14-arm64", - "osx.10.14", - "osx.10.13-arm64", - "osx.10.13", - "osx.10.12-arm64", - "osx.10.12", - "osx.10.11-arm64", - "osx.10.11", - "osx.10.10-arm64", - "osx.10.10", - "osx-arm64", - "osx", - "unix-arm64", - "unix", - "any", - "base" - ], - "osx.12-x64": [ - "osx.12-x64", - "osx.12", - "osx.11.0-x64", - "osx.11.0", - "osx.10.16-x64", - "osx.10.16", - "osx.10.15-x64", - "osx.10.15", - "osx.10.14-x64", - "osx.10.14", - "osx.10.13-x64", - "osx.10.13", - "osx.10.12-x64", - "osx.10.12", - "osx.10.11-x64", - "osx.10.11", - "osx.10.10-x64", - "osx.10.10", - "osx-x64", - "osx", - "unix-x64", - "unix", - "any", - "base" - ], - "osx.13": [ - "osx.13", - "osx.12", - "osx.11.0", - "osx.10.16", - "osx.10.15", - "osx.10.14", - "osx.10.13", - "osx.10.12", - "osx.10.11", - "osx.10.10", - "osx", - "unix", - "any", - "base" - ], - "osx.13-arm64": [ - "osx.13-arm64", - "osx.13", - "osx.12-arm64", - "osx.12", - "osx.11.0-arm64", - "osx.11.0", - "osx.10.16-arm64", - "osx.10.16", - "osx.10.15-arm64", - "osx.10.15", - "osx.10.14-arm64", - "osx.10.14", - "osx.10.13-arm64", - "osx.10.13", - "osx.10.12-arm64", - "osx.10.12", - "osx.10.11-arm64", - "osx.10.11", - "osx.10.10-arm64", - "osx.10.10", - "osx-arm64", - "osx", - "unix-arm64", - "unix", - "any", - "base" - ], - "osx.13-x64": [ - "osx.13-x64", - "osx.13", - "osx.12-x64", - "osx.12", - "osx.11.0-x64", - "osx.11.0", - "osx.10.16-x64", - "osx.10.16", - "osx.10.15-x64", - "osx.10.15", - "osx.10.14-x64", - "osx.10.14", - "osx.10.13-x64", - "osx.10.13", - "osx.10.12-x64", - "osx.10.12", - "osx.10.11-x64", - "osx.10.11", - "osx.10.10-x64", - "osx.10.10", - "osx-x64", - "osx", - "unix-x64", - "unix", - "any", - "base" - ], - "rhel": [ - "rhel", - "linux", - "unix", - "any", - "base" - ], - "rhel-arm64": [ - "rhel-arm64", - "rhel", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "rhel-x64": [ - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "rhel.6": [ - "rhel.6", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "rhel.6-x64": [ - "rhel.6-x64", - "rhel.6", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "rhel.7": [ - "rhel.7", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "rhel.7-x64": [ - "rhel.7-x64", - "rhel.7", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "rhel.7.0": [ - "rhel.7.0", - "rhel.7", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "rhel.7.0-x64": [ - "rhel.7.0-x64", - "rhel.7.0", - "rhel.7-x64", - "rhel.7", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "rhel.7.1": [ - "rhel.7.1", - "rhel.7.0", - "rhel.7", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "rhel.7.1-x64": [ - "rhel.7.1-x64", - "rhel.7.1", - "rhel.7.0-x64", - "rhel.7.0", - "rhel.7-x64", - "rhel.7", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "rhel.7.2": [ - "rhel.7.2", - "rhel.7.1", - "rhel.7.0", - "rhel.7", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "rhel.7.2-x64": [ - "rhel.7.2-x64", - "rhel.7.2", - "rhel.7.1-x64", - "rhel.7.1", - "rhel.7.0-x64", - "rhel.7.0", - "rhel.7-x64", - "rhel.7", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "rhel.7.3": [ - "rhel.7.3", - "rhel.7.2", - "rhel.7.1", - "rhel.7.0", - "rhel.7", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "rhel.7.3-x64": [ - "rhel.7.3-x64", - "rhel.7.3", - "rhel.7.2-x64", - "rhel.7.2", - "rhel.7.1-x64", - "rhel.7.1", - "rhel.7.0-x64", - "rhel.7.0", - "rhel.7-x64", - "rhel.7", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "rhel.7.4": [ - "rhel.7.4", - "rhel.7.3", - "rhel.7.2", - "rhel.7.1", - "rhel.7.0", - "rhel.7", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "rhel.7.4-x64": [ - "rhel.7.4-x64", - "rhel.7.4", - "rhel.7.3-x64", - "rhel.7.3", - "rhel.7.2-x64", - "rhel.7.2", - "rhel.7.1-x64", - "rhel.7.1", - "rhel.7.0-x64", - "rhel.7.0", - "rhel.7-x64", - "rhel.7", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "rhel.7.5": [ - "rhel.7.5", - "rhel.7.4", - "rhel.7.3", - "rhel.7.2", - "rhel.7.1", - "rhel.7.0", - "rhel.7", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "rhel.7.5-x64": [ - "rhel.7.5-x64", - "rhel.7.5", - "rhel.7.4-x64", - "rhel.7.4", - "rhel.7.3-x64", - "rhel.7.3", - "rhel.7.2-x64", - "rhel.7.2", - "rhel.7.1-x64", - "rhel.7.1", - "rhel.7.0-x64", - "rhel.7.0", - "rhel.7-x64", - "rhel.7", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "rhel.7.6": [ - "rhel.7.6", - "rhel.7.5", - "rhel.7.4", - "rhel.7.3", - "rhel.7.2", - "rhel.7.1", - "rhel.7.0", - "rhel.7", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "rhel.7.6-x64": [ - "rhel.7.6-x64", - "rhel.7.6", - "rhel.7.5-x64", - "rhel.7.5", - "rhel.7.4-x64", - "rhel.7.4", - "rhel.7.3-x64", - "rhel.7.3", - "rhel.7.2-x64", - "rhel.7.2", - "rhel.7.1-x64", - "rhel.7.1", - "rhel.7.0-x64", - "rhel.7.0", - "rhel.7-x64", - "rhel.7", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "rhel.8": [ - "rhel.8", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "rhel.8-arm64": [ - "rhel.8-arm64", - "rhel.8", - "rhel-arm64", - "rhel", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "rhel.8-x64": [ - "rhel.8-x64", - "rhel.8", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "rhel.8.0": [ - "rhel.8.0", - "rhel.8", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "rhel.8.0-arm64": [ - "rhel.8.0-arm64", - "rhel.8.0", - "rhel.8-arm64", - "rhel.8", - "rhel-arm64", - "rhel", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "rhel.8.0-x64": [ - "rhel.8.0-x64", - "rhel.8.0", - "rhel.8-x64", - "rhel.8", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "rhel.8.1": [ - "rhel.8.1", - "rhel.8.0", - "rhel.8", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "rhel.8.1-arm64": [ - "rhel.8.1-arm64", - "rhel.8.1", - "rhel.8.0-arm64", - "rhel.8.0", - "rhel.8-arm64", - "rhel.8", - "rhel-arm64", - "rhel", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "rhel.8.1-x64": [ - "rhel.8.1-x64", - "rhel.8.1", - "rhel.8.0-x64", - "rhel.8.0", - "rhel.8-x64", - "rhel.8", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "rhel.9": [ - "rhel.9", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "rhel.9-arm64": [ - "rhel.9-arm64", - "rhel.9", - "rhel-arm64", - "rhel", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "rhel.9-x64": [ - "rhel.9-x64", - "rhel.9", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "rocky": [ - "rocky", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "rocky-arm64": [ - "rocky-arm64", - "rocky", - "rhel-arm64", - "rhel", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "rocky-x64": [ - "rocky-x64", - "rocky", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "rocky.8": [ - "rocky.8", - "rocky", - "rhel.8", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "rocky.8-arm64": [ - "rocky.8-arm64", - "rocky.8", - "rocky-arm64", - "rhel.8-arm64", - "rocky", - "rhel.8", - "rhel-arm64", - "rhel", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "rocky.8-x64": [ - "rocky.8-x64", - "rocky.8", - "rocky-x64", - "rhel.8-x64", - "rocky", - "rhel.8", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "rocky.9": [ - "rocky.9", - "rocky", - "rhel.9", - "rhel", - "linux", - "unix", - "any", - "base" - ], - "rocky.9-arm64": [ - "rocky.9-arm64", - "rocky.9", - "rocky-arm64", - "rhel.9-arm64", - "rocky", - "rhel.9", - "rhel-arm64", - "rhel", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "rocky.9-x64": [ - "rocky.9-x64", - "rocky.9", - "rocky-x64", - "rhel.9-x64", - "rocky", - "rhel.9", - "rhel-x64", - "rhel", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "sles": [ - "sles", - "linux", - "unix", - "any", - "base" - ], - "sles-x64": [ - "sles-x64", - "sles", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "sles.12": [ - "sles.12", - "sles", - "linux", - "unix", - "any", - "base" - ], - "sles.12-x64": [ - "sles.12-x64", - "sles.12", - "sles-x64", - "sles", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "sles.12.1": [ - "sles.12.1", - "sles.12", - "sles", - "linux", - "unix", - "any", - "base" - ], - "sles.12.1-x64": [ - "sles.12.1-x64", - "sles.12.1", - "sles.12-x64", - "sles.12", - "sles-x64", - "sles", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "sles.12.2": [ - "sles.12.2", - "sles.12.1", - "sles.12", - "sles", - "linux", - "unix", - "any", - "base" - ], - "sles.12.2-x64": [ - "sles.12.2-x64", - "sles.12.2", - "sles.12.1-x64", - "sles.12.1", - "sles.12-x64", - "sles.12", - "sles-x64", - "sles", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "sles.12.3": [ - "sles.12.3", - "sles.12.2", - "sles.12.1", - "sles.12", - "sles", - "linux", - "unix", - "any", - "base" - ], - "sles.12.3-x64": [ - "sles.12.3-x64", - "sles.12.3", - "sles.12.2-x64", - "sles.12.2", - "sles.12.1-x64", - "sles.12.1", - "sles.12-x64", - "sles.12", - "sles-x64", - "sles", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "sles.12.4": [ - "sles.12.4", - "sles.12.3", - "sles.12.2", - "sles.12.1", - "sles.12", - "sles", - "linux", - "unix", - "any", - "base" - ], - "sles.12.4-x64": [ - "sles.12.4-x64", - "sles.12.4", - "sles.12.3-x64", - "sles.12.3", - "sles.12.2-x64", - "sles.12.2", - "sles.12.1-x64", - "sles.12.1", - "sles.12-x64", - "sles.12", - "sles-x64", - "sles", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "sles.15": [ - "sles.15", - "sles.12.4", - "sles.12.3", - "sles.12.2", - "sles.12.1", - "sles.12", - "sles", - "linux", - "unix", - "any", - "base" - ], - "sles.15-x64": [ - "sles.15-x64", - "sles.15", - "sles.12.4-x64", - "sles.12.4", - "sles.12.3-x64", - "sles.12.3", - "sles.12.2-x64", - "sles.12.2", - "sles.12.1-x64", - "sles.12.1", - "sles.12-x64", - "sles.12", - "sles-x64", - "sles", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "sles.15.1": [ - "sles.15.1", - "sles.15", - "sles.12.4", - "sles.12.3", - "sles.12.2", - "sles.12.1", - "sles.12", - "sles", - "linux", - "unix", - "any", - "base" - ], - "sles.15.1-x64": [ - "sles.15.1-x64", - "sles.15.1", - "sles.15-x64", - "sles.15", - "sles.12.4-x64", - "sles.12.4", - "sles.12.3-x64", - "sles.12.3", - "sles.12.2-x64", - "sles.12.2", - "sles.12.1-x64", - "sles.12.1", - "sles.12-x64", - "sles.12", - "sles-x64", - "sles", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "smartos": [ - "smartos", - "illumos", - "unix", - "any", - "base" - ], - "smartos-x64": [ - "smartos-x64", - "smartos", - "illumos-x64", - "illumos", - "unix-x64", - "unix", - "any", - "base" - ], - "smartos.2020": [ - "smartos.2020", - "smartos", - "illumos", - "unix", - "any", - "base" - ], - "smartos.2020-x64": [ - "smartos.2020-x64", - "smartos.2020", - "smartos-x64", - "smartos", - "illumos-x64", - "illumos", - "unix-x64", - "unix", - "any", - "base" - ], - "smartos.2021": [ - "smartos.2021", - "smartos.2020", - "smartos", - "illumos", - "unix", - "any", - "base" - ], - "smartos.2021-x64": [ - "smartos.2021-x64", - "smartos.2021", - "smartos.2020-x64", - "smartos.2020", - "smartos-x64", - "smartos", - "illumos-x64", - "illumos", - "unix-x64", - "unix", - "any", - "base" - ], - "solaris": [ - "solaris", - "unix", - "any", - "base" - ], - "solaris-x64": [ - "solaris-x64", - "solaris", - "unix-x64", - "unix", - "any", - "base" - ], - "solaris.11": [ - "solaris.11", - "solaris", - "unix", - "any", - "base" - ], - "solaris.11-x64": [ - "solaris.11-x64", - "solaris.11", - "solaris-x64", - "solaris", - "unix-x64", - "unix", - "any", - "base" - ], - "tizen": [ - "tizen", - "linux", - "unix", - "any", - "base" - ], - "tizen-arm64": [ - "tizen-arm64", - "tizen", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "tizen-armel": [ - "tizen-armel", - "tizen", - "linux-armel", - "linux", - "unix-armel", - "unix", - "any", - "base" - ], - "tizen-x86": [ - "tizen-x86", - "tizen", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "tizen.4.0.0": [ - "tizen.4.0.0", - "tizen", - "linux", - "unix", - "any", - "base" - ], - "tizen.4.0.0-arm64": [ - "tizen.4.0.0-arm64", - "tizen.4.0.0", - "tizen-arm64", - "tizen", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "tizen.4.0.0-armel": [ - "tizen.4.0.0-armel", - "tizen.4.0.0", - "tizen-armel", - "tizen", - "linux-armel", - "linux", - "unix-armel", - "unix", - "any", - "base" - ], - "tizen.4.0.0-x86": [ - "tizen.4.0.0-x86", - "tizen.4.0.0", - "tizen-x86", - "tizen", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "tizen.5.0.0": [ - "tizen.5.0.0", - "tizen.4.0.0", - "tizen", - "linux", - "unix", - "any", - "base" - ], - "tizen.5.0.0-arm64": [ - "tizen.5.0.0-arm64", - "tizen.5.0.0", - "tizen.4.0.0-arm64", - "tizen.4.0.0", - "tizen-arm64", - "tizen", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "tizen.5.0.0-armel": [ - "tizen.5.0.0-armel", - "tizen.5.0.0", - "tizen.4.0.0-armel", - "tizen.4.0.0", - "tizen-armel", - "tizen", - "linux-armel", - "linux", - "unix-armel", - "unix", - "any", - "base" - ], - "tizen.5.0.0-x86": [ - "tizen.5.0.0-x86", - "tizen.5.0.0", - "tizen.4.0.0-x86", - "tizen.4.0.0", - "tizen-x86", - "tizen", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "tizen.5.5.0": [ - "tizen.5.5.0", - "tizen.5.0.0", - "tizen.4.0.0", - "tizen", - "linux", - "unix", - "any", - "base" - ], - "tizen.5.5.0-arm64": [ - "tizen.5.5.0-arm64", - "tizen.5.5.0", - "tizen.5.0.0-arm64", - "tizen.5.0.0", - "tizen.4.0.0-arm64", - "tizen.4.0.0", - "tizen-arm64", - "tizen", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "tizen.5.5.0-armel": [ - "tizen.5.5.0-armel", - "tizen.5.5.0", - "tizen.5.0.0-armel", - "tizen.5.0.0", - "tizen.4.0.0-armel", - "tizen.4.0.0", - "tizen-armel", - "tizen", - "linux-armel", - "linux", - "unix-armel", - "unix", - "any", - "base" - ], - "tizen.5.5.0-x86": [ - "tizen.5.5.0-x86", - "tizen.5.5.0", - "tizen.5.0.0-x86", - "tizen.5.0.0", - "tizen.4.0.0-x86", - "tizen.4.0.0", - "tizen-x86", - "tizen", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "tizen.6.0.0": [ - "tizen.6.0.0", - "tizen.5.5.0", - "tizen.5.0.0", - "tizen.4.0.0", - "tizen", - "linux", - "unix", - "any", - "base" - ], - "tizen.6.0.0-arm64": [ - "tizen.6.0.0-arm64", - "tizen.6.0.0", - "tizen.5.5.0-arm64", - "tizen.5.5.0", - "tizen.5.0.0-arm64", - "tizen.5.0.0", - "tizen.4.0.0-arm64", - "tizen.4.0.0", - "tizen-arm64", - "tizen", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "tizen.6.0.0-armel": [ - "tizen.6.0.0-armel", - "tizen.6.0.0", - "tizen.5.5.0-armel", - "tizen.5.5.0", - "tizen.5.0.0-armel", - "tizen.5.0.0", - "tizen.4.0.0-armel", - "tizen.4.0.0", - "tizen-armel", - "tizen", - "linux-armel", - "linux", - "unix-armel", - "unix", - "any", - "base" - ], - "tizen.6.0.0-x86": [ - "tizen.6.0.0-x86", - "tizen.6.0.0", - "tizen.5.5.0-x86", - "tizen.5.5.0", - "tizen.5.0.0-x86", - "tizen.5.0.0", - "tizen.4.0.0-x86", - "tizen.4.0.0", - "tizen-x86", - "tizen", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "tizen.6.5.0": [ - "tizen.6.5.0", - "tizen.6.0.0", - "tizen.5.5.0", - "tizen.5.0.0", - "tizen.4.0.0", - "tizen", - "linux", - "unix", - "any", - "base" - ], - "tizen.6.5.0-arm64": [ - "tizen.6.5.0-arm64", - "tizen.6.5.0", - "tizen.6.0.0-arm64", - "tizen.6.0.0", - "tizen.5.5.0-arm64", - "tizen.5.5.0", - "tizen.5.0.0-arm64", - "tizen.5.0.0", - "tizen.4.0.0-arm64", - "tizen.4.0.0", - "tizen-arm64", - "tizen", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "tizen.6.5.0-armel": [ - "tizen.6.5.0-armel", - "tizen.6.5.0", - "tizen.6.0.0-armel", - "tizen.6.0.0", - "tizen.5.5.0-armel", - "tizen.5.5.0", - "tizen.5.0.0-armel", - "tizen.5.0.0", - "tizen.4.0.0-armel", - "tizen.4.0.0", - "tizen-armel", - "tizen", - "linux-armel", - "linux", - "unix-armel", - "unix", - "any", - "base" - ], - "tizen.6.5.0-x86": [ - "tizen.6.5.0-x86", - "tizen.6.5.0", - "tizen.6.0.0-x86", - "tizen.6.0.0", - "tizen.5.5.0-x86", - "tizen.5.5.0", - "tizen.5.0.0-x86", - "tizen.5.0.0", - "tizen.4.0.0-x86", - "tizen.4.0.0", - "tizen-x86", - "tizen", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "tizen.7.0.0": [ - "tizen.7.0.0", - "tizen.6.5.0", - "tizen.6.0.0", - "tizen.5.5.0", - "tizen.5.0.0", - "tizen.4.0.0", - "tizen", - "linux", - "unix", - "any", - "base" - ], - "tizen.7.0.0-arm64": [ - "tizen.7.0.0-arm64", - "tizen.7.0.0", - "tizen.6.5.0-arm64", - "tizen.6.5.0", - "tizen.6.0.0-arm64", - "tizen.6.0.0", - "tizen.5.5.0-arm64", - "tizen.5.5.0", - "tizen.5.0.0-arm64", - "tizen.5.0.0", - "tizen.4.0.0-arm64", - "tizen.4.0.0", - "tizen-arm64", - "tizen", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "tizen.7.0.0-armel": [ - "tizen.7.0.0-armel", - "tizen.7.0.0", - "tizen.6.5.0-armel", - "tizen.6.5.0", - "tizen.6.0.0-armel", - "tizen.6.0.0", - "tizen.5.5.0-armel", - "tizen.5.5.0", - "tizen.5.0.0-armel", - "tizen.5.0.0", - "tizen.4.0.0-armel", - "tizen.4.0.0", - "tizen-armel", - "tizen", - "linux-armel", - "linux", - "unix-armel", - "unix", - "any", - "base" - ], - "tizen.7.0.0-x86": [ - "tizen.7.0.0-x86", - "tizen.7.0.0", - "tizen.6.5.0-x86", - "tizen.6.5.0", - "tizen.6.0.0-x86", - "tizen.6.0.0", - "tizen.5.5.0-x86", - "tizen.5.5.0", - "tizen.5.0.0-x86", - "tizen.5.0.0", - "tizen.4.0.0-x86", - "tizen.4.0.0", - "tizen-x86", - "tizen", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "tvos": [ - "tvos", - "unix", - "any", - "base" - ], - "tvos-arm64": [ - "tvos-arm64", - "tvos", - "unix-arm64", - "unix", - "any", - "base" - ], - "tvos-x64": [ - "tvos-x64", - "tvos", - "unix-x64", - "unix", - "any", - "base" - ], - "tvos.10": [ - "tvos.10", - "tvos", - "unix", - "any", - "base" - ], - "tvos.10-arm64": [ - "tvos.10-arm64", - "tvos.10", - "tvos-arm64", - "tvos", - "unix-arm64", - "unix", - "any", - "base" - ], - "tvos.10-x64": [ - "tvos.10-x64", - "tvos.10", - "tvos-x64", - "tvos", - "unix-x64", - "unix", - "any", - "base" - ], - "tvos.11": [ - "tvos.11", - "tvos.10", - "tvos", - "unix", - "any", - "base" - ], - "tvos.11-arm64": [ - "tvos.11-arm64", - "tvos.11", - "tvos.10-arm64", - "tvos.10", - "tvos-arm64", - "tvos", - "unix-arm64", - "unix", - "any", - "base" - ], - "tvos.11-x64": [ - "tvos.11-x64", - "tvos.11", - "tvos.10-x64", - "tvos.10", - "tvos-x64", - "tvos", - "unix-x64", - "unix", - "any", - "base" - ], - "tvos.12": [ - "tvos.12", - "tvos.11", - "tvos.10", - "tvos", - "unix", - "any", - "base" - ], - "tvos.12-arm64": [ - "tvos.12-arm64", - "tvos.12", - "tvos.11-arm64", - "tvos.11", - "tvos.10-arm64", - "tvos.10", - "tvos-arm64", - "tvos", - "unix-arm64", - "unix", - "any", - "base" - ], - "tvos.12-x64": [ - "tvos.12-x64", - "tvos.12", - "tvos.11-x64", - "tvos.11", - "tvos.10-x64", - "tvos.10", - "tvos-x64", - "tvos", - "unix-x64", - "unix", - "any", - "base" - ], - "tvos.13": [ - "tvos.13", - "tvos.12", - "tvos.11", - "tvos.10", - "tvos", - "unix", - "any", - "base" - ], - "tvos.13-arm64": [ - "tvos.13-arm64", - "tvos.13", - "tvos.12-arm64", - "tvos.12", - "tvos.11-arm64", - "tvos.11", - "tvos.10-arm64", - "tvos.10", - "tvos-arm64", - "tvos", - "unix-arm64", - "unix", - "any", - "base" - ], - "tvos.13-x64": [ - "tvos.13-x64", - "tvos.13", - "tvos.12-x64", - "tvos.12", - "tvos.11-x64", - "tvos.11", - "tvos.10-x64", - "tvos.10", - "tvos-x64", - "tvos", - "unix-x64", - "unix", - "any", - "base" - ], - "tvos.14": [ - "tvos.14", - "tvos.13", - "tvos.12", - "tvos.11", - "tvos.10", - "tvos", - "unix", - "any", - "base" - ], - "tvos.14-arm64": [ - "tvos.14-arm64", - "tvos.14", - "tvos.13-arm64", - "tvos.13", - "tvos.12-arm64", - "tvos.12", - "tvos.11-arm64", - "tvos.11", - "tvos.10-arm64", - "tvos.10", - "tvos-arm64", - "tvos", - "unix-arm64", - "unix", - "any", - "base" - ], - "tvos.14-x64": [ - "tvos.14-x64", - "tvos.14", - "tvos.13-x64", - "tvos.13", - "tvos.12-x64", - "tvos.12", - "tvos.11-x64", - "tvos.11", - "tvos.10-x64", - "tvos.10", - "tvos-x64", - "tvos", - "unix-x64", - "unix", - "any", - "base" - ], - "tvos.15": [ - "tvos.15", - "tvos.14", - "tvos.13", - "tvos.12", - "tvos.11", - "tvos.10", - "tvos", - "unix", - "any", - "base" - ], - "tvos.15-arm64": [ - "tvos.15-arm64", - "tvos.15", - "tvos.14-arm64", - "tvos.14", - "tvos.13-arm64", - "tvos.13", - "tvos.12-arm64", - "tvos.12", - "tvos.11-arm64", - "tvos.11", - "tvos.10-arm64", - "tvos.10", - "tvos-arm64", - "tvos", - "unix-arm64", - "unix", - "any", - "base" - ], - "tvos.15-x64": [ - "tvos.15-x64", - "tvos.15", - "tvos.14-x64", - "tvos.14", - "tvos.13-x64", - "tvos.13", - "tvos.12-x64", - "tvos.12", - "tvos.11-x64", - "tvos.11", - "tvos.10-x64", - "tvos.10", - "tvos-x64", - "tvos", - "unix-x64", - "unix", - "any", - "base" - ], - "tvossimulator": [ - "tvossimulator", - "tvos", - "unix", - "any", - "base" - ], - "tvossimulator-arm64": [ - "tvossimulator-arm64", - "tvossimulator", - "tvos-arm64", - "tvos", - "unix-arm64", - "unix", - "any", - "base" - ], - "tvossimulator-x64": [ - "tvossimulator-x64", - "tvossimulator", - "tvos-x64", - "tvos", - "unix-x64", - "unix", - "any", - "base" - ], - "tvossimulator.10": [ - "tvossimulator.10", - "tvossimulator", - "tvos", - "unix", - "any", - "base" - ], - "tvossimulator.10-arm64": [ - "tvossimulator.10-arm64", - "tvossimulator.10", - "tvossimulator-arm64", - "tvossimulator", - "tvos-arm64", - "tvos", - "unix-arm64", - "unix", - "any", - "base" - ], - "tvossimulator.10-x64": [ - "tvossimulator.10-x64", - "tvossimulator.10", - "tvossimulator-x64", - "tvossimulator", - "tvos-x64", - "tvos", - "unix-x64", - "unix", - "any", - "base" - ], - "tvossimulator.11": [ - "tvossimulator.11", - "tvossimulator.10", - "tvossimulator", - "tvos", - "unix", - "any", - "base" - ], - "tvossimulator.11-arm64": [ - "tvossimulator.11-arm64", - "tvossimulator.11", - "tvossimulator.10-arm64", - "tvossimulator.10", - "tvossimulator-arm64", - "tvossimulator", - "tvos-arm64", - "tvos", - "unix-arm64", - "unix", - "any", - "base" - ], - "tvossimulator.11-x64": [ - "tvossimulator.11-x64", - "tvossimulator.11", - "tvossimulator.10-x64", - "tvossimulator.10", - "tvossimulator-x64", - "tvossimulator", - "tvos-x64", - "tvos", - "unix-x64", - "unix", - "any", - "base" - ], - "tvossimulator.12": [ - "tvossimulator.12", - "tvossimulator.11", - "tvossimulator.10", - "tvossimulator", - "tvos", - "unix", - "any", - "base" - ], - "tvossimulator.12-arm64": [ - "tvossimulator.12-arm64", - "tvossimulator.12", - "tvossimulator.11-arm64", - "tvossimulator.11", - "tvossimulator.10-arm64", - "tvossimulator.10", - "tvossimulator-arm64", - "tvossimulator", - "tvos-arm64", - "tvos", - "unix-arm64", - "unix", - "any", - "base" - ], - "tvossimulator.12-x64": [ - "tvossimulator.12-x64", - "tvossimulator.12", - "tvossimulator.11-x64", - "tvossimulator.11", - "tvossimulator.10-x64", - "tvossimulator.10", - "tvossimulator-x64", - "tvossimulator", - "tvos-x64", - "tvos", - "unix-x64", - "unix", - "any", - "base" - ], - "tvossimulator.13": [ - "tvossimulator.13", - "tvossimulator.12", - "tvossimulator.11", - "tvossimulator.10", - "tvossimulator", - "tvos", - "unix", - "any", - "base" - ], - "tvossimulator.13-arm64": [ - "tvossimulator.13-arm64", - "tvossimulator.13", - "tvossimulator.12-arm64", - "tvossimulator.12", - "tvossimulator.11-arm64", - "tvossimulator.11", - "tvossimulator.10-arm64", - "tvossimulator.10", - "tvossimulator-arm64", - "tvossimulator", - "tvos-arm64", - "tvos", - "unix-arm64", - "unix", - "any", - "base" - ], - "tvossimulator.13-x64": [ - "tvossimulator.13-x64", - "tvossimulator.13", - "tvossimulator.12-x64", - "tvossimulator.12", - "tvossimulator.11-x64", - "tvossimulator.11", - "tvossimulator.10-x64", - "tvossimulator.10", - "tvossimulator-x64", - "tvossimulator", - "tvos-x64", - "tvos", - "unix-x64", - "unix", - "any", - "base" - ], - "tvossimulator.14": [ - "tvossimulator.14", - "tvossimulator.13", - "tvossimulator.12", - "tvossimulator.11", - "tvossimulator.10", - "tvossimulator", - "tvos", - "unix", - "any", - "base" - ], - "tvossimulator.14-arm64": [ - "tvossimulator.14-arm64", - "tvossimulator.14", - "tvossimulator.13-arm64", - "tvossimulator.13", - "tvossimulator.12-arm64", - "tvossimulator.12", - "tvossimulator.11-arm64", - "tvossimulator.11", - "tvossimulator.10-arm64", - "tvossimulator.10", - "tvossimulator-arm64", - "tvossimulator", - "tvos-arm64", - "tvos", - "unix-arm64", - "unix", - "any", - "base" - ], - "tvossimulator.14-x64": [ - "tvossimulator.14-x64", - "tvossimulator.14", - "tvossimulator.13-x64", - "tvossimulator.13", - "tvossimulator.12-x64", - "tvossimulator.12", - "tvossimulator.11-x64", - "tvossimulator.11", - "tvossimulator.10-x64", - "tvossimulator.10", - "tvossimulator-x64", - "tvossimulator", - "tvos-x64", - "tvos", - "unix-x64", - "unix", - "any", - "base" - ], - "tvossimulator.15": [ - "tvossimulator.15", - "tvossimulator.14", - "tvossimulator.13", - "tvossimulator.12", - "tvossimulator.11", - "tvossimulator.10", - "tvossimulator", - "tvos", - "unix", - "any", - "base" - ], - "tvossimulator.15-arm64": [ - "tvossimulator.15-arm64", - "tvossimulator.15", - "tvossimulator.14-arm64", - "tvossimulator.14", - "tvossimulator.13-arm64", - "tvossimulator.13", - "tvossimulator.12-arm64", - "tvossimulator.12", - "tvossimulator.11-arm64", - "tvossimulator.11", - "tvossimulator.10-arm64", - "tvossimulator.10", - "tvossimulator-arm64", - "tvossimulator", - "tvos-arm64", - "tvos", - "unix-arm64", - "unix", - "any", - "base" - ], - "tvossimulator.15-x64": [ - "tvossimulator.15-x64", - "tvossimulator.15", - "tvossimulator.14-x64", - "tvossimulator.14", - "tvossimulator.13-x64", - "tvossimulator.13", - "tvossimulator.12-x64", - "tvossimulator.12", - "tvossimulator.11-x64", - "tvossimulator.11", - "tvossimulator.10-x64", - "tvossimulator.10", - "tvossimulator-x64", - "tvossimulator", - "tvos-x64", - "tvos", - "unix-x64", - "unix", - "any", - "base" - ], - "ubuntu": [ - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "ubuntu-arm": [ - "ubuntu-arm", - "ubuntu", - "debian-arm", - "debian", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "ubuntu-arm64": [ - "ubuntu-arm64", - "ubuntu", - "debian-arm64", - "debian", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "ubuntu-x64": [ - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ubuntu-x86": [ - "ubuntu-x86", - "ubuntu", - "debian-x86", - "debian", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "ubuntu.14.04": [ - "ubuntu.14.04", - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "ubuntu.14.04-arm": [ - "ubuntu.14.04-arm", - "ubuntu.14.04", - "ubuntu-arm", - "ubuntu", - "debian-arm", - "debian", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "ubuntu.14.04-x64": [ - "ubuntu.14.04-x64", - "ubuntu.14.04", - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ubuntu.14.04-x86": [ - "ubuntu.14.04-x86", - "ubuntu.14.04", - "ubuntu-x86", - "ubuntu", - "debian-x86", - "debian", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "ubuntu.14.10": [ - "ubuntu.14.10", - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "ubuntu.14.10-arm": [ - "ubuntu.14.10-arm", - "ubuntu.14.10", - "ubuntu-arm", - "ubuntu", - "debian-arm", - "debian", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "ubuntu.14.10-x64": [ - "ubuntu.14.10-x64", - "ubuntu.14.10", - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ubuntu.14.10-x86": [ - "ubuntu.14.10-x86", - "ubuntu.14.10", - "ubuntu-x86", - "ubuntu", - "debian-x86", - "debian", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "ubuntu.15.04": [ - "ubuntu.15.04", - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "ubuntu.15.04-arm": [ - "ubuntu.15.04-arm", - "ubuntu.15.04", - "ubuntu-arm", - "ubuntu", - "debian-arm", - "debian", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "ubuntu.15.04-x64": [ - "ubuntu.15.04-x64", - "ubuntu.15.04", - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ubuntu.15.04-x86": [ - "ubuntu.15.04-x86", - "ubuntu.15.04", - "ubuntu-x86", - "ubuntu", - "debian-x86", - "debian", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "ubuntu.15.10": [ - "ubuntu.15.10", - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "ubuntu.15.10-arm": [ - "ubuntu.15.10-arm", - "ubuntu.15.10", - "ubuntu-arm", - "ubuntu", - "debian-arm", - "debian", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "ubuntu.15.10-x64": [ - "ubuntu.15.10-x64", - "ubuntu.15.10", - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ubuntu.15.10-x86": [ - "ubuntu.15.10-x86", - "ubuntu.15.10", - "ubuntu-x86", - "ubuntu", - "debian-x86", - "debian", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "ubuntu.16.04": [ - "ubuntu.16.04", - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "ubuntu.16.04-arm": [ - "ubuntu.16.04-arm", - "ubuntu.16.04", - "ubuntu-arm", - "ubuntu", - "debian-arm", - "debian", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "ubuntu.16.04-arm64": [ - "ubuntu.16.04-arm64", - "ubuntu.16.04", - "ubuntu-arm64", - "ubuntu", - "debian-arm64", - "debian", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "ubuntu.16.04-x64": [ - "ubuntu.16.04-x64", - "ubuntu.16.04", - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ubuntu.16.04-x86": [ - "ubuntu.16.04-x86", - "ubuntu.16.04", - "ubuntu-x86", - "ubuntu", - "debian-x86", - "debian", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "ubuntu.16.10": [ - "ubuntu.16.10", - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "ubuntu.16.10-arm": [ - "ubuntu.16.10-arm", - "ubuntu.16.10", - "ubuntu-arm", - "ubuntu", - "debian-arm", - "debian", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "ubuntu.16.10-arm64": [ - "ubuntu.16.10-arm64", - "ubuntu.16.10", - "ubuntu-arm64", - "ubuntu", - "debian-arm64", - "debian", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "ubuntu.16.10-x64": [ - "ubuntu.16.10-x64", - "ubuntu.16.10", - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ubuntu.16.10-x86": [ - "ubuntu.16.10-x86", - "ubuntu.16.10", - "ubuntu-x86", - "ubuntu", - "debian-x86", - "debian", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "ubuntu.17.04": [ - "ubuntu.17.04", - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "ubuntu.17.04-arm": [ - "ubuntu.17.04-arm", - "ubuntu.17.04", - "ubuntu-arm", - "ubuntu", - "debian-arm", - "debian", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "ubuntu.17.04-arm64": [ - "ubuntu.17.04-arm64", - "ubuntu.17.04", - "ubuntu-arm64", - "ubuntu", - "debian-arm64", - "debian", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "ubuntu.17.04-x64": [ - "ubuntu.17.04-x64", - "ubuntu.17.04", - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ubuntu.17.04-x86": [ - "ubuntu.17.04-x86", - "ubuntu.17.04", - "ubuntu-x86", - "ubuntu", - "debian-x86", - "debian", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "ubuntu.17.10": [ - "ubuntu.17.10", - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "ubuntu.17.10-arm": [ - "ubuntu.17.10-arm", - "ubuntu.17.10", - "ubuntu-arm", - "ubuntu", - "debian-arm", - "debian", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "ubuntu.17.10-arm64": [ - "ubuntu.17.10-arm64", - "ubuntu.17.10", - "ubuntu-arm64", - "ubuntu", - "debian-arm64", - "debian", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "ubuntu.17.10-x64": [ - "ubuntu.17.10-x64", - "ubuntu.17.10", - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ubuntu.17.10-x86": [ - "ubuntu.17.10-x86", - "ubuntu.17.10", - "ubuntu-x86", - "ubuntu", - "debian-x86", - "debian", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "ubuntu.18.04": [ - "ubuntu.18.04", - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "ubuntu.18.04-arm": [ - "ubuntu.18.04-arm", - "ubuntu.18.04", - "ubuntu-arm", - "ubuntu", - "debian-arm", - "debian", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "ubuntu.18.04-arm64": [ - "ubuntu.18.04-arm64", - "ubuntu.18.04", - "ubuntu-arm64", - "ubuntu", - "debian-arm64", - "debian", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "ubuntu.18.04-x64": [ - "ubuntu.18.04-x64", - "ubuntu.18.04", - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ubuntu.18.04-x86": [ - "ubuntu.18.04-x86", - "ubuntu.18.04", - "ubuntu-x86", - "ubuntu", - "debian-x86", - "debian", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "ubuntu.18.10": [ - "ubuntu.18.10", - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "ubuntu.18.10-arm": [ - "ubuntu.18.10-arm", - "ubuntu.18.10", - "ubuntu-arm", - "ubuntu", - "debian-arm", - "debian", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "ubuntu.18.10-arm64": [ - "ubuntu.18.10-arm64", - "ubuntu.18.10", - "ubuntu-arm64", - "ubuntu", - "debian-arm64", - "debian", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "ubuntu.18.10-x64": [ - "ubuntu.18.10-x64", - "ubuntu.18.10", - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ubuntu.18.10-x86": [ - "ubuntu.18.10-x86", - "ubuntu.18.10", - "ubuntu-x86", - "ubuntu", - "debian-x86", - "debian", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "ubuntu.19.04": [ - "ubuntu.19.04", - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "ubuntu.19.04-arm": [ - "ubuntu.19.04-arm", - "ubuntu.19.04", - "ubuntu-arm", - "ubuntu", - "debian-arm", - "debian", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "ubuntu.19.04-arm64": [ - "ubuntu.19.04-arm64", - "ubuntu.19.04", - "ubuntu-arm64", - "ubuntu", - "debian-arm64", - "debian", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "ubuntu.19.04-x64": [ - "ubuntu.19.04-x64", - "ubuntu.19.04", - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ubuntu.19.04-x86": [ - "ubuntu.19.04-x86", - "ubuntu.19.04", - "ubuntu-x86", - "ubuntu", - "debian-x86", - "debian", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "ubuntu.19.10": [ - "ubuntu.19.10", - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "ubuntu.19.10-arm": [ - "ubuntu.19.10-arm", - "ubuntu.19.10", - "ubuntu-arm", - "ubuntu", - "debian-arm", - "debian", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "ubuntu.19.10-arm64": [ - "ubuntu.19.10-arm64", - "ubuntu.19.10", - "ubuntu-arm64", - "ubuntu", - "debian-arm64", - "debian", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "ubuntu.19.10-x64": [ - "ubuntu.19.10-x64", - "ubuntu.19.10", - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ubuntu.19.10-x86": [ - "ubuntu.19.10-x86", - "ubuntu.19.10", - "ubuntu-x86", - "ubuntu", - "debian-x86", - "debian", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "ubuntu.20.04": [ - "ubuntu.20.04", - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "ubuntu.20.04-arm": [ - "ubuntu.20.04-arm", - "ubuntu.20.04", - "ubuntu-arm", - "ubuntu", - "debian-arm", - "debian", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "ubuntu.20.04-arm64": [ - "ubuntu.20.04-arm64", - "ubuntu.20.04", - "ubuntu-arm64", - "ubuntu", - "debian-arm64", - "debian", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "ubuntu.20.04-x64": [ - "ubuntu.20.04-x64", - "ubuntu.20.04", - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ubuntu.20.04-x86": [ - "ubuntu.20.04-x86", - "ubuntu.20.04", - "ubuntu-x86", - "ubuntu", - "debian-x86", - "debian", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "ubuntu.20.10": [ - "ubuntu.20.10", - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "ubuntu.20.10-arm": [ - "ubuntu.20.10-arm", - "ubuntu.20.10", - "ubuntu-arm", - "ubuntu", - "debian-arm", - "debian", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "ubuntu.20.10-arm64": [ - "ubuntu.20.10-arm64", - "ubuntu.20.10", - "ubuntu-arm64", - "ubuntu", - "debian-arm64", - "debian", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "ubuntu.20.10-x64": [ - "ubuntu.20.10-x64", - "ubuntu.20.10", - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ubuntu.20.10-x86": [ - "ubuntu.20.10-x86", - "ubuntu.20.10", - "ubuntu-x86", - "ubuntu", - "debian-x86", - "debian", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "ubuntu.21.04": [ - "ubuntu.21.04", - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "ubuntu.21.04-arm": [ - "ubuntu.21.04-arm", - "ubuntu.21.04", - "ubuntu-arm", - "ubuntu", - "debian-arm", - "debian", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "ubuntu.21.04-arm64": [ - "ubuntu.21.04-arm64", - "ubuntu.21.04", - "ubuntu-arm64", - "ubuntu", - "debian-arm64", - "debian", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "ubuntu.21.04-x64": [ - "ubuntu.21.04-x64", - "ubuntu.21.04", - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ubuntu.21.04-x86": [ - "ubuntu.21.04-x86", - "ubuntu.21.04", - "ubuntu-x86", - "ubuntu", - "debian-x86", - "debian", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "ubuntu.21.10": [ - "ubuntu.21.10", - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "ubuntu.21.10-arm": [ - "ubuntu.21.10-arm", - "ubuntu.21.10", - "ubuntu-arm", - "ubuntu", - "debian-arm", - "debian", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "ubuntu.21.10-arm64": [ - "ubuntu.21.10-arm64", - "ubuntu.21.10", - "ubuntu-arm64", - "ubuntu", - "debian-arm64", - "debian", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "ubuntu.21.10-x64": [ - "ubuntu.21.10-x64", - "ubuntu.21.10", - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ubuntu.21.10-x86": [ - "ubuntu.21.10-x86", - "ubuntu.21.10", - "ubuntu-x86", - "ubuntu", - "debian-x86", - "debian", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "ubuntu.22.04": [ - "ubuntu.22.04", - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "ubuntu.22.04-arm": [ - "ubuntu.22.04-arm", - "ubuntu.22.04", - "ubuntu-arm", - "ubuntu", - "debian-arm", - "debian", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "ubuntu.22.04-arm64": [ - "ubuntu.22.04-arm64", - "ubuntu.22.04", - "ubuntu-arm64", - "ubuntu", - "debian-arm64", - "debian", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "ubuntu.22.04-x64": [ - "ubuntu.22.04-x64", - "ubuntu.22.04", - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ubuntu.22.04-x86": [ - "ubuntu.22.04-x86", - "ubuntu.22.04", - "ubuntu-x86", - "ubuntu", - "debian-x86", - "debian", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "ubuntu.22.10": [ - "ubuntu.22.10", - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "ubuntu.22.10-arm": [ - "ubuntu.22.10-arm", - "ubuntu.22.10", - "ubuntu-arm", - "ubuntu", - "debian-arm", - "debian", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "ubuntu.22.10-arm64": [ - "ubuntu.22.10-arm64", - "ubuntu.22.10", - "ubuntu-arm64", - "ubuntu", - "debian-arm64", - "debian", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "ubuntu.22.10-x64": [ - "ubuntu.22.10-x64", - "ubuntu.22.10", - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ubuntu.22.10-x86": [ - "ubuntu.22.10-x86", - "ubuntu.22.10", - "ubuntu-x86", - "ubuntu", - "debian-x86", - "debian", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "ubuntu.23.04": [ - "ubuntu.23.04", - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "ubuntu.23.04-arm": [ - "ubuntu.23.04-arm", - "ubuntu.23.04", - "ubuntu-arm", - "ubuntu", - "debian-arm", - "debian", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "ubuntu.23.04-arm64": [ - "ubuntu.23.04-arm64", - "ubuntu.23.04", - "ubuntu-arm64", - "ubuntu", - "debian-arm64", - "debian", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "ubuntu.23.04-x64": [ - "ubuntu.23.04-x64", - "ubuntu.23.04", - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ubuntu.23.04-x86": [ - "ubuntu.23.04-x86", - "ubuntu.23.04", - "ubuntu-x86", - "ubuntu", - "debian-x86", - "debian", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "ubuntu.23.10": [ - "ubuntu.23.10", - "ubuntu", - "debian", - "linux", - "unix", - "any", - "base" - ], - "ubuntu.23.10-arm": [ - "ubuntu.23.10-arm", - "ubuntu.23.10", - "ubuntu-arm", - "ubuntu", - "debian-arm", - "debian", - "linux-arm", - "linux", - "unix-arm", - "unix", - "any", - "base" - ], - "ubuntu.23.10-arm64": [ - "ubuntu.23.10-arm64", - "ubuntu.23.10", - "ubuntu-arm64", - "ubuntu", - "debian-arm64", - "debian", - "linux-arm64", - "linux", - "unix-arm64", - "unix", - "any", - "base" - ], - "ubuntu.23.10-x64": [ - "ubuntu.23.10-x64", - "ubuntu.23.10", - "ubuntu-x64", - "ubuntu", - "debian-x64", - "debian", - "linux-x64", - "linux", - "unix-x64", - "unix", - "any", - "base" - ], - "ubuntu.23.10-x86": [ - "ubuntu.23.10-x86", - "ubuntu.23.10", - "ubuntu-x86", - "ubuntu", - "debian-x86", - "debian", - "linux-x86", - "linux", - "unix-x86", - "unix", - "any", - "base" - ], - "unix": [ - "unix", - "any", - "base" - ], - "unix-arm": [ - "unix-arm", - "unix", - "any", - "base" - ], - "unix-arm64": [ - "unix-arm64", - "unix", - "any", - "base" - ], - "unix-armel": [ - "unix-armel", - "unix", - "any", - "base" - ], - "unix-armv6": [ - "unix-armv6", - "unix", - "any", - "base" - ], - "unix-loongarch64": [ - "unix-loongarch64", - "unix", - "any", - "base" - ], - "unix-mips64": [ - "unix-mips64", - "unix", - "any", - "base" - ], - "unix-ppc64le": [ - "unix-ppc64le", - "unix", - "any", - "base" - ], - "unix-riscv64": [ - "unix-riscv64", - "unix", - "any", - "base" - ], - "unix-s390x": [ - "unix-s390x", - "unix", - "any", - "base" - ], - "unix-x64": [ - "unix-x64", - "unix", - "any", - "base" - ], - "unix-x86": [ - "unix-x86", - "unix", - "any", - "base" - ], - "wasi": [ - "wasi", - "any", - "base" - ], - "wasi-wasm": [ - "wasi-wasm", - "wasi", - "any", - "base" - ], - "win": [ - "win", - "any", - "base" - ], - "win-aot": [ - "win-aot", - "win", - "aot", - "any", - "base" - ], - "win-arm": [ - "win-arm", - "win", - "any", - "base" - ], - "win-arm-aot": [ - "win-arm-aot", - "win-aot", - "win-arm", - "win", - "aot", - "any", - "base" - ], - "win-arm64": [ - "win-arm64", - "win", - "any", - "base" - ], - "win-arm64-aot": [ - "win-arm64-aot", - "win-aot", - "win-arm64", - "win", - "aot", - "any", - "base" - ], - "win-x64": [ - "win-x64", - "win", - "any", - "base" - ], - "win-x64-aot": [ - "win-x64-aot", - "win-aot", - "win-x64", - "win", - "aot", - "any", - "base" - ], - "win-x86": [ - "win-x86", - "win", - "any", - "base" - ], - "win-x86-aot": [ - "win-x86-aot", - "win-aot", - "win-x86", - "win", - "aot", - "any", - "base" - ], - "win10": [ - "win10", - "win81", - "win8", - "win7", - "win", - "any", - "base" - ], - "win10-aot": [ - "win10-aot", - "win10", - "win81-aot", - "win81", - "win8-aot", - "win8", - "win7-aot", - "win7", - "win-aot", - "win", - "aot", - "any", - "base" - ], - "win10-arm": [ - "win10-arm", - "win10", - "win81-arm", - "win81", - "win8-arm", - "win8", - "win7-arm", - "win7", - "win-arm", - "win", - "any", - "base" - ], - "win10-arm-aot": [ - "win10-arm-aot", - "win10-aot", - "win10-arm", - "win10", - "win81-arm-aot", - "win81-aot", - "win81-arm", - "win81", - "win8-arm-aot", - "win8-aot", - "win8-arm", - "win8", - "win7-arm-aot", - "win7-aot", - "win7-arm", - "win7", - "win-arm-aot", - "win-aot", - "win-arm", - "win", - "aot", - "any", - "base" - ], - "win10-arm64": [ - "win10-arm64", - "win10", - "win81-arm64", - "win81", - "win8-arm64", - "win8", - "win7-arm64", - "win7", - "win-arm64", - "win", - "any", - "base" - ], - "win10-arm64-aot": [ - "win10-arm64-aot", - "win10-aot", - "win10-arm64", - "win10", - "win81-arm64-aot", - "win81-aot", - "win81-arm64", - "win81", - "win8-arm64-aot", - "win8-aot", - "win8-arm64", - "win8", - "win7-arm64-aot", - "win7-aot", - "win7-arm64", - "win7", - "win-arm64-aot", - "win-aot", - "win-arm64", - "win", - "aot", - "any", - "base" - ], - "win10-x64": [ - "win10-x64", - "win10", - "win81-x64", - "win81", - "win8-x64", - "win8", - "win7-x64", - "win7", - "win-x64", - "win", - "any", - "base" - ], - "win10-x64-aot": [ - "win10-x64-aot", - "win10-aot", - "win10-x64", - "win10", - "win81-x64-aot", - "win81-aot", - "win81-x64", - "win81", - "win8-x64-aot", - "win8-aot", - "win8-x64", - "win8", - "win7-x64-aot", - "win7-aot", - "win7-x64", - "win7", - "win-x64-aot", - "win-aot", - "win-x64", - "win", - "aot", - "any", - "base" - ], - "win10-x86": [ - "win10-x86", - "win10", - "win81-x86", - "win81", - "win8-x86", - "win8", - "win7-x86", - "win7", - "win-x86", - "win", - "any", - "base" - ], - "win10-x86-aot": [ - "win10-x86-aot", - "win10-aot", - "win10-x86", - "win10", - "win81-x86-aot", - "win81-aot", - "win81-x86", - "win81", - "win8-x86-aot", - "win8-aot", - "win8-x86", - "win8", - "win7-x86-aot", - "win7-aot", - "win7-x86", - "win7", - "win-x86-aot", - "win-aot", - "win-x86", - "win", - "aot", - "any", - "base" - ], - "win7": [ - "win7", - "win", - "any", - "base" - ], - "win7-aot": [ - "win7-aot", - "win7", - "win-aot", - "win", - "aot", - "any", - "base" - ], - "win7-arm": [ - "win7-arm", - "win7", - "win-arm", - "win", - "any", - "base" - ], - "win7-arm-aot": [ - "win7-arm-aot", - "win7-aot", - "win7-arm", - "win7", - "win-arm-aot", - "win-aot", - "win-arm", - "win", - "aot", - "any", - "base" - ], - "win7-arm64": [ - "win7-arm64", - "win7", - "win-arm64", - "win", - "any", - "base" - ], - "win7-arm64-aot": [ - "win7-arm64-aot", - "win7-aot", - "win7-arm64", - "win7", - "win-arm64-aot", - "win-aot", - "win-arm64", - "win", - "aot", - "any", - "base" - ], - "win7-x64": [ - "win7-x64", - "win7", - "win-x64", - "win", - "any", - "base" - ], - "win7-x64-aot": [ - "win7-x64-aot", - "win7-aot", - "win7-x64", - "win7", - "win-x64-aot", - "win-aot", - "win-x64", - "win", - "aot", - "any", - "base" - ], - "win7-x86": [ - "win7-x86", - "win7", - "win-x86", - "win", - "any", - "base" - ], - "win7-x86-aot": [ - "win7-x86-aot", - "win7-aot", - "win7-x86", - "win7", - "win-x86-aot", - "win-aot", - "win-x86", - "win", - "aot", - "any", - "base" - ], - "win8": [ - "win8", - "win7", - "win", - "any", - "base" - ], - "win8-aot": [ - "win8-aot", - "win8", - "win7-aot", - "win7", - "win-aot", - "win", - "aot", - "any", - "base" - ], - "win8-arm": [ - "win8-arm", - "win8", - "win7-arm", - "win7", - "win-arm", - "win", - "any", - "base" - ], - "win8-arm-aot": [ - "win8-arm-aot", - "win8-aot", - "win8-arm", - "win8", - "win7-arm-aot", - "win7-aot", - "win7-arm", - "win7", - "win-arm-aot", - "win-aot", - "win-arm", - "win", - "aot", - "any", - "base" - ], - "win8-arm64": [ - "win8-arm64", - "win8", - "win7-arm64", - "win7", - "win-arm64", - "win", - "any", - "base" - ], - "win8-arm64-aot": [ - "win8-arm64-aot", - "win8-aot", - "win8-arm64", - "win8", - "win7-arm64-aot", - "win7-aot", - "win7-arm64", - "win7", - "win-arm64-aot", - "win-aot", - "win-arm64", - "win", - "aot", - "any", - "base" - ], - "win8-x64": [ - "win8-x64", - "win8", - "win7-x64", - "win7", - "win-x64", - "win", - "any", - "base" - ], - "win8-x64-aot": [ - "win8-x64-aot", - "win8-aot", - "win8-x64", - "win8", - "win7-x64-aot", - "win7-aot", - "win7-x64", - "win7", - "win-x64-aot", - "win-aot", - "win-x64", - "win", - "aot", - "any", - "base" - ], - "win8-x86": [ - "win8-x86", - "win8", - "win7-x86", - "win7", - "win-x86", - "win", - "any", - "base" - ], - "win8-x86-aot": [ - "win8-x86-aot", - "win8-aot", - "win8-x86", - "win8", - "win7-x86-aot", - "win7-aot", - "win7-x86", - "win7", - "win-x86-aot", - "win-aot", - "win-x86", - "win", - "aot", - "any", - "base" - ], - "win81": [ - "win81", - "win8", - "win7", - "win", - "any", - "base" - ], - "win81-aot": [ - "win81-aot", - "win81", - "win8-aot", - "win8", - "win7-aot", - "win7", - "win-aot", - "win", - "aot", - "any", - "base" - ], - "win81-arm": [ - "win81-arm", - "win81", - "win8-arm", - "win8", - "win7-arm", - "win7", - "win-arm", - "win", - "any", - "base" - ], - "win81-arm-aot": [ - "win81-arm-aot", - "win81-aot", - "win81-arm", - "win81", - "win8-arm-aot", - "win8-aot", - "win8-arm", - "win8", - "win7-arm-aot", - "win7-aot", - "win7-arm", - "win7", - "win-arm-aot", - "win-aot", - "win-arm", - "win", - "aot", - "any", - "base" - ], - "win81-arm64": [ - "win81-arm64", - "win81", - "win8-arm64", - "win8", - "win7-arm64", - "win7", - "win-arm64", - "win", - "any", - "base" - ], - "win81-arm64-aot": [ - "win81-arm64-aot", - "win81-aot", - "win81-arm64", - "win81", - "win8-arm64-aot", - "win8-aot", - "win8-arm64", - "win8", - "win7-arm64-aot", - "win7-aot", - "win7-arm64", - "win7", - "win-arm64-aot", - "win-aot", - "win-arm64", - "win", - "aot", - "any", - "base" - ], - "win81-x64": [ - "win81-x64", - "win81", - "win8-x64", - "win8", - "win7-x64", - "win7", - "win-x64", - "win", - "any", - "base" - ], - "win81-x64-aot": [ - "win81-x64-aot", - "win81-aot", - "win81-x64", - "win81", - "win8-x64-aot", - "win8-aot", - "win8-x64", - "win8", - "win7-x64-aot", - "win7-aot", - "win7-x64", - "win7", - "win-x64-aot", - "win-aot", - "win-x64", - "win", - "aot", - "any", - "base" - ], - "win81-x86": [ - "win81-x86", - "win81", - "win8-x86", - "win8", - "win7-x86", - "win7", - "win-x86", - "win", - "any", - "base" - ], - "win81-x86-aot": [ - "win81-x86-aot", - "win81-aot", - "win81-x86", - "win81", - "win8-x86-aot", - "win8-aot", - "win8-x86", - "win8", - "win7-x86-aot", - "win7-aot", - "win7-x86", - "win7", - "win-x86-aot", - "win-aot", - "win-x86", - "win", - "aot", - "any", - "base" - ] -} \ No newline at end of file diff --git a/src/libraries/Microsoft.NETCore.Platforms/src/runtimeGroups.props b/src/libraries/Microsoft.NETCore.Platforms/src/runtimeGroups.props deleted file mode 100644 index 05bdf782326b58..00000000000000 --- a/src/libraries/Microsoft.NETCore.Platforms/src/runtimeGroups.props +++ /dev/null @@ -1,296 +0,0 @@ - - - - - any - x64;x86;arm;armv6;armel;arm64;loongarch64;mips64;s390x;ppc64le;riscv64 - - - unix - x64;x86;arm;armv6;armel;arm64;loongarch64;mips64;s390x;ppc64le;riscv64 - - - linux - x64;x86;arm;armv6;armel;arm64;s390x;ppc64le;riscv64 - - - - linux-musl - x64;x86;arm;armv6;arm64;s390x;ppc64le - 3.6;3.7;3.8;3.9;3.10;3.11;3.12;3.13;3.14;3.15;3.16;3.17;3.18 - - - - linux - x64;x86;arm;arm64 - - - linux-bionic - x64;x86;arm;arm64 - 21;22;23;24;25;26;27;28;29;30;31;32 - - - - linux - x64 - - - - arch - x64 - - - - any - wasm - - - - any - wasm - - - - ios - x64;arm64 - 13;14;15 - - - - rhel - x64 - 7 - true - false - - - rhel - x64;arm64 - 8;9 - true - false - - - - linux - x64;x86;arm;armel;arm64 - 8;9;10;11;12 - false - - - - linux - x64 - - - - linux - x64;arm64 - 23;24;25;26;27;28;29;30;31;32;33;34;35;36;37;38;39 - false - - - - linux - x64 - - - - unix - arm;x86 - 10 - - - unix - arm64;x64 - 10;11;12;13;14;15 - - - - ios - x86 - 10 - - - ios - arm64;x64 - 10;11;12;13;14;15 - - - - unix - arm64;x64 - 10;11;12;13;14;15 - - - - tvos - arm64;x64 - 10;11;12;13;14;15 - - - - - ubuntu.14.04 - x64 - 1;2;3 - - - ubuntu.16.04 - x64 - 1;2;3 - - - ubuntu.18.04 - x64 - 1;2 - - - - rhel - x64 - 8;9 - true - false - - - - rhel - x64 - 7;7.0;7.1;7.2;7.3;7.4;7.5;7.6 - true - - - rhel - x64 - 8;8.0 - true - - - - - linux - x64 - 13.2;15.0;15.1;42.1;42.2;42.3 - false - - - - unix - x64;arm64 - 10.10;10.11;10.12;10.13;10.14;10.15;10.16;11.0;12;13 - - - - unix - x64;arm64 - 12;13 - - - - unix - x64 - 11 - - - - unix - x64 - - - - illumos - x64 - 15 - - - - illumos - x64 - - - - illumos - x64 - 2020;2021 - - - - - linux - x64 - 6 - - - - linux - x64 - 7;7.0;7.1;7.2;7.3;7.4;7.5;7.6 - - - linux - x64;arm64 - 8;8.0;8.1 - - - linux - x64;arm64 - 9 - - - - rhel - x64;arm64 - 8;9 - true - false - - - - linux - x64 - 12;12.1;12.2;12.3;12.4;15;15.1 - - - - linux - x86;armel;arm64 - 4.0.0;5.0.0;5.5.0;6.0.0;6.5.0;7.0.0 - - - - debian - x64;x86;arm - 14.04;14.10;15.04;15.10 - false - - - debian - x64;x86;arm;arm64 - 16.04;16.10;17.04;17.10;18.04;18.10;19.04;19.10;20.04;20.10;21.04;21.10;22.04;22.10;23.04;23.10 - false - - - - any - true - aot - x64;x86;arm;arm64 - 7;8;81;10 - - - - - - - - base - - - - - any - - - - diff --git a/src/libraries/Microsoft.NETCore.Platforms/tests/GenerateRuntimeGraphTests.cs b/src/libraries/Microsoft.NETCore.Platforms/tests/GenerateRuntimeGraphTests.cs deleted file mode 100644 index 63e83a819bd81e..00000000000000 --- a/src/libraries/Microsoft.NETCore.Platforms/tests/GenerateRuntimeGraphTests.cs +++ /dev/null @@ -1,264 +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.IO; -using System.Linq; -using System.Runtime.CompilerServices; -using Microsoft.Build.Evaluation; -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using NuGet.RuntimeModel; -using Xunit; -using Xunit.Abstractions; - -namespace Microsoft.NETCore.Platforms.BuildTasks.Tests -{ - // MSBuild engine is not compatible with single file - [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.HasAssemblyFiles))] - public class GenerateRuntimeGraphTests - { - private Log _log; - private TestBuildEngine _engine; - - private string defaultRootPath = (PlatformDetection.IsiOS || PlatformDetection.IstvOS) ? Path.GetTempPath() : string.Empty; - private string defaultRuntimeFile = "runtime.json"; - - public GenerateRuntimeGraphTests(ITestOutputHelper output) - { - _log = new Log(output); - _engine = new TestBuildEngine(_log); - - if (PlatformDetection.IsiOS || PlatformDetection.IstvOS) - { - var runtimeJsonPath = Path.Combine(defaultRootPath, defaultRuntimeFile); - File.Copy(defaultRuntimeFile, runtimeJsonPath, true); - - defaultRuntimeFile = runtimeJsonPath; - } - } - - private static ITaskItem[] DefaultRuntimeGroupItems { get; } = GetDefaultRuntimeGroupItems(); - - private static ITaskItem[] GetDefaultRuntimeGroupItems() - { - Project runtimeGroupProps = new Project("runtimeGroups.props"); - - ITaskItem[] runtimeGroups = runtimeGroupProps.GetItems("RuntimeGroupWithQualifiers") - .Select(i => CreateItem(i)).ToArray(); - - Assert.NotEmpty(runtimeGroups); - - return runtimeGroups; - } - - private static ITaskItem CreateItem(ProjectItem projectItem) - { - TaskItem item = new TaskItem(projectItem.EvaluatedInclude); - foreach (var metadatum in projectItem.Metadata) - { - item.SetMetadata(metadatum.Name, metadatum.EvaluatedValue); - } - return item; - } - - [Fact] - [ActiveIssue("https://github.com/dotnet/runtime/issues/77889", TestPlatforms.iOS | TestPlatforms.tvOS)] - public void CanCreateRuntimeGraph() - { - // will generate and compare to existing file. - GenerateRuntimeGraph task = new GenerateRuntimeGraph() - { - BuildEngine = _engine, - RuntimeGroups = DefaultRuntimeGroupItems, - RuntimeJson = defaultRuntimeFile, - UpdateRuntimeFiles = false - }; - task.Execute(); - - _log.AssertNoErrorsOrWarnings(); - } - - - [Fact] - [ActiveIssue("https://github.com/dotnet/runtime/issues/77889", TestPlatforms.iOS | TestPlatforms.tvOS)] - public void CanIgnoreExistingInferRids() - { - // will generate and compare to existing file. - GenerateRuntimeGraph task = new GenerateRuntimeGraph() - { - BuildEngine = _engine, - RuntimeGroups = DefaultRuntimeGroupItems, - RuntimeJson = defaultRuntimeFile, - AdditionalRuntimeIdentifiers = new[] { "rhel.9-x64", "centos.9-arm64", "win-x64" }, - UpdateRuntimeFiles = false - }; - - _log.Reset(); - task.Execute(); - _log.AssertNoErrorsOrWarnings(); - } - - /// - /// Runs GenerateRuntimeGraph task specifying AdditionalRuntimeIdentifiers then asserts that the - /// generated runtime.json has the expected additions (and no more). - /// - /// additional RIDs - /// entries that are expected to be added to the RuntimeGraph - /// parent to use when adding a new RID - /// a unique prefix to use for the generated - private void AssertRuntimeGraphAdditions(string[] additionalRIDs, RuntimeDescription[] expectedAdditions, string additionalRIDParent = null, [CallerMemberName] string runtimeFilePrefix = null) - { - string runtimeFile = Path.Combine(defaultRootPath, runtimeFilePrefix + ".runtime.json"); - - GenerateRuntimeGraph task = new GenerateRuntimeGraph() - { - BuildEngine = _engine, - RuntimeGroups = DefaultRuntimeGroupItems, - RuntimeJson = runtimeFile, - AdditionalRuntimeIdentifiers = additionalRIDs, - AdditionalRuntimeIdentifierParent = additionalRIDParent, - UpdateRuntimeFiles = true - }; - - _log.Reset(); - task.Execute(); - _log.AssertNoErrorsOrWarnings(); - - RuntimeGraph expected = RuntimeGraph.Merge( - JsonRuntimeFormat.ReadRuntimeGraph(defaultRuntimeFile), - new RuntimeGraph(expectedAdditions)); - - RuntimeGraph actual = JsonRuntimeFormat.ReadRuntimeGraph(runtimeFile); - - // Should this assert fail, it's helpful to diff defaultRuntimeFile and runtimeFile to see the additions. - Assert.Equal(expected, actual); - } - - [Fact] - [ActiveIssue("https://github.com/dotnet/runtime/issues/77889", TestPlatforms.iOS | TestPlatforms.tvOS)] - public void CanAddVersionsToExistingGroups() - { - var additionalRIDs = new[] { "ubuntu.22.04-arm64" }; - var expectedAdditions = new[] - { - new RuntimeDescription("ubuntu.22.04", new[] { "ubuntu" }), - new RuntimeDescription("ubuntu.22.04-x64", new[] { "ubuntu.22.04", "ubuntu-x64" }), - new RuntimeDescription("ubuntu.22.04-x86", new[] { "ubuntu.22.04", "ubuntu-x86" }), - new RuntimeDescription("ubuntu.22.04-arm", new[] { "ubuntu.22.04", "ubuntu-arm" }), - new RuntimeDescription("ubuntu.22.04-arm64", new[] { "ubuntu.22.04", "ubuntu-arm64" }) - }; - - AssertRuntimeGraphAdditions(additionalRIDs, expectedAdditions); - } - - [Fact] - [ActiveIssue("https://github.com/dotnet/runtime/issues/77889", TestPlatforms.iOS | TestPlatforms.tvOS)] - public void CanAddParentVersionsToExistingGroups() - { - var additionalRIDs = new[] { "centos.9.2-arm64" }; - var expectedAdditions = new[] - { - new RuntimeDescription("centos.9.2", new[] { "centos", "rhel.9.2" }), - new RuntimeDescription("centos.9.2-x64", new[] { "centos.9.2", "centos-x64", "rhel.9.2-x64" }), - new RuntimeDescription("centos.9.2-arm64", new[] { "centos.9.2", "centos-arm64", "rhel.9.2-arm64" }), - - // rhel RIDs are implicitly created since centos imports versioned RHEL RIDs - new RuntimeDescription("rhel.9.2", new[] { "rhel.9" }), - new RuntimeDescription("rhel.9.2-x64", new[] { "rhel.9.2", "rhel.9-x64" }), - new RuntimeDescription("rhel.9.2-arm64", new[] { "rhel.9.2", "rhel.9-arm64" }) - }; - - AssertRuntimeGraphAdditions(additionalRIDs, expectedAdditions); - } - - [Fact] - [ActiveIssue("https://github.com/dotnet/runtime/issues/77889", TestPlatforms.iOS | TestPlatforms.tvOS)] - public void CanAddMajorVersionsToExistingGroups() - { - - var additionalRIDs = new[] { "rhel.10-x64" }; - var expectedAdditions = new[] - { - // Note that rhel doesn't treat major versions as compatible, however we do since it's closest and we don't represent this policy in the RuntimeGroups explicitly. - // We could add a rule that wouldn't insert a new major version if we see existing groups are split by major version. - new RuntimeDescription("rhel.10", new[] { "rhel.9" }), - new RuntimeDescription("rhel.10-x64", new[] { "rhel.10", "rhel.9-x64" }), - new RuntimeDescription("rhel.10-arm64", new[] { "rhel.10", "rhel.9-arm64" }) - }; - - AssertRuntimeGraphAdditions(additionalRIDs, expectedAdditions); - } - - [Fact] - [ActiveIssue("https://github.com/dotnet/runtime/issues/77889", TestPlatforms.iOS | TestPlatforms.tvOS)] - public void CanAddArchitectureToExistingGroups() - { - var additionalRIDs = new[] { "win10-x128" }; - var expectedAdditions = new[] - { - new RuntimeDescription("win10-x128", new[] { "win10", "win81-x128" }), - new RuntimeDescription("win10-x128-aot", new[] { "win10-aot", "win10-x128", "win10", "win81-x128-aot" }), - new RuntimeDescription("win81-x128-aot", new[] { "win81-aot", "win81-x128", "win81", "win8-x128-aot" }), - new RuntimeDescription("win81-x128", new[] { "win81", "win8-x128" }), - new RuntimeDescription("win8-x128-aot", new[] { "win8-aot", "win8-x128", "win8", "win7-x128-aot" }), - new RuntimeDescription("win8-x128", new[] { "win8", "win7-x128" }), - new RuntimeDescription("win7-x128-aot", new[] { "win7-aot", "win7-x128", "win7", "win-x128-aot" }), - new RuntimeDescription("win7-x128", new[] { "win7", "win-x128" }), - new RuntimeDescription("win-x128-aot", new[] { "win-aot", "win-x128" }), - new RuntimeDescription("win-x128", new[] { "win" }) - }; - - AssertRuntimeGraphAdditions(additionalRIDs, expectedAdditions); - } - - - [Fact] - [ActiveIssue("https://github.com/dotnet/runtime/issues/77889", TestPlatforms.iOS | TestPlatforms.tvOS)] - public void CanAddArchitectureAndVersionToExistingGroups() - { - var additionalRIDs = new[] { "osx.13-powerpc" }; - var expectedAdditions = new[] - { - new RuntimeDescription("osx.13-powerpc", new[] { "osx.13", "osx.12-powerpc" }), - new RuntimeDescription("osx.13-arm64", new[] { "osx.13", "osx.12-arm64" }), - new RuntimeDescription("osx.13-x64", new[] { "osx.13", "osx.12-x64" }), - new RuntimeDescription("osx.13", new[] { "osx.12" }), - // our RID model doesn't give priority to architecture, so the new architecture is applied to all past versions - new RuntimeDescription("osx.12-powerpc", new[] { "osx.12", "osx.11.0-powerpc" }), - new RuntimeDescription("osx.11.0-powerpc", new[] { "osx.11.0", "osx.10.16-powerpc" }), - new RuntimeDescription("osx.10.16-powerpc", new[] { "osx.10.16", "osx.10.15-powerpc" }), - new RuntimeDescription("osx.10.15-powerpc", new[] { "osx.10.15", "osx.10.14-powerpc" }), - new RuntimeDescription("osx.10.14-powerpc", new[] { "osx.10.14", "osx.10.13-powerpc" }), - new RuntimeDescription("osx.10.13-powerpc", new[] { "osx.10.13", "osx.10.12-powerpc" }), - new RuntimeDescription("osx.10.12-powerpc", new[] { "osx.10.12", "osx.10.11-powerpc" }), - new RuntimeDescription("osx.10.11-powerpc", new[] { "osx.10.11", "osx.10.10-powerpc" }), - new RuntimeDescription("osx.10.10-powerpc", new[] { "osx.10.10", "osx-powerpc" }), - new RuntimeDescription("unix-powerpc", new[] { "unix" }), - new RuntimeDescription("osx-powerpc", new[] { "osx", "unix-powerpc" }), - }; - - AssertRuntimeGraphAdditions(additionalRIDs, expectedAdditions); - } - - [Fact] - [ActiveIssue("https://github.com/dotnet/runtime/issues/77889", TestPlatforms.iOS | TestPlatforms.tvOS)] - public void CanAddNewGroups() - { - var additionalRIDs = new[] { "yolinux.42.0-quantum" }; - var expectedAdditions = new[] - { - new RuntimeDescription("unix-quantum", new[] { "unix" }), - new RuntimeDescription("linux-quantum", new[] { "linux", "unix-quantum" }), - new RuntimeDescription("linux-musl-quantum", new[] { "linux-musl", "linux-quantum" }), - new RuntimeDescription("yolinux", new[] { "linux-musl" }), - new RuntimeDescription("yolinux-quantum", new[] { "yolinux", "linux-musl-quantum" }), - new RuntimeDescription("yolinux.42.0", new[] { "yolinux" }), - new RuntimeDescription("yolinux.42.0-quantum", new[] { "yolinux.42.0", "yolinux-quantum" }) - }; - - AssertRuntimeGraphAdditions(additionalRIDs, expectedAdditions, "linux-musl"); - } - - } -} diff --git a/src/libraries/Microsoft.NETCore.Platforms/tests/Log.cs b/src/libraries/Microsoft.NETCore.Platforms/tests/Log.cs deleted file mode 100644 index d1e7368ec0882b..00000000000000 --- a/src/libraries/Microsoft.NETCore.Platforms/tests/Log.cs +++ /dev/null @@ -1,56 +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 Xunit; -using Xunit.Abstractions; - -namespace Microsoft.NETCore.Platforms.BuildTasks.Tests -{ - internal class Log : ILog - { - private readonly ITestOutputHelper _output; - - public Log(ITestOutputHelper output) - { - _output = output; - Reset(); - } - - public int ErrorsLogged { get; set; } - public int WarningsLogged { get; set; } - - public void LogError(string message, params object[] messageArgs) - { - ErrorsLogged++; - _output.WriteLine("Error: " + message, messageArgs); - } - - public void LogMessage(string message, params object[] messageArgs) - { - _output.WriteLine(message, messageArgs); - } - - public void LogMessage(LogImportance importance, string message, params object[] messageArgs) - { - _output.WriteLine(message, messageArgs); - } - - public void LogWarning(string message, params object[] messageArgs) - { - WarningsLogged++; - _output.WriteLine("Warning: " + message, messageArgs); - } - - public void Reset() - { - ErrorsLogged = 0; - WarningsLogged = 0; - } - - public void AssertNoErrorsOrWarnings() - { - Assert.Equal(0, ErrorsLogged); - Assert.Equal(0, WarningsLogged); - } - } -} diff --git a/src/libraries/Microsoft.NETCore.Platforms/tests/Microsoft.NETCore.Platforms.Tests.csproj b/src/libraries/Microsoft.NETCore.Platforms/tests/Microsoft.NETCore.Platforms.Tests.csproj deleted file mode 100644 index d4b11af0a96d6a..00000000000000 --- a/src/libraries/Microsoft.NETCore.Platforms/tests/Microsoft.NETCore.Platforms.Tests.csproj +++ /dev/null @@ -1,29 +0,0 @@ - - - $(NetCoreAppCurrent);$(NetFrameworkToolCurrent) - true - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/libraries/Microsoft.NETCore.Platforms/tests/RidTests.cs b/src/libraries/Microsoft.NETCore.Platforms/tests/RidTests.cs deleted file mode 100644 index 8dee0ebeda17a4..00000000000000 --- a/src/libraries/Microsoft.NETCore.Platforms/tests/RidTests.cs +++ /dev/null @@ -1,66 +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.Generic; -using Xunit; - -namespace Microsoft.NETCore.Platforms.BuildTasks.Tests -{ - public class RidTests - { - public static IEnumerable ValidRIDData() - { - yield return new object[] { "win10-x64", new RID() { BaseRID = "win", OmitVersionDelimiter = true, Version = new RuntimeVersion("10"), Architecture = "x64" }, null }; - yield return new object[] { "win10", new RID() { BaseRID = "win", OmitVersionDelimiter = true, Version = new RuntimeVersion("10")}, null }; - yield return new object[] { "linux", new RID() { BaseRID = "linux" }, null }; - yield return new object[] { "linux-x64", new RID() { BaseRID = "linux", Architecture = "x64" }, null }; - yield return new object[] { "linux-x64", new RID() { BaseRID = "linux", Architecture = "x64" }, null }; - yield return new object[] { "debian.10-x64", new RID() { BaseRID = "debian", Version = new RuntimeVersion("10"), Architecture = "x64" }, null }; - yield return new object[] { "linuxmint.19.2-x64", new RID() { BaseRID = "linuxmint", Version = new RuntimeVersion("19.2"), Architecture = "x64" }, null }; - yield return new object[] { "ubuntu.14.04-x64", new RID() { BaseRID = "ubuntu", Version = new RuntimeVersion("14.04"), Architecture = "x64" }, null }; - yield return new object[] { "foo-bar.42-arm", new RID() { BaseRID = "foo-bar", Version = new RuntimeVersion("42"), Architecture = "arm" }, null }; - yield return new object[] { "foo-bar-arm", new RID() { BaseRID = "foo", Architecture = "bar", Qualifier = "arm" }, // demonstrates ambiguity, avoid using `-` in base - new RID() { BaseRID = "foo-bar", Architecture = "arm" } }; - yield return new object[] { "linux-musl-x64", new RID() { BaseRID = "linux", Architecture = "musl", Qualifier = "x64" }, // yes, we already have ambiguous RIDs - new RID() { BaseRID = "linux-musl", Architecture = "x64" } }; - } - - [Theory] - [MemberData(nameof(ValidRIDData))] - internal void ParseCorrectly(string input, RID expected, RID? expectedNoQualifier) - { - _ = expectedNoQualifier; // unused - - RID actual = RID.Parse(input, noQualifier: false); - - Assert.Equal(expected, actual); - } - - [Theory] - [MemberData(nameof(ValidRIDData))] - internal void ParseCorrectlyNoQualifier(string input, RID expected, RID? expectedNoQualifier) - { - expectedNoQualifier ??= expected; - - RID actual = RID.Parse(input, noQualifier: true); - - Assert.Equal(expectedNoQualifier, actual); - } - - [Theory] - [MemberData(nameof(ValidRIDData))] - internal void ToStringAsExpected(string expected, RID rid, RID? expectedNoQualifierRid) - { - string actual = rid.ToString(); - - Assert.Equal(expected, actual); - - if (expectedNoQualifierRid is not null) - { - actual = expectedNoQualifierRid.ToString(); - - Assert.Equal(expected, actual); - } - } - } -} diff --git a/src/libraries/Microsoft.NETCore.Platforms/tests/RuntimeVersionTests.cs b/src/libraries/Microsoft.NETCore.Platforms/tests/RuntimeVersionTests.cs deleted file mode 100644 index 2822974acfacc4..00000000000000 --- a/src/libraries/Microsoft.NETCore.Platforms/tests/RuntimeVersionTests.cs +++ /dev/null @@ -1,233 +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.Generic; -using Xunit; - -namespace Microsoft.NETCore.Platforms.BuildTasks.Tests -{ - public class RuntimeVersionTests - { - public enum Comparison - { - LessThan, - Equal, - GreaterThan - } - - public static IEnumerable ComparisonData() - { - yield return new object[] { "0.0", "00.0", Comparison.LessThan }; - yield return new object[] { "2.0", "1.0", Comparison.GreaterThan }; - yield return new object[] { "2", "1.0", Comparison.GreaterThan }; - yield return new object[] { "2", "1", Comparison.GreaterThan }; - yield return new object[] { "10", "10.0", Comparison.LessThan }; - yield return new object[] { "10", "10.00", Comparison.LessThan }; - yield return new object[] { "10.0", "10.0", Comparison.Equal }; - yield return new object[] { "10.0", null, Comparison.GreaterThan }; - yield return new object[] { "8", "8", Comparison.Equal }; - } - - [MemberData(nameof(ComparisonData))] - [Theory] - public static void CompareTo(string vs1, string vs2, Comparison expected) - { - RuntimeVersion v1 = new RuntimeVersion(vs1); - RuntimeVersion v2 = vs2 == null ? null : new RuntimeVersion(vs2); - int actual = v1.CompareTo(v2); - int invActual = v2?.CompareTo(v1) ?? -1; - - switch (expected) - { - case Comparison.LessThan: - Assert.True(actual < 0); - Assert.True(invActual > 0); - break; - case Comparison.Equal: - Assert.Equal(0, actual); - Assert.Equal(0, invActual); - break; - case Comparison.GreaterThan: - Assert.True(actual > 0); - Assert.True(invActual < 0); - break; - } - } - - [MemberData(nameof(ComparisonData))] - [Theory] - public static void GreaterThan(string vs1, string vs2, Comparison expected) - { - RuntimeVersion v1 = new RuntimeVersion(vs1); - RuntimeVersion v2 = vs2 == null ? null : new RuntimeVersion(vs2); - bool actual = v1 > v2; - bool invActual = v2 > v1; - - switch (expected) - { - case Comparison.LessThan: - Assert.False(actual); - Assert.True(invActual); - break; - case Comparison.Equal: - Assert.False(actual); - Assert.False(invActual); - break; - case Comparison.GreaterThan: - Assert.True(actual); - Assert.False(invActual); - break; - } - } - - [MemberData(nameof(ComparisonData))] - [Theory] - public static void GreaterThanOrEqual(string vs1, string vs2, Comparison expected) - { - RuntimeVersion v1 = new RuntimeVersion(vs1); - RuntimeVersion v2 = vs2 == null ? null : new RuntimeVersion(vs2); - bool actual = v1 >= v2; - bool invActual = v2 >= v1; - - switch (expected) - { - case Comparison.LessThan: - Assert.False(actual); - Assert.True(invActual); - break; - case Comparison.Equal: - Assert.True(actual); - Assert.True(invActual); - break; - case Comparison.GreaterThan: - Assert.True(actual); - Assert.False(invActual); - break; - } - } - - [MemberData(nameof(ComparisonData))] - [Theory] - public static void LessThan(string vs1, string vs2, Comparison expected) - { - RuntimeVersion v1 = new RuntimeVersion(vs1); - RuntimeVersion v2 = vs2 == null ? null : new RuntimeVersion(vs2); - bool actual = v1 < v2; - bool invActual = v2 < v1; - - switch (expected) - { - case Comparison.LessThan: - Assert.True(actual); - Assert.False(invActual); - break; - case Comparison.Equal: - Assert.False(actual); - Assert.False(invActual); - break; - case Comparison.GreaterThan: - Assert.False(actual); - Assert.True(invActual); - break; - } - } - - [MemberData(nameof(ComparisonData))] - [Theory] - public static void LessThanOrEqual(string vs1, string vs2, Comparison expected) - { - RuntimeVersion v1 = new RuntimeVersion(vs1); - RuntimeVersion v2 = vs2 == null ? null : new RuntimeVersion(vs2); - bool actual = v1 <= v2; - bool invActual = v2 <= v1; - - switch (expected) - { - case Comparison.LessThan: - Assert.True(actual); - Assert.False(invActual); - break; - case Comparison.Equal: - Assert.True(actual); - Assert.True(invActual); - break; - case Comparison.GreaterThan: - Assert.False(actual); - Assert.True(invActual); - break; - } - } - - [MemberData(nameof(ComparisonData))] - [Theory] - public static void Equal(string vs1, string vs2, Comparison expected) - { - RuntimeVersion v1 = new RuntimeVersion(vs1); - RuntimeVersion v2 = vs2 == null ? null : new RuntimeVersion(vs2); - bool actual = v1 == v2; - bool invActual = v2 == v1; - - switch (expected) - { - case Comparison.LessThan: - Assert.False(actual); - Assert.False(invActual); - break; - case Comparison.Equal: - Assert.True(actual); - Assert.True(invActual); - break; - case Comparison.GreaterThan: - Assert.False(actual); - Assert.False(invActual); - break; - } - } - - [MemberData(nameof(ComparisonData))] - [Theory] - public static void GetHashCodeUnique(string vs1, string vs2, Comparison expected) - { - RuntimeVersion v1 = new RuntimeVersion(vs1); - RuntimeVersion v2 = vs2 == null ? null : new RuntimeVersion(vs2); - int h1 = v1.GetHashCode(); - int h2 = v2?.GetHashCode() ?? 0; - - switch (expected) - { - case Comparison.LessThan: - Assert.NotEqual(h1, h2); - break; - case Comparison.Equal: - Assert.Equal(h1, h2); - break; - case Comparison.GreaterThan: - Assert.NotEqual(h1, h2); - break; - } - } - public static IEnumerable ValidVersions() - { - yield return new object[] { "0" }; - yield return new object[] { "00" }; - yield return new object[] { "000" }; - yield return new object[] { "1" }; - yield return new object[] { "1.0" }; - yield return new object[] { "1.1" }; - yield return new object[] { "1.01" }; - yield return new object[] { "1.2.3.4" }; - yield return new object[] { "1.02.03.04" }; - } - - - [MemberData(nameof(ValidVersions))] - [Theory] - public static void RoundTripToString(string expected) - { - RuntimeVersion version = new RuntimeVersion(expected); - string actual = version.ToString(); - Assert.Equal(expected, actual); - } - - } -} diff --git a/src/libraries/Microsoft.NETCore.Platforms/tests/TestBuildEngine.cs b/src/libraries/Microsoft.NETCore.Platforms/tests/TestBuildEngine.cs deleted file mode 100644 index 67dfefbe8c8c9b..00000000000000 --- a/src/libraries/Microsoft.NETCore.Platforms/tests/TestBuildEngine.cs +++ /dev/null @@ -1,56 +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 Microsoft.Build.Framework; -using System; -using System.Collections; - -namespace Microsoft.NETCore.Platforms.BuildTasks.Tests -{ - public class TestBuildEngine : IBuildEngine - { - private ILog _log; - - public TestBuildEngine(ILog log) - { - ColumnNumberOfTaskNode = 0; - ContinueOnError = true; - LineNumberOfTaskNode = 0; - ProjectFileOfTaskNode = "test"; - _log = log; - } - - public int ColumnNumberOfTaskNode { get; set; } - - public bool ContinueOnError { get; set; } - - public int LineNumberOfTaskNode { get; set; } - - public string ProjectFileOfTaskNode { get; set; } - - public bool BuildProjectFile(string projectFileName, string[] targetNames, IDictionary globalProperties, IDictionary targetOutputs) - { - throw new NotImplementedException(); - } - - public void LogCustomEvent(CustomBuildEventArgs e) - { - _log.LogMessage(e.Message); - } - - public void LogErrorEvent(BuildErrorEventArgs e) - { - _log.LogError(e.Message); - } - - public void LogMessageEvent(BuildMessageEventArgs e) - { - _log.LogMessage((LogImportance)e.Importance, e.Message); - } - - public void LogWarningEvent(BuildWarningEventArgs e) - { - _log.LogWarning(e.Message); - } - } -} diff --git a/src/libraries/Microsoft.VisualBasic.Core/Microsoft.VisualBasic.Core.sln b/src/libraries/Microsoft.VisualBasic.Core/Microsoft.VisualBasic.Core.sln index 646a3d7afbb941..669f9bd038d09f 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/Microsoft.VisualBasic.Core.sln +++ b/src/libraries/Microsoft.VisualBasic.Core/Microsoft.VisualBasic.Core.sln @@ -21,6 +21,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encoding.CodePa EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encoding.CodePages", "..\System.Text.Encoding.CodePages\src\System.Text.Encoding.CodePages.csproj", "{30CC7F8D-60DB-49C5-BE59-81477BFE0376}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{0618F03A-8DB1-41C5-AAEF-A1A54E024260}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{6D226B68-D1FC-4AA2-A655-0AF68796F18C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{34110C14-0B75-4320-8F65-77AA39587B24}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{5302E8D8-8ADC-4FA6-B116-B1F9FF71ACDD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{7C7DC9E8-F333-412B-9434-278B337C6572}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{3FD0B41F-6CEA-4AE2-832F-60C8686858C4}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{3BC7B60B-4BE3-4D6F-8C03-8D6BDACC845E}" @@ -29,6 +39,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{2FC8E7CF-2E2 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{037CA0A6-EB43-4A49-A854-E13AE7B8972D}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{CAF72038-74B0-44E3-A557-E7828DF9A914}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{C7EA0D7C-682F-4E26-A466-2507A5FF3212}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{559CE364-1B51-4EBA-A0A5-B1F271F0C122}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{4AAEF229-C45A-4DEE-BDC2-430577791C4C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -79,6 +97,26 @@ Global {30CC7F8D-60DB-49C5-BE59-81477BFE0376}.Debug|Any CPU.Build.0 = Debug|Any CPU {30CC7F8D-60DB-49C5-BE59-81477BFE0376}.Release|Any CPU.ActiveCfg = Release|Any CPU {30CC7F8D-60DB-49C5-BE59-81477BFE0376}.Release|Any CPU.Build.0 = Release|Any CPU + {0618F03A-8DB1-41C5-AAEF-A1A54E024260}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0618F03A-8DB1-41C5-AAEF-A1A54E024260}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0618F03A-8DB1-41C5-AAEF-A1A54E024260}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0618F03A-8DB1-41C5-AAEF-A1A54E024260}.Release|Any CPU.Build.0 = Release|Any CPU + {6D226B68-D1FC-4AA2-A655-0AF68796F18C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6D226B68-D1FC-4AA2-A655-0AF68796F18C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6D226B68-D1FC-4AA2-A655-0AF68796F18C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6D226B68-D1FC-4AA2-A655-0AF68796F18C}.Release|Any CPU.Build.0 = Release|Any CPU + {34110C14-0B75-4320-8F65-77AA39587B24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {34110C14-0B75-4320-8F65-77AA39587B24}.Debug|Any CPU.Build.0 = Debug|Any CPU + {34110C14-0B75-4320-8F65-77AA39587B24}.Release|Any CPU.ActiveCfg = Release|Any CPU + {34110C14-0B75-4320-8F65-77AA39587B24}.Release|Any CPU.Build.0 = Release|Any CPU + {5302E8D8-8ADC-4FA6-B116-B1F9FF71ACDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5302E8D8-8ADC-4FA6-B116-B1F9FF71ACDD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5302E8D8-8ADC-4FA6-B116-B1F9FF71ACDD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5302E8D8-8ADC-4FA6-B116-B1F9FF71ACDD}.Release|Any CPU.Build.0 = Release|Any CPU + {7C7DC9E8-F333-412B-9434-278B337C6572}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7C7DC9E8-F333-412B-9434-278B337C6572}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7C7DC9E8-F333-412B-9434-278B337C6572}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7C7DC9E8-F333-412B-9434-278B337C6572}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -95,6 +133,14 @@ Global {58FF6A8C-3BAB-4C28-9940-1FAAD0896D2E} = {037CA0A6-EB43-4A49-A854-E13AE7B8972D} {18CE2A0D-C20E-42E5-9845-A934A5073529} = {037CA0A6-EB43-4A49-A854-E13AE7B8972D} {DD515FA9-D026-4B9B-9456-2D174634C12D} = {037CA0A6-EB43-4A49-A854-E13AE7B8972D} + {0618F03A-8DB1-41C5-AAEF-A1A54E024260} = {CAF72038-74B0-44E3-A557-E7828DF9A914} + {6D226B68-D1FC-4AA2-A655-0AF68796F18C} = {CAF72038-74B0-44E3-A557-E7828DF9A914} + {CAF72038-74B0-44E3-A557-E7828DF9A914} = {4AAEF229-C45A-4DEE-BDC2-430577791C4C} + {34110C14-0B75-4320-8F65-77AA39587B24} = {C7EA0D7C-682F-4E26-A466-2507A5FF3212} + {5302E8D8-8ADC-4FA6-B116-B1F9FF71ACDD} = {C7EA0D7C-682F-4E26-A466-2507A5FF3212} + {C7EA0D7C-682F-4E26-A466-2507A5FF3212} = {4AAEF229-C45A-4DEE-BDC2-430577791C4C} + {7C7DC9E8-F333-412B-9434-278B337C6572} = {559CE364-1B51-4EBA-A0A5-B1F271F0C122} + {559CE364-1B51-4EBA-A0A5-B1F271F0C122} = {4AAEF229-C45A-4DEE-BDC2-430577791C4C} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {4C265A0A-56EF-41A8-B973-AA764175AA29} diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/CompatibilitySuppressions.xml b/src/libraries/Microsoft.VisualBasic.Core/src/CompatibilitySuppressions.xml index 694c5ec1802e6b..b4a619b5ccef1b 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/CompatibilitySuppressions.xml +++ b/src/libraries/Microsoft.VisualBasic.Core/src/CompatibilitySuppressions.xml @@ -1,4 +1,5 @@  + CP0014 diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/NewLateBinding.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/NewLateBinding.vb index de0bde5e73a2f0..5d2f624b7a6b93 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/NewLateBinding.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/NewLateBinding.vb @@ -47,6 +47,10 @@ Namespace Microsoft.VisualBasic.CompilerServices baseReference = New Container(Instance) End If + If baseReference.IsCOMObject AndAlso Not baseReference.IsWindowsRuntimeObject Then + Return LateBinding.InternalLateCall(Instance, Type, MemberName, Arguments, ArgumentNames, CopyBack, IgnoreReturn) + End If + Dim idmop As IDynamicMetaObjectProvider = IDOUtils.TryCastToIDMOP(Instance) If idmop IsNot Nothing AndAlso TypeArguments Is NoTypeArguments Then Return IDOBinder.IDOCall(idmop, MemberName, Arguments, ArgumentNames, CopyBack, IgnoreReturn) @@ -139,7 +143,7 @@ Namespace Microsoft.VisualBasic.CompilerServices ' LateCallInvokeDefault is used to optionally invoke the default action on a call target. ' If the arguments are non-empty, then it isn't optional, and is treated ' as an error if there is no default action. - ' Currently we can get here only in the process of execution of NewLateBinding.LateCall. + ' Currently we can get here only in the process of execution of NewLateBinding.LateCall. @@ -155,7 +159,7 @@ Namespace Microsoft.VisualBasic.CompilerServices ' LateGetInvokeDefault is used to optionally invoke the default action. ' If the arguments are non-empty, then it isn't optional, and is treated ' as an error if there is no default action. - ' Currently we can get here only in the process of execution of NewLateBinding.LateGet. + ' Currently we can get here only in the process of execution of NewLateBinding.LateGet. @@ -167,7 +171,7 @@ Namespace Microsoft.VisualBasic.CompilerServices ' According to a comment in VBGetBinder.FallbackInvoke, this function is called when ' "The DLR was able to resolve o.member, but not o.member(args)" - ' When NewLateBinding.LateGet is evaluating similar expression itself, it never tries to invoke default action + ' When NewLateBinding.LateGet is evaluating similar expression itself, it never tries to invoke default action ' if arguments are not empty. It simply returns result of evaluating o.member. I believe, it makes sense ' to follow the same logic here. I.e., if there are no arguments, simply return the instance unless it is an IDO. @@ -278,6 +282,9 @@ Namespace Microsoft.VisualBasic.CompilerServices If argumentNames Is Nothing Then argumentNames = NoArgumentNames Dim baseReference As Container = New Container(instance) + If baseReference.IsCOMObject AndAlso Not baseReference.IsWindowsRuntimeObject Then + Return LateBinding.LateIndexGet(instance, arguments, argumentNames) + End If 'An r-value expression o(a) has two possible forms: ' 1: o(a) array lookup--where o is an array object and a is a set of indices @@ -372,6 +379,10 @@ Namespace Microsoft.VisualBasic.CompilerServices baseReference = New Container(Instance) End If + If baseReference.IsCOMObject AndAlso Not baseReference.IsWindowsRuntimeObject Then + Return LateBinding.LateGet(Instance, Type, MemberName, Arguments, ArgumentNames, CopyBack) + End If + Dim invocationFlags As BindingFlags = BindingFlagsInvokeMethod Or BindingFlagsGetProperty Dim idmop As IDynamicMetaObjectProvider = IDOUtils.TryCastToIDMOP(Instance) @@ -653,6 +664,10 @@ Namespace Microsoft.VisualBasic.CompilerServices End If Dim methodName As String = "" + If baseReference.IsCOMObject AndAlso Not baseReference.IsWindowsRuntimeObject Then + LateBinding.LateIndexSetComplex(instance, arguments, argumentNames, optimisticSet, rValueBase) + Return + End If Dim invocationFlags As BindingFlags = BindingFlagsSetProperty @@ -927,6 +942,18 @@ Namespace Microsoft.VisualBasic.CompilerServices baseReference = New Container(Instance) End If + If baseReference.IsCOMObject AndAlso Not baseReference.IsWindowsRuntimeObject Then + Try + LateBinding.InternalLateSet(Instance, Type, MemberName, Arguments, ArgumentNames, OptimisticSet, CallType) + If RValueBase And Type.IsValueType Then + Throw New Exception(Utils.GetResourceString(SR.RValueBaseForValueType, baseReference.VBFriendlyName, baseReference.VBFriendlyName)) + End If + Return + Catch ex As MissingMemberException When OptimisticSet + Return + End Try + End If + Dim invocationFlags As BindingFlags ' If we have a IDO that implements TryGetMember for a property but not TrySetMember then we could land up diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Symbols.vb b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Symbols.vb index 8301ee324af3fc..44c694595b35bb 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Symbols.vb +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Symbols.vb @@ -823,6 +823,12 @@ Namespace Microsoft.VisualBasic.CompilerServices End Get End Property + Friend ReadOnly Property IsCOMObject() As Boolean + Get + Return _type.IsCOMObject + End Get + End Property + Friend ReadOnly Property VBFriendlyName() As String Get Return Utils.VBFriendlyName(_type, _instance) diff --git a/src/libraries/Microsoft.Win32.Primitives/Microsoft.Win32.Primitives.sln b/src/libraries/Microsoft.Win32.Primitives/Microsoft.Win32.Primitives.sln index 22bc0c14e66b05..ef2dca7943a2e1 100644 --- a/src/libraries/Microsoft.Win32.Primitives/Microsoft.Win32.Primitives.sln +++ b/src/libraries/Microsoft.Win32.Primitives/Microsoft.Win32.Primitives.sln @@ -19,14 +19,34 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{EC1A6210-05C0-4F57-969C-0EE0F29B5B67}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{44B79C97-BA70-4955-8478-87D5CB5CD3B5}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{559BBFDE-D6B6-4F51-A3A2-F7978E492FD6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{2A16BC8D-BCB6-4900-9DF1-E47CE2877515}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{185C0888-3794-4A7E-89B5-A24AB3DE8D74}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{1B8BB7B0-376A-4180-A360-7C3EFF6F738C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{C21B76F3-8455-4F3C-88D3-E733D388F317}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{FE54742C-ABB4-4863-8EAE-B72933AAD4F9}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{CEC48784-C8F0-46DF-AA1E-07850E754180}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{08BAF9E0-068B-4201-91E6-91B725ABE3D2}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{44B79C97-BA70-4955-8478-87D5CB5CD3B5}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{A48D1F08-4510-44F9-9E77-7164B2769064}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{32BFF540-62FE-4B93-BE7E-A41853C63CA9}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{76C564B7-A81E-4F48-8C45-9ED2CC2261FD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{383DA25B-891E-400D-B66E-DFACFDE9B884}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{AF320CAF-CA65-4BFC-96C3-B660F17D26FB}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -265,21 +285,134 @@ Global {EC1A6210-05C0-4F57-969C-0EE0F29B5B67}.Checked|arm64.ActiveCfg = Debug|Any CPU {EC1A6210-05C0-4F57-969C-0EE0F29B5B67}.Checked|x64.ActiveCfg = Debug|Any CPU {EC1A6210-05C0-4F57-969C-0EE0F29B5B67}.Checked|x86.ActiveCfg = Debug|Any CPU + {559BBFDE-D6B6-4F51-A3A2-F7978E492FD6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {559BBFDE-D6B6-4F51-A3A2-F7978E492FD6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {559BBFDE-D6B6-4F51-A3A2-F7978E492FD6}.Debug|arm.ActiveCfg = Debug|Any CPU + {559BBFDE-D6B6-4F51-A3A2-F7978E492FD6}.Debug|arm64.ActiveCfg = Debug|Any CPU + {559BBFDE-D6B6-4F51-A3A2-F7978E492FD6}.Debug|x64.ActiveCfg = Debug|Any CPU + {559BBFDE-D6B6-4F51-A3A2-F7978E492FD6}.Debug|x64.Build.0 = Debug|Any CPU + {559BBFDE-D6B6-4F51-A3A2-F7978E492FD6}.Debug|x86.ActiveCfg = Debug|Any CPU + {559BBFDE-D6B6-4F51-A3A2-F7978E492FD6}.Debug|x86.Build.0 = Debug|Any CPU + {559BBFDE-D6B6-4F51-A3A2-F7978E492FD6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {559BBFDE-D6B6-4F51-A3A2-F7978E492FD6}.Release|Any CPU.Build.0 = Release|Any CPU + {559BBFDE-D6B6-4F51-A3A2-F7978E492FD6}.Release|arm.ActiveCfg = Release|Any CPU + {559BBFDE-D6B6-4F51-A3A2-F7978E492FD6}.Release|arm64.ActiveCfg = Release|Any CPU + {559BBFDE-D6B6-4F51-A3A2-F7978E492FD6}.Release|x64.ActiveCfg = Release|Any CPU + {559BBFDE-D6B6-4F51-A3A2-F7978E492FD6}.Release|x64.Build.0 = Release|Any CPU + {559BBFDE-D6B6-4F51-A3A2-F7978E492FD6}.Release|x86.ActiveCfg = Release|Any CPU + {559BBFDE-D6B6-4F51-A3A2-F7978E492FD6}.Release|x86.Build.0 = Release|Any CPU + {559BBFDE-D6B6-4F51-A3A2-F7978E492FD6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {559BBFDE-D6B6-4F51-A3A2-F7978E492FD6}.Checked|arm.ActiveCfg = Debug|Any CPU + {559BBFDE-D6B6-4F51-A3A2-F7978E492FD6}.Checked|arm64.ActiveCfg = Debug|Any CPU + {559BBFDE-D6B6-4F51-A3A2-F7978E492FD6}.Checked|x64.ActiveCfg = Debug|Any CPU + {559BBFDE-D6B6-4F51-A3A2-F7978E492FD6}.Checked|x86.ActiveCfg = Debug|Any CPU + {2A16BC8D-BCB6-4900-9DF1-E47CE2877515}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2A16BC8D-BCB6-4900-9DF1-E47CE2877515}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2A16BC8D-BCB6-4900-9DF1-E47CE2877515}.Debug|arm.ActiveCfg = Debug|Any CPU + {2A16BC8D-BCB6-4900-9DF1-E47CE2877515}.Debug|arm64.ActiveCfg = Debug|Any CPU + {2A16BC8D-BCB6-4900-9DF1-E47CE2877515}.Debug|x64.ActiveCfg = Debug|Any CPU + {2A16BC8D-BCB6-4900-9DF1-E47CE2877515}.Debug|x64.Build.0 = Debug|Any CPU + {2A16BC8D-BCB6-4900-9DF1-E47CE2877515}.Debug|x86.ActiveCfg = Debug|Any CPU + {2A16BC8D-BCB6-4900-9DF1-E47CE2877515}.Debug|x86.Build.0 = Debug|Any CPU + {2A16BC8D-BCB6-4900-9DF1-E47CE2877515}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2A16BC8D-BCB6-4900-9DF1-E47CE2877515}.Release|Any CPU.Build.0 = Release|Any CPU + {2A16BC8D-BCB6-4900-9DF1-E47CE2877515}.Release|arm.ActiveCfg = Release|Any CPU + {2A16BC8D-BCB6-4900-9DF1-E47CE2877515}.Release|arm64.ActiveCfg = Release|Any CPU + {2A16BC8D-BCB6-4900-9DF1-E47CE2877515}.Release|x64.ActiveCfg = Release|Any CPU + {2A16BC8D-BCB6-4900-9DF1-E47CE2877515}.Release|x64.Build.0 = Release|Any CPU + {2A16BC8D-BCB6-4900-9DF1-E47CE2877515}.Release|x86.ActiveCfg = Release|Any CPU + {2A16BC8D-BCB6-4900-9DF1-E47CE2877515}.Release|x86.Build.0 = Release|Any CPU + {2A16BC8D-BCB6-4900-9DF1-E47CE2877515}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {2A16BC8D-BCB6-4900-9DF1-E47CE2877515}.Checked|arm.ActiveCfg = Debug|Any CPU + {2A16BC8D-BCB6-4900-9DF1-E47CE2877515}.Checked|arm64.ActiveCfg = Debug|Any CPU + {2A16BC8D-BCB6-4900-9DF1-E47CE2877515}.Checked|x64.ActiveCfg = Debug|Any CPU + {2A16BC8D-BCB6-4900-9DF1-E47CE2877515}.Checked|x86.ActiveCfg = Debug|Any CPU + {185C0888-3794-4A7E-89B5-A24AB3DE8D74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {185C0888-3794-4A7E-89B5-A24AB3DE8D74}.Debug|Any CPU.Build.0 = Debug|Any CPU + {185C0888-3794-4A7E-89B5-A24AB3DE8D74}.Debug|arm.ActiveCfg = Debug|Any CPU + {185C0888-3794-4A7E-89B5-A24AB3DE8D74}.Debug|arm64.ActiveCfg = Debug|Any CPU + {185C0888-3794-4A7E-89B5-A24AB3DE8D74}.Debug|x64.ActiveCfg = Debug|Any CPU + {185C0888-3794-4A7E-89B5-A24AB3DE8D74}.Debug|x64.Build.0 = Debug|Any CPU + {185C0888-3794-4A7E-89B5-A24AB3DE8D74}.Debug|x86.ActiveCfg = Debug|Any CPU + {185C0888-3794-4A7E-89B5-A24AB3DE8D74}.Debug|x86.Build.0 = Debug|Any CPU + {185C0888-3794-4A7E-89B5-A24AB3DE8D74}.Release|Any CPU.ActiveCfg = Release|Any CPU + {185C0888-3794-4A7E-89B5-A24AB3DE8D74}.Release|Any CPU.Build.0 = Release|Any CPU + {185C0888-3794-4A7E-89B5-A24AB3DE8D74}.Release|arm.ActiveCfg = Release|Any CPU + {185C0888-3794-4A7E-89B5-A24AB3DE8D74}.Release|arm64.ActiveCfg = Release|Any CPU + {185C0888-3794-4A7E-89B5-A24AB3DE8D74}.Release|x64.ActiveCfg = Release|Any CPU + {185C0888-3794-4A7E-89B5-A24AB3DE8D74}.Release|x64.Build.0 = Release|Any CPU + {185C0888-3794-4A7E-89B5-A24AB3DE8D74}.Release|x86.ActiveCfg = Release|Any CPU + {185C0888-3794-4A7E-89B5-A24AB3DE8D74}.Release|x86.Build.0 = Release|Any CPU + {185C0888-3794-4A7E-89B5-A24AB3DE8D74}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {185C0888-3794-4A7E-89B5-A24AB3DE8D74}.Checked|arm.ActiveCfg = Debug|Any CPU + {185C0888-3794-4A7E-89B5-A24AB3DE8D74}.Checked|arm64.ActiveCfg = Debug|Any CPU + {185C0888-3794-4A7E-89B5-A24AB3DE8D74}.Checked|x64.ActiveCfg = Debug|Any CPU + {185C0888-3794-4A7E-89B5-A24AB3DE8D74}.Checked|x86.ActiveCfg = Debug|Any CPU + {1B8BB7B0-376A-4180-A360-7C3EFF6F738C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1B8BB7B0-376A-4180-A360-7C3EFF6F738C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1B8BB7B0-376A-4180-A360-7C3EFF6F738C}.Debug|arm.ActiveCfg = Debug|Any CPU + {1B8BB7B0-376A-4180-A360-7C3EFF6F738C}.Debug|arm64.ActiveCfg = Debug|Any CPU + {1B8BB7B0-376A-4180-A360-7C3EFF6F738C}.Debug|x64.ActiveCfg = Debug|Any CPU + {1B8BB7B0-376A-4180-A360-7C3EFF6F738C}.Debug|x64.Build.0 = Debug|Any CPU + {1B8BB7B0-376A-4180-A360-7C3EFF6F738C}.Debug|x86.ActiveCfg = Debug|Any CPU + {1B8BB7B0-376A-4180-A360-7C3EFF6F738C}.Debug|x86.Build.0 = Debug|Any CPU + {1B8BB7B0-376A-4180-A360-7C3EFF6F738C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1B8BB7B0-376A-4180-A360-7C3EFF6F738C}.Release|Any CPU.Build.0 = Release|Any CPU + {1B8BB7B0-376A-4180-A360-7C3EFF6F738C}.Release|arm.ActiveCfg = Release|Any CPU + {1B8BB7B0-376A-4180-A360-7C3EFF6F738C}.Release|arm64.ActiveCfg = Release|Any CPU + {1B8BB7B0-376A-4180-A360-7C3EFF6F738C}.Release|x64.ActiveCfg = Release|Any CPU + {1B8BB7B0-376A-4180-A360-7C3EFF6F738C}.Release|x64.Build.0 = Release|Any CPU + {1B8BB7B0-376A-4180-A360-7C3EFF6F738C}.Release|x86.ActiveCfg = Release|Any CPU + {1B8BB7B0-376A-4180-A360-7C3EFF6F738C}.Release|x86.Build.0 = Release|Any CPU + {1B8BB7B0-376A-4180-A360-7C3EFF6F738C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {1B8BB7B0-376A-4180-A360-7C3EFF6F738C}.Checked|arm.ActiveCfg = Debug|Any CPU + {1B8BB7B0-376A-4180-A360-7C3EFF6F738C}.Checked|arm64.ActiveCfg = Debug|Any CPU + {1B8BB7B0-376A-4180-A360-7C3EFF6F738C}.Checked|x64.ActiveCfg = Debug|Any CPU + {1B8BB7B0-376A-4180-A360-7C3EFF6F738C}.Checked|x86.ActiveCfg = Debug|Any CPU + {C21B76F3-8455-4F3C-88D3-E733D388F317}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C21B76F3-8455-4F3C-88D3-E733D388F317}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C21B76F3-8455-4F3C-88D3-E733D388F317}.Debug|arm.ActiveCfg = Debug|Any CPU + {C21B76F3-8455-4F3C-88D3-E733D388F317}.Debug|arm64.ActiveCfg = Debug|Any CPU + {C21B76F3-8455-4F3C-88D3-E733D388F317}.Debug|x64.ActiveCfg = Debug|Any CPU + {C21B76F3-8455-4F3C-88D3-E733D388F317}.Debug|x64.Build.0 = Debug|Any CPU + {C21B76F3-8455-4F3C-88D3-E733D388F317}.Debug|x86.ActiveCfg = Debug|Any CPU + {C21B76F3-8455-4F3C-88D3-E733D388F317}.Debug|x86.Build.0 = Debug|Any CPU + {C21B76F3-8455-4F3C-88D3-E733D388F317}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C21B76F3-8455-4F3C-88D3-E733D388F317}.Release|Any CPU.Build.0 = Release|Any CPU + {C21B76F3-8455-4F3C-88D3-E733D388F317}.Release|arm.ActiveCfg = Release|Any CPU + {C21B76F3-8455-4F3C-88D3-E733D388F317}.Release|arm64.ActiveCfg = Release|Any CPU + {C21B76F3-8455-4F3C-88D3-E733D388F317}.Release|x64.ActiveCfg = Release|Any CPU + {C21B76F3-8455-4F3C-88D3-E733D388F317}.Release|x64.Build.0 = Release|Any CPU + {C21B76F3-8455-4F3C-88D3-E733D388F317}.Release|x86.ActiveCfg = Release|Any CPU + {C21B76F3-8455-4F3C-88D3-E733D388F317}.Release|x86.Build.0 = Release|Any CPU + {C21B76F3-8455-4F3C-88D3-E733D388F317}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {C21B76F3-8455-4F3C-88D3-E733D388F317}.Checked|arm.ActiveCfg = Debug|Any CPU + {C21B76F3-8455-4F3C-88D3-E733D388F317}.Checked|arm64.ActiveCfg = Debug|Any CPU + {C21B76F3-8455-4F3C-88D3-E733D388F317}.Checked|x64.ActiveCfg = Debug|Any CPU + {C21B76F3-8455-4F3C-88D3-E733D388F317}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {7D1AFE3C-882D-4D27-A915-B87A1BC82D2D} = {44B79C97-BA70-4955-8478-87D5CB5CD3B5} - {B3BBD7D9-30F3-43D3-9D6A-C9BD5E19D32E} = {44B79C97-BA70-4955-8478-87D5CB5CD3B5} + {7D1AFE3C-882D-4D27-A915-B87A1BC82D2D} = {FE54742C-ABB4-4863-8EAE-B72933AAD4F9} {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} + {B3BBD7D9-30F3-43D3-9D6A-C9BD5E19D32E} = {44B79C97-BA70-4955-8478-87D5CB5CD3B5} {5F4ABB4F-CE69-47B7-860F-40B0DA68A7DB} = {A48D1F08-4510-44F9-9E77-7164B2769064} {5918B01B-FCAE-4321-8DCA-44466A57C04E} = {A48D1F08-4510-44F9-9E77-7164B2769064} {EE5972A3-AD58-430B-ACEB-4F608FD1C0D6} = {A48D1F08-4510-44F9-9E77-7164B2769064} + {559BBFDE-D6B6-4F51-A3A2-F7978E492FD6} = {32BFF540-62FE-4B93-BE7E-A41853C63CA9} + {2A16BC8D-BCB6-4900-9DF1-E47CE2877515} = {32BFF540-62FE-4B93-BE7E-A41853C63CA9} + {32BFF540-62FE-4B93-BE7E-A41853C63CA9} = {AF320CAF-CA65-4BFC-96C3-B660F17D26FB} + {185C0888-3794-4A7E-89B5-A24AB3DE8D74} = {76C564B7-A81E-4F48-8C45-9ED2CC2261FD} + {1B8BB7B0-376A-4180-A360-7C3EFF6F738C} = {76C564B7-A81E-4F48-8C45-9ED2CC2261FD} + {76C564B7-A81E-4F48-8C45-9ED2CC2261FD} = {AF320CAF-CA65-4BFC-96C3-B660F17D26FB} + {C21B76F3-8455-4F3C-88D3-E733D388F317} = {383DA25B-891E-400D-B66E-DFACFDE9B884} + {383DA25B-891E-400D-B66E-DFACFDE9B884} = {AF320CAF-CA65-4BFC-96C3-B660F17D26FB} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {B6D42557-6A7E-4DEB-83B6-1A5BD020735D} diff --git a/src/libraries/Microsoft.Win32.Registry.AccessControl/Microsoft.Win32.Registry.AccessControl.sln b/src/libraries/Microsoft.Win32.Registry.AccessControl/Microsoft.Win32.Registry.AccessControl.sln index 250d70266a92d8..957f4bb900d164 100644 --- a/src/libraries/Microsoft.Win32.Registry.AccessControl/Microsoft.Win32.Registry.AccessControl.sln +++ b/src/libraries/Microsoft.Win32.Registry.AccessControl/Microsoft.Win32.Registry.AccessControl.sln @@ -7,12 +7,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Win32.Registry.Ac EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Win32.Registry.AccessControl.Tests", "tests\Microsoft.Win32.Registry.AccessControl.Tests.csproj", "{BC8FAA75-A595-475E-B947-FA2D1E225B48}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{96A7093F-A1D1-408B-90E9-6B10EA6FF6EE}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{CD8304A8-4F14-45B7-B035-6D45D5ED3ECE}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{9BCDE466-92C1-45ED-A9F1-6973D93DF5DF}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{7AC324E3-BF40-4F3E-BA55-020DD43F69E6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{27443A96-187A-4AD4-9239-DE4E84915559}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{B0872508-7CC4-4224-8BF4-4D0B6EFC26D7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{D6A29002-3862-4365-8431-68733EAC5FC8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{5F1FD9B4-7C2D-4EA6-9AA8-52EA7E0D54D5}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{BF17487D-E9E3-4054-85A7-E64243B91780}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{84D58703-7569-445A-89B8-14D024FB6091}" @@ -21,6 +29,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{29A3E154-E50 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{BEA56439-DD4D-4DF6-9F07-33670D77D7FD}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{902A660A-58FF-4672-8E24-AA4728DAD6D4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{FBD18BCE-478E-43AB-82FC-1AE39305649A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{497C16C5-9EDB-4DBC-8311-A0AEA5B5AB58}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{089B5E41-0564-4F98-B19D-279EE3CB8A5E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -43,10 +59,6 @@ Global {BC8FAA75-A595-475E-B947-FA2D1E225B48}.Debug|Any CPU.Build.0 = Debug|Any CPU {BC8FAA75-A595-475E-B947-FA2D1E225B48}.Release|Any CPU.ActiveCfg = Release|Any CPU {BC8FAA75-A595-475E-B947-FA2D1E225B48}.Release|Any CPU.Build.0 = Release|Any CPU - {96A7093F-A1D1-408B-90E9-6B10EA6FF6EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {96A7093F-A1D1-408B-90E9-6B10EA6FF6EE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {96A7093F-A1D1-408B-90E9-6B10EA6FF6EE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {96A7093F-A1D1-408B-90E9-6B10EA6FF6EE}.Release|Any CPU.Build.0 = Release|Any CPU {CD8304A8-4F14-45B7-B035-6D45D5ED3ECE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CD8304A8-4F14-45B7-B035-6D45D5ED3ECE}.Debug|Any CPU.Build.0 = Debug|Any CPU {CD8304A8-4F14-45B7-B035-6D45D5ED3ECE}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -55,6 +67,26 @@ Global {9BCDE466-92C1-45ED-A9F1-6973D93DF5DF}.Debug|Any CPU.Build.0 = Debug|Any CPU {9BCDE466-92C1-45ED-A9F1-6973D93DF5DF}.Release|Any CPU.ActiveCfg = Release|Any CPU {9BCDE466-92C1-45ED-A9F1-6973D93DF5DF}.Release|Any CPU.Build.0 = Release|Any CPU + {7AC324E3-BF40-4F3E-BA55-020DD43F69E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7AC324E3-BF40-4F3E-BA55-020DD43F69E6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7AC324E3-BF40-4F3E-BA55-020DD43F69E6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7AC324E3-BF40-4F3E-BA55-020DD43F69E6}.Release|Any CPU.Build.0 = Release|Any CPU + {27443A96-187A-4AD4-9239-DE4E84915559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {27443A96-187A-4AD4-9239-DE4E84915559}.Debug|Any CPU.Build.0 = Debug|Any CPU + {27443A96-187A-4AD4-9239-DE4E84915559}.Release|Any CPU.ActiveCfg = Release|Any CPU + {27443A96-187A-4AD4-9239-DE4E84915559}.Release|Any CPU.Build.0 = Release|Any CPU + {B0872508-7CC4-4224-8BF4-4D0B6EFC26D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0872508-7CC4-4224-8BF4-4D0B6EFC26D7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0872508-7CC4-4224-8BF4-4D0B6EFC26D7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0872508-7CC4-4224-8BF4-4D0B6EFC26D7}.Release|Any CPU.Build.0 = Release|Any CPU + {D6A29002-3862-4365-8431-68733EAC5FC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D6A29002-3862-4365-8431-68733EAC5FC8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D6A29002-3862-4365-8431-68733EAC5FC8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D6A29002-3862-4365-8431-68733EAC5FC8}.Release|Any CPU.Build.0 = Release|Any CPU + {5F1FD9B4-7C2D-4EA6-9AA8-52EA7E0D54D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5F1FD9B4-7C2D-4EA6-9AA8-52EA7E0D54D5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5F1FD9B4-7C2D-4EA6-9AA8-52EA7E0D54D5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5F1FD9B4-7C2D-4EA6-9AA8-52EA7E0D54D5}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -64,9 +96,16 @@ Global {BC8FAA75-A595-475E-B947-FA2D1E225B48} = {BF17487D-E9E3-4054-85A7-E64243B91780} {97F37414-7633-4B76-AFA4-284E26894FB4} = {84D58703-7569-445A-89B8-14D024FB6091} {9A0E9CD8-33FA-4E02-8EB6-5685CD84D727} = {29A3E154-E50B-49E7-96C3-32A91CAB9BA0} - {96A7093F-A1D1-408B-90E9-6B10EA6FF6EE} = {BEA56439-DD4D-4DF6-9F07-33670D77D7FD} {CD8304A8-4F14-45B7-B035-6D45D5ED3ECE} = {BEA56439-DD4D-4DF6-9F07-33670D77D7FD} {9BCDE466-92C1-45ED-A9F1-6973D93DF5DF} = {BEA56439-DD4D-4DF6-9F07-33670D77D7FD} + {7AC324E3-BF40-4F3E-BA55-020DD43F69E6} = {902A660A-58FF-4672-8E24-AA4728DAD6D4} + {27443A96-187A-4AD4-9239-DE4E84915559} = {902A660A-58FF-4672-8E24-AA4728DAD6D4} + {902A660A-58FF-4672-8E24-AA4728DAD6D4} = {089B5E41-0564-4F98-B19D-279EE3CB8A5E} + {B0872508-7CC4-4224-8BF4-4D0B6EFC26D7} = {FBD18BCE-478E-43AB-82FC-1AE39305649A} + {D6A29002-3862-4365-8431-68733EAC5FC8} = {FBD18BCE-478E-43AB-82FC-1AE39305649A} + {FBD18BCE-478E-43AB-82FC-1AE39305649A} = {089B5E41-0564-4F98-B19D-279EE3CB8A5E} + {5F1FD9B4-7C2D-4EA6-9AA8-52EA7E0D54D5} = {497C16C5-9EDB-4DBC-8311-A0AEA5B5AB58} + {497C16C5-9EDB-4DBC-8311-A0AEA5B5AB58} = {089B5E41-0564-4F98-B19D-279EE3CB8A5E} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {E4C2B201-85CD-4255-91AF-B179414B9679} diff --git a/src/libraries/Microsoft.Win32.Registry/Microsoft.Win32.Registry.sln b/src/libraries/Microsoft.Win32.Registry/Microsoft.Win32.Registry.sln index 0ca78c466c8d96..40042fdc73db35 100644 --- a/src/libraries/Microsoft.Win32.Registry/Microsoft.Win32.Registry.sln +++ b/src/libraries/Microsoft.Win32.Registry/Microsoft.Win32.Registry.sln @@ -23,6 +23,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Claims", ". EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Principal.Windows", "..\System.Security.Principal.Windows\ref\System.Security.Principal.Windows.csproj", "{7AA650CB-13BD-4AC8-B570-E78A03DE97ED}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{511763F8-9EA6-4997-BAF4-DC888D488659}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{2A970C61-E343-40D5-AE22-0AB94A8727D1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{E99D6D91-9223-4F87-938F-8465DE8671F5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{2564096A-DA43-4531-B4D3-5C15AF9A6149}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{E437A38E-EBAA-4708-8225-7BA16F771DB4}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{D3839339-AF88-4867-BF81-44915AA883A2}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{DE8642D5-1264-473C-9896-35F348E89DBF}" @@ -31,6 +41,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{66BCDB38-AFF EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{DC4533A7-1325-497B-91FE-89765F77DFBF}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{762BA1D0-62D6-475D-91F2-C1CDE6654DCB}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{8C8B9A65-4291-402F-B6F6-3BD7F798F22F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{164743A9-91BD-4695-89A3-2B256AE2085B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{446C3DE3-A775-48A2-B188-A4B3484055EA}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -85,6 +103,26 @@ Global {7AA650CB-13BD-4AC8-B570-E78A03DE97ED}.Debug|Any CPU.Build.0 = Debug|Any CPU {7AA650CB-13BD-4AC8-B570-E78A03DE97ED}.Release|Any CPU.ActiveCfg = Release|Any CPU {7AA650CB-13BD-4AC8-B570-E78A03DE97ED}.Release|Any CPU.Build.0 = Release|Any CPU + {511763F8-9EA6-4997-BAF4-DC888D488659}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {511763F8-9EA6-4997-BAF4-DC888D488659}.Debug|Any CPU.Build.0 = Debug|Any CPU + {511763F8-9EA6-4997-BAF4-DC888D488659}.Release|Any CPU.ActiveCfg = Release|Any CPU + {511763F8-9EA6-4997-BAF4-DC888D488659}.Release|Any CPU.Build.0 = Release|Any CPU + {2A970C61-E343-40D5-AE22-0AB94A8727D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2A970C61-E343-40D5-AE22-0AB94A8727D1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2A970C61-E343-40D5-AE22-0AB94A8727D1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2A970C61-E343-40D5-AE22-0AB94A8727D1}.Release|Any CPU.Build.0 = Release|Any CPU + {E99D6D91-9223-4F87-938F-8465DE8671F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E99D6D91-9223-4F87-938F-8465DE8671F5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E99D6D91-9223-4F87-938F-8465DE8671F5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E99D6D91-9223-4F87-938F-8465DE8671F5}.Release|Any CPU.Build.0 = Release|Any CPU + {2564096A-DA43-4531-B4D3-5C15AF9A6149}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2564096A-DA43-4531-B4D3-5C15AF9A6149}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2564096A-DA43-4531-B4D3-5C15AF9A6149}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2564096A-DA43-4531-B4D3-5C15AF9A6149}.Release|Any CPU.Build.0 = Release|Any CPU + {E437A38E-EBAA-4708-8225-7BA16F771DB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E437A38E-EBAA-4708-8225-7BA16F771DB4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E437A38E-EBAA-4708-8225-7BA16F771DB4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E437A38E-EBAA-4708-8225-7BA16F771DB4}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -102,6 +140,14 @@ Global {5E90F801-5451-4E8A-8117-E86AB2A95F01} = {DC4533A7-1325-497B-91FE-89765F77DFBF} {2FD3F0C9-DB36-4156-9A78-51B476636685} = {DC4533A7-1325-497B-91FE-89765F77DFBF} {E8981301-50DC-4A1E-9BB0-537F9C5F2B8F} = {DC4533A7-1325-497B-91FE-89765F77DFBF} + {511763F8-9EA6-4997-BAF4-DC888D488659} = {762BA1D0-62D6-475D-91F2-C1CDE6654DCB} + {2A970C61-E343-40D5-AE22-0AB94A8727D1} = {762BA1D0-62D6-475D-91F2-C1CDE6654DCB} + {762BA1D0-62D6-475D-91F2-C1CDE6654DCB} = {446C3DE3-A775-48A2-B188-A4B3484055EA} + {E99D6D91-9223-4F87-938F-8465DE8671F5} = {8C8B9A65-4291-402F-B6F6-3BD7F798F22F} + {2564096A-DA43-4531-B4D3-5C15AF9A6149} = {8C8B9A65-4291-402F-B6F6-3BD7F798F22F} + {8C8B9A65-4291-402F-B6F6-3BD7F798F22F} = {446C3DE3-A775-48A2-B188-A4B3484055EA} + {E437A38E-EBAA-4708-8225-7BA16F771DB4} = {164743A9-91BD-4695-89A3-2B256AE2085B} + {164743A9-91BD-4695-89A3-2B256AE2085B} = {446C3DE3-A775-48A2-B188-A4B3484055EA} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {B41F6F2B-9220-4A42-A69F-4BF2CA7E201A} diff --git a/src/libraries/Microsoft.Win32.SystemEvents/Microsoft.Win32.SystemEvents.sln b/src/libraries/Microsoft.Win32.SystemEvents/Microsoft.Win32.SystemEvents.sln index ca7cb627831f30..7cfb2daceab602 100644 --- a/src/libraries/Microsoft.Win32.SystemEvents/Microsoft.Win32.SystemEvents.sln +++ b/src/libraries/Microsoft.Win32.SystemEvents/Microsoft.Win32.SystemEvents.sln @@ -7,12 +7,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Win32.SystemEvent EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Win32.SystemEvents.Tests", "tests\Microsoft.Win32.SystemEvents.Tests.csproj", "{86962B5A-AC38-44FA-B25B-74ABAC57E534}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{F0C0F55A-1DD1-44BE-A4B7-00E3B07846A2}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{2D9943FB-EBD4-4994-BDCA-7C0087CD499B}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{1F21915D-D799-4AAA-9053-8BFFD5102FF1}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{B1351B74-82F9-4CE6-AE68-25521A465AF4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{FF36AE65-50BE-4C1D-8216-5038443D3BA4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{EDC41408-CD3D-474D-AA9E-EE60402517D3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{90476BE6-797F-41AA-89AC-0BD7DB8885AE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{0A0B8523-102B-45CB-9922-3F4F5E43C086}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{F2A4093D-6291-4A9C-87FC-6B06D2324E38}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{8BF90E54-BE73-4BBF-89CB-E9BE5DD1FC9E}" @@ -21,6 +29,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A9588D3E-04F EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{B7447478-7C05-441D-BDDF-538008B24CBD}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{8B8F314C-81E4-4624-B88D-DEF6F2F34C03}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{A5504349-FE82-4E8C-AF7F-D1B6993CF918}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{EC14A20F-FE39-42EB-B642-2DA6409FE7B1}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{403A31DA-6D6F-4B63-BE94-20DA513BBE4B}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -43,10 +59,6 @@ Global {86962B5A-AC38-44FA-B25B-74ABAC57E534}.Debug|Any CPU.Build.0 = Debug|Any CPU {86962B5A-AC38-44FA-B25B-74ABAC57E534}.Release|Any CPU.ActiveCfg = Release|Any CPU {86962B5A-AC38-44FA-B25B-74ABAC57E534}.Release|Any CPU.Build.0 = Release|Any CPU - {F0C0F55A-1DD1-44BE-A4B7-00E3B07846A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F0C0F55A-1DD1-44BE-A4B7-00E3B07846A2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F0C0F55A-1DD1-44BE-A4B7-00E3B07846A2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F0C0F55A-1DD1-44BE-A4B7-00E3B07846A2}.Release|Any CPU.Build.0 = Release|Any CPU {2D9943FB-EBD4-4994-BDCA-7C0087CD499B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2D9943FB-EBD4-4994-BDCA-7C0087CD499B}.Debug|Any CPU.Build.0 = Debug|Any CPU {2D9943FB-EBD4-4994-BDCA-7C0087CD499B}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -55,6 +67,26 @@ Global {1F21915D-D799-4AAA-9053-8BFFD5102FF1}.Debug|Any CPU.Build.0 = Debug|Any CPU {1F21915D-D799-4AAA-9053-8BFFD5102FF1}.Release|Any CPU.ActiveCfg = Release|Any CPU {1F21915D-D799-4AAA-9053-8BFFD5102FF1}.Release|Any CPU.Build.0 = Release|Any CPU + {B1351B74-82F9-4CE6-AE68-25521A465AF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B1351B74-82F9-4CE6-AE68-25521A465AF4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B1351B74-82F9-4CE6-AE68-25521A465AF4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B1351B74-82F9-4CE6-AE68-25521A465AF4}.Release|Any CPU.Build.0 = Release|Any CPU + {FF36AE65-50BE-4C1D-8216-5038443D3BA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FF36AE65-50BE-4C1D-8216-5038443D3BA4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FF36AE65-50BE-4C1D-8216-5038443D3BA4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FF36AE65-50BE-4C1D-8216-5038443D3BA4}.Release|Any CPU.Build.0 = Release|Any CPU + {EDC41408-CD3D-474D-AA9E-EE60402517D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EDC41408-CD3D-474D-AA9E-EE60402517D3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EDC41408-CD3D-474D-AA9E-EE60402517D3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EDC41408-CD3D-474D-AA9E-EE60402517D3}.Release|Any CPU.Build.0 = Release|Any CPU + {90476BE6-797F-41AA-89AC-0BD7DB8885AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {90476BE6-797F-41AA-89AC-0BD7DB8885AE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {90476BE6-797F-41AA-89AC-0BD7DB8885AE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {90476BE6-797F-41AA-89AC-0BD7DB8885AE}.Release|Any CPU.Build.0 = Release|Any CPU + {0A0B8523-102B-45CB-9922-3F4F5E43C086}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0A0B8523-102B-45CB-9922-3F4F5E43C086}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0A0B8523-102B-45CB-9922-3F4F5E43C086}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0A0B8523-102B-45CB-9922-3F4F5E43C086}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -64,9 +96,16 @@ Global {86962B5A-AC38-44FA-B25B-74ABAC57E534} = {F2A4093D-6291-4A9C-87FC-6B06D2324E38} {A586D099-E8B0-4C2F-B4AD-BCFA98429DBF} = {8BF90E54-BE73-4BBF-89CB-E9BE5DD1FC9E} {20C56707-2960-4DF2-BF76-5556304EE7CF} = {A9588D3E-04F0-4294-8D1A-84CF3D84804A} - {F0C0F55A-1DD1-44BE-A4B7-00E3B07846A2} = {B7447478-7C05-441D-BDDF-538008B24CBD} {2D9943FB-EBD4-4994-BDCA-7C0087CD499B} = {B7447478-7C05-441D-BDDF-538008B24CBD} {1F21915D-D799-4AAA-9053-8BFFD5102FF1} = {B7447478-7C05-441D-BDDF-538008B24CBD} + {B1351B74-82F9-4CE6-AE68-25521A465AF4} = {8B8F314C-81E4-4624-B88D-DEF6F2F34C03} + {FF36AE65-50BE-4C1D-8216-5038443D3BA4} = {8B8F314C-81E4-4624-B88D-DEF6F2F34C03} + {8B8F314C-81E4-4624-B88D-DEF6F2F34C03} = {403A31DA-6D6F-4B63-BE94-20DA513BBE4B} + {EDC41408-CD3D-474D-AA9E-EE60402517D3} = {A5504349-FE82-4E8C-AF7F-D1B6993CF918} + {90476BE6-797F-41AA-89AC-0BD7DB8885AE} = {A5504349-FE82-4E8C-AF7F-D1B6993CF918} + {A5504349-FE82-4E8C-AF7F-D1B6993CF918} = {403A31DA-6D6F-4B63-BE94-20DA513BBE4B} + {0A0B8523-102B-45CB-9922-3F4F5E43C086} = {EC14A20F-FE39-42EB-B642-2DA6409FE7B1} + {EC14A20F-FE39-42EB-B642-2DA6409FE7B1} = {403A31DA-6D6F-4B63-BE94-20DA513BBE4B} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {14621231-E5C2-4B46-9ADC-1182F2721D07} diff --git a/src/libraries/Microsoft.Win32.SystemEvents/src/CompatibilitySuppressions.xml b/src/libraries/Microsoft.Win32.SystemEvents/src/CompatibilitySuppressions.xml index f08f9dcce879f5..639d29998aa603 100644 --- a/src/libraries/Microsoft.Win32.SystemEvents/src/CompatibilitySuppressions.xml +++ b/src/libraries/Microsoft.Win32.SystemEvents/src/CompatibilitySuppressions.xml @@ -1,4 +1,5 @@  + CP0015 diff --git a/src/libraries/Microsoft.Win32.SystemEvents/src/Microsoft.Win32.SystemEvents.csproj b/src/libraries/Microsoft.Win32.SystemEvents/src/Microsoft.Win32.SystemEvents.csproj index 3f81c9c710b169..8a6fa8533f9f05 100644 --- a/src/libraries/Microsoft.Win32.SystemEvents/src/Microsoft.Win32.SystemEvents.csproj +++ b/src/libraries/Microsoft.Win32.SystemEvents/src/Microsoft.Win32.SystemEvents.csproj @@ -1,4 +1,5 @@ + $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent);$(NetCoreAppPrevious)-windows;$(NetCoreAppPrevious);$(NetCoreAppMinimum)-windows;$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) true @@ -120,11 +121,16 @@ Microsoft.Win32.SystemEvents + + + + Link="Common\DisableRuntimeMarshalling.cs" /> + + + + Link="System\Runtime\InteropServices\SuppressGCTransitionAttribute.cs" /> + diff --git a/src/libraries/Microsoft.XmlSerializer.Generator/Microsoft.XmlSerializer.Generator.sln b/src/libraries/Microsoft.XmlSerializer.Generator/Microsoft.XmlSerializer.Generator.sln index 2b0e64aecc3d4e..50e0e8ae8f168f 100644 --- a/src/libraries/Microsoft.XmlSerializer.Generator/Microsoft.XmlSerializer.Generator.sln +++ b/src/libraries/Microsoft.XmlSerializer.Generator/Microsoft.XmlSerializer.Generator.sln @@ -7,18 +7,34 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.XmlSerializer.Gen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SerializableAssembly", "tests\SerializableAssembly.csproj", "{9D614FC7-0A88-4E85-B8A9-25FFFD71C47A}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{76BEA53B-7E34-47AA-95E2-6295169AC970}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{2307F11D-6FF4-45B0-9FA2-7B9807647E2B}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{B1A05556-02FE-4BC0-89E4-4C6CC751675B}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{B420E4A6-7A45-4FFA-B3AC-1A1A49D9C08F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{0317802B-EEEA-4AFB-A8D2-B67A12EAD0C2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{3CC83A70-C509-436C-AEAD-F2378CBF4E95}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{5316C388-22B9-4F32-B50B-F0B5C3F5E72B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{96CF41F5-97AA-4695-B191-4B5F13C2B9EF}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{BA160273-1658-4D63-8BB0-BEDDA0DAF20D}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{CC406051-3EEC-4E4F-8152-2F1BE15D61BA}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{A3A8F98E-3524-4E5A-87C5-5324FD52E296}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{99FE37B2-FBA7-4093-996F-702B154514C6}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{D21A60D5-4BB7-4AEE-A35B-1445FB125E9E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{7AB2F2C8-A835-405E-B7DA-2ADDC8981490}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{ADBFF9D5-22FC-419C-9029-72CFBE7E7E6D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -41,10 +57,6 @@ Global {9D614FC7-0A88-4E85-B8A9-25FFFD71C47A}.Debug|Any CPU.Build.0 = Debug|Any CPU {9D614FC7-0A88-4E85-B8A9-25FFFD71C47A}.Release|Any CPU.ActiveCfg = Release|Any CPU {9D614FC7-0A88-4E85-B8A9-25FFFD71C47A}.Release|Any CPU.Build.0 = Release|Any CPU - {76BEA53B-7E34-47AA-95E2-6295169AC970}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {76BEA53B-7E34-47AA-95E2-6295169AC970}.Debug|Any CPU.Build.0 = Debug|Any CPU - {76BEA53B-7E34-47AA-95E2-6295169AC970}.Release|Any CPU.ActiveCfg = Release|Any CPU - {76BEA53B-7E34-47AA-95E2-6295169AC970}.Release|Any CPU.Build.0 = Release|Any CPU {2307F11D-6FF4-45B0-9FA2-7B9807647E2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2307F11D-6FF4-45B0-9FA2-7B9807647E2B}.Debug|Any CPU.Build.0 = Debug|Any CPU {2307F11D-6FF4-45B0-9FA2-7B9807647E2B}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -53,6 +65,26 @@ Global {B1A05556-02FE-4BC0-89E4-4C6CC751675B}.Debug|Any CPU.Build.0 = Debug|Any CPU {B1A05556-02FE-4BC0-89E4-4C6CC751675B}.Release|Any CPU.ActiveCfg = Release|Any CPU {B1A05556-02FE-4BC0-89E4-4C6CC751675B}.Release|Any CPU.Build.0 = Release|Any CPU + {B420E4A6-7A45-4FFA-B3AC-1A1A49D9C08F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B420E4A6-7A45-4FFA-B3AC-1A1A49D9C08F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B420E4A6-7A45-4FFA-B3AC-1A1A49D9C08F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B420E4A6-7A45-4FFA-B3AC-1A1A49D9C08F}.Release|Any CPU.Build.0 = Release|Any CPU + {0317802B-EEEA-4AFB-A8D2-B67A12EAD0C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0317802B-EEEA-4AFB-A8D2-B67A12EAD0C2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0317802B-EEEA-4AFB-A8D2-B67A12EAD0C2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0317802B-EEEA-4AFB-A8D2-B67A12EAD0C2}.Release|Any CPU.Build.0 = Release|Any CPU + {3CC83A70-C509-436C-AEAD-F2378CBF4E95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3CC83A70-C509-436C-AEAD-F2378CBF4E95}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3CC83A70-C509-436C-AEAD-F2378CBF4E95}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3CC83A70-C509-436C-AEAD-F2378CBF4E95}.Release|Any CPU.Build.0 = Release|Any CPU + {5316C388-22B9-4F32-B50B-F0B5C3F5E72B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5316C388-22B9-4F32-B50B-F0B5C3F5E72B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5316C388-22B9-4F32-B50B-F0B5C3F5E72B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5316C388-22B9-4F32-B50B-F0B5C3F5E72B}.Release|Any CPU.Build.0 = Release|Any CPU + {96CF41F5-97AA-4695-B191-4B5F13C2B9EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {96CF41F5-97AA-4695-B191-4B5F13C2B9EF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {96CF41F5-97AA-4695-B191-4B5F13C2B9EF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {96CF41F5-97AA-4695-B191-4B5F13C2B9EF}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -62,9 +94,16 @@ Global {A90B6063-66BB-486C-8267-43AC8F9C5196} = {BA160273-1658-4D63-8BB0-BEDDA0DAF20D} {9D614FC7-0A88-4E85-B8A9-25FFFD71C47A} = {BA160273-1658-4D63-8BB0-BEDDA0DAF20D} {3C8417AB-8E73-4EBF-B090-1367F3D23468} = {CC406051-3EEC-4E4F-8152-2F1BE15D61BA} - {76BEA53B-7E34-47AA-95E2-6295169AC970} = {A3A8F98E-3524-4E5A-87C5-5324FD52E296} {2307F11D-6FF4-45B0-9FA2-7B9807647E2B} = {A3A8F98E-3524-4E5A-87C5-5324FD52E296} {B1A05556-02FE-4BC0-89E4-4C6CC751675B} = {A3A8F98E-3524-4E5A-87C5-5324FD52E296} + {B420E4A6-7A45-4FFA-B3AC-1A1A49D9C08F} = {99FE37B2-FBA7-4093-996F-702B154514C6} + {0317802B-EEEA-4AFB-A8D2-B67A12EAD0C2} = {99FE37B2-FBA7-4093-996F-702B154514C6} + {99FE37B2-FBA7-4093-996F-702B154514C6} = {ADBFF9D5-22FC-419C-9029-72CFBE7E7E6D} + {3CC83A70-C509-436C-AEAD-F2378CBF4E95} = {D21A60D5-4BB7-4AEE-A35B-1445FB125E9E} + {5316C388-22B9-4F32-B50B-F0B5C3F5E72B} = {D21A60D5-4BB7-4AEE-A35B-1445FB125E9E} + {D21A60D5-4BB7-4AEE-A35B-1445FB125E9E} = {ADBFF9D5-22FC-419C-9029-72CFBE7E7E6D} + {96CF41F5-97AA-4695-B191-4B5F13C2B9EF} = {7AB2F2C8-A835-405E-B7DA-2ADDC8981490} + {7AB2F2C8-A835-405E-B7DA-2ADDC8981490} = {ADBFF9D5-22FC-419C-9029-72CFBE7E7E6D} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {E4BEDA84-BAED-4E86-B18F-8417E2FD10BB} diff --git a/src/libraries/System.CodeDom/System.CodeDom.sln b/src/libraries/System.CodeDom/System.CodeDom.sln index 1d7d0c26758155..cb1e942fcd8369 100644 --- a/src/libraries/System.CodeDom/System.CodeDom.sln +++ b/src/libraries/System.CodeDom/System.CodeDom.sln @@ -7,12 +7,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.CodeDom", "src\Syste EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.CodeDom.Tests", "tests\System.CodeDom.Tests.csproj", "{627FFEFC-A317-4AD1-809F-B26CA7F475BD}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{B2B4DB84-BDEC-411F-AD9E-D385D289ACA1}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{B9251B70-FF97-4950-ABA7-50AB281D8F8E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{BB92EB52-7A9C-49C7-AC26-53864BAD4E1A}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{D1FCA81A-628F-42E8-9998-B1AE3AADF8FD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{6911785C-F046-4726-9035-5F67887F3AA9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{21C5C313-46B5-48B6-A40E-BA5479E50627}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{8779FDDF-4A1F-4465-9EAB-8BF3FE7BE000}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{3E702105-EF2D-4FE4-ABF6-F589BDA44130}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{2D7D470B-B092-45BC-900A-CDB20CA94BE7}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{54321C0F-1323-4962-A01C-AC07028C3FA8}" @@ -21,6 +29,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{6591788E-089 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{91ED5DF2-6A20-4B11-B671-19BB53254EE7}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{D7A93C90-3F4E-4BC8-B5BD-5D8F5329B1AB}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{DD0E58EC-3356-4891-A67F-31E86643130C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{DCF41AAC-9D70-4586-822A-4F0053888BF5}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{F03612EB-5E57-41EC-B546-C853D7F831EF}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -43,10 +59,6 @@ Global {627FFEFC-A317-4AD1-809F-B26CA7F475BD}.Debug|Any CPU.Build.0 = Debug|Any CPU {627FFEFC-A317-4AD1-809F-B26CA7F475BD}.Release|Any CPU.ActiveCfg = Release|Any CPU {627FFEFC-A317-4AD1-809F-B26CA7F475BD}.Release|Any CPU.Build.0 = Release|Any CPU - {B2B4DB84-BDEC-411F-AD9E-D385D289ACA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B2B4DB84-BDEC-411F-AD9E-D385D289ACA1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B2B4DB84-BDEC-411F-AD9E-D385D289ACA1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B2B4DB84-BDEC-411F-AD9E-D385D289ACA1}.Release|Any CPU.Build.0 = Release|Any CPU {B9251B70-FF97-4950-ABA7-50AB281D8F8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B9251B70-FF97-4950-ABA7-50AB281D8F8E}.Debug|Any CPU.Build.0 = Debug|Any CPU {B9251B70-FF97-4950-ABA7-50AB281D8F8E}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -55,6 +67,26 @@ Global {BB92EB52-7A9C-49C7-AC26-53864BAD4E1A}.Debug|Any CPU.Build.0 = Debug|Any CPU {BB92EB52-7A9C-49C7-AC26-53864BAD4E1A}.Release|Any CPU.ActiveCfg = Release|Any CPU {BB92EB52-7A9C-49C7-AC26-53864BAD4E1A}.Release|Any CPU.Build.0 = Release|Any CPU + {D1FCA81A-628F-42E8-9998-B1AE3AADF8FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D1FCA81A-628F-42E8-9998-B1AE3AADF8FD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D1FCA81A-628F-42E8-9998-B1AE3AADF8FD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D1FCA81A-628F-42E8-9998-B1AE3AADF8FD}.Release|Any CPU.Build.0 = Release|Any CPU + {6911785C-F046-4726-9035-5F67887F3AA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6911785C-F046-4726-9035-5F67887F3AA9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6911785C-F046-4726-9035-5F67887F3AA9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6911785C-F046-4726-9035-5F67887F3AA9}.Release|Any CPU.Build.0 = Release|Any CPU + {21C5C313-46B5-48B6-A40E-BA5479E50627}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {21C5C313-46B5-48B6-A40E-BA5479E50627}.Debug|Any CPU.Build.0 = Debug|Any CPU + {21C5C313-46B5-48B6-A40E-BA5479E50627}.Release|Any CPU.ActiveCfg = Release|Any CPU + {21C5C313-46B5-48B6-A40E-BA5479E50627}.Release|Any CPU.Build.0 = Release|Any CPU + {8779FDDF-4A1F-4465-9EAB-8BF3FE7BE000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8779FDDF-4A1F-4465-9EAB-8BF3FE7BE000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8779FDDF-4A1F-4465-9EAB-8BF3FE7BE000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8779FDDF-4A1F-4465-9EAB-8BF3FE7BE000}.Release|Any CPU.Build.0 = Release|Any CPU + {3E702105-EF2D-4FE4-ABF6-F589BDA44130}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3E702105-EF2D-4FE4-ABF6-F589BDA44130}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3E702105-EF2D-4FE4-ABF6-F589BDA44130}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3E702105-EF2D-4FE4-ABF6-F589BDA44130}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -64,9 +96,16 @@ Global {627FFEFC-A317-4AD1-809F-B26CA7F475BD} = {2D7D470B-B092-45BC-900A-CDB20CA94BE7} {74AE27CF-E940-4EEB-9A19-0968689B627E} = {54321C0F-1323-4962-A01C-AC07028C3FA8} {14D5A803-D5BF-44E5-B2B5-0B0BC297748E} = {6591788E-0894-4655-AE2F-602407C4F766} - {B2B4DB84-BDEC-411F-AD9E-D385D289ACA1} = {91ED5DF2-6A20-4B11-B671-19BB53254EE7} {B9251B70-FF97-4950-ABA7-50AB281D8F8E} = {91ED5DF2-6A20-4B11-B671-19BB53254EE7} {BB92EB52-7A9C-49C7-AC26-53864BAD4E1A} = {91ED5DF2-6A20-4B11-B671-19BB53254EE7} + {D1FCA81A-628F-42E8-9998-B1AE3AADF8FD} = {D7A93C90-3F4E-4BC8-B5BD-5D8F5329B1AB} + {6911785C-F046-4726-9035-5F67887F3AA9} = {D7A93C90-3F4E-4BC8-B5BD-5D8F5329B1AB} + {D7A93C90-3F4E-4BC8-B5BD-5D8F5329B1AB} = {F03612EB-5E57-41EC-B546-C853D7F831EF} + {21C5C313-46B5-48B6-A40E-BA5479E50627} = {DD0E58EC-3356-4891-A67F-31E86643130C} + {8779FDDF-4A1F-4465-9EAB-8BF3FE7BE000} = {DD0E58EC-3356-4891-A67F-31E86643130C} + {DD0E58EC-3356-4891-A67F-31E86643130C} = {F03612EB-5E57-41EC-B546-C853D7F831EF} + {3E702105-EF2D-4FE4-ABF6-F589BDA44130} = {DCF41AAC-9D70-4586-822A-4F0053888BF5} + {DCF41AAC-9D70-4586-822A-4F0053888BF5} = {F03612EB-5E57-41EC-B546-C853D7F831EF} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {70EC5780-3C80-4D52-93B0-7FBF64E29572} diff --git a/src/libraries/System.CodeDom/src/CompatibilitySuppressions.xml b/src/libraries/System.CodeDom/src/CompatibilitySuppressions.xml index abed7359129fd8..50206f3d2583e0 100644 --- a/src/libraries/System.CodeDom/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.CodeDom/src/CompatibilitySuppressions.xml @@ -1,4 +1,5 @@  + CP0015 @@ -48,4 +49,18 @@ lib/netstandard2.0/System.CodeDom.dll lib/net462/System.CodeDom.dll + + CP1002 + System.ComponentModel.Primitives, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.CodeDom.dll + lib/netstandard2.0/System.CodeDom.dll + true + + + CP1002 + System.ComponentModel.Primitives, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.CodeDom.dll + lib/netstandard2.0/System.CodeDom.dll + true + \ No newline at end of file diff --git a/src/libraries/System.Collections.Concurrent/System.Collections.Concurrent.sln b/src/libraries/System.Collections.Concurrent/System.Collections.Concurrent.sln index 37fabd786c0a40..a9bd722e27fce0 100644 --- a/src/libraries/System.Collections.Concurrent/System.Collections.Concurrent.sln +++ b/src/libraries/System.Collections.Concurrent/System.Collections.Concurrent.sln @@ -31,14 +31,34 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading", "..\Syst EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading", "..\System.Threading\src\System.Threading.csproj", "{FA6BD4D3-8D9B-4CA2-B8C6-A1A21F946AC2}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C4EA7573-E0AC-45D9-A29A-F6C6DECED4B0}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{2266BB4C-0245-437D-8346-CFF899111225}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{7BBDF9FE-BE36-417F-89EC-967263297931}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{18539371-17FB-4617-9DB7-5E998F65E52E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{61275B26-9E67-4E89-BC0F-5166096CFA4B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{86053D20-DEBA-4A02-A9A0-8E9F1EA088CE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{4AAACB52-764E-41A5-BAE3-BCAD7F69CFBB}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{64657647-6C2C-4D36-A5D4-7E7534F3C66F}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{CA1F4ADE-3F2A-40E3-9242-549F88F0367F}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C4EA7573-E0AC-45D9-A29A-F6C6DECED4B0}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{93EF6213-7FD5-4A26-A8AB-AF8E4DB470FD}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{66E1333A-027B-4577-AED6-A2457698A6D9}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{FEB1EA07-0931-4DFB-831F-DDE392FD6596}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{08A6CC96-3D48-47AB-8FD8-D1478438FCC4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{AEEE96F9-DAE8-4E18-95BA-070788484090}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -403,16 +423,117 @@ Global {FA6BD4D3-8D9B-4CA2-B8C6-A1A21F946AC2}.Checked|arm64.ActiveCfg = Debug|Any CPU {FA6BD4D3-8D9B-4CA2-B8C6-A1A21F946AC2}.Checked|x64.ActiveCfg = Debug|Any CPU {FA6BD4D3-8D9B-4CA2-B8C6-A1A21F946AC2}.Checked|x86.ActiveCfg = Debug|Any CPU + {2266BB4C-0245-437D-8346-CFF899111225}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2266BB4C-0245-437D-8346-CFF899111225}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2266BB4C-0245-437D-8346-CFF899111225}.Debug|arm.ActiveCfg = Debug|Any CPU + {2266BB4C-0245-437D-8346-CFF899111225}.Debug|arm64.ActiveCfg = Debug|Any CPU + {2266BB4C-0245-437D-8346-CFF899111225}.Debug|x64.ActiveCfg = Debug|Any CPU + {2266BB4C-0245-437D-8346-CFF899111225}.Debug|x64.Build.0 = Debug|Any CPU + {2266BB4C-0245-437D-8346-CFF899111225}.Debug|x86.ActiveCfg = Debug|Any CPU + {2266BB4C-0245-437D-8346-CFF899111225}.Debug|x86.Build.0 = Debug|Any CPU + {2266BB4C-0245-437D-8346-CFF899111225}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2266BB4C-0245-437D-8346-CFF899111225}.Release|Any CPU.Build.0 = Release|Any CPU + {2266BB4C-0245-437D-8346-CFF899111225}.Release|arm.ActiveCfg = Release|Any CPU + {2266BB4C-0245-437D-8346-CFF899111225}.Release|arm64.ActiveCfg = Release|Any CPU + {2266BB4C-0245-437D-8346-CFF899111225}.Release|x64.ActiveCfg = Release|Any CPU + {2266BB4C-0245-437D-8346-CFF899111225}.Release|x64.Build.0 = Release|Any CPU + {2266BB4C-0245-437D-8346-CFF899111225}.Release|x86.ActiveCfg = Release|Any CPU + {2266BB4C-0245-437D-8346-CFF899111225}.Release|x86.Build.0 = Release|Any CPU + {2266BB4C-0245-437D-8346-CFF899111225}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {2266BB4C-0245-437D-8346-CFF899111225}.Checked|arm.ActiveCfg = Debug|Any CPU + {2266BB4C-0245-437D-8346-CFF899111225}.Checked|arm64.ActiveCfg = Debug|Any CPU + {2266BB4C-0245-437D-8346-CFF899111225}.Checked|x64.ActiveCfg = Debug|Any CPU + {2266BB4C-0245-437D-8346-CFF899111225}.Checked|x86.ActiveCfg = Debug|Any CPU + {7BBDF9FE-BE36-417F-89EC-967263297931}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7BBDF9FE-BE36-417F-89EC-967263297931}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7BBDF9FE-BE36-417F-89EC-967263297931}.Debug|arm.ActiveCfg = Debug|Any CPU + {7BBDF9FE-BE36-417F-89EC-967263297931}.Debug|arm64.ActiveCfg = Debug|Any CPU + {7BBDF9FE-BE36-417F-89EC-967263297931}.Debug|x64.ActiveCfg = Debug|Any CPU + {7BBDF9FE-BE36-417F-89EC-967263297931}.Debug|x64.Build.0 = Debug|Any CPU + {7BBDF9FE-BE36-417F-89EC-967263297931}.Debug|x86.ActiveCfg = Debug|Any CPU + {7BBDF9FE-BE36-417F-89EC-967263297931}.Debug|x86.Build.0 = Debug|Any CPU + {7BBDF9FE-BE36-417F-89EC-967263297931}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7BBDF9FE-BE36-417F-89EC-967263297931}.Release|Any CPU.Build.0 = Release|Any CPU + {7BBDF9FE-BE36-417F-89EC-967263297931}.Release|arm.ActiveCfg = Release|Any CPU + {7BBDF9FE-BE36-417F-89EC-967263297931}.Release|arm64.ActiveCfg = Release|Any CPU + {7BBDF9FE-BE36-417F-89EC-967263297931}.Release|x64.ActiveCfg = Release|Any CPU + {7BBDF9FE-BE36-417F-89EC-967263297931}.Release|x64.Build.0 = Release|Any CPU + {7BBDF9FE-BE36-417F-89EC-967263297931}.Release|x86.ActiveCfg = Release|Any CPU + {7BBDF9FE-BE36-417F-89EC-967263297931}.Release|x86.Build.0 = Release|Any CPU + {7BBDF9FE-BE36-417F-89EC-967263297931}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {7BBDF9FE-BE36-417F-89EC-967263297931}.Checked|arm.ActiveCfg = Debug|Any CPU + {7BBDF9FE-BE36-417F-89EC-967263297931}.Checked|arm64.ActiveCfg = Debug|Any CPU + {7BBDF9FE-BE36-417F-89EC-967263297931}.Checked|x64.ActiveCfg = Debug|Any CPU + {7BBDF9FE-BE36-417F-89EC-967263297931}.Checked|x86.ActiveCfg = Debug|Any CPU + {18539371-17FB-4617-9DB7-5E998F65E52E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {18539371-17FB-4617-9DB7-5E998F65E52E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {18539371-17FB-4617-9DB7-5E998F65E52E}.Debug|arm.ActiveCfg = Debug|Any CPU + {18539371-17FB-4617-9DB7-5E998F65E52E}.Debug|arm64.ActiveCfg = Debug|Any CPU + {18539371-17FB-4617-9DB7-5E998F65E52E}.Debug|x64.ActiveCfg = Debug|Any CPU + {18539371-17FB-4617-9DB7-5E998F65E52E}.Debug|x64.Build.0 = Debug|Any CPU + {18539371-17FB-4617-9DB7-5E998F65E52E}.Debug|x86.ActiveCfg = Debug|Any CPU + {18539371-17FB-4617-9DB7-5E998F65E52E}.Debug|x86.Build.0 = Debug|Any CPU + {18539371-17FB-4617-9DB7-5E998F65E52E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {18539371-17FB-4617-9DB7-5E998F65E52E}.Release|Any CPU.Build.0 = Release|Any CPU + {18539371-17FB-4617-9DB7-5E998F65E52E}.Release|arm.ActiveCfg = Release|Any CPU + {18539371-17FB-4617-9DB7-5E998F65E52E}.Release|arm64.ActiveCfg = Release|Any CPU + {18539371-17FB-4617-9DB7-5E998F65E52E}.Release|x64.ActiveCfg = Release|Any CPU + {18539371-17FB-4617-9DB7-5E998F65E52E}.Release|x64.Build.0 = Release|Any CPU + {18539371-17FB-4617-9DB7-5E998F65E52E}.Release|x86.ActiveCfg = Release|Any CPU + {18539371-17FB-4617-9DB7-5E998F65E52E}.Release|x86.Build.0 = Release|Any CPU + {18539371-17FB-4617-9DB7-5E998F65E52E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {18539371-17FB-4617-9DB7-5E998F65E52E}.Checked|arm.ActiveCfg = Debug|Any CPU + {18539371-17FB-4617-9DB7-5E998F65E52E}.Checked|arm64.ActiveCfg = Debug|Any CPU + {18539371-17FB-4617-9DB7-5E998F65E52E}.Checked|x64.ActiveCfg = Debug|Any CPU + {18539371-17FB-4617-9DB7-5E998F65E52E}.Checked|x86.ActiveCfg = Debug|Any CPU + {61275B26-9E67-4E89-BC0F-5166096CFA4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {61275B26-9E67-4E89-BC0F-5166096CFA4B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {61275B26-9E67-4E89-BC0F-5166096CFA4B}.Debug|arm.ActiveCfg = Debug|Any CPU + {61275B26-9E67-4E89-BC0F-5166096CFA4B}.Debug|arm64.ActiveCfg = Debug|Any CPU + {61275B26-9E67-4E89-BC0F-5166096CFA4B}.Debug|x64.ActiveCfg = Debug|Any CPU + {61275B26-9E67-4E89-BC0F-5166096CFA4B}.Debug|x64.Build.0 = Debug|Any CPU + {61275B26-9E67-4E89-BC0F-5166096CFA4B}.Debug|x86.ActiveCfg = Debug|Any CPU + {61275B26-9E67-4E89-BC0F-5166096CFA4B}.Debug|x86.Build.0 = Debug|Any CPU + {61275B26-9E67-4E89-BC0F-5166096CFA4B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {61275B26-9E67-4E89-BC0F-5166096CFA4B}.Release|Any CPU.Build.0 = Release|Any CPU + {61275B26-9E67-4E89-BC0F-5166096CFA4B}.Release|arm.ActiveCfg = Release|Any CPU + {61275B26-9E67-4E89-BC0F-5166096CFA4B}.Release|arm64.ActiveCfg = Release|Any CPU + {61275B26-9E67-4E89-BC0F-5166096CFA4B}.Release|x64.ActiveCfg = Release|Any CPU + {61275B26-9E67-4E89-BC0F-5166096CFA4B}.Release|x64.Build.0 = Release|Any CPU + {61275B26-9E67-4E89-BC0F-5166096CFA4B}.Release|x86.ActiveCfg = Release|Any CPU + {61275B26-9E67-4E89-BC0F-5166096CFA4B}.Release|x86.Build.0 = Release|Any CPU + {61275B26-9E67-4E89-BC0F-5166096CFA4B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {61275B26-9E67-4E89-BC0F-5166096CFA4B}.Checked|arm.ActiveCfg = Debug|Any CPU + {61275B26-9E67-4E89-BC0F-5166096CFA4B}.Checked|arm64.ActiveCfg = Debug|Any CPU + {61275B26-9E67-4E89-BC0F-5166096CFA4B}.Checked|x64.ActiveCfg = Debug|Any CPU + {61275B26-9E67-4E89-BC0F-5166096CFA4B}.Checked|x86.ActiveCfg = Debug|Any CPU + {86053D20-DEBA-4A02-A9A0-8E9F1EA088CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {86053D20-DEBA-4A02-A9A0-8E9F1EA088CE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {86053D20-DEBA-4A02-A9A0-8E9F1EA088CE}.Debug|arm.ActiveCfg = Debug|Any CPU + {86053D20-DEBA-4A02-A9A0-8E9F1EA088CE}.Debug|arm64.ActiveCfg = Debug|Any CPU + {86053D20-DEBA-4A02-A9A0-8E9F1EA088CE}.Debug|x64.ActiveCfg = Debug|Any CPU + {86053D20-DEBA-4A02-A9A0-8E9F1EA088CE}.Debug|x64.Build.0 = Debug|Any CPU + {86053D20-DEBA-4A02-A9A0-8E9F1EA088CE}.Debug|x86.ActiveCfg = Debug|Any CPU + {86053D20-DEBA-4A02-A9A0-8E9F1EA088CE}.Debug|x86.Build.0 = Debug|Any CPU + {86053D20-DEBA-4A02-A9A0-8E9F1EA088CE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {86053D20-DEBA-4A02-A9A0-8E9F1EA088CE}.Release|Any CPU.Build.0 = Release|Any CPU + {86053D20-DEBA-4A02-A9A0-8E9F1EA088CE}.Release|arm.ActiveCfg = Release|Any CPU + {86053D20-DEBA-4A02-A9A0-8E9F1EA088CE}.Release|arm64.ActiveCfg = Release|Any CPU + {86053D20-DEBA-4A02-A9A0-8E9F1EA088CE}.Release|x64.ActiveCfg = Release|Any CPU + {86053D20-DEBA-4A02-A9A0-8E9F1EA088CE}.Release|x64.Build.0 = Release|Any CPU + {86053D20-DEBA-4A02-A9A0-8E9F1EA088CE}.Release|x86.ActiveCfg = Release|Any CPU + {86053D20-DEBA-4A02-A9A0-8E9F1EA088CE}.Release|x86.Build.0 = Release|Any CPU + {86053D20-DEBA-4A02-A9A0-8E9F1EA088CE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {86053D20-DEBA-4A02-A9A0-8E9F1EA088CE}.Checked|arm.ActiveCfg = Debug|Any CPU + {86053D20-DEBA-4A02-A9A0-8E9F1EA088CE}.Checked|arm64.ActiveCfg = Debug|Any CPU + {86053D20-DEBA-4A02-A9A0-8E9F1EA088CE}.Checked|x64.ActiveCfg = Debug|Any CPU + {86053D20-DEBA-4A02-A9A0-8E9F1EA088CE}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {A8E6D68A-AFEE-4B68-ACE1-074CD1BCC322} = {C4EA7573-E0AC-45D9-A29A-F6C6DECED4B0} - {BFA1A52C-48B4-45C7-8595-B98236A11ED1} = {C4EA7573-E0AC-45D9-A29A-F6C6DECED4B0} - {34C59132-692C-45D7-87BD-869A18F09E2C} = {C4EA7573-E0AC-45D9-A29A-F6C6DECED4B0} - {93FB3527-B9E6-4ECA-8F36-56835F4F9236} = {C4EA7573-E0AC-45D9-A29A-F6C6DECED4B0} - {FA6BD4D3-8D9B-4CA2-B8C6-A1A21F946AC2} = {C4EA7573-E0AC-45D9-A29A-F6C6DECED4B0} + {A8E6D68A-AFEE-4B68-ACE1-074CD1BCC322} = {4AAACB52-764E-41A5-BAE3-BCAD7F69CFBB} {7C2B8279-F7BB-4AD4-BA44-B9071090AF46} = {64657647-6C2C-4D36-A5D4-7E7534F3C66F} {C391ADBE-DD23-4F4A-B3EC-011974CC6CE8} = {64657647-6C2C-4D36-A5D4-7E7534F3C66F} {ADA6D062-1E28-47D8-A058-FE1F4551AA20} = {CA1F4ADE-3F2A-40E3-9242-549F88F0367F} @@ -421,9 +542,21 @@ Global {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} + {BFA1A52C-48B4-45C7-8595-B98236A11ED1} = {C4EA7573-E0AC-45D9-A29A-F6C6DECED4B0} + {34C59132-692C-45D7-87BD-869A18F09E2C} = {C4EA7573-E0AC-45D9-A29A-F6C6DECED4B0} + {93FB3527-B9E6-4ECA-8F36-56835F4F9236} = {C4EA7573-E0AC-45D9-A29A-F6C6DECED4B0} + {FA6BD4D3-8D9B-4CA2-B8C6-A1A21F946AC2} = {C4EA7573-E0AC-45D9-A29A-F6C6DECED4B0} {431D18E4-4464-45C0-BBF2-1834B73E8095} = {93EF6213-7FD5-4A26-A8AB-AF8E4DB470FD} {1E072489-1073-4526-8C5D-64AC2A97BF9B} = {93EF6213-7FD5-4A26-A8AB-AF8E4DB470FD} {2DB3F8FB-BDD7-471E-BF8F-D3C4D6A2BDC3} = {93EF6213-7FD5-4A26-A8AB-AF8E4DB470FD} + {2266BB4C-0245-437D-8346-CFF899111225} = {66E1333A-027B-4577-AED6-A2457698A6D9} + {7BBDF9FE-BE36-417F-89EC-967263297931} = {66E1333A-027B-4577-AED6-A2457698A6D9} + {66E1333A-027B-4577-AED6-A2457698A6D9} = {AEEE96F9-DAE8-4E18-95BA-070788484090} + {18539371-17FB-4617-9DB7-5E998F65E52E} = {FEB1EA07-0931-4DFB-831F-DDE392FD6596} + {61275B26-9E67-4E89-BC0F-5166096CFA4B} = {FEB1EA07-0931-4DFB-831F-DDE392FD6596} + {FEB1EA07-0931-4DFB-831F-DDE392FD6596} = {AEEE96F9-DAE8-4E18-95BA-070788484090} + {86053D20-DEBA-4A02-A9A0-8E9F1EA088CE} = {08A6CC96-3D48-47AB-8FD8-D1478438FCC4} + {08A6CC96-3D48-47AB-8FD8-D1478438FCC4} = {AEEE96F9-DAE8-4E18-95BA-070788484090} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {1A4F1A4C-4F4F-4E0C-9342-4B32674E2F00} diff --git a/src/libraries/System.Collections.Immutable/System.Collections.Immutable.sln b/src/libraries/System.Collections.Immutable/System.Collections.Immutable.sln index 900d0eb1480dac..fb0d9d415a74ed 100644 --- a/src/libraries/System.Collections.Immutable/System.Collections.Immutable.sln +++ b/src/libraries/System.Collections.Immutable/System.Collections.Immutable.sln @@ -17,6 +17,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{53DB26DA-695E-4FF9-BCE9-1CE465681F64}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{32394700-F98D-435B-A1CD-0B010059784A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{D1CD4978-9246-4376-89BE-65BBCAAE7209}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{CA8F6E44-ABF2-463A-A60B-72A7339875A7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{38068649-E572-464D-8544-2F54208EB980}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{2C6C72CF-1F02-4552-A2D5-4186D3AE683E}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{D5595EA2-934D-481D-9AB9-412276C05181}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{12BB8B2C-950F-4AA8-BFED-D87D2873FEDA}" @@ -25,6 +35,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{50502C33-83F EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{EEC12D52-2DAA-4D12-A123-BB4AC370814B}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{A2DA4053-61CD-4591-A7D2-EE3074258D23}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{FEC852A8-CB69-4385-B163-27B826644AFD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{3DCDA367-0F8C-4E67-AA14-FB306BC88ACD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{ACBAC0BD-F9CA-4C98-BF18-45EAC3074C8A}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -67,6 +85,26 @@ Global {53DB26DA-695E-4FF9-BCE9-1CE465681F64}.Debug|Any CPU.Build.0 = Debug|Any CPU {53DB26DA-695E-4FF9-BCE9-1CE465681F64}.Release|Any CPU.ActiveCfg = Release|Any CPU {53DB26DA-695E-4FF9-BCE9-1CE465681F64}.Release|Any CPU.Build.0 = Release|Any CPU + {32394700-F98D-435B-A1CD-0B010059784A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {32394700-F98D-435B-A1CD-0B010059784A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {32394700-F98D-435B-A1CD-0B010059784A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {32394700-F98D-435B-A1CD-0B010059784A}.Release|Any CPU.Build.0 = Release|Any CPU + {D1CD4978-9246-4376-89BE-65BBCAAE7209}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D1CD4978-9246-4376-89BE-65BBCAAE7209}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D1CD4978-9246-4376-89BE-65BBCAAE7209}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D1CD4978-9246-4376-89BE-65BBCAAE7209}.Release|Any CPU.Build.0 = Release|Any CPU + {CA8F6E44-ABF2-463A-A60B-72A7339875A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CA8F6E44-ABF2-463A-A60B-72A7339875A7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CA8F6E44-ABF2-463A-A60B-72A7339875A7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CA8F6E44-ABF2-463A-A60B-72A7339875A7}.Release|Any CPU.Build.0 = Release|Any CPU + {38068649-E572-464D-8544-2F54208EB980}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {38068649-E572-464D-8544-2F54208EB980}.Debug|Any CPU.Build.0 = Debug|Any CPU + {38068649-E572-464D-8544-2F54208EB980}.Release|Any CPU.ActiveCfg = Release|Any CPU + {38068649-E572-464D-8544-2F54208EB980}.Release|Any CPU.Build.0 = Release|Any CPU + {2C6C72CF-1F02-4552-A2D5-4186D3AE683E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2C6C72CF-1F02-4552-A2D5-4186D3AE683E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2C6C72CF-1F02-4552-A2D5-4186D3AE683E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2C6C72CF-1F02-4552-A2D5-4186D3AE683E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -81,6 +119,14 @@ Global {9E9FE095-8503-43E9-9291-F61597ABF8F0} = {EEC12D52-2DAA-4D12-A123-BB4AC370814B} {E52EB126-11CE-4437-AA53-2001EEEEF9BC} = {EEC12D52-2DAA-4D12-A123-BB4AC370814B} {FCC1AE83-36B9-464B-8A5B-8C9E8244905B} = {EEC12D52-2DAA-4D12-A123-BB4AC370814B} + {32394700-F98D-435B-A1CD-0B010059784A} = {A2DA4053-61CD-4591-A7D2-EE3074258D23} + {D1CD4978-9246-4376-89BE-65BBCAAE7209} = {A2DA4053-61CD-4591-A7D2-EE3074258D23} + {A2DA4053-61CD-4591-A7D2-EE3074258D23} = {ACBAC0BD-F9CA-4C98-BF18-45EAC3074C8A} + {CA8F6E44-ABF2-463A-A60B-72A7339875A7} = {FEC852A8-CB69-4385-B163-27B826644AFD} + {38068649-E572-464D-8544-2F54208EB980} = {FEC852A8-CB69-4385-B163-27B826644AFD} + {FEC852A8-CB69-4385-B163-27B826644AFD} = {ACBAC0BD-F9CA-4C98-BF18-45EAC3074C8A} + {2C6C72CF-1F02-4552-A2D5-4186D3AE683E} = {3DCDA367-0F8C-4E67-AA14-FB306BC88ACD} + {3DCDA367-0F8C-4E67-AA14-FB306BC88ACD} = {ACBAC0BD-F9CA-4C98-BF18-45EAC3074C8A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {62498458-77B4-4070-87BB-09F22AC54239} diff --git a/src/libraries/System.Collections.Immutable/ref/System.Collections.Immutable.csproj b/src/libraries/System.Collections.Immutable/ref/System.Collections.Immutable.csproj index 857da22e765370..0926cfa1e678c0 100644 --- a/src/libraries/System.Collections.Immutable/ref/System.Collections.Immutable.csproj +++ b/src/libraries/System.Collections.Immutable/ref/System.Collections.Immutable.csproj @@ -5,19 +5,23 @@ - - - - + + - + + + + + + + \ No newline at end of file diff --git a/src/libraries/System.Collections.Immutable/src/CompatibilitySuppressions.xml b/src/libraries/System.Collections.Immutable/src/CompatibilitySuppressions.xml new file mode 100644 index 00000000000000..e2dc11c78152c3 --- /dev/null +++ b/src/libraries/System.Collections.Immutable/src/CompatibilitySuppressions.xml @@ -0,0 +1,46 @@ + + + + + CP0002 + M:System.Collections.Immutable.ImmutableArray`1.AsSpan(System.Range) + lib/net6.0/System.Collections.Immutable.dll + lib/netstandard2.0/System.Collections.Immutable.dll + true + + + CP0002 + M:System.Collections.Immutable.ImmutableArray`1.AsSpan(System.Range) + lib/net7.0/System.Collections.Immutable.dll + lib/netstandard2.0/System.Collections.Immutable.dll + true + + + CP0008 + T:System.Collections.Frozen.FrozenSet`1 + lib/net6.0/System.Collections.Immutable.dll + lib/netstandard2.0/System.Collections.Immutable.dll + true + + + CP0008 + T:System.Collections.Frozen.FrozenSet`1 + lib/net7.0/System.Collections.Immutable.dll + lib/netstandard2.0/System.Collections.Immutable.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.Collections.Immutable.dll + lib/netstandard2.0/System.Collections.Immutable.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.Collections.Immutable.dll + lib/netstandard2.0/System.Collections.Immutable.dll + true + + \ No newline at end of file diff --git a/src/libraries/System.Collections.Immutable/src/PACKAGE.md b/src/libraries/System.Collections.Immutable/src/PACKAGE.md index cf4995b4cad9ca..202fb6d0137833 100644 --- a/src/libraries/System.Collections.Immutable/src/PACKAGE.md +++ b/src/libraries/System.Collections.Immutable/src/PACKAGE.md @@ -1,10 +1,68 @@ ## About + + This package provides collections that are thread safe and guaranteed to never change their contents, also known as immutable collections. Like strings, any methods that perform modifications will not change the existing instance but instead return a new instance. For efficiency reasons, the implementation uses a sharing mechanism to ensure that newly created instances share as much data as possible with the previous instance while ensuring that operations have a predictable time complexity. The `System.Collections.Immutable` library is built-in as part of the shared framework in .NET Runtime. The package can be installed when you need to use it in other target frameworks. -For more information, see the documentation: +## How to Use + + + +```C# +using System.Collections.Immutable; + +// Create immutable set of strings +ImmutableHashSet colors = ImmutableHashSet.Create("Red", "Green", "Blue"); + +// Create a new set by adding and removing items from the original set +ImmutableHashSet colorsModified = colors.Remove("Red").Add("Orange"); + +foreach (string s in colorsModified) +{ + Console.WriteLine(s); +} + +/* Example output: + Blue + Green + Orange + */ + ``` + +## Main Types + + + +The main types provided by this library are: + +* `System.Collections.Immutable.ImmutableArray` +* `System.Collections.Immutable.ImmutableArray` +* `System.Collections.Immutable.ImmutableDictionary` +* `System.Collections.Immutable.ImmutableDictionary` +* `System.Collections.Immutable.ImmutableHashSet` +* `System.Collections.Immutable.ImmutableHashSet` +* `System.Collections.Immutable.ImmutableList` +* `System.Collections.Immutable.ImmutableList` +* `System.Collections.Immutable.ImmutableQueue` +* `System.Collections.Immutable.ImmutableQueue` +* `System.Collections.Immutable.ImmutableSortedDictionary` +* `System.Collections.Immutable.ImmutableSortedDictionary` +* `System.Collections.Immutable.ImmutableSortedSet` +* `System.Collections.Immutable.ImmutableSortedSet` +* `System.Collections.Immutable.ImmutableStack` +* `System.Collections.Immutable.ImmutableStack` + +## Additional Documentation + + - [Collections and Data Structures](https://docs.microsoft.com/dotnet/standard/collections/) -- [System.Collections.Immutable API reference](https://docs.microsoft.com/dotnet/api/system.collections.immutable) +- [API documentation](https://docs.microsoft.com/dotnet/api/system.collections.immutable) + +## Feedback & Contributing + + + +System.Collections.Immutable is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). \ No newline at end of file diff --git a/src/libraries/System.Collections.Immutable/src/System.Collections.Immutable.csproj b/src/libraries/System.Collections.Immutable/src/System.Collections.Immutable.csproj index 2f270f3d451b89..5fc208a43a3cbc 100644 --- a/src/libraries/System.Collections.Immutable/src/System.Collections.Immutable.csproj +++ b/src/libraries/System.Collections.Immutable/src/System.Collections.Immutable.csproj @@ -1,4 +1,5 @@ + $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) true @@ -147,7 +148,7 @@ The System.Collections.Immutable library is built-in as part of the shared frame - + @@ -162,9 +163,7 @@ The System.Collections.Immutable library is built-in as part of the shared frame - - - + diff --git a/src/libraries/System.Collections.NonGeneric/System.Collections.NonGeneric.sln b/src/libraries/System.Collections.NonGeneric/System.Collections.NonGeneric.sln index 41fd4903276603..bc948836055d2e 100644 --- a/src/libraries/System.Collections.NonGeneric/System.Collections.NonGeneric.sln +++ b/src/libraries/System.Collections.NonGeneric/System.Collections.NonGeneric.sln @@ -13,6 +13,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{DEAD48C1-587C-459A-B62F-1EF6E03739C3}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{57B529EF-80FE-4697-B949-4C474241DEC4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{B17AD940-28E8-41FD-AF9B-21F550441871}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{7F5E80CD-51D4-4BFB-B555-F95E4A36FACA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{AE7EEF2C-889D-4FB3-AC07-7423BC705618}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{2690345D-240E-4BB0-BBFB-48CAD7B31973}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{40328A50-1C3B-412A-8176-C558898752EE}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{3F8044D4-DD3D-46CA-8EAE-CD03358DA425}" @@ -21,6 +31,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{97782A88-6BF EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{121A7C7D-3D67-4606-AE3E-4C9E55510A86}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{1DD8D515-13DD-4318-B9E9-FA5816B8C532}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{B8B0CA7D-0B4E-42AC-A32A-60CB519B3793}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{D1808A65-E8D0-4696-8D68-53F8CDB64694}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{474712A5-07A8-43B6-8544-5BA6732AD344}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -55,6 +73,26 @@ Global {DEAD48C1-587C-459A-B62F-1EF6E03739C3}.Debug|Any CPU.Build.0 = Debug|Any CPU {DEAD48C1-587C-459A-B62F-1EF6E03739C3}.Release|Any CPU.ActiveCfg = Release|Any CPU {DEAD48C1-587C-459A-B62F-1EF6E03739C3}.Release|Any CPU.Build.0 = Release|Any CPU + {57B529EF-80FE-4697-B949-4C474241DEC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {57B529EF-80FE-4697-B949-4C474241DEC4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {57B529EF-80FE-4697-B949-4C474241DEC4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {57B529EF-80FE-4697-B949-4C474241DEC4}.Release|Any CPU.Build.0 = Release|Any CPU + {B17AD940-28E8-41FD-AF9B-21F550441871}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B17AD940-28E8-41FD-AF9B-21F550441871}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B17AD940-28E8-41FD-AF9B-21F550441871}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B17AD940-28E8-41FD-AF9B-21F550441871}.Release|Any CPU.Build.0 = Release|Any CPU + {7F5E80CD-51D4-4BFB-B555-F95E4A36FACA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7F5E80CD-51D4-4BFB-B555-F95E4A36FACA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7F5E80CD-51D4-4BFB-B555-F95E4A36FACA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7F5E80CD-51D4-4BFB-B555-F95E4A36FACA}.Release|Any CPU.Build.0 = Release|Any CPU + {AE7EEF2C-889D-4FB3-AC07-7423BC705618}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AE7EEF2C-889D-4FB3-AC07-7423BC705618}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AE7EEF2C-889D-4FB3-AC07-7423BC705618}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AE7EEF2C-889D-4FB3-AC07-7423BC705618}.Release|Any CPU.Build.0 = Release|Any CPU + {2690345D-240E-4BB0-BBFB-48CAD7B31973}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2690345D-240E-4BB0-BBFB-48CAD7B31973}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2690345D-240E-4BB0-BBFB-48CAD7B31973}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2690345D-240E-4BB0-BBFB-48CAD7B31973}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -67,6 +105,14 @@ Global {8B963C6C-CF59-433B-B8FB-6C1EB4650DF2} = {97782A88-6BFA-46E2-9027-E72BF7E3062E} {FC7A2623-48CD-4805-8C91-046D5E3D260F} = {121A7C7D-3D67-4606-AE3E-4C9E55510A86} {EC51C488-C247-436A-B610-C55A01DA3037} = {121A7C7D-3D67-4606-AE3E-4C9E55510A86} + {57B529EF-80FE-4697-B949-4C474241DEC4} = {1DD8D515-13DD-4318-B9E9-FA5816B8C532} + {B17AD940-28E8-41FD-AF9B-21F550441871} = {1DD8D515-13DD-4318-B9E9-FA5816B8C532} + {1DD8D515-13DD-4318-B9E9-FA5816B8C532} = {474712A5-07A8-43B6-8544-5BA6732AD344} + {7F5E80CD-51D4-4BFB-B555-F95E4A36FACA} = {B8B0CA7D-0B4E-42AC-A32A-60CB519B3793} + {AE7EEF2C-889D-4FB3-AC07-7423BC705618} = {B8B0CA7D-0B4E-42AC-A32A-60CB519B3793} + {B8B0CA7D-0B4E-42AC-A32A-60CB519B3793} = {474712A5-07A8-43B6-8544-5BA6732AD344} + {2690345D-240E-4BB0-BBFB-48CAD7B31973} = {D1808A65-E8D0-4696-8D68-53F8CDB64694} + {D1808A65-E8D0-4696-8D68-53F8CDB64694} = {474712A5-07A8-43B6-8544-5BA6732AD344} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {42E679A9-01B2-446F-B26E-4CF16464E149} diff --git a/src/libraries/System.Collections.NonGeneric/tests/QueueTests.cs b/src/libraries/System.Collections.NonGeneric/tests/QueueTests.cs index 56b509470e8224..69a09d473bedc1 100644 --- a/src/libraries/System.Collections.NonGeneric/tests/QueueTests.cs +++ b/src/libraries/System.Collections.NonGeneric/tests/QueueTests.cs @@ -913,6 +913,7 @@ public static void Synchronized() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void SynchronizedEnqueue() { // Enqueue diff --git a/src/libraries/System.Collections.Specialized/System.Collections.Specialized.sln b/src/libraries/System.Collections.Specialized/System.Collections.Specialized.sln index 01082f6877aca0..4eb47716a248e3 100644 --- a/src/libraries/System.Collections.Specialized/System.Collections.Specialized.sln +++ b/src/libraries/System.Collections.Specialized/System.Collections.Specialized.sln @@ -23,6 +23,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{97DA293F-0743-42EA-A0B4-0E8EE4249674}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{88E9D01A-6EA9-4887-8521-22631E4BE71C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{2ADC895F-4F19-493B-8F07-67E655D81187}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{4980FCF1-1DF9-4961-A8A6-E7CFE594FD2F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{F87743F9-9B82-49B1-A437-D6149482934A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{4A979539-78A3-4FDD-9AA6-E388F1A7CC5A}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{627B9774-B9B5-4118-A051-D2022B8ECFB4}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{129030A4-7D4E-401C-9F7E-722D99DC8407}" @@ -31,6 +41,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{1799B533-6E0 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{02B8FF7B-DDCB-4A38-A626-39877203DF37}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{EDEBAC03-9968-413D-9545-EE39F2FCC976}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{4216AB28-9056-4C60-9277-57E6E12DEE7B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{6EE44BA3-CBC3-4D13-85A5-1FF528F1EEF7}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{5BB1BD95-3BEC-4B28-93BC-E87275C2D60D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -85,6 +103,26 @@ Global {97DA293F-0743-42EA-A0B4-0E8EE4249674}.Debug|Any CPU.Build.0 = Debug|Any CPU {97DA293F-0743-42EA-A0B4-0E8EE4249674}.Release|Any CPU.ActiveCfg = Release|Any CPU {97DA293F-0743-42EA-A0B4-0E8EE4249674}.Release|Any CPU.Build.0 = Release|Any CPU + {88E9D01A-6EA9-4887-8521-22631E4BE71C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {88E9D01A-6EA9-4887-8521-22631E4BE71C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {88E9D01A-6EA9-4887-8521-22631E4BE71C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {88E9D01A-6EA9-4887-8521-22631E4BE71C}.Release|Any CPU.Build.0 = Release|Any CPU + {2ADC895F-4F19-493B-8F07-67E655D81187}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2ADC895F-4F19-493B-8F07-67E655D81187}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2ADC895F-4F19-493B-8F07-67E655D81187}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2ADC895F-4F19-493B-8F07-67E655D81187}.Release|Any CPU.Build.0 = Release|Any CPU + {4980FCF1-1DF9-4961-A8A6-E7CFE594FD2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4980FCF1-1DF9-4961-A8A6-E7CFE594FD2F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4980FCF1-1DF9-4961-A8A6-E7CFE594FD2F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4980FCF1-1DF9-4961-A8A6-E7CFE594FD2F}.Release|Any CPU.Build.0 = Release|Any CPU + {F87743F9-9B82-49B1-A437-D6149482934A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F87743F9-9B82-49B1-A437-D6149482934A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F87743F9-9B82-49B1-A437-D6149482934A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F87743F9-9B82-49B1-A437-D6149482934A}.Release|Any CPU.Build.0 = Release|Any CPU + {4A979539-78A3-4FDD-9AA6-E388F1A7CC5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4A979539-78A3-4FDD-9AA6-E388F1A7CC5A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4A979539-78A3-4FDD-9AA6-E388F1A7CC5A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4A979539-78A3-4FDD-9AA6-E388F1A7CC5A}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -102,6 +140,14 @@ Global {FE0B5511-A5E1-4E19-A232-B89F628C417E} = {1799B533-6E09-44A9-BF2B-B723ADB5F2F2} {C1FF9F3B-CDD2-493F-ACB6-C630FC5B3034} = {02B8FF7B-DDCB-4A38-A626-39877203DF37} {66B6FD95-517D-47E6-B08B-382EB32DE466} = {02B8FF7B-DDCB-4A38-A626-39877203DF37} + {88E9D01A-6EA9-4887-8521-22631E4BE71C} = {EDEBAC03-9968-413D-9545-EE39F2FCC976} + {2ADC895F-4F19-493B-8F07-67E655D81187} = {EDEBAC03-9968-413D-9545-EE39F2FCC976} + {EDEBAC03-9968-413D-9545-EE39F2FCC976} = {5BB1BD95-3BEC-4B28-93BC-E87275C2D60D} + {4980FCF1-1DF9-4961-A8A6-E7CFE594FD2F} = {4216AB28-9056-4C60-9277-57E6E12DEE7B} + {F87743F9-9B82-49B1-A437-D6149482934A} = {4216AB28-9056-4C60-9277-57E6E12DEE7B} + {4216AB28-9056-4C60-9277-57E6E12DEE7B} = {5BB1BD95-3BEC-4B28-93BC-E87275C2D60D} + {4A979539-78A3-4FDD-9AA6-E388F1A7CC5A} = {6EE44BA3-CBC3-4D13-85A5-1FF528F1EEF7} + {6EE44BA3-CBC3-4D13-85A5-1FF528F1EEF7} = {5BB1BD95-3BEC-4B28-93BC-E87275C2D60D} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {BF9E2841-822A-4FDC-B8C5-AF262BB721D6} diff --git a/src/libraries/System.Collections/System.Collections.sln b/src/libraries/System.Collections/System.Collections.sln index 2e917f80d7e838..b1f2bf2476b9ff 100644 --- a/src/libraries/System.Collections/System.Collections.sln +++ b/src/libraries/System.Collections/System.Collections.sln @@ -19,14 +19,34 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{EE21C87C-5515-45E1-9F94-F11BE4CEE2CA}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C848C534-DD16-4A69-81FF-894456E4B099}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{C5B6496A-65D2-4215-9C55-49F4E3B64FDD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{DE25E256-536C-4859-B0DB-9C17DCA2C097}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{CE17728C-AF23-4456-9BB7-DBBD0BB38365}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{66E73FEC-5F49-4DB0-978C-BB808615A31E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{F89047A1-9155-4856-B680-8871CE20E943}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{DFD58F3F-A3F8-4263-9C79-78FC2A01BEF4}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{6CD2C5E3-B5BA-4219-B8EF-9B5D486BF805}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{06AE90FB-F007-4E70-BCD2-5CAD106A7C97}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C848C534-DD16-4A69-81FF-894456E4B099}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{B958B834-96D2-4B18-AA42-22B312BE9925}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{ECAFEE63-F771-4990-B11D-86F64675F943}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{0E027E88-F1D5-4018-8951-67FE144AF36E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{57E49D44-FB9F-44AA-9F0B-95C953920510}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{12FF6366-B3F9-4482-A7C4-1409AF6F97EF}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -265,21 +285,134 @@ Global {EE21C87C-5515-45E1-9F94-F11BE4CEE2CA}.Checked|arm64.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 + {C5B6496A-65D2-4215-9C55-49F4E3B64FDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C5B6496A-65D2-4215-9C55-49F4E3B64FDD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C5B6496A-65D2-4215-9C55-49F4E3B64FDD}.Debug|arm.ActiveCfg = Debug|Any CPU + {C5B6496A-65D2-4215-9C55-49F4E3B64FDD}.Debug|arm64.ActiveCfg = Debug|Any CPU + {C5B6496A-65D2-4215-9C55-49F4E3B64FDD}.Debug|x64.ActiveCfg = Debug|Any CPU + {C5B6496A-65D2-4215-9C55-49F4E3B64FDD}.Debug|x64.Build.0 = Debug|Any CPU + {C5B6496A-65D2-4215-9C55-49F4E3B64FDD}.Debug|x86.ActiveCfg = Debug|Any CPU + {C5B6496A-65D2-4215-9C55-49F4E3B64FDD}.Debug|x86.Build.0 = Debug|Any CPU + {C5B6496A-65D2-4215-9C55-49F4E3B64FDD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C5B6496A-65D2-4215-9C55-49F4E3B64FDD}.Release|Any CPU.Build.0 = Release|Any CPU + {C5B6496A-65D2-4215-9C55-49F4E3B64FDD}.Release|arm.ActiveCfg = Release|Any CPU + {C5B6496A-65D2-4215-9C55-49F4E3B64FDD}.Release|arm64.ActiveCfg = Release|Any CPU + {C5B6496A-65D2-4215-9C55-49F4E3B64FDD}.Release|x64.ActiveCfg = Release|Any CPU + {C5B6496A-65D2-4215-9C55-49F4E3B64FDD}.Release|x64.Build.0 = Release|Any CPU + {C5B6496A-65D2-4215-9C55-49F4E3B64FDD}.Release|x86.ActiveCfg = Release|Any CPU + {C5B6496A-65D2-4215-9C55-49F4E3B64FDD}.Release|x86.Build.0 = Release|Any CPU + {C5B6496A-65D2-4215-9C55-49F4E3B64FDD}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {C5B6496A-65D2-4215-9C55-49F4E3B64FDD}.Checked|arm.ActiveCfg = Debug|Any CPU + {C5B6496A-65D2-4215-9C55-49F4E3B64FDD}.Checked|arm64.ActiveCfg = Debug|Any CPU + {C5B6496A-65D2-4215-9C55-49F4E3B64FDD}.Checked|x64.ActiveCfg = Debug|Any CPU + {C5B6496A-65D2-4215-9C55-49F4E3B64FDD}.Checked|x86.ActiveCfg = Debug|Any CPU + {DE25E256-536C-4859-B0DB-9C17DCA2C097}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DE25E256-536C-4859-B0DB-9C17DCA2C097}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DE25E256-536C-4859-B0DB-9C17DCA2C097}.Debug|arm.ActiveCfg = Debug|Any CPU + {DE25E256-536C-4859-B0DB-9C17DCA2C097}.Debug|arm64.ActiveCfg = Debug|Any CPU + {DE25E256-536C-4859-B0DB-9C17DCA2C097}.Debug|x64.ActiveCfg = Debug|Any CPU + {DE25E256-536C-4859-B0DB-9C17DCA2C097}.Debug|x64.Build.0 = Debug|Any CPU + {DE25E256-536C-4859-B0DB-9C17DCA2C097}.Debug|x86.ActiveCfg = Debug|Any CPU + {DE25E256-536C-4859-B0DB-9C17DCA2C097}.Debug|x86.Build.0 = Debug|Any CPU + {DE25E256-536C-4859-B0DB-9C17DCA2C097}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DE25E256-536C-4859-B0DB-9C17DCA2C097}.Release|Any CPU.Build.0 = Release|Any CPU + {DE25E256-536C-4859-B0DB-9C17DCA2C097}.Release|arm.ActiveCfg = Release|Any CPU + {DE25E256-536C-4859-B0DB-9C17DCA2C097}.Release|arm64.ActiveCfg = Release|Any CPU + {DE25E256-536C-4859-B0DB-9C17DCA2C097}.Release|x64.ActiveCfg = Release|Any CPU + {DE25E256-536C-4859-B0DB-9C17DCA2C097}.Release|x64.Build.0 = Release|Any CPU + {DE25E256-536C-4859-B0DB-9C17DCA2C097}.Release|x86.ActiveCfg = Release|Any CPU + {DE25E256-536C-4859-B0DB-9C17DCA2C097}.Release|x86.Build.0 = Release|Any CPU + {DE25E256-536C-4859-B0DB-9C17DCA2C097}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {DE25E256-536C-4859-B0DB-9C17DCA2C097}.Checked|arm.ActiveCfg = Debug|Any CPU + {DE25E256-536C-4859-B0DB-9C17DCA2C097}.Checked|arm64.ActiveCfg = Debug|Any CPU + {DE25E256-536C-4859-B0DB-9C17DCA2C097}.Checked|x64.ActiveCfg = Debug|Any CPU + {DE25E256-536C-4859-B0DB-9C17DCA2C097}.Checked|x86.ActiveCfg = Debug|Any CPU + {CE17728C-AF23-4456-9BB7-DBBD0BB38365}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CE17728C-AF23-4456-9BB7-DBBD0BB38365}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CE17728C-AF23-4456-9BB7-DBBD0BB38365}.Debug|arm.ActiveCfg = Debug|Any CPU + {CE17728C-AF23-4456-9BB7-DBBD0BB38365}.Debug|arm64.ActiveCfg = Debug|Any CPU + {CE17728C-AF23-4456-9BB7-DBBD0BB38365}.Debug|x64.ActiveCfg = Debug|Any CPU + {CE17728C-AF23-4456-9BB7-DBBD0BB38365}.Debug|x64.Build.0 = Debug|Any CPU + {CE17728C-AF23-4456-9BB7-DBBD0BB38365}.Debug|x86.ActiveCfg = Debug|Any CPU + {CE17728C-AF23-4456-9BB7-DBBD0BB38365}.Debug|x86.Build.0 = Debug|Any CPU + {CE17728C-AF23-4456-9BB7-DBBD0BB38365}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CE17728C-AF23-4456-9BB7-DBBD0BB38365}.Release|Any CPU.Build.0 = Release|Any CPU + {CE17728C-AF23-4456-9BB7-DBBD0BB38365}.Release|arm.ActiveCfg = Release|Any CPU + {CE17728C-AF23-4456-9BB7-DBBD0BB38365}.Release|arm64.ActiveCfg = Release|Any CPU + {CE17728C-AF23-4456-9BB7-DBBD0BB38365}.Release|x64.ActiveCfg = Release|Any CPU + {CE17728C-AF23-4456-9BB7-DBBD0BB38365}.Release|x64.Build.0 = Release|Any CPU + {CE17728C-AF23-4456-9BB7-DBBD0BB38365}.Release|x86.ActiveCfg = Release|Any CPU + {CE17728C-AF23-4456-9BB7-DBBD0BB38365}.Release|x86.Build.0 = Release|Any CPU + {CE17728C-AF23-4456-9BB7-DBBD0BB38365}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {CE17728C-AF23-4456-9BB7-DBBD0BB38365}.Checked|arm.ActiveCfg = Debug|Any CPU + {CE17728C-AF23-4456-9BB7-DBBD0BB38365}.Checked|arm64.ActiveCfg = Debug|Any CPU + {CE17728C-AF23-4456-9BB7-DBBD0BB38365}.Checked|x64.ActiveCfg = Debug|Any CPU + {CE17728C-AF23-4456-9BB7-DBBD0BB38365}.Checked|x86.ActiveCfg = Debug|Any CPU + {66E73FEC-5F49-4DB0-978C-BB808615A31E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {66E73FEC-5F49-4DB0-978C-BB808615A31E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {66E73FEC-5F49-4DB0-978C-BB808615A31E}.Debug|arm.ActiveCfg = Debug|Any CPU + {66E73FEC-5F49-4DB0-978C-BB808615A31E}.Debug|arm64.ActiveCfg = Debug|Any CPU + {66E73FEC-5F49-4DB0-978C-BB808615A31E}.Debug|x64.ActiveCfg = Debug|Any CPU + {66E73FEC-5F49-4DB0-978C-BB808615A31E}.Debug|x64.Build.0 = Debug|Any CPU + {66E73FEC-5F49-4DB0-978C-BB808615A31E}.Debug|x86.ActiveCfg = Debug|Any CPU + {66E73FEC-5F49-4DB0-978C-BB808615A31E}.Debug|x86.Build.0 = Debug|Any CPU + {66E73FEC-5F49-4DB0-978C-BB808615A31E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {66E73FEC-5F49-4DB0-978C-BB808615A31E}.Release|Any CPU.Build.0 = Release|Any CPU + {66E73FEC-5F49-4DB0-978C-BB808615A31E}.Release|arm.ActiveCfg = Release|Any CPU + {66E73FEC-5F49-4DB0-978C-BB808615A31E}.Release|arm64.ActiveCfg = Release|Any CPU + {66E73FEC-5F49-4DB0-978C-BB808615A31E}.Release|x64.ActiveCfg = Release|Any CPU + {66E73FEC-5F49-4DB0-978C-BB808615A31E}.Release|x64.Build.0 = Release|Any CPU + {66E73FEC-5F49-4DB0-978C-BB808615A31E}.Release|x86.ActiveCfg = Release|Any CPU + {66E73FEC-5F49-4DB0-978C-BB808615A31E}.Release|x86.Build.0 = Release|Any CPU + {66E73FEC-5F49-4DB0-978C-BB808615A31E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {66E73FEC-5F49-4DB0-978C-BB808615A31E}.Checked|arm.ActiveCfg = Debug|Any CPU + {66E73FEC-5F49-4DB0-978C-BB808615A31E}.Checked|arm64.ActiveCfg = Debug|Any CPU + {66E73FEC-5F49-4DB0-978C-BB808615A31E}.Checked|x64.ActiveCfg = Debug|Any CPU + {66E73FEC-5F49-4DB0-978C-BB808615A31E}.Checked|x86.ActiveCfg = Debug|Any CPU + {F89047A1-9155-4856-B680-8871CE20E943}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F89047A1-9155-4856-B680-8871CE20E943}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F89047A1-9155-4856-B680-8871CE20E943}.Debug|arm.ActiveCfg = Debug|Any CPU + {F89047A1-9155-4856-B680-8871CE20E943}.Debug|arm64.ActiveCfg = Debug|Any CPU + {F89047A1-9155-4856-B680-8871CE20E943}.Debug|x64.ActiveCfg = Debug|Any CPU + {F89047A1-9155-4856-B680-8871CE20E943}.Debug|x64.Build.0 = Debug|Any CPU + {F89047A1-9155-4856-B680-8871CE20E943}.Debug|x86.ActiveCfg = Debug|Any CPU + {F89047A1-9155-4856-B680-8871CE20E943}.Debug|x86.Build.0 = Debug|Any CPU + {F89047A1-9155-4856-B680-8871CE20E943}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F89047A1-9155-4856-B680-8871CE20E943}.Release|Any CPU.Build.0 = Release|Any CPU + {F89047A1-9155-4856-B680-8871CE20E943}.Release|arm.ActiveCfg = Release|Any CPU + {F89047A1-9155-4856-B680-8871CE20E943}.Release|arm64.ActiveCfg = Release|Any CPU + {F89047A1-9155-4856-B680-8871CE20E943}.Release|x64.ActiveCfg = Release|Any CPU + {F89047A1-9155-4856-B680-8871CE20E943}.Release|x64.Build.0 = Release|Any CPU + {F89047A1-9155-4856-B680-8871CE20E943}.Release|x86.ActiveCfg = Release|Any CPU + {F89047A1-9155-4856-B680-8871CE20E943}.Release|x86.Build.0 = Release|Any CPU + {F89047A1-9155-4856-B680-8871CE20E943}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {F89047A1-9155-4856-B680-8871CE20E943}.Checked|arm.ActiveCfg = Debug|Any CPU + {F89047A1-9155-4856-B680-8871CE20E943}.Checked|arm64.ActiveCfg = Debug|Any CPU + {F89047A1-9155-4856-B680-8871CE20E943}.Checked|x64.ActiveCfg = Debug|Any CPU + {F89047A1-9155-4856-B680-8871CE20E943}.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} - {DF501250-4105-4F79-A508-90B3A13A975A} = {C848C534-DD16-4A69-81FF-894456E4B099} + {4385739F-14A1-4F21-96E3-12EA90580575} = {DFD58F3F-A3F8-4263-9C79-78FC2A01BEF4} {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} + {DF501250-4105-4F79-A508-90B3A13A975A} = {C848C534-DD16-4A69-81FF-894456E4B099} {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} + {C5B6496A-65D2-4215-9C55-49F4E3B64FDD} = {ECAFEE63-F771-4990-B11D-86F64675F943} + {DE25E256-536C-4859-B0DB-9C17DCA2C097} = {ECAFEE63-F771-4990-B11D-86F64675F943} + {ECAFEE63-F771-4990-B11D-86F64675F943} = {12FF6366-B3F9-4482-A7C4-1409AF6F97EF} + {CE17728C-AF23-4456-9BB7-DBBD0BB38365} = {0E027E88-F1D5-4018-8951-67FE144AF36E} + {66E73FEC-5F49-4DB0-978C-BB808615A31E} = {0E027E88-F1D5-4018-8951-67FE144AF36E} + {0E027E88-F1D5-4018-8951-67FE144AF36E} = {12FF6366-B3F9-4482-A7C4-1409AF6F97EF} + {F89047A1-9155-4856-B680-8871CE20E943} = {57E49D44-FB9F-44AA-9F0B-95C953920510} + {57E49D44-FB9F-44AA-9F0B-95C953920510} = {12FF6366-B3F9-4482-A7C4-1409AF6F97EF} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {FDD40D53-AF3E-4A20-BE17-7555EB5494F9} diff --git a/src/libraries/System.Collections/src/System/Collections/BitArray.cs b/src/libraries/System.Collections/src/System/Collections/BitArray.cs index db0f59e8ac7af2..d7434fd27df27f 100644 --- a/src/libraries/System.Collections/src/System/Collections/BitArray.cs +++ b/src/libraries/System.Collections/src/System/Collections/BitArray.cs @@ -115,10 +115,6 @@ public BitArray(byte[] bytes) _version = 0; } - private const uint Vector128ByteCount = 16; - private const uint Vector128IntCount = 4; - private const uint Vector256ByteCount = 32; - private const uint Vector256IntCount = 8; public unsafe BitArray(bool[] values) { ArgumentNullException.ThrowIfNull(values); @@ -138,10 +134,21 @@ public unsafe BitArray(bool[] values) // Instead, We compare with zeroes (== false) then negate the result to ensure compatibility. ref byte value = ref Unsafe.As(ref MemoryMarshal.GetArrayDataReference(values)); + if (Vector512.IsHardwareAccelerated) + { + for (; i <= (uint)values.Length - Vector512.Count; i += (uint)Vector512.Count) + { + Vector512 vector = Vector512.LoadUnsafe(ref value, i); + Vector512 isFalse = Vector512.Equals(vector, Vector512.Zero); - if (Vector256.IsHardwareAccelerated) + ulong result = isFalse.ExtractMostSignificantBits(); + m_array[i / 32u] = (int)(~result & 0x00000000FFFFFFFF); + m_array[(i / 32u) + 1] = (int)((~result >> 32) & 0x00000000FFFFFFFF); + } + } + else if (Vector256.IsHardwareAccelerated) { - for (; (i + Vector256ByteCount) <= (uint)values.Length; i += Vector256ByteCount) + for (; i <= (uint)values.Length - Vector256.Count; i += (uint)Vector256.Count) { Vector256 vector = Vector256.LoadUnsafe(ref value, i); Vector256 isFalse = Vector256.Equals(vector, Vector256.Zero); @@ -152,13 +159,13 @@ public unsafe BitArray(bool[] values) } else if (Vector128.IsHardwareAccelerated) { - for (; (i + Vector128ByteCount * 2u) <= (uint)values.Length; i += Vector128ByteCount * 2u) + for (; i <= (uint)values.Length - Vector128.Count * 2u; i += (uint)Vector128.Count * 2u) { Vector128 lowerVector = Vector128.LoadUnsafe(ref value, i); Vector128 lowerIsFalse = Vector128.Equals(lowerVector, Vector128.Zero); uint lowerResult = lowerIsFalse.ExtractMostSignificantBits(); - Vector128 upperVector = Vector128.LoadUnsafe(ref value, i + Vector128ByteCount); + Vector128 upperVector = Vector128.LoadUnsafe(ref value, i + (uint)Vector128.Count); Vector128 upperIsFalse = Vector128.Equals(upperVector, Vector128.Zero); uint upperResult = upperIsFalse.ExtractMostSignificantBits(); @@ -339,18 +346,25 @@ public unsafe BitArray And(BitArray value) ref int left = ref MemoryMarshal.GetArrayDataReference(thisArray); ref int right = ref MemoryMarshal.GetArrayDataReference(valueArray); - - if (Vector256.IsHardwareAccelerated) + if (Vector512.IsHardwareAccelerated && (uint)count >= Vector512.Count) { - for (; i < (uint)count - (Vector256IntCount - 1u); i += Vector256IntCount) + for (; i < (uint)count - (Vector512.Count - 1u); i += (uint)Vector512.Count) + { + Vector512 result = Vector512.LoadUnsafe(ref left, i) & Vector512.LoadUnsafe(ref right, i); + result.StoreUnsafe(ref left, i); + } + } + else if (Vector256.IsHardwareAccelerated && (uint)count >= Vector256.Count) + { + for (; i < (uint)count - (Vector256.Count - 1u); i += (uint)Vector256.Count) { Vector256 result = Vector256.LoadUnsafe(ref left, i) & Vector256.LoadUnsafe(ref right, i); result.StoreUnsafe(ref left, i); } } - else if (Vector128.IsHardwareAccelerated) + else if (Vector128.IsHardwareAccelerated && (uint)count >= Vector128.Count) { - for (; i < (uint)count - (Vector128IntCount - 1u); i += Vector128IntCount) + for (; i < (uint)count - (Vector128.Count - 1u); i += (uint)Vector128.Count) { Vector128 result = Vector128.LoadUnsafe(ref left, i) & Vector128.LoadUnsafe(ref right, i); result.StoreUnsafe(ref left, i); @@ -405,18 +419,25 @@ public unsafe BitArray Or(BitArray value) ref int left = ref MemoryMarshal.GetArrayDataReference(thisArray); ref int right = ref MemoryMarshal.GetArrayDataReference(valueArray); - - if (Vector256.IsHardwareAccelerated) + if (Vector512.IsHardwareAccelerated && (uint)count >= Vector512.Count) + { + for (; i < (uint)count - (Vector512.Count - 1u); i += (uint)Vector512.Count) + { + Vector512 result = Vector512.LoadUnsafe(ref left, i) | Vector512.LoadUnsafe(ref right, i); + result.StoreUnsafe(ref left, i); + } + } + else if (Vector256.IsHardwareAccelerated && (uint)count >= Vector256.Count) { - for (; i < (uint)count - (Vector256IntCount - 1u); i += Vector256IntCount) + for (; i < (uint)count - (Vector256.Count - 1u); i += (uint)Vector256.Count) { Vector256 result = Vector256.LoadUnsafe(ref left, i) | Vector256.LoadUnsafe(ref right, i); result.StoreUnsafe(ref left, i); } } - else if (Vector128.IsHardwareAccelerated) + else if (Vector128.IsHardwareAccelerated && (uint)count >= Vector128.Count) { - for (; i < (uint)count - (Vector128IntCount - 1u); i += Vector128IntCount) + for (; i < (uint)count - (Vector128.Count - 1u); i += (uint)Vector128.Count) { Vector128 result = Vector128.LoadUnsafe(ref left, i) | Vector128.LoadUnsafe(ref right, i); result.StoreUnsafe(ref left, i); @@ -472,17 +493,25 @@ public unsafe BitArray Xor(BitArray value) ref int left = ref MemoryMarshal.GetArrayDataReference(thisArray); ref int right = ref MemoryMarshal.GetArrayDataReference(valueArray); - if (Vector256.IsHardwareAccelerated) + if (Vector512.IsHardwareAccelerated && (uint)count >= Vector512.Count) + { + for (; i < (uint)count - (Vector512.Count - 1u); i += (uint)Vector512.Count) + { + Vector512 result = Vector512.LoadUnsafe(ref left, i) ^ Vector512.LoadUnsafe(ref right, i); + result.StoreUnsafe(ref left, i); + } + } + else if (Vector256.IsHardwareAccelerated && (uint)count >= Vector256.Count) { - for (; i < (uint)count - (Vector256IntCount - 1u); i += Vector256IntCount) + for (; i < (uint)count - (Vector256.Count - 1u); i += (uint)Vector256.Count) { Vector256 result = Vector256.LoadUnsafe(ref left, i) ^ Vector256.LoadUnsafe(ref right, i); result.StoreUnsafe(ref left, i); } } - else if (Vector128.IsHardwareAccelerated) + else if (Vector128.IsHardwareAccelerated && (uint)count >= Vector128.Count) { - for (; i < (uint)count - (Vector128IntCount - 1u); i += Vector128IntCount) + for (; i < (uint)count - (Vector128.Count - 1u); i += (uint)Vector128.Count) { Vector128 result = Vector128.LoadUnsafe(ref left, i) ^ Vector128.LoadUnsafe(ref right, i); result.StoreUnsafe(ref left, i); @@ -529,18 +558,25 @@ public unsafe BitArray Not() uint i = 0; ref int value = ref MemoryMarshal.GetArrayDataReference(thisArray); - - if (Vector256.IsHardwareAccelerated) + if (Vector512.IsHardwareAccelerated && (uint)count >= Vector512.Count) { - for (; i < (uint)count - (Vector256IntCount - 1u); i += Vector256IntCount) + for (; i < (uint)count - (Vector512.Count - 1u); i += (uint)Vector512.Count) + { + Vector512 result = ~Vector512.LoadUnsafe(ref value, i); + result.StoreUnsafe(ref value, i); + } + } + else if (Vector256.IsHardwareAccelerated && (uint)count >= Vector256.Count) + { + for (; i < (uint)count - (Vector256.Count - 1u); i += (uint)Vector256.Count) { Vector256 result = ~Vector256.LoadUnsafe(ref value, i); result.StoreUnsafe(ref value, i); } } - else if (Vector128.IsHardwareAccelerated) + else if (Vector128.IsHardwareAccelerated && (uint)count >= Vector128.Count) { - for (; i < (uint)count - (Vector128IntCount - 1u); i += Vector128IntCount) + for (; i < (uint)count - (Vector128.Count - 1u); i += (uint)Vector128.Count) { Vector128 result = ~Vector128.LoadUnsafe(ref value, i); result.StoreUnsafe(ref value, i); @@ -797,21 +833,47 @@ public unsafe void CopyTo(Array array, int index) if (m_length < BitsPerInt32) goto LessThan32; - // The mask used when shuffling a single int into Vector128/256. + // The mask used when shuffling a single int into Vector128/256/512. // On little endian machines, the lower 8 bits of int belong in the first byte, next lower 8 in the second and so on. // We place the bytes that contain the bits to its respective byte so that we can mask out only the relevant bits later. Vector128 lowerShuffleMask_CopyToBoolArray = Vector128.Create(0, 0x01010101_01010101).AsByte(); Vector128 upperShuffleMask_CopyToBoolArray = Vector128.Create(0x02020202_02020202, 0x03030303_03030303).AsByte(); - if (Avx2.IsSupported) + if (Avx512F.IsSupported && (uint)m_length >= Vector512.Count) + { + Vector256 upperShuffleMask_CopyToBoolArray256 = Vector256.Create(0x04040404_04040404, 0x05050505_05050505, + 0x06060606_06060606, 0x07070707_07070707).AsByte(); + Vector256 lowerShuffleMask_CopyToBoolArray256 = Vector256.Create(lowerShuffleMask_CopyToBoolArray, upperShuffleMask_CopyToBoolArray); + Vector512 shuffleMask = Vector512.Create(lowerShuffleMask_CopyToBoolArray256, upperShuffleMask_CopyToBoolArray256); + Vector512 bitMask = Vector512.Create(0x80402010_08040201).AsByte(); + Vector512 ones = Vector512.Create((byte)1); + + fixed (bool* destination = &boolArray[index]) + { + for (; (i + Vector512.Count) <= (uint)m_length; i += (uint)Vector512.Count) + { + ulong bits = (ulong)(uint)m_array[i / (uint)BitsPerInt32] + ((ulong)m_array[(i / (uint)BitsPerInt32) + 1] << BitsPerInt32); + Vector512 scalar = Vector512.Create(bits); + Vector512 shuffled = Avx512BW.Shuffle(scalar.AsByte(), shuffleMask); + Vector512 extracted = Avx512F.And(shuffled, bitMask); + + // The extracted bits can be anywhere between 0 and 255, so we normalise the value to either 0 or 1 + // to ensure compatibility with "C# bool" (0 for false, 1 for true, rest undefined) + Vector512 normalized = Avx512BW.Min(extracted, ones); + Avx512F.Store((byte*)destination + i, normalized); + } + } + } + else if (Avx2.IsSupported && (uint)m_length >= Vector256.Count) { Vector256 shuffleMask = Vector256.Create(lowerShuffleMask_CopyToBoolArray, upperShuffleMask_CopyToBoolArray); Vector256 bitMask = Vector256.Create(0x80402010_08040201).AsByte(); + //Internal.Console.WriteLine(bitMask); Vector256 ones = Vector256.Create((byte)1); fixed (bool* destination = &boolArray[index]) { - for (; (i + Vector256ByteCount) <= (uint)m_length; i += Vector256ByteCount) + for (; (i + Vector256.Count) <= (uint)m_length; i += (uint)Vector256.Count) { int bits = m_array[i / (uint)BitsPerInt32]; Vector256 scalar = Vector256.Create(bits); @@ -825,7 +887,7 @@ public unsafe void CopyTo(Array array, int index) } } } - else if (Ssse3.IsSupported) + else if (Ssse3.IsSupported && ((uint)m_length >= Vector512.Count * 2u)) { Vector128 lowerShuffleMask = lowerShuffleMask_CopyToBoolArray; Vector128 upperShuffleMask = upperShuffleMask_CopyToBoolArray; @@ -836,7 +898,7 @@ public unsafe void CopyTo(Array array, int index) fixed (bool* destination = &boolArray[index]) { - for (; (i + Vector128ByteCount * 2u) <= (uint)m_length; i += Vector128ByteCount * 2u) + for (; (i + Vector128.Count * 2u) <= (uint)m_length; i += (uint)Vector128.Count * 2u) { int bits = m_array[i / (uint)BitsPerInt32]; Vector128 scalar = Vector128.CreateScalarUnsafe(bits); @@ -862,7 +924,7 @@ public unsafe void CopyTo(Array array, int index) fixed (bool* destination = &boolArray[index]) { - for (; (i + Vector128ByteCount * 2u) <= (uint)m_length; i += Vector128ByteCount * 2u) + for (; (i + Vector128.Count * 2u) <= (uint)m_length; i += (uint)Vector128.Count * 2u) { int bits = m_array[i / (uint)BitsPerInt32]; // Same logic as SSSE3 path, except we do not have Shuffle instruction. diff --git a/src/libraries/System.ComponentModel.Annotations/System.ComponentModel.Annotations.sln b/src/libraries/System.ComponentModel.Annotations/System.ComponentModel.Annotations.sln index e779eb57196efa..573c7c6dabd9f3 100644 --- a/src/libraries/System.ComponentModel.Annotations/System.ComponentModel.Annotations.sln +++ b/src/libraries/System.ComponentModel.Annotations/System.ComponentModel.Annotations.sln @@ -27,6 +27,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{B19E6C6F-4950-495D-832B-7C998A5914A8}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{E46F0F08-A4BF-4496-875B-C78D35E97170}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{8B4D69DD-7EF8-428C-B5F1-4815C6D4F9FC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{C8A78752-9B73-4FF6-98B7-6479FC7EB8B9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{B3F664A9-6611-4EBD-B30C-6DF8DD7A9CF2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{DC3C5A99-A276-47C1-B2AB-17EE36410525}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{A0596070-E285-49A1-A0AA-187B69E55A39}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{52233040-4669-4A28-8E8F-A35F80039C13}" @@ -35,6 +45,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E1ABC6C6-D95 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{0BCBBCAE-BD70-482D-BA22-916184DB9EE6}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{1ABC7D61-CAB5-48D2-979E-CBFE23EC7A2C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{86873B77-50BA-4690-A527-C4562EAE5A1B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{431EB5F6-6BF9-4FED-BE3F-239E89431CCA}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{A7035BA8-B608-4D27-AC36-DD3C774247FB}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -97,6 +115,26 @@ Global {B19E6C6F-4950-495D-832B-7C998A5914A8}.Debug|Any CPU.Build.0 = Debug|Any CPU {B19E6C6F-4950-495D-832B-7C998A5914A8}.Release|Any CPU.ActiveCfg = Release|Any CPU {B19E6C6F-4950-495D-832B-7C998A5914A8}.Release|Any CPU.Build.0 = Release|Any CPU + {E46F0F08-A4BF-4496-875B-C78D35E97170}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E46F0F08-A4BF-4496-875B-C78D35E97170}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E46F0F08-A4BF-4496-875B-C78D35E97170}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E46F0F08-A4BF-4496-875B-C78D35E97170}.Release|Any CPU.Build.0 = Release|Any CPU + {8B4D69DD-7EF8-428C-B5F1-4815C6D4F9FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8B4D69DD-7EF8-428C-B5F1-4815C6D4F9FC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8B4D69DD-7EF8-428C-B5F1-4815C6D4F9FC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8B4D69DD-7EF8-428C-B5F1-4815C6D4F9FC}.Release|Any CPU.Build.0 = Release|Any CPU + {C8A78752-9B73-4FF6-98B7-6479FC7EB8B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C8A78752-9B73-4FF6-98B7-6479FC7EB8B9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C8A78752-9B73-4FF6-98B7-6479FC7EB8B9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C8A78752-9B73-4FF6-98B7-6479FC7EB8B9}.Release|Any CPU.Build.0 = Release|Any CPU + {B3F664A9-6611-4EBD-B30C-6DF8DD7A9CF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B3F664A9-6611-4EBD-B30C-6DF8DD7A9CF2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B3F664A9-6611-4EBD-B30C-6DF8DD7A9CF2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B3F664A9-6611-4EBD-B30C-6DF8DD7A9CF2}.Release|Any CPU.Build.0 = Release|Any CPU + {DC3C5A99-A276-47C1-B2AB-17EE36410525}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DC3C5A99-A276-47C1-B2AB-17EE36410525}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DC3C5A99-A276-47C1-B2AB-17EE36410525}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DC3C5A99-A276-47C1-B2AB-17EE36410525}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -116,6 +154,14 @@ Global {B60893E1-864C-4236-9D4B-F17540DEED86} = {E1ABC6C6-D95F-4452-A9E2-7DAB63667861} {1E2C1B63-290E-409E-ACF8-22E2752D2936} = {0BCBBCAE-BD70-482D-BA22-916184DB9EE6} {FBE888A3-6DCE-4766-A4E4-D1748AC5B688} = {0BCBBCAE-BD70-482D-BA22-916184DB9EE6} + {E46F0F08-A4BF-4496-875B-C78D35E97170} = {1ABC7D61-CAB5-48D2-979E-CBFE23EC7A2C} + {8B4D69DD-7EF8-428C-B5F1-4815C6D4F9FC} = {1ABC7D61-CAB5-48D2-979E-CBFE23EC7A2C} + {1ABC7D61-CAB5-48D2-979E-CBFE23EC7A2C} = {A7035BA8-B608-4D27-AC36-DD3C774247FB} + {C8A78752-9B73-4FF6-98B7-6479FC7EB8B9} = {86873B77-50BA-4690-A527-C4562EAE5A1B} + {B3F664A9-6611-4EBD-B30C-6DF8DD7A9CF2} = {86873B77-50BA-4690-A527-C4562EAE5A1B} + {86873B77-50BA-4690-A527-C4562EAE5A1B} = {A7035BA8-B608-4D27-AC36-DD3C774247FB} + {DC3C5A99-A276-47C1-B2AB-17EE36410525} = {431EB5F6-6BF9-4FED-BE3F-239E89431CCA} + {431EB5F6-6BF9-4FED-BE3F-239E89431CCA} = {A7035BA8-B608-4D27-AC36-DD3C774247FB} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {4C1CDE35-7742-40EC-A075-B1ABF99F50B5} diff --git a/src/libraries/System.ComponentModel.Annotations/ref/System.ComponentModel.Annotations.cs b/src/libraries/System.ComponentModel.Annotations/ref/System.ComponentModel.Annotations.cs index 542845070d0c38..c9e82b8cece0c7 100644 --- a/src/libraries/System.ComponentModel.Annotations/ref/System.ComponentModel.Annotations.cs +++ b/src/libraries/System.ComponentModel.Annotations/ref/System.ComponentModel.Annotations.cs @@ -387,14 +387,14 @@ public static partial class Validator public static bool TryValidateObject(object instance, System.ComponentModel.DataAnnotations.ValidationContext validationContext, System.Collections.Generic.ICollection? validationResults, bool validateAllProperties) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The Type of validationContext.ObjectType cannot be statically discovered.")] public static bool TryValidateProperty(object? value, System.ComponentModel.DataAnnotations.ValidationContext validationContext, System.Collections.Generic.ICollection? validationResults) { throw null; } - public static bool TryValidateValue(object value, System.ComponentModel.DataAnnotations.ValidationContext validationContext, System.Collections.Generic.ICollection? validationResults, System.Collections.Generic.IEnumerable validationAttributes) { throw null; } + public static bool TryValidateValue(object? value, System.ComponentModel.DataAnnotations.ValidationContext validationContext, System.Collections.Generic.ICollection? validationResults, System.Collections.Generic.IEnumerable validationAttributes) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The Type of instance cannot be statically discovered and the Type's properties can be trimmed.")] public static void ValidateObject(object instance, System.ComponentModel.DataAnnotations.ValidationContext validationContext) { } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The Type of instance cannot be statically discovered and the Type's properties can be trimmed.")] public static void ValidateObject(object instance, System.ComponentModel.DataAnnotations.ValidationContext validationContext, bool validateAllProperties) { } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("The Type of validationContext.ObjectType cannot be statically discovered.")] public static void ValidateProperty(object? value, System.ComponentModel.DataAnnotations.ValidationContext validationContext) { } - public static void ValidateValue(object value, System.ComponentModel.DataAnnotations.ValidationContext validationContext, System.Collections.Generic.IEnumerable validationAttributes) { } + public static void ValidateValue(object? value, System.ComponentModel.DataAnnotations.ValidationContext validationContext, System.Collections.Generic.IEnumerable validationAttributes) { } } } namespace System.ComponentModel.DataAnnotations.Schema diff --git a/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/Validator.cs b/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/Validator.cs index 3913a1df4c3fe7..d6719673011117 100644 --- a/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/Validator.cs +++ b/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/Validator.cs @@ -171,7 +171,7 @@ public static bool TryValidateObject(object instance, ValidationContext validati /// then all validators will be evaluated. /// /// - /// The value to test. It cannot be null. + /// The value to test. /// /// Describes the object being validated and provides services and context for the /// validators. @@ -182,7 +182,7 @@ public static bool TryValidateObject(object instance, ValidationContext validati /// against. /// /// true if the object is valid, false if any validation errors are encountered. - public static bool TryValidateValue(object value, ValidationContext validationContext, + public static bool TryValidateValue(object? value, ValidationContext validationContext, ICollection? validationResults, IEnumerable validationAttributes) { ArgumentNullException.ThrowIfNull(validationAttributes); @@ -303,12 +303,12 @@ public static void ValidateObject(object instance, ValidationContext validationC /// first. /// /// - /// The value to test. It cannot be null. + /// The value to test. /// Describes the object being tested. /// The list of s to validate against this instance. /// When is null. /// When is found to be invalid. - public static void ValidateValue(object value, ValidationContext validationContext, + public static void ValidateValue(object? value, ValidationContext validationContext, IEnumerable validationAttributes) { ArgumentNullException.ThrowIfNull(validationContext); diff --git a/src/libraries/System.ComponentModel.Composition.Registration/System.ComponentModel.Composition.Registration.sln b/src/libraries/System.ComponentModel.Composition.Registration/System.ComponentModel.Composition.Registration.sln index 9aa76739729f2f..cad0a3680df56c 100644 --- a/src/libraries/System.ComponentModel.Composition.Registration/System.ComponentModel.Composition.Registration.sln +++ b/src/libraries/System.ComponentModel.Composition.Registration/System.ComponentModel.Composition.Registration.sln @@ -15,12 +15,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection.Context", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection.Context", "..\System.Reflection.Context\src\System.Reflection.Context.csproj", "{9154CFB5-AC90-4BC7-BECB-3BB588356ABE}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{754CEC61-9BD2-469E-868B-84703D12BEC4}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{AFA86D76-CB87-4031-BF82-5B2E091F4CA7}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{70C60407-FA4F-47F9-8584-249E5528209D}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{39035FBA-DD3B-434C-8E50-BD14EDAC5CC0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{3A398326-BE86-44B6-B643-83B18CBE3010}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{DCB32F49-279C-43C9-B926-C6346870E8BB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{31C9A363-248E-4D2E-9C73-C9B670FA03C1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{78F589E7-1830-46C7-AADB-4FD53EE41614}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{9CA8C5D2-076D-4505-A79A-CDE929CC62F3}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{1FE28F13-DE37-48A4-9B43-A32637555165}" @@ -29,6 +37,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{3D168EC8-558 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{9A073A19-15DD-424C-A7B8-1DBEB11E690D}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{B083251E-8032-4B8D-A3C6-E54C5307F369}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{1E4C8B99-F64B-4A4F-858E-16B94634F644}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{99F4C5F4-91C8-40DC-8EA0-A1C6D71F3CF7}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{D409ADF3-F604-438A-8926-51B39E63667B}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -67,10 +83,6 @@ Global {9154CFB5-AC90-4BC7-BECB-3BB588356ABE}.Debug|Any CPU.Build.0 = Debug|Any CPU {9154CFB5-AC90-4BC7-BECB-3BB588356ABE}.Release|Any CPU.ActiveCfg = Release|Any CPU {9154CFB5-AC90-4BC7-BECB-3BB588356ABE}.Release|Any CPU.Build.0 = Release|Any CPU - {754CEC61-9BD2-469E-868B-84703D12BEC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {754CEC61-9BD2-469E-868B-84703D12BEC4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {754CEC61-9BD2-469E-868B-84703D12BEC4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {754CEC61-9BD2-469E-868B-84703D12BEC4}.Release|Any CPU.Build.0 = Release|Any CPU {AFA86D76-CB87-4031-BF82-5B2E091F4CA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AFA86D76-CB87-4031-BF82-5B2E091F4CA7}.Debug|Any CPU.Build.0 = Debug|Any CPU {AFA86D76-CB87-4031-BF82-5B2E091F4CA7}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -79,6 +91,26 @@ Global {70C60407-FA4F-47F9-8584-249E5528209D}.Debug|Any CPU.Build.0 = Debug|Any CPU {70C60407-FA4F-47F9-8584-249E5528209D}.Release|Any CPU.ActiveCfg = Release|Any CPU {70C60407-FA4F-47F9-8584-249E5528209D}.Release|Any CPU.Build.0 = Release|Any CPU + {39035FBA-DD3B-434C-8E50-BD14EDAC5CC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {39035FBA-DD3B-434C-8E50-BD14EDAC5CC0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {39035FBA-DD3B-434C-8E50-BD14EDAC5CC0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {39035FBA-DD3B-434C-8E50-BD14EDAC5CC0}.Release|Any CPU.Build.0 = Release|Any CPU + {3A398326-BE86-44B6-B643-83B18CBE3010}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3A398326-BE86-44B6-B643-83B18CBE3010}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3A398326-BE86-44B6-B643-83B18CBE3010}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3A398326-BE86-44B6-B643-83B18CBE3010}.Release|Any CPU.Build.0 = Release|Any CPU + {DCB32F49-279C-43C9-B926-C6346870E8BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DCB32F49-279C-43C9-B926-C6346870E8BB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DCB32F49-279C-43C9-B926-C6346870E8BB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DCB32F49-279C-43C9-B926-C6346870E8BB}.Release|Any CPU.Build.0 = Release|Any CPU + {31C9A363-248E-4D2E-9C73-C9B670FA03C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {31C9A363-248E-4D2E-9C73-C9B670FA03C1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {31C9A363-248E-4D2E-9C73-C9B670FA03C1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {31C9A363-248E-4D2E-9C73-C9B670FA03C1}.Release|Any CPU.Build.0 = Release|Any CPU + {78F589E7-1830-46C7-AADB-4FD53EE41614}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {78F589E7-1830-46C7-AADB-4FD53EE41614}.Debug|Any CPU.Build.0 = Debug|Any CPU + {78F589E7-1830-46C7-AADB-4FD53EE41614}.Release|Any CPU.ActiveCfg = Release|Any CPU + {78F589E7-1830-46C7-AADB-4FD53EE41614}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -92,9 +124,16 @@ Global {E427BC70-0F51-4DA8-995A-AC46E8E3A31B} = {3D168EC8-5581-468D-BE77-0A787F5042F2} {D598C12E-CFC4-42A8-A6D2-99FC7F527179} = {3D168EC8-5581-468D-BE77-0A787F5042F2} {9154CFB5-AC90-4BC7-BECB-3BB588356ABE} = {3D168EC8-5581-468D-BE77-0A787F5042F2} - {754CEC61-9BD2-469E-868B-84703D12BEC4} = {9A073A19-15DD-424C-A7B8-1DBEB11E690D} {AFA86D76-CB87-4031-BF82-5B2E091F4CA7} = {9A073A19-15DD-424C-A7B8-1DBEB11E690D} {70C60407-FA4F-47F9-8584-249E5528209D} = {9A073A19-15DD-424C-A7B8-1DBEB11E690D} + {39035FBA-DD3B-434C-8E50-BD14EDAC5CC0} = {B083251E-8032-4B8D-A3C6-E54C5307F369} + {3A398326-BE86-44B6-B643-83B18CBE3010} = {B083251E-8032-4B8D-A3C6-E54C5307F369} + {B083251E-8032-4B8D-A3C6-E54C5307F369} = {D409ADF3-F604-438A-8926-51B39E63667B} + {DCB32F49-279C-43C9-B926-C6346870E8BB} = {1E4C8B99-F64B-4A4F-858E-16B94634F644} + {31C9A363-248E-4D2E-9C73-C9B670FA03C1} = {1E4C8B99-F64B-4A4F-858E-16B94634F644} + {1E4C8B99-F64B-4A4F-858E-16B94634F644} = {D409ADF3-F604-438A-8926-51B39E63667B} + {78F589E7-1830-46C7-AADB-4FD53EE41614} = {99F4C5F4-91C8-40DC-8EA0-A1C6D71F3CF7} + {99F4C5F4-91C8-40DC-8EA0-A1C6D71F3CF7} = {D409ADF3-F604-438A-8926-51B39E63667B} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {05F0228A-52B7-460E-9A06-9D5A62E33BA6} diff --git a/src/libraries/System.ComponentModel.Composition/System.ComponentModel.Composition.sln b/src/libraries/System.ComponentModel.Composition/System.ComponentModel.Composition.sln index 9f372e442a71c5..45bb16847f6b49 100644 --- a/src/libraries/System.ComponentModel.Composition/System.ComponentModel.Composition.sln +++ b/src/libraries/System.ComponentModel.Composition/System.ComponentModel.Composition.sln @@ -9,12 +9,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ComponentModel.Compo EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ComponentModel.Composition.Tests", "tests\System.ComponentModel.Composition.Tests.csproj", "{B21E5872-33E7-40D6-8A7F-33C0264A83E9}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{9A1433BA-F516-4DDC-801E-DDF77EC06C78}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{2BD2DB5E-FB31-43E3-9184-BEFE59786826}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{90E6CD04-1022-4A7A-B6DD-114C6F61ECA0}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{72A42835-4702-4C72-862F-3252C0A0CE82}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{B51D1564-6DE7-470A-86AD-0813F5A848F0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{A7DE660B-44B0-4D95-AE1F-6ED79D85322F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{ACDE4A23-DF27-48DC-B2F1-257D3367EC2C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{EEB3EE91-A896-4BA2-89CB-3400F237CEBC}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{E041B502-1C74-4540-9D57-0924674899B0}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{4857D2B5-405B-490F-BFC8-B730C8A3220A}" @@ -23,6 +31,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{56CC716E-A91 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{902418FB-E47F-49F5-BC32-32E9022ECD94}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{B0D89897-4981-4A40-9C6F-C35D89A028C4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{24AD8D2F-D1CC-4339-91BD-1F525C38EA84}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{E6F1CD68-FF51-47C9-9AC4-FC943C1FB9EF}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{2F3C5A39-FECD-460F-8BA3-52A3B5B73E60}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -49,10 +65,6 @@ Global {B21E5872-33E7-40D6-8A7F-33C0264A83E9}.Debug|Any CPU.Build.0 = Debug|Any CPU {B21E5872-33E7-40D6-8A7F-33C0264A83E9}.Release|Any CPU.ActiveCfg = Release|Any CPU {B21E5872-33E7-40D6-8A7F-33C0264A83E9}.Release|Any CPU.Build.0 = Release|Any CPU - {9A1433BA-F516-4DDC-801E-DDF77EC06C78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9A1433BA-F516-4DDC-801E-DDF77EC06C78}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9A1433BA-F516-4DDC-801E-DDF77EC06C78}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9A1433BA-F516-4DDC-801E-DDF77EC06C78}.Release|Any CPU.Build.0 = Release|Any CPU {2BD2DB5E-FB31-43E3-9184-BEFE59786826}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2BD2DB5E-FB31-43E3-9184-BEFE59786826}.Debug|Any CPU.Build.0 = Debug|Any CPU {2BD2DB5E-FB31-43E3-9184-BEFE59786826}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -61,6 +73,26 @@ Global {90E6CD04-1022-4A7A-B6DD-114C6F61ECA0}.Debug|Any CPU.Build.0 = Debug|Any CPU {90E6CD04-1022-4A7A-B6DD-114C6F61ECA0}.Release|Any CPU.ActiveCfg = Release|Any CPU {90E6CD04-1022-4A7A-B6DD-114C6F61ECA0}.Release|Any CPU.Build.0 = Release|Any CPU + {72A42835-4702-4C72-862F-3252C0A0CE82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {72A42835-4702-4C72-862F-3252C0A0CE82}.Debug|Any CPU.Build.0 = Debug|Any CPU + {72A42835-4702-4C72-862F-3252C0A0CE82}.Release|Any CPU.ActiveCfg = Release|Any CPU + {72A42835-4702-4C72-862F-3252C0A0CE82}.Release|Any CPU.Build.0 = Release|Any CPU + {B51D1564-6DE7-470A-86AD-0813F5A848F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B51D1564-6DE7-470A-86AD-0813F5A848F0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B51D1564-6DE7-470A-86AD-0813F5A848F0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B51D1564-6DE7-470A-86AD-0813F5A848F0}.Release|Any CPU.Build.0 = Release|Any CPU + {A7DE660B-44B0-4D95-AE1F-6ED79D85322F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A7DE660B-44B0-4D95-AE1F-6ED79D85322F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A7DE660B-44B0-4D95-AE1F-6ED79D85322F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A7DE660B-44B0-4D95-AE1F-6ED79D85322F}.Release|Any CPU.Build.0 = Release|Any CPU + {ACDE4A23-DF27-48DC-B2F1-257D3367EC2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ACDE4A23-DF27-48DC-B2F1-257D3367EC2C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ACDE4A23-DF27-48DC-B2F1-257D3367EC2C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ACDE4A23-DF27-48DC-B2F1-257D3367EC2C}.Release|Any CPU.Build.0 = Release|Any CPU + {EEB3EE91-A896-4BA2-89CB-3400F237CEBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EEB3EE91-A896-4BA2-89CB-3400F237CEBC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EEB3EE91-A896-4BA2-89CB-3400F237CEBC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EEB3EE91-A896-4BA2-89CB-3400F237CEBC}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -71,9 +103,16 @@ Global {B21E5872-33E7-40D6-8A7F-33C0264A83E9} = {E041B502-1C74-4540-9D57-0924674899B0} {82F98B94-4E9D-457B-A391-F8F2766FBB2E} = {4857D2B5-405B-490F-BFC8-B730C8A3220A} {B1B4D6FA-25CA-4F88-A7B4-BEADC53E9613} = {56CC716E-A917-46F2-8238-D809E1AF9D17} - {9A1433BA-F516-4DDC-801E-DDF77EC06C78} = {902418FB-E47F-49F5-BC32-32E9022ECD94} {2BD2DB5E-FB31-43E3-9184-BEFE59786826} = {902418FB-E47F-49F5-BC32-32E9022ECD94} {90E6CD04-1022-4A7A-B6DD-114C6F61ECA0} = {902418FB-E47F-49F5-BC32-32E9022ECD94} + {72A42835-4702-4C72-862F-3252C0A0CE82} = {B0D89897-4981-4A40-9C6F-C35D89A028C4} + {B51D1564-6DE7-470A-86AD-0813F5A848F0} = {B0D89897-4981-4A40-9C6F-C35D89A028C4} + {B0D89897-4981-4A40-9C6F-C35D89A028C4} = {2F3C5A39-FECD-460F-8BA3-52A3B5B73E60} + {A7DE660B-44B0-4D95-AE1F-6ED79D85322F} = {24AD8D2F-D1CC-4339-91BD-1F525C38EA84} + {ACDE4A23-DF27-48DC-B2F1-257D3367EC2C} = {24AD8D2F-D1CC-4339-91BD-1F525C38EA84} + {24AD8D2F-D1CC-4339-91BD-1F525C38EA84} = {2F3C5A39-FECD-460F-8BA3-52A3B5B73E60} + {EEB3EE91-A896-4BA2-89CB-3400F237CEBC} = {E6F1CD68-FF51-47C9-9AC4-FC943C1FB9EF} + {E6F1CD68-FF51-47C9-9AC4-FC943C1FB9EF} = {2F3C5A39-FECD-460F-8BA3-52A3B5B73E60} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {7852190A-F724-4BBB-969F-ECD086712D41} diff --git a/src/libraries/System.ComponentModel.Composition/src/CompatibilitySuppressions.xml b/src/libraries/System.ComponentModel.Composition/src/CompatibilitySuppressions.xml new file mode 100644 index 00000000000000..cc8fc6ca2fae18 --- /dev/null +++ b/src/libraries/System.ComponentModel.Composition/src/CompatibilitySuppressions.xml @@ -0,0 +1,18 @@ + + + + + CP0003 + System.ComponentModel.Composition, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + lib/net6.0/System.ComponentModel.Composition.dll + lib/netstandard2.0/System.ComponentModel.Composition.dll + true + + + CP0003 + System.ComponentModel.Composition, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + lib/net7.0/System.ComponentModel.Composition.dll + lib/netstandard2.0/System.ComponentModel.Composition.dll + true + + \ No newline at end of file diff --git a/src/libraries/System.ComponentModel.EventBasedAsync/System.ComponentModel.EventBasedAsync.sln b/src/libraries/System.ComponentModel.EventBasedAsync/System.ComponentModel.EventBasedAsync.sln index 3d605a92588624..380c34d65a9764 100644 --- a/src/libraries/System.ComponentModel.EventBasedAsync/System.ComponentModel.EventBasedAsync.sln +++ b/src/libraries/System.ComponentModel.EventBasedAsync/System.ComponentModel.EventBasedAsync.sln @@ -25,6 +25,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading", "..\System.Threading\ref\System.Threading.csproj", "{BC901D3C-2411-450F-9388-82989E188C44}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{561B4C1F-875F-43FB-A069-3CC73D47E675}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{A211DB21-34D0-4256-BF48-EA8EE9E74674}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{043B296D-16B7-43C8-9310-7B88F659A2CC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{0435CAF2-AD99-4907-81FA-CF4C2FE3C7E6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{C2515761-21C6-4429-B0EE-8FD3F90841CC}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{53E9D5BA-677C-487C-A58E-A9C6622D8C0D}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{8F9719E0-3A02-421C-B564-64559817B4A7}" @@ -33,6 +43,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{EEC4342D-1B9 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{B2151F7B-8333-4467-B311-145FAD7BC484}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{C21AB887-8CD7-4FEB-A348-AA43A527CD36}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{1F8254CA-2213-41EF-AF8E-5E02F5D4E60D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{CA31A221-4C3D-4C90-B4AA-DB143FCA0096}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{0D8DBD5D-8038-49E4-92D7-653897627F12}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -91,6 +109,26 @@ Global {BC901D3C-2411-450F-9388-82989E188C44}.Debug|Any CPU.Build.0 = Debug|Any CPU {BC901D3C-2411-450F-9388-82989E188C44}.Release|Any CPU.ActiveCfg = Release|Any CPU {BC901D3C-2411-450F-9388-82989E188C44}.Release|Any CPU.Build.0 = Release|Any CPU + {561B4C1F-875F-43FB-A069-3CC73D47E675}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {561B4C1F-875F-43FB-A069-3CC73D47E675}.Debug|Any CPU.Build.0 = Debug|Any CPU + {561B4C1F-875F-43FB-A069-3CC73D47E675}.Release|Any CPU.ActiveCfg = Release|Any CPU + {561B4C1F-875F-43FB-A069-3CC73D47E675}.Release|Any CPU.Build.0 = Release|Any CPU + {A211DB21-34D0-4256-BF48-EA8EE9E74674}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A211DB21-34D0-4256-BF48-EA8EE9E74674}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A211DB21-34D0-4256-BF48-EA8EE9E74674}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A211DB21-34D0-4256-BF48-EA8EE9E74674}.Release|Any CPU.Build.0 = Release|Any CPU + {043B296D-16B7-43C8-9310-7B88F659A2CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {043B296D-16B7-43C8-9310-7B88F659A2CC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {043B296D-16B7-43C8-9310-7B88F659A2CC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {043B296D-16B7-43C8-9310-7B88F659A2CC}.Release|Any CPU.Build.0 = Release|Any CPU + {0435CAF2-AD99-4907-81FA-CF4C2FE3C7E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0435CAF2-AD99-4907-81FA-CF4C2FE3C7E6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0435CAF2-AD99-4907-81FA-CF4C2FE3C7E6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0435CAF2-AD99-4907-81FA-CF4C2FE3C7E6}.Release|Any CPU.Build.0 = Release|Any CPU + {C2515761-21C6-4429-B0EE-8FD3F90841CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C2515761-21C6-4429-B0EE-8FD3F90841CC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C2515761-21C6-4429-B0EE-8FD3F90841CC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C2515761-21C6-4429-B0EE-8FD3F90841CC}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -109,6 +147,14 @@ Global {04E0F296-DF67-45EB-8967-DADF4CBC9D6E} = {EEC4342D-1B9E-462C-98FE-2C8BC16B75BE} {DD873B5A-85F5-4C40-A33F-C998F5B5409D} = {B2151F7B-8333-4467-B311-145FAD7BC484} {AA09E7A5-58F5-4BAB-B6EE-B594F50C17E2} = {B2151F7B-8333-4467-B311-145FAD7BC484} + {561B4C1F-875F-43FB-A069-3CC73D47E675} = {C21AB887-8CD7-4FEB-A348-AA43A527CD36} + {A211DB21-34D0-4256-BF48-EA8EE9E74674} = {C21AB887-8CD7-4FEB-A348-AA43A527CD36} + {C21AB887-8CD7-4FEB-A348-AA43A527CD36} = {0D8DBD5D-8038-49E4-92D7-653897627F12} + {043B296D-16B7-43C8-9310-7B88F659A2CC} = {1F8254CA-2213-41EF-AF8E-5E02F5D4E60D} + {0435CAF2-AD99-4907-81FA-CF4C2FE3C7E6} = {1F8254CA-2213-41EF-AF8E-5E02F5D4E60D} + {1F8254CA-2213-41EF-AF8E-5E02F5D4E60D} = {0D8DBD5D-8038-49E4-92D7-653897627F12} + {C2515761-21C6-4429-B0EE-8FD3F90841CC} = {CA31A221-4C3D-4C90-B4AA-DB143FCA0096} + {CA31A221-4C3D-4C90-B4AA-DB143FCA0096} = {0D8DBD5D-8038-49E4-92D7-653897627F12} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {29FF2FD6-28B0-4B47-B6E4-A170FD327623} diff --git a/src/libraries/System.ComponentModel.Primitives/System.ComponentModel.Primitives.sln b/src/libraries/System.ComponentModel.Primitives/System.ComponentModel.Primitives.sln index 28bd7f7aac7776..77cea00a0679db 100644 --- a/src/libraries/System.ComponentModel.Primitives/System.ComponentModel.Primitives.sln +++ b/src/libraries/System.ComponentModel.Primitives/System.ComponentModel.Primitives.sln @@ -21,6 +21,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{1B341E00-2D7F-496B-B905-AF508EF41A91}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{26DCFFF8-A1AD-4682-ABC1-9FC9DF35C431}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{2E0222A0-8756-4377-845A-2E41AEA621E3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{26EF7A47-E428-4CF4-9CA6-7B516BFD1088}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{CC6FB402-D808-4313-B4AF-7907D0C59CA4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{2C72B24A-21F2-4EEC-94AC-A17BB5F42AE5}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{97E28BF9-DD92-440D-B9AD-AEE3454C07A5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{4D0700F8-3BC3-4CE5-8258-1004C0BD007D}" @@ -29,6 +39,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{F199F24A-640 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{2D5F3044-9A0F-46C5-B714-7816F501604F}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{17F1014E-DBFF-4CF1-9C8B-A8080658B433}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{D3E3E44F-C7A3-445A-984B-31BA334523FA}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{5DEE6137-8716-438F-A3F2-002AA08A4B82}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{07DC4EF5-44FE-4E4B-81E3-1EAD8C623CC2}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -79,6 +97,26 @@ Global {1B341E00-2D7F-496B-B905-AF508EF41A91}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B341E00-2D7F-496B-B905-AF508EF41A91}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B341E00-2D7F-496B-B905-AF508EF41A91}.Release|Any CPU.Build.0 = Release|Any CPU + {26DCFFF8-A1AD-4682-ABC1-9FC9DF35C431}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {26DCFFF8-A1AD-4682-ABC1-9FC9DF35C431}.Debug|Any CPU.Build.0 = Debug|Any CPU + {26DCFFF8-A1AD-4682-ABC1-9FC9DF35C431}.Release|Any CPU.ActiveCfg = Release|Any CPU + {26DCFFF8-A1AD-4682-ABC1-9FC9DF35C431}.Release|Any CPU.Build.0 = Release|Any CPU + {2E0222A0-8756-4377-845A-2E41AEA621E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2E0222A0-8756-4377-845A-2E41AEA621E3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2E0222A0-8756-4377-845A-2E41AEA621E3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2E0222A0-8756-4377-845A-2E41AEA621E3}.Release|Any CPU.Build.0 = Release|Any CPU + {26EF7A47-E428-4CF4-9CA6-7B516BFD1088}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {26EF7A47-E428-4CF4-9CA6-7B516BFD1088}.Debug|Any CPU.Build.0 = Debug|Any CPU + {26EF7A47-E428-4CF4-9CA6-7B516BFD1088}.Release|Any CPU.ActiveCfg = Release|Any CPU + {26EF7A47-E428-4CF4-9CA6-7B516BFD1088}.Release|Any CPU.Build.0 = Release|Any CPU + {CC6FB402-D808-4313-B4AF-7907D0C59CA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CC6FB402-D808-4313-B4AF-7907D0C59CA4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CC6FB402-D808-4313-B4AF-7907D0C59CA4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CC6FB402-D808-4313-B4AF-7907D0C59CA4}.Release|Any CPU.Build.0 = Release|Any CPU + {2C72B24A-21F2-4EEC-94AC-A17BB5F42AE5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2C72B24A-21F2-4EEC-94AC-A17BB5F42AE5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2C72B24A-21F2-4EEC-94AC-A17BB5F42AE5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2C72B24A-21F2-4EEC-94AC-A17BB5F42AE5}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -95,6 +133,14 @@ Global {E6024DD2-79AD-4639-A141-9DA38282F61B} = {F199F24A-6408-4204-84CF-7A2C9ED758CA} {E8CC2715-0EA3-4ADC-9896-508FB1E7349A} = {2D5F3044-9A0F-46C5-B714-7816F501604F} {BE0F37D2-BEF7-4365-AFFB-B08271D25844} = {2D5F3044-9A0F-46C5-B714-7816F501604F} + {26DCFFF8-A1AD-4682-ABC1-9FC9DF35C431} = {17F1014E-DBFF-4CF1-9C8B-A8080658B433} + {2E0222A0-8756-4377-845A-2E41AEA621E3} = {17F1014E-DBFF-4CF1-9C8B-A8080658B433} + {17F1014E-DBFF-4CF1-9C8B-A8080658B433} = {07DC4EF5-44FE-4E4B-81E3-1EAD8C623CC2} + {26EF7A47-E428-4CF4-9CA6-7B516BFD1088} = {D3E3E44F-C7A3-445A-984B-31BA334523FA} + {CC6FB402-D808-4313-B4AF-7907D0C59CA4} = {D3E3E44F-C7A3-445A-984B-31BA334523FA} + {D3E3E44F-C7A3-445A-984B-31BA334523FA} = {07DC4EF5-44FE-4E4B-81E3-1EAD8C623CC2} + {2C72B24A-21F2-4EEC-94AC-A17BB5F42AE5} = {5DEE6137-8716-438F-A3F2-002AA08A4B82} + {5DEE6137-8716-438F-A3F2-002AA08A4B82} = {07DC4EF5-44FE-4E4B-81E3-1EAD8C623CC2} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {D4ED660D-B8E6-404D-B0B0-C7A31244A916} diff --git a/src/libraries/System.ComponentModel.TypeConverter/System.ComponentModel.TypeConverter.sln b/src/libraries/System.ComponentModel.TypeConverter/System.ComponentModel.TypeConverter.sln index fe297a846d4d27..e033bb82d481ef 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/System.ComponentModel.TypeConverter.sln +++ b/src/libraries/System.ComponentModel.TypeConverter/System.ComponentModel.TypeConverter.sln @@ -29,6 +29,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.RegularExpressions.Generator", "..\System.Text.RegularExpressions\gen\System.Text.RegularExpressions.Generator.csproj", "{B681D74E-6DAD-4C73-9EEF-CB1C17063E32}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{2B00B94A-91A7-445F-A1B5-E24FA25C10E0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{FB3C7146-8622-418A-8D8B-AE819738E0B3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{945372C6-9242-441A-BFCD-4404F74FF95C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{EDA39F11-6F85-4E4D-93D3-E178AC13F3FE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{C4C8D5AF-7402-4C82-BB99-B8EB18A52E8A}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{E80037BD-B4E3-43B7-A7C8-F6C3C6DA4EF8}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{2F8CF65B-8616-42BC-A893-8C7C9FD990C5}" @@ -37,6 +47,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{CD3CE573-098 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{D06EAE06-636A-4A7A-B22F-5D106F7CCC75}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{1DF76A2A-9700-4D63-8F6F-2DFCA289E70E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{82259970-A9FA-4264-A47F-7B697B317AE6}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{0507C945-5BC2-4234-AF07-D766E2CCCDEC}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{4690D584-4BB0-4C37-9887-6ED204389F4D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -103,6 +121,26 @@ Global {B681D74E-6DAD-4C73-9EEF-CB1C17063E32}.Debug|Any CPU.Build.0 = Debug|Any CPU {B681D74E-6DAD-4C73-9EEF-CB1C17063E32}.Release|Any CPU.ActiveCfg = Release|Any CPU {B681D74E-6DAD-4C73-9EEF-CB1C17063E32}.Release|Any CPU.Build.0 = Release|Any CPU + {2B00B94A-91A7-445F-A1B5-E24FA25C10E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2B00B94A-91A7-445F-A1B5-E24FA25C10E0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2B00B94A-91A7-445F-A1B5-E24FA25C10E0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2B00B94A-91A7-445F-A1B5-E24FA25C10E0}.Release|Any CPU.Build.0 = Release|Any CPU + {FB3C7146-8622-418A-8D8B-AE819738E0B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FB3C7146-8622-418A-8D8B-AE819738E0B3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FB3C7146-8622-418A-8D8B-AE819738E0B3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FB3C7146-8622-418A-8D8B-AE819738E0B3}.Release|Any CPU.Build.0 = Release|Any CPU + {945372C6-9242-441A-BFCD-4404F74FF95C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {945372C6-9242-441A-BFCD-4404F74FF95C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {945372C6-9242-441A-BFCD-4404F74FF95C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {945372C6-9242-441A-BFCD-4404F74FF95C}.Release|Any CPU.Build.0 = Release|Any CPU + {EDA39F11-6F85-4E4D-93D3-E178AC13F3FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EDA39F11-6F85-4E4D-93D3-E178AC13F3FE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EDA39F11-6F85-4E4D-93D3-E178AC13F3FE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EDA39F11-6F85-4E4D-93D3-E178AC13F3FE}.Release|Any CPU.Build.0 = Release|Any CPU + {C4C8D5AF-7402-4C82-BB99-B8EB18A52E8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C4C8D5AF-7402-4C82-BB99-B8EB18A52E8A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C4C8D5AF-7402-4C82-BB99-B8EB18A52E8A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C4C8D5AF-7402-4C82-BB99-B8EB18A52E8A}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -123,6 +161,14 @@ Global {113EA49F-2525-47A0-AD4D-EA510476F50B} = {D06EAE06-636A-4A7A-B22F-5D106F7CCC75} {970B0849-990C-4368-B317-063BFD82CAD5} = {D06EAE06-636A-4A7A-B22F-5D106F7CCC75} {B681D74E-6DAD-4C73-9EEF-CB1C17063E32} = {D06EAE06-636A-4A7A-B22F-5D106F7CCC75} + {2B00B94A-91A7-445F-A1B5-E24FA25C10E0} = {1DF76A2A-9700-4D63-8F6F-2DFCA289E70E} + {FB3C7146-8622-418A-8D8B-AE819738E0B3} = {1DF76A2A-9700-4D63-8F6F-2DFCA289E70E} + {1DF76A2A-9700-4D63-8F6F-2DFCA289E70E} = {4690D584-4BB0-4C37-9887-6ED204389F4D} + {945372C6-9242-441A-BFCD-4404F74FF95C} = {82259970-A9FA-4264-A47F-7B697B317AE6} + {EDA39F11-6F85-4E4D-93D3-E178AC13F3FE} = {82259970-A9FA-4264-A47F-7B697B317AE6} + {82259970-A9FA-4264-A47F-7B697B317AE6} = {4690D584-4BB0-4C37-9887-6ED204389F4D} + {C4C8D5AF-7402-4C82-BB99-B8EB18A52E8A} = {0507C945-5BC2-4234-AF07-D766E2CCCDEC} + {0507C945-5BC2-4234-AF07-D766E2CCCDEC} = {4690D584-4BB0-4C37-9887-6ED204389F4D} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {1D4639D9-A4BD-410A-9491-E5F8D82DE8BF} diff --git a/src/libraries/System.ComponentModel.TypeConverter/tests/TimerTests.cs b/src/libraries/System.ComponentModel.TypeConverter/tests/TimerTests.cs index 0904d7145912ea..ff4138d6cc6f0a 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/tests/TimerTests.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/tests/TimerTests.cs @@ -36,6 +36,7 @@ public void Ctor_PropertiesMatchExpectedDefaults() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void TestTimerStartAutoReset() { using (var timer = new TestTimer(1)) diff --git a/src/libraries/System.ComponentModel/System.ComponentModel.sln b/src/libraries/System.ComponentModel/System.ComponentModel.sln index c9fe1462e5c184..bbf9c64dccf07f 100644 --- a/src/libraries/System.ComponentModel/System.ComponentModel.sln +++ b/src/libraries/System.ComponentModel/System.ComponentModel.sln @@ -13,6 +13,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{5113780E-0A6C-42A2-94E0-A019815E051C}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{DE549F9A-F3EC-4F34-872A-1B0867108D76}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{B341755D-DE06-4626-9CF0-3C6F510EC598}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{78706D8B-82FD-4F2D-81E9-32F75FD8BC45}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{05688035-8175-455C-9BF8-7DD2855E76D8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{3541B932-20F2-4F4E-8C47-878DB90E53A9}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{70E2F273-4083-402A-8AC4-4DB08A09813B}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{C6EF640A-0AED-46F1-97D6-3206BD0186F0}" @@ -21,6 +31,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{797FC0E7-178 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{C3164BD9-1105-4795-B05D-3F2583479C41}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{F8EA386B-5A35-4416-83D9-AB77469F8F86}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{58B09026-5164-4CA9-90A2-2A5833529314}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{7C8D6ADC-AF7B-473D-8347-A96A67480DB3}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{8EE58110-F57C-4A9F-933C-0DE3544F12C5}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -55,6 +73,26 @@ Global {5113780E-0A6C-42A2-94E0-A019815E051C}.Debug|Any CPU.Build.0 = Debug|Any CPU {5113780E-0A6C-42A2-94E0-A019815E051C}.Release|Any CPU.ActiveCfg = Release|Any CPU {5113780E-0A6C-42A2-94E0-A019815E051C}.Release|Any CPU.Build.0 = Release|Any CPU + {DE549F9A-F3EC-4F34-872A-1B0867108D76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DE549F9A-F3EC-4F34-872A-1B0867108D76}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DE549F9A-F3EC-4F34-872A-1B0867108D76}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DE549F9A-F3EC-4F34-872A-1B0867108D76}.Release|Any CPU.Build.0 = Release|Any CPU + {B341755D-DE06-4626-9CF0-3C6F510EC598}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B341755D-DE06-4626-9CF0-3C6F510EC598}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B341755D-DE06-4626-9CF0-3C6F510EC598}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B341755D-DE06-4626-9CF0-3C6F510EC598}.Release|Any CPU.Build.0 = Release|Any CPU + {78706D8B-82FD-4F2D-81E9-32F75FD8BC45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {78706D8B-82FD-4F2D-81E9-32F75FD8BC45}.Debug|Any CPU.Build.0 = Debug|Any CPU + {78706D8B-82FD-4F2D-81E9-32F75FD8BC45}.Release|Any CPU.ActiveCfg = Release|Any CPU + {78706D8B-82FD-4F2D-81E9-32F75FD8BC45}.Release|Any CPU.Build.0 = Release|Any CPU + {05688035-8175-455C-9BF8-7DD2855E76D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {05688035-8175-455C-9BF8-7DD2855E76D8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {05688035-8175-455C-9BF8-7DD2855E76D8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {05688035-8175-455C-9BF8-7DD2855E76D8}.Release|Any CPU.Build.0 = Release|Any CPU + {3541B932-20F2-4F4E-8C47-878DB90E53A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3541B932-20F2-4F4E-8C47-878DB90E53A9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3541B932-20F2-4F4E-8C47-878DB90E53A9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3541B932-20F2-4F4E-8C47-878DB90E53A9}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -67,6 +105,14 @@ Global {EFFECBCD-A544-4649-AF79-3C2A7EEB4C6F} = {797FC0E7-1785-46B3-B280-2992A716A4ED} {AD87AB87-946C-4297-8ACB-C8FB1B604DE7} = {C3164BD9-1105-4795-B05D-3F2583479C41} {22E91D96-49E2-4691-B4E5-4C22938C2F2A} = {C3164BD9-1105-4795-B05D-3F2583479C41} + {DE549F9A-F3EC-4F34-872A-1B0867108D76} = {F8EA386B-5A35-4416-83D9-AB77469F8F86} + {B341755D-DE06-4626-9CF0-3C6F510EC598} = {F8EA386B-5A35-4416-83D9-AB77469F8F86} + {F8EA386B-5A35-4416-83D9-AB77469F8F86} = {8EE58110-F57C-4A9F-933C-0DE3544F12C5} + {78706D8B-82FD-4F2D-81E9-32F75FD8BC45} = {58B09026-5164-4CA9-90A2-2A5833529314} + {05688035-8175-455C-9BF8-7DD2855E76D8} = {58B09026-5164-4CA9-90A2-2A5833529314} + {58B09026-5164-4CA9-90A2-2A5833529314} = {8EE58110-F57C-4A9F-933C-0DE3544F12C5} + {3541B932-20F2-4F4E-8C47-878DB90E53A9} = {7C8D6ADC-AF7B-473D-8347-A96A67480DB3} + {7C8D6ADC-AF7B-473D-8347-A96A67480DB3} = {8EE58110-F57C-4A9F-933C-0DE3544F12C5} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {F6E6B62A-C9F6-4CF9-BFC4-F169919B707A} diff --git a/src/libraries/System.Composition.AttributedModel/System.Composition.AttributedModel.sln b/src/libraries/System.Composition.AttributedModel/System.Composition.AttributedModel.sln index f7a3afe6a72a58..5b4c3b4bda9417 100644 --- a/src/libraries/System.Composition.AttributedModel/System.Composition.AttributedModel.sln +++ b/src/libraries/System.Composition.AttributedModel/System.Composition.AttributedModel.sln @@ -9,12 +9,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Composition.Attribut EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Composition.AttributeModel.Tests", "tests\System.Composition.AttributeModel.Tests.csproj", "{C2EBC4C3-C97B-4F64-A647-87DAE2816A06}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{F8A6A1C8-95B6-46AF-BF9C-E150C2D16A2F}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{24833E1B-95AF-4BB0-A290-5C6C79B3517F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{1167919A-CDD3-4EBB-9659-A2515B8D81D5}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{136A85A5-AF8F-460F-A600-E0D8DB744502}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{E2101146-2E02-4FCC-8926-1E72026A40B4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{284CC03D-0F28-4FEF-A95E-B4DA873DF34A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{D4E43DAE-A23C-44F9-A082-89E11EF50CA9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{47AF0BAB-7ED6-4DEF-B437-E65F00F762A9}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{E942B629-51B4-4435-9045-80D88603DE00}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{5D6DA61D-2DBA-49B9-A8D0-1566890D3293}" @@ -23,6 +31,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{378856D0-332 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{4E66055C-EBEE-4A40-BA5C-EDC98CEE758E}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{721AA8C2-0353-4E97-84AF-552621DF84BD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{95863F56-C4E8-4310-9B23-5D093697E1FD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{B6C6CADC-D805-4823-AB12-35E6B37AFE83}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{5A77E69D-DE4B-4F98-96C3-99EB76EB9482}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -49,10 +65,6 @@ Global {C2EBC4C3-C97B-4F64-A647-87DAE2816A06}.Debug|Any CPU.Build.0 = Debug|Any CPU {C2EBC4C3-C97B-4F64-A647-87DAE2816A06}.Release|Any CPU.ActiveCfg = Release|Any CPU {C2EBC4C3-C97B-4F64-A647-87DAE2816A06}.Release|Any CPU.Build.0 = Release|Any CPU - {F8A6A1C8-95B6-46AF-BF9C-E150C2D16A2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F8A6A1C8-95B6-46AF-BF9C-E150C2D16A2F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F8A6A1C8-95B6-46AF-BF9C-E150C2D16A2F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F8A6A1C8-95B6-46AF-BF9C-E150C2D16A2F}.Release|Any CPU.Build.0 = Release|Any CPU {24833E1B-95AF-4BB0-A290-5C6C79B3517F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {24833E1B-95AF-4BB0-A290-5C6C79B3517F}.Debug|Any CPU.Build.0 = Debug|Any CPU {24833E1B-95AF-4BB0-A290-5C6C79B3517F}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -61,6 +73,26 @@ Global {1167919A-CDD3-4EBB-9659-A2515B8D81D5}.Debug|Any CPU.Build.0 = Debug|Any CPU {1167919A-CDD3-4EBB-9659-A2515B8D81D5}.Release|Any CPU.ActiveCfg = Release|Any CPU {1167919A-CDD3-4EBB-9659-A2515B8D81D5}.Release|Any CPU.Build.0 = Release|Any CPU + {136A85A5-AF8F-460F-A600-E0D8DB744502}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {136A85A5-AF8F-460F-A600-E0D8DB744502}.Debug|Any CPU.Build.0 = Debug|Any CPU + {136A85A5-AF8F-460F-A600-E0D8DB744502}.Release|Any CPU.ActiveCfg = Release|Any CPU + {136A85A5-AF8F-460F-A600-E0D8DB744502}.Release|Any CPU.Build.0 = Release|Any CPU + {E2101146-2E02-4FCC-8926-1E72026A40B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E2101146-2E02-4FCC-8926-1E72026A40B4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E2101146-2E02-4FCC-8926-1E72026A40B4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E2101146-2E02-4FCC-8926-1E72026A40B4}.Release|Any CPU.Build.0 = Release|Any CPU + {284CC03D-0F28-4FEF-A95E-B4DA873DF34A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {284CC03D-0F28-4FEF-A95E-B4DA873DF34A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {284CC03D-0F28-4FEF-A95E-B4DA873DF34A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {284CC03D-0F28-4FEF-A95E-B4DA873DF34A}.Release|Any CPU.Build.0 = Release|Any CPU + {D4E43DAE-A23C-44F9-A082-89E11EF50CA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D4E43DAE-A23C-44F9-A082-89E11EF50CA9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D4E43DAE-A23C-44F9-A082-89E11EF50CA9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D4E43DAE-A23C-44F9-A082-89E11EF50CA9}.Release|Any CPU.Build.0 = Release|Any CPU + {47AF0BAB-7ED6-4DEF-B437-E65F00F762A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {47AF0BAB-7ED6-4DEF-B437-E65F00F762A9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {47AF0BAB-7ED6-4DEF-B437-E65F00F762A9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {47AF0BAB-7ED6-4DEF-B437-E65F00F762A9}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -71,9 +103,16 @@ Global {B62DF545-08AB-40E1-9DED-755583B0B3B3} = {5D6DA61D-2DBA-49B9-A8D0-1566890D3293} {7C81E44B-A3A6-4707-AC60-8B6452FE35C2} = {378856D0-3326-428C-A8FB-FF958D0C4D49} {3DD99E03-A4D3-456A-BA2F-A7351423B800} = {378856D0-3326-428C-A8FB-FF958D0C4D49} - {F8A6A1C8-95B6-46AF-BF9C-E150C2D16A2F} = {4E66055C-EBEE-4A40-BA5C-EDC98CEE758E} {24833E1B-95AF-4BB0-A290-5C6C79B3517F} = {4E66055C-EBEE-4A40-BA5C-EDC98CEE758E} {1167919A-CDD3-4EBB-9659-A2515B8D81D5} = {4E66055C-EBEE-4A40-BA5C-EDC98CEE758E} + {136A85A5-AF8F-460F-A600-E0D8DB744502} = {721AA8C2-0353-4E97-84AF-552621DF84BD} + {E2101146-2E02-4FCC-8926-1E72026A40B4} = {721AA8C2-0353-4E97-84AF-552621DF84BD} + {721AA8C2-0353-4E97-84AF-552621DF84BD} = {5A77E69D-DE4B-4F98-96C3-99EB76EB9482} + {284CC03D-0F28-4FEF-A95E-B4DA873DF34A} = {95863F56-C4E8-4310-9B23-5D093697E1FD} + {D4E43DAE-A23C-44F9-A082-89E11EF50CA9} = {95863F56-C4E8-4310-9B23-5D093697E1FD} + {95863F56-C4E8-4310-9B23-5D093697E1FD} = {5A77E69D-DE4B-4F98-96C3-99EB76EB9482} + {47AF0BAB-7ED6-4DEF-B437-E65F00F762A9} = {B6C6CADC-D805-4823-AB12-35E6B37AFE83} + {B6C6CADC-D805-4823-AB12-35E6B37AFE83} = {5A77E69D-DE4B-4F98-96C3-99EB76EB9482} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {0C208CE9-53A6-4D20-9851-9D565EC19AAD} diff --git a/src/libraries/System.Composition.Convention/System.Composition.Convention.sln b/src/libraries/System.Composition.Convention/System.Composition.Convention.sln index d00176a21de24d..a9205e23a86677 100644 --- a/src/libraries/System.Composition.Convention/System.Composition.Convention.sln +++ b/src/libraries/System.Composition.Convention/System.Composition.Convention.sln @@ -13,18 +13,34 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Composition.Runtime" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Composition.TypedParts", "..\System.Composition.TypedParts\src\System.Composition.TypedParts.csproj", "{5AAFDB16-AACF-4446-9285-26AAC815101B}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{B82B46DB-D4FB-4D28-BC57-158C44B101F5}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{0E526574-8462-4D78-BBCA-BD761904574A}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{5D902FB1-35C6-4396-98B2-CBC0BF09F356}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{7F5928C7-00A1-4786-9916-F58A60ADEAEC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{9CFB3C11-E653-4969-8B4C-135E4E20E6C8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{B154C49B-FA17-4748-8294-BDBF85FA6463}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{DEA5DBD4-2491-492A-8BDC-E5B1B1DDF499}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{E1802CDE-A06A-4056-B2D7-52A0B880120D}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{2AB71E3F-3402-4537-AEF4-85EDB7FCA321}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D6A9A080-5B74-41A2-871E-F417FA9FF705}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{DDADB978-93BC-489A-90C8-523AFE08EBC1}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{0690F4F7-22B9-4290-9223-6D8622F18445}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{2E284C80-BF26-42B1-9EB3-D7C0B1BCC1D0}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{0580E5D2-3D9F-4F84-987F-2A6B064DA7FC}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{2FCBF158-825B-4337-8C4A-AAD8BF181049}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -59,10 +75,6 @@ Global {5AAFDB16-AACF-4446-9285-26AAC815101B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5AAFDB16-AACF-4446-9285-26AAC815101B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5AAFDB16-AACF-4446-9285-26AAC815101B}.Release|Any CPU.Build.0 = Release|Any CPU - {B82B46DB-D4FB-4D28-BC57-158C44B101F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B82B46DB-D4FB-4D28-BC57-158C44B101F5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B82B46DB-D4FB-4D28-BC57-158C44B101F5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B82B46DB-D4FB-4D28-BC57-158C44B101F5}.Release|Any CPU.Build.0 = Release|Any CPU {0E526574-8462-4D78-BBCA-BD761904574A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0E526574-8462-4D78-BBCA-BD761904574A}.Debug|Any CPU.Build.0 = Debug|Any CPU {0E526574-8462-4D78-BBCA-BD761904574A}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -71,6 +83,26 @@ Global {5D902FB1-35C6-4396-98B2-CBC0BF09F356}.Debug|Any CPU.Build.0 = Debug|Any CPU {5D902FB1-35C6-4396-98B2-CBC0BF09F356}.Release|Any CPU.ActiveCfg = Release|Any CPU {5D902FB1-35C6-4396-98B2-CBC0BF09F356}.Release|Any CPU.Build.0 = Release|Any CPU + {7F5928C7-00A1-4786-9916-F58A60ADEAEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7F5928C7-00A1-4786-9916-F58A60ADEAEC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7F5928C7-00A1-4786-9916-F58A60ADEAEC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7F5928C7-00A1-4786-9916-F58A60ADEAEC}.Release|Any CPU.Build.0 = Release|Any CPU + {9CFB3C11-E653-4969-8B4C-135E4E20E6C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9CFB3C11-E653-4969-8B4C-135E4E20E6C8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9CFB3C11-E653-4969-8B4C-135E4E20E6C8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9CFB3C11-E653-4969-8B4C-135E4E20E6C8}.Release|Any CPU.Build.0 = Release|Any CPU + {B154C49B-FA17-4748-8294-BDBF85FA6463}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B154C49B-FA17-4748-8294-BDBF85FA6463}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B154C49B-FA17-4748-8294-BDBF85FA6463}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B154C49B-FA17-4748-8294-BDBF85FA6463}.Release|Any CPU.Build.0 = Release|Any CPU + {DEA5DBD4-2491-492A-8BDC-E5B1B1DDF499}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DEA5DBD4-2491-492A-8BDC-E5B1B1DDF499}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DEA5DBD4-2491-492A-8BDC-E5B1B1DDF499}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DEA5DBD4-2491-492A-8BDC-E5B1B1DDF499}.Release|Any CPU.Build.0 = Release|Any CPU + {E1802CDE-A06A-4056-B2D7-52A0B880120D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E1802CDE-A06A-4056-B2D7-52A0B880120D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E1802CDE-A06A-4056-B2D7-52A0B880120D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E1802CDE-A06A-4056-B2D7-52A0B880120D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -83,9 +115,16 @@ Global {7839BCF8-8B5A-465B-A4B6-86CE4227AF81} = {D6A9A080-5B74-41A2-871E-F417FA9FF705} {782AA503-8808-4741-AECF-D79A6BF3EFF7} = {D6A9A080-5B74-41A2-871E-F417FA9FF705} {5AAFDB16-AACF-4446-9285-26AAC815101B} = {D6A9A080-5B74-41A2-871E-F417FA9FF705} - {B82B46DB-D4FB-4D28-BC57-158C44B101F5} = {DDADB978-93BC-489A-90C8-523AFE08EBC1} {0E526574-8462-4D78-BBCA-BD761904574A} = {DDADB978-93BC-489A-90C8-523AFE08EBC1} {5D902FB1-35C6-4396-98B2-CBC0BF09F356} = {DDADB978-93BC-489A-90C8-523AFE08EBC1} + {7F5928C7-00A1-4786-9916-F58A60ADEAEC} = {0690F4F7-22B9-4290-9223-6D8622F18445} + {9CFB3C11-E653-4969-8B4C-135E4E20E6C8} = {0690F4F7-22B9-4290-9223-6D8622F18445} + {0690F4F7-22B9-4290-9223-6D8622F18445} = {2FCBF158-825B-4337-8C4A-AAD8BF181049} + {B154C49B-FA17-4748-8294-BDBF85FA6463} = {2E284C80-BF26-42B1-9EB3-D7C0B1BCC1D0} + {DEA5DBD4-2491-492A-8BDC-E5B1B1DDF499} = {2E284C80-BF26-42B1-9EB3-D7C0B1BCC1D0} + {2E284C80-BF26-42B1-9EB3-D7C0B1BCC1D0} = {2FCBF158-825B-4337-8C4A-AAD8BF181049} + {E1802CDE-A06A-4056-B2D7-52A0B880120D} = {0580E5D2-3D9F-4F84-987F-2A6B064DA7FC} + {0580E5D2-3D9F-4F84-987F-2A6B064DA7FC} = {2FCBF158-825B-4337-8C4A-AAD8BF181049} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {3F85CAA1-0651-4FD6-81E7-45CFF63779BA} diff --git a/src/libraries/System.Composition.Hosting/System.Composition.Hosting.sln b/src/libraries/System.Composition.Hosting/System.Composition.Hosting.sln index 9b2316b2aa0f20..0a2ca82bef7627 100644 --- a/src/libraries/System.Composition.Hosting/System.Composition.Hosting.sln +++ b/src/libraries/System.Composition.Hosting/System.Composition.Hosting.sln @@ -7,18 +7,34 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Composition.Hosting. EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Composition.Runtime", "..\System.Composition.Runtime\src\System.Composition.Runtime.csproj", "{4C5E5AB8-480F-49F2-AF28-29C2EE713A39}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{5C6BC85E-AA23-472D-ACB5-74F0813D5D68}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{FD8449C3-8A72-4ECF-B85D-C920253B88D8}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{5DBEE1CE-A97E-4F4A-98FF-DD689E5EF629}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{576EC47D-A253-424B-8695-40257B07B282}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{4DED17FD-82E0-4566-932A-1371911AD33A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{6175C4F1-F6F8-49E8-A00C-045858790DBF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{BC655B2E-62F7-46EC-9A9C-7AEFFEEE53CB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{630B7AC3-2028-4423-AB99-8DA96CA33ABA}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{7AEF3556-BD3A-432D-A849-DFE1509F905E}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D140917D-0E52-4DC6-920A-B222BD2025AE}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{1EEFB4CE-0917-418F-B83C-3B376CB39BC4}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{E3B907A0-538F-47D6-B89A-9701F6D4B382}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{6F953E17-B84D-41F3-909E-519EB4B1D021}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{5983845B-0248-40D9-8F36-A76043C7F30B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{2EE736A9-1E7E-4F8D-A584-26E71E13DB86}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -41,10 +57,6 @@ Global {4C5E5AB8-480F-49F2-AF28-29C2EE713A39}.Debug|Any CPU.Build.0 = Debug|Any CPU {4C5E5AB8-480F-49F2-AF28-29C2EE713A39}.Release|Any CPU.ActiveCfg = Release|Any CPU {4C5E5AB8-480F-49F2-AF28-29C2EE713A39}.Release|Any CPU.Build.0 = Release|Any CPU - {5C6BC85E-AA23-472D-ACB5-74F0813D5D68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5C6BC85E-AA23-472D-ACB5-74F0813D5D68}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5C6BC85E-AA23-472D-ACB5-74F0813D5D68}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5C6BC85E-AA23-472D-ACB5-74F0813D5D68}.Release|Any CPU.Build.0 = Release|Any CPU {FD8449C3-8A72-4ECF-B85D-C920253B88D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FD8449C3-8A72-4ECF-B85D-C920253B88D8}.Debug|Any CPU.Build.0 = Debug|Any CPU {FD8449C3-8A72-4ECF-B85D-C920253B88D8}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -53,6 +65,26 @@ Global {5DBEE1CE-A97E-4F4A-98FF-DD689E5EF629}.Debug|Any CPU.Build.0 = Debug|Any CPU {5DBEE1CE-A97E-4F4A-98FF-DD689E5EF629}.Release|Any CPU.ActiveCfg = Release|Any CPU {5DBEE1CE-A97E-4F4A-98FF-DD689E5EF629}.Release|Any CPU.Build.0 = Release|Any CPU + {576EC47D-A253-424B-8695-40257B07B282}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {576EC47D-A253-424B-8695-40257B07B282}.Debug|Any CPU.Build.0 = Debug|Any CPU + {576EC47D-A253-424B-8695-40257B07B282}.Release|Any CPU.ActiveCfg = Release|Any CPU + {576EC47D-A253-424B-8695-40257B07B282}.Release|Any CPU.Build.0 = Release|Any CPU + {4DED17FD-82E0-4566-932A-1371911AD33A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4DED17FD-82E0-4566-932A-1371911AD33A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4DED17FD-82E0-4566-932A-1371911AD33A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4DED17FD-82E0-4566-932A-1371911AD33A}.Release|Any CPU.Build.0 = Release|Any CPU + {6175C4F1-F6F8-49E8-A00C-045858790DBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6175C4F1-F6F8-49E8-A00C-045858790DBF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6175C4F1-F6F8-49E8-A00C-045858790DBF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6175C4F1-F6F8-49E8-A00C-045858790DBF}.Release|Any CPU.Build.0 = Release|Any CPU + {BC655B2E-62F7-46EC-9A9C-7AEFFEEE53CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BC655B2E-62F7-46EC-9A9C-7AEFFEEE53CB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BC655B2E-62F7-46EC-9A9C-7AEFFEEE53CB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BC655B2E-62F7-46EC-9A9C-7AEFFEEE53CB}.Release|Any CPU.Build.0 = Release|Any CPU + {630B7AC3-2028-4423-AB99-8DA96CA33ABA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {630B7AC3-2028-4423-AB99-8DA96CA33ABA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {630B7AC3-2028-4423-AB99-8DA96CA33ABA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {630B7AC3-2028-4423-AB99-8DA96CA33ABA}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -62,9 +94,16 @@ Global {0F595512-D4BE-4042-9C8A-F0816A7B27AD} = {7AEF3556-BD3A-432D-A849-DFE1509F905E} {991FC8D9-6A92-4A79-91EC-BD72005687AF} = {D140917D-0E52-4DC6-920A-B222BD2025AE} {4C5E5AB8-480F-49F2-AF28-29C2EE713A39} = {D140917D-0E52-4DC6-920A-B222BD2025AE} - {5C6BC85E-AA23-472D-ACB5-74F0813D5D68} = {1EEFB4CE-0917-418F-B83C-3B376CB39BC4} {FD8449C3-8A72-4ECF-B85D-C920253B88D8} = {1EEFB4CE-0917-418F-B83C-3B376CB39BC4} {5DBEE1CE-A97E-4F4A-98FF-DD689E5EF629} = {1EEFB4CE-0917-418F-B83C-3B376CB39BC4} + {576EC47D-A253-424B-8695-40257B07B282} = {E3B907A0-538F-47D6-B89A-9701F6D4B382} + {4DED17FD-82E0-4566-932A-1371911AD33A} = {E3B907A0-538F-47D6-B89A-9701F6D4B382} + {E3B907A0-538F-47D6-B89A-9701F6D4B382} = {2EE736A9-1E7E-4F8D-A584-26E71E13DB86} + {6175C4F1-F6F8-49E8-A00C-045858790DBF} = {6F953E17-B84D-41F3-909E-519EB4B1D021} + {BC655B2E-62F7-46EC-9A9C-7AEFFEEE53CB} = {6F953E17-B84D-41F3-909E-519EB4B1D021} + {6F953E17-B84D-41F3-909E-519EB4B1D021} = {2EE736A9-1E7E-4F8D-A584-26E71E13DB86} + {630B7AC3-2028-4423-AB99-8DA96CA33ABA} = {5983845B-0248-40D9-8F36-A76043C7F30B} + {5983845B-0248-40D9-8F36-A76043C7F30B} = {2EE736A9-1E7E-4F8D-A584-26E71E13DB86} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {EE971A55-D6EB-4648-BA96-BA8BC454EDC5} diff --git a/src/libraries/System.Composition.Runtime/System.Composition.Runtime.sln b/src/libraries/System.Composition.Runtime/System.Composition.Runtime.sln index f1cefd2254f24b..7013e98c2c23ec 100644 --- a/src/libraries/System.Composition.Runtime/System.Composition.Runtime.sln +++ b/src/libraries/System.Composition.Runtime/System.Composition.Runtime.sln @@ -5,18 +5,34 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Composition.Runtime" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Composition.Runtime.Tests", "tests\System.Composition.Runtime.Tests.csproj", "{B19B1509-313D-497D-9636-9A7AD5022DCF}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{B4A88209-C940-4B68-A5DE-E553DD2FC8C9}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{669F1F31-D3A6-40CD-878C-90FCAE3108F4}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{1EE96691-E213-40A7-9392-A6A4417AFC4F}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{DD9FECB3-A071-4941-9AEC-AD377B0B9B57}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{FEAF43AA-74B0-4152-AB51-8B4BF2D9D4A9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{0A1EE063-9A06-4B23-82E2-C287A28C9A43}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{3F10B47C-BE00-474D-B830-50680DBD627B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{FDD95D90-2DFC-4DA5-8EEA-0F561D0AABDB}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{677DCCA2-C84B-4D33-AFA8-8906764CBAE7}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{81E62E76-E824-4685-93D0-9C8C1F5C7AE2}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{0D8AEC7B-1995-4D2C-90E4-8011BDA3D750}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{1D0C0EB9-4579-46E6-B4F4-593EC762FAA8}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{A47C10D6-CEB9-4F90-843F-7D9F611FDDE0}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{F4245695-567A-42F5-89F0-2EBBDF5CCD75}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{04063FCA-8F37-46CE-9073-A143131C0CB4}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -35,10 +51,6 @@ Global {B19B1509-313D-497D-9636-9A7AD5022DCF}.Debug|Any CPU.Build.0 = Debug|Any CPU {B19B1509-313D-497D-9636-9A7AD5022DCF}.Release|Any CPU.ActiveCfg = Release|Any CPU {B19B1509-313D-497D-9636-9A7AD5022DCF}.Release|Any CPU.Build.0 = Release|Any CPU - {B4A88209-C940-4B68-A5DE-E553DD2FC8C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B4A88209-C940-4B68-A5DE-E553DD2FC8C9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B4A88209-C940-4B68-A5DE-E553DD2FC8C9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B4A88209-C940-4B68-A5DE-E553DD2FC8C9}.Release|Any CPU.Build.0 = Release|Any CPU {669F1F31-D3A6-40CD-878C-90FCAE3108F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {669F1F31-D3A6-40CD-878C-90FCAE3108F4}.Debug|Any CPU.Build.0 = Debug|Any CPU {669F1F31-D3A6-40CD-878C-90FCAE3108F4}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -47,6 +59,26 @@ Global {1EE96691-E213-40A7-9392-A6A4417AFC4F}.Debug|Any CPU.Build.0 = Debug|Any CPU {1EE96691-E213-40A7-9392-A6A4417AFC4F}.Release|Any CPU.ActiveCfg = Release|Any CPU {1EE96691-E213-40A7-9392-A6A4417AFC4F}.Release|Any CPU.Build.0 = Release|Any CPU + {DD9FECB3-A071-4941-9AEC-AD377B0B9B57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DD9FECB3-A071-4941-9AEC-AD377B0B9B57}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DD9FECB3-A071-4941-9AEC-AD377B0B9B57}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DD9FECB3-A071-4941-9AEC-AD377B0B9B57}.Release|Any CPU.Build.0 = Release|Any CPU + {FEAF43AA-74B0-4152-AB51-8B4BF2D9D4A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FEAF43AA-74B0-4152-AB51-8B4BF2D9D4A9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FEAF43AA-74B0-4152-AB51-8B4BF2D9D4A9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FEAF43AA-74B0-4152-AB51-8B4BF2D9D4A9}.Release|Any CPU.Build.0 = Release|Any CPU + {0A1EE063-9A06-4B23-82E2-C287A28C9A43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0A1EE063-9A06-4B23-82E2-C287A28C9A43}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0A1EE063-9A06-4B23-82E2-C287A28C9A43}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0A1EE063-9A06-4B23-82E2-C287A28C9A43}.Release|Any CPU.Build.0 = Release|Any CPU + {3F10B47C-BE00-474D-B830-50680DBD627B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3F10B47C-BE00-474D-B830-50680DBD627B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3F10B47C-BE00-474D-B830-50680DBD627B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3F10B47C-BE00-474D-B830-50680DBD627B}.Release|Any CPU.Build.0 = Release|Any CPU + {FDD95D90-2DFC-4DA5-8EEA-0F561D0AABDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FDD95D90-2DFC-4DA5-8EEA-0F561D0AABDB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FDD95D90-2DFC-4DA5-8EEA-0F561D0AABDB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FDD95D90-2DFC-4DA5-8EEA-0F561D0AABDB}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -55,9 +87,16 @@ Global {31F52C37-63E5-46F9-A5DE-894E8AC91475} = {677DCCA2-C84B-4D33-AFA8-8906764CBAE7} {B19B1509-313D-497D-9636-9A7AD5022DCF} = {677DCCA2-C84B-4D33-AFA8-8906764CBAE7} {BAC53BBD-B949-419D-833B-54B6A03A1389} = {81E62E76-E824-4685-93D0-9C8C1F5C7AE2} - {B4A88209-C940-4B68-A5DE-E553DD2FC8C9} = {0D8AEC7B-1995-4D2C-90E4-8011BDA3D750} {669F1F31-D3A6-40CD-878C-90FCAE3108F4} = {0D8AEC7B-1995-4D2C-90E4-8011BDA3D750} {1EE96691-E213-40A7-9392-A6A4417AFC4F} = {0D8AEC7B-1995-4D2C-90E4-8011BDA3D750} + {DD9FECB3-A071-4941-9AEC-AD377B0B9B57} = {1D0C0EB9-4579-46E6-B4F4-593EC762FAA8} + {FEAF43AA-74B0-4152-AB51-8B4BF2D9D4A9} = {1D0C0EB9-4579-46E6-B4F4-593EC762FAA8} + {1D0C0EB9-4579-46E6-B4F4-593EC762FAA8} = {04063FCA-8F37-46CE-9073-A143131C0CB4} + {0A1EE063-9A06-4B23-82E2-C287A28C9A43} = {A47C10D6-CEB9-4F90-843F-7D9F611FDDE0} + {3F10B47C-BE00-474D-B830-50680DBD627B} = {A47C10D6-CEB9-4F90-843F-7D9F611FDDE0} + {A47C10D6-CEB9-4F90-843F-7D9F611FDDE0} = {04063FCA-8F37-46CE-9073-A143131C0CB4} + {FDD95D90-2DFC-4DA5-8EEA-0F561D0AABDB} = {F4245695-567A-42F5-89F0-2EBBDF5CCD75} + {F4245695-567A-42F5-89F0-2EBBDF5CCD75} = {04063FCA-8F37-46CE-9073-A143131C0CB4} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {7686D4EE-C99C-4FC3-AF5C-F06B154E4A54} diff --git a/src/libraries/System.Composition.TypedParts/System.Composition.TypedParts.sln b/src/libraries/System.Composition.TypedParts/System.Composition.TypedParts.sln index f78fd27a8e80b7..76f8e66da149cb 100644 --- a/src/libraries/System.Composition.TypedParts/System.Composition.TypedParts.sln +++ b/src/libraries/System.Composition.TypedParts/System.Composition.TypedParts.sln @@ -13,18 +13,34 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Composition.TypedPar EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Composition.TypedParts.Tests", "tests\System.Composition.TypedParts.Tests.csproj", "{38C096D0-5E23-47E2-A074-5F9852075459}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{324FA4F8-EA9C-4832-819E-823EF66E0461}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{73B190CC-D704-484D-BC34-F28A6E307D29}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{4FDFF976-E09D-4788-9AE2-BEB9AD129970}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{2DD92A7D-BB66-496A-84A2-6CE277908E45}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{FA77F597-EEA3-464D-B1F7-34D8A34127B4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{3BADB8CD-7AB5-4A0A-9529-30EB5FFE85E6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{EAF1EE23-E0F5-4941-9972-3B6C1E7EF5F6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{C49841FE-18EF-4826-95B1-EE067AA9FC15}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{FCCB7E2F-DCC4-402B-BD61-15D0A2831072}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D9ED6745-3C2A-46CB-97DA-C46BA1A3A07B}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{C335D433-9DCB-40C6-BF0E-556237F94898}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{B3E6363B-21EE-414C-A7F4-A5B8C81C0AEA}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{22AD1E6C-67A4-460C-9523-CE06DEC5C129}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{A5412567-6199-48D4-AB30-A8E3929AB999}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{4F8A3637-3E2E-421D-9817-25DA5E49AFD3}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -59,10 +75,6 @@ Global {38C096D0-5E23-47E2-A074-5F9852075459}.Debug|Any CPU.Build.0 = Debug|Any CPU {38C096D0-5E23-47E2-A074-5F9852075459}.Release|Any CPU.ActiveCfg = Release|Any CPU {38C096D0-5E23-47E2-A074-5F9852075459}.Release|Any CPU.Build.0 = Release|Any CPU - {324FA4F8-EA9C-4832-819E-823EF66E0461}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {324FA4F8-EA9C-4832-819E-823EF66E0461}.Debug|Any CPU.Build.0 = Debug|Any CPU - {324FA4F8-EA9C-4832-819E-823EF66E0461}.Release|Any CPU.ActiveCfg = Release|Any CPU - {324FA4F8-EA9C-4832-819E-823EF66E0461}.Release|Any CPU.Build.0 = Release|Any CPU {73B190CC-D704-484D-BC34-F28A6E307D29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {73B190CC-D704-484D-BC34-F28A6E307D29}.Debug|Any CPU.Build.0 = Debug|Any CPU {73B190CC-D704-484D-BC34-F28A6E307D29}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -71,6 +83,26 @@ Global {4FDFF976-E09D-4788-9AE2-BEB9AD129970}.Debug|Any CPU.Build.0 = Debug|Any CPU {4FDFF976-E09D-4788-9AE2-BEB9AD129970}.Release|Any CPU.ActiveCfg = Release|Any CPU {4FDFF976-E09D-4788-9AE2-BEB9AD129970}.Release|Any CPU.Build.0 = Release|Any CPU + {2DD92A7D-BB66-496A-84A2-6CE277908E45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2DD92A7D-BB66-496A-84A2-6CE277908E45}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2DD92A7D-BB66-496A-84A2-6CE277908E45}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2DD92A7D-BB66-496A-84A2-6CE277908E45}.Release|Any CPU.Build.0 = Release|Any CPU + {FA77F597-EEA3-464D-B1F7-34D8A34127B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA77F597-EEA3-464D-B1F7-34D8A34127B4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA77F597-EEA3-464D-B1F7-34D8A34127B4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA77F597-EEA3-464D-B1F7-34D8A34127B4}.Release|Any CPU.Build.0 = Release|Any CPU + {3BADB8CD-7AB5-4A0A-9529-30EB5FFE85E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3BADB8CD-7AB5-4A0A-9529-30EB5FFE85E6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3BADB8CD-7AB5-4A0A-9529-30EB5FFE85E6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3BADB8CD-7AB5-4A0A-9529-30EB5FFE85E6}.Release|Any CPU.Build.0 = Release|Any CPU + {EAF1EE23-E0F5-4941-9972-3B6C1E7EF5F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EAF1EE23-E0F5-4941-9972-3B6C1E7EF5F6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EAF1EE23-E0F5-4941-9972-3B6C1E7EF5F6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EAF1EE23-E0F5-4941-9972-3B6C1E7EF5F6}.Release|Any CPU.Build.0 = Release|Any CPU + {C49841FE-18EF-4826-95B1-EE067AA9FC15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C49841FE-18EF-4826-95B1-EE067AA9FC15}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C49841FE-18EF-4826-95B1-EE067AA9FC15}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C49841FE-18EF-4826-95B1-EE067AA9FC15}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -83,9 +115,16 @@ Global {C8B6031E-5DD0-4BE8-9D70-960B24B1D23D} = {D9ED6745-3C2A-46CB-97DA-C46BA1A3A07B} {E5E6C1F3-C318-47FF-B0BC-CFC04BC4AB15} = {D9ED6745-3C2A-46CB-97DA-C46BA1A3A07B} {1B533355-A67E-4912-9605-A08FC7870291} = {D9ED6745-3C2A-46CB-97DA-C46BA1A3A07B} - {324FA4F8-EA9C-4832-819E-823EF66E0461} = {C335D433-9DCB-40C6-BF0E-556237F94898} {73B190CC-D704-484D-BC34-F28A6E307D29} = {C335D433-9DCB-40C6-BF0E-556237F94898} {4FDFF976-E09D-4788-9AE2-BEB9AD129970} = {C335D433-9DCB-40C6-BF0E-556237F94898} + {2DD92A7D-BB66-496A-84A2-6CE277908E45} = {B3E6363B-21EE-414C-A7F4-A5B8C81C0AEA} + {FA77F597-EEA3-464D-B1F7-34D8A34127B4} = {B3E6363B-21EE-414C-A7F4-A5B8C81C0AEA} + {B3E6363B-21EE-414C-A7F4-A5B8C81C0AEA} = {4F8A3637-3E2E-421D-9817-25DA5E49AFD3} + {3BADB8CD-7AB5-4A0A-9529-30EB5FFE85E6} = {22AD1E6C-67A4-460C-9523-CE06DEC5C129} + {EAF1EE23-E0F5-4941-9972-3B6C1E7EF5F6} = {22AD1E6C-67A4-460C-9523-CE06DEC5C129} + {22AD1E6C-67A4-460C-9523-CE06DEC5C129} = {4F8A3637-3E2E-421D-9817-25DA5E49AFD3} + {C49841FE-18EF-4826-95B1-EE067AA9FC15} = {A5412567-6199-48D4-AB30-A8E3929AB999} + {A5412567-6199-48D4-AB30-A8E3929AB999} = {4F8A3637-3E2E-421D-9817-25DA5E49AFD3} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {699ABEC3-0D6B-4050-B86A-C6E1317DE039} diff --git a/src/libraries/System.Composition/System.Composition.sln b/src/libraries/System.Composition/System.Composition.sln index 380c14c17c29e0..db46937271c02c 100644 --- a/src/libraries/System.Composition/System.Composition.sln +++ b/src/libraries/System.Composition/System.Composition.sln @@ -19,18 +19,34 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Composition.Tests", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestLibrary", "tests\TestLibrary\TestLibrary.csproj", "{B16BCA17-DCA8-43B7-8E8A-89033F7A676E}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{8519E429-7116-4A96-BA06-7FCD7C86A05D}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{872B3C94-AC4C-4CE3-B8B1-6FDE84C50CE3}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{3EA50BD8-ABA5-47D8-AC31-4C6D1C2CAE63}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{F3F80D91-1286-4EC5-B2C1-500A3E8C4807}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{E8567397-C664-455F-BBB1-74DF0BE07570}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{ECE3BD0E-375C-4C17-B902-291A3B163AD7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{AAE2F3DD-3723-4317-9D7E-A7B1461EE757}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{31103FC5-CFD2-48D4-80D0-332DE6AC9840}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{E2A40304-1D7F-4BDA-B3A8-150A6B732A82}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A1E6CEE6-45AE-4A8A-A7FA-FFC34DB87C94}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{AB19313E-E606-4F39-AA2E-D3299DC26D7C}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{8F4758E9-C437-439D-9151-260D62ACF586}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{E36E5100-ED92-42D2-BF36-97A5613F7E28}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{4BE4613D-4593-4D1D-8FD1-0F1EDFD8ED70}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{28874CB5-7B35-4415-807F-FEAB090DD3AE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -77,10 +93,6 @@ Global {B16BCA17-DCA8-43B7-8E8A-89033F7A676E}.Debug|Any CPU.Build.0 = Debug|Any CPU {B16BCA17-DCA8-43B7-8E8A-89033F7A676E}.Release|Any CPU.ActiveCfg = Release|Any CPU {B16BCA17-DCA8-43B7-8E8A-89033F7A676E}.Release|Any CPU.Build.0 = Release|Any CPU - {8519E429-7116-4A96-BA06-7FCD7C86A05D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8519E429-7116-4A96-BA06-7FCD7C86A05D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8519E429-7116-4A96-BA06-7FCD7C86A05D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8519E429-7116-4A96-BA06-7FCD7C86A05D}.Release|Any CPU.Build.0 = Release|Any CPU {872B3C94-AC4C-4CE3-B8B1-6FDE84C50CE3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {872B3C94-AC4C-4CE3-B8B1-6FDE84C50CE3}.Debug|Any CPU.Build.0 = Debug|Any CPU {872B3C94-AC4C-4CE3-B8B1-6FDE84C50CE3}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -89,6 +101,26 @@ Global {3EA50BD8-ABA5-47D8-AC31-4C6D1C2CAE63}.Debug|Any CPU.Build.0 = Debug|Any CPU {3EA50BD8-ABA5-47D8-AC31-4C6D1C2CAE63}.Release|Any CPU.ActiveCfg = Release|Any CPU {3EA50BD8-ABA5-47D8-AC31-4C6D1C2CAE63}.Release|Any CPU.Build.0 = Release|Any CPU + {F3F80D91-1286-4EC5-B2C1-500A3E8C4807}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F3F80D91-1286-4EC5-B2C1-500A3E8C4807}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F3F80D91-1286-4EC5-B2C1-500A3E8C4807}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F3F80D91-1286-4EC5-B2C1-500A3E8C4807}.Release|Any CPU.Build.0 = Release|Any CPU + {E8567397-C664-455F-BBB1-74DF0BE07570}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E8567397-C664-455F-BBB1-74DF0BE07570}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E8567397-C664-455F-BBB1-74DF0BE07570}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E8567397-C664-455F-BBB1-74DF0BE07570}.Release|Any CPU.Build.0 = Release|Any CPU + {ECE3BD0E-375C-4C17-B902-291A3B163AD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ECE3BD0E-375C-4C17-B902-291A3B163AD7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ECE3BD0E-375C-4C17-B902-291A3B163AD7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ECE3BD0E-375C-4C17-B902-291A3B163AD7}.Release|Any CPU.Build.0 = Release|Any CPU + {AAE2F3DD-3723-4317-9D7E-A7B1461EE757}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AAE2F3DD-3723-4317-9D7E-A7B1461EE757}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AAE2F3DD-3723-4317-9D7E-A7B1461EE757}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AAE2F3DD-3723-4317-9D7E-A7B1461EE757}.Release|Any CPU.Build.0 = Release|Any CPU + {31103FC5-CFD2-48D4-80D0-332DE6AC9840}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {31103FC5-CFD2-48D4-80D0-332DE6AC9840}.Debug|Any CPU.Build.0 = Debug|Any CPU + {31103FC5-CFD2-48D4-80D0-332DE6AC9840}.Release|Any CPU.ActiveCfg = Release|Any CPU + {31103FC5-CFD2-48D4-80D0-332DE6AC9840}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -104,9 +136,16 @@ Global {60940C78-4DDA-4CDD-BA1C-8C9B6DB4FB64} = {A1E6CEE6-45AE-4A8A-A7FA-FFC34DB87C94} {E3295CB6-16E3-497C-A696-71A077DD5828} = {A1E6CEE6-45AE-4A8A-A7FA-FFC34DB87C94} {D1273F2F-1B6C-4EFB-ABF8-6072054E906C} = {A1E6CEE6-45AE-4A8A-A7FA-FFC34DB87C94} - {8519E429-7116-4A96-BA06-7FCD7C86A05D} = {AB19313E-E606-4F39-AA2E-D3299DC26D7C} {872B3C94-AC4C-4CE3-B8B1-6FDE84C50CE3} = {AB19313E-E606-4F39-AA2E-D3299DC26D7C} {3EA50BD8-ABA5-47D8-AC31-4C6D1C2CAE63} = {AB19313E-E606-4F39-AA2E-D3299DC26D7C} + {F3F80D91-1286-4EC5-B2C1-500A3E8C4807} = {8F4758E9-C437-439D-9151-260D62ACF586} + {E8567397-C664-455F-BBB1-74DF0BE07570} = {8F4758E9-C437-439D-9151-260D62ACF586} + {8F4758E9-C437-439D-9151-260D62ACF586} = {28874CB5-7B35-4415-807F-FEAB090DD3AE} + {ECE3BD0E-375C-4C17-B902-291A3B163AD7} = {E36E5100-ED92-42D2-BF36-97A5613F7E28} + {AAE2F3DD-3723-4317-9D7E-A7B1461EE757} = {E36E5100-ED92-42D2-BF36-97A5613F7E28} + {E36E5100-ED92-42D2-BF36-97A5613F7E28} = {28874CB5-7B35-4415-807F-FEAB090DD3AE} + {31103FC5-CFD2-48D4-80D0-332DE6AC9840} = {4BE4613D-4593-4D1D-8FD1-0F1EDFD8ED70} + {4BE4613D-4593-4D1D-8FD1-0F1EDFD8ED70} = {28874CB5-7B35-4415-807F-FEAB090DD3AE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {66F5BC63-E142-4B22-8B5D-1FF5206A7171} diff --git a/src/libraries/System.Composition/tests/ConcurrencyTests.cs b/src/libraries/System.Composition/tests/ConcurrencyTests.cs index 6801f55a57d32e..e015c15cb23308 100644 --- a/src/libraries/System.Composition/tests/ConcurrencyTests.cs +++ b/src/libraries/System.Composition/tests/ConcurrencyTests.cs @@ -28,6 +28,7 @@ public void OnImportsSatisfied() // This does not test the desired behaviour deterministically, // but is close enough to be repeatable at least on my machine :) [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void SharedInstancesAreNotVisibleUntilActivationCompletes() { var c = CreateContainer(typeof(PausesDuringActivation)); diff --git a/src/libraries/System.Configuration.ConfigurationManager/System.Configuration.ConfigurationManager.sln b/src/libraries/System.Configuration.ConfigurationManager/System.Configuration.ConfigurationManager.sln index f4dd87383ebd0d..cdac58ca71fee8 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/System.Configuration.ConfigurationManager.sln +++ b/src/libraries/System.Configuration.ConfigurationManager/System.Configuration.ConfigurationManager.sln @@ -1,6 +1,10 @@ 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", "{2BA69856-B7AB-4113-ABC9-93E3613DF70E}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{15012FB4-9C7C-4DE0-AB44-83A64654D738}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Drawing.Common", "..\shims\stubs\System.Drawing.Common.csproj", "{7228C70B-37CB-4200-A6D4-88724E3EBC76}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Configuration.ConfigurationManager", "ref\System.Configuration.ConfigurationManager.csproj", "{6F662E39-BB56-4BCF-B053-B4A1782A33E1}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Configuration.ConfigurationManager", "src\System.Configuration.ConfigurationManager.csproj", "{7C9D7BE4-BF9C-486C-8ADF-53DE282E018A}" @@ -13,12 +17,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.EventLog 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}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{D68C6A1A-34DD-49C2-9419-A3297B4C5F07}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{AFE5CE59-CCFC-472D-AE84-143F282335A6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{412BDE9C-0383-4B72-8638-21F6427AA70D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.Uri", "..\System.Private.Uri\src\System.Private.Uri.csproj", "{8D66707F-68BE-47FD-8A83-34A949B6F000}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{355B775A-BFE1-4384-BC83-C6B5D1FB77BB}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{66EC63BC-99DC-40CA-B53B-B4D8BF6D1630}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{6659DC55-CF12-45B1-B5CD-1F4F7330BE40}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\src\System.Runtime.csproj", "{A3B59DA6-C08A-4229-91CD-80496DC29389}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography.ProtectedData", "..\System.Security.Cryptography.ProtectedData\ref\System.Security.Cryptography.ProtectedData.csproj", "{1C48B652-BA62-4D46-9CDD-24A1670EE3E3}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography.ProtectedData", "..\System.Security.Cryptography.ProtectedData\src\System.Security.Cryptography.ProtectedData.csproj", "{7B2CA04A-9DFB-471E-B4CB-1937D0049B96}" @@ -31,105 +43,664 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", "..\System.Windows.Extensions\src\System.Windows.Extensions.csproj", "{E34EBFC8-D1BC-4ED7-8335-C183A5994EE1}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{3393D976-CAF0-47D0-850E-7A44DF892122}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{F9B974AE-C95E-4C9E-8F2F-0FAC091F7FF7}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{751DA007-D916-4F22-AF16-85F343C2992C}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{BFD32990-050A-4A17-800B-3AFD0A094EB8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{2745CED4-B2D1-4C08-956B-65B2391151BA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{77F11166-9206-4963-B252-6509E34CC33A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{4D98A009-1732-446B-A276-F299ABCA1936}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{7F9B8DF1-8408-48E2-8362-BA5E483A0201}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{3393D976-CAF0-47D0-850E-7A44DF892122}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A3B7282E-7D62-48ED-B5FC-E6AB32DA6F0A}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{751DA007-D916-4F22-AF16-85F343C2992C}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{BFBE3E0E-4E75-4665-A373-132D283D366D}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{D6587945-D604-4FCB-B87A-230F32CD9E12}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{6C996BA8-AAE3-4C22-8F34-D585B6C4036D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{EBF0C531-714D-47A5-8901-A8B22A29BB2A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{8F79E1CC-27F6-4DC1-BE12-DC8C46B72401}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|arm = Debug|arm + Debug|arm64 = Debug|arm64 + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|arm = Release|arm + Release|arm64 = Release|arm64 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + Checked|Any CPU = Checked|Any CPU + Checked|arm = Checked|arm + Checked|arm64 = Checked|arm64 + Checked|x64 = Checked|x64 + Checked|x86 = Checked|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2BA69856-B7AB-4113-ABC9-93E3613DF70E}.Debug|Any CPU.ActiveCfg = Debug|x64 + {2BA69856-B7AB-4113-ABC9-93E3613DF70E}.Debug|Any CPU.Build.0 = Debug|x64 + {2BA69856-B7AB-4113-ABC9-93E3613DF70E}.Debug|arm.ActiveCfg = Debug|arm + {2BA69856-B7AB-4113-ABC9-93E3613DF70E}.Debug|arm.Build.0 = Debug|arm + {2BA69856-B7AB-4113-ABC9-93E3613DF70E}.Debug|arm64.ActiveCfg = Debug|arm64 + {2BA69856-B7AB-4113-ABC9-93E3613DF70E}.Debug|arm64.Build.0 = Debug|arm64 + {2BA69856-B7AB-4113-ABC9-93E3613DF70E}.Debug|x64.ActiveCfg = Debug|x64 + {2BA69856-B7AB-4113-ABC9-93E3613DF70E}.Debug|x64.Build.0 = Debug|x64 + {2BA69856-B7AB-4113-ABC9-93E3613DF70E}.Debug|x86.ActiveCfg = Debug|x86 + {2BA69856-B7AB-4113-ABC9-93E3613DF70E}.Debug|x86.Build.0 = Debug|x86 + {2BA69856-B7AB-4113-ABC9-93E3613DF70E}.Release|Any CPU.ActiveCfg = Release|x64 + {2BA69856-B7AB-4113-ABC9-93E3613DF70E}.Release|Any CPU.Build.0 = Release|x64 + {2BA69856-B7AB-4113-ABC9-93E3613DF70E}.Release|arm.ActiveCfg = Release|arm + {2BA69856-B7AB-4113-ABC9-93E3613DF70E}.Release|arm.Build.0 = Release|arm + {2BA69856-B7AB-4113-ABC9-93E3613DF70E}.Release|arm64.ActiveCfg = Release|arm64 + {2BA69856-B7AB-4113-ABC9-93E3613DF70E}.Release|arm64.Build.0 = Release|arm64 + {2BA69856-B7AB-4113-ABC9-93E3613DF70E}.Release|x64.ActiveCfg = Release|x64 + {2BA69856-B7AB-4113-ABC9-93E3613DF70E}.Release|x64.Build.0 = Release|x64 + {2BA69856-B7AB-4113-ABC9-93E3613DF70E}.Release|x86.ActiveCfg = Release|x86 + {2BA69856-B7AB-4113-ABC9-93E3613DF70E}.Release|x86.Build.0 = Release|x86 + {2BA69856-B7AB-4113-ABC9-93E3613DF70E}.Checked|Any CPU.ActiveCfg = Checked|x64 + {2BA69856-B7AB-4113-ABC9-93E3613DF70E}.Checked|Any CPU.Build.0 = Checked|x64 + {2BA69856-B7AB-4113-ABC9-93E3613DF70E}.Checked|arm.ActiveCfg = Checked|arm + {2BA69856-B7AB-4113-ABC9-93E3613DF70E}.Checked|arm.Build.0 = Checked|arm + {2BA69856-B7AB-4113-ABC9-93E3613DF70E}.Checked|arm64.ActiveCfg = Checked|arm64 + {2BA69856-B7AB-4113-ABC9-93E3613DF70E}.Checked|arm64.Build.0 = Checked|arm64 + {2BA69856-B7AB-4113-ABC9-93E3613DF70E}.Checked|x64.ActiveCfg = Checked|x64 + {2BA69856-B7AB-4113-ABC9-93E3613DF70E}.Checked|x64.Build.0 = Checked|x64 + {2BA69856-B7AB-4113-ABC9-93E3613DF70E}.Checked|x86.ActiveCfg = Checked|x86 + {2BA69856-B7AB-4113-ABC9-93E3613DF70E}.Checked|x86.Build.0 = Checked|x86 {15012FB4-9C7C-4DE0-AB44-83A64654D738}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {15012FB4-9C7C-4DE0-AB44-83A64654D738}.Debug|Any CPU.Build.0 = Debug|Any CPU + {15012FB4-9C7C-4DE0-AB44-83A64654D738}.Debug|arm.ActiveCfg = Debug|Any CPU + {15012FB4-9C7C-4DE0-AB44-83A64654D738}.Debug|arm64.ActiveCfg = Debug|Any CPU + {15012FB4-9C7C-4DE0-AB44-83A64654D738}.Debug|x64.ActiveCfg = Debug|Any CPU + {15012FB4-9C7C-4DE0-AB44-83A64654D738}.Debug|x64.Build.0 = Debug|Any CPU + {15012FB4-9C7C-4DE0-AB44-83A64654D738}.Debug|x86.ActiveCfg = Debug|Any CPU + {15012FB4-9C7C-4DE0-AB44-83A64654D738}.Debug|x86.Build.0 = Debug|Any CPU {15012FB4-9C7C-4DE0-AB44-83A64654D738}.Release|Any CPU.ActiveCfg = Release|Any CPU {15012FB4-9C7C-4DE0-AB44-83A64654D738}.Release|Any CPU.Build.0 = Release|Any CPU + {15012FB4-9C7C-4DE0-AB44-83A64654D738}.Release|arm.ActiveCfg = Release|Any CPU + {15012FB4-9C7C-4DE0-AB44-83A64654D738}.Release|arm64.ActiveCfg = Release|Any CPU + {15012FB4-9C7C-4DE0-AB44-83A64654D738}.Release|x64.ActiveCfg = Release|Any CPU + {15012FB4-9C7C-4DE0-AB44-83A64654D738}.Release|x64.Build.0 = Release|Any CPU + {15012FB4-9C7C-4DE0-AB44-83A64654D738}.Release|x86.ActiveCfg = Release|Any CPU + {15012FB4-9C7C-4DE0-AB44-83A64654D738}.Release|x86.Build.0 = Release|Any CPU + {15012FB4-9C7C-4DE0-AB44-83A64654D738}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {15012FB4-9C7C-4DE0-AB44-83A64654D738}.Checked|arm.ActiveCfg = Debug|Any CPU + {15012FB4-9C7C-4DE0-AB44-83A64654D738}.Checked|arm64.ActiveCfg = Debug|Any CPU + {15012FB4-9C7C-4DE0-AB44-83A64654D738}.Checked|x64.ActiveCfg = Debug|Any CPU + {15012FB4-9C7C-4DE0-AB44-83A64654D738}.Checked|x86.ActiveCfg = Debug|Any CPU + {7228C70B-37CB-4200-A6D4-88724E3EBC76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7228C70B-37CB-4200-A6D4-88724E3EBC76}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7228C70B-37CB-4200-A6D4-88724E3EBC76}.Debug|arm.ActiveCfg = Debug|Any CPU + {7228C70B-37CB-4200-A6D4-88724E3EBC76}.Debug|arm64.ActiveCfg = Debug|Any CPU + {7228C70B-37CB-4200-A6D4-88724E3EBC76}.Debug|x64.ActiveCfg = Debug|Any CPU + {7228C70B-37CB-4200-A6D4-88724E3EBC76}.Debug|x64.Build.0 = Debug|Any CPU + {7228C70B-37CB-4200-A6D4-88724E3EBC76}.Debug|x86.ActiveCfg = Debug|Any CPU + {7228C70B-37CB-4200-A6D4-88724E3EBC76}.Debug|x86.Build.0 = Debug|Any CPU + {7228C70B-37CB-4200-A6D4-88724E3EBC76}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7228C70B-37CB-4200-A6D4-88724E3EBC76}.Release|Any CPU.Build.0 = Release|Any CPU + {7228C70B-37CB-4200-A6D4-88724E3EBC76}.Release|arm.ActiveCfg = Release|Any CPU + {7228C70B-37CB-4200-A6D4-88724E3EBC76}.Release|arm64.ActiveCfg = Release|Any CPU + {7228C70B-37CB-4200-A6D4-88724E3EBC76}.Release|x64.ActiveCfg = Release|Any CPU + {7228C70B-37CB-4200-A6D4-88724E3EBC76}.Release|x64.Build.0 = Release|Any CPU + {7228C70B-37CB-4200-A6D4-88724E3EBC76}.Release|x86.ActiveCfg = Release|Any CPU + {7228C70B-37CB-4200-A6D4-88724E3EBC76}.Release|x86.Build.0 = Release|Any CPU + {7228C70B-37CB-4200-A6D4-88724E3EBC76}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {7228C70B-37CB-4200-A6D4-88724E3EBC76}.Checked|arm.ActiveCfg = Debug|Any CPU + {7228C70B-37CB-4200-A6D4-88724E3EBC76}.Checked|arm64.ActiveCfg = Debug|Any CPU + {7228C70B-37CB-4200-A6D4-88724E3EBC76}.Checked|x64.ActiveCfg = Debug|Any CPU + {7228C70B-37CB-4200-A6D4-88724E3EBC76}.Checked|x86.ActiveCfg = Debug|Any CPU {6F662E39-BB56-4BCF-B053-B4A1782A33E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6F662E39-BB56-4BCF-B053-B4A1782A33E1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6F662E39-BB56-4BCF-B053-B4A1782A33E1}.Debug|arm.ActiveCfg = Debug|Any CPU + {6F662E39-BB56-4BCF-B053-B4A1782A33E1}.Debug|arm64.ActiveCfg = Debug|Any CPU + {6F662E39-BB56-4BCF-B053-B4A1782A33E1}.Debug|x64.ActiveCfg = Debug|Any CPU + {6F662E39-BB56-4BCF-B053-B4A1782A33E1}.Debug|x64.Build.0 = Debug|Any CPU + {6F662E39-BB56-4BCF-B053-B4A1782A33E1}.Debug|x86.ActiveCfg = Debug|Any CPU + {6F662E39-BB56-4BCF-B053-B4A1782A33E1}.Debug|x86.Build.0 = Debug|Any CPU {6F662E39-BB56-4BCF-B053-B4A1782A33E1}.Release|Any CPU.ActiveCfg = Release|Any CPU {6F662E39-BB56-4BCF-B053-B4A1782A33E1}.Release|Any CPU.Build.0 = Release|Any CPU + {6F662E39-BB56-4BCF-B053-B4A1782A33E1}.Release|arm.ActiveCfg = Release|Any CPU + {6F662E39-BB56-4BCF-B053-B4A1782A33E1}.Release|arm64.ActiveCfg = Release|Any CPU + {6F662E39-BB56-4BCF-B053-B4A1782A33E1}.Release|x64.ActiveCfg = Release|Any CPU + {6F662E39-BB56-4BCF-B053-B4A1782A33E1}.Release|x64.Build.0 = Release|Any CPU + {6F662E39-BB56-4BCF-B053-B4A1782A33E1}.Release|x86.ActiveCfg = Release|Any CPU + {6F662E39-BB56-4BCF-B053-B4A1782A33E1}.Release|x86.Build.0 = Release|Any CPU + {6F662E39-BB56-4BCF-B053-B4A1782A33E1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {6F662E39-BB56-4BCF-B053-B4A1782A33E1}.Checked|arm.ActiveCfg = Debug|Any CPU + {6F662E39-BB56-4BCF-B053-B4A1782A33E1}.Checked|arm64.ActiveCfg = Debug|Any CPU + {6F662E39-BB56-4BCF-B053-B4A1782A33E1}.Checked|x64.ActiveCfg = Debug|Any CPU + {6F662E39-BB56-4BCF-B053-B4A1782A33E1}.Checked|x86.ActiveCfg = Debug|Any CPU {7C9D7BE4-BF9C-486C-8ADF-53DE282E018A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7C9D7BE4-BF9C-486C-8ADF-53DE282E018A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7C9D7BE4-BF9C-486C-8ADF-53DE282E018A}.Debug|arm.ActiveCfg = Debug|Any CPU + {7C9D7BE4-BF9C-486C-8ADF-53DE282E018A}.Debug|arm64.ActiveCfg = Debug|Any CPU + {7C9D7BE4-BF9C-486C-8ADF-53DE282E018A}.Debug|x64.ActiveCfg = Debug|Any CPU + {7C9D7BE4-BF9C-486C-8ADF-53DE282E018A}.Debug|x64.Build.0 = Debug|Any CPU + {7C9D7BE4-BF9C-486C-8ADF-53DE282E018A}.Debug|x86.ActiveCfg = Debug|Any CPU + {7C9D7BE4-BF9C-486C-8ADF-53DE282E018A}.Debug|x86.Build.0 = Debug|Any CPU {7C9D7BE4-BF9C-486C-8ADF-53DE282E018A}.Release|Any CPU.ActiveCfg = Release|Any CPU {7C9D7BE4-BF9C-486C-8ADF-53DE282E018A}.Release|Any CPU.Build.0 = Release|Any CPU + {7C9D7BE4-BF9C-486C-8ADF-53DE282E018A}.Release|arm.ActiveCfg = Release|Any CPU + {7C9D7BE4-BF9C-486C-8ADF-53DE282E018A}.Release|arm64.ActiveCfg = Release|Any CPU + {7C9D7BE4-BF9C-486C-8ADF-53DE282E018A}.Release|x64.ActiveCfg = Release|Any CPU + {7C9D7BE4-BF9C-486C-8ADF-53DE282E018A}.Release|x64.Build.0 = Release|Any CPU + {7C9D7BE4-BF9C-486C-8ADF-53DE282E018A}.Release|x86.ActiveCfg = Release|Any CPU + {7C9D7BE4-BF9C-486C-8ADF-53DE282E018A}.Release|x86.Build.0 = Release|Any CPU + {7C9D7BE4-BF9C-486C-8ADF-53DE282E018A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {7C9D7BE4-BF9C-486C-8ADF-53DE282E018A}.Checked|arm.ActiveCfg = Debug|Any CPU + {7C9D7BE4-BF9C-486C-8ADF-53DE282E018A}.Checked|arm64.ActiveCfg = Debug|Any CPU + {7C9D7BE4-BF9C-486C-8ADF-53DE282E018A}.Checked|x64.ActiveCfg = Debug|Any CPU + {7C9D7BE4-BF9C-486C-8ADF-53DE282E018A}.Checked|x86.ActiveCfg = Debug|Any CPU {9476F50F-E44C-4420-96AB-448259A47C4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9476F50F-E44C-4420-96AB-448259A47C4F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9476F50F-E44C-4420-96AB-448259A47C4F}.Debug|arm.ActiveCfg = Debug|Any CPU + {9476F50F-E44C-4420-96AB-448259A47C4F}.Debug|arm64.ActiveCfg = Debug|Any CPU + {9476F50F-E44C-4420-96AB-448259A47C4F}.Debug|x64.ActiveCfg = Debug|Any CPU + {9476F50F-E44C-4420-96AB-448259A47C4F}.Debug|x64.Build.0 = Debug|Any CPU + {9476F50F-E44C-4420-96AB-448259A47C4F}.Debug|x86.ActiveCfg = Debug|Any CPU + {9476F50F-E44C-4420-96AB-448259A47C4F}.Debug|x86.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 + {9476F50F-E44C-4420-96AB-448259A47C4F}.Release|arm.ActiveCfg = Release|Any CPU + {9476F50F-E44C-4420-96AB-448259A47C4F}.Release|arm64.ActiveCfg = Release|Any CPU + {9476F50F-E44C-4420-96AB-448259A47C4F}.Release|x64.ActiveCfg = Release|Any CPU + {9476F50F-E44C-4420-96AB-448259A47C4F}.Release|x64.Build.0 = Release|Any CPU + {9476F50F-E44C-4420-96AB-448259A47C4F}.Release|x86.ActiveCfg = Release|Any CPU + {9476F50F-E44C-4420-96AB-448259A47C4F}.Release|x86.Build.0 = Release|Any CPU + {9476F50F-E44C-4420-96AB-448259A47C4F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {9476F50F-E44C-4420-96AB-448259A47C4F}.Checked|arm.ActiveCfg = Debug|Any CPU + {9476F50F-E44C-4420-96AB-448259A47C4F}.Checked|arm64.ActiveCfg = Debug|Any CPU + {9476F50F-E44C-4420-96AB-448259A47C4F}.Checked|x64.ActiveCfg = Debug|Any CPU + {9476F50F-E44C-4420-96AB-448259A47C4F}.Checked|x86.ActiveCfg = Debug|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}.Debug|arm.ActiveCfg = Debug|Any CPU + {C70C30E4-56DC-44FA-B621-9BB4C4E365D0}.Debug|arm64.ActiveCfg = Debug|Any CPU + {C70C30E4-56DC-44FA-B621-9BB4C4E365D0}.Debug|x64.ActiveCfg = Debug|Any CPU + {C70C30E4-56DC-44FA-B621-9BB4C4E365D0}.Debug|x64.Build.0 = Debug|Any CPU + {C70C30E4-56DC-44FA-B621-9BB4C4E365D0}.Debug|x86.ActiveCfg = Debug|Any CPU + {C70C30E4-56DC-44FA-B621-9BB4C4E365D0}.Debug|x86.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 + {C70C30E4-56DC-44FA-B621-9BB4C4E365D0}.Release|arm.ActiveCfg = Release|Any CPU + {C70C30E4-56DC-44FA-B621-9BB4C4E365D0}.Release|arm64.ActiveCfg = Release|Any CPU + {C70C30E4-56DC-44FA-B621-9BB4C4E365D0}.Release|x64.ActiveCfg = Release|Any CPU + {C70C30E4-56DC-44FA-B621-9BB4C4E365D0}.Release|x64.Build.0 = Release|Any CPU + {C70C30E4-56DC-44FA-B621-9BB4C4E365D0}.Release|x86.ActiveCfg = Release|Any CPU + {C70C30E4-56DC-44FA-B621-9BB4C4E365D0}.Release|x86.Build.0 = Release|Any CPU + {C70C30E4-56DC-44FA-B621-9BB4C4E365D0}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {C70C30E4-56DC-44FA-B621-9BB4C4E365D0}.Checked|arm.ActiveCfg = Debug|Any CPU + {C70C30E4-56DC-44FA-B621-9BB4C4E365D0}.Checked|arm64.ActiveCfg = Debug|Any CPU + {C70C30E4-56DC-44FA-B621-9BB4C4E365D0}.Checked|x64.ActiveCfg = Debug|Any CPU + {C70C30E4-56DC-44FA-B621-9BB4C4E365D0}.Checked|x86.ActiveCfg = Debug|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}.Debug|arm.ActiveCfg = Debug|Any CPU + {B9C6FFBB-A992-4402-93DC-254C660CF16A}.Debug|arm64.ActiveCfg = Debug|Any CPU + {B9C6FFBB-A992-4402-93DC-254C660CF16A}.Debug|x64.ActiveCfg = Debug|Any CPU + {B9C6FFBB-A992-4402-93DC-254C660CF16A}.Debug|x64.Build.0 = Debug|Any CPU + {B9C6FFBB-A992-4402-93DC-254C660CF16A}.Debug|x86.ActiveCfg = Debug|Any CPU + {B9C6FFBB-A992-4402-93DC-254C660CF16A}.Debug|x86.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 + {B9C6FFBB-A992-4402-93DC-254C660CF16A}.Release|arm.ActiveCfg = Release|Any CPU + {B9C6FFBB-A992-4402-93DC-254C660CF16A}.Release|arm64.ActiveCfg = Release|Any CPU + {B9C6FFBB-A992-4402-93DC-254C660CF16A}.Release|x64.ActiveCfg = Release|Any CPU + {B9C6FFBB-A992-4402-93DC-254C660CF16A}.Release|x64.Build.0 = Release|Any CPU + {B9C6FFBB-A992-4402-93DC-254C660CF16A}.Release|x86.ActiveCfg = Release|Any CPU + {B9C6FFBB-A992-4402-93DC-254C660CF16A}.Release|x86.Build.0 = Release|Any CPU + {B9C6FFBB-A992-4402-93DC-254C660CF16A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {B9C6FFBB-A992-4402-93DC-254C660CF16A}.Checked|arm.ActiveCfg = Debug|Any CPU + {B9C6FFBB-A992-4402-93DC-254C660CF16A}.Checked|arm64.ActiveCfg = Debug|Any CPU + {B9C6FFBB-A992-4402-93DC-254C660CF16A}.Checked|x64.ActiveCfg = Debug|Any CPU + {B9C6FFBB-A992-4402-93DC-254C660CF16A}.Checked|x86.ActiveCfg = Debug|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}.Debug|arm.ActiveCfg = Debug|Any CPU + {808D1F6A-2605-4BEB-A64B-0D09CDE558C8}.Debug|arm64.ActiveCfg = Debug|Any CPU + {808D1F6A-2605-4BEB-A64B-0D09CDE558C8}.Debug|x64.ActiveCfg = Debug|Any CPU + {808D1F6A-2605-4BEB-A64B-0D09CDE558C8}.Debug|x64.Build.0 = Debug|Any CPU + {808D1F6A-2605-4BEB-A64B-0D09CDE558C8}.Debug|x86.ActiveCfg = Debug|Any CPU + {808D1F6A-2605-4BEB-A64B-0D09CDE558C8}.Debug|x86.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 - {D68C6A1A-34DD-49C2-9419-A3297B4C5F07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D68C6A1A-34DD-49C2-9419-A3297B4C5F07}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D68C6A1A-34DD-49C2-9419-A3297B4C5F07}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D68C6A1A-34DD-49C2-9419-A3297B4C5F07}.Release|Any CPU.Build.0 = Release|Any CPU + {808D1F6A-2605-4BEB-A64B-0D09CDE558C8}.Release|arm.ActiveCfg = Release|Any CPU + {808D1F6A-2605-4BEB-A64B-0D09CDE558C8}.Release|arm64.ActiveCfg = Release|Any CPU + {808D1F6A-2605-4BEB-A64B-0D09CDE558C8}.Release|x64.ActiveCfg = Release|Any CPU + {808D1F6A-2605-4BEB-A64B-0D09CDE558C8}.Release|x64.Build.0 = Release|Any CPU + {808D1F6A-2605-4BEB-A64B-0D09CDE558C8}.Release|x86.ActiveCfg = Release|Any CPU + {808D1F6A-2605-4BEB-A64B-0D09CDE558C8}.Release|x86.Build.0 = Release|Any CPU + {808D1F6A-2605-4BEB-A64B-0D09CDE558C8}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {808D1F6A-2605-4BEB-A64B-0D09CDE558C8}.Checked|arm.ActiveCfg = Debug|Any CPU + {808D1F6A-2605-4BEB-A64B-0D09CDE558C8}.Checked|arm64.ActiveCfg = Debug|Any CPU + {808D1F6A-2605-4BEB-A64B-0D09CDE558C8}.Checked|x64.ActiveCfg = Debug|Any CPU + {808D1F6A-2605-4BEB-A64B-0D09CDE558C8}.Checked|x86.ActiveCfg = Debug|Any CPU + {AFE5CE59-CCFC-472D-AE84-143F282335A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AFE5CE59-CCFC-472D-AE84-143F282335A6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AFE5CE59-CCFC-472D-AE84-143F282335A6}.Debug|arm.ActiveCfg = Debug|Any CPU + {AFE5CE59-CCFC-472D-AE84-143F282335A6}.Debug|arm64.ActiveCfg = Debug|Any CPU + {AFE5CE59-CCFC-472D-AE84-143F282335A6}.Debug|x64.ActiveCfg = Debug|Any CPU + {AFE5CE59-CCFC-472D-AE84-143F282335A6}.Debug|x64.Build.0 = Debug|Any CPU + {AFE5CE59-CCFC-472D-AE84-143F282335A6}.Debug|x86.ActiveCfg = Debug|Any CPU + {AFE5CE59-CCFC-472D-AE84-143F282335A6}.Debug|x86.Build.0 = Debug|Any CPU + {AFE5CE59-CCFC-472D-AE84-143F282335A6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AFE5CE59-CCFC-472D-AE84-143F282335A6}.Release|Any CPU.Build.0 = Release|Any CPU + {AFE5CE59-CCFC-472D-AE84-143F282335A6}.Release|arm.ActiveCfg = Release|Any CPU + {AFE5CE59-CCFC-472D-AE84-143F282335A6}.Release|arm64.ActiveCfg = Release|Any CPU + {AFE5CE59-CCFC-472D-AE84-143F282335A6}.Release|x64.ActiveCfg = Release|Any CPU + {AFE5CE59-CCFC-472D-AE84-143F282335A6}.Release|x64.Build.0 = Release|Any CPU + {AFE5CE59-CCFC-472D-AE84-143F282335A6}.Release|x86.ActiveCfg = Release|Any CPU + {AFE5CE59-CCFC-472D-AE84-143F282335A6}.Release|x86.Build.0 = Release|Any CPU + {AFE5CE59-CCFC-472D-AE84-143F282335A6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {AFE5CE59-CCFC-472D-AE84-143F282335A6}.Checked|arm.ActiveCfg = Debug|Any CPU + {AFE5CE59-CCFC-472D-AE84-143F282335A6}.Checked|arm64.ActiveCfg = Debug|Any CPU + {AFE5CE59-CCFC-472D-AE84-143F282335A6}.Checked|x64.ActiveCfg = Debug|Any CPU + {AFE5CE59-CCFC-472D-AE84-143F282335A6}.Checked|x86.ActiveCfg = Debug|Any CPU + {412BDE9C-0383-4B72-8638-21F6427AA70D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {412BDE9C-0383-4B72-8638-21F6427AA70D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {412BDE9C-0383-4B72-8638-21F6427AA70D}.Debug|arm.ActiveCfg = Debug|Any CPU + {412BDE9C-0383-4B72-8638-21F6427AA70D}.Debug|arm64.ActiveCfg = Debug|Any CPU + {412BDE9C-0383-4B72-8638-21F6427AA70D}.Debug|x64.ActiveCfg = Debug|Any CPU + {412BDE9C-0383-4B72-8638-21F6427AA70D}.Debug|x64.Build.0 = Debug|Any CPU + {412BDE9C-0383-4B72-8638-21F6427AA70D}.Debug|x86.ActiveCfg = Debug|Any CPU + {412BDE9C-0383-4B72-8638-21F6427AA70D}.Debug|x86.Build.0 = Debug|Any CPU + {412BDE9C-0383-4B72-8638-21F6427AA70D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {412BDE9C-0383-4B72-8638-21F6427AA70D}.Release|Any CPU.Build.0 = Release|Any CPU + {412BDE9C-0383-4B72-8638-21F6427AA70D}.Release|arm.ActiveCfg = Release|Any CPU + {412BDE9C-0383-4B72-8638-21F6427AA70D}.Release|arm64.ActiveCfg = Release|Any CPU + {412BDE9C-0383-4B72-8638-21F6427AA70D}.Release|x64.ActiveCfg = Release|Any CPU + {412BDE9C-0383-4B72-8638-21F6427AA70D}.Release|x64.Build.0 = Release|Any CPU + {412BDE9C-0383-4B72-8638-21F6427AA70D}.Release|x86.ActiveCfg = Release|Any CPU + {412BDE9C-0383-4B72-8638-21F6427AA70D}.Release|x86.Build.0 = Release|Any CPU + {412BDE9C-0383-4B72-8638-21F6427AA70D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {412BDE9C-0383-4B72-8638-21F6427AA70D}.Checked|arm.ActiveCfg = Debug|Any CPU + {412BDE9C-0383-4B72-8638-21F6427AA70D}.Checked|arm64.ActiveCfg = Debug|Any CPU + {412BDE9C-0383-4B72-8638-21F6427AA70D}.Checked|x64.ActiveCfg = Debug|Any CPU + {412BDE9C-0383-4B72-8638-21F6427AA70D}.Checked|x86.ActiveCfg = Debug|Any CPU + {8D66707F-68BE-47FD-8A83-34A949B6F000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8D66707F-68BE-47FD-8A83-34A949B6F000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8D66707F-68BE-47FD-8A83-34A949B6F000}.Debug|arm.ActiveCfg = Debug|Any CPU + {8D66707F-68BE-47FD-8A83-34A949B6F000}.Debug|arm64.ActiveCfg = Debug|Any CPU + {8D66707F-68BE-47FD-8A83-34A949B6F000}.Debug|x64.ActiveCfg = Debug|Any CPU + {8D66707F-68BE-47FD-8A83-34A949B6F000}.Debug|x64.Build.0 = Debug|Any CPU + {8D66707F-68BE-47FD-8A83-34A949B6F000}.Debug|x86.ActiveCfg = Debug|Any CPU + {8D66707F-68BE-47FD-8A83-34A949B6F000}.Debug|x86.Build.0 = Debug|Any CPU + {8D66707F-68BE-47FD-8A83-34A949B6F000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8D66707F-68BE-47FD-8A83-34A949B6F000}.Release|Any CPU.Build.0 = Release|Any CPU + {8D66707F-68BE-47FD-8A83-34A949B6F000}.Release|arm.ActiveCfg = Release|Any CPU + {8D66707F-68BE-47FD-8A83-34A949B6F000}.Release|arm64.ActiveCfg = Release|Any CPU + {8D66707F-68BE-47FD-8A83-34A949B6F000}.Release|x64.ActiveCfg = Release|Any CPU + {8D66707F-68BE-47FD-8A83-34A949B6F000}.Release|x64.Build.0 = Release|Any CPU + {8D66707F-68BE-47FD-8A83-34A949B6F000}.Release|x86.ActiveCfg = Release|Any CPU + {8D66707F-68BE-47FD-8A83-34A949B6F000}.Release|x86.Build.0 = Release|Any CPU + {8D66707F-68BE-47FD-8A83-34A949B6F000}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {8D66707F-68BE-47FD-8A83-34A949B6F000}.Checked|arm.ActiveCfg = Debug|Any CPU + {8D66707F-68BE-47FD-8A83-34A949B6F000}.Checked|arm64.ActiveCfg = Debug|Any CPU + {8D66707F-68BE-47FD-8A83-34A949B6F000}.Checked|x64.ActiveCfg = Debug|Any CPU + {8D66707F-68BE-47FD-8A83-34A949B6F000}.Checked|x86.ActiveCfg = Debug|Any CPU {355B775A-BFE1-4384-BC83-C6B5D1FB77BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {355B775A-BFE1-4384-BC83-C6B5D1FB77BB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {355B775A-BFE1-4384-BC83-C6B5D1FB77BB}.Debug|arm.ActiveCfg = Debug|Any CPU + {355B775A-BFE1-4384-BC83-C6B5D1FB77BB}.Debug|arm64.ActiveCfg = Debug|Any CPU + {355B775A-BFE1-4384-BC83-C6B5D1FB77BB}.Debug|x64.ActiveCfg = Debug|Any CPU + {355B775A-BFE1-4384-BC83-C6B5D1FB77BB}.Debug|x64.Build.0 = Debug|Any CPU + {355B775A-BFE1-4384-BC83-C6B5D1FB77BB}.Debug|x86.ActiveCfg = Debug|Any CPU + {355B775A-BFE1-4384-BC83-C6B5D1FB77BB}.Debug|x86.Build.0 = Debug|Any CPU {355B775A-BFE1-4384-BC83-C6B5D1FB77BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {355B775A-BFE1-4384-BC83-C6B5D1FB77BB}.Release|Any CPU.Build.0 = Release|Any CPU + {355B775A-BFE1-4384-BC83-C6B5D1FB77BB}.Release|arm.ActiveCfg = Release|Any CPU + {355B775A-BFE1-4384-BC83-C6B5D1FB77BB}.Release|arm64.ActiveCfg = Release|Any CPU + {355B775A-BFE1-4384-BC83-C6B5D1FB77BB}.Release|x64.ActiveCfg = Release|Any CPU + {355B775A-BFE1-4384-BC83-C6B5D1FB77BB}.Release|x64.Build.0 = Release|Any CPU + {355B775A-BFE1-4384-BC83-C6B5D1FB77BB}.Release|x86.ActiveCfg = Release|Any CPU + {355B775A-BFE1-4384-BC83-C6B5D1FB77BB}.Release|x86.Build.0 = Release|Any CPU + {355B775A-BFE1-4384-BC83-C6B5D1FB77BB}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {355B775A-BFE1-4384-BC83-C6B5D1FB77BB}.Checked|arm.ActiveCfg = Debug|Any CPU + {355B775A-BFE1-4384-BC83-C6B5D1FB77BB}.Checked|arm64.ActiveCfg = Debug|Any CPU + {355B775A-BFE1-4384-BC83-C6B5D1FB77BB}.Checked|x64.ActiveCfg = Debug|Any CPU + {355B775A-BFE1-4384-BC83-C6B5D1FB77BB}.Checked|x86.ActiveCfg = Debug|Any CPU {66EC63BC-99DC-40CA-B53B-B4D8BF6D1630}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {66EC63BC-99DC-40CA-B53B-B4D8BF6D1630}.Debug|Any CPU.Build.0 = Debug|Any CPU + {66EC63BC-99DC-40CA-B53B-B4D8BF6D1630}.Debug|arm.ActiveCfg = Debug|Any CPU + {66EC63BC-99DC-40CA-B53B-B4D8BF6D1630}.Debug|arm64.ActiveCfg = Debug|Any CPU + {66EC63BC-99DC-40CA-B53B-B4D8BF6D1630}.Debug|x64.ActiveCfg = Debug|Any CPU + {66EC63BC-99DC-40CA-B53B-B4D8BF6D1630}.Debug|x64.Build.0 = Debug|Any CPU + {66EC63BC-99DC-40CA-B53B-B4D8BF6D1630}.Debug|x86.ActiveCfg = Debug|Any CPU + {66EC63BC-99DC-40CA-B53B-B4D8BF6D1630}.Debug|x86.Build.0 = Debug|Any CPU {66EC63BC-99DC-40CA-B53B-B4D8BF6D1630}.Release|Any CPU.ActiveCfg = Release|Any CPU {66EC63BC-99DC-40CA-B53B-B4D8BF6D1630}.Release|Any CPU.Build.0 = Release|Any CPU + {66EC63BC-99DC-40CA-B53B-B4D8BF6D1630}.Release|arm.ActiveCfg = Release|Any CPU + {66EC63BC-99DC-40CA-B53B-B4D8BF6D1630}.Release|arm64.ActiveCfg = Release|Any CPU + {66EC63BC-99DC-40CA-B53B-B4D8BF6D1630}.Release|x64.ActiveCfg = Release|Any CPU + {66EC63BC-99DC-40CA-B53B-B4D8BF6D1630}.Release|x64.Build.0 = Release|Any CPU + {66EC63BC-99DC-40CA-B53B-B4D8BF6D1630}.Release|x86.ActiveCfg = Release|Any CPU + {66EC63BC-99DC-40CA-B53B-B4D8BF6D1630}.Release|x86.Build.0 = Release|Any CPU + {66EC63BC-99DC-40CA-B53B-B4D8BF6D1630}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {66EC63BC-99DC-40CA-B53B-B4D8BF6D1630}.Checked|arm.ActiveCfg = Debug|Any CPU + {66EC63BC-99DC-40CA-B53B-B4D8BF6D1630}.Checked|arm64.ActiveCfg = Debug|Any CPU + {66EC63BC-99DC-40CA-B53B-B4D8BF6D1630}.Checked|x64.ActiveCfg = Debug|Any CPU + {66EC63BC-99DC-40CA-B53B-B4D8BF6D1630}.Checked|x86.ActiveCfg = Debug|Any CPU + {6659DC55-CF12-45B1-B5CD-1F4F7330BE40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6659DC55-CF12-45B1-B5CD-1F4F7330BE40}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6659DC55-CF12-45B1-B5CD-1F4F7330BE40}.Debug|arm.ActiveCfg = Debug|Any CPU + {6659DC55-CF12-45B1-B5CD-1F4F7330BE40}.Debug|arm64.ActiveCfg = Debug|Any CPU + {6659DC55-CF12-45B1-B5CD-1F4F7330BE40}.Debug|x64.ActiveCfg = Debug|Any CPU + {6659DC55-CF12-45B1-B5CD-1F4F7330BE40}.Debug|x64.Build.0 = Debug|Any CPU + {6659DC55-CF12-45B1-B5CD-1F4F7330BE40}.Debug|x86.ActiveCfg = Debug|Any CPU + {6659DC55-CF12-45B1-B5CD-1F4F7330BE40}.Debug|x86.Build.0 = Debug|Any CPU + {6659DC55-CF12-45B1-B5CD-1F4F7330BE40}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6659DC55-CF12-45B1-B5CD-1F4F7330BE40}.Release|Any CPU.Build.0 = Release|Any CPU + {6659DC55-CF12-45B1-B5CD-1F4F7330BE40}.Release|arm.ActiveCfg = Release|Any CPU + {6659DC55-CF12-45B1-B5CD-1F4F7330BE40}.Release|arm64.ActiveCfg = Release|Any CPU + {6659DC55-CF12-45B1-B5CD-1F4F7330BE40}.Release|x64.ActiveCfg = Release|Any CPU + {6659DC55-CF12-45B1-B5CD-1F4F7330BE40}.Release|x64.Build.0 = Release|Any CPU + {6659DC55-CF12-45B1-B5CD-1F4F7330BE40}.Release|x86.ActiveCfg = Release|Any CPU + {6659DC55-CF12-45B1-B5CD-1F4F7330BE40}.Release|x86.Build.0 = Release|Any CPU + {6659DC55-CF12-45B1-B5CD-1F4F7330BE40}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {6659DC55-CF12-45B1-B5CD-1F4F7330BE40}.Checked|arm.ActiveCfg = Debug|Any CPU + {6659DC55-CF12-45B1-B5CD-1F4F7330BE40}.Checked|arm64.ActiveCfg = Debug|Any CPU + {6659DC55-CF12-45B1-B5CD-1F4F7330BE40}.Checked|x64.ActiveCfg = Debug|Any CPU + {6659DC55-CF12-45B1-B5CD-1F4F7330BE40}.Checked|x86.ActiveCfg = Debug|Any CPU + {A3B59DA6-C08A-4229-91CD-80496DC29389}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A3B59DA6-C08A-4229-91CD-80496DC29389}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A3B59DA6-C08A-4229-91CD-80496DC29389}.Debug|arm.ActiveCfg = Debug|Any CPU + {A3B59DA6-C08A-4229-91CD-80496DC29389}.Debug|arm64.ActiveCfg = Debug|Any CPU + {A3B59DA6-C08A-4229-91CD-80496DC29389}.Debug|x64.ActiveCfg = Debug|Any CPU + {A3B59DA6-C08A-4229-91CD-80496DC29389}.Debug|x64.Build.0 = Debug|Any CPU + {A3B59DA6-C08A-4229-91CD-80496DC29389}.Debug|x86.ActiveCfg = Debug|Any CPU + {A3B59DA6-C08A-4229-91CD-80496DC29389}.Debug|x86.Build.0 = Debug|Any CPU + {A3B59DA6-C08A-4229-91CD-80496DC29389}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A3B59DA6-C08A-4229-91CD-80496DC29389}.Release|Any CPU.Build.0 = Release|Any CPU + {A3B59DA6-C08A-4229-91CD-80496DC29389}.Release|arm.ActiveCfg = Release|Any CPU + {A3B59DA6-C08A-4229-91CD-80496DC29389}.Release|arm64.ActiveCfg = Release|Any CPU + {A3B59DA6-C08A-4229-91CD-80496DC29389}.Release|x64.ActiveCfg = Release|Any CPU + {A3B59DA6-C08A-4229-91CD-80496DC29389}.Release|x64.Build.0 = Release|Any CPU + {A3B59DA6-C08A-4229-91CD-80496DC29389}.Release|x86.ActiveCfg = Release|Any CPU + {A3B59DA6-C08A-4229-91CD-80496DC29389}.Release|x86.Build.0 = Release|Any CPU + {A3B59DA6-C08A-4229-91CD-80496DC29389}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {A3B59DA6-C08A-4229-91CD-80496DC29389}.Checked|arm.ActiveCfg = Debug|Any CPU + {A3B59DA6-C08A-4229-91CD-80496DC29389}.Checked|arm64.ActiveCfg = Debug|Any CPU + {A3B59DA6-C08A-4229-91CD-80496DC29389}.Checked|x64.ActiveCfg = Debug|Any CPU + {A3B59DA6-C08A-4229-91CD-80496DC29389}.Checked|x86.ActiveCfg = Debug|Any CPU {1C48B652-BA62-4D46-9CDD-24A1670EE3E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1C48B652-BA62-4D46-9CDD-24A1670EE3E3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1C48B652-BA62-4D46-9CDD-24A1670EE3E3}.Debug|arm.ActiveCfg = Debug|Any CPU + {1C48B652-BA62-4D46-9CDD-24A1670EE3E3}.Debug|arm64.ActiveCfg = Debug|Any CPU + {1C48B652-BA62-4D46-9CDD-24A1670EE3E3}.Debug|x64.ActiveCfg = Debug|Any CPU + {1C48B652-BA62-4D46-9CDD-24A1670EE3E3}.Debug|x64.Build.0 = Debug|Any CPU + {1C48B652-BA62-4D46-9CDD-24A1670EE3E3}.Debug|x86.ActiveCfg = Debug|Any CPU + {1C48B652-BA62-4D46-9CDD-24A1670EE3E3}.Debug|x86.Build.0 = Debug|Any CPU {1C48B652-BA62-4D46-9CDD-24A1670EE3E3}.Release|Any CPU.ActiveCfg = Release|Any CPU {1C48B652-BA62-4D46-9CDD-24A1670EE3E3}.Release|Any CPU.Build.0 = Release|Any CPU + {1C48B652-BA62-4D46-9CDD-24A1670EE3E3}.Release|arm.ActiveCfg = Release|Any CPU + {1C48B652-BA62-4D46-9CDD-24A1670EE3E3}.Release|arm64.ActiveCfg = Release|Any CPU + {1C48B652-BA62-4D46-9CDD-24A1670EE3E3}.Release|x64.ActiveCfg = Release|Any CPU + {1C48B652-BA62-4D46-9CDD-24A1670EE3E3}.Release|x64.Build.0 = Release|Any CPU + {1C48B652-BA62-4D46-9CDD-24A1670EE3E3}.Release|x86.ActiveCfg = Release|Any CPU + {1C48B652-BA62-4D46-9CDD-24A1670EE3E3}.Release|x86.Build.0 = Release|Any CPU + {1C48B652-BA62-4D46-9CDD-24A1670EE3E3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {1C48B652-BA62-4D46-9CDD-24A1670EE3E3}.Checked|arm.ActiveCfg = Debug|Any CPU + {1C48B652-BA62-4D46-9CDD-24A1670EE3E3}.Checked|arm64.ActiveCfg = Debug|Any CPU + {1C48B652-BA62-4D46-9CDD-24A1670EE3E3}.Checked|x64.ActiveCfg = Debug|Any CPU + {1C48B652-BA62-4D46-9CDD-24A1670EE3E3}.Checked|x86.ActiveCfg = Debug|Any CPU {7B2CA04A-9DFB-471E-B4CB-1937D0049B96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7B2CA04A-9DFB-471E-B4CB-1937D0049B96}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7B2CA04A-9DFB-471E-B4CB-1937D0049B96}.Debug|arm.ActiveCfg = Debug|Any CPU + {7B2CA04A-9DFB-471E-B4CB-1937D0049B96}.Debug|arm64.ActiveCfg = Debug|Any CPU + {7B2CA04A-9DFB-471E-B4CB-1937D0049B96}.Debug|x64.ActiveCfg = Debug|Any CPU + {7B2CA04A-9DFB-471E-B4CB-1937D0049B96}.Debug|x64.Build.0 = Debug|Any CPU + {7B2CA04A-9DFB-471E-B4CB-1937D0049B96}.Debug|x86.ActiveCfg = Debug|Any CPU + {7B2CA04A-9DFB-471E-B4CB-1937D0049B96}.Debug|x86.Build.0 = Debug|Any CPU {7B2CA04A-9DFB-471E-B4CB-1937D0049B96}.Release|Any CPU.ActiveCfg = Release|Any CPU {7B2CA04A-9DFB-471E-B4CB-1937D0049B96}.Release|Any CPU.Build.0 = Release|Any CPU + {7B2CA04A-9DFB-471E-B4CB-1937D0049B96}.Release|arm.ActiveCfg = Release|Any CPU + {7B2CA04A-9DFB-471E-B4CB-1937D0049B96}.Release|arm64.ActiveCfg = Release|Any CPU + {7B2CA04A-9DFB-471E-B4CB-1937D0049B96}.Release|x64.ActiveCfg = Release|Any CPU + {7B2CA04A-9DFB-471E-B4CB-1937D0049B96}.Release|x64.Build.0 = Release|Any CPU + {7B2CA04A-9DFB-471E-B4CB-1937D0049B96}.Release|x86.ActiveCfg = Release|Any CPU + {7B2CA04A-9DFB-471E-B4CB-1937D0049B96}.Release|x86.Build.0 = Release|Any CPU + {7B2CA04A-9DFB-471E-B4CB-1937D0049B96}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {7B2CA04A-9DFB-471E-B4CB-1937D0049B96}.Checked|arm.ActiveCfg = Debug|Any CPU + {7B2CA04A-9DFB-471E-B4CB-1937D0049B96}.Checked|arm64.ActiveCfg = Debug|Any CPU + {7B2CA04A-9DFB-471E-B4CB-1937D0049B96}.Checked|x64.ActiveCfg = Debug|Any CPU + {7B2CA04A-9DFB-471E-B4CB-1937D0049B96}.Checked|x86.ActiveCfg = Debug|Any CPU {CFF7519C-4D41-4713-991D-27777DA2DB21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CFF7519C-4D41-4713-991D-27777DA2DB21}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CFF7519C-4D41-4713-991D-27777DA2DB21}.Debug|arm.ActiveCfg = Debug|Any CPU + {CFF7519C-4D41-4713-991D-27777DA2DB21}.Debug|arm64.ActiveCfg = Debug|Any CPU + {CFF7519C-4D41-4713-991D-27777DA2DB21}.Debug|x64.ActiveCfg = Debug|Any CPU + {CFF7519C-4D41-4713-991D-27777DA2DB21}.Debug|x64.Build.0 = Debug|Any CPU + {CFF7519C-4D41-4713-991D-27777DA2DB21}.Debug|x86.ActiveCfg = Debug|Any CPU + {CFF7519C-4D41-4713-991D-27777DA2DB21}.Debug|x86.Build.0 = Debug|Any CPU {CFF7519C-4D41-4713-991D-27777DA2DB21}.Release|Any CPU.ActiveCfg = Release|Any CPU {CFF7519C-4D41-4713-991D-27777DA2DB21}.Release|Any CPU.Build.0 = Release|Any CPU + {CFF7519C-4D41-4713-991D-27777DA2DB21}.Release|arm.ActiveCfg = Release|Any CPU + {CFF7519C-4D41-4713-991D-27777DA2DB21}.Release|arm64.ActiveCfg = Release|Any CPU + {CFF7519C-4D41-4713-991D-27777DA2DB21}.Release|x64.ActiveCfg = Release|Any CPU + {CFF7519C-4D41-4713-991D-27777DA2DB21}.Release|x64.Build.0 = Release|Any CPU + {CFF7519C-4D41-4713-991D-27777DA2DB21}.Release|x86.ActiveCfg = Release|Any CPU + {CFF7519C-4D41-4713-991D-27777DA2DB21}.Release|x86.Build.0 = Release|Any CPU + {CFF7519C-4D41-4713-991D-27777DA2DB21}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {CFF7519C-4D41-4713-991D-27777DA2DB21}.Checked|arm.ActiveCfg = Debug|Any CPU + {CFF7519C-4D41-4713-991D-27777DA2DB21}.Checked|arm64.ActiveCfg = Debug|Any CPU + {CFF7519C-4D41-4713-991D-27777DA2DB21}.Checked|x64.ActiveCfg = Debug|Any CPU + {CFF7519C-4D41-4713-991D-27777DA2DB21}.Checked|x86.ActiveCfg = Debug|Any CPU {2BE20C4A-C20B-4A0C-8E4A-31B681B6967D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2BE20C4A-C20B-4A0C-8E4A-31B681B6967D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2BE20C4A-C20B-4A0C-8E4A-31B681B6967D}.Debug|arm.ActiveCfg = Debug|Any CPU + {2BE20C4A-C20B-4A0C-8E4A-31B681B6967D}.Debug|arm64.ActiveCfg = Debug|Any CPU + {2BE20C4A-C20B-4A0C-8E4A-31B681B6967D}.Debug|x64.ActiveCfg = Debug|Any CPU + {2BE20C4A-C20B-4A0C-8E4A-31B681B6967D}.Debug|x64.Build.0 = Debug|Any CPU + {2BE20C4A-C20B-4A0C-8E4A-31B681B6967D}.Debug|x86.ActiveCfg = Debug|Any CPU + {2BE20C4A-C20B-4A0C-8E4A-31B681B6967D}.Debug|x86.Build.0 = Debug|Any CPU {2BE20C4A-C20B-4A0C-8E4A-31B681B6967D}.Release|Any CPU.ActiveCfg = Release|Any CPU {2BE20C4A-C20B-4A0C-8E4A-31B681B6967D}.Release|Any CPU.Build.0 = Release|Any CPU + {2BE20C4A-C20B-4A0C-8E4A-31B681B6967D}.Release|arm.ActiveCfg = Release|Any CPU + {2BE20C4A-C20B-4A0C-8E4A-31B681B6967D}.Release|arm64.ActiveCfg = Release|Any CPU + {2BE20C4A-C20B-4A0C-8E4A-31B681B6967D}.Release|x64.ActiveCfg = Release|Any CPU + {2BE20C4A-C20B-4A0C-8E4A-31B681B6967D}.Release|x64.Build.0 = Release|Any CPU + {2BE20C4A-C20B-4A0C-8E4A-31B681B6967D}.Release|x86.ActiveCfg = Release|Any CPU + {2BE20C4A-C20B-4A0C-8E4A-31B681B6967D}.Release|x86.Build.0 = Release|Any CPU + {2BE20C4A-C20B-4A0C-8E4A-31B681B6967D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {2BE20C4A-C20B-4A0C-8E4A-31B681B6967D}.Checked|arm.ActiveCfg = Debug|Any CPU + {2BE20C4A-C20B-4A0C-8E4A-31B681B6967D}.Checked|arm64.ActiveCfg = Debug|Any CPU + {2BE20C4A-C20B-4A0C-8E4A-31B681B6967D}.Checked|x64.ActiveCfg = Debug|Any CPU + {2BE20C4A-C20B-4A0C-8E4A-31B681B6967D}.Checked|x86.ActiveCfg = Debug|Any CPU {3278A0F9-8E0A-42E1-8FE3-1A01851A6248}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3278A0F9-8E0A-42E1-8FE3-1A01851A6248}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3278A0F9-8E0A-42E1-8FE3-1A01851A6248}.Debug|arm.ActiveCfg = Debug|Any CPU + {3278A0F9-8E0A-42E1-8FE3-1A01851A6248}.Debug|arm64.ActiveCfg = Debug|Any CPU + {3278A0F9-8E0A-42E1-8FE3-1A01851A6248}.Debug|x64.ActiveCfg = Debug|Any CPU + {3278A0F9-8E0A-42E1-8FE3-1A01851A6248}.Debug|x64.Build.0 = Debug|Any CPU + {3278A0F9-8E0A-42E1-8FE3-1A01851A6248}.Debug|x86.ActiveCfg = Debug|Any CPU + {3278A0F9-8E0A-42E1-8FE3-1A01851A6248}.Debug|x86.Build.0 = Debug|Any CPU {3278A0F9-8E0A-42E1-8FE3-1A01851A6248}.Release|Any CPU.ActiveCfg = Release|Any CPU {3278A0F9-8E0A-42E1-8FE3-1A01851A6248}.Release|Any CPU.Build.0 = Release|Any CPU + {3278A0F9-8E0A-42E1-8FE3-1A01851A6248}.Release|arm.ActiveCfg = Release|Any CPU + {3278A0F9-8E0A-42E1-8FE3-1A01851A6248}.Release|arm64.ActiveCfg = Release|Any CPU + {3278A0F9-8E0A-42E1-8FE3-1A01851A6248}.Release|x64.ActiveCfg = Release|Any CPU + {3278A0F9-8E0A-42E1-8FE3-1A01851A6248}.Release|x64.Build.0 = Release|Any CPU + {3278A0F9-8E0A-42E1-8FE3-1A01851A6248}.Release|x86.ActiveCfg = Release|Any CPU + {3278A0F9-8E0A-42E1-8FE3-1A01851A6248}.Release|x86.Build.0 = Release|Any CPU + {3278A0F9-8E0A-42E1-8FE3-1A01851A6248}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {3278A0F9-8E0A-42E1-8FE3-1A01851A6248}.Checked|arm.ActiveCfg = Debug|Any CPU + {3278A0F9-8E0A-42E1-8FE3-1A01851A6248}.Checked|arm64.ActiveCfg = Debug|Any CPU + {3278A0F9-8E0A-42E1-8FE3-1A01851A6248}.Checked|x64.ActiveCfg = Debug|Any CPU + {3278A0F9-8E0A-42E1-8FE3-1A01851A6248}.Checked|x86.ActiveCfg = Debug|Any CPU {E34EBFC8-D1BC-4ED7-8335-C183A5994EE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E34EBFC8-D1BC-4ED7-8335-C183A5994EE1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E34EBFC8-D1BC-4ED7-8335-C183A5994EE1}.Debug|arm.ActiveCfg = Debug|Any CPU + {E34EBFC8-D1BC-4ED7-8335-C183A5994EE1}.Debug|arm64.ActiveCfg = Debug|Any CPU + {E34EBFC8-D1BC-4ED7-8335-C183A5994EE1}.Debug|x64.ActiveCfg = Debug|Any CPU + {E34EBFC8-D1BC-4ED7-8335-C183A5994EE1}.Debug|x64.Build.0 = Debug|Any CPU + {E34EBFC8-D1BC-4ED7-8335-C183A5994EE1}.Debug|x86.ActiveCfg = Debug|Any CPU + {E34EBFC8-D1BC-4ED7-8335-C183A5994EE1}.Debug|x86.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 + {E34EBFC8-D1BC-4ED7-8335-C183A5994EE1}.Release|arm.ActiveCfg = Release|Any CPU + {E34EBFC8-D1BC-4ED7-8335-C183A5994EE1}.Release|arm64.ActiveCfg = Release|Any CPU + {E34EBFC8-D1BC-4ED7-8335-C183A5994EE1}.Release|x64.ActiveCfg = Release|Any CPU + {E34EBFC8-D1BC-4ED7-8335-C183A5994EE1}.Release|x64.Build.0 = Release|Any CPU + {E34EBFC8-D1BC-4ED7-8335-C183A5994EE1}.Release|x86.ActiveCfg = Release|Any CPU + {E34EBFC8-D1BC-4ED7-8335-C183A5994EE1}.Release|x86.Build.0 = Release|Any CPU + {E34EBFC8-D1BC-4ED7-8335-C183A5994EE1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {E34EBFC8-D1BC-4ED7-8335-C183A5994EE1}.Checked|arm.ActiveCfg = Debug|Any CPU + {E34EBFC8-D1BC-4ED7-8335-C183A5994EE1}.Checked|arm64.ActiveCfg = Debug|Any CPU + {E34EBFC8-D1BC-4ED7-8335-C183A5994EE1}.Checked|x64.ActiveCfg = Debug|Any CPU + {E34EBFC8-D1BC-4ED7-8335-C183A5994EE1}.Checked|x86.ActiveCfg = Debug|Any CPU + {F9B974AE-C95E-4C9E-8F2F-0FAC091F7FF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F9B974AE-C95E-4C9E-8F2F-0FAC091F7FF7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F9B974AE-C95E-4C9E-8F2F-0FAC091F7FF7}.Debug|arm.ActiveCfg = Debug|Any CPU + {F9B974AE-C95E-4C9E-8F2F-0FAC091F7FF7}.Debug|arm64.ActiveCfg = Debug|Any CPU + {F9B974AE-C95E-4C9E-8F2F-0FAC091F7FF7}.Debug|x64.ActiveCfg = Debug|Any CPU + {F9B974AE-C95E-4C9E-8F2F-0FAC091F7FF7}.Debug|x64.Build.0 = Debug|Any CPU + {F9B974AE-C95E-4C9E-8F2F-0FAC091F7FF7}.Debug|x86.ActiveCfg = Debug|Any CPU + {F9B974AE-C95E-4C9E-8F2F-0FAC091F7FF7}.Debug|x86.Build.0 = Debug|Any CPU + {F9B974AE-C95E-4C9E-8F2F-0FAC091F7FF7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F9B974AE-C95E-4C9E-8F2F-0FAC091F7FF7}.Release|Any CPU.Build.0 = Release|Any CPU + {F9B974AE-C95E-4C9E-8F2F-0FAC091F7FF7}.Release|arm.ActiveCfg = Release|Any CPU + {F9B974AE-C95E-4C9E-8F2F-0FAC091F7FF7}.Release|arm64.ActiveCfg = Release|Any CPU + {F9B974AE-C95E-4C9E-8F2F-0FAC091F7FF7}.Release|x64.ActiveCfg = Release|Any CPU + {F9B974AE-C95E-4C9E-8F2F-0FAC091F7FF7}.Release|x64.Build.0 = Release|Any CPU + {F9B974AE-C95E-4C9E-8F2F-0FAC091F7FF7}.Release|x86.ActiveCfg = Release|Any CPU + {F9B974AE-C95E-4C9E-8F2F-0FAC091F7FF7}.Release|x86.Build.0 = Release|Any CPU + {F9B974AE-C95E-4C9E-8F2F-0FAC091F7FF7}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {F9B974AE-C95E-4C9E-8F2F-0FAC091F7FF7}.Checked|arm.ActiveCfg = Debug|Any CPU + {F9B974AE-C95E-4C9E-8F2F-0FAC091F7FF7}.Checked|arm64.ActiveCfg = Debug|Any CPU + {F9B974AE-C95E-4C9E-8F2F-0FAC091F7FF7}.Checked|x64.ActiveCfg = Debug|Any CPU + {F9B974AE-C95E-4C9E-8F2F-0FAC091F7FF7}.Checked|x86.ActiveCfg = Debug|Any CPU + {BFD32990-050A-4A17-800B-3AFD0A094EB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BFD32990-050A-4A17-800B-3AFD0A094EB8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BFD32990-050A-4A17-800B-3AFD0A094EB8}.Debug|arm.ActiveCfg = Debug|Any CPU + {BFD32990-050A-4A17-800B-3AFD0A094EB8}.Debug|arm64.ActiveCfg = Debug|Any CPU + {BFD32990-050A-4A17-800B-3AFD0A094EB8}.Debug|x64.ActiveCfg = Debug|Any CPU + {BFD32990-050A-4A17-800B-3AFD0A094EB8}.Debug|x64.Build.0 = Debug|Any CPU + {BFD32990-050A-4A17-800B-3AFD0A094EB8}.Debug|x86.ActiveCfg = Debug|Any CPU + {BFD32990-050A-4A17-800B-3AFD0A094EB8}.Debug|x86.Build.0 = Debug|Any CPU + {BFD32990-050A-4A17-800B-3AFD0A094EB8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BFD32990-050A-4A17-800B-3AFD0A094EB8}.Release|Any CPU.Build.0 = Release|Any CPU + {BFD32990-050A-4A17-800B-3AFD0A094EB8}.Release|arm.ActiveCfg = Release|Any CPU + {BFD32990-050A-4A17-800B-3AFD0A094EB8}.Release|arm64.ActiveCfg = Release|Any CPU + {BFD32990-050A-4A17-800B-3AFD0A094EB8}.Release|x64.ActiveCfg = Release|Any CPU + {BFD32990-050A-4A17-800B-3AFD0A094EB8}.Release|x64.Build.0 = Release|Any CPU + {BFD32990-050A-4A17-800B-3AFD0A094EB8}.Release|x86.ActiveCfg = Release|Any CPU + {BFD32990-050A-4A17-800B-3AFD0A094EB8}.Release|x86.Build.0 = Release|Any CPU + {BFD32990-050A-4A17-800B-3AFD0A094EB8}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {BFD32990-050A-4A17-800B-3AFD0A094EB8}.Checked|arm.ActiveCfg = Debug|Any CPU + {BFD32990-050A-4A17-800B-3AFD0A094EB8}.Checked|arm64.ActiveCfg = Debug|Any CPU + {BFD32990-050A-4A17-800B-3AFD0A094EB8}.Checked|x64.ActiveCfg = Debug|Any CPU + {BFD32990-050A-4A17-800B-3AFD0A094EB8}.Checked|x86.ActiveCfg = Debug|Any CPU + {2745CED4-B2D1-4C08-956B-65B2391151BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2745CED4-B2D1-4C08-956B-65B2391151BA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2745CED4-B2D1-4C08-956B-65B2391151BA}.Debug|arm.ActiveCfg = Debug|Any CPU + {2745CED4-B2D1-4C08-956B-65B2391151BA}.Debug|arm64.ActiveCfg = Debug|Any CPU + {2745CED4-B2D1-4C08-956B-65B2391151BA}.Debug|x64.ActiveCfg = Debug|Any CPU + {2745CED4-B2D1-4C08-956B-65B2391151BA}.Debug|x64.Build.0 = Debug|Any CPU + {2745CED4-B2D1-4C08-956B-65B2391151BA}.Debug|x86.ActiveCfg = Debug|Any CPU + {2745CED4-B2D1-4C08-956B-65B2391151BA}.Debug|x86.Build.0 = Debug|Any CPU + {2745CED4-B2D1-4C08-956B-65B2391151BA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2745CED4-B2D1-4C08-956B-65B2391151BA}.Release|Any CPU.Build.0 = Release|Any CPU + {2745CED4-B2D1-4C08-956B-65B2391151BA}.Release|arm.ActiveCfg = Release|Any CPU + {2745CED4-B2D1-4C08-956B-65B2391151BA}.Release|arm64.ActiveCfg = Release|Any CPU + {2745CED4-B2D1-4C08-956B-65B2391151BA}.Release|x64.ActiveCfg = Release|Any CPU + {2745CED4-B2D1-4C08-956B-65B2391151BA}.Release|x64.Build.0 = Release|Any CPU + {2745CED4-B2D1-4C08-956B-65B2391151BA}.Release|x86.ActiveCfg = Release|Any CPU + {2745CED4-B2D1-4C08-956B-65B2391151BA}.Release|x86.Build.0 = Release|Any CPU + {2745CED4-B2D1-4C08-956B-65B2391151BA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {2745CED4-B2D1-4C08-956B-65B2391151BA}.Checked|arm.ActiveCfg = Debug|Any CPU + {2745CED4-B2D1-4C08-956B-65B2391151BA}.Checked|arm64.ActiveCfg = Debug|Any CPU + {2745CED4-B2D1-4C08-956B-65B2391151BA}.Checked|x64.ActiveCfg = Debug|Any CPU + {2745CED4-B2D1-4C08-956B-65B2391151BA}.Checked|x86.ActiveCfg = Debug|Any CPU + {77F11166-9206-4963-B252-6509E34CC33A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {77F11166-9206-4963-B252-6509E34CC33A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {77F11166-9206-4963-B252-6509E34CC33A}.Debug|arm.ActiveCfg = Debug|Any CPU + {77F11166-9206-4963-B252-6509E34CC33A}.Debug|arm64.ActiveCfg = Debug|Any CPU + {77F11166-9206-4963-B252-6509E34CC33A}.Debug|x64.ActiveCfg = Debug|Any CPU + {77F11166-9206-4963-B252-6509E34CC33A}.Debug|x64.Build.0 = Debug|Any CPU + {77F11166-9206-4963-B252-6509E34CC33A}.Debug|x86.ActiveCfg = Debug|Any CPU + {77F11166-9206-4963-B252-6509E34CC33A}.Debug|x86.Build.0 = Debug|Any CPU + {77F11166-9206-4963-B252-6509E34CC33A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {77F11166-9206-4963-B252-6509E34CC33A}.Release|Any CPU.Build.0 = Release|Any CPU + {77F11166-9206-4963-B252-6509E34CC33A}.Release|arm.ActiveCfg = Release|Any CPU + {77F11166-9206-4963-B252-6509E34CC33A}.Release|arm64.ActiveCfg = Release|Any CPU + {77F11166-9206-4963-B252-6509E34CC33A}.Release|x64.ActiveCfg = Release|Any CPU + {77F11166-9206-4963-B252-6509E34CC33A}.Release|x64.Build.0 = Release|Any CPU + {77F11166-9206-4963-B252-6509E34CC33A}.Release|x86.ActiveCfg = Release|Any CPU + {77F11166-9206-4963-B252-6509E34CC33A}.Release|x86.Build.0 = Release|Any CPU + {77F11166-9206-4963-B252-6509E34CC33A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {77F11166-9206-4963-B252-6509E34CC33A}.Checked|arm.ActiveCfg = Debug|Any CPU + {77F11166-9206-4963-B252-6509E34CC33A}.Checked|arm64.ActiveCfg = Debug|Any CPU + {77F11166-9206-4963-B252-6509E34CC33A}.Checked|x64.ActiveCfg = Debug|Any CPU + {77F11166-9206-4963-B252-6509E34CC33A}.Checked|x86.ActiveCfg = Debug|Any CPU + {4D98A009-1732-446B-A276-F299ABCA1936}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4D98A009-1732-446B-A276-F299ABCA1936}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4D98A009-1732-446B-A276-F299ABCA1936}.Debug|arm.ActiveCfg = Debug|Any CPU + {4D98A009-1732-446B-A276-F299ABCA1936}.Debug|arm64.ActiveCfg = Debug|Any CPU + {4D98A009-1732-446B-A276-F299ABCA1936}.Debug|x64.ActiveCfg = Debug|Any CPU + {4D98A009-1732-446B-A276-F299ABCA1936}.Debug|x64.Build.0 = Debug|Any CPU + {4D98A009-1732-446B-A276-F299ABCA1936}.Debug|x86.ActiveCfg = Debug|Any CPU + {4D98A009-1732-446B-A276-F299ABCA1936}.Debug|x86.Build.0 = Debug|Any CPU + {4D98A009-1732-446B-A276-F299ABCA1936}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4D98A009-1732-446B-A276-F299ABCA1936}.Release|Any CPU.Build.0 = Release|Any CPU + {4D98A009-1732-446B-A276-F299ABCA1936}.Release|arm.ActiveCfg = Release|Any CPU + {4D98A009-1732-446B-A276-F299ABCA1936}.Release|arm64.ActiveCfg = Release|Any CPU + {4D98A009-1732-446B-A276-F299ABCA1936}.Release|x64.ActiveCfg = Release|Any CPU + {4D98A009-1732-446B-A276-F299ABCA1936}.Release|x64.Build.0 = Release|Any CPU + {4D98A009-1732-446B-A276-F299ABCA1936}.Release|x86.ActiveCfg = Release|Any CPU + {4D98A009-1732-446B-A276-F299ABCA1936}.Release|x86.Build.0 = Release|Any CPU + {4D98A009-1732-446B-A276-F299ABCA1936}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {4D98A009-1732-446B-A276-F299ABCA1936}.Checked|arm.ActiveCfg = Debug|Any CPU + {4D98A009-1732-446B-A276-F299ABCA1936}.Checked|arm64.ActiveCfg = Debug|Any CPU + {4D98A009-1732-446B-A276-F299ABCA1936}.Checked|x64.ActiveCfg = Debug|Any CPU + {4D98A009-1732-446B-A276-F299ABCA1936}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution + {2BA69856-B7AB-4113-ABC9-93E3613DF70E} = {7F9B8DF1-8408-48E2-8362-BA5E483A0201} {15012FB4-9C7C-4DE0-AB44-83A64654D738} = {3393D976-CAF0-47D0-850E-7A44DF892122} {9476F50F-E44C-4420-96AB-448259A47C4F} = {3393D976-CAF0-47D0-850E-7A44DF892122} - {6F662E39-BB56-4BCF-B053-B4A1782A33E1} = {751DA007-D916-4F22-AF16-85F343C2992C} - {C70C30E4-56DC-44FA-B621-9BB4C4E365D0} = {751DA007-D916-4F22-AF16-85F343C2992C} - {1C48B652-BA62-4D46-9CDD-24A1670EE3E3} = {751DA007-D916-4F22-AF16-85F343C2992C} - {CFF7519C-4D41-4713-991D-27777DA2DB21} = {751DA007-D916-4F22-AF16-85F343C2992C} - {3278A0F9-8E0A-42E1-8FE3-1A01851A6248} = {751DA007-D916-4F22-AF16-85F343C2992C} + {7228C70B-37CB-4200-A6D4-88724E3EBC76} = {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} + {8D66707F-68BE-47FD-8A83-34A949B6F000} = {A3B7282E-7D62-48ED-B5FC-E6AB32DA6F0A} + {A3B59DA6-C08A-4229-91CD-80496DC29389} = {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} - {D68C6A1A-34DD-49C2-9419-A3297B4C5F07} = {BFBE3E0E-4E75-4665-A373-132D283D366D} + {6F662E39-BB56-4BCF-B053-B4A1782A33E1} = {751DA007-D916-4F22-AF16-85F343C2992C} + {C70C30E4-56DC-44FA-B621-9BB4C4E365D0} = {751DA007-D916-4F22-AF16-85F343C2992C} + {412BDE9C-0383-4B72-8638-21F6427AA70D} = {751DA007-D916-4F22-AF16-85F343C2992C} + {6659DC55-CF12-45B1-B5CD-1F4F7330BE40} = {751DA007-D916-4F22-AF16-85F343C2992C} + {1C48B652-BA62-4D46-9CDD-24A1670EE3E3} = {751DA007-D916-4F22-AF16-85F343C2992C} + {CFF7519C-4D41-4713-991D-27777DA2DB21} = {751DA007-D916-4F22-AF16-85F343C2992C} + {3278A0F9-8E0A-42E1-8FE3-1A01851A6248} = {751DA007-D916-4F22-AF16-85F343C2992C} + {AFE5CE59-CCFC-472D-AE84-143F282335A6} = {BFBE3E0E-4E75-4665-A373-132D283D366D} {355B775A-BFE1-4384-BC83-C6B5D1FB77BB} = {BFBE3E0E-4E75-4665-A373-132D283D366D} {66EC63BC-99DC-40CA-B53B-B4D8BF6D1630} = {BFBE3E0E-4E75-4665-A373-132D283D366D} + {F9B974AE-C95E-4C9E-8F2F-0FAC091F7FF7} = {D6587945-D604-4FCB-B87A-230F32CD9E12} + {BFD32990-050A-4A17-800B-3AFD0A094EB8} = {D6587945-D604-4FCB-B87A-230F32CD9E12} + {D6587945-D604-4FCB-B87A-230F32CD9E12} = {8F79E1CC-27F6-4DC1-BE12-DC8C46B72401} + {2745CED4-B2D1-4C08-956B-65B2391151BA} = {6C996BA8-AAE3-4C22-8F34-D585B6C4036D} + {77F11166-9206-4963-B252-6509E34CC33A} = {6C996BA8-AAE3-4C22-8F34-D585B6C4036D} + {6C996BA8-AAE3-4C22-8F34-D585B6C4036D} = {8F79E1CC-27F6-4DC1-BE12-DC8C46B72401} + {4D98A009-1732-446B-A276-F299ABCA1936} = {EBF0C531-714D-47A5-8901-A8B22A29BB2A} + {EBF0C531-714D-47A5-8901-A8B22A29BB2A} = {8F79E1CC-27F6-4DC1-BE12-DC8C46B72401} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {942CAD8E-C19B-4B9A-BEDE-09B43F45F535} diff --git a/src/libraries/System.Configuration.ConfigurationManager/ref/System.Configuration.ConfigurationManager.csproj b/src/libraries/System.Configuration.ConfigurationManager/ref/System.Configuration.ConfigurationManager.csproj index 3c894f8cfd4182..e3caa4ab05d28c 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/ref/System.Configuration.ConfigurationManager.csproj +++ b/src/libraries/System.Configuration.ConfigurationManager/ref/System.Configuration.ConfigurationManager.csproj @@ -1,4 +1,5 @@ + $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) $(NoWarn);CS0618 @@ -11,8 +12,9 @@ + - + @@ -24,4 +26,5 @@ + diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/CompatibilitySuppressions.xml b/src/libraries/System.Configuration.ConfigurationManager/src/CompatibilitySuppressions.xml index cd36ac7c23bc82..93bae97a18d70e 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Configuration.ConfigurationManager/src/CompatibilitySuppressions.xml @@ -1,6 +1,13 @@  + + CP0001 + T:System.Diagnostics.TraceConfiguration + lib/net7.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + CP0002 M:System.Configuration.Internal.DelegatingConfigHost.get_HasLocalConfig @@ -37,13 +44,208 @@ lib/netstandard2.0/System.Configuration.ConfigurationManager.dll lib/net462/System.Configuration.ConfigurationManager.dll + + CP0014 + F:System.Configuration.SettingsSerializeAs.Binary:[T:System.ObsoleteAttribute] + lib/net6.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + + + CP0014 + M:System.Configuration.ConfigurationException.#ctor:[T:System.ObsoleteAttribute] + lib/net6.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + + + CP0014 + M:System.Configuration.ConfigurationException.#ctor(System.String,System.Exception,System.String,System.Int32):[T:System.ObsoleteAttribute] + lib/net6.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + + + CP0014 + M:System.Configuration.ConfigurationException.#ctor(System.String,System.Exception,System.Xml.XmlNode):[T:System.ObsoleteAttribute] + lib/net6.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + + + CP0014 + M:System.Configuration.ConfigurationException.#ctor(System.String,System.Exception):[T:System.ObsoleteAttribute] + lib/net6.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + + + CP0014 + M:System.Configuration.ConfigurationException.#ctor(System.String,System.String,System.Int32):[T:System.ObsoleteAttribute] + lib/net6.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + + + CP0014 + M:System.Configuration.ConfigurationException.#ctor(System.String,System.Xml.XmlNode):[T:System.ObsoleteAttribute] + lib/net6.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + + + CP0014 + M:System.Configuration.ConfigurationException.#ctor(System.String):[T:System.ObsoleteAttribute] + lib/net6.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + + + CP0014 + M:System.Configuration.ConfigurationException.GetXmlNodeFilename(System.Xml.XmlNode):[T:System.ObsoleteAttribute] + lib/net6.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + + + CP0014 + M:System.Configuration.ConfigurationException.GetXmlNodeLineNumber(System.Xml.XmlNode):[T:System.ObsoleteAttribute] + lib/net6.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + + + CP0014 + M:System.Configuration.ConfigurationSettings.GetConfig(System.String):[T:System.ObsoleteAttribute] + lib/net6.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + + + CP0014 + M:System.Configuration.Internal.DelegatingConfigHost.GetRestrictedPermissions(System.Configuration.Internal.IInternalConfigRecord,System.Security.PermissionSet@,System.Boolean@):[T:System.ObsoleteAttribute] + lib/net6.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + + + CP0014 + M:System.Configuration.Internal.IInternalConfigHost.GetRestrictedPermissions(System.Configuration.Internal.IInternalConfigRecord,System.Security.PermissionSet@,System.Boolean@):[T:System.ObsoleteAttribute] + lib/net6.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + + + CP0014 + P:System.Configuration.ConfigurationSettings.AppSettings:[T:System.ObsoleteAttribute] + lib/net6.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + + + CP0014 + F:System.Configuration.SettingsSerializeAs.Binary:[T:System.ObsoleteAttribute] + lib/net7.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + + + CP0014 + M:System.Configuration.ConfigurationException.#ctor:[T:System.ObsoleteAttribute] + lib/net7.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + + + CP0014 + M:System.Configuration.ConfigurationException.#ctor(System.String,System.Exception,System.String,System.Int32):[T:System.ObsoleteAttribute] + lib/net7.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + + + CP0014 + M:System.Configuration.ConfigurationException.#ctor(System.String,System.Exception,System.Xml.XmlNode):[T:System.ObsoleteAttribute] + lib/net7.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + + + CP0014 + M:System.Configuration.ConfigurationException.#ctor(System.String,System.Exception):[T:System.ObsoleteAttribute] + lib/net7.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + + + CP0014 + M:System.Configuration.ConfigurationException.#ctor(System.String,System.String,System.Int32):[T:System.ObsoleteAttribute] + lib/net7.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + + + CP0014 + M:System.Configuration.ConfigurationException.#ctor(System.String,System.Xml.XmlNode):[T:System.ObsoleteAttribute] + lib/net7.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + + + CP0014 + M:System.Configuration.ConfigurationException.#ctor(System.String):[T:System.ObsoleteAttribute] + lib/net7.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + + + CP0014 + M:System.Configuration.ConfigurationException.GetXmlNodeFilename(System.Xml.XmlNode):[T:System.ObsoleteAttribute] + lib/net7.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + + + CP0014 + M:System.Configuration.ConfigurationException.GetXmlNodeLineNumber(System.Xml.XmlNode):[T:System.ObsoleteAttribute] + lib/net7.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + + + CP0014 + M:System.Configuration.ConfigurationSettings.GetConfig(System.String):[T:System.ObsoleteAttribute] + lib/net7.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + + + CP0014 + M:System.Configuration.Internal.DelegatingConfigHost.GetRestrictedPermissions(System.Configuration.Internal.IInternalConfigRecord,System.Security.PermissionSet@,System.Boolean@):[T:System.ObsoleteAttribute] + lib/net7.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + + + CP0014 + M:System.Configuration.Internal.IInternalConfigHost.GetRestrictedPermissions(System.Configuration.Internal.IInternalConfigRecord,System.Security.PermissionSet@,System.Boolean@):[T:System.ObsoleteAttribute] + lib/net7.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + + + CP0014 + P:System.Configuration.ConfigurationSettings.AppSettings:[T:System.ObsoleteAttribute] + lib/net7.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + CP0014 F:System.Configuration.SettingsSerializeAs.Binary:[T:System.ObsoleteAttribute] lib/netstandard2.0/System.Configuration.ConfigurationManager.dll lib/net462/System.Configuration.ConfigurationManager.dll - CP0014 F:System.Configuration.SettingsSerializeAs.Binary:[T:System.ObsoleteAttribute] @@ -194,4 +396,32 @@ lib/netstandard2.0/System.Configuration.ConfigurationManager.dll lib/net462/System.Configuration.ConfigurationManager.dll - + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + + + CP1002 + System.Xml.ReaderWriter, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + + + CP1002 + System.Xml.ReaderWriter, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.Configuration.ConfigurationManager.dll + lib/netstandard2.0/System.Configuration.ConfigurationManager.dll + true + + \ No newline at end of file diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/PACKAGE.md b/src/libraries/System.Configuration.ConfigurationManager/src/PACKAGE.md index 8448be2423b11b..992b7669426993 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/PACKAGE.md +++ b/src/libraries/System.Configuration.ConfigurationManager/src/PACKAGE.md @@ -1,15 +1,12 @@ ## About -Provides types that support using XML configuration files (`app.config`). This package exists only to support migrating existing .NET Framework code that already uses System.Configuration. When writing new code, use another configuration system instead, such as [Microsoft.Extensions.Configuration](https://www.nuget.org/packages/Microsoft.Extensions.Configuration/). + -For more information, see the documentation: +Provides types that support using XML configuration files (`app.config`). This package exists only to support migrating existing .NET Framework code that already uses System.Configuration. When writing new code, use another configuration system instead, such as [Microsoft.Extensions.Configuration](https://www.nuget.org/packages/Microsoft.Extensions.Configuration/). -- [Configure apps by using configuration files](https://docs.microsoft.com/dotnet/framework/configure-apps/) -- [System.Configuration namespace](https://docs.microsoft.com/dotnet/api/system.configuration) -- [System.Configuration.Configuration](https://docs.microsoft.com/dotnet/api/system.configuration.configuration) -- [System.Configuration.ConfigurationManager](https://docs.microsoft.com/dotnet/api/system.configuration.configurationmanager) +## How to Use -## Example + The following example shows how to read and modify the application configuration settings. @@ -63,3 +60,27 @@ To run this example, include an `app.config` file with the following content in ``` + +## Main Types + + + +The main types provided by this library are: + +* `System.Configuration.Configuration` +* `System.Configuration.ConfigurationManager` + +## Additional Documentation + + + +* [Configure apps by using configuration files](https://docs.microsoft.com/dotnet/framework/configure-apps/) +* [System.Configuration namespace](https://docs.microsoft.com/dotnet/api/system.configuration) +* [System.Configuration.Configuration](https://docs.microsoft.com/dotnet/api/system.configuration.configuration) +* [System.Configuration.ConfigurationManager](https://docs.microsoft.com/dotnet/api/system.configuration.configurationmanager) + +## Feedback & Contributing + + + +System.Configuration.ConfigurationManager is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). \ No newline at end of file diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System.Configuration.ConfigurationManager.csproj b/src/libraries/System.Configuration.ConfigurationManager/src/System.Configuration.ConfigurationManager.csproj index fbed89bbb19943..f9dce6ce2ec13c 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System.Configuration.ConfigurationManager.csproj +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System.Configuration.ConfigurationManager.csproj @@ -1,4 +1,5 @@ + $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) $(NoWarn);CA2249 @@ -263,7 +264,7 @@ - + @@ -276,15 +277,15 @@ + + + + - - - - @@ -292,4 +293,5 @@ + diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/BaseConfigurationRecord.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/BaseConfigurationRecord.cs index c0495b2aee27fc..f72769050e5134 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/BaseConfigurationRecord.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/BaseConfigurationRecord.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.Buffers; using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; @@ -18,6 +19,12 @@ namespace System.Configuration [DebuggerDisplay("ConfigPath = {ConfigPath}")] internal abstract class BaseConfigurationRecord : IInternalConfigRecord { +#if NET8_0_OR_GREATER + private static readonly SearchValues s_invalidSubPathChars = SearchValues.Create(InvalidSubPathCharactersString); +#else + private static ReadOnlySpan s_invalidSubPathChars => InvalidSubPathCharactersString.AsSpan(); +#endif + protected const string NewLine = "\r\n"; internal const string KeywordTrue = "true"; @@ -128,7 +135,6 @@ internal abstract class BaseConfigurationRecord : IInternalConfigRecord // Comparer used in sorting IndirectInputs. private static readonly IComparer s_indirectInputsComparer = new IndirectLocationInputComparer(); - private static readonly char[] s_invalidSubPathCharactersArray = InvalidSubPathCharactersString.ToCharArray(); protected Hashtable _children; // configName -> record private object _configContext; // Context for config level @@ -3090,7 +3096,7 @@ internal static string NormalizeLocationSubPath(string subPath, IConfigErrorInfo throw new ConfigurationErrorsException(SR.Config_location_path_invalid_last_character, errorInfo); // combination of URI reserved characters and OS invalid filename characters, minus / (allowed reserved character) - if (subPath.IndexOfAny(s_invalidSubPathCharactersArray) != -1) + if (subPath.AsSpan().IndexOfAny(s_invalidSubPathChars) >= 0) throw new ConfigurationErrorsException(SR.Config_location_path_invalid_character, errorInfo); return subPath; diff --git a/src/libraries/System.Console/System.Console.sln b/src/libraries/System.Console/System.Console.sln index c2d9a097170535..4c0eec5b18d85d 100644 --- a/src/libraries/System.Console/System.Console.sln +++ b/src/libraries/System.Console/System.Console.sln @@ -19,6 +19,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{4DF18F16-0F36-431E-BD64-5F1F0BACA0A6}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{D55C47E2-C4C7-42C8-962D-44CCDC8FDC7B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{BB85AFCB-2A1F-4FDF-81BB-A704523D27FB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{BF601922-9727-4098-BAE8-C0AC1A4163A6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{C3AD4483-61B9-483E-9274-D35E61CF75E2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{07B7BFDE-1EAD-4F43-A61F-A478177359DD}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{DF6461C4-C26B-4911-BA9F-E9EBE09BE018}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{87011BFC-F4A7-4BEB-A794-ED75999604BF}" @@ -27,6 +37,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{5F676CAA-AE1 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{6A697E68-D9B1-47F4-8AC0-B528E9AA3727}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{0EC43FF3-51A9-45DD-8686-744CE1B3FF92}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{F9B59FA0-0C40-4210-8A30-CD99690A2302}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{8C668F04-9180-45A6-B78C-04A6442A083A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{63EC323A-8A6B-4DC8-B6F4-11165A5576C1}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -73,6 +91,26 @@ Global {4DF18F16-0F36-431E-BD64-5F1F0BACA0A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {4DF18F16-0F36-431E-BD64-5F1F0BACA0A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {4DF18F16-0F36-431E-BD64-5F1F0BACA0A6}.Release|Any CPU.Build.0 = Release|Any CPU + {D55C47E2-C4C7-42C8-962D-44CCDC8FDC7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D55C47E2-C4C7-42C8-962D-44CCDC8FDC7B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D55C47E2-C4C7-42C8-962D-44CCDC8FDC7B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D55C47E2-C4C7-42C8-962D-44CCDC8FDC7B}.Release|Any CPU.Build.0 = Release|Any CPU + {BB85AFCB-2A1F-4FDF-81BB-A704523D27FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BB85AFCB-2A1F-4FDF-81BB-A704523D27FB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BB85AFCB-2A1F-4FDF-81BB-A704523D27FB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BB85AFCB-2A1F-4FDF-81BB-A704523D27FB}.Release|Any CPU.Build.0 = Release|Any CPU + {BF601922-9727-4098-BAE8-C0AC1A4163A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BF601922-9727-4098-BAE8-C0AC1A4163A6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BF601922-9727-4098-BAE8-C0AC1A4163A6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BF601922-9727-4098-BAE8-C0AC1A4163A6}.Release|Any CPU.Build.0 = Release|Any CPU + {C3AD4483-61B9-483E-9274-D35E61CF75E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C3AD4483-61B9-483E-9274-D35E61CF75E2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C3AD4483-61B9-483E-9274-D35E61CF75E2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C3AD4483-61B9-483E-9274-D35E61CF75E2}.Release|Any CPU.Build.0 = Release|Any CPU + {07B7BFDE-1EAD-4F43-A61F-A478177359DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {07B7BFDE-1EAD-4F43-A61F-A478177359DD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {07B7BFDE-1EAD-4F43-A61F-A478177359DD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {07B7BFDE-1EAD-4F43-A61F-A478177359DD}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -88,6 +126,14 @@ Global {EEBFF320-0756-4467-ACAC-F946AA7D7902} = {6A697E68-D9B1-47F4-8AC0-B528E9AA3727} {2B4D1069-DAB2-4A22-96A5-A12DF9B8CA22} = {6A697E68-D9B1-47F4-8AC0-B528E9AA3727} {128A0AF8-9794-49E3-8A07-E518EB9F1402} = {6A697E68-D9B1-47F4-8AC0-B528E9AA3727} + {D55C47E2-C4C7-42C8-962D-44CCDC8FDC7B} = {0EC43FF3-51A9-45DD-8686-744CE1B3FF92} + {BB85AFCB-2A1F-4FDF-81BB-A704523D27FB} = {0EC43FF3-51A9-45DD-8686-744CE1B3FF92} + {0EC43FF3-51A9-45DD-8686-744CE1B3FF92} = {63EC323A-8A6B-4DC8-B6F4-11165A5576C1} + {BF601922-9727-4098-BAE8-C0AC1A4163A6} = {F9B59FA0-0C40-4210-8A30-CD99690A2302} + {C3AD4483-61B9-483E-9274-D35E61CF75E2} = {F9B59FA0-0C40-4210-8A30-CD99690A2302} + {F9B59FA0-0C40-4210-8A30-CD99690A2302} = {63EC323A-8A6B-4DC8-B6F4-11165A5576C1} + {07B7BFDE-1EAD-4F43-A61F-A478177359DD} = {8C668F04-9180-45A6-B78C-04A6442A083A} + {8C668F04-9180-45A6-B78C-04A6442A083A} = {63EC323A-8A6B-4DC8-B6F4-11165A5576C1} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {3E14E904-00F2-414A-BCF1-0EB09A861A21} diff --git a/src/libraries/System.Data.Common/System.Data.Common.sln b/src/libraries/System.Data.Common/System.Data.Common.sln index 604189e78aa72a..15583c0cd01576 100644 --- a/src/libraries/System.Data.Common/System.Data.Common.sln +++ b/src/libraries/System.Data.Common/System.Data.Common.sln @@ -57,14 +57,34 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Transactions.Local", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Xml.ReaderWriter", "..\System.Xml.ReaderWriter\ref\System.Xml.ReaderWriter.csproj", "{521CFFC1-DB45-4FB2-87EF-6BF4F413A011}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{5924BF80-8349-4021-A4A3-853FE714A7C7}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{CE9436E4-9912-47BA-91D9-D9D371BFEC49}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{83534577-0A40-47CE-872F-E5BC74E10E5B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{893B0928-A209-4F32-A6FC-E7E0AA45BE5A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{A02494B4-8EE6-430D-A99F-7E3DA58C479D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{AEC3AFB1-5825-4C79-89AE-679F510329B8}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{83E4FB59-E8AB-41DD-9770-7ACC71364E6A}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{B1861E5E-4FCA-4CA5-9BB5-5A3C3DBC7F7D}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{79588763-C99B-4C1B-88D3-181A92A98364}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{5924BF80-8349-4021-A4A3-853FE714A7C7}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{D92FD5A3-15A6-4EFA-ADC9-4DDEE8D31782}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{837B27D3-08EF-4E05-AFBF-7E84AEEC1C03}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{E99648EB-D082-44AD-B201-90120D491734}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{2A8F43F6-3C6E-4D25-A26B-4483055B94EF}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{5B554CA1-F92F-43B1-9652-712634FD8F07}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -702,18 +722,117 @@ Global {521CFFC1-DB45-4FB2-87EF-6BF4F413A011}.Checked|arm64.ActiveCfg = Debug|Any CPU {521CFFC1-DB45-4FB2-87EF-6BF4F413A011}.Checked|x64.ActiveCfg = Debug|Any CPU {521CFFC1-DB45-4FB2-87EF-6BF4F413A011}.Checked|x86.ActiveCfg = Debug|Any CPU + {CE9436E4-9912-47BA-91D9-D9D371BFEC49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CE9436E4-9912-47BA-91D9-D9D371BFEC49}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CE9436E4-9912-47BA-91D9-D9D371BFEC49}.Debug|arm.ActiveCfg = Debug|Any CPU + {CE9436E4-9912-47BA-91D9-D9D371BFEC49}.Debug|arm64.ActiveCfg = Debug|Any CPU + {CE9436E4-9912-47BA-91D9-D9D371BFEC49}.Debug|x64.ActiveCfg = Debug|Any CPU + {CE9436E4-9912-47BA-91D9-D9D371BFEC49}.Debug|x64.Build.0 = Debug|Any CPU + {CE9436E4-9912-47BA-91D9-D9D371BFEC49}.Debug|x86.ActiveCfg = Debug|Any CPU + {CE9436E4-9912-47BA-91D9-D9D371BFEC49}.Debug|x86.Build.0 = Debug|Any CPU + {CE9436E4-9912-47BA-91D9-D9D371BFEC49}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CE9436E4-9912-47BA-91D9-D9D371BFEC49}.Release|Any CPU.Build.0 = Release|Any CPU + {CE9436E4-9912-47BA-91D9-D9D371BFEC49}.Release|arm.ActiveCfg = Release|Any CPU + {CE9436E4-9912-47BA-91D9-D9D371BFEC49}.Release|arm64.ActiveCfg = Release|Any CPU + {CE9436E4-9912-47BA-91D9-D9D371BFEC49}.Release|x64.ActiveCfg = Release|Any CPU + {CE9436E4-9912-47BA-91D9-D9D371BFEC49}.Release|x64.Build.0 = Release|Any CPU + {CE9436E4-9912-47BA-91D9-D9D371BFEC49}.Release|x86.ActiveCfg = Release|Any CPU + {CE9436E4-9912-47BA-91D9-D9D371BFEC49}.Release|x86.Build.0 = Release|Any CPU + {CE9436E4-9912-47BA-91D9-D9D371BFEC49}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {CE9436E4-9912-47BA-91D9-D9D371BFEC49}.Checked|arm.ActiveCfg = Debug|Any CPU + {CE9436E4-9912-47BA-91D9-D9D371BFEC49}.Checked|arm64.ActiveCfg = Debug|Any CPU + {CE9436E4-9912-47BA-91D9-D9D371BFEC49}.Checked|x64.ActiveCfg = Debug|Any CPU + {CE9436E4-9912-47BA-91D9-D9D371BFEC49}.Checked|x86.ActiveCfg = Debug|Any CPU + {83534577-0A40-47CE-872F-E5BC74E10E5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {83534577-0A40-47CE-872F-E5BC74E10E5B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {83534577-0A40-47CE-872F-E5BC74E10E5B}.Debug|arm.ActiveCfg = Debug|Any CPU + {83534577-0A40-47CE-872F-E5BC74E10E5B}.Debug|arm64.ActiveCfg = Debug|Any CPU + {83534577-0A40-47CE-872F-E5BC74E10E5B}.Debug|x64.ActiveCfg = Debug|Any CPU + {83534577-0A40-47CE-872F-E5BC74E10E5B}.Debug|x64.Build.0 = Debug|Any CPU + {83534577-0A40-47CE-872F-E5BC74E10E5B}.Debug|x86.ActiveCfg = Debug|Any CPU + {83534577-0A40-47CE-872F-E5BC74E10E5B}.Debug|x86.Build.0 = Debug|Any CPU + {83534577-0A40-47CE-872F-E5BC74E10E5B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {83534577-0A40-47CE-872F-E5BC74E10E5B}.Release|Any CPU.Build.0 = Release|Any CPU + {83534577-0A40-47CE-872F-E5BC74E10E5B}.Release|arm.ActiveCfg = Release|Any CPU + {83534577-0A40-47CE-872F-E5BC74E10E5B}.Release|arm64.ActiveCfg = Release|Any CPU + {83534577-0A40-47CE-872F-E5BC74E10E5B}.Release|x64.ActiveCfg = Release|Any CPU + {83534577-0A40-47CE-872F-E5BC74E10E5B}.Release|x64.Build.0 = Release|Any CPU + {83534577-0A40-47CE-872F-E5BC74E10E5B}.Release|x86.ActiveCfg = Release|Any CPU + {83534577-0A40-47CE-872F-E5BC74E10E5B}.Release|x86.Build.0 = Release|Any CPU + {83534577-0A40-47CE-872F-E5BC74E10E5B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {83534577-0A40-47CE-872F-E5BC74E10E5B}.Checked|arm.ActiveCfg = Debug|Any CPU + {83534577-0A40-47CE-872F-E5BC74E10E5B}.Checked|arm64.ActiveCfg = Debug|Any CPU + {83534577-0A40-47CE-872F-E5BC74E10E5B}.Checked|x64.ActiveCfg = Debug|Any CPU + {83534577-0A40-47CE-872F-E5BC74E10E5B}.Checked|x86.ActiveCfg = Debug|Any CPU + {893B0928-A209-4F32-A6FC-E7E0AA45BE5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {893B0928-A209-4F32-A6FC-E7E0AA45BE5A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {893B0928-A209-4F32-A6FC-E7E0AA45BE5A}.Debug|arm.ActiveCfg = Debug|Any CPU + {893B0928-A209-4F32-A6FC-E7E0AA45BE5A}.Debug|arm64.ActiveCfg = Debug|Any CPU + {893B0928-A209-4F32-A6FC-E7E0AA45BE5A}.Debug|x64.ActiveCfg = Debug|Any CPU + {893B0928-A209-4F32-A6FC-E7E0AA45BE5A}.Debug|x64.Build.0 = Debug|Any CPU + {893B0928-A209-4F32-A6FC-E7E0AA45BE5A}.Debug|x86.ActiveCfg = Debug|Any CPU + {893B0928-A209-4F32-A6FC-E7E0AA45BE5A}.Debug|x86.Build.0 = Debug|Any CPU + {893B0928-A209-4F32-A6FC-E7E0AA45BE5A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {893B0928-A209-4F32-A6FC-E7E0AA45BE5A}.Release|Any CPU.Build.0 = Release|Any CPU + {893B0928-A209-4F32-A6FC-E7E0AA45BE5A}.Release|arm.ActiveCfg = Release|Any CPU + {893B0928-A209-4F32-A6FC-E7E0AA45BE5A}.Release|arm64.ActiveCfg = Release|Any CPU + {893B0928-A209-4F32-A6FC-E7E0AA45BE5A}.Release|x64.ActiveCfg = Release|Any CPU + {893B0928-A209-4F32-A6FC-E7E0AA45BE5A}.Release|x64.Build.0 = Release|Any CPU + {893B0928-A209-4F32-A6FC-E7E0AA45BE5A}.Release|x86.ActiveCfg = Release|Any CPU + {893B0928-A209-4F32-A6FC-E7E0AA45BE5A}.Release|x86.Build.0 = Release|Any CPU + {893B0928-A209-4F32-A6FC-E7E0AA45BE5A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {893B0928-A209-4F32-A6FC-E7E0AA45BE5A}.Checked|arm.ActiveCfg = Debug|Any CPU + {893B0928-A209-4F32-A6FC-E7E0AA45BE5A}.Checked|arm64.ActiveCfg = Debug|Any CPU + {893B0928-A209-4F32-A6FC-E7E0AA45BE5A}.Checked|x64.ActiveCfg = Debug|Any CPU + {893B0928-A209-4F32-A6FC-E7E0AA45BE5A}.Checked|x86.ActiveCfg = Debug|Any CPU + {A02494B4-8EE6-430D-A99F-7E3DA58C479D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A02494B4-8EE6-430D-A99F-7E3DA58C479D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A02494B4-8EE6-430D-A99F-7E3DA58C479D}.Debug|arm.ActiveCfg = Debug|Any CPU + {A02494B4-8EE6-430D-A99F-7E3DA58C479D}.Debug|arm64.ActiveCfg = Debug|Any CPU + {A02494B4-8EE6-430D-A99F-7E3DA58C479D}.Debug|x64.ActiveCfg = Debug|Any CPU + {A02494B4-8EE6-430D-A99F-7E3DA58C479D}.Debug|x64.Build.0 = Debug|Any CPU + {A02494B4-8EE6-430D-A99F-7E3DA58C479D}.Debug|x86.ActiveCfg = Debug|Any CPU + {A02494B4-8EE6-430D-A99F-7E3DA58C479D}.Debug|x86.Build.0 = Debug|Any CPU + {A02494B4-8EE6-430D-A99F-7E3DA58C479D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A02494B4-8EE6-430D-A99F-7E3DA58C479D}.Release|Any CPU.Build.0 = Release|Any CPU + {A02494B4-8EE6-430D-A99F-7E3DA58C479D}.Release|arm.ActiveCfg = Release|Any CPU + {A02494B4-8EE6-430D-A99F-7E3DA58C479D}.Release|arm64.ActiveCfg = Release|Any CPU + {A02494B4-8EE6-430D-A99F-7E3DA58C479D}.Release|x64.ActiveCfg = Release|Any CPU + {A02494B4-8EE6-430D-A99F-7E3DA58C479D}.Release|x64.Build.0 = Release|Any CPU + {A02494B4-8EE6-430D-A99F-7E3DA58C479D}.Release|x86.ActiveCfg = Release|Any CPU + {A02494B4-8EE6-430D-A99F-7E3DA58C479D}.Release|x86.Build.0 = Release|Any CPU + {A02494B4-8EE6-430D-A99F-7E3DA58C479D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {A02494B4-8EE6-430D-A99F-7E3DA58C479D}.Checked|arm.ActiveCfg = Debug|Any CPU + {A02494B4-8EE6-430D-A99F-7E3DA58C479D}.Checked|arm64.ActiveCfg = Debug|Any CPU + {A02494B4-8EE6-430D-A99F-7E3DA58C479D}.Checked|x64.ActiveCfg = Debug|Any CPU + {A02494B4-8EE6-430D-A99F-7E3DA58C479D}.Checked|x86.ActiveCfg = Debug|Any CPU + {AEC3AFB1-5825-4C79-89AE-679F510329B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AEC3AFB1-5825-4C79-89AE-679F510329B8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AEC3AFB1-5825-4C79-89AE-679F510329B8}.Debug|arm.ActiveCfg = Debug|Any CPU + {AEC3AFB1-5825-4C79-89AE-679F510329B8}.Debug|arm64.ActiveCfg = Debug|Any CPU + {AEC3AFB1-5825-4C79-89AE-679F510329B8}.Debug|x64.ActiveCfg = Debug|Any CPU + {AEC3AFB1-5825-4C79-89AE-679F510329B8}.Debug|x64.Build.0 = Debug|Any CPU + {AEC3AFB1-5825-4C79-89AE-679F510329B8}.Debug|x86.ActiveCfg = Debug|Any CPU + {AEC3AFB1-5825-4C79-89AE-679F510329B8}.Debug|x86.Build.0 = Debug|Any CPU + {AEC3AFB1-5825-4C79-89AE-679F510329B8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AEC3AFB1-5825-4C79-89AE-679F510329B8}.Release|Any CPU.Build.0 = Release|Any CPU + {AEC3AFB1-5825-4C79-89AE-679F510329B8}.Release|arm.ActiveCfg = Release|Any CPU + {AEC3AFB1-5825-4C79-89AE-679F510329B8}.Release|arm64.ActiveCfg = Release|Any CPU + {AEC3AFB1-5825-4C79-89AE-679F510329B8}.Release|x64.ActiveCfg = Release|Any CPU + {AEC3AFB1-5825-4C79-89AE-679F510329B8}.Release|x64.Build.0 = Release|Any CPU + {AEC3AFB1-5825-4C79-89AE-679F510329B8}.Release|x86.ActiveCfg = Release|Any CPU + {AEC3AFB1-5825-4C79-89AE-679F510329B8}.Release|x86.Build.0 = Release|Any CPU + {AEC3AFB1-5825-4C79-89AE-679F510329B8}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {AEC3AFB1-5825-4C79-89AE-679F510329B8}.Checked|arm.ActiveCfg = Debug|Any CPU + {AEC3AFB1-5825-4C79-89AE-679F510329B8}.Checked|arm64.ActiveCfg = Debug|Any CPU + {AEC3AFB1-5825-4C79-89AE-679F510329B8}.Checked|x64.ActiveCfg = Debug|Any CPU + {AEC3AFB1-5825-4C79-89AE-679F510329B8}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {F3DC1DF9-698A-4970-9A5E-AB946D6F763B} = {5924BF80-8349-4021-A4A3-853FE714A7C7} - {4C5DDB34-2F67-40F2-9D59-A3CEBAE35BE5} = {5924BF80-8349-4021-A4A3-853FE714A7C7} - {0FCF2BA6-A5B3-4E1C-A49A-424E77602313} = {5924BF80-8349-4021-A4A3-853FE714A7C7} - {0AE3ABFE-6284-4119-A5DC-1844E6AB8E02} = {5924BF80-8349-4021-A4A3-853FE714A7C7} - {C3F9A601-07D8-43A3-A3CA-7A002358A102} = {5924BF80-8349-4021-A4A3-853FE714A7C7} - {7AB121D2-0AAC-48E0-A834-6E220ECFEC4D} = {5924BF80-8349-4021-A4A3-853FE714A7C7} - {09129981-6B0D-44C7-9F0A-AD2426106332} = {5924BF80-8349-4021-A4A3-853FE714A7C7} + {F3DC1DF9-698A-4970-9A5E-AB946D6F763B} = {83E4FB59-E8AB-41DD-9770-7ACC71364E6A} {0BD22D2A-C12C-4641-8F12-73D21AAAFBA3} = {B1861E5E-4FCA-4CA5-9BB5-5A3C3DBC7F7D} {BEBD7B5B-9544-42EB-B878-F009560CAAF4} = {B1861E5E-4FCA-4CA5-9BB5-5A3C3DBC7F7D} {055E51B6-ACE0-4EE9-97C7-DC37D0FAF5E8} = {79588763-C99B-4C1B-88D3-181A92A98364} @@ -731,11 +850,25 @@ Global {7E7FA8BC-C1F8-44D3-82BB-82D204B7BEA6} = {79588763-C99B-4C1B-88D3-181A92A98364} {5AD0D9CB-C773-4BBC-87BD-9BDFF172936E} = {79588763-C99B-4C1B-88D3-181A92A98364} {521CFFC1-DB45-4FB2-87EF-6BF4F413A011} = {79588763-C99B-4C1B-88D3-181A92A98364} + {4C5DDB34-2F67-40F2-9D59-A3CEBAE35BE5} = {5924BF80-8349-4021-A4A3-853FE714A7C7} + {0FCF2BA6-A5B3-4E1C-A49A-424E77602313} = {5924BF80-8349-4021-A4A3-853FE714A7C7} + {0AE3ABFE-6284-4119-A5DC-1844E6AB8E02} = {5924BF80-8349-4021-A4A3-853FE714A7C7} + {C3F9A601-07D8-43A3-A3CA-7A002358A102} = {5924BF80-8349-4021-A4A3-853FE714A7C7} + {7AB121D2-0AAC-48E0-A834-6E220ECFEC4D} = {5924BF80-8349-4021-A4A3-853FE714A7C7} + {09129981-6B0D-44C7-9F0A-AD2426106332} = {5924BF80-8349-4021-A4A3-853FE714A7C7} {D5A85F0E-509A-424F-BFD0-A7CC38D43CCD} = {D92FD5A3-15A6-4EFA-ADC9-4DDEE8D31782} {293AF059-A4CC-43FE-9A5F-E19579B4F7AC} = {D92FD5A3-15A6-4EFA-ADC9-4DDEE8D31782} {44DCA516-EEB1-4976-9794-9D6A26A952E9} = {D92FD5A3-15A6-4EFA-ADC9-4DDEE8D31782} {D291982D-1FC0-4CA2-A39F-4B490F809F01} = {D92FD5A3-15A6-4EFA-ADC9-4DDEE8D31782} {EDDAE59E-8700-49DC-8E46-534037F7F476} = {D92FD5A3-15A6-4EFA-ADC9-4DDEE8D31782} + {CE9436E4-9912-47BA-91D9-D9D371BFEC49} = {837B27D3-08EF-4E05-AFBF-7E84AEEC1C03} + {83534577-0A40-47CE-872F-E5BC74E10E5B} = {837B27D3-08EF-4E05-AFBF-7E84AEEC1C03} + {837B27D3-08EF-4E05-AFBF-7E84AEEC1C03} = {5B554CA1-F92F-43B1-9652-712634FD8F07} + {893B0928-A209-4F32-A6FC-E7E0AA45BE5A} = {E99648EB-D082-44AD-B201-90120D491734} + {A02494B4-8EE6-430D-A99F-7E3DA58C479D} = {E99648EB-D082-44AD-B201-90120D491734} + {E99648EB-D082-44AD-B201-90120D491734} = {5B554CA1-F92F-43B1-9652-712634FD8F07} + {AEC3AFB1-5825-4C79-89AE-679F510329B8} = {2A8F43F6-3C6E-4D25-A26B-4483055B94EF} + {2A8F43F6-3C6E-4D25-A26B-4483055B94EF} = {5B554CA1-F92F-43B1-9652-712634FD8F07} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C1241AC3-6D55-48A6-9502-C46F806889AE} diff --git a/src/libraries/System.Data.Odbc/System.Data.Odbc.sln b/src/libraries/System.Data.Odbc/System.Data.Odbc.sln index 5089954290ae7c..fc92668a19224c 100644 --- a/src/libraries/System.Data.Odbc/System.Data.Odbc.sln +++ b/src/libraries/System.Data.Odbc/System.Data.Odbc.sln @@ -19,7 +19,15 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encoding.CodePa EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encoding.CodePages", "..\System.Text.Encoding.CodePages\src\System.Text.Encoding.CodePages.csproj", "{BD3A8348-A2AC-468A-B8D9-B639190B0FD8}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.RegularExpressions.Generator", "..\System.Text.RegularExpressions\gen\System.Text.RegularExpressions.Generator.csproj", "{89FD20D3-AF2B-4DAA-8CB3-847E4EA19A5F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{3884A327-F48F-402A-8A7D-53B2040391CB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{DEEDEF15-3088-4AEE-ADBE-9AC13D930C1A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{034324C2-F891-4586-A377-978D2DED76D8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{6F229D06-66BF-4925-AD0D-DFC6A9BE5474}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{13724B8F-069B-4E69-A219-3A35BB9F939B}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{D561F200-5EE8-46AF-A1B8-537A2A0EFA8F}" EndProject @@ -29,6 +37,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{416AFA87-B3A EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{4A564597-B792-466F-A641-DC264A3D6C66}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{A36F3BE8-9F0C-47C0-9670-0F6CDBD32F03}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{C9D86D28-FFBA-419B-BA5E-611AC314EAC0}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{81C62506-247F-4C0D-AF97-D51C815C2E5E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{91C6DE13-82B8-4AAB-9215-826256A9BB5D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -75,10 +91,26 @@ Global {BD3A8348-A2AC-468A-B8D9-B639190B0FD8}.Debug|Any CPU.Build.0 = Debug|Any CPU {BD3A8348-A2AC-468A-B8D9-B639190B0FD8}.Release|Any CPU.ActiveCfg = Release|Any CPU {BD3A8348-A2AC-468A-B8D9-B639190B0FD8}.Release|Any CPU.Build.0 = Release|Any CPU - {89FD20D3-AF2B-4DAA-8CB3-847E4EA19A5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {89FD20D3-AF2B-4DAA-8CB3-847E4EA19A5F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {89FD20D3-AF2B-4DAA-8CB3-847E4EA19A5F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {89FD20D3-AF2B-4DAA-8CB3-847E4EA19A5F}.Release|Any CPU.Build.0 = Release|Any CPU + {3884A327-F48F-402A-8A7D-53B2040391CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3884A327-F48F-402A-8A7D-53B2040391CB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3884A327-F48F-402A-8A7D-53B2040391CB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3884A327-F48F-402A-8A7D-53B2040391CB}.Release|Any CPU.Build.0 = Release|Any CPU + {DEEDEF15-3088-4AEE-ADBE-9AC13D930C1A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DEEDEF15-3088-4AEE-ADBE-9AC13D930C1A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DEEDEF15-3088-4AEE-ADBE-9AC13D930C1A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DEEDEF15-3088-4AEE-ADBE-9AC13D930C1A}.Release|Any CPU.Build.0 = Release|Any CPU + {034324C2-F891-4586-A377-978D2DED76D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {034324C2-F891-4586-A377-978D2DED76D8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {034324C2-F891-4586-A377-978D2DED76D8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {034324C2-F891-4586-A377-978D2DED76D8}.Release|Any CPU.Build.0 = Release|Any CPU + {6F229D06-66BF-4925-AD0D-DFC6A9BE5474}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6F229D06-66BF-4925-AD0D-DFC6A9BE5474}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6F229D06-66BF-4925-AD0D-DFC6A9BE5474}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6F229D06-66BF-4925-AD0D-DFC6A9BE5474}.Release|Any CPU.Build.0 = Release|Any CPU + {13724B8F-069B-4E69-A219-3A35BB9F939B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {13724B8F-069B-4E69-A219-3A35BB9F939B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {13724B8F-069B-4E69-A219-3A35BB9F939B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {13724B8F-069B-4E69-A219-3A35BB9F939B}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -94,7 +126,14 @@ Global {8DD9B5E3-A86A-4E2D-9CD4-567E358184FE} = {4A564597-B792-466F-A641-DC264A3D6C66} {76183E18-B488-4466-AEE5-3C5D0B3CD917} = {4A564597-B792-466F-A641-DC264A3D6C66} {C41CDCD9-00FB-4A87-893A-9E4788790EE7} = {4A564597-B792-466F-A641-DC264A3D6C66} - {89FD20D3-AF2B-4DAA-8CB3-847E4EA19A5F} = {4A564597-B792-466F-A641-DC264A3D6C66} + {3884A327-F48F-402A-8A7D-53B2040391CB} = {A36F3BE8-9F0C-47C0-9670-0F6CDBD32F03} + {DEEDEF15-3088-4AEE-ADBE-9AC13D930C1A} = {A36F3BE8-9F0C-47C0-9670-0F6CDBD32F03} + {A36F3BE8-9F0C-47C0-9670-0F6CDBD32F03} = {91C6DE13-82B8-4AAB-9215-826256A9BB5D} + {034324C2-F891-4586-A377-978D2DED76D8} = {C9D86D28-FFBA-419B-BA5E-611AC314EAC0} + {6F229D06-66BF-4925-AD0D-DFC6A9BE5474} = {C9D86D28-FFBA-419B-BA5E-611AC314EAC0} + {C9D86D28-FFBA-419B-BA5E-611AC314EAC0} = {91C6DE13-82B8-4AAB-9215-826256A9BB5D} + {13724B8F-069B-4E69-A219-3A35BB9F939B} = {81C62506-247F-4C0D-AF97-D51C815C2E5E} + {81C62506-247F-4C0D-AF97-D51C815C2E5E} = {91C6DE13-82B8-4AAB-9215-826256A9BB5D} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {D222D648-ABA4-4D02-9230-A2B2CC3F3C39} diff --git a/src/libraries/System.Data.Odbc/src/CompatibilitySuppressions.xml b/src/libraries/System.Data.Odbc/src/CompatibilitySuppressions.xml index 320b944a69f2c8..ab9662ec12d4ee 100644 --- a/src/libraries/System.Data.Odbc/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Data.Odbc/src/CompatibilitySuppressions.xml @@ -1,6 +1,6 @@  + - CP0001 T:System.Data.Odbc.ODBC32 @@ -10,7 +10,6 @@ T:System.Data.Odbc.ODBC32 true - CP0002 M:System.Data.Odbc.OdbcParameter.get_Offset @@ -25,4 +24,32 @@ lib/netstandard2.0/System.Data.Odbc.dll lib/net462/System.Data.Odbc.dll + + CP1002 + System.Data.Common, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.Data.Odbc.dll + lib/netstandard2.0/System.Data.Odbc.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.Data.Odbc.dll + lib/netstandard2.0/System.Data.Odbc.dll + true + + + CP1002 + System.Data.Common, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.Data.Odbc.dll + lib/netstandard2.0/System.Data.Odbc.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.Data.Odbc.dll + lib/netstandard2.0/System.Data.Odbc.dll + true + \ No newline at end of file diff --git a/src/libraries/System.Data.Odbc/src/PACKAGE.md b/src/libraries/System.Data.Odbc/src/PACKAGE.md new file mode 100644 index 00000000000000..081c268de66047 --- /dev/null +++ b/src/libraries/System.Data.Odbc/src/PACKAGE.md @@ -0,0 +1,48 @@ +## About + +This package implements a data provider for ODBC data sources. + +## Key Features + +Allows access to ODBC data sources. + +## How to Use + +This is a basic example of retrieving the results of a query using an [OdbcDataReader](https://learn.microsoft.com/dotnet/api/system.data.odbc.odbcdatareader). For examples of using an [OdbcDataAdapter](https://learn.microsoft.com/dotnet/api/system.data.odbc.odbcdataadapter), and of updating an ODBC data source, please see the documentation. + +```cs +using System.Data.Odbc; + +string connectionString = ""; // Fill in +string queryString = "SELECT DISTINCT CustomerID FROM Orders"; + +using OdbcConnection connection = new OdbcConnection(connectionString); +using OdbcCommand command = new OdbcCommand(queryString, connection); + +connection.Open(); +using OdbcDataReader reader = command.ExecuteReader(); + +while (reader.Read()) +{ + Console.WriteLine("CustomerID={0}", reader[0]); +} +``` + +## Main Types + +* [OdbcConnection](https://learn.microsoft.com/dotnet/api/system.data.odbc.odbcconnection) represents a connection to an ODBC data source. +* [OdbcCommand](https://learn.microsoft.com/dotnet/api/system.data.odbc.odbccommand) represents an SQL statement or stored procedure to execute against an ODBC data source.. +* [OdbcDataReader](https://learn.microsoft.com/dotnet/api/system.data.odbc.odbcdatareader) provides a way of reading a forward-only stream of data rows from an ODBC data source. +* [OdbcDataAdapter](https://learn.microsoft.com/dotnet/api/system.data.odbc.odbcdataadapter) represents a set of data commands and a database connection that are used to fill a [DataSet](https://learn.microsoft.com/dotnet/api/system.data.dataset) and update the ODBC data source. + +## Additional Documentation + +* [API documentation](https://learn.microsoft.com/dotnet/api/system.data.odbc) + +## Related Packages + +System.Data.OleDb is a similar package for accessing OLE DB data sources. + +## Feedback & Contributing + +System.Data.Odbc is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports are welcome at [the GitHub repository](https://github.com/dotnet/runtime). This package is considered complete and we only consider low-risk, high-impact fixes that are necessary to maintain or improve quality. diff --git a/src/libraries/System.Data.Odbc/src/System.Data.Odbc.csproj b/src/libraries/System.Data.Odbc/src/System.Data.Odbc.csproj index 356e81f71489f4..b65bc3ae54d0c9 100644 --- a/src/libraries/System.Data.Odbc/src/System.Data.Odbc.csproj +++ b/src/libraries/System.Data.Odbc/src/System.Data.Odbc.csproj @@ -1,4 +1,5 @@ + $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-freebsd;$(NetCoreAppCurrent)-illumos;$(NetCoreAppCurrent)-solaris;$(NetCoreAppCurrent)-linux;$(NetCoreAppCurrent)-osx;$(NetCoreAppCurrent)-ios;$(NetCoreAppCurrent)-tvos;$(NetCoreAppCurrent);$(NetCoreAppPrevious)-windows;$(NetCoreAppPrevious)-freebsd;$(NetCoreAppPrevious)-illumos;$(NetCoreAppPrevious)-solaris;$(NetCoreAppPrevious)-linux;$(NetCoreAppPrevious)-osx;$(NetCoreAppPrevious)-ios;$(NetCoreAppPrevious)-tvos;$(NetCoreAppPrevious);$(NetCoreAppMinimum)-windows;$(NetCoreAppMinimum)-freebsd;$(NetCoreAppMinimum)-linux;$(NetCoreAppMinimum)-osx;$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) true @@ -128,9 +129,7 @@ System.Data.Odbc.OdbcTransaction - - + diff --git a/src/libraries/System.Data.OleDb/System.Data.Oledb.sln b/src/libraries/System.Data.OleDb/System.Data.Oledb.sln index 26f56e73559d55..087b3e513523d6 100644 --- a/src/libraries/System.Data.OleDb/System.Data.Oledb.sln +++ b/src/libraries/System.Data.OleDb/System.Data.Oledb.sln @@ -1,6 +1,10 @@ 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", "{5DE5039B-D68C-4B66-9F5E-54613FC76423}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{30142600-D924-4FDC-9A98-D621C3A2CCEA}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Drawing.Common", "..\shims\stubs\System.Drawing.Common.csproj", "{ACD7A742-0474-4C95-9769-437A26E7B010}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Configuration.ConfigurationManager", "..\System.Configuration.ConfigurationManager\ref\System.Configuration.ConfigurationManager.csproj", "{048AD79E-A0A9-4C0E-8942-4778BBE4B2F1}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Configuration.ConfigurationManager", "..\System.Configuration.ConfigurationManager\src\System.Configuration.ConfigurationManager.csproj", "{636E099B-BFAB-4C0E-B9D8-09BB1FE85B45}" @@ -21,12 +25,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.Performa EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.PerformanceCounter", "..\System.Diagnostics.PerformanceCounter\src\System.Diagnostics.PerformanceCounter.csproj", "{362A9152-D46A-4DD0-8EB7-D36FC95D1AF1}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{F7FF9B2F-DDFA-4DA9-B765-45C898AF747B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{B749BF37-D346-475F-8C22-13C67A7DA2B6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{67355722-4CF4-40BD-8569-04BA649A0B57}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.Uri", "..\System.Private.Uri\src\System.Private.Uri.csproj", "{B90DD406-44B4-47A9-8BB7-75452A95751F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{A2ED3B1E-5AAC-47AF-BDCE-B59226B65E63}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{C273C3A4-5651-489C-9FA4-2DCAAA7A7D97}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{40386176-1E3E-41DE-AC3A-9910922BEDFE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\src\System.Runtime.csproj", "{BF351671-8D05-42F5-8218-7676E4356440}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography.ProtectedData", "..\System.Security.Cryptography.ProtectedData\ref\System.Security.Cryptography.ProtectedData.csproj", "{EF8D1526-9463-401B-9EAE-D4B98C86E046}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography.ProtectedData", "..\System.Security.Cryptography.ProtectedData\src\System.Security.Cryptography.ProtectedData.csproj", "{15628477-9D25-41FA-81B0-59D43D1363F4}" @@ -35,136 +47,756 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Permissions EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Permissions", "..\System.Security.Permissions\src\System.Security.Permissions.csproj", "{877B4329-854A-412F-B631-6315D77F9C8A}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.RegularExpressions.Generator", "..\System.Text.RegularExpressions\gen\System.Text.RegularExpressions.Generator.csproj", "{7AD9D681-F853-47F4-8C1B-A0D1E0440D3B}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", "..\System.Windows.Extensions\ref\System.Windows.Extensions.csproj", "{D7C9E59C-0B7B-491E-9FC5-63A29290EE06}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", "..\System.Windows.Extensions\src\System.Windows.Extensions.csproj", "{A3AC9584-763B-4686-B6D8-49140FC62EC4}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{BC37CE7C-7BD7-4495-9BC9-810D34DC5B1F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{66C42AC6-739D-45C5-9E37-06B43F285AA7}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{9AB0B44D-9A64-449F-A0CD-07D39ABEF343}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{F381E5FD-EB66-431A-857F-F66336276DB5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{842D4A99-9C12-45AB-8D0C-D0471E314B93}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{5D47BC07-C66C-4969-AF57-928927B73CCD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{F090E986-15B1-4C2C-94DF-ADE84C8A8D62}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{C0F27DD2-DED0-4FA5-8319-64CA1FBCEC31}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{BC37CE7C-7BD7-4495-9BC9-810D34DC5B1F}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{4B964147-AE9C-454F-B971-4F4BD9541280}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{9AB0B44D-9A64-449F-A0CD-07D39ABEF343}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{39D097CC-4757-405F-B3C5-17B8050F438C}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{C421505B-16CA-4879-B53D-A932AA7083EF}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{67A242EB-D6B4-4FB6-88EA-57EEA8258F0A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{0E6D7F5C-08C3-4D23-B0C9-148B9C556BDB}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{27F0660E-53DE-4B69-AEEB-E561E0383803}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|arm = Debug|arm + Debug|arm64 = Debug|arm64 + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|arm = Release|arm + Release|arm64 = Release|arm64 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + Checked|Any CPU = Checked|Any CPU + Checked|arm = Checked|arm + Checked|arm64 = Checked|arm64 + Checked|x64 = Checked|x64 + Checked|x86 = Checked|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5DE5039B-D68C-4B66-9F5E-54613FC76423}.Debug|Any CPU.ActiveCfg = Debug|x64 + {5DE5039B-D68C-4B66-9F5E-54613FC76423}.Debug|Any CPU.Build.0 = Debug|x64 + {5DE5039B-D68C-4B66-9F5E-54613FC76423}.Debug|arm.ActiveCfg = Debug|arm + {5DE5039B-D68C-4B66-9F5E-54613FC76423}.Debug|arm.Build.0 = Debug|arm + {5DE5039B-D68C-4B66-9F5E-54613FC76423}.Debug|arm64.ActiveCfg = Debug|arm64 + {5DE5039B-D68C-4B66-9F5E-54613FC76423}.Debug|arm64.Build.0 = Debug|arm64 + {5DE5039B-D68C-4B66-9F5E-54613FC76423}.Debug|x64.ActiveCfg = Debug|x64 + {5DE5039B-D68C-4B66-9F5E-54613FC76423}.Debug|x64.Build.0 = Debug|x64 + {5DE5039B-D68C-4B66-9F5E-54613FC76423}.Debug|x86.ActiveCfg = Debug|x86 + {5DE5039B-D68C-4B66-9F5E-54613FC76423}.Debug|x86.Build.0 = Debug|x86 + {5DE5039B-D68C-4B66-9F5E-54613FC76423}.Release|Any CPU.ActiveCfg = Release|x64 + {5DE5039B-D68C-4B66-9F5E-54613FC76423}.Release|Any CPU.Build.0 = Release|x64 + {5DE5039B-D68C-4B66-9F5E-54613FC76423}.Release|arm.ActiveCfg = Release|arm + {5DE5039B-D68C-4B66-9F5E-54613FC76423}.Release|arm.Build.0 = Release|arm + {5DE5039B-D68C-4B66-9F5E-54613FC76423}.Release|arm64.ActiveCfg = Release|arm64 + {5DE5039B-D68C-4B66-9F5E-54613FC76423}.Release|arm64.Build.0 = Release|arm64 + {5DE5039B-D68C-4B66-9F5E-54613FC76423}.Release|x64.ActiveCfg = Release|x64 + {5DE5039B-D68C-4B66-9F5E-54613FC76423}.Release|x64.Build.0 = Release|x64 + {5DE5039B-D68C-4B66-9F5E-54613FC76423}.Release|x86.ActiveCfg = Release|x86 + {5DE5039B-D68C-4B66-9F5E-54613FC76423}.Release|x86.Build.0 = Release|x86 + {5DE5039B-D68C-4B66-9F5E-54613FC76423}.Checked|Any CPU.ActiveCfg = Checked|x64 + {5DE5039B-D68C-4B66-9F5E-54613FC76423}.Checked|Any CPU.Build.0 = Checked|x64 + {5DE5039B-D68C-4B66-9F5E-54613FC76423}.Checked|arm.ActiveCfg = Checked|arm + {5DE5039B-D68C-4B66-9F5E-54613FC76423}.Checked|arm.Build.0 = Checked|arm + {5DE5039B-D68C-4B66-9F5E-54613FC76423}.Checked|arm64.ActiveCfg = Checked|arm64 + {5DE5039B-D68C-4B66-9F5E-54613FC76423}.Checked|arm64.Build.0 = Checked|arm64 + {5DE5039B-D68C-4B66-9F5E-54613FC76423}.Checked|x64.ActiveCfg = Checked|x64 + {5DE5039B-D68C-4B66-9F5E-54613FC76423}.Checked|x64.Build.0 = Checked|x64 + {5DE5039B-D68C-4B66-9F5E-54613FC76423}.Checked|x86.ActiveCfg = Checked|x86 + {5DE5039B-D68C-4B66-9F5E-54613FC76423}.Checked|x86.Build.0 = Checked|x86 {30142600-D924-4FDC-9A98-D621C3A2CCEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {30142600-D924-4FDC-9A98-D621C3A2CCEA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {30142600-D924-4FDC-9A98-D621C3A2CCEA}.Debug|arm.ActiveCfg = Debug|Any CPU + {30142600-D924-4FDC-9A98-D621C3A2CCEA}.Debug|arm64.ActiveCfg = Debug|Any CPU + {30142600-D924-4FDC-9A98-D621C3A2CCEA}.Debug|x64.ActiveCfg = Debug|Any CPU + {30142600-D924-4FDC-9A98-D621C3A2CCEA}.Debug|x64.Build.0 = Debug|Any CPU + {30142600-D924-4FDC-9A98-D621C3A2CCEA}.Debug|x86.ActiveCfg = Debug|Any CPU + {30142600-D924-4FDC-9A98-D621C3A2CCEA}.Debug|x86.Build.0 = Debug|Any CPU {30142600-D924-4FDC-9A98-D621C3A2CCEA}.Release|Any CPU.ActiveCfg = Release|Any CPU {30142600-D924-4FDC-9A98-D621C3A2CCEA}.Release|Any CPU.Build.0 = Release|Any CPU + {30142600-D924-4FDC-9A98-D621C3A2CCEA}.Release|arm.ActiveCfg = Release|Any CPU + {30142600-D924-4FDC-9A98-D621C3A2CCEA}.Release|arm64.ActiveCfg = Release|Any CPU + {30142600-D924-4FDC-9A98-D621C3A2CCEA}.Release|x64.ActiveCfg = Release|Any CPU + {30142600-D924-4FDC-9A98-D621C3A2CCEA}.Release|x64.Build.0 = Release|Any CPU + {30142600-D924-4FDC-9A98-D621C3A2CCEA}.Release|x86.ActiveCfg = Release|Any CPU + {30142600-D924-4FDC-9A98-D621C3A2CCEA}.Release|x86.Build.0 = Release|Any CPU + {30142600-D924-4FDC-9A98-D621C3A2CCEA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {30142600-D924-4FDC-9A98-D621C3A2CCEA}.Checked|arm.ActiveCfg = Debug|Any CPU + {30142600-D924-4FDC-9A98-D621C3A2CCEA}.Checked|arm64.ActiveCfg = Debug|Any CPU + {30142600-D924-4FDC-9A98-D621C3A2CCEA}.Checked|x64.ActiveCfg = Debug|Any CPU + {30142600-D924-4FDC-9A98-D621C3A2CCEA}.Checked|x86.ActiveCfg = Debug|Any CPU + {ACD7A742-0474-4C95-9769-437A26E7B010}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ACD7A742-0474-4C95-9769-437A26E7B010}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ACD7A742-0474-4C95-9769-437A26E7B010}.Debug|arm.ActiveCfg = Debug|Any CPU + {ACD7A742-0474-4C95-9769-437A26E7B010}.Debug|arm64.ActiveCfg = Debug|Any CPU + {ACD7A742-0474-4C95-9769-437A26E7B010}.Debug|x64.ActiveCfg = Debug|Any CPU + {ACD7A742-0474-4C95-9769-437A26E7B010}.Debug|x64.Build.0 = Debug|Any CPU + {ACD7A742-0474-4C95-9769-437A26E7B010}.Debug|x86.ActiveCfg = Debug|Any CPU + {ACD7A742-0474-4C95-9769-437A26E7B010}.Debug|x86.Build.0 = Debug|Any CPU + {ACD7A742-0474-4C95-9769-437A26E7B010}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ACD7A742-0474-4C95-9769-437A26E7B010}.Release|Any CPU.Build.0 = Release|Any CPU + {ACD7A742-0474-4C95-9769-437A26E7B010}.Release|arm.ActiveCfg = Release|Any CPU + {ACD7A742-0474-4C95-9769-437A26E7B010}.Release|arm64.ActiveCfg = Release|Any CPU + {ACD7A742-0474-4C95-9769-437A26E7B010}.Release|x64.ActiveCfg = Release|Any CPU + {ACD7A742-0474-4C95-9769-437A26E7B010}.Release|x64.Build.0 = Release|Any CPU + {ACD7A742-0474-4C95-9769-437A26E7B010}.Release|x86.ActiveCfg = Release|Any CPU + {ACD7A742-0474-4C95-9769-437A26E7B010}.Release|x86.Build.0 = Release|Any CPU + {ACD7A742-0474-4C95-9769-437A26E7B010}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {ACD7A742-0474-4C95-9769-437A26E7B010}.Checked|arm.ActiveCfg = Debug|Any CPU + {ACD7A742-0474-4C95-9769-437A26E7B010}.Checked|arm64.ActiveCfg = Debug|Any CPU + {ACD7A742-0474-4C95-9769-437A26E7B010}.Checked|x64.ActiveCfg = Debug|Any CPU + {ACD7A742-0474-4C95-9769-437A26E7B010}.Checked|x86.ActiveCfg = Debug|Any CPU {048AD79E-A0A9-4C0E-8942-4778BBE4B2F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {048AD79E-A0A9-4C0E-8942-4778BBE4B2F1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {048AD79E-A0A9-4C0E-8942-4778BBE4B2F1}.Debug|arm.ActiveCfg = Debug|Any CPU + {048AD79E-A0A9-4C0E-8942-4778BBE4B2F1}.Debug|arm64.ActiveCfg = Debug|Any CPU + {048AD79E-A0A9-4C0E-8942-4778BBE4B2F1}.Debug|x64.ActiveCfg = Debug|Any CPU + {048AD79E-A0A9-4C0E-8942-4778BBE4B2F1}.Debug|x64.Build.0 = Debug|Any CPU + {048AD79E-A0A9-4C0E-8942-4778BBE4B2F1}.Debug|x86.ActiveCfg = Debug|Any CPU + {048AD79E-A0A9-4C0E-8942-4778BBE4B2F1}.Debug|x86.Build.0 = Debug|Any CPU {048AD79E-A0A9-4C0E-8942-4778BBE4B2F1}.Release|Any CPU.ActiveCfg = Release|Any CPU {048AD79E-A0A9-4C0E-8942-4778BBE4B2F1}.Release|Any CPU.Build.0 = Release|Any CPU + {048AD79E-A0A9-4C0E-8942-4778BBE4B2F1}.Release|arm.ActiveCfg = Release|Any CPU + {048AD79E-A0A9-4C0E-8942-4778BBE4B2F1}.Release|arm64.ActiveCfg = Release|Any CPU + {048AD79E-A0A9-4C0E-8942-4778BBE4B2F1}.Release|x64.ActiveCfg = Release|Any CPU + {048AD79E-A0A9-4C0E-8942-4778BBE4B2F1}.Release|x64.Build.0 = Release|Any CPU + {048AD79E-A0A9-4C0E-8942-4778BBE4B2F1}.Release|x86.ActiveCfg = Release|Any CPU + {048AD79E-A0A9-4C0E-8942-4778BBE4B2F1}.Release|x86.Build.0 = Release|Any CPU + {048AD79E-A0A9-4C0E-8942-4778BBE4B2F1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {048AD79E-A0A9-4C0E-8942-4778BBE4B2F1}.Checked|arm.ActiveCfg = Debug|Any CPU + {048AD79E-A0A9-4C0E-8942-4778BBE4B2F1}.Checked|arm64.ActiveCfg = Debug|Any CPU + {048AD79E-A0A9-4C0E-8942-4778BBE4B2F1}.Checked|x64.ActiveCfg = Debug|Any CPU + {048AD79E-A0A9-4C0E-8942-4778BBE4B2F1}.Checked|x86.ActiveCfg = Debug|Any CPU {636E099B-BFAB-4C0E-B9D8-09BB1FE85B45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {636E099B-BFAB-4C0E-B9D8-09BB1FE85B45}.Debug|Any CPU.Build.0 = Debug|Any CPU + {636E099B-BFAB-4C0E-B9D8-09BB1FE85B45}.Debug|arm.ActiveCfg = Debug|Any CPU + {636E099B-BFAB-4C0E-B9D8-09BB1FE85B45}.Debug|arm64.ActiveCfg = Debug|Any CPU + {636E099B-BFAB-4C0E-B9D8-09BB1FE85B45}.Debug|x64.ActiveCfg = Debug|Any CPU + {636E099B-BFAB-4C0E-B9D8-09BB1FE85B45}.Debug|x64.Build.0 = Debug|Any CPU + {636E099B-BFAB-4C0E-B9D8-09BB1FE85B45}.Debug|x86.ActiveCfg = Debug|Any CPU + {636E099B-BFAB-4C0E-B9D8-09BB1FE85B45}.Debug|x86.Build.0 = Debug|Any CPU {636E099B-BFAB-4C0E-B9D8-09BB1FE85B45}.Release|Any CPU.ActiveCfg = Release|Any CPU {636E099B-BFAB-4C0E-B9D8-09BB1FE85B45}.Release|Any CPU.Build.0 = Release|Any CPU + {636E099B-BFAB-4C0E-B9D8-09BB1FE85B45}.Release|arm.ActiveCfg = Release|Any CPU + {636E099B-BFAB-4C0E-B9D8-09BB1FE85B45}.Release|arm64.ActiveCfg = Release|Any CPU + {636E099B-BFAB-4C0E-B9D8-09BB1FE85B45}.Release|x64.ActiveCfg = Release|Any CPU + {636E099B-BFAB-4C0E-B9D8-09BB1FE85B45}.Release|x64.Build.0 = Release|Any CPU + {636E099B-BFAB-4C0E-B9D8-09BB1FE85B45}.Release|x86.ActiveCfg = Release|Any CPU + {636E099B-BFAB-4C0E-B9D8-09BB1FE85B45}.Release|x86.Build.0 = Release|Any CPU + {636E099B-BFAB-4C0E-B9D8-09BB1FE85B45}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {636E099B-BFAB-4C0E-B9D8-09BB1FE85B45}.Checked|arm.ActiveCfg = Debug|Any CPU + {636E099B-BFAB-4C0E-B9D8-09BB1FE85B45}.Checked|arm64.ActiveCfg = Debug|Any CPU + {636E099B-BFAB-4C0E-B9D8-09BB1FE85B45}.Checked|x64.ActiveCfg = Debug|Any CPU + {636E099B-BFAB-4C0E-B9D8-09BB1FE85B45}.Checked|x86.ActiveCfg = Debug|Any CPU {55F3CDEC-EA5D-4483-AD1A-47A0DC4B5222}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {55F3CDEC-EA5D-4483-AD1A-47A0DC4B5222}.Debug|Any CPU.Build.0 = Debug|Any CPU + {55F3CDEC-EA5D-4483-AD1A-47A0DC4B5222}.Debug|arm.ActiveCfg = Debug|Any CPU + {55F3CDEC-EA5D-4483-AD1A-47A0DC4B5222}.Debug|arm64.ActiveCfg = Debug|Any CPU + {55F3CDEC-EA5D-4483-AD1A-47A0DC4B5222}.Debug|x64.ActiveCfg = Debug|Any CPU + {55F3CDEC-EA5D-4483-AD1A-47A0DC4B5222}.Debug|x64.Build.0 = Debug|Any CPU + {55F3CDEC-EA5D-4483-AD1A-47A0DC4B5222}.Debug|x86.ActiveCfg = Debug|Any CPU + {55F3CDEC-EA5D-4483-AD1A-47A0DC4B5222}.Debug|x86.Build.0 = Debug|Any CPU {55F3CDEC-EA5D-4483-AD1A-47A0DC4B5222}.Release|Any CPU.ActiveCfg = Release|Any CPU {55F3CDEC-EA5D-4483-AD1A-47A0DC4B5222}.Release|Any CPU.Build.0 = Release|Any CPU + {55F3CDEC-EA5D-4483-AD1A-47A0DC4B5222}.Release|arm.ActiveCfg = Release|Any CPU + {55F3CDEC-EA5D-4483-AD1A-47A0DC4B5222}.Release|arm64.ActiveCfg = Release|Any CPU + {55F3CDEC-EA5D-4483-AD1A-47A0DC4B5222}.Release|x64.ActiveCfg = Release|Any CPU + {55F3CDEC-EA5D-4483-AD1A-47A0DC4B5222}.Release|x64.Build.0 = Release|Any CPU + {55F3CDEC-EA5D-4483-AD1A-47A0DC4B5222}.Release|x86.ActiveCfg = Release|Any CPU + {55F3CDEC-EA5D-4483-AD1A-47A0DC4B5222}.Release|x86.Build.0 = Release|Any CPU + {55F3CDEC-EA5D-4483-AD1A-47A0DC4B5222}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {55F3CDEC-EA5D-4483-AD1A-47A0DC4B5222}.Checked|arm.ActiveCfg = Debug|Any CPU + {55F3CDEC-EA5D-4483-AD1A-47A0DC4B5222}.Checked|arm64.ActiveCfg = Debug|Any CPU + {55F3CDEC-EA5D-4483-AD1A-47A0DC4B5222}.Checked|x64.ActiveCfg = Debug|Any CPU + {55F3CDEC-EA5D-4483-AD1A-47A0DC4B5222}.Checked|x86.ActiveCfg = Debug|Any CPU {9C557B87-DEE3-4B28-A82D-796418B3F608}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9C557B87-DEE3-4B28-A82D-796418B3F608}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9C557B87-DEE3-4B28-A82D-796418B3F608}.Debug|arm.ActiveCfg = Debug|Any CPU + {9C557B87-DEE3-4B28-A82D-796418B3F608}.Debug|arm64.ActiveCfg = Debug|Any CPU + {9C557B87-DEE3-4B28-A82D-796418B3F608}.Debug|x64.ActiveCfg = Debug|Any CPU + {9C557B87-DEE3-4B28-A82D-796418B3F608}.Debug|x64.Build.0 = Debug|Any CPU + {9C557B87-DEE3-4B28-A82D-796418B3F608}.Debug|x86.ActiveCfg = Debug|Any CPU + {9C557B87-DEE3-4B28-A82D-796418B3F608}.Debug|x86.Build.0 = Debug|Any CPU {9C557B87-DEE3-4B28-A82D-796418B3F608}.Release|Any CPU.ActiveCfg = Release|Any CPU {9C557B87-DEE3-4B28-A82D-796418B3F608}.Release|Any CPU.Build.0 = Release|Any CPU + {9C557B87-DEE3-4B28-A82D-796418B3F608}.Release|arm.ActiveCfg = Release|Any CPU + {9C557B87-DEE3-4B28-A82D-796418B3F608}.Release|arm64.ActiveCfg = Release|Any CPU + {9C557B87-DEE3-4B28-A82D-796418B3F608}.Release|x64.ActiveCfg = Release|Any CPU + {9C557B87-DEE3-4B28-A82D-796418B3F608}.Release|x64.Build.0 = Release|Any CPU + {9C557B87-DEE3-4B28-A82D-796418B3F608}.Release|x86.ActiveCfg = Release|Any CPU + {9C557B87-DEE3-4B28-A82D-796418B3F608}.Release|x86.Build.0 = Release|Any CPU + {9C557B87-DEE3-4B28-A82D-796418B3F608}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {9C557B87-DEE3-4B28-A82D-796418B3F608}.Checked|arm.ActiveCfg = Debug|Any CPU + {9C557B87-DEE3-4B28-A82D-796418B3F608}.Checked|arm64.ActiveCfg = Debug|Any CPU + {9C557B87-DEE3-4B28-A82D-796418B3F608}.Checked|x64.ActiveCfg = Debug|Any CPU + {9C557B87-DEE3-4B28-A82D-796418B3F608}.Checked|x86.ActiveCfg = Debug|Any CPU {84CF0BC6-CFDF-4A19-AA48-0F28FB11BC3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {84CF0BC6-CFDF-4A19-AA48-0F28FB11BC3A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {84CF0BC6-CFDF-4A19-AA48-0F28FB11BC3A}.Debug|arm.ActiveCfg = Debug|Any CPU + {84CF0BC6-CFDF-4A19-AA48-0F28FB11BC3A}.Debug|arm64.ActiveCfg = Debug|Any CPU + {84CF0BC6-CFDF-4A19-AA48-0F28FB11BC3A}.Debug|x64.ActiveCfg = Debug|Any CPU + {84CF0BC6-CFDF-4A19-AA48-0F28FB11BC3A}.Debug|x64.Build.0 = Debug|Any CPU + {84CF0BC6-CFDF-4A19-AA48-0F28FB11BC3A}.Debug|x86.ActiveCfg = Debug|Any CPU + {84CF0BC6-CFDF-4A19-AA48-0F28FB11BC3A}.Debug|x86.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 + {84CF0BC6-CFDF-4A19-AA48-0F28FB11BC3A}.Release|arm.ActiveCfg = Release|Any CPU + {84CF0BC6-CFDF-4A19-AA48-0F28FB11BC3A}.Release|arm64.ActiveCfg = Release|Any CPU + {84CF0BC6-CFDF-4A19-AA48-0F28FB11BC3A}.Release|x64.ActiveCfg = Release|Any CPU + {84CF0BC6-CFDF-4A19-AA48-0F28FB11BC3A}.Release|x64.Build.0 = Release|Any CPU + {84CF0BC6-CFDF-4A19-AA48-0F28FB11BC3A}.Release|x86.ActiveCfg = Release|Any CPU + {84CF0BC6-CFDF-4A19-AA48-0F28FB11BC3A}.Release|x86.Build.0 = Release|Any CPU + {84CF0BC6-CFDF-4A19-AA48-0F28FB11BC3A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {84CF0BC6-CFDF-4A19-AA48-0F28FB11BC3A}.Checked|arm.ActiveCfg = Debug|Any CPU + {84CF0BC6-CFDF-4A19-AA48-0F28FB11BC3A}.Checked|arm64.ActiveCfg = Debug|Any CPU + {84CF0BC6-CFDF-4A19-AA48-0F28FB11BC3A}.Checked|x64.ActiveCfg = Debug|Any CPU + {84CF0BC6-CFDF-4A19-AA48-0F28FB11BC3A}.Checked|x86.ActiveCfg = Debug|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}.Debug|arm.ActiveCfg = Debug|Any CPU + {F7379254-05CC-4F91-B230-4DD992502C75}.Debug|arm64.ActiveCfg = Debug|Any CPU + {F7379254-05CC-4F91-B230-4DD992502C75}.Debug|x64.ActiveCfg = Debug|Any CPU + {F7379254-05CC-4F91-B230-4DD992502C75}.Debug|x64.Build.0 = Debug|Any CPU + {F7379254-05CC-4F91-B230-4DD992502C75}.Debug|x86.ActiveCfg = Debug|Any CPU + {F7379254-05CC-4F91-B230-4DD992502C75}.Debug|x86.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 + {F7379254-05CC-4F91-B230-4DD992502C75}.Release|arm.ActiveCfg = Release|Any CPU + {F7379254-05CC-4F91-B230-4DD992502C75}.Release|arm64.ActiveCfg = Release|Any CPU + {F7379254-05CC-4F91-B230-4DD992502C75}.Release|x64.ActiveCfg = Release|Any CPU + {F7379254-05CC-4F91-B230-4DD992502C75}.Release|x64.Build.0 = Release|Any CPU + {F7379254-05CC-4F91-B230-4DD992502C75}.Release|x86.ActiveCfg = Release|Any CPU + {F7379254-05CC-4F91-B230-4DD992502C75}.Release|x86.Build.0 = Release|Any CPU + {F7379254-05CC-4F91-B230-4DD992502C75}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {F7379254-05CC-4F91-B230-4DD992502C75}.Checked|arm.ActiveCfg = Debug|Any CPU + {F7379254-05CC-4F91-B230-4DD992502C75}.Checked|arm64.ActiveCfg = Debug|Any CPU + {F7379254-05CC-4F91-B230-4DD992502C75}.Checked|x64.ActiveCfg = Debug|Any CPU + {F7379254-05CC-4F91-B230-4DD992502C75}.Checked|x86.ActiveCfg = Debug|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}.Debug|arm.ActiveCfg = Debug|Any CPU + {CE5ACEBD-8B25-4523-842C-1BF961044C17}.Debug|arm64.ActiveCfg = Debug|Any CPU + {CE5ACEBD-8B25-4523-842C-1BF961044C17}.Debug|x64.ActiveCfg = Debug|Any CPU + {CE5ACEBD-8B25-4523-842C-1BF961044C17}.Debug|x64.Build.0 = Debug|Any CPU + {CE5ACEBD-8B25-4523-842C-1BF961044C17}.Debug|x86.ActiveCfg = Debug|Any CPU + {CE5ACEBD-8B25-4523-842C-1BF961044C17}.Debug|x86.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 + {CE5ACEBD-8B25-4523-842C-1BF961044C17}.Release|arm.ActiveCfg = Release|Any CPU + {CE5ACEBD-8B25-4523-842C-1BF961044C17}.Release|arm64.ActiveCfg = Release|Any CPU + {CE5ACEBD-8B25-4523-842C-1BF961044C17}.Release|x64.ActiveCfg = Release|Any CPU + {CE5ACEBD-8B25-4523-842C-1BF961044C17}.Release|x64.Build.0 = Release|Any CPU + {CE5ACEBD-8B25-4523-842C-1BF961044C17}.Release|x86.ActiveCfg = Release|Any CPU + {CE5ACEBD-8B25-4523-842C-1BF961044C17}.Release|x86.Build.0 = Release|Any CPU + {CE5ACEBD-8B25-4523-842C-1BF961044C17}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {CE5ACEBD-8B25-4523-842C-1BF961044C17}.Checked|arm.ActiveCfg = Debug|Any CPU + {CE5ACEBD-8B25-4523-842C-1BF961044C17}.Checked|arm64.ActiveCfg = Debug|Any CPU + {CE5ACEBD-8B25-4523-842C-1BF961044C17}.Checked|x64.ActiveCfg = Debug|Any CPU + {CE5ACEBD-8B25-4523-842C-1BF961044C17}.Checked|x86.ActiveCfg = Debug|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}.Debug|arm.ActiveCfg = Debug|Any CPU + {3F0940D6-1697-4468-A2D6-8AC3891C4FB7}.Debug|arm64.ActiveCfg = Debug|Any CPU + {3F0940D6-1697-4468-A2D6-8AC3891C4FB7}.Debug|x64.ActiveCfg = Debug|Any CPU + {3F0940D6-1697-4468-A2D6-8AC3891C4FB7}.Debug|x64.Build.0 = Debug|Any CPU + {3F0940D6-1697-4468-A2D6-8AC3891C4FB7}.Debug|x86.ActiveCfg = Debug|Any CPU + {3F0940D6-1697-4468-A2D6-8AC3891C4FB7}.Debug|x86.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 + {3F0940D6-1697-4468-A2D6-8AC3891C4FB7}.Release|arm.ActiveCfg = Release|Any CPU + {3F0940D6-1697-4468-A2D6-8AC3891C4FB7}.Release|arm64.ActiveCfg = Release|Any CPU + {3F0940D6-1697-4468-A2D6-8AC3891C4FB7}.Release|x64.ActiveCfg = Release|Any CPU + {3F0940D6-1697-4468-A2D6-8AC3891C4FB7}.Release|x64.Build.0 = Release|Any CPU + {3F0940D6-1697-4468-A2D6-8AC3891C4FB7}.Release|x86.ActiveCfg = Release|Any CPU + {3F0940D6-1697-4468-A2D6-8AC3891C4FB7}.Release|x86.Build.0 = Release|Any CPU + {3F0940D6-1697-4468-A2D6-8AC3891C4FB7}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {3F0940D6-1697-4468-A2D6-8AC3891C4FB7}.Checked|arm.ActiveCfg = Debug|Any CPU + {3F0940D6-1697-4468-A2D6-8AC3891C4FB7}.Checked|arm64.ActiveCfg = Debug|Any CPU + {3F0940D6-1697-4468-A2D6-8AC3891C4FB7}.Checked|x64.ActiveCfg = Debug|Any CPU + {3F0940D6-1697-4468-A2D6-8AC3891C4FB7}.Checked|x86.ActiveCfg = Debug|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}.Debug|arm.ActiveCfg = Debug|Any CPU + {F5BFD2E9-5399-4D16-901A-554E1DF2D6E1}.Debug|arm64.ActiveCfg = Debug|Any CPU + {F5BFD2E9-5399-4D16-901A-554E1DF2D6E1}.Debug|x64.ActiveCfg = Debug|Any CPU + {F5BFD2E9-5399-4D16-901A-554E1DF2D6E1}.Debug|x64.Build.0 = Debug|Any CPU + {F5BFD2E9-5399-4D16-901A-554E1DF2D6E1}.Debug|x86.ActiveCfg = Debug|Any CPU + {F5BFD2E9-5399-4D16-901A-554E1DF2D6E1}.Debug|x86.Build.0 = Debug|Any CPU {F5BFD2E9-5399-4D16-901A-554E1DF2D6E1}.Release|Any CPU.ActiveCfg = Release|Any CPU {F5BFD2E9-5399-4D16-901A-554E1DF2D6E1}.Release|Any CPU.Build.0 = Release|Any CPU + {F5BFD2E9-5399-4D16-901A-554E1DF2D6E1}.Release|arm.ActiveCfg = Release|Any CPU + {F5BFD2E9-5399-4D16-901A-554E1DF2D6E1}.Release|arm64.ActiveCfg = Release|Any CPU + {F5BFD2E9-5399-4D16-901A-554E1DF2D6E1}.Release|x64.ActiveCfg = Release|Any CPU + {F5BFD2E9-5399-4D16-901A-554E1DF2D6E1}.Release|x64.Build.0 = Release|Any CPU + {F5BFD2E9-5399-4D16-901A-554E1DF2D6E1}.Release|x86.ActiveCfg = Release|Any CPU + {F5BFD2E9-5399-4D16-901A-554E1DF2D6E1}.Release|x86.Build.0 = Release|Any CPU + {F5BFD2E9-5399-4D16-901A-554E1DF2D6E1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {F5BFD2E9-5399-4D16-901A-554E1DF2D6E1}.Checked|arm.ActiveCfg = Debug|Any CPU + {F5BFD2E9-5399-4D16-901A-554E1DF2D6E1}.Checked|arm64.ActiveCfg = Debug|Any CPU + {F5BFD2E9-5399-4D16-901A-554E1DF2D6E1}.Checked|x64.ActiveCfg = Debug|Any CPU + {F5BFD2E9-5399-4D16-901A-554E1DF2D6E1}.Checked|x86.ActiveCfg = Debug|Any CPU {362A9152-D46A-4DD0-8EB7-D36FC95D1AF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {362A9152-D46A-4DD0-8EB7-D36FC95D1AF1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {362A9152-D46A-4DD0-8EB7-D36FC95D1AF1}.Debug|arm.ActiveCfg = Debug|Any CPU + {362A9152-D46A-4DD0-8EB7-D36FC95D1AF1}.Debug|arm64.ActiveCfg = Debug|Any CPU + {362A9152-D46A-4DD0-8EB7-D36FC95D1AF1}.Debug|x64.ActiveCfg = Debug|Any CPU + {362A9152-D46A-4DD0-8EB7-D36FC95D1AF1}.Debug|x64.Build.0 = Debug|Any CPU + {362A9152-D46A-4DD0-8EB7-D36FC95D1AF1}.Debug|x86.ActiveCfg = Debug|Any CPU + {362A9152-D46A-4DD0-8EB7-D36FC95D1AF1}.Debug|x86.Build.0 = Debug|Any CPU {362A9152-D46A-4DD0-8EB7-D36FC95D1AF1}.Release|Any CPU.ActiveCfg = Release|Any CPU {362A9152-D46A-4DD0-8EB7-D36FC95D1AF1}.Release|Any CPU.Build.0 = Release|Any CPU - {F7FF9B2F-DDFA-4DA9-B765-45C898AF747B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F7FF9B2F-DDFA-4DA9-B765-45C898AF747B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F7FF9B2F-DDFA-4DA9-B765-45C898AF747B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F7FF9B2F-DDFA-4DA9-B765-45C898AF747B}.Release|Any CPU.Build.0 = Release|Any CPU + {362A9152-D46A-4DD0-8EB7-D36FC95D1AF1}.Release|arm.ActiveCfg = Release|Any CPU + {362A9152-D46A-4DD0-8EB7-D36FC95D1AF1}.Release|arm64.ActiveCfg = Release|Any CPU + {362A9152-D46A-4DD0-8EB7-D36FC95D1AF1}.Release|x64.ActiveCfg = Release|Any CPU + {362A9152-D46A-4DD0-8EB7-D36FC95D1AF1}.Release|x64.Build.0 = Release|Any CPU + {362A9152-D46A-4DD0-8EB7-D36FC95D1AF1}.Release|x86.ActiveCfg = Release|Any CPU + {362A9152-D46A-4DD0-8EB7-D36FC95D1AF1}.Release|x86.Build.0 = Release|Any CPU + {362A9152-D46A-4DD0-8EB7-D36FC95D1AF1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {362A9152-D46A-4DD0-8EB7-D36FC95D1AF1}.Checked|arm.ActiveCfg = Debug|Any CPU + {362A9152-D46A-4DD0-8EB7-D36FC95D1AF1}.Checked|arm64.ActiveCfg = Debug|Any CPU + {362A9152-D46A-4DD0-8EB7-D36FC95D1AF1}.Checked|x64.ActiveCfg = Debug|Any CPU + {362A9152-D46A-4DD0-8EB7-D36FC95D1AF1}.Checked|x86.ActiveCfg = Debug|Any CPU + {B749BF37-D346-475F-8C22-13C67A7DA2B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B749BF37-D346-475F-8C22-13C67A7DA2B6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B749BF37-D346-475F-8C22-13C67A7DA2B6}.Debug|arm.ActiveCfg = Debug|Any CPU + {B749BF37-D346-475F-8C22-13C67A7DA2B6}.Debug|arm64.ActiveCfg = Debug|Any CPU + {B749BF37-D346-475F-8C22-13C67A7DA2B6}.Debug|x64.ActiveCfg = Debug|Any CPU + {B749BF37-D346-475F-8C22-13C67A7DA2B6}.Debug|x64.Build.0 = Debug|Any CPU + {B749BF37-D346-475F-8C22-13C67A7DA2B6}.Debug|x86.ActiveCfg = Debug|Any CPU + {B749BF37-D346-475F-8C22-13C67A7DA2B6}.Debug|x86.Build.0 = Debug|Any CPU + {B749BF37-D346-475F-8C22-13C67A7DA2B6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B749BF37-D346-475F-8C22-13C67A7DA2B6}.Release|Any CPU.Build.0 = Release|Any CPU + {B749BF37-D346-475F-8C22-13C67A7DA2B6}.Release|arm.ActiveCfg = Release|Any CPU + {B749BF37-D346-475F-8C22-13C67A7DA2B6}.Release|arm64.ActiveCfg = Release|Any CPU + {B749BF37-D346-475F-8C22-13C67A7DA2B6}.Release|x64.ActiveCfg = Release|Any CPU + {B749BF37-D346-475F-8C22-13C67A7DA2B6}.Release|x64.Build.0 = Release|Any CPU + {B749BF37-D346-475F-8C22-13C67A7DA2B6}.Release|x86.ActiveCfg = Release|Any CPU + {B749BF37-D346-475F-8C22-13C67A7DA2B6}.Release|x86.Build.0 = Release|Any CPU + {B749BF37-D346-475F-8C22-13C67A7DA2B6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {B749BF37-D346-475F-8C22-13C67A7DA2B6}.Checked|arm.ActiveCfg = Debug|Any CPU + {B749BF37-D346-475F-8C22-13C67A7DA2B6}.Checked|arm64.ActiveCfg = Debug|Any CPU + {B749BF37-D346-475F-8C22-13C67A7DA2B6}.Checked|x64.ActiveCfg = Debug|Any CPU + {B749BF37-D346-475F-8C22-13C67A7DA2B6}.Checked|x86.ActiveCfg = Debug|Any CPU + {67355722-4CF4-40BD-8569-04BA649A0B57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {67355722-4CF4-40BD-8569-04BA649A0B57}.Debug|Any CPU.Build.0 = Debug|Any CPU + {67355722-4CF4-40BD-8569-04BA649A0B57}.Debug|arm.ActiveCfg = Debug|Any CPU + {67355722-4CF4-40BD-8569-04BA649A0B57}.Debug|arm64.ActiveCfg = Debug|Any CPU + {67355722-4CF4-40BD-8569-04BA649A0B57}.Debug|x64.ActiveCfg = Debug|Any CPU + {67355722-4CF4-40BD-8569-04BA649A0B57}.Debug|x64.Build.0 = Debug|Any CPU + {67355722-4CF4-40BD-8569-04BA649A0B57}.Debug|x86.ActiveCfg = Debug|Any CPU + {67355722-4CF4-40BD-8569-04BA649A0B57}.Debug|x86.Build.0 = Debug|Any CPU + {67355722-4CF4-40BD-8569-04BA649A0B57}.Release|Any CPU.ActiveCfg = Release|Any CPU + {67355722-4CF4-40BD-8569-04BA649A0B57}.Release|Any CPU.Build.0 = Release|Any CPU + {67355722-4CF4-40BD-8569-04BA649A0B57}.Release|arm.ActiveCfg = Release|Any CPU + {67355722-4CF4-40BD-8569-04BA649A0B57}.Release|arm64.ActiveCfg = Release|Any CPU + {67355722-4CF4-40BD-8569-04BA649A0B57}.Release|x64.ActiveCfg = Release|Any CPU + {67355722-4CF4-40BD-8569-04BA649A0B57}.Release|x64.Build.0 = Release|Any CPU + {67355722-4CF4-40BD-8569-04BA649A0B57}.Release|x86.ActiveCfg = Release|Any CPU + {67355722-4CF4-40BD-8569-04BA649A0B57}.Release|x86.Build.0 = Release|Any CPU + {67355722-4CF4-40BD-8569-04BA649A0B57}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {67355722-4CF4-40BD-8569-04BA649A0B57}.Checked|arm.ActiveCfg = Debug|Any CPU + {67355722-4CF4-40BD-8569-04BA649A0B57}.Checked|arm64.ActiveCfg = Debug|Any CPU + {67355722-4CF4-40BD-8569-04BA649A0B57}.Checked|x64.ActiveCfg = Debug|Any CPU + {67355722-4CF4-40BD-8569-04BA649A0B57}.Checked|x86.ActiveCfg = Debug|Any CPU + {B90DD406-44B4-47A9-8BB7-75452A95751F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B90DD406-44B4-47A9-8BB7-75452A95751F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B90DD406-44B4-47A9-8BB7-75452A95751F}.Debug|arm.ActiveCfg = Debug|Any CPU + {B90DD406-44B4-47A9-8BB7-75452A95751F}.Debug|arm64.ActiveCfg = Debug|Any CPU + {B90DD406-44B4-47A9-8BB7-75452A95751F}.Debug|x64.ActiveCfg = Debug|Any CPU + {B90DD406-44B4-47A9-8BB7-75452A95751F}.Debug|x64.Build.0 = Debug|Any CPU + {B90DD406-44B4-47A9-8BB7-75452A95751F}.Debug|x86.ActiveCfg = Debug|Any CPU + {B90DD406-44B4-47A9-8BB7-75452A95751F}.Debug|x86.Build.0 = Debug|Any CPU + {B90DD406-44B4-47A9-8BB7-75452A95751F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B90DD406-44B4-47A9-8BB7-75452A95751F}.Release|Any CPU.Build.0 = Release|Any CPU + {B90DD406-44B4-47A9-8BB7-75452A95751F}.Release|arm.ActiveCfg = Release|Any CPU + {B90DD406-44B4-47A9-8BB7-75452A95751F}.Release|arm64.ActiveCfg = Release|Any CPU + {B90DD406-44B4-47A9-8BB7-75452A95751F}.Release|x64.ActiveCfg = Release|Any CPU + {B90DD406-44B4-47A9-8BB7-75452A95751F}.Release|x64.Build.0 = Release|Any CPU + {B90DD406-44B4-47A9-8BB7-75452A95751F}.Release|x86.ActiveCfg = Release|Any CPU + {B90DD406-44B4-47A9-8BB7-75452A95751F}.Release|x86.Build.0 = Release|Any CPU + {B90DD406-44B4-47A9-8BB7-75452A95751F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {B90DD406-44B4-47A9-8BB7-75452A95751F}.Checked|arm.ActiveCfg = Debug|Any CPU + {B90DD406-44B4-47A9-8BB7-75452A95751F}.Checked|arm64.ActiveCfg = Debug|Any CPU + {B90DD406-44B4-47A9-8BB7-75452A95751F}.Checked|x64.ActiveCfg = Debug|Any CPU + {B90DD406-44B4-47A9-8BB7-75452A95751F}.Checked|x86.ActiveCfg = Debug|Any CPU {A2ED3B1E-5AAC-47AF-BDCE-B59226B65E63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A2ED3B1E-5AAC-47AF-BDCE-B59226B65E63}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A2ED3B1E-5AAC-47AF-BDCE-B59226B65E63}.Debug|arm.ActiveCfg = Debug|Any CPU + {A2ED3B1E-5AAC-47AF-BDCE-B59226B65E63}.Debug|arm64.ActiveCfg = Debug|Any CPU + {A2ED3B1E-5AAC-47AF-BDCE-B59226B65E63}.Debug|x64.ActiveCfg = Debug|Any CPU + {A2ED3B1E-5AAC-47AF-BDCE-B59226B65E63}.Debug|x64.Build.0 = Debug|Any CPU + {A2ED3B1E-5AAC-47AF-BDCE-B59226B65E63}.Debug|x86.ActiveCfg = Debug|Any CPU + {A2ED3B1E-5AAC-47AF-BDCE-B59226B65E63}.Debug|x86.Build.0 = Debug|Any CPU {A2ED3B1E-5AAC-47AF-BDCE-B59226B65E63}.Release|Any CPU.ActiveCfg = Release|Any CPU {A2ED3B1E-5AAC-47AF-BDCE-B59226B65E63}.Release|Any CPU.Build.0 = Release|Any CPU + {A2ED3B1E-5AAC-47AF-BDCE-B59226B65E63}.Release|arm.ActiveCfg = Release|Any CPU + {A2ED3B1E-5AAC-47AF-BDCE-B59226B65E63}.Release|arm64.ActiveCfg = Release|Any CPU + {A2ED3B1E-5AAC-47AF-BDCE-B59226B65E63}.Release|x64.ActiveCfg = Release|Any CPU + {A2ED3B1E-5AAC-47AF-BDCE-B59226B65E63}.Release|x64.Build.0 = Release|Any CPU + {A2ED3B1E-5AAC-47AF-BDCE-B59226B65E63}.Release|x86.ActiveCfg = Release|Any CPU + {A2ED3B1E-5AAC-47AF-BDCE-B59226B65E63}.Release|x86.Build.0 = Release|Any CPU + {A2ED3B1E-5AAC-47AF-BDCE-B59226B65E63}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {A2ED3B1E-5AAC-47AF-BDCE-B59226B65E63}.Checked|arm.ActiveCfg = Debug|Any CPU + {A2ED3B1E-5AAC-47AF-BDCE-B59226B65E63}.Checked|arm64.ActiveCfg = Debug|Any CPU + {A2ED3B1E-5AAC-47AF-BDCE-B59226B65E63}.Checked|x64.ActiveCfg = Debug|Any CPU + {A2ED3B1E-5AAC-47AF-BDCE-B59226B65E63}.Checked|x86.ActiveCfg = Debug|Any CPU {C273C3A4-5651-489C-9FA4-2DCAAA7A7D97}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C273C3A4-5651-489C-9FA4-2DCAAA7A7D97}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C273C3A4-5651-489C-9FA4-2DCAAA7A7D97}.Debug|arm.ActiveCfg = Debug|Any CPU + {C273C3A4-5651-489C-9FA4-2DCAAA7A7D97}.Debug|arm64.ActiveCfg = Debug|Any CPU + {C273C3A4-5651-489C-9FA4-2DCAAA7A7D97}.Debug|x64.ActiveCfg = Debug|Any CPU + {C273C3A4-5651-489C-9FA4-2DCAAA7A7D97}.Debug|x64.Build.0 = Debug|Any CPU + {C273C3A4-5651-489C-9FA4-2DCAAA7A7D97}.Debug|x86.ActiveCfg = Debug|Any CPU + {C273C3A4-5651-489C-9FA4-2DCAAA7A7D97}.Debug|x86.Build.0 = Debug|Any CPU {C273C3A4-5651-489C-9FA4-2DCAAA7A7D97}.Release|Any CPU.ActiveCfg = Release|Any CPU {C273C3A4-5651-489C-9FA4-2DCAAA7A7D97}.Release|Any CPU.Build.0 = Release|Any CPU + {C273C3A4-5651-489C-9FA4-2DCAAA7A7D97}.Release|arm.ActiveCfg = Release|Any CPU + {C273C3A4-5651-489C-9FA4-2DCAAA7A7D97}.Release|arm64.ActiveCfg = Release|Any CPU + {C273C3A4-5651-489C-9FA4-2DCAAA7A7D97}.Release|x64.ActiveCfg = Release|Any CPU + {C273C3A4-5651-489C-9FA4-2DCAAA7A7D97}.Release|x64.Build.0 = Release|Any CPU + {C273C3A4-5651-489C-9FA4-2DCAAA7A7D97}.Release|x86.ActiveCfg = Release|Any CPU + {C273C3A4-5651-489C-9FA4-2DCAAA7A7D97}.Release|x86.Build.0 = Release|Any CPU + {C273C3A4-5651-489C-9FA4-2DCAAA7A7D97}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {C273C3A4-5651-489C-9FA4-2DCAAA7A7D97}.Checked|arm.ActiveCfg = Debug|Any CPU + {C273C3A4-5651-489C-9FA4-2DCAAA7A7D97}.Checked|arm64.ActiveCfg = Debug|Any CPU + {C273C3A4-5651-489C-9FA4-2DCAAA7A7D97}.Checked|x64.ActiveCfg = Debug|Any CPU + {C273C3A4-5651-489C-9FA4-2DCAAA7A7D97}.Checked|x86.ActiveCfg = Debug|Any CPU + {40386176-1E3E-41DE-AC3A-9910922BEDFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {40386176-1E3E-41DE-AC3A-9910922BEDFE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {40386176-1E3E-41DE-AC3A-9910922BEDFE}.Debug|arm.ActiveCfg = Debug|Any CPU + {40386176-1E3E-41DE-AC3A-9910922BEDFE}.Debug|arm64.ActiveCfg = Debug|Any CPU + {40386176-1E3E-41DE-AC3A-9910922BEDFE}.Debug|x64.ActiveCfg = Debug|Any CPU + {40386176-1E3E-41DE-AC3A-9910922BEDFE}.Debug|x64.Build.0 = Debug|Any CPU + {40386176-1E3E-41DE-AC3A-9910922BEDFE}.Debug|x86.ActiveCfg = Debug|Any CPU + {40386176-1E3E-41DE-AC3A-9910922BEDFE}.Debug|x86.Build.0 = Debug|Any CPU + {40386176-1E3E-41DE-AC3A-9910922BEDFE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {40386176-1E3E-41DE-AC3A-9910922BEDFE}.Release|Any CPU.Build.0 = Release|Any CPU + {40386176-1E3E-41DE-AC3A-9910922BEDFE}.Release|arm.ActiveCfg = Release|Any CPU + {40386176-1E3E-41DE-AC3A-9910922BEDFE}.Release|arm64.ActiveCfg = Release|Any CPU + {40386176-1E3E-41DE-AC3A-9910922BEDFE}.Release|x64.ActiveCfg = Release|Any CPU + {40386176-1E3E-41DE-AC3A-9910922BEDFE}.Release|x64.Build.0 = Release|Any CPU + {40386176-1E3E-41DE-AC3A-9910922BEDFE}.Release|x86.ActiveCfg = Release|Any CPU + {40386176-1E3E-41DE-AC3A-9910922BEDFE}.Release|x86.Build.0 = Release|Any CPU + {40386176-1E3E-41DE-AC3A-9910922BEDFE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {40386176-1E3E-41DE-AC3A-9910922BEDFE}.Checked|arm.ActiveCfg = Debug|Any CPU + {40386176-1E3E-41DE-AC3A-9910922BEDFE}.Checked|arm64.ActiveCfg = Debug|Any CPU + {40386176-1E3E-41DE-AC3A-9910922BEDFE}.Checked|x64.ActiveCfg = Debug|Any CPU + {40386176-1E3E-41DE-AC3A-9910922BEDFE}.Checked|x86.ActiveCfg = Debug|Any CPU + {BF351671-8D05-42F5-8218-7676E4356440}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BF351671-8D05-42F5-8218-7676E4356440}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BF351671-8D05-42F5-8218-7676E4356440}.Debug|arm.ActiveCfg = Debug|Any CPU + {BF351671-8D05-42F5-8218-7676E4356440}.Debug|arm64.ActiveCfg = Debug|Any CPU + {BF351671-8D05-42F5-8218-7676E4356440}.Debug|x64.ActiveCfg = Debug|Any CPU + {BF351671-8D05-42F5-8218-7676E4356440}.Debug|x64.Build.0 = Debug|Any CPU + {BF351671-8D05-42F5-8218-7676E4356440}.Debug|x86.ActiveCfg = Debug|Any CPU + {BF351671-8D05-42F5-8218-7676E4356440}.Debug|x86.Build.0 = Debug|Any CPU + {BF351671-8D05-42F5-8218-7676E4356440}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BF351671-8D05-42F5-8218-7676E4356440}.Release|Any CPU.Build.0 = Release|Any CPU + {BF351671-8D05-42F5-8218-7676E4356440}.Release|arm.ActiveCfg = Release|Any CPU + {BF351671-8D05-42F5-8218-7676E4356440}.Release|arm64.ActiveCfg = Release|Any CPU + {BF351671-8D05-42F5-8218-7676E4356440}.Release|x64.ActiveCfg = Release|Any CPU + {BF351671-8D05-42F5-8218-7676E4356440}.Release|x64.Build.0 = Release|Any CPU + {BF351671-8D05-42F5-8218-7676E4356440}.Release|x86.ActiveCfg = Release|Any CPU + {BF351671-8D05-42F5-8218-7676E4356440}.Release|x86.Build.0 = Release|Any CPU + {BF351671-8D05-42F5-8218-7676E4356440}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {BF351671-8D05-42F5-8218-7676E4356440}.Checked|arm.ActiveCfg = Debug|Any CPU + {BF351671-8D05-42F5-8218-7676E4356440}.Checked|arm64.ActiveCfg = Debug|Any CPU + {BF351671-8D05-42F5-8218-7676E4356440}.Checked|x64.ActiveCfg = Debug|Any CPU + {BF351671-8D05-42F5-8218-7676E4356440}.Checked|x86.ActiveCfg = Debug|Any CPU {EF8D1526-9463-401B-9EAE-D4B98C86E046}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EF8D1526-9463-401B-9EAE-D4B98C86E046}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EF8D1526-9463-401B-9EAE-D4B98C86E046}.Debug|arm.ActiveCfg = Debug|Any CPU + {EF8D1526-9463-401B-9EAE-D4B98C86E046}.Debug|arm64.ActiveCfg = Debug|Any CPU + {EF8D1526-9463-401B-9EAE-D4B98C86E046}.Debug|x64.ActiveCfg = Debug|Any CPU + {EF8D1526-9463-401B-9EAE-D4B98C86E046}.Debug|x64.Build.0 = Debug|Any CPU + {EF8D1526-9463-401B-9EAE-D4B98C86E046}.Debug|x86.ActiveCfg = Debug|Any CPU + {EF8D1526-9463-401B-9EAE-D4B98C86E046}.Debug|x86.Build.0 = Debug|Any CPU {EF8D1526-9463-401B-9EAE-D4B98C86E046}.Release|Any CPU.ActiveCfg = Release|Any CPU {EF8D1526-9463-401B-9EAE-D4B98C86E046}.Release|Any CPU.Build.0 = Release|Any CPU + {EF8D1526-9463-401B-9EAE-D4B98C86E046}.Release|arm.ActiveCfg = Release|Any CPU + {EF8D1526-9463-401B-9EAE-D4B98C86E046}.Release|arm64.ActiveCfg = Release|Any CPU + {EF8D1526-9463-401B-9EAE-D4B98C86E046}.Release|x64.ActiveCfg = Release|Any CPU + {EF8D1526-9463-401B-9EAE-D4B98C86E046}.Release|x64.Build.0 = Release|Any CPU + {EF8D1526-9463-401B-9EAE-D4B98C86E046}.Release|x86.ActiveCfg = Release|Any CPU + {EF8D1526-9463-401B-9EAE-D4B98C86E046}.Release|x86.Build.0 = Release|Any CPU + {EF8D1526-9463-401B-9EAE-D4B98C86E046}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {EF8D1526-9463-401B-9EAE-D4B98C86E046}.Checked|arm.ActiveCfg = Debug|Any CPU + {EF8D1526-9463-401B-9EAE-D4B98C86E046}.Checked|arm64.ActiveCfg = Debug|Any CPU + {EF8D1526-9463-401B-9EAE-D4B98C86E046}.Checked|x64.ActiveCfg = Debug|Any CPU + {EF8D1526-9463-401B-9EAE-D4B98C86E046}.Checked|x86.ActiveCfg = Debug|Any CPU {15628477-9D25-41FA-81B0-59D43D1363F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {15628477-9D25-41FA-81B0-59D43D1363F4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {15628477-9D25-41FA-81B0-59D43D1363F4}.Debug|arm.ActiveCfg = Debug|Any CPU + {15628477-9D25-41FA-81B0-59D43D1363F4}.Debug|arm64.ActiveCfg = Debug|Any CPU + {15628477-9D25-41FA-81B0-59D43D1363F4}.Debug|x64.ActiveCfg = Debug|Any CPU + {15628477-9D25-41FA-81B0-59D43D1363F4}.Debug|x64.Build.0 = Debug|Any CPU + {15628477-9D25-41FA-81B0-59D43D1363F4}.Debug|x86.ActiveCfg = Debug|Any CPU + {15628477-9D25-41FA-81B0-59D43D1363F4}.Debug|x86.Build.0 = Debug|Any CPU {15628477-9D25-41FA-81B0-59D43D1363F4}.Release|Any CPU.ActiveCfg = Release|Any CPU {15628477-9D25-41FA-81B0-59D43D1363F4}.Release|Any CPU.Build.0 = Release|Any CPU + {15628477-9D25-41FA-81B0-59D43D1363F4}.Release|arm.ActiveCfg = Release|Any CPU + {15628477-9D25-41FA-81B0-59D43D1363F4}.Release|arm64.ActiveCfg = Release|Any CPU + {15628477-9D25-41FA-81B0-59D43D1363F4}.Release|x64.ActiveCfg = Release|Any CPU + {15628477-9D25-41FA-81B0-59D43D1363F4}.Release|x64.Build.0 = Release|Any CPU + {15628477-9D25-41FA-81B0-59D43D1363F4}.Release|x86.ActiveCfg = Release|Any CPU + {15628477-9D25-41FA-81B0-59D43D1363F4}.Release|x86.Build.0 = Release|Any CPU + {15628477-9D25-41FA-81B0-59D43D1363F4}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {15628477-9D25-41FA-81B0-59D43D1363F4}.Checked|arm.ActiveCfg = Debug|Any CPU + {15628477-9D25-41FA-81B0-59D43D1363F4}.Checked|arm64.ActiveCfg = Debug|Any CPU + {15628477-9D25-41FA-81B0-59D43D1363F4}.Checked|x64.ActiveCfg = Debug|Any CPU + {15628477-9D25-41FA-81B0-59D43D1363F4}.Checked|x86.ActiveCfg = Debug|Any CPU {C73C11A5-863A-440D-B568-00CA5E7C9DA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C73C11A5-863A-440D-B568-00CA5E7C9DA0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C73C11A5-863A-440D-B568-00CA5E7C9DA0}.Debug|arm.ActiveCfg = Debug|Any CPU + {C73C11A5-863A-440D-B568-00CA5E7C9DA0}.Debug|arm64.ActiveCfg = Debug|Any CPU + {C73C11A5-863A-440D-B568-00CA5E7C9DA0}.Debug|x64.ActiveCfg = Debug|Any CPU + {C73C11A5-863A-440D-B568-00CA5E7C9DA0}.Debug|x64.Build.0 = Debug|Any CPU + {C73C11A5-863A-440D-B568-00CA5E7C9DA0}.Debug|x86.ActiveCfg = Debug|Any CPU + {C73C11A5-863A-440D-B568-00CA5E7C9DA0}.Debug|x86.Build.0 = Debug|Any CPU {C73C11A5-863A-440D-B568-00CA5E7C9DA0}.Release|Any CPU.ActiveCfg = Release|Any CPU {C73C11A5-863A-440D-B568-00CA5E7C9DA0}.Release|Any CPU.Build.0 = Release|Any CPU + {C73C11A5-863A-440D-B568-00CA5E7C9DA0}.Release|arm.ActiveCfg = Release|Any CPU + {C73C11A5-863A-440D-B568-00CA5E7C9DA0}.Release|arm64.ActiveCfg = Release|Any CPU + {C73C11A5-863A-440D-B568-00CA5E7C9DA0}.Release|x64.ActiveCfg = Release|Any CPU + {C73C11A5-863A-440D-B568-00CA5E7C9DA0}.Release|x64.Build.0 = Release|Any CPU + {C73C11A5-863A-440D-B568-00CA5E7C9DA0}.Release|x86.ActiveCfg = Release|Any CPU + {C73C11A5-863A-440D-B568-00CA5E7C9DA0}.Release|x86.Build.0 = Release|Any CPU + {C73C11A5-863A-440D-B568-00CA5E7C9DA0}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {C73C11A5-863A-440D-B568-00CA5E7C9DA0}.Checked|arm.ActiveCfg = Debug|Any CPU + {C73C11A5-863A-440D-B568-00CA5E7C9DA0}.Checked|arm64.ActiveCfg = Debug|Any CPU + {C73C11A5-863A-440D-B568-00CA5E7C9DA0}.Checked|x64.ActiveCfg = Debug|Any CPU + {C73C11A5-863A-440D-B568-00CA5E7C9DA0}.Checked|x86.ActiveCfg = Debug|Any CPU {877B4329-854A-412F-B631-6315D77F9C8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {877B4329-854A-412F-B631-6315D77F9C8A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {877B4329-854A-412F-B631-6315D77F9C8A}.Debug|arm.ActiveCfg = Debug|Any CPU + {877B4329-854A-412F-B631-6315D77F9C8A}.Debug|arm64.ActiveCfg = Debug|Any CPU + {877B4329-854A-412F-B631-6315D77F9C8A}.Debug|x64.ActiveCfg = Debug|Any CPU + {877B4329-854A-412F-B631-6315D77F9C8A}.Debug|x64.Build.0 = Debug|Any CPU + {877B4329-854A-412F-B631-6315D77F9C8A}.Debug|x86.ActiveCfg = Debug|Any CPU + {877B4329-854A-412F-B631-6315D77F9C8A}.Debug|x86.Build.0 = Debug|Any CPU {877B4329-854A-412F-B631-6315D77F9C8A}.Release|Any CPU.ActiveCfg = Release|Any CPU {877B4329-854A-412F-B631-6315D77F9C8A}.Release|Any CPU.Build.0 = Release|Any CPU - {7AD9D681-F853-47F4-8C1B-A0D1E0440D3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7AD9D681-F853-47F4-8C1B-A0D1E0440D3B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7AD9D681-F853-47F4-8C1B-A0D1E0440D3B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7AD9D681-F853-47F4-8C1B-A0D1E0440D3B}.Release|Any CPU.Build.0 = Release|Any CPU + {877B4329-854A-412F-B631-6315D77F9C8A}.Release|arm.ActiveCfg = Release|Any CPU + {877B4329-854A-412F-B631-6315D77F9C8A}.Release|arm64.ActiveCfg = Release|Any CPU + {877B4329-854A-412F-B631-6315D77F9C8A}.Release|x64.ActiveCfg = Release|Any CPU + {877B4329-854A-412F-B631-6315D77F9C8A}.Release|x64.Build.0 = Release|Any CPU + {877B4329-854A-412F-B631-6315D77F9C8A}.Release|x86.ActiveCfg = Release|Any CPU + {877B4329-854A-412F-B631-6315D77F9C8A}.Release|x86.Build.0 = Release|Any CPU + {877B4329-854A-412F-B631-6315D77F9C8A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {877B4329-854A-412F-B631-6315D77F9C8A}.Checked|arm.ActiveCfg = Debug|Any CPU + {877B4329-854A-412F-B631-6315D77F9C8A}.Checked|arm64.ActiveCfg = Debug|Any CPU + {877B4329-854A-412F-B631-6315D77F9C8A}.Checked|x64.ActiveCfg = Debug|Any CPU + {877B4329-854A-412F-B631-6315D77F9C8A}.Checked|x86.ActiveCfg = Debug|Any CPU {D7C9E59C-0B7B-491E-9FC5-63A29290EE06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D7C9E59C-0B7B-491E-9FC5-63A29290EE06}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D7C9E59C-0B7B-491E-9FC5-63A29290EE06}.Debug|arm.ActiveCfg = Debug|Any CPU + {D7C9E59C-0B7B-491E-9FC5-63A29290EE06}.Debug|arm64.ActiveCfg = Debug|Any CPU + {D7C9E59C-0B7B-491E-9FC5-63A29290EE06}.Debug|x64.ActiveCfg = Debug|Any CPU + {D7C9E59C-0B7B-491E-9FC5-63A29290EE06}.Debug|x64.Build.0 = Debug|Any CPU + {D7C9E59C-0B7B-491E-9FC5-63A29290EE06}.Debug|x86.ActiveCfg = Debug|Any CPU + {D7C9E59C-0B7B-491E-9FC5-63A29290EE06}.Debug|x86.Build.0 = Debug|Any CPU {D7C9E59C-0B7B-491E-9FC5-63A29290EE06}.Release|Any CPU.ActiveCfg = Release|Any CPU {D7C9E59C-0B7B-491E-9FC5-63A29290EE06}.Release|Any CPU.Build.0 = Release|Any CPU + {D7C9E59C-0B7B-491E-9FC5-63A29290EE06}.Release|arm.ActiveCfg = Release|Any CPU + {D7C9E59C-0B7B-491E-9FC5-63A29290EE06}.Release|arm64.ActiveCfg = Release|Any CPU + {D7C9E59C-0B7B-491E-9FC5-63A29290EE06}.Release|x64.ActiveCfg = Release|Any CPU + {D7C9E59C-0B7B-491E-9FC5-63A29290EE06}.Release|x64.Build.0 = Release|Any CPU + {D7C9E59C-0B7B-491E-9FC5-63A29290EE06}.Release|x86.ActiveCfg = Release|Any CPU + {D7C9E59C-0B7B-491E-9FC5-63A29290EE06}.Release|x86.Build.0 = Release|Any CPU + {D7C9E59C-0B7B-491E-9FC5-63A29290EE06}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {D7C9E59C-0B7B-491E-9FC5-63A29290EE06}.Checked|arm.ActiveCfg = Debug|Any CPU + {D7C9E59C-0B7B-491E-9FC5-63A29290EE06}.Checked|arm64.ActiveCfg = Debug|Any CPU + {D7C9E59C-0B7B-491E-9FC5-63A29290EE06}.Checked|x64.ActiveCfg = Debug|Any CPU + {D7C9E59C-0B7B-491E-9FC5-63A29290EE06}.Checked|x86.ActiveCfg = Debug|Any CPU {A3AC9584-763B-4686-B6D8-49140FC62EC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A3AC9584-763B-4686-B6D8-49140FC62EC4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A3AC9584-763B-4686-B6D8-49140FC62EC4}.Debug|arm.ActiveCfg = Debug|Any CPU + {A3AC9584-763B-4686-B6D8-49140FC62EC4}.Debug|arm64.ActiveCfg = Debug|Any CPU + {A3AC9584-763B-4686-B6D8-49140FC62EC4}.Debug|x64.ActiveCfg = Debug|Any CPU + {A3AC9584-763B-4686-B6D8-49140FC62EC4}.Debug|x64.Build.0 = Debug|Any CPU + {A3AC9584-763B-4686-B6D8-49140FC62EC4}.Debug|x86.ActiveCfg = Debug|Any CPU + {A3AC9584-763B-4686-B6D8-49140FC62EC4}.Debug|x86.Build.0 = Debug|Any CPU {A3AC9584-763B-4686-B6D8-49140FC62EC4}.Release|Any CPU.ActiveCfg = Release|Any CPU {A3AC9584-763B-4686-B6D8-49140FC62EC4}.Release|Any CPU.Build.0 = Release|Any CPU + {A3AC9584-763B-4686-B6D8-49140FC62EC4}.Release|arm.ActiveCfg = Release|Any CPU + {A3AC9584-763B-4686-B6D8-49140FC62EC4}.Release|arm64.ActiveCfg = Release|Any CPU + {A3AC9584-763B-4686-B6D8-49140FC62EC4}.Release|x64.ActiveCfg = Release|Any CPU + {A3AC9584-763B-4686-B6D8-49140FC62EC4}.Release|x64.Build.0 = Release|Any CPU + {A3AC9584-763B-4686-B6D8-49140FC62EC4}.Release|x86.ActiveCfg = Release|Any CPU + {A3AC9584-763B-4686-B6D8-49140FC62EC4}.Release|x86.Build.0 = Release|Any CPU + {A3AC9584-763B-4686-B6D8-49140FC62EC4}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {A3AC9584-763B-4686-B6D8-49140FC62EC4}.Checked|arm.ActiveCfg = Debug|Any CPU + {A3AC9584-763B-4686-B6D8-49140FC62EC4}.Checked|arm64.ActiveCfg = Debug|Any CPU + {A3AC9584-763B-4686-B6D8-49140FC62EC4}.Checked|x64.ActiveCfg = Debug|Any CPU + {A3AC9584-763B-4686-B6D8-49140FC62EC4}.Checked|x86.ActiveCfg = Debug|Any CPU + {66C42AC6-739D-45C5-9E37-06B43F285AA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {66C42AC6-739D-45C5-9E37-06B43F285AA7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {66C42AC6-739D-45C5-9E37-06B43F285AA7}.Debug|arm.ActiveCfg = Debug|Any CPU + {66C42AC6-739D-45C5-9E37-06B43F285AA7}.Debug|arm64.ActiveCfg = Debug|Any CPU + {66C42AC6-739D-45C5-9E37-06B43F285AA7}.Debug|x64.ActiveCfg = Debug|Any CPU + {66C42AC6-739D-45C5-9E37-06B43F285AA7}.Debug|x64.Build.0 = Debug|Any CPU + {66C42AC6-739D-45C5-9E37-06B43F285AA7}.Debug|x86.ActiveCfg = Debug|Any CPU + {66C42AC6-739D-45C5-9E37-06B43F285AA7}.Debug|x86.Build.0 = Debug|Any CPU + {66C42AC6-739D-45C5-9E37-06B43F285AA7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {66C42AC6-739D-45C5-9E37-06B43F285AA7}.Release|Any CPU.Build.0 = Release|Any CPU + {66C42AC6-739D-45C5-9E37-06B43F285AA7}.Release|arm.ActiveCfg = Release|Any CPU + {66C42AC6-739D-45C5-9E37-06B43F285AA7}.Release|arm64.ActiveCfg = Release|Any CPU + {66C42AC6-739D-45C5-9E37-06B43F285AA7}.Release|x64.ActiveCfg = Release|Any CPU + {66C42AC6-739D-45C5-9E37-06B43F285AA7}.Release|x64.Build.0 = Release|Any CPU + {66C42AC6-739D-45C5-9E37-06B43F285AA7}.Release|x86.ActiveCfg = Release|Any CPU + {66C42AC6-739D-45C5-9E37-06B43F285AA7}.Release|x86.Build.0 = Release|Any CPU + {66C42AC6-739D-45C5-9E37-06B43F285AA7}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {66C42AC6-739D-45C5-9E37-06B43F285AA7}.Checked|arm.ActiveCfg = Debug|Any CPU + {66C42AC6-739D-45C5-9E37-06B43F285AA7}.Checked|arm64.ActiveCfg = Debug|Any CPU + {66C42AC6-739D-45C5-9E37-06B43F285AA7}.Checked|x64.ActiveCfg = Debug|Any CPU + {66C42AC6-739D-45C5-9E37-06B43F285AA7}.Checked|x86.ActiveCfg = Debug|Any CPU + {F381E5FD-EB66-431A-857F-F66336276DB5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F381E5FD-EB66-431A-857F-F66336276DB5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F381E5FD-EB66-431A-857F-F66336276DB5}.Debug|arm.ActiveCfg = Debug|Any CPU + {F381E5FD-EB66-431A-857F-F66336276DB5}.Debug|arm64.ActiveCfg = Debug|Any CPU + {F381E5FD-EB66-431A-857F-F66336276DB5}.Debug|x64.ActiveCfg = Debug|Any CPU + {F381E5FD-EB66-431A-857F-F66336276DB5}.Debug|x64.Build.0 = Debug|Any CPU + {F381E5FD-EB66-431A-857F-F66336276DB5}.Debug|x86.ActiveCfg = Debug|Any CPU + {F381E5FD-EB66-431A-857F-F66336276DB5}.Debug|x86.Build.0 = Debug|Any CPU + {F381E5FD-EB66-431A-857F-F66336276DB5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F381E5FD-EB66-431A-857F-F66336276DB5}.Release|Any CPU.Build.0 = Release|Any CPU + {F381E5FD-EB66-431A-857F-F66336276DB5}.Release|arm.ActiveCfg = Release|Any CPU + {F381E5FD-EB66-431A-857F-F66336276DB5}.Release|arm64.ActiveCfg = Release|Any CPU + {F381E5FD-EB66-431A-857F-F66336276DB5}.Release|x64.ActiveCfg = Release|Any CPU + {F381E5FD-EB66-431A-857F-F66336276DB5}.Release|x64.Build.0 = Release|Any CPU + {F381E5FD-EB66-431A-857F-F66336276DB5}.Release|x86.ActiveCfg = Release|Any CPU + {F381E5FD-EB66-431A-857F-F66336276DB5}.Release|x86.Build.0 = Release|Any CPU + {F381E5FD-EB66-431A-857F-F66336276DB5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {F381E5FD-EB66-431A-857F-F66336276DB5}.Checked|arm.ActiveCfg = Debug|Any CPU + {F381E5FD-EB66-431A-857F-F66336276DB5}.Checked|arm64.ActiveCfg = Debug|Any CPU + {F381E5FD-EB66-431A-857F-F66336276DB5}.Checked|x64.ActiveCfg = Debug|Any CPU + {F381E5FD-EB66-431A-857F-F66336276DB5}.Checked|x86.ActiveCfg = Debug|Any CPU + {842D4A99-9C12-45AB-8D0C-D0471E314B93}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {842D4A99-9C12-45AB-8D0C-D0471E314B93}.Debug|Any CPU.Build.0 = Debug|Any CPU + {842D4A99-9C12-45AB-8D0C-D0471E314B93}.Debug|arm.ActiveCfg = Debug|Any CPU + {842D4A99-9C12-45AB-8D0C-D0471E314B93}.Debug|arm64.ActiveCfg = Debug|Any CPU + {842D4A99-9C12-45AB-8D0C-D0471E314B93}.Debug|x64.ActiveCfg = Debug|Any CPU + {842D4A99-9C12-45AB-8D0C-D0471E314B93}.Debug|x64.Build.0 = Debug|Any CPU + {842D4A99-9C12-45AB-8D0C-D0471E314B93}.Debug|x86.ActiveCfg = Debug|Any CPU + {842D4A99-9C12-45AB-8D0C-D0471E314B93}.Debug|x86.Build.0 = Debug|Any CPU + {842D4A99-9C12-45AB-8D0C-D0471E314B93}.Release|Any CPU.ActiveCfg = Release|Any CPU + {842D4A99-9C12-45AB-8D0C-D0471E314B93}.Release|Any CPU.Build.0 = Release|Any CPU + {842D4A99-9C12-45AB-8D0C-D0471E314B93}.Release|arm.ActiveCfg = Release|Any CPU + {842D4A99-9C12-45AB-8D0C-D0471E314B93}.Release|arm64.ActiveCfg = Release|Any CPU + {842D4A99-9C12-45AB-8D0C-D0471E314B93}.Release|x64.ActiveCfg = Release|Any CPU + {842D4A99-9C12-45AB-8D0C-D0471E314B93}.Release|x64.Build.0 = Release|Any CPU + {842D4A99-9C12-45AB-8D0C-D0471E314B93}.Release|x86.ActiveCfg = Release|Any CPU + {842D4A99-9C12-45AB-8D0C-D0471E314B93}.Release|x86.Build.0 = Release|Any CPU + {842D4A99-9C12-45AB-8D0C-D0471E314B93}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {842D4A99-9C12-45AB-8D0C-D0471E314B93}.Checked|arm.ActiveCfg = Debug|Any CPU + {842D4A99-9C12-45AB-8D0C-D0471E314B93}.Checked|arm64.ActiveCfg = Debug|Any CPU + {842D4A99-9C12-45AB-8D0C-D0471E314B93}.Checked|x64.ActiveCfg = Debug|Any CPU + {842D4A99-9C12-45AB-8D0C-D0471E314B93}.Checked|x86.ActiveCfg = Debug|Any CPU + {5D47BC07-C66C-4969-AF57-928927B73CCD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5D47BC07-C66C-4969-AF57-928927B73CCD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5D47BC07-C66C-4969-AF57-928927B73CCD}.Debug|arm.ActiveCfg = Debug|Any CPU + {5D47BC07-C66C-4969-AF57-928927B73CCD}.Debug|arm64.ActiveCfg = Debug|Any CPU + {5D47BC07-C66C-4969-AF57-928927B73CCD}.Debug|x64.ActiveCfg = Debug|Any CPU + {5D47BC07-C66C-4969-AF57-928927B73CCD}.Debug|x64.Build.0 = Debug|Any CPU + {5D47BC07-C66C-4969-AF57-928927B73CCD}.Debug|x86.ActiveCfg = Debug|Any CPU + {5D47BC07-C66C-4969-AF57-928927B73CCD}.Debug|x86.Build.0 = Debug|Any CPU + {5D47BC07-C66C-4969-AF57-928927B73CCD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5D47BC07-C66C-4969-AF57-928927B73CCD}.Release|Any CPU.Build.0 = Release|Any CPU + {5D47BC07-C66C-4969-AF57-928927B73CCD}.Release|arm.ActiveCfg = Release|Any CPU + {5D47BC07-C66C-4969-AF57-928927B73CCD}.Release|arm64.ActiveCfg = Release|Any CPU + {5D47BC07-C66C-4969-AF57-928927B73CCD}.Release|x64.ActiveCfg = Release|Any CPU + {5D47BC07-C66C-4969-AF57-928927B73CCD}.Release|x64.Build.0 = Release|Any CPU + {5D47BC07-C66C-4969-AF57-928927B73CCD}.Release|x86.ActiveCfg = Release|Any CPU + {5D47BC07-C66C-4969-AF57-928927B73CCD}.Release|x86.Build.0 = Release|Any CPU + {5D47BC07-C66C-4969-AF57-928927B73CCD}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {5D47BC07-C66C-4969-AF57-928927B73CCD}.Checked|arm.ActiveCfg = Debug|Any CPU + {5D47BC07-C66C-4969-AF57-928927B73CCD}.Checked|arm64.ActiveCfg = Debug|Any CPU + {5D47BC07-C66C-4969-AF57-928927B73CCD}.Checked|x64.ActiveCfg = Debug|Any CPU + {5D47BC07-C66C-4969-AF57-928927B73CCD}.Checked|x86.ActiveCfg = Debug|Any CPU + {F090E986-15B1-4C2C-94DF-ADE84C8A8D62}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F090E986-15B1-4C2C-94DF-ADE84C8A8D62}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F090E986-15B1-4C2C-94DF-ADE84C8A8D62}.Debug|arm.ActiveCfg = Debug|Any CPU + {F090E986-15B1-4C2C-94DF-ADE84C8A8D62}.Debug|arm64.ActiveCfg = Debug|Any CPU + {F090E986-15B1-4C2C-94DF-ADE84C8A8D62}.Debug|x64.ActiveCfg = Debug|Any CPU + {F090E986-15B1-4C2C-94DF-ADE84C8A8D62}.Debug|x64.Build.0 = Debug|Any CPU + {F090E986-15B1-4C2C-94DF-ADE84C8A8D62}.Debug|x86.ActiveCfg = Debug|Any CPU + {F090E986-15B1-4C2C-94DF-ADE84C8A8D62}.Debug|x86.Build.0 = Debug|Any CPU + {F090E986-15B1-4C2C-94DF-ADE84C8A8D62}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F090E986-15B1-4C2C-94DF-ADE84C8A8D62}.Release|Any CPU.Build.0 = Release|Any CPU + {F090E986-15B1-4C2C-94DF-ADE84C8A8D62}.Release|arm.ActiveCfg = Release|Any CPU + {F090E986-15B1-4C2C-94DF-ADE84C8A8D62}.Release|arm64.ActiveCfg = Release|Any CPU + {F090E986-15B1-4C2C-94DF-ADE84C8A8D62}.Release|x64.ActiveCfg = Release|Any CPU + {F090E986-15B1-4C2C-94DF-ADE84C8A8D62}.Release|x64.Build.0 = Release|Any CPU + {F090E986-15B1-4C2C-94DF-ADE84C8A8D62}.Release|x86.ActiveCfg = Release|Any CPU + {F090E986-15B1-4C2C-94DF-ADE84C8A8D62}.Release|x86.Build.0 = Release|Any CPU + {F090E986-15B1-4C2C-94DF-ADE84C8A8D62}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {F090E986-15B1-4C2C-94DF-ADE84C8A8D62}.Checked|arm.ActiveCfg = Debug|Any CPU + {F090E986-15B1-4C2C-94DF-ADE84C8A8D62}.Checked|arm64.ActiveCfg = Debug|Any CPU + {F090E986-15B1-4C2C-94DF-ADE84C8A8D62}.Checked|x64.ActiveCfg = Debug|Any CPU + {F090E986-15B1-4C2C-94DF-ADE84C8A8D62}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution + {5DE5039B-D68C-4B66-9F5E-54613FC76423} = {C0F27DD2-DED0-4FA5-8319-64CA1FBCEC31} {30142600-D924-4FDC-9A98-D621C3A2CCEA} = {BC37CE7C-7BD7-4495-9BC9-810D34DC5B1F} {84CF0BC6-CFDF-4A19-AA48-0F28FB11BC3A} = {BC37CE7C-7BD7-4495-9BC9-810D34DC5B1F} - {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} - {EF8D1526-9463-401B-9EAE-D4B98C86E046} = {9AB0B44D-9A64-449F-A0CD-07D39ABEF343} - {C73C11A5-863A-440D-B568-00CA5E7C9DA0} = {9AB0B44D-9A64-449F-A0CD-07D39ABEF343} - {D7C9E59C-0B7B-491E-9FC5-63A29290EE06} = {9AB0B44D-9A64-449F-A0CD-07D39ABEF343} + {ACD7A742-0474-4C95-9769-437A26E7B010} = {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} + {B90DD406-44B4-47A9-8BB7-75452A95751F} = {4B964147-AE9C-454F-B971-4F4BD9541280} + {BF351671-8D05-42F5-8218-7676E4356440} = {4B964147-AE9C-454F-B971-4F4BD9541280} {15628477-9D25-41FA-81B0-59D43D1363F4} = {4B964147-AE9C-454F-B971-4F4BD9541280} {877B4329-854A-412F-B631-6315D77F9C8A} = {4B964147-AE9C-454F-B971-4F4BD9541280} {A3AC9584-763B-4686-B6D8-49140FC62EC4} = {4B964147-AE9C-454F-B971-4F4BD9541280} - {F7FF9B2F-DDFA-4DA9-B765-45C898AF747B} = {39D097CC-4757-405F-B3C5-17B8050F438C} + {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} + {67355722-4CF4-40BD-8569-04BA649A0B57} = {9AB0B44D-9A64-449F-A0CD-07D39ABEF343} + {40386176-1E3E-41DE-AC3A-9910922BEDFE} = {9AB0B44D-9A64-449F-A0CD-07D39ABEF343} + {EF8D1526-9463-401B-9EAE-D4B98C86E046} = {9AB0B44D-9A64-449F-A0CD-07D39ABEF343} + {C73C11A5-863A-440D-B568-00CA5E7C9DA0} = {9AB0B44D-9A64-449F-A0CD-07D39ABEF343} + {D7C9E59C-0B7B-491E-9FC5-63A29290EE06} = {9AB0B44D-9A64-449F-A0CD-07D39ABEF343} + {B749BF37-D346-475F-8C22-13C67A7DA2B6} = {39D097CC-4757-405F-B3C5-17B8050F438C} {A2ED3B1E-5AAC-47AF-BDCE-B59226B65E63} = {39D097CC-4757-405F-B3C5-17B8050F438C} {C273C3A4-5651-489C-9FA4-2DCAAA7A7D97} = {39D097CC-4757-405F-B3C5-17B8050F438C} - {7AD9D681-F853-47F4-8C1B-A0D1E0440D3B} = {39D097CC-4757-405F-B3C5-17B8050F438C} + {66C42AC6-739D-45C5-9E37-06B43F285AA7} = {C421505B-16CA-4879-B53D-A932AA7083EF} + {F381E5FD-EB66-431A-857F-F66336276DB5} = {C421505B-16CA-4879-B53D-A932AA7083EF} + {C421505B-16CA-4879-B53D-A932AA7083EF} = {27F0660E-53DE-4B69-AEEB-E561E0383803} + {842D4A99-9C12-45AB-8D0C-D0471E314B93} = {67A242EB-D6B4-4FB6-88EA-57EEA8258F0A} + {5D47BC07-C66C-4969-AF57-928927B73CCD} = {67A242EB-D6B4-4FB6-88EA-57EEA8258F0A} + {67A242EB-D6B4-4FB6-88EA-57EEA8258F0A} = {27F0660E-53DE-4B69-AEEB-E561E0383803} + {F090E986-15B1-4C2C-94DF-ADE84C8A8D62} = {0E6D7F5C-08C3-4D23-B0C9-148B9C556BDB} + {0E6D7F5C-08C3-4D23-B0C9-148B9C556BDB} = {27F0660E-53DE-4B69-AEEB-E561E0383803} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {4895E2D2-31A2-4EB8-9C53-04C408F62DC4} diff --git a/src/libraries/System.Data.OleDb/src/CompatibilitySuppressions.xml b/src/libraries/System.Data.OleDb/src/CompatibilitySuppressions.xml index 0160fe672bff88..a59b7f525a4284 100644 --- a/src/libraries/System.Data.OleDb/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Data.OleDb/src/CompatibilitySuppressions.xml @@ -1,4 +1,5 @@  + CP0015 @@ -6,4 +7,32 @@ lib/netstandard2.0/System.Data.OleDb.dll lib/net462/System.Data.OleDb.dll + + CP1002 + System.Data.Common, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.Data.OleDb.dll + lib/netstandard2.0/System.Data.OleDb.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.Data.OleDb.dll + lib/netstandard2.0/System.Data.OleDb.dll + true + + + CP1002 + System.Data.Common, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.Data.OleDb.dll + lib/netstandard2.0/System.Data.OleDb.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.Data.OleDb.dll + lib/netstandard2.0/System.Data.OleDb.dll + true + \ No newline at end of file diff --git a/src/libraries/System.Data.OleDb/src/PACKAGE.md b/src/libraries/System.Data.OleDb/src/PACKAGE.md new file mode 100644 index 00000000000000..391361bb8e5c53 --- /dev/null +++ b/src/libraries/System.Data.OleDb/src/PACKAGE.md @@ -0,0 +1,48 @@ +## About + +This package implements a data provider for OLE DB data sources. + +## Key Features + +Allows access to legacy OLE DB data sources. + +## How to Use + +This is a basic example of retrieving the results of a query using an [OleDbDataReader](https://learn.microsoft.com/dotnet/api/system.data.oledb.oledbdatareader). For examples of using an [OleDbDataAdapter](https://learn.microsoft.com/dotnet/api/system.data.oledb.oledbdataadapter), and of updating an OLE DB data source, please see the documentation. + +```cs +using System.Data.OleDb; + +string connectionString = ""; // Fill in +string queryString = "SELECT OrderID, CustomerID FROM Orders"; + +using OleDbConnection connection = new OleDbConnection(connectionString); +using OleDbCommand command = new OleDbCommand(queryString, connection); + +connection.Open(); +using OleDbDataReader reader = command.ExecuteReader(); + +while (reader.Read()) +{ + Console.WriteLine(reader.GetInt32(0) + ", " + reader.GetString(1)); +} +``` + +## Main Types + +* [OleDbConnection](https://learn.microsoft.com/dotnet/api/system.data.oledb.oledbconnection) represents an open connection to an OLE DB data source. +* [OleDbCommand](https://learn.microsoft.com/dotnet/api/system.data.oledb.oledbcommand) represents an SQL statement or stored procedure to execute against an OLE DB data source. +* [OleDbDataReader](https://learn.microsoft.com/dotnet/api/system.data.oledb.oledbdatareader) provides a way of reading a forward-only stream of data rows from an OLE DB data source. +* [OleDbDataAdapter](https://learn.microsoft.com/dotnet/api/system.data.oledb.oledbdataadapter) represents a set of data commands and a database connection that are used to fill a `DataSet` and update the OLE DB data source. + +## Additional Documentation + +* [API documentation](https://learn.microsoft.com/dotnet/api/system.data.oledb) + +## Related Packages + +System.Data.Odbc is a similar package for accessing ODBC data sources. + +## Feedback & Contributing + +System.Data.OleDb is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports are welcome at [the GitHub repository](https://github.com/dotnet/runtime). This package is considered complete and we only consider low-risk, high-impact fixes that are necessary to maintain or improve quality. diff --git a/src/libraries/System.Diagnostics.Contracts/System.Diagnostics.Contracts.sln b/src/libraries/System.Diagnostics.Contracts/System.Diagnostics.Contracts.sln index 4c5b86509b6681..aeac1fd484e031 100644 --- a/src/libraries/System.Diagnostics.Contracts/System.Diagnostics.Contracts.sln +++ b/src/libraries/System.Diagnostics.Contracts/System.Diagnostics.Contracts.sln @@ -19,14 +19,34 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{CA4E8737-E42F-4524-A1A0-D2673B7B7AAF}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{ABC2D63C-77D2-49D8-AF86-2530D6672269}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{2230688E-229F-4044-9C82-79988F03047E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{70D6977F-5BEA-4E17-BF41-474898185963}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{96A360E6-0155-498C-8F58-9C40E791AA64}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{5565BB1F-2B65-4B5A-AE4A-4BED5CB31AEB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{9132E794-A863-4073-86A2-3A6FA9B6C6CD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{5F95C6BC-43E8-4E5D-93AC-80500F798AEF}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{56A31E71-2D11-484D-A9D0-97E4A2AD9354}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{8B71FA04-1D67-4607-94A4-E2A85977B1FA}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{ABC2D63C-77D2-49D8-AF86-2530D6672269}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{24204C7B-8FCC-4D46-8E72-BB7128DB5572}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{0FD77A15-66A8-4E7D-BE30-4976EB1A74B9}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{87246B81-BD3B-45C9-B741-F37005120BDB}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{AD616F7D-C70A-403C-80BF-6167C38F0625}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{72C674BC-3D45-4823-98C6-4B55EC85BAEE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -265,21 +285,134 @@ Global {CA4E8737-E42F-4524-A1A0-D2673B7B7AAF}.Checked|arm64.ActiveCfg = Debug|Any CPU {CA4E8737-E42F-4524-A1A0-D2673B7B7AAF}.Checked|x64.ActiveCfg = Debug|Any CPU {CA4E8737-E42F-4524-A1A0-D2673B7B7AAF}.Checked|x86.ActiveCfg = Debug|Any CPU + {2230688E-229F-4044-9C82-79988F03047E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2230688E-229F-4044-9C82-79988F03047E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2230688E-229F-4044-9C82-79988F03047E}.Debug|arm.ActiveCfg = Debug|Any CPU + {2230688E-229F-4044-9C82-79988F03047E}.Debug|arm64.ActiveCfg = Debug|Any CPU + {2230688E-229F-4044-9C82-79988F03047E}.Debug|x64.ActiveCfg = Debug|Any CPU + {2230688E-229F-4044-9C82-79988F03047E}.Debug|x64.Build.0 = Debug|Any CPU + {2230688E-229F-4044-9C82-79988F03047E}.Debug|x86.ActiveCfg = Debug|Any CPU + {2230688E-229F-4044-9C82-79988F03047E}.Debug|x86.Build.0 = Debug|Any CPU + {2230688E-229F-4044-9C82-79988F03047E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2230688E-229F-4044-9C82-79988F03047E}.Release|Any CPU.Build.0 = Release|Any CPU + {2230688E-229F-4044-9C82-79988F03047E}.Release|arm.ActiveCfg = Release|Any CPU + {2230688E-229F-4044-9C82-79988F03047E}.Release|arm64.ActiveCfg = Release|Any CPU + {2230688E-229F-4044-9C82-79988F03047E}.Release|x64.ActiveCfg = Release|Any CPU + {2230688E-229F-4044-9C82-79988F03047E}.Release|x64.Build.0 = Release|Any CPU + {2230688E-229F-4044-9C82-79988F03047E}.Release|x86.ActiveCfg = Release|Any CPU + {2230688E-229F-4044-9C82-79988F03047E}.Release|x86.Build.0 = Release|Any CPU + {2230688E-229F-4044-9C82-79988F03047E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {2230688E-229F-4044-9C82-79988F03047E}.Checked|arm.ActiveCfg = Debug|Any CPU + {2230688E-229F-4044-9C82-79988F03047E}.Checked|arm64.ActiveCfg = Debug|Any CPU + {2230688E-229F-4044-9C82-79988F03047E}.Checked|x64.ActiveCfg = Debug|Any CPU + {2230688E-229F-4044-9C82-79988F03047E}.Checked|x86.ActiveCfg = Debug|Any CPU + {70D6977F-5BEA-4E17-BF41-474898185963}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {70D6977F-5BEA-4E17-BF41-474898185963}.Debug|Any CPU.Build.0 = Debug|Any CPU + {70D6977F-5BEA-4E17-BF41-474898185963}.Debug|arm.ActiveCfg = Debug|Any CPU + {70D6977F-5BEA-4E17-BF41-474898185963}.Debug|arm64.ActiveCfg = Debug|Any CPU + {70D6977F-5BEA-4E17-BF41-474898185963}.Debug|x64.ActiveCfg = Debug|Any CPU + {70D6977F-5BEA-4E17-BF41-474898185963}.Debug|x64.Build.0 = Debug|Any CPU + {70D6977F-5BEA-4E17-BF41-474898185963}.Debug|x86.ActiveCfg = Debug|Any CPU + {70D6977F-5BEA-4E17-BF41-474898185963}.Debug|x86.Build.0 = Debug|Any CPU + {70D6977F-5BEA-4E17-BF41-474898185963}.Release|Any CPU.ActiveCfg = Release|Any CPU + {70D6977F-5BEA-4E17-BF41-474898185963}.Release|Any CPU.Build.0 = Release|Any CPU + {70D6977F-5BEA-4E17-BF41-474898185963}.Release|arm.ActiveCfg = Release|Any CPU + {70D6977F-5BEA-4E17-BF41-474898185963}.Release|arm64.ActiveCfg = Release|Any CPU + {70D6977F-5BEA-4E17-BF41-474898185963}.Release|x64.ActiveCfg = Release|Any CPU + {70D6977F-5BEA-4E17-BF41-474898185963}.Release|x64.Build.0 = Release|Any CPU + {70D6977F-5BEA-4E17-BF41-474898185963}.Release|x86.ActiveCfg = Release|Any CPU + {70D6977F-5BEA-4E17-BF41-474898185963}.Release|x86.Build.0 = Release|Any CPU + {70D6977F-5BEA-4E17-BF41-474898185963}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {70D6977F-5BEA-4E17-BF41-474898185963}.Checked|arm.ActiveCfg = Debug|Any CPU + {70D6977F-5BEA-4E17-BF41-474898185963}.Checked|arm64.ActiveCfg = Debug|Any CPU + {70D6977F-5BEA-4E17-BF41-474898185963}.Checked|x64.ActiveCfg = Debug|Any CPU + {70D6977F-5BEA-4E17-BF41-474898185963}.Checked|x86.ActiveCfg = Debug|Any CPU + {96A360E6-0155-498C-8F58-9C40E791AA64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {96A360E6-0155-498C-8F58-9C40E791AA64}.Debug|Any CPU.Build.0 = Debug|Any CPU + {96A360E6-0155-498C-8F58-9C40E791AA64}.Debug|arm.ActiveCfg = Debug|Any CPU + {96A360E6-0155-498C-8F58-9C40E791AA64}.Debug|arm64.ActiveCfg = Debug|Any CPU + {96A360E6-0155-498C-8F58-9C40E791AA64}.Debug|x64.ActiveCfg = Debug|Any CPU + {96A360E6-0155-498C-8F58-9C40E791AA64}.Debug|x64.Build.0 = Debug|Any CPU + {96A360E6-0155-498C-8F58-9C40E791AA64}.Debug|x86.ActiveCfg = Debug|Any CPU + {96A360E6-0155-498C-8F58-9C40E791AA64}.Debug|x86.Build.0 = Debug|Any CPU + {96A360E6-0155-498C-8F58-9C40E791AA64}.Release|Any CPU.ActiveCfg = Release|Any CPU + {96A360E6-0155-498C-8F58-9C40E791AA64}.Release|Any CPU.Build.0 = Release|Any CPU + {96A360E6-0155-498C-8F58-9C40E791AA64}.Release|arm.ActiveCfg = Release|Any CPU + {96A360E6-0155-498C-8F58-9C40E791AA64}.Release|arm64.ActiveCfg = Release|Any CPU + {96A360E6-0155-498C-8F58-9C40E791AA64}.Release|x64.ActiveCfg = Release|Any CPU + {96A360E6-0155-498C-8F58-9C40E791AA64}.Release|x64.Build.0 = Release|Any CPU + {96A360E6-0155-498C-8F58-9C40E791AA64}.Release|x86.ActiveCfg = Release|Any CPU + {96A360E6-0155-498C-8F58-9C40E791AA64}.Release|x86.Build.0 = Release|Any CPU + {96A360E6-0155-498C-8F58-9C40E791AA64}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {96A360E6-0155-498C-8F58-9C40E791AA64}.Checked|arm.ActiveCfg = Debug|Any CPU + {96A360E6-0155-498C-8F58-9C40E791AA64}.Checked|arm64.ActiveCfg = Debug|Any CPU + {96A360E6-0155-498C-8F58-9C40E791AA64}.Checked|x64.ActiveCfg = Debug|Any CPU + {96A360E6-0155-498C-8F58-9C40E791AA64}.Checked|x86.ActiveCfg = Debug|Any CPU + {5565BB1F-2B65-4B5A-AE4A-4BED5CB31AEB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5565BB1F-2B65-4B5A-AE4A-4BED5CB31AEB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5565BB1F-2B65-4B5A-AE4A-4BED5CB31AEB}.Debug|arm.ActiveCfg = Debug|Any CPU + {5565BB1F-2B65-4B5A-AE4A-4BED5CB31AEB}.Debug|arm64.ActiveCfg = Debug|Any CPU + {5565BB1F-2B65-4B5A-AE4A-4BED5CB31AEB}.Debug|x64.ActiveCfg = Debug|Any CPU + {5565BB1F-2B65-4B5A-AE4A-4BED5CB31AEB}.Debug|x64.Build.0 = Debug|Any CPU + {5565BB1F-2B65-4B5A-AE4A-4BED5CB31AEB}.Debug|x86.ActiveCfg = Debug|Any CPU + {5565BB1F-2B65-4B5A-AE4A-4BED5CB31AEB}.Debug|x86.Build.0 = Debug|Any CPU + {5565BB1F-2B65-4B5A-AE4A-4BED5CB31AEB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5565BB1F-2B65-4B5A-AE4A-4BED5CB31AEB}.Release|Any CPU.Build.0 = Release|Any CPU + {5565BB1F-2B65-4B5A-AE4A-4BED5CB31AEB}.Release|arm.ActiveCfg = Release|Any CPU + {5565BB1F-2B65-4B5A-AE4A-4BED5CB31AEB}.Release|arm64.ActiveCfg = Release|Any CPU + {5565BB1F-2B65-4B5A-AE4A-4BED5CB31AEB}.Release|x64.ActiveCfg = Release|Any CPU + {5565BB1F-2B65-4B5A-AE4A-4BED5CB31AEB}.Release|x64.Build.0 = Release|Any CPU + {5565BB1F-2B65-4B5A-AE4A-4BED5CB31AEB}.Release|x86.ActiveCfg = Release|Any CPU + {5565BB1F-2B65-4B5A-AE4A-4BED5CB31AEB}.Release|x86.Build.0 = Release|Any CPU + {5565BB1F-2B65-4B5A-AE4A-4BED5CB31AEB}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {5565BB1F-2B65-4B5A-AE4A-4BED5CB31AEB}.Checked|arm.ActiveCfg = Debug|Any CPU + {5565BB1F-2B65-4B5A-AE4A-4BED5CB31AEB}.Checked|arm64.ActiveCfg = Debug|Any CPU + {5565BB1F-2B65-4B5A-AE4A-4BED5CB31AEB}.Checked|x64.ActiveCfg = Debug|Any CPU + {5565BB1F-2B65-4B5A-AE4A-4BED5CB31AEB}.Checked|x86.ActiveCfg = Debug|Any CPU + {9132E794-A863-4073-86A2-3A6FA9B6C6CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9132E794-A863-4073-86A2-3A6FA9B6C6CD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9132E794-A863-4073-86A2-3A6FA9B6C6CD}.Debug|arm.ActiveCfg = Debug|Any CPU + {9132E794-A863-4073-86A2-3A6FA9B6C6CD}.Debug|arm64.ActiveCfg = Debug|Any CPU + {9132E794-A863-4073-86A2-3A6FA9B6C6CD}.Debug|x64.ActiveCfg = Debug|Any CPU + {9132E794-A863-4073-86A2-3A6FA9B6C6CD}.Debug|x64.Build.0 = Debug|Any CPU + {9132E794-A863-4073-86A2-3A6FA9B6C6CD}.Debug|x86.ActiveCfg = Debug|Any CPU + {9132E794-A863-4073-86A2-3A6FA9B6C6CD}.Debug|x86.Build.0 = Debug|Any CPU + {9132E794-A863-4073-86A2-3A6FA9B6C6CD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9132E794-A863-4073-86A2-3A6FA9B6C6CD}.Release|Any CPU.Build.0 = Release|Any CPU + {9132E794-A863-4073-86A2-3A6FA9B6C6CD}.Release|arm.ActiveCfg = Release|Any CPU + {9132E794-A863-4073-86A2-3A6FA9B6C6CD}.Release|arm64.ActiveCfg = Release|Any CPU + {9132E794-A863-4073-86A2-3A6FA9B6C6CD}.Release|x64.ActiveCfg = Release|Any CPU + {9132E794-A863-4073-86A2-3A6FA9B6C6CD}.Release|x64.Build.0 = Release|Any CPU + {9132E794-A863-4073-86A2-3A6FA9B6C6CD}.Release|x86.ActiveCfg = Release|Any CPU + {9132E794-A863-4073-86A2-3A6FA9B6C6CD}.Release|x86.Build.0 = Release|Any CPU + {9132E794-A863-4073-86A2-3A6FA9B6C6CD}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {9132E794-A863-4073-86A2-3A6FA9B6C6CD}.Checked|arm.ActiveCfg = Debug|Any CPU + {9132E794-A863-4073-86A2-3A6FA9B6C6CD}.Checked|arm64.ActiveCfg = Debug|Any CPU + {9132E794-A863-4073-86A2-3A6FA9B6C6CD}.Checked|x64.ActiveCfg = Debug|Any CPU + {9132E794-A863-4073-86A2-3A6FA9B6C6CD}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {D5A81248-C2F8-464A-8EA4-2AB2528206BC} = {ABC2D63C-77D2-49D8-AF86-2530D6672269} - {158DD2BA-5789-49B8-A801-77EF5D4FD324} = {ABC2D63C-77D2-49D8-AF86-2530D6672269} + {D5A81248-C2F8-464A-8EA4-2AB2528206BC} = {5F95C6BC-43E8-4E5D-93AC-80500F798AEF} {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} + {158DD2BA-5789-49B8-A801-77EF5D4FD324} = {ABC2D63C-77D2-49D8-AF86-2530D6672269} {452B9C44-BE4A-4D0E-9412-07280582D3BB} = {24204C7B-8FCC-4D46-8E72-BB7128DB5572} {B1366F4C-E5CC-4AF3-A67F-C28216E570B3} = {24204C7B-8FCC-4D46-8E72-BB7128DB5572} {9C3EAF3C-A96C-4D5F-95FE-BBCB1580DECA} = {24204C7B-8FCC-4D46-8E72-BB7128DB5572} + {2230688E-229F-4044-9C82-79988F03047E} = {0FD77A15-66A8-4E7D-BE30-4976EB1A74B9} + {70D6977F-5BEA-4E17-BF41-474898185963} = {0FD77A15-66A8-4E7D-BE30-4976EB1A74B9} + {0FD77A15-66A8-4E7D-BE30-4976EB1A74B9} = {72C674BC-3D45-4823-98C6-4B55EC85BAEE} + {96A360E6-0155-498C-8F58-9C40E791AA64} = {87246B81-BD3B-45C9-B741-F37005120BDB} + {5565BB1F-2B65-4B5A-AE4A-4BED5CB31AEB} = {87246B81-BD3B-45C9-B741-F37005120BDB} + {87246B81-BD3B-45C9-B741-F37005120BDB} = {72C674BC-3D45-4823-98C6-4B55EC85BAEE} + {9132E794-A863-4073-86A2-3A6FA9B6C6CD} = {AD616F7D-C70A-403C-80BF-6167C38F0625} + {AD616F7D-C70A-403C-80BF-6167C38F0625} = {72C674BC-3D45-4823-98C6-4B55EC85BAEE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {D03A9093-136B-4C69-AFC1-106658815511} diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/System.Diagnostics.DiagnosticSource.sln b/src/libraries/System.Diagnostics.DiagnosticSource/System.Diagnostics.DiagnosticSource.sln index 2d4a51c7910afe..f89f842787fd35 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/System.Diagnostics.DiagnosticSource.sln +++ b/src/libraries/System.Diagnostics.DiagnosticSource/System.Diagnostics.DiagnosticSource.sln @@ -17,6 +17,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{ADF92A08-5F09-4726-9211-F348E2DFA18F}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{490375CF-2958-45D6-BC5D-5F7D9FE03127}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{882FBA8E-CF81-4D2A-BE24-8325F8B358AA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{511C0EB3-2449-487D-9FB7-9D810F7F98F6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{EE788116-F0E1-4775-AC66-6B65213053E0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{0E845CB0-A0F3-4CD2-A82A-02FA3A7C9A81}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{5ACE392F-5FD1-4A91-B992-2D7562BEACDE}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{4667237A-8A15-43B3-8CDF-2D0E9B212182}" @@ -25,6 +35,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{995CF17B-85C EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{E2336D66-4276-48F1-9619-1F79CE7140EC}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{BCC999D8-B42C-41F8-899D-B804886E4C03}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{44D96A42-4F6C-4631-8CB8-BF72A64C97EA}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{264B17CB-0CAA-43F0-BF9F-9E1662F16903}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{29727812-660B-4E27-8053-341C025B643C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -67,6 +85,26 @@ Global {ADF92A08-5F09-4726-9211-F348E2DFA18F}.Debug|Any CPU.Build.0 = Debug|Any CPU {ADF92A08-5F09-4726-9211-F348E2DFA18F}.Release|Any CPU.ActiveCfg = Release|Any CPU {ADF92A08-5F09-4726-9211-F348E2DFA18F}.Release|Any CPU.Build.0 = Release|Any CPU + {490375CF-2958-45D6-BC5D-5F7D9FE03127}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {490375CF-2958-45D6-BC5D-5F7D9FE03127}.Debug|Any CPU.Build.0 = Debug|Any CPU + {490375CF-2958-45D6-BC5D-5F7D9FE03127}.Release|Any CPU.ActiveCfg = Release|Any CPU + {490375CF-2958-45D6-BC5D-5F7D9FE03127}.Release|Any CPU.Build.0 = Release|Any CPU + {882FBA8E-CF81-4D2A-BE24-8325F8B358AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {882FBA8E-CF81-4D2A-BE24-8325F8B358AA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {882FBA8E-CF81-4D2A-BE24-8325F8B358AA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {882FBA8E-CF81-4D2A-BE24-8325F8B358AA}.Release|Any CPU.Build.0 = Release|Any CPU + {511C0EB3-2449-487D-9FB7-9D810F7F98F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {511C0EB3-2449-487D-9FB7-9D810F7F98F6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {511C0EB3-2449-487D-9FB7-9D810F7F98F6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {511C0EB3-2449-487D-9FB7-9D810F7F98F6}.Release|Any CPU.Build.0 = Release|Any CPU + {EE788116-F0E1-4775-AC66-6B65213053E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EE788116-F0E1-4775-AC66-6B65213053E0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EE788116-F0E1-4775-AC66-6B65213053E0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EE788116-F0E1-4775-AC66-6B65213053E0}.Release|Any CPU.Build.0 = Release|Any CPU + {0E845CB0-A0F3-4CD2-A82A-02FA3A7C9A81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0E845CB0-A0F3-4CD2-A82A-02FA3A7C9A81}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0E845CB0-A0F3-4CD2-A82A-02FA3A7C9A81}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0E845CB0-A0F3-4CD2-A82A-02FA3A7C9A81}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -81,6 +119,14 @@ Global {19AD004A-4F95-43BF-B1A4-5D9CE185EDCC} = {E2336D66-4276-48F1-9619-1F79CE7140EC} {C43479BA-BAF7-4F1D-B9AF-418869CF9143} = {E2336D66-4276-48F1-9619-1F79CE7140EC} {F97FBDC1-22F3-4745-B934-2E2A650EDA6A} = {E2336D66-4276-48F1-9619-1F79CE7140EC} + {490375CF-2958-45D6-BC5D-5F7D9FE03127} = {BCC999D8-B42C-41F8-899D-B804886E4C03} + {882FBA8E-CF81-4D2A-BE24-8325F8B358AA} = {BCC999D8-B42C-41F8-899D-B804886E4C03} + {BCC999D8-B42C-41F8-899D-B804886E4C03} = {29727812-660B-4E27-8053-341C025B643C} + {511C0EB3-2449-487D-9FB7-9D810F7F98F6} = {44D96A42-4F6C-4631-8CB8-BF72A64C97EA} + {EE788116-F0E1-4775-AC66-6B65213053E0} = {44D96A42-4F6C-4631-8CB8-BF72A64C97EA} + {44D96A42-4F6C-4631-8CB8-BF72A64C97EA} = {29727812-660B-4E27-8053-341C025B643C} + {0E845CB0-A0F3-4CD2-A82A-02FA3A7C9A81} = {264B17CB-0CAA-43F0-BF9F-9E1662F16903} + {264B17CB-0CAA-43F0-BF9F-9E1662F16903} = {29727812-660B-4E27-8053-341C025B643C} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {6C0E44F7-3944-4BCA-94DA-2E558CEA1FE8} diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/ref/System.Diagnostics.DiagnosticSource.csproj b/src/libraries/System.Diagnostics.DiagnosticSource/ref/System.Diagnostics.DiagnosticSource.csproj index 322bb71dc3f6c1..6356c4f7a158f7 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/ref/System.Diagnostics.DiagnosticSource.csproj +++ b/src/libraries/System.Diagnostics.DiagnosticSource/ref/System.Diagnostics.DiagnosticSource.csproj @@ -1,4 +1,5 @@ + $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) @@ -10,16 +11,13 @@ - + + - - - - @@ -31,4 +29,5 @@ + diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/CompatibilitySuppressions.xml b/src/libraries/System.Diagnostics.DiagnosticSource/src/CompatibilitySuppressions.xml index 240aff3d5b7cad..351c6b6c6f145d 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/CompatibilitySuppressions.xml @@ -1,7 +1,6 @@  - CP0014 M:System.Diagnostics.DiagnosticListener.Write(System.String,System.Object):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] @@ -30,4 +29,18 @@ lib/net7.0/System.Diagnostics.DiagnosticSource.dll true + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.Diagnostics.DiagnosticSource.dll + right + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.Diagnostics.DiagnosticSource.dll + right + true + \ No newline at end of file diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/ILLink/ILLink.Substitutions.Shared.xml b/src/libraries/System.Diagnostics.DiagnosticSource/src/ILLink/ILLink.Substitutions.Shared.xml new file mode 100644 index 00000000000000..b67ac8623c402a --- /dev/null +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/ILLink/ILLink.Substitutions.Shared.xml @@ -0,0 +1,10 @@ + + + + + + + + + + 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 24a23478b7c0c2..2afba2938d0d8e 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System.Diagnostics.DiagnosticSource.csproj +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System.Diagnostics.DiagnosticSource.csproj @@ -20,6 +20,10 @@ System.Diagnostics.DiagnosticSource true + + + + @@ -100,18 +104,15 @@ System.Diagnostics.DiagnosticSource - - + + + - - - - @@ -135,9 +136,7 @@ System.Diagnostics.DiagnosticSource - - - + diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivitySamplingResult.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivitySamplingResult.cs index 19bee5c8d5d3b8..dab46c351350db 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivitySamplingResult.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivitySamplingResult.cs @@ -16,7 +16,7 @@ public enum ActivitySamplingResult /// /// The Activity object needs to be created. It will have Name, Source, Id and Baggage. - /// Other properties are unnecessary and will be ignored by this listener. + /// Other properties such as Links, Tags, and Events are unnecessary and will be ignored by this listener. /// PropagationData, diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/Instrument.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/Instrument.cs index 0cb50f523f0282..c1e2fcb199b3a5 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/Instrument.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/Instrument.cs @@ -64,6 +64,12 @@ protected Instrument(Meter meter, string name, string? unit, string? description /// protected void Publish() { + // All instruments call Publish when they are created. We don't want to publish the instrument if the Meter is not supported. + if (!Meter.IsSupported) + { + return; + } + List? allListeners = null; lock (Instrument.SyncObject) { diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/Meter.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/Meter.cs index a5722aa7b6c4dc..60314b1d5b4c00 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/Meter.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/Meter.cs @@ -17,6 +17,11 @@ public class Meter : IDisposable private Dictionary> _nonObservableInstrumentsCache = new(); internal bool Disposed { get; private set; } + internal static bool IsSupported { get; } = InitializeIsSupported(); + + private static bool InitializeIsSupported() => + AppContext.TryGetSwitch("System.Diagnostics.Metrics.Meter.IsSupported", out bool isSupported) ? isSupported : true; + /// /// Initialize a new instance of the Meter using the . /// @@ -77,6 +82,11 @@ private void Initialize(string name, string? version, IEnumerable - /// A delegate to represent the Meterlistener callbacks used in measurements recording operation. + /// A delegate to represent the MeterListener callbacks used in measurements recording operation. /// public delegate void MeasurementCallback(Instrument instrument, T measurement, ReadOnlySpan> tags, object? state) where T : struct; @@ -56,6 +56,11 @@ public MeterListener() { } /// A state object which will be passed back to the callback getting measurements events. public void EnableMeasurementEvents(Instrument instrument, object? state = null) { + if (!Meter.IsSupported) + { + return; + } + bool oldStateStored = false; bool enabled = false; object? oldState = null; @@ -92,6 +97,11 @@ public void EnableMeasurementEvents(Instrument instrument, object? state = null) /// The state object originally passed to method. public object? DisableMeasurementEvents(Instrument instrument) { + if (!Meter.IsSupported) + { + return default; + } + object? state = null; lock (Instrument.SyncObject) { @@ -114,6 +124,11 @@ public void EnableMeasurementEvents(Instrument instrument, object? state = null) /// The callback which can be used to get measurement recording of numeric type T. public void SetMeasurementEventCallback(MeasurementCallback? measurementCallback) where T : struct { + if (!Meter.IsSupported) + { + return; + } + measurementCallback ??= (instrument, measurement, tags, state) => { /* no-op */}; if (typeof(T) == typeof(byte)) @@ -155,6 +170,11 @@ public void SetMeasurementEventCallback(MeasurementCallback? measurementCa /// public void Start() { + if (!Meter.IsSupported) + { + return; + } + List? publishedInstruments = null; lock (Instrument.SyncObject) { @@ -184,6 +204,11 @@ public void Start() /// public void RecordObservableInstruments() { + if (!Meter.IsSupported) + { + return; + } + List? exceptionsList = null; DiagNode? current = _enabledMeasurementInstruments.First; while (current is not null) @@ -215,6 +240,11 @@ public void RecordObservableInstruments() /// public void Dispose() { + if (!Meter.IsSupported) + { + return; + } + Dictionary? callbacksArguments = null; Action? measurementsCompleted = MeasurementsCompleted; diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/tests/System.Diagnostics.DiagnosticSource.Tests.csproj b/src/libraries/System.Diagnostics.DiagnosticSource/tests/System.Diagnostics.DiagnosticSource.Tests.csproj index 7e8136e0a1a6b9..29a8e55dc2fc02 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/tests/System.Diagnostics.DiagnosticSource.Tests.csproj +++ b/src/libraries/System.Diagnostics.DiagnosticSource/tests/System.Diagnostics.DiagnosticSource.Tests.csproj @@ -11,6 +11,7 @@ + diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/tests/TestNotSupported.cs b/src/libraries/System.Diagnostics.DiagnosticSource/tests/TestNotSupported.cs new file mode 100644 index 00000000000000..43fae749957204 --- /dev/null +++ b/src/libraries/System.Diagnostics.DiagnosticSource/tests/TestNotSupported.cs @@ -0,0 +1,56 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.DotNet.RemoteExecutor; +using System.Diagnostics.Metrics; +using Xunit; + +namespace System.Diagnostics.Metrics.Tests +{ + public class MetricsNotSupportedTest + { + /// + /// Tests using Metrics when the System.Diagnostics.Metrics.Meter.IsSupported + /// feature switch is set to disable all metrics operations. + /// + [ConditionalTheory(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] + [InlineData(false)] + [InlineData(true)] + public void IsSupportedSwitch(bool value) + { + RemoteInvokeOptions options = new RemoteInvokeOptions(); + options.RuntimeConfigurationOptions.Add("System.Diagnostics.Metrics.Meter.IsSupported", value); + + RemoteExecutor.Invoke((val) => + { + bool isSupported = bool.Parse(val); + + Meter meter = new Meter("IsSupportedTest"); + Counter counter = meter.CreateCounter("counter"); + bool instrumentsPublished = false; + bool instrumentCompleted = false; + long counterValue = 100; + + using (MeterListener listener = new MeterListener + { + InstrumentPublished = (instruments, theListener) => instrumentsPublished = true, + MeasurementsCompleted = (instruments, state) => instrumentCompleted = true + }) + { + listener.EnableMeasurementEvents(counter, null); + listener.SetMeasurementEventCallback((inst, measurement, tags, state) => counterValue = measurement); + listener.Start(); + + Assert.Equal(isSupported, counter.Enabled); + + counter.Add(20); + } + meter.Dispose(); + + Assert.Equal(isSupported, instrumentsPublished); + Assert.Equal(isSupported, instrumentCompleted); + Assert.Equal(isSupported ? 20 : 100, counterValue); + }, value.ToString(), options).Dispose(); + } + } +} diff --git a/src/libraries/System.Diagnostics.EventLog/System.Diagnostics.EventLog.sln b/src/libraries/System.Diagnostics.EventLog/System.Diagnostics.EventLog.sln index 5f90558440e609..c59acbb401865c 100644 --- a/src/libraries/System.Diagnostics.EventLog/System.Diagnostics.EventLog.sln +++ b/src/libraries/System.Diagnostics.EventLog/System.Diagnostics.EventLog.sln @@ -9,12 +9,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.EventLog EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.EventLog.Tests", "tests\System.Diagnostics.EventLog.Tests.csproj", "{DE282697-BDF2-4FC7-B34C-911F35AE47D6}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{21DD40E5-CB83-4946-AD7D-04816A087CF0}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{C470A83B-8C8C-4C87-9A3F-31B2E0070A13}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{D49EF33F-919D-4DE5-B4B1-CF6697EF3806}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{545F883A-09C0-4390-A199-09F8C2357926}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{428AA723-E444-4F5A-B7D5-7C8AB0EF6D40}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{BF39A676-D8BB-4340-9EBC-CDC5C1C512C8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{E8645748-FEE1-4FC7-8036-DBC069FFADDD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{ACB7C6A9-90A4-42B2-B304-8F11E973D88E}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{1E261D15-54E1-424E-BE7F-400B01EFE870}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{FFB9A9A0-BCDB-42B1-9D58-E25AC8B95C4C}" @@ -23,6 +31,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{DBD1571C-058 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{1096CED3-1AA7-4FA5-BF1A-EEFD977B6D3B}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{B18C3D31-F222-4259-A29E-0803ED18C3A1}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{F6FD11BE-189A-4E7D-99D2-D241EB9B5883}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{8ECCB312-5CC4-4324-9850-3F9AC44B6960}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{17C71A4D-2C4A-42AA-8880-3AFBE513A6E1}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -49,10 +65,6 @@ Global {DE282697-BDF2-4FC7-B34C-911F35AE47D6}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE282697-BDF2-4FC7-B34C-911F35AE47D6}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE282697-BDF2-4FC7-B34C-911F35AE47D6}.Release|Any CPU.Build.0 = Release|Any CPU - {21DD40E5-CB83-4946-AD7D-04816A087CF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {21DD40E5-CB83-4946-AD7D-04816A087CF0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {21DD40E5-CB83-4946-AD7D-04816A087CF0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {21DD40E5-CB83-4946-AD7D-04816A087CF0}.Release|Any CPU.Build.0 = Release|Any CPU {C470A83B-8C8C-4C87-9A3F-31B2E0070A13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C470A83B-8C8C-4C87-9A3F-31B2E0070A13}.Debug|Any CPU.Build.0 = Debug|Any CPU {C470A83B-8C8C-4C87-9A3F-31B2E0070A13}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -61,6 +73,26 @@ Global {D49EF33F-919D-4DE5-B4B1-CF6697EF3806}.Debug|Any CPU.Build.0 = Debug|Any CPU {D49EF33F-919D-4DE5-B4B1-CF6697EF3806}.Release|Any CPU.ActiveCfg = Release|Any CPU {D49EF33F-919D-4DE5-B4B1-CF6697EF3806}.Release|Any CPU.Build.0 = Release|Any CPU + {545F883A-09C0-4390-A199-09F8C2357926}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {545F883A-09C0-4390-A199-09F8C2357926}.Debug|Any CPU.Build.0 = Debug|Any CPU + {545F883A-09C0-4390-A199-09F8C2357926}.Release|Any CPU.ActiveCfg = Release|Any CPU + {545F883A-09C0-4390-A199-09F8C2357926}.Release|Any CPU.Build.0 = Release|Any CPU + {428AA723-E444-4F5A-B7D5-7C8AB0EF6D40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {428AA723-E444-4F5A-B7D5-7C8AB0EF6D40}.Debug|Any CPU.Build.0 = Debug|Any CPU + {428AA723-E444-4F5A-B7D5-7C8AB0EF6D40}.Release|Any CPU.ActiveCfg = Release|Any CPU + {428AA723-E444-4F5A-B7D5-7C8AB0EF6D40}.Release|Any CPU.Build.0 = Release|Any CPU + {BF39A676-D8BB-4340-9EBC-CDC5C1C512C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BF39A676-D8BB-4340-9EBC-CDC5C1C512C8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BF39A676-D8BB-4340-9EBC-CDC5C1C512C8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BF39A676-D8BB-4340-9EBC-CDC5C1C512C8}.Release|Any CPU.Build.0 = Release|Any CPU + {E8645748-FEE1-4FC7-8036-DBC069FFADDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E8645748-FEE1-4FC7-8036-DBC069FFADDD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E8645748-FEE1-4FC7-8036-DBC069FFADDD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E8645748-FEE1-4FC7-8036-DBC069FFADDD}.Release|Any CPU.Build.0 = Release|Any CPU + {ACB7C6A9-90A4-42B2-B304-8F11E973D88E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ACB7C6A9-90A4-42B2-B304-8F11E973D88E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ACB7C6A9-90A4-42B2-B304-8F11E973D88E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ACB7C6A9-90A4-42B2-B304-8F11E973D88E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -71,9 +103,16 @@ Global {635F5794-A69E-489D-9D1F-1D20D3DDE740} = {FFB9A9A0-BCDB-42B1-9D58-E25AC8B95C4C} {A5B6EFFE-E24B-4DC8-B0FA-68ADCE59B74C} = {DBD1571C-0586-470C-83A4-84A174680603} {5BB72C32-4B04-415E-A504-F41F2FE0E54D} = {DBD1571C-0586-470C-83A4-84A174680603} - {21DD40E5-CB83-4946-AD7D-04816A087CF0} = {1096CED3-1AA7-4FA5-BF1A-EEFD977B6D3B} {C470A83B-8C8C-4C87-9A3F-31B2E0070A13} = {1096CED3-1AA7-4FA5-BF1A-EEFD977B6D3B} {D49EF33F-919D-4DE5-B4B1-CF6697EF3806} = {1096CED3-1AA7-4FA5-BF1A-EEFD977B6D3B} + {545F883A-09C0-4390-A199-09F8C2357926} = {B18C3D31-F222-4259-A29E-0803ED18C3A1} + {428AA723-E444-4F5A-B7D5-7C8AB0EF6D40} = {B18C3D31-F222-4259-A29E-0803ED18C3A1} + {B18C3D31-F222-4259-A29E-0803ED18C3A1} = {17C71A4D-2C4A-42AA-8880-3AFBE513A6E1} + {BF39A676-D8BB-4340-9EBC-CDC5C1C512C8} = {F6FD11BE-189A-4E7D-99D2-D241EB9B5883} + {E8645748-FEE1-4FC7-8036-DBC069FFADDD} = {F6FD11BE-189A-4E7D-99D2-D241EB9B5883} + {F6FD11BE-189A-4E7D-99D2-D241EB9B5883} = {17C71A4D-2C4A-42AA-8880-3AFBE513A6E1} + {ACB7C6A9-90A4-42B2-B304-8F11E973D88E} = {8ECCB312-5CC4-4324-9850-3F9AC44B6960} + {8ECCB312-5CC4-4324-9850-3F9AC44B6960} = {17C71A4D-2C4A-42AA-8880-3AFBE513A6E1} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {3DB51F1D-40A4-4B5E-85BF-74CCDEE2FAA7} diff --git a/src/libraries/System.Diagnostics.EventLog/src/CompatibilitySuppressions.xml b/src/libraries/System.Diagnostics.EventLog/src/CompatibilitySuppressions.xml index 8969e45b4ad4bf..ce50f7c4df7cb4 100644 --- a/src/libraries/System.Diagnostics.EventLog/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Diagnostics.EventLog/src/CompatibilitySuppressions.xml @@ -1,9 +1,50 @@  + + + CP0002 + M:System.Diagnostics.Eventing.Reader.EventBookmark.#ctor(System.String) + lib/net6.0/System.Diagnostics.EventLog.dll + lib/netstandard2.0/System.Diagnostics.EventLog.dll + true + + + CP0002 + M:System.Diagnostics.Eventing.Reader.EventBookmark.get_BookmarkXml + lib/net6.0/System.Diagnostics.EventLog.dll + lib/netstandard2.0/System.Diagnostics.EventLog.dll + true + + + CP0002 + M:System.Diagnostics.Eventing.Reader.EventBookmark.#ctor(System.String) + lib/net7.0/System.Diagnostics.EventLog.dll + lib/netstandard2.0/System.Diagnostics.EventLog.dll + true + + + CP0002 + M:System.Diagnostics.Eventing.Reader.EventBookmark.get_BookmarkXml + lib/net7.0/System.Diagnostics.EventLog.dll + lib/netstandard2.0/System.Diagnostics.EventLog.dll + true + CP0004 System.Diagnostics.EventLog.Messages, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 + + CP0004 + System.Diagnostics.EventLog.Messages, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 + left + runtimes/win/lib/net8.0/System.Diagnostics.EventLog.Messages.dll + + + CP0004 + System.Diagnostics.EventLog.Messages, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 + left + runtimes/win/lib/net9.0/System.Diagnostics.EventLog.Messages.dll + CP0015 F:System.Diagnostics.Eventing.Reader.StandardEventKeywords.CorrelationHint:[T:System.ObsoleteAttribute] @@ -22,4 +63,32 @@ lib/netstandard2.0/System.Diagnostics.EventLog.dll lib/net462/System.Diagnostics.EventLog.dll + + CP1002 + System.ComponentModel.Primitives, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.Diagnostics.EventLog.dll + lib/netstandard2.0/System.Diagnostics.EventLog.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.Diagnostics.EventLog.dll + lib/netstandard2.0/System.Diagnostics.EventLog.dll + true + + + CP1002 + System.ComponentModel.Primitives, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.Diagnostics.EventLog.dll + lib/netstandard2.0/System.Diagnostics.EventLog.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.Diagnostics.EventLog.dll + lib/netstandard2.0/System.Diagnostics.EventLog.dll + true + \ No newline at end of file diff --git a/src/libraries/System.Diagnostics.EventLog/src/PACKAGE.md b/src/libraries/System.Diagnostics.EventLog/src/PACKAGE.md new file mode 100644 index 00000000000000..56e111a68ac802 --- /dev/null +++ b/src/libraries/System.Diagnostics.EventLog/src/PACKAGE.md @@ -0,0 +1,87 @@ +## About + + + +This package provides types that allow applications to interact with the Windows Event Log service. + +When an error occurs in a Windows machine, the system administrator or support representative must determine what caused the error, attempt to recover any lost data, and prevent the error from recurring. It is helpful if applications, the operating system, and other system services record important events, such as low-memory conditions or excessive attempts to access a disk. The system administrator can then use the Windows Event Log to help determine what conditions caused the error and identify the context in which it occurred. + +## Key Features + + + +* Allows reading from existing logs. +* Allows writing entries to logs. +* Can create or delete event sources. +* Can delete logs. +* Can respond to log entries. +* Can create new logs when creating an event source. + +## How to Use + + + +```cs +if(!EventLog.SourceExists("MySource")) +{ + // An event log source should not be created and immediately used. + // There is a latency time to enable the source, it should be created + // prior to executing the application that uses the source. + // Execute this sample a second time to use the new source. + EventLog.CreateEventSource("MySource", "MyNewLog"); + Console.WriteLine("Event source created. Exiting, execute the application a second time to use the source."); + // The source is created. Exit the application to allow it to be registered. + return; +} + +EventLog myLog = new(); +myLog.Source = "MySource"; +myLog.WriteEntry("Writing an informational entry to the event log."); +``` + +Notes: + +- This assembly is only supported on Windows operating systems. +- Starting with Windows Vista, you must run the application as an administrator to interact with the Windows Event Log service using the `System.Diagnostics.EventLog` class. + +## Main Types + + + +The main types provided by this library are: + +Under the [`System.Diagnostics`](https://learn.microsoft.com/dotnet/api/System.Diagnostics) namespace, the main types are: + +- [`System.Diagnostics.EventLog`](https://learn.microsoft.com/dotnet/api/System.Diagnostics.EventLog) +- [`System.Diagnostics.EventLogEntry`](https://learn.microsoft.com/dotnet/api/System.Diagnostics.EventLogEntry) +- [`System.Diagnostics.EventLogEntryCollection`](https://learn.microsoft.com/dotnet/api/System.Diagnostics.EventLogEntryCollection) +- [`System.Diagnostics.EventLogEntryType`](https://learn.microsoft.com/dotnet/api/System.Diagnostics.EventLogEntryType) + +Under the [`System.Diagnostics.Eventing.Reader`](https://learn.microsoft.com/dotnet/api/System.Diagnostics.Eventing.Reader) namespace, the main types are: + +- [`System.Diagnostics.Eventing.Reader.EventLogQuery`](https://learn.microsoft.com/dotnet/api/System.Diagnostics.Eventing.Reader.EventLogQuery) +- [`System.Diagnostics.Eventing.Reader.EventLogReader`](https://learn.microsoft.com/dotnet/api/System.Diagnostics.Eventing.Reader.EventLogReader) +- [`System.Diagnostics.Eventing.Reader.EventLogRecord`](https://learn.microsoft.com/dotnet/api/System.Diagnostics.Eventing.Reader.EventLogRecord) +- [`System.Diagnostics.Eventing.Reader.EventLogSession`](https://learn.microsoft.com/dotnet/api/System.Diagnostics.Eventing.Reader.EventLogSession) +- [`System.Diagnostics.Eventing.Reader.EventLogType`](https://learn.microsoft.com/dotnet/api/System.Diagnostics.Eventing.Reader.EventLogType) +- [`System.Diagnostics.Eventing.Reader.EventRecord`](https://learn.microsoft.com/dotnet/api/System.Diagnostics.Eventing.Reader.EventRecord) + +## Additional Documentation + + + +- [Microsoft Learn - System.Diagnostics.EventLog API reference](https://learn.microsoft.com/dotnet/api/System.Diagnostics.EventLog) +- [Windows App Development - Event logging](https://learn.microsoft.com/windows/win32/eventlog/event-logging) +- [GitHub - Source code](https://github.com/dotnet/runtime/tree/main/src/libraries/System.Diagnostics.EventLog) + +## Related Packages + + + +- [System.Diagnostics.PerformanceCounter](https://www.nuget.org/packages/System.Diagnostics.PerformanceCounter) + +## Feedback & Contributing + + + +System.Diagnostics.EventLog is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). diff --git a/src/libraries/System.Diagnostics.EventLog/src/System.Diagnostics.EventLog.csproj b/src/libraries/System.Diagnostics.EventLog/src/System.Diagnostics.EventLog.csproj index 96deaca0a27ddf..cc73f2a6daa4e8 100644 --- a/src/libraries/System.Diagnostics.EventLog/src/System.Diagnostics.EventLog.csproj +++ b/src/libraries/System.Diagnostics.EventLog/src/System.Diagnostics.EventLog.csproj @@ -114,7 +114,7 @@ System.Diagnostics.EventLog Link="Common\System\Obsoletions.cs" /> - + diff --git a/src/libraries/System.Diagnostics.FileVersionInfo/System.Diagnostics.FileVersionInfo.sln b/src/libraries/System.Diagnostics.FileVersionInfo/System.Diagnostics.FileVersionInfo.sln index 0c4eb45edbe957..261723cd522335 100644 --- a/src/libraries/System.Diagnostics.FileVersionInfo/System.Diagnostics.FileVersionInfo.sln +++ b/src/libraries/System.Diagnostics.FileVersionInfo/System.Diagnostics.FileVersionInfo.sln @@ -17,6 +17,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{25C578E4-95E6-41C1-9B4C-E4C20619C14D}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{46D26418-BF6C-4743-A862-B88FB2C1209D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{20C124DF-2D95-4A5E-B0D4-ED958AC21D66}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{4A2144EA-773A-4645-857F-C730AF25557C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{B4448892-B17A-402E-A02A-C7CCA5BFE00B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{9C430847-57F6-4465-996B-0F2203510B6D}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{8042448A-EB54-4EBB-A1E0-BAA0B5A343D8}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{36141B8B-E6F5-4AAF-A053-BDD189531BAF}" @@ -25,6 +35,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{888B9739-0B7 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{AC3F6844-B70D-4DC3-A930-43073DA6F2D8}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{CABCA940-694B-4ED8-9239-411DE575C92D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{CBA9A586-579F-4271-BD99-29C80BE189E5}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{1F6EC09A-35CD-4D9A-ACF8-F0C61786E0BB}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{C54C5A63-4C70-40F0-9F7F-6E2432A24617}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -67,6 +85,26 @@ Global {25C578E4-95E6-41C1-9B4C-E4C20619C14D}.Debug|Any CPU.Build.0 = Debug|Any CPU {25C578E4-95E6-41C1-9B4C-E4C20619C14D}.Release|Any CPU.ActiveCfg = Release|Any CPU {25C578E4-95E6-41C1-9B4C-E4C20619C14D}.Release|Any CPU.Build.0 = Release|Any CPU + {46D26418-BF6C-4743-A862-B88FB2C1209D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {46D26418-BF6C-4743-A862-B88FB2C1209D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {46D26418-BF6C-4743-A862-B88FB2C1209D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {46D26418-BF6C-4743-A862-B88FB2C1209D}.Release|Any CPU.Build.0 = Release|Any CPU + {20C124DF-2D95-4A5E-B0D4-ED958AC21D66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {20C124DF-2D95-4A5E-B0D4-ED958AC21D66}.Debug|Any CPU.Build.0 = Debug|Any CPU + {20C124DF-2D95-4A5E-B0D4-ED958AC21D66}.Release|Any CPU.ActiveCfg = Release|Any CPU + {20C124DF-2D95-4A5E-B0D4-ED958AC21D66}.Release|Any CPU.Build.0 = Release|Any CPU + {4A2144EA-773A-4645-857F-C730AF25557C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4A2144EA-773A-4645-857F-C730AF25557C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4A2144EA-773A-4645-857F-C730AF25557C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4A2144EA-773A-4645-857F-C730AF25557C}.Release|Any CPU.Build.0 = Release|Any CPU + {B4448892-B17A-402E-A02A-C7CCA5BFE00B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B4448892-B17A-402E-A02A-C7CCA5BFE00B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B4448892-B17A-402E-A02A-C7CCA5BFE00B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B4448892-B17A-402E-A02A-C7CCA5BFE00B}.Release|Any CPU.Build.0 = Release|Any CPU + {9C430847-57F6-4465-996B-0F2203510B6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9C430847-57F6-4465-996B-0F2203510B6D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9C430847-57F6-4465-996B-0F2203510B6D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9C430847-57F6-4465-996B-0F2203510B6D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -81,6 +119,14 @@ Global {74DEABD1-2996-4B68-8D08-B5BD4F467172} = {AC3F6844-B70D-4DC3-A930-43073DA6F2D8} {B9224F74-9714-4C37-895C-BFAE0FC97B59} = {AC3F6844-B70D-4DC3-A930-43073DA6F2D8} {C07D96C2-F7BA-45D5-BAE2-C06B68FF9F05} = {AC3F6844-B70D-4DC3-A930-43073DA6F2D8} + {46D26418-BF6C-4743-A862-B88FB2C1209D} = {CABCA940-694B-4ED8-9239-411DE575C92D} + {20C124DF-2D95-4A5E-B0D4-ED958AC21D66} = {CABCA940-694B-4ED8-9239-411DE575C92D} + {CABCA940-694B-4ED8-9239-411DE575C92D} = {C54C5A63-4C70-40F0-9F7F-6E2432A24617} + {4A2144EA-773A-4645-857F-C730AF25557C} = {CBA9A586-579F-4271-BD99-29C80BE189E5} + {B4448892-B17A-402E-A02A-C7CCA5BFE00B} = {CBA9A586-579F-4271-BD99-29C80BE189E5} + {CBA9A586-579F-4271-BD99-29C80BE189E5} = {C54C5A63-4C70-40F0-9F7F-6E2432A24617} + {9C430847-57F6-4465-996B-0F2203510B6D} = {1F6EC09A-35CD-4D9A-ACF8-F0C61786E0BB} + {1F6EC09A-35CD-4D9A-ACF8-F0C61786E0BB} = {C54C5A63-4C70-40F0-9F7F-6E2432A24617} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {9FDF2FF3-5DFC-45E8-9959-B59FF906E689} diff --git a/src/libraries/System.Diagnostics.PerformanceCounter/System.Diagnostics.PerformanceCounter.sln b/src/libraries/System.Diagnostics.PerformanceCounter/System.Diagnostics.PerformanceCounter.sln index e2fd034c8e6ca4..bf2afdb2c49ec2 100644 --- a/src/libraries/System.Diagnostics.PerformanceCounter/System.Diagnostics.PerformanceCounter.sln +++ b/src/libraries/System.Diagnostics.PerformanceCounter/System.Diagnostics.PerformanceCounter.sln @@ -1,6 +1,10 @@ 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", "{0BC84292-E0FC-4A10-87A3-3F0A5167541F}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{20B92E8C-E720-4B5A-8647-97CC1BD71E84}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Drawing.Common", "..\shims\stubs\System.Drawing.Common.csproj", "{1E95BC53-583D-4DDD-9E70-6F04D2D0C991}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Configuration.ConfigurationManager", "..\System.Configuration.ConfigurationManager\ref\System.Configuration.ConfigurationManager.csproj", "{067570A0-D55A-4ECC-A478-B1CBC676E9F3}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Configuration.ConfigurationManager", "..\System.Configuration.ConfigurationManager\src\System.Configuration.ConfigurationManager.csproj", "{96328529-3EB5-4BA4-9998-CB85E279E7F2}" @@ -17,12 +21,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.Performa EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.PerformanceCounter.Tests", "tests\System.Diagnostics.PerformanceCounter.Tests.csproj", "{EB8EF358-4028-4272-B71E-523F8D0A73F0}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{2AFAE46F-B182-4F1E-9F5F-D3EB747A714A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{C8008A7A-9910-4D19-AB2B-B96FF8538139}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{42924B5B-3EED-440B-9CB5-67F44F6E1592}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.Uri", "..\System.Private.Uri\src\System.Private.Uri.csproj", "{9F6EC049-D2C2-4228-B043-96D0918DF894}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{11F700BE-429D-4AAA-B797-4C6322503872}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{B690A8D8-E3BF-44D3-8FBC-D64A517B8AF3}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{1AB14FD6-D3B1-4FE4-9595-F51D53584568}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\src\System.Runtime.csproj", "{3BD4F46F-4EF5-478C-9FA4-C8ABE2E703DF}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography.ProtectedData", "..\System.Security.Cryptography.ProtectedData\ref\System.Security.Cryptography.ProtectedData.csproj", "{2C707BFF-6BA9-4EB8-BC75-5341391B5FC6}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography.ProtectedData", "..\System.Security.Cryptography.ProtectedData\src\System.Security.Cryptography.ProtectedData.csproj", "{43214093-FA08-4699-A62B-D7BC858BAC78}" @@ -35,115 +47,708 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", "..\System.Windows.Extensions\src\System.Windows.Extensions.csproj", "{60DB3C65-9EDA-45AA-85E6-37F1375CF1E7}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{B9925565-A803-4F7E-BABC-377A5DE41344}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{E33CEC60-CDBC-42F4-BF7C-55BFD8D3F9C2}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{BFF04E9C-277E-4CE3-8D38-FAFCA9B2D872}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{AFDC7537-6348-49DD-A678-62BC2AEB6A2D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{DCE05EB6-6F18-48C1-9252-994EC75601E6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{9C0272A9-70D5-4917-B918-9E44F14B0488}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{5489EFA6-E32A-4B53-AC04-862DCE8B4E86}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{0C89B197-6F7B-48BE-A6B9-885DAD4BDFBE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{B9925565-A803-4F7E-BABC-377A5DE41344}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{F2408438-D7E0-4D89-97B1-EDCC83EA8442}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{BFF04E9C-277E-4CE3-8D38-FAFCA9B2D872}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{651A1BB1-501D-45DA-9284-77F8FC083889}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{9C612F41-D9CB-48D7-92BE-B364078E1D66}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{6DCD869A-C586-4328-B60E-0086398DBA35}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{3C20311A-FA3F-4B39-AC72-103011866E88}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{8374E1B5-B64E-496F-86C2-D8907A804B9C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|arm = Debug|arm + Debug|arm64 = Debug|arm64 + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|arm = Release|arm + Release|arm64 = Release|arm64 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + Checked|Any CPU = Checked|Any CPU + Checked|arm = Checked|arm + Checked|arm64 = Checked|arm64 + Checked|x64 = Checked|x64 + Checked|x86 = Checked|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0BC84292-E0FC-4A10-87A3-3F0A5167541F}.Debug|Any CPU.ActiveCfg = Debug|x64 + {0BC84292-E0FC-4A10-87A3-3F0A5167541F}.Debug|Any CPU.Build.0 = Debug|x64 + {0BC84292-E0FC-4A10-87A3-3F0A5167541F}.Debug|arm.ActiveCfg = Debug|arm + {0BC84292-E0FC-4A10-87A3-3F0A5167541F}.Debug|arm.Build.0 = Debug|arm + {0BC84292-E0FC-4A10-87A3-3F0A5167541F}.Debug|arm64.ActiveCfg = Debug|arm64 + {0BC84292-E0FC-4A10-87A3-3F0A5167541F}.Debug|arm64.Build.0 = Debug|arm64 + {0BC84292-E0FC-4A10-87A3-3F0A5167541F}.Debug|x64.ActiveCfg = Debug|x64 + {0BC84292-E0FC-4A10-87A3-3F0A5167541F}.Debug|x64.Build.0 = Debug|x64 + {0BC84292-E0FC-4A10-87A3-3F0A5167541F}.Debug|x86.ActiveCfg = Debug|x86 + {0BC84292-E0FC-4A10-87A3-3F0A5167541F}.Debug|x86.Build.0 = Debug|x86 + {0BC84292-E0FC-4A10-87A3-3F0A5167541F}.Release|Any CPU.ActiveCfg = Release|x64 + {0BC84292-E0FC-4A10-87A3-3F0A5167541F}.Release|Any CPU.Build.0 = Release|x64 + {0BC84292-E0FC-4A10-87A3-3F0A5167541F}.Release|arm.ActiveCfg = Release|arm + {0BC84292-E0FC-4A10-87A3-3F0A5167541F}.Release|arm.Build.0 = Release|arm + {0BC84292-E0FC-4A10-87A3-3F0A5167541F}.Release|arm64.ActiveCfg = Release|arm64 + {0BC84292-E0FC-4A10-87A3-3F0A5167541F}.Release|arm64.Build.0 = Release|arm64 + {0BC84292-E0FC-4A10-87A3-3F0A5167541F}.Release|x64.ActiveCfg = Release|x64 + {0BC84292-E0FC-4A10-87A3-3F0A5167541F}.Release|x64.Build.0 = Release|x64 + {0BC84292-E0FC-4A10-87A3-3F0A5167541F}.Release|x86.ActiveCfg = Release|x86 + {0BC84292-E0FC-4A10-87A3-3F0A5167541F}.Release|x86.Build.0 = Release|x86 + {0BC84292-E0FC-4A10-87A3-3F0A5167541F}.Checked|Any CPU.ActiveCfg = Checked|x64 + {0BC84292-E0FC-4A10-87A3-3F0A5167541F}.Checked|Any CPU.Build.0 = Checked|x64 + {0BC84292-E0FC-4A10-87A3-3F0A5167541F}.Checked|arm.ActiveCfg = Checked|arm + {0BC84292-E0FC-4A10-87A3-3F0A5167541F}.Checked|arm.Build.0 = Checked|arm + {0BC84292-E0FC-4A10-87A3-3F0A5167541F}.Checked|arm64.ActiveCfg = Checked|arm64 + {0BC84292-E0FC-4A10-87A3-3F0A5167541F}.Checked|arm64.Build.0 = Checked|arm64 + {0BC84292-E0FC-4A10-87A3-3F0A5167541F}.Checked|x64.ActiveCfg = Checked|x64 + {0BC84292-E0FC-4A10-87A3-3F0A5167541F}.Checked|x64.Build.0 = Checked|x64 + {0BC84292-E0FC-4A10-87A3-3F0A5167541F}.Checked|x86.ActiveCfg = Checked|x86 + {0BC84292-E0FC-4A10-87A3-3F0A5167541F}.Checked|x86.Build.0 = Checked|x86 {20B92E8C-E720-4B5A-8647-97CC1BD71E84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {20B92E8C-E720-4B5A-8647-97CC1BD71E84}.Debug|Any CPU.Build.0 = Debug|Any CPU + {20B92E8C-E720-4B5A-8647-97CC1BD71E84}.Debug|arm.ActiveCfg = Debug|Any CPU + {20B92E8C-E720-4B5A-8647-97CC1BD71E84}.Debug|arm64.ActiveCfg = Debug|Any CPU + {20B92E8C-E720-4B5A-8647-97CC1BD71E84}.Debug|x64.ActiveCfg = Debug|Any CPU + {20B92E8C-E720-4B5A-8647-97CC1BD71E84}.Debug|x64.Build.0 = Debug|Any CPU + {20B92E8C-E720-4B5A-8647-97CC1BD71E84}.Debug|x86.ActiveCfg = Debug|Any CPU + {20B92E8C-E720-4B5A-8647-97CC1BD71E84}.Debug|x86.Build.0 = Debug|Any CPU {20B92E8C-E720-4B5A-8647-97CC1BD71E84}.Release|Any CPU.ActiveCfg = Release|Any CPU {20B92E8C-E720-4B5A-8647-97CC1BD71E84}.Release|Any CPU.Build.0 = Release|Any CPU + {20B92E8C-E720-4B5A-8647-97CC1BD71E84}.Release|arm.ActiveCfg = Release|Any CPU + {20B92E8C-E720-4B5A-8647-97CC1BD71E84}.Release|arm64.ActiveCfg = Release|Any CPU + {20B92E8C-E720-4B5A-8647-97CC1BD71E84}.Release|x64.ActiveCfg = Release|Any CPU + {20B92E8C-E720-4B5A-8647-97CC1BD71E84}.Release|x64.Build.0 = Release|Any CPU + {20B92E8C-E720-4B5A-8647-97CC1BD71E84}.Release|x86.ActiveCfg = Release|Any CPU + {20B92E8C-E720-4B5A-8647-97CC1BD71E84}.Release|x86.Build.0 = Release|Any CPU + {20B92E8C-E720-4B5A-8647-97CC1BD71E84}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {20B92E8C-E720-4B5A-8647-97CC1BD71E84}.Checked|arm.ActiveCfg = Debug|Any CPU + {20B92E8C-E720-4B5A-8647-97CC1BD71E84}.Checked|arm64.ActiveCfg = Debug|Any CPU + {20B92E8C-E720-4B5A-8647-97CC1BD71E84}.Checked|x64.ActiveCfg = Debug|Any CPU + {20B92E8C-E720-4B5A-8647-97CC1BD71E84}.Checked|x86.ActiveCfg = Debug|Any CPU + {1E95BC53-583D-4DDD-9E70-6F04D2D0C991}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1E95BC53-583D-4DDD-9E70-6F04D2D0C991}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1E95BC53-583D-4DDD-9E70-6F04D2D0C991}.Debug|arm.ActiveCfg = Debug|Any CPU + {1E95BC53-583D-4DDD-9E70-6F04D2D0C991}.Debug|arm64.ActiveCfg = Debug|Any CPU + {1E95BC53-583D-4DDD-9E70-6F04D2D0C991}.Debug|x64.ActiveCfg = Debug|Any CPU + {1E95BC53-583D-4DDD-9E70-6F04D2D0C991}.Debug|x64.Build.0 = Debug|Any CPU + {1E95BC53-583D-4DDD-9E70-6F04D2D0C991}.Debug|x86.ActiveCfg = Debug|Any CPU + {1E95BC53-583D-4DDD-9E70-6F04D2D0C991}.Debug|x86.Build.0 = Debug|Any CPU + {1E95BC53-583D-4DDD-9E70-6F04D2D0C991}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1E95BC53-583D-4DDD-9E70-6F04D2D0C991}.Release|Any CPU.Build.0 = Release|Any CPU + {1E95BC53-583D-4DDD-9E70-6F04D2D0C991}.Release|arm.ActiveCfg = Release|Any CPU + {1E95BC53-583D-4DDD-9E70-6F04D2D0C991}.Release|arm64.ActiveCfg = Release|Any CPU + {1E95BC53-583D-4DDD-9E70-6F04D2D0C991}.Release|x64.ActiveCfg = Release|Any CPU + {1E95BC53-583D-4DDD-9E70-6F04D2D0C991}.Release|x64.Build.0 = Release|Any CPU + {1E95BC53-583D-4DDD-9E70-6F04D2D0C991}.Release|x86.ActiveCfg = Release|Any CPU + {1E95BC53-583D-4DDD-9E70-6F04D2D0C991}.Release|x86.Build.0 = Release|Any CPU + {1E95BC53-583D-4DDD-9E70-6F04D2D0C991}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {1E95BC53-583D-4DDD-9E70-6F04D2D0C991}.Checked|arm.ActiveCfg = Debug|Any CPU + {1E95BC53-583D-4DDD-9E70-6F04D2D0C991}.Checked|arm64.ActiveCfg = Debug|Any CPU + {1E95BC53-583D-4DDD-9E70-6F04D2D0C991}.Checked|x64.ActiveCfg = Debug|Any CPU + {1E95BC53-583D-4DDD-9E70-6F04D2D0C991}.Checked|x86.ActiveCfg = Debug|Any CPU {067570A0-D55A-4ECC-A478-B1CBC676E9F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {067570A0-D55A-4ECC-A478-B1CBC676E9F3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {067570A0-D55A-4ECC-A478-B1CBC676E9F3}.Debug|arm.ActiveCfg = Debug|Any CPU + {067570A0-D55A-4ECC-A478-B1CBC676E9F3}.Debug|arm64.ActiveCfg = Debug|Any CPU + {067570A0-D55A-4ECC-A478-B1CBC676E9F3}.Debug|x64.ActiveCfg = Debug|Any CPU + {067570A0-D55A-4ECC-A478-B1CBC676E9F3}.Debug|x64.Build.0 = Debug|Any CPU + {067570A0-D55A-4ECC-A478-B1CBC676E9F3}.Debug|x86.ActiveCfg = Debug|Any CPU + {067570A0-D55A-4ECC-A478-B1CBC676E9F3}.Debug|x86.Build.0 = Debug|Any CPU {067570A0-D55A-4ECC-A478-B1CBC676E9F3}.Release|Any CPU.ActiveCfg = Release|Any CPU {067570A0-D55A-4ECC-A478-B1CBC676E9F3}.Release|Any CPU.Build.0 = Release|Any CPU + {067570A0-D55A-4ECC-A478-B1CBC676E9F3}.Release|arm.ActiveCfg = Release|Any CPU + {067570A0-D55A-4ECC-A478-B1CBC676E9F3}.Release|arm64.ActiveCfg = Release|Any CPU + {067570A0-D55A-4ECC-A478-B1CBC676E9F3}.Release|x64.ActiveCfg = Release|Any CPU + {067570A0-D55A-4ECC-A478-B1CBC676E9F3}.Release|x64.Build.0 = Release|Any CPU + {067570A0-D55A-4ECC-A478-B1CBC676E9F3}.Release|x86.ActiveCfg = Release|Any CPU + {067570A0-D55A-4ECC-A478-B1CBC676E9F3}.Release|x86.Build.0 = Release|Any CPU + {067570A0-D55A-4ECC-A478-B1CBC676E9F3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {067570A0-D55A-4ECC-A478-B1CBC676E9F3}.Checked|arm.ActiveCfg = Debug|Any CPU + {067570A0-D55A-4ECC-A478-B1CBC676E9F3}.Checked|arm64.ActiveCfg = Debug|Any CPU + {067570A0-D55A-4ECC-A478-B1CBC676E9F3}.Checked|x64.ActiveCfg = Debug|Any CPU + {067570A0-D55A-4ECC-A478-B1CBC676E9F3}.Checked|x86.ActiveCfg = Debug|Any CPU {96328529-3EB5-4BA4-9998-CB85E279E7F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {96328529-3EB5-4BA4-9998-CB85E279E7F2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {96328529-3EB5-4BA4-9998-CB85E279E7F2}.Debug|arm.ActiveCfg = Debug|Any CPU + {96328529-3EB5-4BA4-9998-CB85E279E7F2}.Debug|arm64.ActiveCfg = Debug|Any CPU + {96328529-3EB5-4BA4-9998-CB85E279E7F2}.Debug|x64.ActiveCfg = Debug|Any CPU + {96328529-3EB5-4BA4-9998-CB85E279E7F2}.Debug|x64.Build.0 = Debug|Any CPU + {96328529-3EB5-4BA4-9998-CB85E279E7F2}.Debug|x86.ActiveCfg = Debug|Any CPU + {96328529-3EB5-4BA4-9998-CB85E279E7F2}.Debug|x86.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 + {96328529-3EB5-4BA4-9998-CB85E279E7F2}.Release|arm.ActiveCfg = Release|Any CPU + {96328529-3EB5-4BA4-9998-CB85E279E7F2}.Release|arm64.ActiveCfg = Release|Any CPU + {96328529-3EB5-4BA4-9998-CB85E279E7F2}.Release|x64.ActiveCfg = Release|Any CPU + {96328529-3EB5-4BA4-9998-CB85E279E7F2}.Release|x64.Build.0 = Release|Any CPU + {96328529-3EB5-4BA4-9998-CB85E279E7F2}.Release|x86.ActiveCfg = Release|Any CPU + {96328529-3EB5-4BA4-9998-CB85E279E7F2}.Release|x86.Build.0 = Release|Any CPU + {96328529-3EB5-4BA4-9998-CB85E279E7F2}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {96328529-3EB5-4BA4-9998-CB85E279E7F2}.Checked|arm.ActiveCfg = Debug|Any CPU + {96328529-3EB5-4BA4-9998-CB85E279E7F2}.Checked|arm64.ActiveCfg = Debug|Any CPU + {96328529-3EB5-4BA4-9998-CB85E279E7F2}.Checked|x64.ActiveCfg = Debug|Any CPU + {96328529-3EB5-4BA4-9998-CB85E279E7F2}.Checked|x86.ActiveCfg = Debug|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}.Debug|arm.ActiveCfg = Debug|Any CPU + {084CF5E8-1BD4-4AD3-A80F-FD9E1C269826}.Debug|arm64.ActiveCfg = Debug|Any CPU + {084CF5E8-1BD4-4AD3-A80F-FD9E1C269826}.Debug|x64.ActiveCfg = Debug|Any CPU + {084CF5E8-1BD4-4AD3-A80F-FD9E1C269826}.Debug|x64.Build.0 = Debug|Any CPU + {084CF5E8-1BD4-4AD3-A80F-FD9E1C269826}.Debug|x86.ActiveCfg = Debug|Any CPU + {084CF5E8-1BD4-4AD3-A80F-FD9E1C269826}.Debug|x86.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 + {084CF5E8-1BD4-4AD3-A80F-FD9E1C269826}.Release|arm.ActiveCfg = Release|Any CPU + {084CF5E8-1BD4-4AD3-A80F-FD9E1C269826}.Release|arm64.ActiveCfg = Release|Any CPU + {084CF5E8-1BD4-4AD3-A80F-FD9E1C269826}.Release|x64.ActiveCfg = Release|Any CPU + {084CF5E8-1BD4-4AD3-A80F-FD9E1C269826}.Release|x64.Build.0 = Release|Any CPU + {084CF5E8-1BD4-4AD3-A80F-FD9E1C269826}.Release|x86.ActiveCfg = Release|Any CPU + {084CF5E8-1BD4-4AD3-A80F-FD9E1C269826}.Release|x86.Build.0 = Release|Any CPU + {084CF5E8-1BD4-4AD3-A80F-FD9E1C269826}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {084CF5E8-1BD4-4AD3-A80F-FD9E1C269826}.Checked|arm.ActiveCfg = Debug|Any CPU + {084CF5E8-1BD4-4AD3-A80F-FD9E1C269826}.Checked|arm64.ActiveCfg = Debug|Any CPU + {084CF5E8-1BD4-4AD3-A80F-FD9E1C269826}.Checked|x64.ActiveCfg = Debug|Any CPU + {084CF5E8-1BD4-4AD3-A80F-FD9E1C269826}.Checked|x86.ActiveCfg = Debug|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}.Debug|arm.ActiveCfg = Debug|Any CPU + {4D35D50B-936F-4867-A600-8D3A9A0CD0B5}.Debug|arm64.ActiveCfg = Debug|Any CPU + {4D35D50B-936F-4867-A600-8D3A9A0CD0B5}.Debug|x64.ActiveCfg = Debug|Any CPU + {4D35D50B-936F-4867-A600-8D3A9A0CD0B5}.Debug|x64.Build.0 = Debug|Any CPU + {4D35D50B-936F-4867-A600-8D3A9A0CD0B5}.Debug|x86.ActiveCfg = Debug|Any CPU + {4D35D50B-936F-4867-A600-8D3A9A0CD0B5}.Debug|x86.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 + {4D35D50B-936F-4867-A600-8D3A9A0CD0B5}.Release|arm.ActiveCfg = Release|Any CPU + {4D35D50B-936F-4867-A600-8D3A9A0CD0B5}.Release|arm64.ActiveCfg = Release|Any CPU + {4D35D50B-936F-4867-A600-8D3A9A0CD0B5}.Release|x64.ActiveCfg = Release|Any CPU + {4D35D50B-936F-4867-A600-8D3A9A0CD0B5}.Release|x64.Build.0 = Release|Any CPU + {4D35D50B-936F-4867-A600-8D3A9A0CD0B5}.Release|x86.ActiveCfg = Release|Any CPU + {4D35D50B-936F-4867-A600-8D3A9A0CD0B5}.Release|x86.Build.0 = Release|Any CPU + {4D35D50B-936F-4867-A600-8D3A9A0CD0B5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {4D35D50B-936F-4867-A600-8D3A9A0CD0B5}.Checked|arm.ActiveCfg = Debug|Any CPU + {4D35D50B-936F-4867-A600-8D3A9A0CD0B5}.Checked|arm64.ActiveCfg = Debug|Any CPU + {4D35D50B-936F-4867-A600-8D3A9A0CD0B5}.Checked|x64.ActiveCfg = Debug|Any CPU + {4D35D50B-936F-4867-A600-8D3A9A0CD0B5}.Checked|x86.ActiveCfg = Debug|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}.Debug|arm.ActiveCfg = Debug|Any CPU + {E9DA420E-43B7-4A00-99A7-7DBDE3FF3F20}.Debug|arm64.ActiveCfg = Debug|Any CPU + {E9DA420E-43B7-4A00-99A7-7DBDE3FF3F20}.Debug|x64.ActiveCfg = Debug|Any CPU + {E9DA420E-43B7-4A00-99A7-7DBDE3FF3F20}.Debug|x64.Build.0 = Debug|Any CPU + {E9DA420E-43B7-4A00-99A7-7DBDE3FF3F20}.Debug|x86.ActiveCfg = Debug|Any CPU + {E9DA420E-43B7-4A00-99A7-7DBDE3FF3F20}.Debug|x86.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 + {E9DA420E-43B7-4A00-99A7-7DBDE3FF3F20}.Release|arm.ActiveCfg = Release|Any CPU + {E9DA420E-43B7-4A00-99A7-7DBDE3FF3F20}.Release|arm64.ActiveCfg = Release|Any CPU + {E9DA420E-43B7-4A00-99A7-7DBDE3FF3F20}.Release|x64.ActiveCfg = Release|Any CPU + {E9DA420E-43B7-4A00-99A7-7DBDE3FF3F20}.Release|x64.Build.0 = Release|Any CPU + {E9DA420E-43B7-4A00-99A7-7DBDE3FF3F20}.Release|x86.ActiveCfg = Release|Any CPU + {E9DA420E-43B7-4A00-99A7-7DBDE3FF3F20}.Release|x86.Build.0 = Release|Any CPU + {E9DA420E-43B7-4A00-99A7-7DBDE3FF3F20}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {E9DA420E-43B7-4A00-99A7-7DBDE3FF3F20}.Checked|arm.ActiveCfg = Debug|Any CPU + {E9DA420E-43B7-4A00-99A7-7DBDE3FF3F20}.Checked|arm64.ActiveCfg = Debug|Any CPU + {E9DA420E-43B7-4A00-99A7-7DBDE3FF3F20}.Checked|x64.ActiveCfg = Debug|Any CPU + {E9DA420E-43B7-4A00-99A7-7DBDE3FF3F20}.Checked|x86.ActiveCfg = Debug|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}.Debug|arm.ActiveCfg = Debug|Any CPU + {D0C681EE-D578-4CD6-AA62-33874FCE3E37}.Debug|arm64.ActiveCfg = Debug|Any CPU + {D0C681EE-D578-4CD6-AA62-33874FCE3E37}.Debug|x64.ActiveCfg = Debug|Any CPU + {D0C681EE-D578-4CD6-AA62-33874FCE3E37}.Debug|x64.Build.0 = Debug|Any CPU + {D0C681EE-D578-4CD6-AA62-33874FCE3E37}.Debug|x86.ActiveCfg = Debug|Any CPU + {D0C681EE-D578-4CD6-AA62-33874FCE3E37}.Debug|x86.Build.0 = Debug|Any CPU {D0C681EE-D578-4CD6-AA62-33874FCE3E37}.Release|Any CPU.ActiveCfg = Release|Any CPU {D0C681EE-D578-4CD6-AA62-33874FCE3E37}.Release|Any CPU.Build.0 = Release|Any CPU + {D0C681EE-D578-4CD6-AA62-33874FCE3E37}.Release|arm.ActiveCfg = Release|Any CPU + {D0C681EE-D578-4CD6-AA62-33874FCE3E37}.Release|arm64.ActiveCfg = Release|Any CPU + {D0C681EE-D578-4CD6-AA62-33874FCE3E37}.Release|x64.ActiveCfg = Release|Any CPU + {D0C681EE-D578-4CD6-AA62-33874FCE3E37}.Release|x64.Build.0 = Release|Any CPU + {D0C681EE-D578-4CD6-AA62-33874FCE3E37}.Release|x86.ActiveCfg = Release|Any CPU + {D0C681EE-D578-4CD6-AA62-33874FCE3E37}.Release|x86.Build.0 = Release|Any CPU + {D0C681EE-D578-4CD6-AA62-33874FCE3E37}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {D0C681EE-D578-4CD6-AA62-33874FCE3E37}.Checked|arm.ActiveCfg = Debug|Any CPU + {D0C681EE-D578-4CD6-AA62-33874FCE3E37}.Checked|arm64.ActiveCfg = Debug|Any CPU + {D0C681EE-D578-4CD6-AA62-33874FCE3E37}.Checked|x64.ActiveCfg = Debug|Any CPU + {D0C681EE-D578-4CD6-AA62-33874FCE3E37}.Checked|x86.ActiveCfg = Debug|Any CPU {2B7C465F-44E2-4D0B-9A9F-30F20FA49A16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2B7C465F-44E2-4D0B-9A9F-30F20FA49A16}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2B7C465F-44E2-4D0B-9A9F-30F20FA49A16}.Debug|arm.ActiveCfg = Debug|Any CPU + {2B7C465F-44E2-4D0B-9A9F-30F20FA49A16}.Debug|arm64.ActiveCfg = Debug|Any CPU + {2B7C465F-44E2-4D0B-9A9F-30F20FA49A16}.Debug|x64.ActiveCfg = Debug|Any CPU + {2B7C465F-44E2-4D0B-9A9F-30F20FA49A16}.Debug|x64.Build.0 = Debug|Any CPU + {2B7C465F-44E2-4D0B-9A9F-30F20FA49A16}.Debug|x86.ActiveCfg = Debug|Any CPU + {2B7C465F-44E2-4D0B-9A9F-30F20FA49A16}.Debug|x86.Build.0 = Debug|Any CPU {2B7C465F-44E2-4D0B-9A9F-30F20FA49A16}.Release|Any CPU.ActiveCfg = Release|Any CPU {2B7C465F-44E2-4D0B-9A9F-30F20FA49A16}.Release|Any CPU.Build.0 = Release|Any CPU + {2B7C465F-44E2-4D0B-9A9F-30F20FA49A16}.Release|arm.ActiveCfg = Release|Any CPU + {2B7C465F-44E2-4D0B-9A9F-30F20FA49A16}.Release|arm64.ActiveCfg = Release|Any CPU + {2B7C465F-44E2-4D0B-9A9F-30F20FA49A16}.Release|x64.ActiveCfg = Release|Any CPU + {2B7C465F-44E2-4D0B-9A9F-30F20FA49A16}.Release|x64.Build.0 = Release|Any CPU + {2B7C465F-44E2-4D0B-9A9F-30F20FA49A16}.Release|x86.ActiveCfg = Release|Any CPU + {2B7C465F-44E2-4D0B-9A9F-30F20FA49A16}.Release|x86.Build.0 = Release|Any CPU + {2B7C465F-44E2-4D0B-9A9F-30F20FA49A16}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {2B7C465F-44E2-4D0B-9A9F-30F20FA49A16}.Checked|arm.ActiveCfg = Debug|Any CPU + {2B7C465F-44E2-4D0B-9A9F-30F20FA49A16}.Checked|arm64.ActiveCfg = Debug|Any CPU + {2B7C465F-44E2-4D0B-9A9F-30F20FA49A16}.Checked|x64.ActiveCfg = Debug|Any CPU + {2B7C465F-44E2-4D0B-9A9F-30F20FA49A16}.Checked|x86.ActiveCfg = Debug|Any CPU {EB8EF358-4028-4272-B71E-523F8D0A73F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EB8EF358-4028-4272-B71E-523F8D0A73F0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EB8EF358-4028-4272-B71E-523F8D0A73F0}.Debug|arm.ActiveCfg = Debug|Any CPU + {EB8EF358-4028-4272-B71E-523F8D0A73F0}.Debug|arm64.ActiveCfg = Debug|Any CPU + {EB8EF358-4028-4272-B71E-523F8D0A73F0}.Debug|x64.ActiveCfg = Debug|Any CPU + {EB8EF358-4028-4272-B71E-523F8D0A73F0}.Debug|x64.Build.0 = Debug|Any CPU + {EB8EF358-4028-4272-B71E-523F8D0A73F0}.Debug|x86.ActiveCfg = Debug|Any CPU + {EB8EF358-4028-4272-B71E-523F8D0A73F0}.Debug|x86.Build.0 = Debug|Any CPU {EB8EF358-4028-4272-B71E-523F8D0A73F0}.Release|Any CPU.ActiveCfg = Release|Any CPU {EB8EF358-4028-4272-B71E-523F8D0A73F0}.Release|Any CPU.Build.0 = Release|Any CPU - {2AFAE46F-B182-4F1E-9F5F-D3EB747A714A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2AFAE46F-B182-4F1E-9F5F-D3EB747A714A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2AFAE46F-B182-4F1E-9F5F-D3EB747A714A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2AFAE46F-B182-4F1E-9F5F-D3EB747A714A}.Release|Any CPU.Build.0 = Release|Any CPU + {EB8EF358-4028-4272-B71E-523F8D0A73F0}.Release|arm.ActiveCfg = Release|Any CPU + {EB8EF358-4028-4272-B71E-523F8D0A73F0}.Release|arm64.ActiveCfg = Release|Any CPU + {EB8EF358-4028-4272-B71E-523F8D0A73F0}.Release|x64.ActiveCfg = Release|Any CPU + {EB8EF358-4028-4272-B71E-523F8D0A73F0}.Release|x64.Build.0 = Release|Any CPU + {EB8EF358-4028-4272-B71E-523F8D0A73F0}.Release|x86.ActiveCfg = Release|Any CPU + {EB8EF358-4028-4272-B71E-523F8D0A73F0}.Release|x86.Build.0 = Release|Any CPU + {EB8EF358-4028-4272-B71E-523F8D0A73F0}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {EB8EF358-4028-4272-B71E-523F8D0A73F0}.Checked|arm.ActiveCfg = Debug|Any CPU + {EB8EF358-4028-4272-B71E-523F8D0A73F0}.Checked|arm64.ActiveCfg = Debug|Any CPU + {EB8EF358-4028-4272-B71E-523F8D0A73F0}.Checked|x64.ActiveCfg = Debug|Any CPU + {EB8EF358-4028-4272-B71E-523F8D0A73F0}.Checked|x86.ActiveCfg = Debug|Any CPU + {C8008A7A-9910-4D19-AB2B-B96FF8538139}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C8008A7A-9910-4D19-AB2B-B96FF8538139}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C8008A7A-9910-4D19-AB2B-B96FF8538139}.Debug|arm.ActiveCfg = Debug|Any CPU + {C8008A7A-9910-4D19-AB2B-B96FF8538139}.Debug|arm64.ActiveCfg = Debug|Any CPU + {C8008A7A-9910-4D19-AB2B-B96FF8538139}.Debug|x64.ActiveCfg = Debug|Any CPU + {C8008A7A-9910-4D19-AB2B-B96FF8538139}.Debug|x64.Build.0 = Debug|Any CPU + {C8008A7A-9910-4D19-AB2B-B96FF8538139}.Debug|x86.ActiveCfg = Debug|Any CPU + {C8008A7A-9910-4D19-AB2B-B96FF8538139}.Debug|x86.Build.0 = Debug|Any CPU + {C8008A7A-9910-4D19-AB2B-B96FF8538139}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C8008A7A-9910-4D19-AB2B-B96FF8538139}.Release|Any CPU.Build.0 = Release|Any CPU + {C8008A7A-9910-4D19-AB2B-B96FF8538139}.Release|arm.ActiveCfg = Release|Any CPU + {C8008A7A-9910-4D19-AB2B-B96FF8538139}.Release|arm64.ActiveCfg = Release|Any CPU + {C8008A7A-9910-4D19-AB2B-B96FF8538139}.Release|x64.ActiveCfg = Release|Any CPU + {C8008A7A-9910-4D19-AB2B-B96FF8538139}.Release|x64.Build.0 = Release|Any CPU + {C8008A7A-9910-4D19-AB2B-B96FF8538139}.Release|x86.ActiveCfg = Release|Any CPU + {C8008A7A-9910-4D19-AB2B-B96FF8538139}.Release|x86.Build.0 = Release|Any CPU + {C8008A7A-9910-4D19-AB2B-B96FF8538139}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {C8008A7A-9910-4D19-AB2B-B96FF8538139}.Checked|arm.ActiveCfg = Debug|Any CPU + {C8008A7A-9910-4D19-AB2B-B96FF8538139}.Checked|arm64.ActiveCfg = Debug|Any CPU + {C8008A7A-9910-4D19-AB2B-B96FF8538139}.Checked|x64.ActiveCfg = Debug|Any CPU + {C8008A7A-9910-4D19-AB2B-B96FF8538139}.Checked|x86.ActiveCfg = Debug|Any CPU + {42924B5B-3EED-440B-9CB5-67F44F6E1592}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {42924B5B-3EED-440B-9CB5-67F44F6E1592}.Debug|Any CPU.Build.0 = Debug|Any CPU + {42924B5B-3EED-440B-9CB5-67F44F6E1592}.Debug|arm.ActiveCfg = Debug|Any CPU + {42924B5B-3EED-440B-9CB5-67F44F6E1592}.Debug|arm64.ActiveCfg = Debug|Any CPU + {42924B5B-3EED-440B-9CB5-67F44F6E1592}.Debug|x64.ActiveCfg = Debug|Any CPU + {42924B5B-3EED-440B-9CB5-67F44F6E1592}.Debug|x64.Build.0 = Debug|Any CPU + {42924B5B-3EED-440B-9CB5-67F44F6E1592}.Debug|x86.ActiveCfg = Debug|Any CPU + {42924B5B-3EED-440B-9CB5-67F44F6E1592}.Debug|x86.Build.0 = Debug|Any CPU + {42924B5B-3EED-440B-9CB5-67F44F6E1592}.Release|Any CPU.ActiveCfg = Release|Any CPU + {42924B5B-3EED-440B-9CB5-67F44F6E1592}.Release|Any CPU.Build.0 = Release|Any CPU + {42924B5B-3EED-440B-9CB5-67F44F6E1592}.Release|arm.ActiveCfg = Release|Any CPU + {42924B5B-3EED-440B-9CB5-67F44F6E1592}.Release|arm64.ActiveCfg = Release|Any CPU + {42924B5B-3EED-440B-9CB5-67F44F6E1592}.Release|x64.ActiveCfg = Release|Any CPU + {42924B5B-3EED-440B-9CB5-67F44F6E1592}.Release|x64.Build.0 = Release|Any CPU + {42924B5B-3EED-440B-9CB5-67F44F6E1592}.Release|x86.ActiveCfg = Release|Any CPU + {42924B5B-3EED-440B-9CB5-67F44F6E1592}.Release|x86.Build.0 = Release|Any CPU + {42924B5B-3EED-440B-9CB5-67F44F6E1592}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {42924B5B-3EED-440B-9CB5-67F44F6E1592}.Checked|arm.ActiveCfg = Debug|Any CPU + {42924B5B-3EED-440B-9CB5-67F44F6E1592}.Checked|arm64.ActiveCfg = Debug|Any CPU + {42924B5B-3EED-440B-9CB5-67F44F6E1592}.Checked|x64.ActiveCfg = Debug|Any CPU + {42924B5B-3EED-440B-9CB5-67F44F6E1592}.Checked|x86.ActiveCfg = Debug|Any CPU + {9F6EC049-D2C2-4228-B043-96D0918DF894}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9F6EC049-D2C2-4228-B043-96D0918DF894}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9F6EC049-D2C2-4228-B043-96D0918DF894}.Debug|arm.ActiveCfg = Debug|Any CPU + {9F6EC049-D2C2-4228-B043-96D0918DF894}.Debug|arm64.ActiveCfg = Debug|Any CPU + {9F6EC049-D2C2-4228-B043-96D0918DF894}.Debug|x64.ActiveCfg = Debug|Any CPU + {9F6EC049-D2C2-4228-B043-96D0918DF894}.Debug|x64.Build.0 = Debug|Any CPU + {9F6EC049-D2C2-4228-B043-96D0918DF894}.Debug|x86.ActiveCfg = Debug|Any CPU + {9F6EC049-D2C2-4228-B043-96D0918DF894}.Debug|x86.Build.0 = Debug|Any CPU + {9F6EC049-D2C2-4228-B043-96D0918DF894}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9F6EC049-D2C2-4228-B043-96D0918DF894}.Release|Any CPU.Build.0 = Release|Any CPU + {9F6EC049-D2C2-4228-B043-96D0918DF894}.Release|arm.ActiveCfg = Release|Any CPU + {9F6EC049-D2C2-4228-B043-96D0918DF894}.Release|arm64.ActiveCfg = Release|Any CPU + {9F6EC049-D2C2-4228-B043-96D0918DF894}.Release|x64.ActiveCfg = Release|Any CPU + {9F6EC049-D2C2-4228-B043-96D0918DF894}.Release|x64.Build.0 = Release|Any CPU + {9F6EC049-D2C2-4228-B043-96D0918DF894}.Release|x86.ActiveCfg = Release|Any CPU + {9F6EC049-D2C2-4228-B043-96D0918DF894}.Release|x86.Build.0 = Release|Any CPU + {9F6EC049-D2C2-4228-B043-96D0918DF894}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {9F6EC049-D2C2-4228-B043-96D0918DF894}.Checked|arm.ActiveCfg = Debug|Any CPU + {9F6EC049-D2C2-4228-B043-96D0918DF894}.Checked|arm64.ActiveCfg = Debug|Any CPU + {9F6EC049-D2C2-4228-B043-96D0918DF894}.Checked|x64.ActiveCfg = Debug|Any CPU + {9F6EC049-D2C2-4228-B043-96D0918DF894}.Checked|x86.ActiveCfg = Debug|Any CPU {11F700BE-429D-4AAA-B797-4C6322503872}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {11F700BE-429D-4AAA-B797-4C6322503872}.Debug|Any CPU.Build.0 = Debug|Any CPU + {11F700BE-429D-4AAA-B797-4C6322503872}.Debug|arm.ActiveCfg = Debug|Any CPU + {11F700BE-429D-4AAA-B797-4C6322503872}.Debug|arm64.ActiveCfg = Debug|Any CPU + {11F700BE-429D-4AAA-B797-4C6322503872}.Debug|x64.ActiveCfg = Debug|Any CPU + {11F700BE-429D-4AAA-B797-4C6322503872}.Debug|x64.Build.0 = Debug|Any CPU + {11F700BE-429D-4AAA-B797-4C6322503872}.Debug|x86.ActiveCfg = Debug|Any CPU + {11F700BE-429D-4AAA-B797-4C6322503872}.Debug|x86.Build.0 = Debug|Any CPU {11F700BE-429D-4AAA-B797-4C6322503872}.Release|Any CPU.ActiveCfg = Release|Any CPU {11F700BE-429D-4AAA-B797-4C6322503872}.Release|Any CPU.Build.0 = Release|Any CPU + {11F700BE-429D-4AAA-B797-4C6322503872}.Release|arm.ActiveCfg = Release|Any CPU + {11F700BE-429D-4AAA-B797-4C6322503872}.Release|arm64.ActiveCfg = Release|Any CPU + {11F700BE-429D-4AAA-B797-4C6322503872}.Release|x64.ActiveCfg = Release|Any CPU + {11F700BE-429D-4AAA-B797-4C6322503872}.Release|x64.Build.0 = Release|Any CPU + {11F700BE-429D-4AAA-B797-4C6322503872}.Release|x86.ActiveCfg = Release|Any CPU + {11F700BE-429D-4AAA-B797-4C6322503872}.Release|x86.Build.0 = Release|Any CPU + {11F700BE-429D-4AAA-B797-4C6322503872}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {11F700BE-429D-4AAA-B797-4C6322503872}.Checked|arm.ActiveCfg = Debug|Any CPU + {11F700BE-429D-4AAA-B797-4C6322503872}.Checked|arm64.ActiveCfg = Debug|Any CPU + {11F700BE-429D-4AAA-B797-4C6322503872}.Checked|x64.ActiveCfg = Debug|Any CPU + {11F700BE-429D-4AAA-B797-4C6322503872}.Checked|x86.ActiveCfg = Debug|Any CPU {B690A8D8-E3BF-44D3-8FBC-D64A517B8AF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B690A8D8-E3BF-44D3-8FBC-D64A517B8AF3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B690A8D8-E3BF-44D3-8FBC-D64A517B8AF3}.Debug|arm.ActiveCfg = Debug|Any CPU + {B690A8D8-E3BF-44D3-8FBC-D64A517B8AF3}.Debug|arm64.ActiveCfg = Debug|Any CPU + {B690A8D8-E3BF-44D3-8FBC-D64A517B8AF3}.Debug|x64.ActiveCfg = Debug|Any CPU + {B690A8D8-E3BF-44D3-8FBC-D64A517B8AF3}.Debug|x64.Build.0 = Debug|Any CPU + {B690A8D8-E3BF-44D3-8FBC-D64A517B8AF3}.Debug|x86.ActiveCfg = Debug|Any CPU + {B690A8D8-E3BF-44D3-8FBC-D64A517B8AF3}.Debug|x86.Build.0 = Debug|Any CPU {B690A8D8-E3BF-44D3-8FBC-D64A517B8AF3}.Release|Any CPU.ActiveCfg = Release|Any CPU {B690A8D8-E3BF-44D3-8FBC-D64A517B8AF3}.Release|Any CPU.Build.0 = Release|Any CPU + {B690A8D8-E3BF-44D3-8FBC-D64A517B8AF3}.Release|arm.ActiveCfg = Release|Any CPU + {B690A8D8-E3BF-44D3-8FBC-D64A517B8AF3}.Release|arm64.ActiveCfg = Release|Any CPU + {B690A8D8-E3BF-44D3-8FBC-D64A517B8AF3}.Release|x64.ActiveCfg = Release|Any CPU + {B690A8D8-E3BF-44D3-8FBC-D64A517B8AF3}.Release|x64.Build.0 = Release|Any CPU + {B690A8D8-E3BF-44D3-8FBC-D64A517B8AF3}.Release|x86.ActiveCfg = Release|Any CPU + {B690A8D8-E3BF-44D3-8FBC-D64A517B8AF3}.Release|x86.Build.0 = Release|Any CPU + {B690A8D8-E3BF-44D3-8FBC-D64A517B8AF3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {B690A8D8-E3BF-44D3-8FBC-D64A517B8AF3}.Checked|arm.ActiveCfg = Debug|Any CPU + {B690A8D8-E3BF-44D3-8FBC-D64A517B8AF3}.Checked|arm64.ActiveCfg = Debug|Any CPU + {B690A8D8-E3BF-44D3-8FBC-D64A517B8AF3}.Checked|x64.ActiveCfg = Debug|Any CPU + {B690A8D8-E3BF-44D3-8FBC-D64A517B8AF3}.Checked|x86.ActiveCfg = Debug|Any CPU + {1AB14FD6-D3B1-4FE4-9595-F51D53584568}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1AB14FD6-D3B1-4FE4-9595-F51D53584568}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1AB14FD6-D3B1-4FE4-9595-F51D53584568}.Debug|arm.ActiveCfg = Debug|Any CPU + {1AB14FD6-D3B1-4FE4-9595-F51D53584568}.Debug|arm64.ActiveCfg = Debug|Any CPU + {1AB14FD6-D3B1-4FE4-9595-F51D53584568}.Debug|x64.ActiveCfg = Debug|Any CPU + {1AB14FD6-D3B1-4FE4-9595-F51D53584568}.Debug|x64.Build.0 = Debug|Any CPU + {1AB14FD6-D3B1-4FE4-9595-F51D53584568}.Debug|x86.ActiveCfg = Debug|Any CPU + {1AB14FD6-D3B1-4FE4-9595-F51D53584568}.Debug|x86.Build.0 = Debug|Any CPU + {1AB14FD6-D3B1-4FE4-9595-F51D53584568}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1AB14FD6-D3B1-4FE4-9595-F51D53584568}.Release|Any CPU.Build.0 = Release|Any CPU + {1AB14FD6-D3B1-4FE4-9595-F51D53584568}.Release|arm.ActiveCfg = Release|Any CPU + {1AB14FD6-D3B1-4FE4-9595-F51D53584568}.Release|arm64.ActiveCfg = Release|Any CPU + {1AB14FD6-D3B1-4FE4-9595-F51D53584568}.Release|x64.ActiveCfg = Release|Any CPU + {1AB14FD6-D3B1-4FE4-9595-F51D53584568}.Release|x64.Build.0 = Release|Any CPU + {1AB14FD6-D3B1-4FE4-9595-F51D53584568}.Release|x86.ActiveCfg = Release|Any CPU + {1AB14FD6-D3B1-4FE4-9595-F51D53584568}.Release|x86.Build.0 = Release|Any CPU + {1AB14FD6-D3B1-4FE4-9595-F51D53584568}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {1AB14FD6-D3B1-4FE4-9595-F51D53584568}.Checked|arm.ActiveCfg = Debug|Any CPU + {1AB14FD6-D3B1-4FE4-9595-F51D53584568}.Checked|arm64.ActiveCfg = Debug|Any CPU + {1AB14FD6-D3B1-4FE4-9595-F51D53584568}.Checked|x64.ActiveCfg = Debug|Any CPU + {1AB14FD6-D3B1-4FE4-9595-F51D53584568}.Checked|x86.ActiveCfg = Debug|Any CPU + {3BD4F46F-4EF5-478C-9FA4-C8ABE2E703DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3BD4F46F-4EF5-478C-9FA4-C8ABE2E703DF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3BD4F46F-4EF5-478C-9FA4-C8ABE2E703DF}.Debug|arm.ActiveCfg = Debug|Any CPU + {3BD4F46F-4EF5-478C-9FA4-C8ABE2E703DF}.Debug|arm64.ActiveCfg = Debug|Any CPU + {3BD4F46F-4EF5-478C-9FA4-C8ABE2E703DF}.Debug|x64.ActiveCfg = Debug|Any CPU + {3BD4F46F-4EF5-478C-9FA4-C8ABE2E703DF}.Debug|x64.Build.0 = Debug|Any CPU + {3BD4F46F-4EF5-478C-9FA4-C8ABE2E703DF}.Debug|x86.ActiveCfg = Debug|Any CPU + {3BD4F46F-4EF5-478C-9FA4-C8ABE2E703DF}.Debug|x86.Build.0 = Debug|Any CPU + {3BD4F46F-4EF5-478C-9FA4-C8ABE2E703DF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3BD4F46F-4EF5-478C-9FA4-C8ABE2E703DF}.Release|Any CPU.Build.0 = Release|Any CPU + {3BD4F46F-4EF5-478C-9FA4-C8ABE2E703DF}.Release|arm.ActiveCfg = Release|Any CPU + {3BD4F46F-4EF5-478C-9FA4-C8ABE2E703DF}.Release|arm64.ActiveCfg = Release|Any CPU + {3BD4F46F-4EF5-478C-9FA4-C8ABE2E703DF}.Release|x64.ActiveCfg = Release|Any CPU + {3BD4F46F-4EF5-478C-9FA4-C8ABE2E703DF}.Release|x64.Build.0 = Release|Any CPU + {3BD4F46F-4EF5-478C-9FA4-C8ABE2E703DF}.Release|x86.ActiveCfg = Release|Any CPU + {3BD4F46F-4EF5-478C-9FA4-C8ABE2E703DF}.Release|x86.Build.0 = Release|Any CPU + {3BD4F46F-4EF5-478C-9FA4-C8ABE2E703DF}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {3BD4F46F-4EF5-478C-9FA4-C8ABE2E703DF}.Checked|arm.ActiveCfg = Debug|Any CPU + {3BD4F46F-4EF5-478C-9FA4-C8ABE2E703DF}.Checked|arm64.ActiveCfg = Debug|Any CPU + {3BD4F46F-4EF5-478C-9FA4-C8ABE2E703DF}.Checked|x64.ActiveCfg = Debug|Any CPU + {3BD4F46F-4EF5-478C-9FA4-C8ABE2E703DF}.Checked|x86.ActiveCfg = Debug|Any CPU {2C707BFF-6BA9-4EB8-BC75-5341391B5FC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2C707BFF-6BA9-4EB8-BC75-5341391B5FC6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2C707BFF-6BA9-4EB8-BC75-5341391B5FC6}.Debug|arm.ActiveCfg = Debug|Any CPU + {2C707BFF-6BA9-4EB8-BC75-5341391B5FC6}.Debug|arm64.ActiveCfg = Debug|Any CPU + {2C707BFF-6BA9-4EB8-BC75-5341391B5FC6}.Debug|x64.ActiveCfg = Debug|Any CPU + {2C707BFF-6BA9-4EB8-BC75-5341391B5FC6}.Debug|x64.Build.0 = Debug|Any CPU + {2C707BFF-6BA9-4EB8-BC75-5341391B5FC6}.Debug|x86.ActiveCfg = Debug|Any CPU + {2C707BFF-6BA9-4EB8-BC75-5341391B5FC6}.Debug|x86.Build.0 = Debug|Any CPU {2C707BFF-6BA9-4EB8-BC75-5341391B5FC6}.Release|Any CPU.ActiveCfg = Release|Any CPU {2C707BFF-6BA9-4EB8-BC75-5341391B5FC6}.Release|Any CPU.Build.0 = Release|Any CPU + {2C707BFF-6BA9-4EB8-BC75-5341391B5FC6}.Release|arm.ActiveCfg = Release|Any CPU + {2C707BFF-6BA9-4EB8-BC75-5341391B5FC6}.Release|arm64.ActiveCfg = Release|Any CPU + {2C707BFF-6BA9-4EB8-BC75-5341391B5FC6}.Release|x64.ActiveCfg = Release|Any CPU + {2C707BFF-6BA9-4EB8-BC75-5341391B5FC6}.Release|x64.Build.0 = Release|Any CPU + {2C707BFF-6BA9-4EB8-BC75-5341391B5FC6}.Release|x86.ActiveCfg = Release|Any CPU + {2C707BFF-6BA9-4EB8-BC75-5341391B5FC6}.Release|x86.Build.0 = Release|Any CPU + {2C707BFF-6BA9-4EB8-BC75-5341391B5FC6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {2C707BFF-6BA9-4EB8-BC75-5341391B5FC6}.Checked|arm.ActiveCfg = Debug|Any CPU + {2C707BFF-6BA9-4EB8-BC75-5341391B5FC6}.Checked|arm64.ActiveCfg = Debug|Any CPU + {2C707BFF-6BA9-4EB8-BC75-5341391B5FC6}.Checked|x64.ActiveCfg = Debug|Any CPU + {2C707BFF-6BA9-4EB8-BC75-5341391B5FC6}.Checked|x86.ActiveCfg = Debug|Any CPU {43214093-FA08-4699-A62B-D7BC858BAC78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {43214093-FA08-4699-A62B-D7BC858BAC78}.Debug|Any CPU.Build.0 = Debug|Any CPU + {43214093-FA08-4699-A62B-D7BC858BAC78}.Debug|arm.ActiveCfg = Debug|Any CPU + {43214093-FA08-4699-A62B-D7BC858BAC78}.Debug|arm64.ActiveCfg = Debug|Any CPU + {43214093-FA08-4699-A62B-D7BC858BAC78}.Debug|x64.ActiveCfg = Debug|Any CPU + {43214093-FA08-4699-A62B-D7BC858BAC78}.Debug|x64.Build.0 = Debug|Any CPU + {43214093-FA08-4699-A62B-D7BC858BAC78}.Debug|x86.ActiveCfg = Debug|Any CPU + {43214093-FA08-4699-A62B-D7BC858BAC78}.Debug|x86.Build.0 = Debug|Any CPU {43214093-FA08-4699-A62B-D7BC858BAC78}.Release|Any CPU.ActiveCfg = Release|Any CPU {43214093-FA08-4699-A62B-D7BC858BAC78}.Release|Any CPU.Build.0 = Release|Any CPU + {43214093-FA08-4699-A62B-D7BC858BAC78}.Release|arm.ActiveCfg = Release|Any CPU + {43214093-FA08-4699-A62B-D7BC858BAC78}.Release|arm64.ActiveCfg = Release|Any CPU + {43214093-FA08-4699-A62B-D7BC858BAC78}.Release|x64.ActiveCfg = Release|Any CPU + {43214093-FA08-4699-A62B-D7BC858BAC78}.Release|x64.Build.0 = Release|Any CPU + {43214093-FA08-4699-A62B-D7BC858BAC78}.Release|x86.ActiveCfg = Release|Any CPU + {43214093-FA08-4699-A62B-D7BC858BAC78}.Release|x86.Build.0 = Release|Any CPU + {43214093-FA08-4699-A62B-D7BC858BAC78}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {43214093-FA08-4699-A62B-D7BC858BAC78}.Checked|arm.ActiveCfg = Debug|Any CPU + {43214093-FA08-4699-A62B-D7BC858BAC78}.Checked|arm64.ActiveCfg = Debug|Any CPU + {43214093-FA08-4699-A62B-D7BC858BAC78}.Checked|x64.ActiveCfg = Debug|Any CPU + {43214093-FA08-4699-A62B-D7BC858BAC78}.Checked|x86.ActiveCfg = Debug|Any CPU {F8480484-A2CA-4215-AC4B-82F6149FEC02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F8480484-A2CA-4215-AC4B-82F6149FEC02}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F8480484-A2CA-4215-AC4B-82F6149FEC02}.Debug|arm.ActiveCfg = Debug|Any CPU + {F8480484-A2CA-4215-AC4B-82F6149FEC02}.Debug|arm64.ActiveCfg = Debug|Any CPU + {F8480484-A2CA-4215-AC4B-82F6149FEC02}.Debug|x64.ActiveCfg = Debug|Any CPU + {F8480484-A2CA-4215-AC4B-82F6149FEC02}.Debug|x64.Build.0 = Debug|Any CPU + {F8480484-A2CA-4215-AC4B-82F6149FEC02}.Debug|x86.ActiveCfg = Debug|Any CPU + {F8480484-A2CA-4215-AC4B-82F6149FEC02}.Debug|x86.Build.0 = Debug|Any CPU {F8480484-A2CA-4215-AC4B-82F6149FEC02}.Release|Any CPU.ActiveCfg = Release|Any CPU {F8480484-A2CA-4215-AC4B-82F6149FEC02}.Release|Any CPU.Build.0 = Release|Any CPU + {F8480484-A2CA-4215-AC4B-82F6149FEC02}.Release|arm.ActiveCfg = Release|Any CPU + {F8480484-A2CA-4215-AC4B-82F6149FEC02}.Release|arm64.ActiveCfg = Release|Any CPU + {F8480484-A2CA-4215-AC4B-82F6149FEC02}.Release|x64.ActiveCfg = Release|Any CPU + {F8480484-A2CA-4215-AC4B-82F6149FEC02}.Release|x64.Build.0 = Release|Any CPU + {F8480484-A2CA-4215-AC4B-82F6149FEC02}.Release|x86.ActiveCfg = Release|Any CPU + {F8480484-A2CA-4215-AC4B-82F6149FEC02}.Release|x86.Build.0 = Release|Any CPU + {F8480484-A2CA-4215-AC4B-82F6149FEC02}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {F8480484-A2CA-4215-AC4B-82F6149FEC02}.Checked|arm.ActiveCfg = Debug|Any CPU + {F8480484-A2CA-4215-AC4B-82F6149FEC02}.Checked|arm64.ActiveCfg = Debug|Any CPU + {F8480484-A2CA-4215-AC4B-82F6149FEC02}.Checked|x64.ActiveCfg = Debug|Any CPU + {F8480484-A2CA-4215-AC4B-82F6149FEC02}.Checked|x86.ActiveCfg = Debug|Any CPU {1E0AB255-7FD0-4DE0-9675-59DE81B12E54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1E0AB255-7FD0-4DE0-9675-59DE81B12E54}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1E0AB255-7FD0-4DE0-9675-59DE81B12E54}.Debug|arm.ActiveCfg = Debug|Any CPU + {1E0AB255-7FD0-4DE0-9675-59DE81B12E54}.Debug|arm64.ActiveCfg = Debug|Any CPU + {1E0AB255-7FD0-4DE0-9675-59DE81B12E54}.Debug|x64.ActiveCfg = Debug|Any CPU + {1E0AB255-7FD0-4DE0-9675-59DE81B12E54}.Debug|x64.Build.0 = Debug|Any CPU + {1E0AB255-7FD0-4DE0-9675-59DE81B12E54}.Debug|x86.ActiveCfg = Debug|Any CPU + {1E0AB255-7FD0-4DE0-9675-59DE81B12E54}.Debug|x86.Build.0 = Debug|Any CPU {1E0AB255-7FD0-4DE0-9675-59DE81B12E54}.Release|Any CPU.ActiveCfg = Release|Any CPU {1E0AB255-7FD0-4DE0-9675-59DE81B12E54}.Release|Any CPU.Build.0 = Release|Any CPU + {1E0AB255-7FD0-4DE0-9675-59DE81B12E54}.Release|arm.ActiveCfg = Release|Any CPU + {1E0AB255-7FD0-4DE0-9675-59DE81B12E54}.Release|arm64.ActiveCfg = Release|Any CPU + {1E0AB255-7FD0-4DE0-9675-59DE81B12E54}.Release|x64.ActiveCfg = Release|Any CPU + {1E0AB255-7FD0-4DE0-9675-59DE81B12E54}.Release|x64.Build.0 = Release|Any CPU + {1E0AB255-7FD0-4DE0-9675-59DE81B12E54}.Release|x86.ActiveCfg = Release|Any CPU + {1E0AB255-7FD0-4DE0-9675-59DE81B12E54}.Release|x86.Build.0 = Release|Any CPU + {1E0AB255-7FD0-4DE0-9675-59DE81B12E54}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {1E0AB255-7FD0-4DE0-9675-59DE81B12E54}.Checked|arm.ActiveCfg = Debug|Any CPU + {1E0AB255-7FD0-4DE0-9675-59DE81B12E54}.Checked|arm64.ActiveCfg = Debug|Any CPU + {1E0AB255-7FD0-4DE0-9675-59DE81B12E54}.Checked|x64.ActiveCfg = Debug|Any CPU + {1E0AB255-7FD0-4DE0-9675-59DE81B12E54}.Checked|x86.ActiveCfg = Debug|Any CPU {97932D09-4DF9-4836-ADEF-C52DBC0661CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {97932D09-4DF9-4836-ADEF-C52DBC0661CD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {97932D09-4DF9-4836-ADEF-C52DBC0661CD}.Debug|arm.ActiveCfg = Debug|Any CPU + {97932D09-4DF9-4836-ADEF-C52DBC0661CD}.Debug|arm64.ActiveCfg = Debug|Any CPU + {97932D09-4DF9-4836-ADEF-C52DBC0661CD}.Debug|x64.ActiveCfg = Debug|Any CPU + {97932D09-4DF9-4836-ADEF-C52DBC0661CD}.Debug|x64.Build.0 = Debug|Any CPU + {97932D09-4DF9-4836-ADEF-C52DBC0661CD}.Debug|x86.ActiveCfg = Debug|Any CPU + {97932D09-4DF9-4836-ADEF-C52DBC0661CD}.Debug|x86.Build.0 = Debug|Any CPU {97932D09-4DF9-4836-ADEF-C52DBC0661CD}.Release|Any CPU.ActiveCfg = Release|Any CPU {97932D09-4DF9-4836-ADEF-C52DBC0661CD}.Release|Any CPU.Build.0 = Release|Any CPU + {97932D09-4DF9-4836-ADEF-C52DBC0661CD}.Release|arm.ActiveCfg = Release|Any CPU + {97932D09-4DF9-4836-ADEF-C52DBC0661CD}.Release|arm64.ActiveCfg = Release|Any CPU + {97932D09-4DF9-4836-ADEF-C52DBC0661CD}.Release|x64.ActiveCfg = Release|Any CPU + {97932D09-4DF9-4836-ADEF-C52DBC0661CD}.Release|x64.Build.0 = Release|Any CPU + {97932D09-4DF9-4836-ADEF-C52DBC0661CD}.Release|x86.ActiveCfg = Release|Any CPU + {97932D09-4DF9-4836-ADEF-C52DBC0661CD}.Release|x86.Build.0 = Release|Any CPU + {97932D09-4DF9-4836-ADEF-C52DBC0661CD}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {97932D09-4DF9-4836-ADEF-C52DBC0661CD}.Checked|arm.ActiveCfg = Debug|Any CPU + {97932D09-4DF9-4836-ADEF-C52DBC0661CD}.Checked|arm64.ActiveCfg = Debug|Any CPU + {97932D09-4DF9-4836-ADEF-C52DBC0661CD}.Checked|x64.ActiveCfg = Debug|Any CPU + {97932D09-4DF9-4836-ADEF-C52DBC0661CD}.Checked|x86.ActiveCfg = Debug|Any CPU {60DB3C65-9EDA-45AA-85E6-37F1375CF1E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60DB3C65-9EDA-45AA-85E6-37F1375CF1E7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {60DB3C65-9EDA-45AA-85E6-37F1375CF1E7}.Debug|arm.ActiveCfg = Debug|Any CPU + {60DB3C65-9EDA-45AA-85E6-37F1375CF1E7}.Debug|arm64.ActiveCfg = Debug|Any CPU + {60DB3C65-9EDA-45AA-85E6-37F1375CF1E7}.Debug|x64.ActiveCfg = Debug|Any CPU + {60DB3C65-9EDA-45AA-85E6-37F1375CF1E7}.Debug|x64.Build.0 = Debug|Any CPU + {60DB3C65-9EDA-45AA-85E6-37F1375CF1E7}.Debug|x86.ActiveCfg = Debug|Any CPU + {60DB3C65-9EDA-45AA-85E6-37F1375CF1E7}.Debug|x86.Build.0 = Debug|Any CPU {60DB3C65-9EDA-45AA-85E6-37F1375CF1E7}.Release|Any CPU.ActiveCfg = Release|Any CPU {60DB3C65-9EDA-45AA-85E6-37F1375CF1E7}.Release|Any CPU.Build.0 = Release|Any CPU + {60DB3C65-9EDA-45AA-85E6-37F1375CF1E7}.Release|arm.ActiveCfg = Release|Any CPU + {60DB3C65-9EDA-45AA-85E6-37F1375CF1E7}.Release|arm64.ActiveCfg = Release|Any CPU + {60DB3C65-9EDA-45AA-85E6-37F1375CF1E7}.Release|x64.ActiveCfg = Release|Any CPU + {60DB3C65-9EDA-45AA-85E6-37F1375CF1E7}.Release|x64.Build.0 = Release|Any CPU + {60DB3C65-9EDA-45AA-85E6-37F1375CF1E7}.Release|x86.ActiveCfg = Release|Any CPU + {60DB3C65-9EDA-45AA-85E6-37F1375CF1E7}.Release|x86.Build.0 = Release|Any CPU + {60DB3C65-9EDA-45AA-85E6-37F1375CF1E7}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {60DB3C65-9EDA-45AA-85E6-37F1375CF1E7}.Checked|arm.ActiveCfg = Debug|Any CPU + {60DB3C65-9EDA-45AA-85E6-37F1375CF1E7}.Checked|arm64.ActiveCfg = Debug|Any CPU + {60DB3C65-9EDA-45AA-85E6-37F1375CF1E7}.Checked|x64.ActiveCfg = Debug|Any CPU + {60DB3C65-9EDA-45AA-85E6-37F1375CF1E7}.Checked|x86.ActiveCfg = Debug|Any CPU + {E33CEC60-CDBC-42F4-BF7C-55BFD8D3F9C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E33CEC60-CDBC-42F4-BF7C-55BFD8D3F9C2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E33CEC60-CDBC-42F4-BF7C-55BFD8D3F9C2}.Debug|arm.ActiveCfg = Debug|Any CPU + {E33CEC60-CDBC-42F4-BF7C-55BFD8D3F9C2}.Debug|arm64.ActiveCfg = Debug|Any CPU + {E33CEC60-CDBC-42F4-BF7C-55BFD8D3F9C2}.Debug|x64.ActiveCfg = Debug|Any CPU + {E33CEC60-CDBC-42F4-BF7C-55BFD8D3F9C2}.Debug|x64.Build.0 = Debug|Any CPU + {E33CEC60-CDBC-42F4-BF7C-55BFD8D3F9C2}.Debug|x86.ActiveCfg = Debug|Any CPU + {E33CEC60-CDBC-42F4-BF7C-55BFD8D3F9C2}.Debug|x86.Build.0 = Debug|Any CPU + {E33CEC60-CDBC-42F4-BF7C-55BFD8D3F9C2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E33CEC60-CDBC-42F4-BF7C-55BFD8D3F9C2}.Release|Any CPU.Build.0 = Release|Any CPU + {E33CEC60-CDBC-42F4-BF7C-55BFD8D3F9C2}.Release|arm.ActiveCfg = Release|Any CPU + {E33CEC60-CDBC-42F4-BF7C-55BFD8D3F9C2}.Release|arm64.ActiveCfg = Release|Any CPU + {E33CEC60-CDBC-42F4-BF7C-55BFD8D3F9C2}.Release|x64.ActiveCfg = Release|Any CPU + {E33CEC60-CDBC-42F4-BF7C-55BFD8D3F9C2}.Release|x64.Build.0 = Release|Any CPU + {E33CEC60-CDBC-42F4-BF7C-55BFD8D3F9C2}.Release|x86.ActiveCfg = Release|Any CPU + {E33CEC60-CDBC-42F4-BF7C-55BFD8D3F9C2}.Release|x86.Build.0 = Release|Any CPU + {E33CEC60-CDBC-42F4-BF7C-55BFD8D3F9C2}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {E33CEC60-CDBC-42F4-BF7C-55BFD8D3F9C2}.Checked|arm.ActiveCfg = Debug|Any CPU + {E33CEC60-CDBC-42F4-BF7C-55BFD8D3F9C2}.Checked|arm64.ActiveCfg = Debug|Any CPU + {E33CEC60-CDBC-42F4-BF7C-55BFD8D3F9C2}.Checked|x64.ActiveCfg = Debug|Any CPU + {E33CEC60-CDBC-42F4-BF7C-55BFD8D3F9C2}.Checked|x86.ActiveCfg = Debug|Any CPU + {AFDC7537-6348-49DD-A678-62BC2AEB6A2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AFDC7537-6348-49DD-A678-62BC2AEB6A2D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AFDC7537-6348-49DD-A678-62BC2AEB6A2D}.Debug|arm.ActiveCfg = Debug|Any CPU + {AFDC7537-6348-49DD-A678-62BC2AEB6A2D}.Debug|arm64.ActiveCfg = Debug|Any CPU + {AFDC7537-6348-49DD-A678-62BC2AEB6A2D}.Debug|x64.ActiveCfg = Debug|Any CPU + {AFDC7537-6348-49DD-A678-62BC2AEB6A2D}.Debug|x64.Build.0 = Debug|Any CPU + {AFDC7537-6348-49DD-A678-62BC2AEB6A2D}.Debug|x86.ActiveCfg = Debug|Any CPU + {AFDC7537-6348-49DD-A678-62BC2AEB6A2D}.Debug|x86.Build.0 = Debug|Any CPU + {AFDC7537-6348-49DD-A678-62BC2AEB6A2D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AFDC7537-6348-49DD-A678-62BC2AEB6A2D}.Release|Any CPU.Build.0 = Release|Any CPU + {AFDC7537-6348-49DD-A678-62BC2AEB6A2D}.Release|arm.ActiveCfg = Release|Any CPU + {AFDC7537-6348-49DD-A678-62BC2AEB6A2D}.Release|arm64.ActiveCfg = Release|Any CPU + {AFDC7537-6348-49DD-A678-62BC2AEB6A2D}.Release|x64.ActiveCfg = Release|Any CPU + {AFDC7537-6348-49DD-A678-62BC2AEB6A2D}.Release|x64.Build.0 = Release|Any CPU + {AFDC7537-6348-49DD-A678-62BC2AEB6A2D}.Release|x86.ActiveCfg = Release|Any CPU + {AFDC7537-6348-49DD-A678-62BC2AEB6A2D}.Release|x86.Build.0 = Release|Any CPU + {AFDC7537-6348-49DD-A678-62BC2AEB6A2D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {AFDC7537-6348-49DD-A678-62BC2AEB6A2D}.Checked|arm.ActiveCfg = Debug|Any CPU + {AFDC7537-6348-49DD-A678-62BC2AEB6A2D}.Checked|arm64.ActiveCfg = Debug|Any CPU + {AFDC7537-6348-49DD-A678-62BC2AEB6A2D}.Checked|x64.ActiveCfg = Debug|Any CPU + {AFDC7537-6348-49DD-A678-62BC2AEB6A2D}.Checked|x86.ActiveCfg = Debug|Any CPU + {DCE05EB6-6F18-48C1-9252-994EC75601E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DCE05EB6-6F18-48C1-9252-994EC75601E6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DCE05EB6-6F18-48C1-9252-994EC75601E6}.Debug|arm.ActiveCfg = Debug|Any CPU + {DCE05EB6-6F18-48C1-9252-994EC75601E6}.Debug|arm64.ActiveCfg = Debug|Any CPU + {DCE05EB6-6F18-48C1-9252-994EC75601E6}.Debug|x64.ActiveCfg = Debug|Any CPU + {DCE05EB6-6F18-48C1-9252-994EC75601E6}.Debug|x64.Build.0 = Debug|Any CPU + {DCE05EB6-6F18-48C1-9252-994EC75601E6}.Debug|x86.ActiveCfg = Debug|Any CPU + {DCE05EB6-6F18-48C1-9252-994EC75601E6}.Debug|x86.Build.0 = Debug|Any CPU + {DCE05EB6-6F18-48C1-9252-994EC75601E6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DCE05EB6-6F18-48C1-9252-994EC75601E6}.Release|Any CPU.Build.0 = Release|Any CPU + {DCE05EB6-6F18-48C1-9252-994EC75601E6}.Release|arm.ActiveCfg = Release|Any CPU + {DCE05EB6-6F18-48C1-9252-994EC75601E6}.Release|arm64.ActiveCfg = Release|Any CPU + {DCE05EB6-6F18-48C1-9252-994EC75601E6}.Release|x64.ActiveCfg = Release|Any CPU + {DCE05EB6-6F18-48C1-9252-994EC75601E6}.Release|x64.Build.0 = Release|Any CPU + {DCE05EB6-6F18-48C1-9252-994EC75601E6}.Release|x86.ActiveCfg = Release|Any CPU + {DCE05EB6-6F18-48C1-9252-994EC75601E6}.Release|x86.Build.0 = Release|Any CPU + {DCE05EB6-6F18-48C1-9252-994EC75601E6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {DCE05EB6-6F18-48C1-9252-994EC75601E6}.Checked|arm.ActiveCfg = Debug|Any CPU + {DCE05EB6-6F18-48C1-9252-994EC75601E6}.Checked|arm64.ActiveCfg = Debug|Any CPU + {DCE05EB6-6F18-48C1-9252-994EC75601E6}.Checked|x64.ActiveCfg = Debug|Any CPU + {DCE05EB6-6F18-48C1-9252-994EC75601E6}.Checked|x86.ActiveCfg = Debug|Any CPU + {9C0272A9-70D5-4917-B918-9E44F14B0488}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9C0272A9-70D5-4917-B918-9E44F14B0488}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9C0272A9-70D5-4917-B918-9E44F14B0488}.Debug|arm.ActiveCfg = Debug|Any CPU + {9C0272A9-70D5-4917-B918-9E44F14B0488}.Debug|arm64.ActiveCfg = Debug|Any CPU + {9C0272A9-70D5-4917-B918-9E44F14B0488}.Debug|x64.ActiveCfg = Debug|Any CPU + {9C0272A9-70D5-4917-B918-9E44F14B0488}.Debug|x64.Build.0 = Debug|Any CPU + {9C0272A9-70D5-4917-B918-9E44F14B0488}.Debug|x86.ActiveCfg = Debug|Any CPU + {9C0272A9-70D5-4917-B918-9E44F14B0488}.Debug|x86.Build.0 = Debug|Any CPU + {9C0272A9-70D5-4917-B918-9E44F14B0488}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9C0272A9-70D5-4917-B918-9E44F14B0488}.Release|Any CPU.Build.0 = Release|Any CPU + {9C0272A9-70D5-4917-B918-9E44F14B0488}.Release|arm.ActiveCfg = Release|Any CPU + {9C0272A9-70D5-4917-B918-9E44F14B0488}.Release|arm64.ActiveCfg = Release|Any CPU + {9C0272A9-70D5-4917-B918-9E44F14B0488}.Release|x64.ActiveCfg = Release|Any CPU + {9C0272A9-70D5-4917-B918-9E44F14B0488}.Release|x64.Build.0 = Release|Any CPU + {9C0272A9-70D5-4917-B918-9E44F14B0488}.Release|x86.ActiveCfg = Release|Any CPU + {9C0272A9-70D5-4917-B918-9E44F14B0488}.Release|x86.Build.0 = Release|Any CPU + {9C0272A9-70D5-4917-B918-9E44F14B0488}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {9C0272A9-70D5-4917-B918-9E44F14B0488}.Checked|arm.ActiveCfg = Debug|Any CPU + {9C0272A9-70D5-4917-B918-9E44F14B0488}.Checked|arm64.ActiveCfg = Debug|Any CPU + {9C0272A9-70D5-4917-B918-9E44F14B0488}.Checked|x64.ActiveCfg = Debug|Any CPU + {9C0272A9-70D5-4917-B918-9E44F14B0488}.Checked|x86.ActiveCfg = Debug|Any CPU + {5489EFA6-E32A-4B53-AC04-862DCE8B4E86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5489EFA6-E32A-4B53-AC04-862DCE8B4E86}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5489EFA6-E32A-4B53-AC04-862DCE8B4E86}.Debug|arm.ActiveCfg = Debug|Any CPU + {5489EFA6-E32A-4B53-AC04-862DCE8B4E86}.Debug|arm64.ActiveCfg = Debug|Any CPU + {5489EFA6-E32A-4B53-AC04-862DCE8B4E86}.Debug|x64.ActiveCfg = Debug|Any CPU + {5489EFA6-E32A-4B53-AC04-862DCE8B4E86}.Debug|x64.Build.0 = Debug|Any CPU + {5489EFA6-E32A-4B53-AC04-862DCE8B4E86}.Debug|x86.ActiveCfg = Debug|Any CPU + {5489EFA6-E32A-4B53-AC04-862DCE8B4E86}.Debug|x86.Build.0 = Debug|Any CPU + {5489EFA6-E32A-4B53-AC04-862DCE8B4E86}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5489EFA6-E32A-4B53-AC04-862DCE8B4E86}.Release|Any CPU.Build.0 = Release|Any CPU + {5489EFA6-E32A-4B53-AC04-862DCE8B4E86}.Release|arm.ActiveCfg = Release|Any CPU + {5489EFA6-E32A-4B53-AC04-862DCE8B4E86}.Release|arm64.ActiveCfg = Release|Any CPU + {5489EFA6-E32A-4B53-AC04-862DCE8B4E86}.Release|x64.ActiveCfg = Release|Any CPU + {5489EFA6-E32A-4B53-AC04-862DCE8B4E86}.Release|x64.Build.0 = Release|Any CPU + {5489EFA6-E32A-4B53-AC04-862DCE8B4E86}.Release|x86.ActiveCfg = Release|Any CPU + {5489EFA6-E32A-4B53-AC04-862DCE8B4E86}.Release|x86.Build.0 = Release|Any CPU + {5489EFA6-E32A-4B53-AC04-862DCE8B4E86}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {5489EFA6-E32A-4B53-AC04-862DCE8B4E86}.Checked|arm.ActiveCfg = Debug|Any CPU + {5489EFA6-E32A-4B53-AC04-862DCE8B4E86}.Checked|arm64.ActiveCfg = Debug|Any CPU + {5489EFA6-E32A-4B53-AC04-862DCE8B4E86}.Checked|x64.ActiveCfg = Debug|Any CPU + {5489EFA6-E32A-4B53-AC04-862DCE8B4E86}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution + {0BC84292-E0FC-4A10-87A3-3F0A5167541F} = {0C89B197-6F7B-48BE-A6B9-885DAD4BDFBE} {20B92E8C-E720-4B5A-8647-97CC1BD71E84} = {B9925565-A803-4F7E-BABC-377A5DE41344} {EB8EF358-4028-4272-B71E-523F8D0A73F0} = {B9925565-A803-4F7E-BABC-377A5DE41344} - {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} - {2C707BFF-6BA9-4EB8-BC75-5341391B5FC6} = {BFF04E9C-277E-4CE3-8D38-FAFCA9B2D872} - {F8480484-A2CA-4215-AC4B-82F6149FEC02} = {BFF04E9C-277E-4CE3-8D38-FAFCA9B2D872} - {97932D09-4DF9-4836-ADEF-C52DBC0661CD} = {BFF04E9C-277E-4CE3-8D38-FAFCA9B2D872} + {1E95BC53-583D-4DDD-9E70-6F04D2D0C991} = {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} + {9F6EC049-D2C2-4228-B043-96D0918DF894} = {F2408438-D7E0-4D89-97B1-EDCC83EA8442} + {3BD4F46F-4EF5-478C-9FA4-C8ABE2E703DF} = {F2408438-D7E0-4D89-97B1-EDCC83EA8442} {43214093-FA08-4699-A62B-D7BC858BAC78} = {F2408438-D7E0-4D89-97B1-EDCC83EA8442} {1E0AB255-7FD0-4DE0-9675-59DE81B12E54} = {F2408438-D7E0-4D89-97B1-EDCC83EA8442} {60DB3C65-9EDA-45AA-85E6-37F1375CF1E7} = {F2408438-D7E0-4D89-97B1-EDCC83EA8442} - {2AFAE46F-B182-4F1E-9F5F-D3EB747A714A} = {651A1BB1-501D-45DA-9284-77F8FC083889} + {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} + {42924B5B-3EED-440B-9CB5-67F44F6E1592} = {BFF04E9C-277E-4CE3-8D38-FAFCA9B2D872} + {1AB14FD6-D3B1-4FE4-9595-F51D53584568} = {BFF04E9C-277E-4CE3-8D38-FAFCA9B2D872} + {2C707BFF-6BA9-4EB8-BC75-5341391B5FC6} = {BFF04E9C-277E-4CE3-8D38-FAFCA9B2D872} + {F8480484-A2CA-4215-AC4B-82F6149FEC02} = {BFF04E9C-277E-4CE3-8D38-FAFCA9B2D872} + {97932D09-4DF9-4836-ADEF-C52DBC0661CD} = {BFF04E9C-277E-4CE3-8D38-FAFCA9B2D872} + {C8008A7A-9910-4D19-AB2B-B96FF8538139} = {651A1BB1-501D-45DA-9284-77F8FC083889} {11F700BE-429D-4AAA-B797-4C6322503872} = {651A1BB1-501D-45DA-9284-77F8FC083889} {B690A8D8-E3BF-44D3-8FBC-D64A517B8AF3} = {651A1BB1-501D-45DA-9284-77F8FC083889} + {E33CEC60-CDBC-42F4-BF7C-55BFD8D3F9C2} = {9C612F41-D9CB-48D7-92BE-B364078E1D66} + {AFDC7537-6348-49DD-A678-62BC2AEB6A2D} = {9C612F41-D9CB-48D7-92BE-B364078E1D66} + {9C612F41-D9CB-48D7-92BE-B364078E1D66} = {8374E1B5-B64E-496F-86C2-D8907A804B9C} + {DCE05EB6-6F18-48C1-9252-994EC75601E6} = {6DCD869A-C586-4328-B60E-0086398DBA35} + {9C0272A9-70D5-4917-B918-9E44F14B0488} = {6DCD869A-C586-4328-B60E-0086398DBA35} + {6DCD869A-C586-4328-B60E-0086398DBA35} = {8374E1B5-B64E-496F-86C2-D8907A804B9C} + {5489EFA6-E32A-4B53-AC04-862DCE8B4E86} = {3C20311A-FA3F-4B39-AC72-103011866E88} + {3C20311A-FA3F-4B39-AC72-103011866E88} = {8374E1B5-B64E-496F-86C2-D8907A804B9C} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {51062B21-546F-4B2A-A2B8-77ABF1079C06} diff --git a/src/libraries/System.Diagnostics.PerformanceCounter/src/CompatibilitySuppressions.xml b/src/libraries/System.Diagnostics.PerformanceCounter/src/CompatibilitySuppressions.xml index 5b0ede07a25152..fa86add0aa3984 100644 --- a/src/libraries/System.Diagnostics.PerformanceCounter/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Diagnostics.PerformanceCounter/src/CompatibilitySuppressions.xml @@ -1,5 +1,20 @@  + + + CP0008 + T:System.Diagnostics.CounterSample + lib/net6.0/System.Diagnostics.PerformanceCounter.dll + lib/netstandard2.0/System.Diagnostics.PerformanceCounter.dll + true + + + CP0008 + T:System.Diagnostics.CounterSample + lib/net7.0/System.Diagnostics.PerformanceCounter.dll + lib/netstandard2.0/System.Diagnostics.PerformanceCounter.dll + true + CP0015 F:System.Diagnostics.PerformanceCounter.DefaultFileMappingSize:[T:System.ObsoleteAttribute] @@ -36,4 +51,18 @@ lib/netstandard2.0/System.Diagnostics.PerformanceCounter.dll lib/net462/System.Diagnostics.PerformanceCounter.dll + + CP1002 + System.ComponentModel.Primitives, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.Diagnostics.PerformanceCounter.dll + lib/netstandard2.0/System.Diagnostics.PerformanceCounter.dll + true + + + CP1002 + System.ComponentModel.Primitives, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.Diagnostics.PerformanceCounter.dll + lib/netstandard2.0/System.Diagnostics.PerformanceCounter.dll + true + \ No newline at end of file diff --git a/src/libraries/System.Diagnostics.PerformanceCounter/src/PACKAGE.md b/src/libraries/System.Diagnostics.PerformanceCounter/src/PACKAGE.md new file mode 100644 index 00000000000000..475291274ff289 --- /dev/null +++ b/src/libraries/System.Diagnostics.PerformanceCounter/src/PACKAGE.md @@ -0,0 +1,223 @@ +## About + + + +This package provides types that allow applications to interact with the Windows performance counters. + +Windows allows you to examine how programs you run affect your computer's performance, both in real time and by collecting log data for later analysis. You can do this via the Windows Performance Monitor tool, which uses performance counters, among other features. + +Windows performance counters provide a high-level abstraction layer that provides a consistent interface for collecting various kinds of system data such as CPU, memory, and disk usage. They can be included in the operating system or can be part of individual applications. Windows Performance Monitor requests the current value of performance counters at specifiedtime intervals. + +System administrators often use performance counters to monitor systems for performance or behavior problems. Software developers often use performance counters to examine the resource usage of their programs. + +## Key Features + + + +* Can be used to read existing predefined or custom counters. +* Can be used for publishing (writing) data to custom counters. +* Can collect performance counters from the local machine or from a remote machine. + +## How to Use + + + +```cs +using System; +using System.Collections.Generic; +using System.Diagnostics; + +public class App +{ + public static void Main() + { + List samples = []; + + // If the category does not exist, create the category and exit. + // Performance counters should not be created and immediately used. + // There is a latency time to enable the counters, they should be created + // prior to executing the application that uses the counters. + // Execute this sample a second time to use the category. + if (SetupCategory()) + { + return; + } + + CollectSamples(samples); + CalculateResults(samples); + } + + private static bool SetupCategory() + { + if (PerformanceCounterCategory.Exists("AverageCounter64SampleCategory")) + { + Console.WriteLine("Category exists - AverageCounter64SampleCategory"); + return false; + } + + CounterCreationDataCollection counterDataCollection = []; + + // Add the counter. + CounterCreationData averageCount64 = new() + { + CounterType = PerformanceCounterType.AverageCount64, + CounterName = "AverageCounter64Sample" + }; + counterDataCollection.Add(averageCount64); + + // Add the base counter. + CounterCreationData averageCount64Base = new() + { + CounterType = PerformanceCounterType.AverageBase, + CounterName = "AverageCounter64SampleBase" + }; + counterDataCollection.Add(averageCount64Base); + + // Create the category. + PerformanceCounterCategory.Create("AverageCounter64SampleCategory", + "Demonstrates usage of the AverageCounter64 performance counter type.", + PerformanceCounterCategoryType.SingleInstance, counterDataCollection); + + return true; + } + + private static void CollectSamples(List samples) + { + // Create the counters + + PerformanceCounter avgCounter64Sample = new PerformanceCounter("AverageCounter64SampleCategory", + "AverageCounter64Sample", + false) + { + RawValue = 0 + }; + + PerformanceCounter avgCounter64SampleBase = new PerformanceCounter("AverageCounter64SampleCategory", + "AverageCounter64SampleBase", + false) + { + RawValue = 0 + }; + + Random r = new(DateTime.Now.Millisecond); + + for (int j = 0; j < 100; j++) + { + int value = r.Next(1, 10); + Console.Write(j + " = " + value); + + avgCounter64Sample.IncrementBy(value); + + avgCounter64SampleBase.Increment(); + + if ((j % 10) == 9) + { + OutputSample(avgCounter64Sample.NextSample()); + samples.Add(avgCounter64Sample.NextSample()); + } + else + { + Console.WriteLine(); + } + + System.Threading.Thread.Sleep(50); + } + } + + private static void CalculateResults(List samples) + { + for (int i = 0; i < (samples.Count - 1); i++) + { + // Output the sample. + OutputSample(samples[i]); + OutputSample(samples[i + 1]); + + // Use .NET to calculate the counter value. + Console.WriteLine($".NET computed counter value = {CounterSampleCalculator.ComputeCounterValue(samples[i], samples[i + 1])}"); + + // Calculate the counter value manually. + Console.WriteLine($"My computed counter value = {MyComputeCounterValue(samples[i], samples[i + 1])}"); + } + } + + // Description - This counter type shows how many items are processed, on average, + // during an operation. Counters of this type display a ratio of the items + // processed (such as bytes sent) to the number of operations completed. The + // ratio is calculated by comparing the number of items processed during the + // last interval to the number of operations completed during the last interval. + // Generic type - Average + // Formula - (N1 - N0) / (D1 - D0), where the numerator (N) represents the number + // of items processed during the last sample interval and the denominator (D) + // represents the number of operations completed during the last two sample + // intervals. + // Average (Nx - N0) / (Dx - D0) + // Example PhysicalDisk\ Avg. Disk Bytes/Transfer + private static float MyComputeCounterValue(CounterSample s0, CounterSample s1) + { + float numerator = (float)s1.RawValue - s0.RawValue; + float denomenator = (float)s1.BaseValue - s0.BaseValue; + float counterValue = numerator / denomenator; + return counterValue; + } + + private static void OutputSample(CounterSample s) + { + Console.WriteLine("\r\n+++++++++++"); + Console.WriteLine("Sample values - \r\n"); + Console.WriteLine($" BaseValue = {s.BaseValue}"); + Console.WriteLine($" CounterFrequency = {s.CounterFrequency}"); + Console.WriteLine($" CounterTimeStamp = {s.CounterTimeStamp}"); + Console.WriteLine($" CounterType = {s.CounterType}"); + Console.WriteLine($" RawValue = {s.RawValue}"); + Console.WriteLine($" SystemFrequency = {s.SystemFrequency}"); + Console.WriteLine($" TimeStamp = {s.TimeStamp}"); + Console.WriteLine($" TimeStamp100nSec = {s.TimeStamp100nSec}"); + Console.WriteLine("++++++++++++++++++++++"); + } +} +``` + +Notes: + +* This assembly is only supported on Windows operating systems. +* Only the administrator of the computer or users in the Performance Logs User Group can log counter data. Users in the Administrator group can log counter data only if the tool they use to log counter data is started from a Command Prompt window that is opened with `Run as administrator...`. Any users in interactive logon sessions can view counter data. However, users in non-interactive logon sessions must be in the Performance Monitoring Users group to view counter data. + +## Main Types + + + +The main types provided by this library are: + +Under the [`System.Diagnostics`](https://learn.microsoft.com/dotnet/api/System.Diagnostics) namespace, the main types are: + +* [`System.Diagnostics.CounterCreationData`](https://learn.microsoft.com/dotnet/api/System.Diagnostics.CounterCreationData) +* [`System.Diagnostics.CounterCreationDataCollection`](https://learn.microsoft.com/dotnet/api/System.Diagnostics.CounterCreationDataCollection) +* [`System.Diagnostics.PerformanceCounter`](https://learn.microsoft.com/dotnet/api/System.Diagnostics.PerformanceCounter) + +Under the [`System.Diagnostics.PerformanceData`](https://learn.microsoft.com/dotnet/api/System.Diagnostics.PerformanceData) namespace, the main types are: + +* [`System.Diagnostics.PerformanceData.CounterData`](https://learn.microsoft.com/dotnet/api/System.Diagnostics.PerformanceData.CounterData) +* [`System.Diagnostics.PerformanceData.CounterSet`](https://learn.microsoft.com/dotnet/api/System.Diagnostics.PerformanceData.CounterSet) +* [`System.Diagnostics.PerformanceData.CounterType`](https://learn.microsoft.com/dotnet/api/System.Diagnostics.PerformanceData.CounterType) + +## Additional Documentation + + + +* [Microsoft Learn - System.Diagnostics.PerformanceCounter API reference](https://learn.microsoft.com/dotnet/api/system.diagnostics.performancecounter?view=dotnet-plat-ext-7.0) +* [Windows App Development - Performance Counters](https://learn.microsoft.com/windows/win32/perfctrs/performance-counters-portal) +* [Windows Performance and Reliability - Windows Performance Monitor](https://learn.microsoft.com/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc749249(v=ws.11)) +* [Windows Server - perfmon](https://learn.microsoft.com/windows-server/administration/windows-commands/perfmon) +* [GitHub - Source code](https://github.com/dotnet/runtime/tree/main/src/libraries/System.Diagnostics.PerformanceCounter) + +## Related Packages + + + +* [System.Diagnostics.EventLog](https://www.nuget.org/packages/System.Diagnostics.EventLog) + +## Feedback & Contributing + + + +System.Diagnostics.PerformanceCounter is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). diff --git a/src/libraries/System.Diagnostics.PerformanceCounter/src/System.Diagnostics.PerformanceCounter.csproj b/src/libraries/System.Diagnostics.PerformanceCounter/src/System.Diagnostics.PerformanceCounter.csproj index 8f8c2613c20613..c0435f2293bb11 100644 --- a/src/libraries/System.Diagnostics.PerformanceCounter/src/System.Diagnostics.PerformanceCounter.csproj +++ b/src/libraries/System.Diagnostics.PerformanceCounter/src/System.Diagnostics.PerformanceCounter.csproj @@ -1,4 +1,5 @@ + $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent);$(NetCoreAppPrevious)-windows;$(NetCoreAppPrevious);$(NetCoreAppMinimum)-windows;$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) true @@ -128,7 +129,7 @@ System.Diagnostics.PerformanceCounter Link="Common\System\Diagnostics\NetFrameworkUtils.cs" /> - + @@ -136,4 +137,5 @@ System.Diagnostics.PerformanceCounter + diff --git a/src/libraries/System.Diagnostics.Process/System.Diagnostics.Process.sln b/src/libraries/System.Diagnostics.Process/System.Diagnostics.Process.sln index c66b79308c95fb..6ac4b2f6d0d21d 100644 --- a/src/libraries/System.Diagnostics.Process/System.Diagnostics.Process.sln +++ b/src/libraries/System.Diagnostics.Process/System.Diagnostics.Process.sln @@ -1,10 +1,14 @@ 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", "{946BAB0E-CD71-4456-9FBB-2066470A83B5}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{3742D5F8-5C86-49FD-BAEA-050742CCEB7A}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Win32.Registry", "..\Microsoft.Win32.Registry\ref\Microsoft.Win32.Registry.csproj", "{359DC957-11BD-4934-88BB-15744852E6BA}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Win32.Registry", "..\Microsoft.Win32.Registry\src\Microsoft.Win32.Registry.csproj", "{E5AE4EB3-DB23-4F33-858B-63B68A60F7F1}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Drawing.Common", "..\shims\stubs\System.Drawing.Common.csproj", "{33163E79-02D8-4ED2-BED9-3A96D94B7D41}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Collections.NonGeneric", "..\System.Collections.NonGeneric\ref\System.Collections.NonGeneric.csproj", "{0EB76163-3756-4217-A1EE-76E39A822728}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Collections.Specialized", "..\System.Collections.Specialized\ref\System.Collections.Specialized.csproj", "{34117938-CD34-41F6-9B79-E7868435F303}" @@ -37,6 +41,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.DirectoryServices", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ObjectModel", "..\System.ObjectModel\ref\System.ObjectModel.csproj", "{E4D48405-30B4-4CEC-925B-851133BACC3D}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{4165769D-C4EE-46C4-9FA2-068DBF1BDB0A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{1B7EED4E-D261-4795-84FA-1B948B6E9E53}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.Uri", "..\System.Private.Uri\src\System.Private.Uri.csproj", "{FD0788DC-C765-41A8-9EBF-93DAAA92F9AD}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{ABF31AAD-012E-4DD3-9B10-2F4590333A22}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{C8F1CF01-F4E9-4459-9FBB-34363A0C377E}" @@ -47,6 +57,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.InteropServi EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{5823DDA1-6CCB-4EBC-89DF-6AC430C64204}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\src\System.Runtime.csproj", "{CEAF6846-A3EB-4DBF-897A-BD6A95BFB384}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.AccessControl", "..\System.Security.AccessControl\ref\System.Security.AccessControl.csproj", "{31A2D9B9-434C-4859-A78E-90E912FB86C1}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Claims", "..\System.Security.Claims\ref\System.Security.Claims.csproj", "{07A70B08-8CD2-4441-B619-2674A8384077}" @@ -65,6 +77,18 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", "..\System.Windows.Extensions\src\System.Windows.Extensions.csproj", "{9C521ED1-5221-4C93-BBA0-86C13D4C23C7}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{9A6E8083-DD07-4006-831D-23C49831981A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{D3D0D188-947E-46E2-9B61-388B34B3140E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{EAE01BBD-4707-499B-8E8D-567F1694EF98}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{DB6DC8D8-7329-4427-9641-1415ACF118A6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{3A466C9C-F42B-462A-9D0B-96CDA47A8210}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{C5847D76-464F-49B7-B5BE-80F9FCA55883}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{0F383187-7D3B-4EF3-844B-CFBE0276A7B8}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{8A0AABD7-E3CA-40EA-8290-CEB1D3D0F9AD}" @@ -73,149 +97,972 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B27D0964-41D EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{8CB89ED5-7600-48B5-B7F4-72026EB9F533}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{AB1A5F67-F907-4B8C-9076-1279BC039D8C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{0ECB6471-9FBC-467D-870F-458C231E7B9D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{0F35AB40-A435-463A-914A-5339D0ED4A0F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{41A7005B-1CD2-4EC1-BFC8-D0886ED4B7BB}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|arm = Debug|arm + Debug|arm64 = Debug|arm64 + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|arm = Release|arm + Release|arm64 = Release|arm64 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + Checked|Any CPU = Checked|Any CPU + Checked|arm = Checked|arm + Checked|arm64 = Checked|arm64 + Checked|x64 = Checked|x64 + Checked|x86 = Checked|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {946BAB0E-CD71-4456-9FBB-2066470A83B5}.Debug|Any CPU.ActiveCfg = Debug|x64 + {946BAB0E-CD71-4456-9FBB-2066470A83B5}.Debug|Any CPU.Build.0 = Debug|x64 + {946BAB0E-CD71-4456-9FBB-2066470A83B5}.Debug|arm.ActiveCfg = Debug|arm + {946BAB0E-CD71-4456-9FBB-2066470A83B5}.Debug|arm.Build.0 = Debug|arm + {946BAB0E-CD71-4456-9FBB-2066470A83B5}.Debug|arm64.ActiveCfg = Debug|arm64 + {946BAB0E-CD71-4456-9FBB-2066470A83B5}.Debug|arm64.Build.0 = Debug|arm64 + {946BAB0E-CD71-4456-9FBB-2066470A83B5}.Debug|x64.ActiveCfg = Debug|x64 + {946BAB0E-CD71-4456-9FBB-2066470A83B5}.Debug|x64.Build.0 = Debug|x64 + {946BAB0E-CD71-4456-9FBB-2066470A83B5}.Debug|x86.ActiveCfg = Debug|x86 + {946BAB0E-CD71-4456-9FBB-2066470A83B5}.Debug|x86.Build.0 = Debug|x86 + {946BAB0E-CD71-4456-9FBB-2066470A83B5}.Release|Any CPU.ActiveCfg = Release|x64 + {946BAB0E-CD71-4456-9FBB-2066470A83B5}.Release|Any CPU.Build.0 = Release|x64 + {946BAB0E-CD71-4456-9FBB-2066470A83B5}.Release|arm.ActiveCfg = Release|arm + {946BAB0E-CD71-4456-9FBB-2066470A83B5}.Release|arm.Build.0 = Release|arm + {946BAB0E-CD71-4456-9FBB-2066470A83B5}.Release|arm64.ActiveCfg = Release|arm64 + {946BAB0E-CD71-4456-9FBB-2066470A83B5}.Release|arm64.Build.0 = Release|arm64 + {946BAB0E-CD71-4456-9FBB-2066470A83B5}.Release|x64.ActiveCfg = Release|x64 + {946BAB0E-CD71-4456-9FBB-2066470A83B5}.Release|x64.Build.0 = Release|x64 + {946BAB0E-CD71-4456-9FBB-2066470A83B5}.Release|x86.ActiveCfg = Release|x86 + {946BAB0E-CD71-4456-9FBB-2066470A83B5}.Release|x86.Build.0 = Release|x86 + {946BAB0E-CD71-4456-9FBB-2066470A83B5}.Checked|Any CPU.ActiveCfg = Checked|x64 + {946BAB0E-CD71-4456-9FBB-2066470A83B5}.Checked|Any CPU.Build.0 = Checked|x64 + {946BAB0E-CD71-4456-9FBB-2066470A83B5}.Checked|arm.ActiveCfg = Checked|arm + {946BAB0E-CD71-4456-9FBB-2066470A83B5}.Checked|arm.Build.0 = Checked|arm + {946BAB0E-CD71-4456-9FBB-2066470A83B5}.Checked|arm64.ActiveCfg = Checked|arm64 + {946BAB0E-CD71-4456-9FBB-2066470A83B5}.Checked|arm64.Build.0 = Checked|arm64 + {946BAB0E-CD71-4456-9FBB-2066470A83B5}.Checked|x64.ActiveCfg = Checked|x64 + {946BAB0E-CD71-4456-9FBB-2066470A83B5}.Checked|x64.Build.0 = Checked|x64 + {946BAB0E-CD71-4456-9FBB-2066470A83B5}.Checked|x86.ActiveCfg = Checked|x86 + {946BAB0E-CD71-4456-9FBB-2066470A83B5}.Checked|x86.Build.0 = Checked|x86 {3742D5F8-5C86-49FD-BAEA-050742CCEB7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3742D5F8-5C86-49FD-BAEA-050742CCEB7A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3742D5F8-5C86-49FD-BAEA-050742CCEB7A}.Debug|arm.ActiveCfg = Debug|Any CPU + {3742D5F8-5C86-49FD-BAEA-050742CCEB7A}.Debug|arm64.ActiveCfg = Debug|Any CPU + {3742D5F8-5C86-49FD-BAEA-050742CCEB7A}.Debug|x64.ActiveCfg = Debug|Any CPU + {3742D5F8-5C86-49FD-BAEA-050742CCEB7A}.Debug|x64.Build.0 = Debug|Any CPU + {3742D5F8-5C86-49FD-BAEA-050742CCEB7A}.Debug|x86.ActiveCfg = Debug|Any CPU + {3742D5F8-5C86-49FD-BAEA-050742CCEB7A}.Debug|x86.Build.0 = Debug|Any CPU {3742D5F8-5C86-49FD-BAEA-050742CCEB7A}.Release|Any CPU.ActiveCfg = Release|Any CPU {3742D5F8-5C86-49FD-BAEA-050742CCEB7A}.Release|Any CPU.Build.0 = Release|Any CPU + {3742D5F8-5C86-49FD-BAEA-050742CCEB7A}.Release|arm.ActiveCfg = Release|Any CPU + {3742D5F8-5C86-49FD-BAEA-050742CCEB7A}.Release|arm64.ActiveCfg = Release|Any CPU + {3742D5F8-5C86-49FD-BAEA-050742CCEB7A}.Release|x64.ActiveCfg = Release|Any CPU + {3742D5F8-5C86-49FD-BAEA-050742CCEB7A}.Release|x64.Build.0 = Release|Any CPU + {3742D5F8-5C86-49FD-BAEA-050742CCEB7A}.Release|x86.ActiveCfg = Release|Any CPU + {3742D5F8-5C86-49FD-BAEA-050742CCEB7A}.Release|x86.Build.0 = Release|Any CPU + {3742D5F8-5C86-49FD-BAEA-050742CCEB7A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {3742D5F8-5C86-49FD-BAEA-050742CCEB7A}.Checked|arm.ActiveCfg = Debug|Any CPU + {3742D5F8-5C86-49FD-BAEA-050742CCEB7A}.Checked|arm64.ActiveCfg = Debug|Any CPU + {3742D5F8-5C86-49FD-BAEA-050742CCEB7A}.Checked|x64.ActiveCfg = Debug|Any CPU + {3742D5F8-5C86-49FD-BAEA-050742CCEB7A}.Checked|x86.ActiveCfg = Debug|Any CPU {359DC957-11BD-4934-88BB-15744852E6BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {359DC957-11BD-4934-88BB-15744852E6BA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {359DC957-11BD-4934-88BB-15744852E6BA}.Debug|arm.ActiveCfg = Debug|Any CPU + {359DC957-11BD-4934-88BB-15744852E6BA}.Debug|arm64.ActiveCfg = Debug|Any CPU + {359DC957-11BD-4934-88BB-15744852E6BA}.Debug|x64.ActiveCfg = Debug|Any CPU + {359DC957-11BD-4934-88BB-15744852E6BA}.Debug|x64.Build.0 = Debug|Any CPU + {359DC957-11BD-4934-88BB-15744852E6BA}.Debug|x86.ActiveCfg = Debug|Any CPU + {359DC957-11BD-4934-88BB-15744852E6BA}.Debug|x86.Build.0 = Debug|Any CPU {359DC957-11BD-4934-88BB-15744852E6BA}.Release|Any CPU.ActiveCfg = Release|Any CPU {359DC957-11BD-4934-88BB-15744852E6BA}.Release|Any CPU.Build.0 = Release|Any CPU + {359DC957-11BD-4934-88BB-15744852E6BA}.Release|arm.ActiveCfg = Release|Any CPU + {359DC957-11BD-4934-88BB-15744852E6BA}.Release|arm64.ActiveCfg = Release|Any CPU + {359DC957-11BD-4934-88BB-15744852E6BA}.Release|x64.ActiveCfg = Release|Any CPU + {359DC957-11BD-4934-88BB-15744852E6BA}.Release|x64.Build.0 = Release|Any CPU + {359DC957-11BD-4934-88BB-15744852E6BA}.Release|x86.ActiveCfg = Release|Any CPU + {359DC957-11BD-4934-88BB-15744852E6BA}.Release|x86.Build.0 = Release|Any CPU + {359DC957-11BD-4934-88BB-15744852E6BA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {359DC957-11BD-4934-88BB-15744852E6BA}.Checked|arm.ActiveCfg = Debug|Any CPU + {359DC957-11BD-4934-88BB-15744852E6BA}.Checked|arm64.ActiveCfg = Debug|Any CPU + {359DC957-11BD-4934-88BB-15744852E6BA}.Checked|x64.ActiveCfg = Debug|Any CPU + {359DC957-11BD-4934-88BB-15744852E6BA}.Checked|x86.ActiveCfg = Debug|Any CPU {E5AE4EB3-DB23-4F33-858B-63B68A60F7F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E5AE4EB3-DB23-4F33-858B-63B68A60F7F1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E5AE4EB3-DB23-4F33-858B-63B68A60F7F1}.Debug|arm.ActiveCfg = Debug|Any CPU + {E5AE4EB3-DB23-4F33-858B-63B68A60F7F1}.Debug|arm64.ActiveCfg = Debug|Any CPU + {E5AE4EB3-DB23-4F33-858B-63B68A60F7F1}.Debug|x64.ActiveCfg = Debug|Any CPU + {E5AE4EB3-DB23-4F33-858B-63B68A60F7F1}.Debug|x64.Build.0 = Debug|Any CPU + {E5AE4EB3-DB23-4F33-858B-63B68A60F7F1}.Debug|x86.ActiveCfg = Debug|Any CPU + {E5AE4EB3-DB23-4F33-858B-63B68A60F7F1}.Debug|x86.Build.0 = Debug|Any CPU {E5AE4EB3-DB23-4F33-858B-63B68A60F7F1}.Release|Any CPU.ActiveCfg = Release|Any CPU {E5AE4EB3-DB23-4F33-858B-63B68A60F7F1}.Release|Any CPU.Build.0 = Release|Any CPU + {E5AE4EB3-DB23-4F33-858B-63B68A60F7F1}.Release|arm.ActiveCfg = Release|Any CPU + {E5AE4EB3-DB23-4F33-858B-63B68A60F7F1}.Release|arm64.ActiveCfg = Release|Any CPU + {E5AE4EB3-DB23-4F33-858B-63B68A60F7F1}.Release|x64.ActiveCfg = Release|Any CPU + {E5AE4EB3-DB23-4F33-858B-63B68A60F7F1}.Release|x64.Build.0 = Release|Any CPU + {E5AE4EB3-DB23-4F33-858B-63B68A60F7F1}.Release|x86.ActiveCfg = Release|Any CPU + {E5AE4EB3-DB23-4F33-858B-63B68A60F7F1}.Release|x86.Build.0 = Release|Any CPU + {E5AE4EB3-DB23-4F33-858B-63B68A60F7F1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {E5AE4EB3-DB23-4F33-858B-63B68A60F7F1}.Checked|arm.ActiveCfg = Debug|Any CPU + {E5AE4EB3-DB23-4F33-858B-63B68A60F7F1}.Checked|arm64.ActiveCfg = Debug|Any CPU + {E5AE4EB3-DB23-4F33-858B-63B68A60F7F1}.Checked|x64.ActiveCfg = Debug|Any CPU + {E5AE4EB3-DB23-4F33-858B-63B68A60F7F1}.Checked|x86.ActiveCfg = Debug|Any CPU + {33163E79-02D8-4ED2-BED9-3A96D94B7D41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {33163E79-02D8-4ED2-BED9-3A96D94B7D41}.Debug|Any CPU.Build.0 = Debug|Any CPU + {33163E79-02D8-4ED2-BED9-3A96D94B7D41}.Debug|arm.ActiveCfg = Debug|Any CPU + {33163E79-02D8-4ED2-BED9-3A96D94B7D41}.Debug|arm64.ActiveCfg = Debug|Any CPU + {33163E79-02D8-4ED2-BED9-3A96D94B7D41}.Debug|x64.ActiveCfg = Debug|Any CPU + {33163E79-02D8-4ED2-BED9-3A96D94B7D41}.Debug|x64.Build.0 = Debug|Any CPU + {33163E79-02D8-4ED2-BED9-3A96D94B7D41}.Debug|x86.ActiveCfg = Debug|Any CPU + {33163E79-02D8-4ED2-BED9-3A96D94B7D41}.Debug|x86.Build.0 = Debug|Any CPU + {33163E79-02D8-4ED2-BED9-3A96D94B7D41}.Release|Any CPU.ActiveCfg = Release|Any CPU + {33163E79-02D8-4ED2-BED9-3A96D94B7D41}.Release|Any CPU.Build.0 = Release|Any CPU + {33163E79-02D8-4ED2-BED9-3A96D94B7D41}.Release|arm.ActiveCfg = Release|Any CPU + {33163E79-02D8-4ED2-BED9-3A96D94B7D41}.Release|arm64.ActiveCfg = Release|Any CPU + {33163E79-02D8-4ED2-BED9-3A96D94B7D41}.Release|x64.ActiveCfg = Release|Any CPU + {33163E79-02D8-4ED2-BED9-3A96D94B7D41}.Release|x64.Build.0 = Release|Any CPU + {33163E79-02D8-4ED2-BED9-3A96D94B7D41}.Release|x86.ActiveCfg = Release|Any CPU + {33163E79-02D8-4ED2-BED9-3A96D94B7D41}.Release|x86.Build.0 = Release|Any CPU + {33163E79-02D8-4ED2-BED9-3A96D94B7D41}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {33163E79-02D8-4ED2-BED9-3A96D94B7D41}.Checked|arm.ActiveCfg = Debug|Any CPU + {33163E79-02D8-4ED2-BED9-3A96D94B7D41}.Checked|arm64.ActiveCfg = Debug|Any CPU + {33163E79-02D8-4ED2-BED9-3A96D94B7D41}.Checked|x64.ActiveCfg = Debug|Any CPU + {33163E79-02D8-4ED2-BED9-3A96D94B7D41}.Checked|x86.ActiveCfg = Debug|Any CPU {0EB76163-3756-4217-A1EE-76E39A822728}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0EB76163-3756-4217-A1EE-76E39A822728}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0EB76163-3756-4217-A1EE-76E39A822728}.Debug|arm.ActiveCfg = Debug|Any CPU + {0EB76163-3756-4217-A1EE-76E39A822728}.Debug|arm64.ActiveCfg = Debug|Any CPU + {0EB76163-3756-4217-A1EE-76E39A822728}.Debug|x64.ActiveCfg = Debug|Any CPU + {0EB76163-3756-4217-A1EE-76E39A822728}.Debug|x64.Build.0 = Debug|Any CPU + {0EB76163-3756-4217-A1EE-76E39A822728}.Debug|x86.ActiveCfg = Debug|Any CPU + {0EB76163-3756-4217-A1EE-76E39A822728}.Debug|x86.Build.0 = Debug|Any CPU {0EB76163-3756-4217-A1EE-76E39A822728}.Release|Any CPU.ActiveCfg = Release|Any CPU {0EB76163-3756-4217-A1EE-76E39A822728}.Release|Any CPU.Build.0 = Release|Any CPU + {0EB76163-3756-4217-A1EE-76E39A822728}.Release|arm.ActiveCfg = Release|Any CPU + {0EB76163-3756-4217-A1EE-76E39A822728}.Release|arm64.ActiveCfg = Release|Any CPU + {0EB76163-3756-4217-A1EE-76E39A822728}.Release|x64.ActiveCfg = Release|Any CPU + {0EB76163-3756-4217-A1EE-76E39A822728}.Release|x64.Build.0 = Release|Any CPU + {0EB76163-3756-4217-A1EE-76E39A822728}.Release|x86.ActiveCfg = Release|Any CPU + {0EB76163-3756-4217-A1EE-76E39A822728}.Release|x86.Build.0 = Release|Any CPU + {0EB76163-3756-4217-A1EE-76E39A822728}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {0EB76163-3756-4217-A1EE-76E39A822728}.Checked|arm.ActiveCfg = Debug|Any CPU + {0EB76163-3756-4217-A1EE-76E39A822728}.Checked|arm64.ActiveCfg = Debug|Any CPU + {0EB76163-3756-4217-A1EE-76E39A822728}.Checked|x64.ActiveCfg = Debug|Any CPU + {0EB76163-3756-4217-A1EE-76E39A822728}.Checked|x86.ActiveCfg = Debug|Any CPU {34117938-CD34-41F6-9B79-E7868435F303}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {34117938-CD34-41F6-9B79-E7868435F303}.Debug|Any CPU.Build.0 = Debug|Any CPU + {34117938-CD34-41F6-9B79-E7868435F303}.Debug|arm.ActiveCfg = Debug|Any CPU + {34117938-CD34-41F6-9B79-E7868435F303}.Debug|arm64.ActiveCfg = Debug|Any CPU + {34117938-CD34-41F6-9B79-E7868435F303}.Debug|x64.ActiveCfg = Debug|Any CPU + {34117938-CD34-41F6-9B79-E7868435F303}.Debug|x64.Build.0 = Debug|Any CPU + {34117938-CD34-41F6-9B79-E7868435F303}.Debug|x86.ActiveCfg = Debug|Any CPU + {34117938-CD34-41F6-9B79-E7868435F303}.Debug|x86.Build.0 = Debug|Any CPU {34117938-CD34-41F6-9B79-E7868435F303}.Release|Any CPU.ActiveCfg = Release|Any CPU {34117938-CD34-41F6-9B79-E7868435F303}.Release|Any CPU.Build.0 = Release|Any CPU + {34117938-CD34-41F6-9B79-E7868435F303}.Release|arm.ActiveCfg = Release|Any CPU + {34117938-CD34-41F6-9B79-E7868435F303}.Release|arm64.ActiveCfg = Release|Any CPU + {34117938-CD34-41F6-9B79-E7868435F303}.Release|x64.ActiveCfg = Release|Any CPU + {34117938-CD34-41F6-9B79-E7868435F303}.Release|x64.Build.0 = Release|Any CPU + {34117938-CD34-41F6-9B79-E7868435F303}.Release|x86.ActiveCfg = Release|Any CPU + {34117938-CD34-41F6-9B79-E7868435F303}.Release|x86.Build.0 = Release|Any CPU + {34117938-CD34-41F6-9B79-E7868435F303}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {34117938-CD34-41F6-9B79-E7868435F303}.Checked|arm.ActiveCfg = Debug|Any CPU + {34117938-CD34-41F6-9B79-E7868435F303}.Checked|arm64.ActiveCfg = Debug|Any CPU + {34117938-CD34-41F6-9B79-E7868435F303}.Checked|x64.ActiveCfg = Debug|Any CPU + {34117938-CD34-41F6-9B79-E7868435F303}.Checked|x86.ActiveCfg = Debug|Any CPU {9343C704-F44E-4FAD-81AF-DAE87DDF2E79}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9343C704-F44E-4FAD-81AF-DAE87DDF2E79}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9343C704-F44E-4FAD-81AF-DAE87DDF2E79}.Debug|arm.ActiveCfg = Debug|Any CPU + {9343C704-F44E-4FAD-81AF-DAE87DDF2E79}.Debug|arm64.ActiveCfg = Debug|Any CPU + {9343C704-F44E-4FAD-81AF-DAE87DDF2E79}.Debug|x64.ActiveCfg = Debug|Any CPU + {9343C704-F44E-4FAD-81AF-DAE87DDF2E79}.Debug|x64.Build.0 = Debug|Any CPU + {9343C704-F44E-4FAD-81AF-DAE87DDF2E79}.Debug|x86.ActiveCfg = Debug|Any CPU + {9343C704-F44E-4FAD-81AF-DAE87DDF2E79}.Debug|x86.Build.0 = Debug|Any CPU {9343C704-F44E-4FAD-81AF-DAE87DDF2E79}.Release|Any CPU.ActiveCfg = Release|Any CPU {9343C704-F44E-4FAD-81AF-DAE87DDF2E79}.Release|Any CPU.Build.0 = Release|Any CPU + {9343C704-F44E-4FAD-81AF-DAE87DDF2E79}.Release|arm.ActiveCfg = Release|Any CPU + {9343C704-F44E-4FAD-81AF-DAE87DDF2E79}.Release|arm64.ActiveCfg = Release|Any CPU + {9343C704-F44E-4FAD-81AF-DAE87DDF2E79}.Release|x64.ActiveCfg = Release|Any CPU + {9343C704-F44E-4FAD-81AF-DAE87DDF2E79}.Release|x64.Build.0 = Release|Any CPU + {9343C704-F44E-4FAD-81AF-DAE87DDF2E79}.Release|x86.ActiveCfg = Release|Any CPU + {9343C704-F44E-4FAD-81AF-DAE87DDF2E79}.Release|x86.Build.0 = Release|Any CPU + {9343C704-F44E-4FAD-81AF-DAE87DDF2E79}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {9343C704-F44E-4FAD-81AF-DAE87DDF2E79}.Checked|arm.ActiveCfg = Debug|Any CPU + {9343C704-F44E-4FAD-81AF-DAE87DDF2E79}.Checked|arm64.ActiveCfg = Debug|Any CPU + {9343C704-F44E-4FAD-81AF-DAE87DDF2E79}.Checked|x64.ActiveCfg = Debug|Any CPU + {9343C704-F44E-4FAD-81AF-DAE87DDF2E79}.Checked|x86.ActiveCfg = Debug|Any CPU {EEDB3FA5-6E87-4066-99CB-FB1E19845293}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EEDB3FA5-6E87-4066-99CB-FB1E19845293}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EEDB3FA5-6E87-4066-99CB-FB1E19845293}.Debug|arm.ActiveCfg = Debug|Any CPU + {EEDB3FA5-6E87-4066-99CB-FB1E19845293}.Debug|arm64.ActiveCfg = Debug|Any CPU + {EEDB3FA5-6E87-4066-99CB-FB1E19845293}.Debug|x64.ActiveCfg = Debug|Any CPU + {EEDB3FA5-6E87-4066-99CB-FB1E19845293}.Debug|x64.Build.0 = Debug|Any CPU + {EEDB3FA5-6E87-4066-99CB-FB1E19845293}.Debug|x86.ActiveCfg = Debug|Any CPU + {EEDB3FA5-6E87-4066-99CB-FB1E19845293}.Debug|x86.Build.0 = Debug|Any CPU {EEDB3FA5-6E87-4066-99CB-FB1E19845293}.Release|Any CPU.ActiveCfg = Release|Any CPU {EEDB3FA5-6E87-4066-99CB-FB1E19845293}.Release|Any CPU.Build.0 = Release|Any CPU + {EEDB3FA5-6E87-4066-99CB-FB1E19845293}.Release|arm.ActiveCfg = Release|Any CPU + {EEDB3FA5-6E87-4066-99CB-FB1E19845293}.Release|arm64.ActiveCfg = Release|Any CPU + {EEDB3FA5-6E87-4066-99CB-FB1E19845293}.Release|x64.ActiveCfg = Release|Any CPU + {EEDB3FA5-6E87-4066-99CB-FB1E19845293}.Release|x64.Build.0 = Release|Any CPU + {EEDB3FA5-6E87-4066-99CB-FB1E19845293}.Release|x86.ActiveCfg = Release|Any CPU + {EEDB3FA5-6E87-4066-99CB-FB1E19845293}.Release|x86.Build.0 = Release|Any CPU + {EEDB3FA5-6E87-4066-99CB-FB1E19845293}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {EEDB3FA5-6E87-4066-99CB-FB1E19845293}.Checked|arm.ActiveCfg = Debug|Any CPU + {EEDB3FA5-6E87-4066-99CB-FB1E19845293}.Checked|arm64.ActiveCfg = Debug|Any CPU + {EEDB3FA5-6E87-4066-99CB-FB1E19845293}.Checked|x64.ActiveCfg = Debug|Any CPU + {EEDB3FA5-6E87-4066-99CB-FB1E19845293}.Checked|x86.ActiveCfg = Debug|Any CPU {76946469-3342-4FE2-BB84-1E86B627B4A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {76946469-3342-4FE2-BB84-1E86B627B4A1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {76946469-3342-4FE2-BB84-1E86B627B4A1}.Debug|arm.ActiveCfg = Debug|Any CPU + {76946469-3342-4FE2-BB84-1E86B627B4A1}.Debug|arm64.ActiveCfg = Debug|Any CPU + {76946469-3342-4FE2-BB84-1E86B627B4A1}.Debug|x64.ActiveCfg = Debug|Any CPU + {76946469-3342-4FE2-BB84-1E86B627B4A1}.Debug|x64.Build.0 = Debug|Any CPU + {76946469-3342-4FE2-BB84-1E86B627B4A1}.Debug|x86.ActiveCfg = Debug|Any CPU + {76946469-3342-4FE2-BB84-1E86B627B4A1}.Debug|x86.Build.0 = Debug|Any CPU {76946469-3342-4FE2-BB84-1E86B627B4A1}.Release|Any CPU.ActiveCfg = Release|Any CPU {76946469-3342-4FE2-BB84-1E86B627B4A1}.Release|Any CPU.Build.0 = Release|Any CPU + {76946469-3342-4FE2-BB84-1E86B627B4A1}.Release|arm.ActiveCfg = Release|Any CPU + {76946469-3342-4FE2-BB84-1E86B627B4A1}.Release|arm64.ActiveCfg = Release|Any CPU + {76946469-3342-4FE2-BB84-1E86B627B4A1}.Release|x64.ActiveCfg = Release|Any CPU + {76946469-3342-4FE2-BB84-1E86B627B4A1}.Release|x64.Build.0 = Release|Any CPU + {76946469-3342-4FE2-BB84-1E86B627B4A1}.Release|x86.ActiveCfg = Release|Any CPU + {76946469-3342-4FE2-BB84-1E86B627B4A1}.Release|x86.Build.0 = Release|Any CPU + {76946469-3342-4FE2-BB84-1E86B627B4A1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {76946469-3342-4FE2-BB84-1E86B627B4A1}.Checked|arm.ActiveCfg = Debug|Any CPU + {76946469-3342-4FE2-BB84-1E86B627B4A1}.Checked|arm64.ActiveCfg = Debug|Any CPU + {76946469-3342-4FE2-BB84-1E86B627B4A1}.Checked|x64.ActiveCfg = Debug|Any CPU + {76946469-3342-4FE2-BB84-1E86B627B4A1}.Checked|x86.ActiveCfg = Debug|Any CPU {8AB3FEA8-7075-4BB9-BDCD-430F72B0A096}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8AB3FEA8-7075-4BB9-BDCD-430F72B0A096}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8AB3FEA8-7075-4BB9-BDCD-430F72B0A096}.Debug|arm.ActiveCfg = Debug|Any CPU + {8AB3FEA8-7075-4BB9-BDCD-430F72B0A096}.Debug|arm64.ActiveCfg = Debug|Any CPU + {8AB3FEA8-7075-4BB9-BDCD-430F72B0A096}.Debug|x64.ActiveCfg = Debug|Any CPU + {8AB3FEA8-7075-4BB9-BDCD-430F72B0A096}.Debug|x64.Build.0 = Debug|Any CPU + {8AB3FEA8-7075-4BB9-BDCD-430F72B0A096}.Debug|x86.ActiveCfg = Debug|Any CPU + {8AB3FEA8-7075-4BB9-BDCD-430F72B0A096}.Debug|x86.Build.0 = Debug|Any CPU {8AB3FEA8-7075-4BB9-BDCD-430F72B0A096}.Release|Any CPU.ActiveCfg = Release|Any CPU {8AB3FEA8-7075-4BB9-BDCD-430F72B0A096}.Release|Any CPU.Build.0 = Release|Any CPU + {8AB3FEA8-7075-4BB9-BDCD-430F72B0A096}.Release|arm.ActiveCfg = Release|Any CPU + {8AB3FEA8-7075-4BB9-BDCD-430F72B0A096}.Release|arm64.ActiveCfg = Release|Any CPU + {8AB3FEA8-7075-4BB9-BDCD-430F72B0A096}.Release|x64.ActiveCfg = Release|Any CPU + {8AB3FEA8-7075-4BB9-BDCD-430F72B0A096}.Release|x64.Build.0 = Release|Any CPU + {8AB3FEA8-7075-4BB9-BDCD-430F72B0A096}.Release|x86.ActiveCfg = Release|Any CPU + {8AB3FEA8-7075-4BB9-BDCD-430F72B0A096}.Release|x86.Build.0 = Release|Any CPU + {8AB3FEA8-7075-4BB9-BDCD-430F72B0A096}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {8AB3FEA8-7075-4BB9-BDCD-430F72B0A096}.Checked|arm.ActiveCfg = Debug|Any CPU + {8AB3FEA8-7075-4BB9-BDCD-430F72B0A096}.Checked|arm64.ActiveCfg = Debug|Any CPU + {8AB3FEA8-7075-4BB9-BDCD-430F72B0A096}.Checked|x64.ActiveCfg = Debug|Any CPU + {8AB3FEA8-7075-4BB9-BDCD-430F72B0A096}.Checked|x86.ActiveCfg = Debug|Any CPU {F65F6021-37F2-450B-B8BF-66F04B56DE56}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F65F6021-37F2-450B-B8BF-66F04B56DE56}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F65F6021-37F2-450B-B8BF-66F04B56DE56}.Debug|arm.ActiveCfg = Debug|Any CPU + {F65F6021-37F2-450B-B8BF-66F04B56DE56}.Debug|arm64.ActiveCfg = Debug|Any CPU + {F65F6021-37F2-450B-B8BF-66F04B56DE56}.Debug|x64.ActiveCfg = Debug|Any CPU + {F65F6021-37F2-450B-B8BF-66F04B56DE56}.Debug|x64.Build.0 = Debug|Any CPU + {F65F6021-37F2-450B-B8BF-66F04B56DE56}.Debug|x86.ActiveCfg = Debug|Any CPU + {F65F6021-37F2-450B-B8BF-66F04B56DE56}.Debug|x86.Build.0 = Debug|Any CPU {F65F6021-37F2-450B-B8BF-66F04B56DE56}.Release|Any CPU.ActiveCfg = Release|Any CPU {F65F6021-37F2-450B-B8BF-66F04B56DE56}.Release|Any CPU.Build.0 = Release|Any CPU + {F65F6021-37F2-450B-B8BF-66F04B56DE56}.Release|arm.ActiveCfg = Release|Any CPU + {F65F6021-37F2-450B-B8BF-66F04B56DE56}.Release|arm64.ActiveCfg = Release|Any CPU + {F65F6021-37F2-450B-B8BF-66F04B56DE56}.Release|x64.ActiveCfg = Release|Any CPU + {F65F6021-37F2-450B-B8BF-66F04B56DE56}.Release|x64.Build.0 = Release|Any CPU + {F65F6021-37F2-450B-B8BF-66F04B56DE56}.Release|x86.ActiveCfg = Release|Any CPU + {F65F6021-37F2-450B-B8BF-66F04B56DE56}.Release|x86.Build.0 = Release|Any CPU + {F65F6021-37F2-450B-B8BF-66F04B56DE56}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {F65F6021-37F2-450B-B8BF-66F04B56DE56}.Checked|arm.ActiveCfg = Debug|Any CPU + {F65F6021-37F2-450B-B8BF-66F04B56DE56}.Checked|arm64.ActiveCfg = Debug|Any CPU + {F65F6021-37F2-450B-B8BF-66F04B56DE56}.Checked|x64.ActiveCfg = Debug|Any CPU + {F65F6021-37F2-450B-B8BF-66F04B56DE56}.Checked|x86.ActiveCfg = Debug|Any CPU {D4C21BE3-FAA7-4FB6-A2AF-3F160A9386FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D4C21BE3-FAA7-4FB6-A2AF-3F160A9386FC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D4C21BE3-FAA7-4FB6-A2AF-3F160A9386FC}.Debug|arm.ActiveCfg = Debug|Any CPU + {D4C21BE3-FAA7-4FB6-A2AF-3F160A9386FC}.Debug|arm64.ActiveCfg = Debug|Any CPU + {D4C21BE3-FAA7-4FB6-A2AF-3F160A9386FC}.Debug|x64.ActiveCfg = Debug|Any CPU + {D4C21BE3-FAA7-4FB6-A2AF-3F160A9386FC}.Debug|x64.Build.0 = Debug|Any CPU + {D4C21BE3-FAA7-4FB6-A2AF-3F160A9386FC}.Debug|x86.ActiveCfg = Debug|Any CPU + {D4C21BE3-FAA7-4FB6-A2AF-3F160A9386FC}.Debug|x86.Build.0 = Debug|Any CPU {D4C21BE3-FAA7-4FB6-A2AF-3F160A9386FC}.Release|Any CPU.ActiveCfg = Release|Any CPU {D4C21BE3-FAA7-4FB6-A2AF-3F160A9386FC}.Release|Any CPU.Build.0 = Release|Any CPU + {D4C21BE3-FAA7-4FB6-A2AF-3F160A9386FC}.Release|arm.ActiveCfg = Release|Any CPU + {D4C21BE3-FAA7-4FB6-A2AF-3F160A9386FC}.Release|arm64.ActiveCfg = Release|Any CPU + {D4C21BE3-FAA7-4FB6-A2AF-3F160A9386FC}.Release|x64.ActiveCfg = Release|Any CPU + {D4C21BE3-FAA7-4FB6-A2AF-3F160A9386FC}.Release|x64.Build.0 = Release|Any CPU + {D4C21BE3-FAA7-4FB6-A2AF-3F160A9386FC}.Release|x86.ActiveCfg = Release|Any CPU + {D4C21BE3-FAA7-4FB6-A2AF-3F160A9386FC}.Release|x86.Build.0 = Release|Any CPU + {D4C21BE3-FAA7-4FB6-A2AF-3F160A9386FC}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {D4C21BE3-FAA7-4FB6-A2AF-3F160A9386FC}.Checked|arm.ActiveCfg = Debug|Any CPU + {D4C21BE3-FAA7-4FB6-A2AF-3F160A9386FC}.Checked|arm64.ActiveCfg = Debug|Any CPU + {D4C21BE3-FAA7-4FB6-A2AF-3F160A9386FC}.Checked|x64.ActiveCfg = Debug|Any CPU + {D4C21BE3-FAA7-4FB6-A2AF-3F160A9386FC}.Checked|x86.ActiveCfg = Debug|Any CPU {0AD2A3C7-CA69-4E73-A27E-2F143F7B9830}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0AD2A3C7-CA69-4E73-A27E-2F143F7B9830}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0AD2A3C7-CA69-4E73-A27E-2F143F7B9830}.Debug|arm.ActiveCfg = Debug|Any CPU + {0AD2A3C7-CA69-4E73-A27E-2F143F7B9830}.Debug|arm64.ActiveCfg = Debug|Any CPU + {0AD2A3C7-CA69-4E73-A27E-2F143F7B9830}.Debug|x64.ActiveCfg = Debug|Any CPU + {0AD2A3C7-CA69-4E73-A27E-2F143F7B9830}.Debug|x64.Build.0 = Debug|Any CPU + {0AD2A3C7-CA69-4E73-A27E-2F143F7B9830}.Debug|x86.ActiveCfg = Debug|Any CPU + {0AD2A3C7-CA69-4E73-A27E-2F143F7B9830}.Debug|x86.Build.0 = Debug|Any CPU {0AD2A3C7-CA69-4E73-A27E-2F143F7B9830}.Release|Any CPU.ActiveCfg = Release|Any CPU {0AD2A3C7-CA69-4E73-A27E-2F143F7B9830}.Release|Any CPU.Build.0 = Release|Any CPU + {0AD2A3C7-CA69-4E73-A27E-2F143F7B9830}.Release|arm.ActiveCfg = Release|Any CPU + {0AD2A3C7-CA69-4E73-A27E-2F143F7B9830}.Release|arm64.ActiveCfg = Release|Any CPU + {0AD2A3C7-CA69-4E73-A27E-2F143F7B9830}.Release|x64.ActiveCfg = Release|Any CPU + {0AD2A3C7-CA69-4E73-A27E-2F143F7B9830}.Release|x64.Build.0 = Release|Any CPU + {0AD2A3C7-CA69-4E73-A27E-2F143F7B9830}.Release|x86.ActiveCfg = Release|Any CPU + {0AD2A3C7-CA69-4E73-A27E-2F143F7B9830}.Release|x86.Build.0 = Release|Any CPU + {0AD2A3C7-CA69-4E73-A27E-2F143F7B9830}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {0AD2A3C7-CA69-4E73-A27E-2F143F7B9830}.Checked|arm.ActiveCfg = Debug|Any CPU + {0AD2A3C7-CA69-4E73-A27E-2F143F7B9830}.Checked|arm64.ActiveCfg = Debug|Any CPU + {0AD2A3C7-CA69-4E73-A27E-2F143F7B9830}.Checked|x64.ActiveCfg = Debug|Any CPU + {0AD2A3C7-CA69-4E73-A27E-2F143F7B9830}.Checked|x86.ActiveCfg = Debug|Any CPU {4792FFA1-1AD2-4230-8DE3-D2BCF1CF804F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4792FFA1-1AD2-4230-8DE3-D2BCF1CF804F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4792FFA1-1AD2-4230-8DE3-D2BCF1CF804F}.Debug|arm.ActiveCfg = Debug|Any CPU + {4792FFA1-1AD2-4230-8DE3-D2BCF1CF804F}.Debug|arm64.ActiveCfg = Debug|Any CPU + {4792FFA1-1AD2-4230-8DE3-D2BCF1CF804F}.Debug|x64.ActiveCfg = Debug|Any CPU + {4792FFA1-1AD2-4230-8DE3-D2BCF1CF804F}.Debug|x64.Build.0 = Debug|Any CPU + {4792FFA1-1AD2-4230-8DE3-D2BCF1CF804F}.Debug|x86.ActiveCfg = Debug|Any CPU + {4792FFA1-1AD2-4230-8DE3-D2BCF1CF804F}.Debug|x86.Build.0 = Debug|Any CPU {4792FFA1-1AD2-4230-8DE3-D2BCF1CF804F}.Release|Any CPU.ActiveCfg = Release|Any CPU {4792FFA1-1AD2-4230-8DE3-D2BCF1CF804F}.Release|Any CPU.Build.0 = Release|Any CPU + {4792FFA1-1AD2-4230-8DE3-D2BCF1CF804F}.Release|arm.ActiveCfg = Release|Any CPU + {4792FFA1-1AD2-4230-8DE3-D2BCF1CF804F}.Release|arm64.ActiveCfg = Release|Any CPU + {4792FFA1-1AD2-4230-8DE3-D2BCF1CF804F}.Release|x64.ActiveCfg = Release|Any CPU + {4792FFA1-1AD2-4230-8DE3-D2BCF1CF804F}.Release|x64.Build.0 = Release|Any CPU + {4792FFA1-1AD2-4230-8DE3-D2BCF1CF804F}.Release|x86.ActiveCfg = Release|Any CPU + {4792FFA1-1AD2-4230-8DE3-D2BCF1CF804F}.Release|x86.Build.0 = Release|Any CPU + {4792FFA1-1AD2-4230-8DE3-D2BCF1CF804F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {4792FFA1-1AD2-4230-8DE3-D2BCF1CF804F}.Checked|arm.ActiveCfg = Debug|Any CPU + {4792FFA1-1AD2-4230-8DE3-D2BCF1CF804F}.Checked|arm64.ActiveCfg = Debug|Any CPU + {4792FFA1-1AD2-4230-8DE3-D2BCF1CF804F}.Checked|x64.ActiveCfg = Debug|Any CPU + {4792FFA1-1AD2-4230-8DE3-D2BCF1CF804F}.Checked|x86.ActiveCfg = Debug|Any CPU {314810DF-262E-490E-8F05-F31695C31F0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {314810DF-262E-490E-8F05-F31695C31F0C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {314810DF-262E-490E-8F05-F31695C31F0C}.Debug|arm.ActiveCfg = Debug|Any CPU + {314810DF-262E-490E-8F05-F31695C31F0C}.Debug|arm64.ActiveCfg = Debug|Any CPU + {314810DF-262E-490E-8F05-F31695C31F0C}.Debug|x64.ActiveCfg = Debug|Any CPU + {314810DF-262E-490E-8F05-F31695C31F0C}.Debug|x64.Build.0 = Debug|Any CPU + {314810DF-262E-490E-8F05-F31695C31F0C}.Debug|x86.ActiveCfg = Debug|Any CPU + {314810DF-262E-490E-8F05-F31695C31F0C}.Debug|x86.Build.0 = Debug|Any CPU {314810DF-262E-490E-8F05-F31695C31F0C}.Release|Any CPU.ActiveCfg = Release|Any CPU {314810DF-262E-490E-8F05-F31695C31F0C}.Release|Any CPU.Build.0 = Release|Any CPU + {314810DF-262E-490E-8F05-F31695C31F0C}.Release|arm.ActiveCfg = Release|Any CPU + {314810DF-262E-490E-8F05-F31695C31F0C}.Release|arm64.ActiveCfg = Release|Any CPU + {314810DF-262E-490E-8F05-F31695C31F0C}.Release|x64.ActiveCfg = Release|Any CPU + {314810DF-262E-490E-8F05-F31695C31F0C}.Release|x64.Build.0 = Release|Any CPU + {314810DF-262E-490E-8F05-F31695C31F0C}.Release|x86.ActiveCfg = Release|Any CPU + {314810DF-262E-490E-8F05-F31695C31F0C}.Release|x86.Build.0 = Release|Any CPU + {314810DF-262E-490E-8F05-F31695C31F0C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {314810DF-262E-490E-8F05-F31695C31F0C}.Checked|arm.ActiveCfg = Debug|Any CPU + {314810DF-262E-490E-8F05-F31695C31F0C}.Checked|arm64.ActiveCfg = Debug|Any CPU + {314810DF-262E-490E-8F05-F31695C31F0C}.Checked|x64.ActiveCfg = Debug|Any CPU + {314810DF-262E-490E-8F05-F31695C31F0C}.Checked|x86.ActiveCfg = Debug|Any CPU {C67553AE-F09B-407D-AD3E-D61950E06BE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C67553AE-F09B-407D-AD3E-D61950E06BE8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C67553AE-F09B-407D-AD3E-D61950E06BE8}.Debug|arm.ActiveCfg = Debug|Any CPU + {C67553AE-F09B-407D-AD3E-D61950E06BE8}.Debug|arm64.ActiveCfg = Debug|Any CPU + {C67553AE-F09B-407D-AD3E-D61950E06BE8}.Debug|x64.ActiveCfg = Debug|Any CPU + {C67553AE-F09B-407D-AD3E-D61950E06BE8}.Debug|x64.Build.0 = Debug|Any CPU + {C67553AE-F09B-407D-AD3E-D61950E06BE8}.Debug|x86.ActiveCfg = Debug|Any CPU + {C67553AE-F09B-407D-AD3E-D61950E06BE8}.Debug|x86.Build.0 = Debug|Any CPU {C67553AE-F09B-407D-AD3E-D61950E06BE8}.Release|Any CPU.ActiveCfg = Release|Any CPU {C67553AE-F09B-407D-AD3E-D61950E06BE8}.Release|Any CPU.Build.0 = Release|Any CPU + {C67553AE-F09B-407D-AD3E-D61950E06BE8}.Release|arm.ActiveCfg = Release|Any CPU + {C67553AE-F09B-407D-AD3E-D61950E06BE8}.Release|arm64.ActiveCfg = Release|Any CPU + {C67553AE-F09B-407D-AD3E-D61950E06BE8}.Release|x64.ActiveCfg = Release|Any CPU + {C67553AE-F09B-407D-AD3E-D61950E06BE8}.Release|x64.Build.0 = Release|Any CPU + {C67553AE-F09B-407D-AD3E-D61950E06BE8}.Release|x86.ActiveCfg = Release|Any CPU + {C67553AE-F09B-407D-AD3E-D61950E06BE8}.Release|x86.Build.0 = Release|Any CPU + {C67553AE-F09B-407D-AD3E-D61950E06BE8}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {C67553AE-F09B-407D-AD3E-D61950E06BE8}.Checked|arm.ActiveCfg = Debug|Any CPU + {C67553AE-F09B-407D-AD3E-D61950E06BE8}.Checked|arm64.ActiveCfg = Debug|Any CPU + {C67553AE-F09B-407D-AD3E-D61950E06BE8}.Checked|x64.ActiveCfg = Debug|Any CPU + {C67553AE-F09B-407D-AD3E-D61950E06BE8}.Checked|x86.ActiveCfg = Debug|Any CPU {ABA61FEF-EB06-441D-9D3D-F25FFC7CD83D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABA61FEF-EB06-441D-9D3D-F25FFC7CD83D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ABA61FEF-EB06-441D-9D3D-F25FFC7CD83D}.Debug|arm.ActiveCfg = Debug|Any CPU + {ABA61FEF-EB06-441D-9D3D-F25FFC7CD83D}.Debug|arm64.ActiveCfg = Debug|Any CPU + {ABA61FEF-EB06-441D-9D3D-F25FFC7CD83D}.Debug|x64.ActiveCfg = Debug|Any CPU + {ABA61FEF-EB06-441D-9D3D-F25FFC7CD83D}.Debug|x64.Build.0 = Debug|Any CPU + {ABA61FEF-EB06-441D-9D3D-F25FFC7CD83D}.Debug|x86.ActiveCfg = Debug|Any CPU + {ABA61FEF-EB06-441D-9D3D-F25FFC7CD83D}.Debug|x86.Build.0 = Debug|Any CPU {ABA61FEF-EB06-441D-9D3D-F25FFC7CD83D}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABA61FEF-EB06-441D-9D3D-F25FFC7CD83D}.Release|Any CPU.Build.0 = Release|Any CPU + {ABA61FEF-EB06-441D-9D3D-F25FFC7CD83D}.Release|arm.ActiveCfg = Release|Any CPU + {ABA61FEF-EB06-441D-9D3D-F25FFC7CD83D}.Release|arm64.ActiveCfg = Release|Any CPU + {ABA61FEF-EB06-441D-9D3D-F25FFC7CD83D}.Release|x64.ActiveCfg = Release|Any CPU + {ABA61FEF-EB06-441D-9D3D-F25FFC7CD83D}.Release|x64.Build.0 = Release|Any CPU + {ABA61FEF-EB06-441D-9D3D-F25FFC7CD83D}.Release|x86.ActiveCfg = Release|Any CPU + {ABA61FEF-EB06-441D-9D3D-F25FFC7CD83D}.Release|x86.Build.0 = Release|Any CPU + {ABA61FEF-EB06-441D-9D3D-F25FFC7CD83D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {ABA61FEF-EB06-441D-9D3D-F25FFC7CD83D}.Checked|arm.ActiveCfg = Debug|Any CPU + {ABA61FEF-EB06-441D-9D3D-F25FFC7CD83D}.Checked|arm64.ActiveCfg = Debug|Any CPU + {ABA61FEF-EB06-441D-9D3D-F25FFC7CD83D}.Checked|x64.ActiveCfg = Debug|Any CPU + {ABA61FEF-EB06-441D-9D3D-F25FFC7CD83D}.Checked|x86.ActiveCfg = Debug|Any CPU {F485B36D-8DDB-44EE-A993-2FCAEC81BE3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F485B36D-8DDB-44EE-A993-2FCAEC81BE3E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F485B36D-8DDB-44EE-A993-2FCAEC81BE3E}.Debug|arm.ActiveCfg = Debug|Any CPU + {F485B36D-8DDB-44EE-A993-2FCAEC81BE3E}.Debug|arm64.ActiveCfg = Debug|Any CPU + {F485B36D-8DDB-44EE-A993-2FCAEC81BE3E}.Debug|x64.ActiveCfg = Debug|Any CPU + {F485B36D-8DDB-44EE-A993-2FCAEC81BE3E}.Debug|x64.Build.0 = Debug|Any CPU + {F485B36D-8DDB-44EE-A993-2FCAEC81BE3E}.Debug|x86.ActiveCfg = Debug|Any CPU + {F485B36D-8DDB-44EE-A993-2FCAEC81BE3E}.Debug|x86.Build.0 = Debug|Any CPU {F485B36D-8DDB-44EE-A993-2FCAEC81BE3E}.Release|Any CPU.ActiveCfg = Release|Any CPU {F485B36D-8DDB-44EE-A993-2FCAEC81BE3E}.Release|Any CPU.Build.0 = Release|Any CPU + {F485B36D-8DDB-44EE-A993-2FCAEC81BE3E}.Release|arm.ActiveCfg = Release|Any CPU + {F485B36D-8DDB-44EE-A993-2FCAEC81BE3E}.Release|arm64.ActiveCfg = Release|Any CPU + {F485B36D-8DDB-44EE-A993-2FCAEC81BE3E}.Release|x64.ActiveCfg = Release|Any CPU + {F485B36D-8DDB-44EE-A993-2FCAEC81BE3E}.Release|x64.Build.0 = Release|Any CPU + {F485B36D-8DDB-44EE-A993-2FCAEC81BE3E}.Release|x86.ActiveCfg = Release|Any CPU + {F485B36D-8DDB-44EE-A993-2FCAEC81BE3E}.Release|x86.Build.0 = Release|Any CPU + {F485B36D-8DDB-44EE-A993-2FCAEC81BE3E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {F485B36D-8DDB-44EE-A993-2FCAEC81BE3E}.Checked|arm.ActiveCfg = Debug|Any CPU + {F485B36D-8DDB-44EE-A993-2FCAEC81BE3E}.Checked|arm64.ActiveCfg = Debug|Any CPU + {F485B36D-8DDB-44EE-A993-2FCAEC81BE3E}.Checked|x64.ActiveCfg = Debug|Any CPU + {F485B36D-8DDB-44EE-A993-2FCAEC81BE3E}.Checked|x86.ActiveCfg = Debug|Any CPU {84075D59-9D5E-40F7-A914-911087419FE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {84075D59-9D5E-40F7-A914-911087419FE4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {84075D59-9D5E-40F7-A914-911087419FE4}.Debug|arm.ActiveCfg = Debug|Any CPU + {84075D59-9D5E-40F7-A914-911087419FE4}.Debug|arm64.ActiveCfg = Debug|Any CPU + {84075D59-9D5E-40F7-A914-911087419FE4}.Debug|x64.ActiveCfg = Debug|Any CPU + {84075D59-9D5E-40F7-A914-911087419FE4}.Debug|x64.Build.0 = Debug|Any CPU + {84075D59-9D5E-40F7-A914-911087419FE4}.Debug|x86.ActiveCfg = Debug|Any CPU + {84075D59-9D5E-40F7-A914-911087419FE4}.Debug|x86.Build.0 = Debug|Any CPU {84075D59-9D5E-40F7-A914-911087419FE4}.Release|Any CPU.ActiveCfg = Release|Any CPU {84075D59-9D5E-40F7-A914-911087419FE4}.Release|Any CPU.Build.0 = Release|Any CPU + {84075D59-9D5E-40F7-A914-911087419FE4}.Release|arm.ActiveCfg = Release|Any CPU + {84075D59-9D5E-40F7-A914-911087419FE4}.Release|arm64.ActiveCfg = Release|Any CPU + {84075D59-9D5E-40F7-A914-911087419FE4}.Release|x64.ActiveCfg = Release|Any CPU + {84075D59-9D5E-40F7-A914-911087419FE4}.Release|x64.Build.0 = Release|Any CPU + {84075D59-9D5E-40F7-A914-911087419FE4}.Release|x86.ActiveCfg = Release|Any CPU + {84075D59-9D5E-40F7-A914-911087419FE4}.Release|x86.Build.0 = Release|Any CPU + {84075D59-9D5E-40F7-A914-911087419FE4}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {84075D59-9D5E-40F7-A914-911087419FE4}.Checked|arm.ActiveCfg = Debug|Any CPU + {84075D59-9D5E-40F7-A914-911087419FE4}.Checked|arm64.ActiveCfg = Debug|Any CPU + {84075D59-9D5E-40F7-A914-911087419FE4}.Checked|x64.ActiveCfg = Debug|Any CPU + {84075D59-9D5E-40F7-A914-911087419FE4}.Checked|x86.ActiveCfg = Debug|Any CPU {E4D48405-30B4-4CEC-925B-851133BACC3D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E4D48405-30B4-4CEC-925B-851133BACC3D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E4D48405-30B4-4CEC-925B-851133BACC3D}.Debug|arm.ActiveCfg = Debug|Any CPU + {E4D48405-30B4-4CEC-925B-851133BACC3D}.Debug|arm64.ActiveCfg = Debug|Any CPU + {E4D48405-30B4-4CEC-925B-851133BACC3D}.Debug|x64.ActiveCfg = Debug|Any CPU + {E4D48405-30B4-4CEC-925B-851133BACC3D}.Debug|x64.Build.0 = Debug|Any CPU + {E4D48405-30B4-4CEC-925B-851133BACC3D}.Debug|x86.ActiveCfg = Debug|Any CPU + {E4D48405-30B4-4CEC-925B-851133BACC3D}.Debug|x86.Build.0 = Debug|Any CPU {E4D48405-30B4-4CEC-925B-851133BACC3D}.Release|Any CPU.ActiveCfg = Release|Any CPU {E4D48405-30B4-4CEC-925B-851133BACC3D}.Release|Any CPU.Build.0 = Release|Any CPU + {E4D48405-30B4-4CEC-925B-851133BACC3D}.Release|arm.ActiveCfg = Release|Any CPU + {E4D48405-30B4-4CEC-925B-851133BACC3D}.Release|arm64.ActiveCfg = Release|Any CPU + {E4D48405-30B4-4CEC-925B-851133BACC3D}.Release|x64.ActiveCfg = Release|Any CPU + {E4D48405-30B4-4CEC-925B-851133BACC3D}.Release|x64.Build.0 = Release|Any CPU + {E4D48405-30B4-4CEC-925B-851133BACC3D}.Release|x86.ActiveCfg = Release|Any CPU + {E4D48405-30B4-4CEC-925B-851133BACC3D}.Release|x86.Build.0 = Release|Any CPU + {E4D48405-30B4-4CEC-925B-851133BACC3D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {E4D48405-30B4-4CEC-925B-851133BACC3D}.Checked|arm.ActiveCfg = Debug|Any CPU + {E4D48405-30B4-4CEC-925B-851133BACC3D}.Checked|arm64.ActiveCfg = Debug|Any CPU + {E4D48405-30B4-4CEC-925B-851133BACC3D}.Checked|x64.ActiveCfg = Debug|Any CPU + {E4D48405-30B4-4CEC-925B-851133BACC3D}.Checked|x86.ActiveCfg = Debug|Any CPU + {4165769D-C4EE-46C4-9FA2-068DBF1BDB0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4165769D-C4EE-46C4-9FA2-068DBF1BDB0A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4165769D-C4EE-46C4-9FA2-068DBF1BDB0A}.Debug|arm.ActiveCfg = Debug|Any CPU + {4165769D-C4EE-46C4-9FA2-068DBF1BDB0A}.Debug|arm64.ActiveCfg = Debug|Any CPU + {4165769D-C4EE-46C4-9FA2-068DBF1BDB0A}.Debug|x64.ActiveCfg = Debug|Any CPU + {4165769D-C4EE-46C4-9FA2-068DBF1BDB0A}.Debug|x64.Build.0 = Debug|Any CPU + {4165769D-C4EE-46C4-9FA2-068DBF1BDB0A}.Debug|x86.ActiveCfg = Debug|Any CPU + {4165769D-C4EE-46C4-9FA2-068DBF1BDB0A}.Debug|x86.Build.0 = Debug|Any CPU + {4165769D-C4EE-46C4-9FA2-068DBF1BDB0A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4165769D-C4EE-46C4-9FA2-068DBF1BDB0A}.Release|Any CPU.Build.0 = Release|Any CPU + {4165769D-C4EE-46C4-9FA2-068DBF1BDB0A}.Release|arm.ActiveCfg = Release|Any CPU + {4165769D-C4EE-46C4-9FA2-068DBF1BDB0A}.Release|arm64.ActiveCfg = Release|Any CPU + {4165769D-C4EE-46C4-9FA2-068DBF1BDB0A}.Release|x64.ActiveCfg = Release|Any CPU + {4165769D-C4EE-46C4-9FA2-068DBF1BDB0A}.Release|x64.Build.0 = Release|Any CPU + {4165769D-C4EE-46C4-9FA2-068DBF1BDB0A}.Release|x86.ActiveCfg = Release|Any CPU + {4165769D-C4EE-46C4-9FA2-068DBF1BDB0A}.Release|x86.Build.0 = Release|Any CPU + {4165769D-C4EE-46C4-9FA2-068DBF1BDB0A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {4165769D-C4EE-46C4-9FA2-068DBF1BDB0A}.Checked|arm.ActiveCfg = Debug|Any CPU + {4165769D-C4EE-46C4-9FA2-068DBF1BDB0A}.Checked|arm64.ActiveCfg = Debug|Any CPU + {4165769D-C4EE-46C4-9FA2-068DBF1BDB0A}.Checked|x64.ActiveCfg = Debug|Any CPU + {4165769D-C4EE-46C4-9FA2-068DBF1BDB0A}.Checked|x86.ActiveCfg = Debug|Any CPU + {1B7EED4E-D261-4795-84FA-1B948B6E9E53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1B7EED4E-D261-4795-84FA-1B948B6E9E53}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1B7EED4E-D261-4795-84FA-1B948B6E9E53}.Debug|arm.ActiveCfg = Debug|Any CPU + {1B7EED4E-D261-4795-84FA-1B948B6E9E53}.Debug|arm64.ActiveCfg = Debug|Any CPU + {1B7EED4E-D261-4795-84FA-1B948B6E9E53}.Debug|x64.ActiveCfg = Debug|Any CPU + {1B7EED4E-D261-4795-84FA-1B948B6E9E53}.Debug|x64.Build.0 = Debug|Any CPU + {1B7EED4E-D261-4795-84FA-1B948B6E9E53}.Debug|x86.ActiveCfg = Debug|Any CPU + {1B7EED4E-D261-4795-84FA-1B948B6E9E53}.Debug|x86.Build.0 = Debug|Any CPU + {1B7EED4E-D261-4795-84FA-1B948B6E9E53}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1B7EED4E-D261-4795-84FA-1B948B6E9E53}.Release|Any CPU.Build.0 = Release|Any CPU + {1B7EED4E-D261-4795-84FA-1B948B6E9E53}.Release|arm.ActiveCfg = Release|Any CPU + {1B7EED4E-D261-4795-84FA-1B948B6E9E53}.Release|arm64.ActiveCfg = Release|Any CPU + {1B7EED4E-D261-4795-84FA-1B948B6E9E53}.Release|x64.ActiveCfg = Release|Any CPU + {1B7EED4E-D261-4795-84FA-1B948B6E9E53}.Release|x64.Build.0 = Release|Any CPU + {1B7EED4E-D261-4795-84FA-1B948B6E9E53}.Release|x86.ActiveCfg = Release|Any CPU + {1B7EED4E-D261-4795-84FA-1B948B6E9E53}.Release|x86.Build.0 = Release|Any CPU + {1B7EED4E-D261-4795-84FA-1B948B6E9E53}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {1B7EED4E-D261-4795-84FA-1B948B6E9E53}.Checked|arm.ActiveCfg = Debug|Any CPU + {1B7EED4E-D261-4795-84FA-1B948B6E9E53}.Checked|arm64.ActiveCfg = Debug|Any CPU + {1B7EED4E-D261-4795-84FA-1B948B6E9E53}.Checked|x64.ActiveCfg = Debug|Any CPU + {1B7EED4E-D261-4795-84FA-1B948B6E9E53}.Checked|x86.ActiveCfg = Debug|Any CPU + {FD0788DC-C765-41A8-9EBF-93DAAA92F9AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FD0788DC-C765-41A8-9EBF-93DAAA92F9AD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FD0788DC-C765-41A8-9EBF-93DAAA92F9AD}.Debug|arm.ActiveCfg = Debug|Any CPU + {FD0788DC-C765-41A8-9EBF-93DAAA92F9AD}.Debug|arm64.ActiveCfg = Debug|Any CPU + {FD0788DC-C765-41A8-9EBF-93DAAA92F9AD}.Debug|x64.ActiveCfg = Debug|Any CPU + {FD0788DC-C765-41A8-9EBF-93DAAA92F9AD}.Debug|x64.Build.0 = Debug|Any CPU + {FD0788DC-C765-41A8-9EBF-93DAAA92F9AD}.Debug|x86.ActiveCfg = Debug|Any CPU + {FD0788DC-C765-41A8-9EBF-93DAAA92F9AD}.Debug|x86.Build.0 = Debug|Any CPU + {FD0788DC-C765-41A8-9EBF-93DAAA92F9AD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FD0788DC-C765-41A8-9EBF-93DAAA92F9AD}.Release|Any CPU.Build.0 = Release|Any CPU + {FD0788DC-C765-41A8-9EBF-93DAAA92F9AD}.Release|arm.ActiveCfg = Release|Any CPU + {FD0788DC-C765-41A8-9EBF-93DAAA92F9AD}.Release|arm64.ActiveCfg = Release|Any CPU + {FD0788DC-C765-41A8-9EBF-93DAAA92F9AD}.Release|x64.ActiveCfg = Release|Any CPU + {FD0788DC-C765-41A8-9EBF-93DAAA92F9AD}.Release|x64.Build.0 = Release|Any CPU + {FD0788DC-C765-41A8-9EBF-93DAAA92F9AD}.Release|x86.ActiveCfg = Release|Any CPU + {FD0788DC-C765-41A8-9EBF-93DAAA92F9AD}.Release|x86.Build.0 = Release|Any CPU + {FD0788DC-C765-41A8-9EBF-93DAAA92F9AD}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {FD0788DC-C765-41A8-9EBF-93DAAA92F9AD}.Checked|arm.ActiveCfg = Debug|Any CPU + {FD0788DC-C765-41A8-9EBF-93DAAA92F9AD}.Checked|arm64.ActiveCfg = Debug|Any CPU + {FD0788DC-C765-41A8-9EBF-93DAAA92F9AD}.Checked|x64.ActiveCfg = Debug|Any CPU + {FD0788DC-C765-41A8-9EBF-93DAAA92F9AD}.Checked|x86.ActiveCfg = Debug|Any CPU {ABF31AAD-012E-4DD3-9B10-2F4590333A22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABF31AAD-012E-4DD3-9B10-2F4590333A22}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ABF31AAD-012E-4DD3-9B10-2F4590333A22}.Debug|arm.ActiveCfg = Debug|Any CPU + {ABF31AAD-012E-4DD3-9B10-2F4590333A22}.Debug|arm64.ActiveCfg = Debug|Any CPU + {ABF31AAD-012E-4DD3-9B10-2F4590333A22}.Debug|x64.ActiveCfg = Debug|Any CPU + {ABF31AAD-012E-4DD3-9B10-2F4590333A22}.Debug|x64.Build.0 = Debug|Any CPU + {ABF31AAD-012E-4DD3-9B10-2F4590333A22}.Debug|x86.ActiveCfg = Debug|Any CPU + {ABF31AAD-012E-4DD3-9B10-2F4590333A22}.Debug|x86.Build.0 = Debug|Any CPU {ABF31AAD-012E-4DD3-9B10-2F4590333A22}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABF31AAD-012E-4DD3-9B10-2F4590333A22}.Release|Any CPU.Build.0 = Release|Any CPU + {ABF31AAD-012E-4DD3-9B10-2F4590333A22}.Release|arm.ActiveCfg = Release|Any CPU + {ABF31AAD-012E-4DD3-9B10-2F4590333A22}.Release|arm64.ActiveCfg = Release|Any CPU + {ABF31AAD-012E-4DD3-9B10-2F4590333A22}.Release|x64.ActiveCfg = Release|Any CPU + {ABF31AAD-012E-4DD3-9B10-2F4590333A22}.Release|x64.Build.0 = Release|Any CPU + {ABF31AAD-012E-4DD3-9B10-2F4590333A22}.Release|x86.ActiveCfg = Release|Any CPU + {ABF31AAD-012E-4DD3-9B10-2F4590333A22}.Release|x86.Build.0 = Release|Any CPU + {ABF31AAD-012E-4DD3-9B10-2F4590333A22}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {ABF31AAD-012E-4DD3-9B10-2F4590333A22}.Checked|arm.ActiveCfg = Debug|Any CPU + {ABF31AAD-012E-4DD3-9B10-2F4590333A22}.Checked|arm64.ActiveCfg = Debug|Any CPU + {ABF31AAD-012E-4DD3-9B10-2F4590333A22}.Checked|x64.ActiveCfg = Debug|Any CPU + {ABF31AAD-012E-4DD3-9B10-2F4590333A22}.Checked|x86.ActiveCfg = Debug|Any CPU {C8F1CF01-F4E9-4459-9FBB-34363A0C377E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C8F1CF01-F4E9-4459-9FBB-34363A0C377E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C8F1CF01-F4E9-4459-9FBB-34363A0C377E}.Debug|arm.ActiveCfg = Debug|Any CPU + {C8F1CF01-F4E9-4459-9FBB-34363A0C377E}.Debug|arm64.ActiveCfg = Debug|Any CPU + {C8F1CF01-F4E9-4459-9FBB-34363A0C377E}.Debug|x64.ActiveCfg = Debug|Any CPU + {C8F1CF01-F4E9-4459-9FBB-34363A0C377E}.Debug|x64.Build.0 = Debug|Any CPU + {C8F1CF01-F4E9-4459-9FBB-34363A0C377E}.Debug|x86.ActiveCfg = Debug|Any CPU + {C8F1CF01-F4E9-4459-9FBB-34363A0C377E}.Debug|x86.Build.0 = Debug|Any CPU {C8F1CF01-F4E9-4459-9FBB-34363A0C377E}.Release|Any CPU.ActiveCfg = Release|Any CPU {C8F1CF01-F4E9-4459-9FBB-34363A0C377E}.Release|Any CPU.Build.0 = Release|Any CPU + {C8F1CF01-F4E9-4459-9FBB-34363A0C377E}.Release|arm.ActiveCfg = Release|Any CPU + {C8F1CF01-F4E9-4459-9FBB-34363A0C377E}.Release|arm64.ActiveCfg = Release|Any CPU + {C8F1CF01-F4E9-4459-9FBB-34363A0C377E}.Release|x64.ActiveCfg = Release|Any CPU + {C8F1CF01-F4E9-4459-9FBB-34363A0C377E}.Release|x64.Build.0 = Release|Any CPU + {C8F1CF01-F4E9-4459-9FBB-34363A0C377E}.Release|x86.ActiveCfg = Release|Any CPU + {C8F1CF01-F4E9-4459-9FBB-34363A0C377E}.Release|x86.Build.0 = Release|Any CPU + {C8F1CF01-F4E9-4459-9FBB-34363A0C377E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {C8F1CF01-F4E9-4459-9FBB-34363A0C377E}.Checked|arm.ActiveCfg = Debug|Any CPU + {C8F1CF01-F4E9-4459-9FBB-34363A0C377E}.Checked|arm64.ActiveCfg = Debug|Any CPU + {C8F1CF01-F4E9-4459-9FBB-34363A0C377E}.Checked|x64.ActiveCfg = Debug|Any CPU + {C8F1CF01-F4E9-4459-9FBB-34363A0C377E}.Checked|x86.ActiveCfg = Debug|Any CPU {FD985738-3603-4C41-9FDE-1C96F7922725}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FD985738-3603-4C41-9FDE-1C96F7922725}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FD985738-3603-4C41-9FDE-1C96F7922725}.Debug|arm.ActiveCfg = Debug|Any CPU + {FD985738-3603-4C41-9FDE-1C96F7922725}.Debug|arm64.ActiveCfg = Debug|Any CPU + {FD985738-3603-4C41-9FDE-1C96F7922725}.Debug|x64.ActiveCfg = Debug|Any CPU + {FD985738-3603-4C41-9FDE-1C96F7922725}.Debug|x64.Build.0 = Debug|Any CPU + {FD985738-3603-4C41-9FDE-1C96F7922725}.Debug|x86.ActiveCfg = Debug|Any CPU + {FD985738-3603-4C41-9FDE-1C96F7922725}.Debug|x86.Build.0 = Debug|Any CPU {FD985738-3603-4C41-9FDE-1C96F7922725}.Release|Any CPU.ActiveCfg = Release|Any CPU {FD985738-3603-4C41-9FDE-1C96F7922725}.Release|Any CPU.Build.0 = Release|Any CPU + {FD985738-3603-4C41-9FDE-1C96F7922725}.Release|arm.ActiveCfg = Release|Any CPU + {FD985738-3603-4C41-9FDE-1C96F7922725}.Release|arm64.ActiveCfg = Release|Any CPU + {FD985738-3603-4C41-9FDE-1C96F7922725}.Release|x64.ActiveCfg = Release|Any CPU + {FD985738-3603-4C41-9FDE-1C96F7922725}.Release|x64.Build.0 = Release|Any CPU + {FD985738-3603-4C41-9FDE-1C96F7922725}.Release|x86.ActiveCfg = Release|Any CPU + {FD985738-3603-4C41-9FDE-1C96F7922725}.Release|x86.Build.0 = Release|Any CPU + {FD985738-3603-4C41-9FDE-1C96F7922725}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {FD985738-3603-4C41-9FDE-1C96F7922725}.Checked|arm.ActiveCfg = Debug|Any CPU + {FD985738-3603-4C41-9FDE-1C96F7922725}.Checked|arm64.ActiveCfg = Debug|Any CPU + {FD985738-3603-4C41-9FDE-1C96F7922725}.Checked|x64.ActiveCfg = Debug|Any CPU + {FD985738-3603-4C41-9FDE-1C96F7922725}.Checked|x86.ActiveCfg = Debug|Any CPU {6C9EC55A-BE5D-40FD-A161-ABB87CE20E89}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6C9EC55A-BE5D-40FD-A161-ABB87CE20E89}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6C9EC55A-BE5D-40FD-A161-ABB87CE20E89}.Debug|arm.ActiveCfg = Debug|Any CPU + {6C9EC55A-BE5D-40FD-A161-ABB87CE20E89}.Debug|arm64.ActiveCfg = Debug|Any CPU + {6C9EC55A-BE5D-40FD-A161-ABB87CE20E89}.Debug|x64.ActiveCfg = Debug|Any CPU + {6C9EC55A-BE5D-40FD-A161-ABB87CE20E89}.Debug|x64.Build.0 = Debug|Any CPU + {6C9EC55A-BE5D-40FD-A161-ABB87CE20E89}.Debug|x86.ActiveCfg = Debug|Any CPU + {6C9EC55A-BE5D-40FD-A161-ABB87CE20E89}.Debug|x86.Build.0 = Debug|Any CPU {6C9EC55A-BE5D-40FD-A161-ABB87CE20E89}.Release|Any CPU.ActiveCfg = Release|Any CPU {6C9EC55A-BE5D-40FD-A161-ABB87CE20E89}.Release|Any CPU.Build.0 = Release|Any CPU + {6C9EC55A-BE5D-40FD-A161-ABB87CE20E89}.Release|arm.ActiveCfg = Release|Any CPU + {6C9EC55A-BE5D-40FD-A161-ABB87CE20E89}.Release|arm64.ActiveCfg = Release|Any CPU + {6C9EC55A-BE5D-40FD-A161-ABB87CE20E89}.Release|x64.ActiveCfg = Release|Any CPU + {6C9EC55A-BE5D-40FD-A161-ABB87CE20E89}.Release|x64.Build.0 = Release|Any CPU + {6C9EC55A-BE5D-40FD-A161-ABB87CE20E89}.Release|x86.ActiveCfg = Release|Any CPU + {6C9EC55A-BE5D-40FD-A161-ABB87CE20E89}.Release|x86.Build.0 = Release|Any CPU + {6C9EC55A-BE5D-40FD-A161-ABB87CE20E89}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {6C9EC55A-BE5D-40FD-A161-ABB87CE20E89}.Checked|arm.ActiveCfg = Debug|Any CPU + {6C9EC55A-BE5D-40FD-A161-ABB87CE20E89}.Checked|arm64.ActiveCfg = Debug|Any CPU + {6C9EC55A-BE5D-40FD-A161-ABB87CE20E89}.Checked|x64.ActiveCfg = Debug|Any CPU + {6C9EC55A-BE5D-40FD-A161-ABB87CE20E89}.Checked|x86.ActiveCfg = Debug|Any CPU {5823DDA1-6CCB-4EBC-89DF-6AC430C64204}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5823DDA1-6CCB-4EBC-89DF-6AC430C64204}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5823DDA1-6CCB-4EBC-89DF-6AC430C64204}.Debug|arm.ActiveCfg = Debug|Any CPU + {5823DDA1-6CCB-4EBC-89DF-6AC430C64204}.Debug|arm64.ActiveCfg = Debug|Any CPU + {5823DDA1-6CCB-4EBC-89DF-6AC430C64204}.Debug|x64.ActiveCfg = Debug|Any CPU + {5823DDA1-6CCB-4EBC-89DF-6AC430C64204}.Debug|x64.Build.0 = Debug|Any CPU + {5823DDA1-6CCB-4EBC-89DF-6AC430C64204}.Debug|x86.ActiveCfg = Debug|Any CPU + {5823DDA1-6CCB-4EBC-89DF-6AC430C64204}.Debug|x86.Build.0 = Debug|Any CPU {5823DDA1-6CCB-4EBC-89DF-6AC430C64204}.Release|Any CPU.ActiveCfg = Release|Any CPU {5823DDA1-6CCB-4EBC-89DF-6AC430C64204}.Release|Any CPU.Build.0 = Release|Any CPU + {5823DDA1-6CCB-4EBC-89DF-6AC430C64204}.Release|arm.ActiveCfg = Release|Any CPU + {5823DDA1-6CCB-4EBC-89DF-6AC430C64204}.Release|arm64.ActiveCfg = Release|Any CPU + {5823DDA1-6CCB-4EBC-89DF-6AC430C64204}.Release|x64.ActiveCfg = Release|Any CPU + {5823DDA1-6CCB-4EBC-89DF-6AC430C64204}.Release|x64.Build.0 = Release|Any CPU + {5823DDA1-6CCB-4EBC-89DF-6AC430C64204}.Release|x86.ActiveCfg = Release|Any CPU + {5823DDA1-6CCB-4EBC-89DF-6AC430C64204}.Release|x86.Build.0 = Release|Any CPU + {5823DDA1-6CCB-4EBC-89DF-6AC430C64204}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {5823DDA1-6CCB-4EBC-89DF-6AC430C64204}.Checked|arm.ActiveCfg = Debug|Any CPU + {5823DDA1-6CCB-4EBC-89DF-6AC430C64204}.Checked|arm64.ActiveCfg = Debug|Any CPU + {5823DDA1-6CCB-4EBC-89DF-6AC430C64204}.Checked|x64.ActiveCfg = Debug|Any CPU + {5823DDA1-6CCB-4EBC-89DF-6AC430C64204}.Checked|x86.ActiveCfg = Debug|Any CPU + {CEAF6846-A3EB-4DBF-897A-BD6A95BFB384}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CEAF6846-A3EB-4DBF-897A-BD6A95BFB384}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CEAF6846-A3EB-4DBF-897A-BD6A95BFB384}.Debug|arm.ActiveCfg = Debug|Any CPU + {CEAF6846-A3EB-4DBF-897A-BD6A95BFB384}.Debug|arm64.ActiveCfg = Debug|Any CPU + {CEAF6846-A3EB-4DBF-897A-BD6A95BFB384}.Debug|x64.ActiveCfg = Debug|Any CPU + {CEAF6846-A3EB-4DBF-897A-BD6A95BFB384}.Debug|x64.Build.0 = Debug|Any CPU + {CEAF6846-A3EB-4DBF-897A-BD6A95BFB384}.Debug|x86.ActiveCfg = Debug|Any CPU + {CEAF6846-A3EB-4DBF-897A-BD6A95BFB384}.Debug|x86.Build.0 = Debug|Any CPU + {CEAF6846-A3EB-4DBF-897A-BD6A95BFB384}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CEAF6846-A3EB-4DBF-897A-BD6A95BFB384}.Release|Any CPU.Build.0 = Release|Any CPU + {CEAF6846-A3EB-4DBF-897A-BD6A95BFB384}.Release|arm.ActiveCfg = Release|Any CPU + {CEAF6846-A3EB-4DBF-897A-BD6A95BFB384}.Release|arm64.ActiveCfg = Release|Any CPU + {CEAF6846-A3EB-4DBF-897A-BD6A95BFB384}.Release|x64.ActiveCfg = Release|Any CPU + {CEAF6846-A3EB-4DBF-897A-BD6A95BFB384}.Release|x64.Build.0 = Release|Any CPU + {CEAF6846-A3EB-4DBF-897A-BD6A95BFB384}.Release|x86.ActiveCfg = Release|Any CPU + {CEAF6846-A3EB-4DBF-897A-BD6A95BFB384}.Release|x86.Build.0 = Release|Any CPU + {CEAF6846-A3EB-4DBF-897A-BD6A95BFB384}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {CEAF6846-A3EB-4DBF-897A-BD6A95BFB384}.Checked|arm.ActiveCfg = Debug|Any CPU + {CEAF6846-A3EB-4DBF-897A-BD6A95BFB384}.Checked|arm64.ActiveCfg = Debug|Any CPU + {CEAF6846-A3EB-4DBF-897A-BD6A95BFB384}.Checked|x64.ActiveCfg = Debug|Any CPU + {CEAF6846-A3EB-4DBF-897A-BD6A95BFB384}.Checked|x86.ActiveCfg = Debug|Any CPU {31A2D9B9-434C-4859-A78E-90E912FB86C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {31A2D9B9-434C-4859-A78E-90E912FB86C1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {31A2D9B9-434C-4859-A78E-90E912FB86C1}.Debug|arm.ActiveCfg = Debug|Any CPU + {31A2D9B9-434C-4859-A78E-90E912FB86C1}.Debug|arm64.ActiveCfg = Debug|Any CPU + {31A2D9B9-434C-4859-A78E-90E912FB86C1}.Debug|x64.ActiveCfg = Debug|Any CPU + {31A2D9B9-434C-4859-A78E-90E912FB86C1}.Debug|x64.Build.0 = Debug|Any CPU + {31A2D9B9-434C-4859-A78E-90E912FB86C1}.Debug|x86.ActiveCfg = Debug|Any CPU + {31A2D9B9-434C-4859-A78E-90E912FB86C1}.Debug|x86.Build.0 = Debug|Any CPU {31A2D9B9-434C-4859-A78E-90E912FB86C1}.Release|Any CPU.ActiveCfg = Release|Any CPU {31A2D9B9-434C-4859-A78E-90E912FB86C1}.Release|Any CPU.Build.0 = Release|Any CPU + {31A2D9B9-434C-4859-A78E-90E912FB86C1}.Release|arm.ActiveCfg = Release|Any CPU + {31A2D9B9-434C-4859-A78E-90E912FB86C1}.Release|arm64.ActiveCfg = Release|Any CPU + {31A2D9B9-434C-4859-A78E-90E912FB86C1}.Release|x64.ActiveCfg = Release|Any CPU + {31A2D9B9-434C-4859-A78E-90E912FB86C1}.Release|x64.Build.0 = Release|Any CPU + {31A2D9B9-434C-4859-A78E-90E912FB86C1}.Release|x86.ActiveCfg = Release|Any CPU + {31A2D9B9-434C-4859-A78E-90E912FB86C1}.Release|x86.Build.0 = Release|Any CPU + {31A2D9B9-434C-4859-A78E-90E912FB86C1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {31A2D9B9-434C-4859-A78E-90E912FB86C1}.Checked|arm.ActiveCfg = Debug|Any CPU + {31A2D9B9-434C-4859-A78E-90E912FB86C1}.Checked|arm64.ActiveCfg = Debug|Any CPU + {31A2D9B9-434C-4859-A78E-90E912FB86C1}.Checked|x64.ActiveCfg = Debug|Any CPU + {31A2D9B9-434C-4859-A78E-90E912FB86C1}.Checked|x86.ActiveCfg = Debug|Any CPU {07A70B08-8CD2-4441-B619-2674A8384077}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {07A70B08-8CD2-4441-B619-2674A8384077}.Debug|Any CPU.Build.0 = Debug|Any CPU + {07A70B08-8CD2-4441-B619-2674A8384077}.Debug|arm.ActiveCfg = Debug|Any CPU + {07A70B08-8CD2-4441-B619-2674A8384077}.Debug|arm64.ActiveCfg = Debug|Any CPU + {07A70B08-8CD2-4441-B619-2674A8384077}.Debug|x64.ActiveCfg = Debug|Any CPU + {07A70B08-8CD2-4441-B619-2674A8384077}.Debug|x64.Build.0 = Debug|Any CPU + {07A70B08-8CD2-4441-B619-2674A8384077}.Debug|x86.ActiveCfg = Debug|Any CPU + {07A70B08-8CD2-4441-B619-2674A8384077}.Debug|x86.Build.0 = Debug|Any CPU {07A70B08-8CD2-4441-B619-2674A8384077}.Release|Any CPU.ActiveCfg = Release|Any CPU {07A70B08-8CD2-4441-B619-2674A8384077}.Release|Any CPU.Build.0 = Release|Any CPU + {07A70B08-8CD2-4441-B619-2674A8384077}.Release|arm.ActiveCfg = Release|Any CPU + {07A70B08-8CD2-4441-B619-2674A8384077}.Release|arm64.ActiveCfg = Release|Any CPU + {07A70B08-8CD2-4441-B619-2674A8384077}.Release|x64.ActiveCfg = Release|Any CPU + {07A70B08-8CD2-4441-B619-2674A8384077}.Release|x64.Build.0 = Release|Any CPU + {07A70B08-8CD2-4441-B619-2674A8384077}.Release|x86.ActiveCfg = Release|Any CPU + {07A70B08-8CD2-4441-B619-2674A8384077}.Release|x86.Build.0 = Release|Any CPU + {07A70B08-8CD2-4441-B619-2674A8384077}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {07A70B08-8CD2-4441-B619-2674A8384077}.Checked|arm.ActiveCfg = Debug|Any CPU + {07A70B08-8CD2-4441-B619-2674A8384077}.Checked|arm64.ActiveCfg = Debug|Any CPU + {07A70B08-8CD2-4441-B619-2674A8384077}.Checked|x64.ActiveCfg = Debug|Any CPU + {07A70B08-8CD2-4441-B619-2674A8384077}.Checked|x86.ActiveCfg = Debug|Any CPU {97763BA2-BD91-480C-8173-65EA2A72EAA8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {97763BA2-BD91-480C-8173-65EA2A72EAA8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {97763BA2-BD91-480C-8173-65EA2A72EAA8}.Debug|arm.ActiveCfg = Debug|Any CPU + {97763BA2-BD91-480C-8173-65EA2A72EAA8}.Debug|arm64.ActiveCfg = Debug|Any CPU + {97763BA2-BD91-480C-8173-65EA2A72EAA8}.Debug|x64.ActiveCfg = Debug|Any CPU + {97763BA2-BD91-480C-8173-65EA2A72EAA8}.Debug|x64.Build.0 = Debug|Any CPU + {97763BA2-BD91-480C-8173-65EA2A72EAA8}.Debug|x86.ActiveCfg = Debug|Any CPU + {97763BA2-BD91-480C-8173-65EA2A72EAA8}.Debug|x86.Build.0 = Debug|Any CPU {97763BA2-BD91-480C-8173-65EA2A72EAA8}.Release|Any CPU.ActiveCfg = Release|Any CPU {97763BA2-BD91-480C-8173-65EA2A72EAA8}.Release|Any CPU.Build.0 = Release|Any CPU + {97763BA2-BD91-480C-8173-65EA2A72EAA8}.Release|arm.ActiveCfg = Release|Any CPU + {97763BA2-BD91-480C-8173-65EA2A72EAA8}.Release|arm64.ActiveCfg = Release|Any CPU + {97763BA2-BD91-480C-8173-65EA2A72EAA8}.Release|x64.ActiveCfg = Release|Any CPU + {97763BA2-BD91-480C-8173-65EA2A72EAA8}.Release|x64.Build.0 = Release|Any CPU + {97763BA2-BD91-480C-8173-65EA2A72EAA8}.Release|x86.ActiveCfg = Release|Any CPU + {97763BA2-BD91-480C-8173-65EA2A72EAA8}.Release|x86.Build.0 = Release|Any CPU + {97763BA2-BD91-480C-8173-65EA2A72EAA8}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {97763BA2-BD91-480C-8173-65EA2A72EAA8}.Checked|arm.ActiveCfg = Debug|Any CPU + {97763BA2-BD91-480C-8173-65EA2A72EAA8}.Checked|arm64.ActiveCfg = Debug|Any CPU + {97763BA2-BD91-480C-8173-65EA2A72EAA8}.Checked|x64.ActiveCfg = Debug|Any CPU + {97763BA2-BD91-480C-8173-65EA2A72EAA8}.Checked|x86.ActiveCfg = Debug|Any CPU {B8F3933C-7C0D-41B3-8B1F-D507EF92156B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B8F3933C-7C0D-41B3-8B1F-D507EF92156B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B8F3933C-7C0D-41B3-8B1F-D507EF92156B}.Debug|arm.ActiveCfg = Debug|Any CPU + {B8F3933C-7C0D-41B3-8B1F-D507EF92156B}.Debug|arm64.ActiveCfg = Debug|Any CPU + {B8F3933C-7C0D-41B3-8B1F-D507EF92156B}.Debug|x64.ActiveCfg = Debug|Any CPU + {B8F3933C-7C0D-41B3-8B1F-D507EF92156B}.Debug|x64.Build.0 = Debug|Any CPU + {B8F3933C-7C0D-41B3-8B1F-D507EF92156B}.Debug|x86.ActiveCfg = Debug|Any CPU + {B8F3933C-7C0D-41B3-8B1F-D507EF92156B}.Debug|x86.Build.0 = Debug|Any CPU {B8F3933C-7C0D-41B3-8B1F-D507EF92156B}.Release|Any CPU.ActiveCfg = Release|Any CPU {B8F3933C-7C0D-41B3-8B1F-D507EF92156B}.Release|Any CPU.Build.0 = Release|Any CPU + {B8F3933C-7C0D-41B3-8B1F-D507EF92156B}.Release|arm.ActiveCfg = Release|Any CPU + {B8F3933C-7C0D-41B3-8B1F-D507EF92156B}.Release|arm64.ActiveCfg = Release|Any CPU + {B8F3933C-7C0D-41B3-8B1F-D507EF92156B}.Release|x64.ActiveCfg = Release|Any CPU + {B8F3933C-7C0D-41B3-8B1F-D507EF92156B}.Release|x64.Build.0 = Release|Any CPU + {B8F3933C-7C0D-41B3-8B1F-D507EF92156B}.Release|x86.ActiveCfg = Release|Any CPU + {B8F3933C-7C0D-41B3-8B1F-D507EF92156B}.Release|x86.Build.0 = Release|Any CPU + {B8F3933C-7C0D-41B3-8B1F-D507EF92156B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {B8F3933C-7C0D-41B3-8B1F-D507EF92156B}.Checked|arm.ActiveCfg = Debug|Any CPU + {B8F3933C-7C0D-41B3-8B1F-D507EF92156B}.Checked|arm64.ActiveCfg = Debug|Any CPU + {B8F3933C-7C0D-41B3-8B1F-D507EF92156B}.Checked|x64.ActiveCfg = Debug|Any CPU + {B8F3933C-7C0D-41B3-8B1F-D507EF92156B}.Checked|x86.ActiveCfg = Debug|Any CPU {DB8A84A1-64F7-46E4-8DDC-20491E3D4AF9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DB8A84A1-64F7-46E4-8DDC-20491E3D4AF9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DB8A84A1-64F7-46E4-8DDC-20491E3D4AF9}.Debug|arm.ActiveCfg = Debug|Any CPU + {DB8A84A1-64F7-46E4-8DDC-20491E3D4AF9}.Debug|arm64.ActiveCfg = Debug|Any CPU + {DB8A84A1-64F7-46E4-8DDC-20491E3D4AF9}.Debug|x64.ActiveCfg = Debug|Any CPU + {DB8A84A1-64F7-46E4-8DDC-20491E3D4AF9}.Debug|x64.Build.0 = Debug|Any CPU + {DB8A84A1-64F7-46E4-8DDC-20491E3D4AF9}.Debug|x86.ActiveCfg = Debug|Any CPU + {DB8A84A1-64F7-46E4-8DDC-20491E3D4AF9}.Debug|x86.Build.0 = Debug|Any CPU {DB8A84A1-64F7-46E4-8DDC-20491E3D4AF9}.Release|Any CPU.ActiveCfg = Release|Any CPU {DB8A84A1-64F7-46E4-8DDC-20491E3D4AF9}.Release|Any CPU.Build.0 = Release|Any CPU + {DB8A84A1-64F7-46E4-8DDC-20491E3D4AF9}.Release|arm.ActiveCfg = Release|Any CPU + {DB8A84A1-64F7-46E4-8DDC-20491E3D4AF9}.Release|arm64.ActiveCfg = Release|Any CPU + {DB8A84A1-64F7-46E4-8DDC-20491E3D4AF9}.Release|x64.ActiveCfg = Release|Any CPU + {DB8A84A1-64F7-46E4-8DDC-20491E3D4AF9}.Release|x64.Build.0 = Release|Any CPU + {DB8A84A1-64F7-46E4-8DDC-20491E3D4AF9}.Release|x86.ActiveCfg = Release|Any CPU + {DB8A84A1-64F7-46E4-8DDC-20491E3D4AF9}.Release|x86.Build.0 = Release|Any CPU + {DB8A84A1-64F7-46E4-8DDC-20491E3D4AF9}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {DB8A84A1-64F7-46E4-8DDC-20491E3D4AF9}.Checked|arm.ActiveCfg = Debug|Any CPU + {DB8A84A1-64F7-46E4-8DDC-20491E3D4AF9}.Checked|arm64.ActiveCfg = Debug|Any CPU + {DB8A84A1-64F7-46E4-8DDC-20491E3D4AF9}.Checked|x64.ActiveCfg = Debug|Any CPU + {DB8A84A1-64F7-46E4-8DDC-20491E3D4AF9}.Checked|x86.ActiveCfg = Debug|Any CPU {B43FFBD4-DD4A-4ED8-A69F-C562769A5085}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B43FFBD4-DD4A-4ED8-A69F-C562769A5085}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B43FFBD4-DD4A-4ED8-A69F-C562769A5085}.Debug|arm.ActiveCfg = Debug|Any CPU + {B43FFBD4-DD4A-4ED8-A69F-C562769A5085}.Debug|arm64.ActiveCfg = Debug|Any CPU + {B43FFBD4-DD4A-4ED8-A69F-C562769A5085}.Debug|x64.ActiveCfg = Debug|Any CPU + {B43FFBD4-DD4A-4ED8-A69F-C562769A5085}.Debug|x64.Build.0 = Debug|Any CPU + {B43FFBD4-DD4A-4ED8-A69F-C562769A5085}.Debug|x86.ActiveCfg = Debug|Any CPU + {B43FFBD4-DD4A-4ED8-A69F-C562769A5085}.Debug|x86.Build.0 = Debug|Any CPU {B43FFBD4-DD4A-4ED8-A69F-C562769A5085}.Release|Any CPU.ActiveCfg = Release|Any CPU {B43FFBD4-DD4A-4ED8-A69F-C562769A5085}.Release|Any CPU.Build.0 = Release|Any CPU + {B43FFBD4-DD4A-4ED8-A69F-C562769A5085}.Release|arm.ActiveCfg = Release|Any CPU + {B43FFBD4-DD4A-4ED8-A69F-C562769A5085}.Release|arm64.ActiveCfg = Release|Any CPU + {B43FFBD4-DD4A-4ED8-A69F-C562769A5085}.Release|x64.ActiveCfg = Release|Any CPU + {B43FFBD4-DD4A-4ED8-A69F-C562769A5085}.Release|x64.Build.0 = Release|Any CPU + {B43FFBD4-DD4A-4ED8-A69F-C562769A5085}.Release|x86.ActiveCfg = Release|Any CPU + {B43FFBD4-DD4A-4ED8-A69F-C562769A5085}.Release|x86.Build.0 = Release|Any CPU + {B43FFBD4-DD4A-4ED8-A69F-C562769A5085}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {B43FFBD4-DD4A-4ED8-A69F-C562769A5085}.Checked|arm.ActiveCfg = Debug|Any CPU + {B43FFBD4-DD4A-4ED8-A69F-C562769A5085}.Checked|arm64.ActiveCfg = Debug|Any CPU + {B43FFBD4-DD4A-4ED8-A69F-C562769A5085}.Checked|x64.ActiveCfg = Debug|Any CPU + {B43FFBD4-DD4A-4ED8-A69F-C562769A5085}.Checked|x86.ActiveCfg = Debug|Any CPU {DCBDA200-E9E4-49E9-A928-A50FA719F9ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DCBDA200-E9E4-49E9-A928-A50FA719F9ED}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DCBDA200-E9E4-49E9-A928-A50FA719F9ED}.Debug|arm.ActiveCfg = Debug|Any CPU + {DCBDA200-E9E4-49E9-A928-A50FA719F9ED}.Debug|arm64.ActiveCfg = Debug|Any CPU + {DCBDA200-E9E4-49E9-A928-A50FA719F9ED}.Debug|x64.ActiveCfg = Debug|Any CPU + {DCBDA200-E9E4-49E9-A928-A50FA719F9ED}.Debug|x64.Build.0 = Debug|Any CPU + {DCBDA200-E9E4-49E9-A928-A50FA719F9ED}.Debug|x86.ActiveCfg = Debug|Any CPU + {DCBDA200-E9E4-49E9-A928-A50FA719F9ED}.Debug|x86.Build.0 = Debug|Any CPU {DCBDA200-E9E4-49E9-A928-A50FA719F9ED}.Release|Any CPU.ActiveCfg = Release|Any CPU {DCBDA200-E9E4-49E9-A928-A50FA719F9ED}.Release|Any CPU.Build.0 = Release|Any CPU + {DCBDA200-E9E4-49E9-A928-A50FA719F9ED}.Release|arm.ActiveCfg = Release|Any CPU + {DCBDA200-E9E4-49E9-A928-A50FA719F9ED}.Release|arm64.ActiveCfg = Release|Any CPU + {DCBDA200-E9E4-49E9-A928-A50FA719F9ED}.Release|x64.ActiveCfg = Release|Any CPU + {DCBDA200-E9E4-49E9-A928-A50FA719F9ED}.Release|x64.Build.0 = Release|Any CPU + {DCBDA200-E9E4-49E9-A928-A50FA719F9ED}.Release|x86.ActiveCfg = Release|Any CPU + {DCBDA200-E9E4-49E9-A928-A50FA719F9ED}.Release|x86.Build.0 = Release|Any CPU + {DCBDA200-E9E4-49E9-A928-A50FA719F9ED}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {DCBDA200-E9E4-49E9-A928-A50FA719F9ED}.Checked|arm.ActiveCfg = Debug|Any CPU + {DCBDA200-E9E4-49E9-A928-A50FA719F9ED}.Checked|arm64.ActiveCfg = Debug|Any CPU + {DCBDA200-E9E4-49E9-A928-A50FA719F9ED}.Checked|x64.ActiveCfg = Debug|Any CPU + {DCBDA200-E9E4-49E9-A928-A50FA719F9ED}.Checked|x86.ActiveCfg = Debug|Any CPU {546D7B53-3A00-47A4-BBE0-F4BA12126D6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {546D7B53-3A00-47A4-BBE0-F4BA12126D6F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {546D7B53-3A00-47A4-BBE0-F4BA12126D6F}.Debug|arm.ActiveCfg = Debug|Any CPU + {546D7B53-3A00-47A4-BBE0-F4BA12126D6F}.Debug|arm64.ActiveCfg = Debug|Any CPU + {546D7B53-3A00-47A4-BBE0-F4BA12126D6F}.Debug|x64.ActiveCfg = Debug|Any CPU + {546D7B53-3A00-47A4-BBE0-F4BA12126D6F}.Debug|x64.Build.0 = Debug|Any CPU + {546D7B53-3A00-47A4-BBE0-F4BA12126D6F}.Debug|x86.ActiveCfg = Debug|Any CPU + {546D7B53-3A00-47A4-BBE0-F4BA12126D6F}.Debug|x86.Build.0 = Debug|Any CPU {546D7B53-3A00-47A4-BBE0-F4BA12126D6F}.Release|Any CPU.ActiveCfg = Release|Any CPU {546D7B53-3A00-47A4-BBE0-F4BA12126D6F}.Release|Any CPU.Build.0 = Release|Any CPU + {546D7B53-3A00-47A4-BBE0-F4BA12126D6F}.Release|arm.ActiveCfg = Release|Any CPU + {546D7B53-3A00-47A4-BBE0-F4BA12126D6F}.Release|arm64.ActiveCfg = Release|Any CPU + {546D7B53-3A00-47A4-BBE0-F4BA12126D6F}.Release|x64.ActiveCfg = Release|Any CPU + {546D7B53-3A00-47A4-BBE0-F4BA12126D6F}.Release|x64.Build.0 = Release|Any CPU + {546D7B53-3A00-47A4-BBE0-F4BA12126D6F}.Release|x86.ActiveCfg = Release|Any CPU + {546D7B53-3A00-47A4-BBE0-F4BA12126D6F}.Release|x86.Build.0 = Release|Any CPU + {546D7B53-3A00-47A4-BBE0-F4BA12126D6F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {546D7B53-3A00-47A4-BBE0-F4BA12126D6F}.Checked|arm.ActiveCfg = Debug|Any CPU + {546D7B53-3A00-47A4-BBE0-F4BA12126D6F}.Checked|arm64.ActiveCfg = Debug|Any CPU + {546D7B53-3A00-47A4-BBE0-F4BA12126D6F}.Checked|x64.ActiveCfg = Debug|Any CPU + {546D7B53-3A00-47A4-BBE0-F4BA12126D6F}.Checked|x86.ActiveCfg = Debug|Any CPU {9C521ED1-5221-4C93-BBA0-86C13D4C23C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9C521ED1-5221-4C93-BBA0-86C13D4C23C7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9C521ED1-5221-4C93-BBA0-86C13D4C23C7}.Debug|arm.ActiveCfg = Debug|Any CPU + {9C521ED1-5221-4C93-BBA0-86C13D4C23C7}.Debug|arm64.ActiveCfg = Debug|Any CPU + {9C521ED1-5221-4C93-BBA0-86C13D4C23C7}.Debug|x64.ActiveCfg = Debug|Any CPU + {9C521ED1-5221-4C93-BBA0-86C13D4C23C7}.Debug|x64.Build.0 = Debug|Any CPU + {9C521ED1-5221-4C93-BBA0-86C13D4C23C7}.Debug|x86.ActiveCfg = Debug|Any CPU + {9C521ED1-5221-4C93-BBA0-86C13D4C23C7}.Debug|x86.Build.0 = Debug|Any CPU {9C521ED1-5221-4C93-BBA0-86C13D4C23C7}.Release|Any CPU.ActiveCfg = Release|Any CPU {9C521ED1-5221-4C93-BBA0-86C13D4C23C7}.Release|Any CPU.Build.0 = Release|Any CPU + {9C521ED1-5221-4C93-BBA0-86C13D4C23C7}.Release|arm.ActiveCfg = Release|Any CPU + {9C521ED1-5221-4C93-BBA0-86C13D4C23C7}.Release|arm64.ActiveCfg = Release|Any CPU + {9C521ED1-5221-4C93-BBA0-86C13D4C23C7}.Release|x64.ActiveCfg = Release|Any CPU + {9C521ED1-5221-4C93-BBA0-86C13D4C23C7}.Release|x64.Build.0 = Release|Any CPU + {9C521ED1-5221-4C93-BBA0-86C13D4C23C7}.Release|x86.ActiveCfg = Release|Any CPU + {9C521ED1-5221-4C93-BBA0-86C13D4C23C7}.Release|x86.Build.0 = Release|Any CPU + {9C521ED1-5221-4C93-BBA0-86C13D4C23C7}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {9C521ED1-5221-4C93-BBA0-86C13D4C23C7}.Checked|arm.ActiveCfg = Debug|Any CPU + {9C521ED1-5221-4C93-BBA0-86C13D4C23C7}.Checked|arm64.ActiveCfg = Debug|Any CPU + {9C521ED1-5221-4C93-BBA0-86C13D4C23C7}.Checked|x64.ActiveCfg = Debug|Any CPU + {9C521ED1-5221-4C93-BBA0-86C13D4C23C7}.Checked|x86.ActiveCfg = Debug|Any CPU + {9A6E8083-DD07-4006-831D-23C49831981A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9A6E8083-DD07-4006-831D-23C49831981A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9A6E8083-DD07-4006-831D-23C49831981A}.Debug|arm.ActiveCfg = Debug|Any CPU + {9A6E8083-DD07-4006-831D-23C49831981A}.Debug|arm64.ActiveCfg = Debug|Any CPU + {9A6E8083-DD07-4006-831D-23C49831981A}.Debug|x64.ActiveCfg = Debug|Any CPU + {9A6E8083-DD07-4006-831D-23C49831981A}.Debug|x64.Build.0 = Debug|Any CPU + {9A6E8083-DD07-4006-831D-23C49831981A}.Debug|x86.ActiveCfg = Debug|Any CPU + {9A6E8083-DD07-4006-831D-23C49831981A}.Debug|x86.Build.0 = Debug|Any CPU + {9A6E8083-DD07-4006-831D-23C49831981A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9A6E8083-DD07-4006-831D-23C49831981A}.Release|Any CPU.Build.0 = Release|Any CPU + {9A6E8083-DD07-4006-831D-23C49831981A}.Release|arm.ActiveCfg = Release|Any CPU + {9A6E8083-DD07-4006-831D-23C49831981A}.Release|arm64.ActiveCfg = Release|Any CPU + {9A6E8083-DD07-4006-831D-23C49831981A}.Release|x64.ActiveCfg = Release|Any CPU + {9A6E8083-DD07-4006-831D-23C49831981A}.Release|x64.Build.0 = Release|Any CPU + {9A6E8083-DD07-4006-831D-23C49831981A}.Release|x86.ActiveCfg = Release|Any CPU + {9A6E8083-DD07-4006-831D-23C49831981A}.Release|x86.Build.0 = Release|Any CPU + {9A6E8083-DD07-4006-831D-23C49831981A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {9A6E8083-DD07-4006-831D-23C49831981A}.Checked|arm.ActiveCfg = Debug|Any CPU + {9A6E8083-DD07-4006-831D-23C49831981A}.Checked|arm64.ActiveCfg = Debug|Any CPU + {9A6E8083-DD07-4006-831D-23C49831981A}.Checked|x64.ActiveCfg = Debug|Any CPU + {9A6E8083-DD07-4006-831D-23C49831981A}.Checked|x86.ActiveCfg = Debug|Any CPU + {D3D0D188-947E-46E2-9B61-388B34B3140E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D3D0D188-947E-46E2-9B61-388B34B3140E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D3D0D188-947E-46E2-9B61-388B34B3140E}.Debug|arm.ActiveCfg = Debug|Any CPU + {D3D0D188-947E-46E2-9B61-388B34B3140E}.Debug|arm64.ActiveCfg = Debug|Any CPU + {D3D0D188-947E-46E2-9B61-388B34B3140E}.Debug|x64.ActiveCfg = Debug|Any CPU + {D3D0D188-947E-46E2-9B61-388B34B3140E}.Debug|x64.Build.0 = Debug|Any CPU + {D3D0D188-947E-46E2-9B61-388B34B3140E}.Debug|x86.ActiveCfg = Debug|Any CPU + {D3D0D188-947E-46E2-9B61-388B34B3140E}.Debug|x86.Build.0 = Debug|Any CPU + {D3D0D188-947E-46E2-9B61-388B34B3140E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D3D0D188-947E-46E2-9B61-388B34B3140E}.Release|Any CPU.Build.0 = Release|Any CPU + {D3D0D188-947E-46E2-9B61-388B34B3140E}.Release|arm.ActiveCfg = Release|Any CPU + {D3D0D188-947E-46E2-9B61-388B34B3140E}.Release|arm64.ActiveCfg = Release|Any CPU + {D3D0D188-947E-46E2-9B61-388B34B3140E}.Release|x64.ActiveCfg = Release|Any CPU + {D3D0D188-947E-46E2-9B61-388B34B3140E}.Release|x64.Build.0 = Release|Any CPU + {D3D0D188-947E-46E2-9B61-388B34B3140E}.Release|x86.ActiveCfg = Release|Any CPU + {D3D0D188-947E-46E2-9B61-388B34B3140E}.Release|x86.Build.0 = Release|Any CPU + {D3D0D188-947E-46E2-9B61-388B34B3140E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {D3D0D188-947E-46E2-9B61-388B34B3140E}.Checked|arm.ActiveCfg = Debug|Any CPU + {D3D0D188-947E-46E2-9B61-388B34B3140E}.Checked|arm64.ActiveCfg = Debug|Any CPU + {D3D0D188-947E-46E2-9B61-388B34B3140E}.Checked|x64.ActiveCfg = Debug|Any CPU + {D3D0D188-947E-46E2-9B61-388B34B3140E}.Checked|x86.ActiveCfg = Debug|Any CPU + {EAE01BBD-4707-499B-8E8D-567F1694EF98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EAE01BBD-4707-499B-8E8D-567F1694EF98}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EAE01BBD-4707-499B-8E8D-567F1694EF98}.Debug|arm.ActiveCfg = Debug|Any CPU + {EAE01BBD-4707-499B-8E8D-567F1694EF98}.Debug|arm64.ActiveCfg = Debug|Any CPU + {EAE01BBD-4707-499B-8E8D-567F1694EF98}.Debug|x64.ActiveCfg = Debug|Any CPU + {EAE01BBD-4707-499B-8E8D-567F1694EF98}.Debug|x64.Build.0 = Debug|Any CPU + {EAE01BBD-4707-499B-8E8D-567F1694EF98}.Debug|x86.ActiveCfg = Debug|Any CPU + {EAE01BBD-4707-499B-8E8D-567F1694EF98}.Debug|x86.Build.0 = Debug|Any CPU + {EAE01BBD-4707-499B-8E8D-567F1694EF98}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EAE01BBD-4707-499B-8E8D-567F1694EF98}.Release|Any CPU.Build.0 = Release|Any CPU + {EAE01BBD-4707-499B-8E8D-567F1694EF98}.Release|arm.ActiveCfg = Release|Any CPU + {EAE01BBD-4707-499B-8E8D-567F1694EF98}.Release|arm64.ActiveCfg = Release|Any CPU + {EAE01BBD-4707-499B-8E8D-567F1694EF98}.Release|x64.ActiveCfg = Release|Any CPU + {EAE01BBD-4707-499B-8E8D-567F1694EF98}.Release|x64.Build.0 = Release|Any CPU + {EAE01BBD-4707-499B-8E8D-567F1694EF98}.Release|x86.ActiveCfg = Release|Any CPU + {EAE01BBD-4707-499B-8E8D-567F1694EF98}.Release|x86.Build.0 = Release|Any CPU + {EAE01BBD-4707-499B-8E8D-567F1694EF98}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {EAE01BBD-4707-499B-8E8D-567F1694EF98}.Checked|arm.ActiveCfg = Debug|Any CPU + {EAE01BBD-4707-499B-8E8D-567F1694EF98}.Checked|arm64.ActiveCfg = Debug|Any CPU + {EAE01BBD-4707-499B-8E8D-567F1694EF98}.Checked|x64.ActiveCfg = Debug|Any CPU + {EAE01BBD-4707-499B-8E8D-567F1694EF98}.Checked|x86.ActiveCfg = Debug|Any CPU + {DB6DC8D8-7329-4427-9641-1415ACF118A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DB6DC8D8-7329-4427-9641-1415ACF118A6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DB6DC8D8-7329-4427-9641-1415ACF118A6}.Debug|arm.ActiveCfg = Debug|Any CPU + {DB6DC8D8-7329-4427-9641-1415ACF118A6}.Debug|arm64.ActiveCfg = Debug|Any CPU + {DB6DC8D8-7329-4427-9641-1415ACF118A6}.Debug|x64.ActiveCfg = Debug|Any CPU + {DB6DC8D8-7329-4427-9641-1415ACF118A6}.Debug|x64.Build.0 = Debug|Any CPU + {DB6DC8D8-7329-4427-9641-1415ACF118A6}.Debug|x86.ActiveCfg = Debug|Any CPU + {DB6DC8D8-7329-4427-9641-1415ACF118A6}.Debug|x86.Build.0 = Debug|Any CPU + {DB6DC8D8-7329-4427-9641-1415ACF118A6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DB6DC8D8-7329-4427-9641-1415ACF118A6}.Release|Any CPU.Build.0 = Release|Any CPU + {DB6DC8D8-7329-4427-9641-1415ACF118A6}.Release|arm.ActiveCfg = Release|Any CPU + {DB6DC8D8-7329-4427-9641-1415ACF118A6}.Release|arm64.ActiveCfg = Release|Any CPU + {DB6DC8D8-7329-4427-9641-1415ACF118A6}.Release|x64.ActiveCfg = Release|Any CPU + {DB6DC8D8-7329-4427-9641-1415ACF118A6}.Release|x64.Build.0 = Release|Any CPU + {DB6DC8D8-7329-4427-9641-1415ACF118A6}.Release|x86.ActiveCfg = Release|Any CPU + {DB6DC8D8-7329-4427-9641-1415ACF118A6}.Release|x86.Build.0 = Release|Any CPU + {DB6DC8D8-7329-4427-9641-1415ACF118A6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {DB6DC8D8-7329-4427-9641-1415ACF118A6}.Checked|arm.ActiveCfg = Debug|Any CPU + {DB6DC8D8-7329-4427-9641-1415ACF118A6}.Checked|arm64.ActiveCfg = Debug|Any CPU + {DB6DC8D8-7329-4427-9641-1415ACF118A6}.Checked|x64.ActiveCfg = Debug|Any CPU + {DB6DC8D8-7329-4427-9641-1415ACF118A6}.Checked|x86.ActiveCfg = Debug|Any CPU + {3A466C9C-F42B-462A-9D0B-96CDA47A8210}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3A466C9C-F42B-462A-9D0B-96CDA47A8210}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3A466C9C-F42B-462A-9D0B-96CDA47A8210}.Debug|arm.ActiveCfg = Debug|Any CPU + {3A466C9C-F42B-462A-9D0B-96CDA47A8210}.Debug|arm64.ActiveCfg = Debug|Any CPU + {3A466C9C-F42B-462A-9D0B-96CDA47A8210}.Debug|x64.ActiveCfg = Debug|Any CPU + {3A466C9C-F42B-462A-9D0B-96CDA47A8210}.Debug|x64.Build.0 = Debug|Any CPU + {3A466C9C-F42B-462A-9D0B-96CDA47A8210}.Debug|x86.ActiveCfg = Debug|Any CPU + {3A466C9C-F42B-462A-9D0B-96CDA47A8210}.Debug|x86.Build.0 = Debug|Any CPU + {3A466C9C-F42B-462A-9D0B-96CDA47A8210}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3A466C9C-F42B-462A-9D0B-96CDA47A8210}.Release|Any CPU.Build.0 = Release|Any CPU + {3A466C9C-F42B-462A-9D0B-96CDA47A8210}.Release|arm.ActiveCfg = Release|Any CPU + {3A466C9C-F42B-462A-9D0B-96CDA47A8210}.Release|arm64.ActiveCfg = Release|Any CPU + {3A466C9C-F42B-462A-9D0B-96CDA47A8210}.Release|x64.ActiveCfg = Release|Any CPU + {3A466C9C-F42B-462A-9D0B-96CDA47A8210}.Release|x64.Build.0 = Release|Any CPU + {3A466C9C-F42B-462A-9D0B-96CDA47A8210}.Release|x86.ActiveCfg = Release|Any CPU + {3A466C9C-F42B-462A-9D0B-96CDA47A8210}.Release|x86.Build.0 = Release|Any CPU + {3A466C9C-F42B-462A-9D0B-96CDA47A8210}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {3A466C9C-F42B-462A-9D0B-96CDA47A8210}.Checked|arm.ActiveCfg = Debug|Any CPU + {3A466C9C-F42B-462A-9D0B-96CDA47A8210}.Checked|arm64.ActiveCfg = Debug|Any CPU + {3A466C9C-F42B-462A-9D0B-96CDA47A8210}.Checked|x64.ActiveCfg = Debug|Any CPU + {3A466C9C-F42B-462A-9D0B-96CDA47A8210}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution + {946BAB0E-CD71-4456-9FBB-2066470A83B5} = {C5847D76-464F-49B7-B5BE-80F9FCA55883} {3742D5F8-5C86-49FD-BAEA-050742CCEB7A} = {0F383187-7D3B-4EF3-844B-CFBE0276A7B8} {C67553AE-F09B-407D-AD3E-D61950E06BE8} = {0F383187-7D3B-4EF3-844B-CFBE0276A7B8} {ABA61FEF-EB06-441D-9D3D-F25FFC7CD83D} = {0F383187-7D3B-4EF3-844B-CFBE0276A7B8} @@ -230,6 +1077,7 @@ Global {4792FFA1-1AD2-4230-8DE3-D2BCF1CF804F} = {8A0AABD7-E3CA-40EA-8290-CEB1D3D0F9AD} {F485B36D-8DDB-44EE-A993-2FCAEC81BE3E} = {8A0AABD7-E3CA-40EA-8290-CEB1D3D0F9AD} {E4D48405-30B4-4CEC-925B-851133BACC3D} = {8A0AABD7-E3CA-40EA-8290-CEB1D3D0F9AD} + {1B7EED4E-D261-4795-84FA-1B948B6E9E53} = {8A0AABD7-E3CA-40EA-8290-CEB1D3D0F9AD} {6C9EC55A-BE5D-40FD-A161-ABB87CE20E89} = {8A0AABD7-E3CA-40EA-8290-CEB1D3D0F9AD} {5823DDA1-6CCB-4EBC-89DF-6AC430C64204} = {8A0AABD7-E3CA-40EA-8290-CEB1D3D0F9AD} {31A2D9B9-434C-4859-A78E-90E912FB86C1} = {8A0AABD7-E3CA-40EA-8290-CEB1D3D0F9AD} @@ -239,16 +1087,28 @@ Global {B43FFBD4-DD4A-4ED8-A69F-C562769A5085} = {8A0AABD7-E3CA-40EA-8290-CEB1D3D0F9AD} {546D7B53-3A00-47A4-BBE0-F4BA12126D6F} = {8A0AABD7-E3CA-40EA-8290-CEB1D3D0F9AD} {E5AE4EB3-DB23-4F33-858B-63B68A60F7F1} = {B27D0964-41D3-4520-8D68-AD69F010A6B9} + {33163E79-02D8-4ED2-BED9-3A96D94B7D41} = {B27D0964-41D3-4520-8D68-AD69F010A6B9} {F65F6021-37F2-450B-B8BF-66F04B56DE56} = {B27D0964-41D3-4520-8D68-AD69F010A6B9} {D4C21BE3-FAA7-4FB6-A2AF-3F160A9386FC} = {B27D0964-41D3-4520-8D68-AD69F010A6B9} {314810DF-262E-490E-8F05-F31695C31F0C} = {B27D0964-41D3-4520-8D68-AD69F010A6B9} {84075D59-9D5E-40F7-A914-911087419FE4} = {B27D0964-41D3-4520-8D68-AD69F010A6B9} + {FD0788DC-C765-41A8-9EBF-93DAAA92F9AD} = {B27D0964-41D3-4520-8D68-AD69F010A6B9} + {CEAF6846-A3EB-4DBF-897A-BD6A95BFB384} = {B27D0964-41D3-4520-8D68-AD69F010A6B9} {B8F3933C-7C0D-41B3-8B1F-D507EF92156B} = {B27D0964-41D3-4520-8D68-AD69F010A6B9} {DCBDA200-E9E4-49E9-A928-A50FA719F9ED} = {B27D0964-41D3-4520-8D68-AD69F010A6B9} {9C521ED1-5221-4C93-BBA0-86C13D4C23C7} = {B27D0964-41D3-4520-8D68-AD69F010A6B9} + {4165769D-C4EE-46C4-9FA2-068DBF1BDB0A} = {8CB89ED5-7600-48B5-B7F4-72026EB9F533} {ABF31AAD-012E-4DD3-9B10-2F4590333A22} = {8CB89ED5-7600-48B5-B7F4-72026EB9F533} {C8F1CF01-F4E9-4459-9FBB-34363A0C377E} = {8CB89ED5-7600-48B5-B7F4-72026EB9F533} {FD985738-3603-4C41-9FDE-1C96F7922725} = {8CB89ED5-7600-48B5-B7F4-72026EB9F533} + {9A6E8083-DD07-4006-831D-23C49831981A} = {AB1A5F67-F907-4B8C-9076-1279BC039D8C} + {D3D0D188-947E-46E2-9B61-388B34B3140E} = {AB1A5F67-F907-4B8C-9076-1279BC039D8C} + {AB1A5F67-F907-4B8C-9076-1279BC039D8C} = {41A7005B-1CD2-4EC1-BFC8-D0886ED4B7BB} + {EAE01BBD-4707-499B-8E8D-567F1694EF98} = {0ECB6471-9FBC-467D-870F-458C231E7B9D} + {DB6DC8D8-7329-4427-9641-1415ACF118A6} = {0ECB6471-9FBC-467D-870F-458C231E7B9D} + {0ECB6471-9FBC-467D-870F-458C231E7B9D} = {41A7005B-1CD2-4EC1-BFC8-D0886ED4B7BB} + {3A466C9C-F42B-462A-9D0B-96CDA47A8210} = {0F35AB40-A435-463A-914A-5339D0ED4A0F} + {0F35AB40-A435-463A-914A-5339D0ED4A0F} = {41A7005B-1CD2-4EC1-BFC8-D0886ED4B7BB} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {B723DDA5-3A21-4A9C-A344-548BE6D05B72} diff --git a/src/libraries/System.Diagnostics.StackTrace/System.Diagnostics.StackTrace.sln b/src/libraries/System.Diagnostics.StackTrace/System.Diagnostics.StackTrace.sln index 38689f1965126c..ff6b2879f563cb 100644 --- a/src/libraries/System.Diagnostics.StackTrace/System.Diagnostics.StackTrace.sln +++ b/src/libraries/System.Diagnostics.StackTrace/System.Diagnostics.StackTrace.sln @@ -51,14 +51,34 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading", "..\Syst EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading", "..\System.Threading\src\System.Threading.csproj", "{039BB256-1BCF-4398-B586-C05F7C5225C4}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C81302E5-C312-4C10-ACC7-D7201A16FAC6}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{CABF1BE7-C382-4121-96C3-B25A18CC31B6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{3E0A6000-5E5D-46CE-A082-6379B18E56D4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{921D9613-0797-4016-8C51-47EB96764EA3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{7AE13171-375E-4D54-91A5-4ADEDC18E7D0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{04974279-7D70-4BE6-9F4C-23AF30F64C9B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{A801F00E-81F9-4531-B2D8-1C15CB6A34B0}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{A376B9EB-8223-464D-A8F5-0000B26254F4}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{ED3F0225-44AC-415A-80C8-18D9CAD10A64}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C81302E5-C312-4C10-ACC7-D7201A16FAC6}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{CAB63FAF-D862-451E-84FF-115A7DABB4CA}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{A118A4EF-D9D1-4AC9-B0A6-C7A2A15A63C5}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{08F83A99-B68D-4F24-86CA-121CF8D30418}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{57AE0EEE-0798-4319-9A33-56C7FD228E25}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{F8B374FD-7ECB-45EA-BBA9-F9F057EF34D7}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -633,21 +653,117 @@ Global {039BB256-1BCF-4398-B586-C05F7C5225C4}.Checked|arm64.ActiveCfg = Debug|Any CPU {039BB256-1BCF-4398-B586-C05F7C5225C4}.Checked|x64.ActiveCfg = Debug|Any CPU {039BB256-1BCF-4398-B586-C05F7C5225C4}.Checked|x86.ActiveCfg = Debug|Any CPU + {CABF1BE7-C382-4121-96C3-B25A18CC31B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CABF1BE7-C382-4121-96C3-B25A18CC31B6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CABF1BE7-C382-4121-96C3-B25A18CC31B6}.Debug|arm.ActiveCfg = Debug|Any CPU + {CABF1BE7-C382-4121-96C3-B25A18CC31B6}.Debug|arm64.ActiveCfg = Debug|Any CPU + {CABF1BE7-C382-4121-96C3-B25A18CC31B6}.Debug|x64.ActiveCfg = Debug|Any CPU + {CABF1BE7-C382-4121-96C3-B25A18CC31B6}.Debug|x64.Build.0 = Debug|Any CPU + {CABF1BE7-C382-4121-96C3-B25A18CC31B6}.Debug|x86.ActiveCfg = Debug|Any CPU + {CABF1BE7-C382-4121-96C3-B25A18CC31B6}.Debug|x86.Build.0 = Debug|Any CPU + {CABF1BE7-C382-4121-96C3-B25A18CC31B6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CABF1BE7-C382-4121-96C3-B25A18CC31B6}.Release|Any CPU.Build.0 = Release|Any CPU + {CABF1BE7-C382-4121-96C3-B25A18CC31B6}.Release|arm.ActiveCfg = Release|Any CPU + {CABF1BE7-C382-4121-96C3-B25A18CC31B6}.Release|arm64.ActiveCfg = Release|Any CPU + {CABF1BE7-C382-4121-96C3-B25A18CC31B6}.Release|x64.ActiveCfg = Release|Any CPU + {CABF1BE7-C382-4121-96C3-B25A18CC31B6}.Release|x64.Build.0 = Release|Any CPU + {CABF1BE7-C382-4121-96C3-B25A18CC31B6}.Release|x86.ActiveCfg = Release|Any CPU + {CABF1BE7-C382-4121-96C3-B25A18CC31B6}.Release|x86.Build.0 = Release|Any CPU + {CABF1BE7-C382-4121-96C3-B25A18CC31B6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {CABF1BE7-C382-4121-96C3-B25A18CC31B6}.Checked|arm.ActiveCfg = Debug|Any CPU + {CABF1BE7-C382-4121-96C3-B25A18CC31B6}.Checked|arm64.ActiveCfg = Debug|Any CPU + {CABF1BE7-C382-4121-96C3-B25A18CC31B6}.Checked|x64.ActiveCfg = Debug|Any CPU + {CABF1BE7-C382-4121-96C3-B25A18CC31B6}.Checked|x86.ActiveCfg = Debug|Any CPU + {3E0A6000-5E5D-46CE-A082-6379B18E56D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3E0A6000-5E5D-46CE-A082-6379B18E56D4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3E0A6000-5E5D-46CE-A082-6379B18E56D4}.Debug|arm.ActiveCfg = Debug|Any CPU + {3E0A6000-5E5D-46CE-A082-6379B18E56D4}.Debug|arm64.ActiveCfg = Debug|Any CPU + {3E0A6000-5E5D-46CE-A082-6379B18E56D4}.Debug|x64.ActiveCfg = Debug|Any CPU + {3E0A6000-5E5D-46CE-A082-6379B18E56D4}.Debug|x64.Build.0 = Debug|Any CPU + {3E0A6000-5E5D-46CE-A082-6379B18E56D4}.Debug|x86.ActiveCfg = Debug|Any CPU + {3E0A6000-5E5D-46CE-A082-6379B18E56D4}.Debug|x86.Build.0 = Debug|Any CPU + {3E0A6000-5E5D-46CE-A082-6379B18E56D4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3E0A6000-5E5D-46CE-A082-6379B18E56D4}.Release|Any CPU.Build.0 = Release|Any CPU + {3E0A6000-5E5D-46CE-A082-6379B18E56D4}.Release|arm.ActiveCfg = Release|Any CPU + {3E0A6000-5E5D-46CE-A082-6379B18E56D4}.Release|arm64.ActiveCfg = Release|Any CPU + {3E0A6000-5E5D-46CE-A082-6379B18E56D4}.Release|x64.ActiveCfg = Release|Any CPU + {3E0A6000-5E5D-46CE-A082-6379B18E56D4}.Release|x64.Build.0 = Release|Any CPU + {3E0A6000-5E5D-46CE-A082-6379B18E56D4}.Release|x86.ActiveCfg = Release|Any CPU + {3E0A6000-5E5D-46CE-A082-6379B18E56D4}.Release|x86.Build.0 = Release|Any CPU + {3E0A6000-5E5D-46CE-A082-6379B18E56D4}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {3E0A6000-5E5D-46CE-A082-6379B18E56D4}.Checked|arm.ActiveCfg = Debug|Any CPU + {3E0A6000-5E5D-46CE-A082-6379B18E56D4}.Checked|arm64.ActiveCfg = Debug|Any CPU + {3E0A6000-5E5D-46CE-A082-6379B18E56D4}.Checked|x64.ActiveCfg = Debug|Any CPU + {3E0A6000-5E5D-46CE-A082-6379B18E56D4}.Checked|x86.ActiveCfg = Debug|Any CPU + {921D9613-0797-4016-8C51-47EB96764EA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {921D9613-0797-4016-8C51-47EB96764EA3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {921D9613-0797-4016-8C51-47EB96764EA3}.Debug|arm.ActiveCfg = Debug|Any CPU + {921D9613-0797-4016-8C51-47EB96764EA3}.Debug|arm64.ActiveCfg = Debug|Any CPU + {921D9613-0797-4016-8C51-47EB96764EA3}.Debug|x64.ActiveCfg = Debug|Any CPU + {921D9613-0797-4016-8C51-47EB96764EA3}.Debug|x64.Build.0 = Debug|Any CPU + {921D9613-0797-4016-8C51-47EB96764EA3}.Debug|x86.ActiveCfg = Debug|Any CPU + {921D9613-0797-4016-8C51-47EB96764EA3}.Debug|x86.Build.0 = Debug|Any CPU + {921D9613-0797-4016-8C51-47EB96764EA3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {921D9613-0797-4016-8C51-47EB96764EA3}.Release|Any CPU.Build.0 = Release|Any CPU + {921D9613-0797-4016-8C51-47EB96764EA3}.Release|arm.ActiveCfg = Release|Any CPU + {921D9613-0797-4016-8C51-47EB96764EA3}.Release|arm64.ActiveCfg = Release|Any CPU + {921D9613-0797-4016-8C51-47EB96764EA3}.Release|x64.ActiveCfg = Release|Any CPU + {921D9613-0797-4016-8C51-47EB96764EA3}.Release|x64.Build.0 = Release|Any CPU + {921D9613-0797-4016-8C51-47EB96764EA3}.Release|x86.ActiveCfg = Release|Any CPU + {921D9613-0797-4016-8C51-47EB96764EA3}.Release|x86.Build.0 = Release|Any CPU + {921D9613-0797-4016-8C51-47EB96764EA3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {921D9613-0797-4016-8C51-47EB96764EA3}.Checked|arm.ActiveCfg = Debug|Any CPU + {921D9613-0797-4016-8C51-47EB96764EA3}.Checked|arm64.ActiveCfg = Debug|Any CPU + {921D9613-0797-4016-8C51-47EB96764EA3}.Checked|x64.ActiveCfg = Debug|Any CPU + {921D9613-0797-4016-8C51-47EB96764EA3}.Checked|x86.ActiveCfg = Debug|Any CPU + {7AE13171-375E-4D54-91A5-4ADEDC18E7D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7AE13171-375E-4D54-91A5-4ADEDC18E7D0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7AE13171-375E-4D54-91A5-4ADEDC18E7D0}.Debug|arm.ActiveCfg = Debug|Any CPU + {7AE13171-375E-4D54-91A5-4ADEDC18E7D0}.Debug|arm64.ActiveCfg = Debug|Any CPU + {7AE13171-375E-4D54-91A5-4ADEDC18E7D0}.Debug|x64.ActiveCfg = Debug|Any CPU + {7AE13171-375E-4D54-91A5-4ADEDC18E7D0}.Debug|x64.Build.0 = Debug|Any CPU + {7AE13171-375E-4D54-91A5-4ADEDC18E7D0}.Debug|x86.ActiveCfg = Debug|Any CPU + {7AE13171-375E-4D54-91A5-4ADEDC18E7D0}.Debug|x86.Build.0 = Debug|Any CPU + {7AE13171-375E-4D54-91A5-4ADEDC18E7D0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7AE13171-375E-4D54-91A5-4ADEDC18E7D0}.Release|Any CPU.Build.0 = Release|Any CPU + {7AE13171-375E-4D54-91A5-4ADEDC18E7D0}.Release|arm.ActiveCfg = Release|Any CPU + {7AE13171-375E-4D54-91A5-4ADEDC18E7D0}.Release|arm64.ActiveCfg = Release|Any CPU + {7AE13171-375E-4D54-91A5-4ADEDC18E7D0}.Release|x64.ActiveCfg = Release|Any CPU + {7AE13171-375E-4D54-91A5-4ADEDC18E7D0}.Release|x64.Build.0 = Release|Any CPU + {7AE13171-375E-4D54-91A5-4ADEDC18E7D0}.Release|x86.ActiveCfg = Release|Any CPU + {7AE13171-375E-4D54-91A5-4ADEDC18E7D0}.Release|x86.Build.0 = Release|Any CPU + {7AE13171-375E-4D54-91A5-4ADEDC18E7D0}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {7AE13171-375E-4D54-91A5-4ADEDC18E7D0}.Checked|arm.ActiveCfg = Debug|Any CPU + {7AE13171-375E-4D54-91A5-4ADEDC18E7D0}.Checked|arm64.ActiveCfg = Debug|Any CPU + {7AE13171-375E-4D54-91A5-4ADEDC18E7D0}.Checked|x64.ActiveCfg = Debug|Any CPU + {7AE13171-375E-4D54-91A5-4ADEDC18E7D0}.Checked|x86.ActiveCfg = Debug|Any CPU + {04974279-7D70-4BE6-9F4C-23AF30F64C9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {04974279-7D70-4BE6-9F4C-23AF30F64C9B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {04974279-7D70-4BE6-9F4C-23AF30F64C9B}.Debug|arm.ActiveCfg = Debug|Any CPU + {04974279-7D70-4BE6-9F4C-23AF30F64C9B}.Debug|arm64.ActiveCfg = Debug|Any CPU + {04974279-7D70-4BE6-9F4C-23AF30F64C9B}.Debug|x64.ActiveCfg = Debug|Any CPU + {04974279-7D70-4BE6-9F4C-23AF30F64C9B}.Debug|x64.Build.0 = Debug|Any CPU + {04974279-7D70-4BE6-9F4C-23AF30F64C9B}.Debug|x86.ActiveCfg = Debug|Any CPU + {04974279-7D70-4BE6-9F4C-23AF30F64C9B}.Debug|x86.Build.0 = Debug|Any CPU + {04974279-7D70-4BE6-9F4C-23AF30F64C9B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {04974279-7D70-4BE6-9F4C-23AF30F64C9B}.Release|Any CPU.Build.0 = Release|Any CPU + {04974279-7D70-4BE6-9F4C-23AF30F64C9B}.Release|arm.ActiveCfg = Release|Any CPU + {04974279-7D70-4BE6-9F4C-23AF30F64C9B}.Release|arm64.ActiveCfg = Release|Any CPU + {04974279-7D70-4BE6-9F4C-23AF30F64C9B}.Release|x64.ActiveCfg = Release|Any CPU + {04974279-7D70-4BE6-9F4C-23AF30F64C9B}.Release|x64.Build.0 = Release|Any CPU + {04974279-7D70-4BE6-9F4C-23AF30F64C9B}.Release|x86.ActiveCfg = Release|Any CPU + {04974279-7D70-4BE6-9F4C-23AF30F64C9B}.Release|x86.Build.0 = Release|Any CPU + {04974279-7D70-4BE6-9F4C-23AF30F64C9B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {04974279-7D70-4BE6-9F4C-23AF30F64C9B}.Checked|arm.ActiveCfg = Debug|Any CPU + {04974279-7D70-4BE6-9F4C-23AF30F64C9B}.Checked|arm64.ActiveCfg = Debug|Any CPU + {04974279-7D70-4BE6-9F4C-23AF30F64C9B}.Checked|x64.ActiveCfg = Debug|Any CPU + {04974279-7D70-4BE6-9F4C-23AF30F64C9B}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {E34F351F-8EB7-4D44-BA44-85F791F662CC} = {C81302E5-C312-4C10-ACC7-D7201A16FAC6} - {26367C54-C1A4-462F-AA71-E48644208AE9} = {C81302E5-C312-4C10-ACC7-D7201A16FAC6} - {E3D6317B-BEDD-41D2-A7B4-01A8D050C9C8} = {C81302E5-C312-4C10-ACC7-D7201A16FAC6} - {1A44729F-AFB5-4BB0-8348-58833378AE55} = {C81302E5-C312-4C10-ACC7-D7201A16FAC6} - {B1632FA3-4F01-4B41-BB61-F7676A25EDA0} = {C81302E5-C312-4C10-ACC7-D7201A16FAC6} - {96501106-36D0-4093-8FEE-AF90713D09ED} = {C81302E5-C312-4C10-ACC7-D7201A16FAC6} - {E6DD9860-2824-43D3-BD9D-87ED396B4E46} = {C81302E5-C312-4C10-ACC7-D7201A16FAC6} - {E5EB0B0B-FFAC-4C1B-AD59-292849F847FE} = {C81302E5-C312-4C10-ACC7-D7201A16FAC6} - {623D46A5-8ED4-43CF-A01B-528F0A505090} = {C81302E5-C312-4C10-ACC7-D7201A16FAC6} - {039BB256-1BCF-4398-B586-C05F7C5225C4} = {C81302E5-C312-4C10-ACC7-D7201A16FAC6} + {E34F351F-8EB7-4D44-BA44-85F791F662CC} = {A801F00E-81F9-4531-B2D8-1C15CB6A34B0} {65FFFD20-CE5D-4FC0-A525-1C308186A16F} = {A376B9EB-8223-464D-A8F5-0000B26254F4} {63860D71-D351-4285-9154-9864DC883647} = {A376B9EB-8223-464D-A8F5-0000B26254F4} {956E53A2-5A41-44A7-900A-49044376B2BD} = {A376B9EB-8223-464D-A8F5-0000B26254F4} @@ -660,10 +776,27 @@ Global {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} + {26367C54-C1A4-462F-AA71-E48644208AE9} = {C81302E5-C312-4C10-ACC7-D7201A16FAC6} + {E3D6317B-BEDD-41D2-A7B4-01A8D050C9C8} = {C81302E5-C312-4C10-ACC7-D7201A16FAC6} + {1A44729F-AFB5-4BB0-8348-58833378AE55} = {C81302E5-C312-4C10-ACC7-D7201A16FAC6} + {B1632FA3-4F01-4B41-BB61-F7676A25EDA0} = {C81302E5-C312-4C10-ACC7-D7201A16FAC6} + {96501106-36D0-4093-8FEE-AF90713D09ED} = {C81302E5-C312-4C10-ACC7-D7201A16FAC6} + {E6DD9860-2824-43D3-BD9D-87ED396B4E46} = {C81302E5-C312-4C10-ACC7-D7201A16FAC6} + {E5EB0B0B-FFAC-4C1B-AD59-292849F847FE} = {C81302E5-C312-4C10-ACC7-D7201A16FAC6} + {623D46A5-8ED4-43CF-A01B-528F0A505090} = {C81302E5-C312-4C10-ACC7-D7201A16FAC6} + {039BB256-1BCF-4398-B586-C05F7C5225C4} = {C81302E5-C312-4C10-ACC7-D7201A16FAC6} {0269FFAF-E680-4BC8-A1B4-0333D77911BC} = {CAB63FAF-D862-451E-84FF-115A7DABB4CA} {F18C3460-7F92-4570-9DE9-32B3C3DA6DA8} = {CAB63FAF-D862-451E-84FF-115A7DABB4CA} {56B120CF-EBB5-4422-A7B5-5216FE4F71E3} = {CAB63FAF-D862-451E-84FF-115A7DABB4CA} {C0FDA629-485A-4795-80D1-BC228F610163} = {CAB63FAF-D862-451E-84FF-115A7DABB4CA} + {CABF1BE7-C382-4121-96C3-B25A18CC31B6} = {A118A4EF-D9D1-4AC9-B0A6-C7A2A15A63C5} + {3E0A6000-5E5D-46CE-A082-6379B18E56D4} = {A118A4EF-D9D1-4AC9-B0A6-C7A2A15A63C5} + {A118A4EF-D9D1-4AC9-B0A6-C7A2A15A63C5} = {F8B374FD-7ECB-45EA-BBA9-F9F057EF34D7} + {921D9613-0797-4016-8C51-47EB96764EA3} = {08F83A99-B68D-4F24-86CA-121CF8D30418} + {7AE13171-375E-4D54-91A5-4ADEDC18E7D0} = {08F83A99-B68D-4F24-86CA-121CF8D30418} + {08F83A99-B68D-4F24-86CA-121CF8D30418} = {F8B374FD-7ECB-45EA-BBA9-F9F057EF34D7} + {04974279-7D70-4BE6-9F4C-23AF30F64C9B} = {57AE0EEE-0798-4319-9A33-56C7FD228E25} + {57AE0EEE-0798-4319-9A33-56C7FD228E25} = {F8B374FD-7ECB-45EA-BBA9-F9F057EF34D7} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {1572B987-E4D6-45D5-82AB-9CC0BB306C2E} diff --git a/src/libraries/System.Diagnostics.TextWriterTraceListener/System.Diagnostics.TextWriterTraceListener.sln b/src/libraries/System.Diagnostics.TextWriterTraceListener/System.Diagnostics.TextWriterTraceListener.sln index aa3620bce3a965..f9aea7ef82c4f3 100644 --- a/src/libraries/System.Diagnostics.TextWriterTraceListener/System.Diagnostics.TextWriterTraceListener.sln +++ b/src/libraries/System.Diagnostics.TextWriterTraceListener/System.Diagnostics.TextWriterTraceListener.sln @@ -29,6 +29,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{7176D984-0BB0-4266-8D51-28562F5EFA02}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{8662AAE6-3C70-42C7-9FD0-AB204DFD6B9C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{DA30D375-A8AB-41D1-9936-D48A3F0D0B48}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{36F25033-47B0-42CC-9AD3-90371FEFB061}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{EE899E4A-F073-4E7E-B6F8-FE96696234BE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{8611AAFC-7370-48DA-AC22-3D0766B6B1FF}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{C2EA1B5C-E1FF-491B-B243-17B133914DAE}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{261ED6BF-3867-4A06-B9A3-4973BCAB5621}" @@ -37,6 +47,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{AA9494D5-6DB EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{4F17E201-98A0-44A6-8B34-BF3A4B5B5EA8}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{71027792-71B9-4E55-BCF3-88B01F6957CB}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{757768C3-A60E-433B-A657-00BABF61A537}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{4A293856-6920-4843-AC64-8296E7B7389C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{89602401-88D0-4FE4-B2EF-257C5C536791}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -103,6 +121,26 @@ Global {7176D984-0BB0-4266-8D51-28562F5EFA02}.Debug|Any CPU.Build.0 = Debug|Any CPU {7176D984-0BB0-4266-8D51-28562F5EFA02}.Release|Any CPU.ActiveCfg = Release|Any CPU {7176D984-0BB0-4266-8D51-28562F5EFA02}.Release|Any CPU.Build.0 = Release|Any CPU + {8662AAE6-3C70-42C7-9FD0-AB204DFD6B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8662AAE6-3C70-42C7-9FD0-AB204DFD6B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8662AAE6-3C70-42C7-9FD0-AB204DFD6B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8662AAE6-3C70-42C7-9FD0-AB204DFD6B9C}.Release|Any CPU.Build.0 = Release|Any CPU + {DA30D375-A8AB-41D1-9936-D48A3F0D0B48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DA30D375-A8AB-41D1-9936-D48A3F0D0B48}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DA30D375-A8AB-41D1-9936-D48A3F0D0B48}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DA30D375-A8AB-41D1-9936-D48A3F0D0B48}.Release|Any CPU.Build.0 = Release|Any CPU + {36F25033-47B0-42CC-9AD3-90371FEFB061}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {36F25033-47B0-42CC-9AD3-90371FEFB061}.Debug|Any CPU.Build.0 = Debug|Any CPU + {36F25033-47B0-42CC-9AD3-90371FEFB061}.Release|Any CPU.ActiveCfg = Release|Any CPU + {36F25033-47B0-42CC-9AD3-90371FEFB061}.Release|Any CPU.Build.0 = Release|Any CPU + {EE899E4A-F073-4E7E-B6F8-FE96696234BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EE899E4A-F073-4E7E-B6F8-FE96696234BE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EE899E4A-F073-4E7E-B6F8-FE96696234BE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EE899E4A-F073-4E7E-B6F8-FE96696234BE}.Release|Any CPU.Build.0 = Release|Any CPU + {8611AAFC-7370-48DA-AC22-3D0766B6B1FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8611AAFC-7370-48DA-AC22-3D0766B6B1FF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8611AAFC-7370-48DA-AC22-3D0766B6B1FF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8611AAFC-7370-48DA-AC22-3D0766B6B1FF}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -123,6 +161,14 @@ Global {9CA3FA95-F36D-457B-BA7C-5D1F94A4C7B9} = {4F17E201-98A0-44A6-8B34-BF3A4B5B5EA8} {FA37050B-F735-43A3-A1AF-94BC06D88E1A} = {4F17E201-98A0-44A6-8B34-BF3A4B5B5EA8} {1E5E7A69-E4B6-44ED-BABB-327C2F32830B} = {4F17E201-98A0-44A6-8B34-BF3A4B5B5EA8} + {8662AAE6-3C70-42C7-9FD0-AB204DFD6B9C} = {71027792-71B9-4E55-BCF3-88B01F6957CB} + {DA30D375-A8AB-41D1-9936-D48A3F0D0B48} = {71027792-71B9-4E55-BCF3-88B01F6957CB} + {71027792-71B9-4E55-BCF3-88B01F6957CB} = {89602401-88D0-4FE4-B2EF-257C5C536791} + {36F25033-47B0-42CC-9AD3-90371FEFB061} = {757768C3-A60E-433B-A657-00BABF61A537} + {EE899E4A-F073-4E7E-B6F8-FE96696234BE} = {757768C3-A60E-433B-A657-00BABF61A537} + {757768C3-A60E-433B-A657-00BABF61A537} = {89602401-88D0-4FE4-B2EF-257C5C536791} + {8611AAFC-7370-48DA-AC22-3D0766B6B1FF} = {4A293856-6920-4843-AC64-8296E7B7389C} + {4A293856-6920-4843-AC64-8296E7B7389C} = {89602401-88D0-4FE4-B2EF-257C5C536791} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {5551E9B9-3000-4C32-AE97-0C3D30561263} diff --git a/src/libraries/System.Diagnostics.TraceSource/System.Diagnostics.TraceSource.sln b/src/libraries/System.Diagnostics.TraceSource/System.Diagnostics.TraceSource.sln index f0d8c2efe13f5a..a6d348a0919a21 100644 --- a/src/libraries/System.Diagnostics.TraceSource/System.Diagnostics.TraceSource.sln +++ b/src/libraries/System.Diagnostics.TraceSource/System.Diagnostics.TraceSource.sln @@ -3,6 +3,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", ". 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}") = "System.Drawing.Common", "..\shims\stubs\System.Drawing.Common.csproj", "{A4D49082-19F6-4402-AF2B-7C3074C175C0}" +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}" @@ -47,8 +49,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", ". 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}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{4E28CDB1-4EB1-4A66-A074-5BC680E7A898}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{2F5DA438-6CBA-42AA-818A-64C633A56D55}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{A17B970B-41B2-4C78-BA05-2B954357E46A}" @@ -73,14 +73,34 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", 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}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{1F63C04C-C7DE-46AF-8430-36C3EAE5F222}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{DF13E75E-A0FA-4AB2-85DF-A1CFB43B3CDA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{0759C204-5299-4E4E-BE2A-4579073BF610}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{C1639BF7-5C1A-4D34-A3B0-093E7DE09EA6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{A634ABF4-A81F-4FA7-B35D-152B670045BC}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{DFFC308C-63D3-45CC-A904-5AC273DD82C8}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{6BA02609-AE23-4E80-8B4B-9C6548AA147A}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{315BC231-270B-456C-919A-3E9BB50CDD7A}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{1826CD8D-A5E3-4C8E-A49A-E746D9682B87}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{BDABB39C-A9FF-4A9B-8BA2-EF873C5EEB16}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{85C7EB8C-C328-4212-90E1-4B0EAB0ED429}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{0691D988-6FCE-4D84-A632-3A27C42690CD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{3AA3AAFF-B75A-499C-9716-9DC925F4712E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{C4ACB0FD-4BAD-4196-9FA5-1A32B7662955}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -151,6 +171,27 @@ Global {F6BCA6EF-777E-408B-B49B-B055B5A0BA19}.Checked|arm64.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 + {A4D49082-19F6-4402-AF2B-7C3074C175C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4D49082-19F6-4402-AF2B-7C3074C175C0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4D49082-19F6-4402-AF2B-7C3074C175C0}.Debug|arm.ActiveCfg = Debug|Any CPU + {A4D49082-19F6-4402-AF2B-7C3074C175C0}.Debug|arm64.ActiveCfg = Debug|Any CPU + {A4D49082-19F6-4402-AF2B-7C3074C175C0}.Debug|x64.ActiveCfg = Debug|Any CPU + {A4D49082-19F6-4402-AF2B-7C3074C175C0}.Debug|x64.Build.0 = Debug|Any CPU + {A4D49082-19F6-4402-AF2B-7C3074C175C0}.Debug|x86.ActiveCfg = Debug|Any CPU + {A4D49082-19F6-4402-AF2B-7C3074C175C0}.Debug|x86.Build.0 = Debug|Any CPU + {A4D49082-19F6-4402-AF2B-7C3074C175C0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4D49082-19F6-4402-AF2B-7C3074C175C0}.Release|Any CPU.Build.0 = Release|Any CPU + {A4D49082-19F6-4402-AF2B-7C3074C175C0}.Release|arm.ActiveCfg = Release|Any CPU + {A4D49082-19F6-4402-AF2B-7C3074C175C0}.Release|arm64.ActiveCfg = Release|Any CPU + {A4D49082-19F6-4402-AF2B-7C3074C175C0}.Release|x64.ActiveCfg = Release|Any CPU + {A4D49082-19F6-4402-AF2B-7C3074C175C0}.Release|x64.Build.0 = Release|Any CPU + {A4D49082-19F6-4402-AF2B-7C3074C175C0}.Release|x86.ActiveCfg = Release|Any CPU + {A4D49082-19F6-4402-AF2B-7C3074C175C0}.Release|x86.Build.0 = Release|Any CPU + {A4D49082-19F6-4402-AF2B-7C3074C175C0}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {A4D49082-19F6-4402-AF2B-7C3074C175C0}.Checked|arm.ActiveCfg = Debug|Any CPU + {A4D49082-19F6-4402-AF2B-7C3074C175C0}.Checked|arm64.ActiveCfg = Debug|Any CPU + {A4D49082-19F6-4402-AF2B-7C3074C175C0}.Checked|x64.ActiveCfg = Debug|Any CPU + {A4D49082-19F6-4402-AF2B-7C3074C175C0}.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|arm.ActiveCfg = Debug|Any CPU @@ -613,27 +654,6 @@ Global {4DAA5CFC-C59D-4C1B-A12A-BC9863F38C0C}.Checked|arm64.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 - {4E28CDB1-4EB1-4A66-A074-5BC680E7A898}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4E28CDB1-4EB1-4A66-A074-5BC680E7A898}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4E28CDB1-4EB1-4A66-A074-5BC680E7A898}.Debug|arm.ActiveCfg = Debug|Any CPU - {4E28CDB1-4EB1-4A66-A074-5BC680E7A898}.Debug|arm64.ActiveCfg = Debug|Any CPU - {4E28CDB1-4EB1-4A66-A074-5BC680E7A898}.Debug|x64.ActiveCfg = Debug|Any CPU - {4E28CDB1-4EB1-4A66-A074-5BC680E7A898}.Debug|x64.Build.0 = Debug|Any CPU - {4E28CDB1-4EB1-4A66-A074-5BC680E7A898}.Debug|x86.ActiveCfg = Debug|Any CPU - {4E28CDB1-4EB1-4A66-A074-5BC680E7A898}.Debug|x86.Build.0 = Debug|Any CPU - {4E28CDB1-4EB1-4A66-A074-5BC680E7A898}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4E28CDB1-4EB1-4A66-A074-5BC680E7A898}.Release|Any CPU.Build.0 = Release|Any CPU - {4E28CDB1-4EB1-4A66-A074-5BC680E7A898}.Release|arm.ActiveCfg = Release|Any CPU - {4E28CDB1-4EB1-4A66-A074-5BC680E7A898}.Release|arm64.ActiveCfg = Release|Any CPU - {4E28CDB1-4EB1-4A66-A074-5BC680E7A898}.Release|x64.ActiveCfg = Release|Any CPU - {4E28CDB1-4EB1-4A66-A074-5BC680E7A898}.Release|x64.Build.0 = Release|Any CPU - {4E28CDB1-4EB1-4A66-A074-5BC680E7A898}.Release|x86.ActiveCfg = Release|Any CPU - {4E28CDB1-4EB1-4A66-A074-5BC680E7A898}.Release|x86.Build.0 = Release|Any CPU - {4E28CDB1-4EB1-4A66-A074-5BC680E7A898}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {4E28CDB1-4EB1-4A66-A074-5BC680E7A898}.Checked|arm.ActiveCfg = Debug|Any CPU - {4E28CDB1-4EB1-4A66-A074-5BC680E7A898}.Checked|arm64.ActiveCfg = Debug|Any CPU - {4E28CDB1-4EB1-4A66-A074-5BC680E7A898}.Checked|x64.ActiveCfg = Debug|Any CPU - {4E28CDB1-4EB1-4A66-A074-5BC680E7A898}.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|arm.ActiveCfg = Debug|Any CPU @@ -886,12 +906,121 @@ Global {7492A8FA-F70F-4B7F-8514-8C9B7BE6D4CA}.Checked|arm64.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 + {1F63C04C-C7DE-46AF-8430-36C3EAE5F222}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F63C04C-C7DE-46AF-8430-36C3EAE5F222}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F63C04C-C7DE-46AF-8430-36C3EAE5F222}.Debug|arm.ActiveCfg = Debug|Any CPU + {1F63C04C-C7DE-46AF-8430-36C3EAE5F222}.Debug|arm64.ActiveCfg = Debug|Any CPU + {1F63C04C-C7DE-46AF-8430-36C3EAE5F222}.Debug|x64.ActiveCfg = Debug|Any CPU + {1F63C04C-C7DE-46AF-8430-36C3EAE5F222}.Debug|x64.Build.0 = Debug|Any CPU + {1F63C04C-C7DE-46AF-8430-36C3EAE5F222}.Debug|x86.ActiveCfg = Debug|Any CPU + {1F63C04C-C7DE-46AF-8430-36C3EAE5F222}.Debug|x86.Build.0 = Debug|Any CPU + {1F63C04C-C7DE-46AF-8430-36C3EAE5F222}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F63C04C-C7DE-46AF-8430-36C3EAE5F222}.Release|Any CPU.Build.0 = Release|Any CPU + {1F63C04C-C7DE-46AF-8430-36C3EAE5F222}.Release|arm.ActiveCfg = Release|Any CPU + {1F63C04C-C7DE-46AF-8430-36C3EAE5F222}.Release|arm64.ActiveCfg = Release|Any CPU + {1F63C04C-C7DE-46AF-8430-36C3EAE5F222}.Release|x64.ActiveCfg = Release|Any CPU + {1F63C04C-C7DE-46AF-8430-36C3EAE5F222}.Release|x64.Build.0 = Release|Any CPU + {1F63C04C-C7DE-46AF-8430-36C3EAE5F222}.Release|x86.ActiveCfg = Release|Any CPU + {1F63C04C-C7DE-46AF-8430-36C3EAE5F222}.Release|x86.Build.0 = Release|Any CPU + {1F63C04C-C7DE-46AF-8430-36C3EAE5F222}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {1F63C04C-C7DE-46AF-8430-36C3EAE5F222}.Checked|arm.ActiveCfg = Debug|Any CPU + {1F63C04C-C7DE-46AF-8430-36C3EAE5F222}.Checked|arm64.ActiveCfg = Debug|Any CPU + {1F63C04C-C7DE-46AF-8430-36C3EAE5F222}.Checked|x64.ActiveCfg = Debug|Any CPU + {1F63C04C-C7DE-46AF-8430-36C3EAE5F222}.Checked|x86.ActiveCfg = Debug|Any CPU + {DF13E75E-A0FA-4AB2-85DF-A1CFB43B3CDA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DF13E75E-A0FA-4AB2-85DF-A1CFB43B3CDA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DF13E75E-A0FA-4AB2-85DF-A1CFB43B3CDA}.Debug|arm.ActiveCfg = Debug|Any CPU + {DF13E75E-A0FA-4AB2-85DF-A1CFB43B3CDA}.Debug|arm64.ActiveCfg = Debug|Any CPU + {DF13E75E-A0FA-4AB2-85DF-A1CFB43B3CDA}.Debug|x64.ActiveCfg = Debug|Any CPU + {DF13E75E-A0FA-4AB2-85DF-A1CFB43B3CDA}.Debug|x64.Build.0 = Debug|Any CPU + {DF13E75E-A0FA-4AB2-85DF-A1CFB43B3CDA}.Debug|x86.ActiveCfg = Debug|Any CPU + {DF13E75E-A0FA-4AB2-85DF-A1CFB43B3CDA}.Debug|x86.Build.0 = Debug|Any CPU + {DF13E75E-A0FA-4AB2-85DF-A1CFB43B3CDA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DF13E75E-A0FA-4AB2-85DF-A1CFB43B3CDA}.Release|Any CPU.Build.0 = Release|Any CPU + {DF13E75E-A0FA-4AB2-85DF-A1CFB43B3CDA}.Release|arm.ActiveCfg = Release|Any CPU + {DF13E75E-A0FA-4AB2-85DF-A1CFB43B3CDA}.Release|arm64.ActiveCfg = Release|Any CPU + {DF13E75E-A0FA-4AB2-85DF-A1CFB43B3CDA}.Release|x64.ActiveCfg = Release|Any CPU + {DF13E75E-A0FA-4AB2-85DF-A1CFB43B3CDA}.Release|x64.Build.0 = Release|Any CPU + {DF13E75E-A0FA-4AB2-85DF-A1CFB43B3CDA}.Release|x86.ActiveCfg = Release|Any CPU + {DF13E75E-A0FA-4AB2-85DF-A1CFB43B3CDA}.Release|x86.Build.0 = Release|Any CPU + {DF13E75E-A0FA-4AB2-85DF-A1CFB43B3CDA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {DF13E75E-A0FA-4AB2-85DF-A1CFB43B3CDA}.Checked|arm.ActiveCfg = Debug|Any CPU + {DF13E75E-A0FA-4AB2-85DF-A1CFB43B3CDA}.Checked|arm64.ActiveCfg = Debug|Any CPU + {DF13E75E-A0FA-4AB2-85DF-A1CFB43B3CDA}.Checked|x64.ActiveCfg = Debug|Any CPU + {DF13E75E-A0FA-4AB2-85DF-A1CFB43B3CDA}.Checked|x86.ActiveCfg = Debug|Any CPU + {0759C204-5299-4E4E-BE2A-4579073BF610}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0759C204-5299-4E4E-BE2A-4579073BF610}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0759C204-5299-4E4E-BE2A-4579073BF610}.Debug|arm.ActiveCfg = Debug|Any CPU + {0759C204-5299-4E4E-BE2A-4579073BF610}.Debug|arm64.ActiveCfg = Debug|Any CPU + {0759C204-5299-4E4E-BE2A-4579073BF610}.Debug|x64.ActiveCfg = Debug|Any CPU + {0759C204-5299-4E4E-BE2A-4579073BF610}.Debug|x64.Build.0 = Debug|Any CPU + {0759C204-5299-4E4E-BE2A-4579073BF610}.Debug|x86.ActiveCfg = Debug|Any CPU + {0759C204-5299-4E4E-BE2A-4579073BF610}.Debug|x86.Build.0 = Debug|Any CPU + {0759C204-5299-4E4E-BE2A-4579073BF610}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0759C204-5299-4E4E-BE2A-4579073BF610}.Release|Any CPU.Build.0 = Release|Any CPU + {0759C204-5299-4E4E-BE2A-4579073BF610}.Release|arm.ActiveCfg = Release|Any CPU + {0759C204-5299-4E4E-BE2A-4579073BF610}.Release|arm64.ActiveCfg = Release|Any CPU + {0759C204-5299-4E4E-BE2A-4579073BF610}.Release|x64.ActiveCfg = Release|Any CPU + {0759C204-5299-4E4E-BE2A-4579073BF610}.Release|x64.Build.0 = Release|Any CPU + {0759C204-5299-4E4E-BE2A-4579073BF610}.Release|x86.ActiveCfg = Release|Any CPU + {0759C204-5299-4E4E-BE2A-4579073BF610}.Release|x86.Build.0 = Release|Any CPU + {0759C204-5299-4E4E-BE2A-4579073BF610}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {0759C204-5299-4E4E-BE2A-4579073BF610}.Checked|arm.ActiveCfg = Debug|Any CPU + {0759C204-5299-4E4E-BE2A-4579073BF610}.Checked|arm64.ActiveCfg = Debug|Any CPU + {0759C204-5299-4E4E-BE2A-4579073BF610}.Checked|x64.ActiveCfg = Debug|Any CPU + {0759C204-5299-4E4E-BE2A-4579073BF610}.Checked|x86.ActiveCfg = Debug|Any CPU + {C1639BF7-5C1A-4D34-A3B0-093E7DE09EA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C1639BF7-5C1A-4D34-A3B0-093E7DE09EA6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C1639BF7-5C1A-4D34-A3B0-093E7DE09EA6}.Debug|arm.ActiveCfg = Debug|Any CPU + {C1639BF7-5C1A-4D34-A3B0-093E7DE09EA6}.Debug|arm64.ActiveCfg = Debug|Any CPU + {C1639BF7-5C1A-4D34-A3B0-093E7DE09EA6}.Debug|x64.ActiveCfg = Debug|Any CPU + {C1639BF7-5C1A-4D34-A3B0-093E7DE09EA6}.Debug|x64.Build.0 = Debug|Any CPU + {C1639BF7-5C1A-4D34-A3B0-093E7DE09EA6}.Debug|x86.ActiveCfg = Debug|Any CPU + {C1639BF7-5C1A-4D34-A3B0-093E7DE09EA6}.Debug|x86.Build.0 = Debug|Any CPU + {C1639BF7-5C1A-4D34-A3B0-093E7DE09EA6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C1639BF7-5C1A-4D34-A3B0-093E7DE09EA6}.Release|Any CPU.Build.0 = Release|Any CPU + {C1639BF7-5C1A-4D34-A3B0-093E7DE09EA6}.Release|arm.ActiveCfg = Release|Any CPU + {C1639BF7-5C1A-4D34-A3B0-093E7DE09EA6}.Release|arm64.ActiveCfg = Release|Any CPU + {C1639BF7-5C1A-4D34-A3B0-093E7DE09EA6}.Release|x64.ActiveCfg = Release|Any CPU + {C1639BF7-5C1A-4D34-A3B0-093E7DE09EA6}.Release|x64.Build.0 = Release|Any CPU + {C1639BF7-5C1A-4D34-A3B0-093E7DE09EA6}.Release|x86.ActiveCfg = Release|Any CPU + {C1639BF7-5C1A-4D34-A3B0-093E7DE09EA6}.Release|x86.Build.0 = Release|Any CPU + {C1639BF7-5C1A-4D34-A3B0-093E7DE09EA6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {C1639BF7-5C1A-4D34-A3B0-093E7DE09EA6}.Checked|arm.ActiveCfg = Debug|Any CPU + {C1639BF7-5C1A-4D34-A3B0-093E7DE09EA6}.Checked|arm64.ActiveCfg = Debug|Any CPU + {C1639BF7-5C1A-4D34-A3B0-093E7DE09EA6}.Checked|x64.ActiveCfg = Debug|Any CPU + {C1639BF7-5C1A-4D34-A3B0-093E7DE09EA6}.Checked|x86.ActiveCfg = Debug|Any CPU + {A634ABF4-A81F-4FA7-B35D-152B670045BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A634ABF4-A81F-4FA7-B35D-152B670045BC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A634ABF4-A81F-4FA7-B35D-152B670045BC}.Debug|arm.ActiveCfg = Debug|Any CPU + {A634ABF4-A81F-4FA7-B35D-152B670045BC}.Debug|arm64.ActiveCfg = Debug|Any CPU + {A634ABF4-A81F-4FA7-B35D-152B670045BC}.Debug|x64.ActiveCfg = Debug|Any CPU + {A634ABF4-A81F-4FA7-B35D-152B670045BC}.Debug|x64.Build.0 = Debug|Any CPU + {A634ABF4-A81F-4FA7-B35D-152B670045BC}.Debug|x86.ActiveCfg = Debug|Any CPU + {A634ABF4-A81F-4FA7-B35D-152B670045BC}.Debug|x86.Build.0 = Debug|Any CPU + {A634ABF4-A81F-4FA7-B35D-152B670045BC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A634ABF4-A81F-4FA7-B35D-152B670045BC}.Release|Any CPU.Build.0 = Release|Any CPU + {A634ABF4-A81F-4FA7-B35D-152B670045BC}.Release|arm.ActiveCfg = Release|Any CPU + {A634ABF4-A81F-4FA7-B35D-152B670045BC}.Release|arm64.ActiveCfg = Release|Any CPU + {A634ABF4-A81F-4FA7-B35D-152B670045BC}.Release|x64.ActiveCfg = Release|Any CPU + {A634ABF4-A81F-4FA7-B35D-152B670045BC}.Release|x64.Build.0 = Release|Any CPU + {A634ABF4-A81F-4FA7-B35D-152B670045BC}.Release|x86.ActiveCfg = Release|Any CPU + {A634ABF4-A81F-4FA7-B35D-152B670045BC}.Release|x86.Build.0 = Release|Any CPU + {A634ABF4-A81F-4FA7-B35D-152B670045BC}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {A634ABF4-A81F-4FA7-B35D-152B670045BC}.Checked|arm.ActiveCfg = Debug|Any CPU + {A634ABF4-A81F-4FA7-B35D-152B670045BC}.Checked|arm64.ActiveCfg = Debug|Any CPU + {A634ABF4-A81F-4FA7-B35D-152B670045BC}.Checked|x64.ActiveCfg = Debug|Any CPU + {A634ABF4-A81F-4FA7-B35D-152B670045BC}.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} + {89B01AF7-F0CE-4168-8C4A-33FCDCF33B73} = {DFFC308C-63D3-45CC-A904-5AC273DD82C8} + {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} + {A4D49082-19F6-4402-AF2B-7C3074C175C0} = {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} @@ -906,9 +1035,6 @@ Global {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} {A26E9B9C-AFE7-4740-AC73-626D9823E515} = {1826CD8D-A5E3-4C8E-A49A-E746D9682B87} {51AEBD0E-0A93-4532-A010-CAAF8E320D6C} = {1826CD8D-A5E3-4C8E-A49A-E746D9682B87} {279066F9-4DB9-4897-8CE4-66BC31118323} = {1826CD8D-A5E3-4C8E-A49A-E746D9682B87} @@ -925,9 +1051,16 @@ Global {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} - {4E28CDB1-4EB1-4A66-A074-5BC680E7A898} = {BDABB39C-A9FF-4A9B-8BA2-EF873C5EEB16} {2F5DA438-6CBA-42AA-818A-64C633A56D55} = {BDABB39C-A9FF-4A9B-8BA2-EF873C5EEB16} {A17B970B-41B2-4C78-BA05-2B954357E46A} = {BDABB39C-A9FF-4A9B-8BA2-EF873C5EEB16} + {1F63C04C-C7DE-46AF-8430-36C3EAE5F222} = {85C7EB8C-C328-4212-90E1-4B0EAB0ED429} + {DF13E75E-A0FA-4AB2-85DF-A1CFB43B3CDA} = {85C7EB8C-C328-4212-90E1-4B0EAB0ED429} + {85C7EB8C-C328-4212-90E1-4B0EAB0ED429} = {C4ACB0FD-4BAD-4196-9FA5-1A32B7662955} + {0759C204-5299-4E4E-BE2A-4579073BF610} = {0691D988-6FCE-4D84-A632-3A27C42690CD} + {C1639BF7-5C1A-4D34-A3B0-093E7DE09EA6} = {0691D988-6FCE-4D84-A632-3A27C42690CD} + {0691D988-6FCE-4D84-A632-3A27C42690CD} = {C4ACB0FD-4BAD-4196-9FA5-1A32B7662955} + {A634ABF4-A81F-4FA7-B35D-152B670045BC} = {3AA3AAFF-B75A-499C-9716-9DC925F4712E} + {3AA3AAFF-B75A-499C-9716-9DC925F4712E} = {C4ACB0FD-4BAD-4196-9FA5-1A32B7662955} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {52B54BB6-271E-45BD-A7A4-D4CEDC973704} diff --git a/src/libraries/System.Diagnostics.Tracing/System.Diagnostics.Tracing.sln b/src/libraries/System.Diagnostics.Tracing/System.Diagnostics.Tracing.sln index d24c074486efd4..e7145687e3a110 100644 --- a/src/libraries/System.Diagnostics.Tracing/System.Diagnostics.Tracing.sln +++ b/src/libraries/System.Diagnostics.Tracing/System.Diagnostics.Tracing.sln @@ -19,14 +19,34 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{58E24DB7-4207-49F8-BC73-A665A2A961A6}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{269A342C-D693-495C-8A07-11E08C881F6B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{F0C042E4-53F3-4661-93DA-D9223C2A650B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{23BBB442-219F-4032-A2E6-B8924F5DBB53}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{2A358873-B1A4-4FA5-B78C-4143813B1198}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{D0B0634C-A5CB-44CC-9C73-C2A402115C76}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{4902CFA5-3299-42C3-8171-7E809C83CAEC}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{004D5B4C-87B3-4499-9638-1B317B762BEF}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{21E11D21-3706-49C7-ACA7-10BA9A021908}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{61AC03AE-7090-458C-A3AB-5A4CCFF6AD08}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{269A342C-D693-495C-8A07-11E08C881F6B}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{F2FD3769-35C6-481A-AF35-9BDDEE550B54}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{E44548BC-2CFB-47A3-B98A-1D5754ADCFA7}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{B942EA94-8688-414B-A68F-5CEAE6C6F627}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{966D1480-601D-4A4A-8038-DA0C6BDF67EA}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{05ABD50D-0E79-49C9-B6CB-0FEDCADA9085}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -265,21 +285,134 @@ Global {58E24DB7-4207-49F8-BC73-A665A2A961A6}.Checked|arm64.ActiveCfg = Debug|Any CPU {58E24DB7-4207-49F8-BC73-A665A2A961A6}.Checked|x64.ActiveCfg = Debug|Any CPU {58E24DB7-4207-49F8-BC73-A665A2A961A6}.Checked|x86.ActiveCfg = Debug|Any CPU + {F0C042E4-53F3-4661-93DA-D9223C2A650B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F0C042E4-53F3-4661-93DA-D9223C2A650B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F0C042E4-53F3-4661-93DA-D9223C2A650B}.Debug|arm.ActiveCfg = Debug|Any CPU + {F0C042E4-53F3-4661-93DA-D9223C2A650B}.Debug|arm64.ActiveCfg = Debug|Any CPU + {F0C042E4-53F3-4661-93DA-D9223C2A650B}.Debug|x64.ActiveCfg = Debug|Any CPU + {F0C042E4-53F3-4661-93DA-D9223C2A650B}.Debug|x64.Build.0 = Debug|Any CPU + {F0C042E4-53F3-4661-93DA-D9223C2A650B}.Debug|x86.ActiveCfg = Debug|Any CPU + {F0C042E4-53F3-4661-93DA-D9223C2A650B}.Debug|x86.Build.0 = Debug|Any CPU + {F0C042E4-53F3-4661-93DA-D9223C2A650B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F0C042E4-53F3-4661-93DA-D9223C2A650B}.Release|Any CPU.Build.0 = Release|Any CPU + {F0C042E4-53F3-4661-93DA-D9223C2A650B}.Release|arm.ActiveCfg = Release|Any CPU + {F0C042E4-53F3-4661-93DA-D9223C2A650B}.Release|arm64.ActiveCfg = Release|Any CPU + {F0C042E4-53F3-4661-93DA-D9223C2A650B}.Release|x64.ActiveCfg = Release|Any CPU + {F0C042E4-53F3-4661-93DA-D9223C2A650B}.Release|x64.Build.0 = Release|Any CPU + {F0C042E4-53F3-4661-93DA-D9223C2A650B}.Release|x86.ActiveCfg = Release|Any CPU + {F0C042E4-53F3-4661-93DA-D9223C2A650B}.Release|x86.Build.0 = Release|Any CPU + {F0C042E4-53F3-4661-93DA-D9223C2A650B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {F0C042E4-53F3-4661-93DA-D9223C2A650B}.Checked|arm.ActiveCfg = Debug|Any CPU + {F0C042E4-53F3-4661-93DA-D9223C2A650B}.Checked|arm64.ActiveCfg = Debug|Any CPU + {F0C042E4-53F3-4661-93DA-D9223C2A650B}.Checked|x64.ActiveCfg = Debug|Any CPU + {F0C042E4-53F3-4661-93DA-D9223C2A650B}.Checked|x86.ActiveCfg = Debug|Any CPU + {23BBB442-219F-4032-A2E6-B8924F5DBB53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {23BBB442-219F-4032-A2E6-B8924F5DBB53}.Debug|Any CPU.Build.0 = Debug|Any CPU + {23BBB442-219F-4032-A2E6-B8924F5DBB53}.Debug|arm.ActiveCfg = Debug|Any CPU + {23BBB442-219F-4032-A2E6-B8924F5DBB53}.Debug|arm64.ActiveCfg = Debug|Any CPU + {23BBB442-219F-4032-A2E6-B8924F5DBB53}.Debug|x64.ActiveCfg = Debug|Any CPU + {23BBB442-219F-4032-A2E6-B8924F5DBB53}.Debug|x64.Build.0 = Debug|Any CPU + {23BBB442-219F-4032-A2E6-B8924F5DBB53}.Debug|x86.ActiveCfg = Debug|Any CPU + {23BBB442-219F-4032-A2E6-B8924F5DBB53}.Debug|x86.Build.0 = Debug|Any CPU + {23BBB442-219F-4032-A2E6-B8924F5DBB53}.Release|Any CPU.ActiveCfg = Release|Any CPU + {23BBB442-219F-4032-A2E6-B8924F5DBB53}.Release|Any CPU.Build.0 = Release|Any CPU + {23BBB442-219F-4032-A2E6-B8924F5DBB53}.Release|arm.ActiveCfg = Release|Any CPU + {23BBB442-219F-4032-A2E6-B8924F5DBB53}.Release|arm64.ActiveCfg = Release|Any CPU + {23BBB442-219F-4032-A2E6-B8924F5DBB53}.Release|x64.ActiveCfg = Release|Any CPU + {23BBB442-219F-4032-A2E6-B8924F5DBB53}.Release|x64.Build.0 = Release|Any CPU + {23BBB442-219F-4032-A2E6-B8924F5DBB53}.Release|x86.ActiveCfg = Release|Any CPU + {23BBB442-219F-4032-A2E6-B8924F5DBB53}.Release|x86.Build.0 = Release|Any CPU + {23BBB442-219F-4032-A2E6-B8924F5DBB53}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {23BBB442-219F-4032-A2E6-B8924F5DBB53}.Checked|arm.ActiveCfg = Debug|Any CPU + {23BBB442-219F-4032-A2E6-B8924F5DBB53}.Checked|arm64.ActiveCfg = Debug|Any CPU + {23BBB442-219F-4032-A2E6-B8924F5DBB53}.Checked|x64.ActiveCfg = Debug|Any CPU + {23BBB442-219F-4032-A2E6-B8924F5DBB53}.Checked|x86.ActiveCfg = Debug|Any CPU + {2A358873-B1A4-4FA5-B78C-4143813B1198}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2A358873-B1A4-4FA5-B78C-4143813B1198}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2A358873-B1A4-4FA5-B78C-4143813B1198}.Debug|arm.ActiveCfg = Debug|Any CPU + {2A358873-B1A4-4FA5-B78C-4143813B1198}.Debug|arm64.ActiveCfg = Debug|Any CPU + {2A358873-B1A4-4FA5-B78C-4143813B1198}.Debug|x64.ActiveCfg = Debug|Any CPU + {2A358873-B1A4-4FA5-B78C-4143813B1198}.Debug|x64.Build.0 = Debug|Any CPU + {2A358873-B1A4-4FA5-B78C-4143813B1198}.Debug|x86.ActiveCfg = Debug|Any CPU + {2A358873-B1A4-4FA5-B78C-4143813B1198}.Debug|x86.Build.0 = Debug|Any CPU + {2A358873-B1A4-4FA5-B78C-4143813B1198}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2A358873-B1A4-4FA5-B78C-4143813B1198}.Release|Any CPU.Build.0 = Release|Any CPU + {2A358873-B1A4-4FA5-B78C-4143813B1198}.Release|arm.ActiveCfg = Release|Any CPU + {2A358873-B1A4-4FA5-B78C-4143813B1198}.Release|arm64.ActiveCfg = Release|Any CPU + {2A358873-B1A4-4FA5-B78C-4143813B1198}.Release|x64.ActiveCfg = Release|Any CPU + {2A358873-B1A4-4FA5-B78C-4143813B1198}.Release|x64.Build.0 = Release|Any CPU + {2A358873-B1A4-4FA5-B78C-4143813B1198}.Release|x86.ActiveCfg = Release|Any CPU + {2A358873-B1A4-4FA5-B78C-4143813B1198}.Release|x86.Build.0 = Release|Any CPU + {2A358873-B1A4-4FA5-B78C-4143813B1198}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {2A358873-B1A4-4FA5-B78C-4143813B1198}.Checked|arm.ActiveCfg = Debug|Any CPU + {2A358873-B1A4-4FA5-B78C-4143813B1198}.Checked|arm64.ActiveCfg = Debug|Any CPU + {2A358873-B1A4-4FA5-B78C-4143813B1198}.Checked|x64.ActiveCfg = Debug|Any CPU + {2A358873-B1A4-4FA5-B78C-4143813B1198}.Checked|x86.ActiveCfg = Debug|Any CPU + {D0B0634C-A5CB-44CC-9C73-C2A402115C76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D0B0634C-A5CB-44CC-9C73-C2A402115C76}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D0B0634C-A5CB-44CC-9C73-C2A402115C76}.Debug|arm.ActiveCfg = Debug|Any CPU + {D0B0634C-A5CB-44CC-9C73-C2A402115C76}.Debug|arm64.ActiveCfg = Debug|Any CPU + {D0B0634C-A5CB-44CC-9C73-C2A402115C76}.Debug|x64.ActiveCfg = Debug|Any CPU + {D0B0634C-A5CB-44CC-9C73-C2A402115C76}.Debug|x64.Build.0 = Debug|Any CPU + {D0B0634C-A5CB-44CC-9C73-C2A402115C76}.Debug|x86.ActiveCfg = Debug|Any CPU + {D0B0634C-A5CB-44CC-9C73-C2A402115C76}.Debug|x86.Build.0 = Debug|Any CPU + {D0B0634C-A5CB-44CC-9C73-C2A402115C76}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D0B0634C-A5CB-44CC-9C73-C2A402115C76}.Release|Any CPU.Build.0 = Release|Any CPU + {D0B0634C-A5CB-44CC-9C73-C2A402115C76}.Release|arm.ActiveCfg = Release|Any CPU + {D0B0634C-A5CB-44CC-9C73-C2A402115C76}.Release|arm64.ActiveCfg = Release|Any CPU + {D0B0634C-A5CB-44CC-9C73-C2A402115C76}.Release|x64.ActiveCfg = Release|Any CPU + {D0B0634C-A5CB-44CC-9C73-C2A402115C76}.Release|x64.Build.0 = Release|Any CPU + {D0B0634C-A5CB-44CC-9C73-C2A402115C76}.Release|x86.ActiveCfg = Release|Any CPU + {D0B0634C-A5CB-44CC-9C73-C2A402115C76}.Release|x86.Build.0 = Release|Any CPU + {D0B0634C-A5CB-44CC-9C73-C2A402115C76}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {D0B0634C-A5CB-44CC-9C73-C2A402115C76}.Checked|arm.ActiveCfg = Debug|Any CPU + {D0B0634C-A5CB-44CC-9C73-C2A402115C76}.Checked|arm64.ActiveCfg = Debug|Any CPU + {D0B0634C-A5CB-44CC-9C73-C2A402115C76}.Checked|x64.ActiveCfg = Debug|Any CPU + {D0B0634C-A5CB-44CC-9C73-C2A402115C76}.Checked|x86.ActiveCfg = Debug|Any CPU + {4902CFA5-3299-42C3-8171-7E809C83CAEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4902CFA5-3299-42C3-8171-7E809C83CAEC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4902CFA5-3299-42C3-8171-7E809C83CAEC}.Debug|arm.ActiveCfg = Debug|Any CPU + {4902CFA5-3299-42C3-8171-7E809C83CAEC}.Debug|arm64.ActiveCfg = Debug|Any CPU + {4902CFA5-3299-42C3-8171-7E809C83CAEC}.Debug|x64.ActiveCfg = Debug|Any CPU + {4902CFA5-3299-42C3-8171-7E809C83CAEC}.Debug|x64.Build.0 = Debug|Any CPU + {4902CFA5-3299-42C3-8171-7E809C83CAEC}.Debug|x86.ActiveCfg = Debug|Any CPU + {4902CFA5-3299-42C3-8171-7E809C83CAEC}.Debug|x86.Build.0 = Debug|Any CPU + {4902CFA5-3299-42C3-8171-7E809C83CAEC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4902CFA5-3299-42C3-8171-7E809C83CAEC}.Release|Any CPU.Build.0 = Release|Any CPU + {4902CFA5-3299-42C3-8171-7E809C83CAEC}.Release|arm.ActiveCfg = Release|Any CPU + {4902CFA5-3299-42C3-8171-7E809C83CAEC}.Release|arm64.ActiveCfg = Release|Any CPU + {4902CFA5-3299-42C3-8171-7E809C83CAEC}.Release|x64.ActiveCfg = Release|Any CPU + {4902CFA5-3299-42C3-8171-7E809C83CAEC}.Release|x64.Build.0 = Release|Any CPU + {4902CFA5-3299-42C3-8171-7E809C83CAEC}.Release|x86.ActiveCfg = Release|Any CPU + {4902CFA5-3299-42C3-8171-7E809C83CAEC}.Release|x86.Build.0 = Release|Any CPU + {4902CFA5-3299-42C3-8171-7E809C83CAEC}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {4902CFA5-3299-42C3-8171-7E809C83CAEC}.Checked|arm.ActiveCfg = Debug|Any CPU + {4902CFA5-3299-42C3-8171-7E809C83CAEC}.Checked|arm64.ActiveCfg = Debug|Any CPU + {4902CFA5-3299-42C3-8171-7E809C83CAEC}.Checked|x64.ActiveCfg = Debug|Any CPU + {4902CFA5-3299-42C3-8171-7E809C83CAEC}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {370DCE61-CBDF-466E-91DB-5AE622BF2E52} = {269A342C-D693-495C-8A07-11E08C881F6B} - {63783D6D-0848-4303-8E7A-BBB7F65DCE9E} = {269A342C-D693-495C-8A07-11E08C881F6B} + {370DCE61-CBDF-466E-91DB-5AE622BF2E52} = {004D5B4C-87B3-4499-9638-1B317B762BEF} {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} + {63783D6D-0848-4303-8E7A-BBB7F65DCE9E} = {269A342C-D693-495C-8A07-11E08C881F6B} {3969DA9E-6C7D-421D-ABCC-BD02DFA36DA4} = {F2FD3769-35C6-481A-AF35-9BDDEE550B54} {7D67652E-7840-42AF-A830-F9A336AD8CBE} = {F2FD3769-35C6-481A-AF35-9BDDEE550B54} {38416350-0E7B-4201-8B7E-3FA80FCFA81A} = {F2FD3769-35C6-481A-AF35-9BDDEE550B54} + {F0C042E4-53F3-4661-93DA-D9223C2A650B} = {E44548BC-2CFB-47A3-B98A-1D5754ADCFA7} + {23BBB442-219F-4032-A2E6-B8924F5DBB53} = {E44548BC-2CFB-47A3-B98A-1D5754ADCFA7} + {E44548BC-2CFB-47A3-B98A-1D5754ADCFA7} = {05ABD50D-0E79-49C9-B6CB-0FEDCADA9085} + {2A358873-B1A4-4FA5-B78C-4143813B1198} = {B942EA94-8688-414B-A68F-5CEAE6C6F627} + {D0B0634C-A5CB-44CC-9C73-C2A402115C76} = {B942EA94-8688-414B-A68F-5CEAE6C6F627} + {B942EA94-8688-414B-A68F-5CEAE6C6F627} = {05ABD50D-0E79-49C9-B6CB-0FEDCADA9085} + {4902CFA5-3299-42C3-8171-7E809C83CAEC} = {966D1480-601D-4A4A-8038-DA0C6BDF67EA} + {966D1480-601D-4A4A-8038-DA0C6BDF67EA} = {05ABD50D-0E79-49C9-B6CB-0FEDCADA9085} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {5AB76D2F-E758-4FA1-83E4-E5645849CC34} diff --git a/src/libraries/System.DirectoryServices.AccountManagement/System.DirectoryServices.AccountManagement.sln b/src/libraries/System.DirectoryServices.AccountManagement/System.DirectoryServices.AccountManagement.sln index a79b3b8dbbf1c9..da0db7405e86bc 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/System.DirectoryServices.AccountManagement.sln +++ b/src/libraries/System.DirectoryServices.AccountManagement/System.DirectoryServices.AccountManagement.sln @@ -1,6 +1,10 @@ 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", "{3F896EC8-24DC-453E-A937-8AC663EE2AB2}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{05604AC6-E1DA-460E-9A38-57EB19BE3327}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Drawing.Common", "..\shims\stubs\System.Drawing.Common.csproj", "{516999D7-BFBD-41D1-A96C-69EBCDB6CF64}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Configuration.ConfigurationManager", "..\System.Configuration.ConfigurationManager\ref\System.Configuration.ConfigurationManager.csproj", "{33637A81-A335-474A-814D-648881BB403B}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Configuration.ConfigurationManager", "..\System.Configuration.ConfigurationManager\src\System.Configuration.ConfigurationManager.csproj", "{A62FC401-7B8B-4CDE-8D46-3776980C94F0}" @@ -25,12 +29,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.DirectoryServices", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.DirectoryServices", "..\System.DirectoryServices\src\System.DirectoryServices.csproj", "{6F8B3E04-A81F-4AD1-B82A-3E58F030D52A}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{C7F62EB6-E16F-4A1F-A840-C8812BB69C53}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{87EEC1DB-F423-49B7-BC50-7FFAF68EB099}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{6EFBC637-BE12-4544-9E21-CAACBA07C68B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.Uri", "..\System.Private.Uri\src\System.Private.Uri.csproj", "{12EE4F0D-57F9-48A4-835E-CE4B16DEF1F6}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{083BBAF9-356A-4C4B-B928-EB2DAF8D251F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{052330E1-08F5-4AC3-987D-4C601D640414}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{C741194C-DFF2-4B16-824B-29CFD021097C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\src\System.Runtime.csproj", "{47B3305D-FAA0-4008-A82D-107D66154032}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography.ProtectedData", "..\System.Security.Cryptography.ProtectedData\ref\System.Security.Cryptography.ProtectedData.csproj", "{A96F44C4-4CB8-41EB-ABBF-1C6E12664BCA}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography.ProtectedData", "..\System.Security.Cryptography.ProtectedData\src\System.Security.Cryptography.ProtectedData.csproj", "{A6769C35-8C53-46BF-84AE-44C921C39BEA}" @@ -43,135 +55,796 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", "..\System.Windows.Extensions\src\System.Windows.Extensions.csproj", "{A82F83FE-3B02-4EAA-8763-1D43AB0E4E6A}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{DE91E835-DB5D-4FAD-B992-1A98B24B87E9}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{6FBAC850-1A4D-4906-B24D-EF89EB925152}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{51C4F716-E3A7-4DBC-BC81-CAC8D2D33F14}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{FDBE164F-BCC1-47F4-BE02-14AD93E11E05}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{DE1E971B-BEE5-4184-B290-C9A8EF21BBB1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{DF045410-2A19-45A7-88DA-7FA5ECEAFF7A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{945D5BB6-FB9B-4489-816A-7B4E97843CF8}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{34998B2E-86EF-4DB2-BBD1-442F5FD0D83D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{DE91E835-DB5D-4FAD-B992-1A98B24B87E9}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C2159C53-1E91-486D-A66C-E658FB73A87F}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{51C4F716-E3A7-4DBC-BC81-CAC8D2D33F14}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{CBDB0A5C-FDD0-4B00-8840-D40E4D6B17DB}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{BD4D4F5A-FF81-4994-80EB-A1B05E553822}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{085B386F-7916-4A74-BED4-DCDA37AB91F9}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{E60386BE-4696-4126-884F-D202770ECF60}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{0C80CE34-037A-496E-BE3D-91108B0A988B}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|arm = Debug|arm + Debug|arm64 = Debug|arm64 + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|arm = Release|arm + Release|arm64 = Release|arm64 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + Checked|Any CPU = Checked|Any CPU + Checked|arm = Checked|arm + Checked|arm64 = Checked|arm64 + Checked|x64 = Checked|x64 + Checked|x86 = Checked|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3F896EC8-24DC-453E-A937-8AC663EE2AB2}.Debug|Any CPU.ActiveCfg = Debug|x64 + {3F896EC8-24DC-453E-A937-8AC663EE2AB2}.Debug|Any CPU.Build.0 = Debug|x64 + {3F896EC8-24DC-453E-A937-8AC663EE2AB2}.Debug|arm.ActiveCfg = Debug|arm + {3F896EC8-24DC-453E-A937-8AC663EE2AB2}.Debug|arm.Build.0 = Debug|arm + {3F896EC8-24DC-453E-A937-8AC663EE2AB2}.Debug|arm64.ActiveCfg = Debug|arm64 + {3F896EC8-24DC-453E-A937-8AC663EE2AB2}.Debug|arm64.Build.0 = Debug|arm64 + {3F896EC8-24DC-453E-A937-8AC663EE2AB2}.Debug|x64.ActiveCfg = Debug|x64 + {3F896EC8-24DC-453E-A937-8AC663EE2AB2}.Debug|x64.Build.0 = Debug|x64 + {3F896EC8-24DC-453E-A937-8AC663EE2AB2}.Debug|x86.ActiveCfg = Debug|x86 + {3F896EC8-24DC-453E-A937-8AC663EE2AB2}.Debug|x86.Build.0 = Debug|x86 + {3F896EC8-24DC-453E-A937-8AC663EE2AB2}.Release|Any CPU.ActiveCfg = Release|x64 + {3F896EC8-24DC-453E-A937-8AC663EE2AB2}.Release|Any CPU.Build.0 = Release|x64 + {3F896EC8-24DC-453E-A937-8AC663EE2AB2}.Release|arm.ActiveCfg = Release|arm + {3F896EC8-24DC-453E-A937-8AC663EE2AB2}.Release|arm.Build.0 = Release|arm + {3F896EC8-24DC-453E-A937-8AC663EE2AB2}.Release|arm64.ActiveCfg = Release|arm64 + {3F896EC8-24DC-453E-A937-8AC663EE2AB2}.Release|arm64.Build.0 = Release|arm64 + {3F896EC8-24DC-453E-A937-8AC663EE2AB2}.Release|x64.ActiveCfg = Release|x64 + {3F896EC8-24DC-453E-A937-8AC663EE2AB2}.Release|x64.Build.0 = Release|x64 + {3F896EC8-24DC-453E-A937-8AC663EE2AB2}.Release|x86.ActiveCfg = Release|x86 + {3F896EC8-24DC-453E-A937-8AC663EE2AB2}.Release|x86.Build.0 = Release|x86 + {3F896EC8-24DC-453E-A937-8AC663EE2AB2}.Checked|Any CPU.ActiveCfg = Checked|x64 + {3F896EC8-24DC-453E-A937-8AC663EE2AB2}.Checked|Any CPU.Build.0 = Checked|x64 + {3F896EC8-24DC-453E-A937-8AC663EE2AB2}.Checked|arm.ActiveCfg = Checked|arm + {3F896EC8-24DC-453E-A937-8AC663EE2AB2}.Checked|arm.Build.0 = Checked|arm + {3F896EC8-24DC-453E-A937-8AC663EE2AB2}.Checked|arm64.ActiveCfg = Checked|arm64 + {3F896EC8-24DC-453E-A937-8AC663EE2AB2}.Checked|arm64.Build.0 = Checked|arm64 + {3F896EC8-24DC-453E-A937-8AC663EE2AB2}.Checked|x64.ActiveCfg = Checked|x64 + {3F896EC8-24DC-453E-A937-8AC663EE2AB2}.Checked|x64.Build.0 = Checked|x64 + {3F896EC8-24DC-453E-A937-8AC663EE2AB2}.Checked|x86.ActiveCfg = Checked|x86 + {3F896EC8-24DC-453E-A937-8AC663EE2AB2}.Checked|x86.Build.0 = Checked|x86 {05604AC6-E1DA-460E-9A38-57EB19BE3327}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {05604AC6-E1DA-460E-9A38-57EB19BE3327}.Debug|Any CPU.Build.0 = Debug|Any CPU + {05604AC6-E1DA-460E-9A38-57EB19BE3327}.Debug|arm.ActiveCfg = Debug|Any CPU + {05604AC6-E1DA-460E-9A38-57EB19BE3327}.Debug|arm64.ActiveCfg = Debug|Any CPU + {05604AC6-E1DA-460E-9A38-57EB19BE3327}.Debug|x64.ActiveCfg = Debug|Any CPU + {05604AC6-E1DA-460E-9A38-57EB19BE3327}.Debug|x64.Build.0 = Debug|Any CPU + {05604AC6-E1DA-460E-9A38-57EB19BE3327}.Debug|x86.ActiveCfg = Debug|Any CPU + {05604AC6-E1DA-460E-9A38-57EB19BE3327}.Debug|x86.Build.0 = Debug|Any CPU {05604AC6-E1DA-460E-9A38-57EB19BE3327}.Release|Any CPU.ActiveCfg = Release|Any CPU {05604AC6-E1DA-460E-9A38-57EB19BE3327}.Release|Any CPU.Build.0 = Release|Any CPU + {05604AC6-E1DA-460E-9A38-57EB19BE3327}.Release|arm.ActiveCfg = Release|Any CPU + {05604AC6-E1DA-460E-9A38-57EB19BE3327}.Release|arm64.ActiveCfg = Release|Any CPU + {05604AC6-E1DA-460E-9A38-57EB19BE3327}.Release|x64.ActiveCfg = Release|Any CPU + {05604AC6-E1DA-460E-9A38-57EB19BE3327}.Release|x64.Build.0 = Release|Any CPU + {05604AC6-E1DA-460E-9A38-57EB19BE3327}.Release|x86.ActiveCfg = Release|Any CPU + {05604AC6-E1DA-460E-9A38-57EB19BE3327}.Release|x86.Build.0 = Release|Any CPU + {05604AC6-E1DA-460E-9A38-57EB19BE3327}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {05604AC6-E1DA-460E-9A38-57EB19BE3327}.Checked|arm.ActiveCfg = Debug|Any CPU + {05604AC6-E1DA-460E-9A38-57EB19BE3327}.Checked|arm64.ActiveCfg = Debug|Any CPU + {05604AC6-E1DA-460E-9A38-57EB19BE3327}.Checked|x64.ActiveCfg = Debug|Any CPU + {05604AC6-E1DA-460E-9A38-57EB19BE3327}.Checked|x86.ActiveCfg = Debug|Any CPU + {516999D7-BFBD-41D1-A96C-69EBCDB6CF64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {516999D7-BFBD-41D1-A96C-69EBCDB6CF64}.Debug|Any CPU.Build.0 = Debug|Any CPU + {516999D7-BFBD-41D1-A96C-69EBCDB6CF64}.Debug|arm.ActiveCfg = Debug|Any CPU + {516999D7-BFBD-41D1-A96C-69EBCDB6CF64}.Debug|arm64.ActiveCfg = Debug|Any CPU + {516999D7-BFBD-41D1-A96C-69EBCDB6CF64}.Debug|x64.ActiveCfg = Debug|Any CPU + {516999D7-BFBD-41D1-A96C-69EBCDB6CF64}.Debug|x64.Build.0 = Debug|Any CPU + {516999D7-BFBD-41D1-A96C-69EBCDB6CF64}.Debug|x86.ActiveCfg = Debug|Any CPU + {516999D7-BFBD-41D1-A96C-69EBCDB6CF64}.Debug|x86.Build.0 = Debug|Any CPU + {516999D7-BFBD-41D1-A96C-69EBCDB6CF64}.Release|Any CPU.ActiveCfg = Release|Any CPU + {516999D7-BFBD-41D1-A96C-69EBCDB6CF64}.Release|Any CPU.Build.0 = Release|Any CPU + {516999D7-BFBD-41D1-A96C-69EBCDB6CF64}.Release|arm.ActiveCfg = Release|Any CPU + {516999D7-BFBD-41D1-A96C-69EBCDB6CF64}.Release|arm64.ActiveCfg = Release|Any CPU + {516999D7-BFBD-41D1-A96C-69EBCDB6CF64}.Release|x64.ActiveCfg = Release|Any CPU + {516999D7-BFBD-41D1-A96C-69EBCDB6CF64}.Release|x64.Build.0 = Release|Any CPU + {516999D7-BFBD-41D1-A96C-69EBCDB6CF64}.Release|x86.ActiveCfg = Release|Any CPU + {516999D7-BFBD-41D1-A96C-69EBCDB6CF64}.Release|x86.Build.0 = Release|Any CPU + {516999D7-BFBD-41D1-A96C-69EBCDB6CF64}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {516999D7-BFBD-41D1-A96C-69EBCDB6CF64}.Checked|arm.ActiveCfg = Debug|Any CPU + {516999D7-BFBD-41D1-A96C-69EBCDB6CF64}.Checked|arm64.ActiveCfg = Debug|Any CPU + {516999D7-BFBD-41D1-A96C-69EBCDB6CF64}.Checked|x64.ActiveCfg = Debug|Any CPU + {516999D7-BFBD-41D1-A96C-69EBCDB6CF64}.Checked|x86.ActiveCfg = Debug|Any CPU {33637A81-A335-474A-814D-648881BB403B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {33637A81-A335-474A-814D-648881BB403B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {33637A81-A335-474A-814D-648881BB403B}.Debug|arm.ActiveCfg = Debug|Any CPU + {33637A81-A335-474A-814D-648881BB403B}.Debug|arm64.ActiveCfg = Debug|Any CPU + {33637A81-A335-474A-814D-648881BB403B}.Debug|x64.ActiveCfg = Debug|Any CPU + {33637A81-A335-474A-814D-648881BB403B}.Debug|x64.Build.0 = Debug|Any CPU + {33637A81-A335-474A-814D-648881BB403B}.Debug|x86.ActiveCfg = Debug|Any CPU + {33637A81-A335-474A-814D-648881BB403B}.Debug|x86.Build.0 = Debug|Any CPU {33637A81-A335-474A-814D-648881BB403B}.Release|Any CPU.ActiveCfg = Release|Any CPU {33637A81-A335-474A-814D-648881BB403B}.Release|Any CPU.Build.0 = Release|Any CPU + {33637A81-A335-474A-814D-648881BB403B}.Release|arm.ActiveCfg = Release|Any CPU + {33637A81-A335-474A-814D-648881BB403B}.Release|arm64.ActiveCfg = Release|Any CPU + {33637A81-A335-474A-814D-648881BB403B}.Release|x64.ActiveCfg = Release|Any CPU + {33637A81-A335-474A-814D-648881BB403B}.Release|x64.Build.0 = Release|Any CPU + {33637A81-A335-474A-814D-648881BB403B}.Release|x86.ActiveCfg = Release|Any CPU + {33637A81-A335-474A-814D-648881BB403B}.Release|x86.Build.0 = Release|Any CPU + {33637A81-A335-474A-814D-648881BB403B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {33637A81-A335-474A-814D-648881BB403B}.Checked|arm.ActiveCfg = Debug|Any CPU + {33637A81-A335-474A-814D-648881BB403B}.Checked|arm64.ActiveCfg = Debug|Any CPU + {33637A81-A335-474A-814D-648881BB403B}.Checked|x64.ActiveCfg = Debug|Any CPU + {33637A81-A335-474A-814D-648881BB403B}.Checked|x86.ActiveCfg = Debug|Any CPU {A62FC401-7B8B-4CDE-8D46-3776980C94F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A62FC401-7B8B-4CDE-8D46-3776980C94F0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A62FC401-7B8B-4CDE-8D46-3776980C94F0}.Debug|arm.ActiveCfg = Debug|Any CPU + {A62FC401-7B8B-4CDE-8D46-3776980C94F0}.Debug|arm64.ActiveCfg = Debug|Any CPU + {A62FC401-7B8B-4CDE-8D46-3776980C94F0}.Debug|x64.ActiveCfg = Debug|Any CPU + {A62FC401-7B8B-4CDE-8D46-3776980C94F0}.Debug|x64.Build.0 = Debug|Any CPU + {A62FC401-7B8B-4CDE-8D46-3776980C94F0}.Debug|x86.ActiveCfg = Debug|Any CPU + {A62FC401-7B8B-4CDE-8D46-3776980C94F0}.Debug|x86.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 + {A62FC401-7B8B-4CDE-8D46-3776980C94F0}.Release|arm.ActiveCfg = Release|Any CPU + {A62FC401-7B8B-4CDE-8D46-3776980C94F0}.Release|arm64.ActiveCfg = Release|Any CPU + {A62FC401-7B8B-4CDE-8D46-3776980C94F0}.Release|x64.ActiveCfg = Release|Any CPU + {A62FC401-7B8B-4CDE-8D46-3776980C94F0}.Release|x64.Build.0 = Release|Any CPU + {A62FC401-7B8B-4CDE-8D46-3776980C94F0}.Release|x86.ActiveCfg = Release|Any CPU + {A62FC401-7B8B-4CDE-8D46-3776980C94F0}.Release|x86.Build.0 = Release|Any CPU + {A62FC401-7B8B-4CDE-8D46-3776980C94F0}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {A62FC401-7B8B-4CDE-8D46-3776980C94F0}.Checked|arm.ActiveCfg = Debug|Any CPU + {A62FC401-7B8B-4CDE-8D46-3776980C94F0}.Checked|arm64.ActiveCfg = Debug|Any CPU + {A62FC401-7B8B-4CDE-8D46-3776980C94F0}.Checked|x64.ActiveCfg = Debug|Any CPU + {A62FC401-7B8B-4CDE-8D46-3776980C94F0}.Checked|x86.ActiveCfg = Debug|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}.Debug|arm.ActiveCfg = Debug|Any CPU + {8710F08A-F3C3-4E92-B0ED-E787C4523EC0}.Debug|arm64.ActiveCfg = Debug|Any CPU + {8710F08A-F3C3-4E92-B0ED-E787C4523EC0}.Debug|x64.ActiveCfg = Debug|Any CPU + {8710F08A-F3C3-4E92-B0ED-E787C4523EC0}.Debug|x64.Build.0 = Debug|Any CPU + {8710F08A-F3C3-4E92-B0ED-E787C4523EC0}.Debug|x86.ActiveCfg = Debug|Any CPU + {8710F08A-F3C3-4E92-B0ED-E787C4523EC0}.Debug|x86.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 + {8710F08A-F3C3-4E92-B0ED-E787C4523EC0}.Release|arm.ActiveCfg = Release|Any CPU + {8710F08A-F3C3-4E92-B0ED-E787C4523EC0}.Release|arm64.ActiveCfg = Release|Any CPU + {8710F08A-F3C3-4E92-B0ED-E787C4523EC0}.Release|x64.ActiveCfg = Release|Any CPU + {8710F08A-F3C3-4E92-B0ED-E787C4523EC0}.Release|x64.Build.0 = Release|Any CPU + {8710F08A-F3C3-4E92-B0ED-E787C4523EC0}.Release|x86.ActiveCfg = Release|Any CPU + {8710F08A-F3C3-4E92-B0ED-E787C4523EC0}.Release|x86.Build.0 = Release|Any CPU + {8710F08A-F3C3-4E92-B0ED-E787C4523EC0}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {8710F08A-F3C3-4E92-B0ED-E787C4523EC0}.Checked|arm.ActiveCfg = Debug|Any CPU + {8710F08A-F3C3-4E92-B0ED-E787C4523EC0}.Checked|arm64.ActiveCfg = Debug|Any CPU + {8710F08A-F3C3-4E92-B0ED-E787C4523EC0}.Checked|x64.ActiveCfg = Debug|Any CPU + {8710F08A-F3C3-4E92-B0ED-E787C4523EC0}.Checked|x86.ActiveCfg = Debug|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}.Debug|arm.ActiveCfg = Debug|Any CPU + {82747414-420A-47A9-886A-A042E46780B6}.Debug|arm64.ActiveCfg = Debug|Any CPU + {82747414-420A-47A9-886A-A042E46780B6}.Debug|x64.ActiveCfg = Debug|Any CPU + {82747414-420A-47A9-886A-A042E46780B6}.Debug|x64.Build.0 = Debug|Any CPU + {82747414-420A-47A9-886A-A042E46780B6}.Debug|x86.ActiveCfg = Debug|Any CPU + {82747414-420A-47A9-886A-A042E46780B6}.Debug|x86.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 + {82747414-420A-47A9-886A-A042E46780B6}.Release|arm.ActiveCfg = Release|Any CPU + {82747414-420A-47A9-886A-A042E46780B6}.Release|arm64.ActiveCfg = Release|Any CPU + {82747414-420A-47A9-886A-A042E46780B6}.Release|x64.ActiveCfg = Release|Any CPU + {82747414-420A-47A9-886A-A042E46780B6}.Release|x64.Build.0 = Release|Any CPU + {82747414-420A-47A9-886A-A042E46780B6}.Release|x86.ActiveCfg = Release|Any CPU + {82747414-420A-47A9-886A-A042E46780B6}.Release|x86.Build.0 = Release|Any CPU + {82747414-420A-47A9-886A-A042E46780B6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {82747414-420A-47A9-886A-A042E46780B6}.Checked|arm.ActiveCfg = Debug|Any CPU + {82747414-420A-47A9-886A-A042E46780B6}.Checked|arm64.ActiveCfg = Debug|Any CPU + {82747414-420A-47A9-886A-A042E46780B6}.Checked|x64.ActiveCfg = Debug|Any CPU + {82747414-420A-47A9-886A-A042E46780B6}.Checked|x86.ActiveCfg = Debug|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}.Debug|arm.ActiveCfg = Debug|Any CPU + {EA3C3FD4-EE85-4F25-A787-12EECA3529B0}.Debug|arm64.ActiveCfg = Debug|Any CPU + {EA3C3FD4-EE85-4F25-A787-12EECA3529B0}.Debug|x64.ActiveCfg = Debug|Any CPU + {EA3C3FD4-EE85-4F25-A787-12EECA3529B0}.Debug|x64.Build.0 = Debug|Any CPU + {EA3C3FD4-EE85-4F25-A787-12EECA3529B0}.Debug|x86.ActiveCfg = Debug|Any CPU + {EA3C3FD4-EE85-4F25-A787-12EECA3529B0}.Debug|x86.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 + {EA3C3FD4-EE85-4F25-A787-12EECA3529B0}.Release|arm.ActiveCfg = Release|Any CPU + {EA3C3FD4-EE85-4F25-A787-12EECA3529B0}.Release|arm64.ActiveCfg = Release|Any CPU + {EA3C3FD4-EE85-4F25-A787-12EECA3529B0}.Release|x64.ActiveCfg = Release|Any CPU + {EA3C3FD4-EE85-4F25-A787-12EECA3529B0}.Release|x64.Build.0 = Release|Any CPU + {EA3C3FD4-EE85-4F25-A787-12EECA3529B0}.Release|x86.ActiveCfg = Release|Any CPU + {EA3C3FD4-EE85-4F25-A787-12EECA3529B0}.Release|x86.Build.0 = Release|Any CPU + {EA3C3FD4-EE85-4F25-A787-12EECA3529B0}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {EA3C3FD4-EE85-4F25-A787-12EECA3529B0}.Checked|arm.ActiveCfg = Debug|Any CPU + {EA3C3FD4-EE85-4F25-A787-12EECA3529B0}.Checked|arm64.ActiveCfg = Debug|Any CPU + {EA3C3FD4-EE85-4F25-A787-12EECA3529B0}.Checked|x64.ActiveCfg = Debug|Any CPU + {EA3C3FD4-EE85-4F25-A787-12EECA3529B0}.Checked|x86.ActiveCfg = Debug|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}.Debug|arm.ActiveCfg = Debug|Any CPU + {7BC4C9CF-F8E4-424B-9F30-237B801F435D}.Debug|arm64.ActiveCfg = Debug|Any CPU + {7BC4C9CF-F8E4-424B-9F30-237B801F435D}.Debug|x64.ActiveCfg = Debug|Any CPU + {7BC4C9CF-F8E4-424B-9F30-237B801F435D}.Debug|x64.Build.0 = Debug|Any CPU + {7BC4C9CF-F8E4-424B-9F30-237B801F435D}.Debug|x86.ActiveCfg = Debug|Any CPU + {7BC4C9CF-F8E4-424B-9F30-237B801F435D}.Debug|x86.Build.0 = Debug|Any CPU {7BC4C9CF-F8E4-424B-9F30-237B801F435D}.Release|Any CPU.ActiveCfg = Release|Any CPU {7BC4C9CF-F8E4-424B-9F30-237B801F435D}.Release|Any CPU.Build.0 = Release|Any CPU + {7BC4C9CF-F8E4-424B-9F30-237B801F435D}.Release|arm.ActiveCfg = Release|Any CPU + {7BC4C9CF-F8E4-424B-9F30-237B801F435D}.Release|arm64.ActiveCfg = Release|Any CPU + {7BC4C9CF-F8E4-424B-9F30-237B801F435D}.Release|x64.ActiveCfg = Release|Any CPU + {7BC4C9CF-F8E4-424B-9F30-237B801F435D}.Release|x64.Build.0 = Release|Any CPU + {7BC4C9CF-F8E4-424B-9F30-237B801F435D}.Release|x86.ActiveCfg = Release|Any CPU + {7BC4C9CF-F8E4-424B-9F30-237B801F435D}.Release|x86.Build.0 = Release|Any CPU + {7BC4C9CF-F8E4-424B-9F30-237B801F435D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {7BC4C9CF-F8E4-424B-9F30-237B801F435D}.Checked|arm.ActiveCfg = Debug|Any CPU + {7BC4C9CF-F8E4-424B-9F30-237B801F435D}.Checked|arm64.ActiveCfg = Debug|Any CPU + {7BC4C9CF-F8E4-424B-9F30-237B801F435D}.Checked|x64.ActiveCfg = Debug|Any CPU + {7BC4C9CF-F8E4-424B-9F30-237B801F435D}.Checked|x86.ActiveCfg = Debug|Any CPU {7DCEDAE6-45FC-402B-AAE4-14AD66B73D30}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7DCEDAE6-45FC-402B-AAE4-14AD66B73D30}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7DCEDAE6-45FC-402B-AAE4-14AD66B73D30}.Debug|arm.ActiveCfg = Debug|Any CPU + {7DCEDAE6-45FC-402B-AAE4-14AD66B73D30}.Debug|arm64.ActiveCfg = Debug|Any CPU + {7DCEDAE6-45FC-402B-AAE4-14AD66B73D30}.Debug|x64.ActiveCfg = Debug|Any CPU + {7DCEDAE6-45FC-402B-AAE4-14AD66B73D30}.Debug|x64.Build.0 = Debug|Any CPU + {7DCEDAE6-45FC-402B-AAE4-14AD66B73D30}.Debug|x86.ActiveCfg = Debug|Any CPU + {7DCEDAE6-45FC-402B-AAE4-14AD66B73D30}.Debug|x86.Build.0 = Debug|Any CPU {7DCEDAE6-45FC-402B-AAE4-14AD66B73D30}.Release|Any CPU.ActiveCfg = Release|Any CPU {7DCEDAE6-45FC-402B-AAE4-14AD66B73D30}.Release|Any CPU.Build.0 = Release|Any CPU + {7DCEDAE6-45FC-402B-AAE4-14AD66B73D30}.Release|arm.ActiveCfg = Release|Any CPU + {7DCEDAE6-45FC-402B-AAE4-14AD66B73D30}.Release|arm64.ActiveCfg = Release|Any CPU + {7DCEDAE6-45FC-402B-AAE4-14AD66B73D30}.Release|x64.ActiveCfg = Release|Any CPU + {7DCEDAE6-45FC-402B-AAE4-14AD66B73D30}.Release|x64.Build.0 = Release|Any CPU + {7DCEDAE6-45FC-402B-AAE4-14AD66B73D30}.Release|x86.ActiveCfg = Release|Any CPU + {7DCEDAE6-45FC-402B-AAE4-14AD66B73D30}.Release|x86.Build.0 = Release|Any CPU + {7DCEDAE6-45FC-402B-AAE4-14AD66B73D30}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {7DCEDAE6-45FC-402B-AAE4-14AD66B73D30}.Checked|arm.ActiveCfg = Debug|Any CPU + {7DCEDAE6-45FC-402B-AAE4-14AD66B73D30}.Checked|arm64.ActiveCfg = Debug|Any CPU + {7DCEDAE6-45FC-402B-AAE4-14AD66B73D30}.Checked|x64.ActiveCfg = Debug|Any CPU + {7DCEDAE6-45FC-402B-AAE4-14AD66B73D30}.Checked|x86.ActiveCfg = Debug|Any CPU {44080626-DF98-470B-BCA1-CC3DFFCB94E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {44080626-DF98-470B-BCA1-CC3DFFCB94E3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {44080626-DF98-470B-BCA1-CC3DFFCB94E3}.Debug|arm.ActiveCfg = Debug|Any CPU + {44080626-DF98-470B-BCA1-CC3DFFCB94E3}.Debug|arm64.ActiveCfg = Debug|Any CPU + {44080626-DF98-470B-BCA1-CC3DFFCB94E3}.Debug|x64.ActiveCfg = Debug|Any CPU + {44080626-DF98-470B-BCA1-CC3DFFCB94E3}.Debug|x64.Build.0 = Debug|Any CPU + {44080626-DF98-470B-BCA1-CC3DFFCB94E3}.Debug|x86.ActiveCfg = Debug|Any CPU + {44080626-DF98-470B-BCA1-CC3DFFCB94E3}.Debug|x86.Build.0 = Debug|Any CPU {44080626-DF98-470B-BCA1-CC3DFFCB94E3}.Release|Any CPU.ActiveCfg = Release|Any CPU {44080626-DF98-470B-BCA1-CC3DFFCB94E3}.Release|Any CPU.Build.0 = Release|Any CPU + {44080626-DF98-470B-BCA1-CC3DFFCB94E3}.Release|arm.ActiveCfg = Release|Any CPU + {44080626-DF98-470B-BCA1-CC3DFFCB94E3}.Release|arm64.ActiveCfg = Release|Any CPU + {44080626-DF98-470B-BCA1-CC3DFFCB94E3}.Release|x64.ActiveCfg = Release|Any CPU + {44080626-DF98-470B-BCA1-CC3DFFCB94E3}.Release|x64.Build.0 = Release|Any CPU + {44080626-DF98-470B-BCA1-CC3DFFCB94E3}.Release|x86.ActiveCfg = Release|Any CPU + {44080626-DF98-470B-BCA1-CC3DFFCB94E3}.Release|x86.Build.0 = Release|Any CPU + {44080626-DF98-470B-BCA1-CC3DFFCB94E3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {44080626-DF98-470B-BCA1-CC3DFFCB94E3}.Checked|arm.ActiveCfg = Debug|Any CPU + {44080626-DF98-470B-BCA1-CC3DFFCB94E3}.Checked|arm64.ActiveCfg = Debug|Any CPU + {44080626-DF98-470B-BCA1-CC3DFFCB94E3}.Checked|x64.ActiveCfg = Debug|Any CPU + {44080626-DF98-470B-BCA1-CC3DFFCB94E3}.Checked|x86.ActiveCfg = Debug|Any CPU {469EBD55-AEA1-4AF5-BBC6-F9938C7DAAC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {469EBD55-AEA1-4AF5-BBC6-F9938C7DAAC3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {469EBD55-AEA1-4AF5-BBC6-F9938C7DAAC3}.Debug|arm.ActiveCfg = Debug|Any CPU + {469EBD55-AEA1-4AF5-BBC6-F9938C7DAAC3}.Debug|arm64.ActiveCfg = Debug|Any CPU + {469EBD55-AEA1-4AF5-BBC6-F9938C7DAAC3}.Debug|x64.ActiveCfg = Debug|Any CPU + {469EBD55-AEA1-4AF5-BBC6-F9938C7DAAC3}.Debug|x64.Build.0 = Debug|Any CPU + {469EBD55-AEA1-4AF5-BBC6-F9938C7DAAC3}.Debug|x86.ActiveCfg = Debug|Any CPU + {469EBD55-AEA1-4AF5-BBC6-F9938C7DAAC3}.Debug|x86.Build.0 = Debug|Any CPU {469EBD55-AEA1-4AF5-BBC6-F9938C7DAAC3}.Release|Any CPU.ActiveCfg = Release|Any CPU {469EBD55-AEA1-4AF5-BBC6-F9938C7DAAC3}.Release|Any CPU.Build.0 = Release|Any CPU + {469EBD55-AEA1-4AF5-BBC6-F9938C7DAAC3}.Release|arm.ActiveCfg = Release|Any CPU + {469EBD55-AEA1-4AF5-BBC6-F9938C7DAAC3}.Release|arm64.ActiveCfg = Release|Any CPU + {469EBD55-AEA1-4AF5-BBC6-F9938C7DAAC3}.Release|x64.ActiveCfg = Release|Any CPU + {469EBD55-AEA1-4AF5-BBC6-F9938C7DAAC3}.Release|x64.Build.0 = Release|Any CPU + {469EBD55-AEA1-4AF5-BBC6-F9938C7DAAC3}.Release|x86.ActiveCfg = Release|Any CPU + {469EBD55-AEA1-4AF5-BBC6-F9938C7DAAC3}.Release|x86.Build.0 = Release|Any CPU + {469EBD55-AEA1-4AF5-BBC6-F9938C7DAAC3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {469EBD55-AEA1-4AF5-BBC6-F9938C7DAAC3}.Checked|arm.ActiveCfg = Debug|Any CPU + {469EBD55-AEA1-4AF5-BBC6-F9938C7DAAC3}.Checked|arm64.ActiveCfg = Debug|Any CPU + {469EBD55-AEA1-4AF5-BBC6-F9938C7DAAC3}.Checked|x64.ActiveCfg = Debug|Any CPU + {469EBD55-AEA1-4AF5-BBC6-F9938C7DAAC3}.Checked|x86.ActiveCfg = Debug|Any CPU {DBE4B576-2E74-4A45-87E6-CCF652F6ADE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DBE4B576-2E74-4A45-87E6-CCF652F6ADE1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DBE4B576-2E74-4A45-87E6-CCF652F6ADE1}.Debug|arm.ActiveCfg = Debug|Any CPU + {DBE4B576-2E74-4A45-87E6-CCF652F6ADE1}.Debug|arm64.ActiveCfg = Debug|Any CPU + {DBE4B576-2E74-4A45-87E6-CCF652F6ADE1}.Debug|x64.ActiveCfg = Debug|Any CPU + {DBE4B576-2E74-4A45-87E6-CCF652F6ADE1}.Debug|x64.Build.0 = Debug|Any CPU + {DBE4B576-2E74-4A45-87E6-CCF652F6ADE1}.Debug|x86.ActiveCfg = Debug|Any CPU + {DBE4B576-2E74-4A45-87E6-CCF652F6ADE1}.Debug|x86.Build.0 = Debug|Any CPU {DBE4B576-2E74-4A45-87E6-CCF652F6ADE1}.Release|Any CPU.ActiveCfg = Release|Any CPU {DBE4B576-2E74-4A45-87E6-CCF652F6ADE1}.Release|Any CPU.Build.0 = Release|Any CPU + {DBE4B576-2E74-4A45-87E6-CCF652F6ADE1}.Release|arm.ActiveCfg = Release|Any CPU + {DBE4B576-2E74-4A45-87E6-CCF652F6ADE1}.Release|arm64.ActiveCfg = Release|Any CPU + {DBE4B576-2E74-4A45-87E6-CCF652F6ADE1}.Release|x64.ActiveCfg = Release|Any CPU + {DBE4B576-2E74-4A45-87E6-CCF652F6ADE1}.Release|x64.Build.0 = Release|Any CPU + {DBE4B576-2E74-4A45-87E6-CCF652F6ADE1}.Release|x86.ActiveCfg = Release|Any CPU + {DBE4B576-2E74-4A45-87E6-CCF652F6ADE1}.Release|x86.Build.0 = Release|Any CPU + {DBE4B576-2E74-4A45-87E6-CCF652F6ADE1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {DBE4B576-2E74-4A45-87E6-CCF652F6ADE1}.Checked|arm.ActiveCfg = Debug|Any CPU + {DBE4B576-2E74-4A45-87E6-CCF652F6ADE1}.Checked|arm64.ActiveCfg = Debug|Any CPU + {DBE4B576-2E74-4A45-87E6-CCF652F6ADE1}.Checked|x64.ActiveCfg = Debug|Any CPU + {DBE4B576-2E74-4A45-87E6-CCF652F6ADE1}.Checked|x86.ActiveCfg = Debug|Any CPU {8D48B49B-398F-4536-B436-AAD50A7F54B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8D48B49B-398F-4536-B436-AAD50A7F54B1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8D48B49B-398F-4536-B436-AAD50A7F54B1}.Debug|arm.ActiveCfg = Debug|Any CPU + {8D48B49B-398F-4536-B436-AAD50A7F54B1}.Debug|arm64.ActiveCfg = Debug|Any CPU + {8D48B49B-398F-4536-B436-AAD50A7F54B1}.Debug|x64.ActiveCfg = Debug|Any CPU + {8D48B49B-398F-4536-B436-AAD50A7F54B1}.Debug|x64.Build.0 = Debug|Any CPU + {8D48B49B-398F-4536-B436-AAD50A7F54B1}.Debug|x86.ActiveCfg = Debug|Any CPU + {8D48B49B-398F-4536-B436-AAD50A7F54B1}.Debug|x86.Build.0 = Debug|Any CPU {8D48B49B-398F-4536-B436-AAD50A7F54B1}.Release|Any CPU.ActiveCfg = Release|Any CPU {8D48B49B-398F-4536-B436-AAD50A7F54B1}.Release|Any CPU.Build.0 = Release|Any CPU + {8D48B49B-398F-4536-B436-AAD50A7F54B1}.Release|arm.ActiveCfg = Release|Any CPU + {8D48B49B-398F-4536-B436-AAD50A7F54B1}.Release|arm64.ActiveCfg = Release|Any CPU + {8D48B49B-398F-4536-B436-AAD50A7F54B1}.Release|x64.ActiveCfg = Release|Any CPU + {8D48B49B-398F-4536-B436-AAD50A7F54B1}.Release|x64.Build.0 = Release|Any CPU + {8D48B49B-398F-4536-B436-AAD50A7F54B1}.Release|x86.ActiveCfg = Release|Any CPU + {8D48B49B-398F-4536-B436-AAD50A7F54B1}.Release|x86.Build.0 = Release|Any CPU + {8D48B49B-398F-4536-B436-AAD50A7F54B1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {8D48B49B-398F-4536-B436-AAD50A7F54B1}.Checked|arm.ActiveCfg = Debug|Any CPU + {8D48B49B-398F-4536-B436-AAD50A7F54B1}.Checked|arm64.ActiveCfg = Debug|Any CPU + {8D48B49B-398F-4536-B436-AAD50A7F54B1}.Checked|x64.ActiveCfg = Debug|Any CPU + {8D48B49B-398F-4536-B436-AAD50A7F54B1}.Checked|x86.ActiveCfg = Debug|Any CPU {6F8B3E04-A81F-4AD1-B82A-3E58F030D52A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6F8B3E04-A81F-4AD1-B82A-3E58F030D52A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6F8B3E04-A81F-4AD1-B82A-3E58F030D52A}.Debug|arm.ActiveCfg = Debug|Any CPU + {6F8B3E04-A81F-4AD1-B82A-3E58F030D52A}.Debug|arm64.ActiveCfg = Debug|Any CPU + {6F8B3E04-A81F-4AD1-B82A-3E58F030D52A}.Debug|x64.ActiveCfg = Debug|Any CPU + {6F8B3E04-A81F-4AD1-B82A-3E58F030D52A}.Debug|x64.Build.0 = Debug|Any CPU + {6F8B3E04-A81F-4AD1-B82A-3E58F030D52A}.Debug|x86.ActiveCfg = Debug|Any CPU + {6F8B3E04-A81F-4AD1-B82A-3E58F030D52A}.Debug|x86.Build.0 = Debug|Any CPU {6F8B3E04-A81F-4AD1-B82A-3E58F030D52A}.Release|Any CPU.ActiveCfg = Release|Any CPU {6F8B3E04-A81F-4AD1-B82A-3E58F030D52A}.Release|Any CPU.Build.0 = Release|Any CPU - {C7F62EB6-E16F-4A1F-A840-C8812BB69C53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C7F62EB6-E16F-4A1F-A840-C8812BB69C53}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C7F62EB6-E16F-4A1F-A840-C8812BB69C53}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C7F62EB6-E16F-4A1F-A840-C8812BB69C53}.Release|Any CPU.Build.0 = Release|Any CPU + {6F8B3E04-A81F-4AD1-B82A-3E58F030D52A}.Release|arm.ActiveCfg = Release|Any CPU + {6F8B3E04-A81F-4AD1-B82A-3E58F030D52A}.Release|arm64.ActiveCfg = Release|Any CPU + {6F8B3E04-A81F-4AD1-B82A-3E58F030D52A}.Release|x64.ActiveCfg = Release|Any CPU + {6F8B3E04-A81F-4AD1-B82A-3E58F030D52A}.Release|x64.Build.0 = Release|Any CPU + {6F8B3E04-A81F-4AD1-B82A-3E58F030D52A}.Release|x86.ActiveCfg = Release|Any CPU + {6F8B3E04-A81F-4AD1-B82A-3E58F030D52A}.Release|x86.Build.0 = Release|Any CPU + {6F8B3E04-A81F-4AD1-B82A-3E58F030D52A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {6F8B3E04-A81F-4AD1-B82A-3E58F030D52A}.Checked|arm.ActiveCfg = Debug|Any CPU + {6F8B3E04-A81F-4AD1-B82A-3E58F030D52A}.Checked|arm64.ActiveCfg = Debug|Any CPU + {6F8B3E04-A81F-4AD1-B82A-3E58F030D52A}.Checked|x64.ActiveCfg = Debug|Any CPU + {6F8B3E04-A81F-4AD1-B82A-3E58F030D52A}.Checked|x86.ActiveCfg = Debug|Any CPU + {87EEC1DB-F423-49B7-BC50-7FFAF68EB099}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {87EEC1DB-F423-49B7-BC50-7FFAF68EB099}.Debug|Any CPU.Build.0 = Debug|Any CPU + {87EEC1DB-F423-49B7-BC50-7FFAF68EB099}.Debug|arm.ActiveCfg = Debug|Any CPU + {87EEC1DB-F423-49B7-BC50-7FFAF68EB099}.Debug|arm64.ActiveCfg = Debug|Any CPU + {87EEC1DB-F423-49B7-BC50-7FFAF68EB099}.Debug|x64.ActiveCfg = Debug|Any CPU + {87EEC1DB-F423-49B7-BC50-7FFAF68EB099}.Debug|x64.Build.0 = Debug|Any CPU + {87EEC1DB-F423-49B7-BC50-7FFAF68EB099}.Debug|x86.ActiveCfg = Debug|Any CPU + {87EEC1DB-F423-49B7-BC50-7FFAF68EB099}.Debug|x86.Build.0 = Debug|Any CPU + {87EEC1DB-F423-49B7-BC50-7FFAF68EB099}.Release|Any CPU.ActiveCfg = Release|Any CPU + {87EEC1DB-F423-49B7-BC50-7FFAF68EB099}.Release|Any CPU.Build.0 = Release|Any CPU + {87EEC1DB-F423-49B7-BC50-7FFAF68EB099}.Release|arm.ActiveCfg = Release|Any CPU + {87EEC1DB-F423-49B7-BC50-7FFAF68EB099}.Release|arm64.ActiveCfg = Release|Any CPU + {87EEC1DB-F423-49B7-BC50-7FFAF68EB099}.Release|x64.ActiveCfg = Release|Any CPU + {87EEC1DB-F423-49B7-BC50-7FFAF68EB099}.Release|x64.Build.0 = Release|Any CPU + {87EEC1DB-F423-49B7-BC50-7FFAF68EB099}.Release|x86.ActiveCfg = Release|Any CPU + {87EEC1DB-F423-49B7-BC50-7FFAF68EB099}.Release|x86.Build.0 = Release|Any CPU + {87EEC1DB-F423-49B7-BC50-7FFAF68EB099}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {87EEC1DB-F423-49B7-BC50-7FFAF68EB099}.Checked|arm.ActiveCfg = Debug|Any CPU + {87EEC1DB-F423-49B7-BC50-7FFAF68EB099}.Checked|arm64.ActiveCfg = Debug|Any CPU + {87EEC1DB-F423-49B7-BC50-7FFAF68EB099}.Checked|x64.ActiveCfg = Debug|Any CPU + {87EEC1DB-F423-49B7-BC50-7FFAF68EB099}.Checked|x86.ActiveCfg = Debug|Any CPU + {6EFBC637-BE12-4544-9E21-CAACBA07C68B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6EFBC637-BE12-4544-9E21-CAACBA07C68B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6EFBC637-BE12-4544-9E21-CAACBA07C68B}.Debug|arm.ActiveCfg = Debug|Any CPU + {6EFBC637-BE12-4544-9E21-CAACBA07C68B}.Debug|arm64.ActiveCfg = Debug|Any CPU + {6EFBC637-BE12-4544-9E21-CAACBA07C68B}.Debug|x64.ActiveCfg = Debug|Any CPU + {6EFBC637-BE12-4544-9E21-CAACBA07C68B}.Debug|x64.Build.0 = Debug|Any CPU + {6EFBC637-BE12-4544-9E21-CAACBA07C68B}.Debug|x86.ActiveCfg = Debug|Any CPU + {6EFBC637-BE12-4544-9E21-CAACBA07C68B}.Debug|x86.Build.0 = Debug|Any CPU + {6EFBC637-BE12-4544-9E21-CAACBA07C68B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6EFBC637-BE12-4544-9E21-CAACBA07C68B}.Release|Any CPU.Build.0 = Release|Any CPU + {6EFBC637-BE12-4544-9E21-CAACBA07C68B}.Release|arm.ActiveCfg = Release|Any CPU + {6EFBC637-BE12-4544-9E21-CAACBA07C68B}.Release|arm64.ActiveCfg = Release|Any CPU + {6EFBC637-BE12-4544-9E21-CAACBA07C68B}.Release|x64.ActiveCfg = Release|Any CPU + {6EFBC637-BE12-4544-9E21-CAACBA07C68B}.Release|x64.Build.0 = Release|Any CPU + {6EFBC637-BE12-4544-9E21-CAACBA07C68B}.Release|x86.ActiveCfg = Release|Any CPU + {6EFBC637-BE12-4544-9E21-CAACBA07C68B}.Release|x86.Build.0 = Release|Any CPU + {6EFBC637-BE12-4544-9E21-CAACBA07C68B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {6EFBC637-BE12-4544-9E21-CAACBA07C68B}.Checked|arm.ActiveCfg = Debug|Any CPU + {6EFBC637-BE12-4544-9E21-CAACBA07C68B}.Checked|arm64.ActiveCfg = Debug|Any CPU + {6EFBC637-BE12-4544-9E21-CAACBA07C68B}.Checked|x64.ActiveCfg = Debug|Any CPU + {6EFBC637-BE12-4544-9E21-CAACBA07C68B}.Checked|x86.ActiveCfg = Debug|Any CPU + {12EE4F0D-57F9-48A4-835E-CE4B16DEF1F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {12EE4F0D-57F9-48A4-835E-CE4B16DEF1F6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {12EE4F0D-57F9-48A4-835E-CE4B16DEF1F6}.Debug|arm.ActiveCfg = Debug|Any CPU + {12EE4F0D-57F9-48A4-835E-CE4B16DEF1F6}.Debug|arm64.ActiveCfg = Debug|Any CPU + {12EE4F0D-57F9-48A4-835E-CE4B16DEF1F6}.Debug|x64.ActiveCfg = Debug|Any CPU + {12EE4F0D-57F9-48A4-835E-CE4B16DEF1F6}.Debug|x64.Build.0 = Debug|Any CPU + {12EE4F0D-57F9-48A4-835E-CE4B16DEF1F6}.Debug|x86.ActiveCfg = Debug|Any CPU + {12EE4F0D-57F9-48A4-835E-CE4B16DEF1F6}.Debug|x86.Build.0 = Debug|Any CPU + {12EE4F0D-57F9-48A4-835E-CE4B16DEF1F6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {12EE4F0D-57F9-48A4-835E-CE4B16DEF1F6}.Release|Any CPU.Build.0 = Release|Any CPU + {12EE4F0D-57F9-48A4-835E-CE4B16DEF1F6}.Release|arm.ActiveCfg = Release|Any CPU + {12EE4F0D-57F9-48A4-835E-CE4B16DEF1F6}.Release|arm64.ActiveCfg = Release|Any CPU + {12EE4F0D-57F9-48A4-835E-CE4B16DEF1F6}.Release|x64.ActiveCfg = Release|Any CPU + {12EE4F0D-57F9-48A4-835E-CE4B16DEF1F6}.Release|x64.Build.0 = Release|Any CPU + {12EE4F0D-57F9-48A4-835E-CE4B16DEF1F6}.Release|x86.ActiveCfg = Release|Any CPU + {12EE4F0D-57F9-48A4-835E-CE4B16DEF1F6}.Release|x86.Build.0 = Release|Any CPU + {12EE4F0D-57F9-48A4-835E-CE4B16DEF1F6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {12EE4F0D-57F9-48A4-835E-CE4B16DEF1F6}.Checked|arm.ActiveCfg = Debug|Any CPU + {12EE4F0D-57F9-48A4-835E-CE4B16DEF1F6}.Checked|arm64.ActiveCfg = Debug|Any CPU + {12EE4F0D-57F9-48A4-835E-CE4B16DEF1F6}.Checked|x64.ActiveCfg = Debug|Any CPU + {12EE4F0D-57F9-48A4-835E-CE4B16DEF1F6}.Checked|x86.ActiveCfg = Debug|Any CPU {083BBAF9-356A-4C4B-B928-EB2DAF8D251F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {083BBAF9-356A-4C4B-B928-EB2DAF8D251F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {083BBAF9-356A-4C4B-B928-EB2DAF8D251F}.Debug|arm.ActiveCfg = Debug|Any CPU + {083BBAF9-356A-4C4B-B928-EB2DAF8D251F}.Debug|arm64.ActiveCfg = Debug|Any CPU + {083BBAF9-356A-4C4B-B928-EB2DAF8D251F}.Debug|x64.ActiveCfg = Debug|Any CPU + {083BBAF9-356A-4C4B-B928-EB2DAF8D251F}.Debug|x64.Build.0 = Debug|Any CPU + {083BBAF9-356A-4C4B-B928-EB2DAF8D251F}.Debug|x86.ActiveCfg = Debug|Any CPU + {083BBAF9-356A-4C4B-B928-EB2DAF8D251F}.Debug|x86.Build.0 = Debug|Any CPU {083BBAF9-356A-4C4B-B928-EB2DAF8D251F}.Release|Any CPU.ActiveCfg = Release|Any CPU {083BBAF9-356A-4C4B-B928-EB2DAF8D251F}.Release|Any CPU.Build.0 = Release|Any CPU + {083BBAF9-356A-4C4B-B928-EB2DAF8D251F}.Release|arm.ActiveCfg = Release|Any CPU + {083BBAF9-356A-4C4B-B928-EB2DAF8D251F}.Release|arm64.ActiveCfg = Release|Any CPU + {083BBAF9-356A-4C4B-B928-EB2DAF8D251F}.Release|x64.ActiveCfg = Release|Any CPU + {083BBAF9-356A-4C4B-B928-EB2DAF8D251F}.Release|x64.Build.0 = Release|Any CPU + {083BBAF9-356A-4C4B-B928-EB2DAF8D251F}.Release|x86.ActiveCfg = Release|Any CPU + {083BBAF9-356A-4C4B-B928-EB2DAF8D251F}.Release|x86.Build.0 = Release|Any CPU + {083BBAF9-356A-4C4B-B928-EB2DAF8D251F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {083BBAF9-356A-4C4B-B928-EB2DAF8D251F}.Checked|arm.ActiveCfg = Debug|Any CPU + {083BBAF9-356A-4C4B-B928-EB2DAF8D251F}.Checked|arm64.ActiveCfg = Debug|Any CPU + {083BBAF9-356A-4C4B-B928-EB2DAF8D251F}.Checked|x64.ActiveCfg = Debug|Any CPU + {083BBAF9-356A-4C4B-B928-EB2DAF8D251F}.Checked|x86.ActiveCfg = Debug|Any CPU {052330E1-08F5-4AC3-987D-4C601D640414}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {052330E1-08F5-4AC3-987D-4C601D640414}.Debug|Any CPU.Build.0 = Debug|Any CPU + {052330E1-08F5-4AC3-987D-4C601D640414}.Debug|arm.ActiveCfg = Debug|Any CPU + {052330E1-08F5-4AC3-987D-4C601D640414}.Debug|arm64.ActiveCfg = Debug|Any CPU + {052330E1-08F5-4AC3-987D-4C601D640414}.Debug|x64.ActiveCfg = Debug|Any CPU + {052330E1-08F5-4AC3-987D-4C601D640414}.Debug|x64.Build.0 = Debug|Any CPU + {052330E1-08F5-4AC3-987D-4C601D640414}.Debug|x86.ActiveCfg = Debug|Any CPU + {052330E1-08F5-4AC3-987D-4C601D640414}.Debug|x86.Build.0 = Debug|Any CPU {052330E1-08F5-4AC3-987D-4C601D640414}.Release|Any CPU.ActiveCfg = Release|Any CPU {052330E1-08F5-4AC3-987D-4C601D640414}.Release|Any CPU.Build.0 = Release|Any CPU + {052330E1-08F5-4AC3-987D-4C601D640414}.Release|arm.ActiveCfg = Release|Any CPU + {052330E1-08F5-4AC3-987D-4C601D640414}.Release|arm64.ActiveCfg = Release|Any CPU + {052330E1-08F5-4AC3-987D-4C601D640414}.Release|x64.ActiveCfg = Release|Any CPU + {052330E1-08F5-4AC3-987D-4C601D640414}.Release|x64.Build.0 = Release|Any CPU + {052330E1-08F5-4AC3-987D-4C601D640414}.Release|x86.ActiveCfg = Release|Any CPU + {052330E1-08F5-4AC3-987D-4C601D640414}.Release|x86.Build.0 = Release|Any CPU + {052330E1-08F5-4AC3-987D-4C601D640414}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {052330E1-08F5-4AC3-987D-4C601D640414}.Checked|arm.ActiveCfg = Debug|Any CPU + {052330E1-08F5-4AC3-987D-4C601D640414}.Checked|arm64.ActiveCfg = Debug|Any CPU + {052330E1-08F5-4AC3-987D-4C601D640414}.Checked|x64.ActiveCfg = Debug|Any CPU + {052330E1-08F5-4AC3-987D-4C601D640414}.Checked|x86.ActiveCfg = Debug|Any CPU + {C741194C-DFF2-4B16-824B-29CFD021097C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C741194C-DFF2-4B16-824B-29CFD021097C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C741194C-DFF2-4B16-824B-29CFD021097C}.Debug|arm.ActiveCfg = Debug|Any CPU + {C741194C-DFF2-4B16-824B-29CFD021097C}.Debug|arm64.ActiveCfg = Debug|Any CPU + {C741194C-DFF2-4B16-824B-29CFD021097C}.Debug|x64.ActiveCfg = Debug|Any CPU + {C741194C-DFF2-4B16-824B-29CFD021097C}.Debug|x64.Build.0 = Debug|Any CPU + {C741194C-DFF2-4B16-824B-29CFD021097C}.Debug|x86.ActiveCfg = Debug|Any CPU + {C741194C-DFF2-4B16-824B-29CFD021097C}.Debug|x86.Build.0 = Debug|Any CPU + {C741194C-DFF2-4B16-824B-29CFD021097C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C741194C-DFF2-4B16-824B-29CFD021097C}.Release|Any CPU.Build.0 = Release|Any CPU + {C741194C-DFF2-4B16-824B-29CFD021097C}.Release|arm.ActiveCfg = Release|Any CPU + {C741194C-DFF2-4B16-824B-29CFD021097C}.Release|arm64.ActiveCfg = Release|Any CPU + {C741194C-DFF2-4B16-824B-29CFD021097C}.Release|x64.ActiveCfg = Release|Any CPU + {C741194C-DFF2-4B16-824B-29CFD021097C}.Release|x64.Build.0 = Release|Any CPU + {C741194C-DFF2-4B16-824B-29CFD021097C}.Release|x86.ActiveCfg = Release|Any CPU + {C741194C-DFF2-4B16-824B-29CFD021097C}.Release|x86.Build.0 = Release|Any CPU + {C741194C-DFF2-4B16-824B-29CFD021097C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {C741194C-DFF2-4B16-824B-29CFD021097C}.Checked|arm.ActiveCfg = Debug|Any CPU + {C741194C-DFF2-4B16-824B-29CFD021097C}.Checked|arm64.ActiveCfg = Debug|Any CPU + {C741194C-DFF2-4B16-824B-29CFD021097C}.Checked|x64.ActiveCfg = Debug|Any CPU + {C741194C-DFF2-4B16-824B-29CFD021097C}.Checked|x86.ActiveCfg = Debug|Any CPU + {47B3305D-FAA0-4008-A82D-107D66154032}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {47B3305D-FAA0-4008-A82D-107D66154032}.Debug|Any CPU.Build.0 = Debug|Any CPU + {47B3305D-FAA0-4008-A82D-107D66154032}.Debug|arm.ActiveCfg = Debug|Any CPU + {47B3305D-FAA0-4008-A82D-107D66154032}.Debug|arm64.ActiveCfg = Debug|Any CPU + {47B3305D-FAA0-4008-A82D-107D66154032}.Debug|x64.ActiveCfg = Debug|Any CPU + {47B3305D-FAA0-4008-A82D-107D66154032}.Debug|x64.Build.0 = Debug|Any CPU + {47B3305D-FAA0-4008-A82D-107D66154032}.Debug|x86.ActiveCfg = Debug|Any CPU + {47B3305D-FAA0-4008-A82D-107D66154032}.Debug|x86.Build.0 = Debug|Any CPU + {47B3305D-FAA0-4008-A82D-107D66154032}.Release|Any CPU.ActiveCfg = Release|Any CPU + {47B3305D-FAA0-4008-A82D-107D66154032}.Release|Any CPU.Build.0 = Release|Any CPU + {47B3305D-FAA0-4008-A82D-107D66154032}.Release|arm.ActiveCfg = Release|Any CPU + {47B3305D-FAA0-4008-A82D-107D66154032}.Release|arm64.ActiveCfg = Release|Any CPU + {47B3305D-FAA0-4008-A82D-107D66154032}.Release|x64.ActiveCfg = Release|Any CPU + {47B3305D-FAA0-4008-A82D-107D66154032}.Release|x64.Build.0 = Release|Any CPU + {47B3305D-FAA0-4008-A82D-107D66154032}.Release|x86.ActiveCfg = Release|Any CPU + {47B3305D-FAA0-4008-A82D-107D66154032}.Release|x86.Build.0 = Release|Any CPU + {47B3305D-FAA0-4008-A82D-107D66154032}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {47B3305D-FAA0-4008-A82D-107D66154032}.Checked|arm.ActiveCfg = Debug|Any CPU + {47B3305D-FAA0-4008-A82D-107D66154032}.Checked|arm64.ActiveCfg = Debug|Any CPU + {47B3305D-FAA0-4008-A82D-107D66154032}.Checked|x64.ActiveCfg = Debug|Any CPU + {47B3305D-FAA0-4008-A82D-107D66154032}.Checked|x86.ActiveCfg = Debug|Any CPU {A96F44C4-4CB8-41EB-ABBF-1C6E12664BCA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A96F44C4-4CB8-41EB-ABBF-1C6E12664BCA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A96F44C4-4CB8-41EB-ABBF-1C6E12664BCA}.Debug|arm.ActiveCfg = Debug|Any CPU + {A96F44C4-4CB8-41EB-ABBF-1C6E12664BCA}.Debug|arm64.ActiveCfg = Debug|Any CPU + {A96F44C4-4CB8-41EB-ABBF-1C6E12664BCA}.Debug|x64.ActiveCfg = Debug|Any CPU + {A96F44C4-4CB8-41EB-ABBF-1C6E12664BCA}.Debug|x64.Build.0 = Debug|Any CPU + {A96F44C4-4CB8-41EB-ABBF-1C6E12664BCA}.Debug|x86.ActiveCfg = Debug|Any CPU + {A96F44C4-4CB8-41EB-ABBF-1C6E12664BCA}.Debug|x86.Build.0 = Debug|Any CPU {A96F44C4-4CB8-41EB-ABBF-1C6E12664BCA}.Release|Any CPU.ActiveCfg = Release|Any CPU {A96F44C4-4CB8-41EB-ABBF-1C6E12664BCA}.Release|Any CPU.Build.0 = Release|Any CPU + {A96F44C4-4CB8-41EB-ABBF-1C6E12664BCA}.Release|arm.ActiveCfg = Release|Any CPU + {A96F44C4-4CB8-41EB-ABBF-1C6E12664BCA}.Release|arm64.ActiveCfg = Release|Any CPU + {A96F44C4-4CB8-41EB-ABBF-1C6E12664BCA}.Release|x64.ActiveCfg = Release|Any CPU + {A96F44C4-4CB8-41EB-ABBF-1C6E12664BCA}.Release|x64.Build.0 = Release|Any CPU + {A96F44C4-4CB8-41EB-ABBF-1C6E12664BCA}.Release|x86.ActiveCfg = Release|Any CPU + {A96F44C4-4CB8-41EB-ABBF-1C6E12664BCA}.Release|x86.Build.0 = Release|Any CPU + {A96F44C4-4CB8-41EB-ABBF-1C6E12664BCA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {A96F44C4-4CB8-41EB-ABBF-1C6E12664BCA}.Checked|arm.ActiveCfg = Debug|Any CPU + {A96F44C4-4CB8-41EB-ABBF-1C6E12664BCA}.Checked|arm64.ActiveCfg = Debug|Any CPU + {A96F44C4-4CB8-41EB-ABBF-1C6E12664BCA}.Checked|x64.ActiveCfg = Debug|Any CPU + {A96F44C4-4CB8-41EB-ABBF-1C6E12664BCA}.Checked|x86.ActiveCfg = Debug|Any CPU {A6769C35-8C53-46BF-84AE-44C921C39BEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A6769C35-8C53-46BF-84AE-44C921C39BEA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A6769C35-8C53-46BF-84AE-44C921C39BEA}.Debug|arm.ActiveCfg = Debug|Any CPU + {A6769C35-8C53-46BF-84AE-44C921C39BEA}.Debug|arm64.ActiveCfg = Debug|Any CPU + {A6769C35-8C53-46BF-84AE-44C921C39BEA}.Debug|x64.ActiveCfg = Debug|Any CPU + {A6769C35-8C53-46BF-84AE-44C921C39BEA}.Debug|x64.Build.0 = Debug|Any CPU + {A6769C35-8C53-46BF-84AE-44C921C39BEA}.Debug|x86.ActiveCfg = Debug|Any CPU + {A6769C35-8C53-46BF-84AE-44C921C39BEA}.Debug|x86.Build.0 = Debug|Any CPU {A6769C35-8C53-46BF-84AE-44C921C39BEA}.Release|Any CPU.ActiveCfg = Release|Any CPU {A6769C35-8C53-46BF-84AE-44C921C39BEA}.Release|Any CPU.Build.0 = Release|Any CPU + {A6769C35-8C53-46BF-84AE-44C921C39BEA}.Release|arm.ActiveCfg = Release|Any CPU + {A6769C35-8C53-46BF-84AE-44C921C39BEA}.Release|arm64.ActiveCfg = Release|Any CPU + {A6769C35-8C53-46BF-84AE-44C921C39BEA}.Release|x64.ActiveCfg = Release|Any CPU + {A6769C35-8C53-46BF-84AE-44C921C39BEA}.Release|x64.Build.0 = Release|Any CPU + {A6769C35-8C53-46BF-84AE-44C921C39BEA}.Release|x86.ActiveCfg = Release|Any CPU + {A6769C35-8C53-46BF-84AE-44C921C39BEA}.Release|x86.Build.0 = Release|Any CPU + {A6769C35-8C53-46BF-84AE-44C921C39BEA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {A6769C35-8C53-46BF-84AE-44C921C39BEA}.Checked|arm.ActiveCfg = Debug|Any CPU + {A6769C35-8C53-46BF-84AE-44C921C39BEA}.Checked|arm64.ActiveCfg = Debug|Any CPU + {A6769C35-8C53-46BF-84AE-44C921C39BEA}.Checked|x64.ActiveCfg = Debug|Any CPU + {A6769C35-8C53-46BF-84AE-44C921C39BEA}.Checked|x86.ActiveCfg = Debug|Any CPU {10F92CA0-8897-420A-9963-F46BC1274D28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {10F92CA0-8897-420A-9963-F46BC1274D28}.Debug|Any CPU.Build.0 = Debug|Any CPU + {10F92CA0-8897-420A-9963-F46BC1274D28}.Debug|arm.ActiveCfg = Debug|Any CPU + {10F92CA0-8897-420A-9963-F46BC1274D28}.Debug|arm64.ActiveCfg = Debug|Any CPU + {10F92CA0-8897-420A-9963-F46BC1274D28}.Debug|x64.ActiveCfg = Debug|Any CPU + {10F92CA0-8897-420A-9963-F46BC1274D28}.Debug|x64.Build.0 = Debug|Any CPU + {10F92CA0-8897-420A-9963-F46BC1274D28}.Debug|x86.ActiveCfg = Debug|Any CPU + {10F92CA0-8897-420A-9963-F46BC1274D28}.Debug|x86.Build.0 = Debug|Any CPU {10F92CA0-8897-420A-9963-F46BC1274D28}.Release|Any CPU.ActiveCfg = Release|Any CPU {10F92CA0-8897-420A-9963-F46BC1274D28}.Release|Any CPU.Build.0 = Release|Any CPU + {10F92CA0-8897-420A-9963-F46BC1274D28}.Release|arm.ActiveCfg = Release|Any CPU + {10F92CA0-8897-420A-9963-F46BC1274D28}.Release|arm64.ActiveCfg = Release|Any CPU + {10F92CA0-8897-420A-9963-F46BC1274D28}.Release|x64.ActiveCfg = Release|Any CPU + {10F92CA0-8897-420A-9963-F46BC1274D28}.Release|x64.Build.0 = Release|Any CPU + {10F92CA0-8897-420A-9963-F46BC1274D28}.Release|x86.ActiveCfg = Release|Any CPU + {10F92CA0-8897-420A-9963-F46BC1274D28}.Release|x86.Build.0 = Release|Any CPU + {10F92CA0-8897-420A-9963-F46BC1274D28}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {10F92CA0-8897-420A-9963-F46BC1274D28}.Checked|arm.ActiveCfg = Debug|Any CPU + {10F92CA0-8897-420A-9963-F46BC1274D28}.Checked|arm64.ActiveCfg = Debug|Any CPU + {10F92CA0-8897-420A-9963-F46BC1274D28}.Checked|x64.ActiveCfg = Debug|Any CPU + {10F92CA0-8897-420A-9963-F46BC1274D28}.Checked|x86.ActiveCfg = Debug|Any CPU {46B233B0-01EA-4569-BDA9-1A7526FAF6E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46B233B0-01EA-4569-BDA9-1A7526FAF6E6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {46B233B0-01EA-4569-BDA9-1A7526FAF6E6}.Debug|arm.ActiveCfg = Debug|Any CPU + {46B233B0-01EA-4569-BDA9-1A7526FAF6E6}.Debug|arm64.ActiveCfg = Debug|Any CPU + {46B233B0-01EA-4569-BDA9-1A7526FAF6E6}.Debug|x64.ActiveCfg = Debug|Any CPU + {46B233B0-01EA-4569-BDA9-1A7526FAF6E6}.Debug|x64.Build.0 = Debug|Any CPU + {46B233B0-01EA-4569-BDA9-1A7526FAF6E6}.Debug|x86.ActiveCfg = Debug|Any CPU + {46B233B0-01EA-4569-BDA9-1A7526FAF6E6}.Debug|x86.Build.0 = Debug|Any CPU {46B233B0-01EA-4569-BDA9-1A7526FAF6E6}.Release|Any CPU.ActiveCfg = Release|Any CPU {46B233B0-01EA-4569-BDA9-1A7526FAF6E6}.Release|Any CPU.Build.0 = Release|Any CPU + {46B233B0-01EA-4569-BDA9-1A7526FAF6E6}.Release|arm.ActiveCfg = Release|Any CPU + {46B233B0-01EA-4569-BDA9-1A7526FAF6E6}.Release|arm64.ActiveCfg = Release|Any CPU + {46B233B0-01EA-4569-BDA9-1A7526FAF6E6}.Release|x64.ActiveCfg = Release|Any CPU + {46B233B0-01EA-4569-BDA9-1A7526FAF6E6}.Release|x64.Build.0 = Release|Any CPU + {46B233B0-01EA-4569-BDA9-1A7526FAF6E6}.Release|x86.ActiveCfg = Release|Any CPU + {46B233B0-01EA-4569-BDA9-1A7526FAF6E6}.Release|x86.Build.0 = Release|Any CPU + {46B233B0-01EA-4569-BDA9-1A7526FAF6E6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {46B233B0-01EA-4569-BDA9-1A7526FAF6E6}.Checked|arm.ActiveCfg = Debug|Any CPU + {46B233B0-01EA-4569-BDA9-1A7526FAF6E6}.Checked|arm64.ActiveCfg = Debug|Any CPU + {46B233B0-01EA-4569-BDA9-1A7526FAF6E6}.Checked|x64.ActiveCfg = Debug|Any CPU + {46B233B0-01EA-4569-BDA9-1A7526FAF6E6}.Checked|x86.ActiveCfg = Debug|Any CPU {CDF9EADE-78CA-4775-8961-D52E066432C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CDF9EADE-78CA-4775-8961-D52E066432C9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CDF9EADE-78CA-4775-8961-D52E066432C9}.Debug|arm.ActiveCfg = Debug|Any CPU + {CDF9EADE-78CA-4775-8961-D52E066432C9}.Debug|arm64.ActiveCfg = Debug|Any CPU + {CDF9EADE-78CA-4775-8961-D52E066432C9}.Debug|x64.ActiveCfg = Debug|Any CPU + {CDF9EADE-78CA-4775-8961-D52E066432C9}.Debug|x64.Build.0 = Debug|Any CPU + {CDF9EADE-78CA-4775-8961-D52E066432C9}.Debug|x86.ActiveCfg = Debug|Any CPU + {CDF9EADE-78CA-4775-8961-D52E066432C9}.Debug|x86.Build.0 = Debug|Any CPU {CDF9EADE-78CA-4775-8961-D52E066432C9}.Release|Any CPU.ActiveCfg = Release|Any CPU {CDF9EADE-78CA-4775-8961-D52E066432C9}.Release|Any CPU.Build.0 = Release|Any CPU + {CDF9EADE-78CA-4775-8961-D52E066432C9}.Release|arm.ActiveCfg = Release|Any CPU + {CDF9EADE-78CA-4775-8961-D52E066432C9}.Release|arm64.ActiveCfg = Release|Any CPU + {CDF9EADE-78CA-4775-8961-D52E066432C9}.Release|x64.ActiveCfg = Release|Any CPU + {CDF9EADE-78CA-4775-8961-D52E066432C9}.Release|x64.Build.0 = Release|Any CPU + {CDF9EADE-78CA-4775-8961-D52E066432C9}.Release|x86.ActiveCfg = Release|Any CPU + {CDF9EADE-78CA-4775-8961-D52E066432C9}.Release|x86.Build.0 = Release|Any CPU + {CDF9EADE-78CA-4775-8961-D52E066432C9}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {CDF9EADE-78CA-4775-8961-D52E066432C9}.Checked|arm.ActiveCfg = Debug|Any CPU + {CDF9EADE-78CA-4775-8961-D52E066432C9}.Checked|arm64.ActiveCfg = Debug|Any CPU + {CDF9EADE-78CA-4775-8961-D52E066432C9}.Checked|x64.ActiveCfg = Debug|Any CPU + {CDF9EADE-78CA-4775-8961-D52E066432C9}.Checked|x86.ActiveCfg = Debug|Any CPU {A82F83FE-3B02-4EAA-8763-1D43AB0E4E6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A82F83FE-3B02-4EAA-8763-1D43AB0E4E6A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A82F83FE-3B02-4EAA-8763-1D43AB0E4E6A}.Debug|arm.ActiveCfg = Debug|Any CPU + {A82F83FE-3B02-4EAA-8763-1D43AB0E4E6A}.Debug|arm64.ActiveCfg = Debug|Any CPU + {A82F83FE-3B02-4EAA-8763-1D43AB0E4E6A}.Debug|x64.ActiveCfg = Debug|Any CPU + {A82F83FE-3B02-4EAA-8763-1D43AB0E4E6A}.Debug|x64.Build.0 = Debug|Any CPU + {A82F83FE-3B02-4EAA-8763-1D43AB0E4E6A}.Debug|x86.ActiveCfg = Debug|Any CPU + {A82F83FE-3B02-4EAA-8763-1D43AB0E4E6A}.Debug|x86.Build.0 = Debug|Any CPU {A82F83FE-3B02-4EAA-8763-1D43AB0E4E6A}.Release|Any CPU.ActiveCfg = Release|Any CPU {A82F83FE-3B02-4EAA-8763-1D43AB0E4E6A}.Release|Any CPU.Build.0 = Release|Any CPU + {A82F83FE-3B02-4EAA-8763-1D43AB0E4E6A}.Release|arm.ActiveCfg = Release|Any CPU + {A82F83FE-3B02-4EAA-8763-1D43AB0E4E6A}.Release|arm64.ActiveCfg = Release|Any CPU + {A82F83FE-3B02-4EAA-8763-1D43AB0E4E6A}.Release|x64.ActiveCfg = Release|Any CPU + {A82F83FE-3B02-4EAA-8763-1D43AB0E4E6A}.Release|x64.Build.0 = Release|Any CPU + {A82F83FE-3B02-4EAA-8763-1D43AB0E4E6A}.Release|x86.ActiveCfg = Release|Any CPU + {A82F83FE-3B02-4EAA-8763-1D43AB0E4E6A}.Release|x86.Build.0 = Release|Any CPU + {A82F83FE-3B02-4EAA-8763-1D43AB0E4E6A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {A82F83FE-3B02-4EAA-8763-1D43AB0E4E6A}.Checked|arm.ActiveCfg = Debug|Any CPU + {A82F83FE-3B02-4EAA-8763-1D43AB0E4E6A}.Checked|arm64.ActiveCfg = Debug|Any CPU + {A82F83FE-3B02-4EAA-8763-1D43AB0E4E6A}.Checked|x64.ActiveCfg = Debug|Any CPU + {A82F83FE-3B02-4EAA-8763-1D43AB0E4E6A}.Checked|x86.ActiveCfg = Debug|Any CPU + {6FBAC850-1A4D-4906-B24D-EF89EB925152}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6FBAC850-1A4D-4906-B24D-EF89EB925152}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6FBAC850-1A4D-4906-B24D-EF89EB925152}.Debug|arm.ActiveCfg = Debug|Any CPU + {6FBAC850-1A4D-4906-B24D-EF89EB925152}.Debug|arm64.ActiveCfg = Debug|Any CPU + {6FBAC850-1A4D-4906-B24D-EF89EB925152}.Debug|x64.ActiveCfg = Debug|Any CPU + {6FBAC850-1A4D-4906-B24D-EF89EB925152}.Debug|x64.Build.0 = Debug|Any CPU + {6FBAC850-1A4D-4906-B24D-EF89EB925152}.Debug|x86.ActiveCfg = Debug|Any CPU + {6FBAC850-1A4D-4906-B24D-EF89EB925152}.Debug|x86.Build.0 = Debug|Any CPU + {6FBAC850-1A4D-4906-B24D-EF89EB925152}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6FBAC850-1A4D-4906-B24D-EF89EB925152}.Release|Any CPU.Build.0 = Release|Any CPU + {6FBAC850-1A4D-4906-B24D-EF89EB925152}.Release|arm.ActiveCfg = Release|Any CPU + {6FBAC850-1A4D-4906-B24D-EF89EB925152}.Release|arm64.ActiveCfg = Release|Any CPU + {6FBAC850-1A4D-4906-B24D-EF89EB925152}.Release|x64.ActiveCfg = Release|Any CPU + {6FBAC850-1A4D-4906-B24D-EF89EB925152}.Release|x64.Build.0 = Release|Any CPU + {6FBAC850-1A4D-4906-B24D-EF89EB925152}.Release|x86.ActiveCfg = Release|Any CPU + {6FBAC850-1A4D-4906-B24D-EF89EB925152}.Release|x86.Build.0 = Release|Any CPU + {6FBAC850-1A4D-4906-B24D-EF89EB925152}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {6FBAC850-1A4D-4906-B24D-EF89EB925152}.Checked|arm.ActiveCfg = Debug|Any CPU + {6FBAC850-1A4D-4906-B24D-EF89EB925152}.Checked|arm64.ActiveCfg = Debug|Any CPU + {6FBAC850-1A4D-4906-B24D-EF89EB925152}.Checked|x64.ActiveCfg = Debug|Any CPU + {6FBAC850-1A4D-4906-B24D-EF89EB925152}.Checked|x86.ActiveCfg = Debug|Any CPU + {FDBE164F-BCC1-47F4-BE02-14AD93E11E05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FDBE164F-BCC1-47F4-BE02-14AD93E11E05}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FDBE164F-BCC1-47F4-BE02-14AD93E11E05}.Debug|arm.ActiveCfg = Debug|Any CPU + {FDBE164F-BCC1-47F4-BE02-14AD93E11E05}.Debug|arm64.ActiveCfg = Debug|Any CPU + {FDBE164F-BCC1-47F4-BE02-14AD93E11E05}.Debug|x64.ActiveCfg = Debug|Any CPU + {FDBE164F-BCC1-47F4-BE02-14AD93E11E05}.Debug|x64.Build.0 = Debug|Any CPU + {FDBE164F-BCC1-47F4-BE02-14AD93E11E05}.Debug|x86.ActiveCfg = Debug|Any CPU + {FDBE164F-BCC1-47F4-BE02-14AD93E11E05}.Debug|x86.Build.0 = Debug|Any CPU + {FDBE164F-BCC1-47F4-BE02-14AD93E11E05}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FDBE164F-BCC1-47F4-BE02-14AD93E11E05}.Release|Any CPU.Build.0 = Release|Any CPU + {FDBE164F-BCC1-47F4-BE02-14AD93E11E05}.Release|arm.ActiveCfg = Release|Any CPU + {FDBE164F-BCC1-47F4-BE02-14AD93E11E05}.Release|arm64.ActiveCfg = Release|Any CPU + {FDBE164F-BCC1-47F4-BE02-14AD93E11E05}.Release|x64.ActiveCfg = Release|Any CPU + {FDBE164F-BCC1-47F4-BE02-14AD93E11E05}.Release|x64.Build.0 = Release|Any CPU + {FDBE164F-BCC1-47F4-BE02-14AD93E11E05}.Release|x86.ActiveCfg = Release|Any CPU + {FDBE164F-BCC1-47F4-BE02-14AD93E11E05}.Release|x86.Build.0 = Release|Any CPU + {FDBE164F-BCC1-47F4-BE02-14AD93E11E05}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {FDBE164F-BCC1-47F4-BE02-14AD93E11E05}.Checked|arm.ActiveCfg = Debug|Any CPU + {FDBE164F-BCC1-47F4-BE02-14AD93E11E05}.Checked|arm64.ActiveCfg = Debug|Any CPU + {FDBE164F-BCC1-47F4-BE02-14AD93E11E05}.Checked|x64.ActiveCfg = Debug|Any CPU + {FDBE164F-BCC1-47F4-BE02-14AD93E11E05}.Checked|x86.ActiveCfg = Debug|Any CPU + {DE1E971B-BEE5-4184-B290-C9A8EF21BBB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DE1E971B-BEE5-4184-B290-C9A8EF21BBB1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DE1E971B-BEE5-4184-B290-C9A8EF21BBB1}.Debug|arm.ActiveCfg = Debug|Any CPU + {DE1E971B-BEE5-4184-B290-C9A8EF21BBB1}.Debug|arm64.ActiveCfg = Debug|Any CPU + {DE1E971B-BEE5-4184-B290-C9A8EF21BBB1}.Debug|x64.ActiveCfg = Debug|Any CPU + {DE1E971B-BEE5-4184-B290-C9A8EF21BBB1}.Debug|x64.Build.0 = Debug|Any CPU + {DE1E971B-BEE5-4184-B290-C9A8EF21BBB1}.Debug|x86.ActiveCfg = Debug|Any CPU + {DE1E971B-BEE5-4184-B290-C9A8EF21BBB1}.Debug|x86.Build.0 = Debug|Any CPU + {DE1E971B-BEE5-4184-B290-C9A8EF21BBB1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DE1E971B-BEE5-4184-B290-C9A8EF21BBB1}.Release|Any CPU.Build.0 = Release|Any CPU + {DE1E971B-BEE5-4184-B290-C9A8EF21BBB1}.Release|arm.ActiveCfg = Release|Any CPU + {DE1E971B-BEE5-4184-B290-C9A8EF21BBB1}.Release|arm64.ActiveCfg = Release|Any CPU + {DE1E971B-BEE5-4184-B290-C9A8EF21BBB1}.Release|x64.ActiveCfg = Release|Any CPU + {DE1E971B-BEE5-4184-B290-C9A8EF21BBB1}.Release|x64.Build.0 = Release|Any CPU + {DE1E971B-BEE5-4184-B290-C9A8EF21BBB1}.Release|x86.ActiveCfg = Release|Any CPU + {DE1E971B-BEE5-4184-B290-C9A8EF21BBB1}.Release|x86.Build.0 = Release|Any CPU + {DE1E971B-BEE5-4184-B290-C9A8EF21BBB1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {DE1E971B-BEE5-4184-B290-C9A8EF21BBB1}.Checked|arm.ActiveCfg = Debug|Any CPU + {DE1E971B-BEE5-4184-B290-C9A8EF21BBB1}.Checked|arm64.ActiveCfg = Debug|Any CPU + {DE1E971B-BEE5-4184-B290-C9A8EF21BBB1}.Checked|x64.ActiveCfg = Debug|Any CPU + {DE1E971B-BEE5-4184-B290-C9A8EF21BBB1}.Checked|x86.ActiveCfg = Debug|Any CPU + {DF045410-2A19-45A7-88DA-7FA5ECEAFF7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DF045410-2A19-45A7-88DA-7FA5ECEAFF7A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DF045410-2A19-45A7-88DA-7FA5ECEAFF7A}.Debug|arm.ActiveCfg = Debug|Any CPU + {DF045410-2A19-45A7-88DA-7FA5ECEAFF7A}.Debug|arm64.ActiveCfg = Debug|Any CPU + {DF045410-2A19-45A7-88DA-7FA5ECEAFF7A}.Debug|x64.ActiveCfg = Debug|Any CPU + {DF045410-2A19-45A7-88DA-7FA5ECEAFF7A}.Debug|x64.Build.0 = Debug|Any CPU + {DF045410-2A19-45A7-88DA-7FA5ECEAFF7A}.Debug|x86.ActiveCfg = Debug|Any CPU + {DF045410-2A19-45A7-88DA-7FA5ECEAFF7A}.Debug|x86.Build.0 = Debug|Any CPU + {DF045410-2A19-45A7-88DA-7FA5ECEAFF7A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DF045410-2A19-45A7-88DA-7FA5ECEAFF7A}.Release|Any CPU.Build.0 = Release|Any CPU + {DF045410-2A19-45A7-88DA-7FA5ECEAFF7A}.Release|arm.ActiveCfg = Release|Any CPU + {DF045410-2A19-45A7-88DA-7FA5ECEAFF7A}.Release|arm64.ActiveCfg = Release|Any CPU + {DF045410-2A19-45A7-88DA-7FA5ECEAFF7A}.Release|x64.ActiveCfg = Release|Any CPU + {DF045410-2A19-45A7-88DA-7FA5ECEAFF7A}.Release|x64.Build.0 = Release|Any CPU + {DF045410-2A19-45A7-88DA-7FA5ECEAFF7A}.Release|x86.ActiveCfg = Release|Any CPU + {DF045410-2A19-45A7-88DA-7FA5ECEAFF7A}.Release|x86.Build.0 = Release|Any CPU + {DF045410-2A19-45A7-88DA-7FA5ECEAFF7A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {DF045410-2A19-45A7-88DA-7FA5ECEAFF7A}.Checked|arm.ActiveCfg = Debug|Any CPU + {DF045410-2A19-45A7-88DA-7FA5ECEAFF7A}.Checked|arm64.ActiveCfg = Debug|Any CPU + {DF045410-2A19-45A7-88DA-7FA5ECEAFF7A}.Checked|x64.ActiveCfg = Debug|Any CPU + {DF045410-2A19-45A7-88DA-7FA5ECEAFF7A}.Checked|x86.ActiveCfg = Debug|Any CPU + {945D5BB6-FB9B-4489-816A-7B4E97843CF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {945D5BB6-FB9B-4489-816A-7B4E97843CF8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {945D5BB6-FB9B-4489-816A-7B4E97843CF8}.Debug|arm.ActiveCfg = Debug|Any CPU + {945D5BB6-FB9B-4489-816A-7B4E97843CF8}.Debug|arm64.ActiveCfg = Debug|Any CPU + {945D5BB6-FB9B-4489-816A-7B4E97843CF8}.Debug|x64.ActiveCfg = Debug|Any CPU + {945D5BB6-FB9B-4489-816A-7B4E97843CF8}.Debug|x64.Build.0 = Debug|Any CPU + {945D5BB6-FB9B-4489-816A-7B4E97843CF8}.Debug|x86.ActiveCfg = Debug|Any CPU + {945D5BB6-FB9B-4489-816A-7B4E97843CF8}.Debug|x86.Build.0 = Debug|Any CPU + {945D5BB6-FB9B-4489-816A-7B4E97843CF8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {945D5BB6-FB9B-4489-816A-7B4E97843CF8}.Release|Any CPU.Build.0 = Release|Any CPU + {945D5BB6-FB9B-4489-816A-7B4E97843CF8}.Release|arm.ActiveCfg = Release|Any CPU + {945D5BB6-FB9B-4489-816A-7B4E97843CF8}.Release|arm64.ActiveCfg = Release|Any CPU + {945D5BB6-FB9B-4489-816A-7B4E97843CF8}.Release|x64.ActiveCfg = Release|Any CPU + {945D5BB6-FB9B-4489-816A-7B4E97843CF8}.Release|x64.Build.0 = Release|Any CPU + {945D5BB6-FB9B-4489-816A-7B4E97843CF8}.Release|x86.ActiveCfg = Release|Any CPU + {945D5BB6-FB9B-4489-816A-7B4E97843CF8}.Release|x86.Build.0 = Release|Any CPU + {945D5BB6-FB9B-4489-816A-7B4E97843CF8}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {945D5BB6-FB9B-4489-816A-7B4E97843CF8}.Checked|arm.ActiveCfg = Debug|Any CPU + {945D5BB6-FB9B-4489-816A-7B4E97843CF8}.Checked|arm64.ActiveCfg = Debug|Any CPU + {945D5BB6-FB9B-4489-816A-7B4E97843CF8}.Checked|x64.ActiveCfg = Debug|Any CPU + {945D5BB6-FB9B-4489-816A-7B4E97843CF8}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution + {3F896EC8-24DC-453E-A937-8AC663EE2AB2} = {34998B2E-86EF-4DB2-BBD1-442F5FD0D83D} {05604AC6-E1DA-460E-9A38-57EB19BE3327} = {DE91E835-DB5D-4FAD-B992-1A98B24B87E9} {44080626-DF98-470B-BCA1-CC3DFFCB94E3} = {DE91E835-DB5D-4FAD-B992-1A98B24B87E9} - {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} - {A96F44C4-4CB8-41EB-ABBF-1C6E12664BCA} = {51C4F716-E3A7-4DBC-BC81-CAC8D2D33F14} - {10F92CA0-8897-420A-9963-F46BC1274D28} = {51C4F716-E3A7-4DBC-BC81-CAC8D2D33F14} - {CDF9EADE-78CA-4775-8961-D52E066432C9} = {51C4F716-E3A7-4DBC-BC81-CAC8D2D33F14} + {516999D7-BFBD-41D1-A96C-69EBCDB6CF64} = {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} + {12EE4F0D-57F9-48A4-835E-CE4B16DEF1F6} = {C2159C53-1E91-486D-A66C-E658FB73A87F} + {47B3305D-FAA0-4008-A82D-107D66154032} = {C2159C53-1E91-486D-A66C-E658FB73A87F} {A6769C35-8C53-46BF-84AE-44C921C39BEA} = {C2159C53-1E91-486D-A66C-E658FB73A87F} {46B233B0-01EA-4569-BDA9-1A7526FAF6E6} = {C2159C53-1E91-486D-A66C-E658FB73A87F} {A82F83FE-3B02-4EAA-8763-1D43AB0E4E6A} = {C2159C53-1E91-486D-A66C-E658FB73A87F} - {C7F62EB6-E16F-4A1F-A840-C8812BB69C53} = {CBDB0A5C-FDD0-4B00-8840-D40E4D6B17DB} + {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} + {6EFBC637-BE12-4544-9E21-CAACBA07C68B} = {51C4F716-E3A7-4DBC-BC81-CAC8D2D33F14} + {C741194C-DFF2-4B16-824B-29CFD021097C} = {51C4F716-E3A7-4DBC-BC81-CAC8D2D33F14} + {A96F44C4-4CB8-41EB-ABBF-1C6E12664BCA} = {51C4F716-E3A7-4DBC-BC81-CAC8D2D33F14} + {10F92CA0-8897-420A-9963-F46BC1274D28} = {51C4F716-E3A7-4DBC-BC81-CAC8D2D33F14} + {CDF9EADE-78CA-4775-8961-D52E066432C9} = {51C4F716-E3A7-4DBC-BC81-CAC8D2D33F14} + {87EEC1DB-F423-49B7-BC50-7FFAF68EB099} = {CBDB0A5C-FDD0-4B00-8840-D40E4D6B17DB} {083BBAF9-356A-4C4B-B928-EB2DAF8D251F} = {CBDB0A5C-FDD0-4B00-8840-D40E4D6B17DB} {052330E1-08F5-4AC3-987D-4C601D640414} = {CBDB0A5C-FDD0-4B00-8840-D40E4D6B17DB} + {6FBAC850-1A4D-4906-B24D-EF89EB925152} = {BD4D4F5A-FF81-4994-80EB-A1B05E553822} + {FDBE164F-BCC1-47F4-BE02-14AD93E11E05} = {BD4D4F5A-FF81-4994-80EB-A1B05E553822} + {BD4D4F5A-FF81-4994-80EB-A1B05E553822} = {0C80CE34-037A-496E-BE3D-91108B0A988B} + {DE1E971B-BEE5-4184-B290-C9A8EF21BBB1} = {085B386F-7916-4A74-BED4-DCDA37AB91F9} + {DF045410-2A19-45A7-88DA-7FA5ECEAFF7A} = {085B386F-7916-4A74-BED4-DCDA37AB91F9} + {085B386F-7916-4A74-BED4-DCDA37AB91F9} = {0C80CE34-037A-496E-BE3D-91108B0A988B} + {945D5BB6-FB9B-4489-816A-7B4E97843CF8} = {E60386BE-4696-4126-884F-D202770ECF60} + {E60386BE-4696-4126-884F-D202770ECF60} = {0C80CE34-037A-496E-BE3D-91108B0A988B} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {600939C3-C746-4C12-9FA6-82208BD6CD03} diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/CompatibilitySuppressions.xml b/src/libraries/System.DirectoryServices.AccountManagement/src/CompatibilitySuppressions.xml new file mode 100644 index 00000000000000..a97243ba1c2d25 --- /dev/null +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/CompatibilitySuppressions.xml @@ -0,0 +1,32 @@ + + + + + CP0003 + System.DirectoryServices.AccountManagement, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + lib/net6.0/System.DirectoryServices.AccountManagement.dll + lib/netstandard2.0/System.DirectoryServices.AccountManagement.dll + true + + + CP0003 + System.DirectoryServices.AccountManagement, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + lib/net7.0/System.DirectoryServices.AccountManagement.dll + lib/netstandard2.0/System.DirectoryServices.AccountManagement.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.DirectoryServices.AccountManagement.dll + lib/netstandard2.0/System.DirectoryServices.AccountManagement.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.DirectoryServices.AccountManagement.dll + lib/netstandard2.0/System.DirectoryServices.AccountManagement.dll + true + + \ No newline at end of file diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/PACKAGE.md b/src/libraries/System.DirectoryServices.AccountManagement/src/PACKAGE.md new file mode 100644 index 00000000000000..bee50af73d3c45 --- /dev/null +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/PACKAGE.md @@ -0,0 +1,74 @@ +## About + + +Provides uniform access and manipulation of security principals across multiple principal stores. The principal objects in the Account Management API include computer, group and user objects. The principal stores includes: + * Active Directory Domain Services (AD DS) + * Active Directory Lightweight Directory Services (AD LDS) + * Machine SAM (MSAM). + +## Key Features + + + +* Basic directory operations such as creating and updating security principals. The application requires less knowledge of the underlying stores to perform these operations. +* Applications can extend the object model to include new types of directory objects. +* Account management tasks, such as enabling and disabling a user account. +* Cross-store support allows group objects in the Active Directory Domain Services (AD DS), Active Directory Lightweight Directory Services (AD LDS), and Machine SAM (MSAM) databases to contain members from different types of stores. +* Query by example searching, available on the PrincipalSearcher class, enables applications to set properties on a principal object and search the selected store for other objects that contain matching property values. +* Enhanced search on computer, user and group principal objects enables applications to search the selected store for matching principal objects. +* Recursive search, available on the group principal object, enables applications to search a group recursively and return only principal objects that are leaf nodes. +* Credential validation against the Machine SAM, AD DS, and AD LS stores. +* Connections speeds are increased by using the Fast Concurrent Bind (FSB) feature when available. Connection caching decreases the number of ports used. + +## How to Use + + + +```cs +// Create the principal context for the usr object. +PrincipalContext ctx = new PrincipalContext(ContextType.Domain, "fabrikam.com", "CN=Users,DC=fabrikam,DC=com", "administrator", "securelyStoredPassword"); + +// Create the principal user object from the context. +UserPrincipal usr = new UserPrincipal(ctx); +usr.AdvancedSearchFilter.LastLogonTime(DateTime.Now, MatchType.LessThan); +usr.AdvancedSearchFilter.LastLogonTime(DateTime.Yesterday, MatchType.GreaterThan); + +// Create a PrincipalSearcher object. +PrincipalSearcher ps = new PrincipalSearcher(usr); +PrincipalSearchResult fr = ps.FindAll(); +foreach (UserPrincipal u in results) +{ + Console.WriteLine(u.Name); +} +``` + +## Main Types + + + +The main types provided by this library are: + +* `System.DirectoryServices.AccountManagement.PrincipalContext` +* `System.DirectoryServices.AccountManagement.PrincipalSearcher` +* `System.DirectoryServices.AccountManagement.Principal` and its subclasses: `System.DirectoryServices.AccountManagement.UserPrincipal`, `System.DirectoryServices.AccountManagement.GroupPrincipal` and `System.DirectoryServices.AccountManagement.ComputerPrincipal` + +## Additional Documentation + + + +* Conceptual documentations: + - [System.DirectoryServices.AccountManagement Namespace Overview](https://learn.microsoft.com/previous-versions/bb384379(v=vs.90)) + - [About System.DirectoryServices.AccountManagement](https://learn.microsoft.com//previous-versions/bb384375(v=vs.90)) + - [Using System.DirectoryServices.AccountManagement](https://learn.microsoft.com/previous-versions/bb384384(v=vs.90)) +* API documentation + - [System.DirectoryServices.AccountManagement namespace](https://learn.microsoft.com/dotnet/api/system.directoryservices.accountmanagement) + +## Related Packages + +[System.DirectoryServices](https://learn.microsoft.com/dotnet/api/system.directoryservices) + +## Feedback & Contributing + + + +System.DirectoryServices.AccountManagement is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System.DirectoryServices.AccountManagement.csproj b/src/libraries/System.DirectoryServices.AccountManagement/src/System.DirectoryServices.AccountManagement.csproj index 31119b28425124..ce36658a6eaacd 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System.DirectoryServices.AccountManagement.csproj +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System.DirectoryServices.AccountManagement.csproj @@ -1,4 +1,5 @@ + $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent);$(NetCoreAppPrevious)-windows;$(NetCoreAppPrevious);$(NetCoreAppMinimum)-windows;$(NetCoreAppMinimum);netstandard2.0 true @@ -94,6 +95,7 @@ + - + @@ -208,4 +210,5 @@ + diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreCtx.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreCtx.cs index 503ce5eb3a62ab..f2c864621be436 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreCtx.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreCtx.cs @@ -2417,9 +2417,13 @@ protected virtual void LoadDomainInfo() // From that, we can build the DNS Domain Name this.dnsHostName = ADUtils.GetServerName(this.ctxBase); + // Pull the requested port number + Uri ldapUri = new Uri(this.ctxBase.Path); + int port = ldapUri.Port != -1 ? ldapUri.Port : (ldapUri.Scheme.ToUpperInvariant() == "LDAPS" ? 636 : 389); + string dnsDomainName = ""; - using (DirectoryEntry rootDse = new DirectoryEntry("LDAP://" + this.dnsHostName + "/rootDse", "", "", AuthenticationTypes.Anonymous)) + using (DirectoryEntry rootDse = new DirectoryEntry("LDAP://" + this.dnsHostName + ":" + port + "/rootDse", "", "", AuthenticationTypes.Anonymous)) { this.defaultNamingContext = (string)rootDse.Properties["defaultNamingContext"][0]; this.contextBasePartitionDN = this.defaultNamingContext; diff --git a/src/libraries/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols.sln b/src/libraries/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols.sln index 9ac67fea9954da..93d0471fae67e2 100644 --- a/src/libraries/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols.sln +++ b/src/libraries/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols.sln @@ -1,6 +1,10 @@ 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", "{F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{59D900EB-CABB-4CA9-9BE4-9855ADC32752}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Drawing.Common", "..\shims\stubs\System.Drawing.Common.csproj", "{7A9021C4-769A-4A19-9244-0F575D4E96AE}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.DirectoryServices.Protocols", "ref\System.DirectoryServices.Protocols.csproj", "{E61CD2AC-E0BB-4FC4-99D3-528AEDDB271B}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.DirectoryServices.Protocols", "src\System.DirectoryServices.Protocols.csproj", "{71D4A6E0-0A63-4232-9EBB-E2D46C7E69B2}" @@ -11,12 +15,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.DirectoryServices", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.DirectoryServices", "..\System.DirectoryServices\src\System.DirectoryServices.csproj", "{E1F18567-C282-456B-8CCC-677702609FAF}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{875B1171-C38D-4842-B3E7-2D4D685F292B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{A5D41312-C3C2-4153-AB58-EE8717C8D379}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{25243F48-E92B-4EA8-B1D2-7DE846C03AC5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.Uri", "..\System.Private.Uri\src\System.Private.Uri.csproj", "{6CCAD93E-1888-4610-8EB8-7043B7C61AE8}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{2C3750CD-EEE9-4452-B901-AF3084E6B9B2}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{8AC2B9D8-7C86-4F20-9E4C-369ACE927BF5}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{50734B6B-B918-4C3D-B6BB-3F38E2DE7169}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\src\System.Runtime.csproj", "{E0FFABB4-08A9-4259-B9DB-52E11AEBA4F3}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Permissions", "..\System.Security.Permissions\ref\System.Security.Permissions.csproj", "{493BCA01-A5FC-4C5A-9E85-A0E23E3CD425}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Permissions", "..\System.Security.Permissions\src\System.Security.Permissions.csproj", "{167E89F1-63F0-4E47-B67E-9931589E75CE}" @@ -25,90 +37,598 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", "..\System.Windows.Extensions\src\System.Windows.Extensions.csproj", "{19B414C5-ACD0-4E78-B0A0-C698132F1988}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{58AD219B-7E2F-4587-9D50-8ED0E0F9CF6A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{28574109-6A9B-47FF-88A7-D5EEDB4B17C3}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{FF4142E3-375C-4658-A1FD-F4C895F7B7B5}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{7772368D-D8F9-428B-BA07-FE1C0BC3A3E5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{8A89CF04-DDA9-4BC6-89E6-44C7B871169B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{0E308EAA-6CC8-4302-B245-CA31B600BCA9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{9C89654D-40D8-406E-AE79-9ABBE1C9FDC7}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{3AC935C8-2FD6-4B40-96D8-FCF4D64E2524}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{58AD219B-7E2F-4587-9D50-8ED0E0F9CF6A}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{7D7459AB-75AF-4AEF-90CA-11FD253C2B1C}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{FF4142E3-375C-4658-A1FD-F4C895F7B7B5}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{6BC70A1F-00D5-482D-9603-DD6C6E84AE4B}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{D969D172-A67B-4C3D-A79B-2B1E0EE05E22}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{D25ECFF0-8A66-488A-AD69-5486D70DF226}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{5301EE66-474D-48DB-9510-A6D2C216EF27}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{27218DDE-108C-4ED2-B8D1-4D69BC012864}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|arm = Debug|arm + Debug|arm64 = Debug|arm64 + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|arm = Release|arm + Release|arm64 = Release|arm64 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + Checked|Any CPU = Checked|Any CPU + Checked|arm = Checked|arm + Checked|arm64 = Checked|arm64 + Checked|x64 = Checked|x64 + Checked|x86 = Checked|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6}.Debug|Any CPU.ActiveCfg = Debug|x64 + {F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6}.Debug|Any CPU.Build.0 = Debug|x64 + {F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6}.Debug|arm.ActiveCfg = Debug|arm + {F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6}.Debug|arm.Build.0 = Debug|arm + {F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6}.Debug|arm64.ActiveCfg = Debug|arm64 + {F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6}.Debug|arm64.Build.0 = Debug|arm64 + {F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6}.Debug|x64.ActiveCfg = Debug|x64 + {F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6}.Debug|x64.Build.0 = Debug|x64 + {F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6}.Debug|x86.ActiveCfg = Debug|x86 + {F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6}.Debug|x86.Build.0 = Debug|x86 + {F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6}.Release|Any CPU.ActiveCfg = Release|x64 + {F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6}.Release|Any CPU.Build.0 = Release|x64 + {F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6}.Release|arm.ActiveCfg = Release|arm + {F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6}.Release|arm.Build.0 = Release|arm + {F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6}.Release|arm64.ActiveCfg = Release|arm64 + {F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6}.Release|arm64.Build.0 = Release|arm64 + {F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6}.Release|x64.ActiveCfg = Release|x64 + {F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6}.Release|x64.Build.0 = Release|x64 + {F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6}.Release|x86.ActiveCfg = Release|x86 + {F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6}.Release|x86.Build.0 = Release|x86 + {F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6}.Checked|Any CPU.ActiveCfg = Checked|x64 + {F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6}.Checked|Any CPU.Build.0 = Checked|x64 + {F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6}.Checked|arm.ActiveCfg = Checked|arm + {F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6}.Checked|arm.Build.0 = Checked|arm + {F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6}.Checked|arm64.ActiveCfg = Checked|arm64 + {F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6}.Checked|arm64.Build.0 = Checked|arm64 + {F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6}.Checked|x64.ActiveCfg = Checked|x64 + {F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6}.Checked|x64.Build.0 = Checked|x64 + {F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6}.Checked|x86.ActiveCfg = Checked|x86 + {F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6}.Checked|x86.Build.0 = Checked|x86 {59D900EB-CABB-4CA9-9BE4-9855ADC32752}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {59D900EB-CABB-4CA9-9BE4-9855ADC32752}.Debug|Any CPU.Build.0 = Debug|Any CPU + {59D900EB-CABB-4CA9-9BE4-9855ADC32752}.Debug|arm.ActiveCfg = Debug|Any CPU + {59D900EB-CABB-4CA9-9BE4-9855ADC32752}.Debug|arm64.ActiveCfg = Debug|Any CPU + {59D900EB-CABB-4CA9-9BE4-9855ADC32752}.Debug|x64.ActiveCfg = Debug|Any CPU + {59D900EB-CABB-4CA9-9BE4-9855ADC32752}.Debug|x64.Build.0 = Debug|Any CPU + {59D900EB-CABB-4CA9-9BE4-9855ADC32752}.Debug|x86.ActiveCfg = Debug|Any CPU + {59D900EB-CABB-4CA9-9BE4-9855ADC32752}.Debug|x86.Build.0 = Debug|Any CPU {59D900EB-CABB-4CA9-9BE4-9855ADC32752}.Release|Any CPU.ActiveCfg = Release|Any CPU {59D900EB-CABB-4CA9-9BE4-9855ADC32752}.Release|Any CPU.Build.0 = Release|Any CPU + {59D900EB-CABB-4CA9-9BE4-9855ADC32752}.Release|arm.ActiveCfg = Release|Any CPU + {59D900EB-CABB-4CA9-9BE4-9855ADC32752}.Release|arm64.ActiveCfg = Release|Any CPU + {59D900EB-CABB-4CA9-9BE4-9855ADC32752}.Release|x64.ActiveCfg = Release|Any CPU + {59D900EB-CABB-4CA9-9BE4-9855ADC32752}.Release|x64.Build.0 = Release|Any CPU + {59D900EB-CABB-4CA9-9BE4-9855ADC32752}.Release|x86.ActiveCfg = Release|Any CPU + {59D900EB-CABB-4CA9-9BE4-9855ADC32752}.Release|x86.Build.0 = Release|Any CPU + {59D900EB-CABB-4CA9-9BE4-9855ADC32752}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {59D900EB-CABB-4CA9-9BE4-9855ADC32752}.Checked|arm.ActiveCfg = Debug|Any CPU + {59D900EB-CABB-4CA9-9BE4-9855ADC32752}.Checked|arm64.ActiveCfg = Debug|Any CPU + {59D900EB-CABB-4CA9-9BE4-9855ADC32752}.Checked|x64.ActiveCfg = Debug|Any CPU + {59D900EB-CABB-4CA9-9BE4-9855ADC32752}.Checked|x86.ActiveCfg = Debug|Any CPU + {7A9021C4-769A-4A19-9244-0F575D4E96AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7A9021C4-769A-4A19-9244-0F575D4E96AE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7A9021C4-769A-4A19-9244-0F575D4E96AE}.Debug|arm.ActiveCfg = Debug|Any CPU + {7A9021C4-769A-4A19-9244-0F575D4E96AE}.Debug|arm64.ActiveCfg = Debug|Any CPU + {7A9021C4-769A-4A19-9244-0F575D4E96AE}.Debug|x64.ActiveCfg = Debug|Any CPU + {7A9021C4-769A-4A19-9244-0F575D4E96AE}.Debug|x64.Build.0 = Debug|Any CPU + {7A9021C4-769A-4A19-9244-0F575D4E96AE}.Debug|x86.ActiveCfg = Debug|Any CPU + {7A9021C4-769A-4A19-9244-0F575D4E96AE}.Debug|x86.Build.0 = Debug|Any CPU + {7A9021C4-769A-4A19-9244-0F575D4E96AE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7A9021C4-769A-4A19-9244-0F575D4E96AE}.Release|Any CPU.Build.0 = Release|Any CPU + {7A9021C4-769A-4A19-9244-0F575D4E96AE}.Release|arm.ActiveCfg = Release|Any CPU + {7A9021C4-769A-4A19-9244-0F575D4E96AE}.Release|arm64.ActiveCfg = Release|Any CPU + {7A9021C4-769A-4A19-9244-0F575D4E96AE}.Release|x64.ActiveCfg = Release|Any CPU + {7A9021C4-769A-4A19-9244-0F575D4E96AE}.Release|x64.Build.0 = Release|Any CPU + {7A9021C4-769A-4A19-9244-0F575D4E96AE}.Release|x86.ActiveCfg = Release|Any CPU + {7A9021C4-769A-4A19-9244-0F575D4E96AE}.Release|x86.Build.0 = Release|Any CPU + {7A9021C4-769A-4A19-9244-0F575D4E96AE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {7A9021C4-769A-4A19-9244-0F575D4E96AE}.Checked|arm.ActiveCfg = Debug|Any CPU + {7A9021C4-769A-4A19-9244-0F575D4E96AE}.Checked|arm64.ActiveCfg = Debug|Any CPU + {7A9021C4-769A-4A19-9244-0F575D4E96AE}.Checked|x64.ActiveCfg = Debug|Any CPU + {7A9021C4-769A-4A19-9244-0F575D4E96AE}.Checked|x86.ActiveCfg = Debug|Any CPU {E61CD2AC-E0BB-4FC4-99D3-528AEDDB271B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E61CD2AC-E0BB-4FC4-99D3-528AEDDB271B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E61CD2AC-E0BB-4FC4-99D3-528AEDDB271B}.Debug|arm.ActiveCfg = Debug|Any CPU + {E61CD2AC-E0BB-4FC4-99D3-528AEDDB271B}.Debug|arm64.ActiveCfg = Debug|Any CPU + {E61CD2AC-E0BB-4FC4-99D3-528AEDDB271B}.Debug|x64.ActiveCfg = Debug|Any CPU + {E61CD2AC-E0BB-4FC4-99D3-528AEDDB271B}.Debug|x64.Build.0 = Debug|Any CPU + {E61CD2AC-E0BB-4FC4-99D3-528AEDDB271B}.Debug|x86.ActiveCfg = Debug|Any CPU + {E61CD2AC-E0BB-4FC4-99D3-528AEDDB271B}.Debug|x86.Build.0 = Debug|Any CPU {E61CD2AC-E0BB-4FC4-99D3-528AEDDB271B}.Release|Any CPU.ActiveCfg = Release|Any CPU {E61CD2AC-E0BB-4FC4-99D3-528AEDDB271B}.Release|Any CPU.Build.0 = Release|Any CPU + {E61CD2AC-E0BB-4FC4-99D3-528AEDDB271B}.Release|arm.ActiveCfg = Release|Any CPU + {E61CD2AC-E0BB-4FC4-99D3-528AEDDB271B}.Release|arm64.ActiveCfg = Release|Any CPU + {E61CD2AC-E0BB-4FC4-99D3-528AEDDB271B}.Release|x64.ActiveCfg = Release|Any CPU + {E61CD2AC-E0BB-4FC4-99D3-528AEDDB271B}.Release|x64.Build.0 = Release|Any CPU + {E61CD2AC-E0BB-4FC4-99D3-528AEDDB271B}.Release|x86.ActiveCfg = Release|Any CPU + {E61CD2AC-E0BB-4FC4-99D3-528AEDDB271B}.Release|x86.Build.0 = Release|Any CPU + {E61CD2AC-E0BB-4FC4-99D3-528AEDDB271B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {E61CD2AC-E0BB-4FC4-99D3-528AEDDB271B}.Checked|arm.ActiveCfg = Debug|Any CPU + {E61CD2AC-E0BB-4FC4-99D3-528AEDDB271B}.Checked|arm64.ActiveCfg = Debug|Any CPU + {E61CD2AC-E0BB-4FC4-99D3-528AEDDB271B}.Checked|x64.ActiveCfg = Debug|Any CPU + {E61CD2AC-E0BB-4FC4-99D3-528AEDDB271B}.Checked|x86.ActiveCfg = Debug|Any CPU {71D4A6E0-0A63-4232-9EBB-E2D46C7E69B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {71D4A6E0-0A63-4232-9EBB-E2D46C7E69B2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {71D4A6E0-0A63-4232-9EBB-E2D46C7E69B2}.Debug|arm.ActiveCfg = Debug|Any CPU + {71D4A6E0-0A63-4232-9EBB-E2D46C7E69B2}.Debug|arm64.ActiveCfg = Debug|Any CPU + {71D4A6E0-0A63-4232-9EBB-E2D46C7E69B2}.Debug|x64.ActiveCfg = Debug|Any CPU + {71D4A6E0-0A63-4232-9EBB-E2D46C7E69B2}.Debug|x64.Build.0 = Debug|Any CPU + {71D4A6E0-0A63-4232-9EBB-E2D46C7E69B2}.Debug|x86.ActiveCfg = Debug|Any CPU + {71D4A6E0-0A63-4232-9EBB-E2D46C7E69B2}.Debug|x86.Build.0 = Debug|Any CPU {71D4A6E0-0A63-4232-9EBB-E2D46C7E69B2}.Release|Any CPU.ActiveCfg = Release|Any CPU {71D4A6E0-0A63-4232-9EBB-E2D46C7E69B2}.Release|Any CPU.Build.0 = Release|Any CPU + {71D4A6E0-0A63-4232-9EBB-E2D46C7E69B2}.Release|arm.ActiveCfg = Release|Any CPU + {71D4A6E0-0A63-4232-9EBB-E2D46C7E69B2}.Release|arm64.ActiveCfg = Release|Any CPU + {71D4A6E0-0A63-4232-9EBB-E2D46C7E69B2}.Release|x64.ActiveCfg = Release|Any CPU + {71D4A6E0-0A63-4232-9EBB-E2D46C7E69B2}.Release|x64.Build.0 = Release|Any CPU + {71D4A6E0-0A63-4232-9EBB-E2D46C7E69B2}.Release|x86.ActiveCfg = Release|Any CPU + {71D4A6E0-0A63-4232-9EBB-E2D46C7E69B2}.Release|x86.Build.0 = Release|Any CPU + {71D4A6E0-0A63-4232-9EBB-E2D46C7E69B2}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {71D4A6E0-0A63-4232-9EBB-E2D46C7E69B2}.Checked|arm.ActiveCfg = Debug|Any CPU + {71D4A6E0-0A63-4232-9EBB-E2D46C7E69B2}.Checked|arm64.ActiveCfg = Debug|Any CPU + {71D4A6E0-0A63-4232-9EBB-E2D46C7E69B2}.Checked|x64.ActiveCfg = Debug|Any CPU + {71D4A6E0-0A63-4232-9EBB-E2D46C7E69B2}.Checked|x86.ActiveCfg = Debug|Any CPU {621B4749-CFCE-4CC9-8B1E-A0AA26A4FCD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {621B4749-CFCE-4CC9-8B1E-A0AA26A4FCD0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {621B4749-CFCE-4CC9-8B1E-A0AA26A4FCD0}.Debug|arm.ActiveCfg = Debug|Any CPU + {621B4749-CFCE-4CC9-8B1E-A0AA26A4FCD0}.Debug|arm64.ActiveCfg = Debug|Any CPU + {621B4749-CFCE-4CC9-8B1E-A0AA26A4FCD0}.Debug|x64.ActiveCfg = Debug|Any CPU + {621B4749-CFCE-4CC9-8B1E-A0AA26A4FCD0}.Debug|x64.Build.0 = Debug|Any CPU + {621B4749-CFCE-4CC9-8B1E-A0AA26A4FCD0}.Debug|x86.ActiveCfg = Debug|Any CPU + {621B4749-CFCE-4CC9-8B1E-A0AA26A4FCD0}.Debug|x86.Build.0 = Debug|Any CPU {621B4749-CFCE-4CC9-8B1E-A0AA26A4FCD0}.Release|Any CPU.ActiveCfg = Release|Any CPU {621B4749-CFCE-4CC9-8B1E-A0AA26A4FCD0}.Release|Any CPU.Build.0 = Release|Any CPU + {621B4749-CFCE-4CC9-8B1E-A0AA26A4FCD0}.Release|arm.ActiveCfg = Release|Any CPU + {621B4749-CFCE-4CC9-8B1E-A0AA26A4FCD0}.Release|arm64.ActiveCfg = Release|Any CPU + {621B4749-CFCE-4CC9-8B1E-A0AA26A4FCD0}.Release|x64.ActiveCfg = Release|Any CPU + {621B4749-CFCE-4CC9-8B1E-A0AA26A4FCD0}.Release|x64.Build.0 = Release|Any CPU + {621B4749-CFCE-4CC9-8B1E-A0AA26A4FCD0}.Release|x86.ActiveCfg = Release|Any CPU + {621B4749-CFCE-4CC9-8B1E-A0AA26A4FCD0}.Release|x86.Build.0 = Release|Any CPU + {621B4749-CFCE-4CC9-8B1E-A0AA26A4FCD0}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {621B4749-CFCE-4CC9-8B1E-A0AA26A4FCD0}.Checked|arm.ActiveCfg = Debug|Any CPU + {621B4749-CFCE-4CC9-8B1E-A0AA26A4FCD0}.Checked|arm64.ActiveCfg = Debug|Any CPU + {621B4749-CFCE-4CC9-8B1E-A0AA26A4FCD0}.Checked|x64.ActiveCfg = Debug|Any CPU + {621B4749-CFCE-4CC9-8B1E-A0AA26A4FCD0}.Checked|x86.ActiveCfg = Debug|Any CPU {B7E5B25A-0E3A-4FF8-958C-3FEB057DE330}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B7E5B25A-0E3A-4FF8-958C-3FEB057DE330}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B7E5B25A-0E3A-4FF8-958C-3FEB057DE330}.Debug|arm.ActiveCfg = Debug|Any CPU + {B7E5B25A-0E3A-4FF8-958C-3FEB057DE330}.Debug|arm64.ActiveCfg = Debug|Any CPU + {B7E5B25A-0E3A-4FF8-958C-3FEB057DE330}.Debug|x64.ActiveCfg = Debug|Any CPU + {B7E5B25A-0E3A-4FF8-958C-3FEB057DE330}.Debug|x64.Build.0 = Debug|Any CPU + {B7E5B25A-0E3A-4FF8-958C-3FEB057DE330}.Debug|x86.ActiveCfg = Debug|Any CPU + {B7E5B25A-0E3A-4FF8-958C-3FEB057DE330}.Debug|x86.Build.0 = Debug|Any CPU {B7E5B25A-0E3A-4FF8-958C-3FEB057DE330}.Release|Any CPU.ActiveCfg = Release|Any CPU {B7E5B25A-0E3A-4FF8-958C-3FEB057DE330}.Release|Any CPU.Build.0 = Release|Any CPU + {B7E5B25A-0E3A-4FF8-958C-3FEB057DE330}.Release|arm.ActiveCfg = Release|Any CPU + {B7E5B25A-0E3A-4FF8-958C-3FEB057DE330}.Release|arm64.ActiveCfg = Release|Any CPU + {B7E5B25A-0E3A-4FF8-958C-3FEB057DE330}.Release|x64.ActiveCfg = Release|Any CPU + {B7E5B25A-0E3A-4FF8-958C-3FEB057DE330}.Release|x64.Build.0 = Release|Any CPU + {B7E5B25A-0E3A-4FF8-958C-3FEB057DE330}.Release|x86.ActiveCfg = Release|Any CPU + {B7E5B25A-0E3A-4FF8-958C-3FEB057DE330}.Release|x86.Build.0 = Release|Any CPU + {B7E5B25A-0E3A-4FF8-958C-3FEB057DE330}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {B7E5B25A-0E3A-4FF8-958C-3FEB057DE330}.Checked|arm.ActiveCfg = Debug|Any CPU + {B7E5B25A-0E3A-4FF8-958C-3FEB057DE330}.Checked|arm64.ActiveCfg = Debug|Any CPU + {B7E5B25A-0E3A-4FF8-958C-3FEB057DE330}.Checked|x64.ActiveCfg = Debug|Any CPU + {B7E5B25A-0E3A-4FF8-958C-3FEB057DE330}.Checked|x86.ActiveCfg = Debug|Any CPU {E1F18567-C282-456B-8CCC-677702609FAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E1F18567-C282-456B-8CCC-677702609FAF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E1F18567-C282-456B-8CCC-677702609FAF}.Debug|arm.ActiveCfg = Debug|Any CPU + {E1F18567-C282-456B-8CCC-677702609FAF}.Debug|arm64.ActiveCfg = Debug|Any CPU + {E1F18567-C282-456B-8CCC-677702609FAF}.Debug|x64.ActiveCfg = Debug|Any CPU + {E1F18567-C282-456B-8CCC-677702609FAF}.Debug|x64.Build.0 = Debug|Any CPU + {E1F18567-C282-456B-8CCC-677702609FAF}.Debug|x86.ActiveCfg = Debug|Any CPU + {E1F18567-C282-456B-8CCC-677702609FAF}.Debug|x86.Build.0 = Debug|Any CPU {E1F18567-C282-456B-8CCC-677702609FAF}.Release|Any CPU.ActiveCfg = Release|Any CPU {E1F18567-C282-456B-8CCC-677702609FAF}.Release|Any CPU.Build.0 = Release|Any CPU - {875B1171-C38D-4842-B3E7-2D4D685F292B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {875B1171-C38D-4842-B3E7-2D4D685F292B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {875B1171-C38D-4842-B3E7-2D4D685F292B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {875B1171-C38D-4842-B3E7-2D4D685F292B}.Release|Any CPU.Build.0 = Release|Any CPU + {E1F18567-C282-456B-8CCC-677702609FAF}.Release|arm.ActiveCfg = Release|Any CPU + {E1F18567-C282-456B-8CCC-677702609FAF}.Release|arm64.ActiveCfg = Release|Any CPU + {E1F18567-C282-456B-8CCC-677702609FAF}.Release|x64.ActiveCfg = Release|Any CPU + {E1F18567-C282-456B-8CCC-677702609FAF}.Release|x64.Build.0 = Release|Any CPU + {E1F18567-C282-456B-8CCC-677702609FAF}.Release|x86.ActiveCfg = Release|Any CPU + {E1F18567-C282-456B-8CCC-677702609FAF}.Release|x86.Build.0 = Release|Any CPU + {E1F18567-C282-456B-8CCC-677702609FAF}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {E1F18567-C282-456B-8CCC-677702609FAF}.Checked|arm.ActiveCfg = Debug|Any CPU + {E1F18567-C282-456B-8CCC-677702609FAF}.Checked|arm64.ActiveCfg = Debug|Any CPU + {E1F18567-C282-456B-8CCC-677702609FAF}.Checked|x64.ActiveCfg = Debug|Any CPU + {E1F18567-C282-456B-8CCC-677702609FAF}.Checked|x86.ActiveCfg = Debug|Any CPU + {A5D41312-C3C2-4153-AB58-EE8717C8D379}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A5D41312-C3C2-4153-AB58-EE8717C8D379}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A5D41312-C3C2-4153-AB58-EE8717C8D379}.Debug|arm.ActiveCfg = Debug|Any CPU + {A5D41312-C3C2-4153-AB58-EE8717C8D379}.Debug|arm64.ActiveCfg = Debug|Any CPU + {A5D41312-C3C2-4153-AB58-EE8717C8D379}.Debug|x64.ActiveCfg = Debug|Any CPU + {A5D41312-C3C2-4153-AB58-EE8717C8D379}.Debug|x64.Build.0 = Debug|Any CPU + {A5D41312-C3C2-4153-AB58-EE8717C8D379}.Debug|x86.ActiveCfg = Debug|Any CPU + {A5D41312-C3C2-4153-AB58-EE8717C8D379}.Debug|x86.Build.0 = Debug|Any CPU + {A5D41312-C3C2-4153-AB58-EE8717C8D379}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A5D41312-C3C2-4153-AB58-EE8717C8D379}.Release|Any CPU.Build.0 = Release|Any CPU + {A5D41312-C3C2-4153-AB58-EE8717C8D379}.Release|arm.ActiveCfg = Release|Any CPU + {A5D41312-C3C2-4153-AB58-EE8717C8D379}.Release|arm64.ActiveCfg = Release|Any CPU + {A5D41312-C3C2-4153-AB58-EE8717C8D379}.Release|x64.ActiveCfg = Release|Any CPU + {A5D41312-C3C2-4153-AB58-EE8717C8D379}.Release|x64.Build.0 = Release|Any CPU + {A5D41312-C3C2-4153-AB58-EE8717C8D379}.Release|x86.ActiveCfg = Release|Any CPU + {A5D41312-C3C2-4153-AB58-EE8717C8D379}.Release|x86.Build.0 = Release|Any CPU + {A5D41312-C3C2-4153-AB58-EE8717C8D379}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {A5D41312-C3C2-4153-AB58-EE8717C8D379}.Checked|arm.ActiveCfg = Debug|Any CPU + {A5D41312-C3C2-4153-AB58-EE8717C8D379}.Checked|arm64.ActiveCfg = Debug|Any CPU + {A5D41312-C3C2-4153-AB58-EE8717C8D379}.Checked|x64.ActiveCfg = Debug|Any CPU + {A5D41312-C3C2-4153-AB58-EE8717C8D379}.Checked|x86.ActiveCfg = Debug|Any CPU + {25243F48-E92B-4EA8-B1D2-7DE846C03AC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {25243F48-E92B-4EA8-B1D2-7DE846C03AC5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {25243F48-E92B-4EA8-B1D2-7DE846C03AC5}.Debug|arm.ActiveCfg = Debug|Any CPU + {25243F48-E92B-4EA8-B1D2-7DE846C03AC5}.Debug|arm64.ActiveCfg = Debug|Any CPU + {25243F48-E92B-4EA8-B1D2-7DE846C03AC5}.Debug|x64.ActiveCfg = Debug|Any CPU + {25243F48-E92B-4EA8-B1D2-7DE846C03AC5}.Debug|x64.Build.0 = Debug|Any CPU + {25243F48-E92B-4EA8-B1D2-7DE846C03AC5}.Debug|x86.ActiveCfg = Debug|Any CPU + {25243F48-E92B-4EA8-B1D2-7DE846C03AC5}.Debug|x86.Build.0 = Debug|Any CPU + {25243F48-E92B-4EA8-B1D2-7DE846C03AC5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {25243F48-E92B-4EA8-B1D2-7DE846C03AC5}.Release|Any CPU.Build.0 = Release|Any CPU + {25243F48-E92B-4EA8-B1D2-7DE846C03AC5}.Release|arm.ActiveCfg = Release|Any CPU + {25243F48-E92B-4EA8-B1D2-7DE846C03AC5}.Release|arm64.ActiveCfg = Release|Any CPU + {25243F48-E92B-4EA8-B1D2-7DE846C03AC5}.Release|x64.ActiveCfg = Release|Any CPU + {25243F48-E92B-4EA8-B1D2-7DE846C03AC5}.Release|x64.Build.0 = Release|Any CPU + {25243F48-E92B-4EA8-B1D2-7DE846C03AC5}.Release|x86.ActiveCfg = Release|Any CPU + {25243F48-E92B-4EA8-B1D2-7DE846C03AC5}.Release|x86.Build.0 = Release|Any CPU + {25243F48-E92B-4EA8-B1D2-7DE846C03AC5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {25243F48-E92B-4EA8-B1D2-7DE846C03AC5}.Checked|arm.ActiveCfg = Debug|Any CPU + {25243F48-E92B-4EA8-B1D2-7DE846C03AC5}.Checked|arm64.ActiveCfg = Debug|Any CPU + {25243F48-E92B-4EA8-B1D2-7DE846C03AC5}.Checked|x64.ActiveCfg = Debug|Any CPU + {25243F48-E92B-4EA8-B1D2-7DE846C03AC5}.Checked|x86.ActiveCfg = Debug|Any CPU + {6CCAD93E-1888-4610-8EB8-7043B7C61AE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6CCAD93E-1888-4610-8EB8-7043B7C61AE8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6CCAD93E-1888-4610-8EB8-7043B7C61AE8}.Debug|arm.ActiveCfg = Debug|Any CPU + {6CCAD93E-1888-4610-8EB8-7043B7C61AE8}.Debug|arm64.ActiveCfg = Debug|Any CPU + {6CCAD93E-1888-4610-8EB8-7043B7C61AE8}.Debug|x64.ActiveCfg = Debug|Any CPU + {6CCAD93E-1888-4610-8EB8-7043B7C61AE8}.Debug|x64.Build.0 = Debug|Any CPU + {6CCAD93E-1888-4610-8EB8-7043B7C61AE8}.Debug|x86.ActiveCfg = Debug|Any CPU + {6CCAD93E-1888-4610-8EB8-7043B7C61AE8}.Debug|x86.Build.0 = Debug|Any CPU + {6CCAD93E-1888-4610-8EB8-7043B7C61AE8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6CCAD93E-1888-4610-8EB8-7043B7C61AE8}.Release|Any CPU.Build.0 = Release|Any CPU + {6CCAD93E-1888-4610-8EB8-7043B7C61AE8}.Release|arm.ActiveCfg = Release|Any CPU + {6CCAD93E-1888-4610-8EB8-7043B7C61AE8}.Release|arm64.ActiveCfg = Release|Any CPU + {6CCAD93E-1888-4610-8EB8-7043B7C61AE8}.Release|x64.ActiveCfg = Release|Any CPU + {6CCAD93E-1888-4610-8EB8-7043B7C61AE8}.Release|x64.Build.0 = Release|Any CPU + {6CCAD93E-1888-4610-8EB8-7043B7C61AE8}.Release|x86.ActiveCfg = Release|Any CPU + {6CCAD93E-1888-4610-8EB8-7043B7C61AE8}.Release|x86.Build.0 = Release|Any CPU + {6CCAD93E-1888-4610-8EB8-7043B7C61AE8}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {6CCAD93E-1888-4610-8EB8-7043B7C61AE8}.Checked|arm.ActiveCfg = Debug|Any CPU + {6CCAD93E-1888-4610-8EB8-7043B7C61AE8}.Checked|arm64.ActiveCfg = Debug|Any CPU + {6CCAD93E-1888-4610-8EB8-7043B7C61AE8}.Checked|x64.ActiveCfg = Debug|Any CPU + {6CCAD93E-1888-4610-8EB8-7043B7C61AE8}.Checked|x86.ActiveCfg = Debug|Any CPU {2C3750CD-EEE9-4452-B901-AF3084E6B9B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2C3750CD-EEE9-4452-B901-AF3084E6B9B2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2C3750CD-EEE9-4452-B901-AF3084E6B9B2}.Debug|arm.ActiveCfg = Debug|Any CPU + {2C3750CD-EEE9-4452-B901-AF3084E6B9B2}.Debug|arm64.ActiveCfg = Debug|Any CPU + {2C3750CD-EEE9-4452-B901-AF3084E6B9B2}.Debug|x64.ActiveCfg = Debug|Any CPU + {2C3750CD-EEE9-4452-B901-AF3084E6B9B2}.Debug|x64.Build.0 = Debug|Any CPU + {2C3750CD-EEE9-4452-B901-AF3084E6B9B2}.Debug|x86.ActiveCfg = Debug|Any CPU + {2C3750CD-EEE9-4452-B901-AF3084E6B9B2}.Debug|x86.Build.0 = Debug|Any CPU {2C3750CD-EEE9-4452-B901-AF3084E6B9B2}.Release|Any CPU.ActiveCfg = Release|Any CPU {2C3750CD-EEE9-4452-B901-AF3084E6B9B2}.Release|Any CPU.Build.0 = Release|Any CPU + {2C3750CD-EEE9-4452-B901-AF3084E6B9B2}.Release|arm.ActiveCfg = Release|Any CPU + {2C3750CD-EEE9-4452-B901-AF3084E6B9B2}.Release|arm64.ActiveCfg = Release|Any CPU + {2C3750CD-EEE9-4452-B901-AF3084E6B9B2}.Release|x64.ActiveCfg = Release|Any CPU + {2C3750CD-EEE9-4452-B901-AF3084E6B9B2}.Release|x64.Build.0 = Release|Any CPU + {2C3750CD-EEE9-4452-B901-AF3084E6B9B2}.Release|x86.ActiveCfg = Release|Any CPU + {2C3750CD-EEE9-4452-B901-AF3084E6B9B2}.Release|x86.Build.0 = Release|Any CPU + {2C3750CD-EEE9-4452-B901-AF3084E6B9B2}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {2C3750CD-EEE9-4452-B901-AF3084E6B9B2}.Checked|arm.ActiveCfg = Debug|Any CPU + {2C3750CD-EEE9-4452-B901-AF3084E6B9B2}.Checked|arm64.ActiveCfg = Debug|Any CPU + {2C3750CD-EEE9-4452-B901-AF3084E6B9B2}.Checked|x64.ActiveCfg = Debug|Any CPU + {2C3750CD-EEE9-4452-B901-AF3084E6B9B2}.Checked|x86.ActiveCfg = Debug|Any CPU {8AC2B9D8-7C86-4F20-9E4C-369ACE927BF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8AC2B9D8-7C86-4F20-9E4C-369ACE927BF5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8AC2B9D8-7C86-4F20-9E4C-369ACE927BF5}.Debug|arm.ActiveCfg = Debug|Any CPU + {8AC2B9D8-7C86-4F20-9E4C-369ACE927BF5}.Debug|arm64.ActiveCfg = Debug|Any CPU + {8AC2B9D8-7C86-4F20-9E4C-369ACE927BF5}.Debug|x64.ActiveCfg = Debug|Any CPU + {8AC2B9D8-7C86-4F20-9E4C-369ACE927BF5}.Debug|x64.Build.0 = Debug|Any CPU + {8AC2B9D8-7C86-4F20-9E4C-369ACE927BF5}.Debug|x86.ActiveCfg = Debug|Any CPU + {8AC2B9D8-7C86-4F20-9E4C-369ACE927BF5}.Debug|x86.Build.0 = Debug|Any CPU {8AC2B9D8-7C86-4F20-9E4C-369ACE927BF5}.Release|Any CPU.ActiveCfg = Release|Any CPU {8AC2B9D8-7C86-4F20-9E4C-369ACE927BF5}.Release|Any CPU.Build.0 = Release|Any CPU + {8AC2B9D8-7C86-4F20-9E4C-369ACE927BF5}.Release|arm.ActiveCfg = Release|Any CPU + {8AC2B9D8-7C86-4F20-9E4C-369ACE927BF5}.Release|arm64.ActiveCfg = Release|Any CPU + {8AC2B9D8-7C86-4F20-9E4C-369ACE927BF5}.Release|x64.ActiveCfg = Release|Any CPU + {8AC2B9D8-7C86-4F20-9E4C-369ACE927BF5}.Release|x64.Build.0 = Release|Any CPU + {8AC2B9D8-7C86-4F20-9E4C-369ACE927BF5}.Release|x86.ActiveCfg = Release|Any CPU + {8AC2B9D8-7C86-4F20-9E4C-369ACE927BF5}.Release|x86.Build.0 = Release|Any CPU + {8AC2B9D8-7C86-4F20-9E4C-369ACE927BF5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {8AC2B9D8-7C86-4F20-9E4C-369ACE927BF5}.Checked|arm.ActiveCfg = Debug|Any CPU + {8AC2B9D8-7C86-4F20-9E4C-369ACE927BF5}.Checked|arm64.ActiveCfg = Debug|Any CPU + {8AC2B9D8-7C86-4F20-9E4C-369ACE927BF5}.Checked|x64.ActiveCfg = Debug|Any CPU + {8AC2B9D8-7C86-4F20-9E4C-369ACE927BF5}.Checked|x86.ActiveCfg = Debug|Any CPU + {50734B6B-B918-4C3D-B6BB-3F38E2DE7169}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {50734B6B-B918-4C3D-B6BB-3F38E2DE7169}.Debug|Any CPU.Build.0 = Debug|Any CPU + {50734B6B-B918-4C3D-B6BB-3F38E2DE7169}.Debug|arm.ActiveCfg = Debug|Any CPU + {50734B6B-B918-4C3D-B6BB-3F38E2DE7169}.Debug|arm64.ActiveCfg = Debug|Any CPU + {50734B6B-B918-4C3D-B6BB-3F38E2DE7169}.Debug|x64.ActiveCfg = Debug|Any CPU + {50734B6B-B918-4C3D-B6BB-3F38E2DE7169}.Debug|x64.Build.0 = Debug|Any CPU + {50734B6B-B918-4C3D-B6BB-3F38E2DE7169}.Debug|x86.ActiveCfg = Debug|Any CPU + {50734B6B-B918-4C3D-B6BB-3F38E2DE7169}.Debug|x86.Build.0 = Debug|Any CPU + {50734B6B-B918-4C3D-B6BB-3F38E2DE7169}.Release|Any CPU.ActiveCfg = Release|Any CPU + {50734B6B-B918-4C3D-B6BB-3F38E2DE7169}.Release|Any CPU.Build.0 = Release|Any CPU + {50734B6B-B918-4C3D-B6BB-3F38E2DE7169}.Release|arm.ActiveCfg = Release|Any CPU + {50734B6B-B918-4C3D-B6BB-3F38E2DE7169}.Release|arm64.ActiveCfg = Release|Any CPU + {50734B6B-B918-4C3D-B6BB-3F38E2DE7169}.Release|x64.ActiveCfg = Release|Any CPU + {50734B6B-B918-4C3D-B6BB-3F38E2DE7169}.Release|x64.Build.0 = Release|Any CPU + {50734B6B-B918-4C3D-B6BB-3F38E2DE7169}.Release|x86.ActiveCfg = Release|Any CPU + {50734B6B-B918-4C3D-B6BB-3F38E2DE7169}.Release|x86.Build.0 = Release|Any CPU + {50734B6B-B918-4C3D-B6BB-3F38E2DE7169}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {50734B6B-B918-4C3D-B6BB-3F38E2DE7169}.Checked|arm.ActiveCfg = Debug|Any CPU + {50734B6B-B918-4C3D-B6BB-3F38E2DE7169}.Checked|arm64.ActiveCfg = Debug|Any CPU + {50734B6B-B918-4C3D-B6BB-3F38E2DE7169}.Checked|x64.ActiveCfg = Debug|Any CPU + {50734B6B-B918-4C3D-B6BB-3F38E2DE7169}.Checked|x86.ActiveCfg = Debug|Any CPU + {E0FFABB4-08A9-4259-B9DB-52E11AEBA4F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E0FFABB4-08A9-4259-B9DB-52E11AEBA4F3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E0FFABB4-08A9-4259-B9DB-52E11AEBA4F3}.Debug|arm.ActiveCfg = Debug|Any CPU + {E0FFABB4-08A9-4259-B9DB-52E11AEBA4F3}.Debug|arm64.ActiveCfg = Debug|Any CPU + {E0FFABB4-08A9-4259-B9DB-52E11AEBA4F3}.Debug|x64.ActiveCfg = Debug|Any CPU + {E0FFABB4-08A9-4259-B9DB-52E11AEBA4F3}.Debug|x64.Build.0 = Debug|Any CPU + {E0FFABB4-08A9-4259-B9DB-52E11AEBA4F3}.Debug|x86.ActiveCfg = Debug|Any CPU + {E0FFABB4-08A9-4259-B9DB-52E11AEBA4F3}.Debug|x86.Build.0 = Debug|Any CPU + {E0FFABB4-08A9-4259-B9DB-52E11AEBA4F3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E0FFABB4-08A9-4259-B9DB-52E11AEBA4F3}.Release|Any CPU.Build.0 = Release|Any CPU + {E0FFABB4-08A9-4259-B9DB-52E11AEBA4F3}.Release|arm.ActiveCfg = Release|Any CPU + {E0FFABB4-08A9-4259-B9DB-52E11AEBA4F3}.Release|arm64.ActiveCfg = Release|Any CPU + {E0FFABB4-08A9-4259-B9DB-52E11AEBA4F3}.Release|x64.ActiveCfg = Release|Any CPU + {E0FFABB4-08A9-4259-B9DB-52E11AEBA4F3}.Release|x64.Build.0 = Release|Any CPU + {E0FFABB4-08A9-4259-B9DB-52E11AEBA4F3}.Release|x86.ActiveCfg = Release|Any CPU + {E0FFABB4-08A9-4259-B9DB-52E11AEBA4F3}.Release|x86.Build.0 = Release|Any CPU + {E0FFABB4-08A9-4259-B9DB-52E11AEBA4F3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {E0FFABB4-08A9-4259-B9DB-52E11AEBA4F3}.Checked|arm.ActiveCfg = Debug|Any CPU + {E0FFABB4-08A9-4259-B9DB-52E11AEBA4F3}.Checked|arm64.ActiveCfg = Debug|Any CPU + {E0FFABB4-08A9-4259-B9DB-52E11AEBA4F3}.Checked|x64.ActiveCfg = Debug|Any CPU + {E0FFABB4-08A9-4259-B9DB-52E11AEBA4F3}.Checked|x86.ActiveCfg = Debug|Any CPU {493BCA01-A5FC-4C5A-9E85-A0E23E3CD425}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {493BCA01-A5FC-4C5A-9E85-A0E23E3CD425}.Debug|Any CPU.Build.0 = Debug|Any CPU + {493BCA01-A5FC-4C5A-9E85-A0E23E3CD425}.Debug|arm.ActiveCfg = Debug|Any CPU + {493BCA01-A5FC-4C5A-9E85-A0E23E3CD425}.Debug|arm64.ActiveCfg = Debug|Any CPU + {493BCA01-A5FC-4C5A-9E85-A0E23E3CD425}.Debug|x64.ActiveCfg = Debug|Any CPU + {493BCA01-A5FC-4C5A-9E85-A0E23E3CD425}.Debug|x64.Build.0 = Debug|Any CPU + {493BCA01-A5FC-4C5A-9E85-A0E23E3CD425}.Debug|x86.ActiveCfg = Debug|Any CPU + {493BCA01-A5FC-4C5A-9E85-A0E23E3CD425}.Debug|x86.Build.0 = Debug|Any CPU {493BCA01-A5FC-4C5A-9E85-A0E23E3CD425}.Release|Any CPU.ActiveCfg = Release|Any CPU {493BCA01-A5FC-4C5A-9E85-A0E23E3CD425}.Release|Any CPU.Build.0 = Release|Any CPU + {493BCA01-A5FC-4C5A-9E85-A0E23E3CD425}.Release|arm.ActiveCfg = Release|Any CPU + {493BCA01-A5FC-4C5A-9E85-A0E23E3CD425}.Release|arm64.ActiveCfg = Release|Any CPU + {493BCA01-A5FC-4C5A-9E85-A0E23E3CD425}.Release|x64.ActiveCfg = Release|Any CPU + {493BCA01-A5FC-4C5A-9E85-A0E23E3CD425}.Release|x64.Build.0 = Release|Any CPU + {493BCA01-A5FC-4C5A-9E85-A0E23E3CD425}.Release|x86.ActiveCfg = Release|Any CPU + {493BCA01-A5FC-4C5A-9E85-A0E23E3CD425}.Release|x86.Build.0 = Release|Any CPU + {493BCA01-A5FC-4C5A-9E85-A0E23E3CD425}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {493BCA01-A5FC-4C5A-9E85-A0E23E3CD425}.Checked|arm.ActiveCfg = Debug|Any CPU + {493BCA01-A5FC-4C5A-9E85-A0E23E3CD425}.Checked|arm64.ActiveCfg = Debug|Any CPU + {493BCA01-A5FC-4C5A-9E85-A0E23E3CD425}.Checked|x64.ActiveCfg = Debug|Any CPU + {493BCA01-A5FC-4C5A-9E85-A0E23E3CD425}.Checked|x86.ActiveCfg = Debug|Any CPU {167E89F1-63F0-4E47-B67E-9931589E75CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {167E89F1-63F0-4E47-B67E-9931589E75CE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {167E89F1-63F0-4E47-B67E-9931589E75CE}.Debug|arm.ActiveCfg = Debug|Any CPU + {167E89F1-63F0-4E47-B67E-9931589E75CE}.Debug|arm64.ActiveCfg = Debug|Any CPU + {167E89F1-63F0-4E47-B67E-9931589E75CE}.Debug|x64.ActiveCfg = Debug|Any CPU + {167E89F1-63F0-4E47-B67E-9931589E75CE}.Debug|x64.Build.0 = Debug|Any CPU + {167E89F1-63F0-4E47-B67E-9931589E75CE}.Debug|x86.ActiveCfg = Debug|Any CPU + {167E89F1-63F0-4E47-B67E-9931589E75CE}.Debug|x86.Build.0 = Debug|Any CPU {167E89F1-63F0-4E47-B67E-9931589E75CE}.Release|Any CPU.ActiveCfg = Release|Any CPU {167E89F1-63F0-4E47-B67E-9931589E75CE}.Release|Any CPU.Build.0 = Release|Any CPU + {167E89F1-63F0-4E47-B67E-9931589E75CE}.Release|arm.ActiveCfg = Release|Any CPU + {167E89F1-63F0-4E47-B67E-9931589E75CE}.Release|arm64.ActiveCfg = Release|Any CPU + {167E89F1-63F0-4E47-B67E-9931589E75CE}.Release|x64.ActiveCfg = Release|Any CPU + {167E89F1-63F0-4E47-B67E-9931589E75CE}.Release|x64.Build.0 = Release|Any CPU + {167E89F1-63F0-4E47-B67E-9931589E75CE}.Release|x86.ActiveCfg = Release|Any CPU + {167E89F1-63F0-4E47-B67E-9931589E75CE}.Release|x86.Build.0 = Release|Any CPU + {167E89F1-63F0-4E47-B67E-9931589E75CE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {167E89F1-63F0-4E47-B67E-9931589E75CE}.Checked|arm.ActiveCfg = Debug|Any CPU + {167E89F1-63F0-4E47-B67E-9931589E75CE}.Checked|arm64.ActiveCfg = Debug|Any CPU + {167E89F1-63F0-4E47-B67E-9931589E75CE}.Checked|x64.ActiveCfg = Debug|Any CPU + {167E89F1-63F0-4E47-B67E-9931589E75CE}.Checked|x86.ActiveCfg = Debug|Any CPU {AC53B586-F702-4B0C-94A9-A6F066FDC4C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AC53B586-F702-4B0C-94A9-A6F066FDC4C1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AC53B586-F702-4B0C-94A9-A6F066FDC4C1}.Debug|arm.ActiveCfg = Debug|Any CPU + {AC53B586-F702-4B0C-94A9-A6F066FDC4C1}.Debug|arm64.ActiveCfg = Debug|Any CPU + {AC53B586-F702-4B0C-94A9-A6F066FDC4C1}.Debug|x64.ActiveCfg = Debug|Any CPU + {AC53B586-F702-4B0C-94A9-A6F066FDC4C1}.Debug|x64.Build.0 = Debug|Any CPU + {AC53B586-F702-4B0C-94A9-A6F066FDC4C1}.Debug|x86.ActiveCfg = Debug|Any CPU + {AC53B586-F702-4B0C-94A9-A6F066FDC4C1}.Debug|x86.Build.0 = Debug|Any CPU {AC53B586-F702-4B0C-94A9-A6F066FDC4C1}.Release|Any CPU.ActiveCfg = Release|Any CPU {AC53B586-F702-4B0C-94A9-A6F066FDC4C1}.Release|Any CPU.Build.0 = Release|Any CPU + {AC53B586-F702-4B0C-94A9-A6F066FDC4C1}.Release|arm.ActiveCfg = Release|Any CPU + {AC53B586-F702-4B0C-94A9-A6F066FDC4C1}.Release|arm64.ActiveCfg = Release|Any CPU + {AC53B586-F702-4B0C-94A9-A6F066FDC4C1}.Release|x64.ActiveCfg = Release|Any CPU + {AC53B586-F702-4B0C-94A9-A6F066FDC4C1}.Release|x64.Build.0 = Release|Any CPU + {AC53B586-F702-4B0C-94A9-A6F066FDC4C1}.Release|x86.ActiveCfg = Release|Any CPU + {AC53B586-F702-4B0C-94A9-A6F066FDC4C1}.Release|x86.Build.0 = Release|Any CPU + {AC53B586-F702-4B0C-94A9-A6F066FDC4C1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {AC53B586-F702-4B0C-94A9-A6F066FDC4C1}.Checked|arm.ActiveCfg = Debug|Any CPU + {AC53B586-F702-4B0C-94A9-A6F066FDC4C1}.Checked|arm64.ActiveCfg = Debug|Any CPU + {AC53B586-F702-4B0C-94A9-A6F066FDC4C1}.Checked|x64.ActiveCfg = Debug|Any CPU + {AC53B586-F702-4B0C-94A9-A6F066FDC4C1}.Checked|x86.ActiveCfg = Debug|Any CPU {19B414C5-ACD0-4E78-B0A0-C698132F1988}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B414C5-ACD0-4E78-B0A0-C698132F1988}.Debug|Any CPU.Build.0 = Debug|Any CPU + {19B414C5-ACD0-4E78-B0A0-C698132F1988}.Debug|arm.ActiveCfg = Debug|Any CPU + {19B414C5-ACD0-4E78-B0A0-C698132F1988}.Debug|arm64.ActiveCfg = Debug|Any CPU + {19B414C5-ACD0-4E78-B0A0-C698132F1988}.Debug|x64.ActiveCfg = Debug|Any CPU + {19B414C5-ACD0-4E78-B0A0-C698132F1988}.Debug|x64.Build.0 = Debug|Any CPU + {19B414C5-ACD0-4E78-B0A0-C698132F1988}.Debug|x86.ActiveCfg = Debug|Any CPU + {19B414C5-ACD0-4E78-B0A0-C698132F1988}.Debug|x86.Build.0 = Debug|Any CPU {19B414C5-ACD0-4E78-B0A0-C698132F1988}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B414C5-ACD0-4E78-B0A0-C698132F1988}.Release|Any CPU.Build.0 = Release|Any CPU + {19B414C5-ACD0-4E78-B0A0-C698132F1988}.Release|arm.ActiveCfg = Release|Any CPU + {19B414C5-ACD0-4E78-B0A0-C698132F1988}.Release|arm64.ActiveCfg = Release|Any CPU + {19B414C5-ACD0-4E78-B0A0-C698132F1988}.Release|x64.ActiveCfg = Release|Any CPU + {19B414C5-ACD0-4E78-B0A0-C698132F1988}.Release|x64.Build.0 = Release|Any CPU + {19B414C5-ACD0-4E78-B0A0-C698132F1988}.Release|x86.ActiveCfg = Release|Any CPU + {19B414C5-ACD0-4E78-B0A0-C698132F1988}.Release|x86.Build.0 = Release|Any CPU + {19B414C5-ACD0-4E78-B0A0-C698132F1988}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {19B414C5-ACD0-4E78-B0A0-C698132F1988}.Checked|arm.ActiveCfg = Debug|Any CPU + {19B414C5-ACD0-4E78-B0A0-C698132F1988}.Checked|arm64.ActiveCfg = Debug|Any CPU + {19B414C5-ACD0-4E78-B0A0-C698132F1988}.Checked|x64.ActiveCfg = Debug|Any CPU + {19B414C5-ACD0-4E78-B0A0-C698132F1988}.Checked|x86.ActiveCfg = Debug|Any CPU + {28574109-6A9B-47FF-88A7-D5EEDB4B17C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28574109-6A9B-47FF-88A7-D5EEDB4B17C3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28574109-6A9B-47FF-88A7-D5EEDB4B17C3}.Debug|arm.ActiveCfg = Debug|Any CPU + {28574109-6A9B-47FF-88A7-D5EEDB4B17C3}.Debug|arm64.ActiveCfg = Debug|Any CPU + {28574109-6A9B-47FF-88A7-D5EEDB4B17C3}.Debug|x64.ActiveCfg = Debug|Any CPU + {28574109-6A9B-47FF-88A7-D5EEDB4B17C3}.Debug|x64.Build.0 = Debug|Any CPU + {28574109-6A9B-47FF-88A7-D5EEDB4B17C3}.Debug|x86.ActiveCfg = Debug|Any CPU + {28574109-6A9B-47FF-88A7-D5EEDB4B17C3}.Debug|x86.Build.0 = Debug|Any CPU + {28574109-6A9B-47FF-88A7-D5EEDB4B17C3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28574109-6A9B-47FF-88A7-D5EEDB4B17C3}.Release|Any CPU.Build.0 = Release|Any CPU + {28574109-6A9B-47FF-88A7-D5EEDB4B17C3}.Release|arm.ActiveCfg = Release|Any CPU + {28574109-6A9B-47FF-88A7-D5EEDB4B17C3}.Release|arm64.ActiveCfg = Release|Any CPU + {28574109-6A9B-47FF-88A7-D5EEDB4B17C3}.Release|x64.ActiveCfg = Release|Any CPU + {28574109-6A9B-47FF-88A7-D5EEDB4B17C3}.Release|x64.Build.0 = Release|Any CPU + {28574109-6A9B-47FF-88A7-D5EEDB4B17C3}.Release|x86.ActiveCfg = Release|Any CPU + {28574109-6A9B-47FF-88A7-D5EEDB4B17C3}.Release|x86.Build.0 = Release|Any CPU + {28574109-6A9B-47FF-88A7-D5EEDB4B17C3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {28574109-6A9B-47FF-88A7-D5EEDB4B17C3}.Checked|arm.ActiveCfg = Debug|Any CPU + {28574109-6A9B-47FF-88A7-D5EEDB4B17C3}.Checked|arm64.ActiveCfg = Debug|Any CPU + {28574109-6A9B-47FF-88A7-D5EEDB4B17C3}.Checked|x64.ActiveCfg = Debug|Any CPU + {28574109-6A9B-47FF-88A7-D5EEDB4B17C3}.Checked|x86.ActiveCfg = Debug|Any CPU + {7772368D-D8F9-428B-BA07-FE1C0BC3A3E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7772368D-D8F9-428B-BA07-FE1C0BC3A3E5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7772368D-D8F9-428B-BA07-FE1C0BC3A3E5}.Debug|arm.ActiveCfg = Debug|Any CPU + {7772368D-D8F9-428B-BA07-FE1C0BC3A3E5}.Debug|arm64.ActiveCfg = Debug|Any CPU + {7772368D-D8F9-428B-BA07-FE1C0BC3A3E5}.Debug|x64.ActiveCfg = Debug|Any CPU + {7772368D-D8F9-428B-BA07-FE1C0BC3A3E5}.Debug|x64.Build.0 = Debug|Any CPU + {7772368D-D8F9-428B-BA07-FE1C0BC3A3E5}.Debug|x86.ActiveCfg = Debug|Any CPU + {7772368D-D8F9-428B-BA07-FE1C0BC3A3E5}.Debug|x86.Build.0 = Debug|Any CPU + {7772368D-D8F9-428B-BA07-FE1C0BC3A3E5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7772368D-D8F9-428B-BA07-FE1C0BC3A3E5}.Release|Any CPU.Build.0 = Release|Any CPU + {7772368D-D8F9-428B-BA07-FE1C0BC3A3E5}.Release|arm.ActiveCfg = Release|Any CPU + {7772368D-D8F9-428B-BA07-FE1C0BC3A3E5}.Release|arm64.ActiveCfg = Release|Any CPU + {7772368D-D8F9-428B-BA07-FE1C0BC3A3E5}.Release|x64.ActiveCfg = Release|Any CPU + {7772368D-D8F9-428B-BA07-FE1C0BC3A3E5}.Release|x64.Build.0 = Release|Any CPU + {7772368D-D8F9-428B-BA07-FE1C0BC3A3E5}.Release|x86.ActiveCfg = Release|Any CPU + {7772368D-D8F9-428B-BA07-FE1C0BC3A3E5}.Release|x86.Build.0 = Release|Any CPU + {7772368D-D8F9-428B-BA07-FE1C0BC3A3E5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {7772368D-D8F9-428B-BA07-FE1C0BC3A3E5}.Checked|arm.ActiveCfg = Debug|Any CPU + {7772368D-D8F9-428B-BA07-FE1C0BC3A3E5}.Checked|arm64.ActiveCfg = Debug|Any CPU + {7772368D-D8F9-428B-BA07-FE1C0BC3A3E5}.Checked|x64.ActiveCfg = Debug|Any CPU + {7772368D-D8F9-428B-BA07-FE1C0BC3A3E5}.Checked|x86.ActiveCfg = Debug|Any CPU + {8A89CF04-DDA9-4BC6-89E6-44C7B871169B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8A89CF04-DDA9-4BC6-89E6-44C7B871169B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8A89CF04-DDA9-4BC6-89E6-44C7B871169B}.Debug|arm.ActiveCfg = Debug|Any CPU + {8A89CF04-DDA9-4BC6-89E6-44C7B871169B}.Debug|arm64.ActiveCfg = Debug|Any CPU + {8A89CF04-DDA9-4BC6-89E6-44C7B871169B}.Debug|x64.ActiveCfg = Debug|Any CPU + {8A89CF04-DDA9-4BC6-89E6-44C7B871169B}.Debug|x64.Build.0 = Debug|Any CPU + {8A89CF04-DDA9-4BC6-89E6-44C7B871169B}.Debug|x86.ActiveCfg = Debug|Any CPU + {8A89CF04-DDA9-4BC6-89E6-44C7B871169B}.Debug|x86.Build.0 = Debug|Any CPU + {8A89CF04-DDA9-4BC6-89E6-44C7B871169B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8A89CF04-DDA9-4BC6-89E6-44C7B871169B}.Release|Any CPU.Build.0 = Release|Any CPU + {8A89CF04-DDA9-4BC6-89E6-44C7B871169B}.Release|arm.ActiveCfg = Release|Any CPU + {8A89CF04-DDA9-4BC6-89E6-44C7B871169B}.Release|arm64.ActiveCfg = Release|Any CPU + {8A89CF04-DDA9-4BC6-89E6-44C7B871169B}.Release|x64.ActiveCfg = Release|Any CPU + {8A89CF04-DDA9-4BC6-89E6-44C7B871169B}.Release|x64.Build.0 = Release|Any CPU + {8A89CF04-DDA9-4BC6-89E6-44C7B871169B}.Release|x86.ActiveCfg = Release|Any CPU + {8A89CF04-DDA9-4BC6-89E6-44C7B871169B}.Release|x86.Build.0 = Release|Any CPU + {8A89CF04-DDA9-4BC6-89E6-44C7B871169B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {8A89CF04-DDA9-4BC6-89E6-44C7B871169B}.Checked|arm.ActiveCfg = Debug|Any CPU + {8A89CF04-DDA9-4BC6-89E6-44C7B871169B}.Checked|arm64.ActiveCfg = Debug|Any CPU + {8A89CF04-DDA9-4BC6-89E6-44C7B871169B}.Checked|x64.ActiveCfg = Debug|Any CPU + {8A89CF04-DDA9-4BC6-89E6-44C7B871169B}.Checked|x86.ActiveCfg = Debug|Any CPU + {0E308EAA-6CC8-4302-B245-CA31B600BCA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0E308EAA-6CC8-4302-B245-CA31B600BCA9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0E308EAA-6CC8-4302-B245-CA31B600BCA9}.Debug|arm.ActiveCfg = Debug|Any CPU + {0E308EAA-6CC8-4302-B245-CA31B600BCA9}.Debug|arm64.ActiveCfg = Debug|Any CPU + {0E308EAA-6CC8-4302-B245-CA31B600BCA9}.Debug|x64.ActiveCfg = Debug|Any CPU + {0E308EAA-6CC8-4302-B245-CA31B600BCA9}.Debug|x64.Build.0 = Debug|Any CPU + {0E308EAA-6CC8-4302-B245-CA31B600BCA9}.Debug|x86.ActiveCfg = Debug|Any CPU + {0E308EAA-6CC8-4302-B245-CA31B600BCA9}.Debug|x86.Build.0 = Debug|Any CPU + {0E308EAA-6CC8-4302-B245-CA31B600BCA9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0E308EAA-6CC8-4302-B245-CA31B600BCA9}.Release|Any CPU.Build.0 = Release|Any CPU + {0E308EAA-6CC8-4302-B245-CA31B600BCA9}.Release|arm.ActiveCfg = Release|Any CPU + {0E308EAA-6CC8-4302-B245-CA31B600BCA9}.Release|arm64.ActiveCfg = Release|Any CPU + {0E308EAA-6CC8-4302-B245-CA31B600BCA9}.Release|x64.ActiveCfg = Release|Any CPU + {0E308EAA-6CC8-4302-B245-CA31B600BCA9}.Release|x64.Build.0 = Release|Any CPU + {0E308EAA-6CC8-4302-B245-CA31B600BCA9}.Release|x86.ActiveCfg = Release|Any CPU + {0E308EAA-6CC8-4302-B245-CA31B600BCA9}.Release|x86.Build.0 = Release|Any CPU + {0E308EAA-6CC8-4302-B245-CA31B600BCA9}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {0E308EAA-6CC8-4302-B245-CA31B600BCA9}.Checked|arm.ActiveCfg = Debug|Any CPU + {0E308EAA-6CC8-4302-B245-CA31B600BCA9}.Checked|arm64.ActiveCfg = Debug|Any CPU + {0E308EAA-6CC8-4302-B245-CA31B600BCA9}.Checked|x64.ActiveCfg = Debug|Any CPU + {0E308EAA-6CC8-4302-B245-CA31B600BCA9}.Checked|x86.ActiveCfg = Debug|Any CPU + {9C89654D-40D8-406E-AE79-9ABBE1C9FDC7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9C89654D-40D8-406E-AE79-9ABBE1C9FDC7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9C89654D-40D8-406E-AE79-9ABBE1C9FDC7}.Debug|arm.ActiveCfg = Debug|Any CPU + {9C89654D-40D8-406E-AE79-9ABBE1C9FDC7}.Debug|arm64.ActiveCfg = Debug|Any CPU + {9C89654D-40D8-406E-AE79-9ABBE1C9FDC7}.Debug|x64.ActiveCfg = Debug|Any CPU + {9C89654D-40D8-406E-AE79-9ABBE1C9FDC7}.Debug|x64.Build.0 = Debug|Any CPU + {9C89654D-40D8-406E-AE79-9ABBE1C9FDC7}.Debug|x86.ActiveCfg = Debug|Any CPU + {9C89654D-40D8-406E-AE79-9ABBE1C9FDC7}.Debug|x86.Build.0 = Debug|Any CPU + {9C89654D-40D8-406E-AE79-9ABBE1C9FDC7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9C89654D-40D8-406E-AE79-9ABBE1C9FDC7}.Release|Any CPU.Build.0 = Release|Any CPU + {9C89654D-40D8-406E-AE79-9ABBE1C9FDC7}.Release|arm.ActiveCfg = Release|Any CPU + {9C89654D-40D8-406E-AE79-9ABBE1C9FDC7}.Release|arm64.ActiveCfg = Release|Any CPU + {9C89654D-40D8-406E-AE79-9ABBE1C9FDC7}.Release|x64.ActiveCfg = Release|Any CPU + {9C89654D-40D8-406E-AE79-9ABBE1C9FDC7}.Release|x64.Build.0 = Release|Any CPU + {9C89654D-40D8-406E-AE79-9ABBE1C9FDC7}.Release|x86.ActiveCfg = Release|Any CPU + {9C89654D-40D8-406E-AE79-9ABBE1C9FDC7}.Release|x86.Build.0 = Release|Any CPU + {9C89654D-40D8-406E-AE79-9ABBE1C9FDC7}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {9C89654D-40D8-406E-AE79-9ABBE1C9FDC7}.Checked|arm.ActiveCfg = Debug|Any CPU + {9C89654D-40D8-406E-AE79-9ABBE1C9FDC7}.Checked|arm64.ActiveCfg = Debug|Any CPU + {9C89654D-40D8-406E-AE79-9ABBE1C9FDC7}.Checked|x64.ActiveCfg = Debug|Any CPU + {9C89654D-40D8-406E-AE79-9ABBE1C9FDC7}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution + {F8D0F6E7-0543-4BF7-BE0D-089D5F1CCEC6} = {3AC935C8-2FD6-4B40-96D8-FCF4D64E2524} {59D900EB-CABB-4CA9-9BE4-9855ADC32752} = {58AD219B-7E2F-4587-9D50-8ED0E0F9CF6A} {621B4749-CFCE-4CC9-8B1E-A0AA26A4FCD0} = {58AD219B-7E2F-4587-9D50-8ED0E0F9CF6A} - {E61CD2AC-E0BB-4FC4-99D3-528AEDDB271B} = {FF4142E3-375C-4658-A1FD-F4C895F7B7B5} - {B7E5B25A-0E3A-4FF8-958C-3FEB057DE330} = {FF4142E3-375C-4658-A1FD-F4C895F7B7B5} - {493BCA01-A5FC-4C5A-9E85-A0E23E3CD425} = {FF4142E3-375C-4658-A1FD-F4C895F7B7B5} - {AC53B586-F702-4B0C-94A9-A6F066FDC4C1} = {FF4142E3-375C-4658-A1FD-F4C895F7B7B5} + {7A9021C4-769A-4A19-9244-0F575D4E96AE} = {7D7459AB-75AF-4AEF-90CA-11FD253C2B1C} {71D4A6E0-0A63-4232-9EBB-E2D46C7E69B2} = {7D7459AB-75AF-4AEF-90CA-11FD253C2B1C} {E1F18567-C282-456B-8CCC-677702609FAF} = {7D7459AB-75AF-4AEF-90CA-11FD253C2B1C} + {6CCAD93E-1888-4610-8EB8-7043B7C61AE8} = {7D7459AB-75AF-4AEF-90CA-11FD253C2B1C} + {E0FFABB4-08A9-4259-B9DB-52E11AEBA4F3} = {7D7459AB-75AF-4AEF-90CA-11FD253C2B1C} {167E89F1-63F0-4E47-B67E-9931589E75CE} = {7D7459AB-75AF-4AEF-90CA-11FD253C2B1C} {19B414C5-ACD0-4E78-B0A0-C698132F1988} = {7D7459AB-75AF-4AEF-90CA-11FD253C2B1C} - {875B1171-C38D-4842-B3E7-2D4D685F292B} = {6BC70A1F-00D5-482D-9603-DD6C6E84AE4B} + {E61CD2AC-E0BB-4FC4-99D3-528AEDDB271B} = {FF4142E3-375C-4658-A1FD-F4C895F7B7B5} + {B7E5B25A-0E3A-4FF8-958C-3FEB057DE330} = {FF4142E3-375C-4658-A1FD-F4C895F7B7B5} + {25243F48-E92B-4EA8-B1D2-7DE846C03AC5} = {FF4142E3-375C-4658-A1FD-F4C895F7B7B5} + {50734B6B-B918-4C3D-B6BB-3F38E2DE7169} = {FF4142E3-375C-4658-A1FD-F4C895F7B7B5} + {493BCA01-A5FC-4C5A-9E85-A0E23E3CD425} = {FF4142E3-375C-4658-A1FD-F4C895F7B7B5} + {AC53B586-F702-4B0C-94A9-A6F066FDC4C1} = {FF4142E3-375C-4658-A1FD-F4C895F7B7B5} + {A5D41312-C3C2-4153-AB58-EE8717C8D379} = {6BC70A1F-00D5-482D-9603-DD6C6E84AE4B} {2C3750CD-EEE9-4452-B901-AF3084E6B9B2} = {6BC70A1F-00D5-482D-9603-DD6C6E84AE4B} {8AC2B9D8-7C86-4F20-9E4C-369ACE927BF5} = {6BC70A1F-00D5-482D-9603-DD6C6E84AE4B} + {28574109-6A9B-47FF-88A7-D5EEDB4B17C3} = {D969D172-A67B-4C3D-A79B-2B1E0EE05E22} + {7772368D-D8F9-428B-BA07-FE1C0BC3A3E5} = {D969D172-A67B-4C3D-A79B-2B1E0EE05E22} + {D969D172-A67B-4C3D-A79B-2B1E0EE05E22} = {27218DDE-108C-4ED2-B8D1-4D69BC012864} + {8A89CF04-DDA9-4BC6-89E6-44C7B871169B} = {D25ECFF0-8A66-488A-AD69-5486D70DF226} + {0E308EAA-6CC8-4302-B245-CA31B600BCA9} = {D25ECFF0-8A66-488A-AD69-5486D70DF226} + {D25ECFF0-8A66-488A-AD69-5486D70DF226} = {27218DDE-108C-4ED2-B8D1-4D69BC012864} + {9C89654D-40D8-406E-AE79-9ABBE1C9FDC7} = {5301EE66-474D-48DB-9510-A6D2C216EF27} + {5301EE66-474D-48DB-9510-A6D2C216EF27} = {27218DDE-108C-4ED2-B8D1-4D69BC012864} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {FA8DCCFE-EDCD-4086-AD0B-5089B54BC658} diff --git a/src/libraries/System.DirectoryServices.Protocols/src/CompatibilitySuppressions.xml b/src/libraries/System.DirectoryServices.Protocols/src/CompatibilitySuppressions.xml new file mode 100644 index 00000000000000..cd9ade175f2ca5 --- /dev/null +++ b/src/libraries/System.DirectoryServices.Protocols/src/CompatibilitySuppressions.xml @@ -0,0 +1,32 @@ + + + + + CP0003 + System.DirectoryServices.Protocols, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.DirectoryServices.Protocols.dll + lib/netstandard2.0/System.DirectoryServices.Protocols.dll + true + + + CP0003 + System.DirectoryServices.Protocols, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.DirectoryServices.Protocols.dll + lib/netstandard2.0/System.DirectoryServices.Protocols.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.DirectoryServices.Protocols.dll + lib/netstandard2.0/System.DirectoryServices.Protocols.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.DirectoryServices.Protocols.dll + lib/netstandard2.0/System.DirectoryServices.Protocols.dll + true + + \ No newline at end of file diff --git a/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj b/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj index cfcab2e34245e8..11f18688ec3997 100644 --- a/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj +++ b/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj @@ -1,4 +1,5 @@ + $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-osx;$(NetCoreAppCurrent)-linux;$(NetCoreAppCurrent);$(NetCoreAppPrevious)-windows;$(NetCoreAppPrevious)-osx;$(NetCoreAppPrevious)-linux;$(NetCoreAppPrevious);$(NetCoreAppMinimum)-windows;$(NetCoreAppMinimum)-osx;$(NetCoreAppMinimum)-linux;$(NetCoreAppMinimum);netstandard2.0 true @@ -49,19 +50,11 @@ - - Common\DisableRuntimeMarshalling.cs - - - Common\Interop\Interop.Ldap.cs - - - Common\Interop\Windows\Interop.BOOL.cs - - - Common\System\Obsoletions.cs - + + + + + @@ -73,15 +66,10 @@ - - Common\Interop\Windows\Interop.Libraries.cs - - - Common\Interop\Windows\Wldap32\Interop.Ldap.cs - - - Common\Interop\Windows\Wldap32\Interop.Ber.cs - + + + + @@ -94,30 +82,22 @@ - - Common\System\LocalAppContextSwitches.Common.cs - - - Common\Interop\Linux\OpenLdap\Interop.Ldap.cs - - - Common\Interop\Linux\OpenLdap\Interop.Ber.cs - + + + + - - Common\Interop\Linux\Interop.Libraries.cs - + - - Common\Interop\OSX\Interop.Libraries.cs - + + diff --git a/src/libraries/System.DirectoryServices/System.DirectoryServices.sln b/src/libraries/System.DirectoryServices/System.DirectoryServices.sln index aec33a65a9a3f8..6bcbc7480b85ba 100644 --- a/src/libraries/System.DirectoryServices/System.DirectoryServices.sln +++ b/src/libraries/System.DirectoryServices/System.DirectoryServices.sln @@ -1,18 +1,30 @@ 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", "{16140308-2197-4634-A664-3A73DA182FAE}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{1A19656D-1047-4E43-B9C5-73423399D1D4}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Drawing.Common", "..\shims\stubs\System.Drawing.Common.csproj", "{A0621F43-D8FF-4EDE-9165-1B2757F8AB14}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.DirectoryServices", "ref\System.DirectoryServices.csproj", "{DB7964E8-6761-47C7-B120-DAF13FDDE01B}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.DirectoryServices", "src\System.DirectoryServices.csproj", "{6870504E-8490-4A4C-938A-C68DA9A2F65D}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.DirectoryServices.Tests", "tests\System.DirectoryServices.Tests.csproj", "{197926DA-9180-4AD4-AC71-B95FC5CA7557}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{9DA2AD39-83D4-4500-A613-32039A21A3E3}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{2929F1C6-A103-4211-A318-96EEE83DD713}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{843D7E6B-5F25-41C1-8469-764854BA2D86}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.Uri", "..\System.Private.Uri\src\System.Private.Uri.csproj", "{8323FADF-3D4E-46EE-8CA8-45C523142B77}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{5AB39023-05D5-48A2-9414-C289ECB1C13B}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{29CA2D73-E756-4A81-A0A3-733C771FB0AB}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{3FFDE907-1181-40F7-AC06-F3AD3D029AAA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\src\System.Runtime.csproj", "{CBF80530-F3DF-4305-B45D-87F89D3FCBC5}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Permissions", "..\System.Security.Permissions\ref\System.Security.Permissions.csproj", "{C40C15E4-8060-4295-9B8F-E04F94BFDA2B}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Permissions", "..\System.Security.Permissions\src\System.Security.Permissions.csproj", "{E2B0069E-C11C-4829-87C8-A98ED298CB8A}" @@ -21,80 +33,554 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", "..\System.Windows.Extensions\src\System.Windows.Extensions.csproj", "{B3473ABA-A06B-445E-AE21-C7432AD14482}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{EB30CC4C-9662-46E0-8BC5-DFC16A24365F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{15F34F54-7854-457C-BD9E-E65E14553832}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{902318E3-C881-4BB3-8EEA-FC24A836B5AE}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{932D7BE3-67C5-40F9-BEF4-038C153405A2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{56F910A7-D120-4453-AF1D-594CF8398DC0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{8C0BC95E-A79F-49EA-B908-99FD8858F2FD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{9CC076AE-C3BC-4F17-8C01-E330D03F4657}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{3D6F1FD7-42FB-42BE-87D9-21202EC40845}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{EB30CC4C-9662-46E0-8BC5-DFC16A24365F}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{87FDB279-F475-45C0-92EF-7893E25AA0A6}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{902318E3-C881-4BB3-8EEA-FC24A836B5AE}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{C1A58B90-FE26-4840-9D69-60DFC77BF485}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{0FD62E14-039A-4678-B5A2-00DAE2900BE3}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{D8D71BDD-8E82-496A-9F3A-66E035CDC6C5}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{DE0D36D1-77BA-4FB6-A76A-A53C63634396}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{9AEB1879-A22A-46BD-B9B5-70348CE8F3CC}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|arm = Debug|arm + Debug|arm64 = Debug|arm64 + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|arm = Release|arm + Release|arm64 = Release|arm64 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + Checked|Any CPU = Checked|Any CPU + Checked|arm = Checked|arm + Checked|arm64 = Checked|arm64 + Checked|x64 = Checked|x64 + Checked|x86 = Checked|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {16140308-2197-4634-A664-3A73DA182FAE}.Debug|Any CPU.ActiveCfg = Debug|x64 + {16140308-2197-4634-A664-3A73DA182FAE}.Debug|Any CPU.Build.0 = Debug|x64 + {16140308-2197-4634-A664-3A73DA182FAE}.Debug|arm.ActiveCfg = Debug|arm + {16140308-2197-4634-A664-3A73DA182FAE}.Debug|arm.Build.0 = Debug|arm + {16140308-2197-4634-A664-3A73DA182FAE}.Debug|arm64.ActiveCfg = Debug|arm64 + {16140308-2197-4634-A664-3A73DA182FAE}.Debug|arm64.Build.0 = Debug|arm64 + {16140308-2197-4634-A664-3A73DA182FAE}.Debug|x64.ActiveCfg = Debug|x64 + {16140308-2197-4634-A664-3A73DA182FAE}.Debug|x64.Build.0 = Debug|x64 + {16140308-2197-4634-A664-3A73DA182FAE}.Debug|x86.ActiveCfg = Debug|x86 + {16140308-2197-4634-A664-3A73DA182FAE}.Debug|x86.Build.0 = Debug|x86 + {16140308-2197-4634-A664-3A73DA182FAE}.Release|Any CPU.ActiveCfg = Release|x64 + {16140308-2197-4634-A664-3A73DA182FAE}.Release|Any CPU.Build.0 = Release|x64 + {16140308-2197-4634-A664-3A73DA182FAE}.Release|arm.ActiveCfg = Release|arm + {16140308-2197-4634-A664-3A73DA182FAE}.Release|arm.Build.0 = Release|arm + {16140308-2197-4634-A664-3A73DA182FAE}.Release|arm64.ActiveCfg = Release|arm64 + {16140308-2197-4634-A664-3A73DA182FAE}.Release|arm64.Build.0 = Release|arm64 + {16140308-2197-4634-A664-3A73DA182FAE}.Release|x64.ActiveCfg = Release|x64 + {16140308-2197-4634-A664-3A73DA182FAE}.Release|x64.Build.0 = Release|x64 + {16140308-2197-4634-A664-3A73DA182FAE}.Release|x86.ActiveCfg = Release|x86 + {16140308-2197-4634-A664-3A73DA182FAE}.Release|x86.Build.0 = Release|x86 + {16140308-2197-4634-A664-3A73DA182FAE}.Checked|Any CPU.ActiveCfg = Checked|x64 + {16140308-2197-4634-A664-3A73DA182FAE}.Checked|Any CPU.Build.0 = Checked|x64 + {16140308-2197-4634-A664-3A73DA182FAE}.Checked|arm.ActiveCfg = Checked|arm + {16140308-2197-4634-A664-3A73DA182FAE}.Checked|arm.Build.0 = Checked|arm + {16140308-2197-4634-A664-3A73DA182FAE}.Checked|arm64.ActiveCfg = Checked|arm64 + {16140308-2197-4634-A664-3A73DA182FAE}.Checked|arm64.Build.0 = Checked|arm64 + {16140308-2197-4634-A664-3A73DA182FAE}.Checked|x64.ActiveCfg = Checked|x64 + {16140308-2197-4634-A664-3A73DA182FAE}.Checked|x64.Build.0 = Checked|x64 + {16140308-2197-4634-A664-3A73DA182FAE}.Checked|x86.ActiveCfg = Checked|x86 + {16140308-2197-4634-A664-3A73DA182FAE}.Checked|x86.Build.0 = Checked|x86 {1A19656D-1047-4E43-B9C5-73423399D1D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1A19656D-1047-4E43-B9C5-73423399D1D4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1A19656D-1047-4E43-B9C5-73423399D1D4}.Debug|arm.ActiveCfg = Debug|Any CPU + {1A19656D-1047-4E43-B9C5-73423399D1D4}.Debug|arm64.ActiveCfg = Debug|Any CPU + {1A19656D-1047-4E43-B9C5-73423399D1D4}.Debug|x64.ActiveCfg = Debug|Any CPU + {1A19656D-1047-4E43-B9C5-73423399D1D4}.Debug|x64.Build.0 = Debug|Any CPU + {1A19656D-1047-4E43-B9C5-73423399D1D4}.Debug|x86.ActiveCfg = Debug|Any CPU + {1A19656D-1047-4E43-B9C5-73423399D1D4}.Debug|x86.Build.0 = Debug|Any CPU {1A19656D-1047-4E43-B9C5-73423399D1D4}.Release|Any CPU.ActiveCfg = Release|Any CPU {1A19656D-1047-4E43-B9C5-73423399D1D4}.Release|Any CPU.Build.0 = Release|Any CPU + {1A19656D-1047-4E43-B9C5-73423399D1D4}.Release|arm.ActiveCfg = Release|Any CPU + {1A19656D-1047-4E43-B9C5-73423399D1D4}.Release|arm64.ActiveCfg = Release|Any CPU + {1A19656D-1047-4E43-B9C5-73423399D1D4}.Release|x64.ActiveCfg = Release|Any CPU + {1A19656D-1047-4E43-B9C5-73423399D1D4}.Release|x64.Build.0 = Release|Any CPU + {1A19656D-1047-4E43-B9C5-73423399D1D4}.Release|x86.ActiveCfg = Release|Any CPU + {1A19656D-1047-4E43-B9C5-73423399D1D4}.Release|x86.Build.0 = Release|Any CPU + {1A19656D-1047-4E43-B9C5-73423399D1D4}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {1A19656D-1047-4E43-B9C5-73423399D1D4}.Checked|arm.ActiveCfg = Debug|Any CPU + {1A19656D-1047-4E43-B9C5-73423399D1D4}.Checked|arm64.ActiveCfg = Debug|Any CPU + {1A19656D-1047-4E43-B9C5-73423399D1D4}.Checked|x64.ActiveCfg = Debug|Any CPU + {1A19656D-1047-4E43-B9C5-73423399D1D4}.Checked|x86.ActiveCfg = Debug|Any CPU + {A0621F43-D8FF-4EDE-9165-1B2757F8AB14}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A0621F43-D8FF-4EDE-9165-1B2757F8AB14}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A0621F43-D8FF-4EDE-9165-1B2757F8AB14}.Debug|arm.ActiveCfg = Debug|Any CPU + {A0621F43-D8FF-4EDE-9165-1B2757F8AB14}.Debug|arm64.ActiveCfg = Debug|Any CPU + {A0621F43-D8FF-4EDE-9165-1B2757F8AB14}.Debug|x64.ActiveCfg = Debug|Any CPU + {A0621F43-D8FF-4EDE-9165-1B2757F8AB14}.Debug|x64.Build.0 = Debug|Any CPU + {A0621F43-D8FF-4EDE-9165-1B2757F8AB14}.Debug|x86.ActiveCfg = Debug|Any CPU + {A0621F43-D8FF-4EDE-9165-1B2757F8AB14}.Debug|x86.Build.0 = Debug|Any CPU + {A0621F43-D8FF-4EDE-9165-1B2757F8AB14}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A0621F43-D8FF-4EDE-9165-1B2757F8AB14}.Release|Any CPU.Build.0 = Release|Any CPU + {A0621F43-D8FF-4EDE-9165-1B2757F8AB14}.Release|arm.ActiveCfg = Release|Any CPU + {A0621F43-D8FF-4EDE-9165-1B2757F8AB14}.Release|arm64.ActiveCfg = Release|Any CPU + {A0621F43-D8FF-4EDE-9165-1B2757F8AB14}.Release|x64.ActiveCfg = Release|Any CPU + {A0621F43-D8FF-4EDE-9165-1B2757F8AB14}.Release|x64.Build.0 = Release|Any CPU + {A0621F43-D8FF-4EDE-9165-1B2757F8AB14}.Release|x86.ActiveCfg = Release|Any CPU + {A0621F43-D8FF-4EDE-9165-1B2757F8AB14}.Release|x86.Build.0 = Release|Any CPU + {A0621F43-D8FF-4EDE-9165-1B2757F8AB14}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {A0621F43-D8FF-4EDE-9165-1B2757F8AB14}.Checked|arm.ActiveCfg = Debug|Any CPU + {A0621F43-D8FF-4EDE-9165-1B2757F8AB14}.Checked|arm64.ActiveCfg = Debug|Any CPU + {A0621F43-D8FF-4EDE-9165-1B2757F8AB14}.Checked|x64.ActiveCfg = Debug|Any CPU + {A0621F43-D8FF-4EDE-9165-1B2757F8AB14}.Checked|x86.ActiveCfg = Debug|Any CPU {DB7964E8-6761-47C7-B120-DAF13FDDE01B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DB7964E8-6761-47C7-B120-DAF13FDDE01B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DB7964E8-6761-47C7-B120-DAF13FDDE01B}.Debug|arm.ActiveCfg = Debug|Any CPU + {DB7964E8-6761-47C7-B120-DAF13FDDE01B}.Debug|arm64.ActiveCfg = Debug|Any CPU + {DB7964E8-6761-47C7-B120-DAF13FDDE01B}.Debug|x64.ActiveCfg = Debug|Any CPU + {DB7964E8-6761-47C7-B120-DAF13FDDE01B}.Debug|x64.Build.0 = Debug|Any CPU + {DB7964E8-6761-47C7-B120-DAF13FDDE01B}.Debug|x86.ActiveCfg = Debug|Any CPU + {DB7964E8-6761-47C7-B120-DAF13FDDE01B}.Debug|x86.Build.0 = Debug|Any CPU {DB7964E8-6761-47C7-B120-DAF13FDDE01B}.Release|Any CPU.ActiveCfg = Release|Any CPU {DB7964E8-6761-47C7-B120-DAF13FDDE01B}.Release|Any CPU.Build.0 = Release|Any CPU + {DB7964E8-6761-47C7-B120-DAF13FDDE01B}.Release|arm.ActiveCfg = Release|Any CPU + {DB7964E8-6761-47C7-B120-DAF13FDDE01B}.Release|arm64.ActiveCfg = Release|Any CPU + {DB7964E8-6761-47C7-B120-DAF13FDDE01B}.Release|x64.ActiveCfg = Release|Any CPU + {DB7964E8-6761-47C7-B120-DAF13FDDE01B}.Release|x64.Build.0 = Release|Any CPU + {DB7964E8-6761-47C7-B120-DAF13FDDE01B}.Release|x86.ActiveCfg = Release|Any CPU + {DB7964E8-6761-47C7-B120-DAF13FDDE01B}.Release|x86.Build.0 = Release|Any CPU + {DB7964E8-6761-47C7-B120-DAF13FDDE01B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {DB7964E8-6761-47C7-B120-DAF13FDDE01B}.Checked|arm.ActiveCfg = Debug|Any CPU + {DB7964E8-6761-47C7-B120-DAF13FDDE01B}.Checked|arm64.ActiveCfg = Debug|Any CPU + {DB7964E8-6761-47C7-B120-DAF13FDDE01B}.Checked|x64.ActiveCfg = Debug|Any CPU + {DB7964E8-6761-47C7-B120-DAF13FDDE01B}.Checked|x86.ActiveCfg = Debug|Any CPU {6870504E-8490-4A4C-938A-C68DA9A2F65D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6870504E-8490-4A4C-938A-C68DA9A2F65D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6870504E-8490-4A4C-938A-C68DA9A2F65D}.Debug|arm.ActiveCfg = Debug|Any CPU + {6870504E-8490-4A4C-938A-C68DA9A2F65D}.Debug|arm64.ActiveCfg = Debug|Any CPU + {6870504E-8490-4A4C-938A-C68DA9A2F65D}.Debug|x64.ActiveCfg = Debug|Any CPU + {6870504E-8490-4A4C-938A-C68DA9A2F65D}.Debug|x64.Build.0 = Debug|Any CPU + {6870504E-8490-4A4C-938A-C68DA9A2F65D}.Debug|x86.ActiveCfg = Debug|Any CPU + {6870504E-8490-4A4C-938A-C68DA9A2F65D}.Debug|x86.Build.0 = Debug|Any CPU {6870504E-8490-4A4C-938A-C68DA9A2F65D}.Release|Any CPU.ActiveCfg = Release|Any CPU {6870504E-8490-4A4C-938A-C68DA9A2F65D}.Release|Any CPU.Build.0 = Release|Any CPU + {6870504E-8490-4A4C-938A-C68DA9A2F65D}.Release|arm.ActiveCfg = Release|Any CPU + {6870504E-8490-4A4C-938A-C68DA9A2F65D}.Release|arm64.ActiveCfg = Release|Any CPU + {6870504E-8490-4A4C-938A-C68DA9A2F65D}.Release|x64.ActiveCfg = Release|Any CPU + {6870504E-8490-4A4C-938A-C68DA9A2F65D}.Release|x64.Build.0 = Release|Any CPU + {6870504E-8490-4A4C-938A-C68DA9A2F65D}.Release|x86.ActiveCfg = Release|Any CPU + {6870504E-8490-4A4C-938A-C68DA9A2F65D}.Release|x86.Build.0 = Release|Any CPU + {6870504E-8490-4A4C-938A-C68DA9A2F65D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {6870504E-8490-4A4C-938A-C68DA9A2F65D}.Checked|arm.ActiveCfg = Debug|Any CPU + {6870504E-8490-4A4C-938A-C68DA9A2F65D}.Checked|arm64.ActiveCfg = Debug|Any CPU + {6870504E-8490-4A4C-938A-C68DA9A2F65D}.Checked|x64.ActiveCfg = Debug|Any CPU + {6870504E-8490-4A4C-938A-C68DA9A2F65D}.Checked|x86.ActiveCfg = Debug|Any CPU {197926DA-9180-4AD4-AC71-B95FC5CA7557}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {197926DA-9180-4AD4-AC71-B95FC5CA7557}.Debug|Any CPU.Build.0 = Debug|Any CPU + {197926DA-9180-4AD4-AC71-B95FC5CA7557}.Debug|arm.ActiveCfg = Debug|Any CPU + {197926DA-9180-4AD4-AC71-B95FC5CA7557}.Debug|arm64.ActiveCfg = Debug|Any CPU + {197926DA-9180-4AD4-AC71-B95FC5CA7557}.Debug|x64.ActiveCfg = Debug|Any CPU + {197926DA-9180-4AD4-AC71-B95FC5CA7557}.Debug|x64.Build.0 = Debug|Any CPU + {197926DA-9180-4AD4-AC71-B95FC5CA7557}.Debug|x86.ActiveCfg = Debug|Any CPU + {197926DA-9180-4AD4-AC71-B95FC5CA7557}.Debug|x86.Build.0 = Debug|Any CPU {197926DA-9180-4AD4-AC71-B95FC5CA7557}.Release|Any CPU.ActiveCfg = Release|Any CPU {197926DA-9180-4AD4-AC71-B95FC5CA7557}.Release|Any CPU.Build.0 = Release|Any CPU - {9DA2AD39-83D4-4500-A613-32039A21A3E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9DA2AD39-83D4-4500-A613-32039A21A3E3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9DA2AD39-83D4-4500-A613-32039A21A3E3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9DA2AD39-83D4-4500-A613-32039A21A3E3}.Release|Any CPU.Build.0 = Release|Any CPU + {197926DA-9180-4AD4-AC71-B95FC5CA7557}.Release|arm.ActiveCfg = Release|Any CPU + {197926DA-9180-4AD4-AC71-B95FC5CA7557}.Release|arm64.ActiveCfg = Release|Any CPU + {197926DA-9180-4AD4-AC71-B95FC5CA7557}.Release|x64.ActiveCfg = Release|Any CPU + {197926DA-9180-4AD4-AC71-B95FC5CA7557}.Release|x64.Build.0 = Release|Any CPU + {197926DA-9180-4AD4-AC71-B95FC5CA7557}.Release|x86.ActiveCfg = Release|Any CPU + {197926DA-9180-4AD4-AC71-B95FC5CA7557}.Release|x86.Build.0 = Release|Any CPU + {197926DA-9180-4AD4-AC71-B95FC5CA7557}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {197926DA-9180-4AD4-AC71-B95FC5CA7557}.Checked|arm.ActiveCfg = Debug|Any CPU + {197926DA-9180-4AD4-AC71-B95FC5CA7557}.Checked|arm64.ActiveCfg = Debug|Any CPU + {197926DA-9180-4AD4-AC71-B95FC5CA7557}.Checked|x64.ActiveCfg = Debug|Any CPU + {197926DA-9180-4AD4-AC71-B95FC5CA7557}.Checked|x86.ActiveCfg = Debug|Any CPU + {2929F1C6-A103-4211-A318-96EEE83DD713}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2929F1C6-A103-4211-A318-96EEE83DD713}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2929F1C6-A103-4211-A318-96EEE83DD713}.Debug|arm.ActiveCfg = Debug|Any CPU + {2929F1C6-A103-4211-A318-96EEE83DD713}.Debug|arm64.ActiveCfg = Debug|Any CPU + {2929F1C6-A103-4211-A318-96EEE83DD713}.Debug|x64.ActiveCfg = Debug|Any CPU + {2929F1C6-A103-4211-A318-96EEE83DD713}.Debug|x64.Build.0 = Debug|Any CPU + {2929F1C6-A103-4211-A318-96EEE83DD713}.Debug|x86.ActiveCfg = Debug|Any CPU + {2929F1C6-A103-4211-A318-96EEE83DD713}.Debug|x86.Build.0 = Debug|Any CPU + {2929F1C6-A103-4211-A318-96EEE83DD713}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2929F1C6-A103-4211-A318-96EEE83DD713}.Release|Any CPU.Build.0 = Release|Any CPU + {2929F1C6-A103-4211-A318-96EEE83DD713}.Release|arm.ActiveCfg = Release|Any CPU + {2929F1C6-A103-4211-A318-96EEE83DD713}.Release|arm64.ActiveCfg = Release|Any CPU + {2929F1C6-A103-4211-A318-96EEE83DD713}.Release|x64.ActiveCfg = Release|Any CPU + {2929F1C6-A103-4211-A318-96EEE83DD713}.Release|x64.Build.0 = Release|Any CPU + {2929F1C6-A103-4211-A318-96EEE83DD713}.Release|x86.ActiveCfg = Release|Any CPU + {2929F1C6-A103-4211-A318-96EEE83DD713}.Release|x86.Build.0 = Release|Any CPU + {2929F1C6-A103-4211-A318-96EEE83DD713}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {2929F1C6-A103-4211-A318-96EEE83DD713}.Checked|arm.ActiveCfg = Debug|Any CPU + {2929F1C6-A103-4211-A318-96EEE83DD713}.Checked|arm64.ActiveCfg = Debug|Any CPU + {2929F1C6-A103-4211-A318-96EEE83DD713}.Checked|x64.ActiveCfg = Debug|Any CPU + {2929F1C6-A103-4211-A318-96EEE83DD713}.Checked|x86.ActiveCfg = Debug|Any CPU + {843D7E6B-5F25-41C1-8469-764854BA2D86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {843D7E6B-5F25-41C1-8469-764854BA2D86}.Debug|Any CPU.Build.0 = Debug|Any CPU + {843D7E6B-5F25-41C1-8469-764854BA2D86}.Debug|arm.ActiveCfg = Debug|Any CPU + {843D7E6B-5F25-41C1-8469-764854BA2D86}.Debug|arm64.ActiveCfg = Debug|Any CPU + {843D7E6B-5F25-41C1-8469-764854BA2D86}.Debug|x64.ActiveCfg = Debug|Any CPU + {843D7E6B-5F25-41C1-8469-764854BA2D86}.Debug|x64.Build.0 = Debug|Any CPU + {843D7E6B-5F25-41C1-8469-764854BA2D86}.Debug|x86.ActiveCfg = Debug|Any CPU + {843D7E6B-5F25-41C1-8469-764854BA2D86}.Debug|x86.Build.0 = Debug|Any CPU + {843D7E6B-5F25-41C1-8469-764854BA2D86}.Release|Any CPU.ActiveCfg = Release|Any CPU + {843D7E6B-5F25-41C1-8469-764854BA2D86}.Release|Any CPU.Build.0 = Release|Any CPU + {843D7E6B-5F25-41C1-8469-764854BA2D86}.Release|arm.ActiveCfg = Release|Any CPU + {843D7E6B-5F25-41C1-8469-764854BA2D86}.Release|arm64.ActiveCfg = Release|Any CPU + {843D7E6B-5F25-41C1-8469-764854BA2D86}.Release|x64.ActiveCfg = Release|Any CPU + {843D7E6B-5F25-41C1-8469-764854BA2D86}.Release|x64.Build.0 = Release|Any CPU + {843D7E6B-5F25-41C1-8469-764854BA2D86}.Release|x86.ActiveCfg = Release|Any CPU + {843D7E6B-5F25-41C1-8469-764854BA2D86}.Release|x86.Build.0 = Release|Any CPU + {843D7E6B-5F25-41C1-8469-764854BA2D86}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {843D7E6B-5F25-41C1-8469-764854BA2D86}.Checked|arm.ActiveCfg = Debug|Any CPU + {843D7E6B-5F25-41C1-8469-764854BA2D86}.Checked|arm64.ActiveCfg = Debug|Any CPU + {843D7E6B-5F25-41C1-8469-764854BA2D86}.Checked|x64.ActiveCfg = Debug|Any CPU + {843D7E6B-5F25-41C1-8469-764854BA2D86}.Checked|x86.ActiveCfg = Debug|Any CPU + {8323FADF-3D4E-46EE-8CA8-45C523142B77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8323FADF-3D4E-46EE-8CA8-45C523142B77}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8323FADF-3D4E-46EE-8CA8-45C523142B77}.Debug|arm.ActiveCfg = Debug|Any CPU + {8323FADF-3D4E-46EE-8CA8-45C523142B77}.Debug|arm64.ActiveCfg = Debug|Any CPU + {8323FADF-3D4E-46EE-8CA8-45C523142B77}.Debug|x64.ActiveCfg = Debug|Any CPU + {8323FADF-3D4E-46EE-8CA8-45C523142B77}.Debug|x64.Build.0 = Debug|Any CPU + {8323FADF-3D4E-46EE-8CA8-45C523142B77}.Debug|x86.ActiveCfg = Debug|Any CPU + {8323FADF-3D4E-46EE-8CA8-45C523142B77}.Debug|x86.Build.0 = Debug|Any CPU + {8323FADF-3D4E-46EE-8CA8-45C523142B77}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8323FADF-3D4E-46EE-8CA8-45C523142B77}.Release|Any CPU.Build.0 = Release|Any CPU + {8323FADF-3D4E-46EE-8CA8-45C523142B77}.Release|arm.ActiveCfg = Release|Any CPU + {8323FADF-3D4E-46EE-8CA8-45C523142B77}.Release|arm64.ActiveCfg = Release|Any CPU + {8323FADF-3D4E-46EE-8CA8-45C523142B77}.Release|x64.ActiveCfg = Release|Any CPU + {8323FADF-3D4E-46EE-8CA8-45C523142B77}.Release|x64.Build.0 = Release|Any CPU + {8323FADF-3D4E-46EE-8CA8-45C523142B77}.Release|x86.ActiveCfg = Release|Any CPU + {8323FADF-3D4E-46EE-8CA8-45C523142B77}.Release|x86.Build.0 = Release|Any CPU + {8323FADF-3D4E-46EE-8CA8-45C523142B77}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {8323FADF-3D4E-46EE-8CA8-45C523142B77}.Checked|arm.ActiveCfg = Debug|Any CPU + {8323FADF-3D4E-46EE-8CA8-45C523142B77}.Checked|arm64.ActiveCfg = Debug|Any CPU + {8323FADF-3D4E-46EE-8CA8-45C523142B77}.Checked|x64.ActiveCfg = Debug|Any CPU + {8323FADF-3D4E-46EE-8CA8-45C523142B77}.Checked|x86.ActiveCfg = Debug|Any CPU {5AB39023-05D5-48A2-9414-C289ECB1C13B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5AB39023-05D5-48A2-9414-C289ECB1C13B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5AB39023-05D5-48A2-9414-C289ECB1C13B}.Debug|arm.ActiveCfg = Debug|Any CPU + {5AB39023-05D5-48A2-9414-C289ECB1C13B}.Debug|arm64.ActiveCfg = Debug|Any CPU + {5AB39023-05D5-48A2-9414-C289ECB1C13B}.Debug|x64.ActiveCfg = Debug|Any CPU + {5AB39023-05D5-48A2-9414-C289ECB1C13B}.Debug|x64.Build.0 = Debug|Any CPU + {5AB39023-05D5-48A2-9414-C289ECB1C13B}.Debug|x86.ActiveCfg = Debug|Any CPU + {5AB39023-05D5-48A2-9414-C289ECB1C13B}.Debug|x86.Build.0 = Debug|Any CPU {5AB39023-05D5-48A2-9414-C289ECB1C13B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5AB39023-05D5-48A2-9414-C289ECB1C13B}.Release|Any CPU.Build.0 = Release|Any CPU + {5AB39023-05D5-48A2-9414-C289ECB1C13B}.Release|arm.ActiveCfg = Release|Any CPU + {5AB39023-05D5-48A2-9414-C289ECB1C13B}.Release|arm64.ActiveCfg = Release|Any CPU + {5AB39023-05D5-48A2-9414-C289ECB1C13B}.Release|x64.ActiveCfg = Release|Any CPU + {5AB39023-05D5-48A2-9414-C289ECB1C13B}.Release|x64.Build.0 = Release|Any CPU + {5AB39023-05D5-48A2-9414-C289ECB1C13B}.Release|x86.ActiveCfg = Release|Any CPU + {5AB39023-05D5-48A2-9414-C289ECB1C13B}.Release|x86.Build.0 = Release|Any CPU + {5AB39023-05D5-48A2-9414-C289ECB1C13B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {5AB39023-05D5-48A2-9414-C289ECB1C13B}.Checked|arm.ActiveCfg = Debug|Any CPU + {5AB39023-05D5-48A2-9414-C289ECB1C13B}.Checked|arm64.ActiveCfg = Debug|Any CPU + {5AB39023-05D5-48A2-9414-C289ECB1C13B}.Checked|x64.ActiveCfg = Debug|Any CPU + {5AB39023-05D5-48A2-9414-C289ECB1C13B}.Checked|x86.ActiveCfg = Debug|Any CPU {29CA2D73-E756-4A81-A0A3-733C771FB0AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {29CA2D73-E756-4A81-A0A3-733C771FB0AB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {29CA2D73-E756-4A81-A0A3-733C771FB0AB}.Debug|arm.ActiveCfg = Debug|Any CPU + {29CA2D73-E756-4A81-A0A3-733C771FB0AB}.Debug|arm64.ActiveCfg = Debug|Any CPU + {29CA2D73-E756-4A81-A0A3-733C771FB0AB}.Debug|x64.ActiveCfg = Debug|Any CPU + {29CA2D73-E756-4A81-A0A3-733C771FB0AB}.Debug|x64.Build.0 = Debug|Any CPU + {29CA2D73-E756-4A81-A0A3-733C771FB0AB}.Debug|x86.ActiveCfg = Debug|Any CPU + {29CA2D73-E756-4A81-A0A3-733C771FB0AB}.Debug|x86.Build.0 = Debug|Any CPU {29CA2D73-E756-4A81-A0A3-733C771FB0AB}.Release|Any CPU.ActiveCfg = Release|Any CPU {29CA2D73-E756-4A81-A0A3-733C771FB0AB}.Release|Any CPU.Build.0 = Release|Any CPU + {29CA2D73-E756-4A81-A0A3-733C771FB0AB}.Release|arm.ActiveCfg = Release|Any CPU + {29CA2D73-E756-4A81-A0A3-733C771FB0AB}.Release|arm64.ActiveCfg = Release|Any CPU + {29CA2D73-E756-4A81-A0A3-733C771FB0AB}.Release|x64.ActiveCfg = Release|Any CPU + {29CA2D73-E756-4A81-A0A3-733C771FB0AB}.Release|x64.Build.0 = Release|Any CPU + {29CA2D73-E756-4A81-A0A3-733C771FB0AB}.Release|x86.ActiveCfg = Release|Any CPU + {29CA2D73-E756-4A81-A0A3-733C771FB0AB}.Release|x86.Build.0 = Release|Any CPU + {29CA2D73-E756-4A81-A0A3-733C771FB0AB}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {29CA2D73-E756-4A81-A0A3-733C771FB0AB}.Checked|arm.ActiveCfg = Debug|Any CPU + {29CA2D73-E756-4A81-A0A3-733C771FB0AB}.Checked|arm64.ActiveCfg = Debug|Any CPU + {29CA2D73-E756-4A81-A0A3-733C771FB0AB}.Checked|x64.ActiveCfg = Debug|Any CPU + {29CA2D73-E756-4A81-A0A3-733C771FB0AB}.Checked|x86.ActiveCfg = Debug|Any CPU + {3FFDE907-1181-40F7-AC06-F3AD3D029AAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3FFDE907-1181-40F7-AC06-F3AD3D029AAA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3FFDE907-1181-40F7-AC06-F3AD3D029AAA}.Debug|arm.ActiveCfg = Debug|Any CPU + {3FFDE907-1181-40F7-AC06-F3AD3D029AAA}.Debug|arm64.ActiveCfg = Debug|Any CPU + {3FFDE907-1181-40F7-AC06-F3AD3D029AAA}.Debug|x64.ActiveCfg = Debug|Any CPU + {3FFDE907-1181-40F7-AC06-F3AD3D029AAA}.Debug|x64.Build.0 = Debug|Any CPU + {3FFDE907-1181-40F7-AC06-F3AD3D029AAA}.Debug|x86.ActiveCfg = Debug|Any CPU + {3FFDE907-1181-40F7-AC06-F3AD3D029AAA}.Debug|x86.Build.0 = Debug|Any CPU + {3FFDE907-1181-40F7-AC06-F3AD3D029AAA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3FFDE907-1181-40F7-AC06-F3AD3D029AAA}.Release|Any CPU.Build.0 = Release|Any CPU + {3FFDE907-1181-40F7-AC06-F3AD3D029AAA}.Release|arm.ActiveCfg = Release|Any CPU + {3FFDE907-1181-40F7-AC06-F3AD3D029AAA}.Release|arm64.ActiveCfg = Release|Any CPU + {3FFDE907-1181-40F7-AC06-F3AD3D029AAA}.Release|x64.ActiveCfg = Release|Any CPU + {3FFDE907-1181-40F7-AC06-F3AD3D029AAA}.Release|x64.Build.0 = Release|Any CPU + {3FFDE907-1181-40F7-AC06-F3AD3D029AAA}.Release|x86.ActiveCfg = Release|Any CPU + {3FFDE907-1181-40F7-AC06-F3AD3D029AAA}.Release|x86.Build.0 = Release|Any CPU + {3FFDE907-1181-40F7-AC06-F3AD3D029AAA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {3FFDE907-1181-40F7-AC06-F3AD3D029AAA}.Checked|arm.ActiveCfg = Debug|Any CPU + {3FFDE907-1181-40F7-AC06-F3AD3D029AAA}.Checked|arm64.ActiveCfg = Debug|Any CPU + {3FFDE907-1181-40F7-AC06-F3AD3D029AAA}.Checked|x64.ActiveCfg = Debug|Any CPU + {3FFDE907-1181-40F7-AC06-F3AD3D029AAA}.Checked|x86.ActiveCfg = Debug|Any CPU + {CBF80530-F3DF-4305-B45D-87F89D3FCBC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CBF80530-F3DF-4305-B45D-87F89D3FCBC5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CBF80530-F3DF-4305-B45D-87F89D3FCBC5}.Debug|arm.ActiveCfg = Debug|Any CPU + {CBF80530-F3DF-4305-B45D-87F89D3FCBC5}.Debug|arm64.ActiveCfg = Debug|Any CPU + {CBF80530-F3DF-4305-B45D-87F89D3FCBC5}.Debug|x64.ActiveCfg = Debug|Any CPU + {CBF80530-F3DF-4305-B45D-87F89D3FCBC5}.Debug|x64.Build.0 = Debug|Any CPU + {CBF80530-F3DF-4305-B45D-87F89D3FCBC5}.Debug|x86.ActiveCfg = Debug|Any CPU + {CBF80530-F3DF-4305-B45D-87F89D3FCBC5}.Debug|x86.Build.0 = Debug|Any CPU + {CBF80530-F3DF-4305-B45D-87F89D3FCBC5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CBF80530-F3DF-4305-B45D-87F89D3FCBC5}.Release|Any CPU.Build.0 = Release|Any CPU + {CBF80530-F3DF-4305-B45D-87F89D3FCBC5}.Release|arm.ActiveCfg = Release|Any CPU + {CBF80530-F3DF-4305-B45D-87F89D3FCBC5}.Release|arm64.ActiveCfg = Release|Any CPU + {CBF80530-F3DF-4305-B45D-87F89D3FCBC5}.Release|x64.ActiveCfg = Release|Any CPU + {CBF80530-F3DF-4305-B45D-87F89D3FCBC5}.Release|x64.Build.0 = Release|Any CPU + {CBF80530-F3DF-4305-B45D-87F89D3FCBC5}.Release|x86.ActiveCfg = Release|Any CPU + {CBF80530-F3DF-4305-B45D-87F89D3FCBC5}.Release|x86.Build.0 = Release|Any CPU + {CBF80530-F3DF-4305-B45D-87F89D3FCBC5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {CBF80530-F3DF-4305-B45D-87F89D3FCBC5}.Checked|arm.ActiveCfg = Debug|Any CPU + {CBF80530-F3DF-4305-B45D-87F89D3FCBC5}.Checked|arm64.ActiveCfg = Debug|Any CPU + {CBF80530-F3DF-4305-B45D-87F89D3FCBC5}.Checked|x64.ActiveCfg = Debug|Any CPU + {CBF80530-F3DF-4305-B45D-87F89D3FCBC5}.Checked|x86.ActiveCfg = Debug|Any CPU {C40C15E4-8060-4295-9B8F-E04F94BFDA2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C40C15E4-8060-4295-9B8F-E04F94BFDA2B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C40C15E4-8060-4295-9B8F-E04F94BFDA2B}.Debug|arm.ActiveCfg = Debug|Any CPU + {C40C15E4-8060-4295-9B8F-E04F94BFDA2B}.Debug|arm64.ActiveCfg = Debug|Any CPU + {C40C15E4-8060-4295-9B8F-E04F94BFDA2B}.Debug|x64.ActiveCfg = Debug|Any CPU + {C40C15E4-8060-4295-9B8F-E04F94BFDA2B}.Debug|x64.Build.0 = Debug|Any CPU + {C40C15E4-8060-4295-9B8F-E04F94BFDA2B}.Debug|x86.ActiveCfg = Debug|Any CPU + {C40C15E4-8060-4295-9B8F-E04F94BFDA2B}.Debug|x86.Build.0 = Debug|Any CPU {C40C15E4-8060-4295-9B8F-E04F94BFDA2B}.Release|Any CPU.ActiveCfg = Release|Any CPU {C40C15E4-8060-4295-9B8F-E04F94BFDA2B}.Release|Any CPU.Build.0 = Release|Any CPU + {C40C15E4-8060-4295-9B8F-E04F94BFDA2B}.Release|arm.ActiveCfg = Release|Any CPU + {C40C15E4-8060-4295-9B8F-E04F94BFDA2B}.Release|arm64.ActiveCfg = Release|Any CPU + {C40C15E4-8060-4295-9B8F-E04F94BFDA2B}.Release|x64.ActiveCfg = Release|Any CPU + {C40C15E4-8060-4295-9B8F-E04F94BFDA2B}.Release|x64.Build.0 = Release|Any CPU + {C40C15E4-8060-4295-9B8F-E04F94BFDA2B}.Release|x86.ActiveCfg = Release|Any CPU + {C40C15E4-8060-4295-9B8F-E04F94BFDA2B}.Release|x86.Build.0 = Release|Any CPU + {C40C15E4-8060-4295-9B8F-E04F94BFDA2B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {C40C15E4-8060-4295-9B8F-E04F94BFDA2B}.Checked|arm.ActiveCfg = Debug|Any CPU + {C40C15E4-8060-4295-9B8F-E04F94BFDA2B}.Checked|arm64.ActiveCfg = Debug|Any CPU + {C40C15E4-8060-4295-9B8F-E04F94BFDA2B}.Checked|x64.ActiveCfg = Debug|Any CPU + {C40C15E4-8060-4295-9B8F-E04F94BFDA2B}.Checked|x86.ActiveCfg = Debug|Any CPU {E2B0069E-C11C-4829-87C8-A98ED298CB8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E2B0069E-C11C-4829-87C8-A98ED298CB8A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E2B0069E-C11C-4829-87C8-A98ED298CB8A}.Debug|arm.ActiveCfg = Debug|Any CPU + {E2B0069E-C11C-4829-87C8-A98ED298CB8A}.Debug|arm64.ActiveCfg = Debug|Any CPU + {E2B0069E-C11C-4829-87C8-A98ED298CB8A}.Debug|x64.ActiveCfg = Debug|Any CPU + {E2B0069E-C11C-4829-87C8-A98ED298CB8A}.Debug|x64.Build.0 = Debug|Any CPU + {E2B0069E-C11C-4829-87C8-A98ED298CB8A}.Debug|x86.ActiveCfg = Debug|Any CPU + {E2B0069E-C11C-4829-87C8-A98ED298CB8A}.Debug|x86.Build.0 = Debug|Any CPU {E2B0069E-C11C-4829-87C8-A98ED298CB8A}.Release|Any CPU.ActiveCfg = Release|Any CPU {E2B0069E-C11C-4829-87C8-A98ED298CB8A}.Release|Any CPU.Build.0 = Release|Any CPU + {E2B0069E-C11C-4829-87C8-A98ED298CB8A}.Release|arm.ActiveCfg = Release|Any CPU + {E2B0069E-C11C-4829-87C8-A98ED298CB8A}.Release|arm64.ActiveCfg = Release|Any CPU + {E2B0069E-C11C-4829-87C8-A98ED298CB8A}.Release|x64.ActiveCfg = Release|Any CPU + {E2B0069E-C11C-4829-87C8-A98ED298CB8A}.Release|x64.Build.0 = Release|Any CPU + {E2B0069E-C11C-4829-87C8-A98ED298CB8A}.Release|x86.ActiveCfg = Release|Any CPU + {E2B0069E-C11C-4829-87C8-A98ED298CB8A}.Release|x86.Build.0 = Release|Any CPU + {E2B0069E-C11C-4829-87C8-A98ED298CB8A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {E2B0069E-C11C-4829-87C8-A98ED298CB8A}.Checked|arm.ActiveCfg = Debug|Any CPU + {E2B0069E-C11C-4829-87C8-A98ED298CB8A}.Checked|arm64.ActiveCfg = Debug|Any CPU + {E2B0069E-C11C-4829-87C8-A98ED298CB8A}.Checked|x64.ActiveCfg = Debug|Any CPU + {E2B0069E-C11C-4829-87C8-A98ED298CB8A}.Checked|x86.ActiveCfg = Debug|Any CPU {169CCBAE-5490-4409-9CC7-48850ABA1BE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {169CCBAE-5490-4409-9CC7-48850ABA1BE8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {169CCBAE-5490-4409-9CC7-48850ABA1BE8}.Debug|arm.ActiveCfg = Debug|Any CPU + {169CCBAE-5490-4409-9CC7-48850ABA1BE8}.Debug|arm64.ActiveCfg = Debug|Any CPU + {169CCBAE-5490-4409-9CC7-48850ABA1BE8}.Debug|x64.ActiveCfg = Debug|Any CPU + {169CCBAE-5490-4409-9CC7-48850ABA1BE8}.Debug|x64.Build.0 = Debug|Any CPU + {169CCBAE-5490-4409-9CC7-48850ABA1BE8}.Debug|x86.ActiveCfg = Debug|Any CPU + {169CCBAE-5490-4409-9CC7-48850ABA1BE8}.Debug|x86.Build.0 = Debug|Any CPU {169CCBAE-5490-4409-9CC7-48850ABA1BE8}.Release|Any CPU.ActiveCfg = Release|Any CPU {169CCBAE-5490-4409-9CC7-48850ABA1BE8}.Release|Any CPU.Build.0 = Release|Any CPU + {169CCBAE-5490-4409-9CC7-48850ABA1BE8}.Release|arm.ActiveCfg = Release|Any CPU + {169CCBAE-5490-4409-9CC7-48850ABA1BE8}.Release|arm64.ActiveCfg = Release|Any CPU + {169CCBAE-5490-4409-9CC7-48850ABA1BE8}.Release|x64.ActiveCfg = Release|Any CPU + {169CCBAE-5490-4409-9CC7-48850ABA1BE8}.Release|x64.Build.0 = Release|Any CPU + {169CCBAE-5490-4409-9CC7-48850ABA1BE8}.Release|x86.ActiveCfg = Release|Any CPU + {169CCBAE-5490-4409-9CC7-48850ABA1BE8}.Release|x86.Build.0 = Release|Any CPU + {169CCBAE-5490-4409-9CC7-48850ABA1BE8}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {169CCBAE-5490-4409-9CC7-48850ABA1BE8}.Checked|arm.ActiveCfg = Debug|Any CPU + {169CCBAE-5490-4409-9CC7-48850ABA1BE8}.Checked|arm64.ActiveCfg = Debug|Any CPU + {169CCBAE-5490-4409-9CC7-48850ABA1BE8}.Checked|x64.ActiveCfg = Debug|Any CPU + {169CCBAE-5490-4409-9CC7-48850ABA1BE8}.Checked|x86.ActiveCfg = Debug|Any CPU {B3473ABA-A06B-445E-AE21-C7432AD14482}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B3473ABA-A06B-445E-AE21-C7432AD14482}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B3473ABA-A06B-445E-AE21-C7432AD14482}.Debug|arm.ActiveCfg = Debug|Any CPU + {B3473ABA-A06B-445E-AE21-C7432AD14482}.Debug|arm64.ActiveCfg = Debug|Any CPU + {B3473ABA-A06B-445E-AE21-C7432AD14482}.Debug|x64.ActiveCfg = Debug|Any CPU + {B3473ABA-A06B-445E-AE21-C7432AD14482}.Debug|x64.Build.0 = Debug|Any CPU + {B3473ABA-A06B-445E-AE21-C7432AD14482}.Debug|x86.ActiveCfg = Debug|Any CPU + {B3473ABA-A06B-445E-AE21-C7432AD14482}.Debug|x86.Build.0 = Debug|Any CPU {B3473ABA-A06B-445E-AE21-C7432AD14482}.Release|Any CPU.ActiveCfg = Release|Any CPU {B3473ABA-A06B-445E-AE21-C7432AD14482}.Release|Any CPU.Build.0 = Release|Any CPU + {B3473ABA-A06B-445E-AE21-C7432AD14482}.Release|arm.ActiveCfg = Release|Any CPU + {B3473ABA-A06B-445E-AE21-C7432AD14482}.Release|arm64.ActiveCfg = Release|Any CPU + {B3473ABA-A06B-445E-AE21-C7432AD14482}.Release|x64.ActiveCfg = Release|Any CPU + {B3473ABA-A06B-445E-AE21-C7432AD14482}.Release|x64.Build.0 = Release|Any CPU + {B3473ABA-A06B-445E-AE21-C7432AD14482}.Release|x86.ActiveCfg = Release|Any CPU + {B3473ABA-A06B-445E-AE21-C7432AD14482}.Release|x86.Build.0 = Release|Any CPU + {B3473ABA-A06B-445E-AE21-C7432AD14482}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {B3473ABA-A06B-445E-AE21-C7432AD14482}.Checked|arm.ActiveCfg = Debug|Any CPU + {B3473ABA-A06B-445E-AE21-C7432AD14482}.Checked|arm64.ActiveCfg = Debug|Any CPU + {B3473ABA-A06B-445E-AE21-C7432AD14482}.Checked|x64.ActiveCfg = Debug|Any CPU + {B3473ABA-A06B-445E-AE21-C7432AD14482}.Checked|x86.ActiveCfg = Debug|Any CPU + {15F34F54-7854-457C-BD9E-E65E14553832}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {15F34F54-7854-457C-BD9E-E65E14553832}.Debug|Any CPU.Build.0 = Debug|Any CPU + {15F34F54-7854-457C-BD9E-E65E14553832}.Debug|arm.ActiveCfg = Debug|Any CPU + {15F34F54-7854-457C-BD9E-E65E14553832}.Debug|arm64.ActiveCfg = Debug|Any CPU + {15F34F54-7854-457C-BD9E-E65E14553832}.Debug|x64.ActiveCfg = Debug|Any CPU + {15F34F54-7854-457C-BD9E-E65E14553832}.Debug|x64.Build.0 = Debug|Any CPU + {15F34F54-7854-457C-BD9E-E65E14553832}.Debug|x86.ActiveCfg = Debug|Any CPU + {15F34F54-7854-457C-BD9E-E65E14553832}.Debug|x86.Build.0 = Debug|Any CPU + {15F34F54-7854-457C-BD9E-E65E14553832}.Release|Any CPU.ActiveCfg = Release|Any CPU + {15F34F54-7854-457C-BD9E-E65E14553832}.Release|Any CPU.Build.0 = Release|Any CPU + {15F34F54-7854-457C-BD9E-E65E14553832}.Release|arm.ActiveCfg = Release|Any CPU + {15F34F54-7854-457C-BD9E-E65E14553832}.Release|arm64.ActiveCfg = Release|Any CPU + {15F34F54-7854-457C-BD9E-E65E14553832}.Release|x64.ActiveCfg = Release|Any CPU + {15F34F54-7854-457C-BD9E-E65E14553832}.Release|x64.Build.0 = Release|Any CPU + {15F34F54-7854-457C-BD9E-E65E14553832}.Release|x86.ActiveCfg = Release|Any CPU + {15F34F54-7854-457C-BD9E-E65E14553832}.Release|x86.Build.0 = Release|Any CPU + {15F34F54-7854-457C-BD9E-E65E14553832}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {15F34F54-7854-457C-BD9E-E65E14553832}.Checked|arm.ActiveCfg = Debug|Any CPU + {15F34F54-7854-457C-BD9E-E65E14553832}.Checked|arm64.ActiveCfg = Debug|Any CPU + {15F34F54-7854-457C-BD9E-E65E14553832}.Checked|x64.ActiveCfg = Debug|Any CPU + {15F34F54-7854-457C-BD9E-E65E14553832}.Checked|x86.ActiveCfg = Debug|Any CPU + {932D7BE3-67C5-40F9-BEF4-038C153405A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {932D7BE3-67C5-40F9-BEF4-038C153405A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {932D7BE3-67C5-40F9-BEF4-038C153405A2}.Debug|arm.ActiveCfg = Debug|Any CPU + {932D7BE3-67C5-40F9-BEF4-038C153405A2}.Debug|arm64.ActiveCfg = Debug|Any CPU + {932D7BE3-67C5-40F9-BEF4-038C153405A2}.Debug|x64.ActiveCfg = Debug|Any CPU + {932D7BE3-67C5-40F9-BEF4-038C153405A2}.Debug|x64.Build.0 = Debug|Any CPU + {932D7BE3-67C5-40F9-BEF4-038C153405A2}.Debug|x86.ActiveCfg = Debug|Any CPU + {932D7BE3-67C5-40F9-BEF4-038C153405A2}.Debug|x86.Build.0 = Debug|Any CPU + {932D7BE3-67C5-40F9-BEF4-038C153405A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {932D7BE3-67C5-40F9-BEF4-038C153405A2}.Release|Any CPU.Build.0 = Release|Any CPU + {932D7BE3-67C5-40F9-BEF4-038C153405A2}.Release|arm.ActiveCfg = Release|Any CPU + {932D7BE3-67C5-40F9-BEF4-038C153405A2}.Release|arm64.ActiveCfg = Release|Any CPU + {932D7BE3-67C5-40F9-BEF4-038C153405A2}.Release|x64.ActiveCfg = Release|Any CPU + {932D7BE3-67C5-40F9-BEF4-038C153405A2}.Release|x64.Build.0 = Release|Any CPU + {932D7BE3-67C5-40F9-BEF4-038C153405A2}.Release|x86.ActiveCfg = Release|Any CPU + {932D7BE3-67C5-40F9-BEF4-038C153405A2}.Release|x86.Build.0 = Release|Any CPU + {932D7BE3-67C5-40F9-BEF4-038C153405A2}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {932D7BE3-67C5-40F9-BEF4-038C153405A2}.Checked|arm.ActiveCfg = Debug|Any CPU + {932D7BE3-67C5-40F9-BEF4-038C153405A2}.Checked|arm64.ActiveCfg = Debug|Any CPU + {932D7BE3-67C5-40F9-BEF4-038C153405A2}.Checked|x64.ActiveCfg = Debug|Any CPU + {932D7BE3-67C5-40F9-BEF4-038C153405A2}.Checked|x86.ActiveCfg = Debug|Any CPU + {56F910A7-D120-4453-AF1D-594CF8398DC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {56F910A7-D120-4453-AF1D-594CF8398DC0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {56F910A7-D120-4453-AF1D-594CF8398DC0}.Debug|arm.ActiveCfg = Debug|Any CPU + {56F910A7-D120-4453-AF1D-594CF8398DC0}.Debug|arm64.ActiveCfg = Debug|Any CPU + {56F910A7-D120-4453-AF1D-594CF8398DC0}.Debug|x64.ActiveCfg = Debug|Any CPU + {56F910A7-D120-4453-AF1D-594CF8398DC0}.Debug|x64.Build.0 = Debug|Any CPU + {56F910A7-D120-4453-AF1D-594CF8398DC0}.Debug|x86.ActiveCfg = Debug|Any CPU + {56F910A7-D120-4453-AF1D-594CF8398DC0}.Debug|x86.Build.0 = Debug|Any CPU + {56F910A7-D120-4453-AF1D-594CF8398DC0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {56F910A7-D120-4453-AF1D-594CF8398DC0}.Release|Any CPU.Build.0 = Release|Any CPU + {56F910A7-D120-4453-AF1D-594CF8398DC0}.Release|arm.ActiveCfg = Release|Any CPU + {56F910A7-D120-4453-AF1D-594CF8398DC0}.Release|arm64.ActiveCfg = Release|Any CPU + {56F910A7-D120-4453-AF1D-594CF8398DC0}.Release|x64.ActiveCfg = Release|Any CPU + {56F910A7-D120-4453-AF1D-594CF8398DC0}.Release|x64.Build.0 = Release|Any CPU + {56F910A7-D120-4453-AF1D-594CF8398DC0}.Release|x86.ActiveCfg = Release|Any CPU + {56F910A7-D120-4453-AF1D-594CF8398DC0}.Release|x86.Build.0 = Release|Any CPU + {56F910A7-D120-4453-AF1D-594CF8398DC0}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {56F910A7-D120-4453-AF1D-594CF8398DC0}.Checked|arm.ActiveCfg = Debug|Any CPU + {56F910A7-D120-4453-AF1D-594CF8398DC0}.Checked|arm64.ActiveCfg = Debug|Any CPU + {56F910A7-D120-4453-AF1D-594CF8398DC0}.Checked|x64.ActiveCfg = Debug|Any CPU + {56F910A7-D120-4453-AF1D-594CF8398DC0}.Checked|x86.ActiveCfg = Debug|Any CPU + {8C0BC95E-A79F-49EA-B908-99FD8858F2FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8C0BC95E-A79F-49EA-B908-99FD8858F2FD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8C0BC95E-A79F-49EA-B908-99FD8858F2FD}.Debug|arm.ActiveCfg = Debug|Any CPU + {8C0BC95E-A79F-49EA-B908-99FD8858F2FD}.Debug|arm64.ActiveCfg = Debug|Any CPU + {8C0BC95E-A79F-49EA-B908-99FD8858F2FD}.Debug|x64.ActiveCfg = Debug|Any CPU + {8C0BC95E-A79F-49EA-B908-99FD8858F2FD}.Debug|x64.Build.0 = Debug|Any CPU + {8C0BC95E-A79F-49EA-B908-99FD8858F2FD}.Debug|x86.ActiveCfg = Debug|Any CPU + {8C0BC95E-A79F-49EA-B908-99FD8858F2FD}.Debug|x86.Build.0 = Debug|Any CPU + {8C0BC95E-A79F-49EA-B908-99FD8858F2FD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8C0BC95E-A79F-49EA-B908-99FD8858F2FD}.Release|Any CPU.Build.0 = Release|Any CPU + {8C0BC95E-A79F-49EA-B908-99FD8858F2FD}.Release|arm.ActiveCfg = Release|Any CPU + {8C0BC95E-A79F-49EA-B908-99FD8858F2FD}.Release|arm64.ActiveCfg = Release|Any CPU + {8C0BC95E-A79F-49EA-B908-99FD8858F2FD}.Release|x64.ActiveCfg = Release|Any CPU + {8C0BC95E-A79F-49EA-B908-99FD8858F2FD}.Release|x64.Build.0 = Release|Any CPU + {8C0BC95E-A79F-49EA-B908-99FD8858F2FD}.Release|x86.ActiveCfg = Release|Any CPU + {8C0BC95E-A79F-49EA-B908-99FD8858F2FD}.Release|x86.Build.0 = Release|Any CPU + {8C0BC95E-A79F-49EA-B908-99FD8858F2FD}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {8C0BC95E-A79F-49EA-B908-99FD8858F2FD}.Checked|arm.ActiveCfg = Debug|Any CPU + {8C0BC95E-A79F-49EA-B908-99FD8858F2FD}.Checked|arm64.ActiveCfg = Debug|Any CPU + {8C0BC95E-A79F-49EA-B908-99FD8858F2FD}.Checked|x64.ActiveCfg = Debug|Any CPU + {8C0BC95E-A79F-49EA-B908-99FD8858F2FD}.Checked|x86.ActiveCfg = Debug|Any CPU + {9CC076AE-C3BC-4F17-8C01-E330D03F4657}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9CC076AE-C3BC-4F17-8C01-E330D03F4657}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9CC076AE-C3BC-4F17-8C01-E330D03F4657}.Debug|arm.ActiveCfg = Debug|Any CPU + {9CC076AE-C3BC-4F17-8C01-E330D03F4657}.Debug|arm64.ActiveCfg = Debug|Any CPU + {9CC076AE-C3BC-4F17-8C01-E330D03F4657}.Debug|x64.ActiveCfg = Debug|Any CPU + {9CC076AE-C3BC-4F17-8C01-E330D03F4657}.Debug|x64.Build.0 = Debug|Any CPU + {9CC076AE-C3BC-4F17-8C01-E330D03F4657}.Debug|x86.ActiveCfg = Debug|Any CPU + {9CC076AE-C3BC-4F17-8C01-E330D03F4657}.Debug|x86.Build.0 = Debug|Any CPU + {9CC076AE-C3BC-4F17-8C01-E330D03F4657}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9CC076AE-C3BC-4F17-8C01-E330D03F4657}.Release|Any CPU.Build.0 = Release|Any CPU + {9CC076AE-C3BC-4F17-8C01-E330D03F4657}.Release|arm.ActiveCfg = Release|Any CPU + {9CC076AE-C3BC-4F17-8C01-E330D03F4657}.Release|arm64.ActiveCfg = Release|Any CPU + {9CC076AE-C3BC-4F17-8C01-E330D03F4657}.Release|x64.ActiveCfg = Release|Any CPU + {9CC076AE-C3BC-4F17-8C01-E330D03F4657}.Release|x64.Build.0 = Release|Any CPU + {9CC076AE-C3BC-4F17-8C01-E330D03F4657}.Release|x86.ActiveCfg = Release|Any CPU + {9CC076AE-C3BC-4F17-8C01-E330D03F4657}.Release|x86.Build.0 = Release|Any CPU + {9CC076AE-C3BC-4F17-8C01-E330D03F4657}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {9CC076AE-C3BC-4F17-8C01-E330D03F4657}.Checked|arm.ActiveCfg = Debug|Any CPU + {9CC076AE-C3BC-4F17-8C01-E330D03F4657}.Checked|arm64.ActiveCfg = Debug|Any CPU + {9CC076AE-C3BC-4F17-8C01-E330D03F4657}.Checked|x64.ActiveCfg = Debug|Any CPU + {9CC076AE-C3BC-4F17-8C01-E330D03F4657}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution + {16140308-2197-4634-A664-3A73DA182FAE} = {3D6F1FD7-42FB-42BE-87D9-21202EC40845} {1A19656D-1047-4E43-B9C5-73423399D1D4} = {EB30CC4C-9662-46E0-8BC5-DFC16A24365F} {197926DA-9180-4AD4-AC71-B95FC5CA7557} = {EB30CC4C-9662-46E0-8BC5-DFC16A24365F} - {DB7964E8-6761-47C7-B120-DAF13FDDE01B} = {902318E3-C881-4BB3-8EEA-FC24A836B5AE} - {C40C15E4-8060-4295-9B8F-E04F94BFDA2B} = {902318E3-C881-4BB3-8EEA-FC24A836B5AE} - {169CCBAE-5490-4409-9CC7-48850ABA1BE8} = {902318E3-C881-4BB3-8EEA-FC24A836B5AE} + {A0621F43-D8FF-4EDE-9165-1B2757F8AB14} = {87FDB279-F475-45C0-92EF-7893E25AA0A6} {6870504E-8490-4A4C-938A-C68DA9A2F65D} = {87FDB279-F475-45C0-92EF-7893E25AA0A6} + {8323FADF-3D4E-46EE-8CA8-45C523142B77} = {87FDB279-F475-45C0-92EF-7893E25AA0A6} + {CBF80530-F3DF-4305-B45D-87F89D3FCBC5} = {87FDB279-F475-45C0-92EF-7893E25AA0A6} {E2B0069E-C11C-4829-87C8-A98ED298CB8A} = {87FDB279-F475-45C0-92EF-7893E25AA0A6} {B3473ABA-A06B-445E-AE21-C7432AD14482} = {87FDB279-F475-45C0-92EF-7893E25AA0A6} - {9DA2AD39-83D4-4500-A613-32039A21A3E3} = {C1A58B90-FE26-4840-9D69-60DFC77BF485} + {DB7964E8-6761-47C7-B120-DAF13FDDE01B} = {902318E3-C881-4BB3-8EEA-FC24A836B5AE} + {843D7E6B-5F25-41C1-8469-764854BA2D86} = {902318E3-C881-4BB3-8EEA-FC24A836B5AE} + {3FFDE907-1181-40F7-AC06-F3AD3D029AAA} = {902318E3-C881-4BB3-8EEA-FC24A836B5AE} + {C40C15E4-8060-4295-9B8F-E04F94BFDA2B} = {902318E3-C881-4BB3-8EEA-FC24A836B5AE} + {169CCBAE-5490-4409-9CC7-48850ABA1BE8} = {902318E3-C881-4BB3-8EEA-FC24A836B5AE} + {2929F1C6-A103-4211-A318-96EEE83DD713} = {C1A58B90-FE26-4840-9D69-60DFC77BF485} {5AB39023-05D5-48A2-9414-C289ECB1C13B} = {C1A58B90-FE26-4840-9D69-60DFC77BF485} {29CA2D73-E756-4A81-A0A3-733C771FB0AB} = {C1A58B90-FE26-4840-9D69-60DFC77BF485} + {15F34F54-7854-457C-BD9E-E65E14553832} = {0FD62E14-039A-4678-B5A2-00DAE2900BE3} + {932D7BE3-67C5-40F9-BEF4-038C153405A2} = {0FD62E14-039A-4678-B5A2-00DAE2900BE3} + {0FD62E14-039A-4678-B5A2-00DAE2900BE3} = {9AEB1879-A22A-46BD-B9B5-70348CE8F3CC} + {56F910A7-D120-4453-AF1D-594CF8398DC0} = {D8D71BDD-8E82-496A-9F3A-66E035CDC6C5} + {8C0BC95E-A79F-49EA-B908-99FD8858F2FD} = {D8D71BDD-8E82-496A-9F3A-66E035CDC6C5} + {D8D71BDD-8E82-496A-9F3A-66E035CDC6C5} = {9AEB1879-A22A-46BD-B9B5-70348CE8F3CC} + {9CC076AE-C3BC-4F17-8C01-E330D03F4657} = {DE0D36D1-77BA-4FB6-A76A-A53C63634396} + {DE0D36D1-77BA-4FB6-A76A-A53C63634396} = {9AEB1879-A22A-46BD-B9B5-70348CE8F3CC} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {9DE1DE68-219A-4A5E-83A8-C0F0637EE9DF} diff --git a/src/libraries/System.DirectoryServices/src/CompatibilitySuppressions.xml b/src/libraries/System.DirectoryServices/src/CompatibilitySuppressions.xml index 1d3a5528bf97a5..48b2fa681f679a 100644 --- a/src/libraries/System.DirectoryServices/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.DirectoryServices/src/CompatibilitySuppressions.xml @@ -1,11 +1,51 @@  - + + CP0003 + System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.DirectoryServices.dll + lib/netstandard2.0/System.DirectoryServices.dll + true + + + CP0003 + System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.DirectoryServices.dll + lib/netstandard2.0/System.DirectoryServices.dll + true + CP0015 T:System.DirectoryServices.DirectoryEntry:[T:System.ComponentModel.TypeConverterAttribute] true + + CP1002 + System.ComponentModel.Primitives, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.DirectoryServices.dll + lib/netstandard2.0/System.DirectoryServices.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.DirectoryServices.dll + lib/netstandard2.0/System.DirectoryServices.dll + true + + + CP1002 + System.ComponentModel.Primitives, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.DirectoryServices.dll + lib/netstandard2.0/System.DirectoryServices.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.DirectoryServices.dll + lib/netstandard2.0/System.DirectoryServices.dll + true + \ No newline at end of file diff --git a/src/libraries/System.DirectoryServices/src/PACKAGE.md b/src/libraries/System.DirectoryServices/src/PACKAGE.md new file mode 100644 index 00000000000000..981c865baf9210 --- /dev/null +++ b/src/libraries/System.DirectoryServices/src/PACKAGE.md @@ -0,0 +1,81 @@ +## About + + + +Provides easy access to [Active Directory Domain Services](https://learn.microsoft.com/windows/win32/ad/active-directory-domain-services) from managed code. `Microsoft Active Directory Domain Services` are the foundation for distributed networks built on Windows 2000 Server, Windows Server 2003 and Microsoft Windows Server 2008 operating systems that use domain controllers. The namespace contains two component classes, [DirectoryEntry](https://learn.microsoft.com/dotnet/api/system.directoryservices.directoryentry) and [DirectorySearcher](https://learn.microsoft.com/dotnet/api/system.directoryservices.directorysearcher), which use the Active Directory Services Interfaces (ADSI) technology. ADSI is the set of interfaces that Microsoft provides as a flexible tool for working with a variety of network providers. ADSI gives the administrator the ability to locate and manage resources on a network with relative ease, regardless of the size of the network. + +## Key Features + + + +Active Directory Domain Services use a tree structure. Each node in the tree contains a set of properties. Use this library to traverse, search, and modify the tree, and read and write to the properties of a node. + +* The [DirectoryEntry](https://learn.microsoft.com/dotnet/api/system.directoryservices.directoryentry) class encapsulates a node or object in the Active Directory Domain Services hierarchy. Use this class for binding to objects, reading properties, and updating attributes. Together with helper classes, DirectoryEntry provides support for life-cycle management and navigation methods, including creating, deleting, renaming, moving a child node, and enumerating children. +* Use the [DirectorySearcher](https://learn.microsoft.com/dotnet/api/system.directoryservices.directorysearcher) class to perform queries against the Active Directory Domain Services hierarchy. LDAP is the only system-supplied Active Directory Service Interfaces (ADSI) provider that supports searching. A search of the Active Directory Domain Services hierarchy through [DirectorySearcher](https://learn.microsoft.com/dotnet/api/system.directoryservices.directorysearcher) returns instances of [SearchResult](https://learn.microsoft.com/dotnet/api/system.directoryservices.searchresult), which are contained in an instance of the [SearchResultCollection](https://learn.microsoft.com/dotnet/api/system.directoryservices.searchresultcollection) class. +* Network administrators write scripts and applications that access Active Directory Domain Services to automate common administrative tasks, such as adding users and groups, managing printers, and setting permissions for network resources. + +## How to Use + + + +Install the `System.DirectoryServices` library from nuget + +```dotnetcli +dotnet add package System.DirectoryServices --version 7.0.1 +``` + +The sample needs a real path to an Active Directory server to work properly: + +```cs +using System.DirectoryServices; + +namespace TestDirectoryServices +{ + internal class Program + { + static void Main(string[] args) + { + DirectoryEntry rootDse = new DirectoryEntry("LDAP://RootDSE"); + string configNamingContext = rootDse.Properties["configurationNamingContext"].Value.ToString(); + + DirectoryEntry certTemplates = new DirectoryEntry("LDAP://CN=Certificate Templates,CN=Public Key Services,CN=Services," + configNamingContext); + DirectorySearcher templatesSearch = new DirectorySearcher(certTemplates, "(objectClass=pKICertificateTemplate)", null, SearchScope.OneLevel); + + SearchResultCollection templates = templatesSearch.FindAll(); + + foreach (SearchResult template in templates) + { + Console.WriteLine($"Name: {template.Properties["name"][0]} ({template.Properties["displayName"][0]})"); + Console.WriteLine($"Flags: {template.Properties["msPKI-Enrollment-Flag"][0]}"); + } + } + } +} +``` + +## Main Types + + + +The main types provided by this library are: + +* `System.DirectoryServices.DirectoryEntry` +* `System.DirectoryServices.DirectorySearcher` + +## Additional Documentation + +* [API documentation](https://learn.microsoft.com/dotnet/api/system.directoryservices) +* [Active Directory Domain Services](https://learn.microsoft.com/windows/win32/ad/active-directory-domain-services) +* [Active Directory Service Interfaces](https://learn.microsoft.com/windows/win32/adsi/active-directory-service-interfaces-adsi) +* [Lightweight Directory Access Protocol (LDAP)](https://learn.microsoft.com/previous-versions/windows/desktop/ldap/lightweight-directory-access-protocol-ldap-api) + +## Related Packages + +* [System.DirectoryServices.AccountManagement](https://learn.microsoft.com/dotnet/api/system.directoryservices.accountmanagement) +* [System.DirectoryServices.Protocols](https://learn.microsoft.com/dotnet/api/system.directoryservices.protocols) + +## Feedback & Contributing + + + +System.DirectoryServices is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). diff --git a/src/libraries/System.DirectoryServices/src/System.DirectoryServices.csproj b/src/libraries/System.DirectoryServices/src/System.DirectoryServices.csproj index 94b4f339dc90df..943cc1bc374ecc 100644 --- a/src/libraries/System.DirectoryServices/src/System.DirectoryServices.csproj +++ b/src/libraries/System.DirectoryServices/src/System.DirectoryServices.csproj @@ -1,4 +1,5 @@ + $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent);$(NetCoreAppPrevious)-windows;$(NetCoreAppPrevious);$(NetCoreAppMinimum)-windows;$(NetCoreAppMinimum);netstandard2.0 true @@ -149,9 +150,9 @@ System.DirectoryServices.ActiveDirectory.DomainController + + Link="Common\DisableRuntimeMarshalling.cs" /> + diff --git a/src/libraries/System.Drawing.Primitives/System.Drawing.Primitives.sln b/src/libraries/System.Drawing.Primitives/System.Drawing.Primitives.sln index bca97b23d24a86..d6a4e28428dd16 100644 --- a/src/libraries/System.Drawing.Primitives/System.Drawing.Primitives.sln +++ b/src/libraries/System.Drawing.Primitives/System.Drawing.Primitives.sln @@ -27,6 +27,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{FD462F99-C9F6-4D3E-B080-F5E337E8F2F8}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{D5E974B9-EB58-4D32-A4F4-C31559436DEA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{D2D8DF0A-836A-4521-A9F5-349F91E87046}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{198C17DB-F65F-4165-996B-128E3123A6CF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{A92D7FC7-E3A9-4260-8F25-7FCF3AA900DC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{0A6457CF-5932-44F6-9983-978FA163B3A5}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{B004DC3D-DA89-4C76-8D15-327CCDB6D7C0}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{F2D0660B-B4A3-4039-A47D-63F9D1CE19B6}" @@ -35,6 +45,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{722DCDC1-751 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{8349AD04-5979-4347-A869-7F76B043453E}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{1ACFEEFC-7E61-483E-9CAF-1EB2DFC11558}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{D99A011B-F48D-4E22-9C5B-050294758522}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{5CB40A8A-59D5-4E57-8F9A-D716C5BDFDC7}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{0205F064-E9AB-408E-BC47-D1EB62C753C7}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -97,6 +115,26 @@ Global {FD462F99-C9F6-4D3E-B080-F5E337E8F2F8}.Debug|Any CPU.Build.0 = Debug|Any CPU {FD462F99-C9F6-4D3E-B080-F5E337E8F2F8}.Release|Any CPU.ActiveCfg = Release|Any CPU {FD462F99-C9F6-4D3E-B080-F5E337E8F2F8}.Release|Any CPU.Build.0 = Release|Any CPU + {D5E974B9-EB58-4D32-A4F4-C31559436DEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D5E974B9-EB58-4D32-A4F4-C31559436DEA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D5E974B9-EB58-4D32-A4F4-C31559436DEA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D5E974B9-EB58-4D32-A4F4-C31559436DEA}.Release|Any CPU.Build.0 = Release|Any CPU + {D2D8DF0A-836A-4521-A9F5-349F91E87046}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D2D8DF0A-836A-4521-A9F5-349F91E87046}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D2D8DF0A-836A-4521-A9F5-349F91E87046}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D2D8DF0A-836A-4521-A9F5-349F91E87046}.Release|Any CPU.Build.0 = Release|Any CPU + {198C17DB-F65F-4165-996B-128E3123A6CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {198C17DB-F65F-4165-996B-128E3123A6CF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {198C17DB-F65F-4165-996B-128E3123A6CF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {198C17DB-F65F-4165-996B-128E3123A6CF}.Release|Any CPU.Build.0 = Release|Any CPU + {A92D7FC7-E3A9-4260-8F25-7FCF3AA900DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A92D7FC7-E3A9-4260-8F25-7FCF3AA900DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A92D7FC7-E3A9-4260-8F25-7FCF3AA900DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A92D7FC7-E3A9-4260-8F25-7FCF3AA900DC}.Release|Any CPU.Build.0 = Release|Any CPU + {0A6457CF-5932-44F6-9983-978FA163B3A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0A6457CF-5932-44F6-9983-978FA163B3A5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0A6457CF-5932-44F6-9983-978FA163B3A5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0A6457CF-5932-44F6-9983-978FA163B3A5}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -116,6 +154,14 @@ Global {F06CCE8D-0066-4B17-8EF0-162AE711F6D8} = {8349AD04-5979-4347-A869-7F76B043453E} {315E574D-6A26-4A89-83B5-1C948F3C83D2} = {8349AD04-5979-4347-A869-7F76B043453E} {9ECCC771-064F-403E-8E0E-7B049AAFAD36} = {8349AD04-5979-4347-A869-7F76B043453E} + {D5E974B9-EB58-4D32-A4F4-C31559436DEA} = {1ACFEEFC-7E61-483E-9CAF-1EB2DFC11558} + {D2D8DF0A-836A-4521-A9F5-349F91E87046} = {1ACFEEFC-7E61-483E-9CAF-1EB2DFC11558} + {1ACFEEFC-7E61-483E-9CAF-1EB2DFC11558} = {0205F064-E9AB-408E-BC47-D1EB62C753C7} + {198C17DB-F65F-4165-996B-128E3123A6CF} = {D99A011B-F48D-4E22-9C5B-050294758522} + {A92D7FC7-E3A9-4260-8F25-7FCF3AA900DC} = {D99A011B-F48D-4E22-9C5B-050294758522} + {D99A011B-F48D-4E22-9C5B-050294758522} = {0205F064-E9AB-408E-BC47-D1EB62C753C7} + {0A6457CF-5932-44F6-9983-978FA163B3A5} = {5CB40A8A-59D5-4E57-8F9A-D716C5BDFDC7} + {5CB40A8A-59D5-4E57-8F9A-D716C5BDFDC7} = {0205F064-E9AB-408E-BC47-D1EB62C753C7} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {E2DD25F1-FA29-41D5-AB37-65DDC6A49304} diff --git a/src/libraries/System.Formats.Asn1/System.Formats.Asn1.sln b/src/libraries/System.Formats.Asn1/System.Formats.Asn1.sln index c28866ca0674f8..b3abf901cb5bb2 100644 --- a/src/libraries/System.Formats.Asn1/System.Formats.Asn1.sln +++ b/src/libraries/System.Formats.Asn1/System.Formats.Asn1.sln @@ -27,6 +27,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Numerics", " EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{ECC6D4C0-600C-400C-8789-DD0FE858A209}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{96D3AF6F-D491-40AA-B199-FA9DB7E5BF6D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{67FBE160-62EE-41E3-81AD-C417DE7446D4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{A58AF475-6F7B-4A64-8F17-06D9D2BE5777}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{832EE19B-72DE-4DCA-90D9-65BB25121F47}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{51B1B61B-453B-4282-914C-87B0F39579B2}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{61790DBD-EAF7-4855-99C4-64FD3FD9E5FE}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{5690A39F-8BCB-4B98-B230-8734FABEF393}" @@ -35,6 +45,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{7D4FCCCB-BD5 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{425CDAF9-11CA-4C58-B6D4-0CB644481EF9}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{80A9A052-B4F2-414A-B741-5E7F1850928D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{4255C60C-E695-4ECE-83BF-4DD4F3FB3B3E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{07748BF8-404D-4712-93DA-4D66BC22235E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{3EA0059A-3E14-404D-A465-116B0B0C15BC}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -97,6 +115,26 @@ Global {ECC6D4C0-600C-400C-8789-DD0FE858A209}.Debug|Any CPU.Build.0 = Debug|Any CPU {ECC6D4C0-600C-400C-8789-DD0FE858A209}.Release|Any CPU.ActiveCfg = Release|Any CPU {ECC6D4C0-600C-400C-8789-DD0FE858A209}.Release|Any CPU.Build.0 = Release|Any CPU + {96D3AF6F-D491-40AA-B199-FA9DB7E5BF6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {96D3AF6F-D491-40AA-B199-FA9DB7E5BF6D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {96D3AF6F-D491-40AA-B199-FA9DB7E5BF6D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {96D3AF6F-D491-40AA-B199-FA9DB7E5BF6D}.Release|Any CPU.Build.0 = Release|Any CPU + {67FBE160-62EE-41E3-81AD-C417DE7446D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {67FBE160-62EE-41E3-81AD-C417DE7446D4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {67FBE160-62EE-41E3-81AD-C417DE7446D4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {67FBE160-62EE-41E3-81AD-C417DE7446D4}.Release|Any CPU.Build.0 = Release|Any CPU + {A58AF475-6F7B-4A64-8F17-06D9D2BE5777}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A58AF475-6F7B-4A64-8F17-06D9D2BE5777}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A58AF475-6F7B-4A64-8F17-06D9D2BE5777}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A58AF475-6F7B-4A64-8F17-06D9D2BE5777}.Release|Any CPU.Build.0 = Release|Any CPU + {832EE19B-72DE-4DCA-90D9-65BB25121F47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {832EE19B-72DE-4DCA-90D9-65BB25121F47}.Debug|Any CPU.Build.0 = Debug|Any CPU + {832EE19B-72DE-4DCA-90D9-65BB25121F47}.Release|Any CPU.ActiveCfg = Release|Any CPU + {832EE19B-72DE-4DCA-90D9-65BB25121F47}.Release|Any CPU.Build.0 = Release|Any CPU + {51B1B61B-453B-4282-914C-87B0F39579B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {51B1B61B-453B-4282-914C-87B0F39579B2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {51B1B61B-453B-4282-914C-87B0F39579B2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {51B1B61B-453B-4282-914C-87B0F39579B2}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -116,6 +154,14 @@ Global {DC4205D2-3644-46E8-86A5-FE23B0BD5EA9} = {425CDAF9-11CA-4C58-B6D4-0CB644481EF9} {078ADF8D-48B1-45A9-913E-20362B63590A} = {425CDAF9-11CA-4C58-B6D4-0CB644481EF9} {B64227A9-23C4-4B99-A5E0-7028CA40FF32} = {425CDAF9-11CA-4C58-B6D4-0CB644481EF9} + {96D3AF6F-D491-40AA-B199-FA9DB7E5BF6D} = {80A9A052-B4F2-414A-B741-5E7F1850928D} + {67FBE160-62EE-41E3-81AD-C417DE7446D4} = {80A9A052-B4F2-414A-B741-5E7F1850928D} + {80A9A052-B4F2-414A-B741-5E7F1850928D} = {3EA0059A-3E14-404D-A465-116B0B0C15BC} + {A58AF475-6F7B-4A64-8F17-06D9D2BE5777} = {4255C60C-E695-4ECE-83BF-4DD4F3FB3B3E} + {832EE19B-72DE-4DCA-90D9-65BB25121F47} = {4255C60C-E695-4ECE-83BF-4DD4F3FB3B3E} + {4255C60C-E695-4ECE-83BF-4DD4F3FB3B3E} = {3EA0059A-3E14-404D-A465-116B0B0C15BC} + {51B1B61B-453B-4282-914C-87B0F39579B2} = {07748BF8-404D-4712-93DA-4D66BC22235E} + {07748BF8-404D-4712-93DA-4D66BC22235E} = {3EA0059A-3E14-404D-A465-116B0B0C15BC} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {4DF081FC-DC0D-4317-AB2C-4294B9FE6257} diff --git a/src/libraries/System.Formats.Cbor/System.Formats.Cbor.sln b/src/libraries/System.Formats.Cbor/System.Formats.Cbor.sln index b40a6ad85aa192..e302481c9c8c46 100644 --- a/src/libraries/System.Formats.Cbor/System.Formats.Cbor.sln +++ b/src/libraries/System.Formats.Cbor/System.Formats.Cbor.sln @@ -9,12 +9,20 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "System.Formats.Cbor.Tests.D EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Formats.Cbor.Tests", "tests\System.Formats.Cbor.Tests.csproj", "{29879823-0A6F-44A0-B0A5-D90DEC23E4EF}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{E6B842CA-18D3-467C-BA83-4A8239EE8C46}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{1A5762F8-12A3-4731-BF4A-186FA9697828}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{B054CCD9-E0FD-4F93-B8BC-DD1631B99F69}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{84164104-008B-4B08-99B4-025D410F6B9D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{5071CA6E-644A-4404-85AA-9DD2DA9BEAFC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{B80E033C-5F43-46D0-85A2-888FB157B925}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{329E9318-0A49-480C-BCBF-C3FC9CD2FD99}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{A391E863-60F0-4CC6-B279-9224860A3AB0}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{172C0706-C81F-4DDD-A4B8-52B28481FD67}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{46BA9FAE-9204-455A-BB2D-518E5B5C3E4C}" @@ -23,6 +31,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B9017269-306 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{F186B21D-7138-458B-AEB8-1C1B9711D005}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{3C74B1FB-DF39-4A3D-A51F-74DA04E09F48}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{DA5451CE-D43F-4A5E-98F1-36019CE444FC}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{EAB13E9C-F53F-4A79-A255-D19227370863}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{904531B6-B508-4BA5-A9E4-27925AE0B5BE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -49,10 +65,6 @@ Global {29879823-0A6F-44A0-B0A5-D90DEC23E4EF}.Debug|Any CPU.Build.0 = Debug|Any CPU {29879823-0A6F-44A0-B0A5-D90DEC23E4EF}.Release|Any CPU.ActiveCfg = Release|Any CPU {29879823-0A6F-44A0-B0A5-D90DEC23E4EF}.Release|Any CPU.Build.0 = Release|Any CPU - {E6B842CA-18D3-467C-BA83-4A8239EE8C46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E6B842CA-18D3-467C-BA83-4A8239EE8C46}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E6B842CA-18D3-467C-BA83-4A8239EE8C46}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E6B842CA-18D3-467C-BA83-4A8239EE8C46}.Release|Any CPU.Build.0 = Release|Any CPU {1A5762F8-12A3-4731-BF4A-186FA9697828}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1A5762F8-12A3-4731-BF4A-186FA9697828}.Debug|Any CPU.Build.0 = Debug|Any CPU {1A5762F8-12A3-4731-BF4A-186FA9697828}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -61,6 +73,26 @@ Global {B054CCD9-E0FD-4F93-B8BC-DD1631B99F69}.Debug|Any CPU.Build.0 = Debug|Any CPU {B054CCD9-E0FD-4F93-B8BC-DD1631B99F69}.Release|Any CPU.ActiveCfg = Release|Any CPU {B054CCD9-E0FD-4F93-B8BC-DD1631B99F69}.Release|Any CPU.Build.0 = Release|Any CPU + {84164104-008B-4B08-99B4-025D410F6B9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {84164104-008B-4B08-99B4-025D410F6B9D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {84164104-008B-4B08-99B4-025D410F6B9D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {84164104-008B-4B08-99B4-025D410F6B9D}.Release|Any CPU.Build.0 = Release|Any CPU + {5071CA6E-644A-4404-85AA-9DD2DA9BEAFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5071CA6E-644A-4404-85AA-9DD2DA9BEAFC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5071CA6E-644A-4404-85AA-9DD2DA9BEAFC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5071CA6E-644A-4404-85AA-9DD2DA9BEAFC}.Release|Any CPU.Build.0 = Release|Any CPU + {B80E033C-5F43-46D0-85A2-888FB157B925}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B80E033C-5F43-46D0-85A2-888FB157B925}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B80E033C-5F43-46D0-85A2-888FB157B925}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B80E033C-5F43-46D0-85A2-888FB157B925}.Release|Any CPU.Build.0 = Release|Any CPU + {329E9318-0A49-480C-BCBF-C3FC9CD2FD99}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {329E9318-0A49-480C-BCBF-C3FC9CD2FD99}.Debug|Any CPU.Build.0 = Debug|Any CPU + {329E9318-0A49-480C-BCBF-C3FC9CD2FD99}.Release|Any CPU.ActiveCfg = Release|Any CPU + {329E9318-0A49-480C-BCBF-C3FC9CD2FD99}.Release|Any CPU.Build.0 = Release|Any CPU + {A391E863-60F0-4CC6-B279-9224860A3AB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A391E863-60F0-4CC6-B279-9224860A3AB0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A391E863-60F0-4CC6-B279-9224860A3AB0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A391E863-60F0-4CC6-B279-9224860A3AB0}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -71,9 +103,16 @@ Global {29879823-0A6F-44A0-B0A5-D90DEC23E4EF} = {172C0706-C81F-4DDD-A4B8-52B28481FD67} {259A1DB6-EF7E-4D45-96EF-035E0605BB55} = {46BA9FAE-9204-455A-BB2D-518E5B5C3E4C} {8D8A522D-D363-4594-81BF-0EB16C0B4713} = {B9017269-3067-4CD3-B1E7-2EA25BCE9F79} - {E6B842CA-18D3-467C-BA83-4A8239EE8C46} = {F186B21D-7138-458B-AEB8-1C1B9711D005} {1A5762F8-12A3-4731-BF4A-186FA9697828} = {F186B21D-7138-458B-AEB8-1C1B9711D005} {B054CCD9-E0FD-4F93-B8BC-DD1631B99F69} = {F186B21D-7138-458B-AEB8-1C1B9711D005} + {84164104-008B-4B08-99B4-025D410F6B9D} = {3C74B1FB-DF39-4A3D-A51F-74DA04E09F48} + {5071CA6E-644A-4404-85AA-9DD2DA9BEAFC} = {3C74B1FB-DF39-4A3D-A51F-74DA04E09F48} + {3C74B1FB-DF39-4A3D-A51F-74DA04E09F48} = {904531B6-B508-4BA5-A9E4-27925AE0B5BE} + {B80E033C-5F43-46D0-85A2-888FB157B925} = {DA5451CE-D43F-4A5E-98F1-36019CE444FC} + {329E9318-0A49-480C-BCBF-C3FC9CD2FD99} = {DA5451CE-D43F-4A5E-98F1-36019CE444FC} + {DA5451CE-D43F-4A5E-98F1-36019CE444FC} = {904531B6-B508-4BA5-A9E4-27925AE0B5BE} + {A391E863-60F0-4CC6-B279-9224860A3AB0} = {EAB13E9C-F53F-4A79-A255-D19227370863} + {EAB13E9C-F53F-4A79-A255-D19227370863} = {904531B6-B508-4BA5-A9E4-27925AE0B5BE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {5D247ED0-3E73-46A6-ACC7-523BA1493370} diff --git a/src/libraries/System.Formats.Cbor/src/CompatibilitySuppressions.xml b/src/libraries/System.Formats.Cbor/src/CompatibilitySuppressions.xml index 22aa07a6de51c2..590fa7585021af 100644 --- a/src/libraries/System.Formats.Cbor/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Formats.Cbor/src/CompatibilitySuppressions.xml @@ -1,4 +1,5 @@  + CP0002 @@ -14,4 +15,32 @@ lib/netstandard2.0/System.Formats.Cbor.dll true + + CP0002 + M:System.Formats.Cbor.CborReader.ReadHalf + lib/net6.0/System.Formats.Cbor.dll + lib/netstandard2.0/System.Formats.Cbor.dll + true + + + CP0002 + M:System.Formats.Cbor.CborWriter.WriteHalf(System.Half) + lib/net6.0/System.Formats.Cbor.dll + lib/netstandard2.0/System.Formats.Cbor.dll + true + + + CP0002 + M:System.Formats.Cbor.CborReader.ReadHalf + lib/net7.0/System.Formats.Cbor.dll + lib/netstandard2.0/System.Formats.Cbor.dll + true + + + CP0002 + M:System.Formats.Cbor.CborWriter.WriteHalf(System.Half) + lib/net7.0/System.Formats.Cbor.dll + lib/netstandard2.0/System.Formats.Cbor.dll + true + \ No newline at end of file diff --git a/src/libraries/System.Formats.Tar/System.Formats.Tar.sln b/src/libraries/System.Formats.Tar/System.Formats.Tar.sln index a5ff8f46a4388a..3c8a2aacb8f885 100644 --- a/src/libraries/System.Formats.Tar/System.Formats.Tar.sln +++ b/src/libraries/System.Formats.Tar/System.Formats.Tar.sln @@ -7,10 +7,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Formats.Tar", "ref\S EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Formats.Tar", "src\System.Formats.Tar.csproj", "{9F751C2B-56DD-4604-A3F3-568627F8C006}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Formats.Tar.Tests", "tests\System.Formats.Tar.Tests.csproj", "{6FD1E284-7B50-4077-B73A-5B31CB0E3577}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Formats.Tar.Manual.Tests", "tests\Manual\System.Formats.Tar.Manual.Tests.csproj", "{D2788A26-CDAE-4388-AE4B-A36B0E6DFF9D}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Formats.Tar.Tests", "tests\System.Formats.Tar.Tests.csproj", "{6FD1E284-7B50-4077-B73A-5B31CB0E3577}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{00477EA4-C3E5-48A9-8CA8-8CCF689E0DB4}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{E89FEF3E-E0B9-41C4-A51C-9759AD1A3B69}" @@ -19,6 +19,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{A00011A0-E609-4A49-B893-EBFC72C98707}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{AFEE875F-22C7-46AE-B28F-AF5C05CA0BA5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{AABA2E7B-6B45-4DD7-9C33-5F0FCDA1193F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{1720175E-27DA-4004-ABF2-DD47A338A3DB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{EB826FA8-035F-4DEF-8767-CBF94446916B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{B2F7C18F-2333-432B-AC5E-9AD672582DF3}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{6CF0D830-3EE9-44B1-B548-EA8750AD7B3E}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{9BE8AFF4-D37B-49AF-AFD3-A15E514AC8AE}" @@ -27,6 +37,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{55A8C7E4-925 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{0345BAA8-92BC-4499-B550-21AC44910FD2}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{07E13495-DC86-43BF-9E64-2CEA381D892D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{3CB7A441-325E-41C9-B0D3-30D29CC21E82}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{F845BA28-9AFC-4B52-8ED1-A4302AEB5C11}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{4A77449F-D456-4E19-B31C-7E0E3702680B}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -49,6 +67,10 @@ Global {9F751C2B-56DD-4604-A3F3-568627F8C006}.Debug|Any CPU.Build.0 = Debug|Any CPU {9F751C2B-56DD-4604-A3F3-568627F8C006}.Release|Any CPU.ActiveCfg = Release|Any CPU {9F751C2B-56DD-4604-A3F3-568627F8C006}.Release|Any CPU.Build.0 = Release|Any CPU + {D2788A26-CDAE-4388-AE4B-A36B0E6DFF9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D2788A26-CDAE-4388-AE4B-A36B0E6DFF9D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D2788A26-CDAE-4388-AE4B-A36B0E6DFF9D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D2788A26-CDAE-4388-AE4B-A36B0E6DFF9D}.Release|Any CPU.Build.0 = Release|Any CPU {6FD1E284-7B50-4077-B73A-5B31CB0E3577}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6FD1E284-7B50-4077-B73A-5B31CB0E3577}.Debug|Any CPU.Build.0 = Debug|Any CPU {6FD1E284-7B50-4077-B73A-5B31CB0E3577}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -69,10 +91,26 @@ Global {A00011A0-E609-4A49-B893-EBFC72C98707}.Debug|Any CPU.Build.0 = Debug|Any CPU {A00011A0-E609-4A49-B893-EBFC72C98707}.Release|Any CPU.ActiveCfg = Release|Any CPU {A00011A0-E609-4A49-B893-EBFC72C98707}.Release|Any CPU.Build.0 = Release|Any CPU - {D2788A26-CDAE-4388-AE4B-A36B0E6DFF9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D2788A26-CDAE-4388-AE4B-A36B0E6DFF9D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D2788A26-CDAE-4388-AE4B-A36B0E6DFF9D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D2788A26-CDAE-4388-AE4B-A36B0E6DFF9D}.Release|Any CPU.Build.0 = Release|Any CPU + {AFEE875F-22C7-46AE-B28F-AF5C05CA0BA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AFEE875F-22C7-46AE-B28F-AF5C05CA0BA5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AFEE875F-22C7-46AE-B28F-AF5C05CA0BA5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AFEE875F-22C7-46AE-B28F-AF5C05CA0BA5}.Release|Any CPU.Build.0 = Release|Any CPU + {AABA2E7B-6B45-4DD7-9C33-5F0FCDA1193F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AABA2E7B-6B45-4DD7-9C33-5F0FCDA1193F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AABA2E7B-6B45-4DD7-9C33-5F0FCDA1193F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AABA2E7B-6B45-4DD7-9C33-5F0FCDA1193F}.Release|Any CPU.Build.0 = Release|Any CPU + {1720175E-27DA-4004-ABF2-DD47A338A3DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1720175E-27DA-4004-ABF2-DD47A338A3DB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1720175E-27DA-4004-ABF2-DD47A338A3DB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1720175E-27DA-4004-ABF2-DD47A338A3DB}.Release|Any CPU.Build.0 = Release|Any CPU + {EB826FA8-035F-4DEF-8767-CBF94446916B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EB826FA8-035F-4DEF-8767-CBF94446916B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EB826FA8-035F-4DEF-8767-CBF94446916B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EB826FA8-035F-4DEF-8767-CBF94446916B}.Release|Any CPU.Build.0 = Release|Any CPU + {B2F7C18F-2333-432B-AC5E-9AD672582DF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B2F7C18F-2333-432B-AC5E-9AD672582DF3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B2F7C18F-2333-432B-AC5E-9AD672582DF3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B2F7C18F-2333-432B-AC5E-9AD672582DF3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -80,16 +118,22 @@ Global GlobalSection(NestedProjects) = preSolution {BE259E6E-B4F5-47DC-93D5-204297098A8C} = {6CF0D830-3EE9-44B1-B548-EA8750AD7B3E} {45972587-B4BF-4F09-94DC-20E2D460FAA8} = {6CF0D830-3EE9-44B1-B548-EA8750AD7B3E} + {D2788A26-CDAE-4388-AE4B-A36B0E6DFF9D} = {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} {A00011A0-E609-4A49-B893-EBFC72C98707} = {9BE8AFF4-D37B-49AF-AFD3-A15E514AC8AE} {9F751C2B-56DD-4604-A3F3-568627F8C006} = {55A8C7E4-925C-4F21-B68B-CEFC19137A4B} - {6FD1E284-7B50-4077-B73A-5B31CB0E3577} = {6CF0D830-3EE9-44B1-B548-EA8750AD7B3E} {00477EA4-C3E5-48A9-8CA8-8CCF689E0DB4} = {0345BAA8-92BC-4499-B550-21AC44910FD2} {E89FEF3E-E0B9-41C4-A51C-9759AD1A3B69} = {0345BAA8-92BC-4499-B550-21AC44910FD2} {50E6D5FD-0E06-4D07-966E-C28E5448A1D3} = {0345BAA8-92BC-4499-B550-21AC44910FD2} - {A00011A0-E609-4A49-B893-EBFC72C98707} = {9BE8AFF4-D37B-49AF-AFD3-A15E514AC8AE} - {D2788A26-CDAE-4388-AE4B-A36B0E6DFF9D} = {6CF0D830-3EE9-44B1-B548-EA8750AD7B3E} + {AFEE875F-22C7-46AE-B28F-AF5C05CA0BA5} = {07E13495-DC86-43BF-9E64-2CEA381D892D} + {AABA2E7B-6B45-4DD7-9C33-5F0FCDA1193F} = {07E13495-DC86-43BF-9E64-2CEA381D892D} + {07E13495-DC86-43BF-9E64-2CEA381D892D} = {4A77449F-D456-4E19-B31C-7E0E3702680B} + {1720175E-27DA-4004-ABF2-DD47A338A3DB} = {3CB7A441-325E-41C9-B0D3-30D29CC21E82} + {EB826FA8-035F-4DEF-8767-CBF94446916B} = {3CB7A441-325E-41C9-B0D3-30D29CC21E82} + {3CB7A441-325E-41C9-B0D3-30D29CC21E82} = {4A77449F-D456-4E19-B31C-7E0E3702680B} + {B2F7C18F-2333-432B-AC5E-9AD672582DF3} = {F845BA28-9AFC-4B52-8ED1-A4302AEB5C11} + {F845BA28-9AFC-4B52-8ED1-A4302AEB5C11} = {4A77449F-D456-4E19-B31C-7E0E3702680B} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {F9B8DA67-C83B-466D-907C-9541CDBDCFEF} diff --git a/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoAsync.cs b/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoAsync.cs index 1e9eb7b7555bc8..3f7131ad8db332 100644 --- a/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoAsync.cs +++ b/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoAsync.cs @@ -30,6 +30,7 @@ public void TestCurrentCulturesAsync() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void TestCurrentCulturesWithAwait() { var newCurrentCulture = new CultureInfo(CultureInfo.CurrentCulture.Name.Equals("ja-JP", StringComparison.OrdinalIgnoreCase) ? "en-US" : "ja-JP"); diff --git a/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoCurrentCulture.cs b/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoCurrentCulture.cs index 1dbebd7bb292dd..17d61191168583 100644 --- a/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoCurrentCulture.cs +++ b/src/libraries/System.Globalization/tests/CultureInfo/CultureInfoCurrentCulture.cs @@ -182,7 +182,7 @@ public void CurrentCulture_DefaultWithNoLang(string langEnvVar) private static void CopyEssentialTestEnvironment(IDictionary environment) { string[] essentialVariables = { "HOME", "LD_LIBRARY_PATH", "ICU_DATA" }; - string[] prefixedVariables = { "DOTNET_", "COMPlus_" }; + string[] prefixedVariables = { "DOTNET_", "COMPlus_", "SuperPMIShim" }; foreach (DictionaryEntry de in Environment.GetEnvironmentVariables()) { diff --git a/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoAbbreviatedDayNames.cs b/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoAbbreviatedDayNames.cs index 3b3e7c88b2d9ff..a597272f7492c4 100644 --- a/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoAbbreviatedDayNames.cs +++ b/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoAbbreviatedDayNames.cs @@ -37,10 +37,7 @@ public static IEnumerable AbbreviatedDayNames_Get_TestData_HybridGloba yield return new object[] { new CultureInfo("bn-BD").DateTimeFormat, new string[] { "রবি", "সোম", "মঙ্গল", "বুধ", "বৃহস্পতি", "শুক্র", "শনি" } }; yield return new object[] { new CultureInfo("ca-AD").DateTimeFormat, new string[] { "dg.", "dl.", "dt.", "dc.", "dj.", "dv.", "ds." } }; yield return new object[] { new CultureInfo("cs-CZ").DateTimeFormat, new string[] { "ne", "po", "út", "st", "čt", "pá", "so" } }; - string[] dannishDays = PlatformDetection.IsNodeJS ? - new string[] { "søn", "man", "tir", "ons", "tor", "fre", "lør" } : - new string[] { "søn.", "man.", "tirs.", "ons.", "tors.", "fre.", "lør." }; - yield return new object[] { new CultureInfo("da-DK").DateTimeFormat, dannishDays }; + yield return new object[] { new CultureInfo("da-DK").DateTimeFormat, new string[] { "søn.", "man.", "tirs.", "ons.", "tors.", "fre.", "lør." } }; yield return new object[] { new CultureInfo("de-DE").DateTimeFormat, new string[] { "So", "Mo", "Di", "Mi", "Do", "Fr", "Sa" } }; yield return new object[] { new CultureInfo("el-GR").DateTimeFormat, new string[] { "Κυρ", "Δευ", "Τρί", "Τετ", "Πέμ", "Παρ", "Σάβ" } }; yield return new object[] { new CultureInfo("en-CA").DateTimeFormat, new string[] { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" } }; // should be with dots diff --git a/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoAbbreviatedMonthGenitiveNames.cs b/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoAbbreviatedMonthGenitiveNames.cs index 40148736a143f4..b8aa7d78581a19 100644 --- a/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoAbbreviatedMonthGenitiveNames.cs +++ b/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoAbbreviatedMonthGenitiveNames.cs @@ -14,14 +14,8 @@ public static IEnumerable AbbreviatedMonthGenitiveNames_Get_TestData_H yield return new object[] { new CultureInfo("ar-SA").DateTimeFormat, new string[] { "محرم", "صفر", "ربيع الأول", "ربيع الآخر", "جمادى الأولى", "جمادى الآخرة", "رجب", "شعبان", "رمضان", "شوال", "ذو القعدة", "ذو الحجة", "" } }; yield return new object[] { new CultureInfo("am-ET").DateTimeFormat, new string[] { "ጃንዩ", "ፌብሩ", "ማርች", "ኤፕሪ", "ሜይ", "ጁን", "ጁላይ", "ኦገስ", "ሴፕቴ", "ኦክቶ", "ኖቬም", "ዲሴም", "" } }; yield return new object[] { new CultureInfo("bg-BG").DateTimeFormat, new string[] { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "" } }; //"яну", "фев", "март", "апр", "май", "юни", "юли", "авг", "сеп", "окт", "ное", "дек", "" - yield return new object[] { new CultureInfo("bn-BD").DateTimeFormat, - PlatformDetection.IsNodeJS ? // NodeJs responds like dotnet - new string[] { "জানু", "ফেব", "মার্চ", "এপ্রিল", "মে", "জুন", "জুলাই", "আগস্ট", "সেপ্টেম্বর", "অক্টোবর", "নভেম্বর", "ডিসেম্বর", "" } : - new string[] { "জানু", "ফেব", "মার্চ", "এপ্রি", "মে", "জুন", "জুল", "আগ", "সেপ", "অক্টো", "নভে", "ডিসে", "" } }; - yield return new object[] { new CultureInfo("bn-IN").DateTimeFormat, - PlatformDetection.IsNodeJS ? // NodeJs responds like dotnet - new string[] { "জানু", "ফেব", "মার্চ", "এপ্রিল", "মে", "জুন", "জুলাই", "আগস্ট", "সেপ্টেম্বর", "অক্টোবর", "নভেম্বর", "ডিসেম্বর", "" } : - new string[] { "জানু", "ফেব", "মার্চ", "এপ্রি", "মে", "জুন", "জুল", "আগ", "সেপ্টেঃ", "অক্টোঃ", "নভেঃ", "ডিসেঃ", "" } }; + yield return new object[] { new CultureInfo("bn-BD").DateTimeFormat, new string[] { "জানু", "ফেব", "মার্চ", "এপ্রি", "মে", "জুন", "জুল", "আগ", "সেপ", "অক্টো", "নভে", "ডিসে", "" } }; // "জানু", "ফেব", "মার্চ", "এপ্রিল", "মে", "জুন", "জুলাই", "আগস্ট", "সেপ্টেম্বর", "অক্টোবর", "নভেম্বর", "ডিসেম্বর", "" + yield return new object[] { new CultureInfo("bn-IN").DateTimeFormat, new string[] { "জানু", "ফেব", "মার্চ", "এপ্রি", "মে", "জুন", "জুল", "আগ", "সেপ্টেঃ", "অক্টোঃ", "নভেঃ", "ডিসেঃ", "" } }; // "জানু", "ফেব", "মার্চ", "এপ্রিল", "মে", "জুন", "জুলাই", "আগস্ট", "সেপ্টেম্বর", "অক্টোবর", "নভেম্বর", "ডিসেম্বর", "" yield return new object[] { new CultureInfo("ca-AD").DateTimeFormat, new string[] { "gen.", "febr.", "març", "abr.", "maig", "juny", "jul.", "ag.", "set.", "oct.", "nov.", "des.", "" } }; // "de gen.", "de febr.", "de març", "d’abr.", "de maig", "de juny", "de jul.", "d’ag.", "de set.", "d’oct.", "de nov.", "de des.", "" yield return new object[] { new CultureInfo("ca-ES").DateTimeFormat, new string[] { "gen.", "febr.", "març", "abr.", "maig", "juny", "jul.", "ag.", "set.", "oct.", "nov.", "des.", "" } }; yield return new object[] { new CultureInfo("cs-CZ").DateTimeFormat, new string[] { "led", "úno", "bře", "dub", "kvě", "čvn", "čvc", "srp", "zář", "říj", "lis", "pro", "" } }; @@ -48,7 +42,7 @@ public static IEnumerable AbbreviatedMonthGenitiveNames_Get_TestData_H yield return new object[] { new CultureInfo("en-BS").DateTimeFormat, new string[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec", "" } }; // "Sep" yield return new object[] { new CultureInfo("en-BW").DateTimeFormat, new string[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec", "" } }; // "Sep" yield return new object[] { new CultureInfo("en-BZ").DateTimeFormat, new string[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec", "" } }; // "Sep" - yield return new object[] { new CultureInfo("en-CA").DateTimeFormat, new string[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", PlatformDetection.IsNodeJS ? "Sept" : "Sep", "Oct", "Nov", "Dec", "" } }; // "Jan.", "Feb.", "Mar.", "Apr.", "May", "Jun.", "Jul.", "Aug.", "Sep.", "Oct.", "Nov.", "Dec.", "" + yield return new object[] { new CultureInfo("en-CA").DateTimeFormat, new string[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "" } }; // "Jan.", "Feb.", "Mar.", "Apr.", "May", "Jun.", "Jul.", "Aug.", "Sep.", "Oct.", "Nov.", "Dec.", "" yield return new object[] { new CultureInfo("en-CC").DateTimeFormat, new string[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec", "" } }; // "Sep" yield return new object[] { new CultureInfo("en-CH").DateTimeFormat, new string[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec", "" } }; // "Sep" yield return new object[] { new CultureInfo("en-CK").DateTimeFormat, new string[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec", "" } }; // "Sep" @@ -158,10 +152,7 @@ public static IEnumerable AbbreviatedMonthGenitiveNames_Get_TestData_H yield return new object[] { new CultureInfo("it-CH").DateTimeFormat, new string[] { "gen", "feb", "mar", "apr", "mag", "giu", "lug", "ago", "set", "ott", "nov", "dic", "" } }; yield return new object[] { new CultureInfo("it-IT").DateTimeFormat, new string[] { "gen", "feb", "mar", "apr", "mag", "giu", "lug", "ago", "set", "ott", "nov", "dic", "" } }; yield return new object[] { new CultureInfo("ja-JP").DateTimeFormat, new string[] { "1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月", "" } }; - string[] kannadianMonths = PlatformDetection.IsNodeJS ? // NodeJs responds like dotnet - new string[] { "ಜನವರಿ", "ಫೆಬ್ರವರಿ", "ಮಾರ್ಚ್", "ಏಪ್ರಿ", "ಮೇ", "ಜೂನ್", "ಜುಲೈ", "ಆಗ", "ಸೆಪ್ಟೆಂ", "ಅಕ್ಟೋ", "ನವೆಂ", "ಡಿಸೆಂ", "" } : - new string[] { "ಜನವರಿ", "ಫೆಬ್ರವರಿ", "ಮಾರ್ಚ್", "ಏಪ್ರಿ", "ಮೇ", "ಜೂನ್", "ಜುಲೈ", "ಆಗಸ್ಟ್", "ಸೆಪ್ಟೆಂ", "ಅಕ್ಟೋ", "ನವೆಂ", "ಡಿಸೆಂ", "" }; - yield return new object[] { new CultureInfo("kn-IN").DateTimeFormat, kannadianMonths }; + yield return new object[] { new CultureInfo("kn-IN").DateTimeFormat, new string[] { "ಜನವರಿ", "ಫೆಬ್ರವರಿ", "ಮಾರ್ಚ್", "ಏಪ್ರಿ", "ಮೇ", "ಜೂನ್", "ಜುಲೈ", "ಆಗಸ್ಟ್", "ಸೆಪ್ಟೆಂ", "ಅಕ್ಟೋ", "ನವೆಂ", "ಡಿಸೆಂ", "" } }; // "ಜನವರಿ", "ಫೆಬ್ರವರಿ", "ಮಾರ್ಚ್", "ಏಪ್ರಿ", "ಮೇ", "ಜೂನ್", "ಜುಲೈ", "ಆಗ", "ಸೆಪ್ಟೆಂ", "ಅಕ್ಟೋ", "ನವೆಂ", "ಡಿಸೆಂ", "" yield return new object[] { new CultureInfo("ko-KR").DateTimeFormat, new string[] { "1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월", "" } }; yield return new object[] { new CultureInfo("lt-LT").DateTimeFormat, new string[] { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "" } }; // "saus.", "vas.", "kov.", "bal.", "geg.", "birž.", "liep.", "rugp.", "rugs.", "spal.", "lapkr.", "gruod." yield return new object[] { new CultureInfo("lv-LV").DateTimeFormat, new string[] { "janv.", "febr.", "marts", "apr.", "maijs", "jūn.", "jūl.", "aug.", "sept.", "okt.", "nov.", "dec.", "" } }; @@ -170,14 +161,10 @@ public static IEnumerable AbbreviatedMonthGenitiveNames_Get_TestData_H yield return new object[] { new CultureInfo("ms-BN").DateTimeFormat, new string[] { "Jan", "Feb", "Mac", "Apr", "Mei", "Jun", "Jul", "Ogo", "Sep", "Okt", "Nov", "Dis", "" } }; yield return new object[] { new CultureInfo("ms-MY").DateTimeFormat, new string[] { "Jan", "Feb", "Mac", "Apr", "Mei", "Jun", "Jul", "Ogo", "Sep", "Okt", "Nov", "Dis", "" } }; yield return new object[] { new CultureInfo("ms-SG").DateTimeFormat, new string[] { "Jan", "Feb", "Mac", "Apr", "Mei", "Jun", "Jul", "Ogo", "Sep", "Okt", "Nov", "Dis", "" } }; - string[] norwegianMonths = PlatformDetection.IsBrowserDomSupported ? // dotnet responds like non-browser - new string [] { "jan.", "feb.", "mars", "apr.", "mai", "juni", "juli", "aug.", "sep.", "okt.", "nov.", "des.", "" } : - new string [] { "jan.", "feb.", "mar.", "apr.", "mai", "jun.", "jul.", "aug.", "sep.", "okt.", "nov.", "des.", "" }; + string[] norwegianMonths = new string [] { "jan.", "feb.", "mars", "apr.", "mai", "juni", "juli", "aug.", "sep.", "okt.", "nov.", "des.", "" }; // "jan.", "feb.", "mar.", "apr.", "mai", "jun.", "jul.", "aug.", "sep.", "okt.", "nov.", "des.", " yield return new object[] { new CultureInfo("nb-NO").DateTimeFormat, norwegianMonths }; yield return new object[] { new CultureInfo("no-NO").DateTimeFormat, norwegianMonths }; - string[] dutchMonths = PlatformDetection.IsNodeJS ? // NodeJs responds like dotnet - new string[] { "jan.", "feb.", "mrt.", "apr.", "mei", "jun.", "jul.", "aug.", "sep.", "okt.", "nov.", "dec.", "" } : - new string[] { "jan", "feb", "mrt", "apr", "mei", "jun", "jul", "aug", "sep", "okt", "nov", "dec", "" }; + string[] dutchMonths = new string[] { "jan", "feb", "mrt", "apr", "mei", "jun", "jul", "aug", "sep", "okt", "nov", "dec", "" }; // "jan.", "feb.", "mrt.", "apr.", "mei", "jun.", "jul.", "aug.", "sep.", "okt.", "nov.", "dec.", "" yield return new object[] { new CultureInfo("nl-AW").DateTimeFormat, dutchMonths }; yield return new object[] { new CultureInfo("nl-BE").DateTimeFormat, dutchMonths }; yield return new object[] { new CultureInfo("nl-NL").DateTimeFormat, dutchMonths }; diff --git a/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoAbbreviatedMonthNames.cs b/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoAbbreviatedMonthNames.cs index a4468b9e0834e8..9cc622b4f2bb6e 100644 --- a/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoAbbreviatedMonthNames.cs +++ b/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoAbbreviatedMonthNames.cs @@ -34,14 +34,8 @@ public static IEnumerable AbbreviatedMonthNames_Get_TestData_HybridGlo yield return new object[] { new CultureInfo("ar-SA").DateTimeFormat, new string[] { "محرم", "صفر", "ربيع الأول", "ربيع الآخر", "جمادى الأولى", "جمادى الآخرة", "رجب", "شعبان", "رمضان", "شوال", "ذو القعدة", "ذو الحجة", "" } }; yield return new object[] { new CultureInfo("am-ET").DateTimeFormat, new string[] { "ጃንዩ", "ፌብሩ", "ማርች", "ኤፕሪ", "ሜይ", "ጁን", "ጁላይ", "ኦገስ", "ሴፕቴ", "ኦክቶ", "ኖቬም", "ዲሴም", "" } }; yield return new object[] { new CultureInfo("bg-BG").DateTimeFormat, new string[] { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "" } }; // "яну", "фев", "март", "апр", "май", "юни", "юли", "авг", "сеп", "окт", "ное", "дек", "" - yield return new object[] { new CultureInfo("bn-BD").DateTimeFormat, - PlatformDetection.IsNodeJS ? - new string[] { "জানুয়ারী", "ফেব্রুয়ারী", "মার্চ", "এপ্রিল", "মে", "জুন", "জুলাই", "আগস্ট", "সেপ্টেম্বর", "অক্টোবর", "নভেম্বর", "ডিসেম্বর", "" } : - new string[] { "জানু", "ফেব", "মার্চ", "এপ্রিল", "মে", "জুন", "জুলাই", "আগস্ট", "সেপ্টেম্বর", "অক্টোবর", "নভেম্বর", "ডিসেম্বর", "" } }; // NodeJS responds like dotnet - yield return new object[] { new CultureInfo("bn-IN").DateTimeFormat, - PlatformDetection.IsNodeJS ? - new string[] { "জানুয়ারী", "ফেব্রুয়ারী", "মার্চ", "এপ্রিল", "মে", "জুন", "জুলাই", "আগস্ট", "সেপ্টেম্বর", "অক্টোবর", "নভেম্বর", "ডিসেম্বর", "" } : - new string[] { "জানু", "ফেব", "মার্চ", "এপ্রিল", "মে", "জুন", "জুলাই", "আগস্ট", "সেপ্টেঃ", "অক্টোঃ", "নভেঃ", "ডিসেঃ", "" } }; // BUG. JS returns Genitive even though we expect Nominative; NodeJS responds like dotnet + yield return new object[] { new CultureInfo("bn-BD").DateTimeFormat, new string[] { "জানু", "ফেব", "মার্চ", "এপ্রিল", "মে", "জুন", "জুলাই", "আগস্ট", "সেপ্টেম্বর", "অক্টোবর", "নভেম্বর", "ডিসেম্বর", "" } }; // "জানুয়ারী", "ফেব্রুয়ারী", "মার্চ", "এপ্রিল", "মে", "জুন", "জুলাই", "আগস্ট", "সেপ্টেম্বর", "অক্টোবর", "নভেম্বর", "ডিসেম্বর", "" + yield return new object[] { new CultureInfo("bn-IN").DateTimeFormat, new string[] { "জানু", "ফেব", "মার্চ", "এপ্রিল", "মে", "জুন", "জুলাই", "আগস্ট", "সেপ্টেঃ", "অক্টোঃ", "নভেঃ", "ডিসেঃ", "" } }; // BUG. JS returns Genitive even though we expect Nominative; "জানু", "ফেব", "মার্চ", "এপ্রিল", "মে", "জুন", "জুলাই", "আগস্ট", "সেপ্টেম্বর", "অক্টোবর", "নভেম্বর", "ডিসেম্বর", "" yield return new object[] { new CultureInfo("ca-AD").DateTimeFormat, new string[] { "gen.", "febr.", "març", "abr.", "maig", "juny", "jul.", "ag.", "set.", "oct.", "nov.", "des.", "" } }; yield return new object[] { new CultureInfo("ca-ES").DateTimeFormat, new string[] { "gen.", "febr.", "març", "abr.", "maig", "juny", "jul.", "ag.", "set.", "oct.", "nov.", "des.", "" } }; yield return new object[] { new CultureInfo("cs-CZ").DateTimeFormat, new string[] { "led", "úno", "bře", "dub", "kvě", "čvn", "čvc", "srp", "zář", "říj", "lis", "pro", "" } }; @@ -60,7 +54,7 @@ public static IEnumerable AbbreviatedMonthNames_Get_TestData_HybridGlo yield return new object[] { new CultureInfo("en-AI").DateTimeFormat, new string[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec", "" } }; // "Sep" yield return new object[] { new CultureInfo("en-AS").DateTimeFormat, new string[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "" } }; yield return new object[] { new CultureInfo("en-AT").DateTimeFormat, new string[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec", "" } }; // "Sep" - yield return new object[] { new CultureInfo("en-AU").DateTimeFormat, new string[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", PlatformDetection.IsNodeJS ? "Sep" : "Sept", "Oct", "Nov", "Dec", "" } }; // v8/Browser responds like dotnet + yield return new object[] { new CultureInfo("en-AU").DateTimeFormat, new string[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec", "" } }; yield return new object[] { new CultureInfo("en-BB").DateTimeFormat, new string[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec", "" } }; // "Sep" yield return new object[] { new CultureInfo("en-BE").DateTimeFormat, new string[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec", "" } }; // "Sep" yield return new object[] { new CultureInfo("en-BI").DateTimeFormat, new string[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "" } }; @@ -68,7 +62,7 @@ public static IEnumerable AbbreviatedMonthNames_Get_TestData_HybridGlo yield return new object[] { new CultureInfo("en-BS").DateTimeFormat, new string[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec", "" } }; // "Sep" yield return new object[] { new CultureInfo("en-BW").DateTimeFormat, new string[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec", "" } }; // "Sep" yield return new object[] { new CultureInfo("en-BZ").DateTimeFormat, new string[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec", "" } }; // "Sep" - yield return new object[] { new CultureInfo("en-CA").DateTimeFormat, new string[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", PlatformDetection.IsNodeJS ? "Sept" : "Sep", "Oct", "Nov", "Dec", "" } }; // "Jan.", "Feb.", "Mar.", "Apr.", "May", "Jun.", "Jul.", "Aug.", "Sep.", "Oct.", "Nov.", "Dec.", "" + yield return new object[] { new CultureInfo("en-CA").DateTimeFormat, new string[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "" } }; // "Jan.", "Feb.", "Mar.", "Apr.", "May", "Jun.", "Jul.", "Aug.", "Sep.", "Oct.", "Nov.", "Dec.", "" yield return new object[] { new CultureInfo("en-CC").DateTimeFormat, new string[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec", "" } }; // "Sep" yield return new object[] { new CultureInfo("en-CH").DateTimeFormat, new string[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec", "" } }; // "Sep" yield return new object[] { new CultureInfo("en-CK").DateTimeFormat, new string[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec", "" } }; // "Sep" @@ -190,12 +184,9 @@ public static IEnumerable AbbreviatedMonthNames_Get_TestData_HybridGlo yield return new object[] { new CultureInfo("nb-NO").DateTimeFormat, new string[] { "jan", "feb", "mar", "apr", "mai", "jun", "jul", "aug", "sep", "okt", "nov", "des", "" } }; yield return new object[] { new CultureInfo("no").DateTimeFormat, new string[] { "jan", "feb", "mar", "apr", "mai", "jun", "jul", "aug", "sep", "okt", "nov", "des", "" } }; yield return new object[] { new CultureInfo("no-NO").DateTimeFormat, new string[] { "jan", "feb", "mar", "apr", "mai", "jun", "jul", "aug", "sep", "okt", "nov", "des", "" } }; - string [] dutchMonths = PlatformDetection.IsNodeJS ? - new string [] { "jan.", "feb.", "mrt.", "apr.", "mei", "jun.", "jul.", "aug.", "sep.", "okt.", "nov.", "dec.", ""} : - new string [] { "jan", "feb", "mrt", "apr", "mei", "jun", "jul", "aug", "sep", "okt", "nov", "dec", "" }; - yield return new object[] { new CultureInfo("nl-AW").DateTimeFormat, dutchMonths }; - yield return new object[] { new CultureInfo("nl-BE").DateTimeFormat, dutchMonths }; - yield return new object[] { new CultureInfo("nl-NL").DateTimeFormat, dutchMonths }; + yield return new object[] { new CultureInfo("nl-AW").DateTimeFormat, new string[] { "jan", "feb", "mrt", "apr", "mei", "jun", "jul", "aug", "sep", "okt", "nov", "dec", "" } }; // "jan.", "feb.", "mrt.", "apr.", "mei", "jun.", "jul.", "aug.", "sep.", "okt.", "nov.", "dec.", "" + yield return new object[] { new CultureInfo("nl-BE").DateTimeFormat, new string[] { "jan", "feb", "mrt", "apr", "mei", "jun", "jul", "aug", "sep", "okt", "nov", "dec", "" } }; // "jan.", "feb.", "mrt.", "apr.", "mei", "jun.", "jul.", "aug.", "sep.", "okt.", "nov.", "dec.", "" + yield return new object[] { new CultureInfo("nl-NL").DateTimeFormat, new string[] { "jan", "feb", "mrt", "apr", "mei", "jun", "jul", "aug", "sep", "okt", "nov", "dec", "" } }; // "jan.", "feb.", "mrt.", "apr.", "mei", "jun.", "jul.", "aug.", "sep.", "okt.", "nov.", "dec.", "" yield return new object[] { new CultureInfo("pl-PL").DateTimeFormat, new string[] { "sty", "lut", "mar", "kwi", "maj", "cze", "lip", "sie", "wrz", "paź", "lis", "gru", "" } }; yield return new object[] { new CultureInfo("pt-BR").DateTimeFormat, new string[] { "jan.", "fev.", "mar.", "abr.", "mai.", "jun.", "jul.", "ago.", "set.", "out.", "nov.", "dez.", "" } }; yield return new object[] { new CultureInfo("pt-PT").DateTimeFormat, new string[] { "jan.", "fev.", "mar.", "abr.", "mai.", "jun.", "jul.", "ago.", "set.", "out.", "nov.", "dez.", "" } }; diff --git a/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoCalendarWeekRule.cs b/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoCalendarWeekRule.cs index 29b1e23dc85f1c..020bb5239bfc58 100644 --- a/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoCalendarWeekRule.cs +++ b/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoCalendarWeekRule.cs @@ -176,9 +176,9 @@ public static IEnumerable CalendarWeekRule_Get_TestData() yield return new object[] { new CultureInfo("ms-BN").DateTimeFormat, CalendarWeekRule.FirstDay }; yield return new object[] { new CultureInfo("ms-MY").DateTimeFormat, CalendarWeekRule.FirstDay }; yield return new object[] { new CultureInfo("ms-SG").DateTimeFormat, CalendarWeekRule.FirstDay }; - yield return new object[] { new CultureInfo("nb-NO").DateTimeFormat, PlatformDetection.IsNodeJS ? CalendarWeekRule.FirstDay : CalendarWeekRule.FirstFourDayWeek }; // v8/Browser responds like dotnet + yield return new object[] { new CultureInfo("nb-NO").DateTimeFormat, CalendarWeekRule.FirstFourDayWeek }; yield return new object[] { new CultureInfo("no-NO").DateTimeFormat, CalendarWeekRule.FirstFourDayWeek }; - yield return new object[] { new CultureInfo("nl-AW").DateTimeFormat, PlatformDetection.IsNodeJS ? CalendarWeekRule.FirstFourDayWeek : CalendarWeekRule.FirstDay }; // v8/Browser responds like dotnet + yield return new object[] { new CultureInfo("nl-AW").DateTimeFormat, CalendarWeekRule.FirstDay }; yield return new object[] { new CultureInfo("nl-BE").DateTimeFormat, CalendarWeekRule.FirstFourDayWeek }; yield return new object[] { new CultureInfo("nl-NL").DateTimeFormat, CalendarWeekRule.FirstFourDayWeek }; yield return new object[] { new CultureInfo("pl-PL").DateTimeFormat, CalendarWeekRule.FirstFourDayWeek }; diff --git a/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoDayNames.cs b/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoDayNames.cs index 838dcd27bafc7a..85a88238e5ad5e 100644 --- a/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoDayNames.cs +++ b/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoDayNames.cs @@ -42,10 +42,7 @@ public static IEnumerable DayNames_Get_TestData_HybridGlobalization() yield return new object[] { new CultureInfo("es-419").DateTimeFormat, new string[] { "domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado" } }; yield return new object[] { new CultureInfo("es-ES").DateTimeFormat, new string[] { "domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado" } }; yield return new object[] { new CultureInfo("es-MX").DateTimeFormat, new string[] { "domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado" } }; - yield return new object[] { new CultureInfo("et-EE").DateTimeFormat, - PlatformDetection.IsNodeJS ? - new string[] { "Pühapäev", "Esmaspäev", "Teisipäev", "Kolmapäev", "Neljapäev", "Reede", "Laupäev" } : - new string[] { "pühapäev", "esmaspäev", "teisipäev", "kolmapäev", "neljapäev", "reede", "laupäev" } }; + yield return new object[] { new CultureInfo("et-EE").DateTimeFormat, new string[] { "pühapäev", "esmaspäev", "teisipäev", "kolmapäev", "neljapäev", "reede", "laupäev" } }; yield return new object[] { new CultureInfo("fa-IR").DateTimeFormat, new string[] { "یکشنبه", "دوشنبه", "سه‌شنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه" } }; yield return new object[] { new CultureInfo("fi-FI").DateTimeFormat, new string[] { "sunnuntai", "maanantai", "tiistai", "keskiviikko", "torstai", "perjantai", "lauantai" } }; yield return new object[] { new CultureInfo("fil-PH").DateTimeFormat, new string[] { "Linggo", "Lunes", "Martes", "Miyerkules", "Huwebes", "Biyernes", "Sabado" } }; diff --git a/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoFirstDayOfWeek.cs b/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoFirstDayOfWeek.cs index 35bb56082f9f4b..561ac95c3df32a 100644 --- a/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoFirstDayOfWeek.cs +++ b/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoFirstDayOfWeek.cs @@ -42,7 +42,7 @@ public static IEnumerable FirstDayOfWeek_Get_TestData() yield return new object[] { new CultureInfo("en-AI").DateTimeFormat, DayOfWeek.Monday }; yield return new object[] { new CultureInfo("en-AS").DateTimeFormat, DayOfWeek.Sunday }; yield return new object[] { new CultureInfo("en-AT").DateTimeFormat, DayOfWeek.Monday }; - yield return new object[] { new CultureInfo("en-AU").DateTimeFormat, PlatformDetection.IsNodeJS ? DayOfWeek.Sunday : DayOfWeek.Monday }; // originally in ICU: Sunday, even though ISO 8601 states: Monday + yield return new object[] { new CultureInfo("en-AU").DateTimeFormat, DayOfWeek.Monday }; // originally in ICU: Sunday, even though ISO 8601 states: Monday yield return new object[] { new CultureInfo("en-BB").DateTimeFormat, DayOfWeek.Monday }; yield return new object[] { new CultureInfo("en-BE").DateTimeFormat, DayOfWeek.Monday }; yield return new object[] { new CultureInfo("en-BI").DateTimeFormat, DayOfWeek.Monday }; @@ -194,13 +194,13 @@ public static IEnumerable FirstDayOfWeek_Get_TestData() yield return new object[] { new CultureInfo("ta-LK").DateTimeFormat, DayOfWeek.Monday }; yield return new object[] { new CultureInfo("ta-MY").DateTimeFormat, DayOfWeek.Monday }; yield return new object[] { new CultureInfo("ta-SG").DateTimeFormat, DayOfWeek.Sunday }; - yield return new object[] { new CultureInfo("te-IN").DateTimeFormat, PlatformDetection.IsNodeJS ? DayOfWeek.Monday : DayOfWeek.Sunday }; // Browser/V8 responds like dotnet + yield return new object[] { new CultureInfo("te-IN").DateTimeFormat, DayOfWeek.Sunday }; yield return new object[] { new CultureInfo("th-TH").DateTimeFormat, DayOfWeek.Sunday }; yield return new object[] { new CultureInfo("tr-CY").DateTimeFormat, DayOfWeek.Monday }; yield return new object[] { new CultureInfo("tr-TR").DateTimeFormat, DayOfWeek.Monday }; yield return new object[] { new CultureInfo("uk-UA").DateTimeFormat, DayOfWeek.Monday }; yield return new object[] { new CultureInfo("vi-VN").DateTimeFormat, DayOfWeek.Monday }; - yield return new object[] { new CultureInfo("zh-CN").DateTimeFormat, PlatformDetection.IsNodeJS ? DayOfWeek.Sunday : DayOfWeek.Monday }; // NodeJS responds like dotnet + yield return new object[] { new CultureInfo("zh-CN").DateTimeFormat, DayOfWeek.Monday }; yield return new object[] { new CultureInfo("zh-Hans-HK").DateTimeFormat, DayOfWeek.Sunday }; yield return new object[] { new CultureInfo("zh-SG").DateTimeFormat, DayOfWeek.Sunday }; yield return new object[] { new CultureInfo("zh-HK").DateTimeFormat, DayOfWeek.Sunday }; diff --git a/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoGetAbbreviatedEraName.cs b/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoGetAbbreviatedEraName.cs index 1cbd9f5a416f7f..0efefdd7d6a69b 100644 --- a/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoGetAbbreviatedEraName.cs +++ b/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoGetAbbreviatedEraName.cs @@ -23,7 +23,7 @@ public static IEnumerable GetAbbreviatedEraName_TestData() yield return new object[] { new CultureInfo("am-ET").DateTimeFormat, 1, "ዓ/ም" }; yield return new object[] { new CultureInfo("bg-BG").DateTimeFormat, 1, "сл.Хр." }; yield return new object[] { new CultureInfo("bn-BD").DateTimeFormat, 1, "খৃষ্টাব্দ" }; - yield return new object[] { new CultureInfo("bn-IN").DateTimeFormat, 1, PlatformDetection.IsNodeJS ? "খৃষ্টাব্দ" : "খ্রিঃ" }; // NodeJS responses like dotnet + yield return new object[] { new CultureInfo("bn-IN").DateTimeFormat, 1, "খ্রিঃ" }; // "খৃষ্টাব্দ" yield return new object[] { new CultureInfo("ca-AD").DateTimeFormat, 1, "dC" }; yield return new object[] { new CultureInfo("ca-ES").DateTimeFormat, 1, "dC" }; yield return new object[] { new CultureInfo("cs-CZ").DateTimeFormat, 1, "n.l." }; @@ -140,9 +140,8 @@ public static IEnumerable GetAbbreviatedEraName_TestData() yield return new object[] { new CultureInfo("en-ZM").DateTimeFormat, 1, "A" }; // AD yield return new object[] { new CultureInfo("en-ZW").DateTimeFormat, 1, "A" }; // AD yield return new object[] { new CultureInfo("es-ES").DateTimeFormat, 1, "d. C." }; - string spanishEra = PlatformDetection.IsNodeJS ? "d. C." : "d.C."; // NodeJS responses like dotnet - yield return new object[] { new CultureInfo("es-419").DateTimeFormat, 1, spanishEra }; - yield return new object[] { new CultureInfo("es-MX").DateTimeFormat, 1, spanishEra }; + yield return new object[] { new CultureInfo("es-419").DateTimeFormat, 1, "d.C." }; // "d. C." + yield return new object[] { new CultureInfo("es-MX").DateTimeFormat, 1, "d.C." }; // "d. C." yield return new object[] { new CultureInfo("et-EE").DateTimeFormat, 1, "pKr" }; yield return new object[] { new CultureInfo("fa-IR").DateTimeFormat, 1, "ه.ش" }; // ه‍.ش. yield return new object[] { new CultureInfo("fi-FI").DateTimeFormat, 1, "jKr" }; diff --git a/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoGetEraName.cs b/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoGetEraName.cs index 825679021c60f2..054ab01f726198 100644 --- a/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoGetEraName.cs +++ b/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoGetEraName.cs @@ -12,7 +12,7 @@ public static IEnumerable GetEraName_TestData() { yield return new object[] { DateTimeFormatInfo.InvariantInfo, 1, "A.D." }; yield return new object[] { DateTimeFormatInfo.InvariantInfo, 0, "A.D." }; - + if (!PlatformDetection.IsHybridGlobalizationOnBrowser) { var enUSFormat = new CultureInfo("en-US").DateTimeFormat; @@ -33,9 +33,8 @@ public static IEnumerable GetEraName_TestData() yield return new object[] { new CultureInfo("bg-BG").DateTimeFormat, 1, "сл.Хр." }; yield return new object[] { new CultureInfo("bn-BD").DateTimeFormat, 0, "খৃষ্টাব্দ" }; yield return new object[] { new CultureInfo("bn-BD").DateTimeFormat, 1, "খৃষ্টাব্দ" }; - string bangladeshEra = PlatformDetection.IsNodeJS ? "খৃষ্টাব্দ" : "খ্রিঃ"; - yield return new object[] { new CultureInfo("bn-IN").DateTimeFormat, 0, bangladeshEra }; - yield return new object[] { new CultureInfo("bn-IN").DateTimeFormat, 1, bangladeshEra }; + yield return new object[] { new CultureInfo("bn-IN").DateTimeFormat, 0, "খ্রিঃ" }; + yield return new object[] { new CultureInfo("bn-IN").DateTimeFormat, 1, "খ্রিঃ" }; yield return new object[] { new CultureInfo("ca-AD").DateTimeFormat, 0, "dC" }; yield return new object[] { new CultureInfo("ca-AD").DateTimeFormat, 1, "dC" }; yield return new object[] { new CultureInfo("ca-ES").DateTimeFormat, 0, "dC" }; @@ -270,11 +269,10 @@ public static IEnumerable GetEraName_TestData() yield return new object[] { new CultureInfo("en-US").DateTimeFormat, 1, "AD" }; yield return new object[] { new CultureInfo("es-ES").DateTimeFormat, 0, "d. C." }; yield return new object[] { new CultureInfo("es-ES").DateTimeFormat, 1, "d. C." }; - string spanishEra = PlatformDetection.IsNodeJS ? "d. C." : "d.C."; - yield return new object[] { new CultureInfo("es-419").DateTimeFormat, 0, spanishEra }; - yield return new object[] { new CultureInfo("es-419").DateTimeFormat, 1, spanishEra}; - yield return new object[] { new CultureInfo("es-MX").DateTimeFormat, 0, spanishEra }; - yield return new object[] { new CultureInfo("es-MX").DateTimeFormat, 1, spanishEra }; + yield return new object[] { new CultureInfo("es-419").DateTimeFormat, 0, "d.C." }; + yield return new object[] { new CultureInfo("es-419").DateTimeFormat, 1, "d.C."}; + yield return new object[] { new CultureInfo("es-MX").DateTimeFormat, 0, "d.C." }; + yield return new object[] { new CultureInfo("es-MX").DateTimeFormat, 1, "d.C." }; yield return new object[] { new CultureInfo("et-EE").DateTimeFormat, 0, "pKr" }; yield return new object[] { new CultureInfo("et-EE").DateTimeFormat, 1, "pKr" }; yield return new object[] { new CultureInfo("fa-IR").DateTimeFormat, 0, "ه.ش" }; // ه‍.ش. @@ -389,9 +387,8 @@ public static IEnumerable GetEraName_TestData() yield return new object[] { new CultureInfo("tr-TR").DateTimeFormat, 1, "MS" }; yield return new object[] { new CultureInfo("uk-UA").DateTimeFormat, 0, "н. е." }; yield return new object[] { new CultureInfo("uk-UA").DateTimeFormat, 1, "н. е." }; - string vietnameseEra = PlatformDetection.IsNodeJS ? "Sau CN" : "CN"; // dotnet: sau CN - yield return new object[] { new CultureInfo("vi-VN").DateTimeFormat, 0, vietnameseEra }; - yield return new object[] { new CultureInfo("vi-VN").DateTimeFormat, 1, vietnameseEra }; + yield return new object[] { new CultureInfo("vi-VN").DateTimeFormat, 0, "CN" }; // sau CN + yield return new object[] { new CultureInfo("vi-VN").DateTimeFormat, 1, "CN" }; // sau CN yield return new object[] { new CultureInfo("zh-CN").DateTimeFormat, 0, "公元" }; yield return new object[] { new CultureInfo("zh-CN").DateTimeFormat, 1, "公元" }; yield return new object[] { new CultureInfo("zh-Hans-HK").DateTimeFormat, 0, "公元" }; diff --git a/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoNativeCalendarName.cs b/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoNativeCalendarName.cs index 3d114a19cd43de..86507dc1308f11 100644 --- a/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoNativeCalendarName.cs +++ b/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoNativeCalendarName.cs @@ -11,10 +11,10 @@ public class DateTimeFormatInfoNativeCalendarName public static IEnumerable NativeCalendarName_Get_TestData_HybridGlobalization() { // see the comments on the right to check the non-Hybrid result, in this collection it always differs - string islamicName = PlatformDetection.IsNodeJS ? "UMALQURA" : "islamic-umalqura"; - string gregorianName = PlatformDetection.IsNodeJS ? "GREGORIAN" : "gregory"; - string persianName = PlatformDetection.IsNodeJS ? "PERSIAN" : "persian"; - string bhuddistName = PlatformDetection.IsNodeJS ? "THAI" : "buddhist"; + string islamicName = "islamic-umalqura"; + string gregorianName = "gregory"; + string persianName = "persian"; + string bhuddistName = "buddhist"; yield return new object[] { new CultureInfo("ar-SA").DateTimeFormat, islamicName }; // التقويم الإسلامي (أم القرى) yield return new object[] { new CultureInfo("am-ET").DateTimeFormat, gregorianName }; // የግሪጎሪያን የቀን አቆጣጠር yield return new object[] { new CultureInfo("bg-BG").DateTimeFormat, gregorianName }; // григориански календар @@ -203,7 +203,7 @@ public static IEnumerable NativeCalendarName_Get_TestData_HybridGlobal yield return new object[] { new CultureInfo("zh-HK").DateTimeFormat, gregorianName }; // 公曆 yield return new object[] { new CultureInfo("zh-TW").DateTimeFormat, gregorianName }; } - + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsHybridGlobalizationOnBrowser))] [MemberData(nameof(NativeCalendarName_Get_TestData_HybridGlobalization))] public void NativeCalendarName_Get_ReturnsExpected_HybridGlobalization(DateTimeFormatInfo format, string expected) diff --git a/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoShortDatePattern.cs b/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoShortDatePattern.cs index 815533bd1d8074..f594130a3bff2f 100644 --- a/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoShortDatePattern.cs +++ b/src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoShortDatePattern.cs @@ -44,7 +44,7 @@ public static IEnumerable ShortDatePattern_Get_TestData_HybridGlobaliz yield return new object[] { new CultureInfo("en-BZ").DateTimeFormat, "dd/MM/yyyy" }; yield return new object[] { new CultureInfo("en-CA").DateTimeFormat, "yyyy-MM-dd" }; yield return new object[] { new CultureInfo("en-CC").DateTimeFormat, "dd/MM/yyyy" }; - yield return new object[] { new CultureInfo("en-CH").DateTimeFormat, PlatformDetection.IsNodeJS ? "dd/MM/yyyy" : "dd.MM.yyyy" }; // NodeJS responds like dotnet + yield return new object[] { new CultureInfo("en-CH").DateTimeFormat, "dd.MM.yyyy" }; // "dd/MM/yyyy" yield return new object[] { new CultureInfo("en-CK").DateTimeFormat, "dd/MM/yyyy" }; yield return new object[] { new CultureInfo("en-CM").DateTimeFormat, "dd/MM/yyyy" }; yield return new object[] { new CultureInfo("en-CX").DateTimeFormat, "dd/MM/yyyy" }; @@ -138,7 +138,7 @@ public static IEnumerable ShortDatePattern_Get_TestData_HybridGlobaliz yield return new object[] { new CultureInfo("et-EE").DateTimeFormat, "dd.MM.yyyy" }; yield return new object[] { new CultureInfo("fa-IR").DateTimeFormat, "yyyy/M/d" }; // "yyyy/M/d" yield return new object[] { new CultureInfo("fi-FI").DateTimeFormat, "d.M.yyyy" }; - yield return new object[] { new CultureInfo("fil-PH").DateTimeFormat, "M/d/yyyy" }; + yield return new object[] { new CultureInfo("fil-PH").DateTimeFormat, "M/d/yyyy" }; yield return new object[] { new CultureInfo("fr-BE").DateTimeFormat, "d/MM/yyyy" }; yield return new object[] { new CultureInfo("fr-CA").DateTimeFormat, "yyyy-MM-dd" }; yield return new object[] { new CultureInfo("fr-CH").DateTimeFormat, "dd.MM.yyyy" }; diff --git a/src/libraries/System.IO.Compression.Brotli/System.IO.Compression.Brotli.sln b/src/libraries/System.IO.Compression.Brotli/System.IO.Compression.Brotli.sln index da155f774f6413..4c9b9c7bd4bcb4 100644 --- a/src/libraries/System.IO.Compression.Brotli/System.IO.Compression.Brotli.sln +++ b/src/libraries/System.IO.Compression.Brotli/System.IO.Compression.Brotli.sln @@ -19,6 +19,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{129FE4AC-D499-4900-9505-DDAE214B1FF7}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{79891BE8-C29A-4986-8228-300F7974A2B9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{45B1E687-8334-4115-A53E-FA3377829ED5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{922CA4D3-1BB8-4B59-AAB4-4D9AE9C82897}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{1830F711-3798-496D-9604-D1C24E72D7BD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{CB66C65B-965C-4B1F-9948-74AB3C87007E}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{864B86AD-4BC9-4997-8370-EC8B2055FE08}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{1BC1DCD5-DECC-4712-8539-56E6D71A17FF}" @@ -27,6 +37,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D7FE73BB-2F9 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{4F867226-2107-455D-B378-2FC08BD3F064}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{F5CDB2C5-3D4F-4052-8B52-6F5517F18F11}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{A2F25D23-BC0D-436B-B2DA-6AE556B0EE2E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{CE9B9491-BCA2-4DA3-9C1F-94DAF7511C2D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{0BBA414F-EA56-4805-A3E6-7AE68FBB574E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -73,6 +91,26 @@ Global {129FE4AC-D499-4900-9505-DDAE214B1FF7}.Debug|Any CPU.Build.0 = Debug|Any CPU {129FE4AC-D499-4900-9505-DDAE214B1FF7}.Release|Any CPU.ActiveCfg = Release|Any CPU {129FE4AC-D499-4900-9505-DDAE214B1FF7}.Release|Any CPU.Build.0 = Release|Any CPU + {79891BE8-C29A-4986-8228-300F7974A2B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {79891BE8-C29A-4986-8228-300F7974A2B9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {79891BE8-C29A-4986-8228-300F7974A2B9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {79891BE8-C29A-4986-8228-300F7974A2B9}.Release|Any CPU.Build.0 = Release|Any CPU + {45B1E687-8334-4115-A53E-FA3377829ED5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {45B1E687-8334-4115-A53E-FA3377829ED5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {45B1E687-8334-4115-A53E-FA3377829ED5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {45B1E687-8334-4115-A53E-FA3377829ED5}.Release|Any CPU.Build.0 = Release|Any CPU + {922CA4D3-1BB8-4B59-AAB4-4D9AE9C82897}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {922CA4D3-1BB8-4B59-AAB4-4D9AE9C82897}.Debug|Any CPU.Build.0 = Debug|Any CPU + {922CA4D3-1BB8-4B59-AAB4-4D9AE9C82897}.Release|Any CPU.ActiveCfg = Release|Any CPU + {922CA4D3-1BB8-4B59-AAB4-4D9AE9C82897}.Release|Any CPU.Build.0 = Release|Any CPU + {1830F711-3798-496D-9604-D1C24E72D7BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1830F711-3798-496D-9604-D1C24E72D7BD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1830F711-3798-496D-9604-D1C24E72D7BD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1830F711-3798-496D-9604-D1C24E72D7BD}.Release|Any CPU.Build.0 = Release|Any CPU + {CB66C65B-965C-4B1F-9948-74AB3C87007E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CB66C65B-965C-4B1F-9948-74AB3C87007E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CB66C65B-965C-4B1F-9948-74AB3C87007E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CB66C65B-965C-4B1F-9948-74AB3C87007E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -88,6 +126,14 @@ Global {A97A0A66-F03A-439B-A943-6F0A8DFD6029} = {4F867226-2107-455D-B378-2FC08BD3F064} {43B12013-5509-43BB-9173-2CFE43B135AA} = {4F867226-2107-455D-B378-2FC08BD3F064} {2AA8D3E7-D2E4-49E8-AE94-461CE261B1BF} = {4F867226-2107-455D-B378-2FC08BD3F064} + {79891BE8-C29A-4986-8228-300F7974A2B9} = {F5CDB2C5-3D4F-4052-8B52-6F5517F18F11} + {45B1E687-8334-4115-A53E-FA3377829ED5} = {F5CDB2C5-3D4F-4052-8B52-6F5517F18F11} + {F5CDB2C5-3D4F-4052-8B52-6F5517F18F11} = {0BBA414F-EA56-4805-A3E6-7AE68FBB574E} + {922CA4D3-1BB8-4B59-AAB4-4D9AE9C82897} = {A2F25D23-BC0D-436B-B2DA-6AE556B0EE2E} + {1830F711-3798-496D-9604-D1C24E72D7BD} = {A2F25D23-BC0D-436B-B2DA-6AE556B0EE2E} + {A2F25D23-BC0D-436B-B2DA-6AE556B0EE2E} = {0BBA414F-EA56-4805-A3E6-7AE68FBB574E} + {CB66C65B-965C-4B1F-9948-74AB3C87007E} = {CE9B9491-BCA2-4DA3-9C1F-94DAF7511C2D} + {CE9B9491-BCA2-4DA3-9C1F-94DAF7511C2D} = {0BBA414F-EA56-4805-A3E6-7AE68FBB574E} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {42B626C7-CDFD-459B-86D8-239917F86516} diff --git a/src/libraries/System.IO.Compression.ZipFile/System.IO.Compression.ZipFile.sln b/src/libraries/System.IO.Compression.ZipFile/System.IO.Compression.ZipFile.sln index 0b75ff96977da7..91bba42be1d23e 100644 --- a/src/libraries/System.IO.Compression.ZipFile/System.IO.Compression.ZipFile.sln +++ b/src/libraries/System.IO.Compression.ZipFile/System.IO.Compression.ZipFile.sln @@ -17,6 +17,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{E181A932-A6F9-4D04-B5ED-82514F484E2E}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{43762C19-7FFE-4C19-B642-099B51FEF039}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{92219B88-6903-4642-A14F-5F624CCE91C7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{DECE33E6-B36E-40CC-9234-416658EE93A3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{EE18F8EB-D4E3-40D5-B5BA-989901D0F125}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{2EBC132B-62E3-424A-8487-81E195CC9934}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{A46DB030-84B9-49C0-8F75-98FE1290EF88}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{A8BAE96C-3EAD-4E68-BBB0-A4854F386CC4}" @@ -25,6 +35,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{5C592E59-B3F EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{82C30050-0689-4C48-AA32-E7137F0417DC}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{5514616F-E12B-4057-9897-E4302DEA379B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{CAD86FBB-7A97-4FC0-8ED3-8151F040BC63}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{F5E0B219-F2C0-4FF5-8F76-5CD9E6394B01}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{7600CCE2-7817-4B76-989B-74F6AE8A46A7}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -67,6 +85,26 @@ Global {E181A932-A6F9-4D04-B5ED-82514F484E2E}.Debug|Any CPU.Build.0 = Debug|Any CPU {E181A932-A6F9-4D04-B5ED-82514F484E2E}.Release|Any CPU.ActiveCfg = Release|Any CPU {E181A932-A6F9-4D04-B5ED-82514F484E2E}.Release|Any CPU.Build.0 = Release|Any CPU + {43762C19-7FFE-4C19-B642-099B51FEF039}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {43762C19-7FFE-4C19-B642-099B51FEF039}.Debug|Any CPU.Build.0 = Debug|Any CPU + {43762C19-7FFE-4C19-B642-099B51FEF039}.Release|Any CPU.ActiveCfg = Release|Any CPU + {43762C19-7FFE-4C19-B642-099B51FEF039}.Release|Any CPU.Build.0 = Release|Any CPU + {92219B88-6903-4642-A14F-5F624CCE91C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {92219B88-6903-4642-A14F-5F624CCE91C7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {92219B88-6903-4642-A14F-5F624CCE91C7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {92219B88-6903-4642-A14F-5F624CCE91C7}.Release|Any CPU.Build.0 = Release|Any CPU + {DECE33E6-B36E-40CC-9234-416658EE93A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DECE33E6-B36E-40CC-9234-416658EE93A3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DECE33E6-B36E-40CC-9234-416658EE93A3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DECE33E6-B36E-40CC-9234-416658EE93A3}.Release|Any CPU.Build.0 = Release|Any CPU + {EE18F8EB-D4E3-40D5-B5BA-989901D0F125}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EE18F8EB-D4E3-40D5-B5BA-989901D0F125}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EE18F8EB-D4E3-40D5-B5BA-989901D0F125}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EE18F8EB-D4E3-40D5-B5BA-989901D0F125}.Release|Any CPU.Build.0 = Release|Any CPU + {2EBC132B-62E3-424A-8487-81E195CC9934}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2EBC132B-62E3-424A-8487-81E195CC9934}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2EBC132B-62E3-424A-8487-81E195CC9934}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2EBC132B-62E3-424A-8487-81E195CC9934}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -81,6 +119,14 @@ Global {96882887-EDCB-474D-95DB-D510FF90B3A1} = {82C30050-0689-4C48-AA32-E7137F0417DC} {AE18A377-AAE7-488B-A873-8463A2706BC0} = {82C30050-0689-4C48-AA32-E7137F0417DC} {5DC533A5-D0F0-488B-81C2-7AD7546528DD} = {82C30050-0689-4C48-AA32-E7137F0417DC} + {43762C19-7FFE-4C19-B642-099B51FEF039} = {5514616F-E12B-4057-9897-E4302DEA379B} + {92219B88-6903-4642-A14F-5F624CCE91C7} = {5514616F-E12B-4057-9897-E4302DEA379B} + {5514616F-E12B-4057-9897-E4302DEA379B} = {7600CCE2-7817-4B76-989B-74F6AE8A46A7} + {DECE33E6-B36E-40CC-9234-416658EE93A3} = {CAD86FBB-7A97-4FC0-8ED3-8151F040BC63} + {EE18F8EB-D4E3-40D5-B5BA-989901D0F125} = {CAD86FBB-7A97-4FC0-8ED3-8151F040BC63} + {CAD86FBB-7A97-4FC0-8ED3-8151F040BC63} = {7600CCE2-7817-4B76-989B-74F6AE8A46A7} + {2EBC132B-62E3-424A-8487-81E195CC9934} = {F5E0B219-F2C0-4FF5-8F76-5CD9E6394B01} + {F5E0B219-F2C0-4FF5-8F76-5CD9E6394B01} = {7600CCE2-7817-4B76-989B-74F6AE8A46A7} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {D2E26432-A647-4E61-9A30-DE6C62BBD632} diff --git a/src/libraries/System.IO.Compression/System.IO.Compression.sln b/src/libraries/System.IO.Compression/System.IO.Compression.sln index 3060af9b800a2e..dc980dd95d8424 100644 --- a/src/libraries/System.IO.Compression/System.IO.Compression.sln +++ b/src/libraries/System.IO.Compression/System.IO.Compression.sln @@ -17,6 +17,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{BB89CCB0-227A-480D-B6D4-91D680278211}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{A51CB0A3-A6A1-402E-B3AF-E6293EE28FB8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{FA8DBFE2-5D0E-448F-B179-9FD391F6FB5A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{B9BCBA20-C5E1-43CF-84BE-0ACA23B69CA5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{3E6E5B6B-22E9-4CCC-A476-6C59DCD321DB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{F2ACABDD-3AFC-451D-8459-204BAC5626B3}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{BB657E6F-1D06-4E7A-B4C2-B40A071A2A44}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{350F6B1E-B006-4EA5-BA9E-41F57FF84FF1}" @@ -25,6 +35,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{8541C42E-9FC EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{BA616F42-6B1E-4333-9698-C39EA13AEEA2}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{D61359E8-8A03-4D16-BC52-32FFE3D0974A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{F26573FA-11F7-4E0D-8D66-D8273C5814D6}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{29BE512B-0070-4939-8993-7B0C8B993F11}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{9118055E-B74F-4FF4-AC92-FB4AF9D54CEE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -67,6 +85,26 @@ Global {BB89CCB0-227A-480D-B6D4-91D680278211}.Debug|Any CPU.Build.0 = Debug|Any CPU {BB89CCB0-227A-480D-B6D4-91D680278211}.Release|Any CPU.ActiveCfg = Release|Any CPU {BB89CCB0-227A-480D-B6D4-91D680278211}.Release|Any CPU.Build.0 = Release|Any CPU + {A51CB0A3-A6A1-402E-B3AF-E6293EE28FB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A51CB0A3-A6A1-402E-B3AF-E6293EE28FB8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A51CB0A3-A6A1-402E-B3AF-E6293EE28FB8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A51CB0A3-A6A1-402E-B3AF-E6293EE28FB8}.Release|Any CPU.Build.0 = Release|Any CPU + {FA8DBFE2-5D0E-448F-B179-9FD391F6FB5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA8DBFE2-5D0E-448F-B179-9FD391F6FB5A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA8DBFE2-5D0E-448F-B179-9FD391F6FB5A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA8DBFE2-5D0E-448F-B179-9FD391F6FB5A}.Release|Any CPU.Build.0 = Release|Any CPU + {B9BCBA20-C5E1-43CF-84BE-0ACA23B69CA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B9BCBA20-C5E1-43CF-84BE-0ACA23B69CA5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B9BCBA20-C5E1-43CF-84BE-0ACA23B69CA5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B9BCBA20-C5E1-43CF-84BE-0ACA23B69CA5}.Release|Any CPU.Build.0 = Release|Any CPU + {3E6E5B6B-22E9-4CCC-A476-6C59DCD321DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3E6E5B6B-22E9-4CCC-A476-6C59DCD321DB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3E6E5B6B-22E9-4CCC-A476-6C59DCD321DB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3E6E5B6B-22E9-4CCC-A476-6C59DCD321DB}.Release|Any CPU.Build.0 = Release|Any CPU + {F2ACABDD-3AFC-451D-8459-204BAC5626B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F2ACABDD-3AFC-451D-8459-204BAC5626B3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F2ACABDD-3AFC-451D-8459-204BAC5626B3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F2ACABDD-3AFC-451D-8459-204BAC5626B3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -81,6 +119,14 @@ Global {6CD1A771-F838-4F58-A174-203C02644EDE} = {BA616F42-6B1E-4333-9698-C39EA13AEEA2} {77B12FDD-F00D-4EA0-A802-2A0C12D0CE96} = {BA616F42-6B1E-4333-9698-C39EA13AEEA2} {9A07A277-2896-48FC-8A20-5E290069B07D} = {BA616F42-6B1E-4333-9698-C39EA13AEEA2} + {A51CB0A3-A6A1-402E-B3AF-E6293EE28FB8} = {D61359E8-8A03-4D16-BC52-32FFE3D0974A} + {FA8DBFE2-5D0E-448F-B179-9FD391F6FB5A} = {D61359E8-8A03-4D16-BC52-32FFE3D0974A} + {D61359E8-8A03-4D16-BC52-32FFE3D0974A} = {9118055E-B74F-4FF4-AC92-FB4AF9D54CEE} + {B9BCBA20-C5E1-43CF-84BE-0ACA23B69CA5} = {F26573FA-11F7-4E0D-8D66-D8273C5814D6} + {3E6E5B6B-22E9-4CCC-A476-6C59DCD321DB} = {F26573FA-11F7-4E0D-8D66-D8273C5814D6} + {F26573FA-11F7-4E0D-8D66-D8273C5814D6} = {9118055E-B74F-4FF4-AC92-FB4AF9D54CEE} + {F2ACABDD-3AFC-451D-8459-204BAC5626B3} = {29BE512B-0070-4939-8993-7B0C8B993F11} + {29BE512B-0070-4939-8993-7B0C8B993F11} = {9118055E-B74F-4FF4-AC92-FB4AF9D54CEE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {0F6F5B24-5CE5-45F2-9169-FEBEF2A3FE80} diff --git a/src/libraries/System.IO.FileSystem.AccessControl/System.IO.FileSystem.AccessControl.sln b/src/libraries/System.IO.FileSystem.AccessControl/System.IO.FileSystem.AccessControl.sln index 55282c908d0b75..810005d6ae4252 100644 --- a/src/libraries/System.IO.FileSystem.AccessControl/System.IO.FileSystem.AccessControl.sln +++ b/src/libraries/System.IO.FileSystem.AccessControl/System.IO.FileSystem.AccessControl.sln @@ -1,6 +1,10 @@ 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", "{C08AA67B-28B8-4E38-AE15-28491454DAB7}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{18FD488A-2A3F-4B40-B65D-7108688D350F}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Drawing.Common", "..\shims\stubs\System.Drawing.Common.csproj", "{A12C0558-44E2-48FB-9075-1EB8A2D0F247}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Collections.NonGeneric", "..\System.Collections.NonGeneric\ref\System.Collections.NonGeneric.csproj", "{D5DE5382-A5FD-46FD-9EAF-02541C26586B}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.DirectoryServices", "..\System.DirectoryServices\ref\System.DirectoryServices.csproj", "{071FC282-9840-4920-B0FD-BE778449B5FF}" @@ -13,6 +17,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO.FileSystem.Access EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO.FileSystem.AccessControl.Tests", "tests\System.IO.FileSystem.AccessControl.Tests.csproj", "{9EB99AA1-EE31-41AC-B3E6-DCD7A01F17F2}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{0A653F6C-C75E-47C4-85F9-5C1013E381D7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{1D9B7442-BF5B-4AF3-A07F-F59AE99CF394}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.Uri", "..\System.Private.Uri\src\System.Private.Uri.csproj", "{19FC160B-AF59-4AF6-90F9-30411BE14BC4}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{974F81BC-FDCE-404E-B8D7-12A48E27F005}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{4E815F64-6F9A-485D-825D-930830F7EABB}" @@ -21,6 +31,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{A80974ED-DDC6-4A21-A874-F85AE729AF0E}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\src\System.Runtime.csproj", "{82D2A3A9-0784-4CFC-91E1-8A963FE22ADB}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.AccessControl", "..\System.Security.AccessControl\ref\System.Security.AccessControl.csproj", "{AC322781-E4FD-48FF-997E-D300FA0DEBEE}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Claims", "..\System.Security.Claims\ref\System.Security.Claims.csproj", "{73429869-3F3A-40B4-B06B-CC9D04ACEE65}" @@ -35,115 +47,708 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", "..\System.Windows.Extensions\src\System.Windows.Extensions.csproj", "{83F2D6C4-C3C7-4428-A0CA-577162C5DBCA}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{92BBE16A-0444-4CDD-9351-C2018859DD3A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{46DF5480-1E6D-4F0A-A93E-25833F1C598E}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{27A6AAE3-D2A8-4C35-8A90-2B8E23AD8094}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{4CF2EB1E-B815-4785-B997-3A16AA3A0277}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{C8E7D84C-DE30-4830-A2A1-8B9A48618004}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{83A69FA0-74D2-401C-B0C9-3EFD912EF037}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{293533FE-82F7-4679-912B-5A2C6E3C4B0C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{57A0D612-ABD4-4328-A51D-0D913B57D0ED}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{92BBE16A-0444-4CDD-9351-C2018859DD3A}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B25E0DAF-8162-4D76-B7A6-F7E6E59CD74A}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{27A6AAE3-D2A8-4C35-8A90-2B8E23AD8094}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{7227D008-BBBE-48D0-979B-9BC483BA7E60}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{55C6D9AC-165E-4CD8-B1CE-898F8A2040C3}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{4E47C46F-56AF-4C71-A2F6-228110B26E77}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{C6D3DFD4-8B2A-4C87-8EE4-2804B917F6E3}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{5C271349-65D8-4015-9066-ED19C527D271}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|arm = Debug|arm + Debug|arm64 = Debug|arm64 + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|arm = Release|arm + Release|arm64 = Release|arm64 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + Checked|Any CPU = Checked|Any CPU + Checked|arm = Checked|arm + Checked|arm64 = Checked|arm64 + Checked|x64 = Checked|x64 + Checked|x86 = Checked|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C08AA67B-28B8-4E38-AE15-28491454DAB7}.Debug|Any CPU.ActiveCfg = Debug|x64 + {C08AA67B-28B8-4E38-AE15-28491454DAB7}.Debug|Any CPU.Build.0 = Debug|x64 + {C08AA67B-28B8-4E38-AE15-28491454DAB7}.Debug|arm.ActiveCfg = Debug|arm + {C08AA67B-28B8-4E38-AE15-28491454DAB7}.Debug|arm.Build.0 = Debug|arm + {C08AA67B-28B8-4E38-AE15-28491454DAB7}.Debug|arm64.ActiveCfg = Debug|arm64 + {C08AA67B-28B8-4E38-AE15-28491454DAB7}.Debug|arm64.Build.0 = Debug|arm64 + {C08AA67B-28B8-4E38-AE15-28491454DAB7}.Debug|x64.ActiveCfg = Debug|x64 + {C08AA67B-28B8-4E38-AE15-28491454DAB7}.Debug|x64.Build.0 = Debug|x64 + {C08AA67B-28B8-4E38-AE15-28491454DAB7}.Debug|x86.ActiveCfg = Debug|x86 + {C08AA67B-28B8-4E38-AE15-28491454DAB7}.Debug|x86.Build.0 = Debug|x86 + {C08AA67B-28B8-4E38-AE15-28491454DAB7}.Release|Any CPU.ActiveCfg = Release|x64 + {C08AA67B-28B8-4E38-AE15-28491454DAB7}.Release|Any CPU.Build.0 = Release|x64 + {C08AA67B-28B8-4E38-AE15-28491454DAB7}.Release|arm.ActiveCfg = Release|arm + {C08AA67B-28B8-4E38-AE15-28491454DAB7}.Release|arm.Build.0 = Release|arm + {C08AA67B-28B8-4E38-AE15-28491454DAB7}.Release|arm64.ActiveCfg = Release|arm64 + {C08AA67B-28B8-4E38-AE15-28491454DAB7}.Release|arm64.Build.0 = Release|arm64 + {C08AA67B-28B8-4E38-AE15-28491454DAB7}.Release|x64.ActiveCfg = Release|x64 + {C08AA67B-28B8-4E38-AE15-28491454DAB7}.Release|x64.Build.0 = Release|x64 + {C08AA67B-28B8-4E38-AE15-28491454DAB7}.Release|x86.ActiveCfg = Release|x86 + {C08AA67B-28B8-4E38-AE15-28491454DAB7}.Release|x86.Build.0 = Release|x86 + {C08AA67B-28B8-4E38-AE15-28491454DAB7}.Checked|Any CPU.ActiveCfg = Checked|x64 + {C08AA67B-28B8-4E38-AE15-28491454DAB7}.Checked|Any CPU.Build.0 = Checked|x64 + {C08AA67B-28B8-4E38-AE15-28491454DAB7}.Checked|arm.ActiveCfg = Checked|arm + {C08AA67B-28B8-4E38-AE15-28491454DAB7}.Checked|arm.Build.0 = Checked|arm + {C08AA67B-28B8-4E38-AE15-28491454DAB7}.Checked|arm64.ActiveCfg = Checked|arm64 + {C08AA67B-28B8-4E38-AE15-28491454DAB7}.Checked|arm64.Build.0 = Checked|arm64 + {C08AA67B-28B8-4E38-AE15-28491454DAB7}.Checked|x64.ActiveCfg = Checked|x64 + {C08AA67B-28B8-4E38-AE15-28491454DAB7}.Checked|x64.Build.0 = Checked|x64 + {C08AA67B-28B8-4E38-AE15-28491454DAB7}.Checked|x86.ActiveCfg = Checked|x86 + {C08AA67B-28B8-4E38-AE15-28491454DAB7}.Checked|x86.Build.0 = Checked|x86 {18FD488A-2A3F-4B40-B65D-7108688D350F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {18FD488A-2A3F-4B40-B65D-7108688D350F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {18FD488A-2A3F-4B40-B65D-7108688D350F}.Debug|arm.ActiveCfg = Debug|Any CPU + {18FD488A-2A3F-4B40-B65D-7108688D350F}.Debug|arm64.ActiveCfg = Debug|Any CPU + {18FD488A-2A3F-4B40-B65D-7108688D350F}.Debug|x64.ActiveCfg = Debug|Any CPU + {18FD488A-2A3F-4B40-B65D-7108688D350F}.Debug|x64.Build.0 = Debug|Any CPU + {18FD488A-2A3F-4B40-B65D-7108688D350F}.Debug|x86.ActiveCfg = Debug|Any CPU + {18FD488A-2A3F-4B40-B65D-7108688D350F}.Debug|x86.Build.0 = Debug|Any CPU {18FD488A-2A3F-4B40-B65D-7108688D350F}.Release|Any CPU.ActiveCfg = Release|Any CPU {18FD488A-2A3F-4B40-B65D-7108688D350F}.Release|Any CPU.Build.0 = Release|Any CPU + {18FD488A-2A3F-4B40-B65D-7108688D350F}.Release|arm.ActiveCfg = Release|Any CPU + {18FD488A-2A3F-4B40-B65D-7108688D350F}.Release|arm64.ActiveCfg = Release|Any CPU + {18FD488A-2A3F-4B40-B65D-7108688D350F}.Release|x64.ActiveCfg = Release|Any CPU + {18FD488A-2A3F-4B40-B65D-7108688D350F}.Release|x64.Build.0 = Release|Any CPU + {18FD488A-2A3F-4B40-B65D-7108688D350F}.Release|x86.ActiveCfg = Release|Any CPU + {18FD488A-2A3F-4B40-B65D-7108688D350F}.Release|x86.Build.0 = Release|Any CPU + {18FD488A-2A3F-4B40-B65D-7108688D350F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {18FD488A-2A3F-4B40-B65D-7108688D350F}.Checked|arm.ActiveCfg = Debug|Any CPU + {18FD488A-2A3F-4B40-B65D-7108688D350F}.Checked|arm64.ActiveCfg = Debug|Any CPU + {18FD488A-2A3F-4B40-B65D-7108688D350F}.Checked|x64.ActiveCfg = Debug|Any CPU + {18FD488A-2A3F-4B40-B65D-7108688D350F}.Checked|x86.ActiveCfg = Debug|Any CPU + {A12C0558-44E2-48FB-9075-1EB8A2D0F247}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A12C0558-44E2-48FB-9075-1EB8A2D0F247}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A12C0558-44E2-48FB-9075-1EB8A2D0F247}.Debug|arm.ActiveCfg = Debug|Any CPU + {A12C0558-44E2-48FB-9075-1EB8A2D0F247}.Debug|arm64.ActiveCfg = Debug|Any CPU + {A12C0558-44E2-48FB-9075-1EB8A2D0F247}.Debug|x64.ActiveCfg = Debug|Any CPU + {A12C0558-44E2-48FB-9075-1EB8A2D0F247}.Debug|x64.Build.0 = Debug|Any CPU + {A12C0558-44E2-48FB-9075-1EB8A2D0F247}.Debug|x86.ActiveCfg = Debug|Any CPU + {A12C0558-44E2-48FB-9075-1EB8A2D0F247}.Debug|x86.Build.0 = Debug|Any CPU + {A12C0558-44E2-48FB-9075-1EB8A2D0F247}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A12C0558-44E2-48FB-9075-1EB8A2D0F247}.Release|Any CPU.Build.0 = Release|Any CPU + {A12C0558-44E2-48FB-9075-1EB8A2D0F247}.Release|arm.ActiveCfg = Release|Any CPU + {A12C0558-44E2-48FB-9075-1EB8A2D0F247}.Release|arm64.ActiveCfg = Release|Any CPU + {A12C0558-44E2-48FB-9075-1EB8A2D0F247}.Release|x64.ActiveCfg = Release|Any CPU + {A12C0558-44E2-48FB-9075-1EB8A2D0F247}.Release|x64.Build.0 = Release|Any CPU + {A12C0558-44E2-48FB-9075-1EB8A2D0F247}.Release|x86.ActiveCfg = Release|Any CPU + {A12C0558-44E2-48FB-9075-1EB8A2D0F247}.Release|x86.Build.0 = Release|Any CPU + {A12C0558-44E2-48FB-9075-1EB8A2D0F247}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {A12C0558-44E2-48FB-9075-1EB8A2D0F247}.Checked|arm.ActiveCfg = Debug|Any CPU + {A12C0558-44E2-48FB-9075-1EB8A2D0F247}.Checked|arm64.ActiveCfg = Debug|Any CPU + {A12C0558-44E2-48FB-9075-1EB8A2D0F247}.Checked|x64.ActiveCfg = Debug|Any CPU + {A12C0558-44E2-48FB-9075-1EB8A2D0F247}.Checked|x86.ActiveCfg = Debug|Any CPU {D5DE5382-A5FD-46FD-9EAF-02541C26586B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D5DE5382-A5FD-46FD-9EAF-02541C26586B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D5DE5382-A5FD-46FD-9EAF-02541C26586B}.Debug|arm.ActiveCfg = Debug|Any CPU + {D5DE5382-A5FD-46FD-9EAF-02541C26586B}.Debug|arm64.ActiveCfg = Debug|Any CPU + {D5DE5382-A5FD-46FD-9EAF-02541C26586B}.Debug|x64.ActiveCfg = Debug|Any CPU + {D5DE5382-A5FD-46FD-9EAF-02541C26586B}.Debug|x64.Build.0 = Debug|Any CPU + {D5DE5382-A5FD-46FD-9EAF-02541C26586B}.Debug|x86.ActiveCfg = Debug|Any CPU + {D5DE5382-A5FD-46FD-9EAF-02541C26586B}.Debug|x86.Build.0 = Debug|Any CPU {D5DE5382-A5FD-46FD-9EAF-02541C26586B}.Release|Any CPU.ActiveCfg = Release|Any CPU {D5DE5382-A5FD-46FD-9EAF-02541C26586B}.Release|Any CPU.Build.0 = Release|Any CPU + {D5DE5382-A5FD-46FD-9EAF-02541C26586B}.Release|arm.ActiveCfg = Release|Any CPU + {D5DE5382-A5FD-46FD-9EAF-02541C26586B}.Release|arm64.ActiveCfg = Release|Any CPU + {D5DE5382-A5FD-46FD-9EAF-02541C26586B}.Release|x64.ActiveCfg = Release|Any CPU + {D5DE5382-A5FD-46FD-9EAF-02541C26586B}.Release|x64.Build.0 = Release|Any CPU + {D5DE5382-A5FD-46FD-9EAF-02541C26586B}.Release|x86.ActiveCfg = Release|Any CPU + {D5DE5382-A5FD-46FD-9EAF-02541C26586B}.Release|x86.Build.0 = Release|Any CPU + {D5DE5382-A5FD-46FD-9EAF-02541C26586B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {D5DE5382-A5FD-46FD-9EAF-02541C26586B}.Checked|arm.ActiveCfg = Debug|Any CPU + {D5DE5382-A5FD-46FD-9EAF-02541C26586B}.Checked|arm64.ActiveCfg = Debug|Any CPU + {D5DE5382-A5FD-46FD-9EAF-02541C26586B}.Checked|x64.ActiveCfg = Debug|Any CPU + {D5DE5382-A5FD-46FD-9EAF-02541C26586B}.Checked|x86.ActiveCfg = Debug|Any CPU {071FC282-9840-4920-B0FD-BE778449B5FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {071FC282-9840-4920-B0FD-BE778449B5FF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {071FC282-9840-4920-B0FD-BE778449B5FF}.Debug|arm.ActiveCfg = Debug|Any CPU + {071FC282-9840-4920-B0FD-BE778449B5FF}.Debug|arm64.ActiveCfg = Debug|Any CPU + {071FC282-9840-4920-B0FD-BE778449B5FF}.Debug|x64.ActiveCfg = Debug|Any CPU + {071FC282-9840-4920-B0FD-BE778449B5FF}.Debug|x64.Build.0 = Debug|Any CPU + {071FC282-9840-4920-B0FD-BE778449B5FF}.Debug|x86.ActiveCfg = Debug|Any CPU + {071FC282-9840-4920-B0FD-BE778449B5FF}.Debug|x86.Build.0 = Debug|Any CPU {071FC282-9840-4920-B0FD-BE778449B5FF}.Release|Any CPU.ActiveCfg = Release|Any CPU {071FC282-9840-4920-B0FD-BE778449B5FF}.Release|Any CPU.Build.0 = Release|Any CPU + {071FC282-9840-4920-B0FD-BE778449B5FF}.Release|arm.ActiveCfg = Release|Any CPU + {071FC282-9840-4920-B0FD-BE778449B5FF}.Release|arm64.ActiveCfg = Release|Any CPU + {071FC282-9840-4920-B0FD-BE778449B5FF}.Release|x64.ActiveCfg = Release|Any CPU + {071FC282-9840-4920-B0FD-BE778449B5FF}.Release|x64.Build.0 = Release|Any CPU + {071FC282-9840-4920-B0FD-BE778449B5FF}.Release|x86.ActiveCfg = Release|Any CPU + {071FC282-9840-4920-B0FD-BE778449B5FF}.Release|x86.Build.0 = Release|Any CPU + {071FC282-9840-4920-B0FD-BE778449B5FF}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {071FC282-9840-4920-B0FD-BE778449B5FF}.Checked|arm.ActiveCfg = Debug|Any CPU + {071FC282-9840-4920-B0FD-BE778449B5FF}.Checked|arm64.ActiveCfg = Debug|Any CPU + {071FC282-9840-4920-B0FD-BE778449B5FF}.Checked|x64.ActiveCfg = Debug|Any CPU + {071FC282-9840-4920-B0FD-BE778449B5FF}.Checked|x86.ActiveCfg = Debug|Any CPU {4EF591E4-175E-494D-8191-15C2D6C6E2E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4EF591E4-175E-494D-8191-15C2D6C6E2E6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4EF591E4-175E-494D-8191-15C2D6C6E2E6}.Debug|arm.ActiveCfg = Debug|Any CPU + {4EF591E4-175E-494D-8191-15C2D6C6E2E6}.Debug|arm64.ActiveCfg = Debug|Any CPU + {4EF591E4-175E-494D-8191-15C2D6C6E2E6}.Debug|x64.ActiveCfg = Debug|Any CPU + {4EF591E4-175E-494D-8191-15C2D6C6E2E6}.Debug|x64.Build.0 = Debug|Any CPU + {4EF591E4-175E-494D-8191-15C2D6C6E2E6}.Debug|x86.ActiveCfg = Debug|Any CPU + {4EF591E4-175E-494D-8191-15C2D6C6E2E6}.Debug|x86.Build.0 = Debug|Any CPU {4EF591E4-175E-494D-8191-15C2D6C6E2E6}.Release|Any CPU.ActiveCfg = Release|Any CPU {4EF591E4-175E-494D-8191-15C2D6C6E2E6}.Release|Any CPU.Build.0 = Release|Any CPU + {4EF591E4-175E-494D-8191-15C2D6C6E2E6}.Release|arm.ActiveCfg = Release|Any CPU + {4EF591E4-175E-494D-8191-15C2D6C6E2E6}.Release|arm64.ActiveCfg = Release|Any CPU + {4EF591E4-175E-494D-8191-15C2D6C6E2E6}.Release|x64.ActiveCfg = Release|Any CPU + {4EF591E4-175E-494D-8191-15C2D6C6E2E6}.Release|x64.Build.0 = Release|Any CPU + {4EF591E4-175E-494D-8191-15C2D6C6E2E6}.Release|x86.ActiveCfg = Release|Any CPU + {4EF591E4-175E-494D-8191-15C2D6C6E2E6}.Release|x86.Build.0 = Release|Any CPU + {4EF591E4-175E-494D-8191-15C2D6C6E2E6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {4EF591E4-175E-494D-8191-15C2D6C6E2E6}.Checked|arm.ActiveCfg = Debug|Any CPU + {4EF591E4-175E-494D-8191-15C2D6C6E2E6}.Checked|arm64.ActiveCfg = Debug|Any CPU + {4EF591E4-175E-494D-8191-15C2D6C6E2E6}.Checked|x64.ActiveCfg = Debug|Any CPU + {4EF591E4-175E-494D-8191-15C2D6C6E2E6}.Checked|x86.ActiveCfg = Debug|Any CPU {D7E6A261-C80A-4E51-BCDD-85DD595866B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D7E6A261-C80A-4E51-BCDD-85DD595866B9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D7E6A261-C80A-4E51-BCDD-85DD595866B9}.Debug|arm.ActiveCfg = Debug|Any CPU + {D7E6A261-C80A-4E51-BCDD-85DD595866B9}.Debug|arm64.ActiveCfg = Debug|Any CPU + {D7E6A261-C80A-4E51-BCDD-85DD595866B9}.Debug|x64.ActiveCfg = Debug|Any CPU + {D7E6A261-C80A-4E51-BCDD-85DD595866B9}.Debug|x64.Build.0 = Debug|Any CPU + {D7E6A261-C80A-4E51-BCDD-85DD595866B9}.Debug|x86.ActiveCfg = Debug|Any CPU + {D7E6A261-C80A-4E51-BCDD-85DD595866B9}.Debug|x86.Build.0 = Debug|Any CPU {D7E6A261-C80A-4E51-BCDD-85DD595866B9}.Release|Any CPU.ActiveCfg = Release|Any CPU {D7E6A261-C80A-4E51-BCDD-85DD595866B9}.Release|Any CPU.Build.0 = Release|Any CPU + {D7E6A261-C80A-4E51-BCDD-85DD595866B9}.Release|arm.ActiveCfg = Release|Any CPU + {D7E6A261-C80A-4E51-BCDD-85DD595866B9}.Release|arm64.ActiveCfg = Release|Any CPU + {D7E6A261-C80A-4E51-BCDD-85DD595866B9}.Release|x64.ActiveCfg = Release|Any CPU + {D7E6A261-C80A-4E51-BCDD-85DD595866B9}.Release|x64.Build.0 = Release|Any CPU + {D7E6A261-C80A-4E51-BCDD-85DD595866B9}.Release|x86.ActiveCfg = Release|Any CPU + {D7E6A261-C80A-4E51-BCDD-85DD595866B9}.Release|x86.Build.0 = Release|Any CPU + {D7E6A261-C80A-4E51-BCDD-85DD595866B9}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {D7E6A261-C80A-4E51-BCDD-85DD595866B9}.Checked|arm.ActiveCfg = Debug|Any CPU + {D7E6A261-C80A-4E51-BCDD-85DD595866B9}.Checked|arm64.ActiveCfg = Debug|Any CPU + {D7E6A261-C80A-4E51-BCDD-85DD595866B9}.Checked|x64.ActiveCfg = Debug|Any CPU + {D7E6A261-C80A-4E51-BCDD-85DD595866B9}.Checked|x86.ActiveCfg = Debug|Any CPU {35D57A83-8A9D-4531-BF0D-EA1BCA62D475}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {35D57A83-8A9D-4531-BF0D-EA1BCA62D475}.Debug|Any CPU.Build.0 = Debug|Any CPU + {35D57A83-8A9D-4531-BF0D-EA1BCA62D475}.Debug|arm.ActiveCfg = Debug|Any CPU + {35D57A83-8A9D-4531-BF0D-EA1BCA62D475}.Debug|arm64.ActiveCfg = Debug|Any CPU + {35D57A83-8A9D-4531-BF0D-EA1BCA62D475}.Debug|x64.ActiveCfg = Debug|Any CPU + {35D57A83-8A9D-4531-BF0D-EA1BCA62D475}.Debug|x64.Build.0 = Debug|Any CPU + {35D57A83-8A9D-4531-BF0D-EA1BCA62D475}.Debug|x86.ActiveCfg = Debug|Any CPU + {35D57A83-8A9D-4531-BF0D-EA1BCA62D475}.Debug|x86.Build.0 = Debug|Any CPU {35D57A83-8A9D-4531-BF0D-EA1BCA62D475}.Release|Any CPU.ActiveCfg = Release|Any CPU {35D57A83-8A9D-4531-BF0D-EA1BCA62D475}.Release|Any CPU.Build.0 = Release|Any CPU + {35D57A83-8A9D-4531-BF0D-EA1BCA62D475}.Release|arm.ActiveCfg = Release|Any CPU + {35D57A83-8A9D-4531-BF0D-EA1BCA62D475}.Release|arm64.ActiveCfg = Release|Any CPU + {35D57A83-8A9D-4531-BF0D-EA1BCA62D475}.Release|x64.ActiveCfg = Release|Any CPU + {35D57A83-8A9D-4531-BF0D-EA1BCA62D475}.Release|x64.Build.0 = Release|Any CPU + {35D57A83-8A9D-4531-BF0D-EA1BCA62D475}.Release|x86.ActiveCfg = Release|Any CPU + {35D57A83-8A9D-4531-BF0D-EA1BCA62D475}.Release|x86.Build.0 = Release|Any CPU + {35D57A83-8A9D-4531-BF0D-EA1BCA62D475}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {35D57A83-8A9D-4531-BF0D-EA1BCA62D475}.Checked|arm.ActiveCfg = Debug|Any CPU + {35D57A83-8A9D-4531-BF0D-EA1BCA62D475}.Checked|arm64.ActiveCfg = Debug|Any CPU + {35D57A83-8A9D-4531-BF0D-EA1BCA62D475}.Checked|x64.ActiveCfg = Debug|Any CPU + {35D57A83-8A9D-4531-BF0D-EA1BCA62D475}.Checked|x86.ActiveCfg = Debug|Any CPU {9EB99AA1-EE31-41AC-B3E6-DCD7A01F17F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9EB99AA1-EE31-41AC-B3E6-DCD7A01F17F2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9EB99AA1-EE31-41AC-B3E6-DCD7A01F17F2}.Debug|arm.ActiveCfg = Debug|Any CPU + {9EB99AA1-EE31-41AC-B3E6-DCD7A01F17F2}.Debug|arm64.ActiveCfg = Debug|Any CPU + {9EB99AA1-EE31-41AC-B3E6-DCD7A01F17F2}.Debug|x64.ActiveCfg = Debug|Any CPU + {9EB99AA1-EE31-41AC-B3E6-DCD7A01F17F2}.Debug|x64.Build.0 = Debug|Any CPU + {9EB99AA1-EE31-41AC-B3E6-DCD7A01F17F2}.Debug|x86.ActiveCfg = Debug|Any CPU + {9EB99AA1-EE31-41AC-B3E6-DCD7A01F17F2}.Debug|x86.Build.0 = Debug|Any CPU {9EB99AA1-EE31-41AC-B3E6-DCD7A01F17F2}.Release|Any CPU.ActiveCfg = Release|Any CPU {9EB99AA1-EE31-41AC-B3E6-DCD7A01F17F2}.Release|Any CPU.Build.0 = Release|Any CPU + {9EB99AA1-EE31-41AC-B3E6-DCD7A01F17F2}.Release|arm.ActiveCfg = Release|Any CPU + {9EB99AA1-EE31-41AC-B3E6-DCD7A01F17F2}.Release|arm64.ActiveCfg = Release|Any CPU + {9EB99AA1-EE31-41AC-B3E6-DCD7A01F17F2}.Release|x64.ActiveCfg = Release|Any CPU + {9EB99AA1-EE31-41AC-B3E6-DCD7A01F17F2}.Release|x64.Build.0 = Release|Any CPU + {9EB99AA1-EE31-41AC-B3E6-DCD7A01F17F2}.Release|x86.ActiveCfg = Release|Any CPU + {9EB99AA1-EE31-41AC-B3E6-DCD7A01F17F2}.Release|x86.Build.0 = Release|Any CPU + {9EB99AA1-EE31-41AC-B3E6-DCD7A01F17F2}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {9EB99AA1-EE31-41AC-B3E6-DCD7A01F17F2}.Checked|arm.ActiveCfg = Debug|Any CPU + {9EB99AA1-EE31-41AC-B3E6-DCD7A01F17F2}.Checked|arm64.ActiveCfg = Debug|Any CPU + {9EB99AA1-EE31-41AC-B3E6-DCD7A01F17F2}.Checked|x64.ActiveCfg = Debug|Any CPU + {9EB99AA1-EE31-41AC-B3E6-DCD7A01F17F2}.Checked|x86.ActiveCfg = Debug|Any CPU + {0A653F6C-C75E-47C4-85F9-5C1013E381D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0A653F6C-C75E-47C4-85F9-5C1013E381D7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0A653F6C-C75E-47C4-85F9-5C1013E381D7}.Debug|arm.ActiveCfg = Debug|Any CPU + {0A653F6C-C75E-47C4-85F9-5C1013E381D7}.Debug|arm64.ActiveCfg = Debug|Any CPU + {0A653F6C-C75E-47C4-85F9-5C1013E381D7}.Debug|x64.ActiveCfg = Debug|Any CPU + {0A653F6C-C75E-47C4-85F9-5C1013E381D7}.Debug|x64.Build.0 = Debug|Any CPU + {0A653F6C-C75E-47C4-85F9-5C1013E381D7}.Debug|x86.ActiveCfg = Debug|Any CPU + {0A653F6C-C75E-47C4-85F9-5C1013E381D7}.Debug|x86.Build.0 = Debug|Any CPU + {0A653F6C-C75E-47C4-85F9-5C1013E381D7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0A653F6C-C75E-47C4-85F9-5C1013E381D7}.Release|Any CPU.Build.0 = Release|Any CPU + {0A653F6C-C75E-47C4-85F9-5C1013E381D7}.Release|arm.ActiveCfg = Release|Any CPU + {0A653F6C-C75E-47C4-85F9-5C1013E381D7}.Release|arm64.ActiveCfg = Release|Any CPU + {0A653F6C-C75E-47C4-85F9-5C1013E381D7}.Release|x64.ActiveCfg = Release|Any CPU + {0A653F6C-C75E-47C4-85F9-5C1013E381D7}.Release|x64.Build.0 = Release|Any CPU + {0A653F6C-C75E-47C4-85F9-5C1013E381D7}.Release|x86.ActiveCfg = Release|Any CPU + {0A653F6C-C75E-47C4-85F9-5C1013E381D7}.Release|x86.Build.0 = Release|Any CPU + {0A653F6C-C75E-47C4-85F9-5C1013E381D7}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {0A653F6C-C75E-47C4-85F9-5C1013E381D7}.Checked|arm.ActiveCfg = Debug|Any CPU + {0A653F6C-C75E-47C4-85F9-5C1013E381D7}.Checked|arm64.ActiveCfg = Debug|Any CPU + {0A653F6C-C75E-47C4-85F9-5C1013E381D7}.Checked|x64.ActiveCfg = Debug|Any CPU + {0A653F6C-C75E-47C4-85F9-5C1013E381D7}.Checked|x86.ActiveCfg = Debug|Any CPU + {1D9B7442-BF5B-4AF3-A07F-F59AE99CF394}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1D9B7442-BF5B-4AF3-A07F-F59AE99CF394}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1D9B7442-BF5B-4AF3-A07F-F59AE99CF394}.Debug|arm.ActiveCfg = Debug|Any CPU + {1D9B7442-BF5B-4AF3-A07F-F59AE99CF394}.Debug|arm64.ActiveCfg = Debug|Any CPU + {1D9B7442-BF5B-4AF3-A07F-F59AE99CF394}.Debug|x64.ActiveCfg = Debug|Any CPU + {1D9B7442-BF5B-4AF3-A07F-F59AE99CF394}.Debug|x64.Build.0 = Debug|Any CPU + {1D9B7442-BF5B-4AF3-A07F-F59AE99CF394}.Debug|x86.ActiveCfg = Debug|Any CPU + {1D9B7442-BF5B-4AF3-A07F-F59AE99CF394}.Debug|x86.Build.0 = Debug|Any CPU + {1D9B7442-BF5B-4AF3-A07F-F59AE99CF394}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1D9B7442-BF5B-4AF3-A07F-F59AE99CF394}.Release|Any CPU.Build.0 = Release|Any CPU + {1D9B7442-BF5B-4AF3-A07F-F59AE99CF394}.Release|arm.ActiveCfg = Release|Any CPU + {1D9B7442-BF5B-4AF3-A07F-F59AE99CF394}.Release|arm64.ActiveCfg = Release|Any CPU + {1D9B7442-BF5B-4AF3-A07F-F59AE99CF394}.Release|x64.ActiveCfg = Release|Any CPU + {1D9B7442-BF5B-4AF3-A07F-F59AE99CF394}.Release|x64.Build.0 = Release|Any CPU + {1D9B7442-BF5B-4AF3-A07F-F59AE99CF394}.Release|x86.ActiveCfg = Release|Any CPU + {1D9B7442-BF5B-4AF3-A07F-F59AE99CF394}.Release|x86.Build.0 = Release|Any CPU + {1D9B7442-BF5B-4AF3-A07F-F59AE99CF394}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {1D9B7442-BF5B-4AF3-A07F-F59AE99CF394}.Checked|arm.ActiveCfg = Debug|Any CPU + {1D9B7442-BF5B-4AF3-A07F-F59AE99CF394}.Checked|arm64.ActiveCfg = Debug|Any CPU + {1D9B7442-BF5B-4AF3-A07F-F59AE99CF394}.Checked|x64.ActiveCfg = Debug|Any CPU + {1D9B7442-BF5B-4AF3-A07F-F59AE99CF394}.Checked|x86.ActiveCfg = Debug|Any CPU + {19FC160B-AF59-4AF6-90F9-30411BE14BC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {19FC160B-AF59-4AF6-90F9-30411BE14BC4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {19FC160B-AF59-4AF6-90F9-30411BE14BC4}.Debug|arm.ActiveCfg = Debug|Any CPU + {19FC160B-AF59-4AF6-90F9-30411BE14BC4}.Debug|arm64.ActiveCfg = Debug|Any CPU + {19FC160B-AF59-4AF6-90F9-30411BE14BC4}.Debug|x64.ActiveCfg = Debug|Any CPU + {19FC160B-AF59-4AF6-90F9-30411BE14BC4}.Debug|x64.Build.0 = Debug|Any CPU + {19FC160B-AF59-4AF6-90F9-30411BE14BC4}.Debug|x86.ActiveCfg = Debug|Any CPU + {19FC160B-AF59-4AF6-90F9-30411BE14BC4}.Debug|x86.Build.0 = Debug|Any CPU + {19FC160B-AF59-4AF6-90F9-30411BE14BC4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {19FC160B-AF59-4AF6-90F9-30411BE14BC4}.Release|Any CPU.Build.0 = Release|Any CPU + {19FC160B-AF59-4AF6-90F9-30411BE14BC4}.Release|arm.ActiveCfg = Release|Any CPU + {19FC160B-AF59-4AF6-90F9-30411BE14BC4}.Release|arm64.ActiveCfg = Release|Any CPU + {19FC160B-AF59-4AF6-90F9-30411BE14BC4}.Release|x64.ActiveCfg = Release|Any CPU + {19FC160B-AF59-4AF6-90F9-30411BE14BC4}.Release|x64.Build.0 = Release|Any CPU + {19FC160B-AF59-4AF6-90F9-30411BE14BC4}.Release|x86.ActiveCfg = Release|Any CPU + {19FC160B-AF59-4AF6-90F9-30411BE14BC4}.Release|x86.Build.0 = Release|Any CPU + {19FC160B-AF59-4AF6-90F9-30411BE14BC4}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {19FC160B-AF59-4AF6-90F9-30411BE14BC4}.Checked|arm.ActiveCfg = Debug|Any CPU + {19FC160B-AF59-4AF6-90F9-30411BE14BC4}.Checked|arm64.ActiveCfg = Debug|Any CPU + {19FC160B-AF59-4AF6-90F9-30411BE14BC4}.Checked|x64.ActiveCfg = Debug|Any CPU + {19FC160B-AF59-4AF6-90F9-30411BE14BC4}.Checked|x86.ActiveCfg = Debug|Any CPU {974F81BC-FDCE-404E-B8D7-12A48E27F005}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {974F81BC-FDCE-404E-B8D7-12A48E27F005}.Debug|Any CPU.Build.0 = Debug|Any CPU + {974F81BC-FDCE-404E-B8D7-12A48E27F005}.Debug|arm.ActiveCfg = Debug|Any CPU + {974F81BC-FDCE-404E-B8D7-12A48E27F005}.Debug|arm64.ActiveCfg = Debug|Any CPU + {974F81BC-FDCE-404E-B8D7-12A48E27F005}.Debug|x64.ActiveCfg = Debug|Any CPU + {974F81BC-FDCE-404E-B8D7-12A48E27F005}.Debug|x64.Build.0 = Debug|Any CPU + {974F81BC-FDCE-404E-B8D7-12A48E27F005}.Debug|x86.ActiveCfg = Debug|Any CPU + {974F81BC-FDCE-404E-B8D7-12A48E27F005}.Debug|x86.Build.0 = Debug|Any CPU {974F81BC-FDCE-404E-B8D7-12A48E27F005}.Release|Any CPU.ActiveCfg = Release|Any CPU {974F81BC-FDCE-404E-B8D7-12A48E27F005}.Release|Any CPU.Build.0 = Release|Any CPU + {974F81BC-FDCE-404E-B8D7-12A48E27F005}.Release|arm.ActiveCfg = Release|Any CPU + {974F81BC-FDCE-404E-B8D7-12A48E27F005}.Release|arm64.ActiveCfg = Release|Any CPU + {974F81BC-FDCE-404E-B8D7-12A48E27F005}.Release|x64.ActiveCfg = Release|Any CPU + {974F81BC-FDCE-404E-B8D7-12A48E27F005}.Release|x64.Build.0 = Release|Any CPU + {974F81BC-FDCE-404E-B8D7-12A48E27F005}.Release|x86.ActiveCfg = Release|Any CPU + {974F81BC-FDCE-404E-B8D7-12A48E27F005}.Release|x86.Build.0 = Release|Any CPU + {974F81BC-FDCE-404E-B8D7-12A48E27F005}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {974F81BC-FDCE-404E-B8D7-12A48E27F005}.Checked|arm.ActiveCfg = Debug|Any CPU + {974F81BC-FDCE-404E-B8D7-12A48E27F005}.Checked|arm64.ActiveCfg = Debug|Any CPU + {974F81BC-FDCE-404E-B8D7-12A48E27F005}.Checked|x64.ActiveCfg = Debug|Any CPU + {974F81BC-FDCE-404E-B8D7-12A48E27F005}.Checked|x86.ActiveCfg = Debug|Any CPU {4E815F64-6F9A-485D-825D-930830F7EABB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4E815F64-6F9A-485D-825D-930830F7EABB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4E815F64-6F9A-485D-825D-930830F7EABB}.Debug|arm.ActiveCfg = Debug|Any CPU + {4E815F64-6F9A-485D-825D-930830F7EABB}.Debug|arm64.ActiveCfg = Debug|Any CPU + {4E815F64-6F9A-485D-825D-930830F7EABB}.Debug|x64.ActiveCfg = Debug|Any CPU + {4E815F64-6F9A-485D-825D-930830F7EABB}.Debug|x64.Build.0 = Debug|Any CPU + {4E815F64-6F9A-485D-825D-930830F7EABB}.Debug|x86.ActiveCfg = Debug|Any CPU + {4E815F64-6F9A-485D-825D-930830F7EABB}.Debug|x86.Build.0 = Debug|Any CPU {4E815F64-6F9A-485D-825D-930830F7EABB}.Release|Any CPU.ActiveCfg = Release|Any CPU {4E815F64-6F9A-485D-825D-930830F7EABB}.Release|Any CPU.Build.0 = Release|Any CPU + {4E815F64-6F9A-485D-825D-930830F7EABB}.Release|arm.ActiveCfg = Release|Any CPU + {4E815F64-6F9A-485D-825D-930830F7EABB}.Release|arm64.ActiveCfg = Release|Any CPU + {4E815F64-6F9A-485D-825D-930830F7EABB}.Release|x64.ActiveCfg = Release|Any CPU + {4E815F64-6F9A-485D-825D-930830F7EABB}.Release|x64.Build.0 = Release|Any CPU + {4E815F64-6F9A-485D-825D-930830F7EABB}.Release|x86.ActiveCfg = Release|Any CPU + {4E815F64-6F9A-485D-825D-930830F7EABB}.Release|x86.Build.0 = Release|Any CPU + {4E815F64-6F9A-485D-825D-930830F7EABB}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {4E815F64-6F9A-485D-825D-930830F7EABB}.Checked|arm.ActiveCfg = Debug|Any CPU + {4E815F64-6F9A-485D-825D-930830F7EABB}.Checked|arm64.ActiveCfg = Debug|Any CPU + {4E815F64-6F9A-485D-825D-930830F7EABB}.Checked|x64.ActiveCfg = Debug|Any CPU + {4E815F64-6F9A-485D-825D-930830F7EABB}.Checked|x86.ActiveCfg = Debug|Any CPU {E939A1C0-31C6-4EA6-9020-ADDE06272528}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E939A1C0-31C6-4EA6-9020-ADDE06272528}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E939A1C0-31C6-4EA6-9020-ADDE06272528}.Debug|arm.ActiveCfg = Debug|Any CPU + {E939A1C0-31C6-4EA6-9020-ADDE06272528}.Debug|arm64.ActiveCfg = Debug|Any CPU + {E939A1C0-31C6-4EA6-9020-ADDE06272528}.Debug|x64.ActiveCfg = Debug|Any CPU + {E939A1C0-31C6-4EA6-9020-ADDE06272528}.Debug|x64.Build.0 = Debug|Any CPU + {E939A1C0-31C6-4EA6-9020-ADDE06272528}.Debug|x86.ActiveCfg = Debug|Any CPU + {E939A1C0-31C6-4EA6-9020-ADDE06272528}.Debug|x86.Build.0 = Debug|Any CPU {E939A1C0-31C6-4EA6-9020-ADDE06272528}.Release|Any CPU.ActiveCfg = Release|Any CPU {E939A1C0-31C6-4EA6-9020-ADDE06272528}.Release|Any CPU.Build.0 = Release|Any CPU + {E939A1C0-31C6-4EA6-9020-ADDE06272528}.Release|arm.ActiveCfg = Release|Any CPU + {E939A1C0-31C6-4EA6-9020-ADDE06272528}.Release|arm64.ActiveCfg = Release|Any CPU + {E939A1C0-31C6-4EA6-9020-ADDE06272528}.Release|x64.ActiveCfg = Release|Any CPU + {E939A1C0-31C6-4EA6-9020-ADDE06272528}.Release|x64.Build.0 = Release|Any CPU + {E939A1C0-31C6-4EA6-9020-ADDE06272528}.Release|x86.ActiveCfg = Release|Any CPU + {E939A1C0-31C6-4EA6-9020-ADDE06272528}.Release|x86.Build.0 = Release|Any CPU + {E939A1C0-31C6-4EA6-9020-ADDE06272528}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {E939A1C0-31C6-4EA6-9020-ADDE06272528}.Checked|arm.ActiveCfg = Debug|Any CPU + {E939A1C0-31C6-4EA6-9020-ADDE06272528}.Checked|arm64.ActiveCfg = Debug|Any CPU + {E939A1C0-31C6-4EA6-9020-ADDE06272528}.Checked|x64.ActiveCfg = Debug|Any CPU + {E939A1C0-31C6-4EA6-9020-ADDE06272528}.Checked|x86.ActiveCfg = Debug|Any CPU {A80974ED-DDC6-4A21-A874-F85AE729AF0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A80974ED-DDC6-4A21-A874-F85AE729AF0E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A80974ED-DDC6-4A21-A874-F85AE729AF0E}.Debug|arm.ActiveCfg = Debug|Any CPU + {A80974ED-DDC6-4A21-A874-F85AE729AF0E}.Debug|arm64.ActiveCfg = Debug|Any CPU + {A80974ED-DDC6-4A21-A874-F85AE729AF0E}.Debug|x64.ActiveCfg = Debug|Any CPU + {A80974ED-DDC6-4A21-A874-F85AE729AF0E}.Debug|x64.Build.0 = Debug|Any CPU + {A80974ED-DDC6-4A21-A874-F85AE729AF0E}.Debug|x86.ActiveCfg = Debug|Any CPU + {A80974ED-DDC6-4A21-A874-F85AE729AF0E}.Debug|x86.Build.0 = Debug|Any CPU {A80974ED-DDC6-4A21-A874-F85AE729AF0E}.Release|Any CPU.ActiveCfg = Release|Any CPU {A80974ED-DDC6-4A21-A874-F85AE729AF0E}.Release|Any CPU.Build.0 = Release|Any CPU + {A80974ED-DDC6-4A21-A874-F85AE729AF0E}.Release|arm.ActiveCfg = Release|Any CPU + {A80974ED-DDC6-4A21-A874-F85AE729AF0E}.Release|arm64.ActiveCfg = Release|Any CPU + {A80974ED-DDC6-4A21-A874-F85AE729AF0E}.Release|x64.ActiveCfg = Release|Any CPU + {A80974ED-DDC6-4A21-A874-F85AE729AF0E}.Release|x64.Build.0 = Release|Any CPU + {A80974ED-DDC6-4A21-A874-F85AE729AF0E}.Release|x86.ActiveCfg = Release|Any CPU + {A80974ED-DDC6-4A21-A874-F85AE729AF0E}.Release|x86.Build.0 = Release|Any CPU + {A80974ED-DDC6-4A21-A874-F85AE729AF0E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {A80974ED-DDC6-4A21-A874-F85AE729AF0E}.Checked|arm.ActiveCfg = Debug|Any CPU + {A80974ED-DDC6-4A21-A874-F85AE729AF0E}.Checked|arm64.ActiveCfg = Debug|Any CPU + {A80974ED-DDC6-4A21-A874-F85AE729AF0E}.Checked|x64.ActiveCfg = Debug|Any CPU + {A80974ED-DDC6-4A21-A874-F85AE729AF0E}.Checked|x86.ActiveCfg = Debug|Any CPU + {82D2A3A9-0784-4CFC-91E1-8A963FE22ADB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {82D2A3A9-0784-4CFC-91E1-8A963FE22ADB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {82D2A3A9-0784-4CFC-91E1-8A963FE22ADB}.Debug|arm.ActiveCfg = Debug|Any CPU + {82D2A3A9-0784-4CFC-91E1-8A963FE22ADB}.Debug|arm64.ActiveCfg = Debug|Any CPU + {82D2A3A9-0784-4CFC-91E1-8A963FE22ADB}.Debug|x64.ActiveCfg = Debug|Any CPU + {82D2A3A9-0784-4CFC-91E1-8A963FE22ADB}.Debug|x64.Build.0 = Debug|Any CPU + {82D2A3A9-0784-4CFC-91E1-8A963FE22ADB}.Debug|x86.ActiveCfg = Debug|Any CPU + {82D2A3A9-0784-4CFC-91E1-8A963FE22ADB}.Debug|x86.Build.0 = Debug|Any CPU + {82D2A3A9-0784-4CFC-91E1-8A963FE22ADB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {82D2A3A9-0784-4CFC-91E1-8A963FE22ADB}.Release|Any CPU.Build.0 = Release|Any CPU + {82D2A3A9-0784-4CFC-91E1-8A963FE22ADB}.Release|arm.ActiveCfg = Release|Any CPU + {82D2A3A9-0784-4CFC-91E1-8A963FE22ADB}.Release|arm64.ActiveCfg = Release|Any CPU + {82D2A3A9-0784-4CFC-91E1-8A963FE22ADB}.Release|x64.ActiveCfg = Release|Any CPU + {82D2A3A9-0784-4CFC-91E1-8A963FE22ADB}.Release|x64.Build.0 = Release|Any CPU + {82D2A3A9-0784-4CFC-91E1-8A963FE22ADB}.Release|x86.ActiveCfg = Release|Any CPU + {82D2A3A9-0784-4CFC-91E1-8A963FE22ADB}.Release|x86.Build.0 = Release|Any CPU + {82D2A3A9-0784-4CFC-91E1-8A963FE22ADB}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {82D2A3A9-0784-4CFC-91E1-8A963FE22ADB}.Checked|arm.ActiveCfg = Debug|Any CPU + {82D2A3A9-0784-4CFC-91E1-8A963FE22ADB}.Checked|arm64.ActiveCfg = Debug|Any CPU + {82D2A3A9-0784-4CFC-91E1-8A963FE22ADB}.Checked|x64.ActiveCfg = Debug|Any CPU + {82D2A3A9-0784-4CFC-91E1-8A963FE22ADB}.Checked|x86.ActiveCfg = Debug|Any CPU {AC322781-E4FD-48FF-997E-D300FA0DEBEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AC322781-E4FD-48FF-997E-D300FA0DEBEE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AC322781-E4FD-48FF-997E-D300FA0DEBEE}.Debug|arm.ActiveCfg = Debug|Any CPU + {AC322781-E4FD-48FF-997E-D300FA0DEBEE}.Debug|arm64.ActiveCfg = Debug|Any CPU + {AC322781-E4FD-48FF-997E-D300FA0DEBEE}.Debug|x64.ActiveCfg = Debug|Any CPU + {AC322781-E4FD-48FF-997E-D300FA0DEBEE}.Debug|x64.Build.0 = Debug|Any CPU + {AC322781-E4FD-48FF-997E-D300FA0DEBEE}.Debug|x86.ActiveCfg = Debug|Any CPU + {AC322781-E4FD-48FF-997E-D300FA0DEBEE}.Debug|x86.Build.0 = Debug|Any CPU {AC322781-E4FD-48FF-997E-D300FA0DEBEE}.Release|Any CPU.ActiveCfg = Release|Any CPU {AC322781-E4FD-48FF-997E-D300FA0DEBEE}.Release|Any CPU.Build.0 = Release|Any CPU + {AC322781-E4FD-48FF-997E-D300FA0DEBEE}.Release|arm.ActiveCfg = Release|Any CPU + {AC322781-E4FD-48FF-997E-D300FA0DEBEE}.Release|arm64.ActiveCfg = Release|Any CPU + {AC322781-E4FD-48FF-997E-D300FA0DEBEE}.Release|x64.ActiveCfg = Release|Any CPU + {AC322781-E4FD-48FF-997E-D300FA0DEBEE}.Release|x64.Build.0 = Release|Any CPU + {AC322781-E4FD-48FF-997E-D300FA0DEBEE}.Release|x86.ActiveCfg = Release|Any CPU + {AC322781-E4FD-48FF-997E-D300FA0DEBEE}.Release|x86.Build.0 = Release|Any CPU + {AC322781-E4FD-48FF-997E-D300FA0DEBEE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {AC322781-E4FD-48FF-997E-D300FA0DEBEE}.Checked|arm.ActiveCfg = Debug|Any CPU + {AC322781-E4FD-48FF-997E-D300FA0DEBEE}.Checked|arm64.ActiveCfg = Debug|Any CPU + {AC322781-E4FD-48FF-997E-D300FA0DEBEE}.Checked|x64.ActiveCfg = Debug|Any CPU + {AC322781-E4FD-48FF-997E-D300FA0DEBEE}.Checked|x86.ActiveCfg = Debug|Any CPU {73429869-3F3A-40B4-B06B-CC9D04ACEE65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {73429869-3F3A-40B4-B06B-CC9D04ACEE65}.Debug|Any CPU.Build.0 = Debug|Any CPU + {73429869-3F3A-40B4-B06B-CC9D04ACEE65}.Debug|arm.ActiveCfg = Debug|Any CPU + {73429869-3F3A-40B4-B06B-CC9D04ACEE65}.Debug|arm64.ActiveCfg = Debug|Any CPU + {73429869-3F3A-40B4-B06B-CC9D04ACEE65}.Debug|x64.ActiveCfg = Debug|Any CPU + {73429869-3F3A-40B4-B06B-CC9D04ACEE65}.Debug|x64.Build.0 = Debug|Any CPU + {73429869-3F3A-40B4-B06B-CC9D04ACEE65}.Debug|x86.ActiveCfg = Debug|Any CPU + {73429869-3F3A-40B4-B06B-CC9D04ACEE65}.Debug|x86.Build.0 = Debug|Any CPU {73429869-3F3A-40B4-B06B-CC9D04ACEE65}.Release|Any CPU.ActiveCfg = Release|Any CPU {73429869-3F3A-40B4-B06B-CC9D04ACEE65}.Release|Any CPU.Build.0 = Release|Any CPU + {73429869-3F3A-40B4-B06B-CC9D04ACEE65}.Release|arm.ActiveCfg = Release|Any CPU + {73429869-3F3A-40B4-B06B-CC9D04ACEE65}.Release|arm64.ActiveCfg = Release|Any CPU + {73429869-3F3A-40B4-B06B-CC9D04ACEE65}.Release|x64.ActiveCfg = Release|Any CPU + {73429869-3F3A-40B4-B06B-CC9D04ACEE65}.Release|x64.Build.0 = Release|Any CPU + {73429869-3F3A-40B4-B06B-CC9D04ACEE65}.Release|x86.ActiveCfg = Release|Any CPU + {73429869-3F3A-40B4-B06B-CC9D04ACEE65}.Release|x86.Build.0 = Release|Any CPU + {73429869-3F3A-40B4-B06B-CC9D04ACEE65}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {73429869-3F3A-40B4-B06B-CC9D04ACEE65}.Checked|arm.ActiveCfg = Debug|Any CPU + {73429869-3F3A-40B4-B06B-CC9D04ACEE65}.Checked|arm64.ActiveCfg = Debug|Any CPU + {73429869-3F3A-40B4-B06B-CC9D04ACEE65}.Checked|x64.ActiveCfg = Debug|Any CPU + {73429869-3F3A-40B4-B06B-CC9D04ACEE65}.Checked|x86.ActiveCfg = Debug|Any CPU {37F8ED93-FD45-4941-B83E-84D278B8EA83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {37F8ED93-FD45-4941-B83E-84D278B8EA83}.Debug|Any CPU.Build.0 = Debug|Any CPU + {37F8ED93-FD45-4941-B83E-84D278B8EA83}.Debug|arm.ActiveCfg = Debug|Any CPU + {37F8ED93-FD45-4941-B83E-84D278B8EA83}.Debug|arm64.ActiveCfg = Debug|Any CPU + {37F8ED93-FD45-4941-B83E-84D278B8EA83}.Debug|x64.ActiveCfg = Debug|Any CPU + {37F8ED93-FD45-4941-B83E-84D278B8EA83}.Debug|x64.Build.0 = Debug|Any CPU + {37F8ED93-FD45-4941-B83E-84D278B8EA83}.Debug|x86.ActiveCfg = Debug|Any CPU + {37F8ED93-FD45-4941-B83E-84D278B8EA83}.Debug|x86.Build.0 = Debug|Any CPU {37F8ED93-FD45-4941-B83E-84D278B8EA83}.Release|Any CPU.ActiveCfg = Release|Any CPU {37F8ED93-FD45-4941-B83E-84D278B8EA83}.Release|Any CPU.Build.0 = Release|Any CPU + {37F8ED93-FD45-4941-B83E-84D278B8EA83}.Release|arm.ActiveCfg = Release|Any CPU + {37F8ED93-FD45-4941-B83E-84D278B8EA83}.Release|arm64.ActiveCfg = Release|Any CPU + {37F8ED93-FD45-4941-B83E-84D278B8EA83}.Release|x64.ActiveCfg = Release|Any CPU + {37F8ED93-FD45-4941-B83E-84D278B8EA83}.Release|x64.Build.0 = Release|Any CPU + {37F8ED93-FD45-4941-B83E-84D278B8EA83}.Release|x86.ActiveCfg = Release|Any CPU + {37F8ED93-FD45-4941-B83E-84D278B8EA83}.Release|x86.Build.0 = Release|Any CPU + {37F8ED93-FD45-4941-B83E-84D278B8EA83}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {37F8ED93-FD45-4941-B83E-84D278B8EA83}.Checked|arm.ActiveCfg = Debug|Any CPU + {37F8ED93-FD45-4941-B83E-84D278B8EA83}.Checked|arm64.ActiveCfg = Debug|Any CPU + {37F8ED93-FD45-4941-B83E-84D278B8EA83}.Checked|x64.ActiveCfg = Debug|Any CPU + {37F8ED93-FD45-4941-B83E-84D278B8EA83}.Checked|x86.ActiveCfg = Debug|Any CPU {87E03C4D-FFE2-43AD-9CFE-BB67A2448186}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {87E03C4D-FFE2-43AD-9CFE-BB67A2448186}.Debug|Any CPU.Build.0 = Debug|Any CPU + {87E03C4D-FFE2-43AD-9CFE-BB67A2448186}.Debug|arm.ActiveCfg = Debug|Any CPU + {87E03C4D-FFE2-43AD-9CFE-BB67A2448186}.Debug|arm64.ActiveCfg = Debug|Any CPU + {87E03C4D-FFE2-43AD-9CFE-BB67A2448186}.Debug|x64.ActiveCfg = Debug|Any CPU + {87E03C4D-FFE2-43AD-9CFE-BB67A2448186}.Debug|x64.Build.0 = Debug|Any CPU + {87E03C4D-FFE2-43AD-9CFE-BB67A2448186}.Debug|x86.ActiveCfg = Debug|Any CPU + {87E03C4D-FFE2-43AD-9CFE-BB67A2448186}.Debug|x86.Build.0 = Debug|Any CPU {87E03C4D-FFE2-43AD-9CFE-BB67A2448186}.Release|Any CPU.ActiveCfg = Release|Any CPU {87E03C4D-FFE2-43AD-9CFE-BB67A2448186}.Release|Any CPU.Build.0 = Release|Any CPU + {87E03C4D-FFE2-43AD-9CFE-BB67A2448186}.Release|arm.ActiveCfg = Release|Any CPU + {87E03C4D-FFE2-43AD-9CFE-BB67A2448186}.Release|arm64.ActiveCfg = Release|Any CPU + {87E03C4D-FFE2-43AD-9CFE-BB67A2448186}.Release|x64.ActiveCfg = Release|Any CPU + {87E03C4D-FFE2-43AD-9CFE-BB67A2448186}.Release|x64.Build.0 = Release|Any CPU + {87E03C4D-FFE2-43AD-9CFE-BB67A2448186}.Release|x86.ActiveCfg = Release|Any CPU + {87E03C4D-FFE2-43AD-9CFE-BB67A2448186}.Release|x86.Build.0 = Release|Any CPU + {87E03C4D-FFE2-43AD-9CFE-BB67A2448186}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {87E03C4D-FFE2-43AD-9CFE-BB67A2448186}.Checked|arm.ActiveCfg = Debug|Any CPU + {87E03C4D-FFE2-43AD-9CFE-BB67A2448186}.Checked|arm64.ActiveCfg = Debug|Any CPU + {87E03C4D-FFE2-43AD-9CFE-BB67A2448186}.Checked|x64.ActiveCfg = Debug|Any CPU + {87E03C4D-FFE2-43AD-9CFE-BB67A2448186}.Checked|x86.ActiveCfg = Debug|Any CPU {831E2BC5-C753-4CDD-B81D-699CEDA9F0A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {831E2BC5-C753-4CDD-B81D-699CEDA9F0A7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {831E2BC5-C753-4CDD-B81D-699CEDA9F0A7}.Debug|arm.ActiveCfg = Debug|Any CPU + {831E2BC5-C753-4CDD-B81D-699CEDA9F0A7}.Debug|arm64.ActiveCfg = Debug|Any CPU + {831E2BC5-C753-4CDD-B81D-699CEDA9F0A7}.Debug|x64.ActiveCfg = Debug|Any CPU + {831E2BC5-C753-4CDD-B81D-699CEDA9F0A7}.Debug|x64.Build.0 = Debug|Any CPU + {831E2BC5-C753-4CDD-B81D-699CEDA9F0A7}.Debug|x86.ActiveCfg = Debug|Any CPU + {831E2BC5-C753-4CDD-B81D-699CEDA9F0A7}.Debug|x86.Build.0 = Debug|Any CPU {831E2BC5-C753-4CDD-B81D-699CEDA9F0A7}.Release|Any CPU.ActiveCfg = Release|Any CPU {831E2BC5-C753-4CDD-B81D-699CEDA9F0A7}.Release|Any CPU.Build.0 = Release|Any CPU + {831E2BC5-C753-4CDD-B81D-699CEDA9F0A7}.Release|arm.ActiveCfg = Release|Any CPU + {831E2BC5-C753-4CDD-B81D-699CEDA9F0A7}.Release|arm64.ActiveCfg = Release|Any CPU + {831E2BC5-C753-4CDD-B81D-699CEDA9F0A7}.Release|x64.ActiveCfg = Release|Any CPU + {831E2BC5-C753-4CDD-B81D-699CEDA9F0A7}.Release|x64.Build.0 = Release|Any CPU + {831E2BC5-C753-4CDD-B81D-699CEDA9F0A7}.Release|x86.ActiveCfg = Release|Any CPU + {831E2BC5-C753-4CDD-B81D-699CEDA9F0A7}.Release|x86.Build.0 = Release|Any CPU + {831E2BC5-C753-4CDD-B81D-699CEDA9F0A7}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {831E2BC5-C753-4CDD-B81D-699CEDA9F0A7}.Checked|arm.ActiveCfg = Debug|Any CPU + {831E2BC5-C753-4CDD-B81D-699CEDA9F0A7}.Checked|arm64.ActiveCfg = Debug|Any CPU + {831E2BC5-C753-4CDD-B81D-699CEDA9F0A7}.Checked|x64.ActiveCfg = Debug|Any CPU + {831E2BC5-C753-4CDD-B81D-699CEDA9F0A7}.Checked|x86.ActiveCfg = Debug|Any CPU {F33F1171-273A-4BC3-B138-25E5E7118186}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F33F1171-273A-4BC3-B138-25E5E7118186}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F33F1171-273A-4BC3-B138-25E5E7118186}.Debug|arm.ActiveCfg = Debug|Any CPU + {F33F1171-273A-4BC3-B138-25E5E7118186}.Debug|arm64.ActiveCfg = Debug|Any CPU + {F33F1171-273A-4BC3-B138-25E5E7118186}.Debug|x64.ActiveCfg = Debug|Any CPU + {F33F1171-273A-4BC3-B138-25E5E7118186}.Debug|x64.Build.0 = Debug|Any CPU + {F33F1171-273A-4BC3-B138-25E5E7118186}.Debug|x86.ActiveCfg = Debug|Any CPU + {F33F1171-273A-4BC3-B138-25E5E7118186}.Debug|x86.Build.0 = Debug|Any CPU {F33F1171-273A-4BC3-B138-25E5E7118186}.Release|Any CPU.ActiveCfg = Release|Any CPU {F33F1171-273A-4BC3-B138-25E5E7118186}.Release|Any CPU.Build.0 = Release|Any CPU + {F33F1171-273A-4BC3-B138-25E5E7118186}.Release|arm.ActiveCfg = Release|Any CPU + {F33F1171-273A-4BC3-B138-25E5E7118186}.Release|arm64.ActiveCfg = Release|Any CPU + {F33F1171-273A-4BC3-B138-25E5E7118186}.Release|x64.ActiveCfg = Release|Any CPU + {F33F1171-273A-4BC3-B138-25E5E7118186}.Release|x64.Build.0 = Release|Any CPU + {F33F1171-273A-4BC3-B138-25E5E7118186}.Release|x86.ActiveCfg = Release|Any CPU + {F33F1171-273A-4BC3-B138-25E5E7118186}.Release|x86.Build.0 = Release|Any CPU + {F33F1171-273A-4BC3-B138-25E5E7118186}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {F33F1171-273A-4BC3-B138-25E5E7118186}.Checked|arm.ActiveCfg = Debug|Any CPU + {F33F1171-273A-4BC3-B138-25E5E7118186}.Checked|arm64.ActiveCfg = Debug|Any CPU + {F33F1171-273A-4BC3-B138-25E5E7118186}.Checked|x64.ActiveCfg = Debug|Any CPU + {F33F1171-273A-4BC3-B138-25E5E7118186}.Checked|x86.ActiveCfg = Debug|Any CPU {83F2D6C4-C3C7-4428-A0CA-577162C5DBCA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {83F2D6C4-C3C7-4428-A0CA-577162C5DBCA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {83F2D6C4-C3C7-4428-A0CA-577162C5DBCA}.Debug|arm.ActiveCfg = Debug|Any CPU + {83F2D6C4-C3C7-4428-A0CA-577162C5DBCA}.Debug|arm64.ActiveCfg = Debug|Any CPU + {83F2D6C4-C3C7-4428-A0CA-577162C5DBCA}.Debug|x64.ActiveCfg = Debug|Any CPU + {83F2D6C4-C3C7-4428-A0CA-577162C5DBCA}.Debug|x64.Build.0 = Debug|Any CPU + {83F2D6C4-C3C7-4428-A0CA-577162C5DBCA}.Debug|x86.ActiveCfg = Debug|Any CPU + {83F2D6C4-C3C7-4428-A0CA-577162C5DBCA}.Debug|x86.Build.0 = Debug|Any CPU {83F2D6C4-C3C7-4428-A0CA-577162C5DBCA}.Release|Any CPU.ActiveCfg = Release|Any CPU {83F2D6C4-C3C7-4428-A0CA-577162C5DBCA}.Release|Any CPU.Build.0 = Release|Any CPU + {83F2D6C4-C3C7-4428-A0CA-577162C5DBCA}.Release|arm.ActiveCfg = Release|Any CPU + {83F2D6C4-C3C7-4428-A0CA-577162C5DBCA}.Release|arm64.ActiveCfg = Release|Any CPU + {83F2D6C4-C3C7-4428-A0CA-577162C5DBCA}.Release|x64.ActiveCfg = Release|Any CPU + {83F2D6C4-C3C7-4428-A0CA-577162C5DBCA}.Release|x64.Build.0 = Release|Any CPU + {83F2D6C4-C3C7-4428-A0CA-577162C5DBCA}.Release|x86.ActiveCfg = Release|Any CPU + {83F2D6C4-C3C7-4428-A0CA-577162C5DBCA}.Release|x86.Build.0 = Release|Any CPU + {83F2D6C4-C3C7-4428-A0CA-577162C5DBCA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {83F2D6C4-C3C7-4428-A0CA-577162C5DBCA}.Checked|arm.ActiveCfg = Debug|Any CPU + {83F2D6C4-C3C7-4428-A0CA-577162C5DBCA}.Checked|arm64.ActiveCfg = Debug|Any CPU + {83F2D6C4-C3C7-4428-A0CA-577162C5DBCA}.Checked|x64.ActiveCfg = Debug|Any CPU + {83F2D6C4-C3C7-4428-A0CA-577162C5DBCA}.Checked|x86.ActiveCfg = Debug|Any CPU + {46DF5480-1E6D-4F0A-A93E-25833F1C598E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {46DF5480-1E6D-4F0A-A93E-25833F1C598E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {46DF5480-1E6D-4F0A-A93E-25833F1C598E}.Debug|arm.ActiveCfg = Debug|Any CPU + {46DF5480-1E6D-4F0A-A93E-25833F1C598E}.Debug|arm64.ActiveCfg = Debug|Any CPU + {46DF5480-1E6D-4F0A-A93E-25833F1C598E}.Debug|x64.ActiveCfg = Debug|Any CPU + {46DF5480-1E6D-4F0A-A93E-25833F1C598E}.Debug|x64.Build.0 = Debug|Any CPU + {46DF5480-1E6D-4F0A-A93E-25833F1C598E}.Debug|x86.ActiveCfg = Debug|Any CPU + {46DF5480-1E6D-4F0A-A93E-25833F1C598E}.Debug|x86.Build.0 = Debug|Any CPU + {46DF5480-1E6D-4F0A-A93E-25833F1C598E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {46DF5480-1E6D-4F0A-A93E-25833F1C598E}.Release|Any CPU.Build.0 = Release|Any CPU + {46DF5480-1E6D-4F0A-A93E-25833F1C598E}.Release|arm.ActiveCfg = Release|Any CPU + {46DF5480-1E6D-4F0A-A93E-25833F1C598E}.Release|arm64.ActiveCfg = Release|Any CPU + {46DF5480-1E6D-4F0A-A93E-25833F1C598E}.Release|x64.ActiveCfg = Release|Any CPU + {46DF5480-1E6D-4F0A-A93E-25833F1C598E}.Release|x64.Build.0 = Release|Any CPU + {46DF5480-1E6D-4F0A-A93E-25833F1C598E}.Release|x86.ActiveCfg = Release|Any CPU + {46DF5480-1E6D-4F0A-A93E-25833F1C598E}.Release|x86.Build.0 = Release|Any CPU + {46DF5480-1E6D-4F0A-A93E-25833F1C598E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {46DF5480-1E6D-4F0A-A93E-25833F1C598E}.Checked|arm.ActiveCfg = Debug|Any CPU + {46DF5480-1E6D-4F0A-A93E-25833F1C598E}.Checked|arm64.ActiveCfg = Debug|Any CPU + {46DF5480-1E6D-4F0A-A93E-25833F1C598E}.Checked|x64.ActiveCfg = Debug|Any CPU + {46DF5480-1E6D-4F0A-A93E-25833F1C598E}.Checked|x86.ActiveCfg = Debug|Any CPU + {4CF2EB1E-B815-4785-B997-3A16AA3A0277}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4CF2EB1E-B815-4785-B997-3A16AA3A0277}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4CF2EB1E-B815-4785-B997-3A16AA3A0277}.Debug|arm.ActiveCfg = Debug|Any CPU + {4CF2EB1E-B815-4785-B997-3A16AA3A0277}.Debug|arm64.ActiveCfg = Debug|Any CPU + {4CF2EB1E-B815-4785-B997-3A16AA3A0277}.Debug|x64.ActiveCfg = Debug|Any CPU + {4CF2EB1E-B815-4785-B997-3A16AA3A0277}.Debug|x64.Build.0 = Debug|Any CPU + {4CF2EB1E-B815-4785-B997-3A16AA3A0277}.Debug|x86.ActiveCfg = Debug|Any CPU + {4CF2EB1E-B815-4785-B997-3A16AA3A0277}.Debug|x86.Build.0 = Debug|Any CPU + {4CF2EB1E-B815-4785-B997-3A16AA3A0277}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4CF2EB1E-B815-4785-B997-3A16AA3A0277}.Release|Any CPU.Build.0 = Release|Any CPU + {4CF2EB1E-B815-4785-B997-3A16AA3A0277}.Release|arm.ActiveCfg = Release|Any CPU + {4CF2EB1E-B815-4785-B997-3A16AA3A0277}.Release|arm64.ActiveCfg = Release|Any CPU + {4CF2EB1E-B815-4785-B997-3A16AA3A0277}.Release|x64.ActiveCfg = Release|Any CPU + {4CF2EB1E-B815-4785-B997-3A16AA3A0277}.Release|x64.Build.0 = Release|Any CPU + {4CF2EB1E-B815-4785-B997-3A16AA3A0277}.Release|x86.ActiveCfg = Release|Any CPU + {4CF2EB1E-B815-4785-B997-3A16AA3A0277}.Release|x86.Build.0 = Release|Any CPU + {4CF2EB1E-B815-4785-B997-3A16AA3A0277}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {4CF2EB1E-B815-4785-B997-3A16AA3A0277}.Checked|arm.ActiveCfg = Debug|Any CPU + {4CF2EB1E-B815-4785-B997-3A16AA3A0277}.Checked|arm64.ActiveCfg = Debug|Any CPU + {4CF2EB1E-B815-4785-B997-3A16AA3A0277}.Checked|x64.ActiveCfg = Debug|Any CPU + {4CF2EB1E-B815-4785-B997-3A16AA3A0277}.Checked|x86.ActiveCfg = Debug|Any CPU + {C8E7D84C-DE30-4830-A2A1-8B9A48618004}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C8E7D84C-DE30-4830-A2A1-8B9A48618004}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C8E7D84C-DE30-4830-A2A1-8B9A48618004}.Debug|arm.ActiveCfg = Debug|Any CPU + {C8E7D84C-DE30-4830-A2A1-8B9A48618004}.Debug|arm64.ActiveCfg = Debug|Any CPU + {C8E7D84C-DE30-4830-A2A1-8B9A48618004}.Debug|x64.ActiveCfg = Debug|Any CPU + {C8E7D84C-DE30-4830-A2A1-8B9A48618004}.Debug|x64.Build.0 = Debug|Any CPU + {C8E7D84C-DE30-4830-A2A1-8B9A48618004}.Debug|x86.ActiveCfg = Debug|Any CPU + {C8E7D84C-DE30-4830-A2A1-8B9A48618004}.Debug|x86.Build.0 = Debug|Any CPU + {C8E7D84C-DE30-4830-A2A1-8B9A48618004}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C8E7D84C-DE30-4830-A2A1-8B9A48618004}.Release|Any CPU.Build.0 = Release|Any CPU + {C8E7D84C-DE30-4830-A2A1-8B9A48618004}.Release|arm.ActiveCfg = Release|Any CPU + {C8E7D84C-DE30-4830-A2A1-8B9A48618004}.Release|arm64.ActiveCfg = Release|Any CPU + {C8E7D84C-DE30-4830-A2A1-8B9A48618004}.Release|x64.ActiveCfg = Release|Any CPU + {C8E7D84C-DE30-4830-A2A1-8B9A48618004}.Release|x64.Build.0 = Release|Any CPU + {C8E7D84C-DE30-4830-A2A1-8B9A48618004}.Release|x86.ActiveCfg = Release|Any CPU + {C8E7D84C-DE30-4830-A2A1-8B9A48618004}.Release|x86.Build.0 = Release|Any CPU + {C8E7D84C-DE30-4830-A2A1-8B9A48618004}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {C8E7D84C-DE30-4830-A2A1-8B9A48618004}.Checked|arm.ActiveCfg = Debug|Any CPU + {C8E7D84C-DE30-4830-A2A1-8B9A48618004}.Checked|arm64.ActiveCfg = Debug|Any CPU + {C8E7D84C-DE30-4830-A2A1-8B9A48618004}.Checked|x64.ActiveCfg = Debug|Any CPU + {C8E7D84C-DE30-4830-A2A1-8B9A48618004}.Checked|x86.ActiveCfg = Debug|Any CPU + {83A69FA0-74D2-401C-B0C9-3EFD912EF037}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {83A69FA0-74D2-401C-B0C9-3EFD912EF037}.Debug|Any CPU.Build.0 = Debug|Any CPU + {83A69FA0-74D2-401C-B0C9-3EFD912EF037}.Debug|arm.ActiveCfg = Debug|Any CPU + {83A69FA0-74D2-401C-B0C9-3EFD912EF037}.Debug|arm64.ActiveCfg = Debug|Any CPU + {83A69FA0-74D2-401C-B0C9-3EFD912EF037}.Debug|x64.ActiveCfg = Debug|Any CPU + {83A69FA0-74D2-401C-B0C9-3EFD912EF037}.Debug|x64.Build.0 = Debug|Any CPU + {83A69FA0-74D2-401C-B0C9-3EFD912EF037}.Debug|x86.ActiveCfg = Debug|Any CPU + {83A69FA0-74D2-401C-B0C9-3EFD912EF037}.Debug|x86.Build.0 = Debug|Any CPU + {83A69FA0-74D2-401C-B0C9-3EFD912EF037}.Release|Any CPU.ActiveCfg = Release|Any CPU + {83A69FA0-74D2-401C-B0C9-3EFD912EF037}.Release|Any CPU.Build.0 = Release|Any CPU + {83A69FA0-74D2-401C-B0C9-3EFD912EF037}.Release|arm.ActiveCfg = Release|Any CPU + {83A69FA0-74D2-401C-B0C9-3EFD912EF037}.Release|arm64.ActiveCfg = Release|Any CPU + {83A69FA0-74D2-401C-B0C9-3EFD912EF037}.Release|x64.ActiveCfg = Release|Any CPU + {83A69FA0-74D2-401C-B0C9-3EFD912EF037}.Release|x64.Build.0 = Release|Any CPU + {83A69FA0-74D2-401C-B0C9-3EFD912EF037}.Release|x86.ActiveCfg = Release|Any CPU + {83A69FA0-74D2-401C-B0C9-3EFD912EF037}.Release|x86.Build.0 = Release|Any CPU + {83A69FA0-74D2-401C-B0C9-3EFD912EF037}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {83A69FA0-74D2-401C-B0C9-3EFD912EF037}.Checked|arm.ActiveCfg = Debug|Any CPU + {83A69FA0-74D2-401C-B0C9-3EFD912EF037}.Checked|arm64.ActiveCfg = Debug|Any CPU + {83A69FA0-74D2-401C-B0C9-3EFD912EF037}.Checked|x64.ActiveCfg = Debug|Any CPU + {83A69FA0-74D2-401C-B0C9-3EFD912EF037}.Checked|x86.ActiveCfg = Debug|Any CPU + {293533FE-82F7-4679-912B-5A2C6E3C4B0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {293533FE-82F7-4679-912B-5A2C6E3C4B0C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {293533FE-82F7-4679-912B-5A2C6E3C4B0C}.Debug|arm.ActiveCfg = Debug|Any CPU + {293533FE-82F7-4679-912B-5A2C6E3C4B0C}.Debug|arm64.ActiveCfg = Debug|Any CPU + {293533FE-82F7-4679-912B-5A2C6E3C4B0C}.Debug|x64.ActiveCfg = Debug|Any CPU + {293533FE-82F7-4679-912B-5A2C6E3C4B0C}.Debug|x64.Build.0 = Debug|Any CPU + {293533FE-82F7-4679-912B-5A2C6E3C4B0C}.Debug|x86.ActiveCfg = Debug|Any CPU + {293533FE-82F7-4679-912B-5A2C6E3C4B0C}.Debug|x86.Build.0 = Debug|Any CPU + {293533FE-82F7-4679-912B-5A2C6E3C4B0C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {293533FE-82F7-4679-912B-5A2C6E3C4B0C}.Release|Any CPU.Build.0 = Release|Any CPU + {293533FE-82F7-4679-912B-5A2C6E3C4B0C}.Release|arm.ActiveCfg = Release|Any CPU + {293533FE-82F7-4679-912B-5A2C6E3C4B0C}.Release|arm64.ActiveCfg = Release|Any CPU + {293533FE-82F7-4679-912B-5A2C6E3C4B0C}.Release|x64.ActiveCfg = Release|Any CPU + {293533FE-82F7-4679-912B-5A2C6E3C4B0C}.Release|x64.Build.0 = Release|Any CPU + {293533FE-82F7-4679-912B-5A2C6E3C4B0C}.Release|x86.ActiveCfg = Release|Any CPU + {293533FE-82F7-4679-912B-5A2C6E3C4B0C}.Release|x86.Build.0 = Release|Any CPU + {293533FE-82F7-4679-912B-5A2C6E3C4B0C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {293533FE-82F7-4679-912B-5A2C6E3C4B0C}.Checked|arm.ActiveCfg = Debug|Any CPU + {293533FE-82F7-4679-912B-5A2C6E3C4B0C}.Checked|arm64.ActiveCfg = Debug|Any CPU + {293533FE-82F7-4679-912B-5A2C6E3C4B0C}.Checked|x64.ActiveCfg = Debug|Any CPU + {293533FE-82F7-4679-912B-5A2C6E3C4B0C}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution + {C08AA67B-28B8-4E38-AE15-28491454DAB7} = {57A0D612-ABD4-4328-A51D-0D913B57D0ED} {18FD488A-2A3F-4B40-B65D-7108688D350F} = {92BBE16A-0444-4CDD-9351-C2018859DD3A} {9EB99AA1-EE31-41AC-B3E6-DCD7A01F17F2} = {92BBE16A-0444-4CDD-9351-C2018859DD3A} + {A12C0558-44E2-48FB-9075-1EB8A2D0F247} = {B25E0DAF-8162-4D76-B7A6-F7E6E59CD74A} + {4EF591E4-175E-494D-8191-15C2D6C6E2E6} = {B25E0DAF-8162-4D76-B7A6-F7E6E59CD74A} + {35D57A83-8A9D-4531-BF0D-EA1BCA62D475} = {B25E0DAF-8162-4D76-B7A6-F7E6E59CD74A} + {19FC160B-AF59-4AF6-90F9-30411BE14BC4} = {B25E0DAF-8162-4D76-B7A6-F7E6E59CD74A} + {82D2A3A9-0784-4CFC-91E1-8A963FE22ADB} = {B25E0DAF-8162-4D76-B7A6-F7E6E59CD74A} + {87E03C4D-FFE2-43AD-9CFE-BB67A2448186} = {B25E0DAF-8162-4D76-B7A6-F7E6E59CD74A} + {83F2D6C4-C3C7-4428-A0CA-577162C5DBCA} = {B25E0DAF-8162-4D76-B7A6-F7E6E59CD74A} {D5DE5382-A5FD-46FD-9EAF-02541C26586B} = {27A6AAE3-D2A8-4C35-8A90-2B8E23AD8094} {071FC282-9840-4920-B0FD-BE778449B5FF} = {27A6AAE3-D2A8-4C35-8A90-2B8E23AD8094} {D7E6A261-C80A-4E51-BCDD-85DD595866B9} = {27A6AAE3-D2A8-4C35-8A90-2B8E23AD8094} + {1D9B7442-BF5B-4AF3-A07F-F59AE99CF394} = {27A6AAE3-D2A8-4C35-8A90-2B8E23AD8094} {A80974ED-DDC6-4A21-A874-F85AE729AF0E} = {27A6AAE3-D2A8-4C35-8A90-2B8E23AD8094} {AC322781-E4FD-48FF-997E-D300FA0DEBEE} = {27A6AAE3-D2A8-4C35-8A90-2B8E23AD8094} {73429869-3F3A-40B4-B06B-CC9D04ACEE65} = {27A6AAE3-D2A8-4C35-8A90-2B8E23AD8094} {37F8ED93-FD45-4941-B83E-84D278B8EA83} = {27A6AAE3-D2A8-4C35-8A90-2B8E23AD8094} {831E2BC5-C753-4CDD-B81D-699CEDA9F0A7} = {27A6AAE3-D2A8-4C35-8A90-2B8E23AD8094} {F33F1171-273A-4BC3-B138-25E5E7118186} = {27A6AAE3-D2A8-4C35-8A90-2B8E23AD8094} - {4EF591E4-175E-494D-8191-15C2D6C6E2E6} = {B25E0DAF-8162-4D76-B7A6-F7E6E59CD74A} - {35D57A83-8A9D-4531-BF0D-EA1BCA62D475} = {B25E0DAF-8162-4D76-B7A6-F7E6E59CD74A} - {87E03C4D-FFE2-43AD-9CFE-BB67A2448186} = {B25E0DAF-8162-4D76-B7A6-F7E6E59CD74A} - {83F2D6C4-C3C7-4428-A0CA-577162C5DBCA} = {B25E0DAF-8162-4D76-B7A6-F7E6E59CD74A} + {0A653F6C-C75E-47C4-85F9-5C1013E381D7} = {7227D008-BBBE-48D0-979B-9BC483BA7E60} {974F81BC-FDCE-404E-B8D7-12A48E27F005} = {7227D008-BBBE-48D0-979B-9BC483BA7E60} {4E815F64-6F9A-485D-825D-930830F7EABB} = {7227D008-BBBE-48D0-979B-9BC483BA7E60} {E939A1C0-31C6-4EA6-9020-ADDE06272528} = {7227D008-BBBE-48D0-979B-9BC483BA7E60} + {46DF5480-1E6D-4F0A-A93E-25833F1C598E} = {55C6D9AC-165E-4CD8-B1CE-898F8A2040C3} + {4CF2EB1E-B815-4785-B997-3A16AA3A0277} = {55C6D9AC-165E-4CD8-B1CE-898F8A2040C3} + {55C6D9AC-165E-4CD8-B1CE-898F8A2040C3} = {5C271349-65D8-4015-9066-ED19C527D271} + {C8E7D84C-DE30-4830-A2A1-8B9A48618004} = {4E47C46F-56AF-4C71-A2F6-228110B26E77} + {83A69FA0-74D2-401C-B0C9-3EFD912EF037} = {4E47C46F-56AF-4C71-A2F6-228110B26E77} + {4E47C46F-56AF-4C71-A2F6-228110B26E77} = {5C271349-65D8-4015-9066-ED19C527D271} + {293533FE-82F7-4679-912B-5A2C6E3C4B0C} = {C6D3DFD4-8B2A-4C87-8EE4-2804B917F6E3} + {C6D3DFD4-8B2A-4C87-8EE4-2804B917F6E3} = {5C271349-65D8-4015-9066-ED19C527D271} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {246C2EDA-448E-4E76-B97A-BD93DC6883A7} diff --git a/src/libraries/System.IO.FileSystem.DriveInfo/System.IO.FileSystem.DriveInfo.sln b/src/libraries/System.IO.FileSystem.DriveInfo/System.IO.FileSystem.DriveInfo.sln index 4c811453778d7b..21280f2adf0fcb 100644 --- a/src/libraries/System.IO.FileSystem.DriveInfo/System.IO.FileSystem.DriveInfo.sln +++ b/src/libraries/System.IO.FileSystem.DriveInfo/System.IO.FileSystem.DriveInfo.sln @@ -15,6 +15,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{C84193AC-A010-4A92-9B72-4F8C75CF7389}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{C0BEFD2A-1FF5-4EA5-8E9D-02CD6D5205E2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{2427104F-BB50-4BCE-AE28-78B699C27F97}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{06A14BC2-B5F8-4E67-A86F-09329A81307A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{E6344D1B-0137-4856-8CE0-13B2F95214CA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{0BFF5AFC-3D7D-4706-85BC-6F786F53C5F7}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{F74D982D-DFE5-48DA-87C0-245FC612F118}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{4626E870-1F74-4ED4-AF80-DDDD42DEF47E}" @@ -23,6 +33,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{F20F7286-4DF EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{9BFF66A7-7077-4C69-BAB7-5FE6E2D9DBBC}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{B939865D-DC8A-4B55-91C7-DA3F2DDD2252}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{0189DC86-1BAD-40A8-BC84-1187937C2DD4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{CCE645B1-5A02-4EDD-983D-365761F08F41}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{69FBE846-BC0C-4B1B-AA8A-D3275D33DBBB}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -61,6 +79,26 @@ Global {C84193AC-A010-4A92-9B72-4F8C75CF7389}.Debug|Any CPU.Build.0 = Debug|Any CPU {C84193AC-A010-4A92-9B72-4F8C75CF7389}.Release|Any CPU.ActiveCfg = Release|Any CPU {C84193AC-A010-4A92-9B72-4F8C75CF7389}.Release|Any CPU.Build.0 = Release|Any CPU + {C0BEFD2A-1FF5-4EA5-8E9D-02CD6D5205E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C0BEFD2A-1FF5-4EA5-8E9D-02CD6D5205E2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C0BEFD2A-1FF5-4EA5-8E9D-02CD6D5205E2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C0BEFD2A-1FF5-4EA5-8E9D-02CD6D5205E2}.Release|Any CPU.Build.0 = Release|Any CPU + {2427104F-BB50-4BCE-AE28-78B699C27F97}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2427104F-BB50-4BCE-AE28-78B699C27F97}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2427104F-BB50-4BCE-AE28-78B699C27F97}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2427104F-BB50-4BCE-AE28-78B699C27F97}.Release|Any CPU.Build.0 = Release|Any CPU + {06A14BC2-B5F8-4E67-A86F-09329A81307A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {06A14BC2-B5F8-4E67-A86F-09329A81307A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {06A14BC2-B5F8-4E67-A86F-09329A81307A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {06A14BC2-B5F8-4E67-A86F-09329A81307A}.Release|Any CPU.Build.0 = Release|Any CPU + {E6344D1B-0137-4856-8CE0-13B2F95214CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E6344D1B-0137-4856-8CE0-13B2F95214CA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E6344D1B-0137-4856-8CE0-13B2F95214CA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E6344D1B-0137-4856-8CE0-13B2F95214CA}.Release|Any CPU.Build.0 = Release|Any CPU + {0BFF5AFC-3D7D-4706-85BC-6F786F53C5F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0BFF5AFC-3D7D-4706-85BC-6F786F53C5F7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0BFF5AFC-3D7D-4706-85BC-6F786F53C5F7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0BFF5AFC-3D7D-4706-85BC-6F786F53C5F7}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -74,6 +112,14 @@ Global {08499DD2-78CA-48DD-A58A-90DEC1958826} = {9BFF66A7-7077-4C69-BAB7-5FE6E2D9DBBC} {FBEEAA13-A404-4BB5-AE41-098F2D9B4E15} = {9BFF66A7-7077-4C69-BAB7-5FE6E2D9DBBC} {B9E98144-5561-4CED-BC68-93021B390983} = {9BFF66A7-7077-4C69-BAB7-5FE6E2D9DBBC} + {C0BEFD2A-1FF5-4EA5-8E9D-02CD6D5205E2} = {B939865D-DC8A-4B55-91C7-DA3F2DDD2252} + {2427104F-BB50-4BCE-AE28-78B699C27F97} = {B939865D-DC8A-4B55-91C7-DA3F2DDD2252} + {B939865D-DC8A-4B55-91C7-DA3F2DDD2252} = {69FBE846-BC0C-4B1B-AA8A-D3275D33DBBB} + {06A14BC2-B5F8-4E67-A86F-09329A81307A} = {0189DC86-1BAD-40A8-BC84-1187937C2DD4} + {E6344D1B-0137-4856-8CE0-13B2F95214CA} = {0189DC86-1BAD-40A8-BC84-1187937C2DD4} + {0189DC86-1BAD-40A8-BC84-1187937C2DD4} = {69FBE846-BC0C-4B1B-AA8A-D3275D33DBBB} + {0BFF5AFC-3D7D-4706-85BC-6F786F53C5F7} = {CCE645B1-5A02-4EDD-983D-365761F08F41} + {CCE645B1-5A02-4EDD-983D-365761F08F41} = {69FBE846-BC0C-4B1B-AA8A-D3275D33DBBB} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {AF704C7D-836B-41D4-919E-B0874D934A08} diff --git a/src/libraries/System.IO.FileSystem.Watcher/System.IO.FileSystem.Watcher.sln b/src/libraries/System.IO.FileSystem.Watcher/System.IO.FileSystem.Watcher.sln index 52f31942224ebc..6bc617eeb4df9d 100644 --- a/src/libraries/System.IO.FileSystem.Watcher/System.IO.FileSystem.Watcher.sln +++ b/src/libraries/System.IO.FileSystem.Watcher/System.IO.FileSystem.Watcher.sln @@ -25,6 +25,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{11864EE6-ADBD-417F-9D7C-58D4057F6A65}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{387AA89D-B62A-4B06-8C0E-AAD444DE15C0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{79478BEC-93B2-4405-BAF8-9A2762D35BD1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{32071CD0-902E-4A56-B058-776589523FC0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{B1859374-5511-4C0A-8337-0EDEFAB2B63C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{557FC283-4FB9-4B8B-9C9D-A461374C0573}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{A4E6A754-5006-4E2F-BC57-0A96E3A82A4D}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{FB3E732D-C87B-41E9-ADC2-C2D84B87D04F}" @@ -33,6 +43,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{BCDF2178-959 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{1C8EC715-29EB-40DF-A78F-35636153B267}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{D43DD0C3-AA26-40DF-97AE-289CAC95C9C8}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{C9D7A0EF-1E1D-42D1-ADC3-B037D225C72F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{EF265246-C5F9-46FA-88FC-5ED0FCA63FED}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{64712DEA-D6C6-4CD6-BEC6-D4F1AB1261C5}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -91,6 +109,26 @@ Global {11864EE6-ADBD-417F-9D7C-58D4057F6A65}.Debug|Any CPU.Build.0 = Debug|Any CPU {11864EE6-ADBD-417F-9D7C-58D4057F6A65}.Release|Any CPU.ActiveCfg = Release|Any CPU {11864EE6-ADBD-417F-9D7C-58D4057F6A65}.Release|Any CPU.Build.0 = Release|Any CPU + {387AA89D-B62A-4B06-8C0E-AAD444DE15C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {387AA89D-B62A-4B06-8C0E-AAD444DE15C0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {387AA89D-B62A-4B06-8C0E-AAD444DE15C0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {387AA89D-B62A-4B06-8C0E-AAD444DE15C0}.Release|Any CPU.Build.0 = Release|Any CPU + {79478BEC-93B2-4405-BAF8-9A2762D35BD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {79478BEC-93B2-4405-BAF8-9A2762D35BD1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {79478BEC-93B2-4405-BAF8-9A2762D35BD1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {79478BEC-93B2-4405-BAF8-9A2762D35BD1}.Release|Any CPU.Build.0 = Release|Any CPU + {32071CD0-902E-4A56-B058-776589523FC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {32071CD0-902E-4A56-B058-776589523FC0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {32071CD0-902E-4A56-B058-776589523FC0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {32071CD0-902E-4A56-B058-776589523FC0}.Release|Any CPU.Build.0 = Release|Any CPU + {B1859374-5511-4C0A-8337-0EDEFAB2B63C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B1859374-5511-4C0A-8337-0EDEFAB2B63C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B1859374-5511-4C0A-8337-0EDEFAB2B63C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B1859374-5511-4C0A-8337-0EDEFAB2B63C}.Release|Any CPU.Build.0 = Release|Any CPU + {557FC283-4FB9-4B8B-9C9D-A461374C0573}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {557FC283-4FB9-4B8B-9C9D-A461374C0573}.Debug|Any CPU.Build.0 = Debug|Any CPU + {557FC283-4FB9-4B8B-9C9D-A461374C0573}.Release|Any CPU.ActiveCfg = Release|Any CPU + {557FC283-4FB9-4B8B-9C9D-A461374C0573}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -109,6 +147,14 @@ Global {D310E128-E5D5-458F-8255-03D8304772A8} = {1C8EC715-29EB-40DF-A78F-35636153B267} {B0C17840-DF58-49D8-9501-D2F1398E3BE4} = {1C8EC715-29EB-40DF-A78F-35636153B267} {DB80E810-8B37-4116-9835-889E16FEC389} = {1C8EC715-29EB-40DF-A78F-35636153B267} + {387AA89D-B62A-4B06-8C0E-AAD444DE15C0} = {D43DD0C3-AA26-40DF-97AE-289CAC95C9C8} + {79478BEC-93B2-4405-BAF8-9A2762D35BD1} = {D43DD0C3-AA26-40DF-97AE-289CAC95C9C8} + {D43DD0C3-AA26-40DF-97AE-289CAC95C9C8} = {64712DEA-D6C6-4CD6-BEC6-D4F1AB1261C5} + {32071CD0-902E-4A56-B058-776589523FC0} = {C9D7A0EF-1E1D-42D1-ADC3-B037D225C72F} + {B1859374-5511-4C0A-8337-0EDEFAB2B63C} = {C9D7A0EF-1E1D-42D1-ADC3-B037D225C72F} + {C9D7A0EF-1E1D-42D1-ADC3-B037D225C72F} = {64712DEA-D6C6-4CD6-BEC6-D4F1AB1261C5} + {557FC283-4FB9-4B8B-9C9D-A461374C0573} = {EF265246-C5F9-46FA-88FC-5ED0FCA63FED} + {EF265246-C5F9-46FA-88FC-5ED0FCA63FED} = {64712DEA-D6C6-4CD6-BEC6-D4F1AB1261C5} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C3D76AA3-27C1-48BF-9474-42E0495BA814} diff --git a/src/libraries/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.Linux.cs b/src/libraries/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.Linux.cs index 3ffbee9e7c9cb3..8a8ae3d025b86f 100644 --- a/src/libraries/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.Linux.cs +++ b/src/libraries/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.Linux.cs @@ -4,6 +4,7 @@ using Microsoft.Win32.SafeHandles; using System.Collections.Generic; using System.Diagnostics; +using System.Runtime.CompilerServices; using System.Text; using System.Threading; using System.Threading.Tasks; @@ -537,221 +538,232 @@ private void CancellationCallback() } /// - /// Main processing loop. This is currently implemented as a synchronous operation that continually - /// reads events and processes them... in the future, this could be changed to use asynchronous processing - /// if the impact of using a thread-per-FileSystemWatcher is too high. + /// Processes the next event. Method does not inline to prevent a strong reference to the watcher. /// - private void ProcessEvents() + /// The next event. + /// The previous event's name. + /// The previous event's parent. + /// The previous event's cookie. + /// if we can continue processing events, otherwise. + [MethodImpl(MethodImplOptions.NoInlining)] + private bool ProcessEvent(NotifyEvent nextEvent, ref ReadOnlySpan previousEventName, ref WatchedDirectory? previousEventParent, ref uint previousEventCookie) { - // When cancellation is requested, clear out all watches. This should force any active or future reads - // on the inotify handle to return 0 bytes read immediately, allowing us to wake up from the blocking call - // and exit the processing loop and clean up. - var ctr = _cancellationToken.UnsafeRegister(obj => ((RunningInstance)obj!).CancellationCallback(), this); - try + // Try to get the actual watcher from our weak reference. We maintain a weak reference most of the time + // so as to avoid a rooted cycle that would prevent our processing loop from ever ending + // if the watcher is dropped by the user without being disposed. If we can't get the watcher, + // there's nothing more to do (we can't raise events), so bail. + FileSystemWatcher? watcher; + if (!_weakWatcher.TryGetTarget(out watcher)) { - // Previous event information - ReadOnlySpan previousEventName = ReadOnlySpan.Empty; - WatchedDirectory? previousEventParent = null; - uint previousEventCookie = 0; + return false; + } - // Process events as long as we're not canceled and there are more to read... - NotifyEvent nextEvent; - while (!_cancellationToken.IsCancellationRequested && TryReadEvent(out nextEvent)) + uint mask = nextEvent.mask; + + // An overflow event means that we can't trust our state without restarting since we missed events and + // some of those events could be a directory create, meaning we wouldn't have added the directory to the + // watch and would not provide correct data to the caller. + if ((mask & (uint)Interop.Sys.NotifyEvents.IN_Q_OVERFLOW) != 0) + { + // Notify the caller of the error and, if the includeSubdirectories flag is set, restart to pick up any + // potential directories we missed due to the overflow. + watcher.NotifyInternalBufferOverflowEvent(); + if (_includeSubdirectories) { - // Try to get the actual watcher from our weak reference. We maintain a weak reference most of the time - // so as to avoid a rooted cycle that would prevent our processing loop from ever ending - // if the watcher is dropped by the user without being disposed. If we can't get the watcher, - // there's nothing more to do (we can't raise events), so bail. - FileSystemWatcher? watcher; - if (!_weakWatcher.TryGetTarget(out watcher)) - { - break; - } + watcher.Restart(); + } + return false; + } - uint mask = nextEvent.mask; + // Look up the directory information for the supplied wd + WatchedDirectory? associatedDirectoryEntry = null; + lock (SyncObj) + { + if (!_wdToPathMap.TryGetValue(nextEvent.wd, out associatedDirectoryEntry)) + { + // The watch descriptor could be missing from our dictionary if it was removed + // due to cancellation, or if we already removed it and this is a related event + // like IN_IGNORED. In any case, just ignore it... even if for some reason we + // should have the value, there's little we can do about it at this point, + // and there's no more processing of this event we can do without it. + return true; + } + } - // An overflow event means that we can't trust our state without restarting since we missed events and - // some of those events could be a directory create, meaning we wouldn't have added the directory to the - // watch and would not provide correct data to the caller. - if ((mask & (uint)Interop.Sys.NotifyEvents.IN_Q_OVERFLOW) != 0) - { - // Notify the caller of the error and, if the includeSubdirectories flag is set, restart to pick up any - // potential directories we missed due to the overflow. - watcher.NotifyInternalBufferOverflowEvent(); - if (_includeSubdirectories) - { - watcher.Restart(); - } - break; - } + ReadOnlySpan expandedName = associatedDirectoryEntry.GetPath(true, nextEvent.name); - // Look up the directory information for the supplied wd - WatchedDirectory? associatedDirectoryEntry = null; - lock (SyncObj) + // To match Windows, ignore all changes that happen on the root folder itself + if (expandedName.IsEmpty) + { + return true; + } + + // Determine whether the affected object is a directory (rather than a file). + // If it is, we may need to do special processing, such as adding a watch for new + // directories if IncludeSubdirectories is enabled. Since we're only watching + // directories, any IN_IGNORED event is also for a directory. + bool isDir = (mask & (uint)(Interop.Sys.NotifyEvents.IN_ISDIR | Interop.Sys.NotifyEvents.IN_IGNORED)) != 0; + + // Renames come in the form of two events: IN_MOVED_FROM and IN_MOVED_TO. + // In general, these should come as a sequence, one immediately after the other. + // So, we delay raising an event for IN_MOVED_FROM until we see what comes next. + if (!previousEventName.IsEmpty && ((mask & (uint)Interop.Sys.NotifyEvents.IN_MOVED_TO) == 0 || previousEventCookie != nextEvent.cookie)) + { + // IN_MOVED_FROM without an immediately-following corresponding IN_MOVED_TO. + // We have to assume that it was moved outside of our root watch path, which + // should be considered a deletion to match Win32 behavior. + // But since we explicitly added watches on directories, if it's a directory it'll + // still be watched, so we need to explicitly remove the watch. + if (previousEventParent != null && previousEventParent.Children != null) + { + // previousEventParent will be non-null iff the IN_MOVED_FROM + // was for a directory, in which case previousEventParent is that directory's + // parent and previousEventName is the name of the directory to be removed. + foreach (WatchedDirectory child in previousEventParent.Children) { - if (!_wdToPathMap.TryGetValue(nextEvent.wd, out associatedDirectoryEntry)) + if (previousEventName.Equals(child.Name, StringComparison.Ordinal)) { - // The watch descriptor could be missing from our dictionary if it was removed - // due to cancellation, or if we already removed it and this is a related event - // like IN_IGNORED. In any case, just ignore it... even if for some reason we - // should have the value, there's little we can do about it at this point, - // and there's no more processing of this event we can do without it. - watcher = null; - continue; + RemoveWatchedDirectory(child); + return false; } } + } - ReadOnlySpan expandedName = associatedDirectoryEntry.GetPath(true, nextEvent.name); + // Then fire the deletion event, even though the event was IN_MOVED_FROM. + watcher.NotifyFileSystemEventArgs(WatcherChangeTypes.Deleted, previousEventName); - // To match Windows, ignore all changes that happen on the root folder itself - if (expandedName.IsEmpty) - { - watcher = null; - continue; - } + previousEventName = null; + previousEventParent = null; + previousEventCookie = 0; + } + + // If the event signaled that there's a new subdirectory and if we're monitoring subdirectories, + // add a watch for it. + const Interop.Sys.NotifyEvents AddMaskFilters = Interop.Sys.NotifyEvents.IN_CREATE | Interop.Sys.NotifyEvents.IN_MOVED_TO; + bool addWatch = ((mask & (uint)AddMaskFilters) != 0); + if (addWatch && isDir && _includeSubdirectories) + { + AddDirectoryWatch(associatedDirectoryEntry, nextEvent.name); + } - // Determine whether the affected object is a directory (rather than a file). - // If it is, we may need to do special processing, such as adding a watch for new - // directories if IncludeSubdirectories is enabled. Since we're only watching - // directories, any IN_IGNORED event is also for a directory. - bool isDir = (mask & (uint)(Interop.Sys.NotifyEvents.IN_ISDIR | Interop.Sys.NotifyEvents.IN_IGNORED)) != 0; + // Check if the event should have been filtered but was unable because of inotify's inability + // to filter files vs directories. + const Interop.Sys.NotifyEvents fileDirEvents = Interop.Sys.NotifyEvents.IN_CREATE | + Interop.Sys.NotifyEvents.IN_DELETE | + Interop.Sys.NotifyEvents.IN_MOVED_FROM | + Interop.Sys.NotifyEvents.IN_MOVED_TO; + if ((((uint)fileDirEvents & mask) > 0) && + (isDir && ((_notifyFilters & NotifyFilters.DirectoryName) == 0) || + (!isDir && ((_notifyFilters & NotifyFilters.FileName) == 0)))) + { + return true; + } - // Renames come in the form of two events: IN_MOVED_FROM and IN_MOVED_TO. - // In general, these should come as a sequence, one immediately after the other. - // So, we delay raising an event for IN_MOVED_FROM until we see what comes next. - if (!previousEventName.IsEmpty && ((mask & (uint)Interop.Sys.NotifyEvents.IN_MOVED_TO) == 0 || previousEventCookie != nextEvent.cookie)) + const Interop.Sys.NotifyEvents switchMask = fileDirEvents | Interop.Sys.NotifyEvents.IN_IGNORED | + Interop.Sys.NotifyEvents.IN_ACCESS | Interop.Sys.NotifyEvents.IN_MODIFY | Interop.Sys.NotifyEvents.IN_ATTRIB; + switch ((Interop.Sys.NotifyEvents)(mask & (uint)switchMask)) + { + case Interop.Sys.NotifyEvents.IN_CREATE: + watcher.NotifyFileSystemEventArgs(WatcherChangeTypes.Created, expandedName); + break; + case Interop.Sys.NotifyEvents.IN_IGNORED: + // We're getting an IN_IGNORED because a directory watch was removed. + // and we're getting this far in our code because we still have an entry for it + // in our dictionary. So we want to clean up the relevant state, but not clean + // attempt to call back to inotify to remove the watches. + RemoveWatchedDirectory(associatedDirectoryEntry, removeInotify: false); + break; + case Interop.Sys.NotifyEvents.IN_DELETE: + watcher.NotifyFileSystemEventArgs(WatcherChangeTypes.Deleted, expandedName); + // We don't explicitly RemoveWatchedDirectory here, as that'll be handled + // by IN_IGNORED processing if this is a directory. + break; + case Interop.Sys.NotifyEvents.IN_ACCESS: + case Interop.Sys.NotifyEvents.IN_MODIFY: + case Interop.Sys.NotifyEvents.IN_ATTRIB: + watcher.NotifyFileSystemEventArgs(WatcherChangeTypes.Changed, expandedName); + break; + case Interop.Sys.NotifyEvents.IN_MOVED_FROM: + // We need to check if this MOVED_FROM event is standalone - meaning the item was moved out + // of scope. We do this by checking if we are at the end of our buffer (meaning no more events) + // and if there is data to be read by polling the fd. If there aren't any more events, fire the + // deleted event; if there are more events, handle it via next pass. This adds an additional + // edge case where we get the MOVED_FROM event and the MOVED_TO event hasn't been generated yet + // so we will send a DELETE for this event and a CREATE when the MOVED_TO is eventually processed. + if (_bufferPos == _bufferAvailable) { - // IN_MOVED_FROM without an immediately-following corresponding IN_MOVED_TO. - // We have to assume that it was moved outside of our root watch path, which - // should be considered a deletion to match Win32 behavior. - // But since we explicitly added watches on directories, if it's a directory it'll - // still be watched, so we need to explicitly remove the watch. - if (previousEventParent != null && previousEventParent.Children != null) + // Do the poll with a small timeout value. Community research showed that a few milliseconds + // was enough to allow the vast majority of MOVED_TO events that were going to show + // up to actually arrive. This doesn't need to be perfect; there's always the chance + // that a MOVED_TO could show up after whatever timeout is specified, in which case + // it'll just result in a delete + create instead of a rename. We need the value to be + // small so that we don't significantly delay the delivery of the deleted event in case + // that's actually what's needed (otherwise it'd be fine to block indefinitely waiting + // for the next event to arrive). + const int MillisecondsTimeout = 2; + Interop.PollEvents events; + Interop.Sys.Poll(_inotifyHandle, Interop.PollEvents.POLLIN, MillisecondsTimeout, out events); + + // If we error or don't have any signaled handles, send the deleted event + if (events == Interop.PollEvents.POLLNONE) { - // previousEventParent will be non-null iff the IN_MOVED_FROM - // was for a directory, in which case previousEventParent is that directory's - // parent and previousEventName is the name of the directory to be removed. - foreach (WatchedDirectory child in previousEventParent.Children) - { - if (previousEventName.Equals(child.Name, StringComparison.Ordinal)) - { - RemoveWatchedDirectory(child); - break; - } - } + // There isn't any more data in the queue so this is a deleted event + watcher.NotifyFileSystemEventArgs(WatcherChangeTypes.Deleted, expandedName); + break; } - - // Then fire the deletion event, even though the event was IN_MOVED_FROM. - watcher.NotifyFileSystemEventArgs(WatcherChangeTypes.Deleted, previousEventName); - - previousEventName = null; - previousEventParent = null; - previousEventCookie = 0; } - // If the event signaled that there's a new subdirectory and if we're monitoring subdirectories, - // add a watch for it. - const Interop.Sys.NotifyEvents AddMaskFilters = Interop.Sys.NotifyEvents.IN_CREATE | Interop.Sys.NotifyEvents.IN_MOVED_TO; - bool addWatch = ((mask & (uint)AddMaskFilters) != 0); - if (addWatch && isDir && _includeSubdirectories) + // We will set these values if the buffer has more data OR if the poll call tells us that more data is available. + previousEventName = expandedName; + previousEventParent = isDir ? associatedDirectoryEntry : null; + previousEventCookie = nextEvent.cookie; + + break; + case Interop.Sys.NotifyEvents.IN_MOVED_TO: + if (previousEventName != null) { - AddDirectoryWatch(associatedDirectoryEntry, nextEvent.name); + // If the previous name from IN_MOVED_FROM is non-null, then this is a rename. + watcher.NotifyRenameEventArgs(WatcherChangeTypes.Renamed, expandedName, previousEventName); } - - // Check if the event should have been filtered but was unable because of inotify's inability - // to filter files vs directories. - const Interop.Sys.NotifyEvents fileDirEvents = Interop.Sys.NotifyEvents.IN_CREATE | - Interop.Sys.NotifyEvents.IN_DELETE | - Interop.Sys.NotifyEvents.IN_MOVED_FROM | - Interop.Sys.NotifyEvents.IN_MOVED_TO; - if ((((uint)fileDirEvents & mask) > 0) && - (isDir && ((_notifyFilters & NotifyFilters.DirectoryName) == 0) || - (!isDir && ((_notifyFilters & NotifyFilters.FileName) == 0)))) + else { - watcher = null; - continue; + // If it is null, then we didn't get an IN_MOVED_FROM (or we got it a long time + // ago and treated it as a deletion), in which case this is considered a creation. + watcher.NotifyFileSystemEventArgs(WatcherChangeTypes.Created, expandedName); } + previousEventName = ReadOnlySpan.Empty; + previousEventParent = null; + previousEventCookie = 0; + break; + } - const Interop.Sys.NotifyEvents switchMask = fileDirEvents | Interop.Sys.NotifyEvents.IN_IGNORED | - Interop.Sys.NotifyEvents.IN_ACCESS | Interop.Sys.NotifyEvents.IN_MODIFY | Interop.Sys.NotifyEvents.IN_ATTRIB; - switch ((Interop.Sys.NotifyEvents)(mask & (uint)switchMask)) - { - case Interop.Sys.NotifyEvents.IN_CREATE: - watcher.NotifyFileSystemEventArgs(WatcherChangeTypes.Created, expandedName); - break; - case Interop.Sys.NotifyEvents.IN_IGNORED: - // We're getting an IN_IGNORED because a directory watch was removed. - // and we're getting this far in our code because we still have an entry for it - // in our dictionary. So we want to clean up the relevant state, but not clean - // attempt to call back to inotify to remove the watches. - RemoveWatchedDirectory(associatedDirectoryEntry, removeInotify:false); - break; - case Interop.Sys.NotifyEvents.IN_DELETE: - watcher.NotifyFileSystemEventArgs(WatcherChangeTypes.Deleted, expandedName); - // We don't explicitly RemoveWatchedDirectory here, as that'll be handled - // by IN_IGNORED processing if this is a directory. - break; - case Interop.Sys.NotifyEvents.IN_ACCESS: - case Interop.Sys.NotifyEvents.IN_MODIFY: - case Interop.Sys.NotifyEvents.IN_ATTRIB: - watcher.NotifyFileSystemEventArgs(WatcherChangeTypes.Changed, expandedName); - break; - case Interop.Sys.NotifyEvents.IN_MOVED_FROM: - // We need to check if this MOVED_FROM event is standalone - meaning the item was moved out - // of scope. We do this by checking if we are at the end of our buffer (meaning no more events) - // and if there is data to be read by polling the fd. If there aren't any more events, fire the - // deleted event; if there are more events, handle it via next pass. This adds an additional - // edge case where we get the MOVED_FROM event and the MOVED_TO event hasn't been generated yet - // so we will send a DELETE for this event and a CREATE when the MOVED_TO is eventually processed. - if (_bufferPos == _bufferAvailable) - { - // Do the poll with a small timeout value. Community research showed that a few milliseconds - // was enough to allow the vast majority of MOVED_TO events that were going to show - // up to actually arrive. This doesn't need to be perfect; there's always the chance - // that a MOVED_TO could show up after whatever timeout is specified, in which case - // it'll just result in a delete + create instead of a rename. We need the value to be - // small so that we don't significantly delay the delivery of the deleted event in case - // that's actually what's needed (otherwise it'd be fine to block indefinitely waiting - // for the next event to arrive). - const int MillisecondsTimeout = 2; - Interop.PollEvents events; - Interop.Sys.Poll(_inotifyHandle, Interop.PollEvents.POLLIN, MillisecondsTimeout, out events); - - // If we error or don't have any signaled handles, send the deleted event - if (events == Interop.PollEvents.POLLNONE) - { - // There isn't any more data in the queue so this is a deleted event - watcher.NotifyFileSystemEventArgs(WatcherChangeTypes.Deleted, expandedName); - break; - } - } - - // We will set these values if the buffer has more data OR if the poll call tells us that more data is available. - previousEventName = expandedName; - previousEventParent = isDir ? associatedDirectoryEntry : null; - previousEventCookie = nextEvent.cookie; + return true; + } - break; - case Interop.Sys.NotifyEvents.IN_MOVED_TO: - if (previousEventName != null) - { - // If the previous name from IN_MOVED_FROM is non-null, then this is a rename. - watcher.NotifyRenameEventArgs(WatcherChangeTypes.Renamed, expandedName, previousEventName); - } - else - { - // If it is null, then we didn't get an IN_MOVED_FROM (or we got it a long time - // ago and treated it as a deletion), in which case this is considered a creation. - watcher.NotifyFileSystemEventArgs(WatcherChangeTypes.Created, expandedName); - } - previousEventName = ReadOnlySpan.Empty; - previousEventParent = null; - previousEventCookie = 0; - break; - } + /// + /// Main processing loop. This is currently implemented as a synchronous operation that continually + /// reads events and processes them... in the future, this could be changed to use asynchronous processing + /// if the impact of using a thread-per-FileSystemWatcher is too high. + /// + private void ProcessEvents() + { + // When cancellation is requested, clear out all watches. This should force any active or future reads + // on the inotify handle to return 0 bytes read immediately, allowing us to wake up from the blocking call + // and exit the processing loop and clean up. + var ctr = _cancellationToken.UnsafeRegister(obj => ((RunningInstance)obj!).CancellationCallback(), this); + try + { + // Previous event information + ReadOnlySpan previousEventName = ReadOnlySpan.Empty; + WatchedDirectory? previousEventParent = null; + uint previousEventCookie = 0; - // Drop our strong reference to the watcher now that we're potentially going to block again for another read - watcher = null; + // Process events as long as we're not canceled and there are more to read... + NotifyEvent nextEvent; + while (!_cancellationToken.IsCancellationRequested && TryReadEvent(out nextEvent)) + { + if (!ProcessEvent(nextEvent, ref previousEventName, ref previousEventParent, ref previousEventCookie)) + break; } } catch (Exception exc) diff --git a/src/libraries/System.IO.Hashing/System.IO.Hashing.sln b/src/libraries/System.IO.Hashing/System.IO.Hashing.sln index 1f55544e329c2a..ce6293aa826488 100644 --- a/src/libraries/System.IO.Hashing/System.IO.Hashing.sln +++ b/src/libraries/System.IO.Hashing/System.IO.Hashing.sln @@ -7,12 +7,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO.Hashing", "src\Sy EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO.Hashing.Tests", "tests\System.IO.Hashing.Tests.csproj", "{2E6DAC1B-9054-40AF-AF72-4C2DD7BD9294}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{1721170A-D96D-4172-9DA0-E53DF8C3CC15}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{0EBDAC1E-7132-406B-96B4-F8875A689C99}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{A60C1BBE-8CD7-4B6A-AD3C-FF1209857C39}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{14F46F30-1D5F-4FB6-B946-0E01BA52F8D9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{724E5FDF-D03B-402C-870E-70E44E02F904}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{5C1B7DE0-C1F4-44CF-BD52-CC459BBB8F3F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{85F8D215-7668-4DA4-A1F8-231883A0199B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{8B933E04-2E8A-46C8-A720-7A35EB3EE24C}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{1E78399D-326B-4C9F-B8A9-A7E684EEA349}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{46BA9FAE-9204-455A-BB2D-518E5B5C3E4C}" @@ -21,6 +29,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{F2826BE8-9FA EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{26D7BA38-5978-4423-814C-0C8D9F38C1A3}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{7AB7C77C-0497-4E3D-B2A2-AC9D9CAE73E8}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{B4539921-62FA-497E-8EAE-B7012DCEE2D5}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{A94B241B-DDB9-4F5D-A6C8-2C50E080D1CE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{E64A1BCA-C2B3-4425-AFD1-8F51343B0852}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -43,10 +59,6 @@ Global {2E6DAC1B-9054-40AF-AF72-4C2DD7BD9294}.Debug|Any CPU.Build.0 = Debug|Any CPU {2E6DAC1B-9054-40AF-AF72-4C2DD7BD9294}.Release|Any CPU.ActiveCfg = Release|Any CPU {2E6DAC1B-9054-40AF-AF72-4C2DD7BD9294}.Release|Any CPU.Build.0 = Release|Any CPU - {1721170A-D96D-4172-9DA0-E53DF8C3CC15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1721170A-D96D-4172-9DA0-E53DF8C3CC15}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1721170A-D96D-4172-9DA0-E53DF8C3CC15}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1721170A-D96D-4172-9DA0-E53DF8C3CC15}.Release|Any CPU.Build.0 = Release|Any CPU {0EBDAC1E-7132-406B-96B4-F8875A689C99}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0EBDAC1E-7132-406B-96B4-F8875A689C99}.Debug|Any CPU.Build.0 = Debug|Any CPU {0EBDAC1E-7132-406B-96B4-F8875A689C99}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -55,6 +67,26 @@ Global {A60C1BBE-8CD7-4B6A-AD3C-FF1209857C39}.Debug|Any CPU.Build.0 = Debug|Any CPU {A60C1BBE-8CD7-4B6A-AD3C-FF1209857C39}.Release|Any CPU.ActiveCfg = Release|Any CPU {A60C1BBE-8CD7-4B6A-AD3C-FF1209857C39}.Release|Any CPU.Build.0 = Release|Any CPU + {14F46F30-1D5F-4FB6-B946-0E01BA52F8D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {14F46F30-1D5F-4FB6-B946-0E01BA52F8D9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {14F46F30-1D5F-4FB6-B946-0E01BA52F8D9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {14F46F30-1D5F-4FB6-B946-0E01BA52F8D9}.Release|Any CPU.Build.0 = Release|Any CPU + {724E5FDF-D03B-402C-870E-70E44E02F904}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {724E5FDF-D03B-402C-870E-70E44E02F904}.Debug|Any CPU.Build.0 = Debug|Any CPU + {724E5FDF-D03B-402C-870E-70E44E02F904}.Release|Any CPU.ActiveCfg = Release|Any CPU + {724E5FDF-D03B-402C-870E-70E44E02F904}.Release|Any CPU.Build.0 = Release|Any CPU + {5C1B7DE0-C1F4-44CF-BD52-CC459BBB8F3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5C1B7DE0-C1F4-44CF-BD52-CC459BBB8F3F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5C1B7DE0-C1F4-44CF-BD52-CC459BBB8F3F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5C1B7DE0-C1F4-44CF-BD52-CC459BBB8F3F}.Release|Any CPU.Build.0 = Release|Any CPU + {85F8D215-7668-4DA4-A1F8-231883A0199B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85F8D215-7668-4DA4-A1F8-231883A0199B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85F8D215-7668-4DA4-A1F8-231883A0199B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85F8D215-7668-4DA4-A1F8-231883A0199B}.Release|Any CPU.Build.0 = Release|Any CPU + {8B933E04-2E8A-46C8-A720-7A35EB3EE24C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8B933E04-2E8A-46C8-A720-7A35EB3EE24C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8B933E04-2E8A-46C8-A720-7A35EB3EE24C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8B933E04-2E8A-46C8-A720-7A35EB3EE24C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -64,9 +96,16 @@ Global {2E6DAC1B-9054-40AF-AF72-4C2DD7BD9294} = {1E78399D-326B-4C9F-B8A9-A7E684EEA349} {259A1DB6-EF7E-4D45-96EF-035E0605BB55} = {46BA9FAE-9204-455A-BB2D-518E5B5C3E4C} {A078A4EB-27E8-42B1-BD44-3807732A4560} = {F2826BE8-9FA1-40C8-8FD4-E98A4644733E} - {1721170A-D96D-4172-9DA0-E53DF8C3CC15} = {26D7BA38-5978-4423-814C-0C8D9F38C1A3} {0EBDAC1E-7132-406B-96B4-F8875A689C99} = {26D7BA38-5978-4423-814C-0C8D9F38C1A3} {A60C1BBE-8CD7-4B6A-AD3C-FF1209857C39} = {26D7BA38-5978-4423-814C-0C8D9F38C1A3} + {14F46F30-1D5F-4FB6-B946-0E01BA52F8D9} = {7AB7C77C-0497-4E3D-B2A2-AC9D9CAE73E8} + {724E5FDF-D03B-402C-870E-70E44E02F904} = {7AB7C77C-0497-4E3D-B2A2-AC9D9CAE73E8} + {7AB7C77C-0497-4E3D-B2A2-AC9D9CAE73E8} = {E64A1BCA-C2B3-4425-AFD1-8F51343B0852} + {5C1B7DE0-C1F4-44CF-BD52-CC459BBB8F3F} = {B4539921-62FA-497E-8EAE-B7012DCEE2D5} + {85F8D215-7668-4DA4-A1F8-231883A0199B} = {B4539921-62FA-497E-8EAE-B7012DCEE2D5} + {B4539921-62FA-497E-8EAE-B7012DCEE2D5} = {E64A1BCA-C2B3-4425-AFD1-8F51343B0852} + {8B933E04-2E8A-46C8-A720-7A35EB3EE24C} = {A94B241B-DDB9-4F5D-A6C8-2C50E080D1CE} + {A94B241B-DDB9-4F5D-A6C8-2C50E080D1CE} = {E64A1BCA-C2B3-4425-AFD1-8F51343B0852} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {4DF081FC-DC0D-4317-AB2C-4294B9FE6257} diff --git a/src/libraries/System.IO.Hashing/ref/System.IO.Hashing.csproj b/src/libraries/System.IO.Hashing/ref/System.IO.Hashing.csproj index f562d62e60363e..b26a62ae86753e 100644 --- a/src/libraries/System.IO.Hashing/ref/System.IO.Hashing.csproj +++ b/src/libraries/System.IO.Hashing/ref/System.IO.Hashing.csproj @@ -1,4 +1,5 @@ + $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) $(NoWarn);CS0809 @@ -6,13 +7,11 @@ - - - - + + diff --git a/src/libraries/System.IO.Hashing/src/CompatibilitySuppressions.xml b/src/libraries/System.IO.Hashing/src/CompatibilitySuppressions.xml new file mode 100644 index 00000000000000..5df48256b85b29 --- /dev/null +++ b/src/libraries/System.IO.Hashing/src/CompatibilitySuppressions.xml @@ -0,0 +1,18 @@ + + + + + CP0002 + M:System.IO.Hashing.XxHash128.GetCurrentHashAsUInt128 + lib/net7.0/System.IO.Hashing.dll + lib/netstandard2.0/System.IO.Hashing.dll + true + + + CP0002 + M:System.IO.Hashing.XxHash128.HashToUInt128(System.ReadOnlySpan{System.Byte},System.Int64) + lib/net7.0/System.IO.Hashing.dll + lib/netstandard2.0/System.IO.Hashing.dll + true + + \ No newline at end of file diff --git a/src/libraries/System.IO.Hashing/src/System.IO.Hashing.csproj b/src/libraries/System.IO.Hashing/src/System.IO.Hashing.csproj index 3384ea59b27a81..6758a8cdf0918a 100644 --- a/src/libraries/System.IO.Hashing/src/System.IO.Hashing.csproj +++ b/src/libraries/System.IO.Hashing/src/System.IO.Hashing.csproj @@ -1,4 +1,5 @@ + $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) true @@ -11,18 +12,11 @@ System.IO.Hashing.XxHash32 - - - - + @@ -30,15 +24,23 @@ System.IO.Hashing.XxHash32 - - - + + + + + + + + + + + + + diff --git a/src/libraries/System.IO.IsolatedStorage/System.IO.IsolatedStorage.sln b/src/libraries/System.IO.IsolatedStorage/System.IO.IsolatedStorage.sln index eaee56429ab556..e5d27f175e630a 100644 --- a/src/libraries/System.IO.IsolatedStorage/System.IO.IsolatedStorage.sln +++ b/src/libraries/System.IO.IsolatedStorage/System.IO.IsolatedStorage.sln @@ -1,6 +1,10 @@ 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", "{DC7157AB-FE04-4031-BCF5-400DFCFB1265}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{16B2F442-5A88-4C59-A9FE-AB4357D3E657}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Drawing.Common", "..\shims\stubs\System.Drawing.Common.csproj", "{2D7986A0-48B8-4DB3-A111-CA8DE1F74769}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.DirectoryServices", "..\System.DirectoryServices\ref\System.DirectoryServices.csproj", "{CBD0D70E-1470-43BF-BE8D-59756A3A2364}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.DirectoryServices", "..\System.DirectoryServices\src\System.DirectoryServices.csproj", "{3AFF1901-8D72-43CF-AFE2-0F8A5CFD5C3F}" @@ -11,7 +15,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO.IsolatedStorage", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO.IsolatedStorage.Tests", "tests\System.IO.IsolatedStorage.Tests.csproj", "{88125FEA-D679-4A1A-8736-A18EC13AFC75}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{F7489DD4-0C1E-456B-ADF3-D5F8F22E8875}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{15DD6643-975E-47DC-83F2-5A734CA8C027}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{4BE9DDC8-B128-4913-9B2F-0513E9C69991}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.Uri", "..\System.Private.Uri\src\System.Private.Uri.csproj", "{77530357-B4AC-4879-850C-CD4231AA707F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{CB45B17E-7E90-4687-B5CB-697D761FAF8C}" EndProject @@ -19,6 +27,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{7B5CE655-EC0E-4E74-AD96-C50731D88D82}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\src\System.Runtime.csproj", "{ACABB6EA-7DBE-4AF8-81F8-6F86CCF4142C}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Permissions", "..\System.Security.Permissions\ref\System.Security.Permissions.csproj", "{94E1FBF3-D07E-42CC-BDE9-195068C29632}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Permissions", "..\System.Security.Permissions\src\System.Security.Permissions.csproj", "{05F3ED11-AB8C-47EA-BEB8-BB25FF5BC2C5}" @@ -27,95 +37,598 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", "..\System.Windows.Extensions\src\System.Windows.Extensions.csproj", "{2C9EFD7A-F153-47BF-B2E6-73094696DF45}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{BF25957F-9188-4CD6-9581-8E1C998E5AAB}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{877446C1-0835-444C-A210-45B0F55E03B6}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{CBCF137A-F5AD-4CCC-8888-F4B30426B5DE}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{58DD329D-4BEC-4C97-A9D5-6CFB51789D7A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{DC917904-43C1-4369-BCDC-B96851F72526}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{A589EBE3-F42B-4FA8-A20E-174305B91514}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{034E0757-DF29-4FB0-B75F-0E60C13979FB}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{6BC78072-0377-4A0D-890F-C69B51C4FD86}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{BF25957F-9188-4CD6-9581-8E1C998E5AAB}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D4881A9A-F082-40A1-ABC4-DE232ABB22BA}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{CBCF137A-F5AD-4CCC-8888-F4B30426B5DE}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{3424E375-E1DA-46BA-91D2-E1EA86BAF98F}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{A7BCEB40-DA50-4D87-8D82-FD5DEEB85C6F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{F1C82E5D-F07F-4FF8-87FC-A460E6578F7A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{5BBF5679-8F82-4601-9BF3-A619CC20171D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{DC513735-2375-4EA7-AEA8-CBE509248CE1}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|arm = Debug|arm + Debug|arm64 = Debug|arm64 + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|arm = Release|arm + Release|arm64 = Release|arm64 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + Checked|Any CPU = Checked|Any CPU + Checked|arm = Checked|arm + Checked|arm64 = Checked|arm64 + Checked|x64 = Checked|x64 + Checked|x86 = Checked|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DC7157AB-FE04-4031-BCF5-400DFCFB1265}.Debug|Any CPU.ActiveCfg = Debug|x64 + {DC7157AB-FE04-4031-BCF5-400DFCFB1265}.Debug|Any CPU.Build.0 = Debug|x64 + {DC7157AB-FE04-4031-BCF5-400DFCFB1265}.Debug|arm.ActiveCfg = Debug|arm + {DC7157AB-FE04-4031-BCF5-400DFCFB1265}.Debug|arm.Build.0 = Debug|arm + {DC7157AB-FE04-4031-BCF5-400DFCFB1265}.Debug|arm64.ActiveCfg = Debug|arm64 + {DC7157AB-FE04-4031-BCF5-400DFCFB1265}.Debug|arm64.Build.0 = Debug|arm64 + {DC7157AB-FE04-4031-BCF5-400DFCFB1265}.Debug|x64.ActiveCfg = Debug|x64 + {DC7157AB-FE04-4031-BCF5-400DFCFB1265}.Debug|x64.Build.0 = Debug|x64 + {DC7157AB-FE04-4031-BCF5-400DFCFB1265}.Debug|x86.ActiveCfg = Debug|x86 + {DC7157AB-FE04-4031-BCF5-400DFCFB1265}.Debug|x86.Build.0 = Debug|x86 + {DC7157AB-FE04-4031-BCF5-400DFCFB1265}.Release|Any CPU.ActiveCfg = Release|x64 + {DC7157AB-FE04-4031-BCF5-400DFCFB1265}.Release|Any CPU.Build.0 = Release|x64 + {DC7157AB-FE04-4031-BCF5-400DFCFB1265}.Release|arm.ActiveCfg = Release|arm + {DC7157AB-FE04-4031-BCF5-400DFCFB1265}.Release|arm.Build.0 = Release|arm + {DC7157AB-FE04-4031-BCF5-400DFCFB1265}.Release|arm64.ActiveCfg = Release|arm64 + {DC7157AB-FE04-4031-BCF5-400DFCFB1265}.Release|arm64.Build.0 = Release|arm64 + {DC7157AB-FE04-4031-BCF5-400DFCFB1265}.Release|x64.ActiveCfg = Release|x64 + {DC7157AB-FE04-4031-BCF5-400DFCFB1265}.Release|x64.Build.0 = Release|x64 + {DC7157AB-FE04-4031-BCF5-400DFCFB1265}.Release|x86.ActiveCfg = Release|x86 + {DC7157AB-FE04-4031-BCF5-400DFCFB1265}.Release|x86.Build.0 = Release|x86 + {DC7157AB-FE04-4031-BCF5-400DFCFB1265}.Checked|Any CPU.ActiveCfg = Checked|x64 + {DC7157AB-FE04-4031-BCF5-400DFCFB1265}.Checked|Any CPU.Build.0 = Checked|x64 + {DC7157AB-FE04-4031-BCF5-400DFCFB1265}.Checked|arm.ActiveCfg = Checked|arm + {DC7157AB-FE04-4031-BCF5-400DFCFB1265}.Checked|arm.Build.0 = Checked|arm + {DC7157AB-FE04-4031-BCF5-400DFCFB1265}.Checked|arm64.ActiveCfg = Checked|arm64 + {DC7157AB-FE04-4031-BCF5-400DFCFB1265}.Checked|arm64.Build.0 = Checked|arm64 + {DC7157AB-FE04-4031-BCF5-400DFCFB1265}.Checked|x64.ActiveCfg = Checked|x64 + {DC7157AB-FE04-4031-BCF5-400DFCFB1265}.Checked|x64.Build.0 = Checked|x64 + {DC7157AB-FE04-4031-BCF5-400DFCFB1265}.Checked|x86.ActiveCfg = Checked|x86 + {DC7157AB-FE04-4031-BCF5-400DFCFB1265}.Checked|x86.Build.0 = Checked|x86 {16B2F442-5A88-4C59-A9FE-AB4357D3E657}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {16B2F442-5A88-4C59-A9FE-AB4357D3E657}.Debug|Any CPU.Build.0 = Debug|Any CPU + {16B2F442-5A88-4C59-A9FE-AB4357D3E657}.Debug|arm.ActiveCfg = Debug|Any CPU + {16B2F442-5A88-4C59-A9FE-AB4357D3E657}.Debug|arm64.ActiveCfg = Debug|Any CPU + {16B2F442-5A88-4C59-A9FE-AB4357D3E657}.Debug|x64.ActiveCfg = Debug|Any CPU + {16B2F442-5A88-4C59-A9FE-AB4357D3E657}.Debug|x64.Build.0 = Debug|Any CPU + {16B2F442-5A88-4C59-A9FE-AB4357D3E657}.Debug|x86.ActiveCfg = Debug|Any CPU + {16B2F442-5A88-4C59-A9FE-AB4357D3E657}.Debug|x86.Build.0 = Debug|Any CPU {16B2F442-5A88-4C59-A9FE-AB4357D3E657}.Release|Any CPU.ActiveCfg = Release|Any CPU {16B2F442-5A88-4C59-A9FE-AB4357D3E657}.Release|Any CPU.Build.0 = Release|Any CPU + {16B2F442-5A88-4C59-A9FE-AB4357D3E657}.Release|arm.ActiveCfg = Release|Any CPU + {16B2F442-5A88-4C59-A9FE-AB4357D3E657}.Release|arm64.ActiveCfg = Release|Any CPU + {16B2F442-5A88-4C59-A9FE-AB4357D3E657}.Release|x64.ActiveCfg = Release|Any CPU + {16B2F442-5A88-4C59-A9FE-AB4357D3E657}.Release|x64.Build.0 = Release|Any CPU + {16B2F442-5A88-4C59-A9FE-AB4357D3E657}.Release|x86.ActiveCfg = Release|Any CPU + {16B2F442-5A88-4C59-A9FE-AB4357D3E657}.Release|x86.Build.0 = Release|Any CPU + {16B2F442-5A88-4C59-A9FE-AB4357D3E657}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {16B2F442-5A88-4C59-A9FE-AB4357D3E657}.Checked|arm.ActiveCfg = Debug|Any CPU + {16B2F442-5A88-4C59-A9FE-AB4357D3E657}.Checked|arm64.ActiveCfg = Debug|Any CPU + {16B2F442-5A88-4C59-A9FE-AB4357D3E657}.Checked|x64.ActiveCfg = Debug|Any CPU + {16B2F442-5A88-4C59-A9FE-AB4357D3E657}.Checked|x86.ActiveCfg = Debug|Any CPU + {2D7986A0-48B8-4DB3-A111-CA8DE1F74769}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2D7986A0-48B8-4DB3-A111-CA8DE1F74769}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2D7986A0-48B8-4DB3-A111-CA8DE1F74769}.Debug|arm.ActiveCfg = Debug|Any CPU + {2D7986A0-48B8-4DB3-A111-CA8DE1F74769}.Debug|arm64.ActiveCfg = Debug|Any CPU + {2D7986A0-48B8-4DB3-A111-CA8DE1F74769}.Debug|x64.ActiveCfg = Debug|Any CPU + {2D7986A0-48B8-4DB3-A111-CA8DE1F74769}.Debug|x64.Build.0 = Debug|Any CPU + {2D7986A0-48B8-4DB3-A111-CA8DE1F74769}.Debug|x86.ActiveCfg = Debug|Any CPU + {2D7986A0-48B8-4DB3-A111-CA8DE1F74769}.Debug|x86.Build.0 = Debug|Any CPU + {2D7986A0-48B8-4DB3-A111-CA8DE1F74769}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2D7986A0-48B8-4DB3-A111-CA8DE1F74769}.Release|Any CPU.Build.0 = Release|Any CPU + {2D7986A0-48B8-4DB3-A111-CA8DE1F74769}.Release|arm.ActiveCfg = Release|Any CPU + {2D7986A0-48B8-4DB3-A111-CA8DE1F74769}.Release|arm64.ActiveCfg = Release|Any CPU + {2D7986A0-48B8-4DB3-A111-CA8DE1F74769}.Release|x64.ActiveCfg = Release|Any CPU + {2D7986A0-48B8-4DB3-A111-CA8DE1F74769}.Release|x64.Build.0 = Release|Any CPU + {2D7986A0-48B8-4DB3-A111-CA8DE1F74769}.Release|x86.ActiveCfg = Release|Any CPU + {2D7986A0-48B8-4DB3-A111-CA8DE1F74769}.Release|x86.Build.0 = Release|Any CPU + {2D7986A0-48B8-4DB3-A111-CA8DE1F74769}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {2D7986A0-48B8-4DB3-A111-CA8DE1F74769}.Checked|arm.ActiveCfg = Debug|Any CPU + {2D7986A0-48B8-4DB3-A111-CA8DE1F74769}.Checked|arm64.ActiveCfg = Debug|Any CPU + {2D7986A0-48B8-4DB3-A111-CA8DE1F74769}.Checked|x64.ActiveCfg = Debug|Any CPU + {2D7986A0-48B8-4DB3-A111-CA8DE1F74769}.Checked|x86.ActiveCfg = Debug|Any CPU {CBD0D70E-1470-43BF-BE8D-59756A3A2364}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CBD0D70E-1470-43BF-BE8D-59756A3A2364}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CBD0D70E-1470-43BF-BE8D-59756A3A2364}.Debug|arm.ActiveCfg = Debug|Any CPU + {CBD0D70E-1470-43BF-BE8D-59756A3A2364}.Debug|arm64.ActiveCfg = Debug|Any CPU + {CBD0D70E-1470-43BF-BE8D-59756A3A2364}.Debug|x64.ActiveCfg = Debug|Any CPU + {CBD0D70E-1470-43BF-BE8D-59756A3A2364}.Debug|x64.Build.0 = Debug|Any CPU + {CBD0D70E-1470-43BF-BE8D-59756A3A2364}.Debug|x86.ActiveCfg = Debug|Any CPU + {CBD0D70E-1470-43BF-BE8D-59756A3A2364}.Debug|x86.Build.0 = Debug|Any CPU {CBD0D70E-1470-43BF-BE8D-59756A3A2364}.Release|Any CPU.ActiveCfg = Release|Any CPU {CBD0D70E-1470-43BF-BE8D-59756A3A2364}.Release|Any CPU.Build.0 = Release|Any CPU + {CBD0D70E-1470-43BF-BE8D-59756A3A2364}.Release|arm.ActiveCfg = Release|Any CPU + {CBD0D70E-1470-43BF-BE8D-59756A3A2364}.Release|arm64.ActiveCfg = Release|Any CPU + {CBD0D70E-1470-43BF-BE8D-59756A3A2364}.Release|x64.ActiveCfg = Release|Any CPU + {CBD0D70E-1470-43BF-BE8D-59756A3A2364}.Release|x64.Build.0 = Release|Any CPU + {CBD0D70E-1470-43BF-BE8D-59756A3A2364}.Release|x86.ActiveCfg = Release|Any CPU + {CBD0D70E-1470-43BF-BE8D-59756A3A2364}.Release|x86.Build.0 = Release|Any CPU + {CBD0D70E-1470-43BF-BE8D-59756A3A2364}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {CBD0D70E-1470-43BF-BE8D-59756A3A2364}.Checked|arm.ActiveCfg = Debug|Any CPU + {CBD0D70E-1470-43BF-BE8D-59756A3A2364}.Checked|arm64.ActiveCfg = Debug|Any CPU + {CBD0D70E-1470-43BF-BE8D-59756A3A2364}.Checked|x64.ActiveCfg = Debug|Any CPU + {CBD0D70E-1470-43BF-BE8D-59756A3A2364}.Checked|x86.ActiveCfg = Debug|Any CPU {3AFF1901-8D72-43CF-AFE2-0F8A5CFD5C3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3AFF1901-8D72-43CF-AFE2-0F8A5CFD5C3F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3AFF1901-8D72-43CF-AFE2-0F8A5CFD5C3F}.Debug|arm.ActiveCfg = Debug|Any CPU + {3AFF1901-8D72-43CF-AFE2-0F8A5CFD5C3F}.Debug|arm64.ActiveCfg = Debug|Any CPU + {3AFF1901-8D72-43CF-AFE2-0F8A5CFD5C3F}.Debug|x64.ActiveCfg = Debug|Any CPU + {3AFF1901-8D72-43CF-AFE2-0F8A5CFD5C3F}.Debug|x64.Build.0 = Debug|Any CPU + {3AFF1901-8D72-43CF-AFE2-0F8A5CFD5C3F}.Debug|x86.ActiveCfg = Debug|Any CPU + {3AFF1901-8D72-43CF-AFE2-0F8A5CFD5C3F}.Debug|x86.Build.0 = Debug|Any CPU {3AFF1901-8D72-43CF-AFE2-0F8A5CFD5C3F}.Release|Any CPU.ActiveCfg = Release|Any CPU {3AFF1901-8D72-43CF-AFE2-0F8A5CFD5C3F}.Release|Any CPU.Build.0 = Release|Any CPU + {3AFF1901-8D72-43CF-AFE2-0F8A5CFD5C3F}.Release|arm.ActiveCfg = Release|Any CPU + {3AFF1901-8D72-43CF-AFE2-0F8A5CFD5C3F}.Release|arm64.ActiveCfg = Release|Any CPU + {3AFF1901-8D72-43CF-AFE2-0F8A5CFD5C3F}.Release|x64.ActiveCfg = Release|Any CPU + {3AFF1901-8D72-43CF-AFE2-0F8A5CFD5C3F}.Release|x64.Build.0 = Release|Any CPU + {3AFF1901-8D72-43CF-AFE2-0F8A5CFD5C3F}.Release|x86.ActiveCfg = Release|Any CPU + {3AFF1901-8D72-43CF-AFE2-0F8A5CFD5C3F}.Release|x86.Build.0 = Release|Any CPU + {3AFF1901-8D72-43CF-AFE2-0F8A5CFD5C3F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {3AFF1901-8D72-43CF-AFE2-0F8A5CFD5C3F}.Checked|arm.ActiveCfg = Debug|Any CPU + {3AFF1901-8D72-43CF-AFE2-0F8A5CFD5C3F}.Checked|arm64.ActiveCfg = Debug|Any CPU + {3AFF1901-8D72-43CF-AFE2-0F8A5CFD5C3F}.Checked|x64.ActiveCfg = Debug|Any CPU + {3AFF1901-8D72-43CF-AFE2-0F8A5CFD5C3F}.Checked|x86.ActiveCfg = Debug|Any CPU {CB10AFC2-FC8C-49B4-9BB1-6410E4D3A30A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CB10AFC2-FC8C-49B4-9BB1-6410E4D3A30A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CB10AFC2-FC8C-49B4-9BB1-6410E4D3A30A}.Debug|arm.ActiveCfg = Debug|Any CPU + {CB10AFC2-FC8C-49B4-9BB1-6410E4D3A30A}.Debug|arm64.ActiveCfg = Debug|Any CPU + {CB10AFC2-FC8C-49B4-9BB1-6410E4D3A30A}.Debug|x64.ActiveCfg = Debug|Any CPU + {CB10AFC2-FC8C-49B4-9BB1-6410E4D3A30A}.Debug|x64.Build.0 = Debug|Any CPU + {CB10AFC2-FC8C-49B4-9BB1-6410E4D3A30A}.Debug|x86.ActiveCfg = Debug|Any CPU + {CB10AFC2-FC8C-49B4-9BB1-6410E4D3A30A}.Debug|x86.Build.0 = Debug|Any CPU {CB10AFC2-FC8C-49B4-9BB1-6410E4D3A30A}.Release|Any CPU.ActiveCfg = Release|Any CPU {CB10AFC2-FC8C-49B4-9BB1-6410E4D3A30A}.Release|Any CPU.Build.0 = Release|Any CPU + {CB10AFC2-FC8C-49B4-9BB1-6410E4D3A30A}.Release|arm.ActiveCfg = Release|Any CPU + {CB10AFC2-FC8C-49B4-9BB1-6410E4D3A30A}.Release|arm64.ActiveCfg = Release|Any CPU + {CB10AFC2-FC8C-49B4-9BB1-6410E4D3A30A}.Release|x64.ActiveCfg = Release|Any CPU + {CB10AFC2-FC8C-49B4-9BB1-6410E4D3A30A}.Release|x64.Build.0 = Release|Any CPU + {CB10AFC2-FC8C-49B4-9BB1-6410E4D3A30A}.Release|x86.ActiveCfg = Release|Any CPU + {CB10AFC2-FC8C-49B4-9BB1-6410E4D3A30A}.Release|x86.Build.0 = Release|Any CPU + {CB10AFC2-FC8C-49B4-9BB1-6410E4D3A30A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {CB10AFC2-FC8C-49B4-9BB1-6410E4D3A30A}.Checked|arm.ActiveCfg = Debug|Any CPU + {CB10AFC2-FC8C-49B4-9BB1-6410E4D3A30A}.Checked|arm64.ActiveCfg = Debug|Any CPU + {CB10AFC2-FC8C-49B4-9BB1-6410E4D3A30A}.Checked|x64.ActiveCfg = Debug|Any CPU + {CB10AFC2-FC8C-49B4-9BB1-6410E4D3A30A}.Checked|x86.ActiveCfg = Debug|Any CPU {D9ACE205-2927-4D66-8E6F-D2C1E6E6239D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D9ACE205-2927-4D66-8E6F-D2C1E6E6239D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D9ACE205-2927-4D66-8E6F-D2C1E6E6239D}.Debug|arm.ActiveCfg = Debug|Any CPU + {D9ACE205-2927-4D66-8E6F-D2C1E6E6239D}.Debug|arm64.ActiveCfg = Debug|Any CPU + {D9ACE205-2927-4D66-8E6F-D2C1E6E6239D}.Debug|x64.ActiveCfg = Debug|Any CPU + {D9ACE205-2927-4D66-8E6F-D2C1E6E6239D}.Debug|x64.Build.0 = Debug|Any CPU + {D9ACE205-2927-4D66-8E6F-D2C1E6E6239D}.Debug|x86.ActiveCfg = Debug|Any CPU + {D9ACE205-2927-4D66-8E6F-D2C1E6E6239D}.Debug|x86.Build.0 = Debug|Any CPU {D9ACE205-2927-4D66-8E6F-D2C1E6E6239D}.Release|Any CPU.ActiveCfg = Release|Any CPU {D9ACE205-2927-4D66-8E6F-D2C1E6E6239D}.Release|Any CPU.Build.0 = Release|Any CPU + {D9ACE205-2927-4D66-8E6F-D2C1E6E6239D}.Release|arm.ActiveCfg = Release|Any CPU + {D9ACE205-2927-4D66-8E6F-D2C1E6E6239D}.Release|arm64.ActiveCfg = Release|Any CPU + {D9ACE205-2927-4D66-8E6F-D2C1E6E6239D}.Release|x64.ActiveCfg = Release|Any CPU + {D9ACE205-2927-4D66-8E6F-D2C1E6E6239D}.Release|x64.Build.0 = Release|Any CPU + {D9ACE205-2927-4D66-8E6F-D2C1E6E6239D}.Release|x86.ActiveCfg = Release|Any CPU + {D9ACE205-2927-4D66-8E6F-D2C1E6E6239D}.Release|x86.Build.0 = Release|Any CPU + {D9ACE205-2927-4D66-8E6F-D2C1E6E6239D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {D9ACE205-2927-4D66-8E6F-D2C1E6E6239D}.Checked|arm.ActiveCfg = Debug|Any CPU + {D9ACE205-2927-4D66-8E6F-D2C1E6E6239D}.Checked|arm64.ActiveCfg = Debug|Any CPU + {D9ACE205-2927-4D66-8E6F-D2C1E6E6239D}.Checked|x64.ActiveCfg = Debug|Any CPU + {D9ACE205-2927-4D66-8E6F-D2C1E6E6239D}.Checked|x86.ActiveCfg = Debug|Any CPU {88125FEA-D679-4A1A-8736-A18EC13AFC75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {88125FEA-D679-4A1A-8736-A18EC13AFC75}.Debug|Any CPU.Build.0 = Debug|Any CPU + {88125FEA-D679-4A1A-8736-A18EC13AFC75}.Debug|arm.ActiveCfg = Debug|Any CPU + {88125FEA-D679-4A1A-8736-A18EC13AFC75}.Debug|arm64.ActiveCfg = Debug|Any CPU + {88125FEA-D679-4A1A-8736-A18EC13AFC75}.Debug|x64.ActiveCfg = Debug|Any CPU + {88125FEA-D679-4A1A-8736-A18EC13AFC75}.Debug|x64.Build.0 = Debug|Any CPU + {88125FEA-D679-4A1A-8736-A18EC13AFC75}.Debug|x86.ActiveCfg = Debug|Any CPU + {88125FEA-D679-4A1A-8736-A18EC13AFC75}.Debug|x86.Build.0 = Debug|Any CPU {88125FEA-D679-4A1A-8736-A18EC13AFC75}.Release|Any CPU.ActiveCfg = Release|Any CPU {88125FEA-D679-4A1A-8736-A18EC13AFC75}.Release|Any CPU.Build.0 = Release|Any CPU - {F7489DD4-0C1E-456B-ADF3-D5F8F22E8875}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F7489DD4-0C1E-456B-ADF3-D5F8F22E8875}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F7489DD4-0C1E-456B-ADF3-D5F8F22E8875}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F7489DD4-0C1E-456B-ADF3-D5F8F22E8875}.Release|Any CPU.Build.0 = Release|Any CPU + {88125FEA-D679-4A1A-8736-A18EC13AFC75}.Release|arm.ActiveCfg = Release|Any CPU + {88125FEA-D679-4A1A-8736-A18EC13AFC75}.Release|arm64.ActiveCfg = Release|Any CPU + {88125FEA-D679-4A1A-8736-A18EC13AFC75}.Release|x64.ActiveCfg = Release|Any CPU + {88125FEA-D679-4A1A-8736-A18EC13AFC75}.Release|x64.Build.0 = Release|Any CPU + {88125FEA-D679-4A1A-8736-A18EC13AFC75}.Release|x86.ActiveCfg = Release|Any CPU + {88125FEA-D679-4A1A-8736-A18EC13AFC75}.Release|x86.Build.0 = Release|Any CPU + {88125FEA-D679-4A1A-8736-A18EC13AFC75}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {88125FEA-D679-4A1A-8736-A18EC13AFC75}.Checked|arm.ActiveCfg = Debug|Any CPU + {88125FEA-D679-4A1A-8736-A18EC13AFC75}.Checked|arm64.ActiveCfg = Debug|Any CPU + {88125FEA-D679-4A1A-8736-A18EC13AFC75}.Checked|x64.ActiveCfg = Debug|Any CPU + {88125FEA-D679-4A1A-8736-A18EC13AFC75}.Checked|x86.ActiveCfg = Debug|Any CPU + {15DD6643-975E-47DC-83F2-5A734CA8C027}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {15DD6643-975E-47DC-83F2-5A734CA8C027}.Debug|Any CPU.Build.0 = Debug|Any CPU + {15DD6643-975E-47DC-83F2-5A734CA8C027}.Debug|arm.ActiveCfg = Debug|Any CPU + {15DD6643-975E-47DC-83F2-5A734CA8C027}.Debug|arm64.ActiveCfg = Debug|Any CPU + {15DD6643-975E-47DC-83F2-5A734CA8C027}.Debug|x64.ActiveCfg = Debug|Any CPU + {15DD6643-975E-47DC-83F2-5A734CA8C027}.Debug|x64.Build.0 = Debug|Any CPU + {15DD6643-975E-47DC-83F2-5A734CA8C027}.Debug|x86.ActiveCfg = Debug|Any CPU + {15DD6643-975E-47DC-83F2-5A734CA8C027}.Debug|x86.Build.0 = Debug|Any CPU + {15DD6643-975E-47DC-83F2-5A734CA8C027}.Release|Any CPU.ActiveCfg = Release|Any CPU + {15DD6643-975E-47DC-83F2-5A734CA8C027}.Release|Any CPU.Build.0 = Release|Any CPU + {15DD6643-975E-47DC-83F2-5A734CA8C027}.Release|arm.ActiveCfg = Release|Any CPU + {15DD6643-975E-47DC-83F2-5A734CA8C027}.Release|arm64.ActiveCfg = Release|Any CPU + {15DD6643-975E-47DC-83F2-5A734CA8C027}.Release|x64.ActiveCfg = Release|Any CPU + {15DD6643-975E-47DC-83F2-5A734CA8C027}.Release|x64.Build.0 = Release|Any CPU + {15DD6643-975E-47DC-83F2-5A734CA8C027}.Release|x86.ActiveCfg = Release|Any CPU + {15DD6643-975E-47DC-83F2-5A734CA8C027}.Release|x86.Build.0 = Release|Any CPU + {15DD6643-975E-47DC-83F2-5A734CA8C027}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {15DD6643-975E-47DC-83F2-5A734CA8C027}.Checked|arm.ActiveCfg = Debug|Any CPU + {15DD6643-975E-47DC-83F2-5A734CA8C027}.Checked|arm64.ActiveCfg = Debug|Any CPU + {15DD6643-975E-47DC-83F2-5A734CA8C027}.Checked|x64.ActiveCfg = Debug|Any CPU + {15DD6643-975E-47DC-83F2-5A734CA8C027}.Checked|x86.ActiveCfg = Debug|Any CPU + {4BE9DDC8-B128-4913-9B2F-0513E9C69991}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4BE9DDC8-B128-4913-9B2F-0513E9C69991}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4BE9DDC8-B128-4913-9B2F-0513E9C69991}.Debug|arm.ActiveCfg = Debug|Any CPU + {4BE9DDC8-B128-4913-9B2F-0513E9C69991}.Debug|arm64.ActiveCfg = Debug|Any CPU + {4BE9DDC8-B128-4913-9B2F-0513E9C69991}.Debug|x64.ActiveCfg = Debug|Any CPU + {4BE9DDC8-B128-4913-9B2F-0513E9C69991}.Debug|x64.Build.0 = Debug|Any CPU + {4BE9DDC8-B128-4913-9B2F-0513E9C69991}.Debug|x86.ActiveCfg = Debug|Any CPU + {4BE9DDC8-B128-4913-9B2F-0513E9C69991}.Debug|x86.Build.0 = Debug|Any CPU + {4BE9DDC8-B128-4913-9B2F-0513E9C69991}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4BE9DDC8-B128-4913-9B2F-0513E9C69991}.Release|Any CPU.Build.0 = Release|Any CPU + {4BE9DDC8-B128-4913-9B2F-0513E9C69991}.Release|arm.ActiveCfg = Release|Any CPU + {4BE9DDC8-B128-4913-9B2F-0513E9C69991}.Release|arm64.ActiveCfg = Release|Any CPU + {4BE9DDC8-B128-4913-9B2F-0513E9C69991}.Release|x64.ActiveCfg = Release|Any CPU + {4BE9DDC8-B128-4913-9B2F-0513E9C69991}.Release|x64.Build.0 = Release|Any CPU + {4BE9DDC8-B128-4913-9B2F-0513E9C69991}.Release|x86.ActiveCfg = Release|Any CPU + {4BE9DDC8-B128-4913-9B2F-0513E9C69991}.Release|x86.Build.0 = Release|Any CPU + {4BE9DDC8-B128-4913-9B2F-0513E9C69991}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {4BE9DDC8-B128-4913-9B2F-0513E9C69991}.Checked|arm.ActiveCfg = Debug|Any CPU + {4BE9DDC8-B128-4913-9B2F-0513E9C69991}.Checked|arm64.ActiveCfg = Debug|Any CPU + {4BE9DDC8-B128-4913-9B2F-0513E9C69991}.Checked|x64.ActiveCfg = Debug|Any CPU + {4BE9DDC8-B128-4913-9B2F-0513E9C69991}.Checked|x86.ActiveCfg = Debug|Any CPU + {77530357-B4AC-4879-850C-CD4231AA707F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {77530357-B4AC-4879-850C-CD4231AA707F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {77530357-B4AC-4879-850C-CD4231AA707F}.Debug|arm.ActiveCfg = Debug|Any CPU + {77530357-B4AC-4879-850C-CD4231AA707F}.Debug|arm64.ActiveCfg = Debug|Any CPU + {77530357-B4AC-4879-850C-CD4231AA707F}.Debug|x64.ActiveCfg = Debug|Any CPU + {77530357-B4AC-4879-850C-CD4231AA707F}.Debug|x64.Build.0 = Debug|Any CPU + {77530357-B4AC-4879-850C-CD4231AA707F}.Debug|x86.ActiveCfg = Debug|Any CPU + {77530357-B4AC-4879-850C-CD4231AA707F}.Debug|x86.Build.0 = Debug|Any CPU + {77530357-B4AC-4879-850C-CD4231AA707F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {77530357-B4AC-4879-850C-CD4231AA707F}.Release|Any CPU.Build.0 = Release|Any CPU + {77530357-B4AC-4879-850C-CD4231AA707F}.Release|arm.ActiveCfg = Release|Any CPU + {77530357-B4AC-4879-850C-CD4231AA707F}.Release|arm64.ActiveCfg = Release|Any CPU + {77530357-B4AC-4879-850C-CD4231AA707F}.Release|x64.ActiveCfg = Release|Any CPU + {77530357-B4AC-4879-850C-CD4231AA707F}.Release|x64.Build.0 = Release|Any CPU + {77530357-B4AC-4879-850C-CD4231AA707F}.Release|x86.ActiveCfg = Release|Any CPU + {77530357-B4AC-4879-850C-CD4231AA707F}.Release|x86.Build.0 = Release|Any CPU + {77530357-B4AC-4879-850C-CD4231AA707F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {77530357-B4AC-4879-850C-CD4231AA707F}.Checked|arm.ActiveCfg = Debug|Any CPU + {77530357-B4AC-4879-850C-CD4231AA707F}.Checked|arm64.ActiveCfg = Debug|Any CPU + {77530357-B4AC-4879-850C-CD4231AA707F}.Checked|x64.ActiveCfg = Debug|Any CPU + {77530357-B4AC-4879-850C-CD4231AA707F}.Checked|x86.ActiveCfg = Debug|Any CPU {CB45B17E-7E90-4687-B5CB-697D761FAF8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CB45B17E-7E90-4687-B5CB-697D761FAF8C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CB45B17E-7E90-4687-B5CB-697D761FAF8C}.Debug|arm.ActiveCfg = Debug|Any CPU + {CB45B17E-7E90-4687-B5CB-697D761FAF8C}.Debug|arm64.ActiveCfg = Debug|Any CPU + {CB45B17E-7E90-4687-B5CB-697D761FAF8C}.Debug|x64.ActiveCfg = Debug|Any CPU + {CB45B17E-7E90-4687-B5CB-697D761FAF8C}.Debug|x64.Build.0 = Debug|Any CPU + {CB45B17E-7E90-4687-B5CB-697D761FAF8C}.Debug|x86.ActiveCfg = Debug|Any CPU + {CB45B17E-7E90-4687-B5CB-697D761FAF8C}.Debug|x86.Build.0 = Debug|Any CPU {CB45B17E-7E90-4687-B5CB-697D761FAF8C}.Release|Any CPU.ActiveCfg = Release|Any CPU {CB45B17E-7E90-4687-B5CB-697D761FAF8C}.Release|Any CPU.Build.0 = Release|Any CPU + {CB45B17E-7E90-4687-B5CB-697D761FAF8C}.Release|arm.ActiveCfg = Release|Any CPU + {CB45B17E-7E90-4687-B5CB-697D761FAF8C}.Release|arm64.ActiveCfg = Release|Any CPU + {CB45B17E-7E90-4687-B5CB-697D761FAF8C}.Release|x64.ActiveCfg = Release|Any CPU + {CB45B17E-7E90-4687-B5CB-697D761FAF8C}.Release|x64.Build.0 = Release|Any CPU + {CB45B17E-7E90-4687-B5CB-697D761FAF8C}.Release|x86.ActiveCfg = Release|Any CPU + {CB45B17E-7E90-4687-B5CB-697D761FAF8C}.Release|x86.Build.0 = Release|Any CPU + {CB45B17E-7E90-4687-B5CB-697D761FAF8C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {CB45B17E-7E90-4687-B5CB-697D761FAF8C}.Checked|arm.ActiveCfg = Debug|Any CPU + {CB45B17E-7E90-4687-B5CB-697D761FAF8C}.Checked|arm64.ActiveCfg = Debug|Any CPU + {CB45B17E-7E90-4687-B5CB-697D761FAF8C}.Checked|x64.ActiveCfg = Debug|Any CPU + {CB45B17E-7E90-4687-B5CB-697D761FAF8C}.Checked|x86.ActiveCfg = Debug|Any CPU {4DAA9EA7-245F-45D6-8061-010F7AA64752}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4DAA9EA7-245F-45D6-8061-010F7AA64752}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4DAA9EA7-245F-45D6-8061-010F7AA64752}.Debug|arm.ActiveCfg = Debug|Any CPU + {4DAA9EA7-245F-45D6-8061-010F7AA64752}.Debug|arm64.ActiveCfg = Debug|Any CPU + {4DAA9EA7-245F-45D6-8061-010F7AA64752}.Debug|x64.ActiveCfg = Debug|Any CPU + {4DAA9EA7-245F-45D6-8061-010F7AA64752}.Debug|x64.Build.0 = Debug|Any CPU + {4DAA9EA7-245F-45D6-8061-010F7AA64752}.Debug|x86.ActiveCfg = Debug|Any CPU + {4DAA9EA7-245F-45D6-8061-010F7AA64752}.Debug|x86.Build.0 = Debug|Any CPU {4DAA9EA7-245F-45D6-8061-010F7AA64752}.Release|Any CPU.ActiveCfg = Release|Any CPU {4DAA9EA7-245F-45D6-8061-010F7AA64752}.Release|Any CPU.Build.0 = Release|Any CPU + {4DAA9EA7-245F-45D6-8061-010F7AA64752}.Release|arm.ActiveCfg = Release|Any CPU + {4DAA9EA7-245F-45D6-8061-010F7AA64752}.Release|arm64.ActiveCfg = Release|Any CPU + {4DAA9EA7-245F-45D6-8061-010F7AA64752}.Release|x64.ActiveCfg = Release|Any CPU + {4DAA9EA7-245F-45D6-8061-010F7AA64752}.Release|x64.Build.0 = Release|Any CPU + {4DAA9EA7-245F-45D6-8061-010F7AA64752}.Release|x86.ActiveCfg = Release|Any CPU + {4DAA9EA7-245F-45D6-8061-010F7AA64752}.Release|x86.Build.0 = Release|Any CPU + {4DAA9EA7-245F-45D6-8061-010F7AA64752}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {4DAA9EA7-245F-45D6-8061-010F7AA64752}.Checked|arm.ActiveCfg = Debug|Any CPU + {4DAA9EA7-245F-45D6-8061-010F7AA64752}.Checked|arm64.ActiveCfg = Debug|Any CPU + {4DAA9EA7-245F-45D6-8061-010F7AA64752}.Checked|x64.ActiveCfg = Debug|Any CPU + {4DAA9EA7-245F-45D6-8061-010F7AA64752}.Checked|x86.ActiveCfg = Debug|Any CPU {7B5CE655-EC0E-4E74-AD96-C50731D88D82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7B5CE655-EC0E-4E74-AD96-C50731D88D82}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7B5CE655-EC0E-4E74-AD96-C50731D88D82}.Debug|arm.ActiveCfg = Debug|Any CPU + {7B5CE655-EC0E-4E74-AD96-C50731D88D82}.Debug|arm64.ActiveCfg = Debug|Any CPU + {7B5CE655-EC0E-4E74-AD96-C50731D88D82}.Debug|x64.ActiveCfg = Debug|Any CPU + {7B5CE655-EC0E-4E74-AD96-C50731D88D82}.Debug|x64.Build.0 = Debug|Any CPU + {7B5CE655-EC0E-4E74-AD96-C50731D88D82}.Debug|x86.ActiveCfg = Debug|Any CPU + {7B5CE655-EC0E-4E74-AD96-C50731D88D82}.Debug|x86.Build.0 = Debug|Any CPU {7B5CE655-EC0E-4E74-AD96-C50731D88D82}.Release|Any CPU.ActiveCfg = Release|Any CPU {7B5CE655-EC0E-4E74-AD96-C50731D88D82}.Release|Any CPU.Build.0 = Release|Any CPU + {7B5CE655-EC0E-4E74-AD96-C50731D88D82}.Release|arm.ActiveCfg = Release|Any CPU + {7B5CE655-EC0E-4E74-AD96-C50731D88D82}.Release|arm64.ActiveCfg = Release|Any CPU + {7B5CE655-EC0E-4E74-AD96-C50731D88D82}.Release|x64.ActiveCfg = Release|Any CPU + {7B5CE655-EC0E-4E74-AD96-C50731D88D82}.Release|x64.Build.0 = Release|Any CPU + {7B5CE655-EC0E-4E74-AD96-C50731D88D82}.Release|x86.ActiveCfg = Release|Any CPU + {7B5CE655-EC0E-4E74-AD96-C50731D88D82}.Release|x86.Build.0 = Release|Any CPU + {7B5CE655-EC0E-4E74-AD96-C50731D88D82}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {7B5CE655-EC0E-4E74-AD96-C50731D88D82}.Checked|arm.ActiveCfg = Debug|Any CPU + {7B5CE655-EC0E-4E74-AD96-C50731D88D82}.Checked|arm64.ActiveCfg = Debug|Any CPU + {7B5CE655-EC0E-4E74-AD96-C50731D88D82}.Checked|x64.ActiveCfg = Debug|Any CPU + {7B5CE655-EC0E-4E74-AD96-C50731D88D82}.Checked|x86.ActiveCfg = Debug|Any CPU + {ACABB6EA-7DBE-4AF8-81F8-6F86CCF4142C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ACABB6EA-7DBE-4AF8-81F8-6F86CCF4142C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ACABB6EA-7DBE-4AF8-81F8-6F86CCF4142C}.Debug|arm.ActiveCfg = Debug|Any CPU + {ACABB6EA-7DBE-4AF8-81F8-6F86CCF4142C}.Debug|arm64.ActiveCfg = Debug|Any CPU + {ACABB6EA-7DBE-4AF8-81F8-6F86CCF4142C}.Debug|x64.ActiveCfg = Debug|Any CPU + {ACABB6EA-7DBE-4AF8-81F8-6F86CCF4142C}.Debug|x64.Build.0 = Debug|Any CPU + {ACABB6EA-7DBE-4AF8-81F8-6F86CCF4142C}.Debug|x86.ActiveCfg = Debug|Any CPU + {ACABB6EA-7DBE-4AF8-81F8-6F86CCF4142C}.Debug|x86.Build.0 = Debug|Any CPU + {ACABB6EA-7DBE-4AF8-81F8-6F86CCF4142C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ACABB6EA-7DBE-4AF8-81F8-6F86CCF4142C}.Release|Any CPU.Build.0 = Release|Any CPU + {ACABB6EA-7DBE-4AF8-81F8-6F86CCF4142C}.Release|arm.ActiveCfg = Release|Any CPU + {ACABB6EA-7DBE-4AF8-81F8-6F86CCF4142C}.Release|arm64.ActiveCfg = Release|Any CPU + {ACABB6EA-7DBE-4AF8-81F8-6F86CCF4142C}.Release|x64.ActiveCfg = Release|Any CPU + {ACABB6EA-7DBE-4AF8-81F8-6F86CCF4142C}.Release|x64.Build.0 = Release|Any CPU + {ACABB6EA-7DBE-4AF8-81F8-6F86CCF4142C}.Release|x86.ActiveCfg = Release|Any CPU + {ACABB6EA-7DBE-4AF8-81F8-6F86CCF4142C}.Release|x86.Build.0 = Release|Any CPU + {ACABB6EA-7DBE-4AF8-81F8-6F86CCF4142C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {ACABB6EA-7DBE-4AF8-81F8-6F86CCF4142C}.Checked|arm.ActiveCfg = Debug|Any CPU + {ACABB6EA-7DBE-4AF8-81F8-6F86CCF4142C}.Checked|arm64.ActiveCfg = Debug|Any CPU + {ACABB6EA-7DBE-4AF8-81F8-6F86CCF4142C}.Checked|x64.ActiveCfg = Debug|Any CPU + {ACABB6EA-7DBE-4AF8-81F8-6F86CCF4142C}.Checked|x86.ActiveCfg = Debug|Any CPU {94E1FBF3-D07E-42CC-BDE9-195068C29632}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {94E1FBF3-D07E-42CC-BDE9-195068C29632}.Debug|Any CPU.Build.0 = Debug|Any CPU + {94E1FBF3-D07E-42CC-BDE9-195068C29632}.Debug|arm.ActiveCfg = Debug|Any CPU + {94E1FBF3-D07E-42CC-BDE9-195068C29632}.Debug|arm64.ActiveCfg = Debug|Any CPU + {94E1FBF3-D07E-42CC-BDE9-195068C29632}.Debug|x64.ActiveCfg = Debug|Any CPU + {94E1FBF3-D07E-42CC-BDE9-195068C29632}.Debug|x64.Build.0 = Debug|Any CPU + {94E1FBF3-D07E-42CC-BDE9-195068C29632}.Debug|x86.ActiveCfg = Debug|Any CPU + {94E1FBF3-D07E-42CC-BDE9-195068C29632}.Debug|x86.Build.0 = Debug|Any CPU {94E1FBF3-D07E-42CC-BDE9-195068C29632}.Release|Any CPU.ActiveCfg = Release|Any CPU {94E1FBF3-D07E-42CC-BDE9-195068C29632}.Release|Any CPU.Build.0 = Release|Any CPU + {94E1FBF3-D07E-42CC-BDE9-195068C29632}.Release|arm.ActiveCfg = Release|Any CPU + {94E1FBF3-D07E-42CC-BDE9-195068C29632}.Release|arm64.ActiveCfg = Release|Any CPU + {94E1FBF3-D07E-42CC-BDE9-195068C29632}.Release|x64.ActiveCfg = Release|Any CPU + {94E1FBF3-D07E-42CC-BDE9-195068C29632}.Release|x64.Build.0 = Release|Any CPU + {94E1FBF3-D07E-42CC-BDE9-195068C29632}.Release|x86.ActiveCfg = Release|Any CPU + {94E1FBF3-D07E-42CC-BDE9-195068C29632}.Release|x86.Build.0 = Release|Any CPU + {94E1FBF3-D07E-42CC-BDE9-195068C29632}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {94E1FBF3-D07E-42CC-BDE9-195068C29632}.Checked|arm.ActiveCfg = Debug|Any CPU + {94E1FBF3-D07E-42CC-BDE9-195068C29632}.Checked|arm64.ActiveCfg = Debug|Any CPU + {94E1FBF3-D07E-42CC-BDE9-195068C29632}.Checked|x64.ActiveCfg = Debug|Any CPU + {94E1FBF3-D07E-42CC-BDE9-195068C29632}.Checked|x86.ActiveCfg = Debug|Any CPU {05F3ED11-AB8C-47EA-BEB8-BB25FF5BC2C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {05F3ED11-AB8C-47EA-BEB8-BB25FF5BC2C5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {05F3ED11-AB8C-47EA-BEB8-BB25FF5BC2C5}.Debug|arm.ActiveCfg = Debug|Any CPU + {05F3ED11-AB8C-47EA-BEB8-BB25FF5BC2C5}.Debug|arm64.ActiveCfg = Debug|Any CPU + {05F3ED11-AB8C-47EA-BEB8-BB25FF5BC2C5}.Debug|x64.ActiveCfg = Debug|Any CPU + {05F3ED11-AB8C-47EA-BEB8-BB25FF5BC2C5}.Debug|x64.Build.0 = Debug|Any CPU + {05F3ED11-AB8C-47EA-BEB8-BB25FF5BC2C5}.Debug|x86.ActiveCfg = Debug|Any CPU + {05F3ED11-AB8C-47EA-BEB8-BB25FF5BC2C5}.Debug|x86.Build.0 = Debug|Any CPU {05F3ED11-AB8C-47EA-BEB8-BB25FF5BC2C5}.Release|Any CPU.ActiveCfg = Release|Any CPU {05F3ED11-AB8C-47EA-BEB8-BB25FF5BC2C5}.Release|Any CPU.Build.0 = Release|Any CPU + {05F3ED11-AB8C-47EA-BEB8-BB25FF5BC2C5}.Release|arm.ActiveCfg = Release|Any CPU + {05F3ED11-AB8C-47EA-BEB8-BB25FF5BC2C5}.Release|arm64.ActiveCfg = Release|Any CPU + {05F3ED11-AB8C-47EA-BEB8-BB25FF5BC2C5}.Release|x64.ActiveCfg = Release|Any CPU + {05F3ED11-AB8C-47EA-BEB8-BB25FF5BC2C5}.Release|x64.Build.0 = Release|Any CPU + {05F3ED11-AB8C-47EA-BEB8-BB25FF5BC2C5}.Release|x86.ActiveCfg = Release|Any CPU + {05F3ED11-AB8C-47EA-BEB8-BB25FF5BC2C5}.Release|x86.Build.0 = Release|Any CPU + {05F3ED11-AB8C-47EA-BEB8-BB25FF5BC2C5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {05F3ED11-AB8C-47EA-BEB8-BB25FF5BC2C5}.Checked|arm.ActiveCfg = Debug|Any CPU + {05F3ED11-AB8C-47EA-BEB8-BB25FF5BC2C5}.Checked|arm64.ActiveCfg = Debug|Any CPU + {05F3ED11-AB8C-47EA-BEB8-BB25FF5BC2C5}.Checked|x64.ActiveCfg = Debug|Any CPU + {05F3ED11-AB8C-47EA-BEB8-BB25FF5BC2C5}.Checked|x86.ActiveCfg = Debug|Any CPU {57DD5F0B-1CEE-4B33-9955-5CE4893EEFEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {57DD5F0B-1CEE-4B33-9955-5CE4893EEFEA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {57DD5F0B-1CEE-4B33-9955-5CE4893EEFEA}.Debug|arm.ActiveCfg = Debug|Any CPU + {57DD5F0B-1CEE-4B33-9955-5CE4893EEFEA}.Debug|arm64.ActiveCfg = Debug|Any CPU + {57DD5F0B-1CEE-4B33-9955-5CE4893EEFEA}.Debug|x64.ActiveCfg = Debug|Any CPU + {57DD5F0B-1CEE-4B33-9955-5CE4893EEFEA}.Debug|x64.Build.0 = Debug|Any CPU + {57DD5F0B-1CEE-4B33-9955-5CE4893EEFEA}.Debug|x86.ActiveCfg = Debug|Any CPU + {57DD5F0B-1CEE-4B33-9955-5CE4893EEFEA}.Debug|x86.Build.0 = Debug|Any CPU {57DD5F0B-1CEE-4B33-9955-5CE4893EEFEA}.Release|Any CPU.ActiveCfg = Release|Any CPU {57DD5F0B-1CEE-4B33-9955-5CE4893EEFEA}.Release|Any CPU.Build.0 = Release|Any CPU + {57DD5F0B-1CEE-4B33-9955-5CE4893EEFEA}.Release|arm.ActiveCfg = Release|Any CPU + {57DD5F0B-1CEE-4B33-9955-5CE4893EEFEA}.Release|arm64.ActiveCfg = Release|Any CPU + {57DD5F0B-1CEE-4B33-9955-5CE4893EEFEA}.Release|x64.ActiveCfg = Release|Any CPU + {57DD5F0B-1CEE-4B33-9955-5CE4893EEFEA}.Release|x64.Build.0 = Release|Any CPU + {57DD5F0B-1CEE-4B33-9955-5CE4893EEFEA}.Release|x86.ActiveCfg = Release|Any CPU + {57DD5F0B-1CEE-4B33-9955-5CE4893EEFEA}.Release|x86.Build.0 = Release|Any CPU + {57DD5F0B-1CEE-4B33-9955-5CE4893EEFEA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {57DD5F0B-1CEE-4B33-9955-5CE4893EEFEA}.Checked|arm.ActiveCfg = Debug|Any CPU + {57DD5F0B-1CEE-4B33-9955-5CE4893EEFEA}.Checked|arm64.ActiveCfg = Debug|Any CPU + {57DD5F0B-1CEE-4B33-9955-5CE4893EEFEA}.Checked|x64.ActiveCfg = Debug|Any CPU + {57DD5F0B-1CEE-4B33-9955-5CE4893EEFEA}.Checked|x86.ActiveCfg = Debug|Any CPU {2C9EFD7A-F153-47BF-B2E6-73094696DF45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2C9EFD7A-F153-47BF-B2E6-73094696DF45}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2C9EFD7A-F153-47BF-B2E6-73094696DF45}.Debug|arm.ActiveCfg = Debug|Any CPU + {2C9EFD7A-F153-47BF-B2E6-73094696DF45}.Debug|arm64.ActiveCfg = Debug|Any CPU + {2C9EFD7A-F153-47BF-B2E6-73094696DF45}.Debug|x64.ActiveCfg = Debug|Any CPU + {2C9EFD7A-F153-47BF-B2E6-73094696DF45}.Debug|x64.Build.0 = Debug|Any CPU + {2C9EFD7A-F153-47BF-B2E6-73094696DF45}.Debug|x86.ActiveCfg = Debug|Any CPU + {2C9EFD7A-F153-47BF-B2E6-73094696DF45}.Debug|x86.Build.0 = Debug|Any CPU {2C9EFD7A-F153-47BF-B2E6-73094696DF45}.Release|Any CPU.ActiveCfg = Release|Any CPU {2C9EFD7A-F153-47BF-B2E6-73094696DF45}.Release|Any CPU.Build.0 = Release|Any CPU + {2C9EFD7A-F153-47BF-B2E6-73094696DF45}.Release|arm.ActiveCfg = Release|Any CPU + {2C9EFD7A-F153-47BF-B2E6-73094696DF45}.Release|arm64.ActiveCfg = Release|Any CPU + {2C9EFD7A-F153-47BF-B2E6-73094696DF45}.Release|x64.ActiveCfg = Release|Any CPU + {2C9EFD7A-F153-47BF-B2E6-73094696DF45}.Release|x64.Build.0 = Release|Any CPU + {2C9EFD7A-F153-47BF-B2E6-73094696DF45}.Release|x86.ActiveCfg = Release|Any CPU + {2C9EFD7A-F153-47BF-B2E6-73094696DF45}.Release|x86.Build.0 = Release|Any CPU + {2C9EFD7A-F153-47BF-B2E6-73094696DF45}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {2C9EFD7A-F153-47BF-B2E6-73094696DF45}.Checked|arm.ActiveCfg = Debug|Any CPU + {2C9EFD7A-F153-47BF-B2E6-73094696DF45}.Checked|arm64.ActiveCfg = Debug|Any CPU + {2C9EFD7A-F153-47BF-B2E6-73094696DF45}.Checked|x64.ActiveCfg = Debug|Any CPU + {2C9EFD7A-F153-47BF-B2E6-73094696DF45}.Checked|x86.ActiveCfg = Debug|Any CPU + {877446C1-0835-444C-A210-45B0F55E03B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {877446C1-0835-444C-A210-45B0F55E03B6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {877446C1-0835-444C-A210-45B0F55E03B6}.Debug|arm.ActiveCfg = Debug|Any CPU + {877446C1-0835-444C-A210-45B0F55E03B6}.Debug|arm64.ActiveCfg = Debug|Any CPU + {877446C1-0835-444C-A210-45B0F55E03B6}.Debug|x64.ActiveCfg = Debug|Any CPU + {877446C1-0835-444C-A210-45B0F55E03B6}.Debug|x64.Build.0 = Debug|Any CPU + {877446C1-0835-444C-A210-45B0F55E03B6}.Debug|x86.ActiveCfg = Debug|Any CPU + {877446C1-0835-444C-A210-45B0F55E03B6}.Debug|x86.Build.0 = Debug|Any CPU + {877446C1-0835-444C-A210-45B0F55E03B6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {877446C1-0835-444C-A210-45B0F55E03B6}.Release|Any CPU.Build.0 = Release|Any CPU + {877446C1-0835-444C-A210-45B0F55E03B6}.Release|arm.ActiveCfg = Release|Any CPU + {877446C1-0835-444C-A210-45B0F55E03B6}.Release|arm64.ActiveCfg = Release|Any CPU + {877446C1-0835-444C-A210-45B0F55E03B6}.Release|x64.ActiveCfg = Release|Any CPU + {877446C1-0835-444C-A210-45B0F55E03B6}.Release|x64.Build.0 = Release|Any CPU + {877446C1-0835-444C-A210-45B0F55E03B6}.Release|x86.ActiveCfg = Release|Any CPU + {877446C1-0835-444C-A210-45B0F55E03B6}.Release|x86.Build.0 = Release|Any CPU + {877446C1-0835-444C-A210-45B0F55E03B6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {877446C1-0835-444C-A210-45B0F55E03B6}.Checked|arm.ActiveCfg = Debug|Any CPU + {877446C1-0835-444C-A210-45B0F55E03B6}.Checked|arm64.ActiveCfg = Debug|Any CPU + {877446C1-0835-444C-A210-45B0F55E03B6}.Checked|x64.ActiveCfg = Debug|Any CPU + {877446C1-0835-444C-A210-45B0F55E03B6}.Checked|x86.ActiveCfg = Debug|Any CPU + {58DD329D-4BEC-4C97-A9D5-6CFB51789D7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {58DD329D-4BEC-4C97-A9D5-6CFB51789D7A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {58DD329D-4BEC-4C97-A9D5-6CFB51789D7A}.Debug|arm.ActiveCfg = Debug|Any CPU + {58DD329D-4BEC-4C97-A9D5-6CFB51789D7A}.Debug|arm64.ActiveCfg = Debug|Any CPU + {58DD329D-4BEC-4C97-A9D5-6CFB51789D7A}.Debug|x64.ActiveCfg = Debug|Any CPU + {58DD329D-4BEC-4C97-A9D5-6CFB51789D7A}.Debug|x64.Build.0 = Debug|Any CPU + {58DD329D-4BEC-4C97-A9D5-6CFB51789D7A}.Debug|x86.ActiveCfg = Debug|Any CPU + {58DD329D-4BEC-4C97-A9D5-6CFB51789D7A}.Debug|x86.Build.0 = Debug|Any CPU + {58DD329D-4BEC-4C97-A9D5-6CFB51789D7A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {58DD329D-4BEC-4C97-A9D5-6CFB51789D7A}.Release|Any CPU.Build.0 = Release|Any CPU + {58DD329D-4BEC-4C97-A9D5-6CFB51789D7A}.Release|arm.ActiveCfg = Release|Any CPU + {58DD329D-4BEC-4C97-A9D5-6CFB51789D7A}.Release|arm64.ActiveCfg = Release|Any CPU + {58DD329D-4BEC-4C97-A9D5-6CFB51789D7A}.Release|x64.ActiveCfg = Release|Any CPU + {58DD329D-4BEC-4C97-A9D5-6CFB51789D7A}.Release|x64.Build.0 = Release|Any CPU + {58DD329D-4BEC-4C97-A9D5-6CFB51789D7A}.Release|x86.ActiveCfg = Release|Any CPU + {58DD329D-4BEC-4C97-A9D5-6CFB51789D7A}.Release|x86.Build.0 = Release|Any CPU + {58DD329D-4BEC-4C97-A9D5-6CFB51789D7A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {58DD329D-4BEC-4C97-A9D5-6CFB51789D7A}.Checked|arm.ActiveCfg = Debug|Any CPU + {58DD329D-4BEC-4C97-A9D5-6CFB51789D7A}.Checked|arm64.ActiveCfg = Debug|Any CPU + {58DD329D-4BEC-4C97-A9D5-6CFB51789D7A}.Checked|x64.ActiveCfg = Debug|Any CPU + {58DD329D-4BEC-4C97-A9D5-6CFB51789D7A}.Checked|x86.ActiveCfg = Debug|Any CPU + {DC917904-43C1-4369-BCDC-B96851F72526}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DC917904-43C1-4369-BCDC-B96851F72526}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DC917904-43C1-4369-BCDC-B96851F72526}.Debug|arm.ActiveCfg = Debug|Any CPU + {DC917904-43C1-4369-BCDC-B96851F72526}.Debug|arm64.ActiveCfg = Debug|Any CPU + {DC917904-43C1-4369-BCDC-B96851F72526}.Debug|x64.ActiveCfg = Debug|Any CPU + {DC917904-43C1-4369-BCDC-B96851F72526}.Debug|x64.Build.0 = Debug|Any CPU + {DC917904-43C1-4369-BCDC-B96851F72526}.Debug|x86.ActiveCfg = Debug|Any CPU + {DC917904-43C1-4369-BCDC-B96851F72526}.Debug|x86.Build.0 = Debug|Any CPU + {DC917904-43C1-4369-BCDC-B96851F72526}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DC917904-43C1-4369-BCDC-B96851F72526}.Release|Any CPU.Build.0 = Release|Any CPU + {DC917904-43C1-4369-BCDC-B96851F72526}.Release|arm.ActiveCfg = Release|Any CPU + {DC917904-43C1-4369-BCDC-B96851F72526}.Release|arm64.ActiveCfg = Release|Any CPU + {DC917904-43C1-4369-BCDC-B96851F72526}.Release|x64.ActiveCfg = Release|Any CPU + {DC917904-43C1-4369-BCDC-B96851F72526}.Release|x64.Build.0 = Release|Any CPU + {DC917904-43C1-4369-BCDC-B96851F72526}.Release|x86.ActiveCfg = Release|Any CPU + {DC917904-43C1-4369-BCDC-B96851F72526}.Release|x86.Build.0 = Release|Any CPU + {DC917904-43C1-4369-BCDC-B96851F72526}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {DC917904-43C1-4369-BCDC-B96851F72526}.Checked|arm.ActiveCfg = Debug|Any CPU + {DC917904-43C1-4369-BCDC-B96851F72526}.Checked|arm64.ActiveCfg = Debug|Any CPU + {DC917904-43C1-4369-BCDC-B96851F72526}.Checked|x64.ActiveCfg = Debug|Any CPU + {DC917904-43C1-4369-BCDC-B96851F72526}.Checked|x86.ActiveCfg = Debug|Any CPU + {A589EBE3-F42B-4FA8-A20E-174305B91514}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A589EBE3-F42B-4FA8-A20E-174305B91514}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A589EBE3-F42B-4FA8-A20E-174305B91514}.Debug|arm.ActiveCfg = Debug|Any CPU + {A589EBE3-F42B-4FA8-A20E-174305B91514}.Debug|arm64.ActiveCfg = Debug|Any CPU + {A589EBE3-F42B-4FA8-A20E-174305B91514}.Debug|x64.ActiveCfg = Debug|Any CPU + {A589EBE3-F42B-4FA8-A20E-174305B91514}.Debug|x64.Build.0 = Debug|Any CPU + {A589EBE3-F42B-4FA8-A20E-174305B91514}.Debug|x86.ActiveCfg = Debug|Any CPU + {A589EBE3-F42B-4FA8-A20E-174305B91514}.Debug|x86.Build.0 = Debug|Any CPU + {A589EBE3-F42B-4FA8-A20E-174305B91514}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A589EBE3-F42B-4FA8-A20E-174305B91514}.Release|Any CPU.Build.0 = Release|Any CPU + {A589EBE3-F42B-4FA8-A20E-174305B91514}.Release|arm.ActiveCfg = Release|Any CPU + {A589EBE3-F42B-4FA8-A20E-174305B91514}.Release|arm64.ActiveCfg = Release|Any CPU + {A589EBE3-F42B-4FA8-A20E-174305B91514}.Release|x64.ActiveCfg = Release|Any CPU + {A589EBE3-F42B-4FA8-A20E-174305B91514}.Release|x64.Build.0 = Release|Any CPU + {A589EBE3-F42B-4FA8-A20E-174305B91514}.Release|x86.ActiveCfg = Release|Any CPU + {A589EBE3-F42B-4FA8-A20E-174305B91514}.Release|x86.Build.0 = Release|Any CPU + {A589EBE3-F42B-4FA8-A20E-174305B91514}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {A589EBE3-F42B-4FA8-A20E-174305B91514}.Checked|arm.ActiveCfg = Debug|Any CPU + {A589EBE3-F42B-4FA8-A20E-174305B91514}.Checked|arm64.ActiveCfg = Debug|Any CPU + {A589EBE3-F42B-4FA8-A20E-174305B91514}.Checked|x64.ActiveCfg = Debug|Any CPU + {A589EBE3-F42B-4FA8-A20E-174305B91514}.Checked|x86.ActiveCfg = Debug|Any CPU + {034E0757-DF29-4FB0-B75F-0E60C13979FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {034E0757-DF29-4FB0-B75F-0E60C13979FB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {034E0757-DF29-4FB0-B75F-0E60C13979FB}.Debug|arm.ActiveCfg = Debug|Any CPU + {034E0757-DF29-4FB0-B75F-0E60C13979FB}.Debug|arm64.ActiveCfg = Debug|Any CPU + {034E0757-DF29-4FB0-B75F-0E60C13979FB}.Debug|x64.ActiveCfg = Debug|Any CPU + {034E0757-DF29-4FB0-B75F-0E60C13979FB}.Debug|x64.Build.0 = Debug|Any CPU + {034E0757-DF29-4FB0-B75F-0E60C13979FB}.Debug|x86.ActiveCfg = Debug|Any CPU + {034E0757-DF29-4FB0-B75F-0E60C13979FB}.Debug|x86.Build.0 = Debug|Any CPU + {034E0757-DF29-4FB0-B75F-0E60C13979FB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {034E0757-DF29-4FB0-B75F-0E60C13979FB}.Release|Any CPU.Build.0 = Release|Any CPU + {034E0757-DF29-4FB0-B75F-0E60C13979FB}.Release|arm.ActiveCfg = Release|Any CPU + {034E0757-DF29-4FB0-B75F-0E60C13979FB}.Release|arm64.ActiveCfg = Release|Any CPU + {034E0757-DF29-4FB0-B75F-0E60C13979FB}.Release|x64.ActiveCfg = Release|Any CPU + {034E0757-DF29-4FB0-B75F-0E60C13979FB}.Release|x64.Build.0 = Release|Any CPU + {034E0757-DF29-4FB0-B75F-0E60C13979FB}.Release|x86.ActiveCfg = Release|Any CPU + {034E0757-DF29-4FB0-B75F-0E60C13979FB}.Release|x86.Build.0 = Release|Any CPU + {034E0757-DF29-4FB0-B75F-0E60C13979FB}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {034E0757-DF29-4FB0-B75F-0E60C13979FB}.Checked|arm.ActiveCfg = Debug|Any CPU + {034E0757-DF29-4FB0-B75F-0E60C13979FB}.Checked|arm64.ActiveCfg = Debug|Any CPU + {034E0757-DF29-4FB0-B75F-0E60C13979FB}.Checked|x64.ActiveCfg = Debug|Any CPU + {034E0757-DF29-4FB0-B75F-0E60C13979FB}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution + {DC7157AB-FE04-4031-BCF5-400DFCFB1265} = {6BC78072-0377-4A0D-890F-C69B51C4FD86} {16B2F442-5A88-4C59-A9FE-AB4357D3E657} = {BF25957F-9188-4CD6-9581-8E1C998E5AAB} {88125FEA-D679-4A1A-8736-A18EC13AFC75} = {BF25957F-9188-4CD6-9581-8E1C998E5AAB} + {2D7986A0-48B8-4DB3-A111-CA8DE1F74769} = {D4881A9A-F082-40A1-ABC4-DE232ABB22BA} + {3AFF1901-8D72-43CF-AFE2-0F8A5CFD5C3F} = {D4881A9A-F082-40A1-ABC4-DE232ABB22BA} + {D9ACE205-2927-4D66-8E6F-D2C1E6E6239D} = {D4881A9A-F082-40A1-ABC4-DE232ABB22BA} + {77530357-B4AC-4879-850C-CD4231AA707F} = {D4881A9A-F082-40A1-ABC4-DE232ABB22BA} + {ACABB6EA-7DBE-4AF8-81F8-6F86CCF4142C} = {D4881A9A-F082-40A1-ABC4-DE232ABB22BA} + {05F3ED11-AB8C-47EA-BEB8-BB25FF5BC2C5} = {D4881A9A-F082-40A1-ABC4-DE232ABB22BA} + {2C9EFD7A-F153-47BF-B2E6-73094696DF45} = {D4881A9A-F082-40A1-ABC4-DE232ABB22BA} {CBD0D70E-1470-43BF-BE8D-59756A3A2364} = {CBCF137A-F5AD-4CCC-8888-F4B30426B5DE} {CB10AFC2-FC8C-49B4-9BB1-6410E4D3A30A} = {CBCF137A-F5AD-4CCC-8888-F4B30426B5DE} + {4BE9DDC8-B128-4913-9B2F-0513E9C69991} = {CBCF137A-F5AD-4CCC-8888-F4B30426B5DE} {7B5CE655-EC0E-4E74-AD96-C50731D88D82} = {CBCF137A-F5AD-4CCC-8888-F4B30426B5DE} {94E1FBF3-D07E-42CC-BDE9-195068C29632} = {CBCF137A-F5AD-4CCC-8888-F4B30426B5DE} {57DD5F0B-1CEE-4B33-9955-5CE4893EEFEA} = {CBCF137A-F5AD-4CCC-8888-F4B30426B5DE} - {3AFF1901-8D72-43CF-AFE2-0F8A5CFD5C3F} = {D4881A9A-F082-40A1-ABC4-DE232ABB22BA} - {D9ACE205-2927-4D66-8E6F-D2C1E6E6239D} = {D4881A9A-F082-40A1-ABC4-DE232ABB22BA} - {05F3ED11-AB8C-47EA-BEB8-BB25FF5BC2C5} = {D4881A9A-F082-40A1-ABC4-DE232ABB22BA} - {2C9EFD7A-F153-47BF-B2E6-73094696DF45} = {D4881A9A-F082-40A1-ABC4-DE232ABB22BA} - {F7489DD4-0C1E-456B-ADF3-D5F8F22E8875} = {3424E375-E1DA-46BA-91D2-E1EA86BAF98F} + {15DD6643-975E-47DC-83F2-5A734CA8C027} = {3424E375-E1DA-46BA-91D2-E1EA86BAF98F} {CB45B17E-7E90-4687-B5CB-697D761FAF8C} = {3424E375-E1DA-46BA-91D2-E1EA86BAF98F} {4DAA9EA7-245F-45D6-8061-010F7AA64752} = {3424E375-E1DA-46BA-91D2-E1EA86BAF98F} + {877446C1-0835-444C-A210-45B0F55E03B6} = {A7BCEB40-DA50-4D87-8D82-FD5DEEB85C6F} + {58DD329D-4BEC-4C97-A9D5-6CFB51789D7A} = {A7BCEB40-DA50-4D87-8D82-FD5DEEB85C6F} + {A7BCEB40-DA50-4D87-8D82-FD5DEEB85C6F} = {DC513735-2375-4EA7-AEA8-CBE509248CE1} + {DC917904-43C1-4369-BCDC-B96851F72526} = {F1C82E5D-F07F-4FF8-87FC-A460E6578F7A} + {A589EBE3-F42B-4FA8-A20E-174305B91514} = {F1C82E5D-F07F-4FF8-87FC-A460E6578F7A} + {F1C82E5D-F07F-4FF8-87FC-A460E6578F7A} = {DC513735-2375-4EA7-AEA8-CBE509248CE1} + {034E0757-DF29-4FB0-B75F-0E60C13979FB} = {5BBF5679-8F82-4601-9BF3-A619CC20171D} + {5BBF5679-8F82-4601-9BF3-A619CC20171D} = {DC513735-2375-4EA7-AEA8-CBE509248CE1} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C61D5D56-FD5E-4BF4-89D0-E7A23AE83333} diff --git a/src/libraries/System.IO.MemoryMappedFiles/System.IO.MemoryMappedFiles.sln b/src/libraries/System.IO.MemoryMappedFiles/System.IO.MemoryMappedFiles.sln index 3921c4c8253645..40578971dacb06 100644 --- a/src/libraries/System.IO.MemoryMappedFiles/System.IO.MemoryMappedFiles.sln +++ b/src/libraries/System.IO.MemoryMappedFiles/System.IO.MemoryMappedFiles.sln @@ -21,6 +21,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.InteropServi EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{50241163-53A9-458C-9012-2F17E0CAA201}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{C29327C1-7EF9-4D77-968E-F4AAC9310454}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{B31D95E3-0BAD-4D9E-B12A-737B66E791B9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{428128AD-30E4-4F3F-9BC2-909CF926D696}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{0A7F97B6-CB1E-4D90-A7A6-2CD366BC0171}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{9C723ABA-61D6-4522-8DB5-ADF664ED10B0}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{E9193727-72AB-4A35-BABF-A11D7C1A8B04}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{E91F427C-6CD7-496B-B4E8-D837CB8B96F8}" @@ -29,6 +39,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{7CDB9185-B43 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{AF9FF36B-5C67-40C3-9BC4-5C8FE09956E2}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{615FBB6B-8AEC-4964-9EEB-C79D543B693D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{4101EF52-1BE9-4718-A1A8-F7672F748424}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{27BFC1FC-EA0B-4B24-8DD7-3C9BBD4872AB}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{9625D55F-8524-4A03-8CD0-E9B19F14AF44}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -79,6 +97,26 @@ Global {50241163-53A9-458C-9012-2F17E0CAA201}.Debug|Any CPU.Build.0 = Debug|Any CPU {50241163-53A9-458C-9012-2F17E0CAA201}.Release|Any CPU.ActiveCfg = Release|Any CPU {50241163-53A9-458C-9012-2F17E0CAA201}.Release|Any CPU.Build.0 = Release|Any CPU + {C29327C1-7EF9-4D77-968E-F4AAC9310454}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C29327C1-7EF9-4D77-968E-F4AAC9310454}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C29327C1-7EF9-4D77-968E-F4AAC9310454}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C29327C1-7EF9-4D77-968E-F4AAC9310454}.Release|Any CPU.Build.0 = Release|Any CPU + {B31D95E3-0BAD-4D9E-B12A-737B66E791B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B31D95E3-0BAD-4D9E-B12A-737B66E791B9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B31D95E3-0BAD-4D9E-B12A-737B66E791B9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B31D95E3-0BAD-4D9E-B12A-737B66E791B9}.Release|Any CPU.Build.0 = Release|Any CPU + {428128AD-30E4-4F3F-9BC2-909CF926D696}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {428128AD-30E4-4F3F-9BC2-909CF926D696}.Debug|Any CPU.Build.0 = Debug|Any CPU + {428128AD-30E4-4F3F-9BC2-909CF926D696}.Release|Any CPU.ActiveCfg = Release|Any CPU + {428128AD-30E4-4F3F-9BC2-909CF926D696}.Release|Any CPU.Build.0 = Release|Any CPU + {0A7F97B6-CB1E-4D90-A7A6-2CD366BC0171}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0A7F97B6-CB1E-4D90-A7A6-2CD366BC0171}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0A7F97B6-CB1E-4D90-A7A6-2CD366BC0171}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0A7F97B6-CB1E-4D90-A7A6-2CD366BC0171}.Release|Any CPU.Build.0 = Release|Any CPU + {9C723ABA-61D6-4522-8DB5-ADF664ED10B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9C723ABA-61D6-4522-8DB5-ADF664ED10B0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9C723ABA-61D6-4522-8DB5-ADF664ED10B0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9C723ABA-61D6-4522-8DB5-ADF664ED10B0}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -95,6 +133,14 @@ Global {C96C1E8C-7C96-42F8-ABEB-0D17B44F203E} = {AF9FF36B-5C67-40C3-9BC4-5C8FE09956E2} {08C7C81E-76EF-49D1-A9AA-CB2E0AB6A913} = {AF9FF36B-5C67-40C3-9BC4-5C8FE09956E2} {3D0ED921-30AE-4D7C-BFE7-CC4BD0CE9B40} = {AF9FF36B-5C67-40C3-9BC4-5C8FE09956E2} + {C29327C1-7EF9-4D77-968E-F4AAC9310454} = {615FBB6B-8AEC-4964-9EEB-C79D543B693D} + {B31D95E3-0BAD-4D9E-B12A-737B66E791B9} = {615FBB6B-8AEC-4964-9EEB-C79D543B693D} + {615FBB6B-8AEC-4964-9EEB-C79D543B693D} = {9625D55F-8524-4A03-8CD0-E9B19F14AF44} + {428128AD-30E4-4F3F-9BC2-909CF926D696} = {4101EF52-1BE9-4718-A1A8-F7672F748424} + {0A7F97B6-CB1E-4D90-A7A6-2CD366BC0171} = {4101EF52-1BE9-4718-A1A8-F7672F748424} + {4101EF52-1BE9-4718-A1A8-F7672F748424} = {9625D55F-8524-4A03-8CD0-E9B19F14AF44} + {9C723ABA-61D6-4522-8DB5-ADF664ED10B0} = {27BFC1FC-EA0B-4B24-8DD7-3C9BBD4872AB} + {27BFC1FC-EA0B-4B24-8DD7-3C9BBD4872AB} = {9625D55F-8524-4A03-8CD0-E9B19F14AF44} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {F8DDBB46-7ACE-4C13-91B4-FFB7E93363D9} diff --git a/src/libraries/System.IO.Packaging/System.IO.Packaging.sln b/src/libraries/System.IO.Packaging/System.IO.Packaging.sln index 8d5ff20ef65a3d..b0b39fab297600 100644 --- a/src/libraries/System.IO.Packaging/System.IO.Packaging.sln +++ b/src/libraries/System.IO.Packaging/System.IO.Packaging.sln @@ -7,12 +7,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO.Packaging", "src\ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO.Packaging.Tests", "tests\System.IO.Packaging.Tests.csproj", "{588B83D6-132B-4399-B31E-4B40CD9CCAE6}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{93D098C7-7786-4B42-BAB3-36AE50C6241A}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{E58B740D-A353-4D96-857F-0C6898A0BAAB}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{5C4BD3D4-565A-4DB3-9AA7-13C0D52B1EE0}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{030B7BEE-4BBF-4DDC-B78B-8E9B580E76E9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{881F49D0-05B7-4D4C-9E06-C13F5A3B64B7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{D91D128B-CF60-4E10-9904-02C2E3470BF3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{1433AE94-C1FE-4698-9EEE-4CD819631F51}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{FFA44787-1321-479E-A6D2-BD9443A42457}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{CDE13DDC-F9E2-4C5F-9379-26E3273B7270}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{A31F533C-5EA6-4E97-91B1-C298BE0060E0}" @@ -21,6 +29,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A767928D-1A4 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{89942E1D-4F98-4CEF-B275-8A30127462BE}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{1B2237D8-B3D9-4C88-80C0-35893455C02B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{6EDFBC48-78B9-4159-A450-C5303530F114}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{C2A60053-E75F-4255-BF07-4F5C2213FC6C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{7C1E951C-EF1F-4B0C-9B10-423A4B4776D6}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -43,10 +59,6 @@ Global {588B83D6-132B-4399-B31E-4B40CD9CCAE6}.Debug|Any CPU.Build.0 = Debug|Any CPU {588B83D6-132B-4399-B31E-4B40CD9CCAE6}.Release|Any CPU.ActiveCfg = Release|Any CPU {588B83D6-132B-4399-B31E-4B40CD9CCAE6}.Release|Any CPU.Build.0 = Release|Any CPU - {93D098C7-7786-4B42-BAB3-36AE50C6241A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {93D098C7-7786-4B42-BAB3-36AE50C6241A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {93D098C7-7786-4B42-BAB3-36AE50C6241A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {93D098C7-7786-4B42-BAB3-36AE50C6241A}.Release|Any CPU.Build.0 = Release|Any CPU {E58B740D-A353-4D96-857F-0C6898A0BAAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E58B740D-A353-4D96-857F-0C6898A0BAAB}.Debug|Any CPU.Build.0 = Debug|Any CPU {E58B740D-A353-4D96-857F-0C6898A0BAAB}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -55,6 +67,26 @@ Global {5C4BD3D4-565A-4DB3-9AA7-13C0D52B1EE0}.Debug|Any CPU.Build.0 = Debug|Any CPU {5C4BD3D4-565A-4DB3-9AA7-13C0D52B1EE0}.Release|Any CPU.ActiveCfg = Release|Any CPU {5C4BD3D4-565A-4DB3-9AA7-13C0D52B1EE0}.Release|Any CPU.Build.0 = Release|Any CPU + {030B7BEE-4BBF-4DDC-B78B-8E9B580E76E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {030B7BEE-4BBF-4DDC-B78B-8E9B580E76E9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {030B7BEE-4BBF-4DDC-B78B-8E9B580E76E9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {030B7BEE-4BBF-4DDC-B78B-8E9B580E76E9}.Release|Any CPU.Build.0 = Release|Any CPU + {881F49D0-05B7-4D4C-9E06-C13F5A3B64B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {881F49D0-05B7-4D4C-9E06-C13F5A3B64B7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {881F49D0-05B7-4D4C-9E06-C13F5A3B64B7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {881F49D0-05B7-4D4C-9E06-C13F5A3B64B7}.Release|Any CPU.Build.0 = Release|Any CPU + {D91D128B-CF60-4E10-9904-02C2E3470BF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D91D128B-CF60-4E10-9904-02C2E3470BF3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D91D128B-CF60-4E10-9904-02C2E3470BF3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D91D128B-CF60-4E10-9904-02C2E3470BF3}.Release|Any CPU.Build.0 = Release|Any CPU + {1433AE94-C1FE-4698-9EEE-4CD819631F51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1433AE94-C1FE-4698-9EEE-4CD819631F51}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1433AE94-C1FE-4698-9EEE-4CD819631F51}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1433AE94-C1FE-4698-9EEE-4CD819631F51}.Release|Any CPU.Build.0 = Release|Any CPU + {FFA44787-1321-479E-A6D2-BD9443A42457}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FFA44787-1321-479E-A6D2-BD9443A42457}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FFA44787-1321-479E-A6D2-BD9443A42457}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FFA44787-1321-479E-A6D2-BD9443A42457}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -64,9 +96,16 @@ Global {588B83D6-132B-4399-B31E-4B40CD9CCAE6} = {CDE13DDC-F9E2-4C5F-9379-26E3273B7270} {6EF662E4-9A1E-4DAC-A04B-A1461BB6CA28} = {A31F533C-5EA6-4E97-91B1-C298BE0060E0} {C553FA20-C4C0-48A2-B841-12F2F860E21F} = {A767928D-1A4C-4513-9FF6-CB395D45B6A8} - {93D098C7-7786-4B42-BAB3-36AE50C6241A} = {89942E1D-4F98-4CEF-B275-8A30127462BE} {E58B740D-A353-4D96-857F-0C6898A0BAAB} = {89942E1D-4F98-4CEF-B275-8A30127462BE} {5C4BD3D4-565A-4DB3-9AA7-13C0D52B1EE0} = {89942E1D-4F98-4CEF-B275-8A30127462BE} + {030B7BEE-4BBF-4DDC-B78B-8E9B580E76E9} = {1B2237D8-B3D9-4C88-80C0-35893455C02B} + {881F49D0-05B7-4D4C-9E06-C13F5A3B64B7} = {1B2237D8-B3D9-4C88-80C0-35893455C02B} + {1B2237D8-B3D9-4C88-80C0-35893455C02B} = {7C1E951C-EF1F-4B0C-9B10-423A4B4776D6} + {D91D128B-CF60-4E10-9904-02C2E3470BF3} = {6EDFBC48-78B9-4159-A450-C5303530F114} + {1433AE94-C1FE-4698-9EEE-4CD819631F51} = {6EDFBC48-78B9-4159-A450-C5303530F114} + {6EDFBC48-78B9-4159-A450-C5303530F114} = {7C1E951C-EF1F-4B0C-9B10-423A4B4776D6} + {FFA44787-1321-479E-A6D2-BD9443A42457} = {C2A60053-E75F-4255-BF07-4F5C2213FC6C} + {C2A60053-E75F-4255-BF07-4F5C2213FC6C} = {7C1E951C-EF1F-4B0C-9B10-423A4B4776D6} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {8F459277-2162-4A3B-BB19-29D4292EFC1F} diff --git a/src/libraries/System.IO.Pipelines/System.IO.Pipelines.sln b/src/libraries/System.IO.Pipelines/System.IO.Pipelines.sln index 73fd1d07e27e2d..e5ed8ed948abbe 100644 --- a/src/libraries/System.IO.Pipelines/System.IO.Pipelines.sln +++ b/src/libraries/System.IO.Pipelines/System.IO.Pipelines.sln @@ -9,12 +9,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO.Pipelines", "src\ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO.Pipelines.Tests", "tests\System.IO.Pipelines.Tests.csproj", "{1B97BE49-ACAD-4DC9-B195-FE23C3DE5D08}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{7920EFCD-4320-4B04-84C8-83E3D22505FF}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{EB66BC9F-8895-494C-81CD-5F64A7DA1D4D}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{1A609A5A-8D99-4849-AF21-BB7510070C49}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{364A0F25-54E3-4B0B-A2E9-123621F19374}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{48BF97DB-A17B-4A8A-9EC4-1650B5517789}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{554C5C3B-D6A5-43E1-B4CE-8FEEF9CF6A39}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{E05F2E14-1217-442F-8F37-8D270B4E5144}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{66B1776B-73F3-4711-976C-5DCE394FBC5E}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{6FCDC00D-202F-4BFE-B799-DFD3F2E8F44D}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{BC2B926D-1416-4330-A62B-EC48667E0E7B}" @@ -23,6 +31,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{0F960DB3-8D8 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{68B6BB77-1325-4BD7-95B1-67ECA89889E8}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{826BB2FE-0019-4404-A783-6381E099773C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{13357657-3D6F-4C5B-B8B9-10DDA9DED683}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{BEE6D12B-050E-42FD-B159-28FA599D6A01}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{3B96876A-3995-4F54-BE6A-CEBA84A12D0A}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -49,10 +65,6 @@ Global {1B97BE49-ACAD-4DC9-B195-FE23C3DE5D08}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B97BE49-ACAD-4DC9-B195-FE23C3DE5D08}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B97BE49-ACAD-4DC9-B195-FE23C3DE5D08}.Release|Any CPU.Build.0 = Release|Any CPU - {7920EFCD-4320-4B04-84C8-83E3D22505FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7920EFCD-4320-4B04-84C8-83E3D22505FF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7920EFCD-4320-4B04-84C8-83E3D22505FF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7920EFCD-4320-4B04-84C8-83E3D22505FF}.Release|Any CPU.Build.0 = Release|Any CPU {EB66BC9F-8895-494C-81CD-5F64A7DA1D4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EB66BC9F-8895-494C-81CD-5F64A7DA1D4D}.Debug|Any CPU.Build.0 = Debug|Any CPU {EB66BC9F-8895-494C-81CD-5F64A7DA1D4D}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -61,6 +73,26 @@ Global {1A609A5A-8D99-4849-AF21-BB7510070C49}.Debug|Any CPU.Build.0 = Debug|Any CPU {1A609A5A-8D99-4849-AF21-BB7510070C49}.Release|Any CPU.ActiveCfg = Release|Any CPU {1A609A5A-8D99-4849-AF21-BB7510070C49}.Release|Any CPU.Build.0 = Release|Any CPU + {364A0F25-54E3-4B0B-A2E9-123621F19374}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {364A0F25-54E3-4B0B-A2E9-123621F19374}.Debug|Any CPU.Build.0 = Debug|Any CPU + {364A0F25-54E3-4B0B-A2E9-123621F19374}.Release|Any CPU.ActiveCfg = Release|Any CPU + {364A0F25-54E3-4B0B-A2E9-123621F19374}.Release|Any CPU.Build.0 = Release|Any CPU + {48BF97DB-A17B-4A8A-9EC4-1650B5517789}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {48BF97DB-A17B-4A8A-9EC4-1650B5517789}.Debug|Any CPU.Build.0 = Debug|Any CPU + {48BF97DB-A17B-4A8A-9EC4-1650B5517789}.Release|Any CPU.ActiveCfg = Release|Any CPU + {48BF97DB-A17B-4A8A-9EC4-1650B5517789}.Release|Any CPU.Build.0 = Release|Any CPU + {554C5C3B-D6A5-43E1-B4CE-8FEEF9CF6A39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {554C5C3B-D6A5-43E1-B4CE-8FEEF9CF6A39}.Debug|Any CPU.Build.0 = Debug|Any CPU + {554C5C3B-D6A5-43E1-B4CE-8FEEF9CF6A39}.Release|Any CPU.ActiveCfg = Release|Any CPU + {554C5C3B-D6A5-43E1-B4CE-8FEEF9CF6A39}.Release|Any CPU.Build.0 = Release|Any CPU + {E05F2E14-1217-442F-8F37-8D270B4E5144}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E05F2E14-1217-442F-8F37-8D270B4E5144}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E05F2E14-1217-442F-8F37-8D270B4E5144}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E05F2E14-1217-442F-8F37-8D270B4E5144}.Release|Any CPU.Build.0 = Release|Any CPU + {66B1776B-73F3-4711-976C-5DCE394FBC5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {66B1776B-73F3-4711-976C-5DCE394FBC5E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {66B1776B-73F3-4711-976C-5DCE394FBC5E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {66B1776B-73F3-4711-976C-5DCE394FBC5E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -71,9 +103,16 @@ Global {1B97BE49-ACAD-4DC9-B195-FE23C3DE5D08} = {6FCDC00D-202F-4BFE-B799-DFD3F2E8F44D} {DC148B85-05DB-43B2-B2AF-958C305C2C0A} = {BC2B926D-1416-4330-A62B-EC48667E0E7B} {1DD520A2-ED75-4889-848E-DBDC7BE41873} = {0F960DB3-8D87-4D62-BF68-75299FED62F7} - {7920EFCD-4320-4B04-84C8-83E3D22505FF} = {68B6BB77-1325-4BD7-95B1-67ECA89889E8} {EB66BC9F-8895-494C-81CD-5F64A7DA1D4D} = {68B6BB77-1325-4BD7-95B1-67ECA89889E8} {1A609A5A-8D99-4849-AF21-BB7510070C49} = {68B6BB77-1325-4BD7-95B1-67ECA89889E8} + {364A0F25-54E3-4B0B-A2E9-123621F19374} = {826BB2FE-0019-4404-A783-6381E099773C} + {48BF97DB-A17B-4A8A-9EC4-1650B5517789} = {826BB2FE-0019-4404-A783-6381E099773C} + {826BB2FE-0019-4404-A783-6381E099773C} = {3B96876A-3995-4F54-BE6A-CEBA84A12D0A} + {554C5C3B-D6A5-43E1-B4CE-8FEEF9CF6A39} = {13357657-3D6F-4C5B-B8B9-10DDA9DED683} + {E05F2E14-1217-442F-8F37-8D270B4E5144} = {13357657-3D6F-4C5B-B8B9-10DDA9DED683} + {13357657-3D6F-4C5B-B8B9-10DDA9DED683} = {3B96876A-3995-4F54-BE6A-CEBA84A12D0A} + {66B1776B-73F3-4711-976C-5DCE394FBC5E} = {BEE6D12B-050E-42FD-B159-28FA599D6A01} + {BEE6D12B-050E-42FD-B159-28FA599D6A01} = {3B96876A-3995-4F54-BE6A-CEBA84A12D0A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2034EAE9-84E4-42C3-8C1F-AB515D313D5E} diff --git a/src/libraries/System.IO.Pipelines/src/System.IO.Pipelines.csproj b/src/libraries/System.IO.Pipelines/src/System.IO.Pipelines.csproj index 21a70121f3e68d..4a3e990271819d 100644 --- a/src/libraries/System.IO.Pipelines/src/System.IO.Pipelines.csproj +++ b/src/libraries/System.IO.Pipelines/src/System.IO.Pipelines.csproj @@ -1,4 +1,5 @@ + $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) true @@ -53,9 +54,7 @@ System.IO.Pipelines.PipeReader - - @@ -64,4 +63,5 @@ System.IO.Pipelines.PipeReader + diff --git a/src/libraries/System.IO.Pipelines/tests/PipeWriterTests.cs b/src/libraries/System.IO.Pipelines/tests/PipeWriterTests.cs index 7cc75ef4ef424f..14159d2450cc78 100644 --- a/src/libraries/System.IO.Pipelines/tests/PipeWriterTests.cs +++ b/src/libraries/System.IO.Pipelines/tests/PipeWriterTests.cs @@ -294,6 +294,7 @@ public async Task WritesUsingGetMemoryWorks() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91547", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task CompleteWithLargeWriteThrows() { var completeDelay = TimeSpan.FromMilliseconds(10); diff --git a/src/libraries/System.IO.Pipelines/tests/SchedulerFacts.cs b/src/libraries/System.IO.Pipelines/tests/SchedulerFacts.cs index ba558339b0a057..42b92efbc1369c 100644 --- a/src/libraries/System.IO.Pipelines/tests/SchedulerFacts.cs +++ b/src/libraries/System.IO.Pipelines/tests/SchedulerFacts.cs @@ -181,6 +181,7 @@ public async Task DefaultReaderSchedulerIgnoresSyncContextIfConfigureAwaitFalse( } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task DefaultReaderSchedulerRunsOnThreadPool() { var pipe = new Pipe(new PipeOptions(useSynchronizationContext: false)); @@ -210,6 +211,7 @@ public async Task DefaultReaderSchedulerRunsOnThreadPool() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task DefaultWriterSchedulerRunsOnThreadPool() { using (var pool = new TestMemoryPool()) @@ -411,6 +413,7 @@ public async Task DefaultWriterSchedulerIgnoresSynchronizationContext() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task FlushCallbackRunsOnWriterScheduler() { using (var pool = new TestMemoryPool()) @@ -456,6 +459,7 @@ public async Task FlushCallbackRunsOnWriterScheduler() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task ReadAsyncCallbackRunsOnReaderScheduler() { using (var pool = new TestMemoryPool()) @@ -489,6 +493,7 @@ public async Task ReadAsyncCallbackRunsOnReaderScheduler() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task ThreadPoolScheduler_SchedulesOnThreadPool() { var pipe = new Pipe(new PipeOptions(readerScheduler: PipeScheduler.ThreadPool, writerScheduler: PipeScheduler.Inline, useSynchronizationContext: false)); diff --git a/src/libraries/System.IO.Pipes.AccessControl/System.IO.Pipes.AccessControl.sln b/src/libraries/System.IO.Pipes.AccessControl/System.IO.Pipes.AccessControl.sln index 899da879c05256..9e3ced82944d95 100644 --- a/src/libraries/System.IO.Pipes.AccessControl/System.IO.Pipes.AccessControl.sln +++ b/src/libraries/System.IO.Pipes.AccessControl/System.IO.Pipes.AccessControl.sln @@ -27,6 +27,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Claims", ". EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Principal.Windows", "..\System.Security.Principal.Windows\ref\System.Security.Principal.Windows.csproj", "{F04E416F-8A9C-4670-BE1E-22E5D7E7209F}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{3922D31C-0F73-4E87-BE10-72BF6AF73494}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{B358C598-E691-473A-957C-C93C94A8BA21}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{CE6136ED-5D01-451A-8AA2-46D92936FCA6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{C456C00D-7215-4968-8104-74508F29F1B4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{A138BEEF-C1D2-4204-A1CE-E02CB6A7E2A9}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{E1F66F1E-923F-4B07-A1E9-3F1BB01F221A}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{ADDC6FEE-EDF2-4EAD-B802-1BCF686E0D71}" @@ -35,6 +45,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{F8E1D6D4-F8B EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{EB85C209-FC5D-455A-8BFE-E7B0D9CC48E8}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{BF96303B-6A5C-4F00-B364-8F8ED50D1C75}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{EA0E381E-0C3E-4EDB-809B-A98F8EB30C98}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{4DDE06DC-923D-4CD7-B4B2-D02D57282585}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{DC0128DE-CF85-4E7C-B6E2-B405CBEB41F1}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -97,6 +115,26 @@ Global {F04E416F-8A9C-4670-BE1E-22E5D7E7209F}.Debug|Any CPU.Build.0 = Debug|Any CPU {F04E416F-8A9C-4670-BE1E-22E5D7E7209F}.Release|Any CPU.ActiveCfg = Release|Any CPU {F04E416F-8A9C-4670-BE1E-22E5D7E7209F}.Release|Any CPU.Build.0 = Release|Any CPU + {3922D31C-0F73-4E87-BE10-72BF6AF73494}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3922D31C-0F73-4E87-BE10-72BF6AF73494}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3922D31C-0F73-4E87-BE10-72BF6AF73494}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3922D31C-0F73-4E87-BE10-72BF6AF73494}.Release|Any CPU.Build.0 = Release|Any CPU + {B358C598-E691-473A-957C-C93C94A8BA21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B358C598-E691-473A-957C-C93C94A8BA21}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B358C598-E691-473A-957C-C93C94A8BA21}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B358C598-E691-473A-957C-C93C94A8BA21}.Release|Any CPU.Build.0 = Release|Any CPU + {CE6136ED-5D01-451A-8AA2-46D92936FCA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CE6136ED-5D01-451A-8AA2-46D92936FCA6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CE6136ED-5D01-451A-8AA2-46D92936FCA6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CE6136ED-5D01-451A-8AA2-46D92936FCA6}.Release|Any CPU.Build.0 = Release|Any CPU + {C456C00D-7215-4968-8104-74508F29F1B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C456C00D-7215-4968-8104-74508F29F1B4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C456C00D-7215-4968-8104-74508F29F1B4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C456C00D-7215-4968-8104-74508F29F1B4}.Release|Any CPU.Build.0 = Release|Any CPU + {A138BEEF-C1D2-4204-A1CE-E02CB6A7E2A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A138BEEF-C1D2-4204-A1CE-E02CB6A7E2A9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A138BEEF-C1D2-4204-A1CE-E02CB6A7E2A9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A138BEEF-C1D2-4204-A1CE-E02CB6A7E2A9}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -116,6 +154,14 @@ Global {E49FBD77-BB9C-4912-99F8-9E8DB0D17A35} = {EB85C209-FC5D-455A-8BFE-E7B0D9CC48E8} {49F9208B-CEFC-402E-815C-2CF64FD0C85C} = {EB85C209-FC5D-455A-8BFE-E7B0D9CC48E8} {123AF6E1-60BF-4360-9010-885AB140205F} = {EB85C209-FC5D-455A-8BFE-E7B0D9CC48E8} + {3922D31C-0F73-4E87-BE10-72BF6AF73494} = {BF96303B-6A5C-4F00-B364-8F8ED50D1C75} + {B358C598-E691-473A-957C-C93C94A8BA21} = {BF96303B-6A5C-4F00-B364-8F8ED50D1C75} + {BF96303B-6A5C-4F00-B364-8F8ED50D1C75} = {DC0128DE-CF85-4E7C-B6E2-B405CBEB41F1} + {CE6136ED-5D01-451A-8AA2-46D92936FCA6} = {EA0E381E-0C3E-4EDB-809B-A98F8EB30C98} + {C456C00D-7215-4968-8104-74508F29F1B4} = {EA0E381E-0C3E-4EDB-809B-A98F8EB30C98} + {EA0E381E-0C3E-4EDB-809B-A98F8EB30C98} = {DC0128DE-CF85-4E7C-B6E2-B405CBEB41F1} + {A138BEEF-C1D2-4204-A1CE-E02CB6A7E2A9} = {4DDE06DC-923D-4CD7-B4B2-D02D57282585} + {4DDE06DC-923D-4CD7-B4B2-D02D57282585} = {DC0128DE-CF85-4E7C-B6E2-B405CBEB41F1} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {A148100C-0767-46F2-99CB-3AF298DD788F} diff --git a/src/libraries/System.IO.Pipes/System.IO.Pipes.sln b/src/libraries/System.IO.Pipes/System.IO.Pipes.sln index aec405954f758d..1ba746b56d2c88 100644 --- a/src/libraries/System.IO.Pipes/System.IO.Pipes.sln +++ b/src/libraries/System.IO.Pipes/System.IO.Pipes.sln @@ -1,8 +1,12 @@ 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", "{D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StreamConformanceTests", "..\Common\tests\StreamConformanceTests\StreamConformanceTests.csproj", "{9220284A-2366-43C3-8ED0-D6ED46EC8175}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{7CF29A1C-AAE7-46E2-B1BE-40CEE7632A7B}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Drawing.Common", "..\shims\stubs\System.Drawing.Common.csproj", "{8D254FBD-C46E-4701-B2B5-238CABBE81F8}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Configuration.ConfigurationManager", "..\System.Configuration.ConfigurationManager\ref\System.Configuration.ConfigurationManager.csproj", "{64157E8E-5D3C-4DC5-A2B5-5272DAEA83D2}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Configuration.ConfigurationManager", "..\System.Configuration.ConfigurationManager\src\System.Configuration.ConfigurationManager.csproj", "{FED8B31F-94BB-48AF-9A0A-03C777BD805B}" @@ -31,6 +35,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO.Pipes", "src\Syst EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO.Pipes.Tests", "tests\System.IO.Pipes.Tests.csproj", "{DF14A751-0E6D-4B99-A6FB-F295B8C5E0FC}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{B5971A04-44AC-404D-8A58-F85C61F53244}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{D3BFDA30-F3AA-4BD9-87CB-F030559B8730}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.Uri", "..\System.Private.Uri\src\System.Private.Uri.csproj", "{7E7268D8-64E0-4CA6-9B1F-2ABA08E55120}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{A7AC5643-2743-47AC-9284-718EB5466963}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{C1B1DCD9-30B9-4E17-A049-A04DCED30D14}" @@ -39,6 +49,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{6B552ED6-CA18-4048-8BDB-2B4A09020694}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\src\System.Runtime.csproj", "{9CB4F5E5-8265-41EA-BB1B-EF4D2724DF9E}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography.ProtectedData", "..\System.Security.Cryptography.ProtectedData\ref\System.Security.Cryptography.ProtectedData.csproj", "{25441E1F-971D-4FF3-BA5A-2FBAAC3EB9FF}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography.ProtectedData", "..\System.Security.Cryptography.ProtectedData\src\System.Security.Cryptography.ProtectedData.csproj", "{E565DD4A-0749-4F5E-8476-EF44D742E377}" @@ -51,142 +63,849 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", "..\System.Windows.Extensions\src\System.Windows.Extensions.csproj", "{CDC3E87D-26B7-45BA-87D4-D6417D64D9E5}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{78D8A09F-59F1-4F02-8FA9-14243A052080}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{965BE455-6D8C-43F7-9C0F-22C223D680ED}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{B64B7581-6925-4823-B7AF-97FBC53A4146}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{865F846B-B958-4546-9AAA-557FFED6D419}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{A500EDDF-AAD0-4486-A2EB-E4A78AE58707}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{305B75AF-BAB0-47FF-AB8A-29D65082C471}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{16A18208-CD5B-4490-866D-F3CD25D8CF76}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{2271988B-3D42-40FD-A57F-296AB05E15B6}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{78D8A09F-59F1-4F02-8FA9-14243A052080}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B90127A0-E005-44FE-9D2B-3DE06444CE37}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{B64B7581-6925-4823-B7AF-97FBC53A4146}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{FE4693B5-3585-4555-BABA-A8BE2AA9C85E}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{022B84D6-4F09-4371-9611-16DC2C968CBF}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{4C115EF8-1A92-4A88-9A3A-BDBD561ED6B7}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{31FC6408-1E21-4331-B049-3202DEEFB1FC}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{D650D56D-B099-40A3-B28D-057CA9FD5574}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|arm = Debug|arm + Debug|arm64 = Debug|arm64 + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|arm = Release|arm + Release|arm64 = Release|arm64 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + Checked|Any CPU = Checked|Any CPU + Checked|arm = Checked|arm + Checked|arm64 = Checked|arm64 + Checked|x64 = Checked|x64 + Checked|x86 = Checked|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1}.Debug|Any CPU.ActiveCfg = Debug|x64 + {D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1}.Debug|Any CPU.Build.0 = Debug|x64 + {D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1}.Debug|arm.ActiveCfg = Debug|arm + {D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1}.Debug|arm.Build.0 = Debug|arm + {D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1}.Debug|arm64.ActiveCfg = Debug|arm64 + {D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1}.Debug|arm64.Build.0 = Debug|arm64 + {D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1}.Debug|x64.ActiveCfg = Debug|x64 + {D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1}.Debug|x64.Build.0 = Debug|x64 + {D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1}.Debug|x86.ActiveCfg = Debug|x86 + {D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1}.Debug|x86.Build.0 = Debug|x86 + {D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1}.Release|Any CPU.ActiveCfg = Release|x64 + {D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1}.Release|Any CPU.Build.0 = Release|x64 + {D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1}.Release|arm.ActiveCfg = Release|arm + {D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1}.Release|arm.Build.0 = Release|arm + {D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1}.Release|arm64.ActiveCfg = Release|arm64 + {D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1}.Release|arm64.Build.0 = Release|arm64 + {D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1}.Release|x64.ActiveCfg = Release|x64 + {D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1}.Release|x64.Build.0 = Release|x64 + {D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1}.Release|x86.ActiveCfg = Release|x86 + {D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1}.Release|x86.Build.0 = Release|x86 + {D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1}.Checked|Any CPU.ActiveCfg = Checked|x64 + {D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1}.Checked|Any CPU.Build.0 = Checked|x64 + {D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1}.Checked|arm.ActiveCfg = Checked|arm + {D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1}.Checked|arm.Build.0 = Checked|arm + {D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1}.Checked|arm64.ActiveCfg = Checked|arm64 + {D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1}.Checked|arm64.Build.0 = Checked|arm64 + {D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1}.Checked|x64.ActiveCfg = Checked|x64 + {D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1}.Checked|x64.Build.0 = Checked|x64 + {D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1}.Checked|x86.ActiveCfg = Checked|x86 + {D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1}.Checked|x86.Build.0 = Checked|x86 {9220284A-2366-43C3-8ED0-D6ED46EC8175}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9220284A-2366-43C3-8ED0-D6ED46EC8175}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9220284A-2366-43C3-8ED0-D6ED46EC8175}.Debug|arm.ActiveCfg = Debug|Any CPU + {9220284A-2366-43C3-8ED0-D6ED46EC8175}.Debug|arm64.ActiveCfg = Debug|Any CPU + {9220284A-2366-43C3-8ED0-D6ED46EC8175}.Debug|x64.ActiveCfg = Debug|Any CPU + {9220284A-2366-43C3-8ED0-D6ED46EC8175}.Debug|x64.Build.0 = Debug|Any CPU + {9220284A-2366-43C3-8ED0-D6ED46EC8175}.Debug|x86.ActiveCfg = Debug|Any CPU + {9220284A-2366-43C3-8ED0-D6ED46EC8175}.Debug|x86.Build.0 = Debug|Any CPU {9220284A-2366-43C3-8ED0-D6ED46EC8175}.Release|Any CPU.ActiveCfg = Release|Any CPU {9220284A-2366-43C3-8ED0-D6ED46EC8175}.Release|Any CPU.Build.0 = Release|Any CPU + {9220284A-2366-43C3-8ED0-D6ED46EC8175}.Release|arm.ActiveCfg = Release|Any CPU + {9220284A-2366-43C3-8ED0-D6ED46EC8175}.Release|arm64.ActiveCfg = Release|Any CPU + {9220284A-2366-43C3-8ED0-D6ED46EC8175}.Release|x64.ActiveCfg = Release|Any CPU + {9220284A-2366-43C3-8ED0-D6ED46EC8175}.Release|x64.Build.0 = Release|Any CPU + {9220284A-2366-43C3-8ED0-D6ED46EC8175}.Release|x86.ActiveCfg = Release|Any CPU + {9220284A-2366-43C3-8ED0-D6ED46EC8175}.Release|x86.Build.0 = Release|Any CPU + {9220284A-2366-43C3-8ED0-D6ED46EC8175}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {9220284A-2366-43C3-8ED0-D6ED46EC8175}.Checked|arm.ActiveCfg = Debug|Any CPU + {9220284A-2366-43C3-8ED0-D6ED46EC8175}.Checked|arm64.ActiveCfg = Debug|Any CPU + {9220284A-2366-43C3-8ED0-D6ED46EC8175}.Checked|x64.ActiveCfg = Debug|Any CPU + {9220284A-2366-43C3-8ED0-D6ED46EC8175}.Checked|x86.ActiveCfg = Debug|Any CPU {7CF29A1C-AAE7-46E2-B1BE-40CEE7632A7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7CF29A1C-AAE7-46E2-B1BE-40CEE7632A7B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7CF29A1C-AAE7-46E2-B1BE-40CEE7632A7B}.Debug|arm.ActiveCfg = Debug|Any CPU + {7CF29A1C-AAE7-46E2-B1BE-40CEE7632A7B}.Debug|arm64.ActiveCfg = Debug|Any CPU + {7CF29A1C-AAE7-46E2-B1BE-40CEE7632A7B}.Debug|x64.ActiveCfg = Debug|Any CPU + {7CF29A1C-AAE7-46E2-B1BE-40CEE7632A7B}.Debug|x64.Build.0 = Debug|Any CPU + {7CF29A1C-AAE7-46E2-B1BE-40CEE7632A7B}.Debug|x86.ActiveCfg = Debug|Any CPU + {7CF29A1C-AAE7-46E2-B1BE-40CEE7632A7B}.Debug|x86.Build.0 = Debug|Any CPU {7CF29A1C-AAE7-46E2-B1BE-40CEE7632A7B}.Release|Any CPU.ActiveCfg = Release|Any CPU {7CF29A1C-AAE7-46E2-B1BE-40CEE7632A7B}.Release|Any CPU.Build.0 = Release|Any CPU + {7CF29A1C-AAE7-46E2-B1BE-40CEE7632A7B}.Release|arm.ActiveCfg = Release|Any CPU + {7CF29A1C-AAE7-46E2-B1BE-40CEE7632A7B}.Release|arm64.ActiveCfg = Release|Any CPU + {7CF29A1C-AAE7-46E2-B1BE-40CEE7632A7B}.Release|x64.ActiveCfg = Release|Any CPU + {7CF29A1C-AAE7-46E2-B1BE-40CEE7632A7B}.Release|x64.Build.0 = Release|Any CPU + {7CF29A1C-AAE7-46E2-B1BE-40CEE7632A7B}.Release|x86.ActiveCfg = Release|Any CPU + {7CF29A1C-AAE7-46E2-B1BE-40CEE7632A7B}.Release|x86.Build.0 = Release|Any CPU + {7CF29A1C-AAE7-46E2-B1BE-40CEE7632A7B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {7CF29A1C-AAE7-46E2-B1BE-40CEE7632A7B}.Checked|arm.ActiveCfg = Debug|Any CPU + {7CF29A1C-AAE7-46E2-B1BE-40CEE7632A7B}.Checked|arm64.ActiveCfg = Debug|Any CPU + {7CF29A1C-AAE7-46E2-B1BE-40CEE7632A7B}.Checked|x64.ActiveCfg = Debug|Any CPU + {7CF29A1C-AAE7-46E2-B1BE-40CEE7632A7B}.Checked|x86.ActiveCfg = Debug|Any CPU + {8D254FBD-C46E-4701-B2B5-238CABBE81F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8D254FBD-C46E-4701-B2B5-238CABBE81F8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8D254FBD-C46E-4701-B2B5-238CABBE81F8}.Debug|arm.ActiveCfg = Debug|Any CPU + {8D254FBD-C46E-4701-B2B5-238CABBE81F8}.Debug|arm64.ActiveCfg = Debug|Any CPU + {8D254FBD-C46E-4701-B2B5-238CABBE81F8}.Debug|x64.ActiveCfg = Debug|Any CPU + {8D254FBD-C46E-4701-B2B5-238CABBE81F8}.Debug|x64.Build.0 = Debug|Any CPU + {8D254FBD-C46E-4701-B2B5-238CABBE81F8}.Debug|x86.ActiveCfg = Debug|Any CPU + {8D254FBD-C46E-4701-B2B5-238CABBE81F8}.Debug|x86.Build.0 = Debug|Any CPU + {8D254FBD-C46E-4701-B2B5-238CABBE81F8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8D254FBD-C46E-4701-B2B5-238CABBE81F8}.Release|Any CPU.Build.0 = Release|Any CPU + {8D254FBD-C46E-4701-B2B5-238CABBE81F8}.Release|arm.ActiveCfg = Release|Any CPU + {8D254FBD-C46E-4701-B2B5-238CABBE81F8}.Release|arm64.ActiveCfg = Release|Any CPU + {8D254FBD-C46E-4701-B2B5-238CABBE81F8}.Release|x64.ActiveCfg = Release|Any CPU + {8D254FBD-C46E-4701-B2B5-238CABBE81F8}.Release|x64.Build.0 = Release|Any CPU + {8D254FBD-C46E-4701-B2B5-238CABBE81F8}.Release|x86.ActiveCfg = Release|Any CPU + {8D254FBD-C46E-4701-B2B5-238CABBE81F8}.Release|x86.Build.0 = Release|Any CPU + {8D254FBD-C46E-4701-B2B5-238CABBE81F8}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {8D254FBD-C46E-4701-B2B5-238CABBE81F8}.Checked|arm.ActiveCfg = Debug|Any CPU + {8D254FBD-C46E-4701-B2B5-238CABBE81F8}.Checked|arm64.ActiveCfg = Debug|Any CPU + {8D254FBD-C46E-4701-B2B5-238CABBE81F8}.Checked|x64.ActiveCfg = Debug|Any CPU + {8D254FBD-C46E-4701-B2B5-238CABBE81F8}.Checked|x86.ActiveCfg = Debug|Any CPU {64157E8E-5D3C-4DC5-A2B5-5272DAEA83D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64157E8E-5D3C-4DC5-A2B5-5272DAEA83D2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {64157E8E-5D3C-4DC5-A2B5-5272DAEA83D2}.Debug|arm.ActiveCfg = Debug|Any CPU + {64157E8E-5D3C-4DC5-A2B5-5272DAEA83D2}.Debug|arm64.ActiveCfg = Debug|Any CPU + {64157E8E-5D3C-4DC5-A2B5-5272DAEA83D2}.Debug|x64.ActiveCfg = Debug|Any CPU + {64157E8E-5D3C-4DC5-A2B5-5272DAEA83D2}.Debug|x64.Build.0 = Debug|Any CPU + {64157E8E-5D3C-4DC5-A2B5-5272DAEA83D2}.Debug|x86.ActiveCfg = Debug|Any CPU + {64157E8E-5D3C-4DC5-A2B5-5272DAEA83D2}.Debug|x86.Build.0 = Debug|Any CPU {64157E8E-5D3C-4DC5-A2B5-5272DAEA83D2}.Release|Any CPU.ActiveCfg = Release|Any CPU {64157E8E-5D3C-4DC5-A2B5-5272DAEA83D2}.Release|Any CPU.Build.0 = Release|Any CPU + {64157E8E-5D3C-4DC5-A2B5-5272DAEA83D2}.Release|arm.ActiveCfg = Release|Any CPU + {64157E8E-5D3C-4DC5-A2B5-5272DAEA83D2}.Release|arm64.ActiveCfg = Release|Any CPU + {64157E8E-5D3C-4DC5-A2B5-5272DAEA83D2}.Release|x64.ActiveCfg = Release|Any CPU + {64157E8E-5D3C-4DC5-A2B5-5272DAEA83D2}.Release|x64.Build.0 = Release|Any CPU + {64157E8E-5D3C-4DC5-A2B5-5272DAEA83D2}.Release|x86.ActiveCfg = Release|Any CPU + {64157E8E-5D3C-4DC5-A2B5-5272DAEA83D2}.Release|x86.Build.0 = Release|Any CPU + {64157E8E-5D3C-4DC5-A2B5-5272DAEA83D2}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {64157E8E-5D3C-4DC5-A2B5-5272DAEA83D2}.Checked|arm.ActiveCfg = Debug|Any CPU + {64157E8E-5D3C-4DC5-A2B5-5272DAEA83D2}.Checked|arm64.ActiveCfg = Debug|Any CPU + {64157E8E-5D3C-4DC5-A2B5-5272DAEA83D2}.Checked|x64.ActiveCfg = Debug|Any CPU + {64157E8E-5D3C-4DC5-A2B5-5272DAEA83D2}.Checked|x86.ActiveCfg = Debug|Any CPU {FED8B31F-94BB-48AF-9A0A-03C777BD805B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FED8B31F-94BB-48AF-9A0A-03C777BD805B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FED8B31F-94BB-48AF-9A0A-03C777BD805B}.Debug|arm.ActiveCfg = Debug|Any CPU + {FED8B31F-94BB-48AF-9A0A-03C777BD805B}.Debug|arm64.ActiveCfg = Debug|Any CPU + {FED8B31F-94BB-48AF-9A0A-03C777BD805B}.Debug|x64.ActiveCfg = Debug|Any CPU + {FED8B31F-94BB-48AF-9A0A-03C777BD805B}.Debug|x64.Build.0 = Debug|Any CPU + {FED8B31F-94BB-48AF-9A0A-03C777BD805B}.Debug|x86.ActiveCfg = Debug|Any CPU + {FED8B31F-94BB-48AF-9A0A-03C777BD805B}.Debug|x86.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 + {FED8B31F-94BB-48AF-9A0A-03C777BD805B}.Release|arm.ActiveCfg = Release|Any CPU + {FED8B31F-94BB-48AF-9A0A-03C777BD805B}.Release|arm64.ActiveCfg = Release|Any CPU + {FED8B31F-94BB-48AF-9A0A-03C777BD805B}.Release|x64.ActiveCfg = Release|Any CPU + {FED8B31F-94BB-48AF-9A0A-03C777BD805B}.Release|x64.Build.0 = Release|Any CPU + {FED8B31F-94BB-48AF-9A0A-03C777BD805B}.Release|x86.ActiveCfg = Release|Any CPU + {FED8B31F-94BB-48AF-9A0A-03C777BD805B}.Release|x86.Build.0 = Release|Any CPU + {FED8B31F-94BB-48AF-9A0A-03C777BD805B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {FED8B31F-94BB-48AF-9A0A-03C777BD805B}.Checked|arm.ActiveCfg = Debug|Any CPU + {FED8B31F-94BB-48AF-9A0A-03C777BD805B}.Checked|arm64.ActiveCfg = Debug|Any CPU + {FED8B31F-94BB-48AF-9A0A-03C777BD805B}.Checked|x64.ActiveCfg = Debug|Any CPU + {FED8B31F-94BB-48AF-9A0A-03C777BD805B}.Checked|x86.ActiveCfg = Debug|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}.Debug|arm.ActiveCfg = Debug|Any CPU + {616A1164-8B49-42C1-BD86-F416B47F7543}.Debug|arm64.ActiveCfg = Debug|Any CPU + {616A1164-8B49-42C1-BD86-F416B47F7543}.Debug|x64.ActiveCfg = Debug|Any CPU + {616A1164-8B49-42C1-BD86-F416B47F7543}.Debug|x64.Build.0 = Debug|Any CPU + {616A1164-8B49-42C1-BD86-F416B47F7543}.Debug|x86.ActiveCfg = Debug|Any CPU + {616A1164-8B49-42C1-BD86-F416B47F7543}.Debug|x86.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 + {616A1164-8B49-42C1-BD86-F416B47F7543}.Release|arm.ActiveCfg = Release|Any CPU + {616A1164-8B49-42C1-BD86-F416B47F7543}.Release|arm64.ActiveCfg = Release|Any CPU + {616A1164-8B49-42C1-BD86-F416B47F7543}.Release|x64.ActiveCfg = Release|Any CPU + {616A1164-8B49-42C1-BD86-F416B47F7543}.Release|x64.Build.0 = Release|Any CPU + {616A1164-8B49-42C1-BD86-F416B47F7543}.Release|x86.ActiveCfg = Release|Any CPU + {616A1164-8B49-42C1-BD86-F416B47F7543}.Release|x86.Build.0 = Release|Any CPU + {616A1164-8B49-42C1-BD86-F416B47F7543}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {616A1164-8B49-42C1-BD86-F416B47F7543}.Checked|arm.ActiveCfg = Debug|Any CPU + {616A1164-8B49-42C1-BD86-F416B47F7543}.Checked|arm64.ActiveCfg = Debug|Any CPU + {616A1164-8B49-42C1-BD86-F416B47F7543}.Checked|x64.ActiveCfg = Debug|Any CPU + {616A1164-8B49-42C1-BD86-F416B47F7543}.Checked|x86.ActiveCfg = Debug|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}.Debug|arm.ActiveCfg = Debug|Any CPU + {F97B792B-B1B0-47B5-BC93-72FCD6E0BD93}.Debug|arm64.ActiveCfg = Debug|Any CPU + {F97B792B-B1B0-47B5-BC93-72FCD6E0BD93}.Debug|x64.ActiveCfg = Debug|Any CPU + {F97B792B-B1B0-47B5-BC93-72FCD6E0BD93}.Debug|x64.Build.0 = Debug|Any CPU + {F97B792B-B1B0-47B5-BC93-72FCD6E0BD93}.Debug|x86.ActiveCfg = Debug|Any CPU + {F97B792B-B1B0-47B5-BC93-72FCD6E0BD93}.Debug|x86.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 + {F97B792B-B1B0-47B5-BC93-72FCD6E0BD93}.Release|arm.ActiveCfg = Release|Any CPU + {F97B792B-B1B0-47B5-BC93-72FCD6E0BD93}.Release|arm64.ActiveCfg = Release|Any CPU + {F97B792B-B1B0-47B5-BC93-72FCD6E0BD93}.Release|x64.ActiveCfg = Release|Any CPU + {F97B792B-B1B0-47B5-BC93-72FCD6E0BD93}.Release|x64.Build.0 = Release|Any CPU + {F97B792B-B1B0-47B5-BC93-72FCD6E0BD93}.Release|x86.ActiveCfg = Release|Any CPU + {F97B792B-B1B0-47B5-BC93-72FCD6E0BD93}.Release|x86.Build.0 = Release|Any CPU + {F97B792B-B1B0-47B5-BC93-72FCD6E0BD93}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {F97B792B-B1B0-47B5-BC93-72FCD6E0BD93}.Checked|arm.ActiveCfg = Debug|Any CPU + {F97B792B-B1B0-47B5-BC93-72FCD6E0BD93}.Checked|arm64.ActiveCfg = Debug|Any CPU + {F97B792B-B1B0-47B5-BC93-72FCD6E0BD93}.Checked|x64.ActiveCfg = Debug|Any CPU + {F97B792B-B1B0-47B5-BC93-72FCD6E0BD93}.Checked|x86.ActiveCfg = Debug|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}.Debug|arm.ActiveCfg = Debug|Any CPU + {1EE276D5-2F82-4D93-9E35-33A26022AB6D}.Debug|arm64.ActiveCfg = Debug|Any CPU + {1EE276D5-2F82-4D93-9E35-33A26022AB6D}.Debug|x64.ActiveCfg = Debug|Any CPU + {1EE276D5-2F82-4D93-9E35-33A26022AB6D}.Debug|x64.Build.0 = Debug|Any CPU + {1EE276D5-2F82-4D93-9E35-33A26022AB6D}.Debug|x86.ActiveCfg = Debug|Any CPU + {1EE276D5-2F82-4D93-9E35-33A26022AB6D}.Debug|x86.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 + {1EE276D5-2F82-4D93-9E35-33A26022AB6D}.Release|arm.ActiveCfg = Release|Any CPU + {1EE276D5-2F82-4D93-9E35-33A26022AB6D}.Release|arm64.ActiveCfg = Release|Any CPU + {1EE276D5-2F82-4D93-9E35-33A26022AB6D}.Release|x64.ActiveCfg = Release|Any CPU + {1EE276D5-2F82-4D93-9E35-33A26022AB6D}.Release|x64.Build.0 = Release|Any CPU + {1EE276D5-2F82-4D93-9E35-33A26022AB6D}.Release|x86.ActiveCfg = Release|Any CPU + {1EE276D5-2F82-4D93-9E35-33A26022AB6D}.Release|x86.Build.0 = Release|Any CPU + {1EE276D5-2F82-4D93-9E35-33A26022AB6D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {1EE276D5-2F82-4D93-9E35-33A26022AB6D}.Checked|arm.ActiveCfg = Debug|Any CPU + {1EE276D5-2F82-4D93-9E35-33A26022AB6D}.Checked|arm64.ActiveCfg = Debug|Any CPU + {1EE276D5-2F82-4D93-9E35-33A26022AB6D}.Checked|x64.ActiveCfg = Debug|Any CPU + {1EE276D5-2F82-4D93-9E35-33A26022AB6D}.Checked|x86.ActiveCfg = Debug|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}.Debug|arm.ActiveCfg = Debug|Any CPU + {9A567CB8-B318-42C0-B05F-B0746E50DBFD}.Debug|arm64.ActiveCfg = Debug|Any CPU + {9A567CB8-B318-42C0-B05F-B0746E50DBFD}.Debug|x64.ActiveCfg = Debug|Any CPU + {9A567CB8-B318-42C0-B05F-B0746E50DBFD}.Debug|x64.Build.0 = Debug|Any CPU + {9A567CB8-B318-42C0-B05F-B0746E50DBFD}.Debug|x86.ActiveCfg = Debug|Any CPU + {9A567CB8-B318-42C0-B05F-B0746E50DBFD}.Debug|x86.Build.0 = Debug|Any CPU {9A567CB8-B318-42C0-B05F-B0746E50DBFD}.Release|Any CPU.ActiveCfg = Release|Any CPU {9A567CB8-B318-42C0-B05F-B0746E50DBFD}.Release|Any CPU.Build.0 = Release|Any CPU + {9A567CB8-B318-42C0-B05F-B0746E50DBFD}.Release|arm.ActiveCfg = Release|Any CPU + {9A567CB8-B318-42C0-B05F-B0746E50DBFD}.Release|arm64.ActiveCfg = Release|Any CPU + {9A567CB8-B318-42C0-B05F-B0746E50DBFD}.Release|x64.ActiveCfg = Release|Any CPU + {9A567CB8-B318-42C0-B05F-B0746E50DBFD}.Release|x64.Build.0 = Release|Any CPU + {9A567CB8-B318-42C0-B05F-B0746E50DBFD}.Release|x86.ActiveCfg = Release|Any CPU + {9A567CB8-B318-42C0-B05F-B0746E50DBFD}.Release|x86.Build.0 = Release|Any CPU + {9A567CB8-B318-42C0-B05F-B0746E50DBFD}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {9A567CB8-B318-42C0-B05F-B0746E50DBFD}.Checked|arm.ActiveCfg = Debug|Any CPU + {9A567CB8-B318-42C0-B05F-B0746E50DBFD}.Checked|arm64.ActiveCfg = Debug|Any CPU + {9A567CB8-B318-42C0-B05F-B0746E50DBFD}.Checked|x64.ActiveCfg = Debug|Any CPU + {9A567CB8-B318-42C0-B05F-B0746E50DBFD}.Checked|x86.ActiveCfg = Debug|Any CPU {DD5D3579-50B5-4ECE-AE54-2C67E66B8E09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DD5D3579-50B5-4ECE-AE54-2C67E66B8E09}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DD5D3579-50B5-4ECE-AE54-2C67E66B8E09}.Debug|arm.ActiveCfg = Debug|Any CPU + {DD5D3579-50B5-4ECE-AE54-2C67E66B8E09}.Debug|arm64.ActiveCfg = Debug|Any CPU + {DD5D3579-50B5-4ECE-AE54-2C67E66B8E09}.Debug|x64.ActiveCfg = Debug|Any CPU + {DD5D3579-50B5-4ECE-AE54-2C67E66B8E09}.Debug|x64.Build.0 = Debug|Any CPU + {DD5D3579-50B5-4ECE-AE54-2C67E66B8E09}.Debug|x86.ActiveCfg = Debug|Any CPU + {DD5D3579-50B5-4ECE-AE54-2C67E66B8E09}.Debug|x86.Build.0 = Debug|Any CPU {DD5D3579-50B5-4ECE-AE54-2C67E66B8E09}.Release|Any CPU.ActiveCfg = Release|Any CPU {DD5D3579-50B5-4ECE-AE54-2C67E66B8E09}.Release|Any CPU.Build.0 = Release|Any CPU + {DD5D3579-50B5-4ECE-AE54-2C67E66B8E09}.Release|arm.ActiveCfg = Release|Any CPU + {DD5D3579-50B5-4ECE-AE54-2C67E66B8E09}.Release|arm64.ActiveCfg = Release|Any CPU + {DD5D3579-50B5-4ECE-AE54-2C67E66B8E09}.Release|x64.ActiveCfg = Release|Any CPU + {DD5D3579-50B5-4ECE-AE54-2C67E66B8E09}.Release|x64.Build.0 = Release|Any CPU + {DD5D3579-50B5-4ECE-AE54-2C67E66B8E09}.Release|x86.ActiveCfg = Release|Any CPU + {DD5D3579-50B5-4ECE-AE54-2C67E66B8E09}.Release|x86.Build.0 = Release|Any CPU + {DD5D3579-50B5-4ECE-AE54-2C67E66B8E09}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {DD5D3579-50B5-4ECE-AE54-2C67E66B8E09}.Checked|arm.ActiveCfg = Debug|Any CPU + {DD5D3579-50B5-4ECE-AE54-2C67E66B8E09}.Checked|arm64.ActiveCfg = Debug|Any CPU + {DD5D3579-50B5-4ECE-AE54-2C67E66B8E09}.Checked|x64.ActiveCfg = Debug|Any CPU + {DD5D3579-50B5-4ECE-AE54-2C67E66B8E09}.Checked|x86.ActiveCfg = Debug|Any CPU {572E9C48-D5F4-4D27-825F-6BBC504E9526}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {572E9C48-D5F4-4D27-825F-6BBC504E9526}.Debug|Any CPU.Build.0 = Debug|Any CPU + {572E9C48-D5F4-4D27-825F-6BBC504E9526}.Debug|arm.ActiveCfg = Debug|Any CPU + {572E9C48-D5F4-4D27-825F-6BBC504E9526}.Debug|arm64.ActiveCfg = Debug|Any CPU + {572E9C48-D5F4-4D27-825F-6BBC504E9526}.Debug|x64.ActiveCfg = Debug|Any CPU + {572E9C48-D5F4-4D27-825F-6BBC504E9526}.Debug|x64.Build.0 = Debug|Any CPU + {572E9C48-D5F4-4D27-825F-6BBC504E9526}.Debug|x86.ActiveCfg = Debug|Any CPU + {572E9C48-D5F4-4D27-825F-6BBC504E9526}.Debug|x86.Build.0 = Debug|Any CPU {572E9C48-D5F4-4D27-825F-6BBC504E9526}.Release|Any CPU.ActiveCfg = Release|Any CPU {572E9C48-D5F4-4D27-825F-6BBC504E9526}.Release|Any CPU.Build.0 = Release|Any CPU + {572E9C48-D5F4-4D27-825F-6BBC504E9526}.Release|arm.ActiveCfg = Release|Any CPU + {572E9C48-D5F4-4D27-825F-6BBC504E9526}.Release|arm64.ActiveCfg = Release|Any CPU + {572E9C48-D5F4-4D27-825F-6BBC504E9526}.Release|x64.ActiveCfg = Release|Any CPU + {572E9C48-D5F4-4D27-825F-6BBC504E9526}.Release|x64.Build.0 = Release|Any CPU + {572E9C48-D5F4-4D27-825F-6BBC504E9526}.Release|x86.ActiveCfg = Release|Any CPU + {572E9C48-D5F4-4D27-825F-6BBC504E9526}.Release|x86.Build.0 = Release|Any CPU + {572E9C48-D5F4-4D27-825F-6BBC504E9526}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {572E9C48-D5F4-4D27-825F-6BBC504E9526}.Checked|arm.ActiveCfg = Debug|Any CPU + {572E9C48-D5F4-4D27-825F-6BBC504E9526}.Checked|arm64.ActiveCfg = Debug|Any CPU + {572E9C48-D5F4-4D27-825F-6BBC504E9526}.Checked|x64.ActiveCfg = Debug|Any CPU + {572E9C48-D5F4-4D27-825F-6BBC504E9526}.Checked|x86.ActiveCfg = Debug|Any CPU {826D5FBF-95C3-42EE-BACD-0CA38B6FEC73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {826D5FBF-95C3-42EE-BACD-0CA38B6FEC73}.Debug|Any CPU.Build.0 = Debug|Any CPU + {826D5FBF-95C3-42EE-BACD-0CA38B6FEC73}.Debug|arm.ActiveCfg = Debug|Any CPU + {826D5FBF-95C3-42EE-BACD-0CA38B6FEC73}.Debug|arm64.ActiveCfg = Debug|Any CPU + {826D5FBF-95C3-42EE-BACD-0CA38B6FEC73}.Debug|x64.ActiveCfg = Debug|Any CPU + {826D5FBF-95C3-42EE-BACD-0CA38B6FEC73}.Debug|x64.Build.0 = Debug|Any CPU + {826D5FBF-95C3-42EE-BACD-0CA38B6FEC73}.Debug|x86.ActiveCfg = Debug|Any CPU + {826D5FBF-95C3-42EE-BACD-0CA38B6FEC73}.Debug|x86.Build.0 = Debug|Any CPU {826D5FBF-95C3-42EE-BACD-0CA38B6FEC73}.Release|Any CPU.ActiveCfg = Release|Any CPU {826D5FBF-95C3-42EE-BACD-0CA38B6FEC73}.Release|Any CPU.Build.0 = Release|Any CPU + {826D5FBF-95C3-42EE-BACD-0CA38B6FEC73}.Release|arm.ActiveCfg = Release|Any CPU + {826D5FBF-95C3-42EE-BACD-0CA38B6FEC73}.Release|arm64.ActiveCfg = Release|Any CPU + {826D5FBF-95C3-42EE-BACD-0CA38B6FEC73}.Release|x64.ActiveCfg = Release|Any CPU + {826D5FBF-95C3-42EE-BACD-0CA38B6FEC73}.Release|x64.Build.0 = Release|Any CPU + {826D5FBF-95C3-42EE-BACD-0CA38B6FEC73}.Release|x86.ActiveCfg = Release|Any CPU + {826D5FBF-95C3-42EE-BACD-0CA38B6FEC73}.Release|x86.Build.0 = Release|Any CPU + {826D5FBF-95C3-42EE-BACD-0CA38B6FEC73}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {826D5FBF-95C3-42EE-BACD-0CA38B6FEC73}.Checked|arm.ActiveCfg = Debug|Any CPU + {826D5FBF-95C3-42EE-BACD-0CA38B6FEC73}.Checked|arm64.ActiveCfg = Debug|Any CPU + {826D5FBF-95C3-42EE-BACD-0CA38B6FEC73}.Checked|x64.ActiveCfg = Debug|Any CPU + {826D5FBF-95C3-42EE-BACD-0CA38B6FEC73}.Checked|x86.ActiveCfg = Debug|Any CPU {7FACB7D5-E0A4-43D4-8C61-CB0C39C8A7EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7FACB7D5-E0A4-43D4-8C61-CB0C39C8A7EF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7FACB7D5-E0A4-43D4-8C61-CB0C39C8A7EF}.Debug|arm.ActiveCfg = Debug|Any CPU + {7FACB7D5-E0A4-43D4-8C61-CB0C39C8A7EF}.Debug|arm64.ActiveCfg = Debug|Any CPU + {7FACB7D5-E0A4-43D4-8C61-CB0C39C8A7EF}.Debug|x64.ActiveCfg = Debug|Any CPU + {7FACB7D5-E0A4-43D4-8C61-CB0C39C8A7EF}.Debug|x64.Build.0 = Debug|Any CPU + {7FACB7D5-E0A4-43D4-8C61-CB0C39C8A7EF}.Debug|x86.ActiveCfg = Debug|Any CPU + {7FACB7D5-E0A4-43D4-8C61-CB0C39C8A7EF}.Debug|x86.Build.0 = Debug|Any CPU {7FACB7D5-E0A4-43D4-8C61-CB0C39C8A7EF}.Release|Any CPU.ActiveCfg = Release|Any CPU {7FACB7D5-E0A4-43D4-8C61-CB0C39C8A7EF}.Release|Any CPU.Build.0 = Release|Any CPU + {7FACB7D5-E0A4-43D4-8C61-CB0C39C8A7EF}.Release|arm.ActiveCfg = Release|Any CPU + {7FACB7D5-E0A4-43D4-8C61-CB0C39C8A7EF}.Release|arm64.ActiveCfg = Release|Any CPU + {7FACB7D5-E0A4-43D4-8C61-CB0C39C8A7EF}.Release|x64.ActiveCfg = Release|Any CPU + {7FACB7D5-E0A4-43D4-8C61-CB0C39C8A7EF}.Release|x64.Build.0 = Release|Any CPU + {7FACB7D5-E0A4-43D4-8C61-CB0C39C8A7EF}.Release|x86.ActiveCfg = Release|Any CPU + {7FACB7D5-E0A4-43D4-8C61-CB0C39C8A7EF}.Release|x86.Build.0 = Release|Any CPU + {7FACB7D5-E0A4-43D4-8C61-CB0C39C8A7EF}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {7FACB7D5-E0A4-43D4-8C61-CB0C39C8A7EF}.Checked|arm.ActiveCfg = Debug|Any CPU + {7FACB7D5-E0A4-43D4-8C61-CB0C39C8A7EF}.Checked|arm64.ActiveCfg = Debug|Any CPU + {7FACB7D5-E0A4-43D4-8C61-CB0C39C8A7EF}.Checked|x64.ActiveCfg = Debug|Any CPU + {7FACB7D5-E0A4-43D4-8C61-CB0C39C8A7EF}.Checked|x86.ActiveCfg = Debug|Any CPU {A15EED32-12DF-40D3-AA8E-197F76D8A0C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A15EED32-12DF-40D3-AA8E-197F76D8A0C5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A15EED32-12DF-40D3-AA8E-197F76D8A0C5}.Debug|arm.ActiveCfg = Debug|Any CPU + {A15EED32-12DF-40D3-AA8E-197F76D8A0C5}.Debug|arm64.ActiveCfg = Debug|Any CPU + {A15EED32-12DF-40D3-AA8E-197F76D8A0C5}.Debug|x64.ActiveCfg = Debug|Any CPU + {A15EED32-12DF-40D3-AA8E-197F76D8A0C5}.Debug|x64.Build.0 = Debug|Any CPU + {A15EED32-12DF-40D3-AA8E-197F76D8A0C5}.Debug|x86.ActiveCfg = Debug|Any CPU + {A15EED32-12DF-40D3-AA8E-197F76D8A0C5}.Debug|x86.Build.0 = Debug|Any CPU {A15EED32-12DF-40D3-AA8E-197F76D8A0C5}.Release|Any CPU.ActiveCfg = Release|Any CPU {A15EED32-12DF-40D3-AA8E-197F76D8A0C5}.Release|Any CPU.Build.0 = Release|Any CPU + {A15EED32-12DF-40D3-AA8E-197F76D8A0C5}.Release|arm.ActiveCfg = Release|Any CPU + {A15EED32-12DF-40D3-AA8E-197F76D8A0C5}.Release|arm64.ActiveCfg = Release|Any CPU + {A15EED32-12DF-40D3-AA8E-197F76D8A0C5}.Release|x64.ActiveCfg = Release|Any CPU + {A15EED32-12DF-40D3-AA8E-197F76D8A0C5}.Release|x64.Build.0 = Release|Any CPU + {A15EED32-12DF-40D3-AA8E-197F76D8A0C5}.Release|x86.ActiveCfg = Release|Any CPU + {A15EED32-12DF-40D3-AA8E-197F76D8A0C5}.Release|x86.Build.0 = Release|Any CPU + {A15EED32-12DF-40D3-AA8E-197F76D8A0C5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {A15EED32-12DF-40D3-AA8E-197F76D8A0C5}.Checked|arm.ActiveCfg = Debug|Any CPU + {A15EED32-12DF-40D3-AA8E-197F76D8A0C5}.Checked|arm64.ActiveCfg = Debug|Any CPU + {A15EED32-12DF-40D3-AA8E-197F76D8A0C5}.Checked|x64.ActiveCfg = Debug|Any CPU + {A15EED32-12DF-40D3-AA8E-197F76D8A0C5}.Checked|x86.ActiveCfg = Debug|Any CPU {53D35175-9799-4535-8322-88BF2FCDD56E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {53D35175-9799-4535-8322-88BF2FCDD56E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {53D35175-9799-4535-8322-88BF2FCDD56E}.Debug|arm.ActiveCfg = Debug|Any CPU + {53D35175-9799-4535-8322-88BF2FCDD56E}.Debug|arm64.ActiveCfg = Debug|Any CPU + {53D35175-9799-4535-8322-88BF2FCDD56E}.Debug|x64.ActiveCfg = Debug|Any CPU + {53D35175-9799-4535-8322-88BF2FCDD56E}.Debug|x64.Build.0 = Debug|Any CPU + {53D35175-9799-4535-8322-88BF2FCDD56E}.Debug|x86.ActiveCfg = Debug|Any CPU + {53D35175-9799-4535-8322-88BF2FCDD56E}.Debug|x86.Build.0 = Debug|Any CPU {53D35175-9799-4535-8322-88BF2FCDD56E}.Release|Any CPU.ActiveCfg = Release|Any CPU {53D35175-9799-4535-8322-88BF2FCDD56E}.Release|Any CPU.Build.0 = Release|Any CPU + {53D35175-9799-4535-8322-88BF2FCDD56E}.Release|arm.ActiveCfg = Release|Any CPU + {53D35175-9799-4535-8322-88BF2FCDD56E}.Release|arm64.ActiveCfg = Release|Any CPU + {53D35175-9799-4535-8322-88BF2FCDD56E}.Release|x64.ActiveCfg = Release|Any CPU + {53D35175-9799-4535-8322-88BF2FCDD56E}.Release|x64.Build.0 = Release|Any CPU + {53D35175-9799-4535-8322-88BF2FCDD56E}.Release|x86.ActiveCfg = Release|Any CPU + {53D35175-9799-4535-8322-88BF2FCDD56E}.Release|x86.Build.0 = Release|Any CPU + {53D35175-9799-4535-8322-88BF2FCDD56E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {53D35175-9799-4535-8322-88BF2FCDD56E}.Checked|arm.ActiveCfg = Debug|Any CPU + {53D35175-9799-4535-8322-88BF2FCDD56E}.Checked|arm64.ActiveCfg = Debug|Any CPU + {53D35175-9799-4535-8322-88BF2FCDD56E}.Checked|x64.ActiveCfg = Debug|Any CPU + {53D35175-9799-4535-8322-88BF2FCDD56E}.Checked|x86.ActiveCfg = Debug|Any CPU {3A471AEB-FCCB-43DF-9C04-F00FA9AAF81E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3A471AEB-FCCB-43DF-9C04-F00FA9AAF81E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3A471AEB-FCCB-43DF-9C04-F00FA9AAF81E}.Debug|arm.ActiveCfg = Debug|Any CPU + {3A471AEB-FCCB-43DF-9C04-F00FA9AAF81E}.Debug|arm64.ActiveCfg = Debug|Any CPU + {3A471AEB-FCCB-43DF-9C04-F00FA9AAF81E}.Debug|x64.ActiveCfg = Debug|Any CPU + {3A471AEB-FCCB-43DF-9C04-F00FA9AAF81E}.Debug|x64.Build.0 = Debug|Any CPU + {3A471AEB-FCCB-43DF-9C04-F00FA9AAF81E}.Debug|x86.ActiveCfg = Debug|Any CPU + {3A471AEB-FCCB-43DF-9C04-F00FA9AAF81E}.Debug|x86.Build.0 = Debug|Any CPU {3A471AEB-FCCB-43DF-9C04-F00FA9AAF81E}.Release|Any CPU.ActiveCfg = Release|Any CPU {3A471AEB-FCCB-43DF-9C04-F00FA9AAF81E}.Release|Any CPU.Build.0 = Release|Any CPU + {3A471AEB-FCCB-43DF-9C04-F00FA9AAF81E}.Release|arm.ActiveCfg = Release|Any CPU + {3A471AEB-FCCB-43DF-9C04-F00FA9AAF81E}.Release|arm64.ActiveCfg = Release|Any CPU + {3A471AEB-FCCB-43DF-9C04-F00FA9AAF81E}.Release|x64.ActiveCfg = Release|Any CPU + {3A471AEB-FCCB-43DF-9C04-F00FA9AAF81E}.Release|x64.Build.0 = Release|Any CPU + {3A471AEB-FCCB-43DF-9C04-F00FA9AAF81E}.Release|x86.ActiveCfg = Release|Any CPU + {3A471AEB-FCCB-43DF-9C04-F00FA9AAF81E}.Release|x86.Build.0 = Release|Any CPU + {3A471AEB-FCCB-43DF-9C04-F00FA9AAF81E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {3A471AEB-FCCB-43DF-9C04-F00FA9AAF81E}.Checked|arm.ActiveCfg = Debug|Any CPU + {3A471AEB-FCCB-43DF-9C04-F00FA9AAF81E}.Checked|arm64.ActiveCfg = Debug|Any CPU + {3A471AEB-FCCB-43DF-9C04-F00FA9AAF81E}.Checked|x64.ActiveCfg = Debug|Any CPU + {3A471AEB-FCCB-43DF-9C04-F00FA9AAF81E}.Checked|x86.ActiveCfg = Debug|Any CPU {DF14A751-0E6D-4B99-A6FB-F295B8C5E0FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DF14A751-0E6D-4B99-A6FB-F295B8C5E0FC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DF14A751-0E6D-4B99-A6FB-F295B8C5E0FC}.Debug|arm.ActiveCfg = Debug|Any CPU + {DF14A751-0E6D-4B99-A6FB-F295B8C5E0FC}.Debug|arm64.ActiveCfg = Debug|Any CPU + {DF14A751-0E6D-4B99-A6FB-F295B8C5E0FC}.Debug|x64.ActiveCfg = Debug|Any CPU + {DF14A751-0E6D-4B99-A6FB-F295B8C5E0FC}.Debug|x64.Build.0 = Debug|Any CPU + {DF14A751-0E6D-4B99-A6FB-F295B8C5E0FC}.Debug|x86.ActiveCfg = Debug|Any CPU + {DF14A751-0E6D-4B99-A6FB-F295B8C5E0FC}.Debug|x86.Build.0 = Debug|Any CPU {DF14A751-0E6D-4B99-A6FB-F295B8C5E0FC}.Release|Any CPU.ActiveCfg = Release|Any CPU {DF14A751-0E6D-4B99-A6FB-F295B8C5E0FC}.Release|Any CPU.Build.0 = Release|Any CPU + {DF14A751-0E6D-4B99-A6FB-F295B8C5E0FC}.Release|arm.ActiveCfg = Release|Any CPU + {DF14A751-0E6D-4B99-A6FB-F295B8C5E0FC}.Release|arm64.ActiveCfg = Release|Any CPU + {DF14A751-0E6D-4B99-A6FB-F295B8C5E0FC}.Release|x64.ActiveCfg = Release|Any CPU + {DF14A751-0E6D-4B99-A6FB-F295B8C5E0FC}.Release|x64.Build.0 = Release|Any CPU + {DF14A751-0E6D-4B99-A6FB-F295B8C5E0FC}.Release|x86.ActiveCfg = Release|Any CPU + {DF14A751-0E6D-4B99-A6FB-F295B8C5E0FC}.Release|x86.Build.0 = Release|Any CPU + {DF14A751-0E6D-4B99-A6FB-F295B8C5E0FC}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {DF14A751-0E6D-4B99-A6FB-F295B8C5E0FC}.Checked|arm.ActiveCfg = Debug|Any CPU + {DF14A751-0E6D-4B99-A6FB-F295B8C5E0FC}.Checked|arm64.ActiveCfg = Debug|Any CPU + {DF14A751-0E6D-4B99-A6FB-F295B8C5E0FC}.Checked|x64.ActiveCfg = Debug|Any CPU + {DF14A751-0E6D-4B99-A6FB-F295B8C5E0FC}.Checked|x86.ActiveCfg = Debug|Any CPU + {B5971A04-44AC-404D-8A58-F85C61F53244}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B5971A04-44AC-404D-8A58-F85C61F53244}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B5971A04-44AC-404D-8A58-F85C61F53244}.Debug|arm.ActiveCfg = Debug|Any CPU + {B5971A04-44AC-404D-8A58-F85C61F53244}.Debug|arm64.ActiveCfg = Debug|Any CPU + {B5971A04-44AC-404D-8A58-F85C61F53244}.Debug|x64.ActiveCfg = Debug|Any CPU + {B5971A04-44AC-404D-8A58-F85C61F53244}.Debug|x64.Build.0 = Debug|Any CPU + {B5971A04-44AC-404D-8A58-F85C61F53244}.Debug|x86.ActiveCfg = Debug|Any CPU + {B5971A04-44AC-404D-8A58-F85C61F53244}.Debug|x86.Build.0 = Debug|Any CPU + {B5971A04-44AC-404D-8A58-F85C61F53244}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B5971A04-44AC-404D-8A58-F85C61F53244}.Release|Any CPU.Build.0 = Release|Any CPU + {B5971A04-44AC-404D-8A58-F85C61F53244}.Release|arm.ActiveCfg = Release|Any CPU + {B5971A04-44AC-404D-8A58-F85C61F53244}.Release|arm64.ActiveCfg = Release|Any CPU + {B5971A04-44AC-404D-8A58-F85C61F53244}.Release|x64.ActiveCfg = Release|Any CPU + {B5971A04-44AC-404D-8A58-F85C61F53244}.Release|x64.Build.0 = Release|Any CPU + {B5971A04-44AC-404D-8A58-F85C61F53244}.Release|x86.ActiveCfg = Release|Any CPU + {B5971A04-44AC-404D-8A58-F85C61F53244}.Release|x86.Build.0 = Release|Any CPU + {B5971A04-44AC-404D-8A58-F85C61F53244}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {B5971A04-44AC-404D-8A58-F85C61F53244}.Checked|arm.ActiveCfg = Debug|Any CPU + {B5971A04-44AC-404D-8A58-F85C61F53244}.Checked|arm64.ActiveCfg = Debug|Any CPU + {B5971A04-44AC-404D-8A58-F85C61F53244}.Checked|x64.ActiveCfg = Debug|Any CPU + {B5971A04-44AC-404D-8A58-F85C61F53244}.Checked|x86.ActiveCfg = Debug|Any CPU + {D3BFDA30-F3AA-4BD9-87CB-F030559B8730}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D3BFDA30-F3AA-4BD9-87CB-F030559B8730}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D3BFDA30-F3AA-4BD9-87CB-F030559B8730}.Debug|arm.ActiveCfg = Debug|Any CPU + {D3BFDA30-F3AA-4BD9-87CB-F030559B8730}.Debug|arm64.ActiveCfg = Debug|Any CPU + {D3BFDA30-F3AA-4BD9-87CB-F030559B8730}.Debug|x64.ActiveCfg = Debug|Any CPU + {D3BFDA30-F3AA-4BD9-87CB-F030559B8730}.Debug|x64.Build.0 = Debug|Any CPU + {D3BFDA30-F3AA-4BD9-87CB-F030559B8730}.Debug|x86.ActiveCfg = Debug|Any CPU + {D3BFDA30-F3AA-4BD9-87CB-F030559B8730}.Debug|x86.Build.0 = Debug|Any CPU + {D3BFDA30-F3AA-4BD9-87CB-F030559B8730}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D3BFDA30-F3AA-4BD9-87CB-F030559B8730}.Release|Any CPU.Build.0 = Release|Any CPU + {D3BFDA30-F3AA-4BD9-87CB-F030559B8730}.Release|arm.ActiveCfg = Release|Any CPU + {D3BFDA30-F3AA-4BD9-87CB-F030559B8730}.Release|arm64.ActiveCfg = Release|Any CPU + {D3BFDA30-F3AA-4BD9-87CB-F030559B8730}.Release|x64.ActiveCfg = Release|Any CPU + {D3BFDA30-F3AA-4BD9-87CB-F030559B8730}.Release|x64.Build.0 = Release|Any CPU + {D3BFDA30-F3AA-4BD9-87CB-F030559B8730}.Release|x86.ActiveCfg = Release|Any CPU + {D3BFDA30-F3AA-4BD9-87CB-F030559B8730}.Release|x86.Build.0 = Release|Any CPU + {D3BFDA30-F3AA-4BD9-87CB-F030559B8730}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {D3BFDA30-F3AA-4BD9-87CB-F030559B8730}.Checked|arm.ActiveCfg = Debug|Any CPU + {D3BFDA30-F3AA-4BD9-87CB-F030559B8730}.Checked|arm64.ActiveCfg = Debug|Any CPU + {D3BFDA30-F3AA-4BD9-87CB-F030559B8730}.Checked|x64.ActiveCfg = Debug|Any CPU + {D3BFDA30-F3AA-4BD9-87CB-F030559B8730}.Checked|x86.ActiveCfg = Debug|Any CPU + {7E7268D8-64E0-4CA6-9B1F-2ABA08E55120}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7E7268D8-64E0-4CA6-9B1F-2ABA08E55120}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7E7268D8-64E0-4CA6-9B1F-2ABA08E55120}.Debug|arm.ActiveCfg = Debug|Any CPU + {7E7268D8-64E0-4CA6-9B1F-2ABA08E55120}.Debug|arm64.ActiveCfg = Debug|Any CPU + {7E7268D8-64E0-4CA6-9B1F-2ABA08E55120}.Debug|x64.ActiveCfg = Debug|Any CPU + {7E7268D8-64E0-4CA6-9B1F-2ABA08E55120}.Debug|x64.Build.0 = Debug|Any CPU + {7E7268D8-64E0-4CA6-9B1F-2ABA08E55120}.Debug|x86.ActiveCfg = Debug|Any CPU + {7E7268D8-64E0-4CA6-9B1F-2ABA08E55120}.Debug|x86.Build.0 = Debug|Any CPU + {7E7268D8-64E0-4CA6-9B1F-2ABA08E55120}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7E7268D8-64E0-4CA6-9B1F-2ABA08E55120}.Release|Any CPU.Build.0 = Release|Any CPU + {7E7268D8-64E0-4CA6-9B1F-2ABA08E55120}.Release|arm.ActiveCfg = Release|Any CPU + {7E7268D8-64E0-4CA6-9B1F-2ABA08E55120}.Release|arm64.ActiveCfg = Release|Any CPU + {7E7268D8-64E0-4CA6-9B1F-2ABA08E55120}.Release|x64.ActiveCfg = Release|Any CPU + {7E7268D8-64E0-4CA6-9B1F-2ABA08E55120}.Release|x64.Build.0 = Release|Any CPU + {7E7268D8-64E0-4CA6-9B1F-2ABA08E55120}.Release|x86.ActiveCfg = Release|Any CPU + {7E7268D8-64E0-4CA6-9B1F-2ABA08E55120}.Release|x86.Build.0 = Release|Any CPU + {7E7268D8-64E0-4CA6-9B1F-2ABA08E55120}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {7E7268D8-64E0-4CA6-9B1F-2ABA08E55120}.Checked|arm.ActiveCfg = Debug|Any CPU + {7E7268D8-64E0-4CA6-9B1F-2ABA08E55120}.Checked|arm64.ActiveCfg = Debug|Any CPU + {7E7268D8-64E0-4CA6-9B1F-2ABA08E55120}.Checked|x64.ActiveCfg = Debug|Any CPU + {7E7268D8-64E0-4CA6-9B1F-2ABA08E55120}.Checked|x86.ActiveCfg = Debug|Any CPU {A7AC5643-2743-47AC-9284-718EB5466963}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7AC5643-2743-47AC-9284-718EB5466963}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A7AC5643-2743-47AC-9284-718EB5466963}.Debug|arm.ActiveCfg = Debug|Any CPU + {A7AC5643-2743-47AC-9284-718EB5466963}.Debug|arm64.ActiveCfg = Debug|Any CPU + {A7AC5643-2743-47AC-9284-718EB5466963}.Debug|x64.ActiveCfg = Debug|Any CPU + {A7AC5643-2743-47AC-9284-718EB5466963}.Debug|x64.Build.0 = Debug|Any CPU + {A7AC5643-2743-47AC-9284-718EB5466963}.Debug|x86.ActiveCfg = Debug|Any CPU + {A7AC5643-2743-47AC-9284-718EB5466963}.Debug|x86.Build.0 = Debug|Any CPU {A7AC5643-2743-47AC-9284-718EB5466963}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7AC5643-2743-47AC-9284-718EB5466963}.Release|Any CPU.Build.0 = Release|Any CPU + {A7AC5643-2743-47AC-9284-718EB5466963}.Release|arm.ActiveCfg = Release|Any CPU + {A7AC5643-2743-47AC-9284-718EB5466963}.Release|arm64.ActiveCfg = Release|Any CPU + {A7AC5643-2743-47AC-9284-718EB5466963}.Release|x64.ActiveCfg = Release|Any CPU + {A7AC5643-2743-47AC-9284-718EB5466963}.Release|x64.Build.0 = Release|Any CPU + {A7AC5643-2743-47AC-9284-718EB5466963}.Release|x86.ActiveCfg = Release|Any CPU + {A7AC5643-2743-47AC-9284-718EB5466963}.Release|x86.Build.0 = Release|Any CPU + {A7AC5643-2743-47AC-9284-718EB5466963}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {A7AC5643-2743-47AC-9284-718EB5466963}.Checked|arm.ActiveCfg = Debug|Any CPU + {A7AC5643-2743-47AC-9284-718EB5466963}.Checked|arm64.ActiveCfg = Debug|Any CPU + {A7AC5643-2743-47AC-9284-718EB5466963}.Checked|x64.ActiveCfg = Debug|Any CPU + {A7AC5643-2743-47AC-9284-718EB5466963}.Checked|x86.ActiveCfg = Debug|Any CPU {C1B1DCD9-30B9-4E17-A049-A04DCED30D14}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C1B1DCD9-30B9-4E17-A049-A04DCED30D14}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C1B1DCD9-30B9-4E17-A049-A04DCED30D14}.Debug|arm.ActiveCfg = Debug|Any CPU + {C1B1DCD9-30B9-4E17-A049-A04DCED30D14}.Debug|arm64.ActiveCfg = Debug|Any CPU + {C1B1DCD9-30B9-4E17-A049-A04DCED30D14}.Debug|x64.ActiveCfg = Debug|Any CPU + {C1B1DCD9-30B9-4E17-A049-A04DCED30D14}.Debug|x64.Build.0 = Debug|Any CPU + {C1B1DCD9-30B9-4E17-A049-A04DCED30D14}.Debug|x86.ActiveCfg = Debug|Any CPU + {C1B1DCD9-30B9-4E17-A049-A04DCED30D14}.Debug|x86.Build.0 = Debug|Any CPU {C1B1DCD9-30B9-4E17-A049-A04DCED30D14}.Release|Any CPU.ActiveCfg = Release|Any CPU {C1B1DCD9-30B9-4E17-A049-A04DCED30D14}.Release|Any CPU.Build.0 = Release|Any CPU + {C1B1DCD9-30B9-4E17-A049-A04DCED30D14}.Release|arm.ActiveCfg = Release|Any CPU + {C1B1DCD9-30B9-4E17-A049-A04DCED30D14}.Release|arm64.ActiveCfg = Release|Any CPU + {C1B1DCD9-30B9-4E17-A049-A04DCED30D14}.Release|x64.ActiveCfg = Release|Any CPU + {C1B1DCD9-30B9-4E17-A049-A04DCED30D14}.Release|x64.Build.0 = Release|Any CPU + {C1B1DCD9-30B9-4E17-A049-A04DCED30D14}.Release|x86.ActiveCfg = Release|Any CPU + {C1B1DCD9-30B9-4E17-A049-A04DCED30D14}.Release|x86.Build.0 = Release|Any CPU + {C1B1DCD9-30B9-4E17-A049-A04DCED30D14}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {C1B1DCD9-30B9-4E17-A049-A04DCED30D14}.Checked|arm.ActiveCfg = Debug|Any CPU + {C1B1DCD9-30B9-4E17-A049-A04DCED30D14}.Checked|arm64.ActiveCfg = Debug|Any CPU + {C1B1DCD9-30B9-4E17-A049-A04DCED30D14}.Checked|x64.ActiveCfg = Debug|Any CPU + {C1B1DCD9-30B9-4E17-A049-A04DCED30D14}.Checked|x86.ActiveCfg = Debug|Any CPU {D5A2648A-7BA3-4157-9DBF-D7B7D9B937EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D5A2648A-7BA3-4157-9DBF-D7B7D9B937EA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D5A2648A-7BA3-4157-9DBF-D7B7D9B937EA}.Debug|arm.ActiveCfg = Debug|Any CPU + {D5A2648A-7BA3-4157-9DBF-D7B7D9B937EA}.Debug|arm64.ActiveCfg = Debug|Any CPU + {D5A2648A-7BA3-4157-9DBF-D7B7D9B937EA}.Debug|x64.ActiveCfg = Debug|Any CPU + {D5A2648A-7BA3-4157-9DBF-D7B7D9B937EA}.Debug|x64.Build.0 = Debug|Any CPU + {D5A2648A-7BA3-4157-9DBF-D7B7D9B937EA}.Debug|x86.ActiveCfg = Debug|Any CPU + {D5A2648A-7BA3-4157-9DBF-D7B7D9B937EA}.Debug|x86.Build.0 = Debug|Any CPU {D5A2648A-7BA3-4157-9DBF-D7B7D9B937EA}.Release|Any CPU.ActiveCfg = Release|Any CPU {D5A2648A-7BA3-4157-9DBF-D7B7D9B937EA}.Release|Any CPU.Build.0 = Release|Any CPU + {D5A2648A-7BA3-4157-9DBF-D7B7D9B937EA}.Release|arm.ActiveCfg = Release|Any CPU + {D5A2648A-7BA3-4157-9DBF-D7B7D9B937EA}.Release|arm64.ActiveCfg = Release|Any CPU + {D5A2648A-7BA3-4157-9DBF-D7B7D9B937EA}.Release|x64.ActiveCfg = Release|Any CPU + {D5A2648A-7BA3-4157-9DBF-D7B7D9B937EA}.Release|x64.Build.0 = Release|Any CPU + {D5A2648A-7BA3-4157-9DBF-D7B7D9B937EA}.Release|x86.ActiveCfg = Release|Any CPU + {D5A2648A-7BA3-4157-9DBF-D7B7D9B937EA}.Release|x86.Build.0 = Release|Any CPU + {D5A2648A-7BA3-4157-9DBF-D7B7D9B937EA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {D5A2648A-7BA3-4157-9DBF-D7B7D9B937EA}.Checked|arm.ActiveCfg = Debug|Any CPU + {D5A2648A-7BA3-4157-9DBF-D7B7D9B937EA}.Checked|arm64.ActiveCfg = Debug|Any CPU + {D5A2648A-7BA3-4157-9DBF-D7B7D9B937EA}.Checked|x64.ActiveCfg = Debug|Any CPU + {D5A2648A-7BA3-4157-9DBF-D7B7D9B937EA}.Checked|x86.ActiveCfg = Debug|Any CPU {6B552ED6-CA18-4048-8BDB-2B4A09020694}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6B552ED6-CA18-4048-8BDB-2B4A09020694}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6B552ED6-CA18-4048-8BDB-2B4A09020694}.Debug|arm.ActiveCfg = Debug|Any CPU + {6B552ED6-CA18-4048-8BDB-2B4A09020694}.Debug|arm64.ActiveCfg = Debug|Any CPU + {6B552ED6-CA18-4048-8BDB-2B4A09020694}.Debug|x64.ActiveCfg = Debug|Any CPU + {6B552ED6-CA18-4048-8BDB-2B4A09020694}.Debug|x64.Build.0 = Debug|Any CPU + {6B552ED6-CA18-4048-8BDB-2B4A09020694}.Debug|x86.ActiveCfg = Debug|Any CPU + {6B552ED6-CA18-4048-8BDB-2B4A09020694}.Debug|x86.Build.0 = Debug|Any CPU {6B552ED6-CA18-4048-8BDB-2B4A09020694}.Release|Any CPU.ActiveCfg = Release|Any CPU {6B552ED6-CA18-4048-8BDB-2B4A09020694}.Release|Any CPU.Build.0 = Release|Any CPU + {6B552ED6-CA18-4048-8BDB-2B4A09020694}.Release|arm.ActiveCfg = Release|Any CPU + {6B552ED6-CA18-4048-8BDB-2B4A09020694}.Release|arm64.ActiveCfg = Release|Any CPU + {6B552ED6-CA18-4048-8BDB-2B4A09020694}.Release|x64.ActiveCfg = Release|Any CPU + {6B552ED6-CA18-4048-8BDB-2B4A09020694}.Release|x64.Build.0 = Release|Any CPU + {6B552ED6-CA18-4048-8BDB-2B4A09020694}.Release|x86.ActiveCfg = Release|Any CPU + {6B552ED6-CA18-4048-8BDB-2B4A09020694}.Release|x86.Build.0 = Release|Any CPU + {6B552ED6-CA18-4048-8BDB-2B4A09020694}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {6B552ED6-CA18-4048-8BDB-2B4A09020694}.Checked|arm.ActiveCfg = Debug|Any CPU + {6B552ED6-CA18-4048-8BDB-2B4A09020694}.Checked|arm64.ActiveCfg = Debug|Any CPU + {6B552ED6-CA18-4048-8BDB-2B4A09020694}.Checked|x64.ActiveCfg = Debug|Any CPU + {6B552ED6-CA18-4048-8BDB-2B4A09020694}.Checked|x86.ActiveCfg = Debug|Any CPU + {9CB4F5E5-8265-41EA-BB1B-EF4D2724DF9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9CB4F5E5-8265-41EA-BB1B-EF4D2724DF9E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9CB4F5E5-8265-41EA-BB1B-EF4D2724DF9E}.Debug|arm.ActiveCfg = Debug|Any CPU + {9CB4F5E5-8265-41EA-BB1B-EF4D2724DF9E}.Debug|arm64.ActiveCfg = Debug|Any CPU + {9CB4F5E5-8265-41EA-BB1B-EF4D2724DF9E}.Debug|x64.ActiveCfg = Debug|Any CPU + {9CB4F5E5-8265-41EA-BB1B-EF4D2724DF9E}.Debug|x64.Build.0 = Debug|Any CPU + {9CB4F5E5-8265-41EA-BB1B-EF4D2724DF9E}.Debug|x86.ActiveCfg = Debug|Any CPU + {9CB4F5E5-8265-41EA-BB1B-EF4D2724DF9E}.Debug|x86.Build.0 = Debug|Any CPU + {9CB4F5E5-8265-41EA-BB1B-EF4D2724DF9E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9CB4F5E5-8265-41EA-BB1B-EF4D2724DF9E}.Release|Any CPU.Build.0 = Release|Any CPU + {9CB4F5E5-8265-41EA-BB1B-EF4D2724DF9E}.Release|arm.ActiveCfg = Release|Any CPU + {9CB4F5E5-8265-41EA-BB1B-EF4D2724DF9E}.Release|arm64.ActiveCfg = Release|Any CPU + {9CB4F5E5-8265-41EA-BB1B-EF4D2724DF9E}.Release|x64.ActiveCfg = Release|Any CPU + {9CB4F5E5-8265-41EA-BB1B-EF4D2724DF9E}.Release|x64.Build.0 = Release|Any CPU + {9CB4F5E5-8265-41EA-BB1B-EF4D2724DF9E}.Release|x86.ActiveCfg = Release|Any CPU + {9CB4F5E5-8265-41EA-BB1B-EF4D2724DF9E}.Release|x86.Build.0 = Release|Any CPU + {9CB4F5E5-8265-41EA-BB1B-EF4D2724DF9E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {9CB4F5E5-8265-41EA-BB1B-EF4D2724DF9E}.Checked|arm.ActiveCfg = Debug|Any CPU + {9CB4F5E5-8265-41EA-BB1B-EF4D2724DF9E}.Checked|arm64.ActiveCfg = Debug|Any CPU + {9CB4F5E5-8265-41EA-BB1B-EF4D2724DF9E}.Checked|x64.ActiveCfg = Debug|Any CPU + {9CB4F5E5-8265-41EA-BB1B-EF4D2724DF9E}.Checked|x86.ActiveCfg = Debug|Any CPU {25441E1F-971D-4FF3-BA5A-2FBAAC3EB9FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {25441E1F-971D-4FF3-BA5A-2FBAAC3EB9FF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {25441E1F-971D-4FF3-BA5A-2FBAAC3EB9FF}.Debug|arm.ActiveCfg = Debug|Any CPU + {25441E1F-971D-4FF3-BA5A-2FBAAC3EB9FF}.Debug|arm64.ActiveCfg = Debug|Any CPU + {25441E1F-971D-4FF3-BA5A-2FBAAC3EB9FF}.Debug|x64.ActiveCfg = Debug|Any CPU + {25441E1F-971D-4FF3-BA5A-2FBAAC3EB9FF}.Debug|x64.Build.0 = Debug|Any CPU + {25441E1F-971D-4FF3-BA5A-2FBAAC3EB9FF}.Debug|x86.ActiveCfg = Debug|Any CPU + {25441E1F-971D-4FF3-BA5A-2FBAAC3EB9FF}.Debug|x86.Build.0 = Debug|Any CPU {25441E1F-971D-4FF3-BA5A-2FBAAC3EB9FF}.Release|Any CPU.ActiveCfg = Release|Any CPU {25441E1F-971D-4FF3-BA5A-2FBAAC3EB9FF}.Release|Any CPU.Build.0 = Release|Any CPU + {25441E1F-971D-4FF3-BA5A-2FBAAC3EB9FF}.Release|arm.ActiveCfg = Release|Any CPU + {25441E1F-971D-4FF3-BA5A-2FBAAC3EB9FF}.Release|arm64.ActiveCfg = Release|Any CPU + {25441E1F-971D-4FF3-BA5A-2FBAAC3EB9FF}.Release|x64.ActiveCfg = Release|Any CPU + {25441E1F-971D-4FF3-BA5A-2FBAAC3EB9FF}.Release|x64.Build.0 = Release|Any CPU + {25441E1F-971D-4FF3-BA5A-2FBAAC3EB9FF}.Release|x86.ActiveCfg = Release|Any CPU + {25441E1F-971D-4FF3-BA5A-2FBAAC3EB9FF}.Release|x86.Build.0 = Release|Any CPU + {25441E1F-971D-4FF3-BA5A-2FBAAC3EB9FF}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {25441E1F-971D-4FF3-BA5A-2FBAAC3EB9FF}.Checked|arm.ActiveCfg = Debug|Any CPU + {25441E1F-971D-4FF3-BA5A-2FBAAC3EB9FF}.Checked|arm64.ActiveCfg = Debug|Any CPU + {25441E1F-971D-4FF3-BA5A-2FBAAC3EB9FF}.Checked|x64.ActiveCfg = Debug|Any CPU + {25441E1F-971D-4FF3-BA5A-2FBAAC3EB9FF}.Checked|x86.ActiveCfg = Debug|Any CPU {E565DD4A-0749-4F5E-8476-EF44D742E377}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E565DD4A-0749-4F5E-8476-EF44D742E377}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E565DD4A-0749-4F5E-8476-EF44D742E377}.Debug|arm.ActiveCfg = Debug|Any CPU + {E565DD4A-0749-4F5E-8476-EF44D742E377}.Debug|arm64.ActiveCfg = Debug|Any CPU + {E565DD4A-0749-4F5E-8476-EF44D742E377}.Debug|x64.ActiveCfg = Debug|Any CPU + {E565DD4A-0749-4F5E-8476-EF44D742E377}.Debug|x64.Build.0 = Debug|Any CPU + {E565DD4A-0749-4F5E-8476-EF44D742E377}.Debug|x86.ActiveCfg = Debug|Any CPU + {E565DD4A-0749-4F5E-8476-EF44D742E377}.Debug|x86.Build.0 = Debug|Any CPU {E565DD4A-0749-4F5E-8476-EF44D742E377}.Release|Any CPU.ActiveCfg = Release|Any CPU {E565DD4A-0749-4F5E-8476-EF44D742E377}.Release|Any CPU.Build.0 = Release|Any CPU + {E565DD4A-0749-4F5E-8476-EF44D742E377}.Release|arm.ActiveCfg = Release|Any CPU + {E565DD4A-0749-4F5E-8476-EF44D742E377}.Release|arm64.ActiveCfg = Release|Any CPU + {E565DD4A-0749-4F5E-8476-EF44D742E377}.Release|x64.ActiveCfg = Release|Any CPU + {E565DD4A-0749-4F5E-8476-EF44D742E377}.Release|x64.Build.0 = Release|Any CPU + {E565DD4A-0749-4F5E-8476-EF44D742E377}.Release|x86.ActiveCfg = Release|Any CPU + {E565DD4A-0749-4F5E-8476-EF44D742E377}.Release|x86.Build.0 = Release|Any CPU + {E565DD4A-0749-4F5E-8476-EF44D742E377}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {E565DD4A-0749-4F5E-8476-EF44D742E377}.Checked|arm.ActiveCfg = Debug|Any CPU + {E565DD4A-0749-4F5E-8476-EF44D742E377}.Checked|arm64.ActiveCfg = Debug|Any CPU + {E565DD4A-0749-4F5E-8476-EF44D742E377}.Checked|x64.ActiveCfg = Debug|Any CPU + {E565DD4A-0749-4F5E-8476-EF44D742E377}.Checked|x86.ActiveCfg = Debug|Any CPU {57DABE06-F0EF-4C7A-BC0C-791A3A5F45F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {57DABE06-F0EF-4C7A-BC0C-791A3A5F45F5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {57DABE06-F0EF-4C7A-BC0C-791A3A5F45F5}.Debug|arm.ActiveCfg = Debug|Any CPU + {57DABE06-F0EF-4C7A-BC0C-791A3A5F45F5}.Debug|arm64.ActiveCfg = Debug|Any CPU + {57DABE06-F0EF-4C7A-BC0C-791A3A5F45F5}.Debug|x64.ActiveCfg = Debug|Any CPU + {57DABE06-F0EF-4C7A-BC0C-791A3A5F45F5}.Debug|x64.Build.0 = Debug|Any CPU + {57DABE06-F0EF-4C7A-BC0C-791A3A5F45F5}.Debug|x86.ActiveCfg = Debug|Any CPU + {57DABE06-F0EF-4C7A-BC0C-791A3A5F45F5}.Debug|x86.Build.0 = Debug|Any CPU {57DABE06-F0EF-4C7A-BC0C-791A3A5F45F5}.Release|Any CPU.ActiveCfg = Release|Any CPU {57DABE06-F0EF-4C7A-BC0C-791A3A5F45F5}.Release|Any CPU.Build.0 = Release|Any CPU + {57DABE06-F0EF-4C7A-BC0C-791A3A5F45F5}.Release|arm.ActiveCfg = Release|Any CPU + {57DABE06-F0EF-4C7A-BC0C-791A3A5F45F5}.Release|arm64.ActiveCfg = Release|Any CPU + {57DABE06-F0EF-4C7A-BC0C-791A3A5F45F5}.Release|x64.ActiveCfg = Release|Any CPU + {57DABE06-F0EF-4C7A-BC0C-791A3A5F45F5}.Release|x64.Build.0 = Release|Any CPU + {57DABE06-F0EF-4C7A-BC0C-791A3A5F45F5}.Release|x86.ActiveCfg = Release|Any CPU + {57DABE06-F0EF-4C7A-BC0C-791A3A5F45F5}.Release|x86.Build.0 = Release|Any CPU + {57DABE06-F0EF-4C7A-BC0C-791A3A5F45F5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {57DABE06-F0EF-4C7A-BC0C-791A3A5F45F5}.Checked|arm.ActiveCfg = Debug|Any CPU + {57DABE06-F0EF-4C7A-BC0C-791A3A5F45F5}.Checked|arm64.ActiveCfg = Debug|Any CPU + {57DABE06-F0EF-4C7A-BC0C-791A3A5F45F5}.Checked|x64.ActiveCfg = Debug|Any CPU + {57DABE06-F0EF-4C7A-BC0C-791A3A5F45F5}.Checked|x86.ActiveCfg = Debug|Any CPU {15CB5F16-593B-460D-BDC3-134A56EF3B5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {15CB5F16-593B-460D-BDC3-134A56EF3B5F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {15CB5F16-593B-460D-BDC3-134A56EF3B5F}.Debug|arm.ActiveCfg = Debug|Any CPU + {15CB5F16-593B-460D-BDC3-134A56EF3B5F}.Debug|arm64.ActiveCfg = Debug|Any CPU + {15CB5F16-593B-460D-BDC3-134A56EF3B5F}.Debug|x64.ActiveCfg = Debug|Any CPU + {15CB5F16-593B-460D-BDC3-134A56EF3B5F}.Debug|x64.Build.0 = Debug|Any CPU + {15CB5F16-593B-460D-BDC3-134A56EF3B5F}.Debug|x86.ActiveCfg = Debug|Any CPU + {15CB5F16-593B-460D-BDC3-134A56EF3B5F}.Debug|x86.Build.0 = Debug|Any CPU {15CB5F16-593B-460D-BDC3-134A56EF3B5F}.Release|Any CPU.ActiveCfg = Release|Any CPU {15CB5F16-593B-460D-BDC3-134A56EF3B5F}.Release|Any CPU.Build.0 = Release|Any CPU + {15CB5F16-593B-460D-BDC3-134A56EF3B5F}.Release|arm.ActiveCfg = Release|Any CPU + {15CB5F16-593B-460D-BDC3-134A56EF3B5F}.Release|arm64.ActiveCfg = Release|Any CPU + {15CB5F16-593B-460D-BDC3-134A56EF3B5F}.Release|x64.ActiveCfg = Release|Any CPU + {15CB5F16-593B-460D-BDC3-134A56EF3B5F}.Release|x64.Build.0 = Release|Any CPU + {15CB5F16-593B-460D-BDC3-134A56EF3B5F}.Release|x86.ActiveCfg = Release|Any CPU + {15CB5F16-593B-460D-BDC3-134A56EF3B5F}.Release|x86.Build.0 = Release|Any CPU + {15CB5F16-593B-460D-BDC3-134A56EF3B5F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {15CB5F16-593B-460D-BDC3-134A56EF3B5F}.Checked|arm.ActiveCfg = Debug|Any CPU + {15CB5F16-593B-460D-BDC3-134A56EF3B5F}.Checked|arm64.ActiveCfg = Debug|Any CPU + {15CB5F16-593B-460D-BDC3-134A56EF3B5F}.Checked|x64.ActiveCfg = Debug|Any CPU + {15CB5F16-593B-460D-BDC3-134A56EF3B5F}.Checked|x86.ActiveCfg = Debug|Any CPU {724E9C4C-A140-4815-88A4-2934BD67574F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {724E9C4C-A140-4815-88A4-2934BD67574F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {724E9C4C-A140-4815-88A4-2934BD67574F}.Debug|arm.ActiveCfg = Debug|Any CPU + {724E9C4C-A140-4815-88A4-2934BD67574F}.Debug|arm64.ActiveCfg = Debug|Any CPU + {724E9C4C-A140-4815-88A4-2934BD67574F}.Debug|x64.ActiveCfg = Debug|Any CPU + {724E9C4C-A140-4815-88A4-2934BD67574F}.Debug|x64.Build.0 = Debug|Any CPU + {724E9C4C-A140-4815-88A4-2934BD67574F}.Debug|x86.ActiveCfg = Debug|Any CPU + {724E9C4C-A140-4815-88A4-2934BD67574F}.Debug|x86.Build.0 = Debug|Any CPU {724E9C4C-A140-4815-88A4-2934BD67574F}.Release|Any CPU.ActiveCfg = Release|Any CPU {724E9C4C-A140-4815-88A4-2934BD67574F}.Release|Any CPU.Build.0 = Release|Any CPU + {724E9C4C-A140-4815-88A4-2934BD67574F}.Release|arm.ActiveCfg = Release|Any CPU + {724E9C4C-A140-4815-88A4-2934BD67574F}.Release|arm64.ActiveCfg = Release|Any CPU + {724E9C4C-A140-4815-88A4-2934BD67574F}.Release|x64.ActiveCfg = Release|Any CPU + {724E9C4C-A140-4815-88A4-2934BD67574F}.Release|x64.Build.0 = Release|Any CPU + {724E9C4C-A140-4815-88A4-2934BD67574F}.Release|x86.ActiveCfg = Release|Any CPU + {724E9C4C-A140-4815-88A4-2934BD67574F}.Release|x86.Build.0 = Release|Any CPU + {724E9C4C-A140-4815-88A4-2934BD67574F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {724E9C4C-A140-4815-88A4-2934BD67574F}.Checked|arm.ActiveCfg = Debug|Any CPU + {724E9C4C-A140-4815-88A4-2934BD67574F}.Checked|arm64.ActiveCfg = Debug|Any CPU + {724E9C4C-A140-4815-88A4-2934BD67574F}.Checked|x64.ActiveCfg = Debug|Any CPU + {724E9C4C-A140-4815-88A4-2934BD67574F}.Checked|x86.ActiveCfg = Debug|Any CPU {CDC3E87D-26B7-45BA-87D4-D6417D64D9E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CDC3E87D-26B7-45BA-87D4-D6417D64D9E5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CDC3E87D-26B7-45BA-87D4-D6417D64D9E5}.Debug|arm.ActiveCfg = Debug|Any CPU + {CDC3E87D-26B7-45BA-87D4-D6417D64D9E5}.Debug|arm64.ActiveCfg = Debug|Any CPU + {CDC3E87D-26B7-45BA-87D4-D6417D64D9E5}.Debug|x64.ActiveCfg = Debug|Any CPU + {CDC3E87D-26B7-45BA-87D4-D6417D64D9E5}.Debug|x64.Build.0 = Debug|Any CPU + {CDC3E87D-26B7-45BA-87D4-D6417D64D9E5}.Debug|x86.ActiveCfg = Debug|Any CPU + {CDC3E87D-26B7-45BA-87D4-D6417D64D9E5}.Debug|x86.Build.0 = Debug|Any CPU {CDC3E87D-26B7-45BA-87D4-D6417D64D9E5}.Release|Any CPU.ActiveCfg = Release|Any CPU {CDC3E87D-26B7-45BA-87D4-D6417D64D9E5}.Release|Any CPU.Build.0 = Release|Any CPU + {CDC3E87D-26B7-45BA-87D4-D6417D64D9E5}.Release|arm.ActiveCfg = Release|Any CPU + {CDC3E87D-26B7-45BA-87D4-D6417D64D9E5}.Release|arm64.ActiveCfg = Release|Any CPU + {CDC3E87D-26B7-45BA-87D4-D6417D64D9E5}.Release|x64.ActiveCfg = Release|Any CPU + {CDC3E87D-26B7-45BA-87D4-D6417D64D9E5}.Release|x64.Build.0 = Release|Any CPU + {CDC3E87D-26B7-45BA-87D4-D6417D64D9E5}.Release|x86.ActiveCfg = Release|Any CPU + {CDC3E87D-26B7-45BA-87D4-D6417D64D9E5}.Release|x86.Build.0 = Release|Any CPU + {CDC3E87D-26B7-45BA-87D4-D6417D64D9E5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {CDC3E87D-26B7-45BA-87D4-D6417D64D9E5}.Checked|arm.ActiveCfg = Debug|Any CPU + {CDC3E87D-26B7-45BA-87D4-D6417D64D9E5}.Checked|arm64.ActiveCfg = Debug|Any CPU + {CDC3E87D-26B7-45BA-87D4-D6417D64D9E5}.Checked|x64.ActiveCfg = Debug|Any CPU + {CDC3E87D-26B7-45BA-87D4-D6417D64D9E5}.Checked|x86.ActiveCfg = Debug|Any CPU + {965BE455-6D8C-43F7-9C0F-22C223D680ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {965BE455-6D8C-43F7-9C0F-22C223D680ED}.Debug|Any CPU.Build.0 = Debug|Any CPU + {965BE455-6D8C-43F7-9C0F-22C223D680ED}.Debug|arm.ActiveCfg = Debug|Any CPU + {965BE455-6D8C-43F7-9C0F-22C223D680ED}.Debug|arm64.ActiveCfg = Debug|Any CPU + {965BE455-6D8C-43F7-9C0F-22C223D680ED}.Debug|x64.ActiveCfg = Debug|Any CPU + {965BE455-6D8C-43F7-9C0F-22C223D680ED}.Debug|x64.Build.0 = Debug|Any CPU + {965BE455-6D8C-43F7-9C0F-22C223D680ED}.Debug|x86.ActiveCfg = Debug|Any CPU + {965BE455-6D8C-43F7-9C0F-22C223D680ED}.Debug|x86.Build.0 = Debug|Any CPU + {965BE455-6D8C-43F7-9C0F-22C223D680ED}.Release|Any CPU.ActiveCfg = Release|Any CPU + {965BE455-6D8C-43F7-9C0F-22C223D680ED}.Release|Any CPU.Build.0 = Release|Any CPU + {965BE455-6D8C-43F7-9C0F-22C223D680ED}.Release|arm.ActiveCfg = Release|Any CPU + {965BE455-6D8C-43F7-9C0F-22C223D680ED}.Release|arm64.ActiveCfg = Release|Any CPU + {965BE455-6D8C-43F7-9C0F-22C223D680ED}.Release|x64.ActiveCfg = Release|Any CPU + {965BE455-6D8C-43F7-9C0F-22C223D680ED}.Release|x64.Build.0 = Release|Any CPU + {965BE455-6D8C-43F7-9C0F-22C223D680ED}.Release|x86.ActiveCfg = Release|Any CPU + {965BE455-6D8C-43F7-9C0F-22C223D680ED}.Release|x86.Build.0 = Release|Any CPU + {965BE455-6D8C-43F7-9C0F-22C223D680ED}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {965BE455-6D8C-43F7-9C0F-22C223D680ED}.Checked|arm.ActiveCfg = Debug|Any CPU + {965BE455-6D8C-43F7-9C0F-22C223D680ED}.Checked|arm64.ActiveCfg = Debug|Any CPU + {965BE455-6D8C-43F7-9C0F-22C223D680ED}.Checked|x64.ActiveCfg = Debug|Any CPU + {965BE455-6D8C-43F7-9C0F-22C223D680ED}.Checked|x86.ActiveCfg = Debug|Any CPU + {865F846B-B958-4546-9AAA-557FFED6D419}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {865F846B-B958-4546-9AAA-557FFED6D419}.Debug|Any CPU.Build.0 = Debug|Any CPU + {865F846B-B958-4546-9AAA-557FFED6D419}.Debug|arm.ActiveCfg = Debug|Any CPU + {865F846B-B958-4546-9AAA-557FFED6D419}.Debug|arm64.ActiveCfg = Debug|Any CPU + {865F846B-B958-4546-9AAA-557FFED6D419}.Debug|x64.ActiveCfg = Debug|Any CPU + {865F846B-B958-4546-9AAA-557FFED6D419}.Debug|x64.Build.0 = Debug|Any CPU + {865F846B-B958-4546-9AAA-557FFED6D419}.Debug|x86.ActiveCfg = Debug|Any CPU + {865F846B-B958-4546-9AAA-557FFED6D419}.Debug|x86.Build.0 = Debug|Any CPU + {865F846B-B958-4546-9AAA-557FFED6D419}.Release|Any CPU.ActiveCfg = Release|Any CPU + {865F846B-B958-4546-9AAA-557FFED6D419}.Release|Any CPU.Build.0 = Release|Any CPU + {865F846B-B958-4546-9AAA-557FFED6D419}.Release|arm.ActiveCfg = Release|Any CPU + {865F846B-B958-4546-9AAA-557FFED6D419}.Release|arm64.ActiveCfg = Release|Any CPU + {865F846B-B958-4546-9AAA-557FFED6D419}.Release|x64.ActiveCfg = Release|Any CPU + {865F846B-B958-4546-9AAA-557FFED6D419}.Release|x64.Build.0 = Release|Any CPU + {865F846B-B958-4546-9AAA-557FFED6D419}.Release|x86.ActiveCfg = Release|Any CPU + {865F846B-B958-4546-9AAA-557FFED6D419}.Release|x86.Build.0 = Release|Any CPU + {865F846B-B958-4546-9AAA-557FFED6D419}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {865F846B-B958-4546-9AAA-557FFED6D419}.Checked|arm.ActiveCfg = Debug|Any CPU + {865F846B-B958-4546-9AAA-557FFED6D419}.Checked|arm64.ActiveCfg = Debug|Any CPU + {865F846B-B958-4546-9AAA-557FFED6D419}.Checked|x64.ActiveCfg = Debug|Any CPU + {865F846B-B958-4546-9AAA-557FFED6D419}.Checked|x86.ActiveCfg = Debug|Any CPU + {A500EDDF-AAD0-4486-A2EB-E4A78AE58707}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A500EDDF-AAD0-4486-A2EB-E4A78AE58707}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A500EDDF-AAD0-4486-A2EB-E4A78AE58707}.Debug|arm.ActiveCfg = Debug|Any CPU + {A500EDDF-AAD0-4486-A2EB-E4A78AE58707}.Debug|arm64.ActiveCfg = Debug|Any CPU + {A500EDDF-AAD0-4486-A2EB-E4A78AE58707}.Debug|x64.ActiveCfg = Debug|Any CPU + {A500EDDF-AAD0-4486-A2EB-E4A78AE58707}.Debug|x64.Build.0 = Debug|Any CPU + {A500EDDF-AAD0-4486-A2EB-E4A78AE58707}.Debug|x86.ActiveCfg = Debug|Any CPU + {A500EDDF-AAD0-4486-A2EB-E4A78AE58707}.Debug|x86.Build.0 = Debug|Any CPU + {A500EDDF-AAD0-4486-A2EB-E4A78AE58707}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A500EDDF-AAD0-4486-A2EB-E4A78AE58707}.Release|Any CPU.Build.0 = Release|Any CPU + {A500EDDF-AAD0-4486-A2EB-E4A78AE58707}.Release|arm.ActiveCfg = Release|Any CPU + {A500EDDF-AAD0-4486-A2EB-E4A78AE58707}.Release|arm64.ActiveCfg = Release|Any CPU + {A500EDDF-AAD0-4486-A2EB-E4A78AE58707}.Release|x64.ActiveCfg = Release|Any CPU + {A500EDDF-AAD0-4486-A2EB-E4A78AE58707}.Release|x64.Build.0 = Release|Any CPU + {A500EDDF-AAD0-4486-A2EB-E4A78AE58707}.Release|x86.ActiveCfg = Release|Any CPU + {A500EDDF-AAD0-4486-A2EB-E4A78AE58707}.Release|x86.Build.0 = Release|Any CPU + {A500EDDF-AAD0-4486-A2EB-E4A78AE58707}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {A500EDDF-AAD0-4486-A2EB-E4A78AE58707}.Checked|arm.ActiveCfg = Debug|Any CPU + {A500EDDF-AAD0-4486-A2EB-E4A78AE58707}.Checked|arm64.ActiveCfg = Debug|Any CPU + {A500EDDF-AAD0-4486-A2EB-E4A78AE58707}.Checked|x64.ActiveCfg = Debug|Any CPU + {A500EDDF-AAD0-4486-A2EB-E4A78AE58707}.Checked|x86.ActiveCfg = Debug|Any CPU + {305B75AF-BAB0-47FF-AB8A-29D65082C471}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {305B75AF-BAB0-47FF-AB8A-29D65082C471}.Debug|Any CPU.Build.0 = Debug|Any CPU + {305B75AF-BAB0-47FF-AB8A-29D65082C471}.Debug|arm.ActiveCfg = Debug|Any CPU + {305B75AF-BAB0-47FF-AB8A-29D65082C471}.Debug|arm64.ActiveCfg = Debug|Any CPU + {305B75AF-BAB0-47FF-AB8A-29D65082C471}.Debug|x64.ActiveCfg = Debug|Any CPU + {305B75AF-BAB0-47FF-AB8A-29D65082C471}.Debug|x64.Build.0 = Debug|Any CPU + {305B75AF-BAB0-47FF-AB8A-29D65082C471}.Debug|x86.ActiveCfg = Debug|Any CPU + {305B75AF-BAB0-47FF-AB8A-29D65082C471}.Debug|x86.Build.0 = Debug|Any CPU + {305B75AF-BAB0-47FF-AB8A-29D65082C471}.Release|Any CPU.ActiveCfg = Release|Any CPU + {305B75AF-BAB0-47FF-AB8A-29D65082C471}.Release|Any CPU.Build.0 = Release|Any CPU + {305B75AF-BAB0-47FF-AB8A-29D65082C471}.Release|arm.ActiveCfg = Release|Any CPU + {305B75AF-BAB0-47FF-AB8A-29D65082C471}.Release|arm64.ActiveCfg = Release|Any CPU + {305B75AF-BAB0-47FF-AB8A-29D65082C471}.Release|x64.ActiveCfg = Release|Any CPU + {305B75AF-BAB0-47FF-AB8A-29D65082C471}.Release|x64.Build.0 = Release|Any CPU + {305B75AF-BAB0-47FF-AB8A-29D65082C471}.Release|x86.ActiveCfg = Release|Any CPU + {305B75AF-BAB0-47FF-AB8A-29D65082C471}.Release|x86.Build.0 = Release|Any CPU + {305B75AF-BAB0-47FF-AB8A-29D65082C471}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {305B75AF-BAB0-47FF-AB8A-29D65082C471}.Checked|arm.ActiveCfg = Debug|Any CPU + {305B75AF-BAB0-47FF-AB8A-29D65082C471}.Checked|arm64.ActiveCfg = Debug|Any CPU + {305B75AF-BAB0-47FF-AB8A-29D65082C471}.Checked|x64.ActiveCfg = Debug|Any CPU + {305B75AF-BAB0-47FF-AB8A-29D65082C471}.Checked|x86.ActiveCfg = Debug|Any CPU + {16A18208-CD5B-4490-866D-F3CD25D8CF76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {16A18208-CD5B-4490-866D-F3CD25D8CF76}.Debug|Any CPU.Build.0 = Debug|Any CPU + {16A18208-CD5B-4490-866D-F3CD25D8CF76}.Debug|arm.ActiveCfg = Debug|Any CPU + {16A18208-CD5B-4490-866D-F3CD25D8CF76}.Debug|arm64.ActiveCfg = Debug|Any CPU + {16A18208-CD5B-4490-866D-F3CD25D8CF76}.Debug|x64.ActiveCfg = Debug|Any CPU + {16A18208-CD5B-4490-866D-F3CD25D8CF76}.Debug|x64.Build.0 = Debug|Any CPU + {16A18208-CD5B-4490-866D-F3CD25D8CF76}.Debug|x86.ActiveCfg = Debug|Any CPU + {16A18208-CD5B-4490-866D-F3CD25D8CF76}.Debug|x86.Build.0 = Debug|Any CPU + {16A18208-CD5B-4490-866D-F3CD25D8CF76}.Release|Any CPU.ActiveCfg = Release|Any CPU + {16A18208-CD5B-4490-866D-F3CD25D8CF76}.Release|Any CPU.Build.0 = Release|Any CPU + {16A18208-CD5B-4490-866D-F3CD25D8CF76}.Release|arm.ActiveCfg = Release|Any CPU + {16A18208-CD5B-4490-866D-F3CD25D8CF76}.Release|arm64.ActiveCfg = Release|Any CPU + {16A18208-CD5B-4490-866D-F3CD25D8CF76}.Release|x64.ActiveCfg = Release|Any CPU + {16A18208-CD5B-4490-866D-F3CD25D8CF76}.Release|x64.Build.0 = Release|Any CPU + {16A18208-CD5B-4490-866D-F3CD25D8CF76}.Release|x86.ActiveCfg = Release|Any CPU + {16A18208-CD5B-4490-866D-F3CD25D8CF76}.Release|x86.Build.0 = Release|Any CPU + {16A18208-CD5B-4490-866D-F3CD25D8CF76}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {16A18208-CD5B-4490-866D-F3CD25D8CF76}.Checked|arm.ActiveCfg = Debug|Any CPU + {16A18208-CD5B-4490-866D-F3CD25D8CF76}.Checked|arm64.ActiveCfg = Debug|Any CPU + {16A18208-CD5B-4490-866D-F3CD25D8CF76}.Checked|x64.ActiveCfg = Debug|Any CPU + {16A18208-CD5B-4490-866D-F3CD25D8CF76}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution + {D0A3B572-E4C5-4ACC-B84A-C71FED0A20B1} = {2271988B-3D42-40FD-A57F-296AB05E15B6} {9220284A-2366-43C3-8ED0-D6ED46EC8175} = {78D8A09F-59F1-4F02-8FA9-14243A052080} {7CF29A1C-AAE7-46E2-B1BE-40CEE7632A7B} = {78D8A09F-59F1-4F02-8FA9-14243A052080} {DF14A751-0E6D-4B99-A6FB-F295B8C5E0FC} = {78D8A09F-59F1-4F02-8FA9-14243A052080} - {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} - {53D35175-9799-4535-8322-88BF2FCDD56E} = {B64B7581-6925-4823-B7AF-97FBC53A4146} - {6B552ED6-CA18-4048-8BDB-2B4A09020694} = {B64B7581-6925-4823-B7AF-97FBC53A4146} - {25441E1F-971D-4FF3-BA5A-2FBAAC3EB9FF} = {B64B7581-6925-4823-B7AF-97FBC53A4146} - {57DABE06-F0EF-4C7A-BC0C-791A3A5F45F5} = {B64B7581-6925-4823-B7AF-97FBC53A4146} - {724E9C4C-A140-4815-88A4-2934BD67574F} = {B64B7581-6925-4823-B7AF-97FBC53A4146} + {8D254FBD-C46E-4701-B2B5-238CABBE81F8} = {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} @@ -194,12 +913,34 @@ Global {826D5FBF-95C3-42EE-BACD-0CA38B6FEC73} = {B90127A0-E005-44FE-9D2B-3DE06444CE37} {A15EED32-12DF-40D3-AA8E-197F76D8A0C5} = {B90127A0-E005-44FE-9D2B-3DE06444CE37} {3A471AEB-FCCB-43DF-9C04-F00FA9AAF81E} = {B90127A0-E005-44FE-9D2B-3DE06444CE37} + {7E7268D8-64E0-4CA6-9B1F-2ABA08E55120} = {B90127A0-E005-44FE-9D2B-3DE06444CE37} + {9CB4F5E5-8265-41EA-BB1B-EF4D2724DF9E} = {B90127A0-E005-44FE-9D2B-3DE06444CE37} {E565DD4A-0749-4F5E-8476-EF44D742E377} = {B90127A0-E005-44FE-9D2B-3DE06444CE37} {15CB5F16-593B-460D-BDC3-134A56EF3B5F} = {B90127A0-E005-44FE-9D2B-3DE06444CE37} {CDC3E87D-26B7-45BA-87D4-D6417D64D9E5} = {B90127A0-E005-44FE-9D2B-3DE06444CE37} + {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} + {53D35175-9799-4535-8322-88BF2FCDD56E} = {B64B7581-6925-4823-B7AF-97FBC53A4146} + {D3BFDA30-F3AA-4BD9-87CB-F030559B8730} = {B64B7581-6925-4823-B7AF-97FBC53A4146} + {6B552ED6-CA18-4048-8BDB-2B4A09020694} = {B64B7581-6925-4823-B7AF-97FBC53A4146} + {25441E1F-971D-4FF3-BA5A-2FBAAC3EB9FF} = {B64B7581-6925-4823-B7AF-97FBC53A4146} + {57DABE06-F0EF-4C7A-BC0C-791A3A5F45F5} = {B64B7581-6925-4823-B7AF-97FBC53A4146} + {724E9C4C-A140-4815-88A4-2934BD67574F} = {B64B7581-6925-4823-B7AF-97FBC53A4146} + {B5971A04-44AC-404D-8A58-F85C61F53244} = {FE4693B5-3585-4555-BABA-A8BE2AA9C85E} {A7AC5643-2743-47AC-9284-718EB5466963} = {FE4693B5-3585-4555-BABA-A8BE2AA9C85E} {C1B1DCD9-30B9-4E17-A049-A04DCED30D14} = {FE4693B5-3585-4555-BABA-A8BE2AA9C85E} {D5A2648A-7BA3-4157-9DBF-D7B7D9B937EA} = {FE4693B5-3585-4555-BABA-A8BE2AA9C85E} + {965BE455-6D8C-43F7-9C0F-22C223D680ED} = {022B84D6-4F09-4371-9611-16DC2C968CBF} + {865F846B-B958-4546-9AAA-557FFED6D419} = {022B84D6-4F09-4371-9611-16DC2C968CBF} + {022B84D6-4F09-4371-9611-16DC2C968CBF} = {D650D56D-B099-40A3-B28D-057CA9FD5574} + {A500EDDF-AAD0-4486-A2EB-E4A78AE58707} = {4C115EF8-1A92-4A88-9A3A-BDBD561ED6B7} + {305B75AF-BAB0-47FF-AB8A-29D65082C471} = {4C115EF8-1A92-4A88-9A3A-BDBD561ED6B7} + {4C115EF8-1A92-4A88-9A3A-BDBD561ED6B7} = {D650D56D-B099-40A3-B28D-057CA9FD5574} + {16A18208-CD5B-4490-866D-F3CD25D8CF76} = {31FC6408-1E21-4331-B049-3202DEEFB1FC} + {31FC6408-1E21-4331-B049-3202DEEFB1FC} = {D650D56D-B099-40A3-B28D-057CA9FD5574} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {CD1065BC-8D4A-4559-BC8B-8FB6B73A6B15} diff --git a/src/libraries/System.IO.Pipes/src/CompatibilitySuppressions.xml b/src/libraries/System.IO.Pipes/src/CompatibilitySuppressions.xml index f31463b9bb91ae..a047c21f84fff4 100644 --- a/src/libraries/System.IO.Pipes/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.IO.Pipes/src/CompatibilitySuppressions.xml @@ -1,46 +1,47 @@  + CP0001 T:System.IO.Pipes.AnonymousPipeServerStreamAcl - ref/net8.0/System.IO.Pipes.dll - runtimes/win/lib/net8.0/System.IO.Pipes.dll + ref/net9.0/System.IO.Pipes.dll + runtimes/win/lib/net9.0/System.IO.Pipes.dll CP0001 T:System.IO.Pipes.NamedPipeServerStreamAcl - ref/net8.0/System.IO.Pipes.dll - runtimes/win/lib/net8.0/System.IO.Pipes.dll + ref/net9.0/System.IO.Pipes.dll + runtimes/win/lib/net9.0/System.IO.Pipes.dll CP0001 T:System.IO.Pipes.PipeAccessRights - ref/net8.0/System.IO.Pipes.dll - runtimes/win/lib/net8.0/System.IO.Pipes.dll + ref/net9.0/System.IO.Pipes.dll + runtimes/win/lib/net9.0/System.IO.Pipes.dll CP0001 T:System.IO.Pipes.PipeAccessRule - ref/net8.0/System.IO.Pipes.dll - runtimes/win/lib/net8.0/System.IO.Pipes.dll + ref/net9.0/System.IO.Pipes.dll + runtimes/win/lib/net9.0/System.IO.Pipes.dll CP0001 T:System.IO.Pipes.PipeAuditRule - ref/net8.0/System.IO.Pipes.dll - runtimes/win/lib/net8.0/System.IO.Pipes.dll + ref/net9.0/System.IO.Pipes.dll + runtimes/win/lib/net9.0/System.IO.Pipes.dll CP0001 T:System.IO.Pipes.PipesAclExtensions - ref/net8.0/System.IO.Pipes.dll - runtimes/win/lib/net8.0/System.IO.Pipes.dll + ref/net9.0/System.IO.Pipes.dll + runtimes/win/lib/net9.0/System.IO.Pipes.dll CP0001 T:System.IO.Pipes.PipeSecurity - ref/net8.0/System.IO.Pipes.dll - runtimes/win/lib/net8.0/System.IO.Pipes.dll + ref/net9.0/System.IO.Pipes.dll + runtimes/win/lib/net9.0/System.IO.Pipes.dll \ No newline at end of file diff --git a/src/libraries/System.IO.Ports/System.IO.Ports.sln b/src/libraries/System.IO.Ports/System.IO.Ports.sln index 2c0b1160aa27ba..bd649a47b35c32 100644 --- a/src/libraries/System.IO.Ports/System.IO.Ports.sln +++ b/src/libraries/System.IO.Ports/System.IO.Ports.sln @@ -31,6 +31,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encoding.CodePa EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encoding.CodePages", "..\System.Text.Encoding.CodePages\src\System.Text.Encoding.CodePages.csproj", "{50120440-409D-4B8A-B54C-F5FC637EF529}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{3A90724E-B199-4B0A-BB38-FA926A100A6A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{08288D42-25D1-49AB-808C-D1EA8F1D850E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{082FDAE8-0C3B-49CA-8D09-FC7ADE9D9651}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{CD819A22-8584-4A91-A23C-7EC7F950859D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{3D5CF06F-ACA2-4567-9C40-1D08B11B7D5B}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{D5326A44-B098-41AB-8EEC-0492DC64E610}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{F3F3FD18-CF31-4E24-9BBD-5303D38CF86B}" @@ -39,6 +49,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{88B0C0E7-B79 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{B86A1AC4-AE98-45BB-8548-2C369188D58A}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{B33FCFE9-427F-4E06-BE22-E168E76CF56C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{B0596714-2213-4A7C-9AB6-9D233E5B87C4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{39C00986-62EE-4BAB-9C1E-78A7B082FA5F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{8C3AAE7B-9E0C-481E-93D5-DB4745348159}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -109,6 +127,26 @@ Global {50120440-409D-4B8A-B54C-F5FC637EF529}.Debug|Any CPU.Build.0 = Debug|Any CPU {50120440-409D-4B8A-B54C-F5FC637EF529}.Release|Any CPU.ActiveCfg = Release|Any CPU {50120440-409D-4B8A-B54C-F5FC637EF529}.Release|Any CPU.Build.0 = Release|Any CPU + {3A90724E-B199-4B0A-BB38-FA926A100A6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3A90724E-B199-4B0A-BB38-FA926A100A6A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3A90724E-B199-4B0A-BB38-FA926A100A6A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3A90724E-B199-4B0A-BB38-FA926A100A6A}.Release|Any CPU.Build.0 = Release|Any CPU + {08288D42-25D1-49AB-808C-D1EA8F1D850E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {08288D42-25D1-49AB-808C-D1EA8F1D850E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {08288D42-25D1-49AB-808C-D1EA8F1D850E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {08288D42-25D1-49AB-808C-D1EA8F1D850E}.Release|Any CPU.Build.0 = Release|Any CPU + {082FDAE8-0C3B-49CA-8D09-FC7ADE9D9651}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {082FDAE8-0C3B-49CA-8D09-FC7ADE9D9651}.Debug|Any CPU.Build.0 = Debug|Any CPU + {082FDAE8-0C3B-49CA-8D09-FC7ADE9D9651}.Release|Any CPU.ActiveCfg = Release|Any CPU + {082FDAE8-0C3B-49CA-8D09-FC7ADE9D9651}.Release|Any CPU.Build.0 = Release|Any CPU + {CD819A22-8584-4A91-A23C-7EC7F950859D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CD819A22-8584-4A91-A23C-7EC7F950859D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CD819A22-8584-4A91-A23C-7EC7F950859D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CD819A22-8584-4A91-A23C-7EC7F950859D}.Release|Any CPU.Build.0 = Release|Any CPU + {3D5CF06F-ACA2-4567-9C40-1D08B11B7D5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3D5CF06F-ACA2-4567-9C40-1D08B11B7D5B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3D5CF06F-ACA2-4567-9C40-1D08B11B7D5B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3D5CF06F-ACA2-4567-9C40-1D08B11B7D5B}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -130,6 +168,14 @@ Global {28396A85-9215-4366-A582-B03BB13A60DD} = {B86A1AC4-AE98-45BB-8548-2C369188D58A} {AAB67274-550C-40C2-92EA-38C12CC2060F} = {B86A1AC4-AE98-45BB-8548-2C369188D58A} {094F1156-D8B8-420C-945C-B74E1454B6E5} = {B86A1AC4-AE98-45BB-8548-2C369188D58A} + {3A90724E-B199-4B0A-BB38-FA926A100A6A} = {B33FCFE9-427F-4E06-BE22-E168E76CF56C} + {08288D42-25D1-49AB-808C-D1EA8F1D850E} = {B33FCFE9-427F-4E06-BE22-E168E76CF56C} + {B33FCFE9-427F-4E06-BE22-E168E76CF56C} = {8C3AAE7B-9E0C-481E-93D5-DB4745348159} + {082FDAE8-0C3B-49CA-8D09-FC7ADE9D9651} = {B0596714-2213-4A7C-9AB6-9D233E5B87C4} + {CD819A22-8584-4A91-A23C-7EC7F950859D} = {B0596714-2213-4A7C-9AB6-9D233E5B87C4} + {B0596714-2213-4A7C-9AB6-9D233E5B87C4} = {8C3AAE7B-9E0C-481E-93D5-DB4745348159} + {3D5CF06F-ACA2-4567-9C40-1D08B11B7D5B} = {39C00986-62EE-4BAB-9C1E-78A7B082FA5F} + {39C00986-62EE-4BAB-9C1E-78A7B082FA5F} = {8C3AAE7B-9E0C-481E-93D5-DB4745348159} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {54136FEA-7C5B-41E5-86EE-C5816F222DEE} diff --git a/src/libraries/System.IO.Ports/src/CompatibilitySuppressions.xml b/src/libraries/System.IO.Ports/src/CompatibilitySuppressions.xml new file mode 100644 index 00000000000000..c5859f79b423d5 --- /dev/null +++ b/src/libraries/System.IO.Ports/src/CompatibilitySuppressions.xml @@ -0,0 +1,18 @@ + + + + + CP1002 + System.ComponentModel.Primitives, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.IO.Ports.dll + lib/netstandard2.0/System.IO.Ports.dll + true + + + CP1002 + System.ComponentModel.Primitives, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.IO.Ports.dll + lib/netstandard2.0/System.IO.Ports.dll + true + + \ No newline at end of file diff --git a/src/libraries/System.IO.Ports/src/PACKAGE.md b/src/libraries/System.IO.Ports/src/PACKAGE.md new file mode 100644 index 00000000000000..218bf288eb0454 --- /dev/null +++ b/src/libraries/System.IO.Ports/src/PACKAGE.md @@ -0,0 +1,59 @@ +## About + + + +[System.IO.Ports](https://www.nuget.org/packages/System.IO.Ports) package provides synchronous serial port file resource. Additionally, the functionality of this class can be wrapped in an internal `Stream` object, accessible through the `BaseStream` property, and passed to classes that wrap or use streams. + +## Key Features + + + +* synchronous and event-driven I/O +* access to pin and break states +* access to serial driver properties +* access to `Stream` object through the `BaseStream` property + +## How to Use + + + +```C# +using System.IO.Ports; + +// Provides list of available serial ports +string[] portNames = SerialPort.GetPortNames(); + +// First available port +string myPortName = portNames[0]; +int baudRate = 9600; + +SerialPort sp = new SerialPort(myPortName, baudRate); +sp.Open(); +sp.WriteLine("Hello World!"); +``` + +## Main Types + + + +The main type provided by this library is: + +* `SerialPort` + +## Additional Documentation + + + +* [SerialPort class documentation](https://learn.microsoft.com/dotnet/api/system.io.ports.serialport?view=dotnet-plat-ext-7.0) +* [API documentation](https://learn.microsoft.com/dotnet/api/System.IO.Ports) + +## Related Packages + + +- [System.IO.Ports](https://www.nuget.org/packages/System.IO.Ports) + +## Feedback & Contributing + + + +System.IO.Ports is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). diff --git a/src/libraries/System.IO.Ports/src/System.IO.Ports.csproj b/src/libraries/System.IO.Ports/src/System.IO.Ports.csproj index 3cae36d8a4cd43..7ef8f91d1f6ccb 100644 --- a/src/libraries/System.IO.Ports/src/System.IO.Ports.csproj +++ b/src/libraries/System.IO.Ports/src/System.IO.Ports.csproj @@ -38,9 +38,6 @@ System.IO.Ports.SerialPort - - - @@ -143,7 +140,7 @@ System.IO.Ports.SerialPort Link="Common\Interop\Unix\Interop.Poll.Structs.cs" /> - + diff --git a/src/libraries/System.Linq.Expressions/System.Linq.Expressions.sln b/src/libraries/System.Linq.Expressions/System.Linq.Expressions.sln index f299179629a143..1bdc4666d585da 100644 --- a/src/libraries/System.Linq.Expressions/System.Linq.Expressions.sln +++ b/src/libraries/System.Linq.Expressions/System.Linq.Expressions.sln @@ -17,6 +17,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{F4BB7D19-A456-41DE-9A65-7876A2EF00D9}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{681196A9-9EEC-42BC-AC89-612B56FEFDC0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{63A59D01-FA16-4F20-B4CB-97B2B78F4307}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{DB256F88-F5A2-4576-B279-D52A89E29644}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{3070F484-7EA2-4715-952A-089CC17513A9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{59B97B63-1800-4511-A93A-3BB575D9ECC8}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{CD3E533D-3658-46D9-90EE-4E8344A076FD}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{2CFFD4E7-903A-4C6A-A580-5AE2285A7A26}" @@ -25,6 +35,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{EB3E1752-35A EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{7CAFBF55-2D7E-45C5-BEFD-47377A70237D}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{A3C776A3-AC6B-4205-8B1F-4D8F244C5D4A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{5615DAA5-7820-46C8-A2BF-2142908D06F4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{F248C245-CDDD-4467-9113-ECF33D521097}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{378E0975-327E-42AA-8154-D13FA0609413}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -67,6 +85,26 @@ Global {F4BB7D19-A456-41DE-9A65-7876A2EF00D9}.Debug|Any CPU.Build.0 = Debug|Any CPU {F4BB7D19-A456-41DE-9A65-7876A2EF00D9}.Release|Any CPU.ActiveCfg = Release|Any CPU {F4BB7D19-A456-41DE-9A65-7876A2EF00D9}.Release|Any CPU.Build.0 = Release|Any CPU + {681196A9-9EEC-42BC-AC89-612B56FEFDC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {681196A9-9EEC-42BC-AC89-612B56FEFDC0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {681196A9-9EEC-42BC-AC89-612B56FEFDC0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {681196A9-9EEC-42BC-AC89-612B56FEFDC0}.Release|Any CPU.Build.0 = Release|Any CPU + {63A59D01-FA16-4F20-B4CB-97B2B78F4307}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {63A59D01-FA16-4F20-B4CB-97B2B78F4307}.Debug|Any CPU.Build.0 = Debug|Any CPU + {63A59D01-FA16-4F20-B4CB-97B2B78F4307}.Release|Any CPU.ActiveCfg = Release|Any CPU + {63A59D01-FA16-4F20-B4CB-97B2B78F4307}.Release|Any CPU.Build.0 = Release|Any CPU + {DB256F88-F5A2-4576-B279-D52A89E29644}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DB256F88-F5A2-4576-B279-D52A89E29644}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DB256F88-F5A2-4576-B279-D52A89E29644}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DB256F88-F5A2-4576-B279-D52A89E29644}.Release|Any CPU.Build.0 = Release|Any CPU + {3070F484-7EA2-4715-952A-089CC17513A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3070F484-7EA2-4715-952A-089CC17513A9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3070F484-7EA2-4715-952A-089CC17513A9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3070F484-7EA2-4715-952A-089CC17513A9}.Release|Any CPU.Build.0 = Release|Any CPU + {59B97B63-1800-4511-A93A-3BB575D9ECC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {59B97B63-1800-4511-A93A-3BB575D9ECC8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {59B97B63-1800-4511-A93A-3BB575D9ECC8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {59B97B63-1800-4511-A93A-3BB575D9ECC8}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -81,6 +119,14 @@ Global {1312B533-04ED-4268-8DAF-A7C69BC870A4} = {EB3E1752-35A9-438C-8C14-0B56F9461589} {EA27BB4A-F841-4806-85F7-3ABF92F9E8CE} = {7CAFBF55-2D7E-45C5-BEFD-47377A70237D} {06C7EEAC-167E-42C7-B678-621F7B6BE395} = {7CAFBF55-2D7E-45C5-BEFD-47377A70237D} + {681196A9-9EEC-42BC-AC89-612B56FEFDC0} = {A3C776A3-AC6B-4205-8B1F-4D8F244C5D4A} + {63A59D01-FA16-4F20-B4CB-97B2B78F4307} = {A3C776A3-AC6B-4205-8B1F-4D8F244C5D4A} + {A3C776A3-AC6B-4205-8B1F-4D8F244C5D4A} = {378E0975-327E-42AA-8154-D13FA0609413} + {DB256F88-F5A2-4576-B279-D52A89E29644} = {5615DAA5-7820-46C8-A2BF-2142908D06F4} + {3070F484-7EA2-4715-952A-089CC17513A9} = {5615DAA5-7820-46C8-A2BF-2142908D06F4} + {5615DAA5-7820-46C8-A2BF-2142908D06F4} = {378E0975-327E-42AA-8154-D13FA0609413} + {59B97B63-1800-4511-A93A-3BB575D9ECC8} = {F248C245-CDDD-4467-9113-ECF33D521097} + {F248C245-CDDD-4467-9113-ECF33D521097} = {378E0975-327E-42AA-8154-D13FA0609413} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {AF9218A4-1E73-408C-BEF5-0300BD9DDEB0} diff --git a/src/libraries/System.Linq.Expressions/src/CompatibilitySuppressions.xml b/src/libraries/System.Linq.Expressions/src/CompatibilitySuppressions.xml index bf51da8ccbe294..2004f22a5b280c 100644 --- a/src/libraries/System.Linq.Expressions/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Linq.Expressions/src/CompatibilitySuppressions.xml @@ -4,145 +4,145 @@ CP0001 T:System.Linq.Expressions.Interpreter.LightLambda - ref/net8.0/System.Linq.Expressions.dll - lib/net8.0/System.Linq.Expressions.dll + ref/net9.0/System.Linq.Expressions.dll + lib/net9.0/System.Linq.Expressions.dll CP0001 T:System.Runtime.CompilerServices.CallSiteOps - ref/net8.0/System.Linq.Expressions.dll - lib/net8.0/System.Linq.Expressions.dll + ref/net9.0/System.Linq.Expressions.dll + lib/net9.0/System.Linq.Expressions.dll CP0001 T:System.Runtime.CompilerServices.Closure - ref/net8.0/System.Linq.Expressions.dll - lib/net8.0/System.Linq.Expressions.dll + ref/net9.0/System.Linq.Expressions.dll + lib/net9.0/System.Linq.Expressions.dll CP0001 T:System.Runtime.CompilerServices.RuntimeOps - ref/net8.0/System.Linq.Expressions.dll - lib/net8.0/System.Linq.Expressions.dll + ref/net9.0/System.Linq.Expressions.dll + lib/net9.0/System.Linq.Expressions.dll CP0002 M:System.Linq.Expressions.ElementInit.get_ArgumentCount - ref/net8.0/System.Linq.Expressions.dll - lib/net8.0/System.Linq.Expressions.dll + ref/net9.0/System.Linq.Expressions.dll + lib/net9.0/System.Linq.Expressions.dll CP0002 M:System.Linq.Expressions.ElementInit.GetArgument(System.Int32) - ref/net8.0/System.Linq.Expressions.dll - lib/net8.0/System.Linq.Expressions.dll + ref/net9.0/System.Linq.Expressions.dll + lib/net9.0/System.Linq.Expressions.dll CP0002 M:System.Linq.Expressions.IndexExpression.get_ArgumentCount - ref/net8.0/System.Linq.Expressions.dll - lib/net8.0/System.Linq.Expressions.dll + ref/net9.0/System.Linq.Expressions.dll + lib/net9.0/System.Linq.Expressions.dll CP0002 M:System.Linq.Expressions.IndexExpression.GetArgument(System.Int32) - ref/net8.0/System.Linq.Expressions.dll - lib/net8.0/System.Linq.Expressions.dll + ref/net9.0/System.Linq.Expressions.dll + lib/net9.0/System.Linq.Expressions.dll CP0002 M:System.Linq.Expressions.InvocationExpression.get_ArgumentCount - ref/net8.0/System.Linq.Expressions.dll - lib/net8.0/System.Linq.Expressions.dll + ref/net9.0/System.Linq.Expressions.dll + lib/net9.0/System.Linq.Expressions.dll CP0002 M:System.Linq.Expressions.InvocationExpression.GetArgument(System.Int32) - ref/net8.0/System.Linq.Expressions.dll - lib/net8.0/System.Linq.Expressions.dll + ref/net9.0/System.Linq.Expressions.dll + lib/net9.0/System.Linq.Expressions.dll CP0002 M:System.Linq.Expressions.LambdaExpression.get_CanCompileToIL - ref/net8.0/System.Linq.Expressions.dll - lib/net8.0/System.Linq.Expressions.dll + ref/net9.0/System.Linq.Expressions.dll + lib/net9.0/System.Linq.Expressions.dll CP0002 M:System.Linq.Expressions.LambdaExpression.get_CanInterpret - ref/net8.0/System.Linq.Expressions.dll - lib/net8.0/System.Linq.Expressions.dll + ref/net9.0/System.Linq.Expressions.dll + lib/net9.0/System.Linq.Expressions.dll CP0002 M:System.Linq.Expressions.MethodCallExpression.get_ArgumentCount - ref/net8.0/System.Linq.Expressions.dll - lib/net8.0/System.Linq.Expressions.dll + ref/net9.0/System.Linq.Expressions.dll + lib/net9.0/System.Linq.Expressions.dll CP0002 M:System.Linq.Expressions.MethodCallExpression.GetArgument(System.Int32) - ref/net8.0/System.Linq.Expressions.dll - lib/net8.0/System.Linq.Expressions.dll + ref/net9.0/System.Linq.Expressions.dll + lib/net9.0/System.Linq.Expressions.dll CP0002 M:System.Linq.Expressions.NewExpression.get_ArgumentCount - ref/net8.0/System.Linq.Expressions.dll - lib/net8.0/System.Linq.Expressions.dll + ref/net9.0/System.Linq.Expressions.dll + lib/net9.0/System.Linq.Expressions.dll CP0002 M:System.Linq.Expressions.NewExpression.GetArgument(System.Int32) - ref/net8.0/System.Linq.Expressions.dll - lib/net8.0/System.Linq.Expressions.dll + ref/net9.0/System.Linq.Expressions.dll + lib/net9.0/System.Linq.Expressions.dll CP0016 M:System.Linq.Expressions.Expression.Call(System.Linq.Expressions.Expression,System.String,System.Type[],System.Linq.Expressions.Expression[]):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - ref/net8.0/System.Linq.Expressions.dll - lib/net8.0/System.Linq.Expressions.dll + ref/net9.0/System.Linq.Expressions.dll + lib/net9.0/System.Linq.Expressions.dll CP0016 M:System.Linq.Expressions.Expression.Call(System.Type,System.String,System.Type[],System.Linq.Expressions.Expression[]):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - ref/net8.0/System.Linq.Expressions.dll - lib/net8.0/System.Linq.Expressions.dll + ref/net9.0/System.Linq.Expressions.dll + lib/net9.0/System.Linq.Expressions.dll CP0016 M:System.Linq.Expressions.Expression.ListInit(System.Linq.Expressions.NewExpression,System.Collections.Generic.IEnumerable{System.Linq.Expressions.Expression}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - ref/net8.0/System.Linq.Expressions.dll - lib/net8.0/System.Linq.Expressions.dll + ref/net9.0/System.Linq.Expressions.dll + lib/net9.0/System.Linq.Expressions.dll CP0016 M:System.Linq.Expressions.Expression.ListInit(System.Linq.Expressions.NewExpression,System.Linq.Expressions.Expression[]):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - ref/net8.0/System.Linq.Expressions.dll - lib/net8.0/System.Linq.Expressions.dll + ref/net9.0/System.Linq.Expressions.dll + lib/net9.0/System.Linq.Expressions.dll CP0016 M:System.Linq.Expressions.Expression.ListInit(System.Linq.Expressions.NewExpression,System.Reflection.MethodInfo,System.Collections.Generic.IEnumerable{System.Linq.Expressions.Expression}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - ref/net8.0/System.Linq.Expressions.dll - lib/net8.0/System.Linq.Expressions.dll + ref/net9.0/System.Linq.Expressions.dll + lib/net9.0/System.Linq.Expressions.dll CP0016 M:System.Linq.Expressions.Expression.ListInit(System.Linq.Expressions.NewExpression,System.Reflection.MethodInfo,System.Linq.Expressions.Expression[]):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - ref/net8.0/System.Linq.Expressions.dll - lib/net8.0/System.Linq.Expressions.dll + ref/net9.0/System.Linq.Expressions.dll + lib/net9.0/System.Linq.Expressions.dll CP0016 M:System.Runtime.CompilerServices.CallSite`1.Create(System.Runtime.CompilerServices.CallSiteBinder):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - ref/net8.0/System.Linq.Expressions.dll - lib/net8.0/System.Linq.Expressions.dll + ref/net9.0/System.Linq.Expressions.dll + lib/net9.0/System.Linq.Expressions.dll CP0020 M:System.Linq.Expressions.DynamicExpressionVisitor.#ctor - ref/net8.0/System.Linq.Expressions.dll - lib/net8.0/System.Linq.Expressions.dll + ref/net9.0/System.Linq.Expressions.dll + lib/net9.0/System.Linq.Expressions.dll \ No newline at end of file diff --git a/src/libraries/System.Linq.Expressions/tests/default.rd.xml b/src/libraries/System.Linq.Expressions/tests/default.rd.xml index e3505c08f84580..8f9762a7fb7344 100644 --- a/src/libraries/System.Linq.Expressions/tests/default.rd.xml +++ b/src/libraries/System.Linq.Expressions/tests/default.rd.xml @@ -4,6 +4,10 @@ + + + + diff --git a/src/libraries/System.Linq.Parallel/System.Linq.Parallel.sln b/src/libraries/System.Linq.Parallel/System.Linq.Parallel.sln index 78660940df8b41..08fbf921798b45 100644 --- a/src/libraries/System.Linq.Parallel/System.Linq.Parallel.sln +++ b/src/libraries/System.Linq.Parallel/System.Linq.Parallel.sln @@ -19,6 +19,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{4B17E9F9-77EB-4FC4-A3A2-7901FFC4663D}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{CC4666B6-A079-48EE-8078-BA9244F3EA08}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{6C6B3DE0-1C4F-4D47-B2AD-55E229E88C2B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{4ACEFC81-787F-47FF-A8B9-923A3D7B0344}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{CD03AD95-5D8B-4392-A9EC-7D6012019C71}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{98A5F113-D095-4CC1-AE13-47547F364E4A}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{75DB4DC3-5DD6-425B-BD36-19BF5B5E1180}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{20F9AEA0-7D11-4282-81E0-274CDF39D2DA}" @@ -27,6 +37,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{4E48C076-587 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{B2591C6D-F523-4C15-9E29-2E2E01ACB2C4}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{B1497F09-0CB7-4FCA-BAE4-0D12C4C686B6}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{F2040C70-B540-4D13-B2D1-960EE0D54B5B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{BCD8184D-00C0-4CE6-A1AE-E6AA0F91FD5E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{54CAE96E-C603-4619-9407-359A34AE49C0}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -73,6 +91,26 @@ Global {4B17E9F9-77EB-4FC4-A3A2-7901FFC4663D}.Debug|Any CPU.Build.0 = Debug|Any CPU {4B17E9F9-77EB-4FC4-A3A2-7901FFC4663D}.Release|Any CPU.ActiveCfg = Release|Any CPU {4B17E9F9-77EB-4FC4-A3A2-7901FFC4663D}.Release|Any CPU.Build.0 = Release|Any CPU + {CC4666B6-A079-48EE-8078-BA9244F3EA08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CC4666B6-A079-48EE-8078-BA9244F3EA08}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CC4666B6-A079-48EE-8078-BA9244F3EA08}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CC4666B6-A079-48EE-8078-BA9244F3EA08}.Release|Any CPU.Build.0 = Release|Any CPU + {6C6B3DE0-1C4F-4D47-B2AD-55E229E88C2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6C6B3DE0-1C4F-4D47-B2AD-55E229E88C2B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6C6B3DE0-1C4F-4D47-B2AD-55E229E88C2B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6C6B3DE0-1C4F-4D47-B2AD-55E229E88C2B}.Release|Any CPU.Build.0 = Release|Any CPU + {4ACEFC81-787F-47FF-A8B9-923A3D7B0344}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4ACEFC81-787F-47FF-A8B9-923A3D7B0344}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4ACEFC81-787F-47FF-A8B9-923A3D7B0344}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4ACEFC81-787F-47FF-A8B9-923A3D7B0344}.Release|Any CPU.Build.0 = Release|Any CPU + {CD03AD95-5D8B-4392-A9EC-7D6012019C71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CD03AD95-5D8B-4392-A9EC-7D6012019C71}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CD03AD95-5D8B-4392-A9EC-7D6012019C71}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CD03AD95-5D8B-4392-A9EC-7D6012019C71}.Release|Any CPU.Build.0 = Release|Any CPU + {98A5F113-D095-4CC1-AE13-47547F364E4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {98A5F113-D095-4CC1-AE13-47547F364E4A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {98A5F113-D095-4CC1-AE13-47547F364E4A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {98A5F113-D095-4CC1-AE13-47547F364E4A}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -88,6 +126,14 @@ Global {CDF79D0D-248D-48A5-A698-00D34FBA64E1} = {4E48C076-587B-43F6-81C7-3362BDC8D1D8} {775CCE4D-79E3-4D13-8C57-1FEDA8F7B773} = {B2591C6D-F523-4C15-9E29-2E2E01ACB2C4} {CE258E72-5765-46B4-8B93-59D11F91FAE1} = {B2591C6D-F523-4C15-9E29-2E2E01ACB2C4} + {CC4666B6-A079-48EE-8078-BA9244F3EA08} = {B1497F09-0CB7-4FCA-BAE4-0D12C4C686B6} + {6C6B3DE0-1C4F-4D47-B2AD-55E229E88C2B} = {B1497F09-0CB7-4FCA-BAE4-0D12C4C686B6} + {B1497F09-0CB7-4FCA-BAE4-0D12C4C686B6} = {54CAE96E-C603-4619-9407-359A34AE49C0} + {4ACEFC81-787F-47FF-A8B9-923A3D7B0344} = {F2040C70-B540-4D13-B2D1-960EE0D54B5B} + {CD03AD95-5D8B-4392-A9EC-7D6012019C71} = {F2040C70-B540-4D13-B2D1-960EE0D54B5B} + {F2040C70-B540-4D13-B2D1-960EE0D54B5B} = {54CAE96E-C603-4619-9407-359A34AE49C0} + {98A5F113-D095-4CC1-AE13-47547F364E4A} = {BCD8184D-00C0-4CE6-A1AE-E6AA0F91FD5E} + {BCD8184D-00C0-4CE6-A1AE-E6AA0F91FD5E} = {54CAE96E-C603-4619-9407-359A34AE49C0} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {872BA41A-3769-426E-AB70-515BC1724FC0} diff --git a/src/libraries/System.Linq.Parallel/tests/ExchangeTests.cs b/src/libraries/System.Linq.Parallel/tests/ExchangeTests.cs index 6dcaffbf60a5a5..3f12e3e34c0027 100644 --- a/src/libraries/System.Linq.Parallel/tests/ExchangeTests.cs +++ b/src/libraries/System.Linq.Parallel/tests/ExchangeTests.cs @@ -89,6 +89,7 @@ public static IEnumerable AllMergeOptions_Multiple() // or WithMergeOptions [ConditionalTheory] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [MemberData(nameof(PartitioningData), new[] { 0, 1, 2, 16, 1024 })] public static void Partitioning_Default(Labeled> labeled, int count, int partitions) { @@ -158,6 +159,7 @@ public static void Merge_Ordered_Longrunning(Labeled> labeled } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [MemberData(nameof(ThrowOnCount_AllMergeOptions_MemberData), new[] { 4, 8 })] // FailingMergeData has enumerables that throw errors when attempting to perform the nth enumeration. // This test checks whether the query runs in a pipelined or buffered fashion. @@ -167,6 +169,7 @@ public static void Merge_Ordered_Pipelining(Labeled> labeled, } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [MemberData(nameof(MergeData), new[] { 4, 8 })] // This test checks whether the query runs in a pipelined or buffered fashion. public static void Merge_Ordered_Pipelining_Select(Labeled> labeled, int count, ParallelMergeOptions options) diff --git a/src/libraries/System.Linq.Parallel/tests/PlinqModesTests.cs b/src/libraries/System.Linq.Parallel/tests/PlinqModesTests.cs index b6b8b626c51588..85db2d3805bf48 100644 --- a/src/libraries/System.Linq.Parallel/tests/PlinqModesTests.cs +++ b/src/libraries/System.Linq.Parallel/tests/PlinqModesTests.cs @@ -136,6 +136,7 @@ public static IEnumerable AllExecutionModes_Multiple() // Check that some queries run in parallel by default, and some require forcing. [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91661", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [MemberData(nameof(WithExecutionModeQueryData), new[] { 1, 4 })] // DOP of 1 to verify sequential and 4 to verify parallel public static void WithExecutionMode( Labeled> labeled, diff --git a/src/libraries/System.Linq.Parallel/tests/QueryOperators/GetEnumeratorTests.cs b/src/libraries/System.Linq.Parallel/tests/QueryOperators/GetEnumeratorTests.cs index d34cc6e903bc9c..652c72897980da 100644 --- a/src/libraries/System.Linq.Parallel/tests/QueryOperators/GetEnumeratorTests.cs +++ b/src/libraries/System.Linq.Parallel/tests/QueryOperators/GetEnumeratorTests.cs @@ -165,6 +165,7 @@ public static void GetEnumerator_MoveNextAfterEnd(Labeled> la } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void GetEnumerator_LargeQuery_PauseAfterOpening() { using (IEnumerator e = Enumerable.Range(0, 8192).AsParallel().SkipWhile(i => true).GetEnumerator()) diff --git a/src/libraries/System.Linq.Parallel/tests/QueryOperators/OrderByThenByTests.cs b/src/libraries/System.Linq.Parallel/tests/QueryOperators/OrderByThenByTests.cs index 0d920b5d13f782..931333fd69b536 100644 --- a/src/libraries/System.Linq.Parallel/tests/QueryOperators/OrderByThenByTests.cs +++ b/src/libraries/System.Linq.Parallel/tests/QueryOperators/OrderByThenByTests.cs @@ -517,6 +517,7 @@ public static void OrderBy_ThreadedDeadlock(Labeled> labeled, // Heavily exercises OrderBy, but only throws one user delegate exception to simulate an occasional failure. [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] [MemberData(nameof(OrderByThreadedData), new[] { 1, 2, 16, 128, 1024 }, new[] { 1, 2, 4, 7, 8, 31, 32 })] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void OrderBy_ThreadedDeadlock_SingleException(Labeled> labeled, int count, int degree) { int countdown = Math.Min(count / 2, degree) + 1; diff --git a/src/libraries/System.Linq.Queryable/System.Linq.Queryable.sln b/src/libraries/System.Linq.Queryable/System.Linq.Queryable.sln index cd9d51c840a308..7c9594815cd65a 100644 --- a/src/libraries/System.Linq.Queryable/System.Linq.Queryable.sln +++ b/src/libraries/System.Linq.Queryable/System.Linq.Queryable.sln @@ -21,6 +21,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{12AF1EDA-A597-4DEE-A91F-6E784B8D7555}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{0FBF7E3D-C30D-414A-AA92-B28A7AF0AAC9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{FA61FF7E-9F19-4B5C-A78B-39491154D2A9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{66202A8B-FEE0-4B98-8445-F6EB38B58847}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{999097B8-299F-4BE7-BA1F-EC352793B0C3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{4099A29A-377A-4A8C-B206-02D9F5BD6365}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{55EA11AE-0CFF-47C3-AF61-FE49C04F5C94}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{4175E0A1-D5C1-470E-8F0A-EB05DED9B1F4}" @@ -29,6 +39,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E6F704C7-241 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{D124A349-76C6-4FD9-AE3F-D0B674D03CB3}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{14F93B64-3755-4118-B88A-D2D1E49F4692}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{781B2EF1-797B-44C6-9035-5B37FA96F2EF}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{6167654B-0C9E-4473-ACC4-DE04D3BE85AA}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{3873A7FE-08BE-4457-92E8-7D1D52FC9C73}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -79,6 +97,26 @@ Global {12AF1EDA-A597-4DEE-A91F-6E784B8D7555}.Debug|Any CPU.Build.0 = Debug|Any CPU {12AF1EDA-A597-4DEE-A91F-6E784B8D7555}.Release|Any CPU.ActiveCfg = Release|Any CPU {12AF1EDA-A597-4DEE-A91F-6E784B8D7555}.Release|Any CPU.Build.0 = Release|Any CPU + {0FBF7E3D-C30D-414A-AA92-B28A7AF0AAC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0FBF7E3D-C30D-414A-AA92-B28A7AF0AAC9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0FBF7E3D-C30D-414A-AA92-B28A7AF0AAC9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0FBF7E3D-C30D-414A-AA92-B28A7AF0AAC9}.Release|Any CPU.Build.0 = Release|Any CPU + {FA61FF7E-9F19-4B5C-A78B-39491154D2A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA61FF7E-9F19-4B5C-A78B-39491154D2A9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA61FF7E-9F19-4B5C-A78B-39491154D2A9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA61FF7E-9F19-4B5C-A78B-39491154D2A9}.Release|Any CPU.Build.0 = Release|Any CPU + {66202A8B-FEE0-4B98-8445-F6EB38B58847}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {66202A8B-FEE0-4B98-8445-F6EB38B58847}.Debug|Any CPU.Build.0 = Debug|Any CPU + {66202A8B-FEE0-4B98-8445-F6EB38B58847}.Release|Any CPU.ActiveCfg = Release|Any CPU + {66202A8B-FEE0-4B98-8445-F6EB38B58847}.Release|Any CPU.Build.0 = Release|Any CPU + {999097B8-299F-4BE7-BA1F-EC352793B0C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {999097B8-299F-4BE7-BA1F-EC352793B0C3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {999097B8-299F-4BE7-BA1F-EC352793B0C3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {999097B8-299F-4BE7-BA1F-EC352793B0C3}.Release|Any CPU.Build.0 = Release|Any CPU + {4099A29A-377A-4A8C-B206-02D9F5BD6365}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4099A29A-377A-4A8C-B206-02D9F5BD6365}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4099A29A-377A-4A8C-B206-02D9F5BD6365}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4099A29A-377A-4A8C-B206-02D9F5BD6365}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -95,6 +133,14 @@ Global {EC9BDC43-2701-4942-AFAC-FED0555B60C9} = {E6F704C7-2418-4ADC-90E6-9C6570EF57BB} {D100FF6C-66B4-43A9-AB3E-80E8B3D87A7F} = {D124A349-76C6-4FD9-AE3F-D0B674D03CB3} {ACFE06FC-0223-4F8F-88B9-AE977B9BEB30} = {D124A349-76C6-4FD9-AE3F-D0B674D03CB3} + {0FBF7E3D-C30D-414A-AA92-B28A7AF0AAC9} = {14F93B64-3755-4118-B88A-D2D1E49F4692} + {FA61FF7E-9F19-4B5C-A78B-39491154D2A9} = {14F93B64-3755-4118-B88A-D2D1E49F4692} + {14F93B64-3755-4118-B88A-D2D1E49F4692} = {3873A7FE-08BE-4457-92E8-7D1D52FC9C73} + {66202A8B-FEE0-4B98-8445-F6EB38B58847} = {781B2EF1-797B-44C6-9035-5B37FA96F2EF} + {999097B8-299F-4BE7-BA1F-EC352793B0C3} = {781B2EF1-797B-44C6-9035-5B37FA96F2EF} + {781B2EF1-797B-44C6-9035-5B37FA96F2EF} = {3873A7FE-08BE-4457-92E8-7D1D52FC9C73} + {4099A29A-377A-4A8C-B206-02D9F5BD6365} = {6167654B-0C9E-4473-ACC4-DE04D3BE85AA} + {6167654B-0C9E-4473-ACC4-DE04D3BE85AA} = {3873A7FE-08BE-4457-92E8-7D1D52FC9C73} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {EF81B838-4913-4654-BE99-E88F7656DE81} diff --git a/src/libraries/System.Linq.Queryable/ref/System.Linq.Queryable.cs b/src/libraries/System.Linq.Queryable/ref/System.Linq.Queryable.cs index ea36b539667cc1..aae620b4ed8f0c 100644 --- a/src/libraries/System.Linq.Queryable/ref/System.Linq.Queryable.cs +++ b/src/libraries/System.Linq.Queryable/ref/System.Linq.Queryable.cs @@ -40,6 +40,8 @@ public static partial class Queryable public static TSource Aggregate(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> func) { throw null; } public static TAccumulate Aggregate(this System.Linq.IQueryable source, TAccumulate seed, System.Linq.Expressions.Expression> func) { throw null; } public static TResult Aggregate(this System.Linq.IQueryable source, TAccumulate seed, System.Linq.Expressions.Expression> func, System.Linq.Expressions.Expression> selector) { throw null; } + public static System.Linq.IQueryable> AggregateBy(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector, TAccumulate seed, System.Linq.Expressions.Expression> func, System.Collections.Generic.IEqualityComparer? keyComparer = null) where TKey : notnull { throw null; } + public static System.Linq.IQueryable> AggregateBy(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression> seedSelector, System.Linq.Expressions.Expression> func, System.Collections.Generic.IEqualityComparer? keyComparer = null) where TKey : notnull { throw null; } public static bool All(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) { throw null; } public static bool Any(this System.Linq.IQueryable source) { throw null; } public static bool Any(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) { throw null; } @@ -77,6 +79,7 @@ public static partial class Queryable public static bool Contains(this System.Linq.IQueryable source, TSource item, System.Collections.Generic.IEqualityComparer? comparer) { throw null; } public static int Count(this System.Linq.IQueryable source) { throw null; } public static int Count(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) { throw null; } + public static System.Linq.IQueryable> CountBy(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IEqualityComparer? comparer = null) where TKey : notnull { throw null; } public static System.Linq.IQueryable DefaultIfEmpty(this System.Linq.IQueryable source) { throw null; } public static System.Linq.IQueryable DefaultIfEmpty(this System.Linq.IQueryable source, TSource defaultValue) { throw null; } public static System.Linq.IQueryable DistinctBy(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector) { throw null; } diff --git a/src/libraries/System.Linq.Queryable/src/System/Linq/Queryable.cs b/src/libraries/System.Linq.Queryable/src/System/Linq/Queryable.cs index a43ec6c60ae7b0..aac7b2cce245ba 100644 --- a/src/libraries/System.Linq.Queryable/src/System/Linq/Queryable.cs +++ b/src/libraries/System.Linq.Queryable/src/System/Linq/Queryable.cs @@ -1569,6 +1569,27 @@ public static int Count(this IQueryable source, ExpressionReturns the count of each element from a sequence according to a specified key selector function.
+ /// The type of the elements of . + /// The type of key to distinguish elements by. + /// The sequence to count elements from. + /// A function to extract the key for each element. + /// An to compare keys. + /// An that contains count for each distinct elements from the source sequence as a object. + /// is . + [DynamicDependency("CountBy`2", typeof(Enumerable))] + public static IQueryable> CountBy(this IQueryable source, Expression> keySelector, IEqualityComparer? comparer = null) where TKey : notnull + { + ArgumentNullException.ThrowIfNull(source); + ArgumentNullException.ThrowIfNull(keySelector); + + return source.Provider.CreateQuery>( + Expression.Call( + null, + new Func, Expression>, IEqualityComparer, IQueryable>>(CountBy).Method, + source.Expression, Expression.Quote(keySelector), Expression.Constant(comparer, typeof(IEqualityComparer)))); + } + [DynamicDependency("LongCount`1", typeof(Enumerable))] public static long LongCount(this IQueryable source) { @@ -2315,6 +2336,35 @@ public static TResult Aggregate(this IQueryable> AggregateBy(this IQueryable source, Expression> keySelector, TAccumulate seed, Expression> func, IEqualityComparer? keyComparer = null) where TKey : notnull + { + ArgumentNullException.ThrowIfNull(source); + ArgumentNullException.ThrowIfNull(keySelector); + ArgumentNullException.ThrowIfNull(func); + + return source.Provider.CreateQuery>( + Expression.Call( + null, + new Func, Expression>, TAccumulate, Expression>, IEqualityComparer, IQueryable>>(AggregateBy).Method, + source.Expression, Expression.Quote(keySelector), Expression.Constant(seed), Expression.Quote(func), Expression.Constant(keyComparer, typeof(IEqualityComparer)))); + } + + [DynamicDependency("AggregateBy`3", typeof(Enumerable))] + public static IQueryable> AggregateBy(this IQueryable source, Expression> keySelector, Expression> seedSelector, Expression> func, IEqualityComparer? keyComparer = null) where TKey : notnull + { + ArgumentNullException.ThrowIfNull(source); + ArgumentNullException.ThrowIfNull(keySelector); + ArgumentNullException.ThrowIfNull(seedSelector); + ArgumentNullException.ThrowIfNull(func); + + return source.Provider.CreateQuery>( + Expression.Call( + null, + new Func, Expression>, Expression>, Expression>, IEqualityComparer, IQueryable>>(AggregateBy).Method, + source.Expression, Expression.Quote(keySelector), Expression.Quote(seedSelector), Expression.Quote(func), Expression.Constant(keyComparer, typeof(IEqualityComparer)))); + } + [DynamicDependency("SkipLast`1", typeof(Enumerable))] public static IQueryable SkipLast(this IQueryable source, int count) { diff --git a/src/libraries/System.Linq.Queryable/tests/AggregateByTests.cs b/src/libraries/System.Linq.Queryable/tests/AggregateByTests.cs new file mode 100644 index 00000000000000..7592eb4b3adcf9 --- /dev/null +++ b/src/libraries/System.Linq.Queryable/tests/AggregateByTests.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.Collections.Generic; +using System.Linq.Expressions; +using Xunit; + +namespace System.Linq.Tests +{ + public class AggregateByTests : EnumerableBasedTests + { + [Fact] + public void NullSource_ThrowsArgumentNullException() + { + IQueryable source = null; + + AssertExtensions.Throws("source", () => source.AggregateBy(x => x, x => 0, (x, y) => x+ y)); + AssertExtensions.Throws("source", () => source.AggregateBy(x => x, x => 0, (x, y) => x + y, EqualityComparer.Default)); + } + + [Fact] + public void NullKeySelector_ThrowsArgumentNullException() + { + IQueryable source = Enumerable.Empty().AsQueryable(); + Expression> keySelector = null; + + AssertExtensions.Throws("keySelector", () => source.AggregateBy(keySelector, x => 0, (x, y) => x + y)); + AssertExtensions.Throws("keySelector", () => source.AggregateBy(keySelector, x => 0, (x, y) => x + y, EqualityComparer.Default)); + } + + [Fact] + public void NullSeedSelector_ThrowsArgumentNullException() + { + IQueryable source = Enumerable.Empty().AsQueryable(); + Expression> seedSelector = null; + + AssertExtensions.Throws("seedSelector", () => source.AggregateBy(x => x, seedSelector, (x, y) => x + y)); + AssertExtensions.Throws("seedSelector", () => source.AggregateBy(x => x, seedSelector, (x, y) => x + y, EqualityComparer.Default)); + } + + [Fact] + public void NullFunc_ThrowsArgumentNullException() + { + IQueryable source = Enumerable.Empty().AsQueryable(); + Expression> func = null; + + AssertExtensions.Throws("func", () => source.AggregateBy(x => x, x => 0, func)); + AssertExtensions.Throws("func", () => source.AggregateBy(x => x, x => 0, func, EqualityComparer.Default)); + } + + [Fact] + public void EmptySource() + { + int[] source = { }; + Assert.Empty(source.AsQueryable().AggregateBy(x => x, x => 0, (x, y) => x + y)); + } + + [Fact] + public void AggregateBy() + { + string[] source = { "now", "own", "won" }; + var counts = source.AsQueryable().AggregateBy(x => x, 0, (x, _) => x + 1).ToArray(); + Assert.Equal(source.Length, counts.Length); + Assert.Equal(source, counts.Select(x => x.Key).ToArray()); + Assert.All(counts, x => Assert.Equal(1, x.Value)); + } + + [Fact] + public void AggregateBy_CustomKeySelector() + { + string[] source = { "now", "own", "won" }; + var counts = source.AsQueryable().AggregateBy(x => string.Concat(x.Order()), 0, (x, _) => x + 1).ToArray(); + var count = Assert.Single(counts); + Assert.Equal(source[0], count.Key); + Assert.Equal(source.Length, count.Value); + } + + [Fact] + public void AggregateBy_CustomComparison() + { + string[] source = { "now", "own", "won" }; + var counts = source.AsQueryable().AggregateBy(x => x, 0, (x, _) => x + 1, new AnagramEqualityComparer()).ToArray(); + var count = Assert.Single(counts); + Assert.Equal(source[0], count.Key); + Assert.Equal(source.Length, count.Value); + } + } +} diff --git a/src/libraries/System.Linq.Queryable/tests/CountByTests.cs b/src/libraries/System.Linq.Queryable/tests/CountByTests.cs new file mode 100644 index 00000000000000..041ac1e7426f11 --- /dev/null +++ b/src/libraries/System.Linq.Queryable/tests/CountByTests.cs @@ -0,0 +1,68 @@ +// 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.Expressions; +using Xunit; + +namespace System.Linq.Tests +{ + public class CountByTests : EnumerableBasedTests + { + [Fact] + public void NullSource_ThrowsArgumentNullException() + { + IQueryable source = null; + + AssertExtensions.Throws("source", () => source.CountBy(x => x)); + AssertExtensions.Throws("source", () => source.CountBy(x => x, EqualityComparer.Default)); + } + + [Fact] + public void NullKeySelector_ThrowsArgumentNullException() + { + IQueryable source = Enumerable.Empty().AsQueryable(); + Expression> keySelector = null; + + AssertExtensions.Throws("keySelector", () => source.CountBy(keySelector)); + AssertExtensions.Throws("keySelector", () => source.CountBy(keySelector, EqualityComparer.Default)); + } + + [Fact] + public void EmptySource() + { + int[] source = { }; + Assert.Empty(source.AsQueryable().CountBy(x => x)); + } + + [Fact] + public void CountBy() + { + string[] source = { "now", "own", "won" }; + var counts = source.AsQueryable().CountBy(x => x).ToArray(); + Assert.Equal(source.Length, counts.Length); + Assert.Equal(source, counts.Select(x => x.Key).ToArray()); + Assert.All(counts, x => Assert.Equal(1, x.Value)); + } + + [Fact] + public void CountBy_CustomKeySelector() + { + string[] source = { "now", "own", "won" }; + var counts = source.AsQueryable().CountBy(x => string.Concat(x.Order())).ToArray(); + var count = Assert.Single(counts); + Assert.Equal(source[0], count.Key); + Assert.Equal(source.Length, count.Value); + } + + [Fact] + public void CountBy_CustomComparison() + { + string[] source = { "now", "own", "won" }; + var counts = source.AsQueryable().CountBy(x => x, new AnagramEqualityComparer()).ToArray(); + var count = Assert.Single(counts); + Assert.Equal(source[0], count.Key); + Assert.Equal(source.Length, count.Value); + } + } +} diff --git a/src/libraries/System.Linq.Queryable/tests/System.Linq.Queryable.Tests.csproj b/src/libraries/System.Linq.Queryable/tests/System.Linq.Queryable.Tests.csproj index 4a5a3ef305babc..ed9f7f73025bfd 100644 --- a/src/libraries/System.Linq.Queryable/tests/System.Linq.Queryable.Tests.csproj +++ b/src/libraries/System.Linq.Queryable/tests/System.Linq.Queryable.Tests.csproj @@ -12,8 +12,10 @@ + + diff --git a/src/libraries/System.Linq/System.Linq.sln b/src/libraries/System.Linq/System.Linq.sln index fcfd56644a8d86..b6b2290abd290c 100644 --- a/src/libraries/System.Linq/System.Linq.sln +++ b/src/libraries/System.Linq/System.Linq.sln @@ -17,6 +17,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{D3160C37-FC48-4907-8F4A-F584ED12B275}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{E0CA3ED5-EE6C-4F7C-BCE7-EFB1D64A9CD1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{3EFB74E7-616A-48C1-B43B-3F89AA5013E6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{28ABC524-ACEE-4183-A64A-49E3DC830595}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{721DB3D9-8221-424E-BE29-084CDD20D26E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{E19B8772-2DBD-4274-8190-F3CC0242A1C0}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{E291F4BF-7B8B-45AD-88F5-FB8B8380C126}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{0BCB262A-FC13-4A48-BB0B-9FA293594701}" @@ -25,6 +35,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E6102BFA-080 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{E61195C4-72B4-47A3-AC98-1F896A0C770F}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{84E98F7C-FA2B-4048-AB7C-9FCDEA9CD37E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{8CA90AB2-58B9-45E7-A684-EDB60C6924B0}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{7C5B49B9-F7D9-41FB-A8FA-94328BDDCCD1}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{0ADC596A-5B2E-4E5F-B5B5-DEB65A6C7E9D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -67,6 +85,26 @@ Global {D3160C37-FC48-4907-8F4A-F584ED12B275}.Debug|Any CPU.Build.0 = Debug|Any CPU {D3160C37-FC48-4907-8F4A-F584ED12B275}.Release|Any CPU.ActiveCfg = Release|Any CPU {D3160C37-FC48-4907-8F4A-F584ED12B275}.Release|Any CPU.Build.0 = Release|Any CPU + {E0CA3ED5-EE6C-4F7C-BCE7-EFB1D64A9CD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E0CA3ED5-EE6C-4F7C-BCE7-EFB1D64A9CD1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E0CA3ED5-EE6C-4F7C-BCE7-EFB1D64A9CD1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E0CA3ED5-EE6C-4F7C-BCE7-EFB1D64A9CD1}.Release|Any CPU.Build.0 = Release|Any CPU + {3EFB74E7-616A-48C1-B43B-3F89AA5013E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3EFB74E7-616A-48C1-B43B-3F89AA5013E6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3EFB74E7-616A-48C1-B43B-3F89AA5013E6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3EFB74E7-616A-48C1-B43B-3F89AA5013E6}.Release|Any CPU.Build.0 = Release|Any CPU + {28ABC524-ACEE-4183-A64A-49E3DC830595}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28ABC524-ACEE-4183-A64A-49E3DC830595}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28ABC524-ACEE-4183-A64A-49E3DC830595}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28ABC524-ACEE-4183-A64A-49E3DC830595}.Release|Any CPU.Build.0 = Release|Any CPU + {721DB3D9-8221-424E-BE29-084CDD20D26E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {721DB3D9-8221-424E-BE29-084CDD20D26E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {721DB3D9-8221-424E-BE29-084CDD20D26E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {721DB3D9-8221-424E-BE29-084CDD20D26E}.Release|Any CPU.Build.0 = Release|Any CPU + {E19B8772-2DBD-4274-8190-F3CC0242A1C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E19B8772-2DBD-4274-8190-F3CC0242A1C0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E19B8772-2DBD-4274-8190-F3CC0242A1C0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E19B8772-2DBD-4274-8190-F3CC0242A1C0}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -81,6 +119,14 @@ Global {9A13A12F-C924-43AF-94AF-6F1B33582D27} = {E61195C4-72B4-47A3-AC98-1F896A0C770F} {4BEC631E-B5FD-453F-82A0-C95C461798EA} = {E61195C4-72B4-47A3-AC98-1F896A0C770F} {C8F0459C-15D5-4624-8CE4-E93ADF96A28C} = {E61195C4-72B4-47A3-AC98-1F896A0C770F} + {E0CA3ED5-EE6C-4F7C-BCE7-EFB1D64A9CD1} = {84E98F7C-FA2B-4048-AB7C-9FCDEA9CD37E} + {3EFB74E7-616A-48C1-B43B-3F89AA5013E6} = {84E98F7C-FA2B-4048-AB7C-9FCDEA9CD37E} + {84E98F7C-FA2B-4048-AB7C-9FCDEA9CD37E} = {0ADC596A-5B2E-4E5F-B5B5-DEB65A6C7E9D} + {28ABC524-ACEE-4183-A64A-49E3DC830595} = {8CA90AB2-58B9-45E7-A684-EDB60C6924B0} + {721DB3D9-8221-424E-BE29-084CDD20D26E} = {8CA90AB2-58B9-45E7-A684-EDB60C6924B0} + {8CA90AB2-58B9-45E7-A684-EDB60C6924B0} = {0ADC596A-5B2E-4E5F-B5B5-DEB65A6C7E9D} + {E19B8772-2DBD-4274-8190-F3CC0242A1C0} = {7C5B49B9-F7D9-41FB-A8FA-94328BDDCCD1} + {7C5B49B9-F7D9-41FB-A8FA-94328BDDCCD1} = {0ADC596A-5B2E-4E5F-B5B5-DEB65A6C7E9D} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {A4970D79-BF1C-4343-9070-B409DBB69F93} diff --git a/src/libraries/System.Linq/ref/System.Linq.cs b/src/libraries/System.Linq/ref/System.Linq.cs index e49127be6c7378..e3c374bc0d9fdf 100644 --- a/src/libraries/System.Linq/ref/System.Linq.cs +++ b/src/libraries/System.Linq/ref/System.Linq.cs @@ -11,6 +11,8 @@ public static partial class Enumerable public static TSource Aggregate(this System.Collections.Generic.IEnumerable source, System.Func func) { throw null; } public static TAccumulate Aggregate(this System.Collections.Generic.IEnumerable source, TAccumulate seed, System.Func func) { throw null; } public static TResult Aggregate(this System.Collections.Generic.IEnumerable source, TAccumulate seed, System.Func func, System.Func resultSelector) { throw null; } + public static System.Collections.Generic.IEnumerable> AggregateBy(this System.Collections.Generic.IEnumerable source, System.Func keySelector, TAccumulate seed, System.Func func, System.Collections.Generic.IEqualityComparer? keyComparer = null) where TKey : notnull { throw null; } + public static System.Collections.Generic.IEnumerable> AggregateBy(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func seedSelector, System.Func func, System.Collections.Generic.IEqualityComparer? keyComparer = null) where TKey : notnull { throw null; } public static bool All(this System.Collections.Generic.IEnumerable source, System.Func predicate) { throw null; } public static bool Any(this System.Collections.Generic.IEnumerable source) { throw null; } public static bool Any(this System.Collections.Generic.IEnumerable source, System.Func predicate) { throw null; } @@ -47,6 +49,7 @@ public static System.Collections.Generic.IEnumerable< public static bool Contains(this System.Collections.Generic.IEnumerable source, TSource value, System.Collections.Generic.IEqualityComparer? comparer) { throw null; } public static int Count(this System.Collections.Generic.IEnumerable source) { throw null; } public static int Count(this System.Collections.Generic.IEnumerable source, System.Func predicate) { throw null; } + public static System.Collections.Generic.IEnumerable> CountBy(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Collections.Generic.IEqualityComparer? keyComparer = null) where TKey : notnull { throw null; } public static System.Collections.Generic.IEnumerable DefaultIfEmpty(this System.Collections.Generic.IEnumerable source) { throw null; } public static System.Collections.Generic.IEnumerable DefaultIfEmpty(this System.Collections.Generic.IEnumerable source, TSource defaultValue) { throw null; } public static System.Collections.Generic.IEnumerable DistinctBy(this System.Collections.Generic.IEnumerable source, System.Func keySelector) { throw null; } diff --git a/src/libraries/System.Linq/src/System.Linq.csproj b/src/libraries/System.Linq/src/System.Linq.csproj index 0babce85894de8..b2c978233b61d6 100644 --- a/src/libraries/System.Linq/src/System.Linq.csproj +++ b/src/libraries/System.Linq/src/System.Linq.csproj @@ -56,6 +56,8 @@ + + diff --git a/src/libraries/System.Linq/src/System/Linq/AggregateBy.cs b/src/libraries/System.Linq/src/System/Linq/AggregateBy.cs new file mode 100644 index 00000000000000..8f9a18038955be --- /dev/null +++ b/src/libraries/System.Linq/src/System/Linq/AggregateBy.cs @@ -0,0 +1,125 @@ +// 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.Runtime.InteropServices; + +namespace System.Linq +{ + public static partial class Enumerable + { + public static IEnumerable> AggregateBy( + this IEnumerable source, + Func keySelector, + TAccumulate seed, + Func func, + IEqualityComparer? keyComparer = null) where TKey : notnull + { + if (source is null) + { + ThrowHelper.ThrowArgumentNullException(ExceptionArgument.source); + } + if (keySelector is null) + { + ThrowHelper.ThrowArgumentNullException(ExceptionArgument.keySelector); + } + if (func is null) + { + ThrowHelper.ThrowArgumentNullException(ExceptionArgument.func); + } + + return AggregateByIterator(source, keySelector, _ => seed, func, keyComparer); + } + + public static IEnumerable> AggregateBy( + this IEnumerable source, + Func keySelector, + Func seedSelector, + Func func, + IEqualityComparer? keyComparer = null) where TKey : notnull + { + if (source is null) + { + ThrowHelper.ThrowArgumentNullException(ExceptionArgument.source); + } + if (keySelector is null) + { + ThrowHelper.ThrowArgumentNullException(ExceptionArgument.keySelector); + } + if (seedSelector is null) + { + ThrowHelper.ThrowArgumentNullException(ExceptionArgument.seedSelector); + } + if (func is null) + { + ThrowHelper.ThrowArgumentNullException(ExceptionArgument.func); + } + + return AggregateByIterator(source, keySelector, seedSelector, func, keyComparer); + } + + private static IEnumerable> AggregateByIterator(IEnumerable source, Func keySelector, TAccumulate seed, Func func, IEqualityComparer? keyComparer) where TKey : notnull + { + using IEnumerator enumerator = source.GetEnumerator(); + + if (!enumerator.MoveNext()) + { + yield break; + } + + foreach (KeyValuePair countBy in PopulateDictionary(enumerator, keySelector, seed, func, keyComparer)) + { + yield return countBy; + } + + static Dictionary PopulateDictionary(IEnumerator enumerator, Func keySelector, TAccumulate seed, Func func, IEqualityComparer? keyComparer) + { + Dictionary dict = new(keyComparer); + + do + { + TSource value = enumerator.Current; + TKey key = keySelector(value); + + ref TAccumulate? acc = ref CollectionsMarshal.GetValueRefOrAddDefault(dict, key, out bool exists); + acc = func(exists ? acc! : seed, value); + } + while (enumerator.MoveNext()); + + return dict; + } + } + + private static IEnumerable> AggregateByIterator(IEnumerable source, Func keySelector, Func seedSelector, Func func, IEqualityComparer? keyComparer) where TKey : notnull + { + using IEnumerator enumerator = source.GetEnumerator(); + + if (!enumerator.MoveNext()) + { + yield break; + } + + foreach (KeyValuePair countBy in PopulateDictionary(enumerator, keySelector, seedSelector, func, keyComparer)) + { + yield return countBy; + } + + static Dictionary PopulateDictionary(IEnumerator enumerator, Func keySelector, Func seedSelector, Func func, IEqualityComparer? keyComparer) + { + Dictionary dict = new(keyComparer); + + do + { + TSource value = enumerator.Current; + TKey key = keySelector(value); + + ref TAccumulate? acc = ref CollectionsMarshal.GetValueRefOrAddDefault(dict, key, out bool exists); + acc = func(exists ? acc! : seedSelector(key), value); + } + while (enumerator.MoveNext()); + + return dict; + } + } + } +} diff --git a/src/libraries/System.Linq/src/System/Linq/CountBy.cs b/src/libraries/System.Linq/src/System/Linq/CountBy.cs new file mode 100644 index 00000000000000..dcd93c5567cd1d --- /dev/null +++ b/src/libraries/System.Linq/src/System/Linq/CountBy.cs @@ -0,0 +1,60 @@ +// 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.Runtime.InteropServices; + +namespace System.Linq +{ + public static partial class Enumerable + { + public static IEnumerable> CountBy(this IEnumerable source, Func keySelector, IEqualityComparer? keyComparer = null) where TKey : notnull + { + if (source is null) + { + ThrowHelper.ThrowArgumentNullException(ExceptionArgument.source); + } + if (keySelector is null) + { + ThrowHelper.ThrowArgumentNullException(ExceptionArgument.keySelector); + } + + return CountByIterator(source, keySelector, keyComparer); + } + + private static IEnumerable> CountByIterator(IEnumerable source, Func keySelector, IEqualityComparer? keyComparer) where TKey : notnull + { + using IEnumerator enumerator = source.GetEnumerator(); + + if (!enumerator.MoveNext()) + { + yield break; + } + + foreach (KeyValuePair countBy in BuildCountDictionary(enumerator, keySelector, keyComparer)) + { + yield return countBy; + } + } + + private static Dictionary BuildCountDictionary(IEnumerator enumerator, Func keySelector, IEqualityComparer? keyComparer) where TKey : notnull + { + Dictionary countsBy = new(keyComparer); + + do + { + TSource value = enumerator.Current; + TKey key = keySelector(value); + + ref int currentCount = ref CollectionsMarshal.GetValueRefOrAddDefault(countsBy, key, out _); + checked + { + currentCount++; + } + } + while (enumerator.MoveNext()); + + return countsBy; + } + } +} diff --git a/src/libraries/System.Linq/src/System/Linq/ElementAt.cs b/src/libraries/System.Linq/src/System/Linq/ElementAt.cs index 91daa6b37bbd56..b33fcaddff924a 100644 --- a/src/libraries/System.Linq/src/System/Linq/ElementAt.cs +++ b/src/libraries/System.Linq/src/System/Linq/ElementAt.cs @@ -87,12 +87,11 @@ public static TSource ElementAt(this IEnumerable source, Index if (source is IList list) { - return index >= 0 && index < list.Count ? list[index] : default; + return (uint)index < (uint)list.Count ? list[index] : default; } TryGetElement(source, index, out TSource? element); return element; - } /// Returns the element at a specified index in a sequence or a default value if the index is out of range. diff --git a/src/libraries/System.Linq/src/System/Linq/ThrowHelper.cs b/src/libraries/System.Linq/src/System/Linq/ThrowHelper.cs index cff4e18c9abff6..1bc90d875c94af 100644 --- a/src/libraries/System.Linq/src/System/Linq/ThrowHelper.cs +++ b/src/libraries/System.Linq/src/System/Linq/ThrowHelper.cs @@ -54,6 +54,7 @@ private static string GetArgumentString(ExceptionArgument argument) case ExceptionArgument.predicate: return nameof(ExceptionArgument.predicate); case ExceptionArgument.resultSelector: return nameof(ExceptionArgument.resultSelector); case ExceptionArgument.second: return nameof(ExceptionArgument.second); + case ExceptionArgument.seedSelector: return nameof(ExceptionArgument.seedSelector); case ExceptionArgument.selector: return nameof(ExceptionArgument.selector); case ExceptionArgument.source: return nameof(ExceptionArgument.source); case ExceptionArgument.third: return nameof(ExceptionArgument.third); @@ -82,6 +83,7 @@ internal enum ExceptionArgument predicate, resultSelector, second, + seedSelector, selector, source, third, diff --git a/src/libraries/System.Linq/tests/AggregateByTests.cs b/src/libraries/System.Linq/tests/AggregateByTests.cs new file mode 100644 index 00000000000000..342ab412f8793e --- /dev/null +++ b/src/libraries/System.Linq/tests/AggregateByTests.cs @@ -0,0 +1,296 @@ +// 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.Linq.Tests +{ + public class AggregateByTests : EnumerableTests + { + [Fact] + public void AggregateBy_SourceNull_ThrowsArgumentNullException() + { + string[] first = null; + + AssertExtensions.Throws("source", () => first.AggregateBy(x => x, string.Empty, (x, y) => x + y)); + AssertExtensions.Throws("source", () => first.AggregateBy(x => x, string.Empty, (x, y) => x + y, new AnagramEqualityComparer())); + } + + [Fact] + public void AggregateBy_KeySelectorNull_ThrowsArgumentNullException() + { + string[] source = { }; + Func keySelector = null; + + AssertExtensions.Throws("keySelector", () => source.AggregateBy(keySelector, string.Empty, (x, y) => x + y)); + AssertExtensions.Throws("keySelector", () => source.AggregateBy(keySelector, string.Empty, (x, y) => x + y, new AnagramEqualityComparer())); + } + + [Fact] + public void AggregateBy_SeedSelectorNull_ThrowsArgumentNullException() + { + string[] source = { }; + Func seedSelector = null; + + AssertExtensions.Throws("seedSelector", () => source.AggregateBy(x => x, seedSelector, (x, y) => x + y)); + AssertExtensions.Throws("seedSelector", () => source.AggregateBy(x => x, seedSelector, (x, y) => x + y, new AnagramEqualityComparer())); + } + + [Fact] + public void AggregateBy_FuncNull_ThrowsArgumentNullException() + { + string[] source = { }; + Func func = null; + + AssertExtensions.Throws("func", () => source.AggregateBy(x => x, string.Empty, func)); + AssertExtensions.Throws("func", () => source.AggregateBy(x => x, string.Empty, func, new AnagramEqualityComparer())); + } + + [Fact] + public void AggregateBy_SourceThrowsOnGetEnumerator() + { + IEnumerable source = new ThrowsOnGetEnumerator(); + + var enumerator = source.AggregateBy(x => x, 0, (x, y) => x + y).GetEnumerator(); + + Assert.Throws(() => enumerator.MoveNext()); + } + + [Fact] + public void AggregateBy_SourceThrowsOnMoveNext() + { + IEnumerable source = new ThrowsOnMoveNext(); + + var enumerator = source.AggregateBy(x => x, 0, (x, y) => x + y).GetEnumerator(); + + Assert.Throws(() => enumerator.MoveNext()); + } + + [Fact] + public void AggregateBy_SourceThrowsOnCurrent() + { + IEnumerable source = new ThrowsOnCurrentEnumerator(); + + var enumerator = source.AggregateBy(x => x, 0, (x, y) => x + y).GetEnumerator(); + + Assert.Throws(() => enumerator.MoveNext()); + } + + [Theory] + [ActiveIssue("https://github.com/dotnet/runtime/issues/92387", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))] + [MemberData(nameof(AggregateBy_TestData))] + public static void AggregateBy_HasExpectedOutput(IEnumerable source, Func keySelector, Func seedSelector, Func func, IEqualityComparer? comparer, IEnumerable> expected) + { + Assert.Equal(expected, source.AggregateBy(keySelector, seedSelector, func, comparer)); + } + + [Theory] + [ActiveIssue("https://github.com/dotnet/runtime/issues/92387", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))] + [MemberData(nameof(AggregateBy_TestData))] + public static void AggregateBy_RunOnce_HasExpectedOutput(IEnumerable source, Func keySelector, Func seedSelector, Func func, IEqualityComparer? comparer, IEnumerable> expected) + { + Assert.Equal(expected, source.RunOnce().AggregateBy(keySelector, seedSelector, func, comparer)); + } + + public static IEnumerable AggregateBy_TestData() + { + yield return WrapArgs( + source: Enumerable.Empty(), + keySelector: x => x, + seedSelector: x => 0, + func: (x, y) => x + y, + comparer: null, + expected: Enumerable.Empty>()); + + yield return WrapArgs( + source: Enumerable.Range(0, 10), + keySelector: x => x, + seedSelector: x => 0, + func: (x, y) => x + y, + comparer: null, + expected: Enumerable.Range(0, 10).ToDictionary(x => x, x => x)); + + yield return WrapArgs( + source: Enumerable.Range(5, 10), + keySelector: x => true, + seedSelector: x => 0, + func: (x, y) => x + y, + comparer: null, + expected: Enumerable.Repeat(true, 1).ToDictionary(x => x, x => 95)); + + yield return WrapArgs( + source: Enumerable.Range(0, 20), + keySelector: x => x % 5, + seedSelector: x => 0, + func: (x, y) => x + y, + comparer: null, + expected: Enumerable.Range(0, 5).ToDictionary(x => x, x => 30 + 4 * x)); + + yield return WrapArgs( + source: Enumerable.Repeat(5, 20), + keySelector: x => x, + seedSelector: x => 0, + func: (x, y) => x + y, + comparer: null, + expected: Enumerable.Repeat(5, 1).ToDictionary(x => x, x => 100)); + + yield return WrapArgs( + source: new string[] { "Bob", "bob", "tim", "Bob", "Tim" }, + keySelector: x => x, + seedSelector: x => string.Empty, + func: (x, y) => x + y, + null, + expected: new Dictionary + { + { "Bob", "BobBob" }, + { "bob", "bob" }, + { "tim", "tim" }, + { "Tim", "Tim" }, + }); + + yield return WrapArgs( + source: new string[] { "Bob", "bob", "tim", "Bob", "Tim" }, + keySelector: x => x, + seedSelector: x => string.Empty, + func: (x, y) => x + y, + StringComparer.OrdinalIgnoreCase, + expected: new Dictionary + { + { "Bob", "BobbobBob" }, + { "tim", "timTim" } + }); + + yield return WrapArgs( + source: new (string Name, int Age)[] { ("Tom", 20), ("Dick", 30), ("Harry", 40) }, + keySelector: x => x.Age, + seedSelector: x => $"I am {x} and my name is ", + func: (x, y) => x + y.Name, + comparer: null, + expected: new Dictionary + { + { 20, "I am 20 and my name is Tom" }, + { 30, "I am 30 and my name is Dick" }, + { 40, "I am 40 and my name is Harry" } + }); + + yield return WrapArgs( + source: new (string Name, int Age)[] { ("Tom", 20), ("Dick", 20), ("Harry", 40) }, + keySelector: x => x.Age, + seedSelector: x => $"I am {x} and my name is", + func: (x, y) => $"{x} maybe {y.Name}", + comparer: null, + expected: new Dictionary + { + { 20, "I am 20 and my name is maybe Tom maybe Dick" }, + { 40, "I am 40 and my name is maybe Harry" } + }); + + yield return WrapArgs( + source: new (string Name, int Age)[] { ("Bob", 20), ("bob", 20), ("Harry", 20) }, + keySelector: x => x.Name, + seedSelector: x => 0, + func: (x, y) => x + y.Age, + comparer: null, + expected: new string[] { "Bob", "bob", "Harry" }.ToDictionary(x => x, x => 20)); + + yield return WrapArgs( + source: new (string Name, int Age)[] { ("Bob", 20), ("bob", 30), ("Harry", 40) }, + keySelector: x => x.Name, + seedSelector: x => 0, + func: (x, y) => x + y.Age, + comparer: StringComparer.OrdinalIgnoreCase, + expected: new Dictionary + { + { "Bob", 50 }, + { "Harry", 40 } + }); + + object[] WrapArgs(IEnumerable source, Func keySelector, Func seedSelector, Func func, IEqualityComparer? comparer, IEnumerable> expected) + => new object[] { source, keySelector, seedSelector, func, comparer, expected }; + } + + [Fact] + public void GroupBy() + { + static IEnumerable>> GroupBy(IEnumerable source, Func keySelector) => + source.AggregateBy( + keySelector, + seedSelector: _ => new List(), + (group, element) => { group.Add(element); return group; }); + + IEnumerable>> oddsEvens = GroupBy( + new int[] { 1, 2, 3, 4 }, + i => i % 2 == 0); + + var e = oddsEvens.GetEnumerator(); + + Assert.True(e.MoveNext()); + KeyValuePair> oddsItem = e.Current; + Assert.False(oddsItem.Key); + List odds = oddsItem.Value; + Assert.True(odds.Contains(1)); + Assert.True(odds.Contains(3)); + Assert.False(odds.Contains(2)); + Assert.False(odds.Contains(4)); + + Assert.True(e.MoveNext()); + KeyValuePair> evensItem = e.Current; + Assert.True(evensItem.Key); + List evens = evensItem.Value; + Assert.True(evens.Contains(2)); + Assert.True(evens.Contains(4)); + Assert.False(evens.Contains(1)); + Assert.False(evens.Contains(3)); + } + + [Fact] + public void LongCountBy() + { + static IEnumerable> LongCountBy(IEnumerable source, Func keySelector) => + source.AggregateBy( + keySelector, + seed: 0L, + (count, _) => ++count); + + IEnumerable> oddsEvens = LongCountBy( + new int[] { 1, 2, 3, 4 }, + i => i % 2 == 0); + + var e = oddsEvens.GetEnumerator(); + + Assert.True(e.MoveNext()); + KeyValuePair oddsItem = e.Current; + Assert.False(oddsItem.Key); + Assert.Equal(2, oddsItem.Value); + + Assert.True(e.MoveNext()); + KeyValuePair evensItem = e.Current; + Assert.True(evensItem.Key); + Assert.Equal(2, oddsItem.Value); + } + + [Fact] + public void Score() + { + var data = new (string id, int score)[] + { + ("0", 42), + ("1", 5), + ("2", 4), + ("1", 10), + ("0", 25), + }; + + var scores = data.AggregateBy( + keySelector: entry => entry.id, + seed: 0, + (totalScore, curr) => totalScore + curr.score) + .ToDictionary(); + + Assert.Equal(67, scores["0"]); + Assert.Equal(15, scores["1"]); + Assert.Equal( 4, scores["2"]); + } + } +} diff --git a/src/libraries/System.Linq/tests/CountByTests.cs b/src/libraries/System.Linq/tests/CountByTests.cs new file mode 100644 index 00000000000000..cc2a4a5f307099 --- /dev/null +++ b/src/libraries/System.Linq/tests/CountByTests.cs @@ -0,0 +1,166 @@ +// 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.Linq.Tests +{ + public class CountByTests : EnumerableTests + { + [Fact] + public void CountBy_SourceNull_ThrowsArgumentNullException() + { + string[] first = null; + + AssertExtensions.Throws("source", () => first.CountBy(x => x)); + AssertExtensions.Throws("source", () => first.CountBy(x => x, new AnagramEqualityComparer())); + } + + [Fact] + public void CountBy_KeySelectorNull_ThrowsArgumentNullException() + { + string[] source = { "Bob", "Tim", "Robert", "Chris" }; + Func keySelector = null; + + AssertExtensions.Throws("keySelector", () => source.CountBy(keySelector)); + AssertExtensions.Throws("keySelector", () => source.CountBy(keySelector, new AnagramEqualityComparer())); + } + + [Fact] + public void CountBy_SourceThrowsOnGetEnumerator() + { + IEnumerable source = new ThrowsOnGetEnumerator(); + + var enumerator = source.CountBy(x => x).GetEnumerator(); + + Assert.Throws(() => enumerator.MoveNext()); + } + + [Fact] + public void CountBy_SourceThrowsOnMoveNext() + { + IEnumerable source = new ThrowsOnMoveNext(); + + var enumerator = source.CountBy(x => x).GetEnumerator(); + + Assert.Throws(() => enumerator.MoveNext()); + } + + [Fact] + public void CountBy_SourceThrowsOnCurrent() + { + IEnumerable source = new ThrowsOnCurrentEnumerator(); + + var enumerator = source.CountBy(x => x).GetEnumerator(); + + Assert.Throws(() => enumerator.MoveNext()); + } + + [Theory] + [ActiveIssue("https://github.com/dotnet/runtime/issues/92387", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))] + [MemberData(nameof(CountBy_TestData))] + public static void CountBy_HasExpectedOutput(IEnumerable source, Func keySelector, IEqualityComparer? comparer, IEnumerable> expected) + { + Assert.Equal(expected, source.CountBy(keySelector, comparer)); + } + + [Theory] + [ActiveIssue("https://github.com/dotnet/runtime/issues/92387", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))] + [MemberData(nameof(CountBy_TestData))] + public static void CountBy_RunOnce_HasExpectedOutput(IEnumerable source, Func keySelector, IEqualityComparer? comparer, IEnumerable> expected) + { + Assert.Equal(expected, source.RunOnce().CountBy(keySelector, comparer)); + } + + public static IEnumerable CountBy_TestData() + { + yield return WrapArgs( + source: Enumerable.Empty(), + keySelector: x => x, + comparer: null, + expected: Enumerable.Empty>()); + + yield return WrapArgs( + source: Enumerable.Range(0, 10), + keySelector: x => x, + comparer: null, + expected: Enumerable.Range(0, 10).ToDictionary(x => x, x => 1)); + + yield return WrapArgs( + source: Enumerable.Range(5, 10), + keySelector: x => true, + comparer: null, + expected: Enumerable.Repeat(true, 1).ToDictionary(x => x, x => 10)); + + yield return WrapArgs( + source: Enumerable.Range(0, 20), + keySelector: x => x % 5, + comparer: null, + expected: Enumerable.Range(0, 5).ToDictionary(x => x, x => 4)); + + yield return WrapArgs( + source: Enumerable.Repeat(5, 20), + keySelector: x => x, + comparer: null, + expected: Enumerable.Repeat(5, 1).ToDictionary(x => x, x => 20)); + + yield return WrapArgs( + source: new string[] { "Bob", "bob", "tim", "Bob", "Tim" }, + keySelector: x => x, + null, + expected: new Dictionary() + { + { "Bob", 2 }, + { "bob", 1 }, + { "tim", 1 }, + { "Tim", 1 } + }); + + yield return WrapArgs( + source: new string[] { "Bob", "bob", "tim", "Bob", "Tim" }, + keySelector: x => x, + StringComparer.OrdinalIgnoreCase, + expected: new Dictionary() + { + { "Bob", 3 }, + { "tim", 2 } + }); + + yield return WrapArgs( + source: new (string Name, int Age)[] { ("Tom", 20), ("Dick", 30), ("Harry", 40) }, + keySelector: x => x.Age, + comparer: null, + expected: new int[] { 20, 30, 40 }.ToDictionary(x => x, x => 1)); + + yield return WrapArgs( + source: new (string Name, int Age)[] { ("Tom", 20), ("Dick", 20), ("Harry", 40) }, + keySelector: x => x.Age, + comparer: null, + expected: new Dictionary() + { + { 20, 2 }, + { 40, 1 } + }); + + yield return WrapArgs( + source: new (string Name, int Age)[] { ("Bob", 20), ("bob", 30), ("Harry", 40) }, + keySelector: x => x.Name, + comparer: null, + expected: new string[] { "Bob", "bob", "Harry" }.ToDictionary(x => x, x => 1)); + + yield return WrapArgs( + source: new (string Name, int Age)[] { ("Bob", 20), ("bob", 30), ("Harry", 40) }, + keySelector: x => x.Name, + comparer: StringComparer.OrdinalIgnoreCase, + expected: new Dictionary() + { + { "Bob", 2 }, + { "Harry", 1 } + }); + + object[] WrapArgs(IEnumerable source, Func keySelector, IEqualityComparer? comparer, IEnumerable> expected) + => new object[] { source, keySelector, comparer, expected }; + } + } +} diff --git a/src/libraries/System.Linq/tests/System.Linq.Tests.csproj b/src/libraries/System.Linq/tests/System.Linq.Tests.csproj index 22fb00cf9cc86c..5dc331ca7f1b18 100644 --- a/src/libraries/System.Linq/tests/System.Linq.Tests.csproj +++ b/src/libraries/System.Linq/tests/System.Linq.Tests.csproj @@ -18,8 +18,10 @@ + + diff --git a/src/libraries/System.Linq/tests/ToArrayTests.cs b/src/libraries/System.Linq/tests/ToArrayTests.cs index 67f8c385f3e39a..b4877785112a74 100644 --- a/src/libraries/System.Linq/tests/ToArrayTests.cs +++ b/src/libraries/System.Linq/tests/ToArrayTests.cs @@ -358,7 +358,6 @@ private enum Enum1 } [Fact] - [ActiveIssue("https://github.com/dotnet/runtime/issues/85146", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))] public void ToArray_Cast() { Enum0[] source = { Enum0.First, Enum0.Second, Enum0.Third }; diff --git a/src/libraries/System.Management/System.Management.sln b/src/libraries/System.Management/System.Management.sln index b83958c8ffb863..781dabe5c1062c 100644 --- a/src/libraries/System.Management/System.Management.sln +++ b/src/libraries/System.Management/System.Management.sln @@ -11,12 +11,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Management", "src\Sy EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Management.Tests", "tests\System.Management.Tests.csproj", "{7113AE59-F125-4378-B93A-9C5C1450B306}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{EB44DCC8-9DFE-498B-8A4B-ED945FEAD6FB}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{8A7BDD6F-B220-4FDD-BC2A-A909A7C01D61}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{AEECC1B0-80B3-4DD2-A309-76E4CF12310E}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{AEFFA5B2-1429-4523-91F4-21ACB4B2506B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{BDFF48AD-B58E-4448-AA89-9DC66D31E4E7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{868994E7-C8E2-4955-A401-B948D8D692DD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{57ABF831-FDB1-4E37-86A1-0B14AFF7C2A5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{D9B4BD07-C6E5-4706-83F5-D03856D8EC27}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{50F325CE-EDFC-4704-BF30-C97AACD9F558}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{441745A2-6E7F-48B9-8C9D-A48E0171B3A5}" @@ -25,6 +33,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{6DC74D98-13B EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{64360DAC-C8F2-4231-A678-CCEFD683949D}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{FE18DE22-5111-48B6-BC70-AC9F1F1D8F33}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{D84C8FA3-A0E1-42B2-B4FB-7074F0DECC3E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{7FC11456-3BC2-4272-9128-E0CEAE171C08}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{F5A22B82-8BAD-4668-BEB8-ED2334737921}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -55,10 +71,6 @@ Global {7113AE59-F125-4378-B93A-9C5C1450B306}.Debug|Any CPU.Build.0 = Debug|Any CPU {7113AE59-F125-4378-B93A-9C5C1450B306}.Release|Any CPU.ActiveCfg = Release|Any CPU {7113AE59-F125-4378-B93A-9C5C1450B306}.Release|Any CPU.Build.0 = Release|Any CPU - {EB44DCC8-9DFE-498B-8A4B-ED945FEAD6FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EB44DCC8-9DFE-498B-8A4B-ED945FEAD6FB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EB44DCC8-9DFE-498B-8A4B-ED945FEAD6FB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EB44DCC8-9DFE-498B-8A4B-ED945FEAD6FB}.Release|Any CPU.Build.0 = Release|Any CPU {8A7BDD6F-B220-4FDD-BC2A-A909A7C01D61}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8A7BDD6F-B220-4FDD-BC2A-A909A7C01D61}.Debug|Any CPU.Build.0 = Debug|Any CPU {8A7BDD6F-B220-4FDD-BC2A-A909A7C01D61}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -67,6 +79,26 @@ Global {AEECC1B0-80B3-4DD2-A309-76E4CF12310E}.Debug|Any CPU.Build.0 = Debug|Any CPU {AEECC1B0-80B3-4DD2-A309-76E4CF12310E}.Release|Any CPU.ActiveCfg = Release|Any CPU {AEECC1B0-80B3-4DD2-A309-76E4CF12310E}.Release|Any CPU.Build.0 = Release|Any CPU + {AEFFA5B2-1429-4523-91F4-21ACB4B2506B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AEFFA5B2-1429-4523-91F4-21ACB4B2506B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AEFFA5B2-1429-4523-91F4-21ACB4B2506B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AEFFA5B2-1429-4523-91F4-21ACB4B2506B}.Release|Any CPU.Build.0 = Release|Any CPU + {BDFF48AD-B58E-4448-AA89-9DC66D31E4E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BDFF48AD-B58E-4448-AA89-9DC66D31E4E7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BDFF48AD-B58E-4448-AA89-9DC66D31E4E7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BDFF48AD-B58E-4448-AA89-9DC66D31E4E7}.Release|Any CPU.Build.0 = Release|Any CPU + {868994E7-C8E2-4955-A401-B948D8D692DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {868994E7-C8E2-4955-A401-B948D8D692DD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {868994E7-C8E2-4955-A401-B948D8D692DD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {868994E7-C8E2-4955-A401-B948D8D692DD}.Release|Any CPU.Build.0 = Release|Any CPU + {57ABF831-FDB1-4E37-86A1-0B14AFF7C2A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {57ABF831-FDB1-4E37-86A1-0B14AFF7C2A5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {57ABF831-FDB1-4E37-86A1-0B14AFF7C2A5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {57ABF831-FDB1-4E37-86A1-0B14AFF7C2A5}.Release|Any CPU.Build.0 = Release|Any CPU + {D9B4BD07-C6E5-4706-83F5-D03856D8EC27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D9B4BD07-C6E5-4706-83F5-D03856D8EC27}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D9B4BD07-C6E5-4706-83F5-D03856D8EC27}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D9B4BD07-C6E5-4706-83F5-D03856D8EC27}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -78,9 +110,16 @@ Global {12233594-0AC7-45C7-B4E7-8DAF161A299E} = {441745A2-6E7F-48B9-8C9D-A48E0171B3A5} {7B9EB977-908A-43CB-B2FB-E4E34373F3BF} = {6DC74D98-13B5-4230-87B4-ED3162AFC233} {D31C6457-B81D-4503-938B-93877DDDBDB5} = {6DC74D98-13B5-4230-87B4-ED3162AFC233} - {EB44DCC8-9DFE-498B-8A4B-ED945FEAD6FB} = {64360DAC-C8F2-4231-A678-CCEFD683949D} {8A7BDD6F-B220-4FDD-BC2A-A909A7C01D61} = {64360DAC-C8F2-4231-A678-CCEFD683949D} {AEECC1B0-80B3-4DD2-A309-76E4CF12310E} = {64360DAC-C8F2-4231-A678-CCEFD683949D} + {AEFFA5B2-1429-4523-91F4-21ACB4B2506B} = {FE18DE22-5111-48B6-BC70-AC9F1F1D8F33} + {BDFF48AD-B58E-4448-AA89-9DC66D31E4E7} = {FE18DE22-5111-48B6-BC70-AC9F1F1D8F33} + {FE18DE22-5111-48B6-BC70-AC9F1F1D8F33} = {F5A22B82-8BAD-4668-BEB8-ED2334737921} + {868994E7-C8E2-4955-A401-B948D8D692DD} = {D84C8FA3-A0E1-42B2-B4FB-7074F0DECC3E} + {57ABF831-FDB1-4E37-86A1-0B14AFF7C2A5} = {D84C8FA3-A0E1-42B2-B4FB-7074F0DECC3E} + {D84C8FA3-A0E1-42B2-B4FB-7074F0DECC3E} = {F5A22B82-8BAD-4668-BEB8-ED2334737921} + {D9B4BD07-C6E5-4706-83F5-D03856D8EC27} = {7FC11456-3BC2-4272-9128-E0CEAE171C08} + {7FC11456-3BC2-4272-9128-E0CEAE171C08} = {F5A22B82-8BAD-4668-BEB8-ED2334737921} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {9D09EF76-3A6B-4481-95BC-9E56C3DCD30A} diff --git a/src/libraries/System.Management/src/CompatibilitySuppressions.xml b/src/libraries/System.Management/src/CompatibilitySuppressions.xml new file mode 100644 index 00000000000000..c129e95e64b3a0 --- /dev/null +++ b/src/libraries/System.Management/src/CompatibilitySuppressions.xml @@ -0,0 +1,46 @@ + + + + + CP0003 + System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.Management.dll + lib/netstandard2.0/System.Management.dll + true + + + CP0003 + System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.Management.dll + lib/netstandard2.0/System.Management.dll + true + + + CP1002 + System.ComponentModel.Primitives, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.Management.dll + lib/netstandard2.0/System.Management.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.Management.dll + lib/netstandard2.0/System.Management.dll + true + + + CP1002 + System.ComponentModel.Primitives, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.Management.dll + lib/netstandard2.0/System.Management.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.Management.dll + lib/netstandard2.0/System.Management.dll + true + + \ No newline at end of file diff --git a/src/libraries/System.Management/src/PACKAGE.md b/src/libraries/System.Management/src/PACKAGE.md new file mode 100644 index 00000000000000..7138378ac87480 --- /dev/null +++ b/src/libraries/System.Management/src/PACKAGE.md @@ -0,0 +1,70 @@ +## About + + + +Provides access to a rich set of management information and management events about the system, devices, and applications instrumented to the Windows Management Instrumentation (WMI) infrastructure. Not supported on other platforms. + +## Key Features + + + +* Consume Windows Management Instrumentation (WMI) data and events +* High performance extensible event mechanism + +## How to Use + + + +### Retrieve management information +```C# +using System.Management; + +// Get the WMI class +ManagementClass managementClass = new("Win32_Processor"); + +// Loop through the WMI class instances and print the processor information found +foreach (ManagementObject managementObject in managementClass.GetInstances()) +{ + Console.WriteLine("--- Processor information ---"); + Console.WriteLine($"Name: {managementObject["Name"]}"); + Console.WriteLine($"Architecture: {managementObject["Architecture"]}"); +} +``` + +### Query management information via the SelectQuery type +```C# +using System.Management; + +// Search for win32 services with a stopped state +SelectQuery selectQuery = new("Win32_Service", "State = 'Stopped'"); +ManagementObjectSearcher managementObjectSearcher = new(selectQuery); + +foreach (ManagementObject service in managementObjectSearcher.Get()) +{ + Console.WriteLine(service.ToString()); +} +``` + +## Main Types + + + +The main types provided by this library are: + +* `System.Management.ManagementClass` +* `System.Management.ManagementObject` +* `System.Management.SelectQuery` + +## Additional Documentation + + + +* [Conceptual documentation](https://learn.microsoft.com/windows/win32/wmisdk/wmi-start-page) +* [System.Management API documentation](https://learn.microsoft.com/dotnet/api/system.management?view=dotnet-plat-ext-7.0) +* [System.Management.ManagementClass documentation](https://learn.microsoft.com/dotnet/api/system.management.managementclass.-ctor?view=dotnet-plat-ext-7.0) + +## Feedback & Contributing + + + +System.Management is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). diff --git a/src/libraries/System.Memory.Data/System.Memory.Data.sln b/src/libraries/System.Memory.Data/System.Memory.Data.sln index c9de519426fbb0..5edcbf67ac010b 100644 --- a/src/libraries/System.Memory.Data/System.Memory.Data.sln +++ b/src/libraries/System.Memory.Data/System.Memory.Data.sln @@ -39,6 +39,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\Syst EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{6A2B5C68-14C3-4989-8530-D51A138C72AE}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{34DD0132-4503-4F9F-85AA-DEBC1B6ACEC6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{997C37FF-FD71-4A5F-827C-09EB6568DAC9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{C0FB3BB4-0A83-406B-AD72-6D172B4E349D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{1D206501-B05A-435E-9030-AC97151D9BF0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{659C7947-E20D-4BC7-890B-D3ACFFB968CF}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{2BD73108-47D7-40E6-BFCB-169E6AD42A81}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{E6AF8CEE-6550-4190-97D4-D51C5B114919}" @@ -47,6 +57,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D908DCBE-EFA EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{839FCC67-5EA8-4A07-B5D4-9E1DF0B3BE76}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{9A2475E4-53E1-4CF3-800C-8A52E56E9AA8}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{08ED893A-F59D-436B-AD90-5C8CEC95D68D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{EE781130-E85F-42C0-84D2-922CE46604CD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{19625575-916C-4A48-B7AA-FBFC51B68C05}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -133,6 +151,26 @@ Global {6A2B5C68-14C3-4989-8530-D51A138C72AE}.Debug|Any CPU.Build.0 = Debug|Any CPU {6A2B5C68-14C3-4989-8530-D51A138C72AE}.Release|Any CPU.ActiveCfg = Release|Any CPU {6A2B5C68-14C3-4989-8530-D51A138C72AE}.Release|Any CPU.Build.0 = Release|Any CPU + {34DD0132-4503-4F9F-85AA-DEBC1B6ACEC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {34DD0132-4503-4F9F-85AA-DEBC1B6ACEC6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {34DD0132-4503-4F9F-85AA-DEBC1B6ACEC6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {34DD0132-4503-4F9F-85AA-DEBC1B6ACEC6}.Release|Any CPU.Build.0 = Release|Any CPU + {997C37FF-FD71-4A5F-827C-09EB6568DAC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {997C37FF-FD71-4A5F-827C-09EB6568DAC9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {997C37FF-FD71-4A5F-827C-09EB6568DAC9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {997C37FF-FD71-4A5F-827C-09EB6568DAC9}.Release|Any CPU.Build.0 = Release|Any CPU + {C0FB3BB4-0A83-406B-AD72-6D172B4E349D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C0FB3BB4-0A83-406B-AD72-6D172B4E349D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C0FB3BB4-0A83-406B-AD72-6D172B4E349D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C0FB3BB4-0A83-406B-AD72-6D172B4E349D}.Release|Any CPU.Build.0 = Release|Any CPU + {1D206501-B05A-435E-9030-AC97151D9BF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1D206501-B05A-435E-9030-AC97151D9BF0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1D206501-B05A-435E-9030-AC97151D9BF0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1D206501-B05A-435E-9030-AC97151D9BF0}.Release|Any CPU.Build.0 = Release|Any CPU + {659C7947-E20D-4BC7-890B-D3ACFFB968CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {659C7947-E20D-4BC7-890B-D3ACFFB968CF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {659C7947-E20D-4BC7-890B-D3ACFFB968CF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {659C7947-E20D-4BC7-890B-D3ACFFB968CF}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -158,6 +196,14 @@ Global {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} + {34DD0132-4503-4F9F-85AA-DEBC1B6ACEC6} = {9A2475E4-53E1-4CF3-800C-8A52E56E9AA8} + {997C37FF-FD71-4A5F-827C-09EB6568DAC9} = {9A2475E4-53E1-4CF3-800C-8A52E56E9AA8} + {9A2475E4-53E1-4CF3-800C-8A52E56E9AA8} = {19625575-916C-4A48-B7AA-FBFC51B68C05} + {C0FB3BB4-0A83-406B-AD72-6D172B4E349D} = {08ED893A-F59D-436B-AD90-5C8CEC95D68D} + {1D206501-B05A-435E-9030-AC97151D9BF0} = {08ED893A-F59D-436B-AD90-5C8CEC95D68D} + {08ED893A-F59D-436B-AD90-5C8CEC95D68D} = {19625575-916C-4A48-B7AA-FBFC51B68C05} + {659C7947-E20D-4BC7-890B-D3ACFFB968CF} = {EE781130-E85F-42C0-84D2-922CE46604CD} + {EE781130-E85F-42C0-84D2-922CE46604CD} = {19625575-916C-4A48-B7AA-FBFC51B68C05} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {01DAF96B-AF8E-4576-A1BC-57D19BDB317E} diff --git a/src/libraries/System.Memory.Data/ref/System.Memory.Data.csproj b/src/libraries/System.Memory.Data/ref/System.Memory.Data.csproj index 93441df8b63633..7d9b3481ecd82a 100644 --- a/src/libraries/System.Memory.Data/ref/System.Memory.Data.csproj +++ b/src/libraries/System.Memory.Data/ref/System.Memory.Data.csproj @@ -1,4 +1,5 @@ + $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) @@ -8,11 +9,8 @@ - - - - + @@ -22,4 +20,5 @@ + diff --git a/src/libraries/System.Memory.Data/src/CompatibilitySuppressions.xml b/src/libraries/System.Memory.Data/src/CompatibilitySuppressions.xml index 8cf28d2972f7a4..4e5672384fdbfe 100644 --- a/src/libraries/System.Memory.Data/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Memory.Data/src/CompatibilitySuppressions.xml @@ -1,7 +1,6 @@  - CP0015 T:System.BinaryData:[T:System.Text.Json.Serialization.JsonConverterAttribute] diff --git a/src/libraries/System.Memory.Data/src/System.Memory.Data.csproj b/src/libraries/System.Memory.Data/src/System.Memory.Data.csproj index 639e4a3dfdf4fa..bdba59c0bcaaaf 100644 --- a/src/libraries/System.Memory.Data/src/System.Memory.Data.csproj +++ b/src/libraries/System.Memory.Data/src/System.Memory.Data.csproj @@ -1,4 +1,5 @@ + $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) true @@ -16,14 +17,11 @@ System.BinaryData - + + - - - - @@ -31,4 +29,5 @@ System.BinaryData + diff --git a/src/libraries/System.Memory.Data/src/System/BinaryDataConverter.cs b/src/libraries/System.Memory.Data/src/System/BinaryDataConverter.cs index aa144e0622b3de..f4c78399fa8195 100644 --- a/src/libraries/System.Memory.Data/src/System/BinaryDataConverter.cs +++ b/src/libraries/System.Memory.Data/src/System/BinaryDataConverter.cs @@ -8,6 +8,12 @@ namespace System.Text.Json.Serialization ///
public sealed class BinaryDataJsonConverter : JsonConverter { + /// + /// Initializes a new instance of the . + /// + public BinaryDataJsonConverter() + { } + /// public override BinaryData? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { diff --git a/src/libraries/System.Memory/System.Memory.sln b/src/libraries/System.Memory/System.Memory.sln index 3d8eeb58479d59..0a42d856783e9f 100644 --- a/src/libraries/System.Memory/System.Memory.sln +++ b/src/libraries/System.Memory/System.Memory.sln @@ -19,14 +19,34 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{B773D664-C00B-4DB3-823B-947576EE7A46}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C352AC7D-959D-431F-AF83-2CA506B70D59}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{9EB7CD91-D219-46C8-BBC2-946F783464FD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{F0E5B145-2F0F-4F11-A261-616F3DF8D3B1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{9487A961-D429-4BBF-9205-C00003F067EE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{800A865E-19E1-4BC1-936A-FFC10C11F723}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{5FC9F6FF-CB7A-4011-803D-36BBA7AE49EF}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{E09A57A2-B2DC-492A-915B-DD6EF4FD1F8A}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{FA259C32-B79B-4DE2-9677-055D5D25FA33}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{7212FBCF-E89D-4065-9DCE-D5F7E5D3EF1D}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C352AC7D-959D-431F-AF83-2CA506B70D59}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{2BEB1A89-DD2D-42BD-95DD-89860A0C9663}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{24985D32-AECC-4F31-A921-294FA81577F1}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{46EA57E0-CA55-47BE-B9E3-4943095E6DC7}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{D6E3917E-D969-4010-9BC3-49DCD551CFC4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{68DAD68A-562B-43A2-809F-22779FBD4BFF}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -265,21 +285,134 @@ Global {B773D664-C00B-4DB3-823B-947576EE7A46}.Checked|arm64.ActiveCfg = Debug|Any CPU {B773D664-C00B-4DB3-823B-947576EE7A46}.Checked|x64.ActiveCfg = Debug|Any CPU {B773D664-C00B-4DB3-823B-947576EE7A46}.Checked|x86.ActiveCfg = Debug|Any CPU + {9EB7CD91-D219-46C8-BBC2-946F783464FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9EB7CD91-D219-46C8-BBC2-946F783464FD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9EB7CD91-D219-46C8-BBC2-946F783464FD}.Debug|arm.ActiveCfg = Debug|Any CPU + {9EB7CD91-D219-46C8-BBC2-946F783464FD}.Debug|arm64.ActiveCfg = Debug|Any CPU + {9EB7CD91-D219-46C8-BBC2-946F783464FD}.Debug|x64.ActiveCfg = Debug|Any CPU + {9EB7CD91-D219-46C8-BBC2-946F783464FD}.Debug|x64.Build.0 = Debug|Any CPU + {9EB7CD91-D219-46C8-BBC2-946F783464FD}.Debug|x86.ActiveCfg = Debug|Any CPU + {9EB7CD91-D219-46C8-BBC2-946F783464FD}.Debug|x86.Build.0 = Debug|Any CPU + {9EB7CD91-D219-46C8-BBC2-946F783464FD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9EB7CD91-D219-46C8-BBC2-946F783464FD}.Release|Any CPU.Build.0 = Release|Any CPU + {9EB7CD91-D219-46C8-BBC2-946F783464FD}.Release|arm.ActiveCfg = Release|Any CPU + {9EB7CD91-D219-46C8-BBC2-946F783464FD}.Release|arm64.ActiveCfg = Release|Any CPU + {9EB7CD91-D219-46C8-BBC2-946F783464FD}.Release|x64.ActiveCfg = Release|Any CPU + {9EB7CD91-D219-46C8-BBC2-946F783464FD}.Release|x64.Build.0 = Release|Any CPU + {9EB7CD91-D219-46C8-BBC2-946F783464FD}.Release|x86.ActiveCfg = Release|Any CPU + {9EB7CD91-D219-46C8-BBC2-946F783464FD}.Release|x86.Build.0 = Release|Any CPU + {9EB7CD91-D219-46C8-BBC2-946F783464FD}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {9EB7CD91-D219-46C8-BBC2-946F783464FD}.Checked|arm.ActiveCfg = Debug|Any CPU + {9EB7CD91-D219-46C8-BBC2-946F783464FD}.Checked|arm64.ActiveCfg = Debug|Any CPU + {9EB7CD91-D219-46C8-BBC2-946F783464FD}.Checked|x64.ActiveCfg = Debug|Any CPU + {9EB7CD91-D219-46C8-BBC2-946F783464FD}.Checked|x86.ActiveCfg = Debug|Any CPU + {F0E5B145-2F0F-4F11-A261-616F3DF8D3B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F0E5B145-2F0F-4F11-A261-616F3DF8D3B1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F0E5B145-2F0F-4F11-A261-616F3DF8D3B1}.Debug|arm.ActiveCfg = Debug|Any CPU + {F0E5B145-2F0F-4F11-A261-616F3DF8D3B1}.Debug|arm64.ActiveCfg = Debug|Any CPU + {F0E5B145-2F0F-4F11-A261-616F3DF8D3B1}.Debug|x64.ActiveCfg = Debug|Any CPU + {F0E5B145-2F0F-4F11-A261-616F3DF8D3B1}.Debug|x64.Build.0 = Debug|Any CPU + {F0E5B145-2F0F-4F11-A261-616F3DF8D3B1}.Debug|x86.ActiveCfg = Debug|Any CPU + {F0E5B145-2F0F-4F11-A261-616F3DF8D3B1}.Debug|x86.Build.0 = Debug|Any CPU + {F0E5B145-2F0F-4F11-A261-616F3DF8D3B1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F0E5B145-2F0F-4F11-A261-616F3DF8D3B1}.Release|Any CPU.Build.0 = Release|Any CPU + {F0E5B145-2F0F-4F11-A261-616F3DF8D3B1}.Release|arm.ActiveCfg = Release|Any CPU + {F0E5B145-2F0F-4F11-A261-616F3DF8D3B1}.Release|arm64.ActiveCfg = Release|Any CPU + {F0E5B145-2F0F-4F11-A261-616F3DF8D3B1}.Release|x64.ActiveCfg = Release|Any CPU + {F0E5B145-2F0F-4F11-A261-616F3DF8D3B1}.Release|x64.Build.0 = Release|Any CPU + {F0E5B145-2F0F-4F11-A261-616F3DF8D3B1}.Release|x86.ActiveCfg = Release|Any CPU + {F0E5B145-2F0F-4F11-A261-616F3DF8D3B1}.Release|x86.Build.0 = Release|Any CPU + {F0E5B145-2F0F-4F11-A261-616F3DF8D3B1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {F0E5B145-2F0F-4F11-A261-616F3DF8D3B1}.Checked|arm.ActiveCfg = Debug|Any CPU + {F0E5B145-2F0F-4F11-A261-616F3DF8D3B1}.Checked|arm64.ActiveCfg = Debug|Any CPU + {F0E5B145-2F0F-4F11-A261-616F3DF8D3B1}.Checked|x64.ActiveCfg = Debug|Any CPU + {F0E5B145-2F0F-4F11-A261-616F3DF8D3B1}.Checked|x86.ActiveCfg = Debug|Any CPU + {9487A961-D429-4BBF-9205-C00003F067EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9487A961-D429-4BBF-9205-C00003F067EE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9487A961-D429-4BBF-9205-C00003F067EE}.Debug|arm.ActiveCfg = Debug|Any CPU + {9487A961-D429-4BBF-9205-C00003F067EE}.Debug|arm64.ActiveCfg = Debug|Any CPU + {9487A961-D429-4BBF-9205-C00003F067EE}.Debug|x64.ActiveCfg = Debug|Any CPU + {9487A961-D429-4BBF-9205-C00003F067EE}.Debug|x64.Build.0 = Debug|Any CPU + {9487A961-D429-4BBF-9205-C00003F067EE}.Debug|x86.ActiveCfg = Debug|Any CPU + {9487A961-D429-4BBF-9205-C00003F067EE}.Debug|x86.Build.0 = Debug|Any CPU + {9487A961-D429-4BBF-9205-C00003F067EE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9487A961-D429-4BBF-9205-C00003F067EE}.Release|Any CPU.Build.0 = Release|Any CPU + {9487A961-D429-4BBF-9205-C00003F067EE}.Release|arm.ActiveCfg = Release|Any CPU + {9487A961-D429-4BBF-9205-C00003F067EE}.Release|arm64.ActiveCfg = Release|Any CPU + {9487A961-D429-4BBF-9205-C00003F067EE}.Release|x64.ActiveCfg = Release|Any CPU + {9487A961-D429-4BBF-9205-C00003F067EE}.Release|x64.Build.0 = Release|Any CPU + {9487A961-D429-4BBF-9205-C00003F067EE}.Release|x86.ActiveCfg = Release|Any CPU + {9487A961-D429-4BBF-9205-C00003F067EE}.Release|x86.Build.0 = Release|Any CPU + {9487A961-D429-4BBF-9205-C00003F067EE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {9487A961-D429-4BBF-9205-C00003F067EE}.Checked|arm.ActiveCfg = Debug|Any CPU + {9487A961-D429-4BBF-9205-C00003F067EE}.Checked|arm64.ActiveCfg = Debug|Any CPU + {9487A961-D429-4BBF-9205-C00003F067EE}.Checked|x64.ActiveCfg = Debug|Any CPU + {9487A961-D429-4BBF-9205-C00003F067EE}.Checked|x86.ActiveCfg = Debug|Any CPU + {800A865E-19E1-4BC1-936A-FFC10C11F723}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {800A865E-19E1-4BC1-936A-FFC10C11F723}.Debug|Any CPU.Build.0 = Debug|Any CPU + {800A865E-19E1-4BC1-936A-FFC10C11F723}.Debug|arm.ActiveCfg = Debug|Any CPU + {800A865E-19E1-4BC1-936A-FFC10C11F723}.Debug|arm64.ActiveCfg = Debug|Any CPU + {800A865E-19E1-4BC1-936A-FFC10C11F723}.Debug|x64.ActiveCfg = Debug|Any CPU + {800A865E-19E1-4BC1-936A-FFC10C11F723}.Debug|x64.Build.0 = Debug|Any CPU + {800A865E-19E1-4BC1-936A-FFC10C11F723}.Debug|x86.ActiveCfg = Debug|Any CPU + {800A865E-19E1-4BC1-936A-FFC10C11F723}.Debug|x86.Build.0 = Debug|Any CPU + {800A865E-19E1-4BC1-936A-FFC10C11F723}.Release|Any CPU.ActiveCfg = Release|Any CPU + {800A865E-19E1-4BC1-936A-FFC10C11F723}.Release|Any CPU.Build.0 = Release|Any CPU + {800A865E-19E1-4BC1-936A-FFC10C11F723}.Release|arm.ActiveCfg = Release|Any CPU + {800A865E-19E1-4BC1-936A-FFC10C11F723}.Release|arm64.ActiveCfg = Release|Any CPU + {800A865E-19E1-4BC1-936A-FFC10C11F723}.Release|x64.ActiveCfg = Release|Any CPU + {800A865E-19E1-4BC1-936A-FFC10C11F723}.Release|x64.Build.0 = Release|Any CPU + {800A865E-19E1-4BC1-936A-FFC10C11F723}.Release|x86.ActiveCfg = Release|Any CPU + {800A865E-19E1-4BC1-936A-FFC10C11F723}.Release|x86.Build.0 = Release|Any CPU + {800A865E-19E1-4BC1-936A-FFC10C11F723}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {800A865E-19E1-4BC1-936A-FFC10C11F723}.Checked|arm.ActiveCfg = Debug|Any CPU + {800A865E-19E1-4BC1-936A-FFC10C11F723}.Checked|arm64.ActiveCfg = Debug|Any CPU + {800A865E-19E1-4BC1-936A-FFC10C11F723}.Checked|x64.ActiveCfg = Debug|Any CPU + {800A865E-19E1-4BC1-936A-FFC10C11F723}.Checked|x86.ActiveCfg = Debug|Any CPU + {5FC9F6FF-CB7A-4011-803D-36BBA7AE49EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5FC9F6FF-CB7A-4011-803D-36BBA7AE49EF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5FC9F6FF-CB7A-4011-803D-36BBA7AE49EF}.Debug|arm.ActiveCfg = Debug|Any CPU + {5FC9F6FF-CB7A-4011-803D-36BBA7AE49EF}.Debug|arm64.ActiveCfg = Debug|Any CPU + {5FC9F6FF-CB7A-4011-803D-36BBA7AE49EF}.Debug|x64.ActiveCfg = Debug|Any CPU + {5FC9F6FF-CB7A-4011-803D-36BBA7AE49EF}.Debug|x64.Build.0 = Debug|Any CPU + {5FC9F6FF-CB7A-4011-803D-36BBA7AE49EF}.Debug|x86.ActiveCfg = Debug|Any CPU + {5FC9F6FF-CB7A-4011-803D-36BBA7AE49EF}.Debug|x86.Build.0 = Debug|Any CPU + {5FC9F6FF-CB7A-4011-803D-36BBA7AE49EF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5FC9F6FF-CB7A-4011-803D-36BBA7AE49EF}.Release|Any CPU.Build.0 = Release|Any CPU + {5FC9F6FF-CB7A-4011-803D-36BBA7AE49EF}.Release|arm.ActiveCfg = Release|Any CPU + {5FC9F6FF-CB7A-4011-803D-36BBA7AE49EF}.Release|arm64.ActiveCfg = Release|Any CPU + {5FC9F6FF-CB7A-4011-803D-36BBA7AE49EF}.Release|x64.ActiveCfg = Release|Any CPU + {5FC9F6FF-CB7A-4011-803D-36BBA7AE49EF}.Release|x64.Build.0 = Release|Any CPU + {5FC9F6FF-CB7A-4011-803D-36BBA7AE49EF}.Release|x86.ActiveCfg = Release|Any CPU + {5FC9F6FF-CB7A-4011-803D-36BBA7AE49EF}.Release|x86.Build.0 = Release|Any CPU + {5FC9F6FF-CB7A-4011-803D-36BBA7AE49EF}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {5FC9F6FF-CB7A-4011-803D-36BBA7AE49EF}.Checked|arm.ActiveCfg = Debug|Any CPU + {5FC9F6FF-CB7A-4011-803D-36BBA7AE49EF}.Checked|arm64.ActiveCfg = Debug|Any CPU + {5FC9F6FF-CB7A-4011-803D-36BBA7AE49EF}.Checked|x64.ActiveCfg = Debug|Any CPU + {5FC9F6FF-CB7A-4011-803D-36BBA7AE49EF}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {7746BFD6-E6D6-4703-AA2D-43380B5DEA22} = {C352AC7D-959D-431F-AF83-2CA506B70D59} - {C9417154-D8DB-4FF9-9DD8-6B2ED351FC92} = {C352AC7D-959D-431F-AF83-2CA506B70D59} + {7746BFD6-E6D6-4703-AA2D-43380B5DEA22} = {E09A57A2-B2DC-492A-915B-DD6EF4FD1F8A} {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} + {C9417154-D8DB-4FF9-9DD8-6B2ED351FC92} = {C352AC7D-959D-431F-AF83-2CA506B70D59} {EFF00253-633C-4D2F-86EE-F40C721F6A68} = {2BEB1A89-DD2D-42BD-95DD-89860A0C9663} {84AD7BF6-D76C-4BEE-9879-5A23150DD3F7} = {2BEB1A89-DD2D-42BD-95DD-89860A0C9663} {DA7CEED7-1A86-4221-B4AD-4307AB83A31F} = {2BEB1A89-DD2D-42BD-95DD-89860A0C9663} + {9EB7CD91-D219-46C8-BBC2-946F783464FD} = {24985D32-AECC-4F31-A921-294FA81577F1} + {F0E5B145-2F0F-4F11-A261-616F3DF8D3B1} = {24985D32-AECC-4F31-A921-294FA81577F1} + {24985D32-AECC-4F31-A921-294FA81577F1} = {68DAD68A-562B-43A2-809F-22779FBD4BFF} + {9487A961-D429-4BBF-9205-C00003F067EE} = {46EA57E0-CA55-47BE-B9E3-4943095E6DC7} + {800A865E-19E1-4BC1-936A-FFC10C11F723} = {46EA57E0-CA55-47BE-B9E3-4943095E6DC7} + {46EA57E0-CA55-47BE-B9E3-4943095E6DC7} = {68DAD68A-562B-43A2-809F-22779FBD4BFF} + {5FC9F6FF-CB7A-4011-803D-36BBA7AE49EF} = {D6E3917E-D969-4010-9BC3-49DCD551CFC4} + {D6E3917E-D969-4010-9BC3-49DCD551CFC4} = {68DAD68A-562B-43A2-809F-22779FBD4BFF} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {65DB6A6B-0AAC-4BC2-A61A-641679771DC7} diff --git a/src/libraries/System.Memory/tests/Span/StringSearchValues.cs b/src/libraries/System.Memory/tests/Span/StringSearchValues.cs index 57c53d1e55730a..7494b5453e7afd 100644 --- a/src/libraries/System.Memory/tests/Span/StringSearchValues.cs +++ b/src/libraries/System.Memory/tests/Span/StringSearchValues.cs @@ -27,6 +27,7 @@ public static class StringSearchValuesTests [InlineData(StringComparison.OrdinalIgnoreCase, "a")] [InlineData(StringComparison.OrdinalIgnoreCase, "A")] [InlineData(StringComparison.OrdinalIgnoreCase, "A", "a")] + [InlineData(StringComparison.OrdinalIgnoreCase, "Ab", "Abc")] [InlineData(StringComparison.OrdinalIgnoreCase, "a", "Ab", "abc", "bC")] public static void Values_ImplementsSearchValuesBase(StringComparison comparisonType, params string[] values) { @@ -197,6 +198,7 @@ public static void IndexOfAny_InvalidUtf16() } [Fact] + [SkipOnPlatform(TestPlatforms.LinuxBionic, "Remote executor has problems with exit codes")] public static void IndexOfAny_CanProduceDifferentResultsUnderNls() { if (CanTestInvariantCulture) @@ -253,6 +255,7 @@ public static void TestIndexOfAny_RandomInputs() } [ConditionalFact(nameof(CanTestInvariantCulture))] + [SkipOnPlatform(TestPlatforms.LinuxBionic, "Remote executor has problems with exit codes")] public static void TestIndexOfAny_RandomInputs_InvariantCulture() { RunUsingInvariantCulture(static () => @@ -275,6 +278,7 @@ public static void TestIndexOfAny_RandomInputs_Nls() } [Fact] + [SkipOnPlatform(TestPlatforms.LinuxBionic, "Remote executor has problems with exit codes")] [ActiveIssue("Manual execution only. Worth running any time SearchValues logic is modified.")] public static void TestIndexOfAny_RandomInputs_Stress() { 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 719fd98b53b6a9..46003d8a3fb187 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 @@ -63,6 +63,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\Syst EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{BC7D3412-DBCB-4863-8BF8-41899E32608C}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{371E49E2-E922-4E89-AC56-30E18389BDB0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{12E7159F-D305-47A7-9943-0BF3F7950C87}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{DEFA64C6-C61E-4D60-9212-11EF368E80B7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{33FA9EA4-D65A-4C8C-909C-2E290621C172}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{CF44C8B9-7B38-4F80-B95C-99EB1E112A0F}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{A75027EA-199E-4C86-A636-AE9AE0F0756C}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{945B0700-C720-4775-B9E4-6A27DAA90190}" @@ -71,6 +81,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{2A66925D-365 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{5A418E02-B18A-41F1-9D4F-1BD6CB51F63C}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{0C6EA345-353C-4E9E-8983-7EA339ED3F62}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{76767690-169A-4B54-8FBD-D8FE1BA5CF1E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{50BB5C13-2E19-48FB-A9A5-670FCA495799}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{6B3CFFF1-46CC-47E3-9AB4-670B57969042}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -205,6 +223,26 @@ Global {BC7D3412-DBCB-4863-8BF8-41899E32608C}.Debug|Any CPU.Build.0 = Debug|Any CPU {BC7D3412-DBCB-4863-8BF8-41899E32608C}.Release|Any CPU.ActiveCfg = Release|Any CPU {BC7D3412-DBCB-4863-8BF8-41899E32608C}.Release|Any CPU.Build.0 = Release|Any CPU + {371E49E2-E922-4E89-AC56-30E18389BDB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {371E49E2-E922-4E89-AC56-30E18389BDB0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {371E49E2-E922-4E89-AC56-30E18389BDB0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {371E49E2-E922-4E89-AC56-30E18389BDB0}.Release|Any CPU.Build.0 = Release|Any CPU + {12E7159F-D305-47A7-9943-0BF3F7950C87}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {12E7159F-D305-47A7-9943-0BF3F7950C87}.Debug|Any CPU.Build.0 = Debug|Any CPU + {12E7159F-D305-47A7-9943-0BF3F7950C87}.Release|Any CPU.ActiveCfg = Release|Any CPU + {12E7159F-D305-47A7-9943-0BF3F7950C87}.Release|Any CPU.Build.0 = Release|Any CPU + {DEFA64C6-C61E-4D60-9212-11EF368E80B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DEFA64C6-C61E-4D60-9212-11EF368E80B7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DEFA64C6-C61E-4D60-9212-11EF368E80B7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DEFA64C6-C61E-4D60-9212-11EF368E80B7}.Release|Any CPU.Build.0 = Release|Any CPU + {33FA9EA4-D65A-4C8C-909C-2E290621C172}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {33FA9EA4-D65A-4C8C-909C-2E290621C172}.Debug|Any CPU.Build.0 = Debug|Any CPU + {33FA9EA4-D65A-4C8C-909C-2E290621C172}.Release|Any CPU.ActiveCfg = Release|Any CPU + {33FA9EA4-D65A-4C8C-909C-2E290621C172}.Release|Any CPU.Build.0 = Release|Any CPU + {CF44C8B9-7B38-4F80-B95C-99EB1E112A0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CF44C8B9-7B38-4F80-B95C-99EB1E112A0F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CF44C8B9-7B38-4F80-B95C-99EB1E112A0F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CF44C8B9-7B38-4F80-B95C-99EB1E112A0F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -242,6 +280,14 @@ Global {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} + {371E49E2-E922-4E89-AC56-30E18389BDB0} = {0C6EA345-353C-4E9E-8983-7EA339ED3F62} + {12E7159F-D305-47A7-9943-0BF3F7950C87} = {0C6EA345-353C-4E9E-8983-7EA339ED3F62} + {0C6EA345-353C-4E9E-8983-7EA339ED3F62} = {6B3CFFF1-46CC-47E3-9AB4-670B57969042} + {DEFA64C6-C61E-4D60-9212-11EF368E80B7} = {76767690-169A-4B54-8FBD-D8FE1BA5CF1E} + {33FA9EA4-D65A-4C8C-909C-2E290621C172} = {76767690-169A-4B54-8FBD-D8FE1BA5CF1E} + {76767690-169A-4B54-8FBD-D8FE1BA5CF1E} = {6B3CFFF1-46CC-47E3-9AB4-670B57969042} + {CF44C8B9-7B38-4F80-B95C-99EB1E112A0F} = {50BB5C13-2E19-48FB-A9A5-670FCA495799} + {50BB5C13-2E19-48FB-A9A5-670FCA495799} = {6B3CFFF1-46CC-47E3-9AB4-670B57969042} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {A121E5BA-D935-4572-8D67-2F15DF29922B} diff --git a/src/libraries/System.Net.Http.Json/ref/System.Net.Http.Json.csproj b/src/libraries/System.Net.Http.Json/ref/System.Net.Http.Json.csproj index 57157142666d27..6b6cd6ec4cb172 100644 --- a/src/libraries/System.Net.Http.Json/ref/System.Net.Http.Json.csproj +++ b/src/libraries/System.Net.Http.Json/ref/System.Net.Http.Json.csproj @@ -1,4 +1,5 @@ + $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) @@ -11,12 +12,9 @@ + - - - - @@ -32,4 +30,5 @@ + diff --git a/src/libraries/System.Net.Http.Json/src/PACKAGE.md b/src/libraries/System.Net.Http.Json/src/PACKAGE.md new file mode 100644 index 00000000000000..23fa95df54eccf --- /dev/null +++ b/src/libraries/System.Net.Http.Json/src/PACKAGE.md @@ -0,0 +1,50 @@ +## About + +Provides extension methods for `System.Net.Http.HttpClient` and `System.Net.Http.HttpContent` that facilitate serialization and deserialization of HTTP requests using System.Text.Json. + +## Key Features + +* Extension methods for deserializing HTTP response JSON bodies. +* Extension methods for serializing HTTP request JSON bodies. +* Extension methods for deserializing JSON from `HttpContent` instances. + +## How to Use + +```C# +using System.Net.Http.Json; + +using var client = new HttpClient(); + +// Get the list of all books +Book[] books = await client.GetFromJsonAsync("https://api.contoso.com/books"); + +// Send a POST request to add a new book +var book = new Book(id: 42, "Title", "Author", publishedYear: 2023); +HttpResponseMessage response = await client.PostAsJsonAsync($"https://api.contoso.com/books/{book.id}", book); + +if (response.IsSuccessStatusCode) + Console.WriteLine("Book added successfully."); +else + Console.WriteLine($"HTTP request failed with status code: {response.StatusCode}"); + +public record Book(int id, string title, string author, int publishedYear); +``` + +## Main Types + +The main types provided by this library are: + +* `HttpClientJsonExtensions` +* `HttpContentJsonExtensions` + +## Additional Documentation + +* [API documentation](https://learn.microsoft.com/dotnet/api/system.net.http.json) + +## Related Packages + +* [System.Text.Json](https://www.nuget.org/packages/System.Text.Json) + +## Feedback & Contributing + +System.Net.Http.Json is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). diff --git a/src/libraries/System.Net.Http.Json/src/System.Net.Http.Json.csproj b/src/libraries/System.Net.Http.Json/src/System.Net.Http.Json.csproj index 08375656e0598b..8e1a3dcc05f515 100644 --- a/src/libraries/System.Net.Http.Json/src/System.Net.Http.Json.csproj +++ b/src/libraries/System.Net.Http.Json/src/System.Net.Http.Json.csproj @@ -1,4 +1,5 @@ + $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) true @@ -27,29 +28,23 @@ System.Net.Http.Json.JsonContent
- - - - + + + + + + - - - - - - - - @@ -71,4 +66,5 @@ System.Net.Http.Json.JsonContent + diff --git a/src/libraries/System.Net.Http.Json/src/System/Net/Http/Json/HttpClientJsonExtensions.Delete.cs b/src/libraries/System.Net.Http.Json/src/System/Net/Http/Json/HttpClientJsonExtensions.Delete.cs index 6423144eacb4cb..645003c015a5f6 100644 --- a/src/libraries/System.Net.Http.Json/src/System/Net/Http/Json/HttpClientJsonExtensions.Delete.cs +++ b/src/libraries/System.Net.Http.Json/src/System/Net/Http/Json/HttpClientJsonExtensions.Delete.cs @@ -84,7 +84,7 @@ public static partial class HttpClientJsonExtensions /// The client used to send the request. /// The Uri the request is sent to. /// The type of the object to deserialize to and return. - /// Source generated JsonSerializerContext used to control the deserialization behavior. + /// The JsonSerializerContext used to control the deserialization behavior. /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// The task object representing the asynchronous operation. /// The is . @@ -97,7 +97,7 @@ public static partial class HttpClientJsonExtensions /// The client used to send the request. /// The Uri the request is sent to. /// The type of the object to deserialize to and return. - /// Source generated JsonSerializerContext used to control the deserialization behavior. + /// The JsonSerializerContext used to control the deserialization behavior. /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// The task object representing the asynchronous operation. /// The is . @@ -110,7 +110,7 @@ public static partial class HttpClientJsonExtensions /// The target type to deserialize to. /// The client used to send the request. /// The Uri the request is sent to. - /// Source generated JsonTypeInfo to control the behavior during deserialization. + /// The JsonTypeInfo used to control the deserialization behavior. /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// The task object representing the asynchronous operation. /// The is . @@ -123,7 +123,7 @@ public static partial class HttpClientJsonExtensions /// The target type to deserialize to. /// The client used to send the request. /// The Uri the request is sent to. - /// Source generated JsonTypeInfo to control the behavior during deserialization. + /// The JsonTypeInfo used to control the deserialization behavior. /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// The task object representing the asynchronous operation. /// The is . diff --git a/src/libraries/System.Net.Http.Json/src/System/Net/Http/Json/HttpClientJsonExtensions.Get.AsyncEnumerable.cs b/src/libraries/System.Net.Http.Json/src/System/Net/Http/Json/HttpClientJsonExtensions.Get.AsyncEnumerable.cs index 057bf872692c3c..95f67291c131b7 100644 --- a/src/libraries/System.Net.Http.Json/src/System/Net/Http/Json/HttpClientJsonExtensions.Get.AsyncEnumerable.cs +++ b/src/libraries/System.Net.Http.Json/src/System/Net/Http/Json/HttpClientJsonExtensions.Get.AsyncEnumerable.cs @@ -62,7 +62,7 @@ public static partial class HttpClientJsonExtensions /// The target type to deserialize to. /// The client used to send the request. /// The Uri the request is sent to. - /// Source generated JsonTypeInfo to control the behavior during deserialization. + /// The JsonTypeInfo used to control the behavior during deserialization. /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// An that represents the deserialized response body. /// The is . @@ -80,7 +80,7 @@ public static partial class HttpClientJsonExtensions /// The target type to deserialize to. /// The client used to send the request. /// The Uri the request is sent to. - /// Source generated JsonTypeInfo to control the behavior during deserialization. + /// The JsonTypeInfo used to control the behavior during deserialization. /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// An that represents the deserialized response body. /// The is . @@ -135,10 +135,7 @@ public static partial class HttpClientJsonExtensions JsonSerializerOptions? options, CancellationToken cancellationToken) { - options ??= JsonSerializerOptions.Default; - options.MakeReadOnly(); - - var jsonTypeInfo = (JsonTypeInfo)options.GetTypeInfo(typeof(TValue)); + var jsonTypeInfo = (JsonTypeInfo)JsonHelpers.GetJsonTypeInfo(typeof(TValue), options); return FromJsonStreamAsyncCore(client, requestUri, jsonTypeInfo, cancellationToken); } diff --git a/src/libraries/System.Net.Http.Json/src/System/Net/Http/Json/HttpClientJsonExtensions.Patch.cs b/src/libraries/System.Net.Http.Json/src/System/Net/Http/Json/HttpClientJsonExtensions.Patch.cs index b887011c92facc..4ed1ed590f3b46 100644 --- a/src/libraries/System.Net.Http.Json/src/System/Net/Http/Json/HttpClientJsonExtensions.Patch.cs +++ b/src/libraries/System.Net.Http.Json/src/System/Net/Http/Json/HttpClientJsonExtensions.Patch.cs @@ -96,7 +96,7 @@ public static Task PatchAsJsonAsync(this HttpClient /// The client used to send the request. /// The Uri the request is sent to. /// The value to serialize. - /// Metadata about the type to convert. + /// The JsonTypeInfo used to control the behavior during serialization. /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// The task object representing the asynchronous operation. /// The is null. @@ -118,7 +118,7 @@ public static Task PatchAsJsonAsync(this HttpClient /// The client used to send the request. /// The Uri the request is sent to. /// The value to serialize. - /// Metadata about the type to convert. + /// The JsonTypeInfo used to control the behavior during serialization. /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// The task object representing the asynchronous operation. /// The is null. diff --git a/src/libraries/System.Net.Http.Json/src/System/Net/Http/Json/HttpContentJsonExtensions.AsyncEnumerable.cs b/src/libraries/System.Net.Http.Json/src/System/Net/Http/Json/HttpContentJsonExtensions.AsyncEnumerable.cs index 9ea80231aafc23..ffe778352b9cb5 100644 --- a/src/libraries/System.Net.Http.Json/src/System/Net/Http/Json/HttpContentJsonExtensions.AsyncEnumerable.cs +++ b/src/libraries/System.Net.Http.Json/src/System/Net/Http/Json/HttpContentJsonExtensions.AsyncEnumerable.cs @@ -60,17 +60,18 @@ public static partial class HttpContentJsonExtensions return ReadFromJsonAsAsyncEnumerableCore(content, options, cancellationToken); } - [RequiresUnreferencedCode(SerializationUnreferencedCodeMessage)] - [RequiresDynamicCode(SerializationDynamicCodeMessage)] - private static IAsyncEnumerable ReadFromJsonAsAsyncEnumerableCore( - HttpContent content, - JsonSerializerOptions? options, - CancellationToken cancellationToken) - { - var jsonTypeInfo = (JsonTypeInfo)JsonHelpers.GetJsonTypeInfo(typeof(TValue), options); - return ReadFromJsonAsAsyncEnumerableCore(content, jsonTypeInfo, cancellationToken); - } - + /// + /// Reads the HTTP content and returns the value that results from deserializing the content as + /// JSON in an async enumerable operation. + /// + /// The target type to deserialize to. + /// The content to read from. + /// The JsonTypeInfo used to control the deserialization behavior. + /// + /// An that represents the deserialized response body. + /// + /// The is . + /// public static IAsyncEnumerable ReadFromJsonAsAsyncEnumerable( this HttpContent content, JsonTypeInfo jsonTypeInfo, @@ -84,6 +85,17 @@ public static partial class HttpContentJsonExtensions return ReadFromJsonAsAsyncEnumerableCore(content, jsonTypeInfo, cancellationToken); } + [RequiresUnreferencedCode(SerializationUnreferencedCodeMessage)] + [RequiresDynamicCode(SerializationDynamicCodeMessage)] + private static IAsyncEnumerable ReadFromJsonAsAsyncEnumerableCore( + HttpContent content, + JsonSerializerOptions? options, + CancellationToken cancellationToken) + { + var jsonTypeInfo = (JsonTypeInfo)JsonHelpers.GetJsonTypeInfo(typeof(TValue), options); + return ReadFromJsonAsAsyncEnumerableCore(content, jsonTypeInfo, cancellationToken); + } + private static async IAsyncEnumerable ReadFromJsonAsAsyncEnumerableCore( HttpContent content, JsonTypeInfo jsonTypeInfo, diff --git a/src/libraries/System.Net.Http.Json/src/System/Net/Http/Json/JsonContent.cs b/src/libraries/System.Net.Http.Json/src/System/Net/Http/Json/JsonContent.cs index 6cb464db10fd06..07a4b4c1c35cb2 100644 --- a/src/libraries/System.Net.Http.Json/src/System/Net/Http/Json/JsonContent.cs +++ b/src/libraries/System.Net.Http.Json/src/System/Net/Http/Json/JsonContent.cs @@ -32,11 +32,27 @@ private JsonContent( Headers.ContentType = mediaType ?? JsonHelpers.GetDefaultMediaType(); } + /// + /// Creates a new instance of the class that will contain the serialized as JSON. + /// + /// The type of the value to serialize. + /// The value to serialize. + /// The media type to use for the content. + /// Options to control the behavior during serialization, the default options are . + /// A instance. [RequiresUnreferencedCode(HttpContentJsonExtensions.SerializationUnreferencedCodeMessage)] [RequiresDynamicCode(HttpContentJsonExtensions.SerializationDynamicCodeMessage)] public static JsonContent Create(T inputValue, MediaTypeHeaderValue? mediaType = null, JsonSerializerOptions? options = null) => Create(inputValue, JsonHelpers.GetJsonTypeInfo(typeof(T), options), mediaType); + /// + /// Creates a new instance of the class that will contain the serialized as JSON. + /// + /// The value to serialize. + /// The type of the value to serialize. + /// The media type to use for the content. + /// Options to control the behavior during serialization, the default options are . + /// A instance. [RequiresUnreferencedCode(HttpContentJsonExtensions.SerializationUnreferencedCodeMessage)] [RequiresDynamicCode(HttpContentJsonExtensions.SerializationDynamicCodeMessage)] public static JsonContent Create(object? inputValue, Type inputType, MediaTypeHeaderValue? mediaType = null, JsonSerializerOptions? options = null) @@ -47,16 +63,29 @@ public static JsonContent Create(object? inputValue, Type inputType, MediaTypeHe return new JsonContent(inputValue, JsonHelpers.GetJsonTypeInfo(inputType, options), mediaType); } - public static JsonContent Create(T? inputValue, JsonTypeInfo jsonTypeInfo, - MediaTypeHeaderValue? mediaType = null) + /// + /// Creates a new instance of the class that will contain the serialized as JSON. + /// + /// The type of the value to serialize. + /// The value to serialize. + /// The JsonTypeInfo used to control the serialization behavior. + /// The media type to use for the content. + /// A instance. + public static JsonContent Create(T? inputValue, JsonTypeInfo jsonTypeInfo, MediaTypeHeaderValue? mediaType = null) { ThrowHelper.ThrowIfNull(jsonTypeInfo); return new JsonContent(inputValue, jsonTypeInfo, mediaType); } - public static JsonContent Create(object? inputValue, JsonTypeInfo jsonTypeInfo, - MediaTypeHeaderValue? mediaType = null) + /// + /// Creates a new instance of the class that will contain the serialized as JSON. + /// + /// The value to serialize. + /// The JsonTypeInfo used to control the serialization behavior. + /// The media type to use for the content. + /// A instance. + public static JsonContent Create(object? inputValue, JsonTypeInfo jsonTypeInfo, MediaTypeHeaderValue? mediaType = null) { ThrowHelper.ThrowIfNull(jsonTypeInfo); EnsureTypeCompatibility(inputValue, jsonTypeInfo.Type); diff --git a/src/libraries/System.Net.Http.Json/tests/FunctionalTests/HttpClientJsonExtensionsTests.cs b/src/libraries/System.Net.Http.Json/tests/FunctionalTests/HttpClientJsonExtensionsTests.cs index 328f28f1bbf1e3..fee02cc8822950 100644 --- a/src/libraries/System.Net.Http.Json/tests/FunctionalTests/HttpClientJsonExtensionsTests.cs +++ b/src/libraries/System.Net.Http.Json/tests/FunctionalTests/HttpClientJsonExtensionsTests.cs @@ -580,6 +580,43 @@ public async Task GetFromJsonAsAsyncEnumerable_EnforcesTimeoutOnInitialRequest() await Task.Delay(TimeSpan.FromMilliseconds(10)); } } + + [Fact] + public async Task GetFromJsonAsAsyncEnumerable_SerializerUsesCamelCase() + { + using var client = new HttpClient(new CustomResponseHandler((r, c) => + { + string json = """[{"value":1},{"value":2}]"""; + HttpResponseMessage response = new() + { + Content = new StringContent(json) + }; + return Task.FromResult(response); + })); + + await foreach (var m in client.GetFromJsonAsAsyncEnumerable("http://dummyUrl")) + { + Assert.True(m.Value > 0); + } + } + + [Fact] + public async Task GetFromJsonAsAsyncEnumerable_CustomSerializerOptions() + { + using var client = new HttpClient(new CustomResponseHandler((r, c) => + { + string json = """[{"Value":1},{"Value":2}]"""; + HttpResponseMessage response = new() + { + Content = new StringContent(json) + }; + return Task.FromResult(response); + })); + await foreach (var m in client.GetFromJsonAsAsyncEnumerable("http://dummyUrl", JsonSerializerOptions.Default)) + { + Assert.True(m.Value > 0); + } + } } } @@ -593,3 +630,8 @@ public CustomResponseHandler( protected override Task SendAsync( HttpRequestMessage request, CancellationToken cancellationToken) => _func(request, cancellationToken); } + +file sealed class TestModel +{ + public int Value { get; set; } +} \ No newline at end of file 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 6a67e74c3c52c0..c06a038d8688e4 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 @@ -71,6 +71,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\Syst EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{E470810A-BAF2-4B3C-92CB-72007B7F1B6A}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{32750AA0-0562-423B-9C11-8278517391EF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{A46F856D-817F-4D3E-90F6-0523CA249B99}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{84F9B0D2-F77F-4B39-A932-D94D22AE1434}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{FA756A2B-6F4B-47F2-9C18-9CB027D2B69B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{08F2746D-4DF3-408B-A85A-7F0CFC2FCAB6}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{6C66589E-2DB3-4635-BADA-9B6452327239}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{2F9A243D-B060-4BB2-A9E1-A9CB861328D9}" @@ -79,6 +89,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{49E09973-383 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{B8C52E24-376F-4E8D-AA8A-62E25C161863}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{AB5A3276-13E4-47A4-9793-A3C70FB9C27A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{FA5B8379-828E-4DDC-9431-62D5FC345C5C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{E9C99065-3C4D-46FF-9D5A-43259D5F99D6}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{F6F2F488-D5FC-4AED-B1C4-6E0B7BF9C825}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -229,6 +247,26 @@ Global {E470810A-BAF2-4B3C-92CB-72007B7F1B6A}.Debug|Any CPU.Build.0 = Debug|Any CPU {E470810A-BAF2-4B3C-92CB-72007B7F1B6A}.Release|Any CPU.ActiveCfg = Release|Any CPU {E470810A-BAF2-4B3C-92CB-72007B7F1B6A}.Release|Any CPU.Build.0 = Release|Any CPU + {32750AA0-0562-423B-9C11-8278517391EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {32750AA0-0562-423B-9C11-8278517391EF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {32750AA0-0562-423B-9C11-8278517391EF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {32750AA0-0562-423B-9C11-8278517391EF}.Release|Any CPU.Build.0 = Release|Any CPU + {A46F856D-817F-4D3E-90F6-0523CA249B99}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A46F856D-817F-4D3E-90F6-0523CA249B99}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A46F856D-817F-4D3E-90F6-0523CA249B99}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A46F856D-817F-4D3E-90F6-0523CA249B99}.Release|Any CPU.Build.0 = Release|Any CPU + {84F9B0D2-F77F-4B39-A932-D94D22AE1434}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {84F9B0D2-F77F-4B39-A932-D94D22AE1434}.Debug|Any CPU.Build.0 = Debug|Any CPU + {84F9B0D2-F77F-4B39-A932-D94D22AE1434}.Release|Any CPU.ActiveCfg = Release|Any CPU + {84F9B0D2-F77F-4B39-A932-D94D22AE1434}.Release|Any CPU.Build.0 = Release|Any CPU + {FA756A2B-6F4B-47F2-9C18-9CB027D2B69B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA756A2B-6F4B-47F2-9C18-9CB027D2B69B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA756A2B-6F4B-47F2-9C18-9CB027D2B69B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA756A2B-6F4B-47F2-9C18-9CB027D2B69B}.Release|Any CPU.Build.0 = Release|Any CPU + {08F2746D-4DF3-408B-A85A-7F0CFC2FCAB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {08F2746D-4DF3-408B-A85A-7F0CFC2FCAB6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {08F2746D-4DF3-408B-A85A-7F0CFC2FCAB6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {08F2746D-4DF3-408B-A85A-7F0CFC2FCAB6}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -270,6 +308,14 @@ Global {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} + {32750AA0-0562-423B-9C11-8278517391EF} = {AB5A3276-13E4-47A4-9793-A3C70FB9C27A} + {A46F856D-817F-4D3E-90F6-0523CA249B99} = {AB5A3276-13E4-47A4-9793-A3C70FB9C27A} + {AB5A3276-13E4-47A4-9793-A3C70FB9C27A} = {F6F2F488-D5FC-4AED-B1C4-6E0B7BF9C825} + {84F9B0D2-F77F-4B39-A932-D94D22AE1434} = {FA5B8379-828E-4DDC-9431-62D5FC345C5C} + {FA756A2B-6F4B-47F2-9C18-9CB027D2B69B} = {FA5B8379-828E-4DDC-9431-62D5FC345C5C} + {FA5B8379-828E-4DDC-9431-62D5FC345C5C} = {F6F2F488-D5FC-4AED-B1C4-6E0B7BF9C825} + {08F2746D-4DF3-408B-A85A-7F0CFC2FCAB6} = {E9C99065-3C4D-46FF-9D5A-43259D5F99D6} + {E9C99065-3C4D-46FF-9D5A-43259D5F99D6} = {F6F2F488-D5FC-4AED-B1C4-6E0B7BF9C825} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {F5BAF3DD-D05C-4DCC-BB36-16645CA1F151} diff --git a/src/libraries/System.Net.Http.WinHttpHandler/src/PACKAGE.md b/src/libraries/System.Net.Http.WinHttpHandler/src/PACKAGE.md new file mode 100644 index 00000000000000..dcc800e598728a --- /dev/null +++ b/src/libraries/System.Net.Http.WinHttpHandler/src/PACKAGE.md @@ -0,0 +1,48 @@ +## About + +This package provides an [`HttpMessageHandler`](https://learn.microsoft.com/dotnet/api/system.net.http.httpmessagehandler) implementation backed by [Windows HTTP Services (WinHTTP)](https://learn.microsoft.com/windows/win32/winhttp/winhttp-start-page). +While the use of the default `HttpClientHandler` is highly recommended for applications targeting modern .NET, `WinHttpHandler` might help migration scenarios by providing an alternative HTTP backend for Windows that works consistently accross .NET Framework and modern .NET. + +## Key Features + +* Enables sending *asynchronous* HTTP requests with `HttpClient` on Windows. +* Handles authentication and credentials. +* Exposes a subset of WinHTTP options as C# properties on `WinHttpHandler`. +* Use custom proxy. +* Handle cookies. + +## How to Use + +```C# +using System.Net; + +using WinHttpHandler handler = new() +{ + ServerCredentials = new NetworkCredential("usr", "pwd") +}; + +using HttpClient client = new(handler); +using HttpRequestMessage request = new(HttpMethod.Get, "https://httpbin.org/basic-auth/usr/pwd"); +using HttpResponseMessage response = await client.SendAsync(request); + +Console.WriteLine($"Status: {response.StatusCode}"); +if (response.IsSuccessStatusCode) +{ + string content = await response.Content.ReadAsStringAsync(); + Console.WriteLine(content); +} +``` + +## Main Types + +The main types provided by this library are: + +* `System.Net.Http.WinHttpHandler` + +## Additional Documentation + +* [API documentation](https://learn.microsoft.com/dotnet/api/system.net.http.winhttphandler) + +## Feedback & Contributing + +System.Net.Http.WinHttpHandler is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). diff --git a/src/libraries/System.Net.Http.WinHttpHandler/src/System.Net.Http.WinHttpHandler.csproj b/src/libraries/System.Net.Http.WinHttpHandler/src/System.Net.Http.WinHttpHandler.csproj index 404e965fd8f512..4ae07fa2f55bc7 100644 --- a/src/libraries/System.Net.Http.WinHttpHandler/src/System.Net.Http.WinHttpHandler.csproj +++ b/src/libraries/System.Net.Http.WinHttpHandler/src/System.Net.Http.WinHttpHandler.csproj @@ -101,19 +101,16 @@ System.Net.Http.WinHttpHandler Link="Common\System\IO\StreamHelpers.CopyValidation.cs" /> - - - - + Link="Common\DisableRuntimeMarshalling.cs" + Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'" /> - + + diff --git a/src/libraries/System.Net.Http/System.Net.Http.sln b/src/libraries/System.Net.Http/System.Net.Http.sln index 4f5ae88a840cfd..f92096dd362f4a 100644 --- a/src/libraries/System.Net.Http/System.Net.Http.sln +++ b/src/libraries/System.Net.Http/System.Net.Http.sln @@ -37,6 +37,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Net.Sockets", "..\Sy EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JSImportGenerator", "..\System.Runtime.InteropServices.JavaScript\gen\JSImportGenerator\JSImportGenerator.csproj", "{17069DE3-C00A-4A4C-9FAF-557F2E8A6197}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.InteropServices.JavaScript", "..\System.Runtime.InteropServices.JavaScript\ref\System.Runtime.InteropServices.JavaScript.csproj", "{AA7B5256-A933-4F5F-9E66-AFDADD386BAF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.InteropServices.JavaScript", "..\System.Runtime.InteropServices.JavaScript\src\System.Runtime.InteropServices.JavaScript.csproj", "{92D3020D-AB3C-44FC-BC22-ECFF8E83645D}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{FC847978-9218-451E-BD07-910E11D59AD1}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{98AA859A-14F1-465D-80D6-343A4075CC7B}" @@ -51,6 +55,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography", "..\System.Security.Cryptography\ref\System.Security.Cryptography.csproj", "{E33BB464-D65A-46DB-9BC1-836A5D126196}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{AA699427-03F4-4247-A537-0BFB872BD177}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{A9E863FB-3904-41CF-88D9-FEE8A0AE7D80}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{4A09D92F-DDA7-4FCF-9F8F-A5FBD4A5ADF8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{A9E8F328-3B36-4DE5-96AC-6625F2C12664}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{4D3B8DF2-580F-4DDC-B189-2CC2DA9CAA04}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{0656F36C-F261-4F5A-B3E1-2DBB9FA6CF10}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{3F6352E6-73F1-4E69-A3AD-7E9E7F9051AD}" @@ -59,6 +73,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{145B4B2E-5EF EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{7841027C-6B57-4756-A757-8B19ECA0D9C7}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{6A8E1C6E-AED3-4791-8A4E-2F984E96C675}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{21C29D7F-0441-4D31-8D83-56689F95B22A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{1328089C-8717-4A25-9F71-65D7D0ECA031}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{7016A2BA-7735-4FFB-9FFF-BB6A14A2CF9E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -141,6 +163,14 @@ Global {17069DE3-C00A-4A4C-9FAF-557F2E8A6197}.Debug|Any CPU.Build.0 = Debug|Any CPU {17069DE3-C00A-4A4C-9FAF-557F2E8A6197}.Release|Any CPU.ActiveCfg = Release|Any CPU {17069DE3-C00A-4A4C-9FAF-557F2E8A6197}.Release|Any CPU.Build.0 = Release|Any CPU + {AA7B5256-A933-4F5F-9E66-AFDADD386BAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AA7B5256-A933-4F5F-9E66-AFDADD386BAF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AA7B5256-A933-4F5F-9E66-AFDADD386BAF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AA7B5256-A933-4F5F-9E66-AFDADD386BAF}.Release|Any CPU.Build.0 = Release|Any CPU + {92D3020D-AB3C-44FC-BC22-ECFF8E83645D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {92D3020D-AB3C-44FC-BC22-ECFF8E83645D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {92D3020D-AB3C-44FC-BC22-ECFF8E83645D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {92D3020D-AB3C-44FC-BC22-ECFF8E83645D}.Release|Any CPU.Build.0 = Release|Any CPU {FC847978-9218-451E-BD07-910E11D59AD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FC847978-9218-451E-BD07-910E11D59AD1}.Debug|Any CPU.Build.0 = Debug|Any CPU {FC847978-9218-451E-BD07-910E11D59AD1}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -169,6 +199,26 @@ Global {E33BB464-D65A-46DB-9BC1-836A5D126196}.Debug|Any CPU.Build.0 = Debug|Any CPU {E33BB464-D65A-46DB-9BC1-836A5D126196}.Release|Any CPU.ActiveCfg = Release|Any CPU {E33BB464-D65A-46DB-9BC1-836A5D126196}.Release|Any CPU.Build.0 = Release|Any CPU + {AA699427-03F4-4247-A537-0BFB872BD177}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AA699427-03F4-4247-A537-0BFB872BD177}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AA699427-03F4-4247-A537-0BFB872BD177}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AA699427-03F4-4247-A537-0BFB872BD177}.Release|Any CPU.Build.0 = Release|Any CPU + {A9E863FB-3904-41CF-88D9-FEE8A0AE7D80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A9E863FB-3904-41CF-88D9-FEE8A0AE7D80}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A9E863FB-3904-41CF-88D9-FEE8A0AE7D80}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A9E863FB-3904-41CF-88D9-FEE8A0AE7D80}.Release|Any CPU.Build.0 = Release|Any CPU + {4A09D92F-DDA7-4FCF-9F8F-A5FBD4A5ADF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4A09D92F-DDA7-4FCF-9F8F-A5FBD4A5ADF8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4A09D92F-DDA7-4FCF-9F8F-A5FBD4A5ADF8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4A09D92F-DDA7-4FCF-9F8F-A5FBD4A5ADF8}.Release|Any CPU.Build.0 = Release|Any CPU + {A9E8F328-3B36-4DE5-96AC-6625F2C12664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A9E8F328-3B36-4DE5-96AC-6625F2C12664}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A9E8F328-3B36-4DE5-96AC-6625F2C12664}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A9E8F328-3B36-4DE5-96AC-6625F2C12664}.Release|Any CPU.Build.0 = Release|Any CPU + {4D3B8DF2-580F-4DDC-B189-2CC2DA9CAA04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4D3B8DF2-580F-4DDC-B189-2CC2DA9CAA04}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4D3B8DF2-580F-4DDC-B189-2CC2DA9CAA04}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4D3B8DF2-580F-4DDC-B189-2CC2DA9CAA04}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -190,16 +240,26 @@ Global {57E7FC2D-6403-4690-8FE3-7EE1EB642630} = {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} + {AA7B5256-A933-4F5F-9E66-AFDADD386BAF} = {3F6352E6-73F1-4E69-A3AD-7E9E7F9051AD} {DB976968-CBB9-4134-88C6-5E682D050809} = {3F6352E6-73F1-4E69-A3AD-7E9E7F9051AD} {F0316E81-8B9C-44F3-86F5-4C812F0734A3} = {3F6352E6-73F1-4E69-A3AD-7E9E7F9051AD} {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} {11F31E64-4000-47F3-AE19-C83EB4EC0ED8} = {145B4B2E-5EF8-46F2-A596-E1043BB22873} + {92D3020D-AB3C-44FC-BC22-ECFF8E83645D} = {145B4B2E-5EF8-46F2-A596-E1043BB22873} {17069DE3-C00A-4A4C-9FAF-557F2E8A6197} = {7841027C-6B57-4756-A757-8B19ECA0D9C7} {FC847978-9218-451E-BD07-910E11D59AD1} = {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} + {AA699427-03F4-4247-A537-0BFB872BD177} = {6A8E1C6E-AED3-4791-8A4E-2F984E96C675} + {A9E863FB-3904-41CF-88D9-FEE8A0AE7D80} = {6A8E1C6E-AED3-4791-8A4E-2F984E96C675} + {6A8E1C6E-AED3-4791-8A4E-2F984E96C675} = {7016A2BA-7735-4FFB-9FFF-BB6A14A2CF9E} + {4A09D92F-DDA7-4FCF-9F8F-A5FBD4A5ADF8} = {21C29D7F-0441-4D31-8D83-56689F95B22A} + {A9E8F328-3B36-4DE5-96AC-6625F2C12664} = {21C29D7F-0441-4D31-8D83-56689F95B22A} + {21C29D7F-0441-4D31-8D83-56689F95B22A} = {7016A2BA-7735-4FFB-9FFF-BB6A14A2CF9E} + {4D3B8DF2-580F-4DDC-B189-2CC2DA9CAA04} = {1328089C-8717-4A25-9F71-65D7D0ECA031} + {1328089C-8717-4A25-9F71-65D7D0ECA031} = {7016A2BA-7735-4FFB-9FFF-BB6A14A2CF9E} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {F1EF65A2-61B3-45A3-9CDE-BD62218BE447} diff --git a/src/libraries/System.Net.Http/src/ILLink/ILLink.Suppressions.Mobile.LibraryBuild.xml b/src/libraries/System.Net.Http/src/ILLink/ILLink.Suppressions.Mobile.LibraryBuild.xml deleted file mode 100644 index 7fd4d6a15a34fb..00000000000000 --- a/src/libraries/System.Net.Http/src/ILLink/ILLink.Suppressions.Mobile.LibraryBuild.xml +++ /dev/null @@ -1,269 +0,0 @@ - - - - - ILLink - IL2075 - member - M:System.Net.Http.HttpClientHandler.InvokeNativeHandlerMethod(System.String,System.Object[]) - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.GetUseCookies() - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.SetUseCookies(System.Boolean) - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.GetCookieContainer() - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.SetCookieContainer(System.Net.CookieContainer) - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.GetAllowAutoRedirect() - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.SetAllowAutoRedirect(System.Boolean) - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.GetCredentials() - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.SetCredentials(System.Net.ICredentials) - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.GetAutomaticDecompression() - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.SetAutomaticDecompression(System.Net.DecompressionMethods) - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.GetUseProxy() - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.SetUseProxy(System.Boolean) - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.GetProxy() - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.SetProxy(System.Net.IWebProxy) - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.GetPreAuthenticate() - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.SetPreAuthenticate(System.Boolean) - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.GetMaxAutomaticRedirections() - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.SetMaxAutomaticRedirections(System.Int32) - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.GetServerCertificateCustomValidationCallback - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.SetServerCertificateCustomValidationCallback(System.Func{System.Net.Http.HttpRequestMessage,System.Security.Cryptography.X509Certificates.X509Certificate2,System.Security.Cryptography.X509Certificates.X509Chain,System.Net.Security.SslPolicyErrors,System.Boolean}) - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.GetCheckCertificateRevocationList() - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.SetCheckCertificateRevocationList(System.Boolean) - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.GetClientCertificateOptions() - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.SetClientCertificateOptions(System.Net.Http.ClientCertificateOption) - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.GetClientCertificates() - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.GetDefaultProxyCredentials() - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.SetDefaultProxyCredentials(System.Net.ICredentials) - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.GetMaxConnectionsPerServer() - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.SetMaxConnectionsPerServer(System.Int32) - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.GetMaxResponseHeadersLength() - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.SetMaxResponseHeadersLength(System.Int32) - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.GetProperties() - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.GetSupportsAutomaticDecompression() - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.GetSupportsProxy() - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.GetSupportsRedirectConfiguration() - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.GetSslProtocols() - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - ILLink - IL2035 - member - M:System.Net.Http.HttpClientHandler.SetSslProtocols(System.Security.Authentication.SslProtocols) - The Xamarin.iOS and Mono.Android libraries are not present when running the trimmer analysis during our build. A consuming application will get a warning if these libraries aren't present when trimming the full app. - - - diff --git a/src/libraries/System.Net.Http/src/Resources/Strings.resx b/src/libraries/System.Net.Http/src/Resources/Strings.resx index ea9007d9ca6cca..ca69a570c984fc 100644 --- a/src/libraries/System.Net.Http/src/Resources/Strings.resx +++ b/src/libraries/System.Net.Http/src/Resources/Strings.resx @@ -534,6 +534,9 @@ Synchronous reads are not supported, use ReadAsync instead. + + Synchronous writes are not supported, use WriteAsync instead. + Failed to authenticate with the SOCKS server. diff --git a/src/libraries/System.Net.Http/src/System.Net.Http.csproj b/src/libraries/System.Net.Http/src/System.Net.Http.csproj index f9c229575e1214..67909e99ba391b 100644 --- a/src/libraries/System.Net.Http/src/System.Net.Http.csproj +++ b/src/libraries/System.Net.Http/src/System.Net.Http.csproj @@ -25,7 +25,6 @@ - @@ -316,11 +315,11 @@ - + - + - \ No newline at end of file + diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpHandler.cs b/src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpHandler.cs index 2cf419e72a5f7f..77468c70dd5cc5 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpHandler.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpHandler.cs @@ -15,6 +15,7 @@ namespace System.Net.Http // the JavaScript objects have thread affinity, it is necessary that the continuations run the same thread as the start of the async method. internal sealed class BrowserHttpHandler : HttpMessageHandler { + private static readonly HttpRequestOptionsKey EnableStreamingRequest = new HttpRequestOptionsKey("WebAssemblyEnableStreamingRequest"); private static readonly HttpRequestOptionsKey EnableStreamingResponse = new HttpRequestOptionsKey("WebAssemblyEnableStreamingResponse"); private static readonly HttpRequestOptionsKey> FetchOptions = new HttpRequestOptionsKey>("WebAssemblyFetchOptions"); private bool _allowAutoRedirect = HttpHandlerDefaults.DefaultAutomaticRedirection; @@ -132,25 +133,26 @@ private static async Task CallFetch(HttpRequestMessage reques List headerNames = new List(headerCount); List headerValues = new List(headerCount); JSObject abortController = BrowserHttpInterop.CreateAbortController(); - CancellationTokenRegistration? abortRegistration = cancellationToken.Register(() => + CancellationTokenRegistration abortRegistration = cancellationToken.Register(static s => { + JSObject _abortController = (JSObject)s!; #if FEATURE_WASM_THREADS - if (!abortController.IsDisposed) + if (!_abortController.IsDisposed) { - abortController.SynchronizationContext.Send(static (JSObject _abortController) => + _abortController.SynchronizationContext.Send(static (JSObject __abortController) => { - BrowserHttpInterop.AbortRequest(_abortController); - _abortController.Dispose(); - }, abortController); + BrowserHttpInterop.AbortRequest(__abortController); + __abortController.Dispose(); + }, _abortController); } #else - if (!abortController.IsDisposed) + if (!_abortController.IsDisposed) { - BrowserHttpInterop.AbortRequest(abortController); - abortController.Dispose(); + BrowserHttpInterop.AbortRequest(_abortController); + _abortController.Dispose(); } #endif - }); + }, abortController); try { if (request.RequestUri == null) @@ -207,43 +209,79 @@ private static async Task CallFetch(HttpRequestMessage reques } } - Task? promise; + JSObject? fetchResponse; cancellationToken.ThrowIfCancellationRequested(); if (request.Content != null) { - if (request.Content is StringContent) + bool streamingEnabled = false; + if (BrowserHttpInterop.SupportsStreamingRequest()) { - string body = await request.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(true); - cancellationToken.ThrowIfCancellationRequested(); + request.Options.TryGetValue(EnableStreamingRequest, out streamingEnabled); + } - promise = BrowserHttpInterop.Fetch(uri, headerNames.ToArray(), headerValues.ToArray(), optionNames, optionValues, abortController, body); + if (streamingEnabled) + { + using (JSObject transformStream = BrowserHttpInterop.CreateTransformStream()) + { + Task fetchPromise = BrowserHttpInterop.Fetch(uri, headerNames.ToArray(), headerValues.ToArray(), optionNames, optionValues, abortController, transformStream); + Task fetchTask = BrowserHttpInterop.CancelationHelper(fetchPromise, cancellationToken).AsTask(); // initialize fetch cancellation + + using (WasmHttpWriteStream stream = new WasmHttpWriteStream(transformStream)) + { + try + { + await request.Content.CopyToAsync(stream, cancellationToken).ConfigureAwait(true); + Task closePromise = BrowserHttpInterop.TransformStreamClose(transformStream); + await BrowserHttpInterop.CancelationHelper(closePromise, cancellationToken).ConfigureAwait(true); + } + catch (Exception) + { + BrowserHttpInterop.TransformStreamAbort(transformStream); + if (!abortController.IsDisposed) + { + BrowserHttpInterop.AbortRequest(abortController); + } + try + { + using (fetchResponse = await fetchTask.ConfigureAwait(true)) // observe exception + { + BrowserHttpInterop.AbortResponse(fetchResponse); + } + } + catch { /* ignore */ } + cancellationToken.ThrowIfCancellationRequested(); + throw; + } + } + + fetchResponse = await fetchTask.ConfigureAwait(true); + } } else { byte[] buffer = await request.Content.ReadAsByteArrayAsync(cancellationToken).ConfigureAwait(true); cancellationToken.ThrowIfCancellationRequested(); - promise = BrowserHttpInterop.Fetch(uri, headerNames.ToArray(), headerValues.ToArray(), optionNames, optionValues, abortController, buffer); + Task fetchPromise = BrowserHttpInterop.Fetch(uri, headerNames.ToArray(), headerValues.ToArray(), optionNames, optionValues, abortController, buffer); + fetchResponse = await BrowserHttpInterop.CancelationHelper(fetchPromise, cancellationToken).ConfigureAwait(true); } } else { - promise = BrowserHttpInterop.Fetch(uri, headerNames.ToArray(), headerValues.ToArray(), optionNames, optionValues, abortController); + Task fetchPromise = BrowserHttpInterop.Fetch(uri, headerNames.ToArray(), headerValues.ToArray(), optionNames, optionValues, abortController); + fetchResponse = await BrowserHttpInterop.CancelationHelper(fetchPromise, cancellationToken).ConfigureAwait(true); } - cancellationToken.ThrowIfCancellationRequested(); - JSObject fetchResponse = await BrowserHttpInterop.CancelationHelper(promise, cancellationToken, abortController, null).ConfigureAwait(true); - return new WasmFetchResponse(fetchResponse, abortController, abortRegistration.Value); + return new WasmFetchResponse(fetchResponse, abortController, abortRegistration); } - catch (JSException jse) + catch (Exception ex) { - throw new HttpRequestException(jse.Message, jse); - } - catch (Exception) - { - // this would also trigger abort - abortRegistration?.Dispose(); - abortController?.Dispose(); + abortRegistration.Dispose(); + abortController.Dispose(); + if (ex is JSException jse) + { + throw new HttpRequestException(jse.Message, jse); + } throw; } } @@ -312,6 +350,92 @@ static async Task Impl(HttpRequestMessage request, Cancella } } + internal sealed class WasmHttpWriteStream : Stream + { + private readonly JSObject _transformStream; + + public WasmHttpWriteStream(JSObject transformStream) + { + ArgumentNullException.ThrowIfNull(transformStream); + + _transformStream = transformStream; + } + + private Task WriteAsyncCore(ReadOnlyMemory buffer, CancellationToken cancellationToken) + { + cancellationToken.ThrowIfCancellationRequested(); +#if FEATURE_WASM_THREADS + return _transformStream.SynchronizationContext.Send(() => Impl(this, buffer, cancellationToken)); +#else + return Impl(this, buffer, cancellationToken); +#endif + static async Task Impl(WasmHttpWriteStream self, ReadOnlyMemory buffer, CancellationToken cancellationToken) + { + using (Buffers.MemoryHandle handle = buffer.Pin()) + { + Task writePromise = TransformStreamWriteUnsafe(self._transformStream, buffer, handle); + await BrowserHttpInterop.CancelationHelper(writePromise, cancellationToken).ConfigureAwait(true); + } + } + + static unsafe Task TransformStreamWriteUnsafe(JSObject transformStream, ReadOnlyMemory buffer, Buffers.MemoryHandle handle) + => BrowserHttpInterop.TransformStreamWrite(transformStream, (nint)handle.Pointer, buffer.Length); + } + + public override ValueTask WriteAsync(ReadOnlyMemory buffer, CancellationToken cancellationToken) + { + return new ValueTask(WriteAsyncCore(buffer, cancellationToken)); + } + + public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) + { + ValidateBufferArguments(buffer, offset, count); + return WriteAsyncCore(new ReadOnlyMemory(buffer, offset, count), cancellationToken); + } + + public override bool CanRead => false; + public override bool CanSeek => false; + public override bool CanWrite => true; + + protected override void Dispose(bool disposing) + { + _transformStream.Dispose(); + } + + public override void Flush() + { + } + + #region PlatformNotSupported + + public override long Position + { + get => throw new NotSupportedException(); + set => throw new NotSupportedException(); + } + public override long Length => throw new NotSupportedException(); + public override int Read(byte[] buffer, int offset, int count) + { + throw new NotSupportedException(); + } + + public override long Seek(long offset, SeekOrigin origin) + { + throw new NotSupportedException(); + } + + public override void SetLength(long value) + { + throw new NotSupportedException(); + } + + public override void Write(byte[] buffer, int offset, int count) + { + throw new NotSupportedException(SR.net_http_synchronous_writes_not_supported); + } + #endregion + } + internal sealed class WasmFetchResponse : IDisposable { #if FEATURE_WASM_THREADS @@ -414,7 +538,7 @@ private async ValueTask GetResponseData(CancellationToken cancellationTo #if FEATURE_WASM_THREADS } //lock #endif - _length = await BrowserHttpInterop.CancelationHelper(promise, cancellationToken, null, _fetchResponse.FetchResponse).ConfigureAwait(true); + _length = await BrowserHttpInterop.CancelationHelper(promise, cancellationToken, _fetchResponse.FetchResponse).ConfigureAwait(true); #if FEATURE_WASM_THREADS lock (_fetchResponse.ThisLock) { @@ -496,8 +620,6 @@ public override async ValueTask ReadAsync(Memory buffer, Cancellation { ArgumentNullException.ThrowIfNull(buffer, nameof(buffer)); _fetchResponse.ThrowIfDisposed(); - cancellationToken.ThrowIfCancellationRequested(); - #if FEATURE_WASM_THREADS return await _fetchResponse.FetchResponse!.SynchronizationContext.Send(() => Impl(this, buffer, cancellationToken)).ConfigureAwait(true); #else @@ -518,7 +640,7 @@ static async Task Impl(WasmHttpReadStream self, Memory buffer, Cancel #if FEATURE_WASM_THREADS } //lock #endif - int response = await BrowserHttpInterop.CancelationHelper(promise, cancellationToken, null, self._fetchResponse.FetchResponse).ConfigureAwait(true); + int response = await BrowserHttpInterop.CancelationHelper(promise, cancellationToken, self._fetchResponse.FetchResponse).ConfigureAwait(true); return response; } diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpInterop.cs b/src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpInterop.cs index 07bbf0f7145a8b..b942bccd4c760a 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpInterop.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpInterop.cs @@ -11,6 +11,9 @@ namespace System.Net.Http { internal static partial class BrowserHttpInterop { + [JSImport("INTERNAL.http_wasm_supports_streaming_request")] + public static partial bool SupportsStreamingRequest(); + [JSImport("INTERNAL.http_wasm_supports_streaming_response")] public static partial bool SupportsStreamingResponse(); @@ -25,6 +28,23 @@ public static partial void AbortRequest( public static partial void AbortResponse( JSObject fetchResponse); + [JSImport("INTERNAL.http_wasm_create_transform_stream")] + public static partial JSObject CreateTransformStream(); + + [JSImport("INTERNAL.http_wasm_transform_stream_write")] + public static partial Task TransformStreamWrite( + JSObject transformStream, + IntPtr bufferPtr, + int bufferLength); + + [JSImport("INTERNAL.http_wasm_transform_stream_close")] + public static partial Task TransformStreamClose( + JSObject transformStream); + + [JSImport("INTERNAL.http_wasm_transform_stream_abort")] + public static partial void TransformStreamAbort( + JSObject transformStream); + [JSImport("INTERNAL.http_wasm_get_response_header_names")] private static partial string[] _GetResponseHeaderNames( JSObject fetchResponse); @@ -49,6 +69,15 @@ public static void GetResponseHeaders(JSObject fetchResponse, HttpHeaders respos [JSImport("INTERNAL.http_wasm_fetch")] + public static partial Task Fetch( + string uri, + string[] headerNames, + string[] headerValues, + string[] optionNames, + [JSMarshalAs>] object?[] optionValues, + JSObject abortControler); + + [JSImport("INTERNAL.http_wasm_fetch_stream")] public static partial Task Fetch( string uri, string[] headerNames, @@ -56,7 +85,7 @@ public static partial Task Fetch( string[] optionNames, [JSMarshalAs>] object?[] optionValues, JSObject abortControler, - string? body = null); + JSObject transformStream); [JSImport("INTERNAL.http_wasm_fetch_bytes")] private static partial Task FetchBytes( @@ -67,8 +96,7 @@ private static partial Task FetchBytes( [JSMarshalAs>] object?[] optionValues, JSObject abortControler, IntPtr bodyPtr, - int bodyLength - ); + int bodyLength); public static unsafe Task Fetch(string uri, string[] headerNames, string[] headerValues, string[] optionNames, object?[] optionValues, JSObject abortControler, byte[] body) { @@ -94,30 +122,27 @@ public static partial int GetResponseBytes( [JSMarshalAs] Span buffer); - public static async ValueTask CancelationHelper(Task promise, CancellationToken cancellationToken, JSObject? abortController, JSObject? fetchResponse) + public static async ValueTask CancelationHelper(Task promise, CancellationToken cancellationToken, JSObject? fetchResponse = null) { if (promise.IsCompletedSuccessfully) { - return promise.Result; + return; } try { - using (var operationRegistration = cancellationToken.Register(() => + using (var operationRegistration = cancellationToken.Register(static s => { - CancelablePromise.CancelPromise(promise, static (JSObject? _fetchResponse, JSObject? _abortController) => + (Task _promise, JSObject? _fetchResponse) = ((Task, JSObject?))s!; + CancelablePromise.CancelPromise(_promise, static (JSObject? __fetchResponse) => { - if (_abortController != null) + if (__fetchResponse != null) { - AbortRequest(_abortController); + AbortResponse(__fetchResponse); } - if (_fetchResponse != null) - { - AbortResponse(_fetchResponse); - } - }, fetchResponse, abortController); - })) + }, _fetchResponse); + }, (promise, fetchResponse))) { - return await promise.ConfigureAwait(true); + await promise.ConfigureAwait(true); } } catch (OperationCanceledException oce) when (cancellationToken.IsCancellationRequested) @@ -137,6 +162,16 @@ public static async ValueTask CancelationHelper(Task promise, Cancellat throw new HttpRequestException(jse.Message, jse); } } + + public static async ValueTask CancelationHelper(Task promise, CancellationToken cancellationToken, JSObject? fetchResponse = null) + { + if (promise.IsCompletedSuccessfully) + { + return promise.Result; + } + await CancelationHelper((Task)promise, cancellationToken, fetchResponse).ConfigureAwait(true); + return await promise.ConfigureAwait(true); + } } } diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/HttpClientHandler.AnyMobile.InvokeNativeHandler.cs b/src/libraries/System.Net.Http/src/System/Net/Http/HttpClientHandler.AnyMobile.InvokeNativeHandler.cs index c11aa3a0c323f5..8f8c101b9e4a52 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/HttpClientHandler.AnyMobile.InvokeNativeHandler.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/HttpClientHandler.AnyMobile.InvokeNativeHandler.cs @@ -6,6 +6,8 @@ using System.Diagnostics.CodeAnalysis; using System.Net.Security; using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.ExceptionServices; using System.Security.Authentication; using System.Security.Cryptography.X509Certificates; @@ -16,135 +18,130 @@ public partial class HttpClientHandler : HttpMessageHandler private static MethodInfo? _nativeHandlerMethod; #if TARGET_ANDROID - private const string NativeHandlerType = "Xamarin.Android.Net.AndroidMessageHandler"; - private const string AssemblyName = "Mono.Android"; + private const string NativeHandlerType = "Xamarin.Android.Net.AndroidMessageHandler, Mono.Android"; private const string GetHttpMessageHandlerType = "Android.Runtime.AndroidEnvironment, Mono.Android"; #elif TARGET_IOS - private const string NativeHandlerType = "System.Net.Http.NSUrlSessionHandler"; - private const string AssemblyName = "Microsoft.iOS"; + private const string NativeHandlerType = "System.Net.Http.NSUrlSessionHandler, Microsoft.iOS"; private const string GetHttpMessageHandlerType = "ObjCRuntime.RuntimeOptions, Microsoft.iOS"; #elif TARGET_MACCATALYST - private const string NativeHandlerType = "System.Net.Http.NSUrlSessionHandler"; - private const string AssemblyName = "Microsoft.MacCatalyst"; + private const string NativeHandlerType = "System.Net.Http.NSUrlSessionHandler, Microsoft.MacCatalyst"; private const string GetHttpMessageHandlerType = "ObjCRuntime.RuntimeOptions, Microsoft.MacCatalyst"; #elif TARGET_TVOS - private const string NativeHandlerType = "System.Net.Http.NSUrlSessionHandler"; - private const string AssemblyName = "Microsoft.tvOS"; + private const string NativeHandlerType = "System.Net.Http.NSUrlSessionHandler, Microsoft.tvOS"; private const string GetHttpMessageHandlerType = "ObjCRuntime.RuntimeOptions, Microsoft.tvOS"; #else #error Unknown target #endif - [DynamicDependency("get_DefaultProxyCredentials", NativeHandlerType, AssemblyName)] - private ICredentials? GetDefaultProxyCredentials() => (ICredentials?)InvokeNativeHandlerMethod("get_DefaultProxyCredentials"); + private ICredentials? GetDefaultProxyCredentials() + => (ICredentials?)InvokeNativeHandlerGetter(() => Type.GetType(NativeHandlerType)!.GetMethod("get_DefaultProxyCredentials")!); - [DynamicDependency("set_DefaultProxyCredentials", NativeHandlerType, AssemblyName)] - private void SetDefaultProxyCredentials(ICredentials? value) => InvokeNativeHandlerMethod("set_DefaultProxyCredentials", value); + private void SetDefaultProxyCredentials(ICredentials? value) + => InvokeNativeHandlerSetter(() => Type.GetType(NativeHandlerType)!.GetMethod("set_DefaultProxyCredentials")!, value); - [DynamicDependency("get_MaxConnectionsPerServer", NativeHandlerType, AssemblyName)] - private int GetMaxConnectionsPerServer() => (int)InvokeNativeHandlerMethod("get_MaxConnectionsPerServer"); + private int GetMaxConnectionsPerServer() + => (int)InvokeNativeHandlerGetter(() => Type.GetType(NativeHandlerType)!.GetMethod("get_MaxConnectionsPerServer")!); - [DynamicDependency("set_MaxConnectionsPerServer", NativeHandlerType, AssemblyName)] - private void SetMaxConnectionsPerServer(int value) => InvokeNativeHandlerMethod("set_MaxConnectionsPerServer", value); + private void SetMaxConnectionsPerServer(int value) + => InvokeNativeHandlerSetter(() => Type.GetType(NativeHandlerType)!.GetMethod("set_MaxConnectionsPerServer")!, value); - [DynamicDependency("get_MaxResponseHeadersLength", NativeHandlerType, AssemblyName)] - private int GetMaxResponseHeadersLength() => (int)InvokeNativeHandlerMethod("get_MaxResponseHeadersLength"); + private int GetMaxResponseHeadersLength() + => (int)InvokeNativeHandlerGetter(() => Type.GetType(NativeHandlerType)!.GetMethod("get_MaxResponseHeadersLength")!); - [DynamicDependency("set_MaxResponseHeadersLength", NativeHandlerType, AssemblyName)] - private void SetMaxResponseHeadersLength(int value) => InvokeNativeHandlerMethod("set_MaxResponseHeadersLength", value); + private void SetMaxResponseHeadersLength(int value) + => InvokeNativeHandlerSetter(() => Type.GetType(NativeHandlerType)!.GetMethod("set_MaxResponseHeadersLength")!, value); - [DynamicDependency("get_ClientCertificateOptions", NativeHandlerType, AssemblyName)] - private ClientCertificateOption GetClientCertificateOptions() => (ClientCertificateOption)InvokeNativeHandlerMethod("get_ClientCertificateOptions"); + private ClientCertificateOption GetClientCertificateOptions() + => (ClientCertificateOption)InvokeNativeHandlerGetter(() => Type.GetType(NativeHandlerType)!.GetMethod("get_ClientCertificateOptions")!); - [DynamicDependency("set_ClientCertificateOptions", NativeHandlerType, AssemblyName)] - private void SetClientCertificateOptions(ClientCertificateOption value) => InvokeNativeHandlerMethod("set_ClientCertificateOptions", value); + private void SetClientCertificateOptions(ClientCertificateOption value) + => InvokeNativeHandlerSetter(() => Type.GetType(NativeHandlerType)!.GetMethod("set_ClientCertificateOptions")!, value); - [DynamicDependency("get_ClientCertificates", NativeHandlerType, AssemblyName)] - private X509CertificateCollection GetClientCertificates() => (X509CertificateCollection)InvokeNativeHandlerMethod("get_ClientCertificates"); + private X509CertificateCollection GetClientCertificates() + => (X509CertificateCollection)InvokeNativeHandlerGetter(() => Type.GetType(NativeHandlerType)!.GetMethod("get_ClientCertificates")!); - [DynamicDependency("get_ServerCertificateCustomValidationCallback", NativeHandlerType, AssemblyName)] - private Func GetServerCertificateCustomValidationCallback() => (Func)InvokeNativeHandlerMethod("get_ServerCertificateCustomValidationCallback"); + private Func GetServerCertificateCustomValidationCallback() + => (Func)InvokeNativeHandlerGetter(() => Type.GetType(NativeHandlerType)!.GetMethod("get_ServerCertificateCustomValidationCallback")!); - [DynamicDependency("set_ServerCertificateCustomValidationCallback", NativeHandlerType, AssemblyName)] - private void SetServerCertificateCustomValidationCallback(Func? value) => InvokeNativeHandlerMethod("set_ServerCertificateCustomValidationCallback", value); + private void SetServerCertificateCustomValidationCallback(Func? value) + => InvokeNativeHandlerSetter(() => Type.GetType(NativeHandlerType)!.GetMethod("set_ServerCertificateCustomValidationCallback")!, value); - [DynamicDependency("get_CheckCertificateRevocationList", NativeHandlerType, AssemblyName)] - private bool GetCheckCertificateRevocationList() => (bool)InvokeNativeHandlerMethod("get_CheckCertificateRevocationList"); + private bool GetCheckCertificateRevocationList() + => (bool)InvokeNativeHandlerGetter(() => Type.GetType(NativeHandlerType)!.GetMethod("get_CheckCertificateRevocationList")!); - [DynamicDependency("set_CheckCertificateRevocationList", NativeHandlerType, AssemblyName)] - private void SetCheckCertificateRevocationList(bool value) => InvokeNativeHandlerMethod("set_CheckCertificateRevocationList", value); + private void SetCheckCertificateRevocationList(bool value) + => InvokeNativeHandlerSetter(() => Type.GetType(NativeHandlerType)!.GetMethod("set_CheckCertificateRevocationList")!, value); - [DynamicDependency("get_SslProtocols", NativeHandlerType, AssemblyName)] - private SslProtocols GetSslProtocols() => (SslProtocols)InvokeNativeHandlerMethod("get_SslProtocols"); + private SslProtocols GetSslProtocols() + => (SslProtocols)InvokeNativeHandlerGetter(() => Type.GetType(NativeHandlerType)!.GetMethod("get_SslProtocols")!); - [DynamicDependency("set_SslProtocols", NativeHandlerType, AssemblyName)] - private void SetSslProtocols(SslProtocols value) => InvokeNativeHandlerMethod("set_SslProtocols", value); + private void SetSslProtocols(SslProtocols value) + => InvokeNativeHandlerSetter(() => Type.GetType(NativeHandlerType)!.GetMethod("set_SslProtocols")!, value); - [DynamicDependency("get_Properties", NativeHandlerType, AssemblyName)] - private IDictionary GetProperties() => (IDictionary)InvokeNativeHandlerMethod("get_Properties"); + private IDictionary GetProperties() + => (IDictionary)InvokeNativeHandlerGetter(() => Type.GetType(NativeHandlerType)!.GetMethod("get_Properties")!); - [DynamicDependency("get_SupportsAutomaticDecompression", NativeHandlerType, AssemblyName)] - private bool GetSupportsAutomaticDecompression() => (bool)InvokeNativeHandlerMethod("get_SupportsAutomaticDecompression"); + private bool GetSupportsAutomaticDecompression() + => (bool)InvokeNativeHandlerGetter(() => Type.GetType(NativeHandlerType)!.GetMethod("get_SupportsAutomaticDecompression")!); - [DynamicDependency("get_SupportsProxy", NativeHandlerType, AssemblyName)] - private bool GetSupportsProxy() => (bool)InvokeNativeHandlerMethod("get_SupportsProxy"); + private bool GetSupportsProxy() + => (bool)InvokeNativeHandlerGetter(() => Type.GetType(NativeHandlerType)!.GetMethod("get_SupportsProxy")!); - [DynamicDependency("get_SupportsRedirectConfiguration", NativeHandlerType, AssemblyName)] - private bool GetSupportsRedirectConfiguration() => (bool)InvokeNativeHandlerMethod("get_SupportsRedirectConfiguration"); + private bool GetSupportsRedirectConfiguration() + => (bool)InvokeNativeHandlerGetter(() => Type.GetType(NativeHandlerType)!.GetMethod("get_SupportsRedirectConfiguration")!); - [DynamicDependency("get_AutomaticDecompression", NativeHandlerType, AssemblyName)] - private DecompressionMethods GetAutomaticDecompression() => (DecompressionMethods)InvokeNativeHandlerMethod("get_AutomaticDecompression"); + private DecompressionMethods GetAutomaticDecompression() + => (DecompressionMethods)InvokeNativeHandlerGetter(() => Type.GetType(NativeHandlerType)!.GetMethod("get_AutomaticDecompression")!); - [DynamicDependency("set_AutomaticDecompression", NativeHandlerType, AssemblyName)] - private void SetAutomaticDecompression(DecompressionMethods value) => InvokeNativeHandlerMethod("set_AutomaticDecompression", value); + private void SetAutomaticDecompression(DecompressionMethods value) + => InvokeNativeHandlerSetter(() => Type.GetType(NativeHandlerType)!.GetMethod("set_AutomaticDecompression")!, value); - [DynamicDependency("get_UseProxy", NativeHandlerType, AssemblyName)] - private bool GetUseProxy() => (bool)InvokeNativeHandlerMethod("get_UseProxy"); + private bool GetUseProxy() + => (bool)InvokeNativeHandlerGetter(() => Type.GetType(NativeHandlerType)!.GetMethod("get_UseProxy")!); - [DynamicDependency("set_UseProxy", NativeHandlerType, AssemblyName)] - private void SetUseProxy(bool value) => InvokeNativeHandlerMethod("set_UseProxy", value); + private void SetUseProxy(bool value) + => InvokeNativeHandlerSetter(() => Type.GetType(NativeHandlerType)!.GetMethod("set_UseProxy")!, value); - [DynamicDependency("get_Proxy", NativeHandlerType, AssemblyName)] - private IWebProxy GetProxy() => (IWebProxy)InvokeNativeHandlerMethod("get_Proxy"); + private IWebProxy GetProxy() + => (IWebProxy)InvokeNativeHandlerGetter(() => Type.GetType(NativeHandlerType)!.GetMethod("get_Proxy")!); - [DynamicDependency("set_Proxy", NativeHandlerType, AssemblyName)] - private void SetProxy(IWebProxy value) => InvokeNativeHandlerMethod("set_Proxy", value); + private void SetProxy(IWebProxy value) + => InvokeNativeHandlerSetter(() => Type.GetType(NativeHandlerType)!.GetMethod("set_Proxy")!, value); - [DynamicDependency("get_PreAuthenticate", NativeHandlerType, AssemblyName)] - private bool GetPreAuthenticate() => (bool)InvokeNativeHandlerMethod("get_PreAuthenticate"); + private bool GetPreAuthenticate() + => (bool)InvokeNativeHandlerGetter(() => Type.GetType(NativeHandlerType)!.GetMethod("get_PreAuthenticate")!); - [DynamicDependency("set_PreAuthenticate", NativeHandlerType, AssemblyName)] - private void SetPreAuthenticate(bool value) => InvokeNativeHandlerMethod("set_PreAuthenticate", value); + private void SetPreAuthenticate(bool value) + => InvokeNativeHandlerSetter(() => Type.GetType(NativeHandlerType)!.GetMethod("set_PreAuthenticate")!, value); - [DynamicDependency("get_MaxAutomaticRedirections", NativeHandlerType, AssemblyName)] - private int GetMaxAutomaticRedirections() => (int)InvokeNativeHandlerMethod("get_MaxAutomaticRedirections"); + private int GetMaxAutomaticRedirections() + => (int)InvokeNativeHandlerGetter(() => Type.GetType(NativeHandlerType)!.GetMethod("get_MaxAutomaticRedirections")!); - [DynamicDependency("set_MaxAutomaticRedirections", NativeHandlerType, AssemblyName)] - private void SetMaxAutomaticRedirections(int value) => InvokeNativeHandlerMethod("set_MaxAutomaticRedirections", value); + private void SetMaxAutomaticRedirections(int value) + => InvokeNativeHandlerSetter(() => Type.GetType(NativeHandlerType)!.GetMethod("set_MaxAutomaticRedirections")!, value); - [DynamicDependency("get_UseCookies", NativeHandlerType, AssemblyName)] - private bool GetUseCookies() => (bool)InvokeNativeHandlerMethod("get_UseCookies"); + private bool GetUseCookies() => (bool)InvokeNativeHandlerGetter(() => Type.GetType(NativeHandlerType)!.GetMethod("get_UseCookies")!); - [DynamicDependency("set_UseCookies", NativeHandlerType, AssemblyName)] - private void SetUseCookies(bool value) => InvokeNativeHandlerMethod("set_UseCookies", value); + private void SetUseCookies(bool value) + => InvokeNativeHandlerSetter(() => Type.GetType(NativeHandlerType)!.GetMethod("set_UseCookies")!, value); - [DynamicDependency("get_CookieContainer", NativeHandlerType, AssemblyName)] - private CookieContainer GetCookieContainer() => (CookieContainer)InvokeNativeHandlerMethod("get_CookieContainer"); + private CookieContainer GetCookieContainer() + => (CookieContainer)InvokeNativeHandlerGetter(() => Type.GetType(NativeHandlerType)!.GetMethod("get_CookieContainer")!); - [DynamicDependency("set_CookieContainer", NativeHandlerType, AssemblyName)] - private void SetCookieContainer(CookieContainer value) => InvokeNativeHandlerMethod("set_CookieContainer", value); + private void SetCookieContainer(CookieContainer value) + => InvokeNativeHandlerSetter(() => Type.GetType(NativeHandlerType)!.GetMethod("set_CookieContainer")!, value); - [DynamicDependency("get_AllowAutoRedirect", NativeHandlerType, AssemblyName)] - private bool GetAllowAutoRedirect() => (bool)InvokeNativeHandlerMethod("get_AllowAutoRedirect"); + private bool GetAllowAutoRedirect() + => (bool)InvokeNativeHandlerGetter(() => Type.GetType(NativeHandlerType)!.GetMethod("get_AllowAutoRedirect")!); - [DynamicDependency("set_AllowAutoRedirect", NativeHandlerType, AssemblyName)] - private void SetAllowAutoRedirect(bool value) => InvokeNativeHandlerMethod("set_AllowAutoRedirect", value); + private void SetAllowAutoRedirect(bool value) + => InvokeNativeHandlerSetter(() => Type.GetType(NativeHandlerType)!.GetMethod("set_AllowAutoRedirect")!, value); - [DynamicDependency("get_Credentials", NativeHandlerType, AssemblyName)] - private ICredentials GetCredentials() => (ICredentials)InvokeNativeHandlerMethod("get_Credentials"); + private ICredentials GetCredentials() + => (ICredentials)InvokeNativeHandlerGetter(() => Type.GetType(NativeHandlerType)!.GetMethod("get_Credentials")!); - [DynamicDependency("set_Credentials", NativeHandlerType, AssemblyName)] - private void SetCredentials(ICredentials? value) => InvokeNativeHandlerMethod("set_Credentials", value); + private void SetCredentials(ICredentials? value) + => InvokeNativeHandlerSetter(() => Type.GetType(NativeHandlerType)!.GetMethod("set_Credentials")!, value); private static HttpMessageHandler CreateNativeHandler() { @@ -156,5 +153,36 @@ private static HttpMessageHandler CreateNativeHandler() return (HttpMessageHandler)_nativeHandlerMethod!.Invoke(null, null)!; } + + private object InvokeNativeHandlerGetter(Func getMethod, [CallerMemberName] string? cachingKey = null) + { + return InvokeNativeHandlerMethod(getMethod, parameters: null, cachingKey!); + } + + private void InvokeNativeHandlerSetter(Func getMethod, object? value, [CallerMemberName] string? cachingKey = null) + { + InvokeNativeHandlerMethod(getMethod, parameters: new object?[] { value }, cachingKey!); + } + + private object InvokeNativeHandlerMethod(Func getMethod, object?[]? parameters, string cachingKey) + { + MethodInfo? method; + + if (!s_cachedMethods.TryGetValue(cachingKey, out method)) + { + method = getMethod(); + s_cachedMethods[cachingKey] = method; + } + + try + { + return method!.Invoke(_nativeHandler, parameters)!; + } + catch (TargetInvocationException e) + { + ExceptionDispatchInfo.Capture(e.InnerException!).Throw(); + throw; + } + } } } diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/HttpClientHandler.AnyMobile.cs b/src/libraries/System.Net.Http/src/System/Net/Http/HttpClientHandler.AnyMobile.cs index d1b3db12b8ed1c..dd7d005dbc3c27 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/HttpClientHandler.AnyMobile.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/HttpClientHandler.AnyMobile.cs @@ -4,12 +4,12 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Diagnostics.Metrics; using System.Globalization; using System.Net.Http.Metrics; using System.Net.Security; using System.Reflection; -using System.Runtime.ExceptionServices; using System.Runtime.Versioning; using System.Security.Authentication; using System.Security.Cryptography.X509Certificates; @@ -796,27 +796,6 @@ private void ThrowForModifiedManagedSslOptionsIfStarted() _socketHandler!.SslOptions = _socketHandler!.SslOptions; } - private object InvokeNativeHandlerMethod(string name, params object?[] parameters) - { - MethodInfo? method; - - if (!s_cachedMethods.TryGetValue(name, out method)) - { - method = _nativeHandler!.GetType()!.GetMethod(name); - s_cachedMethods[name] = method; - } - - try - { - return method!.Invoke(_nativeHandler, parameters)!; - } - catch (TargetInvocationException e) - { - ExceptionDispatchInfo.Capture(e.InnerException!).Throw(); - throw; - } - } - private static bool IsNativeHandlerEnabled => RuntimeSettingParser.QueryRuntimeSettingSwitch( "System.Net.Http.UseNativeHttpHandler", false); diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/Metrics/MetricsHandler.cs b/src/libraries/System.Net.Http/src/System/Net/Http/Metrics/MetricsHandler.cs index 3c34e43011938e..1f353f167150e5 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/Metrics/MetricsHandler.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/Metrics/MetricsHandler.cs @@ -112,11 +112,12 @@ private void RequestStop(HttpRequestMessage request, HttpResponseMessage? respon tags.Add("http.response.status_code", GetBoxedStatusCode((int)response.StatusCode)); tags.Add("network.protocol.version", GetProtocolVersionString(response.Version)); } - else + + if (TryGetErrorType(response, exception, out string? errorType)) { - Debug.Assert(exception is not null); - tags.Add("http.error.reason", GetErrorReason(exception)); + tags.Add("error.type", errorType); } + TimeSpan durationTime = Stopwatch.GetElapsedTime(startTimestamp, Stopwatch.GetTimestamp()); HttpMetricsEnrichmentContext? enrichmentContext = HttpMetricsEnrichmentContext.GetEnrichmentContextForRequest(request); @@ -130,37 +131,47 @@ private void RequestStop(HttpRequestMessage request, HttpResponseMessage? respon } } - private static string GetErrorReason(Exception exception) + private static bool TryGetErrorType(HttpResponseMessage? response, Exception? exception, out string? errorType) { - if (exception is HttpRequestException e) + if (response is not null) { - Debug.Assert(Enum.GetValues().Length == 12, "We need to extend the mapping in case new values are added to HttpRequestError."); + int statusCode = (int)response.StatusCode; - string? errorReason = e.HttpRequestError switch + // In case the status code indicates a client or a server error, return the string representation of the status code. + // See the paragraph Status and the definition of 'error.type' in + // https://github.com/open-telemetry/semantic-conventions/blob/2bad9afad58fbd6b33cc683d1ad1f006e35e4a5d/docs/http/http-spans.md + if (statusCode >= 400 && statusCode <= 599) { - HttpRequestError.NameResolutionError => "name_resolution_error", - HttpRequestError.ConnectionError => "connection_error", - HttpRequestError.SecureConnectionError => "secure_connection_error", - HttpRequestError.HttpProtocolError => "http_protocol_error", - HttpRequestError.ExtendedConnectNotSupported => "extended_connect_not_supported", - HttpRequestError.VersionNegotiationError => "version_negotiation_error", - HttpRequestError.UserAuthenticationError => "user_authentication_error", - HttpRequestError.ProxyTunnelError => "proxy_tunnel_error", - HttpRequestError.InvalidResponse => "invalid_response", - HttpRequestError.ResponseEnded => "response_ended", - HttpRequestError.ConfigurationLimitExceeded => "configuration_limit_exceeded", - - // Fall back to the exception type name (including for HttpRequestError.Unknown). - _ => null - }; - - if (errorReason is not null) - { - return errorReason; + errorType = GetErrorStatusCodeString(statusCode); + return true; } } - return exception.GetType().Name; + if (exception is null) + { + errorType = null; + return false; + } + + Debug.Assert(Enum.GetValues().Length == 12, "We need to extend the mapping in case new values are added to HttpRequestError."); + errorType = (exception as HttpRequestException)?.HttpRequestError switch + { + HttpRequestError.NameResolutionError => "name_resolution_error", + HttpRequestError.ConnectionError => "connection_error", + HttpRequestError.SecureConnectionError => "secure_connection_error", + HttpRequestError.HttpProtocolError => "http_protocol_error", + HttpRequestError.ExtendedConnectNotSupported => "extended_connect_not_supported", + HttpRequestError.VersionNegotiationError => "version_negotiation_error", + HttpRequestError.UserAuthenticationError => "user_authentication_error", + HttpRequestError.ProxyTunnelError => "proxy_tunnel_error", + HttpRequestError.InvalidResponse => "invalid_response", + HttpRequestError.ResponseEnded => "response_ended", + HttpRequestError.ConfigurationLimitExceeded => "configuration_limit_exceeded", + + // Fall back to the exception type name in case of HttpRequestError.Unknown or when exception is not an HttpRequestException. + _ => exception.GetType().Name + }; + return true; } private static string GetProtocolVersionString(Version httpVersion) => (httpVersion.Major, httpVersion.Minor) switch @@ -199,6 +210,7 @@ private static TagList InitializeCommonTags(HttpRequestMessage request) } private static object[]? s_boxedStatusCodes; + private static string[]? s_statusCodeStrings; private static object GetBoxedStatusCode(int statusCode) { @@ -209,6 +221,17 @@ private static object GetBoxedStatusCode(int statusCode) : statusCode; } + private static string GetErrorStatusCodeString(int statusCode) + { + Debug.Assert(statusCode >= 400 && statusCode <= 599); + + string[] strings = LazyInitializer.EnsureInitialized(ref s_statusCodeStrings, static () => new string[200]); + int index = statusCode - 400; + return (uint)index < (uint)strings.Length + ? strings[index] ??= statusCode.ToString() + : statusCode.ToString(); + } + private sealed class SharedMeter : Meter { public static Meter Instance { get; } = new SharedMeter(); diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3Connection.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3Connection.cs index 3b8aaae6605ed0..caf39a7ac7bd0d 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3Connection.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3Connection.cs @@ -33,6 +33,7 @@ internal sealed class Http3Connection : HttpConnectionBase // Our control stream. private QuicStream? _clientControl; + private Task _sendSettingsTask; // Server-advertised SETTINGS_MAX_FIELD_SECTION_SIZE // https://www.rfc-editor.org/rfc/rfc9114.html#section-7.2.4.1-2.2.1 @@ -88,7 +89,7 @@ public Http3Connection(HttpConnectionPool pool, HttpAuthority authority, QuicCon } // Errors are observed via Abort(). - _ = SendSettingsAsync(); + _sendSettingsTask = SendSettingsAsync(); // This process is cleaned up when _connection is disposed, and errors are observed via Abort(). _ = AcceptStreamsAsync(); @@ -150,6 +151,7 @@ private void CheckForShutdown() if (_clientControl != null) { + await _sendSettingsTask.ConfigureAwait(false); await _clientControl.DisposeAsync().ConfigureAwait(false); _clientControl = null; } @@ -486,7 +488,7 @@ private async Task ProcessServerStreamAsync(QuicStream stream) if (bytesRead == 0) { - // https://quicwg.org/base-drafts/draft-ietf-quic-http.html#name-unidirectional-streams + // https://www.rfc-editor.org/rfc/rfc9114.html#name-unidirectional-streams // A sender can close or reset a unidirectional stream unless otherwise specified. A receiver MUST // tolerate unidirectional streams being closed or reset prior to the reception of the unidirectional // stream header. diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3RequestStream.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3RequestStream.cs index f5e037cf1d4067..c18a43402fd930 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3RequestStream.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3RequestStream.cs @@ -31,6 +31,8 @@ internal sealed class Http3RequestStream : IHttpStreamHeadersHandler, IAsyncDisp private TaskCompletionSource? _expect100ContinueCompletionSource; // True indicates we should send content (e.g. received 100 Continue). private bool _disposed; private readonly CancellationTokenSource _requestBodyCancellationSource; + private Task? _sendRequestTask; // Set with SendContentAsync, must be awaited before QuicStream.DisposeAsync(); + private Task? _readResponseTask; // Set with ReadResponseAsync, must be awaited before QuicStream.DisposeAsync(); // Allocated when we receive a :status header. private HttpResponseMessage? _response; @@ -88,9 +90,25 @@ public void Dispose() { _disposed = true; AbortStream(); + // We aborted both sides, thus both task should unblock and should be finished before disposing the QuicStream. + WaitUnfinished(_sendRequestTask); + WaitUnfinished(_readResponseTask); _stream.Dispose(); DisposeSyncHelper(); } + + static void WaitUnfinished(Task? task) + { + if (task is not null && !task.IsCompleted) + { + try + { + task.GetAwaiter().GetResult(); + } + catch // Exceptions from both tasks are logged via _connection.LogException() in case they're not awaited in SendAsync, so the exception can be ignored here. + { } + } + } } private void RemoveFromConnectionIfDone() @@ -107,9 +125,25 @@ public async ValueTask DisposeAsync() { _disposed = true; AbortStream(); + // We aborted both sides, thus both task should unblock and should be finished before disposing the QuicStream. + await AwaitUnfinished(_sendRequestTask).ConfigureAwait(false); + await AwaitUnfinished(_readResponseTask).ConfigureAwait(false); await _stream.DisposeAsync().ConfigureAwait(false); DisposeSyncHelper(); } + + static async ValueTask AwaitUnfinished(Task? task) + { + if (task is not null && !task.IsCompleted) + { + try + { + await task.ConfigureAwait(false); + } + catch // Exceptions from both tasks are logged via _connection.LogException() in case they're not awaited in SendAsync, so the exception can be ignored here. + { } + } + } } private void DisposeSyncHelper() @@ -158,40 +192,39 @@ public async Task SendAsync(CancellationToken cancellationT await FlushSendBufferAsync(endStream: _request.Content == null, _requestBodyCancellationSource.Token).ConfigureAwait(false); } - Task sendContentTask; if (_request.Content != null) { - sendContentTask = SendContentAsync(_request.Content!, _requestBodyCancellationSource.Token); + _sendRequestTask = SendContentAsync(_request.Content!, _requestBodyCancellationSource.Token); } else { - sendContentTask = Task.CompletedTask; + _sendRequestTask = Task.CompletedTask; } // In parallel, send content and read response. // Depending on Expect 100 Continue usage, one will depend on the other making progress. - Task readResponseTask = ReadResponseAsync(_requestBodyCancellationSource.Token); + _readResponseTask = ReadResponseAsync(_requestBodyCancellationSource.Token); bool sendContentObserved = false; // If we're not doing duplex, wait for content to finish sending here. // If we are doing duplex and have the unlikely event that it completes here, observe the result. // See Http2Connection.SendAsync for a full comment on this logic -- it is identical behavior. - if (sendContentTask.IsCompleted || + if (_sendRequestTask.IsCompleted || _request.Content?.AllowDuplex != true || - await Task.WhenAny(sendContentTask, readResponseTask).ConfigureAwait(false) == sendContentTask || - sendContentTask.IsCompleted) + await Task.WhenAny(_sendRequestTask, _readResponseTask).ConfigureAwait(false) == _sendRequestTask || + _sendRequestTask.IsCompleted) { try { - await sendContentTask.ConfigureAwait(false); + await _sendRequestTask.ConfigureAwait(false); sendContentObserved = true; } catch { - // Exceptions will be bubbled up from sendContentTask here, - // which means the result of readResponseTask won't be observed directly: + // Exceptions will be bubbled up from _sendRequestTask here, + // which means the result of _readResponseTask won't be observed directly: // Do a background await to log any exceptions. - _connection.LogExceptions(readResponseTask); + _connection.LogExceptions(_readResponseTask); throw; } } @@ -199,11 +232,11 @@ await Task.WhenAny(sendContentTask, readResponseTask).ConfigureAwait(false) == s { // Duplex is being used, so we can't wait for content to finish sending. // Do a background await to log any exceptions. - _connection.LogExceptions(sendContentTask); + _connection.LogExceptions(_sendRequestTask); } // Wait for the response headers to be read. - await readResponseTask.ConfigureAwait(false); + await _readResponseTask.ConfigureAwait(false); Debug.Assert(_response != null && _response.Content != null); // Set our content stream. diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http3.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http3.cs index 92c4ab0d6097f6..55bc73b5d146d8 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http3.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http3.cs @@ -1626,6 +1626,7 @@ public async Task DuplexStreaming_AbortByServer_StreamingCancelled(bool graceful public async Task ServerSendsTrailingHeaders_Success() { using Http3LoopbackServer server = CreateHttp3LoopbackServer(); + SemaphoreSlim clientFinishedSemaphore = new SemaphoreSlim(0); Task serverTask = Task.Run(async () => { @@ -1636,6 +1637,7 @@ public async Task ServerSendsTrailingHeaders_Success() await requestStream.ReadRequestDataAsync(); await requestStream.SendResponseAsync(isFinal: false); await requestStream.SendResponseHeadersAsync(null, new[] { new HttpHeaderData("MyHeader", "MyValue") }); + await clientFinishedSemaphore.WaitAsync(TimeSpan.FromSeconds(20)); }); Task clientTask = Task.Run(async () => @@ -1655,16 +1657,24 @@ public async Task ServerSendsTrailingHeaders_Success() (string key, IEnumerable value) = Assert.Single(response.TrailingHeaders); Assert.Equal("MyHeader", key); Assert.Equal("MyValue", Assert.Single(value)); + clientFinishedSemaphore.Release(); }); await new[] { clientTask, serverTask }.WhenAllOrAnyFailed(200_000); } + public enum CloseOutboundControlStream + { + BogusData, + Dispose, + Abort, + } [Theory] - [InlineData(true)] - [InlineData(false)] - public async Task ServerClosesOutboundControlStream_ClientClosesConnection(bool graceful) + [InlineData(CloseOutboundControlStream.BogusData)] + [InlineData(CloseOutboundControlStream.Dispose)] + [InlineData(CloseOutboundControlStream.Abort)] + public async Task ServerClosesOutboundControlStream_ClientClosesConnection(CloseOutboundControlStream closeType) { using Http3LoopbackServer server = CreateHttp3LoopbackServer(); @@ -1677,13 +1687,31 @@ public async Task ServerClosesOutboundControlStream_ClientClosesConnection(bool await using Http3LoopbackStream requestStream = await connection.AcceptRequestStreamAsync(); // abort the control stream - if (graceful) + if (closeType == CloseOutboundControlStream.BogusData) { await connection.OutboundControlStream.SendResponseBodyAsync(Array.Empty(), isFinal: true); } - else + else if (closeType == CloseOutboundControlStream.Dispose) { - connection.OutboundControlStream.Abort(Http3LoopbackConnection.H3_INTERNAL_ERROR); + await connection.OutboundControlStream.DisposeAsync(); + } + else if (closeType == CloseOutboundControlStream.Abort) + { + int iterations = 5; + while (iterations-- > 0) + { + connection.OutboundControlStream.Abort(Http3LoopbackConnection.H3_INTERNAL_ERROR); + // This sends RESET_FRAME which might cause complete discard of any data including stream type, leading to client ignoring the stream. + // Attempt to establish the control stream again then. + if (await semaphore.WaitAsync(100)) + { + // Client finished with the expected error. + return; + } + await connection.OutboundControlStream.DisposeAsync(); + await connection.EstablishControlStreamAsync(Array.Empty()); + await Task.Delay(100); + } } // wait for client task before tearing down the requestStream and connection diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTestBase.SocketsHttpHandler.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTestBase.SocketsHttpHandler.cs index 602d177f5f1be1..888b38b813127e 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTestBase.SocketsHttpHandler.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTestBase.SocketsHttpHandler.cs @@ -3,14 +3,31 @@ using System.IO; using System.Net.Quic; +using System.Net.Sockets; using System.Net.Test.Common; using System.Reflection; +using System.Threading; using System.Threading.Tasks; namespace System.Net.Http.Functional.Tests { public abstract partial class HttpClientHandlerTestBase : FileCleanupTestBase { + protected static async Task DefaultConnectCallback(EndPoint endPoint, CancellationToken cancellationToken) + { + Socket socket = new Socket(SocketType.Stream, ProtocolType.Tcp) { NoDelay = true }; + try + { + await socket.ConnectAsync(endPoint, cancellationToken); + return new NetworkStream(socket, ownsSocket: true); + } + catch + { + socket.Dispose(); + throw; + } + } + protected static bool IsWinHttpHandler => false; public static bool IsQuicSupported diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpRequestMessageTest.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpRequestMessageTest.cs index 8c4ea2aa1a6e77..0dd1a485894d6b 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/HttpRequestMessageTest.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/HttpRequestMessageTest.cs @@ -266,6 +266,33 @@ await server.AcceptConnectionAsync(async connection => } } + [Fact] + public async Task HttpRequest_StringContent_WithoutMediaType() + { + using (HttpClient client = CreateHttpClient()) + { + await LoopbackServer.CreateServerAsync(async (server, uri) => + { + var request = new HttpRequestMessage(HttpMethod.Post, uri); + request.Content = new StringContent("", null, ((MediaTypeHeaderValue)null)!); + + Task requestTask = client.SendAsync(request); + await server.AcceptConnectionAsync(async connection => + { + var requestData = await connection.ReadRequestDataAsync().ConfigureAwait(false); +#if TARGET_BROWSER + requestData = await connection.HandleCORSPreFlight(requestData); +#endif + + Assert.DoesNotContain(requestData.Headers, line => line.Name.StartsWith("Content-Type")); + + await connection.SendResponseAsync(); + await requestTask; + }); + }); + } + } + [Fact] public async Task HttpRequest_BodylessMethod_LargeContentLength() { diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/MetricsTest.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/MetricsTest.cs index f3a97d2f15d530..15bb4bcbe2bb97 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/MetricsTest.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/MetricsTest.cs @@ -75,8 +75,8 @@ protected static void VerifyRequestDuration(Measurement measurement, Version? protocolVersion = null, int? statusCode = null, string method = "GET", - string[] acceptedErrorReasons = null) => - VerifyRequestDuration(InstrumentNames.RequestDuration, measurement.Value, measurement.Tags.ToArray(), uri, protocolVersion, statusCode, method, acceptedErrorReasons); + string[] acceptedErrorTypes = null) => + VerifyRequestDuration(InstrumentNames.RequestDuration, measurement.Value, measurement.Tags.ToArray(), uri, protocolVersion, statusCode, method, acceptedErrorTypes); protected static void VerifyRequestDuration(string instrumentName, double measurement, @@ -85,7 +85,7 @@ protected static void VerifyRequestDuration(string instrumentName, Version? protocolVersion, int? statusCode, string method = "GET", - string[] acceptedErrorReasons = null) + string[] acceptedErrorTypes = null) { Assert.Equal(InstrumentNames.RequestDuration, instrumentName); Assert.InRange(measurement, double.Epsilon, 60); @@ -93,14 +93,14 @@ protected static void VerifyRequestDuration(string instrumentName, VerifyTag(tags, "http.request.method", method); VerifyTag(tags, "network.protocol.version", GetVersionString(protocolVersion)); VerifyTag(tags, "http.response.status_code", statusCode); - if (acceptedErrorReasons == null) + if (acceptedErrorTypes == null) { - Assert.DoesNotContain(tags, t => t.Key == "http.error.reason"); + Assert.DoesNotContain(tags, t => t.Key == "error.type"); } else { - string errorReason = (string)tags.Single(t => t.Key == "http.error.reason").Value; - Assert.Contains(errorReason, acceptedErrorReasons); + string errorReason = (string)tags.Single(t => t.Key == "error.type").Value; + Assert.Contains(errorReason, acceptedErrorTypes); } } @@ -292,17 +292,8 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => GetUnderlyingSocketsHttpHandler(Handler).ConnectCallback = async (ctx, cancellationToken) => { connectionStarted.SetResult(); - Socket socket = new Socket(SocketType.Stream, ProtocolType.Tcp) { NoDelay = true }; - try - { - await socket.ConnectAsync(ctx.DnsEndPoint, cancellationToken); - return new NetworkStream(socket, ownsSocket: true); - } - catch - { - socket.Dispose(); - throw; - } + + return await DefaultConnectCallback(ctx.DnsEndPoint, cancellationToken); }; // Enable recording request-duration to test the path with metrics enabled. @@ -668,7 +659,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => : [nameof(TaskCanceledException), nameof(OperationCanceledException)]; Measurement m = Assert.Single(recorder.GetMeasurements()); - VerifyRequestDuration(m, uri, acceptedErrorReasons: expectedExceptionTypes); + VerifyRequestDuration(m, uri, acceptedErrorTypes: expectedExceptionTypes); clientCompleted.SetResult(); }, @@ -712,7 +703,7 @@ public async Task RequestDuration_ConnectionError_LogsExpectedErrorReason() _output.WriteLine($"Client exception: {ex}"); Measurement m = Assert.Single(recorder.GetMeasurements()); - VerifyRequestDuration(m, uri, acceptedErrorReasons: ["connection_error"]); + VerifyRequestDuration(m, uri, acceptedErrorTypes: ["connection_error"]); } protected override void Dispose(bool disposing) @@ -802,6 +793,29 @@ await Assert.ThrowsAsync(async () => }, content: "x")); } + [Theory] + [InlineData(400)] + [InlineData(404)] + [InlineData(599)] + public Task RequestDuration_ErrorStatus_ErrorTypeRecorded(int statusCode) + { + return LoopbackServerFactory.CreateClientAndServerAsync(async uri => + { + using HttpMessageInvoker client = CreateHttpMessageInvoker(); + using InstrumentRecorder recorder = SetupInstrumentRecorder(InstrumentNames.RequestDuration); + using HttpRequestMessage request = new(HttpMethod.Get, uri) { Version = UseVersion }; + + using HttpResponseMessage response = await SendAsync(client, request); + + Measurement m = Assert.Single(recorder.GetMeasurements()); + VerifyRequestDuration(m, uri, UseVersion, statusCode, "GET", acceptedErrorTypes: new[] { $"{statusCode}" }); + + }, async server => + { + await server.AcceptConnectionSendResponseAndCloseAsync(statusCode: (HttpStatusCode)statusCode); + }); + } + [Fact] [SkipOnPlatform(TestPlatforms.Browser, "Browser is relaxed about validating HTTP headers")] public async Task RequestDuration_ConnectionClosedWhileReceivingHeaders_Recorded() @@ -823,7 +837,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => Assert.True(ex is HttpRequestException or TaskCanceledException); Measurement m = Assert.Single(recorder.GetMeasurements()); - VerifyRequestDuration(m, uri, acceptedErrorReasons: [nameof(TaskCanceledException), "response_ended"]); + VerifyRequestDuration(m, uri, acceptedErrorTypes: [nameof(TaskCanceledException), "response_ended"]); }, async server => { try @@ -878,7 +892,7 @@ await server.AcceptConnectionAsync(async connection => { await Assert.ThrowsAsync(() => clientTask); Measurement m = Assert.Single(recorder.GetMeasurements()); - VerifyRequestDuration(m, server.Address, acceptedErrorReasons: ["response_ended"]); + VerifyRequestDuration(m, server.Address, acceptedErrorTypes: ["response_ended"]); } else { @@ -976,7 +990,7 @@ await Assert.ThrowsAsync(async () => }); Measurement m = Assert.Single(recorder.GetMeasurements()); - VerifyRequestDuration(m, server.Address, acceptedErrorReasons: ["http_protocol_error"]); + VerifyRequestDuration(m, server.Address, acceptedErrorTypes: ["http_protocol_error"]); } } diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/NtAuthTests.FakeServer.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/NtAuthTests.FakeServer.cs index 780db637ba335e..e0e08021cd8669 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/NtAuthTests.FakeServer.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/NtAuthTests.FakeServer.cs @@ -139,5 +139,33 @@ await server.AcceptConnectionAsync(async connection => }).ConfigureAwait(false); }); } + + [Fact] + [SkipOnPlatform(TestPlatforms.Browser | TestPlatforms.Windows, "DefaultCredentials are unsupported for NTLM on Unix / Managed implementation")] + public async Task DefaultHandler_FakeServer_DefaultCredentials() + { + await LoopbackServer.CreateClientAndServerAsync( + async uri => + { + HttpRequestMessage requestMessage = new HttpRequestMessage(HttpMethod.Get, uri); + requestMessage.Version = new Version(1, 1); + + HttpMessageHandler handler = new HttpClientHandler() { Credentials = CredentialCache.DefaultCredentials }; + using (var client = new HttpClient(handler)) + { + HttpResponseMessage response = await client.SendAsync(requestMessage); + Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); + } + }, + async server => + { + await server.AcceptConnectionAsync(async connection => + { + var authHeader = "WWW-Authenticate: NTLM\r\n"; + await connection.SendResponseAsync(HttpStatusCode.Unauthorized, authHeader).ConfigureAwait(false); + connection.CompleteRequestProcessing(); + }).ConfigureAwait(false); + }); + } } } diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.Cancellation.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.Cancellation.cs index c793a1d55d6e76..76d7086c37c174 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.Cancellation.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.Cancellation.cs @@ -165,9 +165,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => else { // Succeed the second connection attempt - Socket socket = new Socket(SocketType.Stream, ProtocolType.Tcp) { NoDelay = true }; - await socket.ConnectAsync(context.DnsEndPoint, token); - return new NetworkStream(socket, ownsSocket: true); + return await DefaultConnectCallback(context.DnsEndPoint, token); } }; diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs index e25f69529b0e60..2613b451be4556 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs @@ -1369,17 +1369,7 @@ await RetryHelper.ExecuteAsync(async () => { Assert.Equal("foo", context.DnsEndPoint.Host); - Socket socket = new Socket(SocketType.Stream, ProtocolType.Tcp) { NoDelay = true }; - try - { - await socket.ConnectAsync(lastServerUri.IdnHost, lastServerUri.Port); - return new NetworkStream(socket, ownsSocket: true); - } - catch - { - socket.Dispose(); - throw; - } + return await DefaultConnectCallback(new DnsEndPoint(lastServerUri.IdnHost, lastServerUri.Port), ct); }; TaskCompletionSource waitingForLastRequest = new(TaskCreationOptions.RunContinuationsAsynchronously); @@ -2659,30 +2649,18 @@ public async Task Http2_MultipleConnectionsEnabled_ManyRequestsEnqueuedSimultane AcquireAllStreamSlots(server, client, sendTasks, RequestCount); - List<(Http2LoopbackConnection connection, int streamId)> acceptedRequests = new(); - await using Http2LoopbackConnection c1 = await server.EstablishConnectionAsync(new SettingsEntry { SettingId = SettingId.MaxConcurrentStreams, Value = 100 }); - for (int i = 0; i < MaxConcurrentStreams; i++) - { - (int streamId, _) = await c1.ReadAndParseRequestHeaderAsync(); - acceptedRequests.Add((c1, streamId)); - } + int[] streamIds1 = await AcceptRequests(c1, MaxConcurrentStreams); await using Http2LoopbackConnection c2 = await server.EstablishConnectionAsync(new SettingsEntry { SettingId = SettingId.MaxConcurrentStreams, Value = 100 }); - for (int i = 0; i < MaxConcurrentStreams; i++) - { - (int streamId, _) = await c2.ReadAndParseRequestHeaderAsync(); - acceptedRequests.Add((c2, streamId)); - } + int[] streamIds2 = await AcceptRequests(c2, MaxConcurrentStreams); await using Http2LoopbackConnection c3 = await server.EstablishConnectionAsync(new SettingsEntry { SettingId = SettingId.MaxConcurrentStreams, Value = 100 }); (int finalStreamId, _) = await c3.ReadAndParseRequestHeaderAsync(); - acceptedRequests.Add((c3, finalStreamId)); - foreach ((Http2LoopbackConnection connection, int streamId) request in acceptedRequests) - { - await request.connection.SendDefaultResponseAsync(request.streamId); - } + await SendResponses(c1, streamIds1); + await SendResponses(c2, streamIds2); + await c3.SendDefaultResponseAsync(finalStreamId); await VerifySendTasks(sendTasks); } @@ -2702,19 +2680,17 @@ public async Task Http2_MultipleConnectionsEnabled_InfiniteRequestsCompletelyBlo Http2LoopbackConnection connection0 = await PrepareConnection(server, client, MaxConcurrentStreams).ConfigureAwait(false); AcquireAllStreamSlots(server, client, sendTasks, MaxConcurrentStreams); - // Block the first connection on infinite requests. + // Accept requests but don't send responses on connection 0 int[] blockedStreamIds = await AcceptRequests(connection0, MaxConcurrentStreams).ConfigureAwait(false); - Assert.Equal(MaxConcurrentStreams, blockedStreamIds.Length); Http2LoopbackConnection connection1 = await PrepareConnection(server, client, MaxConcurrentStreams).ConfigureAwait(false); AcquireAllStreamSlots(server, client, sendTasks, MaxConcurrentStreams); - await HandleAllPendingRequests(connection1, MaxConcurrentStreams).ConfigureAwait(false); + // Send responses on connection 1 + await SendResponses(connection1, await AcceptRequests(connection1, MaxConcurrentStreams).ConfigureAwait(false)); - // Complete infinite requests. - int handledRequestCount = await SendResponses(connection0, blockedStreamIds); - - Assert.Equal(MaxConcurrentStreams, handledRequestCount); + // Send responses on connection 0 + await SendResponses(connection0, blockedStreamIds); await VerifySendTasks(sendTasks).ConfigureAwait(false); } @@ -2729,44 +2705,62 @@ public async Task Http2_MultipleConnectionsEnabled_OpenAndCloseMultipleConnectio const int MaxConcurrentStreams = 2; using Http2LoopbackServer server = Http2LoopbackServer.CreateServer(); + server.AllowMultipleConnections = true; + + // Allow 5 connections through the ConnectCallback. + SemaphoreSlim connectCallbackSemaphore = new(initialCount: 5); + using SocketsHttpHandler handler = CreateHandler(); + + handler.ConnectCallback = async (context, ct) => + { + await connectCallbackSemaphore.WaitAsync(ct); + + return await DefaultConnectCallback(context.DnsEndPoint, ct); + }; + using (HttpClient client = CreateHttpClient(handler)) { - server.AllowMultipleConnections = true; - List> sendTasks = new List>(); + List> sendTasks = new(); + Http2LoopbackConnection connection0 = await PrepareConnection(server, client, MaxConcurrentStreams).ConfigureAwait(false); AcquireAllStreamSlots(server, client, sendTasks, MaxConcurrentStreams); + int[] streamIds0 = await AcceptRequests(connection0, MaxConcurrentStreams).ConfigureAwait(false); + Http2LoopbackConnection connection1 = await PrepareConnection(server, client, MaxConcurrentStreams).ConfigureAwait(false); AcquireAllStreamSlots(server, client, sendTasks, MaxConcurrentStreams); + int[] streamIds1 = await AcceptRequests(connection1, MaxConcurrentStreams).ConfigureAwait(false); + Http2LoopbackConnection connection2 = await PrepareConnection(server, client, MaxConcurrentStreams).ConfigureAwait(false); AcquireAllStreamSlots(server, client, sendTasks, MaxConcurrentStreams); + int[] streamIds2 = await AcceptRequests(connection2, MaxConcurrentStreams).ConfigureAwait(false); - Task[] handleRequestTasks = new[] { - HandleAllPendingRequests(connection0, MaxConcurrentStreams), - HandleAllPendingRequests(connection1, MaxConcurrentStreams), - HandleAllPendingRequests(connection2, MaxConcurrentStreams) - }; - - await TestHelper.WhenAllCompletedOrAnyFailed(handleRequestTasks).ConfigureAwait(false); + await TestHelper.WhenAllCompletedOrAnyFailed( + SendResponses(connection0, streamIds0), + SendResponses(connection1, streamIds1), + SendResponses(connection2, streamIds2)) + .ConfigureAwait(false); - await connection0.ShutdownIgnoringErrorsAsync(await handleRequestTasks[0]).ConfigureAwait(false); - await connection2.ShutdownIgnoringErrorsAsync(await handleRequestTasks[2]).ConfigureAwait(false); + await connection0.ShutdownIgnoringErrorsAsync(streamIds0[^1]).ConfigureAwait(false); + await connection2.ShutdownIgnoringErrorsAsync(streamIds2[^1]).ConfigureAwait(false); - //Fill all connection1's stream slots + // Fill all connection1's stream slots AcquireAllStreamSlots(server, client, sendTasks, MaxConcurrentStreams); + streamIds1 = await AcceptRequests(connection1, MaxConcurrentStreams).ConfigureAwait(false); Http2LoopbackConnection connection3 = await PrepareConnection(server, client, MaxConcurrentStreams).ConfigureAwait(false); AcquireAllStreamSlots(server, client, sendTasks, MaxConcurrentStreams); + int[] streamIds3 = await AcceptRequests(connection3, MaxConcurrentStreams).ConfigureAwait(false); + Http2LoopbackConnection connection4 = await PrepareConnection(server, client, MaxConcurrentStreams).ConfigureAwait(false); AcquireAllStreamSlots(server, client, sendTasks, MaxConcurrentStreams); + int[] streamIds4 = await AcceptRequests(connection4, MaxConcurrentStreams).ConfigureAwait(false); - Task[] finalHandleTasks = new[] { - HandleAllPendingRequests(connection1, MaxConcurrentStreams), - HandleAllPendingRequests(connection3, MaxConcurrentStreams), - HandleAllPendingRequests(connection4, MaxConcurrentStreams) - }; - - await TestHelper.WhenAllCompletedOrAnyFailed(finalHandleTasks).ConfigureAwait(false); + await TestHelper.WhenAllCompletedOrAnyFailed( + SendResponses(connection1, streamIds1), + SendResponses(connection3, streamIds3), + SendResponses(connection4, streamIds4)) + .ConfigureAwait(false); await VerifySendTasks(sendTasks).ConfigureAwait(false); } @@ -2778,24 +2772,36 @@ public async Task Http2_MultipleConnectionsEnabled_IdleConnectionTimeoutExpired_ { const int MaxConcurrentStreams = 2; using Http2LoopbackServer server = Http2LoopbackServer.CreateServer(); + server.AllowMultipleConnections = true; + + SemaphoreSlim connectCallbackSemaphore = new(initialCount: 2); + using SocketsHttpHandler handler = CreateHandler(); handler.PooledConnectionIdleTimeout = TimeSpan.FromSeconds(20); + + handler.ConnectCallback = async (context, ct) => + { + await connectCallbackSemaphore.WaitAsync(ct); + + return await DefaultConnectCallback(context.DnsEndPoint, ct); + }; + using (HttpClient client = CreateHttpClient(handler)) { - server.AllowMultipleConnections = true; - List> sendTasks = new List>(); + List> sendTasks0 = new(); + List> sendTasks1 = new(); + List> sendTasks2 = new(); + Http2LoopbackConnection connection0 = await PrepareConnection(server, client, MaxConcurrentStreams).ConfigureAwait(false); - AcquireAllStreamSlots(server, client, sendTasks, MaxConcurrentStreams); - int[] acceptedStreamIds = await AcceptRequests(connection0, MaxConcurrentStreams).ConfigureAwait(false); - Assert.Equal(MaxConcurrentStreams, acceptedStreamIds.Length); + AcquireAllStreamSlots(server, client, sendTasks0, MaxConcurrentStreams); + int[] streamIds0 = await AcceptRequests(connection0, MaxConcurrentStreams).ConfigureAwait(false); - List> connection1SendTasks = new List>(); Http2LoopbackConnection connection1 = await PrepareConnection(server, client, MaxConcurrentStreams).ConfigureAwait(false); - AcquireAllStreamSlots(server, client, connection1SendTasks, MaxConcurrentStreams); - await HandleAllPendingRequests(connection1, MaxConcurrentStreams).ConfigureAwait(false); + AcquireAllStreamSlots(server, client, sendTasks1, MaxConcurrentStreams); + await SendResponses(connection1, await AcceptRequests(connection1, MaxConcurrentStreams).ConfigureAwait(false)); - // Complete all the requests. - await VerifySendTasks(connection1SendTasks).ConfigureAwait(false); + // Complete all the requests on connection1. + await VerifySendTasks(sendTasks1).ConfigureAwait(false); // Wait until the idle connection timeout expires. await connection1.WaitForClientDisconnectAsync(false).WaitAsync(TestHelper.PassingTestTimeout).ConfigureAwait(false); @@ -2803,17 +2809,20 @@ public async Task Http2_MultipleConnectionsEnabled_IdleConnectionTimeoutExpired_ Assert.True(connection1.IsInvalid); Assert.False(connection0.IsInvalid); - Http2LoopbackConnection connection2 = await PrepareConnection(server, client, MaxConcurrentStreams).ConfigureAwait(false); - - AcquireAllStreamSlots(server, client, sendTasks, MaxConcurrentStreams); + // Due to a race condition in how a new Http2 connection is returned to the pool, we may have started a third connection attempt in the background. + // We were blocking such attempts from going through to the Socket layer until now to avoid having to deal with the extra connect when accepting connection2 below. + // Allow the third connection through the ConnectCallback now. + connectCallbackSemaphore.Release(); - await HandleAllPendingRequests(connection2, MaxConcurrentStreams).ConfigureAwait(false); + Http2LoopbackConnection connection2 = await PrepareConnection(server, client, MaxConcurrentStreams).ConfigureAwait(false); + AcquireAllStreamSlots(server, client, sendTasks2, MaxConcurrentStreams); + await SendResponses(connection2, await AcceptRequests(connection2, MaxConcurrentStreams).ConfigureAwait(false)); - //Make sure connection0 is still alive. - int handledRequests0 = await SendResponses(connection0, acceptedStreamIds).ConfigureAwait(false); - Assert.Equal(MaxConcurrentStreams, handledRequests0); + // Make sure connection0 is still alive. + await SendResponses(connection0, streamIds0).ConfigureAwait(false); - await VerifySendTasks(sendTasks).ConfigureAwait(false); + await VerifySendTasks(sendTasks0).ConfigureAwait(false); + await VerifySendTasks(sendTasks2).ConfigureAwait(false); } } @@ -2842,7 +2851,10 @@ private async Task PrepareConnection(Http2LoopbackServe Task warmUpTask = client.GetAsync(server.Address); - Http2LoopbackConnection connection = await GetConnection(server, maxConcurrentStreams).WaitAsync(TestHelper.PassingTestTimeout).ConfigureAwait(false); + var concurrentStreamsSetting = new SettingsEntry { SettingId = SettingId.MaxConcurrentStreams, Value = maxConcurrentStreams }; + + Http2LoopbackConnection connection = await server.EstablishConnectionAsync(timeout: null, ackTimeout: TimeSpan.FromSeconds(10), concurrentStreamsSetting) + .WaitAsync(TestHelper.PassingTestTimeout).ConfigureAwait(false); (int streamId, _) = await connection.ReadAndParseRequestHeaderAsync().WaitAsync(TestHelper.PassingTestTimeout).ConfigureAwait(false); await connection.SendDefaultResponseAsync(streamId).WaitAsync(TestHelper.PassingTestTimeout).ConfigureAwait(false); @@ -2862,49 +2874,25 @@ private static void AcquireAllStreamSlots(Http2LoopbackServer server, HttpClient } } - private static async Task GetConnection(Http2LoopbackServer server, uint maxConcurrentStreams) - { - var concurrentStreamsSetting = new SettingsEntry { SettingId = SettingId.MaxConcurrentStreams, Value = maxConcurrentStreams }; - - return await server.EstablishConnectionAsync(timeout: null, ackTimeout: TimeSpan.FromSeconds(10), concurrentStreamsSetting).ConfigureAwait(false); - } - - private async Task HandleAllPendingRequests(Http2LoopbackConnection connection, int totalRequestCount) - { - int lastStreamId = -1; - for (int i = 0; i < totalRequestCount; i++) - { - (int streamId, _) = await connection.ReadAndParseRequestHeaderAsync().ConfigureAwait(false); - await connection.SendDefaultResponseAsync(streamId).ConfigureAwait(false); - lastStreamId = streamId; - } - - return lastStreamId; - } - private async Task AcceptRequests(Http2LoopbackConnection connection, int requestCount) { int[] streamIds = new int[requestCount]; for (int i = 0; i < streamIds.Length; i++) { - (int streamId, _) = await connection.ReadAndParseRequestHeaderAsync().ConfigureAwait(false); + (int streamId, _) = await connection.ReadAndParseRequestHeaderAsync().WaitAsync(TestHelper.PassingTestTimeout).ConfigureAwait(false); streamIds[i] = streamId; } return streamIds; } - private async Task SendResponses(Http2LoopbackConnection connection, IEnumerable streamIds) + private async Task SendResponses(Http2LoopbackConnection connection, IEnumerable streamIds) { - int count = 0; foreach (int streamId in streamIds) { - count++; - await connection.SendDefaultResponseAsync(streamId).ConfigureAwait(false); + await connection.SendDefaultResponseAsync(streamId).WaitAsync(TestHelper.PassingTestTimeout).ConfigureAwait(false); } - - return count; } } @@ -3108,10 +3096,7 @@ public async Task ConnectCallback_ConnectionPrefix_Success(bool useSsl) var socketsHandler = (SocketsHttpHandler)GetUnderlyingSocketsHttpHandler(handler); socketsHandler.ConnectCallback = async (context, token) => { - Socket clientSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); - await clientSocket.ConnectAsync(listenSocket.LocalEndPoint); - - Stream clientStream = new NetworkStream(clientSocket, ownsSocket: true); + Stream clientStream = await DefaultConnectCallback(listenSocket.LocalEndPoint, token); await clientStream.WriteAsync(RequestPrefix); diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/StringContentTest.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/StringContentTest.cs index cb69b3e4e7259b..462f9b2d6947c8 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/StringContentTest.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/StringContentTest.cs @@ -72,7 +72,7 @@ public async Task Ctor_DefineNoEncoding_DefaultEncodingUsed() } [Fact] - public void Ctor_PassNullForMediaType_DefaultMediaTypeUsed() + public void Ctor_PassNullStringForMediaType_DefaultMediaTypeUsed() { string sourceString = "\u00C4\u00E4\u00FC\u00DC"; Encoding defaultStringEncoding = Encoding.GetEncoding("utf-8"); @@ -81,7 +81,18 @@ public void Ctor_PassNullForMediaType_DefaultMediaTypeUsed() // If no media is passed-in, the default is used Assert.Equal("text/plain", content.Headers.ContentType.MediaType); } - + + [Fact] + public void Ctor_PassNullHeaderValueForMediaType_NoMediaTypeUsed() + { + string sourceString = "\u00C4\u00E4\u00FC\u00DC"; + Encoding defaultStringEncoding = Encoding.GetEncoding("utf-8"); + var content = new StringContent(sourceString, defaultStringEncoding, ((Headers.MediaTypeHeaderValue)null)!); + + // If no media header value is passed-in, there is none + Assert.Null(content.Headers.ContentType); + } + [Fact] public async Task Ctor_UseCustomMediaTypeHeaderValue_SpecificEncoding() { diff --git a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Directory.Build.props b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Directory.Build.props index 3ee8cbfa7ae059..878bb843bbdf5f 100644 --- a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Directory.Build.props +++ b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Directory.Build.props @@ -8,9 +8,9 @@ $(RepositoryRoot)src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/*.cs $(RepositoryRoot)eng/targetingpacks.targets - 8.0.0 - net8.0 - 8.0 + 9.0.0 + net9.0 + 9.0 Microsoft.NETCore.App $(RepositoryRoot)artifacts/bin/microsoft.netcore.app.ref/ $(RepositoryRoot)artifacts/bin/microsoft.netcore.app.runtime.$(OutputRID)/$(Configuration)/ diff --git a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Directory.Build.targets b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Directory.Build.targets index e3ebd0de328758..db6e799e071df0 100644 --- a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Directory.Build.targets +++ b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Directory.Build.targets @@ -6,6 +6,6 @@ Define this here because the SDK resets it unconditionally in Microsoft.NETCoreSdk.BundledVersions.props. --> - 8.0 + 9.0 \ No newline at end of file diff --git a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/build-local.ps1 b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/build-local.ps1 index dbdd2e696c6344..19085c5af766cc 100644 --- a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/build-local.ps1 +++ b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/build-local.ps1 @@ -3,7 +3,7 @@ ## Usage: ## ./build-local.ps1 [StressConfiguration] [LibrariesConfiguration] -$Version="8.0" +$Version="9.0" $RepoRoot="$(git rev-parse --show-toplevel)" $DailyDotnetRoot= "./.dotnet-daily" diff --git a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/build-local.sh b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/build-local.sh index f5a0e2b784575c..44b5dbf21139fa 100755 --- a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/build-local.sh +++ b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/build-local.sh @@ -5,7 +5,7 @@ ## Usage: ## ./build-local.sh [StressConfiguration] [LibrariesConfiguration] -version=8.0 +version=9.0 repo_root=$(git rev-parse --show-toplevel) daily_dotnet_root=./.dotnet-daily diff --git a/src/libraries/System.Net.HttpListener/System.Net.HttpListener.sln b/src/libraries/System.Net.HttpListener/System.Net.HttpListener.sln index 43717d104d4a44..379e66746afc10 100644 --- a/src/libraries/System.Net.HttpListener/System.Net.HttpListener.sln +++ b/src/libraries/System.Net.HttpListener/System.Net.HttpListener.sln @@ -49,6 +49,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Claims", ". EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography", "..\System.Security.Cryptography\ref\System.Security.Cryptography.csproj", "{15D0602C-AE8A-4B74-AD03-884A04F438E5}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{77A46CB6-B34E-4862-91A2-D03974CD99AA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{611334B0-BB85-4C75-BBB4-F0A03B64ACD9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{BEDBD417-762A-499A-AFF4-C1E08DBB1B3D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{6C71EED3-9905-424B-853F-4E7B5052A015}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{A37AF272-36AC-41C7-8ED8-C55D7D7F2286}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{AE12BA12-7BDB-4361-922F-AAA100384926}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{A3A29B10-F45E-487B-A2A0-EA809B62AF9D}" @@ -57,6 +67,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{633A5486-761 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{D79781B1-8197-4641-9DE7-B9F22C71FBB9}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{F6945715-9534-4427-9DA8-83AE756B16A0}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{467E7661-6164-4F9B-8FC7-71D8A7E888BB}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{210A7BA3-683A-40D8-8FC2-96AE34E1E7D9}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{A5203398-DB4E-47F0-BB0F-30B23FC0BF97}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -163,6 +181,26 @@ Global {15D0602C-AE8A-4B74-AD03-884A04F438E5}.Debug|Any CPU.Build.0 = Debug|Any CPU {15D0602C-AE8A-4B74-AD03-884A04F438E5}.Release|Any CPU.ActiveCfg = Release|Any CPU {15D0602C-AE8A-4B74-AD03-884A04F438E5}.Release|Any CPU.Build.0 = Release|Any CPU + {77A46CB6-B34E-4862-91A2-D03974CD99AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {77A46CB6-B34E-4862-91A2-D03974CD99AA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {77A46CB6-B34E-4862-91A2-D03974CD99AA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {77A46CB6-B34E-4862-91A2-D03974CD99AA}.Release|Any CPU.Build.0 = Release|Any CPU + {611334B0-BB85-4C75-BBB4-F0A03B64ACD9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {611334B0-BB85-4C75-BBB4-F0A03B64ACD9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {611334B0-BB85-4C75-BBB4-F0A03B64ACD9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {611334B0-BB85-4C75-BBB4-F0A03B64ACD9}.Release|Any CPU.Build.0 = Release|Any CPU + {BEDBD417-762A-499A-AFF4-C1E08DBB1B3D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BEDBD417-762A-499A-AFF4-C1E08DBB1B3D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BEDBD417-762A-499A-AFF4-C1E08DBB1B3D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BEDBD417-762A-499A-AFF4-C1E08DBB1B3D}.Release|Any CPU.Build.0 = Release|Any CPU + {6C71EED3-9905-424B-853F-4E7B5052A015}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6C71EED3-9905-424B-853F-4E7B5052A015}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6C71EED3-9905-424B-853F-4E7B5052A015}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6C71EED3-9905-424B-853F-4E7B5052A015}.Release|Any CPU.Build.0 = Release|Any CPU + {A37AF272-36AC-41C7-8ED8-C55D7D7F2286}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A37AF272-36AC-41C7-8ED8-C55D7D7F2286}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A37AF272-36AC-41C7-8ED8-C55D7D7F2286}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A37AF272-36AC-41C7-8ED8-C55D7D7F2286}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -193,6 +231,14 @@ Global {E334C95C-CF2A-4E1A-BD1F-1C61A87CD703} = {D79781B1-8197-4641-9DE7-B9F22C71FBB9} {48A9D75A-BB0F-425F-A1B0-25741CB85E57} = {D79781B1-8197-4641-9DE7-B9F22C71FBB9} {154F91AC-8E70-49E6-9C97-0DDBD50AFB56} = {D79781B1-8197-4641-9DE7-B9F22C71FBB9} + {77A46CB6-B34E-4862-91A2-D03974CD99AA} = {F6945715-9534-4427-9DA8-83AE756B16A0} + {611334B0-BB85-4C75-BBB4-F0A03B64ACD9} = {F6945715-9534-4427-9DA8-83AE756B16A0} + {F6945715-9534-4427-9DA8-83AE756B16A0} = {A5203398-DB4E-47F0-BB0F-30B23FC0BF97} + {BEDBD417-762A-499A-AFF4-C1E08DBB1B3D} = {467E7661-6164-4F9B-8FC7-71D8A7E888BB} + {6C71EED3-9905-424B-853F-4E7B5052A015} = {467E7661-6164-4F9B-8FC7-71D8A7E888BB} + {467E7661-6164-4F9B-8FC7-71D8A7E888BB} = {A5203398-DB4E-47F0-BB0F-30B23FC0BF97} + {A37AF272-36AC-41C7-8ED8-C55D7D7F2286} = {210A7BA3-683A-40D8-8FC2-96AE34E1E7D9} + {210A7BA3-683A-40D8-8FC2-96AE34E1E7D9} = {A5203398-DB4E-47F0-BB0F-30B23FC0BF97} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {19365E8B-E996-4E55-B468-A126849865D8} diff --git a/src/libraries/System.Net.HttpListener/src/System/Net/Managed/HttpConnection.cs b/src/libraries/System.Net.HttpListener/src/System/Net/Managed/HttpConnection.cs index 37e5d239f427b9..efb5296e3503f5 100644 --- a/src/libraries/System.Net.HttpListener/src/System/Net/Managed/HttpConnection.cs +++ b/src/libraries/System.Net.HttpListener/src/System/Net/Managed/HttpConnection.cs @@ -237,8 +237,17 @@ public HttpResponseStream GetResponseStream() private static void OnRead(IAsyncResult ares) { - HttpConnection cnc = (HttpConnection)ares.AsyncState!; - cnc.OnReadInternal(ares); + HttpConnection? cnc = null; + try + { + cnc = (HttpConnection)ares.AsyncState!; + cnc.OnReadInternal(ares); + } + catch + { + cnc?.Close(true); + return; + } } private void OnReadInternal(IAsyncResult ares) diff --git a/src/libraries/System.Net.Mail/System.Net.Mail.sln b/src/libraries/System.Net.Mail/System.Net.Mail.sln index c2d84c2b911c33..5ed784cddea1eb 100644 --- a/src/libraries/System.Net.Mail/System.Net.Mail.sln +++ b/src/libraries/System.Net.Mail/System.Net.Mail.sln @@ -57,6 +57,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Principal.W EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading", "..\System.Threading\ref\System.Threading.csproj", "{24628602-C0E5-41CA-9570-C02E5E0FC595}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{09BD8BD6-3778-4891-B739-4B04C280E62D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{D2B494E0-8C01-4084-AABD-252CB298C104}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{2CBF9CB9-A479-4263-8C2C-BB90D6EA9E2B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{0B0672B5-A662-47F9-8B90-030301334DB8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{D6533833-9DA1-4AFC-969A-DFC655AF855B}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{DFA479C6-DDF9-4AE0-91BB-08041FF1B7C8}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{A08D08E8-610F-47A0-8747-01223F9430C5}" @@ -65,6 +75,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{04FF7F43-59F EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{461D78A2-743F-40F0-B301-274F2687D84F}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{514636E4-391A-44B6-85BF-1D3BF7D2D129}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{AC1DFAB7-579E-4773-A72C-2AD5EAB081A0}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{B1895DC0-F72B-4DBB-BE05-A7DE827BD240}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{F5D945B7-D7CD-4F03-A689-7EADB562C2E3}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -187,6 +205,26 @@ Global {24628602-C0E5-41CA-9570-C02E5E0FC595}.Debug|Any CPU.Build.0 = Debug|Any CPU {24628602-C0E5-41CA-9570-C02E5E0FC595}.Release|Any CPU.ActiveCfg = Release|Any CPU {24628602-C0E5-41CA-9570-C02E5E0FC595}.Release|Any CPU.Build.0 = Release|Any CPU + {09BD8BD6-3778-4891-B739-4B04C280E62D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {09BD8BD6-3778-4891-B739-4B04C280E62D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {09BD8BD6-3778-4891-B739-4B04C280E62D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {09BD8BD6-3778-4891-B739-4B04C280E62D}.Release|Any CPU.Build.0 = Release|Any CPU + {D2B494E0-8C01-4084-AABD-252CB298C104}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D2B494E0-8C01-4084-AABD-252CB298C104}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D2B494E0-8C01-4084-AABD-252CB298C104}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D2B494E0-8C01-4084-AABD-252CB298C104}.Release|Any CPU.Build.0 = Release|Any CPU + {2CBF9CB9-A479-4263-8C2C-BB90D6EA9E2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2CBF9CB9-A479-4263-8C2C-BB90D6EA9E2B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2CBF9CB9-A479-4263-8C2C-BB90D6EA9E2B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2CBF9CB9-A479-4263-8C2C-BB90D6EA9E2B}.Release|Any CPU.Build.0 = Release|Any CPU + {0B0672B5-A662-47F9-8B90-030301334DB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0B0672B5-A662-47F9-8B90-030301334DB8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0B0672B5-A662-47F9-8B90-030301334DB8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0B0672B5-A662-47F9-8B90-030301334DB8}.Release|Any CPU.Build.0 = Release|Any CPU + {D6533833-9DA1-4AFC-969A-DFC655AF855B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D6533833-9DA1-4AFC-969A-DFC655AF855B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D6533833-9DA1-4AFC-969A-DFC655AF855B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D6533833-9DA1-4AFC-969A-DFC655AF855B}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -221,6 +259,14 @@ Global {628EF453-C5BA-437B-9467-A037E19C945E} = {461D78A2-743F-40F0-B301-274F2687D84F} {34D84D8A-9D29-4ED5-B46D-A772E521E2CF} = {461D78A2-743F-40F0-B301-274F2687D84F} {301EA337-1D9A-47EF-966B-0ED0568C569A} = {461D78A2-743F-40F0-B301-274F2687D84F} + {09BD8BD6-3778-4891-B739-4B04C280E62D} = {514636E4-391A-44B6-85BF-1D3BF7D2D129} + {D2B494E0-8C01-4084-AABD-252CB298C104} = {514636E4-391A-44B6-85BF-1D3BF7D2D129} + {514636E4-391A-44B6-85BF-1D3BF7D2D129} = {F5D945B7-D7CD-4F03-A689-7EADB562C2E3} + {2CBF9CB9-A479-4263-8C2C-BB90D6EA9E2B} = {AC1DFAB7-579E-4773-A72C-2AD5EAB081A0} + {0B0672B5-A662-47F9-8B90-030301334DB8} = {AC1DFAB7-579E-4773-A72C-2AD5EAB081A0} + {AC1DFAB7-579E-4773-A72C-2AD5EAB081A0} = {F5D945B7-D7CD-4F03-A689-7EADB562C2E3} + {D6533833-9DA1-4AFC-969A-DFC655AF855B} = {B1895DC0-F72B-4DBB-BE05-A7DE827BD240} + {B1895DC0-F72B-4DBB-BE05-A7DE827BD240} = {F5D945B7-D7CD-4F03-A689-7EADB562C2E3} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {5A7D0500-9878-41E4-B10B-94A5E2CCE8B8} diff --git a/src/libraries/System.Net.Mail/src/System/Net/Mime/MediaTypeNames.cs b/src/libraries/System.Net.Mail/src/System/Net/Mime/MediaTypeNames.cs index f0f2cdad26e65e..859cd8e78d075c 100644 --- a/src/libraries/System.Net.Mail/src/System/Net/Mime/MediaTypeNames.cs +++ b/src/libraries/System.Net.Mail/src/System/Net/Mime/MediaTypeNames.cs @@ -5,65 +5,149 @@ namespace System.Net.Mime { public static class MediaTypeNames { + /// Specifies the kind of application data in an email message attachment. public static class Application { + /// Specifies that the data consists of url-encoded key-value pairs. public const string FormUrlEncoded = "application/x-www-form-urlencoded"; + + /// Specifies that the data is in JSON format. public const string Json = "application/json"; + + /// Specifies that the data is in JSON patch format. public const string JsonPatch = "application/json-patch+json"; + + /// Specifies that the data is in JSON text sequence format. public const string JsonSequence = "application/json-seq"; + + /// Specifies that the data is in Web Application Manifest. public const string Manifest = "application/manifest+json"; + + /// Specifies that the data is not interpreted. public const string Octet = "application/octet-stream"; + + /// Specifies that the data is in Portable Document Format (PDF). public const string Pdf = "application/pdf"; + + /// Specifies that the data is in JSON problem detail format. public const string ProblemJson = "application/problem+json"; + + /// Specifies that the data is in XML problem detail format. public const string ProblemXml = "application/problem+xml"; + + /// Specifies that the data is in Rich Text Format (RTF). public const string Rtf = "application/rtf"; + + /// Specifies that the data is a SOAP document. public const string Soap = "application/soap+xml"; + + /// Specifies that the data is in WASM format. public const string Wasm = "application/wasm"; + + /// Specifies that the data is in XML format. public const string Xml = "application/xml"; + + /// Specifies that the data is in XML Document Type Definition format. public const string XmlDtd = "application/xml-dtd"; + + /// Specifies that the data is in XML patch format. public const string XmlPatch = "application/xml-patch+xml"; + + /// Specifies that the data is compressed. public const string Zip = "application/zip"; } + /// Specifies the kind of font data in an email message attachment. public static class Font { + /// Specifies that the data is in font type collection format. public const string Collection = "font/collection"; + + /// Specifies that the data is in OpenType Layout (OTF) format. public const string Otf = "font/otf"; + + /// Specifies that the data is in SFNT format. public const string Sfnt = "font/sfnt"; + + /// Specifies that the data is in TrueType font (TTF) format. public const string Ttf = "font/ttf"; + + /// Specifies that the data is in WOFF format. public const string Woff = "font/woff"; + + /// Specifies that the data is in WOFF2 format. public const string Woff2 = "font/woff2"; } + /// Specifies the kind of image data in an email message attachment. public static class Image { + /// Specifies that the data is in AVIF format. public const string Avif = "image/avif"; + + /// Specifies that the data is in BMP format. public const string Bmp = "image/bmp"; + + /// Specifies that the data is in GIF format. public const string Gif = "image/gif"; + + /// Specifies that the data is in ICO format. public const string Icon = "image/x-icon"; + + /// Specifies that the data is in JPEG format. public const string Jpeg = "image/jpeg"; + + /// Specifies that the data is in PNG format. public const string Png = "image/png"; + + /// Specifies that the data is in SVG format. public const string Svg = "image/svg+xml"; + + /// Specifies that the data is in TIFF format. public const string Tiff = "image/tiff"; + + /// Specifies that the data is in WEBP format. public const string Webp = "image/webp"; } + /// Specifies the kind of multipart data in an email message attachment. public static class Multipart { + /// Specifies that the data consists of multiple byte ranges. public const string ByteRanges = "multipart/byteranges"; + + /// Specifies that the data is in form data format. public const string FormData = "multipart/form-data"; } + /// Specifies the kind of text data in an email message attachment. public static class Text { + /// Specifies that the data is in CSS format. public const string Css = "text/css"; + + /// Specifies that the data is in CSV format. public const string Csv = "text/csv"; + + /// Specifies that the data is in HTML format. public const string Html = "text/html"; + + /// Specifies that the data is in JavaScript format. public const string JavaScript = "text/javascript"; + + /// Specifies that the data is in Markdown format. public const string Markdown = "text/markdown"; + + /// Specifies that the data is in plain text format. public const string Plain = "text/plain"; + + /// Specifies that the data is in Rich Text Format (RTF). public const string RichText = "text/richtext"; + + /// Specifies that the data is in Rich Text Format (RTF). public const string Rtf = "text/rtf"; + + /// Specifies that the data is in XML format. public const string Xml = "text/xml"; } } diff --git a/src/libraries/System.Net.NameResolution/System.Net.NameResolution.sln b/src/libraries/System.Net.NameResolution/System.Net.NameResolution.sln index 3874ca182c000f..e41d2d150b0915 100644 --- a/src/libraries/System.Net.NameResolution/System.Net.NameResolution.sln +++ b/src/libraries/System.Net.NameResolution/System.Net.NameResolution.sln @@ -25,6 +25,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.InteropServi EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{149A3A68-0124-42FF-BB87-EBEC6D035251}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{85113E09-04F4-436C-BF0E-F49BAD412DF6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{9E3990D7-1753-49E4-933A-42D4C2AEDE86}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{F9D21D9E-65F0-42BD-A0B9-EF36E327BAD1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{A0C2EC78-22E5-4605-92E1-874F5D2F37D5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{185F10CA-1ABA-426A-94E7-E3DCA6A725B3}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{6E7B2B93-21B0-457F-84C3-AE62DABC73E2}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{47DBE178-9476-4595-9C71-424D54314C2E}" @@ -33,6 +43,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{3DDE175F-17B EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{851CDB4C-B092-466E-93BA-D554120B182B}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{2B391C1C-2A28-4B3C-9441-724C5CE77C8D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{D4FB5A04-987F-437E-A108-E6770D77E259}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{CCA739F2-1D4E-440E-B87E-A8DFC99AFC30}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{69EAAE6B-2E95-49CE-9260-153E27BC8A6B}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -91,6 +109,26 @@ Global {149A3A68-0124-42FF-BB87-EBEC6D035251}.Debug|Any CPU.Build.0 = Debug|Any CPU {149A3A68-0124-42FF-BB87-EBEC6D035251}.Release|Any CPU.ActiveCfg = Release|Any CPU {149A3A68-0124-42FF-BB87-EBEC6D035251}.Release|Any CPU.Build.0 = Release|Any CPU + {85113E09-04F4-436C-BF0E-F49BAD412DF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85113E09-04F4-436C-BF0E-F49BAD412DF6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85113E09-04F4-436C-BF0E-F49BAD412DF6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85113E09-04F4-436C-BF0E-F49BAD412DF6}.Release|Any CPU.Build.0 = Release|Any CPU + {9E3990D7-1753-49E4-933A-42D4C2AEDE86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9E3990D7-1753-49E4-933A-42D4C2AEDE86}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9E3990D7-1753-49E4-933A-42D4C2AEDE86}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9E3990D7-1753-49E4-933A-42D4C2AEDE86}.Release|Any CPU.Build.0 = Release|Any CPU + {F9D21D9E-65F0-42BD-A0B9-EF36E327BAD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F9D21D9E-65F0-42BD-A0B9-EF36E327BAD1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F9D21D9E-65F0-42BD-A0B9-EF36E327BAD1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F9D21D9E-65F0-42BD-A0B9-EF36E327BAD1}.Release|Any CPU.Build.0 = Release|Any CPU + {A0C2EC78-22E5-4605-92E1-874F5D2F37D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A0C2EC78-22E5-4605-92E1-874F5D2F37D5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A0C2EC78-22E5-4605-92E1-874F5D2F37D5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A0C2EC78-22E5-4605-92E1-874F5D2F37D5}.Release|Any CPU.Build.0 = Release|Any CPU + {185F10CA-1ABA-426A-94E7-E3DCA6A725B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {185F10CA-1ABA-426A-94E7-E3DCA6A725B3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {185F10CA-1ABA-426A-94E7-E3DCA6A725B3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {185F10CA-1ABA-426A-94E7-E3DCA6A725B3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -109,6 +147,14 @@ Global {3AE9C5DE-A09B-401F-B6B6-790854166871} = {851CDB4C-B092-466E-93BA-D554120B182B} {FC0BD396-0280-434B-913B-A17D87892A78} = {851CDB4C-B092-466E-93BA-D554120B182B} {A8357213-6A4D-463F-8364-70ED86147098} = {851CDB4C-B092-466E-93BA-D554120B182B} + {85113E09-04F4-436C-BF0E-F49BAD412DF6} = {2B391C1C-2A28-4B3C-9441-724C5CE77C8D} + {9E3990D7-1753-49E4-933A-42D4C2AEDE86} = {2B391C1C-2A28-4B3C-9441-724C5CE77C8D} + {2B391C1C-2A28-4B3C-9441-724C5CE77C8D} = {69EAAE6B-2E95-49CE-9260-153E27BC8A6B} + {F9D21D9E-65F0-42BD-A0B9-EF36E327BAD1} = {D4FB5A04-987F-437E-A108-E6770D77E259} + {A0C2EC78-22E5-4605-92E1-874F5D2F37D5} = {D4FB5A04-987F-437E-A108-E6770D77E259} + {D4FB5A04-987F-437E-A108-E6770D77E259} = {69EAAE6B-2E95-49CE-9260-153E27BC8A6B} + {185F10CA-1ABA-426A-94E7-E3DCA6A725B3} = {CCA739F2-1D4E-440E-B87E-A8DFC99AFC30} + {CCA739F2-1D4E-440E-B87E-A8DFC99AFC30} = {69EAAE6B-2E95-49CE-9260-153E27BC8A6B} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {9CA07406-6BA5-454C-8C65-3396A977F8A8} diff --git a/src/libraries/System.Net.NetworkInformation/System.Net.NetworkInformation.sln b/src/libraries/System.Net.NetworkInformation/System.Net.NetworkInformation.sln index 1c187b6edb600d..570f1e0a406264 100644 --- a/src/libraries/System.Net.NetworkInformation/System.Net.NetworkInformation.sln +++ b/src/libraries/System.Net.NetworkInformation/System.Net.NetworkInformation.sln @@ -23,6 +23,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.InteropServi EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{2F199597-D0CF-49F4-B6AC-136568ACA101}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{76FE6990-FDCC-407C-A141-17333897C85A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{6E745F77-E9BA-4CF3-8248-3ED452B75658}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{CA47643B-4411-4398-BA9E-F2A456D75C5C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{32E6831D-EA39-427A-B371-C5192D9F461E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{626030A4-7D94-47A1-B755-DCCCCB7C9D7F}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{33058B90-33C6-4731-AF47-DC7678DC2739}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{01C6C981-C56F-453F-B099-C8B9DF61CDEB}" @@ -31,6 +41,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A3CAA996-BF7 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{575528E7-33D8-4375-8B5A-D88215FEE447}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{38149F91-88CE-43C8-A78A-4677279A9CE6}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{7340AEBE-76C9-49D2-8E1E-578DC1CE0379}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{72B5FB5E-4E9C-4D26-ABE7-AB51F0386E80}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{88369369-5B08-41E7-8D5F-08C0920185FE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -85,6 +103,26 @@ Global {2F199597-D0CF-49F4-B6AC-136568ACA101}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F199597-D0CF-49F4-B6AC-136568ACA101}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F199597-D0CF-49F4-B6AC-136568ACA101}.Release|Any CPU.Build.0 = Release|Any CPU + {76FE6990-FDCC-407C-A141-17333897C85A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {76FE6990-FDCC-407C-A141-17333897C85A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {76FE6990-FDCC-407C-A141-17333897C85A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {76FE6990-FDCC-407C-A141-17333897C85A}.Release|Any CPU.Build.0 = Release|Any CPU + {6E745F77-E9BA-4CF3-8248-3ED452B75658}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6E745F77-E9BA-4CF3-8248-3ED452B75658}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6E745F77-E9BA-4CF3-8248-3ED452B75658}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6E745F77-E9BA-4CF3-8248-3ED452B75658}.Release|Any CPU.Build.0 = Release|Any CPU + {CA47643B-4411-4398-BA9E-F2A456D75C5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CA47643B-4411-4398-BA9E-F2A456D75C5C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CA47643B-4411-4398-BA9E-F2A456D75C5C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CA47643B-4411-4398-BA9E-F2A456D75C5C}.Release|Any CPU.Build.0 = Release|Any CPU + {32E6831D-EA39-427A-B371-C5192D9F461E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {32E6831D-EA39-427A-B371-C5192D9F461E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {32E6831D-EA39-427A-B371-C5192D9F461E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {32E6831D-EA39-427A-B371-C5192D9F461E}.Release|Any CPU.Build.0 = Release|Any CPU + {626030A4-7D94-47A1-B755-DCCCCB7C9D7F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {626030A4-7D94-47A1-B755-DCCCCB7C9D7F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {626030A4-7D94-47A1-B755-DCCCCB7C9D7F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {626030A4-7D94-47A1-B755-DCCCCB7C9D7F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -102,6 +140,14 @@ Global {DDE2D5F1-C566-41EA-9482-E587A7DEF254} = {575528E7-33D8-4375-8B5A-D88215FEE447} {D6600B0A-FEE0-4D1E-B42F-88EB016403CF} = {575528E7-33D8-4375-8B5A-D88215FEE447} {1E0ED0DE-76B3-402F-8029-C432E638CE0C} = {575528E7-33D8-4375-8B5A-D88215FEE447} + {76FE6990-FDCC-407C-A141-17333897C85A} = {38149F91-88CE-43C8-A78A-4677279A9CE6} + {6E745F77-E9BA-4CF3-8248-3ED452B75658} = {38149F91-88CE-43C8-A78A-4677279A9CE6} + {38149F91-88CE-43C8-A78A-4677279A9CE6} = {88369369-5B08-41E7-8D5F-08C0920185FE} + {CA47643B-4411-4398-BA9E-F2A456D75C5C} = {7340AEBE-76C9-49D2-8E1E-578DC1CE0379} + {32E6831D-EA39-427A-B371-C5192D9F461E} = {7340AEBE-76C9-49D2-8E1E-578DC1CE0379} + {7340AEBE-76C9-49D2-8E1E-578DC1CE0379} = {88369369-5B08-41E7-8D5F-08C0920185FE} + {626030A4-7D94-47A1-B755-DCCCCB7C9D7F} = {72B5FB5E-4E9C-4D26-ABE7-AB51F0386E80} + {72B5FB5E-4E9C-4D26-ABE7-AB51F0386E80} = {88369369-5B08-41E7-8D5F-08C0920185FE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {6749EC2E-042F-4132-9B0A-82ED7F56513C} diff --git a/src/libraries/System.Net.Ping/System.Net.Ping.sln b/src/libraries/System.Net.Ping/System.Net.Ping.sln index d1e975b671ad16..aea9d6c1b777c1 100644 --- a/src/libraries/System.Net.Ping/System.Net.Ping.sln +++ b/src/libraries/System.Net.Ping/System.Net.Ping.sln @@ -35,6 +35,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading", "..\System.Threading\ref\System.Threading.csproj", "{200D7714-61DF-490B-8A37-ABB93B3A2861}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{2C09100E-DBC4-4462-8D86-E429E2EC8C5C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{1E15AD35-9948-4D20-A2A6-1653FDCCB903}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{06C415F2-23A7-43AF-977C-8E6E89256705}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{F4DDF4DE-0D28-497B-83CB-8BE18A890124}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{8697D398-2A0F-4D86-812A-694B25BFF61D}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{FABDD2DA-5365-4FD2-8C67-4C643E618CE9}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{AAB0D01D-C3A4-4E09-9BFD-CBC737A3CA73}" @@ -43,6 +53,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A687595D-ACC EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{D26792B6-6D00-4CC0-B60B-7028F377BD4F}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{8A7756DC-E949-418A-93A2-C4BE96CD25ED}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{A91018DA-C721-4F45-8817-2F8A16DD9407}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{CE3FD391-E196-4E6F-92F8-4172334834AD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{4B868FF8-F623-47AC-A6BC-6BCA4A6C4FBC}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -121,6 +139,26 @@ Global {200D7714-61DF-490B-8A37-ABB93B3A2861}.Debug|Any CPU.Build.0 = Debug|Any CPU {200D7714-61DF-490B-8A37-ABB93B3A2861}.Release|Any CPU.ActiveCfg = Release|Any CPU {200D7714-61DF-490B-8A37-ABB93B3A2861}.Release|Any CPU.Build.0 = Release|Any CPU + {2C09100E-DBC4-4462-8D86-E429E2EC8C5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2C09100E-DBC4-4462-8D86-E429E2EC8C5C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2C09100E-DBC4-4462-8D86-E429E2EC8C5C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2C09100E-DBC4-4462-8D86-E429E2EC8C5C}.Release|Any CPU.Build.0 = Release|Any CPU + {1E15AD35-9948-4D20-A2A6-1653FDCCB903}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1E15AD35-9948-4D20-A2A6-1653FDCCB903}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1E15AD35-9948-4D20-A2A6-1653FDCCB903}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1E15AD35-9948-4D20-A2A6-1653FDCCB903}.Release|Any CPU.Build.0 = Release|Any CPU + {06C415F2-23A7-43AF-977C-8E6E89256705}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {06C415F2-23A7-43AF-977C-8E6E89256705}.Debug|Any CPU.Build.0 = Debug|Any CPU + {06C415F2-23A7-43AF-977C-8E6E89256705}.Release|Any CPU.ActiveCfg = Release|Any CPU + {06C415F2-23A7-43AF-977C-8E6E89256705}.Release|Any CPU.Build.0 = Release|Any CPU + {F4DDF4DE-0D28-497B-83CB-8BE18A890124}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F4DDF4DE-0D28-497B-83CB-8BE18A890124}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F4DDF4DE-0D28-497B-83CB-8BE18A890124}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F4DDF4DE-0D28-497B-83CB-8BE18A890124}.Release|Any CPU.Build.0 = Release|Any CPU + {8697D398-2A0F-4D86-812A-694B25BFF61D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8697D398-2A0F-4D86-812A-694B25BFF61D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8697D398-2A0F-4D86-812A-694B25BFF61D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8697D398-2A0F-4D86-812A-694B25BFF61D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -144,6 +182,14 @@ Global {85E42E20-BD03-4417-8E0D-693CE3ED9BFE} = {D26792B6-6D00-4CC0-B60B-7028F377BD4F} {26E69A05-FCF8-4D01-A93A-F97FE4B92D74} = {D26792B6-6D00-4CC0-B60B-7028F377BD4F} {B59DB44D-8E1E-4F62-A223-E3AC71BB0370} = {D26792B6-6D00-4CC0-B60B-7028F377BD4F} + {2C09100E-DBC4-4462-8D86-E429E2EC8C5C} = {8A7756DC-E949-418A-93A2-C4BE96CD25ED} + {1E15AD35-9948-4D20-A2A6-1653FDCCB903} = {8A7756DC-E949-418A-93A2-C4BE96CD25ED} + {8A7756DC-E949-418A-93A2-C4BE96CD25ED} = {4B868FF8-F623-47AC-A6BC-6BCA4A6C4FBC} + {06C415F2-23A7-43AF-977C-8E6E89256705} = {A91018DA-C721-4F45-8817-2F8A16DD9407} + {F4DDF4DE-0D28-497B-83CB-8BE18A890124} = {A91018DA-C721-4F45-8817-2F8A16DD9407} + {A91018DA-C721-4F45-8817-2F8A16DD9407} = {4B868FF8-F623-47AC-A6BC-6BCA4A6C4FBC} + {8697D398-2A0F-4D86-812A-694B25BFF61D} = {CE3FD391-E196-4E6F-92F8-4172334834AD} + {CE3FD391-E196-4E6F-92F8-4172334834AD} = {4B868FF8-F623-47AC-A6BC-6BCA4A6C4FBC} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {23612E2C-7AC3-4D7B-812D-44BB88E94278} diff --git a/src/libraries/System.Net.Primitives/System.Net.Primitives.sln b/src/libraries/System.Net.Primitives/System.Net.Primitives.sln index c48860220438cb..9f96cbb4b55978 100644 --- a/src/libraries/System.Net.Primitives/System.Net.Primitives.sln +++ b/src/libraries/System.Net.Primitives/System.Net.Primitives.sln @@ -25,6 +25,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.InteropServi EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{B7492470-68D0-4938-8048-BBDD2EC2541E}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{BC5985B8-25E7-41FB-8D83-7D0A9960B90D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{01CE4000-E9A0-48CC-9156-582213B37397}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{EE51F074-6B3A-4A7B-BA03-06057024F1DC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{D2F0AD86-F328-4FE8-A1CB-AEA11BE314BC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{870C116F-8261-440E-A677-2195E858A662}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{909A147A-476E-4E34-A931-C2C65FD656A6}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{212A5562-EFE7-4220-94EC-6B49C0A6DCEF}" @@ -33,6 +43,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{97419593-C13 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{6DD9FC21-AB33-4068-BC80-B4B89B7C99C9}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{755EE99F-4EA2-4CB1-868F-3786B3553EE3}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{84B45470-6F76-49DD-9782-229F451C21E8}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{D1AB3906-69CC-4712-BC07-AAA4527DD38B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{D3E16210-AB55-4459-B9E2-FE4089558D5E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -91,6 +109,26 @@ Global {B7492470-68D0-4938-8048-BBDD2EC2541E}.Debug|Any CPU.Build.0 = Debug|Any CPU {B7492470-68D0-4938-8048-BBDD2EC2541E}.Release|Any CPU.ActiveCfg = Release|Any CPU {B7492470-68D0-4938-8048-BBDD2EC2541E}.Release|Any CPU.Build.0 = Release|Any CPU + {BC5985B8-25E7-41FB-8D83-7D0A9960B90D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BC5985B8-25E7-41FB-8D83-7D0A9960B90D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BC5985B8-25E7-41FB-8D83-7D0A9960B90D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BC5985B8-25E7-41FB-8D83-7D0A9960B90D}.Release|Any CPU.Build.0 = Release|Any CPU + {01CE4000-E9A0-48CC-9156-582213B37397}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {01CE4000-E9A0-48CC-9156-582213B37397}.Debug|Any CPU.Build.0 = Debug|Any CPU + {01CE4000-E9A0-48CC-9156-582213B37397}.Release|Any CPU.ActiveCfg = Release|Any CPU + {01CE4000-E9A0-48CC-9156-582213B37397}.Release|Any CPU.Build.0 = Release|Any CPU + {EE51F074-6B3A-4A7B-BA03-06057024F1DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EE51F074-6B3A-4A7B-BA03-06057024F1DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EE51F074-6B3A-4A7B-BA03-06057024F1DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EE51F074-6B3A-4A7B-BA03-06057024F1DC}.Release|Any CPU.Build.0 = Release|Any CPU + {D2F0AD86-F328-4FE8-A1CB-AEA11BE314BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D2F0AD86-F328-4FE8-A1CB-AEA11BE314BC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D2F0AD86-F328-4FE8-A1CB-AEA11BE314BC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D2F0AD86-F328-4FE8-A1CB-AEA11BE314BC}.Release|Any CPU.Build.0 = Release|Any CPU + {870C116F-8261-440E-A677-2195E858A662}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {870C116F-8261-440E-A677-2195E858A662}.Debug|Any CPU.Build.0 = Debug|Any CPU + {870C116F-8261-440E-A677-2195E858A662}.Release|Any CPU.ActiveCfg = Release|Any CPU + {870C116F-8261-440E-A677-2195E858A662}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -109,6 +147,14 @@ Global {2F6BED4C-3D02-4D55-83FA-81F6368260C5} = {6DD9FC21-AB33-4068-BC80-B4B89B7C99C9} {780F4FEF-204D-4EE0-8072-884A9EF7FE9E} = {6DD9FC21-AB33-4068-BC80-B4B89B7C99C9} {160E40E8-0148-4D87-86D2-1F1918BD36F0} = {6DD9FC21-AB33-4068-BC80-B4B89B7C99C9} + {BC5985B8-25E7-41FB-8D83-7D0A9960B90D} = {755EE99F-4EA2-4CB1-868F-3786B3553EE3} + {01CE4000-E9A0-48CC-9156-582213B37397} = {755EE99F-4EA2-4CB1-868F-3786B3553EE3} + {755EE99F-4EA2-4CB1-868F-3786B3553EE3} = {D3E16210-AB55-4459-B9E2-FE4089558D5E} + {EE51F074-6B3A-4A7B-BA03-06057024F1DC} = {84B45470-6F76-49DD-9782-229F451C21E8} + {D2F0AD86-F328-4FE8-A1CB-AEA11BE314BC} = {84B45470-6F76-49DD-9782-229F451C21E8} + {84B45470-6F76-49DD-9782-229F451C21E8} = {D3E16210-AB55-4459-B9E2-FE4089558D5E} + {870C116F-8261-440E-A677-2195E858A662} = {D1AB3906-69CC-4712-BC07-AAA4527DD38B} + {D1AB3906-69CC-4712-BC07-AAA4527DD38B} = {D3E16210-AB55-4459-B9E2-FE4089558D5E} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {E0D36CFB-AD15-487D-A647-F12B577FC5DF} diff --git a/src/libraries/System.Net.Primitives/src/Resources/Strings.resx b/src/libraries/System.Net.Primitives/src/Resources/Strings.resx index 958a0e2e269f99..65d4809398b3b2 100644 --- a/src/libraries/System.Net.Primitives/src/Resources/Strings.resx +++ b/src/libraries/System.Net.Primitives/src/Resources/Strings.resx @@ -64,7 +64,7 @@ This property is not implemented by this class. - The AddressFamily {0} is not valid for the {1} end point, use {2} instead. + The AddressFamily {0} is not valid for the {1} end point. The supplied {0} is an invalid size for the {1} end point. diff --git a/src/libraries/System.Net.Primitives/src/System/Net/IPEndPoint.cs b/src/libraries/System.Net.Primitives/src/System/Net/IPEndPoint.cs index 3531f266e6c504..ff47d2fbc515ef 100644 --- a/src/libraries/System.Net.Primitives/src/System/Net/IPEndPoint.cs +++ b/src/libraries/System.Net.Primitives/src/System/Net/IPEndPoint.cs @@ -155,9 +155,9 @@ public override EndPoint Create(SocketAddress socketAddress) { ArgumentNullException.ThrowIfNull(socketAddress); - if (socketAddress.Family != AddressFamily) - { - throw new ArgumentException(SR.Format(SR.net_InvalidAddressFamily, socketAddress.Family.ToString(), GetType().FullName, AddressFamily.ToString()), nameof(socketAddress)); + if (socketAddress.Family is not (AddressFamily.InterNetwork or AddressFamily.InterNetworkV6)) + { + throw new ArgumentException(SR.Format(SR.net_InvalidAddressFamily, socketAddress.Family.ToString(), GetType().FullName), nameof(socketAddress)); } int minSize = AddressFamily == AddressFamily.InterNetworkV6 ? SocketAddress.IPv6AddressSize : SocketAddress.IPv4AddressSize; diff --git a/src/libraries/System.Net.Primitives/tests/FunctionalTests/IPEndPointTest.cs b/src/libraries/System.Net.Primitives/tests/FunctionalTests/IPEndPointTest.cs index bb9b95d438e99f..c233dee628dfeb 100644 --- a/src/libraries/System.Net.Primitives/tests/FunctionalTests/IPEndPointTest.cs +++ b/src/libraries/System.Net.Primitives/tests/FunctionalTests/IPEndPointTest.cs @@ -143,6 +143,19 @@ public static void ToString_Invoke_ReturnsExpected(IPEndPoint endPoint, string e Assert.Equal(expected, endPoint.ToString()); } + [Fact] + public static void Create_DifferentAF_Success() + { + SocketAddress sa = new SocketAddress(AddressFamily.InterNetwork, SocketAddress.GetMaximumAddressSize(AddressFamily.InterNetworkV6)); + var ep = new IPEndPoint(IPAddress.IPv6Any, 0); + Assert.NotNull(ep.Create(sa)); + + sa = new SocketAddress(AddressFamily.InterNetworkV6); + ep = new IPEndPoint(IPAddress.Any, 0); + + Assert.NotNull(ep.Create(sa)); + } + public static IEnumerable Serialize_TestData() { yield return new object[] { new IPAddress(2), 16 }; @@ -195,8 +208,7 @@ public static void Create_NullSocketAddress_ThrowsArgumentNullException() public static IEnumerable Create_InvalidAddressFamily_TestData() { - yield return new object[] { new IPEndPoint(2, 500), new SocketAddress(Sockets.AddressFamily.InterNetworkV6) }; - yield return new object[] { new IPEndPoint(IPAddress.Parse("192.169.0.9"), 500), new SocketAddress(Sockets.AddressFamily.InterNetworkV6) }; + yield return new object[] { new IPEndPoint(2, 500), new SocketAddress(Sockets.AddressFamily.Unknown) }; yield return new object[] { new IPEndPoint(IPAddress.Parse("0:0:0:0:0:0:0:1"), 500), new SocketAddress(Sockets.AddressFamily.InterNetwork) }; } diff --git a/src/libraries/System.Net.Quic/System.Net.Quic.sln b/src/libraries/System.Net.Quic/System.Net.Quic.sln index 2fe77a3359170e..e6d0df2c3c71ca 100644 --- a/src/libraries/System.Net.Quic/System.Net.Quic.sln +++ b/src/libraries/System.Net.Quic/System.Net.Quic.sln @@ -37,6 +37,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography", "..\System.Security.Cryptography\ref\System.Security.Cryptography.csproj", "{569A37E6-CEC4-4AAA-A364-65A70CAAB8F3}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{03F35F42-0689-4C45-917A-4051F074976A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{EC456478-DABF-462B-83F8-A5E646CECEFE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{E70F79E0-F411-4368-8DC3-C8C60AD3FE9E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{A978AD93-842E-4858-A3E6-06016CD1CA5F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{594B8C80-7605-4BEA-BFEB-86643C63294B}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{12C4206E-D19B-44BF-8002-6236D65AAE1B}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{538F3900-95BF-423D-9912-F94B0ECE463C}" @@ -45,6 +55,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{8EF7F530-1F4 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{AA7C6283-6473-4B71-8877-CAB8D75F9469}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{52ACCDCF-33C4-4966-8AFE-B24436F201EF}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{B8C57DA7-E219-4B90-A8E2-FC9DEBAE2046}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{3484E61B-8CDD-45D7-96A9-F851C952984F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{F8F79BAF-C4C7-4AAF-A26E-9A8F5931AC0F}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -127,6 +145,26 @@ Global {569A37E6-CEC4-4AAA-A364-65A70CAAB8F3}.Debug|Any CPU.Build.0 = Debug|Any CPU {569A37E6-CEC4-4AAA-A364-65A70CAAB8F3}.Release|Any CPU.ActiveCfg = Release|Any CPU {569A37E6-CEC4-4AAA-A364-65A70CAAB8F3}.Release|Any CPU.Build.0 = Release|Any CPU + {03F35F42-0689-4C45-917A-4051F074976A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {03F35F42-0689-4C45-917A-4051F074976A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {03F35F42-0689-4C45-917A-4051F074976A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {03F35F42-0689-4C45-917A-4051F074976A}.Release|Any CPU.Build.0 = Release|Any CPU + {EC456478-DABF-462B-83F8-A5E646CECEFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EC456478-DABF-462B-83F8-A5E646CECEFE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EC456478-DABF-462B-83F8-A5E646CECEFE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EC456478-DABF-462B-83F8-A5E646CECEFE}.Release|Any CPU.Build.0 = Release|Any CPU + {E70F79E0-F411-4368-8DC3-C8C60AD3FE9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E70F79E0-F411-4368-8DC3-C8C60AD3FE9E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E70F79E0-F411-4368-8DC3-C8C60AD3FE9E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E70F79E0-F411-4368-8DC3-C8C60AD3FE9E}.Release|Any CPU.Build.0 = Release|Any CPU + {A978AD93-842E-4858-A3E6-06016CD1CA5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A978AD93-842E-4858-A3E6-06016CD1CA5F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A978AD93-842E-4858-A3E6-06016CD1CA5F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A978AD93-842E-4858-A3E6-06016CD1CA5F}.Release|Any CPU.Build.0 = Release|Any CPU + {594B8C80-7605-4BEA-BFEB-86643C63294B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {594B8C80-7605-4BEA-BFEB-86643C63294B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {594B8C80-7605-4BEA-BFEB-86643C63294B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {594B8C80-7605-4BEA-BFEB-86643C63294B}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -151,6 +189,14 @@ Global {1FF213AF-FCCA-419E-A686-321178BC7AD3} = {AA7C6283-6473-4B71-8877-CAB8D75F9469} {C1EDF9E8-5584-47B7-A7D5-C034134DEEC1} = {AA7C6283-6473-4B71-8877-CAB8D75F9469} {E1D4C4F2-B830-4E87-B10D-ADC667213957} = {AA7C6283-6473-4B71-8877-CAB8D75F9469} + {03F35F42-0689-4C45-917A-4051F074976A} = {52ACCDCF-33C4-4966-8AFE-B24436F201EF} + {EC456478-DABF-462B-83F8-A5E646CECEFE} = {52ACCDCF-33C4-4966-8AFE-B24436F201EF} + {52ACCDCF-33C4-4966-8AFE-B24436F201EF} = {F8F79BAF-C4C7-4AAF-A26E-9A8F5931AC0F} + {E70F79E0-F411-4368-8DC3-C8C60AD3FE9E} = {B8C57DA7-E219-4B90-A8E2-FC9DEBAE2046} + {A978AD93-842E-4858-A3E6-06016CD1CA5F} = {B8C57DA7-E219-4B90-A8E2-FC9DEBAE2046} + {B8C57DA7-E219-4B90-A8E2-FC9DEBAE2046} = {F8F79BAF-C4C7-4AAF-A26E-9A8F5931AC0F} + {594B8C80-7605-4BEA-BFEB-86643C63294B} = {3484E61B-8CDD-45D7-96A9-F851C952984F} + {3484E61B-8CDD-45D7-96A9-F851C952984F} = {F8F79BAF-C4C7-4AAF-A26E-9A8F5931AC0F} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {4B59ACCA-7F0C-4062-AA79-B3D75EFACCCD} diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/MsQuicBuffers.cs b/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/MsQuicBuffers.cs index 594245a1cb723d..ba4a5a448b0199 100644 --- a/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/MsQuicBuffers.cs +++ b/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/MsQuicBuffers.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; +using System.Diagnostics; using System.Runtime.InteropServices; using Microsoft.Quic; @@ -32,8 +33,8 @@ private void FreeNativeMemory() { QUIC_BUFFER* buffers = _buffers; _buffers = null; - NativeMemory.Free(buffers); _count = 0; + NativeMemory.Free(buffers); } private void Reserve(int count) @@ -48,6 +49,10 @@ private void Reserve(int count) private void SetBuffer(int index, ReadOnlyMemory buffer) { + Debug.Assert(index < _count); + Debug.Assert(_buffers[index].Buffer is null); + Debug.Assert(_buffers[index].Length == 0); + _buffers[index].Buffer = (byte*)NativeMemory.Alloc((nuint)buffer.Length, (nuint)sizeof(byte)); _buffers[index].Length = (uint)buffer.Length; buffer.Span.CopyTo(_buffers[index].Span); @@ -93,8 +98,8 @@ public void Reset() } byte* buffer = _buffers[i].Buffer; _buffers[i].Buffer = null; - NativeMemory.Free(buffer); _buffers[i].Length = 0; + NativeMemory.Free(buffer); } } diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/MsQuicConfiguration.cs b/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/MsQuicConfiguration.cs index 337884c61a5d3b..1c3b4872df1636 100644 --- a/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/MsQuicConfiguration.cs +++ b/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/MsQuicConfiguration.cs @@ -7,7 +7,6 @@ using System.Security.Cryptography.X509Certificates; using System.Threading; using Microsoft.Quic; -using static Microsoft.Quic.MsQuic; namespace System.Net.Quic; diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/MsQuicExtensions.cs b/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/MsQuicExtensions.cs index a3d7bc6f3f7d3e..5c079f65287415 100644 --- a/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/MsQuicExtensions.cs +++ b/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/MsQuicExtensions.cs @@ -66,6 +66,8 @@ public override string ToString() => $"{{ {nameof(SEND_SHUTDOWN_COMPLETE.Graceful)} = {SEND_SHUTDOWN_COMPLETE.Graceful} }}", QUIC_STREAM_EVENT_TYPE.SHUTDOWN_COMPLETE => $"{{ {nameof(SHUTDOWN_COMPLETE.ConnectionShutdown)} = {SHUTDOWN_COMPLETE.ConnectionShutdown}, {nameof(SHUTDOWN_COMPLETE.ConnectionShutdownByApp)} = {SHUTDOWN_COMPLETE.ConnectionShutdownByApp}, {nameof(SHUTDOWN_COMPLETE.ConnectionClosedRemotely)} = {SHUTDOWN_COMPLETE.ConnectionClosedRemotely}, {nameof(SHUTDOWN_COMPLETE.ConnectionErrorCode)} = {SHUTDOWN_COMPLETE.ConnectionErrorCode}, {nameof(SHUTDOWN_COMPLETE.ConnectionCloseStatus)} = {SHUTDOWN_COMPLETE.ConnectionCloseStatus} }}", + QUIC_STREAM_EVENT_TYPE.IDEAL_SEND_BUFFER_SIZE + => $"{{ {nameof(IDEAL_SEND_BUFFER_SIZE.ByteCount)} = {IDEAL_SEND_BUFFER_SIZE.ByteCount} }}", _ => string.Empty }; } diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/MsQuicTlsSecret.cs b/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/MsQuicTlsSecret.cs index 4c45abe7acd925..ad2b3a87ccf00a 100644 --- a/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/MsQuicTlsSecret.cs +++ b/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/MsQuicTlsSecret.cs @@ -2,11 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. #if DEBUG -using System.Collections.Generic; using System.IO; using System.Runtime.InteropServices; using System.Text; -using System.Threading; using Microsoft.Quic; using static Microsoft.Quic.MsQuic; diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/ReceiveBuffers.cs b/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/ReceiveBuffers.cs index 531ac0171ca070..93f78acc87f028 100644 --- a/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/ReceiveBuffers.cs +++ b/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/ReceiveBuffers.cs @@ -66,7 +66,7 @@ public int CopyFrom(ReadOnlySpan quicBuffers, int totalLength, bool } } - public int CopyTo(Memory buffer, out bool isCompleted, out bool isEmpty) + public int CopyTo(Memory buffer, out bool completed, out bool empty) { lock (_syncRoot) { @@ -79,8 +79,8 @@ public int CopyTo(Memory buffer, out bool isCompleted, out bool isEmpty) _buffer.Discard(copied); } - isCompleted = _buffer.IsEmpty && _final; - isEmpty = _buffer.IsEmpty; + completed = _buffer.IsEmpty && _final; + empty = _buffer.IsEmpty; return copied; } diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/ResettableValueTaskSource.cs b/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/ResettableValueTaskSource.cs index e7c0cf87bfd5d8..c3135042b032b7 100644 --- a/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/ResettableValueTaskSource.cs +++ b/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/ResettableValueTaskSource.cs @@ -26,22 +26,23 @@ private enum State } private State _state; + private bool _hasWaiter; private ManualResetValueTaskSourceCore _valueTaskSource; private CancellationTokenRegistration _cancellationRegistration; + private CancellationToken _cancelledToken; private Action? _cancellationAction; private GCHandle _keepAlive; + private FinalTaskSource _finalTaskSource; - private readonly TaskCompletionSource _finalTaskSource; - - public ResettableValueTaskSource(bool runContinuationsAsynchronously = true) + public ResettableValueTaskSource() { _state = State.None; - _valueTaskSource = new ManualResetValueTaskSourceCore() { RunContinuationsAsynchronously = runContinuationsAsynchronously }; + _hasWaiter = false; + _valueTaskSource = new ManualResetValueTaskSourceCore() { RunContinuationsAsynchronously = true }; _cancellationRegistration = default; + _cancelledToken = default; _keepAlive = default; - - // TODO: defer instantiation only after Task is retrieved - _finalTaskSource = new TaskCompletionSource(runContinuationsAsynchronously ? TaskCreationOptions.RunContinuationsAsynchronously : TaskCreationOptions.None); + _finalTaskSource = new FinalTaskSource(); } /// @@ -56,18 +57,6 @@ public ResettableValueTaskSource(bool runContinuationsAsynchronously = true) /// public bool IsCompleted => (State)Volatile.Read(ref Unsafe.As(ref _state)) == State.Completed; - // TODO: Revisit this with https://github.com/dotnet/runtime/issues/79818 and https://github.com/dotnet/runtime/issues/79911 - public bool KeepAliveReleased - { - get - { - lock (this) - { - return !_keepAlive.IsAllocated; - } - } - } - /// /// Tries to get a value task representing this task source. If this task source is , it'll also transition it into state. /// It prevents concurrent operations from being invoked since it'll return false if the task source was already in state. @@ -91,11 +80,11 @@ public bool TryGetValueTask(out ValueTask valueTask, object? keepAlive = null, C _cancellationRegistration = cancellationToken.UnsafeRegister(static (obj, cancellationToken) => { (ResettableValueTaskSource thisRef, object? target) = ((ResettableValueTaskSource, object?))obj!; - // This will transition the state to Ready. - if (thisRef.TrySetException(new OperationCanceledException(cancellationToken))) + lock (thisRef) { - thisRef._cancellationAction?.Invoke(target); + thisRef._cancelledToken = cancellationToken; } + thisRef._cancellationAction?.Invoke(target); }, (this, keepAlive)); } } @@ -115,11 +104,13 @@ public bool TryGetValueTask(out ValueTask valueTask, object? keepAlive = null, C _state = State.Awaiting; } - // None, Completed, Final: return the current task. + // None, Ready, Completed: return the current task. if (state == State.None || state == State.Ready || state == State.Completed) { + // Remember that the value task with the current version is being given out. + _hasWaiter = true; valueTask = new ValueTask(this, _valueTaskSource.Version); return true; } @@ -130,84 +121,102 @@ public bool TryGetValueTask(out ValueTask valueTask, object? keepAlive = null, C } } - public Task GetFinalTask() => _finalTaskSource.Task; + /// + /// Gets a that will transition to a completed state with the last transition of this source, i.e. into . + /// + /// The that will transition to a completed state with the last transition of this source. + public Task GetFinalTask(object? keepAlive) + { + lock (this) + { + return _finalTaskSource.GetTask(keepAlive); + } + } private bool TryComplete(Exception? exception, bool final) { + // Dispose the cancellation registration before completing the task, so that it cannot run after the awaiting method returned. + // Dispose must be done outside of lock since it will wait on pending cancellation callbacks that can hold the lock from another thread. CancellationTokenRegistration cancellationRegistration = default; - try + lock (this) { - lock (this) + cancellationRegistration = _cancellationRegistration; + _cancellationRegistration = default; + } + cancellationRegistration.Dispose(); + + lock (this) + { + try { - try + State state = _state; + + // Completed: nothing to do. + if (state == State.Completed) { - State state = _state; + return false; + } - // Completed: nothing to do. - if (state == State.Completed) - { - return false; - } + // The task was non-finally completed without having anyone awaiting on it. + // In such case, discard the temporary result and replace it with this final completion. + if (state == State.Ready && !_hasWaiter && final) + { + _valueTaskSource.Reset(); + state = State.None; + } - // If the _valueTaskSource has already been set, we don't want to lose the result by overwriting it. - // So keep it as is and store the result in _finalTaskSource. + // If the _valueTaskSource has already been set, we don't want to lose the result by overwriting it. + // So keep it as is and store the result in _finalTaskSource. + if (state == State.None || + state == State.Awaiting) + { + _state = final ? State.Completed : State.Ready; + } + + // Unblock the current task source and in case of a final also the final task source. + if (exception is not null) + { + // Set up the exception stack trace for the caller. + exception = exception.StackTrace is null ? ExceptionDispatchInfo.SetCurrentStackTrace(exception) : exception; if (state == State.None || state == State.Awaiting) { - _state = final ? State.Completed : State.Ready; + _valueTaskSource.SetException(exception); } - - // Swap the cancellation registration so the one that's been registered gets eventually Disposed. - // Ideally, we would dispose it here, but if the callbacks kicks in, it tries to take the lock held by this thread leading to deadlock. - cancellationRegistration = _cancellationRegistration; - _cancellationRegistration = default; - - // Unblock the current task source and in case of a final also the final task source. - if (exception is not null) + } + else + { + if (state == State.None || + state == State.Awaiting) { - // Set up the exception stack trace for the caller. - exception = exception.StackTrace is null ? ExceptionDispatchInfo.SetCurrentStackTrace(exception) : exception; - if (state == State.None || - state == State.Awaiting) - { - _valueTaskSource.SetException(exception); - } - if (final) - { - return _finalTaskSource.TrySetException(exception); - } - return state != State.Ready; + _valueTaskSource.SetResult(final); } - else + } + if (final) + { + if (_finalTaskSource.TryComplete(exception)) { - if (state == State.None || - state == State.Awaiting) + // Signal the final task only if we don't have another result in the value task source. + // In that case, the final task will be signalled after the value task result is retrieved. + if (state != State.Ready) { - _valueTaskSource.SetResult(final); + _finalTaskSource.TrySignal(out _); } - if (final) - { - return _finalTaskSource.TrySetResult(); - } - return state != State.Ready; + return true; } + return false; } - finally + return state != State.Ready; + } + finally + { + // Un-root the the kept alive object in all cases. + if (_keepAlive.IsAllocated) { - // Un-root the the kept alive object in all cases. - if (_keepAlive.IsAllocated) - { - _keepAlive.Free(); - } + _keepAlive.Free(); } } } - finally - { - // Dispose the cancellation if registered. - // Must be done outside of lock since Dispose will wait on pending cancellation callbacks which require taking the lock. - cancellationRegistration.Dispose(); - } } /// @@ -241,11 +250,10 @@ void IValueTaskSource.OnCompleted(Action continuation, object? state, s void IValueTaskSource.GetResult(short token) { - bool successful = false; try { + _cancelledToken.ThrowIfCancellationRequested(); _valueTaskSource.GetResult(token); - successful = true; } finally { @@ -253,34 +261,109 @@ void IValueTaskSource.GetResult(short token) { State state = _state; + _hasWaiter = false; + _cancelledToken = default; + if (state == State.Ready) { _valueTaskSource.Reset(); _state = State.None; // Propagate the _finalTaskSource result into _valueTaskSource if completed. - if (_finalTaskSource.Task.IsCompleted) + if (_finalTaskSource.TrySignal(out Exception? exception)) { _state = State.Completed; - if (_finalTaskSource.Task.IsCompletedSuccessfully) + + if (exception is not null) { - _valueTaskSource.SetResult(true); + _valueTaskSource.SetException(exception); } else { - // We know it's always going to be a single exception since we're the ones setting it. - _valueTaskSource.SetException(_finalTaskSource.Task.Exception?.InnerException!); - } - - // In case the _valueTaskSource was successful, we want the potential error from _finalTaskSource to surface immediately. - // In other words, if _valueTaskSource was set with success while final exception arrived, this will throw that exception right away. - if (successful) - { - _valueTaskSource.GetResult(_valueTaskSource.Version); + _valueTaskSource.SetResult(true); } } + else + { + _state = State.None; + } + } + } + } + } + + /// + /// It remembers the result from and propagates it to only after is called. + /// Effectively allowing to separate setting of the result from task completion, which is necessary when the resettable portion of the value task source needs to consumed first. + /// + private struct FinalTaskSource + { + private TaskCompletionSource? _finalTaskSource; + private bool _isCompleted; + private bool _isSignaled; + private Exception? _exception; + + public FinalTaskSource() + { + _finalTaskSource = null; + _isCompleted = false; + _isSignaled = false; + _exception = null; + } + + public Task GetTask(object? keepAlive) + { + if (_finalTaskSource is null) + { + _finalTaskSource = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + if (!_isCompleted) + { + GCHandle handle = GCHandle.Alloc(keepAlive); + _finalTaskSource.Task.ContinueWith(static (_, state) => + { + ((GCHandle)state!).Free(); + }, handle, CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default); } + if (_isSignaled) + { + TrySignal(out _); + } + } + return _finalTaskSource.Task; + } + + public bool TryComplete(Exception? exception = null) + { + if (_isCompleted) + { + return false; + } + + _exception = exception; + _isCompleted = true; + return true; + } + + public bool TrySignal(out Exception? exception) + { + if (!_isCompleted) + { + exception = default; + return false; } + + if (_exception is not null) + { + _finalTaskSource?.SetException(_exception); + } + else + { + _finalTaskSource?.SetResult(); + } + + exception = _exception; + _isSignaled = true; + return true; } } } 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 ec677f9f4e58d6..114c39c49c1e5e 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 @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Security.Authentication; +using System.Diagnostics.CodeAnalysis; using System.Net.Security; using System.Net.Sockets; -using static Microsoft.Quic.MsQuic; -using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; +using System.Security.Authentication; +using static Microsoft.Quic.MsQuic; namespace System.Net.Quic; diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/ValueTaskSource.cs b/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/ValueTaskSource.cs index a6e40dbf7ea8ae..2acd2138a12374 100644 --- a/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/ValueTaskSource.cs +++ b/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/ValueTaskSource.cs @@ -27,10 +27,10 @@ private enum State : byte private CancellationTokenRegistration _cancellationRegistration; private GCHandle _keepAlive; - public ValueTaskSource(bool runContinuationsAsynchronously = true) + public ValueTaskSource() { _state = State.None; - _valueTaskSource = new ManualResetValueTaskSourceCore() { RunContinuationsAsynchronously = runContinuationsAsynchronously }; + _valueTaskSource = new ManualResetValueTaskSourceCore() { RunContinuationsAsynchronously = true }; _cancellationRegistration = default; _keepAlive = default; } diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicConnection.cs b/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicConnection.cs index a2ade033afe59f..3b49667e9b32a9 100644 --- a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicConnection.cs +++ b/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicConnection.cs @@ -382,6 +382,9 @@ public async ValueTask OpenOutboundStreamAsync(QuicStreamType type, { await stream.DisposeAsync().ConfigureAwait(false); } + + // Propagate ODE if disposed in the meantime. + ObjectDisposedException.ThrowIf(_disposed == 1, this); // Propagate connection error if present. if (_acceptQueue.Reader.Completion.IsFaulted) { @@ -485,7 +488,7 @@ private unsafe int HandleEventShutdownInitiatedByPeer(ref SHUTDOWN_INITIATED_BY_ } private unsafe int HandleEventShutdownComplete() { - Exception exception = ExceptionDispatchInfo.SetCurrentStackTrace(ThrowHelper.GetOperationAbortedException()); + Exception exception = ExceptionDispatchInfo.SetCurrentStackTrace(_disposed == 1 ? new ObjectDisposedException(GetType().FullName) : ThrowHelper.GetOperationAbortedException()); _acceptQueue.Writer.TryComplete(exception); _connectedTcs.TrySetException(exception); _shutdownTcs.TrySetResult(); @@ -557,7 +560,7 @@ private static unsafe int NativeCallback(QUIC_HANDLE* connection, void* context, { if (NetEventSource.Log.IsEnabled()) { - NetEventSource.Error(null, $"Received event {connectionEvent->Type} while connection is already disposed"); + NetEventSource.Error(null, $"Received event {connectionEvent->Type} for [conn][{(nint)connection:X11}] while connection is already disposed"); } return QUIC_STATUS_INVALID_STATE; } @@ -622,7 +625,7 @@ public async ValueTask DisposeAsync() } // Flush the queue and dispose all remaining streams. - _acceptQueue.Writer.TryComplete(ExceptionDispatchInfo.SetCurrentStackTrace(ThrowHelper.GetOperationAbortedException())); + _acceptQueue.Writer.TryComplete(ExceptionDispatchInfo.SetCurrentStackTrace(new ObjectDisposedException(GetType().FullName))); while (_acceptQueue.Reader.TryRead(out QuicStream? stream)) { await stream.DisposeAsync().ConfigureAwait(false); diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicListener.cs b/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicListener.cs index fcbfba56336acc..8ecbfb9901eb25 100644 --- a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicListener.cs +++ b/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicListener.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.Diagnostics; using System.Net.Security; using System.Runtime.CompilerServices; using System.Runtime.ExceptionServices; @@ -329,7 +328,7 @@ private static unsafe int NativeCallback(QUIC_HANDLE* listener, void* context, Q { if (NetEventSource.Log.IsEnabled()) { - NetEventSource.Error(null, $"Received event {listenerEvent->Type} while listener is already disposed"); + NetEventSource.Error(null, $"Received event {listenerEvent->Type} for [list][{(nint)listener:X11}] while listener is already disposed"); } return QUIC_STATUS_INVALID_STATE; } @@ -378,8 +377,8 @@ public async ValueTask DisposeAsync() _handle.Dispose(); // Flush the queue and dispose all remaining connections. - _disposeCts.Cancel(); - _acceptQueue.Writer.TryComplete(ExceptionDispatchInfo.SetCurrentStackTrace(ThrowHelper.GetOperationAbortedException())); + await _disposeCts.CancelAsync().ConfigureAwait(false); + _acceptQueue.Writer.TryComplete(ExceptionDispatchInfo.SetCurrentStackTrace(new ObjectDisposedException(GetType().FullName))); while (_acceptQueue.Reader.TryRead(out object? item)) { if (item is QuicConnection connection) diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicStream.cs b/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicStream.cs index 6165f2085cb5f0..bc3783d5253d99 100644 --- a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicStream.cs +++ b/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicStream.cs @@ -76,6 +76,7 @@ public sealed partial class QuicStream if (target is QuicStream stream) { stream.Abort(QuicAbortDirection.Read, stream._defaultErrorCode); + stream._receiveTcs.TrySetResult(); } } catch (ObjectDisposedException) @@ -109,7 +110,8 @@ public sealed partial class QuicStream } }; private MsQuicBuffers _sendBuffers = new MsQuicBuffers(); - private readonly object _sendBuffersLock = new object(); + private int _sendLocked; + private Exception? _sendException; private readonly long _defaultErrorCode; @@ -135,7 +137,7 @@ public sealed partial class QuicStream /// or when for is called, /// or when the peer called for . /// - public Task ReadsClosed => _receiveTcs.GetFinalTask(); + public Task ReadsClosed => _receiveTcs.GetFinalTask(this); /// /// A that will get completed once writing side has been closed. @@ -144,7 +146,7 @@ public sealed partial class QuicStream /// or when for is called, /// or when the peer called for . /// - public Task WritesClosed => _sendTcs.GetFinalTask(); + public Task WritesClosed => _sendTcs.GetFinalTask(this); /// public override string ToString() => _handle.ToString(); @@ -334,7 +336,7 @@ public override ValueTask WriteAsync(ReadOnlyMemory buffer, CancellationTo /// The region of memory to write data from. /// The token to monitor for cancellation requests. The default value is . /// Notifies the peer about gracefully closing the write side, i.e.: sends FIN flag with the data. - public ValueTask WriteAsync(ReadOnlyMemory buffer, bool completeWrites, CancellationToken cancellationToken = default) + public async ValueTask WriteAsync(ReadOnlyMemory buffer, bool completeWrites, CancellationToken cancellationToken = default) { ObjectDisposedException.ThrowIf(_disposed == 1, this); @@ -348,11 +350,11 @@ public ValueTask WriteAsync(ReadOnlyMemory buffer, bool completeWrites, Ca NetEventSource.Info(this, $"{this} Stream writing memory of '{buffer.Length}' bytes while {(completeWrites ? "completing" : "not completing")} writes."); } - if (_sendTcs.IsCompleted && cancellationToken.IsCancellationRequested) + if (_sendTcs.IsCompleted) { // Special case exception type for pre-canceled token while we've already transitioned to a final state and don't need to abort write. // It must happen before we try to get the value task, since the task source is versioned and each instance must be awaited. - return ValueTask.FromCanceled(cancellationToken); + cancellationToken.ThrowIfCancellationRequested(); } // Concurrent call, this one lost the race. @@ -364,7 +366,8 @@ public ValueTask WriteAsync(ReadOnlyMemory buffer, bool completeWrites, Ca // No need to call anything since we already have a result, most likely an exception. if (valueTask.IsCompleted) { - return valueTask; + await valueTask.ConfigureAwait(false); + return; } // For an empty buffer complete immediately, close the writing side of the stream if necessary. @@ -375,25 +378,15 @@ public ValueTask WriteAsync(ReadOnlyMemory buffer, bool completeWrites, Ca { CompleteWrites(); } - return valueTask; + await valueTask.ConfigureAwait(false); + return; } - lock (_sendBuffersLock) + // We own the lock, abort might happen, but exception will get stored instead. + if (Interlocked.CompareExchange(ref _sendLocked, 1, 0) == 0) { - ObjectDisposedException.ThrowIf(_disposed == 1, this); // TODO: valueTask is left unobserved unsafe { - if (_sendBuffers.Count > 0 && _sendBuffers.Buffers[0].Buffer != null) - { - // _sendBuffers are not reset, meaning SendComplete for the previous WriteAsync call didn't arrive yet. - // In case of cancellation, the task from _sendTcs is finished before the aborting. It is technically possible for subsequent - // WriteAsync to grab the next task from _sendTcs and start executing before SendComplete event occurs for the previous (canceled) write. - // This is not an "invalid nested call", because the previous task has finished. Best guess is to mimic OperationAborted as it will be from Abort - // that would execute soon enough, if not already. Not final, because Abort should be the one to set final exception. - _sendTcs.TrySetException(ThrowHelper.GetOperationAbortedException(SR.net_quic_writing_aborted), final: false); - return valueTask; - } - _sendBuffers.Initialize(buffer); int status = MsQuicApi.Api.StreamSend( _handle, @@ -401,15 +394,28 @@ public ValueTask WriteAsync(ReadOnlyMemory buffer, bool completeWrites, Ca (uint)_sendBuffers.Count, completeWrites ? QUIC_SEND_FLAGS.FIN : QUIC_SEND_FLAGS.NONE, null); - if (ThrowHelper.TryGetStreamExceptionForMsQuicStatus(status, out Exception? exception)) + // No SEND_COMPLETE expected, release buffer and unlock. + if (StatusFailed(status)) { _sendBuffers.Reset(); - _sendTcs.TrySetException(exception, final: true); + Volatile.Write(ref _sendLocked, 0); + + // There might be stored exception from when we held the lock. + if (ThrowHelper.TryGetStreamExceptionForMsQuicStatus(status, out Exception? exception)) + { + Interlocked.CompareExchange(ref _sendException, exception, null); + } + exception = Volatile.Read(ref _sendException); + if (exception is not null) + { + _sendTcs.TrySetException(exception, final: true); + } } + // SEND_COMPLETE expected, buffer and lock will be released then. } } - return valueTask; + await valueTask.ConfigureAwait(false); } /// @@ -429,19 +435,13 @@ public void Abort(QuicAbortDirection abortDirection, long errorCode) } QUIC_STREAM_SHUTDOWN_FLAGS flags = QUIC_STREAM_SHUTDOWN_FLAGS.NONE; - if (abortDirection.HasFlag(QuicAbortDirection.Read)) + if (abortDirection.HasFlag(QuicAbortDirection.Read) && !_receiveTcs.IsCompleted) { - if (_receiveTcs.TrySetException(ThrowHelper.GetOperationAbortedException(SR.net_quic_reading_aborted), final: true)) - { - flags |= QUIC_STREAM_SHUTDOWN_FLAGS.ABORT_RECEIVE; - } + flags |= QUIC_STREAM_SHUTDOWN_FLAGS.ABORT_RECEIVE; } - if (abortDirection.HasFlag(QuicAbortDirection.Write)) + if (abortDirection.HasFlag(QuicAbortDirection.Write) && !_sendTcs.IsCompleted) { - if (_sendTcs.TrySetException(ThrowHelper.GetOperationAbortedException(SR.net_quic_writing_aborted), final: true)) - { - flags |= QUIC_STREAM_SHUTDOWN_FLAGS.ABORT_SEND; - } + flags |= QUIC_STREAM_SHUTDOWN_FLAGS.ABORT_SEND; } // Nothing to abort, the requested sides to abort are already closed. if (flags == QUIC_STREAM_SHUTDOWN_FLAGS.NONE) @@ -453,7 +453,6 @@ public void Abort(QuicAbortDirection abortDirection, long errorCode) { NetEventSource.Info(this, $"{this} Aborting {abortDirection} with {errorCode}"); } - unsafe { ThrowHelper.ThrowIfMsQuicError(MsQuicApi.Api.StreamShutdown( @@ -462,6 +461,21 @@ public void Abort(QuicAbortDirection abortDirection, long errorCode) (ulong)errorCode), "StreamShutdown failed"); } + + if (abortDirection.HasFlag(QuicAbortDirection.Read)) + { + _receiveTcs.TrySetException(ThrowHelper.GetOperationAbortedException(SR.net_quic_reading_aborted), final: true); + } + if (abortDirection.HasFlag(QuicAbortDirection.Write)) + { + var exception = ThrowHelper.GetOperationAbortedException(SR.net_quic_writing_aborted); + Interlocked.CompareExchange(ref _sendException, exception, null); + if (Interlocked.CompareExchange(ref _sendLocked, 1, 0) == 0) + { + _sendTcs.TrySetException(_sendException, final: true); + Volatile.Write(ref _sendLocked, 0); + } + } } /// @@ -475,16 +489,23 @@ public void CompleteWrites() { ObjectDisposedException.ThrowIf(_disposed == 1, this); - if (_shutdownTcs.TryInitialize(out _, this)) + // Nothing to complete, the writing side is already closed. + if (_sendTcs.IsCompleted) { - unsafe - { - ThrowHelper.ThrowIfMsQuicError(MsQuicApi.Api.StreamShutdown( - _handle, - QUIC_STREAM_SHUTDOWN_FLAGS.GRACEFUL, - default), - "StreamShutdown failed"); - } + return; + } + + if (NetEventSource.Log.IsEnabled()) + { + NetEventSource.Info(this, $"{this} Completing writes."); + } + unsafe + { + ThrowHelper.ThrowIfMsQuicError(MsQuicApi.Api.StreamShutdown( + _handle, + QUIC_STREAM_SHUTDOWN_FLAGS.GRACEFUL, + default), + "StreamShutdown failed"); } } @@ -528,11 +549,15 @@ private unsafe int HandleEventReceive(ref RECEIVE_DATA data) } private unsafe int HandleEventSendComplete(ref SEND_COMPLETE_DATA data) { - // In case of cancellation, the task from _sendTcs is finished before the aborting. It is technically possible for subsequent WriteAsync to grab the next task - // from _sendTcs and start executing before SendComplete event occurs for the previous (canceled) write - lock (_sendBuffersLock) + // Release buffer and unlock. + _sendBuffers.Reset(); + Volatile.Write(ref _sendLocked, 0); + + // There might be stored exception from when we held the lock. + Exception? exception = Volatile.Read(ref _sendException); + if (exception is not null) { - _sendBuffers.Reset(); + _sendTcs.TrySetException(exception, final: true); } if (data.Canceled == 0) { @@ -616,7 +641,7 @@ private unsafe int HandleStreamEvent(ref QUIC_STREAM_EVENT streamEvent) #pragma warning disable CS3016 [UnmanagedCallersOnly(CallConvs = new Type[] { typeof(CallConvCdecl) })] #pragma warning restore CS3016 - private static unsafe int NativeCallback(QUIC_HANDLE* connection, void* context, QUIC_STREAM_EVENT* streamEvent) + private static unsafe int NativeCallback(QUIC_HANDLE* stream, void* context, QUIC_STREAM_EVENT* streamEvent) { GCHandle stateHandle = GCHandle.FromIntPtr((IntPtr)context); @@ -625,7 +650,7 @@ private static unsafe int NativeCallback(QUIC_HANDLE* connection, void* context, { if (NetEventSource.Log.IsEnabled()) { - NetEventSource.Error(null, $"Received event {streamEvent->Type} while connection is already disposed"); + NetEventSource.Error(null, $"Received event {streamEvent->Type} for [strm][{(nint)stream:X11}] while stream is already disposed"); } return QUIC_STATUS_INVALID_STATE; } @@ -663,44 +688,37 @@ public override async ValueTask DisposeAsync() return; } - ValueTask valueTask; - // If the stream wasn't started successfully, gracelessly abort it. if (!_startedTcs.IsCompletedSuccessfully) { // Check if the stream has been shut down and if not, shut it down. - if (_shutdownTcs.TryInitialize(out valueTask, this)) - { - StreamShutdown(QUIC_STREAM_SHUTDOWN_FLAGS.ABORT | QUIC_STREAM_SHUTDOWN_FLAGS.IMMEDIATE, _defaultErrorCode); - } + StreamShutdown(QUIC_STREAM_SHUTDOWN_FLAGS.ABORT | QUIC_STREAM_SHUTDOWN_FLAGS.IMMEDIATE, _defaultErrorCode); } else { - // Abort the read side of the stream if it hasn't been fully consumed. - if (_receiveTcs.TrySetException(ThrowHelper.GetOperationAbortedException(), final: true)) + // Abort the read side and complete the write side if that side hasn't been completed yet. + if (!_receiveTcs.IsCompleted) { StreamShutdown(QUIC_STREAM_SHUTDOWN_FLAGS.ABORT_RECEIVE, _defaultErrorCode); } - // Check if the stream has been shut down and if not, shut it down. - if (_shutdownTcs.TryInitialize(out valueTask, this)) + if (!_sendTcs.IsCompleted) { StreamShutdown(QUIC_STREAM_SHUTDOWN_FLAGS.GRACEFUL, default); } } // Wait for SHUTDOWN_COMPLETE, the last event, so that all resources can be safely released. - await valueTask.ConfigureAwait(false); + if (_shutdownTcs.TryInitialize(out ValueTask valueTask, this)) + { + await valueTask.ConfigureAwait(false); + } Debug.Assert(_startedTcs.IsCompleted); - // TODO: Revisit this with https://github.com/dotnet/runtime/issues/79818 and https://github.com/dotnet/runtime/issues/79911 - Debug.Assert(_receiveTcs.KeepAliveReleased); - Debug.Assert(_sendTcs.KeepAliveReleased); + Debug.Assert(_receiveTcs.IsCompleted); + Debug.Assert(_sendTcs.IsCompleted); _handle.Dispose(); - lock (_sendBuffersLock) - { - // TODO: memory leak if not disposed - _sendBuffers.Dispose(); - } + // TODO: memory leak if not disposed + _sendBuffers.Dispose(); unsafe void StreamShutdown(QUIC_STREAM_SHUTDOWN_FLAGS flags, long errorCode) { @@ -715,6 +733,17 @@ unsafe void StreamShutdown(QUIC_STREAM_SHUTDOWN_FLAGS flags, long errorCode) NetEventSource.Error(this, $"{this} StreamShutdown({flags}) failed: {ThrowHelper.GetErrorMessageForStatus(status)}."); } } + else + { + if (flags.HasFlag(QUIC_STREAM_SHUTDOWN_FLAGS.ABORT_RECEIVE) && !_receiveTcs.IsCompleted) + { + _receiveTcs.TrySetException(ThrowHelper.GetOperationAbortedException(SR.net_quic_reading_aborted), final: true); + } + if (flags.HasFlag(QUIC_STREAM_SHUTDOWN_FLAGS.ABORT_SEND) && !_sendTcs.IsCompleted) + { + _sendTcs.TrySetException(ThrowHelper.GetOperationAbortedException(SR.net_quic_writing_aborted), final: true); + } + } } } } diff --git a/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicConnectionTests.cs b/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicConnectionTests.cs index dba45d813945ff..61d42b2525480d 100644 --- a/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicConnectionTests.cs +++ b/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicConnectionTests.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; using System.Net.Sockets; using System.Security.Cryptography.X509Certificates; using System.Threading; @@ -88,7 +87,6 @@ await RunClientServer( await AssertThrowsQuicExceptionAsync(QuicError.OperationAborted, () => connectTask); // Subsequent attempts should fail - // TODO: Which exception is correct? await AssertThrowsQuicExceptionAsync(QuicError.OperationAborted, async () => await serverConnection.AcceptInboundStreamAsync()); await Assert.ThrowsAsync(() => OpenAndUseStreamAsync(serverConnection)); }); @@ -117,11 +115,10 @@ await RunClientServer( sync.Release(); // Pending ops should fail - await AssertThrowsQuicExceptionAsync(QuicError.OperationAborted, () => acceptTask); - await AssertThrowsQuicExceptionAsync(QuicError.OperationAborted, () => connectTask); + await Assert.ThrowsAsync(async () => await acceptTask); + await Assert.ThrowsAsync(async () => await connectTask); // Subsequent attempts should fail - // TODO: Should these be QuicOperationAbortedException, to match above? Or vice-versa? await Assert.ThrowsAsync(async () => await serverConnection.AcceptInboundStreamAsync()); await Assert.ThrowsAsync(async () => await OpenAndUseStreamAsync(serverConnection)); }); @@ -312,6 +309,21 @@ await RunClientServer( _ => Task.CompletedTask); } + [Fact] + public async Task AcceptStreamAsync_ConnectionDisposed_Throws() + { + (QuicConnection clientConnection, QuicConnection serverConnection) = await CreateConnectedQuicConnection(); + + // One task issues before the disposal. + ValueTask acceptTask1 = serverConnection.AcceptInboundStreamAsync(); + await serverConnection.DisposeAsync(); + // Another task issued after the disposal. + ValueTask acceptTask2 = serverConnection.AcceptInboundStreamAsync(); + + var accept1Exception = await Assert.ThrowsAsync(async () => await acceptTask1); + var accept2Exception = await Assert.ThrowsAsync(async () => await acceptTask2); + } + [Theory] [InlineData(true)] [InlineData(false)] diff --git a/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicListenerTests.cs b/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicListenerTests.cs index 68509bf6b5571f..cda0b06a03888b 100644 --- a/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicListenerTests.cs +++ b/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicListenerTests.cs @@ -196,10 +196,8 @@ public async Task AcceptConnectionAsync_ListenerDisposed_Throws() await listener.DisposeAsync(); serverDisposed.SetResult(); - var accept1Exception = await AssertThrowsQuicExceptionAsync(QuicError.OperationAborted, async () => await acceptTask1); - var accept2Exception = await AssertThrowsQuicExceptionAsync(QuicError.OperationAborted, async () => await acceptTask2); - - Assert.Equal(accept1Exception, accept2Exception); + var accept1Exception = await Assert.ThrowsAsync(async () => await acceptTask1); + var accept2Exception = await Assert.ThrowsAsync(async () => await acceptTask2); // Connect attempt should be stopped with "UserCanceled". var connectException = await Assert.ThrowsAsync(async () => await connectTask); @@ -473,7 +471,6 @@ public async Task Listener_AlpnNarrowingDown_Success() Assert.Equal(new SslApplicationProtocol("test"), clientConnection2.NegotiatedApplicationProtocol); } - [ActiveIssue("https://github.com/dotnet/runtime/issues/86701")] [Theory] [InlineData("foo")] [InlineData("not_existing")] @@ -503,15 +500,18 @@ public async Task Listener_AlpnNarrowingDown_Failure(string alpn) return ValueTask.FromResult(options); } }; + bool isAlpnPresentOnInitialAlpnList = listenerOptions.ApplicationProtocols.Contains(new SslApplicationProtocol(alpn)); // If the ALPN is not present on initial list, AcceptConnectionAsync will not throw AuthenticationException. await using QuicListener listener = await CreateQuicListener(listenerOptions); - QuicClientConnectionOptions clientOptions = CreateQuicClientOptions(listener.LocalEndPoint); clientOptions.ClientAuthenticationOptions.ApplicationProtocols = new() { new SslApplicationProtocol(alpn), }; ValueTask connectTask = CreateQuicConnection(clientOptions); - await Assert.ThrowsAsync(() => listener.AcceptConnectionAsync().AsTask().WaitAsync(timeoutToken)); + if (isAlpnPresentOnInitialAlpnList) + { + await Assert.ThrowsAsync(() => listener.AcceptConnectionAsync().AsTask().WaitAsync(timeoutToken)); + } await Assert.ThrowsAsync(() => connectTask.AsTask().WaitAsync(timeoutToken)); } } diff --git a/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicStreamTests.cs b/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicStreamTests.cs index e220decb1bd400..cd3c1a2394f384 100644 --- a/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicStreamTests.cs +++ b/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicStreamTests.cs @@ -1208,5 +1208,310 @@ async ValueTask ReleaseOnReadsClosedAsync() } ); } + + private const int SmallestPayload = 1; + private const int SmallPayload = 1024; + private const int BufferPayload = 64*1024; + private const int BufferPlusPayload = 64*1024+1; + private const int BigPayload = 1024*1024*1024; + + public static IEnumerable PayloadSizeAndTwoBools() + { + var boolValues = new [] { true, false }; + var payloadValues = !PlatformDetection.IsInHelix ? + new [] { SmallestPayload, SmallPayload, BufferPayload, BufferPlusPayload, BigPayload } : + new [] { SmallestPayload, SmallPayload, BufferPayload, BufferPlusPayload }; + return + from payload in payloadValues + from bool1 in boolValues + from bool2 in boolValues + select new object[] { payload, bool1, bool2 }; + } + + [Theory] + [MemberData(nameof(PayloadSizeAndTwoBools))] + public async Task ReadsClosedFinishes_ConnectionClose(int payloadSize, bool closeServer, bool useDispose) + { + using SemaphoreSlim serverSem = new SemaphoreSlim(0); + using SemaphoreSlim clientSem = new SemaphoreSlim(0); + + await RunClientServer( + serverFunction: async connection => + { + QuicError expectedError = QuicError.ConnectionAborted; + long expectedErrorCode = DefaultCloseErrorCodeClient; + + await using QuicStream stream = await connection.AcceptInboundStreamAsync(); + await stream.WriteAsync(new byte[payloadSize], completeWrites: true); + // Make sure the data gets received by the peer if we expect the reading side to get buffered including FIN. + if (payloadSize <= BufferPayload) + { + await stream.WritesClosed; + } + serverSem.Release(); + await clientSem.WaitAsync(); + + if (closeServer) + { + expectedError = QuicError.OperationAborted; + expectedErrorCode = DefaultCloseErrorCodeServer; + if (useDispose) + { + await connection.DisposeAsync(); + } + else + { + await connection.CloseAsync(DefaultCloseErrorCodeServer); + } + } + + await CheckReadsClosed(stream, expectedError, expectedErrorCode); + }, + clientFunction: async connection => + { + QuicError expectedError = QuicError.ConnectionAborted; + long expectedErrorCode = DefaultCloseErrorCodeServer; + + await using QuicStream stream = await connection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); + await stream.WriteAsync(new byte[payloadSize], completeWrites: true); + if (payloadSize <= BufferPayload) + { + await stream.WritesClosed; + } + clientSem.Release(); + await serverSem.WaitAsync(); + + if (!closeServer) + { + expectedError = QuicError.OperationAborted; + expectedErrorCode = DefaultCloseErrorCodeClient; + if (useDispose) + { + await connection.DisposeAsync(); + } + else + { + await connection.CloseAsync(DefaultCloseErrorCodeClient); + } + } + + await CheckReadsClosed(stream, expectedError, expectedErrorCode); + } + ); + + async ValueTask CheckReadsClosed(QuicStream stream, QuicError expectedError, long expectedErrorCode) + { + // All data should be buffered if they fit in the internal buffer, reading should still pass. + if (payloadSize <= BufferPayload) + { + Assert.False(stream.ReadsClosed.IsCompleted); + var buffer = new byte[BufferPayload]; + var length = await ReadAll(stream, buffer); + Assert.True(stream.ReadsClosed.IsCompletedSuccessfully); + Assert.Equal(payloadSize, length); + } + else + { + var ex = await AssertThrowsQuicExceptionAsync(expectedError, () => stream.ReadsClosed); + if (expectedError == QuicError.OperationAborted) + { + Assert.Null(ex.ApplicationErrorCode); + } + else + { + Assert.Equal(expectedErrorCode, ex.ApplicationErrorCode); + } + } + } + } + + [Theory] + [MemberData(nameof(PayloadSizeAndTwoBools))] + public async Task WritesClosedFinishes_ConnectionClose(int payloadSize, bool closeServer, bool useDispose) + { + using SemaphoreSlim serverSem = new SemaphoreSlim(0); + using SemaphoreSlim clientSem = new SemaphoreSlim(0); + + await RunClientServer( + serverFunction: async connection => + { + QuicError expectedError = QuicError.ConnectionAborted; + long expectedErrorCode = DefaultCloseErrorCodeClient; + + await using QuicStream stream = await connection.AcceptInboundStreamAsync(); + await stream.WriteAsync(new byte[payloadSize]); + serverSem.Release(); + await clientSem.WaitAsync(); + + if (closeServer) + { + expectedError = QuicError.OperationAborted; + expectedErrorCode = DefaultCloseErrorCodeServer; + if (useDispose) + { + await connection.DisposeAsync(); + } + else + { + await connection.CloseAsync(DefaultCloseErrorCodeServer); + } + } + + await CheckWritesClosed(stream, expectedError, expectedErrorCode); + }, + clientFunction: async connection => + { + QuicError expectedError = QuicError.ConnectionAborted; + long expectedErrorCode = DefaultCloseErrorCodeServer; + + await using QuicStream stream = await connection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); + await stream.WriteAsync(new byte[payloadSize]); + clientSem.Release(); + await serverSem.WaitAsync(); + + if (!closeServer) + { + expectedError = QuicError.OperationAborted; + expectedErrorCode = DefaultCloseErrorCodeClient; + if (useDispose) + { + await connection.DisposeAsync(); + } + else + { + await connection.CloseAsync(DefaultCloseErrorCodeClient); + } + } + + await CheckWritesClosed(stream, expectedError, expectedErrorCode); + } + ); + + async ValueTask CheckWritesClosed(QuicStream stream, QuicError expectedError, long expectedErrorCode) + { + var ex = await AssertThrowsQuicExceptionAsync(expectedError, () => stream.WritesClosed); + if (expectedError == QuicError.OperationAborted) + { + Assert.Null(ex.ApplicationErrorCode); + } + else + { + Assert.Equal(expectedErrorCode, ex.ApplicationErrorCode); + } + } + } + + [Theory] + [MemberData(nameof(PayloadSizeAndTwoBools))] + public async Task ReadsWritesClosedFinish_StreamDisposed(int payloadSize, bool disposeServer, bool completeWrites) + { + using SemaphoreSlim serverSem = new SemaphoreSlim(0); + using SemaphoreSlim clientSem = new SemaphoreSlim(0); + TaskCompletionSource tcs = new TaskCompletionSource(); + + await RunClientServer( + serverFunction: async connection => + { + // Establish stream, send the payload based on the input and synchronize with the peer. + await using QuicStream stream = await connection.AcceptInboundStreamAsync(); + await stream.WriteAsync(new byte[payloadSize], completeWrites); + serverSem.Release(); + await clientSem.WaitAsync(); + + if (disposeServer) + { + await DisposeSide(stream, tcs); + } + else + { + await WaitingSide(stream, tcs.Task, DefaultStreamErrorCodeClient); + } + }, + clientFunction: async connection => + { + // Establish stream, send the payload based on the input and synchronize with the peer. + await using QuicStream stream = await connection.OpenOutboundStreamAsync(QuicStreamType.Bidirectional); + await stream.WriteAsync(new byte[payloadSize], completeWrites); + clientSem.Release(); + await serverSem.WaitAsync(); + + if (disposeServer) + { + await WaitingSide(stream, tcs.Task, DefaultStreamErrorCodeServer); + } + else + { + await DisposeSide(stream, tcs); + } + }); + + async ValueTask DisposeSide(QuicStream stream, TaskCompletionSource tcs) + { + // Abort writing side if it's getting blocked by peer not consuming the data. + long? abortCode = null; + if (completeWrites || payloadSize >= BigPayload) + { + try + { + await stream.WritesClosed.WaitAsync(TimeSpan.FromSeconds(2.5)); + } + catch (TimeoutException) + { + Assert.True(payloadSize >= BigPayload); + abortCode = 0xABC; + stream.Abort(QuicAbortDirection.Write, abortCode.Value); + } + } + + await stream.DisposeAsync(); + + // Reads should be aborted as we didn't consume the data. + var readEx = await AssertThrowsQuicExceptionAsync(QuicError.OperationAborted, () => stream.ReadsClosed); + Assert.Null(readEx.ApplicationErrorCode); + + // Writes should be aborted as we aborted them. + if (abortCode.HasValue) + { + var writeEx = await AssertThrowsQuicExceptionAsync(QuicError.OperationAborted, () => stream.WritesClosed); + Assert.Null(writeEx.ApplicationErrorCode); + } + else + { + // Writes should be completed successfully as they should all fit in the peers buffers. + Assert.True(stream.WritesClosed.IsCompletedSuccessfully); + } + + tcs.SetResult(abortCode); + } + async ValueTask WaitingSide(QuicStream stream, Task task, long errorCode) + { + long? abortCode = await task; + + // Reads will be aborted by the peer as we didn't consume them all. + if (abortCode.HasValue) + { + var readEx = await AssertThrowsQuicExceptionAsync(QuicError.StreamAborted, () => stream.ReadsClosed); + Assert.Equal(abortCode.Value, readEx.ApplicationErrorCode); + } + // Reads should be still open as the peer closed gracefully and we are keeping the data in buffer. + else + { + Assert.False(stream.ReadsClosed.IsCompleted); + } + + if (!completeWrites) + { + // Writes must be aborted by the peer as we didn't complete them. + var writeEx = await AssertThrowsQuicExceptionAsync(QuicError.StreamAborted, () => stream.WritesClosed); + Assert.Equal(errorCode, writeEx.ApplicationErrorCode); + } + else + { + // Writes must be closed, but whether successfully or not depends on the timing. + // Peer might have aborted reading side before receiving all the data. + Assert.True(stream.WritesClosed.IsCompleted); + } + } + } } } diff --git a/src/libraries/System.Net.Requests/System.Net.Requests.sln b/src/libraries/System.Net.Requests/System.Net.Requests.sln index 64c603eb5f3ab2..890e94e5f33769 100644 --- a/src/libraries/System.Net.Requests/System.Net.Requests.sln +++ b/src/libraries/System.Net.Requests/System.Net.Requests.sln @@ -47,6 +47,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography", "..\System.Security.Cryptography\ref\System.Security.Cryptography.csproj", "{FECA1242-D76F-4CA0-A0E7-289209B2BCC0}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{D865D8D5-7D19-4D98-BED2-3D7B4FC3C4B2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{CAEAB457-89E5-42DD-9963-321601FAE936}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{83BB00EB-51E0-4ED9-858E-1A28322EDE01}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{6AE19FC5-D4BA-4C1A-87B9-87A9FCC0883B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{F01F38EB-B9A4-46EA-B11C-AE5C65BD0371}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{2E80965D-0AB1-451E-AFE5-E4CAF49EE8E3}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{DB20495E-C9F0-4640-85A6-ACEF17C21670}" @@ -55,6 +65,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{BE29C1CE-D2B EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{BCB9D4DE-1EC1-4826-A80F-E4D2E960D98D}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{DC7F204D-9592-4EDD-9ED0-21B2BF53FA1F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{8F842012-E5B7-4806-BF53-7F1EDAC7F4DD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{213121F9-0C28-4322-A0F0-07B6C5818923}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{0CCB356A-4A4E-4CDB-8407-BF91880E5E9A}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -157,6 +175,26 @@ Global {FECA1242-D76F-4CA0-A0E7-289209B2BCC0}.Debug|Any CPU.Build.0 = Debug|Any CPU {FECA1242-D76F-4CA0-A0E7-289209B2BCC0}.Release|Any CPU.ActiveCfg = Release|Any CPU {FECA1242-D76F-4CA0-A0E7-289209B2BCC0}.Release|Any CPU.Build.0 = Release|Any CPU + {D865D8D5-7D19-4D98-BED2-3D7B4FC3C4B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D865D8D5-7D19-4D98-BED2-3D7B4FC3C4B2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D865D8D5-7D19-4D98-BED2-3D7B4FC3C4B2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D865D8D5-7D19-4D98-BED2-3D7B4FC3C4B2}.Release|Any CPU.Build.0 = Release|Any CPU + {CAEAB457-89E5-42DD-9963-321601FAE936}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CAEAB457-89E5-42DD-9963-321601FAE936}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CAEAB457-89E5-42DD-9963-321601FAE936}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CAEAB457-89E5-42DD-9963-321601FAE936}.Release|Any CPU.Build.0 = Release|Any CPU + {83BB00EB-51E0-4ED9-858E-1A28322EDE01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {83BB00EB-51E0-4ED9-858E-1A28322EDE01}.Debug|Any CPU.Build.0 = Debug|Any CPU + {83BB00EB-51E0-4ED9-858E-1A28322EDE01}.Release|Any CPU.ActiveCfg = Release|Any CPU + {83BB00EB-51E0-4ED9-858E-1A28322EDE01}.Release|Any CPU.Build.0 = Release|Any CPU + {6AE19FC5-D4BA-4C1A-87B9-87A9FCC0883B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6AE19FC5-D4BA-4C1A-87B9-87A9FCC0883B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6AE19FC5-D4BA-4C1A-87B9-87A9FCC0883B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6AE19FC5-D4BA-4C1A-87B9-87A9FCC0883B}.Release|Any CPU.Build.0 = Release|Any CPU + {F01F38EB-B9A4-46EA-B11C-AE5C65BD0371}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F01F38EB-B9A4-46EA-B11C-AE5C65BD0371}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F01F38EB-B9A4-46EA-B11C-AE5C65BD0371}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F01F38EB-B9A4-46EA-B11C-AE5C65BD0371}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -186,6 +224,14 @@ Global {BE1267C9-2847-4BD0-BBC9-B9ABEB567F08} = {BCB9D4DE-1EC1-4826-A80F-E4D2E960D98D} {622D51A8-954A-401B-91FD-21E650F2DE46} = {BCB9D4DE-1EC1-4826-A80F-E4D2E960D98D} {CE27441A-4D2F-4A63-8D02-148A0C51CA47} = {BCB9D4DE-1EC1-4826-A80F-E4D2E960D98D} + {D865D8D5-7D19-4D98-BED2-3D7B4FC3C4B2} = {DC7F204D-9592-4EDD-9ED0-21B2BF53FA1F} + {CAEAB457-89E5-42DD-9963-321601FAE936} = {DC7F204D-9592-4EDD-9ED0-21B2BF53FA1F} + {DC7F204D-9592-4EDD-9ED0-21B2BF53FA1F} = {0CCB356A-4A4E-4CDB-8407-BF91880E5E9A} + {83BB00EB-51E0-4ED9-858E-1A28322EDE01} = {8F842012-E5B7-4806-BF53-7F1EDAC7F4DD} + {6AE19FC5-D4BA-4C1A-87B9-87A9FCC0883B} = {8F842012-E5B7-4806-BF53-7F1EDAC7F4DD} + {8F842012-E5B7-4806-BF53-7F1EDAC7F4DD} = {0CCB356A-4A4E-4CDB-8407-BF91880E5E9A} + {F01F38EB-B9A4-46EA-B11C-AE5C65BD0371} = {213121F9-0C28-4322-A0F0-07B6C5818923} + {213121F9-0C28-4322-A0F0-07B6C5818923} = {0CCB356A-4A4E-4CDB-8407-BF91880E5E9A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {D33CD477-CBDE-47CC-BDAB-7E9469CE3549} diff --git a/src/libraries/System.Net.Security/System.Net.Security.sln b/src/libraries/System.Net.Security/System.Net.Security.sln index 9a5fb468dceafb..6eb84cc7b74e95 100644 --- a/src/libraries/System.Net.Security/System.Net.Security.sln +++ b/src/libraries/System.Net.Security/System.Net.Security.sln @@ -47,6 +47,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Principal.W EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Principal.Windows", "..\System.Security.Principal.Windows\src\System.Security.Principal.Windows.csproj", "{80F5CE39-D33D-4CDD-ACD2-FA7597B6CBB1}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{BBC4D81D-C03E-455A-A294-0EC91581AC61}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{40C4360F-4012-4FBA-BA89-C06C8893AEDC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{754229AE-72DF-4B65-A72E-8AC7B23737DC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{3A8F9FAF-F801-4BCA-A3B8-0834526657DF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{1AADC546-C5B7-4247-9557-FFF414A8C639}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{3F0D8988-4AFB-4AE2-9BA2-07E08765CCD1}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{19C079E3-367B-480E-A46E-8D56D47F94EA}" @@ -55,6 +65,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{70E29C1C-AC9 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{29A8D8F5-27EF-44B7-8C71-FC4E2D10EBBA}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{3E6CB661-AA4C-477E-8747-2D2852A5B3C4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{5AEC3A9F-78FF-4358-8B71-88294A4548C9}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{8D0B384E-98D9-4B04-823D-69B81F8E7920}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{9CE6A0C3-971B-41D2-90E7-7ACC1D7AB598}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -157,6 +175,26 @@ Global {80F5CE39-D33D-4CDD-ACD2-FA7597B6CBB1}.Debug|Any CPU.Build.0 = Debug|Any CPU {80F5CE39-D33D-4CDD-ACD2-FA7597B6CBB1}.Release|Any CPU.ActiveCfg = Release|Any CPU {80F5CE39-D33D-4CDD-ACD2-FA7597B6CBB1}.Release|Any CPU.Build.0 = Release|Any CPU + {BBC4D81D-C03E-455A-A294-0EC91581AC61}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BBC4D81D-C03E-455A-A294-0EC91581AC61}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BBC4D81D-C03E-455A-A294-0EC91581AC61}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BBC4D81D-C03E-455A-A294-0EC91581AC61}.Release|Any CPU.Build.0 = Release|Any CPU + {40C4360F-4012-4FBA-BA89-C06C8893AEDC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {40C4360F-4012-4FBA-BA89-C06C8893AEDC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {40C4360F-4012-4FBA-BA89-C06C8893AEDC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {40C4360F-4012-4FBA-BA89-C06C8893AEDC}.Release|Any CPU.Build.0 = Release|Any CPU + {754229AE-72DF-4B65-A72E-8AC7B23737DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {754229AE-72DF-4B65-A72E-8AC7B23737DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {754229AE-72DF-4B65-A72E-8AC7B23737DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {754229AE-72DF-4B65-A72E-8AC7B23737DC}.Release|Any CPU.Build.0 = Release|Any CPU + {3A8F9FAF-F801-4BCA-A3B8-0834526657DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3A8F9FAF-F801-4BCA-A3B8-0834526657DF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3A8F9FAF-F801-4BCA-A3B8-0834526657DF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3A8F9FAF-F801-4BCA-A3B8-0834526657DF}.Release|Any CPU.Build.0 = Release|Any CPU + {1AADC546-C5B7-4247-9557-FFF414A8C639}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1AADC546-C5B7-4247-9557-FFF414A8C639}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1AADC546-C5B7-4247-9557-FFF414A8C639}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1AADC546-C5B7-4247-9557-FFF414A8C639}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -186,6 +224,14 @@ Global {756F6023-9F34-4E0E-8D9D-A561BFB8BFF8} = {29A8D8F5-27EF-44B7-8C71-FC4E2D10EBBA} {F492B006-8C7C-471C-90C4-08C6A28F250A} = {29A8D8F5-27EF-44B7-8C71-FC4E2D10EBBA} {BBF8C38F-E4A7-42E3-AEEB-8A2D08E9FF7E} = {29A8D8F5-27EF-44B7-8C71-FC4E2D10EBBA} + {BBC4D81D-C03E-455A-A294-0EC91581AC61} = {3E6CB661-AA4C-477E-8747-2D2852A5B3C4} + {40C4360F-4012-4FBA-BA89-C06C8893AEDC} = {3E6CB661-AA4C-477E-8747-2D2852A5B3C4} + {3E6CB661-AA4C-477E-8747-2D2852A5B3C4} = {9CE6A0C3-971B-41D2-90E7-7ACC1D7AB598} + {754229AE-72DF-4B65-A72E-8AC7B23737DC} = {5AEC3A9F-78FF-4358-8B71-88294A4548C9} + {3A8F9FAF-F801-4BCA-A3B8-0834526657DF} = {5AEC3A9F-78FF-4358-8B71-88294A4548C9} + {5AEC3A9F-78FF-4358-8B71-88294A4548C9} = {9CE6A0C3-971B-41D2-90E7-7ACC1D7AB598} + {1AADC546-C5B7-4247-9557-FFF414A8C639} = {8D0B384E-98D9-4B04-823D-69B81F8E7920} + {8D0B384E-98D9-4B04-823D-69B81F8E7920} = {9CE6A0C3-971B-41D2-90E7-7ACC1D7AB598} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {4803416B-CE32-4730-905F-645A9B766D2B} diff --git a/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.Managed.cs b/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.Managed.cs index 4e5e8906b795cc..6f4047e98684e8 100644 --- a/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.Managed.cs +++ b/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.Managed.cs @@ -12,7 +12,7 @@ public static NegotiateAuthenticationPal Create(NegotiateAuthenticationClientOpt switch (clientOptions.Package) { case NegotiationInfoClass.NTLM: - return new ManagedNtlmNegotiateAuthenticationPal(clientOptions); + return ManagedNtlmNegotiateAuthenticationPal.Create(clientOptions); case NegotiationInfoClass.Negotiate: return new ManagedSpnegoNegotiateAuthenticationPal(clientOptions); diff --git a/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.ManagedNtlm.cs b/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.ManagedNtlm.cs index 866a754af72922..95be2c7fc8984e 100644 --- a/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.ManagedNtlm.cs +++ b/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.ManagedNtlm.cs @@ -218,17 +218,9 @@ private unsafe struct NtChallengeResponse public override IIdentity RemoteIdentity => throw new InvalidOperationException(); public override System.Security.Principal.TokenImpersonationLevel ImpersonationLevel => System.Security.Principal.TokenImpersonationLevel.Impersonation; - public ManagedNtlmNegotiateAuthenticationPal(NegotiateAuthenticationClientOptions clientOptions) + private ManagedNtlmNegotiateAuthenticationPal(NegotiateAuthenticationClientOptions clientOptions) { - Debug.Assert(clientOptions.Package == NegotiationInfoClass.NTLM); - _credential = clientOptions.Credential; - if (string.IsNullOrWhiteSpace(_credential.UserName) || string.IsNullOrWhiteSpace(_credential.Password)) - { - // NTLM authentication is not possible with default credentials which are no-op - throw new PlatformNotSupportedException(SR.net_ntlm_not_possible_default_cred); - } - _spn = clientOptions.TargetName; _channelBinding = clientOptions.Binding; _protectionLevel = clientOptions.RequiredProtectionLevel; @@ -236,6 +228,22 @@ public ManagedNtlmNegotiateAuthenticationPal(NegotiateAuthenticationClientOption if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"package={clientOptions.Package}, spn={_spn}, requiredProtectionLevel={_protectionLevel}"); } + public static new NegotiateAuthenticationPal Create(NegotiateAuthenticationClientOptions clientOptions) + { + Debug.Assert(clientOptions.Package == NegotiationInfoClass.NTLM); + + if (clientOptions.Credential == CredentialCache.DefaultNetworkCredentials || + string.IsNullOrWhiteSpace(clientOptions.Credential.UserName) || + string.IsNullOrWhiteSpace(clientOptions.Credential.Password)) + { + // NTLM authentication is not possible with default credentials which are no-op + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(null, SR.net_ntlm_not_possible_default_cred); + return new UnsupportedNegotiateAuthenticationPal(clientOptions, NegotiateAuthenticationStatusCode.UnknownCredentials); + } + + return new ManagedNtlmNegotiateAuthenticationPal(clientOptions); + } + public override void Dispose() { // Dispose of the state diff --git a/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.ManagedSpnego.cs b/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.ManagedSpnego.cs index 9721833914b206..4b94b32b02a237 100644 --- a/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.ManagedSpnego.cs +++ b/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.ManagedSpnego.cs @@ -303,16 +303,7 @@ private IEnumerable> EnumerateMechanisms() { // Abandon the optimistic path and restart with a new mechanism _optimisticMechanism?.Dispose(); - _mechanism = NegotiateAuthenticationPal.Create(new NegotiateAuthenticationClientOptions - { - Package = requestedPackage, - Credential = _clientOptions.Credential, - TargetName = _clientOptions.TargetName, - Binding = _clientOptions.Binding, - RequiredProtectionLevel = _clientOptions.RequiredProtectionLevel, - RequireMutualAuthentication = _clientOptions.RequireMutualAuthentication, - AllowedImpersonationLevel = _clientOptions.AllowedImpersonationLevel, - }); + _mechanism = CreateMechanismForPackage(requestedPackage); } _optimisticMechanism = null; diff --git a/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.Unix.cs b/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.Unix.cs index 776a50901411b9..610a6939e8123b 100644 --- a/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.Unix.cs +++ b/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.Unix.cs @@ -31,7 +31,7 @@ public static NegotiateAuthenticationPal Create(NegotiateAuthenticationClientOpt switch (clientOptions.Package) { case NegotiationInfoClass.NTLM: - return new ManagedNtlmNegotiateAuthenticationPal(clientOptions); + return ManagedNtlmNegotiateAuthenticationPal.Create(clientOptions); case NegotiationInfoClass.Negotiate: return new ManagedSpnegoNegotiateAuthenticationPal(clientOptions, supportKerberos: true); @@ -42,13 +42,15 @@ public static NegotiateAuthenticationPal Create(NegotiateAuthenticationClientOpt { return new UnixNegotiateAuthenticationPal(clientOptions); } - catch (Win32Exception) + catch (Interop.NetSecurityNative.GssApiException gex) { - return new UnsupportedNegotiateAuthenticationPal(clientOptions); - } - catch (PlatformNotSupportedException) - { - return new UnsupportedNegotiateAuthenticationPal(clientOptions); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(null, gex); + NegotiateAuthenticationStatusCode statusCode = UnixNegotiateAuthenticationPal.GetErrorCode(gex); + if (statusCode <= NegotiateAuthenticationStatusCode.GenericFailure) + { + statusCode = NegotiateAuthenticationStatusCode.Unsupported; + } + return new UnsupportedNegotiateAuthenticationPal(clientOptions, statusCode); } catch (EntryPointNotFoundException) { @@ -63,13 +65,15 @@ public static NegotiateAuthenticationPal Create(NegotiateAuthenticationServerOpt { return new UnixNegotiateAuthenticationPal(serverOptions); } - catch (Win32Exception) + catch (Interop.NetSecurityNative.GssApiException gex) { - return new UnsupportedNegotiateAuthenticationPal(serverOptions); - } - catch (PlatformNotSupportedException) - { - return new UnsupportedNegotiateAuthenticationPal(serverOptions); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(null, gex); + NegotiateAuthenticationStatusCode statusCode = UnixNegotiateAuthenticationPal.GetErrorCode(gex); + if (statusCode <= NegotiateAuthenticationStatusCode.GenericFailure) + { + statusCode = NegotiateAuthenticationStatusCode.Unsupported; + } + return new UnsupportedNegotiateAuthenticationPal(serverOptions, statusCode); } catch (EntryPointNotFoundException) { @@ -184,22 +188,25 @@ public UnixNegotiateAuthenticationPal(NegotiateAuthenticationClientOptions clien if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"Peer SPN-> '{_spn}'"); - if (clientOptions.Credential == CredentialCache.DefaultCredentials || + if (clientOptions.Credential == CredentialCache.DefaultNetworkCredentials || string.IsNullOrWhiteSpace(clientOptions.Credential.UserName) || string.IsNullOrWhiteSpace(clientOptions.Credential.Password)) { if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, "using DefaultCredentials"); - _credentialsHandle = AcquireDefaultCredential(); if (_packageType == Interop.NetSecurityNative.PackageType.NTLM) { // NTLM authentication is not possible with default credentials which are no-op - throw new PlatformNotSupportedException(SR.net_ntlm_not_possible_default_cred); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, SR.net_ntlm_not_possible_default_cred); + throw new Interop.NetSecurityNative.GssApiException(Interop.NetSecurityNative.Status.GSS_S_NO_CRED, 0, SR.net_ntlm_not_possible_default_cred); } if (string.IsNullOrEmpty(_spn)) { - throw new PlatformNotSupportedException(SR.net_nego_not_supported_empty_target_with_defaultcreds); + if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, SR.net_nego_not_supported_empty_target_with_defaultcreds); + throw new Interop.NetSecurityNative.GssApiException(Interop.NetSecurityNative.Status.GSS_S_BAD_NAME, 0, SR.net_nego_not_supported_empty_target_with_defaultcreds); } + + _credentialsHandle = SafeGssCredHandle.Create(string.Empty, string.Empty, _packageType); } else { @@ -229,7 +236,7 @@ public UnixNegotiateAuthenticationPal(NegotiateAuthenticationServerOptions serve if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"Peer SPN-> '{_spn}'"); - if (serverOptions.Credential == CredentialCache.DefaultCredentials || + if (serverOptions.Credential == CredentialCache.DefaultNetworkCredentials || string.IsNullOrWhiteSpace(serverOptions.Credential.UserName) || string.IsNullOrWhiteSpace(serverOptions.Credential.Password)) { @@ -462,24 +469,7 @@ private static Interop.NetSecurityNative.PackageType GetPackageType(string packa else { // Native shim currently supports only NTLM, Negotiate and Kerberos - throw new PlatformNotSupportedException(SR.net_securitypackagesupport); - } - } - - private SafeGssCredHandle AcquireDefaultCredential() - { - try - { - return SafeGssCredHandle.Create(string.Empty, string.Empty, _packageType); - } - catch (Exception ex) - { - if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(this, ex); - - // NOTE: We throw PlatformNotSupportedException which is caught in - // NegotiateAuthenticationPal.Create and transformed into instantiation of - // UnsupportedNegotiateAuthenticationPal. - throw new PlatformNotSupportedException(ex.Message, ex); + throw new Interop.NetSecurityNative.GssApiException(Interop.NetSecurityNative.Status.GSS_S_UNAVAILABLE, 0); } } @@ -511,14 +501,10 @@ private SafeGssCredHandle AcquireCredentialsHandle(NetworkCredential credential) return SafeGssCredHandle.Create(username, password, _packageType); } - catch (Exception ex) + catch (Exception ex) when (ex is not Interop.NetSecurityNative.GssApiException) { if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(this, ex); - - // NOTE: We throw PlatformNotSupportedException which is caught in - // NegotiateAuthenticationPal.Create and transformed into instantiation of - // UnsupportedNegotiateAuthenticationPal. - throw new PlatformNotSupportedException(ex.Message, ex); + throw new Interop.NetSecurityNative.GssApiException(Interop.NetSecurityNative.Status.GSS_S_BAD_NAME, 0); } } @@ -753,7 +739,7 @@ private NegotiateAuthenticationStatusCode AcceptSecurityContext( } // https://www.gnu.org/software/gss/reference/gss.pdf (page 25) - private static NegotiateAuthenticationStatusCode GetErrorCode(Interop.NetSecurityNative.GssApiException exception) + internal static NegotiateAuthenticationStatusCode GetErrorCode(Interop.NetSecurityNative.GssApiException exception) { switch (exception.MajorStatus) { diff --git a/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.Unsupported.cs b/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.Unsupported.cs index 7e6498832f738c..85f3f01d55da87 100644 --- a/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.Unsupported.cs +++ b/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.Unsupported.cs @@ -15,6 +15,7 @@ internal sealed class UnsupportedNegotiateAuthenticationPal : NegotiateAuthentic { private string _package; private string? _targetName; + private NegotiateAuthenticationStatusCode _statusCode; public override bool IsAuthenticated => false; public override bool IsSigned => false; @@ -25,15 +26,17 @@ internal sealed class UnsupportedNegotiateAuthenticationPal : NegotiateAuthentic public override IIdentity RemoteIdentity => throw new InvalidOperationException(); public override System.Security.Principal.TokenImpersonationLevel ImpersonationLevel => System.Security.Principal.TokenImpersonationLevel.Impersonation; - public UnsupportedNegotiateAuthenticationPal(NegotiateAuthenticationClientOptions clientOptions) + public UnsupportedNegotiateAuthenticationPal(NegotiateAuthenticationClientOptions clientOptions, NegotiateAuthenticationStatusCode statusCode = NegotiateAuthenticationStatusCode.Unsupported) { _package = clientOptions.Package; _targetName = clientOptions.TargetName; + _statusCode = statusCode; } - public UnsupportedNegotiateAuthenticationPal(NegotiateAuthenticationServerOptions serverOptions) + public UnsupportedNegotiateAuthenticationPal(NegotiateAuthenticationServerOptions serverOptions, NegotiateAuthenticationStatusCode statusCode = NegotiateAuthenticationStatusCode.Unsupported) { _package = serverOptions.Package; + _statusCode = statusCode; } public override void Dispose() @@ -42,7 +45,7 @@ public override void Dispose() public override byte[]? GetOutgoingBlob(ReadOnlySpan incomingBlob, out NegotiateAuthenticationStatusCode statusCode) { - statusCode = NegotiateAuthenticationStatusCode.Unsupported; + statusCode = _statusCode; return null; } diff --git a/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.Windows.cs b/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.Windows.cs index 3dcb03bfd08f74..07e8dea22baa9c 100644 --- a/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.Windows.cs +++ b/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.Windows.cs @@ -421,28 +421,32 @@ public override unsafe NegotiateAuthenticationStatusCode Wrap(ReadOnlySpan Debug.Assert(success); // alloc new output buffer if not supplied or too small - int resultSize = input.Length + sizes.cbMaxSignature; + int resultSize = input.Length + sizes.cbSecurityTrailer + sizes.cbBlockSize; Span outputBuffer = outputWriter.GetSpan(resultSize); // make a copy of user data for in-place encryption - input.CopyTo(outputBuffer.Slice(sizes.cbMaxSignature, input.Length)); + input.CopyTo(outputBuffer.Slice(sizes.cbSecurityTrailer, input.Length)); isEncrypted = requestEncryption; fixed (byte* outputPtr = outputBuffer) { // Prepare buffers TOKEN(signature), DATA and Padding. - Interop.SspiCli.SecBuffer* unmanagedBuffer = stackalloc Interop.SspiCli.SecBuffer[2]; + Interop.SspiCli.SecBuffer* unmanagedBuffer = stackalloc Interop.SspiCli.SecBuffer[3]; Interop.SspiCli.SecBuffer* tokenBuffer = &unmanagedBuffer[0]; Interop.SspiCli.SecBuffer* dataBuffer = &unmanagedBuffer[1]; + Interop.SspiCli.SecBuffer* paddingBuffer = &unmanagedBuffer[2]; tokenBuffer->BufferType = SecurityBufferType.SECBUFFER_TOKEN; tokenBuffer->pvBuffer = (IntPtr)(outputPtr); - tokenBuffer->cbBuffer = sizes.cbMaxSignature; + tokenBuffer->cbBuffer = sizes.cbSecurityTrailer; dataBuffer->BufferType = SecurityBufferType.SECBUFFER_DATA; - dataBuffer->pvBuffer = (IntPtr)(outputPtr + sizes.cbMaxSignature); + dataBuffer->pvBuffer = (IntPtr)(outputPtr + sizes.cbSecurityTrailer); dataBuffer->cbBuffer = input.Length; + paddingBuffer->BufferType = SecurityBufferType.SECBUFFER_PADDING; + paddingBuffer->pvBuffer = (IntPtr)(outputPtr + sizes.cbSecurityTrailer + input.Length); + paddingBuffer->cbBuffer = sizes.cbBlockSize; - Interop.SspiCli.SecBufferDesc sdcInOut = new Interop.SspiCli.SecBufferDesc(2) + Interop.SspiCli.SecBufferDesc sdcInOut = new Interop.SspiCli.SecBufferDesc(3) { pBuffers = unmanagedBuffer }; @@ -460,7 +464,20 @@ public override unsafe NegotiateAuthenticationStatusCode Wrap(ReadOnlySpan }; } - outputWriter.Advance(tokenBuffer->cbBuffer + dataBuffer->cbBuffer); + // Compact the result + if (tokenBuffer->cbBuffer != sizes.cbSecurityTrailer) + { + outputBuffer.Slice(sizes.cbSecurityTrailer, dataBuffer->cbBuffer).CopyTo( + outputBuffer.Slice(tokenBuffer->cbBuffer, dataBuffer->cbBuffer)); + } + if (tokenBuffer->cbBuffer != sizes.cbSecurityTrailer || + paddingBuffer->cbBuffer != sizes.cbBlockSize) + { + outputBuffer.Slice(sizes.cbSecurityTrailer + input.Length, paddingBuffer->cbBuffer).CopyTo( + outputBuffer.Slice(tokenBuffer->cbBuffer + dataBuffer->cbBuffer, paddingBuffer->cbBuffer)); + } + + outputWriter.Advance(tokenBuffer->cbBuffer + dataBuffer->cbBuffer + paddingBuffer->cbBuffer); return NegotiateAuthenticationStatusCode.Completed; } } diff --git a/src/libraries/System.Net.Security/tests/FunctionalTests/SslAuthenticationOptionsTest.cs b/src/libraries/System.Net.Security/tests/FunctionalTests/SslAuthenticationOptionsTest.cs index b026fc03b04a22..a086f6f123b812 100644 --- a/src/libraries/System.Net.Security/tests/FunctionalTests/SslAuthenticationOptionsTest.cs +++ b/src/libraries/System.Net.Security/tests/FunctionalTests/SslAuthenticationOptionsTest.cs @@ -144,6 +144,33 @@ await TestConfiguration.WhenAllOrAnyFailedWithTimeout( Assert.Equal(string.Empty, server.TargetHostName); } } + + [Fact] + public void ClientOptions_ShallowCopy_OK() + { + using X509Certificate2 clientCert = Configuration.Certificates.GetClientCertificate(); + + // needs to non-default values so we can verify it was copied correctly. + var clientOptions = new SslClientAuthenticationOptions + { + AllowRenegotiation = false, + AllowTlsResume = false, + ApplicationProtocols = new List { SslApplicationProtocol.Http11, SslApplicationProtocol.Http2 }, + CertificateRevocationCheckMode = X509RevocationMode.Online, + ClientCertificates = new X509CertificateCollection() { clientCert }, + EnabledSslProtocols = SslProtocols.Tls12, + EncryptionPolicy = EncryptionPolicy.RequireEncryption, + TargetHost = "foo", + CertificateChainPolicy = new X509ChainPolicy(), + RemoteCertificateValidationCallback = new RemoteCertificateValidationCallback(delegate { return true; }), + LocalCertificateSelectionCallback = new LocalCertificateSelectionCallback(delegate { return null; }), + ClientCertificateContext = SslStreamCertificateContext.Create(clientCert, null, false), + }; + + // There is consistency check inside of the ShallowClone + _ = clientOptions.ShallowClone(); + } + } public sealed class SslClientAuthenticationOptionsTestBase_Sync : SslClientAuthenticationOptionsTestBase 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 341ba3b02b1859..fe0454d83eea3a 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 @@ -100,6 +100,8 @@ Link="ProductionCode\Common\System\Net\MultiArrayBuffer.cs" /> + diff --git a/src/libraries/System.Net.Security/tests/StressTests/SslStress/Directory.Build.props b/src/libraries/System.Net.Security/tests/StressTests/SslStress/Directory.Build.props index 0183d8b3696f4e..b76820a629d6fe 100644 --- a/src/libraries/System.Net.Security/tests/StressTests/SslStress/Directory.Build.props +++ b/src/libraries/System.Net.Security/tests/StressTests/SslStress/Directory.Build.props @@ -2,16 +2,16 @@ linux-x64 win-x64 - + $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)../, global.json))/ $(RepositoryRoot)eng/targetingpacks.targets - 8.0.0 - net8.0 - 8.0 + 9.0.0 + net9.0 + 9.0 Microsoft.NETCore.App $(RepositoryRoot)artifacts/bin/microsoft.netcore.app.ref/ $(RepositoryRoot)artifacts/bin/microsoft.netcore.app.runtime.$(OutputRID)/$(Configuration)/ - \ No newline at end of file + diff --git a/src/libraries/System.Net.Security/tests/UnitTests/NegotiateAuthenticationTests.cs b/src/libraries/System.Net.Security/tests/UnitTests/NegotiateAuthenticationTests.cs index 3e569b1153e853..22c14cd0e2440d 100644 --- a/src/libraries/System.Net.Security/tests/UnitTests/NegotiateAuthenticationTests.cs +++ b/src/libraries/System.Net.Security/tests/UnitTests/NegotiateAuthenticationTests.cs @@ -94,6 +94,18 @@ public void Package_Unsupported_NTLM() Assert.Equal(NegotiateAuthenticationStatusCode.Unsupported, statusCode); } + [Fact] + [SkipOnPlatform(TestPlatforms.Windows, "The test is specific to GSSAPI / Managed implementations of NegotiateAuthentication")] + public void DefaultNetworkCredentials_NTLM_DoesNotThrow() + { + NegotiateAuthenticationClientOptions clientOptions = new NegotiateAuthenticationClientOptions { Package = "NTLM", Credential = CredentialCache.DefaultNetworkCredentials, TargetName = "HTTP/foo" }; + // Assert.DoesNotThrow + NegotiateAuthentication negotiateAuthentication = new NegotiateAuthentication(clientOptions); + NegotiateAuthenticationStatusCode statusCode; + negotiateAuthentication.GetOutgoingBlob((byte[]?)null, out statusCode); + Assert.Equal(NegotiateAuthenticationStatusCode.UnknownCredentials, statusCode); + } + [Fact] public void NtlmProtocolExampleTest() { diff --git a/src/libraries/System.Net.ServicePoint/System.Net.ServicePoint.sln b/src/libraries/System.Net.ServicePoint/System.Net.ServicePoint.sln index e9d8ddcb124735..8fc87f79d53f99 100644 --- a/src/libraries/System.Net.ServicePoint/System.Net.ServicePoint.sln +++ b/src/libraries/System.Net.ServicePoint/System.Net.ServicePoint.sln @@ -33,6 +33,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography", "..\System.Security.Cryptography\ref\System.Security.Cryptography.csproj", "{93B34712-6874-48FD-B5B2-A6A1001B3971}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{2987B1BD-0F93-4685-87EB-78A4D06B164E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{8310CB7A-8920-4F11-82A4-AD187FED940F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{E08549E3-429D-4008-AF68-7F3EA6B799ED}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{541CCC1F-D603-42E6-BC22-DC89AFE275AD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{F9A4DC11-DF60-486E-8C61-8A8A6A95C315}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{25E4C3E2-CEE1-4725-BB91-2AEB290C0953}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{2A282996-B091-4BE8-BBD5-2F25A9C87A74}" @@ -41,6 +51,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{7D37D576-0E8 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{47FBD2B8-E991-449C-A4D7-33A636AD5C7F}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{0DC8ADC5-35B5-49C6-8538-0C708D0EEC3F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{42D9F460-E044-41F4-B78F-EDFF04838777}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{4FCF4CD6-43B0-4C11-A522-B74D3676BB9D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{E6FAE2F1-4EA3-43DF-A357-7D511EC8A733}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -115,6 +133,26 @@ Global {93B34712-6874-48FD-B5B2-A6A1001B3971}.Debug|Any CPU.Build.0 = Debug|Any CPU {93B34712-6874-48FD-B5B2-A6A1001B3971}.Release|Any CPU.ActiveCfg = Release|Any CPU {93B34712-6874-48FD-B5B2-A6A1001B3971}.Release|Any CPU.Build.0 = Release|Any CPU + {2987B1BD-0F93-4685-87EB-78A4D06B164E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2987B1BD-0F93-4685-87EB-78A4D06B164E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2987B1BD-0F93-4685-87EB-78A4D06B164E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2987B1BD-0F93-4685-87EB-78A4D06B164E}.Release|Any CPU.Build.0 = Release|Any CPU + {8310CB7A-8920-4F11-82A4-AD187FED940F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8310CB7A-8920-4F11-82A4-AD187FED940F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8310CB7A-8920-4F11-82A4-AD187FED940F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8310CB7A-8920-4F11-82A4-AD187FED940F}.Release|Any CPU.Build.0 = Release|Any CPU + {E08549E3-429D-4008-AF68-7F3EA6B799ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E08549E3-429D-4008-AF68-7F3EA6B799ED}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E08549E3-429D-4008-AF68-7F3EA6B799ED}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E08549E3-429D-4008-AF68-7F3EA6B799ED}.Release|Any CPU.Build.0 = Release|Any CPU + {541CCC1F-D603-42E6-BC22-DC89AFE275AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {541CCC1F-D603-42E6-BC22-DC89AFE275AD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {541CCC1F-D603-42E6-BC22-DC89AFE275AD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {541CCC1F-D603-42E6-BC22-DC89AFE275AD}.Release|Any CPU.Build.0 = Release|Any CPU + {F9A4DC11-DF60-486E-8C61-8A8A6A95C315}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F9A4DC11-DF60-486E-8C61-8A8A6A95C315}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F9A4DC11-DF60-486E-8C61-8A8A6A95C315}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F9A4DC11-DF60-486E-8C61-8A8A6A95C315}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -137,6 +175,14 @@ Global {3AE6973A-7E59-4F78-8B3F-FFBFEF38D89A} = {7D37D576-0E85-4EEA-9852-B80E14E1053C} {11937440-4272-4B21-A536-230B62BD8D07} = {47FBD2B8-E991-449C-A4D7-33A636AD5C7F} {A16FDE31-C850-412B-9541-3210D5D48AE1} = {47FBD2B8-E991-449C-A4D7-33A636AD5C7F} + {2987B1BD-0F93-4685-87EB-78A4D06B164E} = {0DC8ADC5-35B5-49C6-8538-0C708D0EEC3F} + {8310CB7A-8920-4F11-82A4-AD187FED940F} = {0DC8ADC5-35B5-49C6-8538-0C708D0EEC3F} + {0DC8ADC5-35B5-49C6-8538-0C708D0EEC3F} = {E6FAE2F1-4EA3-43DF-A357-7D511EC8A733} + {E08549E3-429D-4008-AF68-7F3EA6B799ED} = {42D9F460-E044-41F4-B78F-EDFF04838777} + {541CCC1F-D603-42E6-BC22-DC89AFE275AD} = {42D9F460-E044-41F4-B78F-EDFF04838777} + {42D9F460-E044-41F4-B78F-EDFF04838777} = {E6FAE2F1-4EA3-43DF-A357-7D511EC8A733} + {F9A4DC11-DF60-486E-8C61-8A8A6A95C315} = {4FCF4CD6-43B0-4C11-A522-B74D3676BB9D} + {4FCF4CD6-43B0-4C11-A522-B74D3676BB9D} = {E6FAE2F1-4EA3-43DF-A357-7D511EC8A733} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2DB03DED-414C-43AC-A6FD-748FEB8492EB} diff --git a/src/libraries/System.Net.Sockets/System.Net.Sockets.sln b/src/libraries/System.Net.Sockets/System.Net.Sockets.sln index da47efbb83bd14..edac3bf4a63f18 100644 --- a/src/libraries/System.Net.Sockets/System.Net.Sockets.sln +++ b/src/libraries/System.Net.Sockets/System.Net.Sockets.sln @@ -25,6 +25,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.InteropServi EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{F7A848B6-8307-4702-AEEE-20223FB73F29}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{FA256A4B-476D-4BCA-8E62-C2A11DF778CE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{6D7B425E-F07B-4572-98D8-728E3053E30F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{21411575-DD1A-45E1-8B10-6D4EA58684CD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{FA935CE3-6C83-4993-B565-95DF3129A43B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{C2011D8C-93D7-486E-8B01-0792262F4EF8}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{FAD51322-998C-42D4-8FAA-EA479A3A0E82}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{FC5FEA3E-33B9-4AEE-8E41-367BB73182EF}" @@ -33,6 +43,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{2C7108F0-035 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{51E336C9-CFE7-4459-B407-FD5D9E760D85}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{CCBA19A8-17AB-402A-96E6-A1C92784EAC2}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{99B1FC8E-726F-4DBF-887D-38AC7F63C230}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{2D08A54A-C557-444C-9D8D-0BF0E20CDE5A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{725DA203-1DB5-47D5-991A-8440E254BB23}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -91,6 +109,26 @@ Global {F7A848B6-8307-4702-AEEE-20223FB73F29}.Debug|Any CPU.Build.0 = Debug|Any CPU {F7A848B6-8307-4702-AEEE-20223FB73F29}.Release|Any CPU.ActiveCfg = Release|Any CPU {F7A848B6-8307-4702-AEEE-20223FB73F29}.Release|Any CPU.Build.0 = Release|Any CPU + {FA256A4B-476D-4BCA-8E62-C2A11DF778CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA256A4B-476D-4BCA-8E62-C2A11DF778CE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA256A4B-476D-4BCA-8E62-C2A11DF778CE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA256A4B-476D-4BCA-8E62-C2A11DF778CE}.Release|Any CPU.Build.0 = Release|Any CPU + {6D7B425E-F07B-4572-98D8-728E3053E30F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6D7B425E-F07B-4572-98D8-728E3053E30F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6D7B425E-F07B-4572-98D8-728E3053E30F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6D7B425E-F07B-4572-98D8-728E3053E30F}.Release|Any CPU.Build.0 = Release|Any CPU + {21411575-DD1A-45E1-8B10-6D4EA58684CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {21411575-DD1A-45E1-8B10-6D4EA58684CD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {21411575-DD1A-45E1-8B10-6D4EA58684CD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {21411575-DD1A-45E1-8B10-6D4EA58684CD}.Release|Any CPU.Build.0 = Release|Any CPU + {FA935CE3-6C83-4993-B565-95DF3129A43B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA935CE3-6C83-4993-B565-95DF3129A43B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA935CE3-6C83-4993-B565-95DF3129A43B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA935CE3-6C83-4993-B565-95DF3129A43B}.Release|Any CPU.Build.0 = Release|Any CPU + {C2011D8C-93D7-486E-8B01-0792262F4EF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C2011D8C-93D7-486E-8B01-0792262F4EF8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C2011D8C-93D7-486E-8B01-0792262F4EF8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C2011D8C-93D7-486E-8B01-0792262F4EF8}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -109,6 +147,14 @@ Global {85782EDD-90A7-4600-89EB-4E2C0AAAD446} = {51E336C9-CFE7-4459-B407-FD5D9E760D85} {0CAE4AA4-2C81-4CA4-978A-F86DD25FA338} = {51E336C9-CFE7-4459-B407-FD5D9E760D85} {3DD27643-568B-4BA1-82F2-FACFC8365836} = {51E336C9-CFE7-4459-B407-FD5D9E760D85} + {FA256A4B-476D-4BCA-8E62-C2A11DF778CE} = {CCBA19A8-17AB-402A-96E6-A1C92784EAC2} + {6D7B425E-F07B-4572-98D8-728E3053E30F} = {CCBA19A8-17AB-402A-96E6-A1C92784EAC2} + {CCBA19A8-17AB-402A-96E6-A1C92784EAC2} = {725DA203-1DB5-47D5-991A-8440E254BB23} + {21411575-DD1A-45E1-8B10-6D4EA58684CD} = {99B1FC8E-726F-4DBF-887D-38AC7F63C230} + {FA935CE3-6C83-4993-B565-95DF3129A43B} = {99B1FC8E-726F-4DBF-887D-38AC7F63C230} + {99B1FC8E-726F-4DBF-887D-38AC7F63C230} = {725DA203-1DB5-47D5-991A-8440E254BB23} + {C2011D8C-93D7-486E-8B01-0792262F4EF8} = {2D08A54A-C557-444C-9D8D-0BF0E20CDE5A} + {2D08A54A-C557-444C-9D8D-0BF0E20CDE5A} = {725DA203-1DB5-47D5-991A-8440E254BB23} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {BA222465-FBD4-4377-8A8A-783BF85E01F7} diff --git a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEventArgs.cs b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEventArgs.cs index e04739d5fe7a6e..e94d862571a0f8 100644 --- a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEventArgs.cs +++ b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEventArgs.cs @@ -927,13 +927,13 @@ internal void FinishOperationSyncSuccess(int bytesTransferred, SocketFlags flags { try { - if (_remoteEndPoint!.AddressFamily == _socketAddress!.Family) + if (_remoteEndPoint!.AddressFamily == AddressFamily.InterNetworkV6 && _socketAddress!.Family == AddressFamily.InterNetwork) { - _remoteEndPoint = _remoteEndPoint!.Create(_socketAddress); + _remoteEndPoint = new IPEndPoint(_socketAddress.GetIPAddress().MapToIPv6(), _socketAddress.GetPort()); } - else if (_remoteEndPoint!.AddressFamily == AddressFamily.InterNetworkV6 && _socketAddress.Family == AddressFamily.InterNetwork) + else { - _remoteEndPoint = new IPEndPoint(_socketAddress.GetIPAddress().MapToIPv6(), _socketAddress.GetPort()); + _remoteEndPoint = _remoteEndPoint!.Create(_socketAddress!); } } catch @@ -949,7 +949,14 @@ internal void FinishOperationSyncSuccess(int bytesTransferred, SocketFlags flags { try { - _remoteEndPoint = _remoteEndPoint!.Create(_socketAddress!); + if (_remoteEndPoint!.AddressFamily == AddressFamily.InterNetworkV6 && _socketAddress!.Family == AddressFamily.InterNetwork) + { + _remoteEndPoint = new IPEndPoint(_socketAddress.GetIPAddress().MapToIPv6(), _socketAddress.GetPort()); + } + else + { + _remoteEndPoint = _remoteEndPoint!.Create(_socketAddress!); + } } catch { diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/ReceiveFrom.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/ReceiveFrom.cs index 1a5ec7d05d28e9..1ec2adeadcf517 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/ReceiveFrom.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/ReceiveFrom.cs @@ -168,6 +168,52 @@ public async Task ReceiveSent_UDP_Success(bool ipv4) } } + [Theory] + [InlineData(false)] + [InlineData(true)] + public async Task ReceiveSent_DualMode_Success(bool ipv4) + { + const int Offset = 10; + const int DatagramSize = 256; + const int DatagramsToSend = 16; + + IPAddress address = ipv4 ? IPAddress.Loopback : IPAddress.IPv6Loopback; + using Socket receiver = new Socket(SocketType.Dgram, ProtocolType.Udp); + using Socket sender = new Socket(SocketType.Dgram, ProtocolType.Udp); + if (receiver.DualMode != true || sender.DualMode != true) + { + throw new SkipException("DualMode not available"); + } + + ConfigureNonBlocking(sender); + ConfigureNonBlocking(receiver); + + receiver.BindToAnonymousPort(address); + sender.BindToAnonymousPort(address); + + byte[] sendBuffer = new byte[DatagramSize]; + var receiveInternalBuffer = new byte[DatagramSize + Offset]; + var emptyBuffer = new byte[Offset]; + ArraySegment receiveBuffer = new ArraySegment(receiveInternalBuffer, Offset, DatagramSize); + + Random rnd = new Random(0); + + for (int i = 0; i < DatagramsToSend; i++) + { + rnd.NextBytes(sendBuffer); + sender.SendTo(sendBuffer, receiver.LocalEndPoint); + + IPEndPoint remoteEp = new IPEndPoint(ipv4 ? IPAddress.Any : IPAddress.IPv6Any, 0); + + SocketReceiveFromResult result = await ReceiveFromAsync(receiver, receiveBuffer, remoteEp); + + Assert.Equal(DatagramSize, result.ReceivedBytes); + AssertExtensions.SequenceEqual(emptyBuffer, new ReadOnlySpan(receiveInternalBuffer, 0, Offset)); + AssertExtensions.SequenceEqual(sendBuffer, new ReadOnlySpan(receiveInternalBuffer, Offset, DatagramSize)); + Assert.Equal(sender.LocalEndPoint, result.RemoteEndPoint); + } + } + [Theory] [InlineData(false)] [InlineData(true)] diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendReceive/SendReceive.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendReceive/SendReceive.cs index f9c9cf0b41727f..ded845cabc160f 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendReceive/SendReceive.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendReceive/SendReceive.cs @@ -67,7 +67,7 @@ public async Task SendRecv_Stream_TCP(IPAddress listenAt, bool useMultipleBuffer var recvBuffer = new byte[256]; while (true) { - int received = await ReceiveAsync(remote, new ArraySegment(recvBuffer)); + int received = await ReceiveAsync(remote, new ArraySegment(recvBuffer)).WaitAsync(TestSettings.PassingTestTimeout); if (received == 0) { break; @@ -86,7 +86,7 @@ public async Task SendRecv_Stream_TCP(IPAddress listenAt, bool useMultipleBuffer new ArraySegment(new byte[64], 9, 33)}; while (true) { - int received = await ReceiveAsync(remote, recvBuffers); + int received = await ReceiveAsync(remote, recvBuffers).WaitAsync(TestSettings.PassingTestTimeout); if (received == 0) { break; @@ -109,7 +109,9 @@ public async Task SendRecv_Stream_TCP(IPAddress listenAt, bool useMultipleBuffer EndPoint clientEndpoint = server.LocalEndPoint; using (var client = new Socket(clientEndpoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp)) { - await ConnectAsync(client, clientEndpoint).WaitAsync(TestSettings.PassingTestTimeout); + await ConnectAsync(client, clientEndpoint) + .WaitAsync(TestSettings.PassingTestTimeout) + .ConfigureAwait(false); var random = new Random(); if (!useMultipleBuffers) @@ -118,7 +120,9 @@ public async Task SendRecv_Stream_TCP(IPAddress listenAt, bool useMultipleBuffer for (int sent = 0, remaining = BytesToSend; remaining > 0; remaining -= sent) { random.NextBytes(sendBuffer); - sent = await SendAsync(client, new ArraySegment(sendBuffer, 0, Math.Min(sendBuffer.Length, remaining))); + sent = await SendAsync(client, new ArraySegment(sendBuffer, 0, Math.Min(sendBuffer.Length, remaining))) + .WaitAsync(TestSettings.PassingTestTimeout) + .ConfigureAwait(false); bytesSent += sent; sentChecksum.Add(sendBuffer, 0, sent); } @@ -137,7 +141,9 @@ public async Task SendRecv_Stream_TCP(IPAddress listenAt, bool useMultipleBuffer random.NextBytes(sendBuffers[i].Array); } - sent = await SendAsync(client, sendBuffers); + sent = await SendAsync(client, sendBuffers) + .WaitAsync(TestSettings.PassingTestTimeout) + .ConfigureAwait(false); bytesSent += sent; for (int i = 0, remaining = sent; i < sendBuffers.Count && remaining > 0; i++) @@ -152,7 +158,7 @@ public async Task SendRecv_Stream_TCP(IPAddress listenAt, bool useMultipleBuffer client.LingerState = new LingerOption(true, LingerTime); client.Shutdown(SocketShutdown.Send); - await serverProcessingTask.WaitAsync(TestSettings.PassingTestTimeout); + await serverProcessingTask.WaitAsync(TestSettings.PassingTestTimeout).ConfigureAwait(false); } Assert.Equal(bytesSent, bytesReceived); diff --git a/src/libraries/System.Net.WebClient/System.Net.WebClient.sln b/src/libraries/System.Net.WebClient/System.Net.WebClient.sln index 7f5c729e625444..12241be11775ed 100644 --- a/src/libraries/System.Net.WebClient/System.Net.WebClient.sln +++ b/src/libraries/System.Net.WebClient/System.Net.WebClient.sln @@ -51,6 +51,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptograph EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading", "..\System.Threading\ref\System.Threading.csproj", "{1E3C8397-415C-46A7-B1BE-890F6FBEF34F}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{E2C1D03D-DA79-4F28-9FF5-C8A5A94332B9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{5FC31AED-6A64-4CA0-B629-49FBA725843D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{1059C4DF-3F31-4105-B5D9-F61881B56E42}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{2AA6EEF3-1F26-4878-A4BD-B1F0C8CEACED}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{C02DBDB3-ED7C-4B26-B5A9-4D4C0985F722}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{B8630BF1-D7F2-4E01-B030-A4E981428E42}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{33D25EB4-FCAA-41F3-B411-5946DEF7CEFE}" @@ -59,6 +69,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{ECCD7E4F-3B4 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{EBEFBFED-2B7D-4133-8D79-0F61D6E8A085}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{8AA84E5D-09EF-4E56-ACFD-6150B5B59EE6}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{295A4D3E-99F5-428C-BFD4-953406F8E964}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{C8FC1413-126F-41B5-990D-99FB2A38889A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{E3992B0B-4880-40BA-82BE-9F1001B90C6C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -169,6 +187,26 @@ Global {1E3C8397-415C-46A7-B1BE-890F6FBEF34F}.Debug|Any CPU.Build.0 = Debug|Any CPU {1E3C8397-415C-46A7-B1BE-890F6FBEF34F}.Release|Any CPU.ActiveCfg = Release|Any CPU {1E3C8397-415C-46A7-B1BE-890F6FBEF34F}.Release|Any CPU.Build.0 = Release|Any CPU + {E2C1D03D-DA79-4F28-9FF5-C8A5A94332B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E2C1D03D-DA79-4F28-9FF5-C8A5A94332B9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E2C1D03D-DA79-4F28-9FF5-C8A5A94332B9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E2C1D03D-DA79-4F28-9FF5-C8A5A94332B9}.Release|Any CPU.Build.0 = Release|Any CPU + {5FC31AED-6A64-4CA0-B629-49FBA725843D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5FC31AED-6A64-4CA0-B629-49FBA725843D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5FC31AED-6A64-4CA0-B629-49FBA725843D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5FC31AED-6A64-4CA0-B629-49FBA725843D}.Release|Any CPU.Build.0 = Release|Any CPU + {1059C4DF-3F31-4105-B5D9-F61881B56E42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1059C4DF-3F31-4105-B5D9-F61881B56E42}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1059C4DF-3F31-4105-B5D9-F61881B56E42}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1059C4DF-3F31-4105-B5D9-F61881B56E42}.Release|Any CPU.Build.0 = Release|Any CPU + {2AA6EEF3-1F26-4878-A4BD-B1F0C8CEACED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2AA6EEF3-1F26-4878-A4BD-B1F0C8CEACED}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2AA6EEF3-1F26-4878-A4BD-B1F0C8CEACED}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2AA6EEF3-1F26-4878-A4BD-B1F0C8CEACED}.Release|Any CPU.Build.0 = Release|Any CPU + {C02DBDB3-ED7C-4B26-B5A9-4D4C0985F722}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C02DBDB3-ED7C-4B26-B5A9-4D4C0985F722}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C02DBDB3-ED7C-4B26-B5A9-4D4C0985F722}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C02DBDB3-ED7C-4B26-B5A9-4D4C0985F722}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -200,6 +238,14 @@ Global {18F1E6CD-3568-4042-9EC3-6430FD60EC3A} = {ECCD7E4F-3B41-4CEA-AF93-152825598039} {992323BD-CC20-4630-AFD2-1483726305B8} = {EBEFBFED-2B7D-4133-8D79-0F61D6E8A085} {B1389C0F-EAEB-4E1A-AA8F-8A3CED861A2D} = {EBEFBFED-2B7D-4133-8D79-0F61D6E8A085} + {E2C1D03D-DA79-4F28-9FF5-C8A5A94332B9} = {8AA84E5D-09EF-4E56-ACFD-6150B5B59EE6} + {5FC31AED-6A64-4CA0-B629-49FBA725843D} = {8AA84E5D-09EF-4E56-ACFD-6150B5B59EE6} + {8AA84E5D-09EF-4E56-ACFD-6150B5B59EE6} = {E3992B0B-4880-40BA-82BE-9F1001B90C6C} + {1059C4DF-3F31-4105-B5D9-F61881B56E42} = {295A4D3E-99F5-428C-BFD4-953406F8E964} + {2AA6EEF3-1F26-4878-A4BD-B1F0C8CEACED} = {295A4D3E-99F5-428C-BFD4-953406F8E964} + {295A4D3E-99F5-428C-BFD4-953406F8E964} = {E3992B0B-4880-40BA-82BE-9F1001B90C6C} + {C02DBDB3-ED7C-4B26-B5A9-4D4C0985F722} = {C8FC1413-126F-41B5-990D-99FB2A38889A} + {C8FC1413-126F-41B5-990D-99FB2A38889A} = {E3992B0B-4880-40BA-82BE-9F1001B90C6C} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {22B7F474-635F-4C3B-A730-3BBE6C176F12} diff --git a/src/libraries/System.Net.WebHeaderCollection/System.Net.WebHeaderCollection.sln b/src/libraries/System.Net.WebHeaderCollection/System.Net.WebHeaderCollection.sln index cc33ea615801c6..9d5e3fc2a18cc8 100644 --- a/src/libraries/System.Net.WebHeaderCollection/System.Net.WebHeaderCollection.sln +++ b/src/libraries/System.Net.WebHeaderCollection/System.Net.WebHeaderCollection.sln @@ -25,6 +25,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{A7FD80C3-CF4A-4FD5-B649-0056EC7E019C}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{F7CAF25F-94A6-47B9-8602-0B6DD26A29B6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{4CD3B31F-ED1C-4F7E-B75D-79E83185BC33}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{7DF94D99-81A1-42C4-AAD0-29C1225218C1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{6235FA90-822A-41CB-97A7-753BA164DD68}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{38EF142E-0CD7-47F8-99EA-82AE39D1F444}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{CFCD94CF-6369-4A15-A5BA-F93168B17E84}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{28B0EDC8-886B-4811-BC62-6FEC32A9E80A}" @@ -33,6 +43,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{0F494C94-E4F EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{7A189071-7ABF-4420-B91C-8ED1DF536EA3}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{A9F23EA5-5E5B-4887-B2F2-CDFCC7A7CE80}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{511DEF04-08B5-47EA-8448-3A5A5EB792BB}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{93075779-C861-454A-8BF7-8348CC195AB9}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{71E6F8E4-53C1-4796-B779-FF1DC8BD96E8}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -91,6 +109,26 @@ Global {A7FD80C3-CF4A-4FD5-B649-0056EC7E019C}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7FD80C3-CF4A-4FD5-B649-0056EC7E019C}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7FD80C3-CF4A-4FD5-B649-0056EC7E019C}.Release|Any CPU.Build.0 = Release|Any CPU + {F7CAF25F-94A6-47B9-8602-0B6DD26A29B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F7CAF25F-94A6-47B9-8602-0B6DD26A29B6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F7CAF25F-94A6-47B9-8602-0B6DD26A29B6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F7CAF25F-94A6-47B9-8602-0B6DD26A29B6}.Release|Any CPU.Build.0 = Release|Any CPU + {4CD3B31F-ED1C-4F7E-B75D-79E83185BC33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4CD3B31F-ED1C-4F7E-B75D-79E83185BC33}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4CD3B31F-ED1C-4F7E-B75D-79E83185BC33}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4CD3B31F-ED1C-4F7E-B75D-79E83185BC33}.Release|Any CPU.Build.0 = Release|Any CPU + {7DF94D99-81A1-42C4-AAD0-29C1225218C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7DF94D99-81A1-42C4-AAD0-29C1225218C1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7DF94D99-81A1-42C4-AAD0-29C1225218C1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7DF94D99-81A1-42C4-AAD0-29C1225218C1}.Release|Any CPU.Build.0 = Release|Any CPU + {6235FA90-822A-41CB-97A7-753BA164DD68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6235FA90-822A-41CB-97A7-753BA164DD68}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6235FA90-822A-41CB-97A7-753BA164DD68}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6235FA90-822A-41CB-97A7-753BA164DD68}.Release|Any CPU.Build.0 = Release|Any CPU + {38EF142E-0CD7-47F8-99EA-82AE39D1F444}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {38EF142E-0CD7-47F8-99EA-82AE39D1F444}.Debug|Any CPU.Build.0 = Debug|Any CPU + {38EF142E-0CD7-47F8-99EA-82AE39D1F444}.Release|Any CPU.ActiveCfg = Release|Any CPU + {38EF142E-0CD7-47F8-99EA-82AE39D1F444}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -109,6 +147,14 @@ Global {0C54036A-68E7-4D87-AE77-72279D8DC116} = {0F494C94-E4F3-4171-B171-BBB07EF645BE} {A17EB996-964B-4D9F-9859-3DECA2EB9169} = {7A189071-7ABF-4420-B91C-8ED1DF536EA3} {7987D82C-3F1E-4B4B-B405-08AFD062C7EE} = {7A189071-7ABF-4420-B91C-8ED1DF536EA3} + {F7CAF25F-94A6-47B9-8602-0B6DD26A29B6} = {A9F23EA5-5E5B-4887-B2F2-CDFCC7A7CE80} + {4CD3B31F-ED1C-4F7E-B75D-79E83185BC33} = {A9F23EA5-5E5B-4887-B2F2-CDFCC7A7CE80} + {A9F23EA5-5E5B-4887-B2F2-CDFCC7A7CE80} = {71E6F8E4-53C1-4796-B779-FF1DC8BD96E8} + {7DF94D99-81A1-42C4-AAD0-29C1225218C1} = {511DEF04-08B5-47EA-8448-3A5A5EB792BB} + {6235FA90-822A-41CB-97A7-753BA164DD68} = {511DEF04-08B5-47EA-8448-3A5A5EB792BB} + {511DEF04-08B5-47EA-8448-3A5A5EB792BB} = {71E6F8E4-53C1-4796-B779-FF1DC8BD96E8} + {38EF142E-0CD7-47F8-99EA-82AE39D1F444} = {93075779-C861-454A-8BF7-8348CC195AB9} + {93075779-C861-454A-8BF7-8348CC195AB9} = {71E6F8E4-53C1-4796-B779-FF1DC8BD96E8} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {EFEE317E-9BE9-4733-A847-E0DBA00099CF} diff --git a/src/libraries/System.Net.WebProxy/System.Net.WebProxy.sln b/src/libraries/System.Net.WebProxy/System.Net.WebProxy.sln index 859fff2fb26e6a..ac6eb452714e68 100644 --- a/src/libraries/System.Net.WebProxy/System.Net.WebProxy.sln +++ b/src/libraries/System.Net.WebProxy/System.Net.WebProxy.sln @@ -27,6 +27,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.RegularExpressions", "..\System.Text.RegularExpressions\ref\System.Text.RegularExpressions.csproj", "{F372B1EA-6CB0-47A2-9178-657AF81238BC}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{9F4F8154-997B-4FEA-887D-BCB76253FDBC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{8D49F54F-B39E-4AEB-BC3F-CEA035241259}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{98B45555-F4C0-418A-918C-0D9AAE90A9F5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{148F7F03-D51C-4F1B-8041-3313D3FD79E8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{52338924-D31C-41F1-8DFE-F0B58802F974}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{76353E1C-A06B-4730-99EB-1C231937FF7B}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{5A286671-85EC-4D44-9777-9ED685F78B6C}" @@ -35,6 +45,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B5211952-F90 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{5EE792D4-BBEA-43B7-B822-ED01F9F39343}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{76832F3D-F8F9-4A19-85BE-489D9E1C6362}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{93F1A5F8-AB02-4D95-AF53-4C48AEBBE576}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{BF44A88D-24E2-4464-BAE4-5971B8A970A3}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{2B4EDC86-9128-48DC-B815-2D19C2371664}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -97,6 +115,26 @@ Global {F372B1EA-6CB0-47A2-9178-657AF81238BC}.Debug|Any CPU.Build.0 = Debug|Any CPU {F372B1EA-6CB0-47A2-9178-657AF81238BC}.Release|Any CPU.ActiveCfg = Release|Any CPU {F372B1EA-6CB0-47A2-9178-657AF81238BC}.Release|Any CPU.Build.0 = Release|Any CPU + {9F4F8154-997B-4FEA-887D-BCB76253FDBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9F4F8154-997B-4FEA-887D-BCB76253FDBC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9F4F8154-997B-4FEA-887D-BCB76253FDBC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9F4F8154-997B-4FEA-887D-BCB76253FDBC}.Release|Any CPU.Build.0 = Release|Any CPU + {8D49F54F-B39E-4AEB-BC3F-CEA035241259}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8D49F54F-B39E-4AEB-BC3F-CEA035241259}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8D49F54F-B39E-4AEB-BC3F-CEA035241259}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8D49F54F-B39E-4AEB-BC3F-CEA035241259}.Release|Any CPU.Build.0 = Release|Any CPU + {98B45555-F4C0-418A-918C-0D9AAE90A9F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {98B45555-F4C0-418A-918C-0D9AAE90A9F5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {98B45555-F4C0-418A-918C-0D9AAE90A9F5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {98B45555-F4C0-418A-918C-0D9AAE90A9F5}.Release|Any CPU.Build.0 = Release|Any CPU + {148F7F03-D51C-4F1B-8041-3313D3FD79E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {148F7F03-D51C-4F1B-8041-3313D3FD79E8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {148F7F03-D51C-4F1B-8041-3313D3FD79E8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {148F7F03-D51C-4F1B-8041-3313D3FD79E8}.Release|Any CPU.Build.0 = Release|Any CPU + {52338924-D31C-41F1-8DFE-F0B58802F974}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {52338924-D31C-41F1-8DFE-F0B58802F974}.Debug|Any CPU.Build.0 = Debug|Any CPU + {52338924-D31C-41F1-8DFE-F0B58802F974}.Release|Any CPU.ActiveCfg = Release|Any CPU + {52338924-D31C-41F1-8DFE-F0B58802F974}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -116,6 +154,14 @@ Global {C841B625-5802-40BE-850C-FA935E3D6E9A} = {B5211952-F905-4BE8-A3CF-25F393F5E506} {2331FB61-25D7-4954-8289-D0CD834FBF4E} = {5EE792D4-BBEA-43B7-B822-ED01F9F39343} {5B219FB9-034D-4A72-976D-B9ED8412DAD3} = {5EE792D4-BBEA-43B7-B822-ED01F9F39343} + {9F4F8154-997B-4FEA-887D-BCB76253FDBC} = {76832F3D-F8F9-4A19-85BE-489D9E1C6362} + {8D49F54F-B39E-4AEB-BC3F-CEA035241259} = {76832F3D-F8F9-4A19-85BE-489D9E1C6362} + {76832F3D-F8F9-4A19-85BE-489D9E1C6362} = {2B4EDC86-9128-48DC-B815-2D19C2371664} + {98B45555-F4C0-418A-918C-0D9AAE90A9F5} = {93F1A5F8-AB02-4D95-AF53-4C48AEBBE576} + {148F7F03-D51C-4F1B-8041-3313D3FD79E8} = {93F1A5F8-AB02-4D95-AF53-4C48AEBBE576} + {93F1A5F8-AB02-4D95-AF53-4C48AEBBE576} = {2B4EDC86-9128-48DC-B815-2D19C2371664} + {52338924-D31C-41F1-8DFE-F0B58802F974} = {BF44A88D-24E2-4464-BAE4-5971B8A970A3} + {BF44A88D-24E2-4464-BAE4-5971B8A970A3} = {2B4EDC86-9128-48DC-B815-2D19C2371664} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {91AA499B-9713-4B53-A6A7-7035C7C72935} diff --git a/src/libraries/System.Net.WebSockets.Client/System.Net.WebSockets.Client.sln b/src/libraries/System.Net.WebSockets.Client/System.Net.WebSockets.Client.sln index 33ba4eb6dff460..4ca27c4eb945b6 100644 --- a/src/libraries/System.Net.WebSockets.Client/System.Net.WebSockets.Client.sln +++ b/src/libraries/System.Net.WebSockets.Client/System.Net.WebSockets.Client.sln @@ -41,6 +41,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ObjectModel", "..\Sy EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JSImportGenerator", "..\System.Runtime.InteropServices.JavaScript\gen\JSImportGenerator\JSImportGenerator.csproj", "{5C036B23-44E0-4F0D-9CE3-DE29E66DFE7E}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.InteropServices.JavaScript", "..\System.Runtime.InteropServices.JavaScript\ref\System.Runtime.InteropServices.JavaScript.csproj", "{4C06C0C8-67D8-4329-B083-6906261C8838}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.InteropServices.JavaScript", "..\System.Runtime.InteropServices.JavaScript\src\System.Runtime.InteropServices.JavaScript.csproj", "{61BC8746-42CB-452E-AF4B-A2555C1DAB2F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{CC7A6F9E-B369-4BDE-9903-9F4ACCC7A24A}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{7A0C1B6C-0439-4A1F-95CC-67F04A9657FE}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{6659E37B-9C84-4815-9CAB-19F367D3D66D}" @@ -53,6 +59,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography", "..\System.Security.Cryptography\ref\System.Security.Cryptography.csproj", "{620776C7-6DE5-4398-8C93-D30FF68C3C11}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{619B12CC-42E2-472F-9934-BBCEE34BDAD2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{E579B589-D9C9-4A77-BC2C-A8EAD293A603}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{C0C9A9C0-51E4-4627-9221-E9411E2C0FAC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{DFB3F30A-21B6-481A-BE52-E7FABDB75794}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{D55C29A5-A426-4D63-B188-670E30BDA3AE}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{BEE2F256-0489-4809-AB20-27ADB2D0E10C}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{A0314AC5-E490-4A6A-B946-8B9A21A2FA05}" @@ -61,6 +77,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{6F9A42A0-A04 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{58925E96-1A39-4E29-ACB4-4C4DAB81F60A}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{78DF8970-30DA-4E8C-8ECE-15935940ACD8}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{A9E19E1F-375B-4397-B9DB-AA2184FFC68A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{54D53A1C-59C6-47F1-AC04-0C8089382F23}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{F1FA4A87-2D90-497E-BAD7-B6D23FDEEBF8}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -151,6 +175,18 @@ Global {5C036B23-44E0-4F0D-9CE3-DE29E66DFE7E}.Debug|Any CPU.Build.0 = Debug|Any CPU {5C036B23-44E0-4F0D-9CE3-DE29E66DFE7E}.Release|Any CPU.ActiveCfg = Release|Any CPU {5C036B23-44E0-4F0D-9CE3-DE29E66DFE7E}.Release|Any CPU.Build.0 = Release|Any CPU + {4C06C0C8-67D8-4329-B083-6906261C8838}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4C06C0C8-67D8-4329-B083-6906261C8838}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4C06C0C8-67D8-4329-B083-6906261C8838}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4C06C0C8-67D8-4329-B083-6906261C8838}.Release|Any CPU.Build.0 = Release|Any CPU + {61BC8746-42CB-452E-AF4B-A2555C1DAB2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {61BC8746-42CB-452E-AF4B-A2555C1DAB2F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {61BC8746-42CB-452E-AF4B-A2555C1DAB2F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {61BC8746-42CB-452E-AF4B-A2555C1DAB2F}.Release|Any CPU.Build.0 = Release|Any CPU + {CC7A6F9E-B369-4BDE-9903-9F4ACCC7A24A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CC7A6F9E-B369-4BDE-9903-9F4ACCC7A24A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CC7A6F9E-B369-4BDE-9903-9F4ACCC7A24A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CC7A6F9E-B369-4BDE-9903-9F4ACCC7A24A}.Release|Any CPU.Build.0 = Release|Any CPU {7A0C1B6C-0439-4A1F-95CC-67F04A9657FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7A0C1B6C-0439-4A1F-95CC-67F04A9657FE}.Debug|Any CPU.Build.0 = Debug|Any CPU {7A0C1B6C-0439-4A1F-95CC-67F04A9657FE}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -175,6 +211,26 @@ Global {620776C7-6DE5-4398-8C93-D30FF68C3C11}.Debug|Any CPU.Build.0 = Debug|Any CPU {620776C7-6DE5-4398-8C93-D30FF68C3C11}.Release|Any CPU.ActiveCfg = Release|Any CPU {620776C7-6DE5-4398-8C93-D30FF68C3C11}.Release|Any CPU.Build.0 = Release|Any CPU + {619B12CC-42E2-472F-9934-BBCEE34BDAD2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {619B12CC-42E2-472F-9934-BBCEE34BDAD2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {619B12CC-42E2-472F-9934-BBCEE34BDAD2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {619B12CC-42E2-472F-9934-BBCEE34BDAD2}.Release|Any CPU.Build.0 = Release|Any CPU + {E579B589-D9C9-4A77-BC2C-A8EAD293A603}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E579B589-D9C9-4A77-BC2C-A8EAD293A603}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E579B589-D9C9-4A77-BC2C-A8EAD293A603}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E579B589-D9C9-4A77-BC2C-A8EAD293A603}.Release|Any CPU.Build.0 = Release|Any CPU + {C0C9A9C0-51E4-4627-9221-E9411E2C0FAC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C0C9A9C0-51E4-4627-9221-E9411E2C0FAC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C0C9A9C0-51E4-4627-9221-E9411E2C0FAC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C0C9A9C0-51E4-4627-9221-E9411E2C0FAC}.Release|Any CPU.Build.0 = Release|Any CPU + {DFB3F30A-21B6-481A-BE52-E7FABDB75794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DFB3F30A-21B6-481A-BE52-E7FABDB75794}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DFB3F30A-21B6-481A-BE52-E7FABDB75794}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DFB3F30A-21B6-481A-BE52-E7FABDB75794}.Release|Any CPU.Build.0 = Release|Any CPU + {D55C29A5-A426-4D63-B188-670E30BDA3AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D55C29A5-A426-4D63-B188-670E30BDA3AE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D55C29A5-A426-4D63-B188-670E30BDA3AE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D55C29A5-A426-4D63-B188-670E30BDA3AE}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -199,14 +255,25 @@ Global {BEA5BC2C-12D1-4D01-8D2C-5029578BD066} = {A0314AC5-E490-4A6A-B946-8B9A21A2FA05} {96065341-8032-40B4-A1B5-C9DC83DFEF4E} = {A0314AC5-E490-4A6A-B946-8B9A21A2FA05} {CF0716D1-9916-4A97-939C-2FE477193A8F} = {A0314AC5-E490-4A6A-B946-8B9A21A2FA05} + {4C06C0C8-67D8-4329-B083-6906261C8838} = {A0314AC5-E490-4A6A-B946-8B9A21A2FA05} {2BD4ACB1-47A4-4AA5-9624-6DC939B4EB12} = {A0314AC5-E490-4A6A-B946-8B9A21A2FA05} {A4995F4A-D42F-47AD-BFF1-A46BC1B4574E} = {A0314AC5-E490-4A6A-B946-8B9A21A2FA05} {49C959C3-D2C1-4A66-B29E-FE8E393BC274} = {A0314AC5-E490-4A6A-B946-8B9A21A2FA05} {620776C7-6DE5-4398-8C93-D30FF68C3C11} = {A0314AC5-E490-4A6A-B946-8B9A21A2FA05} {0CD4C24D-7746-46F0-8D47-A396882B5468} = {6F9A42A0-A04B-4CD0-B8C9-9A728274C851} + {61BC8746-42CB-452E-AF4B-A2555C1DAB2F} = {6F9A42A0-A04B-4CD0-B8C9-9A728274C851} {5C036B23-44E0-4F0D-9CE3-DE29E66DFE7E} = {58925E96-1A39-4E29-ACB4-4C4DAB81F60A} + {CC7A6F9E-B369-4BDE-9903-9F4ACCC7A24A} = {58925E96-1A39-4E29-ACB4-4C4DAB81F60A} {7A0C1B6C-0439-4A1F-95CC-67F04A9657FE} = {58925E96-1A39-4E29-ACB4-4C4DAB81F60A} {6659E37B-9C84-4815-9CAB-19F367D3D66D} = {58925E96-1A39-4E29-ACB4-4C4DAB81F60A} + {619B12CC-42E2-472F-9934-BBCEE34BDAD2} = {78DF8970-30DA-4E8C-8ECE-15935940ACD8} + {E579B589-D9C9-4A77-BC2C-A8EAD293A603} = {78DF8970-30DA-4E8C-8ECE-15935940ACD8} + {78DF8970-30DA-4E8C-8ECE-15935940ACD8} = {F1FA4A87-2D90-497E-BAD7-B6D23FDEEBF8} + {C0C9A9C0-51E4-4627-9221-E9411E2C0FAC} = {A9E19E1F-375B-4397-B9DB-AA2184FFC68A} + {DFB3F30A-21B6-481A-BE52-E7FABDB75794} = {A9E19E1F-375B-4397-B9DB-AA2184FFC68A} + {A9E19E1F-375B-4397-B9DB-AA2184FFC68A} = {F1FA4A87-2D90-497E-BAD7-B6D23FDEEBF8} + {D55C29A5-A426-4D63-B188-670E30BDA3AE} = {54D53A1C-59C6-47F1-AC04-0C8089382F23} + {54D53A1C-59C6-47F1-AC04-0C8089382F23} = {F1FA4A87-2D90-497E-BAD7-B6D23FDEEBF8} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {D91D7DC5-24CC-4716-A357-8170C4EB1C32} diff --git a/src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/BrowserWebSockets/BrowserWebSocket.cs b/src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/BrowserWebSockets/BrowserWebSocket.cs index 121fa8595c65d5..ed139d83fd74fd 100644 --- a/src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/BrowserWebSockets/BrowserWebSocket.cs +++ b/src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/BrowserWebSockets/BrowserWebSocket.cs @@ -580,10 +580,10 @@ private async Task CancelationHelper(Task jsTask, CancellationToken cancellation } try { - using (var receiveRegistration = cancellationToken.Register(() => + using (var receiveRegistration = cancellationToken.Register(static s => { - CancelablePromise.CancelPromise(jsTask); - })) + CancelablePromise.CancelPromise((Task)s!); + }, jsTask)) { await jsTask.ConfigureAwait(true); return; diff --git a/src/libraries/System.Net.WebSockets.Client/tests/DeflateTests.cs b/src/libraries/System.Net.WebSockets.Client/tests/DeflateTests.cs index 1fd9b21d838141..7c8f68ed1f5d99 100644 --- a/src/libraries/System.Net.WebSockets.Client/tests/DeflateTests.cs +++ b/src/libraries/System.Net.WebSockets.Client/tests/DeflateTests.cs @@ -61,8 +61,8 @@ await LoopbackServer.CreateClientAndServerAsync(async uri => await ConnectAsync(client, uri, cancellation.Token); - object webSocketHandle = client.GetType().GetField("_innerWebSocket", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(client); - WebSocketDeflateOptions negotiatedDeflateOptions = (WebSocketDeflateOptions)webSocketHandle.GetType() + object webSocketHandle = typeof(ClientWebSocket).GetField("_innerWebSocket", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(client); + WebSocketDeflateOptions negotiatedDeflateOptions = (WebSocketDeflateOptions)Type.GetType("System.Net.WebSockets.WebSocketHandle, System.Net.WebSockets.Client") .GetField("_negotiatedDeflateOptions", BindingFlags.NonPublic | BindingFlags.Instance) .GetValue(webSocketHandle); diff --git a/src/libraries/System.Net.WebSockets.Client/tests/System.Net.WebSockets.Client.Tests.csproj b/src/libraries/System.Net.WebSockets.Client/tests/System.Net.WebSockets.Client.Tests.csproj index 8f23e7925a4514..f683a4bcf3d949 100644 --- a/src/libraries/System.Net.WebSockets.Client/tests/System.Net.WebSockets.Client.Tests.csproj +++ b/src/libraries/System.Net.WebSockets.Client/tests/System.Net.WebSockets.Client.Tests.csproj @@ -5,8 +5,6 @@ ../src/Resources/Strings.resx $(NetCoreAppCurrent);$(NetCoreAppCurrent)-browser $(DefineConstants);NETSTANDARD - - false diff --git a/src/libraries/System.Net.WebSockets/System.Net.WebSockets.sln b/src/libraries/System.Net.WebSockets/System.Net.WebSockets.sln index df1dd89d118712..0c22fe29c741b8 100644 --- a/src/libraries/System.Net.WebSockets/System.Net.WebSockets.sln +++ b/src/libraries/System.Net.WebSockets/System.Net.WebSockets.sln @@ -33,6 +33,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.InteropServi EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{9F9335A3-0158-4A00-8CB0-F8E9CAC21AA1}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{9674A6B1-2CE4-49BC-BE80-E99944AA2065}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{C9958509-D98E-4A4C-A68F-AD245A2FACAF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{A692165F-A17C-4A85-B0B5-A7599867FB0A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{19FBAD24-736F-409D-AB9F-A52902F25C1E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{0904A438-3AC8-4936-9482-541131F95BCE}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{9099A547-2E14-439D-8A52-0AB72FF53DBB}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{B31191C3-543F-486D-8273-506BD0717B38}" @@ -41,6 +51,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{4518E3A1-BCE EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{CA82EA7A-B4F6-4A96-A7B1-A6646E51586E}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{4218D708-7D8F-40D1-AF86-9AC654EFF211}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{5B3AFD17-94E9-46FE-9E98-93ABEED7F5E0}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{139955F9-F83E-4AA9-84CA-DCA7730CD819}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{AAF302C0-3D3F-4428-9351-62CB2A2EE691}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -115,6 +133,26 @@ Global {9F9335A3-0158-4A00-8CB0-F8E9CAC21AA1}.Debug|Any CPU.Build.0 = Debug|Any CPU {9F9335A3-0158-4A00-8CB0-F8E9CAC21AA1}.Release|Any CPU.ActiveCfg = Release|Any CPU {9F9335A3-0158-4A00-8CB0-F8E9CAC21AA1}.Release|Any CPU.Build.0 = Release|Any CPU + {9674A6B1-2CE4-49BC-BE80-E99944AA2065}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9674A6B1-2CE4-49BC-BE80-E99944AA2065}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9674A6B1-2CE4-49BC-BE80-E99944AA2065}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9674A6B1-2CE4-49BC-BE80-E99944AA2065}.Release|Any CPU.Build.0 = Release|Any CPU + {C9958509-D98E-4A4C-A68F-AD245A2FACAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C9958509-D98E-4A4C-A68F-AD245A2FACAF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C9958509-D98E-4A4C-A68F-AD245A2FACAF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C9958509-D98E-4A4C-A68F-AD245A2FACAF}.Release|Any CPU.Build.0 = Release|Any CPU + {A692165F-A17C-4A85-B0B5-A7599867FB0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A692165F-A17C-4A85-B0B5-A7599867FB0A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A692165F-A17C-4A85-B0B5-A7599867FB0A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A692165F-A17C-4A85-B0B5-A7599867FB0A}.Release|Any CPU.Build.0 = Release|Any CPU + {19FBAD24-736F-409D-AB9F-A52902F25C1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {19FBAD24-736F-409D-AB9F-A52902F25C1E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {19FBAD24-736F-409D-AB9F-A52902F25C1E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {19FBAD24-736F-409D-AB9F-A52902F25C1E}.Release|Any CPU.Build.0 = Release|Any CPU + {0904A438-3AC8-4936-9482-541131F95BCE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0904A438-3AC8-4936-9482-541131F95BCE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0904A438-3AC8-4936-9482-541131F95BCE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0904A438-3AC8-4936-9482-541131F95BCE}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -137,6 +175,14 @@ Global {F98FE3DF-F166-41AA-826D-72318ECC3427} = {CA82EA7A-B4F6-4A96-A7B1-A6646E51586E} {B59FA95B-262E-4580-AB36-37DB5E16917A} = {CA82EA7A-B4F6-4A96-A7B1-A6646E51586E} {41157B1B-46DE-4775-8490-2FF9D9E8E4CA} = {CA82EA7A-B4F6-4A96-A7B1-A6646E51586E} + {9674A6B1-2CE4-49BC-BE80-E99944AA2065} = {4218D708-7D8F-40D1-AF86-9AC654EFF211} + {C9958509-D98E-4A4C-A68F-AD245A2FACAF} = {4218D708-7D8F-40D1-AF86-9AC654EFF211} + {4218D708-7D8F-40D1-AF86-9AC654EFF211} = {AAF302C0-3D3F-4428-9351-62CB2A2EE691} + {A692165F-A17C-4A85-B0B5-A7599867FB0A} = {5B3AFD17-94E9-46FE-9E98-93ABEED7F5E0} + {19FBAD24-736F-409D-AB9F-A52902F25C1E} = {5B3AFD17-94E9-46FE-9E98-93ABEED7F5E0} + {5B3AFD17-94E9-46FE-9E98-93ABEED7F5E0} = {AAF302C0-3D3F-4428-9351-62CB2A2EE691} + {0904A438-3AC8-4936-9482-541131F95BCE} = {139955F9-F83E-4AA9-84CA-DCA7730CD819} + {139955F9-F83E-4AA9-84CA-DCA7730CD819} = {AAF302C0-3D3F-4428-9351-62CB2A2EE691} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {78E8A71E-2CB4-4C05-8DBB-C926F44A9393} diff --git a/src/libraries/System.Numerics.Tensors/Directory.Build.props b/src/libraries/System.Numerics.Tensors/Directory.Build.props deleted file mode 100644 index 36078bccbf7aa8..00000000000000 --- a/src/libraries/System.Numerics.Tensors/Directory.Build.props +++ /dev/null @@ -1,8 +0,0 @@ - - - - - true - false - - \ No newline at end of file diff --git a/src/libraries/System.Numerics.Tensors/README.md b/src/libraries/System.Numerics.Tensors/README.md index 026563de81306d..6190da60e77c51 100644 --- a/src/libraries/System.Numerics.Tensors/README.md +++ b/src/libraries/System.Numerics.Tensors/README.md @@ -1,2 +1,3 @@ # System.Numerics.Tensors -This library has not been shipped publicly and is not accepting contributions at this time. \ No newline at end of file + +Provides APIs for performing primitive operations over tensors represented by spans of memory. diff --git a/src/libraries/System.Numerics.Tensors/System.Numerics.Tensors.sln b/src/libraries/System.Numerics.Tensors/System.Numerics.Tensors.sln index cc3000d60ef88f..5a1bf792736d94 100644 --- a/src/libraries/System.Numerics.Tensors/System.Numerics.Tensors.sln +++ b/src/libraries/System.Numerics.Tensors/System.Numerics.Tensors.sln @@ -1,18 +1,30 @@ Microsoft Visual Studio Solution File, Format Version 12.00 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{9F20CEA1-2216-4432-BBBD-F01E05D17F23}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.Numerics", "..\Microsoft.Bcl.Numerics\ref\Microsoft.Bcl.Numerics.csproj", "{D311ABE4-10A9-4BB1-89CE-6358C55501A8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.Numerics", "..\Microsoft.Bcl.Numerics\src\Microsoft.Bcl.Numerics.csproj", "{1578185F-C4FA-4866-936B-E62AAEDD03B7}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Numerics.Tensors", "ref\System.Numerics.Tensors.csproj", "{21CB448A-3882-4337-B416-D1A3E0BCFFC5}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Numerics.Tensors", "src\System.Numerics.Tensors.csproj", "{848DD000-3D22-4A25-A9D9-05AFF857A116}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Numerics.Tensors.Tests", "tests\System.Numerics.Tensors.Tests.csproj", "{4AF6A02D-82C8-4898-9EDF-01F107C25061}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{8CA7C982-3EE4-4BCE-9493-7A63556736D3}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{4588351F-4233-4957-B84C-7F8E22B8888A}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{DB954E01-898A-4FE2-A3AA-180D041AB08F}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{04FC0651-B9D0-448A-A28B-11B1D4A897F4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{683A7D28-CC55-4375-848D-E659075ECEE4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{1CBEAEA8-2CA1-4B07-9930-35A785205852}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{BA7828B1-7953-47A0-AE5A-E22B501C4BD0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{57E57290-3A6A-43F8-8764-D4DC8151F89C}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{DE94CA7D-BB10-4865-85A6-6B694631247F}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{6BC42E6D-848C-4533-B715-F116E7DB3610}" @@ -21,6 +33,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{AB415F5A-75E EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{083161E5-6049-4D84-9739-9D7797D7117D}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{841A2FA4-A95F-4612-A8B9-AD2EF769BC71}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{DF0561A1-3AB8-4B51-AFB4-392EE1DD6247}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{7AC4B2C7-A55C-4C4F-9B02-77F5CBFFF4AB}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{F9C2AAB1-C7B0-4E43-BB18-4FB16F6E272B}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -31,6 +51,14 @@ Global {9F20CEA1-2216-4432-BBBD-F01E05D17F23}.Debug|Any CPU.Build.0 = Debug|Any CPU {9F20CEA1-2216-4432-BBBD-F01E05D17F23}.Release|Any CPU.ActiveCfg = Release|Any CPU {9F20CEA1-2216-4432-BBBD-F01E05D17F23}.Release|Any CPU.Build.0 = Release|Any CPU + {D311ABE4-10A9-4BB1-89CE-6358C55501A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D311ABE4-10A9-4BB1-89CE-6358C55501A8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D311ABE4-10A9-4BB1-89CE-6358C55501A8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D311ABE4-10A9-4BB1-89CE-6358C55501A8}.Release|Any CPU.Build.0 = Release|Any CPU + {1578185F-C4FA-4866-936B-E62AAEDD03B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1578185F-C4FA-4866-936B-E62AAEDD03B7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1578185F-C4FA-4866-936B-E62AAEDD03B7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1578185F-C4FA-4866-936B-E62AAEDD03B7}.Release|Any CPU.Build.0 = Release|Any CPU {21CB448A-3882-4337-B416-D1A3E0BCFFC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {21CB448A-3882-4337-B416-D1A3E0BCFFC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {21CB448A-3882-4337-B416-D1A3E0BCFFC5}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -43,10 +71,6 @@ Global {4AF6A02D-82C8-4898-9EDF-01F107C25061}.Debug|Any CPU.Build.0 = Debug|Any CPU {4AF6A02D-82C8-4898-9EDF-01F107C25061}.Release|Any CPU.ActiveCfg = Release|Any CPU {4AF6A02D-82C8-4898-9EDF-01F107C25061}.Release|Any CPU.Build.0 = Release|Any CPU - {8CA7C982-3EE4-4BCE-9493-7A63556736D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8CA7C982-3EE4-4BCE-9493-7A63556736D3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8CA7C982-3EE4-4BCE-9493-7A63556736D3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8CA7C982-3EE4-4BCE-9493-7A63556736D3}.Release|Any CPU.Build.0 = Release|Any CPU {4588351F-4233-4957-B84C-7F8E22B8888A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4588351F-4233-4957-B84C-7F8E22B8888A}.Debug|Any CPU.Build.0 = Debug|Any CPU {4588351F-4233-4957-B84C-7F8E22B8888A}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -55,6 +79,26 @@ Global {DB954E01-898A-4FE2-A3AA-180D041AB08F}.Debug|Any CPU.Build.0 = Debug|Any CPU {DB954E01-898A-4FE2-A3AA-180D041AB08F}.Release|Any CPU.ActiveCfg = Release|Any CPU {DB954E01-898A-4FE2-A3AA-180D041AB08F}.Release|Any CPU.Build.0 = Release|Any CPU + {04FC0651-B9D0-448A-A28B-11B1D4A897F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {04FC0651-B9D0-448A-A28B-11B1D4A897F4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {04FC0651-B9D0-448A-A28B-11B1D4A897F4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {04FC0651-B9D0-448A-A28B-11B1D4A897F4}.Release|Any CPU.Build.0 = Release|Any CPU + {683A7D28-CC55-4375-848D-E659075ECEE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {683A7D28-CC55-4375-848D-E659075ECEE4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {683A7D28-CC55-4375-848D-E659075ECEE4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {683A7D28-CC55-4375-848D-E659075ECEE4}.Release|Any CPU.Build.0 = Release|Any CPU + {1CBEAEA8-2CA1-4B07-9930-35A785205852}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1CBEAEA8-2CA1-4B07-9930-35A785205852}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1CBEAEA8-2CA1-4B07-9930-35A785205852}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1CBEAEA8-2CA1-4B07-9930-35A785205852}.Release|Any CPU.Build.0 = Release|Any CPU + {BA7828B1-7953-47A0-AE5A-E22B501C4BD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BA7828B1-7953-47A0-AE5A-E22B501C4BD0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BA7828B1-7953-47A0-AE5A-E22B501C4BD0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BA7828B1-7953-47A0-AE5A-E22B501C4BD0}.Release|Any CPU.Build.0 = Release|Any CPU + {57E57290-3A6A-43F8-8764-D4DC8151F89C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {57E57290-3A6A-43F8-8764-D4DC8151F89C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {57E57290-3A6A-43F8-8764-D4DC8151F89C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {57E57290-3A6A-43F8-8764-D4DC8151F89C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -62,11 +106,20 @@ Global GlobalSection(NestedProjects) = preSolution {9F20CEA1-2216-4432-BBBD-F01E05D17F23} = {DE94CA7D-BB10-4865-85A6-6B694631247F} {4AF6A02D-82C8-4898-9EDF-01F107C25061} = {DE94CA7D-BB10-4865-85A6-6B694631247F} + {D311ABE4-10A9-4BB1-89CE-6358C55501A8} = {6BC42E6D-848C-4533-B715-F116E7DB3610} {21CB448A-3882-4337-B416-D1A3E0BCFFC5} = {6BC42E6D-848C-4533-B715-F116E7DB3610} + {1578185F-C4FA-4866-936B-E62AAEDD03B7} = {AB415F5A-75E5-4E03-8A92-15CEDEC4CD3A} {848DD000-3D22-4A25-A9D9-05AFF857A116} = {AB415F5A-75E5-4E03-8A92-15CEDEC4CD3A} - {8CA7C982-3EE4-4BCE-9493-7A63556736D3} = {083161E5-6049-4D84-9739-9D7797D7117D} {4588351F-4233-4957-B84C-7F8E22B8888A} = {083161E5-6049-4D84-9739-9D7797D7117D} {DB954E01-898A-4FE2-A3AA-180D041AB08F} = {083161E5-6049-4D84-9739-9D7797D7117D} + {04FC0651-B9D0-448A-A28B-11B1D4A897F4} = {841A2FA4-A95F-4612-A8B9-AD2EF769BC71} + {683A7D28-CC55-4375-848D-E659075ECEE4} = {841A2FA4-A95F-4612-A8B9-AD2EF769BC71} + {841A2FA4-A95F-4612-A8B9-AD2EF769BC71} = {F9C2AAB1-C7B0-4E43-BB18-4FB16F6E272B} + {1CBEAEA8-2CA1-4B07-9930-35A785205852} = {DF0561A1-3AB8-4B51-AFB4-392EE1DD6247} + {BA7828B1-7953-47A0-AE5A-E22B501C4BD0} = {DF0561A1-3AB8-4B51-AFB4-392EE1DD6247} + {DF0561A1-3AB8-4B51-AFB4-392EE1DD6247} = {F9C2AAB1-C7B0-4E43-BB18-4FB16F6E272B} + {57E57290-3A6A-43F8-8764-D4DC8151F89C} = {7AC4B2C7-A55C-4C4F-9B02-77F5CBFFF4AB} + {7AC4B2C7-A55C-4C4F-9B02-77F5CBFFF4AB} = {F9C2AAB1-C7B0-4E43-BB18-4FB16F6E272B} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {10A5F2C3-5230-4916-9D4D-BBDB94851037} diff --git a/src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.cs b/src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.cs index 3161a4c7e780ce..99bd4703574e55 100644 --- a/src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.cs +++ b/src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.cs @@ -6,151 +6,53 @@ namespace System.Numerics.Tensors { - public static partial class ArrayTensorExtensions + public static partial class TensorPrimitives { - public static System.Numerics.Tensors.CompressedSparseTensor ToCompressedSparseTensor(this System.Array array, bool reverseStride = false) { throw null; } - public static System.Numerics.Tensors.CompressedSparseTensor ToCompressedSparseTensor(this T[,,] array, bool reverseStride = false) { throw null; } - public static System.Numerics.Tensors.CompressedSparseTensor ToCompressedSparseTensor(this T[,] array, bool reverseStride = false) { throw null; } - public static System.Numerics.Tensors.CompressedSparseTensor ToCompressedSparseTensor(this T[] array) { throw null; } - public static System.Numerics.Tensors.SparseTensor ToSparseTensor(this System.Array array, bool reverseStride = false) { throw null; } - public static System.Numerics.Tensors.SparseTensor ToSparseTensor(this T[,,] array, bool reverseStride = false) { throw null; } - public static System.Numerics.Tensors.SparseTensor ToSparseTensor(this T[,] array, bool reverseStride = false) { throw null; } - public static System.Numerics.Tensors.SparseTensor ToSparseTensor(this T[] array) { throw null; } - public static System.Numerics.Tensors.DenseTensor ToTensor(this System.Array array, bool reverseStride = false) { throw null; } - public static System.Numerics.Tensors.DenseTensor ToTensor(this T[,,] array, bool reverseStride = false) { throw null; } - public static System.Numerics.Tensors.DenseTensor ToTensor(this T[,] array, bool reverseStride = false) { throw null; } - public static System.Numerics.Tensors.DenseTensor ToTensor(this T[] array) { throw null; } - } - public partial class CompressedSparseTensor : System.Numerics.Tensors.Tensor - { - public CompressedSparseTensor(System.Memory values, System.Memory compressedCounts, System.Memory indices, int nonZeroCount, System.ReadOnlySpan dimensions, bool reverseStride = false) : base (default(System.Array), default(bool)) { } - public CompressedSparseTensor(System.ReadOnlySpan dimensions, bool reverseStride = false) : base (default(System.Array), default(bool)) { } - public CompressedSparseTensor(System.ReadOnlySpan dimensions, int capacity, bool reverseStride = false) : base (default(System.Array), default(bool)) { } - public int Capacity { get { throw null; } } - public System.Memory CompressedCounts { get { throw null; } } - public System.Memory Indices { get { throw null; } } - public override T this[System.ReadOnlySpan indices] { get { throw null; } set { } } - public int NonZeroCount { get { throw null; } } - public System.Memory Values { get { throw null; } } - public override System.Numerics.Tensors.Tensor Clone() { throw null; } - public override System.Numerics.Tensors.Tensor CloneEmpty(System.ReadOnlySpan dimensions) { throw null; } - public override T GetValue(int index) { throw null; } - public override System.Numerics.Tensors.Tensor Reshape(System.ReadOnlySpan dimensions) { throw null; } - public override void SetValue(int index, T value) { } - public override System.Numerics.Tensors.CompressedSparseTensor ToCompressedSparseTensor() { throw null; } - public override System.Numerics.Tensors.DenseTensor ToDenseTensor() { throw null; } - public override System.Numerics.Tensors.SparseTensor ToSparseTensor() { throw null; } - } - public partial class DenseTensor : System.Numerics.Tensors.Tensor - { - public DenseTensor(int length) : base (default(System.Array), default(bool)) { } - public DenseTensor(System.Memory memory, System.ReadOnlySpan dimensions, bool reverseStride = false) : base (default(System.Array), default(bool)) { } - public DenseTensor(System.ReadOnlySpan dimensions, bool reverseStride = false) : base (default(System.Array), default(bool)) { } - public System.Memory Buffer { get { throw null; } } - public override System.Numerics.Tensors.Tensor Clone() { throw null; } - public override System.Numerics.Tensors.Tensor CloneEmpty(System.ReadOnlySpan dimensions) { throw null; } - protected override void CopyTo(T[] array, int arrayIndex) { } - public override T GetValue(int index) { throw null; } - protected override int IndexOf(T item) { throw null; } - public override System.Numerics.Tensors.Tensor Reshape(System.ReadOnlySpan dimensions) { throw null; } - public override void SetValue(int index, T value) { } - } - public partial class SparseTensor : System.Numerics.Tensors.Tensor - { - public SparseTensor(System.ReadOnlySpan dimensions, bool reverseStride = false, int capacity = 0) : base (default(System.Array), default(bool)) { } - public int NonZeroCount { get { throw null; } } - public override System.Numerics.Tensors.Tensor Clone() { throw null; } - public override System.Numerics.Tensors.Tensor CloneEmpty(System.ReadOnlySpan dimensions) { throw null; } - public override T GetValue(int index) { throw null; } - public override System.Numerics.Tensors.Tensor Reshape(System.ReadOnlySpan dimensions) { throw null; } - public override void SetValue(int index, T value) { } - public override System.Numerics.Tensors.CompressedSparseTensor ToCompressedSparseTensor() { throw null; } - public override System.Numerics.Tensors.DenseTensor ToDenseTensor() { throw null; } - public override System.Numerics.Tensors.SparseTensor ToSparseTensor() { throw null; } - } - public static partial class Tensor - { - public static System.Numerics.Tensors.Tensor CreateFromDiagonal(System.Numerics.Tensors.Tensor diagonal) { throw null; } - public static System.Numerics.Tensors.Tensor CreateFromDiagonal(System.Numerics.Tensors.Tensor diagonal, int offset) { throw null; } - public static System.Numerics.Tensors.Tensor CreateIdentity(int size) { throw null; } - public static System.Numerics.Tensors.Tensor CreateIdentity(int size, bool columMajor) { throw null; } - public static System.Numerics.Tensors.Tensor CreateIdentity(int size, bool columMajor, T oneValue) { throw null; } - } - public abstract partial class Tensor : System.Collections.Generic.ICollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.IList, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IReadOnlyList, System.Collections.ICollection, System.Collections.IEnumerable, System.Collections.IList, System.Collections.IStructuralComparable, System.Collections.IStructuralEquatable - { - protected Tensor(System.Array fromArray, bool reverseStride) { } - protected Tensor(int length) { } - protected Tensor(System.ReadOnlySpan dimensions, bool reverseStride) { } - public System.ReadOnlySpan Dimensions { get { throw null; } } - public bool IsFixedSize { get { throw null; } } - public bool IsReadOnly { get { throw null; } } - public bool IsReversedStride { get { throw null; } } - public virtual T this[params int[] indices] { get { throw null; } set { } } - public virtual T this[System.ReadOnlySpan indices] { get { throw null; } set { } } - public long Length { get { throw null; } } - public int Rank { get { throw null; } } - public System.ReadOnlySpan Strides { get { throw null; } } - int System.Collections.Generic.ICollection.Count { get { throw null; } } - T System.Collections.Generic.IList.this[int index] { get { throw null; } set { } } - int System.Collections.Generic.IReadOnlyCollection.Count { get { throw null; } } - T System.Collections.Generic.IReadOnlyList.this[int index] { get { throw null; } } - int System.Collections.ICollection.Count { get { throw null; } } - bool System.Collections.ICollection.IsSynchronized { get { throw null; } } - object System.Collections.ICollection.SyncRoot { get { throw null; } } - object? System.Collections.IList.this[int index] { get { throw null; } set { } } - public abstract System.Numerics.Tensors.Tensor Clone(); - public virtual System.Numerics.Tensors.Tensor CloneEmpty() { throw null; } - public virtual System.Numerics.Tensors.Tensor CloneEmpty(System.ReadOnlySpan dimensions) { throw null; } - public virtual System.Numerics.Tensors.Tensor CloneEmpty() { throw null; } - public abstract System.Numerics.Tensors.Tensor CloneEmpty(System.ReadOnlySpan dimensions); - public static int Compare(System.Numerics.Tensors.Tensor left, System.Numerics.Tensors.Tensor right) { throw null; } - protected virtual bool Contains(T item) { throw null; } - protected virtual void CopyTo(T[] array, int arrayIndex) { } - public static bool Equals(System.Numerics.Tensors.Tensor left, System.Numerics.Tensors.Tensor right) { throw null; } - public virtual void Fill(T value) { } - public string GetArrayString(bool includeWhitespace = true) { throw null; } - public System.Numerics.Tensors.Tensor GetDiagonal() { throw null; } - public System.Numerics.Tensors.Tensor GetDiagonal(int offset) { throw null; } - public System.Numerics.Tensors.Tensor GetTriangle() { throw null; } - public System.Numerics.Tensors.Tensor GetTriangle(int offset) { throw null; } - public System.Numerics.Tensors.Tensor GetUpperTriangle() { throw null; } - public System.Numerics.Tensors.Tensor GetUpperTriangle(int offset) { throw null; } - public abstract T GetValue(int index); - protected virtual int IndexOf(T item) { throw null; } - public abstract System.Numerics.Tensors.Tensor Reshape(System.ReadOnlySpan dimensions); - public abstract void SetValue(int index, T value); - public struct Enumerator : System.Collections.Generic.IEnumerator - { - public T Current { get; private set; } - object? System.Collections.IEnumerator.Current => throw null; - public bool MoveNext() => throw null; - public void Reset() { } - public void Dispose() { } - } - public Enumerator GetEnumerator() => throw null; - void System.Collections.Generic.ICollection.Add(T item) { } - void System.Collections.Generic.ICollection.Clear() { } - bool System.Collections.Generic.ICollection.Contains(T item) { throw null; } - void System.Collections.Generic.ICollection.CopyTo(T[] array, int arrayIndex) { } - bool System.Collections.Generic.ICollection.Remove(T item) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - int System.Collections.Generic.IList.IndexOf(T item) { throw null; } - void System.Collections.Generic.IList.Insert(int index, T item) { } - void System.Collections.Generic.IList.RemoveAt(int index) { } - void System.Collections.ICollection.CopyTo(System.Array array, int index) { } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - int System.Collections.IList.Add(object? value) { throw null; } - void System.Collections.IList.Clear() { } - 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) { } - void System.Collections.IList.RemoveAt(int index) { } - int System.Collections.IStructuralComparable.CompareTo(object? other, System.Collections.IComparer comparer) { throw null; } - bool System.Collections.IStructuralEquatable.Equals(object? other, System.Collections.IEqualityComparer comparer) { throw null; } - int System.Collections.IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) { throw null; } - public virtual System.Numerics.Tensors.CompressedSparseTensor ToCompressedSparseTensor() { throw null; } - public virtual System.Numerics.Tensors.DenseTensor ToDenseTensor() { throw null; } - public virtual System.Numerics.Tensors.SparseTensor ToSparseTensor() { throw null; } + public static void Abs(System.ReadOnlySpan x, System.Span destination) { } + public static void Add(System.ReadOnlySpan x, System.ReadOnlySpan y, System.Span destination) { } + public static void Add(System.ReadOnlySpan x, float y, System.Span destination) { } + public static void AddMultiply(System.ReadOnlySpan x, System.ReadOnlySpan y, System.ReadOnlySpan multiplier, System.Span destination) { } + public static void AddMultiply(System.ReadOnlySpan x, System.ReadOnlySpan y, float multiplier, System.Span destination) { } + public static void AddMultiply(System.ReadOnlySpan x, float y, System.ReadOnlySpan multiplier, System.Span destination) { } + public static void Cosh(System.ReadOnlySpan x, System.Span destination) { } + public static float CosineSimilarity(System.ReadOnlySpan x, System.ReadOnlySpan y) { throw null; } + public static float Distance(System.ReadOnlySpan x, System.ReadOnlySpan y) { throw null; } + public static void Divide(System.ReadOnlySpan x, System.ReadOnlySpan y, System.Span destination) { } + public static void Divide(System.ReadOnlySpan x, float y, System.Span destination) { } + public static float Dot(System.ReadOnlySpan x, System.ReadOnlySpan y) { throw null; } + public static void Exp(System.ReadOnlySpan x, System.Span destination) { } + public static int IndexOfMax(System.ReadOnlySpan x) { throw null; } + public static int IndexOfMaxMagnitude(System.ReadOnlySpan x) { throw null; } + public static int IndexOfMin(System.ReadOnlySpan x) { throw null; } + public static int IndexOfMinMagnitude(System.ReadOnlySpan x) { throw null; } + public static float Norm(System.ReadOnlySpan x) { throw null; } + public static void Log(System.ReadOnlySpan x, System.Span destination) { } + public static void Log2(System.ReadOnlySpan x, System.Span destination) { } + public static float Max(System.ReadOnlySpan x) { throw null; } + public static void Max(System.ReadOnlySpan x, System.ReadOnlySpan y, System.Span destination) { throw null; } + public static float MaxMagnitude(System.ReadOnlySpan x) { throw null; } + public static void MaxMagnitude(System.ReadOnlySpan x, System.ReadOnlySpan y, System.Span destination) { throw null; } + public static float Min(System.ReadOnlySpan x) { throw null; } + public static void Min(System.ReadOnlySpan x, System.ReadOnlySpan y, System.Span destination) { throw null; } + public static float MinMagnitude(System.ReadOnlySpan x) { throw null; } + public static void MinMagnitude(System.ReadOnlySpan x, System.ReadOnlySpan y, System.Span destination) { throw null; } + public static void Multiply(System.ReadOnlySpan x, System.ReadOnlySpan y, System.Span destination) { } + public static void Multiply(System.ReadOnlySpan x, float y, System.Span destination) { } + public static void MultiplyAdd(System.ReadOnlySpan x, System.ReadOnlySpan y, System.ReadOnlySpan addend, System.Span destination) { } + public static void MultiplyAdd(System.ReadOnlySpan x, System.ReadOnlySpan y, float addend, System.Span destination) { } + public static void MultiplyAdd(System.ReadOnlySpan x, float y, System.ReadOnlySpan addend, System.Span destination) { } + public static void Negate(System.ReadOnlySpan x, System.Span destination) { } + public static float Product(System.ReadOnlySpan x) { throw null; } + public static float ProductOfDifferences(System.ReadOnlySpan x, System.ReadOnlySpan y) { throw null; } + public static float ProductOfSums(System.ReadOnlySpan x, System.ReadOnlySpan y) { throw null; } + public static void Sigmoid(System.ReadOnlySpan x, System.Span destination) { } + public static void Sinh(System.ReadOnlySpan x, System.Span destination) { } + public static void SoftMax(System.ReadOnlySpan x, System.Span destination) { } + public static void Subtract(System.ReadOnlySpan x, System.ReadOnlySpan y, System.Span destination) { } + public static void Subtract(System.ReadOnlySpan x, float y, System.Span destination) { } + public static float Sum(System.ReadOnlySpan x) { throw null; } + public static float SumOfMagnitudes(System.ReadOnlySpan x) { throw null; } + public static float SumOfSquares(System.ReadOnlySpan x) { throw null; } + public static void Tanh(System.ReadOnlySpan x, System.Span destination) { } } } diff --git a/src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.csproj b/src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.csproj index cabfe50e267cfb..a8090a6f6995dc 100644 --- a/src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.csproj +++ b/src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.csproj @@ -1,13 +1,20 @@ + $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) + $(TargetFrameworks);net7.0;net6.0 + + + + + \ No newline at end of file diff --git a/src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.netcore.cs b/src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.netcore.cs new file mode 100644 index 00000000000000..1cde4351546b26 --- /dev/null +++ b/src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.netcore.cs @@ -0,0 +1,14 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// ------------------------------------------------------------------------------ +// Changes to this file must follow the https://aka.ms/api-review process. +// ------------------------------------------------------------------------------ + +namespace System.Numerics.Tensors +{ + public static partial class TensorPrimitives + { + public static void ConvertToHalf(System.ReadOnlySpan source, System.Span destination) { throw null; } + public static void ConvertToSingle(System.ReadOnlySpan source, System.Span destination) { throw null; } + } +} diff --git a/src/libraries/System.Numerics.Tensors/src/Properties/InternalsVisibleTo.cs b/src/libraries/System.Numerics.Tensors/src/Properties/InternalsVisibleTo.cs deleted file mode 100644 index 2b044e474d570a..00000000000000 --- a/src/libraries/System.Numerics.Tensors/src/Properties/InternalsVisibleTo.cs +++ /dev/null @@ -1,6 +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.CompilerServices; - -[assembly: InternalsVisibleTo("System.Numerics.Tensors.Tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001004b86c4cb78549b34bab61a3b1800e23bfeb5b3ec390074041536a7e3cbd97f5f04cf0f857155a8928eaa29ebfd11cfbbad3ba70efea7bda3226c6a8d370a4cd303f714486b6ebc225985a638471e6ef571cc92a4613c00b8fa65d61ccee0cbe5f36330c9a01f4183559f1bef24cc2917c6d913e3a541333a1d05d9bed22b38cb")] diff --git a/src/libraries/System.Numerics.Tensors/src/Resources/Strings.resx b/src/libraries/System.Numerics.Tensors/src/Resources/Strings.resx index 57f792dde51dc2..45f0d8fa17893a 100644 --- a/src/libraries/System.Numerics.Tensors/src/Resources/Strings.resx +++ b/src/libraries/System.Numerics.Tensors/src/Resources/Strings.resx @@ -117,52 +117,13 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Array must contain elements. + + Destination is too short. - - Cannot compare {0} to {1}. + + Input span arguments must not be empty. - - Cannot compare {0} to {1} with different dimension {2}, {3} != {4}. - - - Cannot compare {0} with different dimension {1}, {2} != {3}. - - - Cannot compare {0} with Rank {1} to {2} with Rank {3}. - - - Cannot compute diagonal of {0} with Rank less than 2. - - - Cannot compute diagonal with offset {0}. - - - Tensor {0} must have at least one dimension. - - - Cannot compute triangle of {0} with Rank less than 2. - - - Cannot reshape array due to mismatch in lengths, currently {0} would become {1}. - - - Dimensions must be positive and non-zero. - - - Dimensions must contain elements. - - - Length of {0} ({1}) must match product of {2} ({3}). - - - The number of elements in the Tensor is greater than the available space from index to the end of the destination array. - - - Only single dimensional arrays are supported for the requested action. - - - The value "{0}" is not of type "{1}" and cannot be used in this generic collection. + + Input span arguments must all have the same length. \ No newline at end of file diff --git a/src/libraries/System.Numerics.Tensors/src/System.Numerics.Tensors.csproj b/src/libraries/System.Numerics.Tensors/src/System.Numerics.Tensors.csproj index 521f8055a4fa61..b0449170860b45 100644 --- a/src/libraries/System.Numerics.Tensors/src/System.Numerics.Tensors.csproj +++ b/src/libraries/System.Numerics.Tensors/src/System.Numerics.Tensors.csproj @@ -1,30 +1,37 @@ + $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) + $(TargetFrameworks);net7.0;net6.0 true - - $(NoWarn);1591 true - Tensor class which represents and extends multi-dimensional arrays. - -Commonly Used Types: -System.Numerics.Tensors.Tensor<T> -System.Numerics.Tensors.CompressedSparseTensor<T> -System.Numerics.Tensors.DenseTensor<T> -System.Numerics.Tensors.SparseTensor<T> + Provides support for operating over tensors. + + true - - - - - - - + + + + + + + + + + + + + + + + diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/ArrayTensorExtensions.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/ArrayTensorExtensions.cs deleted file mode 100644 index 05e12a62c990e4..00000000000000 --- a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/ArrayTensorExtensions.cs +++ /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. - -namespace System.Numerics.Tensors -{ - public static class ArrayTensorExtensions - { - /// - /// Creates a copy of this single-dimensional array as a DenseTensor<T> - /// - /// Type contained in the array to copy to the DenseTensor<T>. - /// The array to create a DenseTensor<T> from. - /// A 1-dimensional DenseTensor<T> with the same length and content as . - public static DenseTensor ToTensor(this T[] array) - { - return new DenseTensor(array); - } - - /// - /// Creates a copy of this two-dimensional array as a DenseTensor<T> - /// - /// Type contained in the array to copy to the DenseTensor<T>. - /// The array to create a DenseTensor<T> from. - /// False (default) to indicate that the first dimension is most major (farthest apart) and the last dimension is most minor (closest together): row-major. True to indicate that the last dimension is most major (farthest apart) and the first dimension is most minor (closest together): column-major. - /// A 2-dimensional DenseTensor<T> with the same dimensions and content as . - public static DenseTensor ToTensor(this T[,] array, bool reverseStride = false) - { - return new DenseTensor(array, reverseStride); - } - - /// - /// Creates a copy of this three-dimensional array as a DenseTensor<T> - /// - /// Type contained in the array to copy to the DenseTensor<T>. - /// The array to create a DenseTensor<T> from. - /// False (default) to indicate that the first dimension is most major (farthest apart) and the last dimension is most minor (closest together): akin to row-major in a rank-2 tensor. True to indicate that the last dimension is most major (farthest apart) and the first dimension is most minor (closest together): akin to column-major in a rank-2 tensor. - /// A 3-dimensional DenseTensor<T> with the same dimensions and content as . - public static DenseTensor ToTensor(this T[,,] array, bool reverseStride = false) - { - return new DenseTensor(array, reverseStride); - } - - /// - /// Creates a copy of this n-dimensional array as a DenseTensor<T> - /// - /// Type contained in the array to copy to the DenseTensor<T>. - /// The array to create a DenseTensor<T> from. - /// False (default) to indicate that the first dimension is most major (farthest apart) and the last dimension is most minor (closest together): akin to row-major in a rank-2 tensor. True to indicate that the last dimension is most major (farthest apart) and the first dimension is most minor (closest together): akin to column-major in a rank-2 tensor. - /// A n-dimensional DenseTensor<T> with the same dimensions and content as . - public static DenseTensor ToTensor(this Array array, bool reverseStride = false) - { - return new DenseTensor(array, reverseStride); - } - - /// - /// Creates a copy of this single-dimensional array as a SparseTensor<T> - /// - /// Type contained in the array to copy to the SparseTensor<T>. - /// The array to create a SparseTensor<T> from. - /// A 1-dimensional SparseTensor<T> with the same length and content as . - public static SparseTensor ToSparseTensor(this T[] array) - { - return new SparseTensor(array); - } - - /// - /// Creates a copy of this two-dimensional array as a SparseTensor<T> - /// - /// Type contained in the array to copy to the SparseTensor<T>. - /// The array to create a SparseTensor<T> from. - /// False (default) to indicate that the first dimension is most major (farthest apart) and the last dimension is most minor (closest together): row-major. True to indicate that the last dimension is most major (farthest apart) and the first dimension is most minor (closest together): column-major. - /// A 2-dimensional SparseTensor<T> with the same dimensions and content as . - public static SparseTensor ToSparseTensor(this T[,] array, bool reverseStride = false) - { - return new SparseTensor(array, reverseStride); - } - - /// - /// Creates a copy of this three-dimensional array as a SparseTensor<T> - /// - /// Type contained in the array to copy to the SparseTensor<T>. - /// The array to create a SparseTensor<T> from. - /// False (default) to indicate that the first dimension is most major (farthest apart) and the last dimension is most minor (closest together): akin to row-major in a rank-2 tensor. True to indicate that the last dimension is most major (farthest apart) and the first dimension is most minor (closest together): akin to column-major in a rank-2 tensor. - /// A 3-dimensional SparseTensor<T> with the same dimensions and content as . - public static SparseTensor ToSparseTensor(this T[,,] array, bool reverseStride = false) - { - return new SparseTensor(array, reverseStride); - } - - /// - /// Creates a copy of this n-dimensional array as a SparseTensor<T> - /// - /// Type contained in the array to copy to the SparseTensor<T>. - /// The array to create a SparseTensor<T> from. - /// False (default) to indicate that the first dimension is most major (farthest apart) and the last dimension is most minor (closest together): akin to row-major in a rank-2 tensor. True to indicate that the last dimension is most major (farthest apart) and the first dimension is most minor (closest together): akin to column-major in a rank-2 tensor. - /// A n-dimensional SparseTensor<T> with the same dimensions and content as . - public static SparseTensor ToSparseTensor(this Array array, bool reverseStride = false) - { - return new SparseTensor(array, reverseStride); - } - - /// - /// Creates a copy of this single-dimensional array as a CompressedSparseTensor<T> - /// - /// Type contained in the array to copy to the CompressedSparseTensor<T>. - /// The array to create a CompressedSparseTensor<T> from. - /// A 1-dimensional CompressedSparseTensor<T> with the same length and content as . - public static CompressedSparseTensor ToCompressedSparseTensor(this T[] array) - { - return new CompressedSparseTensor(array); - } - - /// - /// Creates a copy of this two-dimensional array as a CompressedSparseTensor<T> - /// - /// Type contained in the array to copy to the CompressedSparseTensor<T>. - /// The array to create a CompressedSparseTensor<T> from. - /// False (default) to indicate that the first dimension is most major (farthest apart) and the last dimension is most minor (closest together): row-major. True to indicate that the last dimension is most major (farthest apart) and the first dimension is most minor (closest together): column-major. - /// A 2-dimensional CompressedSparseTensor<T> with the same dimensions and content as . - public static CompressedSparseTensor ToCompressedSparseTensor(this T[,] array, bool reverseStride = false) - { - return new CompressedSparseTensor(array, reverseStride); - } - - /// - /// Creates a copy of this three-dimensional array as a CompressedSparseTensor<T> - /// - /// Type contained in the array to copy to the CompressedSparseTensor<T>. - /// The array to create a CompressedSparseTensor<T> from. - /// False (default) to indicate that the first dimension is most major (farthest apart) and the last dimension is most minor (closest together): akin to row-major in a rank-2 tensor. True to indicate that the last dimension is most major (farthest apart) and the first dimension is most minor (closest together): akin to column-major in a rank-2 tensor. - /// A 3-dimensional CompressedSparseTensor<T> with the same dimensions and content as . - public static CompressedSparseTensor ToCompressedSparseTensor(this T[,,] array, bool reverseStride = false) - { - return new CompressedSparseTensor(array, reverseStride); - } - - /// - /// Creates a copy of this n-dimensional array as a CompressedSparseTensor<T> - /// - /// Type contained in the array to copy to the CompressedSparseTensor<T>. - /// The array to create a CompressedSparseTensor<T> from. - /// False (default) to indicate that the first dimension is most major (farthest apart) and the last dimension is most minor (closest together): akin to row-major in a rank-2 tensor. True to indicate that the last dimension is most major (farthest apart) and the first dimension is most minor (closest together): akin to column-major in a rank-2 tensor. - /// A n-dimensional CompressedSparseTensor<T> with the same dimensions and content as . - public static CompressedSparseTensor ToCompressedSparseTensor(this Array array, bool reverseStride = false) - { - return new CompressedSparseTensor(array, reverseStride); - } - } -} diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/ArrayUtilities.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/ArrayUtilities.cs deleted file mode 100644 index 97152090dfea06..00000000000000 --- a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/ArrayUtilities.cs +++ /dev/null @@ -1,216 +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; - -namespace System.Numerics.Tensors -{ - internal static class ArrayUtilities - { - public const int StackallocMax = 16; - - public static long GetProduct(ReadOnlySpan dimensions, int startIndex = 0) - { - if (dimensions.Length == 0) - { - return 0; - } - - long product = 1; - for (int i = startIndex; i < dimensions.Length; i++) - { - if (dimensions[i] < 0) - { - throw new ArgumentOutOfRangeException($"{nameof(dimensions)}[{i}]"); - } - - // we use a long which should be much larger than is ever used here, - // but still force checked - checked - { - product *= dimensions[i]; - } - } - - return product; - } - - public static bool IsAscending(ReadOnlySpan values) - { - for (int i = 1; i < values.Length; i++) - { - if (values[i] < values[i - 1]) - { - return false; - } - } - - return true; - } - - public static bool IsDescending(ReadOnlySpan values) - { - for (int i = 1; i < values.Length; i++) - { - if (values[i] > values[i - 1]) - { - return false; - } - } - - return true; - } - - /// - /// Gets the set of strides that can be used to calculate the offset of n-dimensions in a 1-dimensional layout - /// - /// - /// - /// - public static int[] GetStrides(ReadOnlySpan dimensions, bool reverseStride = false) - { - int[] strides = new int[dimensions.Length]; - - int stride = 1; - if (reverseStride) - { - for (int i = 0; i < strides.Length; i++) - { - strides[i] = stride; - stride *= dimensions[i]; - } - } - else - { - for (int i = strides.Length - 1; i >= 0; i--) - { - strides[i] = stride; - stride *= dimensions[i]; - } - } - - return strides; - } - - public static void SplitStrides(int[] strides, int[] splitAxes, int[] newStrides, int stridesOffset, int[] splitStrides, int splitStridesOffset) - { - int newStrideIndex = 0; - for (int i = 0; i < strides.Length; i++) - { - int stride = strides[i]; - bool isSplit = false; - for (int j = 0; j < splitAxes.Length; j++) - { - if (splitAxes[j] == i) - { - splitStrides[splitStridesOffset + j] = stride; - isSplit = true; - break; - } - } - - if (!isSplit) - { - newStrides[stridesOffset + newStrideIndex++] = stride; - } - } - } - - /// - /// Calculates the 1-d index for n-d indices in layout specified by strides. - /// - /// - /// - /// - /// - public static int GetIndex(int[] strides, ReadOnlySpan indices, int startFromDimension = 0) - { - Debug.Assert(strides.Length == indices.Length); - - int index = 0; - for (int i = startFromDimension; i < indices.Length; i++) - { - index += strides[i] * indices[i]; - } - - return index; - } - - /// - /// Calculates the n-d indices from the 1-d index in a layout specified by strides - /// - /// - /// - /// - /// - /// - public static void GetIndices(ReadOnlySpan strides, bool reverseStride, int index, int[] indices, int startFromDimension = 0) - { - Debug.Assert(reverseStride ? IsAscending(strides) : IsDescending(strides), "Index decomposition requires ordered strides"); - Debug.Assert(strides.Length == indices.Length); - - int remainder = index; - for (int i = startFromDimension; i < strides.Length; i++) - { - // reverse the index for reverseStride so that we divide by largest stride first - var nIndex = reverseStride ? strides.Length - 1 - i : i; - - var stride = strides[nIndex]; - indices[nIndex] = remainder / stride; - remainder %= stride; - } - } - - /// - /// Calculates the n-d indices from the 1-d index in a layout specified by strides - /// - /// - /// - /// - /// - /// - public static void GetIndices(ReadOnlySpan strides, bool reverseStride, int index, Span indices, int startFromDimension = 0) - { - Debug.Assert(reverseStride ? IsAscending(strides) : IsDescending(strides), "Index decomposition requires ordered strides"); - Debug.Assert(strides.Length == indices.Length); - - int remainder = index; - for (int i = startFromDimension; i < strides.Length; i++) - { - // reverse the index for reverseStride so that we divide by largest stride first - var nIndex = reverseStride ? strides.Length - 1 - i : i; - - var stride = strides[nIndex]; - indices[nIndex] = remainder / stride; - remainder %= stride; - } - } - - /// - /// Takes an 1-d index over n-d sourceStrides and recalculates it assuming same n-d coordinates over a different n-d strides - /// - public static int TransformIndexByStrides(int index, int[] sourceStrides, bool sourceReverseStride, int[] transformStrides) - { - Debug.Assert(index >= 0); - Debug.Assert(sourceReverseStride ? IsAscending(sourceStrides) : IsDescending(sourceStrides), "Index decomposition requires ordered strides"); - Debug.Assert(sourceStrides.Length == transformStrides.Length); - - int transformIndex = 0; - int remainder = index; - - for (int i = 0; i < sourceStrides.Length; i++) - { - // reverse the index for reverseStride so that we divide by largest stride first - var nIndex = sourceReverseStride ? sourceStrides.Length - 1 - i : i; - - var sourceStride = sourceStrides[nIndex]; - var transformStride = transformStrides[nIndex]; - - transformIndex += transformStride * (remainder / sourceStride); - remainder %= sourceStride; - } - - return transformIndex; - } - } -} diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/CompressedSparseTensor.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/CompressedSparseTensor.cs deleted file mode 100644 index b41915acddd5ab..00000000000000 --- a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/CompressedSparseTensor.cs +++ /dev/null @@ -1,517 +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.Linq; - -namespace System.Numerics.Tensors -{ - /// - /// Represents a tensor using compressed sparse format - /// For a two dimensional tensor this is referred to as compressed sparse row (CSR, CRS, Yale), compressed sparse column (CSC, CCS) - /// - /// In this format, data that is in the same value for the compressed dimension has locality - /// - /// In standard layout of a dense tensor, data with the same value for first dimensions has locality. - /// As such we'll use reverseStride = false (default) to mean that the first dimension is compressed (CSR) - /// and reverseStride = true to mean that the last dimension is compressed (CSC) - /// - /// - /// - public class CompressedSparseTensor : Tensor - { - private Memory values; - private readonly Memory compressedCounts; - private Memory indices; - - private int nonZeroCount; - - private readonly int[] nonCompressedStrides; - private readonly int compressedDimension; - - private const int defaultCapacity = 64; - - /// - /// Constructs a new CompressedSparseTensor of the specified dimensions and stride ordering. - /// - /// An span of integers that represent the size of each dimension of the CompressedSparseTensor to create. - /// False (default) to indicate that the first dimension is most major (farthest apart) and the last dimension is most minor (closest together): akin to row-major in a rank-2 tensor. True to indicate that the last dimension is most major (farthest apart) and the first dimension is most minor (closest together): akin to column-major in a rank-2 tensor. - public CompressedSparseTensor(ReadOnlySpan dimensions, bool reverseStride = false) : this(dimensions, defaultCapacity, reverseStride) - { } - - /// - /// Constructs a new CompressedSparseTensor of the specified dimensions, initial capacity, and stride ordering. - /// - /// An span of integers that represent the size of each dimension of the CompressedSparseTensor to create. - /// The number of non-zero values this tensor can store without resizing. - /// False (default) to indicate that the first dimension is most major (farthest apart) and the last dimension is most minor (closest together): akin to row-major in a rank-2 tensor. True to indicate that the last dimension is most major (farthest apart) and the first dimension is most minor (closest together): akin to column-major in a rank-2 tensor. - public CompressedSparseTensor(ReadOnlySpan dimensions, int capacity, bool reverseStride = false) : base(dimensions, reverseStride) - { - nonZeroCount = 0; - compressedDimension = reverseStride ? Rank - 1 : 0; - nonCompressedStrides = (int[])strides.Clone(); - nonCompressedStrides[compressedDimension] = 0; - var compressedDimensionLength = dimensions[compressedDimension]; - compressedCounts = new int[compressedDimensionLength + 1]; - values = new T[capacity]; - indices = new int[capacity]; - } - - /// - /// Constructs a new CompressedSparseTensor of the specified dimensions, wrapping existing backing memory for the contents. - /// Growing this CompressedSparseTensor will re-allocate the backing memory. - /// - /// Memory storing non-zero values to construct this tensor with. - /// Memory storing the counts of non-zero elements at each index of the compressed dimension. - /// Memory storing the linearized index (excluding the compressed dimension) of non-zero elements. - /// The number of valid entries (eg: non-zero values) in and . - /// An span of integers that represent the size of each dimension of the CompressedSparseTensor to create. - /// False (default) to indicate that the first dimension is most major (farthest apart) and the last dimension is most minor (closest together): akin to row-major in a rank-2 tensor. True to indicate that the last dimension is most major (farthest apart) and the first dimension is most minor (closest together): akin to column-major in a rank-2 tensor. - public CompressedSparseTensor(Memory values, Memory compressedCounts, Memory indices, int nonZeroCount, ReadOnlySpan dimensions, bool reverseStride = false) : base(dimensions, reverseStride) - { - compressedDimension = reverseStride ? Rank - 1 : 0; - nonCompressedStrides = (int[])strides.Clone(); - nonCompressedStrides[compressedDimension] = 0; - this.values = values; - this.compressedCounts = compressedCounts; - this.indices = indices; - this.nonZeroCount = nonZeroCount; - } - - internal CompressedSparseTensor(Array fromArray, bool reverseStride = false) : base(fromArray, reverseStride) - { - nonZeroCount = 0; - compressedDimension = reverseStride ? Rank - 1 : 0; - nonCompressedStrides = (int[])strides.Clone(); - nonCompressedStrides[compressedDimension] = 0; - var compressedDimensionLength = dimensions[compressedDimension]; - compressedCounts = new int[compressedDimensionLength + 1]; - - int index = 0; - if (reverseStride) - { - // Array is always row-major - var sourceStrides = ArrayUtilities.GetStrides(dimensions); - - foreach (T item in fromArray) - { - if (!item!.Equals(Zero)) - { - var destIndex = ArrayUtilities.TransformIndexByStrides(index, sourceStrides, false, strides); - var compressedIndex = destIndex / strides[compressedDimension]; - var nonCompressedIndex = destIndex % strides[compressedDimension]; - - SetAt(item, compressedIndex, nonCompressedIndex); - } - - index++; - } - } - else - { - foreach (T item in fromArray) - { - if (!item!.Equals(Zero)) - { - var compressedIndex = index / strides[compressedDimension]; - var nonCompressedIndex = index % strides[compressedDimension]; - - SetAt(item, compressedIndex, nonCompressedIndex); - } - - index++; - } - } - } - - /// - /// Obtains the value at the specified indices - /// - /// A span of integers that represent the indices specifying the position of the element to get. - /// The value at the specified position in this Tensor. - public override T this[ReadOnlySpan indices] - { - get - { - var compressedIndex = indices[compressedDimension]; - var nonCompressedIndex = ArrayUtilities.GetIndex(nonCompressedStrides, indices); - - - if (TryFindIndex(compressedIndex, nonCompressedIndex, out int valueIndex)) - { - return values.Span[valueIndex]; - } - - return Zero; - } - - set - { - var compressedIndex = indices[compressedDimension]; - var nonCompressedIndex = ArrayUtilities.GetIndex(nonCompressedStrides, indices); - - SetAt(value, compressedIndex, nonCompressedIndex); - } - } - - /// - /// Gets the value at the specified index, where index is lineraized as a dot product between indices and strides. - /// - /// An integer index computed as a dot-product of indices. - /// The value at the specified position in this Tensor. - public override T GetValue(int index) - { - var compressedDimensionStride = strides[compressedDimension]; - Debug.Assert(compressedDimensionStride == strides.Max()); - - var compressedIndex = index / compressedDimensionStride; - var nonCompressedIndex = index % compressedDimensionStride; - - - if (TryFindIndex(compressedIndex, nonCompressedIndex, out int valueIndex)) - { - return values.Span[valueIndex]; - } - - return Zero; - } - - /// - /// Sets the value at the specified index, where index is a linearized version of n-dimension indices using strides. - /// - /// An integer index computed as a dot-product of indices. - /// The new value to set at the specified position in this Tensor. - public override void SetValue(int index, T value) - { - var compressedDimensionStride = strides[compressedDimension]; - Debug.Assert(compressedDimensionStride == strides.Max()); - - var compressedIndex = index / compressedDimensionStride; - var nonCompressedIndex = index % compressedDimensionStride; - - SetAt(value, compressedIndex, nonCompressedIndex); - - } - - /// - /// Gets the number of non-zero values this tensor can store without resizing. - /// - public int Capacity => values.Length; - - /// - /// Get's the number on non-zero values currently being stored in this tensor. - /// - public int NonZeroCount => nonZeroCount; - - /// - /// Memory storing non-zero values. - /// - public Memory Values => values; - - /// - /// Memory storing the counts of non-zero elements at each index of the compressed dimension. - /// - public Memory CompressedCounts => compressedCounts; - - /// - /// Memory storing the linearized index (excluding the compressed dimension) of non-zero elements. - /// - public Memory Indices => indices; - - private void EnsureCapacity(int min, int allocateIndex = -1) - { - if (values.Length < min) - { - var newCapacity = values.Length == 0 ? defaultCapacity : values.Length * 2; - - if (newCapacity > Length) - { - newCapacity = (int)Length; - } - - if (newCapacity < min) - { - newCapacity = min; - } - - Memory newValues = new T[newCapacity]; - Memory newIndices = new int[newCapacity]; - - if (nonZeroCount > 0) - { - if (allocateIndex == -1) - { - var valuesSpan = values.Span.Slice(0, nonZeroCount); - var indicesSpan = indices.Span.Slice(0, nonZeroCount); - - valuesSpan.CopyTo(newValues.Span); - indicesSpan.CopyTo(newIndices.Span); - } - else - { - Debug.Assert(allocateIndex <= nonZeroCount); - // leave a gap at allocateIndex - - // copy range before allocateIndex - if (allocateIndex > 0) - { - var valuesSpan = values.Span.Slice(0, allocateIndex); - var indicesSpan = indices.Span.Slice(0, allocateIndex); - - valuesSpan.CopyTo(newValues.Span); - indicesSpan.CopyTo(newIndices.Span); - } - - if (allocateIndex < nonZeroCount) - { - var valuesSpan = values.Span.Slice(allocateIndex, nonZeroCount - allocateIndex); - var indicesSpan = indices.Span.Slice(allocateIndex, nonZeroCount - allocateIndex); - - var newValuesSpan = newValues.Span.Slice(allocateIndex + 1, nonZeroCount - allocateIndex); - var newIndicesSpan = newIndices.Span.Slice(allocateIndex + 1, nonZeroCount - allocateIndex); - - valuesSpan.CopyTo(newValuesSpan); - indicesSpan.CopyTo(newIndicesSpan); - } - } - } - - values = newValues; - indices = newIndices; - } - } - - private void InsertAt(int valueIndex, T value, int compressedIndex, int nonCompressedIndex) - { - Debug.Assert(valueIndex <= nonZeroCount); - Debug.Assert(compressedIndex < compressedCounts.Length - 1); - - if (values.Length <= valueIndex) - { - // allocate a new array, leaving a gap - EnsureCapacity(valueIndex + 1, valueIndex); - } - else if (nonZeroCount != valueIndex) - { - // shift values to make a gap - values.Span.Slice(valueIndex, nonZeroCount - valueIndex).CopyTo(values.Span.Slice(valueIndex + 1)); - indices.Span.Slice(valueIndex, nonZeroCount - valueIndex).CopyTo(indices.Span.Slice(valueIndex + 1)); - } - - values.Span[valueIndex] = value; - indices.Span[valueIndex] = nonCompressedIndex; - - var compressedCountsSpan = compressedCounts.Span.Slice(compressedIndex + 1); - for (int i = 0; i < compressedCountsSpan.Length; i++) - { - compressedCountsSpan[i]++; - } - nonZeroCount++; - } - - private void RemoveAt(int valueIndex, int compressedIndex) - { - Debug.Assert(valueIndex < nonZeroCount); - Debug.Assert(compressedIndex < compressedCounts.Length - 1); - - // shift values to close the gap - values.Span.Slice(valueIndex + 1, nonZeroCount - valueIndex - 1).CopyTo(values.Span.Slice(valueIndex)); - indices.Span.Slice(valueIndex + 1, nonZeroCount - valueIndex - 1).CopyTo(indices.Span.Slice(valueIndex)); - - var compressedCountsSpan = compressedCounts.Span.Slice(compressedIndex + 1); - for (int i = 0; i < compressedCountsSpan.Length; i++) - { - compressedCountsSpan[i]--; - } - nonZeroCount--; - } - - private void SetAt(T value, int compressedIndex, int nonCompressedIndex) - { - bool isZero = value!.Equals(Zero); - - if (TryFindIndex(compressedIndex, nonCompressedIndex, out int valueIndex)) - { - if (isZero) - { - RemoveAt(valueIndex, compressedIndex); - } - else - { - values.Span[valueIndex] = value; - indices.Span[valueIndex] = nonCompressedIndex; - } - } - else if (!isZero) - { - InsertAt(valueIndex, value, compressedIndex, nonCompressedIndex); - } - } - - /// - /// Trys to find the place to store a value - /// - /// - /// - /// - /// True if element is found at specific index, false if no specific index is found and insertion point is returned - private bool TryFindIndex(int compressedIndex, int nonCompressedIndex, out int valueIndex) - { - if (nonZeroCount == 0) - { - valueIndex = 0; - return false; - } - - Debug.Assert(compressedIndex < compressedCounts.Length - 1); - - var compressedCountsSpan = compressedCounts.Span; - var lowerValueIndex = compressedCountsSpan[compressedIndex]; - var upperValueIndex = compressedCountsSpan[compressedIndex + 1]; - var indicesSpan = indices.Span; - - // could be a faster search - for (valueIndex = lowerValueIndex; valueIndex < upperValueIndex; valueIndex++) - { - if (indicesSpan[valueIndex] == nonCompressedIndex) - { - return true; - } - } - - return false; - } - - /// - /// Creates a shallow copy of this tensor, with new backing storage. - /// - /// A shallow copy of this tensor. - public override Tensor Clone() - { - return new CompressedSparseTensor(values.ToArray(), compressedCounts.ToArray(), indices.ToArray(), nonZeroCount, dimensions, IsReversedStride); - } - - /// - /// Creates a new Tensor of a different type with the specified dimensions and the same layout as this tensor with elements initialized to their default value. - /// - /// Type contained in the returned Tensor. - /// An span of integers that represent the size of each dimension of the CompressedSparseTensor to create. - /// A new tensor with the same layout as this tensor but different type and dimensions. - public override Tensor CloneEmpty(ReadOnlySpan dimensions) - { - return new CompressedSparseTensor(dimensions, IsReversedStride); - } - - /// - /// Reshapes the current tensor to new dimensions. Unlike other Tensor implementations, CompressedSparseTensor<T> must allocate new backing storage to represent a reshaped Tensor. - /// - /// An span of integers that represent the size of each dimension of the CompressedSparseTensor to create. - /// A new tensor that reinterprets the content of this tensor to new dimensions (assuming the same linear index for each element). - public override Tensor Reshape(ReadOnlySpan dimensions) - { - // reshape currently has shallow semantics which are not compatible with the backing storage for CompressedSparseTensor - // which bakes in information about dimensions (compressedCounts and indices) - - var newCompressedDimension = IsReversedStride ? dimensions.Length - 1 : 0; - var newCompressedDimensionLength = dimensions[newCompressedDimension]; - var newCompressedDimensionStride = (int)(Length / newCompressedDimensionLength); - - var newValues = (T[])values.ToArray(); - var newCompressedCounts = new int[newCompressedDimensionLength + 1]; - var newIndices = new int[indices.Length]; - - var compressedIndex = 0; - - var compressedCountsSpan = compressedCounts.Span; - var indicesSpan = indices.Span.Slice(0, nonZeroCount); - for (int valueIndex = 0; valueIndex < indicesSpan.Length; valueIndex++) - { - while (valueIndex >= compressedCountsSpan[compressedIndex + 1]) - { - compressedIndex++; - Debug.Assert(compressedIndex < compressedCounts.Length); - } - - var currentIndex = indicesSpan[valueIndex] + compressedIndex * strides[compressedDimension]; - - newIndices[valueIndex] = currentIndex % newCompressedDimensionStride; - - var newCompressedIndex = currentIndex / newCompressedDimensionStride; - newCompressedCounts[newCompressedIndex + 1] = valueIndex + 1; - } - - return new CompressedSparseTensor(newValues, newCompressedCounts, newIndices, nonZeroCount, dimensions, IsReversedStride); - } - - /// - /// Creates a copy of this tensor as a DenseTensor<T>. - /// - /// A copy of this tensor as a DenseTensor<T> - public override DenseTensor ToDenseTensor() - { - var denseTensor = new DenseTensor(Dimensions, reverseStride: IsReversedStride); - - var compressedIndex = 0; - - var compressedCountsSpan = compressedCounts.Span; - var indicesSpan = indices.Span.Slice(0, nonZeroCount); - var valuesSpan = values.Span.Slice(0, nonZeroCount); - for (int valueIndex = 0; valueIndex < valuesSpan.Length; valueIndex++) - { - while (valueIndex >= compressedCountsSpan[compressedIndex + 1]) - { - compressedIndex++; - Debug.Assert(compressedIndex < compressedCounts.Length); - } - - var index = indicesSpan[valueIndex] + compressedIndex * strides[compressedDimension]; - - denseTensor.SetValue(index, valuesSpan[valueIndex]); - } - - return denseTensor; - } - - /// - /// Creates a copy of this tensor as a new CompressedSparseTensor<T> eliminating any unused space in the backing storage. - /// - /// A copy of this tensor as a CompressedSparseTensor<T>. - public override CompressedSparseTensor ToCompressedSparseTensor() - { - // Create a copy of the backing storage, eliminating any unused space. - var newValues = values.Slice(0, nonZeroCount).ToArray(); - var newIndices = indices.Slice(0, nonZeroCount).ToArray(); - - return new CompressedSparseTensor(newValues, compressedCounts.ToArray(), newIndices, nonZeroCount, dimensions, IsReversedStride); - } - - /// - /// Creates a copy of this tensor as a SparseTensor<T>. - /// - /// A copy of this tensor as a SparseTensor<T>. - public override SparseTensor ToSparseTensor() - { - var sparseTensor = new SparseTensor(dimensions, capacity: NonZeroCount, reverseStride: IsReversedStride); - - var compressedIndex = 0; - - var compressedCountsSpan = compressedCounts.Span; - var indicesSpan = indices.Span.Slice(0, nonZeroCount); - var valuesSpan = values.Span.Slice(0, nonZeroCount); - for (int valueIndex = 0; valueIndex < valuesSpan.Length; valueIndex++) - { - while (valueIndex >= compressedCountsSpan[compressedIndex + 1]) - { - compressedIndex++; - Debug.Assert(compressedIndex < compressedCounts.Length); - } - - var index = indicesSpan[valueIndex] + compressedIndex * strides[compressedDimension]; - - sparseTensor.SetValue(index, valuesSpan[valueIndex]); - } - - return sparseTensor; - } - } -} diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/DenseTensor.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/DenseTensor.cs deleted file mode 100644 index 5f8715be3d18c8..00000000000000 --- a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/DenseTensor.cs +++ /dev/null @@ -1,178 +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.Numerics.Tensors -{ - /// - /// Represents a multi-dimensional collection of objects of type T that can be accessed by indices. DenseTensor stores values in a contiguous sequential block of memory where all values are represented. - /// - /// type contained within the Tensor. Typically a value type such as int, double, float, etc. - public class DenseTensor : Tensor - { - private readonly Memory memory; - - internal DenseTensor(Array fromArray, bool reverseStride = false) : base(fromArray, reverseStride) - { - // copy initial array - var backingArray = new T[fromArray.Length]; - - int index = 0; - if (reverseStride) - { - // Array is always row-major - var sourceStrides = ArrayUtilities.GetStrides(dimensions); - - foreach (var item in fromArray) - { - var destIndex = ArrayUtilities.TransformIndexByStrides(index++, sourceStrides, false, strides); - backingArray[destIndex] = (T)item!; - } - } - else - { - foreach (var item in fromArray) - { - backingArray[index++] = (T)item!; - } - } - memory = backingArray; - } - - /// - /// Initializes a rank-1 Tensor using the specified . - /// - /// Size of the 1-dimensional tensor - public DenseTensor(int length) : base(length) - { - memory = new T[length]; - } - - /// - /// Initializes a rank-n Tensor using the dimensions specified in . - /// - /// An span of integers that represent the size of each dimension of the DenseTensor to create. - /// False (default) to indicate that the first dimension is most major (farthest apart) and the last dimension is most minor (closest together): akin to row-major in a rank-2 tensor. True to indicate that the last dimension is most major (farthest apart) and the first dimension is most minor (closest together): akin to column-major in a rank-2 tensor. - public DenseTensor(ReadOnlySpan dimensions, bool reverseStride = false) : base(dimensions, reverseStride) - { - memory = new T[Length]; - } - - /// - /// Constructs a new DenseTensor of the specified dimensions, wrapping existing backing memory for the contents. - /// - /// - /// An span of integers that represent the size of each dimension of the DenseTensor to create. - /// False (default) to indicate that the first dimension is most major (farthest apart) and the last dimension is most minor (closest together): akin to row-major in a rank-2 tensor. True to indicate that the last dimension is most major (farthest apart) and the first dimension is most minor (closest together): akin to column-major in a rank-2 tensor. - public DenseTensor(Memory memory, ReadOnlySpan dimensions, bool reverseStride = false) : base(dimensions, reverseStride) - { - this.memory = memory; - - if (Length != memory.Length) - { - throw new ArgumentException(SR.Format(SR.LengthMustMatch, nameof(memory), memory.Length, nameof(dimensions), Length)); - } - } - - /// - /// Memory storing backing values of this tensor. - /// - public Memory Buffer => memory; - - /// - /// Gets the value at the specified index, where index is a linearized version of n-dimension indices using strides. - /// - /// An integer index computed as a dot-product of indices. - /// The value at the specified position in this Tensor. - public override T GetValue(int index) - { - return Buffer.Span[index]; - } - - /// - /// Sets the value at the specified index, where index is a linearized version of n-dimension indices using strides. - /// - /// An integer index computed as a dot-product of indices. - /// The new value to set at the specified position in this Tensor. - public override void SetValue(int index, T value) - { - Buffer.Span[index] = value; - } - - protected override void CopyTo(T[] array, int arrayIndex) - { - if (array is null) - { - throw new ArgumentNullException(nameof(array)); - } - - if (array.Length < arrayIndex + Length) - { - throw new ArgumentException(SR.NumberGreaterThenAvailableSpace, nameof(array)); - } - - Buffer.Span.CopyTo(array.AsSpan(arrayIndex)); - } - - protected override int IndexOf(T item) - { - // TODO: use Span.IndexOf when/if it removes the IEquatable type constraint - if (MemoryMarshal.TryGetArray(Buffer, out var arraySegment)) - { - var result = Array.IndexOf(arraySegment.Array!, item, arraySegment.Offset, arraySegment.Count); - if (result != -1) - { - result -= arraySegment.Offset; - } - return result; - } - else - { - return base.IndexOf(item); - } - } - - /// - /// Creates a shallow copy of this tensor, with new backing storage. - /// - /// A shallow copy of this tensor. - public override Tensor Clone() - { - return new DenseTensor(Buffer.ToArray(), dimensions, IsReversedStride); - } - - /// - /// Creates a new Tensor of a different type with the specified dimensions and the same layout as this tensor with elements initialized to their default value. - /// - /// Type contained in the returned Tensor. - /// An span of integers that represent the size of each dimension of the DenseTensor to create. - /// A new tensor with the same layout as this tensor but different type and dimensions. - public override Tensor CloneEmpty(ReadOnlySpan dimensions) - { - return new DenseTensor(dimensions, IsReversedStride); - } - - /// - /// Reshapes the current tensor to new dimensions, using the same backing storage. - /// - /// An span of integers that represent the size of each dimension of the DenseTensor to create. - /// A new tensor that reinterprets backing Buffer of this tensor with different dimensions. - public override Tensor Reshape(ReadOnlySpan dimensions) - { - if (dimensions.Length == 0) - { - throw new ArgumentException(SR.DimensionsMustContainElements, nameof(dimensions)); - } - - var newSize = ArrayUtilities.GetProduct(dimensions); - - if (newSize != Length) - { - throw new ArgumentException(SR.Format(SR.CannotReshapeArrayDueToMismatchInLengths, Length, newSize), nameof(dimensions)); - } - - return new DenseTensor(Buffer, dimensions, IsReversedStride); - } - } -} diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/SparseTensor.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/SparseTensor.cs deleted file mode 100644 index 83948a0b918b7d..00000000000000 --- a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/SparseTensor.cs +++ /dev/null @@ -1,177 +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.Generic; - -namespace System.Numerics.Tensors -{ - /// - /// Represents a multi-dimensional collection of objects of type T that can be accessed by indices. Unlike other Tensor<T> implementations SparseTensor<T> does not expose its backing storage. It is meant as an intermediate to be used to build other Tensors, such as CompressedSparseTensor. Unlike CompressedSparseTensor where insertions are O(n), insertions to SparseTensor<T> are nominally O(1). - /// - /// type contained within the Tensor. Typically a value type such as int, double, float, etc. - public class SparseTensor : Tensor - { - private readonly Dictionary values; - /// - /// Constructs a new SparseTensor of the specified dimensions, initial capacity, and stride ordering. - /// - /// An span of integers that represent the size of each dimension of the SparseTensor to create. - /// False (default) to indicate that the first dimension is most major (farthest apart) and the last dimension is most minor (closest together): akin to row-major in a rank-2 tensor. True to indicate that the last dimension is most major (farthest apart) and the first dimension is most minor (closest together): akin to column-major in a rank-2 tensor. - /// The number of non-zero values this tensor can store without resizing. - public SparseTensor(ReadOnlySpan dimensions, bool reverseStride = false, int capacity = 0) : base(dimensions, reverseStride) - { - values = new Dictionary(capacity); - } - - internal SparseTensor(Dictionary values, ReadOnlySpan dimensions, bool reverseStride = false) : base(dimensions, reverseStride) - { - this.values = values; - } - - internal SparseTensor(Array fromArray, bool reverseStride = false) : base(fromArray, reverseStride) - { - values = new Dictionary(fromArray.Length); - - int index = 0; - if (reverseStride) - { - // Array is always row-major - var sourceStrides = ArrayUtilities.GetStrides(dimensions); - - foreach (T item in fromArray) - { - if (!item!.Equals(Zero)) - { - var destIndex = ArrayUtilities.TransformIndexByStrides(index, sourceStrides, false, strides); - values[destIndex] = item; - } - - index++; - } - } - else - { - foreach (T item in fromArray) - { - if (!item!.Equals(Zero)) - { - values[index] = item; - } - - index++; - } - } - } - - /// - /// Gets the value at the specified index, where index is a linearized version of n-dimension indices using strides. - /// - /// An integer index computed as a dot-product of indices. - /// The value at the specified position in this Tensor. - public override T GetValue(int index) - { - - if (!values.TryGetValue(index, out T? value)) - { - value = Zero; - } - - return value; - } - - /// - /// Sets the value at the specified index, where index is a linearized version of n-dimension indices using strides. - /// - /// An integer index computed as a dot-product of indices. - /// The new value to set at the specified position in this Tensor. - public override void SetValue(int index, T value) - { - if (value!.Equals(Zero)) - { - values.Remove(index); - } - else - { - values[index] = value; - } - } - - /// - /// Get's the number on non-zero values currently being stored in this tensor. - /// - public int NonZeroCount => values.Count; - - /// - /// Creates a shallow copy of this tensor, with new backing storage. - /// - /// A shallow copy of this tensor. - public override Tensor Clone() - { - var valueCopy = new Dictionary(values); - return new SparseTensor(valueCopy, dimensions, IsReversedStride); - } - - /// - /// Creates a new Tensor of a different type with the specified dimensions and the same layout as this tensor with elements initialized to their default value. - /// - /// Type contained in the returned Tensor. - /// An span of integers that represent the size of each dimension of the SparseTensor to create. - /// A new tensor with the same layout as this tensor but different type and dimensions. - public override Tensor CloneEmpty(ReadOnlySpan dimensions) - { - return new SparseTensor(dimensions, IsReversedStride); - } - - /// - /// Reshapes the current tensor to new dimensions, using the same backing storage. - /// - /// An span of integers that represent the size of each dimension of the SparseTensor to create. - /// A new tensor that reinterprets backing storage of this tensor with different dimensions. - public override Tensor Reshape(ReadOnlySpan dimensions) - { - return new SparseTensor(values, dimensions, IsReversedStride); - } - - /// - /// Creates a copy of this tensor as a DenseTensor<T>. - /// - /// A copy of this tensor as a DenseTensor<T> - public override DenseTensor ToDenseTensor() - { - var denseTensor = new DenseTensor(Dimensions, reverseStride: IsReversedStride); - - // only set non-zero values - foreach (var pair in values) - { - denseTensor.SetValue(pair.Key, pair.Value); - } - - return denseTensor; - } - - /// - /// Creates a copy of this tensor as a new SparseTensor<T> eliminating any unused space in the backing storage. - /// - /// A copy of this tensor as a SparseTensor<T> eliminated any usused space in the backing storage. - public override SparseTensor ToSparseTensor() - { - var valueCopy = new Dictionary(values); - return new SparseTensor(valueCopy, dimensions, IsReversedStride); - } - - /// - /// Creates a copy of this tensor as a CompressedSparseTensor<T>. - /// - /// A copy of this tensor as a CompressedSparseTensor<T>. - public override CompressedSparseTensor ToCompressedSparseTensor() - { - var compressedSparseTensor = new CompressedSparseTensor(dimensions, capacity: NonZeroCount, reverseStride: IsReversedStride); - - foreach (var pair in values) - { - compressedSparseTensor.SetValue(pair.Key, pair.Value); - } - return compressedSparseTensor; - } - } -} diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/Tensor.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/Tensor.cs deleted file mode 100644 index f63547682dd24b..00000000000000 --- a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/Tensor.cs +++ /dev/null @@ -1,1365 +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.Collections.Generic; -using System.Diagnostics; -using System.Text; - -namespace System.Numerics.Tensors -{ - /// - /// Various methods for creating and manipulating Tensor<T> - /// - public static partial class Tensor - { - /// - /// Creates an identity tensor of the specified size. An identity tensor is a two dimensional tensor with 1s in the diagonal. - /// - /// type contained within the Tensor. Typically a value type such as int, double, float, etc. - /// Width and height of the identity tensor to create. - /// a by with 1s along the diagonal and zeros elsewhere. - public static Tensor CreateIdentity(int size) - { - return CreateIdentity(size, false, Tensor.One); - } - - /// - /// Creates an identity tensor of the specified size and layout (row vs column major). An identity tensor is a two dimensional tensor with 1s in the diagonal. - /// - /// type contained within the Tensor. Typically a value type such as int, double, float, etc. - /// Width and height of the identity tensor to create. - /// >False to indicate that the first dimension is most minor (closest) and the last dimension is most major (farthest): row-major. True to indicate that the last dimension is most minor (closest together) and the first dimension is most major (farthest apart): column-major. - /// a by with 1s along the diagonal and zeros elsewhere. - public static Tensor CreateIdentity(int size, bool columMajor) - { - return CreateIdentity(size, columMajor, Tensor.One); - } - - /// - /// Creates an identity tensor of the specified size and layout (row vs column major) using the specified one value. An identity tensor is a two dimensional tensor with 1s in the diagonal. This may be used in case T is a type that doesn't have a known 1 value. - /// - /// type contained within the Tensor. Typically a value type such as int, double, float, etc. - /// Width and height of the identity tensor to create. - /// >False to indicate that the first dimension is most minor (closest) and the last dimension is most major (farthest): row-major. True to indicate that the last dimension is most minor (closest together) and the first dimension is most major (farthest apart): column-major. - /// Value of that is used along the diagonal. - /// a by with 1s along the diagonal and zeros elsewhere. - public static Tensor CreateIdentity(int size, bool columMajor, T oneValue) - { - Span dimensions = stackalloc int[2]; - dimensions[0] = dimensions[1] = size; - - var result = new DenseTensor(dimensions, columMajor); - - for (int i = 0; i < size; i++) - { - result.SetValue(i * size + i, oneValue); - } - - return result; - } - - /// - /// Creates a n+1-rank tensor using the specified n-rank diagonal. Values not on the diagonal will be filled with zeros. - /// - /// type contained within the Tensor. Typically a value type such as int, double, float, etc. - /// Tensor representing the diagonal to build the new tensor from. - /// A new tensor of the same layout and order as of one higher rank, with the values of along the diagonal and zeros elsewhere. - public static Tensor CreateFromDiagonal(Tensor diagonal) - { - return CreateFromDiagonal(diagonal, 0); - } - - /// - /// Creates a n+1-dimension tensor using the specified n-dimension diagonal at the specified offset from the center. Values not on the diagonal will be filled with zeros. - /// - /// type contained within the Tensor. Typically a value type such as int, double, float, etc. - /// Tensor representing the diagonal to build the new tensor from. - /// Offset of diagonal to set in returned tensor. 0 for the main diagonal, less than zero for diagonals below, greater than zero from diagonals above. - /// A new tensor of the same layout and order as of one higher rank, with the values of along the specified diagonal and zeros elsewhere. - public static Tensor CreateFromDiagonal(Tensor diagonal, int offset) - { - if (diagonal.Rank < 1) - { - throw new ArgumentException(SR.Format(SR.MustHaveAtLeastOneDimension, nameof(diagonal)), nameof(diagonal)); - } - - int diagonalLength = diagonal.dimensions[0]; - - // TODO: allow specification of axis1 and axis2? - var rank = diagonal.dimensions.Length + 1; - Span dimensions = rank < ArrayUtilities.StackallocMax ? stackalloc int[rank] : new int[rank]; - - // assume square - var axisLength = diagonalLength + Math.Abs(offset); - dimensions[0] = dimensions[1] = axisLength; - - for (int i = 1; i < diagonal.dimensions.Length; i++) - { - dimensions[i + 1] = diagonal.dimensions[i]; - } - - var result = diagonal.CloneEmpty(dimensions); - - var sizePerDiagonal = diagonal.Length / diagonalLength; - - var diagProjectionStride = diagonal.IsReversedStride && diagonal.Rank > 1 ? diagonal.strides[1] : 1; - var resultProjectionStride = result.IsReversedStride && result.Rank > 2 ? result.strides[2] : 1; - - for (int diagIndex = 0; diagIndex < diagonalLength; diagIndex++) - { - var resultIndex0 = offset < 0 ? diagIndex - offset : diagIndex; - var resultIndex1 = offset > 0 ? diagIndex + offset : diagIndex; - - var resultBase = resultIndex0 * result.strides[0] + resultIndex1 * result.strides[1]; - var diagBase = diagIndex * diagonal.strides[0]; - - for (int diagProjectionOffset = 0; diagProjectionOffset < sizePerDiagonal; diagProjectionOffset++) - { - result.SetValue(resultBase + diagProjectionOffset * resultProjectionStride, - diagonal.GetValue(diagBase + diagProjectionOffset * diagProjectionStride)); - } - } - - return result; - } - } - - /// - /// Represents a multi-dimensional collection of objects of type T that can be accessed by indices. - /// - /// type contained within the Tensor. Typically a value type such as int, double, float, etc. - [DebuggerDisplay("{GetArrayString(false)}")] - // When we cross-compile for frameworks that expose ICloneable this must implement ICloneable as well. - public abstract class Tensor : IList, IList, IReadOnlyList, IStructuralComparable, IStructuralEquatable - { - internal static T Zero - { - get - { - if (typeof(T) == typeof(bool)) - { - return (T)(object)(false); - } - else if (typeof(T) == typeof(byte)) - { - return (T)(object)(byte)(0); - } - else if (typeof(T) == typeof(char)) - { - return (T)(object)(char)(0); - } - else if (typeof(T) == typeof(decimal)) - { - return (T)(object)(decimal)(0); - } - else if (typeof(T) == typeof(double)) - { - return (T)(object)(double)(0); - } - else if (typeof(T) == typeof(float)) - { - return (T)(object)(float)(0); - } - else if (typeof(T) == typeof(int)) - { - return (T)(object)(int)(0); - } - else if (typeof(T) == typeof(long)) - { - return (T)(object)(long)(0); - } - else if (typeof(T) == typeof(sbyte)) - { - return (T)(object)(sbyte)(0); - } - else if (typeof(T) == typeof(short)) - { - return (T)(object)(short)(0); - } - else if (typeof(T) == typeof(uint)) - { - return (T)(object)(uint)(0); - } - else if (typeof(T) == typeof(ulong)) - { - return (T)(object)(ulong)(0); - } - else if (typeof(T) == typeof(ushort)) - { - return (T)(object)(ushort)(0); - } - - throw new NotSupportedException(); - } - } - - internal static T One - { - get - { - if (typeof(T) == typeof(bool)) - { - return (T)(object)(true); - } - else if (typeof(T) == typeof(byte)) - { - return (T)(object)(byte)(1); - } - else if (typeof(T) == typeof(char)) - { - return (T)(object)(char)(1); - } - else if (typeof(T) == typeof(decimal)) - { - return (T)(object)(decimal)(1); - } - else if (typeof(T) == typeof(double)) - { - return (T)(object)(double)(1); - } - else if (typeof(T) == typeof(float)) - { - return (T)(object)(float)(1); - } - else if (typeof(T) == typeof(int)) - { - return (T)(object)(int)(1); - } - else if (typeof(T) == typeof(long)) - { - return (T)(object)(long)(1); - } - else if (typeof(T) == typeof(sbyte)) - { - return (T)(object)(sbyte)(1); - } - else if (typeof(T) == typeof(short)) - { - return (T)(object)(short)(1); - } - else if (typeof(T) == typeof(uint)) - { - return (T)(object)(uint)(1); - } - else if (typeof(T) == typeof(ulong)) - { - return (T)(object)(ulong)(1); - } - else if (typeof(T) == typeof(ushort)) - { - return (T)(object)(ushort)(1); - } - - throw new NotSupportedException(); - } - } - - internal readonly int[] dimensions; - internal readonly int[] strides; - private readonly bool isReversedStride; - - private readonly long length; - - /// - /// Initialize a 1-dimensional tensor of the specified length - /// - /// Size of the 1-dimensional tensor - protected Tensor(int length) - { - dimensions = new[] { length }; - strides = new[] { 1 }; - isReversedStride = false; - this.length = length; - } - - /// - /// Initialize an n-dimensional tensor with the specified dimensions and layout. ReverseStride=true gives a stride of 1-element witdth to the first dimension (0). ReverseStride=false gives a stride of 1-element width to the last dimension (n-1). - /// - /// An span of integers that represent the size of each dimension of the Tensor to create. - /// False (default) to indicate that the first dimension is most major (farthest apart) and the last dimension is most minor (closest together): akin to row-major in a rank-2 tensor. True to indicate that the last dimension is most major (farthest apart) and the first dimension is most minor (closest together): akin to column-major in a rank-2 tensor. - protected Tensor(ReadOnlySpan dimensions, bool reverseStride) - { - if (dimensions.Length == 0) - { - throw new ArgumentException(SR.DimensionsMustContainElements, nameof(dimensions)); - } - - this.dimensions = new int[dimensions.Length]; - long size = 1; - for (int i = 0; i < dimensions.Length; i++) - { - if (dimensions[i] < 1) - { - throw new ArgumentOutOfRangeException(nameof(dimensions), SR.DimensionsMustBePositiveAndNonZero); - } - this.dimensions[i] = dimensions[i]; - size *= dimensions[i]; - } - - strides = ArrayUtilities.GetStrides(dimensions, reverseStride); - isReversedStride = reverseStride; - - length = size; - } - - /// - /// Initializes tensor with same dimensions as array, content of array is ignored. ReverseStride=true gives a stride of 1-element witdth to the first dimension (0). ReverseStride=false gives a stride of 1-element width to the last dimension (n-1). - /// - /// Array from which to derive dimensions. - /// False (default) to indicate that the first dimension is most major (farthest apart) and the last dimension is most minor (closest together): akin to row-major in a rank-2 tensor. True to indicate that the last dimension is most major (farthest apart) and the first dimension is most minor (closest together): akin to column-major in a rank-2 tensor. - protected Tensor(Array fromArray, bool reverseStride) - { - if (fromArray is null) - { - throw new ArgumentNullException(nameof(fromArray)); - } - - if (fromArray.Rank == 0) - { - throw new ArgumentException(SR.ArrayMustContainElements, nameof(fromArray)); - } - - dimensions = new int[fromArray.Rank]; - long size = 1; - for (int i = 0; i < dimensions.Length; i++) - { - dimensions[i] = fromArray.GetLength(i); - size *= dimensions[i]; - } - - strides = ArrayUtilities.GetStrides(dimensions, reverseStride); - isReversedStride = reverseStride; - - length = size; - } - - /// - /// Total length of the Tensor. - /// - public long Length => length; - - /// - /// Rank of the tensor: number of dimensions. - /// - public int Rank => dimensions.Length; - - /// - /// True if strides are reversed (AKA Column-major) - /// - public bool IsReversedStride => isReversedStride; - - /// - /// Returns a readonly view of the dimensions of this tensor. - /// - public ReadOnlySpan Dimensions => dimensions; - - /// - /// Returns a readonly view of the strides of this tensor. - /// - public ReadOnlySpan Strides => strides; - - /// - /// Sets all elements in Tensor to . - /// - /// Value to fill - public virtual void Fill(T value) - { - for (int i = 0; i < Length; i++) - { - SetValue(i, value); - } - } - - /// - /// Creates a shallow copy of this tensor, with new backing storage. - /// - /// A shallow copy of this tensor. - public abstract Tensor Clone(); - - /// - /// Creates a new Tensor with the same layout and dimensions as this tensor with elements initialized to their default value. - /// - /// A new Tensor with the same layout and dimensions as this tensor with elements initialized to their default value. - public virtual Tensor CloneEmpty() - { - return CloneEmpty(dimensions); - } - - /// - /// Creates a new Tensor with the specified dimensions and the same layout as this tensor with elements initialized to their default value. - /// - /// An span of integers that represent the size of each dimension of the DenseTensor to create. - /// A new Tensor with the same layout as this tensor and specified with elements initialized to their default value. - public virtual Tensor CloneEmpty(ReadOnlySpan dimensions) - { - return CloneEmpty(dimensions); - } - - /// - /// Creates a new Tensor of a different type with the same layout and size as this tensor with elements initialized to their default value. - /// - /// Type contained within the new Tensor. Typically a value type such as int, double, float, etc. - /// A new Tensor with the same layout and dimensions as this tensor with elements of type initialized to their default value. - public virtual Tensor CloneEmpty() - { - return CloneEmpty(dimensions); - } - - /// - /// Creates a new Tensor of a different type with the specified dimensions and the same layout as this tensor with elements initialized to their default value. - /// - /// Type contained within the new Tensor. Typically a value type such as int, double, float, etc. - /// An span of integers that represent the size of each dimension of the DenseTensor to create. - /// A new Tensor with the same layout as this tensor of specified with elements of type initialized to their default value. - public abstract Tensor CloneEmpty(ReadOnlySpan dimensions); - - /// - /// Gets the n-1 dimension diagonal from the n dimension tensor. - /// - /// An n-1 dimension tensor with the values from the main diagonal of this tensor. - public Tensor GetDiagonal() - { - return GetDiagonal(0); - } - - /// - /// Gets the n-1 dimension diagonal from the n dimension tensor at the specified offset from center. - /// - /// Offset of diagonal to set in returned tensor. 0 for the main diagonal, less than zero for diagonals below, greater than zero from diagonals above. - /// An n-1 dimension tensor with the values from the specified diagonal of this tensor. - public Tensor GetDiagonal(int offset) - { - // Get diagonal of first two dimensions for all remaining dimensions - - // diagnonal is as follows: - // { 1, 2, 4 } - // { 8, 3, 9 } - // { 0, 7, 5 } - // The diagonal at offset 0 is { 1, 3, 5 } - // The diagonal at offset 1 is { 2, 9 } - // The diagonal at offset -1 is { 8, 7 } - - if (Rank < 2) - { - throw new InvalidOperationException(SR.Format(SR.CannotComputeDiagonal, nameof(Tensor))); - } - - // TODO: allow specification of axis1 and axis2? - var axisLength0 = dimensions[0]; - var axisLength1 = dimensions[1]; - - // the diagonal will be the length of the smaller axis - // if offset it positive, the length will shift along the second axis - // if the offset is negative, the length will shift along the first axis - // In that way the length of the diagonal will be - // Min(offset < 0 ? axisLength0 + offset : axisLength0, offset > 0 ? axisLength1 - offset : axisLength1) - // To illustrate, consider the following - // { 1, 2, 4, 3, 7 } - // { 8, 3, 9, 2, 6 } - // { 0, 7, 5, 2, 9 } - // The diagonal at offset 0 is { 1, 3, 5 }, Min(3, 5) = 3 - // The diagonal at offset 1 is { 2, 9, 2 }, Min(3, 5 - 1) = 3 - // The diagonal at offset 3 is { 3, 6 }, Min(3, 5 - 3) = 2 - // The diagonal at offset -1 is { 8, 7 }, Min(3 - 1, 5) = 2 - var offsetAxisLength0 = offset < 0 ? axisLength0 + offset : axisLength0; - var offsetAxisLength1 = offset > 0 ? axisLength1 - offset : axisLength1; - - var diagonalLength = Math.Min(offsetAxisLength0, offsetAxisLength1); - - if (diagonalLength <= 0) - { - throw new ArgumentException(SR.Format(SR.CannotComputeDiagonalWithOffset, offset), nameof(offset)); - } - - var newTensorRank = Rank - 1; - var newTensorDimensions = newTensorRank < ArrayUtilities.StackallocMax ? stackalloc int[newTensorRank] : new int[newTensorRank]; - newTensorDimensions[0] = diagonalLength; - - for (int i = 2; i < dimensions.Length; i++) - { - newTensorDimensions[i - 1] = dimensions[i]; - } - - var diagonalTensor = CloneEmpty(newTensorDimensions); - var sizePerDiagonal = diagonalTensor.Length / diagonalTensor.Dimensions[0]; - - var diagProjectionStride = diagonalTensor.IsReversedStride && diagonalTensor.Rank > 1 ? diagonalTensor.strides[1] : 1; - var sourceProjectionStride = IsReversedStride && Rank > 2 ? strides[2] : 1; - - for (int diagIndex = 0; diagIndex < diagonalLength; diagIndex++) - { - var sourceIndex0 = offset < 0 ? diagIndex - offset : diagIndex; - var sourceIndex1 = offset > 0 ? diagIndex + offset : diagIndex; - - var sourceBase = sourceIndex0 * strides[0] + sourceIndex1 * strides[1]; - var diagBase = diagIndex * diagonalTensor.strides[0]; - - for (int diagProjectionIndex = 0; diagProjectionIndex < sizePerDiagonal; diagProjectionIndex++) - { - diagonalTensor.SetValue(diagBase + diagProjectionIndex * diagProjectionStride, - GetValue(sourceBase + diagProjectionIndex * sourceProjectionStride)); - } - } - - return diagonalTensor; - } - - /// - /// Gets a tensor representing the elements below and including the diagonal, with the rest of the elements zero-ed. - /// - /// A tensor with the values from this tensor at and below the main diagonal and zeros elsewhere. - public Tensor GetTriangle() - { - return GetTriangle(0, upper: false); - } - - /// - /// Gets a tensor representing the elements below and including the specified diagonal, with the rest of the elements zero-ed. - /// - /// Offset of diagonal to set in returned tensor. 0 for the main diagonal, less than zero for diagonals below, greater than zero from diagonals above. - /// A tensor with the values from this tensor at and below the specified diagonal and zeros elsewhere. - public Tensor GetTriangle(int offset) - { - return GetTriangle(offset, upper: false); - } - - /// - /// Gets a tensor representing the elements above and including the diagonal, with the rest of the elements zero-ed. - /// - /// A tensor with the values from this tensor at and above the main diagonal and zeros elsewhere. - public Tensor GetUpperTriangle() - { - return GetTriangle(0, upper: true); - } - - /// - /// Gets a tensor representing the elements above and including the specified diagonal, with the rest of the elements zero-ed. - /// - /// Offset of diagonal to set in returned tensor. 0 for the main diagonal, less than zero for diagonals below, greater than zero from diagonals above. - /// A tensor with the values from this tensor at and above the specified diagonal and zeros elsewhere. - public Tensor GetUpperTriangle(int offset) - { - return GetTriangle(offset, upper: true); - } - - private Tensor GetTriangle(int offset, bool upper) - { - if (Rank < 2) - { - throw new InvalidOperationException(SR.Format(SR.CannotComputeTriangle, nameof(Tensor))); - } - - // Similar to get diagonal except it gets every element below and including the diagonal. - - // TODO: allow specification of axis1 and axis2? - var axisLength0 = dimensions[0]; - var axisLength1 = dimensions[1]; - var diagonalLength = Math.Max(axisLength0, axisLength1); - - var result = CloneEmpty(); - - var projectionSize = Length / (axisLength0 * axisLength1); - var projectionStride = IsReversedStride && Rank > 2 ? strides[2] : 1; - - for (int diagIndex = 0; diagIndex < diagonalLength; diagIndex++) - { - // starting point for the tri - var triIndex0 = offset > 0 ? diagIndex - offset : diagIndex; - var triIndex1 = offset > 0 ? diagIndex : diagIndex + offset; - - // for lower triangle, iterate index0 keeping same index1 - // for upper triangle, iterate index1 keeping same index0 - - if (triIndex0 < 0) - { - if (upper) - { - // out of bounds, ignore this diagIndex. - continue; - } - else - { - // set index to 0 so that we can iterate on the remaining index0 values. - triIndex0 = 0; - } - } - - if (triIndex1 < 0) - { - if (upper) - { - // set index to 0 so that we can iterate on the remaining index1 values. - triIndex1 = 0; - } - else - { - // out of bounds, ignore this diagIndex. - continue; - } - } - - while ((triIndex1 < axisLength1) && (triIndex0 < axisLength0)) - { - var baseIndex = triIndex0 * strides[0] + triIndex1 * result.strides[1]; - - for (int projectionIndex = 0; projectionIndex < projectionSize; projectionIndex++) - { - var index = baseIndex + projectionIndex * projectionStride; - - result.SetValue(index, GetValue(index)); - } - - if (upper) - { - triIndex1++; - } - else - { - triIndex0++; - } - } - } - - return result; - } - - /// - /// Reshapes the current tensor to new dimensions, using the same backing storage if possible. - /// - /// An span of integers that represent the size of each dimension of the Tensor to create. - /// A new tensor that reinterprets this tensor with different dimensions. - public abstract Tensor Reshape(ReadOnlySpan dimensions); - - /// - /// Obtains the value at the specified indices - /// - /// A one-dimensional array of integers that represent the indices specifying the position of the element to get. - /// The value at the specified position in this Tensor. - public virtual T this[params int[] indices] - { - get - { - if (indices is null) - { - throw new ArgumentNullException(nameof(indices)); - } - - var span = new ReadOnlySpan(indices); - return this[span]; - } - - set - { - if (indices is null) - { - throw new ArgumentNullException(nameof(indices)); - } - - var span = new ReadOnlySpan(indices); - this[span] = value; - } - } - - /// - /// Obtains the value at the specified indices - /// - /// A span integers that represent the indices specifying the position of the element to get. - /// The value at the specified position in this Tensor. - public virtual T this[ReadOnlySpan indices] - { - get - { - return GetValue(ArrayUtilities.GetIndex(strides, indices)); - } - - set - { - SetValue(ArrayUtilities.GetIndex(strides, indices), value); - } - } - - /// - /// Gets the value at the specified index, where index is a linearized version of n-dimension indices using strides. - /// - /// An integer index computed as a dot-product of indices. - /// The value at the specified position in this Tensor. - public abstract T GetValue(int index); - - /// - /// Sets the value at the specified index, where index is a linearized version of n-dimension indices using strides. - /// - /// An integer index computed as a dot-product of indices. - /// The new value to set at the specified position in this Tensor. - public abstract void SetValue(int index, T value); - - /// - /// The type that implements enumerators for instances. - /// - public struct Enumerator : IEnumerator - { - private readonly Tensor _tensor; - private int _index; - - internal Enumerator(Tensor tensor) - { - Debug.Assert(tensor != null); - - _tensor = tensor; - _index = 0; - Current = default!; - } - - public T Current { get; private set; } - - object? IEnumerator.Current => Current; - - public bool MoveNext() - { - if (_index < _tensor.Length) - { - Current = _tensor.GetValue(_index); - ++_index; - return true; - } - else - { - Current = default!; - return false; - } - } - - /// - /// Resets the enumerator to the beginning. - /// - public void Reset() - { - _index = 0; - Current = default!; - } - - /// - /// Disposes the enumerator. - /// - public void Dispose() { } - } - - /// - /// Gets an enumerator that enumerates the elements of the . - /// - /// An enumerator for the current . - public Enumerator GetEnumerator() => new Enumerator(this); - - #region statics - /// - /// Performs a value comparison of the content and shape of two tensors. Two tensors are equal if they have the same shape and same value at every set of indices. If not equal a tensor is greater or less than another tensor based on the first non-equal element when enumerating in linear order. - /// - /// - /// - /// - public static int Compare(Tensor left, Tensor right) - { - return StructuralComparisons.StructuralComparer.Compare(left, right); - } - - /// - /// Performs a value equality comparison of the content of two tensors. Two tensors are equal if they have the same shape and same value at every set of indices. - /// - /// - /// - /// - public static bool Equals(Tensor left, Tensor right) - { - return StructuralComparisons.StructuralEqualityComparer.Equals(left, right); - } - #endregion - - #region IEnumerable members - IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); - #endregion - - #region ICollection members - int ICollection.Count => (int)Length; - - bool ICollection.IsSynchronized => false; - - object ICollection.SyncRoot => this; // backingArray.this? - - void ICollection.CopyTo(Array array, int index) - { - if (array is T[] destinationArray) - { - CopyTo(destinationArray, index); - } - else - { - if (array == null) - { - throw new ArgumentNullException(nameof(array)); - } - if (array.Rank != 1) - { - throw new ArgumentException(SR.OnlySingleDimensionalArraysSupported, nameof(array)); - } - if (array.Length < index + Length) - { - throw new ArgumentException(SR.NumberGreaterThenAvailableSpace, nameof(array)); - } - - for (int i = 0; i < length; i++) - { - array.SetValue(GetValue(i), index + i); - } - } - } - #endregion - - #region IList members - object? IList.this[int index] - { - get - { - return GetValue(index); - } - set - { - try - { - SetValue(index, (T)value!); - } - catch (InvalidCastException) - { - throw new ArgumentException(SR.Format(SR.ValueIsNotOfType, value, typeof(T))); - } - } - } - - public bool IsFixedSize => true; - - public bool IsReadOnly => false; - - int IList.Add(object? value) - { - throw new InvalidOperationException(); - } - - void IList.Clear() - { - Fill(default!); - } - - bool IList.Contains(object? value) - { - if (IsCompatibleObject(value!)) - { - return Contains((T)value!); - } - return false; - } - - int IList.IndexOf(object? value) - { - if (IsCompatibleObject(value!)) - { - return IndexOf((T)value!); - } - return -1; - } - - void IList.Insert(int index, object? value) - { - throw new InvalidOperationException(); - } - - void IList.Remove(object? value) - { - throw new InvalidOperationException(); - } - - void IList.RemoveAt(int index) - { - throw new InvalidOperationException(); - } - #endregion - - #region IEnumerable members - IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); - #endregion - - #region ICollection members - int ICollection.Count => (int)Length; - - void ICollection.Add(T item) - { - throw new InvalidOperationException(); - } - - void ICollection.Clear() - { - Fill(default!); - } - - bool ICollection.Contains(T item) - { - return Contains(item); - } - - /// - /// Determines whether an element is in the Tensor<T>. - /// - /// - /// The object to locate in the Tensor<T>. The value can be null for reference types. - /// - /// - /// true if item is found in the Tensor<T>; otherwise, false. - /// - protected virtual bool Contains(T item) - { - return Length != 0 && IndexOf(item) != -1; - } - - void ICollection.CopyTo(T[] array, int arrayIndex) - { - CopyTo(array, arrayIndex); - } - - /// - /// Copies the elements of the Tensor<T> to an Array, starting at a particular Array index. - /// - /// - /// The one-dimensional Array that is the destination of the elements copied from Tensor<T>. The Array must have zero-based indexing. - /// - /// - /// The zero-based index in array at which copying begins. - /// - protected virtual void CopyTo(T[] array, int arrayIndex) - { - if (array is null) - { - throw new ArgumentNullException(nameof(array)); - } - - if (array.Length < arrayIndex + Length) - { - throw new ArgumentException(SR.NumberGreaterThenAvailableSpace, nameof(array)); - } - - for (int i = 0; i < length; i++) - { - array[arrayIndex + i] = GetValue(i); - } - } - - bool ICollection.Remove(T item) - { - throw new InvalidOperationException(); - } - #endregion - - #region IReadOnlyCollection members - - int IReadOnlyCollection.Count => (int)Length; - - #endregion - - #region IList members - T IList.this[int index] - { - get { return GetValue(index); } - set { SetValue(index, value); } - } - - int IList.IndexOf(T item) - { - return IndexOf(item); - } - - /// - /// Determines the index of a specific item in the Tensor<T>. - /// - /// The object to locate in the Tensor<T>. - /// The index of item if found in the tensor; otherwise, -1. - protected virtual int IndexOf(T item) - { - for (int i = 0; i < Length; i++) - { - if (GetValue(i)!.Equals(item)) - { - return i; - } - } - - return -1; - } - - void IList.Insert(int index, T item) - { - throw new InvalidOperationException(); - } - - void IList.RemoveAt(int index) - { - throw new InvalidOperationException(); - } - #endregion - - #region IReadOnlyList members - - T IReadOnlyList.this[int index] => GetValue(index); - - #endregion - - #region IStructuralComparable members - int IStructuralComparable.CompareTo(object? other, IComparer comparer) - { - if (other == null) - { - return 1; - } - - if (other is Tensor) - { - return CompareTo((Tensor)other, comparer); - } - - var otherArray = other as Array; - - if (otherArray != null) - { - return CompareTo(otherArray, comparer); - } - - throw new ArgumentException(SR.Format(SR.CannotCompare, nameof(Tensor), other.GetType()), nameof(other)); - } - - private int CompareTo(Tensor other, IComparer comparer) - { - if (Rank != other.Rank) - { - throw new ArgumentException(SR.Format(SR.CannotCompareWithRank, nameof(Tensor), Rank, nameof(other), other.Rank), nameof(other)); - } - - for (int i = 0; i < dimensions.Length; i++) - { - if (dimensions[i] != other.dimensions[i]) - { - throw new ArgumentException(SR.Format(SR.CannotCompareWithDifferentDimension, nameof(Tensor), i, dimensions[i], other.dimensions[i]), nameof(other)); - } - } - - int result = 0; - - if (IsReversedStride == other.IsReversedStride) - { - for (int i = 0; i < Length; i++) - { - result = comparer.Compare(GetValue(i), other.GetValue(i)); - if (result != 0) - { - break; - } - } - } - else - { - var indices = Rank < ArrayUtilities.StackallocMax ? stackalloc int[Rank] : new int[Rank]; - for (int i = 0; i < Length; i++) - { - ArrayUtilities.GetIndices(strides, IsReversedStride, i, indices); - result = comparer.Compare(this[indices], other[indices]); - if (result != 0) - { - break; - } - } - } - - return result; - } - - private int CompareTo(Array other, IComparer comparer) - { - if (Rank != other.Rank) - { - throw new ArgumentException(SR.Format(SR.CannotCompareWithRank, nameof(Tensor), Rank, nameof(Array), other.Rank), nameof(other)); - } - - for (int i = 0; i < dimensions.Length; i++) - { - var otherDimension = other.GetLength(i); - if (dimensions[i] != otherDimension) - { - throw new ArgumentException(SR.Format(SR.CannotCompareToWithDifferentDimension, nameof(Tensor), nameof(Array), i, dimensions[i], otherDimension), nameof(other)); - } - } - - int result = 0; - var indices = new int[Rank]; - for (int i = 0; i < Length; i++) - { - ArrayUtilities.GetIndices(strides, IsReversedStride, i, indices); - - result = comparer.Compare(GetValue(i), other.GetValue(indices)); - - if (result != 0) - { - break; - } - } - - return result; - } - #endregion - - #region IStructuralEquatable members - bool IStructuralEquatable.Equals(object? other, IEqualityComparer comparer) - { - if (other == null) - { - return false; - } - - if (other is Tensor) - { - return Equals((Tensor)other, comparer); - } - - var otherArray = other as Array; - - if (otherArray != null) - { - return Equals(otherArray, comparer); - } - - throw new ArgumentException(SR.Format(SR.CannotCompare, nameof(Tensor), other.GetType()), nameof(other)); - } - - private bool Equals(Tensor other, IEqualityComparer comparer) - { - if (Rank != other.Rank) - { - throw new ArgumentException(SR.Format(SR.CannotCompareWithRank, nameof(Tensor), Rank, nameof(other), other.Rank), nameof(other)); - } - - for (int i = 0; i < dimensions.Length; i++) - { - if (dimensions[i] != other.dimensions[i]) - { - throw new ArgumentException(SR.Format(SR.CannotCompareWithDifferentDimension, nameof(Tensor), i, dimensions[i], other.dimensions[i]), nameof(other)); - } - } - - if (IsReversedStride == other.IsReversedStride) - { - for (int i = 0; i < Length; i++) - { - if (!comparer.Equals(GetValue(i), other.GetValue(i))) - { - return false; - } - } - } - else - { - var indices = Rank < ArrayUtilities.StackallocMax ? stackalloc int[Rank] : new int[Rank]; - for (int i = 0; i < Length; i++) - { - ArrayUtilities.GetIndices(strides, IsReversedStride, i, indices); - - if (!comparer.Equals(this[indices], other[indices])) - { - return false; - } - } - } - - return true; - } - - private bool Equals(Array other, IEqualityComparer comparer) - { - if (Rank != other.Rank) - { - throw new ArgumentException(SR.Format(SR.CannotCompareWithRank, nameof(Tensor), Rank, nameof(Array), other.Rank), nameof(other)); - } - - for (int i = 0; i < dimensions.Length; i++) - { - var otherDimension = other.GetLength(i); - if (dimensions[i] != otherDimension) - { - throw new ArgumentException(SR.Format(SR.CannotCompareToWithDifferentDimension, nameof(Tensor), nameof(Array), i, dimensions[i], otherDimension), nameof(other)); - } - } - - var indices = new int[Rank]; - for (int i = 0; i < Length; i++) - { - ArrayUtilities.GetIndices(strides, IsReversedStride, i, indices); - - if (!comparer.Equals(GetValue(i), other.GetValue(indices))) - { - return false; - } - } - - return true; - } - int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) - { - int hashCode = 0; - // this ignores shape, which is fine it just means we'll have hash collisions for things - // with the same content and different shape. - for (int i = 0; i < Length; i++) - { - hashCode ^= comparer.GetHashCode(GetValue(i)!); - } - - return hashCode; - } - #endregion - - #region Translations - - /// - /// Creates a copy of this tensor as a DenseTensor<T>. If this tensor is already a DenseTensor<T> calling this method is equivalent to calling Clone(). - /// - /// - public virtual DenseTensor ToDenseTensor() - { - var denseTensor = new DenseTensor(Dimensions, IsReversedStride); - for (int i = 0; i < Length; i++) - { - denseTensor.SetValue(i, GetValue(i)); - } - return denseTensor; - } - - - /// - /// Creates a copy of this tensor as a SparseTensor<T>. If this tensor is already a SparseTensor<T> calling this method is equivalent to calling Clone(). - /// - /// - public virtual SparseTensor ToSparseTensor() - { - var sparseTensor = new SparseTensor(Dimensions, IsReversedStride); - for (int i = 0; i < Length; i++) - { - sparseTensor.SetValue(i, GetValue(i)); - } - return sparseTensor; - } - - /// - /// Creates a copy of this tensor as a CompressedSparseTensor<T>. If this tensor is already a CompressedSparseTensor<T> calling this method is equivalent to calling Clone(). - /// - /// - public virtual CompressedSparseTensor ToCompressedSparseTensor() - { - var compressedSparseTensor = new CompressedSparseTensor(Dimensions, IsReversedStride); - for (int i = 0; i < Length; i++) - { - compressedSparseTensor.SetValue(i, GetValue(i)); - } - return compressedSparseTensor; - } - - #endregion - - public string GetArrayString(bool includeWhitespace = true) - { - var builder = new StringBuilder(); - - var strides = ArrayUtilities.GetStrides(dimensions); - var indices = new int[Rank]; - var innerDimension = Rank - 1; - var innerLength = dimensions[innerDimension]; - - int indent = 0; - for (int outerIndex = 0; outerIndex < Length; outerIndex += innerLength) - { - ArrayUtilities.GetIndices(strides, false, outerIndex, indices); - - while ((indent < innerDimension) && (indices[indent] == 0)) - { - // start up - if (includeWhitespace) - { - Indent(builder, indent); - } - indent++; - builder.Append('{'); - if (includeWhitespace) - { - builder.AppendLine(); - } - } - - for (int innerIndex = 0; innerIndex < innerLength; innerIndex++) - { - indices[innerDimension] = innerIndex; - - if ((innerIndex == 0)) - { - if (includeWhitespace) - { - Indent(builder, indent); - } - builder.Append('{'); - } - else - { - builder.Append(','); - } - builder.Append(this[indices]); - } - builder.Append('}'); - - for (int i = Rank - 2; i >= 0; i--) - { - var lastIndex = dimensions[i] - 1; - if (indices[i] == lastIndex) - { - // close out - --indent; - if (includeWhitespace) - { - builder.AppendLine(); - Indent(builder, indent); - } - builder.Append('}'); - } - else - { - builder.Append(','); - if (includeWhitespace) - { - builder.AppendLine(); - } - break; - } - } - } - - return builder.ToString(); - } - - private static void Indent(StringBuilder builder, int tabs, int spacesPerTab = 4) - { - for (int tab = 0; tab < tabs; tab++) - { - for (int space = 0; space < spacesPerTab; space++) - { - builder.Append(' '); - } - } - } - - private static bool IsCompatibleObject(object value) - { - // Non-null values are fine. Only accept nulls if T is a class or Nullable. - // Note that default(T) is not equal to null for value types except when T is Nullable. - return ((value is T) || (value == null && default(T) == null)); - } - } -} diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/TensorPrimitives.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/TensorPrimitives.cs new file mode 100644 index 00000000000000..d28d4bacafdb8e --- /dev/null +++ b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/TensorPrimitives.cs @@ -0,0 +1,953 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +namespace System.Numerics.Tensors +{ + /// Performs primitive tensor operations over spans of memory. + public static partial class TensorPrimitives + { + /// Computes the element-wise result of: + . + /// The first tensor, represented as a span. + /// The second tensor, represented as a span. + /// The destination tensor, represented as a span. + /// Length of '' must be same as length of ''. + /// Destination is too short. + /// This method effectively does [i] = [i] + [i]. + public static unsafe void Add(ReadOnlySpan x, ReadOnlySpan y, Span destination) => + InvokeSpanSpanIntoSpan(x, y, destination); + + /// Computes the element-wise result of: + . + /// The first tensor, represented as a span. + /// The second tensor, represented as a scalar. + /// The destination tensor, represented as a span. + /// Destination is too short. + /// This method effectively does [i] = [i] + . + public static void Add(ReadOnlySpan x, float y, Span destination) => + InvokeSpanScalarIntoSpan(x, y, destination); + + /// Computes the element-wise result of: - . + /// The first tensor, represented as a span. + /// The second tensor, represented as a scalar. + /// The destination tensor, represented as a span. + /// Length of '' must be same as length of ''. + /// Destination is too short. + /// This method effectively does [i] = [i] - [i]. + public static void Subtract(ReadOnlySpan x, ReadOnlySpan y, Span destination) => + InvokeSpanSpanIntoSpan(x, y, destination); + + /// Computes the element-wise result of: - . + /// The first tensor, represented as a span. + /// The second tensor, represented as a scalar. + /// The destination tensor, represented as a span. + /// Destination is too short. + /// This method effectively does [i] = [i] - . + public static void Subtract(ReadOnlySpan x, float y, Span destination) => + InvokeSpanScalarIntoSpan(x, y, destination); + + /// Computes the element-wise result of: * . + /// The first tensor, represented as a span. + /// The second tensor, represented as a span. + /// The destination tensor, represented as a span. + /// Length of '' must be same as length of ''. + /// Destination is too short. + /// This method effectively does [i] = [i] * . + public static void Multiply(ReadOnlySpan x, ReadOnlySpan y, Span destination) => + InvokeSpanSpanIntoSpan(x, y, destination); + + /// Computes the element-wise result of: * . + /// The first tensor, represented as a span. + /// The second tensor, represented as a scalar. + /// The destination tensor, represented as a span. + /// Destination is too short. + /// + /// This method effectively does [i] = [i] * . + /// This method corresponds to the scal method defined by BLAS1. + /// + public static void Multiply(ReadOnlySpan x, float y, Span destination) => + InvokeSpanScalarIntoSpan(x, y, destination); + + /// Computes the element-wise result of: / . + /// The first tensor, represented as a span. + /// The second tensor, represented as a span. + /// The destination tensor, represented as a span. + /// Length of '' must be same as length of ''. + /// Destination is too short. + /// This method effectively does [i] = [i] / . + public static void Divide(ReadOnlySpan x, ReadOnlySpan y, Span destination) => + InvokeSpanSpanIntoSpan(x, y, destination); + + /// Computes the element-wise result of: / . + /// The first tensor, represented as a span. + /// The second tensor, represented as a scalar. + /// The destination tensor, represented as a span. + /// Destination is too short. + /// This method effectively does [i] = [i] / . + public static void Divide(ReadOnlySpan x, float y, Span destination) => + InvokeSpanScalarIntoSpan(x, y, destination); + + /// Computes the element-wise result of: -. + /// The tensor, represented as a span. + /// The destination tensor, represented as a span. + /// Destination is too short. + /// This method effectively does [i] = -[i]. + public static void Negate(ReadOnlySpan x, Span destination) => + InvokeSpanIntoSpan(x, destination); + + /// Computes the element-wise result of: MathF.Abs(). + /// The tensor, represented as a span. + /// The destination tensor, represented as a span. + /// Destination is too short. + /// This method effectively does [i] = MathF.Abs([i]). + public static void Abs(ReadOnlySpan x, Span destination) => + InvokeSpanIntoSpan(x, destination); + + /// Computes the element-wise result of: ( + ) * . + /// The first tensor, represented as a span. + /// The second tensor, represented as a span. + /// The third tensor, represented as a span. + /// The destination tensor, represented as a span. + /// Length of '' must be same as length of ''. + /// Length of '' must be same as length of ''. + /// Destination is too short. + /// This method effectively does [i] = ([i] + [i]) * [i]. + public static void AddMultiply(ReadOnlySpan x, ReadOnlySpan y, ReadOnlySpan multiplier, Span destination) => + InvokeSpanSpanSpanIntoSpan(x, y, multiplier, destination); + + /// Computes the element-wise result of: ( + ) * . + /// The first tensor, represented as a span. + /// The second tensor, represented as a span. + /// The third tensor, represented as a scalar. + /// The destination tensor, represented as a span. + /// Length of '' must be same as length of ''. + /// Destination is too short. + /// This method effectively does [i] = ([i] + [i]) * . + public static void AddMultiply(ReadOnlySpan x, ReadOnlySpan y, float multiplier, Span destination) => + InvokeSpanSpanScalarIntoSpan(x, y, multiplier, destination); + + /// Computes the element-wise result of: ( + ) * . + /// The first tensor, represented as a span. + /// The second tensor, represented as a scalar. + /// The third tensor, represented as a span. + /// The destination tensor, represented as a span. + /// Length of '' must be same as length of ''. + /// Destination is too short. + /// This method effectively does [i] = ([i] + ) * [i]. + public static void AddMultiply(ReadOnlySpan x, float y, ReadOnlySpan multiplier, Span destination) => + InvokeSpanScalarSpanIntoSpan(x, y, multiplier, destination); + + /// Computes the element-wise result of: ( * ) + . + /// The first tensor, represented as a span. + /// The second tensor, represented as a span. + /// The third tensor, represented as a span. + /// The destination tensor, represented as a span. + /// Length of '' must be same as length of ''. + /// Length of '' must be same as length of ''. + /// Destination is too short. + /// This method effectively does [i] = ([i] * [i]) + [i]. + public static void MultiplyAdd(ReadOnlySpan x, ReadOnlySpan y, ReadOnlySpan addend, Span destination) => + InvokeSpanSpanSpanIntoSpan(x, y, addend, destination); + + /// Computes the element-wise result of: ( * ) + . + /// The first tensor, represented as a span. + /// The second tensor, represented as a span. + /// The third tensor, represented as a span. + /// The destination tensor, represented as a span. + /// Length of '' must be same as length of ''. + /// Destination is too short. + /// + /// This method effectively does [i] = ([i] * [i]) + . + /// This method corresponds to the axpy method defined by BLAS1. + /// + public static void MultiplyAdd(ReadOnlySpan x, ReadOnlySpan y, float addend, Span destination) => + InvokeSpanSpanScalarIntoSpan(x, y, addend, destination); + + /// Computes the element-wise result of: ( * ) + . + /// The first tensor, represented as a span. + /// The second tensor, represented as a span. + /// The third tensor, represented as a span. + /// The destination tensor, represented as a span. + /// Length of '' must be same as length of ''. + /// Destination is too short. + /// This method effectively does [i] = ([i] * ) + [i]. + public static void MultiplyAdd(ReadOnlySpan x, float y, ReadOnlySpan addend, Span destination) => + InvokeSpanScalarSpanIntoSpan(x, y, addend, destination); + + /// Computes the element-wise result of: pow(e, ). + /// The tensor, represented as a span. + /// The destination tensor, represented as a span. + /// Destination is too short. + /// This method effectively does [i] = .Exp([i]). + public static void Exp(ReadOnlySpan x, Span destination) + { + if (x.Length > destination.Length) + { + ThrowHelper.ThrowArgument_DestinationTooShort(); + } + + for (int i = 0; i < x.Length; i++) + { + destination[i] = MathF.Exp(x[i]); + } + } + + /// Computes the element-wise result of: ln(). + /// The tensor, represented as a span. + /// The destination tensor, represented as a span. + /// Destination is too short. + /// This method effectively does [i] = .Log([i]). + public static void Log(ReadOnlySpan x, Span destination) + { + if (x.Length > destination.Length) + { + ThrowHelper.ThrowArgument_DestinationTooShort(); + } + + for (int i = 0; i < x.Length; i++) + { + destination[i] = MathF.Log(x[i]); + } + } + + /// Computes the element-wise result of: log2(). + /// The tensor, represented as a span. + /// The destination tensor, represented as a span. + /// Destination is too short. + /// This method effectively does [i] = .Log2([i]). + public static void Log2(ReadOnlySpan x, Span destination) + { + if (x.Length > destination.Length) + { + ThrowHelper.ThrowArgument_DestinationTooShort(); + } + + for (int i = 0; i < x.Length; i++) + { + destination[i] = Log2(x[i]); + } + } + + /// Computes the element-wise result of: cosh(). + /// The tensor, represented as a span. + /// The destination tensor, represented as a span. + /// Destination is too short. + /// This method effectively does [i] = .Cosh([i]). + public static void Cosh(ReadOnlySpan x, Span destination) + { + if (x.Length > destination.Length) + { + ThrowHelper.ThrowArgument_DestinationTooShort(); + } + + for (int i = 0; i < x.Length; i++) + { + destination[i] = MathF.Cosh(x[i]); + } + } + + /// Computes the element-wise result of: sinh(). + /// The tensor, represented as a span. + /// The destination tensor, represented as a span. + /// Destination is too short. + /// This method effectively does [i] = .Sinh([i]). + public static void Sinh(ReadOnlySpan x, Span destination) + { + if (x.Length > destination.Length) + { + ThrowHelper.ThrowArgument_DestinationTooShort(); + } + + for (int i = 0; i < x.Length; i++) + { + destination[i] = MathF.Sinh(x[i]); + } + } + + /// Computes the element-wise result of: tanh(). + /// The tensor, represented as a span. + /// The destination tensor, represented as a span. + /// Destination is too short. + /// This method effectively does [i] = .Tanh([i]). + public static void Tanh(ReadOnlySpan x, Span destination) + { + if (x.Length > destination.Length) + { + ThrowHelper.ThrowArgument_DestinationTooShort(); + } + + for (int i = 0; i < x.Length; i++) + { + destination[i] = MathF.Tanh(x[i]); + } + } + + /// Computes the cosine similarity between two non-zero vectors. + /// The first tensor, represented as a span. + /// The second tensor, represented as a span. + /// The cosine similarity between the two vectors. + /// Length of '' must be same as length of ''. + /// '' and '' must not be empty. + public static float CosineSimilarity(ReadOnlySpan x, ReadOnlySpan y) + { + if (x.IsEmpty) + { + ThrowHelper.ThrowArgument_SpansMustBeNonEmpty(); + } + if (x.Length != y.Length) + { + ThrowHelper.ThrowArgument_SpansMustHaveSameLength(); + } + + return CosineSimilarityCore(x, y); + } + + /// + /// Compute the distance between two points in Euclidean space. + /// + /// The first tensor, represented as a span. + /// The second tensor, represented as a span. + /// The Euclidean distance. + /// Length of '' must be same as length of ''. + /// '' and '' must not be empty. + public static float Distance(ReadOnlySpan x, ReadOnlySpan y) + { + if (x.IsEmpty) + { + ThrowHelper.ThrowArgument_SpansMustBeNonEmpty(); + } + if (x.Length != y.Length) + { + ThrowHelper.ThrowArgument_SpansMustHaveSameLength(); + } + + return MathF.Sqrt(Aggregate(0f, x, y)); + } + + /// + /// A mathematical operation that takes two vectors and returns a scalar. + /// + /// The first tensor, represented as a span. + /// The second tensor, represented as a span. + /// The dot product. + /// Length of '' must be same as length of ''. + public static float Dot(ReadOnlySpan x, ReadOnlySpan y) // BLAS1: dot + { + if (x.Length != y.Length) + { + ThrowHelper.ThrowArgument_SpansMustHaveSameLength(); + } + + return Aggregate(0f, x, y); + } + + /// + /// A mathematical operation that takes a vector and returns the L2 norm. + /// + /// The first tensor, represented as a span. + /// The L2 norm. + public static float Norm(ReadOnlySpan x) // BLAS1: nrm2 + { + return MathF.Sqrt(Aggregate(0f, x)); + } + + /// + /// A function that takes a collection of real numbers and returns a probability distribution. + /// + /// The first tensor, represented as a span. + /// The destination tensor. + /// Destination is too short. + /// '' must not be empty. + public static void SoftMax(ReadOnlySpan x, Span destination) + { + if (x.IsEmpty) + { + ThrowHelper.ThrowArgument_SpansMustBeNonEmpty(); + } + if (x.Length > destination.Length) + { + ThrowHelper.ThrowArgument_DestinationTooShort(); + } + + float expSum = 0f; + + for (int i = 0; i < x.Length; i++) + { + expSum += MathF.Exp(x[i]); + } + + for (int i = 0; i < x.Length; i++) + { + destination[i] = MathF.Exp(x[i]) / expSum; + } + } + + /// + /// A function that takes a real number and returns a value between 0 and 1. + /// + /// The first tensor, represented as a span. + /// The destination tensor. + /// Destination is too short. + /// '' must not be empty. + public static void Sigmoid(ReadOnlySpan x, Span destination) + { + if (x.IsEmpty) + { + ThrowHelper.ThrowArgument_SpansMustBeNonEmpty(); + } + if (x.Length > destination.Length) + { + ThrowHelper.ThrowArgument_DestinationTooShort(); + } + + for (int i = 0; i < x.Length; i++) + { + destination[i] = 1f / (1 + MathF.Exp(-x[i])); + } + } + + /// Computes the maximum element in . + /// The tensor, represented as a span. + /// The maximum element in . + /// Length of '' must be greater than zero. + public static float Max(ReadOnlySpan x) + { + if (x.IsEmpty) + { + ThrowHelper.ThrowArgument_SpansMustBeNonEmpty(); + } + + float result = float.NegativeInfinity; + + for (int i = 0; i < x.Length; i++) + { + // This matches the IEEE 754:2019 `maximum` function. + // It propagates NaN inputs back to the caller and + // otherwise returns the greater of the inputs. + // It treats +0 as greater than -0 as per the specification. + + float current = x[i]; + + if (current != result) + { + if (float.IsNaN(current)) + { + return current; + } + + if (result < current) + { + result = current; + } + } + else if (IsNegative(result)) + { + result = current; + } + } + + return result; + } + + /// Computes the element-wise result of: MathF.Max(, ). + /// The first tensor, represented as a span. + /// The second tensor, represented as a span. + /// The destination tensor, represented as a span. + /// Length of '' must be same as length of ''. + /// Destination is too short. + /// This method effectively does [i] = MathF.Max([i], [i]). + public static void Max(ReadOnlySpan x, ReadOnlySpan y, Span destination) + { + if (x.Length != y.Length) + { + ThrowHelper.ThrowArgument_SpansMustHaveSameLength(); + } + + if (x.Length > destination.Length) + { + ThrowHelper.ThrowArgument_DestinationTooShort(); + } + + for (int i = 0; i < x.Length; i++) + { + destination[i] = MathF.Max(x[i], y[i]); + } + } + + /// Computes the minimum element in . + /// The tensor, represented as a span. + /// The minimum element in . + /// Length of '' must be greater than zero. + public static float Min(ReadOnlySpan x) + { + if (x.IsEmpty) + { + ThrowHelper.ThrowArgument_SpansMustBeNonEmpty(); + } + + float result = float.PositiveInfinity; + + for (int i = 0; i < x.Length; i++) + { + // This matches the IEEE 754:2019 `minimum` function + // It propagates NaN inputs back to the caller and + // otherwise returns the lesser of the inputs. + // It treats +0 as greater than -0 as per the specification. + + float current = x[i]; + + if (current != result) + { + if (float.IsNaN(current)) + { + return current; + } + + if (current < result) + { + result = current; + } + } + else if (IsNegative(current)) + { + result = current; + } + } + + return result; + } + + /// Computes the element-wise result of: MathF.Min(, ). + /// The first tensor, represented as a span. + /// The second tensor, represented as a span. + /// The destination tensor, represented as a span. + /// Length of '' must be same as length of ''. + /// Destination is too short. + /// This method effectively does [i] = MathF.Min([i], [i]). + public static void Min(ReadOnlySpan x, ReadOnlySpan y, Span destination) + { + if (x.Length != y.Length) + { + ThrowHelper.ThrowArgument_SpansMustHaveSameLength(); + } + + if (x.Length > destination.Length) + { + ThrowHelper.ThrowArgument_DestinationTooShort(); + } + + for (int i = 0; i < x.Length; i++) + { + destination[i] = MathF.Min(x[i], y[i]); + } + } + + /// Computes the maximum magnitude of any element in . + /// The tensor, represented as a span. + /// The maximum magnitude of any element in . + /// Length of '' must be greater than zero. + public static float MaxMagnitude(ReadOnlySpan x) + { + if (x.IsEmpty) + { + ThrowHelper.ThrowArgument_SpansMustBeNonEmpty(); + } + + float result = float.NegativeInfinity; + float resultMag = float.NegativeInfinity; + + for (int i = 0; i < x.Length; i++) + { + // This matches the IEEE 754:2019 `maximumMagnitude` function. + // It propagates NaN inputs back to the caller and + // otherwise returns the input with a greater magnitude. + // It treats +0 as greater than -0 as per the specification. + + float current = x[i]; + float currentMag = Math.Abs(current); + + if (currentMag != resultMag) + { + if (float.IsNaN(currentMag)) + { + return currentMag; + } + + if (resultMag < currentMag) + { + result = current; + resultMag = currentMag; + } + } + else if (IsNegative(result)) + { + result = current; + resultMag = currentMag; + } + } + + return result; + } + + /// Computes the element-wise result of: MathF.MaxMagnitude(, ). + /// The first tensor, represented as a span. + /// The second tensor, represented as a span. + /// The destination tensor, represented as a span. + /// Length of '' must be same as length of ''. + /// Destination is too short. + /// This method effectively does [i] = MathF.MaxMagnitude([i], [i]). + public static void MaxMagnitude(ReadOnlySpan x, ReadOnlySpan y, Span destination) + { + if (x.Length != y.Length) + { + ThrowHelper.ThrowArgument_SpansMustHaveSameLength(); + } + + if (x.Length > destination.Length) + { + ThrowHelper.ThrowArgument_DestinationTooShort(); + } + + for (int i = 0; i < x.Length; i++) + { + destination[i] = MaxMagnitude(x[i], y[i]); + } + } + + /// Computes the minimum magnitude of any element in . + /// The tensor, represented as a span. + /// The minimum magnitude of any element in . + /// Length of '' must be greater than zero. + public static float MinMagnitude(ReadOnlySpan x) + { + if (x.IsEmpty) + { + ThrowHelper.ThrowArgument_SpansMustBeNonEmpty(); + } + + float result = float.PositiveInfinity; + float resultMag = float.PositiveInfinity; + + for (int i = 0; i < x.Length; i++) + { + // This matches the IEEE 754:2019 `minimumMagnitude` function. + // It propagates NaN inputs back to the caller and + // otherwise returns the input with a lesser magnitude. + // It treats +0 as greater than -0 as per the specification. + + float current = x[i]; + float currentMag = Math.Abs(current); + + if (currentMag != resultMag) + { + if (float.IsNaN(currentMag)) + { + return currentMag; + } + + if (currentMag < resultMag) + { + result = current; + resultMag = currentMag; + } + } + else if (IsNegative(current)) + { + result = current; + resultMag = currentMag; + } + } + + return result; + } + + /// Computes the element-wise result of: MathF.MinMagnitude(, ). + /// The first tensor, represented as a span. + /// The second tensor, represented as a span. + /// The destination tensor, represented as a span. + /// Length of '' must be same as length of ''. + /// Destination is too short. + /// This method effectively does [i] = MathF.MinMagnitude([i], [i]). + public static void MinMagnitude(ReadOnlySpan x, ReadOnlySpan y, Span destination) + { + if (x.Length != y.Length) + { + ThrowHelper.ThrowArgument_SpansMustHaveSameLength(); + } + + if (x.Length > destination.Length) + { + ThrowHelper.ThrowArgument_DestinationTooShort(); + } + + for (int i = 0; i < x.Length; i++) + { + destination[i] = MinMagnitude(x[i], y[i]); + } + } + + /// Computes the index of the maximum element in . + /// The tensor, represented as a span. + /// The index of the maximum element in , or -1 if is empty. + public static unsafe int IndexOfMax(ReadOnlySpan x) + { + int result = -1; + + if (!x.IsEmpty) + { + float max = float.NegativeInfinity; + + for (int i = 0; i < x.Length; i++) + { + // This matches the IEEE 754:2019 `maximum` function. + // It propagates NaN inputs back to the caller and + // otherwise returns the greater of the inputs. + // It treats +0 as greater than -0 as per the specification. + + float current = x[i]; + + if (current != max) + { + if (float.IsNaN(current)) + { + return i; + } + + if (max < current) + { + result = i; + max = current; + } + } + else if (IsNegative(max) && !IsNegative(current)) + { + result = i; + max = current; + } + } + } + + return result; + } + + /// Computes the index of the minimum element in . + /// The tensor, represented as a span. + /// The index of the minimum element in , or -1 if is empty. + public static unsafe int IndexOfMin(ReadOnlySpan x) + { + int result = -1; + + if (!x.IsEmpty) + { + float min = float.PositiveInfinity; + + for (int i = 0; i < x.Length; i++) + { + // This matches the IEEE 754:2019 `minimum` function. + // It propagates NaN inputs back to the caller and + // otherwise returns the lesser of the inputs. + // It treats +0 as greater than -0 as per the specification. + + float current = x[i]; + + if (current != min) + { + if (float.IsNaN(current)) + { + return i; + } + + if (current < min) + { + result = i; + min = current; + } + } + else if (IsNegative(current) && !IsNegative(min)) + { + result = i; + min = current; + } + } + } + + return result; + } + + /// Computes the index of the element in with the maximum magnitude. + /// The tensor, represented as a span. + /// The index of the element with the maximum magnitude, or -1 if is empty. + /// This method corresponds to the iamax method defined by BLAS1. + public static unsafe int IndexOfMaxMagnitude(ReadOnlySpan x) + { + int result = -1; + + if (!x.IsEmpty) + { + float max = float.NegativeInfinity; + float maxMag = float.NegativeInfinity; + + for (int i = 0; i < x.Length; i++) + { + // This matches the IEEE 754:2019 `maximumMagnitude` function. + // It propagates NaN inputs back to the caller and + // otherwise returns the input with a greater magnitude. + // It treats +0 as greater than -0 as per the specification. + + float current = x[i]; + float currentMag = Math.Abs(current); + + if (currentMag != maxMag) + { + if (float.IsNaN(currentMag)) + { + return i; + } + + if (maxMag < currentMag) + { + result = i; + max = current; + maxMag = currentMag; + } + } + else if (IsNegative(max) && !IsNegative(current)) + { + result = i; + max = current; + maxMag = currentMag; + } + } + } + + return result; + } + + /// Computes the index of the element in with the minimum magnitude. + /// The tensor, represented as a span. + /// The index of the element with the minimum magnitude, or -1 if is empty. + public static unsafe int IndexOfMinMagnitude(ReadOnlySpan x) + { + int result = -1; + + if (!x.IsEmpty) + { + float min = float.PositiveInfinity; + float minMag = float.PositiveInfinity; + + for (int i = 0; i < x.Length; i++) + { + // This matches the IEEE 754:2019 `minimumMagnitude` function + // It propagates NaN inputs back to the caller and + // otherwise returns the input with a lesser magnitude. + // It treats +0 as greater than -0 as per the specification. + + float current = x[i]; + float currentMag = Math.Abs(current); + + if (currentMag != minMag) + { + if (float.IsNaN(currentMag)) + { + return i; + } + + if (currentMag < minMag) + { + result = i; + min = current; + minMag = currentMag; + } + } + else if (IsNegative(current) && !IsNegative(min)) + { + result = i; + min = current; + minMag = currentMag; + } + } + } + + return result; + } + + /// Computes the sum of all elements in . + /// The tensor, represented as a span. + /// The result of adding all elements in , or zero if is empty. + public static float Sum(ReadOnlySpan x) => + Aggregate(0f, x); + + /// Computes the sum of the squares of every element in . + /// The tensor, represented as a span. + /// The result of adding every element in multiplied by itself, or zero if is empty. + /// This method effectively does .Sum(.Multiply(, )). + public static float SumOfSquares(ReadOnlySpan x) => + Aggregate(0f, x); + + /// Computes the sum of the absolute values of every element in . + /// The tensor, represented as a span. + /// The result of adding the absolute value of every element in , or zero if is empty. + /// + /// This method effectively does .Sum(.Abs()). + /// This method corresponds to the asum method defined by BLAS1. + /// + public static float SumOfMagnitudes(ReadOnlySpan x) => + Aggregate(0f, x); + + /// Computes the product of all elements in . + /// The tensor, represented as a span. + /// The result of multiplying all elements in . + /// Length of '' must be greater than zero. + public static float Product(ReadOnlySpan x) + { + if (x.IsEmpty) + { + ThrowHelper.ThrowArgument_SpansMustBeNonEmpty(); + } + + return Aggregate(1.0f, x); + } + + /// Computes the product of the element-wise result of: + . + /// The first tensor, represented as a span. + /// The second tensor, represented as a span. + /// The result of multiplying the element-wise additions of the elements in each tensor. + /// Length of both input spans must be greater than zero. + /// and must have the same length. + /// This method effectively does .Product(.Add(, )). + public static float ProductOfSums(ReadOnlySpan x, ReadOnlySpan y) + { + if (x.IsEmpty) + { + ThrowHelper.ThrowArgument_SpansMustBeNonEmpty(); + } + + if (x.Length != y.Length) + { + ThrowHelper.ThrowArgument_SpansMustHaveSameLength(); + } + + return Aggregate(1.0f, x, y); + } + + /// Computes the product of the element-wise result of: - . + /// The first tensor, represented as a span. + /// The second tensor, represented as a span. + /// The result of multiplying the element-wise subtraction of the elements in the second tensor from the first tensor. + /// Length of both input spans must be greater than zero. + /// and must have the same length. + /// This method effectively does .Product(.Subtract(, )). + public static float ProductOfDifferences(ReadOnlySpan x, ReadOnlySpan y) + { + if (x.IsEmpty) + { + ThrowHelper.ThrowArgument_SpansMustBeNonEmpty(); + } + + if (x.Length != y.Length) + { + ThrowHelper.ThrowArgument_SpansMustHaveSameLength(); + } + + return Aggregate(1.0f, x, y); + } + } +} diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/TensorPrimitives.netcore.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/TensorPrimitives.netcore.cs new file mode 100644 index 00000000000000..0eaa0681036eb1 --- /dev/null +++ b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/TensorPrimitives.netcore.cs @@ -0,0 +1,1318 @@ +// 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.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.Arm; +using System.Runtime.Intrinsics.X86; + +namespace System.Numerics.Tensors +{ + public static partial class TensorPrimitives + { + /// + /// Copies to , converting each + /// value to its nearest representable half-precision floating-point value. + /// + /// The source span from which to copy values. + /// The destination span into which the converted values should be written. + /// Destination is too short. + public static void ConvertToHalf(ReadOnlySpan source, Span destination) + { + if (source.Length > destination.Length) + { + ThrowHelper.ThrowArgument_DestinationTooShort(); + } + + for (int i = 0; i < source.Length; i++) + { + destination[i] = (Half)source[i]; + } + } + + /// + /// Copies to , converting each half-precision + /// floating-point value to its nearest representable value. + /// + /// The source span from which to copy values. + /// The destination span into which the converted values should be written. + /// Destination is too short. + public static void ConvertToSingle(ReadOnlySpan source, Span destination) + { + if (source.Length > destination.Length) + { + ThrowHelper.ThrowArgument_DestinationTooShort(); + } + + for (int i = 0; i < source.Length; i++) + { + destination[i] = (float)source[i]; + } + } + + private static bool IsNegative(float f) => float.IsNegative(f); + + private static float MaxMagnitude(float x, float y) => MathF.MaxMagnitude(x, y); + + private static float MinMagnitude(float x, float y) => MathF.MinMagnitude(x, y); + + private static float Log2(float x) => MathF.Log2(x); + + private static float CosineSimilarityCore(ReadOnlySpan x, ReadOnlySpan y) + { + // Compute the same as: + // TensorPrimitives.Dot(x, y) / (Math.Sqrt(TensorPrimitives.SumOfSquares(x)) * Math.Sqrt(TensorPrimitives.SumOfSquares(y))) + // but only looping over each span once. + + float dotProduct = 0f; + float xSumOfSquares = 0f; + float ySumOfSquares = 0f; + + int i = 0; + +#if NET8_0_OR_GREATER + if (Vector512.IsHardwareAccelerated && x.Length >= Vector512.Count) + { + ref float xRef = ref MemoryMarshal.GetReference(x); + ref float yRef = ref MemoryMarshal.GetReference(y); + + Vector512 dotProductVector = Vector512.Zero; + Vector512 xSumOfSquaresVector = Vector512.Zero; + Vector512 ySumOfSquaresVector = Vector512.Zero; + + // Process vectors, summing their dot products and squares, as long as there's a vector's worth remaining. + int oneVectorFromEnd = x.Length - Vector512.Count; + do + { + Vector512 xVec = Vector512.LoadUnsafe(ref xRef, (uint)i); + Vector512 yVec = Vector512.LoadUnsafe(ref yRef, (uint)i); + + dotProductVector = FusedMultiplyAdd(xVec, yVec, dotProductVector); + xSumOfSquaresVector = FusedMultiplyAdd(xVec, xVec, xSumOfSquaresVector); + ySumOfSquaresVector = FusedMultiplyAdd(yVec, yVec, ySumOfSquaresVector); + + i += Vector512.Count; + } + while (i <= oneVectorFromEnd); + + // Sum the vector lanes into the scalar result. + dotProduct += Vector512.Sum(dotProductVector); + xSumOfSquares += Vector512.Sum(xSumOfSquaresVector); + ySumOfSquares += Vector512.Sum(ySumOfSquaresVector); + } + else +#endif + if (Vector256.IsHardwareAccelerated && x.Length >= Vector256.Count) + { + ref float xRef = ref MemoryMarshal.GetReference(x); + ref float yRef = ref MemoryMarshal.GetReference(y); + + Vector256 dotProductVector = Vector256.Zero; + Vector256 xSumOfSquaresVector = Vector256.Zero; + Vector256 ySumOfSquaresVector = Vector256.Zero; + + // Process vectors, summing their dot products and squares, as long as there's a vector's worth remaining. + int oneVectorFromEnd = x.Length - Vector256.Count; + do + { + Vector256 xVec = Vector256.LoadUnsafe(ref xRef, (uint)i); + Vector256 yVec = Vector256.LoadUnsafe(ref yRef, (uint)i); + + dotProductVector = FusedMultiplyAdd(xVec, yVec, dotProductVector); + xSumOfSquaresVector = FusedMultiplyAdd(xVec, xVec, xSumOfSquaresVector); + ySumOfSquaresVector = FusedMultiplyAdd(yVec, yVec, ySumOfSquaresVector); + + i += Vector256.Count; + } + while (i <= oneVectorFromEnd); + + // Sum the vector lanes into the scalar result. + dotProduct += Vector256.Sum(dotProductVector); + xSumOfSquares += Vector256.Sum(xSumOfSquaresVector); + ySumOfSquares += Vector256.Sum(ySumOfSquaresVector); + } + else if (Vector128.IsHardwareAccelerated && x.Length >= Vector128.Count) + { + ref float xRef = ref MemoryMarshal.GetReference(x); + ref float yRef = ref MemoryMarshal.GetReference(y); + + Vector128 dotProductVector = Vector128.Zero; + Vector128 xSumOfSquaresVector = Vector128.Zero; + Vector128 ySumOfSquaresVector = Vector128.Zero; + + // Process vectors, summing their dot products and squares, as long as there's a vector's worth remaining. + int oneVectorFromEnd = x.Length - Vector128.Count; + do + { + Vector128 xVec = Vector128.LoadUnsafe(ref xRef, (uint)i); + Vector128 yVec = Vector128.LoadUnsafe(ref yRef, (uint)i); + + dotProductVector = FusedMultiplyAdd(xVec, yVec, dotProductVector); + xSumOfSquaresVector = FusedMultiplyAdd(xVec, xVec, xSumOfSquaresVector); + ySumOfSquaresVector = FusedMultiplyAdd(yVec, yVec, ySumOfSquaresVector); + + i += Vector128.Count; + } + while (i <= oneVectorFromEnd); + + // Sum the vector lanes into the scalar result. + dotProduct += Vector128.Sum(dotProductVector); + xSumOfSquares += Vector128.Sum(xSumOfSquaresVector); + ySumOfSquares += Vector128.Sum(ySumOfSquaresVector); + } + + // Process any remaining elements past the last vector. + for (; (uint)i < (uint)x.Length; i++) + { + dotProduct = MathF.FusedMultiplyAdd(x[i], y[i], dotProduct); + xSumOfSquares = MathF.FusedMultiplyAdd(x[i], x[i], xSumOfSquares); + ySumOfSquares = MathF.FusedMultiplyAdd(y[i], y[i], ySumOfSquares); + } + + // Sum(X * Y) / (|X| * |Y|) + return dotProduct / (MathF.Sqrt(xSumOfSquares) * MathF.Sqrt(ySumOfSquares)); + } + + private static float Aggregate( + float identityValue, ReadOnlySpan x) + where TLoad : IUnaryOperator + where TAggregate : IBinaryOperator + { + // Initialize the result to the identity value + float result = identityValue; + int i = 0; + +#if NET8_0_OR_GREATER + if (Vector512.IsHardwareAccelerated && x.Length >= Vector512.Count * 2) + { + ref float xRef = ref MemoryMarshal.GetReference(x); + + // Load the first vector as the initial set of results + Vector512 resultVector = TLoad.Invoke(Vector512.LoadUnsafe(ref xRef, 0)); + int oneVectorFromEnd = x.Length - Vector512.Count; + + // Aggregate additional vectors into the result as long as there's at + // least one full vector left to process. + i = Vector512.Count; + do + { + resultVector = TAggregate.Invoke(resultVector, TLoad.Invoke(Vector512.LoadUnsafe(ref xRef, (uint)i))); + i += Vector512.Count; + } + while (i <= oneVectorFromEnd); + + // Aggregate the lanes in the vector back into the scalar result + result = TAggregate.Invoke(result, TAggregate.Invoke(resultVector)); + } + else +#endif + if (Vector256.IsHardwareAccelerated && x.Length >= Vector256.Count * 2) + { + ref float xRef = ref MemoryMarshal.GetReference(x); + + // Load the first vector as the initial set of results + Vector256 resultVector = TLoad.Invoke(Vector256.LoadUnsafe(ref xRef, 0)); + int oneVectorFromEnd = x.Length - Vector256.Count; + + // Aggregate additional vectors into the result as long as there's at + // least one full vector left to process. + i = Vector256.Count; + do + { + resultVector = TAggregate.Invoke(resultVector, TLoad.Invoke(Vector256.LoadUnsafe(ref xRef, (uint)i))); + i += Vector256.Count; + } + while (i <= oneVectorFromEnd); + + // Aggregate the lanes in the vector back into the scalar result + result = TAggregate.Invoke(result, TAggregate.Invoke(resultVector)); + } + else if (Vector128.IsHardwareAccelerated && x.Length >= Vector128.Count * 2) + { + ref float xRef = ref MemoryMarshal.GetReference(x); + + // Load the first vector as the initial set of results + Vector128 resultVector = TLoad.Invoke(Vector128.LoadUnsafe(ref xRef, 0)); + int oneVectorFromEnd = x.Length - Vector128.Count; + + // Aggregate additional vectors into the result as long as there's at + // least one full vector left to process. + i = Vector128.Count; + do + { + resultVector = TAggregate.Invoke(resultVector, TLoad.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)i))); + i += Vector128.Count; + } + while (i <= oneVectorFromEnd); + + // Aggregate the lanes in the vector back into the scalar result + result = TAggregate.Invoke(result, TAggregate.Invoke(resultVector)); + } + + // Aggregate the remaining items in the input span. + for (; (uint)i < (uint)x.Length; i++) + { + result = TAggregate.Invoke(result, TLoad.Invoke(x[i])); + } + + return result; + } + + private static float Aggregate( + float identityValue, ReadOnlySpan x, ReadOnlySpan y) + where TBinary : IBinaryOperator + where TAggregate : IBinaryOperator + { + // Initialize the result to the identity value + float result = identityValue; + int i = 0; + +#if NET8_0_OR_GREATER + if (Vector512.IsHardwareAccelerated && x.Length >= Vector512.Count * 2) + { + ref float xRef = ref MemoryMarshal.GetReference(x); + ref float yRef = ref MemoryMarshal.GetReference(y); + + // Load the first vector as the initial set of results + Vector512 resultVector = TBinary.Invoke(Vector512.LoadUnsafe(ref xRef, 0), Vector512.LoadUnsafe(ref yRef, 0)); + int oneVectorFromEnd = x.Length - Vector512.Count; + + // Aggregate additional vectors into the result as long as there's at + // least one full vector left to process. + i = Vector512.Count; + do + { + resultVector = TAggregate.Invoke(resultVector, TBinary.Invoke(Vector512.LoadUnsafe(ref xRef, (uint)i), Vector512.LoadUnsafe(ref yRef, (uint)i))); + i += Vector512.Count; + } + while (i <= oneVectorFromEnd); + + // Aggregate the lanes in the vector back into the scalar result + result = TAggregate.Invoke(result, TAggregate.Invoke(resultVector)); + } + else +#endif + if (Vector256.IsHardwareAccelerated && x.Length >= Vector256.Count * 2) + { + ref float xRef = ref MemoryMarshal.GetReference(x); + ref float yRef = ref MemoryMarshal.GetReference(y); + + // Load the first vector as the initial set of results + Vector256 resultVector = TBinary.Invoke(Vector256.LoadUnsafe(ref xRef, 0), Vector256.LoadUnsafe(ref yRef, 0)); + int oneVectorFromEnd = x.Length - Vector256.Count; + + // Aggregate additional vectors into the result as long as there's at + // least one full vector left to process. + i = Vector256.Count; + do + { + resultVector = TAggregate.Invoke(resultVector, TBinary.Invoke(Vector256.LoadUnsafe(ref xRef, (uint)i), Vector256.LoadUnsafe(ref yRef, (uint)i))); + i += Vector256.Count; + } + while (i <= oneVectorFromEnd); + + // Aggregate the lanes in the vector back into the scalar result + result = TAggregate.Invoke(result, TAggregate.Invoke(resultVector)); + } + else if (Vector128.IsHardwareAccelerated && x.Length >= Vector128.Count * 2) + { + ref float xRef = ref MemoryMarshal.GetReference(x); + ref float yRef = ref MemoryMarshal.GetReference(y); + + // Load the first vector as the initial set of results + Vector128 resultVector = TBinary.Invoke(Vector128.LoadUnsafe(ref xRef, 0), Vector128.LoadUnsafe(ref yRef, 0)); + int oneVectorFromEnd = x.Length - Vector128.Count; + + // Aggregate additional vectors into the result as long as there's at + // least one full vector left to process. + i = Vector128.Count; + do + { + resultVector = TAggregate.Invoke(resultVector, TBinary.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)i), Vector128.LoadUnsafe(ref yRef, (uint)i))); + i += Vector128.Count; + } + while (i <= oneVectorFromEnd); + + // Aggregate the lanes in the vector back into the scalar result + result = TAggregate.Invoke(result, TAggregate.Invoke(resultVector)); + } + + // Aggregate the remaining items in the input span. + for (; (uint)i < (uint)x.Length; i++) + { + result = TAggregate.Invoke(result, TBinary.Invoke(x[i], y[i])); + } + + return result; + } + + private static unsafe void InvokeSpanIntoSpan( + ReadOnlySpan x, Span destination) + where TUnaryOperator : IUnaryOperator + { + if (x.Length > destination.Length) + { + ThrowHelper.ThrowArgument_DestinationTooShort(); + } + + ref float xRef = ref MemoryMarshal.GetReference(x); + ref float dRef = ref MemoryMarshal.GetReference(destination); + int i = 0, oneVectorFromEnd; + +#if NET8_0_OR_GREATER + if (Vector512.IsHardwareAccelerated) + { + oneVectorFromEnd = x.Length - Vector512.Count; + if (i <= oneVectorFromEnd) + { + // Loop handling one vector at a time. + do + { + TUnaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, (uint)i)).StoreUnsafe(ref dRef, (uint)i); + + i += Vector512.Count; + } + while (i <= oneVectorFromEnd); + + // Handle any remaining elements with a final vector. + if (i != x.Length) + { + uint lastVectorIndex = (uint)(x.Length - Vector512.Count); + TUnaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, lastVectorIndex)).StoreUnsafe(ref dRef, lastVectorIndex); + } + + return; + } + } +#endif + + if (Vector256.IsHardwareAccelerated) + { + oneVectorFromEnd = x.Length - Vector256.Count; + if (i <= oneVectorFromEnd) + { + // Loop handling one vector at a time. + do + { + TUnaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, (uint)i)).StoreUnsafe(ref dRef, (uint)i); + + i += Vector256.Count; + } + while (i <= oneVectorFromEnd); + + // Handle any remaining elements with a final vector. + if (i != x.Length) + { + uint lastVectorIndex = (uint)(x.Length - Vector256.Count); + TUnaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, lastVectorIndex)).StoreUnsafe(ref dRef, lastVectorIndex); + } + + return; + } + } + + if (Vector128.IsHardwareAccelerated) + { + oneVectorFromEnd = x.Length - Vector128.Count; + if (i <= oneVectorFromEnd) + { + // Loop handling one vector at a time. + do + { + TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)i)).StoreUnsafe(ref dRef, (uint)i); + + i += Vector128.Count; + } + while (i <= oneVectorFromEnd); + + // Handle any remaining elements with a final vector. + if (i != x.Length) + { + uint lastVectorIndex = (uint)(x.Length - Vector128.Count); + TUnaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, lastVectorIndex)).StoreUnsafe(ref dRef, lastVectorIndex); + } + + return; + } + } + + while (i < x.Length) + { + Unsafe.Add(ref dRef, i) = TUnaryOperator.Invoke(Unsafe.Add(ref xRef, i)); + + i++; + } + } + + private static unsafe void InvokeSpanSpanIntoSpan( + ReadOnlySpan x, ReadOnlySpan y, Span destination) + where TBinaryOperator : IBinaryOperator + { + if (x.Length != y.Length) + { + ThrowHelper.ThrowArgument_SpansMustHaveSameLength(); + } + + if (x.Length > destination.Length) + { + ThrowHelper.ThrowArgument_DestinationTooShort(); + } + + ref float xRef = ref MemoryMarshal.GetReference(x); + ref float yRef = ref MemoryMarshal.GetReference(y); + ref float dRef = ref MemoryMarshal.GetReference(destination); + int i = 0, oneVectorFromEnd; + +#if NET8_0_OR_GREATER + if (Vector512.IsHardwareAccelerated) + { + oneVectorFromEnd = x.Length - Vector512.Count; + if (i <= oneVectorFromEnd) + { + // Loop handling one vector at a time. + do + { + TBinaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, (uint)i), + Vector512.LoadUnsafe(ref yRef, (uint)i)).StoreUnsafe(ref dRef, (uint)i); + + i += Vector512.Count; + } + while (i <= oneVectorFromEnd); + + // Handle any remaining elements with a final vector. + if (i != x.Length) + { + uint lastVectorIndex = (uint)(x.Length - Vector512.Count); + TBinaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, lastVectorIndex), + Vector512.LoadUnsafe(ref yRef, lastVectorIndex)).StoreUnsafe(ref dRef, lastVectorIndex); + } + + return; + } + } +#endif + + if (Vector256.IsHardwareAccelerated) + { + oneVectorFromEnd = x.Length - Vector256.Count; + if (i <= oneVectorFromEnd) + { + // Loop handling one vector at a time. + do + { + TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, (uint)i), + Vector256.LoadUnsafe(ref yRef, (uint)i)).StoreUnsafe(ref dRef, (uint)i); + + i += Vector256.Count; + } + while (i <= oneVectorFromEnd); + + // Handle any remaining elements with a final vector. + if (i != x.Length) + { + uint lastVectorIndex = (uint)(x.Length - Vector256.Count); + TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, lastVectorIndex), + Vector256.LoadUnsafe(ref yRef, lastVectorIndex)).StoreUnsafe(ref dRef, lastVectorIndex); + } + + return; + } + } + + if (Vector128.IsHardwareAccelerated) + { + oneVectorFromEnd = x.Length - Vector128.Count; + if (i <= oneVectorFromEnd) + { + // Loop handling one vector at a time. + do + { + TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)i), + Vector128.LoadUnsafe(ref yRef, (uint)i)).StoreUnsafe(ref dRef, (uint)i); + + i += Vector128.Count; + } + while (i <= oneVectorFromEnd); + + // Handle any remaining elements with a final vector. + if (i != x.Length) + { + uint lastVectorIndex = (uint)(x.Length - Vector128.Count); + TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, lastVectorIndex), + Vector128.LoadUnsafe(ref yRef, lastVectorIndex)).StoreUnsafe(ref dRef, lastVectorIndex); + } + + return; + } + } + + while (i < x.Length) + { + Unsafe.Add(ref dRef, i) = TBinaryOperator.Invoke(Unsafe.Add(ref xRef, i), + Unsafe.Add(ref yRef, i)); + + i++; + } + } + + private static unsafe void InvokeSpanScalarIntoSpan( + ReadOnlySpan x, float y, Span destination) + where TBinaryOperator : IBinaryOperator + { + if (x.Length > destination.Length) + { + ThrowHelper.ThrowArgument_DestinationTooShort(); + } + + ref float xRef = ref MemoryMarshal.GetReference(x); + ref float dRef = ref MemoryMarshal.GetReference(destination); + int i = 0, oneVectorFromEnd; + +#if NET8_0_OR_GREATER + if (Vector512.IsHardwareAccelerated) + { + oneVectorFromEnd = x.Length - Vector512.Count; + if (i <= oneVectorFromEnd) + { + Vector512 yVec = Vector512.Create(y); + + // Loop handling one vector at a time. + do + { + TBinaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, (uint)i), + yVec).StoreUnsafe(ref dRef, (uint)i); + + i += Vector512.Count; + } + while (i <= oneVectorFromEnd); + + // Handle any remaining elements with a final vector. + if (i != x.Length) + { + uint lastVectorIndex = (uint)(x.Length - Vector512.Count); + TBinaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, lastVectorIndex), + yVec).StoreUnsafe(ref dRef, lastVectorIndex); + } + + return; + } + } +#endif + + if (Vector256.IsHardwareAccelerated) + { + oneVectorFromEnd = x.Length - Vector256.Count; + if (i <= oneVectorFromEnd) + { + Vector256 yVec = Vector256.Create(y); + + // Loop handling one vector at a time. + do + { + TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, (uint)i), + yVec).StoreUnsafe(ref dRef, (uint)i); + + i += Vector256.Count; + } + while (i <= oneVectorFromEnd); + + // Handle any remaining elements with a final vector. + if (i != x.Length) + { + uint lastVectorIndex = (uint)(x.Length - Vector256.Count); + TBinaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, lastVectorIndex), + yVec).StoreUnsafe(ref dRef, lastVectorIndex); + } + + return; + } + } + + if (Vector128.IsHardwareAccelerated) + { + oneVectorFromEnd = x.Length - Vector128.Count; + if (i <= oneVectorFromEnd) + { + Vector128 yVec = Vector128.Create(y); + + // Loop handling one vector at a time. + do + { + TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)i), + yVec).StoreUnsafe(ref dRef, (uint)i); + + i += Vector128.Count; + } + while (i <= oneVectorFromEnd); + + // Handle any remaining elements with a final vector. + if (i != x.Length) + { + uint lastVectorIndex = (uint)(x.Length - Vector128.Count); + TBinaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, lastVectorIndex), + yVec).StoreUnsafe(ref dRef, lastVectorIndex); + } + + return; + } + } + + while (i < x.Length) + { + Unsafe.Add(ref dRef, i) = TBinaryOperator.Invoke(Unsafe.Add(ref xRef, i), + y); + + i++; + } + } + + private static unsafe void InvokeSpanSpanSpanIntoSpan( + ReadOnlySpan x, ReadOnlySpan y, ReadOnlySpan z, Span destination) + where TTernaryOperator : ITernaryOperator + { + if (x.Length != y.Length || x.Length != z.Length) + { + ThrowHelper.ThrowArgument_SpansMustHaveSameLength(); + } + + if (x.Length > destination.Length) + { + ThrowHelper.ThrowArgument_DestinationTooShort(); + } + + ref float xRef = ref MemoryMarshal.GetReference(x); + ref float yRef = ref MemoryMarshal.GetReference(y); + ref float zRef = ref MemoryMarshal.GetReference(z); + ref float dRef = ref MemoryMarshal.GetReference(destination); + int i = 0, oneVectorFromEnd; + +#if NET8_0_OR_GREATER + if (Vector512.IsHardwareAccelerated) + { + oneVectorFromEnd = x.Length - Vector512.Count; + if (i <= oneVectorFromEnd) + { + // Loop handling one vector at a time. + do + { + TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, (uint)i), + Vector512.LoadUnsafe(ref yRef, (uint)i), + Vector512.LoadUnsafe(ref zRef, (uint)i)).StoreUnsafe(ref dRef, (uint)i); + + i += Vector512.Count; + } + while (i <= oneVectorFromEnd); + + // Handle any remaining elements with a final vector. + if (i != x.Length) + { + uint lastVectorIndex = (uint)(x.Length - Vector512.Count); + TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, lastVectorIndex), + Vector512.LoadUnsafe(ref yRef, lastVectorIndex), + Vector512.LoadUnsafe(ref zRef, lastVectorIndex)).StoreUnsafe(ref dRef, lastVectorIndex); + } + + return; + } + } +#endif + + if (Vector256.IsHardwareAccelerated) + { + oneVectorFromEnd = x.Length - Vector256.Count; + if (i <= oneVectorFromEnd) + { + // Loop handling one vector at a time. + do + { + TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, (uint)i), + Vector256.LoadUnsafe(ref yRef, (uint)i), + Vector256.LoadUnsafe(ref zRef, (uint)i)).StoreUnsafe(ref dRef, (uint)i); + + i += Vector256.Count; + } + while (i <= oneVectorFromEnd); + + // Handle any remaining elements with a final vector. + if (i != x.Length) + { + uint lastVectorIndex = (uint)(x.Length - Vector256.Count); + TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, lastVectorIndex), + Vector256.LoadUnsafe(ref yRef, lastVectorIndex), + Vector256.LoadUnsafe(ref zRef, lastVectorIndex)).StoreUnsafe(ref dRef, lastVectorIndex); + } + + return; + } + } + + if (Vector128.IsHardwareAccelerated) + { + oneVectorFromEnd = x.Length - Vector128.Count; + if (i <= oneVectorFromEnd) + { + // Loop handling one vector at a time. + do + { + TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)i), + Vector128.LoadUnsafe(ref yRef, (uint)i), + Vector128.LoadUnsafe(ref zRef, (uint)i)).StoreUnsafe(ref dRef, (uint)i); + + i += Vector128.Count; + } + while (i <= oneVectorFromEnd); + + // Handle any remaining elements with a final vector. + if (i != x.Length) + { + uint lastVectorIndex = (uint)(x.Length - Vector128.Count); + TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, lastVectorIndex), + Vector128.LoadUnsafe(ref yRef, lastVectorIndex), + Vector128.LoadUnsafe(ref zRef, lastVectorIndex)).StoreUnsafe(ref dRef, lastVectorIndex); + } + + return; + } + } + + while (i < x.Length) + { + Unsafe.Add(ref dRef, i) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, i), + Unsafe.Add(ref yRef, i), + Unsafe.Add(ref zRef, i)); + + i++; + } + } + + private static unsafe void InvokeSpanSpanScalarIntoSpan( + ReadOnlySpan x, ReadOnlySpan y, float z, Span destination) + where TTernaryOperator : ITernaryOperator + { + if (x.Length != y.Length) + { + ThrowHelper.ThrowArgument_SpansMustHaveSameLength(); + } + + if (x.Length > destination.Length) + { + ThrowHelper.ThrowArgument_DestinationTooShort(); + } + + ref float xRef = ref MemoryMarshal.GetReference(x); + ref float yRef = ref MemoryMarshal.GetReference(y); + ref float dRef = ref MemoryMarshal.GetReference(destination); + int i = 0, oneVectorFromEnd; + +#if NET8_0_OR_GREATER + if (Vector512.IsHardwareAccelerated) + { + oneVectorFromEnd = x.Length - Vector512.Count; + if (i <= oneVectorFromEnd) + { + Vector512 zVec = Vector512.Create(z); + + // Loop handling one vector at a time. + do + { + TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, (uint)i), + Vector512.LoadUnsafe(ref yRef, (uint)i), + zVec).StoreUnsafe(ref dRef, (uint)i); + + i += Vector512.Count; + } + while (i <= oneVectorFromEnd); + + // Handle any remaining elements with a final vector. + if (i != x.Length) + { + uint lastVectorIndex = (uint)(x.Length - Vector512.Count); + TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, lastVectorIndex), + Vector512.LoadUnsafe(ref yRef, lastVectorIndex), + zVec).StoreUnsafe(ref dRef, lastVectorIndex); + } + + return; + } + } +#endif + + if (Vector256.IsHardwareAccelerated) + { + oneVectorFromEnd = x.Length - Vector256.Count; + if (i <= oneVectorFromEnd) + { + Vector256 zVec = Vector256.Create(z); + + // Loop handling one vector at a time. + do + { + TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, (uint)i), + Vector256.LoadUnsafe(ref yRef, (uint)i), + zVec).StoreUnsafe(ref dRef, (uint)i); + + i += Vector256.Count; + } + while (i <= oneVectorFromEnd); + + // Handle any remaining elements with a final vector. + if (i != x.Length) + { + uint lastVectorIndex = (uint)(x.Length - Vector256.Count); + TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, lastVectorIndex), + Vector256.LoadUnsafe(ref yRef, lastVectorIndex), + zVec).StoreUnsafe(ref dRef, lastVectorIndex); + } + + return; + } + } + + if (Vector128.IsHardwareAccelerated) + { + oneVectorFromEnd = x.Length - Vector128.Count; + if (i <= oneVectorFromEnd) + { + Vector128 zVec = Vector128.Create(z); + + // Loop handling one vector at a time. + do + { + TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)i), + Vector128.LoadUnsafe(ref yRef, (uint)i), + zVec).StoreUnsafe(ref dRef, (uint)i); + + i += Vector128.Count; + } + while (i <= oneVectorFromEnd); + + // Handle any remaining elements with a final vector. + if (i != x.Length) + { + uint lastVectorIndex = (uint)(x.Length - Vector128.Count); + TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, lastVectorIndex), + Vector128.LoadUnsafe(ref yRef, lastVectorIndex), + zVec).StoreUnsafe(ref dRef, lastVectorIndex); + } + + return; + } + } + + while (i < x.Length) + { + Unsafe.Add(ref dRef, i) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, i), + Unsafe.Add(ref yRef, i), + z); + + i++; + } + } + + private static unsafe void InvokeSpanScalarSpanIntoSpan( + ReadOnlySpan x, float y, ReadOnlySpan z, Span destination) + where TTernaryOperator : ITernaryOperator + { + if (x.Length != z.Length) + { + ThrowHelper.ThrowArgument_SpansMustHaveSameLength(); + } + + if (x.Length > destination.Length) + { + ThrowHelper.ThrowArgument_DestinationTooShort(); + } + + ref float xRef = ref MemoryMarshal.GetReference(x); + ref float zRef = ref MemoryMarshal.GetReference(z); + ref float dRef = ref MemoryMarshal.GetReference(destination); + int i = 0, oneVectorFromEnd; + +#if NET8_0_OR_GREATER + if (Vector512.IsHardwareAccelerated) + { + oneVectorFromEnd = x.Length - Vector512.Count; + if (i <= oneVectorFromEnd) + { + Vector512 yVec = Vector512.Create(y); + + // Loop handling one vector at a time. + do + { + TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, (uint)i), + yVec, + Vector512.LoadUnsafe(ref zRef, (uint)i)).StoreUnsafe(ref dRef, (uint)i); + + i += Vector512.Count; + } + while (i <= oneVectorFromEnd); + + // Handle any remaining elements with a final vector. + if (i != x.Length) + { + uint lastVectorIndex = (uint)(x.Length - Vector512.Count); + TTernaryOperator.Invoke(Vector512.LoadUnsafe(ref xRef, lastVectorIndex), + yVec, + Vector512.LoadUnsafe(ref zRef, lastVectorIndex)).StoreUnsafe(ref dRef, lastVectorIndex); + } + + return; + } + } +#endif + + if (Vector256.IsHardwareAccelerated) + { + oneVectorFromEnd = x.Length - Vector256.Count; + if (i <= oneVectorFromEnd) + { + Vector256 yVec = Vector256.Create(y); + + // Loop handling one vector at a time. + do + { + TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, (uint)i), + yVec, + Vector256.LoadUnsafe(ref zRef, (uint)i)).StoreUnsafe(ref dRef, (uint)i); + + i += Vector256.Count; + } + while (i <= oneVectorFromEnd); + + // Handle any remaining elements with a final vector. + if (i != x.Length) + { + uint lastVectorIndex = (uint)(x.Length - Vector256.Count); + TTernaryOperator.Invoke(Vector256.LoadUnsafe(ref xRef, lastVectorIndex), + yVec, + Vector256.LoadUnsafe(ref zRef, lastVectorIndex)).StoreUnsafe(ref dRef, lastVectorIndex); + } + + return; + } + } + + if (Vector128.IsHardwareAccelerated) + { + oneVectorFromEnd = x.Length - Vector128.Count; + if (i <= oneVectorFromEnd) + { + Vector128 yVec = Vector128.Create(y); + + // Loop handling one vector at a time. + do + { + TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, (uint)i), + yVec, + Vector128.LoadUnsafe(ref zRef, (uint)i)).StoreUnsafe(ref dRef, (uint)i); + + i += Vector128.Count; + } + while (i <= oneVectorFromEnd); + + // Handle any remaining elements with a final vector. + if (i != x.Length) + { + uint lastVectorIndex = (uint)(x.Length - Vector128.Count); + TTernaryOperator.Invoke(Vector128.LoadUnsafe(ref xRef, lastVectorIndex), + yVec, + Vector128.LoadUnsafe(ref zRef, lastVectorIndex)).StoreUnsafe(ref dRef, lastVectorIndex); + } + + return; + } + } + + while (i < x.Length) + { + Unsafe.Add(ref dRef, i) = TTernaryOperator.Invoke(Unsafe.Add(ref xRef, i), + y, + Unsafe.Add(ref zRef, i)); + + i++; + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static Vector128 FusedMultiplyAdd(Vector128 x, Vector128 y, Vector128 addend) + { + if (Fma.IsSupported) + { + return Fma.MultiplyAdd(x, y, addend); + } + + if (AdvSimd.IsSupported) + { + return AdvSimd.FusedMultiplyAdd(addend, x, y); + } + + return (x * y) + addend; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static Vector256 FusedMultiplyAdd(Vector256 x, Vector256 y, Vector256 addend) + { + if (Fma.IsSupported) + { + return Fma.MultiplyAdd(x, y, addend); + } + + return (x * y) + addend; + } + +#if NET8_0_OR_GREATER + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static Vector512 FusedMultiplyAdd(Vector512 x, Vector512 y, Vector512 addend) + { + if (Avx512F.IsSupported) + { + return Avx512F.FusedMultiplyAdd(x, y, addend); + } + + return (x * y) + addend; + } +#endif + + private readonly struct AddOperator : IBinaryOperator + { + public static float Invoke(float x, float y) => x + y; + public static Vector128 Invoke(Vector128 x, Vector128 y) => x + y; + public static Vector256 Invoke(Vector256 x, Vector256 y) => x + y; +#if NET8_0_OR_GREATER + public static Vector512 Invoke(Vector512 x, Vector512 y) => x + y; +#endif + + public static float Invoke(Vector128 x) => Vector128.Sum(x); + public static float Invoke(Vector256 x) => Vector256.Sum(x); +#if NET8_0_OR_GREATER + public static float Invoke(Vector512 x) => Vector512.Sum(x); +#endif + } + + private readonly struct SubtractOperator : IBinaryOperator + { + public static float Invoke(float x, float y) => x - y; + public static Vector128 Invoke(Vector128 x, Vector128 y) => x - y; + public static Vector256 Invoke(Vector256 x, Vector256 y) => x - y; +#if NET8_0_OR_GREATER + public static Vector512 Invoke(Vector512 x, Vector512 y) => x - y; +#endif + + public static float Invoke(Vector128 x) => throw new NotSupportedException(); + public static float Invoke(Vector256 x) => throw new NotSupportedException(); +#if NET8_0_OR_GREATER + public static float Invoke(Vector512 x) => throw new NotSupportedException(); +#endif + } + + private readonly struct SubtractSquaredOperator : IBinaryOperator + { + public static float Invoke(float x, float y) + { + float tmp = x - y; + return tmp * tmp; + } + + public static Vector128 Invoke(Vector128 x, Vector128 y) + { + Vector128 tmp = x - y; + return tmp * tmp; + } + + public static Vector256 Invoke(Vector256 x, Vector256 y) + { + Vector256 tmp = x - y; + return tmp * tmp; + } + +#if NET8_0_OR_GREATER + public static Vector512 Invoke(Vector512 x, Vector512 y) + { + Vector512 tmp = x - y; + return tmp * tmp; + } +#endif + + public static float Invoke(Vector128 x) => throw new NotSupportedException(); + public static float Invoke(Vector256 x) => throw new NotSupportedException(); +#if NET8_0_OR_GREATER + public static float Invoke(Vector512 x) => throw new NotSupportedException(); +#endif + } + + private readonly struct MultiplyOperator : IBinaryOperator + { + public static float Invoke(float x, float y) => x * y; + public static Vector128 Invoke(Vector128 x, Vector128 y) => x * y; + public static Vector256 Invoke(Vector256 x, Vector256 y) => x * y; +#if NET8_0_OR_GREATER + public static Vector512 Invoke(Vector512 x, Vector512 y) => x * y; +#endif + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Invoke(Vector128 x) + { + float f = x[0]; + for (int i = 1; i < Vector128.Count; i++) + { + f *= x[i]; + } + return f; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Invoke(Vector256 x) + { + float f = x[0]; + for (int i = 1; i < Vector256.Count; i++) + { + f *= x[i]; + } + return f; + } + +#if NET8_0_OR_GREATER + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Invoke(Vector512 x) + { + float f = x[0]; + for (int i = 1; i < Vector512.Count; i++) + { + f *= x[i]; + } + return f; + } +#endif + } + + private readonly struct DivideOperator : IBinaryOperator + { + public static float Invoke(float x, float y) => x / y; + public static Vector128 Invoke(Vector128 x, Vector128 y) => x / y; + public static Vector256 Invoke(Vector256 x, Vector256 y) => x / y; +#if NET8_0_OR_GREATER + public static Vector512 Invoke(Vector512 x, Vector512 y) => x / y; +#endif + + public static float Invoke(Vector128 x) => throw new NotSupportedException(); + public static float Invoke(Vector256 x) => throw new NotSupportedException(); +#if NET8_0_OR_GREATER + public static float Invoke(Vector512 x) => throw new NotSupportedException(); +#endif + } + + private readonly struct NegateOperator : IUnaryOperator + { + public static float Invoke(float x) => -x; + public static Vector128 Invoke(Vector128 x) => -x; + public static Vector256 Invoke(Vector256 x) => -x; +#if NET8_0_OR_GREATER + public static Vector512 Invoke(Vector512 x) => -x; +#endif + } + + private readonly struct AddMultiplyOperator : ITernaryOperator + { + public static float Invoke(float x, float y, float z) => (x + y) * z; + public static Vector128 Invoke(Vector128 x, Vector128 y, Vector128 z) => (x + y) * z; + public static Vector256 Invoke(Vector256 x, Vector256 y, Vector256 z) => (x + y) * z; +#if NET8_0_OR_GREATER + public static Vector512 Invoke(Vector512 x, Vector512 y, Vector512 z) => (x + y) * z; +#endif + } + + private readonly struct MultiplyAddOperator : ITernaryOperator + { + public static float Invoke(float x, float y, float z) => MathF.FusedMultiplyAdd(x, y, z); + public static Vector128 Invoke(Vector128 x, Vector128 y, Vector128 z) => FusedMultiplyAdd(x, y, z); + public static Vector256 Invoke(Vector256 x, Vector256 y, Vector256 z) => FusedMultiplyAdd(x, y, z); +#if NET8_0_OR_GREATER + public static Vector512 Invoke(Vector512 x, Vector512 y, Vector512 z) => FusedMultiplyAdd(x, y, z); +#endif + } + + private readonly struct IdentityOperator : IUnaryOperator + { + public static float Invoke(float x) => x; + public static Vector128 Invoke(Vector128 x) => x; + public static Vector256 Invoke(Vector256 x) => x; +#if NET8_0_OR_GREATER + public static Vector512 Invoke(Vector512 x) => x; +#endif + } + + private readonly struct SquaredOperator : IUnaryOperator + { + public static float Invoke(float x) => x * x; + public static Vector128 Invoke(Vector128 x) => x * x; + public static Vector256 Invoke(Vector256 x) => x * x; +#if NET8_0_OR_GREATER + public static Vector512 Invoke(Vector512 x) => x * x; +#endif + } + + private readonly struct AbsoluteOperator : IUnaryOperator + { + public static float Invoke(float x) => MathF.Abs(x); + + public static Vector128 Invoke(Vector128 x) + { + Vector128 raw = x.AsUInt32(); + Vector128 mask = Vector128.Create((uint)0x7FFFFFFF); + return (raw & mask).AsSingle(); + } + + public static Vector256 Invoke(Vector256 x) + { + Vector256 raw = x.AsUInt32(); + Vector256 mask = Vector256.Create((uint)0x7FFFFFFF); + return (raw & mask).AsSingle(); + } + +#if NET8_0_OR_GREATER + public static Vector512 Invoke(Vector512 x) + { + Vector512 raw = x.AsUInt32(); + Vector512 mask = Vector512.Create((uint)0x7FFFFFFF); + return (raw & mask).AsSingle(); + } +#endif + } + + private interface IUnaryOperator + { + static abstract float Invoke(float x); + static abstract Vector128 Invoke(Vector128 x); + static abstract Vector256 Invoke(Vector256 x); +#if NET8_0_OR_GREATER + static abstract Vector512 Invoke(Vector512 x); +#endif + } + + private interface IBinaryOperator + { + static abstract float Invoke(float x, float y); + + static abstract Vector128 Invoke(Vector128 x, Vector128 y); + static abstract float Invoke(Vector128 x); + static abstract Vector256 Invoke(Vector256 x, Vector256 y); + static abstract float Invoke(Vector256 x); +#if NET8_0_OR_GREATER + static abstract Vector512 Invoke(Vector512 x, Vector512 y); + static abstract float Invoke(Vector512 x); +#endif + } + + private interface ITernaryOperator + { + static abstract float Invoke(float x, float y, float z); + static abstract Vector128 Invoke(Vector128 x, Vector128 y, Vector128 z); + static abstract Vector256 Invoke(Vector256 x, Vector256 y, Vector256 z); +#if NET8_0_OR_GREATER + static abstract Vector512 Invoke(Vector512 x, Vector512 y, Vector512 z); +#endif + } + } +} diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/TensorPrimitives.netstandard.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/TensorPrimitives.netstandard.cs new file mode 100644 index 00000000000000..ed8b3aea0d560f --- /dev/null +++ b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/TensorPrimitives.netstandard.cs @@ -0,0 +1,602 @@ +// 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.Runtime.InteropServices; + +namespace System.Numerics.Tensors +{ + public static partial class TensorPrimitives + { + private static unsafe bool IsNegative(float f) => *(int*)&f < 0; + + private static float MaxMagnitude(float x, float y) => MathF.Abs(x) >= MathF.Abs(y) ? x : y; + + private static float MinMagnitude(float x, float y) => MathF.Abs(x) < MathF.Abs(y) ? x : y; + + private static float Log2(float x) => MathF.Log(x, 2); + + private static float CosineSimilarityCore(ReadOnlySpan x, ReadOnlySpan y) + { + // Compute the same as: + // TensorPrimitives.Dot(x, y) / (Math.Sqrt(TensorPrimitives.SumOfSquares(x)) * Math.Sqrt(TensorPrimitives.SumOfSquares(y))) + // but only looping over each span once. + + float dotProduct = 0f; + float xSumOfSquares = 0f; + float ySumOfSquares = 0f; + + int i = 0; + + if (Vector.IsHardwareAccelerated && x.Length >= Vector.Count) + { + ref float xRef = ref MemoryMarshal.GetReference(x); + ref float yRef = ref MemoryMarshal.GetReference(y); + + Vector dotProductVector = Vector.Zero; + Vector xSumOfSquaresVector = Vector.Zero; + Vector ySumOfSquaresVector = Vector.Zero; + + // Process vectors, summing their dot products and squares, as long as there's a vector's worth remaining. + int oneVectorFromEnd = x.Length - Vector.Count; + do + { + Vector xVec = AsVector(ref xRef, i); + Vector yVec = AsVector(ref yRef, i); + + dotProductVector += xVec * yVec; + xSumOfSquaresVector += xVec * xVec; + ySumOfSquaresVector += yVec * yVec; + + i += Vector.Count; + } + while (i <= oneVectorFromEnd); + + // Sum the vector lanes into the scalar result. + for (int e = 0; e < Vector.Count; e++) + { + dotProduct += dotProductVector[e]; + xSumOfSquares += xSumOfSquaresVector[e]; + ySumOfSquares += ySumOfSquaresVector[e]; + } + } + + // Process any remaining elements past the last vector. + for (; (uint)i < (uint)x.Length; i++) + { + dotProduct += x[i] * y[i]; + xSumOfSquares += x[i] * x[i]; + ySumOfSquares += y[i] * y[i]; + } + + // Sum(X * Y) / (|X| * |Y|) + return dotProduct / (MathF.Sqrt(xSumOfSquares) * MathF.Sqrt(ySumOfSquares)); + } + + private static float Aggregate( + float identityValue, ReadOnlySpan x, TLoad load = default, TAggregate aggregate = default) + where TLoad : struct, IUnaryOperator + where TAggregate : struct, IBinaryOperator + { + // Initialize the result to the identity value + float result = identityValue; + int i = 0; + + if (Vector.IsHardwareAccelerated && x.Length >= Vector.Count * 2) + { + ref float xRef = ref MemoryMarshal.GetReference(x); + + // Load the first vector as the initial set of results + Vector resultVector = load.Invoke(AsVector(ref xRef, 0)); + int oneVectorFromEnd = x.Length - Vector.Count; + + // Aggregate additional vectors into the result as long as there's at + // least one full vector left to process. + i = Vector.Count; + do + { + resultVector = aggregate.Invoke(resultVector, load.Invoke(AsVector(ref xRef, i))); + i += Vector.Count; + } + while (i <= oneVectorFromEnd); + + // Aggregate the lanes in the vector back into the scalar result + for (int f = 0; f < Vector.Count; f++) + { + result = aggregate.Invoke(result, resultVector[f]); + } + } + + // Aggregate the remaining items in the input span. + for (; (uint)i < (uint)x.Length; i++) + { + result = aggregate.Invoke(result, load.Invoke(x[i])); + } + + return result; + } + + private static float Aggregate( + float identityValue, ReadOnlySpan x, ReadOnlySpan y, TBinary binary = default, TAggregate aggregate = default) + where TBinary : struct, IBinaryOperator + where TAggregate : struct, IBinaryOperator + { + // Initialize the result to the identity value + float result = identityValue; + int i = 0; + + if (Vector.IsHardwareAccelerated && x.Length >= Vector.Count * 2) + { + ref float xRef = ref MemoryMarshal.GetReference(x); + ref float yRef = ref MemoryMarshal.GetReference(y); + + // Load the first vector as the initial set of results + Vector resultVector = binary.Invoke(AsVector(ref xRef, 0), AsVector(ref yRef, 0)); + int oneVectorFromEnd = x.Length - Vector.Count; + + // Aggregate additional vectors into the result as long as there's at + // least one full vector left to process. + i = Vector.Count; + do + { + resultVector = aggregate.Invoke(resultVector, binary.Invoke(AsVector(ref xRef, i), AsVector(ref yRef, i))); + i += Vector.Count; + } + while (i <= oneVectorFromEnd); + + // Aggregate the lanes in the vector back into the scalar result + for (int f = 0; f < Vector.Count; f++) + { + result = aggregate.Invoke(result, resultVector[f]); + } + } + + // Aggregate the remaining items in the input span. + for (; (uint)i < (uint)x.Length; i++) + { + result = aggregate.Invoke(result, binary.Invoke(x[i], y[i])); + } + + return result; + } + + private static void InvokeSpanIntoSpan( + ReadOnlySpan x, Span destination, TUnaryOperator op = default) + where TUnaryOperator : struct, IUnaryOperator + { + if (x.Length > destination.Length) + { + ThrowHelper.ThrowArgument_DestinationTooShort(); + } + + ref float xRef = ref MemoryMarshal.GetReference(x); + ref float dRef = ref MemoryMarshal.GetReference(destination); + int i = 0, oneVectorFromEnd; + + if (Vector.IsHardwareAccelerated) + { + oneVectorFromEnd = x.Length - Vector.Count; + if (oneVectorFromEnd >= 0) + { + // Loop handling one vector at a time. + do + { + AsVector(ref dRef, i) = op.Invoke(AsVector(ref xRef, i)); + + i += Vector.Count; + } + while (i <= oneVectorFromEnd); + + // Handle any remaining elements with a final vector. + if (i != x.Length) + { + int lastVectorIndex = x.Length - Vector.Count; + AsVector(ref dRef, lastVectorIndex) = op.Invoke(AsVector(ref xRef, lastVectorIndex)); + } + + return; + } + } + + // Loop handling one element at a time. + while (i < x.Length) + { + Unsafe.Add(ref dRef, i) = op.Invoke(Unsafe.Add(ref xRef, i)); + + i++; + } + } + + private static void InvokeSpanSpanIntoSpan( + ReadOnlySpan x, ReadOnlySpan y, Span destination, TBinaryOperator op = default) + where TBinaryOperator : struct, IBinaryOperator + { + if (x.Length != y.Length) + { + ThrowHelper.ThrowArgument_SpansMustHaveSameLength(); + } + + if (x.Length > destination.Length) + { + ThrowHelper.ThrowArgument_DestinationTooShort(); + } + + ref float xRef = ref MemoryMarshal.GetReference(x); + ref float yRef = ref MemoryMarshal.GetReference(y); + ref float dRef = ref MemoryMarshal.GetReference(destination); + int i = 0, oneVectorFromEnd; + + if (Vector.IsHardwareAccelerated) + { + oneVectorFromEnd = x.Length - Vector.Count; + if (oneVectorFromEnd >= 0) + { + // Loop handling one vector at a time. + do + { + AsVector(ref dRef, i) = op.Invoke(AsVector(ref xRef, i), + AsVector(ref yRef, i)); + + i += Vector.Count; + } + while (i <= oneVectorFromEnd); + + // Handle any remaining elements with a final vector. + if (i != x.Length) + { + int lastVectorIndex = x.Length - Vector.Count; + AsVector(ref dRef, lastVectorIndex) = op.Invoke(AsVector(ref xRef, lastVectorIndex), + AsVector(ref yRef, lastVectorIndex)); + } + + return; + } + } + + while (i < x.Length) + { + Unsafe.Add(ref dRef, i) = op.Invoke(Unsafe.Add(ref xRef, i), + Unsafe.Add(ref yRef, i)); + + i++; + } + } + + private static void InvokeSpanScalarIntoSpan( + ReadOnlySpan x, float y, Span destination, TBinaryOperator op = default) + where TBinaryOperator : struct, IBinaryOperator + { + if (x.Length > destination.Length) + { + ThrowHelper.ThrowArgument_DestinationTooShort(); + } + + ref float xRef = ref MemoryMarshal.GetReference(x); + ref float dRef = ref MemoryMarshal.GetReference(destination); + int i = 0, oneVectorFromEnd; + + if (Vector.IsHardwareAccelerated) + { + oneVectorFromEnd = x.Length - Vector.Count; + if (oneVectorFromEnd >= 0) + { + // Loop handling one vector at a time. + Vector yVec = new(y); + do + { + AsVector(ref dRef, i) = op.Invoke(AsVector(ref xRef, i), + yVec); + + i += Vector.Count; + } + while (i <= oneVectorFromEnd); + + // Handle any remaining elements with a final vector. + if (i != x.Length) + { + int lastVectorIndex = x.Length - Vector.Count; + AsVector(ref dRef, lastVectorIndex) = op.Invoke(AsVector(ref xRef, lastVectorIndex), + yVec); + } + + return; + } + } + + // Loop handling one element at a time. + while (i < x.Length) + { + Unsafe.Add(ref dRef, i) = op.Invoke(Unsafe.Add(ref xRef, i), + y); + + i++; + } + } + + private static void InvokeSpanSpanSpanIntoSpan( + ReadOnlySpan x, ReadOnlySpan y, ReadOnlySpan z, Span destination, TTernaryOperator op = default) + where TTernaryOperator : struct, ITernaryOperator + { + if (x.Length != y.Length || x.Length != z.Length) + { + ThrowHelper.ThrowArgument_SpansMustHaveSameLength(); + } + + if (x.Length > destination.Length) + { + ThrowHelper.ThrowArgument_DestinationTooShort(); + } + + ref float xRef = ref MemoryMarshal.GetReference(x); + ref float yRef = ref MemoryMarshal.GetReference(y); + ref float zRef = ref MemoryMarshal.GetReference(z); + ref float dRef = ref MemoryMarshal.GetReference(destination); + int i = 0, oneVectorFromEnd; + + if (Vector.IsHardwareAccelerated) + { + oneVectorFromEnd = x.Length - Vector.Count; + if (oneVectorFromEnd >= 0) + { + // Loop handling one vector at a time. + do + { + AsVector(ref dRef, i) = op.Invoke(AsVector(ref xRef, i), + AsVector(ref yRef, i), + AsVector(ref zRef, i)); + + i += Vector.Count; + } + while (i <= oneVectorFromEnd); + + // Handle any remaining elements with a final vector. + if (i != x.Length) + { + int lastVectorIndex = x.Length - Vector.Count; + AsVector(ref dRef, lastVectorIndex) = op.Invoke(AsVector(ref xRef, lastVectorIndex), + AsVector(ref yRef, lastVectorIndex), + AsVector(ref zRef, lastVectorIndex)); + } + + return; + } + } + + // Loop handling one element at a time. + while (i < x.Length) + { + Unsafe.Add(ref dRef, i) = op.Invoke(Unsafe.Add(ref xRef, i), + Unsafe.Add(ref yRef, i), + Unsafe.Add(ref zRef, i)); + + i++; + } + } + + private static void InvokeSpanSpanScalarIntoSpan( + ReadOnlySpan x, ReadOnlySpan y, float z, Span destination, TTernaryOperator op = default) + where TTernaryOperator : struct, ITernaryOperator + { + if (x.Length != y.Length) + { + ThrowHelper.ThrowArgument_SpansMustHaveSameLength(); + } + + if (x.Length > destination.Length) + { + ThrowHelper.ThrowArgument_DestinationTooShort(); + } + + ref float xRef = ref MemoryMarshal.GetReference(x); + ref float yRef = ref MemoryMarshal.GetReference(y); + ref float dRef = ref MemoryMarshal.GetReference(destination); + int i = 0, oneVectorFromEnd; + + if (Vector.IsHardwareAccelerated) + { + oneVectorFromEnd = x.Length - Vector.Count; + if (oneVectorFromEnd >= 0) + { + Vector zVec = new(z); + + // Loop handling one vector at a time. + do + { + AsVector(ref dRef, i) = op.Invoke(AsVector(ref xRef, i), + AsVector(ref yRef, i), + zVec); + + i += Vector.Count; + } + while (i <= oneVectorFromEnd); + + // Handle any remaining elements with a final vector. + if (i != x.Length) + { + int lastVectorIndex = x.Length - Vector.Count; + AsVector(ref dRef, lastVectorIndex) = op.Invoke(AsVector(ref xRef, lastVectorIndex), + AsVector(ref yRef, lastVectorIndex), + zVec); + } + + return; + } + } + + // Loop handling one element at a time. + while (i < x.Length) + { + Unsafe.Add(ref dRef, i) = op.Invoke(Unsafe.Add(ref xRef, i), + Unsafe.Add(ref yRef, i), + z); + + i++; + } + } + + private static void InvokeSpanScalarSpanIntoSpan( + ReadOnlySpan x, float y, ReadOnlySpan z, Span destination, TTernaryOperator op = default) + where TTernaryOperator : struct, ITernaryOperator + { + if (x.Length != z.Length) + { + ThrowHelper.ThrowArgument_SpansMustHaveSameLength(); + } + + if (x.Length > destination.Length) + { + ThrowHelper.ThrowArgument_DestinationTooShort(); + } + + ref float xRef = ref MemoryMarshal.GetReference(x); + ref float zRef = ref MemoryMarshal.GetReference(z); + ref float dRef = ref MemoryMarshal.GetReference(destination); + int i = 0, oneVectorFromEnd; + + if (Vector.IsHardwareAccelerated) + { + oneVectorFromEnd = x.Length - Vector.Count; + if (oneVectorFromEnd >= 0) + { + Vector yVec = new(y); + + // Loop handling one vector at a time. + do + { + AsVector(ref dRef, i) = op.Invoke(AsVector(ref xRef, i), + yVec, + AsVector(ref zRef, i)); + + i += Vector.Count; + } + while (i <= oneVectorFromEnd); + + // Handle any remaining elements with a final vector. + if (i != x.Length) + { + int lastVectorIndex = x.Length - Vector.Count; + AsVector(ref dRef, lastVectorIndex) = op.Invoke(AsVector(ref xRef, lastVectorIndex), + yVec, + AsVector(ref zRef, lastVectorIndex)); + } + + return; + } + } + + // Loop handling one element at a time. + while (i < x.Length) + { + Unsafe.Add(ref dRef, i) = op.Invoke(Unsafe.Add(ref xRef, i), + y, + Unsafe.Add(ref zRef, i)); + + i++; + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static ref Vector AsVector(ref float start, int offset) => + ref Unsafe.As>( + ref Unsafe.Add(ref start, offset)); + + private readonly struct AddOperator : IBinaryOperator + { + public float Invoke(float x, float y) => x + y; + public Vector Invoke(Vector x, Vector y) => x + y; + } + + private readonly struct SubtractOperator : IBinaryOperator + { + public float Invoke(float x, float y) => x - y; + public Vector Invoke(Vector x, Vector y) => x - y; + } + + private readonly struct SubtractSquaredOperator : IBinaryOperator + { + public float Invoke(float x, float y) + { + float tmp = x - y; + return tmp * tmp; + } + + public Vector Invoke(Vector x, Vector y) + { + Vector tmp = x - y; + return tmp * tmp; + } + } + + private readonly struct MultiplyOperator : IBinaryOperator + { + public float Invoke(float x, float y) => x * y; + public Vector Invoke(Vector x, Vector y) => x * y; + } + + private readonly struct DivideOperator : IBinaryOperator + { + public float Invoke(float x, float y) => x / y; + public Vector Invoke(Vector x, Vector y) => x / y; + } + + private readonly struct NegateOperator : IUnaryOperator + { + public float Invoke(float x) => -x; + public Vector Invoke(Vector x) => -x; + } + + private readonly struct AddMultiplyOperator : ITernaryOperator + { + public float Invoke(float x, float y, float z) => (x + y) * z; + public Vector Invoke(Vector x, Vector y, Vector z) => (x + y) * z; + } + + private readonly struct MultiplyAddOperator : ITernaryOperator + { + public float Invoke(float x, float y, float z) => (x * y) + z; + public Vector Invoke(Vector x, Vector y, Vector z) => (x * y) + z; + } + + private readonly struct IdentityOperator : IUnaryOperator + { + public float Invoke(float x) => x; + public Vector Invoke(Vector x) => x; + } + + private readonly struct SquaredOperator : IUnaryOperator + { + public float Invoke(float x) => x * x; + public Vector Invoke(Vector x) => x * x; + } + + private readonly struct AbsoluteOperator : IUnaryOperator + { + public float Invoke(float x) => MathF.Abs(x); + + public Vector Invoke(Vector x) + { + Vector raw = Vector.AsVectorUInt32(x); + Vector mask = new Vector(0x7FFFFFFF); + return Vector.AsVectorSingle(raw & mask); + } + } + + private interface IUnaryOperator + { + float Invoke(float x); + Vector Invoke(Vector x); + } + + private interface IBinaryOperator + { + float Invoke(float x, float y); + Vector Invoke(Vector x, Vector y); + } + + private interface ITernaryOperator + { + float Invoke(float x, float y, float z); + Vector Invoke(Vector x, Vector y, Vector z); + } + } +} diff --git a/src/libraries/System.Numerics.Tensors/src/System/ThrowHelper.cs b/src/libraries/System.Numerics.Tensors/src/System/ThrowHelper.cs new file mode 100644 index 00000000000000..902b27787e856c --- /dev/null +++ b/src/libraries/System.Numerics.Tensors/src/System/ThrowHelper.cs @@ -0,0 +1,22 @@ +// 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; + +namespace System +{ + internal static class ThrowHelper + { + [DoesNotReturn] + public static void ThrowArgument_DestinationTooShort() => + throw new ArgumentException(SR.Argument_DestinationTooShort, "destination"); + + [DoesNotReturn] + public static void ThrowArgument_SpansMustHaveSameLength() => + throw new ArgumentException(SR.Argument_SpansMustHaveSameLength); + + [DoesNotReturn] + public static void ThrowArgument_SpansMustBeNonEmpty() => + throw new ArgumentException(SR.Argument_SpansMustBeNonEmpty); + } +} diff --git a/src/libraries/System.Numerics.Tensors/tests/NativeMemory.cs b/src/libraries/System.Numerics.Tensors/tests/NativeMemory.cs deleted file mode 100644 index b5c9ef8c2c2c92..00000000000000 --- a/src/libraries/System.Numerics.Tensors/tests/NativeMemory.cs +++ /dev/null @@ -1,108 +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.Buffers; -using System.Runtime.InteropServices; -using System.Runtime.CompilerServices; -using System.Threading; - -namespace System.Numerics.Tensors.Tests -{ - public class NativeMemory : MemoryManager - { - private bool disposed = false; - private int refCount = 0; - private IntPtr memory; - private int length; - - public NativeMemory(IntPtr memory, int length) - { - this.memory = memory; - this.length = length; - } - - public unsafe NativeMemory(void* memory, int length) - { - this.memory = (IntPtr)memory; - this.length = length; - } - - ~NativeMemory() - { - Dispose(false); - } - - public static NativeMemory Allocate(int length) - { - // typically this would call into a native method appropriate for the platform - // or the constructors above would be used to wrap the native pointer - IntPtr memory = Marshal.AllocHGlobal(Marshal.SizeOf() * length); - return new NativeMemory(memory, length); - } - - public bool IsDisposed => disposed; - - public unsafe override Span GetSpan() => new Span((void*)memory, length); - - protected bool IsRetained => refCount > 0; - - public override MemoryHandle Pin(int elementIndex = 0) - { - unsafe - { - Retain(); - if ((uint)elementIndex > length) throw new ArgumentOutOfRangeException(nameof(elementIndex)); - void* pointer = Unsafe.Add((void*)memory, elementIndex); - return new MemoryHandle(pointer, default, this); - } - } - - public bool Release() - { - int newRefCount = Interlocked.Decrement(ref refCount); - - if (newRefCount < 0) - { - throw new InvalidOperationException("Unmatched Release/Retain"); - } - - return newRefCount != 0; - } - - public void Retain() - { - if (disposed) - { - throw new ObjectDisposedException(nameof(NativeMemory)); - } - - Interlocked.Increment(ref refCount); - } - - protected override void Dispose(bool disposing) - { - if (disposed) - { - return; - } - - // typically this would call into a native method appropriate for the platform - Marshal.FreeHGlobal(memory); - memory = IntPtr.Zero; - - disposed = true; - } - - protected override bool TryGetArray(out ArraySegment arraySegment) - { - // cannot expose managed array - arraySegment = default; - return false; - } - - public override void Unpin() - { - Release(); - } - } -} diff --git a/src/libraries/System.Numerics.Tensors/tests/System.Numerics.Tensors.Tests.csproj b/src/libraries/System.Numerics.Tensors/tests/System.Numerics.Tensors.Tests.csproj index 042e4791b6a3d8..be4a103d7256ce 100644 --- a/src/libraries/System.Numerics.Tensors/tests/System.Numerics.Tensors.Tests.csproj +++ b/src/libraries/System.Numerics.Tensors/tests/System.Numerics.Tensors.Tests.csproj @@ -1,41 +1,21 @@ + - true $(NetCoreAppCurrent);$(NetFrameworkMinimum) + true + - - - True - True - TensorArithmetic.tt - - - - True - True - TensorOperations.tt - - - + - - - TextTemplatingFileGenerator - TensorArithmetic.cs - - - TextTemplatingFileGenerator - TensorOperations.cs - - + + + + - - - - + \ No newline at end of file diff --git a/src/libraries/System.Numerics.Tensors/tests/TensorArithmetic.cs b/src/libraries/System.Numerics.Tensors/tests/TensorArithmetic.cs deleted file mode 100644 index 6dae2ec6854252..00000000000000 --- a/src/libraries/System.Numerics.Tensors/tests/TensorArithmetic.cs +++ /dev/null @@ -1,16165 +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.Numerics.Tensors -{ - internal interface ITensorArithmetic - { - T One { get; } - T Zero { get; } - void Add(Tensor left, Tensor right, Tensor result); - void Add(Tensor tensor, T scalar, Tensor result); - void And(Tensor left, Tensor right, Tensor result); - void And(Tensor tensor, T scalar, Tensor result); - void Contract(Tensor left, Tensor right, int[] leftAxes, int[] rightAxes, Tensor result); - void Decrement(Tensor tensor, Tensor result); - void Divide(Tensor left, Tensor right, Tensor result); - void Divide(Tensor tensor, T scalar, Tensor result); - void Equals(Tensor left, Tensor right, Tensor result); - void GreaterThan(Tensor left, Tensor right, Tensor result); - void GreaterThanOrEqual(Tensor left, Tensor right, Tensor result); - void Increment(Tensor tensor, Tensor result); - void LeftShift(Tensor tensor, int value, Tensor result); - void LessThan(Tensor left, Tensor right, Tensor result); - void LessThanOrEqual(Tensor left, Tensor right, Tensor result); - void Modulo(Tensor left, Tensor right, Tensor result); - void Modulo(Tensor tensor, T scalar, Tensor result); - void Multiply(Tensor left, Tensor right, Tensor result); - void Multiply(Tensor tensor, T scalar, Tensor result); - void NotEquals(Tensor left, Tensor right, Tensor result); - void Or(Tensor left, Tensor right, Tensor result); - void Or(Tensor tensor, T scalar, Tensor result); - void RightShift(Tensor tensor, int value, Tensor result); - void Subtract(Tensor left, Tensor right, Tensor result); - void Subtract(Tensor tensor, T scalar, Tensor result); - void UnaryMinus(Tensor tensor, Tensor result); - void UnaryPlus(Tensor tensor, Tensor result); - void Xor(Tensor left, Tensor right, Tensor result); - void Xor(Tensor tensor, T scalar, Tensor result); - } - - internal static class TensorArithmetic - { - public static ITensorArithmetic Instance => TensorArithmetic.GetArithmetic(); - } - - internal static class TensorArithmetic - { - public static ITensorArithmetic GetArithmetic() - { - if (typeof(T) == typeof(bool)) - { - return (ITensorArithmetic)new BoolArithmetic(); - } - else if (typeof(T) == typeof(byte)) - { - return (ITensorArithmetic)new ByteArithmetic(); - } - else if (typeof(T) == typeof(char)) - { - return (ITensorArithmetic)new CharArithmetic(); - } - else if (typeof(T) == typeof(decimal)) - { - return (ITensorArithmetic)new DecimalArithmetic(); - } - else if (typeof(T) == typeof(double)) - { - return (ITensorArithmetic)new DoubleArithmetic(); - } - else if (typeof(T) == typeof(float)) - { - return (ITensorArithmetic)new FloatArithmetic(); - } - else if (typeof(T) == typeof(int)) - { - return (ITensorArithmetic)new IntArithmetic(); - } - else if (typeof(T) == typeof(long)) - { - return (ITensorArithmetic)new LongArithmetic(); - } - else if (typeof(T) == typeof(sbyte)) - { - return (ITensorArithmetic)new SByteArithmetic(); - } - else if (typeof(T) == typeof(short)) - { - return (ITensorArithmetic)new ShortArithmetic(); - } - else if (typeof(T) == typeof(uint)) - { - return (ITensorArithmetic)new UIntArithmetic(); - } - else if (typeof(T) == typeof(ulong)) - { - return (ITensorArithmetic)new ULongArithmetic(); - } - else if (typeof(T) == typeof(ushort)) - { - return (ITensorArithmetic)new UShortArithmetic(); - } - return null; - } - } - - internal class BoolArithmetic : ITensorArithmetic - { - public bool One => true; - public bool Zero => false; - - public void Add(Tensor left, Tensor right, Tensor result) - { - throw new NotSupportedException(); - } - public void Add(Tensor tensor, bool scalar, Tensor result) - { - throw new NotSupportedException(); - } - public void And(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (bool)(left[indices] & right[indices]); - } - - } - public void And(Tensor tensor, bool scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (bool)(tensor[indices] & scalar); - } - - } - public void Contract(Tensor left, Tensor right, int[] leftAxes, int[] rightAxes, Tensor result) - { - throw new NotSupportedException(); - } - public void Decrement(Tensor tensor, Tensor result) - { - throw new NotSupportedException(); - } - public void Divide(Tensor left, Tensor right, Tensor result) - { - throw new NotSupportedException(); - } - public void Divide(Tensor tensor, bool scalar, Tensor result) - { - throw new NotSupportedException(); - } - public void Equals(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] == right[indices]; - } - - } - public void GreaterThan(Tensor left, Tensor right, Tensor result) - { - throw new NotSupportedException(); - } - public void GreaterThanOrEqual(Tensor left, Tensor right, Tensor result) - { - throw new NotSupportedException(); - } - public void Increment(Tensor tensor, Tensor result) - { - throw new NotSupportedException(); - } - public void LeftShift(Tensor tensor, int value, Tensor result) - { - throw new NotSupportedException(); - } - public void LessThan(Tensor left, Tensor right, Tensor result) - { - throw new NotSupportedException(); - } - public void LessThanOrEqual(Tensor left, Tensor right, Tensor result) - { - throw new NotSupportedException(); - } - public void Modulo(Tensor left, Tensor right, Tensor result) - { - throw new NotSupportedException(); - } - public void Modulo(Tensor tensor, bool scalar, Tensor result) - { - throw new NotSupportedException(); - } - public void Multiply(Tensor left, Tensor right, Tensor result) - { - throw new NotSupportedException(); - } - public void Multiply(Tensor tensor, bool scalar, Tensor result) - { - throw new NotSupportedException(); - } - public void NotEquals(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] != right[indices]; - } - - } - public void Or(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (bool)(left[indices] | right[indices]); - } - - } - public void Or(Tensor tensor, bool scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (bool)(tensor[indices] | scalar); - } - - } - public void RightShift(Tensor tensor, int value, Tensor result) - { - throw new NotSupportedException(); - } - public void Subtract(Tensor left, Tensor right, Tensor result) - { - throw new NotSupportedException(); - } - public void Subtract(Tensor tensor, bool scalar, Tensor result) - { - throw new NotSupportedException(); - } - public void UnaryMinus(Tensor tensor, Tensor result) - { - throw new NotSupportedException(); - } - public void UnaryPlus(Tensor tensor, Tensor result) - { - throw new NotSupportedException(); - } - public void Xor(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (bool)(left[indices] ^ right[indices]); - } - - } - public void Xor(Tensor tensor, bool scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (bool)(tensor[indices] ^ scalar); - } - - } - - public void Add(DenseTensor left, DenseTensor right, DenseTensor result) - { - throw new NotSupportedException(); - } - public void Add(DenseTensor tensor, bool scalar, DenseTensor result) - { - throw new NotSupportedException(); - } - public void And(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (bool)(leftSpan[i] & rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (bool)(leftSpan[op1Index] & rightSpan[op2Index]); - - } - } - } - public void And(DenseTensor tensor, bool scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (bool)(tensorSpan[i] & scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (bool)(tensorSpan[op1Index] & scalar); - - } - } - } - public void Contract(DenseTensor left, DenseTensor right, int[] leftAxes, int[] rightAxes, DenseTensor result) - { - throw new NotSupportedException(); - } - public void Decrement(DenseTensor tensor, DenseTensor result) - { - throw new NotSupportedException(); - } - public void Divide(DenseTensor left, DenseTensor right, DenseTensor result) - { - throw new NotSupportedException(); - } - public void Divide(DenseTensor tensor, bool scalar, DenseTensor result) - { - throw new NotSupportedException(); - } - public void Equals(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] == rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] == rightSpan[op2Index]; - - } - } - } - public void GreaterThan(DenseTensor left, DenseTensor right, DenseTensor result) - { - throw new NotSupportedException(); - } - public void GreaterThanOrEqual(DenseTensor left, DenseTensor right, DenseTensor result) - { - throw new NotSupportedException(); - } - public void Increment(DenseTensor tensor, DenseTensor result) - { - throw new NotSupportedException(); - } - public void LeftShift(DenseTensor tensor, int value, DenseTensor result) - { - throw new NotSupportedException(); - } - public void LessThan(DenseTensor left, DenseTensor right, DenseTensor result) - { - throw new NotSupportedException(); - } - public void LessThanOrEqual(DenseTensor left, DenseTensor right, DenseTensor result) - { - throw new NotSupportedException(); - } - public void Modulo(DenseTensor left, DenseTensor right, DenseTensor result) - { - throw new NotSupportedException(); - } - public void Modulo(DenseTensor tensor, bool scalar, DenseTensor result) - { - throw new NotSupportedException(); - } - public void Multiply(DenseTensor left, DenseTensor right, DenseTensor result) - { - throw new NotSupportedException(); - } - public void Multiply(DenseTensor tensor, bool scalar, DenseTensor result) - { - throw new NotSupportedException(); - } - public void NotEquals(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] != rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] != rightSpan[op2Index]; - - } - } - } - public void Or(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (bool)(leftSpan[i] | rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (bool)(leftSpan[op1Index] | rightSpan[op2Index]); - - } - } - } - public void Or(DenseTensor tensor, bool scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (bool)(tensorSpan[i] | scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (bool)(tensorSpan[op1Index] | scalar); - - } - } - } - public void RightShift(DenseTensor tensor, int value, DenseTensor result) - { - throw new NotSupportedException(); - } - public void Subtract(DenseTensor left, DenseTensor right, DenseTensor result) - { - throw new NotSupportedException(); - } - public void Subtract(DenseTensor tensor, bool scalar, DenseTensor result) - { - throw new NotSupportedException(); - } - public void UnaryMinus(DenseTensor tensor, DenseTensor result) - { - throw new NotSupportedException(); - } - public void UnaryPlus(DenseTensor tensor, DenseTensor result) - { - throw new NotSupportedException(); - } - public void Xor(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (bool)(leftSpan[i] ^ rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (bool)(leftSpan[op1Index] ^ rightSpan[op2Index]); - - } - } - } - public void Xor(DenseTensor tensor, bool scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (bool)(tensorSpan[i] ^ scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (bool)(tensorSpan[op1Index] ^ scalar); - - } - } - } - } - internal class ByteArithmetic : ITensorArithmetic - { - public byte One => 1; - public byte Zero => 0; - - public void Add(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (byte)(left[indices] + right[indices]); - } - - } - public void Add(Tensor tensor, byte scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (byte)(tensor[indices] + scalar); - } - - } - public void And(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (byte)(left[indices] & right[indices]); - } - - } - public void And(Tensor tensor, byte scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (byte)(tensor[indices] & scalar); - } - - } - public void Contract(Tensor left, Tensor right, int[] leftAxes, int[] rightAxes, Tensor result) - { - var leftIndices = new int[left.Rank]; - var rightIndices = new int[right.Rank]; - var resultIndices = new int[result.Rank]; - - var summingDimensions = new int[leftAxes.Length]; - for (int i = 0; i < leftAxes.Length; i++) - { - summingDimensions[i] = left.dimensions[leftAxes[i]]; - } - - var summingStrides = ArrayUtilities.GetStrides(summingDimensions); - int summingLength = (int)ArrayUtilities.GetProduct(summingDimensions); - - var resultStrides = result.strides; - - // translates from result index to left non-summing dimensions' index portion - // since left non-summing dimensions are given precedence in result, the end is zero-padded - int[] leftNonSummingStrides = new int[result.Rank]; - - // translates from summing index to left summing dimensions' index portion - int[] leftSummingStrides = new int[leftAxes.Length]; - ArrayUtilities.SplitStrides(left.strides, leftAxes, leftNonSummingStrides, 0, leftSummingStrides, 0); - - // translates from result index to right non-summing dimensions' index portion - int[] rightNonSummingStrides = new int[result.Rank]; - // right non-summing dimensions appear after left non-summing dimensions. - int rightNonSummingStridesOffset = (left.Rank - leftAxes.Length); - - // translates from summing index to right summing dimensions' index portion - int[] rightSummingStrides = new int[rightAxes.Length]; - ArrayUtilities.SplitStrides(right.strides, rightAxes, rightNonSummingStrides, rightNonSummingStridesOffset, rightSummingStrides, 0); - - for (int resultIndex = 0; resultIndex < result.Length; resultIndex++) - { - byte sum = (byte)0; - - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, resultIndex, resultIndices); - - int leftIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, leftNonSummingStrides); - int rightIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, rightNonSummingStrides); - - for (int summingIndex = 0; summingIndex < summingLength; summingIndex++) - { - int leftIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, leftSummingStrides); - int rightIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, rightSummingStrides); - - int leftIndex = leftIndexNonSumming + leftIndexSumming; - int rightIndex = rightIndexNonSumming + rightIndexSumming; - - // todo, make this more efficient - ArrayUtilities.GetIndices(left.strides, left.IsReversedStride, leftIndex, leftIndices); - ArrayUtilities.GetIndices(right.strides, right.IsReversedStride, rightIndex, rightIndices); - - sum += (byte)(left[leftIndices] * right[rightIndices]); - } - - result[resultIndices] = sum; - } - } - public void Decrement(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices]--; - } - - } - public void Divide(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (byte)(left[indices] / right[indices]); - } - - } - public void Divide(Tensor tensor, byte scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (byte)(tensor[indices] / scalar); - } - - } - public void Equals(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] == right[indices]; - } - - } - public void GreaterThan(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] > right[indices]; - } - - } - public void GreaterThanOrEqual(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] >= right[indices]; - } - - } - public void Increment(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices]++; - } - - } - public void LeftShift(Tensor tensor, int value, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (byte)(tensor[indices] << value); - } - - } - public void LessThan(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] < right[indices]; - } - - } - public void LessThanOrEqual(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] <= right[indices]; - } - - } - public void Modulo(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (byte)(left[indices] % right[indices]); - } - - } - public void Modulo(Tensor tensor, byte scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (byte)(tensor[indices] % scalar); - } - - } - public void Multiply(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (byte)(left[indices] * right[indices]); - } - - } - public void Multiply(Tensor tensor, byte scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (byte)(tensor[indices] * scalar); - } - - } - public void NotEquals(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] != right[indices]; - } - - } - public void Or(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (byte)(left[indices] | right[indices]); - } - - } - public void Or(Tensor tensor, byte scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (byte)(tensor[indices] | scalar); - } - - } - public void RightShift(Tensor tensor, int value, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (byte)(tensor[indices] >> value); - } - - } - public void Subtract(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (byte)(left[indices] - right[indices]); - } - - } - public void Subtract(Tensor tensor, byte scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (byte)(tensor[indices] - scalar); - } - - } - public void UnaryMinus(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (byte)-tensor[indices]; - } - - } - public void UnaryPlus(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (byte)+tensor[indices]; - } - - } - public void Xor(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (byte)(left[indices] ^ right[indices]); - } - - } - public void Xor(Tensor tensor, byte scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (byte)(tensor[indices] ^ scalar); - } - - } - - public void Add(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (byte)(leftSpan[i] + rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (byte)(leftSpan[op1Index] + rightSpan[op2Index]); - - } - } - } - public void Add(DenseTensor tensor, byte scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (byte)(tensorSpan[i] + scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (byte)(tensorSpan[op1Index] + scalar); - - } - } - } - public void And(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (byte)(leftSpan[i] & rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (byte)(leftSpan[op1Index] & rightSpan[op2Index]); - - } - } - } - public void And(DenseTensor tensor, byte scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (byte)(tensorSpan[i] & scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (byte)(tensorSpan[op1Index] & scalar); - - } - } - } - public void Contract(DenseTensor left, DenseTensor right, int[] leftAxes, int[] rightAxes, DenseTensor result) - { - var summingDimensions = new int[leftAxes.Length]; - for (int i = 0; i < leftAxes.Length; i++) - { - summingDimensions[i] = left.dimensions[leftAxes[i]]; - } - - var summingStrides = ArrayUtilities.GetStrides(summingDimensions); - int summingLength = (int)ArrayUtilities.GetProduct(summingDimensions); - - var resultStrides = result.strides; - - // translates from result index to left non-summing dimensions' index portion - // since left non-summing dimensions are given precedence in result, the end is zero-padded - int[] leftNonSummingStrides = new int[result.Rank]; - - // translates from summing index to left summing dimensions' index portion - int[] leftSummingStrides = new int[leftAxes.Length]; - ArrayUtilities.SplitStrides(left.strides, leftAxes, leftNonSummingStrides, 0, leftSummingStrides, 0); - - // translates from result index to right non-summing dimensions' index portion - int[] rightNonSummingStrides = new int[result.Rank]; - // right non-summing dimensions appear after left non-summing dimensions. - int rightNonSummingStridesOffset = (left.Rank - leftAxes.Length); - - // translates from summing index to right summing dimensions' index portion - int[] rightSummingStrides = new int[rightAxes.Length]; - ArrayUtilities.SplitStrides(right.strides, rightAxes, rightNonSummingStrides, rightNonSummingStridesOffset, rightSummingStrides, 0); - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - - for (int resultIndex = 0; resultIndex < resultSpan.Length; resultIndex++) - { - byte sum = (byte)0; - - int leftIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, leftNonSummingStrides); - int rightIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, rightNonSummingStrides); - - for (int summingIndex = 0; summingIndex < summingLength; summingIndex++) - { - int leftIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, leftSummingStrides); - int rightIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, rightSummingStrides); - - int leftIndex = leftIndexNonSumming + leftIndexSumming; - int rightIndex = rightIndexNonSumming + rightIndexSumming; - - sum += (byte)(leftSpan[leftIndex] * rightSpan[rightIndex]); - } - - resultSpan[resultIndex] = sum; - } - } - public void Decrement(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i]--; - } - } - public void Divide(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (byte)(leftSpan[i] / rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (byte)(leftSpan[op1Index] / rightSpan[op2Index]); - - } - } - } - public void Divide(DenseTensor tensor, byte scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (byte)(tensorSpan[i] / scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (byte)(tensorSpan[op1Index] / scalar); - - } - } - } - public void Equals(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] == rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] == rightSpan[op2Index]; - - } - } - } - public void GreaterThan(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] > rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] > rightSpan[op2Index]; - - } - } - } - public void GreaterThanOrEqual(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] >= rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] >= rightSpan[op2Index]; - - } - } - } - public void Increment(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i]++; - } - } - public void LeftShift(DenseTensor tensor, int value, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (byte)(tensorSpan[i] << value); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (byte)(tensorSpan[op1Index] << value); - - } - } - } - public void LessThan(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] < rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] < rightSpan[op2Index]; - - } - } - } - public void LessThanOrEqual(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] <= rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] <= rightSpan[op2Index]; - - } - } - } - public void Modulo(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (byte)(leftSpan[i] % rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (byte)(leftSpan[op1Index] % rightSpan[op2Index]); - - } - } - } - public void Modulo(DenseTensor tensor, byte scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (byte)(tensorSpan[i] % scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (byte)(tensorSpan[op1Index] % scalar); - - } - } - } - public void Multiply(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (byte)(leftSpan[i] * rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (byte)(leftSpan[op1Index] * rightSpan[op2Index]); - - } - } - } - public void Multiply(DenseTensor tensor, byte scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (byte)(tensorSpan[i] * scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (byte)(tensorSpan[op1Index] * scalar); - - } - } - } - public void NotEquals(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] != rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] != rightSpan[op2Index]; - - } - } - } - public void Or(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (byte)(leftSpan[i] | rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (byte)(leftSpan[op1Index] | rightSpan[op2Index]); - - } - } - } - public void Or(DenseTensor tensor, byte scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (byte)(tensorSpan[i] | scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (byte)(tensorSpan[op1Index] | scalar); - - } - } - } - public void RightShift(DenseTensor tensor, int value, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (byte)(tensorSpan[i] >> value); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (byte)(tensorSpan[op1Index] >> value); - - } - } - } - public void Subtract(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (byte)(leftSpan[i] - rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (byte)(leftSpan[op1Index] - rightSpan[op2Index]); - - } - } - } - public void Subtract(DenseTensor tensor, byte scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (byte)(tensorSpan[i] - scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (byte)(tensorSpan[op1Index] - scalar); - - } - } - } - public void UnaryMinus(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (byte)-tensorSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (byte)-tensorSpan[op1Index]; - - } - } - } - public void UnaryPlus(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (byte)+tensorSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (byte)+tensorSpan[op1Index]; - - } - } - } - public void Xor(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (byte)(leftSpan[i] ^ rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (byte)(leftSpan[op1Index] ^ rightSpan[op2Index]); - - } - } - } - public void Xor(DenseTensor tensor, byte scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (byte)(tensorSpan[i] ^ scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (byte)(tensorSpan[op1Index] ^ scalar); - - } - } - } - } - internal class CharArithmetic : ITensorArithmetic - { - public char One => (char)1; - public char Zero => (char)0; - - public void Add(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (char)(left[indices] + right[indices]); - } - - } - public void Add(Tensor tensor, char scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (char)(tensor[indices] + scalar); - } - - } - public void And(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (char)(left[indices] & right[indices]); - } - - } - public void And(Tensor tensor, char scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (char)(tensor[indices] & scalar); - } - - } - public void Contract(Tensor left, Tensor right, int[] leftAxes, int[] rightAxes, Tensor result) - { - var leftIndices = new int[left.Rank]; - var rightIndices = new int[right.Rank]; - var resultIndices = new int[result.Rank]; - - var summingDimensions = new int[leftAxes.Length]; - for (int i = 0; i < leftAxes.Length; i++) - { - summingDimensions[i] = left.dimensions[leftAxes[i]]; - } - - var summingStrides = ArrayUtilities.GetStrides(summingDimensions); - int summingLength = (int)ArrayUtilities.GetProduct(summingDimensions); - - var resultStrides = result.strides; - - // translates from result index to left non-summing dimensions' index portion - // since left non-summing dimensions are given precedence in result, the end is zero-padded - int[] leftNonSummingStrides = new int[result.Rank]; - - // translates from summing index to left summing dimensions' index portion - int[] leftSummingStrides = new int[leftAxes.Length]; - ArrayUtilities.SplitStrides(left.strides, leftAxes, leftNonSummingStrides, 0, leftSummingStrides, 0); - - // translates from result index to right non-summing dimensions' index portion - int[] rightNonSummingStrides = new int[result.Rank]; - // right non-summing dimensions appear after left non-summing dimensions. - int rightNonSummingStridesOffset = (left.Rank - leftAxes.Length); - - // translates from summing index to right summing dimensions' index portion - int[] rightSummingStrides = new int[rightAxes.Length]; - ArrayUtilities.SplitStrides(right.strides, rightAxes, rightNonSummingStrides, rightNonSummingStridesOffset, rightSummingStrides, 0); - - for (int resultIndex = 0; resultIndex < result.Length; resultIndex++) - { - char sum = (char)0; - - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, resultIndex, resultIndices); - - int leftIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, leftNonSummingStrides); - int rightIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, rightNonSummingStrides); - - for (int summingIndex = 0; summingIndex < summingLength; summingIndex++) - { - int leftIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, leftSummingStrides); - int rightIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, rightSummingStrides); - - int leftIndex = leftIndexNonSumming + leftIndexSumming; - int rightIndex = rightIndexNonSumming + rightIndexSumming; - - // todo, make this more efficient - ArrayUtilities.GetIndices(left.strides, left.IsReversedStride, leftIndex, leftIndices); - ArrayUtilities.GetIndices(right.strides, right.IsReversedStride, rightIndex, rightIndices); - - sum += (char)(left[leftIndices] * right[rightIndices]); - } - - result[resultIndices] = sum; - } - } - public void Decrement(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices]--; - } - - } - public void Divide(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (char)(left[indices] / right[indices]); - } - - } - public void Divide(Tensor tensor, char scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (char)(tensor[indices] / scalar); - } - - } - public void Equals(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] == right[indices]; - } - - } - public void GreaterThan(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] > right[indices]; - } - - } - public void GreaterThanOrEqual(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] >= right[indices]; - } - - } - public void Increment(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices]++; - } - - } - public void LeftShift(Tensor tensor, int value, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (char)(tensor[indices] << value); - } - - } - public void LessThan(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] < right[indices]; - } - - } - public void LessThanOrEqual(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] <= right[indices]; - } - - } - public void Modulo(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (char)(left[indices] % right[indices]); - } - - } - public void Modulo(Tensor tensor, char scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (char)(tensor[indices] % scalar); - } - - } - public void Multiply(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (char)(left[indices] * right[indices]); - } - - } - public void Multiply(Tensor tensor, char scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (char)(tensor[indices] * scalar); - } - - } - public void NotEquals(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] != right[indices]; - } - - } - public void Or(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (char)(left[indices] | right[indices]); - } - - } - public void Or(Tensor tensor, char scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (char)(tensor[indices] | scalar); - } - - } - public void RightShift(Tensor tensor, int value, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (char)(tensor[indices] >> value); - } - - } - public void Subtract(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (char)(left[indices] - right[indices]); - } - - } - public void Subtract(Tensor tensor, char scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (char)(tensor[indices] - scalar); - } - - } - public void UnaryMinus(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (char)-tensor[indices]; - } - - } - public void UnaryPlus(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (char)+tensor[indices]; - } - - } - public void Xor(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (char)(left[indices] ^ right[indices]); - } - - } - public void Xor(Tensor tensor, char scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (char)(tensor[indices] ^ scalar); - } - - } - - public void Add(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (char)(leftSpan[i] + rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (char)(leftSpan[op1Index] + rightSpan[op2Index]); - - } - } - } - public void Add(DenseTensor tensor, char scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (char)(tensorSpan[i] + scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (char)(tensorSpan[op1Index] + scalar); - - } - } - } - public void And(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (char)(leftSpan[i] & rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (char)(leftSpan[op1Index] & rightSpan[op2Index]); - - } - } - } - public void And(DenseTensor tensor, char scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (char)(tensorSpan[i] & scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (char)(tensorSpan[op1Index] & scalar); - - } - } - } - public void Contract(DenseTensor left, DenseTensor right, int[] leftAxes, int[] rightAxes, DenseTensor result) - { - var summingDimensions = new int[leftAxes.Length]; - for (int i = 0; i < leftAxes.Length; i++) - { - summingDimensions[i] = left.dimensions[leftAxes[i]]; - } - - var summingStrides = ArrayUtilities.GetStrides(summingDimensions); - int summingLength = (int)ArrayUtilities.GetProduct(summingDimensions); - - var resultStrides = result.strides; - - // translates from result index to left non-summing dimensions' index portion - // since left non-summing dimensions are given precedence in result, the end is zero-padded - int[] leftNonSummingStrides = new int[result.Rank]; - - // translates from summing index to left summing dimensions' index portion - int[] leftSummingStrides = new int[leftAxes.Length]; - ArrayUtilities.SplitStrides(left.strides, leftAxes, leftNonSummingStrides, 0, leftSummingStrides, 0); - - // translates from result index to right non-summing dimensions' index portion - int[] rightNonSummingStrides = new int[result.Rank]; - // right non-summing dimensions appear after left non-summing dimensions. - int rightNonSummingStridesOffset = (left.Rank - leftAxes.Length); - - // translates from summing index to right summing dimensions' index portion - int[] rightSummingStrides = new int[rightAxes.Length]; - ArrayUtilities.SplitStrides(right.strides, rightAxes, rightNonSummingStrides, rightNonSummingStridesOffset, rightSummingStrides, 0); - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - - for (int resultIndex = 0; resultIndex < resultSpan.Length; resultIndex++) - { - char sum = (char)0; - - int leftIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, leftNonSummingStrides); - int rightIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, rightNonSummingStrides); - - for (int summingIndex = 0; summingIndex < summingLength; summingIndex++) - { - int leftIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, leftSummingStrides); - int rightIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, rightSummingStrides); - - int leftIndex = leftIndexNonSumming + leftIndexSumming; - int rightIndex = rightIndexNonSumming + rightIndexSumming; - - sum += (char)(leftSpan[leftIndex] * rightSpan[rightIndex]); - } - - resultSpan[resultIndex] = sum; - } - } - public void Decrement(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i]--; - } - } - public void Divide(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (char)(leftSpan[i] / rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (char)(leftSpan[op1Index] / rightSpan[op2Index]); - - } - } - } - public void Divide(DenseTensor tensor, char scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (char)(tensorSpan[i] / scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (char)(tensorSpan[op1Index] / scalar); - - } - } - } - public void Equals(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] == rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] == rightSpan[op2Index]; - - } - } - } - public void GreaterThan(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] > rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] > rightSpan[op2Index]; - - } - } - } - public void GreaterThanOrEqual(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] >= rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] >= rightSpan[op2Index]; - - } - } - } - public void Increment(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i]++; - } - } - public void LeftShift(DenseTensor tensor, int value, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (char)(tensorSpan[i] << value); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (char)(tensorSpan[op1Index] << value); - - } - } - } - public void LessThan(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] < rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] < rightSpan[op2Index]; - - } - } - } - public void LessThanOrEqual(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] <= rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] <= rightSpan[op2Index]; - - } - } - } - public void Modulo(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (char)(leftSpan[i] % rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (char)(leftSpan[op1Index] % rightSpan[op2Index]); - - } - } - } - public void Modulo(DenseTensor tensor, char scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (char)(tensorSpan[i] % scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (char)(tensorSpan[op1Index] % scalar); - - } - } - } - public void Multiply(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (char)(leftSpan[i] * rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (char)(leftSpan[op1Index] * rightSpan[op2Index]); - - } - } - } - public void Multiply(DenseTensor tensor, char scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (char)(tensorSpan[i] * scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (char)(tensorSpan[op1Index] * scalar); - - } - } - } - public void NotEquals(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] != rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] != rightSpan[op2Index]; - - } - } - } - public void Or(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (char)(leftSpan[i] | rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (char)(leftSpan[op1Index] | rightSpan[op2Index]); - - } - } - } - public void Or(DenseTensor tensor, char scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (char)(tensorSpan[i] | scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (char)(tensorSpan[op1Index] | scalar); - - } - } - } - public void RightShift(DenseTensor tensor, int value, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (char)(tensorSpan[i] >> value); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (char)(tensorSpan[op1Index] >> value); - - } - } - } - public void Subtract(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (char)(leftSpan[i] - rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (char)(leftSpan[op1Index] - rightSpan[op2Index]); - - } - } - } - public void Subtract(DenseTensor tensor, char scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (char)(tensorSpan[i] - scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (char)(tensorSpan[op1Index] - scalar); - - } - } - } - public void UnaryMinus(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (char)-tensorSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (char)-tensorSpan[op1Index]; - - } - } - } - public void UnaryPlus(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (char)+tensorSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (char)+tensorSpan[op1Index]; - - } - } - } - public void Xor(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (char)(leftSpan[i] ^ rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (char)(leftSpan[op1Index] ^ rightSpan[op2Index]); - - } - } - } - public void Xor(DenseTensor tensor, char scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (char)(tensorSpan[i] ^ scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (char)(tensorSpan[op1Index] ^ scalar); - - } - } - } - } - internal class DecimalArithmetic : ITensorArithmetic - { - public decimal One => 1; - public decimal Zero => 0; - - public void Add(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (decimal)(left[indices] + right[indices]); - } - - } - public void Add(Tensor tensor, decimal scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (decimal)(tensor[indices] + scalar); - } - - } - public void And(Tensor left, Tensor right, Tensor result) - { - throw new NotSupportedException(); - } - public void And(Tensor tensor, decimal scalar, Tensor result) - { - throw new NotSupportedException(); - } - public void Contract(Tensor left, Tensor right, int[] leftAxes, int[] rightAxes, Tensor result) - { - var leftIndices = new int[left.Rank]; - var rightIndices = new int[right.Rank]; - var resultIndices = new int[result.Rank]; - - var summingDimensions = new int[leftAxes.Length]; - for (int i = 0; i < leftAxes.Length; i++) - { - summingDimensions[i] = left.dimensions[leftAxes[i]]; - } - - var summingStrides = ArrayUtilities.GetStrides(summingDimensions); - int summingLength = (int)ArrayUtilities.GetProduct(summingDimensions); - - var resultStrides = result.strides; - - // translates from result index to left non-summing dimensions' index portion - // since left non-summing dimensions are given precedence in result, the end is zero-padded - int[] leftNonSummingStrides = new int[result.Rank]; - - // translates from summing index to left summing dimensions' index portion - int[] leftSummingStrides = new int[leftAxes.Length]; - ArrayUtilities.SplitStrides(left.strides, leftAxes, leftNonSummingStrides, 0, leftSummingStrides, 0); - - // translates from result index to right non-summing dimensions' index portion - int[] rightNonSummingStrides = new int[result.Rank]; - // right non-summing dimensions appear after left non-summing dimensions. - int rightNonSummingStridesOffset = (left.Rank - leftAxes.Length); - - // translates from summing index to right summing dimensions' index portion - int[] rightSummingStrides = new int[rightAxes.Length]; - ArrayUtilities.SplitStrides(right.strides, rightAxes, rightNonSummingStrides, rightNonSummingStridesOffset, rightSummingStrides, 0); - - for (int resultIndex = 0; resultIndex < result.Length; resultIndex++) - { - decimal sum = (decimal)0; - - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, resultIndex, resultIndices); - - int leftIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, leftNonSummingStrides); - int rightIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, rightNonSummingStrides); - - for (int summingIndex = 0; summingIndex < summingLength; summingIndex++) - { - int leftIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, leftSummingStrides); - int rightIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, rightSummingStrides); - - int leftIndex = leftIndexNonSumming + leftIndexSumming; - int rightIndex = rightIndexNonSumming + rightIndexSumming; - - // todo, make this more efficient - ArrayUtilities.GetIndices(left.strides, left.IsReversedStride, leftIndex, leftIndices); - ArrayUtilities.GetIndices(right.strides, right.IsReversedStride, rightIndex, rightIndices); - - sum += (decimal)(left[leftIndices] * right[rightIndices]); - } - - result[resultIndices] = sum; - } - } - public void Decrement(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices]--; - } - - } - public void Divide(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (decimal)(left[indices] / right[indices]); - } - - } - public void Divide(Tensor tensor, decimal scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (decimal)(tensor[indices] / scalar); - } - - } - public void Equals(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] == right[indices]; - } - - } - public void GreaterThan(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] > right[indices]; - } - - } - public void GreaterThanOrEqual(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] >= right[indices]; - } - - } - public void Increment(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices]++; - } - - } - public void LeftShift(Tensor tensor, int value, Tensor result) - { - throw new NotSupportedException(); - } - public void LessThan(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] < right[indices]; - } - - } - public void LessThanOrEqual(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] <= right[indices]; - } - - } - public void Modulo(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (decimal)(left[indices] % right[indices]); - } - - } - public void Modulo(Tensor tensor, decimal scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (decimal)(tensor[indices] % scalar); - } - - } - public void Multiply(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (decimal)(left[indices] * right[indices]); - } - - } - public void Multiply(Tensor tensor, decimal scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (decimal)(tensor[indices] * scalar); - } - - } - public void NotEquals(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] != right[indices]; - } - - } - public void Or(Tensor left, Tensor right, Tensor result) - { - throw new NotSupportedException(); - } - public void Or(Tensor tensor, decimal scalar, Tensor result) - { - throw new NotSupportedException(); - } - public void RightShift(Tensor tensor, int value, Tensor result) - { - throw new NotSupportedException(); - } - public void Subtract(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (decimal)(left[indices] - right[indices]); - } - - } - public void Subtract(Tensor tensor, decimal scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (decimal)(tensor[indices] - scalar); - } - - } - public void UnaryMinus(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (decimal)-tensor[indices]; - } - - } - public void UnaryPlus(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (decimal)+tensor[indices]; - } - - } - public void Xor(Tensor left, Tensor right, Tensor result) - { - throw new NotSupportedException(); - } - public void Xor(Tensor tensor, decimal scalar, Tensor result) - { - throw new NotSupportedException(); - } - - public void Add(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (decimal)(leftSpan[i] + rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (decimal)(leftSpan[op1Index] + rightSpan[op2Index]); - - } - } - } - public void Add(DenseTensor tensor, decimal scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (decimal)(tensorSpan[i] + scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (decimal)(tensorSpan[op1Index] + scalar); - - } - } - } - public void And(DenseTensor left, DenseTensor right, DenseTensor result) - { - throw new NotSupportedException(); - } - public void And(DenseTensor tensor, decimal scalar, DenseTensor result) - { - throw new NotSupportedException(); - } - public void Contract(DenseTensor left, DenseTensor right, int[] leftAxes, int[] rightAxes, DenseTensor result) - { - var summingDimensions = new int[leftAxes.Length]; - for (int i = 0; i < leftAxes.Length; i++) - { - summingDimensions[i] = left.dimensions[leftAxes[i]]; - } - - var summingStrides = ArrayUtilities.GetStrides(summingDimensions); - int summingLength = (int)ArrayUtilities.GetProduct(summingDimensions); - - var resultStrides = result.strides; - - // translates from result index to left non-summing dimensions' index portion - // since left non-summing dimensions are given precedence in result, the end is zero-padded - int[] leftNonSummingStrides = new int[result.Rank]; - - // translates from summing index to left summing dimensions' index portion - int[] leftSummingStrides = new int[leftAxes.Length]; - ArrayUtilities.SplitStrides(left.strides, leftAxes, leftNonSummingStrides, 0, leftSummingStrides, 0); - - // translates from result index to right non-summing dimensions' index portion - int[] rightNonSummingStrides = new int[result.Rank]; - // right non-summing dimensions appear after left non-summing dimensions. - int rightNonSummingStridesOffset = (left.Rank - leftAxes.Length); - - // translates from summing index to right summing dimensions' index portion - int[] rightSummingStrides = new int[rightAxes.Length]; - ArrayUtilities.SplitStrides(right.strides, rightAxes, rightNonSummingStrides, rightNonSummingStridesOffset, rightSummingStrides, 0); - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - - for (int resultIndex = 0; resultIndex < resultSpan.Length; resultIndex++) - { - decimal sum = (decimal)0; - - int leftIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, leftNonSummingStrides); - int rightIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, rightNonSummingStrides); - - for (int summingIndex = 0; summingIndex < summingLength; summingIndex++) - { - int leftIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, leftSummingStrides); - int rightIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, rightSummingStrides); - - int leftIndex = leftIndexNonSumming + leftIndexSumming; - int rightIndex = rightIndexNonSumming + rightIndexSumming; - - sum += (decimal)(leftSpan[leftIndex] * rightSpan[rightIndex]); - } - - resultSpan[resultIndex] = sum; - } - } - public void Decrement(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i]--; - } - } - public void Divide(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (decimal)(leftSpan[i] / rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (decimal)(leftSpan[op1Index] / rightSpan[op2Index]); - - } - } - } - public void Divide(DenseTensor tensor, decimal scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (decimal)(tensorSpan[i] / scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (decimal)(tensorSpan[op1Index] / scalar); - - } - } - } - public void Equals(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] == rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] == rightSpan[op2Index]; - - } - } - } - public void GreaterThan(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] > rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] > rightSpan[op2Index]; - - } - } - } - public void GreaterThanOrEqual(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] >= rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] >= rightSpan[op2Index]; - - } - } - } - public void Increment(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i]++; - } - } - public void LeftShift(DenseTensor tensor, int value, DenseTensor result) - { - throw new NotSupportedException(); - } - public void LessThan(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] < rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] < rightSpan[op2Index]; - - } - } - } - public void LessThanOrEqual(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] <= rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] <= rightSpan[op2Index]; - - } - } - } - public void Modulo(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (decimal)(leftSpan[i] % rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (decimal)(leftSpan[op1Index] % rightSpan[op2Index]); - - } - } - } - public void Modulo(DenseTensor tensor, decimal scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (decimal)(tensorSpan[i] % scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (decimal)(tensorSpan[op1Index] % scalar); - - } - } - } - public void Multiply(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (decimal)(leftSpan[i] * rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (decimal)(leftSpan[op1Index] * rightSpan[op2Index]); - - } - } - } - public void Multiply(DenseTensor tensor, decimal scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (decimal)(tensorSpan[i] * scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (decimal)(tensorSpan[op1Index] * scalar); - - } - } - } - public void NotEquals(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] != rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] != rightSpan[op2Index]; - - } - } - } - public void Or(DenseTensor left, DenseTensor right, DenseTensor result) - { - throw new NotSupportedException(); - } - public void Or(DenseTensor tensor, decimal scalar, DenseTensor result) - { - throw new NotSupportedException(); - } - public void RightShift(DenseTensor tensor, int value, DenseTensor result) - { - throw new NotSupportedException(); - } - public void Subtract(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (decimal)(leftSpan[i] - rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (decimal)(leftSpan[op1Index] - rightSpan[op2Index]); - - } - } - } - public void Subtract(DenseTensor tensor, decimal scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (decimal)(tensorSpan[i] - scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (decimal)(tensorSpan[op1Index] - scalar); - - } - } - } - public void UnaryMinus(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (decimal)-tensorSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (decimal)-tensorSpan[op1Index]; - - } - } - } - public void UnaryPlus(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (decimal)+tensorSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (decimal)+tensorSpan[op1Index]; - - } - } - } - public void Xor(DenseTensor left, DenseTensor right, DenseTensor result) - { - throw new NotSupportedException(); - } - public void Xor(DenseTensor tensor, decimal scalar, DenseTensor result) - { - throw new NotSupportedException(); - } - } - internal class DoubleArithmetic : ITensorArithmetic - { - public double One => 1.0; - public double Zero => 0; - - public void Add(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (double)(left[indices] + right[indices]); - } - - } - public void Add(Tensor tensor, double scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (double)(tensor[indices] + scalar); - } - - } - public void And(Tensor left, Tensor right, Tensor result) - { - throw new NotSupportedException(); - } - public void And(Tensor tensor, double scalar, Tensor result) - { - throw new NotSupportedException(); - } - public void Contract(Tensor left, Tensor right, int[] leftAxes, int[] rightAxes, Tensor result) - { - var leftIndices = new int[left.Rank]; - var rightIndices = new int[right.Rank]; - var resultIndices = new int[result.Rank]; - - var summingDimensions = new int[leftAxes.Length]; - for (int i = 0; i < leftAxes.Length; i++) - { - summingDimensions[i] = left.dimensions[leftAxes[i]]; - } - - var summingStrides = ArrayUtilities.GetStrides(summingDimensions); - int summingLength = (int)ArrayUtilities.GetProduct(summingDimensions); - - var resultStrides = result.strides; - - // translates from result index to left non-summing dimensions' index portion - // since left non-summing dimensions are given precedence in result, the end is zero-padded - int[] leftNonSummingStrides = new int[result.Rank]; - - // translates from summing index to left summing dimensions' index portion - int[] leftSummingStrides = new int[leftAxes.Length]; - ArrayUtilities.SplitStrides(left.strides, leftAxes, leftNonSummingStrides, 0, leftSummingStrides, 0); - - // translates from result index to right non-summing dimensions' index portion - int[] rightNonSummingStrides = new int[result.Rank]; - // right non-summing dimensions appear after left non-summing dimensions. - int rightNonSummingStridesOffset = (left.Rank - leftAxes.Length); - - // translates from summing index to right summing dimensions' index portion - int[] rightSummingStrides = new int[rightAxes.Length]; - ArrayUtilities.SplitStrides(right.strides, rightAxes, rightNonSummingStrides, rightNonSummingStridesOffset, rightSummingStrides, 0); - - for (int resultIndex = 0; resultIndex < result.Length; resultIndex++) - { - double sum = (double)0; - - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, resultIndex, resultIndices); - - int leftIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, leftNonSummingStrides); - int rightIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, rightNonSummingStrides); - - for (int summingIndex = 0; summingIndex < summingLength; summingIndex++) - { - int leftIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, leftSummingStrides); - int rightIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, rightSummingStrides); - - int leftIndex = leftIndexNonSumming + leftIndexSumming; - int rightIndex = rightIndexNonSumming + rightIndexSumming; - - // todo, make this more efficient - ArrayUtilities.GetIndices(left.strides, left.IsReversedStride, leftIndex, leftIndices); - ArrayUtilities.GetIndices(right.strides, right.IsReversedStride, rightIndex, rightIndices); - - sum += (double)(left[leftIndices] * right[rightIndices]); - } - - result[resultIndices] = sum; - } - } - public void Decrement(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices]--; - } - - } - public void Divide(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (double)(left[indices] / right[indices]); - } - - } - public void Divide(Tensor tensor, double scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (double)(tensor[indices] / scalar); - } - - } - public void Equals(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] == right[indices]; - } - - } - public void GreaterThan(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] > right[indices]; - } - - } - public void GreaterThanOrEqual(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] >= right[indices]; - } - - } - public void Increment(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices]++; - } - - } - public void LeftShift(Tensor tensor, int value, Tensor result) - { - throw new NotSupportedException(); - } - public void LessThan(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] < right[indices]; - } - - } - public void LessThanOrEqual(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] <= right[indices]; - } - - } - public void Modulo(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (double)(left[indices] % right[indices]); - } - - } - public void Modulo(Tensor tensor, double scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (double)(tensor[indices] % scalar); - } - - } - public void Multiply(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (double)(left[indices] * right[indices]); - } - - } - public void Multiply(Tensor tensor, double scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (double)(tensor[indices] * scalar); - } - - } - public void NotEquals(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] != right[indices]; - } - - } - public void Or(Tensor left, Tensor right, Tensor result) - { - throw new NotSupportedException(); - } - public void Or(Tensor tensor, double scalar, Tensor result) - { - throw new NotSupportedException(); - } - public void RightShift(Tensor tensor, int value, Tensor result) - { - throw new NotSupportedException(); - } - public void Subtract(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (double)(left[indices] - right[indices]); - } - - } - public void Subtract(Tensor tensor, double scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (double)(tensor[indices] - scalar); - } - - } - public void UnaryMinus(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (double)-tensor[indices]; - } - - } - public void UnaryPlus(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (double)+tensor[indices]; - } - - } - public void Xor(Tensor left, Tensor right, Tensor result) - { - throw new NotSupportedException(); - } - public void Xor(Tensor tensor, double scalar, Tensor result) - { - throw new NotSupportedException(); - } - - public void Add(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (double)(leftSpan[i] + rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (double)(leftSpan[op1Index] + rightSpan[op2Index]); - - } - } - } - public void Add(DenseTensor tensor, double scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (double)(tensorSpan[i] + scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (double)(tensorSpan[op1Index] + scalar); - - } - } - } - public void And(DenseTensor left, DenseTensor right, DenseTensor result) - { - throw new NotSupportedException(); - } - public void And(DenseTensor tensor, double scalar, DenseTensor result) - { - throw new NotSupportedException(); - } - public void Contract(DenseTensor left, DenseTensor right, int[] leftAxes, int[] rightAxes, DenseTensor result) - { - var summingDimensions = new int[leftAxes.Length]; - for (int i = 0; i < leftAxes.Length; i++) - { - summingDimensions[i] = left.dimensions[leftAxes[i]]; - } - - var summingStrides = ArrayUtilities.GetStrides(summingDimensions); - int summingLength = (int)ArrayUtilities.GetProduct(summingDimensions); - - var resultStrides = result.strides; - - // translates from result index to left non-summing dimensions' index portion - // since left non-summing dimensions are given precedence in result, the end is zero-padded - int[] leftNonSummingStrides = new int[result.Rank]; - - // translates from summing index to left summing dimensions' index portion - int[] leftSummingStrides = new int[leftAxes.Length]; - ArrayUtilities.SplitStrides(left.strides, leftAxes, leftNonSummingStrides, 0, leftSummingStrides, 0); - - // translates from result index to right non-summing dimensions' index portion - int[] rightNonSummingStrides = new int[result.Rank]; - // right non-summing dimensions appear after left non-summing dimensions. - int rightNonSummingStridesOffset = (left.Rank - leftAxes.Length); - - // translates from summing index to right summing dimensions' index portion - int[] rightSummingStrides = new int[rightAxes.Length]; - ArrayUtilities.SplitStrides(right.strides, rightAxes, rightNonSummingStrides, rightNonSummingStridesOffset, rightSummingStrides, 0); - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - - for (int resultIndex = 0; resultIndex < resultSpan.Length; resultIndex++) - { - double sum = (double)0; - - int leftIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, leftNonSummingStrides); - int rightIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, rightNonSummingStrides); - - for (int summingIndex = 0; summingIndex < summingLength; summingIndex++) - { - int leftIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, leftSummingStrides); - int rightIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, rightSummingStrides); - - int leftIndex = leftIndexNonSumming + leftIndexSumming; - int rightIndex = rightIndexNonSumming + rightIndexSumming; - - sum += (double)(leftSpan[leftIndex] * rightSpan[rightIndex]); - } - - resultSpan[resultIndex] = sum; - } - } - public void Decrement(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i]--; - } - } - public void Divide(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (double)(leftSpan[i] / rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (double)(leftSpan[op1Index] / rightSpan[op2Index]); - - } - } - } - public void Divide(DenseTensor tensor, double scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (double)(tensorSpan[i] / scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (double)(tensorSpan[op1Index] / scalar); - - } - } - } - public void Equals(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] == rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] == rightSpan[op2Index]; - - } - } - } - public void GreaterThan(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] > rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] > rightSpan[op2Index]; - - } - } - } - public void GreaterThanOrEqual(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] >= rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] >= rightSpan[op2Index]; - - } - } - } - public void Increment(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i]++; - } - } - public void LeftShift(DenseTensor tensor, int value, DenseTensor result) - { - throw new NotSupportedException(); - } - public void LessThan(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] < rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] < rightSpan[op2Index]; - - } - } - } - public void LessThanOrEqual(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] <= rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] <= rightSpan[op2Index]; - - } - } - } - public void Modulo(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (double)(leftSpan[i] % rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (double)(leftSpan[op1Index] % rightSpan[op2Index]); - - } - } - } - public void Modulo(DenseTensor tensor, double scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (double)(tensorSpan[i] % scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (double)(tensorSpan[op1Index] % scalar); - - } - } - } - public void Multiply(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (double)(leftSpan[i] * rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (double)(leftSpan[op1Index] * rightSpan[op2Index]); - - } - } - } - public void Multiply(DenseTensor tensor, double scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (double)(tensorSpan[i] * scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (double)(tensorSpan[op1Index] * scalar); - - } - } - } - public void NotEquals(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] != rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] != rightSpan[op2Index]; - - } - } - } - public void Or(DenseTensor left, DenseTensor right, DenseTensor result) - { - throw new NotSupportedException(); - } - public void Or(DenseTensor tensor, double scalar, DenseTensor result) - { - throw new NotSupportedException(); - } - public void RightShift(DenseTensor tensor, int value, DenseTensor result) - { - throw new NotSupportedException(); - } - public void Subtract(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (double)(leftSpan[i] - rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (double)(leftSpan[op1Index] - rightSpan[op2Index]); - - } - } - } - public void Subtract(DenseTensor tensor, double scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (double)(tensorSpan[i] - scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (double)(tensorSpan[op1Index] - scalar); - - } - } - } - public void UnaryMinus(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (double)-tensorSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (double)-tensorSpan[op1Index]; - - } - } - } - public void UnaryPlus(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (double)+tensorSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (double)+tensorSpan[op1Index]; - - } - } - } - public void Xor(DenseTensor left, DenseTensor right, DenseTensor result) - { - throw new NotSupportedException(); - } - public void Xor(DenseTensor tensor, double scalar, DenseTensor result) - { - throw new NotSupportedException(); - } - } - internal class FloatArithmetic : ITensorArithmetic - { - public float One => 1.0f; - public float Zero => 0; - - public void Add(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (float)(left[indices] + right[indices]); - } - - } - public void Add(Tensor tensor, float scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (float)(tensor[indices] + scalar); - } - - } - public void And(Tensor left, Tensor right, Tensor result) - { - throw new NotSupportedException(); - } - public void And(Tensor tensor, float scalar, Tensor result) - { - throw new NotSupportedException(); - } - public void Contract(Tensor left, Tensor right, int[] leftAxes, int[] rightAxes, Tensor result) - { - var leftIndices = new int[left.Rank]; - var rightIndices = new int[right.Rank]; - var resultIndices = new int[result.Rank]; - - var summingDimensions = new int[leftAxes.Length]; - for (int i = 0; i < leftAxes.Length; i++) - { - summingDimensions[i] = left.dimensions[leftAxes[i]]; - } - - var summingStrides = ArrayUtilities.GetStrides(summingDimensions); - int summingLength = (int)ArrayUtilities.GetProduct(summingDimensions); - - var resultStrides = result.strides; - - // translates from result index to left non-summing dimensions' index portion - // since left non-summing dimensions are given precedence in result, the end is zero-padded - int[] leftNonSummingStrides = new int[result.Rank]; - - // translates from summing index to left summing dimensions' index portion - int[] leftSummingStrides = new int[leftAxes.Length]; - ArrayUtilities.SplitStrides(left.strides, leftAxes, leftNonSummingStrides, 0, leftSummingStrides, 0); - - // translates from result index to right non-summing dimensions' index portion - int[] rightNonSummingStrides = new int[result.Rank]; - // right non-summing dimensions appear after left non-summing dimensions. - int rightNonSummingStridesOffset = (left.Rank - leftAxes.Length); - - // translates from summing index to right summing dimensions' index portion - int[] rightSummingStrides = new int[rightAxes.Length]; - ArrayUtilities.SplitStrides(right.strides, rightAxes, rightNonSummingStrides, rightNonSummingStridesOffset, rightSummingStrides, 0); - - for (int resultIndex = 0; resultIndex < result.Length; resultIndex++) - { - float sum = (float)0; - - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, resultIndex, resultIndices); - - int leftIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, leftNonSummingStrides); - int rightIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, rightNonSummingStrides); - - for (int summingIndex = 0; summingIndex < summingLength; summingIndex++) - { - int leftIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, leftSummingStrides); - int rightIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, rightSummingStrides); - - int leftIndex = leftIndexNonSumming + leftIndexSumming; - int rightIndex = rightIndexNonSumming + rightIndexSumming; - - // todo, make this more efficient - ArrayUtilities.GetIndices(left.strides, left.IsReversedStride, leftIndex, leftIndices); - ArrayUtilities.GetIndices(right.strides, right.IsReversedStride, rightIndex, rightIndices); - - sum += (float)(left[leftIndices] * right[rightIndices]); - } - - result[resultIndices] = sum; - } - } - public void Decrement(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices]--; - } - - } - public void Divide(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (float)(left[indices] / right[indices]); - } - - } - public void Divide(Tensor tensor, float scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (float)(tensor[indices] / scalar); - } - - } - public void Equals(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] == right[indices]; - } - - } - public void GreaterThan(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] > right[indices]; - } - - } - public void GreaterThanOrEqual(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] >= right[indices]; - } - - } - public void Increment(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices]++; - } - - } - public void LeftShift(Tensor tensor, int value, Tensor result) - { - throw new NotSupportedException(); - } - public void LessThan(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] < right[indices]; - } - - } - public void LessThanOrEqual(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] <= right[indices]; - } - - } - public void Modulo(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (float)(left[indices] % right[indices]); - } - - } - public void Modulo(Tensor tensor, float scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (float)(tensor[indices] % scalar); - } - - } - public void Multiply(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (float)(left[indices] * right[indices]); - } - - } - public void Multiply(Tensor tensor, float scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (float)(tensor[indices] * scalar); - } - - } - public void NotEquals(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] != right[indices]; - } - - } - public void Or(Tensor left, Tensor right, Tensor result) - { - throw new NotSupportedException(); - } - public void Or(Tensor tensor, float scalar, Tensor result) - { - throw new NotSupportedException(); - } - public void RightShift(Tensor tensor, int value, Tensor result) - { - throw new NotSupportedException(); - } - public void Subtract(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (float)(left[indices] - right[indices]); - } - - } - public void Subtract(Tensor tensor, float scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (float)(tensor[indices] - scalar); - } - - } - public void UnaryMinus(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (float)-tensor[indices]; - } - - } - public void UnaryPlus(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (float)+tensor[indices]; - } - - } - public void Xor(Tensor left, Tensor right, Tensor result) - { - throw new NotSupportedException(); - } - public void Xor(Tensor tensor, float scalar, Tensor result) - { - throw new NotSupportedException(); - } - - public void Add(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (float)(leftSpan[i] + rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (float)(leftSpan[op1Index] + rightSpan[op2Index]); - - } - } - } - public void Add(DenseTensor tensor, float scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (float)(tensorSpan[i] + scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (float)(tensorSpan[op1Index] + scalar); - - } - } - } - public void And(DenseTensor left, DenseTensor right, DenseTensor result) - { - throw new NotSupportedException(); - } - public void And(DenseTensor tensor, float scalar, DenseTensor result) - { - throw new NotSupportedException(); - } - public void Contract(DenseTensor left, DenseTensor right, int[] leftAxes, int[] rightAxes, DenseTensor result) - { - var summingDimensions = new int[leftAxes.Length]; - for (int i = 0; i < leftAxes.Length; i++) - { - summingDimensions[i] = left.dimensions[leftAxes[i]]; - } - - var summingStrides = ArrayUtilities.GetStrides(summingDimensions); - int summingLength = (int)ArrayUtilities.GetProduct(summingDimensions); - - var resultStrides = result.strides; - - // translates from result index to left non-summing dimensions' index portion - // since left non-summing dimensions are given precedence in result, the end is zero-padded - int[] leftNonSummingStrides = new int[result.Rank]; - - // translates from summing index to left summing dimensions' index portion - int[] leftSummingStrides = new int[leftAxes.Length]; - ArrayUtilities.SplitStrides(left.strides, leftAxes, leftNonSummingStrides, 0, leftSummingStrides, 0); - - // translates from result index to right non-summing dimensions' index portion - int[] rightNonSummingStrides = new int[result.Rank]; - // right non-summing dimensions appear after left non-summing dimensions. - int rightNonSummingStridesOffset = (left.Rank - leftAxes.Length); - - // translates from summing index to right summing dimensions' index portion - int[] rightSummingStrides = new int[rightAxes.Length]; - ArrayUtilities.SplitStrides(right.strides, rightAxes, rightNonSummingStrides, rightNonSummingStridesOffset, rightSummingStrides, 0); - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - - for (int resultIndex = 0; resultIndex < resultSpan.Length; resultIndex++) - { - float sum = (float)0; - - int leftIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, leftNonSummingStrides); - int rightIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, rightNonSummingStrides); - - for (int summingIndex = 0; summingIndex < summingLength; summingIndex++) - { - int leftIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, leftSummingStrides); - int rightIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, rightSummingStrides); - - int leftIndex = leftIndexNonSumming + leftIndexSumming; - int rightIndex = rightIndexNonSumming + rightIndexSumming; - - sum += (float)(leftSpan[leftIndex] * rightSpan[rightIndex]); - } - - resultSpan[resultIndex] = sum; - } - } - public void Decrement(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i]--; - } - } - public void Divide(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (float)(leftSpan[i] / rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (float)(leftSpan[op1Index] / rightSpan[op2Index]); - - } - } - } - public void Divide(DenseTensor tensor, float scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (float)(tensorSpan[i] / scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (float)(tensorSpan[op1Index] / scalar); - - } - } - } - public void Equals(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] == rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] == rightSpan[op2Index]; - - } - } - } - public void GreaterThan(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] > rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] > rightSpan[op2Index]; - - } - } - } - public void GreaterThanOrEqual(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] >= rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] >= rightSpan[op2Index]; - - } - } - } - public void Increment(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i]++; - } - } - public void LeftShift(DenseTensor tensor, int value, DenseTensor result) - { - throw new NotSupportedException(); - } - public void LessThan(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] < rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] < rightSpan[op2Index]; - - } - } - } - public void LessThanOrEqual(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] <= rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] <= rightSpan[op2Index]; - - } - } - } - public void Modulo(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (float)(leftSpan[i] % rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (float)(leftSpan[op1Index] % rightSpan[op2Index]); - - } - } - } - public void Modulo(DenseTensor tensor, float scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (float)(tensorSpan[i] % scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (float)(tensorSpan[op1Index] % scalar); - - } - } - } - public void Multiply(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (float)(leftSpan[i] * rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (float)(leftSpan[op1Index] * rightSpan[op2Index]); - - } - } - } - public void Multiply(DenseTensor tensor, float scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (float)(tensorSpan[i] * scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (float)(tensorSpan[op1Index] * scalar); - - } - } - } - public void NotEquals(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] != rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] != rightSpan[op2Index]; - - } - } - } - public void Or(DenseTensor left, DenseTensor right, DenseTensor result) - { - throw new NotSupportedException(); - } - public void Or(DenseTensor tensor, float scalar, DenseTensor result) - { - throw new NotSupportedException(); - } - public void RightShift(DenseTensor tensor, int value, DenseTensor result) - { - throw new NotSupportedException(); - } - public void Subtract(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (float)(leftSpan[i] - rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (float)(leftSpan[op1Index] - rightSpan[op2Index]); - - } - } - } - public void Subtract(DenseTensor tensor, float scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (float)(tensorSpan[i] - scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (float)(tensorSpan[op1Index] - scalar); - - } - } - } - public void UnaryMinus(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (float)-tensorSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (float)-tensorSpan[op1Index]; - - } - } - } - public void UnaryPlus(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (float)+tensorSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (float)+tensorSpan[op1Index]; - - } - } - } - public void Xor(DenseTensor left, DenseTensor right, DenseTensor result) - { - throw new NotSupportedException(); - } - public void Xor(DenseTensor tensor, float scalar, DenseTensor result) - { - throw new NotSupportedException(); - } - } - internal class IntArithmetic : ITensorArithmetic - { - public int One => 1; - public int Zero => 0; - - public void Add(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (int)(left[indices] + right[indices]); - } - - } - public void Add(Tensor tensor, int scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (int)(tensor[indices] + scalar); - } - - } - public void And(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (int)(left[indices] & right[indices]); - } - - } - public void And(Tensor tensor, int scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (int)(tensor[indices] & scalar); - } - - } - public void Contract(Tensor left, Tensor right, int[] leftAxes, int[] rightAxes, Tensor result) - { - var leftIndices = new int[left.Rank]; - var rightIndices = new int[right.Rank]; - var resultIndices = new int[result.Rank]; - - var summingDimensions = new int[leftAxes.Length]; - for (int i = 0; i < leftAxes.Length; i++) - { - summingDimensions[i] = left.dimensions[leftAxes[i]]; - } - - var summingStrides = ArrayUtilities.GetStrides(summingDimensions); - int summingLength = (int)ArrayUtilities.GetProduct(summingDimensions); - - var resultStrides = result.strides; - - // translates from result index to left non-summing dimensions' index portion - // since left non-summing dimensions are given precedence in result, the end is zero-padded - int[] leftNonSummingStrides = new int[result.Rank]; - - // translates from summing index to left summing dimensions' index portion - int[] leftSummingStrides = new int[leftAxes.Length]; - ArrayUtilities.SplitStrides(left.strides, leftAxes, leftNonSummingStrides, 0, leftSummingStrides, 0); - - // translates from result index to right non-summing dimensions' index portion - int[] rightNonSummingStrides = new int[result.Rank]; - // right non-summing dimensions appear after left non-summing dimensions. - int rightNonSummingStridesOffset = (left.Rank - leftAxes.Length); - - // translates from summing index to right summing dimensions' index portion - int[] rightSummingStrides = new int[rightAxes.Length]; - ArrayUtilities.SplitStrides(right.strides, rightAxes, rightNonSummingStrides, rightNonSummingStridesOffset, rightSummingStrides, 0); - - for (int resultIndex = 0; resultIndex < result.Length; resultIndex++) - { - int sum = (int)0; - - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, resultIndex, resultIndices); - - int leftIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, leftNonSummingStrides); - int rightIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, rightNonSummingStrides); - - for (int summingIndex = 0; summingIndex < summingLength; summingIndex++) - { - int leftIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, leftSummingStrides); - int rightIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, rightSummingStrides); - - int leftIndex = leftIndexNonSumming + leftIndexSumming; - int rightIndex = rightIndexNonSumming + rightIndexSumming; - - // todo, make this more efficient - ArrayUtilities.GetIndices(left.strides, left.IsReversedStride, leftIndex, leftIndices); - ArrayUtilities.GetIndices(right.strides, right.IsReversedStride, rightIndex, rightIndices); - - sum += (int)(left[leftIndices] * right[rightIndices]); - } - - result[resultIndices] = sum; - } - } - public void Decrement(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices]--; - } - - } - public void Divide(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (int)(left[indices] / right[indices]); - } - - } - public void Divide(Tensor tensor, int scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (int)(tensor[indices] / scalar); - } - - } - public void Equals(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] == right[indices]; - } - - } - public void GreaterThan(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] > right[indices]; - } - - } - public void GreaterThanOrEqual(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] >= right[indices]; - } - - } - public void Increment(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices]++; - } - - } - public void LeftShift(Tensor tensor, int value, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (int)(tensor[indices] << value); - } - - } - public void LessThan(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] < right[indices]; - } - - } - public void LessThanOrEqual(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] <= right[indices]; - } - - } - public void Modulo(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (int)(left[indices] % right[indices]); - } - - } - public void Modulo(Tensor tensor, int scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (int)(tensor[indices] % scalar); - } - - } - public void Multiply(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (int)(left[indices] * right[indices]); - } - - } - public void Multiply(Tensor tensor, int scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (int)(tensor[indices] * scalar); - } - - } - public void NotEquals(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] != right[indices]; - } - - } - public void Or(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (int)(left[indices] | right[indices]); - } - - } - public void Or(Tensor tensor, int scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (int)(tensor[indices] | scalar); - } - - } - public void RightShift(Tensor tensor, int value, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (int)(tensor[indices] >> value); - } - - } - public void Subtract(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (int)(left[indices] - right[indices]); - } - - } - public void Subtract(Tensor tensor, int scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (int)(tensor[indices] - scalar); - } - - } - public void UnaryMinus(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (int)-tensor[indices]; - } - - } - public void UnaryPlus(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (int)+tensor[indices]; - } - - } - public void Xor(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (int)(left[indices] ^ right[indices]); - } - - } - public void Xor(Tensor tensor, int scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (int)(tensor[indices] ^ scalar); - } - - } - - public void Add(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (int)(leftSpan[i] + rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (int)(leftSpan[op1Index] + rightSpan[op2Index]); - - } - } - } - public void Add(DenseTensor tensor, int scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (int)(tensorSpan[i] + scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (int)(tensorSpan[op1Index] + scalar); - - } - } - } - public void And(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (int)(leftSpan[i] & rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (int)(leftSpan[op1Index] & rightSpan[op2Index]); - - } - } - } - public void And(DenseTensor tensor, int scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (int)(tensorSpan[i] & scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (int)(tensorSpan[op1Index] & scalar); - - } - } - } - public void Contract(DenseTensor left, DenseTensor right, int[] leftAxes, int[] rightAxes, DenseTensor result) - { - var summingDimensions = new int[leftAxes.Length]; - for (int i = 0; i < leftAxes.Length; i++) - { - summingDimensions[i] = left.dimensions[leftAxes[i]]; - } - - var summingStrides = ArrayUtilities.GetStrides(summingDimensions); - int summingLength = (int)ArrayUtilities.GetProduct(summingDimensions); - - var resultStrides = result.strides; - - // translates from result index to left non-summing dimensions' index portion - // since left non-summing dimensions are given precedence in result, the end is zero-padded - int[] leftNonSummingStrides = new int[result.Rank]; - - // translates from summing index to left summing dimensions' index portion - int[] leftSummingStrides = new int[leftAxes.Length]; - ArrayUtilities.SplitStrides(left.strides, leftAxes, leftNonSummingStrides, 0, leftSummingStrides, 0); - - // translates from result index to right non-summing dimensions' index portion - int[] rightNonSummingStrides = new int[result.Rank]; - // right non-summing dimensions appear after left non-summing dimensions. - int rightNonSummingStridesOffset = (left.Rank - leftAxes.Length); - - // translates from summing index to right summing dimensions' index portion - int[] rightSummingStrides = new int[rightAxes.Length]; - ArrayUtilities.SplitStrides(right.strides, rightAxes, rightNonSummingStrides, rightNonSummingStridesOffset, rightSummingStrides, 0); - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - - for (int resultIndex = 0; resultIndex < resultSpan.Length; resultIndex++) - { - int sum = (int)0; - - int leftIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, leftNonSummingStrides); - int rightIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, rightNonSummingStrides); - - for (int summingIndex = 0; summingIndex < summingLength; summingIndex++) - { - int leftIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, leftSummingStrides); - int rightIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, rightSummingStrides); - - int leftIndex = leftIndexNonSumming + leftIndexSumming; - int rightIndex = rightIndexNonSumming + rightIndexSumming; - - sum += (int)(leftSpan[leftIndex] * rightSpan[rightIndex]); - } - - resultSpan[resultIndex] = sum; - } - } - public void Decrement(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i]--; - } - } - public void Divide(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (int)(leftSpan[i] / rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (int)(leftSpan[op1Index] / rightSpan[op2Index]); - - } - } - } - public void Divide(DenseTensor tensor, int scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (int)(tensorSpan[i] / scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (int)(tensorSpan[op1Index] / scalar); - - } - } - } - public void Equals(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] == rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] == rightSpan[op2Index]; - - } - } - } - public void GreaterThan(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] > rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] > rightSpan[op2Index]; - - } - } - } - public void GreaterThanOrEqual(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] >= rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] >= rightSpan[op2Index]; - - } - } - } - public void Increment(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i]++; - } - } - public void LeftShift(DenseTensor tensor, int value, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (int)(tensorSpan[i] << value); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (int)(tensorSpan[op1Index] << value); - - } - } - } - public void LessThan(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] < rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] < rightSpan[op2Index]; - - } - } - } - public void LessThanOrEqual(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] <= rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] <= rightSpan[op2Index]; - - } - } - } - public void Modulo(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (int)(leftSpan[i] % rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (int)(leftSpan[op1Index] % rightSpan[op2Index]); - - } - } - } - public void Modulo(DenseTensor tensor, int scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (int)(tensorSpan[i] % scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (int)(tensorSpan[op1Index] % scalar); - - } - } - } - public void Multiply(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (int)(leftSpan[i] * rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (int)(leftSpan[op1Index] * rightSpan[op2Index]); - - } - } - } - public void Multiply(DenseTensor tensor, int scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (int)(tensorSpan[i] * scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (int)(tensorSpan[op1Index] * scalar); - - } - } - } - public void NotEquals(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] != rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] != rightSpan[op2Index]; - - } - } - } - public void Or(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (int)(leftSpan[i] | rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (int)(leftSpan[op1Index] | rightSpan[op2Index]); - - } - } - } - public void Or(DenseTensor tensor, int scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (int)(tensorSpan[i] | scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (int)(tensorSpan[op1Index] | scalar); - - } - } - } - public void RightShift(DenseTensor tensor, int value, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (int)(tensorSpan[i] >> value); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (int)(tensorSpan[op1Index] >> value); - - } - } - } - public void Subtract(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (int)(leftSpan[i] - rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (int)(leftSpan[op1Index] - rightSpan[op2Index]); - - } - } - } - public void Subtract(DenseTensor tensor, int scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (int)(tensorSpan[i] - scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (int)(tensorSpan[op1Index] - scalar); - - } - } - } - public void UnaryMinus(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (int)-tensorSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (int)-tensorSpan[op1Index]; - - } - } - } - public void UnaryPlus(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (int)+tensorSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (int)+tensorSpan[op1Index]; - - } - } - } - public void Xor(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (int)(leftSpan[i] ^ rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (int)(leftSpan[op1Index] ^ rightSpan[op2Index]); - - } - } - } - public void Xor(DenseTensor tensor, int scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (int)(tensorSpan[i] ^ scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (int)(tensorSpan[op1Index] ^ scalar); - - } - } - } - } - internal class LongArithmetic : ITensorArithmetic - { - public long One => 1; - public long Zero => 0; - - public void Add(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (long)(left[indices] + right[indices]); - } - - } - public void Add(Tensor tensor, long scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (long)(tensor[indices] + scalar); - } - - } - public void And(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (long)(left[indices] & right[indices]); - } - - } - public void And(Tensor tensor, long scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (long)(tensor[indices] & scalar); - } - - } - public void Contract(Tensor left, Tensor right, int[] leftAxes, int[] rightAxes, Tensor result) - { - var leftIndices = new int[left.Rank]; - var rightIndices = new int[right.Rank]; - var resultIndices = new int[result.Rank]; - - var summingDimensions = new int[leftAxes.Length]; - for (int i = 0; i < leftAxes.Length; i++) - { - summingDimensions[i] = left.dimensions[leftAxes[i]]; - } - - var summingStrides = ArrayUtilities.GetStrides(summingDimensions); - int summingLength = (int)ArrayUtilities.GetProduct(summingDimensions); - - var resultStrides = result.strides; - - // translates from result index to left non-summing dimensions' index portion - // since left non-summing dimensions are given precedence in result, the end is zero-padded - int[] leftNonSummingStrides = new int[result.Rank]; - - // translates from summing index to left summing dimensions' index portion - int[] leftSummingStrides = new int[leftAxes.Length]; - ArrayUtilities.SplitStrides(left.strides, leftAxes, leftNonSummingStrides, 0, leftSummingStrides, 0); - - // translates from result index to right non-summing dimensions' index portion - int[] rightNonSummingStrides = new int[result.Rank]; - // right non-summing dimensions appear after left non-summing dimensions. - int rightNonSummingStridesOffset = (left.Rank - leftAxes.Length); - - // translates from summing index to right summing dimensions' index portion - int[] rightSummingStrides = new int[rightAxes.Length]; - ArrayUtilities.SplitStrides(right.strides, rightAxes, rightNonSummingStrides, rightNonSummingStridesOffset, rightSummingStrides, 0); - - for (int resultIndex = 0; resultIndex < result.Length; resultIndex++) - { - long sum = (long)0; - - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, resultIndex, resultIndices); - - int leftIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, leftNonSummingStrides); - int rightIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, rightNonSummingStrides); - - for (int summingIndex = 0; summingIndex < summingLength; summingIndex++) - { - int leftIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, leftSummingStrides); - int rightIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, rightSummingStrides); - - int leftIndex = leftIndexNonSumming + leftIndexSumming; - int rightIndex = rightIndexNonSumming + rightIndexSumming; - - // todo, make this more efficient - ArrayUtilities.GetIndices(left.strides, left.IsReversedStride, leftIndex, leftIndices); - ArrayUtilities.GetIndices(right.strides, right.IsReversedStride, rightIndex, rightIndices); - - sum += (long)(left[leftIndices] * right[rightIndices]); - } - - result[resultIndices] = sum; - } - } - public void Decrement(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices]--; - } - - } - public void Divide(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (long)(left[indices] / right[indices]); - } - - } - public void Divide(Tensor tensor, long scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (long)(tensor[indices] / scalar); - } - - } - public void Equals(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] == right[indices]; - } - - } - public void GreaterThan(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] > right[indices]; - } - - } - public void GreaterThanOrEqual(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] >= right[indices]; - } - - } - public void Increment(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices]++; - } - - } - public void LeftShift(Tensor tensor, int value, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (long)(tensor[indices] << value); - } - - } - public void LessThan(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] < right[indices]; - } - - } - public void LessThanOrEqual(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] <= right[indices]; - } - - } - public void Modulo(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (long)(left[indices] % right[indices]); - } - - } - public void Modulo(Tensor tensor, long scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (long)(tensor[indices] % scalar); - } - - } - public void Multiply(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (long)(left[indices] * right[indices]); - } - - } - public void Multiply(Tensor tensor, long scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (long)(tensor[indices] * scalar); - } - - } - public void NotEquals(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] != right[indices]; - } - - } - public void Or(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (long)(left[indices] | right[indices]); - } - - } - public void Or(Tensor tensor, long scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (long)(tensor[indices] | scalar); - } - - } - public void RightShift(Tensor tensor, int value, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (long)(tensor[indices] >> value); - } - - } - public void Subtract(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (long)(left[indices] - right[indices]); - } - - } - public void Subtract(Tensor tensor, long scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (long)(tensor[indices] - scalar); - } - - } - public void UnaryMinus(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (long)-tensor[indices]; - } - - } - public void UnaryPlus(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (long)+tensor[indices]; - } - - } - public void Xor(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (long)(left[indices] ^ right[indices]); - } - - } - public void Xor(Tensor tensor, long scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (long)(tensor[indices] ^ scalar); - } - - } - - public void Add(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (long)(leftSpan[i] + rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (long)(leftSpan[op1Index] + rightSpan[op2Index]); - - } - } - } - public void Add(DenseTensor tensor, long scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (long)(tensorSpan[i] + scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (long)(tensorSpan[op1Index] + scalar); - - } - } - } - public void And(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (long)(leftSpan[i] & rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (long)(leftSpan[op1Index] & rightSpan[op2Index]); - - } - } - } - public void And(DenseTensor tensor, long scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (long)(tensorSpan[i] & scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (long)(tensorSpan[op1Index] & scalar); - - } - } - } - public void Contract(DenseTensor left, DenseTensor right, int[] leftAxes, int[] rightAxes, DenseTensor result) - { - var summingDimensions = new int[leftAxes.Length]; - for (int i = 0; i < leftAxes.Length; i++) - { - summingDimensions[i] = left.dimensions[leftAxes[i]]; - } - - var summingStrides = ArrayUtilities.GetStrides(summingDimensions); - int summingLength = (int)ArrayUtilities.GetProduct(summingDimensions); - - var resultStrides = result.strides; - - // translates from result index to left non-summing dimensions' index portion - // since left non-summing dimensions are given precedence in result, the end is zero-padded - int[] leftNonSummingStrides = new int[result.Rank]; - - // translates from summing index to left summing dimensions' index portion - int[] leftSummingStrides = new int[leftAxes.Length]; - ArrayUtilities.SplitStrides(left.strides, leftAxes, leftNonSummingStrides, 0, leftSummingStrides, 0); - - // translates from result index to right non-summing dimensions' index portion - int[] rightNonSummingStrides = new int[result.Rank]; - // right non-summing dimensions appear after left non-summing dimensions. - int rightNonSummingStridesOffset = (left.Rank - leftAxes.Length); - - // translates from summing index to right summing dimensions' index portion - int[] rightSummingStrides = new int[rightAxes.Length]; - ArrayUtilities.SplitStrides(right.strides, rightAxes, rightNonSummingStrides, rightNonSummingStridesOffset, rightSummingStrides, 0); - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - - for (int resultIndex = 0; resultIndex < resultSpan.Length; resultIndex++) - { - long sum = (long)0; - - int leftIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, leftNonSummingStrides); - int rightIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, rightNonSummingStrides); - - for (int summingIndex = 0; summingIndex < summingLength; summingIndex++) - { - int leftIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, leftSummingStrides); - int rightIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, rightSummingStrides); - - int leftIndex = leftIndexNonSumming + leftIndexSumming; - int rightIndex = rightIndexNonSumming + rightIndexSumming; - - sum += (long)(leftSpan[leftIndex] * rightSpan[rightIndex]); - } - - resultSpan[resultIndex] = sum; - } - } - public void Decrement(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i]--; - } - } - public void Divide(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (long)(leftSpan[i] / rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (long)(leftSpan[op1Index] / rightSpan[op2Index]); - - } - } - } - public void Divide(DenseTensor tensor, long scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (long)(tensorSpan[i] / scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (long)(tensorSpan[op1Index] / scalar); - - } - } - } - public void Equals(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] == rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] == rightSpan[op2Index]; - - } - } - } - public void GreaterThan(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] > rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] > rightSpan[op2Index]; - - } - } - } - public void GreaterThanOrEqual(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] >= rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] >= rightSpan[op2Index]; - - } - } - } - public void Increment(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i]++; - } - } - public void LeftShift(DenseTensor tensor, int value, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (long)(tensorSpan[i] << value); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (long)(tensorSpan[op1Index] << value); - - } - } - } - public void LessThan(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] < rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] < rightSpan[op2Index]; - - } - } - } - public void LessThanOrEqual(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] <= rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] <= rightSpan[op2Index]; - - } - } - } - public void Modulo(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (long)(leftSpan[i] % rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (long)(leftSpan[op1Index] % rightSpan[op2Index]); - - } - } - } - public void Modulo(DenseTensor tensor, long scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (long)(tensorSpan[i] % scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (long)(tensorSpan[op1Index] % scalar); - - } - } - } - public void Multiply(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (long)(leftSpan[i] * rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (long)(leftSpan[op1Index] * rightSpan[op2Index]); - - } - } - } - public void Multiply(DenseTensor tensor, long scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (long)(tensorSpan[i] * scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (long)(tensorSpan[op1Index] * scalar); - - } - } - } - public void NotEquals(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] != rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] != rightSpan[op2Index]; - - } - } - } - public void Or(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (long)(leftSpan[i] | rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (long)(leftSpan[op1Index] | rightSpan[op2Index]); - - } - } - } - public void Or(DenseTensor tensor, long scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (long)(tensorSpan[i] | scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (long)(tensorSpan[op1Index] | scalar); - - } - } - } - public void RightShift(DenseTensor tensor, int value, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (long)(tensorSpan[i] >> value); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (long)(tensorSpan[op1Index] >> value); - - } - } - } - public void Subtract(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (long)(leftSpan[i] - rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (long)(leftSpan[op1Index] - rightSpan[op2Index]); - - } - } - } - public void Subtract(DenseTensor tensor, long scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (long)(tensorSpan[i] - scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (long)(tensorSpan[op1Index] - scalar); - - } - } - } - public void UnaryMinus(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (long)-tensorSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (long)-tensorSpan[op1Index]; - - } - } - } - public void UnaryPlus(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (long)+tensorSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (long)+tensorSpan[op1Index]; - - } - } - } - public void Xor(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (long)(leftSpan[i] ^ rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (long)(leftSpan[op1Index] ^ rightSpan[op2Index]); - - } - } - } - public void Xor(DenseTensor tensor, long scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (long)(tensorSpan[i] ^ scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (long)(tensorSpan[op1Index] ^ scalar); - - } - } - } - } - internal class SByteArithmetic : ITensorArithmetic - { - public sbyte One => 1; - public sbyte Zero => 0; - - public void Add(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (sbyte)(left[indices] + right[indices]); - } - - } - public void Add(Tensor tensor, sbyte scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (sbyte)(tensor[indices] + scalar); - } - - } - public void And(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (sbyte)(left[indices] & right[indices]); - } - - } - public void And(Tensor tensor, sbyte scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (sbyte)(tensor[indices] & scalar); - } - - } - public void Contract(Tensor left, Tensor right, int[] leftAxes, int[] rightAxes, Tensor result) - { - var leftIndices = new int[left.Rank]; - var rightIndices = new int[right.Rank]; - var resultIndices = new int[result.Rank]; - - var summingDimensions = new int[leftAxes.Length]; - for (int i = 0; i < leftAxes.Length; i++) - { - summingDimensions[i] = left.dimensions[leftAxes[i]]; - } - - var summingStrides = ArrayUtilities.GetStrides(summingDimensions); - int summingLength = (int)ArrayUtilities.GetProduct(summingDimensions); - - var resultStrides = result.strides; - - // translates from result index to left non-summing dimensions' index portion - // since left non-summing dimensions are given precedence in result, the end is zero-padded - int[] leftNonSummingStrides = new int[result.Rank]; - - // translates from summing index to left summing dimensions' index portion - int[] leftSummingStrides = new int[leftAxes.Length]; - ArrayUtilities.SplitStrides(left.strides, leftAxes, leftNonSummingStrides, 0, leftSummingStrides, 0); - - // translates from result index to right non-summing dimensions' index portion - int[] rightNonSummingStrides = new int[result.Rank]; - // right non-summing dimensions appear after left non-summing dimensions. - int rightNonSummingStridesOffset = (left.Rank - leftAxes.Length); - - // translates from summing index to right summing dimensions' index portion - int[] rightSummingStrides = new int[rightAxes.Length]; - ArrayUtilities.SplitStrides(right.strides, rightAxes, rightNonSummingStrides, rightNonSummingStridesOffset, rightSummingStrides, 0); - - for (int resultIndex = 0; resultIndex < result.Length; resultIndex++) - { - sbyte sum = (sbyte)0; - - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, resultIndex, resultIndices); - - int leftIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, leftNonSummingStrides); - int rightIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, rightNonSummingStrides); - - for (int summingIndex = 0; summingIndex < summingLength; summingIndex++) - { - int leftIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, leftSummingStrides); - int rightIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, rightSummingStrides); - - int leftIndex = leftIndexNonSumming + leftIndexSumming; - int rightIndex = rightIndexNonSumming + rightIndexSumming; - - // todo, make this more efficient - ArrayUtilities.GetIndices(left.strides, left.IsReversedStride, leftIndex, leftIndices); - ArrayUtilities.GetIndices(right.strides, right.IsReversedStride, rightIndex, rightIndices); - - sum += (sbyte)(left[leftIndices] * right[rightIndices]); - } - - result[resultIndices] = sum; - } - } - public void Decrement(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices]--; - } - - } - public void Divide(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (sbyte)(left[indices] / right[indices]); - } - - } - public void Divide(Tensor tensor, sbyte scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (sbyte)(tensor[indices] / scalar); - } - - } - public void Equals(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] == right[indices]; - } - - } - public void GreaterThan(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] > right[indices]; - } - - } - public void GreaterThanOrEqual(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] >= right[indices]; - } - - } - public void Increment(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices]++; - } - - } - public void LeftShift(Tensor tensor, int value, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (sbyte)(tensor[indices] << value); - } - - } - public void LessThan(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] < right[indices]; - } - - } - public void LessThanOrEqual(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] <= right[indices]; - } - - } - public void Modulo(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (sbyte)(left[indices] % right[indices]); - } - - } - public void Modulo(Tensor tensor, sbyte scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (sbyte)(tensor[indices] % scalar); - } - - } - public void Multiply(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (sbyte)(left[indices] * right[indices]); - } - - } - public void Multiply(Tensor tensor, sbyte scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (sbyte)(tensor[indices] * scalar); - } - - } - public void NotEquals(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] != right[indices]; - } - - } - public void Or(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (sbyte)(left[indices] | right[indices]); - } - - } - public void Or(Tensor tensor, sbyte scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (sbyte)(tensor[indices] | scalar); - } - - } - public void RightShift(Tensor tensor, int value, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (sbyte)(tensor[indices] >> value); - } - - } - public void Subtract(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (sbyte)(left[indices] - right[indices]); - } - - } - public void Subtract(Tensor tensor, sbyte scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (sbyte)(tensor[indices] - scalar); - } - - } - public void UnaryMinus(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (sbyte)-tensor[indices]; - } - - } - public void UnaryPlus(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (sbyte)+tensor[indices]; - } - - } - public void Xor(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (sbyte)(left[indices] ^ right[indices]); - } - - } - public void Xor(Tensor tensor, sbyte scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (sbyte)(tensor[indices] ^ scalar); - } - - } - - public void Add(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (sbyte)(leftSpan[i] + rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (sbyte)(leftSpan[op1Index] + rightSpan[op2Index]); - - } - } - } - public void Add(DenseTensor tensor, sbyte scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (sbyte)(tensorSpan[i] + scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (sbyte)(tensorSpan[op1Index] + scalar); - - } - } - } - public void And(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (sbyte)(leftSpan[i] & rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (sbyte)(leftSpan[op1Index] & rightSpan[op2Index]); - - } - } - } - public void And(DenseTensor tensor, sbyte scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (sbyte)(tensorSpan[i] & scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (sbyte)(tensorSpan[op1Index] & scalar); - - } - } - } - public void Contract(DenseTensor left, DenseTensor right, int[] leftAxes, int[] rightAxes, DenseTensor result) - { - var summingDimensions = new int[leftAxes.Length]; - for (int i = 0; i < leftAxes.Length; i++) - { - summingDimensions[i] = left.dimensions[leftAxes[i]]; - } - - var summingStrides = ArrayUtilities.GetStrides(summingDimensions); - int summingLength = (int)ArrayUtilities.GetProduct(summingDimensions); - - var resultStrides = result.strides; - - // translates from result index to left non-summing dimensions' index portion - // since left non-summing dimensions are given precedence in result, the end is zero-padded - int[] leftNonSummingStrides = new int[result.Rank]; - - // translates from summing index to left summing dimensions' index portion - int[] leftSummingStrides = new int[leftAxes.Length]; - ArrayUtilities.SplitStrides(left.strides, leftAxes, leftNonSummingStrides, 0, leftSummingStrides, 0); - - // translates from result index to right non-summing dimensions' index portion - int[] rightNonSummingStrides = new int[result.Rank]; - // right non-summing dimensions appear after left non-summing dimensions. - int rightNonSummingStridesOffset = (left.Rank - leftAxes.Length); - - // translates from summing index to right summing dimensions' index portion - int[] rightSummingStrides = new int[rightAxes.Length]; - ArrayUtilities.SplitStrides(right.strides, rightAxes, rightNonSummingStrides, rightNonSummingStridesOffset, rightSummingStrides, 0); - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - - for (int resultIndex = 0; resultIndex < resultSpan.Length; resultIndex++) - { - sbyte sum = (sbyte)0; - - int leftIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, leftNonSummingStrides); - int rightIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, rightNonSummingStrides); - - for (int summingIndex = 0; summingIndex < summingLength; summingIndex++) - { - int leftIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, leftSummingStrides); - int rightIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, rightSummingStrides); - - int leftIndex = leftIndexNonSumming + leftIndexSumming; - int rightIndex = rightIndexNonSumming + rightIndexSumming; - - sum += (sbyte)(leftSpan[leftIndex] * rightSpan[rightIndex]); - } - - resultSpan[resultIndex] = sum; - } - } - public void Decrement(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i]--; - } - } - public void Divide(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (sbyte)(leftSpan[i] / rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (sbyte)(leftSpan[op1Index] / rightSpan[op2Index]); - - } - } - } - public void Divide(DenseTensor tensor, sbyte scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (sbyte)(tensorSpan[i] / scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (sbyte)(tensorSpan[op1Index] / scalar); - - } - } - } - public void Equals(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] == rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] == rightSpan[op2Index]; - - } - } - } - public void GreaterThan(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] > rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] > rightSpan[op2Index]; - - } - } - } - public void GreaterThanOrEqual(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] >= rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] >= rightSpan[op2Index]; - - } - } - } - public void Increment(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i]++; - } - } - public void LeftShift(DenseTensor tensor, int value, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (sbyte)(tensorSpan[i] << value); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (sbyte)(tensorSpan[op1Index] << value); - - } - } - } - public void LessThan(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] < rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] < rightSpan[op2Index]; - - } - } - } - public void LessThanOrEqual(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] <= rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] <= rightSpan[op2Index]; - - } - } - } - public void Modulo(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (sbyte)(leftSpan[i] % rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (sbyte)(leftSpan[op1Index] % rightSpan[op2Index]); - - } - } - } - public void Modulo(DenseTensor tensor, sbyte scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (sbyte)(tensorSpan[i] % scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (sbyte)(tensorSpan[op1Index] % scalar); - - } - } - } - public void Multiply(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (sbyte)(leftSpan[i] * rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (sbyte)(leftSpan[op1Index] * rightSpan[op2Index]); - - } - } - } - public void Multiply(DenseTensor tensor, sbyte scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (sbyte)(tensorSpan[i] * scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (sbyte)(tensorSpan[op1Index] * scalar); - - } - } - } - public void NotEquals(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] != rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] != rightSpan[op2Index]; - - } - } - } - public void Or(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (sbyte)(leftSpan[i] | rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (sbyte)(leftSpan[op1Index] | rightSpan[op2Index]); - - } - } - } - public void Or(DenseTensor tensor, sbyte scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (sbyte)(tensorSpan[i] | scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (sbyte)(tensorSpan[op1Index] | scalar); - - } - } - } - public void RightShift(DenseTensor tensor, int value, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (sbyte)(tensorSpan[i] >> value); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (sbyte)(tensorSpan[op1Index] >> value); - - } - } - } - public void Subtract(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (sbyte)(leftSpan[i] - rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (sbyte)(leftSpan[op1Index] - rightSpan[op2Index]); - - } - } - } - public void Subtract(DenseTensor tensor, sbyte scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (sbyte)(tensorSpan[i] - scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (sbyte)(tensorSpan[op1Index] - scalar); - - } - } - } - public void UnaryMinus(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (sbyte)-tensorSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (sbyte)-tensorSpan[op1Index]; - - } - } - } - public void UnaryPlus(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (sbyte)+tensorSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (sbyte)+tensorSpan[op1Index]; - - } - } - } - public void Xor(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (sbyte)(leftSpan[i] ^ rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (sbyte)(leftSpan[op1Index] ^ rightSpan[op2Index]); - - } - } - } - public void Xor(DenseTensor tensor, sbyte scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (sbyte)(tensorSpan[i] ^ scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (sbyte)(tensorSpan[op1Index] ^ scalar); - - } - } - } - } - internal class ShortArithmetic : ITensorArithmetic - { - public short One => 1; - public short Zero => 0; - - public void Add(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (short)(left[indices] + right[indices]); - } - - } - public void Add(Tensor tensor, short scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (short)(tensor[indices] + scalar); - } - - } - public void And(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (short)(left[indices] & right[indices]); - } - - } - public void And(Tensor tensor, short scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (short)(tensor[indices] & scalar); - } - - } - public void Contract(Tensor left, Tensor right, int[] leftAxes, int[] rightAxes, Tensor result) - { - var leftIndices = new int[left.Rank]; - var rightIndices = new int[right.Rank]; - var resultIndices = new int[result.Rank]; - - var summingDimensions = new int[leftAxes.Length]; - for (int i = 0; i < leftAxes.Length; i++) - { - summingDimensions[i] = left.dimensions[leftAxes[i]]; - } - - var summingStrides = ArrayUtilities.GetStrides(summingDimensions); - int summingLength = (int)ArrayUtilities.GetProduct(summingDimensions); - - var resultStrides = result.strides; - - // translates from result index to left non-summing dimensions' index portion - // since left non-summing dimensions are given precedence in result, the end is zero-padded - int[] leftNonSummingStrides = new int[result.Rank]; - - // translates from summing index to left summing dimensions' index portion - int[] leftSummingStrides = new int[leftAxes.Length]; - ArrayUtilities.SplitStrides(left.strides, leftAxes, leftNonSummingStrides, 0, leftSummingStrides, 0); - - // translates from result index to right non-summing dimensions' index portion - int[] rightNonSummingStrides = new int[result.Rank]; - // right non-summing dimensions appear after left non-summing dimensions. - int rightNonSummingStridesOffset = (left.Rank - leftAxes.Length); - - // translates from summing index to right summing dimensions' index portion - int[] rightSummingStrides = new int[rightAxes.Length]; - ArrayUtilities.SplitStrides(right.strides, rightAxes, rightNonSummingStrides, rightNonSummingStridesOffset, rightSummingStrides, 0); - - for (int resultIndex = 0; resultIndex < result.Length; resultIndex++) - { - short sum = (short)0; - - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, resultIndex, resultIndices); - - int leftIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, leftNonSummingStrides); - int rightIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, rightNonSummingStrides); - - for (int summingIndex = 0; summingIndex < summingLength; summingIndex++) - { - int leftIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, leftSummingStrides); - int rightIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, rightSummingStrides); - - int leftIndex = leftIndexNonSumming + leftIndexSumming; - int rightIndex = rightIndexNonSumming + rightIndexSumming; - - // todo, make this more efficient - ArrayUtilities.GetIndices(left.strides, left.IsReversedStride, leftIndex, leftIndices); - ArrayUtilities.GetIndices(right.strides, right.IsReversedStride, rightIndex, rightIndices); - - sum += (short)(left[leftIndices] * right[rightIndices]); - } - - result[resultIndices] = sum; - } - } - public void Decrement(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices]--; - } - - } - public void Divide(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (short)(left[indices] / right[indices]); - } - - } - public void Divide(Tensor tensor, short scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (short)(tensor[indices] / scalar); - } - - } - public void Equals(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] == right[indices]; - } - - } - public void GreaterThan(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] > right[indices]; - } - - } - public void GreaterThanOrEqual(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] >= right[indices]; - } - - } - public void Increment(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices]++; - } - - } - public void LeftShift(Tensor tensor, int value, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (short)(tensor[indices] << value); - } - - } - public void LessThan(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] < right[indices]; - } - - } - public void LessThanOrEqual(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] <= right[indices]; - } - - } - public void Modulo(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (short)(left[indices] % right[indices]); - } - - } - public void Modulo(Tensor tensor, short scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (short)(tensor[indices] % scalar); - } - - } - public void Multiply(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (short)(left[indices] * right[indices]); - } - - } - public void Multiply(Tensor tensor, short scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (short)(tensor[indices] * scalar); - } - - } - public void NotEquals(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] != right[indices]; - } - - } - public void Or(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (short)(left[indices] | right[indices]); - } - - } - public void Or(Tensor tensor, short scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (short)(tensor[indices] | scalar); - } - - } - public void RightShift(Tensor tensor, int value, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (short)(tensor[indices] >> value); - } - - } - public void Subtract(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (short)(left[indices] - right[indices]); - } - - } - public void Subtract(Tensor tensor, short scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (short)(tensor[indices] - scalar); - } - - } - public void UnaryMinus(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (short)-tensor[indices]; - } - - } - public void UnaryPlus(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (short)+tensor[indices]; - } - - } - public void Xor(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (short)(left[indices] ^ right[indices]); - } - - } - public void Xor(Tensor tensor, short scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (short)(tensor[indices] ^ scalar); - } - - } - - public void Add(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (short)(leftSpan[i] + rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (short)(leftSpan[op1Index] + rightSpan[op2Index]); - - } - } - } - public void Add(DenseTensor tensor, short scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (short)(tensorSpan[i] + scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (short)(tensorSpan[op1Index] + scalar); - - } - } - } - public void And(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (short)(leftSpan[i] & rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (short)(leftSpan[op1Index] & rightSpan[op2Index]); - - } - } - } - public void And(DenseTensor tensor, short scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (short)(tensorSpan[i] & scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (short)(tensorSpan[op1Index] & scalar); - - } - } - } - public void Contract(DenseTensor left, DenseTensor right, int[] leftAxes, int[] rightAxes, DenseTensor result) - { - var summingDimensions = new int[leftAxes.Length]; - for (int i = 0; i < leftAxes.Length; i++) - { - summingDimensions[i] = left.dimensions[leftAxes[i]]; - } - - var summingStrides = ArrayUtilities.GetStrides(summingDimensions); - int summingLength = (int)ArrayUtilities.GetProduct(summingDimensions); - - var resultStrides = result.strides; - - // translates from result index to left non-summing dimensions' index portion - // since left non-summing dimensions are given precedence in result, the end is zero-padded - int[] leftNonSummingStrides = new int[result.Rank]; - - // translates from summing index to left summing dimensions' index portion - int[] leftSummingStrides = new int[leftAxes.Length]; - ArrayUtilities.SplitStrides(left.strides, leftAxes, leftNonSummingStrides, 0, leftSummingStrides, 0); - - // translates from result index to right non-summing dimensions' index portion - int[] rightNonSummingStrides = new int[result.Rank]; - // right non-summing dimensions appear after left non-summing dimensions. - int rightNonSummingStridesOffset = (left.Rank - leftAxes.Length); - - // translates from summing index to right summing dimensions' index portion - int[] rightSummingStrides = new int[rightAxes.Length]; - ArrayUtilities.SplitStrides(right.strides, rightAxes, rightNonSummingStrides, rightNonSummingStridesOffset, rightSummingStrides, 0); - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - - for (int resultIndex = 0; resultIndex < resultSpan.Length; resultIndex++) - { - short sum = (short)0; - - int leftIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, leftNonSummingStrides); - int rightIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, rightNonSummingStrides); - - for (int summingIndex = 0; summingIndex < summingLength; summingIndex++) - { - int leftIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, leftSummingStrides); - int rightIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, rightSummingStrides); - - int leftIndex = leftIndexNonSumming + leftIndexSumming; - int rightIndex = rightIndexNonSumming + rightIndexSumming; - - sum += (short)(leftSpan[leftIndex] * rightSpan[rightIndex]); - } - - resultSpan[resultIndex] = sum; - } - } - public void Decrement(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i]--; - } - } - public void Divide(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (short)(leftSpan[i] / rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (short)(leftSpan[op1Index] / rightSpan[op2Index]); - - } - } - } - public void Divide(DenseTensor tensor, short scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (short)(tensorSpan[i] / scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (short)(tensorSpan[op1Index] / scalar); - - } - } - } - public void Equals(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] == rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] == rightSpan[op2Index]; - - } - } - } - public void GreaterThan(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] > rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] > rightSpan[op2Index]; - - } - } - } - public void GreaterThanOrEqual(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] >= rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] >= rightSpan[op2Index]; - - } - } - } - public void Increment(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i]++; - } - } - public void LeftShift(DenseTensor tensor, int value, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (short)(tensorSpan[i] << value); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (short)(tensorSpan[op1Index] << value); - - } - } - } - public void LessThan(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] < rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] < rightSpan[op2Index]; - - } - } - } - public void LessThanOrEqual(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] <= rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] <= rightSpan[op2Index]; - - } - } - } - public void Modulo(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (short)(leftSpan[i] % rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (short)(leftSpan[op1Index] % rightSpan[op2Index]); - - } - } - } - public void Modulo(DenseTensor tensor, short scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (short)(tensorSpan[i] % scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (short)(tensorSpan[op1Index] % scalar); - - } - } - } - public void Multiply(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (short)(leftSpan[i] * rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (short)(leftSpan[op1Index] * rightSpan[op2Index]); - - } - } - } - public void Multiply(DenseTensor tensor, short scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (short)(tensorSpan[i] * scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (short)(tensorSpan[op1Index] * scalar); - - } - } - } - public void NotEquals(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] != rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] != rightSpan[op2Index]; - - } - } - } - public void Or(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (short)(leftSpan[i] | rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (short)(leftSpan[op1Index] | rightSpan[op2Index]); - - } - } - } - public void Or(DenseTensor tensor, short scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (short)(tensorSpan[i] | scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (short)(tensorSpan[op1Index] | scalar); - - } - } - } - public void RightShift(DenseTensor tensor, int value, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (short)(tensorSpan[i] >> value); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (short)(tensorSpan[op1Index] >> value); - - } - } - } - public void Subtract(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (short)(leftSpan[i] - rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (short)(leftSpan[op1Index] - rightSpan[op2Index]); - - } - } - } - public void Subtract(DenseTensor tensor, short scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (short)(tensorSpan[i] - scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (short)(tensorSpan[op1Index] - scalar); - - } - } - } - public void UnaryMinus(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (short)-tensorSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (short)-tensorSpan[op1Index]; - - } - } - } - public void UnaryPlus(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (short)+tensorSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (short)+tensorSpan[op1Index]; - - } - } - } - public void Xor(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (short)(leftSpan[i] ^ rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (short)(leftSpan[op1Index] ^ rightSpan[op2Index]); - - } - } - } - public void Xor(DenseTensor tensor, short scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (short)(tensorSpan[i] ^ scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (short)(tensorSpan[op1Index] ^ scalar); - - } - } - } - } - internal class UIntArithmetic : ITensorArithmetic - { - public uint One => 1; - public uint Zero => 0; - - public void Add(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (uint)(left[indices] + right[indices]); - } - - } - public void Add(Tensor tensor, uint scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (uint)(tensor[indices] + scalar); - } - - } - public void And(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (uint)(left[indices] & right[indices]); - } - - } - public void And(Tensor tensor, uint scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (uint)(tensor[indices] & scalar); - } - - } - public void Contract(Tensor left, Tensor right, int[] leftAxes, int[] rightAxes, Tensor result) - { - var leftIndices = new int[left.Rank]; - var rightIndices = new int[right.Rank]; - var resultIndices = new int[result.Rank]; - - var summingDimensions = new int[leftAxes.Length]; - for (int i = 0; i < leftAxes.Length; i++) - { - summingDimensions[i] = left.dimensions[leftAxes[i]]; - } - - var summingStrides = ArrayUtilities.GetStrides(summingDimensions); - int summingLength = (int)ArrayUtilities.GetProduct(summingDimensions); - - var resultStrides = result.strides; - - // translates from result index to left non-summing dimensions' index portion - // since left non-summing dimensions are given precedence in result, the end is zero-padded - int[] leftNonSummingStrides = new int[result.Rank]; - - // translates from summing index to left summing dimensions' index portion - int[] leftSummingStrides = new int[leftAxes.Length]; - ArrayUtilities.SplitStrides(left.strides, leftAxes, leftNonSummingStrides, 0, leftSummingStrides, 0); - - // translates from result index to right non-summing dimensions' index portion - int[] rightNonSummingStrides = new int[result.Rank]; - // right non-summing dimensions appear after left non-summing dimensions. - int rightNonSummingStridesOffset = (left.Rank - leftAxes.Length); - - // translates from summing index to right summing dimensions' index portion - int[] rightSummingStrides = new int[rightAxes.Length]; - ArrayUtilities.SplitStrides(right.strides, rightAxes, rightNonSummingStrides, rightNonSummingStridesOffset, rightSummingStrides, 0); - - for (int resultIndex = 0; resultIndex < result.Length; resultIndex++) - { - uint sum = (uint)0; - - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, resultIndex, resultIndices); - - int leftIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, leftNonSummingStrides); - int rightIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, rightNonSummingStrides); - - for (int summingIndex = 0; summingIndex < summingLength; summingIndex++) - { - int leftIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, leftSummingStrides); - int rightIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, rightSummingStrides); - - int leftIndex = leftIndexNonSumming + leftIndexSumming; - int rightIndex = rightIndexNonSumming + rightIndexSumming; - - // todo, make this more efficient - ArrayUtilities.GetIndices(left.strides, left.IsReversedStride, leftIndex, leftIndices); - ArrayUtilities.GetIndices(right.strides, right.IsReversedStride, rightIndex, rightIndices); - - sum += (uint)(left[leftIndices] * right[rightIndices]); - } - - result[resultIndices] = sum; - } - } - public void Decrement(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices]--; - } - - } - public void Divide(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (uint)(left[indices] / right[indices]); - } - - } - public void Divide(Tensor tensor, uint scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (uint)(tensor[indices] / scalar); - } - - } - public void Equals(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] == right[indices]; - } - - } - public void GreaterThan(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] > right[indices]; - } - - } - public void GreaterThanOrEqual(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] >= right[indices]; - } - - } - public void Increment(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices]++; - } - - } - public void LeftShift(Tensor tensor, int value, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (uint)(tensor[indices] << value); - } - - } - public void LessThan(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] < right[indices]; - } - - } - public void LessThanOrEqual(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] <= right[indices]; - } - - } - public void Modulo(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (uint)(left[indices] % right[indices]); - } - - } - public void Modulo(Tensor tensor, uint scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (uint)(tensor[indices] % scalar); - } - - } - public void Multiply(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (uint)(left[indices] * right[indices]); - } - - } - public void Multiply(Tensor tensor, uint scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (uint)(tensor[indices] * scalar); - } - - } - public void NotEquals(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] != right[indices]; - } - - } - public void Or(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (uint)(left[indices] | right[indices]); - } - - } - public void Or(Tensor tensor, uint scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (uint)(tensor[indices] | scalar); - } - - } - public void RightShift(Tensor tensor, int value, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (uint)(tensor[indices] >> value); - } - - } - public void Subtract(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (uint)(left[indices] - right[indices]); - } - - } - public void Subtract(Tensor tensor, uint scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (uint)(tensor[indices] - scalar); - } - - } - public void UnaryMinus(Tensor tensor, Tensor result) - { - throw new NotSupportedException(); - } - public void UnaryPlus(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (uint)+tensor[indices]; - } - - } - public void Xor(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (uint)(left[indices] ^ right[indices]); - } - - } - public void Xor(Tensor tensor, uint scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (uint)(tensor[indices] ^ scalar); - } - - } - - public void Add(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (uint)(leftSpan[i] + rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (uint)(leftSpan[op1Index] + rightSpan[op2Index]); - - } - } - } - public void Add(DenseTensor tensor, uint scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (uint)(tensorSpan[i] + scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (uint)(tensorSpan[op1Index] + scalar); - - } - } - } - public void And(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (uint)(leftSpan[i] & rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (uint)(leftSpan[op1Index] & rightSpan[op2Index]); - - } - } - } - public void And(DenseTensor tensor, uint scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (uint)(tensorSpan[i] & scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (uint)(tensorSpan[op1Index] & scalar); - - } - } - } - public void Contract(DenseTensor left, DenseTensor right, int[] leftAxes, int[] rightAxes, DenseTensor result) - { - var summingDimensions = new int[leftAxes.Length]; - for (int i = 0; i < leftAxes.Length; i++) - { - summingDimensions[i] = left.dimensions[leftAxes[i]]; - } - - var summingStrides = ArrayUtilities.GetStrides(summingDimensions); - int summingLength = (int)ArrayUtilities.GetProduct(summingDimensions); - - var resultStrides = result.strides; - - // translates from result index to left non-summing dimensions' index portion - // since left non-summing dimensions are given precedence in result, the end is zero-padded - int[] leftNonSummingStrides = new int[result.Rank]; - - // translates from summing index to left summing dimensions' index portion - int[] leftSummingStrides = new int[leftAxes.Length]; - ArrayUtilities.SplitStrides(left.strides, leftAxes, leftNonSummingStrides, 0, leftSummingStrides, 0); - - // translates from result index to right non-summing dimensions' index portion - int[] rightNonSummingStrides = new int[result.Rank]; - // right non-summing dimensions appear after left non-summing dimensions. - int rightNonSummingStridesOffset = (left.Rank - leftAxes.Length); - - // translates from summing index to right summing dimensions' index portion - int[] rightSummingStrides = new int[rightAxes.Length]; - ArrayUtilities.SplitStrides(right.strides, rightAxes, rightNonSummingStrides, rightNonSummingStridesOffset, rightSummingStrides, 0); - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - - for (int resultIndex = 0; resultIndex < resultSpan.Length; resultIndex++) - { - uint sum = (uint)0; - - int leftIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, leftNonSummingStrides); - int rightIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, rightNonSummingStrides); - - for (int summingIndex = 0; summingIndex < summingLength; summingIndex++) - { - int leftIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, leftSummingStrides); - int rightIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, rightSummingStrides); - - int leftIndex = leftIndexNonSumming + leftIndexSumming; - int rightIndex = rightIndexNonSumming + rightIndexSumming; - - sum += (uint)(leftSpan[leftIndex] * rightSpan[rightIndex]); - } - - resultSpan[resultIndex] = sum; - } - } - public void Decrement(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i]--; - } - } - public void Divide(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (uint)(leftSpan[i] / rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (uint)(leftSpan[op1Index] / rightSpan[op2Index]); - - } - } - } - public void Divide(DenseTensor tensor, uint scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (uint)(tensorSpan[i] / scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (uint)(tensorSpan[op1Index] / scalar); - - } - } - } - public void Equals(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] == rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] == rightSpan[op2Index]; - - } - } - } - public void GreaterThan(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] > rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] > rightSpan[op2Index]; - - } - } - } - public void GreaterThanOrEqual(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] >= rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] >= rightSpan[op2Index]; - - } - } - } - public void Increment(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i]++; - } - } - public void LeftShift(DenseTensor tensor, int value, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (uint)(tensorSpan[i] << value); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (uint)(tensorSpan[op1Index] << value); - - } - } - } - public void LessThan(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] < rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] < rightSpan[op2Index]; - - } - } - } - public void LessThanOrEqual(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] <= rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] <= rightSpan[op2Index]; - - } - } - } - public void Modulo(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (uint)(leftSpan[i] % rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (uint)(leftSpan[op1Index] % rightSpan[op2Index]); - - } - } - } - public void Modulo(DenseTensor tensor, uint scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (uint)(tensorSpan[i] % scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (uint)(tensorSpan[op1Index] % scalar); - - } - } - } - public void Multiply(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (uint)(leftSpan[i] * rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (uint)(leftSpan[op1Index] * rightSpan[op2Index]); - - } - } - } - public void Multiply(DenseTensor tensor, uint scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (uint)(tensorSpan[i] * scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (uint)(tensorSpan[op1Index] * scalar); - - } - } - } - public void NotEquals(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] != rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] != rightSpan[op2Index]; - - } - } - } - public void Or(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (uint)(leftSpan[i] | rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (uint)(leftSpan[op1Index] | rightSpan[op2Index]); - - } - } - } - public void Or(DenseTensor tensor, uint scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (uint)(tensorSpan[i] | scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (uint)(tensorSpan[op1Index] | scalar); - - } - } - } - public void RightShift(DenseTensor tensor, int value, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (uint)(tensorSpan[i] >> value); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (uint)(tensorSpan[op1Index] >> value); - - } - } - } - public void Subtract(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (uint)(leftSpan[i] - rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (uint)(leftSpan[op1Index] - rightSpan[op2Index]); - - } - } - } - public void Subtract(DenseTensor tensor, uint scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (uint)(tensorSpan[i] - scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (uint)(tensorSpan[op1Index] - scalar); - - } - } - } - public void UnaryMinus(DenseTensor tensor, DenseTensor result) - { - throw new NotSupportedException(); - } - public void UnaryPlus(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (uint)+tensorSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (uint)+tensorSpan[op1Index]; - - } - } - } - public void Xor(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (uint)(leftSpan[i] ^ rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (uint)(leftSpan[op1Index] ^ rightSpan[op2Index]); - - } - } - } - public void Xor(DenseTensor tensor, uint scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (uint)(tensorSpan[i] ^ scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (uint)(tensorSpan[op1Index] ^ scalar); - - } - } - } - } - internal class ULongArithmetic : ITensorArithmetic - { - public ulong One => 1; - public ulong Zero => 0; - - public void Add(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ulong)(left[indices] + right[indices]); - } - - } - public void Add(Tensor tensor, ulong scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ulong)(tensor[indices] + scalar); - } - - } - public void And(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ulong)(left[indices] & right[indices]); - } - - } - public void And(Tensor tensor, ulong scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ulong)(tensor[indices] & scalar); - } - - } - public void Contract(Tensor left, Tensor right, int[] leftAxes, int[] rightAxes, Tensor result) - { - var leftIndices = new int[left.Rank]; - var rightIndices = new int[right.Rank]; - var resultIndices = new int[result.Rank]; - - var summingDimensions = new int[leftAxes.Length]; - for (int i = 0; i < leftAxes.Length; i++) - { - summingDimensions[i] = left.dimensions[leftAxes[i]]; - } - - var summingStrides = ArrayUtilities.GetStrides(summingDimensions); - int summingLength = (int)ArrayUtilities.GetProduct(summingDimensions); - - var resultStrides = result.strides; - - // translates from result index to left non-summing dimensions' index portion - // since left non-summing dimensions are given precedence in result, the end is zero-padded - int[] leftNonSummingStrides = new int[result.Rank]; - - // translates from summing index to left summing dimensions' index portion - int[] leftSummingStrides = new int[leftAxes.Length]; - ArrayUtilities.SplitStrides(left.strides, leftAxes, leftNonSummingStrides, 0, leftSummingStrides, 0); - - // translates from result index to right non-summing dimensions' index portion - int[] rightNonSummingStrides = new int[result.Rank]; - // right non-summing dimensions appear after left non-summing dimensions. - int rightNonSummingStridesOffset = (left.Rank - leftAxes.Length); - - // translates from summing index to right summing dimensions' index portion - int[] rightSummingStrides = new int[rightAxes.Length]; - ArrayUtilities.SplitStrides(right.strides, rightAxes, rightNonSummingStrides, rightNonSummingStridesOffset, rightSummingStrides, 0); - - for (int resultIndex = 0; resultIndex < result.Length; resultIndex++) - { - ulong sum = (ulong)0; - - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, resultIndex, resultIndices); - - int leftIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, leftNonSummingStrides); - int rightIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, rightNonSummingStrides); - - for (int summingIndex = 0; summingIndex < summingLength; summingIndex++) - { - int leftIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, leftSummingStrides); - int rightIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, rightSummingStrides); - - int leftIndex = leftIndexNonSumming + leftIndexSumming; - int rightIndex = rightIndexNonSumming + rightIndexSumming; - - // todo, make this more efficient - ArrayUtilities.GetIndices(left.strides, left.IsReversedStride, leftIndex, leftIndices); - ArrayUtilities.GetIndices(right.strides, right.IsReversedStride, rightIndex, rightIndices); - - sum += (ulong)(left[leftIndices] * right[rightIndices]); - } - - result[resultIndices] = sum; - } - } - public void Decrement(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices]--; - } - - } - public void Divide(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ulong)(left[indices] / right[indices]); - } - - } - public void Divide(Tensor tensor, ulong scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ulong)(tensor[indices] / scalar); - } - - } - public void Equals(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] == right[indices]; - } - - } - public void GreaterThan(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] > right[indices]; - } - - } - public void GreaterThanOrEqual(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] >= right[indices]; - } - - } - public void Increment(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices]++; - } - - } - public void LeftShift(Tensor tensor, int value, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ulong)(tensor[indices] << value); - } - - } - public void LessThan(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] < right[indices]; - } - - } - public void LessThanOrEqual(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] <= right[indices]; - } - - } - public void Modulo(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ulong)(left[indices] % right[indices]); - } - - } - public void Modulo(Tensor tensor, ulong scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ulong)(tensor[indices] % scalar); - } - - } - public void Multiply(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ulong)(left[indices] * right[indices]); - } - - } - public void Multiply(Tensor tensor, ulong scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ulong)(tensor[indices] * scalar); - } - - } - public void NotEquals(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] != right[indices]; - } - - } - public void Or(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ulong)(left[indices] | right[indices]); - } - - } - public void Or(Tensor tensor, ulong scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ulong)(tensor[indices] | scalar); - } - - } - public void RightShift(Tensor tensor, int value, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ulong)(tensor[indices] >> value); - } - - } - public void Subtract(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ulong)(left[indices] - right[indices]); - } - - } - public void Subtract(Tensor tensor, ulong scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ulong)(tensor[indices] - scalar); - } - - } - public void UnaryMinus(Tensor tensor, Tensor result) - { - throw new NotSupportedException(); - } - public void UnaryPlus(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ulong)+tensor[indices]; - } - - } - public void Xor(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ulong)(left[indices] ^ right[indices]); - } - - } - public void Xor(Tensor tensor, ulong scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ulong)(tensor[indices] ^ scalar); - } - - } - - public void Add(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ulong)(leftSpan[i] + rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ulong)(leftSpan[op1Index] + rightSpan[op2Index]); - - } - } - } - public void Add(DenseTensor tensor, ulong scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ulong)(tensorSpan[i] + scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ulong)(tensorSpan[op1Index] + scalar); - - } - } - } - public void And(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ulong)(leftSpan[i] & rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ulong)(leftSpan[op1Index] & rightSpan[op2Index]); - - } - } - } - public void And(DenseTensor tensor, ulong scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ulong)(tensorSpan[i] & scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ulong)(tensorSpan[op1Index] & scalar); - - } - } - } - public void Contract(DenseTensor left, DenseTensor right, int[] leftAxes, int[] rightAxes, DenseTensor result) - { - var summingDimensions = new int[leftAxes.Length]; - for (int i = 0; i < leftAxes.Length; i++) - { - summingDimensions[i] = left.dimensions[leftAxes[i]]; - } - - var summingStrides = ArrayUtilities.GetStrides(summingDimensions); - int summingLength = (int)ArrayUtilities.GetProduct(summingDimensions); - - var resultStrides = result.strides; - - // translates from result index to left non-summing dimensions' index portion - // since left non-summing dimensions are given precedence in result, the end is zero-padded - int[] leftNonSummingStrides = new int[result.Rank]; - - // translates from summing index to left summing dimensions' index portion - int[] leftSummingStrides = new int[leftAxes.Length]; - ArrayUtilities.SplitStrides(left.strides, leftAxes, leftNonSummingStrides, 0, leftSummingStrides, 0); - - // translates from result index to right non-summing dimensions' index portion - int[] rightNonSummingStrides = new int[result.Rank]; - // right non-summing dimensions appear after left non-summing dimensions. - int rightNonSummingStridesOffset = (left.Rank - leftAxes.Length); - - // translates from summing index to right summing dimensions' index portion - int[] rightSummingStrides = new int[rightAxes.Length]; - ArrayUtilities.SplitStrides(right.strides, rightAxes, rightNonSummingStrides, rightNonSummingStridesOffset, rightSummingStrides, 0); - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - - for (int resultIndex = 0; resultIndex < resultSpan.Length; resultIndex++) - { - ulong sum = (ulong)0; - - int leftIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, leftNonSummingStrides); - int rightIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, rightNonSummingStrides); - - for (int summingIndex = 0; summingIndex < summingLength; summingIndex++) - { - int leftIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, leftSummingStrides); - int rightIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, rightSummingStrides); - - int leftIndex = leftIndexNonSumming + leftIndexSumming; - int rightIndex = rightIndexNonSumming + rightIndexSumming; - - sum += (ulong)(leftSpan[leftIndex] * rightSpan[rightIndex]); - } - - resultSpan[resultIndex] = sum; - } - } - public void Decrement(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i]--; - } - } - public void Divide(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ulong)(leftSpan[i] / rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ulong)(leftSpan[op1Index] / rightSpan[op2Index]); - - } - } - } - public void Divide(DenseTensor tensor, ulong scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ulong)(tensorSpan[i] / scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ulong)(tensorSpan[op1Index] / scalar); - - } - } - } - public void Equals(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] == rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] == rightSpan[op2Index]; - - } - } - } - public void GreaterThan(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] > rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] > rightSpan[op2Index]; - - } - } - } - public void GreaterThanOrEqual(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] >= rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] >= rightSpan[op2Index]; - - } - } - } - public void Increment(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i]++; - } - } - public void LeftShift(DenseTensor tensor, int value, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ulong)(tensorSpan[i] << value); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ulong)(tensorSpan[op1Index] << value); - - } - } - } - public void LessThan(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] < rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] < rightSpan[op2Index]; - - } - } - } - public void LessThanOrEqual(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] <= rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] <= rightSpan[op2Index]; - - } - } - } - public void Modulo(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ulong)(leftSpan[i] % rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ulong)(leftSpan[op1Index] % rightSpan[op2Index]); - - } - } - } - public void Modulo(DenseTensor tensor, ulong scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ulong)(tensorSpan[i] % scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ulong)(tensorSpan[op1Index] % scalar); - - } - } - } - public void Multiply(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ulong)(leftSpan[i] * rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ulong)(leftSpan[op1Index] * rightSpan[op2Index]); - - } - } - } - public void Multiply(DenseTensor tensor, ulong scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ulong)(tensorSpan[i] * scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ulong)(tensorSpan[op1Index] * scalar); - - } - } - } - public void NotEquals(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] != rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] != rightSpan[op2Index]; - - } - } - } - public void Or(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ulong)(leftSpan[i] | rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ulong)(leftSpan[op1Index] | rightSpan[op2Index]); - - } - } - } - public void Or(DenseTensor tensor, ulong scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ulong)(tensorSpan[i] | scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ulong)(tensorSpan[op1Index] | scalar); - - } - } - } - public void RightShift(DenseTensor tensor, int value, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ulong)(tensorSpan[i] >> value); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ulong)(tensorSpan[op1Index] >> value); - - } - } - } - public void Subtract(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ulong)(leftSpan[i] - rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ulong)(leftSpan[op1Index] - rightSpan[op2Index]); - - } - } - } - public void Subtract(DenseTensor tensor, ulong scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ulong)(tensorSpan[i] - scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ulong)(tensorSpan[op1Index] - scalar); - - } - } - } - public void UnaryMinus(DenseTensor tensor, DenseTensor result) - { - throw new NotSupportedException(); - } - public void UnaryPlus(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ulong)+tensorSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ulong)+tensorSpan[op1Index]; - - } - } - } - public void Xor(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ulong)(leftSpan[i] ^ rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ulong)(leftSpan[op1Index] ^ rightSpan[op2Index]); - - } - } - } - public void Xor(DenseTensor tensor, ulong scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ulong)(tensorSpan[i] ^ scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ulong)(tensorSpan[op1Index] ^ scalar); - - } - } - } - } - internal class UShortArithmetic : ITensorArithmetic - { - public ushort One => 1; - public ushort Zero => 0; - - public void Add(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ushort)(left[indices] + right[indices]); - } - - } - public void Add(Tensor tensor, ushort scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ushort)(tensor[indices] + scalar); - } - - } - public void And(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ushort)(left[indices] & right[indices]); - } - - } - public void And(Tensor tensor, ushort scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ushort)(tensor[indices] & scalar); - } - - } - public void Contract(Tensor left, Tensor right, int[] leftAxes, int[] rightAxes, Tensor result) - { - var leftIndices = new int[left.Rank]; - var rightIndices = new int[right.Rank]; - var resultIndices = new int[result.Rank]; - - var summingDimensions = new int[leftAxes.Length]; - for (int i = 0; i < leftAxes.Length; i++) - { - summingDimensions[i] = left.dimensions[leftAxes[i]]; - } - - var summingStrides = ArrayUtilities.GetStrides(summingDimensions); - int summingLength = (int)ArrayUtilities.GetProduct(summingDimensions); - - var resultStrides = result.strides; - - // translates from result index to left non-summing dimensions' index portion - // since left non-summing dimensions are given precedence in result, the end is zero-padded - int[] leftNonSummingStrides = new int[result.Rank]; - - // translates from summing index to left summing dimensions' index portion - int[] leftSummingStrides = new int[leftAxes.Length]; - ArrayUtilities.SplitStrides(left.strides, leftAxes, leftNonSummingStrides, 0, leftSummingStrides, 0); - - // translates from result index to right non-summing dimensions' index portion - int[] rightNonSummingStrides = new int[result.Rank]; - // right non-summing dimensions appear after left non-summing dimensions. - int rightNonSummingStridesOffset = (left.Rank - leftAxes.Length); - - // translates from summing index to right summing dimensions' index portion - int[] rightSummingStrides = new int[rightAxes.Length]; - ArrayUtilities.SplitStrides(right.strides, rightAxes, rightNonSummingStrides, rightNonSummingStridesOffset, rightSummingStrides, 0); - - for (int resultIndex = 0; resultIndex < result.Length; resultIndex++) - { - ushort sum = (ushort)0; - - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, resultIndex, resultIndices); - - int leftIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, leftNonSummingStrides); - int rightIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, rightNonSummingStrides); - - for (int summingIndex = 0; summingIndex < summingLength; summingIndex++) - { - int leftIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, leftSummingStrides); - int rightIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, rightSummingStrides); - - int leftIndex = leftIndexNonSumming + leftIndexSumming; - int rightIndex = rightIndexNonSumming + rightIndexSumming; - - // todo, make this more efficient - ArrayUtilities.GetIndices(left.strides, left.IsReversedStride, leftIndex, leftIndices); - ArrayUtilities.GetIndices(right.strides, right.IsReversedStride, rightIndex, rightIndices); - - sum += (ushort)(left[leftIndices] * right[rightIndices]); - } - - result[resultIndices] = sum; - } - } - public void Decrement(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices]--; - } - - } - public void Divide(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ushort)(left[indices] / right[indices]); - } - - } - public void Divide(Tensor tensor, ushort scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ushort)(tensor[indices] / scalar); - } - - } - public void Equals(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] == right[indices]; - } - - } - public void GreaterThan(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] > right[indices]; - } - - } - public void GreaterThanOrEqual(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] >= right[indices]; - } - - } - public void Increment(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices]++; - } - - } - public void LeftShift(Tensor tensor, int value, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ushort)(tensor[indices] << value); - } - - } - public void LessThan(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] < right[indices]; - } - - } - public void LessThanOrEqual(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] <= right[indices]; - } - - } - public void Modulo(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ushort)(left[indices] % right[indices]); - } - - } - public void Modulo(Tensor tensor, ushort scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ushort)(tensor[indices] % scalar); - } - - } - public void Multiply(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ushort)(left[indices] * right[indices]); - } - - } - public void Multiply(Tensor tensor, ushort scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ushort)(tensor[indices] * scalar); - } - - } - public void NotEquals(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = left[indices] != right[indices]; - } - - } - public void Or(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ushort)(left[indices] | right[indices]); - } - - } - public void Or(Tensor tensor, ushort scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ushort)(tensor[indices] | scalar); - } - - } - public void RightShift(Tensor tensor, int value, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ushort)(tensor[indices] >> value); - } - - } - public void Subtract(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ushort)(left[indices] - right[indices]); - } - - } - public void Subtract(Tensor tensor, ushort scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ushort)(tensor[indices] - scalar); - } - - } - public void UnaryMinus(Tensor tensor, Tensor result) - { - throw new NotSupportedException(); - } - public void UnaryPlus(Tensor tensor, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ushort)+tensor[indices]; - } - - } - public void Xor(Tensor left, Tensor right, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ushort)(left[indices] ^ right[indices]); - } - - } - public void Xor(Tensor tensor, ushort scalar, Tensor result) - { - - Span indices = new Span(new int[result.Rank]); - for (int i = 0; i < result.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - result[indices] = (ushort)(tensor[indices] ^ scalar); - } - - } - - public void Add(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ushort)(leftSpan[i] + rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ushort)(leftSpan[op1Index] + rightSpan[op2Index]); - - } - } - } - public void Add(DenseTensor tensor, ushort scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ushort)(tensorSpan[i] + scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ushort)(tensorSpan[op1Index] + scalar); - - } - } - } - public void And(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ushort)(leftSpan[i] & rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ushort)(leftSpan[op1Index] & rightSpan[op2Index]); - - } - } - } - public void And(DenseTensor tensor, ushort scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ushort)(tensorSpan[i] & scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ushort)(tensorSpan[op1Index] & scalar); - - } - } - } - public void Contract(DenseTensor left, DenseTensor right, int[] leftAxes, int[] rightAxes, DenseTensor result) - { - var summingDimensions = new int[leftAxes.Length]; - for (int i = 0; i < leftAxes.Length; i++) - { - summingDimensions[i] = left.dimensions[leftAxes[i]]; - } - - var summingStrides = ArrayUtilities.GetStrides(summingDimensions); - int summingLength = (int)ArrayUtilities.GetProduct(summingDimensions); - - var resultStrides = result.strides; - - // translates from result index to left non-summing dimensions' index portion - // since left non-summing dimensions are given precedence in result, the end is zero-padded - int[] leftNonSummingStrides = new int[result.Rank]; - - // translates from summing index to left summing dimensions' index portion - int[] leftSummingStrides = new int[leftAxes.Length]; - ArrayUtilities.SplitStrides(left.strides, leftAxes, leftNonSummingStrides, 0, leftSummingStrides, 0); - - // translates from result index to right non-summing dimensions' index portion - int[] rightNonSummingStrides = new int[result.Rank]; - // right non-summing dimensions appear after left non-summing dimensions. - int rightNonSummingStridesOffset = (left.Rank - leftAxes.Length); - - // translates from summing index to right summing dimensions' index portion - int[] rightSummingStrides = new int[rightAxes.Length]; - ArrayUtilities.SplitStrides(right.strides, rightAxes, rightNonSummingStrides, rightNonSummingStridesOffset, rightSummingStrides, 0); - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - - for (int resultIndex = 0; resultIndex < resultSpan.Length; resultIndex++) - { - ushort sum = (ushort)0; - - int leftIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, leftNonSummingStrides); - int rightIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, rightNonSummingStrides); - - for (int summingIndex = 0; summingIndex < summingLength; summingIndex++) - { - int leftIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, leftSummingStrides); - int rightIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, rightSummingStrides); - - int leftIndex = leftIndexNonSumming + leftIndexSumming; - int rightIndex = rightIndexNonSumming + rightIndexSumming; - - sum += (ushort)(leftSpan[leftIndex] * rightSpan[rightIndex]); - } - - resultSpan[resultIndex] = sum; - } - } - public void Decrement(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i]--; - } - } - public void Divide(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ushort)(leftSpan[i] / rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ushort)(leftSpan[op1Index] / rightSpan[op2Index]); - - } - } - } - public void Divide(DenseTensor tensor, ushort scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ushort)(tensorSpan[i] / scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ushort)(tensorSpan[op1Index] / scalar); - - } - } - } - public void Equals(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] == rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] == rightSpan[op2Index]; - - } - } - } - public void GreaterThan(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] > rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] > rightSpan[op2Index]; - - } - } - } - public void GreaterThanOrEqual(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] >= rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] >= rightSpan[op2Index]; - - } - } - } - public void Increment(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i]++; - } - } - public void LeftShift(DenseTensor tensor, int value, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ushort)(tensorSpan[i] << value); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ushort)(tensorSpan[op1Index] << value); - - } - } - } - public void LessThan(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] < rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] < rightSpan[op2Index]; - - } - } - } - public void LessThanOrEqual(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] <= rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] <= rightSpan[op2Index]; - - } - } - } - public void Modulo(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ushort)(leftSpan[i] % rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ushort)(leftSpan[op1Index] % rightSpan[op2Index]); - - } - } - } - public void Modulo(DenseTensor tensor, ushort scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ushort)(tensorSpan[i] % scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ushort)(tensorSpan[op1Index] % scalar); - - } - } - } - public void Multiply(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ushort)(leftSpan[i] * rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ushort)(leftSpan[op1Index] * rightSpan[op2Index]); - - } - } - } - public void Multiply(DenseTensor tensor, ushort scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ushort)(tensorSpan[i] * scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ushort)(tensorSpan[op1Index] * scalar); - - } - } - } - public void NotEquals(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = leftSpan[i] != rightSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = leftSpan[op1Index] != rightSpan[op2Index]; - - } - } - } - public void Or(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ushort)(leftSpan[i] | rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ushort)(leftSpan[op1Index] | rightSpan[op2Index]); - - } - } - } - public void Or(DenseTensor tensor, ushort scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ushort)(tensorSpan[i] | scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ushort)(tensorSpan[op1Index] | scalar); - - } - } - } - public void RightShift(DenseTensor tensor, int value, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ushort)(tensorSpan[i] >> value); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ushort)(tensorSpan[op1Index] >> value); - - } - } - } - public void Subtract(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ushort)(leftSpan[i] - rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ushort)(leftSpan[op1Index] - rightSpan[op2Index]); - - } - } - } - public void Subtract(DenseTensor tensor, ushort scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ushort)(tensorSpan[i] - scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ushort)(tensorSpan[op1Index] - scalar); - - } - } - } - public void UnaryMinus(DenseTensor tensor, DenseTensor result) - { - throw new NotSupportedException(); - } - public void UnaryPlus(DenseTensor tensor, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ushort)+tensorSpan[i]; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ushort)+tensorSpan[op1Index]; - - } - } - } - public void Xor(DenseTensor left, DenseTensor right, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - if ((result.IsReversedStride == left.IsReversedStride) && (result.IsReversedStride == right.IsReversedStride)) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ushort)(leftSpan[i] ^ rightSpan[i]); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref left.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - ref int op2Index = ref right.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - !left.IsReversedStride ? left.strides : - right.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - left.IsReversedStride ? left.strides : - right.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ushort)(leftSpan[op1Index] ^ rightSpan[op2Index]); - - } - } - } - public void Xor(DenseTensor tensor, ushort scalar, DenseTensor result) - { - - var resultSpan = result.Buffer.Span; - var tensorSpan = tensor.Buffer.Span; - if (result.IsReversedStride == tensor.IsReversedStride) - { - for (int i = 0; i < resultSpan.Length; i++) - { - resultSpan[i] = (ushort)(tensorSpan[i] ^ scalar); - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref result.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref tensor.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !result.IsReversedStride ? result.strides : - tensor.strides; - var columnMajorStrides = result.IsReversedStride ? result.strides : - tensor.strides; - for (;rowMajorIndex < resultSpan.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - resultSpan[resultIndex] = (ushort)(tensorSpan[op1Index] ^ scalar); - - } - } - } - } -} diff --git a/src/libraries/System.Numerics.Tensors/tests/TensorArithmetic.tt b/src/libraries/System.Numerics.Tensors/tests/TensorArithmetic.tt deleted file mode 100644 index 91efa47c1ab768..00000000000000 --- a/src/libraries/System.Numerics.Tensors/tests/TensorArithmetic.tt +++ /dev/null @@ -1,237 +0,0 @@ -<#@ template debug="false" hostspecific="false" language="C#" #> -<#@ assembly name="System.Core" #> -<#@ output extension=".cs" #> -<#@ include file="TensorTemplate.ttinclude" #>// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace System.Numerics.Tensors -{ - internal interface ITensorArithmetic - { - T One { get; } - T Zero { get; } -<# foreach (MethodConfiguration method in methodConfiguration) { #> - <#= method.GetResultMethodSignature("Tensor", "T")#>; -<# } #> - } - - internal static class TensorArithmetic - { - public static ITensorArithmetic Instance => TensorArithmetic.GetArithmetic(); - } - - internal static class TensorArithmetic - { - public static ITensorArithmetic GetArithmetic() - { -<# foreach (TypeConfiguration type in typeConfiguration) { #> - <#=GenerateIfStatementHeader(type)#> - { - return (ITensorArithmetic)new <#=type.ClassPrefix#>Arithmetic(); - } -<# } #> - return null; - } - } - -<# foreach (TypeConfiguration type in typeConfiguration) { #> - internal class <#=type.ClassPrefix#>Arithmetic : ITensorArithmetic<<#=type.TypeName#>> - { - public <#=type.TypeName#> One => <#=type.OneLiteral#>; - public <#=type.TypeName#> Zero => <#=type.ZeroLiteral#>; - -<# foreach (MethodConfiguration method in methodConfiguration) { #> - public <#= method.GetResultMethodSignature("Tensor", type.TypeName)#> - { -<# if ((method.IsNumeric && !type.SupportsNumeric) || (method.IsBitwise && !type.SupportsBitwise) || (type.UnsupportedMethods.Contains(method.MethodName))) { #> - throw new NotSupportedException(); -<# } else if (method.Operator != null) { #> - - Span indices = new Span(new int[result.Rank]); - for(int i = 0; i < <#= method.ResultName #>.Length; i++) - { - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, i, indices); - <#=method.GetElementOperation(type.TypeName, "[indices]")#>; - } - -<# } else if (method.MethodName == "Contract") {#> - var leftIndices = new int[left.Rank]; - var rightIndices = new int[right.Rank]; - var resultIndices = new int[result.Rank]; - - var summingDimensions = new int[leftAxes.Length]; - for(int i = 0; i < leftAxes.Length; i++) - { - summingDimensions[i] = left.dimensions[leftAxes[i]]; - } - - var summingStrides = ArrayUtilities.GetStrides(summingDimensions); - int summingLength = (int)ArrayUtilities.GetProduct(summingDimensions); - - var resultStrides = result.strides; - - // translates from result index to left non-summing dimensions' index portion - // since left non-summing dimensions are given precedence in result, the end is zero-padded - int[] leftNonSummingStrides = new int[result.Rank]; - - // translates from summing index to left summing dimensions' index portion - int[] leftSummingStrides = new int[leftAxes.Length]; - ArrayUtilities.SplitStrides(left.strides, leftAxes, leftNonSummingStrides, 0, leftSummingStrides, 0); - - // translates from result index to right non-summing dimensions' index portion - int[] rightNonSummingStrides = new int[result.Rank]; - // right non-summing dimensions appear after left non-summing dimensions. - int rightNonSummingStridesOffset = (left.Rank - leftAxes.Length); - - // translates from summing index to right summing dimensions' index portion - int[] rightSummingStrides = new int[rightAxes.Length]; - ArrayUtilities.SplitStrides(right.strides, rightAxes, rightNonSummingStrides, rightNonSummingStridesOffset, rightSummingStrides, 0); - - for (int resultIndex = 0; resultIndex < result.Length; resultIndex++) - { - <#=type.TypeName#> sum = (<#=type.TypeName#>)0; - - ArrayUtilities.GetIndices(result.strides, result.IsReversedStride, resultIndex, resultIndices); - - int leftIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, leftNonSummingStrides); - int rightIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, rightNonSummingStrides); - - for (int summingIndex = 0; summingIndex < summingLength; summingIndex++) - { - int leftIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, leftSummingStrides); - int rightIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, rightSummingStrides); - - int leftIndex = leftIndexNonSumming + leftIndexSumming; - int rightIndex = rightIndexNonSumming + rightIndexSumming; - - // todo, make this more efficient - ArrayUtilities.GetIndices(left.strides, left.IsReversedStride, leftIndex, leftIndices); - ArrayUtilities.GetIndices(right.strides, right.IsReversedStride, rightIndex, rightIndices); - - sum += (<#=type.TypeName#>)(left[leftIndices] * right[rightIndices]); - } - - result[resultIndices] = sum; - } -<# } #> - } -<# } #> - -<# foreach (MethodConfiguration method in methodConfiguration) { #> - public <#= method.GetResultMethodSignature("DenseTensor", type.TypeName)#> - { -<# if ((method.IsNumeric && !type.SupportsNumeric) || (method.IsBitwise && !type.SupportsBitwise) || (type.UnsupportedMethods.Contains(method.MethodName))) { #> - throw new NotSupportedException(); -<# } else if (method.Operator != null) { #> - -<# if (method.MethodType == MethodType.UnaryInPlace) { #> - var <#=method.ResultName #>Span = <#=method.ResultName #>.Buffer.Span; - var <#=method.Op1Name #>Span = <#=method.Op1Name #>.Buffer.Span; - for(int i = 0; i < <#=method.ResultName #>Span.Length; i++) - { - <#=method.GetElementOperation(type.TypeName, "Span[i]")#>; - } -<# } else {#> - var <#=method.ResultName #>Span = <#=method.ResultName #>.Buffer.Span; - var <#=method.Op1Name #>Span = <#=method.Op1Name #>.Buffer.Span; -<# if ((method.MethodType == MethodType.Binary) || (method.MethodType == MethodType.Comparison)) {#> - var <#=method.Op2Name #>Span = <#=method.Op2Name #>.Buffer.Span; -<# } #> - if <#= method.GetLinearOperationCheck() #> - { - for(int i = 0; i < <#= method.ResultName #>Span.Length; i++) - { - <#=method.GetElementOperation(type.TypeName, "Span[i]")#>; - } - } - else - { - int rowMajorIndex = 0; - int colMajorIndex = 0; - - ref int resultIndex = ref <#= method.ResultName #>.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - ref int op1Index = ref <#= method.Op1Name #>.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - -<# if ((method.MethodType == MethodType.Binary) || (method.MethodType == MethodType.Comparison)) {#> - ref int op2Index = ref <#= method.Op2Name #>.IsReversedStride ? ref colMajorIndex : ref rowMajorIndex; - - var rowMajorStrides = !<#= method.ResultName #>.IsReversedStride ? <#= method.ResultName #>.strides : - !<#= method.Op1Name #>.IsReversedStride ? <#= method.Op1Name #>.strides : - <#= method.Op2Name #>.strides; - var columnMajorStrides = <#= method.ResultName #>.IsReversedStride ? <#= method.ResultName #>.strides : - <#= method.Op1Name #>.IsReversedStride ? <#= method.Op1Name #>.strides : - <#= method.Op2Name #>.strides; -<# } else {#> - var rowMajorStrides = !<#= method.ResultName #>.IsReversedStride ? <#= method.ResultName #>.strides : - <#= method.Op1Name #>.strides; - var columnMajorStrides = <#= method.ResultName #>.IsReversedStride ? <#= method.ResultName #>.strides : - <#= method.Op1Name #>.strides; -<# } #> - for(;rowMajorIndex < <#= method.ResultName #>Span.Length; rowMajorIndex++) - { - colMajorIndex = ArrayUtilities.TransformIndexByStrides(rowMajorIndex, rowMajorStrides, false, columnMajorStrides); - - <#=method.GetElementOperation(type.TypeName, "Span[resultIndex]", "Span[op1Index]", "Span[op2Index]")#>; - - } - } -<# } #> -<# } else if (method.MethodName == "Contract") {#> - var summingDimensions = new int[leftAxes.Length]; - for(int i = 0; i < leftAxes.Length; i++) - { - summingDimensions[i] = left.dimensions[leftAxes[i]]; - } - - var summingStrides = ArrayUtilities.GetStrides(summingDimensions); - int summingLength = (int)ArrayUtilities.GetProduct(summingDimensions); - - var resultStrides = result.strides; - - // translates from result index to left non-summing dimensions' index portion - // since left non-summing dimensions are given precedence in result, the end is zero-padded - int[] leftNonSummingStrides = new int[result.Rank]; - - // translates from summing index to left summing dimensions' index portion - int[] leftSummingStrides = new int[leftAxes.Length]; - ArrayUtilities.SplitStrides(left.strides, leftAxes, leftNonSummingStrides, 0, leftSummingStrides, 0); - - // translates from result index to right non-summing dimensions' index portion - int[] rightNonSummingStrides = new int[result.Rank]; - // right non-summing dimensions appear after left non-summing dimensions. - int rightNonSummingStridesOffset = (left.Rank - leftAxes.Length); - - // translates from summing index to right summing dimensions' index portion - int[] rightSummingStrides = new int[rightAxes.Length]; - ArrayUtilities.SplitStrides(right.strides, rightAxes, rightNonSummingStrides, rightNonSummingStridesOffset, rightSummingStrides, 0); - - var resultSpan = result.Buffer.Span; - var leftSpan = left.Buffer.Span; - var rightSpan = right.Buffer.Span; - - for (int resultIndex = 0; resultIndex < resultSpan.Length; resultIndex++) - { - <#=type.TypeName#> sum = (<#=type.TypeName#>)0; - - int leftIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, leftNonSummingStrides); - int rightIndexNonSumming = ArrayUtilities.TransformIndexByStrides(resultIndex, resultStrides, result.IsReversedStride, rightNonSummingStrides); - - for (int summingIndex = 0; summingIndex < summingLength; summingIndex++) - { - int leftIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, leftSummingStrides); - int rightIndexSumming = ArrayUtilities.TransformIndexByStrides(summingIndex, summingStrides, false, rightSummingStrides); - - int leftIndex = leftIndexNonSumming + leftIndexSumming; - int rightIndex = rightIndexNonSumming + rightIndexSumming; - - sum += (<#=type.TypeName#>)(leftSpan[leftIndex] * rightSpan[rightIndex]); - } - - resultSpan[resultIndex] = sum; - } -<# } #> - } -<# } #> - } -<# } #> -} diff --git a/src/libraries/System.Numerics.Tensors/tests/TensorExtensions.cs b/src/libraries/System.Numerics.Tensors/tests/TensorExtensions.cs deleted file mode 100644 index 2aa79f0e120589..00000000000000 --- a/src/libraries/System.Numerics.Tensors/tests/TensorExtensions.cs +++ /dev/null @@ -1,31 +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.Numerics.Tensors -{ - public static partial class TensorExtensions - { - private static int[] s_zeroArray = new[] { 0 }; - private static int[] s_oneArray = new[] { 1 }; - - internal static Tensor MatrixMultiply(this Tensor left, Tensor right) - { - if (left.Rank != 2) - { - throw new InvalidOperationException($"{nameof(MatrixMultiply)} is only valid for a {nameof(Tensor)} of {nameof(left.Rank)} 2."); - } - - if (right.Rank != 2) - { - throw new ArgumentException($"{nameof(Tensor)} {nameof(right)} must have {nameof(left.Rank)} 2.", nameof(right)); - } - - if (left.dimensions[1] != right.dimensions[0]) - { - throw new ArgumentException($"{nameof(Tensor)} {nameof(right)} must have first dimension of {left.dimensions[1]}.", nameof(right)); - } - - return TensorOperations.Contract(left, right, s_oneArray, s_zeroArray); - } - } -} diff --git a/src/libraries/System.Numerics.Tensors/tests/TensorOperations.cs b/src/libraries/System.Numerics.Tensors/tests/TensorOperations.cs deleted file mode 100644 index 009ad006b88c53..00000000000000 --- a/src/libraries/System.Numerics.Tensors/tests/TensorOperations.cs +++ /dev/null @@ -1,738 +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.Numerics.Tensors -{ - public static partial class TensorOperations - { - internal static void ValidateBinaryArgs(Tensor left, Tensor right) - { - if (left.Rank != right.Rank || left.Length != right.Length) - { - throw new ArgumentException("Operands must have matching dimensions", nameof(right)); - } - - if (left.Rank == 0) - { - throw new ArgumentException($"Cannot operate on Tensor with {nameof(Tensor.Rank)} of 0.", nameof(left)); - } - - for (int i = 0; i < left.Rank; i++) - { - if (left.dimensions[i] != right.dimensions[i]) - { - throw new ArgumentException("Operands must have matching dimensions", nameof(right)); - } - } - } - - internal static void ValidateBinaryArgs(Tensor left, Tensor right, Tensor result) - { - if (left.Rank != right.Rank || left.Length != right.Length) - { - throw new ArgumentException("Operands must have matching dimensions", nameof(right)); - } - - if (left.Rank != result.Rank || left.Length != result.Length) - { - throw new ArgumentException("Operands must have matching dimensions", nameof(result)); - } - - if (left.Rank == 0) - { - throw new ArgumentException($"Cannot operate on Tensor with {nameof(Tensor.Rank)} of 0.", nameof(left)); - } - - for (int i = 0; i < result.Rank; i++) - { - if (left.dimensions[i] != right.dimensions[i]) - { - throw new ArgumentException("Operands must have matching dimensions", nameof(right)); - } - - if (left.dimensions[i] != result.dimensions[i]) - { - throw new ArgumentException("Operands and result must have matching dimensions", nameof(result)); - } - } - } - - internal static void ValidateBinaryArgs(Tensor left, Tensor right, Tensor result) - { - if (left.Rank != right.Rank || left.Length != right.Length) - { - throw new ArgumentException("Operands must have matching dimensions", nameof(right)); - } - - if (left.Rank != result.Rank || left.Length != result.Length) - { - throw new ArgumentException("Operands must have matching dimensions", nameof(result)); - } - - if (left.Rank == 0) - { - throw new ArgumentException($"Cannot operate on Tensor with {nameof(Tensor.Rank)} of 0.", nameof(left)); - } - - for (int i = 0; i < result.Rank; i++) - { - if (left.dimensions[i] != right.dimensions[i]) - { - throw new ArgumentException("Operands must have matching dimensions", nameof(right)); - } - - if (left.dimensions[i] != result.dimensions[i]) - { - throw new ArgumentException("Operands and result must have matching dimensions", nameof(result)); - } - } - } - - internal static void ValidateArgs(Tensor tensor) - { - if (tensor.Rank == 0) - { - throw new ArgumentException($"Cannot operate on Tensor with {nameof(Tensor.Rank)} of 0.", nameof(tensor)); - } - } - - internal static void ValidateArgs(Tensor tensor, Tensor result) - { - if (tensor.Rank != result.Rank || tensor.Length != result.Length) - { - throw new ArgumentException("Operands and result must have matching dimensions", nameof(result)); - } - - if (tensor.Rank == 0) - { - throw new ArgumentException($"Cannot operate on Tensor with {nameof(Tensor.Rank)} of 0.", nameof(tensor)); - } - - for (int i = 0; i < result.Rank; i++) - { - if (tensor.dimensions[i] != result.dimensions[i]) - { - throw new ArgumentException("Operands and result must have matching dimensions", nameof(result)); - } - } - } - - internal static int[] ValidateContractArgs(Tensor left, Tensor right, int[] leftAxes, int[] rightAxes) - { - if (leftAxes == null) - { - throw new ArgumentNullException(nameof(left)); - } - - if (rightAxes == null) - { - throw new ArgumentNullException(nameof(left)); - } - - if (leftAxes.Length != rightAxes.Length) - { - throw new ArgumentException($"{nameof(leftAxes)} and {nameof(rightAxes)} must have the same length, but were {leftAxes.Length} and {rightAxes.Length}, respectively."); - } - - for (int i = 0; i < leftAxes.Length; i++) - { - var leftAxis = leftAxes[i]; - - if (leftAxis >= left.Rank) - { - throw new ArgumentOutOfRangeException($"{nameof(leftAxes)}[{i}] was set to axis index {leftAxis} which exceeds the Rank of {left}."); - } - - var leftDimension = left.dimensions[leftAxis]; - - var rightAxis = rightAxes[i]; - - if (rightAxis >= right.Rank) - { - throw new ArgumentOutOfRangeException($"{nameof(rightAxes)}[{i}] was set to axis index {rightAxis} which exceeds the Rank of {right}."); - } - - var rightDimension = right.dimensions[rightAxis]; - - if (leftDimension != rightDimension) - { - throw new ArgumentOutOfRangeException($"Tensors may only be contracted on axes of the same length, but {nameof(leftAxes)} index {i} was length {leftDimension} and {nameof(rightAxes)} index {i} was length {rightDimension}."); - } - } - - var leftNonSummingDimensions = left.Rank - leftAxes.Length; - var rightNonSummingDimensions = right.Rank - rightAxes.Length; - var resultDimensions = new int[leftNonSummingDimensions + rightNonSummingDimensions]; - int dimensionsIndex = 0; - - Action, int[]> fillDimensions = (tensor, axes) => - { - for (int i = 0; i < tensor.Rank; i++) - { - var skip = false; - foreach (var contractionIndex in axes) - { - if (contractionIndex == i) - { - skip = true; - break; - } - } - - if (!skip) - { - resultDimensions[dimensionsIndex++] = tensor.dimensions[i]; - } - } - }; - - fillDimensions(left, leftAxes); - fillDimensions(right, rightAxes); - - return resultDimensions; - } - - internal static int[] ValidateContractArgs(Tensor left, Tensor right, int[] leftAxes, int[] rightAxes, Tensor result) - { - var expectedDimensions = ValidateContractArgs(left, right, leftAxes, rightAxes); - - if (result.Rank != expectedDimensions.Length) - { - throw new ArgumentException($"{nameof(result)} should have {expectedDimensions.Length} dimensions but had {result.Rank}."); - } - - for (int i = 0; i < expectedDimensions.Length; i++) - { - if (result.dimensions[i] != expectedDimensions[i]) - { - throw new ArgumentException($"{nameof(result)} dimension {i} should be {expectedDimensions[i]} but was {result.dimensions[i]}."); - } - } - - return expectedDimensions; - } - - internal static void Add(Tensor left, Tensor right, Tensor result) - { - ValidateBinaryArgs(left, right, result); - - TensorArithmetic.Instance.Add(left, right, result); - } - - internal static Tensor Add(Tensor left, Tensor right) - { - ValidateBinaryArgs(left, right); - - var result = left.CloneEmpty(); - - TensorArithmetic.Instance.Add(left, right, result); - - return result; - } - - internal static void Add(Tensor tensor, T scalar, Tensor result) - { - ValidateArgs(tensor, result); - - TensorArithmetic.Instance.Add(tensor, scalar, result); - } - - internal static Tensor Add(Tensor tensor, T scalar) - { - ValidateArgs(tensor); - - var result = tensor.CloneEmpty(); - - TensorArithmetic.Instance.Add(tensor, scalar, result); - - return result; - } - - internal static void And(Tensor left, Tensor right, Tensor result) - { - ValidateBinaryArgs(left, right, result); - - TensorArithmetic.Instance.And(left, right, result); - } - - internal static Tensor And(Tensor left, Tensor right) - { - ValidateBinaryArgs(left, right); - - var result = left.CloneEmpty(); - - TensorArithmetic.Instance.And(left, right, result); - - return result; - } - - internal static void And(Tensor tensor, T scalar, Tensor result) - { - ValidateArgs(tensor, result); - - TensorArithmetic.Instance.And(tensor, scalar, result); - } - - internal static Tensor And(Tensor tensor, T scalar) - { - ValidateArgs(tensor); - - var result = tensor.CloneEmpty(); - - TensorArithmetic.Instance.And(tensor, scalar, result); - - return result; - } - - internal static void Contract(Tensor left, Tensor right, int[] leftAxes, int[] rightAxes, Tensor result) - { - ValidateContractArgs(left, right, leftAxes, rightAxes, result); - - TensorArithmetic.Instance.Contract(left, right, leftAxes, rightAxes, result); - } - - internal static Tensor Contract(Tensor left, Tensor right, int[] leftAxes, int[] rightAxes) - { - var resultDimensions = ValidateContractArgs(left, right, leftAxes, rightAxes); - - var result = left.CloneEmpty(resultDimensions); - - TensorArithmetic.Instance.Contract(left, right, leftAxes, rightAxes, result); - - return result; - } - - internal static void Decrement(Tensor tensor, Tensor result) - { - ValidateArgs(tensor, result); - - TensorArithmetic.Instance.Decrement(tensor, result); - } - - internal static Tensor Decrement(Tensor tensor) - { - ValidateArgs(tensor); - - var result = tensor.Clone(); - - TensorArithmetic.Instance.Decrement(tensor, result); - - return result; - } - - internal static void Divide(Tensor left, Tensor right, Tensor result) - { - ValidateBinaryArgs(left, right, result); - - TensorArithmetic.Instance.Divide(left, right, result); - } - - internal static Tensor Divide(Tensor left, Tensor right) - { - ValidateBinaryArgs(left, right); - - var result = left.CloneEmpty(); - - TensorArithmetic.Instance.Divide(left, right, result); - - return result; - } - - internal static void Divide(Tensor tensor, T scalar, Tensor result) - { - ValidateArgs(tensor, result); - - TensorArithmetic.Instance.Divide(tensor, scalar, result); - } - - internal static Tensor Divide(Tensor tensor, T scalar) - { - ValidateArgs(tensor); - - var result = tensor.CloneEmpty(); - - TensorArithmetic.Instance.Divide(tensor, scalar, result); - - return result; - } - - internal static void Equals(Tensor left, Tensor right, Tensor result) - { - ValidateBinaryArgs(left, right, result); - - TensorArithmetic.Instance.Equals(left, right, result); - } - - internal static Tensor Equals(Tensor left, Tensor right) - { - ValidateBinaryArgs(left, right); - - var result = left.CloneEmpty(); - - TensorArithmetic.Instance.Equals(left, right, result); - - return result; - } - - internal static void GreaterThan(Tensor left, Tensor right, Tensor result) - { - ValidateBinaryArgs(left, right, result); - - TensorArithmetic.Instance.GreaterThan(left, right, result); - } - - internal static Tensor GreaterThan(Tensor left, Tensor right) - { - ValidateBinaryArgs(left, right); - - var result = left.CloneEmpty(); - - TensorArithmetic.Instance.GreaterThan(left, right, result); - - return result; - } - - internal static void GreaterThanOrEqual(Tensor left, Tensor right, Tensor result) - { - ValidateBinaryArgs(left, right, result); - - TensorArithmetic.Instance.GreaterThanOrEqual(left, right, result); - } - - internal static Tensor GreaterThanOrEqual(Tensor left, Tensor right) - { - ValidateBinaryArgs(left, right); - - var result = left.CloneEmpty(); - - TensorArithmetic.Instance.GreaterThanOrEqual(left, right, result); - - return result; - } - - internal static void Increment(Tensor tensor, Tensor result) - { - ValidateArgs(tensor, result); - - TensorArithmetic.Instance.Increment(tensor, result); - } - - internal static Tensor Increment(Tensor tensor) - { - ValidateArgs(tensor); - - var result = tensor.Clone(); - - TensorArithmetic.Instance.Increment(tensor, result); - - return result; - } - - internal static void LeftShift(Tensor tensor, int value, Tensor result) - { - ValidateArgs(tensor, result); - - TensorArithmetic.Instance.LeftShift(tensor, value, result); - } - - internal static Tensor LeftShift(Tensor tensor, int value) - { - ValidateArgs(tensor); - - var result = tensor.CloneEmpty(); - - TensorArithmetic.Instance.LeftShift(tensor, value, result); - - return result; - } - - internal static void LessThan(Tensor left, Tensor right, Tensor result) - { - ValidateBinaryArgs(left, right, result); - - TensorArithmetic.Instance.LessThan(left, right, result); - } - - internal static Tensor LessThan(Tensor left, Tensor right) - { - ValidateBinaryArgs(left, right); - - var result = left.CloneEmpty(); - - TensorArithmetic.Instance.LessThan(left, right, result); - - return result; - } - - internal static void LessThanOrEqual(Tensor left, Tensor right, Tensor result) - { - ValidateBinaryArgs(left, right, result); - - TensorArithmetic.Instance.LessThanOrEqual(left, right, result); - } - - internal static Tensor LessThanOrEqual(Tensor left, Tensor right) - { - ValidateBinaryArgs(left, right); - - var result = left.CloneEmpty(); - - TensorArithmetic.Instance.LessThanOrEqual(left, right, result); - - return result; - } - - internal static void Modulo(Tensor left, Tensor right, Tensor result) - { - ValidateBinaryArgs(left, right, result); - - TensorArithmetic.Instance.Modulo(left, right, result); - } - - internal static Tensor Modulo(Tensor left, Tensor right) - { - ValidateBinaryArgs(left, right); - - var result = left.CloneEmpty(); - - TensorArithmetic.Instance.Modulo(left, right, result); - - return result; - } - - internal static void Modulo(Tensor tensor, T scalar, Tensor result) - { - ValidateArgs(tensor, result); - - TensorArithmetic.Instance.Modulo(tensor, scalar, result); - } - - internal static Tensor Modulo(Tensor tensor, T scalar) - { - ValidateArgs(tensor); - - var result = tensor.CloneEmpty(); - - TensorArithmetic.Instance.Modulo(tensor, scalar, result); - - return result; - } - - internal static void Multiply(Tensor left, Tensor right, Tensor result) - { - ValidateBinaryArgs(left, right, result); - - TensorArithmetic.Instance.Multiply(left, right, result); - } - - internal static Tensor Multiply(Tensor left, Tensor right) - { - ValidateBinaryArgs(left, right); - - var result = left.CloneEmpty(); - - TensorArithmetic.Instance.Multiply(left, right, result); - - return result; - } - - internal static void Multiply(Tensor tensor, T scalar, Tensor result) - { - ValidateArgs(tensor, result); - - TensorArithmetic.Instance.Multiply(tensor, scalar, result); - } - - internal static Tensor Multiply(Tensor tensor, T scalar) - { - ValidateArgs(tensor); - - var result = tensor.CloneEmpty(); - - TensorArithmetic.Instance.Multiply(tensor, scalar, result); - - return result; - } - - internal static void NotEquals(Tensor left, Tensor right, Tensor result) - { - ValidateBinaryArgs(left, right, result); - - TensorArithmetic.Instance.NotEquals(left, right, result); - } - - internal static Tensor NotEquals(Tensor left, Tensor right) - { - ValidateBinaryArgs(left, right); - - var result = left.CloneEmpty(); - - TensorArithmetic.Instance.NotEquals(left, right, result); - - return result; - } - - internal static void Or(Tensor left, Tensor right, Tensor result) - { - ValidateBinaryArgs(left, right, result); - - TensorArithmetic.Instance.Or(left, right, result); - } - - internal static Tensor Or(Tensor left, Tensor right) - { - ValidateBinaryArgs(left, right); - - var result = left.CloneEmpty(); - - TensorArithmetic.Instance.Or(left, right, result); - - return result; - } - - internal static void Or(Tensor tensor, T scalar, Tensor result) - { - ValidateArgs(tensor, result); - - TensorArithmetic.Instance.Or(tensor, scalar, result); - } - - internal static Tensor Or(Tensor tensor, T scalar) - { - ValidateArgs(tensor); - - var result = tensor.CloneEmpty(); - - TensorArithmetic.Instance.Or(tensor, scalar, result); - - return result; - } - - internal static void RightShift(Tensor tensor, int value, Tensor result) - { - ValidateArgs(tensor, result); - - TensorArithmetic.Instance.RightShift(tensor, value, result); - } - - internal static Tensor RightShift(Tensor tensor, int value) - { - ValidateArgs(tensor); - - var result = tensor.CloneEmpty(); - - TensorArithmetic.Instance.RightShift(tensor, value, result); - - return result; - } - - internal static void Subtract(Tensor left, Tensor right, Tensor result) - { - ValidateBinaryArgs(left, right, result); - - TensorArithmetic.Instance.Subtract(left, right, result); - } - - internal static Tensor Subtract(Tensor left, Tensor right) - { - ValidateBinaryArgs(left, right); - - var result = left.CloneEmpty(); - - TensorArithmetic.Instance.Subtract(left, right, result); - - return result; - } - - internal static void Subtract(Tensor tensor, T scalar, Tensor result) - { - ValidateArgs(tensor, result); - - TensorArithmetic.Instance.Subtract(tensor, scalar, result); - } - - internal static Tensor Subtract(Tensor tensor, T scalar) - { - ValidateArgs(tensor); - - var result = tensor.CloneEmpty(); - - TensorArithmetic.Instance.Subtract(tensor, scalar, result); - - return result; - } - - internal static void UnaryMinus(Tensor tensor, Tensor result) - { - ValidateArgs(tensor, result); - - TensorArithmetic.Instance.UnaryMinus(tensor, result); - } - - internal static Tensor UnaryMinus(Tensor tensor) - { - ValidateArgs(tensor); - - var result = tensor.CloneEmpty(); - - TensorArithmetic.Instance.UnaryMinus(tensor, result); - - return result; - } - - internal static void UnaryPlus(Tensor tensor, Tensor result) - { - ValidateArgs(tensor, result); - - TensorArithmetic.Instance.UnaryPlus(tensor, result); - } - - internal static Tensor UnaryPlus(Tensor tensor) - { - ValidateArgs(tensor); - - var result = tensor.CloneEmpty(); - - TensorArithmetic.Instance.UnaryPlus(tensor, result); - - return result; - } - - internal static void Xor(Tensor left, Tensor right, Tensor result) - { - ValidateBinaryArgs(left, right, result); - - TensorArithmetic.Instance.Xor(left, right, result); - } - - internal static Tensor Xor(Tensor left, Tensor right) - { - ValidateBinaryArgs(left, right); - - var result = left.CloneEmpty(); - - TensorArithmetic.Instance.Xor(left, right, result); - - return result; - } - - internal static void Xor(Tensor tensor, T scalar, Tensor result) - { - ValidateArgs(tensor, result); - - TensorArithmetic.Instance.Xor(tensor, scalar, result); - } - - internal static Tensor Xor(Tensor tensor, T scalar) - { - ValidateArgs(tensor); - - var result = tensor.CloneEmpty(); - - TensorArithmetic.Instance.Xor(tensor, scalar, result); - - return result; - } - - } -} diff --git a/src/libraries/System.Numerics.Tensors/tests/TensorOperations.tt b/src/libraries/System.Numerics.Tensors/tests/TensorOperations.tt deleted file mode 100644 index 6b96c0bb554a5a..00000000000000 --- a/src/libraries/System.Numerics.Tensors/tests/TensorOperations.tt +++ /dev/null @@ -1,239 +0,0 @@ -<#@ template debug="false" hostspecific="false" language="C#" #> -<#@ assembly name="System.Core" #> -<#@ output extension=".cs" #> -<#@ include file="TensorTemplate.ttinclude" #>// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace System.Numerics.Tensors -{ - public static partial class TensorOperations - { - internal static void ValidateBinaryArgs(Tensor left, Tensor right) - { - if (left.Rank != right.Rank || left.Length != right.Length) - { - throw new ArgumentException("Operands must have matching dimensions", nameof(right)); - } - - if (left.Rank == 0) - { - throw new ArgumentException($"Cannot operate on Tensor with {nameof(Tensor.Rank)} of 0.", nameof(left)); - } - - for (int i = 0; i < left.Rank; i++) - { - if (left.dimensions[i] != right.dimensions[i]) - { - throw new ArgumentException("Operands must have matching dimensions", nameof(right)); - } - } - } - - internal static void ValidateBinaryArgs(Tensor left, Tensor right, Tensor result) - { - if (left.Rank != right.Rank || left.Length != right.Length) - { - throw new ArgumentException("Operands must have matching dimensions", nameof(right)); - } - - if (left.Rank != result.Rank || left.Length != result.Length) - { - throw new ArgumentException("Operands must have matching dimensions", nameof(result)); - } - - if (left.Rank == 0) - { - throw new ArgumentException($"Cannot operate on Tensor with {nameof(Tensor.Rank)} of 0.", nameof(left)); - } - - for (int i = 0; i < result.Rank; i++) - { - if (left.dimensions[i] != right.dimensions[i]) - { - throw new ArgumentException("Operands must have matching dimensions", nameof(right)); - } - - if (left.dimensions[i] != result.dimensions[i]) - { - throw new ArgumentException("Operands and result must have matching dimensions", nameof(result)); - } - } - } - - internal static void ValidateBinaryArgs(Tensor left, Tensor right, Tensor result) - { - if (left.Rank != right.Rank || left.Length != right.Length) - { - throw new ArgumentException("Operands must have matching dimensions", nameof(right)); - } - - if (left.Rank != result.Rank || left.Length != result.Length) - { - throw new ArgumentException("Operands must have matching dimensions", nameof(result)); - } - - if (left.Rank == 0) - { - throw new ArgumentException($"Cannot operate on Tensor with {nameof(Tensor.Rank)} of 0.", nameof(left)); - } - - for (int i = 0; i < result.Rank; i++) - { - if (left.dimensions[i] != right.dimensions[i]) - { - throw new ArgumentException("Operands must have matching dimensions", nameof(right)); - } - - if (left.dimensions[i] != result.dimensions[i]) - { - throw new ArgumentException("Operands and result must have matching dimensions", nameof(result)); - } - } - } - - internal static void ValidateArgs(Tensor tensor) - { - if (tensor.Rank == 0) - { - throw new ArgumentException($"Cannot operate on Tensor with {nameof(Tensor.Rank)} of 0.", nameof(tensor)); - } - } - - internal static void ValidateArgs(Tensor tensor, Tensor result) - { - if (tensor.Rank != result.Rank || tensor.Length != result.Length) - { - throw new ArgumentException("Operands and result must have matching dimensions", nameof(result)); - } - - if (tensor.Rank == 0) - { - throw new ArgumentException($"Cannot operate on Tensor with {nameof(Tensor.Rank)} of 0.", nameof(tensor)); - } - - for (int i = 0; i < result.Rank; i++) - { - if (tensor.dimensions[i] != result.dimensions[i]) - { - throw new ArgumentException("Operands and result must have matching dimensions", nameof(result)); - } - } - } - - internal static int[] ValidateContractArgs(Tensor left, Tensor right, int[] leftAxes, int[] rightAxes) - { - if (leftAxes == null) - { - throw new ArgumentNullException(nameof(left)); - } - - if (rightAxes == null) - { - throw new ArgumentNullException(nameof(left)); - } - - if (leftAxes.Length != rightAxes.Length) - { - throw new ArgumentException($"{nameof(leftAxes)} and {nameof(rightAxes)} must have the same length, but were {leftAxes.Length} and {rightAxes.Length}, respectively."); - } - - for (int i = 0; i < leftAxes.Length; i++) - { - var leftAxis = leftAxes[i]; - - if (leftAxis >= left.Rank) - { - throw new ArgumentOutOfRangeException($"{nameof(leftAxes)}[{i}] was set to axis index {leftAxis} which exceeds the Rank of {left}."); - } - - var leftDimension = left.dimensions[leftAxis]; - - var rightAxis = rightAxes[i]; - - if (rightAxis >= right.Rank) - { - throw new ArgumentOutOfRangeException($"{nameof(rightAxes)}[{i}] was set to axis index {rightAxis} which exceeds the Rank of {right}."); - } - - var rightDimension = right.dimensions[rightAxis]; - - if (leftDimension != rightDimension) - { - throw new ArgumentOutOfRangeException($"Tensors may only be contracted on axes of the same length, but {nameof(leftAxes)} index {i} was length {leftDimension} and {nameof(rightAxes)} index {i} was length {rightDimension}."); - } - } - - var leftNonSummingDimensions = left.Rank - leftAxes.Length; - var rightNonSummingDimensions = right.Rank - rightAxes.Length; - var resultDimensions = new int[leftNonSummingDimensions + rightNonSummingDimensions]; - int dimensionsIndex = 0; - - Action, int[]> fillDimensions = (tensor, axes) => - { - for (int i = 0; i < tensor.Rank; i++) - { - var skip = false; - foreach (var contractionIndex in axes) - { - if (contractionIndex == i) - { - skip = true; - break; - } - } - - if (!skip) - { - resultDimensions[dimensionsIndex++] = tensor.dimensions[i]; - } - } - }; - - fillDimensions(left, leftAxes); - fillDimensions(right, rightAxes); - - return resultDimensions; - } - - internal static int[] ValidateContractArgs(Tensor left, Tensor right, int[] leftAxes, int[] rightAxes, Tensor result) - { - var expectedDimensions = ValidateContractArgs(left, right, leftAxes, rightAxes); - - if (result.Rank != expectedDimensions.Length) - { - throw new ArgumentException($"{nameof(result)} should have {expectedDimensions.Length} dimensions but had {result.Rank}."); - } - - for (int i = 0; i < expectedDimensions.Length; i++) - { - if (result.dimensions[i] != expectedDimensions[i]) - { - throw new ArgumentException($"{nameof(result)} dimension {i} should be {expectedDimensions[i]} but was {result.dimensions[i]}."); - } - } - - return expectedDimensions; - } - -<# foreach (MethodConfiguration method in methodConfiguration) { #> - internal static <#= method.GetGenericResultMethodSignature("Tensor", "T")#> - { - <#= method.GetValidationMethod(true) #> - - TensorArithmetic.Instance.<#=method.MethodName#>(<#=method.GetCallArguments()#>, <#= method.ResultName #>); - } - - internal static <#= method.GetGenericMethodSignature("Tensor", "T")#> - { - <#= method.GetValidationMethod(false) #> - - var <#= method.ResultName #> = <#=method.InitializeResult("T")#>; - - TensorArithmetic.Instance.<#=method.MethodName#>(<#=method.GetCallArguments()#>, <#= method.ResultName #>); - - return <#= method.ResultName #>; - } - -<# } #> - } -} diff --git a/src/libraries/System.Numerics.Tensors/tests/TensorPrimitivesTests.cs b/src/libraries/System.Numerics.Tensors/tests/TensorPrimitivesTests.cs new file mode 100644 index 00000000000000..288cd3edb8d5e6 --- /dev/null +++ b/src/libraries/System.Numerics.Tensors/tests/TensorPrimitivesTests.cs @@ -0,0 +1,1693 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Buffers; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices; +using Xunit; + +#pragma warning disable xUnit1025 // reporting duplicate test cases due to not distinguishing 0.0 from -0.0 + +namespace System.Numerics.Tensors.Tests +{ + public static partial class TensorPrimitivesTests + { + private const double Tolerance = 0.0001; + + public static IEnumerable TensorLengthsIncluding0 => + TensorLengths.Concat(new object[][] { [0] }); + + public static IEnumerable TensorLengths => + from length in Enumerable.Range(1, 128) + select new object[] { length }; + + private static readonly Random s_random = new Random(20230828); + + private static BoundedMemory CreateTensor(int size) => BoundedMemory.Allocate(size); + + private static BoundedMemory CreateAndFillTensor(int size) + { + BoundedMemory tensor = CreateTensor(size); + FillTensor(tensor.Span); + return tensor; + } + + private static void FillTensor(Span tensor) + { + for (int i = 0; i < tensor.Length; i++) + { + tensor[i] = NextSingle(); + } + } + + private static float NextSingle() + { + // For testing purposes, get a mix of negative and positive values. + return (float)((s_random.NextDouble() * 2) - 1); + } + + [Theory] + [MemberData(nameof(TensorLengthsIncluding0))] + public static void AddTwoTensors(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength); + + TensorPrimitives.Add(x, y, destination); + + for (int i = 0; i < tensorLength; i++) + { + Assert.Equal(x[i] + y[i], destination[i], Tolerance); + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void AddTwoTensors_ThrowsForMismatchedLengths(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength - 1); + using BoundedMemory destination = CreateTensor(tensorLength); + + Assert.Throws(() => TensorPrimitives.Add(x, y, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void AddTwoTensors_ThrowsForTooShortDestination(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength - 1); + + AssertExtensions.Throws("destination", () => TensorPrimitives.Add(x, y, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengthsIncluding0))] + public static void AddTensorAndScalar(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + float y = NextSingle(); + using BoundedMemory destination = CreateTensor(tensorLength); + + TensorPrimitives.Add(x, y, destination); + + for (int i = 0; i < tensorLength; i++) + { + Assert.Equal(x[i] + y, destination[i], Tolerance); + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void AddTensorAndScalar_ThrowsForTooShortDestination(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + float y = NextSingle(); + using BoundedMemory destination = CreateTensor(tensorLength - 1); + + AssertExtensions.Throws("destination", () => TensorPrimitives.Add(x, y, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengthsIncluding0))] + public static void SubtractTwoTensors(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength); + + TensorPrimitives.Subtract(x, y, destination); + + for (int i = 0; i < tensorLength; i++) + { + Assert.Equal(x[i] - y[i], destination[i], Tolerance); + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void SubtractTwoTensors_ThrowsForMismatchedLengths(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength - 1); + using BoundedMemory destination = CreateTensor(tensorLength); + + Assert.Throws(() => TensorPrimitives.Subtract(x, y, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void SubtractTwoTensors_ThrowsForTooShortDestination(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength - 1); + + AssertExtensions.Throws("destination", () => TensorPrimitives.Subtract(x, y, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengthsIncluding0))] + public static void SubtractTensorAndScalar(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + float y = NextSingle(); + using BoundedMemory destination = CreateTensor(tensorLength); + + TensorPrimitives.Subtract(x, y, destination); + + for (int i = 0; i < tensorLength; i++) + { + Assert.Equal(x[i] - y, destination[i], Tolerance); + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void SubtractTensorAndScalar_ThrowsForTooShortDestination(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + float y = NextSingle(); + using BoundedMemory destination = CreateTensor(tensorLength - 1); + + AssertExtensions.Throws("destination", () => TensorPrimitives.Subtract(x, y, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengthsIncluding0))] + public static void MultiplyTwoTensors(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength); + + TensorPrimitives.Multiply(x, y, destination); + + for (int i = 0; i < tensorLength; i++) + { + Assert.Equal(x[i] * y[i], destination[i], Tolerance); + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void MultiplyTwoTensors_ThrowsForMismatchedLengths(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength - 1); + using BoundedMemory destination = CreateTensor(tensorLength); + + Assert.Throws(() => TensorPrimitives.Multiply(x, y, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void MultiplyTwoTensors_ThrowsForTooShortDestination(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength - 1); + + AssertExtensions.Throws("destination", () => TensorPrimitives.Multiply(x, y, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengthsIncluding0))] + public static void MultiplyTensorAndScalar(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + float y = NextSingle(); + using BoundedMemory destination = CreateTensor(tensorLength); + + TensorPrimitives.Multiply(x, y, destination); + + for (int i = 0; i < tensorLength; i++) + { + Assert.Equal(x[i] * y, destination[i], Tolerance); + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void MultiplyTensorAndScalar_ThrowsForTooShortDestination(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + float y = NextSingle(); + using BoundedMemory destination = CreateTensor(tensorLength - 1); + + AssertExtensions.Throws("destination", () => TensorPrimitives.Multiply(x, y, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengthsIncluding0))] + public static void DivideTwoTensors(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength); + + TensorPrimitives.Divide(x, y, destination); + + for (int i = 0; i < tensorLength; i++) + { + Assert.Equal(x[i] / y[i], destination[i], Tolerance); + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void DivideTwoTensors_ThrowsForMismatchedLengths(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength - 1); + using BoundedMemory destination = CreateTensor(tensorLength); + + Assert.Throws(() => TensorPrimitives.Divide(x, y, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void DivideTwoTensors_ThrowsForTooShortDestination(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength - 1); + + AssertExtensions.Throws("destination", () => TensorPrimitives.Divide(x, y, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengthsIncluding0))] + public static void DivideTensorAndScalar(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + float y = NextSingle(); + using BoundedMemory destination = CreateTensor(tensorLength); + + TensorPrimitives.Divide(x, y, destination); + + for (int i = 0; i < tensorLength; i++) + { + Assert.Equal(x[i] / y, destination[i], Tolerance); + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void DivideTensorAndScalar_ThrowsForTooShortDestination(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + float y = NextSingle(); + using BoundedMemory destination = CreateTensor(tensorLength - 1); + + AssertExtensions.Throws("destination", () => TensorPrimitives.Divide(x, y, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengthsIncluding0))] + public static void NegateTensor(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength); + + TensorPrimitives.Negate(x, destination); + + for (int i = 0; i < tensorLength; i++) + { + Assert.Equal(-x[i], destination[i], Tolerance); + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void NegateTensor_ThrowsForTooShortDestination(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength - 1); + + AssertExtensions.Throws("destination", () => TensorPrimitives.Negate(x, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengthsIncluding0))] + public static void AddTwoTensorsAndMultiplyWithThirdTensor(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + using BoundedMemory multiplier = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength); + + TensorPrimitives.AddMultiply(x, y, multiplier, destination); + + for (int i = 0; i < tensorLength; i++) + { + Assert.Equal((x[i] + y[i]) * multiplier[i], destination[i], Tolerance); + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void AddTwoTensorsAndMultiplyWithThirdTensor_ThrowsForMismatchedLengths_x_y(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength - 1); + using BoundedMemory multiplier = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength); + + Assert.Throws(() => TensorPrimitives.AddMultiply(x, y, multiplier, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void AddTwoTensorsAndMultiplyWithThirdTensor_ThrowsForMismatchedLengths_x_multiplier(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + using BoundedMemory multiplier = CreateAndFillTensor(tensorLength - 1); + using BoundedMemory destination = CreateTensor(tensorLength); + + Assert.Throws(() => TensorPrimitives.AddMultiply(x, y, multiplier, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void AddTwoTensorsAndMultiplyWithThirdTensor_ThrowsForTooShortDestination(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + using BoundedMemory multiplier = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength - 1); + + AssertExtensions.Throws("destination", () => TensorPrimitives.AddMultiply(x, y, multiplier, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengthsIncluding0))] + public static void AddTwoTensorsAndMultiplyWithScalar(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + float multiplier = NextSingle(); + using BoundedMemory destination = CreateTensor(tensorLength); + + TensorPrimitives.AddMultiply(x, y, multiplier, destination); + + for (int i = 0; i < tensorLength; i++) + { + Assert.Equal((x[i] + y[i]) * multiplier, destination[i], Tolerance); + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void AddTwoTensorsAndMultiplyWithScalar_ThrowsForMismatchedLengths_x_y(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength - 1); + float multiplier = NextSingle(); + using BoundedMemory destination = CreateTensor(tensorLength); + + Assert.Throws(() => TensorPrimitives.AddMultiply(x, y, multiplier, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void AddTwoTensorsAndMultiplyWithScalar_ThrowsForTooShortDestination(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + float multiplier = NextSingle(); + using BoundedMemory destination = CreateTensor(tensorLength - 1); + + AssertExtensions.Throws("destination", () => TensorPrimitives.AddMultiply(x, y, multiplier, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengthsIncluding0))] + public static void AddTensorAndScalarAndMultiplyWithTensor(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + float y = NextSingle(); + using BoundedMemory multiplier = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength); + + TensorPrimitives.AddMultiply(x, y, multiplier, destination); + + for (int i = 0; i < tensorLength; i++) + { + Assert.Equal((x[i] + y) * multiplier[i], destination[i], Tolerance); + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void AddTensorAndScalarAndMultiplyWithTensor_ThrowsForMismatchedLengths_x_z(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + float y = NextSingle(); + using BoundedMemory multiplier = CreateAndFillTensor(tensorLength - 1); + using BoundedMemory destination = CreateTensor(tensorLength); + + Assert.Throws(() => TensorPrimitives.AddMultiply(x, y, multiplier, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void AddTensorAndScalarAndMultiplyWithTensor_ThrowsForTooShortDestination(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + float y = NextSingle(); + using BoundedMemory multiplier = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength - 1); + + AssertExtensions.Throws("destination", () => TensorPrimitives.AddMultiply(x, y, multiplier, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengthsIncluding0))] + public static void MultiplyTwoTensorsAndAddWithThirdTensor(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + using BoundedMemory addend = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength); + + TensorPrimitives.MultiplyAdd(x, y, addend, destination); + + for (int i = 0; i < tensorLength; i++) + { + Assert.Equal((x[i] * y[i]) + addend[i], destination[i], Tolerance); + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void MultiplyTwoTensorsAndAddWithThirdTensor_ThrowsForMismatchedLengths_x_y(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength - 1); + using BoundedMemory addend = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength); + + Assert.Throws(() => TensorPrimitives.MultiplyAdd(x, y, addend, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void MultiplyTwoTensorsAndAddWithThirdTensor_ThrowsForMismatchedLengths_x_multiplier(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + using BoundedMemory addend = CreateAndFillTensor(tensorLength - 1); + using BoundedMemory destination = CreateTensor(tensorLength); + + Assert.Throws(() => TensorPrimitives.MultiplyAdd(x, y, addend, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void MultiplyTwoTensorsAndAddWithThirdTensor_ThrowsForTooShortDestination(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + using BoundedMemory addend = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength - 1); + + AssertExtensions.Throws("destination", () => TensorPrimitives.MultiplyAdd(x, y, addend, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengthsIncluding0))] + public static void MultiplyTwoTensorsAndAddWithScalar(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + float addend = NextSingle(); + using BoundedMemory destination = CreateTensor(tensorLength); + + TensorPrimitives.MultiplyAdd(x, y, addend, destination); + + for (int i = 0; i < tensorLength; i++) + { + Assert.Equal((x[i] * y[i]) + addend, destination[i], Tolerance); + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void MultiplyTwoTensorsAndAddWithScalar_ThrowsForTooShortDestination(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + float addend = NextSingle(); + using BoundedMemory destination = CreateTensor(tensorLength - 1); + + AssertExtensions.Throws("destination", () => TensorPrimitives.MultiplyAdd(x, y, addend, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengthsIncluding0))] + public static void MultiplyTensorAndScalarAndAddWithTensor(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + float y = NextSingle(); + using BoundedMemory addend = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength); + + TensorPrimitives.MultiplyAdd(x, y, addend, destination); + + for (int i = 0; i < tensorLength; i++) + { + Assert.Equal((x[i] * y) + addend[i], destination[i], Tolerance); + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void MultiplyTensorAndScalarAndAddWithTensor_ThrowsForTooShortDestination(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + float y = NextSingle(); + using BoundedMemory addend = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength - 1); + + AssertExtensions.Throws("destination", () => TensorPrimitives.MultiplyAdd(x, y, addend, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengthsIncluding0))] + public static void ExpTensor(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength); + + TensorPrimitives.Exp(x, destination); + + for (int i = 0; i < tensorLength; i++) + { + Assert.Equal(MathF.Exp(x[i]), destination[i], Tolerance); + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void ExpTensor_ThrowsForTooShortDestination(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength - 1); + + AssertExtensions.Throws("destination", () => TensorPrimitives.Exp(x, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengthsIncluding0))] + public static void LogTensor(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength); + + TensorPrimitives.Log(x, destination); + + for (int i = 0; i < tensorLength; i++) + { + Assert.Equal(MathF.Log(x[i]), destination[i], Tolerance); + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void LogTensor_ThrowsForTooShortDestination(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength - 1); + + AssertExtensions.Throws("destination", () => TensorPrimitives.Log(x, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengthsIncluding0))] + public static void Log2(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength); + + TensorPrimitives.Log2(x, destination); + + for (int i = 0; i < tensorLength; i++) + { + Assert.Equal(MathF.Log(x[i], 2), destination[i], Tolerance); + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void Log2_ThrowsForTooShortDestination(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength - 1); + + AssertExtensions.Throws("destination", () => TensorPrimitives.Log2(x, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengthsIncluding0))] + public static void CoshTensor(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength); + + TensorPrimitives.Cosh(x, destination); + + for (int i = 0; i < tensorLength; i++) + { + Assert.Equal(MathF.Cosh(x[i]), destination[i], Tolerance); + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void CoshTensor_ThrowsForTooShortDestination(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength - 1); + + AssertExtensions.Throws("destination", () => TensorPrimitives.Cosh(x, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengthsIncluding0))] + public static void SinhTensor(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength); + + TensorPrimitives.Sinh(x, destination); + + for (int i = 0; i < tensorLength; i++) + { + Assert.Equal(MathF.Sinh(x[i]), destination[i], Tolerance); + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void SinhTensor_ThrowsForTooShortDestination(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength - 1); + + AssertExtensions.Throws("destination", () => TensorPrimitives.Sinh(x, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengthsIncluding0))] + public static void TanhTensor(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength); + + TensorPrimitives.Tanh(x, destination); + + for (int i = 0; i < tensorLength; i++) + { + Assert.Equal(MathF.Tanh(x[i]), destination[i], Tolerance); + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void TanhTensor_ThrowsForTooShortDestination(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength - 1); + + AssertExtensions.Throws("destination", () => TensorPrimitives.Tanh(x, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void CosineSimilarity_ThrowsForMismatchedLengths_x_y(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength - 1); + + Assert.Throws(() => TensorPrimitives.CosineSimilarity(x, y)); + } + + [Fact] + public static void CosineSimilarity_ThrowsForEmpty_x_y() + { + Assert.Throws(() => TensorPrimitives.CosineSimilarity(ReadOnlySpan.Empty, ReadOnlySpan.Empty)); + Assert.Throws(() => TensorPrimitives.CosineSimilarity(ReadOnlySpan.Empty, CreateTensor(1))); + Assert.Throws(() => TensorPrimitives.CosineSimilarity(CreateTensor(1), ReadOnlySpan.Empty)); + } + + [Theory] + [InlineData(new float[] { 3, 2, 0, 5 }, new float[] { 1, 0, 0, 0 }, 0.48666f)] + [InlineData(new float[] { 1, 1, 1, 1, 1, 0 }, new float[] { 1, 1, 1, 1, 0, 1 }, 0.80f)] + public static void CosineSimilarity_KnownValues(float[] x, float[] y, float expectedResult) + { + Assert.Equal(expectedResult, TensorPrimitives.CosineSimilarity(x, y), Tolerance); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void CosineSimilarity(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + + float dot = 0f, squareX = 0f, squareY = 0f; + for (int i = 0; i < x.Length; i++) + { + dot += x[i] * y[i]; + squareX += x[i] * x[i]; + squareY += y[i] * y[i]; + } + + Assert.Equal(dot / (Math.Sqrt(squareX) * Math.Sqrt(squareY)), TensorPrimitives.CosineSimilarity(x, y), Tolerance); + } + + [Fact] + public static void Distance_ThrowsForEmpty_x_y() + { + Assert.Throws(() => TensorPrimitives.Distance(ReadOnlySpan.Empty, ReadOnlySpan.Empty)); + Assert.Throws(() => TensorPrimitives.Distance(ReadOnlySpan.Empty, CreateTensor(1))); + Assert.Throws(() => TensorPrimitives.Distance(CreateTensor(1), ReadOnlySpan.Empty)); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void Distance_ThrowsForMismatchedLengths_x_y(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength - 1); + + Assert.Throws(() => TensorPrimitives.Distance(x, y)); + } + + [Theory] + [InlineData(new float[] { 3, 2 }, new float[] { 4, 1 }, 1.4142f)] + [InlineData(new float[] { 0, 4 }, new float[] { 6, 2 }, 6.3245f)] + [InlineData(new float[] { 1, 2, 3 }, new float[] { 4, 5, 6 }, 5.1961f)] + [InlineData(new float[] { 5, 1, 6, 10 }, new float[] { 7, 2, 8, 4 }, 6.7082f)] + public static void Distance_KnownValues(float[] x, float[] y, float expectedResult) + { + Assert.Equal(expectedResult, TensorPrimitives.Distance(x, y), Tolerance); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void Distance(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + + float distance = 0f; + for (int i = 0; i < x.Length; i++) + { + distance += (x[i] - y[i]) * (x[i] - y[i]); + } + + Assert.Equal(Math.Sqrt(distance), TensorPrimitives.Distance(x, y), Tolerance); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void Dot_ThrowsForMismatchedLengths_x_y(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength - 1); + + Assert.Throws(() => TensorPrimitives.Dot(x, y)); + } + + [Theory] + [InlineData(new float[] { 1, 3, -5 }, new float[] { 4, -2, -1 }, 3)] + [InlineData(new float[] { 1, 2, 3 }, new float[] { 4, 5, 6 }, 32)] + [InlineData(new float[] { 1, 2, 3, 10, 8 }, new float[] { 4, 5, 6, -2, 7 }, 68)] + [InlineData(new float[] { }, new float[] { }, 0)] + public static void Dot_KnownValues(float[] x, float[] y, float expectedResult) + { + Assert.Equal(expectedResult, TensorPrimitives.Dot(x, y), Tolerance); + } + + [Theory] + [MemberData(nameof(TensorLengthsIncluding0))] + public static void Dot(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + + float dot = 0f; + for (int i = 0; i < x.Length; i++) + { + dot += x[i] * y[i]; + } + + Assert.Equal(dot, TensorPrimitives.Dot(x, y), Tolerance); + } + + [Theory] + [InlineData(new float[] { 1, 2, 3 }, 3.7416575f)] + [InlineData(new float[] { 3, 4 }, 5)] + [InlineData(new float[] { 3 }, 3)] + [InlineData(new float[] { 3, 4, 1, 2 }, 5.477226)] + [InlineData(new float[] { }, 0f)] + public static void Norm_KnownValues(float[] x, float expectedResult) + { + Assert.Equal(expectedResult, TensorPrimitives.Norm(x), Tolerance); + } + + [Theory] + [MemberData(nameof(TensorLengthsIncluding0))] + public static void Norm(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + + float sumOfSquares = 0f; + for (int i = 0; i < x.Length; i++) + { + sumOfSquares += x[i] * x[i]; + } + + Assert.Equal(Math.Sqrt(sumOfSquares), TensorPrimitives.Norm(x), Tolerance); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void SoftMax_ThrowsForTooShortDestination(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength - 1); + + AssertExtensions.Throws("destination", () => TensorPrimitives.SoftMax(x, destination)); + } + + [Theory] + [InlineData(new float[] { 3, 1, .2f }, new float[] { 0.8360188f, 0.11314284f, 0.05083836f })] + [InlineData(new float[] { 3, 4, 1 }, new float[] { 0.2594f, 0.705384f, 0.0351f })] + [InlineData(new float[] { 5, 3 }, new float[] { 0.8807f, 0.1192f })] + [InlineData(new float[] { 4, 2, 1, 9 }, new float[] { 0.0066f, 9.04658e-4f, 3.32805e-4f, 0.9920f})] + public static void SoftMax(float[] x, float[] expectedResult) + { + using BoundedMemory dest = CreateTensor(x.Length); + TensorPrimitives.SoftMax(x, dest); + + for (int i = 0; i < x.Length; i++) + { + Assert.Equal(expectedResult[i], dest[i], Tolerance); + } + } + + [Fact] + public static void SoftMax_DestinationLongerThanSource() + { + float[] x = [3, 1, .2f]; + float[] expectedResult = [0.8360188f, 0.11314284f, 0.05083836f]; + using BoundedMemory dest = CreateTensor(x.Length + 1); + TensorPrimitives.SoftMax(x, dest); + + for (int i = 0; i < x.Length; i++) + { + Assert.Equal(expectedResult[i], dest[i], Tolerance); + } + } + + [Fact] + public static void SoftMax_ThrowsForEmptyInput() + { + AssertExtensions.Throws(() => TensorPrimitives.SoftMax(ReadOnlySpan.Empty, CreateTensor(1))); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void Sigmoid_ThrowsForTooShortDestination(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength - 1); + + AssertExtensions.Throws("destination", () => TensorPrimitives.Sigmoid(x, destination)); + } + + [Theory] + [InlineData(new float[] { -5, -4.5f, -4 }, new float[] { 0.0066f, 0.0109f, 0.0179f })] + [InlineData(new float[] { 4.5f, 5 }, new float[] { 0.9890f, 0.9933f })] + [InlineData(new float[] { 0, -3, 3, .5f }, new float[] { 0.5f, 0.0474f, 0.9525f, 0.6224f })] + public static void Sigmoid(float[] x, float[] expectedResult) + { + using BoundedMemory dest = CreateTensor(x.Length); + TensorPrimitives.Sigmoid(x, dest); + + for (int i = 0; i < x.Length; i++) + { + Assert.Equal(expectedResult[i], dest[i], Tolerance); + } + } + + [Fact] + public static void Sigmoid_DestinationLongerThanSource() + { + float[] x = [-5, -4.5f, -4]; + float[] expectedResult = [0.0066f, 0.0109f, 0.0179f]; + using BoundedMemory dest = CreateTensor(x.Length + 1); + + TensorPrimitives.Sigmoid(x, dest); + + float originalLast = dest[dest.Length - 1]; + for (int i = 0; i < x.Length; i++) + { + Assert.Equal(expectedResult[i], dest[i], Tolerance); + } + Assert.Equal(originalLast, dest[dest.Length - 1]); + } + + [Fact] + public static void Sigmoid_ThrowsForEmptyInput() + { + AssertExtensions.Throws(() => TensorPrimitives.Sigmoid(ReadOnlySpan.Empty, CreateTensor(1))); + } + + [Fact] + public static void IndexOfMax_ReturnsNegative1OnEmpty() + { + Assert.Equal(-1, TensorPrimitives.IndexOfMax(ReadOnlySpan.Empty)); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void IndexOfMax(int tensorLength) + { + foreach (int expected in new[] { 0, tensorLength / 2, tensorLength - 1 }) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + x[expected] = Enumerable.Max(MemoryMarshal.ToEnumerable(x.Memory)) + 1; + Assert.Equal(expected, TensorPrimitives.IndexOfMax(x)); + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void IndexOfMax_FirstNaNReturned(int tensorLength) + { + foreach (int expected in new[] { 0, tensorLength / 2, tensorLength - 1 }) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + x[expected] = float.NaN; + x[tensorLength - 1] = float.NaN; + Assert.Equal(expected, TensorPrimitives.IndexOfMax(x)); + } + } + + [Fact] + public static void IndexOfMax_Negative0LesserThanPositive0() + { + Assert.Equal(1, TensorPrimitives.IndexOfMax([-0f, +0f])); + Assert.Equal(0, TensorPrimitives.IndexOfMax([-0f, -0f, -0f, -0f])); + Assert.Equal(4, TensorPrimitives.IndexOfMax([-0f, -0f, -0f, -0f, +0f, +0f, +0f])); + Assert.Equal(0, TensorPrimitives.IndexOfMax([+0f, -0f])); + Assert.Equal(1, TensorPrimitives.IndexOfMax([-1, -0f])); + Assert.Equal(2, TensorPrimitives.IndexOfMax([-1, -0f, 1])); + } + + [Fact] + public static void IndexOfMin_ReturnsNegative1OnEmpty() + { + Assert.Equal(-1, TensorPrimitives.IndexOfMin(ReadOnlySpan.Empty)); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void IndexOfMin(int tensorLength) + { + foreach (int expected in new[] { 0, tensorLength / 2, tensorLength - 1 }) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + x[expected] = Enumerable.Min(MemoryMarshal.ToEnumerable(x.Memory)) - 1; + Assert.Equal(expected, TensorPrimitives.IndexOfMin(x)); + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void IndexOfMin_FirstNaNReturned(int tensorLength) + { + foreach (int expected in new[] { 0, tensorLength / 2, tensorLength - 1 }) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + x[expected] = float.NaN; + x[tensorLength - 1] = float.NaN; + Assert.Equal(expected, TensorPrimitives.IndexOfMin(x)); + } + } + + [Fact] + public static void IndexOfMin_Negative0LesserThanPositive0() + { + Assert.Equal(0, TensorPrimitives.IndexOfMin([-0f, +0f])); + Assert.Equal(1, TensorPrimitives.IndexOfMin([+0f, -0f])); + Assert.Equal(1, TensorPrimitives.IndexOfMin([+0f, -0f, -0f, -0f, -0f])); + Assert.Equal(0, TensorPrimitives.IndexOfMin([-1, -0f])); + Assert.Equal(0, TensorPrimitives.IndexOfMin([-1, -0f, 1])); + } + + [Fact] + public static void IndexOfMaxMagnitude_ReturnsNegative1OnEmpty() + { + Assert.Equal(-1, TensorPrimitives.IndexOfMaxMagnitude(ReadOnlySpan.Empty)); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void IndexOfMaxMagnitude(int tensorLength) + { + foreach (int expected in new[] { 0, tensorLength / 2, tensorLength - 1 }) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + x[expected] = Enumerable.Max(MemoryMarshal.ToEnumerable(x.Memory), Math.Abs) + 1; + Assert.Equal(expected, TensorPrimitives.IndexOfMaxMagnitude(x)); + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void IndexOfMaxMagnitude_FirstNaNReturned(int tensorLength) + { + foreach (int expected in new[] { 0, tensorLength / 2, tensorLength - 1 }) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + x[expected] = float.NaN; + x[tensorLength - 1] = float.NaN; + Assert.Equal(expected, TensorPrimitives.IndexOfMaxMagnitude(x)); + } + } + + [Fact] + public static void IndexOfMaxMagnitude_Negative0LesserThanPositive0() + { + Assert.Equal(0, TensorPrimitives.IndexOfMaxMagnitude([-0f, -0f, -0f, -0f])); + Assert.Equal(1, TensorPrimitives.IndexOfMaxMagnitude([-0f, +0f])); + Assert.Equal(1, TensorPrimitives.IndexOfMaxMagnitude([-0f, +0f, +0f, +0f])); + Assert.Equal(0, TensorPrimitives.IndexOfMaxMagnitude([+0f, -0f])); + Assert.Equal(0, TensorPrimitives.IndexOfMaxMagnitude([-1, -0f])); + Assert.Equal(2, TensorPrimitives.IndexOfMaxMagnitude([-1, -0f, 1])); + } + + [Fact] + public static void IndexOfMinMagnitude_ReturnsNegative1OnEmpty() + { + Assert.Equal(-1, TensorPrimitives.IndexOfMinMagnitude(ReadOnlySpan.Empty)); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void IndexOfMinMagnitude(int tensorLength) + { + foreach (int expected in new[] { 0, tensorLength / 2, tensorLength - 1 }) + { + using BoundedMemory x = CreateTensor(tensorLength); + for (int i = 0; i < x.Length; i++) + { + x[i] = i % 2 == 0 ? 42 : -42; + } + + x[expected] = -41; + + Assert.Equal(expected, TensorPrimitives.IndexOfMinMagnitude(x)); + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void IndexOfMinMagnitude_FirstNaNReturned(int tensorLength) + { + foreach (int expected in new[] { 0, tensorLength / 2, tensorLength - 1 }) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + x[expected] = float.NaN; + x[tensorLength - 1] = float.NaN; + Assert.Equal(expected, TensorPrimitives.IndexOfMinMagnitude(x)); + } + } + + [Fact] + public static void IndexOfMinMagnitude_Negative0LesserThanPositive0() + { + Assert.Equal(0, TensorPrimitives.IndexOfMinMagnitude([-0f, -0f, -0f, -0f])); + Assert.Equal(0, TensorPrimitives.IndexOfMinMagnitude([-0f, +0f])); + Assert.Equal(1, TensorPrimitives.IndexOfMinMagnitude([+0f, -0f])); + Assert.Equal(1, TensorPrimitives.IndexOfMinMagnitude([+0f, -0f, -0f, -0f])); + Assert.Equal(1, TensorPrimitives.IndexOfMinMagnitude([-1, -0f])); + Assert.Equal(1, TensorPrimitives.IndexOfMinMagnitude([-1, -0f, 1])); + } + + [Fact] + public static void Max_ThrowsForEmpty() + { + Assert.Throws(() => TensorPrimitives.Max(ReadOnlySpan.Empty)); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void Max(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + + Assert.Equal(Enumerable.Max(MemoryMarshal.ToEnumerable(x.Memory)), TensorPrimitives.Max(x)); + + float max = float.NegativeInfinity; + foreach (float f in x.Span) + { + max = Math.Max(max, f); + } + Assert.Equal(max, TensorPrimitives.Max(x)); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void Max_NanReturned(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + foreach (int expected in new[] { 0, tensorLength / 2, tensorLength - 1 }) + { + x[expected] = float.NaN; + Assert.Equal(float.NaN, TensorPrimitives.Max(x)); + } + } + + [Fact] + public static void Max_Negative0LesserThanPositive0() + { + Assert.Equal(+0f, TensorPrimitives.Max([-0f, +0f])); + Assert.Equal(+0f, TensorPrimitives.Max([+0f, -0f])); + Assert.Equal(-0f, TensorPrimitives.Max([-1, -0f])); + Assert.Equal(1, TensorPrimitives.Max([-1, -0f, 1])); + } + + [Theory] + [MemberData(nameof(TensorLengthsIncluding0))] + public static void Max_TwoTensors(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength); + + TensorPrimitives.Max(x, y, destination); + + for (int i = 0; i < tensorLength; i++) + { + Assert.Equal(MathF.Max(x[i], y[i]), destination[i], Tolerance); + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void Max_TwoTensors_ThrowsForMismatchedLengths(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength - 1); + using BoundedMemory destination = CreateTensor(tensorLength); + + Assert.Throws(() => TensorPrimitives.Max(x, y, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void Max_TwoTensors_ThrowsForTooShortDestination(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength - 1); + + AssertExtensions.Throws("destination", () => TensorPrimitives.Max(x, y, destination)); + } + + [Fact] + public static void MaxMagnitude_ThrowsForEmpty() + { + Assert.Throws(() => TensorPrimitives.MaxMagnitude(ReadOnlySpan.Empty)); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void MaxMagnitude(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + + int index = 0; + for (int i = 0; i < x.Length; i++) + { + if (MathF.Abs(x[i]) >= MathF.Abs(x[index])) + { + index = i; + } + } + + Assert.Equal(x[index], TensorPrimitives.MaxMagnitude(x), Tolerance); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void MaxMagnitude_NanReturned(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + foreach (int expected in new[] { 0, tensorLength / 2, tensorLength - 1 }) + { + x[expected] = float.NaN; + Assert.Equal(float.NaN, TensorPrimitives.MaxMagnitude(x)); + } + } + + [Fact] + public static void MaxMagnitude_Negative0LesserThanPositive0() + { + Assert.Equal(+0f, TensorPrimitives.MaxMagnitude([-0f, +0f])); + Assert.Equal(+0f, TensorPrimitives.MaxMagnitude([+0f, -0f])); + Assert.Equal(-1, TensorPrimitives.MaxMagnitude([-1, -0f])); + Assert.Equal(1, TensorPrimitives.MaxMagnitude([-1, -0f, 1])); + Assert.Equal(0f, TensorPrimitives.MaxMagnitude([-0f, -0f, -0f, -0f, -0f, 0f])); + Assert.Equal(1, TensorPrimitives.MaxMagnitude([-0f, -0f, -0f, -0f, -1, -0f, 0f, 1])); + } + + [Theory] + [MemberData(nameof(TensorLengthsIncluding0))] + public static void MaxMagnitude_TwoTensors(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength); + + TensorPrimitives.MaxMagnitude(x, y, destination); + + for (int i = 0; i < tensorLength; i++) + { + Assert.Equal(MathF.Abs(x[i]) >= MathF.Abs(y[i]) ? x[i] : y[i], destination[i], Tolerance); + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void MaxMagnitude_TwoTensors_ThrowsForMismatchedLengths(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength - 1); + using BoundedMemory destination = CreateTensor(tensorLength); + + Assert.Throws(() => TensorPrimitives.MaxMagnitude(x, y, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void MaxMagnitude_TwoTensors_ThrowsForTooShortDestination(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength - 1); + + AssertExtensions.Throws("destination", () => TensorPrimitives.MaxMagnitude(x, y, destination)); + } + + [Fact] + public static void Min_ThrowsForEmpty() + { + Assert.Throws(() => TensorPrimitives.Min(ReadOnlySpan.Empty)); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void Min(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + + Assert.Equal(Enumerable.Min(MemoryMarshal.ToEnumerable(x.Memory)), TensorPrimitives.Min(x)); + + float min = float.PositiveInfinity; + foreach (float f in x.Span) + { + min = Math.Min(min, f); + } + Assert.Equal(min, TensorPrimitives.Min(x)); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void Min_NanReturned(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + foreach (int expected in new[] { 0, tensorLength / 2, tensorLength - 1 }) + { + x[expected] = float.NaN; + Assert.Equal(float.NaN, TensorPrimitives.Min(x)); + } + } + + [Fact] + public static void Min_Negative0LesserThanPositive0() + { + Assert.Equal(-0f, TensorPrimitives.Min([-0f, +0f])); + Assert.Equal(-0f, TensorPrimitives.Min([+0f, -0f])); + Assert.Equal(-1, TensorPrimitives.Min([-1, -0f])); + Assert.Equal(-1, TensorPrimitives.Min([-1, -0f, 1])); + } + + [Theory] + [MemberData(nameof(TensorLengthsIncluding0))] + public static void Min_TwoTensors(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength); + + TensorPrimitives.Min(x, y, destination); + + for (int i = 0; i < tensorLength; i++) + { + Assert.Equal(MathF.Min(x[i], y[i]), destination[i], Tolerance); + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void Min_TwoTensors_ThrowsForMismatchedLengths(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength - 1); + using BoundedMemory destination = CreateTensor(tensorLength); + + Assert.Throws(() => TensorPrimitives.Min(x, y, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void Min_TwoTensors_ThrowsForTooShortDestination(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength - 1); + + AssertExtensions.Throws("destination", () => TensorPrimitives.Min(x, y, destination)); + } + + [Fact] + public static void MinMagnitude_ThrowsForEmpty() + { + Assert.Throws(() => TensorPrimitives.MinMagnitude(ReadOnlySpan.Empty)); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void MinMagnitude(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + + int index = 0; + for (int i = 0; i < x.Length; i++) + { + if (MathF.Abs(x[i]) < MathF.Abs(x[index])) + { + index = i; + } + } + + Assert.Equal(x[index], TensorPrimitives.MinMagnitude(x), Tolerance); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void MinMagnitude_NanReturned(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + foreach (int expected in new[] { 0, tensorLength / 2, tensorLength - 1 }) + { + x[expected] = float.NaN; + Assert.Equal(float.NaN, TensorPrimitives.MinMagnitude(x)); + } + } + + [Fact] + public static void MinMagnitude_Negative0LesserThanPositive0() + { + Assert.Equal(0, TensorPrimitives.MinMagnitude([-0f, +0f])); + Assert.Equal(0, TensorPrimitives.MinMagnitude([+0f, -0f])); + Assert.Equal(0, TensorPrimitives.MinMagnitude([-1, -0f])); + Assert.Equal(0, TensorPrimitives.MinMagnitude([-1, -0f, 1])); + } + + [Theory] + [MemberData(nameof(TensorLengthsIncluding0))] + public static void MinMagnitude_TwoTensors(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength); + + TensorPrimitives.MinMagnitude(x, y, destination); + + for (int i = 0; i < tensorLength; i++) + { + Assert.Equal(MathF.Abs(x[i]) < MathF.Abs(y[i]) ? x[i] : y[i], destination[i], Tolerance); + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void MinMagnitude_TwoTensors_ThrowsForMismatchedLengths(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength - 1); + using BoundedMemory destination = CreateTensor(tensorLength); + + Assert.Throws(() => TensorPrimitives.MinMagnitude(x, y, destination)); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void MinMagnitude_TwoTensors_ThrowsForTooShortDestination(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength - 1); + + AssertExtensions.Throws("destination", () => TensorPrimitives.MinMagnitude(x, y, destination)); + } + + [Fact] + public static void Product_ThrowsForEmpty() + { + Assert.Throws(() => TensorPrimitives.Product(ReadOnlySpan.Empty)); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void Product(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + + float f = x[0]; + for (int i = 1; i < x.Length; i++) + { + f *= x[i]; + } + + Assert.Equal(f, TensorPrimitives.Product(x), Tolerance); + } + + [Fact] + public static void Product_KnownValues() + { + Assert.Equal(1, TensorPrimitives.Product([1])); + Assert.Equal(-2, TensorPrimitives.Product([1, -2])); + Assert.Equal(-6, TensorPrimitives.Product([1, -2, 3])); + Assert.Equal(24, TensorPrimitives.Product([1, -2, 3, -4])); + Assert.Equal(120, TensorPrimitives.Product([1, -2, 3, -4, 5])); + Assert.Equal(-720, TensorPrimitives.Product([1, -2, 3, -4, 5, -6])); + Assert.Equal(0, TensorPrimitives.Product([1, -2, 3, -4, 5, -6, 0])); + Assert.Equal(0, TensorPrimitives.Product([0, 1, -2, 3, -4, 5, -6])); + Assert.Equal(0, TensorPrimitives.Product([1, -2, 3, 0, -4, 5, -6])); + Assert.Equal(float.NaN, TensorPrimitives.Product([1, -2, 3, float.NaN, -4, 5, -6])); + } + + [Fact] + public static void ProductOfDifferences_ThrowsForEmptyAndMismatchedLengths() + { + Assert.Throws(() => TensorPrimitives.ProductOfDifferences(ReadOnlySpan.Empty, ReadOnlySpan.Empty)); + Assert.Throws(() => TensorPrimitives.ProductOfDifferences(ReadOnlySpan.Empty, CreateTensor(1))); + Assert.Throws(() => TensorPrimitives.ProductOfDifferences(CreateTensor(1), ReadOnlySpan.Empty)); + Assert.Throws(() => TensorPrimitives.ProductOfDifferences(CreateTensor(44), CreateTensor(43))); + Assert.Throws(() => TensorPrimitives.ProductOfDifferences(CreateTensor(43), CreateTensor(44))); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void ProductOfDifferences(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + + float f = x[0] - y[0]; + for (int i = 1; i < x.Length; i++) + { + f *= x[i] - y[i]; + } + Assert.Equal(f, TensorPrimitives.ProductOfDifferences(x, y), Tolerance); + } + + [Fact] + public static void ProductOfDifferences_KnownValues() + { + Assert.Equal(0, TensorPrimitives.ProductOfDifferences([0], [0])); + Assert.Equal(0, TensorPrimitives.ProductOfDifferences([1], [1])); + Assert.Equal(1, TensorPrimitives.ProductOfDifferences([1], [0])); + Assert.Equal(-1, TensorPrimitives.ProductOfDifferences([0], [1])); + Assert.Equal(-1, TensorPrimitives.ProductOfDifferences([1, 2, 3, 4, 5], [2, 3, 4, 5, 6])); + Assert.Equal(120, TensorPrimitives.ProductOfDifferences([1, 2, 3, 4, 5], [0, 0, 0, 0, 0])); + Assert.Equal(-120, TensorPrimitives.ProductOfDifferences([0, 0, 0, 0, 0], [1, 2, 3, 4, 5])); + Assert.Equal(float.NaN, TensorPrimitives.ProductOfDifferences([1, 2, float.NaN, 4, 5], [0, 0, 0, 0, 0])); + } + + [Fact] + public static void ProductOfSums_ThrowsForEmptyAndMismatchedLengths() + { + Assert.Throws(() => TensorPrimitives.ProductOfSums(ReadOnlySpan.Empty, ReadOnlySpan.Empty)); + Assert.Throws(() => TensorPrimitives.ProductOfSums(ReadOnlySpan.Empty, CreateTensor(1))); + Assert.Throws(() => TensorPrimitives.ProductOfSums(CreateTensor(1), ReadOnlySpan.Empty)); + Assert.Throws(() => TensorPrimitives.ProductOfSums(CreateTensor(44), CreateTensor(43))); + Assert.Throws(() => TensorPrimitives.ProductOfSums(CreateTensor(43), CreateTensor(44))); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void ProductOfSums(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + + float f = x[0] + y[0]; + for (int i = 1; i < x.Length; i++) + { + f *= x[i] + y[i]; + } + Assert.Equal(f, TensorPrimitives.ProductOfSums(x, y), Tolerance); + } + + [Fact] + public static void ProductOfSums_KnownValues() + { + Assert.Equal(0, TensorPrimitives.ProductOfSums([0], [0])); + Assert.Equal(1, TensorPrimitives.ProductOfSums([0], [1])); + Assert.Equal(1, TensorPrimitives.ProductOfSums([1], [0])); + Assert.Equal(2, TensorPrimitives.ProductOfSums([1], [1])); + Assert.Equal(10395, TensorPrimitives.ProductOfSums([1, 2, 3, 4, 5], [2, 3, 4, 5, 6])); + Assert.Equal(120, TensorPrimitives.ProductOfSums([1, 2, 3, 4, 5], [0, 0, 0, 0, 0])); + Assert.Equal(120, TensorPrimitives.ProductOfSums([0, 0, 0, 0, 0], [1, 2, 3, 4, 5])); + Assert.Equal(float.NaN, TensorPrimitives.ProductOfSums([1, 2, float.NaN, 4, 5], [0, 0, 0, 0, 0])); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void Sum(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + + Assert.Equal(Enumerable.Sum(MemoryMarshal.ToEnumerable(x.Memory)), TensorPrimitives.Sum(x), Tolerance); + + float sum = 0; + foreach (float f in x.Span) + { + sum += f; + } + Assert.Equal(sum, TensorPrimitives.Sum(x), Tolerance); + } + + [Fact] + public static void Sum_KnownValues() + { + Assert.Equal(0, TensorPrimitives.Sum([0])); + Assert.Equal(1, TensorPrimitives.Sum([0, 1])); + Assert.Equal(6, TensorPrimitives.Sum([1, 2, 3])); + Assert.Equal(0, TensorPrimitives.Sum([-3, 0, 3])); + Assert.Equal(float.NaN, TensorPrimitives.Sum([-3, float.NaN, 3])); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void SumOfSquares(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + + Assert.Equal(Enumerable.Sum(MemoryMarshal.ToEnumerable(x.Memory), v => v * v), TensorPrimitives.SumOfSquares(x), Tolerance); + + float sum = 0; + foreach (float f in x.Span) + { + sum += f * f; + } + Assert.Equal(sum, TensorPrimitives.SumOfSquares(x), Tolerance); + } + + [Fact] + public static void SumOfSquares_KnownValues() + { + Assert.Equal(0, TensorPrimitives.SumOfSquares([0])); + Assert.Equal(1, TensorPrimitives.SumOfSquares([0, 1])); + Assert.Equal(14, TensorPrimitives.SumOfSquares([1, 2, 3])); + Assert.Equal(18, TensorPrimitives.SumOfSquares([-3, 0, 3])); + Assert.Equal(float.NaN, TensorPrimitives.SumOfSquares([-3, float.NaN, 3])); + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void SumOfMagnitudes(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + + Assert.Equal(Enumerable.Sum(MemoryMarshal.ToEnumerable(x.Memory), MathF.Abs), TensorPrimitives.SumOfMagnitudes(x), Tolerance); + + float sum = 0; + foreach (float f in x.Span) + { + sum += MathF.Abs(f); + } + Assert.Equal(sum, TensorPrimitives.SumOfMagnitudes(x), Tolerance); + } + + [Fact] + public static void SumOfMagnitudes_KnownValues() + { + Assert.Equal(0, TensorPrimitives.SumOfMagnitudes([0])); + Assert.Equal(1, TensorPrimitives.SumOfMagnitudes([0, 1])); + Assert.Equal(6, TensorPrimitives.SumOfMagnitudes([1, 2, 3])); + Assert.Equal(6, TensorPrimitives.SumOfMagnitudes([-3, 0, 3])); + Assert.Equal(float.NaN, TensorPrimitives.SumOfMagnitudes([-3, float.NaN, 3])); + } + + [Theory] + [MemberData(nameof(TensorLengthsIncluding0))] + public static void Abs(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength); + + TensorPrimitives.Abs(x, destination); + + for (int i = 0; i < x.Length; i++) + { + Assert.Equal(MathF.Abs(x[i]), destination[i], Tolerance); + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void Abs_ThrowsForTooShortDestination(int tensorLength) + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength - 1); + + AssertExtensions.Throws("destination", () => TensorPrimitives.Abs(x, destination)); + } + } +} diff --git a/src/libraries/System.Numerics.Tensors/tests/TensorPrimitivesTests.netcore.cs b/src/libraries/System.Numerics.Tensors/tests/TensorPrimitivesTests.netcore.cs new file mode 100644 index 00000000000000..113f26048d352c --- /dev/null +++ b/src/libraries/System.Numerics.Tensors/tests/TensorPrimitivesTests.netcore.cs @@ -0,0 +1,91 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Buffers; +using Xunit; + +namespace System.Numerics.Tensors.Tests +{ + public static partial class TensorPrimitivesTests + { + [Theory] + [InlineData(0)] + [MemberData(nameof(TensorLengths))] + public static void ConvertToHalf(int tensorLength) + { + using BoundedMemory source = CreateAndFillTensor(tensorLength); + foreach (int destLength in new[] { source.Length, source.Length + 1 }) + { + Half[] destination = new Half[destLength]; + + TensorPrimitives.ConvertToHalf(source, destination); + + for (int i = 0; i < source.Length; i++) + { + Assert.Equal((Half)source[i], destination[i]); + } + + if (destination.Length > source.Length) + { + for (int i = source.Length; i < destination.Length; i++) + { + Assert.Equal(Half.Zero, destination[i]); + } + } + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void ConvertToHalf_ThrowsForTooShortDestination(int tensorLength) + { + using BoundedMemory source = CreateAndFillTensor(tensorLength); + Half[] destination = new Half[source.Length - 1]; + + AssertExtensions.Throws("destination", () => TensorPrimitives.ConvertToHalf(source, destination)); + } + + [Theory] + [InlineData(0)] + [MemberData(nameof(TensorLengths))] + public static void ConvertToSingle(int tensorLength) + { + Half[] source = new Half[tensorLength]; + for (int i = 0; i < source.Length; i++) + { + source[i] = (Half)s_random.NextSingle(); + } + + foreach (int destLength in new[] { source.Length, source.Length + 1 }) + { + using BoundedMemory destination = CreateTensor(destLength); + destination.Span.Fill(0f); + + TensorPrimitives.ConvertToSingle(source, destination); + + for (int i = 0; i < source.Length; i++) + { + Assert.Equal((float)source[i], destination[i]); + } + + if (destination.Length > source.Length) + { + for (int i = source.Length; i < destination.Length; i++) + { + Assert.Equal(0f, destination[i]); + } + } + } + } + + [Theory] + [MemberData(nameof(TensorLengths))] + public static void ConvertToSingle_ThrowsForTooShortDestination(int tensorLength) + { + Half[] source = new Half[tensorLength]; + using BoundedMemory destination = CreateTensor(source.Length - 1); + + AssertExtensions.Throws("destination", () => TensorPrimitives.ConvertToSingle(source, destination)); + } + } +} diff --git a/src/libraries/System.Numerics.Tensors/tests/TensorTemplate.ttinclude b/src/libraries/System.Numerics.Tensors/tests/TensorTemplate.ttinclude deleted file mode 100644 index 9448791a5db6c4..00000000000000 --- a/src/libraries/System.Numerics.Tensors/tests/TensorTemplate.ttinclude +++ /dev/null @@ -1,328 +0,0 @@ -<#@ import namespace="System.Linq" #> -<#@ import namespace="System.Text" #> -<#@ import namespace="System.Collections.Generic" #> -<#+ - public class TypeConfiguration - { - public TypeConfiguration(string typeName, string classPrefix = null, string oneLiteral = "1", string zeroLiteral = "0", bool supportsNumeric = true, bool supportsBitwise = true, IEnumerable unsupportedMethods = null) - { - TypeName = typeName; - ClassPrefix = classPrefix ?? char.ToUpper(typeName[0]) + typeName.Substring(1); - OneLiteral = oneLiteral; - ZeroLiteral = zeroLiteral; - SupportsNumeric = supportsNumeric; - SupportsBitwise = supportsBitwise; - UnsupportedMethods = new HashSet(unsupportedMethods ?? Enumerable.Empty()); - } - - public string TypeName { get; } - public string ClassPrefix { get; } - public string OneLiteral { get; } - public string ZeroLiteral { get; } - - public bool SupportsNumeric { get; } - public bool SupportsBitwise { get; } - public ISet UnsupportedMethods { get; } - } - - public string GenerateIfStatementHeader(TypeConfiguration type) - { - string keyword = (type == typeConfiguration[0]) ? "if" : "else if"; - return $"{keyword} (typeof(T) == typeof({type.TypeName}))"; - } - - public TypeConfiguration[] typeConfiguration = new [] - { - new TypeConfiguration("bool", oneLiteral:"true", zeroLiteral:"false", supportsNumeric: false, unsupportedMethods: new[] {"LeftShift", "RightShift"}), - new TypeConfiguration("byte"), - new TypeConfiguration("char", oneLiteral:"(char)1", zeroLiteral:"(char)0"), - new TypeConfiguration("decimal", supportsBitwise: false), - new TypeConfiguration("double", oneLiteral:"1.0", supportsBitwise: false), - new TypeConfiguration("float", oneLiteral:"1.0f", supportsBitwise: false), - new TypeConfiguration("int"), - new TypeConfiguration("long"), - new TypeConfiguration("sbyte", classPrefix:"SByte"), - new TypeConfiguration("short"), - new TypeConfiguration("uint", classPrefix:"UInt", unsupportedMethods: new[] {"UnaryMinus"}), - new TypeConfiguration("ulong", classPrefix:"ULong", unsupportedMethods: new[] {"UnaryMinus"}), - new TypeConfiguration("ushort", classPrefix:"UShort", unsupportedMethods: new[] {"UnaryMinus"}) - }; - - public enum MethodType - { - Unary, - UnaryInPlace, - BinaryScalar, - BinaryInt, - Binary, - Comparison, - Contraction - } - - public class MethodConfiguration - { - public MethodConfiguration(string methodName, MethodType methodType, string op = null, bool isNumeric = false, bool isBitwise = false) - { - MethodName = methodName; - MethodType = methodType; - Operator = op; - IsNumeric = isNumeric; - IsBitwise = isBitwise; - } - - public string ResultName => "result"; - - public string Op1Name - { - get - { - switch (MethodType) - { - case MethodType.Unary: - case MethodType.UnaryInPlace: - case MethodType.BinaryScalar: - case MethodType.BinaryInt: - return "tensor"; - case MethodType.Binary: - case MethodType.Comparison: - case MethodType.Contraction: - return "left"; - default: - throw new ArgumentException(); - }; - } - } - - public string Op2Name - { - get - { - switch (MethodType) - { - case MethodType.BinaryScalar: - return "scalar"; - case MethodType.BinaryInt: - return "value"; - case MethodType.Binary: - case MethodType.Comparison: - case MethodType.Contraction: - return "right"; - case MethodType.Unary: - case MethodType.UnaryInPlace: - default: - throw new ArgumentException(); - }; - } - } - - public string MethodName { get; } - public MethodType MethodType { get; } - public string Operator { get; } - - public string GetGenericMethodSignature(string tensorType, string genericType) - { - var resultType = GetResultType(tensorType, genericType); - var arguments = GetMethodArguments(tensorType, genericType); - - return $"{resultType} {MethodName}<{genericType}>({arguments})"; - } - - public string GetGenericResultMethodSignature(string tensorType, string genericType) - { - var resultType = GetResultType(tensorType, genericType); - var arguments = GetMethodArguments(tensorType, genericType); - - return $"void {MethodName}<{genericType}>({arguments}, {resultType} {ResultName})"; - } - - public string GetResultMethodSignature(string tensorType, string genericType) - { - var resultType = GetResultType(tensorType, genericType); - var arguments = GetMethodArguments(tensorType, genericType); - - return $"void {MethodName}({arguments}, {resultType} {ResultName})"; - } - - public string GetMethodArguments(string tensorType, string genericType) - { - switch (MethodType) - { - case MethodType.Unary: - case MethodType.UnaryInPlace: - return $"{tensorType}<{genericType}> {Op1Name}"; - case MethodType.BinaryScalar: - return $"{tensorType}<{genericType}> {Op1Name}, {genericType} {Op2Name}"; - case MethodType.BinaryInt: - return $"{tensorType}<{genericType}> {Op1Name}, int {Op2Name}"; - case MethodType.Binary: - case MethodType.Comparison: - return $"{tensorType}<{genericType}> {Op1Name}, {tensorType}<{genericType}> {Op2Name}"; - case MethodType.Contraction: - return $"{tensorType}<{genericType}> {Op1Name}, {tensorType}<{genericType}> {Op2Name}, int[] leftAxes, int[] rightAxes"; - default: - throw new ArgumentException(); - } - } - - public string GetCallArguments() - { - switch (MethodType) - { - case MethodType.Unary: - case MethodType.UnaryInPlace: - return $"{Op1Name}"; - case MethodType.BinaryScalar: - case MethodType.BinaryInt: - case MethodType.Binary: - case MethodType.Comparison: - return $"{Op1Name}, {Op2Name}"; - case MethodType.Contraction: - return "left, right, leftAxes, rightAxes"; - default: - throw new ArgumentException(); - } - } - - public string GetValidationMethod(bool includeResult) - { - var suffix = includeResult ? ", result" : ""; - switch (MethodType) - { - case MethodType.Unary: - case MethodType.UnaryInPlace: - case MethodType.BinaryScalar: - case MethodType.BinaryInt: - return $"ValidateArgs({Op1Name}{suffix});"; - case MethodType.Binary: - case MethodType.Comparison: - return $"ValidateBinaryArgs({Op1Name}, {Op2Name}{suffix});"; - case MethodType.Contraction: - return $"var resultDimensions = ValidateContractArgs({Op1Name}, {Op2Name}, leftAxes, rightAxes{suffix});"; - default: - throw new ArgumentException(); - } - } - - public string GetResultType(string tensorType, string typeName) - { - switch (MethodType) - { - case MethodType.Unary: - case MethodType.UnaryInPlace: - case MethodType.BinaryScalar: - case MethodType.BinaryInt: - case MethodType.Binary: - case MethodType.Contraction: - return $"{tensorType}<{typeName}>"; - case MethodType.Comparison: - return $"{tensorType}"; - default: - throw new ArgumentException(); - } - } - - public string GetLinearOperationCheck() - { - switch (MethodType) - { - case MethodType.Unary: - case MethodType.BinaryScalar: - case MethodType.BinaryInt: - return $"({ResultName}.IsReversedStride == {Op1Name}.IsReversedStride)"; - case MethodType.Binary: - case MethodType.Comparison: - return $"(({ResultName}.IsReversedStride == {Op1Name}.IsReversedStride) && ({ResultName}.IsReversedStride == {Op2Name}.IsReversedStride))"; - case MethodType.UnaryInPlace: - default: - throw new ArgumentException(); - } - } - - - public string GetElementOperation(string typeName, string access) - { - return GetElementOperation(typeName, access, access, access); - } - - public string GetElementOperation(string typeName, string resultAccess, string leftAccess, string rightAccess) - { - switch (MethodType) - { - case MethodType.Unary: - return $"{ResultName}{resultAccess} = ({typeName}){Operator}{Op1Name}{leftAccess}"; - case MethodType.UnaryInPlace: - return $"{ResultName}{resultAccess}{Operator}"; - case MethodType.BinaryScalar: - case MethodType.BinaryInt: - return $"{ResultName}{resultAccess} = ({typeName})({Op1Name}{leftAccess} {Operator} {Op2Name})"; - case MethodType.Binary: - return $"{ResultName}{resultAccess} = ({typeName})({Op1Name}{leftAccess} {Operator} {Op2Name}{rightAccess})"; - case MethodType.Comparison: - return $"{ResultName}{resultAccess} = {Op1Name}{leftAccess} {Operator} {Op2Name}{rightAccess}"; - default: - throw new ArgumentException(); - - } - } - - public string InitializeResult(string typeName) - { - switch (MethodType) - { - case MethodType.UnaryInPlace: - return $"{Op1Name}.Clone()"; - case MethodType.Unary: - case MethodType.BinaryScalar: - case MethodType.BinaryInt: - case MethodType.Binary: - return $"{Op1Name}.CloneEmpty()"; - case MethodType.Comparison: - return $"{Op1Name}.CloneEmpty()"; - case MethodType.Contraction: - return $"{Op1Name}.CloneEmpty(resultDimensions)"; - default: - throw new ArgumentException(); - } - } - - public bool IsNumeric { get; } - public bool IsBitwise { get; } - } - - - public MethodConfiguration[] methodConfiguration = new [] - { - new MethodConfiguration("Add", MethodType.Binary, "+", isNumeric:true), - new MethodConfiguration("Add", MethodType.BinaryScalar, "+", isNumeric:true), - new MethodConfiguration("UnaryPlus", MethodType.Unary, "+", isNumeric:true), - new MethodConfiguration("Subtract", MethodType.Binary, "-", isNumeric:true), - new MethodConfiguration("Subtract", MethodType.BinaryScalar, "-", isNumeric:true), - new MethodConfiguration("UnaryMinus", MethodType.Unary, "-", isNumeric:true), - new MethodConfiguration("Increment", MethodType.UnaryInPlace, "++", isNumeric:true), - new MethodConfiguration("Decrement", MethodType.UnaryInPlace, "--", isNumeric:true), - new MethodConfiguration("Multiply", MethodType.Binary, "*", isNumeric:true), // element-wise product, not matrix product - new MethodConfiguration("Multiply", MethodType.BinaryScalar, "*", isNumeric:true), - new MethodConfiguration("Divide", MethodType.Binary, "/", isNumeric:true), - new MethodConfiguration("Divide", MethodType.BinaryScalar, "/", isNumeric:true), - new MethodConfiguration("Modulo", MethodType.Binary, "%", isNumeric:true), - new MethodConfiguration("Modulo", MethodType.BinaryScalar, "%", isNumeric:true), - new MethodConfiguration("And", MethodType.Binary, "&", isBitwise: true), - new MethodConfiguration("And", MethodType.BinaryScalar, "&", isBitwise: true), - new MethodConfiguration("Or", MethodType.Binary, "|", isBitwise: true), - new MethodConfiguration("Or", MethodType.BinaryScalar, "|", isBitwise: true), - new MethodConfiguration("Xor", MethodType.Binary, "^", isBitwise: true), - new MethodConfiguration("Xor", MethodType.BinaryScalar, "^", isBitwise: true), - new MethodConfiguration("LeftShift", MethodType.BinaryInt, "<<", isBitwise: true), - new MethodConfiguration("RightShift", MethodType.BinaryInt, ">>", isBitwise: true), - - // Note all of these are element-wise operations not testing the operation on the entire Tensor - new MethodConfiguration("Equals", MethodType.Comparison, "=="), - new MethodConfiguration("NotEquals", MethodType.Comparison, "!="), - new MethodConfiguration("GreaterThanOrEqual", MethodType.Comparison, ">=", isNumeric:true), - new MethodConfiguration("LessThanOrEqual", MethodType.Comparison, "<=", isNumeric:true), - new MethodConfiguration("GreaterThan", MethodType.Comparison, ">", isNumeric:true), - new MethodConfiguration("LessThan", MethodType.Comparison, "<", isNumeric:true), - - new MethodConfiguration("Contract", MethodType.Contraction, isNumeric:true), - }.OrderBy(m => m.MethodName).ToArray(); -#> diff --git a/src/libraries/System.Numerics.Tensors/tests/TensorTests.cs b/src/libraries/System.Numerics.Tensors/tests/TensorTests.cs deleted file mode 100644 index 27c7ba75e4e259..00000000000000 --- a/src/libraries/System.Numerics.Tensors/tests/TensorTests.cs +++ /dev/null @@ -1,2486 +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.Collections.Generic; -using System.Linq; -using Xunit; - -namespace System.Numerics.Tensors.Tests -{ - public class TensorTests : TensorTestsBase - { - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void ConstructTensorFromArrayRank1(TensorConstructor tensorConstructor) - { - var tensor = tensorConstructor.CreateFromArray(new[] { 0, 1, 2 }); - - Assert.Equal(tensorConstructor.IsReversedStride, tensor.IsReversedStride); - Assert.Equal(0, tensor[0]); - Assert.Equal(1, tensor[1]); - Assert.Equal(2, tensor[2]); - } - - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void ConstructTensorFromArrayRank2(TensorConstructor tensorConstructor) - { - var tensor = tensorConstructor.CreateFromArray(new[,] - { - {0, 1, 2}, - {3, 4, 5} - }); - - Assert.Equal(tensorConstructor.IsReversedStride, tensor.IsReversedStride); - Assert.Equal(0, tensor[0, 0]); - Assert.Equal(1, tensor[0, 1]); - Assert.Equal(2, tensor[0, 2]); - Assert.Equal(3, tensor[1, 0]); - Assert.Equal(4, tensor[1, 1]); - Assert.Equal(5, tensor[1, 2]); - } - - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void ConstructTensorFromArrayRank3(TensorConstructor tensorConstructor) - { - var tensor = tensorConstructor.CreateFromArray(new[, ,] - { - { - {0, 1, 2}, - {3, 4, 5} - }, - { - {6, 7 ,8 }, - {9, 10 ,11 }, - }, - { - {12, 13 ,14 }, - {15, 16 ,17 }, - }, - { - {18, 19 ,20 }, - {21, 22 ,23 }, - } - }); - - Assert.Equal(tensorConstructor.IsReversedStride, tensor.IsReversedStride); - - Assert.Equal(0, tensor[0, 0, 0]); - Assert.Equal(1, tensor[0, 0, 1]); - Assert.Equal(2, tensor[0, 0, 2]); - Assert.Equal(3, tensor[0, 1, 0]); - Assert.Equal(4, tensor[0, 1, 1]); - Assert.Equal(5, tensor[0, 1, 2]); - - Assert.Equal(6, tensor[1, 0, 0]); - Assert.Equal(7, tensor[1, 0, 1]); - Assert.Equal(8, tensor[1, 0, 2]); - Assert.Equal(9, tensor[1, 1, 0]); - Assert.Equal(10, tensor[1, 1, 1]); - Assert.Equal(11, tensor[1, 1, 2]); - - Assert.Equal(12, tensor[2, 0, 0]); - Assert.Equal(13, tensor[2, 0, 1]); - Assert.Equal(14, tensor[2, 0, 2]); - Assert.Equal(15, tensor[2, 1, 0]); - Assert.Equal(16, tensor[2, 1, 1]); - Assert.Equal(17, tensor[2, 1, 2]); - - Assert.Equal(18, tensor[3, 0, 0]); - Assert.Equal(19, tensor[3, 0, 1]); - Assert.Equal(20, tensor[3, 0, 2]); - Assert.Equal(21, tensor[3, 1, 0]); - Assert.Equal(22, tensor[3, 1, 1]); - Assert.Equal(23, tensor[3, 1, 2]); - } - - [Fact] - public void ConstructDenseTensorFromPointer() - { - using (var nativeMemory = NativeMemoryFromArray(Enumerable.Range(0, 24).ToArray())) - { - var dimensions = new[] { 4, 2, 3 }; - var tensor = new DenseTensor(nativeMemory.Memory, dimensions, false); - - Assert.Equal(0, tensor[0, 0, 0]); - Assert.Equal(1, tensor[0, 0, 1]); - Assert.Equal(2, tensor[0, 0, 2]); - Assert.Equal(3, tensor[0, 1, 0]); - Assert.Equal(4, tensor[0, 1, 1]); - Assert.Equal(5, tensor[0, 1, 2]); - - Assert.Equal(6, tensor[1, 0, 0]); - Assert.Equal(7, tensor[1, 0, 1]); - Assert.Equal(8, tensor[1, 0, 2]); - Assert.Equal(9, tensor[1, 1, 0]); - Assert.Equal(10, tensor[1, 1, 1]); - Assert.Equal(11, tensor[1, 1, 2]); - - Assert.Equal(12, tensor[2, 0, 0]); - Assert.Equal(13, tensor[2, 0, 1]); - Assert.Equal(14, tensor[2, 0, 2]); - Assert.Equal(15, tensor[2, 1, 0]); - Assert.Equal(16, tensor[2, 1, 1]); - Assert.Equal(17, tensor[2, 1, 2]); - - Assert.Equal(18, tensor[3, 0, 0]); - Assert.Equal(19, tensor[3, 0, 1]); - Assert.Equal(20, tensor[3, 0, 2]); - Assert.Equal(21, tensor[3, 1, 0]); - Assert.Equal(22, tensor[3, 1, 1]); - Assert.Equal(23, tensor[3, 1, 2]); - } - } - - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void ConstructSparseTensor(TensorConstructor tensorConstructor) - { - var tensor = tensorConstructor.CreateFromArray(new[,] - { - {0, 0, 0, 0}, - {5, 8, 0, 0}, - {0, 0, 3, 0}, - {0, 6, 0, 0} - }); - - Assert.Equal(tensorConstructor.IsReversedStride, tensor.IsReversedStride); - - - Assert.Equal(0, tensor[0, 0]); - Assert.Equal(0, tensor[0, 1]); - Assert.Equal(0, tensor[0, 2]); - Assert.Equal(0, tensor[0, 3]); - - - Assert.Equal(5, tensor[1, 0]); - Assert.Equal(8, tensor[1, 1]); - Assert.Equal(0, tensor[1, 2]); - Assert.Equal(0, tensor[1, 3]); - - - Assert.Equal(0, tensor[2, 0]); - Assert.Equal(0, tensor[2, 1]); - Assert.Equal(3, tensor[2, 2]); - Assert.Equal(0, tensor[2, 3]); - - - Assert.Equal(0, tensor[3, 0]); - Assert.Equal(6, tensor[3, 1]); - Assert.Equal(0, tensor[3, 2]); - Assert.Equal(0, tensor[3, 3]); - - if (tensorConstructor.TensorType == TensorType.CompressedSparse) - { - var compressedSparseTensor = (CompressedSparseTensor)tensor; - - Assert.Equal(4, compressedSparseTensor.NonZeroCount); - - int[] expectedValues, expectedCompressedCounts, expectedIndices; - - if (compressedSparseTensor.IsReversedStride) - { - // csc - expectedValues = new[] { 5, 8, 6, 3 }; - expectedCompressedCounts = new[] { 0, 1, 3, 4, 4 }; - expectedIndices = new[] { 1, 1, 3, 2 }; - } - else - { - // csr - expectedValues = new[] { 5, 8, 3, 6 }; - expectedCompressedCounts = new[] { 0, 0, 2, 3, 4 }; - expectedIndices = new[] { 0, 1, 2, 1 }; - } - Assert.Equal(expectedValues, compressedSparseTensor.Values.Slice(0, compressedSparseTensor.NonZeroCount).ToArray()); - Assert.Equal(expectedCompressedCounts, compressedSparseTensor.CompressedCounts.ToArray()); - Assert.Equal(expectedIndices, compressedSparseTensor.Indices.Slice(0, compressedSparseTensor.NonZeroCount).ToArray()); - } - } - - [Theory()] - [InlineData(false)] - [InlineData(true)] - public void ConstructCompressedSparseTensorFromPointers(bool isReversedStride) - { - int[] values, compressedCounts, indices; - if (isReversedStride) - { - // csc - values = new[] { 5, 8, 6, 3 }; - compressedCounts = new[] { 0, 1, 3, 4, 4 }; - indices = new[] { 1, 1, 3, 2 }; - } - else - { - // csr - values = new[] { 5, 8, 3, 6 }; - compressedCounts = new[] { 0, 0, 2, 3, 4 }; - indices = new[] { 0, 1, 2, 1 }; - } - int[] dimensions = new[] { 4, 4 }; - - using (var valuesMemory = NativeMemoryFromArray(values)) - using (var compressedCountsMemory = NativeMemoryFromArray(compressedCounts)) - using (var indicesMemory = NativeMemoryFromArray(indices)) - { - var tensor = new CompressedSparseTensor(valuesMemory.Memory, - compressedCountsMemory.Memory, - indicesMemory.Memory, - values.Length, - dimensions, - isReversedStride); - - Assert.Equal(0, tensor[0, 0]); - Assert.Equal(0, tensor[0, 1]); - Assert.Equal(0, tensor[0, 2]); - Assert.Equal(0, tensor[0, 3]); - - - Assert.Equal(5, tensor[1, 0]); - Assert.Equal(8, tensor[1, 1]); - Assert.Equal(0, tensor[1, 2]); - Assert.Equal(0, tensor[1, 3]); - - - Assert.Equal(0, tensor[2, 0]); - Assert.Equal(0, tensor[2, 1]); - Assert.Equal(3, tensor[2, 2]); - Assert.Equal(0, tensor[2, 3]); - - - Assert.Equal(0, tensor[3, 0]); - Assert.Equal(6, tensor[3, 1]); - Assert.Equal(0, tensor[3, 2]); - Assert.Equal(0, tensor[3, 3]); - } - } - - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void ConstructFromDimensions(TensorConstructor tensorConstructor) - { - var tensor = tensorConstructor.CreateFromDimensions(new[] { 2, 3, 4 }); - Assert.Equal(3, tensor.Rank); - Assert.Equal(3, tensor.Dimensions.Length); - Assert.Equal(2, tensor.Dimensions[0]); - Assert.Equal(3, tensor.Dimensions[1]); - Assert.Equal(4, tensor.Dimensions[2]); - Assert.Equal(24, tensor.Length); - Assert.Equal(tensorConstructor.IsReversedStride, tensor.IsReversedStride); - - //Assert.Throws("dimensions", () => tensorConstructor.CreateFromDimensions(dimensions: null)); - Assert.Throws("dimensions", () => tensorConstructor.CreateFromDimensions(dimensions: new int[0])); - - Assert.Throws("dimensions", () => tensorConstructor.CreateFromDimensions(dimensions: new[] { 1, 0 })); - Assert.Throws("dimensions", () => tensorConstructor.CreateFromDimensions(dimensions: new[] { 1, -1 })); - - // ensure dimensions are immutable - var dimensions = new[] { 1, 2, 3 }; - tensor = tensorConstructor.CreateFromDimensions(dimensions: dimensions); - dimensions[0] = dimensions[1] = dimensions[2] = 0; - Assert.Equal(1, tensor.Dimensions[0]); - Assert.Equal(2, tensor.Dimensions[1]); - Assert.Equal(3, tensor.Dimensions[2]); - } - - [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNonZeroLowerBoundArraySupported))] - [MemberData(nameof(GetSingleTensorConstructors))] - public void ConstructTensorFromArrayRank3WithLowerBounds(TensorConstructor tensorConstructor) - { - var dimensions = new[] { 2, 3, 4 }; - var lowerBounds = new[] { 0, 5, 200 }; - var arrayWithLowerBounds = Array.CreateInstance(typeof(int), dimensions, lowerBounds); - - int value = 0; - for (int x = lowerBounds[0]; x < lowerBounds[0] + dimensions[0]; x++) - { - for (int y = lowerBounds[1]; y < lowerBounds[1] + dimensions[1]; y++) - { - for (int z = lowerBounds[2]; z < lowerBounds[2] + dimensions[2]; z++) - { - arrayWithLowerBounds.SetValue(value++, x, y, z); - } - } - } - - var tensor = tensorConstructor.CreateFromArray(arrayWithLowerBounds); - - var expected = tensorConstructor.CreateFromArray(new[, ,] - { - { - { 0, 1, 2, 3 }, - { 4, 5, 6, 7 }, - { 8, 9, 10, 11 } - }, - { - { 12, 13, 14, 15 }, - { 16, 17, 18, 19 }, - { 20, 21, 22, 23 } - } - } - ); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(expected, tensor)); - Assert.Equal(tensorConstructor.IsReversedStride, tensor.IsReversedStride); - } - - [Theory()] - [MemberData(nameof(GetDualTensorConstructors))] - public void StructurallyEqualTensor(TensorConstructor leftConstructor, TensorConstructor rightConstructor) - { - var arr = new[, ,] - { - { - {0, 1, 2}, - {3, 4, 5} - }, - { - {6, 7 ,8 }, - {9, 10 ,11 }, - }, - { - {12, 13 ,14 }, - {15, 16 ,17 }, - }, - { - {18, 19 ,20 }, - {21, 22 ,23 }, - } - }; - var tensor = leftConstructor.CreateFromArray(arr); - var tensor2 = rightConstructor.CreateFromArray(arr); - - Assert.Equal(0, StructuralComparisons.StructuralComparer.Compare(tensor, tensor2)); - Assert.Equal(0, StructuralComparisons.StructuralComparer.Compare(tensor2, tensor)); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tensor, tensor2)); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tensor2, tensor)); - // Issue: should Tensors with different layout be structurally equal? - if (leftConstructor.IsReversedStride == leftConstructor.IsReversedStride) - { - Assert.Equal(StructuralComparisons.StructuralEqualityComparer.GetHashCode(tensor), StructuralComparisons.StructuralEqualityComparer.GetHashCode(tensor2)); - } - } - - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void StructurallyEqualArray(TensorConstructor tensorConstructor) - { - var arr = new[, ,] - { - { - {0, 1, 2}, - {3, 4, 5} - }, - { - {6, 7 ,8 }, - {9, 10 ,11 }, - }, - { - {12, 13 ,14 }, - {15, 16 ,17 }, - }, - { - {18, 19 ,20 }, - {21, 22 ,23 }, - } - }; - var tensor = tensorConstructor.CreateFromArray(arr); - - Assert.Equal(0, StructuralComparisons.StructuralComparer.Compare(tensor, arr)); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tensor, arr)); - - } - - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void GetDiagonalSquare(TensorConstructor tensorConstructor) - { - var arr = new[,] - { - { 1, 2, 4 }, - { 8, 3, 9 }, - { 1, 7, 5 }, - }; - - var tensor = tensorConstructor.CreateFromArray(arr); - var diag = tensor.GetDiagonal(); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(diag, new[] { 1, 3, 5 })); - diag = tensor.GetDiagonal(1); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(diag, new[] { 2, 9 })); - diag = tensor.GetDiagonal(2); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(diag, new[] { 4 })); - Assert.Throws("offset", () => tensor.GetDiagonal(3)); - - diag = tensor.GetDiagonal(-1); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(diag, new[] { 8, 7 })); - diag = tensor.GetDiagonal(-2); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(diag, new[] { 1 })); - Assert.Throws("offset", () => tensor.GetDiagonal(-3)); - } - - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void GetDiagonalRectangle(TensorConstructor tensorConstructor) - { - var arr = new[,] - { - { 1, 2, 4, 3, 7 }, - { 8, 3, 9, 2, 6 }, - { 1, 7, 5, 2, 9 } - }; - - var tensor = tensorConstructor.CreateFromArray(arr); - var diag = tensor.GetDiagonal(); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(diag, new[] { 1, 3, 5 })); - diag = tensor.GetDiagonal(1); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(diag, new[] { 2, 9, 2 })); - diag = tensor.GetDiagonal(2); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(diag, new[] { 4, 2, 9 })); - diag = tensor.GetDiagonal(3); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(diag, new[] { 3, 6 })); - diag = tensor.GetDiagonal(4); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(diag, new[] { 7 })); - Assert.Throws("offset", () => tensor.GetDiagonal(5)); - - diag = tensor.GetDiagonal(-1); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(diag, new[] { 8, 7 })); - diag = tensor.GetDiagonal(-2); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(diag, new[] { 1 })); - Assert.Throws("offset", () => tensor.GetDiagonal(-3)); - Assert.Throws("offset", () => tensor.GetDiagonal(-4)); - Assert.Throws("offset", () => tensor.GetDiagonal(-5)); - } - - - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void GetDiagonalCube(TensorConstructor tensorConstructor) - { - var arr = new[, ,] - { - { - { 1, 2, 4 }, - { 8, 3, 9 }, - { 1, 7, 5 }, - }, - { - { 4, 5, 7 }, - { 1, 6, 2 }, - { 3, 0, 8 }, - }, - { - { 5, 6, 1 }, - { 2, 2, 3 }, - { 4, 9, 4 }, - }, - - }; - - var tensor = tensorConstructor.CreateFromArray(arr); - var diag = tensor.GetDiagonal(); - var expected = new[,] - { - { 1, 2, 4 }, - { 1, 6, 2 }, - { 4, 9, 4 } - }; - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(diag, expected)); - Assert.Equal(tensorConstructor.IsReversedStride, diag.IsReversedStride); - } - - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void GetTriangleSquare(TensorConstructor tensorConstructor) - { - var arr = new[,] - { - { 1, 2, 4 }, - { 8, 3, 9 }, - { 1, 7, 5 }, - }; - - var tensor = tensorConstructor.CreateFromArray(arr); - var tri = tensor.GetTriangle(0); - Assert.Equal(tensorConstructor.IsReversedStride, tri.IsReversedStride); - - var expected = tensorConstructor.CreateFromArray(new[,] - { - { 1, 0, 0 }, - { 8, 3, 0 }, - { 1, 7, 5 }, - }); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - tri = tensor.GetTriangle(1); - expected = tensorConstructor.CreateFromArray(new[,] - { - { 1, 2, 0 }, - { 8, 3, 9 }, - { 1, 7, 5 }, - }); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - tri = tensor.GetTriangle(2); - expected = tensorConstructor.CreateFromArray(new[,] - { - { 1, 2, 4 }, - { 8, 3, 9 }, - { 1, 7, 5 }, - }); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - - tri = tensor.GetTriangle(3); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - - tri = tensor.GetTriangle(200); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - - tri = tensor.GetTriangle(-1); - expected = tensorConstructor.CreateFromArray(new[,] - { - { 0, 0, 0 }, - { 8, 0, 0 }, - { 1, 7, 0 }, - }); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - tri = tensor.GetTriangle(-2); - expected = tensorConstructor.CreateFromArray(new[,] - { - { 0, 0, 0 }, - { 0, 0, 0 }, - { 1, 0, 0 }, - }); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - - - expected = tensorConstructor.CreateFromArray(new[,] - { - { 0, 0, 0 }, - { 0, 0, 0 }, - { 0, 0, 0 }, - }); - tri = tensor.GetTriangle(-3); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - - // same as -3, should it be an exception? - tri = tensor.GetTriangle(-4); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - tri = tensor.GetTriangle(-300); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - } - - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void GetTriangleRectangle(TensorConstructor tensorConstructor) - { - var arr = new[,] - { - { 1, 2, 4, 3, 7 }, - { 8, 3, 9, 2, 6 }, - { 1, 7, 5, 2, 9 } - }; - - var tensor = tensorConstructor.CreateFromArray(arr); - var tri = tensor.GetTriangle(0); - var expected = tensorConstructor.CreateFromArray(new[,] - { - { 1, 0, 0, 0, 0 }, - { 8, 3, 0, 0, 0 }, - { 1, 7, 5, 0, 0 } - }); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - Assert.Equal(tensorConstructor.IsReversedStride, tri.IsReversedStride); - - tri = tensor.GetTriangle(1); - expected = tensorConstructor.CreateFromArray(new[,] - { - { 1, 2, 0, 0, 0 }, - { 8, 3, 9, 0, 0 }, - { 1, 7, 5, 2, 0 } - }); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - tri = tensor.GetTriangle(2); - expected = tensorConstructor.CreateFromArray(new[,] - { - { 1, 2, 4, 0, 0 }, - { 8, 3, 9, 2, 0 }, - { 1, 7, 5, 2, 9 } - }); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - tri = tensor.GetTriangle(3); - expected = tensorConstructor.CreateFromArray(new[,] - { - { 1, 2, 4, 3, 0 }, - { 8, 3, 9, 2, 6 }, - { 1, 7, 5, 2, 9 } - }); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - - tri = tensor.GetTriangle(4); - expected = tensorConstructor.CreateFromArray(new[,] - { - { 1, 2, 4, 3, 7 }, - { 8, 3, 9, 2, 6 }, - { 1, 7, 5, 2, 9 } - }); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - - // same as 4, should it be an exception? - tri = tensor.GetTriangle(5); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - tri = tensor.GetTriangle(1000); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - - tri = tensor.GetTriangle(-1); - expected = tensorConstructor.CreateFromArray(new[,] - { - { 0, 0, 0, 0, 0 }, - { 8, 0, 0, 0, 0 }, - { 1, 7, 0, 0, 0 } - }); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - - expected = tensorConstructor.CreateFromArray(new[,] - { - { 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0 }, - { 1, 0, 0, 0, 0 } - }); - tri = tensor.GetTriangle(-2); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - - expected = tensorConstructor.CreateFromArray(new[,] - { - { 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0 } - }); - tri = tensor.GetTriangle(-3); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - - tri = tensor.GetTriangle(-4); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - tri = tensor.GetTriangle(-5); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - tri = tensor.GetTriangle(-100); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - } - - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void GetTriangleCube(TensorConstructor tensorConstructor) - { - var arr = new[, ,] - { - { - { 1, 2, 4 }, - { 8, 3, 9 }, - { 1, 7, 5 }, - }, - { - { 4, 5, 7 }, - { 1, 6, 2 }, - { 3, 0, 8 }, - }, - { - { 5, 6, 1 }, - { 2, 2, 3 }, - { 4, 9, 4 }, - }, - - }; - - var tensor = tensorConstructor.CreateFromArray(arr); - var tri = tensor.GetTriangle(0); - var expected = tensorConstructor.CreateFromArray(new[, ,] - { - { - { 1, 2, 4 }, - { 0, 0, 0 }, - { 0, 0, 0 }, - }, - { - { 4, 5, 7 }, - { 1, 6, 2 }, - { 0, 0, 0 }, - }, - { - { 5, 6, 1 }, - { 2, 2, 3 }, - { 4, 9, 4 }, - }, - - }); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - Assert.Equal(tensorConstructor.IsReversedStride, tri.IsReversedStride); - } - - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void GetUpperTriangleSquare(TensorConstructor tensorConstructor) - { - var arr = new[,] - { - { 1, 2, 4 }, - { 8, 3, 9 }, - { 1, 7, 5 }, - }; - - var tensor = tensorConstructor.CreateFromArray(arr); - var tri = tensor.GetUpperTriangle(0); - - var expected = tensorConstructor.CreateFromArray(new[,] - { - { 1, 2, 4 }, - { 0, 3, 9 }, - { 0, 0, 5 }, - }); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - Assert.Equal(tensorConstructor.IsReversedStride, tri.IsReversedStride); - - tri = tensor.GetUpperTriangle(1); - expected = tensorConstructor.CreateFromArray(new[,] - { - { 0, 2, 4 }, - { 0, 0, 9 }, - { 0, 0, 0 }, - }); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - tri = tensor.GetUpperTriangle(2); - expected = tensorConstructor.CreateFromArray(new[,] - { - { 0, 0, 4 }, - { 0, 0, 0 }, - { 0, 0, 0 }, - }); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - - tri = tensor.GetUpperTriangle(3); - expected = tensorConstructor.CreateFromArray(new[,] - { - { 0, 0, 0 }, - { 0, 0, 0 }, - { 0, 0, 0 }, - }); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - - tri = tensor.GetUpperTriangle(4); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - tri = tensor.GetUpperTriangle(42); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - - tri = tensor.GetUpperTriangle(-1); - expected = tensorConstructor.CreateFromArray(new[,] - { - { 1, 2, 4 }, - { 8, 3, 9 }, - { 0, 7, 5 }, - }); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - tri = tensor.GetUpperTriangle(-2); - expected = tensorConstructor.CreateFromArray(new[,] - { - { 1, 2, 4 }, - { 8, 3, 9 }, - { 1, 7, 5 }, - }); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - - tri = tensor.GetUpperTriangle(-3); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - tri = tensor.GetUpperTriangle(-300); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - } - - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void GetUpperTriangleRectangle(TensorConstructor tensorConstructor) - { - var arr = new[,] - { - { 1, 2, 4, 3, 7 }, - { 8, 3, 9, 2, 6 }, - { 1, 7, 5, 2, 9 } - }; - - var tensor = tensorConstructor.CreateFromArray(arr); - var tri = tensor.GetUpperTriangle(0); - var expected = tensorConstructor.CreateFromArray(new[,] - { - { 1, 2, 4, 3, 7 }, - { 0, 3, 9, 2, 6 }, - { 0, 0, 5, 2, 9 } - }); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - Assert.Equal(tensorConstructor.IsReversedStride, tri.IsReversedStride); - tri = tensor.GetUpperTriangle(1); - expected = tensorConstructor.CreateFromArray(new[,] - { - { 0, 2, 4, 3, 7 }, - { 0, 0, 9, 2, 6 }, - { 0, 0, 0, 2, 9 } - }); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - tri = tensor.GetUpperTriangle(2); - expected = tensorConstructor.CreateFromArray(new[,] - { - { 0, 0, 4, 3, 7 }, - { 0, 0, 0, 2, 6 }, - { 0, 0, 0, 0, 9 } - }); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - tri = tensor.GetUpperTriangle(3); - expected = tensorConstructor.CreateFromArray(new[,] - { - { 0, 0, 0, 3, 7 }, - { 0, 0, 0, 0, 6 }, - { 0, 0, 0, 0, 0 } - }); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - - tri = tensor.GetUpperTriangle(4); - expected = tensorConstructor.CreateFromArray(new[,] - { - { 0, 0, 0, 0, 7 }, - { 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0 } - }); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - - expected = tensorConstructor.CreateFromArray(new[,] - { - { 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0 } - }); - tri = tensor.GetUpperTriangle(5); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - tri = tensor.GetUpperTriangle(6); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - tri = tensor.GetUpperTriangle(1000); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - - tri = tensor.GetUpperTriangle(-1); - expected = tensorConstructor.CreateFromArray(new[,] - { - { 1, 2, 4, 3, 7 }, - { 8, 3, 9, 2, 6 }, - { 0, 7, 5, 2, 9 } - }); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - - expected = tensorConstructor.CreateFromArray(new[,] - { - { 1, 2, 4, 3, 7 }, - { 8, 3, 9, 2, 6 }, - { 1, 7, 5, 2, 9 } - }); - tri = tensor.GetUpperTriangle(-2); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - - tri = tensor.GetUpperTriangle(-3); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - tri = tensor.GetUpperTriangle(-4); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - tri = tensor.GetUpperTriangle(-100); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - } - - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void GetUpperTriangleCube(TensorConstructor tensorConstructor) - { - var arr = new[, ,] - { - { - { 1, 2, 4 }, - { 8, 3, 9 }, - { 1, 7, 5 }, - }, - { - { 4, 5, 7 }, - { 1, 6, 2 }, - { 3, 0, 8 }, - }, - { - { 5, 6, 1 }, - { 2, 2, 3 }, - { 4, 9, 4 }, - }, - - }; - - var tensor = tensorConstructor.CreateFromArray(arr); - var tri = tensor.GetUpperTriangle(0); - var expected = tensorConstructor.CreateFromArray(new[, ,] - { - { - { 1, 2, 4 }, - { 8, 3, 9 }, - { 1, 7, 5 }, - }, - { - { 0, 0, 0 }, - { 1, 6, 2 }, - { 3, 0, 8 }, - }, - { - { 0, 0, 0 }, - { 0, 0, 0 }, - { 4, 9, 4 }, - }, - - }); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tri, expected)); - Assert.Equal(tensorConstructor.IsReversedStride, tri.IsReversedStride); - } - - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void Reshape(TensorConstructor tensorConstructor) - { - var arr = new[,] - { - { 1, 2, 3 }, - { 4, 5, 6 } - }; - - var tensor = tensorConstructor.CreateFromArray(arr); - var actual = tensor.Reshape(new[] { 3, 2 }); - - var expected = tensorConstructor.IsReversedStride ? - new[,] - { - { 1, 5 }, - { 4, 3 }, - { 2, 6 } - } : - new[,] - { - { 1, 2 }, - { 3, 4 }, - { 5, 6 } - }; - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - Assert.Equal(tensorConstructor.IsReversedStride, actual.IsReversedStride); - } - - [Fact] - public void Identity() - { - var actual = Tensor.CreateIdentity(3); - - var expected = new[,] - { - {1.0, 0, 0 }, - {0, 1.0, 0 }, - {0, 0, 1.0 } - }; - - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - } - - [Theory] - [MemberData(nameof(GetSingleTensorConstructors))] - public void CreateWithDiagonal(TensorConstructor tensorConstructor) - { - var diagonal = tensorConstructor.CreateFromArray(new[] { 1, 2, 3, 4, 5 }); - var actual = Tensor.CreateFromDiagonal(diagonal); - - var expected = new[,] - { - {1, 0, 0, 0, 0 }, - {0, 2, 0, 0, 0 }, - {0, 0, 3, 0, 0 }, - {0, 0, 0, 4, 0 }, - {0, 0, 0, 0, 5 } - }; - - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - } - - [Theory] - [MemberData(nameof(GetSingleTensorConstructors))] - public void CreateWithDiagonal3D(TensorConstructor tensorConstructor) - { - var diagonal = tensorConstructor.CreateFromArray(new[,] - { - { 1, 2, 3, 4, 5 }, - { 1, 2, 3, 4, 5 }, - { 1, 2, 3, 4, 5 } - }); - var actual = Tensor.CreateFromDiagonal(diagonal); - var expected = new[, ,] - { - { - {1, 2, 3, 4, 5 }, - {0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0 } - }, - { - {0, 0, 0, 0, 0 }, - {1, 2, 3, 4, 5 }, - {0, 0, 0, 0, 0 } - }, - { - {0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0 }, - {1, 2, 3, 4, 5 } - } - }; - - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - } - - [Theory] - [MemberData(nameof(GetSingleTensorConstructors))] - public void CreateWithDiagonalAndOffset(TensorConstructor tensorConstructor) - { - var diagonal = tensorConstructor.CreateFromArray(new[] { 1, 2, 3, 4 }); - var actual = Tensor.CreateFromDiagonal(diagonal, 1); - - var expected = new[,] - { - {0, 1, 0, 0, 0 }, - {0, 0, 2, 0, 0 }, - {0, 0, 0, 3, 0 }, - {0, 0, 0, 0, 4 }, - {0, 0, 0, 0, 0 } - }; - - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - - diagonal = tensorConstructor.CreateFromArray(new[] { 1, 2, 3, 4 }); - actual = Tensor.CreateFromDiagonal(diagonal, -1); - - expected = new[,] - { - {0, 0, 0, 0, 0 }, - {1, 0, 0, 0, 0 }, - {0, 2, 0, 0, 0 }, - {0, 0, 3, 0, 0 }, - {0, 0, 0, 4, 0 } - }; - - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - - diagonal = tensorConstructor.CreateFromArray(new[] { 1 }); - actual = Tensor.CreateFromDiagonal(diagonal, -4); - expected = new[,] - { - {0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0 }, - {1, 0, 0, 0, 0 } - }; - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - - diagonal = tensorConstructor.CreateFromArray(new[] { 1 }); - actual = Tensor.CreateFromDiagonal(diagonal, 4); - expected = new[,] - { - {0, 0, 0, 0, 1 }, - {0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0 }, - {0, 0, 0, 0, 0 } - }; - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - } - - [Theory] - [MemberData(nameof(GetSingleTensorConstructors))] - public void CreateWithDiagonalAndOffset3D(TensorConstructor tensorConstructor) - { - var diagonal = tensorConstructor.CreateFromArray(new[,] - { - { 1, 2, 3 }, - { 1, 2, 3 }, - { 1, 2, 3 } - }); - var actual = Tensor.CreateFromDiagonal(diagonal, 1); - - var expected = new[, ,] - { - { - { 0, 0, 0 }, - { 1, 2, 3 }, - { 0, 0, 0 }, - { 0, 0, 0 } - }, - { - { 0, 0, 0 }, - { 0, 0, 0 }, - { 1, 2, 3 }, - { 0, 0, 0 } - }, - { - { 0, 0, 0 }, - { 0, 0, 0 }, - { 0, 0, 0 }, - { 1, 2, 3 } - }, - { - { 0, 0, 0 }, - { 0, 0, 0 }, - { 0, 0, 0 }, - { 0, 0, 0 } - } - }; - - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - - diagonal = tensorConstructor.CreateFromArray(new[,] - { - { 1, 2, 3 }, - { 1, 2, 3 }, - { 1, 2, 3 } - }); - actual = Tensor.CreateFromDiagonal(diagonal, -1); - - expected = new[, ,] - { - { - { 0, 0, 0 }, - { 0, 0, 0 }, - { 0, 0, 0 }, - { 0, 0, 0 } - }, - { - { 1, 2, 3 }, - { 0, 0, 0 }, - { 0, 0, 0 }, - { 0, 0, 0 } - }, - { - { 0, 0, 0 }, - { 1, 2, 3 }, - { 0, 0, 0 }, - { 0, 0, 0 } - }, - { - { 0, 0, 0 }, - { 0, 0, 0 }, - { 1, 2, 3 }, - { 0, 0, 0 } - } - }; - - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - - diagonal = tensorConstructor.CreateFromArray(new[,] - { - { 1, 2, 3 } - }); - actual = Tensor.CreateFromDiagonal(diagonal, 3); - - expected = new[, ,] - { - { - { 0, 0, 0 }, - { 0, 0, 0 }, - { 0, 0, 0 }, - { 1, 2, 3 }, - }, - { - { 0, 0, 0 }, - { 0, 0, 0 }, - { 0, 0, 0 }, - { 0, 0, 0 } - }, - { - { 0, 0, 0 }, - { 0, 0, 0 }, - { 0, 0, 0 }, - { 0, 0, 0 } - }, - { - { 0, 0, 0 }, - { 0, 0, 0 }, - { 0, 0, 0 }, - { 0, 0, 0 } - } - }; - - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - - diagonal = tensorConstructor.CreateFromArray(new[,] - { - { 1, 2, 3 } - }); - actual = Tensor.CreateFromDiagonal(diagonal, -3); - - expected = new[, ,] - { - { - { 0, 0, 0 }, - { 0, 0, 0 }, - { 0, 0, 0 }, - { 0, 0, 0 }, - }, - { - { 0, 0, 0 }, - { 0, 0, 0 }, - { 0, 0, 0 }, - { 0, 0, 0 } - }, - { - { 0, 0, 0 }, - { 0, 0, 0 }, - { 0, 0, 0 }, - { 0, 0, 0 } - }, - { - { 1, 2, 3 }, - { 0, 0, 0 }, - { 0, 0, 0 }, - { 0, 0, 0 } - } - }; - - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - } - - [Theory()] - [MemberData(nameof(GetDualTensorConstructors))] - public void Add(TensorConstructor leftConstructor, TensorConstructor rightConstructor) - { - var left = leftConstructor.CreateFromArray( - new[,] - { - {0, 1, 2}, - {3, 4, 5} - }); - var right = rightConstructor.CreateFromArray( - new[,] - { - { 6, 7 ,8 }, - { 9, 10 ,11 }, - }); - - var expected = leftConstructor.CreateFromArray( - new[,] - { - { 6, 8, 10 }, - { 12, 14, 16 }, - }); - - var actual = TensorOperations.Add(left, right); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - Assert.Equal(leftConstructor.IsReversedStride, actual.IsReversedStride); - - } - - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void AddScalar(TensorConstructor tensorConstructor) - { - var tensor = tensorConstructor.CreateFromArray( - new[,] - { - {0, 1, 2}, - {3, 4, 5} - }); - - var expected = tensorConstructor.CreateFromArray( - new[,] - { - { 1, 2, 3 }, - { 4, 5, 6 }, - }); - - var actual = TensorOperations.Add(tensor, 1); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - Assert.Equal(tensorConstructor.IsReversedStride, actual.IsReversedStride); - - } - - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void UnaryPlus(TensorConstructor tensorConstructor) - { - var tensor = tensorConstructor.CreateFromArray( - new[,] - { - {0, 1, 2}, - {3, 4, 5} - }); - - var expected = tensor; - - var actual = TensorOperations.UnaryPlus(tensor); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - Assert.False(ReferenceEquals(actual, expected)); - Assert.Equal(tensorConstructor.IsReversedStride, actual.IsReversedStride); - } - - - [Theory()] - [MemberData(nameof(GetDualTensorConstructors))] - public void Subtract(TensorConstructor leftConstructor, TensorConstructor rightConstructor) - { - var left = leftConstructor.CreateFromArray( - new[,] - { - {0, 1, 2}, - {3, 4, 5} - }); - var right = rightConstructor.CreateFromArray( - new[,] - { - { 6, 7 ,8 }, - { 9, 10 ,11 }, - }); - - var expected = leftConstructor.CreateFromArray( - new[,] - { - { -6, -6, -6 }, - { -6, -6, -6}, - }); - - var actual = TensorOperations.Subtract(left, right); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - Assert.Equal(leftConstructor.IsReversedStride, actual.IsReversedStride); - } - - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void SubtractScalar(TensorConstructor tensorConstructor) - { - var tensor = tensorConstructor.CreateFromArray( - new[,] - { - {0, 1, 2}, - {3, 4, 5} - }); - var expected = tensorConstructor.CreateFromArray( - new[,] - { - { -1, 0, 1 }, - { 2, 3, 4 }, - }); - - var actual = TensorOperations.Subtract(tensor, 1); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - Assert.Equal(tensorConstructor.IsReversedStride, actual.IsReversedStride); - } - - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void UnaryMinus(TensorConstructor tensorConstructor) - { - var tensor = tensorConstructor.CreateFromArray( - new[,] - { - {0, 1, 2}, - {3, 4, 5} - }); - - var expected = tensorConstructor.CreateFromArray( - new[,] - { - {0, -1, -2}, - {-3, -4, -5} - }); - - var actual = TensorOperations.UnaryMinus(tensor); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - Assert.False(ReferenceEquals(actual, expected)); - Assert.Equal(tensorConstructor.IsReversedStride, actual.IsReversedStride); - } - - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void PrefixIncrement(TensorConstructor tensorConstructor) - { - Tensor tensor = tensorConstructor.CreateFromArray( - new[,] - { - {0, 1, 2}, - {3, 4, 5} - }); - - var expectedResult = tensorConstructor.CreateFromArray( - new[,] - { - {1, 2, 3}, - {4, 5, 6} - }); - - var expectedTensor = expectedResult; - - tensor = TensorOperations.Increment(tensor); - var actual = tensor; - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expectedResult)); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tensor, expectedTensor)); - Assert.True(ReferenceEquals(tensor, actual)); - Assert.Equal(tensorConstructor.IsReversedStride, actual.IsReversedStride); - } - - - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void PostfixIncrement(TensorConstructor tensorConstructor) - { - Tensor tensor = tensorConstructor.CreateFromArray( - new[,] - { - {0, 1, 2}, - {3, 4, 5} - }); - - // returns original value - var expectedResult = tensorConstructor.CreateFromArray( - new[,] - { - {0, 1, 2}, - {3, 4, 5} - }); - - // increments operand - var expectedTensor = tensorConstructor.CreateFromArray( - new[,] - { - {1, 2, 3}, - {4, 5, 6} - }); - - var actual = tensor; - tensor = TensorOperations.Increment(tensor); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expectedResult)); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tensor, expectedTensor)); - Assert.False(ReferenceEquals(tensor, actual)); - Assert.Equal(tensorConstructor.IsReversedStride, actual.IsReversedStride); - } - - - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void PrefixDecrement(TensorConstructor tensorConstructor) - { - Tensor tensor = tensorConstructor.CreateFromArray( - new[,] - { - {0, 1, 2}, - {3, 4, 5} - }); - - var expectedResult = tensorConstructor.CreateFromArray( - new[,] - { - {-1, 0, 1}, - {2, 3, 4} - }); - - var expectedTensor = expectedResult; - - tensor = TensorOperations.Decrement(tensor); - var actual = tensor; - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expectedResult)); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tensor, expectedTensor)); - Assert.True(ReferenceEquals(tensor, actual)); - Assert.Equal(tensorConstructor.IsReversedStride, actual.IsReversedStride); - } - - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void PostfixDecrement(TensorConstructor tensorConstructor) - { - Tensor tensor = tensorConstructor.CreateFromArray( - new[,] - { - {0, 1, 2}, - {3, 4, 5} - }); - - // returns original value - var expectedResult = tensorConstructor.CreateFromArray( - new[,] - { - {0, 1, 2}, - {3, 4, 5} - }); - - // decrements operand - var expectedTensor = tensorConstructor.CreateFromArray( - new[,] - { - {-1, 0, 1}, - {2, 3, 4} - }); - - var actual = tensor; - tensor = TensorOperations.Decrement(tensor); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expectedResult)); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(tensor, expectedTensor)); - Assert.False(ReferenceEquals(tensor, actual)); - Assert.Equal(tensorConstructor.IsReversedStride, actual.IsReversedStride); - } - - [Theory()] - [MemberData(nameof(GetDualTensorConstructors))] - public void Multiply(TensorConstructor leftConstructor, TensorConstructor rightConstructor) - { - var left = leftConstructor.CreateFromArray( - new[,] - { - {0, 1, 2}, - {3, 4, 5} - }); - var right = rightConstructor.CreateFromArray( - new[,] - { - {0, 1, 2}, - {3, 4, 5} - }); - - var expected = leftConstructor.CreateFromArray( - new[,] - { - {0, 1, 4}, - {9, 16, 25} - }); - - var actual = TensorOperations.Multiply(left, right); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - Assert.Equal(leftConstructor.IsReversedStride, actual.IsReversedStride); - } - - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void MultiplyScalar(TensorConstructor tensorConstructor) - { - var tensor = tensorConstructor.CreateFromArray( - new[,] - { - {0, 1, 2}, - {3, 4, 5} - }); - - var expected = tensorConstructor.CreateFromArray( - new[,] - { - {0, 2, 4}, - {6, 8, 10} - }); - - var actual = TensorOperations.Multiply(tensor, 2); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - Assert.Equal(tensorConstructor.IsReversedStride, actual.IsReversedStride); - } - - [Theory()] - [MemberData(nameof(GetDualTensorConstructors))] - public void Divide(TensorConstructor dividendConstructor, TensorConstructor divisorConstructor) - { - var dividend = dividendConstructor.CreateFromArray( - new[,] - { - {0, 1, 4}, - {9, 16, 25} - }); - - var divisor = divisorConstructor.CreateFromArray( - new[,] - { - {1, 1, 2}, - {3, 4, 5} - }); - - var expected = divisorConstructor.CreateFromArray( - new[,] - { - {0, 1, 2}, - {3, 4, 5} - }); - - var actual = TensorOperations.Divide(dividend, divisor); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - Assert.Equal(dividendConstructor.IsReversedStride, actual.IsReversedStride); - } - - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void DivideScalar(TensorConstructor tensorConstructor) - { - var tensor = tensorConstructor.CreateFromArray( - new[,] - { - {0, 2, 4}, - {6, 8, 10} - }); - - var expected = tensorConstructor.CreateFromArray( - new[,] - { - {0, 1, 2}, - {3, 4, 5} - }); - - var actual = TensorOperations.Divide(tensor, 2); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - Assert.Equal(tensorConstructor.IsReversedStride, actual.IsReversedStride); - } - - [Theory()] - [MemberData(nameof(GetDualTensorConstructors))] - public void Modulo(TensorConstructor dividendConstructor, TensorConstructor divisorConstructor) - { - var dividend = dividendConstructor.CreateFromArray( - new[,] - { - {0, 3, 8}, - {11, 14, 17} - }); - - var divisor = divisorConstructor.CreateFromArray( - new[,] - { - {1, 2, 3}, - {4, 5, 6} - }); - - var expected = dividendConstructor.CreateFromArray( - new[,] - { - {0, 1, 2}, - {3, 4, 5} - }); - - var actual = TensorOperations.Modulo(dividend, divisor); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - Assert.Equal(dividendConstructor.IsReversedStride, actual.IsReversedStride); - } - - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void ModuloScalar(TensorConstructor tensorConstructor) - { - var tensor = tensorConstructor.CreateFromArray( - new[,] - { - {0, 3, 4}, - {7, 8, 9} - }); - - var expected = tensorConstructor.CreateFromArray( - new[,] - { - {0, 1, 0}, - {1, 0, 1} - }); - - var actual = TensorOperations.Modulo(tensor, 2); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - Assert.Equal(tensorConstructor.IsReversedStride, actual.IsReversedStride); - } - - [Theory()] - [MemberData(nameof(GetDualTensorConstructors))] - public void And(TensorConstructor leftConstructor, TensorConstructor rightConstructor) - { - var left = leftConstructor.CreateFromArray( - new[,] - { - {0, 1, 3}, - {7, 15, 31} - }); - - var right = rightConstructor.CreateFromArray( - new[,] - { - {1, 1, 3}, - {2, 4, 8} - }); - - var expected = leftConstructor.CreateFromArray( - new[,] - { - {0, 1, 3}, - {2, 4, 8} - }); - - var actual = TensorOperations.And(left, right); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - Assert.Equal(leftConstructor.IsReversedStride, actual.IsReversedStride); - } - - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void AndScalar(TensorConstructor tensorConstructor) - { - var left = tensorConstructor.CreateFromArray( - new[,] - { - {0, 1, 3}, - {5, 15, 31} - }); - - var expected = tensorConstructor.CreateFromArray( - new[,] - { - {0, 0, 0}, - {4, 4, 20} - }); - - var actual = TensorOperations.And(left, 20); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - Assert.Equal(tensorConstructor.IsReversedStride, actual.IsReversedStride); - } - - [Theory()] - [MemberData(nameof(GetDualTensorConstructors))] - public void Or(TensorConstructor leftConstructor, TensorConstructor rightConstructor) - { - var left = leftConstructor.CreateFromArray( - new[,] - { - {0, 1, 3}, - {7, 14, 31} - }); - - var right = rightConstructor.CreateFromArray( - new[,] - { - {1, 2, 4}, - {2, 4, 8} - }); - - var expected = leftConstructor.CreateFromArray( - new[,] - { - {1, 3, 7}, - {7, 14, 31} - }); - - var actual = TensorOperations.Or(left, right); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - Assert.Equal(leftConstructor.IsReversedStride, actual.IsReversedStride); - } - - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void OrScalar(TensorConstructor tensorConstructor) - { - var left = tensorConstructor.CreateFromArray( - new[,] - { - {0, 1, 2}, - {3, 4, 5} - }); - - var expected = tensorConstructor.CreateFromArray( - new[,] - { - {1, 1, 3}, - {3, 5, 5} - }); - - var actual = TensorOperations.Or(left, 1); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - Assert.Equal(tensorConstructor.IsReversedStride, actual.IsReversedStride); - } - - [Theory()] - [MemberData(nameof(GetDualTensorConstructors))] - public void Xor(TensorConstructor leftConstructor, TensorConstructor rightConstructor) - { - var left = leftConstructor.CreateFromArray( - new[,] - { - {0, 1, 3}, - {7, 14, 31} - }); - - var right = rightConstructor.CreateFromArray( - new[,] - { - {1, 2, 4}, - {2, 4, 8} - }); - - var expected = leftConstructor.CreateFromArray( - new[,] - { - {1, 3, 7}, - {5, 10, 23} - }); - - var actual = TensorOperations.Xor(left, right); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - Assert.Equal(leftConstructor.IsReversedStride, actual.IsReversedStride); - } - - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void XorScalar(TensorConstructor tensorConstructor) - { - var left = tensorConstructor.CreateFromArray( - new[,] - { - {0, 1, 2}, - {3, 4, 5} - }); - - var expected = tensorConstructor.CreateFromArray( - new[,] - { - {1, 0, 3}, - {2, 5, 4} - }); - - var actual = TensorOperations.Xor(left, 1); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - Assert.Equal(tensorConstructor.IsReversedStride, actual.IsReversedStride); - } - - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void LeftShift(TensorConstructor tensorConstructor) - { - var left = tensorConstructor.CreateFromArray( - new[,] - { - {0, 1, 2}, - {3, 4, 5} - }); - - var expected = tensorConstructor.CreateFromArray( - new[,] - { - {0, 2, 4}, - {6, 8, 10} - }); - - var actual = TensorOperations.LeftShift(left, 1); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - Assert.Equal(tensorConstructor.IsReversedStride, actual.IsReversedStride); - } - - [Theory()] - [MemberData(nameof(GetSingleTensorConstructors))] - public void RightShift(TensorConstructor tensorConstructor) - { - var left = tensorConstructor.CreateFromArray( - new[,] - { - {0, 1, 2}, - {3, 4, 5} - }); - - var expected = tensorConstructor.CreateFromArray( - new[,] - { - {0, 0, 1}, - {1, 2, 2} - }); - - var actual = TensorOperations.RightShift(left, 1); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - Assert.Equal(tensorConstructor.IsReversedStride, actual.IsReversedStride); - } - - [Theory()] - [MemberData(nameof(GetDualTensorConstructors))] - public void ElementWiseEquals(TensorConstructor leftConstructor, TensorConstructor rightConstructor) - { - var left = leftConstructor.CreateFromArray( - new[,] - { - {0, 1, 2}, - {3, 4, 5} - }); - var right = rightConstructor.CreateFromArray( - new[,] - { - {0, 1, -2}, - {2, 3, 5} - }); - - var expected = new[,] - { - {true, true, false }, - {false, false, true} - }.ToTensor(); - - var actual = TensorOperations.Equals(left, right); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - Assert.Equal(leftConstructor.IsReversedStride, actual.IsReversedStride); - } - - [Theory()] - [MemberData(nameof(GetDualTensorConstructors))] - public void ElementWiseNotEquals(TensorConstructor leftConstructor, TensorConstructor rightConstructor) - { - var left = leftConstructor.CreateFromArray( - new[,] - { - {0, 1, 2}, - {3, 4, 5} - }); - var right = rightConstructor.CreateFromArray( - new[,] - { - {0, 1, -2}, - {2, 3, 5} - }); - - var expected = new[,] - { - {false, false, true}, - {true, true, false} - }.ToTensor(); - - var actual = TensorOperations.NotEquals(left, right); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - Assert.Equal(leftConstructor.IsReversedStride, actual.IsReversedStride); - } - - [Theory] - [MemberData(nameof(GetDualTensorConstructors))] - public void MatrixMultiply(TensorConstructor leftConstructor, TensorConstructor rightConstructor) - { - var left = leftConstructor.CreateFromArray( - new[,] - { - {0, 1, 2}, - {3, 4, 5} - }); - - var right = rightConstructor.CreateFromArray( - new[,] - { - {0, 1, 2, 3, 4}, - {5, 6, 7, 8, 9}, - {10, 11, 12, 13, 14} - }); - - var expected = leftConstructor.CreateFromArray( - new[,] - { - {0*0 + 1*5 + 2*10, 0*1 + 1*6 + 2*11, 0*2 + 1*7 + 2*12, 0*3 + 1*8 + 2*13, 0*4 + 1*9 + 2*14}, - {3*0 + 4*5 + 5*10, 3*1 + 4*6 + 5*11, 3*2 + 4*7 + 5*12, 3*3 + 4*8 + 5*13, 3*4 + 4*9 + 5*14} - }); - - var actual = left.MatrixMultiply(right); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - } - - - [Theory] - [MemberData(nameof(GetDualTensorConstructors))] - public void Contract(TensorConstructor leftConstructor, TensorConstructor rightConstructor) - { - var left = leftConstructor.CreateFromArray( - new[, ,] - { - { - {0, 1}, - {2, 3} - }, - { - {4, 5}, - {6, 7} - }, - { - {8, 9}, - {10, 11} - } - }); - - var right = rightConstructor.CreateFromArray( - new[, ,] - { - { - {0, 1}, - {2, 3}, - {4, 5} - }, - { - {6, 7}, - {8, 9}, - {10, 11} - }, - { - {12, 13}, - {14, 15}, - {16, 17} - }, - { - {18, 19}, - {20, 21}, - {22, 23} - } - }); - - // contract a 3*2*2 with a 4*3*2 tensor, summing on (3*2)*2 and 4*(3*2) to produce a 2*4 tensor - var expected = leftConstructor.CreateFromArray( - new[,] - { - {110, 290, 470, 650}, - {125, 341, 557, 773}, - }); - var actual = TensorOperations.Contract(left, right, new[] { 0, 1 }, new[] { 1, 2 }); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - - // contract a 3*2*2 with a 4*3*2 tensor, summing on (3)*2*(2) and 4*(3*2) to produce a 2*4 tensor - expected = leftConstructor.CreateFromArray( - new[,] - { - {101, 263, 425, 587}, - {131, 365, 599, 833}, - }); - actual = TensorOperations.Contract(left, right, new[] { 0, 2 }, new[] { 1, 2 }); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - } - - - [Theory] - [MemberData(nameof(GetDualTensorConstructors))] - public void ContractWithSingleLengthDimension(TensorConstructor leftConstructor, TensorConstructor rightConstructor) - { - var left = leftConstructor.CreateFromArray( - new[,] - { - {1, 2, 3}, - {4, 5, 6}, - }); - - var right = rightConstructor.CreateFromArray( - new[,] - { - { 1, 2 }, - { 3, 4 }, - { 5, 6 } - }); - - var expected = leftConstructor.CreateFromArray( - new[,] - { - { 22, 28 }, - { 49, 64 } - }); - - // contract a 2*3 with a 3*2 tensor, summing on 2*(3) and (3)*2 to produce a 2*2 tensor - var actual = TensorOperations.Contract(left, right, new[] { 1 }, new[] { 0 }); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - - // contract a 1*2*3*1 with a 3*2 tensor, summing on 1*2*(3)*1 and (3)*2 to produce a 1*2*1*2 tensor - var reshapedLeft = left.Reshape(new int[] { 1, 2, 3, 1 }); - var reshapedExpected = expected.Reshape(new int[] { 1, 2, 1, 2 }); - actual = TensorOperations.Contract(reshapedLeft, right, new[] { 2 }, new[] { 0 }); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, reshapedExpected)); - - } - - [Theory] - [MemberData(nameof(GetDualTensorConstructors))] - public void ContractMismatchedDimensions(TensorConstructor leftConstructor, TensorConstructor rightConstructor) - { - var left = leftConstructor.CreateFromArray( - new[] { 0, 1, 2, 3 }); - - var right = rightConstructor.CreateFromArray( - new[,] - { - { 0 }, - { 1 }, - { 2 } - }); - - var expected = leftConstructor.CreateFromArray( - new[,] - { - {0,0,0}, - {0,1,2}, - {0,2,4}, - {0,3,6}, - }); - - Assert.Throws(() => TensorOperations.Contract(left, right, new int[] { }, new[] { 1 })); - - // reshape to include dimension of length 1. - var leftReshaped = left.Reshape(new[] { 1, (int)left.Length }); - - var actual = TensorOperations.Contract(leftReshaped, right, new[] { 0 }, new[] { 1 }); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - } - - [Theory] - [MemberData(nameof(GetSingleTensorConstructors))] - public void GetArrayString(TensorConstructor constructor) - { - var tensor = constructor.CreateFromArray( - new[, ,] - { - { - {0, 1}, - {2, 3}, - {4, 5} - }, - { - {6, 7}, - {8, 9}, - {10, 11} - }, - { - {12, 13}, - {14, 15}, - {16, 17} - }, - { - {18, 19}, - {20, 21}, - {22, 23} - } - }); - - var expected = -@"{ - { - {0,1}, - {2,3}, - {4,5} - }, - { - {6,7}, - {8,9}, - {10,11} - }, - { - {12,13}, - {14,15}, - {16,17} - }, - { - {18,19}, - {20,21}, - {22,23} - } -}"; - - Assert.Equal(expected, tensor.GetArrayString(), ignoreLineEndingDifferences: !LineEndingsHelper.IsNewLineConsistent); - - var expectedNoSpace = expected.Replace(LineEndingsHelper.CompiledNewline, "").Replace(" ", ""); - Assert.Equal(expectedNoSpace, tensor.GetArrayString(false)); - } - - [Theory] - [MemberData(nameof(GetTensorAndResultConstructor))] - public void ToOtherTensor(TensorConstructor sourceConstructor, TensorConstructor resultConstructor) - { - var array = new[, ,] - { - { - {0, 1, 0, 0 }, - {0, 0, 0, 9 }, - {2, 0, 5, 0 } - }, - { - {3, 0, 0, 6 }, - {0, 0, 0, 0 }, - {0, 0, 4, 0 } - }, - { - {0, 2, 0, 0 }, - {8, 0, 0, 0 }, - {0, 0, 12, 0 } - }, - { - {5, 5, 5, 0 }, - {0, 0, 0, 15 }, - {0, 0, 42, 0 } - }, - { - {1, 0, 0, 4 }, - {0, 2, 0, 0 }, - {0, 0, 3, 0 } - } - }; - - var source = sourceConstructor.CreateFromArray(array); - - Tensor expected = resultConstructor.CreateFromArray(array); - - Tensor actual; - - switch (resultConstructor.TensorType) - { - case TensorType.Dense: - actual = source.ToDenseTensor(); - break; - case TensorType.Sparse: - var actualSparse = source.ToSparseTensor(); - actual = actualSparse; - var expectedSparse = expected as SparseTensor; - Assert.Equal(expectedSparse.NonZeroCount, actualSparse.NonZeroCount); - break; - case TensorType.CompressedSparse: - var actualCompressedSparse = source.ToCompressedSparseTensor(); - actual = actualCompressedSparse; - var expectedCompressedSparse = expected as CompressedSparseTensor; - Assert.Equal(expectedCompressedSparse.NonZeroCount, actualCompressedSparse.NonZeroCount); - if (sourceConstructor.TensorType != TensorType.Dense) - { - // expect packed values when going from sparse -> sparse - Assert.Equal(actualCompressedSparse.NonZeroCount, actualCompressedSparse.Values.Length); - } - break; - default: - throw new ArgumentException(nameof(resultConstructor.TensorType)); - } - - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, expected)); - Assert.True(StructuralComparisons.StructuralEqualityComparer.Equals(actual, source)); - } - - [Theory] - [MemberData(nameof(GetSingleTensorConstructors))] - public void TestICollectionMembers(TensorConstructor constructor) - { - var arr = new[,] - { - { 1, 2, 3 }, - { 4, 5, 6 } - }; - - var tensor = constructor.CreateFromArray(arr); - ICollection tensorCollection = tensor; - - Assert.Equal(6, tensorCollection.Count); - - Assert.False(tensorCollection.IsSynchronized); - - Assert.True(ReferenceEquals(tensorCollection, tensorCollection.SyncRoot)); - - var actual = Array.CreateInstance(typeof(int), tensor.Length); - tensorCollection.CopyTo(actual, 0); - var expected = constructor.IsReversedStride ? - new[] { 1, 4, 2, 5, 3, 6 } : - new[] { 1, 2, 3, 4, 5, 6 }; - Assert.Equal(expected, actual); - - actual = Array.CreateInstance(typeof(int), tensor.Length + 2); - tensorCollection.CopyTo(actual, 2); - expected = constructor.IsReversedStride ? - new[] { 0, 0, 1, 4, 2, 5, 3, 6 } : - new[] { 0, 0, 1, 2, 3, 4, 5, 6 }; - Assert.Equal(expected, actual); - - Assert.Throws(() => tensorCollection.CopyTo(null, 0)); - Assert.Throws(() => tensorCollection.CopyTo(new int[3, 4], 0)); - Assert.Throws(() => tensorCollection.CopyTo(new int[5], 0)); - Assert.Throws(() => tensorCollection.CopyTo(new int[6], 1)); - } - - [Theory] - [MemberData(nameof(GetSingleTensorConstructors))] - public void TestIListMembers(TensorConstructor constructor) - { - var arr = new[,] - { - { 1, 2, 3 }, - { 4, 5, 6 } - }; - - var tensor = constructor.CreateFromArray(arr); - IList tensorList = tensor; - - int expectedIndexValue = constructor.IsReversedStride ? 4 : 2; - Assert.Equal(expectedIndexValue, tensorList[1]); - - tensorList[1] = 7; - Assert.Equal(7, tensorList[1]); - var expected = constructor.IsReversedStride ? - new[] { 1, 7, 2, 5, 3, 6 } : - new[] { 1, 7, 3, 4, 5, 6 }; - Assert.Equal(expected, tensor); - - Assert.True(tensorList.IsFixedSize); - Assert.False(tensorList.IsReadOnly); - - Assert.Throws(() => (tensorList).Add(8)); - - Assert.True(tensorList.Contains(5)); - Assert.True(tensorList.Contains(6)); - Assert.False(tensorList.Contains(0)); - Assert.False(tensorList.Contains(42)); - Assert.False(tensorList.Contains("foo")); - - Assert.Equal(constructor.IsReversedStride ? 3 : 4, tensorList.IndexOf(5)); - Assert.Equal(5, tensorList.IndexOf(6)); - Assert.Equal(-1, tensorList.IndexOf(0)); - Assert.Equal(-1, tensorList.IndexOf(42)); - - Assert.Throws(() => (tensorList).Insert(2, 5)); - Assert.Throws(() => (tensorList).Remove(1)); - Assert.Throws(() => (tensorList).RemoveAt(0)); - - tensorList.Clear(); - Assert.Equal(new[] { 0, 0, 0, 0, 0, 0 }, tensor); - } - - [Theory] - [MemberData(nameof(GetSingleTensorConstructors))] - public void TestICollectionTMembers(TensorConstructor constructor) - { - var arr = new[,] - { - { 1, 2, 3 }, - { 4, 5, 6 } - }; - - var tensor = constructor.CreateFromArray(arr); - ICollection tensorCollection = tensor; - - Assert.Equal(6, tensorCollection.Count); - Assert.False(tensorCollection.IsReadOnly); - - Assert.Throws(() => tensorCollection.Add(8)); - Assert.Throws(() => tensorCollection.Remove(1)); - - Assert.True(tensorCollection.Contains(5)); - Assert.True(tensorCollection.Contains(6)); - Assert.False(tensorCollection.Contains(0)); - Assert.False(tensorCollection.Contains(42)); - - var actual = new int[tensor.Length]; - tensorCollection.CopyTo(actual, 0); - var expected = constructor.IsReversedStride ? - new[] { 1, 4, 2, 5, 3, 6 } : - new[] { 1, 2, 3, 4, 5, 6 }; - Assert.Equal(expected, actual); - - actual = new int[tensor.Length + 2]; - tensorCollection.CopyTo(actual, 2); - expected = constructor.IsReversedStride ? - new[] { 0, 0, 1, 4, 2, 5, 3, 6 } : - new[] { 0, 0, 1, 2, 3, 4, 5, 6 }; - Assert.Equal(expected, actual); - - Assert.Throws(() => tensorCollection.CopyTo(null, 0)); - Assert.Throws(() => tensorCollection.CopyTo(new int[5], 0)); - Assert.Throws(() => tensorCollection.CopyTo(new int[6], 1)); - - tensorCollection.Clear(); - Assert.Equal(new[] { 0, 0, 0, 0, 0, 0 }, tensor); - } - - [Theory] - [MemberData(nameof(GetSingleTensorConstructors))] - public void TestIListTMembers(TensorConstructor constructor) - { - var arr = new[,] - { - { 1, 2, 3 }, - { 4, 5, 6 } - }; - - var tensor = constructor.CreateFromArray(arr); - IList tensorList = tensor; - - int expectedIndexValue = constructor.IsReversedStride ? 4 : 2; - Assert.Equal(expectedIndexValue, tensorList[1]); - - tensorList[1] = 7; - Assert.Equal(7, tensorList[1]); - var expected = constructor.IsReversedStride ? - new[] { 1, 7, 2, 5, 3, 6 } : - new[] { 1, 7, 3, 4, 5, 6 }; - Assert.Equal(expected, tensor); - - Assert.Equal(constructor.IsReversedStride ? 3 : 4, tensorList.IndexOf(5)); - Assert.Equal(5, tensorList.IndexOf(6)); - Assert.Equal(-1, tensorList.IndexOf(0)); - Assert.Equal(-1, tensorList.IndexOf(42)); - - Assert.Throws(() => (tensorList).Insert(2, 5)); - Assert.Throws(() => (tensorList).RemoveAt(0)); - } - - [Theory] - [MemberData(nameof(GetSingleTensorConstructors))] - public void TestIReadOnlyTMembers(TensorConstructor constructor) - { - var arr = new[,] - { - { 1, 2, 3 }, - { 4, 5, 6 } - }; - - var tensor = constructor.CreateFromArray(arr); - - IReadOnlyCollection tensorCollection = tensor; - Assert.Equal(6, tensorCollection.Count); - - IReadOnlyList tensorList = tensor; - int expectedIndexValue = constructor.IsReversedStride ? 4 : 2; - Assert.Equal(expectedIndexValue, tensorList[1]); - } - - [Theory] - [MemberData(nameof(GetConstructedTensors))] - public void TestGetEnumerator(Tensor tensor) - { - static IEnumerable GetExpected(Tensor tensor) - { - for (int index = 0; index < tensor.Length; ++index) - yield return tensor.GetValue(index); - } - - Assert.Equal(GetExpected(tensor), tensor); - } - - [Theory] - [MemberData(nameof(GetConstructedTensors))] - public void TestEnumeratorReset(Tensor tensor) - { - static long AdvanceEnumerator(ref Tensor.Enumerator enumerator, long maxCount) - { - long count = 0; - while (count < maxCount && enumerator.MoveNext()) - count++; - - return count; - } - - static void TestStepCountIfInRange(Tensor tensor, long stepCount) - { - if (stepCount < 0 || stepCount > tensor.Length) - return; - - var enumerator = tensor.GetEnumerator(); - long actualStepCount = AdvanceEnumerator(ref enumerator, stepCount); - - Assert.Equal(stepCount, actualStepCount); - - enumerator.Reset(); - - var itemsPostReset = new List(); - while (enumerator.MoveNext()) - itemsPostReset.Add(enumerator.Current); - - Assert.Equal(tensor, itemsPostReset); - } - - TestStepCountIfInRange(tensor, 1); - TestStepCountIfInRange(tensor, tensor.Length - 1); - TestStepCountIfInRange(tensor, tensor.Length / 4); - TestStepCountIfInRange(tensor, tensor.Length - tensor.Length / 4); - TestStepCountIfInRange(tensor, tensor.Length / 2); - TestStepCountIfInRange(tensor, tensor.Length); - } - - [Theory] - [MemberData(nameof(GetConstructedTensors))] - public void TestEnumeratorDispose_DoesNotThrow(Tensor tensor) - { - var enumerator = tensor.GetEnumerator(); - - enumerator.Dispose(); - enumerator.Dispose(); - } - } -} diff --git a/src/libraries/System.Numerics.Tensors/tests/TensorTestsBase.cs b/src/libraries/System.Numerics.Tensors/tests/TensorTestsBase.cs deleted file mode 100644 index 9774dd22662e6a..00000000000000 --- a/src/libraries/System.Numerics.Tensors/tests/TensorTestsBase.cs +++ /dev/null @@ -1,187 +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.Generic; -using System.Linq; - -namespace System.Numerics.Tensors.Tests -{ - public class TensorTestsBase - { - public enum TensorType - { - Dense, - Sparse, - CompressedSparse - }; - - public class TensorConstructor - { - public TensorType TensorType { get; set; } - - public bool IsReversedStride { get; set; } - - public Tensor CreateFromArray(Array array) - { - switch (TensorType) - { - case TensorType.Dense: - return array.ToTensor(IsReversedStride); - case TensorType.Sparse: - return array.ToSparseTensor(IsReversedStride); - case TensorType.CompressedSparse: - return array.ToCompressedSparseTensor(IsReversedStride); - } - - throw new ArgumentException(nameof(TensorType)); - } - public Tensor CreateFromDimensions(ReadOnlySpan dimensions) - { - switch (TensorType) - { - case TensorType.Dense: - return new DenseTensor(dimensions, IsReversedStride); - case TensorType.Sparse: - return new SparseTensor(dimensions, IsReversedStride); - case TensorType.CompressedSparse: - return new CompressedSparseTensor(dimensions, IsReversedStride); - } - - throw new ArgumentException(nameof(TensorType)); - } - - public override string ToString() - { - return $"{TensorType}, {nameof(IsReversedStride)} = {IsReversedStride}"; - } - } - - private static TensorType[] s_tensorTypes = new[] - { - TensorType.Dense, - TensorType.Sparse, - TensorType.CompressedSparse - }; - - private static bool[] s_reverseStrideValues = new[] - { - false, - true - }; - - public static IEnumerable GetSingleTensorConstructors() - { - foreach (TensorType tensorType in s_tensorTypes) - { - foreach (bool isReversedStride in s_reverseStrideValues) - { - yield return new[] - { - new TensorConstructor() - { - TensorType = tensorType, - IsReversedStride = isReversedStride - } - }; - } - } - } - - public static IEnumerable GetDualTensorConstructors() - { - foreach (TensorType leftTensorType in s_tensorTypes) - { - foreach (TensorType rightTensorType in s_tensorTypes) - { - foreach (bool isLeftReversedStride in s_reverseStrideValues) - { - foreach (bool isRightReversedStride in s_reverseStrideValues) - { - yield return new[] - { - new TensorConstructor() - { - TensorType = leftTensorType, - IsReversedStride = isLeftReversedStride - }, - new TensorConstructor() - { - TensorType = rightTensorType, - IsReversedStride = isRightReversedStride - } - }; - } - } - } - } - } - - public static IEnumerable GetTensorAndResultConstructor() - { - foreach (TensorType leftTensorType in s_tensorTypes) - { - foreach (TensorType rightTensorType in s_tensorTypes) - { - foreach (bool isReversedStride in s_reverseStrideValues) - { - yield return new[] - { - new TensorConstructor() - { - TensorType = leftTensorType, - IsReversedStride = isReversedStride - }, - new TensorConstructor() - { - TensorType = rightTensorType, - IsReversedStride = isReversedStride - } - }; - } - } - } - } - - public static IEnumerable GetConstructedTensors() - { - foreach (var ctor in GetSingleTensorConstructors().Select(x => (TensorConstructor)x[0])) - { - yield return new object[] { ctor.CreateFromArray(Array.Empty()) }; - yield return new object[] { ctor.CreateFromArray(new[] { 7 }) }; - yield return new object[] { ctor.CreateFromArray(new[] { 7, 14 }) }; - yield return new object[] { ctor.CreateFromArray(new[] { 7, 14, 21 }) }; - yield return new object[] - { - ctor.CreateFromArray(new[,] - { - { 3, 6, 9 }, - { 5, 10, 15 }, - { 7, 14, 21 }, - { 11, 22, 33 } - }) - }; - } - } - - public static NativeMemory NativeMemoryFromArray(T[] array) - { - return NativeMemoryFromArray((Array)array); - } - - public static NativeMemory NativeMemoryFromArray(Array array) - { - // this silly method takes a managed array and copies it over to unmanaged memory, - // **only for test purposes** - - var memory = NativeMemory.Allocate(array.Length); - var span = memory.GetSpan(); - int index = 0; - foreach (T item in array) - { - span[index++] = item; - } - - return memory; - } - } -} diff --git a/src/libraries/System.Numerics.Vectors/System.Numerics.Vectors.sln b/src/libraries/System.Numerics.Vectors/System.Numerics.Vectors.sln index 57db262068d543..148f7e813c4c1b 100644 --- a/src/libraries/System.Numerics.Vectors/System.Numerics.Vectors.sln +++ b/src/libraries/System.Numerics.Vectors/System.Numerics.Vectors.sln @@ -19,14 +19,34 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{728E34E5-10B0-4181-940B-EB3FB7784DFA}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{FC10C682-DF71-4EEA-A3A5-E716C1C88AC0}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{49B6B26B-CEC6-4EE8-8177-47891A85518A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{69A926A1-F426-4501-8641-84B10BF0C698}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{E3DB94BA-35EE-4D66-9958-B22D73A43943}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{128E84CD-654A-44E5-B4D7-7F5D7A9E6341}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{79CFC9F5-5B4B-4B29-9EBD-1A2FA2D6325A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{C3847F2F-603E-467F-99C3-A4B619E25544}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{2C4425BA-8478-4BCB-B616-E6FC28ADEAB9}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{ED90FF1C-59D4-4AB0-860E-2872ECA1BFEC}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{FC10C682-DF71-4EEA-A3A5-E716C1C88AC0}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{38837FDE-8CFE-4676-B3CE-48165E0FD6CF}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{06497322-6B9A-48E6-BEA8-C96362AD7180}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{E40BE5C0-684A-424B-B41A-2E9FDA893718}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{0F563BE9-8226-4DB5-A42D-3AB163BDF92D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{8E7812D8-8284-4449-92BE-3216F9E141B5}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -265,21 +285,134 @@ Global {728E34E5-10B0-4181-940B-EB3FB7784DFA}.Checked|arm64.ActiveCfg = Debug|Any CPU {728E34E5-10B0-4181-940B-EB3FB7784DFA}.Checked|x64.ActiveCfg = Debug|Any CPU {728E34E5-10B0-4181-940B-EB3FB7784DFA}.Checked|x86.ActiveCfg = Debug|Any CPU + {49B6B26B-CEC6-4EE8-8177-47891A85518A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {49B6B26B-CEC6-4EE8-8177-47891A85518A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {49B6B26B-CEC6-4EE8-8177-47891A85518A}.Debug|arm.ActiveCfg = Debug|Any CPU + {49B6B26B-CEC6-4EE8-8177-47891A85518A}.Debug|arm64.ActiveCfg = Debug|Any CPU + {49B6B26B-CEC6-4EE8-8177-47891A85518A}.Debug|x64.ActiveCfg = Debug|Any CPU + {49B6B26B-CEC6-4EE8-8177-47891A85518A}.Debug|x64.Build.0 = Debug|Any CPU + {49B6B26B-CEC6-4EE8-8177-47891A85518A}.Debug|x86.ActiveCfg = Debug|Any CPU + {49B6B26B-CEC6-4EE8-8177-47891A85518A}.Debug|x86.Build.0 = Debug|Any CPU + {49B6B26B-CEC6-4EE8-8177-47891A85518A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {49B6B26B-CEC6-4EE8-8177-47891A85518A}.Release|Any CPU.Build.0 = Release|Any CPU + {49B6B26B-CEC6-4EE8-8177-47891A85518A}.Release|arm.ActiveCfg = Release|Any CPU + {49B6B26B-CEC6-4EE8-8177-47891A85518A}.Release|arm64.ActiveCfg = Release|Any CPU + {49B6B26B-CEC6-4EE8-8177-47891A85518A}.Release|x64.ActiveCfg = Release|Any CPU + {49B6B26B-CEC6-4EE8-8177-47891A85518A}.Release|x64.Build.0 = Release|Any CPU + {49B6B26B-CEC6-4EE8-8177-47891A85518A}.Release|x86.ActiveCfg = Release|Any CPU + {49B6B26B-CEC6-4EE8-8177-47891A85518A}.Release|x86.Build.0 = Release|Any CPU + {49B6B26B-CEC6-4EE8-8177-47891A85518A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {49B6B26B-CEC6-4EE8-8177-47891A85518A}.Checked|arm.ActiveCfg = Debug|Any CPU + {49B6B26B-CEC6-4EE8-8177-47891A85518A}.Checked|arm64.ActiveCfg = Debug|Any CPU + {49B6B26B-CEC6-4EE8-8177-47891A85518A}.Checked|x64.ActiveCfg = Debug|Any CPU + {49B6B26B-CEC6-4EE8-8177-47891A85518A}.Checked|x86.ActiveCfg = Debug|Any CPU + {69A926A1-F426-4501-8641-84B10BF0C698}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {69A926A1-F426-4501-8641-84B10BF0C698}.Debug|Any CPU.Build.0 = Debug|Any CPU + {69A926A1-F426-4501-8641-84B10BF0C698}.Debug|arm.ActiveCfg = Debug|Any CPU + {69A926A1-F426-4501-8641-84B10BF0C698}.Debug|arm64.ActiveCfg = Debug|Any CPU + {69A926A1-F426-4501-8641-84B10BF0C698}.Debug|x64.ActiveCfg = Debug|Any CPU + {69A926A1-F426-4501-8641-84B10BF0C698}.Debug|x64.Build.0 = Debug|Any CPU + {69A926A1-F426-4501-8641-84B10BF0C698}.Debug|x86.ActiveCfg = Debug|Any CPU + {69A926A1-F426-4501-8641-84B10BF0C698}.Debug|x86.Build.0 = Debug|Any CPU + {69A926A1-F426-4501-8641-84B10BF0C698}.Release|Any CPU.ActiveCfg = Release|Any CPU + {69A926A1-F426-4501-8641-84B10BF0C698}.Release|Any CPU.Build.0 = Release|Any CPU + {69A926A1-F426-4501-8641-84B10BF0C698}.Release|arm.ActiveCfg = Release|Any CPU + {69A926A1-F426-4501-8641-84B10BF0C698}.Release|arm64.ActiveCfg = Release|Any CPU + {69A926A1-F426-4501-8641-84B10BF0C698}.Release|x64.ActiveCfg = Release|Any CPU + {69A926A1-F426-4501-8641-84B10BF0C698}.Release|x64.Build.0 = Release|Any CPU + {69A926A1-F426-4501-8641-84B10BF0C698}.Release|x86.ActiveCfg = Release|Any CPU + {69A926A1-F426-4501-8641-84B10BF0C698}.Release|x86.Build.0 = Release|Any CPU + {69A926A1-F426-4501-8641-84B10BF0C698}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {69A926A1-F426-4501-8641-84B10BF0C698}.Checked|arm.ActiveCfg = Debug|Any CPU + {69A926A1-F426-4501-8641-84B10BF0C698}.Checked|arm64.ActiveCfg = Debug|Any CPU + {69A926A1-F426-4501-8641-84B10BF0C698}.Checked|x64.ActiveCfg = Debug|Any CPU + {69A926A1-F426-4501-8641-84B10BF0C698}.Checked|x86.ActiveCfg = Debug|Any CPU + {E3DB94BA-35EE-4D66-9958-B22D73A43943}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E3DB94BA-35EE-4D66-9958-B22D73A43943}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E3DB94BA-35EE-4D66-9958-B22D73A43943}.Debug|arm.ActiveCfg = Debug|Any CPU + {E3DB94BA-35EE-4D66-9958-B22D73A43943}.Debug|arm64.ActiveCfg = Debug|Any CPU + {E3DB94BA-35EE-4D66-9958-B22D73A43943}.Debug|x64.ActiveCfg = Debug|Any CPU + {E3DB94BA-35EE-4D66-9958-B22D73A43943}.Debug|x64.Build.0 = Debug|Any CPU + {E3DB94BA-35EE-4D66-9958-B22D73A43943}.Debug|x86.ActiveCfg = Debug|Any CPU + {E3DB94BA-35EE-4D66-9958-B22D73A43943}.Debug|x86.Build.0 = Debug|Any CPU + {E3DB94BA-35EE-4D66-9958-B22D73A43943}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E3DB94BA-35EE-4D66-9958-B22D73A43943}.Release|Any CPU.Build.0 = Release|Any CPU + {E3DB94BA-35EE-4D66-9958-B22D73A43943}.Release|arm.ActiveCfg = Release|Any CPU + {E3DB94BA-35EE-4D66-9958-B22D73A43943}.Release|arm64.ActiveCfg = Release|Any CPU + {E3DB94BA-35EE-4D66-9958-B22D73A43943}.Release|x64.ActiveCfg = Release|Any CPU + {E3DB94BA-35EE-4D66-9958-B22D73A43943}.Release|x64.Build.0 = Release|Any CPU + {E3DB94BA-35EE-4D66-9958-B22D73A43943}.Release|x86.ActiveCfg = Release|Any CPU + {E3DB94BA-35EE-4D66-9958-B22D73A43943}.Release|x86.Build.0 = Release|Any CPU + {E3DB94BA-35EE-4D66-9958-B22D73A43943}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {E3DB94BA-35EE-4D66-9958-B22D73A43943}.Checked|arm.ActiveCfg = Debug|Any CPU + {E3DB94BA-35EE-4D66-9958-B22D73A43943}.Checked|arm64.ActiveCfg = Debug|Any CPU + {E3DB94BA-35EE-4D66-9958-B22D73A43943}.Checked|x64.ActiveCfg = Debug|Any CPU + {E3DB94BA-35EE-4D66-9958-B22D73A43943}.Checked|x86.ActiveCfg = Debug|Any CPU + {128E84CD-654A-44E5-B4D7-7F5D7A9E6341}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {128E84CD-654A-44E5-B4D7-7F5D7A9E6341}.Debug|Any CPU.Build.0 = Debug|Any CPU + {128E84CD-654A-44E5-B4D7-7F5D7A9E6341}.Debug|arm.ActiveCfg = Debug|Any CPU + {128E84CD-654A-44E5-B4D7-7F5D7A9E6341}.Debug|arm64.ActiveCfg = Debug|Any CPU + {128E84CD-654A-44E5-B4D7-7F5D7A9E6341}.Debug|x64.ActiveCfg = Debug|Any CPU + {128E84CD-654A-44E5-B4D7-7F5D7A9E6341}.Debug|x64.Build.0 = Debug|Any CPU + {128E84CD-654A-44E5-B4D7-7F5D7A9E6341}.Debug|x86.ActiveCfg = Debug|Any CPU + {128E84CD-654A-44E5-B4D7-7F5D7A9E6341}.Debug|x86.Build.0 = Debug|Any CPU + {128E84CD-654A-44E5-B4D7-7F5D7A9E6341}.Release|Any CPU.ActiveCfg = Release|Any CPU + {128E84CD-654A-44E5-B4D7-7F5D7A9E6341}.Release|Any CPU.Build.0 = Release|Any CPU + {128E84CD-654A-44E5-B4D7-7F5D7A9E6341}.Release|arm.ActiveCfg = Release|Any CPU + {128E84CD-654A-44E5-B4D7-7F5D7A9E6341}.Release|arm64.ActiveCfg = Release|Any CPU + {128E84CD-654A-44E5-B4D7-7F5D7A9E6341}.Release|x64.ActiveCfg = Release|Any CPU + {128E84CD-654A-44E5-B4D7-7F5D7A9E6341}.Release|x64.Build.0 = Release|Any CPU + {128E84CD-654A-44E5-B4D7-7F5D7A9E6341}.Release|x86.ActiveCfg = Release|Any CPU + {128E84CD-654A-44E5-B4D7-7F5D7A9E6341}.Release|x86.Build.0 = Release|Any CPU + {128E84CD-654A-44E5-B4D7-7F5D7A9E6341}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {128E84CD-654A-44E5-B4D7-7F5D7A9E6341}.Checked|arm.ActiveCfg = Debug|Any CPU + {128E84CD-654A-44E5-B4D7-7F5D7A9E6341}.Checked|arm64.ActiveCfg = Debug|Any CPU + {128E84CD-654A-44E5-B4D7-7F5D7A9E6341}.Checked|x64.ActiveCfg = Debug|Any CPU + {128E84CD-654A-44E5-B4D7-7F5D7A9E6341}.Checked|x86.ActiveCfg = Debug|Any CPU + {79CFC9F5-5B4B-4B29-9EBD-1A2FA2D6325A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {79CFC9F5-5B4B-4B29-9EBD-1A2FA2D6325A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {79CFC9F5-5B4B-4B29-9EBD-1A2FA2D6325A}.Debug|arm.ActiveCfg = Debug|Any CPU + {79CFC9F5-5B4B-4B29-9EBD-1A2FA2D6325A}.Debug|arm64.ActiveCfg = Debug|Any CPU + {79CFC9F5-5B4B-4B29-9EBD-1A2FA2D6325A}.Debug|x64.ActiveCfg = Debug|Any CPU + {79CFC9F5-5B4B-4B29-9EBD-1A2FA2D6325A}.Debug|x64.Build.0 = Debug|Any CPU + {79CFC9F5-5B4B-4B29-9EBD-1A2FA2D6325A}.Debug|x86.ActiveCfg = Debug|Any CPU + {79CFC9F5-5B4B-4B29-9EBD-1A2FA2D6325A}.Debug|x86.Build.0 = Debug|Any CPU + {79CFC9F5-5B4B-4B29-9EBD-1A2FA2D6325A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {79CFC9F5-5B4B-4B29-9EBD-1A2FA2D6325A}.Release|Any CPU.Build.0 = Release|Any CPU + {79CFC9F5-5B4B-4B29-9EBD-1A2FA2D6325A}.Release|arm.ActiveCfg = Release|Any CPU + {79CFC9F5-5B4B-4B29-9EBD-1A2FA2D6325A}.Release|arm64.ActiveCfg = Release|Any CPU + {79CFC9F5-5B4B-4B29-9EBD-1A2FA2D6325A}.Release|x64.ActiveCfg = Release|Any CPU + {79CFC9F5-5B4B-4B29-9EBD-1A2FA2D6325A}.Release|x64.Build.0 = Release|Any CPU + {79CFC9F5-5B4B-4B29-9EBD-1A2FA2D6325A}.Release|x86.ActiveCfg = Release|Any CPU + {79CFC9F5-5B4B-4B29-9EBD-1A2FA2D6325A}.Release|x86.Build.0 = Release|Any CPU + {79CFC9F5-5B4B-4B29-9EBD-1A2FA2D6325A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {79CFC9F5-5B4B-4B29-9EBD-1A2FA2D6325A}.Checked|arm.ActiveCfg = Debug|Any CPU + {79CFC9F5-5B4B-4B29-9EBD-1A2FA2D6325A}.Checked|arm64.ActiveCfg = Debug|Any CPU + {79CFC9F5-5B4B-4B29-9EBD-1A2FA2D6325A}.Checked|x64.ActiveCfg = Debug|Any CPU + {79CFC9F5-5B4B-4B29-9EBD-1A2FA2D6325A}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {634A3B2B-09F5-4810-B630-ADE4D36C47DF} = {FC10C682-DF71-4EEA-A3A5-E716C1C88AC0} - {ED450846-85A0-4CED-B4D9-9EB769CF794B} = {FC10C682-DF71-4EEA-A3A5-E716C1C88AC0} + {634A3B2B-09F5-4810-B630-ADE4D36C47DF} = {C3847F2F-603E-467F-99C3-A4B619E25544} {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} + {ED450846-85A0-4CED-B4D9-9EB769CF794B} = {FC10C682-DF71-4EEA-A3A5-E716C1C88AC0} {88F4A78E-4EF9-4EB6-995E-CD24152C4704} = {38837FDE-8CFE-4676-B3CE-48165E0FD6CF} {547EC332-29FE-47A8-B477-4E19BE521235} = {38837FDE-8CFE-4676-B3CE-48165E0FD6CF} {F99EAF58-533E-4941-A0C5-5101309D8AB9} = {38837FDE-8CFE-4676-B3CE-48165E0FD6CF} + {49B6B26B-CEC6-4EE8-8177-47891A85518A} = {06497322-6B9A-48E6-BEA8-C96362AD7180} + {69A926A1-F426-4501-8641-84B10BF0C698} = {06497322-6B9A-48E6-BEA8-C96362AD7180} + {06497322-6B9A-48E6-BEA8-C96362AD7180} = {8E7812D8-8284-4449-92BE-3216F9E141B5} + {E3DB94BA-35EE-4D66-9958-B22D73A43943} = {E40BE5C0-684A-424B-B41A-2E9FDA893718} + {128E84CD-654A-44E5-B4D7-7F5D7A9E6341} = {E40BE5C0-684A-424B-B41A-2E9FDA893718} + {E40BE5C0-684A-424B-B41A-2E9FDA893718} = {8E7812D8-8284-4449-92BE-3216F9E141B5} + {79CFC9F5-5B4B-4B29-9EBD-1A2FA2D6325A} = {0F563BE9-8226-4DB5-A42D-3AB163BDF92D} + {0F563BE9-8226-4DB5-A42D-3AB163BDF92D} = {8E7812D8-8284-4449-92BE-3216F9E141B5} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {F9EDC1DC-52BE-4C40-90D2-41EE6FB7FA5C} diff --git a/src/libraries/System.Numerics.Vectors/tests/System.Numerics.Vectors.Tests.csproj b/src/libraries/System.Numerics.Vectors/tests/System.Numerics.Vectors.Tests.csproj index 5c112bd2cf0b44..264fb0fe340d9c 100644 --- a/src/libraries/System.Numerics.Vectors/tests/System.Numerics.Vectors.Tests.csproj +++ b/src/libraries/System.Numerics.Vectors/tests/System.Numerics.Vectors.Tests.csproj @@ -3,7 +3,7 @@ true $(NetCoreAppCurrent) true - + false diff --git a/src/libraries/System.ObjectModel/System.ObjectModel.sln b/src/libraries/System.ObjectModel/System.ObjectModel.sln index b489d33fdf20bd..1576c836f68f02 100644 --- a/src/libraries/System.ObjectModel/System.ObjectModel.sln +++ b/src/libraries/System.ObjectModel/System.ObjectModel.sln @@ -15,6 +15,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{5BC772EA-32FF-4918-844E-CC61F30042EE}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{D4EF791E-CB42-486C-846B-8943EF22F2B4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{70E2D108-F236-4419-AE0F-DAFF44CB455A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{A6345F71-0CB3-4F98-828D-A72644450B4D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{849BB255-5177-4A79-AF68-61F7345F027D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{A313EDEE-2921-49B0-81F2-A02949F9DF68}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{7D905913-8F74-4711-80B7-CFAD20A5B57B}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{2E5C2B29-721D-4DDF-985F-81CA593E4F42}" @@ -23,6 +33,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{35DDEBAA-829 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{0534B176-48FC-4F4D-9D44-ADD06237B038}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{8279B20A-0105-4A9F-8CFE-02666847838C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{78287EF1-7997-4648-8685-670B4816FE87}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{1AD0830D-18A0-4DC3-A917-A816DFC3C6A0}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{3517D2A8-B899-444A-B6B1-97E96E9527CE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -61,6 +79,26 @@ Global {5BC772EA-32FF-4918-844E-CC61F30042EE}.Debug|Any CPU.Build.0 = Debug|Any CPU {5BC772EA-32FF-4918-844E-CC61F30042EE}.Release|Any CPU.ActiveCfg = Release|Any CPU {5BC772EA-32FF-4918-844E-CC61F30042EE}.Release|Any CPU.Build.0 = Release|Any CPU + {D4EF791E-CB42-486C-846B-8943EF22F2B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D4EF791E-CB42-486C-846B-8943EF22F2B4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D4EF791E-CB42-486C-846B-8943EF22F2B4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D4EF791E-CB42-486C-846B-8943EF22F2B4}.Release|Any CPU.Build.0 = Release|Any CPU + {70E2D108-F236-4419-AE0F-DAFF44CB455A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {70E2D108-F236-4419-AE0F-DAFF44CB455A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {70E2D108-F236-4419-AE0F-DAFF44CB455A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {70E2D108-F236-4419-AE0F-DAFF44CB455A}.Release|Any CPU.Build.0 = Release|Any CPU + {A6345F71-0CB3-4F98-828D-A72644450B4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A6345F71-0CB3-4F98-828D-A72644450B4D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A6345F71-0CB3-4F98-828D-A72644450B4D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A6345F71-0CB3-4F98-828D-A72644450B4D}.Release|Any CPU.Build.0 = Release|Any CPU + {849BB255-5177-4A79-AF68-61F7345F027D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {849BB255-5177-4A79-AF68-61F7345F027D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {849BB255-5177-4A79-AF68-61F7345F027D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {849BB255-5177-4A79-AF68-61F7345F027D}.Release|Any CPU.Build.0 = Release|Any CPU + {A313EDEE-2921-49B0-81F2-A02949F9DF68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A313EDEE-2921-49B0-81F2-A02949F9DF68}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A313EDEE-2921-49B0-81F2-A02949F9DF68}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A313EDEE-2921-49B0-81F2-A02949F9DF68}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -74,6 +112,14 @@ Global {583024EB-8FC7-45E3-9C37-85BE43FBD28A} = {35DDEBAA-829C-43C1-BB49-29A11589D22D} {A42FE6C9-59F1-43E7-AD34-802F13254284} = {0534B176-48FC-4F4D-9D44-ADD06237B038} {A62E47A3-C3A7-421A-B3E6-2DD578A50781} = {0534B176-48FC-4F4D-9D44-ADD06237B038} + {D4EF791E-CB42-486C-846B-8943EF22F2B4} = {8279B20A-0105-4A9F-8CFE-02666847838C} + {70E2D108-F236-4419-AE0F-DAFF44CB455A} = {8279B20A-0105-4A9F-8CFE-02666847838C} + {8279B20A-0105-4A9F-8CFE-02666847838C} = {3517D2A8-B899-444A-B6B1-97E96E9527CE} + {A6345F71-0CB3-4F98-828D-A72644450B4D} = {78287EF1-7997-4648-8685-670B4816FE87} + {849BB255-5177-4A79-AF68-61F7345F027D} = {78287EF1-7997-4648-8685-670B4816FE87} + {78287EF1-7997-4648-8685-670B4816FE87} = {3517D2A8-B899-444A-B6B1-97E96E9527CE} + {A313EDEE-2921-49B0-81F2-A02949F9DF68} = {1AD0830D-18A0-4DC3-A917-A816DFC3C6A0} + {1AD0830D-18A0-4DC3-A917-A816DFC3C6A0} = {3517D2A8-B899-444A-B6B1-97E96E9527CE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {485C729C-EB7F-4DE2-AE84-428EB1D65902} diff --git a/src/libraries/System.Private.CoreLib/Tools/GenUnicodeProp/GenUnicodeProp.csproj b/src/libraries/System.Private.CoreLib/Tools/GenUnicodeProp/GenUnicodeProp.csproj index 4a29ffd3152721..10899ab4a16a0c 100644 --- a/src/libraries/System.Private.CoreLib/Tools/GenUnicodeProp/GenUnicodeProp.csproj +++ b/src/libraries/System.Private.CoreLib/Tools/GenUnicodeProp/GenUnicodeProp.csproj @@ -1,17 +1,17 @@ + net8.0 Exe - net6.0 15.0 false $(NoWarn);CA1416 - latest + true + false - - + diff --git a/src/libraries/System.Private.CoreLib/src/Internal/Console.cs b/src/libraries/System.Private.CoreLib/src/Internal/Console.cs index 5034a2be59b333..c6ce19fae3bdee 100644 --- a/src/libraries/System.Private.CoreLib/src/Internal/Console.cs +++ b/src/libraries/System.Private.CoreLib/src/Internal/Console.cs @@ -17,5 +17,11 @@ public static void WriteLine(string? s) => public static void WriteLine() => Write(Environment.NewLineConst); + + public static partial class Error + { + public static void WriteLine() => + Write(Environment.NewLineConst); + } } } 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 14b8a814732670..0d6ae242ae6ec6 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 @@ -20,7 +20,7 @@ $(MSBuildThisFileDirectory)ILLink\ true true - true + true $(DefineConstants);BIGENDIAN @@ -337,7 +337,7 @@ - + @@ -434,7 +434,6 @@ - @@ -1306,7 +1305,7 @@ Common\Interop\Interop.CompareInfo.cs - + Common\Interop\Interop.Calendar.cs @@ -1363,6 +1362,9 @@ Common\Interop\Interop.TimeZoneInfo.cs + + Common\Interop\Interop.TimeZoneInfo.iOS.cs + Common\Interop\Interop.Utils.cs @@ -2714,4 +2716,4 @@ - + \ No newline at end of file diff --git a/src/libraries/System.Private.CoreLib/src/System/AppContext.cs b/src/libraries/System.Private.CoreLib/src/System/AppContext.cs index 23e968c7d1729e..eef01d3550b0ea 100644 --- a/src/libraries/System.Private.CoreLib/src/System/AppContext.cs +++ b/src/libraries/System.Private.CoreLib/src/System/AppContext.cs @@ -82,6 +82,13 @@ public static void SetData(string name, object? data) internal static event EventHandler? FirstChanceException; #pragma warning restore CS0067 +#if !NATIVEAOT + internal static void OnFirstChanceException(object e) + { + FirstChanceException?.Invoke(AppDomain.CurrentDomain, new FirstChanceExceptionEventArgs((Exception)e)); + } +#endif + internal static event EventHandler? ProcessExit; internal static void OnProcessExit() diff --git a/src/libraries/System.Private.CoreLib/src/System/AppDomain.cs b/src/libraries/System.Private.CoreLib/src/System/AppDomain.cs index 4cac32a376dd0f..4359cc41a76040 100644 --- a/src/libraries/System.Private.CoreLib/src/System/AppDomain.cs +++ b/src/libraries/System.Private.CoreLib/src/System/AppDomain.cs @@ -129,7 +129,7 @@ private static int ExecuteAssembly(Assembly assembly, string?[]? args) obj: null, invokeAttr: BindingFlags.DoNotWrapExceptions, binder: null, - parameters: entry.GetParameters().Length > 0 ? new object?[] { args } : null, + parameters: entry.GetParametersAsSpan().Length > 0 ? new object?[] { args } : null, culture: null); return result != null ? (int)result : 0; diff --git a/src/libraries/System.Private.CoreLib/src/System/Buffers/Binary/BinaryPrimitives.ReadBigEndian.cs b/src/libraries/System.Private.CoreLib/src/System/Buffers/Binary/BinaryPrimitives.ReadBigEndian.cs index 07e961d22b0c2a..4065daf8621500 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Buffers/Binary/BinaryPrimitives.ReadBigEndian.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Buffers/Binary/BinaryPrimitives.ReadBigEndian.cs @@ -45,6 +45,12 @@ public static Half ReadHalfBigEndian(ReadOnlySpan source) /// /// Reads a from the beginning of a read-only span of bytes, as big endian. /// + /// The read-only span to read. + /// The big endian value. + /// Reads exactly 2 bytes from the beginning of the span. + /// + /// is too small to contain a . + /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static short ReadInt16BigEndian(ReadOnlySpan source) { @@ -56,6 +62,12 @@ public static short ReadInt16BigEndian(ReadOnlySpan source) /// /// Reads a from the beginning of a read-only span of bytes, as big endian. /// + /// The read-only span to read. + /// The big endian value. + /// Reads exactly 4 bytes from the beginning of the span. + /// + /// is too small to contain a . + /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int ReadInt32BigEndian(ReadOnlySpan source) { @@ -67,6 +79,12 @@ public static int ReadInt32BigEndian(ReadOnlySpan source) /// /// Reads a from the beginning of a read-only span of bytes, as big endian. /// + /// The read-only span to read. + /// The big endian value. + /// Reads exactly 8 bytes from the beginning of the span. + /// + /// is too small to contain a . + /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static long ReadInt64BigEndian(ReadOnlySpan source) { @@ -78,6 +96,12 @@ public static long ReadInt64BigEndian(ReadOnlySpan source) /// /// Reads a from the beginning of a read-only span of bytes, as big endian. /// + /// The read-only span to read. + /// The big endian value. + /// Reads exactly 16 bytes from the beginning of the span. + /// + /// is too small to contain a . + /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Int128 ReadInt128BigEndian(ReadOnlySpan source) { @@ -89,6 +113,12 @@ public static Int128 ReadInt128BigEndian(ReadOnlySpan source) /// /// Reads a from the beginning of a read-only span of bytes, as big endian. /// + /// The read-only span to read. + /// The big endian value. + /// Reads exactly 4 bytes on 32-bit platforms -or- 8 bytes on 64-bit platforms from the beginning of the span. + /// + /// is too small to contain a . + /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static nint ReadIntPtrBigEndian(ReadOnlySpan source) { @@ -117,6 +147,12 @@ public static float ReadSingleBigEndian(ReadOnlySpan source) /// /// Reads a from the beginning of a read-only span of bytes, as big endian. /// + /// The read-only span to read. + /// The big endian value. + /// Reads exactly 2 bytes from the beginning of the span. + /// + /// is too small to contain a . + /// [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ushort ReadUInt16BigEndian(ReadOnlySpan source) @@ -129,6 +165,12 @@ public static ushort ReadUInt16BigEndian(ReadOnlySpan source) /// /// Reads a from the beginning of a read-only span of bytes, as big endian. /// + /// The read-only span to read. + /// The big endian value. + /// Reads exactly 4 bytes from the beginning of the span. + /// + /// is too small to contain a . + /// [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static uint ReadUInt32BigEndian(ReadOnlySpan source) @@ -141,6 +183,12 @@ public static uint ReadUInt32BigEndian(ReadOnlySpan source) /// /// Reads a from the beginning of a read-only span of bytes, as big endian. /// + /// The read-only span to read. + /// The big endian value. + /// Reads exactly 8 bytes from the beginning of the span. + /// + /// is too small to contain a . + /// [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ulong ReadUInt64BigEndian(ReadOnlySpan source) @@ -153,6 +201,12 @@ public static ulong ReadUInt64BigEndian(ReadOnlySpan source) /// /// Reads a from the beginning of a read-only span of bytes, as big endian. /// + /// The read-only span to read. + /// The big endian value. + /// Reads exactly 16 bytes from the beginning of the span. + /// + /// is too small to contain a . + /// [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static UInt128 ReadUInt128BigEndian(ReadOnlySpan source) @@ -165,6 +219,12 @@ public static UInt128 ReadUInt128BigEndian(ReadOnlySpan source) /// /// Reads a from the beginning of a read-only span of bytes, as big endian. /// + /// The read-only span to read. + /// The big endian value. + /// Reads exactly 4 bytes on 32-bit platforms -or- 8 bytes on 64-bit platforms from the beginning of the span. + /// + /// is too small to contain a . + /// [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static nuint ReadUIntPtrBigEndian(ReadOnlySpan source) @@ -178,7 +238,7 @@ public static nuint ReadUIntPtrBigEndian(ReadOnlySpan source) /// Reads a from the beginning of a read-only span of bytes, as big endian. /// /// The read-only span of bytes to read. - /// When this method returns, the value read out of the read-only span of bytes, as big endian. + /// When this method returns, contains the value read out of the read-only span of bytes, as big endian. /// /// if the span is large enough to contain a ; otherwise, . /// @@ -200,7 +260,7 @@ public static bool TryReadDoubleBigEndian(ReadOnlySpan source, out double /// Reads a from the beginning of a read-only span of bytes, as big endian. /// /// The read-only span of bytes to read. - /// When this method returns, the value read out of the read-only span of bytes, as big endian. + /// When this method returns, contains the value read out of the read-only span of bytes, as big endian. /// /// if the span is large enough to contain a ; otherwise, . /// @@ -221,7 +281,12 @@ public static bool TryReadHalfBigEndian(ReadOnlySpan source, out Half valu /// /// Reads a from the beginning of a read-only span of bytes, as big endian. /// - /// If the span is too small to contain a , return false. + /// The read-only span of bytes to read. + /// When this method returns, contains the value read out of the read-only span of bytes, as big endian. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Reads exactly 2 bytes from the beginning of the span. [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryReadInt16BigEndian(ReadOnlySpan source, out short value) { @@ -238,7 +303,12 @@ public static bool TryReadInt16BigEndian(ReadOnlySpan source, out short va /// /// Reads a from the beginning of a read-only span of bytes, as big endian. /// - /// If the span is too small to contain a , return false. + /// The read-only span of bytes to read. + /// When this method returns, contains the value read out of the read-only span of bytes, as big endian. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Reads exactly 4 bytes from the beginning of the span. [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryReadInt32BigEndian(ReadOnlySpan source, out int value) { @@ -255,7 +325,12 @@ public static bool TryReadInt32BigEndian(ReadOnlySpan source, out int valu /// /// Reads a from the beginning of a read-only span of bytes, as big endian. /// - /// If the span is too small to contain a , return false. + /// The read-only span of bytes to read. + /// When this method returns, contains the value read out of the read-only span of bytes, as big endian. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Reads exactly 8 bytes from the beginning of the span. [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryReadInt64BigEndian(ReadOnlySpan source, out long value) { @@ -272,7 +347,12 @@ public static bool TryReadInt64BigEndian(ReadOnlySpan source, out long val /// /// Reads a from the beginning of a read-only span of bytes, as big endian. /// - /// If the span is too small to contain a , return false. + /// The read-only span of bytes to read. + /// When this method returns, contains the value read out of the read-only span of bytes, as big endian. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Reads exactly 16 bytes from the beginning of the span. [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryReadInt128BigEndian(ReadOnlySpan source, out Int128 value) { @@ -289,7 +369,12 @@ public static bool TryReadInt128BigEndian(ReadOnlySpan source, out Int128 /// /// Reads a from the beginning of a read-only span of bytes, as big endian. /// - /// If the span is too small to contain a , return false. + /// The read-only span of bytes to read. + /// When this method returns, contains the value read out of the read-only span of bytes, as big endian. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Reads exactly 4 bytes on 32-bit platforms -or- 8 bytes on 64-bit platforms from the beginning of the span. [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryReadIntPtrBigEndian(ReadOnlySpan source, out nint value) { @@ -307,7 +392,7 @@ public static bool TryReadIntPtrBigEndian(ReadOnlySpan source, out nint va /// Reads a from the beginning of a read-only span of bytes, as big endian. /// /// The read-only span of bytes to read. - /// When this method returns, the value read out of the read-only span of bytes, as big endian. + /// When this method returns, contains the value read out of the read-only span of bytes, as big endian. /// /// if the span is large enough to contain a ; otherwise, . /// @@ -327,7 +412,12 @@ public static bool TryReadSingleBigEndian(ReadOnlySpan source, out float v /// /// Reads a from the beginning of a read-only span of bytes, as big endian. /// - /// If the span is too small to contain a , return false. + /// The read-only span of bytes to read. + /// When this method returns, contains the value read out of the read-only span of bytes, as big endian. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Reads exactly 2 bytes from the beginning of the span. [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryReadUInt16BigEndian(ReadOnlySpan source, out ushort value) @@ -345,7 +435,12 @@ public static bool TryReadUInt16BigEndian(ReadOnlySpan source, out ushort /// /// Reads a from the beginning of a read-only span of bytes, as big endian. /// - /// If the span is too small to contain a , return false. + /// The read-only span of bytes to read. + /// When this method returns, contains the value read out of the read-only span of bytes, as big endian. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Reads exactly 4 bytes from the beginning of the span. [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryReadUInt32BigEndian(ReadOnlySpan source, out uint value) @@ -363,7 +458,12 @@ public static bool TryReadUInt32BigEndian(ReadOnlySpan source, out uint va /// /// Reads a from the beginning of a read-only span of bytes, as big endian. /// - /// If the span is too small to contain a , return false. + /// The read-only span of bytes to read. + /// When this method returns, contains the value read out of the read-only span of bytes, as big endian. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Reads exactly 8 bytes from the beginning of the span. [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryReadUInt64BigEndian(ReadOnlySpan source, out ulong value) @@ -381,7 +481,12 @@ public static bool TryReadUInt64BigEndian(ReadOnlySpan source, out ulong v /// /// Reads a from the beginning of a read-only span of bytes, as big endian. /// - /// If the span is too small to contain a , return false. + /// The read-only span of bytes to read. + /// When this method returns, contains the value read out of the read-only span of bytes, as big endian. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Reads exactly 16 bytes from the beginning of the span. [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryReadUInt128BigEndian(ReadOnlySpan source, out UInt128 value) @@ -399,7 +504,13 @@ public static bool TryReadUInt128BigEndian(ReadOnlySpan source, out UInt12 /// /// Reads a from the beginning of a read-only span of bytes, as big endian. /// - /// If the span is too small to contain a , return false. + + /// The read-only span of bytes to read. + /// When this method returns, contains the value read out of the read-only span of bytes, as big endian. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Reads exactly 4 bytes on 32-bit platforms -or- 8 bytes on 64-bit platforms from the beginning of the span. [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryReadUIntPtrBigEndian(ReadOnlySpan source, out nuint value) diff --git a/src/libraries/System.Private.CoreLib/src/System/Buffers/Binary/BinaryPrimitives.ReadLittleEndian.cs b/src/libraries/System.Private.CoreLib/src/System/Buffers/Binary/BinaryPrimitives.ReadLittleEndian.cs index 8c9df7eef86927..c21624da2aafc8 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Buffers/Binary/BinaryPrimitives.ReadLittleEndian.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Buffers/Binary/BinaryPrimitives.ReadLittleEndian.cs @@ -45,6 +45,12 @@ public static Half ReadHalfLittleEndian(ReadOnlySpan source) /// /// Reads a from the beginning of a read-only span of bytes, as little endian. /// + /// The read-only span to read. + /// The little endian value. + /// Reads exactly 2 bytes from the beginning of the span. + /// + /// is too small to contain a . + /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static short ReadInt16LittleEndian(ReadOnlySpan source) { @@ -56,6 +62,12 @@ public static short ReadInt16LittleEndian(ReadOnlySpan source) /// /// Reads a from the beginning of a read-only span of bytes, as little endian. /// + /// The read-only span to read. + /// The little endian value. + /// Reads exactly 4 bytes from the beginning of the span. + /// + /// is too small to contain a . + /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int ReadInt32LittleEndian(ReadOnlySpan source) { @@ -67,6 +79,12 @@ public static int ReadInt32LittleEndian(ReadOnlySpan source) /// /// Reads a from the beginning of a read-only span of bytes, as little endian. /// + /// The read-only span to read. + /// The little endian value. + /// Reads exactly 8 bytes from the beginning of the span. + /// + /// is too small to contain a . + /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static long ReadInt64LittleEndian(ReadOnlySpan source) { @@ -78,6 +96,12 @@ public static long ReadInt64LittleEndian(ReadOnlySpan source) /// /// Reads a from the beginning of a read-only span of bytes, as little endian. /// + /// The read-only span to read. + /// The little endian value. + /// Reads exactly 16 bytes from the beginning of the span. + /// + /// is too small to contain a . + /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Int128 ReadInt128LittleEndian(ReadOnlySpan source) { @@ -89,6 +113,12 @@ public static Int128 ReadInt128LittleEndian(ReadOnlySpan source) /// /// Reads a from the beginning of a read-only span of bytes, as little endian. /// + /// The read-only span to read. + /// The little endian value. + /// Reads exactly 4 bytes on 32-bit platforms -or- 8 bytes on 64-bit platforms from the beginning of the span. + /// + /// is too small to contain a . + /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static nint ReadIntPtrLittleEndian(ReadOnlySpan source) { @@ -117,6 +147,12 @@ public static float ReadSingleLittleEndian(ReadOnlySpan source) /// /// Reads a from the beginning of a read-only span of bytes, as little endian. /// + /// The read-only span to read. + /// The little endian value. + /// Reads exactly 2 bytes from the beginning of the span. + /// + /// is too small to contain a . + /// [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ushort ReadUInt16LittleEndian(ReadOnlySpan source) @@ -129,6 +165,12 @@ public static ushort ReadUInt16LittleEndian(ReadOnlySpan source) /// /// Reads a from the beginning of a read-only span of bytes, as little endian. /// + /// The read-only span to read. + /// The little endian value. + /// Reads exactly 4 bytes from the beginning of the span. + /// + /// is too small to contain a . + /// [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static uint ReadUInt32LittleEndian(ReadOnlySpan source) @@ -141,6 +183,12 @@ public static uint ReadUInt32LittleEndian(ReadOnlySpan source) /// /// Reads a from the beginning of a read-only span of bytes, as little endian. /// + /// The read-only span to read. + /// The little endian value. + /// Reads exactly 8 bytes from the beginning of the span. + /// + /// is too small to contain a . + /// [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ulong ReadUInt64LittleEndian(ReadOnlySpan source) @@ -153,6 +201,12 @@ public static ulong ReadUInt64LittleEndian(ReadOnlySpan source) /// /// Reads a from the beginning of a read-only span of bytes, as little endian. /// + /// The read-only span to read. + /// The little endian value. + /// Reads exactly 16 bytes from the beginning of the span. + /// + /// is too small to contain a . + /// [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static UInt128 ReadUInt128LittleEndian(ReadOnlySpan source) @@ -165,6 +219,12 @@ public static UInt128 ReadUInt128LittleEndian(ReadOnlySpan source) /// /// Reads a from the beginning of a read-only span of bytes, as little endian. /// + /// The read-only span to read. + /// The little endian value. + /// Reads exactly 4 bytes on 32-bit platforms or 8 bytes on 64-bit platforms from the beginning of the span. + /// + /// is too small to contain a . + /// [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static nuint ReadUIntPtrLittleEndian(ReadOnlySpan source) @@ -178,7 +238,7 @@ public static nuint ReadUIntPtrLittleEndian(ReadOnlySpan source) /// Reads a from the beginning of a read-only span of bytes, as little endian. /// /// The read-only span of bytes to read. - /// When this method returns, the value read out of the read-only span of bytes, as little endian. + /// When this method returns, contains the value read out of the read-only span of bytes, as little endian. /// /// if the span is large enough to contain a ; otherwise, . /// @@ -200,7 +260,7 @@ public static bool TryReadDoubleLittleEndian(ReadOnlySpan source, out doub /// Reads a from the beginning of a read-only span of bytes, as little endian. /// /// The read-only span of bytes to read. - /// When this method returns, the value read out of the read-only span of bytes, as little endian. + /// When this method returns, contains the value read out of the read-only span of bytes, as little endian. /// /// if the span is large enough to contain a ; otherwise, . /// @@ -221,7 +281,12 @@ public static bool TryReadHalfLittleEndian(ReadOnlySpan source, out Half v /// /// Reads a from the beginning of a read-only span of bytes, as little endian. /// - /// If the span is too small to contain a , return false. + /// The read-only span of bytes to read. + /// When this method returns, contains the value read out of the read-only span of bytes, as little endian. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Reads exactly 2 bytes from the beginning of the span. [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryReadInt16LittleEndian(ReadOnlySpan source, out short value) { @@ -238,7 +303,12 @@ public static bool TryReadInt16LittleEndian(ReadOnlySpan source, out short /// /// Reads a from the beginning of a read-only span of bytes, as little endian. /// - /// If the span is too small to contain a , return false. + /// The read-only span of bytes to read. + /// When this method returns, contains the value read out of the read-only span of bytes, as little endian. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Reads exactly 4 bytes from the beginning of the span. [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryReadInt32LittleEndian(ReadOnlySpan source, out int value) { @@ -255,7 +325,12 @@ public static bool TryReadInt32LittleEndian(ReadOnlySpan source, out int v /// /// Reads a from the beginning of a read-only span of bytes, as little endian. /// - /// If the span is too small to contain a , return false. + /// The read-only span of bytes to read. + /// When this method returns, contains the value read out of the read-only span of bytes, as little endian. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Reads exactly 8 bytes from the beginning of the span. [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryReadInt64LittleEndian(ReadOnlySpan source, out long value) { @@ -272,7 +347,12 @@ public static bool TryReadInt64LittleEndian(ReadOnlySpan source, out long /// /// Reads a from the beginning of a read-only span of bytes, as little endian. /// - /// If the span is too small to contain a , return false. + /// The read-only span of bytes to read. + /// When this method returns, contains the value read out of the read-only span of bytes, as little endian. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Reads exactly 16 bytes from the beginning of the span. [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryReadInt128LittleEndian(ReadOnlySpan source, out Int128 value) { @@ -289,7 +369,12 @@ public static bool TryReadInt128LittleEndian(ReadOnlySpan source, out Int1 /// /// Reads a from the beginning of a read-only span of bytes, as little endian. /// - /// If the span is too small to contain a , return false. + /// The read-only span of bytes to read. + /// When this method returns, contains the value read out of the read-only span of bytes, as little endian. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Reads exactly 4 bytes on 32-bit platforms or 8 bytes on 64-bit platforms from the beginning of the span. [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryReadIntPtrLittleEndian(ReadOnlySpan source, out nint value) { @@ -307,7 +392,7 @@ public static bool TryReadIntPtrLittleEndian(ReadOnlySpan source, out nint /// Reads a from the beginning of a read-only span of bytes, as little endian. /// /// The read-only span of bytes to read. - /// When this method returns, the value read out of the read-only span of bytes, as little endian. + /// When this method returns, contains the value read out of the read-only span of bytes, as little endian. /// /// if the span is large enough to contain a ; otherwise, . /// @@ -327,7 +412,12 @@ public static bool TryReadSingleLittleEndian(ReadOnlySpan source, out floa /// /// Reads a from the beginning of a read-only span of bytes, as little endian. /// - /// If the span is too small to contain a , return false. + /// The read-only span of bytes to read. + /// When this method returns, contains the value read out of the read-only span of bytes, as little endian. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Reads exactly 2 bytes from the beginning of the span. [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryReadUInt16LittleEndian(ReadOnlySpan source, out ushort value) @@ -345,7 +435,12 @@ public static bool TryReadUInt16LittleEndian(ReadOnlySpan source, out usho /// /// Reads a from the beginning of a read-only span of bytes, as little endian. /// - /// If the span is too small to contain a , return false. + /// The read-only span of bytes to read. + /// When this method returns, contains the value read out of the read-only span of bytes, as little endian. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Reads exactly 4 bytes from the beginning of the span. [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryReadUInt32LittleEndian(ReadOnlySpan source, out uint value) @@ -363,7 +458,12 @@ public static bool TryReadUInt32LittleEndian(ReadOnlySpan source, out uint /// /// Reads a from the beginning of a read-only span of bytes, as little endian. /// - /// If the span is too small to contain a , return false. + /// The read-only span of bytes to read. + /// When this method returns, contains the value read out of the read-only span of bytes, as little endian. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Reads exactly 8 bytes from the beginning of the span. [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryReadUInt64LittleEndian(ReadOnlySpan source, out ulong value) @@ -381,7 +481,12 @@ public static bool TryReadUInt64LittleEndian(ReadOnlySpan source, out ulon /// /// Reads a from the beginning of a read-only span of bytes, as little endian. /// - /// If the span is too small to contain a , return false. + /// The read-only span of bytes to read. + /// When this method returns, contains the value read out of the read-only span of bytes, as little endian. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Reads exactly 16 bytes from the beginning of the span. [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryReadUInt128LittleEndian(ReadOnlySpan source, out UInt128 value) @@ -399,7 +504,12 @@ public static bool TryReadUInt128LittleEndian(ReadOnlySpan source, out UIn /// /// Reads a from the beginning of a read-only span of bytes, as little endian. /// - /// If the span is too small to contain a , return false. + /// The read-only span of bytes to read. + /// When this method returns, contains the value read out of the read-only span of bytes, as little endian. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Reads exactly 4 bytes on 32-bit platforms -or- 8 bytes on 64-bit platforms from the beginning of the span. [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryReadUIntPtrLittleEndian(ReadOnlySpan source, out nuint value) diff --git a/src/libraries/System.Private.CoreLib/src/System/Buffers/Binary/BinaryPrimitives.ReverseEndianness.cs b/src/libraries/System.Private.CoreLib/src/System/Buffers/Binary/BinaryPrimitives.ReverseEndianness.cs index c229efb2f3d38c..5f8b0a7e5fca7f 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Buffers/Binary/BinaryPrimitives.ReverseEndianness.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Buffers/Binary/BinaryPrimitives.ReverseEndianness.cs @@ -22,42 +22,53 @@ namespace System.Buffers.Binary public static partial class BinaryPrimitives { /// - /// This is a no-op and added only for consistency. - /// This allows the caller to read a struct of numeric primitives and reverse each field - /// rather than having to skip sbyte fields. + /// Reverses a primitive value by performing an endianness swap of the specified value, which effectively does nothing for an . /// + /// The value to reverse. + /// The passed-in value, unmodified. + /// This method effectively does nothing and was added only for consistency. [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static sbyte ReverseEndianness(sbyte value) => value; /// - /// Reverses a primitive value - performs an endianness swap + /// Reverses a primitive value by performing an endianness swap of the specified value. /// + /// The value to reverse. + /// The reversed value. [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static short ReverseEndianness(short value) => (short)ReverseEndianness((ushort)value); /// - /// Reverses a primitive value - performs an endianness swap + /// Reverses a primitive value by performing an endianness swap of the specified value. /// + /// The value to reverse. + /// The reversed value. [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int ReverseEndianness(int value) => (int)ReverseEndianness((uint)value); /// - /// Reverses a primitive value - performs an endianness swap + /// Reverses a primitive value by performing an endianness swap of the specified value. /// + /// The value to reverse. + /// The reversed value. [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static long ReverseEndianness(long value) => (long)ReverseEndianness((ulong)value); - /// Reverses a primitive value by performing an endianness swap of the specified value. + /// + /// Reverses a primitive value by performing an endianness swap of the specified value. + /// /// The value to reverse. /// The reversed value. [MethodImpl(MethodImplOptions.AggressiveInlining)] public static nint ReverseEndianness(nint value) => (nint)ReverseEndianness((nint_t)value); - /// Reverses a primitive value by performing an endianness swap of the specified value. + /// + /// Reverses a primitive value by performing an endianness swap of the specified value. + /// /// The value to reverse. /// The reversed value. [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -70,16 +81,19 @@ public static Int128 ReverseEndianness(Int128 value) } /// - /// This is a no-op and added only for consistency. - /// This allows the caller to read a struct of numeric primitives and reverse each field - /// rather than having to skip byte fields. + /// Reverses a primitive value by performing an endianness swap of the specified value, which effectively does nothing for an . /// + /// The value to reverse. + /// The passed-in value, unmodified. + /// This method effectively does nothing and was added only for consistency. [MethodImpl(MethodImplOptions.AggressiveInlining)] public static byte ReverseEndianness(byte value) => value; /// - /// Reverses a primitive value - performs an endianness swap + /// Reverses a primitive value by performing an endianness swap of the specified value. /// + /// The value to reverse. + /// The reversed value. [CLSCompliant(false)] [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -96,14 +110,18 @@ public static ushort ReverseEndianness(ushort value) } /// - /// Reverses a 16-bit character value - performs an endianness swap + /// Reverses a primitive value by performing an endianness swap of the specified value. /// + /// The value to reverse. + /// The reversed value. [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static char ReverseEndianness(char value) => (char)ReverseEndianness((ushort)value); /// - /// Reverses a primitive value - performs an endianness swap + /// Reverses a primitive value by performing an endianness swap of the specified value. /// + /// The value to reverse. + /// The reversed value. [CLSCompliant(false)] [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -134,8 +152,10 @@ public static uint ReverseEndianness(uint value) } /// - /// Reverses a primitive value - performs an endianness swap + /// Reverses a primitive value by performing an endianness swap of the specified value. /// + /// The value to reverse. + /// The reversed value. [CLSCompliant(false)] [Intrinsic] [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -148,14 +168,18 @@ public static ulong ReverseEndianness(ulong value) + ReverseEndianness((uint)(value >> 32)); } - /// Reverses a primitive value by performing an endianness swap of the specified value. + /// + /// Reverses a primitive value by performing an endianness swap of the specified value. + /// /// The value to reverse. /// The reversed value. [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static nuint ReverseEndianness(nuint value) => (nuint)ReverseEndianness((nuint_t)value); - /// Reverses a primitive value by performing an endianness swap of the specified value. + /// + /// Reverses a primitive value by performing an endianness swap of the specified value. + /// /// The value to reverse. /// The reversed value. [CLSCompliant(false)] diff --git a/src/libraries/System.Private.CoreLib/src/System/Buffers/Binary/BinaryPrimitives.WriteBigEndian.cs b/src/libraries/System.Private.CoreLib/src/System/Buffers/Binary/BinaryPrimitives.WriteBigEndian.cs index 67602e99a7fc38..159ade3dbdf6f7 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Buffers/Binary/BinaryPrimitives.WriteBigEndian.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Buffers/Binary/BinaryPrimitives.WriteBigEndian.cs @@ -57,6 +57,12 @@ public static void WriteHalfBigEndian(Span destination, Half value) /// /// Writes a into a span of bytes, as big endian. /// + /// The span of bytes where the value is to be written, as big endian. + /// The value to write into the span of bytes. + /// Writes exactly 2 bytes to the beginning of the span. + /// + /// is too small to contain a . + /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void WriteInt16BigEndian(Span destination, short value) { @@ -74,6 +80,12 @@ public static void WriteInt16BigEndian(Span destination, short value) /// /// Writes a into a span of bytes, as big endian. /// + /// The span of bytes where the value is to be written, as big endian. + /// The value to write into the span of bytes. + /// Writes exactly 4 bytes to the beginning of the span. + /// + /// is too small to contain a . + /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void WriteInt32BigEndian(Span destination, int value) { @@ -91,6 +103,12 @@ public static void WriteInt32BigEndian(Span destination, int value) /// /// Writes a into a span of bytes, as big endian. /// + /// The span of bytes where the value is to be written, as big endian. + /// The value to write into the span of bytes. + /// Writes exactly 8 bytes to the beginning of the span. + /// + /// is too small to contain a . + /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void WriteInt64BigEndian(Span destination, long value) { @@ -108,6 +126,12 @@ public static void WriteInt64BigEndian(Span destination, long value) /// /// Writes a into a span of bytes, as big endian. /// + /// The span of bytes where the value is to be written, as big endian. + /// The value to write into the span of bytes. + /// Writes exactly 16 bytes to the beginning of the span. + /// + /// is too small to contain a . + /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void WriteInt128BigEndian(Span destination, Int128 value) { @@ -125,6 +149,12 @@ public static void WriteInt128BigEndian(Span destination, Int128 value) /// /// Writes a into a span of bytes, as big endian. /// + /// The span of bytes where the value is to be written, as big endian. + /// The value to write into the span of bytes. + /// Writes exactly 4 bytes on 32-bit platforms -or- 8 bytes on 64-bit platforms to the beginning of the span. + /// + /// is too small to contain a . + /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void WriteIntPtrBigEndian(Span destination, nint value) { @@ -165,6 +195,12 @@ public static void WriteSingleBigEndian(Span destination, float value) /// /// Write a into a span of bytes, as big endian. /// + /// The span of bytes where the value is to be written, as big endian. + /// The value to write into the span of bytes. + /// Writes exactly 2 bytes to the beginning of the span. + /// + /// is too small to contain a . + /// [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void WriteUInt16BigEndian(Span destination, ushort value) @@ -183,6 +219,12 @@ public static void WriteUInt16BigEndian(Span destination, ushort value) /// /// Write a into a span of bytes, as big endian. /// + /// The span of bytes where the value is to be written, as big endian. + /// The value to write into the span of bytes. + /// Writes exactly 4 bytes to the beginning of the span. + /// + /// is too small to contain a . + /// [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void WriteUInt32BigEndian(Span destination, uint value) @@ -201,6 +243,12 @@ public static void WriteUInt32BigEndian(Span destination, uint value) /// /// Write a into a span of bytes, as big endian. /// + /// The span of bytes where the value is to be written, as big endian. + /// The value to write into the span of bytes. + /// Writes exactly 8 bytes to the beginning of the span. + /// + /// is too small to contain a . + /// [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void WriteUInt64BigEndian(Span destination, ulong value) @@ -219,6 +267,12 @@ public static void WriteUInt64BigEndian(Span destination, ulong value) /// /// Writes a into a span of bytes, as big endian. /// + /// The span of bytes where the value is to be written, as big endian. + /// The value to write into the span of bytes. + /// Writes exactly 16 bytes to the beginning of the span. + /// + /// is too small to contain a . + /// [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void WriteUInt128BigEndian(Span destination, UInt128 value) @@ -237,6 +291,12 @@ public static void WriteUInt128BigEndian(Span destination, UInt128 value) /// /// Writes a into a span of bytes, as big endian. /// + /// The span of bytes where the value is to be written, as big endian. + /// The value to write into the span of bytes. + /// Writes exactly 4 bytes on 32-bit platforms -or- 8 bytes on 64-bit platforms to the beginning of the span. + /// + /// is too small to contain a . + /// [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void WriteUIntPtrBigEndian(Span destination, nuint value) @@ -297,7 +357,12 @@ public static bool TryWriteHalfBigEndian(Span destination, Half value) /// /// Writes a into a span of bytes, as big endian. /// - /// If the span is too small to contain the value, return false. + /// The span of bytes where the value is to be written, as big endian. + /// The value to write into the span of bytes. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Writes exactly 2 bytes to the beginning of the span. [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryWriteInt16BigEndian(Span destination, short value) { @@ -313,7 +378,12 @@ public static bool TryWriteInt16BigEndian(Span destination, short value) /// /// Writes a into a span of bytes, as big endian. /// - /// If the span is too small to contain the value, return false. + /// The span of bytes where the value is to be written, as big endian. + /// The value to write into the span of bytes. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Writes exactly 4 bytes to the beginning of the span. [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryWriteInt32BigEndian(Span destination, int value) { @@ -329,7 +399,12 @@ public static bool TryWriteInt32BigEndian(Span destination, int value) /// /// Writes a into a span of bytes, as big endian. /// - /// If the span is too small to contain the value, return false. + /// The span of bytes where the value is to be written, as big endian. + /// The value to write into the span of bytes. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Writes exactly 8 bytes to the beginning of the span. [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryWriteInt64BigEndian(Span destination, long value) { @@ -345,7 +420,12 @@ public static bool TryWriteInt64BigEndian(Span destination, long value) /// /// Writes a into a span of bytes, as big endian. /// - /// If the span is too small to contain the value, return false. + /// The span of bytes where the value is to be written, as big endian. + /// The value to write into the span of bytes. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Writes exactly 16 bytes to the beginning of the span. [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryWriteInt128BigEndian(Span destination, Int128 value) { @@ -361,7 +441,12 @@ public static bool TryWriteInt128BigEndian(Span destination, Int128 value) /// /// Writes a into a span of bytes, as big endian. /// - /// If the span is too small to contain the value, return false. + /// The span of bytes where the value is to be written, as big endian. + /// The value to write into the span of bytes. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Writes exactly 4 bytes on 32-bit platforms -or- 8 bytes on 64-bit platforms to the beginning of the span. [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryWriteIntPtrBigEndian(Span destination, nint value) { @@ -398,7 +483,12 @@ public static bool TryWriteSingleBigEndian(Span destination, float value) /// /// Write a into a span of bytes, as big endian. /// - /// If the span is too small to contain the value, return false. + /// The span of bytes where the value is to be written, as big endian. + /// The value to write into the span of bytes. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Writes exactly 2 bytes to the beginning of the span. [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryWriteUInt16BigEndian(Span destination, ushort value) @@ -415,7 +505,12 @@ public static bool TryWriteUInt16BigEndian(Span destination, ushort value) /// /// Write a into a span of bytes, as big endian. /// - /// If the span is too small to contain the value, return false. + /// The span of bytes where the value is to be written, as big endian. + /// The value to write into the span of bytes. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Writes exactly 4 bytes to the beginning of the span. [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryWriteUInt32BigEndian(Span destination, uint value) @@ -432,7 +527,12 @@ public static bool TryWriteUInt32BigEndian(Span destination, uint value) /// /// Write a into a span of bytes, as big endian. /// - /// If the span is too small to contain the value, return false. + /// The span of bytes where the value is to be written, as big endian. + /// The value to write into the span of bytes. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Writes exactly 8 bytes to the beginning of the span. [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryWriteUInt64BigEndian(Span destination, ulong value) @@ -449,7 +549,12 @@ public static bool TryWriteUInt64BigEndian(Span destination, ulong value) /// /// Writes a into a span of bytes, as big endian. /// - /// If the span is too small to contain the value, return false. + /// The span of bytes where the value is to be written, as big endian. + /// The value to write into the span of bytes. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Writes exactly 16 bytes to the beginning of the span. [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryWriteUInt128BigEndian(Span destination, UInt128 value) @@ -466,7 +571,12 @@ public static bool TryWriteUInt128BigEndian(Span destination, UInt128 valu /// /// Writes a into a span of bytes, as big endian. /// - /// If the span is too small to contain the value, return false. + /// The span of bytes where the value is to be written, as big endian. + /// The value to write into the span of bytes. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Writes exactly 4 bytes on 32-bit platforms -or- 8 bytes on 64-bit platforms to the beginning of the span. [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryWriteUIntPtrBigEndian(Span destination, nuint value) diff --git a/src/libraries/System.Private.CoreLib/src/System/Buffers/Binary/BinaryPrimitives.WriteLittleEndian.cs b/src/libraries/System.Private.CoreLib/src/System/Buffers/Binary/BinaryPrimitives.WriteLittleEndian.cs index f8a92a3e4dc489..5da64da58368a5 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Buffers/Binary/BinaryPrimitives.WriteLittleEndian.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Buffers/Binary/BinaryPrimitives.WriteLittleEndian.cs @@ -57,6 +57,12 @@ public static void WriteHalfLittleEndian(Span destination, Half value) /// /// Writes a into a span of bytes, as little endian. /// + /// The span of bytes where the value is to be written, as little endian. + /// The value to write into the span of bytes. + /// Writes exactly 2 bytes to the beginning of the span. + /// + /// is too small to contain a . + /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void WriteInt16LittleEndian(Span destination, short value) { @@ -74,6 +80,12 @@ public static void WriteInt16LittleEndian(Span destination, short value) /// /// Writes a into a span of bytes, as little endian. /// + /// The span of bytes where the value is to be written, as little endian. + /// The value to write into the span of bytes. + /// Writes exactly 4 bytes to the beginning of the span. + /// + /// is too small to contain a . + /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void WriteInt32LittleEndian(Span destination, int value) { @@ -91,6 +103,12 @@ public static void WriteInt32LittleEndian(Span destination, int value) /// /// Writes a into a span of bytes, as little endian. /// + /// The span of bytes where the value is to be written, as little endian. + /// The value to write into the span of bytes. + /// Writes exactly 8 bytes to the beginning of the span. + /// + /// is too small to contain a . + /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void WriteInt64LittleEndian(Span destination, long value) { @@ -108,6 +126,12 @@ public static void WriteInt64LittleEndian(Span destination, long value) /// /// Writes a into a span of bytes, as little endian. /// + /// The span of bytes where the value is to be written, as little endian. + /// The value to write into the span of bytes. + /// Writes exactly 16 bytes to the beginning of the span. + /// + /// is too small to contain a . + /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void WriteInt128LittleEndian(Span destination, Int128 value) { @@ -125,6 +149,12 @@ public static void WriteInt128LittleEndian(Span destination, Int128 value) /// /// Writes a into a span of bytes, as little endian. /// + /// The span of bytes where the value is to be written, as little endian. + /// The value to write into the span of bytes. + /// Writes exactly 4 bytes on 32-bit platforms -or- 8 bytes on 64-bit platforms to the beginning of the span. + /// + /// is too small to contain a . + /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void WriteIntPtrLittleEndian(Span destination, nint value) { @@ -165,6 +195,12 @@ public static void WriteSingleLittleEndian(Span destination, float value) /// /// Write a into a span of bytes, as little endian. /// + /// The span of bytes where the value is to be written, as little endian. + /// The value to write into the span of bytes. + /// Writes exactly 2 bytes to the beginning of the span. + /// + /// is too small to contain a . + /// [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void WriteUInt16LittleEndian(Span destination, ushort value) @@ -183,6 +219,12 @@ public static void WriteUInt16LittleEndian(Span destination, ushort value) /// /// Write a into a span of bytes, as little endian. /// + /// The span of bytes where the value is to be written, as little endian. + /// The value to write into the span of bytes. + /// Writes exactly 4 bytes to the beginning of the span. + /// + /// is too small to contain a . + /// [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void WriteUInt32LittleEndian(Span destination, uint value) @@ -201,6 +243,12 @@ public static void WriteUInt32LittleEndian(Span destination, uint value) /// /// Write a into a span of bytes, as little endian. /// + /// The span of bytes where the value is to be written, as little endian. + /// The value to write into the span of bytes. + /// Writes exactly 8 bytes to the beginning of the span. + /// + /// is too small to contain a . + /// [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void WriteUInt64LittleEndian(Span destination, ulong value) @@ -219,6 +267,12 @@ public static void WriteUInt64LittleEndian(Span destination, ulong value) /// /// Writes a into a span of bytes, as little endian. /// + /// The span of bytes where the value is to be written, as little endian. + /// The value to write into the span of bytes. + /// Writes exactly 16 bytes to the beginning of the span. + /// + /// is too small to contain a . + /// [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void WriteUInt128LittleEndian(Span destination, UInt128 value) @@ -237,6 +291,12 @@ public static void WriteUInt128LittleEndian(Span destination, UInt128 valu /// /// Writes a into a span of bytes, as little endian. /// + /// The span of bytes where the value is to be written, as little endian. + /// The value to write into the span of bytes. + /// Writes exactly 4 bytes on 32-bit platforms -or- 8 bytes on 64-bit platforms to the beginning of the span. + /// + /// is too small to contain a . + /// [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void WriteUIntPtrLittleEndian(Span destination, nuint value) @@ -297,7 +357,12 @@ public static bool TryWriteHalfLittleEndian(Span destination, Half value) /// /// Writes a into a span of bytes, as little endian. /// - /// If the span is too small to contain the value, return false. + /// The span of bytes where the value is to be written, as little endian. + /// The value to write into the span of bytes. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Writes exactly 2 bytes to the beginning of the span. [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryWriteInt16LittleEndian(Span destination, short value) { @@ -313,7 +378,12 @@ public static bool TryWriteInt16LittleEndian(Span destination, short value /// /// Writes a into a span of bytes, as little endian. /// - /// If the span is too small to contain the value, return false. + /// The span of bytes where the value is to be written, as little endian. + /// The value to write into the span of bytes. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Writes exactly 4 bytes to the beginning of the span. [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryWriteInt32LittleEndian(Span destination, int value) { @@ -329,7 +399,12 @@ public static bool TryWriteInt32LittleEndian(Span destination, int value) /// /// Writes a into a span of bytes, as little endian. /// - /// If the span is too small to contain the value, return false. + /// The span of bytes where the value is to be written, as little endian. + /// The value to write into the span of bytes. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Writes exactly 8 bytes to the beginning of the span. [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryWriteInt64LittleEndian(Span destination, long value) { @@ -345,7 +420,12 @@ public static bool TryWriteInt64LittleEndian(Span destination, long value) /// /// Writes a into a span of bytes, as little endian. /// - /// If the span is too small to contain the value, return false. + /// The span of bytes where the value is to be written, as little endian. + /// The value to write into the span of bytes. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Writes exactly 16 bytes to the beginning of the span. [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryWriteInt128LittleEndian(Span destination, Int128 value) { @@ -361,7 +441,12 @@ public static bool TryWriteInt128LittleEndian(Span destination, Int128 val /// /// Writes a into a span of bytes, as little endian. /// - /// If the span is too small to contain the value, return false. + /// The span of bytes where the value is to be written, as little endian. + /// The value to write into the span of bytes. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Writes exactly 4 bytes on 32-bit platforms -or- 8 bytes on 64-bit platforms to the beginning of the span. [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryWriteIntPtrLittleEndian(Span destination, nint value) { @@ -398,7 +483,12 @@ public static bool TryWriteSingleLittleEndian(Span destination, float valu /// /// Write a into a span of bytes, as little endian. /// - /// If the span is too small to contain the value, return false. + /// The span of bytes where the value is to be written, as little endian. + /// The value to write into the span of bytes. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Writes exactly 2 bytes to the beginning of the span. [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryWriteUInt16LittleEndian(Span destination, ushort value) @@ -415,7 +505,12 @@ public static bool TryWriteUInt16LittleEndian(Span destination, ushort val /// /// Write a into a span of bytes, as little endian. /// - /// If the span is too small to contain the value, return false. + /// The span of bytes where the value is to be written, as little endian. + /// The value to write into the span of bytes. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Writes exactly 4 bytes to the beginning of the span. [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryWriteUInt32LittleEndian(Span destination, uint value) @@ -432,7 +527,12 @@ public static bool TryWriteUInt32LittleEndian(Span destination, uint value /// /// Write a into a span of bytes, as little endian. /// - /// If the span is too small to contain the value, return false. + /// The span of bytes where the value is to be written, as little endian. + /// The value to write into the span of bytes. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Writes exactly 8 bytes to the beginning of the span. [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryWriteUInt64LittleEndian(Span destination, ulong value) @@ -449,7 +549,12 @@ public static bool TryWriteUInt64LittleEndian(Span destination, ulong valu /// /// Writes a into a span of bytes, as little endian. /// - /// If the span is too small to contain the value, return false. + /// The span of bytes where the value is to be written, as little endian. + /// The value to write into the span of bytes. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Writes exactly 16 bytes to the beginning of the span. [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryWriteUInt128LittleEndian(Span destination, UInt128 value) @@ -466,7 +571,12 @@ public static bool TryWriteUInt128LittleEndian(Span destination, UInt128 v /// /// Writes a into a span of bytes, as little endian. /// - /// If the span is too small to contain the value, return false. + /// The span of bytes where the value is to be written, as little endian. + /// The value to write into the span of bytes. + /// + /// if the span is large enough to contain a ; otherwise, . + /// + /// Writes exactly 4 bytes on 32-bit platforms -or- 8 bytes on 64-bit platforms to the beginning of the span. [CLSCompliant(false)] [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool TryWriteUIntPtrLittleEndian(Span destination, nuint value) diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/ListDictionaryInternal.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/ListDictionaryInternal.cs index e846bd4eaaafa5..730356461254dd 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Collections/ListDictionaryInternal.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Collections/ListDictionaryInternal.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.Diagnostics; using System.Runtime.CompilerServices; namespace System.Collections @@ -8,6 +9,8 @@ namespace System.Collections /// Implements using a singly linked list. /// Recommended for collections that typically include fewer than 10 items. /// + [DebuggerDisplay("Count = {count}")] + [DebuggerTypeProxy(typeof(ListDictionaryInternalDebugView))] [Serializable] [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] // Needs to be public to support binary serialization compatibility @@ -403,5 +406,31 @@ private sealed class DictionaryNode public object? value; public DictionaryNode? next; } + + private sealed class ListDictionaryInternalDebugView + { + private readonly ListDictionaryInternal _list; + + public ListDictionaryInternalDebugView(ListDictionaryInternal list) + { + ArgumentNullException.ThrowIfNull(list); + _list = list; + } + + [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] + public KeyValuePairs[] Items + { + get + { + var array = new KeyValuePairs[_list.count]; + int index = 0; + for (DictionaryNode? node = _list.head; node != null; node = node.next) + { + array[index++] = new KeyValuePairs(node.key, node.value); + } + return array; + } + } + } } } diff --git a/src/libraries/System.Private.CoreLib/src/System/DefaultBinder.cs b/src/libraries/System.Private.CoreLib/src/System/DefaultBinder.cs index 293ecd84893802..3adad0979c6ebf 100644 --- a/src/libraries/System.Private.CoreLib/src/System/DefaultBinder.cs +++ b/src/libraries/System.Private.CoreLib/src/System/DefaultBinder.cs @@ -52,7 +52,7 @@ public sealed override MethodBase BindToMethod( for (i = 0; i < candidates.Length; i++) { - ParameterInfo[] par = candidates[i]!.GetParametersNoCopy(); + ReadOnlySpan par = candidates[i]!.GetParametersAsSpan(); // args.Length + 1 takes into account the possibility of a last paramArray that can be omitted paramOrder[i] = new int[(par.Length > args.Length) ? par.Length : args.Length]; @@ -104,7 +104,7 @@ public sealed override MethodBase BindToMethod( if (candidates[i] == null) continue; - ParameterInfo[] par = candidates[i]!.GetParametersNoCopy(); + ReadOnlySpan par = candidates[i]!.GetParametersAsSpan(); #region Match method by parameter count if (par.Length == 0) @@ -306,7 +306,7 @@ public sealed override MethodBase BindToMethod( // If the parameters and the args are not the same length or there is a paramArray // then we need to create a argument array. - ParameterInfo[] parms = candidates[0]!.GetParametersNoCopy(); + ReadOnlySpan parms = candidates[0]!.GetParametersAsSpan(); if (parms.Length == args.Length) { @@ -397,7 +397,7 @@ public sealed override MethodBase BindToMethod( // If the parameters and the args are not the same length or there is a paramArray // then we need to create a argument array. - ParameterInfo[] parameters = bestMatch.GetParametersNoCopy(); + ReadOnlySpan parameters = bestMatch.GetParametersAsSpan(); if (parameters.Length == args.Length) { if (paramArrayTypes[currentMin] != null) @@ -562,7 +562,7 @@ public sealed override FieldInfo BindToField(BindingFlags bindingAttr, FieldInfo int CurIdx = 0; for (i = 0; i < candidates.Length; i++) { - ParameterInfo[] par = candidates[i].GetParametersNoCopy(); + ReadOnlySpan par = candidates[i].GetParametersAsSpan(); if (par.Length != types.Length) continue; for (j = 0; j < types.Length; j++) @@ -797,7 +797,7 @@ public sealed override void ReorderArgumentArray(ref object?[] args, object stat for (int i = 0; i < match.Length; i++) { - ParameterInfo[] par = match[i].GetParametersNoCopy(); + ReadOnlySpan par = match[i].GetParametersAsSpan(); if (par.Length == 0) { continue; @@ -861,8 +861,8 @@ public sealed override void ReorderArgumentArray(ref object?[] args, object stat return bestMatch; } - private static int FindMostSpecific(ParameterInfo[] p1, int[] paramOrder1, Type? paramArrayType1, - ParameterInfo[] p2, int[] paramOrder2, Type? paramArrayType2, + private static int FindMostSpecific(ReadOnlySpan p1, int[] paramOrder1, Type? paramArrayType1, + ReadOnlySpan p2, int[] paramOrder2, Type? paramArrayType2, Type[] types, object?[]? args) { // A method using params is always less specific than one not using params @@ -1016,8 +1016,8 @@ private static int FindMostSpecificMethod(MethodBase m1, int[] paramOrder1, Type Type[] types, object?[]? args) { // Find the most specific method based on the parameters. - int res = FindMostSpecific(m1.GetParametersNoCopy(), paramOrder1, paramArrayType1, - m2.GetParametersNoCopy(), paramOrder2, paramArrayType2, types, args); + int res = FindMostSpecific(m1.GetParametersAsSpan(), paramOrder1, paramArrayType1, + m2.GetParametersAsSpan(), paramOrder2, paramArrayType2, types, args); // If the match was not ambiguous then return the result. if (res != 0) @@ -1096,8 +1096,8 @@ private static int FindMostSpecificProperty(PropertyInfo cur1, PropertyInfo cur2 public static bool CompareMethodSig(MethodBase m1, MethodBase m2) { - ParameterInfo[] params1 = m1.GetParametersNoCopy(); - ParameterInfo[] params2 = m2.GetParametersNoCopy(); + ReadOnlySpan params1 = m1.GetParametersAsSpan(); + ReadOnlySpan params2 = m2.GetParametersAsSpan(); if (params1.Length != params2.Length) return false; @@ -1181,7 +1181,7 @@ private static void ReorderParams(int[] paramOrder, object?[] vars) // as the values and maps to the parameters of the method. We store the mapping // from the parameters to the names in the paramOrder array. All parameters that // don't have matching names are then stored in the array in order. - private static bool CreateParamOrder(int[] paramOrder, ParameterInfo[] pars, string[] names) + private static bool CreateParamOrder(int[] paramOrder, ReadOnlySpan pars, string[] names) { bool[] used = new bool[pars.Length]; diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/StackTrace.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/StackTrace.cs index 52a04a68b910a9..06d6483088e340 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/StackTrace.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/StackTrace.cs @@ -279,17 +279,19 @@ internal void ToString(TraceFormat traceFormat, StringBuilder sb) sb.Append(']'); } - ParameterInfo[]? pi = null; + ReadOnlySpan pi = default; + bool appendParameters = true; try { - pi = mb.GetParameters(); + pi = mb.GetParametersAsSpan(); } catch { // The parameter info cannot be loaded, so we don't // append the parameter list. + appendParameters = false; } - if (pi != null) + if (appendParameters) { // arguments printing sb.Append('('); 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 d1b11dc006a63c..1d4af86e0c4d9e 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 @@ -3197,10 +3197,6 @@ private static bool AttributeTypeNamesMatch(Type attributeType, Type reflectedAt for (int i = 0; i < methods.Length; i++) { MethodInfo method = methods[i]; - ParameterInfo[] args = method.GetParameters(); - - // Get the EventDescriptor (from the Custom attributes) - EventAttribute? eventAttribute = (EventAttribute?)GetCustomAttributeHelper(method, typeof(EventAttribute), flags); // Compat: until v4.5.1 we ignored any non-void returning methods as well as virtual methods for // the only reason of limiting the number of methods considered to be events. This broke a common @@ -3212,6 +3208,9 @@ private static bool AttributeTypeNamesMatch(Type attributeType, Type reflectedAt continue; } + // Get the EventDescriptor (from the Custom attributes) + EventAttribute? eventAttribute = (EventAttribute?)GetCustomAttributeHelper(method, typeof(EventAttribute), flags); + if (eventSourceType.IsAbstract) { if (eventAttribute != null) @@ -3312,6 +3311,8 @@ private static bool AttributeTypeNamesMatch(Type attributeType, Type reflectedAt } } + ParameterInfo[] args = method.GetParameters(); + bool hasRelatedActivityID = RemoveFirstArgIfRelatedActivityId(ref args); if (!(source != null && source.SelfDescribingEvents)) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Enum.cs b/src/libraries/System.Private.CoreLib/src/System/Enum.cs index 99d7cc3dd0e45e..7e9a94a83ed9db 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Enum.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Enum.cs @@ -465,9 +465,9 @@ public bool HasFlag(Enum flag) } } - /// Returns a telling whether a given integral value, or its name as a string, exists in a specified enumeration. + /// Returns a telling whether a given integral value exists in a specified enumeration. /// The type of the enumeration. - /// The value or name of a constant in . + /// The value in . /// if a given integral value exists in a specified enumeration; , otherwise. [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe bool IsDefined(TEnum value) where TEnum : struct, Enum diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/DateTimeParse.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/DateTimeParse.cs index a8f68fb94ebf98..dd2b7e91a9d212 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Globalization/DateTimeParse.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/DateTimeParse.cs @@ -84,7 +84,7 @@ internal static bool TryParseExact(ReadOnlySpan s, ReadOnlySpan form { if (s.Length == 0) { - result.SetFailure(ParseFailureKind.Format_BadDateTime); + result.SetBadDateTimeFailure(); return false; } @@ -171,13 +171,13 @@ internal static bool TryParseExactMultiple(ReadOnlySpan s, string?[]? form { if (formats == null) { - result.SetFailure(ParseFailureKind.ArgumentNull_String, null, nameof(formats)); + result.SetFailure(ParseFailureKind.ArgumentNull_String); return false; } if (s.Length == 0) { - result.SetFailure(ParseFailureKind.Format_BadDateTime); + result.SetBadDateTimeFailure(); return false; } @@ -2506,7 +2506,7 @@ internal static bool TryParse(ReadOnlySpan s, DateTimeFormatInfo dtfi, Dat { if (s.Length == 0) { - result.SetFailure(ParseFailureKind.Format_BadDateTime); + result.SetBadDateTimeFailure(); return false; } @@ -5179,33 +5179,33 @@ private static Exception GetDateTimeParseException(scoped ref DateTimeResult res switch (result.failure) { case ParseFailureKind.ArgumentNull_String: - return new ArgumentNullException(result.failureArgumentName, SR.ArgumentNull_String); + return new ArgumentNullException("formats", SR.ArgumentNull_String); case ParseFailureKind.Format_BadDatePattern: - return new FormatException(SR.Format(SR.Format_BadDatePattern, result.failureMessageFormatArgument)); + return new FormatException(SR.Format(SR.Format_BadDatePattern, new string(result.failureSpanArgument))); case ParseFailureKind.Format_BadDateTime: - return new FormatException(SR.Format(SR.Format_BadDateTime, result.failureMessageFormatArgument)); + return new FormatException(SR.Format(SR.Format_BadDateTime, new string(result.failureSpanArgument))); case ParseFailureKind.Format_BadDateTimeCalendar: - return new FormatException(SR.Format(SR.Format_BadDateTimeCalendar, new string(result.originalDateTimeString), result.calendar)); + return new FormatException(SR.Format(SR.Format_BadDateTimeCalendar, new string(result.failureSpanArgument), result.calendar)); case ParseFailureKind.Format_BadDayOfWeek: - return new FormatException(SR.Format(SR.Format_BadDayOfWeek, new string(result.originalDateTimeString))); + return new FormatException(SR.Format(SR.Format_BadDayOfWeek, new string(result.failureSpanArgument))); case ParseFailureKind.Format_BadFormatSpecifier: - return new FormatException(SR.Format(SR.Format_BadFormatSpecifier, new string(result.failedFormatSpecifier))); + return new FormatException(SR.Format(SR.Format_BadFormatSpecifier, new string(result.failureSpanArgument))); case ParseFailureKind.Format_BadQuote: - return new FormatException(SR.Format(SR.Format_BadQuote, result.failureMessageFormatArgument)); + return new FormatException(SR.Format(SR.Format_BadQuote, (char)result.failureIntArgument)); case ParseFailureKind.Format_DateOutOfRange: - return new FormatException(SR.Format(SR.Format_DateOutOfRange, new string(result.originalDateTimeString))); + return new FormatException(SR.Format(SR.Format_DateOutOfRange, new string(result.failureSpanArgument))); case ParseFailureKind.Format_MissingIncompleteDate: - return new FormatException(SR.Format(SR.Format_MissingIncompleteDate, new string(result.originalDateTimeString))); + return new FormatException(SR.Format(SR.Format_MissingIncompleteDate, new string(result.failureSpanArgument))); case ParseFailureKind.Format_NoFormatSpecifier: return new FormatException(SR.Format_NoFormatSpecifier); case ParseFailureKind.Format_OffsetOutOfRange: - return new FormatException(SR.Format(SR.Format_OffsetOutOfRange, new string(result.originalDateTimeString))); + return new FormatException(SR.Format(SR.Format_OffsetOutOfRange, new string(result.failureSpanArgument))); case ParseFailureKind.Format_RepeatDateTimePattern: - return new FormatException(SR.Format(SR.Format_RepeatDateTimePattern, result.failureMessageFormatArgument)); + return new FormatException(SR.Format(SR.Format_RepeatDateTimePattern, (char)result.failureIntArgument)); case ParseFailureKind.Format_UnknownDateTimeWord: - return new FormatException(SR.Format(SR.Format_UnknownDateTimeWord, new string(result.originalDateTimeString), result.failureMessageFormatArgument)); + return new FormatException(SR.Format(SR.Format_UnknownDateTimeWord, new string(result.failureSpanArgument), result.failureIntArgument)); case ParseFailureKind.Format_UTCOutOfRange: - return new FormatException(SR.Format(SR.Format_UTCOutOfRange, new string(result.originalDateTimeString))); + return new FormatException(SR.Format(SR.Format_UTCOutOfRange, new string(result.failureSpanArgument))); default: Debug.Fail("Unknown DateTimeParseFailure: " + result.failure.ToString()); return null!; @@ -6088,14 +6088,12 @@ internal ref struct DateTimeResult internal DateTime parsedDate; internal ParseFailureKind failure; - internal object? failureMessageFormatArgument; - internal string failureArgumentName; - internal ReadOnlySpan originalDateTimeString; - internal ReadOnlySpan failedFormatSpecifier; + internal ReadOnlySpan failureSpanArgument; // initially the original date time string, but may be overwritten + internal int failureIntArgument; internal void Init(ReadOnlySpan originalDateTimeString) { - this.originalDateTimeString = originalDateTimeString; + this.failureSpanArgument = originalDateTimeString; Year = -1; Month = -1; Day = -1; @@ -6118,32 +6116,29 @@ internal void SetBadFormatSpecifierFailure() internal void SetBadFormatSpecifierFailure(ReadOnlySpan failedFormatSpecifier) { this.failure = ParseFailureKind.Format_BadFormatSpecifier; - this.failedFormatSpecifier = failedFormatSpecifier; + this.failureSpanArgument = failedFormatSpecifier; } internal void SetBadDateTimeFailure() { this.failure = ParseFailureKind.Format_BadDateTime; - this.failureMessageFormatArgument = null; } internal void SetFailure(ParseFailureKind failure) { this.failure = failure; - this.failureMessageFormatArgument = null; } - internal void SetFailure(ParseFailureKind failure, object? failureMessageFormatArgument) + internal void SetFailure(ParseFailureKind failure, string failureStringArgument) { this.failure = failure; - this.failureMessageFormatArgument = failureMessageFormatArgument; + this.failureSpanArgument = failureStringArgument; } - internal void SetFailure(ParseFailureKind failure, object? failureMessageFormatArgument, string failureArgumentName) + internal void SetFailure(ParseFailureKind failure, int failureIntArgument) { this.failure = failure; - this.failureMessageFormatArgument = failureMessageFormatArgument; - this.failureArgumentName = failureArgumentName; + this.failureIntArgument = failureIntArgument; } } 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 8238d389935989..12ad222031f7ec 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/DirectoryInfo.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/DirectoryInfo.cs @@ -9,7 +9,7 @@ namespace System.IO { - public sealed partial class DirectoryInfo : FileSystemInfo + public sealed class DirectoryInfo : FileSystemInfo { private bool _isNormalized; diff --git a/src/libraries/System.Private.CoreLib/src/System/Math.cs b/src/libraries/System.Private.CoreLib/src/System/Math.cs index 7d20cc72202dd1..266e49fc39dd94 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Math.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Math.cs @@ -1033,7 +1033,7 @@ public static double Min(double val1, double val2) // // It propagates NaN inputs back to the caller and // otherwise returns the lesser of the inputs. It - // treats +0 as lesser than -0 as per the specification. + // treats +0 as greater than -0 as per the specification. if (val1 != val2) { @@ -1091,7 +1091,7 @@ public static float Min(float val1, float val2) // // It propagates NaN inputs back to the caller and // otherwise returns the lesser of the inputs. It - // treats +0 as lesser than -0 as per the specification. + // treats +0 as greater than -0 as per the specification. if (val1 != val2) { @@ -1145,7 +1145,7 @@ public static double MinMagnitude(double x, double y) // // It propagates NaN inputs back to the caller and // otherwise returns the input with a lesser magnitude. - // It treats +0 as lesser than -0 as per the specification. + // It treats +0 as greater than -0 as per the specification. double ax = Abs(x); double ay = Abs(y); diff --git a/src/libraries/System.Private.CoreLib/src/System/MathF.cs b/src/libraries/System.Private.CoreLib/src/System/MathF.cs index 2726d14492f6ab..de0efc14f0ac4f 100644 --- a/src/libraries/System.Private.CoreLib/src/System/MathF.cs +++ b/src/libraries/System.Private.CoreLib/src/System/MathF.cs @@ -285,7 +285,7 @@ public static float MinMagnitude(float x, float y) // // It propagates NaN inputs back to the caller and // otherwise returns the input with a lesser magnitude. - // It treats +0 as lesser than -0 as per the specification. + // It treats +0 as greater than -0 as per the specification. float ax = Abs(x); float ay = Abs(y); diff --git a/src/libraries/System.Private.CoreLib/src/System/Random.cs b/src/libraries/System.Private.CoreLib/src/System/Random.cs index 5f472d0ca1029d..65043bf4c00f61 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Random.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Random.cs @@ -1,8 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Buffers; using System.Diagnostics; +using System.Numerics; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; namespace System { @@ -194,6 +197,38 @@ public void GetItems(ReadOnlySpan choices, Span destination) throw new ArgumentException(SR.Arg_EmptySpan, nameof(choices)); } + // The most expensive part of this operation is the call to get random data. We can + // do so potentially many fewer times if: + // - the number of choices is <= 256. This let's us get a single byte per choice. + // - the number of choices is a power of two. This let's us use a byte and simply mask off + // unnecessary bits cheaply rather than needing to use rejection sampling. + // In such a case, we can grab a bunch of random bytes in one call. + if (BitOperations.IsPow2(choices.Length) && choices.Length <= 256) + { + Span randomBytes = stackalloc byte[512]; // arbitrary size, a balance between stack consumed and number of random calls required + while (!destination.IsEmpty) + { + if (destination.Length < randomBytes.Length) + { + randomBytes = randomBytes.Slice(0, destination.Length); + } + + NextBytes(randomBytes); + + int mask = choices.Length - 1; + for (int i = 0; i < randomBytes.Length; i++) + { + destination[i] = choices[randomBytes[i] & mask]; + } + + destination = destination.Slice(randomBytes.Length); + } + + return; + } + + // Simple fallback: get each item individually, generating a new random Int32 for each + // item. This is slower than the above, but it works for all types and sizes of choices. for (int i = 0; i < destination.Length; i++) { destination[i] = choices[Next(choices.Length)]; diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/AssemblyNameParser.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/AssemblyNameParser.cs index 2b8a93ff4f2686..dbaaefd4d8c9dd 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/AssemblyNameParser.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/AssemblyNameParser.cs @@ -90,7 +90,7 @@ private AssemblyNameParts Parse() if (token != Token.String) ThrowInvalidAssemblyName(); - if (string.IsNullOrEmpty(name) || name.AsSpan().ContainsAny('/', '\\', ':')) + if (string.IsNullOrEmpty(name)) ThrowInvalidAssemblyName(); Version? version = null; diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs index 8a756b1ef1b0a9..7a0c6461146c42 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs @@ -329,15 +329,10 @@ public override string ToString() public override MethodInfo GetBaseDefinition() => this; - public override ParameterInfo[] GetParameters() - { - ParameterInfo[] privateParameters = LoadParameters(); - ParameterInfo[] parameters = new ParameterInfo[privateParameters.Length]; - Array.Copy(privateParameters, parameters, privateParameters.Length); - return parameters; - } + public override ParameterInfo[] GetParameters() => + GetParametersAsSpan().ToArray(); - internal override ParameterInfo[] GetParametersNoCopy() => LoadParameters(); + internal override ReadOnlySpan GetParametersAsSpan() => LoadParameters(); public override MethodImplAttributes GetMethodImplementationFlags() => MethodImplAttributes.IL | MethodImplAttributes.NoInlining; diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/EventInfo.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/EventInfo.cs index 07e1f5bd15c07d..a42feec69e5d5c 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/EventInfo.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/EventInfo.cs @@ -45,7 +45,7 @@ public virtual Type? EventHandlerType get { MethodInfo m = GetAddMethod(true)!; - ParameterInfo[] p = m.GetParametersNoCopy(); + ReadOnlySpan p = m.GetParametersAsSpan(); Type del = typeof(Delegate); for (int i = 0; i < p.Length; i++) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/InvokerEmitUtil.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/InvokerEmitUtil.cs index c890452df3ca2f..30745bdcd708d5 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/InvokerEmitUtil.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/InvokerEmitUtil.cs @@ -46,7 +46,7 @@ public static unsafe InvokeFunc_Obj4Args CreateInvokeDelegate_Obj4Args(MethodBas } // Push the arguments. - ParameterInfo[] parameters = method.GetParametersNoCopy(); + ReadOnlySpan parameters = method.GetParametersAsSpan(); for (int i = 0; i < parameters.Length; i++) { RuntimeType parameterType = (RuntimeType)parameters[i].ParameterType; @@ -114,7 +114,7 @@ public static unsafe InvokeFunc_ObjSpanArgs CreateInvokeDelegate_ObjSpanArgs(Met } // Push the arguments. - ParameterInfo[] parameters = method.GetParametersNoCopy(); + ReadOnlySpan parameters = method.GetParametersAsSpan(); for (int i = 0; i < parameters.Length; i++) { RuntimeType parameterType = (RuntimeType)parameters[i].ParameterType; @@ -171,7 +171,7 @@ public static unsafe InvokeFunc_RefArgs CreateInvokeDelegate_RefArgs(MethodBase } // Push the arguments. - ParameterInfo[] parameters = method.GetParametersNoCopy(); + ReadOnlySpan parameters = method.GetParametersAsSpan(); for (int i = 0; i < parameters.Length; i++) { il.Emit(OpCodes.Ldarg_2); diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBase.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBase.cs index d4dd02b06da47c..087f9953a3af4d 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBase.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBase.cs @@ -125,7 +125,7 @@ internal static void AppendParameters(ref ValueStringBuilder sbParamList, Type[] internal virtual Type[] GetParameterTypes() { - ParameterInfo[] paramInfo = GetParametersNoCopy(); + ReadOnlySpan paramInfo = GetParametersAsSpan(); if (paramInfo.Length == 0) { return Type.EmptyTypes; diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs index 6f1667713ca7e5..02967f04b59de1 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs @@ -365,7 +365,7 @@ BindingFlags invokeAttr // Convert a Type.Missing to the default value. if (ReferenceEquals(arg, Type.Missing)) { - arg = HandleTypeMissing(_method.GetParametersNoCopy()[i], sigType); + arg = HandleTypeMissing(_method.GetParametersAsSpan()[i], sigType); shouldCopyBack[i] = true; } diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/NullabilityInfoContext.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/NullabilityInfoContext.cs index a19e332dd16fc0..e3e4da36d096b7 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/NullabilityInfoContext.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/NullabilityInfoContext.cs @@ -96,7 +96,7 @@ private void CheckParameterMetadataType(ParameterInfo parameter, NullabilityInfo } else { - ParameterInfo[] parameters = metaMethod.GetParameters(); + ReadOnlySpan parameters = metaMethod.GetParametersAsSpan(); for (int i = 0; i < parameters.Length; i++) { if (parameter.Position == i && @@ -200,7 +200,7 @@ public NullabilityInfo Create(PropertyInfo propertyInfo) if (setter != null) { - CheckNullabilityAttributes(nullability, setter.GetParameters()[^1].GetCustomAttributesData()); + CheckNullabilityAttributes(nullability, setter.GetParametersAsSpan()[^1].GetCustomAttributesData()); } else { @@ -444,7 +444,7 @@ private static Type GetPropertyMetaType(PropertyInfo property) return method.ReturnType; } - return property.GetSetMethod(true)!.GetParameters()[0].ParameterType; + return property.GetSetMethod(true)!.GetParametersAsSpan()[0].ParameterType; } private void CheckGenericParameters(NullabilityInfo nullability, MemberInfo metaMember, Type metaType, Type? reflectedType) diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/ParameterInfo.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/ParameterInfo.cs index 6c93d8b7d01dc7..5285f69b919767 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/ParameterInfo.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/ParameterInfo.cs @@ -65,7 +65,7 @@ public object GetRealObject(StreamingContext context) if (MemberImpl == null) throw new SerializationException(SR.Serialization_InsufficientState); - ParameterInfo[] args; + ReadOnlySpan args; switch (MemberImpl.MemberType) { case MemberTypes.Constructor: @@ -79,9 +79,9 @@ public object GetRealObject(StreamingContext context) } else { - args = ((MethodBase)MemberImpl).GetParametersNoCopy(); + args = ((MethodBase)MemberImpl).GetParametersAsSpan(); - if (args != null && PositionImpl < args.Length) + if (PositionImpl < args.Length) return args[PositionImpl]; else throw new SerializationException(SR.Serialization_BadParameterInfo); @@ -90,7 +90,7 @@ public object GetRealObject(StreamingContext context) case MemberTypes.Property: args = ((PropertyInfo)MemberImpl).GetIndexParameters(); - if (args != null && PositionImpl > -1 && PositionImpl < args.Length) + if (PositionImpl > -1 && PositionImpl < args.Length) return args[PositionImpl]; else throw new SerializationException(SR.Serialization_BadParameterInfo); diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Architecture.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Architecture.cs index ec9641fffb75a5..2e1c3c5a4ebc29 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Architecture.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Architecture.cs @@ -50,5 +50,12 @@ public enum Architecture /// A PowerPC 64-bit (little-endian) processor architecture. /// Ppc64le, + /// + /// A RiscV 64-bit processor architecture. + /// + /// + /// This value indicates RV64GC set of extensions. + /// + RiscV64, } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.cs index 98dde70ae362db..11a3319196ad94 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.cs @@ -130,7 +130,7 @@ public static int SizeOf() return SizeOfHelper(t, throwIfNotMarshalable: true); } - public static unsafe int QueryInterface(IntPtr pUnk, in Guid iid, out IntPtr ppv) + public static unsafe int QueryInterface(IntPtr pUnk, ref readonly Guid iid, out IntPtr ppv) { ArgumentNullException.ThrowIfNull(pUnk); 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 281b00f0c8b347..1bb3db3da1940d 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 @@ -71,7 +71,7 @@ public static Architecture ProcessArchitecture #elif TARGET_POWERPC64 => Architecture.Ppc64le #elif TARGET_RISCV64 - => (Architecture)9 // TODO-RISCV64: go though API review for RiscV64 + => Architecture.RiscV64 #else #error Unknown Architecture #endif diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Loader/AssemblyLoadContext.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Loader/AssemblyLoadContext.cs index b8b4ba086ad69b..59123e42fb52a2 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Loader/AssemblyLoadContext.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Loader/AssemblyLoadContext.cs @@ -135,25 +135,32 @@ private void InitiateUnload() { RaiseUnloadEvent(); + InternalState previousState; + // When in Unloading state, we are not supposed to be called on the finalizer // as the native side is holding a strong reference after calling Unload lock (_unloadLock) { - Debug.Assert(_state == InternalState.Alive); - - var thisStrongHandle = GCHandle.Alloc(this, GCHandleType.Normal); - var thisStrongHandlePtr = GCHandle.ToIntPtr(thisStrongHandle); - // The underlying code will transform the original weak handle - // created by InitializeLoadContext to a strong handle - PrepareForAssemblyLoadContextRelease(_nativeAssemblyLoadContext, thisStrongHandlePtr); + previousState = _state; + if (previousState == InternalState.Alive) + { + var thisStrongHandle = GCHandle.Alloc(this, GCHandleType.Normal); + var thisStrongHandlePtr = GCHandle.ToIntPtr(thisStrongHandle); + // The underlying code will transform the original weak handle + // created by InitializeLoadContext to a strong handle + PrepareForAssemblyLoadContextRelease(_nativeAssemblyLoadContext, thisStrongHandlePtr); - _state = InternalState.Unloading; + _state = InternalState.Unloading; + } } - Dictionary> allContexts = AllContexts; - lock (allContexts) + if (previousState == InternalState.Alive) { - allContexts.Remove(_id); + Dictionary> allContexts = AllContexts; + lock (allContexts) + { + allContexts.Remove(_id); + } } } diff --git a/src/libraries/System.Private.CoreLib/src/System/RuntimeType.cs b/src/libraries/System.Private.CoreLib/src/System/RuntimeType.cs index 9bb9541c571bff..213b2ceef95840 100644 --- a/src/libraries/System.Private.CoreLib/src/System/RuntimeType.cs +++ b/src/libraries/System.Private.CoreLib/src/System/RuntimeType.cs @@ -658,7 +658,7 @@ public override bool IsAssignableFrom([NotNullWhen(true)] Type? c) // Invoke if (finalists == null && argCnt == 0 && - finalist.GetParametersNoCopy().Length == 0 && + finalist.GetParametersAsSpan().Length == 0 && (bindingFlags & BindingFlags.OptionalParamBinding) == 0) { return finalist.Invoke(target, bindingFlags, binder, providedArgs, culture); diff --git a/src/libraries/System.Private.CoreLib/src/System/SearchValues/AnyByteSearchValues.cs b/src/libraries/System.Private.CoreLib/src/System/SearchValues/AnyByteSearchValues.cs index a510214633fc1d..d95d557bd89a48 100644 --- a/src/libraries/System.Private.CoreLib/src/System/SearchValues/AnyByteSearchValues.cs +++ b/src/libraries/System.Private.CoreLib/src/System/SearchValues/AnyByteSearchValues.cs @@ -3,94 +3,56 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.Arm; +using System.Runtime.Intrinsics.Wasm; +using System.Runtime.Intrinsics.X86; namespace System.Buffers { internal sealed class AnyByteSearchValues : SearchValues { - private Vector512 _bitmaps; - private readonly BitVector256 _lookup; + private IndexOfAnyAsciiSearcher.AnyByteState _state; - public AnyByteSearchValues(ReadOnlySpan values) - { - IndexOfAnyAsciiSearcher.ComputeBitmap256(values, out Vector256 bitmap0, out Vector256 bitmap1, out _lookup); - _bitmaps = Vector512.Create(bitmap0, bitmap1); - } + public AnyByteSearchValues(ReadOnlySpan values) => + IndexOfAnyAsciiSearcher.ComputeAnyByteState(values, out _state); - internal override byte[] GetValues() => _lookup.GetByteValues(); + internal override byte[] GetValues() => + _state.Lookup.GetByteValues(); [MethodImpl(MethodImplOptions.AggressiveInlining)] internal override bool ContainsCore(byte value) => - _lookup.Contains(value); + _state.Lookup.Contains(value); + [CompExactlyDependsOn(typeof(Ssse3))] + [CompExactlyDependsOn(typeof(AdvSimd))] + [CompExactlyDependsOn(typeof(PackedSimd))] [MethodImpl(MethodImplOptions.AggressiveInlining)] internal override int IndexOfAny(ReadOnlySpan span) => - IndexOfAny(ref MemoryMarshal.GetReference(span), span.Length); + IndexOfAnyAsciiSearcher.IndexOfAnyVectorizedAnyByte( + ref MemoryMarshal.GetReference(span), span.Length, ref _state); + [CompExactlyDependsOn(typeof(Ssse3))] + [CompExactlyDependsOn(typeof(AdvSimd))] + [CompExactlyDependsOn(typeof(PackedSimd))] [MethodImpl(MethodImplOptions.AggressiveInlining)] internal override int IndexOfAnyExcept(ReadOnlySpan span) => - IndexOfAny(ref MemoryMarshal.GetReference(span), span.Length); + IndexOfAnyAsciiSearcher.IndexOfAnyVectorizedAnyByte( + ref MemoryMarshal.GetReference(span), span.Length, ref _state); + [CompExactlyDependsOn(typeof(Ssse3))] + [CompExactlyDependsOn(typeof(AdvSimd))] + [CompExactlyDependsOn(typeof(PackedSimd))] [MethodImpl(MethodImplOptions.AggressiveInlining)] internal override int LastIndexOfAny(ReadOnlySpan span) => - LastIndexOfAny(ref MemoryMarshal.GetReference(span), span.Length); + IndexOfAnyAsciiSearcher.LastIndexOfAnyVectorizedAnyByte( + ref MemoryMarshal.GetReference(span), span.Length, ref _state); + [CompExactlyDependsOn(typeof(Ssse3))] + [CompExactlyDependsOn(typeof(AdvSimd))] + [CompExactlyDependsOn(typeof(PackedSimd))] [MethodImpl(MethodImplOptions.AggressiveInlining)] internal override int LastIndexOfAnyExcept(ReadOnlySpan span) => - LastIndexOfAny(ref MemoryMarshal.GetReference(span), span.Length); - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private int IndexOfAny(ref byte searchSpace, int searchSpaceLength) - where TNegator : struct, IndexOfAnyAsciiSearcher.INegator - { - return IndexOfAnyAsciiSearcher.IsVectorizationSupported && searchSpaceLength >= sizeof(ulong) - ? IndexOfAnyAsciiSearcher.IndexOfAnyVectorizedAnyByte(ref searchSpace, searchSpaceLength, ref _bitmaps) - : IndexOfAnyScalar(ref searchSpace, searchSpaceLength); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private int LastIndexOfAny(ref byte searchSpace, int searchSpaceLength) - where TNegator : struct, IndexOfAnyAsciiSearcher.INegator - { - return IndexOfAnyAsciiSearcher.IsVectorizationSupported && searchSpaceLength >= sizeof(ulong) - ? IndexOfAnyAsciiSearcher.LastIndexOfAnyVectorizedAnyByte(ref searchSpace, searchSpaceLength, ref _bitmaps) - : LastIndexOfAnyScalar(ref searchSpace, searchSpaceLength); - } - - private int IndexOfAnyScalar(ref byte searchSpace, int searchSpaceLength) - where TNegator : struct, IndexOfAnyAsciiSearcher.INegator - { - ref byte searchSpaceEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength); - ref byte cur = ref searchSpace; - - while (!Unsafe.AreSame(ref cur, ref searchSpaceEnd)) - { - byte b = cur; - if (TNegator.NegateIfNeeded(_lookup.Contains(b))) - { - return (int)Unsafe.ByteOffset(ref searchSpace, ref cur); - } - - cur = ref Unsafe.Add(ref cur, 1); - } - - return -1; - } - - private int LastIndexOfAnyScalar(ref byte searchSpace, int searchSpaceLength) - where TNegator : struct, IndexOfAnyAsciiSearcher.INegator - { - for (int i = searchSpaceLength - 1; i >= 0; i--) - { - byte b = Unsafe.Add(ref searchSpace, i); - if (TNegator.NegateIfNeeded(_lookup.Contains(b))) - { - return i; - } - } - - return -1; - } + IndexOfAnyAsciiSearcher.LastIndexOfAnyVectorizedAnyByte( + ref MemoryMarshal.GetReference(span), span.Length, ref _state); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/SearchValues/AsciiByteSearchValues.cs b/src/libraries/System.Private.CoreLib/src/System/SearchValues/AsciiByteSearchValues.cs index 371695e272c8ab..3fc67d6086a198 100644 --- a/src/libraries/System.Private.CoreLib/src/System/SearchValues/AsciiByteSearchValues.cs +++ b/src/libraries/System.Private.CoreLib/src/System/SearchValues/AsciiByteSearchValues.cs @@ -3,91 +3,56 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.Arm; +using System.Runtime.Intrinsics.Wasm; +using System.Runtime.Intrinsics.X86; namespace System.Buffers { internal sealed class AsciiByteSearchValues : SearchValues { - private Vector256 _bitmap; - private readonly BitVector256 _lookup; + private IndexOfAnyAsciiSearcher.AsciiState _state; public AsciiByteSearchValues(ReadOnlySpan values) => - IndexOfAnyAsciiSearcher.ComputeBitmap(values, out _bitmap, out _lookup); + IndexOfAnyAsciiSearcher.ComputeAsciiState(values, out _state); - internal override byte[] GetValues() => _lookup.GetByteValues(); + internal override byte[] GetValues() => + _state.Lookup.GetByteValues(); [MethodImpl(MethodImplOptions.AggressiveInlining)] internal override bool ContainsCore(byte value) => - _lookup.Contains(value); + _state.Lookup.Contains(value); + [CompExactlyDependsOn(typeof(Ssse3))] + [CompExactlyDependsOn(typeof(AdvSimd))] + [CompExactlyDependsOn(typeof(PackedSimd))] [MethodImpl(MethodImplOptions.AggressiveInlining)] internal override int IndexOfAny(ReadOnlySpan span) => - IndexOfAny(ref MemoryMarshal.GetReference(span), span.Length); + IndexOfAnyAsciiSearcher.IndexOfAnyVectorized( + ref MemoryMarshal.GetReference(span), span.Length, ref _state); + [CompExactlyDependsOn(typeof(Ssse3))] + [CompExactlyDependsOn(typeof(AdvSimd))] + [CompExactlyDependsOn(typeof(PackedSimd))] [MethodImpl(MethodImplOptions.AggressiveInlining)] internal override int IndexOfAnyExcept(ReadOnlySpan span) => - IndexOfAny(ref MemoryMarshal.GetReference(span), span.Length); + IndexOfAnyAsciiSearcher.IndexOfAnyVectorized( + ref MemoryMarshal.GetReference(span), span.Length, ref _state); + [CompExactlyDependsOn(typeof(Ssse3))] + [CompExactlyDependsOn(typeof(AdvSimd))] + [CompExactlyDependsOn(typeof(PackedSimd))] [MethodImpl(MethodImplOptions.AggressiveInlining)] internal override int LastIndexOfAny(ReadOnlySpan span) => - LastIndexOfAny(ref MemoryMarshal.GetReference(span), span.Length); + IndexOfAnyAsciiSearcher.LastIndexOfAnyVectorized( + ref MemoryMarshal.GetReference(span), span.Length, ref _state); + [CompExactlyDependsOn(typeof(Ssse3))] + [CompExactlyDependsOn(typeof(AdvSimd))] + [CompExactlyDependsOn(typeof(PackedSimd))] [MethodImpl(MethodImplOptions.AggressiveInlining)] internal override int LastIndexOfAnyExcept(ReadOnlySpan span) => - LastIndexOfAny(ref MemoryMarshal.GetReference(span), span.Length); - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private int IndexOfAny(ref byte searchSpace, int searchSpaceLength) - where TNegator : struct, IndexOfAnyAsciiSearcher.INegator - { - return IndexOfAnyAsciiSearcher.IsVectorizationSupported && searchSpaceLength >= sizeof(ulong) - ? IndexOfAnyAsciiSearcher.IndexOfAnyVectorized(ref searchSpace, searchSpaceLength, ref _bitmap) - : IndexOfAnyScalar(ref searchSpace, searchSpaceLength); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private int LastIndexOfAny(ref byte searchSpace, int searchSpaceLength) - where TNegator : struct, IndexOfAnyAsciiSearcher.INegator - { - return IndexOfAnyAsciiSearcher.IsVectorizationSupported && searchSpaceLength >= sizeof(ulong) - ? IndexOfAnyAsciiSearcher.LastIndexOfAnyVectorized(ref searchSpace, searchSpaceLength, ref _bitmap) - : LastIndexOfAnyScalar(ref searchSpace, searchSpaceLength); - } - - private int IndexOfAnyScalar(ref byte searchSpace, int searchSpaceLength) - where TNegator : struct, IndexOfAnyAsciiSearcher.INegator - { - ref byte searchSpaceEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength); - ref byte cur = ref searchSpace; - - while (!Unsafe.AreSame(ref cur, ref searchSpaceEnd)) - { - byte b = cur; - if (TNegator.NegateIfNeeded(_lookup.Contains(b))) - { - return (int)Unsafe.ByteOffset(ref searchSpace, ref cur); - } - - cur = ref Unsafe.Add(ref cur, 1); - } - - return -1; - } - - private int LastIndexOfAnyScalar(ref byte searchSpace, int searchSpaceLength) - where TNegator : struct, IndexOfAnyAsciiSearcher.INegator - { - for (int i = searchSpaceLength - 1; i >= 0; i--) - { - byte b = Unsafe.Add(ref searchSpace, i); - if (TNegator.NegateIfNeeded(_lookup.Contains(b))) - { - return i; - } - } - - return -1; - } + IndexOfAnyAsciiSearcher.LastIndexOfAnyVectorized( + ref MemoryMarshal.GetReference(span), span.Length, ref _state); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/SearchValues/AsciiCharSearchValues.cs b/src/libraries/System.Private.CoreLib/src/System/SearchValues/AsciiCharSearchValues.cs index 150512672a457e..4df9f55252f198 100644 --- a/src/libraries/System.Private.CoreLib/src/System/SearchValues/AsciiCharSearchValues.cs +++ b/src/libraries/System.Private.CoreLib/src/System/SearchValues/AsciiCharSearchValues.cs @@ -3,95 +3,57 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.Arm; +using System.Runtime.Intrinsics.Wasm; +using System.Runtime.Intrinsics.X86; namespace System.Buffers { internal sealed class AsciiCharSearchValues : SearchValues where TOptimizations : struct, IndexOfAnyAsciiSearcher.IOptimizations { - private Vector256 _bitmap; - private readonly BitVector256 _lookup; + private IndexOfAnyAsciiSearcher.AsciiState _state; - public AsciiCharSearchValues(Vector256 bitmap, BitVector256 lookup) - { - _bitmap = bitmap; - _lookup = lookup; - } + public AsciiCharSearchValues(ReadOnlySpan values) => + IndexOfAnyAsciiSearcher.ComputeAsciiState(values, out _state); - internal override char[] GetValues() => _lookup.GetCharValues(); + internal override char[] GetValues() => + _state.Lookup.GetCharValues(); [MethodImpl(MethodImplOptions.AggressiveInlining)] internal override bool ContainsCore(char value) => - _lookup.Contains128(value); + _state.Lookup.Contains128(value); + [CompExactlyDependsOn(typeof(Ssse3))] + [CompExactlyDependsOn(typeof(AdvSimd))] + [CompExactlyDependsOn(typeof(PackedSimd))] [MethodImpl(MethodImplOptions.AggressiveInlining)] internal override int IndexOfAny(ReadOnlySpan span) => - IndexOfAny(ref MemoryMarshal.GetReference(span), span.Length); + IndexOfAnyAsciiSearcher.IndexOfAnyVectorized( + ref Unsafe.As(ref MemoryMarshal.GetReference(span)), span.Length, ref _state); + [CompExactlyDependsOn(typeof(Ssse3))] + [CompExactlyDependsOn(typeof(AdvSimd))] + [CompExactlyDependsOn(typeof(PackedSimd))] [MethodImpl(MethodImplOptions.AggressiveInlining)] internal override int IndexOfAnyExcept(ReadOnlySpan span) => - IndexOfAny(ref MemoryMarshal.GetReference(span), span.Length); + IndexOfAnyAsciiSearcher.IndexOfAnyVectorized( + ref Unsafe.As(ref MemoryMarshal.GetReference(span)), span.Length, ref _state); + [CompExactlyDependsOn(typeof(Ssse3))] + [CompExactlyDependsOn(typeof(AdvSimd))] + [CompExactlyDependsOn(typeof(PackedSimd))] [MethodImpl(MethodImplOptions.AggressiveInlining)] internal override int LastIndexOfAny(ReadOnlySpan span) => - LastIndexOfAny(ref MemoryMarshal.GetReference(span), span.Length); + IndexOfAnyAsciiSearcher.LastIndexOfAnyVectorized( + ref Unsafe.As(ref MemoryMarshal.GetReference(span)), span.Length, ref _state); + [CompExactlyDependsOn(typeof(Ssse3))] + [CompExactlyDependsOn(typeof(AdvSimd))] + [CompExactlyDependsOn(typeof(PackedSimd))] [MethodImpl(MethodImplOptions.AggressiveInlining)] internal override int LastIndexOfAnyExcept(ReadOnlySpan span) => - LastIndexOfAny(ref MemoryMarshal.GetReference(span), span.Length); - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private int IndexOfAny(ref char searchSpace, int searchSpaceLength) - where TNegator : struct, IndexOfAnyAsciiSearcher.INegator - { - return IndexOfAnyAsciiSearcher.IsVectorizationSupported && searchSpaceLength >= Vector128.Count - ? IndexOfAnyAsciiSearcher.IndexOfAnyVectorized(ref Unsafe.As(ref searchSpace), searchSpaceLength, ref _bitmap) - : IndexOfAnyScalar(ref searchSpace, searchSpaceLength); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private int LastIndexOfAny(ref char searchSpace, int searchSpaceLength) - where TNegator : struct, IndexOfAnyAsciiSearcher.INegator - { - return IndexOfAnyAsciiSearcher.IsVectorizationSupported && searchSpaceLength >= Vector128.Count - ? IndexOfAnyAsciiSearcher.LastIndexOfAnyVectorized(ref Unsafe.As(ref searchSpace), searchSpaceLength, ref _bitmap) - : LastIndexOfAnyScalar(ref searchSpace, searchSpaceLength); - } - - private int IndexOfAnyScalar(ref char searchSpace, int searchSpaceLength) - where TNegator : struct, IndexOfAnyAsciiSearcher.INegator - { - ref char searchSpaceEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength); - ref char cur = ref searchSpace; - - while (!Unsafe.AreSame(ref cur, ref searchSpaceEnd)) - { - char c = cur; - if (TNegator.NegateIfNeeded(_lookup.Contains128(c))) - { - return (int)((nuint)Unsafe.ByteOffset(ref searchSpace, ref cur) / sizeof(char)); - } - - cur = ref Unsafe.Add(ref cur, 1); - } - - return -1; - } - - private int LastIndexOfAnyScalar(ref char searchSpace, int searchSpaceLength) - where TNegator : struct, IndexOfAnyAsciiSearcher.INegator - { - for (int i = searchSpaceLength - 1; i >= 0; i--) - { - char c = Unsafe.Add(ref searchSpace, i); - if (TNegator.NegateIfNeeded(_lookup.Contains128(c))) - { - return i; - } - } - - return -1; - } + IndexOfAnyAsciiSearcher.LastIndexOfAnyVectorized( + ref Unsafe.As(ref MemoryMarshal.GetReference(span)), span.Length, ref _state); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/SearchValues/BitVector256.cs b/src/libraries/System.Private.CoreLib/src/System/SearchValues/BitVector256.cs index a276d0dc2996a5..0f449d3044e912 100644 --- a/src/libraries/System.Private.CoreLib/src/System/SearchValues/BitVector256.cs +++ b/src/libraries/System.Private.CoreLib/src/System/SearchValues/BitVector256.cs @@ -11,6 +11,18 @@ internal unsafe struct BitVector256 { private fixed uint _values[8]; + public readonly BitVector256 CreateInverse() + { + BitVector256 inverse = default; + + for (int i = 0; i < 8; i++) + { + inverse._values[i] = ~_values[i]; + } + + return inverse; + } + public void Set(int c) { Debug.Assert(c < 256); @@ -23,10 +35,6 @@ public void Set(int c) public readonly bool Contains128(char c) => c < 128 && ContainsUnchecked(c); - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public readonly bool Contains256(char c) => - c < 256 && ContainsUnchecked(c); - [MethodImpl(MethodImplOptions.AggressiveInlining)] public readonly bool Contains(byte b) => ContainsUnchecked(b); diff --git a/src/libraries/System.Private.CoreLib/src/System/SearchValues/IndexOfAnyAsciiSearcher.cs b/src/libraries/System.Private.CoreLib/src/System/SearchValues/IndexOfAnyAsciiSearcher.cs index f98d6a580d487b..4f3ff556492ff7 100644 --- a/src/libraries/System.Private.CoreLib/src/System/SearchValues/IndexOfAnyAsciiSearcher.cs +++ b/src/libraries/System.Private.CoreLib/src/System/SearchValues/IndexOfAnyAsciiSearcher.cs @@ -3,7 +3,6 @@ using System.Diagnostics; using System.Numerics; -using System.Runtime; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; using System.Runtime.Intrinsics.Arm; @@ -17,14 +16,25 @@ namespace System.Buffers { internal static class IndexOfAnyAsciiSearcher { - internal static bool IsVectorizationSupported => Ssse3.IsSupported || AdvSimd.Arm64.IsSupported || PackedSimd.IsSupported; + public struct AsciiState(Vector128 bitmap, BitVector256 lookup) + { + public Vector256 Bitmap = Vector256.Create(bitmap, bitmap); + public BitVector256 Lookup = lookup; - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool BitmapContains(ref Vector256 bitmap, char c) => - c <= 127 && - (bitmap.GetElementUnsafe(c & 0xF) & (1 << (c >> 4))) != 0; + public readonly AsciiState CreateInverse() => + new AsciiState(~Bitmap._lower, Lookup.CreateInverse()); + } + + public struct AnyByteState(Vector128 bitmap0, Vector128 bitmap1, BitVector256 lookup) + { + public Vector256 Bitmap0 = Vector256.Create(bitmap0, bitmap0); + public Vector256 Bitmap1 = Vector256.Create(bitmap1, bitmap1); + public BitVector256 Lookup = lookup; + } + + internal static bool IsVectorizationSupported => Ssse3.IsSupported || AdvSimd.Arm64.IsSupported || PackedSimd.IsSupported; - internal static unsafe void ComputeBitmap256(ReadOnlySpan values, out Vector256 bitmap0, out Vector256 bitmap1, out BitVector256 lookup) + internal static unsafe void ComputeAnyByteState(ReadOnlySpan values, out AnyByteState state) { // The exact format of these bitmaps differs from the other ComputeBitmap overloads as it's meant for the full [0, 255] range algorithm. // See http://0x80.pl/articles/simd-byte-lookup.html#universal-algorithm @@ -52,12 +62,10 @@ internal static unsafe void ComputeBitmap256(ReadOnlySpan values, out Vect } } - bitmap0 = Vector256.Create(bitmapSpace0, bitmapSpace0); - bitmap1 = Vector256.Create(bitmapSpace1, bitmapSpace1); - lookup = lookupLocal; + state = new AnyByteState(bitmapSpace0, bitmapSpace1, lookupLocal); } - internal static unsafe void ComputeBitmap(ReadOnlySpan values, out Vector256 bitmap, out BitVector256 lookup) + internal static unsafe void ComputeAsciiState(ReadOnlySpan values, out AsciiState state) where T : struct, IUnsignedNumber { Debug.Assert(typeof(T) == typeof(byte) || typeof(T) == typeof(char)); @@ -83,8 +91,7 @@ internal static unsafe void ComputeBitmap(ReadOnlySpan values, out Vector2 bitmapLocal[(uint)lowNibble] |= (byte)(1 << highNibble); } - bitmap = Vector256.Create(bitmapSpace, bitmapSpace); - lookup = lookupLocal; + state = new AsciiState(bitmapSpace, lookupLocal); } [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -134,14 +141,17 @@ private static unsafe bool TryIndexOfAny(ref short searchSpace, int se if (IsVectorizationSupported) { - Vector128 bitmap = default; - if (TryComputeBitmap(asciiValues, (byte*)&bitmap, out bool needleContainsZero)) + AsciiState state = default; + + if (TryComputeBitmap(asciiValues, (byte*)&state.Bitmap._lower, out bool needleContainsZero)) { - Vector256 bitmap256 = Vector256.Create(bitmap, bitmap); + // Only initializing the bitmap here is okay as we can only get here if the search space is long enough + // and we support vectorization, so the IndexOfAnyVectorized implementation will never touch state.Lookup. + state.Bitmap = Vector256.Create(state.Bitmap._lower, state.Bitmap._lower); index = (Ssse3.IsSupported || PackedSimd.IsSupported) && needleContainsZero - ? IndexOfAnyVectorized(ref searchSpace, searchSpaceLength, ref bitmap256) - : IndexOfAnyVectorized(ref searchSpace, searchSpaceLength, ref bitmap256); + ? IndexOfAnyVectorized(ref searchSpace, searchSpaceLength, ref state) + : IndexOfAnyVectorized(ref searchSpace, searchSpaceLength, ref state); return true; } } @@ -158,14 +168,17 @@ private static unsafe bool TryLastIndexOfAny(ref short searchSpace, in if (IsVectorizationSupported) { - Vector128 bitmap = default; - if (TryComputeBitmap(asciiValues, (byte*)&bitmap, out bool needleContainsZero)) + AsciiState state = default; + + if (TryComputeBitmap(asciiValues, (byte*)&state.Bitmap._lower, out bool needleContainsZero)) { - Vector256 bitmap256 = Vector256.Create(bitmap, bitmap); + // Only initializing the bitmap here is okay as we can only get here if the search space is long enough + // and we support vectorization, so the LastIndexOfAnyVectorized implementation will never touch state.Lookup. + state.Bitmap = Vector256.Create(state.Bitmap._lower, state.Bitmap._lower); index = (Ssse3.IsSupported || PackedSimd.IsSupported) && needleContainsZero - ? LastIndexOfAnyVectorized(ref searchSpace, searchSpaceLength, ref bitmap256) - : LastIndexOfAnyVectorized(ref searchSpace, searchSpaceLength, ref bitmap256); + ? LastIndexOfAnyVectorized(ref searchSpace, searchSpaceLength, ref state) + : LastIndexOfAnyVectorized(ref searchSpace, searchSpaceLength, ref state); return true; } } @@ -177,17 +190,35 @@ private static unsafe bool TryLastIndexOfAny(ref short searchSpace, in [CompExactlyDependsOn(typeof(Ssse3))] [CompExactlyDependsOn(typeof(AdvSimd))] [CompExactlyDependsOn(typeof(PackedSimd))] - internal static int IndexOfAnyVectorized(ref short searchSpace, int searchSpaceLength, ref Vector256 bitmapRef) + internal static int IndexOfAnyVectorized(ref short searchSpace, int searchSpaceLength, ref AsciiState state) where TNegator : struct, INegator where TOptimizations : struct, IOptimizations { ref short currentSearchSpace = ref searchSpace; + if (searchSpaceLength < Vector128.Count) + { + ref short searchSpaceEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength); + + while (!Unsafe.AreSame(ref currentSearchSpace, ref searchSpaceEnd)) + { + char c = (char)currentSearchSpace; + if (TNegator.NegateIfNeeded(state.Lookup.Contains128(c))) + { + return (int)((nuint)Unsafe.ByteOffset(ref searchSpace, ref currentSearchSpace) / sizeof(char)); + } + + currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, 1); + } + + return -1; + } + #pragma warning disable IntrinsicsInSystemPrivateCoreLibAttributeNotSpecificEnough // The behavior of the rest of the function remains the same if Avx2.IsSupported is false if (Avx2.IsSupported && searchSpaceLength > 2 * Vector128.Count) #pragma warning restore IntrinsicsInSystemPrivateCoreLibAttributeNotSpecificEnough { - Vector256 bitmap256 = bitmapRef; + Vector256 bitmap256 = state.Bitmap; if (searchSpaceLength > 2 * Vector256.Count) { @@ -238,7 +269,7 @@ internal static int IndexOfAnyVectorized(ref short sea return -1; } - Vector128 bitmap = bitmapRef._lower; + Vector128 bitmap = state.Bitmap._lower; #pragma warning disable IntrinsicsInSystemPrivateCoreLibAttributeNotSpecificEnough // The behavior of the rest of the function remains the same if Avx2.IsSupported is false if (!Avx2.IsSupported && searchSpaceLength > 2 * Vector128.Count) @@ -294,17 +325,31 @@ internal static int IndexOfAnyVectorized(ref short sea [CompExactlyDependsOn(typeof(Ssse3))] [CompExactlyDependsOn(typeof(AdvSimd))] [CompExactlyDependsOn(typeof(PackedSimd))] - internal static int LastIndexOfAnyVectorized(ref short searchSpace, int searchSpaceLength, ref Vector256 bitmapRef) + internal static int LastIndexOfAnyVectorized(ref short searchSpace, int searchSpaceLength, ref AsciiState state) where TNegator : struct, INegator where TOptimizations : struct, IOptimizations { + if (searchSpaceLength < Vector128.Count) + { + for (int i = searchSpaceLength - 1; i >= 0; i--) + { + char c = (char)Unsafe.Add(ref searchSpace, i); + if (TNegator.NegateIfNeeded(state.Lookup.Contains128(c))) + { + return i; + } + } + + return -1; + } + ref short currentSearchSpace = ref Unsafe.Add(ref searchSpace, searchSpaceLength); #pragma warning disable IntrinsicsInSystemPrivateCoreLibAttributeNotSpecificEnough // The else clause is semantically equivalent if (Avx2.IsSupported && searchSpaceLength > 2 * Vector128.Count) #pragma warning disable IntrinsicsInSystemPrivateCoreLibAttributeNotSpecificEnough { - Vector256 bitmap256 = bitmapRef; + Vector256 bitmap256 = state.Bitmap; if (searchSpaceLength > 2 * Vector256.Count) { @@ -355,7 +400,7 @@ internal static int LastIndexOfAnyVectorized(ref short return -1; } - Vector128 bitmap = bitmapRef._lower; + Vector128 bitmap = state.Bitmap._lower; if (!Avx2.IsSupported && searchSpaceLength > 2 * Vector128.Count) { @@ -409,16 +454,34 @@ internal static int LastIndexOfAnyVectorized(ref short [CompExactlyDependsOn(typeof(Ssse3))] [CompExactlyDependsOn(typeof(AdvSimd))] [CompExactlyDependsOn(typeof(PackedSimd))] - internal static int IndexOfAnyVectorized(ref byte searchSpace, int searchSpaceLength, ref Vector256 bitmapRef) + internal static int IndexOfAnyVectorized(ref byte searchSpace, int searchSpaceLength, ref AsciiState state) where TNegator : struct, INegator { ref byte currentSearchSpace = ref searchSpace; + if (searchSpaceLength < sizeof(ulong)) + { + ref byte searchSpaceEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength); + + while (!Unsafe.AreSame(ref currentSearchSpace, ref searchSpaceEnd)) + { + byte b = currentSearchSpace; + if (TNegator.NegateIfNeeded(state.Lookup.Contains(b))) + { + return (int)Unsafe.ByteOffset(ref searchSpace, ref currentSearchSpace); + } + + currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, 1); + } + + return -1; + } + #pragma warning disable IntrinsicsInSystemPrivateCoreLibAttributeNotSpecificEnough // The behavior of the rest of the function remains the same if Avx2.IsSupported is false if (Avx2.IsSupported && searchSpaceLength > Vector128.Count) #pragma warning disable IntrinsicsInSystemPrivateCoreLibAttributeNotSpecificEnough { - Vector256 bitmap256 = bitmapRef; + Vector256 bitmap256 = state.Bitmap; if (searchSpaceLength > Vector256.Count) { @@ -467,7 +530,7 @@ internal static int IndexOfAnyVectorized(ref byte searchSpace, int sea return -1; } - Vector128 bitmap = bitmapRef._lower; + Vector128 bitmap = state.Bitmap._lower; if (!Avx2.IsSupported && searchSpaceLength > Vector128.Count) { @@ -519,16 +582,30 @@ internal static int IndexOfAnyVectorized(ref byte searchSpace, int sea [CompExactlyDependsOn(typeof(Ssse3))] [CompExactlyDependsOn(typeof(AdvSimd))] [CompExactlyDependsOn(typeof(PackedSimd))] - internal static int LastIndexOfAnyVectorized(ref byte searchSpace, int searchSpaceLength, ref Vector256 bitmapRef) + internal static int LastIndexOfAnyVectorized(ref byte searchSpace, int searchSpaceLength, ref AsciiState state) where TNegator : struct, INegator { + if (searchSpaceLength < sizeof(ulong)) + { + for (int i = searchSpaceLength - 1; i >= 0; i--) + { + byte b = Unsafe.Add(ref searchSpace, i); + if (TNegator.NegateIfNeeded(state.Lookup.Contains(b))) + { + return i; + } + } + + return -1; + } + ref byte currentSearchSpace = ref Unsafe.Add(ref searchSpace, searchSpaceLength); #pragma warning disable IntrinsicsInSystemPrivateCoreLibAttributeNotSpecificEnough // The behavior of the rest of the function remains the same if Avx2.IsSupported is false if (Avx2.IsSupported && searchSpaceLength > Vector128.Count) #pragma warning disable IntrinsicsInSystemPrivateCoreLibAttributeNotSpecificEnough { - Vector256 bitmap256 = bitmapRef; + Vector256 bitmap256 = state.Bitmap; if (searchSpaceLength > Vector256.Count) { @@ -577,7 +654,7 @@ internal static int LastIndexOfAnyVectorized(ref byte searchSpace, int return -1; } - Vector128 bitmap = bitmapRef._lower; + Vector128 bitmap = state.Bitmap._lower; if (!Avx2.IsSupported && searchSpaceLength > Vector128.Count) { @@ -629,17 +706,35 @@ internal static int LastIndexOfAnyVectorized(ref byte searchSpace, int [CompExactlyDependsOn(typeof(Ssse3))] [CompExactlyDependsOn(typeof(AdvSimd))] [CompExactlyDependsOn(typeof(PackedSimd))] - internal static int IndexOfAnyVectorizedAnyByte(ref byte searchSpace, int searchSpaceLength, ref Vector512 bitmapsRef) + internal static int IndexOfAnyVectorizedAnyByte(ref byte searchSpace, int searchSpaceLength, ref AnyByteState state) where TNegator : struct, INegator { ref byte currentSearchSpace = ref searchSpace; + if (!IsVectorizationSupported || searchSpaceLength < sizeof(ulong)) + { + ref byte searchSpaceEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength); + + while (!Unsafe.AreSame(ref currentSearchSpace, ref searchSpaceEnd)) + { + byte b = currentSearchSpace; + if (TNegator.NegateIfNeeded(state.Lookup.Contains(b))) + { + return (int)Unsafe.ByteOffset(ref searchSpace, ref currentSearchSpace); + } + + currentSearchSpace = ref Unsafe.Add(ref currentSearchSpace, 1); + } + + return -1; + } + #pragma warning disable IntrinsicsInSystemPrivateCoreLibAttributeNotSpecificEnough // The behavior of the rest of the function remains the same if Avx2.IsSupported is false if (Avx2.IsSupported && searchSpaceLength > Vector128.Count) #pragma warning restore IntrinsicsInSystemPrivateCoreLibAttributeNotSpecificEnough { - Vector256 bitmap256_0 = bitmapsRef._lower; - Vector256 bitmap256_1 = bitmapsRef._upper; + Vector256 bitmap256_0 = state.Bitmap0; + Vector256 bitmap256_1 = state.Bitmap1; if (searchSpaceLength > Vector256.Count) { @@ -688,8 +783,8 @@ internal static int IndexOfAnyVectorizedAnyByte(ref byte searchSpace, return -1; } - Vector128 bitmap0 = bitmapsRef._lower._lower; - Vector128 bitmap1 = bitmapsRef._upper._lower; + Vector128 bitmap0 = state.Bitmap0._lower; + Vector128 bitmap1 = state.Bitmap1._lower; #pragma warning disable IntrinsicsInSystemPrivateCoreLibAttributeNotSpecificEnough // The behavior of the rest of the function remains the same if Avx2.IsSupported is false if (!Avx2.IsSupported && searchSpaceLength > Vector128.Count) @@ -743,17 +838,31 @@ internal static int IndexOfAnyVectorizedAnyByte(ref byte searchSpace, [CompExactlyDependsOn(typeof(Ssse3))] [CompExactlyDependsOn(typeof(AdvSimd))] [CompExactlyDependsOn(typeof(PackedSimd))] - internal static int LastIndexOfAnyVectorizedAnyByte(ref byte searchSpace, int searchSpaceLength, ref Vector512 bitmapsRef) + internal static int LastIndexOfAnyVectorizedAnyByte(ref byte searchSpace, int searchSpaceLength, ref AnyByteState state) where TNegator : struct, INegator { + if (!IsVectorizationSupported || searchSpaceLength < sizeof(ulong)) + { + for (int i = searchSpaceLength - 1; i >= 0; i--) + { + byte b = Unsafe.Add(ref searchSpace, i); + if (TNegator.NegateIfNeeded(state.Lookup.Contains(b))) + { + return i; + } + } + + return -1; + } + ref byte currentSearchSpace = ref Unsafe.Add(ref searchSpace, searchSpaceLength); #pragma warning disable IntrinsicsInSystemPrivateCoreLibAttributeNotSpecificEnough // The behavior of the rest of the function remains the same if Avx2.IsSupported is false if (Avx2.IsSupported && searchSpaceLength > Vector128.Count) { #pragma warning restore IntrinsicsInSystemPrivateCoreLibAttributeNotSpecificEnough - Vector256 bitmap256_0 = bitmapsRef._lower; - Vector256 bitmap256_1 = bitmapsRef._upper; + Vector256 bitmap256_0 = state.Bitmap0; + Vector256 bitmap256_1 = state.Bitmap1; if (searchSpaceLength > Vector256.Count) { @@ -802,8 +911,8 @@ internal static int LastIndexOfAnyVectorizedAnyByte(ref byte searchSpa return -1; } - Vector128 bitmap0 = bitmapsRef._lower._lower; - Vector128 bitmap1 = bitmapsRef._upper._lower; + Vector128 bitmap0 = state.Bitmap0._lower; + Vector128 bitmap1 = state.Bitmap1._lower; #pragma warning disable IntrinsicsInSystemPrivateCoreLibAttributeNotSpecificEnough // The behavior of the rest of the function remains the same if Avx2.IsSupported is false if (!Avx2.IsSupported && searchSpaceLength > Vector128.Count) diff --git a/src/libraries/System.Private.CoreLib/src/System/SearchValues/Latin1CharSearchValues.cs b/src/libraries/System.Private.CoreLib/src/System/SearchValues/Latin1CharSearchValues.cs deleted file mode 100644 index 3968825ccd4c72..00000000000000 --- a/src/libraries/System.Private.CoreLib/src/System/SearchValues/Latin1CharSearchValues.cs +++ /dev/null @@ -1,84 +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.CompilerServices; -using System.Runtime.InteropServices; - -namespace System.Buffers -{ - internal sealed class Latin1CharSearchValues : SearchValues - { - private readonly BitVector256 _lookup; - - public Latin1CharSearchValues(ReadOnlySpan values) - { - foreach (char c in values) - { - if (c > 255) - { - // The values were modified concurrent with the call to SearchValues.Create - ThrowHelper.ThrowInvalidOperationException_InvalidOperation_EnumFailedVersion(); - } - - _lookup.Set(c); - } - } - - internal override char[] GetValues() => _lookup.GetCharValues(); - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal override bool ContainsCore(char value) => - _lookup.Contains256(value); - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal override int IndexOfAny(ReadOnlySpan span) => - IndexOfAny(ref MemoryMarshal.GetReference(span), span.Length); - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal override int IndexOfAnyExcept(ReadOnlySpan span) => - IndexOfAny(ref MemoryMarshal.GetReference(span), span.Length); - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal override int LastIndexOfAny(ReadOnlySpan span) => - LastIndexOfAny(ref MemoryMarshal.GetReference(span), span.Length); - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal override int LastIndexOfAnyExcept(ReadOnlySpan span) => - LastIndexOfAny(ref MemoryMarshal.GetReference(span), span.Length); - - private int IndexOfAny(ref char searchSpace, int searchSpaceLength) - where TNegator : struct, IndexOfAnyAsciiSearcher.INegator - { - ref char searchSpaceEnd = ref Unsafe.Add(ref searchSpace, searchSpaceLength); - ref char cur = ref searchSpace; - - while (!Unsafe.AreSame(ref cur, ref searchSpaceEnd)) - { - char c = cur; - if (TNegator.NegateIfNeeded(_lookup.Contains256(c))) - { - return (int)((nuint)Unsafe.ByteOffset(ref searchSpace, ref cur) / sizeof(char)); - } - - cur = ref Unsafe.Add(ref cur, 1); - } - - return -1; - } - - private int LastIndexOfAny(ref char searchSpace, int searchSpaceLength) - where TNegator : struct, IndexOfAnyAsciiSearcher.INegator - { - for (int i = searchSpaceLength - 1; i >= 0; i--) - { - char c = Unsafe.Add(ref searchSpace, i); - if (TNegator.NegateIfNeeded(_lookup.Contains256(c))) - { - return i; - } - } - - return -1; - } - } -} diff --git a/src/libraries/System.Private.CoreLib/src/System/SearchValues/ProbabilisticWithAsciiCharSearchValues.cs b/src/libraries/System.Private.CoreLib/src/System/SearchValues/ProbabilisticWithAsciiCharSearchValues.cs index 8a8f09a0d327f1..419a57c50283ee 100644 --- a/src/libraries/System.Private.CoreLib/src/System/SearchValues/ProbabilisticWithAsciiCharSearchValues.cs +++ b/src/libraries/System.Private.CoreLib/src/System/SearchValues/ProbabilisticWithAsciiCharSearchValues.cs @@ -13,8 +13,8 @@ namespace System.Buffers internal sealed class ProbabilisticWithAsciiCharSearchValues : SearchValues where TOptimizations : struct, IndexOfAnyAsciiSearcher.IOptimizations { - private Vector256 _asciiBitmap; - private Vector256 _inverseAsciiBitmap; + private IndexOfAnyAsciiSearcher.AsciiState _asciiState; + private IndexOfAnyAsciiSearcher.AsciiState _inverseAsciiState; private ProbabilisticMap _map; private readonly string _values; @@ -23,8 +23,8 @@ public ProbabilisticWithAsciiCharSearchValues(scoped ReadOnlySpan values) Debug.Assert(IndexOfAnyAsciiSearcher.IsVectorizationSupported); Debug.Assert(values.ContainsAnyInRange((char)0, (char)127)); - IndexOfAnyAsciiSearcher.ComputeBitmap(values, out _asciiBitmap, out _); - _inverseAsciiBitmap = ~_asciiBitmap; + IndexOfAnyAsciiSearcher.ComputeAsciiState(values, out _asciiState); + _inverseAsciiState = _asciiState.CreateInverse(); _values = new string(values); _map = new ProbabilisticMap(_values); @@ -48,29 +48,29 @@ internal override int IndexOfAny(ReadOnlySpan span) // We do this by inverting the bitmap and using the opposite search function (Negate instead of DontNegate). // If the bitmap we're using contains a 0, we have to use 'Ssse3AndWasmHandleZeroInNeedle' when running on X86 and WASM. - // Everything else should use 'Default'. 'TOptimizations' specifies whether '_asciiBitmap' contains a 0. + // Everything else should use 'Default'. 'TOptimizations' specifies whether '_asciiState' contains a 0. // Since we're using the inverse bitmap in this case, we have to use 'Ssse3AndWasmHandleZeroInNeedle' iff we're // running on X86/WASM and 'TOptimizations' is 'Default' (as that means that the inverse bitmap definitely has a 0). - Debug.Assert((_asciiBitmap[0] & 1) != (_inverseAsciiBitmap[0] & 1)); + Debug.Assert(_asciiState.Lookup.Contains(0) != _inverseAsciiState.Lookup.Contains(0)); if ((Ssse3.IsSupported || PackedSimd.IsSupported) && typeof(TOptimizations) == typeof(IndexOfAnyAsciiSearcher.Default)) { - Debug.Assert((_inverseAsciiBitmap[0] & 1) == 1, "The inverse bitmap did not contain a 0."); + Debug.Assert(_inverseAsciiState.Lookup.Contains(0), "The inverse bitmap did not contain a 0."); offset = IndexOfAnyAsciiSearcher.IndexOfAnyVectorized( ref Unsafe.As(ref MemoryMarshal.GetReference(span)), span.Length, - ref _inverseAsciiBitmap); + ref _inverseAsciiState); } else { - Debug.Assert(!(Ssse3.IsSupported || PackedSimd.IsSupported) || (_inverseAsciiBitmap[0] & 1) == 0, + Debug.Assert(!(Ssse3.IsSupported || PackedSimd.IsSupported) || !_inverseAsciiState.Lookup.Contains(0), "The inverse bitmap contained a 0, but we're not using Ssse3AndWasmHandleZeroInNeedle."); offset = IndexOfAnyAsciiSearcher.IndexOfAnyVectorized( ref Unsafe.As(ref MemoryMarshal.GetReference(span)), span.Length, - ref _inverseAsciiBitmap); + ref _inverseAsciiState); } // If we've reached the end of the span or stopped at an ASCII character, we've found the result. @@ -110,7 +110,7 @@ internal override int IndexOfAnyExcept(ReadOnlySpan span) offset = IndexOfAnyAsciiSearcher.IndexOfAnyVectorized( ref Unsafe.As(ref MemoryMarshal.GetReference(span)), span.Length, - ref _asciiBitmap); + ref _asciiState); // If we've reached the end of the span or stopped at an ASCII character, we've found the result. if ((uint)offset >= (uint)span.Length || char.IsAscii(span[offset])) @@ -146,31 +146,31 @@ internal override int LastIndexOfAny(ReadOnlySpan span) // We do this by inverting the bitmap and using the opposite search function (Negate instead of DontNegate). // If the bitmap we're using contains a 0, we have to use 'Ssse3AndWasmHandleZeroInNeedle' when running on X86 and WASM. - // Everything else should use 'Default'. 'TOptimizations' specifies whether '_asciiBitmap' contains a 0. + // Everything else should use 'Default'. 'TOptimizations' specifies whether '_asciiState' contains a 0. // Since we're using the inverse bitmap in this case, we have to use 'Ssse3AndWasmHandleZeroInNeedle' iff we're // running on X86/WASM and 'TOptimizations' is 'Default' (as that means that the inverse bitmap definitely has a 0). - Debug.Assert((_asciiBitmap[0] & 1) != (_inverseAsciiBitmap[0] & 1)); + Debug.Assert(_asciiState.Lookup.Contains(0) != _inverseAsciiState.Lookup.Contains(0)); int offset; if ((Ssse3.IsSupported || PackedSimd.IsSupported) && typeof(TOptimizations) == typeof(IndexOfAnyAsciiSearcher.Default)) { - Debug.Assert((_inverseAsciiBitmap[0] & 1) == 1, "The inverse bitmap did not contain a 0."); + Debug.Assert(_inverseAsciiState.Lookup.Contains(0), "The inverse bitmap did not contain a 0."); offset = IndexOfAnyAsciiSearcher.LastIndexOfAnyVectorized( ref Unsafe.As(ref MemoryMarshal.GetReference(span)), span.Length, - ref _inverseAsciiBitmap); + ref _inverseAsciiState); } else { - Debug.Assert(!(Ssse3.IsSupported || PackedSimd.IsSupported) || (_inverseAsciiBitmap[0] & 1) == 0, + Debug.Assert(!(Ssse3.IsSupported || PackedSimd.IsSupported) ||!_inverseAsciiState.Lookup.Contains(0), "The inverse bitmap contained a 0, but we're not using Ssse3AndWasmHandleZeroInNeedle."); offset = IndexOfAnyAsciiSearcher.LastIndexOfAnyVectorized( ref Unsafe.As(ref MemoryMarshal.GetReference(span)), span.Length, - ref _inverseAsciiBitmap); + ref _inverseAsciiState); } // If we've reached the end of the span or stopped at an ASCII character, we've found the result. @@ -200,7 +200,7 @@ internal override int LastIndexOfAnyExcept(ReadOnlySpan span) int offset = IndexOfAnyAsciiSearcher.LastIndexOfAnyVectorized( ref Unsafe.As(ref MemoryMarshal.GetReference(span)), span.Length, - ref _asciiBitmap); + ref _asciiState); // If we've reached the end of the span or stopped at an ASCII character, we've found the result. if ((uint)offset >= (uint)span.Length || char.IsAscii(span[offset])) diff --git a/src/libraries/System.Private.CoreLib/src/System/SearchValues/SearchValues.cs b/src/libraries/System.Private.CoreLib/src/System/SearchValues/SearchValues.cs index 3398379bfe711b..17c6bd6a69eabe 100644 --- a/src/libraries/System.Private.CoreLib/src/System/SearchValues/SearchValues.cs +++ b/src/libraries/System.Private.CoreLib/src/System/SearchValues/SearchValues.cs @@ -6,7 +6,6 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.Arm; using System.Runtime.Intrinsics.Wasm; using System.Runtime.Intrinsics.X86; @@ -24,6 +23,7 @@ public static class SearchValues /// Creates an optimized representation of used for efficient searching. /// /// The set of values. + /// The optimized representation of used for efficient searching. public static SearchValues Create(ReadOnlySpan values) { if (values.IsEmpty) @@ -66,6 +66,7 @@ public static SearchValues Create(ReadOnlySpan values) /// Creates an optimized representation of used for efficient searching. /// /// The set of values. + /// /// The optimized representation of used for efficient searching. public static SearchValues Create(ReadOnlySpan values) { if (values.IsEmpty) @@ -111,11 +112,9 @@ public static SearchValues Create(ReadOnlySpan values) // IndexOfAnyAsciiSearcher for chars is slower than Any3CharSearchValues, but faster than Any4SearchValues if (IndexOfAnyAsciiSearcher.IsVectorizationSupported && maxInclusive < 128) { - IndexOfAnyAsciiSearcher.ComputeBitmap(values, out Vector256 bitmap, out BitVector256 lookup); - - return (Ssse3.IsSupported || PackedSimd.IsSupported) && lookup.Contains(0) - ? new AsciiCharSearchValues(bitmap, lookup) - : new AsciiCharSearchValues(bitmap, lookup); + return (Ssse3.IsSupported || PackedSimd.IsSupported) && minInclusive == 0 + ? new AsciiCharSearchValues(values) + : new AsciiCharSearchValues(values); } // Vector128 isn't valid. Treat the values as shorts instead. @@ -155,22 +154,16 @@ ref Unsafe.As(ref MemoryMarshal.GetReference(values)), : new ProbabilisticWithAsciiCharSearchValues(probabilisticValues); } - // We prefer using the ProbabilisticMap over Latin1CharSearchValues if the former is vectorized. - if (!(Sse41.IsSupported || AdvSimd.Arm64.IsSupported) && maxInclusive < 256) - { - // This will also match ASCII values when IndexOfAnyAsciiSearcher is not supported. - return new Latin1CharSearchValues(values); - } - return new ProbabilisticCharSearchValues(probabilisticValues); } /// /// Creates an optimized representation of used for efficient searching. - /// Only or may be used. /// /// The set of values. /// Specifies whether to use or search semantics. + /// The optimized representation of used for efficient searching. + /// Only or may be used. public static SearchValues Create(ReadOnlySpan values, StringComparison comparisonType) { if (comparisonType is not (StringComparison.Ordinal or StringComparison.OrdinalIgnoreCase)) diff --git a/src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/Helpers/AhoCorasick.cs b/src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/Helpers/AhoCorasick.cs index 8bedbe3bb47f34..435737f5d2f9ba 100644 --- a/src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/Helpers/AhoCorasick.cs +++ b/src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/Helpers/AhoCorasick.cs @@ -18,21 +18,19 @@ namespace System.Buffers internal readonly struct AhoCorasick { private readonly AhoCorasickNode[] _nodes; - private readonly Vector256 _startingCharsAsciiBitmap; + private readonly IndexOfAnyAsciiSearcher.AsciiState _startingAsciiChars; - public AhoCorasick(AhoCorasickNode[] nodes, Vector256 startingAsciiBitmap) + public AhoCorasick(AhoCorasickNode[] nodes, IndexOfAnyAsciiSearcher.AsciiState startingAsciiChars) { _nodes = nodes; - _startingCharsAsciiBitmap = startingAsciiBitmap; + _startingAsciiChars = startingAsciiChars; } public readonly bool ShouldUseAsciiFastScan { get { - Vector256 bitmap = _startingCharsAsciiBitmap; - - if (IndexOfAnyAsciiSearcher.IsVectorizationSupported && bitmap != default) + if (IndexOfAnyAsciiSearcher.IsVectorizationSupported && _startingAsciiChars.Bitmap != default) { // If there are a lot of starting characters such that we often find one early, // the ASCII fast scan may end up performing worse than checking one character at a time. @@ -51,7 +49,7 @@ public readonly bool ShouldUseAsciiFastScan for (int i = 0; i < 128; i++) { - if (IndexOfAnyAsciiSearcher.BitmapContains(ref bitmap, (char)i)) + if (_startingAsciiChars.Lookup.Contains128((char)i)) { frequency += CharacterFrequencyHelper.AsciiFrequency[i]; } @@ -101,7 +99,7 @@ private readonly int IndexOfAnyCore(ReadOnly int offset = IndexOfAnyAsciiSearcher.IndexOfAnyVectorized( ref Unsafe.As(ref Unsafe.Add(ref MemoryMarshal.GetReference(span), i)), remainingLength, - ref Unsafe.AsRef(in _startingCharsAsciiBitmap)); + ref Unsafe.AsRef(in _startingAsciiChars)); if (offset < 0) { @@ -210,7 +208,7 @@ private readonly int IndexOfAnyCaseInsensitiveUnicode(ReadOnly int offset = IndexOfAnyAsciiSearcher.IndexOfAnyVectorized( ref Unsafe.As(ref Unsafe.Add(ref MemoryMarshal.GetReference(span), i)), remainingLength, - ref Unsafe.AsRef(in _startingCharsAsciiBitmap)); + ref Unsafe.AsRef(in _startingAsciiChars)); if (offset < 0) { diff --git a/src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/Helpers/AhoCorasickBuilder.cs b/src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/Helpers/AhoCorasickBuilder.cs index 686525e19e4663..ce91f45c2447d8 100644 --- a/src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/Helpers/AhoCorasickBuilder.cs +++ b/src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/Helpers/AhoCorasickBuilder.cs @@ -17,7 +17,7 @@ internal ref struct AhoCorasickBuilder private readonly bool _ignoreCase; private ValueListBuilder _nodes; private ValueListBuilder _parents; - private Vector256 _startingCharsAsciiBitmap; + private IndexOfAnyAsciiSearcher.AsciiState _startingAsciiChars; public AhoCorasickBuilder(ReadOnlySpan values, bool ignoreCase, ref HashSet? unreachableValues) { @@ -53,7 +53,7 @@ public AhoCorasick Build() GenerateStartingAsciiCharsBitmap(); } - return new AhoCorasick(_nodes.AsSpan().ToArray(), _startingCharsAsciiBitmap); + return new AhoCorasick(_nodes.AsSpan().ToArray(), _startingAsciiChars); } public void Dispose() @@ -215,7 +215,7 @@ private void GenerateStartingAsciiCharsBitmap() if (Ascii.IsValid(startingChars.AsSpan())) { - IndexOfAnyAsciiSearcher.ComputeBitmap(startingChars.AsSpan(), out _startingCharsAsciiBitmap, out _); + IndexOfAnyAsciiSearcher.ComputeAsciiState(startingChars.AsSpan(), out _startingAsciiChars); } startingChars.Dispose(); diff --git a/src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/SingleStringSearchValuesThreeChars.cs b/src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/SingleStringSearchValuesThreeChars.cs index f470eb8d503bdc..2f919bfbb8d50f 100644 --- a/src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/SingleStringSearchValuesThreeChars.cs +++ b/src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/SingleStringSearchValuesThreeChars.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.Collections.Generic; using System.Diagnostics; using System.Numerics; using System.Runtime.CompilerServices; @@ -14,7 +15,7 @@ namespace System.Buffers // This implementation uses 3 precomputed anchor points when searching. // This implementation may also be used for length=2 values, in which case two anchors point at the same position. // Has an O(i * m) worst-case, with the expected time closer to O(n) for most inputs. - internal sealed class SingleStringSearchValuesThreeChars : SearchValues + internal sealed class SingleStringSearchValuesThreeChars : StringSearchValuesBase where TCaseSensitivity : struct, ICaseSensitivity { private const ushort CaseConversionMask = unchecked((ushort)~0x20); @@ -29,7 +30,7 @@ internal sealed class SingleStringSearchValuesThreeChars : Sea private static bool IgnoreCase => typeof(TCaseSensitivity) != typeof(CaseSensitive); - public SingleStringSearchValuesThreeChars(string value) + public SingleStringSearchValuesThreeChars(HashSet? uniqueValues, string value) : base(uniqueValues) { // We could have more than one entry in 'uniqueValues' if this value is an exact prefix of all the others. Debug.Assert(value.Length > 1); @@ -367,50 +368,12 @@ private bool TryMatch(ref char searchSpaceStart, int searchSpaceLength, ref char } - internal override bool ContainsCore(string value) => - _value.Equals(value, IgnoreCase ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal); + internal override bool ContainsCore(string value) => HasUniqueValues + ? base.ContainsCore(value) + : _value.Equals(value, IgnoreCase ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal); - internal override string[] GetValues() => - new string[] { _value }; - - internal override int IndexOfAny(ReadOnlySpan span) => - IndexOfAny(span); - - internal override int IndexOfAnyExcept(ReadOnlySpan span) => - IndexOfAny(span); - - internal override int LastIndexOfAny(ReadOnlySpan span) => - LastIndexOfAny(span); - - internal override int LastIndexOfAnyExcept(ReadOnlySpan span) => - LastIndexOfAny(span); - - private int IndexOfAny(ReadOnlySpan span) - where TNegator : struct, IndexOfAnyAsciiSearcher.INegator - { - for (int i = 0; i < span.Length; i++) - { - if (TNegator.NegateIfNeeded(ContainsCore(span[i]))) - { - return i; - } - } - - return -1; - } - - private int LastIndexOfAny(ReadOnlySpan span) - where TNegator : struct, IndexOfAnyAsciiSearcher.INegator - { - for (int i = span.Length - 1; i >= 0; i--) - { - if (TNegator.NegateIfNeeded(ContainsCore(span[i]))) - { - return i; - } - } - - return -1; - } + internal override string[] GetValues() => HasUniqueValues + ? base.GetValues() + : new string[] { _value }; } } diff --git a/src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/StringSearchValues.cs b/src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/StringSearchValues.cs index 77bcdd0ef96079..e0829ef02c0071 100644 --- a/src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/StringSearchValues.cs +++ b/src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/StringSearchValues.cs @@ -311,23 +311,23 @@ private static SearchValues CreateForSingleValue( { if (!ignoreCase) { - return new SingleStringSearchValuesThreeChars(value); + return new SingleStringSearchValuesThreeChars(uniqueValues, value); } if (asciiLettersOnly) { - return new SingleStringSearchValuesThreeChars(value); + return new SingleStringSearchValuesThreeChars(uniqueValues, value); } if (allAscii) { - return new SingleStringSearchValuesThreeChars(value); + return new SingleStringSearchValuesThreeChars(uniqueValues, value); } // When ignoring casing, all anchor chars we search for must be ASCII. if (char.IsAscii(value[0]) && value.AsSpan().LastIndexOfAnyInRange((char)0, (char)127) > 0) { - return new SingleStringSearchValuesThreeChars(value); + return new SingleStringSearchValuesThreeChars(uniqueValues, value); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/StringSearchValuesBase.cs b/src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/StringSearchValuesBase.cs index b069c235e4d230..7b21b715a0b29b 100644 --- a/src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/StringSearchValuesBase.cs +++ b/src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/StringSearchValuesBase.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; +using System.Diagnostics; namespace System.Buffers { @@ -14,16 +15,25 @@ namespace System.Buffers /// internal abstract class StringSearchValuesBase : SearchValues { - private readonly HashSet _uniqueValues; + private readonly HashSet? _uniqueValues; - public StringSearchValuesBase(HashSet uniqueValues) => + /// + /// This exists to allow to avoid the HashSet allocation. + /// + protected bool HasUniqueValues => _uniqueValues is not null; + + public StringSearchValuesBase(HashSet? uniqueValues) => _uniqueValues = uniqueValues; - internal sealed override bool ContainsCore(string value) => - _uniqueValues.Contains(value); + internal override bool ContainsCore(string value) + { + Debug.Assert(_uniqueValues is not null, "ContainsCore should be overridden if uniqueValues weren't provided."); + return _uniqueValues.Contains(value); + } - internal sealed override string[] GetValues() + internal override string[] GetValues() { + Debug.Assert(_uniqueValues is not null, "GetValues should be overridden if uniqueValues weren't provided."); string[] values = new string[_uniqueValues.Count]; _uniqueValues.CopyTo(values); return values; @@ -46,7 +56,7 @@ private int IndexOfAny(ReadOnlySpan span) { for (int i = 0; i < span.Length; i++) { - if (TNegator.NegateIfNeeded(_uniqueValues.Contains(span[i]))) + if (TNegator.NegateIfNeeded(ContainsCore(span[i]))) { return i; } @@ -60,7 +70,7 @@ private int LastIndexOfAny(ReadOnlySpan span) { for (int i = span.Length - 1; i >= 0; i--) { - if (TNegator.NegateIfNeeded(_uniqueValues.Contains(span[i]))) + if (TNegator.NegateIfNeeded(ContainsCore(span[i]))) { return i; } diff --git a/src/libraries/System.Private.CoreLib/src/System/StartupHookProvider.cs b/src/libraries/System.Private.CoreLib/src/System/StartupHookProvider.cs index 39a2d2e3a2eeb5..8ac1864e1140ec 100644 --- a/src/libraries/System.Private.CoreLib/src/System/StartupHookProvider.cs +++ b/src/libraries/System.Private.CoreLib/src/System/StartupHookProvider.cs @@ -209,7 +209,7 @@ private static void CallStartupHook(StartupHookNameOrPath startupHook) Debug.Assert(initializeMethod != null && initializeMethod.IsStatic && initializeMethod.ReturnType == typeof(void) && - initializeMethod.GetParameters().Length == 0); + initializeMethod.GetParametersAsSpan().Length == 0); initializeMethod.Invoke(null, null); } diff --git a/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf8.cs b/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf8.cs index 23018440a890b9..9ae33c5b08b0ab 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf8.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf8.cs @@ -46,11 +46,6 @@ static class Utf8 /// public static unsafe OperationStatus FromUtf16(ReadOnlySpan source, Span destination, out int charsRead, out int bytesWritten, bool replaceInvalidSequences = true, bool isFinalBlock = true) { - // Throwaway span accesses - workaround for https://github.com/dotnet/runtime/issues/12332 - - _ = source.Length; - _ = destination.Length; - fixed (char* pOriginalSource = &MemoryMarshal.GetReference(source)) fixed (byte* pOriginalDestination = &MemoryMarshal.GetReference(destination)) { @@ -137,14 +132,9 @@ public static unsafe OperationStatus FromUtf16(ReadOnlySpan source, Span public static unsafe OperationStatus ToUtf16(ReadOnlySpan source, Span destination, out int bytesRead, out int charsWritten, bool replaceInvalidSequences = true, bool isFinalBlock = true) { - // Throwaway span accesses - workaround for https://github.com/dotnet/runtime/issues/12332 - // NOTE: Changes to this method should be kept in sync with ToUtf16PreservingReplacement below. // See it for an explanation of the differences - _ = source.Length; - _ = destination.Length; - // We'll be mutating these values throughout our loop. fixed (byte* pOriginalSource = &MemoryMarshal.GetReference(source)) @@ -228,8 +218,6 @@ public static unsafe OperationStatus ToUtf16(ReadOnlySpan source, Span source, Span destination, out int bytesRead, out int charsWritten, bool replaceInvalidSequences = true, bool isFinalBlock = true) { - // Throwaway span accesses - workaround for https://github.com/dotnet/runtime/issues/12332 - // NOTE: Changes to this method should be kept in sync with ToUtf16 above. // // This method exists to allow certain internal comparisons to function as expected under ICU. @@ -241,9 +229,6 @@ internal static unsafe OperationStatus ToUtf16PreservingReplacement(ReadOnlySpan // This allows them to compare as invalid UTF-16 sequences and thus only match with the same // invalid sequence. - _ = source.Length; - _ = destination.Length; - // We'll be mutating these values throughout our loop. fixed (byte* pOriginalSource = &MemoryMarshal.GetReference(source)) diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/CancellationTokenSource.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/CancellationTokenSource.cs index 49214ef9b4d1a4..ace2ed4b943d93 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/CancellationTokenSource.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/CancellationTokenSource.cs @@ -249,7 +249,7 @@ private void InitializeWithTimer(TimeSpan millisecondsDelay, TimeProvider timePr /// /// /// The associated will be notified of the cancellation and will transition to a state where - /// returns true. Any callbacks or cancelable operationsregistered + /// returns true. Any callbacks or cancelable operations registered /// with the will be executed. /// /// @@ -276,6 +276,10 @@ public void Cancel(bool throwOnFirstException) } /// Communicates a request for cancellation asynchronously. + /// + /// A task that will complete after cancelable operations and callbacks registered with the associated + /// have completed. + /// /// /// /// The associated will be notified of the cancellation diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPool.Windows.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPool.Windows.cs index 6882b0482c017a..0da875498afc18 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPool.Windows.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPool.Windows.cs @@ -13,6 +13,12 @@ public static partial class ThreadPool internal static bool UseWindowsThreadPool { get; } = AppContextConfigHelper.GetBooleanConfig("System.Threading.ThreadPool.UseWindowsThreadPool", "DOTNET_ThreadPool_UseWindowsThreadPool"); +#pragma warning disable CA1823 + // The field should reflect what the property returns because the property can be stubbed by trimming, + // such that sos reflects the actual state of what thread pool is being used and not just the config value. + private static readonly bool s_useWindowsThreadPool = UseWindowsThreadPool; // Name relied on by sos +#pragma warning restore CA1823 + #if NATIVEAOT private const bool IsWorkerTrackingEnabledInConfig = false; #else diff --git a/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.FullGlobalizationData.Unix.cs b/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.FullGlobalizationData.Unix.cs index c10fdfb54be855..1703114fabea37 100644 --- a/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.FullGlobalizationData.Unix.cs +++ b/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.FullGlobalizationData.Unix.cs @@ -11,6 +11,7 @@ public sealed partial class TimeZoneInfo { private const string InvariantUtcStandardDisplayName = "Coordinated Universal Time"; private const string FallbackCultureName = "en-US"; +#if !TARGET_MACCATALYST && !TARGET_IOS && !TARGET_TVOS private const string GmtId = "GMT"; // Some time zones may give better display names using their location names rather than their generic name. @@ -22,12 +23,20 @@ public sealed partial class TimeZoneInfo "Pacific/Apia", // Prefer "Samoa Time" over "Apia Time" "Pacific/Pitcairn" // Prefer "Pitcairn Islands Time" over "Pitcairn Time" }; +#endif private static CultureInfo? _uiCulture; // Helper function to get the standard display name for the UTC static time zone instance private static string GetUtcStandardDisplayName() { +#if TARGET_MACCATALYST || TARGET_IOS || TARGET_TVOS + if (!GlobalizationMode.Hybrid) + { + // For this target, be consistent with other time zone display names that use an abbreviation. + return "UTC"; + } +#endif // Don't bother looking up the name for invariant or English cultures CultureInfo uiCulture = CultureInfo.CurrentUICulture; if (GlobalizationMode.Invariant || uiCulture.Name.Length == 0 || uiCulture.TwoLetterISOLanguageName == "en") @@ -48,6 +57,13 @@ private static string GetUtcStandardDisplayName() // Helper function to get the full display name for the UTC static time zone instance private static string GetUtcFullDisplayName(string timeZoneId, string standardDisplayName) { +#if TARGET_MACCATALYST || TARGET_IOS || TARGET_TVOS + if (!GlobalizationMode.Hybrid) + { + // For this target, be consistent with other time zone display names that use the ID. + return $"(UTC) {timeZoneId}"; + } +#endif return $"(UTC) {standardDisplayName}"; } #pragma warning restore IDE0060 @@ -95,6 +111,10 @@ private static unsafe void GetDisplayName(string timeZoneId, Interop.Globalizati { fixed (char* bufferPtr = buffer) { +#if TARGET_MACCATALYST || TARGET_IOS || TARGET_TVOS + if (GlobalizationMode.Hybrid) + return Interop.Globalization.GetTimeZoneDisplayNameNative(locale, locale.Length, id, id.Length, type, bufferPtr, buffer.Length); +#endif return Interop.Globalization.GetTimeZoneDisplayName(locale, id, type, bufferPtr, buffer.Length); } }, @@ -111,6 +131,10 @@ private static unsafe void GetDisplayName(string timeZoneId, Interop.Globalizati { fixed (char* bufferPtr = buffer) { +#if TARGET_MACCATALYST || TARGET_IOS || TARGET_TVOS + if (GlobalizationMode.Hybrid) + return Interop.Globalization.GetTimeZoneDisplayNameNative(locale, locale.Length, id, id.Length, type, bufferPtr, buffer.Length); +#endif return Interop.Globalization.GetTimeZoneDisplayName(locale, id, type, bufferPtr, buffer.Length); } }, @@ -131,13 +155,25 @@ private static unsafe void GetDisplayName(string timeZoneId, Interop.Globalizati // Helper function that builds the value backing the DisplayName field from globalization data. private static void GetFullValueForDisplayNameField(string timeZoneId, TimeSpan baseUtcOffset, ref string? displayName) { + CultureInfo uiCulture = UICulture; + // Get the base offset to prefix in front of the time zone. + // Only UTC and its aliases have "(UTC)", handled earlier. All other zones include an offset, even if it's zero. + string baseOffsetText = string.Create(null, stackalloc char[128], $"(UTC{(baseUtcOffset >= TimeSpan.Zero ? '+' : '-')}{baseUtcOffset:hh\\:mm})"); + +#if TARGET_MACCATALYST || TARGET_IOS || TARGET_TVOS + Debug.Assert(GlobalizationMode.Hybrid); + string? timeZoneName = null; + GetDisplayName(timeZoneId, Interop.Globalization.TimeZoneDisplayNameType.TimeZoneName, uiCulture.Name, ref timeZoneName); + // For this target, be consistent with other time zone display names that use the ID. + displayName = $"{baseOffsetText} {timeZoneName}"; + return; +#else // There are a few different ways we might show the display name depending on the data. // The algorithm used below should avoid duplicating the same words while still achieving the // goal of providing a unique, discoverable, and intuitive name. // Try to get the generic name for this time zone. string? genericName = null; - CultureInfo uiCulture = UICulture; GetDisplayName(timeZoneId, Interop.Globalization.TimeZoneDisplayNameType.Generic, uiCulture.Name, ref genericName); if (genericName == null) { @@ -145,10 +181,6 @@ private static void GetFullValueForDisplayNameField(string timeZoneId, TimeSpan return; } - // Get the base offset to prefix in front of the time zone. - // Only UTC and its aliases have "(UTC)", handled earlier. All other zones include an offset, even if it's zero. - string baseOffsetText = string.Create(null, stackalloc char[128], $"(UTC{(baseUtcOffset >= TimeSpan.Zero ? '+' : '-')}{baseUtcOffset:hh\\:mm})"); - // Get the generic location name. string? genericLocationName = null; GetDisplayName(timeZoneId, Interop.Globalization.TimeZoneDisplayNameType.GenericLocation, uiCulture.Name, ref genericLocationName); @@ -235,6 +267,7 @@ private static void GetFullValueForDisplayNameField(string timeZoneId, TimeSpan displayName = $"{baseOffsetText} {genericName} ({exemplarCityName})"; } +#endif } // Helper function that gets an exmplar city name either from ICU or from the IANA time zone ID itself diff --git a/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.FullGlobalizationData.cs b/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.FullGlobalizationData.cs index 17b677ca37a9ae..06bffad9f31515 100644 --- a/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.FullGlobalizationData.cs +++ b/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.FullGlobalizationData.cs @@ -9,6 +9,10 @@ public sealed partial class TimeZoneInfo { private static unsafe bool TryConvertIanaIdToWindowsId(string ianaId, bool allocate, out string? windowsId) { +#if TARGET_MACCATALYST || TARGET_IOS || TARGET_TVOS + windowsId = null; + return false; +#else if (GlobalizationMode.Invariant || GlobalizationMode.UseNls || ianaId is null || @@ -28,10 +32,15 @@ ianaId is null || windowsId = null; return false; +#endif } private static unsafe bool TryConvertWindowsIdToIanaId(string windowsId, string? region, bool allocate, out string? ianaId) { +#if TARGET_MACCATALYST || TARGET_IOS || TARGET_TVOS + ianaId = null; + return false; +#else // This functionality is not enabled in the browser for the sake of size reduction. if (GlobalizationMode.Invariant || GlobalizationMode.UseNls || windowsId is null) { @@ -88,6 +97,7 @@ private static unsafe bool TryConvertWindowsIdToIanaId(string windowsId, string? ianaId = null; return false; +#endif } } diff --git a/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Unix.NonAndroid.cs b/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Unix.NonAndroid.cs index f90b52bdc52053..885acc9cef882c 100644 --- a/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Unix.NonAndroid.cs +++ b/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Unix.NonAndroid.cs @@ -511,7 +511,7 @@ private static bool TryGetLocalTzFile([NotNullWhen(true)] out byte[]? rawData, [ #pragma warning disable IDE0074 // Use compound assignment if (tzVariable == null) { -#if TARGET_IOS || TARGET_TVOS +#if TARGET_MACCATALYST || TARGET_IOS || TARGET_TVOS tzVariable = Interop.Sys.GetDefaultTimeZone(); #elif TARGET_WASI || TARGET_BROWSER if (UseEmbeddedTzDatabase) diff --git a/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Unix.cs b/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Unix.cs index 2524b4fd536066..d6b370b7210a60 100644 --- a/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Unix.cs +++ b/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Unix.cs @@ -231,6 +231,10 @@ public AdjustmentRule[] GetAdjustmentRules() if (GlobalizationMode.Invariant) return displayName; +#if TARGET_MACCATALYST || TARGET_IOS || TARGET_TVOS + if (!GlobalizationMode.Hybrid) + return displayName; +#endif GetFullValueForDisplayNameField(Id, BaseUtcOffset, ref displayName); return displayName; @@ -245,6 +249,10 @@ public AdjustmentRule[] GetAdjustmentRules() if (GlobalizationMode.Invariant) return standardDisplayName; +#if TARGET_MACCATALYST || TARGET_IOS || TARGET_TVOS + if (!GlobalizationMode.Hybrid) + return standardDisplayName; +#endif GetStandardDisplayName(Id, ref standardDisplayName); return standardDisplayName; @@ -259,6 +267,10 @@ public AdjustmentRule[] GetAdjustmentRules() if (GlobalizationMode.Invariant) return daylightDisplayName; +#if TARGET_MACCATALYST || TARGET_IOS || TARGET_TVOS + if (!GlobalizationMode.Hybrid) + return daylightDisplayName; +#endif GetDaylightDisplayName(Id, ref daylightDisplayName); return daylightDisplayName; diff --git a/src/libraries/System.Private.CoreLib/src/System/ValueTuple.cs b/src/libraries/System.Private.CoreLib/src/System/ValueTuple.cs index 240ad862ffcf24..aa919ea294f78d 100644 --- a/src/libraries/System.Private.CoreLib/src/System/ValueTuple.cs +++ b/src/libraries/System.Private.CoreLib/src/System/ValueTuple.cs @@ -1125,6 +1125,7 @@ other is ValueTuple vt && comparer.Equals(Item1, vt.Item1) && comparer.Equals(Item2, vt.Item2) && comparer.Equals(Item3, vt.Item3) && + comparer.Equals(Item4, vt.Item4) && comparer.Equals(Item5, vt.Item5); int IComparable.CompareTo(object? other) @@ -1366,6 +1367,7 @@ other is ValueTuple vt && comparer.Equals(Item1, vt.Item1) && comparer.Equals(Item2, vt.Item2) && comparer.Equals(Item3, vt.Item3) && + comparer.Equals(Item4, vt.Item4) && comparer.Equals(Item5, vt.Item5) && comparer.Equals(Item6, vt.Item6); @@ -1625,6 +1627,7 @@ other is ValueTuple vt && comparer.Equals(Item1, vt.Item1) && comparer.Equals(Item2, vt.Item2) && comparer.Equals(Item3, vt.Item3) && + comparer.Equals(Item4, vt.Item4) && comparer.Equals(Item5, vt.Item5) && comparer.Equals(Item6, vt.Item6) && comparer.Equals(Item7, vt.Item7); @@ -1908,6 +1911,7 @@ other is ValueTuple vt && comparer.Equals(Item1, vt.Item1) && comparer.Equals(Item2, vt.Item2) && comparer.Equals(Item3, vt.Item3) && + comparer.Equals(Item4, vt.Item4) && comparer.Equals(Item5, vt.Item5) && comparer.Equals(Item6, vt.Item6) && comparer.Equals(Item7, vt.Item7) && diff --git a/src/libraries/System.Private.DataContractSerialization/System.Private.DataContractSerialization.sln b/src/libraries/System.Private.DataContractSerialization/System.Private.DataContractSerialization.sln index ff1ab627491778..939a32fa5b6606 100644 --- a/src/libraries/System.Private.DataContractSerialization/System.Private.DataContractSerialization.sln +++ b/src/libraries/System.Private.DataContractSerialization/System.Private.DataContractSerialization.sln @@ -1,12 +1,34 @@ Microsoft Visual Studio Solution File, Format Version 12.00 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.DataContractSerialization", "src\System.Private.DataContractSerialization.csproj", "{493BBB98-5E20-46BE-A7DC-1584F39DE27D}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{54116CEF-C987-4CE5-940B-613A016AD6CA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{801938D9-5DB8-4F15-B1C1-FB67723C75F9}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.RegularExpressions.Generator", "..\System.Text.RegularExpressions\gen\System.Text.RegularExpressions.Generator.csproj", "{FB5A7543-CB37-40A0-807F-76879E1000F5}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{0F50BEBA-FC93-455A-9234-3E23503154BA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{0DBEA438-8690-40EC-AD89-2D919F3193C2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{42D51B58-DD11-4A48-85FE-F2968EAD189A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{C3EB6EB7-E76E-4501-A731-5716FBA4541B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{2D547189-B301-4BDC-8B82-88CE3B05E36E}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{14B38A7F-3A3B-4C41-AE5C-D8AA236626DD}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{6EF339F7-5861-440F-88F7-333F04F0ABD7}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{C7637E36-CE91-4215-A0F4-78FD03DB7500}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{6196D76E-C5CF-42DB-BA57-619C57A8B88B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{757EB40A-927D-42C0-83E7-D21B7B242317}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{4F01BCF9-13F3-4D0B-9564-F29027799B71}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -17,17 +39,55 @@ Global {493BBB98-5E20-46BE-A7DC-1584F39DE27D}.Debug|Any CPU.Build.0 = Debug|Any CPU {493BBB98-5E20-46BE-A7DC-1584F39DE27D}.Release|Any CPU.ActiveCfg = Release|Any CPU {493BBB98-5E20-46BE-A7DC-1584F39DE27D}.Release|Any CPU.Build.0 = Release|Any CPU + {54116CEF-C987-4CE5-940B-613A016AD6CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {54116CEF-C987-4CE5-940B-613A016AD6CA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {54116CEF-C987-4CE5-940B-613A016AD6CA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {54116CEF-C987-4CE5-940B-613A016AD6CA}.Release|Any CPU.Build.0 = Release|Any CPU + {801938D9-5DB8-4F15-B1C1-FB67723C75F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {801938D9-5DB8-4F15-B1C1-FB67723C75F9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {801938D9-5DB8-4F15-B1C1-FB67723C75F9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {801938D9-5DB8-4F15-B1C1-FB67723C75F9}.Release|Any CPU.Build.0 = Release|Any CPU {FB5A7543-CB37-40A0-807F-76879E1000F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FB5A7543-CB37-40A0-807F-76879E1000F5}.Debug|Any CPU.Build.0 = Debug|Any CPU {FB5A7543-CB37-40A0-807F-76879E1000F5}.Release|Any CPU.ActiveCfg = Release|Any CPU {FB5A7543-CB37-40A0-807F-76879E1000F5}.Release|Any CPU.Build.0 = Release|Any CPU + {0F50BEBA-FC93-455A-9234-3E23503154BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0F50BEBA-FC93-455A-9234-3E23503154BA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0F50BEBA-FC93-455A-9234-3E23503154BA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0F50BEBA-FC93-455A-9234-3E23503154BA}.Release|Any CPU.Build.0 = Release|Any CPU + {0DBEA438-8690-40EC-AD89-2D919F3193C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0DBEA438-8690-40EC-AD89-2D919F3193C2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0DBEA438-8690-40EC-AD89-2D919F3193C2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0DBEA438-8690-40EC-AD89-2D919F3193C2}.Release|Any CPU.Build.0 = Release|Any CPU + {42D51B58-DD11-4A48-85FE-F2968EAD189A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {42D51B58-DD11-4A48-85FE-F2968EAD189A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {42D51B58-DD11-4A48-85FE-F2968EAD189A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {42D51B58-DD11-4A48-85FE-F2968EAD189A}.Release|Any CPU.Build.0 = Release|Any CPU + {C3EB6EB7-E76E-4501-A731-5716FBA4541B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C3EB6EB7-E76E-4501-A731-5716FBA4541B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C3EB6EB7-E76E-4501-A731-5716FBA4541B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C3EB6EB7-E76E-4501-A731-5716FBA4541B}.Release|Any CPU.Build.0 = Release|Any CPU + {2D547189-B301-4BDC-8B82-88CE3B05E36E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2D547189-B301-4BDC-8B82-88CE3B05E36E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2D547189-B301-4BDC-8B82-88CE3B05E36E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2D547189-B301-4BDC-8B82-88CE3B05E36E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {493BBB98-5E20-46BE-A7DC-1584F39DE27D} = {14B38A7F-3A3B-4C41-AE5C-D8AA236626DD} + {54116CEF-C987-4CE5-940B-613A016AD6CA} = {6EF339F7-5861-440F-88F7-333F04F0ABD7} + {801938D9-5DB8-4F15-B1C1-FB67723C75F9} = {6EF339F7-5861-440F-88F7-333F04F0ABD7} {FB5A7543-CB37-40A0-807F-76879E1000F5} = {6EF339F7-5861-440F-88F7-333F04F0ABD7} + {0F50BEBA-FC93-455A-9234-3E23503154BA} = {C7637E36-CE91-4215-A0F4-78FD03DB7500} + {0DBEA438-8690-40EC-AD89-2D919F3193C2} = {C7637E36-CE91-4215-A0F4-78FD03DB7500} + {C7637E36-CE91-4215-A0F4-78FD03DB7500} = {4F01BCF9-13F3-4D0B-9564-F29027799B71} + {42D51B58-DD11-4A48-85FE-F2968EAD189A} = {6196D76E-C5CF-42DB-BA57-619C57A8B88B} + {C3EB6EB7-E76E-4501-A731-5716FBA4541B} = {6196D76E-C5CF-42DB-BA57-619C57A8B88B} + {6196D76E-C5CF-42DB-BA57-619C57A8B88B} = {4F01BCF9-13F3-4D0B-9564-F29027799B71} + {2D547189-B301-4BDC-8B82-88CE3B05E36E} = {757EB40A-927D-42C0-83E7-D21B7B242317} + {757EB40A-927D-42C0-83E7-D21B7B242317} = {4F01BCF9-13F3-4D0B-9564-F29027799B71} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {9D091569-CE23-4382-B8FC-D651959BAB25} diff --git a/src/libraries/System.Private.Uri/System.Private.Uri.sln b/src/libraries/System.Private.Uri/System.Private.Uri.sln index 4987823743fc40..542bed9a2680f8 100644 --- a/src/libraries/System.Private.Uri/System.Private.Uri.sln +++ b/src/libraries/System.Private.Uri/System.Private.Uri.sln @@ -19,7 +19,17 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", ". EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{B532288A-97AF-473C-B334-E5F6F572907C}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A30957A2-C729-49F1-8C75-C42D5BCB8309}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{4E14547F-0FA7-4558-B0BB-50F093DF78FC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{EB163378-F08A-4B9B-B32B-374386A30F8E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{A5D6D45C-1212-4E10-9DAA-55CB5EEE8CB3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{7D234C34-A62D-4E71-87D1-898B6F51EA19}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{742F7AAD-8263-4188-911B-F0E50944B92A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{DD4121CE-1AFF-4250-BE6E-C736D001CDCB}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{DBF81CE3-B7A6-4A62-9C66-DDB2D87CBB05}" EndProject @@ -27,6 +37,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{E3179181-D7E EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{89A8524B-6E70-43E0-AD13-E53D499BB0A1}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A30957A2-C729-49F1-8C75-C42D5BCB8309}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{7FA9EE1D-CB88-4D56-85CB-83B0E7B4A8C9}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{E6972740-3028-41F0-B4D8-D0F77F0AEFD0}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{C9F506B9-583D-40CC-80C7-EEEF70A030DC}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{7D76502A-347E-40EB-8EA2-F96040EEEEEF}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -265,13 +285,117 @@ Global {B532288A-97AF-473C-B334-E5F6F572907C}.Checked|arm64.ActiveCfg = Debug|Any CPU {B532288A-97AF-473C-B334-E5F6F572907C}.Checked|x64.ActiveCfg = Debug|Any CPU {B532288A-97AF-473C-B334-E5F6F572907C}.Checked|x86.ActiveCfg = Debug|Any CPU + {4E14547F-0FA7-4558-B0BB-50F093DF78FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4E14547F-0FA7-4558-B0BB-50F093DF78FC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4E14547F-0FA7-4558-B0BB-50F093DF78FC}.Debug|arm.ActiveCfg = Debug|Any CPU + {4E14547F-0FA7-4558-B0BB-50F093DF78FC}.Debug|arm64.ActiveCfg = Debug|Any CPU + {4E14547F-0FA7-4558-B0BB-50F093DF78FC}.Debug|x64.ActiveCfg = Debug|Any CPU + {4E14547F-0FA7-4558-B0BB-50F093DF78FC}.Debug|x64.Build.0 = Debug|Any CPU + {4E14547F-0FA7-4558-B0BB-50F093DF78FC}.Debug|x86.ActiveCfg = Debug|Any CPU + {4E14547F-0FA7-4558-B0BB-50F093DF78FC}.Debug|x86.Build.0 = Debug|Any CPU + {4E14547F-0FA7-4558-B0BB-50F093DF78FC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4E14547F-0FA7-4558-B0BB-50F093DF78FC}.Release|Any CPU.Build.0 = Release|Any CPU + {4E14547F-0FA7-4558-B0BB-50F093DF78FC}.Release|arm.ActiveCfg = Release|Any CPU + {4E14547F-0FA7-4558-B0BB-50F093DF78FC}.Release|arm64.ActiveCfg = Release|Any CPU + {4E14547F-0FA7-4558-B0BB-50F093DF78FC}.Release|x64.ActiveCfg = Release|Any CPU + {4E14547F-0FA7-4558-B0BB-50F093DF78FC}.Release|x64.Build.0 = Release|Any CPU + {4E14547F-0FA7-4558-B0BB-50F093DF78FC}.Release|x86.ActiveCfg = Release|Any CPU + {4E14547F-0FA7-4558-B0BB-50F093DF78FC}.Release|x86.Build.0 = Release|Any CPU + {4E14547F-0FA7-4558-B0BB-50F093DF78FC}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {4E14547F-0FA7-4558-B0BB-50F093DF78FC}.Checked|arm.ActiveCfg = Debug|Any CPU + {4E14547F-0FA7-4558-B0BB-50F093DF78FC}.Checked|arm64.ActiveCfg = Debug|Any CPU + {4E14547F-0FA7-4558-B0BB-50F093DF78FC}.Checked|x64.ActiveCfg = Debug|Any CPU + {4E14547F-0FA7-4558-B0BB-50F093DF78FC}.Checked|x86.ActiveCfg = Debug|Any CPU + {EB163378-F08A-4B9B-B32B-374386A30F8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EB163378-F08A-4B9B-B32B-374386A30F8E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EB163378-F08A-4B9B-B32B-374386A30F8E}.Debug|arm.ActiveCfg = Debug|Any CPU + {EB163378-F08A-4B9B-B32B-374386A30F8E}.Debug|arm64.ActiveCfg = Debug|Any CPU + {EB163378-F08A-4B9B-B32B-374386A30F8E}.Debug|x64.ActiveCfg = Debug|Any CPU + {EB163378-F08A-4B9B-B32B-374386A30F8E}.Debug|x64.Build.0 = Debug|Any CPU + {EB163378-F08A-4B9B-B32B-374386A30F8E}.Debug|x86.ActiveCfg = Debug|Any CPU + {EB163378-F08A-4B9B-B32B-374386A30F8E}.Debug|x86.Build.0 = Debug|Any CPU + {EB163378-F08A-4B9B-B32B-374386A30F8E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EB163378-F08A-4B9B-B32B-374386A30F8E}.Release|Any CPU.Build.0 = Release|Any CPU + {EB163378-F08A-4B9B-B32B-374386A30F8E}.Release|arm.ActiveCfg = Release|Any CPU + {EB163378-F08A-4B9B-B32B-374386A30F8E}.Release|arm64.ActiveCfg = Release|Any CPU + {EB163378-F08A-4B9B-B32B-374386A30F8E}.Release|x64.ActiveCfg = Release|Any CPU + {EB163378-F08A-4B9B-B32B-374386A30F8E}.Release|x64.Build.0 = Release|Any CPU + {EB163378-F08A-4B9B-B32B-374386A30F8E}.Release|x86.ActiveCfg = Release|Any CPU + {EB163378-F08A-4B9B-B32B-374386A30F8E}.Release|x86.Build.0 = Release|Any CPU + {EB163378-F08A-4B9B-B32B-374386A30F8E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {EB163378-F08A-4B9B-B32B-374386A30F8E}.Checked|arm.ActiveCfg = Debug|Any CPU + {EB163378-F08A-4B9B-B32B-374386A30F8E}.Checked|arm64.ActiveCfg = Debug|Any CPU + {EB163378-F08A-4B9B-B32B-374386A30F8E}.Checked|x64.ActiveCfg = Debug|Any CPU + {EB163378-F08A-4B9B-B32B-374386A30F8E}.Checked|x86.ActiveCfg = Debug|Any CPU + {A5D6D45C-1212-4E10-9DAA-55CB5EEE8CB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A5D6D45C-1212-4E10-9DAA-55CB5EEE8CB3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A5D6D45C-1212-4E10-9DAA-55CB5EEE8CB3}.Debug|arm.ActiveCfg = Debug|Any CPU + {A5D6D45C-1212-4E10-9DAA-55CB5EEE8CB3}.Debug|arm64.ActiveCfg = Debug|Any CPU + {A5D6D45C-1212-4E10-9DAA-55CB5EEE8CB3}.Debug|x64.ActiveCfg = Debug|Any CPU + {A5D6D45C-1212-4E10-9DAA-55CB5EEE8CB3}.Debug|x64.Build.0 = Debug|Any CPU + {A5D6D45C-1212-4E10-9DAA-55CB5EEE8CB3}.Debug|x86.ActiveCfg = Debug|Any CPU + {A5D6D45C-1212-4E10-9DAA-55CB5EEE8CB3}.Debug|x86.Build.0 = Debug|Any CPU + {A5D6D45C-1212-4E10-9DAA-55CB5EEE8CB3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A5D6D45C-1212-4E10-9DAA-55CB5EEE8CB3}.Release|Any CPU.Build.0 = Release|Any CPU + {A5D6D45C-1212-4E10-9DAA-55CB5EEE8CB3}.Release|arm.ActiveCfg = Release|Any CPU + {A5D6D45C-1212-4E10-9DAA-55CB5EEE8CB3}.Release|arm64.ActiveCfg = Release|Any CPU + {A5D6D45C-1212-4E10-9DAA-55CB5EEE8CB3}.Release|x64.ActiveCfg = Release|Any CPU + {A5D6D45C-1212-4E10-9DAA-55CB5EEE8CB3}.Release|x64.Build.0 = Release|Any CPU + {A5D6D45C-1212-4E10-9DAA-55CB5EEE8CB3}.Release|x86.ActiveCfg = Release|Any CPU + {A5D6D45C-1212-4E10-9DAA-55CB5EEE8CB3}.Release|x86.Build.0 = Release|Any CPU + {A5D6D45C-1212-4E10-9DAA-55CB5EEE8CB3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {A5D6D45C-1212-4E10-9DAA-55CB5EEE8CB3}.Checked|arm.ActiveCfg = Debug|Any CPU + {A5D6D45C-1212-4E10-9DAA-55CB5EEE8CB3}.Checked|arm64.ActiveCfg = Debug|Any CPU + {A5D6D45C-1212-4E10-9DAA-55CB5EEE8CB3}.Checked|x64.ActiveCfg = Debug|Any CPU + {A5D6D45C-1212-4E10-9DAA-55CB5EEE8CB3}.Checked|x86.ActiveCfg = Debug|Any CPU + {7D234C34-A62D-4E71-87D1-898B6F51EA19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7D234C34-A62D-4E71-87D1-898B6F51EA19}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7D234C34-A62D-4E71-87D1-898B6F51EA19}.Debug|arm.ActiveCfg = Debug|Any CPU + {7D234C34-A62D-4E71-87D1-898B6F51EA19}.Debug|arm64.ActiveCfg = Debug|Any CPU + {7D234C34-A62D-4E71-87D1-898B6F51EA19}.Debug|x64.ActiveCfg = Debug|Any CPU + {7D234C34-A62D-4E71-87D1-898B6F51EA19}.Debug|x64.Build.0 = Debug|Any CPU + {7D234C34-A62D-4E71-87D1-898B6F51EA19}.Debug|x86.ActiveCfg = Debug|Any CPU + {7D234C34-A62D-4E71-87D1-898B6F51EA19}.Debug|x86.Build.0 = Debug|Any CPU + {7D234C34-A62D-4E71-87D1-898B6F51EA19}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7D234C34-A62D-4E71-87D1-898B6F51EA19}.Release|Any CPU.Build.0 = Release|Any CPU + {7D234C34-A62D-4E71-87D1-898B6F51EA19}.Release|arm.ActiveCfg = Release|Any CPU + {7D234C34-A62D-4E71-87D1-898B6F51EA19}.Release|arm64.ActiveCfg = Release|Any CPU + {7D234C34-A62D-4E71-87D1-898B6F51EA19}.Release|x64.ActiveCfg = Release|Any CPU + {7D234C34-A62D-4E71-87D1-898B6F51EA19}.Release|x64.Build.0 = Release|Any CPU + {7D234C34-A62D-4E71-87D1-898B6F51EA19}.Release|x86.ActiveCfg = Release|Any CPU + {7D234C34-A62D-4E71-87D1-898B6F51EA19}.Release|x86.Build.0 = Release|Any CPU + {7D234C34-A62D-4E71-87D1-898B6F51EA19}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {7D234C34-A62D-4E71-87D1-898B6F51EA19}.Checked|arm.ActiveCfg = Debug|Any CPU + {7D234C34-A62D-4E71-87D1-898B6F51EA19}.Checked|arm64.ActiveCfg = Debug|Any CPU + {7D234C34-A62D-4E71-87D1-898B6F51EA19}.Checked|x64.ActiveCfg = Debug|Any CPU + {7D234C34-A62D-4E71-87D1-898B6F51EA19}.Checked|x86.ActiveCfg = Debug|Any CPU + {742F7AAD-8263-4188-911B-F0E50944B92A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {742F7AAD-8263-4188-911B-F0E50944B92A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {742F7AAD-8263-4188-911B-F0E50944B92A}.Debug|arm.ActiveCfg = Debug|Any CPU + {742F7AAD-8263-4188-911B-F0E50944B92A}.Debug|arm64.ActiveCfg = Debug|Any CPU + {742F7AAD-8263-4188-911B-F0E50944B92A}.Debug|x64.ActiveCfg = Debug|Any CPU + {742F7AAD-8263-4188-911B-F0E50944B92A}.Debug|x64.Build.0 = Debug|Any CPU + {742F7AAD-8263-4188-911B-F0E50944B92A}.Debug|x86.ActiveCfg = Debug|Any CPU + {742F7AAD-8263-4188-911B-F0E50944B92A}.Debug|x86.Build.0 = Debug|Any CPU + {742F7AAD-8263-4188-911B-F0E50944B92A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {742F7AAD-8263-4188-911B-F0E50944B92A}.Release|Any CPU.Build.0 = Release|Any CPU + {742F7AAD-8263-4188-911B-F0E50944B92A}.Release|arm.ActiveCfg = Release|Any CPU + {742F7AAD-8263-4188-911B-F0E50944B92A}.Release|arm64.ActiveCfg = Release|Any CPU + {742F7AAD-8263-4188-911B-F0E50944B92A}.Release|x64.ActiveCfg = Release|Any CPU + {742F7AAD-8263-4188-911B-F0E50944B92A}.Release|x64.Build.0 = Release|Any CPU + {742F7AAD-8263-4188-911B-F0E50944B92A}.Release|x86.ActiveCfg = Release|Any CPU + {742F7AAD-8263-4188-911B-F0E50944B92A}.Release|x86.Build.0 = Release|Any CPU + {742F7AAD-8263-4188-911B-F0E50944B92A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {742F7AAD-8263-4188-911B-F0E50944B92A}.Checked|arm.ActiveCfg = Debug|Any CPU + {742F7AAD-8263-4188-911B-F0E50944B92A}.Checked|arm64.ActiveCfg = Debug|Any CPU + {742F7AAD-8263-4188-911B-F0E50944B92A}.Checked|x64.ActiveCfg = Debug|Any CPU + {742F7AAD-8263-4188-911B-F0E50944B92A}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {C150B694-015F-48BD-8CB0-EFF1F7A84DCE} = {A30957A2-C729-49F1-8C75-C42D5BCB8309} - {98AC821B-892E-4F58-AF3D-503747FD6A8F} = {A30957A2-C729-49F1-8C75-C42D5BCB8309} + {C150B694-015F-48BD-8CB0-EFF1F7A84DCE} = {DD4121CE-1AFF-4250-BE6E-C736D001CDCB} {ADD88187-83E2-4EAF-BFB4-BC6249E76457} = {DBF81CE3-B7A6-4A62-9C66-DDB2D87CBB05} {37859855-7E5C-4772-B5D2-7029211EAB92} = {DBF81CE3-B7A6-4A62-9C66-DDB2D87CBB05} {BDD0866A-D856-40EE-A9D5-1DAC11095E42} = {DBF81CE3-B7A6-4A62-9C66-DDB2D87CBB05} @@ -280,6 +404,15 @@ Global {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} + {98AC821B-892E-4F58-AF3D-503747FD6A8F} = {A30957A2-C729-49F1-8C75-C42D5BCB8309} + {4E14547F-0FA7-4558-B0BB-50F093DF78FC} = {7FA9EE1D-CB88-4D56-85CB-83B0E7B4A8C9} + {EB163378-F08A-4B9B-B32B-374386A30F8E} = {7FA9EE1D-CB88-4D56-85CB-83B0E7B4A8C9} + {7FA9EE1D-CB88-4D56-85CB-83B0E7B4A8C9} = {7D76502A-347E-40EB-8EA2-F96040EEEEEF} + {A5D6D45C-1212-4E10-9DAA-55CB5EEE8CB3} = {E6972740-3028-41F0-B4D8-D0F77F0AEFD0} + {7D234C34-A62D-4E71-87D1-898B6F51EA19} = {E6972740-3028-41F0-B4D8-D0F77F0AEFD0} + {E6972740-3028-41F0-B4D8-D0F77F0AEFD0} = {7D76502A-347E-40EB-8EA2-F96040EEEEEF} + {742F7AAD-8263-4188-911B-F0E50944B92A} = {C9F506B9-583D-40CC-80C7-EEEF70A030DC} + {C9F506B9-583D-40CC-80C7-EEEF70A030DC} = {7D76502A-347E-40EB-8EA2-F96040EEEEEF} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {EB54DAE5-7032-48C6-8714-21ED3B5B2D1E} diff --git a/src/libraries/System.Private.Uri/src/System/UriExt.cs b/src/libraries/System.Private.Uri/src/System/UriExt.cs index 6eefa363134135..4eea4d2b8b0a9c 100644 --- a/src/libraries/System.Private.Uri/src/System/UriExt.cs +++ b/src/libraries/System.Private.Uri/src/System/UriExt.cs @@ -866,6 +866,11 @@ public bool IsBaseOf(Uri uri) internal bool IsBaseOfHelper(Uri uriLink) { + const UriComponents ComponentsToCompare = + UriComponents.AbsoluteUri + & ~UriComponents.Fragment + & ~UriComponents.UserInfo; + if (!IsAbsoluteUri || UserDrivenParsing) return false; @@ -892,8 +897,8 @@ internal bool IsBaseOfHelper(Uri uriLink) return false; // Canonicalize and test for substring match up to the last path slash - string self = GetParts(UriComponents.AbsoluteUri & ~UriComponents.Fragment, UriFormat.SafeUnescaped); - string other = uriLink.GetParts(UriComponents.AbsoluteUri & ~UriComponents.Fragment, UriFormat.SafeUnescaped); + string self = GetParts(ComponentsToCompare, UriFormat.SafeUnescaped); + string other = uriLink.GetParts(ComponentsToCompare, UriFormat.SafeUnescaped); unsafe { diff --git a/src/libraries/System.Private.Uri/tests/FunctionalTests/UriParserTest.cs b/src/libraries/System.Private.Uri/tests/FunctionalTests/UriParserTest.cs index c9b02dc7b9c415..6b6d5be47d12c3 100644 --- a/src/libraries/System.Private.Uri/tests/FunctionalTests/UriParserTest.cs +++ b/src/libraries/System.Private.Uri/tests/FunctionalTests/UriParserTest.cs @@ -272,10 +272,9 @@ public static void IsBaseOf() Assert.False(parser.IsBaseOf(u, http), "http-4a"); Assert.True(parser.IsBaseOf(http, u), "http-4b"); - // docs says the UserInfo isn't evaluated, but... u = new Uri("http://username:password@www.mono-project.com/Main_Page"); - Assert.False(parser.IsBaseOf(u, http), "http-5a"); - Assert.False(parser.IsBaseOf(http, u), "http-5b"); + Assert.True(parser.IsBaseOf(u, http), "http-5a"); + Assert.True(parser.IsBaseOf(http, u), "http-5b"); // scheme case sensitive ? no u = new Uri("HTTP://www.mono-project.com/Main_Page"); 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 dc508c023f3c90..882a30b7c4965b 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 @@ -43,12 +43,30 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.RegularExpressions.Generator", "..\System.Text.RegularExpressions\gen\System.Text.RegularExpressions.Generator.csproj", "{DB61E495-5D63-401A-88C6-6A1BB6A737ED}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{E23D8F84-8D4A-448C-9A29-CAB6E772A6AA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{7980BF36-7C21-4202-A4BA-10B03F47878B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{194AB04D-169A-45C4-8532-0B80F9D28B8E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{0453285D-3DC7-46EA-A396-761716391F97}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{177950F5-7D2E-475B-B07E-CB98A1C845CC}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{4CB964C2-C69D-4A48-96A7-ACB28FBCB223}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{1C4146F1-CF77-449B-865C-5E67ECF0362B}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{E9DEC5AA-D875-466B-9E3C-26CFD3C806D3}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{CE5AAF47-0831-442D-A955-971359A0BFB7}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{1A2B43DF-BF35-482E-AB93-5DFFC53CBB42}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{6AF6B518-4D3F-4EF8-8CE2-660C08AF9861}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{37DB9B48-D391-4EB3-BAAC-CC19BE03FFC9}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -143,6 +161,26 @@ Global {DB61E495-5D63-401A-88C6-6A1BB6A737ED}.Debug|Any CPU.Build.0 = Debug|Any CPU {DB61E495-5D63-401A-88C6-6A1BB6A737ED}.Release|Any CPU.ActiveCfg = Release|Any CPU {DB61E495-5D63-401A-88C6-6A1BB6A737ED}.Release|Any CPU.Build.0 = Release|Any CPU + {E23D8F84-8D4A-448C-9A29-CAB6E772A6AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E23D8F84-8D4A-448C-9A29-CAB6E772A6AA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E23D8F84-8D4A-448C-9A29-CAB6E772A6AA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E23D8F84-8D4A-448C-9A29-CAB6E772A6AA}.Release|Any CPU.Build.0 = Release|Any CPU + {7980BF36-7C21-4202-A4BA-10B03F47878B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7980BF36-7C21-4202-A4BA-10B03F47878B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7980BF36-7C21-4202-A4BA-10B03F47878B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7980BF36-7C21-4202-A4BA-10B03F47878B}.Release|Any CPU.Build.0 = Release|Any CPU + {194AB04D-169A-45C4-8532-0B80F9D28B8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {194AB04D-169A-45C4-8532-0B80F9D28B8E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {194AB04D-169A-45C4-8532-0B80F9D28B8E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {194AB04D-169A-45C4-8532-0B80F9D28B8E}.Release|Any CPU.Build.0 = Release|Any CPU + {0453285D-3DC7-46EA-A396-761716391F97}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0453285D-3DC7-46EA-A396-761716391F97}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0453285D-3DC7-46EA-A396-761716391F97}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0453285D-3DC7-46EA-A396-761716391F97}.Release|Any CPU.Build.0 = Release|Any CPU + {177950F5-7D2E-475B-B07E-CB98A1C845CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {177950F5-7D2E-475B-B07E-CB98A1C845CC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {177950F5-7D2E-475B-B07E-CB98A1C845CC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {177950F5-7D2E-475B-B07E-CB98A1C845CC}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -170,6 +208,14 @@ Global {7F136EB7-C602-403B-84CD-753B32D699A8} = {E9DEC5AA-D875-466B-9E3C-26CFD3C806D3} {D85F6247-9473-4AA3-80C8-06D65B035C98} = {E9DEC5AA-D875-466B-9E3C-26CFD3C806D3} {DB61E495-5D63-401A-88C6-6A1BB6A737ED} = {E9DEC5AA-D875-466B-9E3C-26CFD3C806D3} + {E23D8F84-8D4A-448C-9A29-CAB6E772A6AA} = {CE5AAF47-0831-442D-A955-971359A0BFB7} + {7980BF36-7C21-4202-A4BA-10B03F47878B} = {CE5AAF47-0831-442D-A955-971359A0BFB7} + {CE5AAF47-0831-442D-A955-971359A0BFB7} = {37DB9B48-D391-4EB3-BAAC-CC19BE03FFC9} + {194AB04D-169A-45C4-8532-0B80F9D28B8E} = {1A2B43DF-BF35-482E-AB93-5DFFC53CBB42} + {0453285D-3DC7-46EA-A396-761716391F97} = {1A2B43DF-BF35-482E-AB93-5DFFC53CBB42} + {1A2B43DF-BF35-482E-AB93-5DFFC53CBB42} = {37DB9B48-D391-4EB3-BAAC-CC19BE03FFC9} + {177950F5-7D2E-475B-B07E-CB98A1C845CC} = {6AF6B518-4D3F-4EF8-8CE2-660C08AF9861} + {6AF6B518-4D3F-4EF8-8CE2-660C08AF9861} = {37DB9B48-D391-4EB3-BAAC-CC19BE03FFC9} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {466CF638-AFDA-4A38-97EF-C87ED7B93443} diff --git a/src/libraries/System.Private.Xml/System.Private.Xml.sln b/src/libraries/System.Private.Xml/System.Private.Xml.sln index 72a2dd801404a4..d18f2ebac94047 100644 --- a/src/libraries/System.Private.Xml/System.Private.Xml.sln +++ b/src/libraries/System.Private.Xml/System.Private.Xml.sln @@ -27,12 +27,30 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.RegularExpressions.Generator", "..\System.Text.RegularExpressions\gen\System.Text.RegularExpressions.Generator.csproj", "{19C87966-6C1B-4CFA-9798-E989270CAB2B}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{11921A7B-C18B-488A-942D-B6AD39CE0EF2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{7E5055F7-7785-4AE6-A45E-BF6105C66959}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{DBCC4731-6F0C-423E-8783-A2A76642A985}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{839EC779-FC93-4242-BC6E-2CF9B5CD7DA8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{2F4829D8-D773-4A39-BB7F-AAE0B25AE371}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{E96EBB95-6AC7-4ECD-AD77-30F089F2C1F9}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{41E18B29-2DB1-495A-8460-E7A257F8EA07}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{75FE1E48-B986-46E6-874F-336D74FF6C94}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{A3677F66-8D30-44E7-A407-7043DFEBF43B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{0E7E4C81-9748-4D59-9DD1-C5672CE039B0}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{2B4465B9-B79C-407E-A62E-D2BD085E22BF}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{8B2439BD-9FF4-46CE-A80E-9DB49C220B06}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -95,6 +113,26 @@ 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 + {11921A7B-C18B-488A-942D-B6AD39CE0EF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {11921A7B-C18B-488A-942D-B6AD39CE0EF2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {11921A7B-C18B-488A-942D-B6AD39CE0EF2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {11921A7B-C18B-488A-942D-B6AD39CE0EF2}.Release|Any CPU.Build.0 = Release|Any CPU + {7E5055F7-7785-4AE6-A45E-BF6105C66959}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7E5055F7-7785-4AE6-A45E-BF6105C66959}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7E5055F7-7785-4AE6-A45E-BF6105C66959}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7E5055F7-7785-4AE6-A45E-BF6105C66959}.Release|Any CPU.Build.0 = Release|Any CPU + {DBCC4731-6F0C-423E-8783-A2A76642A985}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DBCC4731-6F0C-423E-8783-A2A76642A985}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DBCC4731-6F0C-423E-8783-A2A76642A985}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DBCC4731-6F0C-423E-8783-A2A76642A985}.Release|Any CPU.Build.0 = Release|Any CPU + {839EC779-FC93-4242-BC6E-2CF9B5CD7DA8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {839EC779-FC93-4242-BC6E-2CF9B5CD7DA8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {839EC779-FC93-4242-BC6E-2CF9B5CD7DA8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {839EC779-FC93-4242-BC6E-2CF9B5CD7DA8}.Release|Any CPU.Build.0 = Release|Any CPU + {2F4829D8-D773-4A39-BB7F-AAE0B25AE371}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2F4829D8-D773-4A39-BB7F-AAE0B25AE371}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2F4829D8-D773-4A39-BB7F-AAE0B25AE371}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2F4829D8-D773-4A39-BB7F-AAE0B25AE371}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -114,6 +152,14 @@ Global {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} + {11921A7B-C18B-488A-942D-B6AD39CE0EF2} = {A3677F66-8D30-44E7-A407-7043DFEBF43B} + {7E5055F7-7785-4AE6-A45E-BF6105C66959} = {A3677F66-8D30-44E7-A407-7043DFEBF43B} + {A3677F66-8D30-44E7-A407-7043DFEBF43B} = {8B2439BD-9FF4-46CE-A80E-9DB49C220B06} + {DBCC4731-6F0C-423E-8783-A2A76642A985} = {0E7E4C81-9748-4D59-9DD1-C5672CE039B0} + {839EC779-FC93-4242-BC6E-2CF9B5CD7DA8} = {0E7E4C81-9748-4D59-9DD1-C5672CE039B0} + {0E7E4C81-9748-4D59-9DD1-C5672CE039B0} = {8B2439BD-9FF4-46CE-A80E-9DB49C220B06} + {2F4829D8-D773-4A39-BB7F-AAE0B25AE371} = {2B4465B9-B79C-407E-A62E-D2BD085E22BF} + {2B4465B9-B79C-407E-A62E-D2BD085E22BF} = {8B2439BD-9FF4-46CE-A80E-9DB49C220B06} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {80121011-1A73-45DC-80FC-B3727F3DF58C} diff --git a/src/libraries/System.Private.Xml/tests/AllowDefaultResolverContext.cs b/src/libraries/System.Private.Xml/tests/AllowDefaultResolverContext.cs index 24e626e67b1357..cc8ee2a96a3bd4 100644 --- a/src/libraries/System.Private.Xml/tests/AllowDefaultResolverContext.cs +++ b/src/libraries/System.Private.Xml/tests/AllowDefaultResolverContext.cs @@ -32,7 +32,7 @@ private static void ClearCachedSwitch() // the default, or alternatively separate all such tests into a separate test project // where that project contains only those tests that require the switch set. - Type t = typeof(XmlConvert).Assembly.GetType("System.Xml.LocalAppContextSwitches"); + Type t = Type.GetType("System.Xml.LocalAppContextSwitches, System.Private.Xml"); Assert.NotNull(t); FieldInfo fi = t.GetField("s_allowDefaultResolver", BindingFlags.NonPublic | BindingFlags.Static); 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 d349b820a32b82..248c92b2e90c98 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 @@ -2,9 +2,6 @@ System.Xml.Tests $(NetCoreAppCurrent) - - - false diff --git a/src/libraries/System.Private.Xml/tests/XmlReader/Tests/AsyncReaderLateInitTests.cs b/src/libraries/System.Private.Xml/tests/XmlReader/Tests/AsyncReaderLateInitTests.cs index 85f2fd9fdf7f10..05fd83798861d7 100644 --- a/src/libraries/System.Private.Xml/tests/XmlReader/Tests/AsyncReaderLateInitTests.cs +++ b/src/libraries/System.Private.Xml/tests/XmlReader/Tests/AsyncReaderLateInitTests.cs @@ -69,6 +69,7 @@ public static void ReadAfterInitializationWithTextReaderOnAsyncReaderDoesNotThro } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void ReadAsyncAfterInitializationWithUriThrows() { using (XmlReader reader = XmlReader.Create("http://test.test/test.html", new XmlReaderSettings() { Async = true })) @@ -78,6 +79,7 @@ public static void ReadAsyncAfterInitializationWithUriThrows() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void ReadAfterInitializationWithUriOnAsyncReaderTrows() { using (XmlReader reader = XmlReader.Create("http://test.test/test.html", new XmlReaderSettings() { Async = true })) @@ -87,6 +89,7 @@ public static void ReadAfterInitializationWithUriOnAsyncReaderTrows() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void InitializationWithUriOnNonAsyncReaderThrows() { Assert.Throws(() => XmlReader.Create("http://test.test/test.html", new XmlReaderSettings() { Async = false })); diff --git a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaSet/TC_SchemaSet_Misc.cs b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaSet/TC_SchemaSet_Misc.cs index 5bd839f5bdd45a..31c201c61745b7 100644 --- a/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaSet/TC_SchemaSet_Misc.cs +++ b/src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaSet/TC_SchemaSet_Misc.cs @@ -1023,10 +1023,12 @@ public void Dev10_40561() return; } - // Test failure on ILC: Test depends on Xml Serialization and requires reflection on a LOT of types under System.Xml.Schema namespace. - // Rd.xml with "" lets this test pass but we should probably be - // fixing up XmlSerializer's own rd.xml rather than the test here. +#if !ReflectionOnly && !XMLSERIALIZERGENERATORTESTS + // Conditioned the same as XmlSerializer tests. This uses XmlSerializer to serialize the schema. + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBuiltWithAggressiveTrimming))] +#else [Fact] +#endif public void GetBuiltinSimpleTypeWorksAsEcpected() { Initialize(); 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 5699868c280638..f8d12d5dec8acf 100644 --- a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslTransformMultith.cs +++ b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslTransformMultith.cs @@ -78,6 +78,7 @@ public int Transform(object args) //[Variation("Multiple Transform(): Reader - Basic Test")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc1() { Load("xslt_multithreading_test.xsl", "foo.xml"); @@ -98,6 +99,7 @@ public void proc1() //[Variation("Multiple Transform(): Reader - QFE 505 Repro")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc2() { using (new AllowDefaultResolverContext()) @@ -119,6 +121,7 @@ public void proc2() //[Variation("Multiple Transform(): Reader - AVTs")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc3() { Load("xslt_multith_AVTs.xsl", "xslt_multith_AVTs.xml"); @@ -139,6 +142,7 @@ public void proc3() //[Variation("Multiple Transform(): Reader - xsl:key")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc4() { Load("xslt_multith_keytest.xsl", "xslt_multith_keytest.xml"); @@ -159,6 +163,7 @@ public void proc4() //[Variation("Multiple Transform(): Reader - xsl:sort")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc5() { Load("xslt_multith_sorting.xsl", "xslt_multith_sorting.xml"); @@ -179,6 +184,7 @@ public void proc5() //[Variation("Multiple Transform(): Reader - Attribute Sets")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc6() { Load("xslt_mutith_attribute_sets.xsl", "xslt_mutith_attribute_sets.xml"); @@ -199,6 +205,7 @@ public void proc6() //[Variation("Multiple Transform(): Reader - Boolean Expression AND")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc7() { Load("xslt_mutith_boolean_expr_and.xsl", "xslt_mutith_boolean_expr_and.xml"); @@ -219,6 +226,7 @@ public void proc7() //[Variation("Multiple Transform(): Reader - Boolean Expression OR")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc8() { Load("xslt_mutith_boolean_expr_or.xsl", "xslt_mutith_boolean_expr_or.xml"); @@ -239,6 +247,7 @@ public void proc8() //[Variation("Multiple Transform(): Reader - FormatNumber function")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc9() { Load("xslt_mutith_format_number.xsl", "xslt_mutith_format_number.xml"); @@ -259,6 +268,7 @@ public void proc9() //[Variation("Multiple Transform(): Reader - Position() function")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc10() { Load("xslt_mutith_position_func.xsl", "xslt_mutith_position_func.xml"); @@ -279,6 +289,7 @@ public void proc10() //[Variation("Multiple Transform(): Reader - preserve space")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc11() { Load("xslt_mutith_preserve_space.xsl", "xslt_mutith_preserve_space.xml"); @@ -299,6 +310,7 @@ public void proc11() //[Variation("Multiple Transform(): Reader - Variable nodeset")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc12() { Load("xslt_mutith_variable_nodeset.xsl", "xslt_mutith_variable_nodeset.xml"); @@ -365,6 +377,7 @@ private void Load(string _strXslFile, string _strXmlFile) //[Variation("Multiple Transform(): TextWriter - Basic Test")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc1() { Load("xslt_multithreading_test.xsl", "foo.xml"); @@ -385,6 +398,7 @@ public void proc1() //[Variation("Multiple Transform(): TextWriter - QFE 505 Repro")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc2() { using (new AllowDefaultResolverContext()) @@ -406,6 +420,7 @@ public void proc2() //[Variation("Multiple Transform(): TextWriter - AVTs")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc3() { Load("xslt_multith_AVTs.xsl", "xslt_multith_AVTs.xml"); @@ -426,6 +441,7 @@ public void proc3() //[Variation("Multiple Transform(): TextWriter - xsl:key")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc4() { Load("xslt_multith_keytest.xsl", "xslt_multith_keytest.xml"); @@ -446,6 +462,7 @@ public void proc4() //[Variation("Multiple Transform(): TextWriter - xsl:sort")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc5() { Load("xslt_multith_sorting.xsl", "xslt_multith_sorting.xml"); @@ -466,6 +483,7 @@ public void proc5() //[Variation("Multiple Transform(): TextWriter - Attribute Sets")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc6() { Load("xslt_mutith_attribute_sets.xsl", "xslt_mutith_attribute_sets.xml"); @@ -486,6 +504,7 @@ public void proc6() //[Variation("Multiple Transform(): TextWriter - Boolean Expression AND")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc7() { Load("xslt_mutith_boolean_expr_and.xsl", "xslt_mutith_boolean_expr_and.xml"); @@ -506,6 +525,7 @@ public void proc7() //[Variation("Multiple Transform(): TextWriter - Boolean Expression OR")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc8() { Load("xslt_mutith_boolean_expr_or.xsl", "xslt_mutith_boolean_expr_or.xml"); @@ -526,6 +546,7 @@ public void proc8() //[Variation("Multiple Transform(): TextWriter - FormatNumber function")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc9() { Load("xslt_mutith_format_number.xsl", "xslt_mutith_format_number.xml"); @@ -546,6 +567,7 @@ public void proc9() //[Variation("Multiple Transform(): TextWriter - Position() function")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc10() { Load("xslt_mutith_position_func.xsl", "xslt_mutith_position_func.xml"); @@ -566,6 +588,7 @@ public void proc10() //[Variation("Multiple Transform(): TextWriter - preserve space")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc11() { Load("xslt_mutith_preserve_space.xsl", "xslt_mutith_preserve_space.xml"); @@ -586,6 +609,7 @@ public void proc11() //[Variation("Multiple Transform(): TextWriter - Variable nodeset")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc12() { Load("xslt_mutith_variable_nodeset.xsl", "xslt_mutith_variable_nodeset.xml"); 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 bfa3788d0c9072..920cf4a1d01453 100644 --- a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltArgumentListMultith.cs +++ b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltArgumentListMultith.cs @@ -105,6 +105,7 @@ public int GetParam2(object args) //[Variation("Multiple GetParam for same parameter name")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc1() { CThreads rThreads = new CThreads(_output); @@ -123,6 +124,7 @@ public void proc1() //[Variation("Multiple GetParam for different parameter name")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc2() { CThreads rThreads = new CThreads(_output); @@ -190,6 +192,7 @@ public int GetExtnObject2(object args) //[Variation("Multiple GetExtensionObject for same namespace System.Xml.Tests")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc1() { CThreads rThreads = new CThreads(_output); @@ -208,6 +211,7 @@ public void proc1() //[Variation("Multiple GetExtensionObject for different namespace System.Xml.Tests")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc2() { CThreads rThreads = new CThreads(_output); @@ -276,6 +280,7 @@ public int SharedArgList(object args) //////////////////////////////////////////////////////////////// //[Variation("Multiple transforms using shared ArgumentList")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc1() { CThreads rThreads = new CThreads(_output); diff --git a/src/libraries/System.Private.Xml/tests/Xslt/XslTransformApi/CXslTransformMultith.cs b/src/libraries/System.Private.Xml/tests/Xslt/XslTransformApi/CXslTransformMultith.cs index 7caf4550a068e8..f81bf6240c84d0 100644 --- a/src/libraries/System.Private.Xml/tests/Xslt/XslTransformApi/CXslTransformMultith.cs +++ b/src/libraries/System.Private.Xml/tests/Xslt/XslTransformApi/CXslTransformMultith.cs @@ -76,6 +76,7 @@ public virtual int Transform(object args) [InlineData("xslt_mutith_variable_global_forward_ref_deep.xsl", "xslt_mutith_variable_nodeset.xml")] //[Variation("Local and global variables", Params = new object[] { "xslt_mutith_variable_local_and_global.xsl", "xslt_mutith_variable_local_and_global.xsl" })] [InlineData("xslt_mutith_variable_local_and_global.xsl", "xslt_mutith_variable_local_and_global.xsl")] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] public void Variations(object param0, object param1) { diff --git a/src/libraries/System.Private.Xml/tests/Xslt/XslTransformApi/CXsltArgumentListMultith.cs b/src/libraries/System.Private.Xml/tests/Xslt/XslTransformApi/CXsltArgumentListMultith.cs index ae2927e4308696..d6b6e6e0a26614 100644 --- a/src/libraries/System.Private.Xml/tests/Xslt/XslTransformApi/CXsltArgumentListMultith.cs +++ b/src/libraries/System.Private.Xml/tests/Xslt/XslTransformApi/CXsltArgumentListMultith.cs @@ -105,6 +105,7 @@ public int GetParam2(object args) //[Variation("Multiple GetParam for same parameter name")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc1() { CThreads rThreads = new CThreads(_output); @@ -123,6 +124,7 @@ public void proc1() //[Variation("Multiple GetParam for different parameter name")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc2() { CThreads rThreads = new CThreads(_output); @@ -189,6 +191,7 @@ public int GetExtnObject2(object args) //[Variation("Multiple GetExtensionObject for same namespace System.Xml.Tests")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc1() { CThreads rThreads = new CThreads(_output); @@ -207,6 +210,7 @@ public void proc1() //[Variation("Multiple GetExtensionObject for different namespace System.Xml.Tests")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc2() { CThreads rThreads = new CThreads(_output); @@ -275,6 +279,7 @@ public int SharedArgList(object args) //////////////////////////////////////////////////////////////// //[Variation("Multiple transforms using shared ArgumentList")] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void proc1() { CThreads rThreads = new CThreads(_output); diff --git a/src/libraries/System.Reflection.Context/System.Reflection.Context.sln b/src/libraries/System.Reflection.Context/System.Reflection.Context.sln index 17d4948227fd23..6e26ae1db7a92b 100644 --- a/src/libraries/System.Reflection.Context/System.Reflection.Context.sln +++ b/src/libraries/System.Reflection.Context/System.Reflection.Context.sln @@ -7,12 +7,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection.Context", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection.Context.Tests", "tests\System.Reflection.Context.Tests.csproj", "{34EA59F6-6177-4957-9894-563A73B02D63}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{4ABE7379-B93A-45BD-961B-9B53A92741FF}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{CDC2FCCA-3BDD-44D6-94E2-864684AFA61D}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{7EEF6CAC-49D4-4D06-9414-2C9175898D13}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{164DAD51-B6B7-42FF-9728-1A341B4B4954}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{05C4A684-0C5B-4B7D-980B-044AB39C5F27}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{279226BA-AC16-47C4-A028-93CEA33B7042}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{CB9AE0D1-A8BE-4D57-9182-8503B8DAD978}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{EEAFF6BF-5820-41B0-A732-122D25C886E0}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{C676A2DE-6F6F-44AF-B869-53C834A272AF}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{31D51BA2-EB4E-4EC1-908D-EC23CB91C89D}" @@ -21,6 +29,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E460C3AC-CC6 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{AC2F6758-1191-4142-B369-6C2E27A4BEBC}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{76FC7429-44DE-4EA2-A86B-0ADA71EF8EB3}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{4EAD2A79-3AB4-46E8-A61D-E4C6CA8A0112}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{21654DCB-2787-4516-8FD6-A0FD4E4EADE9}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{7A6C79A3-F42D-41BE-8003-A8678ECD8809}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -43,10 +59,6 @@ Global {34EA59F6-6177-4957-9894-563A73B02D63}.Debug|Any CPU.Build.0 = Debug|Any CPU {34EA59F6-6177-4957-9894-563A73B02D63}.Release|Any CPU.ActiveCfg = Release|Any CPU {34EA59F6-6177-4957-9894-563A73B02D63}.Release|Any CPU.Build.0 = Release|Any CPU - {4ABE7379-B93A-45BD-961B-9B53A92741FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4ABE7379-B93A-45BD-961B-9B53A92741FF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4ABE7379-B93A-45BD-961B-9B53A92741FF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4ABE7379-B93A-45BD-961B-9B53A92741FF}.Release|Any CPU.Build.0 = Release|Any CPU {CDC2FCCA-3BDD-44D6-94E2-864684AFA61D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CDC2FCCA-3BDD-44D6-94E2-864684AFA61D}.Debug|Any CPU.Build.0 = Debug|Any CPU {CDC2FCCA-3BDD-44D6-94E2-864684AFA61D}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -55,6 +67,26 @@ Global {7EEF6CAC-49D4-4D06-9414-2C9175898D13}.Debug|Any CPU.Build.0 = Debug|Any CPU {7EEF6CAC-49D4-4D06-9414-2C9175898D13}.Release|Any CPU.ActiveCfg = Release|Any CPU {7EEF6CAC-49D4-4D06-9414-2C9175898D13}.Release|Any CPU.Build.0 = Release|Any CPU + {164DAD51-B6B7-42FF-9728-1A341B4B4954}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {164DAD51-B6B7-42FF-9728-1A341B4B4954}.Debug|Any CPU.Build.0 = Debug|Any CPU + {164DAD51-B6B7-42FF-9728-1A341B4B4954}.Release|Any CPU.ActiveCfg = Release|Any CPU + {164DAD51-B6B7-42FF-9728-1A341B4B4954}.Release|Any CPU.Build.0 = Release|Any CPU + {05C4A684-0C5B-4B7D-980B-044AB39C5F27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {05C4A684-0C5B-4B7D-980B-044AB39C5F27}.Debug|Any CPU.Build.0 = Debug|Any CPU + {05C4A684-0C5B-4B7D-980B-044AB39C5F27}.Release|Any CPU.ActiveCfg = Release|Any CPU + {05C4A684-0C5B-4B7D-980B-044AB39C5F27}.Release|Any CPU.Build.0 = Release|Any CPU + {279226BA-AC16-47C4-A028-93CEA33B7042}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {279226BA-AC16-47C4-A028-93CEA33B7042}.Debug|Any CPU.Build.0 = Debug|Any CPU + {279226BA-AC16-47C4-A028-93CEA33B7042}.Release|Any CPU.ActiveCfg = Release|Any CPU + {279226BA-AC16-47C4-A028-93CEA33B7042}.Release|Any CPU.Build.0 = Release|Any CPU + {CB9AE0D1-A8BE-4D57-9182-8503B8DAD978}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CB9AE0D1-A8BE-4D57-9182-8503B8DAD978}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CB9AE0D1-A8BE-4D57-9182-8503B8DAD978}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CB9AE0D1-A8BE-4D57-9182-8503B8DAD978}.Release|Any CPU.Build.0 = Release|Any CPU + {EEAFF6BF-5820-41B0-A732-122D25C886E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EEAFF6BF-5820-41B0-A732-122D25C886E0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EEAFF6BF-5820-41B0-A732-122D25C886E0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EEAFF6BF-5820-41B0-A732-122D25C886E0}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -64,9 +96,16 @@ Global {34EA59F6-6177-4957-9894-563A73B02D63} = {C676A2DE-6F6F-44AF-B869-53C834A272AF} {B2EBCE83-FA49-4ECD-9E8E-AF231AADFF67} = {31D51BA2-EB4E-4EC1-908D-EC23CB91C89D} {794EAE71-36BA-436D-841A-A8C72AADF485} = {E460C3AC-CC68-44E7-9256-75062C1CF587} - {4ABE7379-B93A-45BD-961B-9B53A92741FF} = {AC2F6758-1191-4142-B369-6C2E27A4BEBC} {CDC2FCCA-3BDD-44D6-94E2-864684AFA61D} = {AC2F6758-1191-4142-B369-6C2E27A4BEBC} {7EEF6CAC-49D4-4D06-9414-2C9175898D13} = {AC2F6758-1191-4142-B369-6C2E27A4BEBC} + {164DAD51-B6B7-42FF-9728-1A341B4B4954} = {76FC7429-44DE-4EA2-A86B-0ADA71EF8EB3} + {05C4A684-0C5B-4B7D-980B-044AB39C5F27} = {76FC7429-44DE-4EA2-A86B-0ADA71EF8EB3} + {76FC7429-44DE-4EA2-A86B-0ADA71EF8EB3} = {7A6C79A3-F42D-41BE-8003-A8678ECD8809} + {279226BA-AC16-47C4-A028-93CEA33B7042} = {4EAD2A79-3AB4-46E8-A61D-E4C6CA8A0112} + {CB9AE0D1-A8BE-4D57-9182-8503B8DAD978} = {4EAD2A79-3AB4-46E8-A61D-E4C6CA8A0112} + {4EAD2A79-3AB4-46E8-A61D-E4C6CA8A0112} = {7A6C79A3-F42D-41BE-8003-A8678ECD8809} + {EEAFF6BF-5820-41B0-A732-122D25C886E0} = {21654DCB-2787-4516-8FD6-A0FD4E4EADE9} + {21654DCB-2787-4516-8FD6-A0FD4E4EADE9} = {7A6C79A3-F42D-41BE-8003-A8678ECD8809} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {BD91D429-58C1-4CA3-A800-E308C697485B} diff --git a/src/libraries/System.Reflection.Context/src/CompatibilitySuppressions.xml b/src/libraries/System.Reflection.Context/src/CompatibilitySuppressions.xml index afe6f69d4c0590..077d39394df3d8 100644 --- a/src/libraries/System.Reflection.Context/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Reflection.Context/src/CompatibilitySuppressions.xml @@ -1,8 +1,23 @@  + CP0003 System.Reflection.Context, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.Reflection.Context.dll + lib/netstandard2.1/System.Reflection.Context.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.Reflection.Context.dll + lib/netstandard2.1/System.Reflection.Context.dll + true + \ No newline at end of file diff --git a/src/libraries/System.Reflection.DispatchProxy/System.Reflection.DispatchProxy.sln b/src/libraries/System.Reflection.DispatchProxy/System.Reflection.DispatchProxy.sln index edff430260916c..63e606f05d41fa 100644 --- a/src/libraries/System.Reflection.DispatchProxy/System.Reflection.DispatchProxy.sln +++ b/src/libraries/System.Reflection.DispatchProxy/System.Reflection.DispatchProxy.sln @@ -15,6 +15,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{A7AB7982-726A-47D1-AD9E-4306FECE5F4B}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{49563DBE-6B20-4BED-ADF7-0FD7724299D8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{77BBC09A-4D62-438E-BEFC-4F5EFB2061CB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{2195DEDC-49AA-4B26-80F4-8EACBCA4AAA1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{0C838AF6-FD56-4A00-9EAF-C572F40DEAC1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{5E688972-12CF-4E0A-B3EC-8BF6B938CE02}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{A93B0848-1831-47F3-AE2E-196950D1BBF0}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{F1A0875B-0263-4071-8847-F0A2C479F6F9}" @@ -23,6 +33,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{95661E1D-F86 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{03BEF49E-85A2-49A8-9A48-EF93FA21B743}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{B5966BF5-E3ED-494C-9CE1-04A172C511B5}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{DA07298D-68FD-420D-BD83-21C1A5D1D2D1}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{61A03505-3274-4799-975D-C48EF7A55646}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{D064C025-020C-4DDA-B74A-72D8D49BAEEC}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -61,6 +79,26 @@ Global {A7AB7982-726A-47D1-AD9E-4306FECE5F4B}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7AB7982-726A-47D1-AD9E-4306FECE5F4B}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7AB7982-726A-47D1-AD9E-4306FECE5F4B}.Release|Any CPU.Build.0 = Release|Any CPU + {49563DBE-6B20-4BED-ADF7-0FD7724299D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {49563DBE-6B20-4BED-ADF7-0FD7724299D8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {49563DBE-6B20-4BED-ADF7-0FD7724299D8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {49563DBE-6B20-4BED-ADF7-0FD7724299D8}.Release|Any CPU.Build.0 = Release|Any CPU + {77BBC09A-4D62-438E-BEFC-4F5EFB2061CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {77BBC09A-4D62-438E-BEFC-4F5EFB2061CB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {77BBC09A-4D62-438E-BEFC-4F5EFB2061CB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {77BBC09A-4D62-438E-BEFC-4F5EFB2061CB}.Release|Any CPU.Build.0 = Release|Any CPU + {2195DEDC-49AA-4B26-80F4-8EACBCA4AAA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2195DEDC-49AA-4B26-80F4-8EACBCA4AAA1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2195DEDC-49AA-4B26-80F4-8EACBCA4AAA1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2195DEDC-49AA-4B26-80F4-8EACBCA4AAA1}.Release|Any CPU.Build.0 = Release|Any CPU + {0C838AF6-FD56-4A00-9EAF-C572F40DEAC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0C838AF6-FD56-4A00-9EAF-C572F40DEAC1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0C838AF6-FD56-4A00-9EAF-C572F40DEAC1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0C838AF6-FD56-4A00-9EAF-C572F40DEAC1}.Release|Any CPU.Build.0 = Release|Any CPU + {5E688972-12CF-4E0A-B3EC-8BF6B938CE02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5E688972-12CF-4E0A-B3EC-8BF6B938CE02}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5E688972-12CF-4E0A-B3EC-8BF6B938CE02}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5E688972-12CF-4E0A-B3EC-8BF6B938CE02}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -74,6 +112,14 @@ Global {F5A284B5-10D3-43D4-BB3F-F0FB55033504} = {95661E1D-F86D-4EDC-AF44-E0F782BB7E4B} {8FC6C206-76D5-4FE2-A7A4-C0B6597709AF} = {03BEF49E-85A2-49A8-9A48-EF93FA21B743} {318BE680-88DD-478B-ABA8-B19C1BBB93E9} = {03BEF49E-85A2-49A8-9A48-EF93FA21B743} + {49563DBE-6B20-4BED-ADF7-0FD7724299D8} = {B5966BF5-E3ED-494C-9CE1-04A172C511B5} + {77BBC09A-4D62-438E-BEFC-4F5EFB2061CB} = {B5966BF5-E3ED-494C-9CE1-04A172C511B5} + {B5966BF5-E3ED-494C-9CE1-04A172C511B5} = {D064C025-020C-4DDA-B74A-72D8D49BAEEC} + {2195DEDC-49AA-4B26-80F4-8EACBCA4AAA1} = {DA07298D-68FD-420D-BD83-21C1A5D1D2D1} + {0C838AF6-FD56-4A00-9EAF-C572F40DEAC1} = {DA07298D-68FD-420D-BD83-21C1A5D1D2D1} + {DA07298D-68FD-420D-BD83-21C1A5D1D2D1} = {D064C025-020C-4DDA-B74A-72D8D49BAEEC} + {5E688972-12CF-4E0A-B3EC-8BF6B938CE02} = {61A03505-3274-4799-975D-C48EF7A55646} + {61A03505-3274-4799-975D-C48EF7A55646} = {D064C025-020C-4DDA-B74A-72D8D49BAEEC} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {32381969-33E3-4DA1-A3DD-82AC1EA2FF9E} diff --git a/src/libraries/System.Reflection.DispatchProxy/src/System/Reflection/DispatchProxyGenerator.cs b/src/libraries/System.Reflection.DispatchProxy/src/System/Reflection/DispatchProxyGenerator.cs index 891daac1b52be4..d6ba3df9a9f815 100644 --- a/src/libraries/System.Reflection.DispatchProxy/src/System/Reflection/DispatchProxyGenerator.cs +++ b/src/libraries/System.Reflection.DispatchProxy/src/System/Reflection/DispatchProxyGenerator.cs @@ -118,9 +118,20 @@ private sealed class ProxyAssembly [RequiresDynamicCode("Defining a dynamic assembly requires generating code at runtime")] public ProxyAssembly(AssemblyLoadContext alc) { + string name; + if (alc == AssemblyLoadContext.Default) + { + name = "ProxyBuilder"; + } + else + { + string? alcName = alc.Name; + name = string.IsNullOrEmpty(alcName) ? $"DispatchProxyTypes.{alc.GetHashCode()}" : $"DispatchProxyTypes.{new AssemblyName { Name = alcName }}"; + } + AssemblyBuilderAccess builderAccess = alc.IsCollectible ? AssemblyBuilderAccess.RunAndCollect : AssemblyBuilderAccess.Run; - _ab = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("ProxyBuilder"), builderAccess); + _ab = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName(name), builderAccess); _mb = _ab.DefineDynamicModule("testmod"); } 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 ed7d27fec4cb6a..d05eb1efa931d0 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 @@ -25,7 +25,17 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.InteropServi EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{81204A19-8DF3-461B-A5FE-7B85149F5CCD}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C723F596-B189-428C-A090-F4965F87A73D}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{6B47F791-1C84-4B75-B04B-076E9ACBF954}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{134F392F-0DDF-4C9C-A35C-CD6A43DBD992}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{492B3A0B-F2B8-437C-BAF5-16E918E8E2DC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{E5399050-E71C-4B05-8DD0-9ED058F66F43}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{A6E681A5-2AFD-4BCE-8825-AF7DBECDA2F1}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{F8E304FE-819F-483A-B1B2-883C6E18B41F}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{61C529DF-66C4-42E9-AE70-3427838FAFE3}" EndProject @@ -33,6 +43,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{A20A0878-564 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{155A2103-05C1-4020-8922-4F6275F6AE7E}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C723F596-B189-428C-A090-F4965F87A73D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{CA60D894-129C-47A8-BDC7-C11E8D67913A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{FC6D5A7E-628F-43EE-A2D9-A07C7032EA5F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{51626095-E4FC-493E-9459-3B9ABC4C7E3F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{62AB992D-D3B5-4704-8915-4CF93A6E9AD0}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -334,13 +354,117 @@ Global {81204A19-8DF3-461B-A5FE-7B85149F5CCD}.Checked|arm64.ActiveCfg = Debug|Any CPU {81204A19-8DF3-461B-A5FE-7B85149F5CCD}.Checked|x64.ActiveCfg = Debug|Any CPU {81204A19-8DF3-461B-A5FE-7B85149F5CCD}.Checked|x86.ActiveCfg = Debug|Any CPU + {6B47F791-1C84-4B75-B04B-076E9ACBF954}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6B47F791-1C84-4B75-B04B-076E9ACBF954}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6B47F791-1C84-4B75-B04B-076E9ACBF954}.Debug|arm.ActiveCfg = Debug|Any CPU + {6B47F791-1C84-4B75-B04B-076E9ACBF954}.Debug|arm64.ActiveCfg = Debug|Any CPU + {6B47F791-1C84-4B75-B04B-076E9ACBF954}.Debug|x64.ActiveCfg = Debug|Any CPU + {6B47F791-1C84-4B75-B04B-076E9ACBF954}.Debug|x64.Build.0 = Debug|Any CPU + {6B47F791-1C84-4B75-B04B-076E9ACBF954}.Debug|x86.ActiveCfg = Debug|Any CPU + {6B47F791-1C84-4B75-B04B-076E9ACBF954}.Debug|x86.Build.0 = Debug|Any CPU + {6B47F791-1C84-4B75-B04B-076E9ACBF954}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6B47F791-1C84-4B75-B04B-076E9ACBF954}.Release|Any CPU.Build.0 = Release|Any CPU + {6B47F791-1C84-4B75-B04B-076E9ACBF954}.Release|arm.ActiveCfg = Release|Any CPU + {6B47F791-1C84-4B75-B04B-076E9ACBF954}.Release|arm64.ActiveCfg = Release|Any CPU + {6B47F791-1C84-4B75-B04B-076E9ACBF954}.Release|x64.ActiveCfg = Release|Any CPU + {6B47F791-1C84-4B75-B04B-076E9ACBF954}.Release|x64.Build.0 = Release|Any CPU + {6B47F791-1C84-4B75-B04B-076E9ACBF954}.Release|x86.ActiveCfg = Release|Any CPU + {6B47F791-1C84-4B75-B04B-076E9ACBF954}.Release|x86.Build.0 = Release|Any CPU + {6B47F791-1C84-4B75-B04B-076E9ACBF954}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {6B47F791-1C84-4B75-B04B-076E9ACBF954}.Checked|arm.ActiveCfg = Debug|Any CPU + {6B47F791-1C84-4B75-B04B-076E9ACBF954}.Checked|arm64.ActiveCfg = Debug|Any CPU + {6B47F791-1C84-4B75-B04B-076E9ACBF954}.Checked|x64.ActiveCfg = Debug|Any CPU + {6B47F791-1C84-4B75-B04B-076E9ACBF954}.Checked|x86.ActiveCfg = Debug|Any CPU + {134F392F-0DDF-4C9C-A35C-CD6A43DBD992}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {134F392F-0DDF-4C9C-A35C-CD6A43DBD992}.Debug|Any CPU.Build.0 = Debug|Any CPU + {134F392F-0DDF-4C9C-A35C-CD6A43DBD992}.Debug|arm.ActiveCfg = Debug|Any CPU + {134F392F-0DDF-4C9C-A35C-CD6A43DBD992}.Debug|arm64.ActiveCfg = Debug|Any CPU + {134F392F-0DDF-4C9C-A35C-CD6A43DBD992}.Debug|x64.ActiveCfg = Debug|Any CPU + {134F392F-0DDF-4C9C-A35C-CD6A43DBD992}.Debug|x64.Build.0 = Debug|Any CPU + {134F392F-0DDF-4C9C-A35C-CD6A43DBD992}.Debug|x86.ActiveCfg = Debug|Any CPU + {134F392F-0DDF-4C9C-A35C-CD6A43DBD992}.Debug|x86.Build.0 = Debug|Any CPU + {134F392F-0DDF-4C9C-A35C-CD6A43DBD992}.Release|Any CPU.ActiveCfg = Release|Any CPU + {134F392F-0DDF-4C9C-A35C-CD6A43DBD992}.Release|Any CPU.Build.0 = Release|Any CPU + {134F392F-0DDF-4C9C-A35C-CD6A43DBD992}.Release|arm.ActiveCfg = Release|Any CPU + {134F392F-0DDF-4C9C-A35C-CD6A43DBD992}.Release|arm64.ActiveCfg = Release|Any CPU + {134F392F-0DDF-4C9C-A35C-CD6A43DBD992}.Release|x64.ActiveCfg = Release|Any CPU + {134F392F-0DDF-4C9C-A35C-CD6A43DBD992}.Release|x64.Build.0 = Release|Any CPU + {134F392F-0DDF-4C9C-A35C-CD6A43DBD992}.Release|x86.ActiveCfg = Release|Any CPU + {134F392F-0DDF-4C9C-A35C-CD6A43DBD992}.Release|x86.Build.0 = Release|Any CPU + {134F392F-0DDF-4C9C-A35C-CD6A43DBD992}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {134F392F-0DDF-4C9C-A35C-CD6A43DBD992}.Checked|arm.ActiveCfg = Debug|Any CPU + {134F392F-0DDF-4C9C-A35C-CD6A43DBD992}.Checked|arm64.ActiveCfg = Debug|Any CPU + {134F392F-0DDF-4C9C-A35C-CD6A43DBD992}.Checked|x64.ActiveCfg = Debug|Any CPU + {134F392F-0DDF-4C9C-A35C-CD6A43DBD992}.Checked|x86.ActiveCfg = Debug|Any CPU + {492B3A0B-F2B8-437C-BAF5-16E918E8E2DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {492B3A0B-F2B8-437C-BAF5-16E918E8E2DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {492B3A0B-F2B8-437C-BAF5-16E918E8E2DC}.Debug|arm.ActiveCfg = Debug|Any CPU + {492B3A0B-F2B8-437C-BAF5-16E918E8E2DC}.Debug|arm64.ActiveCfg = Debug|Any CPU + {492B3A0B-F2B8-437C-BAF5-16E918E8E2DC}.Debug|x64.ActiveCfg = Debug|Any CPU + {492B3A0B-F2B8-437C-BAF5-16E918E8E2DC}.Debug|x64.Build.0 = Debug|Any CPU + {492B3A0B-F2B8-437C-BAF5-16E918E8E2DC}.Debug|x86.ActiveCfg = Debug|Any CPU + {492B3A0B-F2B8-437C-BAF5-16E918E8E2DC}.Debug|x86.Build.0 = Debug|Any CPU + {492B3A0B-F2B8-437C-BAF5-16E918E8E2DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {492B3A0B-F2B8-437C-BAF5-16E918E8E2DC}.Release|Any CPU.Build.0 = Release|Any CPU + {492B3A0B-F2B8-437C-BAF5-16E918E8E2DC}.Release|arm.ActiveCfg = Release|Any CPU + {492B3A0B-F2B8-437C-BAF5-16E918E8E2DC}.Release|arm64.ActiveCfg = Release|Any CPU + {492B3A0B-F2B8-437C-BAF5-16E918E8E2DC}.Release|x64.ActiveCfg = Release|Any CPU + {492B3A0B-F2B8-437C-BAF5-16E918E8E2DC}.Release|x64.Build.0 = Release|Any CPU + {492B3A0B-F2B8-437C-BAF5-16E918E8E2DC}.Release|x86.ActiveCfg = Release|Any CPU + {492B3A0B-F2B8-437C-BAF5-16E918E8E2DC}.Release|x86.Build.0 = Release|Any CPU + {492B3A0B-F2B8-437C-BAF5-16E918E8E2DC}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {492B3A0B-F2B8-437C-BAF5-16E918E8E2DC}.Checked|arm.ActiveCfg = Debug|Any CPU + {492B3A0B-F2B8-437C-BAF5-16E918E8E2DC}.Checked|arm64.ActiveCfg = Debug|Any CPU + {492B3A0B-F2B8-437C-BAF5-16E918E8E2DC}.Checked|x64.ActiveCfg = Debug|Any CPU + {492B3A0B-F2B8-437C-BAF5-16E918E8E2DC}.Checked|x86.ActiveCfg = Debug|Any CPU + {E5399050-E71C-4B05-8DD0-9ED058F66F43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E5399050-E71C-4B05-8DD0-9ED058F66F43}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E5399050-E71C-4B05-8DD0-9ED058F66F43}.Debug|arm.ActiveCfg = Debug|Any CPU + {E5399050-E71C-4B05-8DD0-9ED058F66F43}.Debug|arm64.ActiveCfg = Debug|Any CPU + {E5399050-E71C-4B05-8DD0-9ED058F66F43}.Debug|x64.ActiveCfg = Debug|Any CPU + {E5399050-E71C-4B05-8DD0-9ED058F66F43}.Debug|x64.Build.0 = Debug|Any CPU + {E5399050-E71C-4B05-8DD0-9ED058F66F43}.Debug|x86.ActiveCfg = Debug|Any CPU + {E5399050-E71C-4B05-8DD0-9ED058F66F43}.Debug|x86.Build.0 = Debug|Any CPU + {E5399050-E71C-4B05-8DD0-9ED058F66F43}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E5399050-E71C-4B05-8DD0-9ED058F66F43}.Release|Any CPU.Build.0 = Release|Any CPU + {E5399050-E71C-4B05-8DD0-9ED058F66F43}.Release|arm.ActiveCfg = Release|Any CPU + {E5399050-E71C-4B05-8DD0-9ED058F66F43}.Release|arm64.ActiveCfg = Release|Any CPU + {E5399050-E71C-4B05-8DD0-9ED058F66F43}.Release|x64.ActiveCfg = Release|Any CPU + {E5399050-E71C-4B05-8DD0-9ED058F66F43}.Release|x64.Build.0 = Release|Any CPU + {E5399050-E71C-4B05-8DD0-9ED058F66F43}.Release|x86.ActiveCfg = Release|Any CPU + {E5399050-E71C-4B05-8DD0-9ED058F66F43}.Release|x86.Build.0 = Release|Any CPU + {E5399050-E71C-4B05-8DD0-9ED058F66F43}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {E5399050-E71C-4B05-8DD0-9ED058F66F43}.Checked|arm.ActiveCfg = Debug|Any CPU + {E5399050-E71C-4B05-8DD0-9ED058F66F43}.Checked|arm64.ActiveCfg = Debug|Any CPU + {E5399050-E71C-4B05-8DD0-9ED058F66F43}.Checked|x64.ActiveCfg = Debug|Any CPU + {E5399050-E71C-4B05-8DD0-9ED058F66F43}.Checked|x86.ActiveCfg = Debug|Any CPU + {A6E681A5-2AFD-4BCE-8825-AF7DBECDA2F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A6E681A5-2AFD-4BCE-8825-AF7DBECDA2F1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A6E681A5-2AFD-4BCE-8825-AF7DBECDA2F1}.Debug|arm.ActiveCfg = Debug|Any CPU + {A6E681A5-2AFD-4BCE-8825-AF7DBECDA2F1}.Debug|arm64.ActiveCfg = Debug|Any CPU + {A6E681A5-2AFD-4BCE-8825-AF7DBECDA2F1}.Debug|x64.ActiveCfg = Debug|Any CPU + {A6E681A5-2AFD-4BCE-8825-AF7DBECDA2F1}.Debug|x64.Build.0 = Debug|Any CPU + {A6E681A5-2AFD-4BCE-8825-AF7DBECDA2F1}.Debug|x86.ActiveCfg = Debug|Any CPU + {A6E681A5-2AFD-4BCE-8825-AF7DBECDA2F1}.Debug|x86.Build.0 = Debug|Any CPU + {A6E681A5-2AFD-4BCE-8825-AF7DBECDA2F1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A6E681A5-2AFD-4BCE-8825-AF7DBECDA2F1}.Release|Any CPU.Build.0 = Release|Any CPU + {A6E681A5-2AFD-4BCE-8825-AF7DBECDA2F1}.Release|arm.ActiveCfg = Release|Any CPU + {A6E681A5-2AFD-4BCE-8825-AF7DBECDA2F1}.Release|arm64.ActiveCfg = Release|Any CPU + {A6E681A5-2AFD-4BCE-8825-AF7DBECDA2F1}.Release|x64.ActiveCfg = Release|Any CPU + {A6E681A5-2AFD-4BCE-8825-AF7DBECDA2F1}.Release|x64.Build.0 = Release|Any CPU + {A6E681A5-2AFD-4BCE-8825-AF7DBECDA2F1}.Release|x86.ActiveCfg = Release|Any CPU + {A6E681A5-2AFD-4BCE-8825-AF7DBECDA2F1}.Release|x86.Build.0 = Release|Any CPU + {A6E681A5-2AFD-4BCE-8825-AF7DBECDA2F1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {A6E681A5-2AFD-4BCE-8825-AF7DBECDA2F1}.Checked|arm.ActiveCfg = Debug|Any CPU + {A6E681A5-2AFD-4BCE-8825-AF7DBECDA2F1}.Checked|arm64.ActiveCfg = Debug|Any CPU + {A6E681A5-2AFD-4BCE-8825-AF7DBECDA2F1}.Checked|x64.ActiveCfg = Debug|Any CPU + {A6E681A5-2AFD-4BCE-8825-AF7DBECDA2F1}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {B1053D24-237E-4E55-9413-20B34ED79F23} = {C723F596-B189-428C-A090-F4965F87A73D} - {A18E814C-13D6-4859-B6FA-3CAB8673B31F} = {C723F596-B189-428C-A090-F4965F87A73D} + {B1053D24-237E-4E55-9413-20B34ED79F23} = {F8E304FE-819F-483A-B1B2-883C6E18B41F} {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} @@ -352,6 +476,15 @@ Global {8843EA69-AD8F-4C73-8436-1641470199DC} = {155A2103-05C1-4020-8922-4F6275F6AE7E} {FFA71ACB-EAD8-4242-A5D6-FBB3F704949D} = {155A2103-05C1-4020-8922-4F6275F6AE7E} {3461E542-7F19-4B98-B206-BDF932529A5B} = {155A2103-05C1-4020-8922-4F6275F6AE7E} + {A18E814C-13D6-4859-B6FA-3CAB8673B31F} = {C723F596-B189-428C-A090-F4965F87A73D} + {6B47F791-1C84-4B75-B04B-076E9ACBF954} = {CA60D894-129C-47A8-BDC7-C11E8D67913A} + {134F392F-0DDF-4C9C-A35C-CD6A43DBD992} = {CA60D894-129C-47A8-BDC7-C11E8D67913A} + {CA60D894-129C-47A8-BDC7-C11E8D67913A} = {62AB992D-D3B5-4704-8915-4CF93A6E9AD0} + {492B3A0B-F2B8-437C-BAF5-16E918E8E2DC} = {FC6D5A7E-628F-43EE-A2D9-A07C7032EA5F} + {E5399050-E71C-4B05-8DD0-9ED058F66F43} = {FC6D5A7E-628F-43EE-A2D9-A07C7032EA5F} + {FC6D5A7E-628F-43EE-A2D9-A07C7032EA5F} = {62AB992D-D3B5-4704-8915-4CF93A6E9AD0} + {A6E681A5-2AFD-4BCE-8825-AF7DBECDA2F1} = {51626095-E4FC-493E-9459-3B9ABC4C7E3F} + {51626095-E4FC-493E-9459-3B9ABC4C7E3F} = {62AB992D-D3B5-4704-8915-4CF93A6E9AD0} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {248E0825-3C88-4854-B192-C50C9FDDBBC3} 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 68d33a14d5518b..5f45d76e495bd3 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 @@ -27,7 +27,17 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.InteropServi EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{86ED21D3-93FC-4FFE-927F-CDB404D71434}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C3D946CF-3A37-4EA5-AE14-AC84AF9746F1}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{5EA13609-79BF-4B45-A288-ED20A54E4263}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{C8D32DC5-846B-4236-8C9B-583E1C137DEB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{000EAACD-7729-43C5-89CA-28D3CBF0592D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{3A9FF6BB-FD1B-4A96-AE46-A4767B18EF65}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{78AAA7F3-D266-4508-A5CF-4B83EEFBF85A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{302F3CA0-2A35-4497-9A9A-D251385565A9}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{FF41EFDD-DD1F-428F-B25E-DD9B85D5A992}" EndProject @@ -35,6 +45,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{2AB40A0A-24D EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{09AE6FA7-7363-4994-BC62-3685AE151227}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C3D946CF-3A37-4EA5-AE14-AC84AF9746F1}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{81C68A3F-A099-40EE-9F8C-FDA2EEFF1B7B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{59929B38-7B6B-4433-82F0-73B8950B76A1}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{B5C46E1A-71C1-4814-9682-F2EE6C02FBCB}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{E3A09A0E-7044-406D-89D8-CC3B3BDC8D98}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -357,13 +377,117 @@ Global {86ED21D3-93FC-4FFE-927F-CDB404D71434}.Checked|arm64.ActiveCfg = Debug|Any CPU {86ED21D3-93FC-4FFE-927F-CDB404D71434}.Checked|x64.ActiveCfg = Debug|Any CPU {86ED21D3-93FC-4FFE-927F-CDB404D71434}.Checked|x86.ActiveCfg = Debug|Any CPU + {5EA13609-79BF-4B45-A288-ED20A54E4263}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5EA13609-79BF-4B45-A288-ED20A54E4263}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5EA13609-79BF-4B45-A288-ED20A54E4263}.Debug|arm.ActiveCfg = Debug|Any CPU + {5EA13609-79BF-4B45-A288-ED20A54E4263}.Debug|arm64.ActiveCfg = Debug|Any CPU + {5EA13609-79BF-4B45-A288-ED20A54E4263}.Debug|x64.ActiveCfg = Debug|Any CPU + {5EA13609-79BF-4B45-A288-ED20A54E4263}.Debug|x64.Build.0 = Debug|Any CPU + {5EA13609-79BF-4B45-A288-ED20A54E4263}.Debug|x86.ActiveCfg = Debug|Any CPU + {5EA13609-79BF-4B45-A288-ED20A54E4263}.Debug|x86.Build.0 = Debug|Any CPU + {5EA13609-79BF-4B45-A288-ED20A54E4263}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5EA13609-79BF-4B45-A288-ED20A54E4263}.Release|Any CPU.Build.0 = Release|Any CPU + {5EA13609-79BF-4B45-A288-ED20A54E4263}.Release|arm.ActiveCfg = Release|Any CPU + {5EA13609-79BF-4B45-A288-ED20A54E4263}.Release|arm64.ActiveCfg = Release|Any CPU + {5EA13609-79BF-4B45-A288-ED20A54E4263}.Release|x64.ActiveCfg = Release|Any CPU + {5EA13609-79BF-4B45-A288-ED20A54E4263}.Release|x64.Build.0 = Release|Any CPU + {5EA13609-79BF-4B45-A288-ED20A54E4263}.Release|x86.ActiveCfg = Release|Any CPU + {5EA13609-79BF-4B45-A288-ED20A54E4263}.Release|x86.Build.0 = Release|Any CPU + {5EA13609-79BF-4B45-A288-ED20A54E4263}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {5EA13609-79BF-4B45-A288-ED20A54E4263}.Checked|arm.ActiveCfg = Debug|Any CPU + {5EA13609-79BF-4B45-A288-ED20A54E4263}.Checked|arm64.ActiveCfg = Debug|Any CPU + {5EA13609-79BF-4B45-A288-ED20A54E4263}.Checked|x64.ActiveCfg = Debug|Any CPU + {5EA13609-79BF-4B45-A288-ED20A54E4263}.Checked|x86.ActiveCfg = Debug|Any CPU + {C8D32DC5-846B-4236-8C9B-583E1C137DEB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C8D32DC5-846B-4236-8C9B-583E1C137DEB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C8D32DC5-846B-4236-8C9B-583E1C137DEB}.Debug|arm.ActiveCfg = Debug|Any CPU + {C8D32DC5-846B-4236-8C9B-583E1C137DEB}.Debug|arm64.ActiveCfg = Debug|Any CPU + {C8D32DC5-846B-4236-8C9B-583E1C137DEB}.Debug|x64.ActiveCfg = Debug|Any CPU + {C8D32DC5-846B-4236-8C9B-583E1C137DEB}.Debug|x64.Build.0 = Debug|Any CPU + {C8D32DC5-846B-4236-8C9B-583E1C137DEB}.Debug|x86.ActiveCfg = Debug|Any CPU + {C8D32DC5-846B-4236-8C9B-583E1C137DEB}.Debug|x86.Build.0 = Debug|Any CPU + {C8D32DC5-846B-4236-8C9B-583E1C137DEB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C8D32DC5-846B-4236-8C9B-583E1C137DEB}.Release|Any CPU.Build.0 = Release|Any CPU + {C8D32DC5-846B-4236-8C9B-583E1C137DEB}.Release|arm.ActiveCfg = Release|Any CPU + {C8D32DC5-846B-4236-8C9B-583E1C137DEB}.Release|arm64.ActiveCfg = Release|Any CPU + {C8D32DC5-846B-4236-8C9B-583E1C137DEB}.Release|x64.ActiveCfg = Release|Any CPU + {C8D32DC5-846B-4236-8C9B-583E1C137DEB}.Release|x64.Build.0 = Release|Any CPU + {C8D32DC5-846B-4236-8C9B-583E1C137DEB}.Release|x86.ActiveCfg = Release|Any CPU + {C8D32DC5-846B-4236-8C9B-583E1C137DEB}.Release|x86.Build.0 = Release|Any CPU + {C8D32DC5-846B-4236-8C9B-583E1C137DEB}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {C8D32DC5-846B-4236-8C9B-583E1C137DEB}.Checked|arm.ActiveCfg = Debug|Any CPU + {C8D32DC5-846B-4236-8C9B-583E1C137DEB}.Checked|arm64.ActiveCfg = Debug|Any CPU + {C8D32DC5-846B-4236-8C9B-583E1C137DEB}.Checked|x64.ActiveCfg = Debug|Any CPU + {C8D32DC5-846B-4236-8C9B-583E1C137DEB}.Checked|x86.ActiveCfg = Debug|Any CPU + {000EAACD-7729-43C5-89CA-28D3CBF0592D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {000EAACD-7729-43C5-89CA-28D3CBF0592D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {000EAACD-7729-43C5-89CA-28D3CBF0592D}.Debug|arm.ActiveCfg = Debug|Any CPU + {000EAACD-7729-43C5-89CA-28D3CBF0592D}.Debug|arm64.ActiveCfg = Debug|Any CPU + {000EAACD-7729-43C5-89CA-28D3CBF0592D}.Debug|x64.ActiveCfg = Debug|Any CPU + {000EAACD-7729-43C5-89CA-28D3CBF0592D}.Debug|x64.Build.0 = Debug|Any CPU + {000EAACD-7729-43C5-89CA-28D3CBF0592D}.Debug|x86.ActiveCfg = Debug|Any CPU + {000EAACD-7729-43C5-89CA-28D3CBF0592D}.Debug|x86.Build.0 = Debug|Any CPU + {000EAACD-7729-43C5-89CA-28D3CBF0592D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {000EAACD-7729-43C5-89CA-28D3CBF0592D}.Release|Any CPU.Build.0 = Release|Any CPU + {000EAACD-7729-43C5-89CA-28D3CBF0592D}.Release|arm.ActiveCfg = Release|Any CPU + {000EAACD-7729-43C5-89CA-28D3CBF0592D}.Release|arm64.ActiveCfg = Release|Any CPU + {000EAACD-7729-43C5-89CA-28D3CBF0592D}.Release|x64.ActiveCfg = Release|Any CPU + {000EAACD-7729-43C5-89CA-28D3CBF0592D}.Release|x64.Build.0 = Release|Any CPU + {000EAACD-7729-43C5-89CA-28D3CBF0592D}.Release|x86.ActiveCfg = Release|Any CPU + {000EAACD-7729-43C5-89CA-28D3CBF0592D}.Release|x86.Build.0 = Release|Any CPU + {000EAACD-7729-43C5-89CA-28D3CBF0592D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {000EAACD-7729-43C5-89CA-28D3CBF0592D}.Checked|arm.ActiveCfg = Debug|Any CPU + {000EAACD-7729-43C5-89CA-28D3CBF0592D}.Checked|arm64.ActiveCfg = Debug|Any CPU + {000EAACD-7729-43C5-89CA-28D3CBF0592D}.Checked|x64.ActiveCfg = Debug|Any CPU + {000EAACD-7729-43C5-89CA-28D3CBF0592D}.Checked|x86.ActiveCfg = Debug|Any CPU + {3A9FF6BB-FD1B-4A96-AE46-A4767B18EF65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3A9FF6BB-FD1B-4A96-AE46-A4767B18EF65}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3A9FF6BB-FD1B-4A96-AE46-A4767B18EF65}.Debug|arm.ActiveCfg = Debug|Any CPU + {3A9FF6BB-FD1B-4A96-AE46-A4767B18EF65}.Debug|arm64.ActiveCfg = Debug|Any CPU + {3A9FF6BB-FD1B-4A96-AE46-A4767B18EF65}.Debug|x64.ActiveCfg = Debug|Any CPU + {3A9FF6BB-FD1B-4A96-AE46-A4767B18EF65}.Debug|x64.Build.0 = Debug|Any CPU + {3A9FF6BB-FD1B-4A96-AE46-A4767B18EF65}.Debug|x86.ActiveCfg = Debug|Any CPU + {3A9FF6BB-FD1B-4A96-AE46-A4767B18EF65}.Debug|x86.Build.0 = Debug|Any CPU + {3A9FF6BB-FD1B-4A96-AE46-A4767B18EF65}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3A9FF6BB-FD1B-4A96-AE46-A4767B18EF65}.Release|Any CPU.Build.0 = Release|Any CPU + {3A9FF6BB-FD1B-4A96-AE46-A4767B18EF65}.Release|arm.ActiveCfg = Release|Any CPU + {3A9FF6BB-FD1B-4A96-AE46-A4767B18EF65}.Release|arm64.ActiveCfg = Release|Any CPU + {3A9FF6BB-FD1B-4A96-AE46-A4767B18EF65}.Release|x64.ActiveCfg = Release|Any CPU + {3A9FF6BB-FD1B-4A96-AE46-A4767B18EF65}.Release|x64.Build.0 = Release|Any CPU + {3A9FF6BB-FD1B-4A96-AE46-A4767B18EF65}.Release|x86.ActiveCfg = Release|Any CPU + {3A9FF6BB-FD1B-4A96-AE46-A4767B18EF65}.Release|x86.Build.0 = Release|Any CPU + {3A9FF6BB-FD1B-4A96-AE46-A4767B18EF65}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {3A9FF6BB-FD1B-4A96-AE46-A4767B18EF65}.Checked|arm.ActiveCfg = Debug|Any CPU + {3A9FF6BB-FD1B-4A96-AE46-A4767B18EF65}.Checked|arm64.ActiveCfg = Debug|Any CPU + {3A9FF6BB-FD1B-4A96-AE46-A4767B18EF65}.Checked|x64.ActiveCfg = Debug|Any CPU + {3A9FF6BB-FD1B-4A96-AE46-A4767B18EF65}.Checked|x86.ActiveCfg = Debug|Any CPU + {78AAA7F3-D266-4508-A5CF-4B83EEFBF85A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {78AAA7F3-D266-4508-A5CF-4B83EEFBF85A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {78AAA7F3-D266-4508-A5CF-4B83EEFBF85A}.Debug|arm.ActiveCfg = Debug|Any CPU + {78AAA7F3-D266-4508-A5CF-4B83EEFBF85A}.Debug|arm64.ActiveCfg = Debug|Any CPU + {78AAA7F3-D266-4508-A5CF-4B83EEFBF85A}.Debug|x64.ActiveCfg = Debug|Any CPU + {78AAA7F3-D266-4508-A5CF-4B83EEFBF85A}.Debug|x64.Build.0 = Debug|Any CPU + {78AAA7F3-D266-4508-A5CF-4B83EEFBF85A}.Debug|x86.ActiveCfg = Debug|Any CPU + {78AAA7F3-D266-4508-A5CF-4B83EEFBF85A}.Debug|x86.Build.0 = Debug|Any CPU + {78AAA7F3-D266-4508-A5CF-4B83EEFBF85A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {78AAA7F3-D266-4508-A5CF-4B83EEFBF85A}.Release|Any CPU.Build.0 = Release|Any CPU + {78AAA7F3-D266-4508-A5CF-4B83EEFBF85A}.Release|arm.ActiveCfg = Release|Any CPU + {78AAA7F3-D266-4508-A5CF-4B83EEFBF85A}.Release|arm64.ActiveCfg = Release|Any CPU + {78AAA7F3-D266-4508-A5CF-4B83EEFBF85A}.Release|x64.ActiveCfg = Release|Any CPU + {78AAA7F3-D266-4508-A5CF-4B83EEFBF85A}.Release|x64.Build.0 = Release|Any CPU + {78AAA7F3-D266-4508-A5CF-4B83EEFBF85A}.Release|x86.ActiveCfg = Release|Any CPU + {78AAA7F3-D266-4508-A5CF-4B83EEFBF85A}.Release|x86.Build.0 = Release|Any CPU + {78AAA7F3-D266-4508-A5CF-4B83EEFBF85A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {78AAA7F3-D266-4508-A5CF-4B83EEFBF85A}.Checked|arm.ActiveCfg = Debug|Any CPU + {78AAA7F3-D266-4508-A5CF-4B83EEFBF85A}.Checked|arm64.ActiveCfg = Debug|Any CPU + {78AAA7F3-D266-4508-A5CF-4B83EEFBF85A}.Checked|x64.ActiveCfg = Debug|Any CPU + {78AAA7F3-D266-4508-A5CF-4B83EEFBF85A}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {209EDA22-1D20-4180-BE4C-53DEE1758B5D} = {C3D946CF-3A37-4EA5-AE14-AC84AF9746F1} - {BC6947B4-C61B-4066-B75F-937992548E54} = {C3D946CF-3A37-4EA5-AE14-AC84AF9746F1} + {209EDA22-1D20-4180-BE4C-53DEE1758B5D} = {302F3CA0-2A35-4497-9A9A-D251385565A9} {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} @@ -376,6 +500,15 @@ Global {165A3077-1F79-46E7-8BFA-88AACEB6D026} = {09AE6FA7-7363-4994-BC62-3685AE151227} {40E15C1B-0AB8-4FC5-9CE2-062B736F9021} = {09AE6FA7-7363-4994-BC62-3685AE151227} {913E983B-B16C-4B1E-BD37-906CFF93CAB4} = {09AE6FA7-7363-4994-BC62-3685AE151227} + {BC6947B4-C61B-4066-B75F-937992548E54} = {C3D946CF-3A37-4EA5-AE14-AC84AF9746F1} + {5EA13609-79BF-4B45-A288-ED20A54E4263} = {81C68A3F-A099-40EE-9F8C-FDA2EEFF1B7B} + {C8D32DC5-846B-4236-8C9B-583E1C137DEB} = {81C68A3F-A099-40EE-9F8C-FDA2EEFF1B7B} + {81C68A3F-A099-40EE-9F8C-FDA2EEFF1B7B} = {E3A09A0E-7044-406D-89D8-CC3B3BDC8D98} + {000EAACD-7729-43C5-89CA-28D3CBF0592D} = {59929B38-7B6B-4433-82F0-73B8950B76A1} + {3A9FF6BB-FD1B-4A96-AE46-A4767B18EF65} = {59929B38-7B6B-4433-82F0-73B8950B76A1} + {59929B38-7B6B-4433-82F0-73B8950B76A1} = {E3A09A0E-7044-406D-89D8-CC3B3BDC8D98} + {78AAA7F3-D266-4508-A5CF-4B83EEFBF85A} = {B5C46E1A-71C1-4814-9682-F2EE6C02FBCB} + {B5C46E1A-71C1-4814-9682-F2EE6C02FBCB} = {E3A09A0E-7044-406D-89D8-CC3B3BDC8D98} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {DC34C129-6D43-4A78-966A-9152BFF226C0} diff --git a/src/libraries/System.Reflection.Emit/System.Reflection.Emit.sln b/src/libraries/System.Reflection.Emit/System.Reflection.Emit.sln index b774027405c401..4799520a8e5e6a 100644 --- a/src/libraries/System.Reflection.Emit/System.Reflection.Emit.sln +++ b/src/libraries/System.Reflection.Emit/System.Reflection.Emit.sln @@ -1,4 +1,4 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 +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", "{772C93D4-FC45-46AA-B09F-26F01B672EDC}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{E5543842-139D-43BD-B604-E65EBB91649E}" @@ -45,14 +45,34 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\src\System.Runtime.csproj", "{BB96A2BA-44E9-43FA-91B1-CCEE212C6A8A}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{74F4AB97-3DBC-48FB-A2EA-2B4141749800}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{AD7C04D0-8F8C-4114-975F-804C5E30C5D6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{90044FD3-5C5C-4FB8-B7C7-F9DEF519EE7D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{30B7883D-A8B5-47F2-B242-971D585483B8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{5D8AE6D8-F7EC-43AC-AE7E-80B85A460258}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{4F5987F2-614A-42B6-A652-FE4C03330DE0}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{ED65A29E-5F42-409D-BAAC-548799C6C35A}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{2FC35C2F-76DB-4D84-B421-9700BEA4D161}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{C36D185D-9B3D-42E5-985F-E21B3BAF3B6D}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{74F4AB97-3DBC-48FB-A2EA-2B4141749800}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{EB17DB9D-7058-48E8-98C3-A3B3C3BCE99B}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{611CB559-49A7-4046-9425-50E25205E891}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{59251F20-422C-41BC-9C0E-4517B5C2018D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{AA8FF9D5-BB95-481B-A56A-E8FAF9725F97}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{A3402532-58BD-4AB1-870F-CFD829CEAD18}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -564,18 +584,117 @@ Global {BB96A2BA-44E9-43FA-91B1-CCEE212C6A8A}.Checked|arm64.ActiveCfg = Debug|Any CPU {BB96A2BA-44E9-43FA-91B1-CCEE212C6A8A}.Checked|x64.ActiveCfg = Debug|Any CPU {BB96A2BA-44E9-43FA-91B1-CCEE212C6A8A}.Checked|x86.ActiveCfg = Debug|Any CPU + {AD7C04D0-8F8C-4114-975F-804C5E30C5D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AD7C04D0-8F8C-4114-975F-804C5E30C5D6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AD7C04D0-8F8C-4114-975F-804C5E30C5D6}.Debug|arm.ActiveCfg = Debug|Any CPU + {AD7C04D0-8F8C-4114-975F-804C5E30C5D6}.Debug|arm64.ActiveCfg = Debug|Any CPU + {AD7C04D0-8F8C-4114-975F-804C5E30C5D6}.Debug|x64.ActiveCfg = Debug|Any CPU + {AD7C04D0-8F8C-4114-975F-804C5E30C5D6}.Debug|x64.Build.0 = Debug|Any CPU + {AD7C04D0-8F8C-4114-975F-804C5E30C5D6}.Debug|x86.ActiveCfg = Debug|Any CPU + {AD7C04D0-8F8C-4114-975F-804C5E30C5D6}.Debug|x86.Build.0 = Debug|Any CPU + {AD7C04D0-8F8C-4114-975F-804C5E30C5D6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AD7C04D0-8F8C-4114-975F-804C5E30C5D6}.Release|Any CPU.Build.0 = Release|Any CPU + {AD7C04D0-8F8C-4114-975F-804C5E30C5D6}.Release|arm.ActiveCfg = Release|Any CPU + {AD7C04D0-8F8C-4114-975F-804C5E30C5D6}.Release|arm64.ActiveCfg = Release|Any CPU + {AD7C04D0-8F8C-4114-975F-804C5E30C5D6}.Release|x64.ActiveCfg = Release|Any CPU + {AD7C04D0-8F8C-4114-975F-804C5E30C5D6}.Release|x64.Build.0 = Release|Any CPU + {AD7C04D0-8F8C-4114-975F-804C5E30C5D6}.Release|x86.ActiveCfg = Release|Any CPU + {AD7C04D0-8F8C-4114-975F-804C5E30C5D6}.Release|x86.Build.0 = Release|Any CPU + {AD7C04D0-8F8C-4114-975F-804C5E30C5D6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {AD7C04D0-8F8C-4114-975F-804C5E30C5D6}.Checked|arm.ActiveCfg = Debug|Any CPU + {AD7C04D0-8F8C-4114-975F-804C5E30C5D6}.Checked|arm64.ActiveCfg = Debug|Any CPU + {AD7C04D0-8F8C-4114-975F-804C5E30C5D6}.Checked|x64.ActiveCfg = Debug|Any CPU + {AD7C04D0-8F8C-4114-975F-804C5E30C5D6}.Checked|x86.ActiveCfg = Debug|Any CPU + {90044FD3-5C5C-4FB8-B7C7-F9DEF519EE7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {90044FD3-5C5C-4FB8-B7C7-F9DEF519EE7D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {90044FD3-5C5C-4FB8-B7C7-F9DEF519EE7D}.Debug|arm.ActiveCfg = Debug|Any CPU + {90044FD3-5C5C-4FB8-B7C7-F9DEF519EE7D}.Debug|arm64.ActiveCfg = Debug|Any CPU + {90044FD3-5C5C-4FB8-B7C7-F9DEF519EE7D}.Debug|x64.ActiveCfg = Debug|Any CPU + {90044FD3-5C5C-4FB8-B7C7-F9DEF519EE7D}.Debug|x64.Build.0 = Debug|Any CPU + {90044FD3-5C5C-4FB8-B7C7-F9DEF519EE7D}.Debug|x86.ActiveCfg = Debug|Any CPU + {90044FD3-5C5C-4FB8-B7C7-F9DEF519EE7D}.Debug|x86.Build.0 = Debug|Any CPU + {90044FD3-5C5C-4FB8-B7C7-F9DEF519EE7D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {90044FD3-5C5C-4FB8-B7C7-F9DEF519EE7D}.Release|Any CPU.Build.0 = Release|Any CPU + {90044FD3-5C5C-4FB8-B7C7-F9DEF519EE7D}.Release|arm.ActiveCfg = Release|Any CPU + {90044FD3-5C5C-4FB8-B7C7-F9DEF519EE7D}.Release|arm64.ActiveCfg = Release|Any CPU + {90044FD3-5C5C-4FB8-B7C7-F9DEF519EE7D}.Release|x64.ActiveCfg = Release|Any CPU + {90044FD3-5C5C-4FB8-B7C7-F9DEF519EE7D}.Release|x64.Build.0 = Release|Any CPU + {90044FD3-5C5C-4FB8-B7C7-F9DEF519EE7D}.Release|x86.ActiveCfg = Release|Any CPU + {90044FD3-5C5C-4FB8-B7C7-F9DEF519EE7D}.Release|x86.Build.0 = Release|Any CPU + {90044FD3-5C5C-4FB8-B7C7-F9DEF519EE7D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {90044FD3-5C5C-4FB8-B7C7-F9DEF519EE7D}.Checked|arm.ActiveCfg = Debug|Any CPU + {90044FD3-5C5C-4FB8-B7C7-F9DEF519EE7D}.Checked|arm64.ActiveCfg = Debug|Any CPU + {90044FD3-5C5C-4FB8-B7C7-F9DEF519EE7D}.Checked|x64.ActiveCfg = Debug|Any CPU + {90044FD3-5C5C-4FB8-B7C7-F9DEF519EE7D}.Checked|x86.ActiveCfg = Debug|Any CPU + {30B7883D-A8B5-47F2-B242-971D585483B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {30B7883D-A8B5-47F2-B242-971D585483B8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {30B7883D-A8B5-47F2-B242-971D585483B8}.Debug|arm.ActiveCfg = Debug|Any CPU + {30B7883D-A8B5-47F2-B242-971D585483B8}.Debug|arm64.ActiveCfg = Debug|Any CPU + {30B7883D-A8B5-47F2-B242-971D585483B8}.Debug|x64.ActiveCfg = Debug|Any CPU + {30B7883D-A8B5-47F2-B242-971D585483B8}.Debug|x64.Build.0 = Debug|Any CPU + {30B7883D-A8B5-47F2-B242-971D585483B8}.Debug|x86.ActiveCfg = Debug|Any CPU + {30B7883D-A8B5-47F2-B242-971D585483B8}.Debug|x86.Build.0 = Debug|Any CPU + {30B7883D-A8B5-47F2-B242-971D585483B8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {30B7883D-A8B5-47F2-B242-971D585483B8}.Release|Any CPU.Build.0 = Release|Any CPU + {30B7883D-A8B5-47F2-B242-971D585483B8}.Release|arm.ActiveCfg = Release|Any CPU + {30B7883D-A8B5-47F2-B242-971D585483B8}.Release|arm64.ActiveCfg = Release|Any CPU + {30B7883D-A8B5-47F2-B242-971D585483B8}.Release|x64.ActiveCfg = Release|Any CPU + {30B7883D-A8B5-47F2-B242-971D585483B8}.Release|x64.Build.0 = Release|Any CPU + {30B7883D-A8B5-47F2-B242-971D585483B8}.Release|x86.ActiveCfg = Release|Any CPU + {30B7883D-A8B5-47F2-B242-971D585483B8}.Release|x86.Build.0 = Release|Any CPU + {30B7883D-A8B5-47F2-B242-971D585483B8}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {30B7883D-A8B5-47F2-B242-971D585483B8}.Checked|arm.ActiveCfg = Debug|Any CPU + {30B7883D-A8B5-47F2-B242-971D585483B8}.Checked|arm64.ActiveCfg = Debug|Any CPU + {30B7883D-A8B5-47F2-B242-971D585483B8}.Checked|x64.ActiveCfg = Debug|Any CPU + {30B7883D-A8B5-47F2-B242-971D585483B8}.Checked|x86.ActiveCfg = Debug|Any CPU + {5D8AE6D8-F7EC-43AC-AE7E-80B85A460258}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5D8AE6D8-F7EC-43AC-AE7E-80B85A460258}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5D8AE6D8-F7EC-43AC-AE7E-80B85A460258}.Debug|arm.ActiveCfg = Debug|Any CPU + {5D8AE6D8-F7EC-43AC-AE7E-80B85A460258}.Debug|arm64.ActiveCfg = Debug|Any CPU + {5D8AE6D8-F7EC-43AC-AE7E-80B85A460258}.Debug|x64.ActiveCfg = Debug|Any CPU + {5D8AE6D8-F7EC-43AC-AE7E-80B85A460258}.Debug|x64.Build.0 = Debug|Any CPU + {5D8AE6D8-F7EC-43AC-AE7E-80B85A460258}.Debug|x86.ActiveCfg = Debug|Any CPU + {5D8AE6D8-F7EC-43AC-AE7E-80B85A460258}.Debug|x86.Build.0 = Debug|Any CPU + {5D8AE6D8-F7EC-43AC-AE7E-80B85A460258}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5D8AE6D8-F7EC-43AC-AE7E-80B85A460258}.Release|Any CPU.Build.0 = Release|Any CPU + {5D8AE6D8-F7EC-43AC-AE7E-80B85A460258}.Release|arm.ActiveCfg = Release|Any CPU + {5D8AE6D8-F7EC-43AC-AE7E-80B85A460258}.Release|arm64.ActiveCfg = Release|Any CPU + {5D8AE6D8-F7EC-43AC-AE7E-80B85A460258}.Release|x64.ActiveCfg = Release|Any CPU + {5D8AE6D8-F7EC-43AC-AE7E-80B85A460258}.Release|x64.Build.0 = Release|Any CPU + {5D8AE6D8-F7EC-43AC-AE7E-80B85A460258}.Release|x86.ActiveCfg = Release|Any CPU + {5D8AE6D8-F7EC-43AC-AE7E-80B85A460258}.Release|x86.Build.0 = Release|Any CPU + {5D8AE6D8-F7EC-43AC-AE7E-80B85A460258}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {5D8AE6D8-F7EC-43AC-AE7E-80B85A460258}.Checked|arm.ActiveCfg = Debug|Any CPU + {5D8AE6D8-F7EC-43AC-AE7E-80B85A460258}.Checked|arm64.ActiveCfg = Debug|Any CPU + {5D8AE6D8-F7EC-43AC-AE7E-80B85A460258}.Checked|x64.ActiveCfg = Debug|Any CPU + {5D8AE6D8-F7EC-43AC-AE7E-80B85A460258}.Checked|x86.ActiveCfg = Debug|Any CPU + {4F5987F2-614A-42B6-A652-FE4C03330DE0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4F5987F2-614A-42B6-A652-FE4C03330DE0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4F5987F2-614A-42B6-A652-FE4C03330DE0}.Debug|arm.ActiveCfg = Debug|Any CPU + {4F5987F2-614A-42B6-A652-FE4C03330DE0}.Debug|arm64.ActiveCfg = Debug|Any CPU + {4F5987F2-614A-42B6-A652-FE4C03330DE0}.Debug|x64.ActiveCfg = Debug|Any CPU + {4F5987F2-614A-42B6-A652-FE4C03330DE0}.Debug|x64.Build.0 = Debug|Any CPU + {4F5987F2-614A-42B6-A652-FE4C03330DE0}.Debug|x86.ActiveCfg = Debug|Any CPU + {4F5987F2-614A-42B6-A652-FE4C03330DE0}.Debug|x86.Build.0 = Debug|Any CPU + {4F5987F2-614A-42B6-A652-FE4C03330DE0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4F5987F2-614A-42B6-A652-FE4C03330DE0}.Release|Any CPU.Build.0 = Release|Any CPU + {4F5987F2-614A-42B6-A652-FE4C03330DE0}.Release|arm.ActiveCfg = Release|Any CPU + {4F5987F2-614A-42B6-A652-FE4C03330DE0}.Release|arm64.ActiveCfg = Release|Any CPU + {4F5987F2-614A-42B6-A652-FE4C03330DE0}.Release|x64.ActiveCfg = Release|Any CPU + {4F5987F2-614A-42B6-A652-FE4C03330DE0}.Release|x64.Build.0 = Release|Any CPU + {4F5987F2-614A-42B6-A652-FE4C03330DE0}.Release|x86.ActiveCfg = Release|Any CPU + {4F5987F2-614A-42B6-A652-FE4C03330DE0}.Release|x86.Build.0 = Release|Any CPU + {4F5987F2-614A-42B6-A652-FE4C03330DE0}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {4F5987F2-614A-42B6-A652-FE4C03330DE0}.Checked|arm.ActiveCfg = Debug|Any CPU + {4F5987F2-614A-42B6-A652-FE4C03330DE0}.Checked|arm64.ActiveCfg = Debug|Any CPU + {4F5987F2-614A-42B6-A652-FE4C03330DE0}.Checked|x64.ActiveCfg = Debug|Any CPU + {4F5987F2-614A-42B6-A652-FE4C03330DE0}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {772C93D4-FC45-46AA-B09F-26F01B672EDC} = {74F4AB97-3DBC-48FB-A2EA-2B4141749800} - {C2FF5BC7-825E-437E-92C3-F505EB6D1D40} = {74F4AB97-3DBC-48FB-A2EA-2B4141749800} - {D5FD16CF-7435-4E47-928A-9BC94968091D} = {74F4AB97-3DBC-48FB-A2EA-2B4141749800} - {B479A4BF-A3A5-4255-A3EF-135015BD877F} = {74F4AB97-3DBC-48FB-A2EA-2B4141749800} - {F33093A8-FF33-4F95-B256-F2AB712C956A} = {74F4AB97-3DBC-48FB-A2EA-2B4141749800} - {9F3970FF-F138-4F23-A2F8-2387858E723D} = {74F4AB97-3DBC-48FB-A2EA-2B4141749800} - {BB96A2BA-44E9-43FA-91B1-CCEE212C6A8A} = {74F4AB97-3DBC-48FB-A2EA-2B4141749800} + {772C93D4-FC45-46AA-B09F-26F01B672EDC} = {ED65A29E-5F42-409D-BAAC-548799C6C35A} {E5543842-139D-43BD-B604-E65EBB91649E} = {2FC35C2F-76DB-4D84-B421-9700BEA4D161} {82899000-791E-42FF-A594-6DE65DE07C9E} = {2FC35C2F-76DB-4D84-B421-9700BEA4D161} {DE04D45B-7E15-409D-A176-985D814A6AEB} = {C36D185D-9B3D-42E5-985F-E21B3BAF3B6D} @@ -588,12 +707,26 @@ Global {FD4D647F-490B-420A-B2FD-29751E0C3454} = {C36D185D-9B3D-42E5-985F-E21B3BAF3B6D} {8E08BBCB-E2D1-464F-96F1-7B1801CE48B6} = {C36D185D-9B3D-42E5-985F-E21B3BAF3B6D} {613C42F2-847A-42B3-9F5E-F5A670356BF7} = {C36D185D-9B3D-42E5-985F-E21B3BAF3B6D} + {C2FF5BC7-825E-437E-92C3-F505EB6D1D40} = {74F4AB97-3DBC-48FB-A2EA-2B4141749800} + {D5FD16CF-7435-4E47-928A-9BC94968091D} = {74F4AB97-3DBC-48FB-A2EA-2B4141749800} + {B479A4BF-A3A5-4255-A3EF-135015BD877F} = {74F4AB97-3DBC-48FB-A2EA-2B4141749800} + {F33093A8-FF33-4F95-B256-F2AB712C956A} = {74F4AB97-3DBC-48FB-A2EA-2B4141749800} + {9F3970FF-F138-4F23-A2F8-2387858E723D} = {74F4AB97-3DBC-48FB-A2EA-2B4141749800} + {BB96A2BA-44E9-43FA-91B1-CCEE212C6A8A} = {74F4AB97-3DBC-48FB-A2EA-2B4141749800} {848EFB55-86B5-4259-BAA2-A49C6E3421A9} = {EB17DB9D-7058-48E8-98C3-A3B3C3BCE99B} {A2A7CB52-1BC2-40EA-885F-DD5DE607AC96} = {EB17DB9D-7058-48E8-98C3-A3B3C3BCE99B} {73EA94AD-0C65-47C8-851C-12D136A0DCC1} = {EB17DB9D-7058-48E8-98C3-A3B3C3BCE99B} {506EBBFA-FF57-4141-A725-882110C17598} = {EB17DB9D-7058-48E8-98C3-A3B3C3BCE99B} + {AD7C04D0-8F8C-4114-975F-804C5E30C5D6} = {611CB559-49A7-4046-9425-50E25205E891} + {90044FD3-5C5C-4FB8-B7C7-F9DEF519EE7D} = {611CB559-49A7-4046-9425-50E25205E891} + {611CB559-49A7-4046-9425-50E25205E891} = {A3402532-58BD-4AB1-870F-CFD829CEAD18} + {30B7883D-A8B5-47F2-B242-971D585483B8} = {59251F20-422C-41BC-9C0E-4517B5C2018D} + {5D8AE6D8-F7EC-43AC-AE7E-80B85A460258} = {59251F20-422C-41BC-9C0E-4517B5C2018D} + {59251F20-422C-41BC-9C0E-4517B5C2018D} = {A3402532-58BD-4AB1-870F-CFD829CEAD18} + {4F5987F2-614A-42B6-A652-FE4C03330DE0} = {AA8FF9D5-BB95-481B-A56A-E8FAF9725F97} + {AA8FF9D5-BB95-481B-A56A-E8FAF9725F97} = {A3402532-58BD-4AB1-870F-CFD829CEAD18} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {739AA767-154B-4C69-8C9B-C3D332833D92} EndGlobalSection -EndGlobal \ No newline at end of file +EndGlobal diff --git a/src/libraries/System.Reflection.Metadata/System.Reflection.Metadata.sln b/src/libraries/System.Reflection.Metadata/System.Reflection.Metadata.sln index e43d31fd039832..1dae15e99b380b 100644 --- a/src/libraries/System.Reflection.Metadata/System.Reflection.Metadata.sln +++ b/src/libraries/System.Reflection.Metadata/System.Reflection.Metadata.sln @@ -21,6 +21,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{4D7BBEC2-8A8D-4BAA-AD6B-55905F107317}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{8E173D5F-6011-4471-8514-FF9C7D4417B5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{064431FF-EE86-4C61-8859-0F824AD2B69A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{35B39665-CBB5-449F-B51D-91B1B021266F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{98445B72-AFD2-462C-94F2-65E5C1A25B22}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{CDFCF052-9073-42E3-BC4F-5283E9BFAD1B}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{57E0E2C2-76DD-4219-B164-E513C4F8BE01}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{0829DF11-6008-4678-B608-D754E87EBC70}" @@ -29,6 +39,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{5E8418DF-67A EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{3FDA41E5-7DFA-48DC-856B-09E5747E3C9C}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{FA7C2C03-A446-4807-A092-9A3ABD5E5FD7}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{19CD37AB-E6A2-431C-8893-5ED903B847BA}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{B80A55DB-C1C4-4A99-A1C8-BFD6606C28AF}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{5224A519-F2DB-487E-AB04-CB1C45853202}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -79,6 +97,26 @@ Global {4D7BBEC2-8A8D-4BAA-AD6B-55905F107317}.Debug|Any CPU.Build.0 = Debug|Any CPU {4D7BBEC2-8A8D-4BAA-AD6B-55905F107317}.Release|Any CPU.ActiveCfg = Release|Any CPU {4D7BBEC2-8A8D-4BAA-AD6B-55905F107317}.Release|Any CPU.Build.0 = Release|Any CPU + {8E173D5F-6011-4471-8514-FF9C7D4417B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E173D5F-6011-4471-8514-FF9C7D4417B5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E173D5F-6011-4471-8514-FF9C7D4417B5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E173D5F-6011-4471-8514-FF9C7D4417B5}.Release|Any CPU.Build.0 = Release|Any CPU + {064431FF-EE86-4C61-8859-0F824AD2B69A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {064431FF-EE86-4C61-8859-0F824AD2B69A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {064431FF-EE86-4C61-8859-0F824AD2B69A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {064431FF-EE86-4C61-8859-0F824AD2B69A}.Release|Any CPU.Build.0 = Release|Any CPU + {35B39665-CBB5-449F-B51D-91B1B021266F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {35B39665-CBB5-449F-B51D-91B1B021266F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {35B39665-CBB5-449F-B51D-91B1B021266F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {35B39665-CBB5-449F-B51D-91B1B021266F}.Release|Any CPU.Build.0 = Release|Any CPU + {98445B72-AFD2-462C-94F2-65E5C1A25B22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {98445B72-AFD2-462C-94F2-65E5C1A25B22}.Debug|Any CPU.Build.0 = Debug|Any CPU + {98445B72-AFD2-462C-94F2-65E5C1A25B22}.Release|Any CPU.ActiveCfg = Release|Any CPU + {98445B72-AFD2-462C-94F2-65E5C1A25B22}.Release|Any CPU.Build.0 = Release|Any CPU + {CDFCF052-9073-42E3-BC4F-5283E9BFAD1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CDFCF052-9073-42E3-BC4F-5283E9BFAD1B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CDFCF052-9073-42E3-BC4F-5283E9BFAD1B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CDFCF052-9073-42E3-BC4F-5283E9BFAD1B}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -95,6 +133,14 @@ Global {D4293B41-CA47-46DB-8E11-C532E8E8DAF1} = {3FDA41E5-7DFA-48DC-856B-09E5747E3C9C} {1092AC3C-B01C-4AC4-9F05-6FDB23C699B3} = {3FDA41E5-7DFA-48DC-856B-09E5747E3C9C} {930B1167-83BE-42CC-BFED-096CB2BA19F1} = {3FDA41E5-7DFA-48DC-856B-09E5747E3C9C} + {8E173D5F-6011-4471-8514-FF9C7D4417B5} = {FA7C2C03-A446-4807-A092-9A3ABD5E5FD7} + {064431FF-EE86-4C61-8859-0F824AD2B69A} = {FA7C2C03-A446-4807-A092-9A3ABD5E5FD7} + {FA7C2C03-A446-4807-A092-9A3ABD5E5FD7} = {5224A519-F2DB-487E-AB04-CB1C45853202} + {35B39665-CBB5-449F-B51D-91B1B021266F} = {19CD37AB-E6A2-431C-8893-5ED903B847BA} + {98445B72-AFD2-462C-94F2-65E5C1A25B22} = {19CD37AB-E6A2-431C-8893-5ED903B847BA} + {19CD37AB-E6A2-431C-8893-5ED903B847BA} = {5224A519-F2DB-487E-AB04-CB1C45853202} + {CDFCF052-9073-42E3-BC4F-5283E9BFAD1B} = {B80A55DB-C1C4-4A99-A1C8-BFD6606C28AF} + {B80A55DB-C1C4-4A99-A1C8-BFD6606C28AF} = {5224A519-F2DB-487E-AB04-CB1C45853202} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {64BB97AB-FD23-40BA-B638-FE4756AE6452} diff --git a/src/libraries/System.Reflection.Metadata/ref/System.Reflection.Metadata.cs b/src/libraries/System.Reflection.Metadata/ref/System.Reflection.Metadata.cs index 61314bfb7fd06c..d656738565288c 100644 --- a/src/libraries/System.Reflection.Metadata/ref/System.Reflection.Metadata.cs +++ b/src/libraries/System.Reflection.Metadata/ref/System.Reflection.Metadata.cs @@ -3293,6 +3293,9 @@ public enum Machine : ushort Arm64 = (ushort)43620, LoongArch32 = (ushort)25138, LoongArch64 = (ushort)25188, + RiscV32 = (ushort)20530, + RiscV64 = (ushort)20580, + RiscV128 = (ushort)20776, } public partial class ManagedPEBuilder : System.Reflection.PortableExecutable.PEBuilder { diff --git a/src/libraries/System.Reflection.Metadata/src/PACKAGE.md b/src/libraries/System.Reflection.Metadata/src/PACKAGE.md index 43543a703a9123..921506138ee1b4 100644 --- a/src/libraries/System.Reflection.Metadata/src/PACKAGE.md +++ b/src/libraries/System.Reflection.Metadata/src/PACKAGE.md @@ -1,18 +1,14 @@ ## About + + This package provides a low-level .NET (ECMA-335) metadata reader and writer. It's geared for performance and is the ideal choice for building higher-level libraries that intend to provide their own object model, such as compilers. The metadata format is defined by the [ECMA-335 - Common Language Infrastructure (CLI)](http://www.ecma-international.org/publications/standards/Ecma-335.htm) specification and [its amendments](https://github.com/dotnet/runtime/blob/main/docs/design/specs/Ecma-335-Augments.md). The `System.Reflection.Metadata` library is included in the .NET Runtime shared framework. The package can be installed when you need to use it in other target frameworks. -For more information, see the documentation: - -- [System.Reflection.Metadata.MetadataReader](https://docs.microsoft.com/dotnet/api/system.reflection.metadata.metadatareader) -- [System.Reflection.PortableExecutable.PEReader](https://docs.microsoft.com/dotnet/api/system.reflection.portableexecutable.pereader) -- [System.Reflection.Metadata.Ecma335.MetadataBuilder](https://docs.microsoft.com/dotnet/api/system.reflection.metadata.ecma335.metadatabuilder) -- [System.Reflection.PortableExecutable.PEBuilder](https://docs.microsoft.com/dotnet/api/system.reflection.portableexecutable.pebuilder) -- [System.Reflection.PortableExecutable.ManagedPEBuilder](https://docs.microsoft.com/dotnet/api/system.reflection.portableexecutable.managedpebuilder) +## How to Use -## Example + The following example shows how to read assembly information using PEReader and MetadataReader. @@ -80,3 +76,31 @@ class Program } ``` + +## Main Types + + + +The main types provided by this library are: + +* `System.Reflection.Metadata.MetadataReader` +* `System.Reflection.PortableExecutable.PEReader` +* `System.Reflection.Metadata.Ecma335.MetadataBuilder` +* `System.Reflection.PortableExecutable.PEBuilder` +* `System.Reflection.PortableExecutable.ManagedPEBuilder` + +## Additional Documentation + + + +* [System.Reflection.Metadata.MetadataReader](https://docs.microsoft.com/dotnet/api/system.reflection.metadata.metadatareader) +* [System.Reflection.PortableExecutable.PEReader](https://docs.microsoft.com/dotnet/api/system.reflection.portableexecutable.pereader) +* [System.Reflection.Metadata.Ecma335.MetadataBuilder](https://docs.microsoft.com/dotnet/api/system.reflection.metadata.ecma335.metadatabuilder) +* [System.Reflection.PortableExecutable.PEBuilder](https://docs.microsoft.com/dotnet/api/system.reflection.portableexecutable.pebuilder) +* [System.Reflection.PortableExecutable.ManagedPEBuilder](https://docs.microsoft.com/dotnet/api/system.reflection.portableexecutable.managedpebuilder) + +## Feedback & Contributing + + + +System.Reflection.Metadata is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). \ No newline at end of file diff --git a/src/libraries/System.Reflection.Metadata/src/System/Reflection/PortableExecutable/Machine.cs b/src/libraries/System.Reflection.Metadata/src/System/Reflection/PortableExecutable/Machine.cs index c4d3e336616ad6..a5bbe07fff9fc2 100644 --- a/src/libraries/System.Reflection.Metadata/src/System/Reflection/PortableExecutable/Machine.cs +++ b/src/libraries/System.Reflection.Metadata/src/System/Reflection/PortableExecutable/Machine.cs @@ -139,5 +139,20 @@ public enum Machine : ushort /// LOONGARCH64 /// LoongArch64 = 0x6264, + + /// + /// RISCV32 + /// + RiscV32 = 0x5032, + + /// + /// RISCV64 + /// + RiscV64 = 0x5064, + + /// + /// RISCV128 + /// + RiscV128 = 0x5128, } } diff --git a/src/libraries/System.Reflection.MetadataLoadContext/System.Reflection.MetadataLoadContext.sln b/src/libraries/System.Reflection.MetadataLoadContext/System.Reflection.MetadataLoadContext.sln index d4bd203f140e86..41c9548eefda29 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/System.Reflection.MetadataLoadContext.sln +++ b/src/libraries/System.Reflection.MetadataLoadContext/System.Reflection.MetadataLoadContext.sln @@ -27,6 +27,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{C3084E13-4286-4B12-8156-D3595903CF44}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{97EB26A9-6F04-4C1B-9977-AA9BFF7F5802}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{B03B0B10-85A2-46BD-94EB-BD1E89A1D83E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{A57C649D-817B-4E03-9C9C-6CE45822F596}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{39CCC14C-DA96-4051-90FC-B6CCADBE9D6E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{1B9FA129-0295-499B-A48B-8E4B3C47151A}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{F45DECCA-03D3-4087-AB01-F099C027DC33}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{B3731232-B2FE-401B-A9F1-5DFB1A90D687}" @@ -35,6 +45,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C9409DA5-0A3 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{E86A915C-E800-4558-AFDC-F41C4095B2DF}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{0A7CB728-67D0-4F8C-8102-4F433790B9EA}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{C965D66B-8014-46D0-84A6-6C3FAC80756F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{9772F96B-9277-4E65-B49E-51A7CBB30D13}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{D29E56EA-B9AD-40F2-9271-C2C87EEC70B2}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -97,6 +115,26 @@ Global {C3084E13-4286-4B12-8156-D3595903CF44}.Debug|Any CPU.Build.0 = Debug|Any CPU {C3084E13-4286-4B12-8156-D3595903CF44}.Release|Any CPU.ActiveCfg = Release|Any CPU {C3084E13-4286-4B12-8156-D3595903CF44}.Release|Any CPU.Build.0 = Release|Any CPU + {97EB26A9-6F04-4C1B-9977-AA9BFF7F5802}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {97EB26A9-6F04-4C1B-9977-AA9BFF7F5802}.Debug|Any CPU.Build.0 = Debug|Any CPU + {97EB26A9-6F04-4C1B-9977-AA9BFF7F5802}.Release|Any CPU.ActiveCfg = Release|Any CPU + {97EB26A9-6F04-4C1B-9977-AA9BFF7F5802}.Release|Any CPU.Build.0 = Release|Any CPU + {B03B0B10-85A2-46BD-94EB-BD1E89A1D83E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B03B0B10-85A2-46BD-94EB-BD1E89A1D83E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B03B0B10-85A2-46BD-94EB-BD1E89A1D83E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B03B0B10-85A2-46BD-94EB-BD1E89A1D83E}.Release|Any CPU.Build.0 = Release|Any CPU + {A57C649D-817B-4E03-9C9C-6CE45822F596}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A57C649D-817B-4E03-9C9C-6CE45822F596}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A57C649D-817B-4E03-9C9C-6CE45822F596}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A57C649D-817B-4E03-9C9C-6CE45822F596}.Release|Any CPU.Build.0 = Release|Any CPU + {39CCC14C-DA96-4051-90FC-B6CCADBE9D6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {39CCC14C-DA96-4051-90FC-B6CCADBE9D6E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {39CCC14C-DA96-4051-90FC-B6CCADBE9D6E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {39CCC14C-DA96-4051-90FC-B6CCADBE9D6E}.Release|Any CPU.Build.0 = Release|Any CPU + {1B9FA129-0295-499B-A48B-8E4B3C47151A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1B9FA129-0295-499B-A48B-8E4B3C47151A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1B9FA129-0295-499B-A48B-8E4B3C47151A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1B9FA129-0295-499B-A48B-8E4B3C47151A}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -116,6 +154,14 @@ Global {97806F4F-CCA5-4B86-9B71-B3B35DC990E1} = {E86A915C-E800-4558-AFDC-F41C4095B2DF} {4361CEFA-8238-4247-9CC5-D99DF794843C} = {E86A915C-E800-4558-AFDC-F41C4095B2DF} {7393C7CD-4C31-4B1C-96DC-1D46D240538A} = {E86A915C-E800-4558-AFDC-F41C4095B2DF} + {97EB26A9-6F04-4C1B-9977-AA9BFF7F5802} = {0A7CB728-67D0-4F8C-8102-4F433790B9EA} + {B03B0B10-85A2-46BD-94EB-BD1E89A1D83E} = {0A7CB728-67D0-4F8C-8102-4F433790B9EA} + {0A7CB728-67D0-4F8C-8102-4F433790B9EA} = {D29E56EA-B9AD-40F2-9271-C2C87EEC70B2} + {A57C649D-817B-4E03-9C9C-6CE45822F596} = {C965D66B-8014-46D0-84A6-6C3FAC80756F} + {39CCC14C-DA96-4051-90FC-B6CCADBE9D6E} = {C965D66B-8014-46D0-84A6-6C3FAC80756F} + {C965D66B-8014-46D0-84A6-6C3FAC80756F} = {D29E56EA-B9AD-40F2-9271-C2C87EEC70B2} + {1B9FA129-0295-499B-A48B-8E4B3C47151A} = {9772F96B-9277-4E65-B49E-51A7CBB30D13} + {9772F96B-9277-4E65-B49E-51A7CBB30D13} = {D29E56EA-B9AD-40F2-9271-C2C87EEC70B2} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {CA7F05F8-4589-46FA-9AC5-4F96F2AE890C} diff --git a/src/libraries/System.Reflection.MetadataLoadContext/src/PACKAGE.md b/src/libraries/System.Reflection.MetadataLoadContext/src/PACKAGE.md index 7e351acc94fe75..f16805d7d3f14a 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/src/PACKAGE.md +++ b/src/libraries/System.Reflection.MetadataLoadContext/src/PACKAGE.md @@ -1,14 +1,12 @@ ## About -Provides read-only reflection on assemblies in an isolated context with support for assemblies that target different processor architectures and runtimes. Using MetadataLoadContext enables you to inspect assemblies without loading them into the main execution context. Assemblies in MetadataLoadContext are treated only as metadata, that is, you can read information about their members, but cannot execute any code contained in them. + -For more information, see the documentation: +Provides read-only reflection on assemblies in an isolated context with support for assemblies that target different processor architectures and runtimes. Using MetadataLoadContext enables you to inspect assemblies without loading them into the main execution context. Assemblies in MetadataLoadContext are treated only as metadata, that is, you can read information about their members, but cannot execute any code contained in them. -- [How to: Inspect assembly contents using MetadataLoadContext](https://docs.microsoft.com/dotnet/standard/assembly/inspect-contents-using-metadataloadcontext) -- [System.Reflection.MetadataLoadContext](https://docs.microsoft.com/dotnet/api/system.reflection.metadataloadcontext) -- [System.Reflection.MetadataAssemblyResolver](https://docs.microsoft.com/dotnet/api/system.reflection.metadataassemblyresolver) +## How to Use -## Example + The following example shows how to print the list of types defined in an assembly. @@ -38,3 +36,26 @@ class Program } } ``` + +## Main Types + + + +The main types provided by this library are: + +* `System.Reflection.MetadataLoadContext` +* `System.Reflection.MetadataAssemblyResolver` + +## Additional Documentation + + + +* [How to: Inspect assembly contents using MetadataLoadContext](https://docs.microsoft.com/dotnet/standard/assembly/inspect-contents-using-metadataloadcontext) +* [System.Reflection.MetadataLoadContext](https://docs.microsoft.com/dotnet/api/system.reflection.metadataloadcontext) +* [System.Reflection.MetadataAssemblyResolver](https://docs.microsoft.com/dotnet/api/system.reflection.metadataassemblyresolver) + +## Feedback & Contributing + + + +System.Reflection.MetadataLoadContext is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). \ No newline at end of file diff --git a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/General/Helpers.cs b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/General/Helpers.cs index 147259b5cde42b..d172f20f1cb066 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/General/Helpers.cs +++ b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/General/Helpers.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.Buffers; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; @@ -11,6 +12,12 @@ namespace System.Reflection.TypeLoading { internal static class Helpers { +#if NET8_0_OR_GREATER + private static readonly SearchValues s_charsToEscape = SearchValues.Create("\\[]+*&,"); +#else + private static ReadOnlySpan s_charsToEscape => "\\[]+*&,".AsSpan(); +#endif + [return: NotNullIfNotNull(nameof(original))] public static T[]? CloneArray(this T[]? original) { @@ -96,7 +103,7 @@ public static string ComputeArraySuffix(int rank, bool multiDim) public static string EscapeTypeNameIdentifier(this string identifier) { // Some characters in a type name need to be escaped - if (identifier.IndexOfAny(s_charsToEscape) != -1) + if (TypeNameContainsTypeParserMetacharacters(identifier)) { StringBuilder sbEscapedName = new StringBuilder(identifier.Length); foreach (char c in identifier) @@ -113,12 +120,16 @@ public static string EscapeTypeNameIdentifier(this string identifier) public static bool TypeNameContainsTypeParserMetacharacters(this string identifier) { - return identifier.IndexOfAny(s_charsToEscape) != -1; + return identifier.AsSpan().IndexOfAny(s_charsToEscape) >= 0; } public static bool NeedsEscapingInTypeName(this char c) { - return Array.IndexOf(s_charsToEscape, c) >= 0; +#if NET8_0_OR_GREATER + return s_charsToEscape.Contains(c); +#else + return s_charsToEscape.IndexOf(c) >= 0; +#endif } public static string UnescapeTypeNameIdentifier(this string identifier) @@ -145,8 +156,6 @@ public static string UnescapeTypeNameIdentifier(this string identifier) return identifier; } - private static readonly char[] s_charsToEscape = new char[] { '\\', '[', ']', '+', '*', '&', ',' }; - /// /// For AssemblyReferences, convert "unspecified" components from the ECMA format (0xffff) to the in-memory System.Version format (0xffffffff). /// diff --git a/src/libraries/System.Reflection.MetadataLoadContext/tests/System.Reflection.MetadataLoadContext.Tests.csproj b/src/libraries/System.Reflection.MetadataLoadContext/tests/System.Reflection.MetadataLoadContext.Tests.csproj index e1e1e937f20b33..cba4079733816c 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/tests/System.Reflection.MetadataLoadContext.Tests.csproj +++ b/src/libraries/System.Reflection.MetadataLoadContext/tests/System.Reflection.MetadataLoadContext.Tests.csproj @@ -1,11 +1,13 @@ + - true $(NetCoreAppCurrent);$(NetFrameworkMinimum) + true $(NoWarn);SYSLIB0005;SYSLIB0037 + @@ -70,10 +72,12 @@ + - + + @@ -81,6 +85,7 @@ + @@ -88,4 +93,5 @@ + diff --git a/src/libraries/System.Reflection.Primitives/System.Reflection.Primitives.sln b/src/libraries/System.Reflection.Primitives/System.Reflection.Primitives.sln index 71dd35761b1f24..6d26b4d35d6ff1 100644 --- a/src/libraries/System.Reflection.Primitives/System.Reflection.Primitives.sln +++ b/src/libraries/System.Reflection.Primitives/System.Reflection.Primitives.sln @@ -15,12 +15,32 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{04E09F3E-1897-43EE-94D3-786B679CB741}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{8B893AF4-4C52-4EA7-B4DF-A5ED0E6BEA50}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{935F95BD-C858-4E4D-8C48-057B9F9A6FD1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{CF805175-A3E1-4EB4-8C1A-525C0CF517F5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{CF83A04B-AB5B-4C78-AAEB-7BE37A8896C4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{EE772DCC-A0E6-4C93-A91A-CB371BC6D9F4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{E7D92072-71A6-47A2-90C0-75CBA3672693}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{908620B9-2483-46A3-A93E-78ECB5417BAF}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{654344FB-C5C8-4364-B43B-C2C9530B96F8}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{4599348B-0480-47D4-9763-F3C6716D3CCC}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{8B893AF4-4C52-4EA7-B4DF-A5ED0E6BEA50}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{6165604E-507C-41D7-AE23-C2CE4E64F685}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{CD5918A8-A5E7-4B14-AF36-015CE2D6EB2D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{4D27F9A8-F756-4850-A220-2CCA3DA1C45D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{72BF7E3E-3778-4D65-8362-F301090B8B02}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -217,19 +237,132 @@ Global {04E09F3E-1897-43EE-94D3-786B679CB741}.Checked|arm64.ActiveCfg = Debug|Any CPU {04E09F3E-1897-43EE-94D3-786B679CB741}.Checked|x64.ActiveCfg = Debug|Any CPU {04E09F3E-1897-43EE-94D3-786B679CB741}.Checked|x86.ActiveCfg = Debug|Any CPU + {935F95BD-C858-4E4D-8C48-057B9F9A6FD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {935F95BD-C858-4E4D-8C48-057B9F9A6FD1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {935F95BD-C858-4E4D-8C48-057B9F9A6FD1}.Debug|arm.ActiveCfg = Debug|Any CPU + {935F95BD-C858-4E4D-8C48-057B9F9A6FD1}.Debug|arm64.ActiveCfg = Debug|Any CPU + {935F95BD-C858-4E4D-8C48-057B9F9A6FD1}.Debug|x64.ActiveCfg = Debug|Any CPU + {935F95BD-C858-4E4D-8C48-057B9F9A6FD1}.Debug|x64.Build.0 = Debug|Any CPU + {935F95BD-C858-4E4D-8C48-057B9F9A6FD1}.Debug|x86.ActiveCfg = Debug|Any CPU + {935F95BD-C858-4E4D-8C48-057B9F9A6FD1}.Debug|x86.Build.0 = Debug|Any CPU + {935F95BD-C858-4E4D-8C48-057B9F9A6FD1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {935F95BD-C858-4E4D-8C48-057B9F9A6FD1}.Release|Any CPU.Build.0 = Release|Any CPU + {935F95BD-C858-4E4D-8C48-057B9F9A6FD1}.Release|arm.ActiveCfg = Release|Any CPU + {935F95BD-C858-4E4D-8C48-057B9F9A6FD1}.Release|arm64.ActiveCfg = Release|Any CPU + {935F95BD-C858-4E4D-8C48-057B9F9A6FD1}.Release|x64.ActiveCfg = Release|Any CPU + {935F95BD-C858-4E4D-8C48-057B9F9A6FD1}.Release|x64.Build.0 = Release|Any CPU + {935F95BD-C858-4E4D-8C48-057B9F9A6FD1}.Release|x86.ActiveCfg = Release|Any CPU + {935F95BD-C858-4E4D-8C48-057B9F9A6FD1}.Release|x86.Build.0 = Release|Any CPU + {935F95BD-C858-4E4D-8C48-057B9F9A6FD1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {935F95BD-C858-4E4D-8C48-057B9F9A6FD1}.Checked|arm.ActiveCfg = Debug|Any CPU + {935F95BD-C858-4E4D-8C48-057B9F9A6FD1}.Checked|arm64.ActiveCfg = Debug|Any CPU + {935F95BD-C858-4E4D-8C48-057B9F9A6FD1}.Checked|x64.ActiveCfg = Debug|Any CPU + {935F95BD-C858-4E4D-8C48-057B9F9A6FD1}.Checked|x86.ActiveCfg = Debug|Any CPU + {CF805175-A3E1-4EB4-8C1A-525C0CF517F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CF805175-A3E1-4EB4-8C1A-525C0CF517F5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CF805175-A3E1-4EB4-8C1A-525C0CF517F5}.Debug|arm.ActiveCfg = Debug|Any CPU + {CF805175-A3E1-4EB4-8C1A-525C0CF517F5}.Debug|arm64.ActiveCfg = Debug|Any CPU + {CF805175-A3E1-4EB4-8C1A-525C0CF517F5}.Debug|x64.ActiveCfg = Debug|Any CPU + {CF805175-A3E1-4EB4-8C1A-525C0CF517F5}.Debug|x64.Build.0 = Debug|Any CPU + {CF805175-A3E1-4EB4-8C1A-525C0CF517F5}.Debug|x86.ActiveCfg = Debug|Any CPU + {CF805175-A3E1-4EB4-8C1A-525C0CF517F5}.Debug|x86.Build.0 = Debug|Any CPU + {CF805175-A3E1-4EB4-8C1A-525C0CF517F5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CF805175-A3E1-4EB4-8C1A-525C0CF517F5}.Release|Any CPU.Build.0 = Release|Any CPU + {CF805175-A3E1-4EB4-8C1A-525C0CF517F5}.Release|arm.ActiveCfg = Release|Any CPU + {CF805175-A3E1-4EB4-8C1A-525C0CF517F5}.Release|arm64.ActiveCfg = Release|Any CPU + {CF805175-A3E1-4EB4-8C1A-525C0CF517F5}.Release|x64.ActiveCfg = Release|Any CPU + {CF805175-A3E1-4EB4-8C1A-525C0CF517F5}.Release|x64.Build.0 = Release|Any CPU + {CF805175-A3E1-4EB4-8C1A-525C0CF517F5}.Release|x86.ActiveCfg = Release|Any CPU + {CF805175-A3E1-4EB4-8C1A-525C0CF517F5}.Release|x86.Build.0 = Release|Any CPU + {CF805175-A3E1-4EB4-8C1A-525C0CF517F5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {CF805175-A3E1-4EB4-8C1A-525C0CF517F5}.Checked|arm.ActiveCfg = Debug|Any CPU + {CF805175-A3E1-4EB4-8C1A-525C0CF517F5}.Checked|arm64.ActiveCfg = Debug|Any CPU + {CF805175-A3E1-4EB4-8C1A-525C0CF517F5}.Checked|x64.ActiveCfg = Debug|Any CPU + {CF805175-A3E1-4EB4-8C1A-525C0CF517F5}.Checked|x86.ActiveCfg = Debug|Any CPU + {CF83A04B-AB5B-4C78-AAEB-7BE37A8896C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CF83A04B-AB5B-4C78-AAEB-7BE37A8896C4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CF83A04B-AB5B-4C78-AAEB-7BE37A8896C4}.Debug|arm.ActiveCfg = Debug|Any CPU + {CF83A04B-AB5B-4C78-AAEB-7BE37A8896C4}.Debug|arm64.ActiveCfg = Debug|Any CPU + {CF83A04B-AB5B-4C78-AAEB-7BE37A8896C4}.Debug|x64.ActiveCfg = Debug|Any CPU + {CF83A04B-AB5B-4C78-AAEB-7BE37A8896C4}.Debug|x64.Build.0 = Debug|Any CPU + {CF83A04B-AB5B-4C78-AAEB-7BE37A8896C4}.Debug|x86.ActiveCfg = Debug|Any CPU + {CF83A04B-AB5B-4C78-AAEB-7BE37A8896C4}.Debug|x86.Build.0 = Debug|Any CPU + {CF83A04B-AB5B-4C78-AAEB-7BE37A8896C4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CF83A04B-AB5B-4C78-AAEB-7BE37A8896C4}.Release|Any CPU.Build.0 = Release|Any CPU + {CF83A04B-AB5B-4C78-AAEB-7BE37A8896C4}.Release|arm.ActiveCfg = Release|Any CPU + {CF83A04B-AB5B-4C78-AAEB-7BE37A8896C4}.Release|arm64.ActiveCfg = Release|Any CPU + {CF83A04B-AB5B-4C78-AAEB-7BE37A8896C4}.Release|x64.ActiveCfg = Release|Any CPU + {CF83A04B-AB5B-4C78-AAEB-7BE37A8896C4}.Release|x64.Build.0 = Release|Any CPU + {CF83A04B-AB5B-4C78-AAEB-7BE37A8896C4}.Release|x86.ActiveCfg = Release|Any CPU + {CF83A04B-AB5B-4C78-AAEB-7BE37A8896C4}.Release|x86.Build.0 = Release|Any CPU + {CF83A04B-AB5B-4C78-AAEB-7BE37A8896C4}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {CF83A04B-AB5B-4C78-AAEB-7BE37A8896C4}.Checked|arm.ActiveCfg = Debug|Any CPU + {CF83A04B-AB5B-4C78-AAEB-7BE37A8896C4}.Checked|arm64.ActiveCfg = Debug|Any CPU + {CF83A04B-AB5B-4C78-AAEB-7BE37A8896C4}.Checked|x64.ActiveCfg = Debug|Any CPU + {CF83A04B-AB5B-4C78-AAEB-7BE37A8896C4}.Checked|x86.ActiveCfg = Debug|Any CPU + {EE772DCC-A0E6-4C93-A91A-CB371BC6D9F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EE772DCC-A0E6-4C93-A91A-CB371BC6D9F4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EE772DCC-A0E6-4C93-A91A-CB371BC6D9F4}.Debug|arm.ActiveCfg = Debug|Any CPU + {EE772DCC-A0E6-4C93-A91A-CB371BC6D9F4}.Debug|arm64.ActiveCfg = Debug|Any CPU + {EE772DCC-A0E6-4C93-A91A-CB371BC6D9F4}.Debug|x64.ActiveCfg = Debug|Any CPU + {EE772DCC-A0E6-4C93-A91A-CB371BC6D9F4}.Debug|x64.Build.0 = Debug|Any CPU + {EE772DCC-A0E6-4C93-A91A-CB371BC6D9F4}.Debug|x86.ActiveCfg = Debug|Any CPU + {EE772DCC-A0E6-4C93-A91A-CB371BC6D9F4}.Debug|x86.Build.0 = Debug|Any CPU + {EE772DCC-A0E6-4C93-A91A-CB371BC6D9F4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EE772DCC-A0E6-4C93-A91A-CB371BC6D9F4}.Release|Any CPU.Build.0 = Release|Any CPU + {EE772DCC-A0E6-4C93-A91A-CB371BC6D9F4}.Release|arm.ActiveCfg = Release|Any CPU + {EE772DCC-A0E6-4C93-A91A-CB371BC6D9F4}.Release|arm64.ActiveCfg = Release|Any CPU + {EE772DCC-A0E6-4C93-A91A-CB371BC6D9F4}.Release|x64.ActiveCfg = Release|Any CPU + {EE772DCC-A0E6-4C93-A91A-CB371BC6D9F4}.Release|x64.Build.0 = Release|Any CPU + {EE772DCC-A0E6-4C93-A91A-CB371BC6D9F4}.Release|x86.ActiveCfg = Release|Any CPU + {EE772DCC-A0E6-4C93-A91A-CB371BC6D9F4}.Release|x86.Build.0 = Release|Any CPU + {EE772DCC-A0E6-4C93-A91A-CB371BC6D9F4}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {EE772DCC-A0E6-4C93-A91A-CB371BC6D9F4}.Checked|arm.ActiveCfg = Debug|Any CPU + {EE772DCC-A0E6-4C93-A91A-CB371BC6D9F4}.Checked|arm64.ActiveCfg = Debug|Any CPU + {EE772DCC-A0E6-4C93-A91A-CB371BC6D9F4}.Checked|x64.ActiveCfg = Debug|Any CPU + {EE772DCC-A0E6-4C93-A91A-CB371BC6D9F4}.Checked|x86.ActiveCfg = Debug|Any CPU + {E7D92072-71A6-47A2-90C0-75CBA3672693}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E7D92072-71A6-47A2-90C0-75CBA3672693}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E7D92072-71A6-47A2-90C0-75CBA3672693}.Debug|arm.ActiveCfg = Debug|Any CPU + {E7D92072-71A6-47A2-90C0-75CBA3672693}.Debug|arm64.ActiveCfg = Debug|Any CPU + {E7D92072-71A6-47A2-90C0-75CBA3672693}.Debug|x64.ActiveCfg = Debug|Any CPU + {E7D92072-71A6-47A2-90C0-75CBA3672693}.Debug|x64.Build.0 = Debug|Any CPU + {E7D92072-71A6-47A2-90C0-75CBA3672693}.Debug|x86.ActiveCfg = Debug|Any CPU + {E7D92072-71A6-47A2-90C0-75CBA3672693}.Debug|x86.Build.0 = Debug|Any CPU + {E7D92072-71A6-47A2-90C0-75CBA3672693}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E7D92072-71A6-47A2-90C0-75CBA3672693}.Release|Any CPU.Build.0 = Release|Any CPU + {E7D92072-71A6-47A2-90C0-75CBA3672693}.Release|arm.ActiveCfg = Release|Any CPU + {E7D92072-71A6-47A2-90C0-75CBA3672693}.Release|arm64.ActiveCfg = Release|Any CPU + {E7D92072-71A6-47A2-90C0-75CBA3672693}.Release|x64.ActiveCfg = Release|Any CPU + {E7D92072-71A6-47A2-90C0-75CBA3672693}.Release|x64.Build.0 = Release|Any CPU + {E7D92072-71A6-47A2-90C0-75CBA3672693}.Release|x86.ActiveCfg = Release|Any CPU + {E7D92072-71A6-47A2-90C0-75CBA3672693}.Release|x86.Build.0 = Release|Any CPU + {E7D92072-71A6-47A2-90C0-75CBA3672693}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {E7D92072-71A6-47A2-90C0-75CBA3672693}.Checked|arm.ActiveCfg = Debug|Any CPU + {E7D92072-71A6-47A2-90C0-75CBA3672693}.Checked|arm64.ActiveCfg = Debug|Any CPU + {E7D92072-71A6-47A2-90C0-75CBA3672693}.Checked|x64.ActiveCfg = Debug|Any CPU + {E7D92072-71A6-47A2-90C0-75CBA3672693}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {661E0A3D-E151-45B2-AA38-B30F8227A741} = {8B893AF4-4C52-4EA7-B4DF-A5ED0E6BEA50} - {5D40069E-7CC2-4B40-A41D-6B003CCB4075} = {8B893AF4-4C52-4EA7-B4DF-A5ED0E6BEA50} + {661E0A3D-E151-45B2-AA38-B30F8227A741} = {908620B9-2483-46A3-A93E-78ECB5417BAF} {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} + {5D40069E-7CC2-4B40-A41D-6B003CCB4075} = {8B893AF4-4C52-4EA7-B4DF-A5ED0E6BEA50} + {935F95BD-C858-4E4D-8C48-057B9F9A6FD1} = {6165604E-507C-41D7-AE23-C2CE4E64F685} + {CF805175-A3E1-4EB4-8C1A-525C0CF517F5} = {6165604E-507C-41D7-AE23-C2CE4E64F685} + {6165604E-507C-41D7-AE23-C2CE4E64F685} = {72BF7E3E-3778-4D65-8362-F301090B8B02} + {CF83A04B-AB5B-4C78-AAEB-7BE37A8896C4} = {CD5918A8-A5E7-4B14-AF36-015CE2D6EB2D} + {EE772DCC-A0E6-4C93-A91A-CB371BC6D9F4} = {CD5918A8-A5E7-4B14-AF36-015CE2D6EB2D} + {CD5918A8-A5E7-4B14-AF36-015CE2D6EB2D} = {72BF7E3E-3778-4D65-8362-F301090B8B02} + {E7D92072-71A6-47A2-90C0-75CBA3672693} = {4D27F9A8-F756-4850-A220-2CCA3DA1C45D} + {4D27F9A8-F756-4850-A220-2CCA3DA1C45D} = {72BF7E3E-3778-4D65-8362-F301090B8B02} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C218B18C-E001-417C-A347-A06C0D5DD6AB} diff --git a/src/libraries/System.Reflection.TypeExtensions/System.Reflection.TypeExtensions.sln b/src/libraries/System.Reflection.TypeExtensions/System.Reflection.TypeExtensions.sln index d24972e9e5b9b3..4f090542c594de 100644 --- a/src/libraries/System.Reflection.TypeExtensions/System.Reflection.TypeExtensions.sln +++ b/src/libraries/System.Reflection.TypeExtensions/System.Reflection.TypeExtensions.sln @@ -19,7 +19,17 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{35509CE1-7BCA-4390-8F9E-56997A2AD9AB}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{3A79F8E8-9E66-44C6-94E7-DE8C24F80E59}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{166D4A87-2AEF-4CB1-8699-07F3B8C2FBF2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{D61ED890-B208-4564-B77F-8C953E797502}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{1BF79BB9-37CE-4B5C-B16B-620B71947985}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{B6879798-B55A-480B-950E-08B74CCF2020}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{E9711A78-8BF9-4898-AB8B-4A910F636DFA}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{983D609F-487D-4B85-9757-6AD4E7AAA312}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{9BB99B5C-97D7-4247-B682-27CBBFCF1BB4}" EndProject @@ -27,6 +37,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{89B14D9D-2BB EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{B05E90C8-0282-4D7D-955E-3BE8A400D3A6}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{3A79F8E8-9E66-44C6-94E7-DE8C24F80E59}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{F5608419-456B-4AD8-B4BA-1465B70080E8}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{C573542D-035B-4E60-BE4E-AEFD5FEF9C3D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{3C3397B4-58A1-441A-B1A7-060C9B1E2013}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{0AFB8AA2-7483-4E63-A8A0-7CFE2906D253}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -265,13 +285,117 @@ Global {35509CE1-7BCA-4390-8F9E-56997A2AD9AB}.Checked|arm64.ActiveCfg = Debug|Any CPU {35509CE1-7BCA-4390-8F9E-56997A2AD9AB}.Checked|x64.ActiveCfg = Debug|Any CPU {35509CE1-7BCA-4390-8F9E-56997A2AD9AB}.Checked|x86.ActiveCfg = Debug|Any CPU + {166D4A87-2AEF-4CB1-8699-07F3B8C2FBF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {166D4A87-2AEF-4CB1-8699-07F3B8C2FBF2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {166D4A87-2AEF-4CB1-8699-07F3B8C2FBF2}.Debug|arm.ActiveCfg = Debug|Any CPU + {166D4A87-2AEF-4CB1-8699-07F3B8C2FBF2}.Debug|arm64.ActiveCfg = Debug|Any CPU + {166D4A87-2AEF-4CB1-8699-07F3B8C2FBF2}.Debug|x64.ActiveCfg = Debug|Any CPU + {166D4A87-2AEF-4CB1-8699-07F3B8C2FBF2}.Debug|x64.Build.0 = Debug|Any CPU + {166D4A87-2AEF-4CB1-8699-07F3B8C2FBF2}.Debug|x86.ActiveCfg = Debug|Any CPU + {166D4A87-2AEF-4CB1-8699-07F3B8C2FBF2}.Debug|x86.Build.0 = Debug|Any CPU + {166D4A87-2AEF-4CB1-8699-07F3B8C2FBF2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {166D4A87-2AEF-4CB1-8699-07F3B8C2FBF2}.Release|Any CPU.Build.0 = Release|Any CPU + {166D4A87-2AEF-4CB1-8699-07F3B8C2FBF2}.Release|arm.ActiveCfg = Release|Any CPU + {166D4A87-2AEF-4CB1-8699-07F3B8C2FBF2}.Release|arm64.ActiveCfg = Release|Any CPU + {166D4A87-2AEF-4CB1-8699-07F3B8C2FBF2}.Release|x64.ActiveCfg = Release|Any CPU + {166D4A87-2AEF-4CB1-8699-07F3B8C2FBF2}.Release|x64.Build.0 = Release|Any CPU + {166D4A87-2AEF-4CB1-8699-07F3B8C2FBF2}.Release|x86.ActiveCfg = Release|Any CPU + {166D4A87-2AEF-4CB1-8699-07F3B8C2FBF2}.Release|x86.Build.0 = Release|Any CPU + {166D4A87-2AEF-4CB1-8699-07F3B8C2FBF2}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {166D4A87-2AEF-4CB1-8699-07F3B8C2FBF2}.Checked|arm.ActiveCfg = Debug|Any CPU + {166D4A87-2AEF-4CB1-8699-07F3B8C2FBF2}.Checked|arm64.ActiveCfg = Debug|Any CPU + {166D4A87-2AEF-4CB1-8699-07F3B8C2FBF2}.Checked|x64.ActiveCfg = Debug|Any CPU + {166D4A87-2AEF-4CB1-8699-07F3B8C2FBF2}.Checked|x86.ActiveCfg = Debug|Any CPU + {D61ED890-B208-4564-B77F-8C953E797502}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D61ED890-B208-4564-B77F-8C953E797502}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D61ED890-B208-4564-B77F-8C953E797502}.Debug|arm.ActiveCfg = Debug|Any CPU + {D61ED890-B208-4564-B77F-8C953E797502}.Debug|arm64.ActiveCfg = Debug|Any CPU + {D61ED890-B208-4564-B77F-8C953E797502}.Debug|x64.ActiveCfg = Debug|Any CPU + {D61ED890-B208-4564-B77F-8C953E797502}.Debug|x64.Build.0 = Debug|Any CPU + {D61ED890-B208-4564-B77F-8C953E797502}.Debug|x86.ActiveCfg = Debug|Any CPU + {D61ED890-B208-4564-B77F-8C953E797502}.Debug|x86.Build.0 = Debug|Any CPU + {D61ED890-B208-4564-B77F-8C953E797502}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D61ED890-B208-4564-B77F-8C953E797502}.Release|Any CPU.Build.0 = Release|Any CPU + {D61ED890-B208-4564-B77F-8C953E797502}.Release|arm.ActiveCfg = Release|Any CPU + {D61ED890-B208-4564-B77F-8C953E797502}.Release|arm64.ActiveCfg = Release|Any CPU + {D61ED890-B208-4564-B77F-8C953E797502}.Release|x64.ActiveCfg = Release|Any CPU + {D61ED890-B208-4564-B77F-8C953E797502}.Release|x64.Build.0 = Release|Any CPU + {D61ED890-B208-4564-B77F-8C953E797502}.Release|x86.ActiveCfg = Release|Any CPU + {D61ED890-B208-4564-B77F-8C953E797502}.Release|x86.Build.0 = Release|Any CPU + {D61ED890-B208-4564-B77F-8C953E797502}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {D61ED890-B208-4564-B77F-8C953E797502}.Checked|arm.ActiveCfg = Debug|Any CPU + {D61ED890-B208-4564-B77F-8C953E797502}.Checked|arm64.ActiveCfg = Debug|Any CPU + {D61ED890-B208-4564-B77F-8C953E797502}.Checked|x64.ActiveCfg = Debug|Any CPU + {D61ED890-B208-4564-B77F-8C953E797502}.Checked|x86.ActiveCfg = Debug|Any CPU + {1BF79BB9-37CE-4B5C-B16B-620B71947985}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1BF79BB9-37CE-4B5C-B16B-620B71947985}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1BF79BB9-37CE-4B5C-B16B-620B71947985}.Debug|arm.ActiveCfg = Debug|Any CPU + {1BF79BB9-37CE-4B5C-B16B-620B71947985}.Debug|arm64.ActiveCfg = Debug|Any CPU + {1BF79BB9-37CE-4B5C-B16B-620B71947985}.Debug|x64.ActiveCfg = Debug|Any CPU + {1BF79BB9-37CE-4B5C-B16B-620B71947985}.Debug|x64.Build.0 = Debug|Any CPU + {1BF79BB9-37CE-4B5C-B16B-620B71947985}.Debug|x86.ActiveCfg = Debug|Any CPU + {1BF79BB9-37CE-4B5C-B16B-620B71947985}.Debug|x86.Build.0 = Debug|Any CPU + {1BF79BB9-37CE-4B5C-B16B-620B71947985}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1BF79BB9-37CE-4B5C-B16B-620B71947985}.Release|Any CPU.Build.0 = Release|Any CPU + {1BF79BB9-37CE-4B5C-B16B-620B71947985}.Release|arm.ActiveCfg = Release|Any CPU + {1BF79BB9-37CE-4B5C-B16B-620B71947985}.Release|arm64.ActiveCfg = Release|Any CPU + {1BF79BB9-37CE-4B5C-B16B-620B71947985}.Release|x64.ActiveCfg = Release|Any CPU + {1BF79BB9-37CE-4B5C-B16B-620B71947985}.Release|x64.Build.0 = Release|Any CPU + {1BF79BB9-37CE-4B5C-B16B-620B71947985}.Release|x86.ActiveCfg = Release|Any CPU + {1BF79BB9-37CE-4B5C-B16B-620B71947985}.Release|x86.Build.0 = Release|Any CPU + {1BF79BB9-37CE-4B5C-B16B-620B71947985}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {1BF79BB9-37CE-4B5C-B16B-620B71947985}.Checked|arm.ActiveCfg = Debug|Any CPU + {1BF79BB9-37CE-4B5C-B16B-620B71947985}.Checked|arm64.ActiveCfg = Debug|Any CPU + {1BF79BB9-37CE-4B5C-B16B-620B71947985}.Checked|x64.ActiveCfg = Debug|Any CPU + {1BF79BB9-37CE-4B5C-B16B-620B71947985}.Checked|x86.ActiveCfg = Debug|Any CPU + {B6879798-B55A-480B-950E-08B74CCF2020}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B6879798-B55A-480B-950E-08B74CCF2020}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B6879798-B55A-480B-950E-08B74CCF2020}.Debug|arm.ActiveCfg = Debug|Any CPU + {B6879798-B55A-480B-950E-08B74CCF2020}.Debug|arm64.ActiveCfg = Debug|Any CPU + {B6879798-B55A-480B-950E-08B74CCF2020}.Debug|x64.ActiveCfg = Debug|Any CPU + {B6879798-B55A-480B-950E-08B74CCF2020}.Debug|x64.Build.0 = Debug|Any CPU + {B6879798-B55A-480B-950E-08B74CCF2020}.Debug|x86.ActiveCfg = Debug|Any CPU + {B6879798-B55A-480B-950E-08B74CCF2020}.Debug|x86.Build.0 = Debug|Any CPU + {B6879798-B55A-480B-950E-08B74CCF2020}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B6879798-B55A-480B-950E-08B74CCF2020}.Release|Any CPU.Build.0 = Release|Any CPU + {B6879798-B55A-480B-950E-08B74CCF2020}.Release|arm.ActiveCfg = Release|Any CPU + {B6879798-B55A-480B-950E-08B74CCF2020}.Release|arm64.ActiveCfg = Release|Any CPU + {B6879798-B55A-480B-950E-08B74CCF2020}.Release|x64.ActiveCfg = Release|Any CPU + {B6879798-B55A-480B-950E-08B74CCF2020}.Release|x64.Build.0 = Release|Any CPU + {B6879798-B55A-480B-950E-08B74CCF2020}.Release|x86.ActiveCfg = Release|Any CPU + {B6879798-B55A-480B-950E-08B74CCF2020}.Release|x86.Build.0 = Release|Any CPU + {B6879798-B55A-480B-950E-08B74CCF2020}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {B6879798-B55A-480B-950E-08B74CCF2020}.Checked|arm.ActiveCfg = Debug|Any CPU + {B6879798-B55A-480B-950E-08B74CCF2020}.Checked|arm64.ActiveCfg = Debug|Any CPU + {B6879798-B55A-480B-950E-08B74CCF2020}.Checked|x64.ActiveCfg = Debug|Any CPU + {B6879798-B55A-480B-950E-08B74CCF2020}.Checked|x86.ActiveCfg = Debug|Any CPU + {E9711A78-8BF9-4898-AB8B-4A910F636DFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E9711A78-8BF9-4898-AB8B-4A910F636DFA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E9711A78-8BF9-4898-AB8B-4A910F636DFA}.Debug|arm.ActiveCfg = Debug|Any CPU + {E9711A78-8BF9-4898-AB8B-4A910F636DFA}.Debug|arm64.ActiveCfg = Debug|Any CPU + {E9711A78-8BF9-4898-AB8B-4A910F636DFA}.Debug|x64.ActiveCfg = Debug|Any CPU + {E9711A78-8BF9-4898-AB8B-4A910F636DFA}.Debug|x64.Build.0 = Debug|Any CPU + {E9711A78-8BF9-4898-AB8B-4A910F636DFA}.Debug|x86.ActiveCfg = Debug|Any CPU + {E9711A78-8BF9-4898-AB8B-4A910F636DFA}.Debug|x86.Build.0 = Debug|Any CPU + {E9711A78-8BF9-4898-AB8B-4A910F636DFA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E9711A78-8BF9-4898-AB8B-4A910F636DFA}.Release|Any CPU.Build.0 = Release|Any CPU + {E9711A78-8BF9-4898-AB8B-4A910F636DFA}.Release|arm.ActiveCfg = Release|Any CPU + {E9711A78-8BF9-4898-AB8B-4A910F636DFA}.Release|arm64.ActiveCfg = Release|Any CPU + {E9711A78-8BF9-4898-AB8B-4A910F636DFA}.Release|x64.ActiveCfg = Release|Any CPU + {E9711A78-8BF9-4898-AB8B-4A910F636DFA}.Release|x64.Build.0 = Release|Any CPU + {E9711A78-8BF9-4898-AB8B-4A910F636DFA}.Release|x86.ActiveCfg = Release|Any CPU + {E9711A78-8BF9-4898-AB8B-4A910F636DFA}.Release|x86.Build.0 = Release|Any CPU + {E9711A78-8BF9-4898-AB8B-4A910F636DFA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {E9711A78-8BF9-4898-AB8B-4A910F636DFA}.Checked|arm.ActiveCfg = Debug|Any CPU + {E9711A78-8BF9-4898-AB8B-4A910F636DFA}.Checked|arm64.ActiveCfg = Debug|Any CPU + {E9711A78-8BF9-4898-AB8B-4A910F636DFA}.Checked|x64.ActiveCfg = Debug|Any CPU + {E9711A78-8BF9-4898-AB8B-4A910F636DFA}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {F3F9D019-086A-4093-BD49-11B6B204D94A} = {3A79F8E8-9E66-44C6-94E7-DE8C24F80E59} - {B958EACD-B145-4B48-A11B-C5E5B565E311} = {3A79F8E8-9E66-44C6-94E7-DE8C24F80E59} + {F3F9D019-086A-4093-BD49-11B6B204D94A} = {983D609F-487D-4B85-9757-6AD4E7AAA312} {41438432-4DC0-4724-8C8F-0D100083490F} = {9BB99B5C-97D7-4247-B682-27CBBFCF1BB4} {FEFD49C5-E2A2-411E-ABF4-DE7B58861750} = {9BB99B5C-97D7-4247-B682-27CBBFCF1BB4} {EAE41D82-CFFA-4934-89B2-399D12530E84} = {89B14D9D-2BBE-446A-8ED8-020F7BBA6CFC} @@ -280,6 +404,15 @@ Global {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} + {B958EACD-B145-4B48-A11B-C5E5B565E311} = {3A79F8E8-9E66-44C6-94E7-DE8C24F80E59} + {166D4A87-2AEF-4CB1-8699-07F3B8C2FBF2} = {F5608419-456B-4AD8-B4BA-1465B70080E8} + {D61ED890-B208-4564-B77F-8C953E797502} = {F5608419-456B-4AD8-B4BA-1465B70080E8} + {F5608419-456B-4AD8-B4BA-1465B70080E8} = {0AFB8AA2-7483-4E63-A8A0-7CFE2906D253} + {1BF79BB9-37CE-4B5C-B16B-620B71947985} = {C573542D-035B-4E60-BE4E-AEFD5FEF9C3D} + {B6879798-B55A-480B-950E-08B74CCF2020} = {C573542D-035B-4E60-BE4E-AEFD5FEF9C3D} + {C573542D-035B-4E60-BE4E-AEFD5FEF9C3D} = {0AFB8AA2-7483-4E63-A8A0-7CFE2906D253} + {E9711A78-8BF9-4898-AB8B-4A910F636DFA} = {3C3397B4-58A1-441A-B1A7-060C9B1E2013} + {3C3397B4-58A1-441A-B1A7-060C9B1E2013} = {0AFB8AA2-7483-4E63-A8A0-7CFE2906D253} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {4A98215D-6F1A-4A70-B579-89B7EF7FC92A} diff --git a/src/libraries/System.Reflection/tests/AssemblyNameTests.cs b/src/libraries/System.Reflection/tests/AssemblyNameTests.cs index 1960027c1ff132..a2bf6004072980 100644 --- a/src/libraries/System.Reflection/tests/AssemblyNameTests.cs +++ b/src/libraries/System.Reflection/tests/AssemblyNameTests.cs @@ -86,7 +86,6 @@ public void Ctor_String_Public_Key(string name, string expectedName) [InlineData("", typeof(ArgumentException))] [InlineData("\0", typeof(ArgumentException))] [InlineData("\0a", typeof(ArgumentException))] - [InlineData("/a", typeof(FileLoadException))] [InlineData(" ", typeof(FileLoadException))] [InlineData(" \t \r \n ", typeof(FileLoadException))] [InlineData("aa, culture=en-en, culture=en-en", typeof(FileLoadException))] @@ -103,6 +102,8 @@ public void Ctor_String_Invalid(string assemblyName, Type exceptionType) [InlineData("aaaa, custom=10", "aaaa")] [InlineData("aaaa, custom=10, custom=20", "aaaa")] [InlineData("aaaa, custom=lalala", "aaaa")] + [InlineData("/a", "/a")] + [InlineData("aa/name ", "aa/name")] public void Ctor_String_Valid_Legacy(string name, string expectedName) { AssemblyName assemblyName = new AssemblyName(name); @@ -111,7 +112,6 @@ public void Ctor_String_Valid_Legacy(string name, string expectedName) [Theory] [InlineData("name\\u50; ", typeof(FileLoadException))] - [InlineData("aa/name ", typeof(FileLoadException))] [InlineData("aa\\/tname", typeof(FileLoadException))] [InlineData("aaaa, publickey=neutral", typeof(FileLoadException))] [InlineData("aaaa, publickeytoken=neutral", typeof(FileLoadException))] diff --git a/src/libraries/System.Resources.Extensions/System.Resources.Extensions.sln b/src/libraries/System.Resources.Extensions/System.Resources.Extensions.sln index 6b72b97b8bbeae..40d0d38533bcc8 100644 --- a/src/libraries/System.Resources.Extensions/System.Resources.Extensions.sln +++ b/src/libraries/System.Resources.Extensions/System.Resources.Extensions.sln @@ -1,86 +1,538 @@ 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", "{78128772-D609-4144-8654-6D8403DEF0C9}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{174DC291-4C4A-41D0-B351-8054872AB46A}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Drawing.Common", "..\shims\stubs\System.Drawing.Common.csproj", "{42F8E509-4629-4FE6-8E55-02E272D0209E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{C5F4AA26-CCDF-474B-911F-8204E69FC622}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{2620A6B7-AC32-4B19-A933-30AC1EBE8BFC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.Uri", "..\System.Private.Uri\src\System.Private.Uri.csproj", "{8BEA8A00-B086-45A7-B21A-0E58A1542D06}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Resources.Extensions", "ref\System.Resources.Extensions.csproj", "{464BD919-594A-4662-B061-D028CB8F3556}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Resources.Extensions", "src\System.Resources.Extensions.csproj", "{F826EEA7-C53C-4C46-8715-D3E9FACB9ED5}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Resources.Extensions.Tests", "tests\System.Resources.Extensions.Tests.csproj", "{F4A98D66-BA15-4C42-94A9-4732965A969A}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{C9A138C9-DFBA-4034-867B-CA68368F84A5}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{1C4E0357-1AA5-4DD4-B38F-2A2D10DE7872}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{E6F1606F-5731-44BA-B9F9-8FE32E2A4D84}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{7D904627-2671-4790-81DB-FA1FDA20CE83}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\src\System.Runtime.csproj", "{E6F71289-D9DC-439E-9093-9ECA2E533564}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", "..\System.Windows.Extensions\ref\System.Windows.Extensions.csproj", "{51182FA9-71D8-48D4-8461-63A04EDFDF77}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", "..\System.Windows.Extensions\src\System.Windows.Extensions.csproj", "{0174A61A-7E2B-47FC-9CB7-E9EABB898820}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{2195CD2B-EF9E-46A7-B4AA-A2CD31625957}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{9CA5EAB9-D6EA-428D-A7C9-9E5901293123}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{F5B0A1AE-8B97-4B49-B5C8-8E63C6FAAED3}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{79A2178B-D3D2-4E1A-94E7-4856FFC23287}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{09E789AC-BEF7-48C9-8461-0D8C8E17E31F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{BB492CB7-6474-4A4B-880A-E4ABC60E0718}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{7E29F73C-D2DE-4DA4-B399-F6A2475A11EC}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{02C30DE1-6A8F-402C-B137-EDEFBF1AE807}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{2195CD2B-EF9E-46A7-B4AA-A2CD31625957}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{CF5D1CDD-1A13-475D-BD12-13202A620D8A}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{6DCAB55C-A3EE-46AB-94C0-57DBE27E2A22}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{F5B0A1AE-8B97-4B49-B5C8-8E63C6FAAED3}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{CB23059A-3642-4B70-84F3-5D5BD57E0561}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{BE197124-901B-4517-879B-93D0E6684A2C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{DB598308-6179-48EA-A670-0DA6CE5D8340}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{7FF9B3DF-E383-4487-9ADB-E3BF59CFCE83}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|arm = Debug|arm + Debug|arm64 = Debug|arm64 + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|arm = Release|arm + Release|arm64 = Release|arm64 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + Checked|Any CPU = Checked|Any CPU + Checked|arm = Checked|arm + Checked|arm64 = Checked|arm64 + Checked|x64 = Checked|x64 + Checked|x86 = Checked|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {78128772-D609-4144-8654-6D8403DEF0C9}.Debug|Any CPU.ActiveCfg = Debug|x64 + {78128772-D609-4144-8654-6D8403DEF0C9}.Debug|Any CPU.Build.0 = Debug|x64 + {78128772-D609-4144-8654-6D8403DEF0C9}.Debug|arm.ActiveCfg = Debug|arm + {78128772-D609-4144-8654-6D8403DEF0C9}.Debug|arm.Build.0 = Debug|arm + {78128772-D609-4144-8654-6D8403DEF0C9}.Debug|arm64.ActiveCfg = Debug|arm64 + {78128772-D609-4144-8654-6D8403DEF0C9}.Debug|arm64.Build.0 = Debug|arm64 + {78128772-D609-4144-8654-6D8403DEF0C9}.Debug|x64.ActiveCfg = Debug|x64 + {78128772-D609-4144-8654-6D8403DEF0C9}.Debug|x64.Build.0 = Debug|x64 + {78128772-D609-4144-8654-6D8403DEF0C9}.Debug|x86.ActiveCfg = Debug|x86 + {78128772-D609-4144-8654-6D8403DEF0C9}.Debug|x86.Build.0 = Debug|x86 + {78128772-D609-4144-8654-6D8403DEF0C9}.Release|Any CPU.ActiveCfg = Release|x64 + {78128772-D609-4144-8654-6D8403DEF0C9}.Release|Any CPU.Build.0 = Release|x64 + {78128772-D609-4144-8654-6D8403DEF0C9}.Release|arm.ActiveCfg = Release|arm + {78128772-D609-4144-8654-6D8403DEF0C9}.Release|arm.Build.0 = Release|arm + {78128772-D609-4144-8654-6D8403DEF0C9}.Release|arm64.ActiveCfg = Release|arm64 + {78128772-D609-4144-8654-6D8403DEF0C9}.Release|arm64.Build.0 = Release|arm64 + {78128772-D609-4144-8654-6D8403DEF0C9}.Release|x64.ActiveCfg = Release|x64 + {78128772-D609-4144-8654-6D8403DEF0C9}.Release|x64.Build.0 = Release|x64 + {78128772-D609-4144-8654-6D8403DEF0C9}.Release|x86.ActiveCfg = Release|x86 + {78128772-D609-4144-8654-6D8403DEF0C9}.Release|x86.Build.0 = Release|x86 + {78128772-D609-4144-8654-6D8403DEF0C9}.Checked|Any CPU.ActiveCfg = Checked|x64 + {78128772-D609-4144-8654-6D8403DEF0C9}.Checked|Any CPU.Build.0 = Checked|x64 + {78128772-D609-4144-8654-6D8403DEF0C9}.Checked|arm.ActiveCfg = Checked|arm + {78128772-D609-4144-8654-6D8403DEF0C9}.Checked|arm.Build.0 = Checked|arm + {78128772-D609-4144-8654-6D8403DEF0C9}.Checked|arm64.ActiveCfg = Checked|arm64 + {78128772-D609-4144-8654-6D8403DEF0C9}.Checked|arm64.Build.0 = Checked|arm64 + {78128772-D609-4144-8654-6D8403DEF0C9}.Checked|x64.ActiveCfg = Checked|x64 + {78128772-D609-4144-8654-6D8403DEF0C9}.Checked|x64.Build.0 = Checked|x64 + {78128772-D609-4144-8654-6D8403DEF0C9}.Checked|x86.ActiveCfg = Checked|x86 + {78128772-D609-4144-8654-6D8403DEF0C9}.Checked|x86.Build.0 = Checked|x86 {174DC291-4C4A-41D0-B351-8054872AB46A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {174DC291-4C4A-41D0-B351-8054872AB46A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {174DC291-4C4A-41D0-B351-8054872AB46A}.Debug|arm.ActiveCfg = Debug|Any CPU + {174DC291-4C4A-41D0-B351-8054872AB46A}.Debug|arm64.ActiveCfg = Debug|Any CPU + {174DC291-4C4A-41D0-B351-8054872AB46A}.Debug|x64.ActiveCfg = Debug|Any CPU + {174DC291-4C4A-41D0-B351-8054872AB46A}.Debug|x64.Build.0 = Debug|Any CPU + {174DC291-4C4A-41D0-B351-8054872AB46A}.Debug|x86.ActiveCfg = Debug|Any CPU + {174DC291-4C4A-41D0-B351-8054872AB46A}.Debug|x86.Build.0 = Debug|Any CPU {174DC291-4C4A-41D0-B351-8054872AB46A}.Release|Any CPU.ActiveCfg = Release|Any CPU {174DC291-4C4A-41D0-B351-8054872AB46A}.Release|Any CPU.Build.0 = Release|Any CPU + {174DC291-4C4A-41D0-B351-8054872AB46A}.Release|arm.ActiveCfg = Release|Any CPU + {174DC291-4C4A-41D0-B351-8054872AB46A}.Release|arm64.ActiveCfg = Release|Any CPU + {174DC291-4C4A-41D0-B351-8054872AB46A}.Release|x64.ActiveCfg = Release|Any CPU + {174DC291-4C4A-41D0-B351-8054872AB46A}.Release|x64.Build.0 = Release|Any CPU + {174DC291-4C4A-41D0-B351-8054872AB46A}.Release|x86.ActiveCfg = Release|Any CPU + {174DC291-4C4A-41D0-B351-8054872AB46A}.Release|x86.Build.0 = Release|Any CPU + {174DC291-4C4A-41D0-B351-8054872AB46A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {174DC291-4C4A-41D0-B351-8054872AB46A}.Checked|arm.ActiveCfg = Debug|Any CPU + {174DC291-4C4A-41D0-B351-8054872AB46A}.Checked|arm64.ActiveCfg = Debug|Any CPU + {174DC291-4C4A-41D0-B351-8054872AB46A}.Checked|x64.ActiveCfg = Debug|Any CPU + {174DC291-4C4A-41D0-B351-8054872AB46A}.Checked|x86.ActiveCfg = Debug|Any CPU + {42F8E509-4629-4FE6-8E55-02E272D0209E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {42F8E509-4629-4FE6-8E55-02E272D0209E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {42F8E509-4629-4FE6-8E55-02E272D0209E}.Debug|arm.ActiveCfg = Debug|Any CPU + {42F8E509-4629-4FE6-8E55-02E272D0209E}.Debug|arm64.ActiveCfg = Debug|Any CPU + {42F8E509-4629-4FE6-8E55-02E272D0209E}.Debug|x64.ActiveCfg = Debug|Any CPU + {42F8E509-4629-4FE6-8E55-02E272D0209E}.Debug|x64.Build.0 = Debug|Any CPU + {42F8E509-4629-4FE6-8E55-02E272D0209E}.Debug|x86.ActiveCfg = Debug|Any CPU + {42F8E509-4629-4FE6-8E55-02E272D0209E}.Debug|x86.Build.0 = Debug|Any CPU + {42F8E509-4629-4FE6-8E55-02E272D0209E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {42F8E509-4629-4FE6-8E55-02E272D0209E}.Release|Any CPU.Build.0 = Release|Any CPU + {42F8E509-4629-4FE6-8E55-02E272D0209E}.Release|arm.ActiveCfg = Release|Any CPU + {42F8E509-4629-4FE6-8E55-02E272D0209E}.Release|arm64.ActiveCfg = Release|Any CPU + {42F8E509-4629-4FE6-8E55-02E272D0209E}.Release|x64.ActiveCfg = Release|Any CPU + {42F8E509-4629-4FE6-8E55-02E272D0209E}.Release|x64.Build.0 = Release|Any CPU + {42F8E509-4629-4FE6-8E55-02E272D0209E}.Release|x86.ActiveCfg = Release|Any CPU + {42F8E509-4629-4FE6-8E55-02E272D0209E}.Release|x86.Build.0 = Release|Any CPU + {42F8E509-4629-4FE6-8E55-02E272D0209E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {42F8E509-4629-4FE6-8E55-02E272D0209E}.Checked|arm.ActiveCfg = Debug|Any CPU + {42F8E509-4629-4FE6-8E55-02E272D0209E}.Checked|arm64.ActiveCfg = Debug|Any CPU + {42F8E509-4629-4FE6-8E55-02E272D0209E}.Checked|x64.ActiveCfg = Debug|Any CPU + {42F8E509-4629-4FE6-8E55-02E272D0209E}.Checked|x86.ActiveCfg = Debug|Any CPU + {C5F4AA26-CCDF-474B-911F-8204E69FC622}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C5F4AA26-CCDF-474B-911F-8204E69FC622}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C5F4AA26-CCDF-474B-911F-8204E69FC622}.Debug|arm.ActiveCfg = Debug|Any CPU + {C5F4AA26-CCDF-474B-911F-8204E69FC622}.Debug|arm64.ActiveCfg = Debug|Any CPU + {C5F4AA26-CCDF-474B-911F-8204E69FC622}.Debug|x64.ActiveCfg = Debug|Any CPU + {C5F4AA26-CCDF-474B-911F-8204E69FC622}.Debug|x64.Build.0 = Debug|Any CPU + {C5F4AA26-CCDF-474B-911F-8204E69FC622}.Debug|x86.ActiveCfg = Debug|Any CPU + {C5F4AA26-CCDF-474B-911F-8204E69FC622}.Debug|x86.Build.0 = Debug|Any CPU + {C5F4AA26-CCDF-474B-911F-8204E69FC622}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C5F4AA26-CCDF-474B-911F-8204E69FC622}.Release|Any CPU.Build.0 = Release|Any CPU + {C5F4AA26-CCDF-474B-911F-8204E69FC622}.Release|arm.ActiveCfg = Release|Any CPU + {C5F4AA26-CCDF-474B-911F-8204E69FC622}.Release|arm64.ActiveCfg = Release|Any CPU + {C5F4AA26-CCDF-474B-911F-8204E69FC622}.Release|x64.ActiveCfg = Release|Any CPU + {C5F4AA26-CCDF-474B-911F-8204E69FC622}.Release|x64.Build.0 = Release|Any CPU + {C5F4AA26-CCDF-474B-911F-8204E69FC622}.Release|x86.ActiveCfg = Release|Any CPU + {C5F4AA26-CCDF-474B-911F-8204E69FC622}.Release|x86.Build.0 = Release|Any CPU + {C5F4AA26-CCDF-474B-911F-8204E69FC622}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {C5F4AA26-CCDF-474B-911F-8204E69FC622}.Checked|arm.ActiveCfg = Debug|Any CPU + {C5F4AA26-CCDF-474B-911F-8204E69FC622}.Checked|arm64.ActiveCfg = Debug|Any CPU + {C5F4AA26-CCDF-474B-911F-8204E69FC622}.Checked|x64.ActiveCfg = Debug|Any CPU + {C5F4AA26-CCDF-474B-911F-8204E69FC622}.Checked|x86.ActiveCfg = Debug|Any CPU + {2620A6B7-AC32-4B19-A933-30AC1EBE8BFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2620A6B7-AC32-4B19-A933-30AC1EBE8BFC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2620A6B7-AC32-4B19-A933-30AC1EBE8BFC}.Debug|arm.ActiveCfg = Debug|Any CPU + {2620A6B7-AC32-4B19-A933-30AC1EBE8BFC}.Debug|arm64.ActiveCfg = Debug|Any CPU + {2620A6B7-AC32-4B19-A933-30AC1EBE8BFC}.Debug|x64.ActiveCfg = Debug|Any CPU + {2620A6B7-AC32-4B19-A933-30AC1EBE8BFC}.Debug|x64.Build.0 = Debug|Any CPU + {2620A6B7-AC32-4B19-A933-30AC1EBE8BFC}.Debug|x86.ActiveCfg = Debug|Any CPU + {2620A6B7-AC32-4B19-A933-30AC1EBE8BFC}.Debug|x86.Build.0 = Debug|Any CPU + {2620A6B7-AC32-4B19-A933-30AC1EBE8BFC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2620A6B7-AC32-4B19-A933-30AC1EBE8BFC}.Release|Any CPU.Build.0 = Release|Any CPU + {2620A6B7-AC32-4B19-A933-30AC1EBE8BFC}.Release|arm.ActiveCfg = Release|Any CPU + {2620A6B7-AC32-4B19-A933-30AC1EBE8BFC}.Release|arm64.ActiveCfg = Release|Any CPU + {2620A6B7-AC32-4B19-A933-30AC1EBE8BFC}.Release|x64.ActiveCfg = Release|Any CPU + {2620A6B7-AC32-4B19-A933-30AC1EBE8BFC}.Release|x64.Build.0 = Release|Any CPU + {2620A6B7-AC32-4B19-A933-30AC1EBE8BFC}.Release|x86.ActiveCfg = Release|Any CPU + {2620A6B7-AC32-4B19-A933-30AC1EBE8BFC}.Release|x86.Build.0 = Release|Any CPU + {2620A6B7-AC32-4B19-A933-30AC1EBE8BFC}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {2620A6B7-AC32-4B19-A933-30AC1EBE8BFC}.Checked|arm.ActiveCfg = Debug|Any CPU + {2620A6B7-AC32-4B19-A933-30AC1EBE8BFC}.Checked|arm64.ActiveCfg = Debug|Any CPU + {2620A6B7-AC32-4B19-A933-30AC1EBE8BFC}.Checked|x64.ActiveCfg = Debug|Any CPU + {2620A6B7-AC32-4B19-A933-30AC1EBE8BFC}.Checked|x86.ActiveCfg = Debug|Any CPU + {8BEA8A00-B086-45A7-B21A-0E58A1542D06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8BEA8A00-B086-45A7-B21A-0E58A1542D06}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8BEA8A00-B086-45A7-B21A-0E58A1542D06}.Debug|arm.ActiveCfg = Debug|Any CPU + {8BEA8A00-B086-45A7-B21A-0E58A1542D06}.Debug|arm64.ActiveCfg = Debug|Any CPU + {8BEA8A00-B086-45A7-B21A-0E58A1542D06}.Debug|x64.ActiveCfg = Debug|Any CPU + {8BEA8A00-B086-45A7-B21A-0E58A1542D06}.Debug|x64.Build.0 = Debug|Any CPU + {8BEA8A00-B086-45A7-B21A-0E58A1542D06}.Debug|x86.ActiveCfg = Debug|Any CPU + {8BEA8A00-B086-45A7-B21A-0E58A1542D06}.Debug|x86.Build.0 = Debug|Any CPU + {8BEA8A00-B086-45A7-B21A-0E58A1542D06}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8BEA8A00-B086-45A7-B21A-0E58A1542D06}.Release|Any CPU.Build.0 = Release|Any CPU + {8BEA8A00-B086-45A7-B21A-0E58A1542D06}.Release|arm.ActiveCfg = Release|Any CPU + {8BEA8A00-B086-45A7-B21A-0E58A1542D06}.Release|arm64.ActiveCfg = Release|Any CPU + {8BEA8A00-B086-45A7-B21A-0E58A1542D06}.Release|x64.ActiveCfg = Release|Any CPU + {8BEA8A00-B086-45A7-B21A-0E58A1542D06}.Release|x64.Build.0 = Release|Any CPU + {8BEA8A00-B086-45A7-B21A-0E58A1542D06}.Release|x86.ActiveCfg = Release|Any CPU + {8BEA8A00-B086-45A7-B21A-0E58A1542D06}.Release|x86.Build.0 = Release|Any CPU + {8BEA8A00-B086-45A7-B21A-0E58A1542D06}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {8BEA8A00-B086-45A7-B21A-0E58A1542D06}.Checked|arm.ActiveCfg = Debug|Any CPU + {8BEA8A00-B086-45A7-B21A-0E58A1542D06}.Checked|arm64.ActiveCfg = Debug|Any CPU + {8BEA8A00-B086-45A7-B21A-0E58A1542D06}.Checked|x64.ActiveCfg = Debug|Any CPU + {8BEA8A00-B086-45A7-B21A-0E58A1542D06}.Checked|x86.ActiveCfg = Debug|Any CPU {464BD919-594A-4662-B061-D028CB8F3556}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {464BD919-594A-4662-B061-D028CB8F3556}.Debug|Any CPU.Build.0 = Debug|Any CPU + {464BD919-594A-4662-B061-D028CB8F3556}.Debug|arm.ActiveCfg = Debug|Any CPU + {464BD919-594A-4662-B061-D028CB8F3556}.Debug|arm64.ActiveCfg = Debug|Any CPU + {464BD919-594A-4662-B061-D028CB8F3556}.Debug|x64.ActiveCfg = Debug|Any CPU + {464BD919-594A-4662-B061-D028CB8F3556}.Debug|x64.Build.0 = Debug|Any CPU + {464BD919-594A-4662-B061-D028CB8F3556}.Debug|x86.ActiveCfg = Debug|Any CPU + {464BD919-594A-4662-B061-D028CB8F3556}.Debug|x86.Build.0 = Debug|Any CPU {464BD919-594A-4662-B061-D028CB8F3556}.Release|Any CPU.ActiveCfg = Release|Any CPU {464BD919-594A-4662-B061-D028CB8F3556}.Release|Any CPU.Build.0 = Release|Any CPU + {464BD919-594A-4662-B061-D028CB8F3556}.Release|arm.ActiveCfg = Release|Any CPU + {464BD919-594A-4662-B061-D028CB8F3556}.Release|arm64.ActiveCfg = Release|Any CPU + {464BD919-594A-4662-B061-D028CB8F3556}.Release|x64.ActiveCfg = Release|Any CPU + {464BD919-594A-4662-B061-D028CB8F3556}.Release|x64.Build.0 = Release|Any CPU + {464BD919-594A-4662-B061-D028CB8F3556}.Release|x86.ActiveCfg = Release|Any CPU + {464BD919-594A-4662-B061-D028CB8F3556}.Release|x86.Build.0 = Release|Any CPU + {464BD919-594A-4662-B061-D028CB8F3556}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {464BD919-594A-4662-B061-D028CB8F3556}.Checked|arm.ActiveCfg = Debug|Any CPU + {464BD919-594A-4662-B061-D028CB8F3556}.Checked|arm64.ActiveCfg = Debug|Any CPU + {464BD919-594A-4662-B061-D028CB8F3556}.Checked|x64.ActiveCfg = Debug|Any CPU + {464BD919-594A-4662-B061-D028CB8F3556}.Checked|x86.ActiveCfg = Debug|Any CPU {F826EEA7-C53C-4C46-8715-D3E9FACB9ED5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F826EEA7-C53C-4C46-8715-D3E9FACB9ED5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F826EEA7-C53C-4C46-8715-D3E9FACB9ED5}.Debug|arm.ActiveCfg = Debug|Any CPU + {F826EEA7-C53C-4C46-8715-D3E9FACB9ED5}.Debug|arm64.ActiveCfg = Debug|Any CPU + {F826EEA7-C53C-4C46-8715-D3E9FACB9ED5}.Debug|x64.ActiveCfg = Debug|Any CPU + {F826EEA7-C53C-4C46-8715-D3E9FACB9ED5}.Debug|x64.Build.0 = Debug|Any CPU + {F826EEA7-C53C-4C46-8715-D3E9FACB9ED5}.Debug|x86.ActiveCfg = Debug|Any CPU + {F826EEA7-C53C-4C46-8715-D3E9FACB9ED5}.Debug|x86.Build.0 = Debug|Any CPU {F826EEA7-C53C-4C46-8715-D3E9FACB9ED5}.Release|Any CPU.ActiveCfg = Release|Any CPU {F826EEA7-C53C-4C46-8715-D3E9FACB9ED5}.Release|Any CPU.Build.0 = Release|Any CPU + {F826EEA7-C53C-4C46-8715-D3E9FACB9ED5}.Release|arm.ActiveCfg = Release|Any CPU + {F826EEA7-C53C-4C46-8715-D3E9FACB9ED5}.Release|arm64.ActiveCfg = Release|Any CPU + {F826EEA7-C53C-4C46-8715-D3E9FACB9ED5}.Release|x64.ActiveCfg = Release|Any CPU + {F826EEA7-C53C-4C46-8715-D3E9FACB9ED5}.Release|x64.Build.0 = Release|Any CPU + {F826EEA7-C53C-4C46-8715-D3E9FACB9ED5}.Release|x86.ActiveCfg = Release|Any CPU + {F826EEA7-C53C-4C46-8715-D3E9FACB9ED5}.Release|x86.Build.0 = Release|Any CPU + {F826EEA7-C53C-4C46-8715-D3E9FACB9ED5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {F826EEA7-C53C-4C46-8715-D3E9FACB9ED5}.Checked|arm.ActiveCfg = Debug|Any CPU + {F826EEA7-C53C-4C46-8715-D3E9FACB9ED5}.Checked|arm64.ActiveCfg = Debug|Any CPU + {F826EEA7-C53C-4C46-8715-D3E9FACB9ED5}.Checked|x64.ActiveCfg = Debug|Any CPU + {F826EEA7-C53C-4C46-8715-D3E9FACB9ED5}.Checked|x86.ActiveCfg = Debug|Any CPU {F4A98D66-BA15-4C42-94A9-4732965A969A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F4A98D66-BA15-4C42-94A9-4732965A969A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F4A98D66-BA15-4C42-94A9-4732965A969A}.Debug|arm.ActiveCfg = Debug|Any CPU + {F4A98D66-BA15-4C42-94A9-4732965A969A}.Debug|arm64.ActiveCfg = Debug|Any CPU + {F4A98D66-BA15-4C42-94A9-4732965A969A}.Debug|x64.ActiveCfg = Debug|Any CPU + {F4A98D66-BA15-4C42-94A9-4732965A969A}.Debug|x64.Build.0 = Debug|Any CPU + {F4A98D66-BA15-4C42-94A9-4732965A969A}.Debug|x86.ActiveCfg = Debug|Any CPU + {F4A98D66-BA15-4C42-94A9-4732965A969A}.Debug|x86.Build.0 = Debug|Any CPU {F4A98D66-BA15-4C42-94A9-4732965A969A}.Release|Any CPU.ActiveCfg = Release|Any CPU {F4A98D66-BA15-4C42-94A9-4732965A969A}.Release|Any CPU.Build.0 = Release|Any CPU - {C9A138C9-DFBA-4034-867B-CA68368F84A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C9A138C9-DFBA-4034-867B-CA68368F84A5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C9A138C9-DFBA-4034-867B-CA68368F84A5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C9A138C9-DFBA-4034-867B-CA68368F84A5}.Release|Any CPU.Build.0 = Release|Any CPU + {F4A98D66-BA15-4C42-94A9-4732965A969A}.Release|arm.ActiveCfg = Release|Any CPU + {F4A98D66-BA15-4C42-94A9-4732965A969A}.Release|arm64.ActiveCfg = Release|Any CPU + {F4A98D66-BA15-4C42-94A9-4732965A969A}.Release|x64.ActiveCfg = Release|Any CPU + {F4A98D66-BA15-4C42-94A9-4732965A969A}.Release|x64.Build.0 = Release|Any CPU + {F4A98D66-BA15-4C42-94A9-4732965A969A}.Release|x86.ActiveCfg = Release|Any CPU + {F4A98D66-BA15-4C42-94A9-4732965A969A}.Release|x86.Build.0 = Release|Any CPU + {F4A98D66-BA15-4C42-94A9-4732965A969A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {F4A98D66-BA15-4C42-94A9-4732965A969A}.Checked|arm.ActiveCfg = Debug|Any CPU + {F4A98D66-BA15-4C42-94A9-4732965A969A}.Checked|arm64.ActiveCfg = Debug|Any CPU + {F4A98D66-BA15-4C42-94A9-4732965A969A}.Checked|x64.ActiveCfg = Debug|Any CPU + {F4A98D66-BA15-4C42-94A9-4732965A969A}.Checked|x86.ActiveCfg = Debug|Any CPU {1C4E0357-1AA5-4DD4-B38F-2A2D10DE7872}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1C4E0357-1AA5-4DD4-B38F-2A2D10DE7872}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1C4E0357-1AA5-4DD4-B38F-2A2D10DE7872}.Debug|arm.ActiveCfg = Debug|Any CPU + {1C4E0357-1AA5-4DD4-B38F-2A2D10DE7872}.Debug|arm64.ActiveCfg = Debug|Any CPU + {1C4E0357-1AA5-4DD4-B38F-2A2D10DE7872}.Debug|x64.ActiveCfg = Debug|Any CPU + {1C4E0357-1AA5-4DD4-B38F-2A2D10DE7872}.Debug|x64.Build.0 = Debug|Any CPU + {1C4E0357-1AA5-4DD4-B38F-2A2D10DE7872}.Debug|x86.ActiveCfg = Debug|Any CPU + {1C4E0357-1AA5-4DD4-B38F-2A2D10DE7872}.Debug|x86.Build.0 = Debug|Any CPU {1C4E0357-1AA5-4DD4-B38F-2A2D10DE7872}.Release|Any CPU.ActiveCfg = Release|Any CPU {1C4E0357-1AA5-4DD4-B38F-2A2D10DE7872}.Release|Any CPU.Build.0 = Release|Any CPU + {1C4E0357-1AA5-4DD4-B38F-2A2D10DE7872}.Release|arm.ActiveCfg = Release|Any CPU + {1C4E0357-1AA5-4DD4-B38F-2A2D10DE7872}.Release|arm64.ActiveCfg = Release|Any CPU + {1C4E0357-1AA5-4DD4-B38F-2A2D10DE7872}.Release|x64.ActiveCfg = Release|Any CPU + {1C4E0357-1AA5-4DD4-B38F-2A2D10DE7872}.Release|x64.Build.0 = Release|Any CPU + {1C4E0357-1AA5-4DD4-B38F-2A2D10DE7872}.Release|x86.ActiveCfg = Release|Any CPU + {1C4E0357-1AA5-4DD4-B38F-2A2D10DE7872}.Release|x86.Build.0 = Release|Any CPU + {1C4E0357-1AA5-4DD4-B38F-2A2D10DE7872}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {1C4E0357-1AA5-4DD4-B38F-2A2D10DE7872}.Checked|arm.ActiveCfg = Debug|Any CPU + {1C4E0357-1AA5-4DD4-B38F-2A2D10DE7872}.Checked|arm64.ActiveCfg = Debug|Any CPU + {1C4E0357-1AA5-4DD4-B38F-2A2D10DE7872}.Checked|x64.ActiveCfg = Debug|Any CPU + {1C4E0357-1AA5-4DD4-B38F-2A2D10DE7872}.Checked|x86.ActiveCfg = Debug|Any CPU {E6F1606F-5731-44BA-B9F9-8FE32E2A4D84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E6F1606F-5731-44BA-B9F9-8FE32E2A4D84}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E6F1606F-5731-44BA-B9F9-8FE32E2A4D84}.Debug|arm.ActiveCfg = Debug|Any CPU + {E6F1606F-5731-44BA-B9F9-8FE32E2A4D84}.Debug|arm64.ActiveCfg = Debug|Any CPU + {E6F1606F-5731-44BA-B9F9-8FE32E2A4D84}.Debug|x64.ActiveCfg = Debug|Any CPU + {E6F1606F-5731-44BA-B9F9-8FE32E2A4D84}.Debug|x64.Build.0 = Debug|Any CPU + {E6F1606F-5731-44BA-B9F9-8FE32E2A4D84}.Debug|x86.ActiveCfg = Debug|Any CPU + {E6F1606F-5731-44BA-B9F9-8FE32E2A4D84}.Debug|x86.Build.0 = Debug|Any CPU {E6F1606F-5731-44BA-B9F9-8FE32E2A4D84}.Release|Any CPU.ActiveCfg = Release|Any CPU {E6F1606F-5731-44BA-B9F9-8FE32E2A4D84}.Release|Any CPU.Build.0 = Release|Any CPU + {E6F1606F-5731-44BA-B9F9-8FE32E2A4D84}.Release|arm.ActiveCfg = Release|Any CPU + {E6F1606F-5731-44BA-B9F9-8FE32E2A4D84}.Release|arm64.ActiveCfg = Release|Any CPU + {E6F1606F-5731-44BA-B9F9-8FE32E2A4D84}.Release|x64.ActiveCfg = Release|Any CPU + {E6F1606F-5731-44BA-B9F9-8FE32E2A4D84}.Release|x64.Build.0 = Release|Any CPU + {E6F1606F-5731-44BA-B9F9-8FE32E2A4D84}.Release|x86.ActiveCfg = Release|Any CPU + {E6F1606F-5731-44BA-B9F9-8FE32E2A4D84}.Release|x86.Build.0 = Release|Any CPU + {E6F1606F-5731-44BA-B9F9-8FE32E2A4D84}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {E6F1606F-5731-44BA-B9F9-8FE32E2A4D84}.Checked|arm.ActiveCfg = Debug|Any CPU + {E6F1606F-5731-44BA-B9F9-8FE32E2A4D84}.Checked|arm64.ActiveCfg = Debug|Any CPU + {E6F1606F-5731-44BA-B9F9-8FE32E2A4D84}.Checked|x64.ActiveCfg = Debug|Any CPU + {E6F1606F-5731-44BA-B9F9-8FE32E2A4D84}.Checked|x86.ActiveCfg = Debug|Any CPU + {7D904627-2671-4790-81DB-FA1FDA20CE83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7D904627-2671-4790-81DB-FA1FDA20CE83}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7D904627-2671-4790-81DB-FA1FDA20CE83}.Debug|arm.ActiveCfg = Debug|Any CPU + {7D904627-2671-4790-81DB-FA1FDA20CE83}.Debug|arm64.ActiveCfg = Debug|Any CPU + {7D904627-2671-4790-81DB-FA1FDA20CE83}.Debug|x64.ActiveCfg = Debug|Any CPU + {7D904627-2671-4790-81DB-FA1FDA20CE83}.Debug|x64.Build.0 = Debug|Any CPU + {7D904627-2671-4790-81DB-FA1FDA20CE83}.Debug|x86.ActiveCfg = Debug|Any CPU + {7D904627-2671-4790-81DB-FA1FDA20CE83}.Debug|x86.Build.0 = Debug|Any CPU + {7D904627-2671-4790-81DB-FA1FDA20CE83}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7D904627-2671-4790-81DB-FA1FDA20CE83}.Release|Any CPU.Build.0 = Release|Any CPU + {7D904627-2671-4790-81DB-FA1FDA20CE83}.Release|arm.ActiveCfg = Release|Any CPU + {7D904627-2671-4790-81DB-FA1FDA20CE83}.Release|arm64.ActiveCfg = Release|Any CPU + {7D904627-2671-4790-81DB-FA1FDA20CE83}.Release|x64.ActiveCfg = Release|Any CPU + {7D904627-2671-4790-81DB-FA1FDA20CE83}.Release|x64.Build.0 = Release|Any CPU + {7D904627-2671-4790-81DB-FA1FDA20CE83}.Release|x86.ActiveCfg = Release|Any CPU + {7D904627-2671-4790-81DB-FA1FDA20CE83}.Release|x86.Build.0 = Release|Any CPU + {7D904627-2671-4790-81DB-FA1FDA20CE83}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {7D904627-2671-4790-81DB-FA1FDA20CE83}.Checked|arm.ActiveCfg = Debug|Any CPU + {7D904627-2671-4790-81DB-FA1FDA20CE83}.Checked|arm64.ActiveCfg = Debug|Any CPU + {7D904627-2671-4790-81DB-FA1FDA20CE83}.Checked|x64.ActiveCfg = Debug|Any CPU + {7D904627-2671-4790-81DB-FA1FDA20CE83}.Checked|x86.ActiveCfg = Debug|Any CPU + {E6F71289-D9DC-439E-9093-9ECA2E533564}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E6F71289-D9DC-439E-9093-9ECA2E533564}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E6F71289-D9DC-439E-9093-9ECA2E533564}.Debug|arm.ActiveCfg = Debug|Any CPU + {E6F71289-D9DC-439E-9093-9ECA2E533564}.Debug|arm64.ActiveCfg = Debug|Any CPU + {E6F71289-D9DC-439E-9093-9ECA2E533564}.Debug|x64.ActiveCfg = Debug|Any CPU + {E6F71289-D9DC-439E-9093-9ECA2E533564}.Debug|x64.Build.0 = Debug|Any CPU + {E6F71289-D9DC-439E-9093-9ECA2E533564}.Debug|x86.ActiveCfg = Debug|Any CPU + {E6F71289-D9DC-439E-9093-9ECA2E533564}.Debug|x86.Build.0 = Debug|Any CPU + {E6F71289-D9DC-439E-9093-9ECA2E533564}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E6F71289-D9DC-439E-9093-9ECA2E533564}.Release|Any CPU.Build.0 = Release|Any CPU + {E6F71289-D9DC-439E-9093-9ECA2E533564}.Release|arm.ActiveCfg = Release|Any CPU + {E6F71289-D9DC-439E-9093-9ECA2E533564}.Release|arm64.ActiveCfg = Release|Any CPU + {E6F71289-D9DC-439E-9093-9ECA2E533564}.Release|x64.ActiveCfg = Release|Any CPU + {E6F71289-D9DC-439E-9093-9ECA2E533564}.Release|x64.Build.0 = Release|Any CPU + {E6F71289-D9DC-439E-9093-9ECA2E533564}.Release|x86.ActiveCfg = Release|Any CPU + {E6F71289-D9DC-439E-9093-9ECA2E533564}.Release|x86.Build.0 = Release|Any CPU + {E6F71289-D9DC-439E-9093-9ECA2E533564}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {E6F71289-D9DC-439E-9093-9ECA2E533564}.Checked|arm.ActiveCfg = Debug|Any CPU + {E6F71289-D9DC-439E-9093-9ECA2E533564}.Checked|arm64.ActiveCfg = Debug|Any CPU + {E6F71289-D9DC-439E-9093-9ECA2E533564}.Checked|x64.ActiveCfg = Debug|Any CPU + {E6F71289-D9DC-439E-9093-9ECA2E533564}.Checked|x86.ActiveCfg = Debug|Any CPU {51182FA9-71D8-48D4-8461-63A04EDFDF77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {51182FA9-71D8-48D4-8461-63A04EDFDF77}.Debug|Any CPU.Build.0 = Debug|Any CPU + {51182FA9-71D8-48D4-8461-63A04EDFDF77}.Debug|arm.ActiveCfg = Debug|Any CPU + {51182FA9-71D8-48D4-8461-63A04EDFDF77}.Debug|arm64.ActiveCfg = Debug|Any CPU + {51182FA9-71D8-48D4-8461-63A04EDFDF77}.Debug|x64.ActiveCfg = Debug|Any CPU + {51182FA9-71D8-48D4-8461-63A04EDFDF77}.Debug|x64.Build.0 = Debug|Any CPU + {51182FA9-71D8-48D4-8461-63A04EDFDF77}.Debug|x86.ActiveCfg = Debug|Any CPU + {51182FA9-71D8-48D4-8461-63A04EDFDF77}.Debug|x86.Build.0 = Debug|Any CPU {51182FA9-71D8-48D4-8461-63A04EDFDF77}.Release|Any CPU.ActiveCfg = Release|Any CPU {51182FA9-71D8-48D4-8461-63A04EDFDF77}.Release|Any CPU.Build.0 = Release|Any CPU + {51182FA9-71D8-48D4-8461-63A04EDFDF77}.Release|arm.ActiveCfg = Release|Any CPU + {51182FA9-71D8-48D4-8461-63A04EDFDF77}.Release|arm64.ActiveCfg = Release|Any CPU + {51182FA9-71D8-48D4-8461-63A04EDFDF77}.Release|x64.ActiveCfg = Release|Any CPU + {51182FA9-71D8-48D4-8461-63A04EDFDF77}.Release|x64.Build.0 = Release|Any CPU + {51182FA9-71D8-48D4-8461-63A04EDFDF77}.Release|x86.ActiveCfg = Release|Any CPU + {51182FA9-71D8-48D4-8461-63A04EDFDF77}.Release|x86.Build.0 = Release|Any CPU + {51182FA9-71D8-48D4-8461-63A04EDFDF77}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {51182FA9-71D8-48D4-8461-63A04EDFDF77}.Checked|arm.ActiveCfg = Debug|Any CPU + {51182FA9-71D8-48D4-8461-63A04EDFDF77}.Checked|arm64.ActiveCfg = Debug|Any CPU + {51182FA9-71D8-48D4-8461-63A04EDFDF77}.Checked|x64.ActiveCfg = Debug|Any CPU + {51182FA9-71D8-48D4-8461-63A04EDFDF77}.Checked|x86.ActiveCfg = Debug|Any CPU {0174A61A-7E2B-47FC-9CB7-E9EABB898820}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0174A61A-7E2B-47FC-9CB7-E9EABB898820}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0174A61A-7E2B-47FC-9CB7-E9EABB898820}.Debug|arm.ActiveCfg = Debug|Any CPU + {0174A61A-7E2B-47FC-9CB7-E9EABB898820}.Debug|arm64.ActiveCfg = Debug|Any CPU + {0174A61A-7E2B-47FC-9CB7-E9EABB898820}.Debug|x64.ActiveCfg = Debug|Any CPU + {0174A61A-7E2B-47FC-9CB7-E9EABB898820}.Debug|x64.Build.0 = Debug|Any CPU + {0174A61A-7E2B-47FC-9CB7-E9EABB898820}.Debug|x86.ActiveCfg = Debug|Any CPU + {0174A61A-7E2B-47FC-9CB7-E9EABB898820}.Debug|x86.Build.0 = Debug|Any CPU {0174A61A-7E2B-47FC-9CB7-E9EABB898820}.Release|Any CPU.ActiveCfg = Release|Any CPU {0174A61A-7E2B-47FC-9CB7-E9EABB898820}.Release|Any CPU.Build.0 = Release|Any CPU + {0174A61A-7E2B-47FC-9CB7-E9EABB898820}.Release|arm.ActiveCfg = Release|Any CPU + {0174A61A-7E2B-47FC-9CB7-E9EABB898820}.Release|arm64.ActiveCfg = Release|Any CPU + {0174A61A-7E2B-47FC-9CB7-E9EABB898820}.Release|x64.ActiveCfg = Release|Any CPU + {0174A61A-7E2B-47FC-9CB7-E9EABB898820}.Release|x64.Build.0 = Release|Any CPU + {0174A61A-7E2B-47FC-9CB7-E9EABB898820}.Release|x86.ActiveCfg = Release|Any CPU + {0174A61A-7E2B-47FC-9CB7-E9EABB898820}.Release|x86.Build.0 = Release|Any CPU + {0174A61A-7E2B-47FC-9CB7-E9EABB898820}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {0174A61A-7E2B-47FC-9CB7-E9EABB898820}.Checked|arm.ActiveCfg = Debug|Any CPU + {0174A61A-7E2B-47FC-9CB7-E9EABB898820}.Checked|arm64.ActiveCfg = Debug|Any CPU + {0174A61A-7E2B-47FC-9CB7-E9EABB898820}.Checked|x64.ActiveCfg = Debug|Any CPU + {0174A61A-7E2B-47FC-9CB7-E9EABB898820}.Checked|x86.ActiveCfg = Debug|Any CPU + {9CA5EAB9-D6EA-428D-A7C9-9E5901293123}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9CA5EAB9-D6EA-428D-A7C9-9E5901293123}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9CA5EAB9-D6EA-428D-A7C9-9E5901293123}.Debug|arm.ActiveCfg = Debug|Any CPU + {9CA5EAB9-D6EA-428D-A7C9-9E5901293123}.Debug|arm64.ActiveCfg = Debug|Any CPU + {9CA5EAB9-D6EA-428D-A7C9-9E5901293123}.Debug|x64.ActiveCfg = Debug|Any CPU + {9CA5EAB9-D6EA-428D-A7C9-9E5901293123}.Debug|x64.Build.0 = Debug|Any CPU + {9CA5EAB9-D6EA-428D-A7C9-9E5901293123}.Debug|x86.ActiveCfg = Debug|Any CPU + {9CA5EAB9-D6EA-428D-A7C9-9E5901293123}.Debug|x86.Build.0 = Debug|Any CPU + {9CA5EAB9-D6EA-428D-A7C9-9E5901293123}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9CA5EAB9-D6EA-428D-A7C9-9E5901293123}.Release|Any CPU.Build.0 = Release|Any CPU + {9CA5EAB9-D6EA-428D-A7C9-9E5901293123}.Release|arm.ActiveCfg = Release|Any CPU + {9CA5EAB9-D6EA-428D-A7C9-9E5901293123}.Release|arm64.ActiveCfg = Release|Any CPU + {9CA5EAB9-D6EA-428D-A7C9-9E5901293123}.Release|x64.ActiveCfg = Release|Any CPU + {9CA5EAB9-D6EA-428D-A7C9-9E5901293123}.Release|x64.Build.0 = Release|Any CPU + {9CA5EAB9-D6EA-428D-A7C9-9E5901293123}.Release|x86.ActiveCfg = Release|Any CPU + {9CA5EAB9-D6EA-428D-A7C9-9E5901293123}.Release|x86.Build.0 = Release|Any CPU + {9CA5EAB9-D6EA-428D-A7C9-9E5901293123}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {9CA5EAB9-D6EA-428D-A7C9-9E5901293123}.Checked|arm.ActiveCfg = Debug|Any CPU + {9CA5EAB9-D6EA-428D-A7C9-9E5901293123}.Checked|arm64.ActiveCfg = Debug|Any CPU + {9CA5EAB9-D6EA-428D-A7C9-9E5901293123}.Checked|x64.ActiveCfg = Debug|Any CPU + {9CA5EAB9-D6EA-428D-A7C9-9E5901293123}.Checked|x86.ActiveCfg = Debug|Any CPU + {79A2178B-D3D2-4E1A-94E7-4856FFC23287}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {79A2178B-D3D2-4E1A-94E7-4856FFC23287}.Debug|Any CPU.Build.0 = Debug|Any CPU + {79A2178B-D3D2-4E1A-94E7-4856FFC23287}.Debug|arm.ActiveCfg = Debug|Any CPU + {79A2178B-D3D2-4E1A-94E7-4856FFC23287}.Debug|arm64.ActiveCfg = Debug|Any CPU + {79A2178B-D3D2-4E1A-94E7-4856FFC23287}.Debug|x64.ActiveCfg = Debug|Any CPU + {79A2178B-D3D2-4E1A-94E7-4856FFC23287}.Debug|x64.Build.0 = Debug|Any CPU + {79A2178B-D3D2-4E1A-94E7-4856FFC23287}.Debug|x86.ActiveCfg = Debug|Any CPU + {79A2178B-D3D2-4E1A-94E7-4856FFC23287}.Debug|x86.Build.0 = Debug|Any CPU + {79A2178B-D3D2-4E1A-94E7-4856FFC23287}.Release|Any CPU.ActiveCfg = Release|Any CPU + {79A2178B-D3D2-4E1A-94E7-4856FFC23287}.Release|Any CPU.Build.0 = Release|Any CPU + {79A2178B-D3D2-4E1A-94E7-4856FFC23287}.Release|arm.ActiveCfg = Release|Any CPU + {79A2178B-D3D2-4E1A-94E7-4856FFC23287}.Release|arm64.ActiveCfg = Release|Any CPU + {79A2178B-D3D2-4E1A-94E7-4856FFC23287}.Release|x64.ActiveCfg = Release|Any CPU + {79A2178B-D3D2-4E1A-94E7-4856FFC23287}.Release|x64.Build.0 = Release|Any CPU + {79A2178B-D3D2-4E1A-94E7-4856FFC23287}.Release|x86.ActiveCfg = Release|Any CPU + {79A2178B-D3D2-4E1A-94E7-4856FFC23287}.Release|x86.Build.0 = Release|Any CPU + {79A2178B-D3D2-4E1A-94E7-4856FFC23287}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {79A2178B-D3D2-4E1A-94E7-4856FFC23287}.Checked|arm.ActiveCfg = Debug|Any CPU + {79A2178B-D3D2-4E1A-94E7-4856FFC23287}.Checked|arm64.ActiveCfg = Debug|Any CPU + {79A2178B-D3D2-4E1A-94E7-4856FFC23287}.Checked|x64.ActiveCfg = Debug|Any CPU + {79A2178B-D3D2-4E1A-94E7-4856FFC23287}.Checked|x86.ActiveCfg = Debug|Any CPU + {09E789AC-BEF7-48C9-8461-0D8C8E17E31F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {09E789AC-BEF7-48C9-8461-0D8C8E17E31F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {09E789AC-BEF7-48C9-8461-0D8C8E17E31F}.Debug|arm.ActiveCfg = Debug|Any CPU + {09E789AC-BEF7-48C9-8461-0D8C8E17E31F}.Debug|arm64.ActiveCfg = Debug|Any CPU + {09E789AC-BEF7-48C9-8461-0D8C8E17E31F}.Debug|x64.ActiveCfg = Debug|Any CPU + {09E789AC-BEF7-48C9-8461-0D8C8E17E31F}.Debug|x64.Build.0 = Debug|Any CPU + {09E789AC-BEF7-48C9-8461-0D8C8E17E31F}.Debug|x86.ActiveCfg = Debug|Any CPU + {09E789AC-BEF7-48C9-8461-0D8C8E17E31F}.Debug|x86.Build.0 = Debug|Any CPU + {09E789AC-BEF7-48C9-8461-0D8C8E17E31F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {09E789AC-BEF7-48C9-8461-0D8C8E17E31F}.Release|Any CPU.Build.0 = Release|Any CPU + {09E789AC-BEF7-48C9-8461-0D8C8E17E31F}.Release|arm.ActiveCfg = Release|Any CPU + {09E789AC-BEF7-48C9-8461-0D8C8E17E31F}.Release|arm64.ActiveCfg = Release|Any CPU + {09E789AC-BEF7-48C9-8461-0D8C8E17E31F}.Release|x64.ActiveCfg = Release|Any CPU + {09E789AC-BEF7-48C9-8461-0D8C8E17E31F}.Release|x64.Build.0 = Release|Any CPU + {09E789AC-BEF7-48C9-8461-0D8C8E17E31F}.Release|x86.ActiveCfg = Release|Any CPU + {09E789AC-BEF7-48C9-8461-0D8C8E17E31F}.Release|x86.Build.0 = Release|Any CPU + {09E789AC-BEF7-48C9-8461-0D8C8E17E31F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {09E789AC-BEF7-48C9-8461-0D8C8E17E31F}.Checked|arm.ActiveCfg = Debug|Any CPU + {09E789AC-BEF7-48C9-8461-0D8C8E17E31F}.Checked|arm64.ActiveCfg = Debug|Any CPU + {09E789AC-BEF7-48C9-8461-0D8C8E17E31F}.Checked|x64.ActiveCfg = Debug|Any CPU + {09E789AC-BEF7-48C9-8461-0D8C8E17E31F}.Checked|x86.ActiveCfg = Debug|Any CPU + {BB492CB7-6474-4A4B-880A-E4ABC60E0718}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BB492CB7-6474-4A4B-880A-E4ABC60E0718}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BB492CB7-6474-4A4B-880A-E4ABC60E0718}.Debug|arm.ActiveCfg = Debug|Any CPU + {BB492CB7-6474-4A4B-880A-E4ABC60E0718}.Debug|arm64.ActiveCfg = Debug|Any CPU + {BB492CB7-6474-4A4B-880A-E4ABC60E0718}.Debug|x64.ActiveCfg = Debug|Any CPU + {BB492CB7-6474-4A4B-880A-E4ABC60E0718}.Debug|x64.Build.0 = Debug|Any CPU + {BB492CB7-6474-4A4B-880A-E4ABC60E0718}.Debug|x86.ActiveCfg = Debug|Any CPU + {BB492CB7-6474-4A4B-880A-E4ABC60E0718}.Debug|x86.Build.0 = Debug|Any CPU + {BB492CB7-6474-4A4B-880A-E4ABC60E0718}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BB492CB7-6474-4A4B-880A-E4ABC60E0718}.Release|Any CPU.Build.0 = Release|Any CPU + {BB492CB7-6474-4A4B-880A-E4ABC60E0718}.Release|arm.ActiveCfg = Release|Any CPU + {BB492CB7-6474-4A4B-880A-E4ABC60E0718}.Release|arm64.ActiveCfg = Release|Any CPU + {BB492CB7-6474-4A4B-880A-E4ABC60E0718}.Release|x64.ActiveCfg = Release|Any CPU + {BB492CB7-6474-4A4B-880A-E4ABC60E0718}.Release|x64.Build.0 = Release|Any CPU + {BB492CB7-6474-4A4B-880A-E4ABC60E0718}.Release|x86.ActiveCfg = Release|Any CPU + {BB492CB7-6474-4A4B-880A-E4ABC60E0718}.Release|x86.Build.0 = Release|Any CPU + {BB492CB7-6474-4A4B-880A-E4ABC60E0718}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {BB492CB7-6474-4A4B-880A-E4ABC60E0718}.Checked|arm.ActiveCfg = Debug|Any CPU + {BB492CB7-6474-4A4B-880A-E4ABC60E0718}.Checked|arm64.ActiveCfg = Debug|Any CPU + {BB492CB7-6474-4A4B-880A-E4ABC60E0718}.Checked|x64.ActiveCfg = Debug|Any CPU + {BB492CB7-6474-4A4B-880A-E4ABC60E0718}.Checked|x86.ActiveCfg = Debug|Any CPU + {7E29F73C-D2DE-4DA4-B399-F6A2475A11EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7E29F73C-D2DE-4DA4-B399-F6A2475A11EC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7E29F73C-D2DE-4DA4-B399-F6A2475A11EC}.Debug|arm.ActiveCfg = Debug|Any CPU + {7E29F73C-D2DE-4DA4-B399-F6A2475A11EC}.Debug|arm64.ActiveCfg = Debug|Any CPU + {7E29F73C-D2DE-4DA4-B399-F6A2475A11EC}.Debug|x64.ActiveCfg = Debug|Any CPU + {7E29F73C-D2DE-4DA4-B399-F6A2475A11EC}.Debug|x64.Build.0 = Debug|Any CPU + {7E29F73C-D2DE-4DA4-B399-F6A2475A11EC}.Debug|x86.ActiveCfg = Debug|Any CPU + {7E29F73C-D2DE-4DA4-B399-F6A2475A11EC}.Debug|x86.Build.0 = Debug|Any CPU + {7E29F73C-D2DE-4DA4-B399-F6A2475A11EC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7E29F73C-D2DE-4DA4-B399-F6A2475A11EC}.Release|Any CPU.Build.0 = Release|Any CPU + {7E29F73C-D2DE-4DA4-B399-F6A2475A11EC}.Release|arm.ActiveCfg = Release|Any CPU + {7E29F73C-D2DE-4DA4-B399-F6A2475A11EC}.Release|arm64.ActiveCfg = Release|Any CPU + {7E29F73C-D2DE-4DA4-B399-F6A2475A11EC}.Release|x64.ActiveCfg = Release|Any CPU + {7E29F73C-D2DE-4DA4-B399-F6A2475A11EC}.Release|x64.Build.0 = Release|Any CPU + {7E29F73C-D2DE-4DA4-B399-F6A2475A11EC}.Release|x86.ActiveCfg = Release|Any CPU + {7E29F73C-D2DE-4DA4-B399-F6A2475A11EC}.Release|x86.Build.0 = Release|Any CPU + {7E29F73C-D2DE-4DA4-B399-F6A2475A11EC}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {7E29F73C-D2DE-4DA4-B399-F6A2475A11EC}.Checked|arm.ActiveCfg = Debug|Any CPU + {7E29F73C-D2DE-4DA4-B399-F6A2475A11EC}.Checked|arm64.ActiveCfg = Debug|Any CPU + {7E29F73C-D2DE-4DA4-B399-F6A2475A11EC}.Checked|x64.ActiveCfg = Debug|Any CPU + {7E29F73C-D2DE-4DA4-B399-F6A2475A11EC}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution + {78128772-D609-4144-8654-6D8403DEF0C9} = {02C30DE1-6A8F-402C-B137-EDEFBF1AE807} {174DC291-4C4A-41D0-B351-8054872AB46A} = {2195CD2B-EF9E-46A7-B4AA-A2CD31625957} {F4A98D66-BA15-4C42-94A9-4732965A969A} = {2195CD2B-EF9E-46A7-B4AA-A2CD31625957} - {464BD919-594A-4662-B061-D028CB8F3556} = {F5B0A1AE-8B97-4B49-B5C8-8E63C6FAAED3} - {51182FA9-71D8-48D4-8461-63A04EDFDF77} = {F5B0A1AE-8B97-4B49-B5C8-8E63C6FAAED3} + {42F8E509-4629-4FE6-8E55-02E272D0209E} = {CF5D1CDD-1A13-475D-BD12-13202A620D8A} + {8BEA8A00-B086-45A7-B21A-0E58A1542D06} = {CF5D1CDD-1A13-475D-BD12-13202A620D8A} {F826EEA7-C53C-4C46-8715-D3E9FACB9ED5} = {CF5D1CDD-1A13-475D-BD12-13202A620D8A} + {E6F71289-D9DC-439E-9093-9ECA2E533564} = {CF5D1CDD-1A13-475D-BD12-13202A620D8A} {0174A61A-7E2B-47FC-9CB7-E9EABB898820} = {CF5D1CDD-1A13-475D-BD12-13202A620D8A} - {C9A138C9-DFBA-4034-867B-CA68368F84A5} = {6DCAB55C-A3EE-46AB-94C0-57DBE27E2A22} + {C5F4AA26-CCDF-474B-911F-8204E69FC622} = {6DCAB55C-A3EE-46AB-94C0-57DBE27E2A22} {1C4E0357-1AA5-4DD4-B38F-2A2D10DE7872} = {6DCAB55C-A3EE-46AB-94C0-57DBE27E2A22} {E6F1606F-5731-44BA-B9F9-8FE32E2A4D84} = {6DCAB55C-A3EE-46AB-94C0-57DBE27E2A22} + {2620A6B7-AC32-4B19-A933-30AC1EBE8BFC} = {F5B0A1AE-8B97-4B49-B5C8-8E63C6FAAED3} + {464BD919-594A-4662-B061-D028CB8F3556} = {F5B0A1AE-8B97-4B49-B5C8-8E63C6FAAED3} + {7D904627-2671-4790-81DB-FA1FDA20CE83} = {F5B0A1AE-8B97-4B49-B5C8-8E63C6FAAED3} + {51182FA9-71D8-48D4-8461-63A04EDFDF77} = {F5B0A1AE-8B97-4B49-B5C8-8E63C6FAAED3} + {9CA5EAB9-D6EA-428D-A7C9-9E5901293123} = {CB23059A-3642-4B70-84F3-5D5BD57E0561} + {79A2178B-D3D2-4E1A-94E7-4856FFC23287} = {CB23059A-3642-4B70-84F3-5D5BD57E0561} + {CB23059A-3642-4B70-84F3-5D5BD57E0561} = {7FF9B3DF-E383-4487-9ADB-E3BF59CFCE83} + {09E789AC-BEF7-48C9-8461-0D8C8E17E31F} = {BE197124-901B-4517-879B-93D0E6684A2C} + {BB492CB7-6474-4A4B-880A-E4ABC60E0718} = {BE197124-901B-4517-879B-93D0E6684A2C} + {BE197124-901B-4517-879B-93D0E6684A2C} = {7FF9B3DF-E383-4487-9ADB-E3BF59CFCE83} + {7E29F73C-D2DE-4DA4-B399-F6A2475A11EC} = {DB598308-6179-48EA-A670-0DA6CE5D8340} + {DB598308-6179-48EA-A670-0DA6CE5D8340} = {7FF9B3DF-E383-4487-9ADB-E3BF59CFCE83} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {E201426B-999F-48A5-BCFD-3E757AA0E182} diff --git a/src/libraries/System.Resources.Extensions/src/CompatibilitySuppressions.xml b/src/libraries/System.Resources.Extensions/src/CompatibilitySuppressions.xml new file mode 100644 index 00000000000000..6e7de3217311ae --- /dev/null +++ b/src/libraries/System.Resources.Extensions/src/CompatibilitySuppressions.xml @@ -0,0 +1,46 @@ + + + + + CP0014 + M:System.Resources.Extensions.PreserializedResourceWriter.AddBinaryFormattedResource(System.String,System.Byte[],System.String):[T:System.ObsoleteAttribute] + lib/net6.0/System.Resources.Extensions.dll + lib/netstandard2.0/System.Resources.Extensions.dll + true + + + CP0014 + M:System.Resources.Extensions.PreserializedResourceWriter.AddBinaryFormattedResource(System.String,System.Byte[],System.String):[T:System.ObsoleteAttribute] + lib/net7.0/System.Resources.Extensions.dll + lib/netstandard2.0/System.Resources.Extensions.dll + true + + + CP1002 + System.Resources.Writer, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.Resources.Extensions.dll + lib/netstandard2.0/System.Resources.Extensions.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.Resources.Extensions.dll + lib/netstandard2.0/System.Resources.Extensions.dll + true + + + CP1002 + System.Resources.Writer, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.Resources.Extensions.dll + lib/netstandard2.0/System.Resources.Extensions.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.Resources.Extensions.dll + lib/netstandard2.0/System.Resources.Extensions.dll + true + + \ No newline at end of file diff --git a/src/libraries/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj b/src/libraries/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj index 858f594cbd98bf..c1b004ee91105b 100644 --- a/src/libraries/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj +++ b/src/libraries/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj @@ -32,7 +32,7 @@ Important: When invoking this target, pass the target framework in as well, substituting the X with the current major version: - dotnet build -f netX.0-windows /t:GenerateTestResourcesFile. --> + dotnet build -f netX.0-windows && cd outputdir && dotnet build -f netX.0-windows /t:GenerateTestResourcesFile. --> <_executor>Microsoft.DotNet.RemoteExecutor.dll diff --git a/src/libraries/System.Resources.Extensions/tests/TestData.resources b/src/libraries/System.Resources.Extensions/tests/TestData.resources index 00f4f0b1aff01d..10efbf9fd4044c 100644 Binary files a/src/libraries/System.Resources.Extensions/tests/TestData.resources and b/src/libraries/System.Resources.Extensions/tests/TestData.resources differ diff --git a/src/libraries/System.Resources.Writer/System.Resources.Writer.sln b/src/libraries/System.Resources.Writer/System.Resources.Writer.sln index b319e7987a9e39..696d00e0d58570 100644 --- a/src/libraries/System.Resources.Writer/System.Resources.Writer.sln +++ b/src/libraries/System.Resources.Writer/System.Resources.Writer.sln @@ -13,6 +13,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{45BE69F2-B543-4056-AF6C-6A711949A7FA}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{F3E0DF20-021F-420C-BB37-D0DDC5BBC58A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{B2EE67CB-0282-4C1D-8EFE-F09897906C83}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{30717787-C0F6-44EB-8641-3B4DE34632FF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{4E445087-0002-4D0B-AE42-DBC80B7E2F87}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{45F5742D-D961-48B0-8899-6CA5A75E249F}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{112C54A1-881D-4EE7-A279-DC719E667CFF}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{36F1D0ED-0960-4B7E-832F-F2A304803FC3}" @@ -21,6 +31,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E6EE9961-9C9 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{AB6CB51B-36BD-4444-BB33-86DADD78045C}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{5A32D0DE-B833-4139-86DD-EA6B71B3AEED}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{DF43DAC0-6BBF-4CEA-A07C-AA8798B8FA94}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{6A17AA93-018D-4103-8C59-E71D238EAA48}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{8BB9FEEB-1F0D-44CA-AB68-640CDFE8AD9B}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -55,6 +73,26 @@ Global {45BE69F2-B543-4056-AF6C-6A711949A7FA}.Debug|Any CPU.Build.0 = Debug|Any CPU {45BE69F2-B543-4056-AF6C-6A711949A7FA}.Release|Any CPU.ActiveCfg = Release|Any CPU {45BE69F2-B543-4056-AF6C-6A711949A7FA}.Release|Any CPU.Build.0 = Release|Any CPU + {F3E0DF20-021F-420C-BB37-D0DDC5BBC58A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F3E0DF20-021F-420C-BB37-D0DDC5BBC58A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F3E0DF20-021F-420C-BB37-D0DDC5BBC58A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F3E0DF20-021F-420C-BB37-D0DDC5BBC58A}.Release|Any CPU.Build.0 = Release|Any CPU + {B2EE67CB-0282-4C1D-8EFE-F09897906C83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B2EE67CB-0282-4C1D-8EFE-F09897906C83}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B2EE67CB-0282-4C1D-8EFE-F09897906C83}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B2EE67CB-0282-4C1D-8EFE-F09897906C83}.Release|Any CPU.Build.0 = Release|Any CPU + {30717787-C0F6-44EB-8641-3B4DE34632FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {30717787-C0F6-44EB-8641-3B4DE34632FF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {30717787-C0F6-44EB-8641-3B4DE34632FF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {30717787-C0F6-44EB-8641-3B4DE34632FF}.Release|Any CPU.Build.0 = Release|Any CPU + {4E445087-0002-4D0B-AE42-DBC80B7E2F87}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4E445087-0002-4D0B-AE42-DBC80B7E2F87}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4E445087-0002-4D0B-AE42-DBC80B7E2F87}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4E445087-0002-4D0B-AE42-DBC80B7E2F87}.Release|Any CPU.Build.0 = Release|Any CPU + {45F5742D-D961-48B0-8899-6CA5A75E249F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {45F5742D-D961-48B0-8899-6CA5A75E249F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {45F5742D-D961-48B0-8899-6CA5A75E249F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {45F5742D-D961-48B0-8899-6CA5A75E249F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -67,6 +105,14 @@ Global {1C001837-6F9D-4C5A-94B4-4388225C34B5} = {E6EE9961-9C9A-4935-8AE2-18316677F47F} {5596D7DF-5577-4349-A688-0B014626A7E4} = {AB6CB51B-36BD-4444-BB33-86DADD78045C} {4EA24626-EACB-49F0-92EC-89502E566053} = {AB6CB51B-36BD-4444-BB33-86DADD78045C} + {F3E0DF20-021F-420C-BB37-D0DDC5BBC58A} = {5A32D0DE-B833-4139-86DD-EA6B71B3AEED} + {B2EE67CB-0282-4C1D-8EFE-F09897906C83} = {5A32D0DE-B833-4139-86DD-EA6B71B3AEED} + {5A32D0DE-B833-4139-86DD-EA6B71B3AEED} = {8BB9FEEB-1F0D-44CA-AB68-640CDFE8AD9B} + {30717787-C0F6-44EB-8641-3B4DE34632FF} = {DF43DAC0-6BBF-4CEA-A07C-AA8798B8FA94} + {4E445087-0002-4D0B-AE42-DBC80B7E2F87} = {DF43DAC0-6BBF-4CEA-A07C-AA8798B8FA94} + {DF43DAC0-6BBF-4CEA-A07C-AA8798B8FA94} = {8BB9FEEB-1F0D-44CA-AB68-640CDFE8AD9B} + {45F5742D-D961-48B0-8899-6CA5A75E249F} = {6A17AA93-018D-4103-8C59-E71D238EAA48} + {6A17AA93-018D-4103-8C59-E71D238EAA48} = {8BB9FEEB-1F0D-44CA-AB68-640CDFE8AD9B} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C1D84753-65B5-4B60-A555-3507CD4FDAB2} diff --git a/src/libraries/System.Runtime.Caching/System.Runtime.Caching.sln b/src/libraries/System.Runtime.Caching/System.Runtime.Caching.sln index 5c75bc24e992b9..436ee74a19e205 100644 --- a/src/libraries/System.Runtime.Caching/System.Runtime.Caching.sln +++ b/src/libraries/System.Runtime.Caching/System.Runtime.Caching.sln @@ -1,6 +1,10 @@ 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", "{537CECFF-20AE-4AD4-A433-C1753A88E4E8}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{4DD7C7A6-6F4C-497B-A836-20F2D4F66748}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Drawing.Common", "..\shims\stubs\System.Drawing.Common.csproj", "{6DBEA1D1-448D-4C27-B329-19F4F214E536}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Configuration.ConfigurationManager", "..\System.Configuration.ConfigurationManager\ref\System.Configuration.ConfigurationManager.csproj", "{D2CB0E92-8F52-49A3-A2CA-9F77C8ED4A6D}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Configuration.ConfigurationManager", "..\System.Configuration.ConfigurationManager\src\System.Configuration.ConfigurationManager.csproj", "{2AC9B23C-C788-4607-86EB-E7F66F14AFDB}" @@ -11,18 +15,26 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.EventLog 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.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{7D95B81C-25A6-4E6A-88E9-A8BBE59538BE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{2F5E19AA-B790-403E-860E-2569CC1ADF02}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.Uri", "..\System.Private.Uri\src\System.Private.Uri.csproj", "{A4864A61-7A24-4FE6-9C55-76A645D41BCE}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Caching", "ref\System.Runtime.Caching.csproj", "{B8D8A7D0-EAE7-4D04-97CA-7B14DA9D0BD5}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Caching", "src\System.Runtime.Caching.csproj", "{6311C025-F6D3-43A0-A9DA-A58AA6602568}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Caching.Tests", "tests\System.Runtime.Caching.Tests.csproj", "{AA05074D-88AF-482E-A44A-F1AC13494E9F}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{3C11A5D8-BCFD-465D-93F2-100CF6382A17}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{B76EE305-CA7C-494C-8374-ABD93081F6AE}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{447797DB-DF70-4568-A323-F88A45A91026}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{CC3E8A04-504D-438A-B332-C27DD7783A33}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\src\System.Runtime.csproj", "{2D833530-E133-4ACF-9C1C-12A9623DEE56}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography.ProtectedData", "..\System.Security.Cryptography.ProtectedData\ref\System.Security.Cryptography.ProtectedData.csproj", "{986272FB-E5C6-4881-9867-DC3427D883AE}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography.ProtectedData", "..\System.Security.Cryptography.ProtectedData\src\System.Security.Cryptography.ProtectedData.csproj", "{AFBFBBE6-F5EC-4889-9F34-03E07562630D}" @@ -35,115 +47,708 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", "..\System.Windows.Extensions\src\System.Windows.Extensions.csproj", "{EC5D61F1-E77B-4E3D-968C-710FCFB9E028}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{28BE2B3F-890C-45EF-B90A-9FA92302365E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{EA4D9319-C5FB-4829-BB2F-E0FAA1DE79E3}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{C315269F-EEA6-4F74-BA10-65ECAA6351C8}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{FDBA4009-E8BE-4E64-8121-FBA67E0B8455}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{4CD58207-3CDE-4C05-978E-FE75F544B2C5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{5A99AE6A-15BE-4F29-BDC3-C1868750F891}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{88BF890E-ED98-4505-8710-F9FB3DE5CE64}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{31DE693C-394A-461E-918B-2F3FEC37FBCC}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{28BE2B3F-890C-45EF-B90A-9FA92302365E}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{7CAD8D92-ABBF-4ED8-ACF7-7121F99F89EC}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{C315269F-EEA6-4F74-BA10-65ECAA6351C8}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{5E28270B-1EEB-4D0E-9A3C-6959BEA9647E}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{191AA172-B1CF-40FE-8B10-707FF5A6684F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{5C5F1A98-51A5-4FDF-A61A-179A5D37E03D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{A04A3FBF-112F-4D5B-84B1-886DD1D8086A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{A278FE36-D732-4708-978F-C47FEC428E1D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|arm = Debug|arm + Debug|arm64 = Debug|arm64 + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|arm = Release|arm + Release|arm64 = Release|arm64 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + Checked|Any CPU = Checked|Any CPU + Checked|arm = Checked|arm + Checked|arm64 = Checked|arm64 + Checked|x64 = Checked|x64 + Checked|x86 = Checked|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {537CECFF-20AE-4AD4-A433-C1753A88E4E8}.Debug|Any CPU.ActiveCfg = Debug|x64 + {537CECFF-20AE-4AD4-A433-C1753A88E4E8}.Debug|Any CPU.Build.0 = Debug|x64 + {537CECFF-20AE-4AD4-A433-C1753A88E4E8}.Debug|arm.ActiveCfg = Debug|arm + {537CECFF-20AE-4AD4-A433-C1753A88E4E8}.Debug|arm.Build.0 = Debug|arm + {537CECFF-20AE-4AD4-A433-C1753A88E4E8}.Debug|arm64.ActiveCfg = Debug|arm64 + {537CECFF-20AE-4AD4-A433-C1753A88E4E8}.Debug|arm64.Build.0 = Debug|arm64 + {537CECFF-20AE-4AD4-A433-C1753A88E4E8}.Debug|x64.ActiveCfg = Debug|x64 + {537CECFF-20AE-4AD4-A433-C1753A88E4E8}.Debug|x64.Build.0 = Debug|x64 + {537CECFF-20AE-4AD4-A433-C1753A88E4E8}.Debug|x86.ActiveCfg = Debug|x86 + {537CECFF-20AE-4AD4-A433-C1753A88E4E8}.Debug|x86.Build.0 = Debug|x86 + {537CECFF-20AE-4AD4-A433-C1753A88E4E8}.Release|Any CPU.ActiveCfg = Release|x64 + {537CECFF-20AE-4AD4-A433-C1753A88E4E8}.Release|Any CPU.Build.0 = Release|x64 + {537CECFF-20AE-4AD4-A433-C1753A88E4E8}.Release|arm.ActiveCfg = Release|arm + {537CECFF-20AE-4AD4-A433-C1753A88E4E8}.Release|arm.Build.0 = Release|arm + {537CECFF-20AE-4AD4-A433-C1753A88E4E8}.Release|arm64.ActiveCfg = Release|arm64 + {537CECFF-20AE-4AD4-A433-C1753A88E4E8}.Release|arm64.Build.0 = Release|arm64 + {537CECFF-20AE-4AD4-A433-C1753A88E4E8}.Release|x64.ActiveCfg = Release|x64 + {537CECFF-20AE-4AD4-A433-C1753A88E4E8}.Release|x64.Build.0 = Release|x64 + {537CECFF-20AE-4AD4-A433-C1753A88E4E8}.Release|x86.ActiveCfg = Release|x86 + {537CECFF-20AE-4AD4-A433-C1753A88E4E8}.Release|x86.Build.0 = Release|x86 + {537CECFF-20AE-4AD4-A433-C1753A88E4E8}.Checked|Any CPU.ActiveCfg = Checked|x64 + {537CECFF-20AE-4AD4-A433-C1753A88E4E8}.Checked|Any CPU.Build.0 = Checked|x64 + {537CECFF-20AE-4AD4-A433-C1753A88E4E8}.Checked|arm.ActiveCfg = Checked|arm + {537CECFF-20AE-4AD4-A433-C1753A88E4E8}.Checked|arm.Build.0 = Checked|arm + {537CECFF-20AE-4AD4-A433-C1753A88E4E8}.Checked|arm64.ActiveCfg = Checked|arm64 + {537CECFF-20AE-4AD4-A433-C1753A88E4E8}.Checked|arm64.Build.0 = Checked|arm64 + {537CECFF-20AE-4AD4-A433-C1753A88E4E8}.Checked|x64.ActiveCfg = Checked|x64 + {537CECFF-20AE-4AD4-A433-C1753A88E4E8}.Checked|x64.Build.0 = Checked|x64 + {537CECFF-20AE-4AD4-A433-C1753A88E4E8}.Checked|x86.ActiveCfg = Checked|x86 + {537CECFF-20AE-4AD4-A433-C1753A88E4E8}.Checked|x86.Build.0 = Checked|x86 {4DD7C7A6-6F4C-497B-A836-20F2D4F66748}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4DD7C7A6-6F4C-497B-A836-20F2D4F66748}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4DD7C7A6-6F4C-497B-A836-20F2D4F66748}.Debug|arm.ActiveCfg = Debug|Any CPU + {4DD7C7A6-6F4C-497B-A836-20F2D4F66748}.Debug|arm64.ActiveCfg = Debug|Any CPU + {4DD7C7A6-6F4C-497B-A836-20F2D4F66748}.Debug|x64.ActiveCfg = Debug|Any CPU + {4DD7C7A6-6F4C-497B-A836-20F2D4F66748}.Debug|x64.Build.0 = Debug|Any CPU + {4DD7C7A6-6F4C-497B-A836-20F2D4F66748}.Debug|x86.ActiveCfg = Debug|Any CPU + {4DD7C7A6-6F4C-497B-A836-20F2D4F66748}.Debug|x86.Build.0 = Debug|Any CPU {4DD7C7A6-6F4C-497B-A836-20F2D4F66748}.Release|Any CPU.ActiveCfg = Release|Any CPU {4DD7C7A6-6F4C-497B-A836-20F2D4F66748}.Release|Any CPU.Build.0 = Release|Any CPU + {4DD7C7A6-6F4C-497B-A836-20F2D4F66748}.Release|arm.ActiveCfg = Release|Any CPU + {4DD7C7A6-6F4C-497B-A836-20F2D4F66748}.Release|arm64.ActiveCfg = Release|Any CPU + {4DD7C7A6-6F4C-497B-A836-20F2D4F66748}.Release|x64.ActiveCfg = Release|Any CPU + {4DD7C7A6-6F4C-497B-A836-20F2D4F66748}.Release|x64.Build.0 = Release|Any CPU + {4DD7C7A6-6F4C-497B-A836-20F2D4F66748}.Release|x86.ActiveCfg = Release|Any CPU + {4DD7C7A6-6F4C-497B-A836-20F2D4F66748}.Release|x86.Build.0 = Release|Any CPU + {4DD7C7A6-6F4C-497B-A836-20F2D4F66748}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {4DD7C7A6-6F4C-497B-A836-20F2D4F66748}.Checked|arm.ActiveCfg = Debug|Any CPU + {4DD7C7A6-6F4C-497B-A836-20F2D4F66748}.Checked|arm64.ActiveCfg = Debug|Any CPU + {4DD7C7A6-6F4C-497B-A836-20F2D4F66748}.Checked|x64.ActiveCfg = Debug|Any CPU + {4DD7C7A6-6F4C-497B-A836-20F2D4F66748}.Checked|x86.ActiveCfg = Debug|Any CPU + {6DBEA1D1-448D-4C27-B329-19F4F214E536}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6DBEA1D1-448D-4C27-B329-19F4F214E536}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6DBEA1D1-448D-4C27-B329-19F4F214E536}.Debug|arm.ActiveCfg = Debug|Any CPU + {6DBEA1D1-448D-4C27-B329-19F4F214E536}.Debug|arm64.ActiveCfg = Debug|Any CPU + {6DBEA1D1-448D-4C27-B329-19F4F214E536}.Debug|x64.ActiveCfg = Debug|Any CPU + {6DBEA1D1-448D-4C27-B329-19F4F214E536}.Debug|x64.Build.0 = Debug|Any CPU + {6DBEA1D1-448D-4C27-B329-19F4F214E536}.Debug|x86.ActiveCfg = Debug|Any CPU + {6DBEA1D1-448D-4C27-B329-19F4F214E536}.Debug|x86.Build.0 = Debug|Any CPU + {6DBEA1D1-448D-4C27-B329-19F4F214E536}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6DBEA1D1-448D-4C27-B329-19F4F214E536}.Release|Any CPU.Build.0 = Release|Any CPU + {6DBEA1D1-448D-4C27-B329-19F4F214E536}.Release|arm.ActiveCfg = Release|Any CPU + {6DBEA1D1-448D-4C27-B329-19F4F214E536}.Release|arm64.ActiveCfg = Release|Any CPU + {6DBEA1D1-448D-4C27-B329-19F4F214E536}.Release|x64.ActiveCfg = Release|Any CPU + {6DBEA1D1-448D-4C27-B329-19F4F214E536}.Release|x64.Build.0 = Release|Any CPU + {6DBEA1D1-448D-4C27-B329-19F4F214E536}.Release|x86.ActiveCfg = Release|Any CPU + {6DBEA1D1-448D-4C27-B329-19F4F214E536}.Release|x86.Build.0 = Release|Any CPU + {6DBEA1D1-448D-4C27-B329-19F4F214E536}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {6DBEA1D1-448D-4C27-B329-19F4F214E536}.Checked|arm.ActiveCfg = Debug|Any CPU + {6DBEA1D1-448D-4C27-B329-19F4F214E536}.Checked|arm64.ActiveCfg = Debug|Any CPU + {6DBEA1D1-448D-4C27-B329-19F4F214E536}.Checked|x64.ActiveCfg = Debug|Any CPU + {6DBEA1D1-448D-4C27-B329-19F4F214E536}.Checked|x86.ActiveCfg = Debug|Any CPU {D2CB0E92-8F52-49A3-A2CA-9F77C8ED4A6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D2CB0E92-8F52-49A3-A2CA-9F77C8ED4A6D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D2CB0E92-8F52-49A3-A2CA-9F77C8ED4A6D}.Debug|arm.ActiveCfg = Debug|Any CPU + {D2CB0E92-8F52-49A3-A2CA-9F77C8ED4A6D}.Debug|arm64.ActiveCfg = Debug|Any CPU + {D2CB0E92-8F52-49A3-A2CA-9F77C8ED4A6D}.Debug|x64.ActiveCfg = Debug|Any CPU + {D2CB0E92-8F52-49A3-A2CA-9F77C8ED4A6D}.Debug|x64.Build.0 = Debug|Any CPU + {D2CB0E92-8F52-49A3-A2CA-9F77C8ED4A6D}.Debug|x86.ActiveCfg = Debug|Any CPU + {D2CB0E92-8F52-49A3-A2CA-9F77C8ED4A6D}.Debug|x86.Build.0 = Debug|Any CPU {D2CB0E92-8F52-49A3-A2CA-9F77C8ED4A6D}.Release|Any CPU.ActiveCfg = Release|Any CPU {D2CB0E92-8F52-49A3-A2CA-9F77C8ED4A6D}.Release|Any CPU.Build.0 = Release|Any CPU + {D2CB0E92-8F52-49A3-A2CA-9F77C8ED4A6D}.Release|arm.ActiveCfg = Release|Any CPU + {D2CB0E92-8F52-49A3-A2CA-9F77C8ED4A6D}.Release|arm64.ActiveCfg = Release|Any CPU + {D2CB0E92-8F52-49A3-A2CA-9F77C8ED4A6D}.Release|x64.ActiveCfg = Release|Any CPU + {D2CB0E92-8F52-49A3-A2CA-9F77C8ED4A6D}.Release|x64.Build.0 = Release|Any CPU + {D2CB0E92-8F52-49A3-A2CA-9F77C8ED4A6D}.Release|x86.ActiveCfg = Release|Any CPU + {D2CB0E92-8F52-49A3-A2CA-9F77C8ED4A6D}.Release|x86.Build.0 = Release|Any CPU + {D2CB0E92-8F52-49A3-A2CA-9F77C8ED4A6D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {D2CB0E92-8F52-49A3-A2CA-9F77C8ED4A6D}.Checked|arm.ActiveCfg = Debug|Any CPU + {D2CB0E92-8F52-49A3-A2CA-9F77C8ED4A6D}.Checked|arm64.ActiveCfg = Debug|Any CPU + {D2CB0E92-8F52-49A3-A2CA-9F77C8ED4A6D}.Checked|x64.ActiveCfg = Debug|Any CPU + {D2CB0E92-8F52-49A3-A2CA-9F77C8ED4A6D}.Checked|x86.ActiveCfg = Debug|Any CPU {2AC9B23C-C788-4607-86EB-E7F66F14AFDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AC9B23C-C788-4607-86EB-E7F66F14AFDB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2AC9B23C-C788-4607-86EB-E7F66F14AFDB}.Debug|arm.ActiveCfg = Debug|Any CPU + {2AC9B23C-C788-4607-86EB-E7F66F14AFDB}.Debug|arm64.ActiveCfg = Debug|Any CPU + {2AC9B23C-C788-4607-86EB-E7F66F14AFDB}.Debug|x64.ActiveCfg = Debug|Any CPU + {2AC9B23C-C788-4607-86EB-E7F66F14AFDB}.Debug|x64.Build.0 = Debug|Any CPU + {2AC9B23C-C788-4607-86EB-E7F66F14AFDB}.Debug|x86.ActiveCfg = Debug|Any CPU + {2AC9B23C-C788-4607-86EB-E7F66F14AFDB}.Debug|x86.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 + {2AC9B23C-C788-4607-86EB-E7F66F14AFDB}.Release|arm.ActiveCfg = Release|Any CPU + {2AC9B23C-C788-4607-86EB-E7F66F14AFDB}.Release|arm64.ActiveCfg = Release|Any CPU + {2AC9B23C-C788-4607-86EB-E7F66F14AFDB}.Release|x64.ActiveCfg = Release|Any CPU + {2AC9B23C-C788-4607-86EB-E7F66F14AFDB}.Release|x64.Build.0 = Release|Any CPU + {2AC9B23C-C788-4607-86EB-E7F66F14AFDB}.Release|x86.ActiveCfg = Release|Any CPU + {2AC9B23C-C788-4607-86EB-E7F66F14AFDB}.Release|x86.Build.0 = Release|Any CPU + {2AC9B23C-C788-4607-86EB-E7F66F14AFDB}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {2AC9B23C-C788-4607-86EB-E7F66F14AFDB}.Checked|arm.ActiveCfg = Debug|Any CPU + {2AC9B23C-C788-4607-86EB-E7F66F14AFDB}.Checked|arm64.ActiveCfg = Debug|Any CPU + {2AC9B23C-C788-4607-86EB-E7F66F14AFDB}.Checked|x64.ActiveCfg = Debug|Any CPU + {2AC9B23C-C788-4607-86EB-E7F66F14AFDB}.Checked|x86.ActiveCfg = Debug|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}.Debug|arm.ActiveCfg = Debug|Any CPU + {7F228E60-0AD6-4CBE-BD88-2D9AFCCE5B16}.Debug|arm64.ActiveCfg = Debug|Any CPU + {7F228E60-0AD6-4CBE-BD88-2D9AFCCE5B16}.Debug|x64.ActiveCfg = Debug|Any CPU + {7F228E60-0AD6-4CBE-BD88-2D9AFCCE5B16}.Debug|x64.Build.0 = Debug|Any CPU + {7F228E60-0AD6-4CBE-BD88-2D9AFCCE5B16}.Debug|x86.ActiveCfg = Debug|Any CPU + {7F228E60-0AD6-4CBE-BD88-2D9AFCCE5B16}.Debug|x86.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 + {7F228E60-0AD6-4CBE-BD88-2D9AFCCE5B16}.Release|arm.ActiveCfg = Release|Any CPU + {7F228E60-0AD6-4CBE-BD88-2D9AFCCE5B16}.Release|arm64.ActiveCfg = Release|Any CPU + {7F228E60-0AD6-4CBE-BD88-2D9AFCCE5B16}.Release|x64.ActiveCfg = Release|Any CPU + {7F228E60-0AD6-4CBE-BD88-2D9AFCCE5B16}.Release|x64.Build.0 = Release|Any CPU + {7F228E60-0AD6-4CBE-BD88-2D9AFCCE5B16}.Release|x86.ActiveCfg = Release|Any CPU + {7F228E60-0AD6-4CBE-BD88-2D9AFCCE5B16}.Release|x86.Build.0 = Release|Any CPU + {7F228E60-0AD6-4CBE-BD88-2D9AFCCE5B16}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {7F228E60-0AD6-4CBE-BD88-2D9AFCCE5B16}.Checked|arm.ActiveCfg = Debug|Any CPU + {7F228E60-0AD6-4CBE-BD88-2D9AFCCE5B16}.Checked|arm64.ActiveCfg = Debug|Any CPU + {7F228E60-0AD6-4CBE-BD88-2D9AFCCE5B16}.Checked|x64.ActiveCfg = Debug|Any CPU + {7F228E60-0AD6-4CBE-BD88-2D9AFCCE5B16}.Checked|x86.ActiveCfg = Debug|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}.Debug|arm.ActiveCfg = Debug|Any CPU + {F4F0D06A-2324-4B3F-A2D2-E74330DA1B7C}.Debug|arm64.ActiveCfg = Debug|Any CPU + {F4F0D06A-2324-4B3F-A2D2-E74330DA1B7C}.Debug|x64.ActiveCfg = Debug|Any CPU + {F4F0D06A-2324-4B3F-A2D2-E74330DA1B7C}.Debug|x64.Build.0 = Debug|Any CPU + {F4F0D06A-2324-4B3F-A2D2-E74330DA1B7C}.Debug|x86.ActiveCfg = Debug|Any CPU + {F4F0D06A-2324-4B3F-A2D2-E74330DA1B7C}.Debug|x86.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 + {F4F0D06A-2324-4B3F-A2D2-E74330DA1B7C}.Release|arm.ActiveCfg = Release|Any CPU + {F4F0D06A-2324-4B3F-A2D2-E74330DA1B7C}.Release|arm64.ActiveCfg = Release|Any CPU + {F4F0D06A-2324-4B3F-A2D2-E74330DA1B7C}.Release|x64.ActiveCfg = Release|Any CPU + {F4F0D06A-2324-4B3F-A2D2-E74330DA1B7C}.Release|x64.Build.0 = Release|Any CPU + {F4F0D06A-2324-4B3F-A2D2-E74330DA1B7C}.Release|x86.ActiveCfg = Release|Any CPU + {F4F0D06A-2324-4B3F-A2D2-E74330DA1B7C}.Release|x86.Build.0 = Release|Any CPU + {F4F0D06A-2324-4B3F-A2D2-E74330DA1B7C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {F4F0D06A-2324-4B3F-A2D2-E74330DA1B7C}.Checked|arm.ActiveCfg = Debug|Any CPU + {F4F0D06A-2324-4B3F-A2D2-E74330DA1B7C}.Checked|arm64.ActiveCfg = Debug|Any CPU + {F4F0D06A-2324-4B3F-A2D2-E74330DA1B7C}.Checked|x64.ActiveCfg = Debug|Any CPU + {F4F0D06A-2324-4B3F-A2D2-E74330DA1B7C}.Checked|x86.ActiveCfg = Debug|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}.Debug|arm.ActiveCfg = Debug|Any CPU + {57970B50-FB9F-40A5-9073-A7A48A473682}.Debug|arm64.ActiveCfg = Debug|Any CPU + {57970B50-FB9F-40A5-9073-A7A48A473682}.Debug|x64.ActiveCfg = Debug|Any CPU + {57970B50-FB9F-40A5-9073-A7A48A473682}.Debug|x64.Build.0 = Debug|Any CPU + {57970B50-FB9F-40A5-9073-A7A48A473682}.Debug|x86.ActiveCfg = Debug|Any CPU + {57970B50-FB9F-40A5-9073-A7A48A473682}.Debug|x86.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 + {57970B50-FB9F-40A5-9073-A7A48A473682}.Release|arm.ActiveCfg = Release|Any CPU + {57970B50-FB9F-40A5-9073-A7A48A473682}.Release|arm64.ActiveCfg = Release|Any CPU + {57970B50-FB9F-40A5-9073-A7A48A473682}.Release|x64.ActiveCfg = Release|Any CPU + {57970B50-FB9F-40A5-9073-A7A48A473682}.Release|x64.Build.0 = Release|Any CPU + {57970B50-FB9F-40A5-9073-A7A48A473682}.Release|x86.ActiveCfg = Release|Any CPU + {57970B50-FB9F-40A5-9073-A7A48A473682}.Release|x86.Build.0 = Release|Any CPU + {57970B50-FB9F-40A5-9073-A7A48A473682}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {57970B50-FB9F-40A5-9073-A7A48A473682}.Checked|arm.ActiveCfg = Debug|Any CPU + {57970B50-FB9F-40A5-9073-A7A48A473682}.Checked|arm64.ActiveCfg = Debug|Any CPU + {57970B50-FB9F-40A5-9073-A7A48A473682}.Checked|x64.ActiveCfg = Debug|Any CPU + {57970B50-FB9F-40A5-9073-A7A48A473682}.Checked|x86.ActiveCfg = Debug|Any CPU + {7D95B81C-25A6-4E6A-88E9-A8BBE59538BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7D95B81C-25A6-4E6A-88E9-A8BBE59538BE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7D95B81C-25A6-4E6A-88E9-A8BBE59538BE}.Debug|arm.ActiveCfg = Debug|Any CPU + {7D95B81C-25A6-4E6A-88E9-A8BBE59538BE}.Debug|arm64.ActiveCfg = Debug|Any CPU + {7D95B81C-25A6-4E6A-88E9-A8BBE59538BE}.Debug|x64.ActiveCfg = Debug|Any CPU + {7D95B81C-25A6-4E6A-88E9-A8BBE59538BE}.Debug|x64.Build.0 = Debug|Any CPU + {7D95B81C-25A6-4E6A-88E9-A8BBE59538BE}.Debug|x86.ActiveCfg = Debug|Any CPU + {7D95B81C-25A6-4E6A-88E9-A8BBE59538BE}.Debug|x86.Build.0 = Debug|Any CPU + {7D95B81C-25A6-4E6A-88E9-A8BBE59538BE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7D95B81C-25A6-4E6A-88E9-A8BBE59538BE}.Release|Any CPU.Build.0 = Release|Any CPU + {7D95B81C-25A6-4E6A-88E9-A8BBE59538BE}.Release|arm.ActiveCfg = Release|Any CPU + {7D95B81C-25A6-4E6A-88E9-A8BBE59538BE}.Release|arm64.ActiveCfg = Release|Any CPU + {7D95B81C-25A6-4E6A-88E9-A8BBE59538BE}.Release|x64.ActiveCfg = Release|Any CPU + {7D95B81C-25A6-4E6A-88E9-A8BBE59538BE}.Release|x64.Build.0 = Release|Any CPU + {7D95B81C-25A6-4E6A-88E9-A8BBE59538BE}.Release|x86.ActiveCfg = Release|Any CPU + {7D95B81C-25A6-4E6A-88E9-A8BBE59538BE}.Release|x86.Build.0 = Release|Any CPU + {7D95B81C-25A6-4E6A-88E9-A8BBE59538BE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {7D95B81C-25A6-4E6A-88E9-A8BBE59538BE}.Checked|arm.ActiveCfg = Debug|Any CPU + {7D95B81C-25A6-4E6A-88E9-A8BBE59538BE}.Checked|arm64.ActiveCfg = Debug|Any CPU + {7D95B81C-25A6-4E6A-88E9-A8BBE59538BE}.Checked|x64.ActiveCfg = Debug|Any CPU + {7D95B81C-25A6-4E6A-88E9-A8BBE59538BE}.Checked|x86.ActiveCfg = Debug|Any CPU + {2F5E19AA-B790-403E-860E-2569CC1ADF02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2F5E19AA-B790-403E-860E-2569CC1ADF02}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2F5E19AA-B790-403E-860E-2569CC1ADF02}.Debug|arm.ActiveCfg = Debug|Any CPU + {2F5E19AA-B790-403E-860E-2569CC1ADF02}.Debug|arm64.ActiveCfg = Debug|Any CPU + {2F5E19AA-B790-403E-860E-2569CC1ADF02}.Debug|x64.ActiveCfg = Debug|Any CPU + {2F5E19AA-B790-403E-860E-2569CC1ADF02}.Debug|x64.Build.0 = Debug|Any CPU + {2F5E19AA-B790-403E-860E-2569CC1ADF02}.Debug|x86.ActiveCfg = Debug|Any CPU + {2F5E19AA-B790-403E-860E-2569CC1ADF02}.Debug|x86.Build.0 = Debug|Any CPU + {2F5E19AA-B790-403E-860E-2569CC1ADF02}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2F5E19AA-B790-403E-860E-2569CC1ADF02}.Release|Any CPU.Build.0 = Release|Any CPU + {2F5E19AA-B790-403E-860E-2569CC1ADF02}.Release|arm.ActiveCfg = Release|Any CPU + {2F5E19AA-B790-403E-860E-2569CC1ADF02}.Release|arm64.ActiveCfg = Release|Any CPU + {2F5E19AA-B790-403E-860E-2569CC1ADF02}.Release|x64.ActiveCfg = Release|Any CPU + {2F5E19AA-B790-403E-860E-2569CC1ADF02}.Release|x64.Build.0 = Release|Any CPU + {2F5E19AA-B790-403E-860E-2569CC1ADF02}.Release|x86.ActiveCfg = Release|Any CPU + {2F5E19AA-B790-403E-860E-2569CC1ADF02}.Release|x86.Build.0 = Release|Any CPU + {2F5E19AA-B790-403E-860E-2569CC1ADF02}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {2F5E19AA-B790-403E-860E-2569CC1ADF02}.Checked|arm.ActiveCfg = Debug|Any CPU + {2F5E19AA-B790-403E-860E-2569CC1ADF02}.Checked|arm64.ActiveCfg = Debug|Any CPU + {2F5E19AA-B790-403E-860E-2569CC1ADF02}.Checked|x64.ActiveCfg = Debug|Any CPU + {2F5E19AA-B790-403E-860E-2569CC1ADF02}.Checked|x86.ActiveCfg = Debug|Any CPU + {A4864A61-7A24-4FE6-9C55-76A645D41BCE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4864A61-7A24-4FE6-9C55-76A645D41BCE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4864A61-7A24-4FE6-9C55-76A645D41BCE}.Debug|arm.ActiveCfg = Debug|Any CPU + {A4864A61-7A24-4FE6-9C55-76A645D41BCE}.Debug|arm64.ActiveCfg = Debug|Any CPU + {A4864A61-7A24-4FE6-9C55-76A645D41BCE}.Debug|x64.ActiveCfg = Debug|Any CPU + {A4864A61-7A24-4FE6-9C55-76A645D41BCE}.Debug|x64.Build.0 = Debug|Any CPU + {A4864A61-7A24-4FE6-9C55-76A645D41BCE}.Debug|x86.ActiveCfg = Debug|Any CPU + {A4864A61-7A24-4FE6-9C55-76A645D41BCE}.Debug|x86.Build.0 = Debug|Any CPU + {A4864A61-7A24-4FE6-9C55-76A645D41BCE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4864A61-7A24-4FE6-9C55-76A645D41BCE}.Release|Any CPU.Build.0 = Release|Any CPU + {A4864A61-7A24-4FE6-9C55-76A645D41BCE}.Release|arm.ActiveCfg = Release|Any CPU + {A4864A61-7A24-4FE6-9C55-76A645D41BCE}.Release|arm64.ActiveCfg = Release|Any CPU + {A4864A61-7A24-4FE6-9C55-76A645D41BCE}.Release|x64.ActiveCfg = Release|Any CPU + {A4864A61-7A24-4FE6-9C55-76A645D41BCE}.Release|x64.Build.0 = Release|Any CPU + {A4864A61-7A24-4FE6-9C55-76A645D41BCE}.Release|x86.ActiveCfg = Release|Any CPU + {A4864A61-7A24-4FE6-9C55-76A645D41BCE}.Release|x86.Build.0 = Release|Any CPU + {A4864A61-7A24-4FE6-9C55-76A645D41BCE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {A4864A61-7A24-4FE6-9C55-76A645D41BCE}.Checked|arm.ActiveCfg = Debug|Any CPU + {A4864A61-7A24-4FE6-9C55-76A645D41BCE}.Checked|arm64.ActiveCfg = Debug|Any CPU + {A4864A61-7A24-4FE6-9C55-76A645D41BCE}.Checked|x64.ActiveCfg = Debug|Any CPU + {A4864A61-7A24-4FE6-9C55-76A645D41BCE}.Checked|x86.ActiveCfg = Debug|Any CPU {B8D8A7D0-EAE7-4D04-97CA-7B14DA9D0BD5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B8D8A7D0-EAE7-4D04-97CA-7B14DA9D0BD5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B8D8A7D0-EAE7-4D04-97CA-7B14DA9D0BD5}.Debug|arm.ActiveCfg = Debug|Any CPU + {B8D8A7D0-EAE7-4D04-97CA-7B14DA9D0BD5}.Debug|arm64.ActiveCfg = Debug|Any CPU + {B8D8A7D0-EAE7-4D04-97CA-7B14DA9D0BD5}.Debug|x64.ActiveCfg = Debug|Any CPU + {B8D8A7D0-EAE7-4D04-97CA-7B14DA9D0BD5}.Debug|x64.Build.0 = Debug|Any CPU + {B8D8A7D0-EAE7-4D04-97CA-7B14DA9D0BD5}.Debug|x86.ActiveCfg = Debug|Any CPU + {B8D8A7D0-EAE7-4D04-97CA-7B14DA9D0BD5}.Debug|x86.Build.0 = Debug|Any CPU {B8D8A7D0-EAE7-4D04-97CA-7B14DA9D0BD5}.Release|Any CPU.ActiveCfg = Release|Any CPU {B8D8A7D0-EAE7-4D04-97CA-7B14DA9D0BD5}.Release|Any CPU.Build.0 = Release|Any CPU + {B8D8A7D0-EAE7-4D04-97CA-7B14DA9D0BD5}.Release|arm.ActiveCfg = Release|Any CPU + {B8D8A7D0-EAE7-4D04-97CA-7B14DA9D0BD5}.Release|arm64.ActiveCfg = Release|Any CPU + {B8D8A7D0-EAE7-4D04-97CA-7B14DA9D0BD5}.Release|x64.ActiveCfg = Release|Any CPU + {B8D8A7D0-EAE7-4D04-97CA-7B14DA9D0BD5}.Release|x64.Build.0 = Release|Any CPU + {B8D8A7D0-EAE7-4D04-97CA-7B14DA9D0BD5}.Release|x86.ActiveCfg = Release|Any CPU + {B8D8A7D0-EAE7-4D04-97CA-7B14DA9D0BD5}.Release|x86.Build.0 = Release|Any CPU + {B8D8A7D0-EAE7-4D04-97CA-7B14DA9D0BD5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {B8D8A7D0-EAE7-4D04-97CA-7B14DA9D0BD5}.Checked|arm.ActiveCfg = Debug|Any CPU + {B8D8A7D0-EAE7-4D04-97CA-7B14DA9D0BD5}.Checked|arm64.ActiveCfg = Debug|Any CPU + {B8D8A7D0-EAE7-4D04-97CA-7B14DA9D0BD5}.Checked|x64.ActiveCfg = Debug|Any CPU + {B8D8A7D0-EAE7-4D04-97CA-7B14DA9D0BD5}.Checked|x86.ActiveCfg = Debug|Any CPU {6311C025-F6D3-43A0-A9DA-A58AA6602568}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6311C025-F6D3-43A0-A9DA-A58AA6602568}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6311C025-F6D3-43A0-A9DA-A58AA6602568}.Debug|arm.ActiveCfg = Debug|Any CPU + {6311C025-F6D3-43A0-A9DA-A58AA6602568}.Debug|arm64.ActiveCfg = Debug|Any CPU + {6311C025-F6D3-43A0-A9DA-A58AA6602568}.Debug|x64.ActiveCfg = Debug|Any CPU + {6311C025-F6D3-43A0-A9DA-A58AA6602568}.Debug|x64.Build.0 = Debug|Any CPU + {6311C025-F6D3-43A0-A9DA-A58AA6602568}.Debug|x86.ActiveCfg = Debug|Any CPU + {6311C025-F6D3-43A0-A9DA-A58AA6602568}.Debug|x86.Build.0 = Debug|Any CPU {6311C025-F6D3-43A0-A9DA-A58AA6602568}.Release|Any CPU.ActiveCfg = Release|Any CPU {6311C025-F6D3-43A0-A9DA-A58AA6602568}.Release|Any CPU.Build.0 = Release|Any CPU + {6311C025-F6D3-43A0-A9DA-A58AA6602568}.Release|arm.ActiveCfg = Release|Any CPU + {6311C025-F6D3-43A0-A9DA-A58AA6602568}.Release|arm64.ActiveCfg = Release|Any CPU + {6311C025-F6D3-43A0-A9DA-A58AA6602568}.Release|x64.ActiveCfg = Release|Any CPU + {6311C025-F6D3-43A0-A9DA-A58AA6602568}.Release|x64.Build.0 = Release|Any CPU + {6311C025-F6D3-43A0-A9DA-A58AA6602568}.Release|x86.ActiveCfg = Release|Any CPU + {6311C025-F6D3-43A0-A9DA-A58AA6602568}.Release|x86.Build.0 = Release|Any CPU + {6311C025-F6D3-43A0-A9DA-A58AA6602568}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {6311C025-F6D3-43A0-A9DA-A58AA6602568}.Checked|arm.ActiveCfg = Debug|Any CPU + {6311C025-F6D3-43A0-A9DA-A58AA6602568}.Checked|arm64.ActiveCfg = Debug|Any CPU + {6311C025-F6D3-43A0-A9DA-A58AA6602568}.Checked|x64.ActiveCfg = Debug|Any CPU + {6311C025-F6D3-43A0-A9DA-A58AA6602568}.Checked|x86.ActiveCfg = Debug|Any CPU {AA05074D-88AF-482E-A44A-F1AC13494E9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AA05074D-88AF-482E-A44A-F1AC13494E9F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AA05074D-88AF-482E-A44A-F1AC13494E9F}.Debug|arm.ActiveCfg = Debug|Any CPU + {AA05074D-88AF-482E-A44A-F1AC13494E9F}.Debug|arm64.ActiveCfg = Debug|Any CPU + {AA05074D-88AF-482E-A44A-F1AC13494E9F}.Debug|x64.ActiveCfg = Debug|Any CPU + {AA05074D-88AF-482E-A44A-F1AC13494E9F}.Debug|x64.Build.0 = Debug|Any CPU + {AA05074D-88AF-482E-A44A-F1AC13494E9F}.Debug|x86.ActiveCfg = Debug|Any CPU + {AA05074D-88AF-482E-A44A-F1AC13494E9F}.Debug|x86.Build.0 = Debug|Any CPU {AA05074D-88AF-482E-A44A-F1AC13494E9F}.Release|Any CPU.ActiveCfg = Release|Any CPU {AA05074D-88AF-482E-A44A-F1AC13494E9F}.Release|Any CPU.Build.0 = Release|Any CPU - {3C11A5D8-BCFD-465D-93F2-100CF6382A17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3C11A5D8-BCFD-465D-93F2-100CF6382A17}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3C11A5D8-BCFD-465D-93F2-100CF6382A17}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3C11A5D8-BCFD-465D-93F2-100CF6382A17}.Release|Any CPU.Build.0 = Release|Any CPU + {AA05074D-88AF-482E-A44A-F1AC13494E9F}.Release|arm.ActiveCfg = Release|Any CPU + {AA05074D-88AF-482E-A44A-F1AC13494E9F}.Release|arm64.ActiveCfg = Release|Any CPU + {AA05074D-88AF-482E-A44A-F1AC13494E9F}.Release|x64.ActiveCfg = Release|Any CPU + {AA05074D-88AF-482E-A44A-F1AC13494E9F}.Release|x64.Build.0 = Release|Any CPU + {AA05074D-88AF-482E-A44A-F1AC13494E9F}.Release|x86.ActiveCfg = Release|Any CPU + {AA05074D-88AF-482E-A44A-F1AC13494E9F}.Release|x86.Build.0 = Release|Any CPU + {AA05074D-88AF-482E-A44A-F1AC13494E9F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {AA05074D-88AF-482E-A44A-F1AC13494E9F}.Checked|arm.ActiveCfg = Debug|Any CPU + {AA05074D-88AF-482E-A44A-F1AC13494E9F}.Checked|arm64.ActiveCfg = Debug|Any CPU + {AA05074D-88AF-482E-A44A-F1AC13494E9F}.Checked|x64.ActiveCfg = Debug|Any CPU + {AA05074D-88AF-482E-A44A-F1AC13494E9F}.Checked|x86.ActiveCfg = Debug|Any CPU {B76EE305-CA7C-494C-8374-ABD93081F6AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B76EE305-CA7C-494C-8374-ABD93081F6AE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B76EE305-CA7C-494C-8374-ABD93081F6AE}.Debug|arm.ActiveCfg = Debug|Any CPU + {B76EE305-CA7C-494C-8374-ABD93081F6AE}.Debug|arm64.ActiveCfg = Debug|Any CPU + {B76EE305-CA7C-494C-8374-ABD93081F6AE}.Debug|x64.ActiveCfg = Debug|Any CPU + {B76EE305-CA7C-494C-8374-ABD93081F6AE}.Debug|x64.Build.0 = Debug|Any CPU + {B76EE305-CA7C-494C-8374-ABD93081F6AE}.Debug|x86.ActiveCfg = Debug|Any CPU + {B76EE305-CA7C-494C-8374-ABD93081F6AE}.Debug|x86.Build.0 = Debug|Any CPU {B76EE305-CA7C-494C-8374-ABD93081F6AE}.Release|Any CPU.ActiveCfg = Release|Any CPU {B76EE305-CA7C-494C-8374-ABD93081F6AE}.Release|Any CPU.Build.0 = Release|Any CPU + {B76EE305-CA7C-494C-8374-ABD93081F6AE}.Release|arm.ActiveCfg = Release|Any CPU + {B76EE305-CA7C-494C-8374-ABD93081F6AE}.Release|arm64.ActiveCfg = Release|Any CPU + {B76EE305-CA7C-494C-8374-ABD93081F6AE}.Release|x64.ActiveCfg = Release|Any CPU + {B76EE305-CA7C-494C-8374-ABD93081F6AE}.Release|x64.Build.0 = Release|Any CPU + {B76EE305-CA7C-494C-8374-ABD93081F6AE}.Release|x86.ActiveCfg = Release|Any CPU + {B76EE305-CA7C-494C-8374-ABD93081F6AE}.Release|x86.Build.0 = Release|Any CPU + {B76EE305-CA7C-494C-8374-ABD93081F6AE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {B76EE305-CA7C-494C-8374-ABD93081F6AE}.Checked|arm.ActiveCfg = Debug|Any CPU + {B76EE305-CA7C-494C-8374-ABD93081F6AE}.Checked|arm64.ActiveCfg = Debug|Any CPU + {B76EE305-CA7C-494C-8374-ABD93081F6AE}.Checked|x64.ActiveCfg = Debug|Any CPU + {B76EE305-CA7C-494C-8374-ABD93081F6AE}.Checked|x86.ActiveCfg = Debug|Any CPU {447797DB-DF70-4568-A323-F88A45A91026}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {447797DB-DF70-4568-A323-F88A45A91026}.Debug|Any CPU.Build.0 = Debug|Any CPU + {447797DB-DF70-4568-A323-F88A45A91026}.Debug|arm.ActiveCfg = Debug|Any CPU + {447797DB-DF70-4568-A323-F88A45A91026}.Debug|arm64.ActiveCfg = Debug|Any CPU + {447797DB-DF70-4568-A323-F88A45A91026}.Debug|x64.ActiveCfg = Debug|Any CPU + {447797DB-DF70-4568-A323-F88A45A91026}.Debug|x64.Build.0 = Debug|Any CPU + {447797DB-DF70-4568-A323-F88A45A91026}.Debug|x86.ActiveCfg = Debug|Any CPU + {447797DB-DF70-4568-A323-F88A45A91026}.Debug|x86.Build.0 = Debug|Any CPU {447797DB-DF70-4568-A323-F88A45A91026}.Release|Any CPU.ActiveCfg = Release|Any CPU {447797DB-DF70-4568-A323-F88A45A91026}.Release|Any CPU.Build.0 = Release|Any CPU + {447797DB-DF70-4568-A323-F88A45A91026}.Release|arm.ActiveCfg = Release|Any CPU + {447797DB-DF70-4568-A323-F88A45A91026}.Release|arm64.ActiveCfg = Release|Any CPU + {447797DB-DF70-4568-A323-F88A45A91026}.Release|x64.ActiveCfg = Release|Any CPU + {447797DB-DF70-4568-A323-F88A45A91026}.Release|x64.Build.0 = Release|Any CPU + {447797DB-DF70-4568-A323-F88A45A91026}.Release|x86.ActiveCfg = Release|Any CPU + {447797DB-DF70-4568-A323-F88A45A91026}.Release|x86.Build.0 = Release|Any CPU + {447797DB-DF70-4568-A323-F88A45A91026}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {447797DB-DF70-4568-A323-F88A45A91026}.Checked|arm.ActiveCfg = Debug|Any CPU + {447797DB-DF70-4568-A323-F88A45A91026}.Checked|arm64.ActiveCfg = Debug|Any CPU + {447797DB-DF70-4568-A323-F88A45A91026}.Checked|x64.ActiveCfg = Debug|Any CPU + {447797DB-DF70-4568-A323-F88A45A91026}.Checked|x86.ActiveCfg = Debug|Any CPU + {CC3E8A04-504D-438A-B332-C27DD7783A33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CC3E8A04-504D-438A-B332-C27DD7783A33}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CC3E8A04-504D-438A-B332-C27DD7783A33}.Debug|arm.ActiveCfg = Debug|Any CPU + {CC3E8A04-504D-438A-B332-C27DD7783A33}.Debug|arm64.ActiveCfg = Debug|Any CPU + {CC3E8A04-504D-438A-B332-C27DD7783A33}.Debug|x64.ActiveCfg = Debug|Any CPU + {CC3E8A04-504D-438A-B332-C27DD7783A33}.Debug|x64.Build.0 = Debug|Any CPU + {CC3E8A04-504D-438A-B332-C27DD7783A33}.Debug|x86.ActiveCfg = Debug|Any CPU + {CC3E8A04-504D-438A-B332-C27DD7783A33}.Debug|x86.Build.0 = Debug|Any CPU + {CC3E8A04-504D-438A-B332-C27DD7783A33}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CC3E8A04-504D-438A-B332-C27DD7783A33}.Release|Any CPU.Build.0 = Release|Any CPU + {CC3E8A04-504D-438A-B332-C27DD7783A33}.Release|arm.ActiveCfg = Release|Any CPU + {CC3E8A04-504D-438A-B332-C27DD7783A33}.Release|arm64.ActiveCfg = Release|Any CPU + {CC3E8A04-504D-438A-B332-C27DD7783A33}.Release|x64.ActiveCfg = Release|Any CPU + {CC3E8A04-504D-438A-B332-C27DD7783A33}.Release|x64.Build.0 = Release|Any CPU + {CC3E8A04-504D-438A-B332-C27DD7783A33}.Release|x86.ActiveCfg = Release|Any CPU + {CC3E8A04-504D-438A-B332-C27DD7783A33}.Release|x86.Build.0 = Release|Any CPU + {CC3E8A04-504D-438A-B332-C27DD7783A33}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {CC3E8A04-504D-438A-B332-C27DD7783A33}.Checked|arm.ActiveCfg = Debug|Any CPU + {CC3E8A04-504D-438A-B332-C27DD7783A33}.Checked|arm64.ActiveCfg = Debug|Any CPU + {CC3E8A04-504D-438A-B332-C27DD7783A33}.Checked|x64.ActiveCfg = Debug|Any CPU + {CC3E8A04-504D-438A-B332-C27DD7783A33}.Checked|x86.ActiveCfg = Debug|Any CPU + {2D833530-E133-4ACF-9C1C-12A9623DEE56}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2D833530-E133-4ACF-9C1C-12A9623DEE56}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2D833530-E133-4ACF-9C1C-12A9623DEE56}.Debug|arm.ActiveCfg = Debug|Any CPU + {2D833530-E133-4ACF-9C1C-12A9623DEE56}.Debug|arm64.ActiveCfg = Debug|Any CPU + {2D833530-E133-4ACF-9C1C-12A9623DEE56}.Debug|x64.ActiveCfg = Debug|Any CPU + {2D833530-E133-4ACF-9C1C-12A9623DEE56}.Debug|x64.Build.0 = Debug|Any CPU + {2D833530-E133-4ACF-9C1C-12A9623DEE56}.Debug|x86.ActiveCfg = Debug|Any CPU + {2D833530-E133-4ACF-9C1C-12A9623DEE56}.Debug|x86.Build.0 = Debug|Any CPU + {2D833530-E133-4ACF-9C1C-12A9623DEE56}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2D833530-E133-4ACF-9C1C-12A9623DEE56}.Release|Any CPU.Build.0 = Release|Any CPU + {2D833530-E133-4ACF-9C1C-12A9623DEE56}.Release|arm.ActiveCfg = Release|Any CPU + {2D833530-E133-4ACF-9C1C-12A9623DEE56}.Release|arm64.ActiveCfg = Release|Any CPU + {2D833530-E133-4ACF-9C1C-12A9623DEE56}.Release|x64.ActiveCfg = Release|Any CPU + {2D833530-E133-4ACF-9C1C-12A9623DEE56}.Release|x64.Build.0 = Release|Any CPU + {2D833530-E133-4ACF-9C1C-12A9623DEE56}.Release|x86.ActiveCfg = Release|Any CPU + {2D833530-E133-4ACF-9C1C-12A9623DEE56}.Release|x86.Build.0 = Release|Any CPU + {2D833530-E133-4ACF-9C1C-12A9623DEE56}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {2D833530-E133-4ACF-9C1C-12A9623DEE56}.Checked|arm.ActiveCfg = Debug|Any CPU + {2D833530-E133-4ACF-9C1C-12A9623DEE56}.Checked|arm64.ActiveCfg = Debug|Any CPU + {2D833530-E133-4ACF-9C1C-12A9623DEE56}.Checked|x64.ActiveCfg = Debug|Any CPU + {2D833530-E133-4ACF-9C1C-12A9623DEE56}.Checked|x86.ActiveCfg = Debug|Any CPU {986272FB-E5C6-4881-9867-DC3427D883AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {986272FB-E5C6-4881-9867-DC3427D883AE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {986272FB-E5C6-4881-9867-DC3427D883AE}.Debug|arm.ActiveCfg = Debug|Any CPU + {986272FB-E5C6-4881-9867-DC3427D883AE}.Debug|arm64.ActiveCfg = Debug|Any CPU + {986272FB-E5C6-4881-9867-DC3427D883AE}.Debug|x64.ActiveCfg = Debug|Any CPU + {986272FB-E5C6-4881-9867-DC3427D883AE}.Debug|x64.Build.0 = Debug|Any CPU + {986272FB-E5C6-4881-9867-DC3427D883AE}.Debug|x86.ActiveCfg = Debug|Any CPU + {986272FB-E5C6-4881-9867-DC3427D883AE}.Debug|x86.Build.0 = Debug|Any CPU {986272FB-E5C6-4881-9867-DC3427D883AE}.Release|Any CPU.ActiveCfg = Release|Any CPU {986272FB-E5C6-4881-9867-DC3427D883AE}.Release|Any CPU.Build.0 = Release|Any CPU + {986272FB-E5C6-4881-9867-DC3427D883AE}.Release|arm.ActiveCfg = Release|Any CPU + {986272FB-E5C6-4881-9867-DC3427D883AE}.Release|arm64.ActiveCfg = Release|Any CPU + {986272FB-E5C6-4881-9867-DC3427D883AE}.Release|x64.ActiveCfg = Release|Any CPU + {986272FB-E5C6-4881-9867-DC3427D883AE}.Release|x64.Build.0 = Release|Any CPU + {986272FB-E5C6-4881-9867-DC3427D883AE}.Release|x86.ActiveCfg = Release|Any CPU + {986272FB-E5C6-4881-9867-DC3427D883AE}.Release|x86.Build.0 = Release|Any CPU + {986272FB-E5C6-4881-9867-DC3427D883AE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {986272FB-E5C6-4881-9867-DC3427D883AE}.Checked|arm.ActiveCfg = Debug|Any CPU + {986272FB-E5C6-4881-9867-DC3427D883AE}.Checked|arm64.ActiveCfg = Debug|Any CPU + {986272FB-E5C6-4881-9867-DC3427D883AE}.Checked|x64.ActiveCfg = Debug|Any CPU + {986272FB-E5C6-4881-9867-DC3427D883AE}.Checked|x86.ActiveCfg = Debug|Any CPU {AFBFBBE6-F5EC-4889-9F34-03E07562630D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AFBFBBE6-F5EC-4889-9F34-03E07562630D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AFBFBBE6-F5EC-4889-9F34-03E07562630D}.Debug|arm.ActiveCfg = Debug|Any CPU + {AFBFBBE6-F5EC-4889-9F34-03E07562630D}.Debug|arm64.ActiveCfg = Debug|Any CPU + {AFBFBBE6-F5EC-4889-9F34-03E07562630D}.Debug|x64.ActiveCfg = Debug|Any CPU + {AFBFBBE6-F5EC-4889-9F34-03E07562630D}.Debug|x64.Build.0 = Debug|Any CPU + {AFBFBBE6-F5EC-4889-9F34-03E07562630D}.Debug|x86.ActiveCfg = Debug|Any CPU + {AFBFBBE6-F5EC-4889-9F34-03E07562630D}.Debug|x86.Build.0 = Debug|Any CPU {AFBFBBE6-F5EC-4889-9F34-03E07562630D}.Release|Any CPU.ActiveCfg = Release|Any CPU {AFBFBBE6-F5EC-4889-9F34-03E07562630D}.Release|Any CPU.Build.0 = Release|Any CPU + {AFBFBBE6-F5EC-4889-9F34-03E07562630D}.Release|arm.ActiveCfg = Release|Any CPU + {AFBFBBE6-F5EC-4889-9F34-03E07562630D}.Release|arm64.ActiveCfg = Release|Any CPU + {AFBFBBE6-F5EC-4889-9F34-03E07562630D}.Release|x64.ActiveCfg = Release|Any CPU + {AFBFBBE6-F5EC-4889-9F34-03E07562630D}.Release|x64.Build.0 = Release|Any CPU + {AFBFBBE6-F5EC-4889-9F34-03E07562630D}.Release|x86.ActiveCfg = Release|Any CPU + {AFBFBBE6-F5EC-4889-9F34-03E07562630D}.Release|x86.Build.0 = Release|Any CPU + {AFBFBBE6-F5EC-4889-9F34-03E07562630D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {AFBFBBE6-F5EC-4889-9F34-03E07562630D}.Checked|arm.ActiveCfg = Debug|Any CPU + {AFBFBBE6-F5EC-4889-9F34-03E07562630D}.Checked|arm64.ActiveCfg = Debug|Any CPU + {AFBFBBE6-F5EC-4889-9F34-03E07562630D}.Checked|x64.ActiveCfg = Debug|Any CPU + {AFBFBBE6-F5EC-4889-9F34-03E07562630D}.Checked|x86.ActiveCfg = Debug|Any CPU {45E0A981-A131-4147-94E7-49AAC45F5D14}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {45E0A981-A131-4147-94E7-49AAC45F5D14}.Debug|Any CPU.Build.0 = Debug|Any CPU + {45E0A981-A131-4147-94E7-49AAC45F5D14}.Debug|arm.ActiveCfg = Debug|Any CPU + {45E0A981-A131-4147-94E7-49AAC45F5D14}.Debug|arm64.ActiveCfg = Debug|Any CPU + {45E0A981-A131-4147-94E7-49AAC45F5D14}.Debug|x64.ActiveCfg = Debug|Any CPU + {45E0A981-A131-4147-94E7-49AAC45F5D14}.Debug|x64.Build.0 = Debug|Any CPU + {45E0A981-A131-4147-94E7-49AAC45F5D14}.Debug|x86.ActiveCfg = Debug|Any CPU + {45E0A981-A131-4147-94E7-49AAC45F5D14}.Debug|x86.Build.0 = Debug|Any CPU {45E0A981-A131-4147-94E7-49AAC45F5D14}.Release|Any CPU.ActiveCfg = Release|Any CPU {45E0A981-A131-4147-94E7-49AAC45F5D14}.Release|Any CPU.Build.0 = Release|Any CPU + {45E0A981-A131-4147-94E7-49AAC45F5D14}.Release|arm.ActiveCfg = Release|Any CPU + {45E0A981-A131-4147-94E7-49AAC45F5D14}.Release|arm64.ActiveCfg = Release|Any CPU + {45E0A981-A131-4147-94E7-49AAC45F5D14}.Release|x64.ActiveCfg = Release|Any CPU + {45E0A981-A131-4147-94E7-49AAC45F5D14}.Release|x64.Build.0 = Release|Any CPU + {45E0A981-A131-4147-94E7-49AAC45F5D14}.Release|x86.ActiveCfg = Release|Any CPU + {45E0A981-A131-4147-94E7-49AAC45F5D14}.Release|x86.Build.0 = Release|Any CPU + {45E0A981-A131-4147-94E7-49AAC45F5D14}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {45E0A981-A131-4147-94E7-49AAC45F5D14}.Checked|arm.ActiveCfg = Debug|Any CPU + {45E0A981-A131-4147-94E7-49AAC45F5D14}.Checked|arm64.ActiveCfg = Debug|Any CPU + {45E0A981-A131-4147-94E7-49AAC45F5D14}.Checked|x64.ActiveCfg = Debug|Any CPU + {45E0A981-A131-4147-94E7-49AAC45F5D14}.Checked|x86.ActiveCfg = Debug|Any CPU {6383A7BA-20DC-4025-9BB3-E1C6FEA669E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6383A7BA-20DC-4025-9BB3-E1C6FEA669E8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6383A7BA-20DC-4025-9BB3-E1C6FEA669E8}.Debug|arm.ActiveCfg = Debug|Any CPU + {6383A7BA-20DC-4025-9BB3-E1C6FEA669E8}.Debug|arm64.ActiveCfg = Debug|Any CPU + {6383A7BA-20DC-4025-9BB3-E1C6FEA669E8}.Debug|x64.ActiveCfg = Debug|Any CPU + {6383A7BA-20DC-4025-9BB3-E1C6FEA669E8}.Debug|x64.Build.0 = Debug|Any CPU + {6383A7BA-20DC-4025-9BB3-E1C6FEA669E8}.Debug|x86.ActiveCfg = Debug|Any CPU + {6383A7BA-20DC-4025-9BB3-E1C6FEA669E8}.Debug|x86.Build.0 = Debug|Any CPU {6383A7BA-20DC-4025-9BB3-E1C6FEA669E8}.Release|Any CPU.ActiveCfg = Release|Any CPU {6383A7BA-20DC-4025-9BB3-E1C6FEA669E8}.Release|Any CPU.Build.0 = Release|Any CPU + {6383A7BA-20DC-4025-9BB3-E1C6FEA669E8}.Release|arm.ActiveCfg = Release|Any CPU + {6383A7BA-20DC-4025-9BB3-E1C6FEA669E8}.Release|arm64.ActiveCfg = Release|Any CPU + {6383A7BA-20DC-4025-9BB3-E1C6FEA669E8}.Release|x64.ActiveCfg = Release|Any CPU + {6383A7BA-20DC-4025-9BB3-E1C6FEA669E8}.Release|x64.Build.0 = Release|Any CPU + {6383A7BA-20DC-4025-9BB3-E1C6FEA669E8}.Release|x86.ActiveCfg = Release|Any CPU + {6383A7BA-20DC-4025-9BB3-E1C6FEA669E8}.Release|x86.Build.0 = Release|Any CPU + {6383A7BA-20DC-4025-9BB3-E1C6FEA669E8}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {6383A7BA-20DC-4025-9BB3-E1C6FEA669E8}.Checked|arm.ActiveCfg = Debug|Any CPU + {6383A7BA-20DC-4025-9BB3-E1C6FEA669E8}.Checked|arm64.ActiveCfg = Debug|Any CPU + {6383A7BA-20DC-4025-9BB3-E1C6FEA669E8}.Checked|x64.ActiveCfg = Debug|Any CPU + {6383A7BA-20DC-4025-9BB3-E1C6FEA669E8}.Checked|x86.ActiveCfg = Debug|Any CPU {A154C9F1-845A-4596-9061-92C462E971A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A154C9F1-845A-4596-9061-92C462E971A6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A154C9F1-845A-4596-9061-92C462E971A6}.Debug|arm.ActiveCfg = Debug|Any CPU + {A154C9F1-845A-4596-9061-92C462E971A6}.Debug|arm64.ActiveCfg = Debug|Any CPU + {A154C9F1-845A-4596-9061-92C462E971A6}.Debug|x64.ActiveCfg = Debug|Any CPU + {A154C9F1-845A-4596-9061-92C462E971A6}.Debug|x64.Build.0 = Debug|Any CPU + {A154C9F1-845A-4596-9061-92C462E971A6}.Debug|x86.ActiveCfg = Debug|Any CPU + {A154C9F1-845A-4596-9061-92C462E971A6}.Debug|x86.Build.0 = Debug|Any CPU {A154C9F1-845A-4596-9061-92C462E971A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {A154C9F1-845A-4596-9061-92C462E971A6}.Release|Any CPU.Build.0 = Release|Any CPU + {A154C9F1-845A-4596-9061-92C462E971A6}.Release|arm.ActiveCfg = Release|Any CPU + {A154C9F1-845A-4596-9061-92C462E971A6}.Release|arm64.ActiveCfg = Release|Any CPU + {A154C9F1-845A-4596-9061-92C462E971A6}.Release|x64.ActiveCfg = Release|Any CPU + {A154C9F1-845A-4596-9061-92C462E971A6}.Release|x64.Build.0 = Release|Any CPU + {A154C9F1-845A-4596-9061-92C462E971A6}.Release|x86.ActiveCfg = Release|Any CPU + {A154C9F1-845A-4596-9061-92C462E971A6}.Release|x86.Build.0 = Release|Any CPU + {A154C9F1-845A-4596-9061-92C462E971A6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {A154C9F1-845A-4596-9061-92C462E971A6}.Checked|arm.ActiveCfg = Debug|Any CPU + {A154C9F1-845A-4596-9061-92C462E971A6}.Checked|arm64.ActiveCfg = Debug|Any CPU + {A154C9F1-845A-4596-9061-92C462E971A6}.Checked|x64.ActiveCfg = Debug|Any CPU + {A154C9F1-845A-4596-9061-92C462E971A6}.Checked|x86.ActiveCfg = Debug|Any CPU {EC5D61F1-E77B-4E3D-968C-710FCFB9E028}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EC5D61F1-E77B-4E3D-968C-710FCFB9E028}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EC5D61F1-E77B-4E3D-968C-710FCFB9E028}.Debug|arm.ActiveCfg = Debug|Any CPU + {EC5D61F1-E77B-4E3D-968C-710FCFB9E028}.Debug|arm64.ActiveCfg = Debug|Any CPU + {EC5D61F1-E77B-4E3D-968C-710FCFB9E028}.Debug|x64.ActiveCfg = Debug|Any CPU + {EC5D61F1-E77B-4E3D-968C-710FCFB9E028}.Debug|x64.Build.0 = Debug|Any CPU + {EC5D61F1-E77B-4E3D-968C-710FCFB9E028}.Debug|x86.ActiveCfg = Debug|Any CPU + {EC5D61F1-E77B-4E3D-968C-710FCFB9E028}.Debug|x86.Build.0 = Debug|Any CPU {EC5D61F1-E77B-4E3D-968C-710FCFB9E028}.Release|Any CPU.ActiveCfg = Release|Any CPU {EC5D61F1-E77B-4E3D-968C-710FCFB9E028}.Release|Any CPU.Build.0 = Release|Any CPU + {EC5D61F1-E77B-4E3D-968C-710FCFB9E028}.Release|arm.ActiveCfg = Release|Any CPU + {EC5D61F1-E77B-4E3D-968C-710FCFB9E028}.Release|arm64.ActiveCfg = Release|Any CPU + {EC5D61F1-E77B-4E3D-968C-710FCFB9E028}.Release|x64.ActiveCfg = Release|Any CPU + {EC5D61F1-E77B-4E3D-968C-710FCFB9E028}.Release|x64.Build.0 = Release|Any CPU + {EC5D61F1-E77B-4E3D-968C-710FCFB9E028}.Release|x86.ActiveCfg = Release|Any CPU + {EC5D61F1-E77B-4E3D-968C-710FCFB9E028}.Release|x86.Build.0 = Release|Any CPU + {EC5D61F1-E77B-4E3D-968C-710FCFB9E028}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {EC5D61F1-E77B-4E3D-968C-710FCFB9E028}.Checked|arm.ActiveCfg = Debug|Any CPU + {EC5D61F1-E77B-4E3D-968C-710FCFB9E028}.Checked|arm64.ActiveCfg = Debug|Any CPU + {EC5D61F1-E77B-4E3D-968C-710FCFB9E028}.Checked|x64.ActiveCfg = Debug|Any CPU + {EC5D61F1-E77B-4E3D-968C-710FCFB9E028}.Checked|x86.ActiveCfg = Debug|Any CPU + {EA4D9319-C5FB-4829-BB2F-E0FAA1DE79E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EA4D9319-C5FB-4829-BB2F-E0FAA1DE79E3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EA4D9319-C5FB-4829-BB2F-E0FAA1DE79E3}.Debug|arm.ActiveCfg = Debug|Any CPU + {EA4D9319-C5FB-4829-BB2F-E0FAA1DE79E3}.Debug|arm64.ActiveCfg = Debug|Any CPU + {EA4D9319-C5FB-4829-BB2F-E0FAA1DE79E3}.Debug|x64.ActiveCfg = Debug|Any CPU + {EA4D9319-C5FB-4829-BB2F-E0FAA1DE79E3}.Debug|x64.Build.0 = Debug|Any CPU + {EA4D9319-C5FB-4829-BB2F-E0FAA1DE79E3}.Debug|x86.ActiveCfg = Debug|Any CPU + {EA4D9319-C5FB-4829-BB2F-E0FAA1DE79E3}.Debug|x86.Build.0 = Debug|Any CPU + {EA4D9319-C5FB-4829-BB2F-E0FAA1DE79E3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EA4D9319-C5FB-4829-BB2F-E0FAA1DE79E3}.Release|Any CPU.Build.0 = Release|Any CPU + {EA4D9319-C5FB-4829-BB2F-E0FAA1DE79E3}.Release|arm.ActiveCfg = Release|Any CPU + {EA4D9319-C5FB-4829-BB2F-E0FAA1DE79E3}.Release|arm64.ActiveCfg = Release|Any CPU + {EA4D9319-C5FB-4829-BB2F-E0FAA1DE79E3}.Release|x64.ActiveCfg = Release|Any CPU + {EA4D9319-C5FB-4829-BB2F-E0FAA1DE79E3}.Release|x64.Build.0 = Release|Any CPU + {EA4D9319-C5FB-4829-BB2F-E0FAA1DE79E3}.Release|x86.ActiveCfg = Release|Any CPU + {EA4D9319-C5FB-4829-BB2F-E0FAA1DE79E3}.Release|x86.Build.0 = Release|Any CPU + {EA4D9319-C5FB-4829-BB2F-E0FAA1DE79E3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {EA4D9319-C5FB-4829-BB2F-E0FAA1DE79E3}.Checked|arm.ActiveCfg = Debug|Any CPU + {EA4D9319-C5FB-4829-BB2F-E0FAA1DE79E3}.Checked|arm64.ActiveCfg = Debug|Any CPU + {EA4D9319-C5FB-4829-BB2F-E0FAA1DE79E3}.Checked|x64.ActiveCfg = Debug|Any CPU + {EA4D9319-C5FB-4829-BB2F-E0FAA1DE79E3}.Checked|x86.ActiveCfg = Debug|Any CPU + {FDBA4009-E8BE-4E64-8121-FBA67E0B8455}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FDBA4009-E8BE-4E64-8121-FBA67E0B8455}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FDBA4009-E8BE-4E64-8121-FBA67E0B8455}.Debug|arm.ActiveCfg = Debug|Any CPU + {FDBA4009-E8BE-4E64-8121-FBA67E0B8455}.Debug|arm64.ActiveCfg = Debug|Any CPU + {FDBA4009-E8BE-4E64-8121-FBA67E0B8455}.Debug|x64.ActiveCfg = Debug|Any CPU + {FDBA4009-E8BE-4E64-8121-FBA67E0B8455}.Debug|x64.Build.0 = Debug|Any CPU + {FDBA4009-E8BE-4E64-8121-FBA67E0B8455}.Debug|x86.ActiveCfg = Debug|Any CPU + {FDBA4009-E8BE-4E64-8121-FBA67E0B8455}.Debug|x86.Build.0 = Debug|Any CPU + {FDBA4009-E8BE-4E64-8121-FBA67E0B8455}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FDBA4009-E8BE-4E64-8121-FBA67E0B8455}.Release|Any CPU.Build.0 = Release|Any CPU + {FDBA4009-E8BE-4E64-8121-FBA67E0B8455}.Release|arm.ActiveCfg = Release|Any CPU + {FDBA4009-E8BE-4E64-8121-FBA67E0B8455}.Release|arm64.ActiveCfg = Release|Any CPU + {FDBA4009-E8BE-4E64-8121-FBA67E0B8455}.Release|x64.ActiveCfg = Release|Any CPU + {FDBA4009-E8BE-4E64-8121-FBA67E0B8455}.Release|x64.Build.0 = Release|Any CPU + {FDBA4009-E8BE-4E64-8121-FBA67E0B8455}.Release|x86.ActiveCfg = Release|Any CPU + {FDBA4009-E8BE-4E64-8121-FBA67E0B8455}.Release|x86.Build.0 = Release|Any CPU + {FDBA4009-E8BE-4E64-8121-FBA67E0B8455}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {FDBA4009-E8BE-4E64-8121-FBA67E0B8455}.Checked|arm.ActiveCfg = Debug|Any CPU + {FDBA4009-E8BE-4E64-8121-FBA67E0B8455}.Checked|arm64.ActiveCfg = Debug|Any CPU + {FDBA4009-E8BE-4E64-8121-FBA67E0B8455}.Checked|x64.ActiveCfg = Debug|Any CPU + {FDBA4009-E8BE-4E64-8121-FBA67E0B8455}.Checked|x86.ActiveCfg = Debug|Any CPU + {4CD58207-3CDE-4C05-978E-FE75F544B2C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4CD58207-3CDE-4C05-978E-FE75F544B2C5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4CD58207-3CDE-4C05-978E-FE75F544B2C5}.Debug|arm.ActiveCfg = Debug|Any CPU + {4CD58207-3CDE-4C05-978E-FE75F544B2C5}.Debug|arm64.ActiveCfg = Debug|Any CPU + {4CD58207-3CDE-4C05-978E-FE75F544B2C5}.Debug|x64.ActiveCfg = Debug|Any CPU + {4CD58207-3CDE-4C05-978E-FE75F544B2C5}.Debug|x64.Build.0 = Debug|Any CPU + {4CD58207-3CDE-4C05-978E-FE75F544B2C5}.Debug|x86.ActiveCfg = Debug|Any CPU + {4CD58207-3CDE-4C05-978E-FE75F544B2C5}.Debug|x86.Build.0 = Debug|Any CPU + {4CD58207-3CDE-4C05-978E-FE75F544B2C5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4CD58207-3CDE-4C05-978E-FE75F544B2C5}.Release|Any CPU.Build.0 = Release|Any CPU + {4CD58207-3CDE-4C05-978E-FE75F544B2C5}.Release|arm.ActiveCfg = Release|Any CPU + {4CD58207-3CDE-4C05-978E-FE75F544B2C5}.Release|arm64.ActiveCfg = Release|Any CPU + {4CD58207-3CDE-4C05-978E-FE75F544B2C5}.Release|x64.ActiveCfg = Release|Any CPU + {4CD58207-3CDE-4C05-978E-FE75F544B2C5}.Release|x64.Build.0 = Release|Any CPU + {4CD58207-3CDE-4C05-978E-FE75F544B2C5}.Release|x86.ActiveCfg = Release|Any CPU + {4CD58207-3CDE-4C05-978E-FE75F544B2C5}.Release|x86.Build.0 = Release|Any CPU + {4CD58207-3CDE-4C05-978E-FE75F544B2C5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {4CD58207-3CDE-4C05-978E-FE75F544B2C5}.Checked|arm.ActiveCfg = Debug|Any CPU + {4CD58207-3CDE-4C05-978E-FE75F544B2C5}.Checked|arm64.ActiveCfg = Debug|Any CPU + {4CD58207-3CDE-4C05-978E-FE75F544B2C5}.Checked|x64.ActiveCfg = Debug|Any CPU + {4CD58207-3CDE-4C05-978E-FE75F544B2C5}.Checked|x86.ActiveCfg = Debug|Any CPU + {5A99AE6A-15BE-4F29-BDC3-C1868750F891}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5A99AE6A-15BE-4F29-BDC3-C1868750F891}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5A99AE6A-15BE-4F29-BDC3-C1868750F891}.Debug|arm.ActiveCfg = Debug|Any CPU + {5A99AE6A-15BE-4F29-BDC3-C1868750F891}.Debug|arm64.ActiveCfg = Debug|Any CPU + {5A99AE6A-15BE-4F29-BDC3-C1868750F891}.Debug|x64.ActiveCfg = Debug|Any CPU + {5A99AE6A-15BE-4F29-BDC3-C1868750F891}.Debug|x64.Build.0 = Debug|Any CPU + {5A99AE6A-15BE-4F29-BDC3-C1868750F891}.Debug|x86.ActiveCfg = Debug|Any CPU + {5A99AE6A-15BE-4F29-BDC3-C1868750F891}.Debug|x86.Build.0 = Debug|Any CPU + {5A99AE6A-15BE-4F29-BDC3-C1868750F891}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5A99AE6A-15BE-4F29-BDC3-C1868750F891}.Release|Any CPU.Build.0 = Release|Any CPU + {5A99AE6A-15BE-4F29-BDC3-C1868750F891}.Release|arm.ActiveCfg = Release|Any CPU + {5A99AE6A-15BE-4F29-BDC3-C1868750F891}.Release|arm64.ActiveCfg = Release|Any CPU + {5A99AE6A-15BE-4F29-BDC3-C1868750F891}.Release|x64.ActiveCfg = Release|Any CPU + {5A99AE6A-15BE-4F29-BDC3-C1868750F891}.Release|x64.Build.0 = Release|Any CPU + {5A99AE6A-15BE-4F29-BDC3-C1868750F891}.Release|x86.ActiveCfg = Release|Any CPU + {5A99AE6A-15BE-4F29-BDC3-C1868750F891}.Release|x86.Build.0 = Release|Any CPU + {5A99AE6A-15BE-4F29-BDC3-C1868750F891}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {5A99AE6A-15BE-4F29-BDC3-C1868750F891}.Checked|arm.ActiveCfg = Debug|Any CPU + {5A99AE6A-15BE-4F29-BDC3-C1868750F891}.Checked|arm64.ActiveCfg = Debug|Any CPU + {5A99AE6A-15BE-4F29-BDC3-C1868750F891}.Checked|x64.ActiveCfg = Debug|Any CPU + {5A99AE6A-15BE-4F29-BDC3-C1868750F891}.Checked|x86.ActiveCfg = Debug|Any CPU + {88BF890E-ED98-4505-8710-F9FB3DE5CE64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {88BF890E-ED98-4505-8710-F9FB3DE5CE64}.Debug|Any CPU.Build.0 = Debug|Any CPU + {88BF890E-ED98-4505-8710-F9FB3DE5CE64}.Debug|arm.ActiveCfg = Debug|Any CPU + {88BF890E-ED98-4505-8710-F9FB3DE5CE64}.Debug|arm64.ActiveCfg = Debug|Any CPU + {88BF890E-ED98-4505-8710-F9FB3DE5CE64}.Debug|x64.ActiveCfg = Debug|Any CPU + {88BF890E-ED98-4505-8710-F9FB3DE5CE64}.Debug|x64.Build.0 = Debug|Any CPU + {88BF890E-ED98-4505-8710-F9FB3DE5CE64}.Debug|x86.ActiveCfg = Debug|Any CPU + {88BF890E-ED98-4505-8710-F9FB3DE5CE64}.Debug|x86.Build.0 = Debug|Any CPU + {88BF890E-ED98-4505-8710-F9FB3DE5CE64}.Release|Any CPU.ActiveCfg = Release|Any CPU + {88BF890E-ED98-4505-8710-F9FB3DE5CE64}.Release|Any CPU.Build.0 = Release|Any CPU + {88BF890E-ED98-4505-8710-F9FB3DE5CE64}.Release|arm.ActiveCfg = Release|Any CPU + {88BF890E-ED98-4505-8710-F9FB3DE5CE64}.Release|arm64.ActiveCfg = Release|Any CPU + {88BF890E-ED98-4505-8710-F9FB3DE5CE64}.Release|x64.ActiveCfg = Release|Any CPU + {88BF890E-ED98-4505-8710-F9FB3DE5CE64}.Release|x64.Build.0 = Release|Any CPU + {88BF890E-ED98-4505-8710-F9FB3DE5CE64}.Release|x86.ActiveCfg = Release|Any CPU + {88BF890E-ED98-4505-8710-F9FB3DE5CE64}.Release|x86.Build.0 = Release|Any CPU + {88BF890E-ED98-4505-8710-F9FB3DE5CE64}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {88BF890E-ED98-4505-8710-F9FB3DE5CE64}.Checked|arm.ActiveCfg = Debug|Any CPU + {88BF890E-ED98-4505-8710-F9FB3DE5CE64}.Checked|arm64.ActiveCfg = Debug|Any CPU + {88BF890E-ED98-4505-8710-F9FB3DE5CE64}.Checked|x64.ActiveCfg = Debug|Any CPU + {88BF890E-ED98-4505-8710-F9FB3DE5CE64}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution + {537CECFF-20AE-4AD4-A433-C1753A88E4E8} = {31DE693C-394A-461E-918B-2F3FEC37FBCC} {4DD7C7A6-6F4C-497B-A836-20F2D4F66748} = {28BE2B3F-890C-45EF-B90A-9FA92302365E} {AA05074D-88AF-482E-A44A-F1AC13494E9F} = {28BE2B3F-890C-45EF-B90A-9FA92302365E} - {D2CB0E92-8F52-49A3-A2CA-9F77C8ED4A6D} = {C315269F-EEA6-4F74-BA10-65ECAA6351C8} - {7F228E60-0AD6-4CBE-BD88-2D9AFCCE5B16} = {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} - {45E0A981-A131-4147-94E7-49AAC45F5D14} = {C315269F-EEA6-4F74-BA10-65ECAA6351C8} - {A154C9F1-845A-4596-9061-92C462E971A6} = {C315269F-EEA6-4F74-BA10-65ECAA6351C8} + {6DBEA1D1-448D-4C27-B329-19F4F214E536} = {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} + {A4864A61-7A24-4FE6-9C55-76A645D41BCE} = {7CAD8D92-ABBF-4ED8-ACF7-7121F99F89EC} {6311C025-F6D3-43A0-A9DA-A58AA6602568} = {7CAD8D92-ABBF-4ED8-ACF7-7121F99F89EC} + {2D833530-E133-4ACF-9C1C-12A9623DEE56} = {7CAD8D92-ABBF-4ED8-ACF7-7121F99F89EC} {AFBFBBE6-F5EC-4889-9F34-03E07562630D} = {7CAD8D92-ABBF-4ED8-ACF7-7121F99F89EC} {6383A7BA-20DC-4025-9BB3-E1C6FEA669E8} = {7CAD8D92-ABBF-4ED8-ACF7-7121F99F89EC} {EC5D61F1-E77B-4E3D-968C-710FCFB9E028} = {7CAD8D92-ABBF-4ED8-ACF7-7121F99F89EC} - {3C11A5D8-BCFD-465D-93F2-100CF6382A17} = {5E28270B-1EEB-4D0E-9A3C-6959BEA9647E} + {D2CB0E92-8F52-49A3-A2CA-9F77C8ED4A6D} = {C315269F-EEA6-4F74-BA10-65ECAA6351C8} + {7F228E60-0AD6-4CBE-BD88-2D9AFCCE5B16} = {C315269F-EEA6-4F74-BA10-65ECAA6351C8} + {2F5E19AA-B790-403E-860E-2569CC1ADF02} = {C315269F-EEA6-4F74-BA10-65ECAA6351C8} + {B8D8A7D0-EAE7-4D04-97CA-7B14DA9D0BD5} = {C315269F-EEA6-4F74-BA10-65ECAA6351C8} + {CC3E8A04-504D-438A-B332-C27DD7783A33} = {C315269F-EEA6-4F74-BA10-65ECAA6351C8} + {986272FB-E5C6-4881-9867-DC3427D883AE} = {C315269F-EEA6-4F74-BA10-65ECAA6351C8} + {45E0A981-A131-4147-94E7-49AAC45F5D14} = {C315269F-EEA6-4F74-BA10-65ECAA6351C8} + {A154C9F1-845A-4596-9061-92C462E971A6} = {C315269F-EEA6-4F74-BA10-65ECAA6351C8} + {7D95B81C-25A6-4E6A-88E9-A8BBE59538BE} = {5E28270B-1EEB-4D0E-9A3C-6959BEA9647E} {B76EE305-CA7C-494C-8374-ABD93081F6AE} = {5E28270B-1EEB-4D0E-9A3C-6959BEA9647E} {447797DB-DF70-4568-A323-F88A45A91026} = {5E28270B-1EEB-4D0E-9A3C-6959BEA9647E} + {EA4D9319-C5FB-4829-BB2F-E0FAA1DE79E3} = {191AA172-B1CF-40FE-8B10-707FF5A6684F} + {FDBA4009-E8BE-4E64-8121-FBA67E0B8455} = {191AA172-B1CF-40FE-8B10-707FF5A6684F} + {191AA172-B1CF-40FE-8B10-707FF5A6684F} = {A278FE36-D732-4708-978F-C47FEC428E1D} + {4CD58207-3CDE-4C05-978E-FE75F544B2C5} = {5C5F1A98-51A5-4FDF-A61A-179A5D37E03D} + {5A99AE6A-15BE-4F29-BDC3-C1868750F891} = {5C5F1A98-51A5-4FDF-A61A-179A5D37E03D} + {5C5F1A98-51A5-4FDF-A61A-179A5D37E03D} = {A278FE36-D732-4708-978F-C47FEC428E1D} + {88BF890E-ED98-4505-8710-F9FB3DE5CE64} = {A04A3FBF-112F-4D5B-84B1-886DD1D8086A} + {A04A3FBF-112F-4D5B-84B1-886DD1D8086A} = {A278FE36-D732-4708-978F-C47FEC428E1D} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {7B9B7D16-2C48-486A-B84B-6FF6D28509F6} diff --git a/src/libraries/System.Runtime.Caching/src/CompatibilitySuppressions.xml b/src/libraries/System.Runtime.Caching/src/CompatibilitySuppressions.xml new file mode 100644 index 00000000000000..2a95273326ba06 --- /dev/null +++ b/src/libraries/System.Runtime.Caching/src/CompatibilitySuppressions.xml @@ -0,0 +1,18 @@ + + + + + CP0003 + System.Runtime.Caching, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.Runtime.Caching.dll + lib/netstandard2.0/System.Runtime.Caching.dll + true + + + CP0003 + System.Runtime.Caching, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.Runtime.Caching.dll + lib/netstandard2.0/System.Runtime.Caching.dll + true + + \ No newline at end of file diff --git a/src/libraries/System.Runtime.Caching/src/PACKAGE.md b/src/libraries/System.Runtime.Caching/src/PACKAGE.md index 172477bb6af149..5b79f3f7cfb01c 100644 --- a/src/libraries/System.Runtime.Caching/src/PACKAGE.md +++ b/src/libraries/System.Runtime.Caching/src/PACKAGE.md @@ -1,37 +1,46 @@ ## About -[System.Runtime.Caching](https://learn.microsoft.com/en-us/dotnet/api/system.runtime.caching?view=dotnet-plat-ext-7.0) ([NuGet package](https://www.nuget.org/packages/System.Runtime.Caching/)) is a packaged set of simple caching API's derived from those of the same namespace available in .Net Framework since 4.0. This package is intended for use as a bridge when porting .Net Framework applications to .Net Core. + -This `System.Runtime.Caching` package can be used with any [.NET implementation](/dotnet/standard/net-standard#net-implementation-support) that targets .NET Standard 2.0 or later. For example: -* .NET Core 3.1 or later. -* .Net Framework 4.5 or later. -* .Net 5.0 or late +Packaged set of simple caching API's derived from those of the same namespace available in .NET Framework since 4.0. This package is intended for use as a bridge when porting .NET Framework applications to .NET. -[Microsoft.Extensions.Caching.Memory](https://www.nuget.org/packages/Microsoft.Extensions.Caching.Memory/)/[IMemoryCache](https://learn.microsoft.com/en-us/aspnet/core/performance/caching/memory?view=aspnetcore-7.0) is recommended over `System.Runtime.Caching`/`MemoryCache` because it's better integrated into ASP.NET Core. For example, `IMemoryCache` works natively with ASP.NET Core [dependency injection](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/dependency-injection?view=aspnetcore-7.0). +[Microsoft.Extensions.Caching.Memory](https://www.nuget.org/packages/Microsoft.Extensions.Caching.Memory/)/[IMemoryCache](https://learn.microsoft.com/aspnet/core/performance/caching/memory?view=aspnetcore-7.0) is recommended over `System.Runtime.Caching`/`MemoryCache` because it's better integrated into ASP.NET Core. For example, `IMemoryCache` works natively with ASP.NET Core [dependency injection](https://learn.microsoft.com/aspnet/core/fundamentals/dependency-injection?view=aspnetcore-7.0). -> > [!IMPORTANT] -> Use `System.Runtime.Caching`/`MemoryCache` as a compatibility bridge when porting code from .NET 4.x to .NET Core. +**Use `System.Runtime.Caching`/`MemoryCache` as a compatibility bridge when porting code from .NET 4.x to .NET Core.** +## Key Features + + + +* Use caching facilities like in ASP.NET, but without a dependency on the System.Web assembly. +* Extensible caching mechanism +* Possible to create custom caching providers ## Main Types + + The main types provided by this library are: * `System.Runtime.Caching.MemoryCache` -## Remarks +## Additional Documentation -[MemoryCache.PhysicalMemoryLimit](https://learn.microsoft.com/en-us/dotnet/api/system.runtime.caching.memorycache.physicalmemorylimit?view=dotnet-plat-ext-7.0) property is only supported on windows. + -## Addtional Documentation +[MemoryCache.PhysicalMemoryLimit](https://learn.microsoft.com/dotnet/api/system.runtime.caching.memorycache.physicalmemorylimit?view=dotnet-plat-ext-7.0) property is only supported on windows. -* [Caching in .NET](https://learn.microsoft.com/en-us/dotnet/core/extensions/caching) -* [Cache in-memory in ASP.NET Core](https://learn.microsoft.com/en-us/aspnet/core/performance/caching/memory?view=aspnetcore-7.0 ) +* [Caching in .NET](https://learn.microsoft.com/dotnet/core/extensions/caching) +* [Cache in-memory in ASP.NET Core](https://learn.microsoft.com/aspnet/core/performance/caching/memory?view=aspnetcore-7.0 ) ## Related Packages + + * [Microsoft.Extensions.Caching.Memory](https://www.nuget.org/packages/Microsoft.Extensions.Caching.Memory/) ## Feedback & Contributing + + System.Runtime.Caching is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). \ No newline at end of file diff --git a/src/libraries/System.Runtime.CompilerServices.VisualC/System.Runtime.CompilerServices.VisualC.sln b/src/libraries/System.Runtime.CompilerServices.VisualC/System.Runtime.CompilerServices.VisualC.sln index 4401373e355a10..988d2c5b7dcf4a 100644 --- a/src/libraries/System.Runtime.CompilerServices.VisualC/System.Runtime.CompilerServices.VisualC.sln +++ b/src/libraries/System.Runtime.CompilerServices.VisualC/System.Runtime.CompilerServices.VisualC.sln @@ -13,6 +13,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{A60F4450-369D-4DF2-8FC0-462518A81DB9}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{A30BAAF3-634E-4E4F-B313-8C3FC945D577}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{8AB4F59A-F763-4673-8B43-C2745E0A8135}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{3ED6BA8D-BFDC-4CFD-8AB8-D925E4F09E46}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{4D9C87A8-C288-428B-86D5-B09077F2ACF1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{BAD43339-DFA1-4B78-84F2-5E4B89CCF618}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{ED06DBA3-D182-438E-A1EC-059194F3959D}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{65453C51-F488-4026-9596-05F765899247}" @@ -21,6 +31,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{27ADCE48-E13 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{07A6E36B-25A7-47FD-A399-7A722EABF7DF}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{E9DFE769-521F-426B-907D-F861F607401E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{041DE04E-8D55-4CF2-A174-2A836E8E4003}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{5B9F85DE-E93E-4509-8EF4-944BEFEFB419}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{EDCE44EC-0839-4737-9A81-9DE3E0B87404}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -55,6 +73,26 @@ Global {A60F4450-369D-4DF2-8FC0-462518A81DB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {A60F4450-369D-4DF2-8FC0-462518A81DB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {A60F4450-369D-4DF2-8FC0-462518A81DB9}.Release|Any CPU.Build.0 = Release|Any CPU + {A30BAAF3-634E-4E4F-B313-8C3FC945D577}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A30BAAF3-634E-4E4F-B313-8C3FC945D577}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A30BAAF3-634E-4E4F-B313-8C3FC945D577}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A30BAAF3-634E-4E4F-B313-8C3FC945D577}.Release|Any CPU.Build.0 = Release|Any CPU + {8AB4F59A-F763-4673-8B43-C2745E0A8135}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8AB4F59A-F763-4673-8B43-C2745E0A8135}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8AB4F59A-F763-4673-8B43-C2745E0A8135}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8AB4F59A-F763-4673-8B43-C2745E0A8135}.Release|Any CPU.Build.0 = Release|Any CPU + {3ED6BA8D-BFDC-4CFD-8AB8-D925E4F09E46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3ED6BA8D-BFDC-4CFD-8AB8-D925E4F09E46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3ED6BA8D-BFDC-4CFD-8AB8-D925E4F09E46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3ED6BA8D-BFDC-4CFD-8AB8-D925E4F09E46}.Release|Any CPU.Build.0 = Release|Any CPU + {4D9C87A8-C288-428B-86D5-B09077F2ACF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4D9C87A8-C288-428B-86D5-B09077F2ACF1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4D9C87A8-C288-428B-86D5-B09077F2ACF1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4D9C87A8-C288-428B-86D5-B09077F2ACF1}.Release|Any CPU.Build.0 = Release|Any CPU + {BAD43339-DFA1-4B78-84F2-5E4B89CCF618}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BAD43339-DFA1-4B78-84F2-5E4B89CCF618}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BAD43339-DFA1-4B78-84F2-5E4B89CCF618}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BAD43339-DFA1-4B78-84F2-5E4B89CCF618}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -67,6 +105,14 @@ Global {941D72C5-CA37-4745-B89D-2257517C5761} = {27ADCE48-E139-48C1-A838-A0B8FBDECF95} {8DBC1B4C-6689-429E-9315-1D935BC8A26E} = {07A6E36B-25A7-47FD-A399-7A722EABF7DF} {61212F97-E2E3-4602-BDBC-B0BB4C3C7AFD} = {07A6E36B-25A7-47FD-A399-7A722EABF7DF} + {A30BAAF3-634E-4E4F-B313-8C3FC945D577} = {E9DFE769-521F-426B-907D-F861F607401E} + {8AB4F59A-F763-4673-8B43-C2745E0A8135} = {E9DFE769-521F-426B-907D-F861F607401E} + {E9DFE769-521F-426B-907D-F861F607401E} = {EDCE44EC-0839-4737-9A81-9DE3E0B87404} + {3ED6BA8D-BFDC-4CFD-8AB8-D925E4F09E46} = {041DE04E-8D55-4CF2-A174-2A836E8E4003} + {4D9C87A8-C288-428B-86D5-B09077F2ACF1} = {041DE04E-8D55-4CF2-A174-2A836E8E4003} + {041DE04E-8D55-4CF2-A174-2A836E8E4003} = {EDCE44EC-0839-4737-9A81-9DE3E0B87404} + {BAD43339-DFA1-4B78-84F2-5E4B89CCF618} = {5B9F85DE-E93E-4509-8EF4-944BEFEFB419} + {5B9F85DE-E93E-4509-8EF4-944BEFEFB419} = {EDCE44EC-0839-4737-9A81-9DE3E0B87404} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {568C6D8F-F5AD-4703-A695-EA54585C33D0} diff --git a/src/libraries/System.Runtime.Extensions/tests/System/EnvironmentTests.cs b/src/libraries/System.Runtime.Extensions/tests/System/EnvironmentTests.cs index 98007d0688828f..f6a5dc1e51195e 100644 --- a/src/libraries/System.Runtime.Extensions/tests/System/EnvironmentTests.cs +++ b/src/libraries/System.Runtime.Extensions/tests/System/EnvironmentTests.cs @@ -59,6 +59,7 @@ public void CurrentManagedThreadId_Idempotent() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void CurrentManagedThreadId_DifferentForActiveThreads() { var ids = new HashSet(); diff --git a/src/libraries/System.Runtime.Extensions/tests/System/Progress.cs b/src/libraries/System.Runtime.Extensions/tests/System/Progress.cs index 8fd7a61603ecea..531b1b2729e349 100644 --- a/src/libraries/System.Runtime.Extensions/tests/System/Progress.cs +++ b/src/libraries/System.Runtime.Extensions/tests/System/Progress.cs @@ -18,6 +18,7 @@ public void Ctor() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void NoWorkQueuedIfNoHandlers() { RunWithoutSyncCtx(() => diff --git a/src/libraries/System.Runtime.Extensions/tests/System/Random.cs b/src/libraries/System.Runtime.Extensions/tests/System/Random.cs index 16c3a9a2353b7e..648a85ae8fc2cf 100644 --- a/src/libraries/System.Runtime.Extensions/tests/System/Random.cs +++ b/src/libraries/System.Runtime.Extensions/tests/System/Random.cs @@ -516,6 +516,7 @@ public void Shared_IsSingleton() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void Shared_ParallelUsage() { using var barrier = new Barrier(2); 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 3adaa9f9622889..0f5bce54f6882e 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 @@ -25,6 +25,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ancillary.Interop", "..\Sys EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{44BAE6F1-94C2-415B-9A16-3B8EC429B09B}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{4D8B7538-D933-4F3A-818D-4E19ABA7E182}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{6C60944F-4FE1-450F-884B-D523EDFCFAB3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{B8F2E56D-6571-466D-9EF2-9FCAD3FC6E5B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{42F9A600-BEC3-4F87-97EE-38E0DCAABC5A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{008873D5-9028-4FF3-8354-71F713748625}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{26A72FFB-871A-4F2F-A513-B2F6E09F358C}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{C22C479B-769A-4859-B974-E9B9D65918DE}" @@ -33,6 +43,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{F2C2C78A-CED EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{7973EAA3-43B6-4D78-B24C-38BA6BC0D1E3}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{569E6837-0771-4C08-BB09-460281030538}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{67F3A00A-AE6C-434C-927D-E5D38DE2DA2C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{1DFF019B-6B73-4E5A-A6DA-5EBEF4AA7EBF}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{F92020A9-28BE-4398-86FF-5CFE44C94882}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -91,6 +109,26 @@ Global {44BAE6F1-94C2-415B-9A16-3B8EC429B09B}.Debug|Any CPU.Build.0 = Debug|Any CPU {44BAE6F1-94C2-415B-9A16-3B8EC429B09B}.Release|Any CPU.ActiveCfg = Release|Any CPU {44BAE6F1-94C2-415B-9A16-3B8EC429B09B}.Release|Any CPU.Build.0 = Release|Any CPU + {4D8B7538-D933-4F3A-818D-4E19ABA7E182}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4D8B7538-D933-4F3A-818D-4E19ABA7E182}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4D8B7538-D933-4F3A-818D-4E19ABA7E182}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4D8B7538-D933-4F3A-818D-4E19ABA7E182}.Release|Any CPU.Build.0 = Release|Any CPU + {6C60944F-4FE1-450F-884B-D523EDFCFAB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6C60944F-4FE1-450F-884B-D523EDFCFAB3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6C60944F-4FE1-450F-884B-D523EDFCFAB3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6C60944F-4FE1-450F-884B-D523EDFCFAB3}.Release|Any CPU.Build.0 = Release|Any CPU + {B8F2E56D-6571-466D-9EF2-9FCAD3FC6E5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B8F2E56D-6571-466D-9EF2-9FCAD3FC6E5B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B8F2E56D-6571-466D-9EF2-9FCAD3FC6E5B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B8F2E56D-6571-466D-9EF2-9FCAD3FC6E5B}.Release|Any CPU.Build.0 = Release|Any CPU + {42F9A600-BEC3-4F87-97EE-38E0DCAABC5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {42F9A600-BEC3-4F87-97EE-38E0DCAABC5A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {42F9A600-BEC3-4F87-97EE-38E0DCAABC5A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {42F9A600-BEC3-4F87-97EE-38E0DCAABC5A}.Release|Any CPU.Build.0 = Release|Any CPU + {008873D5-9028-4FF3-8354-71F713748625}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {008873D5-9028-4FF3-8354-71F713748625}.Debug|Any CPU.Build.0 = Debug|Any CPU + {008873D5-9028-4FF3-8354-71F713748625}.Release|Any CPU.ActiveCfg = Release|Any CPU + {008873D5-9028-4FF3-8354-71F713748625}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -109,6 +147,14 @@ Global {09AA6758-0BD3-4312-9C07-AE9F1D50A3AD} = {F2C2C78A-CEDD-4DE0-9C3A-0195F00E0B4E} {B4E3E774-2C16-4CBF-87EF-88C547529B94} = {F2C2C78A-CEDD-4DE0-9C3A-0195F00E0B4E} {71A845ED-4344-41FC-8FCA-3AC9B6BA6C45} = {7973EAA3-43B6-4D78-B24C-38BA6BC0D1E3} + {4D8B7538-D933-4F3A-818D-4E19ABA7E182} = {569E6837-0771-4C08-BB09-460281030538} + {6C60944F-4FE1-450F-884B-D523EDFCFAB3} = {569E6837-0771-4C08-BB09-460281030538} + {569E6837-0771-4C08-BB09-460281030538} = {F92020A9-28BE-4398-86FF-5CFE44C94882} + {B8F2E56D-6571-466D-9EF2-9FCAD3FC6E5B} = {67F3A00A-AE6C-434C-927D-E5D38DE2DA2C} + {42F9A600-BEC3-4F87-97EE-38E0DCAABC5A} = {67F3A00A-AE6C-434C-927D-E5D38DE2DA2C} + {67F3A00A-AE6C-434C-927D-E5D38DE2DA2C} = {F92020A9-28BE-4398-86FF-5CFE44C94882} + {008873D5-9028-4FF3-8354-71F713748625} = {1DFF019B-6B73-4E5A-A6DA-5EBEF4AA7EBF} + {1DFF019B-6B73-4E5A-A6DA-5EBEF4AA7EBF} = {F92020A9-28BE-4398-86FF-5CFE44C94882} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {3FE64246-4AFA-424A-AE5D-7007E20451B5} diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/JSImportGenerator.csproj b/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/JSImportGenerator.csproj index fe6ffdb5238507..f57576c378c4a6 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/JSImportGenerator.csproj +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/JSImportGenerator.csproj @@ -15,7 +15,6 @@ - diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/Marshaling/BaseJSGenerator.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/Marshaling/BaseJSGenerator.cs index 97d158bb319dec..798be15bc45df5 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/Marshaling/BaseJSGenerator.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/Marshaling/BaseJSGenerator.cs @@ -22,7 +22,6 @@ protected BaseJSGenerator(MarshalerType marshalerType, IMarshallingGenerator inn } public ManagedTypeInfo AsNativeType(TypePositionInfo info) => _inner.AsNativeType(info); - public bool IsSupported(TargetFramework target, Version version) => _inner.IsSupported(target, version); public virtual bool UsesNativeIdentifier(TypePositionInfo info, StubCodeContext context) => _inner.UsesNativeIdentifier(info, context); public SignatureBehavior GetNativeSignatureBehavior(TypePositionInfo info) => _inner.GetNativeSignatureBehavior(info); public ValueBoundaryBehavior GetValueBoundaryBehavior(TypePositionInfo info, StubCodeContext context) => _inner.GetValueBoundaryBehavior(info, context); diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/Marshaling/EmptyJSGenerator.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/Marshaling/EmptyJSGenerator.cs index 075d464b2bde79..060902fc1098a2 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/Marshaling/EmptyJSGenerator.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/Marshaling/EmptyJSGenerator.cs @@ -14,7 +14,6 @@ internal sealed class EmptyJSGenerator : IJSMarshallingGenerator public IEnumerable GenerateBind(TypePositionInfo info, StubCodeContext context) => Array.Empty(); public SignatureBehavior GetNativeSignatureBehavior(TypePositionInfo info) => SignatureBehavior.ManagedTypeAndAttributes; public ValueBoundaryBehavior GetValueBoundaryBehavior(TypePositionInfo info, StubCodeContext context) => ValueBoundaryBehavior.ManagedIdentifier; - public bool IsSupported(TargetFramework target, Version version) => false; public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, StubCodeContext context, out GeneratorDiagnostic? diagnostic) => ByValueMarshalKindSupportDescriptor.Default.GetSupport(marshalKind, info, context, out diagnostic); public bool UsesNativeIdentifier(TypePositionInfo info, StubCodeContext context) => false; diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/Resources/Strings.resx b/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/Resources/Strings.resx index b06ebce2260316..1c6e47ef214f15 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/Resources/Strings.resx +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator/Resources/Strings.resx @@ -136,7 +136,7 @@ Specified type is not supported by source-generated JavaScript interop. - {0} The generated source will not handle marshalling of the return value of method '{1}'. + {0} The generated source will not handle marshalling of the return value of method '{1}'. For more information see https://aka.ms/dotnet-wasm-jsinterop {0} is a message containing additional details about what is not supported {1} is the name of the method @@ -144,21 +144,21 @@ Type is not supported by source-generated JavaScript interop. - The type '{0}' is not supported by source-generated JavaScript interop. The generated source will not handle marshalling of parameter '{1}'. + The type '{0}' is not supported by source-generated JavaScript interop. The generated source will not handle marshalling of parameter '{1}'. For more information see https://aka.ms/dotnet-wasm-jsinterop - The type '{0}' is not supported by source-generated JavaScript interop. The generated source will not handle marshalling of the return value of method '{1}'. + The type '{0}' is not supported by source-generated JavaScript interop. The generated source will not handle marshalling of the return value of method '{1}'. For more information see https://aka.ms/dotnet-wasm-jsinterop - {0} The generated source will not handle marshalling of parameter '{1}'. + {0} The generated source will not handle marshalling of parameter '{1}'. For more information see https://aka.ms/dotnet-wasm-jsinterop {0} is a message containing additional details about what is not supported {1} is the name of the parameter - The specified '{0}' configuration for the return value of method '{1}' is not supported by source-generated JavaScript interop. + The specified '{0}' configuration for the return value of method '{1}' is not supported by source-generated JavaScript interop. For more information see https://aka.ms/dotnet-wasm-jsinterop - The specified '{0}' configuration for parameter '{1}' is not supported by source-generated JavaScript interop. + The specified '{0}' configuration for parameter '{1}' is not supported by source-generated JavaScript interop. For more information see https://aka.ms/dotnet-wasm-jsinterop Invalid 'JSImportAttribute' usage @@ -167,10 +167,10 @@ Invalid 'JSExportAttribute' usage - Method '{0}' should be 'static', 'partial', and non-generic when marked with 'JSImportAttribute'. JavaScript interop source generation will ignore method '{0}'. + Method '{0}' should be 'static', 'partial', and non-generic when marked with 'JSImportAttribute'. JavaScript interop source generation will ignore method '{0}'. For more information see https://aka.ms/dotnet-wasm-jsinterop - Method '{0}' should be 'static', non-partial and non-generic when marked with 'JSExportAttribute'. JavaScript interop source generation will ignore method '{0}'. + Method '{0}' should be 'static', non-partial and non-generic when marked with 'JSExportAttribute'. JavaScript interop source generation will ignore method '{0}'. For more information see https://aka.ms/dotnet-wasm-jsinterop Methods marked with 'JSImportAttribute' should be 'static', 'partial', and non-generic. JavaScript interop source generation will ignore methods that are non-'static', non-'partial', or generic. @@ -179,7 +179,7 @@ Methods marked with 'JSImportAttribute' should be 'static', non-partial, and non-generic. JavaScript interop source generation will ignore methods that are non-'static', 'partial', or generic. - Method '{0}' is contained in a type '{1}' that is not marked 'partial'. JavaScript interop source generation will ignore method '{0}'. + Method '{0}' is contained in a type '{1}' that is not marked 'partial'. JavaScript interop source generation will ignore method '{0}'. For more information see https://aka.ms/dotnet-wasm-jsinterop 'JSType.Discard' could be only used with void return argument. @@ -212,18 +212,18 @@ JSImportAttribute requires unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. - JSImportAttribute requires unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. + JSImportAttribute requires unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. For more information see https://aka.ms/dotnet-wasm-jsinterop - JSImportAttribute requires unsafe code. + JSImportAttribute requires unsafe code. For more information see https://aka.ms/dotnet-wasm-jsinterop JSExportAttribute requires unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. - JSExportAttribute requires unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. + JSExportAttribute requires unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. For more information see https://aka.ms/dotnet-wasm-jsinterop - JSExportAttribute requires unsafe code. + JSExportAttribute requires unsafe code. For more information see https://aka.ms/dotnet-wasm-jsinterop \ No newline at end of file diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/CompatibilitySuppressions.WasmThreads.xml b/src/libraries/System.Runtime.InteropServices.JavaScript/src/CompatibilitySuppressions.WasmThreads.xml index 5f6463b6131369..e6ca924ab4d70e 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/CompatibilitySuppressions.WasmThreads.xml +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/CompatibilitySuppressions.WasmThreads.xml @@ -3,7 +3,7 @@ CP0001 T:System.Runtime.InteropServices.JavaScript.WebWorker - ref/net8.0/System.Runtime.InteropServices.JavaScript.dll - runtimes/browser/lib/net8.0/System.Runtime.InteropServices.JavaScript.dll + ref/net9.0/System.Runtime.InteropServices.JavaScript.dll + runtimes/browser/lib/net9.0/System.Runtime.InteropServices.JavaScript.dll diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/CompatibilitySuppressions.xml b/src/libraries/System.Runtime.InteropServices.JavaScript/src/CompatibilitySuppressions.xml index 0f9c4fcf9fb0ff..74336f2b956571 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/CompatibilitySuppressions.xml @@ -3,62 +3,62 @@ CP0001 T:System.Runtime.InteropServices.JavaScript.Array - ref/net8.0/System.Runtime.InteropServices.JavaScript.dll - runtimes/browser/lib/net8.0/System.Runtime.InteropServices.JavaScript.dll + ref/net9.0/System.Runtime.InteropServices.JavaScript.dll + runtimes/browser/lib/net9.0/System.Runtime.InteropServices.JavaScript.dll CP0001 T:System.Runtime.InteropServices.JavaScript.ArrayBuffer - ref/net8.0/System.Runtime.InteropServices.JavaScript.dll - runtimes/browser/lib/net8.0/System.Runtime.InteropServices.JavaScript.dll + ref/net9.0/System.Runtime.InteropServices.JavaScript.dll + runtimes/browser/lib/net9.0/System.Runtime.InteropServices.JavaScript.dll CP0001 T:System.Runtime.InteropServices.JavaScript.DataView - ref/net8.0/System.Runtime.InteropServices.JavaScript.dll - runtimes/browser/lib/net8.0/System.Runtime.InteropServices.JavaScript.dll + ref/net9.0/System.Runtime.InteropServices.JavaScript.dll + runtimes/browser/lib/net9.0/System.Runtime.InteropServices.JavaScript.dll CP0001 T:System.Runtime.InteropServices.JavaScript.Function - ref/net8.0/System.Runtime.InteropServices.JavaScript.dll - runtimes/browser/lib/net8.0/System.Runtime.InteropServices.JavaScript.dll + ref/net9.0/System.Runtime.InteropServices.JavaScript.dll + runtimes/browser/lib/net9.0/System.Runtime.InteropServices.JavaScript.dll CP0001 T:System.Runtime.InteropServices.JavaScript.Runtime - ref/net8.0/System.Runtime.InteropServices.JavaScript.dll - runtimes/browser/lib/net8.0/System.Runtime.InteropServices.JavaScript.dll + ref/net9.0/System.Runtime.InteropServices.JavaScript.dll + runtimes/browser/lib/net9.0/System.Runtime.InteropServices.JavaScript.dll CP0001 T:System.Runtime.InteropServices.JavaScript.Uint8Array - ref/net8.0/System.Runtime.InteropServices.JavaScript.dll - runtimes/browser/lib/net8.0/System.Runtime.InteropServices.JavaScript.dll + ref/net9.0/System.Runtime.InteropServices.JavaScript.dll + runtimes/browser/lib/net9.0/System.Runtime.InteropServices.JavaScript.dll CP0001 T:System.Runtime.InteropServices.JavaScript.SynchronizationContextExtension - ref/net8.0/System.Runtime.InteropServices.JavaScript.dll - runtimes/browser/lib/net8.0/System.Runtime.InteropServices.JavaScript.dll + ref/net9.0/System.Runtime.InteropServices.JavaScript.dll + runtimes/browser/lib/net9.0/System.Runtime.InteropServices.JavaScript.dll CP0001 T:System.Runtime.InteropServices.JavaScript.CancelablePromise - ref/net8.0/System.Runtime.InteropServices.JavaScript.dll - runtimes/browser/lib/net8.0/System.Runtime.InteropServices.JavaScript.dll + ref/net9.0/System.Runtime.InteropServices.JavaScript.dll + runtimes/browser/lib/net9.0/System.Runtime.InteropServices.JavaScript.dll CP0002 M:System.Runtime.InteropServices.JavaScript.JSObject.get_SynchronizationContext - ref/net8.0/System.Runtime.InteropServices.JavaScript.dll - runtimes/browser/lib/net8.0/System.Runtime.InteropServices.JavaScript.dll + ref/net9.0/System.Runtime.InteropServices.JavaScript.dll + runtimes/browser/lib/net9.0/System.Runtime.InteropServices.JavaScript.dll CP0002 M:System.Runtime.InteropServices.JavaScript.JSHost.get_CurrentOrMainJSSynchronizationContext - ref/net8.0/System.Runtime.InteropServices.JavaScript.dll - runtimes/browser/lib/net8.0/System.Runtime.InteropServices.JavaScript.dll + ref/net9.0/System.Runtime.InteropServices.JavaScript.dll + runtimes/browser/lib/net9.0/System.Runtime.InteropServices.JavaScript.dll diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/CancelablePromise.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/CancelablePromise.cs index d1bbf48f1c4de7..7a8a0aa1f2d9f6 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/CancelablePromise.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/CancelablePromise.cs @@ -32,7 +32,7 @@ public static void CancelPromise(Task promise) #endif } - public static void CancelPromise(Task promise, Action callback, T1 state1, T2 state2) + public static void CancelPromise(Task promise, Action callback, T state) { // this check makes sure that promiseGCHandle is still valid handle if (promise.IsCompleted) @@ -48,7 +48,7 @@ public static void CancelPromise(Task promise, Action callback, { #endif _CancelPromise(holder.GCHandle); - callback.Invoke(state1, state2); + callback.Invoke(state); #if FEATURE_WASM_THREADS }, holder); #endif diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSHostImplementation.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSHostImplementation.cs index 248740b9ce89a2..4e5b68c30ff717 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSHostImplementation.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSHostImplementation.cs @@ -159,10 +159,10 @@ public static async Task CancelationHelper(Task jsTask, Canc { return jsTask.Result; } - using (var receiveRegistration = cancellationToken.Register(() => + using (var receiveRegistration = cancellationToken.Register(static s => { - CancelablePromise.CancelPromise(jsTask); - })) + CancelablePromise.CancelPromise((Task)s!); + }, jsTask)) { return await jsTask.ConfigureAwait(true); } diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/tests/JSImportGenerator.UnitTest/Fails.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/tests/JSImportGenerator.UnitTest/Fails.cs index 513af4747a4e92..f5ffe77afb7949 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/tests/JSImportGenerator.UnitTest/Fails.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/tests/JSImportGenerator.UnitTest/Fails.cs @@ -15,39 +15,39 @@ public class Fails public static IEnumerable CodeSnippetsToFail() { yield return new object?[] { CodeSnippets.DefaultReturnMarshaler(), new string[] { - "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of long. The generated source will not handle marshalling of the return value of method 'Import1'.", - "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of long. The generated source will not handle marshalling of the return value of method 'Export1'.", + "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of long. The generated source will not handle marshalling of the return value of method 'Import1'. For more information see https://aka.ms/dotnet-wasm-jsinterop", + "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of long. The generated source will not handle marshalling of the return value of method 'Export1'. For more information see https://aka.ms/dotnet-wasm-jsinterop", },null }; yield return new object?[] { CodeSnippets.DefaultReturnMarshaler(), null, null }; yield return new object?[] { CodeSnippets.DefaultReturnMarshaler("System.Func"), null, null }; yield return new object?[] { CodeSnippets.DefaultReturnMarshaler("System.Action"), new string[] { - "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of global::System.Action. The generated source will not handle marshalling of the return value of method 'Import1'.", - "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of global::System.Action. The generated source will not handle marshalling of the return value of method 'Export1'.", + "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of global::System.Action. The generated source will not handle marshalling of the return value of method 'Import1'. For more information see https://aka.ms/dotnet-wasm-jsinterop", + "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of global::System.Action. The generated source will not handle marshalling of the return value of method 'Export1'. For more information see https://aka.ms/dotnet-wasm-jsinterop", },null }; yield return new object?[] { CodeSnippets.DefaultReturnMarshaler("System.Span"), null, null }; yield return new object?[] { CodeSnippets.DefaultReturnMarshaler("System.Span"), null, null }; yield return new object?[] { CodeSnippets.DefaultReturnMarshaler("System.ArraySegment"), null, null }; yield return new object?[] { CodeSnippets.AllMissing, new string[] { - "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of object. The generated source will not handle marshalling of parameter 'a1'.", - "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of long. The generated source will not handle marshalling of parameter 'a2'.", - "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of long. The generated source will not handle marshalling of parameter 'a3'.", - "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of global::System.Action. The generated source will not handle marshalling of parameter 'a4'.", - "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of global::System.Func. The generated source will not handle marshalling of parameter 'a5'.", - "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of global::System.Span. The generated source will not handle marshalling of parameter 'a6'.", - "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of global::System.ArraySegment. The generated source will not handle marshalling of parameter 'a7'.", - "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of global::System.Threading.Tasks.Task. The generated source will not handle marshalling of parameter 'a8'.", - "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of object[]. The generated source will not handle marshalling of parameter 'a9'.", - "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of global::System.DateTime. The generated source will not handle marshalling of parameter 'a10'.", - "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of global::System.DateTimeOffset. The generated source will not handle marshalling of parameter 'a11'.", - "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of global::System.Threading.Tasks.Task. The generated source will not handle marshalling of parameter 'a12'.", - "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of global::System.Threading.Tasks.Task. The generated source will not handle marshalling of parameter 'a13'.", - "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of global::System.Threading.Tasks.Task. The generated source will not handle marshalling of parameter 'a14'.", - "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of global::System.Threading.Tasks.Task. The generated source will not handle marshalling of parameter 'a15'.", + "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of object. The generated source will not handle marshalling of parameter 'a1'. For more information see https://aka.ms/dotnet-wasm-jsinterop", + "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of long. The generated source will not handle marshalling of parameter 'a2'. For more information see https://aka.ms/dotnet-wasm-jsinterop", + "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of long. The generated source will not handle marshalling of parameter 'a3'. For more information see https://aka.ms/dotnet-wasm-jsinterop", + "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of global::System.Action. The generated source will not handle marshalling of parameter 'a4'. For more information see https://aka.ms/dotnet-wasm-jsinterop", + "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of global::System.Func. The generated source will not handle marshalling of parameter 'a5'. For more information see https://aka.ms/dotnet-wasm-jsinterop", + "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of global::System.Span. The generated source will not handle marshalling of parameter 'a6'. For more information see https://aka.ms/dotnet-wasm-jsinterop", + "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of global::System.ArraySegment. The generated source will not handle marshalling of parameter 'a7'. For more information see https://aka.ms/dotnet-wasm-jsinterop", + "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of global::System.Threading.Tasks.Task. The generated source will not handle marshalling of parameter 'a8'. For more information see https://aka.ms/dotnet-wasm-jsinterop", + "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of object[]. The generated source will not handle marshalling of parameter 'a9'. For more information see https://aka.ms/dotnet-wasm-jsinterop", + "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of global::System.DateTime. The generated source will not handle marshalling of parameter 'a10'. For more information see https://aka.ms/dotnet-wasm-jsinterop", + "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of global::System.DateTimeOffset. The generated source will not handle marshalling of parameter 'a11'. For more information see https://aka.ms/dotnet-wasm-jsinterop", + "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of global::System.Threading.Tasks.Task. The generated source will not handle marshalling of parameter 'a12'. For more information see https://aka.ms/dotnet-wasm-jsinterop", + "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of global::System.Threading.Tasks.Task. The generated source will not handle marshalling of parameter 'a13'. For more information see https://aka.ms/dotnet-wasm-jsinterop", + "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of global::System.Threading.Tasks.Task. The generated source will not handle marshalling of parameter 'a14'. For more information see https://aka.ms/dotnet-wasm-jsinterop", + "Please annotate the argument with 'JSMarshalAsAttribute' to specify marshaling of global::System.Threading.Tasks.Task. The generated source will not handle marshalling of parameter 'a15'. For more information see https://aka.ms/dotnet-wasm-jsinterop", },null }; yield return new object?[] { CodeSnippets.InOutRef, new string[] { - "Parameters with 'in', 'out' and 'ref' modifiers are not supported by source-generated JavaScript interop. The generated source will not handle marshalling of parameter 'a1'.", - "Parameters with 'in', 'out' and 'ref' modifiers are not supported by source-generated JavaScript interop. The generated source will not handle marshalling of parameter 'a2'.", - "Parameters with 'in', 'out' and 'ref' modifiers are not supported by source-generated JavaScript interop. The generated source will not handle marshalling of parameter 'a3'.", + "Parameters with 'in', 'out' and 'ref' modifiers are not supported by source-generated JavaScript interop. The generated source will not handle marshalling of parameter 'a1'. For more information see https://aka.ms/dotnet-wasm-jsinterop", + "Parameters with 'in', 'out' and 'ref' modifiers are not supported by source-generated JavaScript interop. The generated source will not handle marshalling of parameter 'a2'. For more information see https://aka.ms/dotnet-wasm-jsinterop", + "Parameters with 'in', 'out' and 'ref' modifiers are not supported by source-generated JavaScript interop. The generated source will not handle marshalling of parameter 'a3'. For more information see https://aka.ms/dotnet-wasm-jsinterop", }, null }; } diff --git a/src/libraries/System.Runtime.InteropServices.RuntimeInformation/tests/CheckArchitectureTests.cs b/src/libraries/System.Runtime.InteropServices.RuntimeInformation/tests/CheckArchitectureTests.cs index 29c91dce7580ca..74612fb75b5728 100644 --- a/src/libraries/System.Runtime.InteropServices.RuntimeInformation/tests/CheckArchitectureTests.cs +++ b/src/libraries/System.Runtime.InteropServices.RuntimeInformation/tests/CheckArchitectureTests.cs @@ -60,6 +60,10 @@ public void VerifyArchitecture() Assert.Equal(Architecture.Ppc64le, processArch); break; + case Architecture.RiscV64: + Assert.Equal(Architecture.RiscV64, processArch); + break; + default: Assert.False(true, "Unexpected Architecture."); break; diff --git a/src/libraries/System.Runtime.InteropServices/System.Runtime.InteropServices.sln b/src/libraries/System.Runtime.InteropServices/System.Runtime.InteropServices.sln index 1bf3d501dabe44..e9534f4a25c813 100644 --- a/src/libraries/System.Runtime.InteropServices/System.Runtime.InteropServices.sln +++ b/src/libraries/System.Runtime.InteropServices/System.Runtime.InteropServices.sln @@ -1,8 +1,4 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.7.33711.456 -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", "{94B59BA0-491F-4B59-ADFF-A057EC3EC835}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}" @@ -57,21 +53,36 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading", "..\Syst EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading", "..\System.Threading\src\System.Threading.csproj", "{C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B1678CCD-95C8-4419-B9F9-14A03061BE4B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{5600CDE1-139F-461B-8DD9-86FCC499DCC2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{169B126B-48DF-425C-B902-D376A689D9FB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{8EA17297-41EE-4CEE-AF61-F047D6F7A1AB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{1347FE73-506C-4C44-A469-979F6ADB78BE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{B36C9254-0C55-414E-8403-03B4F18D5F35}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{052823B7-A9E0-41DE-87D8-D1CAF407B41D}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{FB99AC59-1744-4F12-A4B0-0D54FCA048BF}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{D893B9AA-57C5-49E3-97B1-12CC62D84307}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B1678CCD-95C8-4419-B9F9-14A03061BE4B}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{E1AEBD5D-AE4E-4F61-B9ED-AEF950B0CC33}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{8826C1E1-CEBD-49F8-9BC8-97FECE60F9B9}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{7B3C7C2F-58E0-4EE5-B904-9C978F40FD33}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{5114BD7E-8492-452A-8DAA-BF971D74A66D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{8FA3249B-3567-4C76-BA32-9488FC92994D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Checked|Any CPU = Checked|Any CPU - Checked|arm = Checked|arm - Checked|arm64 = Checked|arm64 - Checked|x64 = Checked|x64 - Checked|x86 = Checked|x86 Debug|Any CPU = Debug|Any CPU Debug|arm = Debug|arm Debug|arm64 = Debug|arm64 @@ -82,18 +93,13 @@ Global Release|arm64 = Release|arm64 Release|x64 = Release|x64 Release|x86 = Release|x86 + Checked|Any CPU = Checked|Any CPU + Checked|arm = Checked|arm + Checked|arm64 = Checked|arm64 + Checked|x64 = Checked|x64 + Checked|x86 = Checked|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|Any CPU.ActiveCfg = Checked|x64 - {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|Any CPU.Build.0 = Checked|x64 - {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|arm.ActiveCfg = Checked|arm - {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|arm.Build.0 = Checked|arm - {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|arm64.ActiveCfg = Checked|arm64 - {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|arm64.Build.0 = Checked|arm64 - {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|x64.ActiveCfg = Checked|x64 - {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|x64.Build.0 = Checked|x64 - {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|x86.ActiveCfg = Checked|x86 - {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|x86.Build.0 = Checked|x86 {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Debug|Any CPU.ActiveCfg = Debug|x64 {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Debug|Any CPU.Build.0 = Debug|x64 {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Debug|arm.ActiveCfg = Debug|arm @@ -114,11 +120,16 @@ Global {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Release|x64.Build.0 = Release|x64 {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Release|x86.ActiveCfg = Release|x86 {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Release|x86.Build.0 = Release|x86 - {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|arm.ActiveCfg = Debug|Any CPU - {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|arm64.ActiveCfg = Debug|Any CPU - {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|x64.ActiveCfg = Debug|Any CPU - {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|x86.ActiveCfg = Debug|Any CPU + {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|Any CPU.ActiveCfg = Checked|x64 + {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|Any CPU.Build.0 = Checked|x64 + {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|arm.ActiveCfg = Checked|arm + {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|arm.Build.0 = Checked|arm + {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|arm64.ActiveCfg = Checked|arm64 + {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|arm64.Build.0 = Checked|arm64 + {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|x64.ActiveCfg = Checked|x64 + {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|x64.Build.0 = Checked|x64 + {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|x86.ActiveCfg = Checked|x86 + {94B59BA0-491F-4B59-ADFF-A057EC3EC835}.Checked|x86.Build.0 = Checked|x86 {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Debug|Any CPU.Build.0 = Debug|Any CPU {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -135,11 +146,11 @@ Global {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Release|x64.Build.0 = Release|Any CPU {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Release|x86.ActiveCfg = Release|Any CPU {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Release|x86.Build.0 = Release|Any CPU - {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Checked|arm.ActiveCfg = Debug|Any CPU - {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Checked|arm64.ActiveCfg = Debug|Any CPU - {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Checked|x64.ActiveCfg = Debug|Any CPU - {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Checked|x86.ActiveCfg = Debug|Any CPU + {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|arm.ActiveCfg = Debug|Any CPU + {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|arm64.ActiveCfg = Debug|Any CPU + {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|x64.ActiveCfg = Debug|Any CPU + {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA}.Checked|x86.ActiveCfg = Debug|Any CPU {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Debug|Any CPU.Build.0 = Debug|Any CPU {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -156,11 +167,11 @@ Global {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Release|x64.Build.0 = Release|Any CPU {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Release|x86.ActiveCfg = Release|Any CPU {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Release|x86.Build.0 = Release|Any CPU - {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Checked|arm.ActiveCfg = Debug|Any CPU - {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Checked|arm64.ActiveCfg = Debug|Any CPU - {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Checked|x64.ActiveCfg = Debug|Any CPU - {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Checked|x86.ActiveCfg = Debug|Any CPU + {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Checked|arm.ActiveCfg = Debug|Any CPU + {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Checked|arm64.ActiveCfg = Debug|Any CPU + {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Checked|x64.ActiveCfg = Debug|Any CPU + {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0}.Checked|x86.ActiveCfg = Debug|Any CPU {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Debug|Any CPU.Build.0 = Debug|Any CPU {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -177,11 +188,11 @@ Global {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Release|x64.Build.0 = Release|Any CPU {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Release|x86.ActiveCfg = Release|Any CPU {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.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|arm.ActiveCfg = Debug|Any CPU - {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|arm64.ActiveCfg = Debug|Any CPU - {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|x64.ActiveCfg = Debug|Any CPU - {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|x86.ActiveCfg = Debug|Any CPU + {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Checked|arm.ActiveCfg = Debug|Any CPU + {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Checked|arm64.ActiveCfg = Debug|Any CPU + {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Checked|x64.ActiveCfg = Debug|Any CPU + {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69}.Checked|x86.ActiveCfg = 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|arm.ActiveCfg = Debug|Any CPU @@ -198,11 +209,11 @@ Global {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Release|x64.Build.0 = Release|Any CPU {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Release|x86.ActiveCfg = Release|Any CPU {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Release|x86.Build.0 = Release|Any CPU - {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Checked|arm.ActiveCfg = Debug|Any CPU - {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Checked|arm64.ActiveCfg = Debug|Any CPU - {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Checked|x64.ActiveCfg = Debug|Any CPU - {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Checked|x86.ActiveCfg = Debug|Any CPU + {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|arm.ActiveCfg = Debug|Any CPU + {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|arm64.ActiveCfg = Debug|Any CPU + {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|x64.ActiveCfg = Debug|Any CPU + {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A}.Checked|x86.ActiveCfg = Debug|Any CPU {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Debug|Any CPU.Build.0 = Debug|Any CPU {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -219,11 +230,11 @@ Global {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Release|x64.Build.0 = Release|Any CPU {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Release|x86.ActiveCfg = Release|Any CPU {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Release|x86.Build.0 = Release|Any CPU - {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Checked|arm.ActiveCfg = Debug|Any CPU - {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Checked|arm64.ActiveCfg = Debug|Any CPU - {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Checked|x64.ActiveCfg = Debug|Any CPU - {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Checked|x86.ActiveCfg = Debug|Any CPU + {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Checked|arm.ActiveCfg = Debug|Any CPU + {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Checked|arm64.ActiveCfg = Debug|Any CPU + {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Checked|x64.ActiveCfg = Debug|Any CPU + {C4B641C3-3317-4913-91DA-0DA3B64BABED}.Checked|x86.ActiveCfg = Debug|Any CPU {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Debug|Any CPU.Build.0 = Debug|Any CPU {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -240,11 +251,11 @@ Global {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Release|x64.Build.0 = Release|Any CPU {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Release|x86.ActiveCfg = Release|Any CPU {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Release|x86.Build.0 = Release|Any CPU - {716ED44B-37C8-4776-BE70-285952D2B30D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {716ED44B-37C8-4776-BE70-285952D2B30D}.Checked|arm.ActiveCfg = Debug|Any CPU - {716ED44B-37C8-4776-BE70-285952D2B30D}.Checked|arm64.ActiveCfg = Debug|Any CPU - {716ED44B-37C8-4776-BE70-285952D2B30D}.Checked|x64.ActiveCfg = Debug|Any CPU - {716ED44B-37C8-4776-BE70-285952D2B30D}.Checked|x86.ActiveCfg = Debug|Any CPU + {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Checked|arm.ActiveCfg = Debug|Any CPU + {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Checked|arm64.ActiveCfg = Debug|Any CPU + {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Checked|x64.ActiveCfg = Debug|Any CPU + {3FB6F2AA-E763-4336-B927-18AB7AAF6C20}.Checked|x86.ActiveCfg = Debug|Any CPU {716ED44B-37C8-4776-BE70-285952D2B30D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {716ED44B-37C8-4776-BE70-285952D2B30D}.Debug|Any CPU.Build.0 = Debug|Any CPU {716ED44B-37C8-4776-BE70-285952D2B30D}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -261,11 +272,11 @@ Global {716ED44B-37C8-4776-BE70-285952D2B30D}.Release|x64.Build.0 = Release|Any CPU {716ED44B-37C8-4776-BE70-285952D2B30D}.Release|x86.ActiveCfg = Release|Any CPU {716ED44B-37C8-4776-BE70-285952D2B30D}.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|arm.ActiveCfg = Debug|Any CPU - {1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|arm64.ActiveCfg = Debug|Any CPU - {1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|x64.ActiveCfg = Debug|Any CPU - {1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|x86.ActiveCfg = Debug|Any CPU + {716ED44B-37C8-4776-BE70-285952D2B30D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {716ED44B-37C8-4776-BE70-285952D2B30D}.Checked|arm.ActiveCfg = Debug|Any CPU + {716ED44B-37C8-4776-BE70-285952D2B30D}.Checked|arm64.ActiveCfg = Debug|Any CPU + {716ED44B-37C8-4776-BE70-285952D2B30D}.Checked|x64.ActiveCfg = Debug|Any CPU + {716ED44B-37C8-4776-BE70-285952D2B30D}.Checked|x86.ActiveCfg = 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|arm.ActiveCfg = Debug|Any CPU @@ -282,11 +293,11 @@ Global {1B248B4C-7584-4C04-850A-A50EB592052C}.Release|x64.Build.0 = Release|Any CPU {1B248B4C-7584-4C04-850A-A50EB592052C}.Release|x86.ActiveCfg = Release|Any CPU {1B248B4C-7584-4C04-850A-A50EB592052C}.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|arm.ActiveCfg = Debug|Any CPU - {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Checked|arm64.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 + {1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|arm.ActiveCfg = Debug|Any CPU + {1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|arm64.ActiveCfg = Debug|Any CPU + {1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|x64.ActiveCfg = Debug|Any CPU + {1B248B4C-7584-4C04-850A-A50EB592052C}.Checked|x86.ActiveCfg = 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|arm.ActiveCfg = Debug|Any CPU @@ -303,11 +314,11 @@ Global {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 - {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Checked|arm.ActiveCfg = Debug|Any CPU - {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Checked|arm64.ActiveCfg = Debug|Any CPU - {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Checked|x64.ActiveCfg = Debug|Any CPU - {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Checked|x86.ActiveCfg = Debug|Any CPU + {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Checked|arm.ActiveCfg = Debug|Any CPU + {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886}.Checked|arm64.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 {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Debug|Any CPU.Build.0 = Debug|Any CPU {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -324,11 +335,11 @@ Global {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Release|x64.Build.0 = Release|Any CPU {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Release|x86.ActiveCfg = Release|Any CPU {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.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|arm.ActiveCfg = Debug|Any CPU - {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|arm64.ActiveCfg = Debug|Any CPU - {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|x64.ActiveCfg = Debug|Any CPU - {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|x86.ActiveCfg = Debug|Any CPU + {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Checked|arm.ActiveCfg = Debug|Any CPU + {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Checked|arm64.ActiveCfg = Debug|Any CPU + {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.Checked|x64.ActiveCfg = Debug|Any CPU + {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5}.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|arm.ActiveCfg = Debug|Any CPU @@ -345,11 +356,11 @@ Global {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Release|x64.Build.0 = Release|Any CPU {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Release|x86.ActiveCfg = Release|Any CPU {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.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|arm.ActiveCfg = Debug|Any CPU - {768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|arm64.ActiveCfg = Debug|Any CPU - {768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|x64.ActiveCfg = Debug|Any CPU - {768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|x86.ActiveCfg = Debug|Any CPU + {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|arm.ActiveCfg = Debug|Any CPU + {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|arm64.ActiveCfg = Debug|Any CPU + {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|x64.ActiveCfg = Debug|Any CPU + {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40}.Checked|x86.ActiveCfg = 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|arm.ActiveCfg = Debug|Any CPU @@ -366,11 +377,11 @@ Global {768B77B0-EA45-469D-B39E-545EB72F5A43}.Release|x64.Build.0 = Release|Any CPU {768B77B0-EA45-469D-B39E-545EB72F5A43}.Release|x86.ActiveCfg = Release|Any CPU {768B77B0-EA45-469D-B39E-545EB72F5A43}.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|arm.ActiveCfg = Debug|Any CPU - {8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|arm64.ActiveCfg = Debug|Any CPU - {8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|x64.ActiveCfg = Debug|Any CPU - {8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|x86.ActiveCfg = Debug|Any CPU + {768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|arm.ActiveCfg = Debug|Any CPU + {768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|arm64.ActiveCfg = Debug|Any CPU + {768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|x64.ActiveCfg = Debug|Any CPU + {768B77B0-EA45-469D-B39E-545EB72F5A43}.Checked|x86.ActiveCfg = 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|arm.ActiveCfg = Debug|Any CPU @@ -387,11 +398,11 @@ Global {8671F164-F78C-44FA-93B7-A310F67890FE}.Release|x64.Build.0 = Release|Any CPU {8671F164-F78C-44FA-93B7-A310F67890FE}.Release|x86.ActiveCfg = Release|Any CPU {8671F164-F78C-44FA-93B7-A310F67890FE}.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|arm.ActiveCfg = Debug|Any CPU - {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|arm64.ActiveCfg = Debug|Any CPU - {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|x64.ActiveCfg = Debug|Any CPU - {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|x86.ActiveCfg = Debug|Any CPU + {8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|arm.ActiveCfg = Debug|Any CPU + {8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|arm64.ActiveCfg = Debug|Any CPU + {8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|x64.ActiveCfg = Debug|Any CPU + {8671F164-F78C-44FA-93B7-A310F67890FE}.Checked|x86.ActiveCfg = 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|arm.ActiveCfg = Debug|Any CPU @@ -408,11 +419,11 @@ Global {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Release|x64.Build.0 = Release|Any CPU {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Release|x86.ActiveCfg = Release|Any CPU {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.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|arm.ActiveCfg = Debug|Any CPU - {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|arm64.ActiveCfg = Debug|Any CPU - {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|x64.ActiveCfg = Debug|Any CPU - {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|x86.ActiveCfg = Debug|Any CPU + {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|arm.ActiveCfg = Debug|Any CPU + {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|arm64.ActiveCfg = Debug|Any CPU + {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|x64.ActiveCfg = Debug|Any CPU + {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1}.Checked|x86.ActiveCfg = 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|arm.ActiveCfg = Debug|Any CPU @@ -429,11 +440,11 @@ Global {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Release|x64.Build.0 = Release|Any CPU {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Release|x86.ActiveCfg = Release|Any CPU {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Release|x86.Build.0 = Release|Any CPU - {3741C833-C364-4269-9B1D-D442055DA7CE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {3741C833-C364-4269-9B1D-D442055DA7CE}.Checked|arm.ActiveCfg = Debug|Any CPU - {3741C833-C364-4269-9B1D-D442055DA7CE}.Checked|arm64.ActiveCfg = Debug|Any CPU - {3741C833-C364-4269-9B1D-D442055DA7CE}.Checked|x64.ActiveCfg = Debug|Any CPU - {3741C833-C364-4269-9B1D-D442055DA7CE}.Checked|x86.ActiveCfg = Debug|Any CPU + {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|arm.ActiveCfg = Debug|Any CPU + {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|arm64.ActiveCfg = Debug|Any CPU + {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|x64.ActiveCfg = Debug|Any CPU + {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E}.Checked|x86.ActiveCfg = Debug|Any CPU {3741C833-C364-4269-9B1D-D442055DA7CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3741C833-C364-4269-9B1D-D442055DA7CE}.Debug|Any CPU.Build.0 = Debug|Any CPU {3741C833-C364-4269-9B1D-D442055DA7CE}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -450,11 +461,11 @@ Global {3741C833-C364-4269-9B1D-D442055DA7CE}.Release|x64.Build.0 = Release|Any CPU {3741C833-C364-4269-9B1D-D442055DA7CE}.Release|x86.ActiveCfg = Release|Any CPU {3741C833-C364-4269-9B1D-D442055DA7CE}.Release|x86.Build.0 = Release|Any CPU - {1D771995-D475-429B-AC31-2B1F618AA45F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {1D771995-D475-429B-AC31-2B1F618AA45F}.Checked|arm.ActiveCfg = Debug|Any CPU - {1D771995-D475-429B-AC31-2B1F618AA45F}.Checked|arm64.ActiveCfg = Debug|Any CPU - {1D771995-D475-429B-AC31-2B1F618AA45F}.Checked|x64.ActiveCfg = Debug|Any CPU - {1D771995-D475-429B-AC31-2B1F618AA45F}.Checked|x86.ActiveCfg = Debug|Any CPU + {3741C833-C364-4269-9B1D-D442055DA7CE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {3741C833-C364-4269-9B1D-D442055DA7CE}.Checked|arm.ActiveCfg = Debug|Any CPU + {3741C833-C364-4269-9B1D-D442055DA7CE}.Checked|arm64.ActiveCfg = Debug|Any CPU + {3741C833-C364-4269-9B1D-D442055DA7CE}.Checked|x64.ActiveCfg = Debug|Any CPU + {3741C833-C364-4269-9B1D-D442055DA7CE}.Checked|x86.ActiveCfg = Debug|Any CPU {1D771995-D475-429B-AC31-2B1F618AA45F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1D771995-D475-429B-AC31-2B1F618AA45F}.Debug|Any CPU.Build.0 = Debug|Any CPU {1D771995-D475-429B-AC31-2B1F618AA45F}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -471,11 +482,11 @@ Global {1D771995-D475-429B-AC31-2B1F618AA45F}.Release|x64.Build.0 = Release|Any CPU {1D771995-D475-429B-AC31-2B1F618AA45F}.Release|x86.ActiveCfg = Release|Any CPU {1D771995-D475-429B-AC31-2B1F618AA45F}.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|arm.ActiveCfg = Debug|Any CPU - {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|arm64.ActiveCfg = Debug|Any CPU - {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|x64.ActiveCfg = Debug|Any CPU - {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|x86.ActiveCfg = Debug|Any CPU + {1D771995-D475-429B-AC31-2B1F618AA45F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {1D771995-D475-429B-AC31-2B1F618AA45F}.Checked|arm.ActiveCfg = Debug|Any CPU + {1D771995-D475-429B-AC31-2B1F618AA45F}.Checked|arm64.ActiveCfg = Debug|Any CPU + {1D771995-D475-429B-AC31-2B1F618AA45F}.Checked|x64.ActiveCfg = Debug|Any CPU + {1D771995-D475-429B-AC31-2B1F618AA45F}.Checked|x86.ActiveCfg = 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|arm.ActiveCfg = Debug|Any CPU @@ -492,11 +503,11 @@ Global {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Release|x64.Build.0 = Release|Any CPU {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Release|x86.ActiveCfg = Release|Any CPU {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.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|arm.ActiveCfg = Debug|Any CPU - {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|arm64.ActiveCfg = Debug|Any CPU - {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|x64.ActiveCfg = Debug|Any CPU - {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|x86.ActiveCfg = Debug|Any CPU + {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|arm.ActiveCfg = Debug|Any CPU + {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|arm64.ActiveCfg = Debug|Any CPU + {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|x64.ActiveCfg = Debug|Any CPU + {9C2C2B5C-5E75-4935-8A4A-DE3D3A5DBBC1}.Checked|x86.ActiveCfg = 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|arm.ActiveCfg = Debug|Any CPU @@ -513,11 +524,11 @@ Global {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Release|x64.Build.0 = Release|Any CPU {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Release|x86.ActiveCfg = Release|Any CPU {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.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|arm.ActiveCfg = Debug|Any CPU - {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|arm64.ActiveCfg = Debug|Any CPU - {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|x64.ActiveCfg = Debug|Any CPU - {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|x86.ActiveCfg = Debug|Any CPU + {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|arm.ActiveCfg = Debug|Any CPU + {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|arm64.ActiveCfg = Debug|Any CPU + {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|x64.ActiveCfg = Debug|Any CPU + {EA8DBC12-60BC-433E-ABFF-A89DFA795283}.Checked|x86.ActiveCfg = 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|arm.ActiveCfg = Debug|Any CPU @@ -534,11 +545,11 @@ Global {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Release|x64.Build.0 = Release|Any CPU {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Release|x86.ActiveCfg = Release|Any CPU {25D66424-2EAF-464D-8460-10C04EDEF3C3}.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|arm.ActiveCfg = Debug|Any CPU - {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|arm64.ActiveCfg = Debug|Any CPU - {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|x64.ActiveCfg = Debug|Any CPU - {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|x86.ActiveCfg = Debug|Any CPU + {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|arm.ActiveCfg = Debug|Any CPU + {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|arm64.ActiveCfg = Debug|Any CPU + {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|x64.ActiveCfg = Debug|Any CPU + {25D66424-2EAF-464D-8460-10C04EDEF3C3}.Checked|x86.ActiveCfg = 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|arm.ActiveCfg = Debug|Any CPU @@ -555,11 +566,11 @@ Global {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Release|x64.Build.0 = Release|Any CPU {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Release|x86.ActiveCfg = Release|Any CPU {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.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|arm.ActiveCfg = Debug|Any CPU - {866D295E-424A-4747-9417-CD7746936138}.Checked|arm64.ActiveCfg = Debug|Any CPU - {866D295E-424A-4747-9417-CD7746936138}.Checked|x64.ActiveCfg = Debug|Any CPU - {866D295E-424A-4747-9417-CD7746936138}.Checked|x86.ActiveCfg = Debug|Any CPU + {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|arm.ActiveCfg = Debug|Any CPU + {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|arm64.ActiveCfg = Debug|Any CPU + {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|x64.ActiveCfg = Debug|Any CPU + {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF}.Checked|x86.ActiveCfg = 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|arm.ActiveCfg = Debug|Any CPU @@ -576,11 +587,11 @@ Global {866D295E-424A-4747-9417-CD7746936138}.Release|x64.Build.0 = Release|Any CPU {866D295E-424A-4747-9417-CD7746936138}.Release|x86.ActiveCfg = Release|Any CPU {866D295E-424A-4747-9417-CD7746936138}.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|arm.ActiveCfg = Debug|Any CPU - {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|arm64.ActiveCfg = Debug|Any CPU - {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|x64.ActiveCfg = Debug|Any CPU - {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|x86.ActiveCfg = Debug|Any CPU + {866D295E-424A-4747-9417-CD7746936138}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {866D295E-424A-4747-9417-CD7746936138}.Checked|arm.ActiveCfg = Debug|Any CPU + {866D295E-424A-4747-9417-CD7746936138}.Checked|arm64.ActiveCfg = Debug|Any CPU + {866D295E-424A-4747-9417-CD7746936138}.Checked|x64.ActiveCfg = Debug|Any CPU + {866D295E-424A-4747-9417-CD7746936138}.Checked|x86.ActiveCfg = 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|arm.ActiveCfg = Debug|Any CPU @@ -597,11 +608,11 @@ Global {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Release|x64.Build.0 = Release|Any CPU {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Release|x86.ActiveCfg = Release|Any CPU {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.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|arm.ActiveCfg = Debug|Any CPU - {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|arm64.ActiveCfg = Debug|Any CPU - {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|x64.ActiveCfg = Debug|Any CPU - {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|x86.ActiveCfg = Debug|Any CPU + {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|arm.ActiveCfg = Debug|Any CPU + {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|arm64.ActiveCfg = Debug|Any CPU + {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|x64.ActiveCfg = Debug|Any CPU + {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5}.Checked|x86.ActiveCfg = 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|arm.ActiveCfg = Debug|Any CPU @@ -618,11 +629,11 @@ Global {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Release|x64.Build.0 = Release|Any CPU {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Release|x86.ActiveCfg = Release|Any CPU {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Release|x86.Build.0 = Release|Any CPU - {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Checked|arm.ActiveCfg = Debug|Any CPU - {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Checked|arm64.ActiveCfg = Debug|Any CPU - {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Checked|x64.ActiveCfg = Debug|Any CPU - {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Checked|x86.ActiveCfg = Debug|Any CPU + {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|arm.ActiveCfg = Debug|Any CPU + {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|arm64.ActiveCfg = Debug|Any CPU + {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|x64.ActiveCfg = Debug|Any CPU + {0B5FD0C2-367D-4AD6-8001-80AD79B2441C}.Checked|x86.ActiveCfg = Debug|Any CPU {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Debug|Any CPU.Build.0 = Debug|Any CPU {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -639,11 +650,11 @@ Global {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Release|x64.Build.0 = Release|Any CPU {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Release|x86.ActiveCfg = Release|Any CPU {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Release|x86.Build.0 = Release|Any CPU - {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Checked|arm.ActiveCfg = Debug|Any CPU - {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Checked|arm64.ActiveCfg = Debug|Any CPU - {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Checked|x64.ActiveCfg = Debug|Any CPU - {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Checked|x86.ActiveCfg = Debug|Any CPU + {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Checked|arm.ActiveCfg = Debug|Any CPU + {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Checked|arm64.ActiveCfg = Debug|Any CPU + {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Checked|x64.ActiveCfg = Debug|Any CPU + {C7DAC270-CC93-4C97-9A8D-6E724A10727D}.Checked|x86.ActiveCfg = Debug|Any CPU {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Debug|Any CPU.Build.0 = Debug|Any CPU {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Debug|arm.ActiveCfg = Debug|Any CPU @@ -660,26 +671,123 @@ Global {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Release|x64.Build.0 = Release|Any CPU {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Release|x86.ActiveCfg = Release|Any CPU {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Release|x86.Build.0 = Release|Any CPU + {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Checked|arm.ActiveCfg = Debug|Any CPU + {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Checked|arm64.ActiveCfg = Debug|Any CPU + {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Checked|x64.ActiveCfg = Debug|Any CPU + {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82}.Checked|x86.ActiveCfg = Debug|Any CPU + {5600CDE1-139F-461B-8DD9-86FCC499DCC2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5600CDE1-139F-461B-8DD9-86FCC499DCC2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5600CDE1-139F-461B-8DD9-86FCC499DCC2}.Debug|arm.ActiveCfg = Debug|Any CPU + {5600CDE1-139F-461B-8DD9-86FCC499DCC2}.Debug|arm64.ActiveCfg = Debug|Any CPU + {5600CDE1-139F-461B-8DD9-86FCC499DCC2}.Debug|x64.ActiveCfg = Debug|Any CPU + {5600CDE1-139F-461B-8DD9-86FCC499DCC2}.Debug|x64.Build.0 = Debug|Any CPU + {5600CDE1-139F-461B-8DD9-86FCC499DCC2}.Debug|x86.ActiveCfg = Debug|Any CPU + {5600CDE1-139F-461B-8DD9-86FCC499DCC2}.Debug|x86.Build.0 = Debug|Any CPU + {5600CDE1-139F-461B-8DD9-86FCC499DCC2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5600CDE1-139F-461B-8DD9-86FCC499DCC2}.Release|Any CPU.Build.0 = Release|Any CPU + {5600CDE1-139F-461B-8DD9-86FCC499DCC2}.Release|arm.ActiveCfg = Release|Any CPU + {5600CDE1-139F-461B-8DD9-86FCC499DCC2}.Release|arm64.ActiveCfg = Release|Any CPU + {5600CDE1-139F-461B-8DD9-86FCC499DCC2}.Release|x64.ActiveCfg = Release|Any CPU + {5600CDE1-139F-461B-8DD9-86FCC499DCC2}.Release|x64.Build.0 = Release|Any CPU + {5600CDE1-139F-461B-8DD9-86FCC499DCC2}.Release|x86.ActiveCfg = Release|Any CPU + {5600CDE1-139F-461B-8DD9-86FCC499DCC2}.Release|x86.Build.0 = Release|Any CPU + {5600CDE1-139F-461B-8DD9-86FCC499DCC2}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {5600CDE1-139F-461B-8DD9-86FCC499DCC2}.Checked|arm.ActiveCfg = Debug|Any CPU + {5600CDE1-139F-461B-8DD9-86FCC499DCC2}.Checked|arm64.ActiveCfg = Debug|Any CPU + {5600CDE1-139F-461B-8DD9-86FCC499DCC2}.Checked|x64.ActiveCfg = Debug|Any CPU + {5600CDE1-139F-461B-8DD9-86FCC499DCC2}.Checked|x86.ActiveCfg = Debug|Any CPU + {169B126B-48DF-425C-B902-D376A689D9FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {169B126B-48DF-425C-B902-D376A689D9FB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {169B126B-48DF-425C-B902-D376A689D9FB}.Debug|arm.ActiveCfg = Debug|Any CPU + {169B126B-48DF-425C-B902-D376A689D9FB}.Debug|arm64.ActiveCfg = Debug|Any CPU + {169B126B-48DF-425C-B902-D376A689D9FB}.Debug|x64.ActiveCfg = Debug|Any CPU + {169B126B-48DF-425C-B902-D376A689D9FB}.Debug|x64.Build.0 = Debug|Any CPU + {169B126B-48DF-425C-B902-D376A689D9FB}.Debug|x86.ActiveCfg = Debug|Any CPU + {169B126B-48DF-425C-B902-D376A689D9FB}.Debug|x86.Build.0 = Debug|Any CPU + {169B126B-48DF-425C-B902-D376A689D9FB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {169B126B-48DF-425C-B902-D376A689D9FB}.Release|Any CPU.Build.0 = Release|Any CPU + {169B126B-48DF-425C-B902-D376A689D9FB}.Release|arm.ActiveCfg = Release|Any CPU + {169B126B-48DF-425C-B902-D376A689D9FB}.Release|arm64.ActiveCfg = Release|Any CPU + {169B126B-48DF-425C-B902-D376A689D9FB}.Release|x64.ActiveCfg = Release|Any CPU + {169B126B-48DF-425C-B902-D376A689D9FB}.Release|x64.Build.0 = Release|Any CPU + {169B126B-48DF-425C-B902-D376A689D9FB}.Release|x86.ActiveCfg = Release|Any CPU + {169B126B-48DF-425C-B902-D376A689D9FB}.Release|x86.Build.0 = Release|Any CPU + {169B126B-48DF-425C-B902-D376A689D9FB}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {169B126B-48DF-425C-B902-D376A689D9FB}.Checked|arm.ActiveCfg = Debug|Any CPU + {169B126B-48DF-425C-B902-D376A689D9FB}.Checked|arm64.ActiveCfg = Debug|Any CPU + {169B126B-48DF-425C-B902-D376A689D9FB}.Checked|x64.ActiveCfg = Debug|Any CPU + {169B126B-48DF-425C-B902-D376A689D9FB}.Checked|x86.ActiveCfg = Debug|Any CPU + {8EA17297-41EE-4CEE-AF61-F047D6F7A1AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8EA17297-41EE-4CEE-AF61-F047D6F7A1AB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8EA17297-41EE-4CEE-AF61-F047D6F7A1AB}.Debug|arm.ActiveCfg = Debug|Any CPU + {8EA17297-41EE-4CEE-AF61-F047D6F7A1AB}.Debug|arm64.ActiveCfg = Debug|Any CPU + {8EA17297-41EE-4CEE-AF61-F047D6F7A1AB}.Debug|x64.ActiveCfg = Debug|Any CPU + {8EA17297-41EE-4CEE-AF61-F047D6F7A1AB}.Debug|x64.Build.0 = Debug|Any CPU + {8EA17297-41EE-4CEE-AF61-F047D6F7A1AB}.Debug|x86.ActiveCfg = Debug|Any CPU + {8EA17297-41EE-4CEE-AF61-F047D6F7A1AB}.Debug|x86.Build.0 = Debug|Any CPU + {8EA17297-41EE-4CEE-AF61-F047D6F7A1AB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8EA17297-41EE-4CEE-AF61-F047D6F7A1AB}.Release|Any CPU.Build.0 = Release|Any CPU + {8EA17297-41EE-4CEE-AF61-F047D6F7A1AB}.Release|arm.ActiveCfg = Release|Any CPU + {8EA17297-41EE-4CEE-AF61-F047D6F7A1AB}.Release|arm64.ActiveCfg = Release|Any CPU + {8EA17297-41EE-4CEE-AF61-F047D6F7A1AB}.Release|x64.ActiveCfg = Release|Any CPU + {8EA17297-41EE-4CEE-AF61-F047D6F7A1AB}.Release|x64.Build.0 = Release|Any CPU + {8EA17297-41EE-4CEE-AF61-F047D6F7A1AB}.Release|x86.ActiveCfg = Release|Any CPU + {8EA17297-41EE-4CEE-AF61-F047D6F7A1AB}.Release|x86.Build.0 = Release|Any CPU + {8EA17297-41EE-4CEE-AF61-F047D6F7A1AB}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {8EA17297-41EE-4CEE-AF61-F047D6F7A1AB}.Checked|arm.ActiveCfg = Debug|Any CPU + {8EA17297-41EE-4CEE-AF61-F047D6F7A1AB}.Checked|arm64.ActiveCfg = Debug|Any CPU + {8EA17297-41EE-4CEE-AF61-F047D6F7A1AB}.Checked|x64.ActiveCfg = Debug|Any CPU + {8EA17297-41EE-4CEE-AF61-F047D6F7A1AB}.Checked|x86.ActiveCfg = Debug|Any CPU + {1347FE73-506C-4C44-A469-979F6ADB78BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1347FE73-506C-4C44-A469-979F6ADB78BE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1347FE73-506C-4C44-A469-979F6ADB78BE}.Debug|arm.ActiveCfg = Debug|Any CPU + {1347FE73-506C-4C44-A469-979F6ADB78BE}.Debug|arm64.ActiveCfg = Debug|Any CPU + {1347FE73-506C-4C44-A469-979F6ADB78BE}.Debug|x64.ActiveCfg = Debug|Any CPU + {1347FE73-506C-4C44-A469-979F6ADB78BE}.Debug|x64.Build.0 = Debug|Any CPU + {1347FE73-506C-4C44-A469-979F6ADB78BE}.Debug|x86.ActiveCfg = Debug|Any CPU + {1347FE73-506C-4C44-A469-979F6ADB78BE}.Debug|x86.Build.0 = Debug|Any CPU + {1347FE73-506C-4C44-A469-979F6ADB78BE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1347FE73-506C-4C44-A469-979F6ADB78BE}.Release|Any CPU.Build.0 = Release|Any CPU + {1347FE73-506C-4C44-A469-979F6ADB78BE}.Release|arm.ActiveCfg = Release|Any CPU + {1347FE73-506C-4C44-A469-979F6ADB78BE}.Release|arm64.ActiveCfg = Release|Any CPU + {1347FE73-506C-4C44-A469-979F6ADB78BE}.Release|x64.ActiveCfg = Release|Any CPU + {1347FE73-506C-4C44-A469-979F6ADB78BE}.Release|x64.Build.0 = Release|Any CPU + {1347FE73-506C-4C44-A469-979F6ADB78BE}.Release|x86.ActiveCfg = Release|Any CPU + {1347FE73-506C-4C44-A469-979F6ADB78BE}.Release|x86.Build.0 = Release|Any CPU + {1347FE73-506C-4C44-A469-979F6ADB78BE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {1347FE73-506C-4C44-A469-979F6ADB78BE}.Checked|arm.ActiveCfg = Debug|Any CPU + {1347FE73-506C-4C44-A469-979F6ADB78BE}.Checked|arm64.ActiveCfg = Debug|Any CPU + {1347FE73-506C-4C44-A469-979F6ADB78BE}.Checked|x64.ActiveCfg = Debug|Any CPU + {1347FE73-506C-4C44-A469-979F6ADB78BE}.Checked|x86.ActiveCfg = Debug|Any CPU + {B36C9254-0C55-414E-8403-03B4F18D5F35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B36C9254-0C55-414E-8403-03B4F18D5F35}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B36C9254-0C55-414E-8403-03B4F18D5F35}.Debug|arm.ActiveCfg = Debug|Any CPU + {B36C9254-0C55-414E-8403-03B4F18D5F35}.Debug|arm64.ActiveCfg = Debug|Any CPU + {B36C9254-0C55-414E-8403-03B4F18D5F35}.Debug|x64.ActiveCfg = Debug|Any CPU + {B36C9254-0C55-414E-8403-03B4F18D5F35}.Debug|x64.Build.0 = Debug|Any CPU + {B36C9254-0C55-414E-8403-03B4F18D5F35}.Debug|x86.ActiveCfg = Debug|Any CPU + {B36C9254-0C55-414E-8403-03B4F18D5F35}.Debug|x86.Build.0 = Debug|Any CPU + {B36C9254-0C55-414E-8403-03B4F18D5F35}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B36C9254-0C55-414E-8403-03B4F18D5F35}.Release|Any CPU.Build.0 = Release|Any CPU + {B36C9254-0C55-414E-8403-03B4F18D5F35}.Release|arm.ActiveCfg = Release|Any CPU + {B36C9254-0C55-414E-8403-03B4F18D5F35}.Release|arm64.ActiveCfg = Release|Any CPU + {B36C9254-0C55-414E-8403-03B4F18D5F35}.Release|x64.ActiveCfg = Release|Any CPU + {B36C9254-0C55-414E-8403-03B4F18D5F35}.Release|x64.Build.0 = Release|Any CPU + {B36C9254-0C55-414E-8403-03B4F18D5F35}.Release|x86.ActiveCfg = Release|Any CPU + {B36C9254-0C55-414E-8403-03B4F18D5F35}.Release|x86.Build.0 = Release|Any CPU + {B36C9254-0C55-414E-8403-03B4F18D5F35}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {B36C9254-0C55-414E-8403-03B4F18D5F35}.Checked|arm.ActiveCfg = Debug|Any CPU + {B36C9254-0C55-414E-8403-03B4F18D5F35}.Checked|arm64.ActiveCfg = Debug|Any CPU + {B36C9254-0C55-414E-8403-03B4F18D5F35}.Checked|x64.ActiveCfg = Debug|Any CPU + {B36C9254-0C55-414E-8403-03B4F18D5F35}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {94B59BA0-491F-4B59-ADFF-A057EC3EC835} = {B1678CCD-95C8-4419-B9F9-14A03061BE4B} + {94B59BA0-491F-4B59-ADFF-A057EC3EC835} = {052823B7-A9E0-41DE-87D8-D1CAF407B41D} {1FF4CC8E-49C3-42A0-A6E0-2E5908455FBA} = {FB99AC59-1744-4F12-A4B0-0D54FCA048BF} - {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} - {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69} = {B1678CCD-95C8-4419-B9F9-14A03061BE4B} - {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} - {C4B641C3-3317-4913-91DA-0DA3B64BABED} = {B1678CCD-95C8-4419-B9F9-14A03061BE4B} - {3FB6F2AA-E763-4336-B927-18AB7AAF6C20} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} - {716ED44B-37C8-4776-BE70-285952D2B30D} = {B1678CCD-95C8-4419-B9F9-14A03061BE4B} - {1B248B4C-7584-4C04-850A-A50EB592052C} = {E1AEBD5D-AE4E-4F61-B9ED-AEF950B0CC33} - {EF39CC5C-7A3B-40F2-82B6-C1C8BBC3F886} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} - {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5} = {E1AEBD5D-AE4E-4F61-B9ED-AEF950B0CC33} - {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40} = {E1AEBD5D-AE4E-4F61-B9ED-AEF950B0CC33} - {768B77B0-EA45-469D-B39E-545EB72F5A43} = {E1AEBD5D-AE4E-4F61-B9ED-AEF950B0CC33} - {8671F164-F78C-44FA-93B7-A310F67890FE} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} - {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1} = {B1678CCD-95C8-4419-B9F9-14A03061BE4B} {79F7BE0E-01AA-4AFB-B047-CF7C0B38F81E} = {FB99AC59-1744-4F12-A4B0-0D54FCA048BF} {3741C833-C364-4269-9B1D-D442055DA7CE} = {FB99AC59-1744-4F12-A4B0-0D54FCA048BF} {1D771995-D475-429B-AC31-2B1F618AA45F} = {FB99AC59-1744-4F12-A4B0-0D54FCA048BF} @@ -689,14 +797,32 @@ Global {049B7FD4-ACEF-4BCD-A7A7-75C9BBEC4EBF} = {FB99AC59-1744-4F12-A4B0-0D54FCA048BF} {866D295E-424A-4747-9417-CD7746936138} = {FB99AC59-1744-4F12-A4B0-0D54FCA048BF} {D3A329E3-0FEB-4136-9CB6-B38319B0FFA5} = {FB99AC59-1744-4F12-A4B0-0D54FCA048BF} + {0E0D5A1F-0212-4CEB-BADA-E1E3ABD395A0} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} + {4859BEE3-34B7-48E7-83D4-1ADD8B8F3B3A} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} + {3FB6F2AA-E763-4336-B927-18AB7AAF6C20} = {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} {C7DAC270-CC93-4C97-9A8D-6E724A10727D} = {D893B9AA-57C5-49E3-97B1-12CC62D84307} + {F552E4E4-20EE-484C-84F8-4FB3A3BD2E69} = {B1678CCD-95C8-4419-B9F9-14A03061BE4B} + {C4B641C3-3317-4913-91DA-0DA3B64BABED} = {B1678CCD-95C8-4419-B9F9-14A03061BE4B} + {716ED44B-37C8-4776-BE70-285952D2B30D} = {B1678CCD-95C8-4419-B9F9-14A03061BE4B} + {4FC33B9B-1BCF-4D16-B886-DCA8F2B823C1} = {B1678CCD-95C8-4419-B9F9-14A03061BE4B} {C9B349C8-7B11-4DE4-A4BB-8D957A1D2A82} = {B1678CCD-95C8-4419-B9F9-14A03061BE4B} + {1B248B4C-7584-4C04-850A-A50EB592052C} = {E1AEBD5D-AE4E-4F61-B9ED-AEF950B0CC33} + {C3EA0A28-A597-4946-9E08-EBBBFA94BFA5} = {E1AEBD5D-AE4E-4F61-B9ED-AEF950B0CC33} + {90CDAD9F-3ACC-43B0-9696-0C849FCD8C40} = {E1AEBD5D-AE4E-4F61-B9ED-AEF950B0CC33} + {768B77B0-EA45-469D-B39E-545EB72F5A43} = {E1AEBD5D-AE4E-4F61-B9ED-AEF950B0CC33} + {5600CDE1-139F-461B-8DD9-86FCC499DCC2} = {8826C1E1-CEBD-49F8-9BC8-97FECE60F9B9} + {169B126B-48DF-425C-B902-D376A689D9FB} = {8826C1E1-CEBD-49F8-9BC8-97FECE60F9B9} + {8826C1E1-CEBD-49F8-9BC8-97FECE60F9B9} = {8FA3249B-3567-4C76-BA32-9488FC92994D} + {8EA17297-41EE-4CEE-AF61-F047D6F7A1AB} = {7B3C7C2F-58E0-4EE5-B904-9C978F40FD33} + {1347FE73-506C-4C44-A469-979F6ADB78BE} = {7B3C7C2F-58E0-4EE5-B904-9C978F40FD33} + {7B3C7C2F-58E0-4EE5-B904-9C978F40FD33} = {8FA3249B-3567-4C76-BA32-9488FC92994D} + {B36C9254-0C55-414E-8403-03B4F18D5F35} = {5114BD7E-8492-452A-8DAA-BF971D74A66D} + {5114BD7E-8492-452A-8DAA-BF971D74A66D} = {8FA3249B-3567-4C76-BA32-9488FC92994D} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {D4031401-FEB5-4CCF-91C1-38F5646B2BFD} EndGlobalSection - GlobalSection(SharedMSBuildProjectFiles) = preSolution - ..\System.Private.CoreLib\src\System.Private.CoreLib.Shared.projitems*{94b59ba0-491f-4b59-adff-a057ec3ec835}*SharedItemsImports = 5 - EndGlobalSection EndGlobal diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceGenerator.csproj b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceGenerator.csproj index fc5a55d1373b94..76c56f653f9793 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceGenerator.csproj +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceGenerator.csproj @@ -16,7 +16,6 @@ - diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/DiagnosticDescriptorProvider.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/DiagnosticDescriptorProvider.cs index c676f27cb9f401..fab2d39182c8b7 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/DiagnosticDescriptorProvider.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/DiagnosticDescriptorProvider.cs @@ -26,6 +26,7 @@ internal sealed class DiagnosticDescriptorProvider : IDiagnosticDescriptorProvid GeneratorDiagnostic.NotSupported { NotSupportedDetails: not null, TypePositionInfo.IsManagedReturnPosition: false } => GeneratorDiagnostics.ParameterTypeNotSupportedWithDetails, GeneratorDiagnostic.UnnecessaryData { TypePositionInfo.IsManagedReturnPosition: false } => GeneratorDiagnostics.UnnecessaryParameterMarshallingInfo, GeneratorDiagnostic.UnnecessaryData { TypePositionInfo.IsManagedReturnPosition: true } => GeneratorDiagnostics.UnnecessaryReturnMarshallingInfo, + GeneratorDiagnostic.NotRecommended => GeneratorDiagnostics.GeneratedComInterfaceUsageDoesNotFollowBestPractices, { IsFatal: false } => null, { TypePositionInfo.IsManagedReturnPosition: true } => GeneratorDiagnostics.ReturnTypeNotSupported, { TypePositionInfo.IsManagedReturnPosition: false } => GeneratorDiagnostics.ParameterTypeNotSupported, diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs index f0b98c3c535ac3..1e1849592f7ba4 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs @@ -477,7 +477,7 @@ public class Ids /// public static readonly DiagnosticDescriptor HResultTypeWillBeTreatedAsStruct = - new DiagnosticDescriptor( + DiagnosticDescriptorHelper.Create( Ids.NotRecommendedGeneratedComInterfaceUsage, GetResourceString(nameof(SR.HResultTypeWillBeTreatedAsStructTitle)), GetResourceString(nameof(SR.HResultTypeWillBeTreatedAsStructMessage)), @@ -485,6 +485,17 @@ public class Ids DiagnosticSeverity.Info, isEnabledByDefault: true); + /// + public static readonly DiagnosticDescriptor GeneratedComInterfaceUsageDoesNotFollowBestPractices = + new DiagnosticDescriptor( + Ids.NotRecommendedGeneratedComInterfaceUsage, + GetResourceString(nameof(SR.ComInterfaceUsageDoesNotFollowBestPracticesTitle)), + GetResourceString(nameof(SR.ComInterfaceUsageDoesNotFollowBestPracticesMessageWithDetails)), + Category, + DiagnosticSeverity.Info, + isEnabledByDefault: true, + helpLinkUri: "aka.ms/GeneratedComInterfaceUsage"); + /// /// Report diagnostic for invalid configuration for string marshalling. /// diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Marshallers/ComInterfaceDispatchMarshallerFactory.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Marshallers/ComInterfaceDispatchMarshallerFactory.cs index a75cd8cad77268..86c67cbd4dadca 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Marshallers/ComInterfaceDispatchMarshallerFactory.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Marshallers/ComInterfaceDispatchMarshallerFactory.cs @@ -59,8 +59,6 @@ public IEnumerable Generate(TypePositionInfo info, StubCodeCont public SignatureBehavior GetNativeSignatureBehavior(TypePositionInfo info) => SignatureBehavior.NativeType; public ValueBoundaryBehavior GetValueBoundaryBehavior(TypePositionInfo info, StubCodeContext context) => ValueBoundaryBehavior.NativeIdentifier; - public bool IsSupported(TargetFramework target, Version version) - => target == TargetFramework.Net && version >= new Version(5, 0); public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, StubCodeContext context, out GeneratorDiagnostic? diagnostic) => ByValueMarshalKindSupportDescriptor.Default.GetSupport(marshalKind, info, context, out diagnostic); public bool UsesNativeIdentifier(TypePositionInfo info, StubCodeContext context) => true; diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Marshallers/ManagedHResultExceptionMarshallerFactory.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Marshallers/ManagedHResultExceptionMarshallerFactory.cs index 0e6b17bd2ee435..c2f02efffeac17 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Marshallers/ManagedHResultExceptionMarshallerFactory.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Marshallers/ManagedHResultExceptionMarshallerFactory.cs @@ -68,7 +68,6 @@ public IEnumerable Generate(TypePositionInfo info, StubCodeCont public SignatureBehavior GetNativeSignatureBehavior(TypePositionInfo info) => SignatureBehavior.NativeType; public ValueBoundaryBehavior GetValueBoundaryBehavior(TypePositionInfo info, StubCodeContext context) => ValueBoundaryBehavior.ManagedIdentifier; - public bool IsSupported(TargetFramework target, Version version) => true; public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, StubCodeContext context, out GeneratorDiagnostic? diagnostic) => ByValueMarshalKindSupportDescriptor.Default.GetSupport(marshalKind, info, context, out diagnostic); public bool UsesNativeIdentifier(TypePositionInfo info, StubCodeContext context) => false; @@ -106,7 +105,6 @@ public IEnumerable Generate(TypePositionInfo info, StubCodeCont public SignatureBehavior GetNativeSignatureBehavior(TypePositionInfo info) => SignatureBehavior.NativeType; public ValueBoundaryBehavior GetValueBoundaryBehavior(TypePositionInfo info, StubCodeContext context) => ValueBoundaryBehavior.ManagedIdentifier; - public bool IsSupported(TargetFramework target, Version version) => true; public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, StubCodeContext context, out GeneratorDiagnostic? diagnostic) => ByValueMarshalKindSupportDescriptor.Default.GetSupport(marshalKind, info, context, out diagnostic); public bool UsesNativeIdentifier(TypePositionInfo info, StubCodeContext context) => false; diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Marshallers/ObjectUnwrapperMarshallerFactory.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Marshallers/ObjectUnwrapperMarshallerFactory.cs index 75a7aa5064b734..2ca351cf538276 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Marshallers/ObjectUnwrapperMarshallerFactory.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Marshallers/ObjectUnwrapperMarshallerFactory.cs @@ -54,7 +54,6 @@ public IEnumerable Generate(TypePositionInfo info, StubCodeCont public SignatureBehavior GetNativeSignatureBehavior(TypePositionInfo info) => SignatureBehavior.NativeType; public ValueBoundaryBehavior GetValueBoundaryBehavior(TypePositionInfo info, StubCodeContext context) => ValueBoundaryBehavior.NativeIdentifier; - public bool IsSupported(TargetFramework target, Version version) => true; public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, StubCodeContext context, out GeneratorDiagnostic? diagnostic) => ByValueMarshalKindSupportDescriptor.Default.GetSupport(marshalKind, info, context, out diagnostic); public bool UsesNativeIdentifier(TypePositionInfo info, StubCodeContext context) => true; diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Marshallers/StructAsHResultMarshallerFactory.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Marshallers/StructAsHResultMarshallerFactory.cs index e6eb9627b5acc9..d8b41ca6e37324 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Marshallers/StructAsHResultMarshallerFactory.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Marshallers/StructAsHResultMarshallerFactory.cs @@ -98,8 +98,6 @@ public ValueBoundaryBehavior GetValueBoundaryBehavior(TypePositionInfo info, Stu return ValueBoundaryBehavior.NativeIdentifier; } - public bool IsSupported(TargetFramework target, Version version) => target == TargetFramework.Net && version.Major >= 8; - public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, StubCodeContext context, out GeneratorDiagnostic? diagnostic) => ByValueMarshalKindSupportDescriptor.Default.GetSupport(marshalKind, info, context, out diagnostic); diff --git a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/Strings.resx b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/Strings.resx index ebf0170e328752..bce2c5ae188043 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/Strings.resx +++ b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/Strings.resx @@ -1,17 +1,17 @@  - @@ -144,9 +144,6 @@ Marshalling string or char without explicit marshalling information is not supported. Specify '{0}.StringMarshalling', '{0}.StringMarshallingCustomType', 'MarshalUsingAttribute' or 'MarshalAsAttribute'. - - An abstract type derived from 'SafeHandle' cannot be marshalled by reference. The provided type must be concrete. - This element cannot depend on '{0}' for collection size information without creating a dependency cycle @@ -875,7 +872,13 @@ [In] and [Out] attributes - The `[Out]` attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. + The '[Out]' attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. + + + The '[In]' attribute is only supported on array parameters. By-value parameters are considered read-only by default. + + + The '[In]' and '[Out]' attributes are only supported on array parameters. Consider using the 'ref' keyword to make the parameter mutable. The return value in the managed definition will be converted to an 'out' parameter when calling the unmanaged COM method. If the return value is intended to be the HRESULT code returned by the unmanaged COM method, use '[PreserveSig]' on the method. @@ -889,4 +892,19 @@ This type will be treated as a struct in the native signature, not as a native HRESULT - \ No newline at end of file + + It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. + + + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. + + + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. {0} + + + The usage of 'LibraryImportAttribute' does not follow recommendations. + + + The usage of 'LibraryImportAttribute' does not follow recommendations. {0} + + diff --git a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.cs.xlf b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.cs.xlf index aba6380486a3b7..9f769d6c35c061 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.cs.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.cs.xlf @@ -147,6 +147,16 @@ Hostování .NET COM s EnableComHosting nepodporuje rozhraní s generatedComInterfaceAttribute + + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. {0} + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. {0} + + + + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. + + The return value in the managed definition will be converted to an 'out' parameter when calling the unmanaged COM method. If the return value is intended to be the HRESULT code returned by the unmanaged COM method, use '[PreserveSig]' on the method. Vrácená hodnota ve spravované definici se při volání nespravované metody COM převede na parametr out. Pokud má být návratovou hodnotou kód HRESULT vrácený nespravovanou metodou COM, použijte u metody [PreserveSig]. @@ -447,6 +457,11 @@ This type will be treated as a struct in the native signature, not as a native HRESULT + + The '[In]' attribute is only supported on array parameters. By-value parameters are considered read-only by default. + The '[In]' attribute is only supported on array parameters. By-value parameters are considered read-only by default. + + The '[In]' attribute is not supported unless the '[Out]' attribute is also used. Blittable arrays cannot be marshalled as '[In]' only. Atribut [In] není podporován, pokud není použit také atribut [Out]. Blittable arrays nelze zařadit pouze jako [In]. @@ -467,6 +482,11 @@ Poskytnuté atributy „[In]“ a „[Out]“ u tohoto parametru se na tomto parametru nepodporují. + + The '[In]' and '[Out]' attributes are only supported on array parameters. Consider using the 'ref' keyword to make the parameter mutable. + The '[In]' and '[Out]' attributes are only supported on array parameters. Consider using the 'ref' keyword to make the parameter mutable. + + [In] and [Out] attributes atributy [In] a [Out] @@ -702,6 +722,16 @@ Neplatné použití atributu VirtualMethodIndexAttribute + + The usage of 'LibraryImportAttribute' does not follow recommendations. {0} + The usage of 'LibraryImportAttribute' does not follow recommendations. {0} + + + + The usage of 'LibraryImportAttribute' does not follow recommendations. + The usage of 'LibraryImportAttribute' does not follow recommendations. + + The element type of the 'ReadOnlySpan' returned by 'GetManagedValuesSource' must be the same as the element type returned by 'GetManagedValuesDestination'. Typ prvku ReadOnlySpan vrácený GetManagedValuesSource musí být stejný, jako typ prvku vrácený GetManagedValuesDestination. @@ -903,8 +933,8 @@ - The `[Out]` attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. - The `[Out]` attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. + The '[Out]' attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. + The '[Out]' attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. @@ -917,6 +947,11 @@ Typ {0}určuje, že podporuje zařazování ve směru „Out“, ale neposkytuje metodu ToManaged, která vrací spravovaný typ + + It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. + It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. + + 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. GeneratedComInterfaceAttribute a GeneratedComClassAttribute vyžadují nebezpečný kód. Projekt se musí aktualizovat na <AllowUnsafeBlocks>true</AllowUnsafeBlocks>. @@ -987,11 +1022,6 @@ Aby se povolilo zařazování tohoto typu, musí se v tomto projektu zakázat zařazování modulu runtime použitím atributu System.Runtime.CompilerServices.DisableRuntimeMarshallingAttribute u sestavení. - - An abstract type derived from 'SafeHandle' cannot be marshalled by reference. The provided type must be concrete. - Abstraktní typ odvozený ze SafeHandle nelze zařadit pomocí odkazu. Poskytnutý typ musí být konkrétní. - - The size of parameter '{0}' that is marshalled to the callee must be defined when the method is called, but count parameter '{1}' is an 'out' parameter. Při volání metody musí být definována velikost parametru{0}, která je zařazena do volané metody, ale parametr count {1} je parametr out. diff --git a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.de.xlf b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.de.xlf index 6b978f9aff5a9f..a23a8178977575 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.de.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.de.xlf @@ -147,6 +147,16 @@ Das .NET COM-Hosting mit "EnableComHosting" unterstützt keine Schnittstellen mit "GeneratedComInterfaceAttribute". + + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. {0} + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. {0} + + + + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. + + The return value in the managed definition will be converted to an 'out' parameter when calling the unmanaged COM method. If the return value is intended to be the HRESULT code returned by the unmanaged COM method, use '[PreserveSig]' on the method. Der Rückgabewert in der verwalteten Definition wird beim Aufrufen der nicht verwalteten COM-Methode in einen out-Parameter konvertiert. Wenn als Rückgabewert der von der nicht verwalteten COM-Methode zurückgegebene HRESULT-Code eingesetzt werden soll, verwenden Sie "[PreserveSig]" für die Methode. @@ -447,6 +457,11 @@ This type will be treated as a struct in the native signature, not as a native HRESULT + + The '[In]' attribute is only supported on array parameters. By-value parameters are considered read-only by default. + The '[In]' attribute is only supported on array parameters. By-value parameters are considered read-only by default. + + The '[In]' attribute is not supported unless the '[Out]' attribute is also used. Blittable arrays cannot be marshalled as '[In]' only. Das [In]-Attribut wird nur unterstützt, wenn auch das [Out]-Attribut verwendet wird. Blittable-Arrays können nicht nur als "[In]" gemarshallt werden. @@ -467,6 +482,11 @@ Die angegebenen Attribute \"[In]\" und \"[Out]\" für diesen Parameter werden für diesen Parameter nicht unterstützt. + + The '[In]' and '[Out]' attributes are only supported on array parameters. Consider using the 'ref' keyword to make the parameter mutable. + The '[In]' and '[Out]' attributes are only supported on array parameters. Consider using the 'ref' keyword to make the parameter mutable. + + [In] and [Out] attributes [In]- und [Out]-Attribute @@ -702,6 +722,16 @@ Ungültige Verwendung von "VirtualMethodIndexAttribute" + + The usage of 'LibraryImportAttribute' does not follow recommendations. {0} + The usage of 'LibraryImportAttribute' does not follow recommendations. {0} + + + + The usage of 'LibraryImportAttribute' does not follow recommendations. + The usage of 'LibraryImportAttribute' does not follow recommendations. + + The element type of the 'ReadOnlySpan' returned by 'GetManagedValuesSource' must be the same as the element type returned by 'GetManagedValuesDestination'. Der von \"GetManagedValuesSource\" zurückgegebene Elementtyp \"ReadOnlySpan\" muss mit dem Elementtyp identisch sein, der von \"GetManagedValuesDestination\" zurückgegeben wird. @@ -903,8 +933,8 @@ - The `[Out]` attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. - The `[Out]` attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. + The '[Out]' attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. + The '[Out]' attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. @@ -917,6 +947,11 @@ Der Typ \"{0}\" gibt an, dass das Marshalling in der Out-Richtung unterstützt wird. Er stellt jedoch keine ToManaged-Methode bereit, die den verwalteten Typ zurückgibt. + + It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. + It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. + + 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. 'GeneratedComInterfaceAttribute' und 'GeneratedComClassAttribute' erfordern unsicheren Code. Das Projekt muss mit '<AllowUnsafeBlocks>wahr</AllowUnsafeBlocks>' aktualisiert werden. @@ -987,11 +1022,6 @@ Das Runtime-Marshalling muss in diesem Projekt deaktiviert werden, indem „System.Runtime.CompilerServices.DisableRuntimeMarshallingAttribute“ auf die Assembly angewendet wird, um das Marshalling dieses Typs zu ermöglichen. - - An abstract type derived from 'SafeHandle' cannot be marshalled by reference. The provided type must be concrete. - Ein abstrakter Typ, der von \"SafeHandle\" abgeleitet wird, kann nicht als Verweis gemarshallt werden. Der angegebene Typ muss ein konkretes Element sein. - - The size of parameter '{0}' that is marshalled to the callee must be defined when the method is called, but count parameter '{1}' is an 'out' parameter. Die Größe des Parameters "{0}", der an den Aufgerufenen gemarshallt wird, muss definiert werden, wenn die Methode aufgerufen wird. Der Count-Parameter "{1}" ist jedoch ein "Out"-Parameter. diff --git a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.es.xlf b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.es.xlf index 077827dbf7ef9b..7d4da3d2391109 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.es.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.es.xlf @@ -147,6 +147,16 @@ El hospedaje COM de .NET con “EnableComHosting” no admite interfaces con “GeneratedComInterfaceAttribute” + + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. {0} + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. {0} + + + + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. + + The return value in the managed definition will be converted to an 'out' parameter when calling the unmanaged COM method. If the return value is intended to be the HRESULT code returned by the unmanaged COM method, use '[PreserveSig]' on the method. El valor devuelto en la definición administrada se convertirá en un parámetro “out” al llamar al método COM no administrado. Si el valor devuelto debe ser el código HRESULT devuelto por el método COM no administrado, use “[PreserveSig]” en el método. @@ -447,6 +457,11 @@ This type will be treated as a struct in the native signature, not as a native HRESULT + + The '[In]' attribute is only supported on array parameters. By-value parameters are considered read-only by default. + The '[In]' attribute is only supported on array parameters. By-value parameters are considered read-only by default. + + The '[In]' attribute is not supported unless the '[Out]' attribute is also used. Blittable arrays cannot be marshalled as '[In]' only. El atributo '[In]' no se admite a menos que también se use el atributo '[Out]'. Las matrices que se pueden transferir en bloque de bits no se pueden serializar solo como '[In]'. @@ -467,6 +482,11 @@ En este parámetro, los atributos “[In]” y “[Out]” proporcionados no se admiten. + + The '[In]' and '[Out]' attributes are only supported on array parameters. Consider using the 'ref' keyword to make the parameter mutable. + The '[In]' and '[Out]' attributes are only supported on array parameters. Consider using the 'ref' keyword to make the parameter mutable. + + [In] and [Out] attributes Atributos [In] y [Out] @@ -702,6 +722,16 @@ Uso de ”VirtualMethodIndexAttribute” no válido + + The usage of 'LibraryImportAttribute' does not follow recommendations. {0} + The usage of 'LibraryImportAttribute' does not follow recommendations. {0} + + + + The usage of 'LibraryImportAttribute' does not follow recommendations. + The usage of 'LibraryImportAttribute' does not follow recommendations. + + The element type of the 'ReadOnlySpan' returned by 'GetManagedValuesSource' must be the same as the element type returned by 'GetManagedValuesDestination'. El tipo de elemento del “ReadOnlySpan” devuelto por “GetManagedValuesSource” debe ser el mismo que el tipo de elemento devuelto por “GetManagedValuesDestination”. @@ -903,8 +933,8 @@ - The `[Out]` attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. - The `[Out]` attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. + The '[Out]' attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. + The '[Out]' attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. @@ -917,6 +947,11 @@ El tipo “{0}” especifica que admite la serialización en la dirección “Out”, pero no proporciona un método “ToManaged” que devuelva el tipo administrado + + It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. + It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. + + 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. "GeneratedComInterfaceAttribute" y "GeneratedComClassAttribute" requieren código no seguro. El proyecto debe actualizarse con "<AllowUnsafeBlocks>true</AllowUnsafeBlocks>". @@ -987,11 +1022,6 @@ La serialización en tiempo de ejecución debe deshabilitarse en este proyecto aplicando \"System.Runtime.CompilerServices.DisableRuntimeMars contosoingAttribute\" al ensamblado para habilitar la serialización de este tipo. - - An abstract type derived from 'SafeHandle' cannot be marshalled by reference. The provided type must be concrete. - Un tipo abstracto derivado de “SafeHandle” no se puede serializar por referencia. El tipo proporcionado debe ser concreto. - - The size of parameter '{0}' that is marshalled to the callee must be defined when the method is called, but count parameter '{1}' is an 'out' parameter. El tamaño del parámetro "{0}" que se serializa al destinatario debe definirse cuando se llama al método, pero el parámetro de recuento "{1}" es un parámetro "out". diff --git a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.fr.xlf b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.fr.xlf index 7b06fbb9966ce1..467413d83f430d 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.fr.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.fr.xlf @@ -147,6 +147,16 @@ L'hébergement .NET COM avec 'EnableComHosting' ne prend pas en charge les interfaces avec 'GeneratedComInterfaceAttribute' + + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. {0} + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. {0} + + + + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. + + The return value in the managed definition will be converted to an 'out' parameter when calling the unmanaged COM method. If the return value is intended to be the HRESULT code returned by the unmanaged COM method, use '[PreserveSig]' on the method. La valeur de retour dans la définition managée est convertie en paramètre 'out' lors de l’appel de la méthode COM non managée. Si la valeur de retour doit être le code HRESULT retourné par la méthode COM non managée, utilisez '[PreserveSig]' sur la méthode. @@ -447,6 +457,11 @@ This type will be treated as a struct in the native signature, not as a native HRESULT + + The '[In]' attribute is only supported on array parameters. By-value parameters are considered read-only by default. + The '[In]' attribute is only supported on array parameters. By-value parameters are considered read-only by default. + + The '[In]' attribute is not supported unless the '[Out]' attribute is also used. Blittable arrays cannot be marshalled as '[In]' only. L’attribut '[In]' n’est pas pris en charge, sauf si l’attribut '[Out]' est également utilisé. Les tableaux blittables ne peuvent pas être marshalés en tant que « [In] » uniquement. @@ -467,6 +482,11 @@ Les attributs « [In] » et « [Out] » fournis sur ce paramètre ne sont pas pris en charge sur ce paramètre. + + The '[In]' and '[Out]' attributes are only supported on array parameters. Consider using the 'ref' keyword to make the parameter mutable. + The '[In]' and '[Out]' attributes are only supported on array parameters. Consider using the 'ref' keyword to make the parameter mutable. + + [In] and [Out] attributes Attributs [In] et [Out] @@ -702,6 +722,16 @@ Utilisation de « VirtualMethodIndexAttribute » non valide + + The usage of 'LibraryImportAttribute' does not follow recommendations. {0} + The usage of 'LibraryImportAttribute' does not follow recommendations. {0} + + + + The usage of 'LibraryImportAttribute' does not follow recommendations. + The usage of 'LibraryImportAttribute' does not follow recommendations. + + The element type of the 'ReadOnlySpan' returned by 'GetManagedValuesSource' must be the same as the element type returned by 'GetManagedValuesDestination'. Le type d’élément de « ReadOnlySpan » retourné par « GetManagedValuesSource » doit être identique au type d’élément retourné par « GetManagedValuesDestination ». @@ -903,8 +933,8 @@ - The `[Out]` attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. - L’attribut '[Out]' est uniquement pris en charge sur les paramètres de tableau. Envisagez d’utiliser des mots clés 'out' ou 'ref' pour rendre le paramètre mutable. + The '[Out]' attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. + L’attribut '[Out]' est uniquement pris en charge sur les paramètres de tableau. Envisagez d’utiliser des mots clés 'out' ou 'ref' pour rendre le paramètre mutable. @@ -917,6 +947,11 @@ Le type « {0} » spécifie qu’il prend en charge le marshaling dans la direction « Out », mais il ne fournit pas de méthode « ToManaged » qui retourne le type managé + + It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. + It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. + + 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. « GeneratedComInterfaceAttribute » et « GeneratedComClassAttribute » nécessitent du code non sécurisé. Le projet doit être mis à jour avec « <AllowUnsafeBlocks>true</AllowUnsafeBlocks> ». @@ -987,11 +1022,6 @@ Le marshaling du runtime doit être désactivé dans ce projet en appliquant « System.Runtime.CompilerServices.DisableRuntimeMarshallingAttribute » à l’assembly pour activer le marshaling de ce type. - - An abstract type derived from 'SafeHandle' cannot be marshalled by reference. The provided type must be concrete. - Un type abstrait dérivé de « SafeHandle » ne peut pas être marshalé par référence. Le type fourni doit être concret. - - The size of parameter '{0}' that is marshalled to the callee must be defined when the method is called, but count parameter '{1}' is an 'out' parameter. La taille du paramètre '{0}' qui est marshalé à l'appelé doit être définie lorsque la méthode est appelée, mais le paramètre count '{1}' est un paramètre 'out'. diff --git a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.it.xlf b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.it.xlf index ee4ead36b3e114..7af807ca8b6f60 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.it.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.it.xlf @@ -147,6 +147,16 @@ L'hosting COM .NET con 'EnableComHosting' non supporta le interfacce con 'GeneratedComInterfaceAttribute'. + + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. {0} + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. {0} + + + + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. + + The return value in the managed definition will be converted to an 'out' parameter when calling the unmanaged COM method. If the return value is intended to be the HRESULT code returned by the unmanaged COM method, use '[PreserveSig]' on the method. Il valore restituito nella definizione gestita verrà convertito in un parametro 'out' quando si chiama il metodo COM non gestito. Se il valore restituito deve essere il codice HRESULT restituito dal metodo COM non gestito, utilizzare '[PreserveSig]' sul metodo. @@ -447,6 +457,11 @@ This type will be treated as a struct in the native signature, not as a native HRESULT + + The '[In]' attribute is only supported on array parameters. By-value parameters are considered read-only by default. + The '[In]' attribute is only supported on array parameters. By-value parameters are considered read-only by default. + + The '[In]' attribute is not supported unless the '[Out]' attribute is also used. Blittable arrays cannot be marshalled as '[In]' only. L'attributo '[In]' non è supportato a meno che non venga usato anche l'attributo '[Out]'. Le matrici copiabili da BLT non possono essere sottoposte a marshalling solo come '[In]'. @@ -467,6 +482,11 @@ Gli attributi '[In]' e '[Out]' specificati per questo parametro non sono supportati in questo parametro. + + The '[In]' and '[Out]' attributes are only supported on array parameters. Consider using the 'ref' keyword to make the parameter mutable. + The '[In]' and '[Out]' attributes are only supported on array parameters. Consider using the 'ref' keyword to make the parameter mutable. + + [In] and [Out] attributes Attributi [In] e [Out] @@ -702,6 +722,16 @@ Utilizzo di 'VirtualMethodIndexAttribute' non valido + + The usage of 'LibraryImportAttribute' does not follow recommendations. {0} + The usage of 'LibraryImportAttribute' does not follow recommendations. {0} + + + + The usage of 'LibraryImportAttribute' does not follow recommendations. + The usage of 'LibraryImportAttribute' does not follow recommendations. + + The element type of the 'ReadOnlySpan' returned by 'GetManagedValuesSource' must be the same as the element type returned by 'GetManagedValuesDestination'. Il tipo di elemento di 'ReadOnlySpan' restituito da 'GetManagedValuesSource' deve essere uguale al tipo di elemento restituito da 'GetManagedValuesDestination'. @@ -903,8 +933,8 @@ - The `[Out]` attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. - L'attributo '[Out]' è supportato solo nei parametri di matrice. Provare a usare le parole chiave 'out' o 'ref' per rendere modificabile il parametro. + The '[Out]' attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. + L'attributo '[Out]' è supportato solo nei parametri di matrice. Provare a usare le parole chiave 'out' o 'ref' per rendere modificabile il parametro. @@ -917,6 +947,11 @@ Il tipo '{0}' specifica che supporta il marshalling nella direzione 'Out', ma non fornisce un metodo 'ToManaged' che restituisce il tipo gestito + + It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. + It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. + + 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. GeneratedComInterfaceAttribute e 'GeneratedComClassAttribute' richiedono codice non gestito. Il progetto deve essere aggiornato con '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. @@ -987,11 +1022,6 @@ Il marshalling di runtime in questo progetto deve essere disabilitato applicando 'System.Runtime.CompilerServices.DisableRuntimeMarshallingAttribute' all'assembly per abilitare il marshalling di questo tipo. - - An abstract type derived from 'SafeHandle' cannot be marshalled by reference. The provided type must be concrete. - Non è possibile effettuare il marshalling per riferimento di un tipo astratto derivato da 'SafeHandle'. Il tipo specificato deve essere concreto. - - The size of parameter '{0}' that is marshalled to the callee must be defined when the method is called, but count parameter '{1}' is an 'out' parameter. Le dimensioni del parametro '{0}' di cui viene eseguito il marshalling al destinatario della chiamata devono essere definite quando viene chiamato il metodo, ma il parametro conteggio '{1}' è un parametro 'out'. diff --git a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ja.xlf b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ja.xlf index 9c12755cb80b44..900871e5738958 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ja.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ja.xlf @@ -147,6 +147,16 @@ 'EnableComHosting' を使用した .NET COM ホスティングでは、'GeneratedComInterfaceAttribute' のインターフェイスはサポートされていません + + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. {0} + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. {0} + + + + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. + + The return value in the managed definition will be converted to an 'out' parameter when calling the unmanaged COM method. If the return value is intended to be the HRESULT code returned by the unmanaged COM method, use '[PreserveSig]' on the method. マネージド定義の戻り値は、アンマネージド COM メソッドを呼び出すときに 'out' パラメーターに変換されます。戻り値を、アンマネージド COM メソッドによって返される HRESULT コードにする場合は、メソッドで '[PreserveSig]' を使用してください。 @@ -447,6 +457,11 @@ This type will be treated as a struct in the native signature, not as a native HRESULT + + The '[In]' attribute is only supported on array parameters. By-value parameters are considered read-only by default. + The '[In]' attribute is only supported on array parameters. By-value parameters are considered read-only by default. + + The '[In]' attribute is not supported unless the '[Out]' attribute is also used. Blittable arrays cannot be marshalled as '[In]' only. '[In]'属性は、'[Out]'属性も使用しない限りサポートされません。Blittable 配列は、'[In]'としてのみマーシャリングできません。 @@ -467,6 +482,11 @@ このパラメーターに指定された '[In]' 属性と '[Out]' 属性は、このパラメーターではサポートされていません。 + + The '[In]' and '[Out]' attributes are only supported on array parameters. Consider using the 'ref' keyword to make the parameter mutable. + The '[In]' and '[Out]' attributes are only supported on array parameters. Consider using the 'ref' keyword to make the parameter mutable. + + [In] and [Out] attributes 属性の[In]と[Out] @@ -702,6 +722,16 @@ 'VirtualMethodIndexAttribute' の使用法が無効です + + The usage of 'LibraryImportAttribute' does not follow recommendations. {0} + The usage of 'LibraryImportAttribute' does not follow recommendations. {0} + + + + The usage of 'LibraryImportAttribute' does not follow recommendations. + The usage of 'LibraryImportAttribute' does not follow recommendations. + + The element type of the 'ReadOnlySpan' returned by 'GetManagedValuesSource' must be the same as the element type returned by 'GetManagedValuesDestination'. 'GetManagedValuesSource' によって返される 'ReadOnlySpan' の要素型は、'GetManagedValuesDestination' によって返される要素型と同じである必要があります。 @@ -903,8 +933,8 @@ - The `[Out]` attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. - The `[Out]` attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. + The '[Out]' attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. + The '[Out]' attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. @@ -917,6 +947,11 @@ 型 '{0}' は、'Out' 方向のマーシャリングをサポートしますが、マネージド型を返す 'ToManaged' メソッドは指定されません + + It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. + It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. + + 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. 'GeneratedComInterfaceAttribute' および 'GeneratedComClassAttribute' にはアンセーフ コードが必要です。プロジェクトは '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>' で更新する必要があります。 @@ -987,11 +1022,6 @@ このプロジェクトでは、アセンブリに 'System.Runtime.CompilerServices.DisableRuntimeMarshallingAttribute' を適用してランタイム マーシャリングを無効にし、この型のマーシャリングを有効にする必要があります。 - - An abstract type derived from 'SafeHandle' cannot be marshalled by reference. The provided type must be concrete. - 'SafeHandle' から派生した抽象型は、参照でマーシャリングできません。指定される型は具象型である必要があります。 - - The size of parameter '{0}' that is marshalled to the callee must be defined when the method is called, but count parameter '{1}' is an 'out' parameter. 呼び出し先にマーシャリングされるパラメーター '{0}' のサイズは、メソッドが呼び出されたときに定義する必要がありますが、count パラメーター '{1}' は 'out' パラメーターです。 diff --git a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ko.xlf b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ko.xlf index 53b72d47f60fa3..c2061f1c47ed04 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ko.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ko.xlf @@ -147,6 +147,16 @@ 'EnableComHosting'을 사용한 .NET COM 호스팅은 'GeneratedComInterfaceAttribute'를 사용한 인터페이스를 지원하지 않습니다. + + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. {0} + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. {0} + + + + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. + + The return value in the managed definition will be converted to an 'out' parameter when calling the unmanaged COM method. If the return value is intended to be the HRESULT code returned by the unmanaged COM method, use '[PreserveSig]' on the method. 관리 정의의 반환 값은 관리되지 않는 COM 메서드를 호출할 때 'out' 매개 변수로 변환됩니다. 반환 값이 관리되지 않는 COM 메서드에서 반환된 HRESULT 코드인 경우 메서드에서 '[PreserveSig]'를 사용하세요. @@ -447,6 +457,11 @@ This type will be treated as a struct in the native signature, not as a native HRESULT + + The '[In]' attribute is only supported on array parameters. By-value parameters are considered read-only by default. + The '[In]' attribute is only supported on array parameters. By-value parameters are considered read-only by default. + + The '[In]' attribute is not supported unless the '[Out]' attribute is also used. Blittable arrays cannot be marshalled as '[In]' only. '[Out]' 특성도 사용되지 않는 한 '[In]' 특성은 지원되지 않습니다. Blittable 배열은 '[In]'으로만 마샬링할 수 없습니다. @@ -467,6 +482,11 @@ 이 매개 변수에 제공된 '[In]' 및 '[Out]' 특성은 이 매개 변수에서 지원되지 않습니다. + + The '[In]' and '[Out]' attributes are only supported on array parameters. Consider using the 'ref' keyword to make the parameter mutable. + The '[In]' and '[Out]' attributes are only supported on array parameters. Consider using the 'ref' keyword to make the parameter mutable. + + [In] and [Out] attributes [In] 및 [Out] 속성 @@ -702,6 +722,16 @@ 잘못된 'VirtualMethodIndexAttribute' 사용 + + The usage of 'LibraryImportAttribute' does not follow recommendations. {0} + The usage of 'LibraryImportAttribute' does not follow recommendations. {0} + + + + The usage of 'LibraryImportAttribute' does not follow recommendations. + The usage of 'LibraryImportAttribute' does not follow recommendations. + + The element type of the 'ReadOnlySpan' returned by 'GetManagedValuesSource' must be the same as the element type returned by 'GetManagedValuesDestination'. 'GetManagedValuesSource'에서 반환된 'ReadOnlySpan'의 요소 형식은 'GetManagedValuesDestination'에서 반환된 요소 형식과 동일해야 합니다. @@ -903,8 +933,8 @@ - The `[Out]` attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. - The `[Out]` attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. + The '[Out]' attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. + The '[Out]' attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. @@ -917,6 +947,11 @@ 형식 '{0}'은(는) 'Out' 방향으로 마샬링을 지원하도록 지정하지만 관리 형식을 반환하는 'ToManaged' 메서드를 제공하지 않습니다. + + It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. + It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. + + 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. 'GeneratedComInterfaceAttribute' 및 'GeneratedComClassAttribute'에는 안전하지 않은 코드가 필요합니다. 프로젝트를 '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'로 업데이트해야 합니다. @@ -987,11 +1022,6 @@ 이 형식의 마샬링을 활성화하려면 어셈블리에 'System.Runtime.CompilerServices.DisableRuntimeMarshallingAttribute'를 적용하여 이 프로젝트에서 런타임 마샬링을 비활성화해야 합니다. - - An abstract type derived from 'SafeHandle' cannot be marshalled by reference. The provided type must be concrete. - 'SafeHandle'에서 파생된 추상 형식은 참조로 마샬링할 수 없습니다. 제공된 형식은 구체적이어야 합니다. - - The size of parameter '{0}' that is marshalled to the callee must be defined when the method is called, but count parameter '{1}' is an 'out' parameter. 메서드를 호출할 때 호출 수신자로 마샬링되는 매개 변수 '{0}'의 크기를 정의해야 하지만 count 매개 변수 '{1}'은(는) 'out' 매개 변수입니다. diff --git a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.pl.xlf b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.pl.xlf index fb6cf9f172c21b..4a5bed01000cbb 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.pl.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.pl.xlf @@ -147,6 +147,16 @@ Hosting modelu COM platformy .NET z elementem „EnableComHosting” nie obsługuje interfejsów z atrybutem „GeneratedComInterfaceAttribute” + + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. {0} + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. {0} + + + + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. + + The return value in the managed definition will be converted to an 'out' parameter when calling the unmanaged COM method. If the return value is intended to be the HRESULT code returned by the unmanaged COM method, use '[PreserveSig]' on the method. Wartość zwracana w definicji zarządzanej zostanie przekonwertowana na parametr „out” podczas wywoływania niezarządzanej metody COM. Jeśli wartość zwracana ma być kodem HRESULT zwracanym przez niezarządzaną metodę COM, należy użyć „[PreserveSig]” w metodzie. @@ -447,6 +457,11 @@ This type will be treated as a struct in the native signature, not as a native HRESULT + + The '[In]' attribute is only supported on array parameters. By-value parameters are considered read-only by default. + The '[In]' attribute is only supported on array parameters. By-value parameters are considered read-only by default. + + The '[In]' attribute is not supported unless the '[Out]' attribute is also used. Blittable arrays cannot be marshalled as '[In]' only. Atrybut „[In]” nie jest obsługiwany, chyba że używany jest również atrybut „[Out]”. Tablice kopiowalne nie mogą być kierowane tylko jako „[In]”. @@ -467,6 +482,11 @@ Podane atrybuty „[In]” i „[Out]” w tym parametrze nie są obsługiwane w tym parametrze. + + The '[In]' and '[Out]' attributes are only supported on array parameters. Consider using the 'ref' keyword to make the parameter mutable. + The '[In]' and '[Out]' attributes are only supported on array parameters. Consider using the 'ref' keyword to make the parameter mutable. + + [In] and [Out] attributes Atrybuty [In] i [Out] @@ -702,6 +722,16 @@ Nieprawidłowe użycie atrybutu „VirtualMethodIndexAttribute” + + The usage of 'LibraryImportAttribute' does not follow recommendations. {0} + The usage of 'LibraryImportAttribute' does not follow recommendations. {0} + + + + The usage of 'LibraryImportAttribute' does not follow recommendations. + The usage of 'LibraryImportAttribute' does not follow recommendations. + + The element type of the 'ReadOnlySpan' returned by 'GetManagedValuesSource' must be the same as the element type returned by 'GetManagedValuesDestination'. Typ elementu „ReadOnlySpan” zwracany przez element „GetManagedValuesSource” musi być taki sam jak typ elementu zwracany przez element „GetManagedValuesDestination”. @@ -903,8 +933,8 @@ - The `[Out]` attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. - Atrybut „[Out]” jest obsługiwany tylko w przypadku parametrów tablicy. Rozważ użycie słów kluczowych „out” lub „ref”, aby umożliwić modyfikowanie parametru. + The '[Out]' attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. + Atrybut „[Out]” jest obsługiwany tylko w przypadku parametrów tablicy. Rozważ użycie słów kluczowych „out” lub „ref”, aby umożliwić modyfikowanie parametru. @@ -917,6 +947,11 @@ Typ „{0}” określa, że obsługuje skierowanie w kierunku „Out”, ale nie zapewnia metody „ToManaged”, która zwraca typ zarządzany + + It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. + It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. + + 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. Atrybut „GeneratedComInterfaceAttribute” i „GeneratedComClassAttribute” wymagają niebezpiecznego kodu. Projekt musi zostać zaktualizowany za pomocą polecenia „<AllowUnsafeBlocks>true</AllowUnsafeBlocks>”. @@ -987,11 +1022,6 @@ Marshalling środowiska uruchomieniowego musi być wyłączony w tym projekcie przez zastosowanie do zestawu atrybutu „System.Runtime.InteropServices.DisableRuntimeMarshallingAttribute”, aby umożliwić marshalling tego typu. - - An abstract type derived from 'SafeHandle' cannot be marshalled by reference. The provided type must be concrete. - Typ abstrakcyjny pochodzący od elementu „SafeHandle” nie może być skierowany przez odwołanie. Podany typ musi być konkretny. - - The size of parameter '{0}' that is marshalled to the callee must be defined when the method is called, but count parameter '{1}' is an 'out' parameter. Rozmiar parametru „{0}”, który jest kierowany do obiektu wywołującego, musi być zdefiniowany podczas wywoływania metody, ale parametr ILE.LICZB „{1}” jest parametrem „out”. diff --git a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.pt-BR.xlf b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.pt-BR.xlf index 8d2e606d2d0307..a2dcb00fc8aa2c 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.pt-BR.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.pt-BR.xlf @@ -147,6 +147,16 @@ A hospedagem .NET COM com 'EnableComHosting' não dá suporte a interfaces com 'GeneratedComInterfaceAttribute' + + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. {0} + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. {0} + + + + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. + + The return value in the managed definition will be converted to an 'out' parameter when calling the unmanaged COM method. If the return value is intended to be the HRESULT code returned by the unmanaged COM method, use '[PreserveSig]' on the method. O valor de retorno na definição gerenciada será convertido em um parâmetro 'out' ao chamar o método COM não gerenciado. Se o valor de retorno for o código HRESULT retornado pelo método COM não gerenciado, use '[PreserveSig]' no método. @@ -447,6 +457,11 @@ This type will be treated as a struct in the native signature, not as a native HRESULT + + The '[In]' attribute is only supported on array parameters. By-value parameters are considered read-only by default. + The '[In]' attribute is only supported on array parameters. By-value parameters are considered read-only by default. + + The '[In]' attribute is not supported unless the '[Out]' attribute is also used. Blittable arrays cannot be marshalled as '[In]' only. O atributo '[In]' não é suportado, a menos que o atributo '[Out]' também seja usado. Matrizes Blittable não podem ser empacotadas apenas como '[In]'. @@ -467,6 +482,11 @@ Os atributos '[In]' e '[Out]' neste parâmetro não têm suporte neste parâmetro. + + The '[In]' and '[Out]' attributes are only supported on array parameters. Consider using the 'ref' keyword to make the parameter mutable. + The '[In]' and '[Out]' attributes are only supported on array parameters. Consider using the 'ref' keyword to make the parameter mutable. + + [In] and [Out] attributes Atributos [In] e [Out] @@ -702,6 +722,16 @@ Uso de 'VirtualMethodIndexAttribute' inválido + + The usage of 'LibraryImportAttribute' does not follow recommendations. {0} + The usage of 'LibraryImportAttribute' does not follow recommendations. {0} + + + + The usage of 'LibraryImportAttribute' does not follow recommendations. + The usage of 'LibraryImportAttribute' does not follow recommendations. + + The element type of the 'ReadOnlySpan' returned by 'GetManagedValuesSource' must be the same as the element type returned by 'GetManagedValuesDestination'. O tipo de elemento de 'ReadOnlySpan' retornado por 'GetManagedValuesSource' deve ser igual ao tipo de elemento retornado por 'GetManagedValuesDestination'. @@ -903,8 +933,8 @@ - The `[Out]` attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. - The `[Out]` attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. + The '[Out]' attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. + The '[Out]' attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. @@ -917,6 +947,11 @@ O tipo '{0}' especifica que ele dá suporte a marshalling na direção 'Out', mas não fornece um método 'ToManaged' que retorna o tipo gerenciado + + It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. + It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. + + 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. "GeneratedComInterfaceAttribute" e "GeneratedComClassAttribute" exigem código não seguro. O projeto deve ser atualizado com "<AllowUnsafeBlocks>true</AllowUnsafeBlocks>". @@ -987,11 +1022,6 @@ O marshalling de tempo de execução deve ser desabilitado neste projeto aplicando o 'System.Runtime.CompilerServices.DisableRuntimeMarshallingAttribute' ao assembly para habilitar o marshalling desse tipo. - - An abstract type derived from 'SafeHandle' cannot be marshalled by reference. The provided type must be concrete. - Um tipo abstrato derivado de 'SafeHandle' não pode ser marshalled por referência. O tipo fornecido deve ser concreto. - - The size of parameter '{0}' that is marshalled to the callee must be defined when the method is called, but count parameter '{1}' is an 'out' parameter. O tamanho do parâmetro '{0}' que é empacotado para o receptor deve ser definido quando o método é chamado, mas o parâmetro de contagem '{1}' é um parâmetro 'out'. diff --git a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ru.xlf b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ru.xlf index fca13d2b25e7f6..9631d6c981aacd 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ru.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ru.xlf @@ -147,6 +147,16 @@ Размещение .NET COM с "EnableComHosting" не поддерживает интерфейсы с "GeneratedComInterfaceAttribute" + + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. {0} + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. {0} + + + + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. + + The return value in the managed definition will be converted to an 'out' parameter when calling the unmanaged COM method. If the return value is intended to be the HRESULT code returned by the unmanaged COM method, use '[PreserveSig]' on the method. Возвращаемое значение в управляемом определении будет преобразовано в параметр "out" при вызове неуправляемого метода COM. Если возвращаемое значение должно быть кодом HRESULT, возвращаемым неуправляемым COM-методом, используйте "[PreserveSig]" в методе. @@ -447,6 +457,11 @@ This type will be treated as a struct in the native signature, not as a native HRESULT + + The '[In]' attribute is only supported on array parameters. By-value parameters are considered read-only by default. + The '[In]' attribute is only supported on array parameters. By-value parameters are considered read-only by default. + + The '[In]' attribute is not supported unless the '[Out]' attribute is also used. Blittable arrays cannot be marshalled as '[In]' only. Атрибут "[In]" не поддерживается, если также не используется атрибут "[Out]". Преобразуемые массивы нельзя сортировать только как "[In]". @@ -467,6 +482,11 @@ Указанные атрибуты \"[In]\" и \"[Out]\" для этого параметра не поддерживаются. + + The '[In]' and '[Out]' attributes are only supported on array parameters. Consider using the 'ref' keyword to make the parameter mutable. + The '[In]' and '[Out]' attributes are only supported on array parameters. Consider using the 'ref' keyword to make the parameter mutable. + + [In] and [Out] attributes Атрибуты [In] и [Out] @@ -702,6 +722,16 @@ Недопустимое использование VirtualMethodIndexAttribute + + The usage of 'LibraryImportAttribute' does not follow recommendations. {0} + The usage of 'LibraryImportAttribute' does not follow recommendations. {0} + + + + The usage of 'LibraryImportAttribute' does not follow recommendations. + The usage of 'LibraryImportAttribute' does not follow recommendations. + + The element type of the 'ReadOnlySpan' returned by 'GetManagedValuesSource' must be the same as the element type returned by 'GetManagedValuesDestination'. Тип элемента \"ReadOnlySpan\", возвращенный методом \"GetManagedValuesSource\", должен совпадать с типом элемента, возвращаемым методом \"GetManagedValuesDestination\". @@ -903,8 +933,8 @@ - The `[Out]` attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. - Атрибут "[Out]" поддерживается только для параметров массива. Рассмотрите возможность использования ключевых слов "out" или "ref", чтобы сделать параметр изменяемым. + The '[Out]' attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. + Атрибут "[Out]" поддерживается только для параметров массива. Рассмотрите возможность использования ключевых слов "out" или "ref", чтобы сделать параметр изменяемым. @@ -917,6 +947,11 @@ Тип \"{0}\" указывает, что поддерживает маршализацию в направлении \"наружу\", но не предоставляет метод \"ToManaged\", который возвращает управляемый тип + + It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. + It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. + + 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. Для "GeneratedComInterfaceAttribute" и "GeneratedComClassAttribute" требуется небезопасный код. Проект необходимо обновить с использованием значения "<AllowUnsafeBlocks>true</AllowUnsafeBlocks>". @@ -987,11 +1022,6 @@ В этом проекте следует отключить маршализацию среды выполнения путем применения к сборке атрибута \"System.Runtime.CompilerServices.DisableRuntimeMarshallingAttribute\" для включения маршализации этого типа. - - An abstract type derived from 'SafeHandle' cannot be marshalled by reference. The provided type must be concrete. - Абстрактный тип, производный от \"SafeHandle\", нельзя маршализировать по ссылке. Указанный тип должен быть конкретным. - - The size of parameter '{0}' that is marshalled to the callee must be defined when the method is called, but count parameter '{1}' is an 'out' parameter. При вызове метода должен быть определен размер параметра "{0}", который был маршалирован вызываемому абоненту, но исчисляемый параметр "{1}" является выходным. diff --git a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.tr.xlf b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.tr.xlf index 44d2a4a4cbadd3..06f7c1279e14ac 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.tr.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.tr.xlf @@ -147,6 +147,16 @@ 'EnableComHosting' ile barındırma .NET COM, 'GeneratedComInterfaceAttribute' ile arabirimleri desteklemez + + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. {0} + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. {0} + + + + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. + + The return value in the managed definition will be converted to an 'out' parameter when calling the unmanaged COM method. If the return value is intended to be the HRESULT code returned by the unmanaged COM method, use '[PreserveSig]' on the method. Yönetilen tanımdaki dönüş değeri, yönetilmeyen COM yöntemi çağrılırken 'out' parametresine dönüştürülür. Dönüş değerinin yönetilmeyen COM yöntemi tarafından döndürülen HRESULT kodu olması amaçlanmışsa, yöntemde '[PreserveSig]' kullanın. @@ -447,6 +457,11 @@ This type will be treated as a struct in the native signature, not as a native HRESULT + + The '[In]' attribute is only supported on array parameters. By-value parameters are considered read-only by default. + The '[In]' attribute is only supported on array parameters. By-value parameters are considered read-only by default. + + The '[In]' attribute is not supported unless the '[Out]' attribute is also used. Blittable arrays cannot be marshalled as '[In]' only. '[Out]' özniteliği de kullanılmadığı sürece '[In]' özniteliği desteklenmez. Blittable dizileri yalnızca '[In]' olarak hazırlanamaz. @@ -467,6 +482,11 @@ Bu parametrede sağlanan '[In]' ve '[Out]' öznitelikleri bu parametrede desteklenmiyor. + + The '[In]' and '[Out]' attributes are only supported on array parameters. Consider using the 'ref' keyword to make the parameter mutable. + The '[In]' and '[Out]' attributes are only supported on array parameters. Consider using the 'ref' keyword to make the parameter mutable. + + [In] and [Out] attributes [In] ve [Out] öznitelikleri @@ -702,6 +722,16 @@ Geçersiz 'VirtualMethodIndexAttribute' kullanımı + + The usage of 'LibraryImportAttribute' does not follow recommendations. {0} + The usage of 'LibraryImportAttribute' does not follow recommendations. {0} + + + + The usage of 'LibraryImportAttribute' does not follow recommendations. + The usage of 'LibraryImportAttribute' does not follow recommendations. + + The element type of the 'ReadOnlySpan' returned by 'GetManagedValuesSource' must be the same as the element type returned by 'GetManagedValuesDestination'. 'GetManagedValuesSource' tarafından döndürülen 'ReadOnlySpan' öğe türü, 'GetManagedValuesDestination' tarafından döndürülen öğe türüyle aynı olmalıdır. @@ -903,8 +933,8 @@ - The `[Out]` attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. - '[Out]' özniteliği yalnızca dizi parametrelerinde desteklenir. Parametreyi değiştirilebilir yapmak için 'out' veya 'ref' anahtar sözcükleri kullanmayı düşünün. + The '[Out]' attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. + '[Out]' özniteliği yalnızca dizi parametrelerinde desteklenir. Parametreyi değiştirilebilir yapmak için 'out' veya 'ref' anahtar sözcükleri kullanmayı düşünün. @@ -917,6 +947,11 @@ '{0}' türü, 'Out' yönünde sıralamayı desteklediğini belirtiyor, ancak yönetilen türü döndüren bir 'ToManaged' metodu sağlamıyor + + It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. + It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. + + 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. 'GeneratedComInterfaceAttribute' ve 'GeneratedComClassAttribute' güvenli olmayan kod gerektiriyor. Projenin '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>' ile güncelleştirilmiş olması gerekiyor. @@ -987,11 +1022,6 @@ Bu türü sıralamayı etkinleştirmek için derlemeye 'System.Runtime.CompilerServices.DisableRuntimeMarshallingAttribute' uygulanarak bu projede çalışma zamanı sıralaması devre dışı bırakılmalıdır. - - An abstract type derived from 'SafeHandle' cannot be marshalled by reference. The provided type must be concrete. - 'SafeHandle' özelliğinden türetilen soyut türler, başvuruya göre sıralanamaz. Sağlanan tür somut olmalıdır. - - The size of parameter '{0}' that is marshalled to the callee must be defined when the method is called, but count parameter '{1}' is an 'out' parameter. Aramanın alıcısına hazırlanan '{0}' parametresinin boyutu yöntem çağrıldığında tanımlanmalıdır ancak '{1}' sayı parametresi bir ‘çıkış’ parametresidir. diff --git a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.zh-Hans.xlf b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.zh-Hans.xlf index e6fbf9115aec2d..9cf9ccbc906f53 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.zh-Hans.xlf @@ -147,6 +147,16 @@ 具有“EnableComHosting”的 .NET COM 托管不支持具有“GeneratedComInterfaceAttribute”的接口 + + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. {0} + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. {0} + + + + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. + + The return value in the managed definition will be converted to an 'out' parameter when calling the unmanaged COM method. If the return value is intended to be the HRESULT code returned by the unmanaged COM method, use '[PreserveSig]' on the method. 调用非托管 COM 方法时,托管定义中的返回值将转换为 "out" 参数。如果返回值是非托管 COM 方法返回的 HRESULT 代码,请对方法使用 "[PreserveSig]"。 @@ -447,6 +457,11 @@ This type will be treated as a struct in the native signature, not as a native HRESULT + + The '[In]' attribute is only supported on array parameters. By-value parameters are considered read-only by default. + The '[In]' attribute is only supported on array parameters. By-value parameters are considered read-only by default. + + The '[In]' attribute is not supported unless the '[Out]' attribute is also used. Blittable arrays cannot be marshalled as '[In]' only. 不支持“[In]”属性,除非也使用“[Out]”属性。不能仅将 Blittable 数组封送为“[In]”。 @@ -467,6 +482,11 @@ 此参数上提供的 “[In]” 和 “[Out]” 属性在此参数上不受支持。 + + The '[In]' and '[Out]' attributes are only supported on array parameters. Consider using the 'ref' keyword to make the parameter mutable. + The '[In]' and '[Out]' attributes are only supported on array parameters. Consider using the 'ref' keyword to make the parameter mutable. + + [In] and [Out] attributes [In] 和 [Out] 属性 @@ -702,6 +722,16 @@ “VirtualMethodIndexAttribute” 使用情况无效 + + The usage of 'LibraryImportAttribute' does not follow recommendations. {0} + The usage of 'LibraryImportAttribute' does not follow recommendations. {0} + + + + The usage of 'LibraryImportAttribute' does not follow recommendations. + The usage of 'LibraryImportAttribute' does not follow recommendations. + + The element type of the 'ReadOnlySpan' returned by 'GetManagedValuesSource' must be the same as the element type returned by 'GetManagedValuesDestination'. “GetManagedValuesSource” 返回的 “ReadOnlySpan” 的元素类型必须与 “GetManagedValuesDestination” 返回的元素类型相同。 @@ -903,8 +933,8 @@ - The `[Out]` attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. - The `[Out]` attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. + The '[Out]' attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. + The '[Out]' attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. @@ -917,6 +947,11 @@ 类型“{0}”指定它支持按 “Out” 方向进行封送,但不提供返回托管类型的 “ToManaged” 方法 + + It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. + It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. + + 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. “GeneratedComInterfaceAttribute”和“GeneratedComClassAttribute”需要不安全代码。必须将项目更新为“<AllowUnsafeBlocks>true</AllowUnsafeBlocks>”。 @@ -987,11 +1022,6 @@ 必须通过将 \"System.Runtime.CompilerServices.DisableRuntimeMarshallingAttribute\" 应用到程序集来在此项目中禁用运行时封送,以启用此类型的封送处理。 - - An abstract type derived from 'SafeHandle' cannot be marshalled by reference. The provided type must be concrete. - 无法通过引用封送派生自 “SafeHandle” 的抽象类型。提供的类型必须是具体的。 - - The size of parameter '{0}' that is marshalled to the callee must be defined when the method is called, but count parameter '{1}' is an 'out' parameter. 调用方法时,必须定义封送给被调用方的参数“{0}”的大小,但计数参数“{1}”是一个 "out" 参数。 diff --git a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.zh-Hant.xlf b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.zh-Hant.xlf index 528339678cefdb..08a0d9ac8eb548 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.zh-Hant.xlf @@ -147,6 +147,16 @@ 以 'EnableComHosting' 裝載的 .NET COM 不支援具有 'GeneratedComInterfaceAttribute' 的介面 + + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. {0} + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. {0} + + + + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. + + The return value in the managed definition will be converted to an 'out' parameter when calling the unmanaged COM method. If the return value is intended to be the HRESULT code returned by the unmanaged COM method, use '[PreserveSig]' on the method. 呼叫未受控 COM 方法時,受控定義中的傳回值將轉換為 'out' 參數。如果傳回值預期是未受控 COM 方法傳回的 HRESULT 代碼,請在方法上使用 '[PreserveSig]'。 @@ -447,6 +457,11 @@ This type will be treated as a struct in the native signature, not as a native HRESULT + + The '[In]' attribute is only supported on array parameters. By-value parameters are considered read-only by default. + The '[In]' attribute is only supported on array parameters. By-value parameters are considered read-only by default. + + The '[In]' attribute is not supported unless the '[Out]' attribute is also used. Blittable arrays cannot be marshalled as '[In]' only. 除非也使用 '[Out]' 屬性,否則不支援 '[In]' 屬性。無法只將 Blittable 陣列整理為 '[In]'。 @@ -467,6 +482,11 @@ 此參數不支援在此參數上提供的 '[In]' 和 '[Out]' 屬性。 + + The '[In]' and '[Out]' attributes are only supported on array parameters. Consider using the 'ref' keyword to make the parameter mutable. + The '[In]' and '[Out]' attributes are only supported on array parameters. Consider using the 'ref' keyword to make the parameter mutable. + + [In] and [Out] attributes [In] 與 [Out] 屬性 @@ -702,6 +722,16 @@ 'VirtualMethodIndexAttribute' 使用方式無效 + + The usage of 'LibraryImportAttribute' does not follow recommendations. {0} + The usage of 'LibraryImportAttribute' does not follow recommendations. {0} + + + + The usage of 'LibraryImportAttribute' does not follow recommendations. + The usage of 'LibraryImportAttribute' does not follow recommendations. + + The element type of the 'ReadOnlySpan' returned by 'GetManagedValuesSource' must be the same as the element type returned by 'GetManagedValuesDestination'. 'GetManagedValuesSource' 傳回的 'ReadOnlySpan' 元素類型必須與 'GetManagedValuesDestination' 傳回的元素類型相同。 @@ -903,8 +933,8 @@ - The `[Out]` attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. - 只有陣列參數才支援 '[Out]' 屬性。請考慮使用 'out' 或 'ref' 關鍵字將參數設為可變。 + The '[Out]' attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. + 只有陣列參數才支援 '[Out]' 屬性。請考慮使用 'out' 或 'ref' 關鍵字將參數設為可變。 @@ -917,6 +947,11 @@ 類型 '{0}' 指定它支援以 'Out' 方向排列,但未提供傳回受管理類型的 'ToManaged' 方法 + + It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. + It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. + + 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. 'GeneratedComInterfaceAttribute' 和 'GeneratedComClassAttribute' 需要不安全的程式碼。專案必須以 '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>' 更新。 @@ -987,11 +1022,6 @@ 必須將 'System.Runtime.CompilerServices.DisableRuntimeMarshallingAttribute' 套用到組件,以停用此專案中的執行階段封送處理,以啟用此類型的封送處理。 - - An abstract type derived from 'SafeHandle' cannot be marshalled by reference. The provided type must be concrete. - 衍生自 'SafeHandle' 的抽象類型無法依參考排列。提供的類型必須是實體。 - - The size of parameter '{0}' that is marshalled to the callee must be defined when the method is called, but count parameter '{1}' is an 'out' parameter. 呼叫方法時,必須定義封送處理給被呼叫者的參數 '{0}' 的大小,但 count 參數 '{1}' 是 'out' 參數。 diff --git a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/DiagnosticDescriptorProvider.cs b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/DiagnosticDescriptorProvider.cs index 2bef64490f9a4e..eb9a0237307bc3 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/DiagnosticDescriptorProvider.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/DiagnosticDescriptorProvider.cs @@ -24,6 +24,7 @@ internal sealed class DiagnosticDescriptorProvider : IDiagnosticDescriptorProvid GeneratorDiagnostic.NotSupported { NotSupportedDetails: not null, TypePositionInfo.IsManagedReturnPosition: false } => GeneratorDiagnostics.ParameterTypeNotSupportedWithDetails, GeneratorDiagnostic.UnnecessaryData { TypePositionInfo.IsManagedReturnPosition: false } => GeneratorDiagnostics.UnnecessaryParameterMarshallingInfo, GeneratorDiagnostic.UnnecessaryData { TypePositionInfo.IsManagedReturnPosition: true } => GeneratorDiagnostics.UnnecessaryReturnMarshallingInfo, + GeneratorDiagnostic.NotRecommended => GeneratorDiagnostics.LibraryImportUsageDoesNotFollowBestPractices, { IsFatal: false } => null, { TypePositionInfo.IsManagedReturnPosition: true } => GeneratorDiagnostics.ReturnTypeNotSupported, { TypePositionInfo.IsManagedReturnPosition: false } => GeneratorDiagnostics.ParameterTypeNotSupported, diff --git a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/GeneratorDiagnostics.cs b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/GeneratorDiagnostics.cs index 2af2abadcdd607..f5fd78d48e587c 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/GeneratorDiagnostics.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/GeneratorDiagnostics.cs @@ -254,6 +254,16 @@ public class Ids DiagnosticSeverity.Warning, isEnabledByDefault: true); + /// + public static readonly DiagnosticDescriptor LibraryImportUsageDoesNotFollowBestPractices = + new DiagnosticDescriptor( + Ids.NotRecommendedGeneratedComInterfaceUsage, + GetResourceString(nameof(SR.LibraryImportUsageDoesNotFollowBestPracticesTitle)), + GetResourceString(nameof(SR.LibraryImportUsageDoesNotFollowBestPracticesMessageWithDetails)), + Category, + DiagnosticSeverity.Info, + isEnabledByDefault: true); + /// /// Report diagnostic for invalid configuration for string marshalling. /// diff --git a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGenerator.cs b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGenerator.cs index 6b3bd184664973..b3fdc79bdec955 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGenerator.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGenerator.cs @@ -313,6 +313,20 @@ private static (MemberDeclarationSyntax, ImmutableArray) Generat return (PrintForwarderStub(pinvokeStub.StubMethodSyntaxTemplate, explicitForwarding: true, pinvokeStub, diagnostics), pinvokeStub.Diagnostics.Array.AddRange(diagnostics.Diagnostics)); } + bool supportsTargetFramework = !pinvokeStub.LibraryImportData.SetLastError + || options.GenerateForwarders + || (pinvokeStub.GeneratorFactoryKey.Key.TargetFramework == TargetFramework.Net + && pinvokeStub.GeneratorFactoryKey.Key.Version.Major >= 6); + + foreach (TypePositionInfo typeInfo in pinvokeStub.SignatureContext.ElementTypeInformation) + { + if (typeInfo.MarshallingAttributeInfo is MissingSupportMarshallingInfo) + { + supportsTargetFramework = false; + break; + } + } + // Generate stub code var stubGenerator = new PInvokeStubCodeGenerator( pinvokeStub.GeneratorFactoryKey.Key.TargetFramework, @@ -325,9 +339,9 @@ private static (MemberDeclarationSyntax, ImmutableArray) Generat // Check if the generator should produce a forwarder stub - regular DllImport. // This is done if the signature is blittable or the target framework is not supported. if (stubGenerator.StubIsBasicForwarder - || !stubGenerator.SupportsTargetFramework) + || !supportsTargetFramework) { - return (PrintForwarderStub(pinvokeStub.StubMethodSyntaxTemplate, !stubGenerator.SupportsTargetFramework, pinvokeStub, diagnostics), pinvokeStub.Diagnostics.Array.AddRange(diagnostics.Diagnostics)); + return (PrintForwarderStub(pinvokeStub.StubMethodSyntaxTemplate, !supportsTargetFramework, pinvokeStub, diagnostics), pinvokeStub.Diagnostics.Array.AddRange(diagnostics.Diagnostics)); } ImmutableArray forwardedAttributes = pinvokeStub.ForwardedAttributes.Array; diff --git a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGenerator.csproj b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGenerator.csproj index 58c2175cebbe5f..8fae82f5b846ee 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGenerator.csproj +++ b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGenerator.csproj @@ -15,7 +15,6 @@ - diff --git a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGeneratorHelpers.cs b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGeneratorHelpers.cs index d07d101732b044..44e316c419ff29 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGeneratorHelpers.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGeneratorHelpers.cs @@ -48,17 +48,20 @@ internal static class LibraryImportGeneratorHelpers InteropGenerationOptions interopGenerationOptions = new(options.UseMarshalType); generatorFactory = new MarshalAsMarshallingGeneratorFactory(interopGenerationOptions, generatorFactory); - IMarshallingGeneratorFactory elementFactory = new AttributedMarshallingModelGeneratorFactory( - // Since the char type in an array will not be part of the P/Invoke signature, we can - // use the regular blittable marshaller in all cases. - new CharMarshallingGeneratorFactory(generatorFactory, useBlittableMarshallerForUtf16: true, TypeNames.LibraryImportAttribute_ShortName), - new AttributedMarshallingModelOptions(runtimeMarshallingDisabled, MarshalMode.ElementIn, MarshalMode.ElementRef, MarshalMode.ElementOut)); - // We don't need to include the later generator factories for collection elements - // as the later generator factories only apply to parameters. - generatorFactory = new AttributedMarshallingModelGeneratorFactory( - generatorFactory, - elementFactory, - new AttributedMarshallingModelOptions(runtimeMarshallingDisabled, MarshalMode.ManagedToUnmanagedIn, MarshalMode.ManagedToUnmanagedRef, MarshalMode.ManagedToUnmanagedOut)); + if (env.TargetFramework == TargetFramework.Net || env.TargetFrameworkVersion.Major >= 7) + { + IMarshallingGeneratorFactory elementFactory = new AttributedMarshallingModelGeneratorFactory( + // Since the char type in an array will not be part of the P/Invoke signature, we can + // use the regular blittable marshaller in all cases. + new CharMarshallingGeneratorFactory(generatorFactory, useBlittableMarshallerForUtf16: true, TypeNames.LibraryImportAttribute_ShortName), + new AttributedMarshallingModelOptions(runtimeMarshallingDisabled, MarshalMode.ElementIn, MarshalMode.ElementRef, MarshalMode.ElementOut)); + // We don't need to include the later generator factories for collection elements + // as the later generator factories only apply to parameters. + generatorFactory = new AttributedMarshallingModelGeneratorFactory( + generatorFactory, + elementFactory, + new AttributedMarshallingModelOptions(runtimeMarshallingDisabled, MarshalMode.ManagedToUnmanagedIn, MarshalMode.ManagedToUnmanagedRef, MarshalMode.ManagedToUnmanagedOut)); + } generatorFactory = new ByValueContentsMarshalKindValidator(generatorFactory); } diff --git a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/PInvokeStubCodeGenerator.cs b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/PInvokeStubCodeGenerator.cs index 2a1ac3921188c6..ec9283cc465988 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/PInvokeStubCodeGenerator.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/PInvokeStubCodeGenerator.cs @@ -28,8 +28,6 @@ namespace Microsoft.Interop /// internal sealed class PInvokeStubCodeGenerator { - public bool SupportsTargetFramework { get; } - public bool StubIsBasicForwarder { get; } /// @@ -57,18 +55,6 @@ public PInvokeStubCodeGenerator( { _setLastError = setLastError; - // Support for SetLastError logic requires .NET 6+. Initialize the - // supports target framework value with this value. - if (_setLastError) - { - SupportsTargetFramework = targetFramework == TargetFramework.Net - && targetFrameworkVersion.Major >= 6; - } - else - { - SupportsTargetFramework = true; - } - _context = new ManagedToNativeStubCodeContext(targetFramework, targetFrameworkVersion, ReturnIdentifier, ReturnIdentifier); _marshallers = BoundGenerators.Create(argTypes, generatorFactory, _context, new Forwarder(), out var bindingDiagnostics); @@ -84,17 +70,13 @@ public PInvokeStubCodeGenerator( foreach (BoundGenerator generator in _marshallers.SignatureMarshallers) { - // Check if marshalling info and generator support the current target framework. - SupportsTargetFramework &= generator.TypeInfo.MarshallingAttributeInfo is not MissingSupportMarshallingInfo - && generator.Generator.IsSupported(targetFramework, targetFrameworkVersion); - // Check if generator is either blittable or just a forwarder. noMarshallingNeeded &= generator is { Generator: BlittableMarshaller, TypeInfo.IsByRef: false } or { Generator: Forwarder }; } StubIsBasicForwarder = !setLastError - && _marshallers.ManagedNativeSameReturn // If the managed return has native return position, then it's the return for both. + && _marshallers.ManagedNativeSameReturn && noMarshallingNeeded; } diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/AnalyzerConfigOptionsExtensions.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/AnalyzerConfigOptionsExtensions.cs index c7cfc69972d337..65f188ae1f7175 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/AnalyzerConfigOptionsExtensions.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/AnalyzerConfigOptionsExtensions.cs @@ -20,8 +20,8 @@ public static class AnalyzerConfigOptionsExtensions // Parse from the informational version as that is the only version that always matches the TFM version // even in debug builds. private static readonly Version ThisAssemblyVersion = Version.Parse( - typeof(IncrementalGeneratorInitializationContextExtensions).Assembly - .GetCustomAttribute().InformationalVersion.Split('-')[0]); + typeof(AnalyzerConfigOptionsExtensions).Assembly + .GetCustomAttribute().InformationalVersion.Split('-', '+')[0]); public static TargetFrameworkSettings GetTargetFrameworkSettings(this AnalyzerConfigOptions options) { diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IncrementalValuesProviderExtensions.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IncrementalValuesProviderExtensions.cs index 123d649c913cd5..5455510ac356c0 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IncrementalValuesProviderExtensions.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IncrementalValuesProviderExtensions.cs @@ -47,7 +47,7 @@ public static IncrementalValuesProvider SelectNormalized(this Incr return provider.Select((node, ct) => node.NormalizeWhitespace()); } - public static (IncrementalValuesProvider, IncrementalValuesProvider) Split(this IncrementalValuesProvider<(T, T2)> provider) + public static (IncrementalValuesProvider, IncrementalValuesProvider) Split(this IncrementalValuesProvider<(T, T2)> provider) { return (provider.Select(static (data, ct) => data.Item1), provider.Select(static (data, ct) => data.Item2)); } diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/AttributedMarshallingModelGeneratorFactory.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/AttributedMarshallingModelGeneratorFactory.cs index 73b8cd8eb901a9..69180eca11c190 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/AttributedMarshallingModelGeneratorFactory.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/AttributedMarshallingModelGeneratorFactory.cs @@ -431,17 +431,10 @@ private ResolvedGenerator CreateNativeCollectionMarshaller( { byValueMarshalKindSupport = ByValueMarshalKindSupportDescriptor.Default; } - else if (!elementIsBlittable || ElementTypeIsSometimesNonBlittable(elementInfo)) - { - // If the type is not blittable or is sometimes not blittable, we will generate different code when the attributes are provided. - byValueMarshalKindSupport = ByValueMarshalKindSupportDescriptor.ArrayParameter; - } else { - // If the type is always blittable, we'll generate the same code regardless of the attributes, - // but we'll allow them to make it easier to transition to source-generated code and allow users to be clear about expectations - // for values in pre-allocated buffers. - byValueMarshalKindSupport = ByValueMarshalKindSupportDescriptor.PinnedParameter; + // If we have an array, we will use the Array [In, Out] support descriptor + byValueMarshalKindSupport = ByValueMarshalKindSupportDescriptor.ArrayParameter; } // Elements in the collection must be blittable to use the pinnable marshaller. diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/BlittableMarshaller.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/BlittableMarshaller.cs index ef2542dd87bc8c..76577d497cb823 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/BlittableMarshaller.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/BlittableMarshaller.cs @@ -11,8 +11,6 @@ namespace Microsoft.Interop { public sealed class BlittableMarshaller : IMarshallingGenerator { - public bool IsSupported(TargetFramework target, Version version) => true; - public ManagedTypeInfo AsNativeType(TypePositionInfo info) { return info.ManagedType; diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/BoolMarshaller.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/BoolMarshaller.cs index a86df409e84a70..dbb1b3ee08c919 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/BoolMarshaller.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/BoolMarshaller.cs @@ -26,8 +26,6 @@ protected BoolMarshallerBase(ManagedTypeInfo nativeType, int trueValue, int fals _compareToTrue = compareToTrue; } - public bool IsSupported(TargetFramework target, Version version) => true; - public ManagedTypeInfo AsNativeType(TypePositionInfo info) { Debug.Assert(info.ManagedType is SpecialTypeInfo(_, _, SpecialType.System_Boolean)); diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/ByValueContentsMarshalKindValidator.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/ByValueContentsMarshalKindValidator.cs index 5cc2a8f9a9b261..dd7a40fb8c90e2 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/ByValueContentsMarshalKindValidator.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/ByValueContentsMarshalKindValidator.cs @@ -27,7 +27,7 @@ public ResolvedGenerator Create(TypePositionInfo info, StubCodeContext context) private static ResolvedGenerator ValidateByValueMarshalKind(TypePositionInfo info, StubCodeContext context, ResolvedGenerator generator) { - if (generator.Generator is Forwarder || info.ByValueContentsMarshalKind == ByValueContentsMarshalKind.Default) + if (generator.Generator is Forwarder) { // Forwarder allows everything since it just forwards to a P/Invoke. // The Default marshal kind is always valid. @@ -41,6 +41,7 @@ private static ResolvedGenerator ValidateByValueMarshalKind(TypePositionInfo inf ByValueMarshalKindSupport.Supported => generator, ByValueMarshalKindSupport.NotSupported => ResolvedGenerator.ResolvedWithDiagnostics(s_forwarder, generator.Diagnostics.Add(diagnostic!)), ByValueMarshalKindSupport.Unnecessary => generator with { Diagnostics = generator.Diagnostics.Add(diagnostic!) }, + ByValueMarshalKindSupport.NotRecommended => generator with { Diagnostics = generator.Diagnostics.Add(diagnostic!) }, _ => throw new UnreachableException() }; } diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/ByValueMarshalKindSupportDescriptor.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/ByValueMarshalKindSupportDescriptor.cs index 1f859d34ff919b..7754e177d66063 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/ByValueMarshalKindSupportDescriptor.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/ByValueMarshalKindSupportDescriptor.cs @@ -3,127 +3,105 @@ using System; using System.Collections.Immutable; +using System.Diagnostics; namespace Microsoft.Interop { + public record struct ByValueMarshalKindSupportInfo(ByValueMarshalKindSupport Support, string? details) + { + public ByValueMarshalKindSupport GetSupport(TypePositionInfo info, StubCodeContext context, out GeneratorDiagnostic? diagnostic) + { + diagnostic = Support switch + { + ByValueMarshalKindSupport.Supported => null, + ByValueMarshalKindSupport.NotRecommended => + new GeneratorDiagnostic.NotRecommended(info, context) + { + Details = details + }, + ByValueMarshalKindSupport.Unnecessary => + new GeneratorDiagnostic.UnnecessaryData( + info, + context, + ImmutableArray.Create(info.ByValueMarshalAttributeLocations.OutLocation)) + { + UnnecessaryDataName = SR.InOutAttributes, + UnnecessaryDataDetails = details + }, + ByValueMarshalKindSupport.NotSupported => + new GeneratorDiagnostic.NotSupported(info, context) + { + NotSupportedDetails = details + }, + _ => throw new UnreachableException() + }; + return Support; + } + } + /// /// Provides an implementation of through /// public record ByValueMarshalKindSupportDescriptor( - ByValueMarshalKindSupport InSupport, string? InSupportDetails, - ByValueMarshalKindSupport OutSupport, string? OutSupportDetails, - ByValueMarshalKindSupport InOutSupport, string? InOutSupportDetails) + ByValueMarshalKindSupportInfo DefaultSupport, + ByValueMarshalKindSupportInfo InSupport, + ByValueMarshalKindSupportInfo OutSupport, + ByValueMarshalKindSupportInfo InOutSupport) { /// /// A default for by value parameters. [In] is allowed, but unnecessary. Out is not allowed. /// public static readonly ByValueMarshalKindSupportDescriptor Default = new ByValueMarshalKindSupportDescriptor( - InSupport: ByValueMarshalKindSupport.Unnecessary, InSupportDetails: SR.InAttributeOnlyIsDefault, - OutSupport: ByValueMarshalKindSupport.NotSupported, OutSupportDetails: SR.OutAttributeNotSupportedOnByValueParameters, - InOutSupport: ByValueMarshalKindSupport.NotSupported, InOutSupportDetails: SR.OutAttributeNotSupportedOnByValueParameters); + DefaultSupport: new(ByValueMarshalKindSupport.Supported, null), + InSupport: new(ByValueMarshalKindSupport.NotSupported, SR.InAttributeNotSupportedOnByValueParameters), + OutSupport: new(ByValueMarshalKindSupport.NotSupported, SR.OutAttributeNotSupportedOnByValueParameters), + InOutSupport: new(ByValueMarshalKindSupport.NotSupported, SR.InOutAttributeNotSupportedOnByValueParameters)); /// - /// A default for by value array parameters. [In] is allowed, but unnecessary. Out is allowed. + /// A default for by value array parameters. Default is allowed, but Not Recommended. [In], [Out], and [In, Out] are allowed /// public static readonly ByValueMarshalKindSupportDescriptor ArrayParameter = new ByValueMarshalKindSupportDescriptor( - InSupport: ByValueMarshalKindSupport.Unnecessary, InSupportDetails: SR.InAttributeOnlyIsDefault, - OutSupport: ByValueMarshalKindSupport.Supported, OutSupportDetails: null, - InOutSupport: ByValueMarshalKindSupport.Supported, InOutSupportDetails: null); - - /// - /// A default for pinned parameters. [In] is allowed, but unnecessary. Out is allowed. - /// - public static readonly ByValueMarshalKindSupportDescriptor PinnedParameter = new ByValueMarshalKindSupportDescriptor( - InSupport: ByValueMarshalKindSupport.Unnecessary, InSupportDetails: SR.InAttributeOnlyIsDefault, - OutSupport: ByValueMarshalKindSupport.Supported, OutSupportDetails: null, - InOutSupport: ByValueMarshalKindSupport.Supported, InOutSupportDetails: null); + DefaultSupport: new(ByValueMarshalKindSupport.NotRecommended, SR.PreferExplicitInOutAttributesOnArrays), + InSupport: new(ByValueMarshalKindSupport.Supported, null), + OutSupport: new(ByValueMarshalKindSupport.Supported, null), + InOutSupport: new(ByValueMarshalKindSupport.Supported, null)); /// /// Returns the support for the ByValueContentsMarshalKind, and if it is not , diagnostic is not null /// public ByValueMarshalKindSupport GetSupport(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, StubCodeContext context, out GeneratorDiagnostic? diagnostic) { - if (info.IsByRef && marshalKind != ByValueContentsMarshalKind.Default) + if (info.IsByRef) { - diagnostic = new GeneratorDiagnostic.NotSupported(info, context) + // ByRef with ByValue attributes is not allowed + if (marshalKind != ByValueContentsMarshalKind.Default) { - NotSupportedDetails = SR.InOutAttributeByRefNotSupported - }; - return ByValueMarshalKindSupport.NotSupported; - } - switch (marshalKind) - { - case ByValueContentsMarshalKind.Default: - diagnostic = null; - return ByValueMarshalKindSupport.Supported; - case ByValueContentsMarshalKind.Out: - diagnostic = OutSupport switch + diagnostic = new GeneratorDiagnostic.NotSupported(info, context) { - ByValueMarshalKindSupport.Supported => null, - ByValueMarshalKindSupport.Unnecessary - => new GeneratorDiagnostic.UnnecessaryData( - info, - context, - ImmutableArray.Create(info.ByValueMarshalAttributeLocations.OutLocation)) - { - UnnecessaryDataName = SR.InOutAttributes, - UnnecessaryDataDetails = OutSupportDetails - }, - ByValueMarshalKindSupport.NotSupported - => new GeneratorDiagnostic.NotSupported( - info, - context) - { NotSupportedDetails = OutSupportDetails }, - _ => throw new UnreachableException($"Unexpected {nameof(ByValueMarshalKindSupport)} Variant: {InOutSupport}") + NotSupportedDetails = SR.InOutAttributeByRefNotSupported }; - return OutSupport; - case ByValueContentsMarshalKind.In: - diagnostic = InSupport switch - { - ByValueMarshalKindSupport.Supported => null, - ByValueMarshalKindSupport.Unnecessary - => new GeneratorDiagnostic.UnnecessaryData( - info, - context, - ImmutableArray.Create(info.ByValueMarshalAttributeLocations.InLocation)) - { - UnnecessaryDataName = SR.InOutAttributes, - UnnecessaryDataDetails = InSupportDetails - }, - ByValueMarshalKindSupport.NotSupported - => new GeneratorDiagnostic.NotSupported( - info, - context) - { NotSupportedDetails = InSupportDetails }, - _ => throw new UnreachableException($"Unexpected {nameof(ByValueMarshalKindSupport)} Variant: {InOutSupport}") - }; - return InSupport; - case ByValueContentsMarshalKind.InOut: - diagnostic = InOutSupport switch - { - ByValueMarshalKindSupport.Supported => null, - ByValueMarshalKindSupport.Unnecessary - => new GeneratorDiagnostic.UnnecessaryData( - info, - context, - ImmutableArray.Create( - info.ByValueMarshalAttributeLocations.InLocation, - info.ByValueMarshalAttributeLocations.OutLocation)) - { - UnnecessaryDataName = SR.InOutAttributes, - UnnecessaryDataDetails = InOutSupportDetails - }, - ByValueMarshalKindSupport.NotSupported - => new GeneratorDiagnostic.NotSupported( - info, - context) - { NotSupportedDetails = InOutSupportDetails }, - _ => throw new UnreachableException($"Unexpected {nameof(ByValueMarshalKindSupport)} Variant: {InOutSupport}") - }; - return InOutSupport; - default: - throw new UnreachableException($"Unexpected {nameof(ByValueContentsMarshalKind)} variant: {marshalKind}"); + return ByValueMarshalKindSupport.NotSupported; + } + // ByRef with no ByValue attributes is supported + diagnostic = null; + return ByValueMarshalKindSupport.Supported; + } + // Return can never have In or Out attributes, so can assume valid ByValue attributes + if (info.ManagedIndex < 0) + { + Debug.Assert(marshalKind is ByValueContentsMarshalKind.Default); + diagnostic = null; + return ByValueMarshalKindSupport.Supported; } + + return marshalKind switch + { + ByValueContentsMarshalKind.Default => DefaultSupport.GetSupport(info, context, out diagnostic), + ByValueContentsMarshalKind.In => InSupport.GetSupport(info, context, out diagnostic), + ByValueContentsMarshalKind.Out => OutSupport.GetSupport(info, context, out diagnostic), + ByValueContentsMarshalKind.InOut => InOutSupport.GetSupport(info, context, out diagnostic), + _ => throw new UnreachableException() + }; } } } diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/CharMarshaller.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/CharMarshaller.cs index 3357dc86fa333f..e02bf7826a85dc 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/CharMarshaller.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/CharMarshaller.cs @@ -15,12 +15,6 @@ public sealed class Utf16CharMarshaller : IMarshallingGenerator { private static readonly ManagedTypeInfo s_nativeType = new SpecialTypeInfo("ushort", "ushort", SpecialType.System_UInt16); - public Utf16CharMarshaller() - { - } - - public bool IsSupported(TargetFramework target, Version version) => true; - public ValueBoundaryBehavior GetValueBoundaryBehavior(TypePositionInfo info, StubCodeContext context) { if (IsPinningPathSupported(info, context)) diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/CustomTypeMarshallingGenerator.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/CustomTypeMarshallingGenerator.cs index 30f333d59540ed..9c65fdc5e7c50d 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/CustomTypeMarshallingGenerator.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/CustomTypeMarshallingGenerator.cs @@ -23,11 +23,6 @@ public CustomTypeMarshallingGenerator(ICustomTypeMarshallingStrategy nativeTypeM _isPinned = isPinned; } - public bool IsSupported(TargetFramework target, Version version) - { - return target is TargetFramework.Net && version.Major >= 6; - } - public ValueBoundaryBehavior GetValueBoundaryBehavior(TypePositionInfo info, StubCodeContext context) { return info.IsByRef ? ValueBoundaryBehavior.AddressOfNativeIdentifier : ValueBoundaryBehavior.NativeIdentifier; diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/DelegateMarshaller.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/DelegateMarshaller.cs index 4dddd38948c6dc..5f52ad6e4e7305 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/DelegateMarshaller.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/DelegateMarshaller.cs @@ -12,8 +12,6 @@ namespace Microsoft.Interop { public sealed class DelegateMarshaller : IMarshallingGenerator { - public bool IsSupported(TargetFramework target, Version version) => true; - public ManagedTypeInfo AsNativeType(TypePositionInfo info) { return SpecialTypeInfo.IntPtr; diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/Forwarder.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/Forwarder.cs index 79c2fd999f00a5..9679a2e7449c9b 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/Forwarder.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/Forwarder.cs @@ -9,8 +9,6 @@ namespace Microsoft.Interop { public sealed class Forwarder : IMarshallingGenerator { - public bool IsSupported(TargetFramework target, Version version) => true; - public ManagedTypeInfo AsNativeType(TypePositionInfo info) { return info.ManagedType; diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/GeneratorDiagnostic.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/GeneratorDiagnostic.cs index 22444e79824c9b..02820335ec176e 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/GeneratorDiagnostic.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/GeneratorDiagnostic.cs @@ -62,5 +62,18 @@ public override DiagnosticInfo ToDiagnosticInfo(DiagnosticDescriptor descriptor, UnnecessaryDataDetails ?? ""); } } + + public sealed record NotRecommended(TypePositionInfo TypePositionInfo, StubCodeContext StubCodeContext) : GeneratorDiagnostic(TypePositionInfo, StubCodeContext, isFatal: false) + { + public string? Details { get; init; } + + public override DiagnosticInfo ToDiagnosticInfo(DiagnosticDescriptor descriptor, Location location, string elementName) + { + return DiagnosticInfo.Create( + descriptor, + location, + Details); + } + } } } diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/MarshalAsMarshallingGeneratorFactory.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/MarshalAsMarshallingGeneratorFactory.cs index 1aa0d96779f9c6..a79f14c02ed122 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/MarshalAsMarshallingGeneratorFactory.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/MarshalAsMarshallingGeneratorFactory.cs @@ -18,7 +18,6 @@ public sealed class MarshalAsMarshallingGeneratorFactory : IMarshallingGenerator private static readonly Forwarder s_forwarder = new(); private static readonly BlittableMarshaller s_blittable = new(); private static readonly DelegateMarshaller s_delegate = new(); - private static readonly SafeHandleMarshaller s_safeHandle = new(); private InteropGenerationOptions Options { get; } private IMarshallingGeneratorFactory InnerFactory { get; } @@ -90,21 +89,6 @@ public ResolvedGenerator Create( case { ManagedType: DelegateTypeInfo, MarshallingAttributeInfo: NoMarshallingInfo or MarshalAsInfo(UnmanagedType.FunctionPtr, _) }: return ResolvedGenerator.Resolved(s_delegate); - // SafeHandle types with source-generator-emitted marshalling - case { MarshallingAttributeInfo: SafeHandleMarshallingInfo(_, bool isAbstract) }: - if (!context.AdditionalTemporaryStateLivesAcrossStages || context.Direction != MarshalDirection.ManagedToUnmanaged) - { - return ResolvedGenerator.NotSupported(new(info, context)); - } - if (info.IsByRef && isAbstract) - { - return ResolvedGenerator.NotSupported(new(info, context) - { - NotSupportedDetails = SR.SafeHandleByRefMustBeConcrete - }); - } - return ResolvedGenerator.Resolved(s_safeHandle); - // void case { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Void } }: return ResolvedGenerator.Resolved(s_forwarder); diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/MarshallingGenerator.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/MarshallingGenerator.cs index f5e8aacdaa3c15..d320624651f004 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/MarshallingGenerator.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/MarshallingGenerator.cs @@ -83,6 +83,10 @@ public enum ByValueMarshalKindSupport /// The provided is supported but does not change behavior from the default in this scenario. /// Unnecessary, + /// + /// The provided is supported but does not follow best practices. + /// + NotRecommended, } /// @@ -90,14 +94,6 @@ public enum ByValueMarshalKindSupport /// public interface IMarshallingGenerator { - /// - /// Determine if the generator is supported for the supplied version of the framework. - /// - /// The framework to target. - /// The version of the framework. - /// True if the marshaller is supported, otherwise false. - bool IsSupported(TargetFramework target, Version version); - /// /// Get the native type syntax for /// diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/SafeHandleMarshaller.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/SafeHandleMarshaller.cs deleted file mode 100644 index 3f813787e61e5d..00000000000000 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/SafeHandleMarshaller.cs +++ /dev/null @@ -1,192 +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.Runtime.InteropServices; -using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp; -using Microsoft.CodeAnalysis.CSharp.Syntax; -using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; -using static Microsoft.Interop.SyntaxFactoryExtensions; - -namespace Microsoft.Interop -{ - public sealed class SafeHandleMarshaller : IMarshallingGenerator - { - public bool IsSupported(TargetFramework target, Version version) - { - return target is TargetFramework.Net && version.Major >= 6; - } - - public ManagedTypeInfo AsNativeType(TypePositionInfo info) - { - return SpecialTypeInfo.IntPtr; - } - - public SignatureBehavior GetNativeSignatureBehavior(TypePositionInfo info) - { - return info.IsByRef ? SignatureBehavior.PointerToNativeType : SignatureBehavior.NativeType; - } - - public ValueBoundaryBehavior GetValueBoundaryBehavior(TypePositionInfo info, StubCodeContext context) - { - return info.IsByRef ? ValueBoundaryBehavior.AddressOfNativeIdentifier : ValueBoundaryBehavior.NativeIdentifier; - } - - public IEnumerable Generate(TypePositionInfo info, StubCodeContext context) - { - // The high level logic (note that the parameter may be in, out or both): - // 1) If this is an input parameter we need to AddRef the SafeHandle. - // 2) If this is an output parameter we need to preallocate a SafeHandle to wrap the new native handle value. We - // must allocate this before the native call to avoid a failure point when we already have a native resource - // allocated. We must allocate a new SafeHandle even if we have one on input since both input and output native - // handles need to be tracked and released by a SafeHandle. - // 3) Initialize a local IntPtr that will be passed to the native call. If we have an input SafeHandle the value - // comes from there otherwise we get it from the new SafeHandle (which is guaranteed to be initialized to an - // invalid handle value). - // 4) If this is a out parameter we also store the original handle value (that we just computed above) in a local - // variable. - // 5) If we successfully AddRef'd the incoming SafeHandle, we need to Release it before we return. - // 6) After the native call, if this is an output parameter and the handle value we passed to native differs from - // the local copy we made then the new handle value is written into the output SafeHandle and that SafeHandle - // is propagated back to the caller. - - (string managedIdentifier, string nativeIdentifier) = context.GetIdentifiers(info); - string addRefdIdentifier = $"{managedIdentifier}__addRefd"; - string newHandleObjectIdentifier = info.IsManagedReturnPosition - ? managedIdentifier - : $"{managedIdentifier}__newHandle"; - string handleValueBackupIdentifier = $"{nativeIdentifier}__original"; - switch (context.CurrentStage) - { - case StubCodeContext.Stage.Setup: - if (!info.IsManagedReturnPosition && info.RefKind != RefKind.Out) - { - yield return LocalDeclarationStatement( - VariableDeclaration( - PredefinedType(Token(SyntaxKind.BoolKeyword)), - SingletonSeparatedList( - VariableDeclarator(addRefdIdentifier) - .WithInitializer(EqualsValueClause(LiteralExpression(SyntaxKind.FalseLiteralExpression)))))); - } - - ExpressionSyntax safeHandleCreationExpression = ((SafeHandleMarshallingInfo)info.MarshallingAttributeInfo).AccessibleDefaultConstructor - ? ObjectCreationExpression(info.ManagedType.Syntax, ArgumentList(), initializer: null) - : CastExpression( - info.ManagedType.Syntax, - MethodInvocation( - TypeSyntaxes.System_Activator, - IdentifierName("CreateInstance"), - Argument(TypeOfExpression(info.ManagedType.Syntax)), - Argument(LiteralExpression(SyntaxKind.TrueLiteralExpression)) - .WithNameColon(NameColon(IdentifierName("nonPublic"))))); - - if (info.IsManagedReturnPosition) - { - yield return AssignmentStatement(IdentifierName(managedIdentifier), safeHandleCreationExpression); - } - else if (info.IsByRef && info.RefKind != RefKind.In) - { - // We create the new handle in the Setup phase - // so we eliminate the possible failure points during unmarshalling, where we would - // leak the handle if we failed to create the handle. - yield return Declare(info.ManagedType.Syntax, newHandleObjectIdentifier, safeHandleCreationExpression); - - if (info.RefKind != RefKind.Out) - { - // IntPtr = newHandleObjectIdentifier.DangerousGetHandle(); - yield return Declare( - AsNativeType(info).Syntax, - handleValueBackupIdentifier, - MethodInvocation( - IdentifierName(newHandleObjectIdentifier), - IdentifierName(nameof(SafeHandle.DangerousGetHandle)))); - } - } - break; - case StubCodeContext.Stage.Marshal: - if (!info.IsManagedReturnPosition && info.RefKind != RefKind.Out) - { - // .DangerousAddRef(ref ); - yield return MethodInvocationStatement( - IdentifierName(managedIdentifier), - IdentifierName(nameof(SafeHandle.DangerousAddRef)), - RefArgument(IdentifierName(addRefdIdentifier))); - - - // = .DangerousGetHandle() - ExpressionSyntax assignHandleToNativeExpression = - AssignmentExpression(SyntaxKind.SimpleAssignmentExpression, - IdentifierName(nativeIdentifier), - MethodInvocation( - IdentifierName(managedIdentifier), - IdentifierName(nameof(SafeHandle.DangerousGetHandle)))); - if (info.IsByRef && info.RefKind != RefKind.In) - { - yield return AssignmentStatement(IdentifierName(handleValueBackupIdentifier), assignHandleToNativeExpression); - } - else - { - yield return ExpressionStatement(assignHandleToNativeExpression); - } - } - break; - case StubCodeContext.Stage.GuaranteedUnmarshal: - StatementSyntax unmarshalStatement = MethodInvocationStatement( - TypeSyntaxes.System_Runtime_InteropServices_Marshal, - IdentifierName("InitHandle"), - Argument(IdentifierName(newHandleObjectIdentifier)), - Argument(IdentifierName(nativeIdentifier))); - - if (info.IsManagedReturnPosition) - { - yield return unmarshalStatement; - } - else if (info.RefKind == RefKind.Out) - { - yield return unmarshalStatement; - yield return AssignmentStatement(IdentifierName(managedIdentifier), IdentifierName(newHandleObjectIdentifier)); - } - else if (info.RefKind == RefKind.Ref) - { - // Decrement refcount on original SafeHandle if we addrefd - yield return IfStatement( - IdentifierName(addRefdIdentifier), - MethodInvocationStatement( - IdentifierName(managedIdentifier), - IdentifierName(nameof(SafeHandle.DangerousRelease)))); - - // Do not unmarshal the handle if the value didn't change. - yield return IfStatement( - BinaryExpression(SyntaxKind.NotEqualsExpression, - IdentifierName(handleValueBackupIdentifier), - IdentifierName(nativeIdentifier)), - Block( - unmarshalStatement, - AssignmentStatement( - IdentifierName(managedIdentifier), - IdentifierName(newHandleObjectIdentifier)))); - } - break; - case StubCodeContext.Stage.CleanupCallerAllocated: - if (!info.IsManagedReturnPosition && (!info.IsByRef || info.RefKind == RefKind.In)) - { - yield return IfStatement( - IdentifierName(addRefdIdentifier), - MethodInvocationStatement( - IdentifierName(managedIdentifier), - IdentifierName(nameof(SafeHandle.DangerousRelease)))); - } - break; - default: - break; - } - } - - public bool UsesNativeIdentifier(TypePositionInfo info, StubCodeContext context) => true; - - public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, StubCodeContext context, out GeneratorDiagnostic? diagnostic) - => ByValueMarshalKindSupportDescriptor.Default.GetSupport(marshalKind, info, context, out diagnostic); - } -} diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/StaticPinnableManagedValueMarshaller.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/StaticPinnableManagedValueMarshaller.cs index 45ef61f85dbc58..07bb36a2edaba5 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/StaticPinnableManagedValueMarshaller.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/StaticPinnableManagedValueMarshaller.cs @@ -21,9 +21,6 @@ public StaticPinnableManagedValueMarshaller(IMarshallingGenerator innerMarshalli _getPinnableReferenceType = getPinnableReferenceType; } - public bool IsSupported(TargetFramework target, Version version) - => _innerMarshallingGenerator.IsSupported(target, version); - public ValueBoundaryBehavior GetValueBoundaryBehavior(TypePositionInfo info, StubCodeContext context) { if (IsPinningPathSupported(info, context)) @@ -105,7 +102,7 @@ private IEnumerable GeneratePinningPath(TypePositionInfo info, public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, StubCodeContext context, out GeneratorDiagnostic? diagnostic) { - return ByValueMarshalKindSupportDescriptor.PinnedParameter.GetSupport(marshalKind, info, context, out diagnostic); + return _innerMarshallingGenerator.SupportsByValueMarshalKind(marshalKind, info, context, out diagnostic); } } } diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/UnmanagedToManagedOwnershipTrackingStrategy.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/UnmanagedToManagedOwnershipTrackingStrategy.cs index ba43659536d529..3b41fa0efbfa60 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/UnmanagedToManagedOwnershipTrackingStrategy.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/UnmanagedToManagedOwnershipTrackingStrategy.cs @@ -178,7 +178,6 @@ IEnumerable GenerateStatementsFromInner(StubCodeContext context public SignatureBehavior GetNativeSignatureBehavior(TypePositionInfo info) => _inner.GetNativeSignatureBehavior(info); public ValueBoundaryBehavior GetValueBoundaryBehavior(TypePositionInfo info, StubCodeContext context) => _inner.GetValueBoundaryBehavior(info, context); - public bool IsSupported(TargetFramework target, Version version) => _inner.IsSupported(target, version); public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, StubCodeContext context, out GeneratorDiagnostic? diagnostic) => _inner.SupportsByValueMarshalKind(marshalKind, info, context, out diagnostic); public bool UsesNativeIdentifier(TypePositionInfo info, StubCodeContext context) => _inner.UsesNativeIdentifier(info, context); diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Microsoft.Interop.SourceGeneration.csproj b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Microsoft.Interop.SourceGeneration.csproj index 63f1d984c332f6..05f7e553e41a05 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Microsoft.Interop.SourceGeneration.csproj +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Microsoft.Interop.SourceGeneration.csproj @@ -26,7 +26,6 @@ - diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/SafeHandleMarshallingInfoProvider.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/SafeHandleMarshallingInfoProvider.cs index a5c2f2a1f93f98..dd30b31b14ff08 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/SafeHandleMarshallingInfoProvider.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/SafeHandleMarshallingInfoProvider.cs @@ -10,11 +10,6 @@ namespace Microsoft.Interop { - /// - /// The type of the element is a SafeHandle-derived type with no marshalling attributes. - /// - public sealed record SafeHandleMarshallingInfo(bool AccessibleDefaultConstructor, bool IsAbstract) : MarshallingInfo; - /// /// This class supports generating marshalling info for SafeHandle-derived types. /// @@ -52,7 +47,6 @@ public bool CanProvideMarshallingInfoForType(ITypeSymbol type) public MarshallingInfo GetMarshallingInfo(ITypeSymbol type, int indirectionDepth, UseSiteAttributeProvider useSiteAttributes, GetMarshallingInfoCallback marshallingInfoCallback) { bool hasDefaultConstructor = false; - bool hasAccessibleDefaultConstructor = false; if (type is INamedTypeSymbol named && !named.IsAbstract && named.InstanceConstructors.Length > 0) { foreach (IMethodSymbol ctor in named.InstanceConstructors) @@ -60,18 +54,16 @@ public MarshallingInfo GetMarshallingInfo(ITypeSymbol type, int indirectionDepth if (ctor.Parameters.Length == 0) { hasDefaultConstructor = ctor.DeclaredAccessibility == Accessibility.Public; - hasAccessibleDefaultConstructor = _compilation.IsSymbolAccessibleWithin(ctor, _containingScope); break; } } } - // If we don't have the SafeHandleMarshaller type, then we'll use the built-in support in the generator. - // This support will be removed when dotnet/runtime doesn't build any packages for platforms below .NET 8 - // as the downlevel support is dotnet/runtime specific. + // If we don't have the SafeHandleMarshaller type, then we'll return a MissingSupportMarshallingInfo + // indicating that we don't support marshalling SafeHandles with source-generated marshalling. if (_safeHandleMarshallerType is null) { - return new SafeHandleMarshallingInfo(hasAccessibleDefaultConstructor, type.IsAbstract); + return new MissingSupportMarshallingInfo(); } INamedTypeSymbol entryPointType = _safeHandleMarshallerType.Construct(type); diff --git a/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs b/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs index 8fe3d526ab6e96..59dfcf2713620d 100644 --- a/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs +++ b/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs @@ -1104,7 +1104,7 @@ public static void PtrToStructure(System.IntPtr ptr, object structure) { } public static object? PtrToStructure(System.IntPtr ptr, [System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors| System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)] System.Type structureType) { throw null; } public static T? PtrToStructure<[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]T>(System.IntPtr ptr) { throw null; } public static void PtrToStructure(System.IntPtr ptr, [System.Diagnostics.CodeAnalysis.DisallowNullAttribute] T structure) { } - public static int QueryInterface(System.IntPtr pUnk, in System.Guid iid, out System.IntPtr ppv) { throw null; } + public static int QueryInterface(System.IntPtr pUnk, ref readonly System.Guid iid, out System.IntPtr ppv) { throw null; } public static byte ReadByte(System.IntPtr ptr) { throw null; } public static byte ReadByte(System.IntPtr ptr, int ofs) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Marshalling code for the object might not be available")] diff --git a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/Marshalling/IIUnknownStrategy.cs b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/Marshalling/IIUnknownStrategy.cs index 771b88b04e7f4d..aa9742526f3631 100644 --- a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/Marshalling/IIUnknownStrategy.cs +++ b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/Marshalling/IIUnknownStrategy.cs @@ -32,7 +32,7 @@ public unsafe interface IIUnknownStrategy /// The IID (Interface ID) to query for. /// The resulting interface. /// Returns an HRESULT represents the success of the operation. - /// + /// public int QueryInterface(void* instancePtr, in Guid iid, out void* ppObj); /// diff --git a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/Marshalling/StrategyBasedComWrappers.cs b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/Marshalling/StrategyBasedComWrappers.cs index 14ced03d3a7fd0..9741b482633c24 100644 --- a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/Marshalling/StrategyBasedComWrappers.cs +++ b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/Marshalling/StrategyBasedComWrappers.cs @@ -76,7 +76,7 @@ static IIUnknownInterfaceDetailsStrategy GetInteropStrategy() /// protected sealed override unsafe ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) { - if (obj.GetType().GetCustomAttribute(typeof(ComExposedClassAttribute<>)) is IComExposedDetails details) + if (GetOrCreateInterfaceDetailsStrategy().GetComExposedTypeDetails(obj.GetType().TypeHandle) is { } details) { return details.GetComInterfaceEntries(out count); } diff --git a/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/ByValueContentsMarshalling.cs b/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/ByValueContentsMarshalling.cs new file mode 100644 index 00000000000000..fdd2d33d6e7d27 --- /dev/null +++ b/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/ByValueContentsMarshalling.cs @@ -0,0 +1,301 @@ +// 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.Threading.Tasks; +using Microsoft.CodeAnalysis.Testing; +using Microsoft.Interop; +using Xunit; +using static Microsoft.Interop.UnitTests.TestUtils; +using StringMarshalling = System.Runtime.InteropServices.StringMarshalling; +using VerifyComInterfaceGenerator = Microsoft.Interop.UnitTests.Verifiers.CSharpSourceGeneratorVerifier; + +namespace ComInterfaceGenerator.Unit.Tests +{ + public class ByValueContentsMarshalling + { + private static IComInterfaceAttributeProvider GetAttributeProvider(GeneratorKind generator) + => generator switch + { + GeneratorKind.VTableIndexStubGenerator => new VirtualMethodIndexAttributeProvider(), + GeneratorKind.ComInterfaceGeneratorManagedObjectWrapper => new GeneratedComInterfaceAttributeProvider(System.Runtime.InteropServices.Marshalling.ComInterfaceOptions.ManagedObjectWrapper), + GeneratorKind.ComInterfaceGeneratorComObjectWrapper => new GeneratedComInterfaceAttributeProvider(System.Runtime.InteropServices.Marshalling.ComInterfaceOptions.ComObjectWrapper), + GeneratorKind.ComInterfaceGenerator => new GeneratedComInterfaceAttributeProvider(), + _ => throw new UnreachableException(), + }; + + public static IEnumerable ByValueMarshalAttributeOnValueTypes() + { + var codeSnippets = new CodeSnippets(GetAttributeProvider(GeneratorKind.ComInterfaceGenerator)); + const string In = "[{|#1:InAttribute|}]"; + const string Out = "[{|#2:OutAttribute|}]"; + const string paramName = "p"; + const string MarshalAsU4 = "[MarshalAs(UnmanagedType.U4)]"; + const string MarshalAsU2 = "[MarshalAs(UnmanagedType.U2)]"; + + string p = $$"""{|#0:{{paramName}}|}"""; + var diagnostic = new DiagnosticResult(GeneratorDiagnostics.ParameterTypeNotSupportedWithDetails); + var outAttributeNotSupported = diagnostic + .WithLocation(0) + .WithArguments(SR.OutAttributeNotSupportedOnByValueParameters, paramName); + var inAttributeIsNotSupported = diagnostic + .WithLocation(0) + .WithArguments(SR.InAttributeNotSupportedOnByValueParameters, paramName); + var inOutAttributeNotSupported = diagnostic + .WithLocation(0) + .WithArguments(SR.InOutAttributeNotSupportedOnByValueParameters, paramName); + + DiagnosticResult[] InIsNotSupported = [inAttributeIsNotSupported]; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(In, "int", p), InIsNotSupported }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(In, "byte", p), InIsNotSupported }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(In + MarshalAsU4, "bool", p), InIsNotSupported }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(In + MarshalAsU2, "char", p), InIsNotSupported }; + + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(In, "string", p, (StringMarshalling.Utf8, null)), InIsNotSupported }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(In, "IntClass", p) + CodeSnippets.IntClassAndMarshaller, InIsNotSupported }; + + DiagnosticResult[] OutIsNotSupported = [outAttributeNotSupported]; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Out, "int", p), OutIsNotSupported }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Out, "IntStruct", p) + CodeSnippets.IntStructAndMarshaller, OutIsNotSupported }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Out + MarshalAsU4, "bool", p), OutIsNotSupported }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Out + MarshalAsU2, "char", p), OutIsNotSupported }; + + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Out, "string", p, (StringMarshalling.Utf8, null)), OutIsNotSupported }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Out, "IntClass", p) + CodeSnippets.IntClassAndMarshaller, OutIsNotSupported }; + + DiagnosticResult[] InOutIsNotSupported = [inOutAttributeNotSupported]; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(In + Out, "int", p), InOutIsNotSupported }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(In + Out, "IntStruct", p) + CodeSnippets.IntStructAndMarshaller, InOutIsNotSupported }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(In + Out + MarshalAsU4, "bool", p), InOutIsNotSupported }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(In + Out + MarshalAsU2, "char", p), InOutIsNotSupported }; + + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(In + Out, "string", p, (StringMarshalling.Utf8, null)), InOutIsNotSupported }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(In + Out, "IntClass", p) + CodeSnippets.IntClassAndMarshaller, InOutIsNotSupported }; + + // Any ref keyword is okay for non-collection types + DiagnosticResult[] None = []; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType("out", "IntStruct", p) + CodeSnippets.IntStructAndMarshaller, None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType("out", "byte", p), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(MarshalAsU4 + "out", "bool", p), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(MarshalAsU2 + "out", "char", p), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType("out", "string", p, (StringMarshalling.Utf8, null)), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType("out", "IntClass", p) + CodeSnippets.IntClassAndMarshaller, None }; + + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType("in", "IntStruct", p) + CodeSnippets.IntStructAndMarshaller, None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType("in", "byte", p), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(MarshalAsU4 + "in", "bool", p), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(MarshalAsU2 + "in", "char", p), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType("in", "string", p, (StringMarshalling.Utf8, null)), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType("in", "IntClass", p) + CodeSnippets.IntClassAndMarshaller, None }; + + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType("ref", "IntStruct", p) + CodeSnippets.IntStructAndMarshaller, None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType("ref", "byte", p), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(MarshalAsU4 + "ref", "bool", p), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(MarshalAsU2 + "ref", "char", p), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType("ref", "string", p, (StringMarshalling.Utf8, null)), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType("ref", "IntClass", p) + CodeSnippets.IntClassAndMarshaller, None }; + } + + public static IEnumerable ByValueMarshalAttributeOnPinnedMarshalledTypes() + { + var codeSnippets = new CodeSnippets(GetAttributeProvider(GeneratorKind.ComInterfaceGenerator)); + const string In = "[{|#1:InAttribute|}]"; + const string Out = "[{|#2:OutAttribute|}]"; + const string paramName = "p"; + string p = $$"""{|#0:{{paramName}}|}"""; + const string Count = @"[MarshalUsing(ConstantElementCount = 10)]"; + const string MarshalAsBoolArray = "[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.U1, SizeConst = 10)]"; + const string MarshalUsingIntMarshaller = "[MarshalUsing(typeof(IntMarshaller), ElementIndirectionDepth = 1)]"; + const string MarshalUsingIntStructMarshaller = "[MarshalUsing(typeof(IntStructMarshaller), ElementIndirectionDepth = 1)]"; + const string MarshalUsingIntClassMarshaller = "[MarshalUsing(typeof(IntClassMarshaller), ElementIndirectionDepth = 1)]"; + + // Any explicit [In] or [Out] on an array is preferred and should not warn + DiagnosticResult[] None = []; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(In + Count, "int[]", p), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(In + Count, "char[]", p, (StringMarshalling.Utf16, null)), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(In + MarshalAsBoolArray, "bool[]", p, (StringMarshalling.Utf16, null)), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(In + MarshalUsingIntMarshaller + Count, "int[]", p) + CodeSnippets.IntMarshaller, None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(In + Count, "string[]", p, (StringMarshalling.Utf16, null)), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(In + Count, "string[]", p, (StringMarshalling.Utf8, null)), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(In + Count + MarshalUsingIntStructMarshaller, "IntStruct[]", p) + CodeSnippets.IntStructAndMarshaller, None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(In + Count + MarshalUsingIntClassMarshaller, "IntClass[]", p) + CodeSnippets.IntClassAndMarshaller, None }; + + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(In + Out + Count, "int[]", p), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(In + Out + Count, "char[]", p, (StringMarshalling.Utf16, null)), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(In + Out + MarshalAsBoolArray, "bool[]", p, (StringMarshalling.Utf16, null)), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(In + Out + MarshalUsingIntMarshaller + Count, "int[]", p) + CodeSnippets.IntMarshaller, None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(In + Out + Count, "string[]", p, (StringMarshalling.Utf16, null)), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(In + Out + Count, "string[]", p, (StringMarshalling.Utf8, null)), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(In + Out + Count + MarshalUsingIntStructMarshaller, "IntStruct[]", p) + CodeSnippets.IntStructAndMarshaller, None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(In + Out + Count + MarshalUsingIntClassMarshaller, "IntClass[]", p) + CodeSnippets.IntClassAndMarshaller, None }; + + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Out + Count, "int[]", p), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Out + Count, "char[]", p, (StringMarshalling.Utf16, null)), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Out + MarshalAsBoolArray, "bool[]", p, (StringMarshalling.Utf16, null)), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Out + MarshalUsingIntMarshaller + Count, "int[]", p) + CodeSnippets.IntMarshaller, None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Out + Count, "string[]", p, (StringMarshalling.Utf16, null)), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Out + Count, "string[]", p, (StringMarshalling.Utf8, null)), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Out + Count + MarshalUsingIntStructMarshaller, "IntStruct[]", p) + CodeSnippets.IntStructAndMarshaller, None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Out + Count + MarshalUsingIntClassMarshaller, "IntClass[]", p) + CodeSnippets.IntClassAndMarshaller, None }; + + // Array parameters without [In] or [Out] should provide an Info diagnostic + var preferExplicitAttributesDiagnostic = new DiagnosticResult(GeneratorDiagnostics.GeneratedComInterfaceUsageDoesNotFollowBestPractices) + .WithLocation(0) + .WithArguments(SR.PreferExplicitInOutAttributesOnArrays); + DiagnosticResult[] PreferInOutAttributes = [preferExplicitAttributesDiagnostic]; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Count, "int[]", p), PreferInOutAttributes }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Count, "char[]", p, (StringMarshalling.Utf16, null)), PreferInOutAttributes }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(MarshalAsBoolArray, "bool[]", p, (StringMarshalling.Utf16, null)), PreferInOutAttributes }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(MarshalUsingIntMarshaller + Count, "int[]", p) + CodeSnippets.IntMarshaller, PreferInOutAttributes }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Count, "string[]", p, (StringMarshalling.Utf16, null)), PreferInOutAttributes }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Count, "string[]", p, (StringMarshalling.Utf8, null)), PreferInOutAttributes }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Count + MarshalUsingIntStructMarshaller, "IntStruct[]", p) + CodeSnippets.IntStructAndMarshaller, PreferInOutAttributes }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Count + MarshalUsingIntClassMarshaller, "IntClass[]", p) + CodeSnippets.IntClassAndMarshaller, PreferInOutAttributes }; + + // Ref Kinds shouldn't warn + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Count, "in int[]", p), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Count, "in char[]", p, (StringMarshalling.Utf16, null)), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(MarshalAsBoolArray, "in bool[]", p, (StringMarshalling.Utf16, null)), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(MarshalUsingIntMarshaller + Count, "in int[]", p) + CodeSnippets.IntMarshaller, None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Count, "in string[]", p, (StringMarshalling.Utf16, null)), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Count, "in string[]", p, (StringMarshalling.Utf8, null)), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Count + MarshalUsingIntStructMarshaller, "in IntStruct[]", p) + CodeSnippets.IntStructAndMarshaller, None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Count + MarshalUsingIntClassMarshaller, "in IntClass[]", p) + CodeSnippets.IntClassAndMarshaller, None }; + + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Count, "out int[]", p), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Count, "out char[]", p, (StringMarshalling.Utf16, null)), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(MarshalAsBoolArray, "out bool[]", p, (StringMarshalling.Utf16, null)), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(MarshalUsingIntMarshaller + Count, "out int[]", p) + CodeSnippets.IntMarshaller, None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Count, "out string[]", p, (StringMarshalling.Utf16, null)), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Count, "out string[]", p, (StringMarshalling.Utf8, null)), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Count + MarshalUsingIntStructMarshaller, "out IntStruct[]", p) + CodeSnippets.IntStructAndMarshaller, None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Count + MarshalUsingIntClassMarshaller, "out IntClass[]", p) + CodeSnippets.IntClassAndMarshaller, None }; + + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Count, "ref int[]", p), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Count, "ref char[]", p, (StringMarshalling.Utf16, null)), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(MarshalAsBoolArray, "ref bool[]", p, (StringMarshalling.Utf16, null)), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(MarshalUsingIntMarshaller + Count, "ref int[]", p) + CodeSnippets.IntMarshaller, None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Count, "ref string[]", p, (StringMarshalling.Utf16, null)), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Count, "ref string[]", p, (StringMarshalling.Utf8, null)), None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Count + MarshalUsingIntStructMarshaller, "ref IntStruct[]", p) + CodeSnippets.IntStructAndMarshaller, None }; + yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(Count + MarshalUsingIntClassMarshaller, "ref IntClass[]", p) + CodeSnippets.IntClassAndMarshaller, None }; + } + + public static IEnumerable ByValueMarshalAttributeOnCustomCollections() + { + var codeSnippets = new CodeSnippets(GetAttributeProvider(GeneratorKind.ComInterfaceGenerator)); + const string In = "[{|#1:InAttribute|}]"; + const string Out = "[{|#2:OutAttribute|}]"; + const string paramName = "p"; + string p = $$"""{|#0:{{paramName}}|}"""; + const string CollectionMarshaller = "StatelessCollectionAllShapesMarshaller<,>"; + + var diagnostic = new DiagnosticResult(GeneratorDiagnostics.ParameterTypeNotSupportedWithDetails); + var outAttributeNotSupported = diagnostic + .WithLocation(0) + .WithArguments(SR.OutAttributeNotSupportedOnByValueParameters, paramName); + var inAttributeIsNotSupported = diagnostic + .WithLocation(0) + .WithArguments(SR.InAttributeNotSupportedOnByValueParameters, paramName); + var inOutAttributeNotSupported = diagnostic + .WithLocation(0) + .WithArguments(SR.InOutAttributeNotSupportedOnByValueParameters, paramName); + + DiagnosticResult[] InIsNotSupported = [inAttributeIsNotSupported]; + DiagnosticResult[] OutIsNotSupported = [outAttributeNotSupported]; + DiagnosticResult[] InOutIsNotSupported = [inOutAttributeNotSupported]; + DiagnosticResult[] None = []; + + yield return new object[] { ID(), Source("", "int"), None }; + yield return new object[] { ID(), Source("", "byte"), None }; + yield return new object[] { ID(), Source(MarshalUsing("IntClassMarshaller", 1), "IntClass") + CodeSnippets.IntClassAndMarshaller, None }; + yield return new object[] { ID(), Source(MarshalUsing("IntStructMarshaller", 1), "IntStruct") + CodeSnippets.IntStructAndMarshaller, None }; + yield return new object[] { ID(), Source("", "string", (StringMarshalling.Utf16, null)), None }; + yield return new object[] { ID(), Source("", "string", (StringMarshalling.Utf8, null)), None }; + yield return new object[] { ID(), Source(MarshalCollection(1), CodeSnippets.GetCustomCollectionType("int")), None }; + + // [In] and [Out] are not allowed on custom collections + yield return new object[] { ID(), Source(In, "int"), InIsNotSupported }; + yield return new object[] { ID(), Source(In, "byte"), InIsNotSupported }; + yield return new object[] { ID(), Source(In + MarshalUsing("IntClassMarshaller", 1), "IntClass") + CodeSnippets.IntClassAndMarshaller, InIsNotSupported }; + yield return new object[] { ID(), Source(In + MarshalUsing("IntStructMarshaller", 1), "IntStruct") + CodeSnippets.IntStructAndMarshaller, InIsNotSupported }; + yield return new object[] { ID(), Source(In, "string", (StringMarshalling.Utf16, null)), InIsNotSupported }; + yield return new object[] { ID(), Source(In, "string", (StringMarshalling.Utf8, null)), InIsNotSupported }; + yield return new object[] { ID(), Source(In + MarshalCollection(1), CodeSnippets.GetCustomCollectionType("int")), InIsNotSupported }; + + yield return new object[] { ID(), Source(Out, "int"), OutIsNotSupported }; + yield return new object[] { ID(), Source(Out, "byte"), OutIsNotSupported }; + yield return new object[] { ID(), Source(Out + MarshalUsing("IntClassMarshaller", 1), "IntClass") + CodeSnippets.IntClassAndMarshaller, OutIsNotSupported }; + yield return new object[] { ID(), Source(Out + MarshalUsing("IntStructMarshaller", 1), "IntStruct") + CodeSnippets.IntStructAndMarshaller, OutIsNotSupported }; + yield return new object[] { ID(), Source(Out, "string", (StringMarshalling.Utf16, null)), OutIsNotSupported }; + yield return new object[] { ID(), Source(Out, "string", (StringMarshalling.Utf8, null)), OutIsNotSupported }; + yield return new object[] { ID(), Source(Out + MarshalCollection(1), CodeSnippets.GetCustomCollectionType("int")), OutIsNotSupported }; + + yield return new object[] { ID(), Source(In + Out, "int"), InOutIsNotSupported }; + yield return new object[] { ID(), Source(In + Out, "byte"), InOutIsNotSupported }; + yield return new object[] { ID(), Source(In + Out + MarshalUsing("IntClassMarshaller", 1), "IntClass") + CodeSnippets.IntClassAndMarshaller, InOutIsNotSupported }; + yield return new object[] { ID(), Source(In + Out + MarshalUsing("IntStructMarshaller", 1), "IntStruct") + CodeSnippets.IntStructAndMarshaller, InOutIsNotSupported }; + yield return new object[] { ID(), Source(In + Out, "string", (StringMarshalling.Utf16, null)), InOutIsNotSupported }; + yield return new object[] { ID(), Source(In + Out, "string", (StringMarshalling.Utf8, null)), InOutIsNotSupported }; + yield return new object[] { ID(), Source(In + Out + MarshalCollection(1), CodeSnippets.GetCustomCollectionType("int")), InOutIsNotSupported }; + + // RefKind modifiers are okay + yield return new object[] { ID(), SourceWithRefKind("in", "", "int"), None }; + yield return new object[] { ID(), SourceWithRefKind("in", "", "byte"), None }; + yield return new object[] { ID(), SourceWithRefKind("in", MarshalUsing("IntClassMarshaller", 1), "IntClass") + CodeSnippets.IntClassAndMarshaller, None }; + yield return new object[] { ID(), SourceWithRefKind("in", MarshalUsing("IntStructMarshaller", 1), "IntStruct") + CodeSnippets.IntStructAndMarshaller, None }; + yield return new object[] { ID(), SourceWithRefKind("in", "", "string", (StringMarshalling.Utf16, null)), None }; + yield return new object[] { ID(), SourceWithRefKind("in", "", "string", (StringMarshalling.Utf8, null)), None }; + yield return new object[] { ID(), SourceWithRefKind("in", MarshalCollection(1), CodeSnippets.GetCustomCollectionType("int")), None }; + + yield return new object[] { ID(), SourceWithRefKind("out", "", "int"), None }; + yield return new object[] { ID(), SourceWithRefKind("out", "", "byte"), None }; + yield return new object[] { ID(), SourceWithRefKind("out", MarshalUsing("IntClassMarshaller", 1), "IntClass") + CodeSnippets.IntClassAndMarshaller, None }; + yield return new object[] { ID(), SourceWithRefKind("out", MarshalUsing("IntStructMarshaller", 1), "IntStruct") + CodeSnippets.IntStructAndMarshaller, None }; + yield return new object[] { ID(), SourceWithRefKind("out", "", "string", (StringMarshalling.Utf16, null)), None }; + yield return new object[] { ID(), SourceWithRefKind("out", "", "string", (StringMarshalling.Utf8, null)), None }; + yield return new object[] { ID(), SourceWithRefKind("out", MarshalCollection(1), CodeSnippets.GetCustomCollectionType("int")), None }; + + yield return new object[] { ID(), SourceWithRefKind("ref", "", "int"), None }; + yield return new object[] { ID(), SourceWithRefKind("ref", "", "byte"), None }; + yield return new object[] { ID(), SourceWithRefKind("ref", MarshalUsing("IntClassMarshaller", 1), "IntClass") + CodeSnippets.IntClassAndMarshaller, None }; + yield return new object[] { ID(), SourceWithRefKind("ref", MarshalUsing("IntStructMarshaller", 1), "IntStruct") + CodeSnippets.IntStructAndMarshaller, None }; + yield return new object[] { ID(), SourceWithRefKind("ref", "", "string", (StringMarshalling.Utf16, null)), None }; + yield return new object[] { ID(), SourceWithRefKind("ref", "", "string", (StringMarshalling.Utf8, null)), None }; + yield return new object[] { ID(), SourceWithRefKind("ref", MarshalCollection(1), CodeSnippets.GetCustomCollectionType("int")), None }; + + string Source(string Attributes, string type, (StringMarshalling StringMarshalling, Type? StringMarshallingCustomType)? stringMarshalling = null) + => SourceWithRefKind("", Attributes, type, stringMarshalling); + + string SourceWithRefKind(string refKind, string Attributes, string type, (StringMarshalling StringMarshalling, Type? StringMarshallingCustomType)? stringMarshalling = null) + { + return codeSnippets.ByValueMarshallingOfType(Attributes + MarshalCollection(), CodeSnippets.GetCustomCollectionType(type), p, stringMarshalling) + CodeSnippets.CustomCollectionAndMarshaller; + } + static string MarshalUsing(string marshaller = CollectionMarshaller, int depth = 0) + => $"[MarshalUsing(typeof({marshaller}), ElementIndirectionDepth = {depth})]"; + static string MarshalCollection(int depth = 0) + => $"[MarshalUsing(typeof({CollectionMarshaller}), ElementIndirectionDepth = {depth}, ConstantElementCount = 10)]"; + } + + + + [Theory] + [MemberData(nameof(ByValueMarshalAttributeOnPinnedMarshalledTypes))] + [MemberData(nameof(ByValueMarshalAttributeOnValueTypes))] + [MemberData(nameof(ByValueMarshalAttributeOnCustomCollections))] + public async Task VerifyByValueMarshallingAttributeUsageInfoMessages(string id, string source, DiagnosticResult[] diagnostics) + { + _ = id; + VerifyComInterfaceGenerator.Test test = new(referenceAncillaryInterop: false) + { + TestCode = source, + TestBehaviors = TestBehaviors.SkipGeneratedSourcesCheck, + }; + test.DisabledDiagnostics.Remove(GeneratorDiagnostics.Ids.NotRecommendedGeneratedComInterfaceUsage); + test.ExpectedDiagnostics.AddRange(diagnostics); + await test.RunAsync(); + } + } +} diff --git a/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/CodeSnippets.cs b/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/CodeSnippets.cs index b013d8c26c4599..700797fcb3e888 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/CodeSnippets.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/CodeSnippets.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -12,12 +13,26 @@ namespace ComInterfaceGenerator.Unit.Tests { internal partial class CodeSnippets { + internal static IComInterfaceAttributeProvider GetAttributeProvider(GeneratorKind generator) + => generator switch + { + GeneratorKind.VTableIndexStubGenerator => new VirtualMethodIndexAttributeProvider(), + GeneratorKind.ComInterfaceGeneratorManagedObjectWrapper => new GeneratedComInterfaceAttributeProvider(System.Runtime.InteropServices.Marshalling.ComInterfaceOptions.ManagedObjectWrapper), + GeneratorKind.ComInterfaceGeneratorComObjectWrapper => new GeneratedComInterfaceAttributeProvider(System.Runtime.InteropServices.Marshalling.ComInterfaceOptions.ComObjectWrapper), + GeneratorKind.ComInterfaceGenerator => new GeneratedComInterfaceAttributeProvider(), + _ => throw new UnreachableException(), + }; + private readonly IComInterfaceAttributeProvider _attributeProvider; public CodeSnippets(IComInterfaceAttributeProvider attributeProvider) { _attributeProvider = attributeProvider; } + public CodeSnippets(GeneratorKind generator) : this(GetAttributeProvider(generator)) + { + } + private string VirtualMethodIndex( int index, bool? ImplicitThisParameter = null, @@ -49,6 +64,51 @@ private string UnmanagedCallConv(Type[]? CallConvs = null) + arguments + "]"; } + public static string GetCustomCollectionType(string elementName) => $"StatelessCollectionAllShapes<{elementName}>"; + + public const string CustomCollectionAndMarshaller = CustomCollectionDefinition + CustomCollectionAllShapesMarshaller; + public const string CustomCollectionDefinition = """ + internal class StatelessCollectionAllShapes + { + public T _field; + } + """; + public const string CustomCollectionAllShapesMarshaller = """ + [ContiguousCollectionMarshaller] + [CustomMarshaller(typeof(StatelessCollectionAllShapes<>), MarshalMode.Default, typeof(StatelessCollectionAllShapesMarshaller<,>))] + internal unsafe static class StatelessCollectionAllShapesMarshaller where TUnmanagedElement : unmanaged + { + public static void Free(TUnmanagedElement* unmanaged) { } + + // ToUnmanaged + public static TUnmanagedElement* AllocateContainerForUnmanagedElements(StatelessCollectionAllShapes managed, out int numElements) + => throw null; + public static System.ReadOnlySpan GetManagedValuesSource(StatelessCollectionAllShapes managed) // Can throw exceptions + => throw null; + public static System.Span GetUnmanagedValuesDestination(TUnmanagedElement* unmanaged, int numElements) // Can throw exceptions + => throw null; + public static ref TUnmanagedElement* GetPinnableReference(StatelessCollectionAllShapes managed) + => throw null; + + // Caller Allocated buffer ToUnmanaged + public static int BufferSize { get; } = 10; + public static TUnmanagedElement* AllocateContainerForUnmanagedElements(StatelessCollectionAllShapes managed, System.Span buffer, out int numElements) + => throw null; + + // ToManaged + public static StatelessCollectionAllShapes AllocateContainerForManagedElements(TUnmanagedElement* unmanaged, int numElements) + => throw null; + public static System.Span GetManagedValuesDestination(StatelessCollectionAllShapes managed) + => throw null; + public static System.ReadOnlySpan GetUnmanagedValuesSource(TUnmanagedElement* unmanaged, int numElements) + => throw null; + + //ToManaged Guaranteed marshalling + public static StatelessCollectionAllShapes AllocateContainerForManagedElementsFinally(TUnmanagedElement* unmanaged, int numElements) + => throw null; + } + """; + public static readonly string DisableRuntimeMarshalling = "[assembly:System.Runtime.CompilerServices.DisableRuntimeMarshalling]"; public static readonly string UsingSystemRuntimeInteropServicesMarshalling = "using System.Runtime.InteropServices.Marshalling;"; public const string IntMarshaller = """ diff --git a/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/ComInterfaceGenerator.Unit.Tests.csproj b/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/ComInterfaceGenerator.Unit.Tests.csproj index 08ca1a56fa43c8..beda4af3a72283 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/ComInterfaceGenerator.Unit.Tests.csproj +++ b/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/ComInterfaceGenerator.Unit.Tests.csproj @@ -33,6 +33,7 @@ + diff --git a/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/CompileFails.cs b/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/CompileFails.cs index 2e4d25da3837e5..331fa54117fb04 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/CompileFails.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/CompileFails.cs @@ -3,9 +3,7 @@ using System; using System.Collections.Generic; -using System.Diagnostics; using System.Linq; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices.Marshalling; using System.Threading.Tasks; using Microsoft.CodeAnalysis; @@ -14,6 +12,7 @@ using Microsoft.Interop; using Microsoft.Interop.UnitTests; using Xunit; +using static Microsoft.Interop.UnitTests.TestUtils; using StringMarshalling = System.Runtime.InteropServices.StringMarshalling; using VerifyComInterfaceGenerator = Microsoft.Interop.UnitTests.Verifiers.CSharpSourceGeneratorVerifier; @@ -21,11 +20,6 @@ namespace ComInterfaceGenerator.Unit.Tests { public class CompileFails { - private static string ID( - [CallerLineNumber] int lineNumber = 0, - [CallerFilePath] string? filePath = null) - => TestUtils.GetFileLineName(lineNumber, filePath); - public static IEnumerable ComInterfaceGeneratorSnippetsToCompile() { CodeSnippets codeSnippets = new(new GeneratedComInterfaceAttributeProvider()); @@ -54,19 +48,9 @@ public async Task ValidateComInterfaceGeneratorSnippets(string id, string source await VerifyComInterfaceGenerator.VerifySourceGeneratorAsync(source, expectedDiagnostics); } - private static IComInterfaceAttributeProvider GetAttributeProvider(GeneratorKind generator) - => generator switch - { - GeneratorKind.VTableIndexStubGenerator => new VirtualMethodIndexAttributeProvider(), - GeneratorKind.ComInterfaceGeneratorManagedObjectWrapper => new GeneratedComInterfaceAttributeProvider(System.Runtime.InteropServices.Marshalling.ComInterfaceOptions.ManagedObjectWrapper), - GeneratorKind.ComInterfaceGeneratorComObjectWrapper => new GeneratedComInterfaceAttributeProvider(System.Runtime.InteropServices.Marshalling.ComInterfaceOptions.ComObjectWrapper), - GeneratorKind.ComInterfaceGenerator => new GeneratedComInterfaceAttributeProvider(), - _ => throw new UnreachableException(), - }; - public static IEnumerable InvalidUnmanagedToManagedCodeSnippetsToCompile(GeneratorKind generator) { - CodeSnippets codeSnippets = new(GetAttributeProvider(generator)); + CodeSnippets codeSnippets = new(generator); string safeHandleMarshallerDoesNotSupportManagedToUnmanaged = string.Format(SR.ManagedToUnmanagedMissingRequiredMarshaller, "global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller"); string safeHandleMarshallerDoesNotSupportUnmanagedToManaged = string.Format(SR.UnmanagedToManagedMissingRequiredMarshaller, "global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller"); @@ -98,7 +82,7 @@ public static IEnumerable InvalidUnmanagedToManagedCodeSnippetsToCompi DiagnosticResult invalidReturnTypeDiagnostic = VerifyComInterfaceGenerator.Diagnostic(GeneratorDiagnostics.ReturnTypeNotSupportedWithDetails) .WithLocation(0) .WithArguments(marshallerDoesNotSupportManagedToUnmanaged, "Method"); - CustomStructMarshallingCodeSnippets customStructMarshallingCodeSnippets = new(new CodeSnippets.Bidirectional(GetAttributeProvider(generator))); + CustomStructMarshallingCodeSnippets customStructMarshallingCodeSnippets = new(new CodeSnippets.Bidirectional(CodeSnippets.GetAttributeProvider(generator))); yield return new object[] { ID(), customStructMarshallingCodeSnippets.Stateless.NativeToManagedOnlyOutParameter, new[] { invalidManagedToUnmanagedParameterDiagnostic } }; yield return new object[] { ID(), customStructMarshallingCodeSnippets.Stateless.NativeToManagedOnlyReturnValue, new[] { invalidReturnTypeDiagnostic } }; yield return new object[] { ID(), customStructMarshallingCodeSnippets.Stateless.ByValueInParameter, new[] { invalidUnmanagedToManagedParameterDiagnostic } }; @@ -113,7 +97,7 @@ public static IEnumerable StringMarshallingCodeSnippets(GeneratorKind string CustomTypeSpecifiedWithNoStringMarshallingCustom = SR.InvalidStringMarshallingConfigurationNotCustom; string StringMarshallingMustMatchBase = SR.GeneratedComInterfaceStringMarshallingMustMatchBase; - CodeSnippets codeSnippets = new(GetAttributeProvider(generator)); + CodeSnippets codeSnippets = new(generator); (StringMarshalling, Type?) utf8Marshalling = (StringMarshalling.Utf8, null); (StringMarshalling, Type?) utf16Marshalling = (StringMarshalling.Utf16, null); (StringMarshalling, Type?) customUtf16Marshalling = (StringMarshalling.Custom, typeof(Utf16StringMarshaller)); @@ -342,7 +326,7 @@ public static IEnumerable InvalidManagedToUnmanagedCodeSnippetsToCompi { // Marshallers with only support for their expected places in the signatures in // UnmanagedToManaged marshal modes. - CustomStructMarshallingCodeSnippets customStructMarshallingCodeSnippets = new(new CodeSnippets.Bidirectional(GetAttributeProvider(generator))); + CustomStructMarshallingCodeSnippets customStructMarshallingCodeSnippets = new(new CodeSnippets.Bidirectional(CodeSnippets.GetAttributeProvider(generator))); yield return new[] { ID(), customStructMarshallingCodeSnippets.Stateless.NativeToManagedOnlyInParameter }; yield return new[] { ID(), customStructMarshallingCodeSnippets.Stateless.ByValueOutParameter }; @@ -543,272 +527,6 @@ public async Task VerifyInterfaceWithLessVisibilityThanInterfaceWarns(string id, await VerifyComInterfaceGenerator.VerifySourceGeneratorAsync(source, diagnostics); } - public static IEnumerable ByValueMarshalAttributeOnValueTypes() - { - var codeSnippets = new CodeSnippets(GetAttributeProvider(GeneratorKind.ComInterfaceGenerator)); - const string inAttribute = "[{|#1:InAttribute|}]"; - const string outAttribute = "[{|#2:OutAttribute|}]"; - const string paramName = "p"; - string paramNameWithLocation = $$"""{|#0:{{paramName}}|}"""; - var inAttributeIsDefaultDiagnostic = new DiagnosticResult(GeneratorDiagnostics.UnnecessaryParameterMarshallingInfo) - .WithLocation(0) - .WithLocation(1) - .WithArguments(SR.InOutAttributes, paramName, SR.InAttributeOnlyIsDefault); - - - // [In] is default for all non-pinned marshalled types - yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(inAttribute, "int", paramNameWithLocation), new DiagnosticResult[] { - inAttributeIsDefaultDiagnostic } }; - yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(inAttribute, "byte", paramNameWithLocation), new DiagnosticResult[] { - inAttributeIsDefaultDiagnostic } }; - yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(inAttribute + "[MarshalAs(UnmanagedType.U4)]", "bool", paramNameWithLocation), new DiagnosticResult[] { - inAttributeIsDefaultDiagnostic } }; - yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(inAttribute + "[MarshalAs(UnmanagedType.U2)]", "char", paramNameWithLocation), new DiagnosticResult[] { - inAttributeIsDefaultDiagnostic } }; - - // [Out] is not allowed on value types passed by value - there is no indirection for the callee to make visible modifications. - var outAttributeNotSupportedOnValueParameters = new DiagnosticResult(GeneratorDiagnostics.ParameterTypeNotSupportedWithDetails) - .WithLocation(0) - .WithArguments(SR.OutAttributeNotSupportedOnByValueParameters, paramName); - yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(outAttribute, "int", paramNameWithLocation), new DiagnosticResult[] { - outAttributeNotSupportedOnValueParameters } }; - yield return new object[] { - ID(), - codeSnippets.ByValueMarshallingOfType(outAttribute, "IntStruct", paramNameWithLocation) + CodeSnippets.IntStructAndMarshaller, - new DiagnosticResult[] { - outAttributeNotSupportedOnValueParameters - } }; - yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(outAttribute + "[MarshalAs(UnmanagedType.U4)]", "bool", paramNameWithLocation), new DiagnosticResult[] { - outAttributeNotSupportedOnValueParameters - } }; - yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(outAttribute, "[MarshalAs(UnmanagedType.U2)] char", paramNameWithLocation), new DiagnosticResult[] { - outAttributeNotSupportedOnValueParameters - } }; - // [In,Out] should only warn for Out attribute - yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(inAttribute+outAttribute, "int", paramNameWithLocation), new DiagnosticResult[] { - outAttributeNotSupportedOnValueParameters } }; - yield return new object[] { - ID(), - codeSnippets.ByValueMarshallingOfType(inAttribute+outAttribute, "IntStruct", paramNameWithLocation) + CodeSnippets.IntStructAndMarshaller, - new DiagnosticResult[] { - outAttributeNotSupportedOnValueParameters - } }; - yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(inAttribute + outAttribute + "[MarshalAs(UnmanagedType.U4)]", "bool", paramNameWithLocation), new DiagnosticResult[] { - outAttributeNotSupportedOnValueParameters - } }; - yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(inAttribute + outAttribute, "[MarshalAs(UnmanagedType.U2)] char", paramNameWithLocation), new DiagnosticResult[] { - outAttributeNotSupportedOnValueParameters - } }; - - // Any ref keyword is okay for value types - yield return new object[] { - ID(), - codeSnippets.ByValueMarshallingOfType("out", "IntStruct", paramNameWithLocation) + CodeSnippets.IntStructAndMarshaller, - new DiagnosticResult[] {} - }; - yield return new object[] { - ID(), - codeSnippets.ByValueMarshallingOfType("out", "byte", paramNameWithLocation), - new DiagnosticResult[] {} - }; - yield return new object[] { - ID(), - codeSnippets.ByValueMarshallingOfType("", "[MarshalAs(UnmanagedType.U2)] out char", paramNameWithLocation), - new DiagnosticResult[] {} - }; - yield return new object[] { - ID(), - codeSnippets.ByValueMarshallingOfType("in", "IntStruct", paramNameWithLocation) + CodeSnippets.IntStructAndMarshaller, - new DiagnosticResult[] {} - }; - yield return new object[] { - ID(), - codeSnippets.ByValueMarshallingOfType("in", "byte", paramNameWithLocation), - new DiagnosticResult[] {} - }; - yield return new object[] { - ID(), - codeSnippets.ByValueMarshallingOfType("", "[MarshalAs(UnmanagedType.U2)] in char", paramNameWithLocation), - new DiagnosticResult[] {} - }; - yield return new object[] { - ID(), - codeSnippets.ByValueMarshallingOfType("ref", "IntStruct", paramNameWithLocation) + CodeSnippets.IntStructAndMarshaller, - new DiagnosticResult[] {} - }; - yield return new object[] { - ID(), - codeSnippets.ByValueMarshallingOfType("ref", "byte", paramNameWithLocation), - new DiagnosticResult[] {} - }; - yield return new object[] { - ID(), - codeSnippets.ByValueMarshallingOfType("", "[MarshalAs(UnmanagedType.U2)] ref char", paramNameWithLocation), - new DiagnosticResult[] {} - }; - } - - public static IEnumerable ByValueMarshalAttributeOnReferenceTypes() - { - var codeSnippets = new CodeSnippets(GetAttributeProvider(GeneratorKind.ComInterfaceGenerator)); - const string inAttribute = "[{|#1:InAttribute|}]"; - const string outAttribute = "[{|#2:OutAttribute|}]"; - const string paramName = "p"; - string paramNameWithLocation = $$"""{|#0:{{paramName}}|}"""; - var inAttributeIsDefaultDiagnostic = new DiagnosticResult(GeneratorDiagnostics.UnnecessaryParameterMarshallingInfo) - .WithLocation(0) - .WithLocation(1) - .WithArguments(SR.InOutAttributes, paramName, SR.InAttributeOnlyIsDefault); - - // [In] is default - yield return new object[] { - ID(), - codeSnippets.ByValueMarshallingOfType(inAttribute, "string", paramNameWithLocation, (StringMarshalling.Utf8, null)), - new DiagnosticResult[] { inAttributeIsDefaultDiagnostic } - }; - yield return new object[] { - ID(), - codeSnippets.ByValueMarshallingOfType(inAttribute, "IntClass", paramNameWithLocation) + CodeSnippets.IntClassAndMarshaller, - new DiagnosticResult[] { inAttributeIsDefaultDiagnostic } - }; - - var outNotAllowedOnRefTypes = new DiagnosticResult(GeneratorDiagnostics.ParameterTypeNotSupportedWithDetails) - .WithLocation(0) - .WithArguments(SR.OutAttributeNotSupportedOnByValueParameters, paramName); - - // [Out] is not allowed on strings - yield return new object[] { - ID(), - codeSnippets.ByValueMarshallingOfType(outAttribute, "string", paramNameWithLocation, (StringMarshalling.Utf8, null)), - new DiagnosticResult[] { outNotAllowedOnRefTypes } - }; - - // [Out] warns on by value reference types - yield return new object[] { - ID(), - codeSnippets.ByValueMarshallingOfType(outAttribute, "IntClass", paramNameWithLocation) + CodeSnippets.IntClassAndMarshaller, - new DiagnosticResult[] { outNotAllowedOnRefTypes } - }; - - // [In,Out] is fine on classes - yield return new object[] { - ID(), - codeSnippets.ByValueMarshallingOfType(inAttribute + outAttribute, "IntClass", paramNameWithLocation) + CodeSnippets.IntClassAndMarshaller, - new DiagnosticResult[] { outNotAllowedOnRefTypes } - }; - - // All refkinds are okay on classes and strings - yield return new object[] { - ID(), - codeSnippets.ByValueMarshallingOfType("in", "string", paramNameWithLocation, (StringMarshalling.Utf8, null)), - new DiagnosticResult[] { } - }; - yield return new object[] { - ID(), - codeSnippets.ByValueMarshallingOfType("in", "IntClass", paramNameWithLocation) + CodeSnippets.IntClassAndMarshaller, - new DiagnosticResult[] { } - }; - yield return new object[] { - ID(), - codeSnippets.ByValueMarshallingOfType("out", "string", paramNameWithLocation, (StringMarshalling.Utf8, null)), - new DiagnosticResult[] { } - }; - yield return new object[] { - ID(), - codeSnippets.ByValueMarshallingOfType("out", "IntClass", paramNameWithLocation) + CodeSnippets.IntClassAndMarshaller, - new DiagnosticResult[] { } - }; - yield return new object[] { - ID(), - codeSnippets.ByValueMarshallingOfType("ref", "string", paramNameWithLocation, (StringMarshalling.Utf8, null)), - new DiagnosticResult[] { } - }; - yield return new object[] { - ID(), - codeSnippets.ByValueMarshallingOfType("ref", "IntClass", paramNameWithLocation) + CodeSnippets.IntClassAndMarshaller, - new DiagnosticResult[] { } - }; - } - - public static IEnumerable ByValueMarshalAttributeOnPinnedMarshalledTypes() - { - var codeSnippets = new CodeSnippets(GetAttributeProvider(GeneratorKind.ComInterfaceGenerator)); - const string inAttribute = "[{|#1:InAttribute|}]"; - const string outAttribute = "[{|#2:OutAttribute|}]"; - const string paramName = "p"; - string paramNameWithLocation = $$"""{|#0:{{paramName}}|}"""; - const string constElementCount = @"[MarshalUsing(ConstantElementCount = 10)]"; - var inAttributeIsDefaultDiagnostic = new DiagnosticResult(GeneratorDiagnostics.UnnecessaryParameterMarshallingInfo) - .WithLocation(0) - .WithLocation(1) - .WithArguments(SR.InOutAttributes, paramName, SR.InAttributeOnlyIsDefault); - - yield return new object[] { ID(), codeSnippets.ByValueMarshallingOfType(inAttribute + constElementCount, "int[]", paramNameWithLocation), new DiagnosticResult[] { - inAttributeIsDefaultDiagnostic - }}; - yield return new object[] { - ID(), - codeSnippets.ByValueMarshallingOfType(inAttribute + constElementCount, "char[]", paramNameWithLocation, (StringMarshalling.Utf16, null)), - new DiagnosticResult[] { inAttributeIsDefaultDiagnostic } - }; - - // bools that are marshalled into a new array are in by default - yield return new object[] { - ID(), - codeSnippets.ByValueMarshallingOfType( - inAttribute + "[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.U1, SizeConst = 10)]", - "bool[]", - paramNameWithLocation, - (StringMarshalling.Utf16, null)), - new DiagnosticResult[] { inAttributeIsDefaultDiagnostic } - }; - // Overriding marshalling with a custom marshaller makes it not pinned - yield return new object[] { - ID(), - codeSnippets.ByValueMarshallingOfType(inAttribute, "[MarshalUsing(typeof(IntMarshaller), ElementIndirectionDepth = 1), MarshalUsing(ConstantElementCount = 10)]int[]", paramNameWithLocation) + CodeSnippets.IntMarshaller, - new DiagnosticResult[] { inAttributeIsDefaultDiagnostic } - }; - - yield return new object[] { - ID(), - codeSnippets.ByValueMarshallingOfType(inAttribute + outAttribute + constElementCount, "int[]", paramNameWithLocation), - new DiagnosticResult[] { } - }; - yield return new object[] { - ID(), - codeSnippets.ByValueMarshallingOfType(inAttribute + outAttribute + constElementCount, "char[]", paramNameWithLocation, (StringMarshalling.Utf16, null)), - new DiagnosticResult[] { } - }; - - yield return new object[] { - ID(), - codeSnippets.ByValueMarshallingOfType(outAttribute + constElementCount, "int[]", paramNameWithLocation), - new DiagnosticResult[] { } - }; - - yield return new object[] { - ID(), - codeSnippets.ByValueMarshallingOfType(outAttribute + constElementCount, "char[]", paramNameWithLocation, (StringMarshalling.Utf16, null)), - new DiagnosticResult[] { } - }; - } - - [Theory] - [MemberData(nameof(ByValueMarshalAttributeOnValueTypes))] - [MemberData(nameof(ByValueMarshalAttributeOnReferenceTypes))] - [MemberData(nameof(ByValueMarshalAttributeOnPinnedMarshalledTypes))] - public async Task VerifyByValueMarshallingAttributeUsage(string id, string source, DiagnosticResult[] diagnostics) - { - _ = id; - VerifyComInterfaceGenerator.Test test = new(referenceAncillaryInterop: false) - { - TestCode = source, - TestBehaviors = TestBehaviors.SkipGeneratedSourcesCheck, - }; - test.ExpectedDiagnostics.AddRange(diagnostics); - await test.RunAsync(); - } - [Fact] public async Task VerifyNonPartialInterfaceWarns() { @@ -967,7 +685,7 @@ partial interface {|#0:J|} public static IEnumerable CountParameterIsOutSnippets() { - var g = GetAttributeProvider(GeneratorKind.ComInterfaceGenerator); + var g = CodeSnippets.GetAttributeProvider(GeneratorKind.ComInterfaceGenerator); CodeSnippets a = new(g); DiagnosticResult returnValueDiag = new DiagnosticResult(GeneratorDiagnostics.SizeOfInCollectionMustBeDefinedAtCallReturnValue) .WithLocation(1) diff --git a/src/libraries/System.Runtime.InteropServices/tests/Common/TestUtils.cs b/src/libraries/System.Runtime.InteropServices/tests/Common/TestUtils.cs index 4d1ec3a5d2c7dd..cd065f54a48c0b 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/Common/TestUtils.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/Common/TestUtils.cs @@ -1,10 +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 Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp; -using Microsoft.CodeAnalysis.Diagnostics; -using Microsoft.CodeAnalysis.Testing; using System; using System.Collections.Generic; using System.Collections.Immutable; @@ -15,6 +11,10 @@ using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.Diagnostics; +using Microsoft.CodeAnalysis.Testing; using Xunit; namespace Microsoft.Interop.UnitTests @@ -51,6 +51,10 @@ public enum TestTargetFramework public static class TestUtils { + public static string ID( + [CallerLineNumber] int lineNumber = 0, + [CallerFilePath] string? filePath = null) + => TestUtils.GetFileLineName(lineNumber, filePath); internal static string GetFileLineName( [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) @@ -298,7 +302,7 @@ public void Stop() int count = Interlocked.Decrement(ref _count); if (count == 0) { - Environment.SetEnvironmentVariable(EnvVarName, null); + Environment.SetEnvironmentVariable(EnvVarName, null); } } } diff --git a/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/ByValueContentsMarshalling.cs b/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/ByValueContentsMarshalling.cs new file mode 100644 index 00000000000000..e632481d52109f --- /dev/null +++ b/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/ByValueContentsMarshalling.cs @@ -0,0 +1,135 @@ +// 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.Threading.Tasks; +using Microsoft.CodeAnalysis.Testing; +using Microsoft.Interop; +using Xunit; +using static Microsoft.Interop.UnitTests.TestUtils; +using VerifyCS = Microsoft.Interop.UnitTests.Verifiers.CSharpSourceGeneratorVerifier; + +namespace LibraryImportGenerator.UnitTests +{ + public class ByValueContentsMarshalling + { + public static IEnumerable ByValueMarshalAttributeOnValueTypes() + { + CodeSnippets.ByValueParameterWithModifier("int[]", "In"); + + const string In = "InAttribute"; + const string Out = "OutAttribute"; + const string InOut = "InAttribute, OutAttribute"; + const string paramName = "p"; + const string MarshalUsingUtf16 = "MarshalUsing(typeof(Utf16StringMarshaller))"; + + var diagnostic = new DiagnosticResult(GeneratorDiagnostics.ParameterTypeNotSupportedWithDetails); + var outAttributeNotSupported = diagnostic + .WithLocation(0) + .WithArguments(SR.OutAttributeNotSupportedOnByValueParameters, paramName); + var inAttributeIsNotSupported = diagnostic + .WithLocation(0) + .WithArguments(SR.InAttributeNotSupportedOnByValueParameters, paramName); + var inOutAttributeNotSupported = diagnostic + .WithLocation(0) + .WithArguments(SR.InOutAttributeNotSupportedOnByValueParameters, paramName); + + DiagnosticResult[] InIsNotSupported = [inAttributeIsNotSupported]; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("int", In), InIsNotSupported }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("byte", In), InIsNotSupported }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("string", In + " , " + MarshalUsingUtf16), InIsNotSupported }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("IntStruct", In, CodeSnippets.IntStructAndMarshaller), InIsNotSupported }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("IntClass", In, CodeSnippets.IntClassAndMarshaller), InIsNotSupported }; + + DiagnosticResult[] OutIsNotSupported = [outAttributeNotSupported]; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("int", Out), OutIsNotSupported }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("byte", Out), OutIsNotSupported }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("string", Out + " , " + MarshalUsingUtf16), OutIsNotSupported }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("IntStruct", Out, CodeSnippets.IntStructAndMarshaller), OutIsNotSupported }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("IntClass", Out, CodeSnippets.IntClassAndMarshaller), OutIsNotSupported }; + + DiagnosticResult[] InOutIsNotSupported = [inOutAttributeNotSupported]; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("int", InOut), InOutIsNotSupported }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("byte", InOut), InOutIsNotSupported }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("string", InOut + " , " + MarshalUsingUtf16), InOutIsNotSupported }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("IntStruct", InOut, CodeSnippets.IntStructAndMarshaller), InOutIsNotSupported }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("IntClass", InOut, CodeSnippets.IntClassAndMarshaller), InOutIsNotSupported }; + + var inAndOutNotAllowedWithRefKind = new DiagnosticResult(GeneratorDiagnostics.ParameterTypeNotSupportedWithDetails) + .WithLocation(0) + .WithArguments("The '[In]' and '[Out]' attributes are unsupported on parameters passed by reference. Use the 'in', 'ref', or 'out' keywords instead.", "p"); + DiagnosticResult[] InAndOutNotAllowedWithRefKind = [inAndOutNotAllowedWithRefKind]; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("in int", In), InAndOutNotAllowedWithRefKind }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("ref int", In), InAndOutNotAllowedWithRefKind }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("ref int", InOut), InAndOutNotAllowedWithRefKind }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("out int", Out), InAndOutNotAllowedWithRefKind }; + } + + public static IEnumerable ByValueMarshalAttributeOnArrays() + { + CodeSnippets.ByValueParameterWithModifier("int[]", "In"); + + const string In = "InAttribute"; + const string Out = "OutAttribute"; + const string InOut = "InAttribute, OutAttribute"; + const string MarshalUsingUtf16 = "MarshalUsing(typeof(Utf16StringMarshaller), ElementIndirectionDepth = 1)"; + const string Count = "MarshalUsing(ConstantElementCount = 10)"; + DiagnosticResult[] None = []; + + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("int[]", string.Join(',', Count, In)), None }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("byte[]", string.Join(',', Count, In)), None }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("string[]", string.Join(',', Count, In, MarshalUsingUtf16)), None }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("IntStruct[]", string.Join(',', Count, In), CodeSnippets.IntStructAndMarshaller), None }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("IntClass[]", string.Join(',', Count, In), CodeSnippets.IntClassAndMarshaller), None }; + + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("int[]", string.Join(',', Count, Out)), None }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("byte[]", string.Join(',', Count, Out)), None }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("string[]", string.Join(',', Count, Out, MarshalUsingUtf16)), None }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("IntStruct[]", string.Join(',', Count, Out), CodeSnippets.IntStructAndMarshaller), None }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("IntClass[]", string.Join(',', Count, Out), CodeSnippets.IntClassAndMarshaller), None }; + + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("int[]", string.Join(',', Count, InOut)), None }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("byte[]", string.Join(',', Count, InOut)), None }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("string[]", string.Join(',', Count, InOut, MarshalUsingUtf16)), None }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("IntStruct[]", string.Join(',', Count, InOut), CodeSnippets.IntStructAndMarshaller), None }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("IntClass[]", string.Join(',', Count, InOut), CodeSnippets.IntClassAndMarshaller), None }; + + DiagnosticResult preferAttributes = new DiagnosticResult(GeneratorDiagnostics.LibraryImportUsageDoesNotFollowBestPractices) + .WithArguments(SR.PreferExplicitInOutAttributesOnArrays) + .WithLocation(0); + DiagnosticResult[] PreferAttributes = [preferAttributes]; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("int[]", Count), PreferAttributes }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("byte[]", Count), PreferAttributes }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("string[]", string.Join(',', Count, MarshalUsingUtf16)), PreferAttributes }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("IntStruct[]", Count, CodeSnippets.IntStructAndMarshaller), PreferAttributes }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("IntClass[]", Count, CodeSnippets.IntClassAndMarshaller), PreferAttributes }; + + var inAndOutNotAllowedWithRefKind = new DiagnosticResult(GeneratorDiagnostics.ParameterTypeNotSupportedWithDetails) + .WithLocation(0) + .WithArguments("The '[In]' and '[Out]' attributes are unsupported on parameters passed by reference. Use the 'in', 'ref', or 'out' keywords instead.", "p"); + DiagnosticResult[] InAndOutNotAllowedWithRefKind = [inAndOutNotAllowedWithRefKind]; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("in int[]", string.Join(',', Count, In)), InAndOutNotAllowedWithRefKind }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("ref int[]", string.Join(',', Count, In)), InAndOutNotAllowedWithRefKind }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("ref int[]", string.Join(',', Count, In, Out)), InAndOutNotAllowedWithRefKind }; + yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("out int[]", string.Join(',', Count, Out)), InAndOutNotAllowedWithRefKind }; + } + + + [Theory] + [MemberData(nameof(ByValueMarshalAttributeOnValueTypes))] + [MemberData(nameof(ByValueMarshalAttributeOnArrays))] + public async Task VerifyByValueMarshallingAttributeUsageInfoMessages(string id, string source, DiagnosticResult[] diagnostics) + { + _ = id; + VerifyCS.Test test = new(referenceAncillaryInterop: false) + { + TestCode = source, + TestBehaviors = TestBehaviors.SkipGeneratedSourcesCheck, + }; + test.DisabledDiagnostics.Remove(GeneratorDiagnostics.Ids.NotRecommendedGeneratedComInterfaceUsage); + test.ExpectedDiagnostics.AddRange(diagnostics); + await test.RunAsync(); + } + } +} diff --git a/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/CodeSnippets.cs b/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/CodeSnippets.cs index e1039f70a90ef9..19832861a38aaa 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/CodeSnippets.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/CodeSnippets.cs @@ -986,6 +986,22 @@ out int pOutSize } """; + public const string IntClassAndMarshaller = IntClassDefinition + IntClassMarshallerDefinition; + public const string IntClassDefinition = """ + internal struct IntClass + { + public int Field; + } + """; + public const string IntClassMarshallerDefinition = """ + [CustomMarshaller(typeof(IntClass), MarshalMode.Default, typeof(IntClassMarshaller))] + internal static class IntClassMarshaller + { + public static nint ConvertToUnmanaged(IntClass managed) => (nint)0; + public static IntClass ConvertToManaged(nint unmanaged) => default; + } + """; + public const string IntStructAndMarshaller = IntStructDefinition + IntStructMarshallerDefinition; public const string IntStructDefinition = """ internal struct IntStruct diff --git a/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/CompileFails.cs b/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/CompileFails.cs index ffb3fb5c6a14ba..2d278dc6237de2 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/CompileFails.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/CompileFails.cs @@ -350,56 +350,6 @@ public static IEnumerable CodeSnippetsToCompile() .WithArguments("MarshalAsAttribute", "t") }}; - // Unsupported [In, Out] attributes usage - - // By ref with [In, Out] attributes - yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("in int", "In"), new[] - { - VerifyCS.Diagnostic(GeneratorDiagnostics.ParameterTypeNotSupportedWithDetails) - .WithLocation(0) - .WithArguments("The '[In]' and '[Out]' attributes are unsupported on parameters passed by reference. Use the 'in', 'ref', or 'out' keywords instead.", "p") - } }; - yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("ref int", "In"), new[] - { - VerifyCS.Diagnostic(GeneratorDiagnostics.ParameterTypeNotSupportedWithDetails) - .WithLocation(0) - .WithArguments("The '[In]' and '[Out]' attributes are unsupported on parameters passed by reference. Use the 'in', 'ref', or 'out' keywords instead.", "p") - } }; - yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("ref int", "In, Out"), new[] - { - VerifyCS.Diagnostic(GeneratorDiagnostics.ParameterTypeNotSupportedWithDetails) - .WithLocation(0) - .WithArguments("The '[In]' and '[Out]' attributes are unsupported on parameters passed by reference. Use the 'in', 'ref', or 'out' keywords instead.", "p") - } }; - yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("out int", "Out"), new[] - { - VerifyCS.Diagnostic(GeneratorDiagnostics.ParameterTypeNotSupportedWithDetails) - .WithLocation(0) - .WithArguments("The '[In]' and '[Out]' attributes are unsupported on parameters passed by reference. Use the 'in', 'ref', or 'out' keywords instead.", "p") - } }; - - // By value non-array with [In, Out] attributes - yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("{|#1:In|}"), new [] { - VerifyCS.Diagnostic(GeneratorDiagnostics.UnnecessaryParameterMarshallingInfo) - .WithLocation(0) - .WithLocation(1) - .WithArguments(SR.InOutAttributes, "p", SR.InAttributeOnlyIsDefault) - .WithSeverity(DiagnosticSeverity.Info) - } }; - yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("Out"), new[] - { - VerifyCS.Diagnostic(GeneratorDiagnostics.ParameterTypeNotSupportedWithDetails) - .WithLocation(0) - .WithArguments(SR.OutAttributeNotSupportedOnByValueParameters, "p") - } }; - - yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("In, Out"), new[] - { - VerifyCS.Diagnostic(GeneratorDiagnostics.ParameterTypeNotSupportedWithDetails) - .WithLocation(0) - .WithArguments(SR.OutAttributeNotSupportedOnByValueParameters, "p") - } }; - // LCIDConversion yield return new object[] { ID(), CodeSnippets.LCIDConversionAttribute, new[] { VerifyCS.Diagnostic(GeneratorDiagnostics.ConfigurationNotSupported) @@ -832,13 +782,6 @@ public static IEnumerable CodeSnippetsToCompile() .WithLocation(1) .WithArguments("ref return", "Basic.RefReadonlyReturn()"), } }; - yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("{|#10:In|}"), new[] - { - VerifyCS.Diagnostic(GeneratorDiagnostics.UnnecessaryParameterMarshallingInfo) - .WithLocation(0) - .WithLocation(10) - .WithArguments("[In] and [Out] attributes", "p", SR.InAttributeOnlyIsDefault) - } }; } [Theory] diff --git a/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/Compiles.cs b/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/Compiles.cs index 438d589b2c29d0..5d37fffd52a5b6 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/Compiles.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/Compiles.cs @@ -17,7 +17,6 @@ using Microsoft.CodeAnalysis.Text; using Microsoft.Interop.UnitTests; using Xunit; -using GeneratorDiagnostics = Microsoft.Interop.GeneratorDiagnostics; using VerifyCS = Microsoft.Interop.UnitTests.Verifiers.CSharpSourceGeneratorVerifier; namespace LibraryImportGenerator.UnitTests @@ -744,28 +743,5 @@ public NoChangeTest(TestTargetFramework framework) return (newCompilation, diagnostics); } } - - public static IEnumerable ByValueMarshalKindSnippets() - { - // Blittable array - yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("{|#10:Out|}"), new DiagnosticResult[] { } }; - - yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("{|#10:In|}, {|#11:Out|}"), new DiagnosticResult[] { } }; - - yield return new object[] { ID(), CodeSnippets.ByValueParameterWithModifier("{|#10:In|}"), new DiagnosticResult[] { - VerifyCS.Diagnostic(GeneratorDiagnostics.UnnecessaryParameterMarshallingInfo) - .WithLocation(0) - .WithLocation(10) - .WithArguments("[In] and [Out] attributes", "p", SR.InAttributeOnlyIsDefault) - } }; - } - - [MemberData(nameof(ByValueMarshalKindSnippets))] - [Theory] - public async Task ValidateDiagnosticsForUnnecessaryByValueMarshalKindAttributes(string id, string source, DiagnosticResult[] diagnostics) - { - _ = id; - await VerifyCS.VerifySourceGeneratorAsync(source, diagnostics); - } } } diff --git a/src/libraries/System.Runtime.InteropServices/tests/TestAssets/SharedTypes/SharedTypes.csproj b/src/libraries/System.Runtime.InteropServices/tests/TestAssets/SharedTypes/SharedTypes.csproj index 63256a99295555..790a5e3f05a366 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/TestAssets/SharedTypes/SharedTypes.csproj +++ b/src/libraries/System.Runtime.InteropServices/tests/TestAssets/SharedTypes/SharedTypes.csproj @@ -11,7 +11,8 @@ - + + diff --git a/src/libraries/System.Runtime.Intrinsics/System.Runtime.Intrinsics.sln b/src/libraries/System.Runtime.Intrinsics/System.Runtime.Intrinsics.sln index 29c357fd6f53d1..e71c73901eb772 100644 --- a/src/libraries/System.Runtime.Intrinsics/System.Runtime.Intrinsics.sln +++ b/src/libraries/System.Runtime.Intrinsics/System.Runtime.Intrinsics.sln @@ -23,7 +23,17 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Intrinsics.T EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{2A6ED99F-FFEC-4FA7-BEF7-E5339C9D99BB}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{F110DBFA-22D7-486A-993D-5461A57A1D50}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{022E0D70-D39E-4715-8484-8D2AC264304B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{31B3B363-9E3C-4B29-B040-804F65F03D12}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{9AF18F33-B541-4C24-A474-2DAF277D436E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{822F0A44-721C-42BB-8C66-C73ADC29D0D6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{A87F8371-F4AD-4214-86BD-0A9B59CCA0AE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{80C7CB4D-47F4-416B-AE32-656C04C8CA87}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{C5014AA7-5C35-45D5-B7C6-48A5E93A758E}" EndProject @@ -31,6 +41,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{E7A9B89D-A9F EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{A499E9EC-3C82-4B0A-AC49-111C706B1835}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{F110DBFA-22D7-486A-993D-5461A57A1D50}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{0ECF6939-6099-448F-A3E5-B8069E092C2F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{5D25490B-EE25-44ED-9B06-D0A41C73DB12}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{BFA6F611-C767-4697-AD3E-9E3FF6132FAB}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{D9C1BAD0-2991-4FC9-9718-3EF7D2B7A54F}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -311,13 +331,117 @@ Global {2A6ED99F-FFEC-4FA7-BEF7-E5339C9D99BB}.Checked|arm64.ActiveCfg = Debug|Any CPU {2A6ED99F-FFEC-4FA7-BEF7-E5339C9D99BB}.Checked|x64.ActiveCfg = Debug|Any CPU {2A6ED99F-FFEC-4FA7-BEF7-E5339C9D99BB}.Checked|x86.ActiveCfg = Debug|Any CPU + {022E0D70-D39E-4715-8484-8D2AC264304B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {022E0D70-D39E-4715-8484-8D2AC264304B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {022E0D70-D39E-4715-8484-8D2AC264304B}.Debug|arm.ActiveCfg = Debug|Any CPU + {022E0D70-D39E-4715-8484-8D2AC264304B}.Debug|arm64.ActiveCfg = Debug|Any CPU + {022E0D70-D39E-4715-8484-8D2AC264304B}.Debug|x64.ActiveCfg = Debug|Any CPU + {022E0D70-D39E-4715-8484-8D2AC264304B}.Debug|x64.Build.0 = Debug|Any CPU + {022E0D70-D39E-4715-8484-8D2AC264304B}.Debug|x86.ActiveCfg = Debug|Any CPU + {022E0D70-D39E-4715-8484-8D2AC264304B}.Debug|x86.Build.0 = Debug|Any CPU + {022E0D70-D39E-4715-8484-8D2AC264304B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {022E0D70-D39E-4715-8484-8D2AC264304B}.Release|Any CPU.Build.0 = Release|Any CPU + {022E0D70-D39E-4715-8484-8D2AC264304B}.Release|arm.ActiveCfg = Release|Any CPU + {022E0D70-D39E-4715-8484-8D2AC264304B}.Release|arm64.ActiveCfg = Release|Any CPU + {022E0D70-D39E-4715-8484-8D2AC264304B}.Release|x64.ActiveCfg = Release|Any CPU + {022E0D70-D39E-4715-8484-8D2AC264304B}.Release|x64.Build.0 = Release|Any CPU + {022E0D70-D39E-4715-8484-8D2AC264304B}.Release|x86.ActiveCfg = Release|Any CPU + {022E0D70-D39E-4715-8484-8D2AC264304B}.Release|x86.Build.0 = Release|Any CPU + {022E0D70-D39E-4715-8484-8D2AC264304B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {022E0D70-D39E-4715-8484-8D2AC264304B}.Checked|arm.ActiveCfg = Debug|Any CPU + {022E0D70-D39E-4715-8484-8D2AC264304B}.Checked|arm64.ActiveCfg = Debug|Any CPU + {022E0D70-D39E-4715-8484-8D2AC264304B}.Checked|x64.ActiveCfg = Debug|Any CPU + {022E0D70-D39E-4715-8484-8D2AC264304B}.Checked|x86.ActiveCfg = Debug|Any CPU + {31B3B363-9E3C-4B29-B040-804F65F03D12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {31B3B363-9E3C-4B29-B040-804F65F03D12}.Debug|Any CPU.Build.0 = Debug|Any CPU + {31B3B363-9E3C-4B29-B040-804F65F03D12}.Debug|arm.ActiveCfg = Debug|Any CPU + {31B3B363-9E3C-4B29-B040-804F65F03D12}.Debug|arm64.ActiveCfg = Debug|Any CPU + {31B3B363-9E3C-4B29-B040-804F65F03D12}.Debug|x64.ActiveCfg = Debug|Any CPU + {31B3B363-9E3C-4B29-B040-804F65F03D12}.Debug|x64.Build.0 = Debug|Any CPU + {31B3B363-9E3C-4B29-B040-804F65F03D12}.Debug|x86.ActiveCfg = Debug|Any CPU + {31B3B363-9E3C-4B29-B040-804F65F03D12}.Debug|x86.Build.0 = Debug|Any CPU + {31B3B363-9E3C-4B29-B040-804F65F03D12}.Release|Any CPU.ActiveCfg = Release|Any CPU + {31B3B363-9E3C-4B29-B040-804F65F03D12}.Release|Any CPU.Build.0 = Release|Any CPU + {31B3B363-9E3C-4B29-B040-804F65F03D12}.Release|arm.ActiveCfg = Release|Any CPU + {31B3B363-9E3C-4B29-B040-804F65F03D12}.Release|arm64.ActiveCfg = Release|Any CPU + {31B3B363-9E3C-4B29-B040-804F65F03D12}.Release|x64.ActiveCfg = Release|Any CPU + {31B3B363-9E3C-4B29-B040-804F65F03D12}.Release|x64.Build.0 = Release|Any CPU + {31B3B363-9E3C-4B29-B040-804F65F03D12}.Release|x86.ActiveCfg = Release|Any CPU + {31B3B363-9E3C-4B29-B040-804F65F03D12}.Release|x86.Build.0 = Release|Any CPU + {31B3B363-9E3C-4B29-B040-804F65F03D12}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {31B3B363-9E3C-4B29-B040-804F65F03D12}.Checked|arm.ActiveCfg = Debug|Any CPU + {31B3B363-9E3C-4B29-B040-804F65F03D12}.Checked|arm64.ActiveCfg = Debug|Any CPU + {31B3B363-9E3C-4B29-B040-804F65F03D12}.Checked|x64.ActiveCfg = Debug|Any CPU + {31B3B363-9E3C-4B29-B040-804F65F03D12}.Checked|x86.ActiveCfg = Debug|Any CPU + {9AF18F33-B541-4C24-A474-2DAF277D436E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9AF18F33-B541-4C24-A474-2DAF277D436E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9AF18F33-B541-4C24-A474-2DAF277D436E}.Debug|arm.ActiveCfg = Debug|Any CPU + {9AF18F33-B541-4C24-A474-2DAF277D436E}.Debug|arm64.ActiveCfg = Debug|Any CPU + {9AF18F33-B541-4C24-A474-2DAF277D436E}.Debug|x64.ActiveCfg = Debug|Any CPU + {9AF18F33-B541-4C24-A474-2DAF277D436E}.Debug|x64.Build.0 = Debug|Any CPU + {9AF18F33-B541-4C24-A474-2DAF277D436E}.Debug|x86.ActiveCfg = Debug|Any CPU + {9AF18F33-B541-4C24-A474-2DAF277D436E}.Debug|x86.Build.0 = Debug|Any CPU + {9AF18F33-B541-4C24-A474-2DAF277D436E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9AF18F33-B541-4C24-A474-2DAF277D436E}.Release|Any CPU.Build.0 = Release|Any CPU + {9AF18F33-B541-4C24-A474-2DAF277D436E}.Release|arm.ActiveCfg = Release|Any CPU + {9AF18F33-B541-4C24-A474-2DAF277D436E}.Release|arm64.ActiveCfg = Release|Any CPU + {9AF18F33-B541-4C24-A474-2DAF277D436E}.Release|x64.ActiveCfg = Release|Any CPU + {9AF18F33-B541-4C24-A474-2DAF277D436E}.Release|x64.Build.0 = Release|Any CPU + {9AF18F33-B541-4C24-A474-2DAF277D436E}.Release|x86.ActiveCfg = Release|Any CPU + {9AF18F33-B541-4C24-A474-2DAF277D436E}.Release|x86.Build.0 = Release|Any CPU + {9AF18F33-B541-4C24-A474-2DAF277D436E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {9AF18F33-B541-4C24-A474-2DAF277D436E}.Checked|arm.ActiveCfg = Debug|Any CPU + {9AF18F33-B541-4C24-A474-2DAF277D436E}.Checked|arm64.ActiveCfg = Debug|Any CPU + {9AF18F33-B541-4C24-A474-2DAF277D436E}.Checked|x64.ActiveCfg = Debug|Any CPU + {9AF18F33-B541-4C24-A474-2DAF277D436E}.Checked|x86.ActiveCfg = Debug|Any CPU + {822F0A44-721C-42BB-8C66-C73ADC29D0D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {822F0A44-721C-42BB-8C66-C73ADC29D0D6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {822F0A44-721C-42BB-8C66-C73ADC29D0D6}.Debug|arm.ActiveCfg = Debug|Any CPU + {822F0A44-721C-42BB-8C66-C73ADC29D0D6}.Debug|arm64.ActiveCfg = Debug|Any CPU + {822F0A44-721C-42BB-8C66-C73ADC29D0D6}.Debug|x64.ActiveCfg = Debug|Any CPU + {822F0A44-721C-42BB-8C66-C73ADC29D0D6}.Debug|x64.Build.0 = Debug|Any CPU + {822F0A44-721C-42BB-8C66-C73ADC29D0D6}.Debug|x86.ActiveCfg = Debug|Any CPU + {822F0A44-721C-42BB-8C66-C73ADC29D0D6}.Debug|x86.Build.0 = Debug|Any CPU + {822F0A44-721C-42BB-8C66-C73ADC29D0D6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {822F0A44-721C-42BB-8C66-C73ADC29D0D6}.Release|Any CPU.Build.0 = Release|Any CPU + {822F0A44-721C-42BB-8C66-C73ADC29D0D6}.Release|arm.ActiveCfg = Release|Any CPU + {822F0A44-721C-42BB-8C66-C73ADC29D0D6}.Release|arm64.ActiveCfg = Release|Any CPU + {822F0A44-721C-42BB-8C66-C73ADC29D0D6}.Release|x64.ActiveCfg = Release|Any CPU + {822F0A44-721C-42BB-8C66-C73ADC29D0D6}.Release|x64.Build.0 = Release|Any CPU + {822F0A44-721C-42BB-8C66-C73ADC29D0D6}.Release|x86.ActiveCfg = Release|Any CPU + {822F0A44-721C-42BB-8C66-C73ADC29D0D6}.Release|x86.Build.0 = Release|Any CPU + {822F0A44-721C-42BB-8C66-C73ADC29D0D6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {822F0A44-721C-42BB-8C66-C73ADC29D0D6}.Checked|arm.ActiveCfg = Debug|Any CPU + {822F0A44-721C-42BB-8C66-C73ADC29D0D6}.Checked|arm64.ActiveCfg = Debug|Any CPU + {822F0A44-721C-42BB-8C66-C73ADC29D0D6}.Checked|x64.ActiveCfg = Debug|Any CPU + {822F0A44-721C-42BB-8C66-C73ADC29D0D6}.Checked|x86.ActiveCfg = Debug|Any CPU + {A87F8371-F4AD-4214-86BD-0A9B59CCA0AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A87F8371-F4AD-4214-86BD-0A9B59CCA0AE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A87F8371-F4AD-4214-86BD-0A9B59CCA0AE}.Debug|arm.ActiveCfg = Debug|Any CPU + {A87F8371-F4AD-4214-86BD-0A9B59CCA0AE}.Debug|arm64.ActiveCfg = Debug|Any CPU + {A87F8371-F4AD-4214-86BD-0A9B59CCA0AE}.Debug|x64.ActiveCfg = Debug|Any CPU + {A87F8371-F4AD-4214-86BD-0A9B59CCA0AE}.Debug|x64.Build.0 = Debug|Any CPU + {A87F8371-F4AD-4214-86BD-0A9B59CCA0AE}.Debug|x86.ActiveCfg = Debug|Any CPU + {A87F8371-F4AD-4214-86BD-0A9B59CCA0AE}.Debug|x86.Build.0 = Debug|Any CPU + {A87F8371-F4AD-4214-86BD-0A9B59CCA0AE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A87F8371-F4AD-4214-86BD-0A9B59CCA0AE}.Release|Any CPU.Build.0 = Release|Any CPU + {A87F8371-F4AD-4214-86BD-0A9B59CCA0AE}.Release|arm.ActiveCfg = Release|Any CPU + {A87F8371-F4AD-4214-86BD-0A9B59CCA0AE}.Release|arm64.ActiveCfg = Release|Any CPU + {A87F8371-F4AD-4214-86BD-0A9B59CCA0AE}.Release|x64.ActiveCfg = Release|Any CPU + {A87F8371-F4AD-4214-86BD-0A9B59CCA0AE}.Release|x64.Build.0 = Release|Any CPU + {A87F8371-F4AD-4214-86BD-0A9B59CCA0AE}.Release|x86.ActiveCfg = Release|Any CPU + {A87F8371-F4AD-4214-86BD-0A9B59CCA0AE}.Release|x86.Build.0 = Release|Any CPU + {A87F8371-F4AD-4214-86BD-0A9B59CCA0AE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {A87F8371-F4AD-4214-86BD-0A9B59CCA0AE}.Checked|arm.ActiveCfg = Debug|Any CPU + {A87F8371-F4AD-4214-86BD-0A9B59CCA0AE}.Checked|arm64.ActiveCfg = Debug|Any CPU + {A87F8371-F4AD-4214-86BD-0A9B59CCA0AE}.Checked|x64.ActiveCfg = Debug|Any CPU + {A87F8371-F4AD-4214-86BD-0A9B59CCA0AE}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {5965CFFE-886A-418C-854F-5967D91DE914} = {F110DBFA-22D7-486A-993D-5461A57A1D50} - {5AD79501-BEA5-48C7-B466-021A9DCB9D5C} = {F110DBFA-22D7-486A-993D-5461A57A1D50} + {5965CFFE-886A-418C-854F-5967D91DE914} = {80C7CB4D-47F4-416B-AE32-656C04C8CA87} {2644B828-C37C-45C1-933D-27E82DA0A098} = {C5014AA7-5C35-45D5-B7C6-48A5E93A758E} {EFF55B56-D92B-4573-94EA-AF5B3B001C34} = {C5014AA7-5C35-45D5-B7C6-48A5E93A758E} {80AFB6EB-AB23-48A1-951C-76E6FEA29D19} = {C5014AA7-5C35-45D5-B7C6-48A5E93A758E} @@ -328,6 +452,15 @@ Global {A4058388-97C1-492A-86A4-5240C4166BFF} = {A499E9EC-3C82-4B0A-AC49-111C706B1835} {FE8C7C64-1759-4175-BA6E-03F8D6B7C6EF} = {A499E9EC-3C82-4B0A-AC49-111C706B1835} {9A0BF7EC-AD07-44C8-9B70-9DACB2C894C7} = {A499E9EC-3C82-4B0A-AC49-111C706B1835} + {5AD79501-BEA5-48C7-B466-021A9DCB9D5C} = {F110DBFA-22D7-486A-993D-5461A57A1D50} + {022E0D70-D39E-4715-8484-8D2AC264304B} = {0ECF6939-6099-448F-A3E5-B8069E092C2F} + {31B3B363-9E3C-4B29-B040-804F65F03D12} = {0ECF6939-6099-448F-A3E5-B8069E092C2F} + {0ECF6939-6099-448F-A3E5-B8069E092C2F} = {D9C1BAD0-2991-4FC9-9718-3EF7D2B7A54F} + {9AF18F33-B541-4C24-A474-2DAF277D436E} = {5D25490B-EE25-44ED-9B06-D0A41C73DB12} + {822F0A44-721C-42BB-8C66-C73ADC29D0D6} = {5D25490B-EE25-44ED-9B06-D0A41C73DB12} + {5D25490B-EE25-44ED-9B06-D0A41C73DB12} = {D9C1BAD0-2991-4FC9-9718-3EF7D2B7A54F} + {A87F8371-F4AD-4214-86BD-0A9B59CCA0AE} = {BFA6F611-C767-4697-AD3E-9E3FF6132FAB} + {BFA6F611-C767-4697-AD3E-9E3FF6132FAB} = {D9C1BAD0-2991-4FC9-9718-3EF7D2B7A54F} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {9205DA5F-88A2-4045-9B31-9CC53CCF7550} diff --git a/src/libraries/System.Runtime.Loader/System.Runtime.Loader.sln b/src/libraries/System.Runtime.Loader/System.Runtime.Loader.sln index 2e2720988c8c8b..f8535b8ab49ffb 100644 --- a/src/libraries/System.Runtime.Loader/System.Runtime.Loader.sln +++ b/src/libraries/System.Runtime.Loader/System.Runtime.Loader.sln @@ -35,6 +35,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection.Metadata. EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection.Metadata.ApplyUpdate.Test.FirstCallAfterUpdate", "tests\ApplyUpdate\System.Reflection.Metadata.ApplyUpdate.Test.FirstCallAfterUpdate\System.Reflection.Metadata.ApplyUpdate.Test.FirstCallAfterUpdate.csproj", "{3E342557-A99F-4A52-826E-6854A1D8D65C}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection.Metadata.ApplyUpdate.Test.GenericAddInstanceField", "tests\ApplyUpdate\System.Reflection.Metadata.ApplyUpdate.Test.GenericAddInstanceField\System.Reflection.Metadata.ApplyUpdate.Test.GenericAddInstanceField.csproj", "{32B30EA9-CD06-4069-BA31-05EA4A260EF5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection.Metadata.ApplyUpdate.Test.GenericAddStaticField", "tests\ApplyUpdate\System.Reflection.Metadata.ApplyUpdate.Test.GenericAddStaticField\System.Reflection.Metadata.ApplyUpdate.Test.GenericAddStaticField.csproj", "{35692A86-DE04-41CA-9FCE-D129E0E04993}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection.Metadata.ApplyUpdate.Test.LambdaBodyChange", "tests\ApplyUpdate\System.Reflection.Metadata.ApplyUpdate.Test.LambdaBodyChange\System.Reflection.Metadata.ApplyUpdate.Test.LambdaBodyChange.csproj", "{9D747A8D-A9DE-4470-9CF6-F73DF60FC5F6}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection.Metadata.ApplyUpdate.Test.LambdaCapturesThis", "tests\ApplyUpdate\System.Reflection.Metadata.ApplyUpdate.Test.LambdaCapturesThis\System.Reflection.Metadata.ApplyUpdate.Test.LambdaCapturesThis.csproj", "{D80CE4B6-896E-4243-B2BA-443E821AC8FF}" @@ -67,13 +71,21 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Loader.Test. EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Loader.Test.Assembly2", "tests\System.Runtime.Loader.Test.Assembly2\System.Runtime.Loader.Test.Assembly2.csproj", "{E60DD367-D1D7-4F6C-919B-DC68E8445E97}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Loader.Test.AssemblyNotSupported", "tests\System.Runtime.Loader.Test.AssemblyNotSupported\System.Runtime.Loader.Test.AssemblyNotSupported.csproj", "{9AD657ED-396B-4BE7-BCB6-BCA130825418}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Loader.Tests", "tests\System.Runtime.Loader.Tests.csproj", "{29E02AA9-E3D5-400C-B2C5-970B6E6D8562}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{06E15C97-C87D-473E-9E44-DCE169B1CE4E}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{6963C709-FD2F-45A7-9A9D-431B1E9A4796}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{56597012-9BD9-4167-8DF3-539119192932}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{29B354FC-0F90-4D2D-9104-3A7966D53C08}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{39FDFD33-675E-424E-A7B9-7CF5FF0D6A00}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{7A3AEC4B-94F4-4E52-983A-ADFF20A84EEF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{E17CFEB5-16A1-4AC3-99AF-EA6728B41E71}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{6C305566-89A5-422C-8C99-5329E4D63CB0}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{F36F0790-5CF7-4CAD-B903-4A3EE0DC1345}" EndProject @@ -81,6 +93,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{153EEF5A-58C EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{C75ECE17-3CF5-409D-B26F-E2F5053DD5B9}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{6963C709-FD2F-45A7-9A9D-431B1E9A4796}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{CE02FBA2-6B23-42AB-AB33-7FD47B1C9B57}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{D6103051-0541-4BA6-A966-C1E090F6099E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{589D96BF-47A1-41B9-96B8-D273BC877068}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{034612B2-91C8-4334-8F13-7AB773150F72}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -487,6 +509,48 @@ Global {3E342557-A99F-4A52-826E-6854A1D8D65C}.Checked|arm64.ActiveCfg = Debug|Any CPU {3E342557-A99F-4A52-826E-6854A1D8D65C}.Checked|x64.ActiveCfg = Debug|Any CPU {3E342557-A99F-4A52-826E-6854A1D8D65C}.Checked|x86.ActiveCfg = Debug|Any CPU + {32B30EA9-CD06-4069-BA31-05EA4A260EF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {32B30EA9-CD06-4069-BA31-05EA4A260EF5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {32B30EA9-CD06-4069-BA31-05EA4A260EF5}.Debug|arm.ActiveCfg = Debug|Any CPU + {32B30EA9-CD06-4069-BA31-05EA4A260EF5}.Debug|arm64.ActiveCfg = Debug|Any CPU + {32B30EA9-CD06-4069-BA31-05EA4A260EF5}.Debug|x64.ActiveCfg = Debug|Any CPU + {32B30EA9-CD06-4069-BA31-05EA4A260EF5}.Debug|x64.Build.0 = Debug|Any CPU + {32B30EA9-CD06-4069-BA31-05EA4A260EF5}.Debug|x86.ActiveCfg = Debug|Any CPU + {32B30EA9-CD06-4069-BA31-05EA4A260EF5}.Debug|x86.Build.0 = Debug|Any CPU + {32B30EA9-CD06-4069-BA31-05EA4A260EF5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {32B30EA9-CD06-4069-BA31-05EA4A260EF5}.Release|Any CPU.Build.0 = Release|Any CPU + {32B30EA9-CD06-4069-BA31-05EA4A260EF5}.Release|arm.ActiveCfg = Release|Any CPU + {32B30EA9-CD06-4069-BA31-05EA4A260EF5}.Release|arm64.ActiveCfg = Release|Any CPU + {32B30EA9-CD06-4069-BA31-05EA4A260EF5}.Release|x64.ActiveCfg = Release|Any CPU + {32B30EA9-CD06-4069-BA31-05EA4A260EF5}.Release|x64.Build.0 = Release|Any CPU + {32B30EA9-CD06-4069-BA31-05EA4A260EF5}.Release|x86.ActiveCfg = Release|Any CPU + {32B30EA9-CD06-4069-BA31-05EA4A260EF5}.Release|x86.Build.0 = Release|Any CPU + {32B30EA9-CD06-4069-BA31-05EA4A260EF5}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {32B30EA9-CD06-4069-BA31-05EA4A260EF5}.Checked|arm.ActiveCfg = Debug|Any CPU + {32B30EA9-CD06-4069-BA31-05EA4A260EF5}.Checked|arm64.ActiveCfg = Debug|Any CPU + {32B30EA9-CD06-4069-BA31-05EA4A260EF5}.Checked|x64.ActiveCfg = Debug|Any CPU + {32B30EA9-CD06-4069-BA31-05EA4A260EF5}.Checked|x86.ActiveCfg = Debug|Any CPU + {35692A86-DE04-41CA-9FCE-D129E0E04993}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {35692A86-DE04-41CA-9FCE-D129E0E04993}.Debug|Any CPU.Build.0 = Debug|Any CPU + {35692A86-DE04-41CA-9FCE-D129E0E04993}.Debug|arm.ActiveCfg = Debug|Any CPU + {35692A86-DE04-41CA-9FCE-D129E0E04993}.Debug|arm64.ActiveCfg = Debug|Any CPU + {35692A86-DE04-41CA-9FCE-D129E0E04993}.Debug|x64.ActiveCfg = Debug|Any CPU + {35692A86-DE04-41CA-9FCE-D129E0E04993}.Debug|x64.Build.0 = Debug|Any CPU + {35692A86-DE04-41CA-9FCE-D129E0E04993}.Debug|x86.ActiveCfg = Debug|Any CPU + {35692A86-DE04-41CA-9FCE-D129E0E04993}.Debug|x86.Build.0 = Debug|Any CPU + {35692A86-DE04-41CA-9FCE-D129E0E04993}.Release|Any CPU.ActiveCfg = Release|Any CPU + {35692A86-DE04-41CA-9FCE-D129E0E04993}.Release|Any CPU.Build.0 = Release|Any CPU + {35692A86-DE04-41CA-9FCE-D129E0E04993}.Release|arm.ActiveCfg = Release|Any CPU + {35692A86-DE04-41CA-9FCE-D129E0E04993}.Release|arm64.ActiveCfg = Release|Any CPU + {35692A86-DE04-41CA-9FCE-D129E0E04993}.Release|x64.ActiveCfg = Release|Any CPU + {35692A86-DE04-41CA-9FCE-D129E0E04993}.Release|x64.Build.0 = Release|Any CPU + {35692A86-DE04-41CA-9FCE-D129E0E04993}.Release|x86.ActiveCfg = Release|Any CPU + {35692A86-DE04-41CA-9FCE-D129E0E04993}.Release|x86.Build.0 = Release|Any CPU + {35692A86-DE04-41CA-9FCE-D129E0E04993}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {35692A86-DE04-41CA-9FCE-D129E0E04993}.Checked|arm.ActiveCfg = Debug|Any CPU + {35692A86-DE04-41CA-9FCE-D129E0E04993}.Checked|arm64.ActiveCfg = Debug|Any CPU + {35692A86-DE04-41CA-9FCE-D129E0E04993}.Checked|x64.ActiveCfg = Debug|Any CPU + {35692A86-DE04-41CA-9FCE-D129E0E04993}.Checked|x86.ActiveCfg = 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|arm.ActiveCfg = Debug|Any CPU @@ -823,27 +887,6 @@ Global {E60DD367-D1D7-4F6C-919B-DC68E8445E97}.Checked|arm64.ActiveCfg = Debug|Any CPU {E60DD367-D1D7-4F6C-919B-DC68E8445E97}.Checked|x64.ActiveCfg = Debug|Any CPU {E60DD367-D1D7-4F6C-919B-DC68E8445E97}.Checked|x86.ActiveCfg = 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|arm.ActiveCfg = Debug|Any CPU - {9AD657ED-396B-4BE7-BCB6-BCA130825418}.Debug|arm64.ActiveCfg = Debug|Any CPU - {9AD657ED-396B-4BE7-BCB6-BCA130825418}.Debug|x64.ActiveCfg = Debug|Any CPU - {9AD657ED-396B-4BE7-BCB6-BCA130825418}.Debug|x64.Build.0 = Debug|Any CPU - {9AD657ED-396B-4BE7-BCB6-BCA130825418}.Debug|x86.ActiveCfg = Debug|Any CPU - {9AD657ED-396B-4BE7-BCB6-BCA130825418}.Debug|x86.Build.0 = Debug|Any CPU - {9AD657ED-396B-4BE7-BCB6-BCA130825418}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9AD657ED-396B-4BE7-BCB6-BCA130825418}.Release|Any CPU.Build.0 = Release|Any CPU - {9AD657ED-396B-4BE7-BCB6-BCA130825418}.Release|arm.ActiveCfg = Release|Any CPU - {9AD657ED-396B-4BE7-BCB6-BCA130825418}.Release|arm64.ActiveCfg = Release|Any CPU - {9AD657ED-396B-4BE7-BCB6-BCA130825418}.Release|x64.ActiveCfg = Release|Any CPU - {9AD657ED-396B-4BE7-BCB6-BCA130825418}.Release|x64.Build.0 = Release|Any CPU - {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|arm.ActiveCfg = Debug|Any CPU - {9AD657ED-396B-4BE7-BCB6-BCA130825418}.Checked|arm64.ActiveCfg = Debug|Any CPU - {9AD657ED-396B-4BE7-BCB6-BCA130825418}.Checked|x64.ActiveCfg = Debug|Any CPU - {9AD657ED-396B-4BE7-BCB6-BCA130825418}.Checked|x86.ActiveCfg = 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|arm.ActiveCfg = Debug|Any CPU @@ -886,13 +929,117 @@ Global {06E15C97-C87D-473E-9E44-DCE169B1CE4E}.Checked|arm64.ActiveCfg = Debug|Any CPU {06E15C97-C87D-473E-9E44-DCE169B1CE4E}.Checked|x64.ActiveCfg = Debug|Any CPU {06E15C97-C87D-473E-9E44-DCE169B1CE4E}.Checked|x86.ActiveCfg = Debug|Any CPU + {56597012-9BD9-4167-8DF3-539119192932}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {56597012-9BD9-4167-8DF3-539119192932}.Debug|Any CPU.Build.0 = Debug|Any CPU + {56597012-9BD9-4167-8DF3-539119192932}.Debug|arm.ActiveCfg = Debug|Any CPU + {56597012-9BD9-4167-8DF3-539119192932}.Debug|arm64.ActiveCfg = Debug|Any CPU + {56597012-9BD9-4167-8DF3-539119192932}.Debug|x64.ActiveCfg = Debug|Any CPU + {56597012-9BD9-4167-8DF3-539119192932}.Debug|x64.Build.0 = Debug|Any CPU + {56597012-9BD9-4167-8DF3-539119192932}.Debug|x86.ActiveCfg = Debug|Any CPU + {56597012-9BD9-4167-8DF3-539119192932}.Debug|x86.Build.0 = Debug|Any CPU + {56597012-9BD9-4167-8DF3-539119192932}.Release|Any CPU.ActiveCfg = Release|Any CPU + {56597012-9BD9-4167-8DF3-539119192932}.Release|Any CPU.Build.0 = Release|Any CPU + {56597012-9BD9-4167-8DF3-539119192932}.Release|arm.ActiveCfg = Release|Any CPU + {56597012-9BD9-4167-8DF3-539119192932}.Release|arm64.ActiveCfg = Release|Any CPU + {56597012-9BD9-4167-8DF3-539119192932}.Release|x64.ActiveCfg = Release|Any CPU + {56597012-9BD9-4167-8DF3-539119192932}.Release|x64.Build.0 = Release|Any CPU + {56597012-9BD9-4167-8DF3-539119192932}.Release|x86.ActiveCfg = Release|Any CPU + {56597012-9BD9-4167-8DF3-539119192932}.Release|x86.Build.0 = Release|Any CPU + {56597012-9BD9-4167-8DF3-539119192932}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {56597012-9BD9-4167-8DF3-539119192932}.Checked|arm.ActiveCfg = Debug|Any CPU + {56597012-9BD9-4167-8DF3-539119192932}.Checked|arm64.ActiveCfg = Debug|Any CPU + {56597012-9BD9-4167-8DF3-539119192932}.Checked|x64.ActiveCfg = Debug|Any CPU + {56597012-9BD9-4167-8DF3-539119192932}.Checked|x86.ActiveCfg = Debug|Any CPU + {29B354FC-0F90-4D2D-9104-3A7966D53C08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {29B354FC-0F90-4D2D-9104-3A7966D53C08}.Debug|Any CPU.Build.0 = Debug|Any CPU + {29B354FC-0F90-4D2D-9104-3A7966D53C08}.Debug|arm.ActiveCfg = Debug|Any CPU + {29B354FC-0F90-4D2D-9104-3A7966D53C08}.Debug|arm64.ActiveCfg = Debug|Any CPU + {29B354FC-0F90-4D2D-9104-3A7966D53C08}.Debug|x64.ActiveCfg = Debug|Any CPU + {29B354FC-0F90-4D2D-9104-3A7966D53C08}.Debug|x64.Build.0 = Debug|Any CPU + {29B354FC-0F90-4D2D-9104-3A7966D53C08}.Debug|x86.ActiveCfg = Debug|Any CPU + {29B354FC-0F90-4D2D-9104-3A7966D53C08}.Debug|x86.Build.0 = Debug|Any CPU + {29B354FC-0F90-4D2D-9104-3A7966D53C08}.Release|Any CPU.ActiveCfg = Release|Any CPU + {29B354FC-0F90-4D2D-9104-3A7966D53C08}.Release|Any CPU.Build.0 = Release|Any CPU + {29B354FC-0F90-4D2D-9104-3A7966D53C08}.Release|arm.ActiveCfg = Release|Any CPU + {29B354FC-0F90-4D2D-9104-3A7966D53C08}.Release|arm64.ActiveCfg = Release|Any CPU + {29B354FC-0F90-4D2D-9104-3A7966D53C08}.Release|x64.ActiveCfg = Release|Any CPU + {29B354FC-0F90-4D2D-9104-3A7966D53C08}.Release|x64.Build.0 = Release|Any CPU + {29B354FC-0F90-4D2D-9104-3A7966D53C08}.Release|x86.ActiveCfg = Release|Any CPU + {29B354FC-0F90-4D2D-9104-3A7966D53C08}.Release|x86.Build.0 = Release|Any CPU + {29B354FC-0F90-4D2D-9104-3A7966D53C08}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {29B354FC-0F90-4D2D-9104-3A7966D53C08}.Checked|arm.ActiveCfg = Debug|Any CPU + {29B354FC-0F90-4D2D-9104-3A7966D53C08}.Checked|arm64.ActiveCfg = Debug|Any CPU + {29B354FC-0F90-4D2D-9104-3A7966D53C08}.Checked|x64.ActiveCfg = Debug|Any CPU + {29B354FC-0F90-4D2D-9104-3A7966D53C08}.Checked|x86.ActiveCfg = Debug|Any CPU + {39FDFD33-675E-424E-A7B9-7CF5FF0D6A00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {39FDFD33-675E-424E-A7B9-7CF5FF0D6A00}.Debug|Any CPU.Build.0 = Debug|Any CPU + {39FDFD33-675E-424E-A7B9-7CF5FF0D6A00}.Debug|arm.ActiveCfg = Debug|Any CPU + {39FDFD33-675E-424E-A7B9-7CF5FF0D6A00}.Debug|arm64.ActiveCfg = Debug|Any CPU + {39FDFD33-675E-424E-A7B9-7CF5FF0D6A00}.Debug|x64.ActiveCfg = Debug|Any CPU + {39FDFD33-675E-424E-A7B9-7CF5FF0D6A00}.Debug|x64.Build.0 = Debug|Any CPU + {39FDFD33-675E-424E-A7B9-7CF5FF0D6A00}.Debug|x86.ActiveCfg = Debug|Any CPU + {39FDFD33-675E-424E-A7B9-7CF5FF0D6A00}.Debug|x86.Build.0 = Debug|Any CPU + {39FDFD33-675E-424E-A7B9-7CF5FF0D6A00}.Release|Any CPU.ActiveCfg = Release|Any CPU + {39FDFD33-675E-424E-A7B9-7CF5FF0D6A00}.Release|Any CPU.Build.0 = Release|Any CPU + {39FDFD33-675E-424E-A7B9-7CF5FF0D6A00}.Release|arm.ActiveCfg = Release|Any CPU + {39FDFD33-675E-424E-A7B9-7CF5FF0D6A00}.Release|arm64.ActiveCfg = Release|Any CPU + {39FDFD33-675E-424E-A7B9-7CF5FF0D6A00}.Release|x64.ActiveCfg = Release|Any CPU + {39FDFD33-675E-424E-A7B9-7CF5FF0D6A00}.Release|x64.Build.0 = Release|Any CPU + {39FDFD33-675E-424E-A7B9-7CF5FF0D6A00}.Release|x86.ActiveCfg = Release|Any CPU + {39FDFD33-675E-424E-A7B9-7CF5FF0D6A00}.Release|x86.Build.0 = Release|Any CPU + {39FDFD33-675E-424E-A7B9-7CF5FF0D6A00}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {39FDFD33-675E-424E-A7B9-7CF5FF0D6A00}.Checked|arm.ActiveCfg = Debug|Any CPU + {39FDFD33-675E-424E-A7B9-7CF5FF0D6A00}.Checked|arm64.ActiveCfg = Debug|Any CPU + {39FDFD33-675E-424E-A7B9-7CF5FF0D6A00}.Checked|x64.ActiveCfg = Debug|Any CPU + {39FDFD33-675E-424E-A7B9-7CF5FF0D6A00}.Checked|x86.ActiveCfg = Debug|Any CPU + {7A3AEC4B-94F4-4E52-983A-ADFF20A84EEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7A3AEC4B-94F4-4E52-983A-ADFF20A84EEF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7A3AEC4B-94F4-4E52-983A-ADFF20A84EEF}.Debug|arm.ActiveCfg = Debug|Any CPU + {7A3AEC4B-94F4-4E52-983A-ADFF20A84EEF}.Debug|arm64.ActiveCfg = Debug|Any CPU + {7A3AEC4B-94F4-4E52-983A-ADFF20A84EEF}.Debug|x64.ActiveCfg = Debug|Any CPU + {7A3AEC4B-94F4-4E52-983A-ADFF20A84EEF}.Debug|x64.Build.0 = Debug|Any CPU + {7A3AEC4B-94F4-4E52-983A-ADFF20A84EEF}.Debug|x86.ActiveCfg = Debug|Any CPU + {7A3AEC4B-94F4-4E52-983A-ADFF20A84EEF}.Debug|x86.Build.0 = Debug|Any CPU + {7A3AEC4B-94F4-4E52-983A-ADFF20A84EEF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7A3AEC4B-94F4-4E52-983A-ADFF20A84EEF}.Release|Any CPU.Build.0 = Release|Any CPU + {7A3AEC4B-94F4-4E52-983A-ADFF20A84EEF}.Release|arm.ActiveCfg = Release|Any CPU + {7A3AEC4B-94F4-4E52-983A-ADFF20A84EEF}.Release|arm64.ActiveCfg = Release|Any CPU + {7A3AEC4B-94F4-4E52-983A-ADFF20A84EEF}.Release|x64.ActiveCfg = Release|Any CPU + {7A3AEC4B-94F4-4E52-983A-ADFF20A84EEF}.Release|x64.Build.0 = Release|Any CPU + {7A3AEC4B-94F4-4E52-983A-ADFF20A84EEF}.Release|x86.ActiveCfg = Release|Any CPU + {7A3AEC4B-94F4-4E52-983A-ADFF20A84EEF}.Release|x86.Build.0 = Release|Any CPU + {7A3AEC4B-94F4-4E52-983A-ADFF20A84EEF}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {7A3AEC4B-94F4-4E52-983A-ADFF20A84EEF}.Checked|arm.ActiveCfg = Debug|Any CPU + {7A3AEC4B-94F4-4E52-983A-ADFF20A84EEF}.Checked|arm64.ActiveCfg = Debug|Any CPU + {7A3AEC4B-94F4-4E52-983A-ADFF20A84EEF}.Checked|x64.ActiveCfg = Debug|Any CPU + {7A3AEC4B-94F4-4E52-983A-ADFF20A84EEF}.Checked|x86.ActiveCfg = Debug|Any CPU + {E17CFEB5-16A1-4AC3-99AF-EA6728B41E71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E17CFEB5-16A1-4AC3-99AF-EA6728B41E71}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E17CFEB5-16A1-4AC3-99AF-EA6728B41E71}.Debug|arm.ActiveCfg = Debug|Any CPU + {E17CFEB5-16A1-4AC3-99AF-EA6728B41E71}.Debug|arm64.ActiveCfg = Debug|Any CPU + {E17CFEB5-16A1-4AC3-99AF-EA6728B41E71}.Debug|x64.ActiveCfg = Debug|Any CPU + {E17CFEB5-16A1-4AC3-99AF-EA6728B41E71}.Debug|x64.Build.0 = Debug|Any CPU + {E17CFEB5-16A1-4AC3-99AF-EA6728B41E71}.Debug|x86.ActiveCfg = Debug|Any CPU + {E17CFEB5-16A1-4AC3-99AF-EA6728B41E71}.Debug|x86.Build.0 = Debug|Any CPU + {E17CFEB5-16A1-4AC3-99AF-EA6728B41E71}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E17CFEB5-16A1-4AC3-99AF-EA6728B41E71}.Release|Any CPU.Build.0 = Release|Any CPU + {E17CFEB5-16A1-4AC3-99AF-EA6728B41E71}.Release|arm.ActiveCfg = Release|Any CPU + {E17CFEB5-16A1-4AC3-99AF-EA6728B41E71}.Release|arm64.ActiveCfg = Release|Any CPU + {E17CFEB5-16A1-4AC3-99AF-EA6728B41E71}.Release|x64.ActiveCfg = Release|Any CPU + {E17CFEB5-16A1-4AC3-99AF-EA6728B41E71}.Release|x64.Build.0 = Release|Any CPU + {E17CFEB5-16A1-4AC3-99AF-EA6728B41E71}.Release|x86.ActiveCfg = Release|Any CPU + {E17CFEB5-16A1-4AC3-99AF-EA6728B41E71}.Release|x86.Build.0 = Release|Any CPU + {E17CFEB5-16A1-4AC3-99AF-EA6728B41E71}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {E17CFEB5-16A1-4AC3-99AF-EA6728B41E71}.Checked|arm.ActiveCfg = Debug|Any CPU + {E17CFEB5-16A1-4AC3-99AF-EA6728B41E71}.Checked|arm64.ActiveCfg = Debug|Any CPU + {E17CFEB5-16A1-4AC3-99AF-EA6728B41E71}.Checked|x64.ActiveCfg = Debug|Any CPU + {E17CFEB5-16A1-4AC3-99AF-EA6728B41E71}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {64DDD2AF-BF90-4DD8-AC24-D2084DB8D558} = {6963C709-FD2F-45A7-9A9D-431B1E9A4796} - {B8F22D73-B183-4F17-9D5E-04B80699E56A} = {6963C709-FD2F-45A7-9A9D-431B1E9A4796} + {64DDD2AF-BF90-4DD8-AC24-D2084DB8D558} = {6C305566-89A5-422C-8C99-5329E4D63CB0} {D6D16FFD-FD76-4700-B456-1DC4D093D1B5} = {F36F0790-5CF7-4CAD-B903-4A3EE0DC1345} {C9E75518-3DA7-4831-97D5-DCC2E8E99D34} = {F36F0790-5CF7-4CAD-B903-4A3EE0DC1345} {C0B73BCE-3D60-4737-B958-C4AA39C7056A} = {F36F0790-5CF7-4CAD-B903-4A3EE0DC1345} @@ -904,6 +1051,8 @@ Global {EEAE2A15-E2AE-4421-8D30-AAB17AC805F8} = {F36F0790-5CF7-4CAD-B903-4A3EE0DC1345} {78C4F407-C2E0-46BA-A4A0-EE04D89A2EB5} = {F36F0790-5CF7-4CAD-B903-4A3EE0DC1345} {3E342557-A99F-4A52-826E-6854A1D8D65C} = {F36F0790-5CF7-4CAD-B903-4A3EE0DC1345} + {32B30EA9-CD06-4069-BA31-05EA4A260EF5} = {F36F0790-5CF7-4CAD-B903-4A3EE0DC1345} + {35692A86-DE04-41CA-9FCE-D129E0E04993} = {F36F0790-5CF7-4CAD-B903-4A3EE0DC1345} {9D747A8D-A9DE-4470-9CF6-F73DF60FC5F6} = {F36F0790-5CF7-4CAD-B903-4A3EE0DC1345} {D80CE4B6-896E-4243-B2BA-443E821AC8FF} = {F36F0790-5CF7-4CAD-B903-4A3EE0DC1345} {71B8CD61-839D-445C-8E7D-F0F67CE00527} = {F36F0790-5CF7-4CAD-B903-4A3EE0DC1345} @@ -920,7 +1069,6 @@ Global {44B22827-B9F0-4ADC-969C-7EC647D0B82A} = {F36F0790-5CF7-4CAD-B903-4A3EE0DC1345} {49B0A873-5834-45A4-9495-E1063005CB82} = {F36F0790-5CF7-4CAD-B903-4A3EE0DC1345} {E60DD367-D1D7-4F6C-919B-DC68E8445E97} = {F36F0790-5CF7-4CAD-B903-4A3EE0DC1345} - {9AD657ED-396B-4BE7-BCB6-BCA130825418} = {F36F0790-5CF7-4CAD-B903-4A3EE0DC1345} {29E02AA9-E3D5-400C-B2C5-970B6E6D8562} = {F36F0790-5CF7-4CAD-B903-4A3EE0DC1345} {BFED65C3-5AF6-4C81-8AE8-7CAC7E4867AE} = {153EEF5A-58CF-4A61-B712-B14F270BD32E} {47FCBB78-4009-4B88-BC18-9DBCD4714152} = {153EEF5A-58CF-4A61-B712-B14F270BD32E} @@ -928,6 +1076,15 @@ Global {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} + {B8F22D73-B183-4F17-9D5E-04B80699E56A} = {6963C709-FD2F-45A7-9A9D-431B1E9A4796} + {56597012-9BD9-4167-8DF3-539119192932} = {CE02FBA2-6B23-42AB-AB33-7FD47B1C9B57} + {29B354FC-0F90-4D2D-9104-3A7966D53C08} = {CE02FBA2-6B23-42AB-AB33-7FD47B1C9B57} + {CE02FBA2-6B23-42AB-AB33-7FD47B1C9B57} = {034612B2-91C8-4334-8F13-7AB773150F72} + {39FDFD33-675E-424E-A7B9-7CF5FF0D6A00} = {D6103051-0541-4BA6-A966-C1E090F6099E} + {7A3AEC4B-94F4-4E52-983A-ADFF20A84EEF} = {D6103051-0541-4BA6-A966-C1E090F6099E} + {D6103051-0541-4BA6-A966-C1E090F6099E} = {034612B2-91C8-4334-8F13-7AB773150F72} + {E17CFEB5-16A1-4AC3-99AF-EA6728B41E71} = {589D96BF-47A1-41B9-96B8-D273BC877068} + {589D96BF-47A1-41B9-96B8-D273BC877068} = {034612B2-91C8-4334-8F13-7AB773150F72} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {73D0667D-A181-41CA-B57B-DD177166E019} diff --git a/src/libraries/System.Runtime.Loader/tests/AssemblyLoadContextTest.cs b/src/libraries/System.Runtime.Loader/tests/AssemblyLoadContextTest.cs index 43f3a0726de3be..1e87730a2c573d 100644 --- a/src/libraries/System.Runtime.Loader/tests/AssemblyLoadContextTest.cs +++ b/src/libraries/System.Runtime.Loader/tests/AssemblyLoadContextTest.cs @@ -15,7 +15,6 @@ public partial class AssemblyLoadContextTest { private const string TestAssembly = "System.Runtime.Loader.Test.Assembly"; private const string TestAssembly2 = "System.Runtime.Loader.Test.Assembly2"; - private const string TestAssemblyNotSupported = "System.Runtime.Loader.Test.AssemblyNotSupported"; [Fact] public static void GetAssemblyNameTest_ValidAssembly() diff --git a/src/libraries/System.Runtime.Loader/tests/CollectibleAssemblyLoadContextTest.cs b/src/libraries/System.Runtime.Loader/tests/CollectibleAssemblyLoadContextTest.cs index 90527c3d0be9de..f357ba72fd7280 100644 --- a/src/libraries/System.Runtime.Loader/tests/CollectibleAssemblyLoadContextTest.cs +++ b/src/libraries/System.Runtime.Loader/tests/CollectibleAssemblyLoadContextTest.cs @@ -16,12 +16,16 @@ public partial class AssemblyLoadContextTest // Tests related to Collectible assemblies [MethodImpl(MethodImplOptions.NoInlining)] - static void CreateAndLoadContext(CollectibleChecker checker) + static void CreateAndLoadContext(CollectibleChecker checker, bool unloadTwice = false) { var alc = new ResourceAssemblyLoadContext(true); checker.SetAssemblyLoadContext(0, alc); alc.Unload(); + if (unloadTwice) + { + alc.Unload(); + } // Check that any attempt to load an assembly after an explicit Unload will fail Assert.Throws(() => alc.LoadFromAssemblyPath(Path.GetFullPath("none.dll"))); @@ -39,6 +43,19 @@ public static void Unload_CollectibleWithNoAssemblyLoaded() checker.GcAndCheck(); } + [Fact] + [ActiveIssue("https://github.com/mono/mono/issues/15142", TestRuntimes.Mono)] + public static void DoubleUnload_CollectibleWithNoAssemblyLoaded() + { + // Use a collectible ALC + Unload + // Check that we receive the Unloading event + + var checker = new CollectibleChecker(1); + CreateAndLoadContext(checker, unloadTwice: true); + checker.GcAndCheck(); + } + + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsPreciseGcSupported))] public static void Finalizer_CollectibleWithNoAssemblyLoaded() { @@ -436,24 +453,6 @@ public static void Unload_TwoCollectibleWithOneAssemblyAndOneInstanceReferencing test.CheckContextUnloaded1(); } - [Fact] - [ActiveIssue("https://github.com/mono/mono/issues/15142", TestRuntimes.Mono)] - public static void Unsupported_FixedAddressValueType() - { - var asmName = new AssemblyName(TestAssemblyNotSupported); - var alc = new ResourceAssemblyLoadContext(true) { LoadBy = LoadBy.Path }; - Assembly asm = alc.LoadFromAssemblyName(asmName); - - Assert.NotNull(asm); - - ReflectionTypeLoadException exception = Assert.Throws(() => asm.DefinedTypes); - - // Expecting two exceptions: - // Collectible type 'System.Runtime.Loader.Tests.TestClassNotSupported_FixedAddressValueType' has unsupported FixedAddressValueTypeAttribute applied to a field - Assert.Equal(1, exception.LoaderExceptions.Length); - Assert.True(exception.LoaderExceptions.All(exp => exp is TypeLoadException)); - } - private class CollectibleChecker { private readonly int _expectedCount; diff --git a/src/libraries/System.Runtime.Loader/tests/System.Runtime.Loader.Test.AssemblyNotSupported/System.Runtime.Loader.Test.AssemblyNotSupported.csproj b/src/libraries/System.Runtime.Loader/tests/System.Runtime.Loader.Test.AssemblyNotSupported/System.Runtime.Loader.Test.AssemblyNotSupported.csproj deleted file mode 100644 index 6dd226e3ce2aac..00000000000000 --- a/src/libraries/System.Runtime.Loader/tests/System.Runtime.Loader.Test.AssemblyNotSupported/System.Runtime.Loader.Test.AssemblyNotSupported.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - $(NetCoreAppCurrent);netstandard2.0 - - - - - \ No newline at end of file diff --git a/src/libraries/System.Runtime.Loader/tests/System.Runtime.Loader.Test.AssemblyNotSupported/TestClassNotSupported.cs b/src/libraries/System.Runtime.Loader/tests/System.Runtime.Loader.Test.AssemblyNotSupported/TestClassNotSupported.cs deleted file mode 100644 index db224a0dabfdcc..00000000000000 --- a/src/libraries/System.Runtime.Loader/tests/System.Runtime.Loader.Test.AssemblyNotSupported/TestClassNotSupported.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. -using System.Runtime.InteropServices; -using System.Runtime.CompilerServices; - -namespace System.Runtime.Loader.Tests -{ - public class TestClassNotSupported_FixedAddressValueType - { - public struct S - { - public T Value; - } - - [FixedAddressValueType] - public static S FixedInt; - } -} diff --git a/src/libraries/System.Runtime.Loader/tests/System.Runtime.Loader.Tests.csproj b/src/libraries/System.Runtime.Loader/tests/System.Runtime.Loader.Tests.csproj index 293105e20d4345..c0820d7fb179dd 100644 --- a/src/libraries/System.Runtime.Loader/tests/System.Runtime.Loader.Tests.csproj +++ b/src/libraries/System.Runtime.Loader/tests/System.Runtime.Loader.Tests.csproj @@ -37,7 +37,6 @@ - diff --git a/src/libraries/System.Runtime.Numerics/System.Runtime.Numerics.sln b/src/libraries/System.Runtime.Numerics/System.Runtime.Numerics.sln index 5da865b1d49b3b..b4c59026fc90a2 100644 --- a/src/libraries/System.Runtime.Numerics/System.Runtime.Numerics.sln +++ b/src/libraries/System.Runtime.Numerics/System.Runtime.Numerics.sln @@ -13,6 +13,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Numerics.Tes EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{DB1922E9-EC35-44AC-9677-277B7D00595F}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{E51A43E1-C483-49BD-A16A-F6594C0FD8BA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{334A6BCF-AE0E-410F-BA09-9A26FEB98E23}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{C8C2AACC-6E96-4EF2-9F2C-D58FF3669F0A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{523AB0A0-A918-4653-B124-B035208ABC43}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{0E7B282F-C829-4069-BC63-71273B776283}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{A80D3604-A8C8-4B23-B0D3-316E46CFE60A}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{94F2DDDF-A2DA-4F69-9613-A92D50D84A1C}" @@ -21,6 +31,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{18C5FB7C-2DE EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{F6066198-D324-499F-BEB7-55DF39460AB4}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{A5E64CFC-B98F-4DA2-AA85-1D97F7284D6D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{04438AE1-0622-48D2-9A83-E65949565E79}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{635DD8C9-244A-4455-AA95-DAE36374BE6D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{9AC979A9-D36E-4855-9F86-D7C5886B1743}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -55,6 +73,26 @@ Global {DB1922E9-EC35-44AC-9677-277B7D00595F}.Debug|Any CPU.Build.0 = Debug|Any CPU {DB1922E9-EC35-44AC-9677-277B7D00595F}.Release|Any CPU.ActiveCfg = Release|Any CPU {DB1922E9-EC35-44AC-9677-277B7D00595F}.Release|Any CPU.Build.0 = Release|Any CPU + {E51A43E1-C483-49BD-A16A-F6594C0FD8BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E51A43E1-C483-49BD-A16A-F6594C0FD8BA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E51A43E1-C483-49BD-A16A-F6594C0FD8BA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E51A43E1-C483-49BD-A16A-F6594C0FD8BA}.Release|Any CPU.Build.0 = Release|Any CPU + {334A6BCF-AE0E-410F-BA09-9A26FEB98E23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {334A6BCF-AE0E-410F-BA09-9A26FEB98E23}.Debug|Any CPU.Build.0 = Debug|Any CPU + {334A6BCF-AE0E-410F-BA09-9A26FEB98E23}.Release|Any CPU.ActiveCfg = Release|Any CPU + {334A6BCF-AE0E-410F-BA09-9A26FEB98E23}.Release|Any CPU.Build.0 = Release|Any CPU + {C8C2AACC-6E96-4EF2-9F2C-D58FF3669F0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C8C2AACC-6E96-4EF2-9F2C-D58FF3669F0A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C8C2AACC-6E96-4EF2-9F2C-D58FF3669F0A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C8C2AACC-6E96-4EF2-9F2C-D58FF3669F0A}.Release|Any CPU.Build.0 = Release|Any CPU + {523AB0A0-A918-4653-B124-B035208ABC43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {523AB0A0-A918-4653-B124-B035208ABC43}.Debug|Any CPU.Build.0 = Debug|Any CPU + {523AB0A0-A918-4653-B124-B035208ABC43}.Release|Any CPU.ActiveCfg = Release|Any CPU + {523AB0A0-A918-4653-B124-B035208ABC43}.Release|Any CPU.Build.0 = Release|Any CPU + {0E7B282F-C829-4069-BC63-71273B776283}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0E7B282F-C829-4069-BC63-71273B776283}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0E7B282F-C829-4069-BC63-71273B776283}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0E7B282F-C829-4069-BC63-71273B776283}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -67,6 +105,14 @@ Global {C91AC3B4-647B-4D7F-83CA-BE90FFFC8CF3} = {18C5FB7C-2DE7-4BED-BA2B-53776E78E1E5} {DB1922E9-EC35-44AC-9677-277B7D00595F} = {18C5FB7C-2DE7-4BED-BA2B-53776E78E1E5} {91F8FBEF-C085-4542-BEE4-22449D80734A} = {F6066198-D324-499F-BEB7-55DF39460AB4} + {E51A43E1-C483-49BD-A16A-F6594C0FD8BA} = {A5E64CFC-B98F-4DA2-AA85-1D97F7284D6D} + {334A6BCF-AE0E-410F-BA09-9A26FEB98E23} = {A5E64CFC-B98F-4DA2-AA85-1D97F7284D6D} + {A5E64CFC-B98F-4DA2-AA85-1D97F7284D6D} = {9AC979A9-D36E-4855-9F86-D7C5886B1743} + {C8C2AACC-6E96-4EF2-9F2C-D58FF3669F0A} = {04438AE1-0622-48D2-9A83-E65949565E79} + {523AB0A0-A918-4653-B124-B035208ABC43} = {04438AE1-0622-48D2-9A83-E65949565E79} + {04438AE1-0622-48D2-9A83-E65949565E79} = {9AC979A9-D36E-4855-9F86-D7C5886B1743} + {0E7B282F-C829-4069-BC63-71273B776283} = {635DD8C9-244A-4455-AA95-DAE36374BE6D} + {635DD8C9-244A-4455-AA95-DAE36374BE6D} = {9AC979A9-D36E-4855-9F86-D7C5886B1743} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {B7C7E4C6-78B9-4AE7-AC8B-4F08EAD0DECB} diff --git a/src/libraries/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs b/src/libraries/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs index 5f4cf82f75a941..dfa0f109017b12 100644 --- a/src/libraries/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs +++ b/src/libraries/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs @@ -3150,8 +3150,8 @@ private void AssertValid() Debug.Assert(_bits.Length > 0); // Wasted space: _bits[0] could have been packed into _sign Debug.Assert(_bits.Length > 1 || _bits[0] >= kuMaskHighBit); - //// Wasted space: leading zeros could have been truncated // TODO: https://github.com/dotnet/runtime/issues/84991 - //Debug.Assert(_bits[_bits.Length - 1] != 0); + // Wasted space: leading zeros could have been truncated + Debug.Assert(_bits[_bits.Length - 1] != 0); // Arrays larger than this can't fit into a Span Debug.Assert(_bits.Length <= MaxLength); } 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 e5f125402fc518..5d7a0150f09e33 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 @@ -3,6 +3,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", ". EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{25F48B11-0D57-47B7-88EE-7D407AFBA7B6}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Drawing.Common", "..\shims\stubs\System.Drawing.Common.csproj", "{1388F142-B5C8-4AC7-ABEA-07391751511C}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.CodeDom", "..\System.CodeDom\ref\System.CodeDom.csproj", "{A1BEF14B-0C13-4854-8299-DADF0D1181D9}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.CodeDom", "..\System.CodeDom\src\System.CodeDom.csproj", "{FA9FDA97-57C2-421C-A578-EEB0B600A412}" @@ -99,8 +101,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encoding.CodePa EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encoding.CodePages", "..\System.Text.Encoding.CodePages\src\System.Text.Encoding.CodePages.csproj", "{7913F002-64DC-43C6-9D74-B0B9BA297F00}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.RegularExpressions.Generator", "..\System.Text.RegularExpressions\gen\System.Text.RegularExpressions.Generator.csproj", "{39F345C7-BA27-4540-9BCE-45E634DA6035}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.Channels", "..\System.Threading.Channels\ref\System.Threading.Channels.csproj", "{E72B45B0-D05E-4F86-86E4-45B65FBB6617}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.Channels", "..\System.Threading.Channels\src\System.Threading.Channels.csproj", "{B6953324-8866-4D94-B352-20EF38EA6774}" @@ -113,14 +113,34 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", "..\System.Windows.Extensions\src\System.Windows.Extensions.csproj", "{78994C91-3A4F-4825-86C2-21FB4F082CA7}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{38DE9ACA-E3C9-44BC-B7C3-A5BF363D85D7}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{0CA04347-D51A-4F7C-927C-FB45E2B266D8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{E118B30B-6805-477B-A402-3DBD66DD619E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{860E324D-4B26-4F48-B7AC-44EED82A8EA7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{E55AA18C-4B27-4C51-976E-0E7DE39F4AFB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{5149AC24-C1A7-4A4C-BE83-FF3037B99E4C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{092510BD-C3F8-4397-A2BC-149309C2B0D3}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{F8CB1B1F-F935-4ECE-B3C2-CF62B5654BF2}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{38DE9ACA-E3C9-44BC-B7C3-A5BF363D85D7}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{56502718-F82A-46E2-9AD0-532C437EC51E}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{A8ED4215-E7B8-4F14-B61D-F737E24C856A}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{D46042B1-7AEB-4642-8591-E6B3F2E0F1C4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{E8705420-F755-4CBA-970D-B745F59F9780}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{CDD72541-F0ED-41FA-9C9A-5D774CEB22E4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{21D78340-7F96-4519-983F-529077A11AE1}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -191,6 +211,27 @@ Global {25F48B11-0D57-47B7-88EE-7D407AFBA7B6}.Checked|arm64.ActiveCfg = Debug|Any CPU {25F48B11-0D57-47B7-88EE-7D407AFBA7B6}.Checked|x64.ActiveCfg = Debug|Any CPU {25F48B11-0D57-47B7-88EE-7D407AFBA7B6}.Checked|x86.ActiveCfg = Debug|Any CPU + {1388F142-B5C8-4AC7-ABEA-07391751511C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1388F142-B5C8-4AC7-ABEA-07391751511C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1388F142-B5C8-4AC7-ABEA-07391751511C}.Debug|arm.ActiveCfg = Debug|Any CPU + {1388F142-B5C8-4AC7-ABEA-07391751511C}.Debug|arm64.ActiveCfg = Debug|Any CPU + {1388F142-B5C8-4AC7-ABEA-07391751511C}.Debug|x64.ActiveCfg = Debug|Any CPU + {1388F142-B5C8-4AC7-ABEA-07391751511C}.Debug|x64.Build.0 = Debug|Any CPU + {1388F142-B5C8-4AC7-ABEA-07391751511C}.Debug|x86.ActiveCfg = Debug|Any CPU + {1388F142-B5C8-4AC7-ABEA-07391751511C}.Debug|x86.Build.0 = Debug|Any CPU + {1388F142-B5C8-4AC7-ABEA-07391751511C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1388F142-B5C8-4AC7-ABEA-07391751511C}.Release|Any CPU.Build.0 = Release|Any CPU + {1388F142-B5C8-4AC7-ABEA-07391751511C}.Release|arm.ActiveCfg = Release|Any CPU + {1388F142-B5C8-4AC7-ABEA-07391751511C}.Release|arm64.ActiveCfg = Release|Any CPU + {1388F142-B5C8-4AC7-ABEA-07391751511C}.Release|x64.ActiveCfg = Release|Any CPU + {1388F142-B5C8-4AC7-ABEA-07391751511C}.Release|x64.Build.0 = Release|Any CPU + {1388F142-B5C8-4AC7-ABEA-07391751511C}.Release|x86.ActiveCfg = Release|Any CPU + {1388F142-B5C8-4AC7-ABEA-07391751511C}.Release|x86.Build.0 = Release|Any CPU + {1388F142-B5C8-4AC7-ABEA-07391751511C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {1388F142-B5C8-4AC7-ABEA-07391751511C}.Checked|arm.ActiveCfg = Debug|Any CPU + {1388F142-B5C8-4AC7-ABEA-07391751511C}.Checked|arm64.ActiveCfg = Debug|Any CPU + {1388F142-B5C8-4AC7-ABEA-07391751511C}.Checked|x64.ActiveCfg = Debug|Any CPU + {1388F142-B5C8-4AC7-ABEA-07391751511C}.Checked|x86.ActiveCfg = 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|arm.ActiveCfg = Debug|Any CPU @@ -1199,27 +1240,6 @@ Global {7913F002-64DC-43C6-9D74-B0B9BA297F00}.Checked|arm64.ActiveCfg = Debug|Any CPU {7913F002-64DC-43C6-9D74-B0B9BA297F00}.Checked|x64.ActiveCfg = Debug|Any CPU {7913F002-64DC-43C6-9D74-B0B9BA297F00}.Checked|x86.ActiveCfg = Debug|Any CPU - {39F345C7-BA27-4540-9BCE-45E634DA6035}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {39F345C7-BA27-4540-9BCE-45E634DA6035}.Debug|Any CPU.Build.0 = Debug|Any CPU - {39F345C7-BA27-4540-9BCE-45E634DA6035}.Debug|arm.ActiveCfg = Debug|Any CPU - {39F345C7-BA27-4540-9BCE-45E634DA6035}.Debug|arm64.ActiveCfg = Debug|Any CPU - {39F345C7-BA27-4540-9BCE-45E634DA6035}.Debug|x64.ActiveCfg = Debug|Any CPU - {39F345C7-BA27-4540-9BCE-45E634DA6035}.Debug|x64.Build.0 = Debug|Any CPU - {39F345C7-BA27-4540-9BCE-45E634DA6035}.Debug|x86.ActiveCfg = Debug|Any CPU - {39F345C7-BA27-4540-9BCE-45E634DA6035}.Debug|x86.Build.0 = Debug|Any CPU - {39F345C7-BA27-4540-9BCE-45E634DA6035}.Release|Any CPU.ActiveCfg = Release|Any CPU - {39F345C7-BA27-4540-9BCE-45E634DA6035}.Release|Any CPU.Build.0 = Release|Any CPU - {39F345C7-BA27-4540-9BCE-45E634DA6035}.Release|arm.ActiveCfg = Release|Any CPU - {39F345C7-BA27-4540-9BCE-45E634DA6035}.Release|arm64.ActiveCfg = Release|Any CPU - {39F345C7-BA27-4540-9BCE-45E634DA6035}.Release|x64.ActiveCfg = Release|Any CPU - {39F345C7-BA27-4540-9BCE-45E634DA6035}.Release|x64.Build.0 = Release|Any CPU - {39F345C7-BA27-4540-9BCE-45E634DA6035}.Release|x86.ActiveCfg = Release|Any CPU - {39F345C7-BA27-4540-9BCE-45E634DA6035}.Release|x86.Build.0 = Release|Any CPU - {39F345C7-BA27-4540-9BCE-45E634DA6035}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {39F345C7-BA27-4540-9BCE-45E634DA6035}.Checked|arm.ActiveCfg = Debug|Any CPU - {39F345C7-BA27-4540-9BCE-45E634DA6035}.Checked|arm64.ActiveCfg = Debug|Any CPU - {39F345C7-BA27-4540-9BCE-45E634DA6035}.Checked|x64.ActiveCfg = Debug|Any CPU - {39F345C7-BA27-4540-9BCE-45E634DA6035}.Checked|x86.ActiveCfg = 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|arm.ActiveCfg = Debug|Any CPU @@ -1346,12 +1366,120 @@ Global {78994C91-3A4F-4825-86C2-21FB4F082CA7}.Checked|arm64.ActiveCfg = Debug|Any CPU {78994C91-3A4F-4825-86C2-21FB4F082CA7}.Checked|x64.ActiveCfg = Debug|Any CPU {78994C91-3A4F-4825-86C2-21FB4F082CA7}.Checked|x86.ActiveCfg = Debug|Any CPU + {0CA04347-D51A-4F7C-927C-FB45E2B266D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0CA04347-D51A-4F7C-927C-FB45E2B266D8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0CA04347-D51A-4F7C-927C-FB45E2B266D8}.Debug|arm.ActiveCfg = Debug|Any CPU + {0CA04347-D51A-4F7C-927C-FB45E2B266D8}.Debug|arm64.ActiveCfg = Debug|Any CPU + {0CA04347-D51A-4F7C-927C-FB45E2B266D8}.Debug|x64.ActiveCfg = Debug|Any CPU + {0CA04347-D51A-4F7C-927C-FB45E2B266D8}.Debug|x64.Build.0 = Debug|Any CPU + {0CA04347-D51A-4F7C-927C-FB45E2B266D8}.Debug|x86.ActiveCfg = Debug|Any CPU + {0CA04347-D51A-4F7C-927C-FB45E2B266D8}.Debug|x86.Build.0 = Debug|Any CPU + {0CA04347-D51A-4F7C-927C-FB45E2B266D8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0CA04347-D51A-4F7C-927C-FB45E2B266D8}.Release|Any CPU.Build.0 = Release|Any CPU + {0CA04347-D51A-4F7C-927C-FB45E2B266D8}.Release|arm.ActiveCfg = Release|Any CPU + {0CA04347-D51A-4F7C-927C-FB45E2B266D8}.Release|arm64.ActiveCfg = Release|Any CPU + {0CA04347-D51A-4F7C-927C-FB45E2B266D8}.Release|x64.ActiveCfg = Release|Any CPU + {0CA04347-D51A-4F7C-927C-FB45E2B266D8}.Release|x64.Build.0 = Release|Any CPU + {0CA04347-D51A-4F7C-927C-FB45E2B266D8}.Release|x86.ActiveCfg = Release|Any CPU + {0CA04347-D51A-4F7C-927C-FB45E2B266D8}.Release|x86.Build.0 = Release|Any CPU + {0CA04347-D51A-4F7C-927C-FB45E2B266D8}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {0CA04347-D51A-4F7C-927C-FB45E2B266D8}.Checked|arm.ActiveCfg = Debug|Any CPU + {0CA04347-D51A-4F7C-927C-FB45E2B266D8}.Checked|arm64.ActiveCfg = Debug|Any CPU + {0CA04347-D51A-4F7C-927C-FB45E2B266D8}.Checked|x64.ActiveCfg = Debug|Any CPU + {0CA04347-D51A-4F7C-927C-FB45E2B266D8}.Checked|x86.ActiveCfg = Debug|Any CPU + {E118B30B-6805-477B-A402-3DBD66DD619E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E118B30B-6805-477B-A402-3DBD66DD619E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E118B30B-6805-477B-A402-3DBD66DD619E}.Debug|arm.ActiveCfg = Debug|Any CPU + {E118B30B-6805-477B-A402-3DBD66DD619E}.Debug|arm64.ActiveCfg = Debug|Any CPU + {E118B30B-6805-477B-A402-3DBD66DD619E}.Debug|x64.ActiveCfg = Debug|Any CPU + {E118B30B-6805-477B-A402-3DBD66DD619E}.Debug|x64.Build.0 = Debug|Any CPU + {E118B30B-6805-477B-A402-3DBD66DD619E}.Debug|x86.ActiveCfg = Debug|Any CPU + {E118B30B-6805-477B-A402-3DBD66DD619E}.Debug|x86.Build.0 = Debug|Any CPU + {E118B30B-6805-477B-A402-3DBD66DD619E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E118B30B-6805-477B-A402-3DBD66DD619E}.Release|Any CPU.Build.0 = Release|Any CPU + {E118B30B-6805-477B-A402-3DBD66DD619E}.Release|arm.ActiveCfg = Release|Any CPU + {E118B30B-6805-477B-A402-3DBD66DD619E}.Release|arm64.ActiveCfg = Release|Any CPU + {E118B30B-6805-477B-A402-3DBD66DD619E}.Release|x64.ActiveCfg = Release|Any CPU + {E118B30B-6805-477B-A402-3DBD66DD619E}.Release|x64.Build.0 = Release|Any CPU + {E118B30B-6805-477B-A402-3DBD66DD619E}.Release|x86.ActiveCfg = Release|Any CPU + {E118B30B-6805-477B-A402-3DBD66DD619E}.Release|x86.Build.0 = Release|Any CPU + {E118B30B-6805-477B-A402-3DBD66DD619E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {E118B30B-6805-477B-A402-3DBD66DD619E}.Checked|arm.ActiveCfg = Debug|Any CPU + {E118B30B-6805-477B-A402-3DBD66DD619E}.Checked|arm64.ActiveCfg = Debug|Any CPU + {E118B30B-6805-477B-A402-3DBD66DD619E}.Checked|x64.ActiveCfg = Debug|Any CPU + {E118B30B-6805-477B-A402-3DBD66DD619E}.Checked|x86.ActiveCfg = Debug|Any CPU + {860E324D-4B26-4F48-B7AC-44EED82A8EA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {860E324D-4B26-4F48-B7AC-44EED82A8EA7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {860E324D-4B26-4F48-B7AC-44EED82A8EA7}.Debug|arm.ActiveCfg = Debug|Any CPU + {860E324D-4B26-4F48-B7AC-44EED82A8EA7}.Debug|arm64.ActiveCfg = Debug|Any CPU + {860E324D-4B26-4F48-B7AC-44EED82A8EA7}.Debug|x64.ActiveCfg = Debug|Any CPU + {860E324D-4B26-4F48-B7AC-44EED82A8EA7}.Debug|x64.Build.0 = Debug|Any CPU + {860E324D-4B26-4F48-B7AC-44EED82A8EA7}.Debug|x86.ActiveCfg = Debug|Any CPU + {860E324D-4B26-4F48-B7AC-44EED82A8EA7}.Debug|x86.Build.0 = Debug|Any CPU + {860E324D-4B26-4F48-B7AC-44EED82A8EA7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {860E324D-4B26-4F48-B7AC-44EED82A8EA7}.Release|Any CPU.Build.0 = Release|Any CPU + {860E324D-4B26-4F48-B7AC-44EED82A8EA7}.Release|arm.ActiveCfg = Release|Any CPU + {860E324D-4B26-4F48-B7AC-44EED82A8EA7}.Release|arm64.ActiveCfg = Release|Any CPU + {860E324D-4B26-4F48-B7AC-44EED82A8EA7}.Release|x64.ActiveCfg = Release|Any CPU + {860E324D-4B26-4F48-B7AC-44EED82A8EA7}.Release|x64.Build.0 = Release|Any CPU + {860E324D-4B26-4F48-B7AC-44EED82A8EA7}.Release|x86.ActiveCfg = Release|Any CPU + {860E324D-4B26-4F48-B7AC-44EED82A8EA7}.Release|x86.Build.0 = Release|Any CPU + {860E324D-4B26-4F48-B7AC-44EED82A8EA7}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {860E324D-4B26-4F48-B7AC-44EED82A8EA7}.Checked|arm.ActiveCfg = Debug|Any CPU + {860E324D-4B26-4F48-B7AC-44EED82A8EA7}.Checked|arm64.ActiveCfg = Debug|Any CPU + {860E324D-4B26-4F48-B7AC-44EED82A8EA7}.Checked|x64.ActiveCfg = Debug|Any CPU + {860E324D-4B26-4F48-B7AC-44EED82A8EA7}.Checked|x86.ActiveCfg = Debug|Any CPU + {E55AA18C-4B27-4C51-976E-0E7DE39F4AFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E55AA18C-4B27-4C51-976E-0E7DE39F4AFB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E55AA18C-4B27-4C51-976E-0E7DE39F4AFB}.Debug|arm.ActiveCfg = Debug|Any CPU + {E55AA18C-4B27-4C51-976E-0E7DE39F4AFB}.Debug|arm64.ActiveCfg = Debug|Any CPU + {E55AA18C-4B27-4C51-976E-0E7DE39F4AFB}.Debug|x64.ActiveCfg = Debug|Any CPU + {E55AA18C-4B27-4C51-976E-0E7DE39F4AFB}.Debug|x64.Build.0 = Debug|Any CPU + {E55AA18C-4B27-4C51-976E-0E7DE39F4AFB}.Debug|x86.ActiveCfg = Debug|Any CPU + {E55AA18C-4B27-4C51-976E-0E7DE39F4AFB}.Debug|x86.Build.0 = Debug|Any CPU + {E55AA18C-4B27-4C51-976E-0E7DE39F4AFB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E55AA18C-4B27-4C51-976E-0E7DE39F4AFB}.Release|Any CPU.Build.0 = Release|Any CPU + {E55AA18C-4B27-4C51-976E-0E7DE39F4AFB}.Release|arm.ActiveCfg = Release|Any CPU + {E55AA18C-4B27-4C51-976E-0E7DE39F4AFB}.Release|arm64.ActiveCfg = Release|Any CPU + {E55AA18C-4B27-4C51-976E-0E7DE39F4AFB}.Release|x64.ActiveCfg = Release|Any CPU + {E55AA18C-4B27-4C51-976E-0E7DE39F4AFB}.Release|x64.Build.0 = Release|Any CPU + {E55AA18C-4B27-4C51-976E-0E7DE39F4AFB}.Release|x86.ActiveCfg = Release|Any CPU + {E55AA18C-4B27-4C51-976E-0E7DE39F4AFB}.Release|x86.Build.0 = Release|Any CPU + {E55AA18C-4B27-4C51-976E-0E7DE39F4AFB}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {E55AA18C-4B27-4C51-976E-0E7DE39F4AFB}.Checked|arm.ActiveCfg = Debug|Any CPU + {E55AA18C-4B27-4C51-976E-0E7DE39F4AFB}.Checked|arm64.ActiveCfg = Debug|Any CPU + {E55AA18C-4B27-4C51-976E-0E7DE39F4AFB}.Checked|x64.ActiveCfg = Debug|Any CPU + {E55AA18C-4B27-4C51-976E-0E7DE39F4AFB}.Checked|x86.ActiveCfg = Debug|Any CPU + {5149AC24-C1A7-4A4C-BE83-FF3037B99E4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5149AC24-C1A7-4A4C-BE83-FF3037B99E4C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5149AC24-C1A7-4A4C-BE83-FF3037B99E4C}.Debug|arm.ActiveCfg = Debug|Any CPU + {5149AC24-C1A7-4A4C-BE83-FF3037B99E4C}.Debug|arm64.ActiveCfg = Debug|Any CPU + {5149AC24-C1A7-4A4C-BE83-FF3037B99E4C}.Debug|x64.ActiveCfg = Debug|Any CPU + {5149AC24-C1A7-4A4C-BE83-FF3037B99E4C}.Debug|x64.Build.0 = Debug|Any CPU + {5149AC24-C1A7-4A4C-BE83-FF3037B99E4C}.Debug|x86.ActiveCfg = Debug|Any CPU + {5149AC24-C1A7-4A4C-BE83-FF3037B99E4C}.Debug|x86.Build.0 = Debug|Any CPU + {5149AC24-C1A7-4A4C-BE83-FF3037B99E4C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5149AC24-C1A7-4A4C-BE83-FF3037B99E4C}.Release|Any CPU.Build.0 = Release|Any CPU + {5149AC24-C1A7-4A4C-BE83-FF3037B99E4C}.Release|arm.ActiveCfg = Release|Any CPU + {5149AC24-C1A7-4A4C-BE83-FF3037B99E4C}.Release|arm64.ActiveCfg = Release|Any CPU + {5149AC24-C1A7-4A4C-BE83-FF3037B99E4C}.Release|x64.ActiveCfg = Release|Any CPU + {5149AC24-C1A7-4A4C-BE83-FF3037B99E4C}.Release|x64.Build.0 = Release|Any CPU + {5149AC24-C1A7-4A4C-BE83-FF3037B99E4C}.Release|x86.ActiveCfg = Release|Any CPU + {5149AC24-C1A7-4A4C-BE83-FF3037B99E4C}.Release|x86.Build.0 = Release|Any CPU + {5149AC24-C1A7-4A4C-BE83-FF3037B99E4C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {5149AC24-C1A7-4A4C-BE83-FF3037B99E4C}.Checked|arm.ActiveCfg = Debug|Any CPU + {5149AC24-C1A7-4A4C-BE83-FF3037B99E4C}.Checked|arm64.ActiveCfg = Debug|Any CPU + {5149AC24-C1A7-4A4C-BE83-FF3037B99E4C}.Checked|x64.ActiveCfg = Debug|Any CPU + {5149AC24-C1A7-4A4C-BE83-FF3037B99E4C}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {096171D9-C978-4509-B9D3-B6DBCD78420D} = {38DE9ACA-E3C9-44BC-B7C3-A5BF363D85D7} + {096171D9-C978-4509-B9D3-B6DBCD78420D} = {092510BD-C3F8-4397-A2BC-149309C2B0D3} + {25F48B11-0D57-47B7-88EE-7D407AFBA7B6} = {F8CB1B1F-F935-4ECE-B3C2-CF62B5654BF2} + {3D4DD468-10FE-4606-BA10-F848447AF157} = {F8CB1B1F-F935-4ECE-B3C2-CF62B5654BF2} + {1388F142-B5C8-4AC7-ABEA-07391751511C} = {38DE9ACA-E3C9-44BC-B7C3-A5BF363D85D7} {FA9FDA97-57C2-421C-A578-EEB0B600A412} = {38DE9ACA-E3C9-44BC-B7C3-A5BF363D85D7} {82E81182-3C80-40A9-978A-4152461F4FE4} = {38DE9ACA-E3C9-44BC-B7C3-A5BF363D85D7} {81F58927-6022-4DD7-9E78-BDD3DA309285} = {38DE9ACA-E3C9-44BC-B7C3-A5BF363D85D7} @@ -1377,8 +1505,6 @@ Global {B6953324-8866-4D94-B352-20EF38EA6774} = {38DE9ACA-E3C9-44BC-B7C3-A5BF363D85D7} {0A103F2A-2FF6-4291-AB51-203E5CA00B2D} = {38DE9ACA-E3C9-44BC-B7C3-A5BF363D85D7} {78994C91-3A4F-4825-86C2-21FB4F082CA7} = {38DE9ACA-E3C9-44BC-B7C3-A5BF363D85D7} - {25F48B11-0D57-47B7-88EE-7D407AFBA7B6} = {F8CB1B1F-F935-4ECE-B3C2-CF62B5654BF2} - {3D4DD468-10FE-4606-BA10-F848447AF157} = {F8CB1B1F-F935-4ECE-B3C2-CF62B5654BF2} {A1BEF14B-0C13-4854-8299-DADF0D1181D9} = {56502718-F82A-46E2-9AD0-532C437EC51E} {A71C8379-F67C-42A1-B6CD-8C0942757B93} = {56502718-F82A-46E2-9AD0-532C437EC51E} {348D0950-A458-487D-9A30-FF60BCB715D9} = {56502718-F82A-46E2-9AD0-532C437EC51E} @@ -1407,7 +1533,14 @@ Global {C53A69A6-5DD9-4C53-AE34-88424D0A043D} = {A8ED4215-E7B8-4F14-B61D-F737E24C856A} {4695E11B-4AB8-4376-832D-54344DD42316} = {A8ED4215-E7B8-4F14-B61D-F737E24C856A} {B6796238-B6F5-488E-97A9-50EC2966B633} = {A8ED4215-E7B8-4F14-B61D-F737E24C856A} - {39F345C7-BA27-4540-9BCE-45E634DA6035} = {A8ED4215-E7B8-4F14-B61D-F737E24C856A} + {0CA04347-D51A-4F7C-927C-FB45E2B266D8} = {D46042B1-7AEB-4642-8591-E6B3F2E0F1C4} + {E118B30B-6805-477B-A402-3DBD66DD619E} = {D46042B1-7AEB-4642-8591-E6B3F2E0F1C4} + {D46042B1-7AEB-4642-8591-E6B3F2E0F1C4} = {21D78340-7F96-4519-983F-529077A11AE1} + {860E324D-4B26-4F48-B7AC-44EED82A8EA7} = {E8705420-F755-4CBA-970D-B745F59F9780} + {E55AA18C-4B27-4C51-976E-0E7DE39F4AFB} = {E8705420-F755-4CBA-970D-B745F59F9780} + {E8705420-F755-4CBA-970D-B745F59F9780} = {21D78340-7F96-4519-983F-529077A11AE1} + {5149AC24-C1A7-4A4C-BE83-FF3037B99E4C} = {CDD72541-F0ED-41FA-9C9A-5D774CEB22E4} + {CDD72541-F0ED-41FA-9C9A-5D774CEB22E4} = {21D78340-7F96-4519-983F-529077A11AE1} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {158060A0-BFF9-48E6-90A9-93F52FEB5D3B} diff --git a/src/libraries/System.Runtime.Serialization.Json/System.Runtime.Serialization.Json.sln b/src/libraries/System.Runtime.Serialization.Json/System.Runtime.Serialization.Json.sln index 297898f5bc4a51..2ec3fdd279e4f1 100644 --- a/src/libraries/System.Runtime.Serialization.Json/System.Runtime.Serialization.Json.sln +++ b/src/libraries/System.Runtime.Serialization.Json/System.Runtime.Serialization.Json.sln @@ -35,6 +35,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.RegularExpressi EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Xml.ReaderWriter", "..\System.Xml.ReaderWriter\ref\System.Xml.ReaderWriter.csproj", "{391A8D1B-A44C-44C3-AFCF-045EE81FDFD2}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{3FBD947C-3755-4DFE-A1E8-76617C11FE78}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{6C2C3949-60D3-45C4-BCE5-38C33E4F818E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{376DF098-A8D4-44F9-914F-BAD5F233703B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{4C51C8CA-8E6E-4B34-98D5-83097DA41379}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{50D92962-8C6F-4240-A325-8A46F08D71BA}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{23D70080-2668-4963-A7A0-4E5FC4CE7464}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{A5940D03-8A5D-494C-B87F-4B9AAB6B21AE}" @@ -43,6 +53,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A408DA52-13D EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{BD161CEF-9B1C-45C0-B541-E4BA194BFCEC}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{5F8E719B-9F8B-4797-B30D-91D55B7DF40E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{0209E962-B0AA-4D82-BE17-4C98EDE738E8}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{D357AF18-41DA-43F9-92D7-D52D43E7DA35}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{3A08C218-12F3-47EC-B4F3-BC3A0650ABB2}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -121,6 +139,26 @@ Global {391A8D1B-A44C-44C3-AFCF-045EE81FDFD2}.Debug|Any CPU.Build.0 = Debug|Any CPU {391A8D1B-A44C-44C3-AFCF-045EE81FDFD2}.Release|Any CPU.ActiveCfg = Release|Any CPU {391A8D1B-A44C-44C3-AFCF-045EE81FDFD2}.Release|Any CPU.Build.0 = Release|Any CPU + {3FBD947C-3755-4DFE-A1E8-76617C11FE78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3FBD947C-3755-4DFE-A1E8-76617C11FE78}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3FBD947C-3755-4DFE-A1E8-76617C11FE78}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3FBD947C-3755-4DFE-A1E8-76617C11FE78}.Release|Any CPU.Build.0 = Release|Any CPU + {6C2C3949-60D3-45C4-BCE5-38C33E4F818E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6C2C3949-60D3-45C4-BCE5-38C33E4F818E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6C2C3949-60D3-45C4-BCE5-38C33E4F818E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6C2C3949-60D3-45C4-BCE5-38C33E4F818E}.Release|Any CPU.Build.0 = Release|Any CPU + {376DF098-A8D4-44F9-914F-BAD5F233703B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {376DF098-A8D4-44F9-914F-BAD5F233703B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {376DF098-A8D4-44F9-914F-BAD5F233703B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {376DF098-A8D4-44F9-914F-BAD5F233703B}.Release|Any CPU.Build.0 = Release|Any CPU + {4C51C8CA-8E6E-4B34-98D5-83097DA41379}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4C51C8CA-8E6E-4B34-98D5-83097DA41379}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4C51C8CA-8E6E-4B34-98D5-83097DA41379}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4C51C8CA-8E6E-4B34-98D5-83097DA41379}.Release|Any CPU.Build.0 = Release|Any CPU + {50D92962-8C6F-4240-A325-8A46F08D71BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {50D92962-8C6F-4240-A325-8A46F08D71BA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {50D92962-8C6F-4240-A325-8A46F08D71BA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {50D92962-8C6F-4240-A325-8A46F08D71BA}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -144,6 +182,14 @@ Global {B5544BD7-96BD-47E8-A27A-F18D42B44D7B} = {BD161CEF-9B1C-45C0-B541-E4BA194BFCEC} {2D7FD180-D8EE-48B5-B71D-1AE8DEAB1F37} = {BD161CEF-9B1C-45C0-B541-E4BA194BFCEC} {DBE877DF-486A-417B-9A4A-F25156621203} = {BD161CEF-9B1C-45C0-B541-E4BA194BFCEC} + {3FBD947C-3755-4DFE-A1E8-76617C11FE78} = {5F8E719B-9F8B-4797-B30D-91D55B7DF40E} + {6C2C3949-60D3-45C4-BCE5-38C33E4F818E} = {5F8E719B-9F8B-4797-B30D-91D55B7DF40E} + {5F8E719B-9F8B-4797-B30D-91D55B7DF40E} = {3A08C218-12F3-47EC-B4F3-BC3A0650ABB2} + {376DF098-A8D4-44F9-914F-BAD5F233703B} = {0209E962-B0AA-4D82-BE17-4C98EDE738E8} + {4C51C8CA-8E6E-4B34-98D5-83097DA41379} = {0209E962-B0AA-4D82-BE17-4C98EDE738E8} + {0209E962-B0AA-4D82-BE17-4C98EDE738E8} = {3A08C218-12F3-47EC-B4F3-BC3A0650ABB2} + {50D92962-8C6F-4240-A325-8A46F08D71BA} = {D357AF18-41DA-43F9-92D7-D52D43E7DA35} + {D357AF18-41DA-43F9-92D7-D52D43E7DA35} = {3A08C218-12F3-47EC-B4F3-BC3A0650ABB2} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {5D066F36-FE2F-41D2-A586-BBA5192A8BCA} diff --git a/src/libraries/System.Runtime.Serialization.Primitives/System.Runtime.Serialization.Primitives.sln b/src/libraries/System.Runtime.Serialization.Primitives/System.Runtime.Serialization.Primitives.sln index c1bdfe002453b0..82ad064599893d 100644 --- a/src/libraries/System.Runtime.Serialization.Primitives/System.Runtime.Serialization.Primitives.sln +++ b/src/libraries/System.Runtime.Serialization.Primitives/System.Runtime.Serialization.Primitives.sln @@ -13,6 +13,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Serializatio EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{2D875658-E9BD-42DE-98E2-C8C6F1D914B3}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{3F9FDFD9-20A0-4339-A6E9-4C5EE37FE8F7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{F45FC657-65C9-434C-BBA9-705659BC706D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{BB531320-C354-40C5-851D-19C53FA2C8D7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{0B85B404-0EA3-4A29-8F8B-08BACEB0CA87}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{3400A481-1530-48A7-887C-1C2B0ED3D229}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{8197F6DC-718C-4F71-9F13-771B1C1058E1}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{A1607D7B-AA96-4EAD-99F7-9CA09E472C56}" @@ -21,6 +31,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{E8F4D65F-BB0 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{39E6C76D-0897-4933-81F5-107D9947D90D}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{ADD5C251-5813-4F1D-A954-4C5B87A40C4B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{2C7D4E4D-38B6-48D8-8E4A-FA97B478F55E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{51D4A91D-EE9F-423F-8D75-76AB3E5E9330}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{AE59DF5D-1970-4F08-8F45-9F4A9D261820}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -55,6 +73,26 @@ Global {2D875658-E9BD-42DE-98E2-C8C6F1D914B3}.Debug|Any CPU.Build.0 = Debug|Any CPU {2D875658-E9BD-42DE-98E2-C8C6F1D914B3}.Release|Any CPU.ActiveCfg = Release|Any CPU {2D875658-E9BD-42DE-98E2-C8C6F1D914B3}.Release|Any CPU.Build.0 = Release|Any CPU + {3F9FDFD9-20A0-4339-A6E9-4C5EE37FE8F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3F9FDFD9-20A0-4339-A6E9-4C5EE37FE8F7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3F9FDFD9-20A0-4339-A6E9-4C5EE37FE8F7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3F9FDFD9-20A0-4339-A6E9-4C5EE37FE8F7}.Release|Any CPU.Build.0 = Release|Any CPU + {F45FC657-65C9-434C-BBA9-705659BC706D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F45FC657-65C9-434C-BBA9-705659BC706D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F45FC657-65C9-434C-BBA9-705659BC706D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F45FC657-65C9-434C-BBA9-705659BC706D}.Release|Any CPU.Build.0 = Release|Any CPU + {BB531320-C354-40C5-851D-19C53FA2C8D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BB531320-C354-40C5-851D-19C53FA2C8D7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BB531320-C354-40C5-851D-19C53FA2C8D7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BB531320-C354-40C5-851D-19C53FA2C8D7}.Release|Any CPU.Build.0 = Release|Any CPU + {0B85B404-0EA3-4A29-8F8B-08BACEB0CA87}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0B85B404-0EA3-4A29-8F8B-08BACEB0CA87}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0B85B404-0EA3-4A29-8F8B-08BACEB0CA87}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0B85B404-0EA3-4A29-8F8B-08BACEB0CA87}.Release|Any CPU.Build.0 = Release|Any CPU + {3400A481-1530-48A7-887C-1C2B0ED3D229}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3400A481-1530-48A7-887C-1C2B0ED3D229}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3400A481-1530-48A7-887C-1C2B0ED3D229}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3400A481-1530-48A7-887C-1C2B0ED3D229}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -67,6 +105,14 @@ Global {9F0F182E-71C9-4CB5-8E5E-94AFEE489B1D} = {E8F4D65F-BB03-4954-AB19-C85DEC5E286C} {2D875658-E9BD-42DE-98E2-C8C6F1D914B3} = {E8F4D65F-BB03-4954-AB19-C85DEC5E286C} {70F6A111-C73E-4989-BCE4-ED790E1E2882} = {39E6C76D-0897-4933-81F5-107D9947D90D} + {3F9FDFD9-20A0-4339-A6E9-4C5EE37FE8F7} = {ADD5C251-5813-4F1D-A954-4C5B87A40C4B} + {F45FC657-65C9-434C-BBA9-705659BC706D} = {ADD5C251-5813-4F1D-A954-4C5B87A40C4B} + {ADD5C251-5813-4F1D-A954-4C5B87A40C4B} = {AE59DF5D-1970-4F08-8F45-9F4A9D261820} + {BB531320-C354-40C5-851D-19C53FA2C8D7} = {2C7D4E4D-38B6-48D8-8E4A-FA97B478F55E} + {0B85B404-0EA3-4A29-8F8B-08BACEB0CA87} = {2C7D4E4D-38B6-48D8-8E4A-FA97B478F55E} + {2C7D4E4D-38B6-48D8-8E4A-FA97B478F55E} = {AE59DF5D-1970-4F08-8F45-9F4A9D261820} + {3400A481-1530-48A7-887C-1C2B0ED3D229} = {51D4A91D-EE9F-423F-8D75-76AB3E5E9330} + {51D4A91D-EE9F-423F-8D75-76AB3E5E9330} = {AE59DF5D-1970-4F08-8F45-9F4A9D261820} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {7BC9AD65-7DA0-465C-B6FF-6037B3A864CD} 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 98fb9f98241db4..9774aceb3c60c1 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 @@ -5,8 +5,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.CodeDom", "..\System 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}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{01B58545-AF7A-4D58-AE7F-BCE16E68A975}" -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}" @@ -17,6 +15,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Serializatio EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Serialization.Schema.Tests", "tests\System.Runtime.Serialization.Schema.Tests.csproj", "{627FFEFC-A317-4AD1-809F-B26CA7F475BD}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{7D895D9D-87EE-4ACE-B1EE-4F67036EA750}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{3089FA98-1357-400A-94C2-40CC3D6603AD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{FA098A6B-2B60-4343-BC42-99E0FD6B2AEC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{C4D63410-3D2E-44E0-A660-53D9CB90086E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{B38AD6B0-656D-42A2-8B4C-2B24E34E8CC3}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{2D7D470B-B092-45BC-900A-CDB20CA94BE7}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{54321C0F-1323-4962-A01C-AC07028C3FA8}" @@ -25,6 +33,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{6591788E-089 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{366E690D-4016-43C9-9E9C-1B989A1E78A2}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{E12A010F-9B8A-4446-BCF1-9359EFA1F626}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{5DD8EAFA-CD9C-4FAD-A690-7937F75991C0}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{BD11F34C-1D19-4FC6-8498-44AD2DD284CF}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{ECEAEC84-7D2B-468E-A410-864D03036A0F}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -43,10 +59,6 @@ Global {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 - {01B58545-AF7A-4D58-AE7F-BCE16E68A975}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {01B58545-AF7A-4D58-AE7F-BCE16E68A975}.Debug|Any CPU.Build.0 = Debug|Any CPU - {01B58545-AF7A-4D58-AE7F-BCE16E68A975}.Release|Any CPU.ActiveCfg = Release|Any CPU - {01B58545-AF7A-4D58-AE7F-BCE16E68A975}.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 @@ -67,6 +79,26 @@ Global {627FFEFC-A317-4AD1-809F-B26CA7F475BD}.Debug|Any CPU.Build.0 = Debug|Any CPU {627FFEFC-A317-4AD1-809F-B26CA7F475BD}.Release|Any CPU.ActiveCfg = Release|Any CPU {627FFEFC-A317-4AD1-809F-B26CA7F475BD}.Release|Any CPU.Build.0 = Release|Any CPU + {7D895D9D-87EE-4ACE-B1EE-4F67036EA750}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7D895D9D-87EE-4ACE-B1EE-4F67036EA750}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7D895D9D-87EE-4ACE-B1EE-4F67036EA750}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7D895D9D-87EE-4ACE-B1EE-4F67036EA750}.Release|Any CPU.Build.0 = Release|Any CPU + {3089FA98-1357-400A-94C2-40CC3D6603AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3089FA98-1357-400A-94C2-40CC3D6603AD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3089FA98-1357-400A-94C2-40CC3D6603AD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3089FA98-1357-400A-94C2-40CC3D6603AD}.Release|Any CPU.Build.0 = Release|Any CPU + {FA098A6B-2B60-4343-BC42-99E0FD6B2AEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA098A6B-2B60-4343-BC42-99E0FD6B2AEC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA098A6B-2B60-4343-BC42-99E0FD6B2AEC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA098A6B-2B60-4343-BC42-99E0FD6B2AEC}.Release|Any CPU.Build.0 = Release|Any CPU + {C4D63410-3D2E-44E0-A660-53D9CB90086E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C4D63410-3D2E-44E0-A660-53D9CB90086E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C4D63410-3D2E-44E0-A660-53D9CB90086E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C4D63410-3D2E-44E0-A660-53D9CB90086E}.Release|Any CPU.Build.0 = Release|Any CPU + {B38AD6B0-656D-42A2-8B4C-2B24E34E8CC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B38AD6B0-656D-42A2-8B4C-2B24E34E8CC3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B38AD6B0-656D-42A2-8B4C-2B24E34E8CC3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B38AD6B0-656D-42A2-8B4C-2B24E34E8CC3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -78,9 +110,16 @@ Global {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} - {01B58545-AF7A-4D58-AE7F-BCE16E68A975} = {366E690D-4016-43C9-9E9C-1B989A1E78A2} {222716D5-754B-4C1D-A5F9-1BD0692E843C} = {366E690D-4016-43C9-9E9C-1B989A1E78A2} {F73066DB-FD20-4C3B-B837-0FB18BDBF0B5} = {366E690D-4016-43C9-9E9C-1B989A1E78A2} + {7D895D9D-87EE-4ACE-B1EE-4F67036EA750} = {E12A010F-9B8A-4446-BCF1-9359EFA1F626} + {3089FA98-1357-400A-94C2-40CC3D6603AD} = {E12A010F-9B8A-4446-BCF1-9359EFA1F626} + {E12A010F-9B8A-4446-BCF1-9359EFA1F626} = {ECEAEC84-7D2B-468E-A410-864D03036A0F} + {FA098A6B-2B60-4343-BC42-99E0FD6B2AEC} = {5DD8EAFA-CD9C-4FAD-A690-7937F75991C0} + {C4D63410-3D2E-44E0-A660-53D9CB90086E} = {5DD8EAFA-CD9C-4FAD-A690-7937F75991C0} + {5DD8EAFA-CD9C-4FAD-A690-7937F75991C0} = {ECEAEC84-7D2B-468E-A410-864D03036A0F} + {B38AD6B0-656D-42A2-8B4C-2B24E34E8CC3} = {BD11F34C-1D19-4FC6-8498-44AD2DD284CF} + {BD11F34C-1D19-4FC6-8498-44AD2DD284CF} = {ECEAEC84-7D2B-468E-A410-864D03036A0F} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {70EC5780-3C80-4D52-93B0-7FBF64E29572} diff --git a/src/libraries/System.Runtime.Serialization.Schema/ref/System.Runtime.Serialization.Schema.csproj b/src/libraries/System.Runtime.Serialization.Schema/ref/System.Runtime.Serialization.Schema.csproj index 06c882a468b428..99316a98b342b6 100644 --- a/src/libraries/System.Runtime.Serialization.Schema/ref/System.Runtime.Serialization.Schema.csproj +++ b/src/libraries/System.Runtime.Serialization.Schema/ref/System.Runtime.Serialization.Schema.csproj @@ -1,6 +1,7 @@ + - $(NetCoreAppCurrent);$(NetCoreAppPrevious) + $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum) @@ -10,4 +11,5 @@ + \ No newline at end of file diff --git a/src/libraries/System.Runtime.Serialization.Schema/src/CompatibilitySuppressions.xml b/src/libraries/System.Runtime.Serialization.Schema/src/CompatibilitySuppressions.xml new file mode 100644 index 00000000000000..d864a9d227ff43 --- /dev/null +++ b/src/libraries/System.Runtime.Serialization.Schema/src/CompatibilitySuppressions.xml @@ -0,0 +1,8 @@ + + + + + PKV006 + net7.0 + + \ No newline at end of file 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 b05592f30ca1ce..3ac0fa8e12ccaa 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,6 +1,7 @@ + - $(NetCoreAppCurrent);$(NetCoreAppPrevious) + $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum) false true Provides support for importing and exporting xsd schemas for DataContractSerializer. @@ -24,4 +25,5 @@ System.Runtime.Serialization.Schema.XsdDataContractImporter + 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 e2ae0abfbf2f3c..e0f6bce9959316 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 @@ -3,6 +3,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Win32.Primitives", "..\Microsoft.Win32.Primitives\ref\Microsoft.Win32.Primitives.csproj", "{E5DB95E1-94AA-405C-9FFE-09B1E2498EE2}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SerializableAssembly", "..\Microsoft.XmlSerializer.Generator\tests\SerializableAssembly.csproj", "{55221476-F11B-469E-AD3C-CEB038316A52}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.CodeDom", "..\System.CodeDom\ref\System.CodeDom.csproj", "{7DF41C40-FE5D-41DF-B106-3DD77BE4D4B5}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.CodeDom", "..\System.CodeDom\src\System.CodeDom.csproj", "{1392041A-E2CA-4553-BEAF-363974651B81}" @@ -15,8 +17,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Net.Primitives", ".. EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.DataContractSerialization", "..\System.Private.DataContractSerialization\src\System.Private.DataContractSerialization.csproj", "{76AC3DDD-2B38-489F-A8B0-8E43054595DB}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{4C32D611-D0B9-4E91-A626-3DF43BE974CB}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{7D7457FD-B88C-4375-926D-7D46C71E34A7}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{D5FF2DBA-F304-4ACB-8F82-B8F9321E22A9}" @@ -41,6 +41,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.RegularExpressi EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Xml.ReaderWriter", "..\System.Xml.ReaderWriter\ref\System.Xml.ReaderWriter.csproj", "{DF2255F4-F671-4C15-9100-D8079992E19D}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{E2DF066F-C124-440F-999A-A71F71C7F34E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{AC9A8A75-D385-4871-9FA9-5BB324F854AB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{696F540B-36CF-4402-84AA-1AB53FC05850}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{855AACC7-1EA3-4E33-9EBE-474A71BC03FA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{A59A0894-0AAE-4EEE-A2A6-494B3983DE7E}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{41101B02-36C9-476B-98D5-1A6E105BBF4A}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{18E62E91-73A2-48AE-BEFF-CE7C64DF759D}" @@ -49,6 +59,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{DB29DBEF-FA4 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{DE71D38E-4154-477C-9C27-3FA4ADB4098F}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{A980EC85-6DBA-4AA8-A2E9-8B596010795D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{C7960E25-4291-47E0-AC00-683809D40322}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{F5B9DBD0-A90F-4F5A-94E1-EC68D2F5991F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{37EB5E8F-8F0C-4BF8-B790-004EC32D940A}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -63,6 +81,10 @@ Global {E5DB95E1-94AA-405C-9FFE-09B1E2498EE2}.Debug|Any CPU.Build.0 = Debug|Any CPU {E5DB95E1-94AA-405C-9FFE-09B1E2498EE2}.Release|Any CPU.ActiveCfg = Release|Any CPU {E5DB95E1-94AA-405C-9FFE-09B1E2498EE2}.Release|Any CPU.Build.0 = Release|Any CPU + {55221476-F11B-469E-AD3C-CEB038316A52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {55221476-F11B-469E-AD3C-CEB038316A52}.Debug|Any CPU.Build.0 = Debug|Any CPU + {55221476-F11B-469E-AD3C-CEB038316A52}.Release|Any CPU.ActiveCfg = Release|Any CPU + {55221476-F11B-469E-AD3C-CEB038316A52}.Release|Any CPU.Build.0 = Release|Any CPU {7DF41C40-FE5D-41DF-B106-3DD77BE4D4B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7DF41C40-FE5D-41DF-B106-3DD77BE4D4B5}.Debug|Any CPU.Build.0 = Debug|Any CPU {7DF41C40-FE5D-41DF-B106-3DD77BE4D4B5}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -87,10 +109,6 @@ Global {76AC3DDD-2B38-489F-A8B0-8E43054595DB}.Debug|Any CPU.Build.0 = Debug|Any CPU {76AC3DDD-2B38-489F-A8B0-8E43054595DB}.Release|Any CPU.ActiveCfg = Release|Any CPU {76AC3DDD-2B38-489F-A8B0-8E43054595DB}.Release|Any CPU.Build.0 = Release|Any CPU - {4C32D611-D0B9-4E91-A626-3DF43BE974CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4C32D611-D0B9-4E91-A626-3DF43BE974CB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4C32D611-D0B9-4E91-A626-3DF43BE974CB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4C32D611-D0B9-4E91-A626-3DF43BE974CB}.Release|Any CPU.Build.0 = Release|Any CPU {7D7457FD-B88C-4375-926D-7D46C71E34A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7D7457FD-B88C-4375-926D-7D46C71E34A7}.Debug|Any CPU.Build.0 = Debug|Any CPU {7D7457FD-B88C-4375-926D-7D46C71E34A7}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -139,12 +157,33 @@ Global {DF2255F4-F671-4C15-9100-D8079992E19D}.Debug|Any CPU.Build.0 = Debug|Any CPU {DF2255F4-F671-4C15-9100-D8079992E19D}.Release|Any CPU.ActiveCfg = Release|Any CPU {DF2255F4-F671-4C15-9100-D8079992E19D}.Release|Any CPU.Build.0 = Release|Any CPU + {E2DF066F-C124-440F-999A-A71F71C7F34E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E2DF066F-C124-440F-999A-A71F71C7F34E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E2DF066F-C124-440F-999A-A71F71C7F34E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E2DF066F-C124-440F-999A-A71F71C7F34E}.Release|Any CPU.Build.0 = Release|Any CPU + {AC9A8A75-D385-4871-9FA9-5BB324F854AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AC9A8A75-D385-4871-9FA9-5BB324F854AB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AC9A8A75-D385-4871-9FA9-5BB324F854AB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AC9A8A75-D385-4871-9FA9-5BB324F854AB}.Release|Any CPU.Build.0 = Release|Any CPU + {696F540B-36CF-4402-84AA-1AB53FC05850}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {696F540B-36CF-4402-84AA-1AB53FC05850}.Debug|Any CPU.Build.0 = Debug|Any CPU + {696F540B-36CF-4402-84AA-1AB53FC05850}.Release|Any CPU.ActiveCfg = Release|Any CPU + {696F540B-36CF-4402-84AA-1AB53FC05850}.Release|Any CPU.Build.0 = Release|Any CPU + {855AACC7-1EA3-4E33-9EBE-474A71BC03FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {855AACC7-1EA3-4E33-9EBE-474A71BC03FA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {855AACC7-1EA3-4E33-9EBE-474A71BC03FA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {855AACC7-1EA3-4E33-9EBE-474A71BC03FA}.Release|Any CPU.Build.0 = Release|Any CPU + {A59A0894-0AAE-4EEE-A2A6-494B3983DE7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A59A0894-0AAE-4EEE-A2A6-494B3983DE7E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A59A0894-0AAE-4EEE-A2A6-494B3983DE7E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A59A0894-0AAE-4EEE-A2A6-494B3983DE7E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {CBA80130-6773-4DF9-995C-DC6CBED89CB5} = {41101B02-36C9-476B-98D5-1A6E105BBF4A} + {55221476-F11B-469E-AD3C-CEB038316A52} = {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} @@ -161,10 +200,17 @@ Global {1392041A-E2CA-4553-BEAF-363974651B81} = {DB29DBEF-FA4E-4334-AFB8-BFB2DA82D1DE} {76AC3DDD-2B38-489F-A8B0-8E43054595DB} = {DB29DBEF-FA4E-4334-AFB8-BFB2DA82D1DE} {6FD10BE0-24C8-456E-8B9A-FD101C05C961} = {DB29DBEF-FA4E-4334-AFB8-BFB2DA82D1DE} - {4C32D611-D0B9-4E91-A626-3DF43BE974CB} = {DE71D38E-4154-477C-9C27-3FA4ADB4098F} {7D7457FD-B88C-4375-926D-7D46C71E34A7} = {DE71D38E-4154-477C-9C27-3FA4ADB4098F} {D5FF2DBA-F304-4ACB-8F82-B8F9321E22A9} = {DE71D38E-4154-477C-9C27-3FA4ADB4098F} {6E942A4A-405E-4AAD-89A7-006358A8A004} = {DE71D38E-4154-477C-9C27-3FA4ADB4098F} + {E2DF066F-C124-440F-999A-A71F71C7F34E} = {A980EC85-6DBA-4AA8-A2E9-8B596010795D} + {AC9A8A75-D385-4871-9FA9-5BB324F854AB} = {A980EC85-6DBA-4AA8-A2E9-8B596010795D} + {A980EC85-6DBA-4AA8-A2E9-8B596010795D} = {37EB5E8F-8F0C-4BF8-B790-004EC32D940A} + {696F540B-36CF-4402-84AA-1AB53FC05850} = {C7960E25-4291-47E0-AC00-683809D40322} + {855AACC7-1EA3-4E33-9EBE-474A71BC03FA} = {C7960E25-4291-47E0-AC00-683809D40322} + {C7960E25-4291-47E0-AC00-683809D40322} = {37EB5E8F-8F0C-4BF8-B790-004EC32D940A} + {A59A0894-0AAE-4EEE-A2A6-494B3983DE7E} = {F5B9DBD0-A90F-4F5A-94E1-EC68D2F5991F} + {F5B9DBD0-A90F-4F5A-94E1-EC68D2F5991F} = {37EB5E8F-8F0C-4BF8-B790-004EC32D940A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {EE9FB522-4B73-4E3E-B63D-C21826BB7B5D} diff --git a/src/libraries/System.Runtime.Serialization.Xml/tests/XmlDictionaryWriterTest.cs b/src/libraries/System.Runtime.Serialization.Xml/tests/XmlDictionaryWriterTest.cs index d2776c1c577bb5..ba3edb60aa0a63 100644 --- a/src/libraries/System.Runtime.Serialization.Xml/tests/XmlDictionaryWriterTest.cs +++ b/src/libraries/System.Runtime.Serialization.Xml/tests/XmlDictionaryWriterTest.cs @@ -16,6 +16,7 @@ public static class XmlDictionaryWriterTest { [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void XmlBaseWriter_WriteBase64Async() { string actual; @@ -63,6 +64,7 @@ public static void XmlBaseWriter_WriteBinHex() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void XmlBaseWriter_FlushAsync() { string actual = null; @@ -143,6 +145,7 @@ public static void XmlBaseWriter_WriteStartEndElementAsync() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void XmlBaseWriter_CheckAsync_ThrowInvalidOperationException() { int byteSize = 1024; @@ -518,7 +521,7 @@ public static void XmlBaseWriter_WriteString() { for (int i = 0; i < chars.Length; ++i) chars[i] = (char)(i % 128); - chars[^1] = '\u00E4'; // '�' - Latin Small Letter a with Diaeresis. Latin-1 Supplement. + chars[^1] = '\u00E4'; // '�' - Latin Small Letter a with Diaeresis. Latin-1 Supplement. }); int numBytes = Encoding.UTF8.GetBytes(allAscii, buffer); diff --git a/src/libraries/System.Runtime/System.Runtime.sln b/src/libraries/System.Runtime/System.Runtime.sln index a7d50d4a347abd..62431149c3fb7f 100644 --- a/src/libraries/System.Runtime/System.Runtime.sln +++ b/src/libraries/System.Runtime/System.Runtime.sln @@ -7,14 +7,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities.Unicode", ".. EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{FB17AC52-1633-4845-932B-9218DF895957}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Drawing.Common", "..\shims\stubs\System.Drawing.Common.csproj", "{21791340-49C4-4C07-97FD-CAA1B72D3256}" +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}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{5DB600A4-08C4-485B-A1D5-E4A4C593FB0E}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{4FA4A9A6-1D38-414B-96F0-3CFB63C687C9}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37}" @@ -23,6 +23,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "ref\Syste EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "src\System.Runtime.csproj", "{A83A8520-F5E2-49B4-83BC-0F82A412951D}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.IOS.Tests", "tests\Hybrid\System.Runtime.IOS.Tests.csproj", "{43C40A0B-0B0E-4D27-8534-11CD5A540F7C}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Nls.Tests", "tests\NlsTests\System.Runtime.Nls.Tests.csproj", "{3B79DD71-8C2F-41BC-A1A7-86A490D6C726}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Tests", "tests\System.Runtime.Tests.csproj", "{4EE36055-AD7C-4779-B3F6-08687960DCC3}" @@ -43,8 +45,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Permissions EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Permissions", "..\System.Security.Permissions\src\System.Security.Permissions.csproj", "{F6A8185B-07C6-401D-9B40-3C560239E05F}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.RegularExpressions.Generator", "..\System.Text.RegularExpressions\gen\System.Text.RegularExpressions.Generator.csproj", "{EC777939-BE30-4ED9-9FE1-451DD7472467}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.AccessControl", "..\System.Threading.AccessControl\ref\System.Threading.AccessControl.csproj", "{25E8AB9D-2D10-44F5-9F83-5A5134526771}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.AccessControl", "..\System.Threading.AccessControl\src\System.Threading.AccessControl.csproj", "{9CF6C6E6-0E9F-4A95-84B5-6083EAB6FA13}" @@ -53,14 +53,34 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", "..\System.Windows.Extensions\src\System.Windows.Extensions.csproj", "{069C2B51-069A-4FBB-BFE9-42D573F1CEEA}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{28140562-A65A-48E9-ABAB-53BA939084F0}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{CFAB1236-51C3-4A13-A57F-16022FD0A7EE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{4CBDF585-FD15-44E9-9795-1BED79BC4960}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{1CBBF9E2-4EBD-40F0-BB9E-66BCE3CA5AA8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{AF7CC240-B4D5-4C37-9B04-473CBCC52330}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{3F5ABC5D-42DE-44C4-BEFC-741F4974C744}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{5B542214-BAF3-4FA7-8424-D0E9C631A2E9}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{FD72C125-C10D-457B-8AFC-6B4E5237AF6A}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{28140562-A65A-48E9-ABAB-53BA939084F0}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{F362E63A-2B1A-445B-B198-3071D7DDE8CF}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{5B2B5E7E-A2FB-4095-9E79-404BF53E0133}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{13818769-DC01-4715-9590-E000D03E42A9}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{04D0E381-5B43-42C0-8E08-FADBFCECB353}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{F65030D7-DDBD-4D4C-B6E3-D3C0DD7FD569}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{67DCB1C2-0B95-40B6-ACE8-9812BF57EB19}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -173,6 +193,27 @@ Global {FB17AC52-1633-4845-932B-9218DF895957}.Checked|arm64.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 + {21791340-49C4-4C07-97FD-CAA1B72D3256}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {21791340-49C4-4C07-97FD-CAA1B72D3256}.Debug|Any CPU.Build.0 = Debug|Any CPU + {21791340-49C4-4C07-97FD-CAA1B72D3256}.Debug|arm.ActiveCfg = Debug|Any CPU + {21791340-49C4-4C07-97FD-CAA1B72D3256}.Debug|arm64.ActiveCfg = Debug|Any CPU + {21791340-49C4-4C07-97FD-CAA1B72D3256}.Debug|x64.ActiveCfg = Debug|Any CPU + {21791340-49C4-4C07-97FD-CAA1B72D3256}.Debug|x64.Build.0 = Debug|Any CPU + {21791340-49C4-4C07-97FD-CAA1B72D3256}.Debug|x86.ActiveCfg = Debug|Any CPU + {21791340-49C4-4C07-97FD-CAA1B72D3256}.Debug|x86.Build.0 = Debug|Any CPU + {21791340-49C4-4C07-97FD-CAA1B72D3256}.Release|Any CPU.ActiveCfg = Release|Any CPU + {21791340-49C4-4C07-97FD-CAA1B72D3256}.Release|Any CPU.Build.0 = Release|Any CPU + {21791340-49C4-4C07-97FD-CAA1B72D3256}.Release|arm.ActiveCfg = Release|Any CPU + {21791340-49C4-4C07-97FD-CAA1B72D3256}.Release|arm64.ActiveCfg = Release|Any CPU + {21791340-49C4-4C07-97FD-CAA1B72D3256}.Release|x64.ActiveCfg = Release|Any CPU + {21791340-49C4-4C07-97FD-CAA1B72D3256}.Release|x64.Build.0 = Release|Any CPU + {21791340-49C4-4C07-97FD-CAA1B72D3256}.Release|x86.ActiveCfg = Release|Any CPU + {21791340-49C4-4C07-97FD-CAA1B72D3256}.Release|x86.Build.0 = Release|Any CPU + {21791340-49C4-4C07-97FD-CAA1B72D3256}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {21791340-49C4-4C07-97FD-CAA1B72D3256}.Checked|arm.ActiveCfg = Debug|Any CPU + {21791340-49C4-4C07-97FD-CAA1B72D3256}.Checked|arm64.ActiveCfg = Debug|Any CPU + {21791340-49C4-4C07-97FD-CAA1B72D3256}.Checked|x64.ActiveCfg = Debug|Any CPU + {21791340-49C4-4C07-97FD-CAA1B72D3256}.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|arm.ActiveCfg = Debug|Any CPU @@ -236,27 +277,6 @@ Global {E7A05515-DABE-4C09-83CB-CE84EFDCD4CC}.Checked|arm64.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 - {5DB600A4-08C4-485B-A1D5-E4A4C593FB0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5DB600A4-08C4-485B-A1D5-E4A4C593FB0E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5DB600A4-08C4-485B-A1D5-E4A4C593FB0E}.Debug|arm.ActiveCfg = Debug|Any CPU - {5DB600A4-08C4-485B-A1D5-E4A4C593FB0E}.Debug|arm64.ActiveCfg = Debug|Any CPU - {5DB600A4-08C4-485B-A1D5-E4A4C593FB0E}.Debug|x64.ActiveCfg = Debug|Any CPU - {5DB600A4-08C4-485B-A1D5-E4A4C593FB0E}.Debug|x64.Build.0 = Debug|Any CPU - {5DB600A4-08C4-485B-A1D5-E4A4C593FB0E}.Debug|x86.ActiveCfg = Debug|Any CPU - {5DB600A4-08C4-485B-A1D5-E4A4C593FB0E}.Debug|x86.Build.0 = Debug|Any CPU - {5DB600A4-08C4-485B-A1D5-E4A4C593FB0E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5DB600A4-08C4-485B-A1D5-E4A4C593FB0E}.Release|Any CPU.Build.0 = Release|Any CPU - {5DB600A4-08C4-485B-A1D5-E4A4C593FB0E}.Release|arm.ActiveCfg = Release|Any CPU - {5DB600A4-08C4-485B-A1D5-E4A4C593FB0E}.Release|arm64.ActiveCfg = Release|Any CPU - {5DB600A4-08C4-485B-A1D5-E4A4C593FB0E}.Release|x64.ActiveCfg = Release|Any CPU - {5DB600A4-08C4-485B-A1D5-E4A4C593FB0E}.Release|x64.Build.0 = Release|Any CPU - {5DB600A4-08C4-485B-A1D5-E4A4C593FB0E}.Release|x86.ActiveCfg = Release|Any CPU - {5DB600A4-08C4-485B-A1D5-E4A4C593FB0E}.Release|x86.Build.0 = Release|Any CPU - {5DB600A4-08C4-485B-A1D5-E4A4C593FB0E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {5DB600A4-08C4-485B-A1D5-E4A4C593FB0E}.Checked|arm.ActiveCfg = Debug|Any CPU - {5DB600A4-08C4-485B-A1D5-E4A4C593FB0E}.Checked|arm64.ActiveCfg = Debug|Any CPU - {5DB600A4-08C4-485B-A1D5-E4A4C593FB0E}.Checked|x64.ActiveCfg = Debug|Any CPU - {5DB600A4-08C4-485B-A1D5-E4A4C593FB0E}.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|arm.ActiveCfg = Debug|Any CPU @@ -341,6 +361,27 @@ Global {A83A8520-F5E2-49B4-83BC-0F82A412951D}.Checked|arm64.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 + {43C40A0B-0B0E-4D27-8534-11CD5A540F7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {43C40A0B-0B0E-4D27-8534-11CD5A540F7C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {43C40A0B-0B0E-4D27-8534-11CD5A540F7C}.Debug|arm.ActiveCfg = Debug|Any CPU + {43C40A0B-0B0E-4D27-8534-11CD5A540F7C}.Debug|arm64.ActiveCfg = Debug|Any CPU + {43C40A0B-0B0E-4D27-8534-11CD5A540F7C}.Debug|x64.ActiveCfg = Debug|Any CPU + {43C40A0B-0B0E-4D27-8534-11CD5A540F7C}.Debug|x64.Build.0 = Debug|Any CPU + {43C40A0B-0B0E-4D27-8534-11CD5A540F7C}.Debug|x86.ActiveCfg = Debug|Any CPU + {43C40A0B-0B0E-4D27-8534-11CD5A540F7C}.Debug|x86.Build.0 = Debug|Any CPU + {43C40A0B-0B0E-4D27-8534-11CD5A540F7C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {43C40A0B-0B0E-4D27-8534-11CD5A540F7C}.Release|Any CPU.Build.0 = Release|Any CPU + {43C40A0B-0B0E-4D27-8534-11CD5A540F7C}.Release|arm.ActiveCfg = Release|Any CPU + {43C40A0B-0B0E-4D27-8534-11CD5A540F7C}.Release|arm64.ActiveCfg = Release|Any CPU + {43C40A0B-0B0E-4D27-8534-11CD5A540F7C}.Release|x64.ActiveCfg = Release|Any CPU + {43C40A0B-0B0E-4D27-8534-11CD5A540F7C}.Release|x64.Build.0 = Release|Any CPU + {43C40A0B-0B0E-4D27-8534-11CD5A540F7C}.Release|x86.ActiveCfg = Release|Any CPU + {43C40A0B-0B0E-4D27-8534-11CD5A540F7C}.Release|x86.Build.0 = Release|Any CPU + {43C40A0B-0B0E-4D27-8534-11CD5A540F7C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {43C40A0B-0B0E-4D27-8534-11CD5A540F7C}.Checked|arm.ActiveCfg = Debug|Any CPU + {43C40A0B-0B0E-4D27-8534-11CD5A540F7C}.Checked|arm64.ActiveCfg = Debug|Any CPU + {43C40A0B-0B0E-4D27-8534-11CD5A540F7C}.Checked|x64.ActiveCfg = Debug|Any CPU + {43C40A0B-0B0E-4D27-8534-11CD5A540F7C}.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|arm.ActiveCfg = Debug|Any CPU @@ -551,27 +592,6 @@ Global {F6A8185B-07C6-401D-9B40-3C560239E05F}.Checked|arm64.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|arm.ActiveCfg = Debug|Any CPU - {EC777939-BE30-4ED9-9FE1-451DD7472467}.Debug|arm64.ActiveCfg = Debug|Any CPU - {EC777939-BE30-4ED9-9FE1-451DD7472467}.Debug|x64.ActiveCfg = Debug|Any CPU - {EC777939-BE30-4ED9-9FE1-451DD7472467}.Debug|x64.Build.0 = Debug|Any CPU - {EC777939-BE30-4ED9-9FE1-451DD7472467}.Debug|x86.ActiveCfg = Debug|Any CPU - {EC777939-BE30-4ED9-9FE1-451DD7472467}.Debug|x86.Build.0 = Debug|Any CPU - {EC777939-BE30-4ED9-9FE1-451DD7472467}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EC777939-BE30-4ED9-9FE1-451DD7472467}.Release|Any CPU.Build.0 = Release|Any CPU - {EC777939-BE30-4ED9-9FE1-451DD7472467}.Release|arm.ActiveCfg = Release|Any CPU - {EC777939-BE30-4ED9-9FE1-451DD7472467}.Release|arm64.ActiveCfg = Release|Any CPU - {EC777939-BE30-4ED9-9FE1-451DD7472467}.Release|x64.ActiveCfg = Release|Any CPU - {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 - {EC777939-BE30-4ED9-9FE1-451DD7472467}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {EC777939-BE30-4ED9-9FE1-451DD7472467}.Checked|arm.ActiveCfg = Debug|Any CPU - {EC777939-BE30-4ED9-9FE1-451DD7472467}.Checked|arm64.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|arm.ActiveCfg = Debug|Any CPU @@ -656,20 +676,121 @@ Global {069C2B51-069A-4FBB-BFE9-42D573F1CEEA}.Checked|arm64.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 + {CFAB1236-51C3-4A13-A57F-16022FD0A7EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CFAB1236-51C3-4A13-A57F-16022FD0A7EE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CFAB1236-51C3-4A13-A57F-16022FD0A7EE}.Debug|arm.ActiveCfg = Debug|Any CPU + {CFAB1236-51C3-4A13-A57F-16022FD0A7EE}.Debug|arm64.ActiveCfg = Debug|Any CPU + {CFAB1236-51C3-4A13-A57F-16022FD0A7EE}.Debug|x64.ActiveCfg = Debug|Any CPU + {CFAB1236-51C3-4A13-A57F-16022FD0A7EE}.Debug|x64.Build.0 = Debug|Any CPU + {CFAB1236-51C3-4A13-A57F-16022FD0A7EE}.Debug|x86.ActiveCfg = Debug|Any CPU + {CFAB1236-51C3-4A13-A57F-16022FD0A7EE}.Debug|x86.Build.0 = Debug|Any CPU + {CFAB1236-51C3-4A13-A57F-16022FD0A7EE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CFAB1236-51C3-4A13-A57F-16022FD0A7EE}.Release|Any CPU.Build.0 = Release|Any CPU + {CFAB1236-51C3-4A13-A57F-16022FD0A7EE}.Release|arm.ActiveCfg = Release|Any CPU + {CFAB1236-51C3-4A13-A57F-16022FD0A7EE}.Release|arm64.ActiveCfg = Release|Any CPU + {CFAB1236-51C3-4A13-A57F-16022FD0A7EE}.Release|x64.ActiveCfg = Release|Any CPU + {CFAB1236-51C3-4A13-A57F-16022FD0A7EE}.Release|x64.Build.0 = Release|Any CPU + {CFAB1236-51C3-4A13-A57F-16022FD0A7EE}.Release|x86.ActiveCfg = Release|Any CPU + {CFAB1236-51C3-4A13-A57F-16022FD0A7EE}.Release|x86.Build.0 = Release|Any CPU + {CFAB1236-51C3-4A13-A57F-16022FD0A7EE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {CFAB1236-51C3-4A13-A57F-16022FD0A7EE}.Checked|arm.ActiveCfg = Debug|Any CPU + {CFAB1236-51C3-4A13-A57F-16022FD0A7EE}.Checked|arm64.ActiveCfg = Debug|Any CPU + {CFAB1236-51C3-4A13-A57F-16022FD0A7EE}.Checked|x64.ActiveCfg = Debug|Any CPU + {CFAB1236-51C3-4A13-A57F-16022FD0A7EE}.Checked|x86.ActiveCfg = Debug|Any CPU + {4CBDF585-FD15-44E9-9795-1BED79BC4960}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4CBDF585-FD15-44E9-9795-1BED79BC4960}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4CBDF585-FD15-44E9-9795-1BED79BC4960}.Debug|arm.ActiveCfg = Debug|Any CPU + {4CBDF585-FD15-44E9-9795-1BED79BC4960}.Debug|arm64.ActiveCfg = Debug|Any CPU + {4CBDF585-FD15-44E9-9795-1BED79BC4960}.Debug|x64.ActiveCfg = Debug|Any CPU + {4CBDF585-FD15-44E9-9795-1BED79BC4960}.Debug|x64.Build.0 = Debug|Any CPU + {4CBDF585-FD15-44E9-9795-1BED79BC4960}.Debug|x86.ActiveCfg = Debug|Any CPU + {4CBDF585-FD15-44E9-9795-1BED79BC4960}.Debug|x86.Build.0 = Debug|Any CPU + {4CBDF585-FD15-44E9-9795-1BED79BC4960}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4CBDF585-FD15-44E9-9795-1BED79BC4960}.Release|Any CPU.Build.0 = Release|Any CPU + {4CBDF585-FD15-44E9-9795-1BED79BC4960}.Release|arm.ActiveCfg = Release|Any CPU + {4CBDF585-FD15-44E9-9795-1BED79BC4960}.Release|arm64.ActiveCfg = Release|Any CPU + {4CBDF585-FD15-44E9-9795-1BED79BC4960}.Release|x64.ActiveCfg = Release|Any CPU + {4CBDF585-FD15-44E9-9795-1BED79BC4960}.Release|x64.Build.0 = Release|Any CPU + {4CBDF585-FD15-44E9-9795-1BED79BC4960}.Release|x86.ActiveCfg = Release|Any CPU + {4CBDF585-FD15-44E9-9795-1BED79BC4960}.Release|x86.Build.0 = Release|Any CPU + {4CBDF585-FD15-44E9-9795-1BED79BC4960}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {4CBDF585-FD15-44E9-9795-1BED79BC4960}.Checked|arm.ActiveCfg = Debug|Any CPU + {4CBDF585-FD15-44E9-9795-1BED79BC4960}.Checked|arm64.ActiveCfg = Debug|Any CPU + {4CBDF585-FD15-44E9-9795-1BED79BC4960}.Checked|x64.ActiveCfg = Debug|Any CPU + {4CBDF585-FD15-44E9-9795-1BED79BC4960}.Checked|x86.ActiveCfg = Debug|Any CPU + {1CBBF9E2-4EBD-40F0-BB9E-66BCE3CA5AA8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1CBBF9E2-4EBD-40F0-BB9E-66BCE3CA5AA8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1CBBF9E2-4EBD-40F0-BB9E-66BCE3CA5AA8}.Debug|arm.ActiveCfg = Debug|Any CPU + {1CBBF9E2-4EBD-40F0-BB9E-66BCE3CA5AA8}.Debug|arm64.ActiveCfg = Debug|Any CPU + {1CBBF9E2-4EBD-40F0-BB9E-66BCE3CA5AA8}.Debug|x64.ActiveCfg = Debug|Any CPU + {1CBBF9E2-4EBD-40F0-BB9E-66BCE3CA5AA8}.Debug|x64.Build.0 = Debug|Any CPU + {1CBBF9E2-4EBD-40F0-BB9E-66BCE3CA5AA8}.Debug|x86.ActiveCfg = Debug|Any CPU + {1CBBF9E2-4EBD-40F0-BB9E-66BCE3CA5AA8}.Debug|x86.Build.0 = Debug|Any CPU + {1CBBF9E2-4EBD-40F0-BB9E-66BCE3CA5AA8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1CBBF9E2-4EBD-40F0-BB9E-66BCE3CA5AA8}.Release|Any CPU.Build.0 = Release|Any CPU + {1CBBF9E2-4EBD-40F0-BB9E-66BCE3CA5AA8}.Release|arm.ActiveCfg = Release|Any CPU + {1CBBF9E2-4EBD-40F0-BB9E-66BCE3CA5AA8}.Release|arm64.ActiveCfg = Release|Any CPU + {1CBBF9E2-4EBD-40F0-BB9E-66BCE3CA5AA8}.Release|x64.ActiveCfg = Release|Any CPU + {1CBBF9E2-4EBD-40F0-BB9E-66BCE3CA5AA8}.Release|x64.Build.0 = Release|Any CPU + {1CBBF9E2-4EBD-40F0-BB9E-66BCE3CA5AA8}.Release|x86.ActiveCfg = Release|Any CPU + {1CBBF9E2-4EBD-40F0-BB9E-66BCE3CA5AA8}.Release|x86.Build.0 = Release|Any CPU + {1CBBF9E2-4EBD-40F0-BB9E-66BCE3CA5AA8}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {1CBBF9E2-4EBD-40F0-BB9E-66BCE3CA5AA8}.Checked|arm.ActiveCfg = Debug|Any CPU + {1CBBF9E2-4EBD-40F0-BB9E-66BCE3CA5AA8}.Checked|arm64.ActiveCfg = Debug|Any CPU + {1CBBF9E2-4EBD-40F0-BB9E-66BCE3CA5AA8}.Checked|x64.ActiveCfg = Debug|Any CPU + {1CBBF9E2-4EBD-40F0-BB9E-66BCE3CA5AA8}.Checked|x86.ActiveCfg = Debug|Any CPU + {AF7CC240-B4D5-4C37-9B04-473CBCC52330}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AF7CC240-B4D5-4C37-9B04-473CBCC52330}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AF7CC240-B4D5-4C37-9B04-473CBCC52330}.Debug|arm.ActiveCfg = Debug|Any CPU + {AF7CC240-B4D5-4C37-9B04-473CBCC52330}.Debug|arm64.ActiveCfg = Debug|Any CPU + {AF7CC240-B4D5-4C37-9B04-473CBCC52330}.Debug|x64.ActiveCfg = Debug|Any CPU + {AF7CC240-B4D5-4C37-9B04-473CBCC52330}.Debug|x64.Build.0 = Debug|Any CPU + {AF7CC240-B4D5-4C37-9B04-473CBCC52330}.Debug|x86.ActiveCfg = Debug|Any CPU + {AF7CC240-B4D5-4C37-9B04-473CBCC52330}.Debug|x86.Build.0 = Debug|Any CPU + {AF7CC240-B4D5-4C37-9B04-473CBCC52330}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AF7CC240-B4D5-4C37-9B04-473CBCC52330}.Release|Any CPU.Build.0 = Release|Any CPU + {AF7CC240-B4D5-4C37-9B04-473CBCC52330}.Release|arm.ActiveCfg = Release|Any CPU + {AF7CC240-B4D5-4C37-9B04-473CBCC52330}.Release|arm64.ActiveCfg = Release|Any CPU + {AF7CC240-B4D5-4C37-9B04-473CBCC52330}.Release|x64.ActiveCfg = Release|Any CPU + {AF7CC240-B4D5-4C37-9B04-473CBCC52330}.Release|x64.Build.0 = Release|Any CPU + {AF7CC240-B4D5-4C37-9B04-473CBCC52330}.Release|x86.ActiveCfg = Release|Any CPU + {AF7CC240-B4D5-4C37-9B04-473CBCC52330}.Release|x86.Build.0 = Release|Any CPU + {AF7CC240-B4D5-4C37-9B04-473CBCC52330}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {AF7CC240-B4D5-4C37-9B04-473CBCC52330}.Checked|arm.ActiveCfg = Debug|Any CPU + {AF7CC240-B4D5-4C37-9B04-473CBCC52330}.Checked|arm64.ActiveCfg = Debug|Any CPU + {AF7CC240-B4D5-4C37-9B04-473CBCC52330}.Checked|x64.ActiveCfg = Debug|Any CPU + {AF7CC240-B4D5-4C37-9B04-473CBCC52330}.Checked|x86.ActiveCfg = Debug|Any CPU + {3F5ABC5D-42DE-44C4-BEFC-741F4974C744}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3F5ABC5D-42DE-44C4-BEFC-741F4974C744}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3F5ABC5D-42DE-44C4-BEFC-741F4974C744}.Debug|arm.ActiveCfg = Debug|Any CPU + {3F5ABC5D-42DE-44C4-BEFC-741F4974C744}.Debug|arm64.ActiveCfg = Debug|Any CPU + {3F5ABC5D-42DE-44C4-BEFC-741F4974C744}.Debug|x64.ActiveCfg = Debug|Any CPU + {3F5ABC5D-42DE-44C4-BEFC-741F4974C744}.Debug|x64.Build.0 = Debug|Any CPU + {3F5ABC5D-42DE-44C4-BEFC-741F4974C744}.Debug|x86.ActiveCfg = Debug|Any CPU + {3F5ABC5D-42DE-44C4-BEFC-741F4974C744}.Debug|x86.Build.0 = Debug|Any CPU + {3F5ABC5D-42DE-44C4-BEFC-741F4974C744}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3F5ABC5D-42DE-44C4-BEFC-741F4974C744}.Release|Any CPU.Build.0 = Release|Any CPU + {3F5ABC5D-42DE-44C4-BEFC-741F4974C744}.Release|arm.ActiveCfg = Release|Any CPU + {3F5ABC5D-42DE-44C4-BEFC-741F4974C744}.Release|arm64.ActiveCfg = Release|Any CPU + {3F5ABC5D-42DE-44C4-BEFC-741F4974C744}.Release|x64.ActiveCfg = Release|Any CPU + {3F5ABC5D-42DE-44C4-BEFC-741F4974C744}.Release|x64.Build.0 = Release|Any CPU + {3F5ABC5D-42DE-44C4-BEFC-741F4974C744}.Release|x86.ActiveCfg = Release|Any CPU + {3F5ABC5D-42DE-44C4-BEFC-741F4974C744}.Release|x86.Build.0 = Release|Any CPU + {3F5ABC5D-42DE-44C4-BEFC-741F4974C744}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {3F5ABC5D-42DE-44C4-BEFC-741F4974C744}.Checked|arm.ActiveCfg = Debug|Any CPU + {3F5ABC5D-42DE-44C4-BEFC-741F4974C744}.Checked|arm64.ActiveCfg = Debug|Any CPU + {3F5ABC5D-42DE-44C4-BEFC-741F4974C744}.Checked|x64.ActiveCfg = Debug|Any CPU + {3F5ABC5D-42DE-44C4-BEFC-741F4974C744}.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} - {E7A05515-DABE-4C09-83CB-CE84EFDCD4CC} = {28140562-A65A-48E9-ABAB-53BA939084F0} - {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} + {71AB8240-F179-4B21-A8BE-8BE6CD774ED9} = {5B542214-BAF3-4FA7-8424-D0E9C631A2E9} {AF7BA66D-EA0E-4755-8DA8-4CFE9B935F83} = {FD72C125-C10D-457B-8AFC-6B4E5237AF6A} {9DF0247E-5B81-4EF3-82CA-3E70B3A56742} = {FD72C125-C10D-457B-8AFC-6B4E5237AF6A} {FB17AC52-1633-4845-932B-9218DF895957} = {FD72C125-C10D-457B-8AFC-6B4E5237AF6A} + {43C40A0B-0B0E-4D27-8534-11CD5A540F7C} = {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} @@ -678,16 +799,28 @@ 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} + {21791340-49C4-4C07-97FD-CAA1B72D3256} = {28140562-A65A-48E9-ABAB-53BA939084F0} + {E7A05515-DABE-4C09-83CB-CE84EFDCD4CC} = {28140562-A65A-48E9-ABAB-53BA939084F0} + {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} {CF79B5AE-38CB-4B80-BF92-CF634C0B7EC3} = {F362E63A-2B1A-445B-B198-3071D7DDE8CF} - {5DB600A4-08C4-485B-A1D5-E4A4C593FB0E} = {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} {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} {25E8AB9D-2D10-44F5-9F83-5A5134526771} = {5B2B5E7E-A2FB-4095-9E79-404BF53E0133} {82728202-1098-4E16-B598-5762EAF67D08} = {5B2B5E7E-A2FB-4095-9E79-404BF53E0133} + {CFAB1236-51C3-4A13-A57F-16022FD0A7EE} = {13818769-DC01-4715-9590-E000D03E42A9} + {4CBDF585-FD15-44E9-9795-1BED79BC4960} = {13818769-DC01-4715-9590-E000D03E42A9} + {13818769-DC01-4715-9590-E000D03E42A9} = {67DCB1C2-0B95-40B6-ACE8-9812BF57EB19} + {1CBBF9E2-4EBD-40F0-BB9E-66BCE3CA5AA8} = {04D0E381-5B43-42C0-8E08-FADBFCECB353} + {AF7CC240-B4D5-4C37-9B04-473CBCC52330} = {04D0E381-5B43-42C0-8E08-FADBFCECB353} + {04D0E381-5B43-42C0-8E08-FADBFCECB353} = {67DCB1C2-0B95-40B6-ACE8-9812BF57EB19} + {3F5ABC5D-42DE-44C4-BEFC-741F4974C744} = {F65030D7-DDBD-4D4C-B6E3-D3C0DD7FD569} + {F65030D7-DDBD-4D4C-B6E3-D3C0DD7FD569} = {67DCB1C2-0B95-40B6-ACE8-9812BF57EB19} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {19706846-1F47-42ED-B649-B0982EE96E6B} diff --git a/src/libraries/System.Runtime/ref/System.Runtime.cs b/src/libraries/System.Runtime/ref/System.Runtime.cs index 8f7f83d670eaec..b8485d516fa025 100644 --- a/src/libraries/System.Runtime/ref/System.Runtime.cs +++ b/src/libraries/System.Runtime/ref/System.Runtime.cs @@ -2722,7 +2722,6 @@ public static void SuppressFinalize(object obj) { } public static void WaitForPendingFinalizers() { } public static TimeSpan GetTotalPauseDuration() { throw null; } public static System.Collections.Generic.IReadOnlyDictionary GetConfigurationVariables() { throw null; } - [System.Runtime.Versioning.RequiresPreviewFeaturesAttribute("RefreshMemoryLimit is in preview.")] public static void RefreshMemoryLimit() { throw null; } } @@ -9606,7 +9605,6 @@ public void Delete(bool recursive) { } public System.IO.FileSystemInfo[] GetFileSystemInfos(string searchPattern, System.IO.EnumerationOptions enumerationOptions) { throw null; } public System.IO.FileSystemInfo[] GetFileSystemInfos(string searchPattern, System.IO.SearchOption searchOption) { throw null; } public void MoveTo(string destDirName) { } - public override string ToString() { throw null; } } public partial class DirectoryNotFoundException : System.IO.IOException { @@ -13407,6 +13405,7 @@ public enum Architecture LoongArch64 = 6, Armv6 = 7, Ppc64le = 8, + RiscV64 = 9, } public enum CharSet { diff --git a/src/libraries/System.Runtime/tests/Hybrid/System.Runtime.IOS.Tests.csproj b/src/libraries/System.Runtime/tests/Hybrid/System.Runtime.IOS.Tests.csproj new file mode 100644 index 00000000000000..ca2e3b7856cda5 --- /dev/null +++ b/src/libraries/System.Runtime/tests/Hybrid/System.Runtime.IOS.Tests.csproj @@ -0,0 +1,19 @@ + + + $(NetCoreAppCurrent)-ios;$(NetCoreAppCurrent)-tvos;$(NetCoreAppCurrent)-maccatalyst + true + true + true + true + + + + $(WithoutCategories);AdditionalTimezoneChecks + + + + + + + + diff --git a/src/libraries/System.Runtime/tests/System/ArrayTests.cs b/src/libraries/System.Runtime/tests/System/ArrayTests.cs index 7ef45b6401ad0e..1d1272f8e9e054 100644 --- a/src/libraries/System.Runtime/tests/System/ArrayTests.cs +++ b/src/libraries/System.Runtime/tests/System/ArrayTests.cs @@ -7,6 +7,7 @@ using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; +using System.Threading.Tasks; using Microsoft.DotNet.XUnitExtensions; using Xunit; using Xunit.Abstractions; @@ -4299,6 +4300,8 @@ public class Bar : IEquatable public string Value { get; set; } public bool Equals(Bar other) => string.Equals(Value, other.Value); + public override bool Equals(object other) => Equals(other as Bar); + public override int GetHashCode() => Value.GetHashCode(); } public class Foo diff --git a/src/libraries/System.Runtime/tests/System/Attributes.cs b/src/libraries/System.Runtime/tests/System/Attributes.cs index 0b75b48ea133e7..bbf2705098083f 100644 --- a/src/libraries/System.Runtime/tests/System/Attributes.cs +++ b/src/libraries/System.Runtime/tests/System/Attributes.cs @@ -327,6 +327,7 @@ public static class GetCustomAttribute { [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91597", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void customAttributeCount() { List customAttributes = typeof(GetCustomAttribute).Module.CustomAttributes.ToList(); diff --git a/src/libraries/System.Runtime/tests/System/Diagnostics/StackTraceHiddenAttributeTests.cs b/src/libraries/System.Runtime/tests/System/Diagnostics/StackTraceHiddenAttributeTests.cs index 24119e52d2b3c1..90371c32bd2453 100644 --- a/src/libraries/System.Runtime/tests/System/Diagnostics/StackTraceHiddenAttributeTests.cs +++ b/src/libraries/System.Runtime/tests/System/Diagnostics/StackTraceHiddenAttributeTests.cs @@ -8,7 +8,6 @@ namespace System.Tests { [ActiveIssue("https://github.com/dotnet/runtime/issues/50957", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsMonoAOT))] - [ActiveIssue("https://github.com/dotnet/runtimelab/issues/851", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))] public class StackTraceHiddenAttributeTests { [Fact] diff --git a/src/libraries/System.Runtime/tests/System/GCTests.cs b/src/libraries/System.Runtime/tests/System/GCTests.cs index d161b3bbdde5bb..73a379402a233c 100644 --- a/src/libraries/System.Runtime/tests/System/GCTests.cs +++ b/src/libraries/System.Runtime/tests/System/GCTests.cs @@ -818,7 +818,6 @@ public static void GetAllocatedBytesForCurrentThread(int size) private static bool IsNotArmProcessAndRemoteExecutorSupported => PlatformDetection.IsNotArmProcess && RemoteExecutor.IsSupported; - [ActiveIssue("https://github.com/dotnet/runtime/issues/64935", TestPlatforms.FreeBSD)] [ActiveIssue("https://github.com/dotnet/runtime/issues/73167", TestRuntimes.Mono)] [ConditionalFact(nameof(IsNotArmProcessAndRemoteExecutorSupported))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/29434")] public static void GetGCMemoryInfo() diff --git a/src/libraries/System.Runtime/tests/System/TimeZoneInfoTests.cs b/src/libraries/System.Runtime/tests/System/TimeZoneInfoTests.cs index 7efe9c0cde1dcf..d70407ffb5b274 100644 --- a/src/libraries/System.Runtime/tests/System/TimeZoneInfoTests.cs +++ b/src/libraries/System.Runtime/tests/System/TimeZoneInfoTests.cs @@ -89,7 +89,7 @@ public static void Names() // Name abbreviations, if available, are used instead public static IEnumerable Platform_TimeZoneNamesTestData() { - if (PlatformDetection.IsBrowser || PlatformDetection.IsiOS || PlatformDetection.IstvOS) + if (PlatformDetection.IsBrowser || (!PlatformDetection.IsHybridGlobalizationOnOSX && (PlatformDetection.IsMacCatalyst || PlatformDetection.IsiOS || PlatformDetection.IstvOS))) return new TheoryData { { TimeZoneInfo.FindSystemTimeZoneById(s_strPacific), "(UTC-08:00) America/Los_Angeles", null, "PST", "PDT" }, @@ -100,6 +100,16 @@ public static IEnumerable Platform_TimeZoneNamesTestData() { s_NewfoundlandTz, "(UTC-03:30) America/St_Johns", null, "NST", "NDT" }, { s_catamarcaTz, "(UTC-03:00) America/Argentina/Catamarca", null, "-03", "-02" } }; + else if (PlatformDetection.IsHybridGlobalizationOnOSX && (PlatformDetection.IsMacCatalyst || PlatformDetection.IsiOS || PlatformDetection.IstvOS)) + return new TheoryData + { + { TimeZoneInfo.FindSystemTimeZoneById(s_strPacific), "(UTC-08:00) America/Los_Angeles", null, "Pacific Standard Time", "Pacific Daylight Time" }, + { TimeZoneInfo.FindSystemTimeZoneById(s_strSydney), "(UTC+10:00) Australia/Sydney", null, "Australian Eastern Standard Time", "Australian Eastern Daylight Time" }, + { TimeZoneInfo.FindSystemTimeZoneById(s_strPerth), "(UTC+08:00) Australia/Perth", null, "Australian Western Standard Time", "Australian Western Daylight Time" }, + { TimeZoneInfo.FindSystemTimeZoneById(s_strIran), "(UTC+03:30) Asia/Tehran", "(UTC+03:30) Iran Standard Time (Tehran)", "Iran Standard Time", "Iran Daylight Time" }, + { s_NewfoundlandTz, "(UTC-03:30) America/St_Johns", null, "Newfoundland Standard Time", "Newfoundland Daylight Time" }, + { s_catamarcaTz, "(UTC-03:00) America/Argentina/Catamarca", null, "Argentina Standard Time", "Argentina Summer Time" } + }; else if (PlatformDetection.IsWindows) return new TheoryData { diff --git a/src/libraries/System.Runtime/tests/System/Type/TypePropertyTests.cs b/src/libraries/System.Runtime/tests/System/Type/TypePropertyTests.cs index 04dcbafe1f1664..066711e48297e4 100644 --- a/src/libraries/System.Runtime/tests/System/Type/TypePropertyTests.cs +++ b/src/libraries/System.Runtime/tests/System/Type/TypePropertyTests.cs @@ -406,7 +406,7 @@ public abstract class StructTypeTestBase : TypePropertyTestBase public abstract class InterfaceTypeTestBase : TypePropertyTestBase { - public override TypeAttributes Attributes => TypeAttributes.AutoLayout | TypeAttributes.AnsiClass | TypeAttributes.Class | TypeAttributes.Public | TypeAttributes.ClassSemanticsMask | TypeAttributes.Abstract; + public override TypeAttributes Attributes => TypeAttributes.AutoLayout | TypeAttributes.AnsiClass | TypeAttributes.Class | TypeAttributes.Public | TypeAttributes.ClassSemanticsMask | TypeAttributes.Abstract | TypeAttributes.BeforeFieldInit; public override Type BaseType => null; } diff --git a/src/libraries/System.Runtime/tests/System/Type/TypeTests.cs b/src/libraries/System.Runtime/tests/System/Type/TypeTests.cs index ed4fd5ec8d59e9..9ef71efd77a68c 100644 --- a/src/libraries/System.Runtime/tests/System/Type/TypeTests.cs +++ b/src/libraries/System.Runtime/tests/System/Type/TypeTests.cs @@ -1053,6 +1053,24 @@ public static IEnumerable GetInterfaceMap_TestData() } }; yield return new object[] + { + typeof(DIMs.I2), + typeof(DIMs.C3), + new Tuple[] + { + new Tuple(typeof(DIMs.I2).GetMethod("System.Tests.TypeTestsExtended.DIMs.I1.M", BindingFlags.Instance | BindingFlags.NonPublic), null) + } + }; + yield return new object[] + { + typeof(DIMs.I1), + typeof(DIMs.C3), + new Tuple[] + { + new Tuple(typeof(DIMs.I1).GetMethod("M"), typeof(DIMs.I3).GetMethod("System.Tests.TypeTestsExtended.DIMs.I1.M", BindingFlags.Instance | BindingFlags.NonPublic)) + } + }; + yield return new object[] { typeof(DIMs.I4), typeof(DIMs.C4), @@ -1062,6 +1080,15 @@ public static IEnumerable GetInterfaceMap_TestData() } }; yield return new object[] + { + typeof(DIMs.I3), + typeof(DIMs.C4), + new Tuple[] + { + new Tuple(typeof(DIMs.I3).GetMethod("System.Tests.TypeTestsExtended.DIMs.I1.M", BindingFlags.Instance | BindingFlags.NonPublic), typeof(DIMs.I3).GetMethod("System.Tests.TypeTestsExtended.DIMs.I1.M", BindingFlags.Instance | BindingFlags.NonPublic)) + } + }; + yield return new object[] { typeof(DIMs.I2), typeof(DIMs.C4), @@ -1070,6 +1097,148 @@ public static IEnumerable GetInterfaceMap_TestData() new Tuple(typeof(DIMs.I2).GetMethod("System.Tests.TypeTestsExtended.DIMs.I1.M", BindingFlags.Instance | BindingFlags.NonPublic), null) } }; + yield return new object[] + { + typeof(DIMs.I1), + typeof(DIMs.C4), + new Tuple[] + { + new Tuple(typeof(DIMs.I1).GetMethod("M"), typeof(DIMs.C4).GetMethod("M")) + } + }; + + // Test all combinations of the following: + // Static method + // Implementation by having the same name, explicit implementation, & default implementation (where applicable - only level 2) + // Non-generic interface, generic interface + // Non-generic type, generic type + // 3 levels of inheritance (of the interfaces): 1 - static abstract method, 2 - add a default implementation, 3 - re-abstractify it + // Checks that all the applicable interfaces are working properly + (Type Type, bool IncludePrefix, bool AnyTarget, Type InterfaceGenericParameter, int Index)[] classTypes = new (Type, bool, bool, Type, int)[] + { + // List of every type we are going to test + // (Type, whether it's implemented explicitly, whether it's not implemented in the level 2 interface, the generic parameter for Ix, the level) + (typeof(SIMs.C1), false, true, typeof(int), 1), + (typeof(SIMs.C1Explicit), true, true, typeof(int), 1), + (typeof(SIMs.C1), false, true, typeof(string), 1), + (typeof(SIMs.C1Explicit), true, true, typeof(string), 1), + (typeof(SIMs.C1<>), false, true, typeof(SIMs.C1<>).GetGenericArguments()[0], 1), + (typeof(SIMs.C1Explicit<>), true, true, typeof(SIMs.C1Explicit<>).GetGenericArguments()[0], 1), + (typeof(SIMs.C2Implicit), false, false, typeof(int), 2), + (typeof(SIMs.C2), false, true, typeof(int), 2), + (typeof(SIMs.C2Explicit), true, true, typeof(int), 2), + (typeof(SIMs.C2Implicit), false, false, typeof(string), 2), + (typeof(SIMs.C2), false, true, typeof(string), 2), + (typeof(SIMs.C2Explicit), true, true, typeof(string), 2), + (typeof(SIMs.C2Implicit<>), false, false, typeof(SIMs.C2Implicit<>).GetGenericArguments()[0], 2), + (typeof(SIMs.C2<>), false, true, typeof(SIMs.C2<>).GetGenericArguments()[0], 2), + (typeof(SIMs.C2Explicit<>), true, true, typeof(SIMs.C2Explicit<>).GetGenericArguments()[0], 2), + (typeof(SIMs.C3), false, true, typeof(int), 3), + (typeof(SIMs.C3Explicit), true, true, typeof(int), 3), + (typeof(SIMs.C3), false, true, typeof(string), 3), + (typeof(SIMs.C3Explicit), true, true, typeof(string), 3), + (typeof(SIMs.C3<>), false, true, typeof(SIMs.C3<>).GetGenericArguments()[0], 3), + (typeof(SIMs.C3Explicit<>), true, true, typeof(SIMs.C3Explicit<>).GetGenericArguments()[0], 3), + }; + foreach ((Type Type, bool IncludePrefix, bool AnyTarget, Type InterfaceGenericParameter, int Index) classType in classTypes) + { + BindingFlags bindingFlags = BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic; + + // This is the member name of the explicit interface implementation method in the class for the generic interface + string level1MethodNamePrefixTyped = "System.Tests.TypeTestsExtended.SIMs.I1<" + (classType.Type.GetGenericArguments().Length == 0 ? "System.Int32" : "S") + ">."; + + // Check we have the expected implementation for the level 1 interfaces (abstract definitions - M and G methods) + Type level1GenericInterface = typeof(SIMs.I1<>).MakeGenericType(classType.InterfaceGenericParameter); + Type level2GenericInterface = typeof(SIMs.I2<>).MakeGenericType(classType.InterfaceGenericParameter); + Type level3GenericInterface = typeof(SIMs.I3<>).MakeGenericType(classType.InterfaceGenericParameter); + foreach ((Type Type, Type Level2InterfaceType, string MethodNamePrefix, string MethodNamePrefixTyped) interfaceType in new (Type, Type, string, string)[] + { + (typeof(SIMs.I1), typeof(SIMs.I2), "System.Tests.TypeTestsExtended.SIMs.I1.", "System.Tests.TypeTestsExtended.SIMs.I1."), + (level1GenericInterface, level2GenericInterface, "System.Tests.TypeTestsExtended.SIMs.I1.", level1MethodNamePrefixTyped), + }) + { + // Look up the interface method which should be implemented + MethodInfo MInterface = interfaceType.Type.GetMethod("M", bindingFlags); + MethodInfo GInterface = interfaceType.Type.GetMethod("G", bindingFlags); + + // Look up the implementation + MethodInfo MTarget, GTarget; + if (classType.AnyTarget) + { + // The class implements it, either implicitly or explicitly (if IncludePrefix is specified) + MTarget = classType.Type.GetMethod((classType.IncludePrefix ? interfaceType.MethodNamePrefixTyped : "") + "M", bindingFlags); + GTarget = classType.Type.GetMethod((classType.IncludePrefix ? interfaceType.MethodNamePrefixTyped : "") + "G", bindingFlags); + } + else + { + // [ActiveIssue("https://github.com/dotnet/runtime/issues/90863")] + if (classType.Type == typeof(SIMs.C2Implicit) && interfaceType.Type == typeof(SIMs.I1)) continue; + + // It's implemented implicitly by the level 2 interface + MTarget = interfaceType.Level2InterfaceType.GetMethod(interfaceType.MethodNamePrefix + "M", bindingFlags); + GTarget = interfaceType.Level2InterfaceType.GetMethod(interfaceType.MethodNamePrefix + "G", bindingFlags); + } + + // Return our test case + yield return new object[] + { + interfaceType.Type, + classType.Type, + new Tuple[] + { + new Tuple(MInterface, MTarget), + new Tuple(GInterface, GTarget) + } + }; + } + + // Check we have the expected implementation for the level 2 interfaces (virtual explicit default implementations - none) + if (classType.Index >= 2) + { + // There should be no methods for these interfaces + // Return our test cases + yield return new object[] + { + typeof(SIMs.I2), + classType.Type, + new Tuple[0] + }; + yield return new object[] + { + level2GenericInterface, + classType.Type, + new Tuple[0] + }; + } + + // Check we have the expected implementation for the level 3 interfaces (abstract explicit implementations - I1.M and I1.G methods) + // Fails on mono: [ActiveIssue("https://github.com/dotnet/runtime/issues/91027")] + if (!PlatformDetection.IsMonoRuntime && classType.Index >= 3) + { + foreach ((Type Type, string MethodNamePrefix) interfaceType in new (Type, string)[] + { + (typeof(SIMs.I3), "System.Tests.TypeTestsExtended.SIMs.I1."), + (level3GenericInterface, "System.Tests.TypeTestsExtended.SIMs.I1."), + }) + { + // There should be no implementation for these methods - null + MethodInfo MInterface = interfaceType.Type.GetMethod(interfaceType.MethodNamePrefix + "M", bindingFlags); + MethodInfo GInterface = interfaceType.Type.GetMethod(interfaceType.MethodNamePrefix + "G", bindingFlags); + + // Return our test cases + yield return new object[] + { + interfaceType.Type, + classType.Type, + new Tuple[] + { + new Tuple(MInterface, null), + new Tuple(GInterface, null) + } + }; + } + } + } } [ActiveIssue("https://github.com/dotnet/runtime/issues/89157", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))] @@ -1167,6 +1336,136 @@ internal abstract class C4 : I4 public abstract void M(); } } + + static class SIMs + { + internal interface I1 + { + static abstract void M(); + static abstract void G(); + } + internal interface I1 + { + static abstract void M(); + static abstract void G(); + } + + internal class C1 : I1, I1 + { + public static void M() { } + public static void G() { } + } + + internal class C1Explicit : I1, I1 + { + static void I1.M() { } + static void I1.G() { } + static void I1.M() { } + static void I1.G() { } + } + + internal class C1 : I1, I1 + { + public static void M() { } + public static void G() { } + } + + internal class C1Explicit : I1, I1 + { + static void I1.M() { } + static void I1.G() { } + static void I1.M() { } + static void I1.G() { } + } + + + internal interface I2 : I1 + { + // add a default implementation + static void I1.M() { } + static void I1.G() { } + } + internal interface I2 : I1 + { + // add a default implementation + static void I1.M() { } + static void I1.G() { } + } + + internal class C2Implicit : I2, I2 { } + + internal class C2 : I2, I2 + { + public static void M() { } + public static void G() { } + } + + internal class C2Explicit : I2, I2 + { + static void I1.M() { } + static void I1.G() { } + static void I1.M() { } + static void I1.G() { } + } + + internal class C2Implicit : I2, I2 { } + + internal class C2 : I2, I2 + { + public static void M() { } + public static void G() { } + } + + internal class C2Explicit : I2, I2 + { + static void I1.M() { } + static void I1.G() { } + static void I1.M() { } + static void I1.G() { } + } + + + internal interface I3 : I2 + { + // reabstract it + static abstract void I1.M(); + static abstract void I1.G(); + } + internal interface I3 : I2 + { + // reabstract it + static abstract void I1.M(); + static abstract void I1.G(); + } + + internal class C3 : I3, I3 + { + public static void M() { } + public static void G() { } + } + + internal class C3Explicit : I3, I3 + { + static void I1.M() { } + static void I1.G() { } + static void I1.M() { } + static void I1.G() { } + } + + internal class C3 : I3, I3 + { + public static void M() { } + public static void G() { } + } + + internal class C3Explicit : I3, I3 + { + static void I1.M() { } + static void I1.G() { } + static void I1.M() { } + static void I1.G() { } + } + } #endregion [Fact] diff --git a/src/libraries/System.Runtime/tests/System/Uri.MethodsTests.cs b/src/libraries/System.Runtime/tests/System/Uri.MethodsTests.cs index 021fd3b95f19d4..5a393231204e59 100644 --- a/src/libraries/System.Runtime/tests/System/Uri.MethodsTests.cs +++ b/src/libraries/System.Runtime/tests/System/Uri.MethodsTests.cs @@ -196,6 +196,11 @@ public static IEnumerable IsBaseOfTestData() yield return new object[] { new Uri("file://C:/path/path/file"), new Uri("file://D:/path/path/path"), false }; yield return new object[] { new Uri("file://C:/path/path/file"), new Uri("http://host/path/path/file"), false }; yield return new object[] { new Uri("file://C:/path/path/file"), new Uri("path/path/file", UriKind.Relative), true }; + + yield return new object[] { new Uri("https://user@domain.com"), new Uri("https://domain.com"), true }; + yield return new object[] { new Uri("https://user@domain.com"), new Uri("http://domain.com"), false }; + yield return new object[] { new Uri("https://user1@domain.com"), new Uri("https://user2@domain.com"), true }; + yield return new object[] { new Uri("https://domain.com"), new Uri("https://user@domain.com"), true }; } [Theory] diff --git a/src/libraries/System.Security.AccessControl/System.Security.AccessControl.sln b/src/libraries/System.Security.AccessControl/System.Security.AccessControl.sln index 3f128cecb6ae52..4a8661378ce816 100644 --- a/src/libraries/System.Security.AccessControl/System.Security.AccessControl.sln +++ b/src/libraries/System.Security.AccessControl/System.Security.AccessControl.sln @@ -25,6 +25,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Claims", ". EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Principal.Windows", "..\System.Security.Principal.Windows\ref\System.Security.Principal.Windows.csproj", "{2593060B-10ED-40C1-8943-3C016EFD8928}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{81E36AA4-93BB-4BB9-9AB5-C8BBAE2FD7C3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{FF6004AA-C38E-4083-80CC-D6515A41937E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{68A0DB6E-97AB-433F-8FE0-30CDAB9E0E3C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{EF1F5D22-5888-4C65-881D-FA34D5A1C9FB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{45611BC7-50D2-42A9-BA9C-94DA5ADA3994}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{4ED5729F-DB06-4332-9876-354C28894824}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{BF0DEEC5-58A6-4156-B44B-E3C248A01523}" @@ -33,6 +43,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{5A0B73BB-E1B EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{82996086-0F1B-4E0F-9121-07C396EF0EC7}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{E740D6D1-02CB-4842-A440-025C08D5BFB1}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{1119205E-8DB4-4506-A47E-309F63443E09}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{25F0BAE7-C932-46B3-8E5C-64759A0B2B2F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{78FAC980-2414-44E2-BED7-322089791D13}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -91,6 +109,26 @@ Global {2593060B-10ED-40C1-8943-3C016EFD8928}.Debug|Any CPU.Build.0 = Debug|Any CPU {2593060B-10ED-40C1-8943-3C016EFD8928}.Release|Any CPU.ActiveCfg = Release|Any CPU {2593060B-10ED-40C1-8943-3C016EFD8928}.Release|Any CPU.Build.0 = Release|Any CPU + {81E36AA4-93BB-4BB9-9AB5-C8BBAE2FD7C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {81E36AA4-93BB-4BB9-9AB5-C8BBAE2FD7C3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {81E36AA4-93BB-4BB9-9AB5-C8BBAE2FD7C3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {81E36AA4-93BB-4BB9-9AB5-C8BBAE2FD7C3}.Release|Any CPU.Build.0 = Release|Any CPU + {FF6004AA-C38E-4083-80CC-D6515A41937E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FF6004AA-C38E-4083-80CC-D6515A41937E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FF6004AA-C38E-4083-80CC-D6515A41937E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FF6004AA-C38E-4083-80CC-D6515A41937E}.Release|Any CPU.Build.0 = Release|Any CPU + {68A0DB6E-97AB-433F-8FE0-30CDAB9E0E3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {68A0DB6E-97AB-433F-8FE0-30CDAB9E0E3C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {68A0DB6E-97AB-433F-8FE0-30CDAB9E0E3C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {68A0DB6E-97AB-433F-8FE0-30CDAB9E0E3C}.Release|Any CPU.Build.0 = Release|Any CPU + {EF1F5D22-5888-4C65-881D-FA34D5A1C9FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EF1F5D22-5888-4C65-881D-FA34D5A1C9FB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EF1F5D22-5888-4C65-881D-FA34D5A1C9FB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EF1F5D22-5888-4C65-881D-FA34D5A1C9FB}.Release|Any CPU.Build.0 = Release|Any CPU + {45611BC7-50D2-42A9-BA9C-94DA5ADA3994}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {45611BC7-50D2-42A9-BA9C-94DA5ADA3994}.Debug|Any CPU.Build.0 = Debug|Any CPU + {45611BC7-50D2-42A9-BA9C-94DA5ADA3994}.Release|Any CPU.ActiveCfg = Release|Any CPU + {45611BC7-50D2-42A9-BA9C-94DA5ADA3994}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -109,6 +147,14 @@ Global {3CA4B29C-71BF-4709-8DA4-E1466A80FDB1} = {82996086-0F1B-4E0F-9121-07C396EF0EC7} {AABA6C21-1DC9-471F-979E-F35930A106F3} = {82996086-0F1B-4E0F-9121-07C396EF0EC7} {CDB32066-5BD2-46EB-AFF1-07554FBF6942} = {82996086-0F1B-4E0F-9121-07C396EF0EC7} + {81E36AA4-93BB-4BB9-9AB5-C8BBAE2FD7C3} = {E740D6D1-02CB-4842-A440-025C08D5BFB1} + {FF6004AA-C38E-4083-80CC-D6515A41937E} = {E740D6D1-02CB-4842-A440-025C08D5BFB1} + {E740D6D1-02CB-4842-A440-025C08D5BFB1} = {78FAC980-2414-44E2-BED7-322089791D13} + {68A0DB6E-97AB-433F-8FE0-30CDAB9E0E3C} = {1119205E-8DB4-4506-A47E-309F63443E09} + {EF1F5D22-5888-4C65-881D-FA34D5A1C9FB} = {1119205E-8DB4-4506-A47E-309F63443E09} + {1119205E-8DB4-4506-A47E-309F63443E09} = {78FAC980-2414-44E2-BED7-322089791D13} + {45611BC7-50D2-42A9-BA9C-94DA5ADA3994} = {25F0BAE7-C932-46B3-8E5C-64759A0B2B2F} + {25F0BAE7-C932-46B3-8E5C-64759A0B2B2F} = {78FAC980-2414-44E2-BED7-322089791D13} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {7F4F25A0-74DA-46ED-BC2B-99607E973B0D} diff --git a/src/libraries/System.Security.Claims/System.Security.Claims.sln b/src/libraries/System.Security.Claims/System.Security.Claims.sln index 55de2938f02a50..21279bc42e529d 100644 --- a/src/libraries/System.Security.Claims/System.Security.Claims.sln +++ b/src/libraries/System.Security.Claims/System.Security.Claims.sln @@ -13,6 +13,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Claims", "s EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Claims.Tests", "tests\System.Security.Claims.Tests.csproj", "{12F9C4AA-F238-42A1-9324-2C3CB643595B}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{B66A00DC-5203-490F-BA3D-779859BD1731}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{EC9B5E06-F5F4-4F38-8728-8EA4F339C11D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{5F299B9B-5794-4BA6-9F8E-3B6C73DC8D6A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{DD4D0E10-D8F8-4DA8-A68B-98DD46F08E5E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{12282875-3522-4E87-B8EC-1C5DE7D853B6}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{58661765-A62B-4A5F-9950-A56DEFC0CDB0}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{66B48EC0-590C-40BD-A4E3-DB7DBA977B47}" @@ -21,6 +31,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{3B6EF051-7EB EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{3D2906A4-D990-48BA-B038-3465E82F36A4}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{6DDCF01C-7689-493C-BB76-B3B084449564}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{1924AF30-E568-4145-A17E-520B08790CC0}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{D3B646DF-C332-42CE-B2EA-599008805004}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{3BFB482F-3B47-4A2C-A588-B5325F513DC5}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -55,6 +73,26 @@ Global {12F9C4AA-F238-42A1-9324-2C3CB643595B}.Debug|Any CPU.Build.0 = Debug|Any CPU {12F9C4AA-F238-42A1-9324-2C3CB643595B}.Release|Any CPU.ActiveCfg = Release|Any CPU {12F9C4AA-F238-42A1-9324-2C3CB643595B}.Release|Any CPU.Build.0 = Release|Any CPU + {B66A00DC-5203-490F-BA3D-779859BD1731}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B66A00DC-5203-490F-BA3D-779859BD1731}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B66A00DC-5203-490F-BA3D-779859BD1731}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B66A00DC-5203-490F-BA3D-779859BD1731}.Release|Any CPU.Build.0 = Release|Any CPU + {EC9B5E06-F5F4-4F38-8728-8EA4F339C11D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EC9B5E06-F5F4-4F38-8728-8EA4F339C11D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EC9B5E06-F5F4-4F38-8728-8EA4F339C11D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EC9B5E06-F5F4-4F38-8728-8EA4F339C11D}.Release|Any CPU.Build.0 = Release|Any CPU + {5F299B9B-5794-4BA6-9F8E-3B6C73DC8D6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5F299B9B-5794-4BA6-9F8E-3B6C73DC8D6A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5F299B9B-5794-4BA6-9F8E-3B6C73DC8D6A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5F299B9B-5794-4BA6-9F8E-3B6C73DC8D6A}.Release|Any CPU.Build.0 = Release|Any CPU + {DD4D0E10-D8F8-4DA8-A68B-98DD46F08E5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DD4D0E10-D8F8-4DA8-A68B-98DD46F08E5E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DD4D0E10-D8F8-4DA8-A68B-98DD46F08E5E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DD4D0E10-D8F8-4DA8-A68B-98DD46F08E5E}.Release|Any CPU.Build.0 = Release|Any CPU + {12282875-3522-4E87-B8EC-1C5DE7D853B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {12282875-3522-4E87-B8EC-1C5DE7D853B6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {12282875-3522-4E87-B8EC-1C5DE7D853B6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {12282875-3522-4E87-B8EC-1C5DE7D853B6}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -67,6 +105,14 @@ Global {DC408DFF-3507-4384-ADC8-5DEB268C71C5} = {3B6EF051-7EB4-454F-ACA8-AEF258B645E4} {DBBE28DA-7239-4C32-8308-2A65C10410DE} = {3B6EF051-7EB4-454F-ACA8-AEF258B645E4} {85FAD30C-2D0C-406D-9F3B-DB7236016CC5} = {3D2906A4-D990-48BA-B038-3465E82F36A4} + {B66A00DC-5203-490F-BA3D-779859BD1731} = {6DDCF01C-7689-493C-BB76-B3B084449564} + {EC9B5E06-F5F4-4F38-8728-8EA4F339C11D} = {6DDCF01C-7689-493C-BB76-B3B084449564} + {6DDCF01C-7689-493C-BB76-B3B084449564} = {3BFB482F-3B47-4A2C-A588-B5325F513DC5} + {5F299B9B-5794-4BA6-9F8E-3B6C73DC8D6A} = {1924AF30-E568-4145-A17E-520B08790CC0} + {DD4D0E10-D8F8-4DA8-A68B-98DD46F08E5E} = {1924AF30-E568-4145-A17E-520B08790CC0} + {1924AF30-E568-4145-A17E-520B08790CC0} = {3BFB482F-3B47-4A2C-A588-B5325F513DC5} + {12282875-3522-4E87-B8EC-1C5DE7D853B6} = {D3B646DF-C332-42CE-B2EA-599008805004} + {D3B646DF-C332-42CE-B2EA-599008805004} = {3BFB482F-3B47-4A2C-A588-B5325F513DC5} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {5C5ECBED-DFC4-4727-8DA2-68375AAB996B} diff --git a/src/libraries/System.Security.Claims/src/System/Security/Claims/ClaimsIdentity.cs b/src/libraries/System.Security.Claims/src/System/Security/Claims/ClaimsIdentity.cs index e0d82df3b7863f..4408b11cddf135 100644 --- a/src/libraries/System.Security.Claims/src/System/Security/Claims/ClaimsIdentity.cs +++ b/src/libraries/System.Security.Claims/src/System/Security/Claims/ClaimsIdentity.cs @@ -14,7 +14,6 @@ namespace System.Security.Claims /// An Identity that is represented by a set of claims. /// [DebuggerDisplay("{DebuggerToString(),nq}")] - [DebuggerTypeProxy(typeof(ClaimsIdentityDebugProxy))] public class ClaimsIdentity : IIdentity { private enum SerializationMask @@ -962,26 +961,5 @@ internal string DebuggerToString() return debugText; } - - private sealed class ClaimsIdentityDebugProxy - { - private readonly ClaimsIdentity _identity; - - public ClaimsIdentityDebugProxy(ClaimsIdentity identity) - { - _identity = identity; - } - - public ClaimsIdentity? Actor => _identity.Actor; - public string? AuthenticationType => _identity.AuthenticationType; - public object? BootstrapContext => _identity.BootstrapContext; - // List type has a friendly debugger view - public List Claims => new List(_identity.Claims); - public bool IsAuthenticated => _identity.IsAuthenticated; - public string? Label => _identity.Label; - public string? Name => _identity.Name; - public string NameClaimType => _identity.NameClaimType; - public string RoleClaimType => _identity.RoleClaimType; - } } } diff --git a/src/libraries/System.Security.Claims/src/System/Security/Claims/ClaimsPrincipal.cs b/src/libraries/System.Security.Claims/src/System/Security/Claims/ClaimsPrincipal.cs index 13ee10f7f6f4e6..de8f7d89725c68 100644 --- a/src/libraries/System.Security.Claims/src/System/Security/Claims/ClaimsPrincipal.cs +++ b/src/libraries/System.Security.Claims/src/System/Security/Claims/ClaimsPrincipal.cs @@ -15,7 +15,6 @@ namespace System.Security.Claims /// Concrete IPrincipal supporting multiple claims-based identities /// [DebuggerDisplay("{DebuggerToString(),nq}")] - [DebuggerTypeProxy(typeof(ClaimsPrincipalDebugProxy))] public class ClaimsPrincipal : IPrincipal { private enum SerializationMask @@ -594,20 +593,5 @@ private string DebuggerToString() return $"Identities = {identitiesCount}, Claims = {claimsCount}"; } - - private sealed class ClaimsPrincipalDebugProxy - { - private readonly ClaimsPrincipal _principal; - - public ClaimsPrincipalDebugProxy(ClaimsPrincipal principal) - { - _principal = principal; - } - - // List type has a friendly debugger view - public List Claims => new List(_principal.Claims); - public List Identities => new List(_principal.Identities); - public IIdentity? Identity => _principal.Identity; - } } } diff --git a/src/libraries/System.Security.Cryptography.Cose/System.Security.Cryptography.Cose.sln b/src/libraries/System.Security.Cryptography.Cose/System.Security.Cryptography.Cose.sln index 404e79753dd082..7635671370bb00 100644 --- a/src/libraries/System.Security.Cryptography.Cose/System.Security.Cryptography.Cose.sln +++ b/src/libraries/System.Security.Cryptography.Cose/System.Security.Cryptography.Cose.sln @@ -5,8 +5,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Formats.Cbor", "..\S EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Formats.Cbor", "..\System.Formats.Cbor\src\System.Formats.Cbor.csproj", "{0CB3F6B0-353E-47E4-8A62-AFA6115EF789}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{C9230C7F-6D5A-4A58-9853-04046164541D}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{02892B95-D329-4428-B5DC-63AE65D4DB75}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{64D2E763-9717-4CE9-8500-6E6B0CF358F2}" @@ -17,6 +15,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptograph EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography.Cose.Tests", "tests\System.Security.Cryptography.Cose.Tests.csproj", "{FFA43FB1-ED48-4105-A518-4D02CE72DB3F}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{CB705A03-FEA1-49CB-B761-00C9B0015B3B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{5B5A7E1B-1EB5-448A-A539-22E78C8DCA12}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{28BF0D3B-ECB8-4DBE-A190-AE70C44ACF78}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{1C9A5DB3-06A3-4B1E-88F9-B1F342C6968B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{7315ED81-3BAB-415D-9AB0-B40F23F30484}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{9535F590-0F95-4174-BB1E-1A80193CAF55}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{5F962CC3-0DD0-4428-9CF4-99035553DB85}" @@ -25,6 +33,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{29B55087-85A EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{A1DDBD83-25B1-44F6-93A9-AB27A9710FD6}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{2A29EADE-6EC8-4C66-88AF-54848E5DEE49}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{1DECB129-26DD-4778-B9FC-4EFD204610CE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{C1450551-6C76-4F7C-BA38-CDA68B1E58A9}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{448609E7-CADB-4320-A178-84125537C9CE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -43,10 +59,6 @@ Global {0CB3F6B0-353E-47E4-8A62-AFA6115EF789}.Debug|Any CPU.Build.0 = Debug|Any CPU {0CB3F6B0-353E-47E4-8A62-AFA6115EF789}.Release|Any CPU.ActiveCfg = Release|Any CPU {0CB3F6B0-353E-47E4-8A62-AFA6115EF789}.Release|Any CPU.Build.0 = Release|Any CPU - {C9230C7F-6D5A-4A58-9853-04046164541D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C9230C7F-6D5A-4A58-9853-04046164541D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C9230C7F-6D5A-4A58-9853-04046164541D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C9230C7F-6D5A-4A58-9853-04046164541D}.Release|Any CPU.Build.0 = Release|Any CPU {02892B95-D329-4428-B5DC-63AE65D4DB75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {02892B95-D329-4428-B5DC-63AE65D4DB75}.Debug|Any CPU.Build.0 = Debug|Any CPU {02892B95-D329-4428-B5DC-63AE65D4DB75}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -67,6 +79,26 @@ Global {FFA43FB1-ED48-4105-A518-4D02CE72DB3F}.Debug|Any CPU.Build.0 = Debug|Any CPU {FFA43FB1-ED48-4105-A518-4D02CE72DB3F}.Release|Any CPU.ActiveCfg = Release|Any CPU {FFA43FB1-ED48-4105-A518-4D02CE72DB3F}.Release|Any CPU.Build.0 = Release|Any CPU + {CB705A03-FEA1-49CB-B761-00C9B0015B3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CB705A03-FEA1-49CB-B761-00C9B0015B3B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CB705A03-FEA1-49CB-B761-00C9B0015B3B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CB705A03-FEA1-49CB-B761-00C9B0015B3B}.Release|Any CPU.Build.0 = Release|Any CPU + {5B5A7E1B-1EB5-448A-A539-22E78C8DCA12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5B5A7E1B-1EB5-448A-A539-22E78C8DCA12}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5B5A7E1B-1EB5-448A-A539-22E78C8DCA12}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5B5A7E1B-1EB5-448A-A539-22E78C8DCA12}.Release|Any CPU.Build.0 = Release|Any CPU + {28BF0D3B-ECB8-4DBE-A190-AE70C44ACF78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28BF0D3B-ECB8-4DBE-A190-AE70C44ACF78}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28BF0D3B-ECB8-4DBE-A190-AE70C44ACF78}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28BF0D3B-ECB8-4DBE-A190-AE70C44ACF78}.Release|Any CPU.Build.0 = Release|Any CPU + {1C9A5DB3-06A3-4B1E-88F9-B1F342C6968B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1C9A5DB3-06A3-4B1E-88F9-B1F342C6968B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1C9A5DB3-06A3-4B1E-88F9-B1F342C6968B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1C9A5DB3-06A3-4B1E-88F9-B1F342C6968B}.Release|Any CPU.Build.0 = Release|Any CPU + {7315ED81-3BAB-415D-9AB0-B40F23F30484}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7315ED81-3BAB-415D-9AB0-B40F23F30484}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7315ED81-3BAB-415D-9AB0-B40F23F30484}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7315ED81-3BAB-415D-9AB0-B40F23F30484}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -78,9 +110,16 @@ Global {823EE247-FC47-444F-B9A0-32AF146D1789} = {5F962CC3-0DD0-4428-9CF4-99035553DB85} {0CB3F6B0-353E-47E4-8A62-AFA6115EF789} = {29B55087-85A2-4FCE-8303-8EE6B43B0094} {CD19385A-1EDD-45DD-B4E4-BD1F2047BB2B} = {29B55087-85A2-4FCE-8303-8EE6B43B0094} - {C9230C7F-6D5A-4A58-9853-04046164541D} = {A1DDBD83-25B1-44F6-93A9-AB27A9710FD6} {02892B95-D329-4428-B5DC-63AE65D4DB75} = {A1DDBD83-25B1-44F6-93A9-AB27A9710FD6} {64D2E763-9717-4CE9-8500-6E6B0CF358F2} = {A1DDBD83-25B1-44F6-93A9-AB27A9710FD6} + {CB705A03-FEA1-49CB-B761-00C9B0015B3B} = {2A29EADE-6EC8-4C66-88AF-54848E5DEE49} + {5B5A7E1B-1EB5-448A-A539-22E78C8DCA12} = {2A29EADE-6EC8-4C66-88AF-54848E5DEE49} + {2A29EADE-6EC8-4C66-88AF-54848E5DEE49} = {448609E7-CADB-4320-A178-84125537C9CE} + {28BF0D3B-ECB8-4DBE-A190-AE70C44ACF78} = {1DECB129-26DD-4778-B9FC-4EFD204610CE} + {1C9A5DB3-06A3-4B1E-88F9-B1F342C6968B} = {1DECB129-26DD-4778-B9FC-4EFD204610CE} + {1DECB129-26DD-4778-B9FC-4EFD204610CE} = {448609E7-CADB-4320-A178-84125537C9CE} + {7315ED81-3BAB-415D-9AB0-B40F23F30484} = {C1450551-6C76-4F7C-BA38-CDA68B1E58A9} + {C1450551-6C76-4F7C-BA38-CDA68B1E58A9} = {448609E7-CADB-4320-A178-84125537C9CE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {446B8AB2-9ED5-4475-A812-DE12AB4DE665} diff --git a/src/libraries/System.Security.Cryptography.Csp/tests/System.Security.Cryptography.Csp.Tests.csproj b/src/libraries/System.Security.Cryptography.Csp/tests/System.Security.Cryptography.Csp.Tests.csproj index 54aeb5640192e0..9f9d0087830db9 100644 --- a/src/libraries/System.Security.Cryptography.Csp/tests/System.Security.Cryptography.Csp.Tests.csproj +++ b/src/libraries/System.Security.Cryptography.Csp/tests/System.Security.Cryptography.Csp.Tests.csproj @@ -3,7 +3,7 @@ $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-unix;$(NetCoreAppCurrent)-browser $(NoWarn);SYSLIB0021 - + false diff --git a/src/libraries/System.Security.Cryptography.Pkcs/System.Security.Cryptography.Pkcs.sln b/src/libraries/System.Security.Cryptography.Pkcs/System.Security.Cryptography.Pkcs.sln index 42bdfcd6ee56ad..801f0185a0af11 100644 --- a/src/libraries/System.Security.Cryptography.Pkcs/System.Security.Cryptography.Pkcs.sln +++ b/src/libraries/System.Security.Cryptography.Pkcs/System.Security.Cryptography.Pkcs.sln @@ -23,6 +23,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptograph EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography.Pkcs.Tests", "tests\System.Security.Cryptography.Pkcs.Tests.csproj", "{2C8C1360-AC50-4493-BC0B-950149A875A3}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{A02E5C2B-BB8A-45CE-9898-106B3DE4731C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{453347E2-A18B-4233-8546-00411970B16D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{5B6E5617-071B-453C-A36A-E54777EDC9A3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{9521EC76-6BAE-4BE0-90AC-F96A76D6656C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{F2B0ACF2-C204-472B-8442-7174A948E2F4}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{893263F9-1E6A-4C9A-808D-539C399848CF}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{FD768C8B-9BF1-4F02-A2C4-335B22615763}" @@ -31,6 +41,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D5B768A4-9BA EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{94B59232-B99C-4224-B3E3-0F3385F06B64}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{C291910F-A44F-4EB0-BFFD-972D92FA632E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{9E3DF5A9-98B7-4CA1-8FB6-A5E40440FEFA}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{65D63FA6-A758-4FFD-A547-3E3FAF614532}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{CDC00C1E-F192-41D3-9332-C22D88B915D4}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -85,6 +103,26 @@ Global {2C8C1360-AC50-4493-BC0B-950149A875A3}.Debug|Any CPU.Build.0 = Debug|Any CPU {2C8C1360-AC50-4493-BC0B-950149A875A3}.Release|Any CPU.ActiveCfg = Release|Any CPU {2C8C1360-AC50-4493-BC0B-950149A875A3}.Release|Any CPU.Build.0 = Release|Any CPU + {A02E5C2B-BB8A-45CE-9898-106B3DE4731C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A02E5C2B-BB8A-45CE-9898-106B3DE4731C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A02E5C2B-BB8A-45CE-9898-106B3DE4731C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A02E5C2B-BB8A-45CE-9898-106B3DE4731C}.Release|Any CPU.Build.0 = Release|Any CPU + {453347E2-A18B-4233-8546-00411970B16D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {453347E2-A18B-4233-8546-00411970B16D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {453347E2-A18B-4233-8546-00411970B16D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {453347E2-A18B-4233-8546-00411970B16D}.Release|Any CPU.Build.0 = Release|Any CPU + {5B6E5617-071B-453C-A36A-E54777EDC9A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5B6E5617-071B-453C-A36A-E54777EDC9A3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5B6E5617-071B-453C-A36A-E54777EDC9A3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5B6E5617-071B-453C-A36A-E54777EDC9A3}.Release|Any CPU.Build.0 = Release|Any CPU + {9521EC76-6BAE-4BE0-90AC-F96A76D6656C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9521EC76-6BAE-4BE0-90AC-F96A76D6656C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9521EC76-6BAE-4BE0-90AC-F96A76D6656C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9521EC76-6BAE-4BE0-90AC-F96A76D6656C}.Release|Any CPU.Build.0 = Release|Any CPU + {F2B0ACF2-C204-472B-8442-7174A948E2F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F2B0ACF2-C204-472B-8442-7174A948E2F4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F2B0ACF2-C204-472B-8442-7174A948E2F4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F2B0ACF2-C204-472B-8442-7174A948E2F4}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -102,6 +140,14 @@ Global {E44D1459-E2A0-4AF7-A392-1E8F86F64DB5} = {94B59232-B99C-4224-B3E3-0F3385F06B64} {97CE28DB-B4AC-400B-A40D-C55789FCA0AB} = {94B59232-B99C-4224-B3E3-0F3385F06B64} {E44D1E0E-5F76-41B8-AF5F-6112BCC6A39B} = {94B59232-B99C-4224-B3E3-0F3385F06B64} + {A02E5C2B-BB8A-45CE-9898-106B3DE4731C} = {C291910F-A44F-4EB0-BFFD-972D92FA632E} + {453347E2-A18B-4233-8546-00411970B16D} = {C291910F-A44F-4EB0-BFFD-972D92FA632E} + {C291910F-A44F-4EB0-BFFD-972D92FA632E} = {CDC00C1E-F192-41D3-9332-C22D88B915D4} + {5B6E5617-071B-453C-A36A-E54777EDC9A3} = {9E3DF5A9-98B7-4CA1-8FB6-A5E40440FEFA} + {9521EC76-6BAE-4BE0-90AC-F96A76D6656C} = {9E3DF5A9-98B7-4CA1-8FB6-A5E40440FEFA} + {9E3DF5A9-98B7-4CA1-8FB6-A5E40440FEFA} = {CDC00C1E-F192-41D3-9332-C22D88B915D4} + {F2B0ACF2-C204-472B-8442-7174A948E2F4} = {65D63FA6-A758-4FFD-A547-3E3FAF614532} + {65D63FA6-A758-4FFD-A547-3E3FAF614532} = {CDC00C1E-F192-41D3-9332-C22D88B915D4} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {CF4AD1E7-1B60-4FDF-894F-7F0EF613012B} diff --git a/src/libraries/System.Security.Cryptography.Pkcs/src/CompatibilitySuppressions.xml b/src/libraries/System.Security.Cryptography.Pkcs/src/CompatibilitySuppressions.xml index e652dd8769f3d4..b07eb3474e1a10 100644 --- a/src/libraries/System.Security.Cryptography.Pkcs/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Security.Cryptography.Pkcs/src/CompatibilitySuppressions.xml @@ -1,4 +1,5 @@  + CP0002 @@ -204,6 +205,34 @@ ref/netstandard2.0/System.Security.Cryptography.Pkcs.dll lib/netstandard2.0/System.Security.Cryptography.Pkcs.dll + + CP0014 + M:System.Security.Cryptography.Pkcs.CmsSigner.#ctor(System.Security.Cryptography.CspParameters):[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Cryptography.Pkcs.dll + lib/netstandard2.1/System.Security.Cryptography.Pkcs.dll + true + + + CP0014 + M:System.Security.Cryptography.Pkcs.SignerInfo.ComputeCounterSignature:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Cryptography.Pkcs.dll + lib/netstandard2.1/System.Security.Cryptography.Pkcs.dll + true + + + CP0014 + M:System.Security.Cryptography.Pkcs.CmsSigner.#ctor(System.Security.Cryptography.CspParameters):[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Cryptography.Pkcs.dll + lib/netstandard2.1/System.Security.Cryptography.Pkcs.dll + true + + + CP0014 + M:System.Security.Cryptography.Pkcs.SignerInfo.ComputeCounterSignature:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Cryptography.Pkcs.dll + lib/netstandard2.1/System.Security.Cryptography.Pkcs.dll + true + CP0014 M:System.Security.Cryptography.Pkcs.CmsSigner.#ctor(System.Security.Cryptography.CspParameters):[T:System.ComponentModel.EditorBrowsableAttribute] @@ -222,4 +251,11 @@ lib/netstandard2.0/System.Security.Cryptography.Pkcs.dll lib/net462/System.Security.Cryptography.Pkcs.dll + + CP1002 + System.Security.Cryptography, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.Security.Cryptography.Pkcs.dll + lib/netstandard2.1/System.Security.Cryptography.Pkcs.dll + true + \ No newline at end of file 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 4988c8cc6a0e99..a41d1dd716a211 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 @@ -138,7 +138,7 @@ System.Security.Cryptography.Pkcs.EnvelopedCms - + diff --git a/src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsSignature.ECDsa.cs b/src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsSignature.ECDsa.cs index f9900fed9fb6a1..dd098e46362ea6 100644 --- a/src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsSignature.ECDsa.cs +++ b/src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsSignature.ECDsa.cs @@ -22,17 +22,17 @@ static partial void PrepareRegistrationECDsa(Dictionary lo lookup.Add(Oids.ECDsaWithSha3_384, new ECDsaCmsSignature(Oids.ECDsaWithSha3_384, HashAlgorithmName.SHA3_384)); lookup.Add(Oids.ECDsaWithSha3_512, new ECDsaCmsSignature(Oids.ECDsaWithSha3_512, HashAlgorithmName.SHA3_512)); #endif - lookup.Add(Oids.EcPublicKey, new ECDsaCmsSignature(null, default)); + lookup.Add(Oids.EcPublicKey, new ECDsaCmsSignature(null, null)); } private sealed partial class ECDsaCmsSignature : CmsSignature { - private readonly HashAlgorithmName _expectedDigest; + private readonly HashAlgorithmName? _expectedDigest; private readonly string? _signatureAlgorithm; internal override RSASignaturePadding? SignaturePadding => null; - internal ECDsaCmsSignature(string? signatureAlgorithm, HashAlgorithmName expectedDigest) + internal ECDsaCmsSignature(string? signatureAlgorithm, HashAlgorithmName? expectedDigest) { _signatureAlgorithm = signatureAlgorithm; _expectedDigest = expectedDigest; @@ -56,7 +56,7 @@ internal override bool VerifySignature( ReadOnlyMemory? signatureParameters, X509Certificate2 certificate) { - if (_expectedDigest != digestAlgorithmName) + if (_expectedDigest != null && _expectedDigest != digestAlgorithmName) { throw new CryptographicException( SR.Format( diff --git a/src/libraries/System.Security.Cryptography.Pkcs/tests/Oids.cs b/src/libraries/System.Security.Cryptography.Pkcs/tests/Oids.cs index bcaa73082ebfc7..a9e73c30df756e 100644 --- a/src/libraries/System.Security.Cryptography.Pkcs/tests/Oids.cs +++ b/src/libraries/System.Security.Cryptography.Pkcs/tests/Oids.cs @@ -25,6 +25,7 @@ internal static class Oids public const string RsaPss = "1.2.840.113549.1.1.10"; public const string Esdh = "1.2.840.113549.1.9.16.3.5"; public const string Dh = "1.2.840.10046.2.1"; + public const string EcPublicKey = "1.2.840.10045.2.1"; public const string EcdsaSha256 = "1.2.840.10045.4.3.2"; // Cryptographic Attribute Types diff --git a/src/libraries/System.Security.Cryptography.Pkcs/tests/SignedCms/SignedCmsTests.netcoreapp.cs b/src/libraries/System.Security.Cryptography.Pkcs/tests/SignedCms/SignedCmsTests.netcoreapp.cs index 355d9e5763557d..e5ef61d996a88b 100644 --- a/src/libraries/System.Security.Cryptography.Pkcs/tests/SignedCms/SignedCmsTests.netcoreapp.cs +++ b/src/libraries/System.Security.Cryptography.Pkcs/tests/SignedCms/SignedCmsTests.netcoreapp.cs @@ -823,6 +823,20 @@ public static void ExistingDocument_Rsa_Sha3_512() } } + [Fact] + public static void ExistingDocument_Ecdsa_Sha256_FromNetFX() + { + SignedCms cms = new SignedCms(); + cms.Decode(SignedDocuments.Ecdsa_Sha256_FromNetFX_SignedDocument); + + cms.CheckSignature(true); // Assert.NoThrow + Assert.Single(cms.SignerInfos); + + SignerInfo signerInfo = cms.SignerInfos[0]; + Assert.Equal(Oids.Sha256, signerInfo.DigestAlgorithm.Value); + Assert.Equal(Oids.EcPublicKey, signerInfo.SignatureAlgorithm.Value); + } + private static void VerifyWithExplicitPrivateKey(X509Certificate2 cert, AsymmetricAlgorithm key) { using (var pubCert = new X509Certificate2(cert.RawData)) diff --git a/src/libraries/System.Security.Cryptography.Pkcs/tests/SignedCms/SignedDocuments.cs b/src/libraries/System.Security.Cryptography.Pkcs/tests/SignedCms/SignedDocuments.cs index 7001b325cd4029..06c739ef3ba6c0 100644 --- a/src/libraries/System.Security.Cryptography.Pkcs/tests/SignedCms/SignedDocuments.cs +++ b/src/libraries/System.Security.Cryptography.Pkcs/tests/SignedCms/SignedDocuments.cs @@ -1789,5 +1789,38 @@ internal static class SignedDocuments "F11C632B4F605A41821A3F15B4F537FD5F0EE3426A7A03732AC946C3B435" + "776A873A3DAE93FB8312C681144CF51F05CE37A0DB4C1544E178F88E421C" + "0B5456D18C13B335DA808CE60C4E35F507").HexToByteArray(); + + // produced with the below PowerShell code using the pfx Certificates.ECDsaP256Win + // $cert = [System.Security.Cryptography.X509Certificates.X509Certificate2]::new( + // [System.Convert]::FromBase64String($Certificates_ECDsaP256Win), + // 'Test', + // 'EphemeralKeySet') + // $signer = [System.Security.Cryptography.Pkcs.CmsSigner]::new('IssuerAndSerialNumber', $cert) + // $signer.IncludeOption = 'ExcludeRoot' + // $signer.DigestAlgorithm = '2.16.840.1.101.3.4.2.1' + // $contentInfo = [System.Security.Cryptography.Pkcs.ContentInfo]::new([byte[]]@(0)) + // $signedCms = [System.Security.Cryptography.Pkcs.SignedCms]::new($contentInfo, $false) + // $signedCms.ComputeSignature($signer, $true) + // $signedCms.Encode() + internal static readonly byte[] Ecdsa_Sha256_FromNetFX_SignedDocument = ( + "3082023106092A864886F70D010702A08202223082021E020101310F300D" + + "06096086480165030402010500301006092A864886F70D010701A0030401" + + "00A082015C308201583081FFA003020102021035428F3B3C5107AD49E776" + + "D6E74C4DC8300A06082A8648CE3D04030230153113301106035504030C0A" + + "45434453412054657374301E170D3135303530313030333730335A170D31" + + "36303530313030353730335A30153113301106035504030C0A4543445341" + + "20546573743059301306072A8648CE3D020106082A8648CE3D0301070342" + + "00047590F69CA114E92927E034C997B7C882A8C992AC00CEFB4EB8319015" + + "36F291E1B515263BCD20E1EA32496FDAC84E2D8D1B703266A9088F6EAF65" + + "2549D9BB63D5A331302F300E0603551D0F0101FF040403020388301D0603" + + "551D0E0416041411218A92C5EB12273B3C5CCFB8220CCCFDF387DB300A06" + + "082A8648CE3D040302034800304502201AFE595E19F1AE4B6A4B231E8851" + + "926438C55B5DDE632E6ADF13C1023A65898E022100CBDF434FDD197D8B59" + + "4E8026E44263BADE773C2BEBD060CC4109484A498E7C7E31819530819202" + + "0101302930153113301106035504030C0A45434453412054657374021035" + + "428F3B3C5107AD49E776D6E74C4DC8300D06096086480165030402010500" + + "300B06072A8648CE3D020105000446304402203557687B26E650E4F86F4B" + + "77A5BF5851350C96F01142696CC1391632CB95C3370220017FD4D9329F00" + + "1EC74210CD34CAEE3878B2302602DB7930347E104679734291").HexToByteArray(); } } diff --git a/src/libraries/System.Security.Cryptography.ProtectedData/System.Security.Cryptography.ProtectedData.sln b/src/libraries/System.Security.Cryptography.ProtectedData/System.Security.Cryptography.ProtectedData.sln index 930daf90806fcc..f3a807ef407969 100644 --- a/src/libraries/System.Security.Cryptography.ProtectedData/System.Security.Cryptography.ProtectedData.sln +++ b/src/libraries/System.Security.Cryptography.ProtectedData/System.Security.Cryptography.ProtectedData.sln @@ -1,8 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{21CC9F35-ACAA-4452-BE92-BBAE2E927B20}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{F148597E-9706-49BD-ACBC-E18F634B5128}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{324E33F0-53FB-4DFD-AEDF-64BCFB2F7821}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{D3B40403-2973-45CE-A0A4-97C38CBE86FE}" @@ -13,6 +11,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptograph EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography.ProtectedData.Tests", "tests\System.Security.Cryptography.ProtectedData.Tests.csproj", "{3A6C62D5-EFCA-4119-BC60-C917533848A8}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{0C14D7BC-A21E-46D2-9E1D-F69E52827F00}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{E9D80BF9-DBA6-4130-B5F4-0D5080DD2218}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{2E8D8465-FA66-45C2-A0FF-541D9D8E70EF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{4578FB5F-E69C-4AEF-86F5-FE737E74A324}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{698B4412-560D-4622-9BCE-9021E1303825}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{E3C3C868-FBDB-4F07-A72E-F734016C0B3B}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{6F1E3122-547E-4134-BB45-6E33B880DC34}" @@ -21,6 +29,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{AE1B6C0D-299 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{87D86F17-7CEB-48DB-99FB-55922ED2A7D1}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{90113343-AD07-450D-B15D-E4E5A8016F60}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{2C7F0705-AF50-4C07-B501-30C2A42C01A5}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{358450EF-3CA3-4A72-A60D-98B1988190D2}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{306F6193-BC27-4228-B18C-64B1F3CB9CA7}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -31,10 +47,6 @@ Global {21CC9F35-ACAA-4452-BE92-BBAE2E927B20}.Debug|Any CPU.Build.0 = Debug|Any CPU {21CC9F35-ACAA-4452-BE92-BBAE2E927B20}.Release|Any CPU.ActiveCfg = Release|Any CPU {21CC9F35-ACAA-4452-BE92-BBAE2E927B20}.Release|Any CPU.Build.0 = Release|Any CPU - {F148597E-9706-49BD-ACBC-E18F634B5128}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F148597E-9706-49BD-ACBC-E18F634B5128}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F148597E-9706-49BD-ACBC-E18F634B5128}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F148597E-9706-49BD-ACBC-E18F634B5128}.Release|Any CPU.Build.0 = Release|Any CPU {324E33F0-53FB-4DFD-AEDF-64BCFB2F7821}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {324E33F0-53FB-4DFD-AEDF-64BCFB2F7821}.Debug|Any CPU.Build.0 = Debug|Any CPU {324E33F0-53FB-4DFD-AEDF-64BCFB2F7821}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -55,6 +67,26 @@ Global {3A6C62D5-EFCA-4119-BC60-C917533848A8}.Debug|Any CPU.Build.0 = Debug|Any CPU {3A6C62D5-EFCA-4119-BC60-C917533848A8}.Release|Any CPU.ActiveCfg = Release|Any CPU {3A6C62D5-EFCA-4119-BC60-C917533848A8}.Release|Any CPU.Build.0 = Release|Any CPU + {0C14D7BC-A21E-46D2-9E1D-F69E52827F00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0C14D7BC-A21E-46D2-9E1D-F69E52827F00}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0C14D7BC-A21E-46D2-9E1D-F69E52827F00}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0C14D7BC-A21E-46D2-9E1D-F69E52827F00}.Release|Any CPU.Build.0 = Release|Any CPU + {E9D80BF9-DBA6-4130-B5F4-0D5080DD2218}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E9D80BF9-DBA6-4130-B5F4-0D5080DD2218}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E9D80BF9-DBA6-4130-B5F4-0D5080DD2218}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E9D80BF9-DBA6-4130-B5F4-0D5080DD2218}.Release|Any CPU.Build.0 = Release|Any CPU + {2E8D8465-FA66-45C2-A0FF-541D9D8E70EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2E8D8465-FA66-45C2-A0FF-541D9D8E70EF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2E8D8465-FA66-45C2-A0FF-541D9D8E70EF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2E8D8465-FA66-45C2-A0FF-541D9D8E70EF}.Release|Any CPU.Build.0 = Release|Any CPU + {4578FB5F-E69C-4AEF-86F5-FE737E74A324}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4578FB5F-E69C-4AEF-86F5-FE737E74A324}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4578FB5F-E69C-4AEF-86F5-FE737E74A324}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4578FB5F-E69C-4AEF-86F5-FE737E74A324}.Release|Any CPU.Build.0 = Release|Any CPU + {698B4412-560D-4622-9BCE-9021E1303825}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {698B4412-560D-4622-9BCE-9021E1303825}.Debug|Any CPU.Build.0 = Debug|Any CPU + {698B4412-560D-4622-9BCE-9021E1303825}.Release|Any CPU.ActiveCfg = Release|Any CPU + {698B4412-560D-4622-9BCE-9021E1303825}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -62,11 +94,18 @@ Global GlobalSection(NestedProjects) = preSolution {21CC9F35-ACAA-4452-BE92-BBAE2E927B20} = {E3C3C868-FBDB-4F07-A72E-F734016C0B3B} {3A6C62D5-EFCA-4119-BC60-C917533848A8} = {E3C3C868-FBDB-4F07-A72E-F734016C0B3B} - {F148597E-9706-49BD-ACBC-E18F634B5128} = {6F1E3122-547E-4134-BB45-6E33B880DC34} {324E33F0-53FB-4DFD-AEDF-64BCFB2F7821} = {6F1E3122-547E-4134-BB45-6E33B880DC34} {D3B40403-2973-45CE-A0A4-97C38CBE86FE} = {6F1E3122-547E-4134-BB45-6E33B880DC34} {E40DBC0E-386A-4B32-8DCE-9FE13EAD47BE} = {AE1B6C0D-2991-4048-9B81-5683599B0CA4} {7773DB7A-494F-4508-9471-F737FDC7661E} = {87D86F17-7CEB-48DB-99FB-55922ED2A7D1} + {0C14D7BC-A21E-46D2-9E1D-F69E52827F00} = {90113343-AD07-450D-B15D-E4E5A8016F60} + {E9D80BF9-DBA6-4130-B5F4-0D5080DD2218} = {90113343-AD07-450D-B15D-E4E5A8016F60} + {90113343-AD07-450D-B15D-E4E5A8016F60} = {306F6193-BC27-4228-B18C-64B1F3CB9CA7} + {2E8D8465-FA66-45C2-A0FF-541D9D8E70EF} = {2C7F0705-AF50-4C07-B501-30C2A42C01A5} + {4578FB5F-E69C-4AEF-86F5-FE737E74A324} = {2C7F0705-AF50-4C07-B501-30C2A42C01A5} + {2C7F0705-AF50-4C07-B501-30C2A42C01A5} = {306F6193-BC27-4228-B18C-64B1F3CB9CA7} + {698B4412-560D-4622-9BCE-9021E1303825} = {358450EF-3CA3-4A72-A60D-98B1988190D2} + {358450EF-3CA3-4A72-A60D-98B1988190D2} = {306F6193-BC27-4228-B18C-64B1F3CB9CA7} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {FB101479-5EAB-495B-ACF3-4B6FC3F830EF} diff --git a/src/libraries/System.Security.Cryptography.ProtectedData/src/System.Security.Cryptography.ProtectedData.csproj b/src/libraries/System.Security.Cryptography.ProtectedData/src/System.Security.Cryptography.ProtectedData.csproj index 2f4ff90b361306..700908d9e620a9 100644 --- a/src/libraries/System.Security.Cryptography.ProtectedData/src/System.Security.Cryptography.ProtectedData.csproj +++ b/src/libraries/System.Security.Cryptography.ProtectedData/src/System.Security.Cryptography.ProtectedData.csproj @@ -1,4 +1,5 @@ + $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) true @@ -40,7 +41,7 @@ System.Security.Cryptography.ProtectedData Link="Common\System\Security\Cryptography\CryptoThrowHelper.Windows.cs" /> - + @@ -52,4 +53,5 @@ System.Security.Cryptography.ProtectedData + diff --git a/src/libraries/System.Security.Cryptography.Xml/System.Security.Cryptography.Xml.sln b/src/libraries/System.Security.Cryptography.Xml/System.Security.Cryptography.Xml.sln index 9648ff0a99aeb9..ca3be85cd2db1a 100644 --- a/src/libraries/System.Security.Cryptography.Xml/System.Security.Cryptography.Xml.sln +++ b/src/libraries/System.Security.Cryptography.Xml/System.Security.Cryptography.Xml.sln @@ -27,6 +27,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptograph EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography.Xml.Tests", "tests\System.Security.Cryptography.Xml.Tests.csproj", "{675D4EE3-1F0E-4445-A9CD-635ED3351751}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{9B42414B-38AB-4BCB-B694-36FC3D760C1D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{6982C421-234D-40D2-99DE-C351900750E4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{EFFA895B-26D8-456B-AAF1-A398260ED661}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{97E1EDE0-3AD5-45C9-88F1-C042E58BA064}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{DC1C17DB-648D-4FEA-A25A-7FF646548C17}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{F25E8B4D-D7E9-4086-A263-CB9D3B41074B}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{B8C68464-1D28-4889-90BC-BC80B036B90B}" @@ -35,6 +45,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{BA579BFF-D4D EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{39704A56-DFD6-4CC6-A7E4-229E639D9611}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{782D1E7D-9D5B-48B7-A839-D67A69ADD10F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{85E1D5FF-0044-47B8-B495-E201E68671B4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{52909275-45B9-4B14-A82B-E7836F46A1A0}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{9E9151C2-3C27-4441-810F-A00FFB979114}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -97,6 +115,26 @@ Global {675D4EE3-1F0E-4445-A9CD-635ED3351751}.Debug|Any CPU.Build.0 = Debug|Any CPU {675D4EE3-1F0E-4445-A9CD-635ED3351751}.Release|Any CPU.ActiveCfg = Release|Any CPU {675D4EE3-1F0E-4445-A9CD-635ED3351751}.Release|Any CPU.Build.0 = Release|Any CPU + {9B42414B-38AB-4BCB-B694-36FC3D760C1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9B42414B-38AB-4BCB-B694-36FC3D760C1D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9B42414B-38AB-4BCB-B694-36FC3D760C1D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9B42414B-38AB-4BCB-B694-36FC3D760C1D}.Release|Any CPU.Build.0 = Release|Any CPU + {6982C421-234D-40D2-99DE-C351900750E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6982C421-234D-40D2-99DE-C351900750E4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6982C421-234D-40D2-99DE-C351900750E4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6982C421-234D-40D2-99DE-C351900750E4}.Release|Any CPU.Build.0 = Release|Any CPU + {EFFA895B-26D8-456B-AAF1-A398260ED661}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EFFA895B-26D8-456B-AAF1-A398260ED661}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EFFA895B-26D8-456B-AAF1-A398260ED661}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EFFA895B-26D8-456B-AAF1-A398260ED661}.Release|Any CPU.Build.0 = Release|Any CPU + {97E1EDE0-3AD5-45C9-88F1-C042E58BA064}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {97E1EDE0-3AD5-45C9-88F1-C042E58BA064}.Debug|Any CPU.Build.0 = Debug|Any CPU + {97E1EDE0-3AD5-45C9-88F1-C042E58BA064}.Release|Any CPU.ActiveCfg = Release|Any CPU + {97E1EDE0-3AD5-45C9-88F1-C042E58BA064}.Release|Any CPU.Build.0 = Release|Any CPU + {DC1C17DB-648D-4FEA-A25A-7FF646548C17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DC1C17DB-648D-4FEA-A25A-7FF646548C17}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DC1C17DB-648D-4FEA-A25A-7FF646548C17}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DC1C17DB-648D-4FEA-A25A-7FF646548C17}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -116,6 +154,14 @@ Global {D75C8817-337C-4DDA-B164-F8822787EE19} = {39704A56-DFD6-4CC6-A7E4-229E639D9611} {2CE79894-A115-4C92-86E2-7B392EBCBD83} = {39704A56-DFD6-4CC6-A7E4-229E639D9611} {B15E7AF8-B446-425F-B22A-619A01DEDA16} = {39704A56-DFD6-4CC6-A7E4-229E639D9611} + {9B42414B-38AB-4BCB-B694-36FC3D760C1D} = {782D1E7D-9D5B-48B7-A839-D67A69ADD10F} + {6982C421-234D-40D2-99DE-C351900750E4} = {782D1E7D-9D5B-48B7-A839-D67A69ADD10F} + {782D1E7D-9D5B-48B7-A839-D67A69ADD10F} = {9E9151C2-3C27-4441-810F-A00FFB979114} + {EFFA895B-26D8-456B-AAF1-A398260ED661} = {85E1D5FF-0044-47B8-B495-E201E68671B4} + {97E1EDE0-3AD5-45C9-88F1-C042E58BA064} = {85E1D5FF-0044-47B8-B495-E201E68671B4} + {85E1D5FF-0044-47B8-B495-E201E68671B4} = {9E9151C2-3C27-4441-810F-A00FFB979114} + {DC1C17DB-648D-4FEA-A25A-7FF646548C17} = {52909275-45B9-4B14-A82B-E7836F46A1A0} + {52909275-45B9-4B14-A82B-E7836F46A1A0} = {9E9151C2-3C27-4441-810F-A00FFB979114} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {E0287BE2-B499-4885-8EE8-0B35585CA885} 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 3974bdf58e004d..ad69153fc5507f 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,4 +1,5 @@ + $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) enable @@ -10,11 +11,8 @@ - - - - + @@ -24,4 +22,5 @@ + 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 5aea1a156c97a4..a6ebe664255347 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 @@ -1,4 +1,5 @@ + $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) true @@ -138,14 +139,11 @@ System.Security.Cryptography.Xml.XmlLicenseTransform + - - - - @@ -158,4 +156,5 @@ System.Security.Cryptography.Xml.XmlLicenseTransform + diff --git a/src/libraries/System.Security.Cryptography/System.Security.Cryptography.sln b/src/libraries/System.Security.Cryptography/System.Security.Cryptography.sln index 9c26e7b5642f63..57220bcd94caf7 100644 --- a/src/libraries/System.Security.Cryptography/System.Security.Cryptography.sln +++ b/src/libraries/System.Security.Cryptography/System.Security.Cryptography.sln @@ -37,6 +37,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptograph EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography.Tests", "tests\System.Security.Cryptography.Tests.csproj", "{A242B3AB-EE45-4C95-9550-DB970BA23CD5}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{7D70A668-5A55-439F-9FB8-8FF2A850CF91}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{390C4E57-0F24-4E07-AFFB-AFBE67D58A52}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{93B28BF5-88A1-4763-913C-6F59F291676A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{CF172501-7056-49E7-93E2-787BD4D95DF1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{0D113CC7-98F1-4323-B064-25A4EC6DA5A8}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{B3BB2DA0-53B8-4B49-999F-CD650EB61040}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{F591FB6D-6957-46DB-BF9B-C00772BC11E3}" @@ -45,6 +55,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A16B11D7-673 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{2B165D96-356D-409E-88BE-0CA0F407303E}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{CC457FED-75A7-450C-91C9-F0F4AC6FF4A9}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{7D4583A4-938F-4A2F-945D-9FD4FB4F0110}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{1D7DE530-F078-4076-8D77-0A145DD165F6}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{5F3BF122-7954-4A83-8196-E8470B0B9C80}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -127,6 +145,26 @@ Global {A242B3AB-EE45-4C95-9550-DB970BA23CD5}.Debug|Any CPU.Build.0 = Debug|Any CPU {A242B3AB-EE45-4C95-9550-DB970BA23CD5}.Release|Any CPU.ActiveCfg = Release|Any CPU {A242B3AB-EE45-4C95-9550-DB970BA23CD5}.Release|Any CPU.Build.0 = Release|Any CPU + {7D70A668-5A55-439F-9FB8-8FF2A850CF91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7D70A668-5A55-439F-9FB8-8FF2A850CF91}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7D70A668-5A55-439F-9FB8-8FF2A850CF91}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7D70A668-5A55-439F-9FB8-8FF2A850CF91}.Release|Any CPU.Build.0 = Release|Any CPU + {390C4E57-0F24-4E07-AFFB-AFBE67D58A52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {390C4E57-0F24-4E07-AFFB-AFBE67D58A52}.Debug|Any CPU.Build.0 = Debug|Any CPU + {390C4E57-0F24-4E07-AFFB-AFBE67D58A52}.Release|Any CPU.ActiveCfg = Release|Any CPU + {390C4E57-0F24-4E07-AFFB-AFBE67D58A52}.Release|Any CPU.Build.0 = Release|Any CPU + {93B28BF5-88A1-4763-913C-6F59F291676A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {93B28BF5-88A1-4763-913C-6F59F291676A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {93B28BF5-88A1-4763-913C-6F59F291676A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {93B28BF5-88A1-4763-913C-6F59F291676A}.Release|Any CPU.Build.0 = Release|Any CPU + {CF172501-7056-49E7-93E2-787BD4D95DF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CF172501-7056-49E7-93E2-787BD4D95DF1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CF172501-7056-49E7-93E2-787BD4D95DF1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CF172501-7056-49E7-93E2-787BD4D95DF1}.Release|Any CPU.Build.0 = Release|Any CPU + {0D113CC7-98F1-4323-B064-25A4EC6DA5A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0D113CC7-98F1-4323-B064-25A4EC6DA5A8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0D113CC7-98F1-4323-B064-25A4EC6DA5A8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0D113CC7-98F1-4323-B064-25A4EC6DA5A8}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -151,6 +189,14 @@ Global {0EA41D6A-87A2-42B7-8171-78E167570993} = {2B165D96-356D-409E-88BE-0CA0F407303E} {9E7AD0F4-0D4D-4E42-8C6C-513C006E0590} = {2B165D96-356D-409E-88BE-0CA0F407303E} {1B999BF7-657A-4342-A97E-B5CC5916AFB4} = {2B165D96-356D-409E-88BE-0CA0F407303E} + {7D70A668-5A55-439F-9FB8-8FF2A850CF91} = {CC457FED-75A7-450C-91C9-F0F4AC6FF4A9} + {390C4E57-0F24-4E07-AFFB-AFBE67D58A52} = {CC457FED-75A7-450C-91C9-F0F4AC6FF4A9} + {CC457FED-75A7-450C-91C9-F0F4AC6FF4A9} = {5F3BF122-7954-4A83-8196-E8470B0B9C80} + {93B28BF5-88A1-4763-913C-6F59F291676A} = {7D4583A4-938F-4A2F-945D-9FD4FB4F0110} + {CF172501-7056-49E7-93E2-787BD4D95DF1} = {7D4583A4-938F-4A2F-945D-9FD4FB4F0110} + {7D4583A4-938F-4A2F-945D-9FD4FB4F0110} = {5F3BF122-7954-4A83-8196-E8470B0B9C80} + {0D113CC7-98F1-4323-B064-25A4EC6DA5A8} = {1D7DE530-F078-4076-8D77-0A145DD165F6} + {1D7DE530-F078-4076-8D77-0A145DD165F6} = {5F3BF122-7954-4A83-8196-E8470B0B9C80} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {F5615383-F387-45EA-A05A-CB65D8A6FE88} 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 80ef8bd134196b..1b0ec56d991228 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 @@ -152,50 +152,41 @@ public static void SetExportPolicy(this SafeNCryptKeyHandle keyHandle, CngExport /// rather than throw exceptions for missing or ill-formatted property values. Only use it for well-known properties that /// are unlikely to be ill-formatted.) /// - public static int GetPropertyAsDword(this SafeNCryptHandle ncryptHandle, string propertyName, CngPropertyOptions options) - { - byte[]? value = ncryptHandle.GetProperty(propertyName, options); - - if (value == null) - { - // .NET Framework compat: return 0 if key not present. - return 0; - } - - return BitConverter.ToInt32(value, 0); - } + public static int GetPropertyAsDword(this SafeNCryptHandle ncryptHandle, string propertyName, CngPropertyOptions options) => + GetPropertyAsPrimitive(ncryptHandle, propertyName, options); /// /// Retrieve a well-known CNG pointer property. (Note: .NET Framework compat: this helper likes to return special values /// rather than throw exceptions for missing or ill-formatted property values. Only use it for well-known properties that /// are unlikely to be ill-formatted.) /// - internal static IntPtr GetPropertyAsIntPtr(this SafeNCryptHandle ncryptHandle, string propertyName, CngPropertyOptions options) - { - unsafe - { - IntPtr value; + internal static IntPtr GetPropertyAsIntPtr(this SafeNCryptHandle ncryptHandle, string propertyName, CngPropertyOptions options) => + GetPropertyAsPrimitive(ncryptHandle, propertyName, options); - ErrorCode errorCode = Interop.NCrypt.NCryptGetProperty( - ncryptHandle, - propertyName, - &value, - IntPtr.Size, - out _, - options); + private static unsafe T GetPropertyAsPrimitive(SafeNCryptHandle ncryptHandle, string propertyName, CngPropertyOptions options) + where T : unmanaged + { + T value; - if (errorCode == ErrorCode.NTE_NOT_FOUND) - { - return IntPtr.Zero; - } + ErrorCode errorCode = Interop.NCrypt.NCryptGetProperty( + ncryptHandle, + propertyName, + &value, + sizeof(T), + out _, + options); - if (errorCode != ErrorCode.ERROR_SUCCESS) - { - throw errorCode.ToCryptographicException(); - } + if (errorCode == ErrorCode.NTE_NOT_FOUND) + { + return default; + } - return value; + if (errorCode != ErrorCode.ERROR_SUCCESS) + { + throw errorCode.ToCryptographicException(); } + + return value; } /// diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/Pbkdf2Implementation.Windows.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/Pbkdf2Implementation.Windows.cs index d05af7124b3af5..c40d105152cf80 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/Pbkdf2Implementation.Windows.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/Pbkdf2Implementation.Windows.cs @@ -86,25 +86,20 @@ private static unsafe void FillKeyDerivation( switch (hashAlgorithmName) { case HashAlgorithmNames.SHA1: - hashBufferSize = SHA1.HashData(password, hashBuffer); - break; case HashAlgorithmNames.SHA256: - hashBufferSize = SHA256.HashData(password, hashBuffer); - break; case HashAlgorithmNames.SHA384: - hashBufferSize = SHA384.HashData(password, hashBuffer); - break; case HashAlgorithmNames.SHA512: - hashBufferSize = SHA512.HashData(password, hashBuffer); + hashBufferSize = HashProviderDispenser.OneShotHashProvider.HashData(hashAlgorithmName, password, hashBuffer); break; case HashAlgorithmNames.SHA3_256: - hashBufferSize = SHA3_256.HashData(password, hashBuffer); - break; case HashAlgorithmNames.SHA3_384: - hashBufferSize = SHA3_384.HashData(password, hashBuffer); - break; case HashAlgorithmNames.SHA3_512: - hashBufferSize = SHA3_512.HashData(password, hashBuffer); + if (!HashProviderDispenser.HashSupported(hashAlgorithmName)) + { + throw new PlatformNotSupportedException(); + } + + hashBufferSize = HashProviderDispenser.OneShotHashProvider.HashData(hashAlgorithmName, password, hashBuffer); break; default: Debug.Fail($"Unexpected hash algorithm '{hashAlgorithmName}'"); diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RandomNumberGenerator.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RandomNumberGenerator.cs index 3802c8ee862c9b..d1463546dd021f 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RandomNumberGenerator.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RandomNumberGenerator.cs @@ -4,6 +4,7 @@ using System.Buffers; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Numerics; using System.Runtime.InteropServices; namespace System.Security.Cryptography @@ -350,6 +351,41 @@ private static void GetHexStringCore(Span destination, bool lowercase) private static void GetItemsCore(ReadOnlySpan choices, Span destination) { + // The most expensive part of this operation is the call to get random data. We can + // do so potentially many fewer times if: + // - the number of choices is <= 256. This let's us get a single byte per choice. + // - the number of choices is a power of two. This let's us use a byte and simply mask off + // unnecessary bits cheaply rather than needing to use rejection sampling. + // In such a case, we can grab a bunch of random bytes in one call. + if (BitOperations.IsPow2(choices.Length) && choices.Length <= 256) + { + // Get stack space to store random bytes. This size was chosen to balance between + // stack consumed and number of random calls required. + Span randomBytes = stackalloc byte[512]; + + while (!destination.IsEmpty) + { + if (destination.Length < randomBytes.Length) + { + randomBytes = randomBytes.Slice(0, destination.Length); + } + + RandomNumberGeneratorImplementation.FillSpan(randomBytes); + + int mask = choices.Length - 1; + for (int i = 0; i < randomBytes.Length; i++) + { + destination[i] = choices[randomBytes[i] & mask]; + } + + destination = destination.Slice(randomBytes.Length); + } + + return; + } + + // Simple fallback: get each item individually, generating a new random Int32 for each + // item. This is slower than the above, but it works for all types and sizes of choices. for (int i = 0; i < destination.Length; i++) { destination[i] = choices[GetInt32(choices.Length)]; diff --git a/src/libraries/System.Security.Cryptography/tests/RandomNumberGeneratorTests.cs b/src/libraries/System.Security.Cryptography/tests/RandomNumberGeneratorTests.cs index 38f3068e469e9f..f7b4ad2de4f772 100644 --- a/src/libraries/System.Security.Cryptography/tests/RandomNumberGeneratorTests.cs +++ b/src/libraries/System.Security.Cryptography/tests/RandomNumberGeneratorTests.cs @@ -669,9 +669,12 @@ public static void GetItems_Int_NoDeduplication() public static void GetString_RandomDistribution() { const string Choices = "abcdefghijklmnopqrstuvwxyz"; - string generated = RandomNumberGenerator.GetString(Choices, 10_000); - VerifyDistribution(generated, 1f / 26); - VerifyAllInRange(generated, 'a', (char)('z' + 1)); + for (int i = 1; i <= Choices.Length; i++) + { + string generated = RandomNumberGenerator.GetString(Choices.AsSpan(0, i), 10_000); + VerifyDistribution(generated, 1f / i); + VerifyAllInRange(generated, 'a', (char)('a' + i)); + } } [Fact] diff --git a/src/libraries/System.Security.Cryptography/tests/X509Certificates/RevocationTests/AiaTests.cs b/src/libraries/System.Security.Cryptography/tests/X509Certificates/RevocationTests/AiaTests.cs index a1ce84ce5be8e8..9ac079f62312e4 100644 --- a/src/libraries/System.Security.Cryptography/tests/X509Certificates/RevocationTests/AiaTests.cs +++ b/src/libraries/System.Security.Cryptography/tests/X509Certificates/RevocationTests/AiaTests.cs @@ -8,7 +8,6 @@ namespace System.Security.Cryptography.X509Certificates.Tests.RevocationTests { - [ActiveIssue("https://github.com/dotnet/runtime/issues/57506", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsMariner))] [SkipOnPlatform(TestPlatforms.Android, "Android does not support AIA fetching")] [SkipOnPlatform(TestPlatforms.Browser, "Browser doesn't support X.509 certificates")] public static class AiaTests diff --git a/src/libraries/System.Security.Cryptography/tests/X509Certificates/TestData.cs b/src/libraries/System.Security.Cryptography/tests/X509Certificates/TestData.cs index 7110c78329778d..e3deb00b354d06 100644 --- a/src/libraries/System.Security.Cryptography/tests/X509Certificates/TestData.cs +++ b/src/libraries/System.Security.Cryptography/tests/X509Certificates/TestData.cs @@ -51,7 +51,8 @@ internal static class TestData // This pfx was generated by new X509Certificate(MsCertificate).Export(X509ContentType.Pfx) // and was choosen when the padding was 01 and caused a false-positive on decryption. - public static byte[] MsCertificateExportedToPfx_NullPassword = Convert.FromBase64String(@" + public static byte[] MsCertificateExportedToPfx_NullPassword = Convert.FromBase64String( + /* [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="This PKCS#12 blob only contains public info.")] */ @" MIIFxAIBAzCCBYoGCSqGSIb3DQEHAaCCBXsEggV3MIIFczCCBW8GCSqGSIb3DQEH BqCCBWAwggVcAgEAMIIFVQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIKpCU u5nlxAACAggAgIIFKG/SLlS1TJmxGUiXBPJ1r4yV+JMehwo6RYPMkCSnpKGaiLyA @@ -3057,7 +3058,8 @@ internal static DSAParameters GetDSA1024Params() "4D7314FCB4041469835268466D1390373566F7034C4736346CD17D020207D0").HexToByteArray(); internal static readonly byte[] Pkcs12NoPasswordRandomCounts = - Convert.FromBase64String(@" + Convert.FromBase64String( + /* [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Self-signed cert created specifically for inclusion in public-facing unit tests.")] */ @" MIIvdAIBAzCCLtQGCSqGSIb3DQEHAaCCLsUEgi7BMIIuvTCCLrkGCSqGSIb3DQEHAaCCLqoEgi6m MIIuojCCAvkGCyqGSIb3DQEMCgECoIIC6DCCAuQwXgYJKoZIhvcNAQUNMFEwMAYJKoZIhvcNAQUM MCMEELD+7LV5Y9tyUiJnNeZVLwQCASowDAYIKoZIhvcNAgsFADAdBglghkgBZQMEASoEEBzHfelA diff --git a/src/libraries/System.Security.Permissions/System.Security.Permissions.sln b/src/libraries/System.Security.Permissions/System.Security.Permissions.sln index 13c43e863d6371..b233dfa3928248 100644 --- a/src/libraries/System.Security.Permissions/System.Security.Permissions.sln +++ b/src/libraries/System.Security.Permissions/System.Security.Permissions.sln @@ -1,16 +1,28 @@ 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", "{C7F0324A-249D-4F7E-8C9C-6AF05A9357A9}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{74374CDE-23F8-4041-8F94-D5CBC23735C6}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Drawing.Common", "..\shims\stubs\System.Drawing.Common.csproj", "{B4058365-B232-433F-882B-1ADC77198BFE}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.DirectoryServices", "..\System.DirectoryServices\ref\System.DirectoryServices.csproj", "{A629F9A5-1EA5-475F-9A49-29C81198CF34}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.DirectoryServices", "..\System.DirectoryServices\src\System.DirectoryServices.csproj", "{7E64D2D1-7ED9-490A-B658-5E2162F571D6}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{5A1D48AD-ECA3-4870-9268-426FE6CCC6E9}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{C7396F74-3B9A-4FFC-B9E7-45074C6104CF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{92D383A1-2440-4D89-8071-6A5159A7C6EF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.Uri", "..\System.Private.Uri\src\System.Private.Uri.csproj", "{6029A164-8081-4469-8248-18FF73050660}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{86E25854-BE58-41CF-9DF6-4669C4D23D05}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{E2926598-EE1D-4DA3-AD75-11D54F1EF318}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{E248AA4A-5E55-43D6-BC81-8578542F605A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\src\System.Runtime.csproj", "{371555F7-F80C-448F-93A3-C43EFE5AC12B}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Permissions", "ref\System.Security.Permissions.csproj", "{F238F227-522D-4886-A6B5-474948B3C660}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Permissions", "src\System.Security.Permissions.csproj", "{CE88C6B8-C9B6-4695-BA23-BE8955018E26}" @@ -21,80 +33,554 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", "..\System.Windows.Extensions\src\System.Windows.Extensions.csproj", "{F2FF3B73-B971-4C07-B9C9-9EA600C288BD}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{25C80847-6651-4D9D-B625-24D756EC48CA}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{015DEF24-D141-43D4-AF88-67F17F341F32}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{97C6E424-BBBA-495D-8261-E5ADBABA2B29}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{7CB8ADAD-F584-402B-B76A-FB1DE2114D3B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{C6667A06-3805-4268-95F3-F7E64C153FF7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{20126308-D657-417C-832A-C72AAD482BB3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{63AEC067-DCBE-4531-8E89-EBFBEB507503}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{2B31BB89-A386-4177-8BD8-3AAB0CA50E25}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{25C80847-6651-4D9D-B625-24D756EC48CA}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{9C0E3C0E-FFF8-4241-8942-A77093C003F1}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{97C6E424-BBBA-495D-8261-E5ADBABA2B29}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{EA13AEBA-B53D-4A6C-8BA1-FB1748B87675}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{D34F8F34-A420-4794-BDFB-42166D02D866}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{311B3045-E4B9-4059-87C2-5945F6292F0A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{702008EE-4C11-4118-83EF-BCE55414E11C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{126E625A-D9FB-4072-887F-311095BFB1B8}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|arm = Debug|arm + Debug|arm64 = Debug|arm64 + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|arm = Release|arm + Release|arm64 = Release|arm64 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + Checked|Any CPU = Checked|Any CPU + Checked|arm = Checked|arm + Checked|arm64 = Checked|arm64 + Checked|x64 = Checked|x64 + Checked|x86 = Checked|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C7F0324A-249D-4F7E-8C9C-6AF05A9357A9}.Debug|Any CPU.ActiveCfg = Debug|x64 + {C7F0324A-249D-4F7E-8C9C-6AF05A9357A9}.Debug|Any CPU.Build.0 = Debug|x64 + {C7F0324A-249D-4F7E-8C9C-6AF05A9357A9}.Debug|arm.ActiveCfg = Debug|arm + {C7F0324A-249D-4F7E-8C9C-6AF05A9357A9}.Debug|arm.Build.0 = Debug|arm + {C7F0324A-249D-4F7E-8C9C-6AF05A9357A9}.Debug|arm64.ActiveCfg = Debug|arm64 + {C7F0324A-249D-4F7E-8C9C-6AF05A9357A9}.Debug|arm64.Build.0 = Debug|arm64 + {C7F0324A-249D-4F7E-8C9C-6AF05A9357A9}.Debug|x64.ActiveCfg = Debug|x64 + {C7F0324A-249D-4F7E-8C9C-6AF05A9357A9}.Debug|x64.Build.0 = Debug|x64 + {C7F0324A-249D-4F7E-8C9C-6AF05A9357A9}.Debug|x86.ActiveCfg = Debug|x86 + {C7F0324A-249D-4F7E-8C9C-6AF05A9357A9}.Debug|x86.Build.0 = Debug|x86 + {C7F0324A-249D-4F7E-8C9C-6AF05A9357A9}.Release|Any CPU.ActiveCfg = Release|x64 + {C7F0324A-249D-4F7E-8C9C-6AF05A9357A9}.Release|Any CPU.Build.0 = Release|x64 + {C7F0324A-249D-4F7E-8C9C-6AF05A9357A9}.Release|arm.ActiveCfg = Release|arm + {C7F0324A-249D-4F7E-8C9C-6AF05A9357A9}.Release|arm.Build.0 = Release|arm + {C7F0324A-249D-4F7E-8C9C-6AF05A9357A9}.Release|arm64.ActiveCfg = Release|arm64 + {C7F0324A-249D-4F7E-8C9C-6AF05A9357A9}.Release|arm64.Build.0 = Release|arm64 + {C7F0324A-249D-4F7E-8C9C-6AF05A9357A9}.Release|x64.ActiveCfg = Release|x64 + {C7F0324A-249D-4F7E-8C9C-6AF05A9357A9}.Release|x64.Build.0 = Release|x64 + {C7F0324A-249D-4F7E-8C9C-6AF05A9357A9}.Release|x86.ActiveCfg = Release|x86 + {C7F0324A-249D-4F7E-8C9C-6AF05A9357A9}.Release|x86.Build.0 = Release|x86 + {C7F0324A-249D-4F7E-8C9C-6AF05A9357A9}.Checked|Any CPU.ActiveCfg = Checked|x64 + {C7F0324A-249D-4F7E-8C9C-6AF05A9357A9}.Checked|Any CPU.Build.0 = Checked|x64 + {C7F0324A-249D-4F7E-8C9C-6AF05A9357A9}.Checked|arm.ActiveCfg = Checked|arm + {C7F0324A-249D-4F7E-8C9C-6AF05A9357A9}.Checked|arm.Build.0 = Checked|arm + {C7F0324A-249D-4F7E-8C9C-6AF05A9357A9}.Checked|arm64.ActiveCfg = Checked|arm64 + {C7F0324A-249D-4F7E-8C9C-6AF05A9357A9}.Checked|arm64.Build.0 = Checked|arm64 + {C7F0324A-249D-4F7E-8C9C-6AF05A9357A9}.Checked|x64.ActiveCfg = Checked|x64 + {C7F0324A-249D-4F7E-8C9C-6AF05A9357A9}.Checked|x64.Build.0 = Checked|x64 + {C7F0324A-249D-4F7E-8C9C-6AF05A9357A9}.Checked|x86.ActiveCfg = Checked|x86 + {C7F0324A-249D-4F7E-8C9C-6AF05A9357A9}.Checked|x86.Build.0 = Checked|x86 {74374CDE-23F8-4041-8F94-D5CBC23735C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {74374CDE-23F8-4041-8F94-D5CBC23735C6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {74374CDE-23F8-4041-8F94-D5CBC23735C6}.Debug|arm.ActiveCfg = Debug|Any CPU + {74374CDE-23F8-4041-8F94-D5CBC23735C6}.Debug|arm64.ActiveCfg = Debug|Any CPU + {74374CDE-23F8-4041-8F94-D5CBC23735C6}.Debug|x64.ActiveCfg = Debug|Any CPU + {74374CDE-23F8-4041-8F94-D5CBC23735C6}.Debug|x64.Build.0 = Debug|Any CPU + {74374CDE-23F8-4041-8F94-D5CBC23735C6}.Debug|x86.ActiveCfg = Debug|Any CPU + {74374CDE-23F8-4041-8F94-D5CBC23735C6}.Debug|x86.Build.0 = Debug|Any CPU {74374CDE-23F8-4041-8F94-D5CBC23735C6}.Release|Any CPU.ActiveCfg = Release|Any CPU {74374CDE-23F8-4041-8F94-D5CBC23735C6}.Release|Any CPU.Build.0 = Release|Any CPU + {74374CDE-23F8-4041-8F94-D5CBC23735C6}.Release|arm.ActiveCfg = Release|Any CPU + {74374CDE-23F8-4041-8F94-D5CBC23735C6}.Release|arm64.ActiveCfg = Release|Any CPU + {74374CDE-23F8-4041-8F94-D5CBC23735C6}.Release|x64.ActiveCfg = Release|Any CPU + {74374CDE-23F8-4041-8F94-D5CBC23735C6}.Release|x64.Build.0 = Release|Any CPU + {74374CDE-23F8-4041-8F94-D5CBC23735C6}.Release|x86.ActiveCfg = Release|Any CPU + {74374CDE-23F8-4041-8F94-D5CBC23735C6}.Release|x86.Build.0 = Release|Any CPU + {74374CDE-23F8-4041-8F94-D5CBC23735C6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {74374CDE-23F8-4041-8F94-D5CBC23735C6}.Checked|arm.ActiveCfg = Debug|Any CPU + {74374CDE-23F8-4041-8F94-D5CBC23735C6}.Checked|arm64.ActiveCfg = Debug|Any CPU + {74374CDE-23F8-4041-8F94-D5CBC23735C6}.Checked|x64.ActiveCfg = Debug|Any CPU + {74374CDE-23F8-4041-8F94-D5CBC23735C6}.Checked|x86.ActiveCfg = Debug|Any CPU + {B4058365-B232-433F-882B-1ADC77198BFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B4058365-B232-433F-882B-1ADC77198BFE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B4058365-B232-433F-882B-1ADC77198BFE}.Debug|arm.ActiveCfg = Debug|Any CPU + {B4058365-B232-433F-882B-1ADC77198BFE}.Debug|arm64.ActiveCfg = Debug|Any CPU + {B4058365-B232-433F-882B-1ADC77198BFE}.Debug|x64.ActiveCfg = Debug|Any CPU + {B4058365-B232-433F-882B-1ADC77198BFE}.Debug|x64.Build.0 = Debug|Any CPU + {B4058365-B232-433F-882B-1ADC77198BFE}.Debug|x86.ActiveCfg = Debug|Any CPU + {B4058365-B232-433F-882B-1ADC77198BFE}.Debug|x86.Build.0 = Debug|Any CPU + {B4058365-B232-433F-882B-1ADC77198BFE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B4058365-B232-433F-882B-1ADC77198BFE}.Release|Any CPU.Build.0 = Release|Any CPU + {B4058365-B232-433F-882B-1ADC77198BFE}.Release|arm.ActiveCfg = Release|Any CPU + {B4058365-B232-433F-882B-1ADC77198BFE}.Release|arm64.ActiveCfg = Release|Any CPU + {B4058365-B232-433F-882B-1ADC77198BFE}.Release|x64.ActiveCfg = Release|Any CPU + {B4058365-B232-433F-882B-1ADC77198BFE}.Release|x64.Build.0 = Release|Any CPU + {B4058365-B232-433F-882B-1ADC77198BFE}.Release|x86.ActiveCfg = Release|Any CPU + {B4058365-B232-433F-882B-1ADC77198BFE}.Release|x86.Build.0 = Release|Any CPU + {B4058365-B232-433F-882B-1ADC77198BFE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {B4058365-B232-433F-882B-1ADC77198BFE}.Checked|arm.ActiveCfg = Debug|Any CPU + {B4058365-B232-433F-882B-1ADC77198BFE}.Checked|arm64.ActiveCfg = Debug|Any CPU + {B4058365-B232-433F-882B-1ADC77198BFE}.Checked|x64.ActiveCfg = Debug|Any CPU + {B4058365-B232-433F-882B-1ADC77198BFE}.Checked|x86.ActiveCfg = Debug|Any CPU {A629F9A5-1EA5-475F-9A49-29C81198CF34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A629F9A5-1EA5-475F-9A49-29C81198CF34}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A629F9A5-1EA5-475F-9A49-29C81198CF34}.Debug|arm.ActiveCfg = Debug|Any CPU + {A629F9A5-1EA5-475F-9A49-29C81198CF34}.Debug|arm64.ActiveCfg = Debug|Any CPU + {A629F9A5-1EA5-475F-9A49-29C81198CF34}.Debug|x64.ActiveCfg = Debug|Any CPU + {A629F9A5-1EA5-475F-9A49-29C81198CF34}.Debug|x64.Build.0 = Debug|Any CPU + {A629F9A5-1EA5-475F-9A49-29C81198CF34}.Debug|x86.ActiveCfg = Debug|Any CPU + {A629F9A5-1EA5-475F-9A49-29C81198CF34}.Debug|x86.Build.0 = Debug|Any CPU {A629F9A5-1EA5-475F-9A49-29C81198CF34}.Release|Any CPU.ActiveCfg = Release|Any CPU {A629F9A5-1EA5-475F-9A49-29C81198CF34}.Release|Any CPU.Build.0 = Release|Any CPU + {A629F9A5-1EA5-475F-9A49-29C81198CF34}.Release|arm.ActiveCfg = Release|Any CPU + {A629F9A5-1EA5-475F-9A49-29C81198CF34}.Release|arm64.ActiveCfg = Release|Any CPU + {A629F9A5-1EA5-475F-9A49-29C81198CF34}.Release|x64.ActiveCfg = Release|Any CPU + {A629F9A5-1EA5-475F-9A49-29C81198CF34}.Release|x64.Build.0 = Release|Any CPU + {A629F9A5-1EA5-475F-9A49-29C81198CF34}.Release|x86.ActiveCfg = Release|Any CPU + {A629F9A5-1EA5-475F-9A49-29C81198CF34}.Release|x86.Build.0 = Release|Any CPU + {A629F9A5-1EA5-475F-9A49-29C81198CF34}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {A629F9A5-1EA5-475F-9A49-29C81198CF34}.Checked|arm.ActiveCfg = Debug|Any CPU + {A629F9A5-1EA5-475F-9A49-29C81198CF34}.Checked|arm64.ActiveCfg = Debug|Any CPU + {A629F9A5-1EA5-475F-9A49-29C81198CF34}.Checked|x64.ActiveCfg = Debug|Any CPU + {A629F9A5-1EA5-475F-9A49-29C81198CF34}.Checked|x86.ActiveCfg = Debug|Any CPU {7E64D2D1-7ED9-490A-B658-5E2162F571D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7E64D2D1-7ED9-490A-B658-5E2162F571D6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7E64D2D1-7ED9-490A-B658-5E2162F571D6}.Debug|arm.ActiveCfg = Debug|Any CPU + {7E64D2D1-7ED9-490A-B658-5E2162F571D6}.Debug|arm64.ActiveCfg = Debug|Any CPU + {7E64D2D1-7ED9-490A-B658-5E2162F571D6}.Debug|x64.ActiveCfg = Debug|Any CPU + {7E64D2D1-7ED9-490A-B658-5E2162F571D6}.Debug|x64.Build.0 = Debug|Any CPU + {7E64D2D1-7ED9-490A-B658-5E2162F571D6}.Debug|x86.ActiveCfg = Debug|Any CPU + {7E64D2D1-7ED9-490A-B658-5E2162F571D6}.Debug|x86.Build.0 = Debug|Any CPU {7E64D2D1-7ED9-490A-B658-5E2162F571D6}.Release|Any CPU.ActiveCfg = Release|Any CPU {7E64D2D1-7ED9-490A-B658-5E2162F571D6}.Release|Any CPU.Build.0 = Release|Any CPU - {5A1D48AD-ECA3-4870-9268-426FE6CCC6E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5A1D48AD-ECA3-4870-9268-426FE6CCC6E9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5A1D48AD-ECA3-4870-9268-426FE6CCC6E9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5A1D48AD-ECA3-4870-9268-426FE6CCC6E9}.Release|Any CPU.Build.0 = Release|Any CPU + {7E64D2D1-7ED9-490A-B658-5E2162F571D6}.Release|arm.ActiveCfg = Release|Any CPU + {7E64D2D1-7ED9-490A-B658-5E2162F571D6}.Release|arm64.ActiveCfg = Release|Any CPU + {7E64D2D1-7ED9-490A-B658-5E2162F571D6}.Release|x64.ActiveCfg = Release|Any CPU + {7E64D2D1-7ED9-490A-B658-5E2162F571D6}.Release|x64.Build.0 = Release|Any CPU + {7E64D2D1-7ED9-490A-B658-5E2162F571D6}.Release|x86.ActiveCfg = Release|Any CPU + {7E64D2D1-7ED9-490A-B658-5E2162F571D6}.Release|x86.Build.0 = Release|Any CPU + {7E64D2D1-7ED9-490A-B658-5E2162F571D6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {7E64D2D1-7ED9-490A-B658-5E2162F571D6}.Checked|arm.ActiveCfg = Debug|Any CPU + {7E64D2D1-7ED9-490A-B658-5E2162F571D6}.Checked|arm64.ActiveCfg = Debug|Any CPU + {7E64D2D1-7ED9-490A-B658-5E2162F571D6}.Checked|x64.ActiveCfg = Debug|Any CPU + {7E64D2D1-7ED9-490A-B658-5E2162F571D6}.Checked|x86.ActiveCfg = Debug|Any CPU + {C7396F74-3B9A-4FFC-B9E7-45074C6104CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C7396F74-3B9A-4FFC-B9E7-45074C6104CF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C7396F74-3B9A-4FFC-B9E7-45074C6104CF}.Debug|arm.ActiveCfg = Debug|Any CPU + {C7396F74-3B9A-4FFC-B9E7-45074C6104CF}.Debug|arm64.ActiveCfg = Debug|Any CPU + {C7396F74-3B9A-4FFC-B9E7-45074C6104CF}.Debug|x64.ActiveCfg = Debug|Any CPU + {C7396F74-3B9A-4FFC-B9E7-45074C6104CF}.Debug|x64.Build.0 = Debug|Any CPU + {C7396F74-3B9A-4FFC-B9E7-45074C6104CF}.Debug|x86.ActiveCfg = Debug|Any CPU + {C7396F74-3B9A-4FFC-B9E7-45074C6104CF}.Debug|x86.Build.0 = Debug|Any CPU + {C7396F74-3B9A-4FFC-B9E7-45074C6104CF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C7396F74-3B9A-4FFC-B9E7-45074C6104CF}.Release|Any CPU.Build.0 = Release|Any CPU + {C7396F74-3B9A-4FFC-B9E7-45074C6104CF}.Release|arm.ActiveCfg = Release|Any CPU + {C7396F74-3B9A-4FFC-B9E7-45074C6104CF}.Release|arm64.ActiveCfg = Release|Any CPU + {C7396F74-3B9A-4FFC-B9E7-45074C6104CF}.Release|x64.ActiveCfg = Release|Any CPU + {C7396F74-3B9A-4FFC-B9E7-45074C6104CF}.Release|x64.Build.0 = Release|Any CPU + {C7396F74-3B9A-4FFC-B9E7-45074C6104CF}.Release|x86.ActiveCfg = Release|Any CPU + {C7396F74-3B9A-4FFC-B9E7-45074C6104CF}.Release|x86.Build.0 = Release|Any CPU + {C7396F74-3B9A-4FFC-B9E7-45074C6104CF}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {C7396F74-3B9A-4FFC-B9E7-45074C6104CF}.Checked|arm.ActiveCfg = Debug|Any CPU + {C7396F74-3B9A-4FFC-B9E7-45074C6104CF}.Checked|arm64.ActiveCfg = Debug|Any CPU + {C7396F74-3B9A-4FFC-B9E7-45074C6104CF}.Checked|x64.ActiveCfg = Debug|Any CPU + {C7396F74-3B9A-4FFC-B9E7-45074C6104CF}.Checked|x86.ActiveCfg = Debug|Any CPU + {92D383A1-2440-4D89-8071-6A5159A7C6EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {92D383A1-2440-4D89-8071-6A5159A7C6EF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {92D383A1-2440-4D89-8071-6A5159A7C6EF}.Debug|arm.ActiveCfg = Debug|Any CPU + {92D383A1-2440-4D89-8071-6A5159A7C6EF}.Debug|arm64.ActiveCfg = Debug|Any CPU + {92D383A1-2440-4D89-8071-6A5159A7C6EF}.Debug|x64.ActiveCfg = Debug|Any CPU + {92D383A1-2440-4D89-8071-6A5159A7C6EF}.Debug|x64.Build.0 = Debug|Any CPU + {92D383A1-2440-4D89-8071-6A5159A7C6EF}.Debug|x86.ActiveCfg = Debug|Any CPU + {92D383A1-2440-4D89-8071-6A5159A7C6EF}.Debug|x86.Build.0 = Debug|Any CPU + {92D383A1-2440-4D89-8071-6A5159A7C6EF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {92D383A1-2440-4D89-8071-6A5159A7C6EF}.Release|Any CPU.Build.0 = Release|Any CPU + {92D383A1-2440-4D89-8071-6A5159A7C6EF}.Release|arm.ActiveCfg = Release|Any CPU + {92D383A1-2440-4D89-8071-6A5159A7C6EF}.Release|arm64.ActiveCfg = Release|Any CPU + {92D383A1-2440-4D89-8071-6A5159A7C6EF}.Release|x64.ActiveCfg = Release|Any CPU + {92D383A1-2440-4D89-8071-6A5159A7C6EF}.Release|x64.Build.0 = Release|Any CPU + {92D383A1-2440-4D89-8071-6A5159A7C6EF}.Release|x86.ActiveCfg = Release|Any CPU + {92D383A1-2440-4D89-8071-6A5159A7C6EF}.Release|x86.Build.0 = Release|Any CPU + {92D383A1-2440-4D89-8071-6A5159A7C6EF}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {92D383A1-2440-4D89-8071-6A5159A7C6EF}.Checked|arm.ActiveCfg = Debug|Any CPU + {92D383A1-2440-4D89-8071-6A5159A7C6EF}.Checked|arm64.ActiveCfg = Debug|Any CPU + {92D383A1-2440-4D89-8071-6A5159A7C6EF}.Checked|x64.ActiveCfg = Debug|Any CPU + {92D383A1-2440-4D89-8071-6A5159A7C6EF}.Checked|x86.ActiveCfg = Debug|Any CPU + {6029A164-8081-4469-8248-18FF73050660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6029A164-8081-4469-8248-18FF73050660}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6029A164-8081-4469-8248-18FF73050660}.Debug|arm.ActiveCfg = Debug|Any CPU + {6029A164-8081-4469-8248-18FF73050660}.Debug|arm64.ActiveCfg = Debug|Any CPU + {6029A164-8081-4469-8248-18FF73050660}.Debug|x64.ActiveCfg = Debug|Any CPU + {6029A164-8081-4469-8248-18FF73050660}.Debug|x64.Build.0 = Debug|Any CPU + {6029A164-8081-4469-8248-18FF73050660}.Debug|x86.ActiveCfg = Debug|Any CPU + {6029A164-8081-4469-8248-18FF73050660}.Debug|x86.Build.0 = Debug|Any CPU + {6029A164-8081-4469-8248-18FF73050660}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6029A164-8081-4469-8248-18FF73050660}.Release|Any CPU.Build.0 = Release|Any CPU + {6029A164-8081-4469-8248-18FF73050660}.Release|arm.ActiveCfg = Release|Any CPU + {6029A164-8081-4469-8248-18FF73050660}.Release|arm64.ActiveCfg = Release|Any CPU + {6029A164-8081-4469-8248-18FF73050660}.Release|x64.ActiveCfg = Release|Any CPU + {6029A164-8081-4469-8248-18FF73050660}.Release|x64.Build.0 = Release|Any CPU + {6029A164-8081-4469-8248-18FF73050660}.Release|x86.ActiveCfg = Release|Any CPU + {6029A164-8081-4469-8248-18FF73050660}.Release|x86.Build.0 = Release|Any CPU + {6029A164-8081-4469-8248-18FF73050660}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {6029A164-8081-4469-8248-18FF73050660}.Checked|arm.ActiveCfg = Debug|Any CPU + {6029A164-8081-4469-8248-18FF73050660}.Checked|arm64.ActiveCfg = Debug|Any CPU + {6029A164-8081-4469-8248-18FF73050660}.Checked|x64.ActiveCfg = Debug|Any CPU + {6029A164-8081-4469-8248-18FF73050660}.Checked|x86.ActiveCfg = Debug|Any CPU {86E25854-BE58-41CF-9DF6-4669C4D23D05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {86E25854-BE58-41CF-9DF6-4669C4D23D05}.Debug|Any CPU.Build.0 = Debug|Any CPU + {86E25854-BE58-41CF-9DF6-4669C4D23D05}.Debug|arm.ActiveCfg = Debug|Any CPU + {86E25854-BE58-41CF-9DF6-4669C4D23D05}.Debug|arm64.ActiveCfg = Debug|Any CPU + {86E25854-BE58-41CF-9DF6-4669C4D23D05}.Debug|x64.ActiveCfg = Debug|Any CPU + {86E25854-BE58-41CF-9DF6-4669C4D23D05}.Debug|x64.Build.0 = Debug|Any CPU + {86E25854-BE58-41CF-9DF6-4669C4D23D05}.Debug|x86.ActiveCfg = Debug|Any CPU + {86E25854-BE58-41CF-9DF6-4669C4D23D05}.Debug|x86.Build.0 = Debug|Any CPU {86E25854-BE58-41CF-9DF6-4669C4D23D05}.Release|Any CPU.ActiveCfg = Release|Any CPU {86E25854-BE58-41CF-9DF6-4669C4D23D05}.Release|Any CPU.Build.0 = Release|Any CPU + {86E25854-BE58-41CF-9DF6-4669C4D23D05}.Release|arm.ActiveCfg = Release|Any CPU + {86E25854-BE58-41CF-9DF6-4669C4D23D05}.Release|arm64.ActiveCfg = Release|Any CPU + {86E25854-BE58-41CF-9DF6-4669C4D23D05}.Release|x64.ActiveCfg = Release|Any CPU + {86E25854-BE58-41CF-9DF6-4669C4D23D05}.Release|x64.Build.0 = Release|Any CPU + {86E25854-BE58-41CF-9DF6-4669C4D23D05}.Release|x86.ActiveCfg = Release|Any CPU + {86E25854-BE58-41CF-9DF6-4669C4D23D05}.Release|x86.Build.0 = Release|Any CPU + {86E25854-BE58-41CF-9DF6-4669C4D23D05}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {86E25854-BE58-41CF-9DF6-4669C4D23D05}.Checked|arm.ActiveCfg = Debug|Any CPU + {86E25854-BE58-41CF-9DF6-4669C4D23D05}.Checked|arm64.ActiveCfg = Debug|Any CPU + {86E25854-BE58-41CF-9DF6-4669C4D23D05}.Checked|x64.ActiveCfg = Debug|Any CPU + {86E25854-BE58-41CF-9DF6-4669C4D23D05}.Checked|x86.ActiveCfg = Debug|Any CPU {E2926598-EE1D-4DA3-AD75-11D54F1EF318}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E2926598-EE1D-4DA3-AD75-11D54F1EF318}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E2926598-EE1D-4DA3-AD75-11D54F1EF318}.Debug|arm.ActiveCfg = Debug|Any CPU + {E2926598-EE1D-4DA3-AD75-11D54F1EF318}.Debug|arm64.ActiveCfg = Debug|Any CPU + {E2926598-EE1D-4DA3-AD75-11D54F1EF318}.Debug|x64.ActiveCfg = Debug|Any CPU + {E2926598-EE1D-4DA3-AD75-11D54F1EF318}.Debug|x64.Build.0 = Debug|Any CPU + {E2926598-EE1D-4DA3-AD75-11D54F1EF318}.Debug|x86.ActiveCfg = Debug|Any CPU + {E2926598-EE1D-4DA3-AD75-11D54F1EF318}.Debug|x86.Build.0 = Debug|Any CPU {E2926598-EE1D-4DA3-AD75-11D54F1EF318}.Release|Any CPU.ActiveCfg = Release|Any CPU {E2926598-EE1D-4DA3-AD75-11D54F1EF318}.Release|Any CPU.Build.0 = Release|Any CPU + {E2926598-EE1D-4DA3-AD75-11D54F1EF318}.Release|arm.ActiveCfg = Release|Any CPU + {E2926598-EE1D-4DA3-AD75-11D54F1EF318}.Release|arm64.ActiveCfg = Release|Any CPU + {E2926598-EE1D-4DA3-AD75-11D54F1EF318}.Release|x64.ActiveCfg = Release|Any CPU + {E2926598-EE1D-4DA3-AD75-11D54F1EF318}.Release|x64.Build.0 = Release|Any CPU + {E2926598-EE1D-4DA3-AD75-11D54F1EF318}.Release|x86.ActiveCfg = Release|Any CPU + {E2926598-EE1D-4DA3-AD75-11D54F1EF318}.Release|x86.Build.0 = Release|Any CPU + {E2926598-EE1D-4DA3-AD75-11D54F1EF318}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {E2926598-EE1D-4DA3-AD75-11D54F1EF318}.Checked|arm.ActiveCfg = Debug|Any CPU + {E2926598-EE1D-4DA3-AD75-11D54F1EF318}.Checked|arm64.ActiveCfg = Debug|Any CPU + {E2926598-EE1D-4DA3-AD75-11D54F1EF318}.Checked|x64.ActiveCfg = Debug|Any CPU + {E2926598-EE1D-4DA3-AD75-11D54F1EF318}.Checked|x86.ActiveCfg = Debug|Any CPU + {E248AA4A-5E55-43D6-BC81-8578542F605A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E248AA4A-5E55-43D6-BC81-8578542F605A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E248AA4A-5E55-43D6-BC81-8578542F605A}.Debug|arm.ActiveCfg = Debug|Any CPU + {E248AA4A-5E55-43D6-BC81-8578542F605A}.Debug|arm64.ActiveCfg = Debug|Any CPU + {E248AA4A-5E55-43D6-BC81-8578542F605A}.Debug|x64.ActiveCfg = Debug|Any CPU + {E248AA4A-5E55-43D6-BC81-8578542F605A}.Debug|x64.Build.0 = Debug|Any CPU + {E248AA4A-5E55-43D6-BC81-8578542F605A}.Debug|x86.ActiveCfg = Debug|Any CPU + {E248AA4A-5E55-43D6-BC81-8578542F605A}.Debug|x86.Build.0 = Debug|Any CPU + {E248AA4A-5E55-43D6-BC81-8578542F605A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E248AA4A-5E55-43D6-BC81-8578542F605A}.Release|Any CPU.Build.0 = Release|Any CPU + {E248AA4A-5E55-43D6-BC81-8578542F605A}.Release|arm.ActiveCfg = Release|Any CPU + {E248AA4A-5E55-43D6-BC81-8578542F605A}.Release|arm64.ActiveCfg = Release|Any CPU + {E248AA4A-5E55-43D6-BC81-8578542F605A}.Release|x64.ActiveCfg = Release|Any CPU + {E248AA4A-5E55-43D6-BC81-8578542F605A}.Release|x64.Build.0 = Release|Any CPU + {E248AA4A-5E55-43D6-BC81-8578542F605A}.Release|x86.ActiveCfg = Release|Any CPU + {E248AA4A-5E55-43D6-BC81-8578542F605A}.Release|x86.Build.0 = Release|Any CPU + {E248AA4A-5E55-43D6-BC81-8578542F605A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {E248AA4A-5E55-43D6-BC81-8578542F605A}.Checked|arm.ActiveCfg = Debug|Any CPU + {E248AA4A-5E55-43D6-BC81-8578542F605A}.Checked|arm64.ActiveCfg = Debug|Any CPU + {E248AA4A-5E55-43D6-BC81-8578542F605A}.Checked|x64.ActiveCfg = Debug|Any CPU + {E248AA4A-5E55-43D6-BC81-8578542F605A}.Checked|x86.ActiveCfg = Debug|Any CPU + {371555F7-F80C-448F-93A3-C43EFE5AC12B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {371555F7-F80C-448F-93A3-C43EFE5AC12B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {371555F7-F80C-448F-93A3-C43EFE5AC12B}.Debug|arm.ActiveCfg = Debug|Any CPU + {371555F7-F80C-448F-93A3-C43EFE5AC12B}.Debug|arm64.ActiveCfg = Debug|Any CPU + {371555F7-F80C-448F-93A3-C43EFE5AC12B}.Debug|x64.ActiveCfg = Debug|Any CPU + {371555F7-F80C-448F-93A3-C43EFE5AC12B}.Debug|x64.Build.0 = Debug|Any CPU + {371555F7-F80C-448F-93A3-C43EFE5AC12B}.Debug|x86.ActiveCfg = Debug|Any CPU + {371555F7-F80C-448F-93A3-C43EFE5AC12B}.Debug|x86.Build.0 = Debug|Any CPU + {371555F7-F80C-448F-93A3-C43EFE5AC12B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {371555F7-F80C-448F-93A3-C43EFE5AC12B}.Release|Any CPU.Build.0 = Release|Any CPU + {371555F7-F80C-448F-93A3-C43EFE5AC12B}.Release|arm.ActiveCfg = Release|Any CPU + {371555F7-F80C-448F-93A3-C43EFE5AC12B}.Release|arm64.ActiveCfg = Release|Any CPU + {371555F7-F80C-448F-93A3-C43EFE5AC12B}.Release|x64.ActiveCfg = Release|Any CPU + {371555F7-F80C-448F-93A3-C43EFE5AC12B}.Release|x64.Build.0 = Release|Any CPU + {371555F7-F80C-448F-93A3-C43EFE5AC12B}.Release|x86.ActiveCfg = Release|Any CPU + {371555F7-F80C-448F-93A3-C43EFE5AC12B}.Release|x86.Build.0 = Release|Any CPU + {371555F7-F80C-448F-93A3-C43EFE5AC12B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {371555F7-F80C-448F-93A3-C43EFE5AC12B}.Checked|arm.ActiveCfg = Debug|Any CPU + {371555F7-F80C-448F-93A3-C43EFE5AC12B}.Checked|arm64.ActiveCfg = Debug|Any CPU + {371555F7-F80C-448F-93A3-C43EFE5AC12B}.Checked|x64.ActiveCfg = Debug|Any CPU + {371555F7-F80C-448F-93A3-C43EFE5AC12B}.Checked|x86.ActiveCfg = Debug|Any CPU {F238F227-522D-4886-A6B5-474948B3C660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F238F227-522D-4886-A6B5-474948B3C660}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F238F227-522D-4886-A6B5-474948B3C660}.Debug|arm.ActiveCfg = Debug|Any CPU + {F238F227-522D-4886-A6B5-474948B3C660}.Debug|arm64.ActiveCfg = Debug|Any CPU + {F238F227-522D-4886-A6B5-474948B3C660}.Debug|x64.ActiveCfg = Debug|Any CPU + {F238F227-522D-4886-A6B5-474948B3C660}.Debug|x64.Build.0 = Debug|Any CPU + {F238F227-522D-4886-A6B5-474948B3C660}.Debug|x86.ActiveCfg = Debug|Any CPU + {F238F227-522D-4886-A6B5-474948B3C660}.Debug|x86.Build.0 = Debug|Any CPU {F238F227-522D-4886-A6B5-474948B3C660}.Release|Any CPU.ActiveCfg = Release|Any CPU {F238F227-522D-4886-A6B5-474948B3C660}.Release|Any CPU.Build.0 = Release|Any CPU + {F238F227-522D-4886-A6B5-474948B3C660}.Release|arm.ActiveCfg = Release|Any CPU + {F238F227-522D-4886-A6B5-474948B3C660}.Release|arm64.ActiveCfg = Release|Any CPU + {F238F227-522D-4886-A6B5-474948B3C660}.Release|x64.ActiveCfg = Release|Any CPU + {F238F227-522D-4886-A6B5-474948B3C660}.Release|x64.Build.0 = Release|Any CPU + {F238F227-522D-4886-A6B5-474948B3C660}.Release|x86.ActiveCfg = Release|Any CPU + {F238F227-522D-4886-A6B5-474948B3C660}.Release|x86.Build.0 = Release|Any CPU + {F238F227-522D-4886-A6B5-474948B3C660}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {F238F227-522D-4886-A6B5-474948B3C660}.Checked|arm.ActiveCfg = Debug|Any CPU + {F238F227-522D-4886-A6B5-474948B3C660}.Checked|arm64.ActiveCfg = Debug|Any CPU + {F238F227-522D-4886-A6B5-474948B3C660}.Checked|x64.ActiveCfg = Debug|Any CPU + {F238F227-522D-4886-A6B5-474948B3C660}.Checked|x86.ActiveCfg = Debug|Any CPU {CE88C6B8-C9B6-4695-BA23-BE8955018E26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CE88C6B8-C9B6-4695-BA23-BE8955018E26}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CE88C6B8-C9B6-4695-BA23-BE8955018E26}.Debug|arm.ActiveCfg = Debug|Any CPU + {CE88C6B8-C9B6-4695-BA23-BE8955018E26}.Debug|arm64.ActiveCfg = Debug|Any CPU + {CE88C6B8-C9B6-4695-BA23-BE8955018E26}.Debug|x64.ActiveCfg = Debug|Any CPU + {CE88C6B8-C9B6-4695-BA23-BE8955018E26}.Debug|x64.Build.0 = Debug|Any CPU + {CE88C6B8-C9B6-4695-BA23-BE8955018E26}.Debug|x86.ActiveCfg = Debug|Any CPU + {CE88C6B8-C9B6-4695-BA23-BE8955018E26}.Debug|x86.Build.0 = Debug|Any CPU {CE88C6B8-C9B6-4695-BA23-BE8955018E26}.Release|Any CPU.ActiveCfg = Release|Any CPU {CE88C6B8-C9B6-4695-BA23-BE8955018E26}.Release|Any CPU.Build.0 = Release|Any CPU + {CE88C6B8-C9B6-4695-BA23-BE8955018E26}.Release|arm.ActiveCfg = Release|Any CPU + {CE88C6B8-C9B6-4695-BA23-BE8955018E26}.Release|arm64.ActiveCfg = Release|Any CPU + {CE88C6B8-C9B6-4695-BA23-BE8955018E26}.Release|x64.ActiveCfg = Release|Any CPU + {CE88C6B8-C9B6-4695-BA23-BE8955018E26}.Release|x64.Build.0 = Release|Any CPU + {CE88C6B8-C9B6-4695-BA23-BE8955018E26}.Release|x86.ActiveCfg = Release|Any CPU + {CE88C6B8-C9B6-4695-BA23-BE8955018E26}.Release|x86.Build.0 = Release|Any CPU + {CE88C6B8-C9B6-4695-BA23-BE8955018E26}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {CE88C6B8-C9B6-4695-BA23-BE8955018E26}.Checked|arm.ActiveCfg = Debug|Any CPU + {CE88C6B8-C9B6-4695-BA23-BE8955018E26}.Checked|arm64.ActiveCfg = Debug|Any CPU + {CE88C6B8-C9B6-4695-BA23-BE8955018E26}.Checked|x64.ActiveCfg = Debug|Any CPU + {CE88C6B8-C9B6-4695-BA23-BE8955018E26}.Checked|x86.ActiveCfg = Debug|Any CPU {B9CD9B45-D3AC-433F-B316-6DB40FCCC8F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B9CD9B45-D3AC-433F-B316-6DB40FCCC8F1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B9CD9B45-D3AC-433F-B316-6DB40FCCC8F1}.Debug|arm.ActiveCfg = Debug|Any CPU + {B9CD9B45-D3AC-433F-B316-6DB40FCCC8F1}.Debug|arm64.ActiveCfg = Debug|Any CPU + {B9CD9B45-D3AC-433F-B316-6DB40FCCC8F1}.Debug|x64.ActiveCfg = Debug|Any CPU + {B9CD9B45-D3AC-433F-B316-6DB40FCCC8F1}.Debug|x64.Build.0 = Debug|Any CPU + {B9CD9B45-D3AC-433F-B316-6DB40FCCC8F1}.Debug|x86.ActiveCfg = Debug|Any CPU + {B9CD9B45-D3AC-433F-B316-6DB40FCCC8F1}.Debug|x86.Build.0 = Debug|Any CPU {B9CD9B45-D3AC-433F-B316-6DB40FCCC8F1}.Release|Any CPU.ActiveCfg = Release|Any CPU {B9CD9B45-D3AC-433F-B316-6DB40FCCC8F1}.Release|Any CPU.Build.0 = Release|Any CPU + {B9CD9B45-D3AC-433F-B316-6DB40FCCC8F1}.Release|arm.ActiveCfg = Release|Any CPU + {B9CD9B45-D3AC-433F-B316-6DB40FCCC8F1}.Release|arm64.ActiveCfg = Release|Any CPU + {B9CD9B45-D3AC-433F-B316-6DB40FCCC8F1}.Release|x64.ActiveCfg = Release|Any CPU + {B9CD9B45-D3AC-433F-B316-6DB40FCCC8F1}.Release|x64.Build.0 = Release|Any CPU + {B9CD9B45-D3AC-433F-B316-6DB40FCCC8F1}.Release|x86.ActiveCfg = Release|Any CPU + {B9CD9B45-D3AC-433F-B316-6DB40FCCC8F1}.Release|x86.Build.0 = Release|Any CPU + {B9CD9B45-D3AC-433F-B316-6DB40FCCC8F1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {B9CD9B45-D3AC-433F-B316-6DB40FCCC8F1}.Checked|arm.ActiveCfg = Debug|Any CPU + {B9CD9B45-D3AC-433F-B316-6DB40FCCC8F1}.Checked|arm64.ActiveCfg = Debug|Any CPU + {B9CD9B45-D3AC-433F-B316-6DB40FCCC8F1}.Checked|x64.ActiveCfg = Debug|Any CPU + {B9CD9B45-D3AC-433F-B316-6DB40FCCC8F1}.Checked|x86.ActiveCfg = Debug|Any CPU {19AB8565-1ADA-4E64-B5C8-FD2DA7525358}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19AB8565-1ADA-4E64-B5C8-FD2DA7525358}.Debug|Any CPU.Build.0 = Debug|Any CPU + {19AB8565-1ADA-4E64-B5C8-FD2DA7525358}.Debug|arm.ActiveCfg = Debug|Any CPU + {19AB8565-1ADA-4E64-B5C8-FD2DA7525358}.Debug|arm64.ActiveCfg = Debug|Any CPU + {19AB8565-1ADA-4E64-B5C8-FD2DA7525358}.Debug|x64.ActiveCfg = Debug|Any CPU + {19AB8565-1ADA-4E64-B5C8-FD2DA7525358}.Debug|x64.Build.0 = Debug|Any CPU + {19AB8565-1ADA-4E64-B5C8-FD2DA7525358}.Debug|x86.ActiveCfg = Debug|Any CPU + {19AB8565-1ADA-4E64-B5C8-FD2DA7525358}.Debug|x86.Build.0 = Debug|Any CPU {19AB8565-1ADA-4E64-B5C8-FD2DA7525358}.Release|Any CPU.ActiveCfg = Release|Any CPU {19AB8565-1ADA-4E64-B5C8-FD2DA7525358}.Release|Any CPU.Build.0 = Release|Any CPU + {19AB8565-1ADA-4E64-B5C8-FD2DA7525358}.Release|arm.ActiveCfg = Release|Any CPU + {19AB8565-1ADA-4E64-B5C8-FD2DA7525358}.Release|arm64.ActiveCfg = Release|Any CPU + {19AB8565-1ADA-4E64-B5C8-FD2DA7525358}.Release|x64.ActiveCfg = Release|Any CPU + {19AB8565-1ADA-4E64-B5C8-FD2DA7525358}.Release|x64.Build.0 = Release|Any CPU + {19AB8565-1ADA-4E64-B5C8-FD2DA7525358}.Release|x86.ActiveCfg = Release|Any CPU + {19AB8565-1ADA-4E64-B5C8-FD2DA7525358}.Release|x86.Build.0 = Release|Any CPU + {19AB8565-1ADA-4E64-B5C8-FD2DA7525358}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {19AB8565-1ADA-4E64-B5C8-FD2DA7525358}.Checked|arm.ActiveCfg = Debug|Any CPU + {19AB8565-1ADA-4E64-B5C8-FD2DA7525358}.Checked|arm64.ActiveCfg = Debug|Any CPU + {19AB8565-1ADA-4E64-B5C8-FD2DA7525358}.Checked|x64.ActiveCfg = Debug|Any CPU + {19AB8565-1ADA-4E64-B5C8-FD2DA7525358}.Checked|x86.ActiveCfg = Debug|Any CPU {F2FF3B73-B971-4C07-B9C9-9EA600C288BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F2FF3B73-B971-4C07-B9C9-9EA600C288BD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F2FF3B73-B971-4C07-B9C9-9EA600C288BD}.Debug|arm.ActiveCfg = Debug|Any CPU + {F2FF3B73-B971-4C07-B9C9-9EA600C288BD}.Debug|arm64.ActiveCfg = Debug|Any CPU + {F2FF3B73-B971-4C07-B9C9-9EA600C288BD}.Debug|x64.ActiveCfg = Debug|Any CPU + {F2FF3B73-B971-4C07-B9C9-9EA600C288BD}.Debug|x64.Build.0 = Debug|Any CPU + {F2FF3B73-B971-4C07-B9C9-9EA600C288BD}.Debug|x86.ActiveCfg = Debug|Any CPU + {F2FF3B73-B971-4C07-B9C9-9EA600C288BD}.Debug|x86.Build.0 = Debug|Any CPU {F2FF3B73-B971-4C07-B9C9-9EA600C288BD}.Release|Any CPU.ActiveCfg = Release|Any CPU {F2FF3B73-B971-4C07-B9C9-9EA600C288BD}.Release|Any CPU.Build.0 = Release|Any CPU + {F2FF3B73-B971-4C07-B9C9-9EA600C288BD}.Release|arm.ActiveCfg = Release|Any CPU + {F2FF3B73-B971-4C07-B9C9-9EA600C288BD}.Release|arm64.ActiveCfg = Release|Any CPU + {F2FF3B73-B971-4C07-B9C9-9EA600C288BD}.Release|x64.ActiveCfg = Release|Any CPU + {F2FF3B73-B971-4C07-B9C9-9EA600C288BD}.Release|x64.Build.0 = Release|Any CPU + {F2FF3B73-B971-4C07-B9C9-9EA600C288BD}.Release|x86.ActiveCfg = Release|Any CPU + {F2FF3B73-B971-4C07-B9C9-9EA600C288BD}.Release|x86.Build.0 = Release|Any CPU + {F2FF3B73-B971-4C07-B9C9-9EA600C288BD}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {F2FF3B73-B971-4C07-B9C9-9EA600C288BD}.Checked|arm.ActiveCfg = Debug|Any CPU + {F2FF3B73-B971-4C07-B9C9-9EA600C288BD}.Checked|arm64.ActiveCfg = Debug|Any CPU + {F2FF3B73-B971-4C07-B9C9-9EA600C288BD}.Checked|x64.ActiveCfg = Debug|Any CPU + {F2FF3B73-B971-4C07-B9C9-9EA600C288BD}.Checked|x86.ActiveCfg = Debug|Any CPU + {015DEF24-D141-43D4-AF88-67F17F341F32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {015DEF24-D141-43D4-AF88-67F17F341F32}.Debug|Any CPU.Build.0 = Debug|Any CPU + {015DEF24-D141-43D4-AF88-67F17F341F32}.Debug|arm.ActiveCfg = Debug|Any CPU + {015DEF24-D141-43D4-AF88-67F17F341F32}.Debug|arm64.ActiveCfg = Debug|Any CPU + {015DEF24-D141-43D4-AF88-67F17F341F32}.Debug|x64.ActiveCfg = Debug|Any CPU + {015DEF24-D141-43D4-AF88-67F17F341F32}.Debug|x64.Build.0 = Debug|Any CPU + {015DEF24-D141-43D4-AF88-67F17F341F32}.Debug|x86.ActiveCfg = Debug|Any CPU + {015DEF24-D141-43D4-AF88-67F17F341F32}.Debug|x86.Build.0 = Debug|Any CPU + {015DEF24-D141-43D4-AF88-67F17F341F32}.Release|Any CPU.ActiveCfg = Release|Any CPU + {015DEF24-D141-43D4-AF88-67F17F341F32}.Release|Any CPU.Build.0 = Release|Any CPU + {015DEF24-D141-43D4-AF88-67F17F341F32}.Release|arm.ActiveCfg = Release|Any CPU + {015DEF24-D141-43D4-AF88-67F17F341F32}.Release|arm64.ActiveCfg = Release|Any CPU + {015DEF24-D141-43D4-AF88-67F17F341F32}.Release|x64.ActiveCfg = Release|Any CPU + {015DEF24-D141-43D4-AF88-67F17F341F32}.Release|x64.Build.0 = Release|Any CPU + {015DEF24-D141-43D4-AF88-67F17F341F32}.Release|x86.ActiveCfg = Release|Any CPU + {015DEF24-D141-43D4-AF88-67F17F341F32}.Release|x86.Build.0 = Release|Any CPU + {015DEF24-D141-43D4-AF88-67F17F341F32}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {015DEF24-D141-43D4-AF88-67F17F341F32}.Checked|arm.ActiveCfg = Debug|Any CPU + {015DEF24-D141-43D4-AF88-67F17F341F32}.Checked|arm64.ActiveCfg = Debug|Any CPU + {015DEF24-D141-43D4-AF88-67F17F341F32}.Checked|x64.ActiveCfg = Debug|Any CPU + {015DEF24-D141-43D4-AF88-67F17F341F32}.Checked|x86.ActiveCfg = Debug|Any CPU + {7CB8ADAD-F584-402B-B76A-FB1DE2114D3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7CB8ADAD-F584-402B-B76A-FB1DE2114D3B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7CB8ADAD-F584-402B-B76A-FB1DE2114D3B}.Debug|arm.ActiveCfg = Debug|Any CPU + {7CB8ADAD-F584-402B-B76A-FB1DE2114D3B}.Debug|arm64.ActiveCfg = Debug|Any CPU + {7CB8ADAD-F584-402B-B76A-FB1DE2114D3B}.Debug|x64.ActiveCfg = Debug|Any CPU + {7CB8ADAD-F584-402B-B76A-FB1DE2114D3B}.Debug|x64.Build.0 = Debug|Any CPU + {7CB8ADAD-F584-402B-B76A-FB1DE2114D3B}.Debug|x86.ActiveCfg = Debug|Any CPU + {7CB8ADAD-F584-402B-B76A-FB1DE2114D3B}.Debug|x86.Build.0 = Debug|Any CPU + {7CB8ADAD-F584-402B-B76A-FB1DE2114D3B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7CB8ADAD-F584-402B-B76A-FB1DE2114D3B}.Release|Any CPU.Build.0 = Release|Any CPU + {7CB8ADAD-F584-402B-B76A-FB1DE2114D3B}.Release|arm.ActiveCfg = Release|Any CPU + {7CB8ADAD-F584-402B-B76A-FB1DE2114D3B}.Release|arm64.ActiveCfg = Release|Any CPU + {7CB8ADAD-F584-402B-B76A-FB1DE2114D3B}.Release|x64.ActiveCfg = Release|Any CPU + {7CB8ADAD-F584-402B-B76A-FB1DE2114D3B}.Release|x64.Build.0 = Release|Any CPU + {7CB8ADAD-F584-402B-B76A-FB1DE2114D3B}.Release|x86.ActiveCfg = Release|Any CPU + {7CB8ADAD-F584-402B-B76A-FB1DE2114D3B}.Release|x86.Build.0 = Release|Any CPU + {7CB8ADAD-F584-402B-B76A-FB1DE2114D3B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {7CB8ADAD-F584-402B-B76A-FB1DE2114D3B}.Checked|arm.ActiveCfg = Debug|Any CPU + {7CB8ADAD-F584-402B-B76A-FB1DE2114D3B}.Checked|arm64.ActiveCfg = Debug|Any CPU + {7CB8ADAD-F584-402B-B76A-FB1DE2114D3B}.Checked|x64.ActiveCfg = Debug|Any CPU + {7CB8ADAD-F584-402B-B76A-FB1DE2114D3B}.Checked|x86.ActiveCfg = Debug|Any CPU + {C6667A06-3805-4268-95F3-F7E64C153FF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C6667A06-3805-4268-95F3-F7E64C153FF7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C6667A06-3805-4268-95F3-F7E64C153FF7}.Debug|arm.ActiveCfg = Debug|Any CPU + {C6667A06-3805-4268-95F3-F7E64C153FF7}.Debug|arm64.ActiveCfg = Debug|Any CPU + {C6667A06-3805-4268-95F3-F7E64C153FF7}.Debug|x64.ActiveCfg = Debug|Any CPU + {C6667A06-3805-4268-95F3-F7E64C153FF7}.Debug|x64.Build.0 = Debug|Any CPU + {C6667A06-3805-4268-95F3-F7E64C153FF7}.Debug|x86.ActiveCfg = Debug|Any CPU + {C6667A06-3805-4268-95F3-F7E64C153FF7}.Debug|x86.Build.0 = Debug|Any CPU + {C6667A06-3805-4268-95F3-F7E64C153FF7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C6667A06-3805-4268-95F3-F7E64C153FF7}.Release|Any CPU.Build.0 = Release|Any CPU + {C6667A06-3805-4268-95F3-F7E64C153FF7}.Release|arm.ActiveCfg = Release|Any CPU + {C6667A06-3805-4268-95F3-F7E64C153FF7}.Release|arm64.ActiveCfg = Release|Any CPU + {C6667A06-3805-4268-95F3-F7E64C153FF7}.Release|x64.ActiveCfg = Release|Any CPU + {C6667A06-3805-4268-95F3-F7E64C153FF7}.Release|x64.Build.0 = Release|Any CPU + {C6667A06-3805-4268-95F3-F7E64C153FF7}.Release|x86.ActiveCfg = Release|Any CPU + {C6667A06-3805-4268-95F3-F7E64C153FF7}.Release|x86.Build.0 = Release|Any CPU + {C6667A06-3805-4268-95F3-F7E64C153FF7}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {C6667A06-3805-4268-95F3-F7E64C153FF7}.Checked|arm.ActiveCfg = Debug|Any CPU + {C6667A06-3805-4268-95F3-F7E64C153FF7}.Checked|arm64.ActiveCfg = Debug|Any CPU + {C6667A06-3805-4268-95F3-F7E64C153FF7}.Checked|x64.ActiveCfg = Debug|Any CPU + {C6667A06-3805-4268-95F3-F7E64C153FF7}.Checked|x86.ActiveCfg = Debug|Any CPU + {20126308-D657-417C-832A-C72AAD482BB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {20126308-D657-417C-832A-C72AAD482BB3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {20126308-D657-417C-832A-C72AAD482BB3}.Debug|arm.ActiveCfg = Debug|Any CPU + {20126308-D657-417C-832A-C72AAD482BB3}.Debug|arm64.ActiveCfg = Debug|Any CPU + {20126308-D657-417C-832A-C72AAD482BB3}.Debug|x64.ActiveCfg = Debug|Any CPU + {20126308-D657-417C-832A-C72AAD482BB3}.Debug|x64.Build.0 = Debug|Any CPU + {20126308-D657-417C-832A-C72AAD482BB3}.Debug|x86.ActiveCfg = Debug|Any CPU + {20126308-D657-417C-832A-C72AAD482BB3}.Debug|x86.Build.0 = Debug|Any CPU + {20126308-D657-417C-832A-C72AAD482BB3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {20126308-D657-417C-832A-C72AAD482BB3}.Release|Any CPU.Build.0 = Release|Any CPU + {20126308-D657-417C-832A-C72AAD482BB3}.Release|arm.ActiveCfg = Release|Any CPU + {20126308-D657-417C-832A-C72AAD482BB3}.Release|arm64.ActiveCfg = Release|Any CPU + {20126308-D657-417C-832A-C72AAD482BB3}.Release|x64.ActiveCfg = Release|Any CPU + {20126308-D657-417C-832A-C72AAD482BB3}.Release|x64.Build.0 = Release|Any CPU + {20126308-D657-417C-832A-C72AAD482BB3}.Release|x86.ActiveCfg = Release|Any CPU + {20126308-D657-417C-832A-C72AAD482BB3}.Release|x86.Build.0 = Release|Any CPU + {20126308-D657-417C-832A-C72AAD482BB3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {20126308-D657-417C-832A-C72AAD482BB3}.Checked|arm.ActiveCfg = Debug|Any CPU + {20126308-D657-417C-832A-C72AAD482BB3}.Checked|arm64.ActiveCfg = Debug|Any CPU + {20126308-D657-417C-832A-C72AAD482BB3}.Checked|x64.ActiveCfg = Debug|Any CPU + {20126308-D657-417C-832A-C72AAD482BB3}.Checked|x86.ActiveCfg = Debug|Any CPU + {63AEC067-DCBE-4531-8E89-EBFBEB507503}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {63AEC067-DCBE-4531-8E89-EBFBEB507503}.Debug|Any CPU.Build.0 = Debug|Any CPU + {63AEC067-DCBE-4531-8E89-EBFBEB507503}.Debug|arm.ActiveCfg = Debug|Any CPU + {63AEC067-DCBE-4531-8E89-EBFBEB507503}.Debug|arm64.ActiveCfg = Debug|Any CPU + {63AEC067-DCBE-4531-8E89-EBFBEB507503}.Debug|x64.ActiveCfg = Debug|Any CPU + {63AEC067-DCBE-4531-8E89-EBFBEB507503}.Debug|x64.Build.0 = Debug|Any CPU + {63AEC067-DCBE-4531-8E89-EBFBEB507503}.Debug|x86.ActiveCfg = Debug|Any CPU + {63AEC067-DCBE-4531-8E89-EBFBEB507503}.Debug|x86.Build.0 = Debug|Any CPU + {63AEC067-DCBE-4531-8E89-EBFBEB507503}.Release|Any CPU.ActiveCfg = Release|Any CPU + {63AEC067-DCBE-4531-8E89-EBFBEB507503}.Release|Any CPU.Build.0 = Release|Any CPU + {63AEC067-DCBE-4531-8E89-EBFBEB507503}.Release|arm.ActiveCfg = Release|Any CPU + {63AEC067-DCBE-4531-8E89-EBFBEB507503}.Release|arm64.ActiveCfg = Release|Any CPU + {63AEC067-DCBE-4531-8E89-EBFBEB507503}.Release|x64.ActiveCfg = Release|Any CPU + {63AEC067-DCBE-4531-8E89-EBFBEB507503}.Release|x64.Build.0 = Release|Any CPU + {63AEC067-DCBE-4531-8E89-EBFBEB507503}.Release|x86.ActiveCfg = Release|Any CPU + {63AEC067-DCBE-4531-8E89-EBFBEB507503}.Release|x86.Build.0 = Release|Any CPU + {63AEC067-DCBE-4531-8E89-EBFBEB507503}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {63AEC067-DCBE-4531-8E89-EBFBEB507503}.Checked|arm.ActiveCfg = Debug|Any CPU + {63AEC067-DCBE-4531-8E89-EBFBEB507503}.Checked|arm64.ActiveCfg = Debug|Any CPU + {63AEC067-DCBE-4531-8E89-EBFBEB507503}.Checked|x64.ActiveCfg = Debug|Any CPU + {63AEC067-DCBE-4531-8E89-EBFBEB507503}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution + {C7F0324A-249D-4F7E-8C9C-6AF05A9357A9} = {2B31BB89-A386-4177-8BD8-3AAB0CA50E25} {74374CDE-23F8-4041-8F94-D5CBC23735C6} = {25C80847-6651-4D9D-B625-24D756EC48CA} {B9CD9B45-D3AC-433F-B316-6DB40FCCC8F1} = {25C80847-6651-4D9D-B625-24D756EC48CA} - {A629F9A5-1EA5-475F-9A49-29C81198CF34} = {97C6E424-BBBA-495D-8261-E5ADBABA2B29} - {F238F227-522D-4886-A6B5-474948B3C660} = {97C6E424-BBBA-495D-8261-E5ADBABA2B29} - {19AB8565-1ADA-4E64-B5C8-FD2DA7525358} = {97C6E424-BBBA-495D-8261-E5ADBABA2B29} + {B4058365-B232-433F-882B-1ADC77198BFE} = {9C0E3C0E-FFF8-4241-8942-A77093C003F1} {7E64D2D1-7ED9-490A-B658-5E2162F571D6} = {9C0E3C0E-FFF8-4241-8942-A77093C003F1} + {6029A164-8081-4469-8248-18FF73050660} = {9C0E3C0E-FFF8-4241-8942-A77093C003F1} + {371555F7-F80C-448F-93A3-C43EFE5AC12B} = {9C0E3C0E-FFF8-4241-8942-A77093C003F1} {CE88C6B8-C9B6-4695-BA23-BE8955018E26} = {9C0E3C0E-FFF8-4241-8942-A77093C003F1} {F2FF3B73-B971-4C07-B9C9-9EA600C288BD} = {9C0E3C0E-FFF8-4241-8942-A77093C003F1} - {5A1D48AD-ECA3-4870-9268-426FE6CCC6E9} = {EA13AEBA-B53D-4A6C-8BA1-FB1748B87675} + {A629F9A5-1EA5-475F-9A49-29C81198CF34} = {97C6E424-BBBA-495D-8261-E5ADBABA2B29} + {92D383A1-2440-4D89-8071-6A5159A7C6EF} = {97C6E424-BBBA-495D-8261-E5ADBABA2B29} + {E248AA4A-5E55-43D6-BC81-8578542F605A} = {97C6E424-BBBA-495D-8261-E5ADBABA2B29} + {F238F227-522D-4886-A6B5-474948B3C660} = {97C6E424-BBBA-495D-8261-E5ADBABA2B29} + {19AB8565-1ADA-4E64-B5C8-FD2DA7525358} = {97C6E424-BBBA-495D-8261-E5ADBABA2B29} + {C7396F74-3B9A-4FFC-B9E7-45074C6104CF} = {EA13AEBA-B53D-4A6C-8BA1-FB1748B87675} {86E25854-BE58-41CF-9DF6-4669C4D23D05} = {EA13AEBA-B53D-4A6C-8BA1-FB1748B87675} {E2926598-EE1D-4DA3-AD75-11D54F1EF318} = {EA13AEBA-B53D-4A6C-8BA1-FB1748B87675} + {015DEF24-D141-43D4-AF88-67F17F341F32} = {D34F8F34-A420-4794-BDFB-42166D02D866} + {7CB8ADAD-F584-402B-B76A-FB1DE2114D3B} = {D34F8F34-A420-4794-BDFB-42166D02D866} + {D34F8F34-A420-4794-BDFB-42166D02D866} = {126E625A-D9FB-4072-887F-311095BFB1B8} + {C6667A06-3805-4268-95F3-F7E64C153FF7} = {311B3045-E4B9-4059-87C2-5945F6292F0A} + {20126308-D657-417C-832A-C72AAD482BB3} = {311B3045-E4B9-4059-87C2-5945F6292F0A} + {311B3045-E4B9-4059-87C2-5945F6292F0A} = {126E625A-D9FB-4072-887F-311095BFB1B8} + {63AEC067-DCBE-4531-8E89-EBFBEB507503} = {702008EE-4C11-4118-83EF-BCE55414E11C} + {702008EE-4C11-4118-83EF-BCE55414E11C} = {126E625A-D9FB-4072-887F-311095BFB1B8} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {3A482AFF-93CE-43E0-9C2A-64424A25D364} diff --git a/src/libraries/System.Security.Permissions/src/CompatibilitySuppressions.xml b/src/libraries/System.Security.Permissions/src/CompatibilitySuppressions.xml index 10869bf91f9227..3fc06ac0ab8654 100644 --- a/src/libraries/System.Security.Permissions/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Security.Permissions/src/CompatibilitySuppressions.xml @@ -1,6 +1,20 @@  + + CP0001 + T:System.Xaml.Permissions.XamlLoadPermission + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0001 + T:System.Xaml.Permissions.XamlLoadPermission + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + CP0002 M:System.Security.Permissions.KeyContainerPermissionAccessEntryCollection.#ctor @@ -8,16 +22,2200 @@ lib/net462/System.Security.Permissions.dll - CP0002 - M:System.Security.Permissions.KeyContainerPermissionAccessEntryCollection.CopyTo(System.Array,System.Int32) - lib/netstandard2.0/System.Security.Permissions.dll - lib/net462/System.Security.Permissions.dll + CP0002 + M:System.Security.Permissions.KeyContainerPermissionAccessEntryCollection.CopyTo(System.Array,System.Int32) + lib/netstandard2.0/System.Security.Permissions.dll + lib/net462/System.Security.Permissions.dll + + + CP0002 + M:System.Security.Permissions.KeyContainerPermissionAccessEntryEnumerator.#ctor + lib/netstandard2.0/System.Security.Permissions.dll + lib/net462/System.Security.Permissions.dll + + + CP0014 + F:System.Security.Permissions.ReflectionPermissionFlag.AllFlags:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + F:System.Security.Permissions.ReflectionPermissionFlag.ReflectionEmit:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + F:System.Security.Permissions.ReflectionPermissionFlag.TypeInformation:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.CodeAccessPermission.Deny:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.CodeAccessPermission.RevertDeny:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.HostSecurityManager.ResolvePolicy(System.Security.Policy.Evidence):[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.Permissions.PrincipalPermissionAttribute.#ctor(System.Security.Permissions.SecurityAction):[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.Policy.ApplicationTrust.#ctor(System.Security.PermissionSet,System.Collections.Generic.IEnumerable{System.Security.Policy.StrongName}):[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.Policy.PolicyLevel.AddFullTrustAssembly(System.Security.Policy.StrongName):[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.Policy.PolicyLevel.AddFullTrustAssembly(System.Security.Policy.StrongNameMembershipCondition):[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.Policy.PolicyLevel.AddNamedPermissionSet(System.Security.NamedPermissionSet):[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.Policy.PolicyLevel.ChangeNamedPermissionSet(System.String,System.Security.PermissionSet):[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.Policy.PolicyLevel.CreateAppDomainLevel:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.Policy.PolicyLevel.GetNamedPermissionSet(System.String):[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.Policy.PolicyLevel.RemoveFullTrustAssembly(System.Security.Policy.StrongName):[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.Policy.PolicyLevel.RemoveFullTrustAssembly(System.Security.Policy.StrongNameMembershipCondition):[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.Policy.PolicyLevel.RemoveNamedPermissionSet(System.Security.NamedPermissionSet):[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.Policy.PolicyLevel.RemoveNamedPermissionSet(System.String):[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.Policy.PolicyStatement.#ctor(System.Security.PermissionSet,System.Security.Policy.PolicyStatementAttribute):[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.Policy.PolicyStatement.#ctor(System.Security.PermissionSet):[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.SecurityManager.IsGranted(System.Security.IPermission):[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.SecurityManager.LoadPolicyLevelFromFile(System.String,System.Security.PolicyLevelType):[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.SecurityManager.LoadPolicyLevelFromString(System.String,System.Security.PolicyLevelType):[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.SecurityManager.PolicyHierarchy:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.SecurityManager.ResolvePolicy(System.Security.Policy.Evidence,System.Security.PermissionSet,System.Security.PermissionSet,System.Security.PermissionSet,System.Security.PermissionSet@):[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.SecurityManager.ResolvePolicy(System.Security.Policy.Evidence):[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.SecurityManager.ResolvePolicy(System.Security.Policy.Evidence[]):[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.SecurityManager.ResolvePolicyGroups(System.Security.Policy.Evidence):[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.SecurityManager.ResolveSystemPolicy(System.Security.Policy.Evidence):[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.SecurityManager.SavePolicy:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.SecurityManager.SavePolicyLevel(System.Security.Policy.PolicyLevel):[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + P:System.Security.Permissions.RegistryPermissionAttribute.All:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + P:System.Security.Policy.ApplicationTrust.FullTrustAssemblies:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + P:System.Security.Policy.PolicyLevel.FullTrustAssemblies:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + P:System.Security.Policy.PolicyStatement.PermissionSet:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + P:System.Security.SecurityManager.CheckExecutionRights:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + P:System.Security.SecurityManager.SecurityEnabled:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Configuration.ConfigurationPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Configuration.ConfigurationPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Data.Common.DBDataPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Data.Common.DBDataPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Data.Odbc.OdbcPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Data.Odbc.OdbcPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Data.OleDb.OleDbPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Data.OleDb.OleDbPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Data.OracleClient.OraclePermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Data.OracleClient.OraclePermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Data.SqlClient.SqlClientPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Data.SqlClient.SqlClientPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Diagnostics.EventLogPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Diagnostics.EventLogPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Diagnostics.PerformanceCounterPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Diagnostics.PerformanceCounterPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.DirectoryServices.DirectoryServicesPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.DirectoryServices.DirectoryServicesPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Drawing.Printing.PrintingPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Drawing.Printing.PrintingPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Net.DnsPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Net.DnsPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Net.Mail.SmtpPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Net.Mail.SmtpPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Net.NetworkInformation.NetworkInformationPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Net.NetworkInformation.NetworkInformationPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Net.PeerToPeer.Collaboration.PeerCollaborationPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Net.PeerToPeer.Collaboration.PeerCollaborationPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Net.PeerToPeer.PnrpPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Net.PeerToPeer.PnrpPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Net.SocketPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Net.SocketPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Net.WebPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Net.WebPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.CodeAccessPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.HostProtectionException:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.NamedPermissionSet:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.DataProtectionPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.DataProtectionPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.DataProtectionPermissionFlags:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.EnvironmentPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.EnvironmentPermissionAccess:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.FileDialogPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.FileDialogPermissionAccess:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.FileDialogPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.FileIOPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.FileIOPermissionAccess:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.GacIdentityPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.GacIdentityPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.HostProtectionResource:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.IsolatedStorageContainment:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.IsolatedStorageFilePermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.IsolatedStoragePermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.IsolatedStoragePermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.IUnrestrictedPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.KeyContainerPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.KeyContainerPermissionAccessEntry:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.KeyContainerPermissionAccessEntryCollection:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.KeyContainerPermissionAccessEntryEnumerator:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.KeyContainerPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.KeyContainerPermissionFlags:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.MediaPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.MediaPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.MediaPermissionAudio:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.MediaPermissionImage:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.MediaPermissionVideo:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.PrincipalPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.PrincipalPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.PublisherIdentityPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.PublisherIdentityPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.ReflectionPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.ReflectionPermissionFlag:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.RegistryPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.RegistryPermissionAccess:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.RegistryPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.ResourcePermissionBase:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.ResourcePermissionBaseEntry:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.SecurityPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.SiteIdentityPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.SiteIdentityPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.StorePermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.StorePermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.StorePermissionFlags:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.StrongNameIdentityPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.StrongNamePublicKeyBlob:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.TypeDescriptorPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.TypeDescriptorPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.TypeDescriptorPermissionFlags:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.UIPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.UIPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.UIPermissionClipboard:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.UIPermissionWindow:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.UrlIdentityPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.UrlIdentityPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.WebBrowserPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.WebBrowserPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.WebBrowserPermissionLevel:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.ZoneIdentityPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.ZoneIdentityPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Policy.FileCodeGroup:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Policy.FirstMatchCodeGroup:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Policy.GacInstalled:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Policy.IIdentityPermissionFactory:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Policy.PermissionRequestEvidence:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Policy.Publisher:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Policy.Site:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Policy.StrongName:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Policy.StrongNameMembershipCondition:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Policy.UnionCodeGroup:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Policy.Url:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Policy.Zone:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.SecurityContext:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.SecurityManager:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.ServiceProcess.ServiceControllerPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.ServiceProcess.ServiceControllerPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Transactions.DistributedTransactionPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Transactions.DistributedTransactionPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Web.AspNetHostingPermission:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Web.AspNetHostingPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + F:System.Security.Permissions.ReflectionPermissionFlag.AllFlags:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + F:System.Security.Permissions.ReflectionPermissionFlag.ReflectionEmit:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + F:System.Security.Permissions.ReflectionPermissionFlag.TypeInformation:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.CodeAccessPermission.Deny:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.CodeAccessPermission.RevertDeny:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.HostSecurityManager.ResolvePolicy(System.Security.Policy.Evidence):[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.Permissions.PrincipalPermissionAttribute.#ctor(System.Security.Permissions.SecurityAction):[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.Policy.ApplicationTrust.#ctor(System.Security.PermissionSet,System.Collections.Generic.IEnumerable{System.Security.Policy.StrongName}):[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.Policy.PolicyLevel.AddFullTrustAssembly(System.Security.Policy.StrongName):[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.Policy.PolicyLevel.AddFullTrustAssembly(System.Security.Policy.StrongNameMembershipCondition):[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.Policy.PolicyLevel.AddNamedPermissionSet(System.Security.NamedPermissionSet):[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.Policy.PolicyLevel.ChangeNamedPermissionSet(System.String,System.Security.PermissionSet):[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.Policy.PolicyLevel.CreateAppDomainLevel:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.Policy.PolicyLevel.GetNamedPermissionSet(System.String):[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.Policy.PolicyLevel.RemoveFullTrustAssembly(System.Security.Policy.StrongName):[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.Policy.PolicyLevel.RemoveFullTrustAssembly(System.Security.Policy.StrongNameMembershipCondition):[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.Policy.PolicyLevel.RemoveNamedPermissionSet(System.Security.NamedPermissionSet):[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.Policy.PolicyLevel.RemoveNamedPermissionSet(System.String):[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.Policy.PolicyStatement.#ctor(System.Security.PermissionSet,System.Security.Policy.PolicyStatementAttribute):[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.Policy.PolicyStatement.#ctor(System.Security.PermissionSet):[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.SecurityManager.IsGranted(System.Security.IPermission):[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.SecurityManager.LoadPolicyLevelFromFile(System.String,System.Security.PolicyLevelType):[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.SecurityManager.LoadPolicyLevelFromString(System.String,System.Security.PolicyLevelType):[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.SecurityManager.PolicyHierarchy:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.SecurityManager.ResolvePolicy(System.Security.Policy.Evidence,System.Security.PermissionSet,System.Security.PermissionSet,System.Security.PermissionSet,System.Security.PermissionSet@):[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.SecurityManager.ResolvePolicy(System.Security.Policy.Evidence):[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.SecurityManager.ResolvePolicy(System.Security.Policy.Evidence[]):[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.SecurityManager.ResolvePolicyGroups(System.Security.Policy.Evidence):[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.SecurityManager.ResolveSystemPolicy(System.Security.Policy.Evidence):[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.SecurityManager.SavePolicy:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + M:System.Security.SecurityManager.SavePolicyLevel(System.Security.Policy.PolicyLevel):[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + P:System.Security.Permissions.RegistryPermissionAttribute.All:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + P:System.Security.Policy.ApplicationTrust.FullTrustAssemblies:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + P:System.Security.Policy.PolicyLevel.FullTrustAssemblies:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + P:System.Security.Policy.PolicyStatement.PermissionSet:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + P:System.Security.SecurityManager.CheckExecutionRights:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + P:System.Security.SecurityManager.SecurityEnabled:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Configuration.ConfigurationPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Configuration.ConfigurationPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Data.Common.DBDataPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Data.Common.DBDataPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Data.Odbc.OdbcPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Data.Odbc.OdbcPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Data.OleDb.OleDbPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Data.OleDb.OleDbPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Data.OracleClient.OraclePermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Data.OracleClient.OraclePermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Data.SqlClient.SqlClientPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Data.SqlClient.SqlClientPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Diagnostics.EventLogPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Diagnostics.EventLogPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Diagnostics.PerformanceCounterPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Diagnostics.PerformanceCounterPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.DirectoryServices.DirectoryServicesPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.DirectoryServices.DirectoryServicesPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Drawing.Printing.PrintingPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Drawing.Printing.PrintingPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Net.DnsPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Net.DnsPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Net.Mail.SmtpPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Net.Mail.SmtpPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Net.NetworkInformation.NetworkInformationPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Net.NetworkInformation.NetworkInformationPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Net.PeerToPeer.Collaboration.PeerCollaborationPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Net.PeerToPeer.Collaboration.PeerCollaborationPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Net.PeerToPeer.PnrpPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Net.PeerToPeer.PnrpPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Net.SocketPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Net.SocketPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Net.WebPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Net.WebPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.CodeAccessPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.HostProtectionException:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.NamedPermissionSet:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.DataProtectionPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.DataProtectionPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.DataProtectionPermissionFlags:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.EnvironmentPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.EnvironmentPermissionAccess:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.FileDialogPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.FileDialogPermissionAccess:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.FileDialogPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.FileIOPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.FileIOPermissionAccess:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.GacIdentityPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.GacIdentityPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.HostProtectionResource:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.IsolatedStorageContainment:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.IsolatedStorageFilePermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.IsolatedStoragePermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.IsolatedStoragePermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.IUnrestrictedPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.KeyContainerPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.KeyContainerPermissionAccessEntry:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.KeyContainerPermissionAccessEntryCollection:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.KeyContainerPermissionAccessEntryEnumerator:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.KeyContainerPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.KeyContainerPermissionFlags:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.MediaPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.MediaPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.MediaPermissionAudio:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.MediaPermissionImage:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.MediaPermissionVideo:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.PrincipalPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.PrincipalPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.PublisherIdentityPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.PublisherIdentityPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.ReflectionPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.ReflectionPermissionFlag:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.RegistryPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.RegistryPermissionAccess:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.RegistryPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.ResourcePermissionBase:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.ResourcePermissionBaseEntry:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.SecurityPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.SiteIdentityPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.SiteIdentityPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.StorePermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.StorePermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.StorePermissionFlags:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.StrongNameIdentityPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true - CP0002 - M:System.Security.Permissions.KeyContainerPermissionAccessEntryEnumerator.#ctor - lib/netstandard2.0/System.Security.Permissions.dll - lib/net462/System.Security.Permissions.dll + CP0014 + T:System.Security.Permissions.StrongNamePublicKeyBlob:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.TypeDescriptorPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.TypeDescriptorPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.TypeDescriptorPermissionFlags:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.UIPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.UIPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.UIPermissionClipboard:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.UIPermissionWindow:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.UrlIdentityPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.UrlIdentityPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.WebBrowserPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.WebBrowserPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.WebBrowserPermissionLevel:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.ZoneIdentityPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Permissions.ZoneIdentityPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Policy.FileCodeGroup:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Policy.FirstMatchCodeGroup:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Policy.GacInstalled:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Policy.IIdentityPermissionFactory:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Policy.PermissionRequestEvidence:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Policy.Publisher:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Policy.Site:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Policy.StrongName:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Policy.StrongNameMembershipCondition:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Policy.UnionCodeGroup:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Policy.Url:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.Policy.Zone:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.SecurityContext:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Security.SecurityManager:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.ServiceProcess.ServiceControllerPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.ServiceProcess.ServiceControllerPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Transactions.DistributedTransactionPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Transactions.DistributedTransactionPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Web.AspNetHostingPermission:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP0014 + T:System.Web.AspNetHostingPermissionAttribute:[T:System.ObsoleteAttribute] + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true CP0014 @@ -49,7 +2247,30 @@ lib/netstandard2.0/System.Security.Permissions.dll lib/net6.0/System.Security.Permissions.dll - + + CP0014 + F:System.Security.Permissions.SecurityAction.Deny:[T:System.ObsoleteAttribute] + lib/netstandard2.0/System.Security.Permissions.dll + lib/net8.0/System.Security.Permissions.dll + + + CP0014 + F:System.Security.Permissions.SecurityAction.RequestMinimum:[T:System.ObsoleteAttribute] + lib/netstandard2.0/System.Security.Permissions.dll + lib/net8.0/System.Security.Permissions.dll + + + CP0014 + F:System.Security.Permissions.SecurityAction.RequestOptional:[T:System.ObsoleteAttribute] + lib/netstandard2.0/System.Security.Permissions.dll + lib/net8.0/System.Security.Permissions.dll + + + CP0014 + F:System.Security.Permissions.SecurityAction.RequestRefuse:[T:System.ObsoleteAttribute] + lib/netstandard2.0/System.Security.Permissions.dll + lib/net8.0/System.Security.Permissions.dll + CP0014 F:System.Security.Permissions.ReflectionPermissionFlag.AllFlags:[T:System.ObsoleteAttribute] @@ -471,6 +2692,42 @@ lib/netstandard2.0/System.Security.Permissions.dll lib/net462/System.Security.Permissions.dll + + CP0015 + M:System.Security.Policy.Evidence.#ctor(System.Object[],System.Object[]):[T:System.ObsoleteAttribute] + lib/netstandard2.0/System.Security.Permissions.dll + lib/net8.0/System.Security.Permissions.dll + + + CP0015 + M:System.Security.Policy.Evidence.AddAssembly(System.Object):[T:System.ObsoleteAttribute] + lib/netstandard2.0/System.Security.Permissions.dll + lib/net8.0/System.Security.Permissions.dll + + + CP0015 + M:System.Security.Policy.Evidence.AddHost(System.Object):[T:System.ObsoleteAttribute] + lib/netstandard2.0/System.Security.Permissions.dll + lib/net8.0/System.Security.Permissions.dll + + + CP0015 + M:System.Security.Policy.Evidence.CopyTo(System.Array,System.Int32):[T:System.ObsoleteAttribute] + lib/netstandard2.0/System.Security.Permissions.dll + lib/net8.0/System.Security.Permissions.dll + + + CP0015 + M:System.Security.Policy.Evidence.GetEnumerator:[T:System.ObsoleteAttribute] + lib/netstandard2.0/System.Security.Permissions.dll + lib/net8.0/System.Security.Permissions.dll + + + CP0015 + P:System.Security.Policy.Evidence.Count:[T:System.ObsoleteAttribute] + lib/netstandard2.0/System.Security.Permissions.dll + lib/net8.0/System.Security.Permissions.dll + CP0015 M:System.Security.Policy.Evidence.#ctor(System.Object[],System.Object[]):[T:System.ObsoleteAttribute] @@ -579,4 +2836,32 @@ lib/netstandard2.0/System.Security.Permissions.dll lib/net462/System.Security.Permissions.dll - + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.Security.Permissions.dll + right + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.Security.Permissions.dll + lib/netstandard2.0/System.Security.Permissions.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.Security.Permissions.dll + right + true + + \ No newline at end of file diff --git a/src/libraries/System.Security.Principal.Windows/System.Security.Principal.Windows.sln b/src/libraries/System.Security.Principal.Windows/System.Security.Principal.Windows.sln index 72da69702aa9f3..bbf3fa2e1e52aa 100644 --- a/src/libraries/System.Security.Principal.Windows/System.Security.Principal.Windows.sln +++ b/src/libraries/System.Security.Principal.Windows/System.Security.Principal.Windows.sln @@ -17,6 +17,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Principal.W EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Principal.Windows.Tests", "tests\System.Security.Principal.Windows.Tests.csproj", "{9310D24A-AB63-4CB0-9718-A8C2D57C20FE}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{9D6AEBF2-9DF5-4AAA-A1F8-61B698B3991C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{AAC701AE-19A5-40C5-A1E7-B883B4B7BC6A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{F5DEBA1E-92D7-4B0E-840A-20338ED4ABA5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{DE03EB5C-19FC-4D1C-8F09-F0C302C5DB66}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{CAD69BB3-0649-4980-AFEB-9D4DA22BCB4A}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{0CC51645-FA2D-44E8-9A91-562DF28F2236}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{5D05713D-8A07-4460-846C-4FAAE60211D3}" @@ -25,6 +35,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{4D97C07E-8EA EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{8AA6E2BC-BA18-48AE-93DA-6F694A7FA8B1}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{2CC2982B-0CC7-467F-8AC2-5B7440E2C708}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{BC672DC8-8631-48EE-BB8A-BF2A25FAD0A9}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{D5253F42-40D2-4BBF-A32F-64A5AED22ABA}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{08B994E3-4D52-440F-9D87-D4D8BADBA5E8}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -67,6 +85,26 @@ Global {9310D24A-AB63-4CB0-9718-A8C2D57C20FE}.Debug|Any CPU.Build.0 = Debug|Any CPU {9310D24A-AB63-4CB0-9718-A8C2D57C20FE}.Release|Any CPU.ActiveCfg = Release|Any CPU {9310D24A-AB63-4CB0-9718-A8C2D57C20FE}.Release|Any CPU.Build.0 = Release|Any CPU + {9D6AEBF2-9DF5-4AAA-A1F8-61B698B3991C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9D6AEBF2-9DF5-4AAA-A1F8-61B698B3991C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9D6AEBF2-9DF5-4AAA-A1F8-61B698B3991C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9D6AEBF2-9DF5-4AAA-A1F8-61B698B3991C}.Release|Any CPU.Build.0 = Release|Any CPU + {AAC701AE-19A5-40C5-A1E7-B883B4B7BC6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AAC701AE-19A5-40C5-A1E7-B883B4B7BC6A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AAC701AE-19A5-40C5-A1E7-B883B4B7BC6A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AAC701AE-19A5-40C5-A1E7-B883B4B7BC6A}.Release|Any CPU.Build.0 = Release|Any CPU + {F5DEBA1E-92D7-4B0E-840A-20338ED4ABA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F5DEBA1E-92D7-4B0E-840A-20338ED4ABA5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F5DEBA1E-92D7-4B0E-840A-20338ED4ABA5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F5DEBA1E-92D7-4B0E-840A-20338ED4ABA5}.Release|Any CPU.Build.0 = Release|Any CPU + {DE03EB5C-19FC-4D1C-8F09-F0C302C5DB66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DE03EB5C-19FC-4D1C-8F09-F0C302C5DB66}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DE03EB5C-19FC-4D1C-8F09-F0C302C5DB66}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DE03EB5C-19FC-4D1C-8F09-F0C302C5DB66}.Release|Any CPU.Build.0 = Release|Any CPU + {CAD69BB3-0649-4980-AFEB-9D4DA22BCB4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CAD69BB3-0649-4980-AFEB-9D4DA22BCB4A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CAD69BB3-0649-4980-AFEB-9D4DA22BCB4A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CAD69BB3-0649-4980-AFEB-9D4DA22BCB4A}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -81,6 +119,14 @@ Global {7F3D4F76-ECA1-4076-B95B-D7911EF69119} = {4D97C07E-8EAF-45ED-A729-AC7680C2F58F} {F6A57CBE-E4F4-444A-8CFA-918D1124BC93} = {4D97C07E-8EAF-45ED-A729-AC7680C2F58F} {AA2C3AEB-53FA-4F69-8769-89DCE8221299} = {8AA6E2BC-BA18-48AE-93DA-6F694A7FA8B1} + {9D6AEBF2-9DF5-4AAA-A1F8-61B698B3991C} = {2CC2982B-0CC7-467F-8AC2-5B7440E2C708} + {AAC701AE-19A5-40C5-A1E7-B883B4B7BC6A} = {2CC2982B-0CC7-467F-8AC2-5B7440E2C708} + {2CC2982B-0CC7-467F-8AC2-5B7440E2C708} = {08B994E3-4D52-440F-9D87-D4D8BADBA5E8} + {F5DEBA1E-92D7-4B0E-840A-20338ED4ABA5} = {BC672DC8-8631-48EE-BB8A-BF2A25FAD0A9} + {DE03EB5C-19FC-4D1C-8F09-F0C302C5DB66} = {BC672DC8-8631-48EE-BB8A-BF2A25FAD0A9} + {BC672DC8-8631-48EE-BB8A-BF2A25FAD0A9} = {08B994E3-4D52-440F-9D87-D4D8BADBA5E8} + {CAD69BB3-0649-4980-AFEB-9D4DA22BCB4A} = {D5253F42-40D2-4BBF-A32F-64A5AED22ABA} + {D5253F42-40D2-4BBF-A32F-64A5AED22ABA} = {08B994E3-4D52-440F-9D87-D4D8BADBA5E8} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {F45E7C49-4541-4445-ADF1-DD57AF4E13F5} diff --git a/src/libraries/System.ServiceModel.Syndication/System.ServiceModel.Syndication.sln b/src/libraries/System.ServiceModel.Syndication/System.ServiceModel.Syndication.sln index 7b697cb2cb4991..85fdfc94bf365d 100644 --- a/src/libraries/System.ServiceModel.Syndication/System.ServiceModel.Syndication.sln +++ b/src/libraries/System.ServiceModel.Syndication/System.ServiceModel.Syndication.sln @@ -1,8 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{66CD0AD6-EBEE-468B-9732-A4C49EF492F4}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{03A44C9B-A7BF-4AC5-B2B3-B0B375FD2032}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{E97F3254-DDEB-4670-9BA0-2889D20873C6}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{6FB3EC19-1083-4AFD-8F7D-FB1224C965A0}" @@ -13,6 +11,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ServiceModel.Syndica EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ServiceModel.Syndication.Tests", "tests\System.ServiceModel.Syndication.Tests.csproj", "{0269CAF5-9979-49A1-AC7B-61139BBBA182}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{D2AD56FD-4F76-4078-A8E7-3404A39C95B0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{339B03B0-1E85-46B5-A6EB-35E0BECF76EE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{E2183BFE-66CE-418F-9359-A9797734D4CE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{936D914F-513F-493D-90D4-41E07D414B5C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{833A0190-3C52-449D-8413-49043B5596E2}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{38797FCA-196F-4A36-B6E6-1861269F84A8}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{9727DC59-CDC4-465C-BDCF-01C3CEEC18F5}" @@ -21,6 +29,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{93DCE9EB-54B EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{5C16F923-3CC4-41E8-A22C-ED99BEB8A497}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{EFE9F6F0-57E7-417A-B1FB-902035B11418}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{87AC15B9-A099-40C1-97C3-E5FC880A0BFE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{9B30AF16-B8F4-41AD-86DB-8BECAA1B2591}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{7918CA45-EB79-4CEB-920E-045E42E65520}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -31,10 +47,6 @@ Global {66CD0AD6-EBEE-468B-9732-A4C49EF492F4}.Debug|Any CPU.Build.0 = Debug|Any CPU {66CD0AD6-EBEE-468B-9732-A4C49EF492F4}.Release|Any CPU.ActiveCfg = Release|Any CPU {66CD0AD6-EBEE-468B-9732-A4C49EF492F4}.Release|Any CPU.Build.0 = Release|Any CPU - {03A44C9B-A7BF-4AC5-B2B3-B0B375FD2032}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {03A44C9B-A7BF-4AC5-B2B3-B0B375FD2032}.Debug|Any CPU.Build.0 = Debug|Any CPU - {03A44C9B-A7BF-4AC5-B2B3-B0B375FD2032}.Release|Any CPU.ActiveCfg = Release|Any CPU - {03A44C9B-A7BF-4AC5-B2B3-B0B375FD2032}.Release|Any CPU.Build.0 = Release|Any CPU {E97F3254-DDEB-4670-9BA0-2889D20873C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E97F3254-DDEB-4670-9BA0-2889D20873C6}.Debug|Any CPU.Build.0 = Debug|Any CPU {E97F3254-DDEB-4670-9BA0-2889D20873C6}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -55,6 +67,26 @@ Global {0269CAF5-9979-49A1-AC7B-61139BBBA182}.Debug|Any CPU.Build.0 = Debug|Any CPU {0269CAF5-9979-49A1-AC7B-61139BBBA182}.Release|Any CPU.ActiveCfg = Release|Any CPU {0269CAF5-9979-49A1-AC7B-61139BBBA182}.Release|Any CPU.Build.0 = Release|Any CPU + {D2AD56FD-4F76-4078-A8E7-3404A39C95B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D2AD56FD-4F76-4078-A8E7-3404A39C95B0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D2AD56FD-4F76-4078-A8E7-3404A39C95B0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D2AD56FD-4F76-4078-A8E7-3404A39C95B0}.Release|Any CPU.Build.0 = Release|Any CPU + {339B03B0-1E85-46B5-A6EB-35E0BECF76EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {339B03B0-1E85-46B5-A6EB-35E0BECF76EE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {339B03B0-1E85-46B5-A6EB-35E0BECF76EE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {339B03B0-1E85-46B5-A6EB-35E0BECF76EE}.Release|Any CPU.Build.0 = Release|Any CPU + {E2183BFE-66CE-418F-9359-A9797734D4CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E2183BFE-66CE-418F-9359-A9797734D4CE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E2183BFE-66CE-418F-9359-A9797734D4CE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E2183BFE-66CE-418F-9359-A9797734D4CE}.Release|Any CPU.Build.0 = Release|Any CPU + {936D914F-513F-493D-90D4-41E07D414B5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {936D914F-513F-493D-90D4-41E07D414B5C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {936D914F-513F-493D-90D4-41E07D414B5C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {936D914F-513F-493D-90D4-41E07D414B5C}.Release|Any CPU.Build.0 = Release|Any CPU + {833A0190-3C52-449D-8413-49043B5596E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {833A0190-3C52-449D-8413-49043B5596E2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {833A0190-3C52-449D-8413-49043B5596E2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {833A0190-3C52-449D-8413-49043B5596E2}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -62,11 +94,18 @@ Global GlobalSection(NestedProjects) = preSolution {66CD0AD6-EBEE-468B-9732-A4C49EF492F4} = {38797FCA-196F-4A36-B6E6-1861269F84A8} {0269CAF5-9979-49A1-AC7B-61139BBBA182} = {38797FCA-196F-4A36-B6E6-1861269F84A8} - {03A44C9B-A7BF-4AC5-B2B3-B0B375FD2032} = {9727DC59-CDC4-465C-BDCF-01C3CEEC18F5} {E97F3254-DDEB-4670-9BA0-2889D20873C6} = {9727DC59-CDC4-465C-BDCF-01C3CEEC18F5} {6FB3EC19-1083-4AFD-8F7D-FB1224C965A0} = {9727DC59-CDC4-465C-BDCF-01C3CEEC18F5} {2A7BBE91-0165-45E9-8A10-D7346C5179B6} = {93DCE9EB-54B4-45FE-BA5D-046CBAD043FA} {02AF5461-4FB0-48B1-AD93-9D5F1022B1E9} = {5C16F923-3CC4-41E8-A22C-ED99BEB8A497} + {D2AD56FD-4F76-4078-A8E7-3404A39C95B0} = {EFE9F6F0-57E7-417A-B1FB-902035B11418} + {339B03B0-1E85-46B5-A6EB-35E0BECF76EE} = {EFE9F6F0-57E7-417A-B1FB-902035B11418} + {EFE9F6F0-57E7-417A-B1FB-902035B11418} = {7918CA45-EB79-4CEB-920E-045E42E65520} + {E2183BFE-66CE-418F-9359-A9797734D4CE} = {87AC15B9-A099-40C1-97C3-E5FC880A0BFE} + {936D914F-513F-493D-90D4-41E07D414B5C} = {87AC15B9-A099-40C1-97C3-E5FC880A0BFE} + {87AC15B9-A099-40C1-97C3-E5FC880A0BFE} = {7918CA45-EB79-4CEB-920E-045E42E65520} + {833A0190-3C52-449D-8413-49043B5596E2} = {9B30AF16-B8F4-41AD-86DB-8BECAA1B2591} + {9B30AF16-B8F4-41AD-86DB-8BECAA1B2591} = {7918CA45-EB79-4CEB-920E-045E42E65520} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {BCEBC86B-FB61-475D-B3A0-6C556A7B5E3B} diff --git a/src/libraries/System.ServiceModel.Syndication/src/CompatibilitySuppressions.xml b/src/libraries/System.ServiceModel.Syndication/src/CompatibilitySuppressions.xml index 491f69066f09c2..552f62c3f1f614 100644 --- a/src/libraries/System.ServiceModel.Syndication/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.ServiceModel.Syndication/src/CompatibilitySuppressions.xml @@ -1,4 +1,5 @@  + CP0001 diff --git a/src/libraries/System.ServiceProcess.ServiceController/System.ServiceProcess.ServiceController.sln b/src/libraries/System.ServiceProcess.ServiceController/System.ServiceProcess.ServiceController.sln index 670dce4ce8c5f8..cde7b772e22e1d 100644 --- a/src/libraries/System.ServiceProcess.ServiceController/System.ServiceProcess.ServiceController.sln +++ b/src/libraries/System.ServiceProcess.ServiceController/System.ServiceProcess.ServiceController.sln @@ -7,8 +7,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.EventLog EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Diagnostics.EventLog", "..\System.Diagnostics.EventLog\src\System.Diagnostics.EventLog.csproj", "{FC3FBFFE-B1BC-4C1B-AC1A-8714767A940E}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{A25AE24A-E495-4D05-A30F-AD4692B4D71A}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{FD427105-4DFB-4DD3-A8B6-99F6F6367B9F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{C386F669-744B-4DC7-9A8C-C89B5B6C1B00}" @@ -21,6 +19,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ServiceProcess.Servi EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.ServiceProcess.ServiceController.TestService", "tests\System.ServiceProcess.ServiceController.TestService\System.ServiceProcess.ServiceController.TestService.csproj", "{B0E21FE7-22CE-4473-A281-082E0451B597}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{0018BA6B-672A-46E7-894D-B49B84704D29}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{E4F36780-B2E1-4661-AB55-3FD6F4B0E3E9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{17362647-AA6B-4221-8CB4-42E8E6D7F268}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{63B673B9-D8DE-4355-BEC9-A3EF8F502B84}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{F61AFBFB-8C1D-4795-9D37-B08E9C24458E}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{60A3623C-9BB6-45B8-B1FB-2DB246723CF7}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{9F6956E6-D922-48F6-B565-4A5679A9C856}" @@ -29,6 +37,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{CCD3324D-294 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{B5D3C592-0D89-4E68-AAE9-F0411AD9C72C}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{CFE5523B-4A20-49A7-A7A4-42BAE782F74C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{6E3B355B-6BBE-4BA5-8433-63BD3D133F6B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{5AC65E83-A012-4EA4-969A-E3FD6F882E98}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{C0EB6FE3-D179-4AFC-97E1-CF66F3EFB790}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -51,10 +67,6 @@ Global {FC3FBFFE-B1BC-4C1B-AC1A-8714767A940E}.Debug|Any CPU.Build.0 = Debug|Any CPU {FC3FBFFE-B1BC-4C1B-AC1A-8714767A940E}.Release|Any CPU.ActiveCfg = Release|Any CPU {FC3FBFFE-B1BC-4C1B-AC1A-8714767A940E}.Release|Any CPU.Build.0 = Release|Any CPU - {A25AE24A-E495-4D05-A30F-AD4692B4D71A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A25AE24A-E495-4D05-A30F-AD4692B4D71A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A25AE24A-E495-4D05-A30F-AD4692B4D71A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A25AE24A-E495-4D05-A30F-AD4692B4D71A}.Release|Any CPU.Build.0 = Release|Any CPU {FD427105-4DFB-4DD3-A8B6-99F6F6367B9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FD427105-4DFB-4DD3-A8B6-99F6F6367B9F}.Debug|Any CPU.Build.0 = Debug|Any CPU {FD427105-4DFB-4DD3-A8B6-99F6F6367B9F}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -79,6 +91,26 @@ Global {B0E21FE7-22CE-4473-A281-082E0451B597}.Debug|Any CPU.Build.0 = Debug|Any CPU {B0E21FE7-22CE-4473-A281-082E0451B597}.Release|Any CPU.ActiveCfg = Release|Any CPU {B0E21FE7-22CE-4473-A281-082E0451B597}.Release|Any CPU.Build.0 = Release|Any CPU + {0018BA6B-672A-46E7-894D-B49B84704D29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0018BA6B-672A-46E7-894D-B49B84704D29}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0018BA6B-672A-46E7-894D-B49B84704D29}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0018BA6B-672A-46E7-894D-B49B84704D29}.Release|Any CPU.Build.0 = Release|Any CPU + {E4F36780-B2E1-4661-AB55-3FD6F4B0E3E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E4F36780-B2E1-4661-AB55-3FD6F4B0E3E9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E4F36780-B2E1-4661-AB55-3FD6F4B0E3E9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E4F36780-B2E1-4661-AB55-3FD6F4B0E3E9}.Release|Any CPU.Build.0 = Release|Any CPU + {17362647-AA6B-4221-8CB4-42E8E6D7F268}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {17362647-AA6B-4221-8CB4-42E8E6D7F268}.Debug|Any CPU.Build.0 = Debug|Any CPU + {17362647-AA6B-4221-8CB4-42E8E6D7F268}.Release|Any CPU.ActiveCfg = Release|Any CPU + {17362647-AA6B-4221-8CB4-42E8E6D7F268}.Release|Any CPU.Build.0 = Release|Any CPU + {63B673B9-D8DE-4355-BEC9-A3EF8F502B84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {63B673B9-D8DE-4355-BEC9-A3EF8F502B84}.Debug|Any CPU.Build.0 = Debug|Any CPU + {63B673B9-D8DE-4355-BEC9-A3EF8F502B84}.Release|Any CPU.ActiveCfg = Release|Any CPU + {63B673B9-D8DE-4355-BEC9-A3EF8F502B84}.Release|Any CPU.Build.0 = Release|Any CPU + {F61AFBFB-8C1D-4795-9D37-B08E9C24458E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F61AFBFB-8C1D-4795-9D37-B08E9C24458E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F61AFBFB-8C1D-4795-9D37-B08E9C24458E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F61AFBFB-8C1D-4795-9D37-B08E9C24458E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -92,9 +124,16 @@ Global {BCA9AEAA-30EF-4B5F-B773-219F200CDB25} = {CCD3324D-2948-43FE-B2F2-B386F7EBEC09} {FC3FBFFE-B1BC-4C1B-AC1A-8714767A940E} = {CCD3324D-2948-43FE-B2F2-B386F7EBEC09} {8B01C9B1-1B3A-47A1-9851-CCD3721237BF} = {CCD3324D-2948-43FE-B2F2-B386F7EBEC09} - {A25AE24A-E495-4D05-A30F-AD4692B4D71A} = {B5D3C592-0D89-4E68-AAE9-F0411AD9C72C} {FD427105-4DFB-4DD3-A8B6-99F6F6367B9F} = {B5D3C592-0D89-4E68-AAE9-F0411AD9C72C} {C386F669-744B-4DC7-9A8C-C89B5B6C1B00} = {B5D3C592-0D89-4E68-AAE9-F0411AD9C72C} + {0018BA6B-672A-46E7-894D-B49B84704D29} = {CFE5523B-4A20-49A7-A7A4-42BAE782F74C} + {E4F36780-B2E1-4661-AB55-3FD6F4B0E3E9} = {CFE5523B-4A20-49A7-A7A4-42BAE782F74C} + {CFE5523B-4A20-49A7-A7A4-42BAE782F74C} = {C0EB6FE3-D179-4AFC-97E1-CF66F3EFB790} + {17362647-AA6B-4221-8CB4-42E8E6D7F268} = {6E3B355B-6BBE-4BA5-8433-63BD3D133F6B} + {63B673B9-D8DE-4355-BEC9-A3EF8F502B84} = {6E3B355B-6BBE-4BA5-8433-63BD3D133F6B} + {6E3B355B-6BBE-4BA5-8433-63BD3D133F6B} = {C0EB6FE3-D179-4AFC-97E1-CF66F3EFB790} + {F61AFBFB-8C1D-4795-9D37-B08E9C24458E} = {5AC65E83-A012-4EA4-969A-E3FD6F882E98} + {5AC65E83-A012-4EA4-969A-E3FD6F882E98} = {C0EB6FE3-D179-4AFC-97E1-CF66F3EFB790} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {A60086D8-4665-4FB4-ABA7-A74F0CC9983D} diff --git a/src/libraries/System.ServiceProcess.ServiceController/src/CompatibilitySuppressions.xml b/src/libraries/System.ServiceProcess.ServiceController/src/CompatibilitySuppressions.xml new file mode 100644 index 00000000000000..ce75cbb865449e --- /dev/null +++ b/src/libraries/System.ServiceProcess.ServiceController/src/CompatibilitySuppressions.xml @@ -0,0 +1,74 @@ + + + + + CP0002 + M:System.ServiceProcess.ServiceBase.RequestAdditionalTime(System.TimeSpan) + lib/net6.0/System.ServiceProcess.ServiceController.dll + lib/netstandard2.0/System.ServiceProcess.ServiceController.dll + true + + + CP0002 + M:System.ServiceProcess.ServiceController.Stop(System.Boolean) + lib/net6.0/System.ServiceProcess.ServiceController.dll + lib/netstandard2.0/System.ServiceProcess.ServiceController.dll + true + + + CP0002 + M:System.ServiceProcess.ServiceBase.RequestAdditionalTime(System.TimeSpan) + lib/net7.0/System.ServiceProcess.ServiceController.dll + lib/netstandard2.0/System.ServiceProcess.ServiceController.dll + true + + + CP0002 + M:System.ServiceProcess.ServiceController.Stop(System.Boolean) + lib/net7.0/System.ServiceProcess.ServiceController.dll + lib/netstandard2.0/System.ServiceProcess.ServiceController.dll + true + + + CP0008 + T:System.ServiceProcess.SessionChangeDescription + lib/net6.0/System.ServiceProcess.ServiceController.dll + lib/netstandard2.0/System.ServiceProcess.ServiceController.dll + true + + + CP0008 + T:System.ServiceProcess.SessionChangeDescription + lib/net7.0/System.ServiceProcess.ServiceController.dll + lib/netstandard2.0/System.ServiceProcess.ServiceController.dll + true + + + CP1002 + System.ComponentModel.Primitives, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.ServiceProcess.ServiceController.dll + lib/netstandard2.0/System.ServiceProcess.ServiceController.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.ServiceProcess.ServiceController.dll + lib/netstandard2.0/System.ServiceProcess.ServiceController.dll + true + + + CP1002 + System.ComponentModel.Primitives, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.ServiceProcess.ServiceController.dll + lib/netstandard2.0/System.ServiceProcess.ServiceController.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.ServiceProcess.ServiceController.dll + lib/netstandard2.0/System.ServiceProcess.ServiceController.dll + true + + \ No newline at end of file diff --git a/src/libraries/System.ServiceProcess.ServiceController/src/PACKAGE.md b/src/libraries/System.ServiceProcess.ServiceController/src/PACKAGE.md new file mode 100644 index 00000000000000..902a69d0ae2858 --- /dev/null +++ b/src/libraries/System.ServiceProcess.ServiceController/src/PACKAGE.md @@ -0,0 +1,69 @@ +## About + + +Provides the System.ServiceProcess.ServiceController API, which allows to connect to a Windows service, manipulate it, or get information about it. Not supported on other platforms. + +## Key Features + + + +* Retrieve information from Windows services +* Connect to and manipulate Windows services (start, pause, stop or other operations) + +## How to Use + + + +### Retrieve Windows service information +```C# +using System.ServiceProcess; + +// Loop through all installed Windows services and print the name, status and display name. +foreach (ServiceController serviceController in ServiceController.GetServices()) +{ + Console.WriteLine("Name: " + serviceController.ServiceName); + Console.WriteLine("Status: " + serviceController.Status.ToString()); + Console.WriteLine("Display name: " + serviceController.DisplayName); +} + +// Loop through all installed device driver services +foreach (ServiceController serviceController in ServiceController.GetDevices()) +{ + Console.WriteLine("Name: " + serviceController.ServiceName); + Console.WriteLine("Status: " + serviceController.Status.ToString()); + Console.WriteLine("Display name: " + serviceController.DisplayName); +} +``` + +### Manipulate a Windows service +```C# +using System.ServiceProcess; + +ServiceController service = new("TestServiceName"); +if (service.CanStop && service.Status != ServiceControllerStatus.Stopped && service.Status != ServiceControllerStatus.StopPending) +{ + service.Stop(); +} +``` + +## Main Types + + + +The main types provided by this library are: + +* `System.ServiceProcess.ServiceController` +* `System.ServiceProcess.ServiceControllerStatus` +* `System.ServiceProcess.ServiceType` + +## Additional Documentation + + + +* [System.ServiceController API documentation](https://learn.microsoft.com/dotnet/api/system.serviceprocess.servicecontroller?view=dotnet-plat-ext-7.0) + +## Feedback & Contributing + + + +System.ServiceProcess.ServiceController is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). diff --git a/src/libraries/System.Speech/System.Speech.sln b/src/libraries/System.Speech/System.Speech.sln index 6910e1ab8014cf..8be05874fc5d34 100644 --- a/src/libraries/System.Speech/System.Speech.sln +++ b/src/libraries/System.Speech/System.Speech.sln @@ -1,8 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{0C0DD088-AF6A-4508-9501-399B92F815A5}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{5BF46571-681F-4E49-8DA8-E8040B1FE32D}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{2B432AE1-F4E7-4A9B-83FC-EB0E8F2A89D4}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{B6DC3B86-B125-412A-81C6-0AFECFE4A08A}" @@ -13,6 +11,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Speech", "src\System EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Speech.Tests", "tests\System.Speech.Tests.csproj", "{E26B6065-4016-4385-9AB2-EEBE2C97CEE7}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{F70265ED-03F7-4F8B-A0E8-75490A8BEEE9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{5852303B-818D-4CC5-8D17-689578F4D953}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{0BFC515F-B05D-412C-B250-A2A2BB438C93}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{1B15B746-BC03-40F1-B2DA-8B6B2C957A23}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{FD765DDF-DFF1-4514-A5F0-3FDAA962DBB4}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{C516711E-47BF-4337-A52D-DF1E2B29EDCB}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{59770FE6-B1BD-4817-8664-DC33233399F5}" @@ -21,6 +29,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{6DC14447-332 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{3C2EFE00-44E6-4803-BC19-A7DB02BE7747}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{F7522225-0A4E-47F8-8B6C-94FA0FE77CDD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{69C54DFF-01F4-454C-B75E-D83E8A80344B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{29F08468-B124-4ECE-A05D-9A0A41C6488D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{B2B8D663-46C1-438A-81FC-D95C8E158F2B}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -31,10 +47,6 @@ Global {0C0DD088-AF6A-4508-9501-399B92F815A5}.Debug|Any CPU.Build.0 = Debug|Any CPU {0C0DD088-AF6A-4508-9501-399B92F815A5}.Release|Any CPU.ActiveCfg = Release|Any CPU {0C0DD088-AF6A-4508-9501-399B92F815A5}.Release|Any CPU.Build.0 = Release|Any CPU - {5BF46571-681F-4E49-8DA8-E8040B1FE32D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5BF46571-681F-4E49-8DA8-E8040B1FE32D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5BF46571-681F-4E49-8DA8-E8040B1FE32D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5BF46571-681F-4E49-8DA8-E8040B1FE32D}.Release|Any CPU.Build.0 = Release|Any CPU {2B432AE1-F4E7-4A9B-83FC-EB0E8F2A89D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2B432AE1-F4E7-4A9B-83FC-EB0E8F2A89D4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2B432AE1-F4E7-4A9B-83FC-EB0E8F2A89D4}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -55,6 +67,26 @@ Global {E26B6065-4016-4385-9AB2-EEBE2C97CEE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {E26B6065-4016-4385-9AB2-EEBE2C97CEE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {E26B6065-4016-4385-9AB2-EEBE2C97CEE7}.Release|Any CPU.Build.0 = Release|Any CPU + {F70265ED-03F7-4F8B-A0E8-75490A8BEEE9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F70265ED-03F7-4F8B-A0E8-75490A8BEEE9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F70265ED-03F7-4F8B-A0E8-75490A8BEEE9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F70265ED-03F7-4F8B-A0E8-75490A8BEEE9}.Release|Any CPU.Build.0 = Release|Any CPU + {5852303B-818D-4CC5-8D17-689578F4D953}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5852303B-818D-4CC5-8D17-689578F4D953}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5852303B-818D-4CC5-8D17-689578F4D953}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5852303B-818D-4CC5-8D17-689578F4D953}.Release|Any CPU.Build.0 = Release|Any CPU + {0BFC515F-B05D-412C-B250-A2A2BB438C93}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0BFC515F-B05D-412C-B250-A2A2BB438C93}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0BFC515F-B05D-412C-B250-A2A2BB438C93}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0BFC515F-B05D-412C-B250-A2A2BB438C93}.Release|Any CPU.Build.0 = Release|Any CPU + {1B15B746-BC03-40F1-B2DA-8B6B2C957A23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1B15B746-BC03-40F1-B2DA-8B6B2C957A23}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1B15B746-BC03-40F1-B2DA-8B6B2C957A23}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1B15B746-BC03-40F1-B2DA-8B6B2C957A23}.Release|Any CPU.Build.0 = Release|Any CPU + {FD765DDF-DFF1-4514-A5F0-3FDAA962DBB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FD765DDF-DFF1-4514-A5F0-3FDAA962DBB4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FD765DDF-DFF1-4514-A5F0-3FDAA962DBB4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FD765DDF-DFF1-4514-A5F0-3FDAA962DBB4}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -62,11 +94,18 @@ Global GlobalSection(NestedProjects) = preSolution {0C0DD088-AF6A-4508-9501-399B92F815A5} = {C516711E-47BF-4337-A52D-DF1E2B29EDCB} {E26B6065-4016-4385-9AB2-EEBE2C97CEE7} = {C516711E-47BF-4337-A52D-DF1E2B29EDCB} - {5BF46571-681F-4E49-8DA8-E8040B1FE32D} = {59770FE6-B1BD-4817-8664-DC33233399F5} {2B432AE1-F4E7-4A9B-83FC-EB0E8F2A89D4} = {59770FE6-B1BD-4817-8664-DC33233399F5} {B6DC3B86-B125-412A-81C6-0AFECFE4A08A} = {59770FE6-B1BD-4817-8664-DC33233399F5} {2D839561-1430-4CA5-9695-6FC9325FF876} = {6DC14447-3322-4AAA-8FDA-3B48D4AB3A17} {D6377882-BD90-46D6-AC60-83498E4BA2B3} = {3C2EFE00-44E6-4803-BC19-A7DB02BE7747} + {F70265ED-03F7-4F8B-A0E8-75490A8BEEE9} = {F7522225-0A4E-47F8-8B6C-94FA0FE77CDD} + {5852303B-818D-4CC5-8D17-689578F4D953} = {F7522225-0A4E-47F8-8B6C-94FA0FE77CDD} + {F7522225-0A4E-47F8-8B6C-94FA0FE77CDD} = {B2B8D663-46C1-438A-81FC-D95C8E158F2B} + {0BFC515F-B05D-412C-B250-A2A2BB438C93} = {69C54DFF-01F4-454C-B75E-D83E8A80344B} + {1B15B746-BC03-40F1-B2DA-8B6B2C957A23} = {69C54DFF-01F4-454C-B75E-D83E8A80344B} + {69C54DFF-01F4-454C-B75E-D83E8A80344B} = {B2B8D663-46C1-438A-81FC-D95C8E158F2B} + {FD765DDF-DFF1-4514-A5F0-3FDAA962DBB4} = {29F08468-B124-4ECE-A05D-9A0A41C6488D} + {29F08468-B124-4ECE-A05D-9A0A41C6488D} = {B2B8D663-46C1-438A-81FC-D95C8E158F2B} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {5BD9DF41-48EC-4FB8-998D-122857C5CA73} diff --git a/src/libraries/System.Speech/src/CompatibilitySuppressions.xml b/src/libraries/System.Speech/src/CompatibilitySuppressions.xml new file mode 100644 index 00000000000000..63d72e0439c364 --- /dev/null +++ b/src/libraries/System.Speech/src/CompatibilitySuppressions.xml @@ -0,0 +1,32 @@ + + + + + CP0003 + System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 + lib/net6.0/System.Speech.dll + lib/netstandard2.0/System.Speech.dll + true + + + CP0003 + System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 + lib/net7.0/System.Speech.dll + lib/netstandard2.0/System.Speech.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.Speech.dll + lib/netstandard2.0/System.Speech.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.Speech.dll + lib/netstandard2.0/System.Speech.dll + true + + \ No newline at end of file diff --git a/src/libraries/System.Speech/src/PACKAGE.md b/src/libraries/System.Speech/src/PACKAGE.md new file mode 100644 index 00000000000000..ac57df4ca354d8 --- /dev/null +++ b/src/libraries/System.Speech/src/PACKAGE.md @@ -0,0 +1,102 @@ +## About + + + +Provides APIs for speech recognition and synthesis built on the [Microsoft Speech API](https://learn.microsoft.com/previous-versions/windows/desktop/ms723627(v=vs.85)) in Windows. Not supported on other platforms. + +This package is provided primarily for compatibility with code being ported from .NET Framework and is not accepting new features. + +## Key Features + + + +* Recognize speech as text in a given language and grammar. +* Synthesize text as speech. +* Support for [Speech Recognition Grammar v1.0](https://www.w3.org/TR/speech-grammar/) documents + +## How to Use + + + +### Synthesis example +```C# +using System.Speech.Synthesis; + +// Initialize a new instance of the SpeechSynthesizer. +SpeechSynthesizer synth = new SpeechSynthesizer(); + +// Configure the audio output. +synth.SetOutputToDefaultAudioDevice(); + +// Speak a string, synchronously +synth.Speak("Hello World!"); + +// Speak a string asynchronously +var prompt = synth.SpeakAsync("Goodnight Moon!"); + +while (!prompt.IsCompleted) +{ + Console.WriteLine("speaking..."); + Thread.Sleep(500); +} +``` + +### Recognition example +```C# +// Create a new SpeechRecognitionEngine instance. +using SpeechRecognizer recognizer = new SpeechRecognizer(); +using ManualResetEvent exit = new ManualResetEvent(false); + +// Create a simple grammar that recognizes "red", "green", "blue", or "exit". +Choices choices = new Choices(); +choices.Add(new string[] { "red", "green", "blue", "exit" }); + +// Create a GrammarBuilder object and append the Choices object. +GrammarBuilder gb = new GrammarBuilder(); +gb.Append(choices); + +// Create the Grammar instance and load it into the speech recognition engine. +Grammar g = new Grammar(gb); +recognizer.LoadGrammar(g); + +// Register a handler for the SpeechRecognized event. +recognizer.SpeechRecognized += (s, e) => +{ + Console.WriteLine($"Recognized: {e.Result.Text}, Confidence: {e.Result.Confidence}"); + if (e.Result.Text == "exit") + { + exit.Set(); + } +}; + +// Emulate +Console.WriteLine("Emulating \"red\"."); +recognizer.EmulateRecognize("red"); + +Console.WriteLine("Speak red, green, blue, or exit please..."); + +exit.WaitOne(); +``` + +## Main Types + + + +The main types provided by this library are: + +* `System.Speech.Recognition.SpeechRecognizer` +* `System.Speech.Synthesis.SpeechSynthesizer` + +## Additional Documentation + + + +* [Conceptual documentation](https://learn.microsoft.com/previous-versions/office/developer/speech-technologies/hh361625(v%3doffice.14)) +* [Speech.Recognition API documentation](https://learn.microsoft.com/dotnet/api/system.speech.recognition) +* [Speech.Synthesis API documentation](https://learn.microsoft.com/dotnet/api/system.speech.synthesis) + +## Feedback & Contributing + + + +System.Speech is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). diff --git a/src/libraries/System.Speech/src/Recognition/SrgsGrammar/SrgsRule.cs b/src/libraries/System.Speech/src/Recognition/SrgsGrammar/SrgsRule.cs index 7709a8f0a4bc57..030fe78a4780b9 100644 --- a/src/libraries/System.Speech/src/Recognition/SrgsGrammar/SrgsRule.cs +++ b/src/libraries/System.Speech/src/Recognition/SrgsGrammar/SrgsRule.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.Buffers; using System.Collections.ObjectModel; using System.Diagnostics; using System.Speech.Internal; @@ -14,6 +15,8 @@ namespace System.Speech.Recognition.SrgsGrammar [DebuggerTypeProxy(typeof(SrgsRuleDebugDisplay))] public class SrgsRule : IRule { + private static readonly SearchValues s_invalidChars = SearchValues.Create("?*+|()^$/;.=<>[]{}\\ \t\r\n"); + #region Constructors private SrgsRule() { @@ -383,7 +386,7 @@ private void ValidateIdentifier(string s) XmlParser.ThrowSrgsException(SRID.ConstructorNotAllowed, _id); } - if (s != null && (s.IndexOfAny(s_invalidChars) >= 0 || s.Length == 0)) + if (s != null && (s.Length == 0 || s.AsSpan().ContainsAny(s_invalidChars))) { XmlParser.ThrowSrgsException(SRID.InvalidMethodName); } @@ -416,7 +419,6 @@ private void ValidateIdentifier(string s) private string _onError; private string _onRecognition; - private static readonly char[] s_invalidChars = new char[] { '?', '*', '+', '|', '(', ')', '^', '$', '/', ';', '.', '=', '<', '>', '[', ']', '{', '}', '\\', ' ', '\t', '\r', '\n' }; #endregion diff --git a/src/libraries/System.Speech/src/System.Speech.csproj b/src/libraries/System.Speech/src/System.Speech.csproj index 53c3970cd0f069..7369ceef1469ae 100644 --- a/src/libraries/System.Speech/src/System.Speech.csproj +++ b/src/libraries/System.Speech/src/System.Speech.csproj @@ -231,11 +231,9 @@ System.Speech.Recognition.SpeechRecognizer Link="Common\Interop\Windows\WinMm\Interop.waveOutWrite.cs" /> - - - + Link="Common\DisableRuntimeMarshalling.cs" + Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'" /> diff --git a/src/libraries/System.Text.Encoding.CodePages/System.Text.Encoding.CodePages.sln b/src/libraries/System.Text.Encoding.CodePages/System.Text.Encoding.CodePages.sln index 2b26d5fcdf6ff8..9e2f46eba0db3b 100644 --- a/src/libraries/System.Text.Encoding.CodePages/System.Text.Encoding.CodePages.sln +++ b/src/libraries/System.Text.Encoding.CodePages/System.Text.Encoding.CodePages.sln @@ -15,6 +15,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encoding.CodePa EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encoding.CodePages.Tests", "tests\System.Text.Encoding.CodePages.Tests.csproj", "{41C87552-FF98-4814-AD4E-B8E63840C8D5}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{3D70E100-0D37-4A32-8DB7-1E26696C7461}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{EE709D3E-54D1-492B-97B9-A52428F1852D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{88D49AAE-0F33-42DB-9374-181375BC333F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{77FBABD9-B54E-4478-B1E9-338CF3632883}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{47559F4C-0335-47DA-87A8-D5E3544421D3}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{8CB6F00C-76CE-4F7F-9748-64DD94323A65}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{74B63852-3633-4913-8CA4-54713240919C}" @@ -23,6 +33,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{D39B4CF8-10D EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{BBC725DC-56DD-4D84-B24C-93B879FCCA94}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{556CEC8A-887B-4C6C-BE44-52A78D561A51}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{9080D10D-EFD3-42EC-99D2-257815043554}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{3CC99FD5-163C-4342-B82F-5F5242AE0F63}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{14B8B029-8A45-4D20-9B26-C27A0D0B7D17}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -61,6 +79,26 @@ Global {41C87552-FF98-4814-AD4E-B8E63840C8D5}.Debug|Any CPU.Build.0 = Debug|Any CPU {41C87552-FF98-4814-AD4E-B8E63840C8D5}.Release|Any CPU.ActiveCfg = Release|Any CPU {41C87552-FF98-4814-AD4E-B8E63840C8D5}.Release|Any CPU.Build.0 = Release|Any CPU + {3D70E100-0D37-4A32-8DB7-1E26696C7461}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3D70E100-0D37-4A32-8DB7-1E26696C7461}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3D70E100-0D37-4A32-8DB7-1E26696C7461}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3D70E100-0D37-4A32-8DB7-1E26696C7461}.Release|Any CPU.Build.0 = Release|Any CPU + {EE709D3E-54D1-492B-97B9-A52428F1852D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EE709D3E-54D1-492B-97B9-A52428F1852D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EE709D3E-54D1-492B-97B9-A52428F1852D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EE709D3E-54D1-492B-97B9-A52428F1852D}.Release|Any CPU.Build.0 = Release|Any CPU + {88D49AAE-0F33-42DB-9374-181375BC333F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {88D49AAE-0F33-42DB-9374-181375BC333F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {88D49AAE-0F33-42DB-9374-181375BC333F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {88D49AAE-0F33-42DB-9374-181375BC333F}.Release|Any CPU.Build.0 = Release|Any CPU + {77FBABD9-B54E-4478-B1E9-338CF3632883}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {77FBABD9-B54E-4478-B1E9-338CF3632883}.Debug|Any CPU.Build.0 = Debug|Any CPU + {77FBABD9-B54E-4478-B1E9-338CF3632883}.Release|Any CPU.ActiveCfg = Release|Any CPU + {77FBABD9-B54E-4478-B1E9-338CF3632883}.Release|Any CPU.Build.0 = Release|Any CPU + {47559F4C-0335-47DA-87A8-D5E3544421D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {47559F4C-0335-47DA-87A8-D5E3544421D3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {47559F4C-0335-47DA-87A8-D5E3544421D3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {47559F4C-0335-47DA-87A8-D5E3544421D3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -74,6 +112,14 @@ Global {23B5042D-5ACE-4BB0-A802-1DB758F43428} = {D39B4CF8-10D4-4167-BF2D-FE1BAF33D98D} {C6B27183-6436-4343-A722-17AAB6A11573} = {D39B4CF8-10D4-4167-BF2D-FE1BAF33D98D} {4F894506-769C-4219-BDE7-E1DDE6F1A35D} = {BBC725DC-56DD-4D84-B24C-93B879FCCA94} + {3D70E100-0D37-4A32-8DB7-1E26696C7461} = {556CEC8A-887B-4C6C-BE44-52A78D561A51} + {EE709D3E-54D1-492B-97B9-A52428F1852D} = {556CEC8A-887B-4C6C-BE44-52A78D561A51} + {556CEC8A-887B-4C6C-BE44-52A78D561A51} = {14B8B029-8A45-4D20-9B26-C27A0D0B7D17} + {88D49AAE-0F33-42DB-9374-181375BC333F} = {9080D10D-EFD3-42EC-99D2-257815043554} + {77FBABD9-B54E-4478-B1E9-338CF3632883} = {9080D10D-EFD3-42EC-99D2-257815043554} + {9080D10D-EFD3-42EC-99D2-257815043554} = {14B8B029-8A45-4D20-9B26-C27A0D0B7D17} + {47559F4C-0335-47DA-87A8-D5E3544421D3} = {3CC99FD5-163C-4342-B82F-5F5242AE0F63} + {3CC99FD5-163C-4342-B82F-5F5242AE0F63} = {14B8B029-8A45-4D20-9B26-C27A0D0B7D17} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {F52AE23D-81D9-4AB4-B6BD-256742DFD31A} diff --git a/src/libraries/System.Text.Encoding.CodePages/src/CompatibilitySuppressions.xml b/src/libraries/System.Text.Encoding.CodePages/src/CompatibilitySuppressions.xml new file mode 100644 index 00000000000000..c8ec78f522c6c7 --- /dev/null +++ b/src/libraries/System.Text.Encoding.CodePages/src/CompatibilitySuppressions.xml @@ -0,0 +1,18 @@ + + + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.Text.Encoding.CodePages.dll + lib/netstandard2.0/System.Text.Encoding.CodePages.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.Text.Encoding.CodePages.dll + lib/netstandard2.0/System.Text.Encoding.CodePages.dll + true + + \ No newline at end of file diff --git a/src/libraries/System.Text.Encoding.CodePages/src/PACKAGE.md b/src/libraries/System.Text.Encoding.CodePages/src/PACKAGE.md new file mode 100644 index 00000000000000..7da4fd98cd740b --- /dev/null +++ b/src/libraries/System.Text.Encoding.CodePages/src/PACKAGE.md @@ -0,0 +1,39 @@ +## About + +`System.Text.Encoding.CodePages` enable creating single and double bytes encodings for code pages that otherwise are available only in the desktop .NET Framework. + +## Key Features + +* Support single and double byte encodings for code pages that are not available in .NET Core. + +## How to Use + +```C# +using System.Text; + +// Register the CodePages encoding provider at application startup to enable using single and double byte encodings. +Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); + +// Now can create single and double byte encodings for code pages that are not available in .NET Core. +Encoding windows1252Encoding = Encoding.GetEncoding(1252); // Western European (Windows) +byte[] encodedBytes = windows1252Encoding.GetBytes("String to encode"); + +``` + +## Main Types + +The main types provided by this library are: + +* `CodePagesEncodingProvider` + +## Additional Documentation + +* [API documentation](https://learn.microsoft.com/dotnet/api/system.text.codepagesencodingprovider) + +## Related Packages + +* [System.Text.Encodings.Web](https://www.nuget.org/packages/System.Text.Encodings.Web) + +## Feedback & Contributing + +System.Text.Encoding.CodePages is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). \ No newline at end of file diff --git a/src/libraries/System.Text.Encoding.CodePages/src/System.Text.Encoding.CodePages.csproj b/src/libraries/System.Text.Encoding.CodePages/src/System.Text.Encoding.CodePages.csproj index 6d945ccfd4e072..4635e3812e7c29 100644 --- a/src/libraries/System.Text.Encoding.CodePages/src/System.Text.Encoding.CodePages.csproj +++ b/src/libraries/System.Text.Encoding.CodePages/src/System.Text.Encoding.CodePages.csproj @@ -1,4 +1,5 @@ + $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent);$(NetCoreAppPrevious)-windows;$(NetCoreAppPrevious);$(NetCoreAppMinimum)-windows;$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) true @@ -85,11 +86,9 @@ System.Text.CodePagesEncodingProvider - - - - + + 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 ed01f38cefb74d..9bb9383a5c456d 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 @@ -19,7 +19,17 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encoding.Extens EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encoding.Extensions.Tests", "tests\System.Text.Encoding.Extensions.Tests.csproj", "{777B4928-6EE5-42D2-8F95-E43EB027D14E}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B98CEFA4-10F4-49B1-A922-5ECBB4C20599}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{27FD5826-07FC-4F1B-B837-CD8A717694DD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{DF7EE76F-F06B-45E7-81C9-72DAB5F35083}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{56A321F6-574F-4855-841B-8D30680D76B9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{B10CF21A-DDB0-41B3-830F-58DAD30F6E06}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{53CE003A-23D7-472C-A5DD-365A623359AE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{7E622A8A-54B7-44AA-8C6F-DA8CEFF1CA4C}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{6A521BB6-5A53-4871-8EF7-15C4FCF0B416}" EndProject @@ -27,6 +37,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{6906BA55-F0A EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{F4F19285-4785-496C-8F6C-579249EAA5BB}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B98CEFA4-10F4-49B1-A922-5ECBB4C20599}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{457F6647-316B-43ED-9227-081CE0E21C77}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{D03A5220-CAD5-4EB4-9DB4-426FBB54C017}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{F9741CAF-491C-4DA8-BC07-9395534D431E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{EF9F14E6-7E8D-43E1-883A-34A4DBC0F0F8}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -265,13 +285,117 @@ Global {777B4928-6EE5-42D2-8F95-E43EB027D14E}.Checked|arm64.ActiveCfg = Debug|Any CPU {777B4928-6EE5-42D2-8F95-E43EB027D14E}.Checked|x64.ActiveCfg = Debug|Any CPU {777B4928-6EE5-42D2-8F95-E43EB027D14E}.Checked|x86.ActiveCfg = Debug|Any CPU + {27FD5826-07FC-4F1B-B837-CD8A717694DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {27FD5826-07FC-4F1B-B837-CD8A717694DD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {27FD5826-07FC-4F1B-B837-CD8A717694DD}.Debug|arm.ActiveCfg = Debug|Any CPU + {27FD5826-07FC-4F1B-B837-CD8A717694DD}.Debug|arm64.ActiveCfg = Debug|Any CPU + {27FD5826-07FC-4F1B-B837-CD8A717694DD}.Debug|x64.ActiveCfg = Debug|Any CPU + {27FD5826-07FC-4F1B-B837-CD8A717694DD}.Debug|x64.Build.0 = Debug|Any CPU + {27FD5826-07FC-4F1B-B837-CD8A717694DD}.Debug|x86.ActiveCfg = Debug|Any CPU + {27FD5826-07FC-4F1B-B837-CD8A717694DD}.Debug|x86.Build.0 = Debug|Any CPU + {27FD5826-07FC-4F1B-B837-CD8A717694DD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {27FD5826-07FC-4F1B-B837-CD8A717694DD}.Release|Any CPU.Build.0 = Release|Any CPU + {27FD5826-07FC-4F1B-B837-CD8A717694DD}.Release|arm.ActiveCfg = Release|Any CPU + {27FD5826-07FC-4F1B-B837-CD8A717694DD}.Release|arm64.ActiveCfg = Release|Any CPU + {27FD5826-07FC-4F1B-B837-CD8A717694DD}.Release|x64.ActiveCfg = Release|Any CPU + {27FD5826-07FC-4F1B-B837-CD8A717694DD}.Release|x64.Build.0 = Release|Any CPU + {27FD5826-07FC-4F1B-B837-CD8A717694DD}.Release|x86.ActiveCfg = Release|Any CPU + {27FD5826-07FC-4F1B-B837-CD8A717694DD}.Release|x86.Build.0 = Release|Any CPU + {27FD5826-07FC-4F1B-B837-CD8A717694DD}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {27FD5826-07FC-4F1B-B837-CD8A717694DD}.Checked|arm.ActiveCfg = Debug|Any CPU + {27FD5826-07FC-4F1B-B837-CD8A717694DD}.Checked|arm64.ActiveCfg = Debug|Any CPU + {27FD5826-07FC-4F1B-B837-CD8A717694DD}.Checked|x64.ActiveCfg = Debug|Any CPU + {27FD5826-07FC-4F1B-B837-CD8A717694DD}.Checked|x86.ActiveCfg = Debug|Any CPU + {DF7EE76F-F06B-45E7-81C9-72DAB5F35083}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DF7EE76F-F06B-45E7-81C9-72DAB5F35083}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DF7EE76F-F06B-45E7-81C9-72DAB5F35083}.Debug|arm.ActiveCfg = Debug|Any CPU + {DF7EE76F-F06B-45E7-81C9-72DAB5F35083}.Debug|arm64.ActiveCfg = Debug|Any CPU + {DF7EE76F-F06B-45E7-81C9-72DAB5F35083}.Debug|x64.ActiveCfg = Debug|Any CPU + {DF7EE76F-F06B-45E7-81C9-72DAB5F35083}.Debug|x64.Build.0 = Debug|Any CPU + {DF7EE76F-F06B-45E7-81C9-72DAB5F35083}.Debug|x86.ActiveCfg = Debug|Any CPU + {DF7EE76F-F06B-45E7-81C9-72DAB5F35083}.Debug|x86.Build.0 = Debug|Any CPU + {DF7EE76F-F06B-45E7-81C9-72DAB5F35083}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DF7EE76F-F06B-45E7-81C9-72DAB5F35083}.Release|Any CPU.Build.0 = Release|Any CPU + {DF7EE76F-F06B-45E7-81C9-72DAB5F35083}.Release|arm.ActiveCfg = Release|Any CPU + {DF7EE76F-F06B-45E7-81C9-72DAB5F35083}.Release|arm64.ActiveCfg = Release|Any CPU + {DF7EE76F-F06B-45E7-81C9-72DAB5F35083}.Release|x64.ActiveCfg = Release|Any CPU + {DF7EE76F-F06B-45E7-81C9-72DAB5F35083}.Release|x64.Build.0 = Release|Any CPU + {DF7EE76F-F06B-45E7-81C9-72DAB5F35083}.Release|x86.ActiveCfg = Release|Any CPU + {DF7EE76F-F06B-45E7-81C9-72DAB5F35083}.Release|x86.Build.0 = Release|Any CPU + {DF7EE76F-F06B-45E7-81C9-72DAB5F35083}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {DF7EE76F-F06B-45E7-81C9-72DAB5F35083}.Checked|arm.ActiveCfg = Debug|Any CPU + {DF7EE76F-F06B-45E7-81C9-72DAB5F35083}.Checked|arm64.ActiveCfg = Debug|Any CPU + {DF7EE76F-F06B-45E7-81C9-72DAB5F35083}.Checked|x64.ActiveCfg = Debug|Any CPU + {DF7EE76F-F06B-45E7-81C9-72DAB5F35083}.Checked|x86.ActiveCfg = Debug|Any CPU + {56A321F6-574F-4855-841B-8D30680D76B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {56A321F6-574F-4855-841B-8D30680D76B9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {56A321F6-574F-4855-841B-8D30680D76B9}.Debug|arm.ActiveCfg = Debug|Any CPU + {56A321F6-574F-4855-841B-8D30680D76B9}.Debug|arm64.ActiveCfg = Debug|Any CPU + {56A321F6-574F-4855-841B-8D30680D76B9}.Debug|x64.ActiveCfg = Debug|Any CPU + {56A321F6-574F-4855-841B-8D30680D76B9}.Debug|x64.Build.0 = Debug|Any CPU + {56A321F6-574F-4855-841B-8D30680D76B9}.Debug|x86.ActiveCfg = Debug|Any CPU + {56A321F6-574F-4855-841B-8D30680D76B9}.Debug|x86.Build.0 = Debug|Any CPU + {56A321F6-574F-4855-841B-8D30680D76B9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {56A321F6-574F-4855-841B-8D30680D76B9}.Release|Any CPU.Build.0 = Release|Any CPU + {56A321F6-574F-4855-841B-8D30680D76B9}.Release|arm.ActiveCfg = Release|Any CPU + {56A321F6-574F-4855-841B-8D30680D76B9}.Release|arm64.ActiveCfg = Release|Any CPU + {56A321F6-574F-4855-841B-8D30680D76B9}.Release|x64.ActiveCfg = Release|Any CPU + {56A321F6-574F-4855-841B-8D30680D76B9}.Release|x64.Build.0 = Release|Any CPU + {56A321F6-574F-4855-841B-8D30680D76B9}.Release|x86.ActiveCfg = Release|Any CPU + {56A321F6-574F-4855-841B-8D30680D76B9}.Release|x86.Build.0 = Release|Any CPU + {56A321F6-574F-4855-841B-8D30680D76B9}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {56A321F6-574F-4855-841B-8D30680D76B9}.Checked|arm.ActiveCfg = Debug|Any CPU + {56A321F6-574F-4855-841B-8D30680D76B9}.Checked|arm64.ActiveCfg = Debug|Any CPU + {56A321F6-574F-4855-841B-8D30680D76B9}.Checked|x64.ActiveCfg = Debug|Any CPU + {56A321F6-574F-4855-841B-8D30680D76B9}.Checked|x86.ActiveCfg = Debug|Any CPU + {B10CF21A-DDB0-41B3-830F-58DAD30F6E06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B10CF21A-DDB0-41B3-830F-58DAD30F6E06}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B10CF21A-DDB0-41B3-830F-58DAD30F6E06}.Debug|arm.ActiveCfg = Debug|Any CPU + {B10CF21A-DDB0-41B3-830F-58DAD30F6E06}.Debug|arm64.ActiveCfg = Debug|Any CPU + {B10CF21A-DDB0-41B3-830F-58DAD30F6E06}.Debug|x64.ActiveCfg = Debug|Any CPU + {B10CF21A-DDB0-41B3-830F-58DAD30F6E06}.Debug|x64.Build.0 = Debug|Any CPU + {B10CF21A-DDB0-41B3-830F-58DAD30F6E06}.Debug|x86.ActiveCfg = Debug|Any CPU + {B10CF21A-DDB0-41B3-830F-58DAD30F6E06}.Debug|x86.Build.0 = Debug|Any CPU + {B10CF21A-DDB0-41B3-830F-58DAD30F6E06}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B10CF21A-DDB0-41B3-830F-58DAD30F6E06}.Release|Any CPU.Build.0 = Release|Any CPU + {B10CF21A-DDB0-41B3-830F-58DAD30F6E06}.Release|arm.ActiveCfg = Release|Any CPU + {B10CF21A-DDB0-41B3-830F-58DAD30F6E06}.Release|arm64.ActiveCfg = Release|Any CPU + {B10CF21A-DDB0-41B3-830F-58DAD30F6E06}.Release|x64.ActiveCfg = Release|Any CPU + {B10CF21A-DDB0-41B3-830F-58DAD30F6E06}.Release|x64.Build.0 = Release|Any CPU + {B10CF21A-DDB0-41B3-830F-58DAD30F6E06}.Release|x86.ActiveCfg = Release|Any CPU + {B10CF21A-DDB0-41B3-830F-58DAD30F6E06}.Release|x86.Build.0 = Release|Any CPU + {B10CF21A-DDB0-41B3-830F-58DAD30F6E06}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {B10CF21A-DDB0-41B3-830F-58DAD30F6E06}.Checked|arm.ActiveCfg = Debug|Any CPU + {B10CF21A-DDB0-41B3-830F-58DAD30F6E06}.Checked|arm64.ActiveCfg = Debug|Any CPU + {B10CF21A-DDB0-41B3-830F-58DAD30F6E06}.Checked|x64.ActiveCfg = Debug|Any CPU + {B10CF21A-DDB0-41B3-830F-58DAD30F6E06}.Checked|x86.ActiveCfg = Debug|Any CPU + {53CE003A-23D7-472C-A5DD-365A623359AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {53CE003A-23D7-472C-A5DD-365A623359AE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {53CE003A-23D7-472C-A5DD-365A623359AE}.Debug|arm.ActiveCfg = Debug|Any CPU + {53CE003A-23D7-472C-A5DD-365A623359AE}.Debug|arm64.ActiveCfg = Debug|Any CPU + {53CE003A-23D7-472C-A5DD-365A623359AE}.Debug|x64.ActiveCfg = Debug|Any CPU + {53CE003A-23D7-472C-A5DD-365A623359AE}.Debug|x64.Build.0 = Debug|Any CPU + {53CE003A-23D7-472C-A5DD-365A623359AE}.Debug|x86.ActiveCfg = Debug|Any CPU + {53CE003A-23D7-472C-A5DD-365A623359AE}.Debug|x86.Build.0 = Debug|Any CPU + {53CE003A-23D7-472C-A5DD-365A623359AE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {53CE003A-23D7-472C-A5DD-365A623359AE}.Release|Any CPU.Build.0 = Release|Any CPU + {53CE003A-23D7-472C-A5DD-365A623359AE}.Release|arm.ActiveCfg = Release|Any CPU + {53CE003A-23D7-472C-A5DD-365A623359AE}.Release|arm64.ActiveCfg = Release|Any CPU + {53CE003A-23D7-472C-A5DD-365A623359AE}.Release|x64.ActiveCfg = Release|Any CPU + {53CE003A-23D7-472C-A5DD-365A623359AE}.Release|x64.Build.0 = Release|Any CPU + {53CE003A-23D7-472C-A5DD-365A623359AE}.Release|x86.ActiveCfg = Release|Any CPU + {53CE003A-23D7-472C-A5DD-365A623359AE}.Release|x86.Build.0 = Release|Any CPU + {53CE003A-23D7-472C-A5DD-365A623359AE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {53CE003A-23D7-472C-A5DD-365A623359AE}.Checked|arm.ActiveCfg = Debug|Any CPU + {53CE003A-23D7-472C-A5DD-365A623359AE}.Checked|arm64.ActiveCfg = Debug|Any CPU + {53CE003A-23D7-472C-A5DD-365A623359AE}.Checked|x64.ActiveCfg = Debug|Any CPU + {53CE003A-23D7-472C-A5DD-365A623359AE}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {E70D3A84-3053-4E44-82FC-A56A574BF6F8} = {B98CEFA4-10F4-49B1-A922-5ECBB4C20599} - {EF713897-15F9-42E4-979F-271FA1EF6ECA} = {B98CEFA4-10F4-49B1-A922-5ECBB4C20599} + {E70D3A84-3053-4E44-82FC-A56A574BF6F8} = {7E622A8A-54B7-44AA-8C6F-DA8CEFF1CA4C} {CC6D3524-D6C8-468B-B908-CE746C1DB175} = {6A521BB6-5A53-4871-8EF7-15C4FCF0B416} {777B4928-6EE5-42D2-8F95-E43EB027D14E} = {6A521BB6-5A53-4871-8EF7-15C4FCF0B416} {0FB90CF0-6B17-4FAB-A737-0532B5BCAADB} = {6906BA55-F0A0-4E71-942D-E24C6C85A353} @@ -280,6 +404,15 @@ Global {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} + {EF713897-15F9-42E4-979F-271FA1EF6ECA} = {B98CEFA4-10F4-49B1-A922-5ECBB4C20599} + {27FD5826-07FC-4F1B-B837-CD8A717694DD} = {457F6647-316B-43ED-9227-081CE0E21C77} + {DF7EE76F-F06B-45E7-81C9-72DAB5F35083} = {457F6647-316B-43ED-9227-081CE0E21C77} + {457F6647-316B-43ED-9227-081CE0E21C77} = {EF9F14E6-7E8D-43E1-883A-34A4DBC0F0F8} + {56A321F6-574F-4855-841B-8D30680D76B9} = {D03A5220-CAD5-4EB4-9DB4-426FBB54C017} + {B10CF21A-DDB0-41B3-830F-58DAD30F6E06} = {D03A5220-CAD5-4EB4-9DB4-426FBB54C017} + {D03A5220-CAD5-4EB4-9DB4-426FBB54C017} = {EF9F14E6-7E8D-43E1-883A-34A4DBC0F0F8} + {53CE003A-23D7-472C-A5DD-365A623359AE} = {F9741CAF-491C-4DA8-BC07-9395534D431E} + {F9741CAF-491C-4DA8-BC07-9395534D431E} = {EF9F14E6-7E8D-43E1-883A-34A4DBC0F0F8} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {711E5C3D-F101-4CD2-A3CB-10954791B60C} diff --git a/src/libraries/System.Text.Encodings.Web/System.Text.Encodings.Web.sln b/src/libraries/System.Text.Encodings.Web/System.Text.Encodings.Web.sln index 44a03205024109..1da7867a73dce6 100644 --- a/src/libraries/System.Text.Encodings.Web/System.Text.Encodings.Web.sln +++ b/src/libraries/System.Text.Encodings.Web/System.Text.Encodings.Web.sln @@ -1,8 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{43450381-504E-4603-BF5D-99CCAC2B8A26}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{FCCCA35C-E4FD-479E-8F5D-33B4A36AA4C9}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{4D066E4F-1EF9-46CE-AECC-8D5252E41370}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{1C02A4C6-2AEB-46E3-B1D3-84EE2153671A}" @@ -15,6 +13,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encodings.Web", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encodings.Web.Tests", "tests\System.Text.Encodings.Web.Tests.csproj", "{A15B95D2-1DDF-47C9-A92F-03FD5DB720C9}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{AF233792-CF18-40CA-A126-C20E11EF4015}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{4E79D658-6F6C-49DF-945F-8B633F0A6408}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{CC48DDE4-ABA5-48E8-841F-378A0A93B6E2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{7B7FB555-AD80-4EA4-80A4-9913584180BA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{D2E3EAA9-D631-4396-ABB0-630F5DAB1F61}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{9DE01EE3-CDAF-4B6E-B778-B5B5D83A9214}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{BAAA946F-C5D8-483D-9610-F229125AFEFC}" @@ -23,6 +31,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{2E59B32B-BED EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C88B420B-1505-4CB6-AA13-263AD2D66D93}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{406ED631-1398-4A03-90DB-7F525722B49C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{763D5625-ACC8-4BD0-8CF9-5A2425230958}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{5E26F6E8-E8B4-4AD5-BE1B-504534FC8A01}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{6DCC607A-6B8E-40CF-A0E6-C710428C4218}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -33,10 +49,6 @@ Global {43450381-504E-4603-BF5D-99CCAC2B8A26}.Debug|Any CPU.Build.0 = Debug|Any CPU {43450381-504E-4603-BF5D-99CCAC2B8A26}.Release|Any CPU.ActiveCfg = Release|Any CPU {43450381-504E-4603-BF5D-99CCAC2B8A26}.Release|Any CPU.Build.0 = Release|Any CPU - {FCCCA35C-E4FD-479E-8F5D-33B4A36AA4C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FCCCA35C-E4FD-479E-8F5D-33B4A36AA4C9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FCCCA35C-E4FD-479E-8F5D-33B4A36AA4C9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FCCCA35C-E4FD-479E-8F5D-33B4A36AA4C9}.Release|Any CPU.Build.0 = Release|Any CPU {4D066E4F-1EF9-46CE-AECC-8D5252E41370}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4D066E4F-1EF9-46CE-AECC-8D5252E41370}.Debug|Any CPU.Build.0 = Debug|Any CPU {4D066E4F-1EF9-46CE-AECC-8D5252E41370}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -61,6 +73,26 @@ Global {A15B95D2-1DDF-47C9-A92F-03FD5DB720C9}.Debug|Any CPU.Build.0 = Debug|Any CPU {A15B95D2-1DDF-47C9-A92F-03FD5DB720C9}.Release|Any CPU.ActiveCfg = Release|Any CPU {A15B95D2-1DDF-47C9-A92F-03FD5DB720C9}.Release|Any CPU.Build.0 = Release|Any CPU + {AF233792-CF18-40CA-A126-C20E11EF4015}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AF233792-CF18-40CA-A126-C20E11EF4015}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AF233792-CF18-40CA-A126-C20E11EF4015}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AF233792-CF18-40CA-A126-C20E11EF4015}.Release|Any CPU.Build.0 = Release|Any CPU + {4E79D658-6F6C-49DF-945F-8B633F0A6408}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4E79D658-6F6C-49DF-945F-8B633F0A6408}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4E79D658-6F6C-49DF-945F-8B633F0A6408}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4E79D658-6F6C-49DF-945F-8B633F0A6408}.Release|Any CPU.Build.0 = Release|Any CPU + {CC48DDE4-ABA5-48E8-841F-378A0A93B6E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CC48DDE4-ABA5-48E8-841F-378A0A93B6E2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CC48DDE4-ABA5-48E8-841F-378A0A93B6E2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CC48DDE4-ABA5-48E8-841F-378A0A93B6E2}.Release|Any CPU.Build.0 = Release|Any CPU + {7B7FB555-AD80-4EA4-80A4-9913584180BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7B7FB555-AD80-4EA4-80A4-9913584180BA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7B7FB555-AD80-4EA4-80A4-9913584180BA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7B7FB555-AD80-4EA4-80A4-9913584180BA}.Release|Any CPU.Build.0 = Release|Any CPU + {D2E3EAA9-D631-4396-ABB0-630F5DAB1F61}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D2E3EAA9-D631-4396-ABB0-630F5DAB1F61}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D2E3EAA9-D631-4396-ABB0-630F5DAB1F61}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D2E3EAA9-D631-4396-ABB0-630F5DAB1F61}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -68,12 +100,19 @@ Global GlobalSection(NestedProjects) = preSolution {43450381-504E-4603-BF5D-99CCAC2B8A26} = {9DE01EE3-CDAF-4B6E-B778-B5B5D83A9214} {A15B95D2-1DDF-47C9-A92F-03FD5DB720C9} = {9DE01EE3-CDAF-4B6E-B778-B5B5D83A9214} - {FCCCA35C-E4FD-479E-8F5D-33B4A36AA4C9} = {BAAA946F-C5D8-483D-9610-F229125AFEFC} {4D066E4F-1EF9-46CE-AECC-8D5252E41370} = {BAAA946F-C5D8-483D-9610-F229125AFEFC} {1C02A4C6-2AEB-46E3-B1D3-84EE2153671A} = {BAAA946F-C5D8-483D-9610-F229125AFEFC} {01218F2E-9DAB-42A4-B79C-589C53CE63E4} = {2E59B32B-BED2-4E24-9055-491C8DF351FB} {635D1626-6D21-4DAB-BFEF-F5F13261967B} = {2E59B32B-BED2-4E24-9055-491C8DF351FB} {9A8107A2-1AC1-44D5-A4D4-D8EB52C3CB18} = {C88B420B-1505-4CB6-AA13-263AD2D66D93} + {AF233792-CF18-40CA-A126-C20E11EF4015} = {406ED631-1398-4A03-90DB-7F525722B49C} + {4E79D658-6F6C-49DF-945F-8B633F0A6408} = {406ED631-1398-4A03-90DB-7F525722B49C} + {406ED631-1398-4A03-90DB-7F525722B49C} = {6DCC607A-6B8E-40CF-A0E6-C710428C4218} + {CC48DDE4-ABA5-48E8-841F-378A0A93B6E2} = {763D5625-ACC8-4BD0-8CF9-5A2425230958} + {7B7FB555-AD80-4EA4-80A4-9913584180BA} = {763D5625-ACC8-4BD0-8CF9-5A2425230958} + {763D5625-ACC8-4BD0-8CF9-5A2425230958} = {6DCC607A-6B8E-40CF-A0E6-C710428C4218} + {D2E3EAA9-D631-4396-ABB0-630F5DAB1F61} = {5E26F6E8-E8B4-4AD5-BE1B-504534FC8A01} + {5E26F6E8-E8B4-4AD5-BE1B-504534FC8A01} = {6DCC607A-6B8E-40CF-A0E6-C710428C4218} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {E109A20C-D7EF-4175-964A-1AF032DB2A3C} diff --git a/src/libraries/System.Text.Encodings.Web/src/System.Text.Encodings.Web.csproj b/src/libraries/System.Text.Encodings.Web/src/System.Text.Encodings.Web.csproj index 8baa4cc0619974..872bf0dc04d602 100644 --- a/src/libraries/System.Text.Encodings.Web/src/System.Text.Encodings.Web.csproj +++ b/src/libraries/System.Text.Encodings.Web/src/System.Text.Encodings.Web.csproj @@ -1,4 +1,5 @@ + $(NetCoreAppCurrent)-browser;$(NetCoreAppCurrent);$(NetCoreAppPrevious)-browser;$(NetCoreAppPrevious);$(NetCoreAppMinimum)-browser;$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) true @@ -69,12 +70,10 @@ System.Text.Encodings.Web.JavaScriptEncoder - - - - + + diff --git a/src/libraries/System.Text.Encodings.Web/tools/Directory.Build.props b/src/libraries/System.Text.Encodings.Web/tools/Directory.Build.props index bf6c6715bd1059..e5b792a9962fad 100644 --- a/src/libraries/System.Text.Encodings.Web/tools/Directory.Build.props +++ b/src/libraries/System.Text.Encodings.Web/tools/Directory.Build.props @@ -1,3 +1,10 @@  - + + + + false + false + + \ No newline at end of file diff --git a/src/libraries/System.Text.Encodings.Web/tools/Directory.Build.targets b/src/libraries/System.Text.Encodings.Web/tools/Directory.Build.targets deleted file mode 100644 index d30bb1fb8cb285..00000000000000 --- a/src/libraries/System.Text.Encodings.Web/tools/Directory.Build.targets +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/src/libraries/System.Text.Encodings.Web/tools/GenDefinedCharList/GenDefinedCharList.csproj b/src/libraries/System.Text.Encodings.Web/tools/GenDefinedCharList/GenDefinedCharList.csproj index d1b3c292347b23..1dbef55a0fa4ee 100644 --- a/src/libraries/System.Text.Encodings.Web/tools/GenDefinedCharList/GenDefinedCharList.csproj +++ b/src/libraries/System.Text.Encodings.Web/tools/GenDefinedCharList/GenDefinedCharList.csproj @@ -1,12 +1,8 @@ + + net8.0 Exe - netcoreapp3.1 - false - - - - - + \ No newline at end of file diff --git a/src/libraries/System.Text.Encodings.Web/tools/GenUnicodeRanges/GenUnicodeRanges.csproj b/src/libraries/System.Text.Encodings.Web/tools/GenUnicodeRanges/GenUnicodeRanges.csproj index d1b3c292347b23..1dbef55a0fa4ee 100644 --- a/src/libraries/System.Text.Encodings.Web/tools/GenUnicodeRanges/GenUnicodeRanges.csproj +++ b/src/libraries/System.Text.Encodings.Web/tools/GenUnicodeRanges/GenUnicodeRanges.csproj @@ -1,12 +1,8 @@ + + net8.0 Exe - netcoreapp3.1 - false - - - - - + \ No newline at end of file diff --git a/src/libraries/System.Text.Encodings.Web/tools/updating-encodings.md b/src/libraries/System.Text.Encodings.Web/tools/updating-encodings.md index 13d7897c6c779f..881af02d7dfea2 100644 --- a/src/libraries/System.Text.Encodings.Web/tools/updating-encodings.md +++ b/src/libraries/System.Text.Encodings.Web/tools/updating-encodings.md @@ -21,13 +21,13 @@ As a prerequisite for updating the tools, you will need the _dotnet_ tool (versi 3. Open a command prompt and navigate to the __src/libraries/System.Text.Encodings.Web/tools/GenDefinedCharList__ directory, then run the following command, replacing the first parameter with the path to the _UnicodeData.txt_ file you downloaded in the previous step. This command will update the "defined characters" bitmap within the runtime folder. The test project also consumes the file from the _src_ folder, so running this command will update both the runtime and the test project. ```txt -dotnet run --framework netcoreapp3.1 -- "path_to_UnicodeData.txt" ../../src/System/Text/Unicode/UnicodeHelpers.generated.cs +dotnet run -- "path_to_UnicodeData.txt" ../../src/System/Text/Unicode/UnicodeHelpers.generated.cs ``` 4. Open a command prompt and navigate to the __src/libraries/System.Text.Encodings.Web/tools/GenUnicodeRanges__ directory, then run the following command, replacing the first parameter with the path to the _Blocks.txt_ file you downloaded earlier. This command will update the `UnicodeRanges` type in the runtime folder and update the unit tests to exercise the new APIs. ```txt -dotnet run --framework netcoreapp3.1 -- "path_to_Blocks.txt" ../../src/System/Text/Unicode/UnicodeRanges.generated.cs ../../tests/UnicodeRangesTests.generated.cs +dotnet run -- "path_to_Blocks.txt" ../../src/System/Text/Unicode/UnicodeRanges.generated.cs ../../tests/UnicodeRangesTests.generated.cs ``` 5. Update the __ref__ APIs to reflect any new `UnicodeRanges` static properties which were added in the previous step, otherwise the unit test project will not be able to reference them. See https://github.com/dotnet/runtime/blob/main/docs/coding-guidelines/updating-ref-source.md for instructions on how to update the reference assemblies. diff --git a/src/libraries/System.Text.Json/System.Text.Json.sln b/src/libraries/System.Text.Json/System.Text.Json.sln index 730a3cdd504674..b73ea6de093e27 100644 --- a/src/libraries/System.Text.Json/System.Text.Json.sln +++ b/src/libraries/System.Text.Json/System.Text.Json.sln @@ -61,6 +61,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGene EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.Tests", "tests\System.Text.Json.Tests\System.Text.Json.Tests.csproj", "{A0178BAA-A1AF-4C69-8E4A-A700A2723DDC}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{03D5F977-D2DA-4586-A662-C99B0E0EEC20}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{A3FCA745-7F4D-4FB8-85A5-422AC92B2704}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{D0277072-F248-47EF-A417-D2612987D899}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{A86642C4-E388-4871-B9FB-A5FCB8BF5CB0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{8E1C465B-1DA9-4C2A-A6B5-082C55EFB95E}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{E07C6980-EB71-4D19-A80A-7BEB80B635B1}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{0371C5D8-D5F5-4747-9810-D91D71D8C0E4}" @@ -69,6 +79,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E49881A9-09F EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{F254F143-4704-4432-9995-20D87FA8BF8D}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{10E5D5FA-09FE-4E7A-A8E0-377BC228ACCB}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{8F44175A-3081-4CA8-90E7-9EE6754EACAA}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{08A1F4D2-E4DA-4CD9-9107-89941EFEB79C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{E9E19E81-4AE0-412D-98EA-3B14694D3CA3}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -199,6 +217,26 @@ Global {A0178BAA-A1AF-4C69-8E4A-A700A2723DDC}.Debug|Any CPU.Build.0 = Debug|Any CPU {A0178BAA-A1AF-4C69-8E4A-A700A2723DDC}.Release|Any CPU.ActiveCfg = Release|Any CPU {A0178BAA-A1AF-4C69-8E4A-A700A2723DDC}.Release|Any CPU.Build.0 = Release|Any CPU + {03D5F977-D2DA-4586-A662-C99B0E0EEC20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {03D5F977-D2DA-4586-A662-C99B0E0EEC20}.Debug|Any CPU.Build.0 = Debug|Any CPU + {03D5F977-D2DA-4586-A662-C99B0E0EEC20}.Release|Any CPU.ActiveCfg = Release|Any CPU + {03D5F977-D2DA-4586-A662-C99B0E0EEC20}.Release|Any CPU.Build.0 = Release|Any CPU + {A3FCA745-7F4D-4FB8-85A5-422AC92B2704}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A3FCA745-7F4D-4FB8-85A5-422AC92B2704}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A3FCA745-7F4D-4FB8-85A5-422AC92B2704}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A3FCA745-7F4D-4FB8-85A5-422AC92B2704}.Release|Any CPU.Build.0 = Release|Any CPU + {D0277072-F248-47EF-A417-D2612987D899}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D0277072-F248-47EF-A417-D2612987D899}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D0277072-F248-47EF-A417-D2612987D899}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D0277072-F248-47EF-A417-D2612987D899}.Release|Any CPU.Build.0 = Release|Any CPU + {A86642C4-E388-4871-B9FB-A5FCB8BF5CB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A86642C4-E388-4871-B9FB-A5FCB8BF5CB0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A86642C4-E388-4871-B9FB-A5FCB8BF5CB0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A86642C4-E388-4871-B9FB-A5FCB8BF5CB0}.Release|Any CPU.Build.0 = Release|Any CPU + {8E1C465B-1DA9-4C2A-A6B5-082C55EFB95E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E1C465B-1DA9-4C2A-A6B5-082C55EFB95E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E1C465B-1DA9-4C2A-A6B5-082C55EFB95E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E1C465B-1DA9-4C2A-A6B5-082C55EFB95E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -235,6 +273,14 @@ Global {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} + {03D5F977-D2DA-4586-A662-C99B0E0EEC20} = {10E5D5FA-09FE-4E7A-A8E0-377BC228ACCB} + {A3FCA745-7F4D-4FB8-85A5-422AC92B2704} = {10E5D5FA-09FE-4E7A-A8E0-377BC228ACCB} + {10E5D5FA-09FE-4E7A-A8E0-377BC228ACCB} = {E9E19E81-4AE0-412D-98EA-3B14694D3CA3} + {D0277072-F248-47EF-A417-D2612987D899} = {8F44175A-3081-4CA8-90E7-9EE6754EACAA} + {A86642C4-E388-4871-B9FB-A5FCB8BF5CB0} = {8F44175A-3081-4CA8-90E7-9EE6754EACAA} + {8F44175A-3081-4CA8-90E7-9EE6754EACAA} = {E9E19E81-4AE0-412D-98EA-3B14694D3CA3} + {8E1C465B-1DA9-4C2A-A6B5-082C55EFB95E} = {08A1F4D2-E4DA-4CD9-9107-89941EFEB79C} + {08A1F4D2-E4DA-4CD9-9107-89941EFEB79C} = {E9E19E81-4AE0-412D-98EA-3B14694D3CA3} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {5868B757-D821-41FC-952E-2113A0519506} diff --git a/src/libraries/System.Text.Json/gen/Helpers/RoslynExtensions.cs b/src/libraries/System.Text.Json/gen/Helpers/RoslynExtensions.cs index b0cb90e33d1476..7d280ce7603c2d 100644 --- a/src/libraries/System.Text.Json/gen/Helpers/RoslynExtensions.cs +++ b/src/libraries/System.Text.Json/gen/Helpers/RoslynExtensions.cs @@ -209,28 +209,6 @@ public static bool IsNullableValueType(this ITypeSymbol type, [NotNullWhen(true) return false; } - public static ITypeSymbol[] GetAllTypeArgumentsInScope(this INamedTypeSymbol type) - { - if (!type.IsGenericType) - { - return Array.Empty(); - } - - var args = new List(); - TraverseContainingTypes(type); - return args.ToArray(); - - void TraverseContainingTypes(INamedTypeSymbol current) - { - if (current.ContainingType is INamedTypeSymbol parent) - { - TraverseContainingTypes(parent); - } - - args.AddRange(current.TypeArguments); - } - } - public static ITypeSymbol GetMemberType(this ISymbol member) { Debug.Assert(member is IFieldSymbol or IPropertySymbol); diff --git a/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Parser.cs b/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Parser.cs index 3242dcc5faa4c2..0f3b11b038bc93 100644 --- a/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Parser.cs +++ b/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Parser.cs @@ -11,6 +11,7 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +using SourceGenerators; namespace System.Text.Json.SourceGeneration { @@ -1609,9 +1610,12 @@ private static string GetTypeInfoPropertyName(ITypeSymbol type) sb.Append(name); - foreach (ITypeSymbol genericArg in namedType.GetAllTypeArgumentsInScope()) + if (namedType.GetAllTypeArgumentsInScope() is List typeArgsInScope) { - sb.Append(GetTypeInfoPropertyName(genericArg)); + foreach (ITypeSymbol genericArg in typeArgsInScope) + { + sb.Append(GetTypeInfoPropertyName(genericArg)); + } } return sb.ToString(); diff --git a/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Roslyn3.11.cs b/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Roslyn3.11.cs index 4c58a3d968ac54..37fb04bafc38a0 100644 --- a/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Roslyn3.11.cs +++ b/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Roslyn3.11.cs @@ -9,6 +9,8 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Text; +#pragma warning disable RS1035 // IIncrementalGenerator isn't available for the target configuration + namespace System.Text.Json.SourceGeneration { /// diff --git a/src/libraries/System.Text.Json/gen/System.Text.Json.SourceGeneration.targets b/src/libraries/System.Text.Json/gen/System.Text.Json.SourceGeneration.targets index 364f6e1f6682f7..4020a05cb421db 100644 --- a/src/libraries/System.Text.Json/gen/System.Text.Json.SourceGeneration.targets +++ b/src/libraries/System.Text.Json/gen/System.Text.Json.SourceGeneration.targets @@ -31,6 +31,7 @@ + diff --git a/src/libraries/System.Text.Json/ref/System.Text.Json.csproj b/src/libraries/System.Text.Json/ref/System.Text.Json.csproj index d70085f787ba6a..48187a11e58ea6 100644 --- a/src/libraries/System.Text.Json/ref/System.Text.Json.csproj +++ b/src/libraries/System.Text.Json/ref/System.Text.Json.csproj @@ -15,16 +15,13 @@ - - + - - - - + + diff --git a/src/libraries/System.Text.Json/src/CompatibilitySuppressions.xml b/src/libraries/System.Text.Json/src/CompatibilitySuppressions.xml index 1de43a6d616778..59676209362345 100644 --- a/src/libraries/System.Text.Json/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Text.Json/src/CompatibilitySuppressions.xml @@ -1,6 +1,90 @@  + + CP0002 + M:System.Text.Json.Serialization.Metadata.JsonMetadataServices.get_DateOnlyConverter + lib/net6.0/System.Text.Json.dll + lib/netstandard2.0/System.Text.Json.dll + true + + + CP0002 + M:System.Text.Json.Serialization.Metadata.JsonMetadataServices.get_HalfConverter + lib/net6.0/System.Text.Json.dll + lib/netstandard2.0/System.Text.Json.dll + true + + + CP0002 + M:System.Text.Json.Serialization.Metadata.JsonMetadataServices.get_TimeOnlyConverter + lib/net6.0/System.Text.Json.dll + lib/netstandard2.0/System.Text.Json.dll + true + + + CP0002 + M:System.Text.Json.Serialization.Metadata.JsonMetadataServices.get_DateOnlyConverter + lib/net7.0/System.Text.Json.dll + lib/netstandard2.0/System.Text.Json.dll + true + + + CP0002 + M:System.Text.Json.Serialization.Metadata.JsonMetadataServices.get_HalfConverter + lib/net7.0/System.Text.Json.dll + lib/netstandard2.0/System.Text.Json.dll + true + + + CP0002 + M:System.Text.Json.Serialization.Metadata.JsonMetadataServices.get_Int128Converter + lib/net7.0/System.Text.Json.dll + lib/netstandard2.0/System.Text.Json.dll + true + + + CP0002 + M:System.Text.Json.Serialization.Metadata.JsonMetadataServices.get_TimeOnlyConverter + lib/net7.0/System.Text.Json.dll + lib/netstandard2.0/System.Text.Json.dll + true + + + CP0002 + M:System.Text.Json.Serialization.Metadata.JsonMetadataServices.get_UInt128Converter + lib/net7.0/System.Text.Json.dll + lib/netstandard2.0/System.Text.Json.dll + true + + + CP0014 + M:System.Text.Json.JsonSerializerOptions.AddContext``1:[T:System.ObsoleteAttribute] + lib/net6.0/System.Text.Json.dll + lib/netstandard2.0/System.Text.Json.dll + true + + + CP0014 + P:System.Text.Json.JsonSerializerOptions.IgnoreNullValues:[T:System.ObsoleteAttribute] + lib/net6.0/System.Text.Json.dll + lib/netstandard2.0/System.Text.Json.dll + true + + + CP0014 + M:System.Text.Json.JsonSerializerOptions.AddContext``1:[T:System.ObsoleteAttribute] + lib/net7.0/System.Text.Json.dll + lib/netstandard2.0/System.Text.Json.dll + true + + + CP0014 + P:System.Text.Json.JsonSerializerOptions.IgnoreNullValues:[T:System.ObsoleteAttribute] + lib/net7.0/System.Text.Json.dll + lib/netstandard2.0/System.Text.Json.dll + true + CP0015 T:System.Text.Json.Serialization.JsonStringEnumConverter:[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] @@ -8,4 +92,32 @@ lib/net7.0/System.Text.Json.dll true + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.Text.Json.dll + lib/netstandard2.0/System.Text.Json.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.Text.Json.dll + right + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.Text.Json.dll + lib/netstandard2.0/System.Text.Json.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.Text.Json.dll + right + true + \ No newline at end of file diff --git a/src/libraries/System.Text.Json/src/PACKAGE.md b/src/libraries/System.Text.Json/src/PACKAGE.md index 7cbbec76e65b32..1ddd210a0acb28 100644 --- a/src/libraries/System.Text.Json/src/PACKAGE.md +++ b/src/libraries/System.Text.Json/src/PACKAGE.md @@ -239,8 +239,8 @@ The main types provided by this library are: ## Additional Documentation -* [Conceptual documentation](https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/overview) -* [API documentation](https://learn.microsoft.com/en-us/dotnet/api/system.text.json) +* [Conceptual documentation](https://learn.microsoft.com/dotnet/standard/serialization/system-text-json/overview) +* [API documentation](https://learn.microsoft.com/dotnet/api/system.text.json) ## Related Packages 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 5765b6cdbee865..5bd278908ad55c 100644 --- a/src/libraries/System.Text.Json/src/System.Text.Json.csproj +++ b/src/libraries/System.Text.Json/src/System.Text.Json.csproj @@ -357,27 +357,17 @@ The System.Text.Json library is built-in as part of the shared framework in .NET + - - - - - - - - - - - @@ -399,15 +389,12 @@ The System.Text.Json library is built-in as part of the shared framework in .NET - - - - + diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonDocument.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonDocument.cs index 93f7143a55844b..17e189cf9ff689 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonDocument.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonDocument.cs @@ -874,6 +874,15 @@ private static void ClearAndReturn(ArraySegment rented) } } + internal void WritePropertyName(int index, Utf8JsonWriter writer) + { + CheckNotDisposed(); + + DbRow row = _parsedData.Get(index - DbRow.Size); + Debug.Assert(row.TokenType == JsonTokenType.PropertyName); + WritePropertyName(row, writer); + } + private void WritePropertyName(in DbRow row, Utf8JsonWriter writer) { ArraySegment rented = default; diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonElement.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonElement.cs index 77732b69548d6e..c5d687892335aa 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonElement.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonElement.cs @@ -1316,6 +1316,13 @@ public void WriteTo(Utf8JsonWriter writer) _parent.WriteElementTo(_idx, writer); } + internal void WritePropertyNameTo(Utf8JsonWriter writer) + { + CheckValidInstance(); + + _parent.WritePropertyName(_idx, writer); + } + /// /// Get an enumerator to enumerate the values in the JSON array represented by this JsonElement. /// diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonProperty.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonProperty.cs index 1ed0b3f6262b36..9cad409a32b7a5 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonProperty.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonProperty.cs @@ -117,7 +117,15 @@ public void WriteTo(Utf8JsonWriter writer) ThrowHelper.ThrowArgumentNullException(nameof(writer)); } - writer.WritePropertyName(Name); + if (_name is null) + { + Value.WritePropertyNameTo(writer); + } + else + { + writer.WritePropertyName(_name); + } + Value.WriteTo(writer); } diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/JsonHelpers.cs b/src/libraries/System.Text.Json/src/System/Text/Json/JsonHelpers.cs index 87e34f44969865..5f9a6847015165 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/JsonHelpers.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/JsonHelpers.cs @@ -93,11 +93,22 @@ public static void ReadWithVerify(this ref Utf8JsonReader reader) /// public static string Utf8GetString(ReadOnlySpan bytes) { - return Encoding.UTF8.GetString(bytes -#if !NETCOREAPP - .ToArray() +#if NETCOREAPP + return Encoding.UTF8.GetString(bytes); +#else + if (bytes.Length == 0) + { + return string.Empty; + } + + unsafe + { + fixed (byte* bytesPtr = bytes) + { + return Encoding.UTF8.GetString(bytesPtr, bytes.Length); + } + } #endif - ); } /// diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Nodes/JsonArray.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Nodes/JsonArray.cs index 8dc0924ad36e61..9ae40a15ea66f6 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Nodes/JsonArray.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Nodes/JsonArray.cs @@ -113,9 +113,10 @@ internal int GetElementIndex(JsonNode? node) } /// - /// Returns enumerator that wraps calls to . + /// Returns an enumerable that wraps calls to . /// /// The type of the value to obtain from the . + /// An enumerable iterating over values of the array. public IEnumerable GetValues() { foreach (JsonNode? item in List) diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Nodes/JsonNode.To.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Nodes/JsonNode.To.cs index 838b05423912f8..0304718c81aa25 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Nodes/JsonNode.To.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Nodes/JsonNode.To.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.Threading; + namespace System.Text.Json.Nodes { public abstract partial class JsonNode @@ -12,8 +14,25 @@ public abstract partial class JsonNode /// JSON representation of current instance. public string ToJsonString(JsonSerializerOptions? options = null) { - using PooledByteBufferWriter output = WriteToPooledBuffer(options, options?.GetWriterOptions() ?? default); - return JsonHelpers.Utf8GetString(output.WrittenMemory.Span); + JsonWriterOptions writerOptions = default; + int defaultBufferSize = JsonSerializerOptions.BufferSizeDefault; + if (options is not null) + { + writerOptions = options.GetWriterOptions(); + defaultBufferSize = options.DefaultBufferSize; + } + + Utf8JsonWriter writer = Utf8JsonWriterCache.RentWriterAndBuffer(writerOptions, defaultBufferSize, out PooledByteBufferWriter output); + try + { + WriteTo(writer, options); + writer.Flush(); + return JsonHelpers.Utf8GetString(output.WrittenMemory.Span); + } + finally + { + Utf8JsonWriterCache.ReturnWriterAndBuffer(writer, output); + } } /// @@ -37,8 +56,17 @@ public override string ToString() } } - using PooledByteBufferWriter output = WriteToPooledBuffer(writerOptions: new JsonWriterOptions { Indented = true }); - return JsonHelpers.Utf8GetString(output.WrittenMemory.Span); + Utf8JsonWriter writer = Utf8JsonWriterCache.RentWriterAndBuffer(new JsonWriterOptions { Indented = true }, JsonSerializerOptions.BufferSizeDefault, out PooledByteBufferWriter output); + try + { + WriteTo(writer); + writer.Flush(); + return JsonHelpers.Utf8GetString(output.WrittenMemory.Span); + } + finally + { + Utf8JsonWriterCache.ReturnWriterAndBuffer(writer, output); + } } /// @@ -50,19 +78,5 @@ public override string ToString() /// /// Options to control the serialization behavior. public abstract void WriteTo(Utf8JsonWriter writer, JsonSerializerOptions? options = null); - - /// - /// Creates a pooled buffer writer instance and serializes all contents to it. - /// - internal PooledByteBufferWriter WriteToPooledBuffer( - JsonSerializerOptions? options = null, - JsonWriterOptions writerOptions = default, - int bufferSize = JsonSerializerOptions.BufferSizeDefault) - { - var bufferWriter = new PooledByteBufferWriter(bufferSize); - using var writer = new Utf8JsonWriter(bufferWriter, writerOptions); - WriteTo(writer, options); - return bufferWriter; - } } } diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Nodes/JsonNode.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Nodes/JsonNode.cs index a06fc47cfc1c42..1d38e494da611c 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Nodes/JsonNode.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Nodes/JsonNode.cs @@ -242,6 +242,7 @@ public JsonNode? this[string propertyName] /// /// Creates a new instance of the . All children nodes are recursively cloned. /// + /// A new cloned instance of the current node. public JsonNode DeepClone() => DeepCloneCore(); internal abstract JsonNode DeepCloneCore(); diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Nodes/JsonValueOfT.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Nodes/JsonValueOfT.cs index 0be2c9517a376a..86db69d82cd743 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Nodes/JsonValueOfT.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Nodes/JsonValueOfT.cs @@ -72,8 +72,17 @@ internal sealed override JsonValueKind GetValueKindCore() return element.ValueKind; } - using PooledByteBufferWriter output = WriteToPooledBuffer(); - return JsonElement.ParseValue(output.WrittenMemory.Span, options: default).ValueKind; + Utf8JsonWriter writer = Utf8JsonWriterCache.RentWriterAndBuffer(default, JsonSerializerOptions.BufferSizeDefault, out PooledByteBufferWriter output); + try + { + WriteTo(writer); + writer.Flush(); + return JsonElement.ParseValue(output.WrittenMemory.Span, options: default).ValueKind; + } + finally + { + Utf8JsonWriterCache.ReturnWriterAndBuffer(writer, output); + } } internal sealed override bool DeepEqualsCore(JsonNode? otherNode) @@ -107,9 +116,21 @@ internal sealed override bool DeepEqualsCore(JsonNode? otherNode) } } - using PooledByteBufferWriter thisOutput = WriteToPooledBuffer(); - using PooledByteBufferWriter otherOutput = otherNode.WriteToPooledBuffer(); + using PooledByteBufferWriter thisOutput = WriteToPooledBuffer(this); + using PooledByteBufferWriter otherOutput = WriteToPooledBuffer(otherNode); return thisOutput.WrittenMemory.Span.SequenceEqual(otherOutput.WrittenMemory.Span); + + static PooledByteBufferWriter WriteToPooledBuffer( + JsonNode node, + JsonSerializerOptions? options = null, + JsonWriterOptions writerOptions = default, + int bufferSize = JsonSerializerOptions.BufferSizeDefault) + { + var bufferWriter = new PooledByteBufferWriter(bufferSize); + using var writer = new Utf8JsonWriter(bufferWriter, writerOptions); + node.WriteTo(writer, options); + return bufferWriter; + } } internal TypeToConvert ConvertJsonElement() diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Attributes/JsonObjectCreationHandlingAttribute.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Attributes/JsonObjectCreationHandlingAttribute.cs index 718bdc744b6854..7f8a0cbe740cf8 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Attributes/JsonObjectCreationHandlingAttribute.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Attributes/JsonObjectCreationHandlingAttribute.cs @@ -39,6 +39,7 @@ public sealed class JsonObjectCreationHandlingAttribute : JsonAttribute /// /// Initializes a new instance of . /// + /// The handling to apply to the current member. public JsonObjectCreationHandlingAttribute(JsonObjectCreationHandling handling) { if (!JsonSerializer.IsValidCreationHandlingValue(handling)) diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Attributes/JsonUnmappedMemberHandlingAttribute.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Attributes/JsonUnmappedMemberHandlingAttribute.cs index 6004ea91d82ed3..ef99a901ade987 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Attributes/JsonUnmappedMemberHandlingAttribute.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Attributes/JsonUnmappedMemberHandlingAttribute.cs @@ -14,6 +14,7 @@ public class JsonUnmappedMemberHandlingAttribute : JsonAttribute /// /// Initializes a new instance of . /// + /// The handling to apply to the current member. public JsonUnmappedMemberHandlingAttribute(JsonUnmappedMemberHandling unmappedMemberHandling) { UnmappedMemberHandling = unmappedMemberHandling; diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterFactory.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterFactory.cs index 973d3692f2d8f3..7537fa0d833be2 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterFactory.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterFactory.cs @@ -142,6 +142,7 @@ internal sealed override void WriteAsPropertyNameAsObject(Utf8JsonWriter writer, throw new InvalidOperationException(); } + /// public sealed override Type? Type => null; internal sealed override void WriteAsPropertyNameCoreAsObject( diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterOfT.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterOfT.cs index 490d8349ed8ef5..cbe509480f36df 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterOfT.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterOfT.cs @@ -498,6 +498,7 @@ internal bool TryWriteDataExtensionProperty(Utf8JsonWriter writer, T value, Json return success; } + /// public sealed override Type Type { get; } = typeof(T); internal void VerifyRead(JsonTokenType tokenType, int depth, long bytesConsumed, bool isValueConverter, ref Utf8JsonReader reader) diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonNumberEnumConverter.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonNumberEnumConverter.cs index f2c41af4dbefc0..fa7c190f4f3ea1 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonNumberEnumConverter.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonNumberEnumConverter.cs @@ -17,6 +17,11 @@ namespace System.Text.Json.Serialization public sealed class JsonNumberEnumConverter : JsonConverterFactory where TEnum : struct, Enum { + /// + /// Initializes a new instance of . + /// + public JsonNumberEnumConverter() { } + /// public override bool CanConvert(Type typeToConvert) => typeToConvert == typeof(TEnum); diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Document.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Document.cs index 5d47b54b022177..8f7aefcbc30a3c 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Document.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Document.cs @@ -113,6 +113,7 @@ public static partial class JsonSerializer /// /// The to convert. /// Metadata about the type to convert. + /// A representation of the JSON value. /// /// is . /// diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriterCache.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriterCache.cs index bff98e9b81649e..b0d95280312865 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriterCache.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriterCache.cs @@ -13,7 +13,10 @@ internal static class Utf8JsonWriterCache [ThreadStatic] private static ThreadLocalState? t_threadLocalState; - public static Utf8JsonWriter RentWriterAndBuffer(JsonSerializerOptions options, out PooledByteBufferWriter bufferWriter) + public static Utf8JsonWriter RentWriterAndBuffer(JsonSerializerOptions options, out PooledByteBufferWriter bufferWriter) => + RentWriterAndBuffer(options.GetWriterOptions(), options.DefaultBufferSize, out bufferWriter); + + public static Utf8JsonWriter RentWriterAndBuffer(JsonWriterOptions options, int defaultBufferSize, out PooledByteBufferWriter bufferWriter) { ThreadLocalState state = t_threadLocalState ??= new(); Utf8JsonWriter writer; @@ -24,14 +27,14 @@ public static Utf8JsonWriter RentWriterAndBuffer(JsonSerializerOptions options, bufferWriter = state.BufferWriter; writer = state.Writer; - bufferWriter.InitializeEmptyInstance(options.DefaultBufferSize); - writer.Reset(bufferWriter, options.GetWriterOptions()); + bufferWriter.InitializeEmptyInstance(defaultBufferSize); + writer.Reset(bufferWriter, options); } else { // We're in a recursive JsonSerializer call -- return fresh instances. - bufferWriter = new PooledByteBufferWriter(options.DefaultBufferSize); - writer = new Utf8JsonWriter(bufferWriter, options.GetWriterOptions()); + bufferWriter = new PooledByteBufferWriter(defaultBufferSize); + writer = new Utf8JsonWriter(bufferWriter, options); } return writer; diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/NewtonsoftTests/ImmutableCollectionsTests.cs b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/NewtonsoftTests/ImmutableCollectionsTests.cs index 26226b2bc1e6bf..946b4c14352088 100644 --- a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/NewtonsoftTests/ImmutableCollectionsTests.cs +++ b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/NewtonsoftTests/ImmutableCollectionsTests.cs @@ -250,7 +250,8 @@ public void SerializeHashSet() string json = JsonSerializer.Serialize(data, s_indentedOption); - ImmutableHashSet a = JsonSerializer.Deserialize>(json); + // Use ISet to disambiguate between ISet and IReadOnlySet overloads below + ISet a = JsonSerializer.Deserialize>(json); Assert.Equal(3, a.Count); Assert.Contains("One", a); Assert.Contains("II", a); @@ -266,7 +267,8 @@ public void DeserializeHashSet() ""3"" ]"; - ImmutableHashSet data = JsonSerializer.Deserialize>(json); + // Use ISet to disambiguate between ISet and IReadOnlySet overloads below + ISet data = JsonSerializer.Deserialize>(json); Assert.Equal(3, data.Count); Assert.Contains("3", data); @@ -316,7 +318,8 @@ public void DeserializeSortedSet() ""3"" ]"; - ImmutableSortedSet data = JsonSerializer.Deserialize>(json); + // Use ISet to disambiguate between ISet and IReadOnlySet overloads below + ISet data = JsonSerializer.Deserialize>(json); Assert.Equal(3, data.Count); Assert.Contains("3", data); diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/System.Text.Json.Tests.csproj b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/System.Text.Json.Tests.csproj index 2b79fd957e8d85..a0f7a9151d3430 100644 --- a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/System.Text.Json.Tests.csproj +++ b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/System.Text.Json.Tests.csproj @@ -257,35 +257,33 @@ - - - - - + - - + + + - - + + + + + + - - - - + + + - - - + diff --git a/src/libraries/System.Text.RegularExpressions/System.Text.RegularExpressions.sln b/src/libraries/System.Text.RegularExpressions/System.Text.RegularExpressions.sln index bd3042ee1575f2..532e2126b4feb2 100644 --- a/src/libraries/System.Text.RegularExpressions/System.Text.RegularExpressions.sln +++ b/src/libraries/System.Text.RegularExpressions/System.Text.RegularExpressions.sln @@ -1,8 +1,16 @@ Microsoft Visual Studio Solution File, Format Version 12.00 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{63551298-BFD4-43FC-8465-AC454228B83C}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.AsyncInterfaces", "..\Microsoft.Bcl.AsyncInterfaces\ref\Microsoft.Bcl.AsyncInterfaces.csproj", "{401537CC-AF2E-48C5-A82A-5079C68FE837}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.AsyncInterfaces", "..\Microsoft.Bcl.AsyncInterfaces\src\Microsoft.Bcl.AsyncInterfaces.csproj", "{5BBB128E-BA8A-4ABD-9F73-1B5AD48B0A04}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Collections.Concurrent", "..\System.Collections.Concurrent\ref\System.Collections.Concurrent.csproj", "{9E0438E1-8DD1-42CB-9C83-F88BBD3BC051}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Collections", "..\System.Collections\ref\System.Collections.csproj", "{2297998A-8E7C-48C9-8331-7755D80EEF09}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Memory", "..\System.Memory\ref\System.Memory.csproj", "{6C17FA4E-E870-44D6-9F76-B8A8FFCD2B52}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection.Emit.ILGeneration", "..\System.Reflection.Emit.ILGeneration\ref\System.Reflection.Emit.ILGeneration.csproj", "{A3E53498-1F49-43C1-88A3-A6ED0A7819AA}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection.Primitives", "..\System.Reflection.Primitives\ref\System.Reflection.Primitives.csproj", "{383F591C-2BCC-440E-ACC2-366B3736AF4A}" @@ -17,6 +25,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.InteropServi EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{A5BAC1BF-9D24-4503-AF30-15641C27DDB2}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encodings.Web", "..\System.Text.Encodings.Web\ref\System.Text.Encodings.Web.csproj", "{8B81F45D-3001-48B5-B296-5152E8BAAA9F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encodings.Web", "..\System.Text.Encodings.Web\src\System.Text.Encodings.Web.csproj", "{3C8AEE20-AEF0-45D1-9B57-CAE16EA5A5B0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn3.11", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn3.11.csproj", "{202F5AD1-E8E5-4709-8D12-1DBCC6680BFB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.0", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.0.csproj", "{F02259C7-5945-420C-876F-638342E8494D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.4", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.4.csproj", "{17725877-C8D6-436A-AC72-BD13FB10E6C3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\ref\System.Text.Json.csproj", "{5BEC4932-AA8C-4FA1-B2E2-0DC34CCA3986}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{4661A8AE-3760-4EEA-81B5-D90D076057F7}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.RegularExpressions.Generator", "gen\System.Text.RegularExpressions.Generator.csproj", "{3699C8E2-C354-4AED-81DC-ECBAC3EFEB4B}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.RegularExpressions", "ref\System.Text.RegularExpressions.csproj", "{C043B00D-8662-43E4-9E87-8BB317059111}" @@ -27,13 +49,31 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.RegularExpressi EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.RegularExpressions.Unit.Tests", "tests\UnitTests\System.Text.RegularExpressions.Unit.Tests.csproj", "{A86931EC-34DC-40A8-BD8C-F5E13BDBA903}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{6CD7C9B0-1E53-403F-AB49-074F9C720BA1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{A7957DB5-DAAF-4EC6-A907-DAE81FFD0737}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{77185A65-80E0-4B99-B315-4B921E8E8D61}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{9A7A742B-6F06-4CE1-A9E3-3BEB2EE59CA2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{A07B3142-4D2D-4F7B-99D1-365D95A3D7F6}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{2ACCCAAB-F0CE-4839-82BD-F174861DEA78}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{15319A22-BC91-407B-A795-334DD05C82A0}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D8FD137E-6961-4629-A71A-53394897FE6B}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{0D20E771-24BD-4F9E-BBD0-60156E8C44FC}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D8FD137E-6961-4629-A71A-53394897FE6B}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{89EBAAA4-CC3B-4915-AF3C-1747A72A0417}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{DD6A790D-D2F5-4382-9083-857CA0CA0492}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{BA0BB6E9-3323-47C8-B823-E9D0B7DB208A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{40206B78-552D-4843-9012-9FE6C771F2CB}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -45,10 +85,26 @@ Global {63551298-BFD4-43FC-8465-AC454228B83C}.Debug|Any CPU.Build.0 = Debug|Any CPU {63551298-BFD4-43FC-8465-AC454228B83C}.Release|Any CPU.ActiveCfg = Release|Any CPU {63551298-BFD4-43FC-8465-AC454228B83C}.Release|Any CPU.Build.0 = Release|Any CPU + {401537CC-AF2E-48C5-A82A-5079C68FE837}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {401537CC-AF2E-48C5-A82A-5079C68FE837}.Debug|Any CPU.Build.0 = Debug|Any CPU + {401537CC-AF2E-48C5-A82A-5079C68FE837}.Release|Any CPU.ActiveCfg = Release|Any CPU + {401537CC-AF2E-48C5-A82A-5079C68FE837}.Release|Any CPU.Build.0 = Release|Any CPU + {5BBB128E-BA8A-4ABD-9F73-1B5AD48B0A04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5BBB128E-BA8A-4ABD-9F73-1B5AD48B0A04}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5BBB128E-BA8A-4ABD-9F73-1B5AD48B0A04}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5BBB128E-BA8A-4ABD-9F73-1B5AD48B0A04}.Release|Any CPU.Build.0 = Release|Any CPU + {9E0438E1-8DD1-42CB-9C83-F88BBD3BC051}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9E0438E1-8DD1-42CB-9C83-F88BBD3BC051}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9E0438E1-8DD1-42CB-9C83-F88BBD3BC051}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9E0438E1-8DD1-42CB-9C83-F88BBD3BC051}.Release|Any CPU.Build.0 = Release|Any CPU {2297998A-8E7C-48C9-8331-7755D80EEF09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2297998A-8E7C-48C9-8331-7755D80EEF09}.Debug|Any CPU.Build.0 = Debug|Any CPU {2297998A-8E7C-48C9-8331-7755D80EEF09}.Release|Any CPU.ActiveCfg = Release|Any CPU {2297998A-8E7C-48C9-8331-7755D80EEF09}.Release|Any CPU.Build.0 = Release|Any CPU + {6C17FA4E-E870-44D6-9F76-B8A8FFCD2B52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6C17FA4E-E870-44D6-9F76-B8A8FFCD2B52}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6C17FA4E-E870-44D6-9F76-B8A8FFCD2B52}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6C17FA4E-E870-44D6-9F76-B8A8FFCD2B52}.Release|Any CPU.Build.0 = Release|Any CPU {A3E53498-1F49-43C1-88A3-A6ED0A7819AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A3E53498-1F49-43C1-88A3-A6ED0A7819AA}.Debug|Any CPU.Build.0 = Debug|Any CPU {A3E53498-1F49-43C1-88A3-A6ED0A7819AA}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -77,6 +133,34 @@ Global {A5BAC1BF-9D24-4503-AF30-15641C27DDB2}.Debug|Any CPU.Build.0 = Debug|Any CPU {A5BAC1BF-9D24-4503-AF30-15641C27DDB2}.Release|Any CPU.ActiveCfg = Release|Any CPU {A5BAC1BF-9D24-4503-AF30-15641C27DDB2}.Release|Any CPU.Build.0 = Release|Any CPU + {8B81F45D-3001-48B5-B296-5152E8BAAA9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8B81F45D-3001-48B5-B296-5152E8BAAA9F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8B81F45D-3001-48B5-B296-5152E8BAAA9F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8B81F45D-3001-48B5-B296-5152E8BAAA9F}.Release|Any CPU.Build.0 = Release|Any CPU + {3C8AEE20-AEF0-45D1-9B57-CAE16EA5A5B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3C8AEE20-AEF0-45D1-9B57-CAE16EA5A5B0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3C8AEE20-AEF0-45D1-9B57-CAE16EA5A5B0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3C8AEE20-AEF0-45D1-9B57-CAE16EA5A5B0}.Release|Any CPU.Build.0 = Release|Any CPU + {202F5AD1-E8E5-4709-8D12-1DBCC6680BFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {202F5AD1-E8E5-4709-8D12-1DBCC6680BFB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {202F5AD1-E8E5-4709-8D12-1DBCC6680BFB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {202F5AD1-E8E5-4709-8D12-1DBCC6680BFB}.Release|Any CPU.Build.0 = Release|Any CPU + {F02259C7-5945-420C-876F-638342E8494D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F02259C7-5945-420C-876F-638342E8494D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F02259C7-5945-420C-876F-638342E8494D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F02259C7-5945-420C-876F-638342E8494D}.Release|Any CPU.Build.0 = Release|Any CPU + {17725877-C8D6-436A-AC72-BD13FB10E6C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {17725877-C8D6-436A-AC72-BD13FB10E6C3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {17725877-C8D6-436A-AC72-BD13FB10E6C3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {17725877-C8D6-436A-AC72-BD13FB10E6C3}.Release|Any CPU.Build.0 = Release|Any CPU + {5BEC4932-AA8C-4FA1-B2E2-0DC34CCA3986}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5BEC4932-AA8C-4FA1-B2E2-0DC34CCA3986}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5BEC4932-AA8C-4FA1-B2E2-0DC34CCA3986}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5BEC4932-AA8C-4FA1-B2E2-0DC34CCA3986}.Release|Any CPU.Build.0 = Release|Any CPU + {4661A8AE-3760-4EEA-81B5-D90D076057F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4661A8AE-3760-4EEA-81B5-D90D076057F7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4661A8AE-3760-4EEA-81B5-D90D076057F7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4661A8AE-3760-4EEA-81B5-D90D076057F7}.Release|Any CPU.Build.0 = Release|Any CPU {3699C8E2-C354-4AED-81DC-ECBAC3EFEB4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3699C8E2-C354-4AED-81DC-ECBAC3EFEB4B}.Debug|Any CPU.Build.0 = Debug|Any CPU {3699C8E2-C354-4AED-81DC-ECBAC3EFEB4B}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -97,6 +181,26 @@ Global {A86931EC-34DC-40A8-BD8C-F5E13BDBA903}.Debug|Any CPU.Build.0 = Debug|Any CPU {A86931EC-34DC-40A8-BD8C-F5E13BDBA903}.Release|Any CPU.ActiveCfg = Release|Any CPU {A86931EC-34DC-40A8-BD8C-F5E13BDBA903}.Release|Any CPU.Build.0 = Release|Any CPU + {6CD7C9B0-1E53-403F-AB49-074F9C720BA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6CD7C9B0-1E53-403F-AB49-074F9C720BA1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6CD7C9B0-1E53-403F-AB49-074F9C720BA1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6CD7C9B0-1E53-403F-AB49-074F9C720BA1}.Release|Any CPU.Build.0 = Release|Any CPU + {A7957DB5-DAAF-4EC6-A907-DAE81FFD0737}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A7957DB5-DAAF-4EC6-A907-DAE81FFD0737}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A7957DB5-DAAF-4EC6-A907-DAE81FFD0737}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A7957DB5-DAAF-4EC6-A907-DAE81FFD0737}.Release|Any CPU.Build.0 = Release|Any CPU + {77185A65-80E0-4B99-B315-4B921E8E8D61}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {77185A65-80E0-4B99-B315-4B921E8E8D61}.Debug|Any CPU.Build.0 = Debug|Any CPU + {77185A65-80E0-4B99-B315-4B921E8E8D61}.Release|Any CPU.ActiveCfg = Release|Any CPU + {77185A65-80E0-4B99-B315-4B921E8E8D61}.Release|Any CPU.Build.0 = Release|Any CPU + {9A7A742B-6F06-4CE1-A9E3-3BEB2EE59CA2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9A7A742B-6F06-4CE1-A9E3-3BEB2EE59CA2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9A7A742B-6F06-4CE1-A9E3-3BEB2EE59CA2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9A7A742B-6F06-4CE1-A9E3-3BEB2EE59CA2}.Release|Any CPU.Build.0 = Release|Any CPU + {A07B3142-4D2D-4F7B-99D1-365D95A3D7F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A07B3142-4D2D-4F7B-99D1-365D95A3D7F6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A07B3142-4D2D-4F7B-99D1-365D95A3D7F6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A07B3142-4D2D-4F7B-99D1-365D95A3D7F6}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -105,17 +209,36 @@ Global {63551298-BFD4-43FC-8465-AC454228B83C} = {2ACCCAAB-F0CE-4839-82BD-F174861DEA78} {8EE1A7C4-3630-4900-8976-9B3ADAFF10DC} = {2ACCCAAB-F0CE-4839-82BD-F174861DEA78} {A86931EC-34DC-40A8-BD8C-F5E13BDBA903} = {2ACCCAAB-F0CE-4839-82BD-F174861DEA78} + {401537CC-AF2E-48C5-A82A-5079C68FE837} = {15319A22-BC91-407B-A795-334DD05C82A0} + {9E0438E1-8DD1-42CB-9C83-F88BBD3BC051} = {15319A22-BC91-407B-A795-334DD05C82A0} {2297998A-8E7C-48C9-8331-7755D80EEF09} = {15319A22-BC91-407B-A795-334DD05C82A0} + {6C17FA4E-E870-44D6-9F76-B8A8FFCD2B52} = {15319A22-BC91-407B-A795-334DD05C82A0} {A3E53498-1F49-43C1-88A3-A6ED0A7819AA} = {15319A22-BC91-407B-A795-334DD05C82A0} {383F591C-2BCC-440E-ACC2-366B3736AF4A} = {15319A22-BC91-407B-A795-334DD05C82A0} {3719B896-4B09-4552-97C1-F18CFD595FCF} = {15319A22-BC91-407B-A795-334DD05C82A0} {A5BAC1BF-9D24-4503-AF30-15641C27DDB2} = {15319A22-BC91-407B-A795-334DD05C82A0} + {8B81F45D-3001-48B5-B296-5152E8BAAA9F} = {15319A22-BC91-407B-A795-334DD05C82A0} + {5BEC4932-AA8C-4FA1-B2E2-0DC34CCA3986} = {15319A22-BC91-407B-A795-334DD05C82A0} {C043B00D-8662-43E4-9E87-8BB317059111} = {15319A22-BC91-407B-A795-334DD05C82A0} + {5BBB128E-BA8A-4ABD-9F73-1B5AD48B0A04} = {D8FD137E-6961-4629-A71A-53394897FE6B} + {3C8AEE20-AEF0-45D1-9B57-CAE16EA5A5B0} = {D8FD137E-6961-4629-A71A-53394897FE6B} + {4661A8AE-3760-4EEA-81B5-D90D076057F7} = {D8FD137E-6961-4629-A71A-53394897FE6B} + {0409C086-D7CC-43F8-9762-C94FB1E47F5B} = {D8FD137E-6961-4629-A71A-53394897FE6B} {C5B9BDED-632F-4698-B0D7-FD12A1918170} = {0D20E771-24BD-4F9E-BBD0-60156E8C44FC} {19F5ED62-25AE-462C-B168-CA72F078FFA4} = {0D20E771-24BD-4F9E-BBD0-60156E8C44FC} {77CDA838-6489-4816-8847-DE2C7F5E1DCE} = {0D20E771-24BD-4F9E-BBD0-60156E8C44FC} + {202F5AD1-E8E5-4709-8D12-1DBCC6680BFB} = {0D20E771-24BD-4F9E-BBD0-60156E8C44FC} + {F02259C7-5945-420C-876F-638342E8494D} = {0D20E771-24BD-4F9E-BBD0-60156E8C44FC} + {17725877-C8D6-436A-AC72-BD13FB10E6C3} = {0D20E771-24BD-4F9E-BBD0-60156E8C44FC} {3699C8E2-C354-4AED-81DC-ECBAC3EFEB4B} = {0D20E771-24BD-4F9E-BBD0-60156E8C44FC} - {0409C086-D7CC-43F8-9762-C94FB1E47F5B} = {D8FD137E-6961-4629-A71A-53394897FE6B} + {6CD7C9B0-1E53-403F-AB49-074F9C720BA1} = {89EBAAA4-CC3B-4915-AF3C-1747A72A0417} + {A7957DB5-DAAF-4EC6-A907-DAE81FFD0737} = {89EBAAA4-CC3B-4915-AF3C-1747A72A0417} + {89EBAAA4-CC3B-4915-AF3C-1747A72A0417} = {40206B78-552D-4843-9012-9FE6C771F2CB} + {77185A65-80E0-4B99-B315-4B921E8E8D61} = {DD6A790D-D2F5-4382-9083-857CA0CA0492} + {9A7A742B-6F06-4CE1-A9E3-3BEB2EE59CA2} = {DD6A790D-D2F5-4382-9083-857CA0CA0492} + {DD6A790D-D2F5-4382-9083-857CA0CA0492} = {40206B78-552D-4843-9012-9FE6C771F2CB} + {A07B3142-4D2D-4F7B-99D1-365D95A3D7F6} = {BA0BB6E9-3323-47C8-B823-E9D0B7DB208A} + {BA0BB6E9-3323-47C8-B823-E9D0B7DB208A} = {40206B78-552D-4843-9012-9FE6C771F2CB} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {1ED4AB32-B7AA-478F-A96B-F725ACD0AABB} diff --git a/src/libraries/System.Text.RegularExpressions/gen/UpgradeToGeneratedRegexCodeFixer.cs b/src/libraries/System.Text.RegularExpressions/gen/UpgradeToGeneratedRegexCodeFixer.cs index fd5bfa8d64daf4..e63770a0a94d56 100644 --- a/src/libraries/System.Text.RegularExpressions/gen/UpgradeToGeneratedRegexCodeFixer.cs +++ b/src/libraries/System.Text.RegularExpressions/gen/UpgradeToGeneratedRegexCodeFixer.cs @@ -210,8 +210,10 @@ private static async Task ConvertToSourceGenerator(Document document, // it in as a parameter. If the user specified IgnoreCase, but also selected CultureInvariant, then we skip as the default is to use Invariant culture. if ((regexOptions & RegexOptions.IgnoreCase) != 0 && (regexOptions & RegexOptions.CultureInvariant) == 0) { +#pragma warning disable RS1035 // The symbol 'CultureInfo.CurrentCulture' is banned for use by analyzers. // If CultureInvariant wasn't specified as options, we default to the current culture. cultureNameValue = generator.LiteralExpression(CultureInfo.CurrentCulture.Name); +#pragma warning restore RS1035 // If options weren't passed in, then we need to define it as well in order to use the three parameter constructor. regexOptionsValue ??= generator.MemberAccessExpression(SyntaxFactory.IdentifierName("RegexOptions"), "None"); diff --git a/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexParser.cs b/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexParser.cs index 1cc517713121c9..5c5ca0e209d0c9 100644 --- a/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexParser.cs +++ b/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexParser.cs @@ -83,7 +83,9 @@ private RegexParser(string pattern, RegexOptions options, CultureInfo culture, H /// Gets the culture to use based on the specified options. internal static CultureInfo GetTargetCulture(RegexOptions options) => +#pragma warning disable RS1035 // The symbol 'CultureInfo.CurrentCulture' is banned for use by analyzers. (options & RegexOptions.CultureInvariant) != 0 ? CultureInfo.InvariantCulture : CultureInfo.CurrentCulture; +#pragma warning restore RS1035 public static RegexOptions ParseOptionsInPattern(string pattern, RegexOptions options) { @@ -134,7 +136,9 @@ public static RegexTree Parse(string pattern, RegexOptions options, CultureInfo /// This static call constructs a flat concatenation node given a replacement pattern. public static RegexReplacement ParseReplacement(string pattern, RegexOptions options, Hashtable caps, int capsize, Hashtable capnames) { +#pragma warning disable RS1035 // The symbol 'CultureInfo.CurrentCulture' is banned for use by analyzers. CultureInfo culture = (options & RegexOptions.CultureInvariant) != 0 ? CultureInfo.InvariantCulture : CultureInfo.CurrentCulture; +#pragma warning restore RS1035 using var parser = new RegexParser(pattern, options, culture, caps, capsize, capnames, stackalloc int[OptionStackDefaultSize]); RegexNode root = parser.ScanReplacement(); diff --git a/src/libraries/System.Text.RegularExpressions/tools/Directory.Build.props b/src/libraries/System.Text.RegularExpressions/tools/Directory.Build.props index cfbf29e03372e0..b99ed2c670567c 100644 --- a/src/libraries/System.Text.RegularExpressions/tools/Directory.Build.props +++ b/src/libraries/System.Text.RegularExpressions/tools/Directory.Build.props @@ -1,3 +1,10 @@ - + + + + false + false + + \ No newline at end of file diff --git a/src/libraries/System.Text.RegularExpressions/tools/Directory.Build.targets b/src/libraries/System.Text.RegularExpressions/tools/Directory.Build.targets deleted file mode 100644 index cfbf29e03372e0..00000000000000 --- a/src/libraries/System.Text.RegularExpressions/tools/Directory.Build.targets +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/src/libraries/System.Text.RegularExpressions/tools/GenerateRegexCasingTable.csproj b/src/libraries/System.Text.RegularExpressions/tools/GenerateRegexCasingTable.csproj index 9e721269605bd1..e517808bbd95c4 100644 --- a/src/libraries/System.Text.RegularExpressions/tools/GenerateRegexCasingTable.csproj +++ b/src/libraries/System.Text.RegularExpressions/tools/GenerateRegexCasingTable.csproj @@ -1,9 +1,9 @@ - Exe - net7.0 + net8.0 + Exe enable diff --git a/src/libraries/System.Threading.AccessControl/System.Threading.AccessControl.sln b/src/libraries/System.Threading.AccessControl/System.Threading.AccessControl.sln index 73a4f02e9d2b68..bde719faf80f00 100644 --- a/src/libraries/System.Threading.AccessControl/System.Threading.AccessControl.sln +++ b/src/libraries/System.Threading.AccessControl/System.Threading.AccessControl.sln @@ -1,8 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{7A3FDF55-70D1-42F5-9231-8F7CAB1B7097}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{1464649F-3E47-48BB-BE55-48D28E43E4B8}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{9BA0DBB0-99CF-4DEE-A43F-2B49854798AA}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{96AF90CB-B031-4F19-A6F2-957715703954}" @@ -13,6 +11,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.AccessCont EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.AccessControl.Tests", "tests\System.Threading.AccessControl.Tests.csproj", "{66D93328-0A8C-44AD-923B-AD3EB69A9518}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{73252B22-6231-4A95-9063-93D95234C527}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{28919E01-7456-44ED-A9E7-DCF8DA1D6065}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{E7302E2B-77D5-4BD5-A4C7-35E5BF96EACD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{F103C931-DC45-4BE8-A258-AB5B084B4372}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{9C3923C2-DCB9-42B1-827B-8FD9B41D19F3}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{5ED4F157-B780-4295-9D2F-1DE86DBCDA24}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{C7B6A687-7D71-47EC-AC21-8B8DEA7EF016}" @@ -21,6 +29,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{D7D1A40A-E3E EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{8F3D0B8C-8814-4A4C-9663-837D46DA0AC6}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{1E99F2C8-C75A-4A4B-A85B-69BD4692E02A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{EA1AB8BB-A371-415F-8E69-8D725F74113B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{9A85F46D-CB5B-4754-86DA-F51C1CCEE54D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{3621DFA4-3D4E-4287-9532-25BE4522B05E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -31,10 +47,6 @@ Global {7A3FDF55-70D1-42F5-9231-8F7CAB1B7097}.Debug|Any CPU.Build.0 = Debug|Any CPU {7A3FDF55-70D1-42F5-9231-8F7CAB1B7097}.Release|Any CPU.ActiveCfg = Release|Any CPU {7A3FDF55-70D1-42F5-9231-8F7CAB1B7097}.Release|Any CPU.Build.0 = Release|Any CPU - {1464649F-3E47-48BB-BE55-48D28E43E4B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1464649F-3E47-48BB-BE55-48D28E43E4B8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1464649F-3E47-48BB-BE55-48D28E43E4B8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1464649F-3E47-48BB-BE55-48D28E43E4B8}.Release|Any CPU.Build.0 = Release|Any CPU {9BA0DBB0-99CF-4DEE-A43F-2B49854798AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9BA0DBB0-99CF-4DEE-A43F-2B49854798AA}.Debug|Any CPU.Build.0 = Debug|Any CPU {9BA0DBB0-99CF-4DEE-A43F-2B49854798AA}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -55,6 +67,26 @@ Global {66D93328-0A8C-44AD-923B-AD3EB69A9518}.Debug|Any CPU.Build.0 = Debug|Any CPU {66D93328-0A8C-44AD-923B-AD3EB69A9518}.Release|Any CPU.ActiveCfg = Release|Any CPU {66D93328-0A8C-44AD-923B-AD3EB69A9518}.Release|Any CPU.Build.0 = Release|Any CPU + {73252B22-6231-4A95-9063-93D95234C527}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {73252B22-6231-4A95-9063-93D95234C527}.Debug|Any CPU.Build.0 = Debug|Any CPU + {73252B22-6231-4A95-9063-93D95234C527}.Release|Any CPU.ActiveCfg = Release|Any CPU + {73252B22-6231-4A95-9063-93D95234C527}.Release|Any CPU.Build.0 = Release|Any CPU + {28919E01-7456-44ED-A9E7-DCF8DA1D6065}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28919E01-7456-44ED-A9E7-DCF8DA1D6065}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28919E01-7456-44ED-A9E7-DCF8DA1D6065}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28919E01-7456-44ED-A9E7-DCF8DA1D6065}.Release|Any CPU.Build.0 = Release|Any CPU + {E7302E2B-77D5-4BD5-A4C7-35E5BF96EACD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E7302E2B-77D5-4BD5-A4C7-35E5BF96EACD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E7302E2B-77D5-4BD5-A4C7-35E5BF96EACD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E7302E2B-77D5-4BD5-A4C7-35E5BF96EACD}.Release|Any CPU.Build.0 = Release|Any CPU + {F103C931-DC45-4BE8-A258-AB5B084B4372}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F103C931-DC45-4BE8-A258-AB5B084B4372}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F103C931-DC45-4BE8-A258-AB5B084B4372}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F103C931-DC45-4BE8-A258-AB5B084B4372}.Release|Any CPU.Build.0 = Release|Any CPU + {9C3923C2-DCB9-42B1-827B-8FD9B41D19F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9C3923C2-DCB9-42B1-827B-8FD9B41D19F3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9C3923C2-DCB9-42B1-827B-8FD9B41D19F3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9C3923C2-DCB9-42B1-827B-8FD9B41D19F3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -62,11 +94,18 @@ Global GlobalSection(NestedProjects) = preSolution {7A3FDF55-70D1-42F5-9231-8F7CAB1B7097} = {5ED4F157-B780-4295-9D2F-1DE86DBCDA24} {66D93328-0A8C-44AD-923B-AD3EB69A9518} = {5ED4F157-B780-4295-9D2F-1DE86DBCDA24} - {1464649F-3E47-48BB-BE55-48D28E43E4B8} = {C7B6A687-7D71-47EC-AC21-8B8DEA7EF016} {9BA0DBB0-99CF-4DEE-A43F-2B49854798AA} = {C7B6A687-7D71-47EC-AC21-8B8DEA7EF016} {96AF90CB-B031-4F19-A6F2-957715703954} = {C7B6A687-7D71-47EC-AC21-8B8DEA7EF016} {6EA32BE1-8B5E-4807-B641-E7556C1E2C9D} = {D7D1A40A-E3E6-45DF-82CF-5BEE62109C70} {6A444824-8479-4DB5-8DCA-9F50353ADE29} = {8F3D0B8C-8814-4A4C-9663-837D46DA0AC6} + {73252B22-6231-4A95-9063-93D95234C527} = {1E99F2C8-C75A-4A4B-A85B-69BD4692E02A} + {28919E01-7456-44ED-A9E7-DCF8DA1D6065} = {1E99F2C8-C75A-4A4B-A85B-69BD4692E02A} + {1E99F2C8-C75A-4A4B-A85B-69BD4692E02A} = {3621DFA4-3D4E-4287-9532-25BE4522B05E} + {E7302E2B-77D5-4BD5-A4C7-35E5BF96EACD} = {EA1AB8BB-A371-415F-8E69-8D725F74113B} + {F103C931-DC45-4BE8-A258-AB5B084B4372} = {EA1AB8BB-A371-415F-8E69-8D725F74113B} + {EA1AB8BB-A371-415F-8E69-8D725F74113B} = {3621DFA4-3D4E-4287-9532-25BE4522B05E} + {9C3923C2-DCB9-42B1-827B-8FD9B41D19F3} = {9A85F46D-CB5B-4754-86DA-F51C1CCEE54D} + {9A85F46D-CB5B-4754-86DA-F51C1CCEE54D} = {3621DFA4-3D4E-4287-9532-25BE4522B05E} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {6F3B4C7D-242F-4FAD-AB68-E3CE4552686F} diff --git a/src/libraries/System.Threading.Channels/System.Threading.Channels.sln b/src/libraries/System.Threading.Channels/System.Threading.Channels.sln index 06e1cf1b730ee8..9c46a0e83d0822 100644 --- a/src/libraries/System.Threading.Channels/System.Threading.Channels.sln +++ b/src/libraries/System.Threading.Channels/System.Threading.Channels.sln @@ -1,8 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{C1F10802-5F76-472B-B164-C1D181DB5EBC}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{CFA034DE-BEB3-4E06-945A-F8FA8F6A463A}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{6B242CF0-6FFA-46D4-A31A-8A1EDCFDAB60}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{9158C7E3-284E-4D6F-BA23-B7534683E265}" @@ -15,6 +13,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.Channels", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.Channels.Tests", "tests\System.Threading.Channels.Tests.csproj", "{845BFFC3-14F2-402E-81E5-B487D41B7CD9}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{2AD46684-8EC5-4ABB-894E-E5D737225B45}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{67F35676-A50A-4509-A338-901BCC63FED4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{65AF6A62-13E9-43EB-A117-B4F1E1D86CE6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{A6A0F156-4AC7-4B7C-8DD8-3D1105506F1D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{FA715337-7A3E-4812-922F-D73424FFF2E3}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{07CE01C8-BDC8-4CED-AA33-6F3B35935CB6}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{42E20B4D-6489-4096-8DC3-A0C20D19B1D6}" @@ -23,6 +31,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{F69B62DE-61A EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D3FF5D0E-208E-408F-97AD-C81EB31BB115}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{E719C436-7E71-4A0D-A76D-90CC13B5A5E7}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{0863620E-F072-401C-B6CD-C8867C53CDFF}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{027C3963-9C18-42EF-AD34-6DF010301499}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{20BF5207-0ECC-4975-A26E-29E2340EF131}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -33,10 +49,6 @@ Global {C1F10802-5F76-472B-B164-C1D181DB5EBC}.Debug|Any CPU.Build.0 = Debug|Any CPU {C1F10802-5F76-472B-B164-C1D181DB5EBC}.Release|Any CPU.ActiveCfg = Release|Any CPU {C1F10802-5F76-472B-B164-C1D181DB5EBC}.Release|Any CPU.Build.0 = Release|Any CPU - {CFA034DE-BEB3-4E06-945A-F8FA8F6A463A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CFA034DE-BEB3-4E06-945A-F8FA8F6A463A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CFA034DE-BEB3-4E06-945A-F8FA8F6A463A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CFA034DE-BEB3-4E06-945A-F8FA8F6A463A}.Release|Any CPU.Build.0 = Release|Any CPU {6B242CF0-6FFA-46D4-A31A-8A1EDCFDAB60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6B242CF0-6FFA-46D4-A31A-8A1EDCFDAB60}.Debug|Any CPU.Build.0 = Debug|Any CPU {6B242CF0-6FFA-46D4-A31A-8A1EDCFDAB60}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -61,6 +73,26 @@ Global {845BFFC3-14F2-402E-81E5-B487D41B7CD9}.Debug|Any CPU.Build.0 = Debug|Any CPU {845BFFC3-14F2-402E-81E5-B487D41B7CD9}.Release|Any CPU.ActiveCfg = Release|Any CPU {845BFFC3-14F2-402E-81E5-B487D41B7CD9}.Release|Any CPU.Build.0 = Release|Any CPU + {2AD46684-8EC5-4ABB-894E-E5D737225B45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2AD46684-8EC5-4ABB-894E-E5D737225B45}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2AD46684-8EC5-4ABB-894E-E5D737225B45}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2AD46684-8EC5-4ABB-894E-E5D737225B45}.Release|Any CPU.Build.0 = Release|Any CPU + {67F35676-A50A-4509-A338-901BCC63FED4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {67F35676-A50A-4509-A338-901BCC63FED4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {67F35676-A50A-4509-A338-901BCC63FED4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {67F35676-A50A-4509-A338-901BCC63FED4}.Release|Any CPU.Build.0 = Release|Any CPU + {65AF6A62-13E9-43EB-A117-B4F1E1D86CE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {65AF6A62-13E9-43EB-A117-B4F1E1D86CE6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {65AF6A62-13E9-43EB-A117-B4F1E1D86CE6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {65AF6A62-13E9-43EB-A117-B4F1E1D86CE6}.Release|Any CPU.Build.0 = Release|Any CPU + {A6A0F156-4AC7-4B7C-8DD8-3D1105506F1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A6A0F156-4AC7-4B7C-8DD8-3D1105506F1D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A6A0F156-4AC7-4B7C-8DD8-3D1105506F1D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A6A0F156-4AC7-4B7C-8DD8-3D1105506F1D}.Release|Any CPU.Build.0 = Release|Any CPU + {FA715337-7A3E-4812-922F-D73424FFF2E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA715337-7A3E-4812-922F-D73424FFF2E3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA715337-7A3E-4812-922F-D73424FFF2E3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA715337-7A3E-4812-922F-D73424FFF2E3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -68,12 +100,19 @@ Global GlobalSection(NestedProjects) = preSolution {C1F10802-5F76-472B-B164-C1D181DB5EBC} = {07CE01C8-BDC8-4CED-AA33-6F3B35935CB6} {845BFFC3-14F2-402E-81E5-B487D41B7CD9} = {07CE01C8-BDC8-4CED-AA33-6F3B35935CB6} - {CFA034DE-BEB3-4E06-945A-F8FA8F6A463A} = {42E20B4D-6489-4096-8DC3-A0C20D19B1D6} {6B242CF0-6FFA-46D4-A31A-8A1EDCFDAB60} = {42E20B4D-6489-4096-8DC3-A0C20D19B1D6} {9158C7E3-284E-4D6F-BA23-B7534683E265} = {42E20B4D-6489-4096-8DC3-A0C20D19B1D6} {3D984937-E378-411E-8943-5B5DB23944F5} = {F69B62DE-61AD-4978-81C4-C095B62B5B04} {E427C88B-655E-43F9-A0C0-AA54D01BDBDF} = {F69B62DE-61AD-4978-81C4-C095B62B5B04} {4CFA1610-00D7-4651-82C8-A7504C475837} = {D3FF5D0E-208E-408F-97AD-C81EB31BB115} + {2AD46684-8EC5-4ABB-894E-E5D737225B45} = {E719C436-7E71-4A0D-A76D-90CC13B5A5E7} + {67F35676-A50A-4509-A338-901BCC63FED4} = {E719C436-7E71-4A0D-A76D-90CC13B5A5E7} + {E719C436-7E71-4A0D-A76D-90CC13B5A5E7} = {20BF5207-0ECC-4975-A26E-29E2340EF131} + {65AF6A62-13E9-43EB-A117-B4F1E1D86CE6} = {0863620E-F072-401C-B6CD-C8867C53CDFF} + {A6A0F156-4AC7-4B7C-8DD8-3D1105506F1D} = {0863620E-F072-401C-B6CD-C8867C53CDFF} + {0863620E-F072-401C-B6CD-C8867C53CDFF} = {20BF5207-0ECC-4975-A26E-29E2340EF131} + {FA715337-7A3E-4812-922F-D73424FFF2E3} = {027C3963-9C18-42EF-AD34-6DF010301499} + {027C3963-9C18-42EF-AD34-6DF010301499} = {20BF5207-0ECC-4975-A26E-29E2340EF131} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {32969D61-FEC0-4702-A3D4-88EC58F8ED5A} diff --git a/src/libraries/System.Threading.Channels/src/PACKAGE.md b/src/libraries/System.Threading.Channels/src/PACKAGE.md new file mode 100644 index 00000000000000..f022aaf5ba32f2 --- /dev/null +++ b/src/libraries/System.Threading.Channels/src/PACKAGE.md @@ -0,0 +1,73 @@ +## About + + + +The `System.Threading.Channels` library provides types for passing data asynchronously between producers and consumers. + +## Key Features + + + +* Abstractions representing channels for one or more producers to publish data to one or more consumers +* APIs focused on asynchronous production and consumption of data +* Factory methods for producing multiple kinds of channels + +## How to Use + + + +```C# +using System; +using System.Threading.Channels; +using System.Threading.Tasks; + +Channel channel = Channel.CreateUnbounded(); + +Task producer = Task.Run(async () => +{ + int i = 0; + while (true) + { + channel.Writer.TryWrite(i++); + await Task.Delay(TimeSpan.FromSeconds(1)); + } +}); + +Task consumer = Task.Run(async () => +{ + await foreach (int value in channel.Reader.ReadAllAsync()) + { + Console.WriteLine(value); + } +}); + +await Task.WhenAll(producer, consumer); +``` + +## Main Types + + + +The main types provided by this library are: + +* `System.Threading.Channel` +* `System.Threading.Channel` + +## Additional Documentation + + + +* [Overview](https://devblogs.microsoft.com/dotnet/an-introduction-to-system-threading-channels/) +* [API documentation](https://learn.microsoft.com/dotnet/api/system.threading.channels) + +## Related Packages + + + +https://www.nuget.org/packages/System.Threading.Tasks.Dataflow/ + +## Feedback & Contributing + + + +System.Threading.Channels is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime). \ No newline at end of file diff --git a/src/libraries/System.Threading.Overlapped/System.Threading.Overlapped.sln b/src/libraries/System.Threading.Overlapped/System.Threading.Overlapped.sln index 4de5d554a3f9b6..65575c7acc17f4 100644 --- a/src/libraries/System.Threading.Overlapped/System.Threading.Overlapped.sln +++ b/src/libraries/System.Threading.Overlapped/System.Threading.Overlapped.sln @@ -19,7 +19,17 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.Overlapped EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.Overlapped.Tests", "tests\System.Threading.Overlapped.Tests.csproj", "{3F9C730B-665F-49A3-AB6D-C0A08E4F7CD1}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{4741C000-E701-406A-93B9-ABE5A5CF3D1C}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{2CBEE8BD-6E52-4B6B-BE53-590241EC95EF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{0C2A4261-EE14-46E4-AB3C-798F2C0B3F6C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{0CB7E6B4-912F-4CEE-B5BD-55DF6A31EAEF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{AD312772-BF6F-4B14-84A7-3D6F2A521E1F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{59717A0E-4E75-4E9C-9C48-CDDAAF388AF6}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{034CAAEB-FF8A-4EC7-AA23-838E8D212279}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{8B1F1ACE-FD0A-4083-8DE6-8148C541A2CA}" EndProject @@ -27,6 +37,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{D07DC3DB-723 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{1CC21763-DACE-400F-808F-7B9DCF90DCBA}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{4741C000-E701-406A-93B9-ABE5A5CF3D1C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{1170143C-D620-429E-B55E-4201C9C7F82A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{0CB511B6-7611-48B6-86A6-7F5EEFB871BD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{C3438661-C457-4E2B-A16D-584688B369BB}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{8468914A-B50E-4DB5-95F8-AA5344CD9FB0}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -265,13 +285,117 @@ Global {3F9C730B-665F-49A3-AB6D-C0A08E4F7CD1}.Checked|arm64.ActiveCfg = Debug|Any CPU {3F9C730B-665F-49A3-AB6D-C0A08E4F7CD1}.Checked|x64.ActiveCfg = Debug|Any CPU {3F9C730B-665F-49A3-AB6D-C0A08E4F7CD1}.Checked|x86.ActiveCfg = Debug|Any CPU + {2CBEE8BD-6E52-4B6B-BE53-590241EC95EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2CBEE8BD-6E52-4B6B-BE53-590241EC95EF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2CBEE8BD-6E52-4B6B-BE53-590241EC95EF}.Debug|arm.ActiveCfg = Debug|Any CPU + {2CBEE8BD-6E52-4B6B-BE53-590241EC95EF}.Debug|arm64.ActiveCfg = Debug|Any CPU + {2CBEE8BD-6E52-4B6B-BE53-590241EC95EF}.Debug|x64.ActiveCfg = Debug|Any CPU + {2CBEE8BD-6E52-4B6B-BE53-590241EC95EF}.Debug|x64.Build.0 = Debug|Any CPU + {2CBEE8BD-6E52-4B6B-BE53-590241EC95EF}.Debug|x86.ActiveCfg = Debug|Any CPU + {2CBEE8BD-6E52-4B6B-BE53-590241EC95EF}.Debug|x86.Build.0 = Debug|Any CPU + {2CBEE8BD-6E52-4B6B-BE53-590241EC95EF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2CBEE8BD-6E52-4B6B-BE53-590241EC95EF}.Release|Any CPU.Build.0 = Release|Any CPU + {2CBEE8BD-6E52-4B6B-BE53-590241EC95EF}.Release|arm.ActiveCfg = Release|Any CPU + {2CBEE8BD-6E52-4B6B-BE53-590241EC95EF}.Release|arm64.ActiveCfg = Release|Any CPU + {2CBEE8BD-6E52-4B6B-BE53-590241EC95EF}.Release|x64.ActiveCfg = Release|Any CPU + {2CBEE8BD-6E52-4B6B-BE53-590241EC95EF}.Release|x64.Build.0 = Release|Any CPU + {2CBEE8BD-6E52-4B6B-BE53-590241EC95EF}.Release|x86.ActiveCfg = Release|Any CPU + {2CBEE8BD-6E52-4B6B-BE53-590241EC95EF}.Release|x86.Build.0 = Release|Any CPU + {2CBEE8BD-6E52-4B6B-BE53-590241EC95EF}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {2CBEE8BD-6E52-4B6B-BE53-590241EC95EF}.Checked|arm.ActiveCfg = Debug|Any CPU + {2CBEE8BD-6E52-4B6B-BE53-590241EC95EF}.Checked|arm64.ActiveCfg = Debug|Any CPU + {2CBEE8BD-6E52-4B6B-BE53-590241EC95EF}.Checked|x64.ActiveCfg = Debug|Any CPU + {2CBEE8BD-6E52-4B6B-BE53-590241EC95EF}.Checked|x86.ActiveCfg = Debug|Any CPU + {0C2A4261-EE14-46E4-AB3C-798F2C0B3F6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0C2A4261-EE14-46E4-AB3C-798F2C0B3F6C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0C2A4261-EE14-46E4-AB3C-798F2C0B3F6C}.Debug|arm.ActiveCfg = Debug|Any CPU + {0C2A4261-EE14-46E4-AB3C-798F2C0B3F6C}.Debug|arm64.ActiveCfg = Debug|Any CPU + {0C2A4261-EE14-46E4-AB3C-798F2C0B3F6C}.Debug|x64.ActiveCfg = Debug|Any CPU + {0C2A4261-EE14-46E4-AB3C-798F2C0B3F6C}.Debug|x64.Build.0 = Debug|Any CPU + {0C2A4261-EE14-46E4-AB3C-798F2C0B3F6C}.Debug|x86.ActiveCfg = Debug|Any CPU + {0C2A4261-EE14-46E4-AB3C-798F2C0B3F6C}.Debug|x86.Build.0 = Debug|Any CPU + {0C2A4261-EE14-46E4-AB3C-798F2C0B3F6C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0C2A4261-EE14-46E4-AB3C-798F2C0B3F6C}.Release|Any CPU.Build.0 = Release|Any CPU + {0C2A4261-EE14-46E4-AB3C-798F2C0B3F6C}.Release|arm.ActiveCfg = Release|Any CPU + {0C2A4261-EE14-46E4-AB3C-798F2C0B3F6C}.Release|arm64.ActiveCfg = Release|Any CPU + {0C2A4261-EE14-46E4-AB3C-798F2C0B3F6C}.Release|x64.ActiveCfg = Release|Any CPU + {0C2A4261-EE14-46E4-AB3C-798F2C0B3F6C}.Release|x64.Build.0 = Release|Any CPU + {0C2A4261-EE14-46E4-AB3C-798F2C0B3F6C}.Release|x86.ActiveCfg = Release|Any CPU + {0C2A4261-EE14-46E4-AB3C-798F2C0B3F6C}.Release|x86.Build.0 = Release|Any CPU + {0C2A4261-EE14-46E4-AB3C-798F2C0B3F6C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {0C2A4261-EE14-46E4-AB3C-798F2C0B3F6C}.Checked|arm.ActiveCfg = Debug|Any CPU + {0C2A4261-EE14-46E4-AB3C-798F2C0B3F6C}.Checked|arm64.ActiveCfg = Debug|Any CPU + {0C2A4261-EE14-46E4-AB3C-798F2C0B3F6C}.Checked|x64.ActiveCfg = Debug|Any CPU + {0C2A4261-EE14-46E4-AB3C-798F2C0B3F6C}.Checked|x86.ActiveCfg = Debug|Any CPU + {0CB7E6B4-912F-4CEE-B5BD-55DF6A31EAEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0CB7E6B4-912F-4CEE-B5BD-55DF6A31EAEF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0CB7E6B4-912F-4CEE-B5BD-55DF6A31EAEF}.Debug|arm.ActiveCfg = Debug|Any CPU + {0CB7E6B4-912F-4CEE-B5BD-55DF6A31EAEF}.Debug|arm64.ActiveCfg = Debug|Any CPU + {0CB7E6B4-912F-4CEE-B5BD-55DF6A31EAEF}.Debug|x64.ActiveCfg = Debug|Any CPU + {0CB7E6B4-912F-4CEE-B5BD-55DF6A31EAEF}.Debug|x64.Build.0 = Debug|Any CPU + {0CB7E6B4-912F-4CEE-B5BD-55DF6A31EAEF}.Debug|x86.ActiveCfg = Debug|Any CPU + {0CB7E6B4-912F-4CEE-B5BD-55DF6A31EAEF}.Debug|x86.Build.0 = Debug|Any CPU + {0CB7E6B4-912F-4CEE-B5BD-55DF6A31EAEF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0CB7E6B4-912F-4CEE-B5BD-55DF6A31EAEF}.Release|Any CPU.Build.0 = Release|Any CPU + {0CB7E6B4-912F-4CEE-B5BD-55DF6A31EAEF}.Release|arm.ActiveCfg = Release|Any CPU + {0CB7E6B4-912F-4CEE-B5BD-55DF6A31EAEF}.Release|arm64.ActiveCfg = Release|Any CPU + {0CB7E6B4-912F-4CEE-B5BD-55DF6A31EAEF}.Release|x64.ActiveCfg = Release|Any CPU + {0CB7E6B4-912F-4CEE-B5BD-55DF6A31EAEF}.Release|x64.Build.0 = Release|Any CPU + {0CB7E6B4-912F-4CEE-B5BD-55DF6A31EAEF}.Release|x86.ActiveCfg = Release|Any CPU + {0CB7E6B4-912F-4CEE-B5BD-55DF6A31EAEF}.Release|x86.Build.0 = Release|Any CPU + {0CB7E6B4-912F-4CEE-B5BD-55DF6A31EAEF}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {0CB7E6B4-912F-4CEE-B5BD-55DF6A31EAEF}.Checked|arm.ActiveCfg = Debug|Any CPU + {0CB7E6B4-912F-4CEE-B5BD-55DF6A31EAEF}.Checked|arm64.ActiveCfg = Debug|Any CPU + {0CB7E6B4-912F-4CEE-B5BD-55DF6A31EAEF}.Checked|x64.ActiveCfg = Debug|Any CPU + {0CB7E6B4-912F-4CEE-B5BD-55DF6A31EAEF}.Checked|x86.ActiveCfg = Debug|Any CPU + {AD312772-BF6F-4B14-84A7-3D6F2A521E1F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AD312772-BF6F-4B14-84A7-3D6F2A521E1F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AD312772-BF6F-4B14-84A7-3D6F2A521E1F}.Debug|arm.ActiveCfg = Debug|Any CPU + {AD312772-BF6F-4B14-84A7-3D6F2A521E1F}.Debug|arm64.ActiveCfg = Debug|Any CPU + {AD312772-BF6F-4B14-84A7-3D6F2A521E1F}.Debug|x64.ActiveCfg = Debug|Any CPU + {AD312772-BF6F-4B14-84A7-3D6F2A521E1F}.Debug|x64.Build.0 = Debug|Any CPU + {AD312772-BF6F-4B14-84A7-3D6F2A521E1F}.Debug|x86.ActiveCfg = Debug|Any CPU + {AD312772-BF6F-4B14-84A7-3D6F2A521E1F}.Debug|x86.Build.0 = Debug|Any CPU + {AD312772-BF6F-4B14-84A7-3D6F2A521E1F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AD312772-BF6F-4B14-84A7-3D6F2A521E1F}.Release|Any CPU.Build.0 = Release|Any CPU + {AD312772-BF6F-4B14-84A7-3D6F2A521E1F}.Release|arm.ActiveCfg = Release|Any CPU + {AD312772-BF6F-4B14-84A7-3D6F2A521E1F}.Release|arm64.ActiveCfg = Release|Any CPU + {AD312772-BF6F-4B14-84A7-3D6F2A521E1F}.Release|x64.ActiveCfg = Release|Any CPU + {AD312772-BF6F-4B14-84A7-3D6F2A521E1F}.Release|x64.Build.0 = Release|Any CPU + {AD312772-BF6F-4B14-84A7-3D6F2A521E1F}.Release|x86.ActiveCfg = Release|Any CPU + {AD312772-BF6F-4B14-84A7-3D6F2A521E1F}.Release|x86.Build.0 = Release|Any CPU + {AD312772-BF6F-4B14-84A7-3D6F2A521E1F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {AD312772-BF6F-4B14-84A7-3D6F2A521E1F}.Checked|arm.ActiveCfg = Debug|Any CPU + {AD312772-BF6F-4B14-84A7-3D6F2A521E1F}.Checked|arm64.ActiveCfg = Debug|Any CPU + {AD312772-BF6F-4B14-84A7-3D6F2A521E1F}.Checked|x64.ActiveCfg = Debug|Any CPU + {AD312772-BF6F-4B14-84A7-3D6F2A521E1F}.Checked|x86.ActiveCfg = Debug|Any CPU + {59717A0E-4E75-4E9C-9C48-CDDAAF388AF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {59717A0E-4E75-4E9C-9C48-CDDAAF388AF6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {59717A0E-4E75-4E9C-9C48-CDDAAF388AF6}.Debug|arm.ActiveCfg = Debug|Any CPU + {59717A0E-4E75-4E9C-9C48-CDDAAF388AF6}.Debug|arm64.ActiveCfg = Debug|Any CPU + {59717A0E-4E75-4E9C-9C48-CDDAAF388AF6}.Debug|x64.ActiveCfg = Debug|Any CPU + {59717A0E-4E75-4E9C-9C48-CDDAAF388AF6}.Debug|x64.Build.0 = Debug|Any CPU + {59717A0E-4E75-4E9C-9C48-CDDAAF388AF6}.Debug|x86.ActiveCfg = Debug|Any CPU + {59717A0E-4E75-4E9C-9C48-CDDAAF388AF6}.Debug|x86.Build.0 = Debug|Any CPU + {59717A0E-4E75-4E9C-9C48-CDDAAF388AF6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {59717A0E-4E75-4E9C-9C48-CDDAAF388AF6}.Release|Any CPU.Build.0 = Release|Any CPU + {59717A0E-4E75-4E9C-9C48-CDDAAF388AF6}.Release|arm.ActiveCfg = Release|Any CPU + {59717A0E-4E75-4E9C-9C48-CDDAAF388AF6}.Release|arm64.ActiveCfg = Release|Any CPU + {59717A0E-4E75-4E9C-9C48-CDDAAF388AF6}.Release|x64.ActiveCfg = Release|Any CPU + {59717A0E-4E75-4E9C-9C48-CDDAAF388AF6}.Release|x64.Build.0 = Release|Any CPU + {59717A0E-4E75-4E9C-9C48-CDDAAF388AF6}.Release|x86.ActiveCfg = Release|Any CPU + {59717A0E-4E75-4E9C-9C48-CDDAAF388AF6}.Release|x86.Build.0 = Release|Any CPU + {59717A0E-4E75-4E9C-9C48-CDDAAF388AF6}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {59717A0E-4E75-4E9C-9C48-CDDAAF388AF6}.Checked|arm.ActiveCfg = Debug|Any CPU + {59717A0E-4E75-4E9C-9C48-CDDAAF388AF6}.Checked|arm64.ActiveCfg = Debug|Any CPU + {59717A0E-4E75-4E9C-9C48-CDDAAF388AF6}.Checked|x64.ActiveCfg = Debug|Any CPU + {59717A0E-4E75-4E9C-9C48-CDDAAF388AF6}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {2F704A4A-944B-487C-BB11-D66CA63F3B05} = {4741C000-E701-406A-93B9-ABE5A5CF3D1C} - {A3D9C10B-53A3-483C-8D90-BE7C078B82DF} = {4741C000-E701-406A-93B9-ABE5A5CF3D1C} + {2F704A4A-944B-487C-BB11-D66CA63F3B05} = {034CAAEB-FF8A-4EC7-AA23-838E8D212279} {A4B84F3E-9C18-4CF7-8CA8-9F4AA4A1634F} = {8B1F1ACE-FD0A-4083-8DE6-8148C541A2CA} {3F9C730B-665F-49A3-AB6D-C0A08E4F7CD1} = {8B1F1ACE-FD0A-4083-8DE6-8148C541A2CA} {8BAAF37B-C3C1-4DED-A89A-5513AE866360} = {D07DC3DB-723F-41C6-99A0-56F395D4D055} @@ -280,6 +404,15 @@ Global {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} + {A3D9C10B-53A3-483C-8D90-BE7C078B82DF} = {4741C000-E701-406A-93B9-ABE5A5CF3D1C} + {2CBEE8BD-6E52-4B6B-BE53-590241EC95EF} = {1170143C-D620-429E-B55E-4201C9C7F82A} + {0C2A4261-EE14-46E4-AB3C-798F2C0B3F6C} = {1170143C-D620-429E-B55E-4201C9C7F82A} + {1170143C-D620-429E-B55E-4201C9C7F82A} = {8468914A-B50E-4DB5-95F8-AA5344CD9FB0} + {0CB7E6B4-912F-4CEE-B5BD-55DF6A31EAEF} = {0CB511B6-7611-48B6-86A6-7F5EEFB871BD} + {AD312772-BF6F-4B14-84A7-3D6F2A521E1F} = {0CB511B6-7611-48B6-86A6-7F5EEFB871BD} + {0CB511B6-7611-48B6-86A6-7F5EEFB871BD} = {8468914A-B50E-4DB5-95F8-AA5344CD9FB0} + {59717A0E-4E75-4E9C-9C48-CDDAAF388AF6} = {C3438661-C457-4E2B-A16D-584688B369BB} + {C3438661-C457-4E2B-A16D-584688B369BB} = {8468914A-B50E-4DB5-95F8-AA5344CD9FB0} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {E07B568D-46A8-4A3F-86A3-2710CA761847} diff --git a/src/libraries/System.Threading.RateLimiting/System.Threading.RateLimiting.sln b/src/libraries/System.Threading.RateLimiting/System.Threading.RateLimiting.sln index 0b6bbc3dea75fc..2778a3fb6a644a 100644 --- a/src/libraries/System.Threading.RateLimiting/System.Threading.RateLimiting.sln +++ b/src/libraries/System.Threading.RateLimiting/System.Threading.RateLimiting.sln @@ -5,8 +5,6 @@ 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", "{F59F4FD7-EA00-47EA-A09A-6F76CB079F9B}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{965D1F05-364B-4F4B-B43C-442BC933CC9C}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{394FA814-CF72-447D-AAE1-1B92CD63205D}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{25495BDC-0614-4FAC-B6EA-DF3F0E35A871}" @@ -17,6 +15,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.RateLimiti EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.RateLimiting.Tests", "tests\System.Threading.RateLimiting.Tests.csproj", "{AE81EE9F-1240-4AF1-BF21-7F451B7859E5}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{2074D793-BE72-4128-BD17-6EF83FD69DD1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{305658CF-339B-486F-B58E-C85A31831527}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{B8A268C9-A2CD-479E-B03E-2B405F88D070}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{B4573176-B36D-4621-9791-77D4508330A4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{4F94EABD-404C-496C-BC15-3EE87F6E6B59}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{6614EF7F-23FC-4809-AFF5-1ADBF1B6422C}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{111B1B5B-A004-4C05-9A8C-E0931DADA5FB}" @@ -25,6 +33,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{85204CF5-0C8 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{399BE36D-F2D9-420A-AA09-455D4BF52057}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{C28129A1-6D6F-4B06-B1FA-ADD0A6DFA7C2}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{5B944921-2830-43CF-92C2-11D6FDAD14B9}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{C0815C13-99E8-44C2-B35F-31E22A3DA527}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{C57F8858-D3FE-4C08-8D13-DDFCD82350EC}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -43,10 +59,6 @@ Global {F59F4FD7-EA00-47EA-A09A-6F76CB079F9B}.Debug|Any CPU.Build.0 = Debug|Any CPU {F59F4FD7-EA00-47EA-A09A-6F76CB079F9B}.Release|Any CPU.ActiveCfg = Release|Any CPU {F59F4FD7-EA00-47EA-A09A-6F76CB079F9B}.Release|Any CPU.Build.0 = Release|Any CPU - {965D1F05-364B-4F4B-B43C-442BC933CC9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {965D1F05-364B-4F4B-B43C-442BC933CC9C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {965D1F05-364B-4F4B-B43C-442BC933CC9C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {965D1F05-364B-4F4B-B43C-442BC933CC9C}.Release|Any CPU.Build.0 = Release|Any CPU {394FA814-CF72-447D-AAE1-1B92CD63205D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {394FA814-CF72-447D-AAE1-1B92CD63205D}.Debug|Any CPU.Build.0 = Debug|Any CPU {394FA814-CF72-447D-AAE1-1B92CD63205D}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -67,6 +79,26 @@ Global {AE81EE9F-1240-4AF1-BF21-7F451B7859E5}.Debug|Any CPU.Build.0 = Debug|Any CPU {AE81EE9F-1240-4AF1-BF21-7F451B7859E5}.Release|Any CPU.ActiveCfg = Release|Any CPU {AE81EE9F-1240-4AF1-BF21-7F451B7859E5}.Release|Any CPU.Build.0 = Release|Any CPU + {2074D793-BE72-4128-BD17-6EF83FD69DD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2074D793-BE72-4128-BD17-6EF83FD69DD1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2074D793-BE72-4128-BD17-6EF83FD69DD1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2074D793-BE72-4128-BD17-6EF83FD69DD1}.Release|Any CPU.Build.0 = Release|Any CPU + {305658CF-339B-486F-B58E-C85A31831527}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {305658CF-339B-486F-B58E-C85A31831527}.Debug|Any CPU.Build.0 = Debug|Any CPU + {305658CF-339B-486F-B58E-C85A31831527}.Release|Any CPU.ActiveCfg = Release|Any CPU + {305658CF-339B-486F-B58E-C85A31831527}.Release|Any CPU.Build.0 = Release|Any CPU + {B8A268C9-A2CD-479E-B03E-2B405F88D070}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B8A268C9-A2CD-479E-B03E-2B405F88D070}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B8A268C9-A2CD-479E-B03E-2B405F88D070}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B8A268C9-A2CD-479E-B03E-2B405F88D070}.Release|Any CPU.Build.0 = Release|Any CPU + {B4573176-B36D-4621-9791-77D4508330A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B4573176-B36D-4621-9791-77D4508330A4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B4573176-B36D-4621-9791-77D4508330A4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B4573176-B36D-4621-9791-77D4508330A4}.Release|Any CPU.Build.0 = Release|Any CPU + {4F94EABD-404C-496C-BC15-3EE87F6E6B59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4F94EABD-404C-496C-BC15-3EE87F6E6B59}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4F94EABD-404C-496C-BC15-3EE87F6E6B59}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4F94EABD-404C-496C-BC15-3EE87F6E6B59}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -78,9 +110,16 @@ Global {FD274A80-0D68-48A0-9AC7-279C9E69BC63} = {111B1B5B-A004-4C05-9A8C-E0931DADA5FB} {F59F4FD7-EA00-47EA-A09A-6F76CB079F9B} = {85204CF5-0C88-4BBB-9E70-D8CCED82ED3D} {CD96AFE9-0F7F-42FA-BBDA-F57EDCBB4609} = {85204CF5-0C88-4BBB-9E70-D8CCED82ED3D} - {965D1F05-364B-4F4B-B43C-442BC933CC9C} = {399BE36D-F2D9-420A-AA09-455D4BF52057} {394FA814-CF72-447D-AAE1-1B92CD63205D} = {399BE36D-F2D9-420A-AA09-455D4BF52057} {25495BDC-0614-4FAC-B6EA-DF3F0E35A871} = {399BE36D-F2D9-420A-AA09-455D4BF52057} + {2074D793-BE72-4128-BD17-6EF83FD69DD1} = {C28129A1-6D6F-4B06-B1FA-ADD0A6DFA7C2} + {305658CF-339B-486F-B58E-C85A31831527} = {C28129A1-6D6F-4B06-B1FA-ADD0A6DFA7C2} + {C28129A1-6D6F-4B06-B1FA-ADD0A6DFA7C2} = {C57F8858-D3FE-4C08-8D13-DDFCD82350EC} + {B8A268C9-A2CD-479E-B03E-2B405F88D070} = {5B944921-2830-43CF-92C2-11D6FDAD14B9} + {B4573176-B36D-4621-9791-77D4508330A4} = {5B944921-2830-43CF-92C2-11D6FDAD14B9} + {5B944921-2830-43CF-92C2-11D6FDAD14B9} = {C57F8858-D3FE-4C08-8D13-DDFCD82350EC} + {4F94EABD-404C-496C-BC15-3EE87F6E6B59} = {C0815C13-99E8-44C2-B35F-31E22A3DA527} + {C0815C13-99E8-44C2-B35F-31E22A3DA527} = {C57F8858-D3FE-4C08-8D13-DDFCD82350EC} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {25036AEF-71B3-4C8A-891F-0350414F9A23} diff --git a/src/libraries/System.Threading.RateLimiting/src/CompatibilitySuppressions.xml b/src/libraries/System.Threading.RateLimiting/src/CompatibilitySuppressions.xml new file mode 100644 index 00000000000000..2f8c2d4809c8f1 --- /dev/null +++ b/src/libraries/System.Threading.RateLimiting/src/CompatibilitySuppressions.xml @@ -0,0 +1,32 @@ + + + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.Threading.RateLimiting.dll + lib/netstandard2.0/System.Threading.RateLimiting.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net6.0/System.Threading.RateLimiting.dll + right + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.Threading.RateLimiting.dll + lib/netstandard2.0/System.Threading.RateLimiting.dll + true + + + CP1002 + System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + lib/net7.0/System.Threading.RateLimiting.dll + right + true + + \ 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 7131b4fe1d7999..6b5a4014990ef0 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 @@ -156,17 +156,8 @@ protected override ValueTask AcquireAsyncCore(int permitCount, C Debug.Assert(_queueCount >= 0); if (!oldestRequest.TrySetResult(FailedLease)) { - if (!oldestRequest.QueueCountModified) - { - // We already updated the queue count, the Cancel code is about to run or running and waiting on our lock, - // tell Cancel not to do anything - oldestRequest.QueueCountModified = true; - } - else - { - // Updating queue count was handled by the cancellation code, don't double count - _queueCount += oldestRequest.Count; - } + // Updating queue count is handled by the cancellation code + _queueCount += oldestRequest.Count; } else { @@ -286,19 +277,10 @@ private void Release(int releaseCount) // Check if request was canceled if (!nextPendingRequest.TrySetResult(lease)) { - // Queued item was canceled so add count back, permits weren't acquired + // Queued item was canceled so add count back _permitCount += nextPendingRequest.Count; - if (!nextPendingRequest.QueueCountModified) - { - // We already updated the queue count, the Cancel code is about to run or running and waiting on our lock, - // tell Cancel not to do anything - nextPendingRequest.QueueCountModified = true; - } - else - { - // Updating queue count was handled by the cancellation code, don't double count - _queueCount += nextPendingRequest.Count; - } + // Updating queue count is handled by the cancellation code + _queueCount += nextPendingRequest.Count; } else { @@ -417,9 +399,6 @@ private sealed class RequestRegistration : TaskCompletionSource private readonly CancellationToken _cancellationToken; private CancellationTokenRegistration _cancellationTokenRegistration; - // Update under the limiter lock and only if the queue count was updated by the calling code - public bool QueueCountModified { get; set; } - // this field is used only by the disposal mechanics and never shared between threads private RequestRegistration? _next; @@ -450,14 +429,7 @@ private static void Cancel(object? state) var limiter = (ConcurrencyLimiter)registration.Task.AsyncState!; lock (limiter.Lock) { - // Queuing and replenishing code might modify the _queueCount, since there is no guarantee of when the cancellation - // code runs and we only want to update the _queueCount once, we set a bool (under a lock) so either method - // can update the count and not double count. - if (!registration.QueueCountModified) - { - limiter._queueCount -= registration.Count; - registration.QueueCountModified = true; - } + limiter._queueCount -= registration.Count; } } } 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 daaed9cf5ce422..d09c7973b18aa7 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 @@ -173,17 +173,7 @@ protected override ValueTask AcquireAsyncCore(int permitCount, C Debug.Assert(_queueCount >= 0); if (!oldestRequest.TrySetResult(FailedLease)) { - if (!oldestRequest.QueueCountModified) - { - // We already updated the queue count, the Cancel code is about to run or running and waiting on our lock, - // tell Cancel not to do anything - oldestRequest.QueueCountModified = true; - } - else - { - // Updating queue count was handled by the cancellation code, don't double count - _queueCount += oldestRequest.Count; - } + _queueCount += oldestRequest.Count; } else { @@ -340,19 +330,10 @@ private void ReplenishInternal(long nowTicks) if (!nextPendingRequest.TrySetResult(SuccessfulLease)) { - // Queued item was canceled so add count back, permits weren't acquired + // Queued item was canceled so add count back _permitCount += nextPendingRequest.Count; - if (!nextPendingRequest.QueueCountModified) - { - // We already updated the queue count, the Cancel code is about to run or running and waiting on our lock, - // tell Cancel not to do anything - nextPendingRequest.QueueCountModified = true; - } - else - { - // Updating queue count was handled by the cancellation code, don't double count - _queueCount += nextPendingRequest.Count; - } + // Updating queue count is handled by the cancellation code + _queueCount += nextPendingRequest.Count; } else { @@ -454,9 +435,6 @@ private sealed class RequestRegistration : TaskCompletionSource private readonly CancellationToken _cancellationToken; private CancellationTokenRegistration _cancellationTokenRegistration; - // Update under the limiter lock and only if the queue count was updated by the calling code - public bool QueueCountModified { get; set; } - // this field is used only by the disposal mechanics and never shared between threads private RequestRegistration? _next; @@ -487,14 +465,7 @@ private static void Cancel(object? state) var limiter = (FixedWindowRateLimiter)registration.Task.AsyncState!; lock (limiter.Lock) { - // Queuing and replenishing code might modify the _queueCount, since there is no guarantee of when the cancellation - // code runs and we only want to update the _queueCount once, we set a bool (under a lock) so either method - // can update the count and not double count. - if (!registration.QueueCountModified) - { - limiter._queueCount -= registration.Count; - registration.QueueCountModified = true; - } + limiter._queueCount -= registration.Count; } } } 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 23dbf98e0fcdea..a179720ede33fa 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 @@ -185,17 +185,7 @@ protected override ValueTask AcquireAsyncCore(int permitCount, C Debug.Assert(_queueCount >= 0); if (!oldestRequest.TrySetResult(FailedLease)) { - if (!oldestRequest.QueueCountModified) - { - // We already updated the queue count, the Cancel code is about to run or running and waiting on our lock, - // tell Cancel not to do anything - oldestRequest.QueueCountModified = true; - } - else - { - // Updating queue count was handled by the cancellation code, don't double count - _queueCount += oldestRequest.Count; - } + _queueCount += oldestRequest.Count; } else { @@ -352,20 +342,11 @@ private void ReplenishInternal(long nowTicks) if (!nextPendingRequest.TrySetResult(SuccessfulLease)) { - // Queued item was canceled so add count back, permits weren't acquired + // Queued item was canceled so add count back _permitCount += nextPendingRequest.Count; _requestsPerSegment[_currentSegmentIndex] -= nextPendingRequest.Count; - if (!nextPendingRequest.QueueCountModified) - { - // We already updated the queue count, the Cancel code is about to run or running and waiting on our lock, - // tell Cancel not to do anything - nextPendingRequest.QueueCountModified = true; - } - else - { - // Updating queue count was handled by the cancellation code, don't double count - _queueCount += nextPendingRequest.Count; - } + // Updating queue count is handled by the cancellation code + _queueCount += nextPendingRequest.Count; } else { @@ -467,9 +448,6 @@ private sealed class RequestRegistration : TaskCompletionSource private readonly CancellationToken _cancellationToken; private CancellationTokenRegistration _cancellationTokenRegistration; - // Update under the limiter lock and only if the queue count was updated by the calling code - public bool QueueCountModified { get; set; } - // this field is used only by the disposal mechanics and never shared between threads private RequestRegistration? _next; @@ -500,14 +478,7 @@ private static void Cancel(object? state) var limiter = (SlidingWindowRateLimiter)registration.Task.AsyncState!; lock (limiter.Lock) { - // Queuing and replenishing code might modify the _queueCount, since there is no guarantee of when the cancellation - // code runs and we only want to update the _queueCount once, we set a bool (under a lock) so either method - // can update the count and not double count. - if (!registration.QueueCountModified) - { - limiter._queueCount -= registration.Count; - registration.QueueCountModified = true; - } + limiter._queueCount -= registration.Count; } } } 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 67a3a55a29ad03..5ad7859792ff7f 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 @@ -178,17 +178,8 @@ protected override ValueTask AcquireAsyncCore(int tokenCount, Ca Debug.Assert(_queueCount >= 0); if (!oldestRequest.TrySetResult(FailedLease)) { - if (!oldestRequest.QueueCountModified) - { - // We already updated the queue count, the Cancel code is about to run or running and waiting on our lock, - // tell Cancel not to do anything - oldestRequest.QueueCountModified = true; - } - else - { - // Updating queue count was handled by the cancellation code, don't double count - _queueCount += oldestRequest.Count; - } + // Updating queue count is handled by the cancellation code + _queueCount += oldestRequest.Count; } else { @@ -354,19 +345,10 @@ private void ReplenishInternal(long nowTicks) if (!nextPendingRequest.TrySetResult(SuccessfulLease)) { - // Queued item was canceled so add count back, permits weren't acquired + // Queued item was canceled so add count back _tokenCount += nextPendingRequest.Count; - if (!nextPendingRequest.QueueCountModified) - { - // We already updated the queue count, the Cancel code is about to run or running and waiting on our lock, - // tell Cancel not to do anything - nextPendingRequest.QueueCountModified = true; - } - else - { - // Updating queue count was handled by the cancellation code, don't double count - _queueCount += nextPendingRequest.Count; - } + // Updating queue count is handled by the cancellation code + _queueCount += nextPendingRequest.Count; } else { @@ -468,9 +450,6 @@ private sealed class RequestRegistration : TaskCompletionSource private readonly CancellationToken _cancellationToken; private CancellationTokenRegistration _cancellationTokenRegistration; - // Update under the limiter lock and only if the queue count was updated by the calling code - public bool QueueCountModified { get; set; } - // this field is used only by the disposal mechanics and never shared between threads private RequestRegistration? _next; @@ -501,14 +480,7 @@ private static void Cancel(object? state) var limiter = (TokenBucketRateLimiter)registration.Task.AsyncState!; lock (limiter.Lock) { - // Queuing and replenishing code might modify the _queueCount, since there is no guarantee of when the cancellation - // code runs and we only want to update the _queueCount once, we set a bool (under a lock) so either method - // can update the count and not double count. - if (!registration.QueueCountModified) - { - limiter._queueCount -= registration.Count; - registration.QueueCountModified = true; - } + limiter._queueCount -= registration.Count; } } } diff --git a/src/libraries/System.Threading.Tasks.Dataflow/System.Threading.Tasks.Dataflow.sln b/src/libraries/System.Threading.Tasks.Dataflow/System.Threading.Tasks.Dataflow.sln index b35a72dec43ef8..cb2cf47a201860 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/System.Threading.Tasks.Dataflow.sln +++ b/src/libraries/System.Threading.Tasks.Dataflow/System.Threading.Tasks.Dataflow.sln @@ -1,8 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{48428161-C841-43D4-8BD3-195A3D5C36C5}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{D32DCB14-03AA-4F31-B5C8-C8512BB3CDB6}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{986667FC-4DA5-4496-B998-7DEB9879B180}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{C4865002-095A-4B99-A737-216DC112ACA4}" @@ -15,6 +13,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.Tasks.Data EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.Tasks.Dataflow.Tests", "tests\System.Threading.Tasks.Dataflow.Tests.csproj", "{51B191E6-C503-4949-8AD0-CF338FE13ADB}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{9F1E4720-AC8C-40BD-AB5D-67C2A9426D10}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{8B8A555E-DC83-47DE-A730-D95EFC82ECBD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{6844D905-EFFE-40AC-8012-E33483780476}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{F7FA210C-6D0C-419D-A13F-C2E1F846E731}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{D2727CE8-7A93-458F-B232-4B470E1BB598}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{D7C6E667-E868-423C-883D-CBDE73BFF66E}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{AA3208A1-2A91-46D3-B09C-1A9CCF90235E}" @@ -23,6 +31,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{E6ED6A93-597 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D4D4FFCB-0DAF-4CDC-8945-7B31D2197D66}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{AF7C2885-ABE5-4636-B583-5F40FBB47B3A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{B3784B87-6E0A-41A1-B82D-05AE560F82CE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{62CAF4CA-64E5-4023-ACE0-79B3071221ED}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{7484FF57-320D-436A-B73D-6A9E436970AC}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -33,10 +49,6 @@ Global {48428161-C841-43D4-8BD3-195A3D5C36C5}.Debug|Any CPU.Build.0 = Debug|Any CPU {48428161-C841-43D4-8BD3-195A3D5C36C5}.Release|Any CPU.ActiveCfg = Release|Any CPU {48428161-C841-43D4-8BD3-195A3D5C36C5}.Release|Any CPU.Build.0 = Release|Any CPU - {D32DCB14-03AA-4F31-B5C8-C8512BB3CDB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D32DCB14-03AA-4F31-B5C8-C8512BB3CDB6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D32DCB14-03AA-4F31-B5C8-C8512BB3CDB6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D32DCB14-03AA-4F31-B5C8-C8512BB3CDB6}.Release|Any CPU.Build.0 = Release|Any CPU {986667FC-4DA5-4496-B998-7DEB9879B180}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {986667FC-4DA5-4496-B998-7DEB9879B180}.Debug|Any CPU.Build.0 = Debug|Any CPU {986667FC-4DA5-4496-B998-7DEB9879B180}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -61,6 +73,26 @@ Global {51B191E6-C503-4949-8AD0-CF338FE13ADB}.Debug|Any CPU.Build.0 = Debug|Any CPU {51B191E6-C503-4949-8AD0-CF338FE13ADB}.Release|Any CPU.ActiveCfg = Release|Any CPU {51B191E6-C503-4949-8AD0-CF338FE13ADB}.Release|Any CPU.Build.0 = Release|Any CPU + {9F1E4720-AC8C-40BD-AB5D-67C2A9426D10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9F1E4720-AC8C-40BD-AB5D-67C2A9426D10}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9F1E4720-AC8C-40BD-AB5D-67C2A9426D10}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9F1E4720-AC8C-40BD-AB5D-67C2A9426D10}.Release|Any CPU.Build.0 = Release|Any CPU + {8B8A555E-DC83-47DE-A730-D95EFC82ECBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8B8A555E-DC83-47DE-A730-D95EFC82ECBD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8B8A555E-DC83-47DE-A730-D95EFC82ECBD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8B8A555E-DC83-47DE-A730-D95EFC82ECBD}.Release|Any CPU.Build.0 = Release|Any CPU + {6844D905-EFFE-40AC-8012-E33483780476}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6844D905-EFFE-40AC-8012-E33483780476}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6844D905-EFFE-40AC-8012-E33483780476}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6844D905-EFFE-40AC-8012-E33483780476}.Release|Any CPU.Build.0 = Release|Any CPU + {F7FA210C-6D0C-419D-A13F-C2E1F846E731}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F7FA210C-6D0C-419D-A13F-C2E1F846E731}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F7FA210C-6D0C-419D-A13F-C2E1F846E731}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F7FA210C-6D0C-419D-A13F-C2E1F846E731}.Release|Any CPU.Build.0 = Release|Any CPU + {D2727CE8-7A93-458F-B232-4B470E1BB598}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D2727CE8-7A93-458F-B232-4B470E1BB598}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D2727CE8-7A93-458F-B232-4B470E1BB598}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D2727CE8-7A93-458F-B232-4B470E1BB598}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -68,12 +100,19 @@ Global GlobalSection(NestedProjects) = preSolution {48428161-C841-43D4-8BD3-195A3D5C36C5} = {D7C6E667-E868-423C-883D-CBDE73BFF66E} {51B191E6-C503-4949-8AD0-CF338FE13ADB} = {D7C6E667-E868-423C-883D-CBDE73BFF66E} - {D32DCB14-03AA-4F31-B5C8-C8512BB3CDB6} = {AA3208A1-2A91-46D3-B09C-1A9CCF90235E} {986667FC-4DA5-4496-B998-7DEB9879B180} = {AA3208A1-2A91-46D3-B09C-1A9CCF90235E} {C4865002-095A-4B99-A737-216DC112ACA4} = {AA3208A1-2A91-46D3-B09C-1A9CCF90235E} {784D5C28-1B02-4DF5-A95F-5F453FD96828} = {E6ED6A93-5971-4E87-972C-23E80F6E0CFC} {BD042162-B4E2-45AC-8225-699F25478852} = {E6ED6A93-5971-4E87-972C-23E80F6E0CFC} {EA4AFF05-8124-4D15-A7A3-C731C21728BB} = {D4D4FFCB-0DAF-4CDC-8945-7B31D2197D66} + {9F1E4720-AC8C-40BD-AB5D-67C2A9426D10} = {AF7C2885-ABE5-4636-B583-5F40FBB47B3A} + {8B8A555E-DC83-47DE-A730-D95EFC82ECBD} = {AF7C2885-ABE5-4636-B583-5F40FBB47B3A} + {AF7C2885-ABE5-4636-B583-5F40FBB47B3A} = {7484FF57-320D-436A-B73D-6A9E436970AC} + {6844D905-EFFE-40AC-8012-E33483780476} = {B3784B87-6E0A-41A1-B82D-05AE560F82CE} + {F7FA210C-6D0C-419D-A13F-C2E1F846E731} = {B3784B87-6E0A-41A1-B82D-05AE560F82CE} + {B3784B87-6E0A-41A1-B82D-05AE560F82CE} = {7484FF57-320D-436A-B73D-6A9E436970AC} + {D2727CE8-7A93-458F-B232-4B470E1BB598} = {62CAF4CA-64E5-4023-ACE0-79B3071221ED} + {62CAF4CA-64E5-4023-ACE0-79B3071221ED} = {7484FF57-320D-436A-B73D-6A9E436970AC} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {0C9180F6-E88A-4F7E-801E-455E97B34F83} diff --git a/src/libraries/System.Threading.Tasks.Extensions/tests/System.Threading.Tasks.Extensions.Tests.csproj b/src/libraries/System.Threading.Tasks.Extensions/tests/System.Threading.Tasks.Extensions.Tests.csproj index 5264ac6137c396..44cf712d71c7c2 100644 --- a/src/libraries/System.Threading.Tasks.Extensions/tests/System.Threading.Tasks.Extensions.Tests.csproj +++ b/src/libraries/System.Threading.Tasks.Extensions/tests/System.Threading.Tasks.Extensions.Tests.csproj @@ -3,8 +3,6 @@ $(NetCoreAppCurrent) true true - - false diff --git a/src/libraries/System.Threading.Tasks.Extensions/tests/ValueTaskTests.cs b/src/libraries/System.Threading.Tasks.Extensions/tests/ValueTaskTests.cs index d93053de7d1472..e27e9b6c0503fc 100644 --- a/src/libraries/System.Threading.Tasks.Extensions/tests/ValueTaskTests.cs +++ b/src/libraries/System.Threading.Tasks.Extensions/tests/ValueTaskTests.cs @@ -1269,7 +1269,7 @@ public void NonGeneric_TornRead_DoesNotCrashOrHang() // _obj is null but other fields are from Task construction vtBoxed = new ValueTask(Task.CompletedTask); - vtBoxed.GetType().GetField("_obj", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(vtBoxed, null); + typeof(ValueTask).GetField("_obj", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(vtBoxed, null); Record.Exception(() => { bool completed = ((ValueTask)vtBoxed).IsCompleted; @@ -1278,7 +1278,7 @@ public void NonGeneric_TornRead_DoesNotCrashOrHang() // _obj is a Task but other fields are from result construction vtBoxed = new ValueTask(); - vtBoxed.GetType().GetField("_obj", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(vtBoxed, Task.CompletedTask); + typeof(ValueTask).GetField("_obj", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(vtBoxed, Task.CompletedTask); Record.Exception(() => { bool completed = ((ValueTask)vtBoxed).IsCompleted; @@ -1287,7 +1287,7 @@ public void NonGeneric_TornRead_DoesNotCrashOrHang() // _obj is an IValueTaskSource but other fields are from Task construction vtBoxed = new ValueTask(Task.CompletedTask); - vtBoxed.GetType().GetField("_obj", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(vtBoxed, ManualResetValueTaskSourceFactory.Completed(42)); + typeof(ValueTask).GetField("_obj", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(vtBoxed, ManualResetValueTaskSourceFactory.Completed(42)); Record.Exception(() => { bool completed = ((ValueTask)vtBoxed).IsCompleted; @@ -1304,7 +1304,7 @@ public void Generic_TornRead_DoesNotCrashOrHang() // _obj is null but other fields are from Task construction vtBoxed = new ValueTask(Task.FromResult(42)); - vtBoxed.GetType().GetField("_obj", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(vtBoxed, null); + typeof(ValueTask).GetField("_obj", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(vtBoxed, null); Record.Exception(() => { bool completed = ((ValueTask)vtBoxed).IsCompleted; @@ -1313,7 +1313,7 @@ public void Generic_TornRead_DoesNotCrashOrHang() // _obj is a Task but other fields are from result construction vtBoxed = new ValueTask(42); - vtBoxed.GetType().GetField("_obj", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(vtBoxed, Task.FromResult(42)); + typeof(ValueTask).GetField("_obj", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(vtBoxed, Task.FromResult(42)); Record.Exception(() => { bool completed = ((ValueTask)vtBoxed).IsCompleted; @@ -1322,7 +1322,7 @@ public void Generic_TornRead_DoesNotCrashOrHang() // _obj is an IValueTaskSource but other fields are from Task construction vtBoxed = new ValueTask(Task.FromResult(42)); - vtBoxed.GetType().GetField("_obj", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(vtBoxed, ManualResetValueTaskSourceFactory.Completed(42)); + typeof(ValueTask).GetField("_obj", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(vtBoxed, ManualResetValueTaskSourceFactory.Completed(42)); Record.Exception(() => { bool completed = ((ValueTask)vtBoxed).IsCompleted; diff --git a/src/libraries/System.Threading.Tasks.Parallel/System.Threading.Tasks.Parallel.sln b/src/libraries/System.Threading.Tasks.Parallel/System.Threading.Tasks.Parallel.sln index 79f8ceda7429e4..6a408b66654ad6 100644 --- a/src/libraries/System.Threading.Tasks.Parallel/System.Threading.Tasks.Parallel.sln +++ b/src/libraries/System.Threading.Tasks.Parallel/System.Threading.Tasks.Parallel.sln @@ -15,6 +15,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.Tasks.Para EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.Tasks.Parallel.Tests", "tests\System.Threading.Tasks.Parallel.Tests.csproj", "{87B76C5B-3A28-455A-AFCC-921FC3615135}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{D6BE1B91-9769-41CE-BC37-DEA7B00DD2D6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{90415C80-6EA6-4410-9A48-2D18BD6DA8E2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{740891AD-E810-4E48-8D09-56B06A2F0A40}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{137439ED-2A4C-4A92-B231-85A7769A19F3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{DAD04B5A-659C-4F01-91F8-A9B56B619356}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{1BA41F95-8D9C-4C12-8A3A-9D31B27566E8}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{FBC5E558-FC17-4C58-B7F7-798E7CD58448}" @@ -23,6 +33,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{6D758B5C-C40 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A17071C3-99D6-40FF-947C-A15A9695FA91}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{8AD6A92E-4DF4-4C27-9A88-22AA03AEB40B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{2D0F222E-2CAA-460A-B2C2-AE5966DA9D5A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{8BC3A01B-5248-43F3-A74B-B3759A7ECEC0}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{DABEB591-8150-4990-894C-F1AAD7B31367}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -61,6 +79,26 @@ Global {87B76C5B-3A28-455A-AFCC-921FC3615135}.Debug|Any CPU.Build.0 = Debug|Any CPU {87B76C5B-3A28-455A-AFCC-921FC3615135}.Release|Any CPU.ActiveCfg = Release|Any CPU {87B76C5B-3A28-455A-AFCC-921FC3615135}.Release|Any CPU.Build.0 = Release|Any CPU + {D6BE1B91-9769-41CE-BC37-DEA7B00DD2D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D6BE1B91-9769-41CE-BC37-DEA7B00DD2D6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D6BE1B91-9769-41CE-BC37-DEA7B00DD2D6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D6BE1B91-9769-41CE-BC37-DEA7B00DD2D6}.Release|Any CPU.Build.0 = Release|Any CPU + {90415C80-6EA6-4410-9A48-2D18BD6DA8E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {90415C80-6EA6-4410-9A48-2D18BD6DA8E2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {90415C80-6EA6-4410-9A48-2D18BD6DA8E2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {90415C80-6EA6-4410-9A48-2D18BD6DA8E2}.Release|Any CPU.Build.0 = Release|Any CPU + {740891AD-E810-4E48-8D09-56B06A2F0A40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {740891AD-E810-4E48-8D09-56B06A2F0A40}.Debug|Any CPU.Build.0 = Debug|Any CPU + {740891AD-E810-4E48-8D09-56B06A2F0A40}.Release|Any CPU.ActiveCfg = Release|Any CPU + {740891AD-E810-4E48-8D09-56B06A2F0A40}.Release|Any CPU.Build.0 = Release|Any CPU + {137439ED-2A4C-4A92-B231-85A7769A19F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {137439ED-2A4C-4A92-B231-85A7769A19F3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {137439ED-2A4C-4A92-B231-85A7769A19F3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {137439ED-2A4C-4A92-B231-85A7769A19F3}.Release|Any CPU.Build.0 = Release|Any CPU + {DAD04B5A-659C-4F01-91F8-A9B56B619356}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DAD04B5A-659C-4F01-91F8-A9B56B619356}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DAD04B5A-659C-4F01-91F8-A9B56B619356}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DAD04B5A-659C-4F01-91F8-A9B56B619356}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -74,6 +112,14 @@ Global {135CC435-FD9E-4CE9-AFB9-593B105FBAFC} = {6D758B5C-C40A-4179-898E-B459165BF692} {D0267433-C793-4450-94A0-1750388CE9CB} = {6D758B5C-C40A-4179-898E-B459165BF692} {8F1FE81C-C15D-459A-8758-8B0853078EA7} = {A17071C3-99D6-40FF-947C-A15A9695FA91} + {D6BE1B91-9769-41CE-BC37-DEA7B00DD2D6} = {8AD6A92E-4DF4-4C27-9A88-22AA03AEB40B} + {90415C80-6EA6-4410-9A48-2D18BD6DA8E2} = {8AD6A92E-4DF4-4C27-9A88-22AA03AEB40B} + {8AD6A92E-4DF4-4C27-9A88-22AA03AEB40B} = {DABEB591-8150-4990-894C-F1AAD7B31367} + {740891AD-E810-4E48-8D09-56B06A2F0A40} = {2D0F222E-2CAA-460A-B2C2-AE5966DA9D5A} + {137439ED-2A4C-4A92-B231-85A7769A19F3} = {2D0F222E-2CAA-460A-B2C2-AE5966DA9D5A} + {2D0F222E-2CAA-460A-B2C2-AE5966DA9D5A} = {DABEB591-8150-4990-894C-F1AAD7B31367} + {DAD04B5A-659C-4F01-91F8-A9B56B619356} = {8BC3A01B-5248-43F3-A74B-B3759A7ECEC0} + {8BC3A01B-5248-43F3-A74B-B3759A7ECEC0} = {DABEB591-8150-4990-894C-F1AAD7B31367} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C94E269F-E48E-43B3-96D7-BB5D57A29820} diff --git a/src/libraries/System.Threading.Tasks.Parallel/tests/ParallelForEachAsyncTests.cs b/src/libraries/System.Threading.Tasks.Parallel/tests/ParallelForEachAsyncTests.cs index 5708643c1d28f0..e3d6a6859c0df4 100644 --- a/src/libraries/System.Threading.Tasks.Parallel/tests/ParallelForEachAsyncTests.cs +++ b/src/libraries/System.Threading.Tasks.Parallel/tests/ParallelForEachAsyncTests.cs @@ -293,6 +293,7 @@ static IEnumerable IterateUntilSet(StrongBox box) } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task Dop_NegativeTaskSchedulerLimitTreatedAsDefault_Async() { static async IAsyncEnumerable IterateUntilSet(StrongBox box) @@ -327,6 +328,7 @@ static async IAsyncEnumerable IterateUntilSet(StrongBox box) } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task RunsAsynchronously_For() { var cts = new CancellationTokenSource(); @@ -340,6 +342,7 @@ public async Task RunsAsynchronously_For() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task RunsAsynchronously_EvenForEntirelySynchronousWork_Sync() { static IEnumerable Iterate() @@ -358,6 +361,7 @@ static IEnumerable Iterate() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task RunsAsynchronously_EvenForEntirelySynchronousWork_Async() { #pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously @@ -378,6 +382,7 @@ static async IAsyncEnumerable IterateAsync() } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [InlineData(-1)] [InlineData(1)] [InlineData(2)] @@ -417,6 +422,7 @@ static async IAsyncEnumerable IterateUntilSetAsync(StrongBox box) } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void EmptyRange_For() { int counter = 0; @@ -431,6 +437,7 @@ public void EmptyRange_For() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task EmptySource_Sync() { int counter = 0; @@ -444,6 +451,7 @@ await Parallel.ForEachAsync(Enumerable.Range(0, 0), (item, cancellationToken) => } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task EmptySource_Async() { int counter = 0; @@ -457,6 +465,7 @@ await Parallel.ForEachAsync(EnumerableRangeAsync(0, 0), (item, cancellationToken } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [InlineData(false)] [InlineData(true)] public async Task AllItemsEnumeratedOnce_For(bool yield) @@ -502,6 +511,7 @@ await Parallel.ForAsync(T.CreateTruncating(Start), T.CreateTruncating(Start + Co } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [InlineData(false)] [InlineData(true)] public async Task AllItemsEnumeratedOnce_Sync(bool yield) @@ -532,6 +542,7 @@ await Parallel.ForEachAsync(Enumerable.Range(Start, Count), async (item, cancell } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [InlineData(false)] [InlineData(true)] public async Task AllItemsEnumeratedOnce_Async(bool yield) @@ -562,6 +573,7 @@ await Parallel.ForEachAsync(EnumerableRangeAsync(Start, Count, yield), async (it } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [InlineData(false)] [InlineData(true)] public async Task TaskScheduler_AllCodeExecutedOnCorrectScheduler_For(bool defaultScheduler) @@ -590,6 +602,7 @@ public async Task TaskScheduler_AllCodeExecutedOnCorrectScheduler_For(bool defau } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [InlineData(false)] [InlineData(true)] public async Task TaskScheduler_AllCodeExecutedOnCorrectScheduler_Sync(bool defaultScheduler) @@ -628,6 +641,7 @@ IEnumerable Iterate() } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [InlineData(false)] [InlineData(true)] public async Task TaskScheduler_AllCodeExecutedOnCorrectScheduler_Async(bool defaultScheduler) @@ -667,6 +681,7 @@ async IAsyncEnumerable Iterate() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task Cancellation_CancelsIterationAndReturnsCanceledTask_For() { using var cts = new CancellationTokenSource(10); @@ -699,6 +714,7 @@ static async IAsyncEnumerable Infinite() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task Cancellation_CancelsIterationAndReturnsCanceledTask_Async() { static async IAsyncEnumerable InfiniteAsync() @@ -720,6 +736,7 @@ static async IAsyncEnumerable InfiniteAsync() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task Cancellation_CorrectTokenPassedToAsyncEnumerator() { static async IAsyncEnumerable YieldTokenAsync([EnumeratorCancellation] CancellationToken cancellationToken) @@ -736,6 +753,7 @@ await Parallel.ForEachAsync(YieldTokenAsync(default), (item, cancellationToken) } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task Cancellation_SameTokenPassedToEveryInvocation_For() { var cq = new ConcurrentQueue(); @@ -751,6 +769,7 @@ await Parallel.ForAsync(1, 101, async (item, cancellationToken) => } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task Cancellation_SameTokenPassedToEveryInvocation_Sync() { var cq = new ConcurrentQueue(); @@ -766,6 +785,7 @@ await Parallel.ForEachAsync(Enumerable.Range(1, 100), async (item, cancellationT } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task Cancellation_SameTokenPassedToEveryInvocation_Async() { var cq = new ConcurrentQueue(); @@ -781,6 +801,7 @@ await Parallel.ForEachAsync(EnumerableRangeAsync(1, 100), async (item, cancellat } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task Cancellation_HasPriorityOverExceptions_For() { var tcs = new TaskCompletionSource(); @@ -807,6 +828,7 @@ public async Task Cancellation_HasPriorityOverExceptions_For() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task Cancellation_HasPriorityOverExceptions_Sync() { static IEnumerable Iterate() @@ -839,6 +861,7 @@ static IEnumerable Iterate() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task Cancellation_HasPriorityOverExceptions_Async() { static async IAsyncEnumerable Iterate() @@ -875,6 +898,7 @@ static async IAsyncEnumerable Iterate() } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [InlineData(false)] [InlineData(true)] public async Task Cancellation_FaultsForOceForNonCancellation_For(bool internalToken) @@ -891,6 +915,7 @@ public async Task Cancellation_FaultsForOceForNonCancellation_For(bool internalT } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [InlineData(false)] [InlineData(true)] public async Task Cancellation_FaultsForOceForNonCancellation(bool internalToken) @@ -917,6 +942,7 @@ static async IAsyncEnumerable Iterate() } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [InlineData(0, 4)] [InlineData(1, 4)] [InlineData(2, 4)] @@ -949,6 +975,7 @@ public async Task Cancellation_InternalCancellationExceptionsArentFilteredOut_Fo } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [InlineData(0, 4)] [InlineData(1, 4)] [InlineData(2, 4)] @@ -981,6 +1008,7 @@ public async Task Cancellation_InternalCancellationExceptionsArentFilteredOut(in } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void Exception_FromGetEnumerator_Sync() { Task t = Parallel.ForEachAsync((IEnumerable)new ThrowsFromGetEnumerator(), (item, cancellationToken) => default); @@ -990,6 +1018,7 @@ public void Exception_FromGetEnumerator_Sync() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void Exception_FromGetEnumerator_Async() { Task t = Parallel.ForEachAsync((IAsyncEnumerable)new ThrowsFromGetEnumerator(), (item, cancellationToken) => default); @@ -999,6 +1028,7 @@ public void Exception_FromGetEnumerator_Async() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void Exception_NullFromGetEnumerator_Sync() { Task t = Parallel.ForEachAsync((IEnumerable)new ReturnsNullFromGetEnumerator(), (item, cancellationToken) => default); @@ -1008,6 +1038,7 @@ public void Exception_NullFromGetEnumerator_Sync() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void Exception_NullFromGetEnumerator_Async() { Task t = Parallel.ForEachAsync((IAsyncEnumerable)new ReturnsNullFromGetEnumerator(), (item, cancellationToken) => default); @@ -1017,6 +1048,7 @@ public void Exception_NullFromGetEnumerator_Async() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task Exception_FromMoveNext_Sync() { static IEnumerable Iterate() @@ -1037,6 +1069,7 @@ static IEnumerable Iterate() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task Exception_FromMoveNext_Async() { static async IAsyncEnumerable Iterate() @@ -1058,6 +1091,7 @@ static async IAsyncEnumerable Iterate() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task Exception_FromLoopBody_For() { var barrier = new Barrier(2); @@ -1079,6 +1113,7 @@ public async Task Exception_FromLoopBody_For() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task Exception_FromLoopBody_Sync() { static IEnumerable Iterate() @@ -1106,6 +1141,7 @@ static IEnumerable Iterate() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task Exception_FromLoopBody_Async() { static async IAsyncEnumerable Iterate() @@ -1147,6 +1183,7 @@ static async IAsyncEnumerable Iterate() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task Exception_FromDispose_Sync() { Task t = Parallel.ForEachAsync((IEnumerable)new ThrowsExceptionFromDispose(), (item, cancellationToken) => default); @@ -1155,6 +1192,7 @@ public async Task Exception_FromDispose_Sync() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task Exception_FromDispose_Async() { Task t = Parallel.ForEachAsync((IAsyncEnumerable)new ThrowsExceptionFromDispose(), (item, cancellationToken) => default); @@ -1163,6 +1201,7 @@ public async Task Exception_FromDispose_Async() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task Exception_FromDisposeAndCancellationCallback_Sync() { Task t = Parallel.ForEachAsync((IEnumerable)new ThrowsExceptionFromDisposeAndCancellationCallback(), (item, cancellationToken) => default); @@ -1172,6 +1211,7 @@ public async Task Exception_FromDisposeAndCancellationCallback_Sync() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task Exception_FromDisposeAndCancellationCallback_Async() { Task t = Parallel.ForEachAsync((IAsyncEnumerable)new ThrowsExceptionFromDisposeAndCancellationCallback(), (item, cancellationToken) => default); @@ -1181,6 +1221,7 @@ public async Task Exception_FromDisposeAndCancellationCallback_Async() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task Exception_ImplicitlyCancelsOtherWorkers_For() { await Assert.ThrowsAsync(() => Parallel.ForAsync(0, long.MaxValue, async (item, cancellationToken) => @@ -1209,6 +1250,7 @@ await Assert.ThrowsAsync(() => Parallel.ForAsync(0, long.MaxValue, as } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task Exception_ImplicitlyCancelsOtherWorkers_Sync() { static IEnumerable Iterate() @@ -1314,6 +1356,7 @@ static async IAsyncEnumerable Iterate(Task signal) } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [InlineData(false)] [InlineData(true)] public async Task ExecutionContext_FlowsToWorkerBodies_For(bool defaultScheduler) @@ -1332,6 +1375,7 @@ await Parallel.ForAsync(0, 100, async (item, cancellationToken) => } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [InlineData(false)] [InlineData(true)] public async Task ExecutionContext_FlowsToWorkerBodies_Sync(bool defaultScheduler) diff --git a/src/libraries/System.Threading.Tasks.Parallel/tests/ParallelForTests.cs b/src/libraries/System.Threading.Tasks.Parallel/tests/ParallelForTests.cs index 399ba8c63f5e27..39f1e2bb49822d 100644 --- a/src/libraries/System.Threading.Tasks.Parallel/tests/ParallelForTests.cs +++ b/src/libraries/System.Threading.Tasks.Parallel/tests/ParallelForTests.cs @@ -289,6 +289,7 @@ public static void RunSimpleParallelDoTest(int increms) [InlineData(1024)] [InlineData(1024 * 1024)] [InlineData(1024 * 1024 * 16)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void RunSimpleParallelForIncrementTest(int increms) { // Just increments a shared counter in a loop. @@ -319,6 +320,7 @@ public static void RunSimpleParallelForIncrementTest(int increms) } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [InlineData(-1)] [InlineData(0)] [InlineData(1)] @@ -452,6 +454,7 @@ public static void SequentialFor64ParityTest(long inclusiveFrom, long exclusiveT } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [InlineData(0)] [InlineData(1)] [InlineData(1024)] @@ -481,6 +484,7 @@ public static void RunSimpleParallelForeachAddTest_Enumerable(int count) } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [InlineData(0)] [InlineData(1)] [InlineData(1024)] @@ -511,6 +515,7 @@ public static void RunSimpleParallelForeachAddTest_List(int count) } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [InlineData(0)] [InlineData(1)] [InlineData(1024)] @@ -541,6 +546,7 @@ public static void RunSimpleParallelForeachAddTest_Array(int count) } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [InlineData(0)] [InlineData(1)] [InlineData(1024)] @@ -572,6 +578,7 @@ public static void RunSimpleParallelForAverageAggregation(int count) } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [InlineData(0)] [InlineData(1)] [InlineData(1024)] @@ -711,6 +718,7 @@ public static void TestParallelForDOP() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void TestParallelForPaths() { int loopsize = 1000; @@ -872,6 +880,7 @@ public static void TestParallelForPaths() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void TestParallelForPaths_Exceptions() { int loopsize = 1000; @@ -885,6 +894,7 @@ public static void TestParallelForPaths_Exceptions() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91582", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void TestParallelScheduler() { ParallelOptions parallelOptions = new ParallelOptions(); @@ -992,6 +1002,7 @@ public static void TestParallelScheduler() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void TestInvokeDOPAndCancel() { ParallelOptions parallelOptions = null; @@ -1109,6 +1120,7 @@ public static void TestInvokeDOPAndCancel() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void RunParallelLoopCancellationTests() { int counter = 0; // Counts the actual number of iterations @@ -1211,6 +1223,7 @@ public static void RunParallelLoopCancellationTests() /// Test to ensure that the task ID can be accessed from inside the task /// [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91583", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void TaskIDFromExternalContextTest() { int? withinTaskId = int.MinValue; @@ -1242,6 +1255,7 @@ private static void VerifyCancelTestState( } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void CancelForIntTest() { for (int i = 0; i < 100; ++i) @@ -1276,6 +1290,7 @@ public static void CancelForIntTest() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void CancelForLongTest() { for (int i = 0; i < 100; ++i) @@ -1317,6 +1332,7 @@ public static IEnumerable CancelForEachTest_MemberData() } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [MemberData(nameof(CancelForEachTest_MemberData))] public static void CancelForEachTest(IEnumerable enumerable) { diff --git a/src/libraries/System.Threading.Tasks.Parallel/tests/ParallelLoopResultTests.cs b/src/libraries/System.Threading.Tasks.Parallel/tests/ParallelLoopResultTests.cs index 430eabdfa01bb7..9006ee9469fc6e 100644 --- a/src/libraries/System.Threading.Tasks.Parallel/tests/ParallelLoopResultTests.cs +++ b/src/libraries/System.Threading.Tasks.Parallel/tests/ParallelLoopResultTests.cs @@ -373,6 +373,7 @@ private static void OrderablePartitionerForEachPLRTest( // Perform tests on various combinations of Stop()/Break() [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91579", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void SimultaneousStopBreakTests() { // diff --git a/src/libraries/System.Threading.Tasks.Parallel/tests/RangePartitioner1Chunk.cs b/src/libraries/System.Threading.Tasks.Parallel/tests/RangePartitioner1Chunk.cs index b7eece1c2de61d..02695b75242409 100644 --- a/src/libraries/System.Threading.Tasks.Parallel/tests/RangePartitioner1Chunk.cs +++ b/src/libraries/System.Threading.Tasks.Parallel/tests/RangePartitioner1Chunk.cs @@ -101,6 +101,7 @@ static void oneMoveNext(int length, bool isOrderable) /// /// [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void IterationsWithDependency() { static void iterationsWithDependency(int length, int dependencyIndex) @@ -166,6 +167,7 @@ public static void PFEDisposeEnum() /// Exception is expected and the enumerators are disposed /// [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91581", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void ExceptionOnMoveNext() { static void exceptionOnMoveNext(int length, int indexToThrow, bool isOrderable) diff --git a/src/libraries/System.Threading.Tasks.Parallel/tests/RangePartitionerTests.cs b/src/libraries/System.Threading.Tasks.Parallel/tests/RangePartitionerTests.cs index 87e427d0837ece..3302c9b3b73831 100644 --- a/src/libraries/System.Threading.Tasks.Parallel/tests/RangePartitionerTests.cs +++ b/src/libraries/System.Threading.Tasks.Parallel/tests/RangePartitionerTests.cs @@ -10,6 +10,7 @@ namespace System.Threading.Tasks.Tests public static class RangePartitionerTests { [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void RunPartitionerStaticTest_SingleChunking() { CountdownEvent cde = new CountdownEvent(2); diff --git a/src/libraries/System.Threading.Tasks/tests/System.Threading.Tasks.Tests.csproj b/src/libraries/System.Threading.Tasks/tests/System.Threading.Tasks.Tests.csproj index 468c31b3650f80..eb1b13766e64f9 100644 --- a/src/libraries/System.Threading.Tasks/tests/System.Threading.Tasks.Tests.csproj +++ b/src/libraries/System.Threading.Tasks/tests/System.Threading.Tasks.Tests.csproj @@ -3,8 +3,6 @@ true true $(NetCoreAppCurrent) - - false diff --git a/src/libraries/System.Threading.Tasks/tests/Task/TaskRtTests.cs b/src/libraries/System.Threading.Tasks/tests/Task/TaskRtTests.cs index f89f6d60d87305..b8e1789e2aa4b7 100644 --- a/src/libraries/System.Threading.Tasks/tests/Task/TaskRtTests.cs +++ b/src/libraries/System.Threading.Tasks/tests/Task/TaskRtTests.cs @@ -538,13 +538,13 @@ public static void RunFromResult_FaultedTask() var contingentProperties = contingentPropertiesField.GetValue(faultedTask); if (contingentProperties != null) { - var exceptionsHolderField = contingentProperties.GetType().GetField("m_exceptionsHolder", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); + var exceptionsHolderField = typeof(Task).GetNestedType("ContingentProperties", BindingFlags.NonPublic).GetField("m_exceptionsHolder", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); if (exceptionsHolderField != null) { holderObject = exceptionsHolderField.GetValue(contingentProperties); if (holderObject != null) { - isHandledField = holderObject.GetType().GetField("m_isHandled", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); + isHandledField = Type.GetType("System.Threading.Tasks.TaskExceptionHolder").GetField("m_isHandled", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); } } } diff --git a/src/libraries/System.Threading.Thread/System.Threading.Thread.sln b/src/libraries/System.Threading.Thread/System.Threading.Thread.sln index 8df7ae280c7977..ed737e9fe8168b 100644 --- a/src/libraries/System.Threading.Thread/System.Threading.Thread.sln +++ b/src/libraries/System.Threading.Thread/System.Threading.Thread.sln @@ -27,7 +27,17 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.Thread.Tes EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading", "..\System.Threading\ref\System.Threading.csproj", "{EDC3F7A0-3C48-4962-9D28-4EC6B7560F32}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{576969A4-D9EB-4AD1-8767-240EDD9C23DF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{3B0827D8-B4B5-43C6-A316-862B10095973}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{205F2D7B-2F70-4C95-9378-198145111664}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{AC18CD17-1E29-4288-859D-D0F7B7DC5579}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{BC33BD47-59B3-46A0-AC86-879F83E1CA1C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{99025780-1164-4FD8-8E8E-BDE8F8703929}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{56E33627-D3D8-4893-898D-730A4DE8ED60}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{73AA6FCA-8FDC-41AA-8539-91562296190B}" EndProject @@ -35,6 +45,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{5B2563E3-FF5 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{CC8272C5-AC82-4A51-B88C-018FF4284B25}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{576969A4-D9EB-4AD1-8767-240EDD9C23DF}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{367F3353-6D8C-4AC0-B351-C848366BFB6A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{29AD62BC-AD6E-4BBB-ADFF-19D1FE37FAEC}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{85ABE479-FDDE-4801-865E-F17829A66DDE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{E668657B-7AF8-4E07-A07C-3919797A8B8A}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -357,13 +377,117 @@ Global {EDC3F7A0-3C48-4962-9D28-4EC6B7560F32}.Checked|arm64.ActiveCfg = Debug|Any CPU {EDC3F7A0-3C48-4962-9D28-4EC6B7560F32}.Checked|x64.ActiveCfg = Debug|Any CPU {EDC3F7A0-3C48-4962-9D28-4EC6B7560F32}.Checked|x86.ActiveCfg = Debug|Any CPU + {3B0827D8-B4B5-43C6-A316-862B10095973}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3B0827D8-B4B5-43C6-A316-862B10095973}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3B0827D8-B4B5-43C6-A316-862B10095973}.Debug|arm.ActiveCfg = Debug|Any CPU + {3B0827D8-B4B5-43C6-A316-862B10095973}.Debug|arm64.ActiveCfg = Debug|Any CPU + {3B0827D8-B4B5-43C6-A316-862B10095973}.Debug|x64.ActiveCfg = Debug|Any CPU + {3B0827D8-B4B5-43C6-A316-862B10095973}.Debug|x64.Build.0 = Debug|Any CPU + {3B0827D8-B4B5-43C6-A316-862B10095973}.Debug|x86.ActiveCfg = Debug|Any CPU + {3B0827D8-B4B5-43C6-A316-862B10095973}.Debug|x86.Build.0 = Debug|Any CPU + {3B0827D8-B4B5-43C6-A316-862B10095973}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3B0827D8-B4B5-43C6-A316-862B10095973}.Release|Any CPU.Build.0 = Release|Any CPU + {3B0827D8-B4B5-43C6-A316-862B10095973}.Release|arm.ActiveCfg = Release|Any CPU + {3B0827D8-B4B5-43C6-A316-862B10095973}.Release|arm64.ActiveCfg = Release|Any CPU + {3B0827D8-B4B5-43C6-A316-862B10095973}.Release|x64.ActiveCfg = Release|Any CPU + {3B0827D8-B4B5-43C6-A316-862B10095973}.Release|x64.Build.0 = Release|Any CPU + {3B0827D8-B4B5-43C6-A316-862B10095973}.Release|x86.ActiveCfg = Release|Any CPU + {3B0827D8-B4B5-43C6-A316-862B10095973}.Release|x86.Build.0 = Release|Any CPU + {3B0827D8-B4B5-43C6-A316-862B10095973}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {3B0827D8-B4B5-43C6-A316-862B10095973}.Checked|arm.ActiveCfg = Debug|Any CPU + {3B0827D8-B4B5-43C6-A316-862B10095973}.Checked|arm64.ActiveCfg = Debug|Any CPU + {3B0827D8-B4B5-43C6-A316-862B10095973}.Checked|x64.ActiveCfg = Debug|Any CPU + {3B0827D8-B4B5-43C6-A316-862B10095973}.Checked|x86.ActiveCfg = Debug|Any CPU + {205F2D7B-2F70-4C95-9378-198145111664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {205F2D7B-2F70-4C95-9378-198145111664}.Debug|Any CPU.Build.0 = Debug|Any CPU + {205F2D7B-2F70-4C95-9378-198145111664}.Debug|arm.ActiveCfg = Debug|Any CPU + {205F2D7B-2F70-4C95-9378-198145111664}.Debug|arm64.ActiveCfg = Debug|Any CPU + {205F2D7B-2F70-4C95-9378-198145111664}.Debug|x64.ActiveCfg = Debug|Any CPU + {205F2D7B-2F70-4C95-9378-198145111664}.Debug|x64.Build.0 = Debug|Any CPU + {205F2D7B-2F70-4C95-9378-198145111664}.Debug|x86.ActiveCfg = Debug|Any CPU + {205F2D7B-2F70-4C95-9378-198145111664}.Debug|x86.Build.0 = Debug|Any CPU + {205F2D7B-2F70-4C95-9378-198145111664}.Release|Any CPU.ActiveCfg = Release|Any CPU + {205F2D7B-2F70-4C95-9378-198145111664}.Release|Any CPU.Build.0 = Release|Any CPU + {205F2D7B-2F70-4C95-9378-198145111664}.Release|arm.ActiveCfg = Release|Any CPU + {205F2D7B-2F70-4C95-9378-198145111664}.Release|arm64.ActiveCfg = Release|Any CPU + {205F2D7B-2F70-4C95-9378-198145111664}.Release|x64.ActiveCfg = Release|Any CPU + {205F2D7B-2F70-4C95-9378-198145111664}.Release|x64.Build.0 = Release|Any CPU + {205F2D7B-2F70-4C95-9378-198145111664}.Release|x86.ActiveCfg = Release|Any CPU + {205F2D7B-2F70-4C95-9378-198145111664}.Release|x86.Build.0 = Release|Any CPU + {205F2D7B-2F70-4C95-9378-198145111664}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {205F2D7B-2F70-4C95-9378-198145111664}.Checked|arm.ActiveCfg = Debug|Any CPU + {205F2D7B-2F70-4C95-9378-198145111664}.Checked|arm64.ActiveCfg = Debug|Any CPU + {205F2D7B-2F70-4C95-9378-198145111664}.Checked|x64.ActiveCfg = Debug|Any CPU + {205F2D7B-2F70-4C95-9378-198145111664}.Checked|x86.ActiveCfg = Debug|Any CPU + {AC18CD17-1E29-4288-859D-D0F7B7DC5579}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AC18CD17-1E29-4288-859D-D0F7B7DC5579}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AC18CD17-1E29-4288-859D-D0F7B7DC5579}.Debug|arm.ActiveCfg = Debug|Any CPU + {AC18CD17-1E29-4288-859D-D0F7B7DC5579}.Debug|arm64.ActiveCfg = Debug|Any CPU + {AC18CD17-1E29-4288-859D-D0F7B7DC5579}.Debug|x64.ActiveCfg = Debug|Any CPU + {AC18CD17-1E29-4288-859D-D0F7B7DC5579}.Debug|x64.Build.0 = Debug|Any CPU + {AC18CD17-1E29-4288-859D-D0F7B7DC5579}.Debug|x86.ActiveCfg = Debug|Any CPU + {AC18CD17-1E29-4288-859D-D0F7B7DC5579}.Debug|x86.Build.0 = Debug|Any CPU + {AC18CD17-1E29-4288-859D-D0F7B7DC5579}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AC18CD17-1E29-4288-859D-D0F7B7DC5579}.Release|Any CPU.Build.0 = Release|Any CPU + {AC18CD17-1E29-4288-859D-D0F7B7DC5579}.Release|arm.ActiveCfg = Release|Any CPU + {AC18CD17-1E29-4288-859D-D0F7B7DC5579}.Release|arm64.ActiveCfg = Release|Any CPU + {AC18CD17-1E29-4288-859D-D0F7B7DC5579}.Release|x64.ActiveCfg = Release|Any CPU + {AC18CD17-1E29-4288-859D-D0F7B7DC5579}.Release|x64.Build.0 = Release|Any CPU + {AC18CD17-1E29-4288-859D-D0F7B7DC5579}.Release|x86.ActiveCfg = Release|Any CPU + {AC18CD17-1E29-4288-859D-D0F7B7DC5579}.Release|x86.Build.0 = Release|Any CPU + {AC18CD17-1E29-4288-859D-D0F7B7DC5579}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {AC18CD17-1E29-4288-859D-D0F7B7DC5579}.Checked|arm.ActiveCfg = Debug|Any CPU + {AC18CD17-1E29-4288-859D-D0F7B7DC5579}.Checked|arm64.ActiveCfg = Debug|Any CPU + {AC18CD17-1E29-4288-859D-D0F7B7DC5579}.Checked|x64.ActiveCfg = Debug|Any CPU + {AC18CD17-1E29-4288-859D-D0F7B7DC5579}.Checked|x86.ActiveCfg = Debug|Any CPU + {BC33BD47-59B3-46A0-AC86-879F83E1CA1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BC33BD47-59B3-46A0-AC86-879F83E1CA1C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BC33BD47-59B3-46A0-AC86-879F83E1CA1C}.Debug|arm.ActiveCfg = Debug|Any CPU + {BC33BD47-59B3-46A0-AC86-879F83E1CA1C}.Debug|arm64.ActiveCfg = Debug|Any CPU + {BC33BD47-59B3-46A0-AC86-879F83E1CA1C}.Debug|x64.ActiveCfg = Debug|Any CPU + {BC33BD47-59B3-46A0-AC86-879F83E1CA1C}.Debug|x64.Build.0 = Debug|Any CPU + {BC33BD47-59B3-46A0-AC86-879F83E1CA1C}.Debug|x86.ActiveCfg = Debug|Any CPU + {BC33BD47-59B3-46A0-AC86-879F83E1CA1C}.Debug|x86.Build.0 = Debug|Any CPU + {BC33BD47-59B3-46A0-AC86-879F83E1CA1C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BC33BD47-59B3-46A0-AC86-879F83E1CA1C}.Release|Any CPU.Build.0 = Release|Any CPU + {BC33BD47-59B3-46A0-AC86-879F83E1CA1C}.Release|arm.ActiveCfg = Release|Any CPU + {BC33BD47-59B3-46A0-AC86-879F83E1CA1C}.Release|arm64.ActiveCfg = Release|Any CPU + {BC33BD47-59B3-46A0-AC86-879F83E1CA1C}.Release|x64.ActiveCfg = Release|Any CPU + {BC33BD47-59B3-46A0-AC86-879F83E1CA1C}.Release|x64.Build.0 = Release|Any CPU + {BC33BD47-59B3-46A0-AC86-879F83E1CA1C}.Release|x86.ActiveCfg = Release|Any CPU + {BC33BD47-59B3-46A0-AC86-879F83E1CA1C}.Release|x86.Build.0 = Release|Any CPU + {BC33BD47-59B3-46A0-AC86-879F83E1CA1C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {BC33BD47-59B3-46A0-AC86-879F83E1CA1C}.Checked|arm.ActiveCfg = Debug|Any CPU + {BC33BD47-59B3-46A0-AC86-879F83E1CA1C}.Checked|arm64.ActiveCfg = Debug|Any CPU + {BC33BD47-59B3-46A0-AC86-879F83E1CA1C}.Checked|x64.ActiveCfg = Debug|Any CPU + {BC33BD47-59B3-46A0-AC86-879F83E1CA1C}.Checked|x86.ActiveCfg = Debug|Any CPU + {99025780-1164-4FD8-8E8E-BDE8F8703929}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {99025780-1164-4FD8-8E8E-BDE8F8703929}.Debug|Any CPU.Build.0 = Debug|Any CPU + {99025780-1164-4FD8-8E8E-BDE8F8703929}.Debug|arm.ActiveCfg = Debug|Any CPU + {99025780-1164-4FD8-8E8E-BDE8F8703929}.Debug|arm64.ActiveCfg = Debug|Any CPU + {99025780-1164-4FD8-8E8E-BDE8F8703929}.Debug|x64.ActiveCfg = Debug|Any CPU + {99025780-1164-4FD8-8E8E-BDE8F8703929}.Debug|x64.Build.0 = Debug|Any CPU + {99025780-1164-4FD8-8E8E-BDE8F8703929}.Debug|x86.ActiveCfg = Debug|Any CPU + {99025780-1164-4FD8-8E8E-BDE8F8703929}.Debug|x86.Build.0 = Debug|Any CPU + {99025780-1164-4FD8-8E8E-BDE8F8703929}.Release|Any CPU.ActiveCfg = Release|Any CPU + {99025780-1164-4FD8-8E8E-BDE8F8703929}.Release|Any CPU.Build.0 = Release|Any CPU + {99025780-1164-4FD8-8E8E-BDE8F8703929}.Release|arm.ActiveCfg = Release|Any CPU + {99025780-1164-4FD8-8E8E-BDE8F8703929}.Release|arm64.ActiveCfg = Release|Any CPU + {99025780-1164-4FD8-8E8E-BDE8F8703929}.Release|x64.ActiveCfg = Release|Any CPU + {99025780-1164-4FD8-8E8E-BDE8F8703929}.Release|x64.Build.0 = Release|Any CPU + {99025780-1164-4FD8-8E8E-BDE8F8703929}.Release|x86.ActiveCfg = Release|Any CPU + {99025780-1164-4FD8-8E8E-BDE8F8703929}.Release|x86.Build.0 = Release|Any CPU + {99025780-1164-4FD8-8E8E-BDE8F8703929}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {99025780-1164-4FD8-8E8E-BDE8F8703929}.Checked|arm.ActiveCfg = Debug|Any CPU + {99025780-1164-4FD8-8E8E-BDE8F8703929}.Checked|arm64.ActiveCfg = Debug|Any CPU + {99025780-1164-4FD8-8E8E-BDE8F8703929}.Checked|x64.ActiveCfg = Debug|Any CPU + {99025780-1164-4FD8-8E8E-BDE8F8703929}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {B811926D-CFBB-4C22-80D2-0CCD566D980C} = {576969A4-D9EB-4AD1-8767-240EDD9C23DF} - {A73DCB15-F3DF-48CB-A4CA-62102E94122C} = {576969A4-D9EB-4AD1-8767-240EDD9C23DF} + {B811926D-CFBB-4C22-80D2-0CCD566D980C} = {56E33627-D3D8-4893-898D-730A4DE8ED60} {BF6A7CA7-DDF9-44D4-AD00-D807765663F9} = {73AA6FCA-8FDC-41AA-8539-91562296190B} {12A6F314-B08D-417D-82EC-0D8799D7C1A2} = {73AA6FCA-8FDC-41AA-8539-91562296190B} {F29BC05D-E596-4AF7-BFFC-D3E2BD8CB7AE} = {73AA6FCA-8FDC-41AA-8539-91562296190B} @@ -376,6 +500,15 @@ Global {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} + {A73DCB15-F3DF-48CB-A4CA-62102E94122C} = {576969A4-D9EB-4AD1-8767-240EDD9C23DF} + {3B0827D8-B4B5-43C6-A316-862B10095973} = {367F3353-6D8C-4AC0-B351-C848366BFB6A} + {205F2D7B-2F70-4C95-9378-198145111664} = {367F3353-6D8C-4AC0-B351-C848366BFB6A} + {367F3353-6D8C-4AC0-B351-C848366BFB6A} = {E668657B-7AF8-4E07-A07C-3919797A8B8A} + {AC18CD17-1E29-4288-859D-D0F7B7DC5579} = {29AD62BC-AD6E-4BBB-ADFF-19D1FE37FAEC} + {BC33BD47-59B3-46A0-AC86-879F83E1CA1C} = {29AD62BC-AD6E-4BBB-ADFF-19D1FE37FAEC} + {29AD62BC-AD6E-4BBB-ADFF-19D1FE37FAEC} = {E668657B-7AF8-4E07-A07C-3919797A8B8A} + {99025780-1164-4FD8-8E8E-BDE8F8703929} = {85ABE479-FDDE-4801-865E-F17829A66DDE} + {85ABE479-FDDE-4801-865E-F17829A66DDE} = {E668657B-7AF8-4E07-A07C-3919797A8B8A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {1D3E8D7C-10CB-4E04-B723-0B532932DF86} diff --git a/src/libraries/System.Threading.ThreadPool/System.Threading.ThreadPool.sln b/src/libraries/System.Threading.ThreadPool/System.Threading.ThreadPool.sln index 4e130a65939c2e..5b9ec36af16afc 100644 --- a/src/libraries/System.Threading.ThreadPool/System.Threading.ThreadPool.sln +++ b/src/libraries/System.Threading.ThreadPool/System.Threading.ThreadPool.sln @@ -21,7 +21,19 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.ThreadPool EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.ThreadPool.Tests", "tests\System.Threading.ThreadPool.Tests.csproj", "{71ACA28C-A4F1-4A07-A1B3-39DB86C11A75}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{3358539E-11F4-4294-8D94-A9A31E9F47F5}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.ThreadPool.WindowsThreadPool.Tests", "tests\WindowsThreadPool\System.Threading.ThreadPool.WindowsThreadPool.Tests.csproj", "{2EBEBCB5-9AC0-49E7-BCE3-C8A73E068CAE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{DB9B5380-2F48-4C50-820C-FAFA254A2E3E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{EBA33C2D-BC48-4E26-8CC7-845BC9716574}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{581F0BF4-60A6-4E22-AAB1-DC64C7D8D25B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{9B3CBB41-8D74-49C0-88BF-6CA1794A3DF3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{F621411F-F1E9-47DF-AB80-268B18777990}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{1D6F62EA-A796-4A6D-985E-745D3086CAD1}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{DB513386-C3B1-4891-92E1-1BE5D38562DC}" EndProject @@ -29,7 +41,15 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{1445280F-1F0 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{6A32653B-8FAC-4B01-A0E0-E6379DE90A1A}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.ThreadPool.WindowsThreadPool.Tests", "tests\WindowsThreadPool\System.Threading.ThreadPool.WindowsThreadPool.Tests.csproj", "{2EBEBCB5-9AC0-49E7-BCE3-C8A73E068CAE}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{3358539E-11F4-4294-8D94-A9A31E9F47F5}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{AB444D50-7800-4DC8-A982-7C78E3BE7AE2}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{5A4AE8D4-AD8F-4ED5-AA39-A702899A15E4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{20DF2649-B86C-448B-8689-2E2DB740469F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{4802A624-17FB-421B-A300-4F1B67DF9290}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -292,39 +312,155 @@ Global {71ACA28C-A4F1-4A07-A1B3-39DB86C11A75}.Checked|x86.ActiveCfg = Debug|Any CPU {2EBEBCB5-9AC0-49E7-BCE3-C8A73E068CAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2EBEBCB5-9AC0-49E7-BCE3-C8A73E068CAE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2EBEBCB5-9AC0-49E7-BCE3-C8A73E068CAE}.Debug|arm.ActiveCfg = Debug|Any CPU + {2EBEBCB5-9AC0-49E7-BCE3-C8A73E068CAE}.Debug|arm64.ActiveCfg = Debug|Any CPU {2EBEBCB5-9AC0-49E7-BCE3-C8A73E068CAE}.Debug|x64.ActiveCfg = Debug|Any CPU {2EBEBCB5-9AC0-49E7-BCE3-C8A73E068CAE}.Debug|x64.Build.0 = Debug|Any CPU {2EBEBCB5-9AC0-49E7-BCE3-C8A73E068CAE}.Debug|x86.ActiveCfg = Debug|Any CPU {2EBEBCB5-9AC0-49E7-BCE3-C8A73E068CAE}.Debug|x86.Build.0 = Debug|Any CPU {2EBEBCB5-9AC0-49E7-BCE3-C8A73E068CAE}.Release|Any CPU.ActiveCfg = Release|Any CPU {2EBEBCB5-9AC0-49E7-BCE3-C8A73E068CAE}.Release|Any CPU.Build.0 = Release|Any CPU + {2EBEBCB5-9AC0-49E7-BCE3-C8A73E068CAE}.Release|arm.ActiveCfg = Release|Any CPU + {2EBEBCB5-9AC0-49E7-BCE3-C8A73E068CAE}.Release|arm64.ActiveCfg = Release|Any CPU {2EBEBCB5-9AC0-49E7-BCE3-C8A73E068CAE}.Release|x64.ActiveCfg = Release|Any CPU {2EBEBCB5-9AC0-49E7-BCE3-C8A73E068CAE}.Release|x64.Build.0 = Release|Any CPU {2EBEBCB5-9AC0-49E7-BCE3-C8A73E068CAE}.Release|x86.ActiveCfg = Release|Any CPU {2EBEBCB5-9AC0-49E7-BCE3-C8A73E068CAE}.Release|x86.Build.0 = Release|Any CPU {2EBEBCB5-9AC0-49E7-BCE3-C8A73E068CAE}.Checked|Any CPU.ActiveCfg = Debug|Any CPU - {2EBEBCB5-9AC0-49E7-BCE3-C8A73E068CAE}.Checked|Any CPU.Build.0 = Debug|Any CPU + {2EBEBCB5-9AC0-49E7-BCE3-C8A73E068CAE}.Checked|arm.ActiveCfg = Debug|Any CPU + {2EBEBCB5-9AC0-49E7-BCE3-C8A73E068CAE}.Checked|arm64.ActiveCfg = Debug|Any CPU {2EBEBCB5-9AC0-49E7-BCE3-C8A73E068CAE}.Checked|x64.ActiveCfg = Debug|Any CPU - {2EBEBCB5-9AC0-49E7-BCE3-C8A73E068CAE}.Checked|x64.Build.0 = Debug|Any CPU {2EBEBCB5-9AC0-49E7-BCE3-C8A73E068CAE}.Checked|x86.ActiveCfg = Debug|Any CPU - {2EBEBCB5-9AC0-49E7-BCE3-C8A73E068CAE}.Checked|x86.Build.0 = Debug|Any CPU + {DB9B5380-2F48-4C50-820C-FAFA254A2E3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DB9B5380-2F48-4C50-820C-FAFA254A2E3E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DB9B5380-2F48-4C50-820C-FAFA254A2E3E}.Debug|arm.ActiveCfg = Debug|Any CPU + {DB9B5380-2F48-4C50-820C-FAFA254A2E3E}.Debug|arm64.ActiveCfg = Debug|Any CPU + {DB9B5380-2F48-4C50-820C-FAFA254A2E3E}.Debug|x64.ActiveCfg = Debug|Any CPU + {DB9B5380-2F48-4C50-820C-FAFA254A2E3E}.Debug|x64.Build.0 = Debug|Any CPU + {DB9B5380-2F48-4C50-820C-FAFA254A2E3E}.Debug|x86.ActiveCfg = Debug|Any CPU + {DB9B5380-2F48-4C50-820C-FAFA254A2E3E}.Debug|x86.Build.0 = Debug|Any CPU + {DB9B5380-2F48-4C50-820C-FAFA254A2E3E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DB9B5380-2F48-4C50-820C-FAFA254A2E3E}.Release|Any CPU.Build.0 = Release|Any CPU + {DB9B5380-2F48-4C50-820C-FAFA254A2E3E}.Release|arm.ActiveCfg = Release|Any CPU + {DB9B5380-2F48-4C50-820C-FAFA254A2E3E}.Release|arm64.ActiveCfg = Release|Any CPU + {DB9B5380-2F48-4C50-820C-FAFA254A2E3E}.Release|x64.ActiveCfg = Release|Any CPU + {DB9B5380-2F48-4C50-820C-FAFA254A2E3E}.Release|x64.Build.0 = Release|Any CPU + {DB9B5380-2F48-4C50-820C-FAFA254A2E3E}.Release|x86.ActiveCfg = Release|Any CPU + {DB9B5380-2F48-4C50-820C-FAFA254A2E3E}.Release|x86.Build.0 = Release|Any CPU + {DB9B5380-2F48-4C50-820C-FAFA254A2E3E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {DB9B5380-2F48-4C50-820C-FAFA254A2E3E}.Checked|arm.ActiveCfg = Debug|Any CPU + {DB9B5380-2F48-4C50-820C-FAFA254A2E3E}.Checked|arm64.ActiveCfg = Debug|Any CPU + {DB9B5380-2F48-4C50-820C-FAFA254A2E3E}.Checked|x64.ActiveCfg = Debug|Any CPU + {DB9B5380-2F48-4C50-820C-FAFA254A2E3E}.Checked|x86.ActiveCfg = Debug|Any CPU + {EBA33C2D-BC48-4E26-8CC7-845BC9716574}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EBA33C2D-BC48-4E26-8CC7-845BC9716574}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EBA33C2D-BC48-4E26-8CC7-845BC9716574}.Debug|arm.ActiveCfg = Debug|Any CPU + {EBA33C2D-BC48-4E26-8CC7-845BC9716574}.Debug|arm64.ActiveCfg = Debug|Any CPU + {EBA33C2D-BC48-4E26-8CC7-845BC9716574}.Debug|x64.ActiveCfg = Debug|Any CPU + {EBA33C2D-BC48-4E26-8CC7-845BC9716574}.Debug|x64.Build.0 = Debug|Any CPU + {EBA33C2D-BC48-4E26-8CC7-845BC9716574}.Debug|x86.ActiveCfg = Debug|Any CPU + {EBA33C2D-BC48-4E26-8CC7-845BC9716574}.Debug|x86.Build.0 = Debug|Any CPU + {EBA33C2D-BC48-4E26-8CC7-845BC9716574}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EBA33C2D-BC48-4E26-8CC7-845BC9716574}.Release|Any CPU.Build.0 = Release|Any CPU + {EBA33C2D-BC48-4E26-8CC7-845BC9716574}.Release|arm.ActiveCfg = Release|Any CPU + {EBA33C2D-BC48-4E26-8CC7-845BC9716574}.Release|arm64.ActiveCfg = Release|Any CPU + {EBA33C2D-BC48-4E26-8CC7-845BC9716574}.Release|x64.ActiveCfg = Release|Any CPU + {EBA33C2D-BC48-4E26-8CC7-845BC9716574}.Release|x64.Build.0 = Release|Any CPU + {EBA33C2D-BC48-4E26-8CC7-845BC9716574}.Release|x86.ActiveCfg = Release|Any CPU + {EBA33C2D-BC48-4E26-8CC7-845BC9716574}.Release|x86.Build.0 = Release|Any CPU + {EBA33C2D-BC48-4E26-8CC7-845BC9716574}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {EBA33C2D-BC48-4E26-8CC7-845BC9716574}.Checked|arm.ActiveCfg = Debug|Any CPU + {EBA33C2D-BC48-4E26-8CC7-845BC9716574}.Checked|arm64.ActiveCfg = Debug|Any CPU + {EBA33C2D-BC48-4E26-8CC7-845BC9716574}.Checked|x64.ActiveCfg = Debug|Any CPU + {EBA33C2D-BC48-4E26-8CC7-845BC9716574}.Checked|x86.ActiveCfg = Debug|Any CPU + {581F0BF4-60A6-4E22-AAB1-DC64C7D8D25B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {581F0BF4-60A6-4E22-AAB1-DC64C7D8D25B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {581F0BF4-60A6-4E22-AAB1-DC64C7D8D25B}.Debug|arm.ActiveCfg = Debug|Any CPU + {581F0BF4-60A6-4E22-AAB1-DC64C7D8D25B}.Debug|arm64.ActiveCfg = Debug|Any CPU + {581F0BF4-60A6-4E22-AAB1-DC64C7D8D25B}.Debug|x64.ActiveCfg = Debug|Any CPU + {581F0BF4-60A6-4E22-AAB1-DC64C7D8D25B}.Debug|x64.Build.0 = Debug|Any CPU + {581F0BF4-60A6-4E22-AAB1-DC64C7D8D25B}.Debug|x86.ActiveCfg = Debug|Any CPU + {581F0BF4-60A6-4E22-AAB1-DC64C7D8D25B}.Debug|x86.Build.0 = Debug|Any CPU + {581F0BF4-60A6-4E22-AAB1-DC64C7D8D25B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {581F0BF4-60A6-4E22-AAB1-DC64C7D8D25B}.Release|Any CPU.Build.0 = Release|Any CPU + {581F0BF4-60A6-4E22-AAB1-DC64C7D8D25B}.Release|arm.ActiveCfg = Release|Any CPU + {581F0BF4-60A6-4E22-AAB1-DC64C7D8D25B}.Release|arm64.ActiveCfg = Release|Any CPU + {581F0BF4-60A6-4E22-AAB1-DC64C7D8D25B}.Release|x64.ActiveCfg = Release|Any CPU + {581F0BF4-60A6-4E22-AAB1-DC64C7D8D25B}.Release|x64.Build.0 = Release|Any CPU + {581F0BF4-60A6-4E22-AAB1-DC64C7D8D25B}.Release|x86.ActiveCfg = Release|Any CPU + {581F0BF4-60A6-4E22-AAB1-DC64C7D8D25B}.Release|x86.Build.0 = Release|Any CPU + {581F0BF4-60A6-4E22-AAB1-DC64C7D8D25B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {581F0BF4-60A6-4E22-AAB1-DC64C7D8D25B}.Checked|arm.ActiveCfg = Debug|Any CPU + {581F0BF4-60A6-4E22-AAB1-DC64C7D8D25B}.Checked|arm64.ActiveCfg = Debug|Any CPU + {581F0BF4-60A6-4E22-AAB1-DC64C7D8D25B}.Checked|x64.ActiveCfg = Debug|Any CPU + {581F0BF4-60A6-4E22-AAB1-DC64C7D8D25B}.Checked|x86.ActiveCfg = Debug|Any CPU + {9B3CBB41-8D74-49C0-88BF-6CA1794A3DF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9B3CBB41-8D74-49C0-88BF-6CA1794A3DF3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9B3CBB41-8D74-49C0-88BF-6CA1794A3DF3}.Debug|arm.ActiveCfg = Debug|Any CPU + {9B3CBB41-8D74-49C0-88BF-6CA1794A3DF3}.Debug|arm64.ActiveCfg = Debug|Any CPU + {9B3CBB41-8D74-49C0-88BF-6CA1794A3DF3}.Debug|x64.ActiveCfg = Debug|Any CPU + {9B3CBB41-8D74-49C0-88BF-6CA1794A3DF3}.Debug|x64.Build.0 = Debug|Any CPU + {9B3CBB41-8D74-49C0-88BF-6CA1794A3DF3}.Debug|x86.ActiveCfg = Debug|Any CPU + {9B3CBB41-8D74-49C0-88BF-6CA1794A3DF3}.Debug|x86.Build.0 = Debug|Any CPU + {9B3CBB41-8D74-49C0-88BF-6CA1794A3DF3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9B3CBB41-8D74-49C0-88BF-6CA1794A3DF3}.Release|Any CPU.Build.0 = Release|Any CPU + {9B3CBB41-8D74-49C0-88BF-6CA1794A3DF3}.Release|arm.ActiveCfg = Release|Any CPU + {9B3CBB41-8D74-49C0-88BF-6CA1794A3DF3}.Release|arm64.ActiveCfg = Release|Any CPU + {9B3CBB41-8D74-49C0-88BF-6CA1794A3DF3}.Release|x64.ActiveCfg = Release|Any CPU + {9B3CBB41-8D74-49C0-88BF-6CA1794A3DF3}.Release|x64.Build.0 = Release|Any CPU + {9B3CBB41-8D74-49C0-88BF-6CA1794A3DF3}.Release|x86.ActiveCfg = Release|Any CPU + {9B3CBB41-8D74-49C0-88BF-6CA1794A3DF3}.Release|x86.Build.0 = Release|Any CPU + {9B3CBB41-8D74-49C0-88BF-6CA1794A3DF3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {9B3CBB41-8D74-49C0-88BF-6CA1794A3DF3}.Checked|arm.ActiveCfg = Debug|Any CPU + {9B3CBB41-8D74-49C0-88BF-6CA1794A3DF3}.Checked|arm64.ActiveCfg = Debug|Any CPU + {9B3CBB41-8D74-49C0-88BF-6CA1794A3DF3}.Checked|x64.ActiveCfg = Debug|Any CPU + {9B3CBB41-8D74-49C0-88BF-6CA1794A3DF3}.Checked|x86.ActiveCfg = Debug|Any CPU + {F621411F-F1E9-47DF-AB80-268B18777990}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F621411F-F1E9-47DF-AB80-268B18777990}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F621411F-F1E9-47DF-AB80-268B18777990}.Debug|arm.ActiveCfg = Debug|Any CPU + {F621411F-F1E9-47DF-AB80-268B18777990}.Debug|arm64.ActiveCfg = Debug|Any CPU + {F621411F-F1E9-47DF-AB80-268B18777990}.Debug|x64.ActiveCfg = Debug|Any CPU + {F621411F-F1E9-47DF-AB80-268B18777990}.Debug|x64.Build.0 = Debug|Any CPU + {F621411F-F1E9-47DF-AB80-268B18777990}.Debug|x86.ActiveCfg = Debug|Any CPU + {F621411F-F1E9-47DF-AB80-268B18777990}.Debug|x86.Build.0 = Debug|Any CPU + {F621411F-F1E9-47DF-AB80-268B18777990}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F621411F-F1E9-47DF-AB80-268B18777990}.Release|Any CPU.Build.0 = Release|Any CPU + {F621411F-F1E9-47DF-AB80-268B18777990}.Release|arm.ActiveCfg = Release|Any CPU + {F621411F-F1E9-47DF-AB80-268B18777990}.Release|arm64.ActiveCfg = Release|Any CPU + {F621411F-F1E9-47DF-AB80-268B18777990}.Release|x64.ActiveCfg = Release|Any CPU + {F621411F-F1E9-47DF-AB80-268B18777990}.Release|x64.Build.0 = Release|Any CPU + {F621411F-F1E9-47DF-AB80-268B18777990}.Release|x86.ActiveCfg = Release|Any CPU + {F621411F-F1E9-47DF-AB80-268B18777990}.Release|x86.Build.0 = Release|Any CPU + {F621411F-F1E9-47DF-AB80-268B18777990}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {F621411F-F1E9-47DF-AB80-268B18777990}.Checked|arm.ActiveCfg = Debug|Any CPU + {F621411F-F1E9-47DF-AB80-268B18777990}.Checked|arm64.ActiveCfg = Debug|Any CPU + {F621411F-F1E9-47DF-AB80-268B18777990}.Checked|x64.ActiveCfg = Debug|Any CPU + {F621411F-F1E9-47DF-AB80-268B18777990}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {BEACD8A1-3C09-450E-931F-561D44986BFB} = {3358539E-11F4-4294-8D94-A9A31E9F47F5} + {BEACD8A1-3C09-450E-931F-561D44986BFB} = {1D6F62EA-A796-4A6D-985E-745D3086CAD1} {CD477FC8-AF27-46A2-A451-4A2D4C11600D} = {DB513386-C3B1-4891-92E1-1BE5D38562DC} + {71ACA28C-A4F1-4A07-A1B3-39DB86C11A75} = {DB513386-C3B1-4891-92E1-1BE5D38562DC} + {2EBEBCB5-9AC0-49E7-BCE3-C8A73E068CAE} = {DB513386-C3B1-4891-92E1-1BE5D38562DC} {54E0AB0F-EB35-49AB-9A38-7C09FD7EC373} = {1445280F-1F07-45C3-93BC-D4025720B5FE} - {3156246A-939D-4232-90B3-FDE03A14BA90} = {6A32653B-8FAC-4B01-A0E0-E6379DE90A1A} {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} {53A0D29E-8633-4FF8-AB0E-86EF331DD379} = {3358539E-11F4-4294-8D94-A9A31E9F47F5} - {71ACA28C-A4F1-4A07-A1B3-39DB86C11A75} = {DB513386-C3B1-4891-92E1-1BE5D38562DC} - {2EBEBCB5-9AC0-49E7-BCE3-C8A73E068CAE} = {DB513386-C3B1-4891-92E1-1BE5D38562DC} + {DB9B5380-2F48-4C50-820C-FAFA254A2E3E} = {AB444D50-7800-4DC8-A982-7C78E3BE7AE2} + {EBA33C2D-BC48-4E26-8CC7-845BC9716574} = {AB444D50-7800-4DC8-A982-7C78E3BE7AE2} + {AB444D50-7800-4DC8-A982-7C78E3BE7AE2} = {4802A624-17FB-421B-A300-4F1B67DF9290} + {581F0BF4-60A6-4E22-AAB1-DC64C7D8D25B} = {5A4AE8D4-AD8F-4ED5-AA39-A702899A15E4} + {9B3CBB41-8D74-49C0-88BF-6CA1794A3DF3} = {5A4AE8D4-AD8F-4ED5-AA39-A702899A15E4} + {5A4AE8D4-AD8F-4ED5-AA39-A702899A15E4} = {4802A624-17FB-421B-A300-4F1B67DF9290} + {F621411F-F1E9-47DF-AB80-268B18777990} = {20DF2649-B86C-448B-8689-2E2DB740469F} + {20DF2649-B86C-448B-8689-2E2DB740469F} = {4802A624-17FB-421B-A300-4F1B67DF9290} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {6124532E-4272-44A6-954B-A7B0FF9D694A} diff --git a/src/libraries/System.Threading.Timer/tests/TimerChangeTests.cs b/src/libraries/System.Threading.Timer/tests/TimerChangeTests.cs index fdd62265a1680d..b165796005b948 100644 --- a/src/libraries/System.Threading.Timer/tests/TimerChangeTests.cs +++ b/src/libraries/System.Threading.Timer/tests/TimerChangeTests.cs @@ -50,6 +50,7 @@ public void Timer_Change_AfterDispose_Test() } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91545", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [InlineData(0)] [InlineData(1)] [InlineData(2)] diff --git a/src/libraries/System.Threading.Timer/tests/TimerDisposeTests.cs b/src/libraries/System.Threading.Timer/tests/TimerDisposeTests.cs index 81cf68b4f2c6d8..0e00bd468563ce 100644 --- a/src/libraries/System.Threading.Timer/tests/TimerDisposeTests.cs +++ b/src/libraries/System.Threading.Timer/tests/TimerDisposeTests.cs @@ -50,6 +50,7 @@ public void DisposeAsync_SignalsImmediatelyWhenTaskNotRunning() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91545", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task DisposeAsync_DisposeDelayedUntilCallbacksComplete() { using (var b = new Barrier(2)) @@ -72,6 +73,7 @@ public async Task DisposeAsync_DisposeDelayedUntilCallbacksComplete() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91545", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task DisposeAsync_MultipleDisposesBeforeCompletionReturnSameTask() { using (var b = new Barrier(2)) @@ -97,6 +99,7 @@ public async Task DisposeAsync_MultipleDisposesBeforeCompletionReturnSameTask() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91545", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task DisposeAsync_AfterDisposeWorks() { using (var b = new Barrier(2)) @@ -120,6 +123,7 @@ public async Task DisposeAsync_AfterDisposeWorks() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91545", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task DisposeAsync_AfterDisposeWaitHandleThrows() { using (var b = new Barrier(2)) @@ -142,6 +146,7 @@ public async Task DisposeAsync_AfterDisposeWaitHandleThrows() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91545", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public async Task DisposeAsync_ThenDisposeWaitHandleReturnsFalse() { using (var b = new Barrier(2)) diff --git a/src/libraries/System.Threading.Timer/tests/TimerFiringTests.cs b/src/libraries/System.Threading.Timer/tests/TimerFiringTests.cs index cf6b97e0be20fb..831d99a0f66a8a 100644 --- a/src/libraries/System.Threading.Timer/tests/TimerFiringTests.cs +++ b/src/libraries/System.Threading.Timer/tests/TimerFiringTests.cs @@ -17,6 +17,7 @@ public class TimerFiringTests internal const int MaxPositiveTimeoutInMs = 30000; [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91545", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void Timer_Fires_After_DueTime_Ellapses() { AutoResetEvent are = new AutoResetEvent(false); @@ -31,6 +32,7 @@ public void Timer_Fires_After_DueTime_Ellapses() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91545", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void Timer_Fires_AndPassesStateThroughCallback() { AutoResetEvent are = new AutoResetEvent(false); @@ -47,6 +49,7 @@ public void Timer_Fires_AndPassesStateThroughCallback() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91545", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void Timer_Fires_AndPassesNullStateThroughCallback() { AutoResetEvent are = new AutoResetEvent(false); @@ -122,6 +125,7 @@ public void Timer_ChangeToDelete_DoesntFire() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91545", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void Timer_CanDisposeSelfInCallback() { Timer t = null; @@ -149,6 +153,7 @@ public void Timer_CanBeDisposedMultipleTimes() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91545", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void NonRepeatingTimer_ThatHasAlreadyFired_CanChangeAndFireAgain() { AutoResetEvent are = new AutoResetEvent(false); @@ -163,6 +168,7 @@ public void NonRepeatingTimer_ThatHasAlreadyFired_CanChangeAndFireAgain() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91545", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void MultpleTimers_PeriodicTimerIsntBlockedByBlockedCallback() { int callbacks = 2; @@ -183,6 +189,7 @@ public void MultpleTimers_PeriodicTimerIsntBlockedByBlockedCallback() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91545", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void ManyTimers_EachTimerDoesFire() { int maxTimers = 10000; @@ -200,6 +207,7 @@ public void ManyTimers_EachTimerDoesFire() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91545", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void Timer_Constructor_CallbackOnly_Change() { var e = new ManualResetEvent(false); @@ -217,6 +225,7 @@ public void Timer_Dispose_WaitHandle_Negative() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91545", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void Timer_Dispose_WaitHandle() { int tickCount = 0; @@ -362,6 +371,7 @@ orderby groupedByDueTime.Key } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91545", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void TimersCreatedConcurrentlyOnDifferentThreadsAllFire() { int processorCount = Environment.ProcessorCount; diff --git a/src/libraries/System.Threading/System.Threading.sln b/src/libraries/System.Threading/System.Threading.sln index 77302a842c78ac..ff8d6d982954af 100644 --- a/src/libraries/System.Threading/System.Threading.sln +++ b/src/libraries/System.Threading/System.Threading.sln @@ -19,7 +19,17 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading", "src\Sys EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.Tests", "tests\System.Threading.Tests.csproj", "{3DD929D8-346F-4CF3-B157-22E052F73A91}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C50DDA85-E391-4BC7-BF37-758B9CD35CF3}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{24A2CE1A-6995-477E-925D-BA928E909F36}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{1DEE16F0-CA56-4315-B87F-CF80C689A77C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{73F06253-A776-422E-B9AA-823991B32BA8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{A43B9D52-FCB0-4C2A-82B0-34377608DD98}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{B429DF7B-86B7-4134-BFCE-351300338853}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{6BC1276F-47F0-40C0-BA63-C89C4D4BA0C9}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{CCC80DF2-8B4E-497C-84A9-4E6344294566}" EndProject @@ -27,6 +37,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{A928B9C7-28E EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{BEFD8C2C-3355-40A5-8C06-3CE0BFB66C36}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C50DDA85-E391-4BC7-BF37-758B9CD35CF3}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{063A0284-C30F-4DEE-BFD8-EDC926C057CD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{D58ED978-7B6A-43B7-9DBC-D11DA1268F7F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{C7BB3EDC-0980-4B04-AE10-62AC9BD51FB9}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{382C1313-228D-4211-9C54-AB54CE678707}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -265,13 +285,117 @@ Global {3DD929D8-346F-4CF3-B157-22E052F73A91}.Checked|arm64.ActiveCfg = Debug|Any CPU {3DD929D8-346F-4CF3-B157-22E052F73A91}.Checked|x64.ActiveCfg = Debug|Any CPU {3DD929D8-346F-4CF3-B157-22E052F73A91}.Checked|x86.ActiveCfg = Debug|Any CPU + {24A2CE1A-6995-477E-925D-BA928E909F36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {24A2CE1A-6995-477E-925D-BA928E909F36}.Debug|Any CPU.Build.0 = Debug|Any CPU + {24A2CE1A-6995-477E-925D-BA928E909F36}.Debug|arm.ActiveCfg = Debug|Any CPU + {24A2CE1A-6995-477E-925D-BA928E909F36}.Debug|arm64.ActiveCfg = Debug|Any CPU + {24A2CE1A-6995-477E-925D-BA928E909F36}.Debug|x64.ActiveCfg = Debug|Any CPU + {24A2CE1A-6995-477E-925D-BA928E909F36}.Debug|x64.Build.0 = Debug|Any CPU + {24A2CE1A-6995-477E-925D-BA928E909F36}.Debug|x86.ActiveCfg = Debug|Any CPU + {24A2CE1A-6995-477E-925D-BA928E909F36}.Debug|x86.Build.0 = Debug|Any CPU + {24A2CE1A-6995-477E-925D-BA928E909F36}.Release|Any CPU.ActiveCfg = Release|Any CPU + {24A2CE1A-6995-477E-925D-BA928E909F36}.Release|Any CPU.Build.0 = Release|Any CPU + {24A2CE1A-6995-477E-925D-BA928E909F36}.Release|arm.ActiveCfg = Release|Any CPU + {24A2CE1A-6995-477E-925D-BA928E909F36}.Release|arm64.ActiveCfg = Release|Any CPU + {24A2CE1A-6995-477E-925D-BA928E909F36}.Release|x64.ActiveCfg = Release|Any CPU + {24A2CE1A-6995-477E-925D-BA928E909F36}.Release|x64.Build.0 = Release|Any CPU + {24A2CE1A-6995-477E-925D-BA928E909F36}.Release|x86.ActiveCfg = Release|Any CPU + {24A2CE1A-6995-477E-925D-BA928E909F36}.Release|x86.Build.0 = Release|Any CPU + {24A2CE1A-6995-477E-925D-BA928E909F36}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {24A2CE1A-6995-477E-925D-BA928E909F36}.Checked|arm.ActiveCfg = Debug|Any CPU + {24A2CE1A-6995-477E-925D-BA928E909F36}.Checked|arm64.ActiveCfg = Debug|Any CPU + {24A2CE1A-6995-477E-925D-BA928E909F36}.Checked|x64.ActiveCfg = Debug|Any CPU + {24A2CE1A-6995-477E-925D-BA928E909F36}.Checked|x86.ActiveCfg = Debug|Any CPU + {1DEE16F0-CA56-4315-B87F-CF80C689A77C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1DEE16F0-CA56-4315-B87F-CF80C689A77C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1DEE16F0-CA56-4315-B87F-CF80C689A77C}.Debug|arm.ActiveCfg = Debug|Any CPU + {1DEE16F0-CA56-4315-B87F-CF80C689A77C}.Debug|arm64.ActiveCfg = Debug|Any CPU + {1DEE16F0-CA56-4315-B87F-CF80C689A77C}.Debug|x64.ActiveCfg = Debug|Any CPU + {1DEE16F0-CA56-4315-B87F-CF80C689A77C}.Debug|x64.Build.0 = Debug|Any CPU + {1DEE16F0-CA56-4315-B87F-CF80C689A77C}.Debug|x86.ActiveCfg = Debug|Any CPU + {1DEE16F0-CA56-4315-B87F-CF80C689A77C}.Debug|x86.Build.0 = Debug|Any CPU + {1DEE16F0-CA56-4315-B87F-CF80C689A77C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1DEE16F0-CA56-4315-B87F-CF80C689A77C}.Release|Any CPU.Build.0 = Release|Any CPU + {1DEE16F0-CA56-4315-B87F-CF80C689A77C}.Release|arm.ActiveCfg = Release|Any CPU + {1DEE16F0-CA56-4315-B87F-CF80C689A77C}.Release|arm64.ActiveCfg = Release|Any CPU + {1DEE16F0-CA56-4315-B87F-CF80C689A77C}.Release|x64.ActiveCfg = Release|Any CPU + {1DEE16F0-CA56-4315-B87F-CF80C689A77C}.Release|x64.Build.0 = Release|Any CPU + {1DEE16F0-CA56-4315-B87F-CF80C689A77C}.Release|x86.ActiveCfg = Release|Any CPU + {1DEE16F0-CA56-4315-B87F-CF80C689A77C}.Release|x86.Build.0 = Release|Any CPU + {1DEE16F0-CA56-4315-B87F-CF80C689A77C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {1DEE16F0-CA56-4315-B87F-CF80C689A77C}.Checked|arm.ActiveCfg = Debug|Any CPU + {1DEE16F0-CA56-4315-B87F-CF80C689A77C}.Checked|arm64.ActiveCfg = Debug|Any CPU + {1DEE16F0-CA56-4315-B87F-CF80C689A77C}.Checked|x64.ActiveCfg = Debug|Any CPU + {1DEE16F0-CA56-4315-B87F-CF80C689A77C}.Checked|x86.ActiveCfg = Debug|Any CPU + {73F06253-A776-422E-B9AA-823991B32BA8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {73F06253-A776-422E-B9AA-823991B32BA8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {73F06253-A776-422E-B9AA-823991B32BA8}.Debug|arm.ActiveCfg = Debug|Any CPU + {73F06253-A776-422E-B9AA-823991B32BA8}.Debug|arm64.ActiveCfg = Debug|Any CPU + {73F06253-A776-422E-B9AA-823991B32BA8}.Debug|x64.ActiveCfg = Debug|Any CPU + {73F06253-A776-422E-B9AA-823991B32BA8}.Debug|x64.Build.0 = Debug|Any CPU + {73F06253-A776-422E-B9AA-823991B32BA8}.Debug|x86.ActiveCfg = Debug|Any CPU + {73F06253-A776-422E-B9AA-823991B32BA8}.Debug|x86.Build.0 = Debug|Any CPU + {73F06253-A776-422E-B9AA-823991B32BA8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {73F06253-A776-422E-B9AA-823991B32BA8}.Release|Any CPU.Build.0 = Release|Any CPU + {73F06253-A776-422E-B9AA-823991B32BA8}.Release|arm.ActiveCfg = Release|Any CPU + {73F06253-A776-422E-B9AA-823991B32BA8}.Release|arm64.ActiveCfg = Release|Any CPU + {73F06253-A776-422E-B9AA-823991B32BA8}.Release|x64.ActiveCfg = Release|Any CPU + {73F06253-A776-422E-B9AA-823991B32BA8}.Release|x64.Build.0 = Release|Any CPU + {73F06253-A776-422E-B9AA-823991B32BA8}.Release|x86.ActiveCfg = Release|Any CPU + {73F06253-A776-422E-B9AA-823991B32BA8}.Release|x86.Build.0 = Release|Any CPU + {73F06253-A776-422E-B9AA-823991B32BA8}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {73F06253-A776-422E-B9AA-823991B32BA8}.Checked|arm.ActiveCfg = Debug|Any CPU + {73F06253-A776-422E-B9AA-823991B32BA8}.Checked|arm64.ActiveCfg = Debug|Any CPU + {73F06253-A776-422E-B9AA-823991B32BA8}.Checked|x64.ActiveCfg = Debug|Any CPU + {73F06253-A776-422E-B9AA-823991B32BA8}.Checked|x86.ActiveCfg = Debug|Any CPU + {A43B9D52-FCB0-4C2A-82B0-34377608DD98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A43B9D52-FCB0-4C2A-82B0-34377608DD98}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A43B9D52-FCB0-4C2A-82B0-34377608DD98}.Debug|arm.ActiveCfg = Debug|Any CPU + {A43B9D52-FCB0-4C2A-82B0-34377608DD98}.Debug|arm64.ActiveCfg = Debug|Any CPU + {A43B9D52-FCB0-4C2A-82B0-34377608DD98}.Debug|x64.ActiveCfg = Debug|Any CPU + {A43B9D52-FCB0-4C2A-82B0-34377608DD98}.Debug|x64.Build.0 = Debug|Any CPU + {A43B9D52-FCB0-4C2A-82B0-34377608DD98}.Debug|x86.ActiveCfg = Debug|Any CPU + {A43B9D52-FCB0-4C2A-82B0-34377608DD98}.Debug|x86.Build.0 = Debug|Any CPU + {A43B9D52-FCB0-4C2A-82B0-34377608DD98}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A43B9D52-FCB0-4C2A-82B0-34377608DD98}.Release|Any CPU.Build.0 = Release|Any CPU + {A43B9D52-FCB0-4C2A-82B0-34377608DD98}.Release|arm.ActiveCfg = Release|Any CPU + {A43B9D52-FCB0-4C2A-82B0-34377608DD98}.Release|arm64.ActiveCfg = Release|Any CPU + {A43B9D52-FCB0-4C2A-82B0-34377608DD98}.Release|x64.ActiveCfg = Release|Any CPU + {A43B9D52-FCB0-4C2A-82B0-34377608DD98}.Release|x64.Build.0 = Release|Any CPU + {A43B9D52-FCB0-4C2A-82B0-34377608DD98}.Release|x86.ActiveCfg = Release|Any CPU + {A43B9D52-FCB0-4C2A-82B0-34377608DD98}.Release|x86.Build.0 = Release|Any CPU + {A43B9D52-FCB0-4C2A-82B0-34377608DD98}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {A43B9D52-FCB0-4C2A-82B0-34377608DD98}.Checked|arm.ActiveCfg = Debug|Any CPU + {A43B9D52-FCB0-4C2A-82B0-34377608DD98}.Checked|arm64.ActiveCfg = Debug|Any CPU + {A43B9D52-FCB0-4C2A-82B0-34377608DD98}.Checked|x64.ActiveCfg = Debug|Any CPU + {A43B9D52-FCB0-4C2A-82B0-34377608DD98}.Checked|x86.ActiveCfg = Debug|Any CPU + {B429DF7B-86B7-4134-BFCE-351300338853}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B429DF7B-86B7-4134-BFCE-351300338853}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B429DF7B-86B7-4134-BFCE-351300338853}.Debug|arm.ActiveCfg = Debug|Any CPU + {B429DF7B-86B7-4134-BFCE-351300338853}.Debug|arm64.ActiveCfg = Debug|Any CPU + {B429DF7B-86B7-4134-BFCE-351300338853}.Debug|x64.ActiveCfg = Debug|Any CPU + {B429DF7B-86B7-4134-BFCE-351300338853}.Debug|x64.Build.0 = Debug|Any CPU + {B429DF7B-86B7-4134-BFCE-351300338853}.Debug|x86.ActiveCfg = Debug|Any CPU + {B429DF7B-86B7-4134-BFCE-351300338853}.Debug|x86.Build.0 = Debug|Any CPU + {B429DF7B-86B7-4134-BFCE-351300338853}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B429DF7B-86B7-4134-BFCE-351300338853}.Release|Any CPU.Build.0 = Release|Any CPU + {B429DF7B-86B7-4134-BFCE-351300338853}.Release|arm.ActiveCfg = Release|Any CPU + {B429DF7B-86B7-4134-BFCE-351300338853}.Release|arm64.ActiveCfg = Release|Any CPU + {B429DF7B-86B7-4134-BFCE-351300338853}.Release|x64.ActiveCfg = Release|Any CPU + {B429DF7B-86B7-4134-BFCE-351300338853}.Release|x64.Build.0 = Release|Any CPU + {B429DF7B-86B7-4134-BFCE-351300338853}.Release|x86.ActiveCfg = Release|Any CPU + {B429DF7B-86B7-4134-BFCE-351300338853}.Release|x86.Build.0 = Release|Any CPU + {B429DF7B-86B7-4134-BFCE-351300338853}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {B429DF7B-86B7-4134-BFCE-351300338853}.Checked|arm.ActiveCfg = Debug|Any CPU + {B429DF7B-86B7-4134-BFCE-351300338853}.Checked|arm64.ActiveCfg = Debug|Any CPU + {B429DF7B-86B7-4134-BFCE-351300338853}.Checked|x64.ActiveCfg = Debug|Any CPU + {B429DF7B-86B7-4134-BFCE-351300338853}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {1F14F4DD-AE65-407B-9E10-F5786A847AD6} = {C50DDA85-E391-4BC7-BF37-758B9CD35CF3} - {F4D0710C-6A53-44F9-A28B-63F008FEF808} = {C50DDA85-E391-4BC7-BF37-758B9CD35CF3} + {1F14F4DD-AE65-407B-9E10-F5786A847AD6} = {6BC1276F-47F0-40C0-BA63-C89C4D4BA0C9} {387778C0-0405-4FE2-9D85-034254EAAD46} = {CCC80DF2-8B4E-497C-84A9-4E6344294566} {3DD929D8-346F-4CF3-B157-22E052F73A91} = {CCC80DF2-8B4E-497C-84A9-4E6344294566} {AB7F1F45-5C20-40C7-B6DA-192B37012DD8} = {A928B9C7-28EC-4D20-9A63-87221C52EC87} @@ -280,6 +404,15 @@ Global {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} + {F4D0710C-6A53-44F9-A28B-63F008FEF808} = {C50DDA85-E391-4BC7-BF37-758B9CD35CF3} + {24A2CE1A-6995-477E-925D-BA928E909F36} = {063A0284-C30F-4DEE-BFD8-EDC926C057CD} + {1DEE16F0-CA56-4315-B87F-CF80C689A77C} = {063A0284-C30F-4DEE-BFD8-EDC926C057CD} + {063A0284-C30F-4DEE-BFD8-EDC926C057CD} = {382C1313-228D-4211-9C54-AB54CE678707} + {73F06253-A776-422E-B9AA-823991B32BA8} = {D58ED978-7B6A-43B7-9DBC-D11DA1268F7F} + {A43B9D52-FCB0-4C2A-82B0-34377608DD98} = {D58ED978-7B6A-43B7-9DBC-D11DA1268F7F} + {D58ED978-7B6A-43B7-9DBC-D11DA1268F7F} = {382C1313-228D-4211-9C54-AB54CE678707} + {B429DF7B-86B7-4134-BFCE-351300338853} = {C7BB3EDC-0980-4B04-AE10-62AC9BD51FB9} + {C7BB3EDC-0980-4B04-AE10-62AC9BD51FB9} = {382C1313-228D-4211-9C54-AB54CE678707} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {859F6F1F-8DF9-4E85-B288-50B9149EDD81} diff --git a/src/libraries/System.Threading/tests/AutoResetEventTests.cs b/src/libraries/System.Threading/tests/AutoResetEventTests.cs index e79a5719664acc..7a9ea944d79023 100644 --- a/src/libraries/System.Threading/tests/AutoResetEventTests.cs +++ b/src/libraries/System.Threading/tests/AutoResetEventTests.cs @@ -205,6 +205,7 @@ public void WaitHandleWaitAny() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void PingPong() { using (AutoResetEvent are1 = new AutoResetEvent(true), are2 = new AutoResetEvent(false)) diff --git a/src/libraries/System.Threading/tests/BarrierTests.cs b/src/libraries/System.Threading/tests/BarrierTests.cs index c6b8640cb58d29..438c1115c997ae 100644 --- a/src/libraries/System.Threading/tests/BarrierTests.cs +++ b/src/libraries/System.Threading/tests/BarrierTests.cs @@ -292,6 +292,7 @@ public static void RunBarrierTest7a() /// /// True if the test succeeded, false otherwise [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void RunBarrierTest8_PostPhaseException() { bool shouldThrow = true; diff --git a/src/libraries/System.Threading/tests/ExecutionContextTests.cs b/src/libraries/System.Threading/tests/ExecutionContextTests.cs index 178a6dc1794170..b5f097ed88dead 100644 --- a/src/libraries/System.Threading/tests/ExecutionContextTests.cs +++ b/src/libraries/System.Threading/tests/ExecutionContextTests.cs @@ -11,6 +11,7 @@ namespace System.Threading.Tests public static class ExecutionContextTests { [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void CreateCopyTest() { ThreadTestHelpers.RunTestInBackgroundThread(() => @@ -62,6 +63,7 @@ public static void DisposeTest() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void FlowTest() { ThreadTestHelpers.RunTestInBackgroundThread(() => @@ -179,6 +181,7 @@ public static void FlowTest() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void CaptureThenSuppressThenRunFlowTest() { ThreadTestHelpers.RunTestInBackgroundThread(() => @@ -265,6 +268,7 @@ private static void VerifyExecutionContextFlow(AsyncLocal asyncLocal, int e } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void AsyncFlowControlTest() { ThreadTestHelpers.RunTestInBackgroundThread(() => diff --git a/src/libraries/System.Threading/tests/HostExecutionContextManagerTests.cs b/src/libraries/System.Threading/tests/HostExecutionContextManagerTests.cs index def163c73e6089..64473b11bbb668 100644 --- a/src/libraries/System.Threading/tests/HostExecutionContextManagerTests.cs +++ b/src/libraries/System.Threading/tests/HostExecutionContextManagerTests.cs @@ -8,6 +8,7 @@ namespace System.Threading.Tests public static class HostExecutionContextManagerTests { [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void BasicTest() { ThreadTestHelpers.RunTestInBackgroundThread(() => diff --git a/src/libraries/System.Threading/tests/InterlockedTests.cs b/src/libraries/System.Threading/tests/InterlockedTests.cs index 933404fdbfd76f..6e2d4c99cacc8d 100644 --- a/src/libraries/System.Threading/tests/InterlockedTests.cs +++ b/src/libraries/System.Threading/tests/InterlockedTests.cs @@ -461,6 +461,7 @@ public void InterlockedOr_UInt64() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void InterlockedIncrement_Multithreaded_Int32() { const int ThreadCount = 10; @@ -498,6 +499,7 @@ public void InterlockedIncrement_Multithreaded_Int32() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void InterlockedCompareExchange_Multithreaded_Double() { const int ThreadCount = 10; @@ -546,6 +548,7 @@ public void InterlockedCompareExchange_Multithreaded_Double() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void InterlockedAddAndRead_Multithreaded_Int64() { const int ThreadCount = 10; @@ -621,6 +624,7 @@ public void MemoryBarrierIntrinsic() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void MemoryBarrierProcessWide() { // Stress MemoryBarrierProcessWide correctness using a simple AsymmetricLock diff --git a/src/libraries/System.Threading/tests/ManualResetEventTests.cs b/src/libraries/System.Threading/tests/ManualResetEventTests.cs index d75930ae5d3b35..67667605c9e089 100644 --- a/src/libraries/System.Threading/tests/ManualResetEventTests.cs +++ b/src/libraries/System.Threading/tests/ManualResetEventTests.cs @@ -148,6 +148,7 @@ public void WaitHandleWaitAny() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void PingPong() { using (ManualResetEvent mre1 = new ManualResetEvent(true), mre2 = new ManualResetEvent(false)) diff --git a/src/libraries/System.Threading/tests/MonitorTests.cs b/src/libraries/System.Threading/tests/MonitorTests.cs index b596522385e73b..50074a1e241096 100644 --- a/src/libraries/System.Threading/tests/MonitorTests.cs +++ b/src/libraries/System.Threading/tests/MonitorTests.cs @@ -65,6 +65,7 @@ public static void IsEntered() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void IsEntered_WhenHeldBySomeoneElse_ThrowsSynchronizationLockException() { var obj = new object(); @@ -216,6 +217,7 @@ public static void TryEnter_Invalid() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void Enter_HasToWait() { var thinLock = new object(); @@ -414,6 +416,7 @@ public static void Wait_Invalid() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void WaitTest() { var obj = new object(); @@ -450,6 +453,7 @@ public static void WaitTest() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void Enter_HasToWait_LockContentionCountTest() { long initialLockContentionCount = Monitor.LockContentionCount; @@ -458,6 +462,7 @@ public static void Enter_HasToWait_LockContentionCountTest() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void ObjectHeaderSyncBlockTransitionTryEnterRaceTest() { var threadStarted = new AutoResetEvent(false); diff --git a/src/libraries/System.Threading/tests/MutexTests.cs b/src/libraries/System.Threading/tests/MutexTests.cs index 6b06baeb760344..cba95a622af7a4 100644 --- a/src/libraries/System.Threading/tests/MutexTests.cs +++ b/src/libraries/System.Threading/tests/MutexTests.cs @@ -202,6 +202,7 @@ public void MultiWaitWithAllIndexesLockedTest() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void MutualExclusionTest() { var threadLocked = new AutoResetEvent(false); @@ -286,6 +287,7 @@ public void Ctor_TryCreateGlobalMutexTest_Uwp() } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [MemberData(nameof(GetValidNames))] public void OpenExisting(string name) { @@ -421,6 +423,7 @@ public static IEnumerable AbandonExisting_MemberData() } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91547", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [MemberData(nameof(AbandonExisting_MemberData))] public void AbandonExisting( string name, @@ -661,6 +664,7 @@ private static void IncrementValueInFileNTimes(Mutex mutex, string fileName, int } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void NamedMutex_ThreadExitDisposeRaceTest() { var mutexName = Guid.NewGuid().ToString("N"); @@ -721,6 +725,7 @@ public void NamedMutex_ThreadExitDisposeRaceTest() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void NamedMutex_DisposeWhenLockedRaceTest() { var mutexName = Guid.NewGuid().ToString("N"); diff --git a/src/libraries/System.Threading/tests/ReaderWriterLockSlimTests.cs b/src/libraries/System.Threading/tests/ReaderWriterLockSlimTests.cs index d4569737e35078..efd4abafc19c0d 100644 --- a/src/libraries/System.Threading/tests/ReaderWriterLockSlimTests.cs +++ b/src/libraries/System.Threading/tests/ReaderWriterLockSlimTests.cs @@ -177,6 +177,7 @@ public static void DeadlockAvoidance() } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [InlineData(LockRecursionPolicy.NoRecursion)] [InlineData(LockRecursionPolicy.SupportsRecursion)] public static void InvalidExits(LockRecursionPolicy policy) @@ -321,6 +322,7 @@ public static void ReadersMayBeConcurrent() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void WriterToWriterChain() { using (AutoResetEvent are = new AutoResetEvent(false)) @@ -341,6 +343,7 @@ public static void WriterToWriterChain() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void WriterToReaderChain() { using (AutoResetEvent are = new AutoResetEvent(false)) @@ -361,6 +364,7 @@ public static void WriterToReaderChain() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void WriterToUpgradeableReaderChain() { using (AutoResetEvent are = new AutoResetEvent(false)) diff --git a/src/libraries/System.Threading/tests/ReaderWriterLockTests.cs b/src/libraries/System.Threading/tests/ReaderWriterLockTests.cs index 3ee587edc6318c..2775fccde7042c 100644 --- a/src/libraries/System.Threading/tests/ReaderWriterLockTests.cs +++ b/src/libraries/System.Threading/tests/ReaderWriterLockTests.cs @@ -87,6 +87,7 @@ public static void ShouldNotBeOwnerForRestoreLockTest() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void InvalidLockCookieTest() { // Invalid lock cookie created by using one up with Upgrade/Downgrade @@ -122,6 +123,7 @@ public static void InvalidLockCookieTest() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void BasicLockTest() { var trwl = new TestReaderWriterLock(); @@ -499,6 +501,7 @@ public static void DowngradeQuirks_ChangedInDotNetCore() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void WaitingReadersTest() { var trwl = new TestReaderWriterLock(); @@ -529,6 +532,7 @@ public static void WaitingReadersTest() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void WaitingWritersTest() { var trwl = new TestReaderWriterLock(); @@ -560,6 +564,7 @@ public static void WaitingWritersTest() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void ReadersWaitingOnWaitingWriterTest() { var trwl = new TestReaderWriterLock(); @@ -610,6 +615,7 @@ public static void ReadersWaitingOnWaitingWriterTest() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void ReadersWaitingOnWaitingUpgraderTest() { var trwl = new TestReaderWriterLock(); @@ -663,6 +669,7 @@ public static void ReadersWaitingOnWaitingUpgraderTest() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void WaitingUpgradersTest() { var trwl = new TestReaderWriterLock(); @@ -708,6 +715,7 @@ public static void WaitingUpgradersTest() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void AtomicRecursiveReaderTest() { var trwl = new TestReaderWriterLock(); @@ -734,6 +742,7 @@ public static void AtomicRecursiveReaderTest() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void AtomicDowngradeTest() { var trwl = new TestReaderWriterLock(); diff --git a/src/libraries/System.Threading/tests/SemaphoreSlimTests.cs b/src/libraries/System.Threading/tests/SemaphoreSlimTests.cs index 7aabd01c39f1e2..4c2c5cc53a5249 100644 --- a/src/libraries/System.Threading/tests/SemaphoreSlimTests.cs +++ b/src/libraries/System.Threading/tests/SemaphoreSlimTests.cs @@ -72,6 +72,7 @@ public static void RunSemaphoreSlimTest1_Wait_NegativeCases() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void RunSemaphoreSlimTest1_WaitAsync() { // Infinite timeout @@ -90,6 +91,7 @@ public static void RunSemaphoreSlimTest1_WaitAsync() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void RunSemaphoreSlimTest1_WaitAsync_NegativeCases() { // Invalid timeout @@ -462,6 +464,7 @@ private static void RunSemaphoreSlimTest7_AvailableWaitHandle_Helper(int initial /// The final semaphore count /// True if the test succeeded, false otherwise [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [InlineData(5, 1000, 50, 50, 50, 0, 5, 1000)] [InlineData(0, 1000, 50, 25, 25, 25, 0, 500)] [InlineData(0, 1000, 50, 0, 0, 50, 0, 100)] @@ -528,6 +531,7 @@ public static void RunSemaphoreSlimTest8_ConcWaitAndRelease(int initial, int max /// The final semaphore count /// True if the test succeeded, false otherwise [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [InlineData(5, 1000, 50, 50, 50, 0, 5, 500)] [InlineData(0, 1000, 50, 25, 25, 25, 0, 500)] [InlineData(0, 1000, 50, 0, 0, 50, 0, 100)] diff --git a/src/libraries/System.Threading/tests/SemaphoreTests.cs b/src/libraries/System.Threading/tests/SemaphoreTests.cs index 200728cfb9406f..3c1fd77c54e239 100644 --- a/src/libraries/System.Threading/tests/SemaphoreTests.cs +++ b/src/libraries/System.Threading/tests/SemaphoreTests.cs @@ -278,6 +278,7 @@ public void CanWaitWithoutBlockingForReleasedCount() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] [ActiveIssue("https://github.com/dotnet/runtime/issues/49890", TestPlatforms.Android)] public void AnonymousProducerConsumer() { diff --git a/src/libraries/System.Threading/tests/SpinLockTests.cs b/src/libraries/System.Threading/tests/SpinLockTests.cs index 5b027b32a58430..f07d4edcdf5480 100644 --- a/src/libraries/System.Threading/tests/SpinLockTests.cs +++ b/src/libraries/System.Threading/tests/SpinLockTests.cs @@ -13,6 +13,7 @@ namespace System.Threading.Tests public class SpinLockTests { [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void EnterExit() { var sl = new SpinLock(); diff --git a/src/libraries/System.Threading/tests/ThreadLocalTests.cs b/src/libraries/System.Threading/tests/ThreadLocalTests.cs index 7d9335c04a3123..825f9977dee0b5 100644 --- a/src/libraries/System.Threading/tests/ThreadLocalTests.cs +++ b/src/libraries/System.Threading/tests/ThreadLocalTests.cs @@ -60,6 +60,7 @@ public static void RunThreadLocalTest3_IsValueCreated() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void RunThreadLocalTest4_Value() { ThreadLocal tlocal = null; @@ -356,6 +357,7 @@ public static void RunThreadLocalTest8_Values_NegativeCases() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void RunThreadLocalTest9_Uninitialized() { for (int iter = 0; iter < 10; iter++) @@ -438,6 +440,7 @@ public static void ValuesGetterDoesNotThrowUnexpectedExceptionWhenDisposed() private enum UniqueEnumUsedOnlyWithNonInterferenceTest { True, False } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public static void TestUnrelatedThreadLocalDoesNotInterfereWithTrackAllValues() { ThreadLocal localThatDoesNotTrackValues = new ThreadLocal(false); diff --git a/src/libraries/System.Transactions.Local/System.Transactions.Local.sln b/src/libraries/System.Transactions.Local/System.Transactions.Local.sln index 79551dd2cbc430..6d5009f11eeb99 100644 --- a/src/libraries/System.Transactions.Local/System.Transactions.Local.sln +++ b/src/libraries/System.Transactions.Local/System.Transactions.Local.sln @@ -19,6 +19,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Transactions.Local", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Transactions.Local.Tests", "tests\System.Transactions.Local.Tests.csproj", "{C5519C4C-69AF-4437-8594-D2A019119988}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{EB7DBBB8-0923-48C1-AB88-F3FF987C2449}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{14F12A3F-AA5E-4F20-B8E6-DFCCEE1FBB71}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{2B4AEC4E-E5B8-402D-B938-65C8D8ED0248}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{5345D79E-E437-431E-BB9C-65AC54626DC0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{95F76D76-11E8-4551-8786-D304D698C91B}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{E66BBFB5-F07D-4986-89C0-F0E395DD5BA1}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{B4E1F144-E017-4E02-8320-DB7467E42BF8}" @@ -27,6 +37,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{2ECC9D1A-2EF EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{9D6D84CE-3891-482B-B7C0-0089CF93CF45}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{19FA1AAF-FBDF-4CF9-A432-8A98400E8598}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{29620C15-7580-40A6-A591-73A49C572FA2}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{C394810F-6A50-48E6-BCAB-91C55AEB92AA}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{770FE0B0-1496-4DBA-9E91-FAA63BE58272}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -73,6 +91,26 @@ Global {C5519C4C-69AF-4437-8594-D2A019119988}.Debug|Any CPU.Build.0 = Debug|Any CPU {C5519C4C-69AF-4437-8594-D2A019119988}.Release|Any CPU.ActiveCfg = Release|Any CPU {C5519C4C-69AF-4437-8594-D2A019119988}.Release|Any CPU.Build.0 = Release|Any CPU + {EB7DBBB8-0923-48C1-AB88-F3FF987C2449}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EB7DBBB8-0923-48C1-AB88-F3FF987C2449}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EB7DBBB8-0923-48C1-AB88-F3FF987C2449}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EB7DBBB8-0923-48C1-AB88-F3FF987C2449}.Release|Any CPU.Build.0 = Release|Any CPU + {14F12A3F-AA5E-4F20-B8E6-DFCCEE1FBB71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {14F12A3F-AA5E-4F20-B8E6-DFCCEE1FBB71}.Debug|Any CPU.Build.0 = Debug|Any CPU + {14F12A3F-AA5E-4F20-B8E6-DFCCEE1FBB71}.Release|Any CPU.ActiveCfg = Release|Any CPU + {14F12A3F-AA5E-4F20-B8E6-DFCCEE1FBB71}.Release|Any CPU.Build.0 = Release|Any CPU + {2B4AEC4E-E5B8-402D-B938-65C8D8ED0248}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2B4AEC4E-E5B8-402D-B938-65C8D8ED0248}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2B4AEC4E-E5B8-402D-B938-65C8D8ED0248}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2B4AEC4E-E5B8-402D-B938-65C8D8ED0248}.Release|Any CPU.Build.0 = Release|Any CPU + {5345D79E-E437-431E-BB9C-65AC54626DC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5345D79E-E437-431E-BB9C-65AC54626DC0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5345D79E-E437-431E-BB9C-65AC54626DC0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5345D79E-E437-431E-BB9C-65AC54626DC0}.Release|Any CPU.Build.0 = Release|Any CPU + {95F76D76-11E8-4551-8786-D304D698C91B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {95F76D76-11E8-4551-8786-D304D698C91B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {95F76D76-11E8-4551-8786-D304D698C91B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {95F76D76-11E8-4551-8786-D304D698C91B}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -88,6 +126,14 @@ Global {2A01A433-50B7-4CFA-AA76-CB51971535BB} = {2ECC9D1A-2EF1-4411-98D1-AFFCDAAF9D05} {193FBAA0-BAE2-484A-BB0E-1ADDDC810FC9} = {2ECC9D1A-2EF1-4411-98D1-AFFCDAAF9D05} {6BFF19CB-C412-4D12-AA55-68D61F69C4F7} = {9D6D84CE-3891-482B-B7C0-0089CF93CF45} + {EB7DBBB8-0923-48C1-AB88-F3FF987C2449} = {19FA1AAF-FBDF-4CF9-A432-8A98400E8598} + {14F12A3F-AA5E-4F20-B8E6-DFCCEE1FBB71} = {19FA1AAF-FBDF-4CF9-A432-8A98400E8598} + {19FA1AAF-FBDF-4CF9-A432-8A98400E8598} = {770FE0B0-1496-4DBA-9E91-FAA63BE58272} + {2B4AEC4E-E5B8-402D-B938-65C8D8ED0248} = {29620C15-7580-40A6-A591-73A49C572FA2} + {5345D79E-E437-431E-BB9C-65AC54626DC0} = {29620C15-7580-40A6-A591-73A49C572FA2} + {29620C15-7580-40A6-A591-73A49C572FA2} = {770FE0B0-1496-4DBA-9E91-FAA63BE58272} + {95F76D76-11E8-4551-8786-D304D698C91B} = {C394810F-6A50-48E6-BCAB-91C55AEB92AA} + {C394810F-6A50-48E6-BCAB-91C55AEB92AA} = {770FE0B0-1496-4DBA-9E91-FAA63BE58272} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {197B13C9-4EA6-408B-8EF6-B551B2A58A89} diff --git a/src/libraries/System.Transactions.Local/tests/AsyncTransactionScopeTests.cs b/src/libraries/System.Transactions.Local/tests/AsyncTransactionScopeTests.cs index ff5c050292fcff..ac8feb13d492cf 100644 --- a/src/libraries/System.Transactions.Local/tests/AsyncTransactionScopeTests.cs +++ b/src/libraries/System.Transactions.Local/tests/AsyncTransactionScopeTests.cs @@ -437,6 +437,7 @@ public void AsyncTSTest(int variation) [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] [InlineData(true, false, null)] [InlineData(true, true, null)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void AsyncTSAndDependantClone(bool requiresNew, bool synchronizeScope, string txId) { string txId1 = null; @@ -527,6 +528,7 @@ public void AsyncTSAndDependantClone(bool requiresNew, bool synchronizeScope, st [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] [InlineData(true, false, null)] [InlineData(true, true, null)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void NestedAsyncTSAndDependantClone(bool parentrequiresNew, bool childRequiresNew, string txId) { string txId1; @@ -1107,6 +1109,7 @@ public void VerifyBYOT(TransactionScopeAsyncFlowOption asyncFlowOption) } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))] public void VerifyBYOTOpenConnSimulationTest() { // Create threads to do work diff --git a/src/libraries/System.ValueTuple/tests/ValueTupleTests.cs b/src/libraries/System.ValueTuple/tests/ValueTupleTests.cs index 9507b31388b1f8..147b4ea9647cbf 100644 --- a/src/libraries/System.ValueTuple/tests/ValueTupleTests.cs +++ b/src/libraries/System.ValueTuple/tests/ValueTupleTests.cs @@ -799,6 +799,12 @@ public static void OneTuples() Assert.False(((IStructuralEquatable)sc).Equals(sc, DummyTestEqualityComparer.Instance)); + Assert.True(ValueTuple.Create(1).Equals(ValueTuple.Create(1))); + Assert.False(ValueTuple.Create(1).Equals(ValueTuple.Create(0))); + + Assert.True(((IStructuralEquatable)ValueTuple.Create(1)).Equals(ValueTuple.Create(1), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)ValueTuple.Create(1)).Equals(ValueTuple.Create(0), TestEqualityComparer.Instance)); + Assert.Equal("(1, 2, 3, 4, 5, 6, 7, 1)", CreateLong(1, 2, 3, 4, 5, 6, 7, ValueTuple.Create(1)).ToString()); var vtWithNull = new ValueTuple(null); @@ -831,6 +837,14 @@ public static void TwoTuples() Assert.False(((IStructuralEquatable)sc).Equals(sc, DummyTestEqualityComparer.Instance)); + Assert.True(ValueTuple.Create(1, 2).Equals(ValueTuple.Create(1, 2))); + Assert.False(ValueTuple.Create(1, 2).Equals(ValueTuple.Create(0, 2))); + Assert.False(ValueTuple.Create(1, 2).Equals(ValueTuple.Create(1, 0))); + + Assert.True(((IStructuralEquatable)ValueTuple.Create(1, 2)).Equals(ValueTuple.Create(1, 2), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)ValueTuple.Create(1, 2)).Equals(ValueTuple.Create(0, 2), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)ValueTuple.Create(1, 2)).Equals(ValueTuple.Create(1, 0), TestEqualityComparer.Instance)); + Assert.Equal("(1, 2, 3, 4, 5, 6, 7, 1, 2)", CreateLong(1, 2, 3, 4, 5, 6, 7, ValueTuple.Create(1, 2)).ToString()); var vtWithNull = new ValueTuple(null, null); @@ -866,6 +880,16 @@ public static void ThreeTuples() Assert.False(((IStructuralEquatable)sc).Equals(sc, DummyTestEqualityComparer.Instance)); + Assert.True(ValueTuple.Create(1, 2, 3).Equals(ValueTuple.Create(1, 2, 3))); + Assert.False(ValueTuple.Create(1, 2, 3).Equals(ValueTuple.Create(0, 2, 3))); + Assert.False(ValueTuple.Create(1, 2, 3).Equals(ValueTuple.Create(1, 0, 3))); + Assert.False(ValueTuple.Create(1, 2, 3).Equals(ValueTuple.Create(1, 2, 0))); + + Assert.True(((IStructuralEquatable)ValueTuple.Create(1, 2, 3)).Equals(ValueTuple.Create(1, 2, 3), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)ValueTuple.Create(1, 2, 3)).Equals(ValueTuple.Create(0, 2, 3), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)ValueTuple.Create(1, 2, 3)).Equals(ValueTuple.Create(1, 0, 3), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)ValueTuple.Create(1, 2, 3)).Equals(ValueTuple.Create(1, 2, 0), TestEqualityComparer.Instance)); + Assert.Equal("(1, 2, 3, 4, 5, 6, 7, 1, 2, 3)", CreateLong(1, 2, 3, 4, 5, 6, 7, ValueTuple.Create(1, 2, 3)).ToString()); var vtWithNull = new ValueTuple(null, null, null); @@ -905,6 +929,18 @@ public static void FourTuples() Assert.False(((IStructuralEquatable)sc).Equals(sc, DummyTestEqualityComparer.Instance)); + Assert.True(ValueTuple.Create(1, 2, 3, 4).Equals(ValueTuple.Create(1, 2, 3, 4))); + Assert.False(ValueTuple.Create(1, 2, 3, 4).Equals(ValueTuple.Create(0, 2, 3, 4))); + Assert.False(ValueTuple.Create(1, 2, 3, 4).Equals(ValueTuple.Create(1, 0, 3, 4))); + Assert.False(ValueTuple.Create(1, 2, 3, 4).Equals(ValueTuple.Create(1, 2, 0, 4))); + Assert.False(ValueTuple.Create(1, 2, 3, 4).Equals(ValueTuple.Create(1, 2, 3, 0))); + + Assert.True(((IStructuralEquatable)ValueTuple.Create(1, 2, 3, 4)).Equals(ValueTuple.Create(1, 2, 3, 4), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)ValueTuple.Create(1, 2, 3, 4)).Equals(ValueTuple.Create(0, 2, 3, 4), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)ValueTuple.Create(1, 2, 3, 4)).Equals(ValueTuple.Create(1, 0, 3, 4), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)ValueTuple.Create(1, 2, 3, 4)).Equals(ValueTuple.Create(1, 2, 0, 4), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)ValueTuple.Create(1, 2, 3, 4)).Equals(ValueTuple.Create(1, 2, 3, 0), TestEqualityComparer.Instance)); + Assert.Equal("(1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4)", CreateLong(1, 2, 3, 4, 5, 6, 7, ValueTuple.Create(1, 2, 3, 4)).ToString()); var vtWithNull = new ValueTuple(null, null, null, null); @@ -947,6 +983,20 @@ public static void FiveTuples() Assert.False(((IStructuralEquatable)sc).Equals(sc, DummyTestEqualityComparer.Instance)); + Assert.True(ValueTuple.Create(1, 2, 3, 4, 5).Equals(ValueTuple.Create(1, 2, 3, 4, 5))); + Assert.False(ValueTuple.Create(1, 2, 3, 4, 5).Equals(ValueTuple.Create(0, 2, 3, 4, 5))); + Assert.False(ValueTuple.Create(1, 2, 3, 4, 5).Equals(ValueTuple.Create(1, 0, 3, 4, 5))); + Assert.False(ValueTuple.Create(1, 2, 3, 4, 5).Equals(ValueTuple.Create(1, 2, 0, 4, 5))); + Assert.False(ValueTuple.Create(1, 2, 3, 4, 5).Equals(ValueTuple.Create(1, 2, 3, 0, 5))); + Assert.False(ValueTuple.Create(1, 2, 3, 4, 5).Equals(ValueTuple.Create(1, 2, 3, 4, 0))); + + Assert.True(((IStructuralEquatable)ValueTuple.Create(1, 2, 3, 4, 5)).Equals(ValueTuple.Create(1, 2, 3, 4, 5), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)ValueTuple.Create(1, 2, 3, 4, 5)).Equals(ValueTuple.Create(0, 2, 3, 4, 5), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)ValueTuple.Create(1, 2, 3, 4, 5)).Equals(ValueTuple.Create(1, 0, 3, 4, 5), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)ValueTuple.Create(1, 2, 3, 4, 5)).Equals(ValueTuple.Create(1, 2, 0, 4, 5), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)ValueTuple.Create(1, 2, 3, 4, 5)).Equals(ValueTuple.Create(1, 2, 3, 0, 5), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)ValueTuple.Create(1, 2, 3, 4, 5)).Equals(ValueTuple.Create(1, 2, 3, 4, 0), TestEqualityComparer.Instance)); + Assert.Equal("(1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5)", CreateLong(1, 2, 3, 4, 5, 6, 7, ValueTuple.Create(1, 2, 3, 4, 5)).ToString()); var vtWithNull = new ValueTuple(null, null, null, null, null); @@ -992,6 +1042,22 @@ public static void SixTuples() Assert.False(((IStructuralEquatable)sc).Equals(sc, DummyTestEqualityComparer.Instance)); + Assert.True(ValueTuple.Create(1, 2, 3, 4, 5, 6).Equals(ValueTuple.Create(1, 2, 3, 4, 5, 6))); + Assert.False(ValueTuple.Create(1, 2, 3, 4, 5, 6).Equals(ValueTuple.Create(0, 2, 3, 4, 5, 6))); + Assert.False(ValueTuple.Create(1, 2, 3, 4, 5, 6).Equals(ValueTuple.Create(1, 0, 3, 4, 5, 6))); + Assert.False(ValueTuple.Create(1, 2, 3, 4, 5, 6).Equals(ValueTuple.Create(1, 2, 0, 4, 5, 6))); + Assert.False(ValueTuple.Create(1, 2, 3, 4, 5, 6).Equals(ValueTuple.Create(1, 2, 3, 0, 5, 6))); + Assert.False(ValueTuple.Create(1, 2, 3, 4, 5, 6).Equals(ValueTuple.Create(1, 2, 3, 4, 0, 6))); + Assert.False(ValueTuple.Create(1, 2, 3, 4, 5, 6).Equals(ValueTuple.Create(1, 2, 3, 4, 5, 0))); + + Assert.True(((IStructuralEquatable)ValueTuple.Create(1, 2, 3, 4, 5, 6)).Equals(ValueTuple.Create(1, 2, 3, 4, 5, 6), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)ValueTuple.Create(1, 2, 3, 4, 5, 6)).Equals(ValueTuple.Create(0, 2, 3, 4, 5, 6), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)ValueTuple.Create(1, 2, 3, 4, 5, 6)).Equals(ValueTuple.Create(1, 0, 3, 4, 5, 6), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)ValueTuple.Create(1, 2, 3, 4, 5, 6)).Equals(ValueTuple.Create(1, 2, 0, 4, 5, 6), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)ValueTuple.Create(1, 2, 3, 4, 5, 6)).Equals(ValueTuple.Create(1, 2, 3, 0, 5, 6), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)ValueTuple.Create(1, 2, 3, 4, 5, 6)).Equals(ValueTuple.Create(1, 2, 3, 4, 0, 6), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)ValueTuple.Create(1, 2, 3, 4, 5, 6)).Equals(ValueTuple.Create(1, 2, 3, 4, 5, 0), TestEqualityComparer.Instance)); + Assert.Equal("(1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6)", CreateLong(1, 2, 3, 4, 5, 6, 7, ValueTuple.Create(1, 2, 3, 4, 5, 6)).ToString()); var vtWithNull = new ValueTuple(null, null, null, null, null, null); @@ -1040,6 +1106,24 @@ public static void SevenTuples() Assert.False(((IStructuralEquatable)sc).Equals(sc, DummyTestEqualityComparer.Instance)); + Assert.True(ValueTuple.Create(1, 2, 3, 4, 5, 6, 7).Equals(ValueTuple.Create(1, 2, 3, 4, 5, 6, 7))); + Assert.False(ValueTuple.Create(1, 2, 3, 4, 5, 6, 7).Equals(ValueTuple.Create(0, 2, 3, 4, 5, 6, 7))); + Assert.False(ValueTuple.Create(1, 2, 3, 4, 5, 6, 7).Equals(ValueTuple.Create(1, 0, 3, 4, 5, 6, 7))); + Assert.False(ValueTuple.Create(1, 2, 3, 4, 5, 6, 7).Equals(ValueTuple.Create(1, 2, 0, 4, 5, 6, 7))); + Assert.False(ValueTuple.Create(1, 2, 3, 4, 5, 6, 7).Equals(ValueTuple.Create(1, 2, 3, 0, 5, 6, 7))); + Assert.False(ValueTuple.Create(1, 2, 3, 4, 5, 6, 7).Equals(ValueTuple.Create(1, 2, 3, 4, 0, 6, 7))); + Assert.False(ValueTuple.Create(1, 2, 3, 4, 5, 6, 7).Equals(ValueTuple.Create(1, 2, 3, 4, 5, 0, 7))); + Assert.False(ValueTuple.Create(1, 2, 3, 4, 5, 6, 7).Equals(ValueTuple.Create(1, 2, 3, 4, 5, 6, 0))); + + Assert.True(((IStructuralEquatable)ValueTuple.Create(1, 2, 3, 4, 5, 6, 7)).Equals(ValueTuple.Create(1, 2, 3, 4, 5, 6, 7), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)ValueTuple.Create(1, 2, 3, 4, 5, 6, 7)).Equals(ValueTuple.Create(0, 2, 3, 4, 5, 6, 7), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)ValueTuple.Create(1, 2, 3, 4, 5, 6, 7)).Equals(ValueTuple.Create(1, 0, 3, 4, 5, 6, 7), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)ValueTuple.Create(1, 2, 3, 4, 5, 6, 7)).Equals(ValueTuple.Create(1, 2, 0, 4, 5, 6, 7), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)ValueTuple.Create(1, 2, 3, 4, 5, 6, 7)).Equals(ValueTuple.Create(1, 2, 3, 0, 5, 6, 7), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)ValueTuple.Create(1, 2, 3, 4, 5, 6, 7)).Equals(ValueTuple.Create(1, 2, 3, 4, 0, 6, 7), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)ValueTuple.Create(1, 2, 3, 4, 5, 6, 7)).Equals(ValueTuple.Create(1, 2, 3, 4, 5, 0, 7), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)ValueTuple.Create(1, 2, 3, 4, 5, 6, 7)).Equals(ValueTuple.Create(1, 2, 3, 4, 5, 6, 0), TestEqualityComparer.Instance)); + Assert.Equal("(1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7)", CreateLong(1, 2, 3, 4, 5, 6, 7, ValueTuple.Create(1, 2, 3, 4, 5, 6, 7)).ToString()); var vtWithNull = new ValueTuple(null, null, null, null, null, null, null); @@ -1109,6 +1193,26 @@ public static void EightTuples() Assert.False(se.Equals(t, DummyTestEqualityComparer.Instance)); + Assert.True(CreateLong(1, 2, 3, 4, 5, 6, 7, ValueTuple.Create(8)).Equals(CreateLong(1, 2, 3, 4, 5, 6, 7, ValueTuple.Create(8)))); + Assert.False(CreateLong(1, 2, 3, 4, 5, 6, 7, ValueTuple.Create(8)).Equals(CreateLong(0, 2, 3, 4, 5, 6, 7, ValueTuple.Create(8)))); + Assert.False(CreateLong(1, 2, 3, 4, 5, 6, 7, ValueTuple.Create(8)).Equals(CreateLong(1, 0, 3, 4, 5, 6, 7, ValueTuple.Create(8)))); + Assert.False(CreateLong(1, 2, 3, 4, 5, 6, 7, ValueTuple.Create(8)).Equals(CreateLong(1, 2, 0, 4, 5, 6, 7, ValueTuple.Create(8)))); + Assert.False(CreateLong(1, 2, 3, 4, 5, 6, 7, ValueTuple.Create(8)).Equals(CreateLong(1, 2, 3, 0, 5, 6, 7, ValueTuple.Create(8)))); + Assert.False(CreateLong(1, 2, 3, 4, 5, 6, 7, ValueTuple.Create(8)).Equals(CreateLong(1, 2, 3, 4, 0, 6, 7, ValueTuple.Create(8)))); + Assert.False(CreateLong(1, 2, 3, 4, 5, 6, 7, ValueTuple.Create(8)).Equals(CreateLong(1, 2, 3, 4, 5, 0, 7, ValueTuple.Create(8)))); + Assert.False(CreateLong(1, 2, 3, 4, 5, 6, 7, ValueTuple.Create(8)).Equals(CreateLong(1, 2, 3, 4, 5, 6, 0, ValueTuple.Create(8)))); + Assert.False(CreateLong(1, 2, 3, 4, 5, 6, 7, ValueTuple.Create(8)).Equals(CreateLong(1, 2, 3, 4, 5, 6, 7, ValueTuple.Create(0)))); + + Assert.True(((IStructuralEquatable)CreateLong(1, 2, 3, 4, 5, 6, 7, ValueTuple.Create(8))).Equals(CreateLong(1, 2, 3, 4, 5, 6, 7, ValueTuple.Create(8)), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)CreateLong(1, 2, 3, 4, 5, 6, 7, ValueTuple.Create(8))).Equals(CreateLong(0, 2, 3, 4, 5, 6, 7, ValueTuple.Create(8)), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)CreateLong(1, 2, 3, 4, 5, 6, 7, ValueTuple.Create(8))).Equals(CreateLong(1, 0, 3, 4, 5, 6, 7, ValueTuple.Create(8)), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)CreateLong(1, 2, 3, 4, 5, 6, 7, ValueTuple.Create(8))).Equals(CreateLong(1, 2, 0, 4, 5, 6, 7, ValueTuple.Create(8)), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)CreateLong(1, 2, 3, 4, 5, 6, 7, ValueTuple.Create(8))).Equals(CreateLong(1, 2, 3, 0, 5, 6, 7, ValueTuple.Create(8)), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)CreateLong(1, 2, 3, 4, 5, 6, 7, ValueTuple.Create(8))).Equals(CreateLong(1, 2, 3, 4, 0, 6, 7, ValueTuple.Create(8)), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)CreateLong(1, 2, 3, 4, 5, 6, 7, ValueTuple.Create(8))).Equals(CreateLong(1, 2, 3, 4, 5, 0, 7, ValueTuple.Create(8)), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)CreateLong(1, 2, 3, 4, 5, 6, 7, ValueTuple.Create(8))).Equals(CreateLong(1, 2, 3, 4, 5, 6, 0, ValueTuple.Create(8)), TestEqualityComparer.Instance)); + Assert.False(((IStructuralEquatable)CreateLong(1, 2, 3, 4, 5, 6, 7, ValueTuple.Create(8))).Equals(CreateLong(1, 2, 3, 4, 5, 6, 7, ValueTuple.Create(0)), TestEqualityComparer.Instance)); + // Notice that 0-tuple prints as empty position Assert.Equal("(1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7, )", CreateLong(1, 2, 3, 4, 5, 6, 7, CreateLong(1, 2, 3, 4, 5, 6, 7, ValueTuple.Create())).ToString()); diff --git a/src/libraries/System.Web.HttpUtility/System.Web.HttpUtility.sln b/src/libraries/System.Web.HttpUtility/System.Web.HttpUtility.sln index d1e3fc2cd51c7d..1b4d405697c170 100644 --- a/src/libraries/System.Web.HttpUtility/System.Web.HttpUtility.sln +++ b/src/libraries/System.Web.HttpUtility/System.Web.HttpUtility.sln @@ -25,6 +25,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Web.HttpUtility", "s EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Web.HttpUtility.Tests", "tests\System.Web.HttpUtility.Tests.csproj", "{BA3C5AE7-937C-47E1-B861-1F149499889F}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{56B60109-B617-4465-9043-F4B238E04CF9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{1163DCE9-17D8-492A-9AEE-D8C82A124393}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{D3CDFB2E-9376-4C0B-B09D-B1DC917080D1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{13353E72-F643-4528-8B76-C5C56620376A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{084801E3-5B7E-4738-9AC7-C592773519F9}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{5A13596E-F762-470F-9B2C-92227CC6FF3F}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{E29510E3-01F1-4F13-885C-95690B2D2FDC}" @@ -33,6 +43,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{DB94D23F-DB7 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{36DE8D3F-5AAF-4464-A544-AF32A37307F5}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{8BEACA54-0AFF-4D6A-9151-1BA656DF810D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{46233262-1BBC-4272-B4A3-1D8A2C963033}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{57BBC6ED-E0E4-40AE-8151-D78B45895839}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{50044BC6-C51B-445F-AB0E-3BFC9C4DEAA2}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -91,6 +109,26 @@ Global {BA3C5AE7-937C-47E1-B861-1F149499889F}.Debug|Any CPU.Build.0 = Debug|Any CPU {BA3C5AE7-937C-47E1-B861-1F149499889F}.Release|Any CPU.ActiveCfg = Release|Any CPU {BA3C5AE7-937C-47E1-B861-1F149499889F}.Release|Any CPU.Build.0 = Release|Any CPU + {56B60109-B617-4465-9043-F4B238E04CF9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {56B60109-B617-4465-9043-F4B238E04CF9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {56B60109-B617-4465-9043-F4B238E04CF9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {56B60109-B617-4465-9043-F4B238E04CF9}.Release|Any CPU.Build.0 = Release|Any CPU + {1163DCE9-17D8-492A-9AEE-D8C82A124393}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1163DCE9-17D8-492A-9AEE-D8C82A124393}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1163DCE9-17D8-492A-9AEE-D8C82A124393}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1163DCE9-17D8-492A-9AEE-D8C82A124393}.Release|Any CPU.Build.0 = Release|Any CPU + {D3CDFB2E-9376-4C0B-B09D-B1DC917080D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D3CDFB2E-9376-4C0B-B09D-B1DC917080D1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D3CDFB2E-9376-4C0B-B09D-B1DC917080D1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D3CDFB2E-9376-4C0B-B09D-B1DC917080D1}.Release|Any CPU.Build.0 = Release|Any CPU + {13353E72-F643-4528-8B76-C5C56620376A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {13353E72-F643-4528-8B76-C5C56620376A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {13353E72-F643-4528-8B76-C5C56620376A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {13353E72-F643-4528-8B76-C5C56620376A}.Release|Any CPU.Build.0 = Release|Any CPU + {084801E3-5B7E-4738-9AC7-C592773519F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {084801E3-5B7E-4738-9AC7-C592773519F9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {084801E3-5B7E-4738-9AC7-C592773519F9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {084801E3-5B7E-4738-9AC7-C592773519F9}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -109,6 +147,14 @@ Global {58FC2C69-816F-44D4-AE44-72F8864DFAE1} = {DB94D23F-DB79-455A-9C55-37403C9BE9F6} {02855E32-AB9B-4893-A9E3-50620FCA1287} = {DB94D23F-DB79-455A-9C55-37403C9BE9F6} {C294097C-8171-4FA2-9C58-11A7FE3BEBDA} = {36DE8D3F-5AAF-4464-A544-AF32A37307F5} + {56B60109-B617-4465-9043-F4B238E04CF9} = {8BEACA54-0AFF-4D6A-9151-1BA656DF810D} + {1163DCE9-17D8-492A-9AEE-D8C82A124393} = {8BEACA54-0AFF-4D6A-9151-1BA656DF810D} + {8BEACA54-0AFF-4D6A-9151-1BA656DF810D} = {50044BC6-C51B-445F-AB0E-3BFC9C4DEAA2} + {D3CDFB2E-9376-4C0B-B09D-B1DC917080D1} = {46233262-1BBC-4272-B4A3-1D8A2C963033} + {13353E72-F643-4528-8B76-C5C56620376A} = {46233262-1BBC-4272-B4A3-1D8A2C963033} + {46233262-1BBC-4272-B4A3-1D8A2C963033} = {50044BC6-C51B-445F-AB0E-3BFC9C4DEAA2} + {084801E3-5B7E-4738-9AC7-C592773519F9} = {57BBC6ED-E0E4-40AE-8151-D78B45895839} + {57BBC6ED-E0E4-40AE-8151-D78B45895839} = {50044BC6-C51B-445F-AB0E-3BFC9C4DEAA2} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {F217C7E2-5993-44CD-B205-72A0167F266F} diff --git a/src/libraries/System.Windows.Extensions/System.Windows.Extensions.sln b/src/libraries/System.Windows.Extensions/System.Windows.Extensions.sln index 4c5b9de73effe4..6db9e2a03ffed0 100644 --- a/src/libraries/System.Windows.Extensions/System.Windows.Extensions.sln +++ b/src/libraries/System.Windows.Extensions/System.Windows.Extensions.sln @@ -1,72 +1,490 @@ 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", "{FBB5EE77-1102-4F26-B849-A24205935920}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{E51D8981-999E-4516-82BF-5766CE531E53}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComInterfaceGenerator", "..\System.Runtime.InteropServices\gen\ComInterfaceGenerator\ComInterfaceGenerator.csproj", "{CC29474E-0893-4260-8EEF-40375C300736}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Drawing.Common", "..\shims\stubs\System.Drawing.Common.csproj", "{B7ABB2BF-17E7-4F6E-8773-92B81AC72ECC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib.Generators", "..\System.Private.CoreLib\gen\System.Private.CoreLib.Generators.csproj", "{8DF21599-94FF-4B57-8179-67DA3D54D005}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\System.Private.CoreLib\ref\System.Private.CoreLib.csproj", "{4A8C8CCE-02F6-47E1-A26C-C07778AE8502}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.Uri", "..\System.Private.Uri\src\System.Private.Uri.csproj", "{79A37A2A-E133-486E-9DB5-5FA5147184E1}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", "..\System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj", "{BF9DE7F9-08A1-4482-8F81-2895BB99D651}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{B5485369-6E0E-4F8E-AF41-FA9583C7B1CA}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\ref\System.Runtime.csproj", "{5CE615CA-7003-4F31-A151-9256239CD41F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "..\System.Runtime\src\System.Runtime.csproj", "{9A4570D2-9199-47AA-8178-52ECA60C3A08}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", "ref\System.Windows.Extensions.csproj", "{AFB20E97-6E12-43EA-BA9B-9E8AC0D05C1B}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", "src\System.Windows.Extensions.csproj", "{6324EAB4-058A-4D80-8D99-5DFB7AEA8928}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions.Tests", "tests\System.Windows.Extensions.Tests.csproj", "{5CE6447B-ECCE-461C-918D-A37A7ACDF2AC}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{0DC8A199-8AE6-4FE8-92F4-153D6521279A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{74ECA832-1BC2-4DE9-8CF5-AC8555E11D0E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{F48CEAF9-0FF1-4E58-8AD1-06E2E6BB9C70}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{E21DEB14-DBA3-4BF7-84A1-4C803307C76D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{D50B3619-E571-4DCF-99CD-4C8982717C98}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcsrc", "srcsrc", "{C1F9B6EA-2B79-4304-AB6C-6CB80BEC7F4E}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{2B702044-D081-480E-877C-6CD7A7BDC726}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{099F43C3-B397-4871-AA29-0B32869E7B48}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{45BD3F1C-C44C-484B-8759-41BFCA7CEFF8}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{C881B8F0-59DE-411B-AA11-2729C3273BE2}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{099F43C3-B397-4871-AA29-0B32869E7B48}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{B989E5AC-10EA-4BA6-B093-15448876C7BB}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{D5E0A88B-0CD6-456C-A9FC-B916D3A0A178}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{41782D1F-6C79-437E-AD20-DA5E9D4D274E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{B6F2B9D7-6C55-4EC0-8D1F-A497B4AD4B90}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|arm = Debug|arm + Debug|arm64 = Debug|arm64 + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|arm = Release|arm + Release|arm64 = Release|arm64 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + Checked|Any CPU = Checked|Any CPU + Checked|arm = Checked|arm + Checked|arm64 = Checked|arm64 + Checked|x64 = Checked|x64 + Checked|x86 = Checked|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FBB5EE77-1102-4F26-B849-A24205935920}.Debug|Any CPU.ActiveCfg = Debug|x64 + {FBB5EE77-1102-4F26-B849-A24205935920}.Debug|Any CPU.Build.0 = Debug|x64 + {FBB5EE77-1102-4F26-B849-A24205935920}.Debug|arm.ActiveCfg = Debug|arm + {FBB5EE77-1102-4F26-B849-A24205935920}.Debug|arm.Build.0 = Debug|arm + {FBB5EE77-1102-4F26-B849-A24205935920}.Debug|arm64.ActiveCfg = Debug|arm64 + {FBB5EE77-1102-4F26-B849-A24205935920}.Debug|arm64.Build.0 = Debug|arm64 + {FBB5EE77-1102-4F26-B849-A24205935920}.Debug|x64.ActiveCfg = Debug|x64 + {FBB5EE77-1102-4F26-B849-A24205935920}.Debug|x64.Build.0 = Debug|x64 + {FBB5EE77-1102-4F26-B849-A24205935920}.Debug|x86.ActiveCfg = Debug|x86 + {FBB5EE77-1102-4F26-B849-A24205935920}.Debug|x86.Build.0 = Debug|x86 + {FBB5EE77-1102-4F26-B849-A24205935920}.Release|Any CPU.ActiveCfg = Release|x64 + {FBB5EE77-1102-4F26-B849-A24205935920}.Release|Any CPU.Build.0 = Release|x64 + {FBB5EE77-1102-4F26-B849-A24205935920}.Release|arm.ActiveCfg = Release|arm + {FBB5EE77-1102-4F26-B849-A24205935920}.Release|arm.Build.0 = Release|arm + {FBB5EE77-1102-4F26-B849-A24205935920}.Release|arm64.ActiveCfg = Release|arm64 + {FBB5EE77-1102-4F26-B849-A24205935920}.Release|arm64.Build.0 = Release|arm64 + {FBB5EE77-1102-4F26-B849-A24205935920}.Release|x64.ActiveCfg = Release|x64 + {FBB5EE77-1102-4F26-B849-A24205935920}.Release|x64.Build.0 = Release|x64 + {FBB5EE77-1102-4F26-B849-A24205935920}.Release|x86.ActiveCfg = Release|x86 + {FBB5EE77-1102-4F26-B849-A24205935920}.Release|x86.Build.0 = Release|x86 + {FBB5EE77-1102-4F26-B849-A24205935920}.Checked|Any CPU.ActiveCfg = Checked|x64 + {FBB5EE77-1102-4F26-B849-A24205935920}.Checked|Any CPU.Build.0 = Checked|x64 + {FBB5EE77-1102-4F26-B849-A24205935920}.Checked|arm.ActiveCfg = Checked|arm + {FBB5EE77-1102-4F26-B849-A24205935920}.Checked|arm.Build.0 = Checked|arm + {FBB5EE77-1102-4F26-B849-A24205935920}.Checked|arm64.ActiveCfg = Checked|arm64 + {FBB5EE77-1102-4F26-B849-A24205935920}.Checked|arm64.Build.0 = Checked|arm64 + {FBB5EE77-1102-4F26-B849-A24205935920}.Checked|x64.ActiveCfg = Checked|x64 + {FBB5EE77-1102-4F26-B849-A24205935920}.Checked|x64.Build.0 = Checked|x64 + {FBB5EE77-1102-4F26-B849-A24205935920}.Checked|x86.ActiveCfg = Checked|x86 + {FBB5EE77-1102-4F26-B849-A24205935920}.Checked|x86.Build.0 = Checked|x86 {E51D8981-999E-4516-82BF-5766CE531E53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E51D8981-999E-4516-82BF-5766CE531E53}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E51D8981-999E-4516-82BF-5766CE531E53}.Debug|arm.ActiveCfg = Debug|Any CPU + {E51D8981-999E-4516-82BF-5766CE531E53}.Debug|arm64.ActiveCfg = Debug|Any CPU + {E51D8981-999E-4516-82BF-5766CE531E53}.Debug|x64.ActiveCfg = Debug|Any CPU + {E51D8981-999E-4516-82BF-5766CE531E53}.Debug|x64.Build.0 = Debug|Any CPU + {E51D8981-999E-4516-82BF-5766CE531E53}.Debug|x86.ActiveCfg = Debug|Any CPU + {E51D8981-999E-4516-82BF-5766CE531E53}.Debug|x86.Build.0 = Debug|Any CPU {E51D8981-999E-4516-82BF-5766CE531E53}.Release|Any CPU.ActiveCfg = Release|Any CPU {E51D8981-999E-4516-82BF-5766CE531E53}.Release|Any CPU.Build.0 = Release|Any CPU - {CC29474E-0893-4260-8EEF-40375C300736}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CC29474E-0893-4260-8EEF-40375C300736}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CC29474E-0893-4260-8EEF-40375C300736}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CC29474E-0893-4260-8EEF-40375C300736}.Release|Any CPU.Build.0 = Release|Any CPU + {E51D8981-999E-4516-82BF-5766CE531E53}.Release|arm.ActiveCfg = Release|Any CPU + {E51D8981-999E-4516-82BF-5766CE531E53}.Release|arm64.ActiveCfg = Release|Any CPU + {E51D8981-999E-4516-82BF-5766CE531E53}.Release|x64.ActiveCfg = Release|Any CPU + {E51D8981-999E-4516-82BF-5766CE531E53}.Release|x64.Build.0 = Release|Any CPU + {E51D8981-999E-4516-82BF-5766CE531E53}.Release|x86.ActiveCfg = Release|Any CPU + {E51D8981-999E-4516-82BF-5766CE531E53}.Release|x86.Build.0 = Release|Any CPU + {E51D8981-999E-4516-82BF-5766CE531E53}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {E51D8981-999E-4516-82BF-5766CE531E53}.Checked|arm.ActiveCfg = Debug|Any CPU + {E51D8981-999E-4516-82BF-5766CE531E53}.Checked|arm64.ActiveCfg = Debug|Any CPU + {E51D8981-999E-4516-82BF-5766CE531E53}.Checked|x64.ActiveCfg = Debug|Any CPU + {E51D8981-999E-4516-82BF-5766CE531E53}.Checked|x86.ActiveCfg = Debug|Any CPU + {B7ABB2BF-17E7-4F6E-8773-92B81AC72ECC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B7ABB2BF-17E7-4F6E-8773-92B81AC72ECC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B7ABB2BF-17E7-4F6E-8773-92B81AC72ECC}.Debug|arm.ActiveCfg = Debug|Any CPU + {B7ABB2BF-17E7-4F6E-8773-92B81AC72ECC}.Debug|arm64.ActiveCfg = Debug|Any CPU + {B7ABB2BF-17E7-4F6E-8773-92B81AC72ECC}.Debug|x64.ActiveCfg = Debug|Any CPU + {B7ABB2BF-17E7-4F6E-8773-92B81AC72ECC}.Debug|x64.Build.0 = Debug|Any CPU + {B7ABB2BF-17E7-4F6E-8773-92B81AC72ECC}.Debug|x86.ActiveCfg = Debug|Any CPU + {B7ABB2BF-17E7-4F6E-8773-92B81AC72ECC}.Debug|x86.Build.0 = Debug|Any CPU + {B7ABB2BF-17E7-4F6E-8773-92B81AC72ECC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B7ABB2BF-17E7-4F6E-8773-92B81AC72ECC}.Release|Any CPU.Build.0 = Release|Any CPU + {B7ABB2BF-17E7-4F6E-8773-92B81AC72ECC}.Release|arm.ActiveCfg = Release|Any CPU + {B7ABB2BF-17E7-4F6E-8773-92B81AC72ECC}.Release|arm64.ActiveCfg = Release|Any CPU + {B7ABB2BF-17E7-4F6E-8773-92B81AC72ECC}.Release|x64.ActiveCfg = Release|Any CPU + {B7ABB2BF-17E7-4F6E-8773-92B81AC72ECC}.Release|x64.Build.0 = Release|Any CPU + {B7ABB2BF-17E7-4F6E-8773-92B81AC72ECC}.Release|x86.ActiveCfg = Release|Any CPU + {B7ABB2BF-17E7-4F6E-8773-92B81AC72ECC}.Release|x86.Build.0 = Release|Any CPU + {B7ABB2BF-17E7-4F6E-8773-92B81AC72ECC}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {B7ABB2BF-17E7-4F6E-8773-92B81AC72ECC}.Checked|arm.ActiveCfg = Debug|Any CPU + {B7ABB2BF-17E7-4F6E-8773-92B81AC72ECC}.Checked|arm64.ActiveCfg = Debug|Any CPU + {B7ABB2BF-17E7-4F6E-8773-92B81AC72ECC}.Checked|x64.ActiveCfg = Debug|Any CPU + {B7ABB2BF-17E7-4F6E-8773-92B81AC72ECC}.Checked|x86.ActiveCfg = Debug|Any CPU + {8DF21599-94FF-4B57-8179-67DA3D54D005}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8DF21599-94FF-4B57-8179-67DA3D54D005}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8DF21599-94FF-4B57-8179-67DA3D54D005}.Debug|arm.ActiveCfg = Debug|Any CPU + {8DF21599-94FF-4B57-8179-67DA3D54D005}.Debug|arm64.ActiveCfg = Debug|Any CPU + {8DF21599-94FF-4B57-8179-67DA3D54D005}.Debug|x64.ActiveCfg = Debug|Any CPU + {8DF21599-94FF-4B57-8179-67DA3D54D005}.Debug|x64.Build.0 = Debug|Any CPU + {8DF21599-94FF-4B57-8179-67DA3D54D005}.Debug|x86.ActiveCfg = Debug|Any CPU + {8DF21599-94FF-4B57-8179-67DA3D54D005}.Debug|x86.Build.0 = Debug|Any CPU + {8DF21599-94FF-4B57-8179-67DA3D54D005}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8DF21599-94FF-4B57-8179-67DA3D54D005}.Release|Any CPU.Build.0 = Release|Any CPU + {8DF21599-94FF-4B57-8179-67DA3D54D005}.Release|arm.ActiveCfg = Release|Any CPU + {8DF21599-94FF-4B57-8179-67DA3D54D005}.Release|arm64.ActiveCfg = Release|Any CPU + {8DF21599-94FF-4B57-8179-67DA3D54D005}.Release|x64.ActiveCfg = Release|Any CPU + {8DF21599-94FF-4B57-8179-67DA3D54D005}.Release|x64.Build.0 = Release|Any CPU + {8DF21599-94FF-4B57-8179-67DA3D54D005}.Release|x86.ActiveCfg = Release|Any CPU + {8DF21599-94FF-4B57-8179-67DA3D54D005}.Release|x86.Build.0 = Release|Any CPU + {8DF21599-94FF-4B57-8179-67DA3D54D005}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {8DF21599-94FF-4B57-8179-67DA3D54D005}.Checked|arm.ActiveCfg = Debug|Any CPU + {8DF21599-94FF-4B57-8179-67DA3D54D005}.Checked|arm64.ActiveCfg = Debug|Any CPU + {8DF21599-94FF-4B57-8179-67DA3D54D005}.Checked|x64.ActiveCfg = Debug|Any CPU + {8DF21599-94FF-4B57-8179-67DA3D54D005}.Checked|x86.ActiveCfg = Debug|Any CPU + {4A8C8CCE-02F6-47E1-A26C-C07778AE8502}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4A8C8CCE-02F6-47E1-A26C-C07778AE8502}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4A8C8CCE-02F6-47E1-A26C-C07778AE8502}.Debug|arm.ActiveCfg = Debug|Any CPU + {4A8C8CCE-02F6-47E1-A26C-C07778AE8502}.Debug|arm64.ActiveCfg = Debug|Any CPU + {4A8C8CCE-02F6-47E1-A26C-C07778AE8502}.Debug|x64.ActiveCfg = Debug|Any CPU + {4A8C8CCE-02F6-47E1-A26C-C07778AE8502}.Debug|x64.Build.0 = Debug|Any CPU + {4A8C8CCE-02F6-47E1-A26C-C07778AE8502}.Debug|x86.ActiveCfg = Debug|Any CPU + {4A8C8CCE-02F6-47E1-A26C-C07778AE8502}.Debug|x86.Build.0 = Debug|Any CPU + {4A8C8CCE-02F6-47E1-A26C-C07778AE8502}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4A8C8CCE-02F6-47E1-A26C-C07778AE8502}.Release|Any CPU.Build.0 = Release|Any CPU + {4A8C8CCE-02F6-47E1-A26C-C07778AE8502}.Release|arm.ActiveCfg = Release|Any CPU + {4A8C8CCE-02F6-47E1-A26C-C07778AE8502}.Release|arm64.ActiveCfg = Release|Any CPU + {4A8C8CCE-02F6-47E1-A26C-C07778AE8502}.Release|x64.ActiveCfg = Release|Any CPU + {4A8C8CCE-02F6-47E1-A26C-C07778AE8502}.Release|x64.Build.0 = Release|Any CPU + {4A8C8CCE-02F6-47E1-A26C-C07778AE8502}.Release|x86.ActiveCfg = Release|Any CPU + {4A8C8CCE-02F6-47E1-A26C-C07778AE8502}.Release|x86.Build.0 = Release|Any CPU + {4A8C8CCE-02F6-47E1-A26C-C07778AE8502}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {4A8C8CCE-02F6-47E1-A26C-C07778AE8502}.Checked|arm.ActiveCfg = Debug|Any CPU + {4A8C8CCE-02F6-47E1-A26C-C07778AE8502}.Checked|arm64.ActiveCfg = Debug|Any CPU + {4A8C8CCE-02F6-47E1-A26C-C07778AE8502}.Checked|x64.ActiveCfg = Debug|Any CPU + {4A8C8CCE-02F6-47E1-A26C-C07778AE8502}.Checked|x86.ActiveCfg = Debug|Any CPU + {79A37A2A-E133-486E-9DB5-5FA5147184E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {79A37A2A-E133-486E-9DB5-5FA5147184E1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {79A37A2A-E133-486E-9DB5-5FA5147184E1}.Debug|arm.ActiveCfg = Debug|Any CPU + {79A37A2A-E133-486E-9DB5-5FA5147184E1}.Debug|arm64.ActiveCfg = Debug|Any CPU + {79A37A2A-E133-486E-9DB5-5FA5147184E1}.Debug|x64.ActiveCfg = Debug|Any CPU + {79A37A2A-E133-486E-9DB5-5FA5147184E1}.Debug|x64.Build.0 = Debug|Any CPU + {79A37A2A-E133-486E-9DB5-5FA5147184E1}.Debug|x86.ActiveCfg = Debug|Any CPU + {79A37A2A-E133-486E-9DB5-5FA5147184E1}.Debug|x86.Build.0 = Debug|Any CPU + {79A37A2A-E133-486E-9DB5-5FA5147184E1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {79A37A2A-E133-486E-9DB5-5FA5147184E1}.Release|Any CPU.Build.0 = Release|Any CPU + {79A37A2A-E133-486E-9DB5-5FA5147184E1}.Release|arm.ActiveCfg = Release|Any CPU + {79A37A2A-E133-486E-9DB5-5FA5147184E1}.Release|arm64.ActiveCfg = Release|Any CPU + {79A37A2A-E133-486E-9DB5-5FA5147184E1}.Release|x64.ActiveCfg = Release|Any CPU + {79A37A2A-E133-486E-9DB5-5FA5147184E1}.Release|x64.Build.0 = Release|Any CPU + {79A37A2A-E133-486E-9DB5-5FA5147184E1}.Release|x86.ActiveCfg = Release|Any CPU + {79A37A2A-E133-486E-9DB5-5FA5147184E1}.Release|x86.Build.0 = Release|Any CPU + {79A37A2A-E133-486E-9DB5-5FA5147184E1}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {79A37A2A-E133-486E-9DB5-5FA5147184E1}.Checked|arm.ActiveCfg = Debug|Any CPU + {79A37A2A-E133-486E-9DB5-5FA5147184E1}.Checked|arm64.ActiveCfg = Debug|Any CPU + {79A37A2A-E133-486E-9DB5-5FA5147184E1}.Checked|x64.ActiveCfg = Debug|Any CPU + {79A37A2A-E133-486E-9DB5-5FA5147184E1}.Checked|x86.ActiveCfg = Debug|Any CPU {BF9DE7F9-08A1-4482-8F81-2895BB99D651}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BF9DE7F9-08A1-4482-8F81-2895BB99D651}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BF9DE7F9-08A1-4482-8F81-2895BB99D651}.Debug|arm.ActiveCfg = Debug|Any CPU + {BF9DE7F9-08A1-4482-8F81-2895BB99D651}.Debug|arm64.ActiveCfg = Debug|Any CPU + {BF9DE7F9-08A1-4482-8F81-2895BB99D651}.Debug|x64.ActiveCfg = Debug|Any CPU + {BF9DE7F9-08A1-4482-8F81-2895BB99D651}.Debug|x64.Build.0 = Debug|Any CPU + {BF9DE7F9-08A1-4482-8F81-2895BB99D651}.Debug|x86.ActiveCfg = Debug|Any CPU + {BF9DE7F9-08A1-4482-8F81-2895BB99D651}.Debug|x86.Build.0 = Debug|Any CPU {BF9DE7F9-08A1-4482-8F81-2895BB99D651}.Release|Any CPU.ActiveCfg = Release|Any CPU {BF9DE7F9-08A1-4482-8F81-2895BB99D651}.Release|Any CPU.Build.0 = Release|Any CPU + {BF9DE7F9-08A1-4482-8F81-2895BB99D651}.Release|arm.ActiveCfg = Release|Any CPU + {BF9DE7F9-08A1-4482-8F81-2895BB99D651}.Release|arm64.ActiveCfg = Release|Any CPU + {BF9DE7F9-08A1-4482-8F81-2895BB99D651}.Release|x64.ActiveCfg = Release|Any CPU + {BF9DE7F9-08A1-4482-8F81-2895BB99D651}.Release|x64.Build.0 = Release|Any CPU + {BF9DE7F9-08A1-4482-8F81-2895BB99D651}.Release|x86.ActiveCfg = Release|Any CPU + {BF9DE7F9-08A1-4482-8F81-2895BB99D651}.Release|x86.Build.0 = Release|Any CPU + {BF9DE7F9-08A1-4482-8F81-2895BB99D651}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {BF9DE7F9-08A1-4482-8F81-2895BB99D651}.Checked|arm.ActiveCfg = Debug|Any CPU + {BF9DE7F9-08A1-4482-8F81-2895BB99D651}.Checked|arm64.ActiveCfg = Debug|Any CPU + {BF9DE7F9-08A1-4482-8F81-2895BB99D651}.Checked|x64.ActiveCfg = Debug|Any CPU + {BF9DE7F9-08A1-4482-8F81-2895BB99D651}.Checked|x86.ActiveCfg = Debug|Any CPU {B5485369-6E0E-4F8E-AF41-FA9583C7B1CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5485369-6E0E-4F8E-AF41-FA9583C7B1CA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B5485369-6E0E-4F8E-AF41-FA9583C7B1CA}.Debug|arm.ActiveCfg = Debug|Any CPU + {B5485369-6E0E-4F8E-AF41-FA9583C7B1CA}.Debug|arm64.ActiveCfg = Debug|Any CPU + {B5485369-6E0E-4F8E-AF41-FA9583C7B1CA}.Debug|x64.ActiveCfg = Debug|Any CPU + {B5485369-6E0E-4F8E-AF41-FA9583C7B1CA}.Debug|x64.Build.0 = Debug|Any CPU + {B5485369-6E0E-4F8E-AF41-FA9583C7B1CA}.Debug|x86.ActiveCfg = Debug|Any CPU + {B5485369-6E0E-4F8E-AF41-FA9583C7B1CA}.Debug|x86.Build.0 = Debug|Any CPU {B5485369-6E0E-4F8E-AF41-FA9583C7B1CA}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5485369-6E0E-4F8E-AF41-FA9583C7B1CA}.Release|Any CPU.Build.0 = Release|Any CPU + {B5485369-6E0E-4F8E-AF41-FA9583C7B1CA}.Release|arm.ActiveCfg = Release|Any CPU + {B5485369-6E0E-4F8E-AF41-FA9583C7B1CA}.Release|arm64.ActiveCfg = Release|Any CPU + {B5485369-6E0E-4F8E-AF41-FA9583C7B1CA}.Release|x64.ActiveCfg = Release|Any CPU + {B5485369-6E0E-4F8E-AF41-FA9583C7B1CA}.Release|x64.Build.0 = Release|Any CPU + {B5485369-6E0E-4F8E-AF41-FA9583C7B1CA}.Release|x86.ActiveCfg = Release|Any CPU + {B5485369-6E0E-4F8E-AF41-FA9583C7B1CA}.Release|x86.Build.0 = Release|Any CPU + {B5485369-6E0E-4F8E-AF41-FA9583C7B1CA}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {B5485369-6E0E-4F8E-AF41-FA9583C7B1CA}.Checked|arm.ActiveCfg = Debug|Any CPU + {B5485369-6E0E-4F8E-AF41-FA9583C7B1CA}.Checked|arm64.ActiveCfg = Debug|Any CPU + {B5485369-6E0E-4F8E-AF41-FA9583C7B1CA}.Checked|x64.ActiveCfg = Debug|Any CPU + {B5485369-6E0E-4F8E-AF41-FA9583C7B1CA}.Checked|x86.ActiveCfg = Debug|Any CPU + {5CE615CA-7003-4F31-A151-9256239CD41F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5CE615CA-7003-4F31-A151-9256239CD41F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5CE615CA-7003-4F31-A151-9256239CD41F}.Debug|arm.ActiveCfg = Debug|Any CPU + {5CE615CA-7003-4F31-A151-9256239CD41F}.Debug|arm64.ActiveCfg = Debug|Any CPU + {5CE615CA-7003-4F31-A151-9256239CD41F}.Debug|x64.ActiveCfg = Debug|Any CPU + {5CE615CA-7003-4F31-A151-9256239CD41F}.Debug|x64.Build.0 = Debug|Any CPU + {5CE615CA-7003-4F31-A151-9256239CD41F}.Debug|x86.ActiveCfg = Debug|Any CPU + {5CE615CA-7003-4F31-A151-9256239CD41F}.Debug|x86.Build.0 = Debug|Any CPU + {5CE615CA-7003-4F31-A151-9256239CD41F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5CE615CA-7003-4F31-A151-9256239CD41F}.Release|Any CPU.Build.0 = Release|Any CPU + {5CE615CA-7003-4F31-A151-9256239CD41F}.Release|arm.ActiveCfg = Release|Any CPU + {5CE615CA-7003-4F31-A151-9256239CD41F}.Release|arm64.ActiveCfg = Release|Any CPU + {5CE615CA-7003-4F31-A151-9256239CD41F}.Release|x64.ActiveCfg = Release|Any CPU + {5CE615CA-7003-4F31-A151-9256239CD41F}.Release|x64.Build.0 = Release|Any CPU + {5CE615CA-7003-4F31-A151-9256239CD41F}.Release|x86.ActiveCfg = Release|Any CPU + {5CE615CA-7003-4F31-A151-9256239CD41F}.Release|x86.Build.0 = Release|Any CPU + {5CE615CA-7003-4F31-A151-9256239CD41F}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {5CE615CA-7003-4F31-A151-9256239CD41F}.Checked|arm.ActiveCfg = Debug|Any CPU + {5CE615CA-7003-4F31-A151-9256239CD41F}.Checked|arm64.ActiveCfg = Debug|Any CPU + {5CE615CA-7003-4F31-A151-9256239CD41F}.Checked|x64.ActiveCfg = Debug|Any CPU + {5CE615CA-7003-4F31-A151-9256239CD41F}.Checked|x86.ActiveCfg = Debug|Any CPU + {9A4570D2-9199-47AA-8178-52ECA60C3A08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9A4570D2-9199-47AA-8178-52ECA60C3A08}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9A4570D2-9199-47AA-8178-52ECA60C3A08}.Debug|arm.ActiveCfg = Debug|Any CPU + {9A4570D2-9199-47AA-8178-52ECA60C3A08}.Debug|arm64.ActiveCfg = Debug|Any CPU + {9A4570D2-9199-47AA-8178-52ECA60C3A08}.Debug|x64.ActiveCfg = Debug|Any CPU + {9A4570D2-9199-47AA-8178-52ECA60C3A08}.Debug|x64.Build.0 = Debug|Any CPU + {9A4570D2-9199-47AA-8178-52ECA60C3A08}.Debug|x86.ActiveCfg = Debug|Any CPU + {9A4570D2-9199-47AA-8178-52ECA60C3A08}.Debug|x86.Build.0 = Debug|Any CPU + {9A4570D2-9199-47AA-8178-52ECA60C3A08}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9A4570D2-9199-47AA-8178-52ECA60C3A08}.Release|Any CPU.Build.0 = Release|Any CPU + {9A4570D2-9199-47AA-8178-52ECA60C3A08}.Release|arm.ActiveCfg = Release|Any CPU + {9A4570D2-9199-47AA-8178-52ECA60C3A08}.Release|arm64.ActiveCfg = Release|Any CPU + {9A4570D2-9199-47AA-8178-52ECA60C3A08}.Release|x64.ActiveCfg = Release|Any CPU + {9A4570D2-9199-47AA-8178-52ECA60C3A08}.Release|x64.Build.0 = Release|Any CPU + {9A4570D2-9199-47AA-8178-52ECA60C3A08}.Release|x86.ActiveCfg = Release|Any CPU + {9A4570D2-9199-47AA-8178-52ECA60C3A08}.Release|x86.Build.0 = Release|Any CPU + {9A4570D2-9199-47AA-8178-52ECA60C3A08}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {9A4570D2-9199-47AA-8178-52ECA60C3A08}.Checked|arm.ActiveCfg = Debug|Any CPU + {9A4570D2-9199-47AA-8178-52ECA60C3A08}.Checked|arm64.ActiveCfg = Debug|Any CPU + {9A4570D2-9199-47AA-8178-52ECA60C3A08}.Checked|x64.ActiveCfg = Debug|Any CPU + {9A4570D2-9199-47AA-8178-52ECA60C3A08}.Checked|x86.ActiveCfg = Debug|Any CPU {AFB20E97-6E12-43EA-BA9B-9E8AC0D05C1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AFB20E97-6E12-43EA-BA9B-9E8AC0D05C1B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AFB20E97-6E12-43EA-BA9B-9E8AC0D05C1B}.Debug|arm.ActiveCfg = Debug|Any CPU + {AFB20E97-6E12-43EA-BA9B-9E8AC0D05C1B}.Debug|arm64.ActiveCfg = Debug|Any CPU + {AFB20E97-6E12-43EA-BA9B-9E8AC0D05C1B}.Debug|x64.ActiveCfg = Debug|Any CPU + {AFB20E97-6E12-43EA-BA9B-9E8AC0D05C1B}.Debug|x64.Build.0 = Debug|Any CPU + {AFB20E97-6E12-43EA-BA9B-9E8AC0D05C1B}.Debug|x86.ActiveCfg = Debug|Any CPU + {AFB20E97-6E12-43EA-BA9B-9E8AC0D05C1B}.Debug|x86.Build.0 = Debug|Any CPU {AFB20E97-6E12-43EA-BA9B-9E8AC0D05C1B}.Release|Any CPU.ActiveCfg = Release|Any CPU {AFB20E97-6E12-43EA-BA9B-9E8AC0D05C1B}.Release|Any CPU.Build.0 = Release|Any CPU + {AFB20E97-6E12-43EA-BA9B-9E8AC0D05C1B}.Release|arm.ActiveCfg = Release|Any CPU + {AFB20E97-6E12-43EA-BA9B-9E8AC0D05C1B}.Release|arm64.ActiveCfg = Release|Any CPU + {AFB20E97-6E12-43EA-BA9B-9E8AC0D05C1B}.Release|x64.ActiveCfg = Release|Any CPU + {AFB20E97-6E12-43EA-BA9B-9E8AC0D05C1B}.Release|x64.Build.0 = Release|Any CPU + {AFB20E97-6E12-43EA-BA9B-9E8AC0D05C1B}.Release|x86.ActiveCfg = Release|Any CPU + {AFB20E97-6E12-43EA-BA9B-9E8AC0D05C1B}.Release|x86.Build.0 = Release|Any CPU + {AFB20E97-6E12-43EA-BA9B-9E8AC0D05C1B}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {AFB20E97-6E12-43EA-BA9B-9E8AC0D05C1B}.Checked|arm.ActiveCfg = Debug|Any CPU + {AFB20E97-6E12-43EA-BA9B-9E8AC0D05C1B}.Checked|arm64.ActiveCfg = Debug|Any CPU + {AFB20E97-6E12-43EA-BA9B-9E8AC0D05C1B}.Checked|x64.ActiveCfg = Debug|Any CPU + {AFB20E97-6E12-43EA-BA9B-9E8AC0D05C1B}.Checked|x86.ActiveCfg = Debug|Any CPU {6324EAB4-058A-4D80-8D99-5DFB7AEA8928}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6324EAB4-058A-4D80-8D99-5DFB7AEA8928}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6324EAB4-058A-4D80-8D99-5DFB7AEA8928}.Debug|arm.ActiveCfg = Debug|Any CPU + {6324EAB4-058A-4D80-8D99-5DFB7AEA8928}.Debug|arm64.ActiveCfg = Debug|Any CPU + {6324EAB4-058A-4D80-8D99-5DFB7AEA8928}.Debug|x64.ActiveCfg = Debug|Any CPU + {6324EAB4-058A-4D80-8D99-5DFB7AEA8928}.Debug|x64.Build.0 = Debug|Any CPU + {6324EAB4-058A-4D80-8D99-5DFB7AEA8928}.Debug|x86.ActiveCfg = Debug|Any CPU + {6324EAB4-058A-4D80-8D99-5DFB7AEA8928}.Debug|x86.Build.0 = Debug|Any CPU {6324EAB4-058A-4D80-8D99-5DFB7AEA8928}.Release|Any CPU.ActiveCfg = Release|Any CPU {6324EAB4-058A-4D80-8D99-5DFB7AEA8928}.Release|Any CPU.Build.0 = Release|Any CPU + {6324EAB4-058A-4D80-8D99-5DFB7AEA8928}.Release|arm.ActiveCfg = Release|Any CPU + {6324EAB4-058A-4D80-8D99-5DFB7AEA8928}.Release|arm64.ActiveCfg = Release|Any CPU + {6324EAB4-058A-4D80-8D99-5DFB7AEA8928}.Release|x64.ActiveCfg = Release|Any CPU + {6324EAB4-058A-4D80-8D99-5DFB7AEA8928}.Release|x64.Build.0 = Release|Any CPU + {6324EAB4-058A-4D80-8D99-5DFB7AEA8928}.Release|x86.ActiveCfg = Release|Any CPU + {6324EAB4-058A-4D80-8D99-5DFB7AEA8928}.Release|x86.Build.0 = Release|Any CPU + {6324EAB4-058A-4D80-8D99-5DFB7AEA8928}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {6324EAB4-058A-4D80-8D99-5DFB7AEA8928}.Checked|arm.ActiveCfg = Debug|Any CPU + {6324EAB4-058A-4D80-8D99-5DFB7AEA8928}.Checked|arm64.ActiveCfg = Debug|Any CPU + {6324EAB4-058A-4D80-8D99-5DFB7AEA8928}.Checked|x64.ActiveCfg = Debug|Any CPU + {6324EAB4-058A-4D80-8D99-5DFB7AEA8928}.Checked|x86.ActiveCfg = Debug|Any CPU {5CE6447B-ECCE-461C-918D-A37A7ACDF2AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CE6447B-ECCE-461C-918D-A37A7ACDF2AC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5CE6447B-ECCE-461C-918D-A37A7ACDF2AC}.Debug|arm.ActiveCfg = Debug|Any CPU + {5CE6447B-ECCE-461C-918D-A37A7ACDF2AC}.Debug|arm64.ActiveCfg = Debug|Any CPU + {5CE6447B-ECCE-461C-918D-A37A7ACDF2AC}.Debug|x64.ActiveCfg = Debug|Any CPU + {5CE6447B-ECCE-461C-918D-A37A7ACDF2AC}.Debug|x64.Build.0 = Debug|Any CPU + {5CE6447B-ECCE-461C-918D-A37A7ACDF2AC}.Debug|x86.ActiveCfg = Debug|Any CPU + {5CE6447B-ECCE-461C-918D-A37A7ACDF2AC}.Debug|x86.Build.0 = Debug|Any CPU {5CE6447B-ECCE-461C-918D-A37A7ACDF2AC}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CE6447B-ECCE-461C-918D-A37A7ACDF2AC}.Release|Any CPU.Build.0 = Release|Any CPU + {5CE6447B-ECCE-461C-918D-A37A7ACDF2AC}.Release|arm.ActiveCfg = Release|Any CPU + {5CE6447B-ECCE-461C-918D-A37A7ACDF2AC}.Release|arm64.ActiveCfg = Release|Any CPU + {5CE6447B-ECCE-461C-918D-A37A7ACDF2AC}.Release|x64.ActiveCfg = Release|Any CPU + {5CE6447B-ECCE-461C-918D-A37A7ACDF2AC}.Release|x64.Build.0 = Release|Any CPU + {5CE6447B-ECCE-461C-918D-A37A7ACDF2AC}.Release|x86.ActiveCfg = Release|Any CPU + {5CE6447B-ECCE-461C-918D-A37A7ACDF2AC}.Release|x86.Build.0 = Release|Any CPU + {5CE6447B-ECCE-461C-918D-A37A7ACDF2AC}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {5CE6447B-ECCE-461C-918D-A37A7ACDF2AC}.Checked|arm.ActiveCfg = Debug|Any CPU + {5CE6447B-ECCE-461C-918D-A37A7ACDF2AC}.Checked|arm64.ActiveCfg = Debug|Any CPU + {5CE6447B-ECCE-461C-918D-A37A7ACDF2AC}.Checked|x64.ActiveCfg = Debug|Any CPU + {5CE6447B-ECCE-461C-918D-A37A7ACDF2AC}.Checked|x86.ActiveCfg = Debug|Any CPU + {0DC8A199-8AE6-4FE8-92F4-153D6521279A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0DC8A199-8AE6-4FE8-92F4-153D6521279A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0DC8A199-8AE6-4FE8-92F4-153D6521279A}.Debug|arm.ActiveCfg = Debug|Any CPU + {0DC8A199-8AE6-4FE8-92F4-153D6521279A}.Debug|arm64.ActiveCfg = Debug|Any CPU + {0DC8A199-8AE6-4FE8-92F4-153D6521279A}.Debug|x64.ActiveCfg = Debug|Any CPU + {0DC8A199-8AE6-4FE8-92F4-153D6521279A}.Debug|x64.Build.0 = Debug|Any CPU + {0DC8A199-8AE6-4FE8-92F4-153D6521279A}.Debug|x86.ActiveCfg = Debug|Any CPU + {0DC8A199-8AE6-4FE8-92F4-153D6521279A}.Debug|x86.Build.0 = Debug|Any CPU + {0DC8A199-8AE6-4FE8-92F4-153D6521279A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0DC8A199-8AE6-4FE8-92F4-153D6521279A}.Release|Any CPU.Build.0 = Release|Any CPU + {0DC8A199-8AE6-4FE8-92F4-153D6521279A}.Release|arm.ActiveCfg = Release|Any CPU + {0DC8A199-8AE6-4FE8-92F4-153D6521279A}.Release|arm64.ActiveCfg = Release|Any CPU + {0DC8A199-8AE6-4FE8-92F4-153D6521279A}.Release|x64.ActiveCfg = Release|Any CPU + {0DC8A199-8AE6-4FE8-92F4-153D6521279A}.Release|x64.Build.0 = Release|Any CPU + {0DC8A199-8AE6-4FE8-92F4-153D6521279A}.Release|x86.ActiveCfg = Release|Any CPU + {0DC8A199-8AE6-4FE8-92F4-153D6521279A}.Release|x86.Build.0 = Release|Any CPU + {0DC8A199-8AE6-4FE8-92F4-153D6521279A}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {0DC8A199-8AE6-4FE8-92F4-153D6521279A}.Checked|arm.ActiveCfg = Debug|Any CPU + {0DC8A199-8AE6-4FE8-92F4-153D6521279A}.Checked|arm64.ActiveCfg = Debug|Any CPU + {0DC8A199-8AE6-4FE8-92F4-153D6521279A}.Checked|x64.ActiveCfg = Debug|Any CPU + {0DC8A199-8AE6-4FE8-92F4-153D6521279A}.Checked|x86.ActiveCfg = Debug|Any CPU + {74ECA832-1BC2-4DE9-8CF5-AC8555E11D0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {74ECA832-1BC2-4DE9-8CF5-AC8555E11D0E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {74ECA832-1BC2-4DE9-8CF5-AC8555E11D0E}.Debug|arm.ActiveCfg = Debug|Any CPU + {74ECA832-1BC2-4DE9-8CF5-AC8555E11D0E}.Debug|arm64.ActiveCfg = Debug|Any CPU + {74ECA832-1BC2-4DE9-8CF5-AC8555E11D0E}.Debug|x64.ActiveCfg = Debug|Any CPU + {74ECA832-1BC2-4DE9-8CF5-AC8555E11D0E}.Debug|x64.Build.0 = Debug|Any CPU + {74ECA832-1BC2-4DE9-8CF5-AC8555E11D0E}.Debug|x86.ActiveCfg = Debug|Any CPU + {74ECA832-1BC2-4DE9-8CF5-AC8555E11D0E}.Debug|x86.Build.0 = Debug|Any CPU + {74ECA832-1BC2-4DE9-8CF5-AC8555E11D0E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {74ECA832-1BC2-4DE9-8CF5-AC8555E11D0E}.Release|Any CPU.Build.0 = Release|Any CPU + {74ECA832-1BC2-4DE9-8CF5-AC8555E11D0E}.Release|arm.ActiveCfg = Release|Any CPU + {74ECA832-1BC2-4DE9-8CF5-AC8555E11D0E}.Release|arm64.ActiveCfg = Release|Any CPU + {74ECA832-1BC2-4DE9-8CF5-AC8555E11D0E}.Release|x64.ActiveCfg = Release|Any CPU + {74ECA832-1BC2-4DE9-8CF5-AC8555E11D0E}.Release|x64.Build.0 = Release|Any CPU + {74ECA832-1BC2-4DE9-8CF5-AC8555E11D0E}.Release|x86.ActiveCfg = Release|Any CPU + {74ECA832-1BC2-4DE9-8CF5-AC8555E11D0E}.Release|x86.Build.0 = Release|Any CPU + {74ECA832-1BC2-4DE9-8CF5-AC8555E11D0E}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {74ECA832-1BC2-4DE9-8CF5-AC8555E11D0E}.Checked|arm.ActiveCfg = Debug|Any CPU + {74ECA832-1BC2-4DE9-8CF5-AC8555E11D0E}.Checked|arm64.ActiveCfg = Debug|Any CPU + {74ECA832-1BC2-4DE9-8CF5-AC8555E11D0E}.Checked|x64.ActiveCfg = Debug|Any CPU + {74ECA832-1BC2-4DE9-8CF5-AC8555E11D0E}.Checked|x86.ActiveCfg = Debug|Any CPU + {F48CEAF9-0FF1-4E58-8AD1-06E2E6BB9C70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F48CEAF9-0FF1-4E58-8AD1-06E2E6BB9C70}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F48CEAF9-0FF1-4E58-8AD1-06E2E6BB9C70}.Debug|arm.ActiveCfg = Debug|Any CPU + {F48CEAF9-0FF1-4E58-8AD1-06E2E6BB9C70}.Debug|arm64.ActiveCfg = Debug|Any CPU + {F48CEAF9-0FF1-4E58-8AD1-06E2E6BB9C70}.Debug|x64.ActiveCfg = Debug|Any CPU + {F48CEAF9-0FF1-4E58-8AD1-06E2E6BB9C70}.Debug|x64.Build.0 = Debug|Any CPU + {F48CEAF9-0FF1-4E58-8AD1-06E2E6BB9C70}.Debug|x86.ActiveCfg = Debug|Any CPU + {F48CEAF9-0FF1-4E58-8AD1-06E2E6BB9C70}.Debug|x86.Build.0 = Debug|Any CPU + {F48CEAF9-0FF1-4E58-8AD1-06E2E6BB9C70}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F48CEAF9-0FF1-4E58-8AD1-06E2E6BB9C70}.Release|Any CPU.Build.0 = Release|Any CPU + {F48CEAF9-0FF1-4E58-8AD1-06E2E6BB9C70}.Release|arm.ActiveCfg = Release|Any CPU + {F48CEAF9-0FF1-4E58-8AD1-06E2E6BB9C70}.Release|arm64.ActiveCfg = Release|Any CPU + {F48CEAF9-0FF1-4E58-8AD1-06E2E6BB9C70}.Release|x64.ActiveCfg = Release|Any CPU + {F48CEAF9-0FF1-4E58-8AD1-06E2E6BB9C70}.Release|x64.Build.0 = Release|Any CPU + {F48CEAF9-0FF1-4E58-8AD1-06E2E6BB9C70}.Release|x86.ActiveCfg = Release|Any CPU + {F48CEAF9-0FF1-4E58-8AD1-06E2E6BB9C70}.Release|x86.Build.0 = Release|Any CPU + {F48CEAF9-0FF1-4E58-8AD1-06E2E6BB9C70}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {F48CEAF9-0FF1-4E58-8AD1-06E2E6BB9C70}.Checked|arm.ActiveCfg = Debug|Any CPU + {F48CEAF9-0FF1-4E58-8AD1-06E2E6BB9C70}.Checked|arm64.ActiveCfg = Debug|Any CPU + {F48CEAF9-0FF1-4E58-8AD1-06E2E6BB9C70}.Checked|x64.ActiveCfg = Debug|Any CPU + {F48CEAF9-0FF1-4E58-8AD1-06E2E6BB9C70}.Checked|x86.ActiveCfg = Debug|Any CPU + {E21DEB14-DBA3-4BF7-84A1-4C803307C76D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E21DEB14-DBA3-4BF7-84A1-4C803307C76D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E21DEB14-DBA3-4BF7-84A1-4C803307C76D}.Debug|arm.ActiveCfg = Debug|Any CPU + {E21DEB14-DBA3-4BF7-84A1-4C803307C76D}.Debug|arm64.ActiveCfg = Debug|Any CPU + {E21DEB14-DBA3-4BF7-84A1-4C803307C76D}.Debug|x64.ActiveCfg = Debug|Any CPU + {E21DEB14-DBA3-4BF7-84A1-4C803307C76D}.Debug|x64.Build.0 = Debug|Any CPU + {E21DEB14-DBA3-4BF7-84A1-4C803307C76D}.Debug|x86.ActiveCfg = Debug|Any CPU + {E21DEB14-DBA3-4BF7-84A1-4C803307C76D}.Debug|x86.Build.0 = Debug|Any CPU + {E21DEB14-DBA3-4BF7-84A1-4C803307C76D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E21DEB14-DBA3-4BF7-84A1-4C803307C76D}.Release|Any CPU.Build.0 = Release|Any CPU + {E21DEB14-DBA3-4BF7-84A1-4C803307C76D}.Release|arm.ActiveCfg = Release|Any CPU + {E21DEB14-DBA3-4BF7-84A1-4C803307C76D}.Release|arm64.ActiveCfg = Release|Any CPU + {E21DEB14-DBA3-4BF7-84A1-4C803307C76D}.Release|x64.ActiveCfg = Release|Any CPU + {E21DEB14-DBA3-4BF7-84A1-4C803307C76D}.Release|x64.Build.0 = Release|Any CPU + {E21DEB14-DBA3-4BF7-84A1-4C803307C76D}.Release|x86.ActiveCfg = Release|Any CPU + {E21DEB14-DBA3-4BF7-84A1-4C803307C76D}.Release|x86.Build.0 = Release|Any CPU + {E21DEB14-DBA3-4BF7-84A1-4C803307C76D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {E21DEB14-DBA3-4BF7-84A1-4C803307C76D}.Checked|arm.ActiveCfg = Debug|Any CPU + {E21DEB14-DBA3-4BF7-84A1-4C803307C76D}.Checked|arm64.ActiveCfg = Debug|Any CPU + {E21DEB14-DBA3-4BF7-84A1-4C803307C76D}.Checked|x64.ActiveCfg = Debug|Any CPU + {E21DEB14-DBA3-4BF7-84A1-4C803307C76D}.Checked|x86.ActiveCfg = Debug|Any CPU + {D50B3619-E571-4DCF-99CD-4C8982717C98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D50B3619-E571-4DCF-99CD-4C8982717C98}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D50B3619-E571-4DCF-99CD-4C8982717C98}.Debug|arm.ActiveCfg = Debug|Any CPU + {D50B3619-E571-4DCF-99CD-4C8982717C98}.Debug|arm64.ActiveCfg = Debug|Any CPU + {D50B3619-E571-4DCF-99CD-4C8982717C98}.Debug|x64.ActiveCfg = Debug|Any CPU + {D50B3619-E571-4DCF-99CD-4C8982717C98}.Debug|x64.Build.0 = Debug|Any CPU + {D50B3619-E571-4DCF-99CD-4C8982717C98}.Debug|x86.ActiveCfg = Debug|Any CPU + {D50B3619-E571-4DCF-99CD-4C8982717C98}.Debug|x86.Build.0 = Debug|Any CPU + {D50B3619-E571-4DCF-99CD-4C8982717C98}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D50B3619-E571-4DCF-99CD-4C8982717C98}.Release|Any CPU.Build.0 = Release|Any CPU + {D50B3619-E571-4DCF-99CD-4C8982717C98}.Release|arm.ActiveCfg = Release|Any CPU + {D50B3619-E571-4DCF-99CD-4C8982717C98}.Release|arm64.ActiveCfg = Release|Any CPU + {D50B3619-E571-4DCF-99CD-4C8982717C98}.Release|x64.ActiveCfg = Release|Any CPU + {D50B3619-E571-4DCF-99CD-4C8982717C98}.Release|x64.Build.0 = Release|Any CPU + {D50B3619-E571-4DCF-99CD-4C8982717C98}.Release|x86.ActiveCfg = Release|Any CPU + {D50B3619-E571-4DCF-99CD-4C8982717C98}.Release|x86.Build.0 = Release|Any CPU + {D50B3619-E571-4DCF-99CD-4C8982717C98}.Checked|Any CPU.ActiveCfg = Debug|Any CPU + {D50B3619-E571-4DCF-99CD-4C8982717C98}.Checked|arm.ActiveCfg = Debug|Any CPU + {D50B3619-E571-4DCF-99CD-4C8982717C98}.Checked|arm64.ActiveCfg = Debug|Any CPU + {D50B3619-E571-4DCF-99CD-4C8982717C98}.Checked|x64.ActiveCfg = Debug|Any CPU + {D50B3619-E571-4DCF-99CD-4C8982717C98}.Checked|x86.ActiveCfg = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution + {FBB5EE77-1102-4F26-B849-A24205935920} = {C1F9B6EA-2B79-4304-AB6C-6CB80BEC7F4E} {E51D8981-999E-4516-82BF-5766CE531E53} = {2B702044-D081-480E-877C-6CD7A7BDC726} {5CE6447B-ECCE-461C-918D-A37A7ACDF2AC} = {2B702044-D081-480E-877C-6CD7A7BDC726} - {CC29474E-0893-4260-8EEF-40375C300736} = {45BD3F1C-C44C-484B-8759-41BFCA7CEFF8} + {B7ABB2BF-17E7-4F6E-8773-92B81AC72ECC} = {099F43C3-B397-4871-AA29-0B32869E7B48} + {79A37A2A-E133-486E-9DB5-5FA5147184E1} = {099F43C3-B397-4871-AA29-0B32869E7B48} + {9A4570D2-9199-47AA-8178-52ECA60C3A08} = {099F43C3-B397-4871-AA29-0B32869E7B48} + {6324EAB4-058A-4D80-8D99-5DFB7AEA8928} = {099F43C3-B397-4871-AA29-0B32869E7B48} + {8DF21599-94FF-4B57-8179-67DA3D54D005} = {45BD3F1C-C44C-484B-8759-41BFCA7CEFF8} {BF9DE7F9-08A1-4482-8F81-2895BB99D651} = {45BD3F1C-C44C-484B-8759-41BFCA7CEFF8} {B5485369-6E0E-4F8E-AF41-FA9583C7B1CA} = {45BD3F1C-C44C-484B-8759-41BFCA7CEFF8} + {4A8C8CCE-02F6-47E1-A26C-C07778AE8502} = {C881B8F0-59DE-411B-AA11-2729C3273BE2} + {5CE615CA-7003-4F31-A151-9256239CD41F} = {C881B8F0-59DE-411B-AA11-2729C3273BE2} {AFB20E97-6E12-43EA-BA9B-9E8AC0D05C1B} = {C881B8F0-59DE-411B-AA11-2729C3273BE2} - {6324EAB4-058A-4D80-8D99-5DFB7AEA8928} = {099F43C3-B397-4871-AA29-0B32869E7B48} + {0DC8A199-8AE6-4FE8-92F4-153D6521279A} = {B989E5AC-10EA-4BA6-B093-15448876C7BB} + {74ECA832-1BC2-4DE9-8CF5-AC8555E11D0E} = {B989E5AC-10EA-4BA6-B093-15448876C7BB} + {B989E5AC-10EA-4BA6-B093-15448876C7BB} = {B6F2B9D7-6C55-4EC0-8D1F-A497B4AD4B90} + {F48CEAF9-0FF1-4E58-8AD1-06E2E6BB9C70} = {D5E0A88B-0CD6-456C-A9FC-B916D3A0A178} + {E21DEB14-DBA3-4BF7-84A1-4C803307C76D} = {D5E0A88B-0CD6-456C-A9FC-B916D3A0A178} + {D5E0A88B-0CD6-456C-A9FC-B916D3A0A178} = {B6F2B9D7-6C55-4EC0-8D1F-A497B4AD4B90} + {D50B3619-E571-4DCF-99CD-4C8982717C98} = {41782D1F-6C79-437E-AD20-DA5E9D4D274E} + {41782D1F-6C79-437E-AD20-DA5E9D4D274E} = {B6F2B9D7-6C55-4EC0-8D1F-A497B4AD4B90} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {26319C28-068C-4C45-9692-D516A03AA6F0} diff --git a/src/libraries/System.Windows.Extensions/src/CompatibilitySuppressions.xml b/src/libraries/System.Windows.Extensions/src/CompatibilitySuppressions.xml new file mode 100644 index 00000000000000..c4d1373654ff99 --- /dev/null +++ b/src/libraries/System.Windows.Extensions/src/CompatibilitySuppressions.xml @@ -0,0 +1,12 @@ + + + + + PKV006 + net6.0 + + + PKV006 + net7.0 + + \ No newline at end of file diff --git a/src/libraries/System.Windows.Extensions/src/System.Windows.Extensions.csproj b/src/libraries/System.Windows.Extensions/src/System.Windows.Extensions.csproj index e55f185fd8f0a7..110d4511ade649 100644 --- a/src/libraries/System.Windows.Extensions/src/System.Windows.Extensions.csproj +++ b/src/libraries/System.Windows.Extensions/src/System.Windows.Extensions.csproj @@ -86,11 +86,9 @@ System.Security.Cryptography.X509Certificates.X509SelectionFlag - - - + Link="Common\DisableRuntimeMarshalling.cs" + Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'" /> diff --git a/src/libraries/System.Xml.ReaderWriter/System.Xml.ReaderWriter.sln b/src/libraries/System.Xml.ReaderWriter/System.Xml.ReaderWriter.sln index 2f67e774858410..496c675186dac1 100644 --- a/src/libraries/System.Xml.ReaderWriter/System.Xml.ReaderWriter.sln +++ b/src/libraries/System.Xml.ReaderWriter/System.Xml.ReaderWriter.sln @@ -25,12 +25,30 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Xml.ReaderWriter", " EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Xml.ReaderWriter", "src\System.Xml.ReaderWriter.csproj", "{FA7C251C-D1FD-45C3-8CC8-D094F70A03AA}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{6CE30091-2281-4185-8CC8-51C09F73F527}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{F0CCABF6-E529-4CB7-A9E5-8856973F792D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{BFE243B3-BD2B-4738-A1A9-A19EFCD4676B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{FECA55A5-74CE-40F4-8A47-4683EB5090A2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{8025DF35-1D20-4E28-B670-08D4E45CB5DD}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{6AA53AA1-786A-4B35-B1C5-9D3B2EC10CF1}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{311C66CC-47AC-4965-B704-3C62E57FE29D}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{DD1FA45A-B14C-49B5-87C8-1760B478FE91}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{5098D0EF-1661-42AA-A3D2-FB6B0B428742}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{F6928E4C-FEC7-4880-A4CF-32A90E565E23}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{3B9229F8-BF0D-4AF8-A395-4FDF18A76037}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{7B6292AF-F0B0-473F-8054-7FB9DE2F207B}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -89,6 +107,26 @@ Global {FA7C251C-D1FD-45C3-8CC8-D094F70A03AA}.Debug|Any CPU.Build.0 = Debug|Any CPU {FA7C251C-D1FD-45C3-8CC8-D094F70A03AA}.Release|Any CPU.ActiveCfg = Release|Any CPU {FA7C251C-D1FD-45C3-8CC8-D094F70A03AA}.Release|Any CPU.Build.0 = Release|Any CPU + {6CE30091-2281-4185-8CC8-51C09F73F527}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6CE30091-2281-4185-8CC8-51C09F73F527}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6CE30091-2281-4185-8CC8-51C09F73F527}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6CE30091-2281-4185-8CC8-51C09F73F527}.Release|Any CPU.Build.0 = Release|Any CPU + {F0CCABF6-E529-4CB7-A9E5-8856973F792D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F0CCABF6-E529-4CB7-A9E5-8856973F792D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F0CCABF6-E529-4CB7-A9E5-8856973F792D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F0CCABF6-E529-4CB7-A9E5-8856973F792D}.Release|Any CPU.Build.0 = Release|Any CPU + {BFE243B3-BD2B-4738-A1A9-A19EFCD4676B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BFE243B3-BD2B-4738-A1A9-A19EFCD4676B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BFE243B3-BD2B-4738-A1A9-A19EFCD4676B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BFE243B3-BD2B-4738-A1A9-A19EFCD4676B}.Release|Any CPU.Build.0 = Release|Any CPU + {FECA55A5-74CE-40F4-8A47-4683EB5090A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FECA55A5-74CE-40F4-8A47-4683EB5090A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FECA55A5-74CE-40F4-8A47-4683EB5090A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FECA55A5-74CE-40F4-8A47-4683EB5090A2}.Release|Any CPU.Build.0 = Release|Any CPU + {8025DF35-1D20-4E28-B670-08D4E45CB5DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8025DF35-1D20-4E28-B670-08D4E45CB5DD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8025DF35-1D20-4E28-B670-08D4E45CB5DD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8025DF35-1D20-4E28-B670-08D4E45CB5DD}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -107,6 +145,14 @@ Global {CA8BC7D5-9A5D-4055-BE69-6D469B38ED02} = {DD1FA45A-B14C-49B5-87C8-1760B478FE91} {640CCB13-BBC5-4B1A-90ED-87DA28BCA4AC} = {DD1FA45A-B14C-49B5-87C8-1760B478FE91} {3CCCB1F8-16A0-46BE-93D9-E11E22294CC1} = {DD1FA45A-B14C-49B5-87C8-1760B478FE91} + {6CE30091-2281-4185-8CC8-51C09F73F527} = {5098D0EF-1661-42AA-A3D2-FB6B0B428742} + {F0CCABF6-E529-4CB7-A9E5-8856973F792D} = {5098D0EF-1661-42AA-A3D2-FB6B0B428742} + {5098D0EF-1661-42AA-A3D2-FB6B0B428742} = {7B6292AF-F0B0-473F-8054-7FB9DE2F207B} + {BFE243B3-BD2B-4738-A1A9-A19EFCD4676B} = {F6928E4C-FEC7-4880-A4CF-32A90E565E23} + {FECA55A5-74CE-40F4-8A47-4683EB5090A2} = {F6928E4C-FEC7-4880-A4CF-32A90E565E23} + {F6928E4C-FEC7-4880-A4CF-32A90E565E23} = {7B6292AF-F0B0-473F-8054-7FB9DE2F207B} + {8025DF35-1D20-4E28-B670-08D4E45CB5DD} = {3B9229F8-BF0D-4AF8-A395-4FDF18A76037} + {3B9229F8-BF0D-4AF8-A395-4FDF18A76037} = {7B6292AF-F0B0-473F-8054-7FB9DE2F207B} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {B00449BC-6738-4BD0-A908-5DE1002A348C} diff --git a/src/libraries/System.Xml.XDocument/System.Xml.XDocument.sln b/src/libraries/System.Xml.XDocument/System.Xml.XDocument.sln index f07aed2ed6e111..72a29ca91e10a3 100644 --- a/src/libraries/System.Xml.XDocument/System.Xml.XDocument.sln +++ b/src/libraries/System.Xml.XDocument/System.Xml.XDocument.sln @@ -31,12 +31,30 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Xml.XDocument", "ref EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Xml.XDocument", "src\System.Xml.XDocument.csproj", "{B229C42C-204A-43B4-AB71-587AD46F927E}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{263E03CF-927F-4DAB-A726-5D3730B222D8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{D8F10A21-FBBB-4AB4-B48F-5C3CA876BF6D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{DCB02E2E-49AE-4DA5-B372-E2640E84B570}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{BC80D37C-41FA-48C3-A6D7-91847BD36403}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{318A0B38-9915-426D-93E6-BD096E15C6B9}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{8F3CD562-EA5E-4DD1-8B30-E6BA65887115}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{AFC9144B-DAD7-470E-B068-C17C24862D23}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{74D73470-4D01-4B7F-A809-D406E7474807}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{D5715AF5-BCB4-4A18-8F69-98268D81C670}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{0914FEED-1B6A-4A0B-A792-17E5E445D6D8}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{F573D71F-98D3-425B-9E1B-C3189622D167}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{50A22C1D-1D62-4D56-BBB0-CE1BA5CCAD5E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -107,6 +125,26 @@ Global {B229C42C-204A-43B4-AB71-587AD46F927E}.Debug|Any CPU.Build.0 = Debug|Any CPU {B229C42C-204A-43B4-AB71-587AD46F927E}.Release|Any CPU.ActiveCfg = Release|Any CPU {B229C42C-204A-43B4-AB71-587AD46F927E}.Release|Any CPU.Build.0 = Release|Any CPU + {263E03CF-927F-4DAB-A726-5D3730B222D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {263E03CF-927F-4DAB-A726-5D3730B222D8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {263E03CF-927F-4DAB-A726-5D3730B222D8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {263E03CF-927F-4DAB-A726-5D3730B222D8}.Release|Any CPU.Build.0 = Release|Any CPU + {D8F10A21-FBBB-4AB4-B48F-5C3CA876BF6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D8F10A21-FBBB-4AB4-B48F-5C3CA876BF6D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D8F10A21-FBBB-4AB4-B48F-5C3CA876BF6D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D8F10A21-FBBB-4AB4-B48F-5C3CA876BF6D}.Release|Any CPU.Build.0 = Release|Any CPU + {DCB02E2E-49AE-4DA5-B372-E2640E84B570}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DCB02E2E-49AE-4DA5-B372-E2640E84B570}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DCB02E2E-49AE-4DA5-B372-E2640E84B570}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DCB02E2E-49AE-4DA5-B372-E2640E84B570}.Release|Any CPU.Build.0 = Release|Any CPU + {BC80D37C-41FA-48C3-A6D7-91847BD36403}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BC80D37C-41FA-48C3-A6D7-91847BD36403}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BC80D37C-41FA-48C3-A6D7-91847BD36403}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BC80D37C-41FA-48C3-A6D7-91847BD36403}.Release|Any CPU.Build.0 = Release|Any CPU + {318A0B38-9915-426D-93E6-BD096E15C6B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {318A0B38-9915-426D-93E6-BD096E15C6B9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {318A0B38-9915-426D-93E6-BD096E15C6B9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {318A0B38-9915-426D-93E6-BD096E15C6B9}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -128,6 +166,14 @@ Global {1168A1A4-299C-4FE3-B0EC-A4F87ACE19B1} = {74D73470-4D01-4B7F-A809-D406E7474807} {AC583FDE-8E90-4EDC-A35E-1E39704E465D} = {74D73470-4D01-4B7F-A809-D406E7474807} {783012DB-85AC-4C81-8310-98FD187A1C53} = {74D73470-4D01-4B7F-A809-D406E7474807} + {263E03CF-927F-4DAB-A726-5D3730B222D8} = {D5715AF5-BCB4-4A18-8F69-98268D81C670} + {D8F10A21-FBBB-4AB4-B48F-5C3CA876BF6D} = {D5715AF5-BCB4-4A18-8F69-98268D81C670} + {D5715AF5-BCB4-4A18-8F69-98268D81C670} = {50A22C1D-1D62-4D56-BBB0-CE1BA5CCAD5E} + {DCB02E2E-49AE-4DA5-B372-E2640E84B570} = {0914FEED-1B6A-4A0B-A792-17E5E445D6D8} + {BC80D37C-41FA-48C3-A6D7-91847BD36403} = {0914FEED-1B6A-4A0B-A792-17E5E445D6D8} + {0914FEED-1B6A-4A0B-A792-17E5E445D6D8} = {50A22C1D-1D62-4D56-BBB0-CE1BA5CCAD5E} + {318A0B38-9915-426D-93E6-BD096E15C6B9} = {F573D71F-98D3-425B-9E1B-C3189622D167} + {F573D71F-98D3-425B-9E1B-C3189622D167} = {50A22C1D-1D62-4D56-BBB0-CE1BA5CCAD5E} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {E25A5CFF-8135-4023-9954-63B182032639} diff --git a/src/libraries/System.Xml.XPath.XDocument/System.Xml.XPath.XDocument.sln b/src/libraries/System.Xml.XPath.XDocument/System.Xml.XPath.XDocument.sln index 8a1f9c4cdd49a0..f16b20abc76855 100644 --- a/src/libraries/System.Xml.XPath.XDocument/System.Xml.XPath.XDocument.sln +++ b/src/libraries/System.Xml.XPath.XDocument/System.Xml.XPath.XDocument.sln @@ -33,12 +33,30 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Xml.XPath.XDocument" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Xml.XPath.XDocument", "src\System.Xml.XPath.XDocument.csproj", "{D52C68D2-B6DD-4FFB-B3B5-011B76733202}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{1A372455-1140-4FB8-81D2-DDD8DBBD83EF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{132EAF78-CC77-4366-B10F-384818E31D8E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{7B0F9764-CF4C-44B6-B0D3-2C7AD2C60A4E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{B51F1F4C-3166-4EA9-8AF2-9926F3BE4AA0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{4164B210-C08C-42AA-9F15-54EC348318CE}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{47B3DDCB-3A95-4315-9D49-A2653C6F3A17}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{7C3C9BDE-3FF9-4B26-BACB-59EB827A5C0C}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{21CFCBC2-EE04-43D0-8432-6B4B4DA770F1}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{3CEB5CAD-4E84-4587-8BE8-7927AC7242E4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{A55ECA65-20E3-4AC6-8A9F-18B7CA25445C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{84CBFE44-4AE4-4FA7-9162-A0051A9B7A32}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{1BF5C33A-FAD7-4326-8372-A07315BA38AE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -113,6 +131,26 @@ Global {D52C68D2-B6DD-4FFB-B3B5-011B76733202}.Debug|Any CPU.Build.0 = Debug|Any CPU {D52C68D2-B6DD-4FFB-B3B5-011B76733202}.Release|Any CPU.ActiveCfg = Release|Any CPU {D52C68D2-B6DD-4FFB-B3B5-011B76733202}.Release|Any CPU.Build.0 = Release|Any CPU + {1A372455-1140-4FB8-81D2-DDD8DBBD83EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1A372455-1140-4FB8-81D2-DDD8DBBD83EF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1A372455-1140-4FB8-81D2-DDD8DBBD83EF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1A372455-1140-4FB8-81D2-DDD8DBBD83EF}.Release|Any CPU.Build.0 = Release|Any CPU + {132EAF78-CC77-4366-B10F-384818E31D8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {132EAF78-CC77-4366-B10F-384818E31D8E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {132EAF78-CC77-4366-B10F-384818E31D8E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {132EAF78-CC77-4366-B10F-384818E31D8E}.Release|Any CPU.Build.0 = Release|Any CPU + {7B0F9764-CF4C-44B6-B0D3-2C7AD2C60A4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7B0F9764-CF4C-44B6-B0D3-2C7AD2C60A4E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7B0F9764-CF4C-44B6-B0D3-2C7AD2C60A4E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7B0F9764-CF4C-44B6-B0D3-2C7AD2C60A4E}.Release|Any CPU.Build.0 = Release|Any CPU + {B51F1F4C-3166-4EA9-8AF2-9926F3BE4AA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B51F1F4C-3166-4EA9-8AF2-9926F3BE4AA0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B51F1F4C-3166-4EA9-8AF2-9926F3BE4AA0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B51F1F4C-3166-4EA9-8AF2-9926F3BE4AA0}.Release|Any CPU.Build.0 = Release|Any CPU + {4164B210-C08C-42AA-9F15-54EC348318CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4164B210-C08C-42AA-9F15-54EC348318CE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4164B210-C08C-42AA-9F15-54EC348318CE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4164B210-C08C-42AA-9F15-54EC348318CE}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -135,6 +173,14 @@ Global {48DB9946-6D0B-49E4-AB52-59C6CDE636A2} = {21CFCBC2-EE04-43D0-8432-6B4B4DA770F1} {0E9E4E11-BBF5-42B0-AAAF-2C5C2197A4B6} = {21CFCBC2-EE04-43D0-8432-6B4B4DA770F1} {37C6762F-3925-4396-8E19-59173578DB4F} = {21CFCBC2-EE04-43D0-8432-6B4B4DA770F1} + {1A372455-1140-4FB8-81D2-DDD8DBBD83EF} = {3CEB5CAD-4E84-4587-8BE8-7927AC7242E4} + {132EAF78-CC77-4366-B10F-384818E31D8E} = {3CEB5CAD-4E84-4587-8BE8-7927AC7242E4} + {3CEB5CAD-4E84-4587-8BE8-7927AC7242E4} = {1BF5C33A-FAD7-4326-8372-A07315BA38AE} + {7B0F9764-CF4C-44B6-B0D3-2C7AD2C60A4E} = {A55ECA65-20E3-4AC6-8A9F-18B7CA25445C} + {B51F1F4C-3166-4EA9-8AF2-9926F3BE4AA0} = {A55ECA65-20E3-4AC6-8A9F-18B7CA25445C} + {A55ECA65-20E3-4AC6-8A9F-18B7CA25445C} = {1BF5C33A-FAD7-4326-8372-A07315BA38AE} + {4164B210-C08C-42AA-9F15-54EC348318CE} = {84CBFE44-4AE4-4FA7-9162-A0051A9B7A32} + {84CBFE44-4AE4-4FA7-9162-A0051A9B7A32} = {1BF5C33A-FAD7-4326-8372-A07315BA38AE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {AC5CC49B-D68E-4B1E-8C4B-ECBE2F5E3AED} diff --git a/src/libraries/System.Xml.XPath/System.Xml.XPath.sln b/src/libraries/System.Xml.XPath/System.Xml.XPath.sln index 0cff10bfcd2ef8..9c603f739ff4b5 100644 --- a/src/libraries/System.Xml.XPath/System.Xml.XPath.sln +++ b/src/libraries/System.Xml.XPath/System.Xml.XPath.sln @@ -27,12 +27,30 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Xml.XPath", "ref\Sys EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Xml.XPath", "src\System.Xml.XPath.csproj", "{F825C114-FF6D-4826-BC8A-586246369695}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{DC22572E-7604-46DF-8AF6-1325793ED015}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{F54C3393-8ADD-4BF7-94F2-7A844FC43901}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{6C6CB8DB-6C4F-4197-9120-97E6F8F3FAD8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{D98A2777-37D4-4DA7-9E1D-3429CEC0CE83}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{860A009C-866F-4B86-B845-1E547083E953}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{1EF0B525-2611-41AB-AA69-28A1B9689C3A}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{73688A49-11B7-47C8-BF09-A6C1C11EA0BD}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{543F6A8C-B245-464C-A7F5-50D5A1369909}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{2623F3C3-7C12-415B-B22C-CF8D436FCE31}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{0C279DB3-7141-43BA-B380-465BC2A7D3AD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{35CB7823-6ABA-4036-A0C2-172B13A24263}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{ADF3A048-C587-4621-9547-5A7D6A8CC1D8}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -95,6 +113,26 @@ Global {F825C114-FF6D-4826-BC8A-586246369695}.Debug|Any CPU.Build.0 = Debug|Any CPU {F825C114-FF6D-4826-BC8A-586246369695}.Release|Any CPU.ActiveCfg = Release|Any CPU {F825C114-FF6D-4826-BC8A-586246369695}.Release|Any CPU.Build.0 = Release|Any CPU + {DC22572E-7604-46DF-8AF6-1325793ED015}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DC22572E-7604-46DF-8AF6-1325793ED015}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DC22572E-7604-46DF-8AF6-1325793ED015}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DC22572E-7604-46DF-8AF6-1325793ED015}.Release|Any CPU.Build.0 = Release|Any CPU + {F54C3393-8ADD-4BF7-94F2-7A844FC43901}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F54C3393-8ADD-4BF7-94F2-7A844FC43901}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F54C3393-8ADD-4BF7-94F2-7A844FC43901}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F54C3393-8ADD-4BF7-94F2-7A844FC43901}.Release|Any CPU.Build.0 = Release|Any CPU + {6C6CB8DB-6C4F-4197-9120-97E6F8F3FAD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6C6CB8DB-6C4F-4197-9120-97E6F8F3FAD8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6C6CB8DB-6C4F-4197-9120-97E6F8F3FAD8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6C6CB8DB-6C4F-4197-9120-97E6F8F3FAD8}.Release|Any CPU.Build.0 = Release|Any CPU + {D98A2777-37D4-4DA7-9E1D-3429CEC0CE83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D98A2777-37D4-4DA7-9E1D-3429CEC0CE83}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D98A2777-37D4-4DA7-9E1D-3429CEC0CE83}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D98A2777-37D4-4DA7-9E1D-3429CEC0CE83}.Release|Any CPU.Build.0 = Release|Any CPU + {860A009C-866F-4B86-B845-1E547083E953}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {860A009C-866F-4B86-B845-1E547083E953}.Debug|Any CPU.Build.0 = Debug|Any CPU + {860A009C-866F-4B86-B845-1E547083E953}.Release|Any CPU.ActiveCfg = Release|Any CPU + {860A009C-866F-4B86-B845-1E547083E953}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -114,6 +152,14 @@ Global {E0AD66A8-D552-43C6-AB0F-305A2CD2A628} = {543F6A8C-B245-464C-A7F5-50D5A1369909} {F02C927A-92DA-4212-A228-EE4E82317723} = {543F6A8C-B245-464C-A7F5-50D5A1369909} {2E9AD1A2-506F-469A-AAB9-C6BA43FC78E1} = {543F6A8C-B245-464C-A7F5-50D5A1369909} + {DC22572E-7604-46DF-8AF6-1325793ED015} = {2623F3C3-7C12-415B-B22C-CF8D436FCE31} + {F54C3393-8ADD-4BF7-94F2-7A844FC43901} = {2623F3C3-7C12-415B-B22C-CF8D436FCE31} + {2623F3C3-7C12-415B-B22C-CF8D436FCE31} = {ADF3A048-C587-4621-9547-5A7D6A8CC1D8} + {6C6CB8DB-6C4F-4197-9120-97E6F8F3FAD8} = {0C279DB3-7141-43BA-B380-465BC2A7D3AD} + {D98A2777-37D4-4DA7-9E1D-3429CEC0CE83} = {0C279DB3-7141-43BA-B380-465BC2A7D3AD} + {0C279DB3-7141-43BA-B380-465BC2A7D3AD} = {ADF3A048-C587-4621-9547-5A7D6A8CC1D8} + {860A009C-866F-4B86-B845-1E547083E953} = {35CB7823-6ABA-4036-A0C2-172B13A24263} + {35CB7823-6ABA-4036-A0C2-172B13A24263} = {ADF3A048-C587-4621-9547-5A7D6A8CC1D8} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {DF8F269A-6F5E-4DE2-A0D7-6852F6470D4C} diff --git a/src/libraries/System.Xml.XmlSerializer/System.Xml.XmlSerializer.sln b/src/libraries/System.Xml.XmlSerializer/System.Xml.XmlSerializer.sln index 97dca6f8994603..20d2dc85307db9 100644 --- a/src/libraries/System.Xml.XmlSerializer/System.Xml.XmlSerializer.sln +++ b/src/libraries/System.Xml.XmlSerializer/System.Xml.XmlSerializer.sln @@ -35,12 +35,30 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Xml.XmlSerializer", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Xml.XmlSerializer", "src\System.Xml.XmlSerializer.csproj", "{67D79968-DF22-4273-B2FA-D3EEC905095C}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.CodeFixProvider", "..\..\tools\illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj", "{69E14AF2-7A37-4AF7-9D1D-2A1AF0380310}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.RoslynAnalyzer", "..\..\tools\illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj", "{255C23A7-E30C-4434-8505-DCC12D677219}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILLink.Tasks", "..\..\tools\illink\src\ILLink.Tasks\ILLink.Tasks.csproj", "{2927D846-7CC6-45D6-BC2E-7CFFADC199EC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\Mono.Linker.csproj", "{48068FE4-A518-4FFE-BC3B-CCB32CEB8F9A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Linker", "..\..\tools\illink\src\linker\ref\Mono.Linker.csproj", "{472C1DA7-6CDB-43DE-A531-D7E4C37EE4D9}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{E0C34B2E-D8CC-4A13-9635-3FD9AF37EC9B}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{F0B2F254-B3E6-4BAA-8C92-2373990CF48B}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "gen", "{8B996FD2-F7BF-4196-9468-998117E8C7C1}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gen", "tools\gen", "{9C7B7197-1F5F-45BB-B650-AB2F98DFFAEE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "tools\src", "{20566498-BF1A-418D-B957-45309C2B863F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "tools\ref", "{44463803-C221-4663-BFCA-F91D8A8750ED}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{C8100D34-EC4F-4759-AA80-3A19FB203993}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -119,6 +137,26 @@ Global {67D79968-DF22-4273-B2FA-D3EEC905095C}.Debug|Any CPU.Build.0 = Debug|Any CPU {67D79968-DF22-4273-B2FA-D3EEC905095C}.Release|Any CPU.ActiveCfg = Release|Any CPU {67D79968-DF22-4273-B2FA-D3EEC905095C}.Release|Any CPU.Build.0 = Release|Any CPU + {69E14AF2-7A37-4AF7-9D1D-2A1AF0380310}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {69E14AF2-7A37-4AF7-9D1D-2A1AF0380310}.Debug|Any CPU.Build.0 = Debug|Any CPU + {69E14AF2-7A37-4AF7-9D1D-2A1AF0380310}.Release|Any CPU.ActiveCfg = Release|Any CPU + {69E14AF2-7A37-4AF7-9D1D-2A1AF0380310}.Release|Any CPU.Build.0 = Release|Any CPU + {255C23A7-E30C-4434-8505-DCC12D677219}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {255C23A7-E30C-4434-8505-DCC12D677219}.Debug|Any CPU.Build.0 = Debug|Any CPU + {255C23A7-E30C-4434-8505-DCC12D677219}.Release|Any CPU.ActiveCfg = Release|Any CPU + {255C23A7-E30C-4434-8505-DCC12D677219}.Release|Any CPU.Build.0 = Release|Any CPU + {2927D846-7CC6-45D6-BC2E-7CFFADC199EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2927D846-7CC6-45D6-BC2E-7CFFADC199EC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2927D846-7CC6-45D6-BC2E-7CFFADC199EC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2927D846-7CC6-45D6-BC2E-7CFFADC199EC}.Release|Any CPU.Build.0 = Release|Any CPU + {48068FE4-A518-4FFE-BC3B-CCB32CEB8F9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {48068FE4-A518-4FFE-BC3B-CCB32CEB8F9A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {48068FE4-A518-4FFE-BC3B-CCB32CEB8F9A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {48068FE4-A518-4FFE-BC3B-CCB32CEB8F9A}.Release|Any CPU.Build.0 = Release|Any CPU + {472C1DA7-6CDB-43DE-A531-D7E4C37EE4D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {472C1DA7-6CDB-43DE-A531-D7E4C37EE4D9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {472C1DA7-6CDB-43DE-A531-D7E4C37EE4D9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {472C1DA7-6CDB-43DE-A531-D7E4C37EE4D9}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -142,6 +180,14 @@ Global {3232286F-6DB1-46A6-AA45-CA9014FD8D9A} = {8B996FD2-F7BF-4196-9468-998117E8C7C1} {91E43C52-718D-46CE-B832-230A3730A32F} = {8B996FD2-F7BF-4196-9468-998117E8C7C1} {F3678706-5923-4F5E-B33C-625C22A9CA32} = {8B996FD2-F7BF-4196-9468-998117E8C7C1} + {69E14AF2-7A37-4AF7-9D1D-2A1AF0380310} = {9C7B7197-1F5F-45BB-B650-AB2F98DFFAEE} + {255C23A7-E30C-4434-8505-DCC12D677219} = {9C7B7197-1F5F-45BB-B650-AB2F98DFFAEE} + {9C7B7197-1F5F-45BB-B650-AB2F98DFFAEE} = {C8100D34-EC4F-4759-AA80-3A19FB203993} + {2927D846-7CC6-45D6-BC2E-7CFFADC199EC} = {20566498-BF1A-418D-B957-45309C2B863F} + {48068FE4-A518-4FFE-BC3B-CCB32CEB8F9A} = {20566498-BF1A-418D-B957-45309C2B863F} + {20566498-BF1A-418D-B957-45309C2B863F} = {C8100D34-EC4F-4759-AA80-3A19FB203993} + {472C1DA7-6CDB-43DE-A531-D7E4C37EE4D9} = {44463803-C221-4663-BFCA-F91D8A8750ED} + {44463803-C221-4663-BFCA-F91D8A8750ED} = {C8100D34-EC4F-4759-AA80-3A19FB203993} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {24AD78FE-B27D-46DE-B574-17F4CC6DF7CC} diff --git a/src/libraries/apicompat/ApiCompatBaseline.NetCoreAppLatestStable.xml b/src/libraries/apicompat/ApiCompatBaseline.NetCoreAppLatestStable.xml index 0e532d660810fe..047e1d5d11e07e 100644 --- a/src/libraries/apicompat/ApiCompatBaseline.NetCoreAppLatestStable.xml +++ b/src/libraries/apicompat/ApiCompatBaseline.NetCoreAppLatestStable.xml @@ -1,2692 +1,22 @@  - - CP0002 - F:System.Net.Quic.QuicError.AddressInUse - net7.0/System.Net.Quic.dll - net8.0/System.Net.Quic.dll - - - CP0002 - F:System.Net.Quic.QuicError.HostUnreachable - net7.0/System.Net.Quic.dll - net8.0/System.Net.Quic.dll - - - CP0002 - F:System.Net.Quic.QuicError.InvalidAddress - net7.0/System.Net.Quic.dll - net8.0/System.Net.Quic.dll - - - CP0002 - F:System.Net.Quic.QuicError.ProtocolError - net7.0/System.Net.Quic.dll - net8.0/System.Net.Quic.dll - - - CP0002 - M:System.Runtime.InteropServices.JavaScript.JSFunctionBinding.#ctor - net7.0/System.Runtime.InteropServices.JavaScript.dll - net8.0/System.Runtime.InteropServices.JavaScript.dll - - - CP0014 - M:System.Console.get_WindowHeight:[T:System.Runtime.Versioning.UnsupportedOSPlatformAttribute] - net7.0/mscorlib.dll - net8.0/mscorlib.dll - - - CP0014 - M:System.Console.get_WindowWidth:[T:System.Runtime.Versioning.UnsupportedOSPlatformAttribute] - net7.0/mscorlib.dll - net8.0/mscorlib.dll - - - CP0014 - M:System.Console.set_WindowHeight(System.Int32):[T:System.Runtime.Versioning.SupportedOSPlatformAttribute] - net7.0/mscorlib.dll - net8.0/mscorlib.dll - - - CP0014 - M:System.Console.set_WindowWidth(System.Int32):[T:System.Runtime.Versioning.SupportedOSPlatformAttribute] - net7.0/mscorlib.dll - net8.0/mscorlib.dll - - - CP0014 - M:System.Console.SetWindowSize(System.Int32,System.Int32):[T:System.Runtime.Versioning.SupportedOSPlatformAttribute] - net7.0/mscorlib.dll - net8.0/mscorlib.dll - - - CP0014 - M:System.Console.get_WindowHeight:[T:System.Runtime.Versioning.UnsupportedOSPlatformAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Console.get_WindowWidth:[T:System.Runtime.Versioning.UnsupportedOSPlatformAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Console.set_WindowHeight(System.Int32):[T:System.Runtime.Versioning.SupportedOSPlatformAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Console.set_WindowWidth(System.Int32):[T:System.Runtime.Versioning.SupportedOSPlatformAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Console.SetWindowSize(System.Int32,System.Int32):[T:System.Runtime.Versioning.SupportedOSPlatformAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Aggregate``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``0,``0}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Aggregate``2(System.Linq.IQueryable{``0},``1,System.Linq.Expressions.Expression{System.Func{``1,``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Aggregate``3(System.Linq.IQueryable{``0},``1,System.Linq.Expressions.Expression{System.Func{``1,``0,``1}},System.Linq.Expressions.Expression{System.Func{``1,``2}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.All``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Any``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Any``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Append``1(System.Linq.IQueryable{``0},``0):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Average``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Decimal}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Average``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Double}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Average``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int32}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Average``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int64}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Average``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Decimal}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Average``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Double}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Average``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Int32}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Average``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Int64}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Average``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Single}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Average``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Single}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Cast``1(System.Linq.IQueryable):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Chunk``1(System.Linq.IQueryable{``0},System.Int32):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Concat``1(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Contains``1(System.Linq.IQueryable{``0},``0,System.Collections.Generic.IEqualityComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Contains``1(System.Linq.IQueryable{``0},``0):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Count``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Count``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.DefaultIfEmpty``1(System.Linq.IQueryable{``0},``0):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.DefaultIfEmpty``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Distinct``1(System.Linq.IQueryable{``0},System.Collections.Generic.IEqualityComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Distinct``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.DistinctBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IEqualityComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.DistinctBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.ElementAt``1(System.Linq.IQueryable{``0},System.Index):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.ElementAt``1(System.Linq.IQueryable{``0},System.Int32):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.ElementAtOrDefault``1(System.Linq.IQueryable{``0},System.Index):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.ElementAtOrDefault``1(System.Linq.IQueryable{``0},System.Int32):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Except``1(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0},System.Collections.Generic.IEqualityComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Except``1(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.ExceptBy``2(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IEqualityComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.ExceptBy``2(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.First``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.First``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.FirstOrDefault``1(System.Linq.IQueryable{``0},``0):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.FirstOrDefault``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}},``0):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.FirstOrDefault``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.FirstOrDefault``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.GroupBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IEqualityComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.GroupBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.GroupBy``3(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Linq.Expressions.Expression{System.Func{``0,``2}},System.Collections.Generic.IEqualityComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.GroupBy``3(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Linq.Expressions.Expression{System.Func{``0,``2}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.GroupBy``3(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Linq.Expressions.Expression{System.Func{``1,System.Collections.Generic.IEnumerable{``0},``2}},System.Collections.Generic.IEqualityComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.GroupBy``3(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Linq.Expressions.Expression{System.Func{``1,System.Collections.Generic.IEnumerable{``0},``2}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.GroupBy``4(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Linq.Expressions.Expression{System.Func{``0,``2}},System.Linq.Expressions.Expression{System.Func{``1,System.Collections.Generic.IEnumerable{``2},``3}},System.Collections.Generic.IEqualityComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.GroupBy``4(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Linq.Expressions.Expression{System.Func{``0,``2}},System.Linq.Expressions.Expression{System.Func{``1,System.Collections.Generic.IEnumerable{``2},``3}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.GroupJoin``4(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1},System.Linq.Expressions.Expression{System.Func{``0,``2}},System.Linq.Expressions.Expression{System.Func{``1,``2}},System.Linq.Expressions.Expression{System.Func{``0,System.Collections.Generic.IEnumerable{``1},``3}},System.Collections.Generic.IEqualityComparer{``2}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.GroupJoin``4(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1},System.Linq.Expressions.Expression{System.Func{``0,``2}},System.Linq.Expressions.Expression{System.Func{``1,``2}},System.Linq.Expressions.Expression{System.Func{``0,System.Collections.Generic.IEnumerable{``1},``3}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Intersect``1(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0},System.Collections.Generic.IEqualityComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Intersect``1(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.IntersectBy``2(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IEqualityComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.IntersectBy``2(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Join``4(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1},System.Linq.Expressions.Expression{System.Func{``0,``2}},System.Linq.Expressions.Expression{System.Func{``1,``2}},System.Linq.Expressions.Expression{System.Func{``0,``1,``3}},System.Collections.Generic.IEqualityComparer{``2}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Join``4(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1},System.Linq.Expressions.Expression{System.Func{``0,``2}},System.Linq.Expressions.Expression{System.Func{``1,``2}},System.Linq.Expressions.Expression{System.Func{``0,``1,``3}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Last``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Last``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.LastOrDefault``1(System.Linq.IQueryable{``0},``0):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.LastOrDefault``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}},``0):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.LastOrDefault``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.LastOrDefault``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.LongCount``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.LongCount``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Max``1(System.Linq.IQueryable{``0},System.Collections.Generic.IComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Max``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Max``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.MaxBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.MaxBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Min``1(System.Linq.IQueryable{``0},System.Collections.Generic.IComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Min``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Min``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.MinBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.MinBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.OfType``1(System.Linq.IQueryable):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Order``1(System.Linq.IQueryable{``0},System.Collections.Generic.IComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Order``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.OrderBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.OrderBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.OrderByDescending``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.OrderByDescending``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.OrderDescending``1(System.Linq.IQueryable{``0},System.Collections.Generic.IComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.OrderDescending``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Prepend``1(System.Linq.IQueryable{``0},``0):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Reverse``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Select``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Select``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int32,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.SelectMany``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Collections.Generic.IEnumerable{``1}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.SelectMany``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int32,System.Collections.Generic.IEnumerable{``1}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.SelectMany``3(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Collections.Generic.IEnumerable{``1}}},System.Linq.Expressions.Expression{System.Func{``0,``1,``2}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.SelectMany``3(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int32,System.Collections.Generic.IEnumerable{``1}}},System.Linq.Expressions.Expression{System.Func{``0,``1,``2}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.SequenceEqual``1(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0},System.Collections.Generic.IEqualityComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.SequenceEqual``1(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Single``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Single``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.SingleOrDefault``1(System.Linq.IQueryable{``0},``0):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.SingleOrDefault``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}},``0):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.SingleOrDefault``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.SingleOrDefault``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Skip``1(System.Linq.IQueryable{``0},System.Int32):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.SkipLast``1(System.Linq.IQueryable{``0},System.Int32):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.SkipWhile``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.SkipWhile``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int32,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Sum``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Decimal}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Sum``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Double}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Sum``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int32}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Sum``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int64}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Sum``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Decimal}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Sum``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Double}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Sum``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Int32}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Sum``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Int64}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Sum``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Single}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Sum``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Single}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Take``1(System.Linq.IQueryable{``0},System.Int32):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Take``1(System.Linq.IQueryable{``0},System.Range):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.TakeLast``1(System.Linq.IQueryable{``0},System.Int32):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.TakeWhile``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.TakeWhile``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int32,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.ThenBy``2(System.Linq.IOrderedQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.ThenBy``2(System.Linq.IOrderedQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.ThenByDescending``2(System.Linq.IOrderedQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.ThenByDescending``2(System.Linq.IOrderedQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Union``1(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0},System.Collections.Generic.IEqualityComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Union``1(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.UnionBy``2(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IEqualityComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.UnionBy``2(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Where``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Where``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int32,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Zip``2(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Zip``3(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1},System.Collections.Generic.IEnumerable{``2}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Linq.Queryable.Zip``3(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1},System.Linq.Expressions.Expression{System.Func{``0,``1,``2}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - T:System.Net.Security.NegotiateStream:[T:System.Runtime.Versioning.UnsupportedOSPlatformAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0014 - M:System.Console.get_WindowHeight:[T:System.Runtime.Versioning.UnsupportedOSPlatformAttribute] - net7.0/System.Console.dll - net8.0/System.Console.dll - - - CP0014 - M:System.Console.get_WindowWidth:[T:System.Runtime.Versioning.UnsupportedOSPlatformAttribute] - net7.0/System.Console.dll - net8.0/System.Console.dll - - - CP0014 - M:System.Console.set_WindowHeight(System.Int32):[T:System.Runtime.Versioning.SupportedOSPlatformAttribute] - net7.0/System.Console.dll - net8.0/System.Console.dll - - - CP0014 - M:System.Console.set_WindowWidth(System.Int32):[T:System.Runtime.Versioning.SupportedOSPlatformAttribute] - net7.0/System.Console.dll - net8.0/System.Console.dll - - - CP0014 - M:System.Console.SetWindowSize(System.Int32,System.Int32):[T:System.Runtime.Versioning.SupportedOSPlatformAttribute] - net7.0/System.Console.dll - net8.0/System.Console.dll - - - CP0014 - M:System.Linq.Queryable.Aggregate``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``0,``0}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Aggregate``2(System.Linq.IQueryable{``0},``1,System.Linq.Expressions.Expression{System.Func{``1,``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Aggregate``3(System.Linq.IQueryable{``0},``1,System.Linq.Expressions.Expression{System.Func{``1,``0,``1}},System.Linq.Expressions.Expression{System.Func{``1,``2}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.All``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Any``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Any``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Append``1(System.Linq.IQueryable{``0},``0):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Average``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Decimal}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Average``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Double}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Average``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int32}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Average``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int64}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Average``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Decimal}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Average``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Double}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Average``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Int32}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Average``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Int64}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Average``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Single}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Average``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Single}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Cast``1(System.Linq.IQueryable):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Chunk``1(System.Linq.IQueryable{``0},System.Int32):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Concat``1(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Contains``1(System.Linq.IQueryable{``0},``0,System.Collections.Generic.IEqualityComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Contains``1(System.Linq.IQueryable{``0},``0):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Count``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Count``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.DefaultIfEmpty``1(System.Linq.IQueryable{``0},``0):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.DefaultIfEmpty``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Distinct``1(System.Linq.IQueryable{``0},System.Collections.Generic.IEqualityComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Distinct``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.DistinctBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IEqualityComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.DistinctBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.ElementAt``1(System.Linq.IQueryable{``0},System.Index):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.ElementAt``1(System.Linq.IQueryable{``0},System.Int32):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.ElementAtOrDefault``1(System.Linq.IQueryable{``0},System.Index):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.ElementAtOrDefault``1(System.Linq.IQueryable{``0},System.Int32):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Except``1(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0},System.Collections.Generic.IEqualityComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Except``1(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.ExceptBy``2(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IEqualityComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.ExceptBy``2(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.First``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.First``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.FirstOrDefault``1(System.Linq.IQueryable{``0},``0):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.FirstOrDefault``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}},``0):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.FirstOrDefault``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.FirstOrDefault``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.GroupBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IEqualityComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.GroupBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.GroupBy``3(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Linq.Expressions.Expression{System.Func{``0,``2}},System.Collections.Generic.IEqualityComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.GroupBy``3(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Linq.Expressions.Expression{System.Func{``0,``2}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.GroupBy``3(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Linq.Expressions.Expression{System.Func{``1,System.Collections.Generic.IEnumerable{``0},``2}},System.Collections.Generic.IEqualityComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.GroupBy``3(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Linq.Expressions.Expression{System.Func{``1,System.Collections.Generic.IEnumerable{``0},``2}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.GroupBy``4(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Linq.Expressions.Expression{System.Func{``0,``2}},System.Linq.Expressions.Expression{System.Func{``1,System.Collections.Generic.IEnumerable{``2},``3}},System.Collections.Generic.IEqualityComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.GroupBy``4(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Linq.Expressions.Expression{System.Func{``0,``2}},System.Linq.Expressions.Expression{System.Func{``1,System.Collections.Generic.IEnumerable{``2},``3}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.GroupJoin``4(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1},System.Linq.Expressions.Expression{System.Func{``0,``2}},System.Linq.Expressions.Expression{System.Func{``1,``2}},System.Linq.Expressions.Expression{System.Func{``0,System.Collections.Generic.IEnumerable{``1},``3}},System.Collections.Generic.IEqualityComparer{``2}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.GroupJoin``4(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1},System.Linq.Expressions.Expression{System.Func{``0,``2}},System.Linq.Expressions.Expression{System.Func{``1,``2}},System.Linq.Expressions.Expression{System.Func{``0,System.Collections.Generic.IEnumerable{``1},``3}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Intersect``1(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0},System.Collections.Generic.IEqualityComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Intersect``1(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.IntersectBy``2(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IEqualityComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.IntersectBy``2(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Join``4(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1},System.Linq.Expressions.Expression{System.Func{``0,``2}},System.Linq.Expressions.Expression{System.Func{``1,``2}},System.Linq.Expressions.Expression{System.Func{``0,``1,``3}},System.Collections.Generic.IEqualityComparer{``2}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Join``4(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1},System.Linq.Expressions.Expression{System.Func{``0,``2}},System.Linq.Expressions.Expression{System.Func{``1,``2}},System.Linq.Expressions.Expression{System.Func{``0,``1,``3}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Last``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Last``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.LastOrDefault``1(System.Linq.IQueryable{``0},``0):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.LastOrDefault``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}},``0):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.LastOrDefault``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.LastOrDefault``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.LongCount``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.LongCount``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Max``1(System.Linq.IQueryable{``0},System.Collections.Generic.IComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Max``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Max``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.MaxBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.MaxBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Min``1(System.Linq.IQueryable{``0},System.Collections.Generic.IComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Min``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Min``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.MinBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.MinBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.OfType``1(System.Linq.IQueryable):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Order``1(System.Linq.IQueryable{``0},System.Collections.Generic.IComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Order``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.OrderBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.OrderBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.OrderByDescending``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.OrderByDescending``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.OrderDescending``1(System.Linq.IQueryable{``0},System.Collections.Generic.IComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.OrderDescending``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Prepend``1(System.Linq.IQueryable{``0},``0):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Reverse``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Select``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Select``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int32,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.SelectMany``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Collections.Generic.IEnumerable{``1}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.SelectMany``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int32,System.Collections.Generic.IEnumerable{``1}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.SelectMany``3(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Collections.Generic.IEnumerable{``1}}},System.Linq.Expressions.Expression{System.Func{``0,``1,``2}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.SelectMany``3(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int32,System.Collections.Generic.IEnumerable{``1}}},System.Linq.Expressions.Expression{System.Func{``0,``1,``2}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.SequenceEqual``1(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0},System.Collections.Generic.IEqualityComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.SequenceEqual``1(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Single``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Single``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.SingleOrDefault``1(System.Linq.IQueryable{``0},``0):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.SingleOrDefault``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}},``0):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.SingleOrDefault``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.SingleOrDefault``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Skip``1(System.Linq.IQueryable{``0},System.Int32):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.SkipLast``1(System.Linq.IQueryable{``0},System.Int32):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.SkipWhile``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.SkipWhile``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int32,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Sum``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Decimal}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Sum``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Double}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Sum``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int32}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Sum``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int64}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Sum``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Decimal}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Sum``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Double}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Sum``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Int32}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Sum``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Int64}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Sum``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Single}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Sum``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Single}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Take``1(System.Linq.IQueryable{``0},System.Int32):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Take``1(System.Linq.IQueryable{``0},System.Range):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.TakeLast``1(System.Linq.IQueryable{``0},System.Int32):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.TakeWhile``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.TakeWhile``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int32,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.ThenBy``2(System.Linq.IOrderedQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.ThenBy``2(System.Linq.IOrderedQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.ThenByDescending``2(System.Linq.IOrderedQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.ThenByDescending``2(System.Linq.IOrderedQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Union``1(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0},System.Collections.Generic.IEqualityComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Union``1(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.UnionBy``2(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IEqualityComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.UnionBy``2(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Where``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Where``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int32,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Zip``2(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Zip``3(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1},System.Collections.Generic.IEnumerable{``2}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Linq.Queryable.Zip``3(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1},System.Linq.Expressions.Expression{System.Func{``0,``1,``2}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0014 - M:System.Diagnostics.DiagnosticListener.Write(System.String,System.Object):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Diagnostics.DiagnosticSource.dll - net8.0/System.Diagnostics.DiagnosticSource.dll - - - CP0014 - M:System.Diagnostics.DiagnosticSource.StartActivity(System.Diagnostics.Activity,System.Object):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Diagnostics.DiagnosticSource.dll - net8.0/System.Diagnostics.DiagnosticSource.dll - - - CP0014 - M:System.Diagnostics.DiagnosticSource.StopActivity(System.Diagnostics.Activity,System.Object):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Diagnostics.DiagnosticSource.dll - net8.0/System.Diagnostics.DiagnosticSource.dll - - - CP0014 - M:System.Diagnostics.DiagnosticSource.Write(System.String,System.Object):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Diagnostics.DiagnosticSource.dll - net8.0/System.Diagnostics.DiagnosticSource.dll - - - CP0014 - T:System.Net.Security.NegotiateStream:[T:System.Runtime.Versioning.UnsupportedOSPlatformAttribute] - net7.0/System.dll - net8.0/System.dll - - - CP0014 - M:System.Linq.Queryable.Aggregate``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``0,``0}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Aggregate``2(System.Linq.IQueryable{``0},``1,System.Linq.Expressions.Expression{System.Func{``1,``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Aggregate``3(System.Linq.IQueryable{``0},``1,System.Linq.Expressions.Expression{System.Func{``1,``0,``1}},System.Linq.Expressions.Expression{System.Func{``1,``2}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.All``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Any``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Any``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Append``1(System.Linq.IQueryable{``0},``0):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Average``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Decimal}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Average``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Double}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Average``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int32}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Average``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int64}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Average``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Decimal}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Average``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Double}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Average``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Int32}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Average``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Int64}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Average``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Single}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Average``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Single}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Cast``1(System.Linq.IQueryable):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Chunk``1(System.Linq.IQueryable{``0},System.Int32):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Concat``1(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Contains``1(System.Linq.IQueryable{``0},``0,System.Collections.Generic.IEqualityComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Contains``1(System.Linq.IQueryable{``0},``0):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Count``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Count``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.DefaultIfEmpty``1(System.Linq.IQueryable{``0},``0):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.DefaultIfEmpty``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Distinct``1(System.Linq.IQueryable{``0},System.Collections.Generic.IEqualityComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Distinct``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.DistinctBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IEqualityComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.DistinctBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.ElementAt``1(System.Linq.IQueryable{``0},System.Index):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.ElementAt``1(System.Linq.IQueryable{``0},System.Int32):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.ElementAtOrDefault``1(System.Linq.IQueryable{``0},System.Index):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.ElementAtOrDefault``1(System.Linq.IQueryable{``0},System.Int32):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Except``1(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0},System.Collections.Generic.IEqualityComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Except``1(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.ExceptBy``2(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IEqualityComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.ExceptBy``2(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.First``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.First``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.FirstOrDefault``1(System.Linq.IQueryable{``0},``0):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.FirstOrDefault``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}},``0):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.FirstOrDefault``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.FirstOrDefault``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.GroupBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IEqualityComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.GroupBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.GroupBy``3(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Linq.Expressions.Expression{System.Func{``0,``2}},System.Collections.Generic.IEqualityComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.GroupBy``3(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Linq.Expressions.Expression{System.Func{``0,``2}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.GroupBy``3(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Linq.Expressions.Expression{System.Func{``1,System.Collections.Generic.IEnumerable{``0},``2}},System.Collections.Generic.IEqualityComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.GroupBy``3(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Linq.Expressions.Expression{System.Func{``1,System.Collections.Generic.IEnumerable{``0},``2}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.GroupBy``4(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Linq.Expressions.Expression{System.Func{``0,``2}},System.Linq.Expressions.Expression{System.Func{``1,System.Collections.Generic.IEnumerable{``2},``3}},System.Collections.Generic.IEqualityComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.GroupBy``4(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Linq.Expressions.Expression{System.Func{``0,``2}},System.Linq.Expressions.Expression{System.Func{``1,System.Collections.Generic.IEnumerable{``2},``3}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.GroupJoin``4(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1},System.Linq.Expressions.Expression{System.Func{``0,``2}},System.Linq.Expressions.Expression{System.Func{``1,``2}},System.Linq.Expressions.Expression{System.Func{``0,System.Collections.Generic.IEnumerable{``1},``3}},System.Collections.Generic.IEqualityComparer{``2}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.GroupJoin``4(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1},System.Linq.Expressions.Expression{System.Func{``0,``2}},System.Linq.Expressions.Expression{System.Func{``1,``2}},System.Linq.Expressions.Expression{System.Func{``0,System.Collections.Generic.IEnumerable{``1},``3}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Intersect``1(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0},System.Collections.Generic.IEqualityComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Intersect``1(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.IntersectBy``2(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IEqualityComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.IntersectBy``2(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Join``4(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1},System.Linq.Expressions.Expression{System.Func{``0,``2}},System.Linq.Expressions.Expression{System.Func{``1,``2}},System.Linq.Expressions.Expression{System.Func{``0,``1,``3}},System.Collections.Generic.IEqualityComparer{``2}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Join``4(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1},System.Linq.Expressions.Expression{System.Func{``0,``2}},System.Linq.Expressions.Expression{System.Func{``1,``2}},System.Linq.Expressions.Expression{System.Func{``0,``1,``3}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Last``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Last``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.LastOrDefault``1(System.Linq.IQueryable{``0},``0):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.LastOrDefault``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}},``0):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.LastOrDefault``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.LastOrDefault``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.LongCount``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.LongCount``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Max``1(System.Linq.IQueryable{``0},System.Collections.Generic.IComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Max``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Max``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.MaxBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.MaxBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Min``1(System.Linq.IQueryable{``0},System.Collections.Generic.IComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Min``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Min``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.MinBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.MinBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.OfType``1(System.Linq.IQueryable):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Order``1(System.Linq.IQueryable{``0},System.Collections.Generic.IComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Order``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.OrderBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.OrderBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.OrderByDescending``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.OrderByDescending``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.OrderDescending``1(System.Linq.IQueryable{``0},System.Collections.Generic.IComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.OrderDescending``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Prepend``1(System.Linq.IQueryable{``0},``0):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Reverse``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Select``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Select``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int32,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.SelectMany``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Collections.Generic.IEnumerable{``1}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.SelectMany``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int32,System.Collections.Generic.IEnumerable{``1}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.SelectMany``3(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Collections.Generic.IEnumerable{``1}}},System.Linq.Expressions.Expression{System.Func{``0,``1,``2}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.SelectMany``3(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int32,System.Collections.Generic.IEnumerable{``1}}},System.Linq.Expressions.Expression{System.Func{``0,``1,``2}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.SequenceEqual``1(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0},System.Collections.Generic.IEqualityComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.SequenceEqual``1(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Single``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Single``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.SingleOrDefault``1(System.Linq.IQueryable{``0},``0):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.SingleOrDefault``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}},``0):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - CP0014 - M:System.Linq.Queryable.SingleOrDefault``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll + M:System.GC.RefreshMemoryLimit:[T:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute] + net8.0/mscorlib.dll + net9.0/mscorlib.dll CP0014 - M:System.Linq.Queryable.SingleOrDefault``1(System.Linq.IQueryable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll + M:System.GC.RefreshMemoryLimit:[T:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute] + net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 - M:System.Linq.Queryable.Skip``1(System.Linq.IQueryable{``0},System.Int32):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.SkipLast``1(System.Linq.IQueryable{``0},System.Int32):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.SkipWhile``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.SkipWhile``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int32,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Sum``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Decimal}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Sum``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Double}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Sum``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int32}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Sum``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int64}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Sum``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Decimal}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Sum``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Double}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Sum``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Int32}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Sum``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Int64}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Sum``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Nullable{System.Single}}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Sum``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Single}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Take``1(System.Linq.IQueryable{``0},System.Int32):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Take``1(System.Linq.IQueryable{``0},System.Range):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.TakeLast``1(System.Linq.IQueryable{``0},System.Int32):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.TakeWhile``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.TakeWhile``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int32,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.ThenBy``2(System.Linq.IOrderedQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.ThenBy``2(System.Linq.IOrderedQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.ThenByDescending``2(System.Linq.IOrderedQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.ThenByDescending``2(System.Linq.IOrderedQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Union``1(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0},System.Collections.Generic.IEqualityComparer{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Union``1(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.UnionBy``2(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IEqualityComparer{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.UnionBy``2(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Where``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Where``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Int32,System.Boolean}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Zip``2(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Zip``3(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1},System.Collections.Generic.IEnumerable{``2}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - M:System.Linq.Queryable.Zip``3(System.Linq.IQueryable{``0},System.Collections.Generic.IEnumerable{``1},System.Linq.Expressions.Expression{System.Func{``0,``1,``2}}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0014 - T:System.Net.Security.NegotiateStream:[T:System.Runtime.Versioning.UnsupportedOSPlatformAttribute] - net7.0/System.Net.Security.dll - net8.0/System.Net.Security.dll - - - CP0015 - M:System.Type.GetEnumValues:[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/mscorlib.dll - net8.0/mscorlib.dll - - - CP0015 - M:System.Linq.Queryable.AsQueryable(System.Collections.IEnumerable):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0015 - M:System.Linq.Queryable.AsQueryable``1(System.Collections.Generic.IEnumerable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0015 - M:System.Type.GetEnumValues:[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0015 - T:System.Linq.EnumerableQuery`1:[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/netstandard.dll - net8.0/netstandard.dll - - - CP0015 - M:System.Linq.Queryable.AsQueryable(System.Collections.IEnumerable):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0015 - M:System.Linq.Queryable.AsQueryable``1(System.Collections.Generic.IEnumerable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0015 - T:System.Linq.EnumerableQuery`1:[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Core.dll - net8.0/System.Core.dll - - - CP0015 - M:System.Linq.Queryable.AsQueryable(System.Collections.IEnumerable):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0015 - M:System.Linq.Queryable.AsQueryable``1(System.Collections.Generic.IEnumerable{``0}):[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0015 - T:System.Linq.EnumerableQuery`1:[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll - - - CP0015 - M:System.Type.GetEnumValues:[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Runtime.dll - net8.0/System.Runtime.dll - - - CP0015 - T:System.Runtime.InteropServices.Marshalling.NativeMarshallingAttribute:[T:System.AttributeUsageAttribute] - net7.0/System.Runtime.dll - net8.0/System.Runtime.dll - - - CP0015 - M:System.Reflection.Metadata.MetadataUpdateHandlerAttribute.#ctor(System.Type)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net7.0/System.Runtime.Loader.dll - net8.0/System.Runtime.Loader.dll - - - CP0015 - P:System.Reflection.Metadata.MetadataUpdateHandlerAttribute.HandlerType:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net7.0/System.Runtime.Loader.dll - net8.0/System.Runtime.Loader.dll - - - CP0015 - T:System.Text.Json.Serialization.JsonStringEnumConverter:[T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute] - net7.0/System.Text.Json.dll - net8.0/System.Text.Json.dll + M:System.GC.RefreshMemoryLimit:[T:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute] + net8.0/System.Runtime.dll + net9.0/System.Runtime.dll \ No newline at end of file diff --git a/src/libraries/apicompat/ApiCompatBaseline.netstandard2.0.xml b/src/libraries/apicompat/ApiCompatBaseline.netstandard2.0.xml index f19da8b94090d0..dcf5850853a81a 100644 --- a/src/libraries/apicompat/ApiCompatBaseline.netstandard2.0.xml +++ b/src/libraries/apicompat/ApiCompatBaseline.netstandard2.0.xml @@ -11,127 +11,127 @@ CP0002 M:System.ComponentModel.BaseNumberConverter.#ctor netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0002 M:System.Data.Constraint.#ctor netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0002 M:System.Data.Constraint.CheckStateForProperty netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0002 M:System.Data.Constraint.get__DataSet netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0002 M:System.Data.Constraint.SetDataSet(System.Data.DataSet) netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0002 M:System.Linq.EnumerableExecutor.#ctor netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0002 M:System.Linq.EnumerableQuery.#ctor netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0002 M:System.Xml.Schema.XmlSchemaDatatype.#ctor netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0002 M:System.Xml.Schema.XmlSchemaGroupBase.#ctor netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0002 M:System.ComponentModel.BaseNumberConverter.#ctor netstandard2.0/System.ComponentModel.TypeConverter.dll - net8.0/System.ComponentModel.TypeConverter.dll + net9.0/System.ComponentModel.TypeConverter.dll CP0002 M:System.Linq.EnumerableExecutor.#ctor netstandard2.0/System.Core.dll - net8.0/System.Core.dll + net9.0/System.Core.dll CP0002 M:System.Linq.EnumerableQuery.#ctor netstandard2.0/System.Core.dll - net8.0/System.Core.dll + net9.0/System.Core.dll CP0002 M:System.Data.Constraint.#ctor netstandard2.0/System.Data.dll - net8.0/System.Data.dll + net9.0/System.Data.dll CP0002 M:System.Data.Constraint.CheckStateForProperty netstandard2.0/System.Data.dll - net8.0/System.Data.dll + net9.0/System.Data.dll CP0002 M:System.Data.Constraint.get__DataSet netstandard2.0/System.Data.dll - net8.0/System.Data.dll + net9.0/System.Data.dll CP0002 M:System.Data.Constraint.SetDataSet(System.Data.DataSet) netstandard2.0/System.Data.dll - net8.0/System.Data.dll + net9.0/System.Data.dll CP0002 M:System.ComponentModel.BaseNumberConverter.#ctor netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0002 M:System.Linq.EnumerableExecutor.#ctor netstandard2.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll + net9.0/System.Linq.Queryable.dll CP0002 M:System.Linq.EnumerableQuery.#ctor netstandard2.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll + net9.0/System.Linq.Queryable.dll CP0002 M:System.Xml.Schema.XmlSchemaDatatype.#ctor netstandard2.0/System.Xml.dll - net8.0/System.Xml.dll + net9.0/System.Xml.dll CP0002 M:System.Xml.Schema.XmlSchemaGroupBase.#ctor netstandard2.0/System.Xml.dll - net8.0/System.Xml.dll + net9.0/System.Xml.dll CP0004 @@ -143,2640 +143,2640 @@ CP0009 T:System.ComponentModel.BaseNumberConverter netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0009 T:System.Data.Constraint netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0009 T:System.Linq.EnumerableExecutor netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0009 T:System.Linq.EnumerableQuery netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0009 T:System.Xml.Schema.XmlSchemaDatatype netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0009 T:System.Xml.Schema.XmlSchemaGroupBase netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0009 T:System.ComponentModel.BaseNumberConverter netstandard2.0/System.ComponentModel.TypeConverter.dll - net8.0/System.ComponentModel.TypeConverter.dll + net9.0/System.ComponentModel.TypeConverter.dll CP0009 T:System.Linq.EnumerableExecutor netstandard2.0/System.Core.dll - net8.0/System.Core.dll + net9.0/System.Core.dll CP0009 T:System.Linq.EnumerableQuery netstandard2.0/System.Core.dll - net8.0/System.Core.dll + net9.0/System.Core.dll CP0009 T:System.Data.Constraint netstandard2.0/System.Data.dll - net8.0/System.Data.dll + net9.0/System.Data.dll CP0009 T:System.ComponentModel.BaseNumberConverter netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0009 T:System.Linq.EnumerableExecutor netstandard2.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll + net9.0/System.Linq.Queryable.dll CP0009 T:System.Linq.EnumerableQuery netstandard2.0/System.Linq.Queryable.dll - net8.0/System.Linq.Queryable.dll + net9.0/System.Linq.Queryable.dll CP0009 T:System.Xml.Schema.XmlSchemaDatatype netstandard2.0/System.Xml.dll - net8.0/System.Xml.dll + net9.0/System.Xml.dll CP0009 T:System.Xml.Schema.XmlSchemaGroupBase netstandard2.0/System.Xml.dll - net8.0/System.Xml.dll + net9.0/System.Xml.dll CP0014 M:System.Collections.IEnumerable.GetEnumerator:[T:System.Runtime.InteropServices.DispIdAttribute] netstandard2.0/mscorlib.dll - net8.0/mscorlib.dll + net9.0/mscorlib.dll CP0014 M:System.Security.SecureString.AppendChar(System.Char):[T:System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptionsAttribute] netstandard2.0/mscorlib.dll - net8.0/mscorlib.dll + net9.0/mscorlib.dll CP0014 M:System.Security.SecureString.InsertAt(System.Int32,System.Char):[T:System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptionsAttribute] netstandard2.0/mscorlib.dll - net8.0/mscorlib.dll + net9.0/mscorlib.dll CP0014 M:System.Security.SecureString.RemoveAt(System.Int32):[T:System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptionsAttribute] netstandard2.0/mscorlib.dll - net8.0/mscorlib.dll + net9.0/mscorlib.dll CP0014 M:System.Security.SecureString.SetAt(System.Int32,System.Char):[T:System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptionsAttribute] netstandard2.0/mscorlib.dll - net8.0/mscorlib.dll + net9.0/mscorlib.dll CP0014 E:System.Diagnostics.Process.ErrorDataReceived:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 E:System.Diagnostics.Process.Exited:[T:System.ComponentModel.CategoryAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 E:System.Diagnostics.Process.OutputDataReceived:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 E:System.IO.FileSystemWatcher.Error:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 E:System.Timers.Timer.Elapsed:[T:System.ComponentModel.CategoryAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 F:System.Text.RegularExpressions.Regex.internalMatchTimeout:[T:System.Runtime.Serialization.OptionalFieldAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 M:System.Collections.IEnumerable.GetEnumerator:[T:System.Runtime.InteropServices.DispIdAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 M:System.Security.SecureString.AppendChar(System.Char):[T:System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptionsAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 M:System.Security.SecureString.InsertAt(System.Int32,System.Char):[T:System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptionsAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 M:System.Security.SecureString.RemoveAt(System.Int32):[T:System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptionsAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 M:System.Security.SecureString.SetAt(System.Int32,System.Char):[T:System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptionsAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.ComponentModel.BackgroundWorker.CancellationPending:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.ComponentModel.BackgroundWorker.IsBusy:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.ComponentModel.BackgroundWorker.WorkerReportsProgress:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.ComponentModel.BackgroundWorker.WorkerSupportsCancellation:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.ComponentModel.RunWorkerCompletedEventArgs.UserState:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.BasePriority:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.EnableRaisingEvents:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.EnableRaisingEvents:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.ExitCode:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.ExitCode:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.ExitTime:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.ExitTime:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.Handle:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.Handle:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.HandleCount:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.HasExited:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.HasExited:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.Id:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.MachineName:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.MachineName:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.MainModule:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.MainModule:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.MainWindowHandle:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.MainWindowTitle:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.MaxWorkingSet:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.MinWorkingSet:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.Modules:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.Modules:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.NonpagedSystemMemorySize:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.NonpagedSystemMemorySize64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.PagedMemorySize:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.PagedMemorySize64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.PagedSystemMemorySize:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.PagedSystemMemorySize64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.PeakPagedMemorySize:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.PeakPagedMemorySize64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.PeakVirtualMemorySize:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.PeakVirtualMemorySize64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.PeakWorkingSet:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.PeakWorkingSet64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.PriorityBoostEnabled:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.PriorityClass:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.PrivateMemorySize:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.PrivateMemorySize64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.PrivilegedProcessorTime:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.ProcessName:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.ProcessorAffinity:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.Responding:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.SafeHandle:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.SafeHandle:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.SessionId:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.StandardError:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.StandardError:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.StandardInput:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.StandardInput:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.StandardOutput:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.StandardOutput:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.StartInfo:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.StartInfo:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.StartTime:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.SynchronizingObject:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.SynchronizingObject:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.Threads:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.Threads:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.TotalProcessorTime:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.UserProcessorTime:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.VirtualMemorySize:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.VirtualMemorySize64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.WorkingSet:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.WorkingSet64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessModule.FileVersionInfo:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Arguments:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Arguments:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Arguments:[T:System.ComponentModel.SettingsBindableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.CreateNoWindow:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.CreateNoWindow:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Domain:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Environment:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Environment:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Environment:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.EnvironmentVariables:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.EnvironmentVariables:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.EnvironmentVariables:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.ErrorDialog:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.ErrorDialog:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.ErrorDialogParentHandle:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.ErrorDialogParentHandle:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.FileName:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.FileName:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.FileName:[T:System.ComponentModel.SettingsBindableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.LoadUserProfile:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.PasswordInClearText:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.PasswordInClearText:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.RedirectStandardError:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.RedirectStandardError:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.RedirectStandardInput:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.RedirectStandardInput:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.RedirectStandardOutput:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.RedirectStandardOutput:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.UserName:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.UseShellExecute:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.UseShellExecute:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Verb:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Verbs:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Verbs:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.WindowStyle:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.WorkingDirectory:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.WorkingDirectory:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.WorkingDirectory:[T:System.ComponentModel.SettingsBindableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessThread.IdealProcessor:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessThread.ProcessorAffinity:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.IO.FileSystemWatcher.EnableRaisingEvents:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.IO.FileSystemWatcher.Filter:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.IO.FileSystemWatcher.Filter:[T:System.ComponentModel.SettingsBindableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.IO.FileSystemWatcher.IncludeSubdirectories:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.IO.FileSystemWatcher.InternalBufferSize:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.IO.FileSystemWatcher.InternalBufferSize:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.IO.FileSystemWatcher.NotifyFilter:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.IO.FileSystemWatcher.Path:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.IO.FileSystemWatcher.Path:[T:System.ComponentModel.SettingsBindableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.IO.FileSystemWatcher.Site:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.IO.FileSystemWatcher.SynchronizingObject:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.IO.FileSystemWatcher.SynchronizingObject:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Timers.Timer.AutoReset:[T:System.ComponentModel.CategoryAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Timers.Timer.Enabled:[T:System.ComponentModel.CategoryAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Timers.Timer.Interval:[T:System.ComponentModel.CategoryAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Timers.Timer.Interval:[T:System.ComponentModel.SettingsBindableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Timers.Timer.SynchronizingObject:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 T:System.ComponentModel.BackgroundWorker:[T:System.ComponentModel.DefaultEventAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 T:System.Diagnostics.Process:[T:System.ComponentModel.DefaultEventAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 T:System.Diagnostics.Process:[T:System.ComponentModel.DefaultPropertyAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 T:System.IO.FileSystemWatcher:[T:System.ComponentModel.DefaultEventAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.ComponentModel.BackgroundWorker.CancellationPending:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.ComponentModel.EventBasedAsync.dll - net8.0/System.ComponentModel.EventBasedAsync.dll + net9.0/System.ComponentModel.EventBasedAsync.dll CP0014 P:System.ComponentModel.BackgroundWorker.IsBusy:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.ComponentModel.EventBasedAsync.dll - net8.0/System.ComponentModel.EventBasedAsync.dll + net9.0/System.ComponentModel.EventBasedAsync.dll CP0014 P:System.ComponentModel.BackgroundWorker.WorkerReportsProgress:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.ComponentModel.EventBasedAsync.dll - net8.0/System.ComponentModel.EventBasedAsync.dll + net9.0/System.ComponentModel.EventBasedAsync.dll CP0014 P:System.ComponentModel.BackgroundWorker.WorkerSupportsCancellation:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.ComponentModel.EventBasedAsync.dll - net8.0/System.ComponentModel.EventBasedAsync.dll + net9.0/System.ComponentModel.EventBasedAsync.dll CP0014 P:System.ComponentModel.RunWorkerCompletedEventArgs.UserState:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.ComponentModel.EventBasedAsync.dll - net8.0/System.ComponentModel.EventBasedAsync.dll + net9.0/System.ComponentModel.EventBasedAsync.dll CP0014 T:System.ComponentModel.BackgroundWorker:[T:System.ComponentModel.DefaultEventAttribute] netstandard2.0/System.ComponentModel.EventBasedAsync.dll - net8.0/System.ComponentModel.EventBasedAsync.dll + net9.0/System.ComponentModel.EventBasedAsync.dll CP0014 E:System.Diagnostics.Process.ErrorDataReceived:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 E:System.Diagnostics.Process.Exited:[T:System.ComponentModel.CategoryAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 E:System.Diagnostics.Process.OutputDataReceived:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.BasePriority:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.EnableRaisingEvents:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.EnableRaisingEvents:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.ExitCode:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.ExitCode:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.ExitTime:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.ExitTime:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.Handle:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.Handle:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.HandleCount:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.HasExited:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.HasExited:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.Id:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.MachineName:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.MachineName:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.MainModule:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.MainModule:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.MainWindowHandle:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.MainWindowTitle:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.MaxWorkingSet:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.MinWorkingSet:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.Modules:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.Modules:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.NonpagedSystemMemorySize:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.NonpagedSystemMemorySize64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.PagedMemorySize:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.PagedMemorySize64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.PagedSystemMemorySize:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.PagedSystemMemorySize64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.PeakPagedMemorySize:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.PeakPagedMemorySize64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.PeakVirtualMemorySize:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.PeakVirtualMemorySize64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.PeakWorkingSet:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.PeakWorkingSet64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.PriorityBoostEnabled:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.PriorityClass:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.PrivateMemorySize:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.PrivateMemorySize64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.PrivilegedProcessorTime:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.ProcessName:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.ProcessorAffinity:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.Responding:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.SafeHandle:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.SafeHandle:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.SessionId:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.StandardError:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.StandardError:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.StandardInput:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.StandardInput:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.StandardOutput:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.StandardOutput:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.StartInfo:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.StartInfo:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.StartTime:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.SynchronizingObject:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.SynchronizingObject:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.Threads:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.Threads:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.TotalProcessorTime:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.UserProcessorTime:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.VirtualMemorySize:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.VirtualMemorySize64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.WorkingSet:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.Process.WorkingSet64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessModule.FileVersionInfo:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Arguments:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Arguments:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Arguments:[T:System.ComponentModel.SettingsBindableAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.CreateNoWindow:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.CreateNoWindow:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Domain:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Environment:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Environment:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Environment:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.EnvironmentVariables:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.EnvironmentVariables:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.EnvironmentVariables:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.ErrorDialog:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.ErrorDialog:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.ErrorDialogParentHandle:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.ErrorDialogParentHandle:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.FileName:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.FileName:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.FileName:[T:System.ComponentModel.SettingsBindableAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.LoadUserProfile:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.PasswordInClearText:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.PasswordInClearText:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.RedirectStandardError:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.RedirectStandardError:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.RedirectStandardInput:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.RedirectStandardInput:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.RedirectStandardOutput:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.RedirectStandardOutput:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.UserName:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.UseShellExecute:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.UseShellExecute:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Verb:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Verbs:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Verbs:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.WindowStyle:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.WorkingDirectory:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.WorkingDirectory:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessStartInfo.WorkingDirectory:[T:System.ComponentModel.SettingsBindableAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessThread.IdealProcessor:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 P:System.Diagnostics.ProcessThread.ProcessorAffinity:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 T:System.Diagnostics.Process:[T:System.ComponentModel.DefaultEventAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 T:System.Diagnostics.Process:[T:System.ComponentModel.DefaultPropertyAttribute] netstandard2.0/System.Diagnostics.Process.dll - net8.0/System.Diagnostics.Process.dll + net9.0/System.Diagnostics.Process.dll CP0014 E:System.Diagnostics.Process.ErrorDataReceived:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 E:System.Diagnostics.Process.Exited:[T:System.ComponentModel.CategoryAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 E:System.Diagnostics.Process.OutputDataReceived:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 E:System.IO.FileSystemWatcher.Error:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 E:System.Timers.Timer.Elapsed:[T:System.ComponentModel.CategoryAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 F:System.Text.RegularExpressions.Regex.internalMatchTimeout:[T:System.Runtime.Serialization.OptionalFieldAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.ComponentModel.BackgroundWorker.CancellationPending:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.ComponentModel.BackgroundWorker.IsBusy:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.ComponentModel.BackgroundWorker.WorkerReportsProgress:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.ComponentModel.BackgroundWorker.WorkerSupportsCancellation:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.ComponentModel.RunWorkerCompletedEventArgs.UserState:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.BasePriority:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.EnableRaisingEvents:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.EnableRaisingEvents:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.ExitCode:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.ExitCode:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.ExitTime:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.ExitTime:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.Handle:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.Handle:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.HandleCount:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.HasExited:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.HasExited:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.Id:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.MachineName:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.MachineName:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.MainModule:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.MainModule:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.MainWindowHandle:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.MainWindowTitle:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.MaxWorkingSet:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.MinWorkingSet:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.Modules:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.Modules:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.NonpagedSystemMemorySize:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.NonpagedSystemMemorySize64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.PagedMemorySize:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.PagedMemorySize64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.PagedSystemMemorySize:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.PagedSystemMemorySize64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.PeakPagedMemorySize:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.PeakPagedMemorySize64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.PeakVirtualMemorySize:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.PeakVirtualMemorySize64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.PeakWorkingSet:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.PeakWorkingSet64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.PriorityBoostEnabled:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.PriorityClass:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.PrivateMemorySize:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.PrivateMemorySize64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.PrivilegedProcessorTime:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.ProcessName:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.ProcessorAffinity:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.Responding:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.SafeHandle:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.SafeHandle:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.SessionId:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.StandardError:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.StandardError:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.StandardInput:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.StandardInput:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.StandardOutput:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.StandardOutput:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.StartInfo:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.StartInfo:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.StartTime:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.SynchronizingObject:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.SynchronizingObject:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.Threads:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.Threads:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.TotalProcessorTime:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.UserProcessorTime:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.VirtualMemorySize:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.VirtualMemorySize64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.WorkingSet:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.Process.WorkingSet64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessModule.FileVersionInfo:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Arguments:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Arguments:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Arguments:[T:System.ComponentModel.SettingsBindableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.CreateNoWindow:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.CreateNoWindow:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Domain:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Environment:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Environment:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Environment:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.EnvironmentVariables:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.EnvironmentVariables:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.EnvironmentVariables:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.ErrorDialog:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.ErrorDialog:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.ErrorDialogParentHandle:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.ErrorDialogParentHandle:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.FileName:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.FileName:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.FileName:[T:System.ComponentModel.SettingsBindableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.LoadUserProfile:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.PasswordInClearText:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.PasswordInClearText:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.RedirectStandardError:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.RedirectStandardError:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.RedirectStandardInput:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.RedirectStandardInput:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.RedirectStandardOutput:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.RedirectStandardOutput:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.UserName:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.UseShellExecute:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.UseShellExecute:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Verb:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Verbs:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Verbs:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.WindowStyle:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.WorkingDirectory:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.WorkingDirectory:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessStartInfo.WorkingDirectory:[T:System.ComponentModel.SettingsBindableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessThread.IdealProcessor:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Diagnostics.ProcessThread.ProcessorAffinity:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.IO.FileSystemWatcher.EnableRaisingEvents:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.IO.FileSystemWatcher.Filter:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.IO.FileSystemWatcher.Filter:[T:System.ComponentModel.SettingsBindableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.IO.FileSystemWatcher.IncludeSubdirectories:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.IO.FileSystemWatcher.InternalBufferSize:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.IO.FileSystemWatcher.InternalBufferSize:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.IO.FileSystemWatcher.NotifyFilter:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.IO.FileSystemWatcher.Path:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.IO.FileSystemWatcher.Path:[T:System.ComponentModel.SettingsBindableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.IO.FileSystemWatcher.Site:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.IO.FileSystemWatcher.SynchronizingObject:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.IO.FileSystemWatcher.SynchronizingObject:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Timers.Timer.AutoReset:[T:System.ComponentModel.CategoryAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Timers.Timer.Enabled:[T:System.ComponentModel.CategoryAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Timers.Timer.Interval:[T:System.ComponentModel.CategoryAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Timers.Timer.Interval:[T:System.ComponentModel.SettingsBindableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 P:System.Timers.Timer.SynchronizingObject:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 T:System.ComponentModel.BackgroundWorker:[T:System.ComponentModel.DefaultEventAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 T:System.Diagnostics.Process:[T:System.ComponentModel.DefaultEventAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 T:System.Diagnostics.Process:[T:System.ComponentModel.DefaultPropertyAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 T:System.IO.FileSystemWatcher:[T:System.ComponentModel.DefaultEventAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll CP0014 E:System.IO.FileSystemWatcher.Error:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.IO.FileSystem.Watcher.dll - net8.0/System.IO.FileSystem.Watcher.dll + net9.0/System.IO.FileSystem.Watcher.dll CP0014 P:System.IO.FileSystemWatcher.EnableRaisingEvents:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.IO.FileSystem.Watcher.dll - net8.0/System.IO.FileSystem.Watcher.dll + net9.0/System.IO.FileSystem.Watcher.dll CP0014 P:System.IO.FileSystemWatcher.Filter:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.IO.FileSystem.Watcher.dll - net8.0/System.IO.FileSystem.Watcher.dll + net9.0/System.IO.FileSystem.Watcher.dll CP0014 P:System.IO.FileSystemWatcher.Filter:[T:System.ComponentModel.SettingsBindableAttribute] netstandard2.0/System.IO.FileSystem.Watcher.dll - net8.0/System.IO.FileSystem.Watcher.dll + net9.0/System.IO.FileSystem.Watcher.dll CP0014 P:System.IO.FileSystemWatcher.IncludeSubdirectories:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.IO.FileSystem.Watcher.dll - net8.0/System.IO.FileSystem.Watcher.dll + net9.0/System.IO.FileSystem.Watcher.dll CP0014 P:System.IO.FileSystemWatcher.InternalBufferSize:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.IO.FileSystem.Watcher.dll - net8.0/System.IO.FileSystem.Watcher.dll + net9.0/System.IO.FileSystem.Watcher.dll CP0014 P:System.IO.FileSystemWatcher.InternalBufferSize:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.IO.FileSystem.Watcher.dll - net8.0/System.IO.FileSystem.Watcher.dll + net9.0/System.IO.FileSystem.Watcher.dll CP0014 P:System.IO.FileSystemWatcher.NotifyFilter:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.IO.FileSystem.Watcher.dll - net8.0/System.IO.FileSystem.Watcher.dll + net9.0/System.IO.FileSystem.Watcher.dll CP0014 P:System.IO.FileSystemWatcher.Path:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.IO.FileSystem.Watcher.dll - net8.0/System.IO.FileSystem.Watcher.dll + net9.0/System.IO.FileSystem.Watcher.dll CP0014 P:System.IO.FileSystemWatcher.Path:[T:System.ComponentModel.SettingsBindableAttribute] netstandard2.0/System.IO.FileSystem.Watcher.dll - net8.0/System.IO.FileSystem.Watcher.dll + net9.0/System.IO.FileSystem.Watcher.dll CP0014 P:System.IO.FileSystemWatcher.Site:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.IO.FileSystem.Watcher.dll - net8.0/System.IO.FileSystem.Watcher.dll + net9.0/System.IO.FileSystem.Watcher.dll CP0014 P:System.IO.FileSystemWatcher.SynchronizingObject:[T:System.ComponentModel.BrowsableAttribute] netstandard2.0/System.IO.FileSystem.Watcher.dll - net8.0/System.IO.FileSystem.Watcher.dll + net9.0/System.IO.FileSystem.Watcher.dll CP0014 P:System.IO.FileSystemWatcher.SynchronizingObject:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.IO.FileSystem.Watcher.dll - net8.0/System.IO.FileSystem.Watcher.dll + net9.0/System.IO.FileSystem.Watcher.dll CP0014 T:System.IO.FileSystemWatcher:[T:System.ComponentModel.DefaultEventAttribute] netstandard2.0/System.IO.FileSystem.Watcher.dll - net8.0/System.IO.FileSystem.Watcher.dll + net9.0/System.IO.FileSystem.Watcher.dll CP0014 M:System.Collections.IEnumerable.GetEnumerator:[T:System.Runtime.InteropServices.DispIdAttribute] netstandard2.0/System.Runtime.dll - net8.0/System.Runtime.dll + net9.0/System.Runtime.dll CP0014 M:System.Security.SecureString.AppendChar(System.Char):[T:System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptionsAttribute] netstandard2.0/System.Security.SecureString.dll - net8.0/System.Security.SecureString.dll + net9.0/System.Security.SecureString.dll CP0014 M:System.Security.SecureString.InsertAt(System.Int32,System.Char):[T:System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptionsAttribute] netstandard2.0/System.Security.SecureString.dll - net8.0/System.Security.SecureString.dll + net9.0/System.Security.SecureString.dll CP0014 M:System.Security.SecureString.RemoveAt(System.Int32):[T:System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptionsAttribute] netstandard2.0/System.Security.SecureString.dll - net8.0/System.Security.SecureString.dll + net9.0/System.Security.SecureString.dll CP0014 M:System.Security.SecureString.SetAt(System.Int32,System.Char):[T:System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptionsAttribute] netstandard2.0/System.Security.SecureString.dll - net8.0/System.Security.SecureString.dll + net9.0/System.Security.SecureString.dll CP0014 F:System.Text.RegularExpressions.Regex.internalMatchTimeout:[T:System.Runtime.Serialization.OptionalFieldAttribute] netstandard2.0/System.Text.RegularExpressions.dll - net8.0/System.Text.RegularExpressions.dll + net9.0/System.Text.RegularExpressions.dll CP0015 P:System.Timers.Timer.Interval:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0015 P:System.Timers.Timer.Interval:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.0/System.dll - net8.0/System.dll + net9.0/System.dll \ No newline at end of file diff --git a/src/libraries/apicompat/ApiCompatBaseline.netstandard2.1.xml b/src/libraries/apicompat/ApiCompatBaseline.netstandard2.1.xml index de4ff50c7dc0ed..24fcd25d45b461 100644 --- a/src/libraries/apicompat/ApiCompatBaseline.netstandard2.1.xml +++ b/src/libraries/apicompat/ApiCompatBaseline.netstandard2.1.xml @@ -5,870 +5,870 @@ CP0014 E:System.Diagnostics.Process.ErrorDataReceived:[T:System.ComponentModel.BrowsableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 E:System.Diagnostics.Process.Exited:[T:System.ComponentModel.CategoryAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 E:System.Diagnostics.Process.OutputDataReceived:[T:System.ComponentModel.BrowsableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 E:System.IO.FileSystemWatcher.Error:[T:System.ComponentModel.BrowsableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 E:System.Timers.Timer.Elapsed:[T:System.ComponentModel.CategoryAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 M:System.Security.SecureString.AppendChar(System.Char):[T:System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptionsAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 M:System.Security.SecureString.InsertAt(System.Int32,System.Char):[T:System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptionsAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 M:System.Security.SecureString.RemoveAt(System.Int32):[T:System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptionsAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 M:System.Security.SecureString.SetAt(System.Int32,System.Char):[T:System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptionsAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.ComponentModel.BackgroundWorker.CancellationPending:[T:System.ComponentModel.BrowsableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.ComponentModel.BackgroundWorker.IsBusy:[T:System.ComponentModel.BrowsableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.ComponentModel.BackgroundWorker.WorkerReportsProgress:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.ComponentModel.BackgroundWorker.WorkerSupportsCancellation:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.ComponentModel.RunWorkerCompletedEventArgs.UserState:[T:System.ComponentModel.BrowsableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.BasePriority:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.EnableRaisingEvents:[T:System.ComponentModel.BrowsableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.EnableRaisingEvents:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.ExitCode:[T:System.ComponentModel.BrowsableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.ExitCode:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.ExitTime:[T:System.ComponentModel.BrowsableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.ExitTime:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.Handle:[T:System.ComponentModel.BrowsableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.Handle:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.HandleCount:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.HasExited:[T:System.ComponentModel.BrowsableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.HasExited:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.Id:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.MachineName:[T:System.ComponentModel.BrowsableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.MachineName:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.MainModule:[T:System.ComponentModel.BrowsableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.MainModule:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.MainWindowHandle:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.MainWindowTitle:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.MaxWorkingSet:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.MinWorkingSet:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.Modules:[T:System.ComponentModel.BrowsableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.Modules:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.NonpagedSystemMemorySize:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.NonpagedSystemMemorySize64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.PagedMemorySize:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.PagedMemorySize64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.PagedSystemMemorySize:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.PagedSystemMemorySize64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.PeakPagedMemorySize:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.PeakPagedMemorySize64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.PeakVirtualMemorySize:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.PeakVirtualMemorySize64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.PeakWorkingSet:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.PeakWorkingSet64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.PriorityBoostEnabled:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.PriorityClass:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.PrivateMemorySize:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.PrivateMemorySize64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.PrivilegedProcessorTime:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.ProcessName:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.ProcessorAffinity:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.Responding:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.SafeHandle:[T:System.ComponentModel.BrowsableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.SafeHandle:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.SessionId:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.StandardError:[T:System.ComponentModel.BrowsableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.StandardError:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.StandardInput:[T:System.ComponentModel.BrowsableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.StandardInput:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.StandardOutput:[T:System.ComponentModel.BrowsableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.StandardOutput:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.StartInfo:[T:System.ComponentModel.BrowsableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.StartInfo:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.StartTime:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.SynchronizingObject:[T:System.ComponentModel.BrowsableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.SynchronizingObject:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.Threads:[T:System.ComponentModel.BrowsableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.Threads:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.TotalProcessorTime:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.UserProcessorTime:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.VirtualMemorySize:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.VirtualMemorySize64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.WorkingSet:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.Process.WorkingSet64:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessModule.FileVersionInfo:[T:System.ComponentModel.BrowsableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Arguments:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Arguments:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Arguments:[T:System.ComponentModel.SettingsBindableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.CreateNoWindow:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.CreateNoWindow:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Domain:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Environment:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Environment:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Environment:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.EnvironmentVariables:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.EnvironmentVariables:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.EnvironmentVariables:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.ErrorDialog:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.ErrorDialog:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.ErrorDialogParentHandle:[T:System.ComponentModel.BrowsableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.ErrorDialogParentHandle:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.FileName:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.FileName:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.FileName:[T:System.ComponentModel.SettingsBindableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.LoadUserProfile:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.PasswordInClearText:[T:System.ComponentModel.BrowsableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.PasswordInClearText:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.RedirectStandardError:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.RedirectStandardError:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.RedirectStandardInput:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.RedirectStandardInput:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.RedirectStandardOutput:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.RedirectStandardOutput:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.UserName:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.UseShellExecute:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.UseShellExecute:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Verb:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Verbs:[T:System.ComponentModel.BrowsableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.Verbs:[T:System.ComponentModel.DesignerSerializationVisibilityAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.WindowStyle:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.WorkingDirectory:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.WorkingDirectory:[T:System.ComponentModel.NotifyParentPropertyAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessStartInfo.WorkingDirectory:[T:System.ComponentModel.SettingsBindableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessThread.IdealProcessor:[T:System.ComponentModel.BrowsableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Diagnostics.ProcessThread.ProcessorAffinity:[T:System.ComponentModel.BrowsableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.IO.FileSystemWatcher.EnableRaisingEvents:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.IO.FileSystemWatcher.Filter:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.IO.FileSystemWatcher.Filter:[T:System.ComponentModel.SettingsBindableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.IO.FileSystemWatcher.IncludeSubdirectories:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.IO.FileSystemWatcher.InternalBufferSize:[T:System.ComponentModel.BrowsableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.IO.FileSystemWatcher.InternalBufferSize:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.IO.FileSystemWatcher.NotifyFilter:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.IO.FileSystemWatcher.Path:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.IO.FileSystemWatcher.Path:[T:System.ComponentModel.SettingsBindableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.IO.FileSystemWatcher.Site:[T:System.ComponentModel.BrowsableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.IO.FileSystemWatcher.SynchronizingObject:[T:System.ComponentModel.BrowsableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.IO.FileSystemWatcher.SynchronizingObject:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Timers.Timer.AutoReset:[T:System.ComponentModel.CategoryAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Timers.Timer.Enabled:[T:System.ComponentModel.CategoryAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Timers.Timer.Interval:[T:System.ComponentModel.CategoryAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Timers.Timer.Interval:[T:System.ComponentModel.SettingsBindableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 P:System.Timers.Timer.SynchronizingObject:[T:System.ComponentModel.BrowsableAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 T:System.ComponentModel.BackgroundWorker:[T:System.ComponentModel.DefaultEventAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 T:System.Diagnostics.Process:[T:System.ComponentModel.DefaultEventAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 T:System.Diagnostics.Process:[T:System.ComponentModel.DefaultPropertyAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0014 T:System.IO.FileSystemWatcher:[T:System.ComponentModel.DefaultEventAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0015 P:System.Timers.Timer.Interval:[T:System.ComponentModel.DefaultValueAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0015 T:System.Runtime.InteropServices.ManagedToNativeComInteropStubAttribute:[T:System.AttributeUsageAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0015 T:System.Xml.Serialization.XmlAnyAttributeAttribute:[T:System.AttributeUsageAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll CP0015 T:System.Xml.Serialization.XmlNamespaceDeclarationsAttribute:[T:System.AttributeUsageAttribute] netstandard2.1/netstandard.dll - net8.0/netstandard.dll + net9.0/netstandard.dll \ No newline at end of file diff --git a/src/libraries/oob.proj b/src/libraries/oob.proj index 3f7031edf77788..b879127a13a816 100644 --- a/src/libraries/oob.proj +++ b/src/libraries/oob.proj @@ -4,6 +4,8 @@ $(NetCoreAppCurrent)-$(TargetOS) $(NetCoreAppCurrent) + + true @@ -25,11 +27,6 @@ - - - - - diff --git a/src/libraries/pretest.proj b/src/libraries/pretest.proj index 3bee7105912e7f..d913752e596d14 100644 --- a/src/libraries/pretest.proj +++ b/src/libraries/pretest.proj @@ -102,7 +102,7 @@ Condition="'$(BuildTargetFramework)' == '$(NetCoreAppCurrent)' or '$(BuildTargetFramework)' == ''"> diff --git a/src/libraries/sendtohelix-mobile.targets b/src/libraries/sendtohelix-mobile.targets index 53e5f30194a90c..857077429fd8df 100644 --- a/src/libraries/sendtohelix-mobile.targets +++ b/src/libraries/sendtohelix-mobile.targets @@ -58,7 +58,8 @@ <_XHarnessAppleCustomCommand Condition="'$(NeedsiOSSDK)' == 'true'"> source build-apple-app.sh - $([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)', 'microsoft.net.illink.tasks', '$(MicrosoftNETILLinkTasksVersion)')) + + $([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)', 'microsoft.net.illink.tasks', '$(BundledNETCoreAppPackageVersion)')) diff --git a/src/libraries/sendtohelix-superpmi-collect.targets b/src/libraries/sendtohelix-superpmi-collect.targets new file mode 100644 index 00000000000000..5affc58dd36ef7 --- /dev/null +++ b/src/libraries/sendtohelix-superpmi-collect.targets @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/libraries/sendtohelix.proj b/src/libraries/sendtohelix.proj index 354064b4dc014d..44a02cd5b828e0 100644 --- a/src/libraries/sendtohelix.proj +++ b/src/libraries/sendtohelix.proj @@ -46,12 +46,17 @@ Creator=$(Creator); HelixAccessToken=$(HelixAccessToken); HelixTargetQueues=$(HelixTargetQueues); - BuildTargetFramework=$(BuildTargetFramework) + BuildTargetFramework=$(BuildTargetFramework); + Scenarios=$(_Scenarios); + SuperPmiCollect=$(_SuperPmiCollect); + SuperPmiCollectionType=$(_SuperPmiCollectionType); + SuperPmiCollectionName=$(_SuperPmiCollectionName) <_DebuggerHosts Condition="'$(_DebuggerHosts)' == ''">$(DebuggerHost) <_DebuggerHosts Condition="'$(_DebuggerHosts)' == ''">chrome + @@ -62,7 +67,7 @@ - + $(MSBuildThisFileDirectory)sendtohelixhelp.proj @@ -195,6 +200,34 @@ SkipUnchangedFiles="true" /> + + + + + + + <_SuperPmiScriptsFiles Include="$(RepoRoot)src\coreclr\scripts\*.py" /> + + + + + + + + + + + + + + + + + DependsOnTargets="CreateAllScenarioTestEnvFiles;PrepareSuperPmiCollectCorrelationPayload;CompressRuntimeDirectory" > diff --git a/src/libraries/sendtohelixhelp.proj b/src/libraries/sendtohelixhelp.proj index 6c04a4365065f1..b65627cffb10bd 100644 --- a/src/libraries/sendtohelixhelp.proj +++ b/src/libraries/sendtohelixhelp.proj @@ -21,6 +21,7 @@ + + true @@ -71,9 +73,6 @@ UseHardlinksIfPossible="true" /> - - - diff --git a/src/libraries/slngen.proj b/src/libraries/slngen.proj index 3defd9663be0aa..3118a1e1545a3e 100644 --- a/src/libraries/slngen.proj +++ b/src/libraries/slngen.proj @@ -19,7 +19,7 @@ - + diff --git a/src/libraries/testPackages/testPackages.proj b/src/libraries/testPackages/testPackages.proj index 6480f5fc5928bf..8ea21edf3e9a2f 100644 --- a/src/libraries/testPackages/testPackages.proj +++ b/src/libraries/testPackages/testPackages.proj @@ -20,7 +20,7 @@ - + $([System.String]::new($([System.Text.RegularExpressions.Regex]::Match($([System.IO.Path]::GetFileNameWithoutExtension('%(Identity)')), $(PackageNamePattern)))).TrimEnd('.')) %(Identity) @@ -63,10 +63,30 @@ - + + + + + + + + + + + + + + + + + - + diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index 7ef3d7b0235ebb..0afc0908b70c40 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -54,6 +54,11 @@ + + + + + @@ -266,6 +271,7 @@ + + + + + + @@ -629,7 +640,6 @@ BuildInParallel="false" /> - + diff --git a/src/mono/CMakeLists.txt b/src/mono/CMakeLists.txt index a57cc52b0b110b..da7577726f0853 100644 --- a/src/mono/CMakeLists.txt +++ b/src/mono/CMakeLists.txt @@ -1,13 +1,14 @@ cmake_minimum_required(VERSION 3.20) -cmake_policy(SET CMP0091 NEW) - project(mono) include(../../eng/native/configurepaths.cmake) include(${CLR_ENG_NATIVE_DIR}/functions.cmake) include(${CLR_ENG_NATIVE_DIR}/configuretools.cmake) +set(CMAKE_C_STANDARD 11) +set(CMAKE_C_STANDARD_REQUIRED ON) + if (MSVC) # Also set by configurecompiler.cmake, which isn't used by mono yet add_compile_options($<$:/source-charset:utf-8>) # Force MSVC to compile source as UTF-8. @@ -256,6 +257,8 @@ elseif(CLR_CMAKE_HOST_OS STREQUAL "wasi") add_definitions(-DDISABLE_SOCKET_TRANSPORT) add_definitions(-DDISABLE_EGD_SOCKET) add_definitions(-DDISABLE_EVENTPIPE) + add_compile_options(-Wno-strict-prototypes) + add_compile_options(-Wno-unused-but-set-variable) set(ENABLE_PERFTRACING 0) set(DISABLE_SHARED_LIBS 1) set(INTERNAL_ZLIB 1) @@ -520,13 +523,8 @@ include(configure) ###################################### if(GCC) - if(HOST_WASI) - # WASI SDK only includes some required definitions if the C version is at least this new - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11") - else() - # We require C99 with some GNU extensions, e.g. `linux` macro - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99") - endif() + # We require C11 with some GNU extensions, e.g. `linux` macro + set(CMAKE_C_EXTENSIONS ON) # Turn off floating point expression contraction because it is considered a value changing # optimization in the IEEE 754 specification and is therefore considered unsafe. @@ -830,7 +828,7 @@ set(EGLIB_GSSIZE "ptrdiff_t") # ###################################### -# DEBUG BUILD CHECKS +# CHECKED BUILD CHECKS ###################################### function(process_checked_build) string(REPLACE "," ";" tmp1 "${CHECKED_BUILD}") @@ -840,17 +838,15 @@ function(process_checked_build) endforeach(arg) endfunction() -if (CMAKE_BUILD_TYPE STREQUAL "Debug") - # if no explicit -DCHECKED_BUILD=args option, just do ENABLE_CHECKED_BUILD_PRIVATE_TYPES - if (CHECKED_BUILD) - set(ENABLE_CHECKED_BUILD 1) - process_checked_build() - else() - set(ENABLE_CHECKED_BUILD 1) - set(ENABLE_CHECKED_BUILD_PRIVATE_TYPES 1) - endif() +if(CHECKED_BUILD) + set(ENABLE_CHECKED_BUILD 1) + process_checked_build() +elseif (CMAKE_BUILD_TYPE STREQUAL "Debug") + # if no explicit -DCHECKED_BUILD=args option and we're building debug, just do ENABLE_CHECKED_BUILD_PRIVATE_TYPES + set(ENABLE_CHECKED_BUILD 1) + set(ENABLE_CHECKED_BUILD_PRIVATE_TYPES 1) endif() -### End of debug build checks +### End of checked build checks ###################################### # COMPONENT BUILD CHECKS diff --git a/src/mono/System.Private.CoreLib/CompatibilitySuppressions.xml b/src/mono/System.Private.CoreLib/CompatibilitySuppressions.xml index ed9aefadda0057..8e96fb8cbaa781 100644 --- a/src/mono/System.Private.CoreLib/CompatibilitySuppressions.xml +++ b/src/mono/System.Private.CoreLib/CompatibilitySuppressions.xml @@ -7,43 +7,29 @@ CP0015 M:System.Diagnostics.Tracing.EventSource.Write``1(System.String,``0):[T:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute] - ref/net8.0/System.Private.CoreLib.dll - lib/net8.0/System.Private.CoreLib.dll CP0015 M:System.Diagnostics.Tracing.EventSource.Write``1(System.String,System.Diagnostics.Tracing.EventSourceOptions@,``0@):[T:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute] - ref/net8.0/System.Private.CoreLib.dll - lib/net8.0/System.Private.CoreLib.dll CP0015 M:System.Diagnostics.Tracing.EventSource.Write``1(System.String,System.Diagnostics.Tracing.EventSourceOptions@,System.Guid@,System.Guid@,``0@):[T:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute] - ref/net8.0/System.Private.CoreLib.dll - lib/net8.0/System.Private.CoreLib.dll CP0015 M:System.Diagnostics.Tracing.EventSource.WriteEvent(System.Int32,System.Object[]):[T:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute] - ref/net8.0/System.Private.CoreLib.dll - lib/net8.0/System.Private.CoreLib.dll CP0015 M:System.Diagnostics.Tracing.EventSource.WriteEventCore(System.Int32,System.Int32,System.Diagnostics.Tracing.EventSource.EventData*):[T:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute] - ref/net8.0/System.Private.CoreLib.dll - lib/net8.0/System.Private.CoreLib.dll CP0015 M:System.Diagnostics.Tracing.EventSource.WriteEventWithRelatedActivityId(System.Int32,System.Guid,System.Object[]):[T:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute] - ref/net8.0/System.Private.CoreLib.dll - lib/net8.0/System.Private.CoreLib.dll CP0015 M:System.Diagnostics.Tracing.EventSource.WriteEventWithRelatedActivityIdCore(System.Int32,System.Guid*,System.Int32,System.Diagnostics.Tracing.EventSource.EventData*):[T:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute] - ref/net8.0/System.Private.CoreLib.dll - lib/net8.0/System.Private.CoreLib.dll - \ No newline at end of file + 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 d40e212a672fa2..9f71ff470f3e4a 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 @@ public static Delegate CreateDelegate(Type type, object? firstArgument, MethodIn if (invoke is null) return null; - ParameterInfo[] delargs = invoke.GetParametersNoCopy(); + ReadOnlySpan delargs = invoke.GetParametersAsSpan(); Type[] delargtypes = new Type[delargs.Length]; for (int i = 0; i < delargs.Length; i++) @@ -250,8 +250,8 @@ private static bool IsMatchingCandidate(RuntimeType type, object? target, Method return false; } - ParameterInfo[] delargs = invoke.GetParametersNoCopy(); - ParameterInfo[] args = method.GetParametersNoCopy(); + ReadOnlySpan delargs = invoke.GetParametersAsSpan(); + ReadOnlySpan args = method.GetParametersAsSpan(); bool argLengthMatch; @@ -437,7 +437,7 @@ private static bool IsArgumentTypeMatchWithThis(Type delArgType, Type argType, b MethodInfo? invoke = GetType().GetMethod("Invoke"); if (invoke != null && args != null) { - ParameterInfo[] delegateParameters = invoke.GetParameters(); + ReadOnlySpan delegateParameters = invoke.GetParametersAsSpan(); for (int i = 0; i < args.Length; i++) { if (args[i] == Type.Missing) diff --git a/src/mono/System.Private.CoreLib/src/System/GC.Mono.cs b/src/mono/System.Private.CoreLib/src/System/GC.Mono.cs index 9e87bfe1e167a9..485576645537f0 100644 --- a/src/mono/System.Private.CoreLib/src/System/GC.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/GC.Mono.cs @@ -320,7 +320,6 @@ public static System.Collections.Generic.IReadOnlyDictionary Get return new System.Collections.Generic.Dictionary(); } - [System.Runtime.Versioning.RequiresPreviewFeaturesAttribute("RefreshMemoryLimit is in preview.")] public static void RefreshMemoryLimit() { throw new PlatformNotSupportedException(); 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 add2c153f66f1f..19c814cc5c72dc 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/CustomAttribute.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/CustomAttribute.cs @@ -681,7 +681,7 @@ internal static bool IsDefined(ICustomAttributeProvider obj, Type attributeType, int position = parinfo.Position; if (position == -1) return bmethod.ReturnParameter; - return bmethod.GetParameters()[position]; + return bmethod.GetParametersAsSpan()[position]; } } /* 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 index 5a97e73dcd7d34..3ec41bb31fbda9 100644 --- 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 @@ -146,7 +146,7 @@ private int AddRef(object reference) return _nrefs - 1; } - internal override int GetParametersCount() => GetParametersNoCopy().Length; + internal override int GetParametersCount() => GetParametersAsSpan().Length; private sealed class DynamicMethodTokenGenerator : ITokenGenerator { diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/MethodBase.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/MethodBase.Mono.cs index f498bebafc19f3..53de103e2c4fbe 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/MethodBase.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/MethodBase.Mono.cs @@ -39,7 +39,7 @@ public partial class MethodBase [MethodImplAttribute(MethodImplOptions.InternalCall)] public static extern MethodBase? GetCurrentMethod(); - internal virtual ParameterInfo[] GetParametersNoCopy() + internal virtual ReadOnlySpan GetParametersAsSpan() { return GetParametersInternal(); } diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.Mono.cs index 20a20b2eefc3bc..7cbf84f2196f10 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.Mono.cs @@ -190,7 +190,7 @@ private string FormatNameAndSig() sbName.Append(RuntimeMethodHandle.ConstructInstantiation(this)); sbName.Append('('); - RuntimeParameterInfo.FormatParameters(sbName, GetParametersNoCopy(), CallingConvention); + RuntimeParameterInfo.FormatParameters(sbName, GetParametersAsSpan(), CallingConvention); sbName.Append(')'); return sbName.ToString(); @@ -808,7 +808,7 @@ private void InvokeClassConstructor() * to match the types of the method signature. */ [MethodImplAttribute(MethodImplOptions.InternalCall)] - internal extern object InternalInvoke(object? obj, IntPtr *args, out Exception exc); + internal extern object InternalInvoke(object? obj, IntPtr *args, out Exception? exc); public override RuntimeMethodHandle MethodHandle { 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 69f8537d6696bb..b2a743b88b5b07 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeParameterInfo.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeParameterInfo.cs @@ -25,7 +25,7 @@ internal RuntimeParameterInfo(string name, Type type, int position, int attrs, o this.marshalAs = marshalAs; } - internal static void FormatParameters(StringBuilder sb, ParameterInfo[] p, CallingConventions callingConvention) + internal static void FormatParameters(StringBuilder sb, ReadOnlySpan p, CallingConventions callingConvention) { for (int i = 0; i < p.Length; ++i) { diff --git a/src/mono/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeHelpers.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeHelpers.Mono.cs index 8fa80262e4903c..bbe9b2e2a2fc3e 100644 --- a/src/mono/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeHelpers.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeHelpers.Mono.cs @@ -48,9 +48,6 @@ public static int GetHashCode(object? o) return InternalGetHashCode(o); } - [MethodImplAttribute(MethodImplOptions.InternalCall)] - private static extern int InternalTryGetHashCode(object? o); - /// /// If a hash code has been assigned to the object, it is returned. Otherwise zero is /// returned. @@ -65,7 +62,7 @@ internal static int TryGetHashCode(object? o) // NOTE: the interpreter does not run this code. It intrinsifies the whole RuntimeHelpers.TryGetHashCode function if (Threading.ObjectHeader.TryGetHashCode (o, out int hash)) return hash; - return InternalTryGetHashCode(o); + return 0; } public static new bool Equals(object? o1, object? o2) diff --git a/src/mono/System.Private.CoreLib/src/System/RuntimeType.Mono.cs b/src/mono/System.Private.CoreLib/src/System/RuntimeType.Mono.cs index 5924d5c0640df7..d44eb711e4747b 100644 --- a/src/mono/System.Private.CoreLib/src/System/RuntimeType.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/RuntimeType.Mono.cs @@ -419,7 +419,7 @@ private static bool FilterApplyMethodBase( #region If argumentTypes supplied if (argumentTypes != null) { - ParameterInfo[] parameterInfos = methodBase.GetParametersNoCopy(); + ReadOnlySpan parameterInfos = methodBase.GetParametersAsSpan(); if (argumentTypes.Length != parameterInfos.Length) { @@ -820,9 +820,7 @@ public override MemberInfo[] GetMembers(BindingFlags bindingAttr) if (types.Length == 0 && candidates.Count == 1) { ConstructorInfo firstCandidate = candidates[0]; - - ParameterInfo[] parameters = firstCandidate.GetParametersNoCopy(); - if (parameters == null || parameters.Length == 0) + if (firstCandidate.GetParametersAsSpan().Length == 0) { return firstCandidate; } @@ -1557,7 +1555,7 @@ private void CreateInstanceCheckThis() throw new MissingMethodException(SR.Format(SR.MissingConstructor_Name, FullName)); } - if (invokeMethod.GetParametersNoCopy().Length == 0) + if (invokeMethod.GetParametersAsSpan().Length == 0) { if (args.Length != 0) { diff --git a/src/mono/System.Private.CoreLib/src/System/Threading/ObjectHeader.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Threading/ObjectHeader.Mono.cs index 16eccb9511c571..e23da14bae4b1e 100644 --- a/src/mono/System.Private.CoreLib/src/System/Threading/ObjectHeader.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Threading/ObjectHeader.Mono.cs @@ -255,7 +255,7 @@ public static bool TryGetHashCode(object? o, out int hash) if (lw.IsInflated) { ref MonoThreadsSync mon = ref lw.GetInflatedLock(); hash = SyncBlock.HashCode(ref mon); - return false; + return true; } else { hash = lw.FlatHash; return true; diff --git a/src/mono/cmake/config.h.in b/src/mono/cmake/config.h.in index 70de81d18bf1b6..087398f7a63489 100644 --- a/src/mono/cmake/config.h.in +++ b/src/mono/cmake/config.h.in @@ -885,21 +885,6 @@ /* Enable experiment 'Tiered Compilation' */ #cmakedefine ENABLE_EXPERIMENT_TIERED 1 -/* Enable checked build */ -#cmakedefine ENABLE_CHECKED_BUILD 1 - -/* Enable GC checked build */ -#cmakedefine ENABLE_CHECKED_BUILD_GC 1 - -/* Enable metadata checked build */ -#cmakedefine ENABLE_CHECKED_BUILD_METADATA 1 - -/* Enable thread checked build */ -#cmakedefine ENABLE_CHECKED_BUILD_THREAD 1 - -/* Enable private types checked build */ -#cmakedefine ENABLE_CHECKED_BUILD_PRIVATE_TYPES 1 - /* Enable EventPipe library support */ #cmakedefine ENABLE_PERFTRACING 1 @@ -942,6 +927,9 @@ /* Enable runtime checks of mempool references between metadata images (must set env var MONO_CHECK_MODE=metadata) */ #cmakedefine ENABLE_CHECKED_BUILD_METADATA 1 +/* Enable runtime checks of casts between types */ +#cmakedefine ENABLE_CHECKED_BUILD_CASTS 1 + /* Enable static linking of mono runtime components */ #cmakedefine STATIC_COMPONENTS diff --git a/src/mono/cmake/options.cmake b/src/mono/cmake/options.cmake index f5af034cc919c9..4a1db314d468b4 100644 --- a/src/mono/cmake/options.cmake +++ b/src/mono/cmake/options.cmake @@ -48,6 +48,7 @@ option (ENABLE_CHECKED_BUILD_PRIVATE_TYPES "Enable compile time checking that ge option (ENABLE_CHECKED_BUILD_GC "Enable runtime GC Safe / Unsafe mode assertion checks (must set env var MONO_CHECK_MODE=gc)") option (ENABLE_CHECKED_BUILD_THREAD "Enable runtime history of per-thread coop state transitions (must set env var MONO_CHECK_MODE=thread)") option (ENABLE_CHECKED_BUILD_METADATA "Enable runtime checks of mempool references between metadata images (must set env var MONO_CHECK_MODE=metadata)") +option (ENABLE_CHECKED_BUILD_CASTS "Enable runtime checks of casts between types") option (ENABLE_MSCORDBI "Generate mscordbi to support icordbg interface") option (ENABLE_SMALL_CONFIG "Reduce runtime requirements (and capabilities)") option (ENABLE_DTRACE "Enable DTrace probes") @@ -60,7 +61,7 @@ option (ENABLE_WEBCIL "Enable the WebCIL loader") set (MONO_GC "sgen" CACHE STRING "Garbage collector implementation (sgen or boehm). Default: sgen") set (GC_SUSPEND "default" CACHE STRING "GC suspend method (default, preemptive, coop, hybrid)") -set (CHECKED_BUILD "" CACHE STRING "Set ENABLE_CHECKED_BUILD_ options at once. Comma-separated list of lowercase ENABLE_CHECKED_BUILD_ options ie. 'gc,threads,private_types' etc.") +set (CHECKED_BUILD "" CACHE STRING "Set ENABLE_CHECKED_BUILD_ options at once. Comma-separated list of lowercase ENABLE_CHECKED_BUILD_ options ie. 'private_types,gc,thread,metadata,casts' etc.") set (ENABLE_MINIMAL "" CACHE STRING "Set many DISABLE_ options at once. Comma-separated list of lowercase DISABLE_ options ie. 'jit,simd' etc.") set (AOT_TARGET_TRIPLE "" CACHE STRING "Target triple for AOT cross compiler") set (AOT_OFFSETS_FILE "" CACHE STRING "Offsets file for AOT cross compiler") diff --git a/src/mono/mono.proj b/src/mono/mono.proj index 6be683f8e2eb2c..26c7c470b3447d 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -181,7 +181,7 @@ %(_VersionLines.Identity) https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$(WasiSdkVersion)/wasi-sdk-$(WasiSdkVersion).0-linux.tar.gz https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$(WasiSdkVersion)/wasi-sdk-$(WasiSdkVersion).0-macos.tar.gz - https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$(WasiSdkVersion)/wasi-sdk-$(WasiSdkVersion).0-mingw.tar.gz + https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$(WasiSdkVersion)/wasi-sdk-$(WasiSdkVersion).0.m-mingw.tar.gz @@ -810,6 +810,16 @@ + + + $(ROOTFS_HOST_DIR) + + @@ -859,7 +869,7 @@ <_MonoSkipInitCompiler Condition="'$(CrossBuild)' == 'true'">false <_MonoAotCrossOffsetsCommand Condition="'$(MonoUseCrossTool)' == 'true'">$(PythonCmd) $(MonoProjectRoot)mono/tools/offsets-tool/offsets-tool.py @(MonoAotCrossOffsetsToolParams, ' ') <_MonoAotCMakeConfigureCommand>cmake @(MonoAOTCMakeArgs, ' ') $(MonoCMakeExtraArgs) "$(MonoProjectRoot.TrimEnd('\/'))" - <_MonoAotCMakeConfigureCommand Condition="'$(_MonoSkipInitCompiler)' != 'true' and '$(HostOS)' != 'windows'">sh -c 'build_arch="$(_CompilerTargetArch)" compiler="$(MonoCCompiler)" . "$(RepositoryEngineeringCommonDir)native/init-compiler.sh" && @(_MonoAotBuildEnv, ' ') $(_MonoAotCMakeConfigureCommand)' + <_MonoAotCMakeConfigureCommand Condition="'$(_MonoSkipInitCompiler)' != 'true' and '$(HostOS)' != 'windows'">sh -c 'build_arch="$(_CompilerTargetArch)" ROOTFS_DIR="$(MonoCrossDir)" compiler="$(MonoCCompiler)" . "$(RepositoryEngineeringCommonDir)native/init-compiler.sh" && @(_MonoAotBuildEnv, ' ') $(_MonoAotCMakeConfigureCommand)' <_MonoAotCMakeConfigureCommand Condition="'$(_MonoSkipInitCompiler)' == 'true' and '$(HostOS)' != 'windows'">$(_MonoAOTCCOption) $(_MonoAOTCXXOption) @(_MonoAotBuildEnv, ' ') $(_MonoAotCMakeConfigureCommand) <_MonoAotCMakeConfigureCommand Condition="'$(HostOS)' == 'windows'">call "$(RepositoryEngineeringDir)native\init-vs-env.cmd" $(_CompilerTargetArch) && cd /D "$(MonoObjCrossDir)" && @(_MonoAotBuildEnv, ' ') $(_MonoAotCMakeConfigureCommand) <_MonoAotCMakeBuildCommand>cmake --build . --target install --config $(Configuration) diff --git a/src/mono/mono/arch/amd64/amd64-codegen.h b/src/mono/mono/arch/amd64/amd64-codegen.h index 304ff3cb743776..e92018f97385d7 100644 --- a/src/mono/mono/arch/amd64/amd64-codegen.h +++ b/src/mono/mono/arch/amd64/amd64-codegen.h @@ -1206,6 +1206,9 @@ typedef union { #define amd64_movsb_size(inst,size) do { amd64_codegen_pre(inst); amd64_emit_rex ((inst),(size),0,0,0); x86_movsb(inst); amd64_codegen_post(inst); } while (0) #define amd64_movsl_size(inst,size) do { amd64_codegen_pre(inst); amd64_emit_rex ((inst),(size),0,0,0); x86_movsl(inst); amd64_codegen_post(inst); } while (0) #define amd64_movsd_size(inst,size) do { amd64_codegen_pre(inst); amd64_emit_rex ((inst),(size),0,0,0); x86_movsd(inst); amd64_codegen_post(inst); } while (0) +#define amd64_bsf_size(inst,dreg,reg,size) do { amd64_codegen_pre(inst); amd64_emit_rex ((inst),(size),(dreg),0,(reg)); x86_bsf ((inst),(dreg)&0x7,(reg)&0x7); amd64_codegen_post (inst); } while (0) +#define amd64_bsr_size(inst,dreg,reg,size) do { amd64_codegen_pre(inst); amd64_emit_rex ((inst),(size),(dreg),0,(reg)); x86_bsr ((inst),(dreg)&0x7,(reg)&0x7); amd64_codegen_post (inst); } while (0) + #define amd64_prefix_size(inst,p,size) do { x86_prefix((inst), p); } while (0) #define amd64_rdtsc_size(inst,size) do { amd64_codegen_pre(inst); amd64_emit_rex ((inst),(size),0,0,0); x86_rdtsc(inst); amd64_codegen_post(inst); } while (0) #define amd64_cmpxchg_reg_reg_size(inst,dreg,reg,size) do { amd64_codegen_pre(inst); amd64_emit_rex ((inst),(size),(dreg),0,(reg)); x86_cmpxchg_reg_reg((inst),((dreg)&0x7),((reg)&0x7)); amd64_codegen_post(inst); } while (0) @@ -1578,4 +1581,6 @@ typedef union { #define amd64_prolog(inst,frame,reg_mask) amd64_prolog_size(inst,frame,reg_mask,8) #define amd64_epilog(inst,reg_mask) amd64_epilog_size(inst,reg_mask,8) +#define amd64_pause(inst) do { x86_pause ((inst)); } while (0) + #endif // AMD64_H diff --git a/src/mono/mono/arch/arm64/arm64-codegen.h b/src/mono/mono/arch/arm64/arm64-codegen.h index 0834a24ad635e1..05b13c627e08de 100644 --- a/src/mono/mono/arch/arm64/arm64-codegen.h +++ b/src/mono/mono/arch/arm64/arm64-codegen.h @@ -179,7 +179,7 @@ arm_is_bl_disp (void *code, void *target) static G_GNUC_UNUSED inline unsigned int arm_get_disp (void *p, void *target) { - unsigned int disp = ((char*)target - (char*)p) / 4; + unsigned int disp = GINT64_TO_UINT (((char*)target - (char*)p) / 4); if (target) g_assert (arm_is_bl_disp (p, target)); @@ -205,7 +205,7 @@ arm_is_disp19 (void *code, void *target) static G_GNUC_UNUSED inline unsigned int arm_get_disp19 (void *p, void *target) { - unsigned int disp = ((char*)target - (char*)p) / 4; + unsigned int disp = GINT64_TO_UINT (((char*)target - (char*)p) / 4); if (target) g_assert (arm_is_disp19 (p, target)); @@ -233,7 +233,7 @@ arm_get_disp19 (void *p, void *target) static G_GNUC_UNUSED inline unsigned int arm_get_disp15 (void *p, void *target) { - unsigned int disp = ((char*)target - (char*)p) / 4; + unsigned int disp = GINT64_TO_UINT (((char*)target - (char*)p) / 4); return (disp & 0x7fff); } @@ -545,7 +545,7 @@ arm_encode_arith_imm (int imm, guint32 *shift) #define arm_movkw(p, rd, imm, shift) do { g_assert ((shift) % 16 == 0); arm_format_mov ((p), 0x0, 0x3, (shift) / 16, (rd), (imm)); } while (0) /* PC-relative address calculation */ -#define arm_format_adrp(p, op, rd, target) do { guint64 imm1 = (guint64)(target); guint64 imm2 = (guint64)(p); int _imm = imm1 - imm2; arm_emit ((p), ((op) << 31) | (((_imm) & 0x3) << 29) | (0x10 << 24) | (((_imm >> 2) & 0x7ffff) << 5) | ((rd) << 0)); } while (0) +#define arm_format_adrp(p, op, rd, target) do { guint64 imm1 = (guint64)(target); guint64 imm2 = (guint64)(p); int _imm = GUINT64_TO_INT (imm1 - imm2); arm_emit ((p), ((op) << 31) | (((_imm) & 0x3) << 29) | (0x10 << 24) | (((_imm >> 2) & 0x7ffff) << 5) | ((rd) << 0)); } while (0) #define arm_adrpx(p, rd, target) arm_format_adrp ((p), 0x1, (rd), (target)) #define arm_adrx(p, rd, target) arm_format_adrp ((p), 0x0, (rd), (target)) @@ -770,6 +770,9 @@ arm_encode_arith_imm (int imm, guint32 *shift) #define arm_fmovd(p, dd, dn) arm_format_fmov ((p), 0x1, (dn), (dd)) #define arm_fmovs(p, dd, dn) arm_format_fmov ((p), 0x0, (dn), (dd)) +/* C7.2.132 FMOV (scalar, imm) */ +#define arm_fmov_imm(p, type, imm, rd) arm_emit ((p), 0b00011110001000000001000000000000 | ((type) << 22) | ((imm) << 13) | ((rd) << 0)) + /* C6.3.54 FCMP */ #define arm_format_fcmp(p, type, opc, rn, rm) arm_emit ((p), (0x1e << 24) | ((type) << 22) | (0x1 << 21) | ((rm) << 16) | (0x8 << 10) | ((rn) << 5) | ((opc) << 3)) diff --git a/src/mono/mono/arch/x86/x86-codegen.h b/src/mono/mono/arch/x86/x86-codegen.h index aca2b659ca058b..0070d40334f5c6 100644 --- a/src/mono/mono/arch/x86/x86-codegen.h +++ b/src/mono/mono/arch/x86/x86-codegen.h @@ -1963,6 +1963,9 @@ mono_x86_patch_inline (guchar* code, gpointer target) #define x86_leave(inst) do { x86_byte (inst, 0xc9); } while (0) #define x86_sahf(inst) do { x86_byte (inst, 0x9e); } while (0) +#define x86_bsf(inst,dreg,reg) do { x86_byte (inst, 0x0f); x86_byte (inst, 0xbc); x86_reg_emit ((inst), (dreg), (reg)); } while (0) +#define x86_bsr(inst,dreg,reg) do { x86_byte (inst, 0x0f); x86_byte (inst, 0xbd); x86_reg_emit ((inst), (dreg), (reg)); } while (0) + #define x86_fsin(inst) do { x86_codegen_pre(&(inst), 2); x86_byte (inst, 0xd9); x86_byte (inst, 0xfe); } while (0) #define x86_fcos(inst) do { x86_codegen_pre(&(inst), 2); x86_byte (inst, 0xd9); x86_byte (inst, 0xff); } while (0) #define x86_fabs(inst) do { x86_codegen_pre(&(inst), 2); x86_byte (inst, 0xd9); x86_byte (inst, 0xe1); } while (0) @@ -2906,4 +2909,10 @@ typedef enum { #define x86_sse_lzcnt_reg_reg_size(inst, dreg, reg, size) emit_sse_reg_reg_size((inst), (dreg), (reg), 0xf3, 0x0f, 0xbd, (size)) #define x86_sse_popcnt_reg_reg_size(inst, dreg, reg, size) emit_sse_reg_reg_size((inst), (dreg), (reg), 0xf3, 0x0f, 0xb8, (size)) +#define x86_pause(inst) do { \ + x86_codegen_pre(&(inst), 2); \ + x86_byte (inst, 0xF3); \ + x86_byte (inst, 0x90); \ +} while (0) + #endif // X86_H diff --git a/src/mono/mono/component/debugger-agent.c b/src/mono/mono/component/debugger-agent.c index a210242c1eb691..c840e1b7ae2613 100644 --- a/src/mono/mono/component/debugger-agent.c +++ b/src/mono/mono/component/debugger-agent.c @@ -8855,7 +8855,7 @@ type_commands_internal (int command, MonoClass *klass, MonoDomain *domain, guint buffer_add_objid (buf, obj); if (CHECK_ICORDBG (TRUE)) { - buffer_add_byte(buf, m_class_is_valuetype (klass)); + buffer_add_byte(buf, GINT_TO_UINT8(m_class_is_valuetype (klass))); if (m_class_is_valuetype (klass)) { int nfields = 0; @@ -8950,7 +8950,7 @@ type_commands_internal (int command, MonoClass *klass, MonoDomain *domain, guint case MDBGPROT_CMD_TYPE_ELEMENT_TYPE: { buffer_add_int (buf, m_class_get_byval_arg (klass)->type); - buffer_add_byte (buf, MONO_TYPE_ISSTRUCT (m_class_get_byval_arg (klass))); + buffer_add_byte (buf, GINT_TO_UINT8 (MONO_TYPE_ISSTRUCT (m_class_get_byval_arg (klass)))); break; } case MDBGPROT_CMD_TYPE_RANK: @@ -10141,7 +10141,7 @@ array_commands (int command, guint8 *p, guint8 *end, Buffer *buf) { buffer_add_typeid (buf, arr->obj.vtable->domain, m_class_get_element_class (arr->obj.vtable->klass)); if (CHECK_ICORDBG (TRUE)) - buffer_add_byte (buf, MONO_TYPE_ISSTRUCT (m_class_get_byval_arg (m_class_get_element_class (arr->obj.vtable->klass)))); + buffer_add_byte (buf, GINT_TO_UINT8 (MONO_TYPE_ISSTRUCT (m_class_get_byval_arg (m_class_get_element_class (arr->obj.vtable->klass))))); } } break; diff --git a/src/mono/mono/component/mini-wasi-debugger.c b/src/mono/mono/component/mini-wasi-debugger.c index 8b1b87f0b3fb37..3811cb480b5f4a 100644 --- a/src/mono/mono/component/mini-wasi-debugger.c +++ b/src/mono/mono/component/mini-wasi-debugger.c @@ -14,7 +14,7 @@ __attribute__((import_name("sock_accept"))) int sock_accept(int fd, int fdflags, int* result_ptr); static long long -time_in_milliseconds () +time_in_milliseconds (void) { struct timeval tv; gettimeofday(&tv,NULL); diff --git a/src/mono/mono/eglib/ghashtable.c b/src/mono/mono/eglib/ghashtable.c index 79b24603a560f8..ed2a1c395b23ca 100644 --- a/src/mono/mono/eglib/ghashtable.c +++ b/src/mono/mono/eglib/ghashtable.c @@ -648,7 +648,7 @@ g_direct_equal (gconstpointer v1, gconstpointer v2) guint g_direct_hash (gconstpointer v1) { - return GPOINTER_TO_UINT (v1); + return GCONSTPOINTER_TO_UINT (v1); } gboolean diff --git a/src/mono/mono/eglib/giconv.c b/src/mono/mono/eglib/giconv.c index 8ae955c303fe25..0a079fba220680 100644 --- a/src/mono/mono/eglib/giconv.c +++ b/src/mono/mono/eglib/giconv.c @@ -237,8 +237,6 @@ g_unichar_to_utf8 (gunichar c, gchar *outbuf) static FORCE_INLINE (int) g_unichar_to_utf16_endian (gunichar c, gunichar2 *outbuf, unsigned endian) { - gunichar c2; - if (c < 0xd800) { if (outbuf) *outbuf = (gunichar2) (endian == G_BIG_ENDIAN ? GUINT16_TO_BE(c) : GUINT16_TO_LE(c)); @@ -253,7 +251,7 @@ g_unichar_to_utf16_endian (gunichar c, gunichar2 *outbuf, unsigned endian) return 1; } else if (c < 0x110000) { if (outbuf) { - c2 = c - 0x10000; + gunichar2 c2 = (gunichar2)(c - 0x10000); gunichar2 part1 = (c2 >> 10) + 0xd800; gunichar2 part2 = (c2 & 0x3ff) + 0xdc00; @@ -350,7 +348,7 @@ g_utf8_to_utf16_impl (const gchar *str, glong len, glong *items_read, glong *ite if (ret <= 0) return NULL; - lpDestStr = malloc((ret + 1) * sizeof(gunichar2)); + lpDestStr = g_malloc ((ret + 1) * sizeof(gunichar2)); ret = (glong)minipal_convert_utf8_to_utf16 (str, len, lpDestStr, ret, flags); lpDestStr[ret] = '\0'; diff --git a/src/mono/mono/eglib/glib.h b/src/mono/mono/eglib/glib.h index 4a8a7e1a543fa9..72dba137e18b6f 100644 --- a/src/mono/mono/eglib/glib.h +++ b/src/mono/mono/eglib/glib.h @@ -827,10 +827,13 @@ gpointer g_convert_error_quark(void); #define g_assert(x) (G_LIKELY((x)) ? 1 : (mono_assertion_message (__FILE__, __LINE__, #x), 0)) #endif -#ifdef __cplusplus +#if defined(__cplusplus) || (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) #define g_static_assert(x) static_assert (x, "") +#elif (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) +#define g_static_assert(x) _Static_assert (x, "") #else -#define g_static_assert(x) g_assert (x) +#error Mono requires static_assert (C11 or newer) +/* #define g_static_assert(x) g_assert (x)*/ #endif #define g_assert_not_reached() G_STMT_START { mono_assertion_message_unreachable (__FILE__, __LINE__); eg_unreachable(); } G_STMT_END @@ -1311,8 +1314,7 @@ gint g_clock_nanosleep (clockid_t clockid, gint flags, const struct timespec *request, struct timespec *remain); #endif -//#define ENABLE_CHECKED_CASTS -#ifdef ENABLE_CHECKED_CASTS +#ifdef ENABLE_CHECKED_BUILD_CASTS #define __CAST_PTRTYPE_TO_STYPE(src,dest,min_v,max_v) \ static inline dest \ @@ -1397,6 +1399,9 @@ __CAST_PTRTYPE_TO_UTYPE(gpointer, gulong, ULONG_MAX) __CAST_PTRTYPE_TO_STYPE(gpointer, gint, INT_MIN, INT_MAX) __CAST_PTRTYPE_TO_UTYPE(gpointer, guint, UINT_MAX) +__CAST_PTRTYPE_TO_STYPE(gconstpointer, gint, INT_MIN, INT_MAX) +__CAST_PTRTYPE_TO_UTYPE(gconstpointer, guint, UINT_MAX) + __CAST_PTRTYPE_TO_STYPE(gintptr, gint32, INT32_MIN, INT32_MAX) __CAST_PTRTYPE_TO_UTYPE(gintptr, guint32, UINT32_MAX) __CAST_PTRTYPE_TO_STYPE(gintptr, gint16, INT16_MIN, INT16_MAX) @@ -1447,6 +1452,7 @@ __CAST_STYPE_TO_UTYPE(gssize, gsize, SIZE_MAX) __CAST_UTYPE_TO_STYPE(gsize, gssize, PTRDIFF_MIN, PTRDIFF_MAX) __CAST_STYPE_TO_UTYPE(glong, gulong, ULONG_MAX) +__CAST_STYPE_TO_UTYPE(glong, guint32, UINT32_MAX) __CAST_UTYPE_TO_STYPE(gulong, glong, LONG_MIN, LONG_MAX) __CAST_STYPE_TO_STYPE(gdouble, gint64, INT64_MIN, INT64_MAX) @@ -1555,7 +1561,7 @@ __CAST_UTYPE_TO_STYPE(gunichar, gchar, CHAR_MIN, CHAR_MAX) #endif -#if !defined(ENABLE_CHECKED_CASTS) +#if !defined(ENABLE_CHECKED_BUILD_CASTS) #define G_CAST_PTRTYPE_TO_STYPE(src,dest,v) ((dest)(gssize)(v)) #define G_CAST_PTRTYPE_TO_UTYPE(src,dest,v) ((dest)(gsize)(v)) @@ -1585,6 +1591,9 @@ __CAST_UTYPE_TO_STYPE(gunichar, gchar, CHAR_MIN, CHAR_MAX) #define GPOINTER_TO_INT(v) G_CAST_PTRTYPE_TO_STYPE(gpointer, gint, v) #define GPOINTER_TO_UINT(v) G_CAST_PTRTYPE_TO_UTYPE(gpointer, guint, v) +#define GCONSTPOINTER_TO_INT(v) G_CAST_PTRTYPE_TO_STYPE(gconstpointer, gint, v) +#define GCONSTPOINTER_TO_UINT(v) G_CAST_PTRTYPE_TO_UTYPE(gconstpointer, guint, v) + #define GINTPTR_TO_INT32(v) G_CAST_PTRTYPE_TO_STYPE(gintptr, gint32, v) #define GINTPTR_TO_UINT32(v) G_CAST_PTRTYPE_TO_UTYPE(gintptr, guint32, v) diff --git a/src/mono/mono/eventpipe/ds-rt-mono.h b/src/mono/mono/eventpipe/ds-rt-mono.h index 541dca1caed1d1..a1a8c42e4db85f 100644 --- a/src/mono/mono/eventpipe/ds-rt-mono.h +++ b/src/mono/mono/eventpipe/ds-rt-mono.h @@ -214,8 +214,8 @@ static uint32_t ds_rt_set_environment_variable (const ep_char16_t *name, const ep_char16_t *value) { - gchar *nameNarrow = ep_rt_utf16le_to_utf8_string (name, -1); - gchar *valueNarrow = ep_rt_utf16le_to_utf8_string (value, -1); + gchar *nameNarrow = ep_rt_utf16le_to_utf8_string (name); + gchar *valueNarrow = ep_rt_utf16le_to_utf8_string (value); gboolean success = g_setenv(nameNarrow, valueNarrow, true); diff --git a/src/mono/mono/eventpipe/ep-rt-mono-runtime-provider.c b/src/mono/mono/eventpipe/ep-rt-mono-runtime-provider.c index ccb91d0ca41694..fd02bd7dbeab5f 100644 --- a/src/mono/mono/eventpipe/ep-rt-mono-runtime-provider.c +++ b/src/mono/mono/eventpipe/ep-rt-mono-runtime-provider.c @@ -2372,7 +2372,7 @@ write_event_exception_thrown (MonoObject *obj) if (exception->inner_ex) flags |= EXCEPTION_THROWN_FLAGS_HAS_INNER; if (exception->message) - exception_message = ep_rt_utf16_to_utf8_string (mono_string_chars_internal (exception->message), mono_string_length_internal (exception->message)); + exception_message = ep_rt_utf16_to_utf8_string_n (mono_string_chars_internal (exception->message), mono_string_length_internal (exception->message)); hresult = exception->hresult; } @@ -3729,7 +3729,7 @@ buffer_gc_event_object_reference_callback ( sizeof (object_size) + sizeof (object_type) + sizeof (edge_count) + - (edge_count * sizeof (uintptr_t)); + GUINT64_TO_UINT32 (edge_count * sizeof (uintptr_t)); EP_ASSERT (context->buffer); EP_ASSERT (context->buffer->context); @@ -3775,7 +3775,7 @@ flush_gc_event_bulk_root_static_vars (GCHeapDumpContext *context) context->bulk_root_static_vars.count, (uint64_t)mono_get_root_domain (), clr_instance_get_id (), - context->bulk_root_static_vars.data_current - context->bulk_root_static_vars.data_start, + GPTRDIFF_TO_INT (context->bulk_root_static_vars.data_current - context->bulk_root_static_vars.data_start), context->bulk_root_static_vars.data_start, NULL, NULL); @@ -3979,7 +3979,7 @@ fire_gc_event_bulk_root_edge ( break; case MONO_ROOT_SOURCE_GC_HANDLE : root_kind = GC_ROOT_KIND_HANDLE; - root_flags = GPOINTER_TO_INT (gc_root->key) != 0 ? GC_ROOT_FLAGS_PINNING : GC_ROOT_FLAGS_NONE; + root_flags = GCONSTPOINTER_TO_INT (gc_root->key) != 0 ? GC_ROOT_FLAGS_PINNING : GC_ROOT_FLAGS_NONE; root_id = address; break; case MONO_ROOT_SOURCE_HANDLE : diff --git a/src/mono/mono/eventpipe/ep-rt-mono.c b/src/mono/mono/eventpipe/ep-rt-mono.c index 9cf1cd687fab4b..de9d2e8671c07e 100644 --- a/src/mono/mono/eventpipe/ep-rt-mono.c +++ b/src/mono/mono/eventpipe/ep-rt-mono.c @@ -105,7 +105,7 @@ ep_rt_mono_file_open_write (const ep_char8_t *path) if (!path) return INVALID_HANDLE_VALUE; - ep_char16_t *path_utf16 = ep_rt_utf8_to_utf16le_string (path, -1); + ep_char16_t *path_utf16 = ep_rt_utf8_to_utf16le_string (path); if (!path_utf16) return INVALID_HANDLE_VALUE; @@ -600,7 +600,7 @@ ep_rt_mono_os_environment_get_utf16 (dn_vector_ptr_t *os_env) #else gchar **next = NULL; for (next = environ; *next != NULL; ++next) - dn_vector_ptr_push_back (os_env, ep_rt_utf8_to_utf16le_string (*next, -1)); + dn_vector_ptr_push_back (os_env, ep_rt_utf8_to_utf16le_string (*next)); #endif } diff --git a/src/mono/mono/eventpipe/ep-rt-mono.h b/src/mono/mono/eventpipe/ep-rt-mono.h index 3740f63d760da1..6b741d4390bb96 100644 --- a/src/mono/mono/eventpipe/ep-rt-mono.h +++ b/src/mono/mono/eventpipe/ep-rt-mono.h @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -1292,22 +1293,6 @@ ep_rt_utf8_string_compare_ignore_case ( return g_strcasecmp ((const char *)str1, (const char *)str2); } -static -inline -bool -ep_rt_utf8_string_is_null_or_empty (const ep_char8_t *str) -{ - if (str == NULL) - return true; - - while (*str) { - if (!isspace(*str)) - return false; - str++; - } - return true; -} - static inline ep_char8_t * @@ -1381,16 +1366,6 @@ ep_rt_utf8_string_replace ( return false; } -static -inline -ep_char16_t * -ep_rt_utf8_to_utf16le_string ( - const ep_char8_t *str, - size_t len) -{ - return (ep_char16_t *)(g_utf8_to_utf16le ((const gchar *)str, (glong)len, NULL, NULL, NULL)); -} - static inline ep_char16_t * @@ -1403,6 +1378,13 @@ ep_rt_utf16_string_dup (const ep_char16_t *str) return str_dup; } +static +ep_char8_t * +ep_rt_utf8_string_alloc (size_t len) +{ + return g_new(ep_char8_t, len); +} + static inline void @@ -1420,23 +1402,10 @@ ep_rt_utf16_string_len (const ep_char16_t *str) } static -inline -ep_char8_t * -ep_rt_utf16_to_utf8_string ( - const ep_char16_t *str, - size_t len) -{ - return g_utf16_to_utf8 ((const gunichar2 *)str, (glong)len, NULL, NULL, NULL); -} - -static -inline -ep_char8_t * -ep_rt_utf16le_to_utf8_string ( - const ep_char16_t *str, - size_t len) +ep_char16_t * +ep_rt_utf16_string_alloc (size_t len) { - return g_utf16le_to_utf8 ((const gunichar2 *)str, (glong)len, NULL, NULL, NULL); + return g_new(ep_char16_t, len); } static diff --git a/src/mono/mono/eventpipe/gen-eventing.cmake b/src/mono/mono/eventpipe/gen-eventing.cmake index b3795b75e385db..e3421048114201 100644 --- a/src/mono/mono/eventpipe/gen-eventing.cmake +++ b/src/mono/mono/eventpipe/gen-eventing.cmake @@ -53,7 +53,7 @@ if(ENABLE_PERFTRACING) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${MONO_DIAGNOSTICS_TRACING_COMPONENT_NAME}-gen-headers.timestamp - COMMAND ${Python_EXECUTABLE} ${GEN_EVENTING_SCRIPT} --man ${EVENT_MANIFEST} --inc ${MONO_EVENTPIPE_GEN_INCLUDE_PATH} --dummy ${MONO_EVENTPIPE_GEN_INCLUDE_PATH}/etmdummy.h --runtimeflavor mono ${NONEXTERN_ARG} ${NOXPLATHEADER_ARG} + COMMAND ${Python_EXECUTABLE} ${GEN_EVENTING_SCRIPT} --man ${EVENT_MANIFEST} --incdir ${MONO_EVENTPIPE_GEN_INCLUDE_PATH} --inc ${EVENT_INCLUSION_FILE} --dummy ${MONO_EVENTPIPE_GEN_INCLUDE_PATH}/etmdummy.h --runtimeflavor mono ${NONEXTERN_ARG} ${NOXPLATHEADER_ARG} COMMAND ${GEN_ETW_PROVIDER_COMMAND} COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${MONO_DIAGNOSTICS_TRACING_COMPONENT_NAME}-gen-headers.timestamp DEPENDS ${GEN_EVENTING_SCRIPT} ${EVENT_MANIFEST} ${EVENT_EXCLUSION_FILE} diff --git a/src/mono/mono/metadata/class-internals.h b/src/mono/mono/metadata/class-internals.h index 3b758b2acf6658..c7c97153dc7483 100644 --- a/src/mono/mono/metadata/class-internals.h +++ b/src/mono/mono/metadata/class-internals.h @@ -504,11 +504,11 @@ struct _MonoGenericContainer { int type_argc : 29; // Per the ECMA spec, this value is capped at 16 bits /* If true, we're a generic method, otherwise a generic type definition. */ /* Invariant: parent != NULL => is_method */ - gint is_method : 1; + guint is_method : 1; /* If true, this container has no associated class/method and only the image is known. This can happen: 1. For the special anonymous containers kept by MonoImage. 2. When user code creates a generic parameter via SRE, but has not yet set an owner. */ - gint is_anonymous : 1; + guint is_anonymous : 1; /* Our type parameters. If this is a special anonymous container (case 1, above), this field is not valid, use mono_metadata_create_anon_gparam () */ MonoGenericParamFull *type_params; }; diff --git a/src/mono/mono/metadata/icall-def.h b/src/mono/mono/metadata/icall-def.h index cdb7553898b832..0c5300aeb38d61 100644 --- a/src/mono/mono/metadata/icall-def.h +++ b/src/mono/mono/metadata/icall-def.h @@ -436,7 +436,6 @@ HANDLES(RUNH_6, "GetSpanDataFrom", ves_icall_System_Runtime_CompilerServices_Run HANDLES(RUNH_2, "GetUninitializedObjectInternal", ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_GetUninitializedObjectInternal, MonoObject, 1, (MonoType_ptr)) HANDLES(RUNH_3, "InitializeArray", ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_InitializeArray, void, 2, (MonoArray, MonoClassField_ptr)) HANDLES(RUNH_7, "InternalGetHashCode", ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_InternalGetHashCode, int, 1, (MonoObject)) -HANDLES(RUNH_8, "InternalTryGetHashCode", ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_InternalTryGetHashCode, int, 1, (MonoObject)) HANDLES(RUNH_3a, "PrepareMethod", ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_PrepareMethod, void, 3, (MonoMethod_ptr, gpointer, int)) HANDLES(RUNH_4, "RunClassConstructor", ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor, void, 1, (MonoType_ptr)) HANDLES(RUNH_5, "RunModuleConstructor", ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor, void, 1, (MonoImage_ptr)) diff --git a/src/mono/mono/metadata/icall-table.c b/src/mono/mono/metadata/icall-table.c index 4fd6709ef5f327..b864900037d3cb 100644 --- a/src/mono/mono/metadata/icall-table.c +++ b/src/mono/mono/metadata/icall-table.c @@ -294,7 +294,7 @@ mono_lookup_icall_symbol_internal (gpointer func) #if ENABLE_ICALL_SYMBOL_MAP || TEST_ICALL_SYMBOL_MAP typedef guint16 T; const gsize N = STRING_LENGTH (icall_functions); // skip terminal null element - g_static_assert (N <= 0xFFFF); // If this fails, change T to guint32 + g_static_assert (STRING_LENGTH (icall_functions) <= 0xFFFF); // If this fails, change T to guint32 static T *static_functions_sorted; if (!func) diff --git a/src/mono/mono/metadata/icall.c b/src/mono/mono/metadata/icall.c index f3ef9b74f26c65..c5c21f7ec75fcb 100644 --- a/src/mono/mono/metadata/icall.c +++ b/src/mono/mono/metadata/icall.c @@ -1077,12 +1077,6 @@ ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_InternalGetHashCode (Mo return mono_object_hash_internal (MONO_HANDLE_RAW (obj)); } -int -ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_InternalTryGetHashCode (MonoObjectHandle obj, MonoError* error) -{ - return mono_object_try_get_hash_internal (MONO_HANDLE_RAW (obj)); -} - MonoObjectHandle ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_GetObjectValue (MonoObjectHandle obj, MonoError *error) { @@ -2827,7 +2821,7 @@ ves_icall_RuntimeType_GetCallingConventionFromFunctionPointerInternal (MonoQCall MonoType *type = type_handle.type; g_assert (type->type == MONO_TYPE_FNPTR); // FIXME: Once we address: https://github.com/dotnet/runtime/issues/90308 this should not be needed anymore - return type->data.method->suppress_gc_transition ? MONO_CALL_UNMANAGED_MD : type->data.method->call_convention; + return GUINT_TO_INT8 (type->data.method->suppress_gc_transition ? MONO_CALL_UNMANAGED_MD : type->data.method->call_convention); } MonoBoolean diff --git a/src/mono/mono/metadata/metadata.c b/src/mono/mono/metadata/metadata.c index 7c7cd4433eecf6..9b64083fdfd794 100644 --- a/src/mono/mono/metadata/metadata.c +++ b/src/mono/mono/metadata/metadata.c @@ -3434,7 +3434,8 @@ mono_metadata_get_canonical_generic_inst (MonoGenericInst *candidate) MonoMemoryManager *mm = mono_mem_manager_get_generic (data.images, data.nimages); collect_data_free (&data); - mono_mem_manager_lock (mm); + // Hashtable key equal func can take loader lock + mono_loader_lock (); if (!mm->ginst_cache) mm->ginst_cache = g_hash_table_new_full (mono_metadata_generic_inst_hash, mono_metadata_generic_inst_equal, NULL, (GDestroyNotify)free_generic_inst); @@ -3456,7 +3457,7 @@ mono_metadata_get_canonical_generic_inst (MonoGenericInst *candidate) g_hash_table_insert (mm->ginst_cache, ginst, ginst); } - mono_mem_manager_unlock (mm); + mono_loader_unlock (); return ginst; } @@ -3467,7 +3468,8 @@ mono_metadata_get_canonical_aggregate_modifiers (MonoAggregateModContainer *cand g_assert (candidate->count > 0); MonoMemoryManager *mm = mono_metadata_get_mem_manager_for_aggregate_modifiers (candidate); - mono_mem_manager_lock (mm); + // Hashtable key equal func can take loader lock + mono_loader_lock (); if (!mm->aggregate_modifiers_cache) mm->aggregate_modifiers_cache = g_hash_table_new_full (aggregate_modifiers_hash, aggregate_modifiers_equal, NULL, (GDestroyNotify)free_aggregate_modifiers); @@ -3484,7 +3486,7 @@ mono_metadata_get_canonical_aggregate_modifiers (MonoAggregateModContainer *cand g_hash_table_insert (mm->aggregate_modifiers_cache, amods, amods); } - mono_mem_manager_unlock (mm); + mono_loader_unlock (); return amods; } @@ -3543,7 +3545,8 @@ mono_metadata_lookup_generic_class (MonoClass *container_class, MonoGenericInst if (gclass) return gclass; - mono_mem_manager_lock (mm); + // Hashtable key equal func can take loader lock + mono_loader_lock (); gclass = mono_mem_manager_alloc0 (mm, sizeof (MonoGenericClass)); if (is_dynamic) @@ -3563,7 +3566,7 @@ mono_metadata_lookup_generic_class (MonoClass *container_class, MonoGenericInst // g_hash_table_insert (set->gclass_cache, gclass, gclass); - mono_mem_manager_unlock (mm); + mono_loader_unlock (); return gclass2; } @@ -7802,7 +7805,7 @@ guint mono_aligned_addr_hash (gconstpointer ptr) { /* Same hashing we use for objects */ - return (GPOINTER_TO_UINT (ptr) >> 3) * 2654435761u; + return (GCONSTPOINTER_TO_UINT (ptr) >> 3) * 2654435761u; } /* diff --git a/src/mono/mono/metadata/sgen-client-mono.h b/src/mono/mono/metadata/sgen-client-mono.h index 8bdae1b9fec8fe..f20831112ec2e7 100644 --- a/src/mono/mono/metadata/sgen-client-mono.h +++ b/src/mono/mono/metadata/sgen-client-mono.h @@ -90,7 +90,7 @@ enum { }; static inline mword -sgen_mono_array_size (GCVTable vtable, MonoArray *array, mword *bounds_size, mword descr) +sgen_mono_array_size (GCVTable vtable, MonoArray *array, mword *bounds_size, SgenDescriptor descr) { mword size, size_without_bounds; int element_size; diff --git a/src/mono/mono/metadata/sgen-mono.c b/src/mono/mono/metadata/sgen-mono.c index 4d008a7468a916..c98dcf7c0cd464 100644 --- a/src/mono/mono/metadata/sgen-mono.c +++ b/src/mono/mono/metadata/sgen-mono.c @@ -98,7 +98,7 @@ ptr_on_stack (void *ptr) } while (0) static void -scan_object_for_binary_protocol_copy_wbarrier (gpointer dest, char *start, mword desc) +scan_object_for_binary_protocol_copy_wbarrier (gpointer dest, char *start, SgenDescriptor desc) { #define SCAN_OBJECT_NOVTABLE #include "sgen/sgen-scan-object.h" @@ -127,7 +127,7 @@ mono_gc_wbarrier_value_copy_internal (gpointer dest, gconstpointer src, int coun for (i = 0; i < count; ++i) { scan_object_for_binary_protocol_copy_wbarrier ((char*)dest + i * element_size, (char*)src + i * element_size - MONO_ABI_SIZEOF (MonoObject), - (mword) m_class_get_gc_descr (klass)); + m_class_get_gc_descr (klass)); } } #endif @@ -157,7 +157,7 @@ mono_gc_wbarrier_object_copy_internal (MonoObject* obj, MonoObject *src) #ifdef SGEN_HEAVY_BINARY_PROTOCOL if (sgen_binary_protocol_is_heavy_enabled ()) - scan_object_for_binary_protocol_copy_wbarrier (obj, (char*)src, (mword) src->vtable->gc_descr); + scan_object_for_binary_protocol_copy_wbarrier (obj, (char*)src, src->vtable->gc_descr); #endif sgen_get_remset ()->wbarrier_object_copy (obj, src); @@ -982,7 +982,7 @@ sgen_client_cardtable_scan_object (GCObject *obj, guint8 *cards, ScanCopyContext size_t card_count; size_t extra_idx = 0; - mword desc = (mword)m_class_get_gc_descr (m_class_get_element_class (klass)); + SgenDescriptor desc = m_class_get_gc_descr (m_class_get_element_class (klass)); int elem_size = mono_array_element_size (klass); #ifdef SGEN_OBJECT_LAYOUT_STATISTICS @@ -1297,7 +1297,7 @@ two_args_report_root (void *address, MonoObject *obj, void *gc_data) } static void -precisely_report_roots_from (GCRootReport *report, void** start_root, void** end_root, mword desc) +precisely_report_roots_from (GCRootReport *report, void** start_root, void** end_root, SgenDescriptor desc) { switch (desc & ROOT_DESC_TYPE_MASK) { case ROOT_DESC_BITMAP: @@ -1850,7 +1850,7 @@ static void collect_references (HeapWalkInfo *hwi, GCObject *obj, size_t size) { char *start = (char*)obj; - mword desc = sgen_obj_get_descriptor (obj); + SgenDescriptor desc = sgen_obj_get_descriptor (obj); #include "sgen/sgen-scan-object.h" } diff --git a/src/mono/mono/metadata/sgen-new-bridge.c b/src/mono/mono/metadata/sgen-new-bridge.c index e618783bcb4086..cddaee8bff7594 100644 --- a/src/mono/mono/metadata/sgen-new-bridge.c +++ b/src/mono/mono/metadata/sgen-new-bridge.c @@ -373,7 +373,7 @@ dfs1 (HashEntry *obj_entry) if (!obj_entry->v.dfs1.is_visited) { int num_links = 0; - mword desc = sgen_obj_get_descriptor_safe (obj); + SgenDescriptor desc = sgen_obj_get_descriptor_safe (obj); obj_entry->v.dfs1.is_visited = 1; diff --git a/src/mono/mono/metadata/sgen-tarjan-bridge.c b/src/mono/mono/metadata/sgen-tarjan-bridge.c index f22b188a3ed25a..6f1fb1ec10bd94 100644 --- a/src/mono/mono/metadata/sgen-tarjan-bridge.c +++ b/src/mono/mono/metadata/sgen-tarjan-bridge.c @@ -681,7 +681,7 @@ push_all (ScanData *data) { GCObject *obj = data->obj; char *start = (char*)obj; - mword desc = sgen_obj_get_descriptor_safe (obj); + SgenDescriptor desc = sgen_obj_get_descriptor_safe (obj); #if DUMP_GRAPH printf ("+scanning %s (%p) index %d color %p\n", safe_name_bridge (data->obj), data->obj, data->index, data->color); @@ -741,7 +741,7 @@ compute_low (ScanData *data) { GCObject *obj = data->obj; char *start = (char*)obj; - mword desc = sgen_obj_get_descriptor_safe (obj); + SgenDescriptor desc = sgen_obj_get_descriptor_safe (obj); #include "sgen/sgen-scan-object.h" } diff --git a/src/mono/mono/metadata/weak-hash.c b/src/mono/mono/metadata/weak-hash.c index c4d43a977c1098..9aed30b1bc1ed2 100644 --- a/src/mono/mono/metadata/weak-hash.c +++ b/src/mono/mono/metadata/weak-hash.c @@ -235,7 +235,7 @@ rehash (MonoWeakHashTable *hash) * Rehash to a size that can fit the current elements. Rehash relative to in_use * to allow also for compaction. */ - data.new_size = g_spaced_primes_closest (hash->in_use / HASH_TABLE_MAX_LOAD_FACTOR * HASH_TABLE_RESIZE_RATIO); + data.new_size = g_spaced_primes_closest (GFLOAT_TO_UINT (hash->in_use / HASH_TABLE_MAX_LOAD_FACTOR * HASH_TABLE_RESIZE_RATIO)); MonoArray *holder = (MonoArray*)mono_gchandle_get_target_internal (hash->key_value_handle); g_assert (holder); diff --git a/src/mono/mono/mini/CMakeLists.txt b/src/mono/mono/mini/CMakeLists.txt index 6b300ab2b74cfa..cca4fea9ca493b 100644 --- a/src/mono/mono/mini/CMakeLists.txt +++ b/src/mono/mono/mini/CMakeLists.txt @@ -75,7 +75,8 @@ if(HAVE_SYS_ICU) pal_collation.m pal_casing.m pal_calendarData.m - pal_normalization.m) + pal_normalization.m + pal_timeZoneInfo.m) addprefix(icu_shim_darwin_sources "${ICU_SHIM_PATH}" "${icu_shim_darwin_sources_base}") set(icu_shim_sources ${icu_shim_sources} ${icu_shim_darwin_sources}) @@ -364,9 +365,8 @@ elseif(NOT HOST_BROWSER AND NOT HOST_WASI) set(mini_sources "${mini_sources};${VERSION_FILE_PATH}") # this is generated by GenerateNativeVersionFile in Arcade endif() -if(HOST_WIN32) -set_source_files_properties(${ZLIB_SOURCES} PROPERTIES COMPILE_OPTIONS "/wd4005;/wd4127;/wd4131;/wd4244") -endif() +set_source_files_properties(${ZLIB_SOURCES} PROPERTIES COMPILE_DEFINITIONS "${ZLIB_COMPILE_DEFINITIONS}") +set_source_files_properties(${ZLIB_SOURCES} PROPERTIES COMPILE_OPTIONS "${ZLIB_COMPILE_OPTIONS}") set(monosgen-sources "${mini_sources};${ZLIB_SOURCES}") diff --git a/src/mono/mono/mini/aot-compiler.c b/src/mono/mono/mini/aot-compiler.c index 1944a77d2c00b0..5c86a19f7b4679 100644 --- a/src/mono/mono/mini/aot-compiler.c +++ b/src/mono/mono/mini/aot-compiler.c @@ -1426,9 +1426,9 @@ arm64_emit_tramp_page_common_code (MonoAotCompile *acfg, int pagesize, int arg_r code = mono_arm_emit_brx (code, ARMREG_IP0); /* Emit it */ - emit_code_bytes (acfg, buf, code - buf); + emit_code_bytes (acfg, buf, GPTRDIFF_TO_INT (code - buf)); - *size = code - buf; + *size = GPTRDIFF_TO_INT (code - buf); } static void @@ -1450,7 +1450,7 @@ arm64_emit_tramp_page_specific_code (MonoAotCompile *acfg, int pagesize, int com arm_nop (code); #endif g_assert (code - buf == specific_tramp_size); - emit_code_bytes (acfg, buf, code - buf); + emit_code_bytes (acfg, buf, GPTRDIFF_TO_INT (code - buf)); } } @@ -1535,9 +1535,9 @@ arm64_emit_specific_trampoline_pages (MonoAotCompile *acfg) code = mono_arm_emit_brx (code, ARMREG_IP0); /* Emit it */ - emit_code_bytes (acfg, buf, code - buf); + emit_code_bytes (acfg, buf, GPTRDIFF_TO_INT (code - buf)); - common_tramp_size = code - buf; + common_tramp_size = GPTRDIFF_TO_INT (code - buf); acfg->tramp_page_code_offsets [MONO_AOT_TRAMP_UNBOX_ARBITRARY] = common_tramp_size; arm64_emit_tramp_page_specific_code (acfg, pagesize, common_tramp_size, specific_tramp_size); @@ -1587,9 +1587,9 @@ arm64_emit_specific_trampoline_pages (MonoAotCompile *acfg) arm_ldrp (code, ARMREG_IP0, ARMREG_IP1, TARGET_SIZEOF_VOID_P); code = mono_arm_emit_brx (code, ARMREG_IP0); - emit_code_bytes (acfg, buf, code - buf); + emit_code_bytes (acfg, buf, GPTRDIFF_TO_INT (code - buf)); - common_tramp_size = code - buf; + common_tramp_size = GPTRDIFF_TO_INT (code - buf); acfg->tramp_page_code_offsets [MONO_AOT_TRAMP_IMT] = common_tramp_size; arm64_emit_tramp_page_specific_code (acfg, pagesize, common_tramp_size, specific_tramp_size); @@ -1673,9 +1673,9 @@ arm64_emit_imt_trampoline (MonoAotCompile *acfg, int offset, int *tramp_size) arm_ldrp (code, ARMREG_IP0, ARMREG_IP1, TARGET_SIZEOF_VOID_P); code = mono_arm_emit_brx (code, ARMREG_IP0); - emit_code_bytes (acfg, buf, code - buf); + emit_code_bytes (acfg, buf, GPTRDIFF_TO_INT (code - buf)); - *tramp_size = code - buf + (3 * 4); + *tramp_size = GPTRDIFF_TO_INT (code - buf + (3 * 4)); } static void @@ -1986,7 +1986,7 @@ arch_emit_plt_entry (MonoAotCompile *acfg, const char *got_symbol, guint32 plt_i code = buf; ARM_LDR_IMM (code, ARMREG_IP, ARMREG_PC, 0); ARM_LDR_REG_REG (code, ARMREG_PC, ARMREG_PC, ARMREG_IP); - emit_bytes (acfg, buf, code - buf); + emit_bytes (acfg, buf, GPTRDIFF_TO_INT (code - buf)); emit_symbol_diff (acfg, got_symbol, ".", offset - 4); /* Used by mono_aot_get_plt_info_offset */ emit_int32 (acfg, info_offset); @@ -2111,7 +2111,7 @@ arch_emit_specific_trampoline_pages (MonoAotCompile *acfg) g_assert (code - buf == COMMON_TRAMP_SIZE); /* Emit it */ - emit_bytes (acfg, buf, code - buf); + emit_bytes (acfg, buf, GPTRDIFF_TO_INT (code - buf)); for (i = 0; i < count; ++i) { code = buf; @@ -2119,7 +2119,7 @@ arch_emit_specific_trampoline_pages (MonoAotCompile *acfg) ARM_BL (code, 0); arm_patch (code - 4, code - COMMON_TRAMP_SIZE - 8 * (i + 1)); g_assert (code - buf == 8); - emit_bytes (acfg, buf, code - buf); + emit_bytes (acfg, buf, GPTRDIFF_TO_INT (code - buf)); } /* now the rgctx trampolines: each specific trampolines puts in the ip register @@ -2139,7 +2139,7 @@ arch_emit_specific_trampoline_pages (MonoAotCompile *acfg) g_assert (code - buf == COMMON_TRAMP_SIZE); /* Emit it */ - emit_bytes (acfg, buf, code - buf); + emit_bytes (acfg, buf, GPTRDIFF_TO_INT (code - buf)); for (i = 0; i < count; ++i) { code = buf; @@ -2147,7 +2147,7 @@ arch_emit_specific_trampoline_pages (MonoAotCompile *acfg) ARM_B (code, 0); arm_patch (code - 4, code - COMMON_TRAMP_SIZE - 8 * (i + 1)); g_assert (code - buf == 8); - emit_bytes (acfg, buf, code - buf); + emit_bytes (acfg, buf, GPTRDIFF_TO_INT (code - buf)); } /* @@ -2164,7 +2164,7 @@ arch_emit_specific_trampoline_pages (MonoAotCompile *acfg) ARM_LDR_IMM (code, ARMREG_PC, ARMREG_IP, -4); g_assert (code - buf == COMMON_TRAMP_SIZE); /* Emit it */ - emit_bytes (acfg, buf, code - buf); + emit_bytes (acfg, buf, GPTRDIFF_TO_INT (code - buf)); for (i = 0; i < count; ++i) { code = buf; @@ -2172,7 +2172,7 @@ arch_emit_specific_trampoline_pages (MonoAotCompile *acfg) ARM_B (code, 0); arm_patch (code - 4, code - COMMON_TRAMP_SIZE - 8 * (i + 1)); g_assert (code - buf == 8); - emit_bytes (acfg, buf, code - buf); + emit_bytes (acfg, buf, GPTRDIFF_TO_INT (code - buf)); } /* now the unbox arbitrary trampolines: each specific trampolines puts in the ip register @@ -2193,7 +2193,7 @@ arch_emit_specific_trampoline_pages (MonoAotCompile *acfg) g_assert (code - buf == COMMON_TRAMP_SIZE); /* Emit it */ - emit_bytes (acfg, buf, code - buf); + emit_bytes (acfg, buf, GPTRDIFF_TO_INT (code - buf)); for (i = 0; i < count; ++i) { code = buf; @@ -2201,7 +2201,7 @@ arch_emit_specific_trampoline_pages (MonoAotCompile *acfg) ARM_B (code, 0); arm_patch (code - 4, code - COMMON_TRAMP_SIZE - 8 * (i + 1)); g_assert (code - buf == 8); - emit_bytes (acfg, buf, code - buf); + emit_bytes (acfg, buf, GPTRDIFF_TO_INT (code - buf)); } /* now the imt trampolines: each specific trampolines puts in the ip register @@ -2257,7 +2257,7 @@ arch_emit_specific_trampoline_pages (MonoAotCompile *acfg) /* Emit it */ g_assert (code - buf == IMT_TRAMP_SIZE); - emit_bytes (acfg, buf, code - buf); + emit_bytes (acfg, buf, GPTRDIFF_TO_INT (code - buf)); for (i = 0; i < count; ++i) { code = buf; @@ -2265,7 +2265,7 @@ arch_emit_specific_trampoline_pages (MonoAotCompile *acfg) ARM_B (code, 0); arm_patch (code - 4, code - IMT_TRAMP_SIZE - 8 * (i + 1)); g_assert (code - buf == 8); - emit_bytes (acfg, buf, code - buf); + emit_bytes (acfg, buf, GPTRDIFF_TO_INT (code - buf)); } acfg->tramp_page_code_offsets [MONO_AOT_TRAMP_SPECIFIC] = 16; @@ -2389,7 +2389,7 @@ arch_emit_specific_trampoline (MonoAotCompile *acfg, int offset, int *tramp_size g_assert (code - buf == 16); /* Emit it */ - emit_bytes (acfg, buf, code - buf); + emit_bytes (acfg, buf, GPTRDIFF_TO_INT (code - buf)); /* * Only one offset is needed, since the second one would be equal to the * first one. @@ -2453,7 +2453,7 @@ arch_emit_specific_trampoline (MonoAotCompile *acfg, int offset, int *tramp_size /* Branch to generic trampoline */ x86_jump_reg (code, X86_ECX); - emit_bytes (acfg, buf, code - buf); + emit_bytes (acfg, buf, GPTRDIFF_TO_INT (code - buf)); *tramp_size = 17; g_assert (code - buf == *tramp_size); @@ -2500,7 +2500,7 @@ arch_emit_unbox_trampoline (MonoAotCompile *acfg, MonoCompile *cfg, MonoMethod * x86_alu_membase_imm (code, X86_ADD, X86_ESP, this_pos, MONO_ABI_SIZEOF (MonoObject)); - emit_bytes (acfg, buf, code - buf); + emit_bytes (acfg, buf, GPTRDIFF_TO_INT (code - buf)); /* jump */ emit_byte (acfg, '\xe9'); @@ -2521,7 +2521,7 @@ arch_emit_unbox_trampoline (MonoAotCompile *acfg, MonoCompile *cfg, MonoMethod * ARM_ADD_REG_IMM8 (code, ARMREG_R0, ARMREG_R0, MONO_ABI_SIZEOF (MonoObject)); - emit_bytes (acfg, buf, code - buf); + emit_bytes (acfg, buf, GPTRDIFF_TO_INT (code - buf)); /* jump to method */ if (acfg->thumb_mixed && cfg->compile_llvm) fprintf (acfg->fp, "\n\tbx %s\n", call_target); @@ -2589,7 +2589,7 @@ arch_emit_static_rgctx_trampoline (MonoAotCompile *acfg, int offset, int *tramp_ g_assert (code - buf == 16); /* Emit it */ - emit_bytes (acfg, buf, code - buf); + emit_bytes (acfg, buf, GPTRDIFF_TO_INT (code - buf)); emit_symbol_diff (acfg, acfg->got_symbol, ".", (offset * sizeof (target_mgreg_t)) - 4 + 8); emit_symbol_diff (acfg, acfg->got_symbol, ".", ((offset + 1) * sizeof (target_mgreg_t)) - 4 + 4); #elif defined(TARGET_ARM64) @@ -2648,7 +2648,7 @@ arch_emit_static_rgctx_trampoline (MonoAotCompile *acfg, int offset, int *tramp_ /* Branch to the target address */ x86_jump_membase (code, X86_ECX, (offset + 1) * sizeof (target_mgreg_t)); - emit_bytes (acfg, buf, code - buf); + emit_bytes (acfg, buf, GPTRDIFF_TO_INT (code - buf)); *tramp_size = 15; g_assert (code - buf == *tramp_size); @@ -2796,9 +2796,9 @@ arch_emit_imt_trampoline (MonoAotCompile *acfg, int offset, int *tramp_size) mono_x86_patch (labels [3], code); x86_breakpoint (code); - emit_bytes (acfg, buf, code - buf); + emit_bytes (acfg, buf, GPTRDIFF_TO_INT (code - buf)); - *tramp_size = code - buf; + *tramp_size = GPTRDIFF_TO_INT (code - buf); g_free (buf); @@ -2853,10 +2853,10 @@ arch_emit_imt_trampoline (MonoAotCompile *acfg, int offset, int *tramp_size) code2 = labels [0]; ARM_LDR_IMM (code2, ARMREG_R0, ARMREG_PC, (code - (labels [0] + 8))); - emit_bytes (acfg, buf, code - buf); + emit_bytes (acfg, buf, GPTRDIFF_TO_INT (code - buf)); emit_symbol_diff (acfg, acfg->got_symbol, ".", (int)((offset * sizeof (target_mgreg_t)) + (code - (labels [0] + 8)) - 4)); - *tramp_size = code - buf + 4; + *tramp_size = GPTRDIFF_TO_INT (code - buf + 4); #elif defined(TARGET_ARM64) arm64_emit_imt_trampoline (acfg, offset, tramp_size); #elif defined(TARGET_POWERPC) @@ -2955,7 +2955,7 @@ arch_emit_gsharedvt_arg_trampoline (MonoAotCompile *acfg, int offset, int *tramp /* Branch to the target address */ x86_jump_membase (code, X86_ECX, (offset + 1) * sizeof (target_mgreg_t)); - emit_bytes (acfg, buf, code - buf); + emit_bytes (acfg, buf, GPTRDIFF_TO_INT (code - buf)); *tramp_size = 15; g_assert (code - buf == *tramp_size); @@ -2979,7 +2979,7 @@ arch_emit_gsharedvt_arg_trampoline (MonoAotCompile *acfg, int offset, int *tramp g_assert (code - buf == 20); /* Emit it */ - emit_bytes (acfg, buf, code - buf); + emit_bytes (acfg, buf, GPTRDIFF_TO_INT (code - buf)); emit_symbol_diff (acfg, acfg->got_symbol, ".", (offset * sizeof (target_mgreg_t)) + 4); #elif defined(TARGET_ARM64) arm64_emit_gsharedvt_arg_trampoline (acfg, offset, tramp_size); @@ -3019,7 +3019,7 @@ arch_emit_ftnptr_arg_trampoline (MonoAotCompile *acfg, int offset, int *tramp_si g_assert (code - buf == 24); /* Emit it */ - emit_bytes (acfg, buf, code - buf); + emit_bytes (acfg, buf, GPTRDIFF_TO_INT (code - buf)); emit_symbol_diff (acfg, acfg->got_symbol, ".", ((offset + 1) * sizeof (target_mgreg_t)) + 12); // offset from ldr pc to addr emit_symbol_diff (acfg, acfg->got_symbol, ".", (offset * sizeof (target_mgreg_t)) + 4); // offset from ldr pc to arg #else @@ -3067,7 +3067,7 @@ arch_emit_unbox_arbitrary_trampoline (MonoAotCompile *acfg, int offset, int *tra g_assert (code - buf == 12); /* Emit it */ - emit_bytes (acfg, buf, code - buf); + emit_bytes (acfg, buf, GPTRDIFF_TO_INT (code - buf)); emit_symbol_diff (acfg, acfg->got_symbol, ".", (int)((offset * sizeof (target_mgreg_t)) + (code - (label + 8)) - 4)); *tramp_size = 4 * 4; #else @@ -3844,10 +3844,12 @@ encode_method_ref (MonoAotCompile *acfg, MonoMethod *method, guint8 *buf, guint8 else if (info->subtype == WRAPPER_SUBTYPE_UNSAFE_ACCESSOR) { encode_method_ref (acfg, info->d.unsafe_accessor.method, p, &p); encode_value (info->d.unsafe_accessor.kind, p, &p); - /* WISH: is there some kind of string heap token we could use here? */ - uint32_t len = (uint32_t) strlen (info->d.unsafe_accessor.member_name); - encode_value (len, p, &p); - encode_string (info->d.unsafe_accessor.member_name, p, &p); + if (info->d.unsafe_accessor.member_name) { + /* WISH: is there some kind of string heap token we could use here? */ + uint32_t len = (uint32_t) strlen (info->d.unsafe_accessor.member_name); + encode_value (len, p, &p); + encode_string (info->d.unsafe_accessor.member_name, p, &p); + } } else if (info->subtype == WRAPPER_SUBTYPE_INTERP_IN) encode_signature (acfg, info->d.interp_in.sig, p, &p); @@ -4324,6 +4326,7 @@ get_method_index (MonoAotCompile *acfg, MonoMethod *method) return index - 1; } +/* Return TRUE if the method can be skipped */ static gboolean collect_dedup_method (MonoAotCompile *acfg, MonoMethod *method) { @@ -4332,14 +4335,16 @@ collect_dedup_method (MonoAotCompile *acfg, MonoMethod *method) if (acfg->dedup_phase == DEDUP_SKIP) return TRUE; // Remember for later - if (acfg->dedup_phase == DEDUP_COLLECT && !g_hash_table_lookup (dedup_methods, method)) + g_assert (acfg->dedup_phase == DEDUP_COLLECT); + if (!g_hash_table_lookup (dedup_methods, method)) g_hash_table_insert (dedup_methods, method, method); + else + // Already processed when compiling another assembly + return TRUE; } return FALSE; } - - static int add_method_full (MonoAotCompile *acfg, MonoMethod *method, gboolean extra, int depth) { @@ -10703,6 +10708,18 @@ execute_system (const char * command) #ifdef ENABLE_LLVM +#ifdef HOST_WIN32 +#define OPT_NAME "opt.exe" +#else +#define OPT_NAME "opt" +#endif + +#ifdef HOST_WIN32 +#define LLC_NAME "llc.exe" +#else +#define LLC_NAME "llc" +#endif + /* * emit_llvm_file: * @@ -10771,11 +10788,11 @@ emit_llvm_file (MonoAotCompile *acfg) } else { #if LLVM_API_VERSION >= 1600 /* The safepoints pass requires new pass manager syntax*/ - opts = g_strdup ("-disable-tail-calls -passes='"); + opts = g_strdup ("-disable-tail-calls -passes=\""); if (!acfg->aot_opts.llvm_only) { opts = g_strdup_printf ("%sdefault,", opts); } - opts = g_strdup_printf ("%splace-safepoints' -spp-all-backedges", opts); + opts = g_strdup_printf ("%splace-safepoints\" -spp-all-backedges", opts); #elif LLVM_API_VERSION >= 1300 /* The safepoints pass requires the old pass manager */ opts = g_strdup ("-disable-tail-calls -place-safepoints -spp-all-backedges -enable-new-pm=0"); @@ -10805,7 +10822,7 @@ emit_llvm_file (MonoAotCompile *acfg) opts = g_strdup_printf ("%s -fp-contract=fast -enable-no-infs-fp-math -enable-no-nans-fp-math -enable-no-signed-zeros-fp-math -enable-no-trapping-fp-math -enable-unsafe-fp-math", opts); } - command = g_strdup_printf ("\"%sopt\" -f %s -o \"%s\" \"%s\"", acfg->aot_opts.llvm_path, opts, optbc, tempbc); + command = g_strdup_printf ("\"%s" OPT_NAME "\" -f %s -o \"%s\" \"%s\"", acfg->aot_opts.llvm_path, opts, optbc, tempbc); aot_printf (acfg, "Executing opt: %s\n", command); if (execute_system (command) != 0) return FALSE; @@ -10880,7 +10897,7 @@ emit_llvm_file (MonoAotCompile *acfg) g_string_append_printf (acfg->llc_args, " -mattr=%s", acfg->aot_opts.llvm_cpu_attr); } - command = g_strdup_printf ("\"%sllc\" %s -o \"%s\" \"%s.opt.bc\"", acfg->aot_opts.llvm_path, acfg->llc_args->str, output_fname, acfg->tmpbasename); + command = g_strdup_printf ("\"%s" LLC_NAME "\" %s -o \"%s\" \"%s.opt.bc\"", acfg->aot_opts.llvm_path, acfg->llc_args->str, output_fname, acfg->tmpbasename); g_free (output_fname); aot_printf (acfg, "Executing llc: %s\n", command); @@ -11398,7 +11415,7 @@ encode_uint_len (guint32 val, int len, guint8 *buf, guint8 **endbuf) { if (len == 2) { g_assert (val < 65536); - encode_int16 (val, buf, endbuf); + encode_int16 (GUINT32_TO_UINT16 (val), buf, endbuf); } else { encode_int ((gint32)val, buf, endbuf); } @@ -11452,7 +11469,7 @@ emit_extra_methods (MonoAotCompile *acfg) * Construct a chained hash table for mapping indexes in extra_method_info to * method indexes. */ - guint table_size = g_spaced_primes_closest ((guint)(nmethods * 1.5)); + guint table_size = g_spaced_primes_closest (GFLOAT_TO_UINT (nmethods * 1.5)); table = g_ptr_array_sized_new (table_size); for (guint i = 0; i < table_size; ++i) g_ptr_array_add (table, NULL); @@ -11730,7 +11747,7 @@ emit_class_name_table (MonoAotCompile *acfg) * Construct a chained hash table for mapping class names to typedef tokens. */ guint32 rows = table_info_get_rows (&acfg->image->tables [MONO_TABLE_TYPEDEF]); - guint table_size = g_spaced_primes_closest (rows * 1.5); + guint table_size = g_spaced_primes_closest (GFLOAT_TO_UINT (rows * 1.5)); table = g_ptr_array_sized_new (table_size); for (guint i = 0; i < table_size; ++i) g_ptr_array_add (table, NULL); @@ -12089,7 +12106,7 @@ emit_globals (MonoAotCompile *acfg) * Construct a chained hash table for mapping global names to their index in * the globals table. */ - guint table_size = g_spaced_primes_closest (acfg->globals->len * 1.5); + guint table_size = g_spaced_primes_closest (GFLOAT_TO_UINT (acfg->globals->len * 1.5)); table = g_ptr_array_sized_new (table_size); for (guint i = 0; i < table_size; ++i) g_ptr_array_add (table, NULL); diff --git a/src/mono/mono/mini/aot-runtime-wasm.c b/src/mono/mono/mini/aot-runtime-wasm.c index e1d051e9e3eaef..2ab4ae75301ceb 100644 --- a/src/mono/mono/mini/aot-runtime-wasm.c +++ b/src/mono/mono/mini/aot-runtime-wasm.c @@ -12,7 +12,7 @@ #include "interp/interp.h" #include "aot-runtime.h" -#ifdef TARGET_WASM +#ifdef HOST_WASM static char type_to_c (MonoType *t) diff --git a/src/mono/mono/mini/aot-runtime.c b/src/mono/mono/mini/aot-runtime.c index 86c70dba388621..0faba078d6dacc 100644 --- a/src/mono/mono/mini/aot-runtime.c +++ b/src/mono/mono/mini/aot-runtime.c @@ -2269,17 +2269,15 @@ load_aot_module (MonoAssemblyLoadContext *alc, MonoAssembly *assembly, gpointer if (make_unreadable) { #ifndef TARGET_WIN32 - guint8 *addr; guint8 *page_start, *page_end; - int err, len; + int err; - addr = amodule->mem_begin; - g_assert (addr); - len = amodule->mem_end - amodule->mem_begin; + g_assert (amodule->mem_begin); + g_assert (amodule->mem_end); /* Round down in both directions to avoid modifying data which is not ours */ - page_start = (guint8 *) (((gssize) (addr)) & ~ (mono_pagesize () - 1)) + mono_pagesize (); - page_end = (guint8 *) (((gssize) (addr + len)) & ~ (mono_pagesize () - 1)); + page_start = (guint8 *) (((gssize) (amodule->mem_begin)) & ~ (mono_pagesize () - 1)) + mono_pagesize (); + page_end = (guint8 *) (((gssize) (amodule->mem_end)) & ~ (mono_pagesize () - 1)); if (page_end > page_start) { err = mono_mprotect (page_start, (page_end - page_start), MONO_MMAP_NONE); g_assert (err == 0); @@ -3736,7 +3734,7 @@ mono_aot_find_jit_info (MonoImage *image, gpointer addr) /* Unused */ int len = mono_jit_info_size (0, 0, 0); jinfo = (MonoJitInfo *)alloc0_jit_info_data (mem_manager, len, async); - mono_jit_info_init (jinfo, method, code, code_len, 0, 0, 0); + mono_jit_info_init (jinfo, method, code, GPTRDIFF_TO_INT (code_len), 0, 0, 0); } else { jinfo = decode_exception_debug_info (amodule, method, ex_info, code, GPTRDIFF_TO_UINT32 (code_len)); } @@ -6032,7 +6030,7 @@ mono_aot_get_unbox_arbitrary_trampoline (gpointer addr) static int i32_idx_comparer (const void *key, const void *member) { - gint32 idx1 = GPOINTER_TO_INT (key); + gint32 idx1 = GCONSTPOINTER_TO_INT (key); gint32 idx2 = *(gint32*)member; return idx1 - idx2; } @@ -6040,7 +6038,7 @@ i32_idx_comparer (const void *key, const void *member) static int ui16_idx_comparer (const void *key, const void *member) { - int idx1 = GPOINTER_TO_INT (key); + int idx1 = GCONSTPOINTER_TO_INT (key); int idx2 = *(guint16*)member; return idx1 - idx2; } diff --git a/src/mono/mono/mini/cpu-amd64.mdesc b/src/mono/mono/mini/cpu-amd64.mdesc index 06321f83169e20..a380b4dc7b4a1d 100644 --- a/src/mono/mono/mini/cpu-amd64.mdesc +++ b/src/mono/mono/mini/cpu-amd64.mdesc @@ -98,6 +98,9 @@ long_div: dest:a src1:a src2:i len:16 clob:d long_div_un: dest:a src1:a src2:i len:16 clob:d long_rem: dest:d src1:a src2:i len:16 clob:a long_rem_un: dest:d src1:a src2:i len:16 clob:a +long_divrem: dest:a src1:a src2:d src3:i len:16 clob:x +long_divrem_un: dest:a src1:a src2:d src3:i len:16 clob:x +long_divrem2: dest:d len:3 long_and: dest:i src1:i src2:i len:3 clob:1 long_or: dest:i src1:i src2:i len:3 clob:1 long_xor: dest:i src1:i src2:i len:3 clob:1 @@ -337,6 +340,10 @@ amd64_lea_membase: dest:i src1:i len:11 x86_xchg: src1:i src2:i clob:x len:2 x86_fpop: src1:f len:3 x86_seteq_membase: src1:b len:9 +x86_bsf32: dest:i src1:i len:4 +x86_bsf64: dest:l src1:l len:4 +x86_bsr32: dest:i src1:i len:4 +x86_bsr64: dest:l src1:l len:4 x86_add_reg_membase: dest:i src1:i src2:b clob:1 len:13 x86_sub_reg_membase: dest:i src1:i src2:b clob:1 len:13 @@ -411,6 +418,9 @@ int_div: dest:a src1:a src2:i clob:d len:32 int_div_un: dest:a src1:a src2:i clob:d len:32 int_rem: dest:d src1:a src2:i clob:a len:32 int_rem_un: dest:d src1:a src2:i clob:a len:32 +int_divrem: dest:a src1:a src2:d src3:i clob:x len:15 +int_divrem_un: dest:a src1:a src2:d src3:i clob:x len:15 +int_divrem2: dest:d len:3 int_and: dest:i src1:i src2:i clob:1 len:4 int_or: dest:i src1:i src2:i clob:1 len:4 int_xor: dest:i src1:i src2:i clob:1 len:4 @@ -825,6 +835,7 @@ expand_i4: dest:x src1:i len:11 expand_i8: dest:x src1:i len:11 expand_r4: dest:x src1:f len:16 expand_r8: dest:x src1:f len:13 +xop: len:16 xop_x_x_x: dest:x src1:x src2:x len:16 clob:1 xop_x_x: dest:x src1:x len:16 clob:1 sse_movmsk: dest:i src1:x len:5 diff --git a/src/mono/mono/mini/cpu-x86.mdesc b/src/mono/mono/mini/cpu-x86.mdesc index e68d6138724336..2e82fc3f6024c2 100644 --- a/src/mono/mono/mini/cpu-x86.mdesc +++ b/src/mono/mono/mini/cpu-x86.mdesc @@ -111,6 +111,9 @@ int_div: dest:a src1:a src2:i len:15 clob:d int_div_un: dest:a src1:a src2:i len:15 clob:d int_rem: dest:d src1:a src2:i len:15 clob:a int_rem_un: dest:d src1:a src2:i len:15 clob:a +int_divrem: dest:a src1:a src2:d src3:i clob:x len:15 +int_divrem_un: dest:a src1:a src2:d src3:i clob:x len:15 +int_divrem2: dest:d len:3 int_and: dest:i src1:i src2:i clob:1 len:2 int_or: dest:i src1:i src2:i clob:1 len:2 int_xor: dest:i src1:i src2:i clob:1 len:2 @@ -303,6 +306,10 @@ x86_fp_load_i8: dest:f src1:b len:7 x86_fp_load_i4: dest:f src1:b len:7 x86_seteq_membase: src1:b len:7 x86_setne_membase: src1:b len:7 +x86_bsf32: dest:i src1:i len:4 +x86_bsf64: dest:l src1:l len:4 +x86_bsr32: dest:i src1:i len:4 +x86_bsr64: dest:l src1:l len:4 x86_add_reg_membase: dest:i src1:i src2:b clob:1 len:11 x86_sub_reg_membase: dest:i src1:i src2:b clob:1 len:11 diff --git a/src/mono/mono/mini/decompose.c b/src/mono/mono/mini/decompose.c index 2be1ff52e416d0..7525ebfd3b00c7 100644 --- a/src/mono/mono/mini/decompose.c +++ b/src/mono/mono/mini/decompose.c @@ -1545,16 +1545,24 @@ mono_decompose_array_access_opts (MonoCompile *cfg) ins->inst_imm, ins->flags); MONO_ADD_INS (cfg->cbb, dest); break; - case OP_BOUNDS_CHECK: + case OP_BOUNDS_CHECK: { + gboolean need_sext = ins->backend.need_sext; MONO_EMIT_NULL_CHECK (cfg, ins->sreg1, FALSE); if (COMPILE_LLVM (cfg)) { - int index2_reg = alloc_preg (cfg); - MONO_EMIT_NEW_UNALU (cfg, OP_SEXT_I4, index2_reg, ins->sreg2); + int index2_reg; + if (need_sext) { + index2_reg = alloc_preg (cfg); + MONO_EMIT_NEW_UNALU (cfg, OP_SEXT_I4, index2_reg, ins->sreg2); + } else { + index2_reg = ins->sreg2; + } MONO_EMIT_DEFAULT_BOUNDS_CHECK (cfg, ins->sreg1, GINT32_TO_UINT32(ins->inst_imm), index2_reg, ins->flags & MONO_INST_FAULT, ins->inst_p0); } else { + g_assert (!need_sext); MONO_ARCH_EMIT_BOUNDS_CHECK (cfg, ins->sreg1, ins->inst_imm, ins->sreg2, ins->inst_p0); } break; + } case OP_NEWARR: { ERROR_DECL (vt_error); MonoClass *array_class = mono_class_create_array (ins->inst_newa_class, 1); diff --git a/src/mono/mono/mini/exceptions-amd64.c b/src/mono/mono/mini/exceptions-amd64.c index d20377b35fe0ea..0a0121a76a7dc2 100644 --- a/src/mono/mono/mini/exceptions-amd64.c +++ b/src/mono/mono/mini/exceptions-amd64.c @@ -836,9 +836,7 @@ gpointer mono_arch_ip_from_context (void *sigctx) { #if defined(MONO_ARCH_USE_SIGACTION) - ucontext_t *ctx = (ucontext_t*)sigctx; - - return (gpointer)UCONTEXT_REG_RIP (ctx); + return (gpointer)UCONTEXT_REG_RIP ((ucontext_t*)sigctx); #elif defined(HOST_WIN32) return (gpointer)(((CONTEXT*)sigctx)->Rip); #else diff --git a/src/mono/mono/mini/exceptions-arm.c b/src/mono/mono/mini/exceptions-arm.c index 3af1e4dbf5fcb6..5edd89d69c227b 100644 --- a/src/mono/mono/mini/exceptions-arm.c +++ b/src/mono/mono/mini/exceptions-arm.c @@ -86,11 +86,11 @@ mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot) g_assert ((code - start) < 128); - mono_arch_flush_icache (start, code - start); + mono_arch_flush_icache (start, GPTRDIFF_TO_INT (code - start)); MONO_PROFILER_RAISE (jit_code_buffer, (start, code - start, MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL)); if (info) - *info = mono_tramp_info_create ("restore_context", start, code - start, ji, unwind_ops); + *info = mono_tramp_info_create ("restore_context", start, GPTRDIFF_TO_UINT32 (code - start), ji, unwind_ops); return start; } @@ -137,11 +137,11 @@ mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot) g_assert ((code - start) < 320); - mono_arch_flush_icache (start, code - start); + mono_arch_flush_icache (start, GPTRDIFF_TO_INT (code - start)); MONO_PROFILER_RAISE (jit_code_buffer, (start, code - start, MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL)); if (info) - *info = mono_tramp_info_create ("call_filter", start, code - start, ji, unwind_ops); + *info = mono_tramp_info_create ("call_filter", start, GPTRDIFF_TO_UINT32 (code - start), ji, unwind_ops); return start; } @@ -309,7 +309,7 @@ get_throw_trampoline (int size, gboolean corlib, gboolean rethrow, gboolean llvm else icall_id = MONO_JIT_ICALL_mono_arm_throw_exception; - ji = mono_patch_info_list_prepend (ji, code - start, MONO_PATCH_INFO_JIT_ICALL_ADDR, GUINT_TO_POINTER (icall_id)); + ji = mono_patch_info_list_prepend (ji, GPTRDIFF_TO_INT (code - start), MONO_PATCH_INFO_JIT_ICALL_ADDR, GUINT_TO_POINTER (icall_id)); ARM_LDR_IMM (code, ARMREG_IP, ARMREG_PC, 0); ARM_B (code, 0); *(gpointer*)(gpointer)code = NULL; @@ -323,11 +323,11 @@ get_throw_trampoline (int size, gboolean corlib, gboolean rethrow, gboolean llvm /* we should never reach this breakpoint */ ARM_DBRK (code); g_assert ((code - start) < size); - mono_arch_flush_icache (start, code - start); + mono_arch_flush_icache (start, GPTRDIFF_TO_INT (code - start)); MONO_PROFILER_RAISE (jit_code_buffer, (start, code - start, MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL)); if (info) - *info = mono_tramp_info_create (tramp_name, start, code - start, ji, unwind_ops); + *info = mono_tramp_info_create (tramp_name, start, GPTRDIFF_TO_UINT32 (code - start), ji, unwind_ops); return start; } diff --git a/src/mono/mono/mini/exceptions-arm64.c b/src/mono/mono/mini/exceptions-arm64.c index b55825583cca8a..28ce79cd01c575 100644 --- a/src/mono/mono/mini/exceptions-arm64.c +++ b/src/mono/mono/mini/exceptions-arm64.c @@ -67,10 +67,10 @@ mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot) g_assert ((code - start) < size); - MINI_END_CODEGEN (start, code - start, MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL); + MINI_END_CODEGEN (start, GPTRDIFF_TO_INT (code - start), MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL); if (info) - *info = mono_tramp_info_create ("restore_context", start, code - start, ji, unwind_ops); + *info = mono_tramp_info_create ("restore_context", start, GPTRDIFF_TO_UINT32 (code - start), ji, unwind_ops); return MINI_ADDR_TO_FTNPTR (start); } @@ -158,10 +158,10 @@ mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot) g_assert ((code - start) < size); - MINI_END_CODEGEN (start, code - start, MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL); + MINI_END_CODEGEN (start, GPTRDIFF_TO_INT (code - start), MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL); if (info) - *info = mono_tramp_info_create ("call_filter", start, code - start, ji, unwind_ops); + *info = mono_tramp_info_create ("call_filter", start, GPTRDIFF_TO_UINT32 (code - start), ji, unwind_ops); return MINI_ADDR_TO_FTNPTR (start); } @@ -262,10 +262,10 @@ get_throw_trampoline (int size, gboolean corlib, gboolean rethrow, gboolean llvm g_assert ((code - start) < size); - MINI_END_CODEGEN (start, code - start, MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL); + MINI_END_CODEGEN (start, GPTRDIFF_TO_INT (code - start), MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL); if (info) - *info = mono_tramp_info_create (tramp_name, start, code - start, ji, unwind_ops); + *info = mono_tramp_info_create (tramp_name, start, GPTRDIFF_TO_UINT32 (code - start), ji, unwind_ops); return MINI_ADDR_TO_FTNPTR (start); } @@ -372,7 +372,7 @@ mono_arm_throw_exception (gpointer arg, host_mgreg_t pc, host_mgreg_t *int_regs, if (!corlib) exc = (MonoObject*)arg; else { - ex_token_index = (guint64)arg; + ex_token_index = GPOINTER_TO_UINT32 (arg); ex_token = MONO_TOKEN_TYPE_DEF | ex_token_index; exc = (MonoObject*)mono_exception_from_token (mono_defaults.corlib, ex_token); } diff --git a/src/mono/mono/mini/exceptions-x86.c b/src/mono/mono/mini/exceptions-x86.c index c51181d9480366..47ba88dcf92923 100644 --- a/src/mono/mono/mini/exceptions-x86.c +++ b/src/mono/mono/mini/exceptions-x86.c @@ -352,7 +352,7 @@ mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot) x86_ret (code); if (info) - *info = mono_tramp_info_create ("restore_context", start, code - start, ji, unwind_ops); + *info = mono_tramp_info_create ("restore_context", start, GPTRDIFF_TO_UINT32 (code - start), ji, unwind_ops); else { GSList *l; @@ -363,7 +363,7 @@ mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot) g_assertf ((code - start) <= size, "%d %d", (int)(code - start), size); - mono_arch_flush_icache (start, code - start); + mono_arch_flush_icache (start, GPTRDIFF_TO_INT (code - start)); MONO_PROFILER_RAISE (jit_code_buffer, (start, code - start, MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL)); return start; @@ -432,7 +432,7 @@ mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot) x86_ret (code); if (info) - *info = mono_tramp_info_create ("call_filter", start, code - start, ji, unwind_ops); + *info = mono_tramp_info_create ("call_filter", start, GPTRDIFF_TO_UINT32 (code - start), ji, unwind_ops); else { GSList *l; @@ -441,7 +441,7 @@ mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot) g_slist_free (unwind_ops); } - mono_arch_flush_icache (start, code - start); + mono_arch_flush_icache (start, GPTRDIFF_TO_INT (code - start)); MONO_PROFILER_RAISE (jit_code_buffer, (start, code - start, MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL)); g_assertf ((code - start) <= kMaxCodeSize, "%d %d", (int)(code - start), kMaxCodeSize); @@ -676,7 +676,7 @@ get_throw_trampoline (const char *name, gboolean rethrow, gboolean llvm, gboolea g_assertf ((code - start) <= kMaxCodeSize, "%d %d", (int)(code - start), kMaxCodeSize); if (info) - *info = mono_tramp_info_create (name, start, code - start, ji, unwind_ops); + *info = mono_tramp_info_create (name, start, GPTRDIFF_TO_UINT32 (code - start), ji, unwind_ops); else { GSList *l; @@ -685,7 +685,7 @@ get_throw_trampoline (const char *name, gboolean rethrow, gboolean llvm, gboolea g_slist_free (unwind_ops); } - mono_arch_flush_icache (start, code - start); + mono_arch_flush_icache (start, GPTRDIFF_TO_INT (code - start)); MONO_PROFILER_RAISE (jit_code_buffer, (start, code - start, MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL)); return start; @@ -982,7 +982,7 @@ mono_x86_get_signal_exception_trampoline (MonoTrampInfo **info, gboolean aot) g_assertf ((code - start) <= size, "%d %d", (int)(code - start), size); if (info) - *info = mono_tramp_info_create ("x86_signal_exception_trampoline", start, code - start, ji, unwind_ops); + *info = mono_tramp_info_create ("x86_signal_exception_trampoline", start, GPTRDIFF_TO_UINT32 (code - start), ji, unwind_ops); else { GSList *l; @@ -993,7 +993,7 @@ mono_x86_get_signal_exception_trampoline (MonoTrampInfo **info, gboolean aot) g_assertf ((code - start) <= size, "%d %d", (int)(code - start), size); - mono_arch_flush_icache (start, code - start); + mono_arch_flush_icache (start, GPTRDIFF_TO_INT (code - start)); MONO_PROFILER_RAISE (jit_code_buffer, (start, code - start, MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL)); return start; diff --git a/src/mono/mono/mini/graph.c b/src/mono/mono/mini/graph.c index 025664e6cbe6c1..1fffe4c833b7d4 100644 --- a/src/mono/mono/mini/graph.c +++ b/src/mono/mono/mini/graph.c @@ -203,7 +203,6 @@ mono_draw_graph (MonoCompile *cfg, MonoGraphOptions draw_options) #endif const char *fn; FILE *fp; - int _i G_GNUC_UNUSED; fn = "/tmp/minidtree.graph"; fp = fopen (fn, "w+"); @@ -228,6 +227,7 @@ mono_draw_graph (MonoCompile *cfg, MonoGraphOptions draw_options) #ifdef HAVE_SYSTEM //com = g_strdup_printf ("dot %s -Tpng -o %s.png; eog %s.png", fn, fn, fn); com = g_strdup_printf ("dot %s -Tps -o %s.ps;gv %s.ps", fn, fn, fn); + int _i G_GNUC_UNUSED; _i = system (com); g_free (com); #else diff --git a/src/mono/mono/mini/helpers.c b/src/mono/mono/mini/helpers.c index 130210cf21be9b..9d903fdbc24a50 100644 --- a/src/mono/mono/mini/helpers.c +++ b/src/mono/mono/mini/helpers.c @@ -130,7 +130,6 @@ mono_disassemble_code (MonoCompile *cfg, guint8 *code, int size, char *id) #endif char *as_file; char *o_file; - int unused G_GNUC_UNUSED; #ifdef HOST_WIN32 as_file = g_strdup_printf ("%s/test.s", tmp); @@ -255,6 +254,7 @@ MONO_RESTORE_WARNING #endif #ifdef HAVE_SYSTEM + int unused G_GNUC_UNUSED; char *cmd = g_strdup_printf (ARCH_PREFIX AS_CMD " %s -o %s", as_file, o_file); unused = system (cmd); g_free (cmd); diff --git a/src/mono/mono/mini/interp/interp-simd.c b/src/mono/mono/mini/interp/interp-simd.c index 5031c87aaf206b..f21fdec5aefd3b 100644 --- a/src/mono/mono/mini/interp/interp-simd.c +++ b/src/mono/mono/mini/interp/interp-simd.c @@ -215,57 +215,57 @@ interp_v128_i2_op_left_shift (gpointer res, gpointer v1, gpointer s1) static void interp_v128_i4_op_left_shift (gpointer res, gpointer v1, gpointer s1) { - *(v128_i4*)res = *(v128_i4*)v1 << *(gint32*)s1; + *(v128_i4*)res = *(v128_i4*)v1 << (*(gint32*)s1 & 31); } static void interp_v128_i8_op_left_shift (gpointer res, gpointer v1, gpointer s1) { - *(v128_i8*)res = *(v128_i8*)v1 << *(gint32*)s1; + *(v128_i8*)res = *(v128_i8*)v1 << (*(gint32*)s1 & 63); } // op_RightShift static void interp_v128_i1_op_right_shift (gpointer res, gpointer v1, gpointer s1) { - *(v128_i1*)res = *(v128_i1*)v1 >> *(gint32*)s1; + *(v128_i1*)res = *(v128_i1*)v1 >> (*(gint32*)s1 & 7); } static void interp_v128_i2_op_right_shift (gpointer res, gpointer v1, gpointer s1) { - *(v128_i2*)res = *(v128_i2*)v1 >> *(gint32*)s1; + *(v128_i2*)res = *(v128_i2*)v1 >> (*(gint32*)s1 & 15); } static void interp_v128_i4_op_right_shift (gpointer res, gpointer v1, gpointer s1) { - *(v128_i4*)res = *(v128_i4*)v1 >> *(gint32*)s1; + *(v128_i4*)res = *(v128_i4*)v1 >> (*(gint32*)s1 & 31); } // op_UnsignedRightShift static void interp_v128_i1_op_uright_shift (gpointer res, gpointer v1, gpointer s1) { - *(v128_u1*)res = *(v128_u1*)v1 >> *(gint32*)s1; + *(v128_u1*)res = *(v128_u1*)v1 >> (*(gint32*)s1 & 7); } static void interp_v128_i2_op_uright_shift (gpointer res, gpointer v1, gpointer s1) { - *(v128_u2*)res = *(v128_u2*)v1 >> *(gint32*)s1; + *(v128_u2*)res = *(v128_u2*)v1 >> (*(gint32*)s1 & 15); } static void interp_v128_i4_op_uright_shift (gpointer res, gpointer v1, gpointer s1) { - *(v128_u4*)res = *(v128_u4*)v1 >> *(gint32*)s1; + *(v128_u4*)res = *(v128_u4*)v1 >> (*(gint32*)s1 & 31); } static void interp_v128_i8_op_uright_shift (gpointer res, gpointer v1, gpointer s1) { - *(v128_u8*)res = *(v128_u8*)v1 >> *(gint32*)s1; + *(v128_u8*)res = *(v128_u8*)v1 >> (*(gint32*)s1 & 63); } // op_OnesComplement diff --git a/src/mono/mono/mini/interp/interp.c b/src/mono/mono/mini/interp/interp.c index 6e11ef4f35708b..463c25a7972bd9 100644 --- a/src/mono/mono/mini/interp/interp.c +++ b/src/mono/mono/mini/interp/interp.c @@ -1211,27 +1211,6 @@ ves_array_calculate_index (MonoArray *ao, stackval *sp, gboolean safe) return pos; } -static MonoException* -ves_array_get (InterpFrame *frame, stackval *sp, stackval *retval, MonoMethodSignature *sig, gboolean safe) -{ - MonoObject *o = sp->data.o; - MonoArray *ao = (MonoArray *) o; - MonoClass *ac = o->vtable->klass; - - g_assert (m_class_get_rank (ac) >= 1); - - gint32 pos = ves_array_calculate_index (ao, sp + 1, safe); - if (pos == -1) - return mono_get_exception_index_out_of_range (); - - gint32 esize = mono_array_element_size (ac); - gconstpointer ea = mono_array_addr_with_size_fast (ao, esize, pos); - - MonoType *mt = sig->ret; - stackval_from_data (mt, retval, ea, FALSE); - return NULL; -} - static MonoException* ves_array_element_address (InterpFrame *frame, MonoClass *required_type, MonoArray *ao, gpointer *ret, stackval *sp, gboolean needs_typecheck) { diff --git a/src/mono/mono/mini/interp/jiterpreter.c b/src/mono/mono/mini/interp/jiterpreter.c index 0dd5ea27f9af7a..0dd3175cfb74ab 100644 --- a/src/mono/mono/mini/interp/jiterpreter.c +++ b/src/mono/mono/mini/interp/jiterpreter.c @@ -21,6 +21,7 @@ void jiterp_preserve_module (void); #define jiterp_assert(b) #endif +#include #include #include @@ -724,6 +725,7 @@ trace_info_allocate_segment (gint32 index) { return segment; #else TraceInfo *expected = NULL; + static_assert (sizeof(atomic_uintptr_t) == sizeof(trace_segments[index]) && ATOMIC_POINTER_LOCK_FREE == 2, ""); if (!atomic_compare_exchange_strong ((atomic_uintptr_t *)&trace_segments[index], (uintptr_t *)&expected, (uintptr_t)segment)) { g_free (segment); return expected; @@ -751,11 +753,12 @@ trace_info_get (gint32 index) { static gint32 trace_info_alloc () { #ifdef DISABLE_THREADS - gint32 index = trace_count++, + gint32 index = trace_count++; #else - gint32 index = atomic_fetch_add ((atomic_int *)&trace_count, 1), + static_assert (sizeof(atomic_int) == sizeof(trace_count) && ATOMIC_INT_LOCK_FREE == 2, ""); + gint32 index = atomic_fetch_add ((atomic_int *)&trace_count, 1); #endif - limit = (MAX_TRACE_SEGMENTS * TRACE_SEGMENT_SIZE); + gint32 limit = (MAX_TRACE_SEGMENTS * TRACE_SEGMENT_SIZE); // Make sure we're not out of space in the trace info table. if (index == limit) g_print ("MONO_WASM: Reached maximum number of jiterpreter trace entry points (%d).\n", limit); @@ -925,7 +928,8 @@ mono_interp_tier_prepare_jiterpreter_fast ( #ifdef DISABLE_THREADS gint64 count = trace_info->hit_count++; #else - gint64 count = atomic_fetch_add ((atomic_long *)&trace_info->hit_count, 1); + static_assert (sizeof(atomic_llong) == sizeof(trace_info->hit_count) && ATOMIC_LLONG_LOCK_FREE == 2, ""); + gint64 count = atomic_fetch_add ((atomic_llong *)&trace_info->hit_count, 1); #endif if (count == mono_opt_jiterpreter_minimum_trace_hit_count) { @@ -1282,6 +1286,7 @@ mono_jiterp_modify_counter (int counter, double delta) { long actual_result = *counter_address; *counter_address = actual_result + actual_delta; #else + static_assert (sizeof(counter_address) == sizeof(atomic_long) && ATOMIC_LONG_LOCK_FREE == 2, ""); long actual_result = atomic_fetch_add ((atomic_long *)counter_address, actual_delta); #endif @@ -1356,6 +1361,7 @@ mono_jiterp_monitor_trace (const guint16 *ip, void *_frame, void *locals) #ifdef DISABLE_THREADS info->penalty_total += penalty; #else + static_assert (sizeof(info->penalty_total) == sizeof(atomic_int) && ATOMIC_INT_LOCK_FREE == 2, ""); atomic_fetch_add ((atomic_int *)&info->penalty_total, penalty); #endif @@ -1367,7 +1373,8 @@ mono_jiterp_monitor_trace (const guint16 *ip, void *_frame, void *locals) gint64 hit_count = info->hit_count - mono_opt_jiterpreter_minimum_trace_hit_count; info->hit_count += 1; #else - gint64 hit_count = atomic_fetch_add ((atomic_long *)&info->hit_count, 1) - mono_opt_jiterpreter_minimum_trace_hit_count; + static_assert (sizeof(atomic_llong) == sizeof(info->hit_count) && ATOMIC_LLONG_LOCK_FREE == 2, ""); + gint64 hit_count = atomic_fetch_add ((atomic_llong *)&info->hit_count, 1) - mono_opt_jiterpreter_minimum_trace_hit_count; #endif if (hit_count == mono_opt_jiterpreter_trace_monitoring_period) { @@ -1389,6 +1396,7 @@ mono_jiterp_monitor_trace (const guint16 *ip, void *_frame, void *locals) #else guint16 zero = 0; // atomically patch the relative fn ptr inside the opcode. + static_assert (sizeof(atomic_ushort) == sizeof(opcode->relative_fn_ptr) && ATOMIC_SHORT_LOCK_FREE == 2, ""); g_assert (atomic_compare_exchange_strong ((atomic_ushort *)&opcode->relative_fn_ptr, &zero, new_relative_fn_ptr)); #endif g_assert (mono_jiterp_patch_opcode (opcode, MINT_TIER_NOP_JITERPRETER, MINT_TIER_ENTER_JITERPRETER)); @@ -1465,6 +1473,7 @@ atomically_set_value_once (gint32 *address, gint32 value) { *address = value; #else gint32 expected = 0; + static_assert (sizeof(atomic_int) == sizeof(address) && ATOMIC_INT_LOCK_FREE == 2, ""); if (atomic_compare_exchange_strong ((atomic_int *)address, &expected, value)) return; if (expected == value) @@ -1489,6 +1498,7 @@ mono_jiterp_initialize_table (int type, int first_index, int last_index) { table->next_index = first_index; #else gint32 expected = 0; + static_assert (sizeof (atomic_int) == sizeof(table->next_index) && ATOMIC_INT_LOCK_FREE == 2, ""); atomic_compare_exchange_strong ((atomic_int *)&table->next_index, &expected, first_index); #endif } @@ -1506,6 +1516,7 @@ mono_jiterp_allocate_table_entry (int type) { int index = table->next_index++; #else gint32 expected = 0; + static_assert (sizeof (atomic_int) == sizeof(table->next_index) && ATOMIC_INT_LOCK_FREE == 2, ""); atomic_compare_exchange_strong ((atomic_int *)&table->next_index, &expected, table->first_index); int index = atomic_fetch_add ((atomic_int *)&table->next_index, 1); #endif @@ -1525,6 +1536,7 @@ mono_jiterp_increment_counter (volatile int *counter) { *counter = result + 1; return result; #else + static_assert (sizeof (atomic_int) == sizeof(counter) && ATOMIC_INT_LOCK_FREE == 2, ""); return atomic_fetch_add ((atomic_int *)counter, 1); #endif } @@ -1539,6 +1551,7 @@ mono_jiterp_patch_opcode (volatile JiterpreterOpcode *ip, guint16 old_opcode, gu return FALSE; #else // guint16 actual_old_opcode = old_opcode; + static_assert (sizeof (atomic_ushort) == sizeof(ip->opcode) && ATOMIC_SHORT_LOCK_FREE == 2, ""); gboolean result = atomic_compare_exchange_strong ((atomic_ushort *)&ip->opcode, &old_opcode, new_opcode); /* if (!result) diff --git a/src/mono/mono/mini/interp/transform.c b/src/mono/mono/mini/interp/transform.c index d4b7a94d8a4d98..a0e9e5fa2e666f 100644 --- a/src/mono/mono/mini/interp/transform.c +++ b/src/mono/mono/mini/interp/transform.c @@ -728,7 +728,7 @@ get_mov_for_type (int mt, gboolean needs_sext) g_assert_not_reached (); } -static int +static guint16 get_mint_type_size (int mt) { switch (mt) { @@ -2316,7 +2316,7 @@ interp_handle_intrinsics (TransformData *td, MonoMethod *target_method, MonoClas return TRUE; } else if (!strcmp (tm, "GetHashCode") || !strcmp (tm, "InternalGetHashCode")) { *op = MINT_INTRINS_GET_HASHCODE; - } else if (!strcmp (tm, "TryGetHashCode") || !strcmp (tm, "InternalTryGetHashCode")) { + } else if (!strcmp (tm, "TryGetHashCode")) { *op = MINT_INTRINS_TRY_GET_HASHCODE; } else if (!strcmp (tm, "GetRawData")) { interp_add_ins (td, MINT_LDFLDA_UNSAFE); @@ -3323,9 +3323,9 @@ interp_realign_simd_params (TransformData *td, StackInfo *sp_params, int num_arg interp_add_ins (td, MINT_MOV_STACK_UNOPT); // After previous alignment, this arg will be offset by MINT_STACK_SLOT_SIZE - td->last_ins->data [0] = sp_params [i].offset + prev_offset; + td->last_ins->data [0] = GINT_TO_UINT16 (sp_params [i].offset + prev_offset); td->last_ins->data [1] = offset_amount; - td->last_ins->data [2] = get_stack_size (td, sp_params + i, num_args - i); + td->last_ins->data [2] = GINT_TO_UINT16 (get_stack_size (td, sp_params + i, num_args - i)); } } } @@ -3711,9 +3711,9 @@ interp_transform_call (TransformData *td, MonoMethod *method, MonoMethod *target // Mov all params to the new_param_offset interp_add_ins (td, MINT_MOV_STACK_UNOPT); - td->last_ins->data [0] = param_offset; + td->last_ins->data [0] = GINT_TO_UINT16 (param_offset); td->last_ins->data [1] = MINT_STACK_SLOT_SIZE; - td->last_ins->data [2] = param_end_offset - param_offset; + td->last_ins->data [2] = GINT_TO_UINT16 (param_end_offset - param_offset); // If we have any simd arguments, we broke their alignment. We need to find the first simd arg and realign it // together with the following params. First argument can't be simd type otherwise we would have been aligned @@ -4032,7 +4032,7 @@ get_basic_blocks (TransformData *td, MonoMethodHeader *header, gboolean make_lis get_bb (td, target, make_list); ip += 2; get_bb (td, ip, make_list); - mono_bitset_set (il_targets, target - start); + mono_bitset_set (il_targets, GPTRDIFF_TO_UINT32 (target - start)); break; case MonoInlineBrTarget: target = start + cli_addr + 5 + (gint32)read32 (ip + 1); @@ -4041,7 +4041,7 @@ get_basic_blocks (TransformData *td, MonoMethodHeader *header, gboolean make_lis get_bb (td, target, make_list); ip += 5; get_bb (td, ip, make_list); - mono_bitset_set (il_targets, target - start); + mono_bitset_set (il_targets, GPTRDIFF_TO_UINT32 (target - start)); break; case MonoInlineSwitch: { guint32 n = read32 (ip + 1); @@ -4052,14 +4052,14 @@ get_basic_blocks (TransformData *td, MonoMethodHeader *header, gboolean make_lis if (target > end) return FALSE; get_bb (td, target, make_list); - mono_bitset_set (il_targets, target - start); + mono_bitset_set (il_targets, GPTRDIFF_TO_UINT32 (target - start)); for (j = 0; j < n; ++j) { target = start + cli_addr + (gint32)read32 (ip); if (target > end) return FALSE; get_bb (td, target, make_list); ip += 4; - mono_bitset_set (il_targets, target - start); + mono_bitset_set (il_targets, GPTRDIFF_TO_UINT32 (target - start)); } get_bb (td, ip, make_list); break; @@ -6212,7 +6212,7 @@ generate_code (TransformData *td, MonoMethod *method, MonoMethodHeader *header, td->cbb->contains_call_instruction = TRUE; interp_add_ins (td, MINT_NEWOBJ_STRING_UNOPT); td->last_ins->data [0] = get_data_item_index (td, mono_interp_get_imethod (m)); - td->last_ins->data [1] = params_stack_size; + td->last_ins->data [1] = GUINT32_TO_UINT16 (params_stack_size); push_type (td, stack_type [ret_mt], klass); interp_ins_set_dreg (td->last_ins, td->sp [-1].local); } else { @@ -6293,16 +6293,16 @@ generate_code (TransformData *td, MonoMethod *method, MonoMethodHeader *header, if (td->locals [sp_params [0].local].flags & INTERP_LOCAL_FLAG_SIMD) { // if first arg is simd, move all args at next aligned offset after this ptr interp_add_ins (td, MINT_MOV_STACK_UNOPT); - td->last_ins->data [0] = param_offset; - td->last_ins->data [1] = call_offset + MINT_SIMD_ALIGNMENT - param_offset; - td->last_ins->data [2] = param_size; + td->last_ins->data [0] = GINT_TO_UINT16 (param_offset); + td->last_ins->data [1] = GINT_TO_UINT16 (call_offset + MINT_SIMD_ALIGNMENT - param_offset); + td->last_ins->data [2] = GINT_TO_UINT16 (param_size); } else { int realign_offset = call_offset + MINT_STACK_SLOT_SIZE - param_offset; // otherwise we move all args immediately after this ptr interp_add_ins (td, MINT_MOV_STACK_UNOPT); - td->last_ins->data [0] = param_offset; - td->last_ins->data [1] = realign_offset; - td->last_ins->data [2] = param_size; + td->last_ins->data [0] = GINT_TO_UINT16 (param_offset); + td->last_ins->data [1] = GINT_TO_UINT16 (realign_offset); + td->last_ins->data [2] = GINT_TO_UINT16 (param_size); if ((realign_offset % MINT_SIMD_ALIGNMENT) != 0) { // the argument move broke the alignment of any potential simd arguments, realign @@ -9811,8 +9811,8 @@ interp_cprop (TransformData *td) ins = interp_insert_ins (td, ins, MINT_MOV_SRC_OFF); interp_ins_set_dreg (ins, ins->prev->dreg); interp_ins_set_sreg (ins, local); - ins->data [0] = foffset; - ins->data [1] = mt; + ins->data [0] = GINT_TO_UINT16 (foffset); + ins->data [1] = GINT_TO_UINT16 (mt); if (mt == MINT_TYPE_VT) ins->data [2] = ldsize; @@ -9945,8 +9945,8 @@ interp_cprop (TransformData *td) ins = interp_insert_ins (td, ins, MINT_MOV_DST_OFF); interp_ins_set_dreg (ins, local); interp_ins_set_sreg (ins, sregs [1]); - ins->data [0] = foffset; - ins->data [1] = mt; + ins->data [0] = GINT_TO_UINT16 (foffset); + ins->data [1] = GINT_TO_UINT16 (mt); ins->data [2] = vtsize; interp_clear_ins (ins->prev); @@ -10301,7 +10301,7 @@ interp_super_instructions (TransformData *td) new_inst = interp_insert_ins (td, ins, MINT_SHR_UN_I8_IMM); new_inst->dreg = ins->dreg; new_inst->sregs [0] = ins->sregs [0]; - new_inst->data [0] = power2; + new_inst->data [0] = GINT_TO_UINT16 (power2); interp_clear_ins (def); interp_clear_ins (ins); @@ -10495,7 +10495,7 @@ interp_super_instructions (TransformData *td) break; } if (replace_opcode != -1) { - ins->opcode = replace_opcode; + ins->opcode = GINT_TO_UINT16 (replace_opcode); ins->sregs [0] = def->sregs [0]; if (def->opcode != MINT_CEQ0_I4) ins->sregs [1] = def->sregs [1]; diff --git a/src/mono/mono/mini/intrinsics.c b/src/mono/mono/mini/intrinsics.c index b1e5e767231470..2a32c27ab14d13 100644 --- a/src/mono/mono/mini/intrinsics.c +++ b/src/mono/mono/mini/intrinsics.c @@ -356,9 +356,10 @@ emit_span_intrinsics (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature /* Similar to mini_emit_ldelema_1_ins () */ int size = mono_class_array_element_size (param_class); - int index_reg = mini_emit_sext_index_reg (cfg, args [1]); + gboolean need_sext; + int index_reg = mini_emit_sext_index_reg (cfg, args [1], &need_sext); - mini_emit_bounds_check_offset (cfg, span_reg, length_field->offset - MONO_ABI_SIZEOF (MonoObject), index_reg, NULL); + mini_emit_bounds_check_offset (cfg, span_reg, length_field->offset - MONO_ABI_SIZEOF (MonoObject), index_reg, NULL, need_sext); // FIXME: Sign extend index ? @@ -849,7 +850,7 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign #else index_reg = args [1]->dreg; #endif - MONO_EMIT_BOUNDS_CHECK (cfg, args [0]->dreg, MonoString, length, index_reg); + MONO_EMIT_BOUNDS_CHECK (cfg, args [0]->dreg, MonoString, length, index_reg, FALSE); #if defined(TARGET_X86) || defined(TARGET_AMD64) EMIT_NEW_X86_LEA (cfg, ins, args [0]->dreg, index_reg, 1, MONO_STRUCT_OFFSET (MonoString, chars)); @@ -906,7 +907,7 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign int sizes_reg = alloc_ireg (cfg); MONO_EMIT_NEW_LOAD_MEMBASE_FAULT (cfg, vt_reg, args [0]->dreg, MONO_STRUCT_OFFSET (MonoObject, vtable)); EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, class_reg, vt_reg, MONO_STRUCT_OFFSET (MonoVTable, klass)); - EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOADI4_MEMBASE, sizes_reg, class_reg, m_class_offsetof_sizes ()); + EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOADI4_MEMBASE, sizes_reg, class_reg, GINTPTR_TO_TMREG (m_class_offsetof_sizes ())); return ins; } @@ -1044,7 +1045,7 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign MonoInst* ptr_inst; if (cfg->compile_aot) { - NEW_RVACONST (cfg, ptr_inst, mono_class_get_image (mono_field_get_parent (field)), args [0]->inst_c0); + NEW_RVACONST (cfg, ptr_inst, mono_class_get_image (mono_field_get_parent (field)), GTMREG_TO_UINT32 (args [0]->inst_c0)); MONO_ADD_INS (cfg->cbb, ptr_inst); } else { #if G_BYTE_ORDER == G_LITTLE_ENDIAN @@ -2079,7 +2080,9 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign MonoType *t = method_context->method_inst->type_argv [0]; MonoClass *arg0 = mono_class_from_mono_type_internal (t); if (m_class_is_valuetype (arg0) && !mono_class_has_default_constructor (arg0, FALSE)) { - if (m_class_is_primitive (arg0)) { + if (m_class_is_primitive (arg0) || m_class_is_enumtype (arg0)) { + if (m_class_is_enumtype (arg0)) + t = mono_class_enum_basetype_internal (arg0); int dreg = alloc_dreg (cfg, mini_type_to_stack_type (cfg, t)); mini_emit_init_rvar (cfg, dreg, t); ins = cfg->cbb->last_ins; diff --git a/src/mono/mono/mini/ir-emit.h b/src/mono/mono/mini/ir-emit.h index 6b88e959e3852f..0889a79efb9564 100644 --- a/src/mono/mono/mini/ir-emit.h +++ b/src/mono/mono/mini/ir-emit.h @@ -971,11 +971,12 @@ static int ccount = 0; #endif static inline void -mini_emit_bounds_check_offset (MonoCompile *cfg, int array_reg, int array_length_offset, int index_reg, const char *ex_name) +mini_emit_bounds_check_offset (MonoCompile *cfg, int array_reg, int array_length_offset, int index_reg, const char *ex_name, gboolean need_sext) { if (!(cfg->opt & MONO_OPT_UNSAFE)) { ex_name = ex_name ? ex_name : "IndexOutOfRangeException"; if (!(cfg->opt & MONO_OPT_ABCREM)) { + g_assert (!need_sext); MONO_EMIT_NULL_CHECK (cfg, array_reg, FALSE); if (COMPILE_LLVM (cfg)) MONO_EMIT_DEFAULT_BOUNDS_CHECK ((cfg), (array_reg), GINT_TO_UINT(array_length_offset), (index_reg), TRUE, ex_name); @@ -988,6 +989,7 @@ mini_emit_bounds_check_offset (MonoCompile *cfg, int array_reg, int array_length ins->sreg2 = index_reg; ins->inst_p0 = (gpointer)ex_name; ins->inst_imm = (array_length_offset); + ins->backend.need_sext = need_sext; ins->flags |= MONO_INST_FAULT; MONO_ADD_INS ((cfg)->cbb, ins); (cfg)->flags |= MONO_CFG_NEEDS_DECOMPOSE; @@ -1002,8 +1004,8 @@ mini_emit_bounds_check_offset (MonoCompile *cfg, int array_reg, int array_length * array_length_field is the field in the previous struct with the length * index_reg is the vreg holding the index */ -#define MONO_EMIT_BOUNDS_CHECK(cfg, array_reg, array_type, array_length_field, index_reg) do { \ - mini_emit_bounds_check_offset ((cfg), (array_reg), MONO_STRUCT_OFFSET (array_type, array_length_field), (index_reg), NULL); \ +#define MONO_EMIT_BOUNDS_CHECK(cfg, array_reg, array_type, array_length_field, index_reg, need_sext) do { \ + mini_emit_bounds_check_offset ((cfg), (array_reg), MONO_STRUCT_OFFSET (array_type, array_length_field), (index_reg), NULL, need_sext); \ } while (0) #endif diff --git a/src/mono/mono/mini/jit-icalls.c b/src/mono/mono/mini/jit-icalls.c index 04a15e94aea165..90eb332a00bf0e 100644 --- a/src/mono/mono/mini/jit-icalls.c +++ b/src/mono/mono/mini/jit-icalls.c @@ -544,7 +544,7 @@ mono_imul_ovf (gint32 a, gint32 b) return 0; } - return res; + return GINT64_TO_INT32 (res); } gint32 @@ -559,7 +559,7 @@ mono_imul_ovf_un (guint32 a, guint32 b) return 0; } - return res; + return GUINT64_TO_INT32 (res); } gint32 @@ -574,7 +574,7 @@ mono_imul_ovf_un_oom (guint32 a, guint32 b) return 0; } - return res; + return GUINT64_TO_INT32 (res); } #endif @@ -1358,7 +1358,7 @@ constrained_gsharedvt_call_setup (gpointer mp, MonoMethod *cmethod, MonoClass *k error_init (error); - if (mono_class_is_interface (klass) || !m_class_is_valuetype (klass)) { + if ((mono_class_is_interface (klass) || !m_class_is_valuetype (klass)) && !m_method_is_static (cmethod)) { MonoObject *this_obj; is_iface = mono_class_is_interface (klass); @@ -1390,7 +1390,12 @@ constrained_gsharedvt_call_setup (gpointer mp, MonoMethod *cmethod, MonoClass *k } } - if (m_class_is_valuetype (klass) && (m->klass == mono_defaults.object_class || m->klass == m_class_get_parent (mono_defaults.enum_class) || m->klass == mono_defaults.enum_class)) { + if (m_method_is_static (cmethod)) { + /* + * Static calls don't have this arg + */ + *this_arg = NULL; + } else if (m_class_is_valuetype (klass) && (m->klass == mono_defaults.object_class || m->klass == m_class_get_parent (mono_defaults.enum_class) || m->klass == mono_defaults.enum_class)) { /* * Calling a non-vtype method with a vtype receiver, has to box. */ diff --git a/src/mono/mono/mini/llvm-intrinsics.h b/src/mono/mono/mini/llvm-intrinsics.h index 1bb09bf0388ae7..1d885954d4e4d8 100644 --- a/src/mono/mono/mini/llvm-intrinsics.h +++ b/src/mono/mono/mini/llvm-intrinsics.h @@ -107,7 +107,7 @@ INTRINS_OVR_TAG(SIMD_CEIL, ceil, Generic, Scalar | V64 | V128 | R4 | R8) INTRINS_OVR_TAG(SIMD_TRUNC, trunc, Generic, Scalar | V64 | V128 | R4 | R8) INTRINS_OVR_TAG(SIMD_ROUND, round, Generic, Scalar | V64 | V128 | R4 | R8) INTRINS_OVR_TAG(SIMD_NEAREST, nearbyint, Generic, V64 | V128 | R4 | R8) - +INTRINS(EH_TYPEID_FOR, eh_typeid_for, Generic) #if LLVM_API_VERSION >= 1400 INTRINS_OVR_TAG(ROUNDEVEN, roundeven, Generic, Scalar | V64 | V128 | R4 | R8) #endif @@ -302,6 +302,9 @@ INTRINS_OVR(WASM_SUB_SAT_SIGNED_V8, wasm_sub_sat_signed, Wasm, sse_i2_t) INTRINS_OVR(WASM_SUB_SAT_UNSIGNED_V16, wasm_sub_sat_unsigned, Wasm, sse_i1_t) INTRINS_OVR(WASM_SUB_SAT_UNSIGNED_V8, wasm_sub_sat_unsigned, Wasm, sse_i2_t) INTRINS(WASM_SWIZZLE, wasm_swizzle, Wasm) +INTRINS(WASM_GET_EXCEPTION, wasm_get_exception, Wasm) +INTRINS(WASM_GET_EHSELECTOR, wasm_get_ehselector, Wasm) +INTRINS(WASM_RETHROW, wasm_rethrow, Wasm) #endif #if defined(TARGET_ARM64) INTRINS_OVR(BITREVERSE_I32, bitreverse, Generic, LLVMInt32Type ()) diff --git a/src/mono/mono/mini/method-to-ir.c b/src/mono/mono/mini/method-to-ir.c index e3605981bafcdf..17f2366846381f 100644 --- a/src/mono/mono/mini/method-to-ir.c +++ b/src/mono/mono/mini/method-to-ir.c @@ -3045,7 +3045,7 @@ emit_seq_point (MonoCompile *cfg, MonoMethod *method, guint8* ip, gboolean intr_ MonoInst *ins; if (cfg->gen_seq_points && cfg->method == method) { - NEW_SEQ_POINT (cfg, ins, ip - cfg->header->code, intr_loc); + NEW_SEQ_POINT (cfg, ins, GPTRDIFF_TO_TMREG (ip - cfg->header->code), intr_loc); if (nonempty_stack) ins->flags |= MONO_INST_NONEMPTY_STACK; MONO_ADD_INS (cfg->cbb, ins); @@ -3212,7 +3212,7 @@ mini_handle_unbox (MonoCompile *cfg, MonoClass *klass, MonoInst *val, int contex MONO_EMIT_NEW_COND_EXC (cfg, NE_UN, "InvalidCastException"); MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, klass)); - MONO_EMIT_NEW_LOAD_MEMBASE (cfg, eclass_reg, klass_reg, m_class_offsetof_element_class ()); + MONO_EMIT_NEW_LOAD_MEMBASE (cfg, eclass_reg, klass_reg, GINTPTR_TO_TMREG (m_class_offsetof_element_class ())); if (context_used) { MonoInst *element_class; @@ -4211,20 +4211,27 @@ mini_field_access_needs_cctor_run (MonoCompile *cfg, MonoMethod *method, MonoCla } int -mini_emit_sext_index_reg (MonoCompile *cfg, MonoInst *index) +mini_emit_sext_index_reg (MonoCompile *cfg, MonoInst *index, gboolean *need_sext) { int index_reg = index->dreg; int index2_reg; + *need_sext = FALSE; + #if SIZEOF_REGISTER == 8 + // If index is not I4 don't sign extend otherwise we lose high word + if (index->type != STACK_I4) + return index_reg; + /* The array reg is 64 bits but the index reg is only 32 */ - if (COMPILE_LLVM (cfg)) { + if (cfg->opt & MONO_OPT_ABCREM) { /* * abcrem can't handle the OP_SEXT_I4, so add this after abcrem, * during OP_BOUNDS_CHECK decomposition, and in the implementation * of OP_X86_LEA for llvm. */ index2_reg = index_reg; + *need_sext = TRUE; } else { index2_reg = alloc_preg (cfg); MONO_EMIT_NEW_UNALU (cfg, OP_SEXT_I4, index2_reg, index_reg); @@ -4259,7 +4266,9 @@ mini_emit_ldelema_1_ins (MonoCompile *cfg, MonoClass *klass, MonoInst *arr, Mono mult_reg = alloc_preg (cfg); array_reg = arr->dreg; - realidx2_reg = index2_reg = mini_emit_sext_index_reg (cfg, index); + gboolean need_sext; + + realidx2_reg = index2_reg = mini_emit_sext_index_reg (cfg, index, &need_sext); if (bounded) { bounds_reg = alloc_preg (cfg); @@ -4283,7 +4292,7 @@ mini_emit_ldelema_1_ins (MonoCompile *cfg, MonoClass *klass, MonoInst *arr, Mono } if (bcheck) - MONO_EMIT_BOUNDS_CHECK (cfg, array_reg, MonoArray, max_length, realidx2_reg); + MONO_EMIT_BOUNDS_CHECK (cfg, array_reg, MonoArray, max_length, realidx2_reg, need_sext); #if defined(TARGET_X86) || defined(TARGET_AMD64) if (size == 1 || size == 2 || size == 4 || size == 8) { @@ -4444,8 +4453,18 @@ mini_emit_array_store (MonoCompile *cfg, MonoClass *klass, MonoInst **sp, gboole if (sp [2]->type != STACK_OBJ) return NULL; + MonoInst *index_ins = sp [1]; +#if SIZEOF_REGISTER == 8 + if (sp [1]->type == STACK_I4) { + // stelemref wrapper receives index as native int, sign extend it + guint32 dreg = alloc_preg (cfg); + guint32 sreg = index_ins->dreg; + EMIT_NEW_UNALU (cfg, index_ins, OP_SEXT_I4, dreg, sreg); + } +#endif + iargs [2] = sp [2]; - iargs [1] = sp [1]; + iargs [1] = index_ins; iargs [0] = sp [0]; MonoClass *array_class = sp [0]->klass; @@ -4483,7 +4502,7 @@ mini_emit_array_store (MonoCompile *cfg, MonoClass *klass, MonoInst **sp, gboole MONO_EMIT_NEW_UNALU (cfg, OP_ZEXT_I4, index_reg, index_reg); if (safety_checks) - MONO_EMIT_BOUNDS_CHECK (cfg, array_reg, MonoArray, max_length, index_reg); + MONO_EMIT_BOUNDS_CHECK (cfg, array_reg, MonoArray, max_length, index_reg, FALSE); EMIT_NEW_STORE_MEMBASE_TYPE (cfg, ins, m_class_get_byval_arg (klass), array_reg, (target_mgreg_t)offset, sp [2]->dreg); } else { MonoInst *addr = mini_emit_ldelema_1_ins (cfg, klass, sp [0], sp [1], safety_checks, FALSE); @@ -6452,8 +6471,18 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b generic_context = &generic_container->context; cfg->generic_context = generic_context; - if (!cfg->gshared) - g_assert (!sig->has_type_parameters); + if (!cfg->gshared) { + gboolean check_type_parameter = TRUE; + if (method->wrapper_type == MONO_WRAPPER_OTHER) { + WrapperInfo *info = mono_marshal_get_wrapper_info (method); + g_assert (info); + if (info->subtype == WRAPPER_SUBTYPE_UNSAFE_ACCESSOR) + check_type_parameter = FALSE; + } + + if (check_type_parameter) + g_assert (!sig->has_type_parameters); + } if (sig->generic_param_count && method->wrapper_type == MONO_WRAPPER_NONE) { g_assert (method->is_inflated); @@ -7004,7 +7033,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b /* Avoid sequence points on empty IL like .volatile */ // FIXME: Enable this //if (!(cfg->cbb->last_ins && cfg->cbb->last_ins->opcode == OP_SEQ_POINT)) { - NEW_SEQ_POINT (cfg, ins, ip - header->code, intr_loc); + NEW_SEQ_POINT (cfg, ins, GPTRDIFF_TO_TMREG (ip - header->code), intr_loc); if ((sp != stack_start) && !sym_seq_point) ins->flags |= MONO_INST_NONEMPTY_STACK; MONO_ADD_INS (cfg->cbb, ins); @@ -7091,7 +7120,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b * The C# compiler uses these nops to notify the JIT that it should * insert seq points. */ - NEW_SEQ_POINT (cfg, ins, ip - header->code, FALSE); + NEW_SEQ_POINT (cfg, ins, GPTRDIFF_TO_TMREG (ip - header->code), FALSE); MONO_ADD_INS (cfg->cbb, ins); } if (cfg->keep_cil_nops) @@ -8510,7 +8539,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b * ret * will work correctly. */ - NEW_SEQ_POINT (cfg, ins, ip - header->code, TRUE); + NEW_SEQ_POINT (cfg, ins, GPTRDIFF_TO_TMREG (ip - header->code), TRUE); MONO_ADD_INS (cfg->cbb, ins); } @@ -10588,7 +10617,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b if (SIZEOF_REGISTER == 8 && COMPILE_LLVM (cfg)) MONO_EMIT_NEW_UNALU (cfg, OP_ZEXT_I4, index_reg, index_reg); - MONO_EMIT_BOUNDS_CHECK (cfg, array_reg, MonoArray, max_length, index_reg); + MONO_EMIT_BOUNDS_CHECK (cfg, array_reg, MonoArray, max_length, index_reg, FALSE); EMIT_NEW_LOAD_MEMBASE_TYPE (cfg, ins, m_class_get_byval_arg (klass), array_reg, (target_mgreg_t)offset); } else { addr = mini_emit_ldelema_1_ins (cfg, klass, sp [0], sp [1], TRUE, FALSE); diff --git a/src/mono/mono/mini/mini-amd64.c b/src/mono/mono/mini/mini-amd64.c index 1a2f9fff59d34e..4ba9f588f14793 100644 --- a/src/mono/mono/mini/mini-amd64.c +++ b/src/mono/mono/mini/mini-amd64.c @@ -357,7 +357,7 @@ collect_field_info_nested (MonoClass *klass, GArray *fields_array, int offset, g g_assert(info); for (guint32 i = 0; i < info->num_fields; ++i) { if (MONO_TYPE_ISSTRUCT (info->fields [i].field->type)) { - collect_field_info_nested (mono_class_from_mono_type_internal (info->fields [i].field->type), fields_array, info->fields [i].offset, pinvoke, unicode); + collect_field_info_nested (mono_class_from_mono_type_internal (info->fields [i].field->type), fields_array, (offset + info->fields [i].offset), pinvoke, unicode); } else { guint32 align; StructFieldInfo f; @@ -367,7 +367,7 @@ collect_field_info_nested (MonoClass *klass, GArray *fields_array, int offset, g info->fields [i].mspec, &align, TRUE, unicode); f.offset = offset + info->fields [i].offset; - if (i == info->num_fields - 1 && f.size + f.offset < info->native_size) { + if ((i == info->num_fields - 1) && ((f.size + f.offset) < info->native_size)) { /* This can happen with .pack directives eg. 'fixed' arrays */ if (MONO_TYPE_IS_PRIMITIVE (f.type)) { /* Replicate the last field to fill out the remaining place, since the code in add_valuetype () needs type information */ @@ -5126,6 +5126,27 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) amd64_div_reg_size (code, ins->sreg2, FALSE, 4); } break; + case OP_X86_LDIVREM: + amd64_div_reg (code, ins->sreg3, TRUE); + break; + case OP_X86_IDIVREM: + amd64_div_reg_size (code, ins->sreg3, TRUE, 4); + break; + case OP_X86_LDIVREMU: + amd64_div_reg (code, ins->sreg3, FALSE); + break; + case OP_X86_IDIVREMU: + amd64_div_reg_size (code, ins->sreg3, FALSE, 4); + break; + case OP_X86_IDIVREM2: + if (ins->dreg != AMD64_RDX) + amd64_mov_reg_reg (code, ins->dreg, AMD64_RDX, 4); + break; + case OP_X86_LDIVREM2: + if (ins->dreg != AMD64_RDX) + amd64_mov_reg_reg (code, ins->dreg, AMD64_RDX, 8); + break; + case OP_LMUL_OVF: amd64_imul_reg_reg (code, ins->sreg1, ins->sreg2); EMIT_COND_SYSTEM_EXCEPTION (X86_CC_O, FALSE, "OverflowException"); @@ -5685,6 +5706,19 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) case OP_X86_XCHG: amd64_xchg_reg_reg (code, ins->sreg1, ins->sreg2, 4); break; + case OP_X86_BSF32: + amd64_bsf_size (code, ins->dreg, ins->sreg1, 4); + break; + case OP_X86_BSF64: + amd64_bsf_size (code, ins->dreg, ins->sreg1, 8); + break; + case OP_X86_BSR32: + amd64_bsr_size (code, ins->dreg, ins->sreg1, 4); + break; + case OP_X86_BSR64: + amd64_bsr_size (code, ins->dreg, ins->sreg1, 8); + break; + case OP_LOCALLOC: /* keep alignment */ amd64_alu_reg_imm (code, X86_ADD, ins->sreg1, MONO_ARCH_FRAME_ALIGNMENT - 1); @@ -6736,6 +6770,17 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) } break; } + case OP_XOP: { + switch (ins->inst_c0) { + case INTRINS_SSE_PAUSE: + amd64_pause (code); + break; + default: + g_assert_not_reached (); + break; + } + break; + } case OP_XOP_X_X_X: { switch (ins->inst_c0) { case INTRINS_SSE_PHADDW: @@ -7305,7 +7350,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) if (ins->inst_c0 == 0) { amd64_sse_movss_reg_reg (code, ins->dreg, ins->sreg1); } else { - int imm = ins->inst_c0; + int imm = GTMREG_TO_INT (ins->inst_c0); amd64_sse_movaps_reg_reg (code, SIMD_TEMP_REG, ins->sreg1); amd64_sse_shufps_reg_reg_imm (code, SIMD_TEMP_REG, ins->sreg1, imm); amd64_sse_pxor_reg_reg (code, ins->dreg, ins->dreg); @@ -7326,7 +7371,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) amd64_sse_pinsrq_reg_reg_imm (code, ins->sreg1, ins->sreg2, ins->inst_c0); break; case OP_INSERT_R4: { - guint8 imm = (0 << 6) | (ins->inst_c0 << 4); + guint8 imm = (0 << 6) | (GTMREG_TO_UINT8 (ins->inst_c0 << 4)); amd64_sse_insertps_reg_reg (code, ins->sreg1, ins->sreg2, imm); break; } diff --git a/src/mono/mono/mini/mini-amd64.h b/src/mono/mono/mini/mini-amd64.h index 80c570e58f5bea..2c775c1585545b 100644 --- a/src/mono/mono/mini/mini-amd64.h +++ b/src/mono/mono/mini/mini-amd64.h @@ -480,16 +480,6 @@ typedef struct { /* Used for optimization, not complete */ #define MONO_ARCH_IS_OP_MEMBASE(opcode) ((opcode) == OP_X86_PUSH_MEMBASE) -#define MONO_ARCH_EMIT_BOUNDS_CHECK(cfg, array_reg, offset, index_reg, ex_name) do { \ - MonoInst *inst; \ - MONO_INST_NEW ((cfg), inst, OP_AMD64_ICOMPARE_MEMBASE_REG); \ - inst->inst_basereg = array_reg; \ - inst->inst_offset = offset; \ - inst->sreg2 = index_reg; \ - MONO_ADD_INS ((cfg)->cbb, inst); \ - MONO_EMIT_NEW_COND_EXC (cfg, LE_UN, ex_name); \ - } while (0) - // Does the ABI have a volatile non-parameter register, so tailcall // can pass context to generics or interfaces? #define MONO_ARCH_HAVE_VOLATILE_NON_PARAM_REGISTER 1 diff --git a/src/mono/mono/mini/mini-arm.c b/src/mono/mono/mini/mini-arm.c index daa8f3f48407ec..29546e1c231991 100644 --- a/src/mono/mono/mini/mini-arm.c +++ b/src/mono/mono/mini/mini-arm.c @@ -430,7 +430,7 @@ emit_save_lmf (MonoCompile *cfg, guint8 *code, gint32 lmf_offset) if (mono_arch_have_fast_tls () && mono_tls_get_tls_offset (TLS_KEY_LMF_ADDR) != -1) { code = emit_tls_get (code, ARMREG_R0, mono_tls_get_tls_offset (TLS_KEY_LMF_ADDR)); } else { - mono_add_patch_info (cfg, code - cfg->native_code, MONO_PATCH_INFO_JIT_ICALL_ID, + mono_add_patch_info (cfg, GPTRDIFF_TO_INT (code - cfg->native_code), MONO_PATCH_INFO_JIT_ICALL_ID, GUINT_TO_POINTER (MONO_JIT_ICALL_mono_tls_get_lmf_addr_extern)); code = emit_call_seq (cfg, code); } @@ -495,7 +495,7 @@ emit_float_args (MonoCompile *cfg, MonoCallInst *inst, guint8 *code, int *max_le ARM_FLDS (code, fad->hreg, var->inst_basereg, var->inst_offset); set_code_cursor (cfg, code); - *offset = code - cfg->native_code; + *offset = GPTRDIFF_TO_UINT (code - cfg->native_code); } return code; @@ -669,10 +669,10 @@ get_delegate_invoke_impl (MonoTrampInfo **info, gboolean has_target, gboolean pa } if (has_target) { - *info = mono_tramp_info_create ("delegate_invoke_impl_has_target", start, code - start, NULL, unwind_ops); + *info = mono_tramp_info_create ("delegate_invoke_impl_has_target", start, GPTRDIFF_TO_UINT32 (code - start), NULL, unwind_ops); } else { char *name = g_strdup_printf ("delegate_invoke_impl_target_%d", param_count); - *info = mono_tramp_info_create (name, start, code - start, NULL, unwind_ops); + *info = mono_tramp_info_create (name, start, GPTRDIFF_TO_UINT32 (code - start), NULL, unwind_ops); g_free (name); } @@ -1924,7 +1924,6 @@ void mono_arch_allocate_vars (MonoCompile *cfg) { MonoMethodSignature *sig; - MonoMethodHeader *header; MonoType *sig_ret; int offset, size, align, curinst; CallInfo *cinfo; @@ -1951,8 +1950,6 @@ mono_arch_allocate_vars (MonoCompile *cfg) if (mono_jit_trace_calls != NULL && mono_trace_eval (cfg->method)) cfg->param_area = MAX (cfg->param_area, sizeof (target_mgreg_t)*8); - header = cfg->header; - /* See mono_arch_get_global_int_regs () */ if (cfg->flags & MONO_CFG_HAS_CALLS) cfg->uses_rgctx_reg = TRUE; @@ -2864,21 +2861,14 @@ dyn_call_supported (CallInfo *cinfo, MonoMethodSignature *sig) for (i = 0; i < cinfo->nargs; ++i) { ArgInfo *ainfo = &cinfo->args [i]; - int last_slot; switch (ainfo->storage) { case RegTypeGeneral: case RegTypeIRegPair: case RegTypeBaseGen: case RegTypeFP: - break; case RegTypeBase: - break; case RegTypeStructByVal: - if (ainfo->size == 0) - last_slot = PARAM_REGS + (ainfo->offset / 4) + ainfo->vtsize; - else - last_slot = ainfo->reg + ainfo->size + ainfo->vtsize; break; default: return FALSE; @@ -3100,28 +3090,28 @@ mono_arch_finish_dyn_call (MonoDynCallInfo *info, guint8 *buf) *(gpointer*)ret = (gpointer)(gsize)res; break; case MONO_TYPE_I1: - *(gint8*)ret = GINT32_TO_INT8 (res); + *(gint8*)ret = GHMREG_TO_INT8 (res); break; case MONO_TYPE_U1: - *(guint8*)ret = GINT32_TO_UINT8 (res); + *(guint8*)ret = GHMREG_TO_UINT8 (res); break; case MONO_TYPE_I2: - *(gint16*)ret = GINT32_TO_INT16 (res); + *(gint16*)ret = GHMREG_TO_INT16 (res); break; case MONO_TYPE_U2: - *(guint16*)ret = GINT32_TO_UINT16 (res); + *(guint16*)ret = GHMREG_TO_UINT16 (res); break; case MONO_TYPE_I4: - *(gint32*)ret = res; + *(gint32*)ret = GHMREG_TO_INT32 (res); break; case MONO_TYPE_U4: - *(guint32*)ret = res; + *(guint32*)ret = GHMREG_TO_UINT32 (res); break; case MONO_TYPE_I8: case MONO_TYPE_U8: /* This handles endianness as well */ - ((gint32*)ret) [0] = res; - ((gint32*)ret) [1] = res2; + ((gint32*)ret) [0] = GHMREG_TO_INT32 (res); + ((gint32*)ret) [1] = GHMREG_TO_INT32 (res2); break; case MONO_TYPE_GENERICINST: if (MONO_TYPE_IS_REFERENCE (ptype)) { @@ -3169,7 +3159,7 @@ mono_arch_finish_dyn_call (MonoDynCallInfo *info, guint8 *buf) if (0 && ins->inst_true_bb->native_offset) { \ ARM_B_COND (code, (condcode), (code - cfg->native_code + ins->inst_true_bb->native_offset) & 0xffffff); \ } else { \ - mono_add_patch_info (cfg, code - cfg->native_code, MONO_PATCH_INFO_BB, ins->inst_true_bb); \ + mono_add_patch_info (cfg, GPTRDIFF_TO_INT (code - cfg->native_code), MONO_PATCH_INFO_BB, ins->inst_true_bb); \ ARM_B_COND (code, (condcode), 0); \ } @@ -3182,7 +3172,7 @@ if (0 && ins->inst_true_bb->native_offset) { \ */ #define EMIT_COND_SYSTEM_EXCEPTION_FLAGS(condcode,exc_name) \ do { \ - mono_add_patch_info (cfg, code - cfg->native_code, \ + mono_add_patch_info (cfg, GPTRDIFF_TO_INT (code - cfg->native_code), \ MONO_PATCH_INFO_EXC, exc_name); \ ARM_BL_COND (code, (condcode), 0); \ } while (0); @@ -3772,7 +3762,7 @@ emit_thunk (guint8 *code, gconstpointer target) ARM_MOV_REG_REG (code, ARMREG_PC, ARMREG_IP); *(guint32*)code = (guint32)(gsize)target; code += 4; - mono_arch_flush_icache (p, code - p); + mono_arch_flush_icache (p, GPTRDIFF_TO_INT (code - p)); } static void @@ -3866,11 +3856,11 @@ arm_patch_general (MonoCompile *cfg, guchar *code, const guchar *target) //g_print ("patching 0x%08x (0x%08x) to point to 0x%08x\n", code, ins, target); if (prim == 5) { /* 101b */ /* the diff starts 8 bytes from the branch opcode */ - gint diff = target - code - 8; + gint diff = GPTRDIFF_TO_INT (target - code - 8); gint tbits; gint tmask = 0xffffffff; if (tval & 1) { /* entering thumb mode */ - diff = target - 1 - code - 8; + diff = GPTRDIFF_TO_INT (target - 1 - code - 8); g_assert (thumb_supported); tbits = 0xf << 28; /* bl->blx bit pattern */ g_assert ((ins & (1 << 24))); /* it must be a bl, not b instruction */ @@ -4230,8 +4220,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) MonoInst *ins; MonoCallInst *call; guint8 *code = cfg->native_code + cfg->code_len; - MonoInst *last_ins = NULL; - int max_len, cpos; + int max_len; int imm8, rot_amount; /* we don't align basic blocks of loops on arm */ @@ -4239,16 +4228,14 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) if (cfg->verbose_level > 2) g_print ("Basic block %d starting at offset 0x%x\n", bb->block_num, bb->native_offset); - cpos = bb->max_offset; - if (mono_break_at_bb_method && mono_method_desc_full_match (mono_break_at_bb_method, cfg->method) && bb->block_num == mono_break_at_bb_bb_num) { - mono_add_patch_info (cfg, code - cfg->native_code, MONO_PATCH_INFO_JIT_ICALL_ID, + mono_add_patch_info (cfg, GPTRDIFF_TO_INT (code - cfg->native_code), MONO_PATCH_INFO_JIT_ICALL_ID, GUINT_TO_POINTER (MONO_JIT_ICALL_mono_break)); code = emit_call_seq (cfg, code); } MONO_BB_FOR_EACH_INS (bb, ins) { - guint offset = code - cfg->native_code; + guint offset = GPTRDIFF_TO_UINT (code - cfg->native_code); set_code_cursor (cfg, code); max_len = ins_get_size (ins->opcode); code = realloc_code (cfg, max_len); @@ -4552,7 +4539,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) //*(int*)code = 0xef9f0001; //code += 4; //ARM_DBRK (code); - mono_add_patch_info (cfg, code - cfg->native_code, MONO_PATCH_INFO_JIT_ICALL_ID, + mono_add_patch_info (cfg, GPTRDIFF_TO_INT (code - cfg->native_code), MONO_PATCH_INFO_JIT_ICALL_ID, GUINT_TO_POINTER (MONO_JIT_ICALL_mono_break)); code = emit_call_seq (cfg, code); break; @@ -4568,7 +4555,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) case OP_NOT_NULL: break; case OP_IL_SEQ_POINT: - mono_add_seq_point (cfg, bb, ins, code - cfg->native_code); + mono_add_seq_point (cfg, bb, ins, GPTRDIFF_TO_INT (code - cfg->native_code)); break; case OP_SEQ_POINT: { int i; @@ -4635,11 +4622,11 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) } } - mono_add_seq_point (cfg, bb, ins, code - cfg->native_code); + mono_add_seq_point (cfg, bb, ins, GPTRDIFF_TO_INT (code - cfg->native_code)); /* Breakpoint check */ if (cfg->compile_aot) { - const guint32 bp_offset = code - cfg->native_code; + const guint32 bp_offset = GPTRDIFF_TO_UINT32 (code - cfg->native_code); guint32 val; var = info_var; @@ -5072,7 +5059,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) if (tailcall_reg || tailcall_membase) { code = emit_jmp_reg (code, ARMREG_IP); } else { - mono_add_patch_info (cfg, (guint8*) code - cfg->native_code, MONO_PATCH_INFO_METHOD_JUMP, call_ins->method); + mono_add_patch_info (cfg, GPTRDIFF_TO_INT (code - cfg->native_code), MONO_PATCH_INFO_METHOD_JUMP, call_ins->method); if (cfg->compile_aot) { ARM_LDR_IMM (code, ARMREG_IP, ARMREG_PC, 0); @@ -5109,11 +5096,11 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) if (IS_HARD_FLOAT) code = emit_float_args (cfg, call, code, &max_len, &offset); - mono_call_add_patch_info (cfg, call, code - cfg->native_code); + mono_call_add_patch_info (cfg, call, GPTRDIFF_TO_INT (code - cfg->native_code)); code = emit_call_seq (cfg, code); ins->flags |= MONO_INST_GC_CALLSITE; - ins->backend.pc_offset = code - cfg->native_code; + ins->backend.pc_offset = GPTRDIFF_TO_INT (code - cfg->native_code); code = emit_move_return_value (cfg, ins, code); break; case OP_FCALL_REG: @@ -5128,7 +5115,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) code = emit_call_reg (code, ins->sreg1); ins->flags |= MONO_INST_GC_CALLSITE; - ins->backend.pc_offset = code - cfg->native_code; + ins->backend.pc_offset = GPTRDIFF_TO_INT (code - cfg->native_code); code = emit_move_return_value (cfg, ins, code); break; case OP_FCALL_MEMBASE: @@ -5155,7 +5142,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) ARM_LDR_IMM (code, ARMREG_PC, ins->sreg1, ins->inst_offset); } ins->flags |= MONO_INST_GC_CALLSITE; - ins->backend.pc_offset = code - cfg->native_code; + ins->backend.pc_offset = GPTRDIFF_TO_INT (code - cfg->native_code); code = emit_move_return_value (cfg, ins, code); break; } @@ -5174,7 +5161,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) /* Uninitialized case */ g_assert (ins->sreg1 == ARMREG_R0); - mono_add_patch_info (cfg, code - cfg->native_code, MONO_PATCH_INFO_JIT_ICALL_ID, + mono_add_patch_info (cfg, GPTRDIFF_TO_INT (code - cfg->native_code), MONO_PATCH_INFO_JIT_ICALL_ID, GUINT_TO_POINTER (MONO_JIT_ICALL_mono_generic_class_init)); code = emit_call_seq (cfg, code); @@ -5282,7 +5269,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) case OP_THROW: { if (ins->sreg1 != ARMREG_R0) ARM_MOV_REG_REG (code, ARMREG_R0, ins->sreg1); - mono_add_patch_info (cfg, code - cfg->native_code, MONO_PATCH_INFO_JIT_ICALL_ID, + mono_add_patch_info (cfg, GPTRDIFF_TO_INT (code - cfg->native_code), MONO_PATCH_INFO_JIT_ICALL_ID, GUINT_TO_POINTER (MONO_JIT_ICALL_mono_arch_throw_exception)); code = emit_call_seq (cfg, code); break; @@ -5290,7 +5277,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) case OP_RETHROW: { if (ins->sreg1 != ARMREG_R0) ARM_MOV_REG_REG (code, ARMREG_R0, ins->sreg1); - mono_add_patch_info (cfg, code - cfg->native_code, MONO_PATCH_INFO_JIT_ICALL_ID, + mono_add_patch_info (cfg, GPTRDIFF_TO_INT (code - cfg->native_code), MONO_PATCH_INFO_JIT_ICALL_ID, GUINT_TO_POINTER (MONO_JIT_ICALL_mono_arch_rethrow_exception)); code = emit_call_seq (cfg, code); break; @@ -5371,7 +5358,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) break; } case OP_CALL_HANDLER: - mono_add_patch_info (cfg, code - cfg->native_code, MONO_PATCH_INFO_BB, ins->inst_target_bb); + mono_add_patch_info (cfg, GPTRDIFF_TO_INT (code - cfg->native_code), MONO_PATCH_INFO_BB, ins->inst_target_bb); code = mono_arm_patchable_bl (code, ARMCOND_AL); cfg->thunk_area += THUNK_SIZE; for (GList *tmp = ins->inst_eh_blocks; tmp != bb->clause_holes; tmp = tmp->prev) @@ -5383,7 +5370,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) break; case OP_LABEL: - ins->inst_c0 = code - cfg->native_code; + ins->inst_c0 = GPTRDIFF_TO_TMREG (code - cfg->native_code); break; case OP_BR: /*if (ins->inst_target_bb->native_offset) { @@ -5933,22 +5920,22 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) case OP_GC_LIVENESS_DEF: case OP_GC_LIVENESS_USE: case OP_GC_PARAM_SLOT_LIVENESS_DEF: - ins->backend.pc_offset = code - cfg->native_code; + ins->backend.pc_offset = GPTRDIFF_TO_INT (code - cfg->native_code); break; case OP_GC_SPILL_SLOT_LIVENESS_DEF: - ins->backend.pc_offset = code - cfg->native_code; + ins->backend.pc_offset = GPTRDIFF_TO_INT (code - cfg->native_code); bb->spill_slot_defs = g_slist_prepend_mempool (cfg->mempool, bb->spill_slot_defs, ins); break; case OP_LIVERANGE_START: { if (cfg->verbose_level > 1) printf ("R%d START=0x%x\n", MONO_VARINFO (cfg, ins->inst_c0)->vreg, (int)(code - cfg->native_code)); - MONO_VARINFO (cfg, ins->inst_c0)->live_range_start = code - cfg->native_code; + MONO_VARINFO (cfg, ins->inst_c0)->live_range_start = GPTRDIFF_TO_INT32 (code - cfg->native_code); break; } case OP_LIVERANGE_END: { if (cfg->verbose_level > 1) printf ("R%d END=0x%x\n", MONO_VARINFO (cfg, ins->inst_c0)->vreg, (int)(code - cfg->native_code)); - MONO_VARINFO (cfg, ins->inst_c0)->live_range_end = code - cfg->native_code; + MONO_VARINFO (cfg, ins->inst_c0)->live_range_end = GPTRDIFF_TO_INT32 (code - cfg->native_code); break; } case OP_GC_SAFE_POINT: { @@ -5958,7 +5945,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) ARM_CMP_REG_IMM (code, ARMREG_IP, 0, 0); buf [0] = code; ARM_B_COND (code, ARMCOND_EQ, 0); - mono_add_patch_info (cfg, code - cfg->native_code, MONO_PATCH_INFO_JIT_ICALL_ID, GUINT_TO_POINTER (MONO_JIT_ICALL_mono_threads_state_poll)); + mono_add_patch_info (cfg, GPTRDIFF_TO_INT (code - cfg->native_code), MONO_PATCH_INFO_JIT_ICALL_ID, GUINT_TO_POINTER (MONO_JIT_ICALL_mono_threads_state_poll)); code = emit_call_seq (cfg, code); arm_patch (buf [0], code); break; @@ -5978,10 +5965,6 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) mono_inst_name (ins->opcode), max_len, code - cfg->native_code - offset); g_assert_not_reached (); } - - cpos += max_len; - - last_ins = ins; } set_code_cursor (cfg, code); @@ -6240,8 +6223,8 @@ mono_arch_emit_prolog (MonoCompile *cfg) ARM_STR_REG_REG (code, MONO_ARCH_RGCTX_REG, ins->inst_basereg, ARMREG_LR); } - mono_add_var_location (cfg, cfg->rgctx_var, TRUE, MONO_ARCH_RGCTX_REG, 0, 0, code - cfg->native_code); - mono_add_var_location (cfg, cfg->rgctx_var, FALSE, ins->inst_basereg, ins->inst_offset, code - cfg->native_code, 0); + mono_add_var_location (cfg, cfg->rgctx_var, TRUE, MONO_ARCH_RGCTX_REG, 0, 0, GPTRDIFF_TO_INT (code - cfg->native_code)); + mono_add_var_location (cfg, cfg->rgctx_var, FALSE, ins->inst_basereg, ins->inst_offset, GPTRDIFF_TO_INT (code - cfg->native_code), 0); } /* load arguments allocated to register from the stack */ @@ -6294,8 +6277,8 @@ mono_arch_emit_prolog (MonoCompile *cfg) if (i == 0 && sig->hasthis) { g_assert (ainfo->storage == RegTypeGeneral); - mono_add_var_location (cfg, inst, TRUE, ainfo->reg, 0, 0, code - cfg->native_code); - mono_add_var_location (cfg, inst, TRUE, inst->dreg, 0, code - cfg->native_code, 0); + mono_add_var_location (cfg, inst, TRUE, ainfo->reg, 0, 0, GPTRDIFF_TO_INT (code - cfg->native_code)); + mono_add_var_location (cfg, inst, TRUE, inst->dreg, 0, GPTRDIFF_TO_INT (code - cfg->native_code), 0); } if (cfg->verbose_level > 2) @@ -6356,8 +6339,8 @@ mono_arch_emit_prolog (MonoCompile *cfg) } if (i == 0 && sig->hasthis) { g_assert (ainfo->storage == RegTypeGeneral); - mono_add_var_location (cfg, inst, TRUE, ainfo->reg, 0, 0, code - cfg->native_code); - mono_add_var_location (cfg, inst, FALSE, inst->inst_basereg, inst->inst_offset, code - cfg->native_code, 0); + mono_add_var_location (cfg, inst, TRUE, ainfo->reg, 0, 0, GPTRDIFF_TO_INT (code - cfg->native_code)); + mono_add_var_location (cfg, inst, FALSE, inst->inst_basereg, inst->inst_offset, GPTRDIFF_TO_INT (code - cfg->native_code), 0); } break; case RegTypeBaseGen: @@ -6451,10 +6434,8 @@ mono_arch_emit_prolog (MonoCompile *cfg) } case RegTypeStructByVal: { int doffset = inst->inst_offset; - int soffset = 0; + //int soffset = 0; int cur_reg; - int size = 0; - size = mini_type_stack_size_full (inst->inst_vtype, NULL, sig->pinvoke && !sig->marshalling_disabled); for (cur_reg = 0; cur_reg < ainfo->size; ++cur_reg) { if (arm_is_imm12 (doffset)) { ARM_STR_IMM (code, ainfo->reg + cur_reg, inst->inst_basereg, doffset); @@ -6462,7 +6443,7 @@ mono_arch_emit_prolog (MonoCompile *cfg) code = mono_arm_emit_load_imm (code, ARMREG_IP, doffset); ARM_STR_REG_REG (code, ainfo->reg + cur_reg, inst->inst_basereg, ARMREG_IP); } - soffset += sizeof (target_mgreg_t); + //soffset += sizeof (target_mgreg_t); doffset += sizeof (target_mgreg_t); } if (ainfo->vtsize) { @@ -6486,7 +6467,7 @@ mono_arch_emit_prolog (MonoCompile *cfg) MonoInst *ins = cfg->arch.seq_point_info_var; /* Initialize the variable from a GOT slot */ - mono_add_patch_info (cfg, code - cfg->native_code, MONO_PATCH_INFO_SEQ_POINT_INFO, cfg->method); + mono_add_patch_info (cfg, GPTRDIFF_TO_INT (code - cfg->native_code), MONO_PATCH_INFO_SEQ_POINT_INFO, cfg->method); ARM_LDR_IMM (code, ARMREG_R0, ARMREG_PC, 0); ARM_B (code, 0); *(gpointer*)code = NULL; @@ -6762,7 +6743,7 @@ mono_arch_emit_exceptions (MonoCompile *cfg) ARM_LDR_IMM (code, ARMREG_R0, ARMREG_PC, 0); patch_info->type = MONO_PATCH_INFO_JIT_ICALL_ID; patch_info->data.jit_icall_id = MONO_JIT_ICALL_mono_arch_throw_corlib_exception; - patch_info->ip.i = code - cfg->native_code; + patch_info->ip.i = GPTRDIFF_TO_INT (code - cfg->native_code); ARM_BL (code, 0); cfg->thunk_area += THUNK_SIZE; *(guint32*)(gpointer)code = m_class_get_type_token (exc_class) - MONO_TOKEN_TYPE_DEF; @@ -7088,7 +7069,7 @@ mono_arch_build_imt_trampoline (MonoVTable *vtable, MonoIMTCheckItem **imt_entri mono_arch_flush_icache ((guint8*)start, size); MONO_PROFILER_RAISE (jit_code_buffer, ((guint8*)start, code - start, MONO_PROFILER_CODE_BUFFER_IMT_TRAMPOLINE, NULL)); - UnlockedAdd (&mono_stats.imt_trampolines_size, code - start); + UnlockedAdd (&mono_stats.imt_trampolines_size, GPTRDIFF_TO_INT32 (code - start)); g_assert (DISTANCE (start, code) <= size); @@ -7438,7 +7419,7 @@ static G_GNUC_UNUSED guint8* emit_aotconst (MonoCompile *cfg, guint8 *code, int dreg, int patch_type, gpointer data) { /* OP_AOTCONST */ - mono_add_patch_info (cfg, code - cfg->native_code, (MonoJumpInfoType)patch_type, data); + mono_add_patch_info (cfg, GPTRDIFF_TO_INT (code - cfg->native_code), (MonoJumpInfoType)patch_type, data); ARM_LDR_IMM (code, dreg, ARMREG_PC, 0); ARM_B (code, 0); *(gpointer*)code = NULL; @@ -7453,7 +7434,7 @@ mono_arm_emit_aotconst (gpointer ji_list, guint8 *code, guint8 *buf, int dreg, i { MonoJumpInfo **ji = (MonoJumpInfo**)ji_list; - *ji = mono_patch_info_list_prepend (*ji, code - buf, (MonoJumpInfoType)patch_type, data); + *ji = mono_patch_info_list_prepend (*ji, GPTRDIFF_TO_INT (code - buf), (MonoJumpInfoType)patch_type, data); ARM_LDR_IMM (code, dreg, ARMREG_PC, 0); ARM_B (code, 0); *(gpointer*)code = NULL; diff --git a/src/mono/mono/mini/mini-arm64.c b/src/mono/mono/mini/mini-arm64.c index 3ce2c9101f1a2c..11789395ab1d65 100644 --- a/src/mono/mono/mini/mini-arm64.c +++ b/src/mono/mono/mini/mini-arm64.c @@ -94,6 +94,13 @@ MONO_DISABLE_WARNING(4334) #define FP_TEMP_REG2 ARMREG_D17 #define NEON_TMP_REG FP_TEMP_REG +#define STPX_MIN_OFFSET (-512) +#define STPX_MAX_OFFSET (504) +#define STPW_MIN_OFFSET (-256) +#define STPW_MAX_OFFSET (252) + +#define IS_VALID_STPX_OFFSET(o) ((o) >= STPX_MIN_OFFSET && (o) <= (STPX_MAX_OFFSET)) + #define THUNK_SIZE (4 * 4) /* The single step trampoline */ @@ -199,10 +206,10 @@ get_delegate_invoke_impl (gboolean has_target, gboolean param_count, guint32 *co g_assert ((code - start) <= size); } - MINI_END_CODEGEN (start, code - start, MONO_PROFILER_CODE_BUFFER_DELEGATE_INVOKE, NULL); + MINI_END_CODEGEN (start, GPTRDIFF_TO_INT (code - start), MONO_PROFILER_CODE_BUFFER_DELEGATE_INVOKE, NULL); if (code_size) - *code_size = code - start; + *code_size = GPTRDIFF_TO_UINT32 (code - start); return MINI_ADDR_TO_FTNPTR (start); } @@ -241,7 +248,7 @@ get_delegate_virtual_invoke_impl (MonoTrampInfo **info, gboolean load_imt_reg, i g_assert ((code - start) <= size); - MINI_END_CODEGEN (start, code - start, MONO_PROFILER_CODE_BUFFER_DELEGATE_INVOKE, NULL); + MINI_END_CODEGEN (start, GPTRDIFF_TO_INT (code - start), MONO_PROFILER_CODE_BUFFER_DELEGATE_INVOKE, NULL); tramp_name = mono_get_delegate_virtual_invoke_impl_name (load_imt_reg, offset); *info = mono_tramp_info_create (tramp_name, start, GPTRDIFF_TO_UINT32 (code - start), NULL, unwind_ops); @@ -1054,11 +1061,11 @@ static guint8* emit_call (MonoCompile *cfg, guint8* code, MonoJumpInfoType patch_type, gconstpointer data) { /* - mono_add_patch_info_rel (cfg, code - cfg->native_code, patch_type, data, MONO_R_ARM64_IMM); + mono_add_patch_info_rel (cfg, GPTRDIFF_TO_INT (code - cfg->native_code), patch_type, data, MONO_R_ARM64_IMM); code = emit_imm64_template (code, ARMREG_LR); arm_blrx (code, ARMREG_LR); */ - mono_add_patch_info_rel (cfg, code - cfg->native_code, patch_type, data, MONO_R_ARM64_BL); + mono_add_patch_info_rel (cfg, GPTRDIFF_TO_INT (code - cfg->native_code), patch_type, data, MONO_R_ARM64_BL); arm_bl (code, code); cfg->thunk_area += THUNK_SIZE; return code; @@ -1068,9 +1075,9 @@ static guint8* emit_aotconst_full (MonoCompile *cfg, MonoJumpInfo **ji, guint8 *code, guint8 *start, int dreg, guint32 patch_type, gconstpointer data) { if (cfg) - mono_add_patch_info (cfg, code - cfg->native_code, (MonoJumpInfoType)patch_type, data); + mono_add_patch_info (cfg, GPTRDIFF_TO_INT (code - cfg->native_code), (MonoJumpInfoType)patch_type, data); else - *ji = mono_patch_info_list_prepend (*ji, code - start, (MonoJumpInfoType)patch_type, data); + *ji = mono_patch_info_list_prepend (*ji, GPTRDIFF_TO_INT (code - start), (MonoJumpInfoType)patch_type, data); /* See arch_emit_got_access () in aot-compiler.c */ arm_ldrx_lit (code, dreg, 0); arm_nop (code); @@ -1185,7 +1192,7 @@ emit_thunk (guint8 *code, gconstpointer target) *(guint64*)code = (guint64)target; code += sizeof (guint64); - mono_arch_flush_icache (p, code - p); + mono_arch_flush_icache (p, GPTRDIFF_TO_INT (code - p)); return code; } @@ -2329,10 +2336,10 @@ mono_arch_finish_dyn_call (MonoDynCallInfo *info, guint8 *buf) *(guint16*)ret = GHMREG_TO_UINT16 (res); break; case MONO_TYPE_I4: - *(gint32*)ret = res; + *(gint32*)ret = GHMREG_TO_INT32 (res); break; case MONO_TYPE_U4: - *(guint32*)ret = res; + *(guint32*)ret = GHMREG_TO_UINT32 (res); break; case MONO_TYPE_I8: case MONO_TYPE_U8: @@ -3508,7 +3515,7 @@ emit_cond_exc (MonoCompile *cfg, guint8 *code, int opcode, const char *exc_name) cond = opcode_to_armcond (opcode); /* Capture PC */ arm_adrx (code, ARMREG_IP1, code); - mono_add_patch_info_rel (cfg, code - cfg->native_code, MONO_PATCH_INFO_EXC, exc_name, MONO_R_ARM64_BCC); + mono_add_patch_info_rel (cfg, GPTRDIFF_TO_INT (code - cfg->native_code), MONO_PATCH_INFO_EXC, exc_name, MONO_R_ARM64_BCC); arm_bcc (code, cond, 0); return code; } @@ -3545,9 +3552,17 @@ emit_move_return_value (MonoCompile *cfg, guint8 * code, MonoInst *ins) /* Load the destination address */ g_assert (loc && loc->opcode == OP_REGOFFSET); - code = emit_ldrx (code, ARMREG_LR, loc->inst_basereg, loc->inst_offset); - for (i = 0; i < cinfo->ret.nregs; ++i) - arm_strx (code, cinfo->ret.reg + i, ARMREG_LR, i * 8); + code = emit_ldrx (code, ARMREG_LR, loc->inst_basereg, GTMREG_TO_INT (loc->inst_offset)); + for (i = 0; i < cinfo->ret.nregs; ++i) { + int offs = i * 8; + // emit a pair of str as one stp + if (i+1 < cinfo->ret.nregs && IS_VALID_STPX_OFFSET (offs)) { + arm_stpx (code, cinfo->ret.reg + i, cinfo->ret.reg + i + 1, ARMREG_LR, offs); + i++; + } else { + arm_strx (code, cinfo->ret.reg + i, ARMREG_LR, offs); + } + } break; } case ArgHFA: { @@ -3556,7 +3571,7 @@ emit_move_return_value (MonoCompile *cfg, guint8 * code, MonoInst *ins) /* Load the destination address */ g_assert (loc && loc->opcode == OP_REGOFFSET); - code = emit_ldrx (code, ARMREG_LR, loc->inst_basereg, loc->inst_offset); + code = emit_ldrx (code, ARMREG_LR, loc->inst_basereg, GTMREG_TO_INT (loc->inst_offset)); for (i = 0; i < cinfo->ret.nregs; ++i) { if (cinfo->ret.esize == 4) arm_strfpw (code, cinfo->ret.reg + i, ARMREG_LR, cinfo->ret.foffsets [i]); @@ -3628,7 +3643,7 @@ emit_branch_island (MonoCompile *cfg, guint8 *code, int start_offset) /* Rewrite the cond branch so it branches to an unconditional branch in the branch island */ arm_patch_rel (cfg->native_code + ji->ip.i, code, ji->relocation); /* Rewrite the patch so it points to the unconditional branch */ - ji->ip.i = code - cfg->native_code; + ji->ip.i = GPTRDIFF_TO_INT (code - cfg->native_code); ji->relocation = MONO_R_ARM64_B; arm_b (code, code); } @@ -3650,11 +3665,11 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) if (cfg->verbose_level > 2) g_print ("Basic block %d starting at offset 0x%x\n", bb->block_num, bb->native_offset); - start_offset = code - cfg->native_code; + start_offset = GPTRDIFF_TO_INT (code - cfg->native_code); g_assert (GINT_TO_UINT(start_offset) <= cfg->code_size); MONO_BB_FOR_EACH_INS (bb, ins) { - guint offset = code - cfg->native_code; + guint offset = GPTRDIFF_TO_UINT (code - cfg->native_code); set_code_cursor (cfg, code); max_len = ins_get_size (ins->opcode); code = realloc_code (cfg, max_len); @@ -3662,7 +3677,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) if (G_UNLIKELY (cfg->arch.cond_branch_islands && offset - start_offset > 4 * 0x1ffff)) { /* Emit a branch island for large basic blocks */ code = emit_branch_island (cfg, code, start_offset); - offset = code - cfg->native_code; + offset = GPTRDIFF_TO_UINT (code - cfg->native_code); start_offset = offset; } @@ -3699,7 +3714,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) manual_instruction_emit: switch (ins->opcode) { case OP_ICONST: - code = emit_imm (code, dreg, ins->inst_c0); + code = emit_imm (code, dreg, GTMREG_TO_INT (ins->inst_c0)); break; case OP_I8CONST: code = emit_imm64 (code, dreg, ins->inst_c0); @@ -3801,7 +3816,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) g_assert (var->opcode == OP_REGOFFSET); /* Load ss_tramp_var */ /* This is equal to &ss_trampoline */ - arm_ldrx (code, ARMREG_IP1, var->inst_basereg, var->inst_offset); + arm_ldrx (code, ARMREG_IP1, var->inst_basereg, GTMREG_TO_INT (var->inst_offset)); /* Load the trampoline address */ arm_ldrx (code, ARMREG_IP1, ARMREG_IP1, 0); /* Call it if it is non-null */ @@ -3809,13 +3824,13 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) code = mono_arm_emit_blrx (code, ARMREG_IP1); } - mono_add_seq_point (cfg, bb, ins, code - cfg->native_code); + mono_add_seq_point (cfg, bb, ins, GPTRDIFF_TO_INT (code - cfg->native_code)); if (cfg->compile_aot) { - const guint32 bp_tramp_offset = code - cfg->native_code; + const guint32 bp_tramp_offset = GPTRDIFF_TO_UINT32 (code - cfg->native_code); guint32 val; - arm_ldrx (code, ARMREG_IP1, info_var->inst_basereg, info_var->inst_offset); + arm_ldrx (code, ARMREG_IP1, info_var->inst_basereg, GTMREG_TO_INT (info_var->inst_offset)); /* Add the bp_tramp_offset */ val = ((bp_tramp_offset / 4) * sizeof (target_mgreg_t)) + MONO_STRUCT_OFFSET (SeqPointInfo, bp_addrs); /* Load the info->bp_addrs [bp_tramp_offset], which is either 0 or the address of the bp trampoline */ @@ -3830,7 +3845,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) g_assert (var); g_assert (var->opcode == OP_REGOFFSET); /* Load the address of the bp trampoline into IP0 */ - arm_ldrx (code, ARMREG_IP0, var->inst_basereg, var->inst_offset); + arm_ldrx (code, ARMREG_IP0, var->inst_basereg, GTMREG_TO_INT (var->inst_offset)); /* * A placeholder for a possible breakpoint inserted by * mono_arch_set_breakpoint (). @@ -3912,31 +3927,34 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) break; } case OP_ARM64_BROADCAST_ELEM: - arm_neon_smov (code, TYPE_I32, ARMREG_IP0, sreg1, ins->inst_c0); + arm_neon_smov (code, TYPE_I32, ARMREG_IP0, sreg1, GTMREG_TO_UINT32 (ins->inst_c0)); arm_neon_dup_g_4s (code, dreg, ARMREG_IP0); break; case OP_XZERO: - arm_neon_eor_16b (code, dreg, dreg, dreg); + if (ins->klass && mono_class_value_size (ins->klass, NULL) == 8) + arm_neon_eor_8b (code, dreg, dreg, dreg); + else + arm_neon_eor_16b (code, dreg, dreg, dreg); break; case OP_XONES: arm_neon_eor_16b (code, dreg, dreg, dreg); arm_neon_not_16b (code, dreg, dreg); break; case OP_XEXTRACT: - code = emit_xextract (code, VREG_FULL, ins->inst_c0, dreg, sreg1); + code = emit_xextract (code, (ins->inst_c1 == 8) ? VREG_LOW : VREG_FULL, GTMREG_TO_INT (ins->inst_c0), dreg, sreg1); break; case OP_STOREX_MEMBASE: if (ins->klass && mono_class_value_size (ins->klass, NULL) == 8) - code = emit_strfpx (code, sreg1, dreg, ins->inst_offset); + code = emit_strfpx (code, sreg1, dreg, GTMREG_TO_INT (ins->inst_offset)); else - code = emit_strfpq (code, sreg1, dreg, ins->inst_offset); + code = emit_strfpq (code, sreg1, dreg, GTMREG_TO_INT (ins->inst_offset)); break; case OP_LOADX_MEMBASE: if (ins->klass && mono_class_value_size (ins->klass, NULL) == 8) - code = emit_ldrfpx (code, dreg, sreg1, ins->inst_offset); + code = emit_ldrfpx (code, dreg, sreg1, GTMREG_TO_INT (ins->inst_offset)); else - code = emit_ldrfpq (code, dreg, sreg1, ins->inst_offset); + code = emit_ldrfpq (code, dreg, sreg1, GTMREG_TO_INT (ins->inst_offset)); break; case OP_XMOVE: if(dreg != sreg1) @@ -3966,7 +3984,10 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) case OP_EXPAND_R4: case OP_EXPAND_R8: { const int t = get_type_size_macro (ins->inst_c1); - arm_neon_fdup_e (code, VREG_FULL, t, dreg, sreg1, 0); + if (ins->opcode == OP_EXPAND_R8) + arm_neon_fdup_e (code, VREG_FULL, t, dreg, sreg1, 0); + else + arm_neon_fdup_e (code, get_vector_size_macro (ins), t, dreg, sreg1, 0); break; } case OP_EXTRACT_I1: @@ -3976,9 +3997,9 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) const int t = get_type_size_macro (ins->inst_c1); // smov is not defined for i64 if (is_type_unsigned_macro (ins->inst_c1) || t == TYPE_I64) { - arm_neon_umov (code, t, dreg, sreg1, ins->inst_c0); + arm_neon_umov (code, t, dreg, sreg1, GTMREG_TO_UINT32 (ins->inst_c0)); } else { - arm_neon_smov (code, t, dreg, sreg1, ins->inst_c0); + arm_neon_smov (code, t, dreg, sreg1, GTMREG_TO_UINT32 (ins->inst_c0)); } break; } @@ -3989,7 +4010,8 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) // Technically, this broadcasts element #inst_c0 to all dest XREG elements; whereas it should // set the FREG to the said element. Since FREG and XREG pool is the same on arm64 and the rest // of the F/XREG is ignored in FREG mode, this operation remains valid. - arm_neon_fdup_e (code, VREG_FULL, t, dreg, sreg1, ins->inst_c0); + // FIXME: pass VREG_LOW for 64-bit vectors + arm_neon_fdup_e (code, VREG_FULL, t, dreg, sreg1, GTMREG_TO_UINT32 (ins->inst_c0)); } break; @@ -4028,7 +4050,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) if (dreg != sreg1) arm_neon_mov (code, dreg, sreg1); - arm_neon_ins_g(code, t, dreg, sreg2, ins->inst_c0); + arm_neon_ins_g(code, t, dreg, sreg2, GTMREG_TO_UINT32 (ins->inst_c0)); break; } case OP_INSERT_R4: @@ -4046,15 +4068,15 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) if (dreg != sreg1) { if (dreg != sreg2) { arm_neon_mov (code, dreg, sreg1); - arm_neon_ins_e(code, t, dreg, sreg2, ins->inst_c0, 0); + arm_neon_ins_e(code, t, dreg, sreg2, GTMREG_TO_UINT32 (ins->inst_c0), 0); } else { arm_neon_mov (code, NEON_TMP_REG, sreg1); - arm_neon_ins_e(code, t, NEON_TMP_REG, sreg2, ins->inst_c0, 0); + arm_neon_ins_e(code, t, NEON_TMP_REG, sreg2, GTMREG_TO_UINT32 (ins->inst_c0), 0); arm_neon_mov (code, dreg, NEON_TMP_REG); } } else { g_assert (dreg != sreg2); - arm_neon_ins_e(code, t, dreg, sreg2, ins->inst_c0, 0); + arm_neon_ins_e(code, t, dreg, sreg2, GTMREG_TO_UINT32 (ins->inst_c0), 0); } break; } @@ -4083,17 +4105,19 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) case OP_ARM64_XADDV: { switch (ins->inst_c0) { - case INTRINS_AARCH64_ADV_SIMD_FADDV: + case INTRINS_AARCH64_ADV_SIMD_FADDV: { + const int width = get_vector_size_macro (ins); if (ins->inst_c1 == MONO_TYPE_R8) { arm_neon_faddp (code, VREG_FULL, TYPE_F64, dreg, sreg1, sreg1); } else if (ins->inst_c1 == MONO_TYPE_R4) { - arm_neon_faddp (code, VREG_FULL, TYPE_F32, dreg, sreg1, sreg1); - arm_neon_faddp (code, VREG_FULL, TYPE_F32, dreg, dreg, dreg); + arm_neon_faddp (code, width, TYPE_F32, dreg, sreg1, sreg1); + if (width == VREG_FULL) + arm_neon_faddp (code, width, TYPE_F32, dreg, dreg, dreg); } else { g_assert_not_reached (); } break; - + } case INTRINS_AARCH64_ADV_SIMD_UADDV: case INTRINS_AARCH64_ADV_SIMD_SADDV: if (get_type_size_macro (ins->inst_c1) == TYPE_I64) @@ -4234,7 +4258,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) case OP_FBLE_UN: mono_add_patch_info_rel (cfg, offset, MONO_PATCH_INFO_BB, ins->inst_true_bb, MONO_R_ARM64_BCC); arm_bcc (code, ARMCOND_EQ, 0); - mono_add_patch_info_rel (cfg, code - cfg->native_code, MONO_PATCH_INFO_BB, ins->inst_true_bb, MONO_R_ARM64_BCC); + mono_add_patch_info_rel (cfg, GPTRDIFF_TO_INT (code - cfg->native_code), MONO_PATCH_INFO_BB, ins->inst_true_bb, MONO_R_ARM64_BCC); /* For fp compares, ARMCOND_LT is lt or unordered */ arm_bcc (code, ARMCOND_LT, 0); break; @@ -4320,39 +4344,39 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) arm_cmpx (code, sreg1, sreg2); break; case OP_IADD_IMM: - code = emit_addw_imm (code, dreg, sreg1, imm); + code = emit_addw_imm (code, dreg, sreg1, GTMREG_TO_INT (imm)); break; case OP_LADD_IMM: case OP_ADD_IMM: - code = emit_addx_imm (code, dreg, sreg1, imm); + code = emit_addx_imm (code, dreg, sreg1, GTMREG_TO_INT (imm)); break; case OP_ISUB_IMM: - code = emit_subw_imm (code, dreg, sreg1, imm); + code = emit_subw_imm (code, dreg, sreg1, GTMREG_TO_INT (imm)); break; case OP_LSUB_IMM: - code = emit_subx_imm (code, dreg, sreg1, imm); + code = emit_subx_imm (code, dreg, sreg1, GTMREG_TO_INT (imm)); break; case OP_IAND_IMM: - code = emit_andw_imm (code, dreg, sreg1, imm); + code = emit_andw_imm (code, dreg, sreg1, GTMREG_TO_INT (imm)); break; case OP_LAND_IMM: case OP_AND_IMM: - code = emit_andx_imm (code, dreg, sreg1, imm); + code = emit_andx_imm (code, dreg, sreg1, GTMREG_TO_INT (imm)); break; case OP_IOR_IMM: - code = emit_orrw_imm (code, dreg, sreg1, imm); + code = emit_orrw_imm (code, dreg, sreg1, GTMREG_TO_INT (imm)); break; case OP_LOR_IMM: - code = emit_orrx_imm (code, dreg, sreg1, imm); + code = emit_orrx_imm (code, dreg, sreg1, GTMREG_TO_INT (imm)); break; case OP_IXOR_IMM: - code = emit_eorw_imm (code, dreg, sreg1, imm); + code = emit_eorw_imm (code, dreg, sreg1, GTMREG_TO_INT (imm)); break; case OP_LXOR_IMM: - code = emit_eorx_imm (code, dreg, sreg1, imm); + code = emit_eorx_imm (code, dreg, sreg1, GTMREG_TO_INT (imm)); break; case OP_ICOMPARE_IMM: - code = emit_cmpw_imm (code, sreg1, imm); + code = emit_cmpw_imm (code, sreg1, GTMREG_TO_INT (imm)); break; case OP_LCOMPARE_IMM: case OP_COMPARE_IMM: @@ -4399,27 +4423,27 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) if (imm == 0) arm_movx (code, dreg, sreg1); else - arm_asrw (code, dreg, sreg1, imm); + arm_asrw (code, dreg, sreg1, GTMREG_TO_UINT32 (imm)); break; case OP_LSHR_IMM: case OP_SHR_IMM: if (imm == 0) arm_movx (code, dreg, sreg1); else - arm_asrx (code, dreg, sreg1, imm); + arm_asrx (code, dreg, sreg1, GTMREG_TO_UINT32 (imm)); break; case OP_ISHR_UN_IMM: if (imm == 0) arm_movx (code, dreg, sreg1); else - arm_lsrw (code, dreg, sreg1, imm); + arm_lsrw (code, dreg, sreg1, GTMREG_TO_UINT32 (imm)); break; case OP_SHR_UN_IMM: case OP_LSHR_UN_IMM: if (imm == 0) arm_movx (code, dreg, sreg1); else - arm_lsrx (code, dreg, sreg1, imm); + arm_lsrx (code, dreg, sreg1, GTMREG_TO_UINT32 (imm)); break; /* 64BIT ALU */ @@ -4508,12 +4532,12 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) arm_mulx (code, dreg, sreg1, sreg2); break; case OP_IMUL_IMM: - code = emit_imm (code, ARMREG_LR, imm); + code = emit_imm (code, ARMREG_LR, GTMREG_TO_INT (imm)); arm_mulw (code, dreg, sreg1, ARMREG_LR); break; case OP_MUL_IMM: case OP_LMUL_IMM: - code = emit_imm (code, ARMREG_LR, imm); + code = emit_imm (code, ARMREG_LR, GTMREG_TO_INT (imm)); arm_mulx (code, dreg, sreg1, ARMREG_LR); break; @@ -4580,26 +4604,26 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) /* MEMORY */ case OP_LOADI1_MEMBASE: - code = emit_ldrsbx (code, dreg, ins->inst_basereg, ins->inst_offset); + code = emit_ldrsbx (code, dreg, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset)); break; case OP_LOADU1_MEMBASE: - code = emit_ldrb (code, dreg, ins->inst_basereg, ins->inst_offset); + code = emit_ldrb (code, dreg, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset)); break; case OP_LOADI2_MEMBASE: - code = emit_ldrshx (code, dreg, ins->inst_basereg, ins->inst_offset); + code = emit_ldrshx (code, dreg, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset)); break; case OP_LOADU2_MEMBASE: - code = emit_ldrh (code, dreg, ins->inst_basereg, ins->inst_offset); + code = emit_ldrh (code, dreg, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset)); break; case OP_LOADI4_MEMBASE: - code = emit_ldrswx (code, dreg, ins->inst_basereg, ins->inst_offset); + code = emit_ldrswx (code, dreg, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset)); break; case OP_LOADU4_MEMBASE: - code = emit_ldrw (code, dreg, ins->inst_basereg, ins->inst_offset); + code = emit_ldrw (code, dreg, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset)); break; case OP_LOAD_MEMBASE: case OP_LOADI8_MEMBASE: - code = emit_ldrx (code, dreg, ins->inst_basereg, ins->inst_offset); + code = emit_ldrx (code, dreg, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset)); break; case OP_STOREI1_MEMBASE_IMM: case OP_STOREI2_MEMBASE_IMM: @@ -4609,7 +4633,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) int immreg; if (imm != 0) { - code = emit_imm (code, ARMREG_LR, imm); + code = emit_imm (code, ARMREG_LR, GTMREG_TO_INT (imm)); immreg = ARMREG_LR; } else { immreg = ARMREG_RZR; @@ -4617,17 +4641,17 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) switch (ins->opcode) { case OP_STOREI1_MEMBASE_IMM: - code = emit_strb (code, immreg, ins->inst_destbasereg, ins->inst_offset); + code = emit_strb (code, immreg, ins->inst_destbasereg, GTMREG_TO_INT (ins->inst_offset)); break; case OP_STOREI2_MEMBASE_IMM: - code = emit_strh (code, immreg, ins->inst_destbasereg, ins->inst_offset); + code = emit_strh (code, immreg, ins->inst_destbasereg, GTMREG_TO_INT (ins->inst_offset)); break; case OP_STOREI4_MEMBASE_IMM: - code = emit_strw (code, immreg, ins->inst_destbasereg, ins->inst_offset); + code = emit_strw (code, immreg, ins->inst_destbasereg, GTMREG_TO_INT (ins->inst_offset)); break; case OP_STORE_MEMBASE_IMM: case OP_STOREI8_MEMBASE_IMM: - code = emit_strx (code, immreg, ins->inst_destbasereg, ins->inst_offset); + code = emit_strx (code, immreg, ins->inst_destbasereg, GTMREG_TO_INT (ins->inst_offset)); break; default: g_assert_not_reached (); @@ -4636,23 +4660,23 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) break; } case OP_STOREI1_MEMBASE_REG: - code = emit_strb (code, sreg1, ins->inst_destbasereg, ins->inst_offset); + code = emit_strb (code, sreg1, ins->inst_destbasereg, GTMREG_TO_INT (ins->inst_offset)); break; case OP_STOREI2_MEMBASE_REG: - code = emit_strh (code, sreg1, ins->inst_destbasereg, ins->inst_offset); + code = emit_strh (code, sreg1, ins->inst_destbasereg, GTMREG_TO_INT (ins->inst_offset)); break; case OP_STOREI4_MEMBASE_REG: - code = emit_strw (code, sreg1, ins->inst_destbasereg, ins->inst_offset); + code = emit_strw (code, sreg1, ins->inst_destbasereg, GTMREG_TO_INT (ins->inst_offset)); break; case OP_STORE_MEMBASE_REG: case OP_STOREI8_MEMBASE_REG: - code = emit_strx (code, sreg1, ins->inst_destbasereg, ins->inst_offset); + code = emit_strx (code, sreg1, ins->inst_destbasereg, GTMREG_TO_INT (ins->inst_offset)); break; case OP_TLS_GET: - code = emit_tls_get (code, dreg, ins->inst_offset); + code = emit_tls_get (code, dreg, GTMREG_TO_INT (ins->inst_offset)); break; case OP_TLS_SET: - code = emit_tls_set (code, sreg1, ins->inst_offset); + code = emit_tls_set (code, sreg1, GTMREG_TO_INT (ins->inst_offset)); break; /* Atomic */ case OP_MEMORY_BARRIER: @@ -4742,7 +4766,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) break; } case OP_ATOMIC_LOAD_I1: { - code = emit_addx_imm (code, ARMREG_LR, ins->inst_basereg, ins->inst_offset); + code = emit_addx_imm (code, ARMREG_LR, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset)); if (ins->backend.memory_barrier_kind == MONO_MEMORY_BARRIER_SEQ) arm_dmb (code, ARM_DMB_ISH); arm_ldarb (code, ins->dreg, ARMREG_LR); @@ -4750,7 +4774,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) break; } case OP_ATOMIC_LOAD_U1: { - code = emit_addx_imm (code, ARMREG_LR, ins->inst_basereg, ins->inst_offset); + code = emit_addx_imm (code, ARMREG_LR, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset)); if (ins->backend.memory_barrier_kind == MONO_MEMORY_BARRIER_SEQ) arm_dmb (code, ARM_DMB_ISH); arm_ldarb (code, ins->dreg, ARMREG_LR); @@ -4758,7 +4782,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) break; } case OP_ATOMIC_LOAD_I2: { - code = emit_addx_imm (code, ARMREG_LR, ins->inst_basereg, ins->inst_offset); + code = emit_addx_imm (code, ARMREG_LR, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset)); if (ins->backend.memory_barrier_kind == MONO_MEMORY_BARRIER_SEQ) arm_dmb (code, ARM_DMB_ISH); arm_ldarh (code, ins->dreg, ARMREG_LR); @@ -4766,7 +4790,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) break; } case OP_ATOMIC_LOAD_U2: { - code = emit_addx_imm (code, ARMREG_LR, ins->inst_basereg, ins->inst_offset); + code = emit_addx_imm (code, ARMREG_LR, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset)); if (ins->backend.memory_barrier_kind == MONO_MEMORY_BARRIER_SEQ) arm_dmb (code, ARM_DMB_ISH); arm_ldarh (code, ins->dreg, ARMREG_LR); @@ -4774,7 +4798,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) break; } case OP_ATOMIC_LOAD_I4: { - code = emit_addx_imm (code, ARMREG_LR, ins->inst_basereg, ins->inst_offset); + code = emit_addx_imm (code, ARMREG_LR, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset)); if (ins->backend.memory_barrier_kind == MONO_MEMORY_BARRIER_SEQ) arm_dmb (code, ARM_DMB_ISH); arm_ldarw (code, ins->dreg, ARMREG_LR); @@ -4782,7 +4806,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) break; } case OP_ATOMIC_LOAD_U4: { - code = emit_addx_imm (code, ARMREG_LR, ins->inst_basereg, ins->inst_offset); + code = emit_addx_imm (code, ARMREG_LR, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset)); if (ins->backend.memory_barrier_kind == MONO_MEMORY_BARRIER_SEQ) arm_dmb (code, ARM_DMB_ISH); arm_ldarw (code, ins->dreg, ARMREG_LR); @@ -4791,14 +4815,14 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) } case OP_ATOMIC_LOAD_I8: case OP_ATOMIC_LOAD_U8: { - code = emit_addx_imm (code, ARMREG_LR, ins->inst_basereg, ins->inst_offset); + code = emit_addx_imm (code, ARMREG_LR, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset)); if (ins->backend.memory_barrier_kind == MONO_MEMORY_BARRIER_SEQ) arm_dmb (code, ARM_DMB_ISH); arm_ldarx (code, ins->dreg, ARMREG_LR); break; } case OP_ATOMIC_LOAD_R4: { - code = emit_addx_imm (code, ARMREG_LR, ins->inst_basereg, ins->inst_offset); + code = emit_addx_imm (code, ARMREG_LR, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset)); if (ins->backend.memory_barrier_kind == MONO_MEMORY_BARRIER_SEQ) arm_dmb (code, ARM_DMB_ISH); arm_ldarw (code, ARMREG_LR, ARMREG_LR); @@ -4806,7 +4830,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) break; } case OP_ATOMIC_LOAD_R8: { - code = emit_addx_imm (code, ARMREG_LR, ins->inst_basereg, ins->inst_offset); + code = emit_addx_imm (code, ARMREG_LR, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset)); if (ins->backend.memory_barrier_kind == MONO_MEMORY_BARRIER_SEQ) arm_dmb (code, ARM_DMB_ISH); arm_ldarx (code, ARMREG_LR, ARMREG_LR); @@ -4815,7 +4839,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) } case OP_ATOMIC_STORE_I1: case OP_ATOMIC_STORE_U1: { - code = emit_addx_imm (code, ARMREG_LR, ins->inst_destbasereg, ins->inst_offset); + code = emit_addx_imm (code, ARMREG_LR, ins->inst_destbasereg, GTMREG_TO_INT (ins->inst_offset)); arm_stlrb (code, ARMREG_LR, ins->sreg1); if (ins->backend.memory_barrier_kind == MONO_MEMORY_BARRIER_SEQ) arm_dmb (code, ARM_DMB_ISH); @@ -4823,7 +4847,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) } case OP_ATOMIC_STORE_I2: case OP_ATOMIC_STORE_U2: { - code = emit_addx_imm (code, ARMREG_LR, ins->inst_destbasereg, ins->inst_offset); + code = emit_addx_imm (code, ARMREG_LR, ins->inst_destbasereg, GTMREG_TO_INT (ins->inst_offset)); arm_stlrh (code, ARMREG_LR, ins->sreg1); if (ins->backend.memory_barrier_kind == MONO_MEMORY_BARRIER_SEQ) arm_dmb (code, ARM_DMB_ISH); @@ -4831,7 +4855,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) } case OP_ATOMIC_STORE_I4: case OP_ATOMIC_STORE_U4: { - code = emit_addx_imm (code, ARMREG_LR, ins->inst_destbasereg, ins->inst_offset); + code = emit_addx_imm (code, ARMREG_LR, ins->inst_destbasereg, GTMREG_TO_INT (ins->inst_offset)); arm_stlrw (code, ARMREG_LR, ins->sreg1); if (ins->backend.memory_barrier_kind == MONO_MEMORY_BARRIER_SEQ) arm_dmb (code, ARM_DMB_ISH); @@ -4839,14 +4863,14 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) } case OP_ATOMIC_STORE_I8: case OP_ATOMIC_STORE_U8: { - code = emit_addx_imm (code, ARMREG_LR, ins->inst_destbasereg, ins->inst_offset); + code = emit_addx_imm (code, ARMREG_LR, ins->inst_destbasereg, GTMREG_TO_INT (ins->inst_offset)); arm_stlrx (code, ARMREG_LR, ins->sreg1); if (ins->backend.memory_barrier_kind == MONO_MEMORY_BARRIER_SEQ) arm_dmb (code, ARM_DMB_ISH); break; } case OP_ATOMIC_STORE_R4: { - code = emit_addx_imm (code, ARMREG_LR, ins->inst_destbasereg, ins->inst_offset); + code = emit_addx_imm (code, ARMREG_LR, ins->inst_destbasereg, GTMREG_TO_INT (ins->inst_offset)); arm_fmov_double_to_rx (code, ARMREG_IP0, ins->sreg1); arm_stlrw (code, ARMREG_LR, ARMREG_IP0); if (ins->backend.memory_barrier_kind == MONO_MEMORY_BARRIER_SEQ) @@ -4854,7 +4878,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) break; } case OP_ATOMIC_STORE_R8: { - code = emit_addx_imm (code, ARMREG_LR, ins->inst_destbasereg, ins->inst_offset); + code = emit_addx_imm (code, ARMREG_LR, ins->inst_destbasereg, GTMREG_TO_INT (ins->inst_offset)); arm_fmov_double_to_rx (code, ARMREG_IP0, ins->sreg1); arm_stlrx (code, ARMREG_LR, ARMREG_IP0); if (ins->backend.memory_barrier_kind == MONO_MEMORY_BARRIER_SEQ) @@ -4863,35 +4887,64 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) } /* FP */ + case OP_R4CONST: case OP_R8CONST: { - guint64 r8_imm = *(guint64*)ins->inst_p0; + gboolean is_double = (ins->opcode == OP_R8CONST); + guint64 r_imm = is_double ? *(guint64*)ins->inst_p0 : *(guint32*)ins->inst_p0; - if (r8_imm == 0) { + if (r_imm == 0) { arm_fmov_rx_to_double (code, dreg, ARMREG_RZR); } else { - code = emit_imm64 (code, ARMREG_LR, r8_imm); - arm_fmov_rx_to_double (code, ins->dreg, ARMREG_LR); + guint64 mask_constant = is_double ? 0x0000FFFFFFFFFFFF : 0x0007FFFF; + + // Arm64 floating-point modified immediate constant check (2 * 128 combinations) + // Float: aBbbbbbc defgh000 00000000 00000000 + // Double: aBbbbbbb bbcdefgh 00000000 00000000 00000000 00000000 00000000 00000000 + + // Trailing zeros check + if ((r_imm & mask_constant) == 0) { + // Mask for b + guint8 mask_b; + int idx_last_b; + if (is_double) { + mask_b = 0xFF; + idx_last_b = 54; + } else { + mask_b = 0x1F; + idx_last_b = 25; + } + guint8 masked_b = (r_imm & ((guint64)mask_b << idx_last_b)) >> idx_last_b; + + int size = is_double ? 64 : 32; + // NOT(B) == b check + if (((r_imm & ((guint64)1 << (size - 2))) && masked_b == 0) + || (!(r_imm & ((guint64)1 << (size - 2))) && masked_b == mask_b)) { + //imm8 = abcdefgh + guint8 imm8 = ((r_imm & ((guint64)1 << (size - 1))) >> (size - 8)) + | ((r_imm & ((guint64)1 << idx_last_b)) >> (idx_last_b - 6)) + | ((r_imm & ((guint64)0x3F << (idx_last_b - 6))) >> (idx_last_b - 6)); + + arm_fmov_imm(code, (is_double ? 0x01 : 0x00), imm8, dreg); + break; + } + } + // Regular floating-point constant + code = emit_imm64 (code, ARMREG_LR, r_imm); + arm_fmov_rx_to_double (code, dreg, ARMREG_LR); } break; } - case OP_R4CONST: { - guint64 r4_imm = *(guint32*)ins->inst_p0; - - code = emit_imm64 (code, ARMREG_LR, r4_imm); - arm_fmov_rx_to_double (code, dreg, ARMREG_LR); - break; - } case OP_LOADR8_MEMBASE: - code = emit_ldrfpx (code, dreg, ins->inst_basereg, ins->inst_offset); + code = emit_ldrfpx (code, dreg, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset)); break; case OP_LOADR4_MEMBASE: - code = emit_ldrfpw (code, dreg, ins->inst_basereg, ins->inst_offset); + code = emit_ldrfpw (code, dreg, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset)); break; case OP_STORER8_MEMBASE_REG: - code = emit_strfpx (code, sreg1, ins->inst_destbasereg, ins->inst_offset); + code = emit_strfpx (code, sreg1, ins->inst_destbasereg, GTMREG_TO_INT (ins->inst_offset)); break; case OP_STORER4_MEMBASE_REG: - code = emit_strfpw (code, sreg1, ins->inst_destbasereg, ins->inst_offset); + code = emit_strfpw (code, sreg1, ins->inst_destbasereg, GTMREG_TO_INT (ins->inst_offset)); break; case OP_FMOVE: if (dreg != sreg1) @@ -5099,7 +5152,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) case OP_FCALL_MEMBASE: case OP_RCALL_MEMBASE: case OP_VCALL2_MEMBASE: - code = emit_ldrx (code, ARMREG_IP0, ins->inst_basereg, ins->inst_offset); + code = emit_ldrx (code, ARMREG_IP0, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset)); code = mono_arm_emit_blrx (code, ARMREG_IP0); code = emit_move_return_value (cfg, code, ins); break; @@ -5154,7 +5207,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) g_assert (ins->inst_basereg != ARMREG_LR); g_assert (ins->inst_basereg != ARMREG_SP); g_assert (ins->inst_basereg != ARMREG_R28); - code = emit_ldrx (code, branch_reg, ins->inst_basereg, ins->inst_offset); + code = emit_ldrx (code, branch_reg, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset)); break; default: @@ -5185,7 +5238,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) /* This is not a PLT patch */ code = emit_aotconst (cfg, code, branch_reg, MONO_PATCH_INFO_METHOD_JUMP, call->method); } else { - mono_add_patch_info_rel (cfg, code - cfg->native_code, MONO_PATCH_INFO_METHOD_JUMP, call->method, MONO_R_ARM64_B); + mono_add_patch_info_rel (cfg, GPTRDIFF_TO_INT (code - cfg->native_code), MONO_PATCH_INFO_METHOD_JUMP, call->method, MONO_R_ARM64_B); arm_b (code, code); cfg->thunk_area += THUNK_SIZE; break; @@ -5201,7 +5254,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) } ins->flags |= MONO_INST_GC_CALLSITE; - ins->backend.pc_offset = code - cfg->native_code; + ins->backend.pc_offset = GPTRDIFF_TO_INT (code - cfg->native_code); break; } case OP_ARGLIST: @@ -5225,7 +5278,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) arm_movx (code, ARMREG_IP1, sreg2); /* Save args buffer */ - code = emit_strx (code, ARMREG_LR, var->inst_basereg, var->inst_offset); + code = emit_strx (code, ARMREG_LR, var->inst_basereg, GTMREG_TO_INT (var->inst_offset)); /* Set fp argument regs */ code = emit_ldrw (code, ARMREG_R0, ARMREG_LR, MONO_STRUCT_OFFSET (DynCallArgs, n_fpargs)); @@ -5270,7 +5323,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) code = mono_arm_emit_blrx (code, ARMREG_IP1); /* Save result */ - code = emit_ldrx (code, ARMREG_LR, var->inst_basereg, var->inst_offset); + code = emit_ldrx (code, ARMREG_LR, var->inst_basereg, GTMREG_TO_INT (var->inst_offset)); arm_strx (code, ARMREG_R0, ARMREG_LR, MONO_STRUCT_OFFSET (DynCallArgs, res)); arm_strx (code, ARMREG_R1, ARMREG_LR, MONO_STRUCT_OFFSET (DynCallArgs, res2)); /* Save fp result */ @@ -5337,7 +5390,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) case OP_DUMMY_R4CONST: break; case OP_IL_SEQ_POINT: - mono_add_seq_point (cfg, bb, ins, code - cfg->native_code); + mono_add_seq_point (cfg, bb, ins, GPTRDIFF_TO_INT (code - cfg->native_code)); break; /* EH */ @@ -5394,7 +5447,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) MonoInst *spvar = mono_find_spvar_for_region (cfg, bb->region); /* Save caller address */ - code = emit_strx (code, ARMREG_LR, spvar->inst_basereg, spvar->inst_offset); + code = emit_strx (code, ARMREG_LR, spvar->inst_basereg, GTMREG_TO_INT (spvar->inst_offset)); /* * Reserve a param area, see test_0_finally_param_area (). @@ -5416,7 +5469,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) arm_movx (code, ARMREG_R0, sreg1); /* Return to either after the branch in OP_CALL_HANDLER, or to the EH code */ - code = emit_ldrx (code, ARMREG_LR, spvar->inst_basereg, spvar->inst_offset); + code = emit_ldrx (code, ARMREG_LR, spvar->inst_basereg, GTMREG_TO_INT (spvar->inst_offset)); arm_brx (code, ARMREG_LR); break; } @@ -5426,14 +5479,14 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) break; case OP_LIVERANGE_START: { if (cfg->verbose_level > 1) - printf ("R%d START=0x%x\n", MONO_VARINFO (cfg, ins->inst_c0)->vreg, (int)(code - cfg->native_code)); - MONO_VARINFO (cfg, ins->inst_c0)->live_range_start = code - cfg->native_code; + printf ("R%d START=0x%x\n", MONO_VARINFO (cfg, ins->inst_c0)->vreg, GPTRDIFF_TO_INT (code - cfg->native_code)); + MONO_VARINFO (cfg, ins->inst_c0)->live_range_start = GPTRDIFF_TO_INT32 (code - cfg->native_code); break; } case OP_LIVERANGE_END: { if (cfg->verbose_level > 1) - printf ("R%d END=0x%x\n", MONO_VARINFO (cfg, ins->inst_c0)->vreg, (int)(code - cfg->native_code)); - MONO_VARINFO (cfg, ins->inst_c0)->live_range_end = code - cfg->native_code; + printf ("R%d END=0x%x\n", MONO_VARINFO (cfg, ins->inst_c0)->vreg, GPTRDIFF_TO_INT (code - cfg->native_code)); + MONO_VARINFO (cfg, ins->inst_c0)->live_range_end = GPTRDIFF_TO_INT32 (code - cfg->native_code); break; } case OP_GC_SAFE_POINT: { @@ -5529,7 +5582,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) } case OP_ARM64_HINT: g_assert (ins->inst_c0 <= ARMHINT_SEVL); - arm_hint (code, ins->inst_c0); + arm_hint (code, GTMREG_TO_UINT32 (ins->inst_c0)); break; default: @@ -5575,8 +5628,8 @@ emit_move_args (MonoCompile *cfg, guint8 *code) case ArgInIReg: arm_movx (code, ins->dreg, ainfo->reg); if (i == 0 && sig->hasthis) { - mono_add_var_location (cfg, ins, TRUE, ainfo->reg, 0, 0, code - cfg->native_code); - mono_add_var_location (cfg, ins, TRUE, ins->dreg, 0, code - cfg->native_code, 0); + mono_add_var_location (cfg, ins, TRUE, ainfo->reg, 0, 0, GPTRDIFF_TO_INT (code - cfg->native_code)); + mono_add_var_location (cfg, ins, TRUE, ins->dreg, 0, GPTRDIFF_TO_INT (code - cfg->native_code), 0); } break; case ArgOnStack: @@ -5615,17 +5668,17 @@ emit_move_args (MonoCompile *cfg, guint8 *code) switch (ainfo->storage) { case ArgInIReg: /* Stack slots for arguments have size 8 */ - code = emit_strx (code, ainfo->reg, ins->inst_basereg, ins->inst_offset); + code = emit_strx (code, ainfo->reg, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset)); if (i == 0 && sig->hasthis) { - mono_add_var_location (cfg, ins, TRUE, ainfo->reg, 0, 0, code - cfg->native_code); - mono_add_var_location (cfg, ins, FALSE, ins->inst_basereg, ins->inst_offset, code - cfg->native_code, 0); + mono_add_var_location (cfg, ins, TRUE, ainfo->reg, 0, 0, GPTRDIFF_TO_INT (code - cfg->native_code)); + mono_add_var_location (cfg, ins, FALSE, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset), GPTRDIFF_TO_INT (code - cfg->native_code), 0); } break; case ArgInFReg: - code = emit_strfpx (code, ainfo->reg, ins->inst_basereg, ins->inst_offset); + code = emit_strfpx (code, ainfo->reg, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset)); break; case ArgInFRegR4: - code = emit_strfpw (code, ainfo->reg, ins->inst_basereg, ins->inst_offset); + code = emit_strfpw (code, ainfo->reg, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset)); break; case ArgOnStack: case ArgOnStackR4: @@ -5638,29 +5691,35 @@ emit_move_args (MonoCompile *cfg, guint8 *code) if (ainfo->gsharedvt) { g_assert (ins->opcode == OP_GSHAREDVT_ARG_REGOFFSET); - arm_strx (code, ainfo->reg, ins->inst_basereg, ins->inst_offset); + arm_strx (code, ainfo->reg, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset)); } else { g_assert (ins->opcode == OP_VTARG_ADDR); g_assert (addr_arg->opcode == OP_REGOFFSET); - arm_strx (code, ainfo->reg, addr_arg->inst_basereg, addr_arg->inst_offset); + arm_strx (code, ainfo->reg, addr_arg->inst_basereg, GTMREG_TO_INT (addr_arg->inst_offset)); } break; } case ArgVtypeInIRegs: for (part = 0; part < ainfo->nregs; part ++) { - code = emit_strx (code, ainfo->reg + part, ins->inst_basereg, ins->inst_offset + (part * 8)); + int offs = GTMREG_TO_INT (ins->inst_offset + (part * 8)); + if (part + 1 < ainfo->nregs && IS_VALID_STPX_OFFSET (offs)) { + arm_stpx (code, ainfo->reg + part, ainfo->reg + part + 1, ins->inst_basereg, offs); + part++; + continue; + } + code = emit_strx (code, ainfo->reg + part, ins->inst_basereg, offs); } break; case ArgHFA: for (part = 0; part < ainfo->nregs; part ++) { if (ainfo->esize == 4) - code = emit_strfpw (code, ainfo->reg + part, ins->inst_basereg, ins->inst_offset + ainfo->foffsets [part]); + code = emit_strfpw (code, ainfo->reg + part, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset + ainfo->foffsets [part])); else - code = emit_strfpx (code, ainfo->reg + part, ins->inst_basereg, ins->inst_offset + ainfo->foffsets [part]); + code = emit_strfpx (code, ainfo->reg + part, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset + ainfo->foffsets [part])); } break; case ArgInSIMDReg: - code = emit_strfpq (code, ainfo->reg, ins->inst_basereg, ins->inst_offset); + code = emit_strfpq (code, ainfo->reg, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset)); break; default: g_assert_not_reached (); @@ -5685,6 +5744,7 @@ emit_store_regarray (guint8 *code, guint64 regs, int basereg, int offset) for (i = 0; i < 32; ++i) { if (regs & (1 << i)) { + // FIXME: use IS_VALID_STPX_OFFSET before doing STPX if (i + 1 < 32 && (regs & (1 << (i + 1))) && (i + 1 != ARMREG_SP)) { arm_stpx (code, i, i + 1, basereg, offset + (i * 8)); i++; @@ -5713,9 +5773,9 @@ emit_load_regarray (guint8 *code, guint64 regs, int basereg, int offset) for (i = 0; i < 32; ++i) { if (regs & (1 << i)) { if ((regs & (1 << (i + 1))) && (i + 1 != ARMREG_SP)) { - if (offset + (i * 8) < 500) + if (IS_VALID_STPX_OFFSET (offset + (i * 8))) { arm_ldpx (code, i, i + 1, basereg, offset + (i * 8)); - else { + } else { code = emit_ldrx (code, i, basereg, offset + (i * 8)); code = emit_ldrx (code, i + 1, basereg, offset + ((i + 1) * 8)); } @@ -5744,6 +5804,7 @@ emit_store_regset (guint8 *code, guint64 regs, int basereg, int offset) pos = 0; for (i = 0; i < 32; ++i) { if (regs & (1 << i)) { + // FIXME: check IS_VALID_STPX_OFFSET before doing STPX if ((regs & (1 << (i + 1))) && (i + 1 != ARMREG_SP)) { arm_stpx (code, i, i + 1, basereg, offset + (pos * 8)); i++; @@ -5813,14 +5874,14 @@ static WARN_UNUSED_RESULT guint8* emit_store_regset_cfa (MonoCompile *cfg, guint8 *code, guint64 regs, int basereg, int offset, int cfa_offset, guint64 no_cfa_regset) { int i, j, pos, nregs; - guint32 cfa_regset = regs & ~no_cfa_regset; + guint32 cfa_regset = GUINT64_TO_UINT32 (regs & ~no_cfa_regset); pos = 0; for (i = 0; i < 32; ++i) { nregs = 1; if (regs & (1 << i)) { if ((regs & (1 << (i + 1))) && (i + 1 != ARMREG_SP)) { - if (offset < 256) { + if (IS_VALID_STPX_OFFSET (offset + (pos * 8))) { arm_stpx (code, i, i + 1, basereg, offset + (pos * 8)); } else { code = emit_strx (code, i, basereg, offset + (pos * 8)); @@ -5919,7 +5980,7 @@ mono_arch_emit_prolog (MonoCompile *cfg) } if (cfg->method->save_lmf) { - code = emit_setup_lmf (cfg, code, cfg->lmf_var->inst_offset, cfa_offset); + code = emit_setup_lmf (cfg, code, GTMREG_TO_INT32 (cfg->lmf_var->inst_offset), cfa_offset); } else { /* Save gregs */ code = emit_store_regset_cfa (cfg, code, MONO_ARCH_CALLEE_SAVED_REGS & cfg->used_int_regs, ARMREG_FP, cfg->arch.saved_gregs_offset, cfa_offset, 0); @@ -5936,7 +5997,7 @@ mono_arch_emit_prolog (MonoCompile *cfg) MonoInst *ins = cfg->vret_addr; g_assert (ins->opcode == OP_REGOFFSET); - code = emit_strx (code, ARMREG_R8, ins->inst_basereg, ins->inst_offset); + code = emit_strx (code, ARMREG_R8, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset)); } /* Save mrgctx received in MONO_ARCH_RGCTX_REG */ @@ -5945,10 +6006,10 @@ mono_arch_emit_prolog (MonoCompile *cfg) g_assert (ins->opcode == OP_REGOFFSET); - code = emit_strx (code, MONO_ARCH_RGCTX_REG, ins->inst_basereg, ins->inst_offset); + code = emit_strx (code, MONO_ARCH_RGCTX_REG, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset)); - mono_add_var_location (cfg, cfg->rgctx_var, TRUE, MONO_ARCH_RGCTX_REG, 0, 0, code - cfg->native_code); - mono_add_var_location (cfg, cfg->rgctx_var, FALSE, ins->inst_basereg, ins->inst_offset, code - cfg->native_code, 0); + mono_add_var_location (cfg, cfg->rgctx_var, TRUE, MONO_ARCH_RGCTX_REG, 0, 0, GPTRDIFF_TO_INT (code - cfg->native_code)); + mono_add_var_location (cfg, cfg->rgctx_var, FALSE, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset), GPTRDIFF_TO_INT (code - cfg->native_code), 0); } /* @@ -5963,14 +6024,14 @@ mono_arch_emit_prolog (MonoCompile *cfg) /* Initialize the variable from a GOT slot */ code = emit_aotconst (cfg, code, ARMREG_IP0, MONO_PATCH_INFO_SEQ_POINT_INFO, cfg->method); g_assert (ins->opcode == OP_REGOFFSET); - code = emit_strx (code, ARMREG_IP0, ins->inst_basereg, ins->inst_offset); + code = emit_strx (code, ARMREG_IP0, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset)); /* Initialize ss_tramp_var */ ins = cfg->arch.ss_tramp_var; g_assert (ins->opcode == OP_REGOFFSET); code = emit_ldrx (code, ARMREG_IP1, ARMREG_IP0, MONO_STRUCT_OFFSET (SeqPointInfo, ss_tramp_addr)); - code = emit_strx (code, ARMREG_IP1, ins->inst_basereg, ins->inst_offset); + code = emit_strx (code, ARMREG_IP1, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset)); } else { MonoInst *ins; @@ -5980,7 +6041,7 @@ mono_arch_emit_prolog (MonoCompile *cfg) g_assert (ins->opcode == OP_REGOFFSET); code = emit_imm64 (code, ARMREG_IP0, (guint64)&ss_trampoline); - code = emit_strx (code, ARMREG_IP0, ins->inst_basereg, ins->inst_offset); + code = emit_strx (code, ARMREG_IP0, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset)); } if (cfg->arch.bp_tramp_var) { @@ -5989,7 +6050,7 @@ mono_arch_emit_prolog (MonoCompile *cfg) g_assert (ins->opcode == OP_REGOFFSET); code = emit_imm64 (code, ARMREG_IP0, (guint64)bp_trampoline); - code = emit_strx (code, ARMREG_IP0, ins->inst_basereg, ins->inst_offset); + code = emit_strx (code, ARMREG_IP0, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset)); } } @@ -6022,7 +6083,7 @@ mono_arch_emit_epilog (MonoCompile *cfg) code = realloc_code (cfg, max_epilog_size); if (cfg->method->save_lmf) { - code = mono_arm_emit_load_regarray (code, MONO_ARCH_CALLEE_SAVED_REGS & cfg->used_int_regs, ARMREG_FP, cfg->lmf_var->inst_offset + MONO_STRUCT_OFFSET (MonoLMF, gregs) - (MONO_ARCH_FIRST_LMF_REG * 8)); + code = mono_arm_emit_load_regarray (code, MONO_ARCH_CALLEE_SAVED_REGS & cfg->used_int_regs, ARMREG_FP, GTMREG_TO_INT (cfg->lmf_var->inst_offset + MONO_STRUCT_OFFSET (MonoLMF, gregs) - (MONO_ARCH_FIRST_LMF_REG * 8))); } else { /* Restore gregs */ code = emit_load_regset (code, MONO_ARCH_CALLEE_SAVED_REGS & cfg->used_int_regs, ARMREG_FP, cfg->arch.saved_gregs_offset); @@ -6034,8 +6095,15 @@ mono_arch_emit_epilog (MonoCompile *cfg) case ArgVtypeInIRegs: { MonoInst *ins = cfg->ret; - for (i = 0; i < cinfo->ret.nregs; ++i) - code = emit_ldrx (code, cinfo->ret.reg + i, ins->inst_basereg, ins->inst_offset + (i * 8)); + for (i = 0; i < cinfo->ret.nregs; ++i) { + int offs = GTMREG_TO_INT (ins->inst_offset + (i * 8)); + if (i + 1 < cinfo->ret.nregs && IS_VALID_STPX_OFFSET (offs)) { + arm_ldpx (code, cinfo->ret.reg + i, cinfo->ret.reg + i + 1, ins->inst_basereg, offs); + i++; + } else { + code = emit_ldrx (code, cinfo->ret.reg + i, ins->inst_basereg, offs); + } + } break; } case ArgHFA: { @@ -6043,9 +6111,9 @@ mono_arch_emit_epilog (MonoCompile *cfg) for (i = 0; i < cinfo->ret.nregs; ++i) { if (cinfo->ret.esize == 4) - code = emit_ldrfpw (code, cinfo->ret.reg + i, ins->inst_basereg, ins->inst_offset + cinfo->ret.foffsets [i]); + code = emit_ldrfpw (code, cinfo->ret.reg + i, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset + cinfo->ret.foffsets [i])); else - code = emit_ldrfpx (code, cinfo->ret.reg + i, ins->inst_basereg, ins->inst_offset + cinfo->ret.foffsets [i]); + code = emit_ldrfpx (code, cinfo->ret.reg + i, ins->inst_basereg, GTMREG_TO_INT (ins->inst_offset + cinfo->ret.foffsets [i])); } break; } @@ -6122,7 +6190,7 @@ mono_arch_emit_exceptions (MonoCompile *cfg) /* r1 = throw ip */ arm_movx (code, ARMREG_R1, ARMREG_IP1); /* Branch to the corlib exception throwing trampoline */ - ji->ip.i = code - cfg->native_code; + ji->ip.i = GPTRDIFF_TO_INT (code - cfg->native_code); ji->type = MONO_PATCH_INFO_JIT_ICALL_ID; ji->data.jit_icall_id = MONO_JIT_ICALL_mono_arch_throw_corlib_exception; ji->relocation = MONO_R_ARM64_BL; @@ -6297,7 +6365,7 @@ mono_arch_build_imt_trampoline (MonoVTable *vtable, MonoIMTCheckItem **imt_entri g_assert ((code - buf) <= buf_len); - MINI_END_CODEGEN (buf, code - buf, MONO_PROFILER_CODE_BUFFER_IMT_TRAMPOLINE, NULL); + MINI_END_CODEGEN (buf, GPTRDIFF_TO_INT (code - buf), MONO_PROFILER_CODE_BUFFER_IMT_TRAMPOLINE, NULL); return MINI_ADDR_TO_FTNPTR (buf); } @@ -6326,7 +6394,7 @@ void mono_arch_set_breakpoint (MonoJitInfo *ji, guint8 *ip) { guint8 *code = MINI_FTNPTR_TO_ADDR (ip); - guint32 native_offset = ip - (guint8*)ji->code_start; + guint32 native_offset = GPTRDIFF_TO_UINT32 (ip - (guint8*)ji->code_start); if (ji->from_aot) { SeqPointInfo *info = mono_arch_get_seq_point_info ((guint8*)ji->code_start); @@ -6342,7 +6410,7 @@ mono_arch_set_breakpoint (MonoJitInfo *ji, guint8 *ip) mono_codeman_enable_write (); code = mono_arm_emit_blrx (code, ARMREG_IP0); mono_codeman_disable_write (); - mono_arch_flush_icache (ip, code - ip); + mono_arch_flush_icache (ip, GPTRDIFF_TO_INT (code - ip)); } } @@ -6352,7 +6420,7 @@ mono_arch_clear_breakpoint (MonoJitInfo *ji, guint8 *ip) guint8 *code = MINI_FTNPTR_TO_ADDR (ip); if (ji->from_aot) { - guint32 native_offset = ip - (guint8*)ji->code_start; + guint32 native_offset = GPTRDIFF_TO_UINT32 (ip - (guint8*)ji->code_start); SeqPointInfo *info = mono_arch_get_seq_point_info ((guint8*)ji->code_start); if (enable_ptrauth) @@ -6366,7 +6434,7 @@ mono_arch_clear_breakpoint (MonoJitInfo *ji, guint8 *ip) mono_codeman_enable_write (); arm_nop (code); mono_codeman_disable_write (); - mono_arch_flush_icache (ip, code - ip); + mono_arch_flush_icache (ip,GPTRDIFF_TO_INT ( code - ip)); } } diff --git a/src/mono/mono/mini/mini-generic-sharing.c b/src/mono/mono/mini/mini-generic-sharing.c index 6ad8dcb0075cfc..3e059b4173085c 100644 --- a/src/mono/mono/mini/mini-generic-sharing.c +++ b/src/mono/mono/mini/mini-generic-sharing.c @@ -2272,22 +2272,28 @@ instantiate_info (MonoMemoryManager *mem_manager, MonoRuntimeGenericContextInfoT mono_class_setup_vtable (info->klass); // FIXME: Check type load - if (mono_class_is_interface (iface_class)) { - gboolean variance_used; - ioffset = mono_class_interface_offset_with_variance (info->klass, iface_class, &variance_used); - g_assert (ioffset != -1); - } else { - ioffset = 0; - } - - if (info->method->is_generic == 0 && mono_class_is_ginst (info->method->klass)) { - slot = mono_method_get_vtable_slot (((MonoMethodInflated*)(info->method))->declaring); + + if (mono_class_is_interface (info->klass)) { + // If constrained class is interface, we don't learn anything new by constraining + method = info->method; } else { - slot = mono_method_get_vtable_slot (info->method); + if (mono_class_is_interface (iface_class)) { + gboolean variance_used; + ioffset = mono_class_interface_offset_with_variance (info->klass, iface_class, &variance_used); + g_assert (ioffset != -1); + } else { + ioffset = 0; + } + + if (info->method->is_generic == 0 && mono_class_is_ginst (info->method->klass)) { + slot = mono_method_get_vtable_slot (((MonoMethodInflated*)(info->method))->declaring); + } else { + slot = mono_method_get_vtable_slot (info->method); + } + g_assert (slot != -1); + g_assert (m_class_get_vtable (info->klass)); + method = m_class_get_vtable (info->klass) [ioffset + slot]; } - g_assert (slot != -1); - g_assert (m_class_get_vtable (info->klass)); - method = m_class_get_vtable (info->klass) [ioffset + slot]; if (info->method->is_inflated) { MonoGenericContext *method_ctx = mono_method_get_context (info->method); @@ -2886,7 +2892,8 @@ info_equal (gpointer data1, gpointer data2, MonoRgctxInfoType info_type) return data1 == data2; case MONO_RGCTX_INFO_VIRT_METHOD: case MONO_RGCTX_INFO_VIRT_METHOD_CODE: - case MONO_RGCTX_INFO_VIRT_METHOD_BOX_TYPE: { + case MONO_RGCTX_INFO_VIRT_METHOD_BOX_TYPE: + case MONO_RGCTX_INFO_GSHAREDVT_CONSTRAINED_CALL_INFO: { MonoJumpInfoVirtMethod *info1 = (MonoJumpInfoVirtMethod *)data1; MonoJumpInfoVirtMethod *info2 = (MonoJumpInfoVirtMethod *)data2; diff --git a/src/mono/mono/mini/mini-llvm-cpp.cpp b/src/mono/mono/mini/mini-llvm-cpp.cpp index b50eb471fa924b..ce5473be3a7ed6 100644 --- a/src/mono/mono/mini/mini-llvm-cpp.cpp +++ b/src/mono/mono/mini/mini-llvm-cpp.cpp @@ -312,7 +312,11 @@ mono_llvm_replace_uses_of (LLVMValueRef var, LLVMValueRef v) LLVMValueRef mono_llvm_create_constant_data_array (const uint8_t *data, int len) { +#if LLVM_API_VERSION >= 1600 + return wrap(ConstantDataArray::get (*unwrap(LLVMGetGlobalContext ()), ArrayRef(data, len))); +#else return wrap(ConstantDataArray::get (*unwrap(LLVMGetGlobalContext ()), makeArrayRef(data, len))); +#endif } void @@ -775,7 +779,7 @@ mono_llvm_register_overloaded_intrinsic (LLVMModuleRef module, IntrinsicId id, L unsigned int mono_llvm_get_prim_size_bits (LLVMTypeRef type) { - return unwrap (type)->getPrimitiveSizeInBits (); + return GUINT64_TO_INT (unwrap (type)->getPrimitiveSizeInBits ()); } /* diff --git a/src/mono/mono/mini/mini-llvm.c b/src/mono/mono/mini/mini-llvm.c index a6c23aa59b67a2..36d47ba7680087 100644 --- a/src/mono/mono/mini/mini-llvm.c +++ b/src/mono/mono/mini/mini-llvm.c @@ -4537,7 +4537,7 @@ process_call (EmitContext *ctx, MonoBasicBlock *bb, LLVMBuilderRef *builder_ref, LLVMValueRef index; g_assert (ins->inst_offset % size == 0); - index = const_int32 (ins->inst_offset / size); + index = const_int32 (GTMREG_TO_INT (ins->inst_offset / size)); LLVMTypeRef etype = pointer_type (llvm_sig); callee = LLVMBuildLoad2 (builder, etype, LLVMBuildGEP2 (builder, etype, convert (ctx, values [ins->inst_basereg], pointer_type (etype)), &index, 1, ""), ""); @@ -5001,8 +5001,47 @@ emit_llvmonly_landing_pad (EmitContext *ctx, int group_index, int group_size) LLVMPositionBuilderAtEnd (builder, catch_bb); LLVMValueRef catchpad_args [1]; - catchpad_args [0] = LLVMConstNull (pointer_type (LLVMInt8Type ())); + catchpad_args [0] = ctx->module->sentinel_exception; catchpad = LLVMBuildCatchPad (builder, lpad, catchpad_args, 1, ""); + + // The ifdef is needed because of INTRINS_WASM +#ifdef TARGET_WASM + // LLVM seems to require at least the following code sequence + // %7 = catchpad within %5 [ptr @typeinfo for int*] + // %8 = tail call ptr @llvm.wasm.get.exception(token %7) + // %9 = tail call i32 @llvm.wasm.get.ehselector(token %7) + + LLVMValueRef args [] = { catchpad }; + LLVMValueRef call = call_intrins (ctx, INTRINS_WASM_GET_EXCEPTION, args, ""); + LLVMSetTailCall (call, TRUE); + LLVMValueRef sel_call = call_intrins (ctx, INTRINS_WASM_GET_EHSELECTOR, args, ""); + LLVMSetTailCall (sel_call, TRUE); + + //%10 = tail call i32 @llvm.eh.typeid.for(ptr nonnull @typeinfo for int*) #5, !dbg !31 + //%11 = icmp eq i32 %9, %10, !dbg !31 + //br i1 %11, label %12, label %14, !dbg !31 + + LLVMValueRef typeid_args [] = { ctx->module->sentinel_exception }; + LLVMValueRef typeid = call_intrins (ctx, INTRINS_EH_TYPEID_FOR, typeid_args, ""); + LLVMSetTailCall (typeid, TRUE); + + LLVMValueRef cmp = LLVMBuildICmp (builder, LLVMIntEQ, sel_call, typeid, ""); + + LLVMBasicBlockRef ex_bb = gen_bb (ctx, "CATCH_BB"); + LLVMBasicBlockRef noex_bb = gen_bb (ctx, "NOCATCH_BB"); + + LLVMBuildCondBr (ctx->builder, cmp, ex_bb, noex_bb); + + /* No catch case */ + //call void @llvm.wasm.rethrow() #3 [ "funclet"(token %7) ], !dbg !34 + //unreachable, !dbg !34 + LLVMPositionBuilderAtEnd (builder, noex_bb); + call_intrins (ctx, INTRINS_WASM_RETHROW, args, ""); + LLVMBuildUnreachable (builder); + + /* Catch case */ + LLVMPositionBuilderAtEnd (builder, ex_bb); +#endif } else { MonoBasicBlock *handler_bb = cfg->cil_offset_to_bb [CLAUSE_START (group_start)]; g_assert (handler_bb); @@ -5640,6 +5679,7 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb) LLVMBuilderRef builder; gboolean has_terminator; LLVMValueRef lhs, rhs, arg3; + LLVMValueRef last_divrem = NULL; int nins = 0; cbb = get_end_bb (ctx, bb); @@ -5866,7 +5906,7 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb) case OP_TAILCALL_PARAMETER: break; case OP_ICONST: - values [ins->dreg] = const_int32 (ins->inst_c0); + values [ins->dreg] = const_int32 (GTMREG_TO_INT (ins->inst_c0)); break; case OP_I8CONST: #if TARGET_SIZEOF_VOID_P == 4 @@ -6093,7 +6133,7 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb) if (ins->opcode == OP_ICOMPARE_IMM) { lhs = convert (ctx, lhs, LLVMInt32Type ()); - rhs = const_int32 (ins->inst_imm); + rhs = const_int32 (GTMREG_TO_INT (ins->inst_imm)); } if (ins->opcode == OP_LCOMPARE_IMM) { lhs = convert (ctx, lhs, LLVMInt64Type ()); @@ -6466,7 +6506,7 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb) if (spec [MONO_INST_SRC1] == 'l') { imm = const_int64 (GET_LONG_IMM (ins)); } else { - imm = const_int32 (ins->inst_imm); + imm = const_int32 (GTMREG_TO_INT (ins->inst_imm)); } emit_div_check (ctx, builder, bb, ins, lhs, imm); @@ -6476,7 +6516,7 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb) #if TARGET_SIZEOF_VOID_P == 4 if (shift_i8) - imm = const_int32 (ins->inst_imm); + imm = const_int32 (GTMREG_TO_INT (ins->inst_imm)); #endif if (shift_i8) /* The IL might not be regular */ @@ -6638,6 +6678,44 @@ MONO_RESTORE_WARNING values [ins->dreg] = LLVMBuildXor (builder, tz, width, dname); break; } + case OP_X86_IDIVREM: + case OP_X86_LDIVREM: { + const LLVMTypeRef part_type = ins->opcode==OP_X86_IDIVREM ? LLVMInt32Type () : LLVMInt64Type (); + const LLVMTypeRef full_type = ins->opcode==OP_X86_IDIVREM ? LLVMInt64Type () : LLVMInt128Type (); + const LLVMValueRef shift_amount = ins->opcode==OP_X86_IDIVREM ? const_int32 (32) : const_int32 (64); + + LLVMValueRef dividend_low = LLVMBuildZExt (builder, convert (ctx, lhs, part_type), full_type, ""); + LLVMValueRef dividend_high = LLVMBuildSExt (builder, convert (ctx, rhs, part_type), full_type, ""); + LLVMValueRef dividend = LLVMBuildOr (builder, dividend_low, + LLVMBuildShl (builder, dividend_high, shift_amount, ""), ""); + LLVMValueRef divisor = LLVMBuildSExt (builder, convert (ctx, arg3, part_type), full_type, ""); + // LLVM should fuse the individual Div and Rem instructions into one DIV/IDIV on x86 + values [ins->dreg] = LLVMBuildTrunc (builder, LLVMBuildSDiv (builder, dividend, divisor, ""), part_type, ""); + last_divrem = LLVMBuildTrunc (builder, LLVMBuildSRem (builder, dividend, divisor, ""), part_type, ""); + break; + } + case OP_X86_IDIVREMU: + case OP_X86_LDIVREMU: { + const LLVMTypeRef part_type = ins->opcode==OP_X86_IDIVREMU ? LLVMInt32Type () : LLVMInt64Type (); + const LLVMTypeRef full_type = ins->opcode==OP_X86_IDIVREMU ? LLVMInt64Type () : LLVMInt128Type (); + const LLVMValueRef shift_amount = ins->opcode==OP_X86_IDIVREMU ? const_int32 (32) : const_int32 (64); + + LLVMValueRef dividend_low = LLVMBuildZExt (builder, convert (ctx, lhs, part_type), full_type, ""); + LLVMValueRef dividend_high = LLVMBuildZExt (builder, convert (ctx, rhs, part_type), full_type, ""); + LLVMValueRef dividend = LLVMBuildOr (builder, dividend_low, + LLVMBuildShl (builder, dividend_high, shift_amount, ""), ""); + LLVMValueRef divisor = LLVMBuildZExt (builder, convert (ctx, arg3, part_type), full_type, ""); + values [ins->dreg] = LLVMBuildTrunc (builder, LLVMBuildUDiv (builder, dividend, divisor, ""), part_type, ""); + last_divrem = LLVMBuildTrunc (builder, LLVMBuildURem (builder, dividend, divisor, ""), part_type, ""); + break; + } + case OP_X86_IDIVREM2: + case OP_X86_LDIVREM2: { + g_assert (last_divrem); + values [ins->dreg] = last_divrem; + last_divrem = NULL; + break; + } #endif case OP_ICONV_TO_I1: @@ -6741,7 +6819,7 @@ MONO_RESTORE_WARNING case OP_LOCALLOC_IMM: { LLVMValueRef v; - guint32 size = ins->inst_imm; + guint32 size = GTMREG_TO_UINT32 (ins->inst_imm); size = (size + (MONO_ARCH_FRAME_ALIGNMENT - 1)) & ~ (MONO_ARCH_FRAME_ALIGNMENT - 1); v = mono_llvm_build_alloca (builder, LLVMInt8Type (), const_int32 (size), MONO_ARCH_FRAME_ALIGNMENT, ""); @@ -6810,10 +6888,10 @@ MONO_RESTORE_WARNING } } else if (ins->inst_offset % size != 0) { /* Unaligned load */ - index = const_int32 (ins->inst_offset); + index = const_int32 (GTMREG_TO_INT (ins->inst_offset)); addr = LLVMBuildGEP2 (builder, i1_t, convert (ctx, base, pointer_type (LLVMInt8Type ())), &index, 1, ""); } else { - index = const_int32 (ins->inst_offset / size); + index = const_int32 (GTMREG_TO_INT (ins->inst_offset / size)); addr = LLVMBuildGEP2 (builder, t, convert (ctx, base, pointer_type (t)), &index, 1, ""); } } @@ -6867,10 +6945,10 @@ MONO_RESTORE_WARNING addr = LLVMBuildGEP2 (builder, i1_t, convert (ctx, gep_base, pointer_type (LLVMInt8Type ())), &gep_offset, 1, ""); } else if (ins->inst_offset % size != 0) { /* Unaligned store */ - index = const_int32 (ins->inst_offset); + index = const_int32 (GTMREG_TO_INT (ins->inst_offset)); addr = LLVMBuildGEP2 (builder, i1_t, convert (ctx, base, pointer_type (LLVMInt8Type ())), &index, 1, ""); } else { - index = const_int32 (ins->inst_offset / size); + index = const_int32 (GTMREG_TO_INT (ins->inst_offset / size)); addr = LLVMBuildGEP2 (builder, t, convert (ctx, base, pointer_type (t)), &index, 1, ""); } if (is_volatile && LLVMGetInstructionOpcode (base) == LLVMAlloca && !(ins->flags & MONO_INST_VOLATILE)) @@ -6906,10 +6984,10 @@ MONO_RESTORE_WARNING addr = LLVMBuildGEP2 (builder, i1_t, convert (ctx, gep_base, pointer_type (LLVMInt8Type ())), &gep_offset, 1, ""); } else if (ins->inst_offset % size != 0) { /* Unaligned store */ - index = const_int32 (ins->inst_offset); + index = const_int32 (GTMREG_TO_INT (ins->inst_offset)); addr = LLVMBuildGEP2 (builder, i1_t, convert (ctx, base, pointer_type (LLVMInt8Type ())), &index, 1, ""); } else { - index = const_int32 (ins->inst_offset / size); + index = const_int32 (GTMREG_TO_INT (ins->inst_offset / size)); addr = LLVMBuildGEP2 (builder, t, convert (ctx, base, pointer_type (t)), &index, 1, ""); } LLVMValueRef srcval = convert (ctx, LLVMConstInt (IntPtrType (), ins->inst_imm, FALSE), t); @@ -7377,7 +7455,7 @@ MONO_RESTORE_WARNING dname = (char *)""; if (ins->inst_offset != 0) { - index = const_int32 (ins->inst_offset / size); + index = const_int32 (GTMREG_TO_INT (ins->inst_offset / size)); addr = LLVMBuildGEP2 (builder, t, convert (ctx, lhs, pointer_type (t)), &index, 1, ""); } else { addr = lhs; @@ -7419,7 +7497,7 @@ MONO_RESTORE_WARNING t = load_store_to_llvm_type (ins->opcode, &size, &sext, &zext); base = values [ins->inst_destbasereg]; - index = const_int32 (ins->inst_offset / size); + index = const_int32 (GTMREG_TO_INT (ins->inst_offset / size)); addr = LLVMBuildGEP2 (builder, t, convert (ctx, base, pointer_type (t)), &index, 1, ""); value = convert (ctx, values [ins->sreg1], t); @@ -7946,7 +8024,7 @@ MONO_RESTORE_WARNING element_ix = rhs; break; default: - element_ix = const_int32 (ins->inst_c0); + element_ix = const_int32 (GTMREG_TO_INT (ins->inst_c0)); } #ifdef TARGET_WASM @@ -8296,22 +8374,22 @@ MONO_RESTORE_WARNING break; } case OP_INSERT_I1: - values [ins->dreg] = LLVMBuildInsertElement (builder, values [ins->sreg1], convert (ctx, values [ins->sreg2], LLVMInt8Type ()), const_int32 (ins->inst_c0), dname); + values [ins->dreg] = LLVMBuildInsertElement (builder, values [ins->sreg1], convert (ctx, values [ins->sreg2], LLVMInt8Type ()), const_int32 (GTMREG_TO_INT (ins->inst_c0)), dname); break; case OP_INSERT_I2: - values [ins->dreg] = LLVMBuildInsertElement (builder, values [ins->sreg1], convert (ctx, values [ins->sreg2], LLVMInt16Type ()), const_int32 (ins->inst_c0), dname); + values [ins->dreg] = LLVMBuildInsertElement (builder, values [ins->sreg1], convert (ctx, values [ins->sreg2], LLVMInt16Type ()), const_int32 (GTMREG_TO_INT (ins->inst_c0)), dname); break; case OP_INSERT_I4: - values [ins->dreg] = LLVMBuildInsertElement (builder, values [ins->sreg1], convert (ctx, values [ins->sreg2], LLVMInt32Type ()), const_int32 (ins->inst_c0), dname); + values [ins->dreg] = LLVMBuildInsertElement (builder, values [ins->sreg1], convert (ctx, values [ins->sreg2], LLVMInt32Type ()), const_int32 (GTMREG_TO_INT (ins->inst_c0)), dname); break; case OP_INSERT_I8: - values [ins->dreg] = LLVMBuildInsertElement (builder, values [ins->sreg1], convert (ctx, values [ins->sreg2], LLVMInt64Type ()), const_int32 (ins->inst_c0), dname); + values [ins->dreg] = LLVMBuildInsertElement (builder, values [ins->sreg1], convert (ctx, values [ins->sreg2], LLVMInt64Type ()), const_int32 (GTMREG_TO_INT (ins->inst_c0)), dname); break; case OP_INSERT_R4: - values [ins->dreg] = LLVMBuildInsertElement (builder, values [ins->sreg1], convert (ctx, values [ins->sreg2], LLVMFloatType ()), const_int32 (ins->inst_c0), dname); + values [ins->dreg] = LLVMBuildInsertElement (builder, values [ins->sreg1], convert (ctx, values [ins->sreg2], LLVMFloatType ()), const_int32 (GTMREG_TO_INT (ins->inst_c0)), dname); break; case OP_INSERT_R8: - values [ins->dreg] = LLVMBuildInsertElement (builder, values [ins->sreg1], convert (ctx, values [ins->sreg2], LLVMDoubleType ()), const_int32 (ins->inst_c0), dname); + values [ins->dreg] = LLVMBuildInsertElement (builder, values [ins->sreg1], convert (ctx, values [ins->sreg2], LLVMDoubleType ()), const_int32 (GTMREG_TO_INT (ins->inst_c0)), dname); break; case OP_XCAST: { LLVMTypeRef t = simd_class_to_llvm_type (ctx, ins->klass); @@ -8366,7 +8444,7 @@ MONO_RESTORE_WARNING #if defined(TARGET_X86) || defined(TARGET_AMD64) || defined(TARGET_WASM) case OP_SIMD_STORE: { LLVMValueRef dst_vec = convert (ctx, lhs, pointer_type (LLVMTypeOf (rhs))); - mono_llvm_build_aligned_store (builder, rhs, dst_vec, FALSE, ins->inst_c0); + mono_llvm_build_aligned_store (builder, rhs, dst_vec, FALSE, GTMREG_TO_INT (ins->inst_c0)); break; } case OP_PADDB: @@ -8639,7 +8717,7 @@ MONO_RESTORE_WARNING int mask [16]; LLVMValueRef v1 = NULL, v2 = NULL, mask_values [16]; int i, mask_size = 0; - int imask = ins->inst_c0; + int imask = GTMREG_TO_INT (ins->inst_c0); /* Convert the x86 shuffle mask to LLVM's */ switch (ins->opcode) { @@ -8916,14 +8994,14 @@ MONO_RESTORE_WARNING convert (ctx, lhs, sse_i2_t), convert (ctx, rhs, sse_i2_t), create_const_vector_i32 (mask_values, 8), ""); - values [ins->dreg] = convert (ctx, shuffled, type_to_sse_type (ins->inst_c1)); + values [ins->dreg] = convert (ctx, shuffled, type_to_sse_type (GTMREG_TO_INT (ins->inst_c1))); } else if (ins->inst_c1 == MONO_TYPE_I1 || ins->inst_c1 == MONO_TYPE_U1) { const int mask_values [] = { 0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5, 21, 6, 22, 7, 23 }; LLVMValueRef shuffled = LLVMBuildShuffleVector (builder, convert (ctx, lhs, sse_i1_t), convert (ctx, rhs, sse_i1_t), create_const_vector_i32 (mask_values, 16), ""); - values [ins->dreg] = convert (ctx, shuffled, type_to_sse_type (ins->inst_c1)); + values [ins->dreg] = convert (ctx, shuffled, type_to_sse_type (GTMREG_TO_INT (ins->inst_c1))); } else { g_assert_not_reached (); } @@ -8941,14 +9019,14 @@ MONO_RESTORE_WARNING convert (ctx, lhs, sse_i2_t), convert (ctx, rhs, sse_i2_t), create_const_vector_i32 (mask_values, 8), ""); - values [ins->dreg] = convert (ctx, shuffled, type_to_sse_type (ins->inst_c1)); + values [ins->dreg] = convert (ctx, shuffled, type_to_sse_type (GTMREG_TO_INT (ins->inst_c1))); } else if (ins->inst_c1 == MONO_TYPE_I1 || ins->inst_c1 == MONO_TYPE_U1) { const int mask_values [] = { 8, 24, 9, 25, 10, 26, 11, 27, 12, 28, 13, 29, 14, 30, 15, 31 }; LLVMValueRef shuffled = LLVMBuildShuffleVector (builder, convert (ctx, lhs, sse_i1_t), convert (ctx, rhs, sse_i1_t), create_const_vector_i32 (mask_values, 16), ""); - values [ins->dreg] = convert (ctx, shuffled, type_to_sse_type (ins->inst_c1)); + values [ins->dreg] = convert (ctx, shuffled, type_to_sse_type (GTMREG_TO_INT (ins->inst_c1))); } else { g_assert_not_reached (); } @@ -8957,15 +9035,15 @@ MONO_RESTORE_WARNING case OP_SSE_LOADU: { LLVMValueRef dst_ptr = convert (ctx, lhs, pointer_type (primitive_type_to_llvm_type (inst_c1_type (ins)))); - LLVMTypeRef etype = type_to_sse_type (ins->inst_c1); + LLVMTypeRef etype = type_to_sse_type (GTMREG_TO_INT (ins->inst_c1)); LLVMValueRef dst_vec = LLVMBuildBitCast (builder, dst_ptr, pointer_type (etype), ""); - values [ins->dreg] = mono_llvm_build_aligned_load (builder, etype, dst_vec, "", FALSE, ins->inst_c0); // inst_c0 is alignment + values [ins->dreg] = mono_llvm_build_aligned_load (builder, etype, dst_vec, "", FALSE, GTMREG_TO_INT (ins->inst_c0)); // inst_c0 is alignment break; } case OP_SSE_MOVSS: { LLVMValueRef addr = convert (ctx, lhs, pointer_type (LLVMFloatType ())); LLVMValueRef val = LLVMBuildLoad2 (builder, LLVMFloatType (), addr, ""); - values [ins->dreg] = LLVMBuildInsertElement (builder, LLVMConstNull (type_to_sse_type (ins->inst_c1)), val, const_int32 (0), ""); + values [ins->dreg] = LLVMBuildInsertElement (builder, LLVMConstNull (type_to_sse_type (GTMREG_TO_INT (ins->inst_c1))), val, const_int32 (0), ""); break; } case OP_SSE_MOVSS_STORE: { @@ -9037,7 +9115,7 @@ MONO_RESTORE_WARNING } case OP_SSE_MOVNTPS: { LLVMValueRef addr = convert (ctx, lhs, pointer_type (LLVMTypeOf (rhs))); - LLVMValueRef store = mono_llvm_build_aligned_store (builder, rhs, addr, FALSE, ins->inst_c0); + LLVMValueRef store = mono_llvm_build_aligned_store (builder, rhs, addr, FALSE, GTMREG_TO_INT (ins->inst_c0)); set_nontemporal_flag (store); break; } @@ -9070,7 +9148,7 @@ MONO_RESTORE_WARNING LLVMValueRef vec_lhs_i64 = convert (ctx, lhs, sse_i8_t); LLVMValueRef vec_rhs_i64 = convert (ctx, rhs, sse_i8_t); LLVMValueRef vec_and = LLVMBuildOr (builder, vec_lhs_i64, vec_rhs_i64, ""); - values [ins->dreg] = LLVMBuildBitCast (builder, vec_and, type_to_sse_type (ins->inst_c1), ""); + values [ins->dreg] = LLVMBuildBitCast (builder, vec_and, type_to_sse_type (GTMREG_TO_INT (ins->inst_c1)), ""); break; } @@ -9078,7 +9156,7 @@ MONO_RESTORE_WARNING LLVMValueRef vec_lhs_i64 = convert (ctx, lhs, sse_i8_t); LLVMValueRef vec_rhs_i64 = convert (ctx, rhs, sse_i8_t); LLVMValueRef vec_and = LLVMBuildXor (builder, vec_lhs_i64, vec_rhs_i64, ""); - values [ins->dreg] = LLVMBuildBitCast (builder, vec_and, type_to_sse_type (ins->inst_c1), ""); + values [ins->dreg] = LLVMBuildBitCast (builder, vec_and, type_to_sse_type (GTMREG_TO_INT (ins->inst_c1)), ""); break; } @@ -9086,7 +9164,7 @@ MONO_RESTORE_WARNING LLVMValueRef vec_lhs_i64 = convert (ctx, lhs, sse_i8_t); LLVMValueRef vec_rhs_i64 = convert (ctx, rhs, sse_i8_t); LLVMValueRef vec_and = LLVMBuildAnd (builder, vec_lhs_i64, vec_rhs_i64, ""); - values [ins->dreg] = LLVMBuildBitCast (builder, vec_and, type_to_sse_type (ins->inst_c1), ""); + values [ins->dreg] = LLVMBuildBitCast (builder, vec_and, type_to_sse_type (GTMREG_TO_INT (ins->inst_c1)), ""); break; } @@ -9339,8 +9417,8 @@ MONO_RESTORE_WARNING case OP_PADDW_SAT_UN: type = MONO_TYPE_U2; break; case OP_PSUBB_SAT_UN: type = MONO_TYPE_U1; is_add = FALSE; break; case OP_PSUBW_SAT_UN: type = MONO_TYPE_U2; is_add = FALSE; break; - case OP_SSE2_ADDS: type = ins->inst_c1; break; - case OP_SSE2_SUBS: type = ins->inst_c1; is_add = FALSE; break; + case OP_SSE2_ADDS: type = GTMREG_TO_INT (ins->inst_c1); break; + case OP_SSE2_SUBS: type = GTMREG_TO_INT (ins->inst_c1); is_add = FALSE; break; default: g_assert_not_reached (); } if (is_add) { @@ -9373,7 +9451,7 @@ MONO_RESTORE_WARNING args [1] = convert (ctx, rhs, sse_i2_t); values [ins->dreg] = convert (ctx, call_intrins (ctx, INTRINS_SSE_PACKUSWB, args, dname), - type_to_sse_type (ins->inst_c1)); + type_to_sse_type (GTMREG_TO_INT (ins->inst_c1))); break; } @@ -9381,7 +9459,7 @@ MONO_RESTORE_WARNING LLVMValueRef args [] = { lhs, rhs }; values [ins->dreg] = convert (ctx, call_intrins (ctx, INTRINS_SSE_PSRLI_W, args, dname), - type_to_sse_type (ins->inst_c1)); + type_to_sse_type (GTMREG_TO_INT (ins->inst_c1))); break; } @@ -9435,7 +9513,7 @@ MONO_RESTORE_WARNING LLVMPositionBuilderAtEnd (builder, cbb); values [ins->dreg] = LLVMBuildPhi (builder, LLVMTypeOf (phi_values [0]), ""); LLVMAddIncoming (values [ins->dreg], phi_values, bbs, nelems + 1); - values [ins->dreg] = convert (ctx, values [ins->dreg], type_to_sse_type (ins->inst_c1)); + values [ins->dreg] = convert (ctx, values [ins->dreg], type_to_sse_type (GTMREG_TO_INT (ins->inst_c1))); ctx->bblocks [bb->block_num].end_bblock = cbb; break; @@ -9626,7 +9704,7 @@ MONO_RESTORE_WARNING } case OP_SSE41_ROUNDP: { - LLVMValueRef args [] = { lhs, const_int32 (ins->inst_c0) }; + LLVMValueRef args [] = { lhs, const_int32 (GTMREG_TO_INT (ins->inst_c0)) }; values [ins->dreg] = call_intrins (ctx, ins->inst_c1 == MONO_TYPE_R4 ? INTRINS_SSE_ROUNDPS : INTRINS_SSE_ROUNDPD, args, dname); break; } @@ -9634,7 +9712,7 @@ MONO_RESTORE_WARNING LLVMValueRef args [3]; args [0] = lhs; args [1] = rhs; - args [2] = const_int32 (ins->inst_c0); + args [2] = const_int32 (GTMREG_TO_INT (ins->inst_c0)); values [ins->dreg] = call_intrins (ctx, ins->inst_c1 == MONO_TYPE_R4 ? INTRINS_SSE_ROUNDSS : INTRINS_SSE_ROUNDSD, args, dname); break; } @@ -9815,7 +9893,7 @@ MONO_RESTORE_WARNING case OP_SSE41_LOADANT: { LLVMValueRef dst_ptr = convert (ctx, lhs, pointer_type (primitive_type_to_llvm_type (inst_c1_type (ins)))); - LLVMTypeRef etype = type_to_sse_type (ins->inst_c1); + LLVMTypeRef etype = type_to_sse_type (GTMREG_TO_INT (ins->inst_c1)); LLVMValueRef dst_vec = LLVMBuildBitCast (builder, dst_ptr, pointer_type (etype), ""); LLVMValueRef load = mono_llvm_build_aligned_load (builder, etype, dst_vec, "", FALSE, 16); set_nontemporal_flag (load); @@ -9905,7 +9983,7 @@ MONO_RESTORE_WARNING LLVMValueRef vec_xor = LLVMBuildXor (builder, vec_lhs_i64, LLVMConstVector (minus_one, 2), ""); LLVMValueRef vec_rhs_i64 = convert (ctx, rhs, sse_i8_t); LLVMValueRef vec_and = LLVMBuildAnd (builder, vec_rhs_i64, vec_xor, ""); - values [ins->dreg] = LLVMBuildBitCast (builder, vec_and, type_to_sse_type (ins->inst_c1), ""); + values [ins->dreg] = LLVMBuildBitCast (builder, vec_and, type_to_sse_type (GTMREG_TO_INT (ins->inst_c1)), ""); break; } @@ -9913,7 +9991,7 @@ MONO_RESTORE_WARNING // %sub = sub <16 x i8> zeroinitializer, %arg // %cmp = icmp sgt <16 x i8> %arg, zeroinitializer // %abs = select <16 x i1> %cmp, <16 x i8> %arg, <16 x i8> %sub - LLVMTypeRef typ = type_to_sse_type (ins->inst_c1); + LLVMTypeRef typ = type_to_sse_type (GTMREG_TO_INT (ins->inst_c1)); LLVMValueRef sub = LLVMBuildSub(builder, LLVMConstNull(typ), lhs, ""); LLVMValueRef cmp = LLVMBuildICmp(builder, LLVMIntSGT, lhs, LLVMConstNull(typ), ""); LLVMValueRef abs = LLVMBuildSelect (builder, cmp, lhs, sub, ""); @@ -10469,7 +10547,7 @@ MONO_RESTORE_WARNING case INTRINS_AARCH64_PMULL64: getElement = TRUE; bitcast_result = TRUE; - element_idx = ins->inst_c1; + element_idx = GTMREG_TO_INT (ins->inst_c1); break; case INTRINS_AARCH64_CRC32B: case INTRINS_AARCH64_CRC32H: @@ -10742,7 +10820,7 @@ MONO_RESTORE_WARNING llvm_ovr_tag_t ovr_tag = ovr_tag_from_llvm_type (ret_t); LLVMTypeRef elem_t = LLVMGetElementType (ret_t); LLVMValueRef result = NULL; - int iid = ins->inst_c0; + int iid = GTMREG_TO_INT (ins->inst_c0); int scalar_iid = 0; switch (iid) { case INTRINS_AARCH64_ADV_SIMD_SQXTUN: scalar_iid = INTRINS_AARCH64_ADV_SIMD_SCALAR_SQXTUN; break; @@ -11106,7 +11184,7 @@ MONO_RESTORE_WARNING LLVMTypeRef elem_t = LLVMGetElementType (t); unsigned int group_bits = mono_llvm_get_prim_size_bits (elem_t); unsigned int vec_bits = mono_llvm_get_prim_size_bits (t); - unsigned int tmp_bits = ins->inst_c0; + unsigned int tmp_bits = GTMREG_TO_UINT (ins->inst_c0); unsigned int tmp_elements = vec_bits / tmp_bits; const int cycle8 [] = { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 }; const int cycle4 [] = { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 }; @@ -11190,7 +11268,7 @@ MONO_RESTORE_WARNING LLVMValueRef shift_amount = rhs; gboolean high = FALSE; gboolean scalar = FALSE; - int iid = ins->inst_c0; + int iid = GTMREG_TO_INT (ins->inst_c0); switch (ins->opcode) { case OP_ARM64_XNSHIFT_SCALAR: scalar = TRUE; break; case OP_ARM64_XNSHIFT2: high = TRUE; break; @@ -11559,7 +11637,7 @@ MONO_RESTORE_WARNING llvm_ovr_tag_t ovr_tag = ovr_tag_from_llvm_type (arg_t); if (elem_t == i1_t || elem_t == i2_t) truncate = TRUE; - LLVMValueRef result = call_overloaded_intrins (ctx, ins->inst_c0, ovr_tag, &lhs, ""); + LLVMValueRef result = call_overloaded_intrins (ctx, GTMREG_TO_INT (ins->inst_c0), ovr_tag, &lhs, ""); if (truncate) { // @llvm.aarch64.neon.saddv.i32.v8i16 ought to return an i16, but doesn't in LLVM 9. result = LLVMBuildTrunc (builder, result, elem_t, ""); @@ -11692,7 +11770,7 @@ MONO_RESTORE_WARNING } case OP_ARM64_ABSCOMPARE: { IntrinsicId iid = (IntrinsicId) ins->inst_c0; - gboolean scalar = ins->inst_c1; + gboolean scalar = ins->inst_c1 != 0; LLVMTypeRef ret_t = simd_class_to_llvm_type (ctx, ins->klass); LLVMTypeRef elem_t = LLVMGetElementType (ret_t); llvm_ovr_tag_t ovr_tag = ovr_tag_from_mono_vector_class (ins->klass); @@ -11714,7 +11792,7 @@ MONO_RESTORE_WARNING } case OP_ARM64_TBL_INDIRECT: case OP_ARM64_TBX_INDIRECT: { - int nvectors = ins->inst_c0; + int nvectors = GTMREG_TO_INT (ins->inst_c0); guint32 *offsets = (guint32*)ins->inst_p1; LLVMValueRef args [16]; @@ -12043,6 +12121,8 @@ MONO_RESTORE_WARNING } } + g_assert (last_divrem == NULL); + if (!ctx_ok (ctx)) return; @@ -14387,7 +14467,7 @@ emit_dbg_loc (EmitContext *ctx, LLVMBuilderRef builder, const unsigned char *cil MonoDebugSourceLocation *loc; LLVMValueRef loc_md; - loc = mono_debug_method_lookup_location (ctx->minfo, cil_code - cfg->header->code); + loc = mono_debug_method_lookup_location (ctx->minfo, GPTRDIFF_TO_INT (cil_code - cfg->header->code)); if (loc) { loc_md = (LLVMValueRef)mono_llvm_di_create_location (ctx->module->di_builder, ctx->dbg_md, loc->row, loc->column); diff --git a/src/mono/mono/mini/mini-ops.h b/src/mono/mono/mini/mini-ops.h index d95f0948073402..2813ae20351600 100644 --- a/src/mono/mono/mini/mini-ops.h +++ b/src/mono/mono/mini/mini-ops.h @@ -1184,6 +1184,28 @@ MINI_OP3(OP_MULX_HL64, "mulxhl64", LREG, LREG, LREG, LREG) #endif +#if defined(TARGET_X86) || defined(TARGET_AMD64) +/* + * These operations exist to facilitate simultaneous int/uint division + * and remainder on x86/x86-64. On that platform the DIV/IDIV instructions + * operate as follows edx:eax/reg32 -> (eax=quotient,edx=remainder). Mono + * ops only support one destination register, so two operations are needed + * to obtain two result values. One would use {long,int}_divrem[_un] first, + * and the corresponding {long_int}_divrem2 immediately afterwards. The + * first instruction returns the quotient and leaves the remainder in the + * edx(rdx) register. The second instruction puts a virtual register over + * edx, so that its value can be used. Note that if the first instruction + * is emitted, the second must be also (there is an assert). This works + * both in LLVM and mini. + */ +MINI_OP3(OP_X86_LDIVREM, "long_divrem", LREG, LREG, LREG, LREG) +MINI_OP3(OP_X86_LDIVREMU, "long_divrem_un", LREG, LREG, LREG, LREG) +MINI_OP3(OP_X86_LDIVREM2, "long_divrem2", LREG, NONE, NONE, NONE) +MINI_OP3(OP_X86_IDIVREM, "int_divrem", IREG, IREG, IREG, IREG) +MINI_OP3(OP_X86_IDIVREMU, "int_divrem_un", IREG, IREG, IREG, IREG) +MINI_OP3(OP_X86_IDIVREM2, "int_divrem2", IREG, NONE, NONE, NONE) +#endif + MINI_OP(OP_CREATE_SCALAR_UNSAFE, "create_scalar_unsafe", XREG, XREG, NONE) MINI_OP(OP_CREATE_SCALAR, "create_scalar", XREG, XREG, NONE) diff --git a/src/mono/mono/mini/mini-runtime.c b/src/mono/mono/mini/mini-runtime.c index d075623de8cf73..404316beeba4a9 100644 --- a/src/mono/mono/mini/mini-runtime.c +++ b/src/mono/mono/mini/mini-runtime.c @@ -1239,7 +1239,7 @@ mono_patch_info_hash (gconstpointer data) case MONO_PATCH_INFO_AOT_JIT_INFO: case MONO_PATCH_INFO_METHOD_PINVOKE_ADDR_CACHE: case MONO_PATCH_INFO_GSHARED_METHOD_INFO: - return hash | GPOINTER_TO_UINT (ji->data.target); + return hash | GCONSTPOINTER_TO_UINT (ji->data.target); case MONO_PATCH_INFO_GSHAREDVT_CALL: return hash | GPOINTER_TO_UINT (ji->data.gsharedvt->method); case MONO_PATCH_INFO_RGCTX_FETCH: @@ -2074,17 +2074,17 @@ typedef struct } JitCodeLoadRecord; typedef struct { - guint64 code_addr; - guint32 line; - guint32 discrim; - char name[]; + guint64 code_addr; + guint32 line; + guint32 discrim; + char name[]; } DebugEntry; typedef struct { - RecordHeader header; - guint64 code_addr; - guint64 nr_entry; - DebugEntry debug_entry[]; + RecordHeader header; + guint64 code_addr; + guint64 nr_entry; + DebugEntry debug_entry[]; } JitCodeDebug; static void add_basic_JitCodeDebug_info (JitCodeDebug *record); @@ -2138,104 +2138,102 @@ mono_emit_jit_dump (MonoJitInfo *jinfo, gpointer code) { static uint64_t code_index; - if (perf_dump_file) { - JitCodeLoadRecord record; - size_t nameLen = strlen (jinfo->d.method->name); - memset (&record, 0, sizeof (record)); + if (!perf_dump_file) + return; - add_basic_JitCodeLoadRecord_info (&record); - record.header.total_size = sizeof (record) + nameLen + 1 + jinfo->code_size; - record.vma = (guint64)jinfo->code_start; - record.code_addr = (guint64)jinfo->code_start; - record.code_size = (guint64)jinfo->code_size; + JitCodeLoadRecord record; + size_t nameLen = strlen (jinfo->d.method->name); + memset (&record, 0, sizeof (record)); - mono_os_mutex_lock (&perf_dump_mutex); + add_basic_JitCodeLoadRecord_info (&record); + record.header.total_size = sizeof (record) + nameLen + 1 + jinfo->code_size; + record.vma = (guint64)jinfo->code_start; + record.code_addr = (guint64)jinfo->code_start; + record.code_size = (guint64)jinfo->code_size; - record.code_index = ++code_index; - - DebugEntry ent; - JitCodeDebug rec; - MonoDebugMethodInfo *minfo; - MonoDebugMethodJitInfo *dmji; - MonoDebugSourceLocation *loc; - int i; - - memset (&rec, 0, sizeof (rec)); - - //populating info relating debug methods - minfo = mono_debug_lookup_method (jinfo->d.method); - dmji = mono_debug_find_method (jinfo->d.method, NULL); - - add_basic_JitCodeDebug_info (&rec); - rec.code_addr = (guint64)dmji->code_start; - rec.header.total_size = sizeof (rec) + sizeof (ent) + 1; - rec.nr_entry = 1; - for (i = 0; i < dmji->num_line_numbers; ++i){ - - loc = mono_debug_lookup_source_location_by_il (jinfo->d.method, dmji->line_numbers[i].il_offset, NULL); - - if(!loc) - continue; - - if(!loc->source_file){ - mono_debug_free_source_location (loc); - continue; - } - - rec.header.total_size += sizeof (ent) + strlen (loc->source_file) + 1; - rec.nr_entry++; - } - - fwrite (&rec, sizeof (rec), 1, perf_dump_file); - - - for( i = 0; i < dmji->num_line_numbers; ++i){ - - //get the line number using il offset - loc = mono_debug_lookup_source_location_by_il (jinfo->d.method, dmji->line_numbers[i].il_offset, NULL); - - if(!loc) - continue; - - if(!loc->source_file){ - - mono_debug_free_source_location (loc); - continue; - } - - ent.code_addr = (guint64)dmji->code_start + dmji->line_numbers[i].native_offset; - ent.discrim = 0; - ent.line = (guint32)loc->row; - - fwrite (&ent, sizeof(ent), 1, perf_dump_file); - fwrite (loc->source_file, strlen (loc->source_file) + 1, 1, perf_dump_file); - } - - - ent.code_addr = (guint64)jinfo->code_start + jinfo->code_size; - ent.discrim = 0; - ent.line = 0; - fwrite (&ent, sizeof (ent), 1, perf_dump_file); - fwrite ("", 1, 1, perf_dump_file); - - // TODO: write unwindInfo immediately before the JitCodeLoadRecord (while lock is held). - - record.header.timestamp = mono_clock_get_time_ns (clock_id); - - fwrite (&record, sizeof (record), 1, perf_dump_file); - fwrite (jinfo->d.method->name, nameLen + 1, 1, perf_dump_file); - fwrite (code, jinfo->code_size, 1, perf_dump_file); + mono_os_mutex_lock (&perf_dump_mutex); - mono_os_mutex_unlock (&perf_dump_mutex); + record.code_index = ++code_index; + + DebugEntry ent; + JitCodeDebug rec; + MonoDebugMethodJitInfo *dmji; + MonoDebugSourceLocation *loc; + int i; + + memset (&rec, 0, sizeof (rec)); + + // populating info relating debug methods + dmji = mono_debug_find_method (jinfo->d.method, NULL); + + add_basic_JitCodeDebug_info (&rec); + rec.code_addr = (guint64)dmji->code_start; + rec.header.total_size = sizeof (rec) + sizeof (ent) + 1; + rec.nr_entry = 1; + + for (i = 0; i < dmji->num_line_numbers; ++i) { + + loc = mono_debug_lookup_source_location_by_il (jinfo->d.method, dmji->line_numbers[i].il_offset, NULL); + + if (!loc) + continue; + + if (!loc->source_file) { + mono_debug_free_source_location (loc); + continue; + } + + rec.header.total_size += sizeof (ent) + strlen (loc->source_file) + 1; + rec.nr_entry++; + } + + fwrite (&rec, sizeof (rec), 1, perf_dump_file); + + for (i = 0; i < dmji->num_line_numbers; ++i) { + + // get the line number using il offset + loc = mono_debug_lookup_source_location_by_il (jinfo->d.method, dmji->line_numbers[i].il_offset, NULL); + + if (!loc) + continue; + + if (!loc->source_file) { + mono_debug_free_source_location (loc); + continue; + } + + ent.code_addr = (guint64)dmji->code_start + dmji->line_numbers[i].native_offset; + ent.discrim = 0; + ent.line = (guint32)loc->row; + + fwrite (&ent, sizeof(ent), 1, perf_dump_file); + fwrite (loc->source_file, strlen (loc->source_file) + 1, 1, perf_dump_file); } + + ent.code_addr = (guint64)jinfo->code_start + jinfo->code_size; + ent.discrim = 0; + ent.line = 0; + fwrite (&ent, sizeof (ent), 1, perf_dump_file); + fwrite ("", 1, 1, perf_dump_file); + + // TODO: write unwindInfo immediately before the JitCodeLoadRecord (while lock is held). + + record.header.timestamp = mono_clock_get_time_ns (clock_id); + + fwrite (&record, sizeof (record), 1, perf_dump_file); + fwrite (jinfo->d.method->name, nameLen + 1, 1, perf_dump_file); + fwrite (code, jinfo->code_size, 1, perf_dump_file); + + mono_os_mutex_unlock (&perf_dump_mutex); } + static void add_basic_JitCodeDebug_info (JitCodeDebug *record) { - record->header.id = JIT_DEBUG_INFO; - record->header.timestamp = mono_clock_get_time_ns (clock_id); - + record->header.id = JIT_DEBUG_INFO; + record->header.timestamp = mono_clock_get_time_ns (clock_id); } + static void add_basic_JitCodeLoadRecord_info (JitCodeLoadRecord *record) { @@ -4471,7 +4469,7 @@ init_class (MonoClass *klass) const char *name = m_class_get_name (klass); -#if defined(TARGET_AMD64) || defined(TARGET_ARM64) || defined(TARGET_WASM) +#if defined(TARGET_AMD64) || defined(TARGET_WASM) /* * Some of the intrinsics used by the VectorX classes are only implemented on amd64. * The JIT can't handle SIMD types with != 16 size yet. @@ -4483,6 +4481,14 @@ init_class (MonoClass *klass) } #endif +#ifdef TARGET_ARM64 + if (!strcmp (m_class_get_name_space (klass), "System.Numerics")) { + // FIXME: Support Vector3 https://github.com/dotnet/runtime/issues/81501 + if (!strcmp (name, "Vector2") || !strcmp (name, "Vector4") || !strcmp (name, "Quaternion") || !strcmp (name, "Plane")) + mono_class_set_is_simd_type (klass, TRUE); + } +#endif + if (m_class_is_ginst (klass)) { if (!strcmp (name, "Vector`1") || !strcmp (name, "Vector64`1") || !strcmp (name, "Vector128`1") || !strcmp (name, "Vector256`1") || !strcmp (name, "Vector512`1")) { MonoGenericClass *gclass = mono_class_try_get_generic_class (klass); diff --git a/src/mono/mono/mini/mini-wasm.h b/src/mono/mono/mini/mini-wasm.h index 22c998018b59a0..796b7a0069bdbb 100644 --- a/src/mono/mono/mini/mini-wasm.h +++ b/src/mono/mono/mini/mini-wasm.h @@ -91,7 +91,11 @@ typedef struct { #define MONO_ARCH_HAS_REGISTER_ICALL 1 #define MONO_ARCH_HAVE_SDB_TRAMPOLINES 1 #define MONO_ARCH_LLVM_TARGET_LAYOUT "e-m:e-p:32:32-i64:64-n32:64-S128" +#ifdef TARGET_WASI +#define MONO_ARCH_LLVM_TARGET_TRIPLE "wasm32-unknown-wasi" +#else #define MONO_ARCH_LLVM_TARGET_TRIPLE "wasm32-unknown-emscripten" +#endif // sdks/wasm/driver.c is C and uses this G_EXTERN_C void mono_wasm_enable_debugging (int log_level); diff --git a/src/mono/mono/mini/mini-x86.c b/src/mono/mono/mini/mini-x86.c index 65dea3f7086198..80116fb5497f32 100644 --- a/src/mono/mono/mini/mini-x86.c +++ b/src/mono/mono/mini/mini-x86.c @@ -951,22 +951,22 @@ mono_arch_is_int_overflow (void *sigctx, void *info) /* idiv REG */ switch (x86_modrm_rm (ip [1])) { case X86_EAX: - reg = ctx.eax; + reg = GHMREG_TO_INT32 (ctx.eax); break; case X86_ECX: - reg = ctx.ecx; + reg = GHMREG_TO_INT32 (ctx.ecx); break; case X86_EDX: - reg = ctx.edx; + reg = GHMREG_TO_INT32 (ctx.edx); break; case X86_EBX: - reg = ctx.ebx; + reg = GHMREG_TO_INT32 (ctx.ebx); break; case X86_ESI: - reg = ctx.esi; + reg = GHMREG_TO_INT32 (ctx.esi); break; case X86_EDI: - reg = ctx.edi; + reg = GHMREG_TO_INT32 (ctx.edi); break; default: g_assert_not_reached (); @@ -1828,7 +1828,7 @@ mono_arch_emit_setret (MonoCompile *cfg, MonoMethod *method, MonoInst *val) if (ins->inst_true_bb->native_offset) { \ x86_branch (code, cond, cfg->native_code + ins->inst_true_bb->native_offset, sign); \ } else { \ - mono_add_patch_info (cfg, code - cfg->native_code, MONO_PATCH_INFO_BB, ins->inst_true_bb); \ + mono_add_patch_info (cfg, GPTRDIFF_TO_INT (code - cfg->native_code), MONO_PATCH_INFO_BB, ins->inst_true_bb); \ if ((cfg->opt & MONO_OPT_BRANCH) && x86_is_imm8 (ins->inst_true_bb->max_offset - cpos)) \ x86_branch8 (code, cond, 0, sign); \ else \ @@ -1843,7 +1843,7 @@ if (ins->inst_true_bb->native_offset) { \ do { \ MonoInst *tins = mono_branch_optimize_exception_target (cfg, bb, exc_name); \ if (tins == NULL) { \ - mono_add_patch_info (cfg, code - cfg->native_code, \ + mono_add_patch_info (cfg, GPTRDIFF_TO_INT (code - cfg->native_code), \ MONO_PATCH_INFO_EXC, exc_name); \ x86_branch32 (code, cond, 0, signed); \ } else { \ @@ -1879,7 +1879,7 @@ x86_align_and_patch (MonoCompile *cfg, guint8 *code, guint32 patch_type, gconstp if (needs_paddings && pad_size) x86_padding (code, 4 - pad_size); - mono_add_patch_info (cfg, code - cfg->native_code, (MonoJumpInfoType)patch_type, data); + mono_add_patch_info (cfg, GPTRDIFF_TO_INT (code - cfg->native_code), (MonoJumpInfoType)patch_type, data); return code; } @@ -1909,7 +1909,7 @@ emit_r8const (MonoCompile *cfg, guint8* code, int dreg, double *p) x86_sse_movsd_reg_membase (code, dreg, X86_ESP, 0); x86_alu_reg_imm (code, X86_ADD, X86_ESP, 8); } else { - mono_add_patch_info (cfg, code - cfg->native_code + X86_SSE_REG_MEM_OFFSET, MONO_PATCH_INFO_R8, p); + mono_add_patch_info (cfg, GPTRDIFF_TO_INT (code - cfg->native_code + X86_SSE_REG_MEM_OFFSET), MONO_PATCH_INFO_R8, p); x86_sse_movsd_reg_mem (code, dreg, (gsize)NULL); } } @@ -1930,7 +1930,7 @@ emit_r4const (MonoCompile *cfg, guint8* code, int dreg, float *p) x86_sse_movss_reg_membase (code, dreg, X86_ESP, 0); x86_alu_reg_imm (code, X86_ADD, X86_ESP, 4); } else { - mono_add_patch_info (cfg, code - cfg->native_code + X86_SSE_REG_MEM_OFFSET, MONO_PATCH_INFO_R4, p); + mono_add_patch_info (cfg, GPTRDIFF_TO_INT (code - cfg->native_code + X86_SSE_REG_MEM_OFFSET), MONO_PATCH_INFO_R4, p); x86_sse_movss_reg_mem (code, dreg, (gsize)NULL); } } @@ -2437,7 +2437,7 @@ emit_setup_lmf (MonoCompile *cfg, guint8 *code, gint32 lmf_offset, int cfa_offse x86_call_imm (code, 0); x86_pop_reg (code, X86_EAX); } else { - mono_add_patch_info (cfg, code + 1 - cfg->native_code, MONO_PATCH_INFO_IP, NULL); + mono_add_patch_info (cfg, GPTRDIFF_TO_INT (code + 1 - cfg->native_code), MONO_PATCH_INFO_IP, NULL); x86_mov_reg_imm (code, X86_EAX, 0); } x86_mov_membase_reg (code, cfg->frame_reg, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, eip), X86_EAX, sizeof (target_mgreg_t)); @@ -2509,13 +2509,13 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) set_code_cursor (cfg, code); - mono_debug_open_block (cfg, bb, code - cfg->native_code); + mono_debug_open_block (cfg, bb, GPTRDIFF_TO_UINT32 (code - cfg->native_code)); if (mono_break_at_bb_method && mono_method_desc_full_match (mono_break_at_bb_method, cfg->method) && bb->block_num == mono_break_at_bb_bb_num) x86_breakpoint (code); MONO_BB_FOR_EACH_INS (bb, ins) { - const guint offset = code - cfg->native_code; + const guint offset = GPTRDIFF_TO_UINT (code - cfg->native_code); set_code_cursor (cfg, code); int max_len = ins_get_size (ins->opcode); code = realloc_code (cfg, max_len); @@ -2705,7 +2705,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) case OP_NOT_NULL: break; case OP_IL_SEQ_POINT: - mono_add_seq_point (cfg, bb, ins, code - cfg->native_code); + mono_add_seq_point (cfg, bb, ins, GPTRDIFF_TO_INT (code - cfg->native_code)); break; case OP_SEQ_POINT: { int i; @@ -2740,7 +2740,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) * This means we have to put the loading of bp_tramp_var after the offset. */ - mono_add_seq_point (cfg, bb, ins, code - cfg->native_code); + mono_add_seq_point (cfg, bb, ins, GPTRDIFF_TO_INT (code - cfg->native_code)); MonoInst *var = cfg->arch.bp_tramp_var; @@ -2751,7 +2751,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) guint8 *start = code; x86_mov_reg_membase (code, X86_ECX, var->inst_basereg, var->inst_offset, 4); if (code < start + OP_SEQ_POINT_BP_OFFSET) { - int size = start + OP_SEQ_POINT_BP_OFFSET - code; + int size = GPTRDIFF_TO_INT (start + OP_SEQ_POINT_BP_OFFSET - code); x86_padding (code, size); } /* @@ -2877,6 +2877,19 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) } break; } + case OP_X86_LDIVREM: + case OP_X86_LDIVREMU: + case OP_X86_LDIVREM2: + g_assert_not_reached (); + break; + case OP_X86_IDIVREM: + case OP_X86_IDIVREMU: + x86_div_reg (code, ins->sreg3, ins->opcode==OP_X86_IDIVREM); + break; + case OP_X86_IDIVREM2: + if (ins->dreg != X86_EDX) + x86_mov_reg_reg (code, ins->dreg, X86_EDX); + break; case OP_IOR: x86_alu_reg_reg (code, X86_OR, ins->sreg1, ins->sreg2); break; @@ -3155,7 +3168,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) code = realloc_code (cfg, max_len); ins->flags |= MONO_INST_GC_CALLSITE; - ins->backend.pc_offset = code - cfg->native_code; + ins->backend.pc_offset = GPTRDIFF_TO_INT (code - cfg->native_code); g_assert (!cfg->method->save_lmf); @@ -3292,7 +3305,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) break; } ins->flags |= MONO_INST_GC_CALLSITE; - ins->backend.pc_offset = code - cfg->native_code; + ins->backend.pc_offset = GPTRDIFF_TO_INT (code - cfg->native_code); if (cinfo->callee_stack_pop) { /* Have to compensate for the stack space popped by the callee */ x86_alu_reg_imm (code, X86_SUB, X86_ESP, cinfo->callee_stack_pop); @@ -3309,6 +3322,12 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) case OP_X86_XCHG: x86_xchg_reg_reg (code, ins->sreg1, ins->sreg2, 4); break; + case OP_X86_BSF32: + x86_bsf (code, ins->dreg, ins->sreg1); + break; + case OP_X86_BSR32: + x86_bsr (code, ins->dreg, ins->sreg1); + break; case OP_LOCALLOC: /* keep alignment */ x86_alu_reg_imm (code, X86_ADD, ins->sreg1, MONO_ARCH_LOCALLOC_ALIGNMENT - 1); @@ -3343,7 +3362,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) code = emit_call (cfg, code, MONO_PATCH_INFO_JIT_ICALL_ID, GUINT_TO_POINTER (MONO_JIT_ICALL_mono_arch_throw_exception)); ins->flags |= MONO_INST_GC_CALLSITE; - ins->backend.pc_offset = code - cfg->native_code; + ins->backend.pc_offset = GPTRDIFF_TO_INT (code - cfg->native_code); break; } case OP_RETHROW: { @@ -3352,12 +3371,12 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) code = emit_call (cfg, code, MONO_PATCH_INFO_JIT_ICALL_ID, GUINT_TO_POINTER (MONO_JIT_ICALL_mono_arch_rethrow_exception)); ins->flags |= MONO_INST_GC_CALLSITE; - ins->backend.pc_offset = code - cfg->native_code; + ins->backend.pc_offset = GPTRDIFF_TO_INT (code - cfg->native_code); break; } case OP_CALL_HANDLER: x86_alu_reg_imm (code, X86_SUB, X86_ESP, MONO_ARCH_FRAME_ALIGNMENT - 4); - mono_add_patch_info (cfg, code - cfg->native_code, MONO_PATCH_INFO_BB, ins->inst_target_bb); + mono_add_patch_info (cfg, GPTRDIFF_TO_INT (code - cfg->native_code), MONO_PATCH_INFO_BB, ins->inst_target_bb); x86_call_imm (code, 0); for (GList *tmp = ins->inst_eh_blocks; tmp != bb->clause_holes; tmp = tmp->prev) mono_cfg_add_try_hole (cfg, ((MonoLeaveClause *) tmp->data)->clause, code, bb); @@ -3388,7 +3407,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) break; case OP_LABEL: - ins->inst_c0 = code - cfg->native_code; + ins->inst_c0 = GPTRDIFF_TO_TMREG (code - cfg->native_code); break; case OP_BR: if (ins->inst_target_bb->native_offset) { @@ -3676,13 +3695,13 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) /* throw exception */ tins = mono_branch_optimize_exception_target (cfg, bb, "OverflowException"); if (tins) { - mono_add_patch_info (cfg, code - cfg->native_code, MONO_PATCH_INFO_BB, tins->inst_true_bb); + mono_add_patch_info (cfg, GPTRDIFF_TO_INT (code - cfg->native_code), MONO_PATCH_INFO_BB, tins->inst_true_bb); if ((cfg->opt & MONO_OPT_BRANCH) && x86_is_imm8 (tins->inst_true_bb->max_offset - cpos)) x86_jump8 (code, 0); else x86_jump32 (code, 0); } else { - mono_add_patch_info (cfg, code - cfg->native_code, MONO_PATCH_INFO_EXC, "OverflowException"); + mono_add_patch_info (cfg, GPTRDIFF_TO_INT (code - cfg->native_code), MONO_PATCH_INFO_EXC, "OverflowException"); x86_jump32 (code, 0); } @@ -4848,13 +4867,13 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) case OP_LIVERANGE_START: { if (cfg->verbose_level > 1) printf ("R%d START=0x%x\n", MONO_VARINFO (cfg, ins->inst_c0)->vreg, (int)(code - cfg->native_code)); - MONO_VARINFO (cfg, ins->inst_c0)->live_range_start = code - cfg->native_code; + MONO_VARINFO (cfg, ins->inst_c0)->live_range_start = GPTRDIFF_TO_INT32 (code - cfg->native_code); break; } case OP_LIVERANGE_END: { if (cfg->verbose_level > 1) printf ("R%d END=0x%x\n", MONO_VARINFO (cfg, ins->inst_c0)->vreg, (int)(code - cfg->native_code)); - MONO_VARINFO (cfg, ins->inst_c0)->live_range_end = code - cfg->native_code; + MONO_VARINFO (cfg, ins->inst_c0)->live_range_end = GPTRDIFF_TO_INT32 (code - cfg->native_code); break; } case OP_GC_SAFE_POINT: { @@ -4870,10 +4889,10 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) case OP_GC_LIVENESS_DEF: case OP_GC_LIVENESS_USE: case OP_GC_PARAM_SLOT_LIVENESS_DEF: - ins->backend.pc_offset = code - cfg->native_code; + ins->backend.pc_offset = GPTRDIFF_TO_INT (code - cfg->native_code); break; case OP_GC_SPILL_SLOT_LIVENESS_DEF: - ins->backend.pc_offset = code - cfg->native_code; + ins->backend.pc_offset = GPTRDIFF_TO_INT (code - cfg->native_code); bb->spill_slot_defs = g_slist_prepend_mempool (cfg->mempool, bb->spill_slot_defs, ins); break; case OP_GET_SP: @@ -5373,7 +5392,7 @@ mono_arch_emit_exceptions (MonoCompile *cfg) x86_push_imm (code, m_class_get_type_token (exc_class) - MONO_TOKEN_TYPE_DEF); patch_info->data.jit_icall_id = MONO_JIT_ICALL_mono_arch_throw_corlib_exception; patch_info->type = MONO_PATCH_INFO_JIT_ICALL_ID; - patch_info->ip.i = code - cfg->native_code; + patch_info->ip.i = GPTRDIFF_TO_INT (code - cfg->native_code); x86_call_code (code, 0); x86_push_imm (buf, (code - cfg->native_code) - throw_ip); while (buf < buf2) @@ -5548,7 +5567,7 @@ mono_arch_build_imt_trampoline (MonoVTable *vtable, MonoIMTCheckItem **imt_entri } if (!fail_tramp) - UnlockedAdd (&mono_stats.imt_trampolines_size, code - start); + UnlockedAdd (&mono_stats.imt_trampolines_size, GPTRDIFF_TO_INT32 (code - start)); g_assertf (code - start <= size, "%d %d", (int)(code - start), size); #if DEBUG_IMT @@ -5570,7 +5589,7 @@ mono_arch_build_imt_trampoline (MonoVTable *vtable, MonoIMTCheckItem **imt_entri MONO_PROFILER_RAISE (jit_code_buffer, (start, code - start, MONO_PROFILER_CODE_BUFFER_IMT_TRAMPOLINE, NULL)); - mono_tramp_info_register (mono_tramp_info_create (NULL, start, code - start, NULL, unwind_ops), mem_manager); + mono_tramp_info_register (mono_tramp_info_create (NULL, start, GPTRDIFF_TO_UINT32 (code - start), NULL, unwind_ops), mem_manager); return start; } @@ -5692,7 +5711,7 @@ mono_breakpoint_clean_code (guint8 *method_start, guint8 *code, int offset, guin if (!method_start || code - offset >= method_start) { memcpy (buf, code - offset, size); } else { - int diff = code - method_start; + int diff = GPTRDIFF_TO_INT (code - method_start); memset (buf, 0, size); memcpy (buf + offset - diff, method_start, diff + size - offset); } @@ -5787,10 +5806,10 @@ get_delegate_invoke_impl (MonoTrampInfo **info, gboolean has_target, guint32 par g_assertf ((code - start) <= code_reserve, "%d %d", (int)(code - start), code_reserve); if (has_target) { - *info = mono_tramp_info_create ("delegate_invoke_impl_has_target", start, code - start, NULL, unwind_ops); + *info = mono_tramp_info_create ("delegate_invoke_impl_has_target", start, GPTRDIFF_TO_UINT32 (code - start), NULL, unwind_ops); } else { char *name = g_strdup_printf ("delegate_invoke_impl_target_%d", param_count); - *info = mono_tramp_info_create (name, start, code - start, NULL, unwind_ops); + *info = mono_tramp_info_create (name, start, GPTRDIFF_TO_UINT32 (code - start), NULL, unwind_ops); g_free (name); } @@ -5850,7 +5869,7 @@ get_delegate_virtual_invoke_impl (MonoTrampInfo **info, gboolean load_imt_reg, i MONO_PROFILER_RAISE (jit_code_buffer, (start, code - start, MONO_PROFILER_CODE_BUFFER_DELEGATE_INVOKE, NULL)); tramp_name = mono_get_delegate_virtual_invoke_impl_name (load_imt_reg, offset); - *info = mono_tramp_info_create (tramp_name, start, code - start, NULL, unwind_ops); + *info = mono_tramp_info_create (tramp_name, start, GPTRDIFF_TO_UINT32 (code - start), NULL, unwind_ops); g_free (tramp_name); @@ -6165,9 +6184,9 @@ mono_arch_emit_load_got_addr (guint8 *start, guint8 *code, MonoCompile *cfg, Mon * to be added to that address. */ if (cfg) - mono_add_patch_info (cfg, code - cfg->native_code, MONO_PATCH_INFO_GOT_OFFSET, NULL); + mono_add_patch_info (cfg, GPTRDIFF_TO_INT (code - cfg->native_code), MONO_PATCH_INFO_GOT_OFFSET, NULL); else - *ji = mono_patch_info_list_prepend (*ji, code - start, MONO_PATCH_INFO_GOT_OFFSET, NULL); + *ji = mono_patch_info_list_prepend (*ji, GPTRDIFF_TO_INT (code - start), MONO_PATCH_INFO_GOT_OFFSET, NULL); x86_pop_reg (code, MONO_ARCH_GOT_REG); x86_alu_reg_imm (code, X86_ADD, MONO_ARCH_GOT_REG, 0xf0f0f0f0); if (cfg) @@ -6188,7 +6207,7 @@ mono_arch_emit_load_aotconst (guint8 *start, guint8 *code, MonoJumpInfo **ji, Mo { /* Load the mscorlib got address */ x86_mov_reg_membase (code, X86_EAX, MONO_ARCH_GOT_REG, sizeof (target_mgreg_t), 4); - *ji = mono_patch_info_list_prepend (*ji, code - start, tramp_type, target); + *ji = mono_patch_info_list_prepend (*ji, GPTRDIFF_TO_INT (code - start), tramp_type, target); /* arch_emit_got_access () patches this */ x86_mov_reg_membase (code, X86_EAX, X86_EAX, 0xf0f0f0f0, 4); diff --git a/src/mono/mono/mini/mini.c b/src/mono/mono/mini/mini.c index f96f13e32cc7c7..13218f6ae2eab6 100644 --- a/src/mono/mono/mini/mini.c +++ b/src/mono/mono/mini/mini.c @@ -4573,6 +4573,9 @@ mini_get_simd_type_info (MonoClass *klass, guint32 *nelems) if (!strcmp (klass_name, "Vector4") || !strcmp (klass_name, "Quaternion") || !strcmp (klass_name, "Plane")) { *nelems = 4; return MONO_TYPE_R4; + } else if (!strcmp (klass_name, "Vector2")) { + *nelems = 2; + return MONO_TYPE_R4; } else if (!strcmp (klass_name, "Vector`1") || !strcmp (klass_name, "Vector64`1") || !strcmp (klass_name, "Vector128`1") || !strcmp (klass_name, "Vector256`1") || !strcmp (klass_name, "Vector512`1")) { MonoType *etype = mono_class_get_generic_class (klass)->context.class_inst->type_argv [0]; int size = mono_class_value_size (klass, NULL); diff --git a/src/mono/mono/mini/mini.h b/src/mono/mono/mini/mini.h index eee8fd39bd5a59..5629513af92832 100644 --- a/src/mono/mono/mini/mini.h +++ b/src/mono/mono/mini/mini.h @@ -753,6 +753,7 @@ struct MonoInst { gpointer data; gint shift_amount; gboolean is_pinvoke; /* for variables in the unmanaged marshal format */ + gboolean need_sext; /* for OP_BOUNDS_CHECK */ gboolean record_cast_details; /* For CEE_CASTCLASS */ MonoInst *spill_var; /* for OP_MOVE_I4_TO_F/F_TO_I4 and OP_FCONV_TO_R8_X */ guint16 source_opcode; /*OP_XCONV_R8_TO_I4 needs to know which op was used to do proper widening*/ @@ -2316,7 +2317,7 @@ void mini_emit_memset (MonoCompile *cfg, int destreg, int offset, i void mini_emit_stobj (MonoCompile *cfg, MonoInst *dest, MonoInst *src, MonoClass *klass, gboolean native); void mini_emit_initobj (MonoCompile *cfg, MonoInst *dest, const guchar *ip, MonoClass *klass); void mini_emit_init_rvar (MonoCompile *cfg, int dreg, MonoType *rtype); -int mini_emit_sext_index_reg (MonoCompile *cfg, MonoInst *index); +int mini_emit_sext_index_reg (MonoCompile *cfg, MonoInst *index, gboolean *need_sext); MonoInst* mini_emit_ldelema_1_ins (MonoCompile *cfg, MonoClass *klass, MonoInst *arr, MonoInst *index, gboolean bcheck, gboolean bounded); MonoInst* mini_emit_get_gsharedvt_info_klass (MonoCompile *cfg, MonoClass *klass, MonoRgctxInfoType rgctx_type); MonoInst* mini_emit_get_rgctx_method (MonoCompile *cfg, int context_used, diff --git a/src/mono/mono/mini/simd-arm64.h b/src/mono/mono/mini/simd-arm64.h index c7d60f4f5f97f1..b9a5b9dc9f6410 100644 --- a/src/mono/mono/mini/simd-arm64.h +++ b/src/mono/mono/mini/simd-arm64.h @@ -29,6 +29,14 @@ SIMD_OP (64, OP_XCOMPARE_FP, CMP_LE, WTDSS_REV, _UNDEF SIMD_OP (64, OP_XBINOP, OP_IADD, WTDSS, arm_neon_add, arm_neon_add, arm_neon_add, _UNDEF, _UNDEF, _UNDEF) SIMD_OP (64, OP_XBINOP, OP_FADD, WTDSS, _UNDEF, _UNDEF, _UNDEF, _UNDEF, arm_neon_fadd, _UNDEF) +SIMD_OP (64, OP_XBINOP, OP_FSUB, WTDSS, _UNDEF, _UNDEF, _UNDEF, _UNDEF, arm_neon_fsub, _UNDEF) +SIMD_OP (64, OP_XBINOP, OP_FMAX, WTDSS, _UNDEF, _UNDEF, _UNDEF, _UNDEF, arm_neon_fmax, _UNDEF) +SIMD_OP (64, OP_XBINOP, OP_FMIN, WTDSS, _UNDEF, _UNDEF, _UNDEF, _UNDEF, arm_neon_fmin, _UNDEF) +SIMD_OP (64, OP_XBINOP, OP_FMUL, WTDSS, _UNDEF, _UNDEF, _UNDEF, _UNDEF, arm_neon_fmul, _UNDEF) +SIMD_OP (64, OP_XBINOP, OP_FDIV, WTDSS, _UNDEF, _UNDEF, _UNDEF, _UNDEF, arm_neon_fdiv, _UNDEF) +SIMD_OP (64, OP_ARM64_XADDV, INTRINS_AARCH64_ADV_SIMD_FADDV, WTDS, _UNDEF, _UNDEF, _UNDEF, _UNDEF, _SKIP, _UNDEF) +SIMD_OP (64, OP_XOP_OVR_X_X, INTRINS_AARCH64_ADV_SIMD_FSQRT, WTDS, _UNDEF, _UNDEF, _UNDEF, _UNDEF, arm_neon_fsqrt, _UNDEF) +SIMD_OP (64, OP_XOP_OVR_X_X, INTRINS_AARCH64_ADV_SIMD_FABS, WTDS, _UNDEF, _UNDEF, _UNDEF, _UNDEF, arm_neon_fabs, _UNDEF) /* 128-bit vectors */ /* Width Opcode Function Operand config I8 I16 I32 I64 F32 F64 */ diff --git a/src/mono/mono/mini/simd-intrinsics.c b/src/mono/mono/mini/simd-intrinsics.c index 1b6fe4d2447b5f..c73fc056503351 100644 --- a/src/mono/mono/mini/simd-intrinsics.c +++ b/src/mono/mono/mini/simd-intrinsics.c @@ -87,6 +87,22 @@ mono_emit_simd_field_load (MonoCompile *cfg, MonoClassField *field, MonoInst *ad return NULL; } +static gboolean +is_zero_const (const MonoInst* ins) +{ + switch (ins->opcode) { + case OP_ICONST: + return (0 == GTMREG_TO_INT (ins->inst_c0)); + case OP_I8CONST: + return (0 == ins->inst_l); + case OP_R4CONST: + return (0 == *(const uint32_t*)(ins->inst_p0)); // Must be binary zero. -0.0f has a sign of 1. + case OP_R8CONST: + return (0 == *(const uint64_t*)(ins->inst_p0)); + } + return FALSE; +} + static int simd_intrinsic_compare_by_name (const void *key, const void *value) { @@ -1061,9 +1077,11 @@ emit_vector_create_elementwise ( MonoClass *vklass = mono_class_from_mono_type_internal (vtype); MonoInst *ins = emit_xzero (cfg, vklass); for (int i = 0; i < fsig->param_count; ++i) { - ins = emit_simd_ins (cfg, vklass, op, ins->dreg, args [i]->dreg); - ins->inst_c0 = i; - ins->inst_c1 = type; + if (!is_zero_const (args [i])) { + ins = emit_simd_ins (cfg, vklass, op, ins->dreg, args [i]->dreg); + ins->inst_c0 = i; + ins->inst_c1 = type; + } } return ins; } @@ -1694,9 +1712,11 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi MonoInst *ins; ins = emit_xzero (cfg, klass); - ins = emit_simd_ins (cfg, klass, type_to_insert_op (arg0_type), ins->dreg, args [0]->dreg); - ins->inst_c0 = 0; - ins->inst_c1 = arg0_type; + if (!is_zero_const (args [0])) { + ins = emit_simd_ins (cfg, klass, type_to_insert_op (arg0_type), ins->dreg, args [0]->dreg); + ins->inst_c0 = 0; + ins->inst_c1 = arg0_type; + } return ins; #else if (type_enum_is_float (arg0_type)) { @@ -1825,7 +1845,7 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi arg_class = mono_class_from_mono_type_internal (fsig->params [0]); } - // FIXME: Add support for Vector64 on arm64 + // FIXME: Add support for Vector64 on arm64 https://github.com/dotnet/runtime/issues/90402 int size = mono_class_value_size (arg_class, NULL); if (size != 16) return NULL; @@ -1929,7 +1949,7 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi if (args [1]->opcode == OP_ICONST) { // If the index is provably a constant, we can generate vastly better code. - int index = args[1]->inst_c0; + int index = GTMREG_TO_INT (args[1]->inst_c0); if (index < 0 || index >= elems) { MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, args [1]->dreg, elems); @@ -2259,7 +2279,7 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi if (args [1]->opcode == OP_ICONST) { // If the index is provably a constant, we can generate vastly better code. - int index = args[1]->inst_c0; + int index = GTMREG_TO_INT (args[1]->inst_c0); if (index < 0 || index >= elems) { MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, args [1]->dreg, elems); @@ -2588,7 +2608,7 @@ emit_vector64_vector128_t (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign } // System.Numerics.Vector2/Vector3/Vector4, Quaternion, and Plane -static guint16 vector2_methods[] = { +static guint16 vector_2_3_4_methods[] = { SN_ctor, SN_Abs, SN_Add, @@ -2631,12 +2651,12 @@ static G_GNUC_UNUSED MonoInst* emit_vector_2_3_4 (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig, MonoInst **args) { MonoInst *ins; - int id; + int id, len; MonoClass *klass; MonoType *type, *etype; - id = lookup_intrins (vector2_methods, sizeof (vector2_methods), cmethod); + id = lookup_intrins (vector_2_3_4_methods, sizeof (vector_2_3_4_methods), cmethod); if (id == -1) { // https://github.com/dotnet/runtime/issues/81961 // check_no_intrinsic_cattr (cmethod); @@ -2657,6 +2677,7 @@ emit_vector_2_3_4 (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *f klass = cmethod->klass; type = m_class_get_byval_arg (klass); etype = m_class_get_byval_arg (mono_defaults.single_class); + len = mono_class_value_size (klass, NULL) / 4; // Similar to the cases in emit_sys_numerics_vector_t () switch (id) { @@ -2686,7 +2707,6 @@ emit_vector_2_3_4 (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *f } // FIXME: These don't work since Vector2/Vector3 are not handled as SIMD #if 0 - int len = mono_class_value_size (klass, NULL) / 4; } else if (len == 3 && fsig->param_count == 2 && fsig->params [0]->type == MONO_TYPE_VALUETYPE && fsig->params [1]->type == etype->type) { /* Vector3 (Vector2, float) */ int dreg = load_simd_vreg (cfg, cmethod, args [0], NULL); @@ -2719,26 +2739,25 @@ emit_vector_2_3_4 (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *f case SN_get_Item: { // GetElement is marked as Intrinsic, but handling this in get_Item leads to better code int src1 = load_simd_vreg (cfg, cmethod, args [0], NULL); - int elems = 4; MonoTypeEnum ty = etype->type; if (args [1]->opcode == OP_ICONST) { // If the index is provably a constant, we can generate vastly better code. - int index = args[1]->inst_c0; + int index = GTMREG_TO_INT (args[1]->inst_c0); - if (index < 0 || index >= elems) { - MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, args [1]->dreg, elems); + if (index < 0 || index >= len) { + MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, args [1]->dreg, len); MONO_EMIT_NEW_COND_EXC (cfg, GE_UN, "ArgumentOutOfRangeException"); } int opcode = type_to_extract_op (ty); ins = emit_simd_ins (cfg, klass, opcode, src1, -1); - ins->inst_c0 = args[1]->inst_c0; + ins->inst_c0 = index; ins->inst_c1 = ty; return ins; } - MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, args [1]->dreg, elems); + MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, args [1]->dreg, len); MONO_EMIT_NEW_COND_EXC (cfg, GE_UN, "ArgumentOutOfRangeException"); if (COMPILE_LLVM (cfg)) { @@ -2806,14 +2825,14 @@ emit_vector_2_3_4 (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *f g_assert (fsig->hasthis && fsig->param_count == 2 && fsig->params [0]->type == MONO_TYPE_I4 && fsig->params [1]->type == MONO_TYPE_R4); gboolean indirect = FALSE; - int elems = 4, index = args [1]->inst_c0; + int index = GTMREG_TO_INT (args [1]->inst_c0); int dreg = load_simd_vreg (cfg, cmethod, args [0], &indirect); if (args [1]->opcode == OP_ICONST) { // If the index is provably a constant, we can generate vastly better code. // Bounds check only if the index is out of range - if (index < 0 || index >= elems) { - MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, args [1]->dreg, elems); + if (index < 0 || index >= len) { + MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, args [1]->dreg, len); MONO_EMIT_NEW_COND_EXC (cfg, GE_UN, "ArgumentOutOfRangeException"); } @@ -2830,7 +2849,7 @@ emit_vector_2_3_4 (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *f return ins; } - MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, args [1]->dreg, elems); + MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, args [1]->dreg, len); MONO_EMIT_NEW_COND_EXC (cfg, GE_UN, "ArgumentOutOfRangeException"); if (COMPILE_LLVM (cfg)) { @@ -2948,7 +2967,7 @@ emit_vector_2_3_4 (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *f #endif } case SN_CopyTo: - // FIXME: + // FIXME: https://github.com/dotnet/runtime/issues/91394 return NULL; case SN_Clamp: { if (!(!fsig->hasthis && fsig->param_count == 3 && mono_metadata_type_equal (fsig->ret, type) && mono_metadata_type_equal (fsig->params [0], type) && mono_metadata_type_equal (fsig->params [1], type) && mono_metadata_type_equal (fsig->params [2], type))) @@ -2971,7 +2990,7 @@ emit_vector_2_3_4 (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *f case SN_LengthSquared: case SN_Lerp: case SN_Normalize: { - // FIXME: + // FIXME: https://github.com/dotnet/runtime/issues/91394 return NULL; } default: @@ -3240,12 +3259,12 @@ emit_sys_numerics_vector_t (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSig } /* Emit bounds check for the index (index >= 0) */ - mini_emit_bounds_check_offset (cfg, array_ins->dreg, MONO_STRUCT_OFFSET (MonoArray, max_length), index_ins->dreg, "ArgumentOutOfRangeException"); + mini_emit_bounds_check_offset (cfg, array_ins->dreg, MONO_STRUCT_OFFSET (MonoArray, max_length), index_ins->dreg, "ArgumentOutOfRangeException", FALSE); /* Emit bounds check for the end (index + len - 1 < array length) */ end_index_reg = alloc_ireg (cfg); EMIT_NEW_BIALU_IMM (cfg, ins, OP_IADD_IMM, end_index_reg, index_ins->dreg, len - 1); - mini_emit_bounds_check_offset (cfg, array_ins->dreg, MONO_STRUCT_OFFSET (MonoArray, max_length), end_index_reg, "ArgumentOutOfRangeException"); + mini_emit_bounds_check_offset (cfg, array_ins->dreg, MONO_STRUCT_OFFSET (MonoArray, max_length), end_index_reg, "ArgumentOutOfRangeException", FALSE); /* Load the array slice into the simd reg */ ldelema_ins = mini_emit_ldelema_1_ins (cfg, mono_class_from_mono_type_internal (etype), array_ins, index_ins, FALSE, FALSE); @@ -3274,7 +3293,7 @@ emit_sys_numerics_vector_t (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSig } /* CopyTo () does complicated argument checks */ - mini_emit_bounds_check_offset (cfg, array_ins->dreg, MONO_STRUCT_OFFSET (MonoArray, max_length), index_ins->dreg, "ArgumentOutOfRangeException"); + mini_emit_bounds_check_offset (cfg, array_ins->dreg, MONO_STRUCT_OFFSET (MonoArray, max_length), index_ins->dreg, "ArgumentOutOfRangeException", FALSE); end_index_reg = alloc_ireg (cfg); int len_reg = alloc_ireg (cfg); MONO_EMIT_NEW_LOAD_MEMBASE_OP_FLAGS (cfg, OP_LOADI4_MEMBASE, len_reg, array_ins->dreg, MONO_STRUCT_OFFSET (MonoArray, max_length), MONO_INST_INVARIANT_LOAD); @@ -4599,6 +4618,7 @@ static SimdIntrinsic bmi2_methods [] = { static SimdIntrinsic x86base_methods [] = { {SN_BitScanForward}, {SN_BitScanReverse}, + {SN_DivRem}, {SN_Pause, OP_XOP, INTRINS_SSE_PAUSE}, {SN_get_IsSupported} }; @@ -4620,7 +4640,7 @@ static const IntrinGroup supported_x86_intrinsics [] = { { "Sse41", MONO_CPU_X86_SSE41, sse41_methods, sizeof (sse41_methods) }, { "Sse42", MONO_CPU_X86_SSE42, sse42_methods, sizeof (sse42_methods) }, { "Ssse3", MONO_CPU_X86_SSSE3, ssse3_methods, sizeof (ssse3_methods) }, - { "X86Base", 0, x86base_methods, sizeof (x86base_methods) }, + { "X86Base", MONO_CPU_INITED, x86base_methods, sizeof (x86base_methods), TRUE }, { "X86Serialize", 0, unsupported, sizeof (unsupported) }, }; @@ -5246,6 +5266,49 @@ emit_x86_intrinsics ( ins->type = is_64bit ? STACK_I8 : STACK_I4; MONO_ADD_INS (cfg->cbb, ins); return ins; + case SN_DivRem: { + g_assert (!(TARGET_SIZEOF_VOID_P == 4 && is_64bit)); // x86(no -64) cannot do divisions with 64-bit regs + const MonoStackType divtype = is_64bit ? STACK_I8 : STACK_I4; + const int storetype = is_64bit ? OP_STOREI8_MEMBASE_REG : OP_STOREI4_MEMBASE_REG; + const int obj_size = MONO_ABI_SIZEOF (MonoObject); + + // We must decide by the second argument, the first is always unsigned here + MonoTypeEnum arg1_type = fsig->param_count > 1 ? get_underlying_type (fsig->params [1]) : MONO_TYPE_VOID; + MonoInst* div; + MonoInst* div2; + + if (type_enum_is_unsigned (arg1_type)) { + MONO_INST_NEW (cfg, div, is_64bit ? OP_X86_LDIVREMU : OP_X86_IDIVREMU); + } else { + MONO_INST_NEW (cfg, div, is_64bit ? OP_X86_LDIVREM : OP_X86_IDIVREM); + } + div->dreg = is_64bit ? alloc_lreg (cfg) : alloc_ireg (cfg); + div->sreg1 = args [0]->dreg; // we can use this directly, reg alloc knows that the contents will be destroyed + div->sreg2 = args [1]->dreg; // same here as ^ + div->sreg3 = args [2]->dreg; + div->type = divtype; + MONO_ADD_INS (cfg->cbb, div); + + // Protect the contents of edx/rdx by assigning it a vreg. The instruction must + // immediately follow DIV/IDIV so that edx content is not modified. + // In LLVM the remainder is already calculated, just need to capture it in a vreg. + MONO_INST_NEW (cfg, div2, is_64bit ? OP_X86_LDIVREM2 : OP_X86_IDIVREM2); + div2->dreg = is_64bit ? alloc_lreg (cfg) : alloc_ireg (cfg); + div2->type = divtype; + MONO_ADD_INS (cfg->cbb, div2); + + // TODO: Can the creation of tuple be elided? (e.g. if deconstruction is used) + MonoInst* tuple = mono_compile_create_var (cfg, fsig->ret, OP_LOCAL); + MonoInst* tuple_addr; + EMIT_NEW_TEMPLOADA (cfg, tuple_addr, tuple->inst_c0); + + MonoClassField* field1 = mono_class_get_field_from_name_full (tuple->klass, "Item1", NULL); + MONO_EMIT_NEW_STORE_MEMBASE (cfg, storetype, tuple_addr->dreg, field1->offset - obj_size, div->dreg); + MonoClassField* field2 = mono_class_get_field_from_name_full (tuple->klass, "Item2", NULL); + MONO_EMIT_NEW_STORE_MEMBASE (cfg, storetype, tuple_addr->dreg, field2->offset - obj_size, div2->dreg); + EMIT_NEW_TEMPLOAD (cfg, ins, tuple->inst_c0); + return ins; + } default: g_assert_not_reached (); } @@ -5714,7 +5777,7 @@ emit_wasm_supported_intrinsics ( break; } case SN_ExtractScalar: { - op = type_to_xextract_op (arg0_type); + op = GINT_TO_UINT16 (type_to_xextract_op (arg0_type)); break; } case SN_LoadScalarVector128: { @@ -5832,8 +5895,9 @@ arch_emit_simd_intrinsics (const char *class_ns, const char *class_name, MonoCom } if (!strcmp (class_ns, "System.Numerics")) { - // FIXME: Support Vector2/Vector3 - if (!strcmp (class_name, "Vector4") || !strcmp (class_name, "Quaternion") || !strcmp (class_name, "Plane")) + // FIXME: Support Vector2 https://github.com/dotnet/runtime/issues/81501 + if (!strcmp (class_name, "Vector2") || !strcmp (class_name, "Vector4") || + !strcmp (class_name, "Quaternion") || !strcmp (class_name, "Plane")) return emit_vector_2_3_4 (cfg, cmethod, fsig, args); } diff --git a/src/mono/mono/mini/simd-methods.h b/src/mono/mono/mini/simd-methods.h index 6f237c145c57e4..e8f3074195501d 100644 --- a/src/mono/mono/mini/simd-methods.h +++ b/src/mono/mono/mini/simd-methods.h @@ -293,6 +293,7 @@ METHOD(ComputeCrc32C) // X86Base METHOD(BitScanForward) METHOD(BitScanReverse) +METHOD(DivRem) METHOD(Pause) // Crypto METHOD(FixedRotate) diff --git a/src/mono/mono/mini/tramp-arm-gsharedvt.c b/src/mono/mono/mini/tramp-arm-gsharedvt.c index f06b5e63561c02..90a47ed369c71d 100644 --- a/src/mono/mono/mini/tramp-arm-gsharedvt.c +++ b/src/mono/mono/mini/tramp-arm-gsharedvt.c @@ -197,8 +197,8 @@ mono_arch_get_gsharedvt_trampoline (MonoTrampInfo **info, gboolean aot) MonoJumpInfo *ji = NULL; guint8 *br_out, *br [16], *br_ret [16]; int i, offset, arg_reg, npushed, info_offset, mrgctx_offset; - int caller_reg_area_offset, caller_freg_area_offset, callee_reg_area_offset, callee_freg_area_offset; - int lr_offset, fp, br_ret_index, args_size; + int caller_reg_area_offset, caller_freg_area_offset, /* callee_reg_area_offset, */ callee_freg_area_offset; + int /* lr_offset, */ fp, br_ret_index, args_size; buf_len = 784; buf = code = mono_global_codeman_reserve (buf_len); @@ -229,14 +229,14 @@ MONO_RESTORE_WARNING offset += 4; mrgctx_offset = -offset; offset += 4 * 4; - callee_reg_area_offset = -offset; + //callee_reg_area_offset = -offset; offset += 8 * 8; caller_freg_area_offset = -offset; offset += 8 * 8; callee_freg_area_offset = -offset; caller_reg_area_offset = cfa_offset - (npushed * TARGET_SIZEOF_VOID_P); - lr_offset = 4; + //lr_offset = 4; /* Save info struct which is in r0 */ ARM_STR_IMM (code, arg_reg, fp, info_offset); /* Save rgctx reg */ @@ -283,7 +283,7 @@ MONO_RESTORE_WARNING ARM_STR_IMM (code, ARMREG_IP, ARMREG_SP, 4); /* Make the call */ if (aot) { - ji = mono_patch_info_list_prepend (ji, code - buf, MONO_PATCH_INFO_JIT_ICALL_ADDR, GUINT_TO_POINTER (MONO_JIT_ICALL_mono_arm_start_gsharedvt_call)); + ji = mono_patch_info_list_prepend (ji, GPTRDIFF_TO_INT (code - buf), MONO_PATCH_INFO_JIT_ICALL_ADDR, GUINT_TO_POINTER (MONO_JIT_ICALL_mono_arm_start_gsharedvt_call)); ARM_LDR_IMM (code, ARMREG_IP, ARMREG_PC, 0); ARM_B (code, 0); *(gpointer*)code = NULL; @@ -543,9 +543,9 @@ MONO_RESTORE_WARNING g_assert ((code - buf) < buf_len); if (info) - *info = mono_tramp_info_create ("gsharedvt_trampoline", buf, code - buf, ji, unwind_ops); + *info = mono_tramp_info_create ("gsharedvt_trampoline", buf, GPTRDIFF_TO_UINT32 (code - buf), ji, unwind_ops); - mono_arch_flush_icache (buf, code - buf); + mono_arch_flush_icache (buf, GPTRDIFF_TO_INT (code - buf)); return buf; } diff --git a/src/mono/mono/mini/tramp-arm.c b/src/mono/mono/mini/tramp-arm.c index f9f27a8f050851..88f505c1bae4ca 100644 --- a/src/mono/mono/mini/tramp-arm.c +++ b/src/mono/mono/mini/tramp-arm.c @@ -100,7 +100,7 @@ mono_arch_patch_plt_entry (guint8 *code, gpointer *got, host_mgreg_t *regs, guin static guint32 branch_for_target_reachable (guint8 *branch, guint8 *target) { - gint diff = target - branch - 8; + gint diff = GPTRDIFF_TO_INT (target - branch - 8); g_assert ((diff & 3) == 0); if (diff >= 0) { if (diff <= 33554431) @@ -214,7 +214,7 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf * This is a synthetized call to mono_get_lmf_addr () */ if (aot) { - ji = mono_patch_info_list_prepend (ji, code - buf, MONO_PATCH_INFO_JIT_ICALL_ADDR, GUINT_TO_POINTER (MONO_JIT_ICALL_mono_get_lmf_addr)); + ji = mono_patch_info_list_prepend (ji, GPTRDIFF_TO_INT (code - buf), MONO_PATCH_INFO_JIT_ICALL_ADDR, GUINT_TO_POINTER (MONO_JIT_ICALL_mono_get_lmf_addr)); ARM_LDR_IMM (code, ARMREG_R0, ARMREG_PC, 0); ARM_B (code, 0); *(gpointer*)code = NULL; @@ -292,7 +292,7 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf ARM_MOV_REG_REG (code, ARMREG_R2, ARMREG_V2); if (aot) { - ji = mono_patch_info_list_prepend (ji, code - buf, MONO_PATCH_INFO_JIT_ICALL_ADDR, GINT_TO_POINTER (mono_trampoline_type_to_jit_icall_id (tramp_type))); + ji = mono_patch_info_list_prepend (ji, GPTRDIFF_TO_INT (code - buf), MONO_PATCH_INFO_JIT_ICALL_ADDR, GINT_TO_POINTER (mono_trampoline_type_to_jit_icall_id (tramp_type))); ARM_LDR_IMM (code, ARMREG_IP, ARMREG_PC, 0); ARM_B (code, 0); *(gpointer*)code = NULL; @@ -429,7 +429,7 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf code = emit_bx (code, ARMREG_IP); /* Flush instruction cache, since we've generated code */ - mono_arch_flush_icache (buf, code - buf); + mono_arch_flush_icache (buf, GPTRDIFF_TO_INT (code - buf)); MONO_PROFILER_RAISE (jit_code_buffer, (buf, code - buf, MONO_PROFILER_CODE_BUFFER_HELPER, NULL)); /* Sanity check */ @@ -437,7 +437,7 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf g_assert (info); tramp_name = mono_get_generic_trampoline_name (tramp_type); - *info = mono_tramp_info_create (tramp_name, buf, code - buf, ji, unwind_ops); + *info = mono_tramp_info_create (tramp_name, buf, GPTRDIFF_TO_UINT32 (code - buf), ji, unwind_ops); return buf; } @@ -496,13 +496,13 @@ mono_arch_create_specific_trampoline (gpointer arg1, MonoTrampolineType tramp_ty } /* Flush instruction cache, since we've generated code */ - mono_arch_flush_icache (buf, code - buf); + mono_arch_flush_icache (buf, GPTRDIFF_TO_INT (code - buf)); MONO_PROFILER_RAISE (jit_code_buffer, (buf, code - buf, MONO_PROFILER_CODE_BUFFER_SPECIFIC_TRAMPOLINE, mono_get_generic_trampoline_simple_name (tramp_type))); g_assert ((code - buf) <= size); if (code_len) - *code_len = code - buf; + *code_len = GPTRDIFF_TO_UINT32 (code - buf); return buf; } @@ -533,13 +533,13 @@ mono_arch_get_unbox_trampoline (MonoMethod *m, gpointer addr) code = emit_bx (code, ARMREG_IP); *(guint32*)code = (guint32)(gsize)addr; code += 4; - mono_arch_flush_icache (start, code - start); + mono_arch_flush_icache (start, GPTRDIFF_TO_INT (code - start)); MONO_PROFILER_RAISE (jit_code_buffer, (start, code - start, MONO_PROFILER_CODE_BUFFER_UNBOX_TRAMPOLINE, m)); g_assert ((code - start) <= size); /*g_print ("unbox trampoline at %d for %s:%s\n", this_pos, m->klass->name, m->name); g_print ("unbox code is at %p for method at %p\n", start, addr);*/ - mono_tramp_info_register (mono_tramp_info_create (NULL, start, code - start, NULL, unwind_ops), mem_manager); + mono_tramp_info_register (mono_tramp_info_create (NULL, start, GPTRDIFF_TO_UINT32 (code - start), NULL, unwind_ops), mem_manager); return start; } @@ -564,10 +564,10 @@ mono_arch_get_static_rgctx_trampoline (MonoMemoryManager *mem_manager, gpointer g_assert ((code - start) <= buf_len); - mono_arch_flush_icache (start, code - start); + mono_arch_flush_icache (start, GPTRDIFF_TO_INT (code - start)); MONO_PROFILER_RAISE (jit_code_buffer, (start, code - start, MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL)); - mono_tramp_info_register (mono_tramp_info_create (NULL, start, code - start, NULL, unwind_ops), mem_manager); + mono_tramp_info_register (mono_tramp_info_create (NULL, start, GPTRDIFF_TO_UINT32 (code - start), NULL, unwind_ops), mem_manager); return start; } @@ -593,10 +593,10 @@ mono_arch_get_ftnptr_arg_trampoline (MonoMemoryManager *mem_manager, gpointer ar g_assert ((code - start) <= buf_len); - mono_arch_flush_icache (start, code - start); + mono_arch_flush_icache (start, GPTRDIFF_TO_INT (code - start)); MONO_PROFILER_RAISE (jit_code_buffer, (start, code - start, MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL)); - mono_tramp_info_register (mono_tramp_info_create (NULL, start, code - start, NULL, unwind_ops), mem_manager); + mono_tramp_info_register (mono_tramp_info_create (NULL, start, GPTRDIFF_TO_UINT32 (code - start), NULL, unwind_ops), mem_manager); return start; } @@ -691,7 +691,7 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info /* The vtable/mrgctx is still in R0 */ if (aot) { - ji = mono_patch_info_list_prepend (ji, code - buf, MONO_PATCH_INFO_SPECIFIC_TRAMPOLINE_LAZY_FETCH_ADDR, GUINT_TO_POINTER (slot)); + ji = mono_patch_info_list_prepend (ji, GPTRDIFF_TO_INT (code - buf), MONO_PATCH_INFO_SPECIFIC_TRAMPOLINE_LAZY_FETCH_ADDR, GUINT_TO_POINTER (slot)); ARM_LDR_IMM (code, ARMREG_R1, ARMREG_PC, 0); ARM_B (code, 0); *(gpointer*)code = NULL; @@ -708,13 +708,13 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info code += 4; } - mono_arch_flush_icache (buf, code - buf); + mono_arch_flush_icache (buf, GPTRDIFF_TO_INT (code - buf)); MONO_PROFILER_RAISE (jit_code_buffer, (buf, code - buf, MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL)); g_assert (code - buf <= tramp_size); char *name = mono_get_rgctx_fetch_trampoline_name (slot); - *info = mono_tramp_info_create (name, buf, code - buf, ji, unwind_ops); + *info = mono_tramp_info_create (name, buf, GPTRDIFF_TO_UINT32 (code - buf), ji, unwind_ops); g_free (name); return buf; @@ -743,12 +743,12 @@ mono_arch_create_general_rgctx_lazy_fetch_trampoline (MonoTrampInfo **info, gboo g_assert (MONO_ARCH_VTABLE_REG == ARMREG_R0); code = emit_bx (code, ARMREG_R1); - mono_arch_flush_icache (buf, code - buf); + mono_arch_flush_icache (buf, GPTRDIFF_TO_INT (code - buf)); MONO_PROFILER_RAISE (jit_code_buffer, (buf, code - buf, MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL)); g_assert (code - buf <= tramp_size); - *info = mono_tramp_info_create ("rgctx_fetch_trampoline_general", buf, code - buf, ji, unwind_ops); + *info = mono_tramp_info_create ("rgctx_fetch_trampoline_general", buf, GPTRDIFF_TO_UINT32 (code - buf), ji, unwind_ops); return buf; } @@ -798,9 +798,9 @@ mono_arch_create_sdb_trampoline (gboolean single_step, MonoTrampInfo **info, gbo /* call */ if (aot) { if (single_step) - ji = mono_patch_info_list_prepend (ji, code - buf, MONO_PATCH_INFO_JIT_ICALL_ADDR, GUINT_TO_POINTER (MONO_JIT_ICALL_mono_debugger_agent_single_step_from_context)); + ji = mono_patch_info_list_prepend (ji, GPTRDIFF_TO_INT (code - buf), MONO_PATCH_INFO_JIT_ICALL_ADDR, GUINT_TO_POINTER (MONO_JIT_ICALL_mono_debugger_agent_single_step_from_context)); else - ji = mono_patch_info_list_prepend (ji, code - buf, MONO_PATCH_INFO_JIT_ICALL_ADDR, GUINT_TO_POINTER (MONO_JIT_ICALL_mono_debugger_agent_breakpoint_from_context)); + ji = mono_patch_info_list_prepend (ji, GPTRDIFF_TO_INT (code - buf), MONO_PATCH_INFO_JIT_ICALL_ADDR, GUINT_TO_POINTER (MONO_JIT_ICALL_mono_debugger_agent_breakpoint_from_context)); ARM_LDR_IMM (code, ARMREG_IP, ARMREG_PC, 0); ARM_B (code, 0); *(gpointer*)code = NULL; @@ -827,11 +827,11 @@ mono_arch_create_sdb_trampoline (gboolean single_step, MonoTrampInfo **info, gbo ARM_ADD_REG_IMM8 (code, ARMREG_IP, ARMREG_FP, MONO_STRUCT_OFFSET (MonoContext, regs)); ARM_LDM (code, ARMREG_IP, 0xffff); - mono_arch_flush_icache (buf, code - buf); + mono_arch_flush_icache (buf, GPTRDIFF_TO_INT (code - buf)); MONO_PROFILER_RAISE (jit_code_buffer, (buf, code - buf, MONO_PROFILER_CODE_BUFFER_HELPER, NULL)); const char *tramp_name = single_step ? "sdb_single_step_trampoline" : "sdb_breakpoint_trampoline"; - *info = mono_tramp_info_create (tramp_name, buf, code - buf, ji, unwind_ops); + *info = mono_tramp_info_create (tramp_name, buf, GPTRDIFF_TO_UINT32 (code - buf), ji, unwind_ops); return buf; } @@ -930,11 +930,11 @@ mono_arch_get_interp_to_native_trampoline (MonoTrampInfo **info) g_assert (code - start < buf_len); - mono_arch_flush_icache (start, code - start); + mono_arch_flush_icache (start, GPTRDIFF_TO_INT (code - start)); MONO_PROFILER_RAISE (jit_code_buffer, (start, code - start, MONO_PROFILER_CODE_BUFFER_HELPER, NULL)); if (info) - *info = mono_tramp_info_create ("interp_to_native_trampoline", start, code - start, ji, unwind_ops); + *info = mono_tramp_info_create ("interp_to_native_trampoline", start, GPTRDIFF_TO_UINT32 (code - start), ji, unwind_ops); return start; #else @@ -1003,11 +1003,11 @@ mono_arch_get_native_to_interp_trampoline (MonoTrampInfo **info) g_assert (code - start < buf_len); - mono_arch_flush_icache (start, code - start); + mono_arch_flush_icache (start, GPTRDIFF_TO_INT (code - start)); MONO_PROFILER_RAISE (jit_code_buffer, (start, code - start, MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL)); if (info) - *info = mono_tramp_info_create ("native_to_interp_trampoline", start, code - start, ji, unwind_ops); + *info = mono_tramp_info_create ("native_to_interp_trampoline", start, GPTRDIFF_TO_UINT32 (code - start), ji, unwind_ops); return start; #else @@ -1112,13 +1112,12 @@ guint8* mono_arm_get_thumb_plt_entry (guint8 *code) { int s, j1, j2, imm10, imm11, i1, i2, imm32; - guint8 *bl, *base; + guint8 *bl; guint16 t1, t2; guint8 *target; /* code should be right after a BL */ code = (guint8*)((gsize)code & ~1); - base = (guint8*)((gsize)code & ~3); bl = code - 4; t1 = ((guint16*)bl) [0]; t2 = ((guint16*)bl) [1]; @@ -1187,10 +1186,10 @@ mono_arch_get_gsharedvt_arg_trampoline (gpointer arg, gpointer addr) g_assert ((code - buf) <= buf_len); - mono_arch_flush_icache (buf, code - buf); + mono_arch_flush_icache (buf, GPTRDIFF_TO_INT (code - buf)); MONO_PROFILER_RAISE (jit_code_buffer, (buf, code - buf, MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL)); - mono_tramp_info_register (mono_tramp_info_create (NULL, buf, code - buf, NULL, NULL), mem_manager); + mono_tramp_info_register (mono_tramp_info_create (NULL, buf, GPTRDIFF_TO_UINT32 (code - buf), NULL, NULL), mem_manager); return buf; } diff --git a/src/mono/mono/mini/tramp-arm64-gsharedvt.c b/src/mono/mono/mini/tramp-arm64-gsharedvt.c index e04cfd33805eaa..f7942c8eb3d5a6 100644 --- a/src/mono/mono/mini/tramp-arm64-gsharedvt.c +++ b/src/mono/mono/mini/tramp-arm64-gsharedvt.c @@ -46,7 +46,7 @@ mono_arch_get_gsharedvt_arg_trampoline (gpointer arg, gpointer addr) g_assert ((code - buf) < buf_len); - MINI_END_CODEGEN (buf, code - buf, -1, NULL); + MINI_END_CODEGEN (buf, GPTRDIFF_TO_INT (code - buf), -1, NULL); return buf; } @@ -557,9 +557,9 @@ mono_arch_get_gsharedvt_trampoline (MonoTrampInfo **info, gboolean aot) g_assert ((code - buf) < buf_len); if (info) - *info = mono_tramp_info_create ("gsharedvt_trampoline", buf, code - buf, ji, unwind_ops); + *info = mono_tramp_info_create ("gsharedvt_trampoline", buf, GPTRDIFF_TO_UINT32 (code - buf), ji, unwind_ops); - MINI_END_CODEGEN (buf, code - buf, -1, NULL); + MINI_END_CODEGEN (buf, GPTRDIFF_TO_INT (code - buf), -1, NULL); return buf; } diff --git a/src/mono/mono/mini/tramp-arm64.c b/src/mono/mono/mini/tramp-arm64.c index 3528edee8f43a6..af394802ecd98a 100644 --- a/src/mono/mono/mini/tramp-arm64.c +++ b/src/mono/mono/mini/tramp-arm64.c @@ -308,11 +308,11 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf g_assert ((code - buf) < buf_len); - MINI_END_CODEGEN (buf, code - buf, MONO_PROFILER_CODE_BUFFER_HELPER, NULL); + MINI_END_CODEGEN (buf, GPTRDIFF_TO_INT (code - buf), MONO_PROFILER_CODE_BUFFER_HELPER, NULL); if (info) { tramp_name = mono_get_generic_trampoline_name (tramp_type); - *info = mono_tramp_info_create (tramp_name, buf, code - buf, ji, unwind_ops); + *info = mono_tramp_info_create (tramp_name, buf, GPTRDIFF_TO_UINT32 (code - buf), ji, unwind_ops); } return (guchar*)MINI_ADDR_TO_FTNPTR (buf); @@ -341,10 +341,10 @@ mono_arch_create_specific_trampoline (gpointer arg1, MonoTrampolineType tramp_ty g_assert ((code - buf) < buf_len); - MINI_END_CODEGEN (buf, code - buf, MONO_PROFILER_CODE_BUFFER_SPECIFIC_TRAMPOLINE, mono_get_generic_trampoline_simple_name (tramp_type)); + MINI_END_CODEGEN (buf, GPTRDIFF_TO_INT (code - buf), MONO_PROFILER_CODE_BUFFER_SPECIFIC_TRAMPOLINE, mono_get_generic_trampoline_simple_name (tramp_type)); if (code_len) - *code_len = code - buf; + *code_len = GPTRDIFF_TO_UINT32 (code - buf); return (gpointer)MINI_ADDR_TO_FTNPTR (buf); } @@ -368,7 +368,7 @@ mono_arch_get_unbox_trampoline (MonoMethod *m, gpointer addr) g_assert ((code - start) <= size); - MINI_END_CODEGEN (start, code - start, MONO_PROFILER_CODE_BUFFER_UNBOX_TRAMPOLINE, m); + MINI_END_CODEGEN (start, GPTRDIFF_TO_INT (code - start), MONO_PROFILER_CODE_BUFFER_UNBOX_TRAMPOLINE, m); return (gpointer)MINI_ADDR_TO_FTNPTR (start); } @@ -387,7 +387,7 @@ mono_arch_get_static_rgctx_trampoline (MonoMemoryManager *mem_manager, gpointer code = mono_arm_emit_imm64 (code, ARMREG_IP0, (guint64)addr); code = mono_arm_emit_brx (code, ARMREG_IP0); - MINI_END_CODEGEN (start, code - start, MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL); + MINI_END_CODEGEN (start, GPTRDIFF_TO_INT (code - start), MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL); g_assert ((code - start) <= buf_len); @@ -486,11 +486,11 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info g_assert (code - buf <= buf_size); - MINI_END_CODEGEN (buf, code - buf, MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL); + MINI_END_CODEGEN (buf, GPTRDIFF_TO_INT (code - buf), MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL); if (info) { char *name = mono_get_rgctx_fetch_trampoline_name (slot); - *info = mono_tramp_info_create (name, buf, code - buf, ji, unwind_ops); + *info = mono_tramp_info_create (name, buf, GPTRDIFF_TO_UINT32 (code - buf), ji, unwind_ops); g_free (name); } @@ -524,10 +524,10 @@ mono_arch_create_general_rgctx_lazy_fetch_trampoline (MonoTrampInfo **info, gboo g_assert (code - buf <= tramp_size); - MINI_END_CODEGEN (buf, code - buf, MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL); + MINI_END_CODEGEN (buf, GPTRDIFF_TO_INT (code - buf), MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL); if (info) - *info = mono_tramp_info_create ("rgctx_fetch_trampoline_general", buf, code - buf, ji, unwind_ops); + *info = mono_tramp_info_create ("rgctx_fetch_trampoline_general", buf, GPTRDIFF_TO_UINT32 (code - buf), ji, unwind_ops); return (gpointer)MINI_ADDR_TO_FTNPTR (buf); } @@ -625,10 +625,10 @@ mono_arch_create_sdb_trampoline (gboolean single_step, MonoTrampInfo **info, gbo g_assert (code - buf <= tramp_size); - MINI_END_CODEGEN (buf, code - buf, MONO_PROFILER_CODE_BUFFER_HELPER, NULL); + MINI_END_CODEGEN (buf, GPTRDIFF_TO_INT (code - buf), MONO_PROFILER_CODE_BUFFER_HELPER, NULL); const char *tramp_name = single_step ? "sdb_single_step_trampoline" : "sdb_breakpoint_trampoline"; - *info = mono_tramp_info_create (tramp_name, buf, code - buf, ji, unwind_ops); + *info = mono_tramp_info_create (tramp_name, buf, GPTRDIFF_TO_UINT32 (code - buf), ji, unwind_ops); return (guint8*)MINI_ADDR_TO_FTNPTR (buf); } @@ -732,10 +732,10 @@ mono_arch_get_interp_to_native_trampoline (MonoTrampInfo **info) g_assert (code - start < buf_len); - MINI_END_CODEGEN (start, code - start, MONO_PROFILER_CODE_BUFFER_HELPER, NULL); + MINI_END_CODEGEN (start, GPTRDIFF_TO_INT (code - start), MONO_PROFILER_CODE_BUFFER_HELPER, NULL); if (info) - *info = mono_tramp_info_create ("interp_to_native_trampoline", start, code - start, ji, unwind_ops); + *info = mono_tramp_info_create ("interp_to_native_trampoline", start, GPTRDIFF_TO_UINT32 (code - start), ji, unwind_ops); return (guint8*)MINI_ADDR_TO_FTNPTR (start); #else @@ -809,10 +809,10 @@ mono_arch_get_native_to_interp_trampoline (MonoTrampInfo **info) g_assert (code - start < buf_len); - MINI_END_CODEGEN (start, code - start, MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL); + MINI_END_CODEGEN (start, GPTRDIFF_TO_INT (code - start), MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL); if (info) - *info = mono_tramp_info_create ("native_to_interp_trampoline", start, code - start, ji, unwind_ops); + *info = mono_tramp_info_create ("native_to_interp_trampoline", start, GPTRDIFF_TO_UINT32 (code - start), ji, unwind_ops); return (guint8*)MINI_ADDR_TO_FTNPTR (start); #else diff --git a/src/mono/mono/mini/tramp-x86-gsharedvt.c b/src/mono/mono/mini/tramp-x86-gsharedvt.c index ded0b1c2c16568..e1bcd351a25e7b 100644 --- a/src/mono/mono/mini/tramp-x86-gsharedvt.c +++ b/src/mono/mono/mini/tramp-x86-gsharedvt.c @@ -354,9 +354,9 @@ mono_arch_get_gsharedvt_trampoline (MonoTrampInfo **info, gboolean aot) g_assertf (code - buf <= buf_len, "%d %d", (int)(code - buf), buf_len); if (info) - *info = mono_tramp_info_create ("gsharedvt_trampoline", buf, code - buf, ji, unwind_ops); + *info = mono_tramp_info_create ("gsharedvt_trampoline", buf, GPTRDIFF_TO_UINT32 (code - buf), ji, unwind_ops); - mono_arch_flush_icache (buf, code - buf); + mono_arch_flush_icache (buf, GPTRDIFF_TO_INT (code - buf)); return buf; } diff --git a/src/mono/mono/mini/tramp-x86.c b/src/mono/mono/mini/tramp-x86.c index af10b329a0dd0f..c03f5f6ef91b50 100644 --- a/src/mono/mono/mini/tramp-x86.c +++ b/src/mono/mono/mini/tramp-x86.c @@ -58,7 +58,7 @@ mono_arch_get_unbox_trampoline (MonoMethod *m, gpointer addr) MONO_PROFILER_RAISE (jit_code_buffer, (start, code - start, MONO_PROFILER_CODE_BUFFER_UNBOX_TRAMPOLINE, m)); - mono_tramp_info_register (mono_tramp_info_create (NULL, start, code - start, NULL, unwind_ops), mem_manager); + mono_tramp_info_register (mono_tramp_info_create (NULL, start, GPTRDIFF_TO_UINT32 (code - start), NULL, unwind_ops), mem_manager); return start; } @@ -79,10 +79,10 @@ mono_arch_get_static_rgctx_trampoline (MonoMemoryManager *mem_manager, gpointer x86_jump_code (code, addr); g_assertf ((code - start) <= buf_len, "%d %d", (int)(code - start), buf_len); - mono_arch_flush_icache (start, code - start); - MONO_PROFILER_RAISE (jit_code_buffer, (start, code - start, MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL)); + mono_arch_flush_icache (start, GPTRDIFF_TO_INT (code - start)); + MONO_PROFILER_RAISE (jit_code_buffer, (start, GPTRDIFF_TO_INT (code - start), MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL)); - mono_tramp_info_register (mono_tramp_info_create (NULL, start, code - start, NULL, unwind_ops), mem_manager); + mono_tramp_info_register (mono_tramp_info_create (NULL, start, GPTRDIFF_TO_UINT32 (code - start), NULL, unwind_ops), mem_manager); return start; } @@ -388,7 +388,7 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf MONO_PROFILER_RAISE (jit_code_buffer, (buf, code - buf, MONO_PROFILER_CODE_BUFFER_HELPER, NULL)); tramp_name = mono_get_generic_trampoline_name (tramp_type); - *info = mono_tramp_info_create (tramp_name, buf, code - buf, ji, unwind_ops); + *info = mono_tramp_info_create (tramp_name, buf, GPTRDIFF_TO_UINT32 (code - buf), ji, unwind_ops); return buf; } @@ -410,11 +410,11 @@ mono_arch_create_specific_trampoline (gpointer arg1, MonoTrampolineType tramp_ty x86_jump_code (buf, tramp); g_assertf ((code - buf) <= size, "%d %d", (int)(code - buf), size); - mono_arch_flush_icache (code, buf - code); - MONO_PROFILER_RAISE (jit_code_buffer, (code, buf - code, MONO_PROFILER_CODE_BUFFER_SPECIFIC_TRAMPOLINE, mono_get_generic_trampoline_simple_name (tramp_type))); + mono_arch_flush_icache (code, GPTRDIFF_TO_INT (buf - code)); + MONO_PROFILER_RAISE (jit_code_buffer, (code, GPTRDIFF_TO_INT (buf - code), MONO_PROFILER_CODE_BUFFER_SPECIFIC_TRAMPOLINE, mono_get_generic_trampoline_simple_name (tramp_type))); if (code_len) - *code_len = buf - code; + *code_len = GPTRDIFF_TO_UINT32 (buf - code); return code; } @@ -505,13 +505,13 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info x86_jump_code (code, tramp); } - mono_arch_flush_icache (buf, code - buf); + mono_arch_flush_icache (buf, GPTRDIFF_TO_INT (code - buf)); MONO_PROFILER_RAISE (jit_code_buffer, (buf, code - buf, MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL)); g_assertf (code - buf <= tramp_size, "%d %d", (int)(code - buf), tramp_size); char *name = mono_get_rgctx_fetch_trampoline_name (slot); - *info = mono_tramp_info_create (name, buf, code - buf, ji, unwind_ops); + *info = mono_tramp_info_create (name, buf, GPTRDIFF_TO_UINT32 (code - buf), ji, unwind_ops); g_free (name); return buf; @@ -548,12 +548,12 @@ mono_arch_create_general_rgctx_lazy_fetch_trampoline (MonoTrampInfo **info, gboo x86_jump_reg (code, X86_EAX); - mono_arch_flush_icache (buf, code - buf); + mono_arch_flush_icache (buf, GPTRDIFF_TO_INT (code - buf)); MONO_PROFILER_RAISE (jit_code_buffer, (buf, code - buf, MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL)); g_assertf (code - buf <= tramp_size, "%d %d", (int)(code - buf), tramp_size); - *info = mono_tramp_info_create ("rgctx_fetch_trampoline_general", buf, code - buf, ji, unwind_ops); + *info = mono_tramp_info_create ("rgctx_fetch_trampoline_general", buf, GPTRDIFF_TO_UINT32 (code - buf), ji, unwind_ops); return buf; } @@ -609,10 +609,10 @@ mono_arch_get_gsharedvt_arg_trampoline (gpointer arg, gpointer addr) x86_jump_code (code, addr); g_assertf ((code - start) <= buf_len, "%d %d", (int)(code - start), buf_len); - mono_arch_flush_icache (start, code - start); + mono_arch_flush_icache (start, GPTRDIFF_TO_INT (code - start)); MONO_PROFILER_RAISE (jit_code_buffer, (start, code - start, MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL)); - mono_tramp_info_register (mono_tramp_info_create (NULL, start, code - start, NULL, unwind_ops), mem_manager); + mono_tramp_info_register (mono_tramp_info_create (NULL, start, GPTRDIFF_TO_UINT32 (code - start), NULL, unwind_ops), mem_manager); return start; } @@ -709,12 +709,12 @@ mono_arch_create_sdb_trampoline (gboolean single_step, MonoTrampInfo **info, gbo mono_add_unwind_op_def_cfa (unwind_ops, code, buf, X86_ESP, cfa_offset); x86_ret (code); - mono_arch_flush_icache (code, code - buf); + mono_arch_flush_icache (code, GPTRDIFF_TO_INT (code - buf)); MONO_PROFILER_RAISE (jit_code_buffer, (buf, code - buf, MONO_PROFILER_CODE_BUFFER_HELPER, NULL)); g_assertf (code - buf <= tramp_size, "%d %d", (int)(code - buf), tramp_size); const char *tramp_name = single_step ? "sdb_single_step_trampoline" : "sdb_breakpoint_trampoline"; - *info = mono_tramp_info_create (tramp_name, buf, code - buf, ji, unwind_ops); + *info = mono_tramp_info_create (tramp_name, buf, GPTRDIFF_TO_UINT32 (code - buf), ji, unwind_ops); return buf; } @@ -799,7 +799,7 @@ mono_arch_get_interp_to_native_trampoline (MonoTrampInfo **info) MONO_PROFILER_RAISE (jit_code_buffer, (start, code - start, MONO_PROFILER_CODE_BUFFER_HELPER, NULL)); if (info) - *info = mono_tramp_info_create ("interp_to_native_trampoline", start, code - start, ji, unwind_ops); + *info = mono_tramp_info_create ("interp_to_native_trampoline", start, GPTRDIFF_TO_UINT32 (code - start), ji, unwind_ops); return start; #else diff --git a/src/mono/mono/mini/type-checking.c b/src/mono/mono/mini/type-checking.c index 7fc2cf394c998e..a847cb8e720d27 100644 --- a/src/mono/mono/mini/type-checking.c +++ b/src/mono/mono/mini/type-checking.c @@ -110,11 +110,11 @@ mini_emit_isninst_cast_inst (MonoCompile *cfg, int klass_reg, MonoClass *klass, mono_class_setup_supertypes (klass); if (m_class_get_idepth (klass) > MONO_DEFAULT_SUPERTABLE_SIZE) { - MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU2_MEMBASE, idepth_reg, klass_reg, m_class_offsetof_idepth ()); + MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU2_MEMBASE, idepth_reg, klass_reg, GINTPTR_TO_TMREG (m_class_offsetof_idepth ())); MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, idepth_reg, m_class_get_idepth (klass)); MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBLT_UN, false_target); } - MONO_EMIT_NEW_LOAD_MEMBASE (cfg, stypes_reg, klass_reg, m_class_offsetof_supertypes ()); + MONO_EMIT_NEW_LOAD_MEMBASE (cfg, stypes_reg, klass_reg, GINTPTR_TO_TMREG (m_class_offsetof_supertypes ())); MONO_EMIT_NEW_LOAD_MEMBASE (cfg, stype, stypes_reg, ((m_class_get_idepth (klass) - 1) * TARGET_SIZEOF_VOID_P)); if (klass_ins) { MONO_EMIT_NEW_BIALU (cfg, OP_COMPARE, -1, stype, klass_ins->dreg); @@ -145,7 +145,7 @@ mini_emit_interface_bitmap_check (MonoCompile *cfg, int intf_bit_reg, int base_r #else int ibitmap_byte_reg = alloc_preg (cfg); - MONO_EMIT_NEW_LOAD_MEMBASE (cfg, ibitmap_reg, base_reg, offset); + MONO_EMIT_NEW_LOAD_MEMBASE (cfg, ibitmap_reg, base_reg, GINTPTR_TO_TMREG (offset)); if (cfg->compile_aot) { int iid_reg = alloc_preg (cfg); @@ -228,7 +228,7 @@ mini_emit_max_iid_check_class (MonoCompile *cfg, int klass_reg, MonoClass *klass { int max_iid_reg = alloc_preg (cfg); - MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU4_MEMBASE, max_iid_reg, klass_reg, m_class_offsetof_max_interface_id ()); + MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU4_MEMBASE, max_iid_reg, klass_reg, GINTPTR_TO_TMREG (m_class_offsetof_max_interface_id ())); mini_emit_max_iid_check (cfg, max_iid_reg, klass, false_target); } @@ -296,12 +296,12 @@ mini_emit_castclass_inst (MonoCompile *cfg, int obj_reg, int klass_reg, MonoClas g_assert (!klass_inst); - MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU1_MEMBASE, rank_reg, klass_reg, m_class_offsetof_rank ()); + MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU1_MEMBASE, rank_reg, klass_reg, GINTPTR_TO_TMREG (m_class_offsetof_rank ())); MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, rank_reg, m_class_get_rank (klass)); MONO_EMIT_NEW_COND_EXC (cfg, NE_UN, "InvalidCastException"); // MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, klass)); - MONO_EMIT_NEW_LOAD_MEMBASE (cfg, eclass_reg, klass_reg, m_class_offsetof_cast_class ()); + MONO_EMIT_NEW_LOAD_MEMBASE (cfg, eclass_reg, klass_reg, GINTPTR_TO_TMREG (m_class_offsetof_cast_class ())); if (m_class_is_array_special_interface (m_class_get_cast_class (klass))) { MonoInst *src; @@ -310,7 +310,7 @@ mini_emit_castclass_inst (MonoCompile *cfg, int obj_reg, int klass_reg, MonoClas emit_castclass_with_cache_no_details (cfg, src, klass, 0); } else if (m_class_get_cast_class (klass) == mono_defaults.object_class) { int parent_reg = alloc_preg (cfg); - MONO_EMIT_NEW_LOAD_MEMBASE (cfg, parent_reg, eclass_reg, m_class_offsetof_parent ()); + MONO_EMIT_NEW_LOAD_MEMBASE (cfg, parent_reg, eclass_reg, GINTPTR_TO_TMREG (m_class_offsetof_parent ())); mini_emit_class_check_branch (cfg, parent_reg, m_class_get_parent (mono_defaults.enum_class), OP_PBNE_UN, object_is_null); mini_emit_class_check (cfg, eclass_reg, mono_defaults.enum_class); } else if (m_class_get_cast_class (klass) == m_class_get_parent (mono_defaults.enum_class)) { @@ -340,11 +340,11 @@ mini_emit_castclass_inst (MonoCompile *cfg, int obj_reg, int klass_reg, MonoClas mono_class_setup_supertypes (klass); if (m_class_get_idepth (klass) > MONO_DEFAULT_SUPERTABLE_SIZE) { - MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU2_MEMBASE, idepth_reg, klass_reg, m_class_offsetof_idepth ()); + MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU2_MEMBASE, idepth_reg, klass_reg, GINTPTR_TO_TMREG (m_class_offsetof_idepth ())); MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, idepth_reg, m_class_get_idepth (klass)); MONO_EMIT_NEW_COND_EXC (cfg, LT_UN, "InvalidCastException"); } - MONO_EMIT_NEW_LOAD_MEMBASE (cfg, stypes_reg, klass_reg, m_class_offsetof_supertypes ()); + MONO_EMIT_NEW_LOAD_MEMBASE (cfg, stypes_reg, klass_reg, GINTPTR_TO_TMREG (m_class_offsetof_supertypes ())); MONO_EMIT_NEW_LOAD_MEMBASE (cfg, stype, stypes_reg, ((m_class_get_idepth (klass) - 1) * TARGET_SIZEOF_VOID_P)); mini_emit_class_check_inst (cfg, stype, klass, klass_inst); } @@ -532,7 +532,7 @@ handle_isinst (MonoCompile *cfg, MonoClass *klass, MonoInst *src, int context_us MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, rank_reg, m_class_get_rank (klass)); MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBNE_UN, false_bb); MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, klass)); - MONO_EMIT_NEW_LOAD_MEMBASE (cfg, eclass_reg, klass_reg, m_class_offsetof_cast_class ()); + MONO_EMIT_NEW_LOAD_MEMBASE (cfg, eclass_reg, klass_reg, GINTPTR_TO_TMREG (m_class_offsetof_cast_class ())); if (m_class_is_array_special_interface (m_class_get_cast_class (klass))) { MonoInst *move, *res_inst; @@ -547,8 +547,8 @@ handle_isinst (MonoCompile *cfg, MonoClass *klass, MonoInst *src, int context_us parent_reg = alloc_preg (cfg); class_kind_reg = alloc_preg (cfg); - MONO_EMIT_NEW_LOAD_MEMBASE (cfg, parent_reg, eclass_reg, m_class_offsetof_parent ()); - MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU1_MEMBASE, class_kind_reg, eclass_reg, m_class_offsetof_class_kind ()); + MONO_EMIT_NEW_LOAD_MEMBASE (cfg, parent_reg, eclass_reg, GINTPTR_TO_TMREG (m_class_offsetof_parent ())); + MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU1_MEMBASE, class_kind_reg, eclass_reg, GINTPTR_TO_TMREG (m_class_offsetof_class_kind ())); // Check if the parent class of the element is not System.ValueType mini_emit_class_check_branch (cfg, parent_reg, m_class_get_parent (mono_defaults.enum_class), OP_PBNE_UN, pointer_check_bb); diff --git a/src/mono/mono/mini/unwind.c b/src/mono/mono/mini/unwind.c index e83b1d20f26f24..c389a51df74783 100644 --- a/src/mono/mono/mini/unwind.c +++ b/src/mono/mono/mini/unwind.c @@ -725,8 +725,8 @@ static guint cached_info_hash(gconstpointer key) { guint i, a; - const guint8 *info = cached_info [GPOINTER_TO_UINT (key)].info; - const guint len = cached_info [GPOINTER_TO_UINT (key)].len; + const guint8 *info = cached_info [GCONSTPOINTER_TO_UINT (key)].info; + const guint len = cached_info [GCONSTPOINTER_TO_UINT (key)].len; for (i = a = 0; i != len; ++i) a ^= (((guint)info [i]) << (i & 0xf)); @@ -737,11 +737,11 @@ cached_info_hash(gconstpointer key) static gboolean cached_info_eq(gconstpointer a, gconstpointer b) { - const guint32 lena = cached_info [GPOINTER_TO_UINT (a)].len; - const guint32 lenb = cached_info [GPOINTER_TO_UINT (b)].len; + const guint32 lena = cached_info [GCONSTPOINTER_TO_UINT (a)].len; + const guint32 lenb = cached_info [GCONSTPOINTER_TO_UINT (b)].len; if (lena == lenb) { - const guint8 *infoa = cached_info [GPOINTER_TO_UINT (a)].info; - const guint8 *infob = cached_info [GPOINTER_TO_UINT (b)].info; + const guint8 *infoa = cached_info [GCONSTPOINTER_TO_UINT (a)].info; + const guint8 *infob = cached_info [GCONSTPOINTER_TO_UINT (b)].info; if (memcmp (infoa, infob, lena) == 0) return TRUE; } diff --git a/src/mono/mono/profiler/CMakeLists.txt b/src/mono/mono/profiler/CMakeLists.txt index 6bca00983686fc..511c19dbe5a322 100644 --- a/src/mono/mono/profiler/CMakeLists.txt +++ b/src/mono/mono/profiler/CMakeLists.txt @@ -12,6 +12,8 @@ include_directories( if(NOT DISABLE_LIBS) if(HOST_ANDROID OR HOST_IOS OR HOST_TVOS OR HOST_S390X) # Build the logging profiler only for certain platforms + set_source_files_properties(${ZLIB_SOURCES} PROPERTIES COMPILE_DEFINITIONS "${ZLIB_COMPILE_DEFINITIONS}") + set_source_files_properties(${ZLIB_SOURCES} PROPERTIES COMPILE_OPTIONS "${ZLIB_COMPILE_OPTIONS}") add_library(mono-profiler-log SHARED helper.c log.c log-args.c ${ZLIB_SOURCES}) target_compile_definitions(mono-profiler-log PRIVATE -DMONO_DLL_EXPORT) target_link_libraries(mono-profiler-log PRIVATE monosgen-shared monoapi eglib_objects) diff --git a/src/mono/mono/sgen/sgen-gc.h b/src/mono/mono/sgen/sgen-gc.h index eeedb3c41163ab..92f786dde3ba29 100644 --- a/src/mono/mono/sgen/sgen-gc.h +++ b/src/mono/mono/sgen/sgen-gc.h @@ -188,7 +188,7 @@ extern unsigned int sgen_global_stop_count; static inline guint sgen_aligned_addr_hash (gconstpointer ptr) { - return GPOINTER_TO_UINT (ptr) >> 3; + return GCONSTPOINTER_TO_UINT (ptr) >> 3; } #define SGEN_PTR_IN_NURSERY(p,bits,start,end) (((mword)(p) & ~(((mword)1 << (bits)) - 1)) == (mword)(start)) diff --git a/src/mono/mono/sgen/sgen-scan-object.h b/src/mono/mono/sgen/sgen-scan-object.h index 565d25446cef31..4932ca36917850 100644 --- a/src/mono/mono/sgen/sgen-scan-object.h +++ b/src/mono/mono/sgen/sgen-scan-object.h @@ -14,7 +14,7 @@ * "start" will point to the start of the next object, if the scanned * object contained references. If not, the value of "start" should * be considered undefined after executing this code. The object's - * GC descriptor must be in the variable "mword desc". + * GC descriptor must be in the variable "SgenDescriptor desc". * * The macro `HANDLE_PTR` will be invoked for every reference encountered while scanning the * object. It is called with two parameters: The pointer to the reference (not the diff --git a/src/mono/mono/tools/offsets-tool/offsets-tool.py b/src/mono/mono/tools/offsets-tool/offsets-tool.py index 5246cbbd407dab..dd30025c1e7bf8 100644 --- a/src/mono/mono/tools/offsets-tool/offsets-tool.py +++ b/src/mono/mono/tools/offsets-tool/offsets-tool.py @@ -89,7 +89,7 @@ def require_emscipten_path (args): if "wasm" in args.abi: if args.wasi_path != None: - self.sys_includes = [args.wasi_path + "/share/wasi-sysroot/include", args.wasi_path + "/lib/clang/14.0.4/include", args.mono_path + "/wasi/mono-include"] + self.sys_includes = [args.wasi_path + "/share/wasi-sysroot/include", args.wasi_path + "/lib/clang/16/include", args.mono_path + "/wasi/mono-include"] self.target = Target ("TARGET_WASI", None, ["TARGET_WASM"] + WASI_DEFINES) self.target_args += ["-target", args.abi] else: @@ -281,7 +281,7 @@ def run_clang(self): clang_args = [] clang_args += self.target_args - clang_args += ['-std=gnu99', '-DMONO_GENERATING_OFFSETS'] + clang_args += ['-std=gnu11', '-DMONO_GENERATING_OFFSETS'] for include in self.sys_includes: clang_args.append ("-isystem") clang_args.append (include) diff --git a/src/mono/mono/utils/mono-machine.h b/src/mono/mono/utils/mono-machine.h index b6bef8db9c7780..ffb39cedfb0e97 100644 --- a/src/mono/mono/utils/mono-machine.h +++ b/src/mono/mono/utils/mono-machine.h @@ -31,7 +31,7 @@ typedef gssize host_mgreg_t; typedef gsize host_umgreg_t; #endif -#ifdef ENABLE_CHECKED_CASTS +#ifdef ENABLE_CHECKED_BUILD_CASTS __CAST_STYPE_TO_STYPE(host_mgreg_t, gint32, INT32_MIN, INT32_MAX) __CAST_STYPE_TO_UTYPE(host_mgreg_t, guint32, UINT32_MAX) __CAST_STYPE_TO_STYPE(host_mgreg_t, gint16, INT16_MIN, INT16_MAX) @@ -69,7 +69,7 @@ typedef gint32 target_mgreg_t; typedef gint64 target_mgreg_t; #endif -#ifdef ENABLE_CHECKED_CASTS +#ifdef ENABLE_CHECKED_BUILD_CASTS __CAST_STYPE_TO_STYPE(target_mgreg_t, gint32, INT32_MIN, INT32_MAX) __CAST_STYPE_TO_UTYPE(target_mgreg_t, guint32, UINT32_MAX) __CAST_STYPE_TO_STYPE(target_mgreg_t, gint16, INT16_MIN, INT16_MAX) @@ -96,6 +96,9 @@ __CAST_UTYPE_TO_STYPE(guint64, target_mgreg_t, PTRDIFF_MIN, PTRDIFF_MAX) #define GINT64_TO_TMREG(v) G_CAST_TYPE_TO_TYPE(gint64, target_mgreg_t, v) #define GUINT64_TO_TMREG(v) G_CAST_TYPE_TO_TYPE(guint64, target_mgreg_t, v) +#define GINTPTR_TO_TMREG(v) G_CAST_TYPE_TO_TYPE(gintptr, target_mgreg_t, v) +#define GPTRDIFF_TO_TMREG(v) G_CAST_TYPE_TO_TYPE(gptrdiff, target_mgreg_t, v) + /* Alignment for MonoArray.vector */ #if defined(_AIX) /* diff --git a/src/mono/mono/utils/mono-mmap-wasm.c b/src/mono/mono/utils/mono-mmap-wasm.c index 5c38aac9f36641..b2f417b0860385 100644 --- a/src/mono/mono/utils/mono-mmap-wasm.c +++ b/src/mono/mono/utils/mono-mmap-wasm.c @@ -90,8 +90,8 @@ mono_setmmapjit (int flag) /* Ignored on HOST_WASM */ } -void* -mono_valloc (void *addr, size_t size, int flags, MonoMemAccountType type) +static void* +valloc_impl (void *addr, size_t size, int flags, MonoMemAccountType type) { void *ptr; int mflags = 0; @@ -119,6 +119,19 @@ mono_valloc (void *addr, size_t size, int flags, MonoMemAccountType type) return ptr; } +void* +mono_valloc (void *addr, size_t size, int flags, MonoMemAccountType type) +{ +#if HOST_WASI + // WASI implements mmap using malloc, so the returned address is not page aligned + // and our code depends on it + g_assert (!addr); + return mono_valloc_aligned (size, mono_pagesize (), flags, type); +#else + return valloc_impl (addr, size, flags, type); +#endif +} + static GHashTable *valloc_hash; typedef struct { @@ -130,7 +143,7 @@ void* mono_valloc_aligned (size_t size, size_t alignment, int flags, MonoMemAccountType type) { /* Allocate twice the memory to be able to put the block on an aligned address */ - char *mem = (char *) mono_valloc (NULL, size + alignment, flags, type); + char *mem = (char *) valloc_impl (NULL, size + alignment, flags, type); char *aligned; if (!mem) diff --git a/src/mono/mono/utils/options-def.h b/src/mono/mono/utils/options-def.h index 06105b4347312d..54c615e2a1d1cc 100644 --- a/src/mono/mono/utils/options-def.h +++ b/src/mono/mono/utils/options-def.h @@ -146,7 +146,7 @@ DEFINE_INT(jiterpreter_interp_entry_queue_flush_threshold, "jiterpreter-interp-e // In degenerate cases the jiterpreter could end up generating lots of WASM, so shut off jitting once it reaches this limit // Each wasm byte likely maps to multiple bytes of native code, so it's important for this limit not to be too high DEFINE_INT(jiterpreter_wasm_bytes_limit, "jiterpreter-wasm-bytes-limit", 6 * 1024 * 1024, "Disable jiterpreter code generation once this many bytes of WASM have been generated") -DEFINE_INT(jiterpreter_table_size, "jiterpreter-table-size", 5 * 1024, "Size of the jiterpreter trace function table") +DEFINE_INT(jiterpreter_table_size, "jiterpreter-table-size", 6 * 1024, "Size of the jiterpreter trace function table") // In real-world scenarios these tables can fill up at this size, but making them bigger causes startup time // to bloat to an unacceptable degree. In practice this is still better than nothing. // FIXME: In the future if we find a way to reduce the number of unique tables we can raise this constant diff --git a/src/mono/msbuild/apple/build/AppleBuild.LocalBuild.props b/src/mono/msbuild/apple/build/AppleBuild.LocalBuild.props index 819d61d9a9a8d4..7a2c308ccac3e0 100644 --- a/src/mono/msbuild/apple/build/AppleBuild.LocalBuild.props +++ b/src/mono/msbuild/apple/build/AppleBuild.LocalBuild.props @@ -22,9 +22,10 @@ - <_NetCoreAppCurrent>net8.0 + + <_NetCoreAppCurrent>net9.0 $(_NetCoreAppCurrent) - <_NetCoreAppToolCurrent>$(_NetCoreAppCurrent) + <_NetCoreAppToolCurrent>net8.0 false @@ -65,7 +66,7 @@ $(MicrosoftNetCoreAppRuntimePackLibDir) $(MicrosoftNetCoreAppRuntimePackNativeDir) $([MSBuild]::NormalizePath('$(BuildBaseDir)', 'microsoft.net.illink.tasks', 'build', 'Microsoft.NET.ILLink.targets')) - $([MSBuild]::NormalizePath('$(BuildBaseDir)', 'microsoft.net.illink.tasks', 'tools', '$(_NetCoreAppCurrent)', 'ILLink.Tasks.dll')) + $([MSBuild]::NormalizePath('$(BuildBaseDir)', 'microsoft.net.illink.tasks', 'tools', '$(_NetCoreAppToolCurrent)', 'ILLink.Tasks.dll')) <_MonoAotCrossCompilerPath>$([MSBuild]::NormalizePath($(MonoAotCrossDir), 'mono-aot-cross')) <_MonoAotCrossCompilerPath Condition="$([MSBuild]::IsOSPlatform('WINDOWS'))">$(_MonoAotCrossCompilerPath).exe diff --git a/src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.targets b/src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.targets index 64539a49fdaa8a..324f36cad7957f 100644 --- a/src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.targets +++ b/src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.targets @@ -19,9 +19,13 @@ Copyright (c) .NET Foundation. All rights reserved. dotnet $([MSBuild]::NormalizeDirectory($(MSBuildThisFileDirectory), '..', 'WasmAppHost')) - <_RuntimeConfigJsonPath>$([MSBuild]::NormalizePath($(OutputPath), '$(AssemblyName).runtimeconfig.json')) + + <_RunWorkingDirectory>$(OutputPath) + <_RunWorkingDirectory Condition="'$(_RunWorkingDirectory)' != '' and !$([System.IO.Path]::IsPathRooted($(_RunWorkingDirectory)))">$([System.IO.Path]::Combine($(MSBuildProjectDirectory), $(_RunWorkingDirectory))) + <_RuntimeConfigJsonPath>$([MSBuild]::NormalizePath($(_RunWorkingDirectory), '$(AssemblyName).runtimeconfig.json')) + exec "$([MSBuild]::NormalizePath($(WasmAppHostDir), 'WasmAppHost.dll'))" --use-staticwebassets --runtime-config "$(_RuntimeConfigJsonPath)" $(WasmHostArguments) - $(OutputPath) + $(_RunWorkingDirectory) @@ -224,7 +228,7 @@ Copyright (c) .NET Foundation. All rights reserved. <_WasmRuntimePackVersion>%(ResolvedRuntimePack.NuGetPackageVersion) - + diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest/WorkloadTelemetry.targets b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest/WorkloadTelemetry.targets index cf97ec1f14c2af..ec001114f27451 100644 --- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest/WorkloadTelemetry.targets +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest/WorkloadTelemetry.targets @@ -19,7 +19,7 @@ - + @@ -30,13 +30,14 @@ <_WorkloadUsesBlazorWasm>$(UsingMicrosoftNETSdkBlazorWebAssembly) <_WorkloadUsesWasmSDK>$(UsingMicrosoftNETSdkWebAssembly) <_WorkloadUsesMonoAOT>$(RunAOTCompilation) - <_WorkloadUsesMonoAOT Condition="'$(RunAOTCompilation)' == '' and '$(PublishAot)' != 'true' and ('$(TargetPlatformIdentifier)' == 'maccatalyst' or '$(TargetPlatformIdentifier)' == 'ios' or '$(TargetPlatformIdentifier)' == 'tvos')">$(_RunAotCompiler) + + <_WorkloadUsesMonoAOT Condition="'$(_WorkloadUsesMonoAOT)' == '' and '$(PublishAot)' != 'true' and ('$(TargetPlatformIdentifier)' == 'maccatalyst' or '$(TargetPlatformIdentifier)' == 'ios' or '$(TargetPlatformIdentifier)' == 'tvos')">$(_RunAotCompiler) <_WorkloadUsesNativeAOT>$(PublishAot) <_WorkloadUsesInterpreter>$(MonoForceInterpreter) <_WorkloadUsesInterpreter Condition="'$(_WorkloadUsesInterpreter)' == '' and '$(UseInterpreter)' == 'true'">true <_WorkloadUsesInterpreter Condition="'$(_WorkloadUsesInterpreter)' == '' and '$(RunAOTCompilation)' != 'true' and ('$(_WorkloadUsesBlazorWasm)' == 'true' or '$(_WorkloadUsesWasmSDK)' == 'true')">true <_WorkloadUsesLibraryMode Condition="'$(NativeLib)' != '' and ('$(_WorkloadUsesMonoAOT)' == 'true' or '$(_WorkloadUsesNativeAOT)' == 'true')">true - <_WorkloadUsesWasmStripILAfterAOT Condition="'$(WasmStripILAfterAOT)' == 'true'">true + <_WorkloadUsesStripILAfterAOT Condition="'$(WasmStripILAfterAOT)' == 'true' or '$(AndroidStripILAfterAOT)' == 'true'">true diff --git a/src/mono/sample/iOS-NativeAOT/Program.csproj b/src/mono/sample/iOS-NativeAOT/Program.csproj index 8712a610befa13..ceaa61bfcdc954 100644 --- a/src/mono/sample/iOS-NativeAOT/Program.csproj +++ b/src/mono/sample/iOS-NativeAOT/Program.csproj @@ -45,9 +45,9 @@ - + - 8.0.0-dev + $(MajorVersion).$(MinorVersion).0-dev @@ -70,4 +70,4 @@ - \ No newline at end of file + diff --git a/src/mono/sample/wasm/blazor-frame/App.razor b/src/mono/sample/wasm/blazor-frame/App.razor new file mode 100644 index 00000000000000..6fd3ed1b5a3b04 --- /dev/null +++ b/src/mono/sample/wasm/blazor-frame/App.razor @@ -0,0 +1,12 @@ + + + + + + + Not found + +

Sorry, there's nothing at this address.

+
+
+
diff --git a/src/mono/sample/wasm/blazor-frame/AppStart.cs b/src/mono/sample/wasm/blazor-frame/AppStart.cs new file mode 100644 index 00000000000000..98607bbeecd5d4 --- /dev/null +++ b/src/mono/sample/wasm/blazor-frame/AppStart.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices.JavaScript; + +namespace BrowserBench +{ + public partial class FrameApp + { + [JSImport("globalThis.frameApp.ReachedCallback")] + public static partial Task ReachedCallback(); + + [JSExport] + public static void ReachedManaged() + { + ReachedCallback(); + } + } +} diff --git a/src/mono/sample/wasm/blazor-frame/BenchmarkEvent.cs b/src/mono/sample/wasm/blazor-frame/BenchmarkEvent.cs new file mode 100644 index 00000000000000..a19262ef514321 --- /dev/null +++ b/src/mono/sample/wasm/blazor-frame/BenchmarkEvent.cs @@ -0,0 +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 Microsoft.JSInterop; + +namespace blazor; + +public static class BenchmarkEvent +{ + public static void Send(IJSRuntime jsRuntime, string name) + { + // jsRuntime will be null if we're in an environment without any + // JS runtime, e.g., the console runner + ((IJSInProcessRuntime)jsRuntime)?.Invoke( + "receiveBenchmarkEvent", + name); + } +} diff --git a/src/mono/sample/wasm/blazor-frame/Directory.Build.props b/src/mono/sample/wasm/blazor-frame/Directory.Build.props new file mode 100644 index 00000000000000..2c3bedf81d1e14 --- /dev/null +++ b/src/mono/sample/wasm/blazor-frame/Directory.Build.props @@ -0,0 +1,2 @@ + + diff --git a/src/mono/sample/wasm/blazor-frame/Directory.Build.targets b/src/mono/sample/wasm/blazor-frame/Directory.Build.targets new file mode 100644 index 00000000000000..093689fcc536de --- /dev/null +++ b/src/mono/sample/wasm/blazor-frame/Directory.Build.targets @@ -0,0 +1,2 @@ + + diff --git a/src/mono/sample/wasm/blazor-frame/Pages/Counter.razor b/src/mono/sample/wasm/blazor-frame/Pages/Counter.razor new file mode 100644 index 00000000000000..ef23cb31607f88 --- /dev/null +++ b/src/mono/sample/wasm/blazor-frame/Pages/Counter.razor @@ -0,0 +1,18 @@ +@page "/counter" + +Counter + +

Counter

+ +

Current count: @currentCount

+ + + +@code { + private int currentCount = 0; + + private void IncrementCount() + { + currentCount++; + } +} diff --git a/src/mono/sample/wasm/blazor-frame/Pages/FetchData.razor b/src/mono/sample/wasm/blazor-frame/Pages/FetchData.razor new file mode 100644 index 00000000000000..783a026a13b994 --- /dev/null +++ b/src/mono/sample/wasm/blazor-frame/Pages/FetchData.razor @@ -0,0 +1,57 @@ +@page "/fetchdata" +@inject HttpClient Http + +Weather forecast + +

Weather forecast

+ +

This component demonstrates fetching data from the server.

+ +@if (forecasts == null) +{ +

Loading...

+} +else +{ + + + + + + + + + + + @foreach (var forecast in forecasts) + { + + + + + + + } + +
DateTemp. (C)Temp. (F)Summary
@forecast.Date.ToShortDateString()@forecast.TemperatureC@forecast.TemperatureF@forecast.Summary
+} + +@code { + private WeatherForecast[]? forecasts; + + protected override async Task OnInitializedAsync() + { + forecasts = await Http.GetFromJsonAsync("sample-data/weather.json"); + } + + public class WeatherForecast + { + public DateOnly Date { get; set; } + + public int TemperatureC { get; set; } + + public string? Summary { get; set; } + + public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); + } +} diff --git a/src/mono/sample/wasm/blazor-frame/Pages/Index.razor b/src/mono/sample/wasm/blazor-frame/Pages/Index.razor new file mode 100644 index 00000000000000..a8ac07a85c63db --- /dev/null +++ b/src/mono/sample/wasm/blazor-frame/Pages/Index.razor @@ -0,0 +1,15 @@ +@page "/" +@inject IJSRuntime JSRuntime + +Index + +

Hello, world!

+ +Welcome to your new app. + +@code { + protected override void OnAfterRender(bool firstRender) + { + BenchmarkEvent.Send(JSRuntime, "Rendered Index.razor"); + } +} diff --git a/src/mono/sample/wasm/blazor-frame/Program.cs b/src/mono/sample/wasm/blazor-frame/Program.cs new file mode 100644 index 00000000000000..b5e51424da4754 --- /dev/null +++ b/src/mono/sample/wasm/blazor-frame/Program.cs @@ -0,0 +1,16 @@ +#pragma warning disable IDE0073 + +using Microsoft.AspNetCore.Components.Web; +using Microsoft.AspNetCore.Components.WebAssembly.Hosting; +using blazor; + +BrowserBench.FrameApp.ReachedManaged(); + +var builder = WebAssemblyHostBuilder.CreateDefault(args); +builder.RootComponents.Add("#app"); +builder.RootComponents.Add("head::after"); + + +builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); + +await builder.Build().RunAsync().ConfigureAwait(true); diff --git a/src/mono/sample/wasm/blazor-frame/README.md b/src/mono/sample/wasm/blazor-frame/README.md new file mode 100644 index 00000000000000..11b010cfeac50e --- /dev/null +++ b/src/mono/sample/wasm/blazor-frame/README.md @@ -0,0 +1,2 @@ +blazor-frame is slightly modified blazor template project, used by the browser-bench sample +to measure blazor startup performance. \ No newline at end of file diff --git a/src/mono/sample/wasm/blazor-frame/Shared/MainLayout.razor b/src/mono/sample/wasm/blazor-frame/Shared/MainLayout.razor new file mode 100644 index 00000000000000..7cd63fe1c017b8 --- /dev/null +++ b/src/mono/sample/wasm/blazor-frame/Shared/MainLayout.razor @@ -0,0 +1,17 @@ +@inherits LayoutComponentBase + +
+ + +
+
+ About +
+ +
+ @Body +
+
+
diff --git a/src/mono/sample/wasm/blazor-frame/Shared/MainLayout.razor.css b/src/mono/sample/wasm/blazor-frame/Shared/MainLayout.razor.css new file mode 100644 index 00000000000000..c8654276b36d3a --- /dev/null +++ b/src/mono/sample/wasm/blazor-frame/Shared/MainLayout.razor.css @@ -0,0 +1,81 @@ +.page { + position: relative; + display: flex; + flex-direction: column; +} + +main { + flex: 1; +} + +.sidebar { + background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%); +} + +.top-row { + background-color: #f7f7f7; + border-bottom: 1px solid #d6d5d5; + justify-content: flex-end; + height: 3.5rem; + display: flex; + align-items: center; +} + + .top-row ::deep a, .top-row ::deep .btn-link { + white-space: nowrap; + margin-left: 1.5rem; + text-decoration: none; + } + + .top-row ::deep a:hover, .top-row ::deep .btn-link:hover { + text-decoration: underline; + } + + .top-row ::deep a:first-child { + overflow: hidden; + text-overflow: ellipsis; + } + +@media (max-width: 640.98px) { + .top-row:not(.auth) { + display: none; + } + + .top-row.auth { + justify-content: space-between; + } + + .top-row ::deep a, .top-row ::deep .btn-link { + margin-left: 0; + } +} + +@media (min-width: 641px) { + .page { + flex-direction: row; + } + + .sidebar { + width: 250px; + height: 100vh; + position: sticky; + top: 0; + } + + .top-row { + position: sticky; + top: 0; + z-index: 1; + } + + .top-row.auth ::deep a:first-child { + flex: 1; + text-align: right; + width: 0; + } + + .top-row, article { + padding-left: 2rem !important; + padding-right: 1.5rem !important; + } +} diff --git a/src/mono/sample/wasm/blazor-frame/Shared/NavMenu.razor b/src/mono/sample/wasm/blazor-frame/Shared/NavMenu.razor new file mode 100644 index 00000000000000..673172c49eae99 --- /dev/null +++ b/src/mono/sample/wasm/blazor-frame/Shared/NavMenu.razor @@ -0,0 +1,39 @@ + + + + +@code { + private bool collapseNavMenu = true; + + private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null; + + private void ToggleNavMenu() + { + collapseNavMenu = !collapseNavMenu; + } +} diff --git a/src/mono/sample/wasm/blazor-frame/Shared/NavMenu.razor.css b/src/mono/sample/wasm/blazor-frame/Shared/NavMenu.razor.css new file mode 100644 index 00000000000000..e2984746f9afd3 --- /dev/null +++ b/src/mono/sample/wasm/blazor-frame/Shared/NavMenu.razor.css @@ -0,0 +1,68 @@ +.navbar-toggler { + background-color: rgba(255, 255, 255, 0.1); +} + +.top-row { + height: 3.5rem; + background-color: rgba(0,0,0,0.4); +} + +.navbar-brand { + font-size: 1.1rem; +} + +.bi { + width: 2rem; + font-size: 1.1rem; + vertical-align: text-top; + top: -2px; +} + +.nav-item { + font-size: 0.9rem; + padding-bottom: 0.5rem; +} + + .nav-item:first-of-type { + padding-top: 1rem; + } + + .nav-item:last-of-type { + padding-bottom: 1rem; + } + + .nav-item ::deep a { + color: #d7d7d7; + border-radius: 4px; + height: 3rem; + display: flex; + align-items: center; + line-height: 3rem; + } + +.nav-item ::deep a.active { + background-color: rgba(255,255,255,0.25); + color: white; +} + +.nav-item ::deep a:hover { + background-color: rgba(255,255,255,0.1); + color: white; +} + +@media (min-width: 641px) { + .navbar-toggler { + display: none; + } + + .collapse { + /* Never collapse the sidebar for wide screens */ + display: block; + } + + .nav-scrollable { + /* Allow sidebar to scroll for tall menus */ + height: calc(100vh - 3.5rem); + overflow-y: auto; + } +} diff --git a/src/mono/sample/wasm/blazor-frame/_Imports.razor b/src/mono/sample/wasm/blazor-frame/_Imports.razor new file mode 100644 index 00000000000000..216bab0370e6cf --- /dev/null +++ b/src/mono/sample/wasm/blazor-frame/_Imports.razor @@ -0,0 +1,10 @@ +@using System.Net.Http +@using System.Net.Http.Json +@using Microsoft.AspNetCore.Components.Forms +@using Microsoft.AspNetCore.Components.Routing +@using Microsoft.AspNetCore.Components.Web +@using Microsoft.AspNetCore.Components.Web.Virtualization +@using Microsoft.AspNetCore.Components.WebAssembly.Http +@using Microsoft.JSInterop +@using blazor +@using blazor.Shared diff --git a/src/mono/sample/wasm/blazor-frame/blazor.csproj b/src/mono/sample/wasm/blazor-frame/blazor.csproj new file mode 100644 index 00000000000000..bb4ca216020b6b --- /dev/null +++ b/src/mono/sample/wasm/blazor-frame/blazor.csproj @@ -0,0 +1,17 @@ + + + + net8.0 + enable + enable + blazor-template/ + true + true + + + + + + + + diff --git a/src/mono/sample/wasm/blazor-frame/wwwroot/css/app.css b/src/mono/sample/wasm/blazor-frame/wwwroot/css/app.css new file mode 100644 index 00000000000000..68d6035d74e398 --- /dev/null +++ b/src/mono/sample/wasm/blazor-frame/wwwroot/css/app.css @@ -0,0 +1,99 @@ +html, body { + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; +} + +h1:focus { + outline: none; +} + +a, .btn-link { + color: #0071c1; +} + +.btn-primary { + color: #fff; + background-color: #1b6ec2; + border-color: #1861ac; +} + +.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus { + box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb; +} + +.content { + padding-top: 1.1rem; +} + +.valid.modified:not([type=checkbox]) { + outline: 1px solid #26b050; +} + +.invalid { + outline: 1px solid red; +} + +.validation-message { + color: red; +} + +#blazor-error-ui { + background: lightyellow; + bottom: 0; + box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); + display: none; + left: 0; + padding: 0.6rem 1.25rem 0.7rem 1.25rem; + position: fixed; + width: 100%; + z-index: 1000; +} + + #blazor-error-ui .dismiss { + cursor: pointer; + position: absolute; + right: 0.75rem; + top: 0.5rem; + } + +.blazor-error-boundary { + background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121; + padding: 1rem 1rem 1rem 3.7rem; + color: white; +} + + .blazor-error-boundary::after { + content: "An error has occurred." + } + +.loading-progress { + position: relative; + display: block; + width: 8rem; + height: 8rem; + margin: 20vh auto 1rem auto; +} + + .loading-progress circle { + fill: none; + stroke: #e0e0e0; + stroke-width: 0.6rem; + transform-origin: 50% 50%; + transform: rotate(-90deg); + } + + .loading-progress circle:last-child { + stroke: #1b6ec2; + stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%; + transition: stroke-dasharray 0.05s ease-in-out; + } + +.loading-progress-text { + position: absolute; + text-align: center; + font-weight: bold; + inset: calc(20vh + 3.25rem) 0 auto 0.2rem; +} + + .loading-progress-text:after { + content: var(--blazor-load-percentage-text, "Loading"); + } diff --git a/src/mono/sample/wasm/blazor-frame/wwwroot/css/bootstrap-icons/bootstrap-icons.css b/src/mono/sample/wasm/blazor-frame/wwwroot/css/bootstrap-icons/bootstrap-icons.css new file mode 100644 index 00000000000000..8bda018e9a347d --- /dev/null +++ b/src/mono/sample/wasm/blazor-frame/wwwroot/css/bootstrap-icons/bootstrap-icons.css @@ -0,0 +1,1981 @@ +/*! + * Bootstrap Icons v1.10.5 (https://icons.getbootstrap.com/) + * Copyright 2019-2023 The Bootstrap Authors + * Licensed under MIT (https://github.com/twbs/icons/blob/main/LICENSE) + */ + +@font-face { + font-display: block; + font-family: "bootstrap-icons"; + src: url("./fonts/bootstrap-icons.woff2?1fa40e8900654d2863d011707b9fb6f2") format("woff2"), +url("./fonts/bootstrap-icons.woff?1fa40e8900654d2863d011707b9fb6f2") format("woff"); +} + +.bi::before, +[class^="bi-"]::before, +[class*=" bi-"]::before { + display: inline-block; + font-family: bootstrap-icons !important; + font-style: normal; + font-weight: normal !important; + font-variant: normal; + text-transform: none; + line-height: 1; + vertical-align: -.125em; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.bi-123::before { content: "\f67f"; } +.bi-alarm-fill::before { content: "\f101"; } +.bi-alarm::before { content: "\f102"; } +.bi-align-bottom::before { content: "\f103"; } +.bi-align-center::before { content: "\f104"; } +.bi-align-end::before { content: "\f105"; } +.bi-align-middle::before { content: "\f106"; } +.bi-align-start::before { content: "\f107"; } +.bi-align-top::before { content: "\f108"; } +.bi-alt::before { content: "\f109"; } +.bi-app-indicator::before { content: "\f10a"; } +.bi-app::before { content: "\f10b"; } +.bi-archive-fill::before { content: "\f10c"; } +.bi-archive::before { content: "\f10d"; } +.bi-arrow-90deg-down::before { content: "\f10e"; } +.bi-arrow-90deg-left::before { content: "\f10f"; } +.bi-arrow-90deg-right::before { content: "\f110"; } +.bi-arrow-90deg-up::before { content: "\f111"; } +.bi-arrow-bar-down::before { content: "\f112"; } +.bi-arrow-bar-left::before { content: "\f113"; } +.bi-arrow-bar-right::before { content: "\f114"; } +.bi-arrow-bar-up::before { content: "\f115"; } +.bi-arrow-clockwise::before { content: "\f116"; } +.bi-arrow-counterclockwise::before { content: "\f117"; } +.bi-arrow-down-circle-fill::before { content: "\f118"; } +.bi-arrow-down-circle::before { content: "\f119"; } +.bi-arrow-down-left-circle-fill::before { content: "\f11a"; } +.bi-arrow-down-left-circle::before { content: "\f11b"; } +.bi-arrow-down-left-square-fill::before { content: "\f11c"; } +.bi-arrow-down-left-square::before { content: "\f11d"; } +.bi-arrow-down-left::before { content: "\f11e"; } +.bi-arrow-down-right-circle-fill::before { content: "\f11f"; } +.bi-arrow-down-right-circle::before { content: "\f120"; } +.bi-arrow-down-right-square-fill::before { content: "\f121"; } +.bi-arrow-down-right-square::before { content: "\f122"; } +.bi-arrow-down-right::before { content: "\f123"; } +.bi-arrow-down-short::before { content: "\f124"; } +.bi-arrow-down-square-fill::before { content: "\f125"; } +.bi-arrow-down-square::before { content: "\f126"; } +.bi-arrow-down-up::before { content: "\f127"; } +.bi-arrow-down::before { content: "\f128"; } +.bi-arrow-left-circle-fill::before { content: "\f129"; } +.bi-arrow-left-circle::before { content: "\f12a"; } +.bi-arrow-left-right::before { content: "\f12b"; } +.bi-arrow-left-short::before { content: "\f12c"; } +.bi-arrow-left-square-fill::before { content: "\f12d"; } +.bi-arrow-left-square::before { content: "\f12e"; } +.bi-arrow-left::before { content: "\f12f"; } +.bi-arrow-repeat::before { content: "\f130"; } +.bi-arrow-return-left::before { content: "\f131"; } +.bi-arrow-return-right::before { content: "\f132"; } +.bi-arrow-right-circle-fill::before { content: "\f133"; } +.bi-arrow-right-circle::before { content: "\f134"; } +.bi-arrow-right-short::before { content: "\f135"; } +.bi-arrow-right-square-fill::before { content: "\f136"; } +.bi-arrow-right-square::before { content: "\f137"; } +.bi-arrow-right::before { content: "\f138"; } +.bi-arrow-up-circle-fill::before { content: "\f139"; } +.bi-arrow-up-circle::before { content: "\f13a"; } +.bi-arrow-up-left-circle-fill::before { content: "\f13b"; } +.bi-arrow-up-left-circle::before { content: "\f13c"; } +.bi-arrow-up-left-square-fill::before { content: "\f13d"; } +.bi-arrow-up-left-square::before { content: "\f13e"; } +.bi-arrow-up-left::before { content: "\f13f"; } +.bi-arrow-up-right-circle-fill::before { content: "\f140"; } +.bi-arrow-up-right-circle::before { content: "\f141"; } +.bi-arrow-up-right-square-fill::before { content: "\f142"; } +.bi-arrow-up-right-square::before { content: "\f143"; } +.bi-arrow-up-right::before { content: "\f144"; } +.bi-arrow-up-short::before { content: "\f145"; } +.bi-arrow-up-square-fill::before { content: "\f146"; } +.bi-arrow-up-square::before { content: "\f147"; } +.bi-arrow-up::before { content: "\f148"; } +.bi-arrows-angle-contract::before { content: "\f149"; } +.bi-arrows-angle-expand::before { content: "\f14a"; } +.bi-arrows-collapse::before { content: "\f14b"; } +.bi-arrows-expand::before { content: "\f14c"; } +.bi-arrows-fullscreen::before { content: "\f14d"; } +.bi-arrows-move::before { content: "\f14e"; } +.bi-aspect-ratio-fill::before { content: "\f14f"; } +.bi-aspect-ratio::before { content: "\f150"; } +.bi-asterisk::before { content: "\f151"; } +.bi-at::before { content: "\f152"; } +.bi-award-fill::before { content: "\f153"; } +.bi-award::before { content: "\f154"; } +.bi-back::before { content: "\f155"; } +.bi-backspace-fill::before { content: "\f156"; } +.bi-backspace-reverse-fill::before { content: "\f157"; } +.bi-backspace-reverse::before { content: "\f158"; } +.bi-backspace::before { content: "\f159"; } +.bi-badge-3d-fill::before { content: "\f15a"; } +.bi-badge-3d::before { content: "\f15b"; } +.bi-badge-4k-fill::before { content: "\f15c"; } +.bi-badge-4k::before { content: "\f15d"; } +.bi-badge-8k-fill::before { content: "\f15e"; } +.bi-badge-8k::before { content: "\f15f"; } +.bi-badge-ad-fill::before { content: "\f160"; } +.bi-badge-ad::before { content: "\f161"; } +.bi-badge-ar-fill::before { content: "\f162"; } +.bi-badge-ar::before { content: "\f163"; } +.bi-badge-cc-fill::before { content: "\f164"; } +.bi-badge-cc::before { content: "\f165"; } +.bi-badge-hd-fill::before { content: "\f166"; } +.bi-badge-hd::before { content: "\f167"; } +.bi-badge-tm-fill::before { content: "\f168"; } +.bi-badge-tm::before { content: "\f169"; } +.bi-badge-vo-fill::before { content: "\f16a"; } +.bi-badge-vo::before { content: "\f16b"; } +.bi-badge-vr-fill::before { content: "\f16c"; } +.bi-badge-vr::before { content: "\f16d"; } +.bi-badge-wc-fill::before { content: "\f16e"; } +.bi-badge-wc::before { content: "\f16f"; } +.bi-bag-check-fill::before { content: "\f170"; } +.bi-bag-check::before { content: "\f171"; } +.bi-bag-dash-fill::before { content: "\f172"; } +.bi-bag-dash::before { content: "\f173"; } +.bi-bag-fill::before { content: "\f174"; } +.bi-bag-plus-fill::before { content: "\f175"; } +.bi-bag-plus::before { content: "\f176"; } +.bi-bag-x-fill::before { content: "\f177"; } +.bi-bag-x::before { content: "\f178"; } +.bi-bag::before { content: "\f179"; } +.bi-bar-chart-fill::before { content: "\f17a"; } +.bi-bar-chart-line-fill::before { content: "\f17b"; } +.bi-bar-chart-line::before { content: "\f17c"; } +.bi-bar-chart-steps::before { content: "\f17d"; } +.bi-bar-chart::before { content: "\f17e"; } +.bi-basket-fill::before { content: "\f17f"; } +.bi-basket::before { content: "\f180"; } +.bi-basket2-fill::before { content: "\f181"; } +.bi-basket2::before { content: "\f182"; } +.bi-basket3-fill::before { content: "\f183"; } +.bi-basket3::before { content: "\f184"; } +.bi-battery-charging::before { content: "\f185"; } +.bi-battery-full::before { content: "\f186"; } +.bi-battery-half::before { content: "\f187"; } +.bi-battery::before { content: "\f188"; } +.bi-bell-fill::before { content: "\f189"; } +.bi-bell::before { content: "\f18a"; } +.bi-bezier::before { content: "\f18b"; } +.bi-bezier2::before { content: "\f18c"; } +.bi-bicycle::before { content: "\f18d"; } +.bi-binoculars-fill::before { content: "\f18e"; } +.bi-binoculars::before { content: "\f18f"; } +.bi-blockquote-left::before { content: "\f190"; } +.bi-blockquote-right::before { content: "\f191"; } +.bi-book-fill::before { content: "\f192"; } +.bi-book-half::before { content: "\f193"; } +.bi-book::before { content: "\f194"; } +.bi-bookmark-check-fill::before { content: "\f195"; } +.bi-bookmark-check::before { content: "\f196"; } +.bi-bookmark-dash-fill::before { content: "\f197"; } +.bi-bookmark-dash::before { content: "\f198"; } +.bi-bookmark-fill::before { content: "\f199"; } +.bi-bookmark-heart-fill::before { content: "\f19a"; } +.bi-bookmark-heart::before { content: "\f19b"; } +.bi-bookmark-plus-fill::before { content: "\f19c"; } +.bi-bookmark-plus::before { content: "\f19d"; } +.bi-bookmark-star-fill::before { content: "\f19e"; } +.bi-bookmark-star::before { content: "\f19f"; } +.bi-bookmark-x-fill::before { content: "\f1a0"; } +.bi-bookmark-x::before { content: "\f1a1"; } +.bi-bookmark::before { content: "\f1a2"; } +.bi-bookmarks-fill::before { content: "\f1a3"; } +.bi-bookmarks::before { content: "\f1a4"; } +.bi-bookshelf::before { content: "\f1a5"; } +.bi-bootstrap-fill::before { content: "\f1a6"; } +.bi-bootstrap-reboot::before { content: "\f1a7"; } +.bi-bootstrap::before { content: "\f1a8"; } +.bi-border-all::before { content: "\f1a9"; } +.bi-border-bottom::before { content: "\f1aa"; } +.bi-border-center::before { content: "\f1ab"; } +.bi-border-inner::before { content: "\f1ac"; } +.bi-border-left::before { content: "\f1ad"; } +.bi-border-middle::before { content: "\f1ae"; } +.bi-border-outer::before { content: "\f1af"; } +.bi-border-right::before { content: "\f1b0"; } +.bi-border-style::before { content: "\f1b1"; } +.bi-border-top::before { content: "\f1b2"; } +.bi-border-width::before { content: "\f1b3"; } +.bi-border::before { content: "\f1b4"; } +.bi-bounding-box-circles::before { content: "\f1b5"; } +.bi-bounding-box::before { content: "\f1b6"; } +.bi-box-arrow-down-left::before { content: "\f1b7"; } +.bi-box-arrow-down-right::before { content: "\f1b8"; } +.bi-box-arrow-down::before { content: "\f1b9"; } +.bi-box-arrow-in-down-left::before { content: "\f1ba"; } +.bi-box-arrow-in-down-right::before { content: "\f1bb"; } +.bi-box-arrow-in-down::before { content: "\f1bc"; } +.bi-box-arrow-in-left::before { content: "\f1bd"; } +.bi-box-arrow-in-right::before { content: "\f1be"; } +.bi-box-arrow-in-up-left::before { content: "\f1bf"; } +.bi-box-arrow-in-up-right::before { content: "\f1c0"; } +.bi-box-arrow-in-up::before { content: "\f1c1"; } +.bi-box-arrow-left::before { content: "\f1c2"; } +.bi-box-arrow-right::before { content: "\f1c3"; } +.bi-box-arrow-up-left::before { content: "\f1c4"; } +.bi-box-arrow-up-right::before { content: "\f1c5"; } +.bi-box-arrow-up::before { content: "\f1c6"; } +.bi-box-seam::before { content: "\f1c7"; } +.bi-box::before { content: "\f1c8"; } +.bi-braces::before { content: "\f1c9"; } +.bi-bricks::before { content: "\f1ca"; } +.bi-briefcase-fill::before { content: "\f1cb"; } +.bi-briefcase::before { content: "\f1cc"; } +.bi-brightness-alt-high-fill::before { content: "\f1cd"; } +.bi-brightness-alt-high::before { content: "\f1ce"; } +.bi-brightness-alt-low-fill::before { content: "\f1cf"; } +.bi-brightness-alt-low::before { content: "\f1d0"; } +.bi-brightness-high-fill::before { content: "\f1d1"; } +.bi-brightness-high::before { content: "\f1d2"; } +.bi-brightness-low-fill::before { content: "\f1d3"; } +.bi-brightness-low::before { content: "\f1d4"; } +.bi-broadcast-pin::before { content: "\f1d5"; } +.bi-broadcast::before { content: "\f1d6"; } +.bi-brush-fill::before { content: "\f1d7"; } +.bi-brush::before { content: "\f1d8"; } +.bi-bucket-fill::before { content: "\f1d9"; } +.bi-bucket::before { content: "\f1da"; } +.bi-bug-fill::before { content: "\f1db"; } +.bi-bug::before { content: "\f1dc"; } +.bi-building::before { content: "\f1dd"; } +.bi-bullseye::before { content: "\f1de"; } +.bi-calculator-fill::before { content: "\f1df"; } +.bi-calculator::before { content: "\f1e0"; } +.bi-calendar-check-fill::before { content: "\f1e1"; } +.bi-calendar-check::before { content: "\f1e2"; } +.bi-calendar-date-fill::before { content: "\f1e3"; } +.bi-calendar-date::before { content: "\f1e4"; } +.bi-calendar-day-fill::before { content: "\f1e5"; } +.bi-calendar-day::before { content: "\f1e6"; } +.bi-calendar-event-fill::before { content: "\f1e7"; } +.bi-calendar-event::before { content: "\f1e8"; } +.bi-calendar-fill::before { content: "\f1e9"; } +.bi-calendar-minus-fill::before { content: "\f1ea"; } +.bi-calendar-minus::before { content: "\f1eb"; } +.bi-calendar-month-fill::before { content: "\f1ec"; } +.bi-calendar-month::before { content: "\f1ed"; } +.bi-calendar-plus-fill::before { content: "\f1ee"; } +.bi-calendar-plus::before { content: "\f1ef"; } +.bi-calendar-range-fill::before { content: "\f1f0"; } +.bi-calendar-range::before { content: "\f1f1"; } +.bi-calendar-week-fill::before { content: "\f1f2"; } +.bi-calendar-week::before { content: "\f1f3"; } +.bi-calendar-x-fill::before { content: "\f1f4"; } +.bi-calendar-x::before { content: "\f1f5"; } +.bi-calendar::before { content: "\f1f6"; } +.bi-calendar2-check-fill::before { content: "\f1f7"; } +.bi-calendar2-check::before { content: "\f1f8"; } +.bi-calendar2-date-fill::before { content: "\f1f9"; } +.bi-calendar2-date::before { content: "\f1fa"; } +.bi-calendar2-day-fill::before { content: "\f1fb"; } +.bi-calendar2-day::before { content: "\f1fc"; } +.bi-calendar2-event-fill::before { content: "\f1fd"; } +.bi-calendar2-event::before { content: "\f1fe"; } +.bi-calendar2-fill::before { content: "\f1ff"; } +.bi-calendar2-minus-fill::before { content: "\f200"; } +.bi-calendar2-minus::before { content: "\f201"; } +.bi-calendar2-month-fill::before { content: "\f202"; } +.bi-calendar2-month::before { content: "\f203"; } +.bi-calendar2-plus-fill::before { content: "\f204"; } +.bi-calendar2-plus::before { content: "\f205"; } +.bi-calendar2-range-fill::before { content: "\f206"; } +.bi-calendar2-range::before { content: "\f207"; } +.bi-calendar2-week-fill::before { content: "\f208"; } +.bi-calendar2-week::before { content: "\f209"; } +.bi-calendar2-x-fill::before { content: "\f20a"; } +.bi-calendar2-x::before { content: "\f20b"; } +.bi-calendar2::before { content: "\f20c"; } +.bi-calendar3-event-fill::before { content: "\f20d"; } +.bi-calendar3-event::before { content: "\f20e"; } +.bi-calendar3-fill::before { content: "\f20f"; } +.bi-calendar3-range-fill::before { content: "\f210"; } +.bi-calendar3-range::before { content: "\f211"; } +.bi-calendar3-week-fill::before { content: "\f212"; } +.bi-calendar3-week::before { content: "\f213"; } +.bi-calendar3::before { content: "\f214"; } +.bi-calendar4-event::before { content: "\f215"; } +.bi-calendar4-range::before { content: "\f216"; } +.bi-calendar4-week::before { content: "\f217"; } +.bi-calendar4::before { content: "\f218"; } +.bi-camera-fill::before { content: "\f219"; } +.bi-camera-reels-fill::before { content: "\f21a"; } +.bi-camera-reels::before { content: "\f21b"; } +.bi-camera-video-fill::before { content: "\f21c"; } +.bi-camera-video-off-fill::before { content: "\f21d"; } +.bi-camera-video-off::before { content: "\f21e"; } +.bi-camera-video::before { content: "\f21f"; } +.bi-camera::before { content: "\f220"; } +.bi-camera2::before { content: "\f221"; } +.bi-capslock-fill::before { content: "\f222"; } +.bi-capslock::before { content: "\f223"; } +.bi-card-checklist::before { content: "\f224"; } +.bi-card-heading::before { content: "\f225"; } +.bi-card-image::before { content: "\f226"; } +.bi-card-list::before { content: "\f227"; } +.bi-card-text::before { content: "\f228"; } +.bi-caret-down-fill::before { content: "\f229"; } +.bi-caret-down-square-fill::before { content: "\f22a"; } +.bi-caret-down-square::before { content: "\f22b"; } +.bi-caret-down::before { content: "\f22c"; } +.bi-caret-left-fill::before { content: "\f22d"; } +.bi-caret-left-square-fill::before { content: "\f22e"; } +.bi-caret-left-square::before { content: "\f22f"; } +.bi-caret-left::before { content: "\f230"; } +.bi-caret-right-fill::before { content: "\f231"; } +.bi-caret-right-square-fill::before { content: "\f232"; } +.bi-caret-right-square::before { content: "\f233"; } +.bi-caret-right::before { content: "\f234"; } +.bi-caret-up-fill::before { content: "\f235"; } +.bi-caret-up-square-fill::before { content: "\f236"; } +.bi-caret-up-square::before { content: "\f237"; } +.bi-caret-up::before { content: "\f238"; } +.bi-cart-check-fill::before { content: "\f239"; } +.bi-cart-check::before { content: "\f23a"; } +.bi-cart-dash-fill::before { content: "\f23b"; } +.bi-cart-dash::before { content: "\f23c"; } +.bi-cart-fill::before { content: "\f23d"; } +.bi-cart-plus-fill::before { content: "\f23e"; } +.bi-cart-plus::before { content: "\f23f"; } +.bi-cart-x-fill::before { content: "\f240"; } +.bi-cart-x::before { content: "\f241"; } +.bi-cart::before { content: "\f242"; } +.bi-cart2::before { content: "\f243"; } +.bi-cart3::before { content: "\f244"; } +.bi-cart4::before { content: "\f245"; } +.bi-cash-stack::before { content: "\f246"; } +.bi-cash::before { content: "\f247"; } +.bi-cast::before { content: "\f248"; } +.bi-chat-dots-fill::before { content: "\f249"; } +.bi-chat-dots::before { content: "\f24a"; } +.bi-chat-fill::before { content: "\f24b"; } +.bi-chat-left-dots-fill::before { content: "\f24c"; } +.bi-chat-left-dots::before { content: "\f24d"; } +.bi-chat-left-fill::before { content: "\f24e"; } +.bi-chat-left-quote-fill::before { content: "\f24f"; } +.bi-chat-left-quote::before { content: "\f250"; } +.bi-chat-left-text-fill::before { content: "\f251"; } +.bi-chat-left-text::before { content: "\f252"; } +.bi-chat-left::before { content: "\f253"; } +.bi-chat-quote-fill::before { content: "\f254"; } +.bi-chat-quote::before { content: "\f255"; } +.bi-chat-right-dots-fill::before { content: "\f256"; } +.bi-chat-right-dots::before { content: "\f257"; } +.bi-chat-right-fill::before { content: "\f258"; } +.bi-chat-right-quote-fill::before { content: "\f259"; } +.bi-chat-right-quote::before { content: "\f25a"; } +.bi-chat-right-text-fill::before { content: "\f25b"; } +.bi-chat-right-text::before { content: "\f25c"; } +.bi-chat-right::before { content: "\f25d"; } +.bi-chat-square-dots-fill::before { content: "\f25e"; } +.bi-chat-square-dots::before { content: "\f25f"; } +.bi-chat-square-fill::before { content: "\f260"; } +.bi-chat-square-quote-fill::before { content: "\f261"; } +.bi-chat-square-quote::before { content: "\f262"; } +.bi-chat-square-text-fill::before { content: "\f263"; } +.bi-chat-square-text::before { content: "\f264"; } +.bi-chat-square::before { content: "\f265"; } +.bi-chat-text-fill::before { content: "\f266"; } +.bi-chat-text::before { content: "\f267"; } +.bi-chat::before { content: "\f268"; } +.bi-check-all::before { content: "\f269"; } +.bi-check-circle-fill::before { content: "\f26a"; } +.bi-check-circle::before { content: "\f26b"; } +.bi-check-square-fill::before { content: "\f26c"; } +.bi-check-square::before { content: "\f26d"; } +.bi-check::before { content: "\f26e"; } +.bi-check2-all::before { content: "\f26f"; } +.bi-check2-circle::before { content: "\f270"; } +.bi-check2-square::before { content: "\f271"; } +.bi-check2::before { content: "\f272"; } +.bi-chevron-bar-contract::before { content: "\f273"; } +.bi-chevron-bar-down::before { content: "\f274"; } +.bi-chevron-bar-expand::before { content: "\f275"; } +.bi-chevron-bar-left::before { content: "\f276"; } +.bi-chevron-bar-right::before { content: "\f277"; } +.bi-chevron-bar-up::before { content: "\f278"; } +.bi-chevron-compact-down::before { content: "\f279"; } +.bi-chevron-compact-left::before { content: "\f27a"; } +.bi-chevron-compact-right::before { content: "\f27b"; } +.bi-chevron-compact-up::before { content: "\f27c"; } +.bi-chevron-contract::before { content: "\f27d"; } +.bi-chevron-double-down::before { content: "\f27e"; } +.bi-chevron-double-left::before { content: "\f27f"; } +.bi-chevron-double-right::before { content: "\f280"; } +.bi-chevron-double-up::before { content: "\f281"; } +.bi-chevron-down::before { content: "\f282"; } +.bi-chevron-expand::before { content: "\f283"; } +.bi-chevron-left::before { content: "\f284"; } +.bi-chevron-right::before { content: "\f285"; } +.bi-chevron-up::before { content: "\f286"; } +.bi-circle-fill::before { content: "\f287"; } +.bi-circle-half::before { content: "\f288"; } +.bi-circle-square::before { content: "\f289"; } +.bi-circle::before { content: "\f28a"; } +.bi-clipboard-check::before { content: "\f28b"; } +.bi-clipboard-data::before { content: "\f28c"; } +.bi-clipboard-minus::before { content: "\f28d"; } +.bi-clipboard-plus::before { content: "\f28e"; } +.bi-clipboard-x::before { content: "\f28f"; } +.bi-clipboard::before { content: "\f290"; } +.bi-clock-fill::before { content: "\f291"; } +.bi-clock-history::before { content: "\f292"; } +.bi-clock::before { content: "\f293"; } +.bi-cloud-arrow-down-fill::before { content: "\f294"; } +.bi-cloud-arrow-down::before { content: "\f295"; } +.bi-cloud-arrow-up-fill::before { content: "\f296"; } +.bi-cloud-arrow-up::before { content: "\f297"; } +.bi-cloud-check-fill::before { content: "\f298"; } +.bi-cloud-check::before { content: "\f299"; } +.bi-cloud-download-fill::before { content: "\f29a"; } +.bi-cloud-download::before { content: "\f29b"; } +.bi-cloud-drizzle-fill::before { content: "\f29c"; } +.bi-cloud-drizzle::before { content: "\f29d"; } +.bi-cloud-fill::before { content: "\f29e"; } +.bi-cloud-fog-fill::before { content: "\f29f"; } +.bi-cloud-fog::before { content: "\f2a0"; } +.bi-cloud-fog2-fill::before { content: "\f2a1"; } +.bi-cloud-fog2::before { content: "\f2a2"; } +.bi-cloud-hail-fill::before { content: "\f2a3"; } +.bi-cloud-hail::before { content: "\f2a4"; } +.bi-cloud-haze-fill::before { content: "\f2a6"; } +.bi-cloud-haze::before { content: "\f2a7"; } +.bi-cloud-haze2-fill::before { content: "\f2a8"; } +.bi-cloud-lightning-fill::before { content: "\f2a9"; } +.bi-cloud-lightning-rain-fill::before { content: "\f2aa"; } +.bi-cloud-lightning-rain::before { content: "\f2ab"; } +.bi-cloud-lightning::before { content: "\f2ac"; } +.bi-cloud-minus-fill::before { content: "\f2ad"; } +.bi-cloud-minus::before { content: "\f2ae"; } +.bi-cloud-moon-fill::before { content: "\f2af"; } +.bi-cloud-moon::before { content: "\f2b0"; } +.bi-cloud-plus-fill::before { content: "\f2b1"; } +.bi-cloud-plus::before { content: "\f2b2"; } +.bi-cloud-rain-fill::before { content: "\f2b3"; } +.bi-cloud-rain-heavy-fill::before { content: "\f2b4"; } +.bi-cloud-rain-heavy::before { content: "\f2b5"; } +.bi-cloud-rain::before { content: "\f2b6"; } +.bi-cloud-slash-fill::before { content: "\f2b7"; } +.bi-cloud-slash::before { content: "\f2b8"; } +.bi-cloud-sleet-fill::before { content: "\f2b9"; } +.bi-cloud-sleet::before { content: "\f2ba"; } +.bi-cloud-snow-fill::before { content: "\f2bb"; } +.bi-cloud-snow::before { content: "\f2bc"; } +.bi-cloud-sun-fill::before { content: "\f2bd"; } +.bi-cloud-sun::before { content: "\f2be"; } +.bi-cloud-upload-fill::before { content: "\f2bf"; } +.bi-cloud-upload::before { content: "\f2c0"; } +.bi-cloud::before { content: "\f2c1"; } +.bi-clouds-fill::before { content: "\f2c2"; } +.bi-clouds::before { content: "\f2c3"; } +.bi-cloudy-fill::before { content: "\f2c4"; } +.bi-cloudy::before { content: "\f2c5"; } +.bi-code-slash::before { content: "\f2c6"; } +.bi-code-square::before { content: "\f2c7"; } +.bi-code::before { content: "\f2c8"; } +.bi-collection-fill::before { content: "\f2c9"; } +.bi-collection-play-fill::before { content: "\f2ca"; } +.bi-collection-play::before { content: "\f2cb"; } +.bi-collection::before { content: "\f2cc"; } +.bi-columns-gap::before { content: "\f2cd"; } +.bi-columns::before { content: "\f2ce"; } +.bi-command::before { content: "\f2cf"; } +.bi-compass-fill::before { content: "\f2d0"; } +.bi-compass::before { content: "\f2d1"; } +.bi-cone-striped::before { content: "\f2d2"; } +.bi-cone::before { content: "\f2d3"; } +.bi-controller::before { content: "\f2d4"; } +.bi-cpu-fill::before { content: "\f2d5"; } +.bi-cpu::before { content: "\f2d6"; } +.bi-credit-card-2-back-fill::before { content: "\f2d7"; } +.bi-credit-card-2-back::before { content: "\f2d8"; } +.bi-credit-card-2-front-fill::before { content: "\f2d9"; } +.bi-credit-card-2-front::before { content: "\f2da"; } +.bi-credit-card-fill::before { content: "\f2db"; } +.bi-credit-card::before { content: "\f2dc"; } +.bi-crop::before { content: "\f2dd"; } +.bi-cup-fill::before { content: "\f2de"; } +.bi-cup-straw::before { content: "\f2df"; } +.bi-cup::before { content: "\f2e0"; } +.bi-cursor-fill::before { content: "\f2e1"; } +.bi-cursor-text::before { content: "\f2e2"; } +.bi-cursor::before { content: "\f2e3"; } +.bi-dash-circle-dotted::before { content: "\f2e4"; } +.bi-dash-circle-fill::before { content: "\f2e5"; } +.bi-dash-circle::before { content: "\f2e6"; } +.bi-dash-square-dotted::before { content: "\f2e7"; } +.bi-dash-square-fill::before { content: "\f2e8"; } +.bi-dash-square::before { content: "\f2e9"; } +.bi-dash::before { content: "\f2ea"; } +.bi-diagram-2-fill::before { content: "\f2eb"; } +.bi-diagram-2::before { content: "\f2ec"; } +.bi-diagram-3-fill::before { content: "\f2ed"; } +.bi-diagram-3::before { content: "\f2ee"; } +.bi-diamond-fill::before { content: "\f2ef"; } +.bi-diamond-half::before { content: "\f2f0"; } +.bi-diamond::before { content: "\f2f1"; } +.bi-dice-1-fill::before { content: "\f2f2"; } +.bi-dice-1::before { content: "\f2f3"; } +.bi-dice-2-fill::before { content: "\f2f4"; } +.bi-dice-2::before { content: "\f2f5"; } +.bi-dice-3-fill::before { content: "\f2f6"; } +.bi-dice-3::before { content: "\f2f7"; } +.bi-dice-4-fill::before { content: "\f2f8"; } +.bi-dice-4::before { content: "\f2f9"; } +.bi-dice-5-fill::before { content: "\f2fa"; } +.bi-dice-5::before { content: "\f2fb"; } +.bi-dice-6-fill::before { content: "\f2fc"; } +.bi-dice-6::before { content: "\f2fd"; } +.bi-disc-fill::before { content: "\f2fe"; } +.bi-disc::before { content: "\f2ff"; } +.bi-discord::before { content: "\f300"; } +.bi-display-fill::before { content: "\f301"; } +.bi-display::before { content: "\f302"; } +.bi-distribute-horizontal::before { content: "\f303"; } +.bi-distribute-vertical::before { content: "\f304"; } +.bi-door-closed-fill::before { content: "\f305"; } +.bi-door-closed::before { content: "\f306"; } +.bi-door-open-fill::before { content: "\f307"; } +.bi-door-open::before { content: "\f308"; } +.bi-dot::before { content: "\f309"; } +.bi-download::before { content: "\f30a"; } +.bi-droplet-fill::before { content: "\f30b"; } +.bi-droplet-half::before { content: "\f30c"; } +.bi-droplet::before { content: "\f30d"; } +.bi-earbuds::before { content: "\f30e"; } +.bi-easel-fill::before { content: "\f30f"; } +.bi-easel::before { content: "\f310"; } +.bi-egg-fill::before { content: "\f311"; } +.bi-egg-fried::before { content: "\f312"; } +.bi-egg::before { content: "\f313"; } +.bi-eject-fill::before { content: "\f314"; } +.bi-eject::before { content: "\f315"; } +.bi-emoji-angry-fill::before { content: "\f316"; } +.bi-emoji-angry::before { content: "\f317"; } +.bi-emoji-dizzy-fill::before { content: "\f318"; } +.bi-emoji-dizzy::before { content: "\f319"; } +.bi-emoji-expressionless-fill::before { content: "\f31a"; } +.bi-emoji-expressionless::before { content: "\f31b"; } +.bi-emoji-frown-fill::before { content: "\f31c"; } +.bi-emoji-frown::before { content: "\f31d"; } +.bi-emoji-heart-eyes-fill::before { content: "\f31e"; } +.bi-emoji-heart-eyes::before { content: "\f31f"; } +.bi-emoji-laughing-fill::before { content: "\f320"; } +.bi-emoji-laughing::before { content: "\f321"; } +.bi-emoji-neutral-fill::before { content: "\f322"; } +.bi-emoji-neutral::before { content: "\f323"; } +.bi-emoji-smile-fill::before { content: "\f324"; } +.bi-emoji-smile-upside-down-fill::before { content: "\f325"; } +.bi-emoji-smile-upside-down::before { content: "\f326"; } +.bi-emoji-smile::before { content: "\f327"; } +.bi-emoji-sunglasses-fill::before { content: "\f328"; } +.bi-emoji-sunglasses::before { content: "\f329"; } +.bi-emoji-wink-fill::before { content: "\f32a"; } +.bi-emoji-wink::before { content: "\f32b"; } +.bi-envelope-fill::before { content: "\f32c"; } +.bi-envelope-open-fill::before { content: "\f32d"; } +.bi-envelope-open::before { content: "\f32e"; } +.bi-envelope::before { content: "\f32f"; } +.bi-eraser-fill::before { content: "\f330"; } +.bi-eraser::before { content: "\f331"; } +.bi-exclamation-circle-fill::before { content: "\f332"; } +.bi-exclamation-circle::before { content: "\f333"; } +.bi-exclamation-diamond-fill::before { content: "\f334"; } +.bi-exclamation-diamond::before { content: "\f335"; } +.bi-exclamation-octagon-fill::before { content: "\f336"; } +.bi-exclamation-octagon::before { content: "\f337"; } +.bi-exclamation-square-fill::before { content: "\f338"; } +.bi-exclamation-square::before { content: "\f339"; } +.bi-exclamation-triangle-fill::before { content: "\f33a"; } +.bi-exclamation-triangle::before { content: "\f33b"; } +.bi-exclamation::before { content: "\f33c"; } +.bi-exclude::before { content: "\f33d"; } +.bi-eye-fill::before { content: "\f33e"; } +.bi-eye-slash-fill::before { content: "\f33f"; } +.bi-eye-slash::before { content: "\f340"; } +.bi-eye::before { content: "\f341"; } +.bi-eyedropper::before { content: "\f342"; } +.bi-eyeglasses::before { content: "\f343"; } +.bi-facebook::before { content: "\f344"; } +.bi-file-arrow-down-fill::before { content: "\f345"; } +.bi-file-arrow-down::before { content: "\f346"; } +.bi-file-arrow-up-fill::before { content: "\f347"; } +.bi-file-arrow-up::before { content: "\f348"; } +.bi-file-bar-graph-fill::before { content: "\f349"; } +.bi-file-bar-graph::before { content: "\f34a"; } +.bi-file-binary-fill::before { content: "\f34b"; } +.bi-file-binary::before { content: "\f34c"; } +.bi-file-break-fill::before { content: "\f34d"; } +.bi-file-break::before { content: "\f34e"; } +.bi-file-check-fill::before { content: "\f34f"; } +.bi-file-check::before { content: "\f350"; } +.bi-file-code-fill::before { content: "\f351"; } +.bi-file-code::before { content: "\f352"; } +.bi-file-diff-fill::before { content: "\f353"; } +.bi-file-diff::before { content: "\f354"; } +.bi-file-earmark-arrow-down-fill::before { content: "\f355"; } +.bi-file-earmark-arrow-down::before { content: "\f356"; } +.bi-file-earmark-arrow-up-fill::before { content: "\f357"; } +.bi-file-earmark-arrow-up::before { content: "\f358"; } +.bi-file-earmark-bar-graph-fill::before { content: "\f359"; } +.bi-file-earmark-bar-graph::before { content: "\f35a"; } +.bi-file-earmark-binary-fill::before { content: "\f35b"; } +.bi-file-earmark-binary::before { content: "\f35c"; } +.bi-file-earmark-break-fill::before { content: "\f35d"; } +.bi-file-earmark-break::before { content: "\f35e"; } +.bi-file-earmark-check-fill::before { content: "\f35f"; } +.bi-file-earmark-check::before { content: "\f360"; } +.bi-file-earmark-code-fill::before { content: "\f361"; } +.bi-file-earmark-code::before { content: "\f362"; } +.bi-file-earmark-diff-fill::before { content: "\f363"; } +.bi-file-earmark-diff::before { content: "\f364"; } +.bi-file-earmark-easel-fill::before { content: "\f365"; } +.bi-file-earmark-easel::before { content: "\f366"; } +.bi-file-earmark-excel-fill::before { content: "\f367"; } +.bi-file-earmark-excel::before { content: "\f368"; } +.bi-file-earmark-fill::before { content: "\f369"; } +.bi-file-earmark-font-fill::before { content: "\f36a"; } +.bi-file-earmark-font::before { content: "\f36b"; } +.bi-file-earmark-image-fill::before { content: "\f36c"; } +.bi-file-earmark-image::before { content: "\f36d"; } +.bi-file-earmark-lock-fill::before { content: "\f36e"; } +.bi-file-earmark-lock::before { content: "\f36f"; } +.bi-file-earmark-lock2-fill::before { content: "\f370"; } +.bi-file-earmark-lock2::before { content: "\f371"; } +.bi-file-earmark-medical-fill::before { content: "\f372"; } +.bi-file-earmark-medical::before { content: "\f373"; } +.bi-file-earmark-minus-fill::before { content: "\f374"; } +.bi-file-earmark-minus::before { content: "\f375"; } +.bi-file-earmark-music-fill::before { content: "\f376"; } +.bi-file-earmark-music::before { content: "\f377"; } +.bi-file-earmark-person-fill::before { content: "\f378"; } +.bi-file-earmark-person::before { content: "\f379"; } +.bi-file-earmark-play-fill::before { content: "\f37a"; } +.bi-file-earmark-play::before { content: "\f37b"; } +.bi-file-earmark-plus-fill::before { content: "\f37c"; } +.bi-file-earmark-plus::before { content: "\f37d"; } +.bi-file-earmark-post-fill::before { content: "\f37e"; } +.bi-file-earmark-post::before { content: "\f37f"; } +.bi-file-earmark-ppt-fill::before { content: "\f380"; } +.bi-file-earmark-ppt::before { content: "\f381"; } +.bi-file-earmark-richtext-fill::before { content: "\f382"; } +.bi-file-earmark-richtext::before { content: "\f383"; } +.bi-file-earmark-ruled-fill::before { content: "\f384"; } +.bi-file-earmark-ruled::before { content: "\f385"; } +.bi-file-earmark-slides-fill::before { content: "\f386"; } +.bi-file-earmark-slides::before { content: "\f387"; } +.bi-file-earmark-spreadsheet-fill::before { content: "\f388"; } +.bi-file-earmark-spreadsheet::before { content: "\f389"; } +.bi-file-earmark-text-fill::before { content: "\f38a"; } +.bi-file-earmark-text::before { content: "\f38b"; } +.bi-file-earmark-word-fill::before { content: "\f38c"; } +.bi-file-earmark-word::before { content: "\f38d"; } +.bi-file-earmark-x-fill::before { content: "\f38e"; } +.bi-file-earmark-x::before { content: "\f38f"; } +.bi-file-earmark-zip-fill::before { content: "\f390"; } +.bi-file-earmark-zip::before { content: "\f391"; } +.bi-file-earmark::before { content: "\f392"; } +.bi-file-easel-fill::before { content: "\f393"; } +.bi-file-easel::before { content: "\f394"; } +.bi-file-excel-fill::before { content: "\f395"; } +.bi-file-excel::before { content: "\f396"; } +.bi-file-fill::before { content: "\f397"; } +.bi-file-font-fill::before { content: "\f398"; } +.bi-file-font::before { content: "\f399"; } +.bi-file-image-fill::before { content: "\f39a"; } +.bi-file-image::before { content: "\f39b"; } +.bi-file-lock-fill::before { content: "\f39c"; } +.bi-file-lock::before { content: "\f39d"; } +.bi-file-lock2-fill::before { content: "\f39e"; } +.bi-file-lock2::before { content: "\f39f"; } +.bi-file-medical-fill::before { content: "\f3a0"; } +.bi-file-medical::before { content: "\f3a1"; } +.bi-file-minus-fill::before { content: "\f3a2"; } +.bi-file-minus::before { content: "\f3a3"; } +.bi-file-music-fill::before { content: "\f3a4"; } +.bi-file-music::before { content: "\f3a5"; } +.bi-file-person-fill::before { content: "\f3a6"; } +.bi-file-person::before { content: "\f3a7"; } +.bi-file-play-fill::before { content: "\f3a8"; } +.bi-file-play::before { content: "\f3a9"; } +.bi-file-plus-fill::before { content: "\f3aa"; } +.bi-file-plus::before { content: "\f3ab"; } +.bi-file-post-fill::before { content: "\f3ac"; } +.bi-file-post::before { content: "\f3ad"; } +.bi-file-ppt-fill::before { content: "\f3ae"; } +.bi-file-ppt::before { content: "\f3af"; } +.bi-file-richtext-fill::before { content: "\f3b0"; } +.bi-file-richtext::before { content: "\f3b1"; } +.bi-file-ruled-fill::before { content: "\f3b2"; } +.bi-file-ruled::before { content: "\f3b3"; } +.bi-file-slides-fill::before { content: "\f3b4"; } +.bi-file-slides::before { content: "\f3b5"; } +.bi-file-spreadsheet-fill::before { content: "\f3b6"; } +.bi-file-spreadsheet::before { content: "\f3b7"; } +.bi-file-text-fill::before { content: "\f3b8"; } +.bi-file-text::before { content: "\f3b9"; } +.bi-file-word-fill::before { content: "\f3ba"; } +.bi-file-word::before { content: "\f3bb"; } +.bi-file-x-fill::before { content: "\f3bc"; } +.bi-file-x::before { content: "\f3bd"; } +.bi-file-zip-fill::before { content: "\f3be"; } +.bi-file-zip::before { content: "\f3bf"; } +.bi-file::before { content: "\f3c0"; } +.bi-files-alt::before { content: "\f3c1"; } +.bi-files::before { content: "\f3c2"; } +.bi-film::before { content: "\f3c3"; } +.bi-filter-circle-fill::before { content: "\f3c4"; } +.bi-filter-circle::before { content: "\f3c5"; } +.bi-filter-left::before { content: "\f3c6"; } +.bi-filter-right::before { content: "\f3c7"; } +.bi-filter-square-fill::before { content: "\f3c8"; } +.bi-filter-square::before { content: "\f3c9"; } +.bi-filter::before { content: "\f3ca"; } +.bi-flag-fill::before { content: "\f3cb"; } +.bi-flag::before { content: "\f3cc"; } +.bi-flower1::before { content: "\f3cd"; } +.bi-flower2::before { content: "\f3ce"; } +.bi-flower3::before { content: "\f3cf"; } +.bi-folder-check::before { content: "\f3d0"; } +.bi-folder-fill::before { content: "\f3d1"; } +.bi-folder-minus::before { content: "\f3d2"; } +.bi-folder-plus::before { content: "\f3d3"; } +.bi-folder-symlink-fill::before { content: "\f3d4"; } +.bi-folder-symlink::before { content: "\f3d5"; } +.bi-folder-x::before { content: "\f3d6"; } +.bi-folder::before { content: "\f3d7"; } +.bi-folder2-open::before { content: "\f3d8"; } +.bi-folder2::before { content: "\f3d9"; } +.bi-fonts::before { content: "\f3da"; } +.bi-forward-fill::before { content: "\f3db"; } +.bi-forward::before { content: "\f3dc"; } +.bi-front::before { content: "\f3dd"; } +.bi-fullscreen-exit::before { content: "\f3de"; } +.bi-fullscreen::before { content: "\f3df"; } +.bi-funnel-fill::before { content: "\f3e0"; } +.bi-funnel::before { content: "\f3e1"; } +.bi-gear-fill::before { content: "\f3e2"; } +.bi-gear-wide-connected::before { content: "\f3e3"; } +.bi-gear-wide::before { content: "\f3e4"; } +.bi-gear::before { content: "\f3e5"; } +.bi-gem::before { content: "\f3e6"; } +.bi-geo-alt-fill::before { content: "\f3e7"; } +.bi-geo-alt::before { content: "\f3e8"; } +.bi-geo-fill::before { content: "\f3e9"; } +.bi-geo::before { content: "\f3ea"; } +.bi-gift-fill::before { content: "\f3eb"; } +.bi-gift::before { content: "\f3ec"; } +.bi-github::before { content: "\f3ed"; } +.bi-globe::before { content: "\f3ee"; } +.bi-globe2::before { content: "\f3ef"; } +.bi-google::before { content: "\f3f0"; } +.bi-graph-down::before { content: "\f3f1"; } +.bi-graph-up::before { content: "\f3f2"; } +.bi-grid-1x2-fill::before { content: "\f3f3"; } +.bi-grid-1x2::before { content: "\f3f4"; } +.bi-grid-3x2-gap-fill::before { content: "\f3f5"; } +.bi-grid-3x2-gap::before { content: "\f3f6"; } +.bi-grid-3x2::before { content: "\f3f7"; } +.bi-grid-3x3-gap-fill::before { content: "\f3f8"; } +.bi-grid-3x3-gap::before { content: "\f3f9"; } +.bi-grid-3x3::before { content: "\f3fa"; } +.bi-grid-fill::before { content: "\f3fb"; } +.bi-grid::before { content: "\f3fc"; } +.bi-grip-horizontal::before { content: "\f3fd"; } +.bi-grip-vertical::before { content: "\f3fe"; } +.bi-hammer::before { content: "\f3ff"; } +.bi-hand-index-fill::before { content: "\f400"; } +.bi-hand-index-thumb-fill::before { content: "\f401"; } +.bi-hand-index-thumb::before { content: "\f402"; } +.bi-hand-index::before { content: "\f403"; } +.bi-hand-thumbs-down-fill::before { content: "\f404"; } +.bi-hand-thumbs-down::before { content: "\f405"; } +.bi-hand-thumbs-up-fill::before { content: "\f406"; } +.bi-hand-thumbs-up::before { content: "\f407"; } +.bi-handbag-fill::before { content: "\f408"; } +.bi-handbag::before { content: "\f409"; } +.bi-hash::before { content: "\f40a"; } +.bi-hdd-fill::before { content: "\f40b"; } +.bi-hdd-network-fill::before { content: "\f40c"; } +.bi-hdd-network::before { content: "\f40d"; } +.bi-hdd-rack-fill::before { content: "\f40e"; } +.bi-hdd-rack::before { content: "\f40f"; } +.bi-hdd-stack-fill::before { content: "\f410"; } +.bi-hdd-stack::before { content: "\f411"; } +.bi-hdd::before { content: "\f412"; } +.bi-headphones::before { content: "\f413"; } +.bi-headset::before { content: "\f414"; } +.bi-heart-fill::before { content: "\f415"; } +.bi-heart-half::before { content: "\f416"; } +.bi-heart::before { content: "\f417"; } +.bi-heptagon-fill::before { content: "\f418"; } +.bi-heptagon-half::before { content: "\f419"; } +.bi-heptagon::before { content: "\f41a"; } +.bi-hexagon-fill::before { content: "\f41b"; } +.bi-hexagon-half::before { content: "\f41c"; } +.bi-hexagon::before { content: "\f41d"; } +.bi-hourglass-bottom::before { content: "\f41e"; } +.bi-hourglass-split::before { content: "\f41f"; } +.bi-hourglass-top::before { content: "\f420"; } +.bi-hourglass::before { content: "\f421"; } +.bi-house-door-fill::before { content: "\f422"; } +.bi-house-door::before { content: "\f423"; } +.bi-house-fill::before { content: "\f424"; } +.bi-house::before { content: "\f425"; } +.bi-hr::before { content: "\f426"; } +.bi-hurricane::before { content: "\f427"; } +.bi-image-alt::before { content: "\f428"; } +.bi-image-fill::before { content: "\f429"; } +.bi-image::before { content: "\f42a"; } +.bi-images::before { content: "\f42b"; } +.bi-inbox-fill::before { content: "\f42c"; } +.bi-inbox::before { content: "\f42d"; } +.bi-inboxes-fill::before { content: "\f42e"; } +.bi-inboxes::before { content: "\f42f"; } +.bi-info-circle-fill::before { content: "\f430"; } +.bi-info-circle::before { content: "\f431"; } +.bi-info-square-fill::before { content: "\f432"; } +.bi-info-square::before { content: "\f433"; } +.bi-info::before { content: "\f434"; } +.bi-input-cursor-text::before { content: "\f435"; } +.bi-input-cursor::before { content: "\f436"; } +.bi-instagram::before { content: "\f437"; } +.bi-intersect::before { content: "\f438"; } +.bi-journal-album::before { content: "\f439"; } +.bi-journal-arrow-down::before { content: "\f43a"; } +.bi-journal-arrow-up::before { content: "\f43b"; } +.bi-journal-bookmark-fill::before { content: "\f43c"; } +.bi-journal-bookmark::before { content: "\f43d"; } +.bi-journal-check::before { content: "\f43e"; } +.bi-journal-code::before { content: "\f43f"; } +.bi-journal-medical::before { content: "\f440"; } +.bi-journal-minus::before { content: "\f441"; } +.bi-journal-plus::before { content: "\f442"; } +.bi-journal-richtext::before { content: "\f443"; } +.bi-journal-text::before { content: "\f444"; } +.bi-journal-x::before { content: "\f445"; } +.bi-journal::before { content: "\f446"; } +.bi-journals::before { content: "\f447"; } +.bi-joystick::before { content: "\f448"; } +.bi-justify-left::before { content: "\f449"; } +.bi-justify-right::before { content: "\f44a"; } +.bi-justify::before { content: "\f44b"; } +.bi-kanban-fill::before { content: "\f44c"; } +.bi-kanban::before { content: "\f44d"; } +.bi-key-fill::before { content: "\f44e"; } +.bi-key::before { content: "\f44f"; } +.bi-keyboard-fill::before { content: "\f450"; } +.bi-keyboard::before { content: "\f451"; } +.bi-ladder::before { content: "\f452"; } +.bi-lamp-fill::before { content: "\f453"; } +.bi-lamp::before { content: "\f454"; } +.bi-laptop-fill::before { content: "\f455"; } +.bi-laptop::before { content: "\f456"; } +.bi-layer-backward::before { content: "\f457"; } +.bi-layer-forward::before { content: "\f458"; } +.bi-layers-fill::before { content: "\f459"; } +.bi-layers-half::before { content: "\f45a"; } +.bi-layers::before { content: "\f45b"; } +.bi-layout-sidebar-inset-reverse::before { content: "\f45c"; } +.bi-layout-sidebar-inset::before { content: "\f45d"; } +.bi-layout-sidebar-reverse::before { content: "\f45e"; } +.bi-layout-sidebar::before { content: "\f45f"; } +.bi-layout-split::before { content: "\f460"; } +.bi-layout-text-sidebar-reverse::before { content: "\f461"; } +.bi-layout-text-sidebar::before { content: "\f462"; } +.bi-layout-text-window-reverse::before { content: "\f463"; } +.bi-layout-text-window::before { content: "\f464"; } +.bi-layout-three-columns::before { content: "\f465"; } +.bi-layout-wtf::before { content: "\f466"; } +.bi-life-preserver::before { content: "\f467"; } +.bi-lightbulb-fill::before { content: "\f468"; } +.bi-lightbulb-off-fill::before { content: "\f469"; } +.bi-lightbulb-off::before { content: "\f46a"; } +.bi-lightbulb::before { content: "\f46b"; } +.bi-lightning-charge-fill::before { content: "\f46c"; } +.bi-lightning-charge::before { content: "\f46d"; } +.bi-lightning-fill::before { content: "\f46e"; } +.bi-lightning::before { content: "\f46f"; } +.bi-link-45deg::before { content: "\f470"; } +.bi-link::before { content: "\f471"; } +.bi-linkedin::before { content: "\f472"; } +.bi-list-check::before { content: "\f473"; } +.bi-list-nested::before { content: "\f474"; } +.bi-list-ol::before { content: "\f475"; } +.bi-list-stars::before { content: "\f476"; } +.bi-list-task::before { content: "\f477"; } +.bi-list-ul::before { content: "\f478"; } +.bi-list::before { content: "\f479"; } +.bi-lock-fill::before { content: "\f47a"; } +.bi-lock::before { content: "\f47b"; } +.bi-mailbox::before { content: "\f47c"; } +.bi-mailbox2::before { content: "\f47d"; } +.bi-map-fill::before { content: "\f47e"; } +.bi-map::before { content: "\f47f"; } +.bi-markdown-fill::before { content: "\f480"; } +.bi-markdown::before { content: "\f481"; } +.bi-mask::before { content: "\f482"; } +.bi-megaphone-fill::before { content: "\f483"; } +.bi-megaphone::before { content: "\f484"; } +.bi-menu-app-fill::before { content: "\f485"; } +.bi-menu-app::before { content: "\f486"; } +.bi-menu-button-fill::before { content: "\f487"; } +.bi-menu-button-wide-fill::before { content: "\f488"; } +.bi-menu-button-wide::before { content: "\f489"; } +.bi-menu-button::before { content: "\f48a"; } +.bi-menu-down::before { content: "\f48b"; } +.bi-menu-up::before { content: "\f48c"; } +.bi-mic-fill::before { content: "\f48d"; } +.bi-mic-mute-fill::before { content: "\f48e"; } +.bi-mic-mute::before { content: "\f48f"; } +.bi-mic::before { content: "\f490"; } +.bi-minecart-loaded::before { content: "\f491"; } +.bi-minecart::before { content: "\f492"; } +.bi-moisture::before { content: "\f493"; } +.bi-moon-fill::before { content: "\f494"; } +.bi-moon-stars-fill::before { content: "\f495"; } +.bi-moon-stars::before { content: "\f496"; } +.bi-moon::before { content: "\f497"; } +.bi-mouse-fill::before { content: "\f498"; } +.bi-mouse::before { content: "\f499"; } +.bi-mouse2-fill::before { content: "\f49a"; } +.bi-mouse2::before { content: "\f49b"; } +.bi-mouse3-fill::before { content: "\f49c"; } +.bi-mouse3::before { content: "\f49d"; } +.bi-music-note-beamed::before { content: "\f49e"; } +.bi-music-note-list::before { content: "\f49f"; } +.bi-music-note::before { content: "\f4a0"; } +.bi-music-player-fill::before { content: "\f4a1"; } +.bi-music-player::before { content: "\f4a2"; } +.bi-newspaper::before { content: "\f4a3"; } +.bi-node-minus-fill::before { content: "\f4a4"; } +.bi-node-minus::before { content: "\f4a5"; } +.bi-node-plus-fill::before { content: "\f4a6"; } +.bi-node-plus::before { content: "\f4a7"; } +.bi-nut-fill::before { content: "\f4a8"; } +.bi-nut::before { content: "\f4a9"; } +.bi-octagon-fill::before { content: "\f4aa"; } +.bi-octagon-half::before { content: "\f4ab"; } +.bi-octagon::before { content: "\f4ac"; } +.bi-option::before { content: "\f4ad"; } +.bi-outlet::before { content: "\f4ae"; } +.bi-paint-bucket::before { content: "\f4af"; } +.bi-palette-fill::before { content: "\f4b0"; } +.bi-palette::before { content: "\f4b1"; } +.bi-palette2::before { content: "\f4b2"; } +.bi-paperclip::before { content: "\f4b3"; } +.bi-paragraph::before { content: "\f4b4"; } +.bi-patch-check-fill::before { content: "\f4b5"; } +.bi-patch-check::before { content: "\f4b6"; } +.bi-patch-exclamation-fill::before { content: "\f4b7"; } +.bi-patch-exclamation::before { content: "\f4b8"; } +.bi-patch-minus-fill::before { content: "\f4b9"; } +.bi-patch-minus::before { content: "\f4ba"; } +.bi-patch-plus-fill::before { content: "\f4bb"; } +.bi-patch-plus::before { content: "\f4bc"; } +.bi-patch-question-fill::before { content: "\f4bd"; } +.bi-patch-question::before { content: "\f4be"; } +.bi-pause-btn-fill::before { content: "\f4bf"; } +.bi-pause-btn::before { content: "\f4c0"; } +.bi-pause-circle-fill::before { content: "\f4c1"; } +.bi-pause-circle::before { content: "\f4c2"; } +.bi-pause-fill::before { content: "\f4c3"; } +.bi-pause::before { content: "\f4c4"; } +.bi-peace-fill::before { content: "\f4c5"; } +.bi-peace::before { content: "\f4c6"; } +.bi-pen-fill::before { content: "\f4c7"; } +.bi-pen::before { content: "\f4c8"; } +.bi-pencil-fill::before { content: "\f4c9"; } +.bi-pencil-square::before { content: "\f4ca"; } +.bi-pencil::before { content: "\f4cb"; } +.bi-pentagon-fill::before { content: "\f4cc"; } +.bi-pentagon-half::before { content: "\f4cd"; } +.bi-pentagon::before { content: "\f4ce"; } +.bi-people-fill::before { content: "\f4cf"; } +.bi-people::before { content: "\f4d0"; } +.bi-percent::before { content: "\f4d1"; } +.bi-person-badge-fill::before { content: "\f4d2"; } +.bi-person-badge::before { content: "\f4d3"; } +.bi-person-bounding-box::before { content: "\f4d4"; } +.bi-person-check-fill::before { content: "\f4d5"; } +.bi-person-check::before { content: "\f4d6"; } +.bi-person-circle::before { content: "\f4d7"; } +.bi-person-dash-fill::before { content: "\f4d8"; } +.bi-person-dash::before { content: "\f4d9"; } +.bi-person-fill::before { content: "\f4da"; } +.bi-person-lines-fill::before { content: "\f4db"; } +.bi-person-plus-fill::before { content: "\f4dc"; } +.bi-person-plus::before { content: "\f4dd"; } +.bi-person-square::before { content: "\f4de"; } +.bi-person-x-fill::before { content: "\f4df"; } +.bi-person-x::before { content: "\f4e0"; } +.bi-person::before { content: "\f4e1"; } +.bi-phone-fill::before { content: "\f4e2"; } +.bi-phone-landscape-fill::before { content: "\f4e3"; } +.bi-phone-landscape::before { content: "\f4e4"; } +.bi-phone-vibrate-fill::before { content: "\f4e5"; } +.bi-phone-vibrate::before { content: "\f4e6"; } +.bi-phone::before { content: "\f4e7"; } +.bi-pie-chart-fill::before { content: "\f4e8"; } +.bi-pie-chart::before { content: "\f4e9"; } +.bi-pin-angle-fill::before { content: "\f4ea"; } +.bi-pin-angle::before { content: "\f4eb"; } +.bi-pin-fill::before { content: "\f4ec"; } +.bi-pin::before { content: "\f4ed"; } +.bi-pip-fill::before { content: "\f4ee"; } +.bi-pip::before { content: "\f4ef"; } +.bi-play-btn-fill::before { content: "\f4f0"; } +.bi-play-btn::before { content: "\f4f1"; } +.bi-play-circle-fill::before { content: "\f4f2"; } +.bi-play-circle::before { content: "\f4f3"; } +.bi-play-fill::before { content: "\f4f4"; } +.bi-play::before { content: "\f4f5"; } +.bi-plug-fill::before { content: "\f4f6"; } +.bi-plug::before { content: "\f4f7"; } +.bi-plus-circle-dotted::before { content: "\f4f8"; } +.bi-plus-circle-fill::before { content: "\f4f9"; } +.bi-plus-circle::before { content: "\f4fa"; } +.bi-plus-square-dotted::before { content: "\f4fb"; } +.bi-plus-square-fill::before { content: "\f4fc"; } +.bi-plus-square::before { content: "\f4fd"; } +.bi-plus::before { content: "\f4fe"; } +.bi-power::before { content: "\f4ff"; } +.bi-printer-fill::before { content: "\f500"; } +.bi-printer::before { content: "\f501"; } +.bi-puzzle-fill::before { content: "\f502"; } +.bi-puzzle::before { content: "\f503"; } +.bi-question-circle-fill::before { content: "\f504"; } +.bi-question-circle::before { content: "\f505"; } +.bi-question-diamond-fill::before { content: "\f506"; } +.bi-question-diamond::before { content: "\f507"; } +.bi-question-octagon-fill::before { content: "\f508"; } +.bi-question-octagon::before { content: "\f509"; } +.bi-question-square-fill::before { content: "\f50a"; } +.bi-question-square::before { content: "\f50b"; } +.bi-question::before { content: "\f50c"; } +.bi-rainbow::before { content: "\f50d"; } +.bi-receipt-cutoff::before { content: "\f50e"; } +.bi-receipt::before { content: "\f50f"; } +.bi-reception-0::before { content: "\f510"; } +.bi-reception-1::before { content: "\f511"; } +.bi-reception-2::before { content: "\f512"; } +.bi-reception-3::before { content: "\f513"; } +.bi-reception-4::before { content: "\f514"; } +.bi-record-btn-fill::before { content: "\f515"; } +.bi-record-btn::before { content: "\f516"; } +.bi-record-circle-fill::before { content: "\f517"; } +.bi-record-circle::before { content: "\f518"; } +.bi-record-fill::before { content: "\f519"; } +.bi-record::before { content: "\f51a"; } +.bi-record2-fill::before { content: "\f51b"; } +.bi-record2::before { content: "\f51c"; } +.bi-reply-all-fill::before { content: "\f51d"; } +.bi-reply-all::before { content: "\f51e"; } +.bi-reply-fill::before { content: "\f51f"; } +.bi-reply::before { content: "\f520"; } +.bi-rss-fill::before { content: "\f521"; } +.bi-rss::before { content: "\f522"; } +.bi-rulers::before { content: "\f523"; } +.bi-save-fill::before { content: "\f524"; } +.bi-save::before { content: "\f525"; } +.bi-save2-fill::before { content: "\f526"; } +.bi-save2::before { content: "\f527"; } +.bi-scissors::before { content: "\f528"; } +.bi-screwdriver::before { content: "\f529"; } +.bi-search::before { content: "\f52a"; } +.bi-segmented-nav::before { content: "\f52b"; } +.bi-server::before { content: "\f52c"; } +.bi-share-fill::before { content: "\f52d"; } +.bi-share::before { content: "\f52e"; } +.bi-shield-check::before { content: "\f52f"; } +.bi-shield-exclamation::before { content: "\f530"; } +.bi-shield-fill-check::before { content: "\f531"; } +.bi-shield-fill-exclamation::before { content: "\f532"; } +.bi-shield-fill-minus::before { content: "\f533"; } +.bi-shield-fill-plus::before { content: "\f534"; } +.bi-shield-fill-x::before { content: "\f535"; } +.bi-shield-fill::before { content: "\f536"; } +.bi-shield-lock-fill::before { content: "\f537"; } +.bi-shield-lock::before { content: "\f538"; } +.bi-shield-minus::before { content: "\f539"; } +.bi-shield-plus::before { content: "\f53a"; } +.bi-shield-shaded::before { content: "\f53b"; } +.bi-shield-slash-fill::before { content: "\f53c"; } +.bi-shield-slash::before { content: "\f53d"; } +.bi-shield-x::before { content: "\f53e"; } +.bi-shield::before { content: "\f53f"; } +.bi-shift-fill::before { content: "\f540"; } +.bi-shift::before { content: "\f541"; } +.bi-shop-window::before { content: "\f542"; } +.bi-shop::before { content: "\f543"; } +.bi-shuffle::before { content: "\f544"; } +.bi-signpost-2-fill::before { content: "\f545"; } +.bi-signpost-2::before { content: "\f546"; } +.bi-signpost-fill::before { content: "\f547"; } +.bi-signpost-split-fill::before { content: "\f548"; } +.bi-signpost-split::before { content: "\f549"; } +.bi-signpost::before { content: "\f54a"; } +.bi-sim-fill::before { content: "\f54b"; } +.bi-sim::before { content: "\f54c"; } +.bi-skip-backward-btn-fill::before { content: "\f54d"; } +.bi-skip-backward-btn::before { content: "\f54e"; } +.bi-skip-backward-circle-fill::before { content: "\f54f"; } +.bi-skip-backward-circle::before { content: "\f550"; } +.bi-skip-backward-fill::before { content: "\f551"; } +.bi-skip-backward::before { content: "\f552"; } +.bi-skip-end-btn-fill::before { content: "\f553"; } +.bi-skip-end-btn::before { content: "\f554"; } +.bi-skip-end-circle-fill::before { content: "\f555"; } +.bi-skip-end-circle::before { content: "\f556"; } +.bi-skip-end-fill::before { content: "\f557"; } +.bi-skip-end::before { content: "\f558"; } +.bi-skip-forward-btn-fill::before { content: "\f559"; } +.bi-skip-forward-btn::before { content: "\f55a"; } +.bi-skip-forward-circle-fill::before { content: "\f55b"; } +.bi-skip-forward-circle::before { content: "\f55c"; } +.bi-skip-forward-fill::before { content: "\f55d"; } +.bi-skip-forward::before { content: "\f55e"; } +.bi-skip-start-btn-fill::before { content: "\f55f"; } +.bi-skip-start-btn::before { content: "\f560"; } +.bi-skip-start-circle-fill::before { content: "\f561"; } +.bi-skip-start-circle::before { content: "\f562"; } +.bi-skip-start-fill::before { content: "\f563"; } +.bi-skip-start::before { content: "\f564"; } +.bi-slack::before { content: "\f565"; } +.bi-slash-circle-fill::before { content: "\f566"; } +.bi-slash-circle::before { content: "\f567"; } +.bi-slash-square-fill::before { content: "\f568"; } +.bi-slash-square::before { content: "\f569"; } +.bi-slash::before { content: "\f56a"; } +.bi-sliders::before { content: "\f56b"; } +.bi-smartwatch::before { content: "\f56c"; } +.bi-snow::before { content: "\f56d"; } +.bi-snow2::before { content: "\f56e"; } +.bi-snow3::before { content: "\f56f"; } +.bi-sort-alpha-down-alt::before { content: "\f570"; } +.bi-sort-alpha-down::before { content: "\f571"; } +.bi-sort-alpha-up-alt::before { content: "\f572"; } +.bi-sort-alpha-up::before { content: "\f573"; } +.bi-sort-down-alt::before { content: "\f574"; } +.bi-sort-down::before { content: "\f575"; } +.bi-sort-numeric-down-alt::before { content: "\f576"; } +.bi-sort-numeric-down::before { content: "\f577"; } +.bi-sort-numeric-up-alt::before { content: "\f578"; } +.bi-sort-numeric-up::before { content: "\f579"; } +.bi-sort-up-alt::before { content: "\f57a"; } +.bi-sort-up::before { content: "\f57b"; } +.bi-soundwave::before { content: "\f57c"; } +.bi-speaker-fill::before { content: "\f57d"; } +.bi-speaker::before { content: "\f57e"; } +.bi-speedometer::before { content: "\f57f"; } +.bi-speedometer2::before { content: "\f580"; } +.bi-spellcheck::before { content: "\f581"; } +.bi-square-fill::before { content: "\f582"; } +.bi-square-half::before { content: "\f583"; } +.bi-square::before { content: "\f584"; } +.bi-stack::before { content: "\f585"; } +.bi-star-fill::before { content: "\f586"; } +.bi-star-half::before { content: "\f587"; } +.bi-star::before { content: "\f588"; } +.bi-stars::before { content: "\f589"; } +.bi-stickies-fill::before { content: "\f58a"; } +.bi-stickies::before { content: "\f58b"; } +.bi-sticky-fill::before { content: "\f58c"; } +.bi-sticky::before { content: "\f58d"; } +.bi-stop-btn-fill::before { content: "\f58e"; } +.bi-stop-btn::before { content: "\f58f"; } +.bi-stop-circle-fill::before { content: "\f590"; } +.bi-stop-circle::before { content: "\f591"; } +.bi-stop-fill::before { content: "\f592"; } +.bi-stop::before { content: "\f593"; } +.bi-stoplights-fill::before { content: "\f594"; } +.bi-stoplights::before { content: "\f595"; } +.bi-stopwatch-fill::before { content: "\f596"; } +.bi-stopwatch::before { content: "\f597"; } +.bi-subtract::before { content: "\f598"; } +.bi-suit-club-fill::before { content: "\f599"; } +.bi-suit-club::before { content: "\f59a"; } +.bi-suit-diamond-fill::before { content: "\f59b"; } +.bi-suit-diamond::before { content: "\f59c"; } +.bi-suit-heart-fill::before { content: "\f59d"; } +.bi-suit-heart::before { content: "\f59e"; } +.bi-suit-spade-fill::before { content: "\f59f"; } +.bi-suit-spade::before { content: "\f5a0"; } +.bi-sun-fill::before { content: "\f5a1"; } +.bi-sun::before { content: "\f5a2"; } +.bi-sunglasses::before { content: "\f5a3"; } +.bi-sunrise-fill::before { content: "\f5a4"; } +.bi-sunrise::before { content: "\f5a5"; } +.bi-sunset-fill::before { content: "\f5a6"; } +.bi-sunset::before { content: "\f5a7"; } +.bi-symmetry-horizontal::before { content: "\f5a8"; } +.bi-symmetry-vertical::before { content: "\f5a9"; } +.bi-table::before { content: "\f5aa"; } +.bi-tablet-fill::before { content: "\f5ab"; } +.bi-tablet-landscape-fill::before { content: "\f5ac"; } +.bi-tablet-landscape::before { content: "\f5ad"; } +.bi-tablet::before { content: "\f5ae"; } +.bi-tag-fill::before { content: "\f5af"; } +.bi-tag::before { content: "\f5b0"; } +.bi-tags-fill::before { content: "\f5b1"; } +.bi-tags::before { content: "\f5b2"; } +.bi-telegram::before { content: "\f5b3"; } +.bi-telephone-fill::before { content: "\f5b4"; } +.bi-telephone-forward-fill::before { content: "\f5b5"; } +.bi-telephone-forward::before { content: "\f5b6"; } +.bi-telephone-inbound-fill::before { content: "\f5b7"; } +.bi-telephone-inbound::before { content: "\f5b8"; } +.bi-telephone-minus-fill::before { content: "\f5b9"; } +.bi-telephone-minus::before { content: "\f5ba"; } +.bi-telephone-outbound-fill::before { content: "\f5bb"; } +.bi-telephone-outbound::before { content: "\f5bc"; } +.bi-telephone-plus-fill::before { content: "\f5bd"; } +.bi-telephone-plus::before { content: "\f5be"; } +.bi-telephone-x-fill::before { content: "\f5bf"; } +.bi-telephone-x::before { content: "\f5c0"; } +.bi-telephone::before { content: "\f5c1"; } +.bi-terminal-fill::before { content: "\f5c2"; } +.bi-terminal::before { content: "\f5c3"; } +.bi-text-center::before { content: "\f5c4"; } +.bi-text-indent-left::before { content: "\f5c5"; } +.bi-text-indent-right::before { content: "\f5c6"; } +.bi-text-left::before { content: "\f5c7"; } +.bi-text-paragraph::before { content: "\f5c8"; } +.bi-text-right::before { content: "\f5c9"; } +.bi-textarea-resize::before { content: "\f5ca"; } +.bi-textarea-t::before { content: "\f5cb"; } +.bi-textarea::before { content: "\f5cc"; } +.bi-thermometer-half::before { content: "\f5cd"; } +.bi-thermometer-high::before { content: "\f5ce"; } +.bi-thermometer-low::before { content: "\f5cf"; } +.bi-thermometer-snow::before { content: "\f5d0"; } +.bi-thermometer-sun::before { content: "\f5d1"; } +.bi-thermometer::before { content: "\f5d2"; } +.bi-three-dots-vertical::before { content: "\f5d3"; } +.bi-three-dots::before { content: "\f5d4"; } +.bi-toggle-off::before { content: "\f5d5"; } +.bi-toggle-on::before { content: "\f5d6"; } +.bi-toggle2-off::before { content: "\f5d7"; } +.bi-toggle2-on::before { content: "\f5d8"; } +.bi-toggles::before { content: "\f5d9"; } +.bi-toggles2::before { content: "\f5da"; } +.bi-tools::before { content: "\f5db"; } +.bi-tornado::before { content: "\f5dc"; } +.bi-trash-fill::before { content: "\f5dd"; } +.bi-trash::before { content: "\f5de"; } +.bi-trash2-fill::before { content: "\f5df"; } +.bi-trash2::before { content: "\f5e0"; } +.bi-tree-fill::before { content: "\f5e1"; } +.bi-tree::before { content: "\f5e2"; } +.bi-triangle-fill::before { content: "\f5e3"; } +.bi-triangle-half::before { content: "\f5e4"; } +.bi-triangle::before { content: "\f5e5"; } +.bi-trophy-fill::before { content: "\f5e6"; } +.bi-trophy::before { content: "\f5e7"; } +.bi-tropical-storm::before { content: "\f5e8"; } +.bi-truck-flatbed::before { content: "\f5e9"; } +.bi-truck::before { content: "\f5ea"; } +.bi-tsunami::before { content: "\f5eb"; } +.bi-tv-fill::before { content: "\f5ec"; } +.bi-tv::before { content: "\f5ed"; } +.bi-twitch::before { content: "\f5ee"; } +.bi-twitter::before { content: "\f5ef"; } +.bi-type-bold::before { content: "\f5f0"; } +.bi-type-h1::before { content: "\f5f1"; } +.bi-type-h2::before { content: "\f5f2"; } +.bi-type-h3::before { content: "\f5f3"; } +.bi-type-italic::before { content: "\f5f4"; } +.bi-type-strikethrough::before { content: "\f5f5"; } +.bi-type-underline::before { content: "\f5f6"; } +.bi-type::before { content: "\f5f7"; } +.bi-ui-checks-grid::before { content: "\f5f8"; } +.bi-ui-checks::before { content: "\f5f9"; } +.bi-ui-radios-grid::before { content: "\f5fa"; } +.bi-ui-radios::before { content: "\f5fb"; } +.bi-umbrella-fill::before { content: "\f5fc"; } +.bi-umbrella::before { content: "\f5fd"; } +.bi-union::before { content: "\f5fe"; } +.bi-unlock-fill::before { content: "\f5ff"; } +.bi-unlock::before { content: "\f600"; } +.bi-upc-scan::before { content: "\f601"; } +.bi-upc::before { content: "\f602"; } +.bi-upload::before { content: "\f603"; } +.bi-vector-pen::before { content: "\f604"; } +.bi-view-list::before { content: "\f605"; } +.bi-view-stacked::before { content: "\f606"; } +.bi-vinyl-fill::before { content: "\f607"; } +.bi-vinyl::before { content: "\f608"; } +.bi-voicemail::before { content: "\f609"; } +.bi-volume-down-fill::before { content: "\f60a"; } +.bi-volume-down::before { content: "\f60b"; } +.bi-volume-mute-fill::before { content: "\f60c"; } +.bi-volume-mute::before { content: "\f60d"; } +.bi-volume-off-fill::before { content: "\f60e"; } +.bi-volume-off::before { content: "\f60f"; } +.bi-volume-up-fill::before { content: "\f610"; } +.bi-volume-up::before { content: "\f611"; } +.bi-vr::before { content: "\f612"; } +.bi-wallet-fill::before { content: "\f613"; } +.bi-wallet::before { content: "\f614"; } +.bi-wallet2::before { content: "\f615"; } +.bi-watch::before { content: "\f616"; } +.bi-water::before { content: "\f617"; } +.bi-whatsapp::before { content: "\f618"; } +.bi-wifi-1::before { content: "\f619"; } +.bi-wifi-2::before { content: "\f61a"; } +.bi-wifi-off::before { content: "\f61b"; } +.bi-wifi::before { content: "\f61c"; } +.bi-wind::before { content: "\f61d"; } +.bi-window-dock::before { content: "\f61e"; } +.bi-window-sidebar::before { content: "\f61f"; } +.bi-window::before { content: "\f620"; } +.bi-wrench::before { content: "\f621"; } +.bi-x-circle-fill::before { content: "\f622"; } +.bi-x-circle::before { content: "\f623"; } +.bi-x-diamond-fill::before { content: "\f624"; } +.bi-x-diamond::before { content: "\f625"; } +.bi-x-octagon-fill::before { content: "\f626"; } +.bi-x-octagon::before { content: "\f627"; } +.bi-x-square-fill::before { content: "\f628"; } +.bi-x-square::before { content: "\f629"; } +.bi-x::before { content: "\f62a"; } +.bi-youtube::before { content: "\f62b"; } +.bi-zoom-in::before { content: "\f62c"; } +.bi-zoom-out::before { content: "\f62d"; } +.bi-bank::before { content: "\f62e"; } +.bi-bank2::before { content: "\f62f"; } +.bi-bell-slash-fill::before { content: "\f630"; } +.bi-bell-slash::before { content: "\f631"; } +.bi-cash-coin::before { content: "\f632"; } +.bi-check-lg::before { content: "\f633"; } +.bi-coin::before { content: "\f634"; } +.bi-currency-bitcoin::before { content: "\f635"; } +.bi-currency-dollar::before { content: "\f636"; } +.bi-currency-euro::before { content: "\f637"; } +.bi-currency-exchange::before { content: "\f638"; } +.bi-currency-pound::before { content: "\f639"; } +.bi-currency-yen::before { content: "\f63a"; } +.bi-dash-lg::before { content: "\f63b"; } +.bi-exclamation-lg::before { content: "\f63c"; } +.bi-file-earmark-pdf-fill::before { content: "\f63d"; } +.bi-file-earmark-pdf::before { content: "\f63e"; } +.bi-file-pdf-fill::before { content: "\f63f"; } +.bi-file-pdf::before { content: "\f640"; } +.bi-gender-ambiguous::before { content: "\f641"; } +.bi-gender-female::before { content: "\f642"; } +.bi-gender-male::before { content: "\f643"; } +.bi-gender-trans::before { content: "\f644"; } +.bi-headset-vr::before { content: "\f645"; } +.bi-info-lg::before { content: "\f646"; } +.bi-mastodon::before { content: "\f647"; } +.bi-messenger::before { content: "\f648"; } +.bi-piggy-bank-fill::before { content: "\f649"; } +.bi-piggy-bank::before { content: "\f64a"; } +.bi-pin-map-fill::before { content: "\f64b"; } +.bi-pin-map::before { content: "\f64c"; } +.bi-plus-lg::before { content: "\f64d"; } +.bi-question-lg::before { content: "\f64e"; } +.bi-recycle::before { content: "\f64f"; } +.bi-reddit::before { content: "\f650"; } +.bi-safe-fill::before { content: "\f651"; } +.bi-safe2-fill::before { content: "\f652"; } +.bi-safe2::before { content: "\f653"; } +.bi-sd-card-fill::before { content: "\f654"; } +.bi-sd-card::before { content: "\f655"; } +.bi-skype::before { content: "\f656"; } +.bi-slash-lg::before { content: "\f657"; } +.bi-translate::before { content: "\f658"; } +.bi-x-lg::before { content: "\f659"; } +.bi-safe::before { content: "\f65a"; } +.bi-apple::before { content: "\f65b"; } +.bi-microsoft::before { content: "\f65d"; } +.bi-windows::before { content: "\f65e"; } +.bi-behance::before { content: "\f65c"; } +.bi-dribbble::before { content: "\f65f"; } +.bi-line::before { content: "\f660"; } +.bi-medium::before { content: "\f661"; } +.bi-paypal::before { content: "\f662"; } +.bi-pinterest::before { content: "\f663"; } +.bi-signal::before { content: "\f664"; } +.bi-snapchat::before { content: "\f665"; } +.bi-spotify::before { content: "\f666"; } +.bi-stack-overflow::before { content: "\f667"; } +.bi-strava::before { content: "\f668"; } +.bi-wordpress::before { content: "\f669"; } +.bi-vimeo::before { content: "\f66a"; } +.bi-activity::before { content: "\f66b"; } +.bi-easel2-fill::before { content: "\f66c"; } +.bi-easel2::before { content: "\f66d"; } +.bi-easel3-fill::before { content: "\f66e"; } +.bi-easel3::before { content: "\f66f"; } +.bi-fan::before { content: "\f670"; } +.bi-fingerprint::before { content: "\f671"; } +.bi-graph-down-arrow::before { content: "\f672"; } +.bi-graph-up-arrow::before { content: "\f673"; } +.bi-hypnotize::before { content: "\f674"; } +.bi-magic::before { content: "\f675"; } +.bi-person-rolodex::before { content: "\f676"; } +.bi-person-video::before { content: "\f677"; } +.bi-person-video2::before { content: "\f678"; } +.bi-person-video3::before { content: "\f679"; } +.bi-person-workspace::before { content: "\f67a"; } +.bi-radioactive::before { content: "\f67b"; } +.bi-webcam-fill::before { content: "\f67c"; } +.bi-webcam::before { content: "\f67d"; } +.bi-yin-yang::before { content: "\f67e"; } +.bi-bandaid-fill::before { content: "\f680"; } +.bi-bandaid::before { content: "\f681"; } +.bi-bluetooth::before { content: "\f682"; } +.bi-body-text::before { content: "\f683"; } +.bi-boombox::before { content: "\f684"; } +.bi-boxes::before { content: "\f685"; } +.bi-dpad-fill::before { content: "\f686"; } +.bi-dpad::before { content: "\f687"; } +.bi-ear-fill::before { content: "\f688"; } +.bi-ear::before { content: "\f689"; } +.bi-envelope-check-fill::before { content: "\f68b"; } +.bi-envelope-check::before { content: "\f68c"; } +.bi-envelope-dash-fill::before { content: "\f68e"; } +.bi-envelope-dash::before { content: "\f68f"; } +.bi-envelope-exclamation-fill::before { content: "\f691"; } +.bi-envelope-exclamation::before { content: "\f692"; } +.bi-envelope-plus-fill::before { content: "\f693"; } +.bi-envelope-plus::before { content: "\f694"; } +.bi-envelope-slash-fill::before { content: "\f696"; } +.bi-envelope-slash::before { content: "\f697"; } +.bi-envelope-x-fill::before { content: "\f699"; } +.bi-envelope-x::before { content: "\f69a"; } +.bi-explicit-fill::before { content: "\f69b"; } +.bi-explicit::before { content: "\f69c"; } +.bi-git::before { content: "\f69d"; } +.bi-infinity::before { content: "\f69e"; } +.bi-list-columns-reverse::before { content: "\f69f"; } +.bi-list-columns::before { content: "\f6a0"; } +.bi-meta::before { content: "\f6a1"; } +.bi-nintendo-switch::before { content: "\f6a4"; } +.bi-pc-display-horizontal::before { content: "\f6a5"; } +.bi-pc-display::before { content: "\f6a6"; } +.bi-pc-horizontal::before { content: "\f6a7"; } +.bi-pc::before { content: "\f6a8"; } +.bi-playstation::before { content: "\f6a9"; } +.bi-plus-slash-minus::before { content: "\f6aa"; } +.bi-projector-fill::before { content: "\f6ab"; } +.bi-projector::before { content: "\f6ac"; } +.bi-qr-code-scan::before { content: "\f6ad"; } +.bi-qr-code::before { content: "\f6ae"; } +.bi-quora::before { content: "\f6af"; } +.bi-quote::before { content: "\f6b0"; } +.bi-robot::before { content: "\f6b1"; } +.bi-send-check-fill::before { content: "\f6b2"; } +.bi-send-check::before { content: "\f6b3"; } +.bi-send-dash-fill::before { content: "\f6b4"; } +.bi-send-dash::before { content: "\f6b5"; } +.bi-send-exclamation-fill::before { content: "\f6b7"; } +.bi-send-exclamation::before { content: "\f6b8"; } +.bi-send-fill::before { content: "\f6b9"; } +.bi-send-plus-fill::before { content: "\f6ba"; } +.bi-send-plus::before { content: "\f6bb"; } +.bi-send-slash-fill::before { content: "\f6bc"; } +.bi-send-slash::before { content: "\f6bd"; } +.bi-send-x-fill::before { content: "\f6be"; } +.bi-send-x::before { content: "\f6bf"; } +.bi-send::before { content: "\f6c0"; } +.bi-steam::before { content: "\f6c1"; } +.bi-terminal-dash::before { content: "\f6c3"; } +.bi-terminal-plus::before { content: "\f6c4"; } +.bi-terminal-split::before { content: "\f6c5"; } +.bi-ticket-detailed-fill::before { content: "\f6c6"; } +.bi-ticket-detailed::before { content: "\f6c7"; } +.bi-ticket-fill::before { content: "\f6c8"; } +.bi-ticket-perforated-fill::before { content: "\f6c9"; } +.bi-ticket-perforated::before { content: "\f6ca"; } +.bi-ticket::before { content: "\f6cb"; } +.bi-tiktok::before { content: "\f6cc"; } +.bi-window-dash::before { content: "\f6cd"; } +.bi-window-desktop::before { content: "\f6ce"; } +.bi-window-fullscreen::before { content: "\f6cf"; } +.bi-window-plus::before { content: "\f6d0"; } +.bi-window-split::before { content: "\f6d1"; } +.bi-window-stack::before { content: "\f6d2"; } +.bi-window-x::before { content: "\f6d3"; } +.bi-xbox::before { content: "\f6d4"; } +.bi-ethernet::before { content: "\f6d5"; } +.bi-hdmi-fill::before { content: "\f6d6"; } +.bi-hdmi::before { content: "\f6d7"; } +.bi-usb-c-fill::before { content: "\f6d8"; } +.bi-usb-c::before { content: "\f6d9"; } +.bi-usb-fill::before { content: "\f6da"; } +.bi-usb-plug-fill::before { content: "\f6db"; } +.bi-usb-plug::before { content: "\f6dc"; } +.bi-usb-symbol::before { content: "\f6dd"; } +.bi-usb::before { content: "\f6de"; } +.bi-boombox-fill::before { content: "\f6df"; } +.bi-displayport::before { content: "\f6e1"; } +.bi-gpu-card::before { content: "\f6e2"; } +.bi-memory::before { content: "\f6e3"; } +.bi-modem-fill::before { content: "\f6e4"; } +.bi-modem::before { content: "\f6e5"; } +.bi-motherboard-fill::before { content: "\f6e6"; } +.bi-motherboard::before { content: "\f6e7"; } +.bi-optical-audio-fill::before { content: "\f6e8"; } +.bi-optical-audio::before { content: "\f6e9"; } +.bi-pci-card::before { content: "\f6ea"; } +.bi-router-fill::before { content: "\f6eb"; } +.bi-router::before { content: "\f6ec"; } +.bi-thunderbolt-fill::before { content: "\f6ef"; } +.bi-thunderbolt::before { content: "\f6f0"; } +.bi-usb-drive-fill::before { content: "\f6f1"; } +.bi-usb-drive::before { content: "\f6f2"; } +.bi-usb-micro-fill::before { content: "\f6f3"; } +.bi-usb-micro::before { content: "\f6f4"; } +.bi-usb-mini-fill::before { content: "\f6f5"; } +.bi-usb-mini::before { content: "\f6f6"; } +.bi-cloud-haze2::before { content: "\f6f7"; } +.bi-device-hdd-fill::before { content: "\f6f8"; } +.bi-device-hdd::before { content: "\f6f9"; } +.bi-device-ssd-fill::before { content: "\f6fa"; } +.bi-device-ssd::before { content: "\f6fb"; } +.bi-displayport-fill::before { content: "\f6fc"; } +.bi-mortarboard-fill::before { content: "\f6fd"; } +.bi-mortarboard::before { content: "\f6fe"; } +.bi-terminal-x::before { content: "\f6ff"; } +.bi-arrow-through-heart-fill::before { content: "\f700"; } +.bi-arrow-through-heart::before { content: "\f701"; } +.bi-badge-sd-fill::before { content: "\f702"; } +.bi-badge-sd::before { content: "\f703"; } +.bi-bag-heart-fill::before { content: "\f704"; } +.bi-bag-heart::before { content: "\f705"; } +.bi-balloon-fill::before { content: "\f706"; } +.bi-balloon-heart-fill::before { content: "\f707"; } +.bi-balloon-heart::before { content: "\f708"; } +.bi-balloon::before { content: "\f709"; } +.bi-box2-fill::before { content: "\f70a"; } +.bi-box2-heart-fill::before { content: "\f70b"; } +.bi-box2-heart::before { content: "\f70c"; } +.bi-box2::before { content: "\f70d"; } +.bi-braces-asterisk::before { content: "\f70e"; } +.bi-calendar-heart-fill::before { content: "\f70f"; } +.bi-calendar-heart::before { content: "\f710"; } +.bi-calendar2-heart-fill::before { content: "\f711"; } +.bi-calendar2-heart::before { content: "\f712"; } +.bi-chat-heart-fill::before { content: "\f713"; } +.bi-chat-heart::before { content: "\f714"; } +.bi-chat-left-heart-fill::before { content: "\f715"; } +.bi-chat-left-heart::before { content: "\f716"; } +.bi-chat-right-heart-fill::before { content: "\f717"; } +.bi-chat-right-heart::before { content: "\f718"; } +.bi-chat-square-heart-fill::before { content: "\f719"; } +.bi-chat-square-heart::before { content: "\f71a"; } +.bi-clipboard-check-fill::before { content: "\f71b"; } +.bi-clipboard-data-fill::before { content: "\f71c"; } +.bi-clipboard-fill::before { content: "\f71d"; } +.bi-clipboard-heart-fill::before { content: "\f71e"; } +.bi-clipboard-heart::before { content: "\f71f"; } +.bi-clipboard-minus-fill::before { content: "\f720"; } +.bi-clipboard-plus-fill::before { content: "\f721"; } +.bi-clipboard-pulse::before { content: "\f722"; } +.bi-clipboard-x-fill::before { content: "\f723"; } +.bi-clipboard2-check-fill::before { content: "\f724"; } +.bi-clipboard2-check::before { content: "\f725"; } +.bi-clipboard2-data-fill::before { content: "\f726"; } +.bi-clipboard2-data::before { content: "\f727"; } +.bi-clipboard2-fill::before { content: "\f728"; } +.bi-clipboard2-heart-fill::before { content: "\f729"; } +.bi-clipboard2-heart::before { content: "\f72a"; } +.bi-clipboard2-minus-fill::before { content: "\f72b"; } +.bi-clipboard2-minus::before { content: "\f72c"; } +.bi-clipboard2-plus-fill::before { content: "\f72d"; } +.bi-clipboard2-plus::before { content: "\f72e"; } +.bi-clipboard2-pulse-fill::before { content: "\f72f"; } +.bi-clipboard2-pulse::before { content: "\f730"; } +.bi-clipboard2-x-fill::before { content: "\f731"; } +.bi-clipboard2-x::before { content: "\f732"; } +.bi-clipboard2::before { content: "\f733"; } +.bi-emoji-kiss-fill::before { content: "\f734"; } +.bi-emoji-kiss::before { content: "\f735"; } +.bi-envelope-heart-fill::before { content: "\f736"; } +.bi-envelope-heart::before { content: "\f737"; } +.bi-envelope-open-heart-fill::before { content: "\f738"; } +.bi-envelope-open-heart::before { content: "\f739"; } +.bi-envelope-paper-fill::before { content: "\f73a"; } +.bi-envelope-paper-heart-fill::before { content: "\f73b"; } +.bi-envelope-paper-heart::before { content: "\f73c"; } +.bi-envelope-paper::before { content: "\f73d"; } +.bi-filetype-aac::before { content: "\f73e"; } +.bi-filetype-ai::before { content: "\f73f"; } +.bi-filetype-bmp::before { content: "\f740"; } +.bi-filetype-cs::before { content: "\f741"; } +.bi-filetype-css::before { content: "\f742"; } +.bi-filetype-csv::before { content: "\f743"; } +.bi-filetype-doc::before { content: "\f744"; } +.bi-filetype-docx::before { content: "\f745"; } +.bi-filetype-exe::before { content: "\f746"; } +.bi-filetype-gif::before { content: "\f747"; } +.bi-filetype-heic::before { content: "\f748"; } +.bi-filetype-html::before { content: "\f749"; } +.bi-filetype-java::before { content: "\f74a"; } +.bi-filetype-jpg::before { content: "\f74b"; } +.bi-filetype-js::before { content: "\f74c"; } +.bi-filetype-jsx::before { content: "\f74d"; } +.bi-filetype-key::before { content: "\f74e"; } +.bi-filetype-m4p::before { content: "\f74f"; } +.bi-filetype-md::before { content: "\f750"; } +.bi-filetype-mdx::before { content: "\f751"; } +.bi-filetype-mov::before { content: "\f752"; } +.bi-filetype-mp3::before { content: "\f753"; } +.bi-filetype-mp4::before { content: "\f754"; } +.bi-filetype-otf::before { content: "\f755"; } +.bi-filetype-pdf::before { content: "\f756"; } +.bi-filetype-php::before { content: "\f757"; } +.bi-filetype-png::before { content: "\f758"; } +.bi-filetype-ppt::before { content: "\f75a"; } +.bi-filetype-psd::before { content: "\f75b"; } +.bi-filetype-py::before { content: "\f75c"; } +.bi-filetype-raw::before { content: "\f75d"; } +.bi-filetype-rb::before { content: "\f75e"; } +.bi-filetype-sass::before { content: "\f75f"; } +.bi-filetype-scss::before { content: "\f760"; } +.bi-filetype-sh::before { content: "\f761"; } +.bi-filetype-svg::before { content: "\f762"; } +.bi-filetype-tiff::before { content: "\f763"; } +.bi-filetype-tsx::before { content: "\f764"; } +.bi-filetype-ttf::before { content: "\f765"; } +.bi-filetype-txt::before { content: "\f766"; } +.bi-filetype-wav::before { content: "\f767"; } +.bi-filetype-woff::before { content: "\f768"; } +.bi-filetype-xls::before { content: "\f76a"; } +.bi-filetype-xml::before { content: "\f76b"; } +.bi-filetype-yml::before { content: "\f76c"; } +.bi-heart-arrow::before { content: "\f76d"; } +.bi-heart-pulse-fill::before { content: "\f76e"; } +.bi-heart-pulse::before { content: "\f76f"; } +.bi-heartbreak-fill::before { content: "\f770"; } +.bi-heartbreak::before { content: "\f771"; } +.bi-hearts::before { content: "\f772"; } +.bi-hospital-fill::before { content: "\f773"; } +.bi-hospital::before { content: "\f774"; } +.bi-house-heart-fill::before { content: "\f775"; } +.bi-house-heart::before { content: "\f776"; } +.bi-incognito::before { content: "\f777"; } +.bi-magnet-fill::before { content: "\f778"; } +.bi-magnet::before { content: "\f779"; } +.bi-person-heart::before { content: "\f77a"; } +.bi-person-hearts::before { content: "\f77b"; } +.bi-phone-flip::before { content: "\f77c"; } +.bi-plugin::before { content: "\f77d"; } +.bi-postage-fill::before { content: "\f77e"; } +.bi-postage-heart-fill::before { content: "\f77f"; } +.bi-postage-heart::before { content: "\f780"; } +.bi-postage::before { content: "\f781"; } +.bi-postcard-fill::before { content: "\f782"; } +.bi-postcard-heart-fill::before { content: "\f783"; } +.bi-postcard-heart::before { content: "\f784"; } +.bi-postcard::before { content: "\f785"; } +.bi-search-heart-fill::before { content: "\f786"; } +.bi-search-heart::before { content: "\f787"; } +.bi-sliders2-vertical::before { content: "\f788"; } +.bi-sliders2::before { content: "\f789"; } +.bi-trash3-fill::before { content: "\f78a"; } +.bi-trash3::before { content: "\f78b"; } +.bi-valentine::before { content: "\f78c"; } +.bi-valentine2::before { content: "\f78d"; } +.bi-wrench-adjustable-circle-fill::before { content: "\f78e"; } +.bi-wrench-adjustable-circle::before { content: "\f78f"; } +.bi-wrench-adjustable::before { content: "\f790"; } +.bi-filetype-json::before { content: "\f791"; } +.bi-filetype-pptx::before { content: "\f792"; } +.bi-filetype-xlsx::before { content: "\f793"; } +.bi-1-circle-fill::before { content: "\f796"; } +.bi-1-circle::before { content: "\f797"; } +.bi-1-square-fill::before { content: "\f798"; } +.bi-1-square::before { content: "\f799"; } +.bi-2-circle-fill::before { content: "\f79c"; } +.bi-2-circle::before { content: "\f79d"; } +.bi-2-square-fill::before { content: "\f79e"; } +.bi-2-square::before { content: "\f79f"; } +.bi-3-circle-fill::before { content: "\f7a2"; } +.bi-3-circle::before { content: "\f7a3"; } +.bi-3-square-fill::before { content: "\f7a4"; } +.bi-3-square::before { content: "\f7a5"; } +.bi-4-circle-fill::before { content: "\f7a8"; } +.bi-4-circle::before { content: "\f7a9"; } +.bi-4-square-fill::before { content: "\f7aa"; } +.bi-4-square::before { content: "\f7ab"; } +.bi-5-circle-fill::before { content: "\f7ae"; } +.bi-5-circle::before { content: "\f7af"; } +.bi-5-square-fill::before { content: "\f7b0"; } +.bi-5-square::before { content: "\f7b1"; } +.bi-6-circle-fill::before { content: "\f7b4"; } +.bi-6-circle::before { content: "\f7b5"; } +.bi-6-square-fill::before { content: "\f7b6"; } +.bi-6-square::before { content: "\f7b7"; } +.bi-7-circle-fill::before { content: "\f7ba"; } +.bi-7-circle::before { content: "\f7bb"; } +.bi-7-square-fill::before { content: "\f7bc"; } +.bi-7-square::before { content: "\f7bd"; } +.bi-8-circle-fill::before { content: "\f7c0"; } +.bi-8-circle::before { content: "\f7c1"; } +.bi-8-square-fill::before { content: "\f7c2"; } +.bi-8-square::before { content: "\f7c3"; } +.bi-9-circle-fill::before { content: "\f7c6"; } +.bi-9-circle::before { content: "\f7c7"; } +.bi-9-square-fill::before { content: "\f7c8"; } +.bi-9-square::before { content: "\f7c9"; } +.bi-airplane-engines-fill::before { content: "\f7ca"; } +.bi-airplane-engines::before { content: "\f7cb"; } +.bi-airplane-fill::before { content: "\f7cc"; } +.bi-airplane::before { content: "\f7cd"; } +.bi-alexa::before { content: "\f7ce"; } +.bi-alipay::before { content: "\f7cf"; } +.bi-android::before { content: "\f7d0"; } +.bi-android2::before { content: "\f7d1"; } +.bi-box-fill::before { content: "\f7d2"; } +.bi-box-seam-fill::before { content: "\f7d3"; } +.bi-browser-chrome::before { content: "\f7d4"; } +.bi-browser-edge::before { content: "\f7d5"; } +.bi-browser-firefox::before { content: "\f7d6"; } +.bi-browser-safari::before { content: "\f7d7"; } +.bi-c-circle-fill::before { content: "\f7da"; } +.bi-c-circle::before { content: "\f7db"; } +.bi-c-square-fill::before { content: "\f7dc"; } +.bi-c-square::before { content: "\f7dd"; } +.bi-capsule-pill::before { content: "\f7de"; } +.bi-capsule::before { content: "\f7df"; } +.bi-car-front-fill::before { content: "\f7e0"; } +.bi-car-front::before { content: "\f7e1"; } +.bi-cassette-fill::before { content: "\f7e2"; } +.bi-cassette::before { content: "\f7e3"; } +.bi-cc-circle-fill::before { content: "\f7e6"; } +.bi-cc-circle::before { content: "\f7e7"; } +.bi-cc-square-fill::before { content: "\f7e8"; } +.bi-cc-square::before { content: "\f7e9"; } +.bi-cup-hot-fill::before { content: "\f7ea"; } +.bi-cup-hot::before { content: "\f7eb"; } +.bi-currency-rupee::before { content: "\f7ec"; } +.bi-dropbox::before { content: "\f7ed"; } +.bi-escape::before { content: "\f7ee"; } +.bi-fast-forward-btn-fill::before { content: "\f7ef"; } +.bi-fast-forward-btn::before { content: "\f7f0"; } +.bi-fast-forward-circle-fill::before { content: "\f7f1"; } +.bi-fast-forward-circle::before { content: "\f7f2"; } +.bi-fast-forward-fill::before { content: "\f7f3"; } +.bi-fast-forward::before { content: "\f7f4"; } +.bi-filetype-sql::before { content: "\f7f5"; } +.bi-fire::before { content: "\f7f6"; } +.bi-google-play::before { content: "\f7f7"; } +.bi-h-circle-fill::before { content: "\f7fa"; } +.bi-h-circle::before { content: "\f7fb"; } +.bi-h-square-fill::before { content: "\f7fc"; } +.bi-h-square::before { content: "\f7fd"; } +.bi-indent::before { content: "\f7fe"; } +.bi-lungs-fill::before { content: "\f7ff"; } +.bi-lungs::before { content: "\f800"; } +.bi-microsoft-teams::before { content: "\f801"; } +.bi-p-circle-fill::before { content: "\f804"; } +.bi-p-circle::before { content: "\f805"; } +.bi-p-square-fill::before { content: "\f806"; } +.bi-p-square::before { content: "\f807"; } +.bi-pass-fill::before { content: "\f808"; } +.bi-pass::before { content: "\f809"; } +.bi-prescription::before { content: "\f80a"; } +.bi-prescription2::before { content: "\f80b"; } +.bi-r-circle-fill::before { content: "\f80e"; } +.bi-r-circle::before { content: "\f80f"; } +.bi-r-square-fill::before { content: "\f810"; } +.bi-r-square::before { content: "\f811"; } +.bi-repeat-1::before { content: "\f812"; } +.bi-repeat::before { content: "\f813"; } +.bi-rewind-btn-fill::before { content: "\f814"; } +.bi-rewind-btn::before { content: "\f815"; } +.bi-rewind-circle-fill::before { content: "\f816"; } +.bi-rewind-circle::before { content: "\f817"; } +.bi-rewind-fill::before { content: "\f818"; } +.bi-rewind::before { content: "\f819"; } +.bi-train-freight-front-fill::before { content: "\f81a"; } +.bi-train-freight-front::before { content: "\f81b"; } +.bi-train-front-fill::before { content: "\f81c"; } +.bi-train-front::before { content: "\f81d"; } +.bi-train-lightrail-front-fill::before { content: "\f81e"; } +.bi-train-lightrail-front::before { content: "\f81f"; } +.bi-truck-front-fill::before { content: "\f820"; } +.bi-truck-front::before { content: "\f821"; } +.bi-ubuntu::before { content: "\f822"; } +.bi-unindent::before { content: "\f823"; } +.bi-unity::before { content: "\f824"; } +.bi-universal-access-circle::before { content: "\f825"; } +.bi-universal-access::before { content: "\f826"; } +.bi-virus::before { content: "\f827"; } +.bi-virus2::before { content: "\f828"; } +.bi-wechat::before { content: "\f829"; } +.bi-yelp::before { content: "\f82a"; } +.bi-sign-stop-fill::before { content: "\f82b"; } +.bi-sign-stop-lights-fill::before { content: "\f82c"; } +.bi-sign-stop-lights::before { content: "\f82d"; } +.bi-sign-stop::before { content: "\f82e"; } +.bi-sign-turn-left-fill::before { content: "\f82f"; } +.bi-sign-turn-left::before { content: "\f830"; } +.bi-sign-turn-right-fill::before { content: "\f831"; } +.bi-sign-turn-right::before { content: "\f832"; } +.bi-sign-turn-slight-left-fill::before { content: "\f833"; } +.bi-sign-turn-slight-left::before { content: "\f834"; } +.bi-sign-turn-slight-right-fill::before { content: "\f835"; } +.bi-sign-turn-slight-right::before { content: "\f836"; } +.bi-sign-yield-fill::before { content: "\f837"; } +.bi-sign-yield::before { content: "\f838"; } +.bi-ev-station-fill::before { content: "\f839"; } +.bi-ev-station::before { content: "\f83a"; } +.bi-fuel-pump-diesel-fill::before { content: "\f83b"; } +.bi-fuel-pump-diesel::before { content: "\f83c"; } +.bi-fuel-pump-fill::before { content: "\f83d"; } +.bi-fuel-pump::before { content: "\f83e"; } +.bi-0-circle-fill::before { content: "\f83f"; } +.bi-0-circle::before { content: "\f840"; } +.bi-0-square-fill::before { content: "\f841"; } +.bi-0-square::before { content: "\f842"; } +.bi-rocket-fill::before { content: "\f843"; } +.bi-rocket-takeoff-fill::before { content: "\f844"; } +.bi-rocket-takeoff::before { content: "\f845"; } +.bi-rocket::before { content: "\f846"; } +.bi-stripe::before { content: "\f847"; } +.bi-subscript::before { content: "\f848"; } +.bi-superscript::before { content: "\f849"; } +.bi-trello::before { content: "\f84a"; } +.bi-envelope-at-fill::before { content: "\f84b"; } +.bi-envelope-at::before { content: "\f84c"; } +.bi-regex::before { content: "\f84d"; } +.bi-text-wrap::before { content: "\f84e"; } +.bi-sign-dead-end-fill::before { content: "\f84f"; } +.bi-sign-dead-end::before { content: "\f850"; } +.bi-sign-do-not-enter-fill::before { content: "\f851"; } +.bi-sign-do-not-enter::before { content: "\f852"; } +.bi-sign-intersection-fill::before { content: "\f853"; } +.bi-sign-intersection-side-fill::before { content: "\f854"; } +.bi-sign-intersection-side::before { content: "\f855"; } +.bi-sign-intersection-t-fill::before { content: "\f856"; } +.bi-sign-intersection-t::before { content: "\f857"; } +.bi-sign-intersection-y-fill::before { content: "\f858"; } +.bi-sign-intersection-y::before { content: "\f859"; } +.bi-sign-intersection::before { content: "\f85a"; } +.bi-sign-merge-left-fill::before { content: "\f85b"; } +.bi-sign-merge-left::before { content: "\f85c"; } +.bi-sign-merge-right-fill::before { content: "\f85d"; } +.bi-sign-merge-right::before { content: "\f85e"; } +.bi-sign-no-left-turn-fill::before { content: "\f85f"; } +.bi-sign-no-left-turn::before { content: "\f860"; } +.bi-sign-no-parking-fill::before { content: "\f861"; } +.bi-sign-no-parking::before { content: "\f862"; } +.bi-sign-no-right-turn-fill::before { content: "\f863"; } +.bi-sign-no-right-turn::before { content: "\f864"; } +.bi-sign-railroad-fill::before { content: "\f865"; } +.bi-sign-railroad::before { content: "\f866"; } +.bi-building-add::before { content: "\f867"; } +.bi-building-check::before { content: "\f868"; } +.bi-building-dash::before { content: "\f869"; } +.bi-building-down::before { content: "\f86a"; } +.bi-building-exclamation::before { content: "\f86b"; } +.bi-building-fill-add::before { content: "\f86c"; } +.bi-building-fill-check::before { content: "\f86d"; } +.bi-building-fill-dash::before { content: "\f86e"; } +.bi-building-fill-down::before { content: "\f86f"; } +.bi-building-fill-exclamation::before { content: "\f870"; } +.bi-building-fill-gear::before { content: "\f871"; } +.bi-building-fill-lock::before { content: "\f872"; } +.bi-building-fill-slash::before { content: "\f873"; } +.bi-building-fill-up::before { content: "\f874"; } +.bi-building-fill-x::before { content: "\f875"; } +.bi-building-fill::before { content: "\f876"; } +.bi-building-gear::before { content: "\f877"; } +.bi-building-lock::before { content: "\f878"; } +.bi-building-slash::before { content: "\f879"; } +.bi-building-up::before { content: "\f87a"; } +.bi-building-x::before { content: "\f87b"; } +.bi-buildings-fill::before { content: "\f87c"; } +.bi-buildings::before { content: "\f87d"; } +.bi-bus-front-fill::before { content: "\f87e"; } +.bi-bus-front::before { content: "\f87f"; } +.bi-ev-front-fill::before { content: "\f880"; } +.bi-ev-front::before { content: "\f881"; } +.bi-globe-americas::before { content: "\f882"; } +.bi-globe-asia-australia::before { content: "\f883"; } +.bi-globe-central-south-asia::before { content: "\f884"; } +.bi-globe-europe-africa::before { content: "\f885"; } +.bi-house-add-fill::before { content: "\f886"; } +.bi-house-add::before { content: "\f887"; } +.bi-house-check-fill::before { content: "\f888"; } +.bi-house-check::before { content: "\f889"; } +.bi-house-dash-fill::before { content: "\f88a"; } +.bi-house-dash::before { content: "\f88b"; } +.bi-house-down-fill::before { content: "\f88c"; } +.bi-house-down::before { content: "\f88d"; } +.bi-house-exclamation-fill::before { content: "\f88e"; } +.bi-house-exclamation::before { content: "\f88f"; } +.bi-house-gear-fill::before { content: "\f890"; } +.bi-house-gear::before { content: "\f891"; } +.bi-house-lock-fill::before { content: "\f892"; } +.bi-house-lock::before { content: "\f893"; } +.bi-house-slash-fill::before { content: "\f894"; } +.bi-house-slash::before { content: "\f895"; } +.bi-house-up-fill::before { content: "\f896"; } +.bi-house-up::before { content: "\f897"; } +.bi-house-x-fill::before { content: "\f898"; } +.bi-house-x::before { content: "\f899"; } +.bi-person-add::before { content: "\f89a"; } +.bi-person-down::before { content: "\f89b"; } +.bi-person-exclamation::before { content: "\f89c"; } +.bi-person-fill-add::before { content: "\f89d"; } +.bi-person-fill-check::before { content: "\f89e"; } +.bi-person-fill-dash::before { content: "\f89f"; } +.bi-person-fill-down::before { content: "\f8a0"; } +.bi-person-fill-exclamation::before { content: "\f8a1"; } +.bi-person-fill-gear::before { content: "\f8a2"; } +.bi-person-fill-lock::before { content: "\f8a3"; } +.bi-person-fill-slash::before { content: "\f8a4"; } +.bi-person-fill-up::before { content: "\f8a5"; } +.bi-person-fill-x::before { content: "\f8a6"; } +.bi-person-gear::before { content: "\f8a7"; } +.bi-person-lock::before { content: "\f8a8"; } +.bi-person-slash::before { content: "\f8a9"; } +.bi-person-up::before { content: "\f8aa"; } +.bi-scooter::before { content: "\f8ab"; } +.bi-taxi-front-fill::before { content: "\f8ac"; } +.bi-taxi-front::before { content: "\f8ad"; } +.bi-amd::before { content: "\f8ae"; } +.bi-database-add::before { content: "\f8af"; } +.bi-database-check::before { content: "\f8b0"; } +.bi-database-dash::before { content: "\f8b1"; } +.bi-database-down::before { content: "\f8b2"; } +.bi-database-exclamation::before { content: "\f8b3"; } +.bi-database-fill-add::before { content: "\f8b4"; } +.bi-database-fill-check::before { content: "\f8b5"; } +.bi-database-fill-dash::before { content: "\f8b6"; } +.bi-database-fill-down::before { content: "\f8b7"; } +.bi-database-fill-exclamation::before { content: "\f8b8"; } +.bi-database-fill-gear::before { content: "\f8b9"; } +.bi-database-fill-lock::before { content: "\f8ba"; } +.bi-database-fill-slash::before { content: "\f8bb"; } +.bi-database-fill-up::before { content: "\f8bc"; } +.bi-database-fill-x::before { content: "\f8bd"; } +.bi-database-fill::before { content: "\f8be"; } +.bi-database-gear::before { content: "\f8bf"; } +.bi-database-lock::before { content: "\f8c0"; } +.bi-database-slash::before { content: "\f8c1"; } +.bi-database-up::before { content: "\f8c2"; } +.bi-database-x::before { content: "\f8c3"; } +.bi-database::before { content: "\f8c4"; } +.bi-houses-fill::before { content: "\f8c5"; } +.bi-houses::before { content: "\f8c6"; } +.bi-nvidia::before { content: "\f8c7"; } +.bi-person-vcard-fill::before { content: "\f8c8"; } +.bi-person-vcard::before { content: "\f8c9"; } +.bi-sina-weibo::before { content: "\f8ca"; } +.bi-tencent-qq::before { content: "\f8cb"; } +.bi-wikipedia::before { content: "\f8cc"; } diff --git a/src/mono/sample/wasm/blazor-frame/wwwroot/css/bootstrap-icons/bootstrap-icons.json b/src/mono/sample/wasm/blazor-frame/wwwroot/css/bootstrap-icons/bootstrap-icons.json new file mode 100644 index 00000000000000..d85eaaf2b2793a --- /dev/null +++ b/src/mono/sample/wasm/blazor-frame/wwwroot/css/bootstrap-icons/bootstrap-icons.json @@ -0,0 +1,1955 @@ +{ + "123": 63103, + "alarm-fill": 61697, + "alarm": 61698, + "align-bottom": 61699, + "align-center": 61700, + "align-end": 61701, + "align-middle": 61702, + "align-start": 61703, + "align-top": 61704, + "alt": 61705, + "app-indicator": 61706, + "app": 61707, + "archive-fill": 61708, + "archive": 61709, + "arrow-90deg-down": 61710, + "arrow-90deg-left": 61711, + "arrow-90deg-right": 61712, + "arrow-90deg-up": 61713, + "arrow-bar-down": 61714, + "arrow-bar-left": 61715, + "arrow-bar-right": 61716, + "arrow-bar-up": 61717, + "arrow-clockwise": 61718, + "arrow-counterclockwise": 61719, + "arrow-down-circle-fill": 61720, + "arrow-down-circle": 61721, + "arrow-down-left-circle-fill": 61722, + "arrow-down-left-circle": 61723, + "arrow-down-left-square-fill": 61724, + "arrow-down-left-square": 61725, + "arrow-down-left": 61726, + "arrow-down-right-circle-fill": 61727, + "arrow-down-right-circle": 61728, + "arrow-down-right-square-fill": 61729, + "arrow-down-right-square": 61730, + "arrow-down-right": 61731, + "arrow-down-short": 61732, + "arrow-down-square-fill": 61733, + "arrow-down-square": 61734, + "arrow-down-up": 61735, + "arrow-down": 61736, + "arrow-left-circle-fill": 61737, + "arrow-left-circle": 61738, + "arrow-left-right": 61739, + "arrow-left-short": 61740, + "arrow-left-square-fill": 61741, + "arrow-left-square": 61742, + "arrow-left": 61743, + "arrow-repeat": 61744, + "arrow-return-left": 61745, + "arrow-return-right": 61746, + "arrow-right-circle-fill": 61747, + "arrow-right-circle": 61748, + "arrow-right-short": 61749, + "arrow-right-square-fill": 61750, + "arrow-right-square": 61751, + "arrow-right": 61752, + "arrow-up-circle-fill": 61753, + "arrow-up-circle": 61754, + "arrow-up-left-circle-fill": 61755, + "arrow-up-left-circle": 61756, + "arrow-up-left-square-fill": 61757, + "arrow-up-left-square": 61758, + "arrow-up-left": 61759, + "arrow-up-right-circle-fill": 61760, + "arrow-up-right-circle": 61761, + "arrow-up-right-square-fill": 61762, + "arrow-up-right-square": 61763, + "arrow-up-right": 61764, + "arrow-up-short": 61765, + "arrow-up-square-fill": 61766, + "arrow-up-square": 61767, + "arrow-up": 61768, + "arrows-angle-contract": 61769, + "arrows-angle-expand": 61770, + "arrows-collapse": 61771, + "arrows-expand": 61772, + "arrows-fullscreen": 61773, + "arrows-move": 61774, + "aspect-ratio-fill": 61775, + "aspect-ratio": 61776, + "asterisk": 61777, + "at": 61778, + "award-fill": 61779, + "award": 61780, + "back": 61781, + "backspace-fill": 61782, + "backspace-reverse-fill": 61783, + "backspace-reverse": 61784, + "backspace": 61785, + "badge-3d-fill": 61786, + "badge-3d": 61787, + "badge-4k-fill": 61788, + "badge-4k": 61789, + "badge-8k-fill": 61790, + "badge-8k": 61791, + "badge-ad-fill": 61792, + "badge-ad": 61793, + "badge-ar-fill": 61794, + "badge-ar": 61795, + "badge-cc-fill": 61796, + "badge-cc": 61797, + "badge-hd-fill": 61798, + "badge-hd": 61799, + "badge-tm-fill": 61800, + "badge-tm": 61801, + "badge-vo-fill": 61802, + "badge-vo": 61803, + "badge-vr-fill": 61804, + "badge-vr": 61805, + "badge-wc-fill": 61806, + "badge-wc": 61807, + "bag-check-fill": 61808, + "bag-check": 61809, + "bag-dash-fill": 61810, + "bag-dash": 61811, + "bag-fill": 61812, + "bag-plus-fill": 61813, + "bag-plus": 61814, + "bag-x-fill": 61815, + "bag-x": 61816, + "bag": 61817, + "bar-chart-fill": 61818, + "bar-chart-line-fill": 61819, + "bar-chart-line": 61820, + "bar-chart-steps": 61821, + "bar-chart": 61822, + "basket-fill": 61823, + "basket": 61824, + "basket2-fill": 61825, + "basket2": 61826, + "basket3-fill": 61827, + "basket3": 61828, + "battery-charging": 61829, + "battery-full": 61830, + "battery-half": 61831, + "battery": 61832, + "bell-fill": 61833, + "bell": 61834, + "bezier": 61835, + "bezier2": 61836, + "bicycle": 61837, + "binoculars-fill": 61838, + "binoculars": 61839, + "blockquote-left": 61840, + "blockquote-right": 61841, + "book-fill": 61842, + "book-half": 61843, + "book": 61844, + "bookmark-check-fill": 61845, + "bookmark-check": 61846, + "bookmark-dash-fill": 61847, + "bookmark-dash": 61848, + "bookmark-fill": 61849, + "bookmark-heart-fill": 61850, + "bookmark-heart": 61851, + "bookmark-plus-fill": 61852, + "bookmark-plus": 61853, + "bookmark-star-fill": 61854, + "bookmark-star": 61855, + "bookmark-x-fill": 61856, + "bookmark-x": 61857, + "bookmark": 61858, + "bookmarks-fill": 61859, + "bookmarks": 61860, + "bookshelf": 61861, + "bootstrap-fill": 61862, + "bootstrap-reboot": 61863, + "bootstrap": 61864, + "border-all": 61865, + "border-bottom": 61866, + "border-center": 61867, + "border-inner": 61868, + "border-left": 61869, + "border-middle": 61870, + "border-outer": 61871, + "border-right": 61872, + "border-style": 61873, + "border-top": 61874, + "border-width": 61875, + "border": 61876, + "bounding-box-circles": 61877, + "bounding-box": 61878, + "box-arrow-down-left": 61879, + "box-arrow-down-right": 61880, + "box-arrow-down": 61881, + "box-arrow-in-down-left": 61882, + "box-arrow-in-down-right": 61883, + "box-arrow-in-down": 61884, + "box-arrow-in-left": 61885, + "box-arrow-in-right": 61886, + "box-arrow-in-up-left": 61887, + "box-arrow-in-up-right": 61888, + "box-arrow-in-up": 61889, + "box-arrow-left": 61890, + "box-arrow-right": 61891, + "box-arrow-up-left": 61892, + "box-arrow-up-right": 61893, + "box-arrow-up": 61894, + "box-seam": 61895, + "box": 61896, + "braces": 61897, + "bricks": 61898, + "briefcase-fill": 61899, + "briefcase": 61900, + "brightness-alt-high-fill": 61901, + "brightness-alt-high": 61902, + "brightness-alt-low-fill": 61903, + "brightness-alt-low": 61904, + "brightness-high-fill": 61905, + "brightness-high": 61906, + "brightness-low-fill": 61907, + "brightness-low": 61908, + "broadcast-pin": 61909, + "broadcast": 61910, + "brush-fill": 61911, + "brush": 61912, + "bucket-fill": 61913, + "bucket": 61914, + "bug-fill": 61915, + "bug": 61916, + "building": 61917, + "bullseye": 61918, + "calculator-fill": 61919, + "calculator": 61920, + "calendar-check-fill": 61921, + "calendar-check": 61922, + "calendar-date-fill": 61923, + "calendar-date": 61924, + "calendar-day-fill": 61925, + "calendar-day": 61926, + "calendar-event-fill": 61927, + "calendar-event": 61928, + "calendar-fill": 61929, + "calendar-minus-fill": 61930, + "calendar-minus": 61931, + "calendar-month-fill": 61932, + "calendar-month": 61933, + "calendar-plus-fill": 61934, + "calendar-plus": 61935, + "calendar-range-fill": 61936, + "calendar-range": 61937, + "calendar-week-fill": 61938, + "calendar-week": 61939, + "calendar-x-fill": 61940, + "calendar-x": 61941, + "calendar": 61942, + "calendar2-check-fill": 61943, + "calendar2-check": 61944, + "calendar2-date-fill": 61945, + "calendar2-date": 61946, + "calendar2-day-fill": 61947, + "calendar2-day": 61948, + "calendar2-event-fill": 61949, + "calendar2-event": 61950, + "calendar2-fill": 61951, + "calendar2-minus-fill": 61952, + "calendar2-minus": 61953, + "calendar2-month-fill": 61954, + "calendar2-month": 61955, + "calendar2-plus-fill": 61956, + "calendar2-plus": 61957, + "calendar2-range-fill": 61958, + "calendar2-range": 61959, + "calendar2-week-fill": 61960, + "calendar2-week": 61961, + "calendar2-x-fill": 61962, + "calendar2-x": 61963, + "calendar2": 61964, + "calendar3-event-fill": 61965, + "calendar3-event": 61966, + "calendar3-fill": 61967, + "calendar3-range-fill": 61968, + "calendar3-range": 61969, + "calendar3-week-fill": 61970, + "calendar3-week": 61971, + "calendar3": 61972, + "calendar4-event": 61973, + "calendar4-range": 61974, + "calendar4-week": 61975, + "calendar4": 61976, + "camera-fill": 61977, + "camera-reels-fill": 61978, + "camera-reels": 61979, + "camera-video-fill": 61980, + "camera-video-off-fill": 61981, + "camera-video-off": 61982, + "camera-video": 61983, + "camera": 61984, + "camera2": 61985, + "capslock-fill": 61986, + "capslock": 61987, + "card-checklist": 61988, + "card-heading": 61989, + "card-image": 61990, + "card-list": 61991, + "card-text": 61992, + "caret-down-fill": 61993, + "caret-down-square-fill": 61994, + "caret-down-square": 61995, + "caret-down": 61996, + "caret-left-fill": 61997, + "caret-left-square-fill": 61998, + "caret-left-square": 61999, + "caret-left": 62000, + "caret-right-fill": 62001, + "caret-right-square-fill": 62002, + "caret-right-square": 62003, + "caret-right": 62004, + "caret-up-fill": 62005, + "caret-up-square-fill": 62006, + "caret-up-square": 62007, + "caret-up": 62008, + "cart-check-fill": 62009, + "cart-check": 62010, + "cart-dash-fill": 62011, + "cart-dash": 62012, + "cart-fill": 62013, + "cart-plus-fill": 62014, + "cart-plus": 62015, + "cart-x-fill": 62016, + "cart-x": 62017, + "cart": 62018, + "cart2": 62019, + "cart3": 62020, + "cart4": 62021, + "cash-stack": 62022, + "cash": 62023, + "cast": 62024, + "chat-dots-fill": 62025, + "chat-dots": 62026, + "chat-fill": 62027, + "chat-left-dots-fill": 62028, + "chat-left-dots": 62029, + "chat-left-fill": 62030, + "chat-left-quote-fill": 62031, + "chat-left-quote": 62032, + "chat-left-text-fill": 62033, + "chat-left-text": 62034, + "chat-left": 62035, + "chat-quote-fill": 62036, + "chat-quote": 62037, + "chat-right-dots-fill": 62038, + "chat-right-dots": 62039, + "chat-right-fill": 62040, + "chat-right-quote-fill": 62041, + "chat-right-quote": 62042, + "chat-right-text-fill": 62043, + "chat-right-text": 62044, + "chat-right": 62045, + "chat-square-dots-fill": 62046, + "chat-square-dots": 62047, + "chat-square-fill": 62048, + "chat-square-quote-fill": 62049, + "chat-square-quote": 62050, + "chat-square-text-fill": 62051, + "chat-square-text": 62052, + "chat-square": 62053, + "chat-text-fill": 62054, + "chat-text": 62055, + "chat": 62056, + "check-all": 62057, + "check-circle-fill": 62058, + "check-circle": 62059, + "check-square-fill": 62060, + "check-square": 62061, + "check": 62062, + "check2-all": 62063, + "check2-circle": 62064, + "check2-square": 62065, + "check2": 62066, + "chevron-bar-contract": 62067, + "chevron-bar-down": 62068, + "chevron-bar-expand": 62069, + "chevron-bar-left": 62070, + "chevron-bar-right": 62071, + "chevron-bar-up": 62072, + "chevron-compact-down": 62073, + "chevron-compact-left": 62074, + "chevron-compact-right": 62075, + "chevron-compact-up": 62076, + "chevron-contract": 62077, + "chevron-double-down": 62078, + "chevron-double-left": 62079, + "chevron-double-right": 62080, + "chevron-double-up": 62081, + "chevron-down": 62082, + "chevron-expand": 62083, + "chevron-left": 62084, + "chevron-right": 62085, + "chevron-up": 62086, + "circle-fill": 62087, + "circle-half": 62088, + "circle-square": 62089, + "circle": 62090, + "clipboard-check": 62091, + "clipboard-data": 62092, + "clipboard-minus": 62093, + "clipboard-plus": 62094, + "clipboard-x": 62095, + "clipboard": 62096, + "clock-fill": 62097, + "clock-history": 62098, + "clock": 62099, + "cloud-arrow-down-fill": 62100, + "cloud-arrow-down": 62101, + "cloud-arrow-up-fill": 62102, + "cloud-arrow-up": 62103, + "cloud-check-fill": 62104, + "cloud-check": 62105, + "cloud-download-fill": 62106, + "cloud-download": 62107, + "cloud-drizzle-fill": 62108, + "cloud-drizzle": 62109, + "cloud-fill": 62110, + "cloud-fog-fill": 62111, + "cloud-fog": 62112, + "cloud-fog2-fill": 62113, + "cloud-fog2": 62114, + "cloud-hail-fill": 62115, + "cloud-hail": 62116, + "cloud-haze-fill": 62118, + "cloud-haze": 62119, + "cloud-haze2-fill": 62120, + "cloud-lightning-fill": 62121, + "cloud-lightning-rain-fill": 62122, + "cloud-lightning-rain": 62123, + "cloud-lightning": 62124, + "cloud-minus-fill": 62125, + "cloud-minus": 62126, + "cloud-moon-fill": 62127, + "cloud-moon": 62128, + "cloud-plus-fill": 62129, + "cloud-plus": 62130, + "cloud-rain-fill": 62131, + "cloud-rain-heavy-fill": 62132, + "cloud-rain-heavy": 62133, + "cloud-rain": 62134, + "cloud-slash-fill": 62135, + "cloud-slash": 62136, + "cloud-sleet-fill": 62137, + "cloud-sleet": 62138, + "cloud-snow-fill": 62139, + "cloud-snow": 62140, + "cloud-sun-fill": 62141, + "cloud-sun": 62142, + "cloud-upload-fill": 62143, + "cloud-upload": 62144, + "cloud": 62145, + "clouds-fill": 62146, + "clouds": 62147, + "cloudy-fill": 62148, + "cloudy": 62149, + "code-slash": 62150, + "code-square": 62151, + "code": 62152, + "collection-fill": 62153, + "collection-play-fill": 62154, + "collection-play": 62155, + "collection": 62156, + "columns-gap": 62157, + "columns": 62158, + "command": 62159, + "compass-fill": 62160, + "compass": 62161, + "cone-striped": 62162, + "cone": 62163, + "controller": 62164, + "cpu-fill": 62165, + "cpu": 62166, + "credit-card-2-back-fill": 62167, + "credit-card-2-back": 62168, + "credit-card-2-front-fill": 62169, + "credit-card-2-front": 62170, + "credit-card-fill": 62171, + "credit-card": 62172, + "crop": 62173, + "cup-fill": 62174, + "cup-straw": 62175, + "cup": 62176, + "cursor-fill": 62177, + "cursor-text": 62178, + "cursor": 62179, + "dash-circle-dotted": 62180, + "dash-circle-fill": 62181, + "dash-circle": 62182, + "dash-square-dotted": 62183, + "dash-square-fill": 62184, + "dash-square": 62185, + "dash": 62186, + "diagram-2-fill": 62187, + "diagram-2": 62188, + "diagram-3-fill": 62189, + "diagram-3": 62190, + "diamond-fill": 62191, + "diamond-half": 62192, + "diamond": 62193, + "dice-1-fill": 62194, + "dice-1": 62195, + "dice-2-fill": 62196, + "dice-2": 62197, + "dice-3-fill": 62198, + "dice-3": 62199, + "dice-4-fill": 62200, + "dice-4": 62201, + "dice-5-fill": 62202, + "dice-5": 62203, + "dice-6-fill": 62204, + "dice-6": 62205, + "disc-fill": 62206, + "disc": 62207, + "discord": 62208, + "display-fill": 62209, + "display": 62210, + "distribute-horizontal": 62211, + "distribute-vertical": 62212, + "door-closed-fill": 62213, + "door-closed": 62214, + "door-open-fill": 62215, + "door-open": 62216, + "dot": 62217, + "download": 62218, + "droplet-fill": 62219, + "droplet-half": 62220, + "droplet": 62221, + "earbuds": 62222, + "easel-fill": 62223, + "easel": 62224, + "egg-fill": 62225, + "egg-fried": 62226, + "egg": 62227, + "eject-fill": 62228, + "eject": 62229, + "emoji-angry-fill": 62230, + "emoji-angry": 62231, + "emoji-dizzy-fill": 62232, + "emoji-dizzy": 62233, + "emoji-expressionless-fill": 62234, + "emoji-expressionless": 62235, + "emoji-frown-fill": 62236, + "emoji-frown": 62237, + "emoji-heart-eyes-fill": 62238, + "emoji-heart-eyes": 62239, + "emoji-laughing-fill": 62240, + "emoji-laughing": 62241, + "emoji-neutral-fill": 62242, + "emoji-neutral": 62243, + "emoji-smile-fill": 62244, + "emoji-smile-upside-down-fill": 62245, + "emoji-smile-upside-down": 62246, + "emoji-smile": 62247, + "emoji-sunglasses-fill": 62248, + "emoji-sunglasses": 62249, + "emoji-wink-fill": 62250, + "emoji-wink": 62251, + "envelope-fill": 62252, + "envelope-open-fill": 62253, + "envelope-open": 62254, + "envelope": 62255, + "eraser-fill": 62256, + "eraser": 62257, + "exclamation-circle-fill": 62258, + "exclamation-circle": 62259, + "exclamation-diamond-fill": 62260, + "exclamation-diamond": 62261, + "exclamation-octagon-fill": 62262, + "exclamation-octagon": 62263, + "exclamation-square-fill": 62264, + "exclamation-square": 62265, + "exclamation-triangle-fill": 62266, + "exclamation-triangle": 62267, + "exclamation": 62268, + "exclude": 62269, + "eye-fill": 62270, + "eye-slash-fill": 62271, + "eye-slash": 62272, + "eye": 62273, + "eyedropper": 62274, + "eyeglasses": 62275, + "facebook": 62276, + "file-arrow-down-fill": 62277, + "file-arrow-down": 62278, + "file-arrow-up-fill": 62279, + "file-arrow-up": 62280, + "file-bar-graph-fill": 62281, + "file-bar-graph": 62282, + "file-binary-fill": 62283, + "file-binary": 62284, + "file-break-fill": 62285, + "file-break": 62286, + "file-check-fill": 62287, + "file-check": 62288, + "file-code-fill": 62289, + "file-code": 62290, + "file-diff-fill": 62291, + "file-diff": 62292, + "file-earmark-arrow-down-fill": 62293, + "file-earmark-arrow-down": 62294, + "file-earmark-arrow-up-fill": 62295, + "file-earmark-arrow-up": 62296, + "file-earmark-bar-graph-fill": 62297, + "file-earmark-bar-graph": 62298, + "file-earmark-binary-fill": 62299, + "file-earmark-binary": 62300, + "file-earmark-break-fill": 62301, + "file-earmark-break": 62302, + "file-earmark-check-fill": 62303, + "file-earmark-check": 62304, + "file-earmark-code-fill": 62305, + "file-earmark-code": 62306, + "file-earmark-diff-fill": 62307, + "file-earmark-diff": 62308, + "file-earmark-easel-fill": 62309, + "file-earmark-easel": 62310, + "file-earmark-excel-fill": 62311, + "file-earmark-excel": 62312, + "file-earmark-fill": 62313, + "file-earmark-font-fill": 62314, + "file-earmark-font": 62315, + "file-earmark-image-fill": 62316, + "file-earmark-image": 62317, + "file-earmark-lock-fill": 62318, + "file-earmark-lock": 62319, + "file-earmark-lock2-fill": 62320, + "file-earmark-lock2": 62321, + "file-earmark-medical-fill": 62322, + "file-earmark-medical": 62323, + "file-earmark-minus-fill": 62324, + "file-earmark-minus": 62325, + "file-earmark-music-fill": 62326, + "file-earmark-music": 62327, + "file-earmark-person-fill": 62328, + "file-earmark-person": 62329, + "file-earmark-play-fill": 62330, + "file-earmark-play": 62331, + "file-earmark-plus-fill": 62332, + "file-earmark-plus": 62333, + "file-earmark-post-fill": 62334, + "file-earmark-post": 62335, + "file-earmark-ppt-fill": 62336, + "file-earmark-ppt": 62337, + "file-earmark-richtext-fill": 62338, + "file-earmark-richtext": 62339, + "file-earmark-ruled-fill": 62340, + "file-earmark-ruled": 62341, + "file-earmark-slides-fill": 62342, + "file-earmark-slides": 62343, + "file-earmark-spreadsheet-fill": 62344, + "file-earmark-spreadsheet": 62345, + "file-earmark-text-fill": 62346, + "file-earmark-text": 62347, + "file-earmark-word-fill": 62348, + "file-earmark-word": 62349, + "file-earmark-x-fill": 62350, + "file-earmark-x": 62351, + "file-earmark-zip-fill": 62352, + "file-earmark-zip": 62353, + "file-earmark": 62354, + "file-easel-fill": 62355, + "file-easel": 62356, + "file-excel-fill": 62357, + "file-excel": 62358, + "file-fill": 62359, + "file-font-fill": 62360, + "file-font": 62361, + "file-image-fill": 62362, + "file-image": 62363, + "file-lock-fill": 62364, + "file-lock": 62365, + "file-lock2-fill": 62366, + "file-lock2": 62367, + "file-medical-fill": 62368, + "file-medical": 62369, + "file-minus-fill": 62370, + "file-minus": 62371, + "file-music-fill": 62372, + "file-music": 62373, + "file-person-fill": 62374, + "file-person": 62375, + "file-play-fill": 62376, + "file-play": 62377, + "file-plus-fill": 62378, + "file-plus": 62379, + "file-post-fill": 62380, + "file-post": 62381, + "file-ppt-fill": 62382, + "file-ppt": 62383, + "file-richtext-fill": 62384, + "file-richtext": 62385, + "file-ruled-fill": 62386, + "file-ruled": 62387, + "file-slides-fill": 62388, + "file-slides": 62389, + "file-spreadsheet-fill": 62390, + "file-spreadsheet": 62391, + "file-text-fill": 62392, + "file-text": 62393, + "file-word-fill": 62394, + "file-word": 62395, + "file-x-fill": 62396, + "file-x": 62397, + "file-zip-fill": 62398, + "file-zip": 62399, + "file": 62400, + "files-alt": 62401, + "files": 62402, + "film": 62403, + "filter-circle-fill": 62404, + "filter-circle": 62405, + "filter-left": 62406, + "filter-right": 62407, + "filter-square-fill": 62408, + "filter-square": 62409, + "filter": 62410, + "flag-fill": 62411, + "flag": 62412, + "flower1": 62413, + "flower2": 62414, + "flower3": 62415, + "folder-check": 62416, + "folder-fill": 62417, + "folder-minus": 62418, + "folder-plus": 62419, + "folder-symlink-fill": 62420, + "folder-symlink": 62421, + "folder-x": 62422, + "folder": 62423, + "folder2-open": 62424, + "folder2": 62425, + "fonts": 62426, + "forward-fill": 62427, + "forward": 62428, + "front": 62429, + "fullscreen-exit": 62430, + "fullscreen": 62431, + "funnel-fill": 62432, + "funnel": 62433, + "gear-fill": 62434, + "gear-wide-connected": 62435, + "gear-wide": 62436, + "gear": 62437, + "gem": 62438, + "geo-alt-fill": 62439, + "geo-alt": 62440, + "geo-fill": 62441, + "geo": 62442, + "gift-fill": 62443, + "gift": 62444, + "github": 62445, + "globe": 62446, + "globe2": 62447, + "google": 62448, + "graph-down": 62449, + "graph-up": 62450, + "grid-1x2-fill": 62451, + "grid-1x2": 62452, + "grid-3x2-gap-fill": 62453, + "grid-3x2-gap": 62454, + "grid-3x2": 62455, + "grid-3x3-gap-fill": 62456, + "grid-3x3-gap": 62457, + "grid-3x3": 62458, + "grid-fill": 62459, + "grid": 62460, + "grip-horizontal": 62461, + "grip-vertical": 62462, + "hammer": 62463, + "hand-index-fill": 62464, + "hand-index-thumb-fill": 62465, + "hand-index-thumb": 62466, + "hand-index": 62467, + "hand-thumbs-down-fill": 62468, + "hand-thumbs-down": 62469, + "hand-thumbs-up-fill": 62470, + "hand-thumbs-up": 62471, + "handbag-fill": 62472, + "handbag": 62473, + "hash": 62474, + "hdd-fill": 62475, + "hdd-network-fill": 62476, + "hdd-network": 62477, + "hdd-rack-fill": 62478, + "hdd-rack": 62479, + "hdd-stack-fill": 62480, + "hdd-stack": 62481, + "hdd": 62482, + "headphones": 62483, + "headset": 62484, + "heart-fill": 62485, + "heart-half": 62486, + "heart": 62487, + "heptagon-fill": 62488, + "heptagon-half": 62489, + "heptagon": 62490, + "hexagon-fill": 62491, + "hexagon-half": 62492, + "hexagon": 62493, + "hourglass-bottom": 62494, + "hourglass-split": 62495, + "hourglass-top": 62496, + "hourglass": 62497, + "house-door-fill": 62498, + "house-door": 62499, + "house-fill": 62500, + "house": 62501, + "hr": 62502, + "hurricane": 62503, + "image-alt": 62504, + "image-fill": 62505, + "image": 62506, + "images": 62507, + "inbox-fill": 62508, + "inbox": 62509, + "inboxes-fill": 62510, + "inboxes": 62511, + "info-circle-fill": 62512, + "info-circle": 62513, + "info-square-fill": 62514, + "info-square": 62515, + "info": 62516, + "input-cursor-text": 62517, + "input-cursor": 62518, + "instagram": 62519, + "intersect": 62520, + "journal-album": 62521, + "journal-arrow-down": 62522, + "journal-arrow-up": 62523, + "journal-bookmark-fill": 62524, + "journal-bookmark": 62525, + "journal-check": 62526, + "journal-code": 62527, + "journal-medical": 62528, + "journal-minus": 62529, + "journal-plus": 62530, + "journal-richtext": 62531, + "journal-text": 62532, + "journal-x": 62533, + "journal": 62534, + "journals": 62535, + "joystick": 62536, + "justify-left": 62537, + "justify-right": 62538, + "justify": 62539, + "kanban-fill": 62540, + "kanban": 62541, + "key-fill": 62542, + "key": 62543, + "keyboard-fill": 62544, + "keyboard": 62545, + "ladder": 62546, + "lamp-fill": 62547, + "lamp": 62548, + "laptop-fill": 62549, + "laptop": 62550, + "layer-backward": 62551, + "layer-forward": 62552, + "layers-fill": 62553, + "layers-half": 62554, + "layers": 62555, + "layout-sidebar-inset-reverse": 62556, + "layout-sidebar-inset": 62557, + "layout-sidebar-reverse": 62558, + "layout-sidebar": 62559, + "layout-split": 62560, + "layout-text-sidebar-reverse": 62561, + "layout-text-sidebar": 62562, + "layout-text-window-reverse": 62563, + "layout-text-window": 62564, + "layout-three-columns": 62565, + "layout-wtf": 62566, + "life-preserver": 62567, + "lightbulb-fill": 62568, + "lightbulb-off-fill": 62569, + "lightbulb-off": 62570, + "lightbulb": 62571, + "lightning-charge-fill": 62572, + "lightning-charge": 62573, + "lightning-fill": 62574, + "lightning": 62575, + "link-45deg": 62576, + "link": 62577, + "linkedin": 62578, + "list-check": 62579, + "list-nested": 62580, + "list-ol": 62581, + "list-stars": 62582, + "list-task": 62583, + "list-ul": 62584, + "list": 62585, + "lock-fill": 62586, + "lock": 62587, + "mailbox": 62588, + "mailbox2": 62589, + "map-fill": 62590, + "map": 62591, + "markdown-fill": 62592, + "markdown": 62593, + "mask": 62594, + "megaphone-fill": 62595, + "megaphone": 62596, + "menu-app-fill": 62597, + "menu-app": 62598, + "menu-button-fill": 62599, + "menu-button-wide-fill": 62600, + "menu-button-wide": 62601, + "menu-button": 62602, + "menu-down": 62603, + "menu-up": 62604, + "mic-fill": 62605, + "mic-mute-fill": 62606, + "mic-mute": 62607, + "mic": 62608, + "minecart-loaded": 62609, + "minecart": 62610, + "moisture": 62611, + "moon-fill": 62612, + "moon-stars-fill": 62613, + "moon-stars": 62614, + "moon": 62615, + "mouse-fill": 62616, + "mouse": 62617, + "mouse2-fill": 62618, + "mouse2": 62619, + "mouse3-fill": 62620, + "mouse3": 62621, + "music-note-beamed": 62622, + "music-note-list": 62623, + "music-note": 62624, + "music-player-fill": 62625, + "music-player": 62626, + "newspaper": 62627, + "node-minus-fill": 62628, + "node-minus": 62629, + "node-plus-fill": 62630, + "node-plus": 62631, + "nut-fill": 62632, + "nut": 62633, + "octagon-fill": 62634, + "octagon-half": 62635, + "octagon": 62636, + "option": 62637, + "outlet": 62638, + "paint-bucket": 62639, + "palette-fill": 62640, + "palette": 62641, + "palette2": 62642, + "paperclip": 62643, + "paragraph": 62644, + "patch-check-fill": 62645, + "patch-check": 62646, + "patch-exclamation-fill": 62647, + "patch-exclamation": 62648, + "patch-minus-fill": 62649, + "patch-minus": 62650, + "patch-plus-fill": 62651, + "patch-plus": 62652, + "patch-question-fill": 62653, + "patch-question": 62654, + "pause-btn-fill": 62655, + "pause-btn": 62656, + "pause-circle-fill": 62657, + "pause-circle": 62658, + "pause-fill": 62659, + "pause": 62660, + "peace-fill": 62661, + "peace": 62662, + "pen-fill": 62663, + "pen": 62664, + "pencil-fill": 62665, + "pencil-square": 62666, + "pencil": 62667, + "pentagon-fill": 62668, + "pentagon-half": 62669, + "pentagon": 62670, + "people-fill": 62671, + "people": 62672, + "percent": 62673, + "person-badge-fill": 62674, + "person-badge": 62675, + "person-bounding-box": 62676, + "person-check-fill": 62677, + "person-check": 62678, + "person-circle": 62679, + "person-dash-fill": 62680, + "person-dash": 62681, + "person-fill": 62682, + "person-lines-fill": 62683, + "person-plus-fill": 62684, + "person-plus": 62685, + "person-square": 62686, + "person-x-fill": 62687, + "person-x": 62688, + "person": 62689, + "phone-fill": 62690, + "phone-landscape-fill": 62691, + "phone-landscape": 62692, + "phone-vibrate-fill": 62693, + "phone-vibrate": 62694, + "phone": 62695, + "pie-chart-fill": 62696, + "pie-chart": 62697, + "pin-angle-fill": 62698, + "pin-angle": 62699, + "pin-fill": 62700, + "pin": 62701, + "pip-fill": 62702, + "pip": 62703, + "play-btn-fill": 62704, + "play-btn": 62705, + "play-circle-fill": 62706, + "play-circle": 62707, + "play-fill": 62708, + "play": 62709, + "plug-fill": 62710, + "plug": 62711, + "plus-circle-dotted": 62712, + "plus-circle-fill": 62713, + "plus-circle": 62714, + "plus-square-dotted": 62715, + "plus-square-fill": 62716, + "plus-square": 62717, + "plus": 62718, + "power": 62719, + "printer-fill": 62720, + "printer": 62721, + "puzzle-fill": 62722, + "puzzle": 62723, + "question-circle-fill": 62724, + "question-circle": 62725, + "question-diamond-fill": 62726, + "question-diamond": 62727, + "question-octagon-fill": 62728, + "question-octagon": 62729, + "question-square-fill": 62730, + "question-square": 62731, + "question": 62732, + "rainbow": 62733, + "receipt-cutoff": 62734, + "receipt": 62735, + "reception-0": 62736, + "reception-1": 62737, + "reception-2": 62738, + "reception-3": 62739, + "reception-4": 62740, + "record-btn-fill": 62741, + "record-btn": 62742, + "record-circle-fill": 62743, + "record-circle": 62744, + "record-fill": 62745, + "record": 62746, + "record2-fill": 62747, + "record2": 62748, + "reply-all-fill": 62749, + "reply-all": 62750, + "reply-fill": 62751, + "reply": 62752, + "rss-fill": 62753, + "rss": 62754, + "rulers": 62755, + "save-fill": 62756, + "save": 62757, + "save2-fill": 62758, + "save2": 62759, + "scissors": 62760, + "screwdriver": 62761, + "search": 62762, + "segmented-nav": 62763, + "server": 62764, + "share-fill": 62765, + "share": 62766, + "shield-check": 62767, + "shield-exclamation": 62768, + "shield-fill-check": 62769, + "shield-fill-exclamation": 62770, + "shield-fill-minus": 62771, + "shield-fill-plus": 62772, + "shield-fill-x": 62773, + "shield-fill": 62774, + "shield-lock-fill": 62775, + "shield-lock": 62776, + "shield-minus": 62777, + "shield-plus": 62778, + "shield-shaded": 62779, + "shield-slash-fill": 62780, + "shield-slash": 62781, + "shield-x": 62782, + "shield": 62783, + "shift-fill": 62784, + "shift": 62785, + "shop-window": 62786, + "shop": 62787, + "shuffle": 62788, + "signpost-2-fill": 62789, + "signpost-2": 62790, + "signpost-fill": 62791, + "signpost-split-fill": 62792, + "signpost-split": 62793, + "signpost": 62794, + "sim-fill": 62795, + "sim": 62796, + "skip-backward-btn-fill": 62797, + "skip-backward-btn": 62798, + "skip-backward-circle-fill": 62799, + "skip-backward-circle": 62800, + "skip-backward-fill": 62801, + "skip-backward": 62802, + "skip-end-btn-fill": 62803, + "skip-end-btn": 62804, + "skip-end-circle-fill": 62805, + "skip-end-circle": 62806, + "skip-end-fill": 62807, + "skip-end": 62808, + "skip-forward-btn-fill": 62809, + "skip-forward-btn": 62810, + "skip-forward-circle-fill": 62811, + "skip-forward-circle": 62812, + "skip-forward-fill": 62813, + "skip-forward": 62814, + "skip-start-btn-fill": 62815, + "skip-start-btn": 62816, + "skip-start-circle-fill": 62817, + "skip-start-circle": 62818, + "skip-start-fill": 62819, + "skip-start": 62820, + "slack": 62821, + "slash-circle-fill": 62822, + "slash-circle": 62823, + "slash-square-fill": 62824, + "slash-square": 62825, + "slash": 62826, + "sliders": 62827, + "smartwatch": 62828, + "snow": 62829, + "snow2": 62830, + "snow3": 62831, + "sort-alpha-down-alt": 62832, + "sort-alpha-down": 62833, + "sort-alpha-up-alt": 62834, + "sort-alpha-up": 62835, + "sort-down-alt": 62836, + "sort-down": 62837, + "sort-numeric-down-alt": 62838, + "sort-numeric-down": 62839, + "sort-numeric-up-alt": 62840, + "sort-numeric-up": 62841, + "sort-up-alt": 62842, + "sort-up": 62843, + "soundwave": 62844, + "speaker-fill": 62845, + "speaker": 62846, + "speedometer": 62847, + "speedometer2": 62848, + "spellcheck": 62849, + "square-fill": 62850, + "square-half": 62851, + "square": 62852, + "stack": 62853, + "star-fill": 62854, + "star-half": 62855, + "star": 62856, + "stars": 62857, + "stickies-fill": 62858, + "stickies": 62859, + "sticky-fill": 62860, + "sticky": 62861, + "stop-btn-fill": 62862, + "stop-btn": 62863, + "stop-circle-fill": 62864, + "stop-circle": 62865, + "stop-fill": 62866, + "stop": 62867, + "stoplights-fill": 62868, + "stoplights": 62869, + "stopwatch-fill": 62870, + "stopwatch": 62871, + "subtract": 62872, + "suit-club-fill": 62873, + "suit-club": 62874, + "suit-diamond-fill": 62875, + "suit-diamond": 62876, + "suit-heart-fill": 62877, + "suit-heart": 62878, + "suit-spade-fill": 62879, + "suit-spade": 62880, + "sun-fill": 62881, + "sun": 62882, + "sunglasses": 62883, + "sunrise-fill": 62884, + "sunrise": 62885, + "sunset-fill": 62886, + "sunset": 62887, + "symmetry-horizontal": 62888, + "symmetry-vertical": 62889, + "table": 62890, + "tablet-fill": 62891, + "tablet-landscape-fill": 62892, + "tablet-landscape": 62893, + "tablet": 62894, + "tag-fill": 62895, + "tag": 62896, + "tags-fill": 62897, + "tags": 62898, + "telegram": 62899, + "telephone-fill": 62900, + "telephone-forward-fill": 62901, + "telephone-forward": 62902, + "telephone-inbound-fill": 62903, + "telephone-inbound": 62904, + "telephone-minus-fill": 62905, + "telephone-minus": 62906, + "telephone-outbound-fill": 62907, + "telephone-outbound": 62908, + "telephone-plus-fill": 62909, + "telephone-plus": 62910, + "telephone-x-fill": 62911, + "telephone-x": 62912, + "telephone": 62913, + "terminal-fill": 62914, + "terminal": 62915, + "text-center": 62916, + "text-indent-left": 62917, + "text-indent-right": 62918, + "text-left": 62919, + "text-paragraph": 62920, + "text-right": 62921, + "textarea-resize": 62922, + "textarea-t": 62923, + "textarea": 62924, + "thermometer-half": 62925, + "thermometer-high": 62926, + "thermometer-low": 62927, + "thermometer-snow": 62928, + "thermometer-sun": 62929, + "thermometer": 62930, + "three-dots-vertical": 62931, + "three-dots": 62932, + "toggle-off": 62933, + "toggle-on": 62934, + "toggle2-off": 62935, + "toggle2-on": 62936, + "toggles": 62937, + "toggles2": 62938, + "tools": 62939, + "tornado": 62940, + "trash-fill": 62941, + "trash": 62942, + "trash2-fill": 62943, + "trash2": 62944, + "tree-fill": 62945, + "tree": 62946, + "triangle-fill": 62947, + "triangle-half": 62948, + "triangle": 62949, + "trophy-fill": 62950, + "trophy": 62951, + "tropical-storm": 62952, + "truck-flatbed": 62953, + "truck": 62954, + "tsunami": 62955, + "tv-fill": 62956, + "tv": 62957, + "twitch": 62958, + "twitter": 62959, + "type-bold": 62960, + "type-h1": 62961, + "type-h2": 62962, + "type-h3": 62963, + "type-italic": 62964, + "type-strikethrough": 62965, + "type-underline": 62966, + "type": 62967, + "ui-checks-grid": 62968, + "ui-checks": 62969, + "ui-radios-grid": 62970, + "ui-radios": 62971, + "umbrella-fill": 62972, + "umbrella": 62973, + "union": 62974, + "unlock-fill": 62975, + "unlock": 62976, + "upc-scan": 62977, + "upc": 62978, + "upload": 62979, + "vector-pen": 62980, + "view-list": 62981, + "view-stacked": 62982, + "vinyl-fill": 62983, + "vinyl": 62984, + "voicemail": 62985, + "volume-down-fill": 62986, + "volume-down": 62987, + "volume-mute-fill": 62988, + "volume-mute": 62989, + "volume-off-fill": 62990, + "volume-off": 62991, + "volume-up-fill": 62992, + "volume-up": 62993, + "vr": 62994, + "wallet-fill": 62995, + "wallet": 62996, + "wallet2": 62997, + "watch": 62998, + "water": 62999, + "whatsapp": 63000, + "wifi-1": 63001, + "wifi-2": 63002, + "wifi-off": 63003, + "wifi": 63004, + "wind": 63005, + "window-dock": 63006, + "window-sidebar": 63007, + "window": 63008, + "wrench": 63009, + "x-circle-fill": 63010, + "x-circle": 63011, + "x-diamond-fill": 63012, + "x-diamond": 63013, + "x-octagon-fill": 63014, + "x-octagon": 63015, + "x-square-fill": 63016, + "x-square": 63017, + "x": 63018, + "youtube": 63019, + "zoom-in": 63020, + "zoom-out": 63021, + "bank": 63022, + "bank2": 63023, + "bell-slash-fill": 63024, + "bell-slash": 63025, + "cash-coin": 63026, + "check-lg": 63027, + "coin": 63028, + "currency-bitcoin": 63029, + "currency-dollar": 63030, + "currency-euro": 63031, + "currency-exchange": 63032, + "currency-pound": 63033, + "currency-yen": 63034, + "dash-lg": 63035, + "exclamation-lg": 63036, + "file-earmark-pdf-fill": 63037, + "file-earmark-pdf": 63038, + "file-pdf-fill": 63039, + "file-pdf": 63040, + "gender-ambiguous": 63041, + "gender-female": 63042, + "gender-male": 63043, + "gender-trans": 63044, + "headset-vr": 63045, + "info-lg": 63046, + "mastodon": 63047, + "messenger": 63048, + "piggy-bank-fill": 63049, + "piggy-bank": 63050, + "pin-map-fill": 63051, + "pin-map": 63052, + "plus-lg": 63053, + "question-lg": 63054, + "recycle": 63055, + "reddit": 63056, + "safe-fill": 63057, + "safe2-fill": 63058, + "safe2": 63059, + "sd-card-fill": 63060, + "sd-card": 63061, + "skype": 63062, + "slash-lg": 63063, + "translate": 63064, + "x-lg": 63065, + "safe": 63066, + "apple": 63067, + "microsoft": 63069, + "windows": 63070, + "behance": 63068, + "dribbble": 63071, + "line": 63072, + "medium": 63073, + "paypal": 63074, + "pinterest": 63075, + "signal": 63076, + "snapchat": 63077, + "spotify": 63078, + "stack-overflow": 63079, + "strava": 63080, + "wordpress": 63081, + "vimeo": 63082, + "activity": 63083, + "easel2-fill": 63084, + "easel2": 63085, + "easel3-fill": 63086, + "easel3": 63087, + "fan": 63088, + "fingerprint": 63089, + "graph-down-arrow": 63090, + "graph-up-arrow": 63091, + "hypnotize": 63092, + "magic": 63093, + "person-rolodex": 63094, + "person-video": 63095, + "person-video2": 63096, + "person-video3": 63097, + "person-workspace": 63098, + "radioactive": 63099, + "webcam-fill": 63100, + "webcam": 63101, + "yin-yang": 63102, + "bandaid-fill": 63104, + "bandaid": 63105, + "bluetooth": 63106, + "body-text": 63107, + "boombox": 63108, + "boxes": 63109, + "dpad-fill": 63110, + "dpad": 63111, + "ear-fill": 63112, + "ear": 63113, + "envelope-check-fill": 63115, + "envelope-check": 63116, + "envelope-dash-fill": 63118, + "envelope-dash": 63119, + "envelope-exclamation-fill": 63121, + "envelope-exclamation": 63122, + "envelope-plus-fill": 63123, + "envelope-plus": 63124, + "envelope-slash-fill": 63126, + "envelope-slash": 63127, + "envelope-x-fill": 63129, + "envelope-x": 63130, + "explicit-fill": 63131, + "explicit": 63132, + "git": 63133, + "infinity": 63134, + "list-columns-reverse": 63135, + "list-columns": 63136, + "meta": 63137, + "nintendo-switch": 63140, + "pc-display-horizontal": 63141, + "pc-display": 63142, + "pc-horizontal": 63143, + "pc": 63144, + "playstation": 63145, + "plus-slash-minus": 63146, + "projector-fill": 63147, + "projector": 63148, + "qr-code-scan": 63149, + "qr-code": 63150, + "quora": 63151, + "quote": 63152, + "robot": 63153, + "send-check-fill": 63154, + "send-check": 63155, + "send-dash-fill": 63156, + "send-dash": 63157, + "send-exclamation-fill": 63159, + "send-exclamation": 63160, + "send-fill": 63161, + "send-plus-fill": 63162, + "send-plus": 63163, + "send-slash-fill": 63164, + "send-slash": 63165, + "send-x-fill": 63166, + "send-x": 63167, + "send": 63168, + "steam": 63169, + "terminal-dash": 63171, + "terminal-plus": 63172, + "terminal-split": 63173, + "ticket-detailed-fill": 63174, + "ticket-detailed": 63175, + "ticket-fill": 63176, + "ticket-perforated-fill": 63177, + "ticket-perforated": 63178, + "ticket": 63179, + "tiktok": 63180, + "window-dash": 63181, + "window-desktop": 63182, + "window-fullscreen": 63183, + "window-plus": 63184, + "window-split": 63185, + "window-stack": 63186, + "window-x": 63187, + "xbox": 63188, + "ethernet": 63189, + "hdmi-fill": 63190, + "hdmi": 63191, + "usb-c-fill": 63192, + "usb-c": 63193, + "usb-fill": 63194, + "usb-plug-fill": 63195, + "usb-plug": 63196, + "usb-symbol": 63197, + "usb": 63198, + "boombox-fill": 63199, + "displayport": 63201, + "gpu-card": 63202, + "memory": 63203, + "modem-fill": 63204, + "modem": 63205, + "motherboard-fill": 63206, + "motherboard": 63207, + "optical-audio-fill": 63208, + "optical-audio": 63209, + "pci-card": 63210, + "router-fill": 63211, + "router": 63212, + "thunderbolt-fill": 63215, + "thunderbolt": 63216, + "usb-drive-fill": 63217, + "usb-drive": 63218, + "usb-micro-fill": 63219, + "usb-micro": 63220, + "usb-mini-fill": 63221, + "usb-mini": 63222, + "cloud-haze2": 63223, + "device-hdd-fill": 63224, + "device-hdd": 63225, + "device-ssd-fill": 63226, + "device-ssd": 63227, + "displayport-fill": 63228, + "mortarboard-fill": 63229, + "mortarboard": 63230, + "terminal-x": 63231, + "arrow-through-heart-fill": 63232, + "arrow-through-heart": 63233, + "badge-sd-fill": 63234, + "badge-sd": 63235, + "bag-heart-fill": 63236, + "bag-heart": 63237, + "balloon-fill": 63238, + "balloon-heart-fill": 63239, + "balloon-heart": 63240, + "balloon": 63241, + "box2-fill": 63242, + "box2-heart-fill": 63243, + "box2-heart": 63244, + "box2": 63245, + "braces-asterisk": 63246, + "calendar-heart-fill": 63247, + "calendar-heart": 63248, + "calendar2-heart-fill": 63249, + "calendar2-heart": 63250, + "chat-heart-fill": 63251, + "chat-heart": 63252, + "chat-left-heart-fill": 63253, + "chat-left-heart": 63254, + "chat-right-heart-fill": 63255, + "chat-right-heart": 63256, + "chat-square-heart-fill": 63257, + "chat-square-heart": 63258, + "clipboard-check-fill": 63259, + "clipboard-data-fill": 63260, + "clipboard-fill": 63261, + "clipboard-heart-fill": 63262, + "clipboard-heart": 63263, + "clipboard-minus-fill": 63264, + "clipboard-plus-fill": 63265, + "clipboard-pulse": 63266, + "clipboard-x-fill": 63267, + "clipboard2-check-fill": 63268, + "clipboard2-check": 63269, + "clipboard2-data-fill": 63270, + "clipboard2-data": 63271, + "clipboard2-fill": 63272, + "clipboard2-heart-fill": 63273, + "clipboard2-heart": 63274, + "clipboard2-minus-fill": 63275, + "clipboard2-minus": 63276, + "clipboard2-plus-fill": 63277, + "clipboard2-plus": 63278, + "clipboard2-pulse-fill": 63279, + "clipboard2-pulse": 63280, + "clipboard2-x-fill": 63281, + "clipboard2-x": 63282, + "clipboard2": 63283, + "emoji-kiss-fill": 63284, + "emoji-kiss": 63285, + "envelope-heart-fill": 63286, + "envelope-heart": 63287, + "envelope-open-heart-fill": 63288, + "envelope-open-heart": 63289, + "envelope-paper-fill": 63290, + "envelope-paper-heart-fill": 63291, + "envelope-paper-heart": 63292, + "envelope-paper": 63293, + "filetype-aac": 63294, + "filetype-ai": 63295, + "filetype-bmp": 63296, + "filetype-cs": 63297, + "filetype-css": 63298, + "filetype-csv": 63299, + "filetype-doc": 63300, + "filetype-docx": 63301, + "filetype-exe": 63302, + "filetype-gif": 63303, + "filetype-heic": 63304, + "filetype-html": 63305, + "filetype-java": 63306, + "filetype-jpg": 63307, + "filetype-js": 63308, + "filetype-jsx": 63309, + "filetype-key": 63310, + "filetype-m4p": 63311, + "filetype-md": 63312, + "filetype-mdx": 63313, + "filetype-mov": 63314, + "filetype-mp3": 63315, + "filetype-mp4": 63316, + "filetype-otf": 63317, + "filetype-pdf": 63318, + "filetype-php": 63319, + "filetype-png": 63320, + "filetype-ppt": 63322, + "filetype-psd": 63323, + "filetype-py": 63324, + "filetype-raw": 63325, + "filetype-rb": 63326, + "filetype-sass": 63327, + "filetype-scss": 63328, + "filetype-sh": 63329, + "filetype-svg": 63330, + "filetype-tiff": 63331, + "filetype-tsx": 63332, + "filetype-ttf": 63333, + "filetype-txt": 63334, + "filetype-wav": 63335, + "filetype-woff": 63336, + "filetype-xls": 63338, + "filetype-xml": 63339, + "filetype-yml": 63340, + "heart-arrow": 63341, + "heart-pulse-fill": 63342, + "heart-pulse": 63343, + "heartbreak-fill": 63344, + "heartbreak": 63345, + "hearts": 63346, + "hospital-fill": 63347, + "hospital": 63348, + "house-heart-fill": 63349, + "house-heart": 63350, + "incognito": 63351, + "magnet-fill": 63352, + "magnet": 63353, + "person-heart": 63354, + "person-hearts": 63355, + "phone-flip": 63356, + "plugin": 63357, + "postage-fill": 63358, + "postage-heart-fill": 63359, + "postage-heart": 63360, + "postage": 63361, + "postcard-fill": 63362, + "postcard-heart-fill": 63363, + "postcard-heart": 63364, + "postcard": 63365, + "search-heart-fill": 63366, + "search-heart": 63367, + "sliders2-vertical": 63368, + "sliders2": 63369, + "trash3-fill": 63370, + "trash3": 63371, + "valentine": 63372, + "valentine2": 63373, + "wrench-adjustable-circle-fill": 63374, + "wrench-adjustable-circle": 63375, + "wrench-adjustable": 63376, + "filetype-json": 63377, + "filetype-pptx": 63378, + "filetype-xlsx": 63379, + "1-circle-fill": 63382, + "1-circle": 63383, + "1-square-fill": 63384, + "1-square": 63385, + "2-circle-fill": 63388, + "2-circle": 63389, + "2-square-fill": 63390, + "2-square": 63391, + "3-circle-fill": 63394, + "3-circle": 63395, + "3-square-fill": 63396, + "3-square": 63397, + "4-circle-fill": 63400, + "4-circle": 63401, + "4-square-fill": 63402, + "4-square": 63403, + "5-circle-fill": 63406, + "5-circle": 63407, + "5-square-fill": 63408, + "5-square": 63409, + "6-circle-fill": 63412, + "6-circle": 63413, + "6-square-fill": 63414, + "6-square": 63415, + "7-circle-fill": 63418, + "7-circle": 63419, + "7-square-fill": 63420, + "7-square": 63421, + "8-circle-fill": 63424, + "8-circle": 63425, + "8-square-fill": 63426, + "8-square": 63427, + "9-circle-fill": 63430, + "9-circle": 63431, + "9-square-fill": 63432, + "9-square": 63433, + "airplane-engines-fill": 63434, + "airplane-engines": 63435, + "airplane-fill": 63436, + "airplane": 63437, + "alexa": 63438, + "alipay": 63439, + "android": 63440, + "android2": 63441, + "box-fill": 63442, + "box-seam-fill": 63443, + "browser-chrome": 63444, + "browser-edge": 63445, + "browser-firefox": 63446, + "browser-safari": 63447, + "c-circle-fill": 63450, + "c-circle": 63451, + "c-square-fill": 63452, + "c-square": 63453, + "capsule-pill": 63454, + "capsule": 63455, + "car-front-fill": 63456, + "car-front": 63457, + "cassette-fill": 63458, + "cassette": 63459, + "cc-circle-fill": 63462, + "cc-circle": 63463, + "cc-square-fill": 63464, + "cc-square": 63465, + "cup-hot-fill": 63466, + "cup-hot": 63467, + "currency-rupee": 63468, + "dropbox": 63469, + "escape": 63470, + "fast-forward-btn-fill": 63471, + "fast-forward-btn": 63472, + "fast-forward-circle-fill": 63473, + "fast-forward-circle": 63474, + "fast-forward-fill": 63475, + "fast-forward": 63476, + "filetype-sql": 63477, + "fire": 63478, + "google-play": 63479, + "h-circle-fill": 63482, + "h-circle": 63483, + "h-square-fill": 63484, + "h-square": 63485, + "indent": 63486, + "lungs-fill": 63487, + "lungs": 63488, + "microsoft-teams": 63489, + "p-circle-fill": 63492, + "p-circle": 63493, + "p-square-fill": 63494, + "p-square": 63495, + "pass-fill": 63496, + "pass": 63497, + "prescription": 63498, + "prescription2": 63499, + "r-circle-fill": 63502, + "r-circle": 63503, + "r-square-fill": 63504, + "r-square": 63505, + "repeat-1": 63506, + "repeat": 63507, + "rewind-btn-fill": 63508, + "rewind-btn": 63509, + "rewind-circle-fill": 63510, + "rewind-circle": 63511, + "rewind-fill": 63512, + "rewind": 63513, + "train-freight-front-fill": 63514, + "train-freight-front": 63515, + "train-front-fill": 63516, + "train-front": 63517, + "train-lightrail-front-fill": 63518, + "train-lightrail-front": 63519, + "truck-front-fill": 63520, + "truck-front": 63521, + "ubuntu": 63522, + "unindent": 63523, + "unity": 63524, + "universal-access-circle": 63525, + "universal-access": 63526, + "virus": 63527, + "virus2": 63528, + "wechat": 63529, + "yelp": 63530, + "sign-stop-fill": 63531, + "sign-stop-lights-fill": 63532, + "sign-stop-lights": 63533, + "sign-stop": 63534, + "sign-turn-left-fill": 63535, + "sign-turn-left": 63536, + "sign-turn-right-fill": 63537, + "sign-turn-right": 63538, + "sign-turn-slight-left-fill": 63539, + "sign-turn-slight-left": 63540, + "sign-turn-slight-right-fill": 63541, + "sign-turn-slight-right": 63542, + "sign-yield-fill": 63543, + "sign-yield": 63544, + "ev-station-fill": 63545, + "ev-station": 63546, + "fuel-pump-diesel-fill": 63547, + "fuel-pump-diesel": 63548, + "fuel-pump-fill": 63549, + "fuel-pump": 63550, + "0-circle-fill": 63551, + "0-circle": 63552, + "0-square-fill": 63553, + "0-square": 63554, + "rocket-fill": 63555, + "rocket-takeoff-fill": 63556, + "rocket-takeoff": 63557, + "rocket": 63558, + "stripe": 63559, + "subscript": 63560, + "superscript": 63561, + "trello": 63562, + "envelope-at-fill": 63563, + "envelope-at": 63564, + "regex": 63565, + "text-wrap": 63566, + "sign-dead-end-fill": 63567, + "sign-dead-end": 63568, + "sign-do-not-enter-fill": 63569, + "sign-do-not-enter": 63570, + "sign-intersection-fill": 63571, + "sign-intersection-side-fill": 63572, + "sign-intersection-side": 63573, + "sign-intersection-t-fill": 63574, + "sign-intersection-t": 63575, + "sign-intersection-y-fill": 63576, + "sign-intersection-y": 63577, + "sign-intersection": 63578, + "sign-merge-left-fill": 63579, + "sign-merge-left": 63580, + "sign-merge-right-fill": 63581, + "sign-merge-right": 63582, + "sign-no-left-turn-fill": 63583, + "sign-no-left-turn": 63584, + "sign-no-parking-fill": 63585, + "sign-no-parking": 63586, + "sign-no-right-turn-fill": 63587, + "sign-no-right-turn": 63588, + "sign-railroad-fill": 63589, + "sign-railroad": 63590, + "building-add": 63591, + "building-check": 63592, + "building-dash": 63593, + "building-down": 63594, + "building-exclamation": 63595, + "building-fill-add": 63596, + "building-fill-check": 63597, + "building-fill-dash": 63598, + "building-fill-down": 63599, + "building-fill-exclamation": 63600, + "building-fill-gear": 63601, + "building-fill-lock": 63602, + "building-fill-slash": 63603, + "building-fill-up": 63604, + "building-fill-x": 63605, + "building-fill": 63606, + "building-gear": 63607, + "building-lock": 63608, + "building-slash": 63609, + "building-up": 63610, + "building-x": 63611, + "buildings-fill": 63612, + "buildings": 63613, + "bus-front-fill": 63614, + "bus-front": 63615, + "ev-front-fill": 63616, + "ev-front": 63617, + "globe-americas": 63618, + "globe-asia-australia": 63619, + "globe-central-south-asia": 63620, + "globe-europe-africa": 63621, + "house-add-fill": 63622, + "house-add": 63623, + "house-check-fill": 63624, + "house-check": 63625, + "house-dash-fill": 63626, + "house-dash": 63627, + "house-down-fill": 63628, + "house-down": 63629, + "house-exclamation-fill": 63630, + "house-exclamation": 63631, + "house-gear-fill": 63632, + "house-gear": 63633, + "house-lock-fill": 63634, + "house-lock": 63635, + "house-slash-fill": 63636, + "house-slash": 63637, + "house-up-fill": 63638, + "house-up": 63639, + "house-x-fill": 63640, + "house-x": 63641, + "person-add": 63642, + "person-down": 63643, + "person-exclamation": 63644, + "person-fill-add": 63645, + "person-fill-check": 63646, + "person-fill-dash": 63647, + "person-fill-down": 63648, + "person-fill-exclamation": 63649, + "person-fill-gear": 63650, + "person-fill-lock": 63651, + "person-fill-slash": 63652, + "person-fill-up": 63653, + "person-fill-x": 63654, + "person-gear": 63655, + "person-lock": 63656, + "person-slash": 63657, + "person-up": 63658, + "scooter": 63659, + "taxi-front-fill": 63660, + "taxi-front": 63661, + "amd": 63662, + "database-add": 63663, + "database-check": 63664, + "database-dash": 63665, + "database-down": 63666, + "database-exclamation": 63667, + "database-fill-add": 63668, + "database-fill-check": 63669, + "database-fill-dash": 63670, + "database-fill-down": 63671, + "database-fill-exclamation": 63672, + "database-fill-gear": 63673, + "database-fill-lock": 63674, + "database-fill-slash": 63675, + "database-fill-up": 63676, + "database-fill-x": 63677, + "database-fill": 63678, + "database-gear": 63679, + "database-lock": 63680, + "database-slash": 63681, + "database-up": 63682, + "database-x": 63683, + "database": 63684, + "houses-fill": 63685, + "houses": 63686, + "nvidia": 63687, + "person-vcard-fill": 63688, + "person-vcard": 63689, + "sina-weibo": 63690, + "tencent-qq": 63691, + "wikipedia": 63692 +} \ No newline at end of file diff --git a/src/mono/sample/wasm/blazor-frame/wwwroot/css/bootstrap-icons/bootstrap-icons.min.css b/src/mono/sample/wasm/blazor-frame/wwwroot/css/bootstrap-icons/bootstrap-icons.min.css new file mode 100644 index 00000000000000..088ba56931d308 --- /dev/null +++ b/src/mono/sample/wasm/blazor-frame/wwwroot/css/bootstrap-icons/bootstrap-icons.min.css @@ -0,0 +1,5 @@ +/*! + * Bootstrap Icons v1.10.5 (https://icons.getbootstrap.com/) + * Copyright 2019-2023 The Bootstrap Authors + * Licensed under MIT (https://github.com/twbs/icons/blob/main/LICENSE) + */@font-face{font-display:block;font-family:bootstrap-icons;src:url("fonts/bootstrap-icons.woff2?1fa40e8900654d2863d011707b9fb6f2") format("woff2"),url("fonts/bootstrap-icons.woff?1fa40e8900654d2863d011707b9fb6f2") format("woff")}.bi::before,[class*=" bi-"]::before,[class^=bi-]::before{display:inline-block;font-family:bootstrap-icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;line-height:1;vertical-align:-.125em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.bi-123::before{content:"\f67f"}.bi-alarm-fill::before{content:"\f101"}.bi-alarm::before{content:"\f102"}.bi-align-bottom::before{content:"\f103"}.bi-align-center::before{content:"\f104"}.bi-align-end::before{content:"\f105"}.bi-align-middle::before{content:"\f106"}.bi-align-start::before{content:"\f107"}.bi-align-top::before{content:"\f108"}.bi-alt::before{content:"\f109"}.bi-app-indicator::before{content:"\f10a"}.bi-app::before{content:"\f10b"}.bi-archive-fill::before{content:"\f10c"}.bi-archive::before{content:"\f10d"}.bi-arrow-90deg-down::before{content:"\f10e"}.bi-arrow-90deg-left::before{content:"\f10f"}.bi-arrow-90deg-right::before{content:"\f110"}.bi-arrow-90deg-up::before{content:"\f111"}.bi-arrow-bar-down::before{content:"\f112"}.bi-arrow-bar-left::before{content:"\f113"}.bi-arrow-bar-right::before{content:"\f114"}.bi-arrow-bar-up::before{content:"\f115"}.bi-arrow-clockwise::before{content:"\f116"}.bi-arrow-counterclockwise::before{content:"\f117"}.bi-arrow-down-circle-fill::before{content:"\f118"}.bi-arrow-down-circle::before{content:"\f119"}.bi-arrow-down-left-circle-fill::before{content:"\f11a"}.bi-arrow-down-left-circle::before{content:"\f11b"}.bi-arrow-down-left-square-fill::before{content:"\f11c"}.bi-arrow-down-left-square::before{content:"\f11d"}.bi-arrow-down-left::before{content:"\f11e"}.bi-arrow-down-right-circle-fill::before{content:"\f11f"}.bi-arrow-down-right-circle::before{content:"\f120"}.bi-arrow-down-right-square-fill::before{content:"\f121"}.bi-arrow-down-right-square::before{content:"\f122"}.bi-arrow-down-right::before{content:"\f123"}.bi-arrow-down-short::before{content:"\f124"}.bi-arrow-down-square-fill::before{content:"\f125"}.bi-arrow-down-square::before{content:"\f126"}.bi-arrow-down-up::before{content:"\f127"}.bi-arrow-down::before{content:"\f128"}.bi-arrow-left-circle-fill::before{content:"\f129"}.bi-arrow-left-circle::before{content:"\f12a"}.bi-arrow-left-right::before{content:"\f12b"}.bi-arrow-left-short::before{content:"\f12c"}.bi-arrow-left-square-fill::before{content:"\f12d"}.bi-arrow-left-square::before{content:"\f12e"}.bi-arrow-left::before{content:"\f12f"}.bi-arrow-repeat::before{content:"\f130"}.bi-arrow-return-left::before{content:"\f131"}.bi-arrow-return-right::before{content:"\f132"}.bi-arrow-right-circle-fill::before{content:"\f133"}.bi-arrow-right-circle::before{content:"\f134"}.bi-arrow-right-short::before{content:"\f135"}.bi-arrow-right-square-fill::before{content:"\f136"}.bi-arrow-right-square::before{content:"\f137"}.bi-arrow-right::before{content:"\f138"}.bi-arrow-up-circle-fill::before{content:"\f139"}.bi-arrow-up-circle::before{content:"\f13a"}.bi-arrow-up-left-circle-fill::before{content:"\f13b"}.bi-arrow-up-left-circle::before{content:"\f13c"}.bi-arrow-up-left-square-fill::before{content:"\f13d"}.bi-arrow-up-left-square::before{content:"\f13e"}.bi-arrow-up-left::before{content:"\f13f"}.bi-arrow-up-right-circle-fill::before{content:"\f140"}.bi-arrow-up-right-circle::before{content:"\f141"}.bi-arrow-up-right-square-fill::before{content:"\f142"}.bi-arrow-up-right-square::before{content:"\f143"}.bi-arrow-up-right::before{content:"\f144"}.bi-arrow-up-short::before{content:"\f145"}.bi-arrow-up-square-fill::before{content:"\f146"}.bi-arrow-up-square::before{content:"\f147"}.bi-arrow-up::before{content:"\f148"}.bi-arrows-angle-contract::before{content:"\f149"}.bi-arrows-angle-expand::before{content:"\f14a"}.bi-arrows-collapse::before{content:"\f14b"}.bi-arrows-expand::before{content:"\f14c"}.bi-arrows-fullscreen::before{content:"\f14d"}.bi-arrows-move::before{content:"\f14e"}.bi-aspect-ratio-fill::before{content:"\f14f"}.bi-aspect-ratio::before{content:"\f150"}.bi-asterisk::before{content:"\f151"}.bi-at::before{content:"\f152"}.bi-award-fill::before{content:"\f153"}.bi-award::before{content:"\f154"}.bi-back::before{content:"\f155"}.bi-backspace-fill::before{content:"\f156"}.bi-backspace-reverse-fill::before{content:"\f157"}.bi-backspace-reverse::before{content:"\f158"}.bi-backspace::before{content:"\f159"}.bi-badge-3d-fill::before{content:"\f15a"}.bi-badge-3d::before{content:"\f15b"}.bi-badge-4k-fill::before{content:"\f15c"}.bi-badge-4k::before{content:"\f15d"}.bi-badge-8k-fill::before{content:"\f15e"}.bi-badge-8k::before{content:"\f15f"}.bi-badge-ad-fill::before{content:"\f160"}.bi-badge-ad::before{content:"\f161"}.bi-badge-ar-fill::before{content:"\f162"}.bi-badge-ar::before{content:"\f163"}.bi-badge-cc-fill::before{content:"\f164"}.bi-badge-cc::before{content:"\f165"}.bi-badge-hd-fill::before{content:"\f166"}.bi-badge-hd::before{content:"\f167"}.bi-badge-tm-fill::before{content:"\f168"}.bi-badge-tm::before{content:"\f169"}.bi-badge-vo-fill::before{content:"\f16a"}.bi-badge-vo::before{content:"\f16b"}.bi-badge-vr-fill::before{content:"\f16c"}.bi-badge-vr::before{content:"\f16d"}.bi-badge-wc-fill::before{content:"\f16e"}.bi-badge-wc::before{content:"\f16f"}.bi-bag-check-fill::before{content:"\f170"}.bi-bag-check::before{content:"\f171"}.bi-bag-dash-fill::before{content:"\f172"}.bi-bag-dash::before{content:"\f173"}.bi-bag-fill::before{content:"\f174"}.bi-bag-plus-fill::before{content:"\f175"}.bi-bag-plus::before{content:"\f176"}.bi-bag-x-fill::before{content:"\f177"}.bi-bag-x::before{content:"\f178"}.bi-bag::before{content:"\f179"}.bi-bar-chart-fill::before{content:"\f17a"}.bi-bar-chart-line-fill::before{content:"\f17b"}.bi-bar-chart-line::before{content:"\f17c"}.bi-bar-chart-steps::before{content:"\f17d"}.bi-bar-chart::before{content:"\f17e"}.bi-basket-fill::before{content:"\f17f"}.bi-basket::before{content:"\f180"}.bi-basket2-fill::before{content:"\f181"}.bi-basket2::before{content:"\f182"}.bi-basket3-fill::before{content:"\f183"}.bi-basket3::before{content:"\f184"}.bi-battery-charging::before{content:"\f185"}.bi-battery-full::before{content:"\f186"}.bi-battery-half::before{content:"\f187"}.bi-battery::before{content:"\f188"}.bi-bell-fill::before{content:"\f189"}.bi-bell::before{content:"\f18a"}.bi-bezier::before{content:"\f18b"}.bi-bezier2::before{content:"\f18c"}.bi-bicycle::before{content:"\f18d"}.bi-binoculars-fill::before{content:"\f18e"}.bi-binoculars::before{content:"\f18f"}.bi-blockquote-left::before{content:"\f190"}.bi-blockquote-right::before{content:"\f191"}.bi-book-fill::before{content:"\f192"}.bi-book-half::before{content:"\f193"}.bi-book::before{content:"\f194"}.bi-bookmark-check-fill::before{content:"\f195"}.bi-bookmark-check::before{content:"\f196"}.bi-bookmark-dash-fill::before{content:"\f197"}.bi-bookmark-dash::before{content:"\f198"}.bi-bookmark-fill::before{content:"\f199"}.bi-bookmark-heart-fill::before{content:"\f19a"}.bi-bookmark-heart::before{content:"\f19b"}.bi-bookmark-plus-fill::before{content:"\f19c"}.bi-bookmark-plus::before{content:"\f19d"}.bi-bookmark-star-fill::before{content:"\f19e"}.bi-bookmark-star::before{content:"\f19f"}.bi-bookmark-x-fill::before{content:"\f1a0"}.bi-bookmark-x::before{content:"\f1a1"}.bi-bookmark::before{content:"\f1a2"}.bi-bookmarks-fill::before{content:"\f1a3"}.bi-bookmarks::before{content:"\f1a4"}.bi-bookshelf::before{content:"\f1a5"}.bi-bootstrap-fill::before{content:"\f1a6"}.bi-bootstrap-reboot::before{content:"\f1a7"}.bi-bootstrap::before{content:"\f1a8"}.bi-border-all::before{content:"\f1a9"}.bi-border-bottom::before{content:"\f1aa"}.bi-border-center::before{content:"\f1ab"}.bi-border-inner::before{content:"\f1ac"}.bi-border-left::before{content:"\f1ad"}.bi-border-middle::before{content:"\f1ae"}.bi-border-outer::before{content:"\f1af"}.bi-border-right::before{content:"\f1b0"}.bi-border-style::before{content:"\f1b1"}.bi-border-top::before{content:"\f1b2"}.bi-border-width::before{content:"\f1b3"}.bi-border::before{content:"\f1b4"}.bi-bounding-box-circles::before{content:"\f1b5"}.bi-bounding-box::before{content:"\f1b6"}.bi-box-arrow-down-left::before{content:"\f1b7"}.bi-box-arrow-down-right::before{content:"\f1b8"}.bi-box-arrow-down::before{content:"\f1b9"}.bi-box-arrow-in-down-left::before{content:"\f1ba"}.bi-box-arrow-in-down-right::before{content:"\f1bb"}.bi-box-arrow-in-down::before{content:"\f1bc"}.bi-box-arrow-in-left::before{content:"\f1bd"}.bi-box-arrow-in-right::before{content:"\f1be"}.bi-box-arrow-in-up-left::before{content:"\f1bf"}.bi-box-arrow-in-up-right::before{content:"\f1c0"}.bi-box-arrow-in-up::before{content:"\f1c1"}.bi-box-arrow-left::before{content:"\f1c2"}.bi-box-arrow-right::before{content:"\f1c3"}.bi-box-arrow-up-left::before{content:"\f1c4"}.bi-box-arrow-up-right::before{content:"\f1c5"}.bi-box-arrow-up::before{content:"\f1c6"}.bi-box-seam::before{content:"\f1c7"}.bi-box::before{content:"\f1c8"}.bi-braces::before{content:"\f1c9"}.bi-bricks::before{content:"\f1ca"}.bi-briefcase-fill::before{content:"\f1cb"}.bi-briefcase::before{content:"\f1cc"}.bi-brightness-alt-high-fill::before{content:"\f1cd"}.bi-brightness-alt-high::before{content:"\f1ce"}.bi-brightness-alt-low-fill::before{content:"\f1cf"}.bi-brightness-alt-low::before{content:"\f1d0"}.bi-brightness-high-fill::before{content:"\f1d1"}.bi-brightness-high::before{content:"\f1d2"}.bi-brightness-low-fill::before{content:"\f1d3"}.bi-brightness-low::before{content:"\f1d4"}.bi-broadcast-pin::before{content:"\f1d5"}.bi-broadcast::before{content:"\f1d6"}.bi-brush-fill::before{content:"\f1d7"}.bi-brush::before{content:"\f1d8"}.bi-bucket-fill::before{content:"\f1d9"}.bi-bucket::before{content:"\f1da"}.bi-bug-fill::before{content:"\f1db"}.bi-bug::before{content:"\f1dc"}.bi-building::before{content:"\f1dd"}.bi-bullseye::before{content:"\f1de"}.bi-calculator-fill::before{content:"\f1df"}.bi-calculator::before{content:"\f1e0"}.bi-calendar-check-fill::before{content:"\f1e1"}.bi-calendar-check::before{content:"\f1e2"}.bi-calendar-date-fill::before{content:"\f1e3"}.bi-calendar-date::before{content:"\f1e4"}.bi-calendar-day-fill::before{content:"\f1e5"}.bi-calendar-day::before{content:"\f1e6"}.bi-calendar-event-fill::before{content:"\f1e7"}.bi-calendar-event::before{content:"\f1e8"}.bi-calendar-fill::before{content:"\f1e9"}.bi-calendar-minus-fill::before{content:"\f1ea"}.bi-calendar-minus::before{content:"\f1eb"}.bi-calendar-month-fill::before{content:"\f1ec"}.bi-calendar-month::before{content:"\f1ed"}.bi-calendar-plus-fill::before{content:"\f1ee"}.bi-calendar-plus::before{content:"\f1ef"}.bi-calendar-range-fill::before{content:"\f1f0"}.bi-calendar-range::before{content:"\f1f1"}.bi-calendar-week-fill::before{content:"\f1f2"}.bi-calendar-week::before{content:"\f1f3"}.bi-calendar-x-fill::before{content:"\f1f4"}.bi-calendar-x::before{content:"\f1f5"}.bi-calendar::before{content:"\f1f6"}.bi-calendar2-check-fill::before{content:"\f1f7"}.bi-calendar2-check::before{content:"\f1f8"}.bi-calendar2-date-fill::before{content:"\f1f9"}.bi-calendar2-date::before{content:"\f1fa"}.bi-calendar2-day-fill::before{content:"\f1fb"}.bi-calendar2-day::before{content:"\f1fc"}.bi-calendar2-event-fill::before{content:"\f1fd"}.bi-calendar2-event::before{content:"\f1fe"}.bi-calendar2-fill::before{content:"\f1ff"}.bi-calendar2-minus-fill::before{content:"\f200"}.bi-calendar2-minus::before{content:"\f201"}.bi-calendar2-month-fill::before{content:"\f202"}.bi-calendar2-month::before{content:"\f203"}.bi-calendar2-plus-fill::before{content:"\f204"}.bi-calendar2-plus::before{content:"\f205"}.bi-calendar2-range-fill::before{content:"\f206"}.bi-calendar2-range::before{content:"\f207"}.bi-calendar2-week-fill::before{content:"\f208"}.bi-calendar2-week::before{content:"\f209"}.bi-calendar2-x-fill::before{content:"\f20a"}.bi-calendar2-x::before{content:"\f20b"}.bi-calendar2::before{content:"\f20c"}.bi-calendar3-event-fill::before{content:"\f20d"}.bi-calendar3-event::before{content:"\f20e"}.bi-calendar3-fill::before{content:"\f20f"}.bi-calendar3-range-fill::before{content:"\f210"}.bi-calendar3-range::before{content:"\f211"}.bi-calendar3-week-fill::before{content:"\f212"}.bi-calendar3-week::before{content:"\f213"}.bi-calendar3::before{content:"\f214"}.bi-calendar4-event::before{content:"\f215"}.bi-calendar4-range::before{content:"\f216"}.bi-calendar4-week::before{content:"\f217"}.bi-calendar4::before{content:"\f218"}.bi-camera-fill::before{content:"\f219"}.bi-camera-reels-fill::before{content:"\f21a"}.bi-camera-reels::before{content:"\f21b"}.bi-camera-video-fill::before{content:"\f21c"}.bi-camera-video-off-fill::before{content:"\f21d"}.bi-camera-video-off::before{content:"\f21e"}.bi-camera-video::before{content:"\f21f"}.bi-camera::before{content:"\f220"}.bi-camera2::before{content:"\f221"}.bi-capslock-fill::before{content:"\f222"}.bi-capslock::before{content:"\f223"}.bi-card-checklist::before{content:"\f224"}.bi-card-heading::before{content:"\f225"}.bi-card-image::before{content:"\f226"}.bi-card-list::before{content:"\f227"}.bi-card-text::before{content:"\f228"}.bi-caret-down-fill::before{content:"\f229"}.bi-caret-down-square-fill::before{content:"\f22a"}.bi-caret-down-square::before{content:"\f22b"}.bi-caret-down::before{content:"\f22c"}.bi-caret-left-fill::before{content:"\f22d"}.bi-caret-left-square-fill::before{content:"\f22e"}.bi-caret-left-square::before{content:"\f22f"}.bi-caret-left::before{content:"\f230"}.bi-caret-right-fill::before{content:"\f231"}.bi-caret-right-square-fill::before{content:"\f232"}.bi-caret-right-square::before{content:"\f233"}.bi-caret-right::before{content:"\f234"}.bi-caret-up-fill::before{content:"\f235"}.bi-caret-up-square-fill::before{content:"\f236"}.bi-caret-up-square::before{content:"\f237"}.bi-caret-up::before{content:"\f238"}.bi-cart-check-fill::before{content:"\f239"}.bi-cart-check::before{content:"\f23a"}.bi-cart-dash-fill::before{content:"\f23b"}.bi-cart-dash::before{content:"\f23c"}.bi-cart-fill::before{content:"\f23d"}.bi-cart-plus-fill::before{content:"\f23e"}.bi-cart-plus::before{content:"\f23f"}.bi-cart-x-fill::before{content:"\f240"}.bi-cart-x::before{content:"\f241"}.bi-cart::before{content:"\f242"}.bi-cart2::before{content:"\f243"}.bi-cart3::before{content:"\f244"}.bi-cart4::before{content:"\f245"}.bi-cash-stack::before{content:"\f246"}.bi-cash::before{content:"\f247"}.bi-cast::before{content:"\f248"}.bi-chat-dots-fill::before{content:"\f249"}.bi-chat-dots::before{content:"\f24a"}.bi-chat-fill::before{content:"\f24b"}.bi-chat-left-dots-fill::before{content:"\f24c"}.bi-chat-left-dots::before{content:"\f24d"}.bi-chat-left-fill::before{content:"\f24e"}.bi-chat-left-quote-fill::before{content:"\f24f"}.bi-chat-left-quote::before{content:"\f250"}.bi-chat-left-text-fill::before{content:"\f251"}.bi-chat-left-text::before{content:"\f252"}.bi-chat-left::before{content:"\f253"}.bi-chat-quote-fill::before{content:"\f254"}.bi-chat-quote::before{content:"\f255"}.bi-chat-right-dots-fill::before{content:"\f256"}.bi-chat-right-dots::before{content:"\f257"}.bi-chat-right-fill::before{content:"\f258"}.bi-chat-right-quote-fill::before{content:"\f259"}.bi-chat-right-quote::before{content:"\f25a"}.bi-chat-right-text-fill::before{content:"\f25b"}.bi-chat-right-text::before{content:"\f25c"}.bi-chat-right::before{content:"\f25d"}.bi-chat-square-dots-fill::before{content:"\f25e"}.bi-chat-square-dots::before{content:"\f25f"}.bi-chat-square-fill::before{content:"\f260"}.bi-chat-square-quote-fill::before{content:"\f261"}.bi-chat-square-quote::before{content:"\f262"}.bi-chat-square-text-fill::before{content:"\f263"}.bi-chat-square-text::before{content:"\f264"}.bi-chat-square::before{content:"\f265"}.bi-chat-text-fill::before{content:"\f266"}.bi-chat-text::before{content:"\f267"}.bi-chat::before{content:"\f268"}.bi-check-all::before{content:"\f269"}.bi-check-circle-fill::before{content:"\f26a"}.bi-check-circle::before{content:"\f26b"}.bi-check-square-fill::before{content:"\f26c"}.bi-check-square::before{content:"\f26d"}.bi-check::before{content:"\f26e"}.bi-check2-all::before{content:"\f26f"}.bi-check2-circle::before{content:"\f270"}.bi-check2-square::before{content:"\f271"}.bi-check2::before{content:"\f272"}.bi-chevron-bar-contract::before{content:"\f273"}.bi-chevron-bar-down::before{content:"\f274"}.bi-chevron-bar-expand::before{content:"\f275"}.bi-chevron-bar-left::before{content:"\f276"}.bi-chevron-bar-right::before{content:"\f277"}.bi-chevron-bar-up::before{content:"\f278"}.bi-chevron-compact-down::before{content:"\f279"}.bi-chevron-compact-left::before{content:"\f27a"}.bi-chevron-compact-right::before{content:"\f27b"}.bi-chevron-compact-up::before{content:"\f27c"}.bi-chevron-contract::before{content:"\f27d"}.bi-chevron-double-down::before{content:"\f27e"}.bi-chevron-double-left::before{content:"\f27f"}.bi-chevron-double-right::before{content:"\f280"}.bi-chevron-double-up::before{content:"\f281"}.bi-chevron-down::before{content:"\f282"}.bi-chevron-expand::before{content:"\f283"}.bi-chevron-left::before{content:"\f284"}.bi-chevron-right::before{content:"\f285"}.bi-chevron-up::before{content:"\f286"}.bi-circle-fill::before{content:"\f287"}.bi-circle-half::before{content:"\f288"}.bi-circle-square::before{content:"\f289"}.bi-circle::before{content:"\f28a"}.bi-clipboard-check::before{content:"\f28b"}.bi-clipboard-data::before{content:"\f28c"}.bi-clipboard-minus::before{content:"\f28d"}.bi-clipboard-plus::before{content:"\f28e"}.bi-clipboard-x::before{content:"\f28f"}.bi-clipboard::before{content:"\f290"}.bi-clock-fill::before{content:"\f291"}.bi-clock-history::before{content:"\f292"}.bi-clock::before{content:"\f293"}.bi-cloud-arrow-down-fill::before{content:"\f294"}.bi-cloud-arrow-down::before{content:"\f295"}.bi-cloud-arrow-up-fill::before{content:"\f296"}.bi-cloud-arrow-up::before{content:"\f297"}.bi-cloud-check-fill::before{content:"\f298"}.bi-cloud-check::before{content:"\f299"}.bi-cloud-download-fill::before{content:"\f29a"}.bi-cloud-download::before{content:"\f29b"}.bi-cloud-drizzle-fill::before{content:"\f29c"}.bi-cloud-drizzle::before{content:"\f29d"}.bi-cloud-fill::before{content:"\f29e"}.bi-cloud-fog-fill::before{content:"\f29f"}.bi-cloud-fog::before{content:"\f2a0"}.bi-cloud-fog2-fill::before{content:"\f2a1"}.bi-cloud-fog2::before{content:"\f2a2"}.bi-cloud-hail-fill::before{content:"\f2a3"}.bi-cloud-hail::before{content:"\f2a4"}.bi-cloud-haze-fill::before{content:"\f2a6"}.bi-cloud-haze::before{content:"\f2a7"}.bi-cloud-haze2-fill::before{content:"\f2a8"}.bi-cloud-lightning-fill::before{content:"\f2a9"}.bi-cloud-lightning-rain-fill::before{content:"\f2aa"}.bi-cloud-lightning-rain::before{content:"\f2ab"}.bi-cloud-lightning::before{content:"\f2ac"}.bi-cloud-minus-fill::before{content:"\f2ad"}.bi-cloud-minus::before{content:"\f2ae"}.bi-cloud-moon-fill::before{content:"\f2af"}.bi-cloud-moon::before{content:"\f2b0"}.bi-cloud-plus-fill::before{content:"\f2b1"}.bi-cloud-plus::before{content:"\f2b2"}.bi-cloud-rain-fill::before{content:"\f2b3"}.bi-cloud-rain-heavy-fill::before{content:"\f2b4"}.bi-cloud-rain-heavy::before{content:"\f2b5"}.bi-cloud-rain::before{content:"\f2b6"}.bi-cloud-slash-fill::before{content:"\f2b7"}.bi-cloud-slash::before{content:"\f2b8"}.bi-cloud-sleet-fill::before{content:"\f2b9"}.bi-cloud-sleet::before{content:"\f2ba"}.bi-cloud-snow-fill::before{content:"\f2bb"}.bi-cloud-snow::before{content:"\f2bc"}.bi-cloud-sun-fill::before{content:"\f2bd"}.bi-cloud-sun::before{content:"\f2be"}.bi-cloud-upload-fill::before{content:"\f2bf"}.bi-cloud-upload::before{content:"\f2c0"}.bi-cloud::before{content:"\f2c1"}.bi-clouds-fill::before{content:"\f2c2"}.bi-clouds::before{content:"\f2c3"}.bi-cloudy-fill::before{content:"\f2c4"}.bi-cloudy::before{content:"\f2c5"}.bi-code-slash::before{content:"\f2c6"}.bi-code-square::before{content:"\f2c7"}.bi-code::before{content:"\f2c8"}.bi-collection-fill::before{content:"\f2c9"}.bi-collection-play-fill::before{content:"\f2ca"}.bi-collection-play::before{content:"\f2cb"}.bi-collection::before{content:"\f2cc"}.bi-columns-gap::before{content:"\f2cd"}.bi-columns::before{content:"\f2ce"}.bi-command::before{content:"\f2cf"}.bi-compass-fill::before{content:"\f2d0"}.bi-compass::before{content:"\f2d1"}.bi-cone-striped::before{content:"\f2d2"}.bi-cone::before{content:"\f2d3"}.bi-controller::before{content:"\f2d4"}.bi-cpu-fill::before{content:"\f2d5"}.bi-cpu::before{content:"\f2d6"}.bi-credit-card-2-back-fill::before{content:"\f2d7"}.bi-credit-card-2-back::before{content:"\f2d8"}.bi-credit-card-2-front-fill::before{content:"\f2d9"}.bi-credit-card-2-front::before{content:"\f2da"}.bi-credit-card-fill::before{content:"\f2db"}.bi-credit-card::before{content:"\f2dc"}.bi-crop::before{content:"\f2dd"}.bi-cup-fill::before{content:"\f2de"}.bi-cup-straw::before{content:"\f2df"}.bi-cup::before{content:"\f2e0"}.bi-cursor-fill::before{content:"\f2e1"}.bi-cursor-text::before{content:"\f2e2"}.bi-cursor::before{content:"\f2e3"}.bi-dash-circle-dotted::before{content:"\f2e4"}.bi-dash-circle-fill::before{content:"\f2e5"}.bi-dash-circle::before{content:"\f2e6"}.bi-dash-square-dotted::before{content:"\f2e7"}.bi-dash-square-fill::before{content:"\f2e8"}.bi-dash-square::before{content:"\f2e9"}.bi-dash::before{content:"\f2ea"}.bi-diagram-2-fill::before{content:"\f2eb"}.bi-diagram-2::before{content:"\f2ec"}.bi-diagram-3-fill::before{content:"\f2ed"}.bi-diagram-3::before{content:"\f2ee"}.bi-diamond-fill::before{content:"\f2ef"}.bi-diamond-half::before{content:"\f2f0"}.bi-diamond::before{content:"\f2f1"}.bi-dice-1-fill::before{content:"\f2f2"}.bi-dice-1::before{content:"\f2f3"}.bi-dice-2-fill::before{content:"\f2f4"}.bi-dice-2::before{content:"\f2f5"}.bi-dice-3-fill::before{content:"\f2f6"}.bi-dice-3::before{content:"\f2f7"}.bi-dice-4-fill::before{content:"\f2f8"}.bi-dice-4::before{content:"\f2f9"}.bi-dice-5-fill::before{content:"\f2fa"}.bi-dice-5::before{content:"\f2fb"}.bi-dice-6-fill::before{content:"\f2fc"}.bi-dice-6::before{content:"\f2fd"}.bi-disc-fill::before{content:"\f2fe"}.bi-disc::before{content:"\f2ff"}.bi-discord::before{content:"\f300"}.bi-display-fill::before{content:"\f301"}.bi-display::before{content:"\f302"}.bi-distribute-horizontal::before{content:"\f303"}.bi-distribute-vertical::before{content:"\f304"}.bi-door-closed-fill::before{content:"\f305"}.bi-door-closed::before{content:"\f306"}.bi-door-open-fill::before{content:"\f307"}.bi-door-open::before{content:"\f308"}.bi-dot::before{content:"\f309"}.bi-download::before{content:"\f30a"}.bi-droplet-fill::before{content:"\f30b"}.bi-droplet-half::before{content:"\f30c"}.bi-droplet::before{content:"\f30d"}.bi-earbuds::before{content:"\f30e"}.bi-easel-fill::before{content:"\f30f"}.bi-easel::before{content:"\f310"}.bi-egg-fill::before{content:"\f311"}.bi-egg-fried::before{content:"\f312"}.bi-egg::before{content:"\f313"}.bi-eject-fill::before{content:"\f314"}.bi-eject::before{content:"\f315"}.bi-emoji-angry-fill::before{content:"\f316"}.bi-emoji-angry::before{content:"\f317"}.bi-emoji-dizzy-fill::before{content:"\f318"}.bi-emoji-dizzy::before{content:"\f319"}.bi-emoji-expressionless-fill::before{content:"\f31a"}.bi-emoji-expressionless::before{content:"\f31b"}.bi-emoji-frown-fill::before{content:"\f31c"}.bi-emoji-frown::before{content:"\f31d"}.bi-emoji-heart-eyes-fill::before{content:"\f31e"}.bi-emoji-heart-eyes::before{content:"\f31f"}.bi-emoji-laughing-fill::before{content:"\f320"}.bi-emoji-laughing::before{content:"\f321"}.bi-emoji-neutral-fill::before{content:"\f322"}.bi-emoji-neutral::before{content:"\f323"}.bi-emoji-smile-fill::before{content:"\f324"}.bi-emoji-smile-upside-down-fill::before{content:"\f325"}.bi-emoji-smile-upside-down::before{content:"\f326"}.bi-emoji-smile::before{content:"\f327"}.bi-emoji-sunglasses-fill::before{content:"\f328"}.bi-emoji-sunglasses::before{content:"\f329"}.bi-emoji-wink-fill::before{content:"\f32a"}.bi-emoji-wink::before{content:"\f32b"}.bi-envelope-fill::before{content:"\f32c"}.bi-envelope-open-fill::before{content:"\f32d"}.bi-envelope-open::before{content:"\f32e"}.bi-envelope::before{content:"\f32f"}.bi-eraser-fill::before{content:"\f330"}.bi-eraser::before{content:"\f331"}.bi-exclamation-circle-fill::before{content:"\f332"}.bi-exclamation-circle::before{content:"\f333"}.bi-exclamation-diamond-fill::before{content:"\f334"}.bi-exclamation-diamond::before{content:"\f335"}.bi-exclamation-octagon-fill::before{content:"\f336"}.bi-exclamation-octagon::before{content:"\f337"}.bi-exclamation-square-fill::before{content:"\f338"}.bi-exclamation-square::before{content:"\f339"}.bi-exclamation-triangle-fill::before{content:"\f33a"}.bi-exclamation-triangle::before{content:"\f33b"}.bi-exclamation::before{content:"\f33c"}.bi-exclude::before{content:"\f33d"}.bi-eye-fill::before{content:"\f33e"}.bi-eye-slash-fill::before{content:"\f33f"}.bi-eye-slash::before{content:"\f340"}.bi-eye::before{content:"\f341"}.bi-eyedropper::before{content:"\f342"}.bi-eyeglasses::before{content:"\f343"}.bi-facebook::before{content:"\f344"}.bi-file-arrow-down-fill::before{content:"\f345"}.bi-file-arrow-down::before{content:"\f346"}.bi-file-arrow-up-fill::before{content:"\f347"}.bi-file-arrow-up::before{content:"\f348"}.bi-file-bar-graph-fill::before{content:"\f349"}.bi-file-bar-graph::before{content:"\f34a"}.bi-file-binary-fill::before{content:"\f34b"}.bi-file-binary::before{content:"\f34c"}.bi-file-break-fill::before{content:"\f34d"}.bi-file-break::before{content:"\f34e"}.bi-file-check-fill::before{content:"\f34f"}.bi-file-check::before{content:"\f350"}.bi-file-code-fill::before{content:"\f351"}.bi-file-code::before{content:"\f352"}.bi-file-diff-fill::before{content:"\f353"}.bi-file-diff::before{content:"\f354"}.bi-file-earmark-arrow-down-fill::before{content:"\f355"}.bi-file-earmark-arrow-down::before{content:"\f356"}.bi-file-earmark-arrow-up-fill::before{content:"\f357"}.bi-file-earmark-arrow-up::before{content:"\f358"}.bi-file-earmark-bar-graph-fill::before{content:"\f359"}.bi-file-earmark-bar-graph::before{content:"\f35a"}.bi-file-earmark-binary-fill::before{content:"\f35b"}.bi-file-earmark-binary::before{content:"\f35c"}.bi-file-earmark-break-fill::before{content:"\f35d"}.bi-file-earmark-break::before{content:"\f35e"}.bi-file-earmark-check-fill::before{content:"\f35f"}.bi-file-earmark-check::before{content:"\f360"}.bi-file-earmark-code-fill::before{content:"\f361"}.bi-file-earmark-code::before{content:"\f362"}.bi-file-earmark-diff-fill::before{content:"\f363"}.bi-file-earmark-diff::before{content:"\f364"}.bi-file-earmark-easel-fill::before{content:"\f365"}.bi-file-earmark-easel::before{content:"\f366"}.bi-file-earmark-excel-fill::before{content:"\f367"}.bi-file-earmark-excel::before{content:"\f368"}.bi-file-earmark-fill::before{content:"\f369"}.bi-file-earmark-font-fill::before{content:"\f36a"}.bi-file-earmark-font::before{content:"\f36b"}.bi-file-earmark-image-fill::before{content:"\f36c"}.bi-file-earmark-image::before{content:"\f36d"}.bi-file-earmark-lock-fill::before{content:"\f36e"}.bi-file-earmark-lock::before{content:"\f36f"}.bi-file-earmark-lock2-fill::before{content:"\f370"}.bi-file-earmark-lock2::before{content:"\f371"}.bi-file-earmark-medical-fill::before{content:"\f372"}.bi-file-earmark-medical::before{content:"\f373"}.bi-file-earmark-minus-fill::before{content:"\f374"}.bi-file-earmark-minus::before{content:"\f375"}.bi-file-earmark-music-fill::before{content:"\f376"}.bi-file-earmark-music::before{content:"\f377"}.bi-file-earmark-person-fill::before{content:"\f378"}.bi-file-earmark-person::before{content:"\f379"}.bi-file-earmark-play-fill::before{content:"\f37a"}.bi-file-earmark-play::before{content:"\f37b"}.bi-file-earmark-plus-fill::before{content:"\f37c"}.bi-file-earmark-plus::before{content:"\f37d"}.bi-file-earmark-post-fill::before{content:"\f37e"}.bi-file-earmark-post::before{content:"\f37f"}.bi-file-earmark-ppt-fill::before{content:"\f380"}.bi-file-earmark-ppt::before{content:"\f381"}.bi-file-earmark-richtext-fill::before{content:"\f382"}.bi-file-earmark-richtext::before{content:"\f383"}.bi-file-earmark-ruled-fill::before{content:"\f384"}.bi-file-earmark-ruled::before{content:"\f385"}.bi-file-earmark-slides-fill::before{content:"\f386"}.bi-file-earmark-slides::before{content:"\f387"}.bi-file-earmark-spreadsheet-fill::before{content:"\f388"}.bi-file-earmark-spreadsheet::before{content:"\f389"}.bi-file-earmark-text-fill::before{content:"\f38a"}.bi-file-earmark-text::before{content:"\f38b"}.bi-file-earmark-word-fill::before{content:"\f38c"}.bi-file-earmark-word::before{content:"\f38d"}.bi-file-earmark-x-fill::before{content:"\f38e"}.bi-file-earmark-x::before{content:"\f38f"}.bi-file-earmark-zip-fill::before{content:"\f390"}.bi-file-earmark-zip::before{content:"\f391"}.bi-file-earmark::before{content:"\f392"}.bi-file-easel-fill::before{content:"\f393"}.bi-file-easel::before{content:"\f394"}.bi-file-excel-fill::before{content:"\f395"}.bi-file-excel::before{content:"\f396"}.bi-file-fill::before{content:"\f397"}.bi-file-font-fill::before{content:"\f398"}.bi-file-font::before{content:"\f399"}.bi-file-image-fill::before{content:"\f39a"}.bi-file-image::before{content:"\f39b"}.bi-file-lock-fill::before{content:"\f39c"}.bi-file-lock::before{content:"\f39d"}.bi-file-lock2-fill::before{content:"\f39e"}.bi-file-lock2::before{content:"\f39f"}.bi-file-medical-fill::before{content:"\f3a0"}.bi-file-medical::before{content:"\f3a1"}.bi-file-minus-fill::before{content:"\f3a2"}.bi-file-minus::before{content:"\f3a3"}.bi-file-music-fill::before{content:"\f3a4"}.bi-file-music::before{content:"\f3a5"}.bi-file-person-fill::before{content:"\f3a6"}.bi-file-person::before{content:"\f3a7"}.bi-file-play-fill::before{content:"\f3a8"}.bi-file-play::before{content:"\f3a9"}.bi-file-plus-fill::before{content:"\f3aa"}.bi-file-plus::before{content:"\f3ab"}.bi-file-post-fill::before{content:"\f3ac"}.bi-file-post::before{content:"\f3ad"}.bi-file-ppt-fill::before{content:"\f3ae"}.bi-file-ppt::before{content:"\f3af"}.bi-file-richtext-fill::before{content:"\f3b0"}.bi-file-richtext::before{content:"\f3b1"}.bi-file-ruled-fill::before{content:"\f3b2"}.bi-file-ruled::before{content:"\f3b3"}.bi-file-slides-fill::before{content:"\f3b4"}.bi-file-slides::before{content:"\f3b5"}.bi-file-spreadsheet-fill::before{content:"\f3b6"}.bi-file-spreadsheet::before{content:"\f3b7"}.bi-file-text-fill::before{content:"\f3b8"}.bi-file-text::before{content:"\f3b9"}.bi-file-word-fill::before{content:"\f3ba"}.bi-file-word::before{content:"\f3bb"}.bi-file-x-fill::before{content:"\f3bc"}.bi-file-x::before{content:"\f3bd"}.bi-file-zip-fill::before{content:"\f3be"}.bi-file-zip::before{content:"\f3bf"}.bi-file::before{content:"\f3c0"}.bi-files-alt::before{content:"\f3c1"}.bi-files::before{content:"\f3c2"}.bi-film::before{content:"\f3c3"}.bi-filter-circle-fill::before{content:"\f3c4"}.bi-filter-circle::before{content:"\f3c5"}.bi-filter-left::before{content:"\f3c6"}.bi-filter-right::before{content:"\f3c7"}.bi-filter-square-fill::before{content:"\f3c8"}.bi-filter-square::before{content:"\f3c9"}.bi-filter::before{content:"\f3ca"}.bi-flag-fill::before{content:"\f3cb"}.bi-flag::before{content:"\f3cc"}.bi-flower1::before{content:"\f3cd"}.bi-flower2::before{content:"\f3ce"}.bi-flower3::before{content:"\f3cf"}.bi-folder-check::before{content:"\f3d0"}.bi-folder-fill::before{content:"\f3d1"}.bi-folder-minus::before{content:"\f3d2"}.bi-folder-plus::before{content:"\f3d3"}.bi-folder-symlink-fill::before{content:"\f3d4"}.bi-folder-symlink::before{content:"\f3d5"}.bi-folder-x::before{content:"\f3d6"}.bi-folder::before{content:"\f3d7"}.bi-folder2-open::before{content:"\f3d8"}.bi-folder2::before{content:"\f3d9"}.bi-fonts::before{content:"\f3da"}.bi-forward-fill::before{content:"\f3db"}.bi-forward::before{content:"\f3dc"}.bi-front::before{content:"\f3dd"}.bi-fullscreen-exit::before{content:"\f3de"}.bi-fullscreen::before{content:"\f3df"}.bi-funnel-fill::before{content:"\f3e0"}.bi-funnel::before{content:"\f3e1"}.bi-gear-fill::before{content:"\f3e2"}.bi-gear-wide-connected::before{content:"\f3e3"}.bi-gear-wide::before{content:"\f3e4"}.bi-gear::before{content:"\f3e5"}.bi-gem::before{content:"\f3e6"}.bi-geo-alt-fill::before{content:"\f3e7"}.bi-geo-alt::before{content:"\f3e8"}.bi-geo-fill::before{content:"\f3e9"}.bi-geo::before{content:"\f3ea"}.bi-gift-fill::before{content:"\f3eb"}.bi-gift::before{content:"\f3ec"}.bi-github::before{content:"\f3ed"}.bi-globe::before{content:"\f3ee"}.bi-globe2::before{content:"\f3ef"}.bi-google::before{content:"\f3f0"}.bi-graph-down::before{content:"\f3f1"}.bi-graph-up::before{content:"\f3f2"}.bi-grid-1x2-fill::before{content:"\f3f3"}.bi-grid-1x2::before{content:"\f3f4"}.bi-grid-3x2-gap-fill::before{content:"\f3f5"}.bi-grid-3x2-gap::before{content:"\f3f6"}.bi-grid-3x2::before{content:"\f3f7"}.bi-grid-3x3-gap-fill::before{content:"\f3f8"}.bi-grid-3x3-gap::before{content:"\f3f9"}.bi-grid-3x3::before{content:"\f3fa"}.bi-grid-fill::before{content:"\f3fb"}.bi-grid::before{content:"\f3fc"}.bi-grip-horizontal::before{content:"\f3fd"}.bi-grip-vertical::before{content:"\f3fe"}.bi-hammer::before{content:"\f3ff"}.bi-hand-index-fill::before{content:"\f400"}.bi-hand-index-thumb-fill::before{content:"\f401"}.bi-hand-index-thumb::before{content:"\f402"}.bi-hand-index::before{content:"\f403"}.bi-hand-thumbs-down-fill::before{content:"\f404"}.bi-hand-thumbs-down::before{content:"\f405"}.bi-hand-thumbs-up-fill::before{content:"\f406"}.bi-hand-thumbs-up::before{content:"\f407"}.bi-handbag-fill::before{content:"\f408"}.bi-handbag::before{content:"\f409"}.bi-hash::before{content:"\f40a"}.bi-hdd-fill::before{content:"\f40b"}.bi-hdd-network-fill::before{content:"\f40c"}.bi-hdd-network::before{content:"\f40d"}.bi-hdd-rack-fill::before{content:"\f40e"}.bi-hdd-rack::before{content:"\f40f"}.bi-hdd-stack-fill::before{content:"\f410"}.bi-hdd-stack::before{content:"\f411"}.bi-hdd::before{content:"\f412"}.bi-headphones::before{content:"\f413"}.bi-headset::before{content:"\f414"}.bi-heart-fill::before{content:"\f415"}.bi-heart-half::before{content:"\f416"}.bi-heart::before{content:"\f417"}.bi-heptagon-fill::before{content:"\f418"}.bi-heptagon-half::before{content:"\f419"}.bi-heptagon::before{content:"\f41a"}.bi-hexagon-fill::before{content:"\f41b"}.bi-hexagon-half::before{content:"\f41c"}.bi-hexagon::before{content:"\f41d"}.bi-hourglass-bottom::before{content:"\f41e"}.bi-hourglass-split::before{content:"\f41f"}.bi-hourglass-top::before{content:"\f420"}.bi-hourglass::before{content:"\f421"}.bi-house-door-fill::before{content:"\f422"}.bi-house-door::before{content:"\f423"}.bi-house-fill::before{content:"\f424"}.bi-house::before{content:"\f425"}.bi-hr::before{content:"\f426"}.bi-hurricane::before{content:"\f427"}.bi-image-alt::before{content:"\f428"}.bi-image-fill::before{content:"\f429"}.bi-image::before{content:"\f42a"}.bi-images::before{content:"\f42b"}.bi-inbox-fill::before{content:"\f42c"}.bi-inbox::before{content:"\f42d"}.bi-inboxes-fill::before{content:"\f42e"}.bi-inboxes::before{content:"\f42f"}.bi-info-circle-fill::before{content:"\f430"}.bi-info-circle::before{content:"\f431"}.bi-info-square-fill::before{content:"\f432"}.bi-info-square::before{content:"\f433"}.bi-info::before{content:"\f434"}.bi-input-cursor-text::before{content:"\f435"}.bi-input-cursor::before{content:"\f436"}.bi-instagram::before{content:"\f437"}.bi-intersect::before{content:"\f438"}.bi-journal-album::before{content:"\f439"}.bi-journal-arrow-down::before{content:"\f43a"}.bi-journal-arrow-up::before{content:"\f43b"}.bi-journal-bookmark-fill::before{content:"\f43c"}.bi-journal-bookmark::before{content:"\f43d"}.bi-journal-check::before{content:"\f43e"}.bi-journal-code::before{content:"\f43f"}.bi-journal-medical::before{content:"\f440"}.bi-journal-minus::before{content:"\f441"}.bi-journal-plus::before{content:"\f442"}.bi-journal-richtext::before{content:"\f443"}.bi-journal-text::before{content:"\f444"}.bi-journal-x::before{content:"\f445"}.bi-journal::before{content:"\f446"}.bi-journals::before{content:"\f447"}.bi-joystick::before{content:"\f448"}.bi-justify-left::before{content:"\f449"}.bi-justify-right::before{content:"\f44a"}.bi-justify::before{content:"\f44b"}.bi-kanban-fill::before{content:"\f44c"}.bi-kanban::before{content:"\f44d"}.bi-key-fill::before{content:"\f44e"}.bi-key::before{content:"\f44f"}.bi-keyboard-fill::before{content:"\f450"}.bi-keyboard::before{content:"\f451"}.bi-ladder::before{content:"\f452"}.bi-lamp-fill::before{content:"\f453"}.bi-lamp::before{content:"\f454"}.bi-laptop-fill::before{content:"\f455"}.bi-laptop::before{content:"\f456"}.bi-layer-backward::before{content:"\f457"}.bi-layer-forward::before{content:"\f458"}.bi-layers-fill::before{content:"\f459"}.bi-layers-half::before{content:"\f45a"}.bi-layers::before{content:"\f45b"}.bi-layout-sidebar-inset-reverse::before{content:"\f45c"}.bi-layout-sidebar-inset::before{content:"\f45d"}.bi-layout-sidebar-reverse::before{content:"\f45e"}.bi-layout-sidebar::before{content:"\f45f"}.bi-layout-split::before{content:"\f460"}.bi-layout-text-sidebar-reverse::before{content:"\f461"}.bi-layout-text-sidebar::before{content:"\f462"}.bi-layout-text-window-reverse::before{content:"\f463"}.bi-layout-text-window::before{content:"\f464"}.bi-layout-three-columns::before{content:"\f465"}.bi-layout-wtf::before{content:"\f466"}.bi-life-preserver::before{content:"\f467"}.bi-lightbulb-fill::before{content:"\f468"}.bi-lightbulb-off-fill::before{content:"\f469"}.bi-lightbulb-off::before{content:"\f46a"}.bi-lightbulb::before{content:"\f46b"}.bi-lightning-charge-fill::before{content:"\f46c"}.bi-lightning-charge::before{content:"\f46d"}.bi-lightning-fill::before{content:"\f46e"}.bi-lightning::before{content:"\f46f"}.bi-link-45deg::before{content:"\f470"}.bi-link::before{content:"\f471"}.bi-linkedin::before{content:"\f472"}.bi-list-check::before{content:"\f473"}.bi-list-nested::before{content:"\f474"}.bi-list-ol::before{content:"\f475"}.bi-list-stars::before{content:"\f476"}.bi-list-task::before{content:"\f477"}.bi-list-ul::before{content:"\f478"}.bi-list::before{content:"\f479"}.bi-lock-fill::before{content:"\f47a"}.bi-lock::before{content:"\f47b"}.bi-mailbox::before{content:"\f47c"}.bi-mailbox2::before{content:"\f47d"}.bi-map-fill::before{content:"\f47e"}.bi-map::before{content:"\f47f"}.bi-markdown-fill::before{content:"\f480"}.bi-markdown::before{content:"\f481"}.bi-mask::before{content:"\f482"}.bi-megaphone-fill::before{content:"\f483"}.bi-megaphone::before{content:"\f484"}.bi-menu-app-fill::before{content:"\f485"}.bi-menu-app::before{content:"\f486"}.bi-menu-button-fill::before{content:"\f487"}.bi-menu-button-wide-fill::before{content:"\f488"}.bi-menu-button-wide::before{content:"\f489"}.bi-menu-button::before{content:"\f48a"}.bi-menu-down::before{content:"\f48b"}.bi-menu-up::before{content:"\f48c"}.bi-mic-fill::before{content:"\f48d"}.bi-mic-mute-fill::before{content:"\f48e"}.bi-mic-mute::before{content:"\f48f"}.bi-mic::before{content:"\f490"}.bi-minecart-loaded::before{content:"\f491"}.bi-minecart::before{content:"\f492"}.bi-moisture::before{content:"\f493"}.bi-moon-fill::before{content:"\f494"}.bi-moon-stars-fill::before{content:"\f495"}.bi-moon-stars::before{content:"\f496"}.bi-moon::before{content:"\f497"}.bi-mouse-fill::before{content:"\f498"}.bi-mouse::before{content:"\f499"}.bi-mouse2-fill::before{content:"\f49a"}.bi-mouse2::before{content:"\f49b"}.bi-mouse3-fill::before{content:"\f49c"}.bi-mouse3::before{content:"\f49d"}.bi-music-note-beamed::before{content:"\f49e"}.bi-music-note-list::before{content:"\f49f"}.bi-music-note::before{content:"\f4a0"}.bi-music-player-fill::before{content:"\f4a1"}.bi-music-player::before{content:"\f4a2"}.bi-newspaper::before{content:"\f4a3"}.bi-node-minus-fill::before{content:"\f4a4"}.bi-node-minus::before{content:"\f4a5"}.bi-node-plus-fill::before{content:"\f4a6"}.bi-node-plus::before{content:"\f4a7"}.bi-nut-fill::before{content:"\f4a8"}.bi-nut::before{content:"\f4a9"}.bi-octagon-fill::before{content:"\f4aa"}.bi-octagon-half::before{content:"\f4ab"}.bi-octagon::before{content:"\f4ac"}.bi-option::before{content:"\f4ad"}.bi-outlet::before{content:"\f4ae"}.bi-paint-bucket::before{content:"\f4af"}.bi-palette-fill::before{content:"\f4b0"}.bi-palette::before{content:"\f4b1"}.bi-palette2::before{content:"\f4b2"}.bi-paperclip::before{content:"\f4b3"}.bi-paragraph::before{content:"\f4b4"}.bi-patch-check-fill::before{content:"\f4b5"}.bi-patch-check::before{content:"\f4b6"}.bi-patch-exclamation-fill::before{content:"\f4b7"}.bi-patch-exclamation::before{content:"\f4b8"}.bi-patch-minus-fill::before{content:"\f4b9"}.bi-patch-minus::before{content:"\f4ba"}.bi-patch-plus-fill::before{content:"\f4bb"}.bi-patch-plus::before{content:"\f4bc"}.bi-patch-question-fill::before{content:"\f4bd"}.bi-patch-question::before{content:"\f4be"}.bi-pause-btn-fill::before{content:"\f4bf"}.bi-pause-btn::before{content:"\f4c0"}.bi-pause-circle-fill::before{content:"\f4c1"}.bi-pause-circle::before{content:"\f4c2"}.bi-pause-fill::before{content:"\f4c3"}.bi-pause::before{content:"\f4c4"}.bi-peace-fill::before{content:"\f4c5"}.bi-peace::before{content:"\f4c6"}.bi-pen-fill::before{content:"\f4c7"}.bi-pen::before{content:"\f4c8"}.bi-pencil-fill::before{content:"\f4c9"}.bi-pencil-square::before{content:"\f4ca"}.bi-pencil::before{content:"\f4cb"}.bi-pentagon-fill::before{content:"\f4cc"}.bi-pentagon-half::before{content:"\f4cd"}.bi-pentagon::before{content:"\f4ce"}.bi-people-fill::before{content:"\f4cf"}.bi-people::before{content:"\f4d0"}.bi-percent::before{content:"\f4d1"}.bi-person-badge-fill::before{content:"\f4d2"}.bi-person-badge::before{content:"\f4d3"}.bi-person-bounding-box::before{content:"\f4d4"}.bi-person-check-fill::before{content:"\f4d5"}.bi-person-check::before{content:"\f4d6"}.bi-person-circle::before{content:"\f4d7"}.bi-person-dash-fill::before{content:"\f4d8"}.bi-person-dash::before{content:"\f4d9"}.bi-person-fill::before{content:"\f4da"}.bi-person-lines-fill::before{content:"\f4db"}.bi-person-plus-fill::before{content:"\f4dc"}.bi-person-plus::before{content:"\f4dd"}.bi-person-square::before{content:"\f4de"}.bi-person-x-fill::before{content:"\f4df"}.bi-person-x::before{content:"\f4e0"}.bi-person::before{content:"\f4e1"}.bi-phone-fill::before{content:"\f4e2"}.bi-phone-landscape-fill::before{content:"\f4e3"}.bi-phone-landscape::before{content:"\f4e4"}.bi-phone-vibrate-fill::before{content:"\f4e5"}.bi-phone-vibrate::before{content:"\f4e6"}.bi-phone::before{content:"\f4e7"}.bi-pie-chart-fill::before{content:"\f4e8"}.bi-pie-chart::before{content:"\f4e9"}.bi-pin-angle-fill::before{content:"\f4ea"}.bi-pin-angle::before{content:"\f4eb"}.bi-pin-fill::before{content:"\f4ec"}.bi-pin::before{content:"\f4ed"}.bi-pip-fill::before{content:"\f4ee"}.bi-pip::before{content:"\f4ef"}.bi-play-btn-fill::before{content:"\f4f0"}.bi-play-btn::before{content:"\f4f1"}.bi-play-circle-fill::before{content:"\f4f2"}.bi-play-circle::before{content:"\f4f3"}.bi-play-fill::before{content:"\f4f4"}.bi-play::before{content:"\f4f5"}.bi-plug-fill::before{content:"\f4f6"}.bi-plug::before{content:"\f4f7"}.bi-plus-circle-dotted::before{content:"\f4f8"}.bi-plus-circle-fill::before{content:"\f4f9"}.bi-plus-circle::before{content:"\f4fa"}.bi-plus-square-dotted::before{content:"\f4fb"}.bi-plus-square-fill::before{content:"\f4fc"}.bi-plus-square::before{content:"\f4fd"}.bi-plus::before{content:"\f4fe"}.bi-power::before{content:"\f4ff"}.bi-printer-fill::before{content:"\f500"}.bi-printer::before{content:"\f501"}.bi-puzzle-fill::before{content:"\f502"}.bi-puzzle::before{content:"\f503"}.bi-question-circle-fill::before{content:"\f504"}.bi-question-circle::before{content:"\f505"}.bi-question-diamond-fill::before{content:"\f506"}.bi-question-diamond::before{content:"\f507"}.bi-question-octagon-fill::before{content:"\f508"}.bi-question-octagon::before{content:"\f509"}.bi-question-square-fill::before{content:"\f50a"}.bi-question-square::before{content:"\f50b"}.bi-question::before{content:"\f50c"}.bi-rainbow::before{content:"\f50d"}.bi-receipt-cutoff::before{content:"\f50e"}.bi-receipt::before{content:"\f50f"}.bi-reception-0::before{content:"\f510"}.bi-reception-1::before{content:"\f511"}.bi-reception-2::before{content:"\f512"}.bi-reception-3::before{content:"\f513"}.bi-reception-4::before{content:"\f514"}.bi-record-btn-fill::before{content:"\f515"}.bi-record-btn::before{content:"\f516"}.bi-record-circle-fill::before{content:"\f517"}.bi-record-circle::before{content:"\f518"}.bi-record-fill::before{content:"\f519"}.bi-record::before{content:"\f51a"}.bi-record2-fill::before{content:"\f51b"}.bi-record2::before{content:"\f51c"}.bi-reply-all-fill::before{content:"\f51d"}.bi-reply-all::before{content:"\f51e"}.bi-reply-fill::before{content:"\f51f"}.bi-reply::before{content:"\f520"}.bi-rss-fill::before{content:"\f521"}.bi-rss::before{content:"\f522"}.bi-rulers::before{content:"\f523"}.bi-save-fill::before{content:"\f524"}.bi-save::before{content:"\f525"}.bi-save2-fill::before{content:"\f526"}.bi-save2::before{content:"\f527"}.bi-scissors::before{content:"\f528"}.bi-screwdriver::before{content:"\f529"}.bi-search::before{content:"\f52a"}.bi-segmented-nav::before{content:"\f52b"}.bi-server::before{content:"\f52c"}.bi-share-fill::before{content:"\f52d"}.bi-share::before{content:"\f52e"}.bi-shield-check::before{content:"\f52f"}.bi-shield-exclamation::before{content:"\f530"}.bi-shield-fill-check::before{content:"\f531"}.bi-shield-fill-exclamation::before{content:"\f532"}.bi-shield-fill-minus::before{content:"\f533"}.bi-shield-fill-plus::before{content:"\f534"}.bi-shield-fill-x::before{content:"\f535"}.bi-shield-fill::before{content:"\f536"}.bi-shield-lock-fill::before{content:"\f537"}.bi-shield-lock::before{content:"\f538"}.bi-shield-minus::before{content:"\f539"}.bi-shield-plus::before{content:"\f53a"}.bi-shield-shaded::before{content:"\f53b"}.bi-shield-slash-fill::before{content:"\f53c"}.bi-shield-slash::before{content:"\f53d"}.bi-shield-x::before{content:"\f53e"}.bi-shield::before{content:"\f53f"}.bi-shift-fill::before{content:"\f540"}.bi-shift::before{content:"\f541"}.bi-shop-window::before{content:"\f542"}.bi-shop::before{content:"\f543"}.bi-shuffle::before{content:"\f544"}.bi-signpost-2-fill::before{content:"\f545"}.bi-signpost-2::before{content:"\f546"}.bi-signpost-fill::before{content:"\f547"}.bi-signpost-split-fill::before{content:"\f548"}.bi-signpost-split::before{content:"\f549"}.bi-signpost::before{content:"\f54a"}.bi-sim-fill::before{content:"\f54b"}.bi-sim::before{content:"\f54c"}.bi-skip-backward-btn-fill::before{content:"\f54d"}.bi-skip-backward-btn::before{content:"\f54e"}.bi-skip-backward-circle-fill::before{content:"\f54f"}.bi-skip-backward-circle::before{content:"\f550"}.bi-skip-backward-fill::before{content:"\f551"}.bi-skip-backward::before{content:"\f552"}.bi-skip-end-btn-fill::before{content:"\f553"}.bi-skip-end-btn::before{content:"\f554"}.bi-skip-end-circle-fill::before{content:"\f555"}.bi-skip-end-circle::before{content:"\f556"}.bi-skip-end-fill::before{content:"\f557"}.bi-skip-end::before{content:"\f558"}.bi-skip-forward-btn-fill::before{content:"\f559"}.bi-skip-forward-btn::before{content:"\f55a"}.bi-skip-forward-circle-fill::before{content:"\f55b"}.bi-skip-forward-circle::before{content:"\f55c"}.bi-skip-forward-fill::before{content:"\f55d"}.bi-skip-forward::before{content:"\f55e"}.bi-skip-start-btn-fill::before{content:"\f55f"}.bi-skip-start-btn::before{content:"\f560"}.bi-skip-start-circle-fill::before{content:"\f561"}.bi-skip-start-circle::before{content:"\f562"}.bi-skip-start-fill::before{content:"\f563"}.bi-skip-start::before{content:"\f564"}.bi-slack::before{content:"\f565"}.bi-slash-circle-fill::before{content:"\f566"}.bi-slash-circle::before{content:"\f567"}.bi-slash-square-fill::before{content:"\f568"}.bi-slash-square::before{content:"\f569"}.bi-slash::before{content:"\f56a"}.bi-sliders::before{content:"\f56b"}.bi-smartwatch::before{content:"\f56c"}.bi-snow::before{content:"\f56d"}.bi-snow2::before{content:"\f56e"}.bi-snow3::before{content:"\f56f"}.bi-sort-alpha-down-alt::before{content:"\f570"}.bi-sort-alpha-down::before{content:"\f571"}.bi-sort-alpha-up-alt::before{content:"\f572"}.bi-sort-alpha-up::before{content:"\f573"}.bi-sort-down-alt::before{content:"\f574"}.bi-sort-down::before{content:"\f575"}.bi-sort-numeric-down-alt::before{content:"\f576"}.bi-sort-numeric-down::before{content:"\f577"}.bi-sort-numeric-up-alt::before{content:"\f578"}.bi-sort-numeric-up::before{content:"\f579"}.bi-sort-up-alt::before{content:"\f57a"}.bi-sort-up::before{content:"\f57b"}.bi-soundwave::before{content:"\f57c"}.bi-speaker-fill::before{content:"\f57d"}.bi-speaker::before{content:"\f57e"}.bi-speedometer::before{content:"\f57f"}.bi-speedometer2::before{content:"\f580"}.bi-spellcheck::before{content:"\f581"}.bi-square-fill::before{content:"\f582"}.bi-square-half::before{content:"\f583"}.bi-square::before{content:"\f584"}.bi-stack::before{content:"\f585"}.bi-star-fill::before{content:"\f586"}.bi-star-half::before{content:"\f587"}.bi-star::before{content:"\f588"}.bi-stars::before{content:"\f589"}.bi-stickies-fill::before{content:"\f58a"}.bi-stickies::before{content:"\f58b"}.bi-sticky-fill::before{content:"\f58c"}.bi-sticky::before{content:"\f58d"}.bi-stop-btn-fill::before{content:"\f58e"}.bi-stop-btn::before{content:"\f58f"}.bi-stop-circle-fill::before{content:"\f590"}.bi-stop-circle::before{content:"\f591"}.bi-stop-fill::before{content:"\f592"}.bi-stop::before{content:"\f593"}.bi-stoplights-fill::before{content:"\f594"}.bi-stoplights::before{content:"\f595"}.bi-stopwatch-fill::before{content:"\f596"}.bi-stopwatch::before{content:"\f597"}.bi-subtract::before{content:"\f598"}.bi-suit-club-fill::before{content:"\f599"}.bi-suit-club::before{content:"\f59a"}.bi-suit-diamond-fill::before{content:"\f59b"}.bi-suit-diamond::before{content:"\f59c"}.bi-suit-heart-fill::before{content:"\f59d"}.bi-suit-heart::before{content:"\f59e"}.bi-suit-spade-fill::before{content:"\f59f"}.bi-suit-spade::before{content:"\f5a0"}.bi-sun-fill::before{content:"\f5a1"}.bi-sun::before{content:"\f5a2"}.bi-sunglasses::before{content:"\f5a3"}.bi-sunrise-fill::before{content:"\f5a4"}.bi-sunrise::before{content:"\f5a5"}.bi-sunset-fill::before{content:"\f5a6"}.bi-sunset::before{content:"\f5a7"}.bi-symmetry-horizontal::before{content:"\f5a8"}.bi-symmetry-vertical::before{content:"\f5a9"}.bi-table::before{content:"\f5aa"}.bi-tablet-fill::before{content:"\f5ab"}.bi-tablet-landscape-fill::before{content:"\f5ac"}.bi-tablet-landscape::before{content:"\f5ad"}.bi-tablet::before{content:"\f5ae"}.bi-tag-fill::before{content:"\f5af"}.bi-tag::before{content:"\f5b0"}.bi-tags-fill::before{content:"\f5b1"}.bi-tags::before{content:"\f5b2"}.bi-telegram::before{content:"\f5b3"}.bi-telephone-fill::before{content:"\f5b4"}.bi-telephone-forward-fill::before{content:"\f5b5"}.bi-telephone-forward::before{content:"\f5b6"}.bi-telephone-inbound-fill::before{content:"\f5b7"}.bi-telephone-inbound::before{content:"\f5b8"}.bi-telephone-minus-fill::before{content:"\f5b9"}.bi-telephone-minus::before{content:"\f5ba"}.bi-telephone-outbound-fill::before{content:"\f5bb"}.bi-telephone-outbound::before{content:"\f5bc"}.bi-telephone-plus-fill::before{content:"\f5bd"}.bi-telephone-plus::before{content:"\f5be"}.bi-telephone-x-fill::before{content:"\f5bf"}.bi-telephone-x::before{content:"\f5c0"}.bi-telephone::before{content:"\f5c1"}.bi-terminal-fill::before{content:"\f5c2"}.bi-terminal::before{content:"\f5c3"}.bi-text-center::before{content:"\f5c4"}.bi-text-indent-left::before{content:"\f5c5"}.bi-text-indent-right::before{content:"\f5c6"}.bi-text-left::before{content:"\f5c7"}.bi-text-paragraph::before{content:"\f5c8"}.bi-text-right::before{content:"\f5c9"}.bi-textarea-resize::before{content:"\f5ca"}.bi-textarea-t::before{content:"\f5cb"}.bi-textarea::before{content:"\f5cc"}.bi-thermometer-half::before{content:"\f5cd"}.bi-thermometer-high::before{content:"\f5ce"}.bi-thermometer-low::before{content:"\f5cf"}.bi-thermometer-snow::before{content:"\f5d0"}.bi-thermometer-sun::before{content:"\f5d1"}.bi-thermometer::before{content:"\f5d2"}.bi-three-dots-vertical::before{content:"\f5d3"}.bi-three-dots::before{content:"\f5d4"}.bi-toggle-off::before{content:"\f5d5"}.bi-toggle-on::before{content:"\f5d6"}.bi-toggle2-off::before{content:"\f5d7"}.bi-toggle2-on::before{content:"\f5d8"}.bi-toggles::before{content:"\f5d9"}.bi-toggles2::before{content:"\f5da"}.bi-tools::before{content:"\f5db"}.bi-tornado::before{content:"\f5dc"}.bi-trash-fill::before{content:"\f5dd"}.bi-trash::before{content:"\f5de"}.bi-trash2-fill::before{content:"\f5df"}.bi-trash2::before{content:"\f5e0"}.bi-tree-fill::before{content:"\f5e1"}.bi-tree::before{content:"\f5e2"}.bi-triangle-fill::before{content:"\f5e3"}.bi-triangle-half::before{content:"\f5e4"}.bi-triangle::before{content:"\f5e5"}.bi-trophy-fill::before{content:"\f5e6"}.bi-trophy::before{content:"\f5e7"}.bi-tropical-storm::before{content:"\f5e8"}.bi-truck-flatbed::before{content:"\f5e9"}.bi-truck::before{content:"\f5ea"}.bi-tsunami::before{content:"\f5eb"}.bi-tv-fill::before{content:"\f5ec"}.bi-tv::before{content:"\f5ed"}.bi-twitch::before{content:"\f5ee"}.bi-twitter::before{content:"\f5ef"}.bi-type-bold::before{content:"\f5f0"}.bi-type-h1::before{content:"\f5f1"}.bi-type-h2::before{content:"\f5f2"}.bi-type-h3::before{content:"\f5f3"}.bi-type-italic::before{content:"\f5f4"}.bi-type-strikethrough::before{content:"\f5f5"}.bi-type-underline::before{content:"\f5f6"}.bi-type::before{content:"\f5f7"}.bi-ui-checks-grid::before{content:"\f5f8"}.bi-ui-checks::before{content:"\f5f9"}.bi-ui-radios-grid::before{content:"\f5fa"}.bi-ui-radios::before{content:"\f5fb"}.bi-umbrella-fill::before{content:"\f5fc"}.bi-umbrella::before{content:"\f5fd"}.bi-union::before{content:"\f5fe"}.bi-unlock-fill::before{content:"\f5ff"}.bi-unlock::before{content:"\f600"}.bi-upc-scan::before{content:"\f601"}.bi-upc::before{content:"\f602"}.bi-upload::before{content:"\f603"}.bi-vector-pen::before{content:"\f604"}.bi-view-list::before{content:"\f605"}.bi-view-stacked::before{content:"\f606"}.bi-vinyl-fill::before{content:"\f607"}.bi-vinyl::before{content:"\f608"}.bi-voicemail::before{content:"\f609"}.bi-volume-down-fill::before{content:"\f60a"}.bi-volume-down::before{content:"\f60b"}.bi-volume-mute-fill::before{content:"\f60c"}.bi-volume-mute::before{content:"\f60d"}.bi-volume-off-fill::before{content:"\f60e"}.bi-volume-off::before{content:"\f60f"}.bi-volume-up-fill::before{content:"\f610"}.bi-volume-up::before{content:"\f611"}.bi-vr::before{content:"\f612"}.bi-wallet-fill::before{content:"\f613"}.bi-wallet::before{content:"\f614"}.bi-wallet2::before{content:"\f615"}.bi-watch::before{content:"\f616"}.bi-water::before{content:"\f617"}.bi-whatsapp::before{content:"\f618"}.bi-wifi-1::before{content:"\f619"}.bi-wifi-2::before{content:"\f61a"}.bi-wifi-off::before{content:"\f61b"}.bi-wifi::before{content:"\f61c"}.bi-wind::before{content:"\f61d"}.bi-window-dock::before{content:"\f61e"}.bi-window-sidebar::before{content:"\f61f"}.bi-window::before{content:"\f620"}.bi-wrench::before{content:"\f621"}.bi-x-circle-fill::before{content:"\f622"}.bi-x-circle::before{content:"\f623"}.bi-x-diamond-fill::before{content:"\f624"}.bi-x-diamond::before{content:"\f625"}.bi-x-octagon-fill::before{content:"\f626"}.bi-x-octagon::before{content:"\f627"}.bi-x-square-fill::before{content:"\f628"}.bi-x-square::before{content:"\f629"}.bi-x::before{content:"\f62a"}.bi-youtube::before{content:"\f62b"}.bi-zoom-in::before{content:"\f62c"}.bi-zoom-out::before{content:"\f62d"}.bi-bank::before{content:"\f62e"}.bi-bank2::before{content:"\f62f"}.bi-bell-slash-fill::before{content:"\f630"}.bi-bell-slash::before{content:"\f631"}.bi-cash-coin::before{content:"\f632"}.bi-check-lg::before{content:"\f633"}.bi-coin::before{content:"\f634"}.bi-currency-bitcoin::before{content:"\f635"}.bi-currency-dollar::before{content:"\f636"}.bi-currency-euro::before{content:"\f637"}.bi-currency-exchange::before{content:"\f638"}.bi-currency-pound::before{content:"\f639"}.bi-currency-yen::before{content:"\f63a"}.bi-dash-lg::before{content:"\f63b"}.bi-exclamation-lg::before{content:"\f63c"}.bi-file-earmark-pdf-fill::before{content:"\f63d"}.bi-file-earmark-pdf::before{content:"\f63e"}.bi-file-pdf-fill::before{content:"\f63f"}.bi-file-pdf::before{content:"\f640"}.bi-gender-ambiguous::before{content:"\f641"}.bi-gender-female::before{content:"\f642"}.bi-gender-male::before{content:"\f643"}.bi-gender-trans::before{content:"\f644"}.bi-headset-vr::before{content:"\f645"}.bi-info-lg::before{content:"\f646"}.bi-mastodon::before{content:"\f647"}.bi-messenger::before{content:"\f648"}.bi-piggy-bank-fill::before{content:"\f649"}.bi-piggy-bank::before{content:"\f64a"}.bi-pin-map-fill::before{content:"\f64b"}.bi-pin-map::before{content:"\f64c"}.bi-plus-lg::before{content:"\f64d"}.bi-question-lg::before{content:"\f64e"}.bi-recycle::before{content:"\f64f"}.bi-reddit::before{content:"\f650"}.bi-safe-fill::before{content:"\f651"}.bi-safe2-fill::before{content:"\f652"}.bi-safe2::before{content:"\f653"}.bi-sd-card-fill::before{content:"\f654"}.bi-sd-card::before{content:"\f655"}.bi-skype::before{content:"\f656"}.bi-slash-lg::before{content:"\f657"}.bi-translate::before{content:"\f658"}.bi-x-lg::before{content:"\f659"}.bi-safe::before{content:"\f65a"}.bi-apple::before{content:"\f65b"}.bi-microsoft::before{content:"\f65d"}.bi-windows::before{content:"\f65e"}.bi-behance::before{content:"\f65c"}.bi-dribbble::before{content:"\f65f"}.bi-line::before{content:"\f660"}.bi-medium::before{content:"\f661"}.bi-paypal::before{content:"\f662"}.bi-pinterest::before{content:"\f663"}.bi-signal::before{content:"\f664"}.bi-snapchat::before{content:"\f665"}.bi-spotify::before{content:"\f666"}.bi-stack-overflow::before{content:"\f667"}.bi-strava::before{content:"\f668"}.bi-wordpress::before{content:"\f669"}.bi-vimeo::before{content:"\f66a"}.bi-activity::before{content:"\f66b"}.bi-easel2-fill::before{content:"\f66c"}.bi-easel2::before{content:"\f66d"}.bi-easel3-fill::before{content:"\f66e"}.bi-easel3::before{content:"\f66f"}.bi-fan::before{content:"\f670"}.bi-fingerprint::before{content:"\f671"}.bi-graph-down-arrow::before{content:"\f672"}.bi-graph-up-arrow::before{content:"\f673"}.bi-hypnotize::before{content:"\f674"}.bi-magic::before{content:"\f675"}.bi-person-rolodex::before{content:"\f676"}.bi-person-video::before{content:"\f677"}.bi-person-video2::before{content:"\f678"}.bi-person-video3::before{content:"\f679"}.bi-person-workspace::before{content:"\f67a"}.bi-radioactive::before{content:"\f67b"}.bi-webcam-fill::before{content:"\f67c"}.bi-webcam::before{content:"\f67d"}.bi-yin-yang::before{content:"\f67e"}.bi-bandaid-fill::before{content:"\f680"}.bi-bandaid::before{content:"\f681"}.bi-bluetooth::before{content:"\f682"}.bi-body-text::before{content:"\f683"}.bi-boombox::before{content:"\f684"}.bi-boxes::before{content:"\f685"}.bi-dpad-fill::before{content:"\f686"}.bi-dpad::before{content:"\f687"}.bi-ear-fill::before{content:"\f688"}.bi-ear::before{content:"\f689"}.bi-envelope-check-fill::before{content:"\f68b"}.bi-envelope-check::before{content:"\f68c"}.bi-envelope-dash-fill::before{content:"\f68e"}.bi-envelope-dash::before{content:"\f68f"}.bi-envelope-exclamation-fill::before{content:"\f691"}.bi-envelope-exclamation::before{content:"\f692"}.bi-envelope-plus-fill::before{content:"\f693"}.bi-envelope-plus::before{content:"\f694"}.bi-envelope-slash-fill::before{content:"\f696"}.bi-envelope-slash::before{content:"\f697"}.bi-envelope-x-fill::before{content:"\f699"}.bi-envelope-x::before{content:"\f69a"}.bi-explicit-fill::before{content:"\f69b"}.bi-explicit::before{content:"\f69c"}.bi-git::before{content:"\f69d"}.bi-infinity::before{content:"\f69e"}.bi-list-columns-reverse::before{content:"\f69f"}.bi-list-columns::before{content:"\f6a0"}.bi-meta::before{content:"\f6a1"}.bi-nintendo-switch::before{content:"\f6a4"}.bi-pc-display-horizontal::before{content:"\f6a5"}.bi-pc-display::before{content:"\f6a6"}.bi-pc-horizontal::before{content:"\f6a7"}.bi-pc::before{content:"\f6a8"}.bi-playstation::before{content:"\f6a9"}.bi-plus-slash-minus::before{content:"\f6aa"}.bi-projector-fill::before{content:"\f6ab"}.bi-projector::before{content:"\f6ac"}.bi-qr-code-scan::before{content:"\f6ad"}.bi-qr-code::before{content:"\f6ae"}.bi-quora::before{content:"\f6af"}.bi-quote::before{content:"\f6b0"}.bi-robot::before{content:"\f6b1"}.bi-send-check-fill::before{content:"\f6b2"}.bi-send-check::before{content:"\f6b3"}.bi-send-dash-fill::before{content:"\f6b4"}.bi-send-dash::before{content:"\f6b5"}.bi-send-exclamation-fill::before{content:"\f6b7"}.bi-send-exclamation::before{content:"\f6b8"}.bi-send-fill::before{content:"\f6b9"}.bi-send-plus-fill::before{content:"\f6ba"}.bi-send-plus::before{content:"\f6bb"}.bi-send-slash-fill::before{content:"\f6bc"}.bi-send-slash::before{content:"\f6bd"}.bi-send-x-fill::before{content:"\f6be"}.bi-send-x::before{content:"\f6bf"}.bi-send::before{content:"\f6c0"}.bi-steam::before{content:"\f6c1"}.bi-terminal-dash::before{content:"\f6c3"}.bi-terminal-plus::before{content:"\f6c4"}.bi-terminal-split::before{content:"\f6c5"}.bi-ticket-detailed-fill::before{content:"\f6c6"}.bi-ticket-detailed::before{content:"\f6c7"}.bi-ticket-fill::before{content:"\f6c8"}.bi-ticket-perforated-fill::before{content:"\f6c9"}.bi-ticket-perforated::before{content:"\f6ca"}.bi-ticket::before{content:"\f6cb"}.bi-tiktok::before{content:"\f6cc"}.bi-window-dash::before{content:"\f6cd"}.bi-window-desktop::before{content:"\f6ce"}.bi-window-fullscreen::before{content:"\f6cf"}.bi-window-plus::before{content:"\f6d0"}.bi-window-split::before{content:"\f6d1"}.bi-window-stack::before{content:"\f6d2"}.bi-window-x::before{content:"\f6d3"}.bi-xbox::before{content:"\f6d4"}.bi-ethernet::before{content:"\f6d5"}.bi-hdmi-fill::before{content:"\f6d6"}.bi-hdmi::before{content:"\f6d7"}.bi-usb-c-fill::before{content:"\f6d8"}.bi-usb-c::before{content:"\f6d9"}.bi-usb-fill::before{content:"\f6da"}.bi-usb-plug-fill::before{content:"\f6db"}.bi-usb-plug::before{content:"\f6dc"}.bi-usb-symbol::before{content:"\f6dd"}.bi-usb::before{content:"\f6de"}.bi-boombox-fill::before{content:"\f6df"}.bi-displayport::before{content:"\f6e1"}.bi-gpu-card::before{content:"\f6e2"}.bi-memory::before{content:"\f6e3"}.bi-modem-fill::before{content:"\f6e4"}.bi-modem::before{content:"\f6e5"}.bi-motherboard-fill::before{content:"\f6e6"}.bi-motherboard::before{content:"\f6e7"}.bi-optical-audio-fill::before{content:"\f6e8"}.bi-optical-audio::before{content:"\f6e9"}.bi-pci-card::before{content:"\f6ea"}.bi-router-fill::before{content:"\f6eb"}.bi-router::before{content:"\f6ec"}.bi-thunderbolt-fill::before{content:"\f6ef"}.bi-thunderbolt::before{content:"\f6f0"}.bi-usb-drive-fill::before{content:"\f6f1"}.bi-usb-drive::before{content:"\f6f2"}.bi-usb-micro-fill::before{content:"\f6f3"}.bi-usb-micro::before{content:"\f6f4"}.bi-usb-mini-fill::before{content:"\f6f5"}.bi-usb-mini::before{content:"\f6f6"}.bi-cloud-haze2::before{content:"\f6f7"}.bi-device-hdd-fill::before{content:"\f6f8"}.bi-device-hdd::before{content:"\f6f9"}.bi-device-ssd-fill::before{content:"\f6fa"}.bi-device-ssd::before{content:"\f6fb"}.bi-displayport-fill::before{content:"\f6fc"}.bi-mortarboard-fill::before{content:"\f6fd"}.bi-mortarboard::before{content:"\f6fe"}.bi-terminal-x::before{content:"\f6ff"}.bi-arrow-through-heart-fill::before{content:"\f700"}.bi-arrow-through-heart::before{content:"\f701"}.bi-badge-sd-fill::before{content:"\f702"}.bi-badge-sd::before{content:"\f703"}.bi-bag-heart-fill::before{content:"\f704"}.bi-bag-heart::before{content:"\f705"}.bi-balloon-fill::before{content:"\f706"}.bi-balloon-heart-fill::before{content:"\f707"}.bi-balloon-heart::before{content:"\f708"}.bi-balloon::before{content:"\f709"}.bi-box2-fill::before{content:"\f70a"}.bi-box2-heart-fill::before{content:"\f70b"}.bi-box2-heart::before{content:"\f70c"}.bi-box2::before{content:"\f70d"}.bi-braces-asterisk::before{content:"\f70e"}.bi-calendar-heart-fill::before{content:"\f70f"}.bi-calendar-heart::before{content:"\f710"}.bi-calendar2-heart-fill::before{content:"\f711"}.bi-calendar2-heart::before{content:"\f712"}.bi-chat-heart-fill::before{content:"\f713"}.bi-chat-heart::before{content:"\f714"}.bi-chat-left-heart-fill::before{content:"\f715"}.bi-chat-left-heart::before{content:"\f716"}.bi-chat-right-heart-fill::before{content:"\f717"}.bi-chat-right-heart::before{content:"\f718"}.bi-chat-square-heart-fill::before{content:"\f719"}.bi-chat-square-heart::before{content:"\f71a"}.bi-clipboard-check-fill::before{content:"\f71b"}.bi-clipboard-data-fill::before{content:"\f71c"}.bi-clipboard-fill::before{content:"\f71d"}.bi-clipboard-heart-fill::before{content:"\f71e"}.bi-clipboard-heart::before{content:"\f71f"}.bi-clipboard-minus-fill::before{content:"\f720"}.bi-clipboard-plus-fill::before{content:"\f721"}.bi-clipboard-pulse::before{content:"\f722"}.bi-clipboard-x-fill::before{content:"\f723"}.bi-clipboard2-check-fill::before{content:"\f724"}.bi-clipboard2-check::before{content:"\f725"}.bi-clipboard2-data-fill::before{content:"\f726"}.bi-clipboard2-data::before{content:"\f727"}.bi-clipboard2-fill::before{content:"\f728"}.bi-clipboard2-heart-fill::before{content:"\f729"}.bi-clipboard2-heart::before{content:"\f72a"}.bi-clipboard2-minus-fill::before{content:"\f72b"}.bi-clipboard2-minus::before{content:"\f72c"}.bi-clipboard2-plus-fill::before{content:"\f72d"}.bi-clipboard2-plus::before{content:"\f72e"}.bi-clipboard2-pulse-fill::before{content:"\f72f"}.bi-clipboard2-pulse::before{content:"\f730"}.bi-clipboard2-x-fill::before{content:"\f731"}.bi-clipboard2-x::before{content:"\f732"}.bi-clipboard2::before{content:"\f733"}.bi-emoji-kiss-fill::before{content:"\f734"}.bi-emoji-kiss::before{content:"\f735"}.bi-envelope-heart-fill::before{content:"\f736"}.bi-envelope-heart::before{content:"\f737"}.bi-envelope-open-heart-fill::before{content:"\f738"}.bi-envelope-open-heart::before{content:"\f739"}.bi-envelope-paper-fill::before{content:"\f73a"}.bi-envelope-paper-heart-fill::before{content:"\f73b"}.bi-envelope-paper-heart::before{content:"\f73c"}.bi-envelope-paper::before{content:"\f73d"}.bi-filetype-aac::before{content:"\f73e"}.bi-filetype-ai::before{content:"\f73f"}.bi-filetype-bmp::before{content:"\f740"}.bi-filetype-cs::before{content:"\f741"}.bi-filetype-css::before{content:"\f742"}.bi-filetype-csv::before{content:"\f743"}.bi-filetype-doc::before{content:"\f744"}.bi-filetype-docx::before{content:"\f745"}.bi-filetype-exe::before{content:"\f746"}.bi-filetype-gif::before{content:"\f747"}.bi-filetype-heic::before{content:"\f748"}.bi-filetype-html::before{content:"\f749"}.bi-filetype-java::before{content:"\f74a"}.bi-filetype-jpg::before{content:"\f74b"}.bi-filetype-js::before{content:"\f74c"}.bi-filetype-jsx::before{content:"\f74d"}.bi-filetype-key::before{content:"\f74e"}.bi-filetype-m4p::before{content:"\f74f"}.bi-filetype-md::before{content:"\f750"}.bi-filetype-mdx::before{content:"\f751"}.bi-filetype-mov::before{content:"\f752"}.bi-filetype-mp3::before{content:"\f753"}.bi-filetype-mp4::before{content:"\f754"}.bi-filetype-otf::before{content:"\f755"}.bi-filetype-pdf::before{content:"\f756"}.bi-filetype-php::before{content:"\f757"}.bi-filetype-png::before{content:"\f758"}.bi-filetype-ppt::before{content:"\f75a"}.bi-filetype-psd::before{content:"\f75b"}.bi-filetype-py::before{content:"\f75c"}.bi-filetype-raw::before{content:"\f75d"}.bi-filetype-rb::before{content:"\f75e"}.bi-filetype-sass::before{content:"\f75f"}.bi-filetype-scss::before{content:"\f760"}.bi-filetype-sh::before{content:"\f761"}.bi-filetype-svg::before{content:"\f762"}.bi-filetype-tiff::before{content:"\f763"}.bi-filetype-tsx::before{content:"\f764"}.bi-filetype-ttf::before{content:"\f765"}.bi-filetype-txt::before{content:"\f766"}.bi-filetype-wav::before{content:"\f767"}.bi-filetype-woff::before{content:"\f768"}.bi-filetype-xls::before{content:"\f76a"}.bi-filetype-xml::before{content:"\f76b"}.bi-filetype-yml::before{content:"\f76c"}.bi-heart-arrow::before{content:"\f76d"}.bi-heart-pulse-fill::before{content:"\f76e"}.bi-heart-pulse::before{content:"\f76f"}.bi-heartbreak-fill::before{content:"\f770"}.bi-heartbreak::before{content:"\f771"}.bi-hearts::before{content:"\f772"}.bi-hospital-fill::before{content:"\f773"}.bi-hospital::before{content:"\f774"}.bi-house-heart-fill::before{content:"\f775"}.bi-house-heart::before{content:"\f776"}.bi-incognito::before{content:"\f777"}.bi-magnet-fill::before{content:"\f778"}.bi-magnet::before{content:"\f779"}.bi-person-heart::before{content:"\f77a"}.bi-person-hearts::before{content:"\f77b"}.bi-phone-flip::before{content:"\f77c"}.bi-plugin::before{content:"\f77d"}.bi-postage-fill::before{content:"\f77e"}.bi-postage-heart-fill::before{content:"\f77f"}.bi-postage-heart::before{content:"\f780"}.bi-postage::before{content:"\f781"}.bi-postcard-fill::before{content:"\f782"}.bi-postcard-heart-fill::before{content:"\f783"}.bi-postcard-heart::before{content:"\f784"}.bi-postcard::before{content:"\f785"}.bi-search-heart-fill::before{content:"\f786"}.bi-search-heart::before{content:"\f787"}.bi-sliders2-vertical::before{content:"\f788"}.bi-sliders2::before{content:"\f789"}.bi-trash3-fill::before{content:"\f78a"}.bi-trash3::before{content:"\f78b"}.bi-valentine::before{content:"\f78c"}.bi-valentine2::before{content:"\f78d"}.bi-wrench-adjustable-circle-fill::before{content:"\f78e"}.bi-wrench-adjustable-circle::before{content:"\f78f"}.bi-wrench-adjustable::before{content:"\f790"}.bi-filetype-json::before{content:"\f791"}.bi-filetype-pptx::before{content:"\f792"}.bi-filetype-xlsx::before{content:"\f793"}.bi-1-circle-fill::before{content:"\f796"}.bi-1-circle::before{content:"\f797"}.bi-1-square-fill::before{content:"\f798"}.bi-1-square::before{content:"\f799"}.bi-2-circle-fill::before{content:"\f79c"}.bi-2-circle::before{content:"\f79d"}.bi-2-square-fill::before{content:"\f79e"}.bi-2-square::before{content:"\f79f"}.bi-3-circle-fill::before{content:"\f7a2"}.bi-3-circle::before{content:"\f7a3"}.bi-3-square-fill::before{content:"\f7a4"}.bi-3-square::before{content:"\f7a5"}.bi-4-circle-fill::before{content:"\f7a8"}.bi-4-circle::before{content:"\f7a9"}.bi-4-square-fill::before{content:"\f7aa"}.bi-4-square::before{content:"\f7ab"}.bi-5-circle-fill::before{content:"\f7ae"}.bi-5-circle::before{content:"\f7af"}.bi-5-square-fill::before{content:"\f7b0"}.bi-5-square::before{content:"\f7b1"}.bi-6-circle-fill::before{content:"\f7b4"}.bi-6-circle::before{content:"\f7b5"}.bi-6-square-fill::before{content:"\f7b6"}.bi-6-square::before{content:"\f7b7"}.bi-7-circle-fill::before{content:"\f7ba"}.bi-7-circle::before{content:"\f7bb"}.bi-7-square-fill::before{content:"\f7bc"}.bi-7-square::before{content:"\f7bd"}.bi-8-circle-fill::before{content:"\f7c0"}.bi-8-circle::before{content:"\f7c1"}.bi-8-square-fill::before{content:"\f7c2"}.bi-8-square::before{content:"\f7c3"}.bi-9-circle-fill::before{content:"\f7c6"}.bi-9-circle::before{content:"\f7c7"}.bi-9-square-fill::before{content:"\f7c8"}.bi-9-square::before{content:"\f7c9"}.bi-airplane-engines-fill::before{content:"\f7ca"}.bi-airplane-engines::before{content:"\f7cb"}.bi-airplane-fill::before{content:"\f7cc"}.bi-airplane::before{content:"\f7cd"}.bi-alexa::before{content:"\f7ce"}.bi-alipay::before{content:"\f7cf"}.bi-android::before{content:"\f7d0"}.bi-android2::before{content:"\f7d1"}.bi-box-fill::before{content:"\f7d2"}.bi-box-seam-fill::before{content:"\f7d3"}.bi-browser-chrome::before{content:"\f7d4"}.bi-browser-edge::before{content:"\f7d5"}.bi-browser-firefox::before{content:"\f7d6"}.bi-browser-safari::before{content:"\f7d7"}.bi-c-circle-fill::before{content:"\f7da"}.bi-c-circle::before{content:"\f7db"}.bi-c-square-fill::before{content:"\f7dc"}.bi-c-square::before{content:"\f7dd"}.bi-capsule-pill::before{content:"\f7de"}.bi-capsule::before{content:"\f7df"}.bi-car-front-fill::before{content:"\f7e0"}.bi-car-front::before{content:"\f7e1"}.bi-cassette-fill::before{content:"\f7e2"}.bi-cassette::before{content:"\f7e3"}.bi-cc-circle-fill::before{content:"\f7e6"}.bi-cc-circle::before{content:"\f7e7"}.bi-cc-square-fill::before{content:"\f7e8"}.bi-cc-square::before{content:"\f7e9"}.bi-cup-hot-fill::before{content:"\f7ea"}.bi-cup-hot::before{content:"\f7eb"}.bi-currency-rupee::before{content:"\f7ec"}.bi-dropbox::before{content:"\f7ed"}.bi-escape::before{content:"\f7ee"}.bi-fast-forward-btn-fill::before{content:"\f7ef"}.bi-fast-forward-btn::before{content:"\f7f0"}.bi-fast-forward-circle-fill::before{content:"\f7f1"}.bi-fast-forward-circle::before{content:"\f7f2"}.bi-fast-forward-fill::before{content:"\f7f3"}.bi-fast-forward::before{content:"\f7f4"}.bi-filetype-sql::before{content:"\f7f5"}.bi-fire::before{content:"\f7f6"}.bi-google-play::before{content:"\f7f7"}.bi-h-circle-fill::before{content:"\f7fa"}.bi-h-circle::before{content:"\f7fb"}.bi-h-square-fill::before{content:"\f7fc"}.bi-h-square::before{content:"\f7fd"}.bi-indent::before{content:"\f7fe"}.bi-lungs-fill::before{content:"\f7ff"}.bi-lungs::before{content:"\f800"}.bi-microsoft-teams::before{content:"\f801"}.bi-p-circle-fill::before{content:"\f804"}.bi-p-circle::before{content:"\f805"}.bi-p-square-fill::before{content:"\f806"}.bi-p-square::before{content:"\f807"}.bi-pass-fill::before{content:"\f808"}.bi-pass::before{content:"\f809"}.bi-prescription::before{content:"\f80a"}.bi-prescription2::before{content:"\f80b"}.bi-r-circle-fill::before{content:"\f80e"}.bi-r-circle::before{content:"\f80f"}.bi-r-square-fill::before{content:"\f810"}.bi-r-square::before{content:"\f811"}.bi-repeat-1::before{content:"\f812"}.bi-repeat::before{content:"\f813"}.bi-rewind-btn-fill::before{content:"\f814"}.bi-rewind-btn::before{content:"\f815"}.bi-rewind-circle-fill::before{content:"\f816"}.bi-rewind-circle::before{content:"\f817"}.bi-rewind-fill::before{content:"\f818"}.bi-rewind::before{content:"\f819"}.bi-train-freight-front-fill::before{content:"\f81a"}.bi-train-freight-front::before{content:"\f81b"}.bi-train-front-fill::before{content:"\f81c"}.bi-train-front::before{content:"\f81d"}.bi-train-lightrail-front-fill::before{content:"\f81e"}.bi-train-lightrail-front::before{content:"\f81f"}.bi-truck-front-fill::before{content:"\f820"}.bi-truck-front::before{content:"\f821"}.bi-ubuntu::before{content:"\f822"}.bi-unindent::before{content:"\f823"}.bi-unity::before{content:"\f824"}.bi-universal-access-circle::before{content:"\f825"}.bi-universal-access::before{content:"\f826"}.bi-virus::before{content:"\f827"}.bi-virus2::before{content:"\f828"}.bi-wechat::before{content:"\f829"}.bi-yelp::before{content:"\f82a"}.bi-sign-stop-fill::before{content:"\f82b"}.bi-sign-stop-lights-fill::before{content:"\f82c"}.bi-sign-stop-lights::before{content:"\f82d"}.bi-sign-stop::before{content:"\f82e"}.bi-sign-turn-left-fill::before{content:"\f82f"}.bi-sign-turn-left::before{content:"\f830"}.bi-sign-turn-right-fill::before{content:"\f831"}.bi-sign-turn-right::before{content:"\f832"}.bi-sign-turn-slight-left-fill::before{content:"\f833"}.bi-sign-turn-slight-left::before{content:"\f834"}.bi-sign-turn-slight-right-fill::before{content:"\f835"}.bi-sign-turn-slight-right::before{content:"\f836"}.bi-sign-yield-fill::before{content:"\f837"}.bi-sign-yield::before{content:"\f838"}.bi-ev-station-fill::before{content:"\f839"}.bi-ev-station::before{content:"\f83a"}.bi-fuel-pump-diesel-fill::before{content:"\f83b"}.bi-fuel-pump-diesel::before{content:"\f83c"}.bi-fuel-pump-fill::before{content:"\f83d"}.bi-fuel-pump::before{content:"\f83e"}.bi-0-circle-fill::before{content:"\f83f"}.bi-0-circle::before{content:"\f840"}.bi-0-square-fill::before{content:"\f841"}.bi-0-square::before{content:"\f842"}.bi-rocket-fill::before{content:"\f843"}.bi-rocket-takeoff-fill::before{content:"\f844"}.bi-rocket-takeoff::before{content:"\f845"}.bi-rocket::before{content:"\f846"}.bi-stripe::before{content:"\f847"}.bi-subscript::before{content:"\f848"}.bi-superscript::before{content:"\f849"}.bi-trello::before{content:"\f84a"}.bi-envelope-at-fill::before{content:"\f84b"}.bi-envelope-at::before{content:"\f84c"}.bi-regex::before{content:"\f84d"}.bi-text-wrap::before{content:"\f84e"}.bi-sign-dead-end-fill::before{content:"\f84f"}.bi-sign-dead-end::before{content:"\f850"}.bi-sign-do-not-enter-fill::before{content:"\f851"}.bi-sign-do-not-enter::before{content:"\f852"}.bi-sign-intersection-fill::before{content:"\f853"}.bi-sign-intersection-side-fill::before{content:"\f854"}.bi-sign-intersection-side::before{content:"\f855"}.bi-sign-intersection-t-fill::before{content:"\f856"}.bi-sign-intersection-t::before{content:"\f857"}.bi-sign-intersection-y-fill::before{content:"\f858"}.bi-sign-intersection-y::before{content:"\f859"}.bi-sign-intersection::before{content:"\f85a"}.bi-sign-merge-left-fill::before{content:"\f85b"}.bi-sign-merge-left::before{content:"\f85c"}.bi-sign-merge-right-fill::before{content:"\f85d"}.bi-sign-merge-right::before{content:"\f85e"}.bi-sign-no-left-turn-fill::before{content:"\f85f"}.bi-sign-no-left-turn::before{content:"\f860"}.bi-sign-no-parking-fill::before{content:"\f861"}.bi-sign-no-parking::before{content:"\f862"}.bi-sign-no-right-turn-fill::before{content:"\f863"}.bi-sign-no-right-turn::before{content:"\f864"}.bi-sign-railroad-fill::before{content:"\f865"}.bi-sign-railroad::before{content:"\f866"}.bi-building-add::before{content:"\f867"}.bi-building-check::before{content:"\f868"}.bi-building-dash::before{content:"\f869"}.bi-building-down::before{content:"\f86a"}.bi-building-exclamation::before{content:"\f86b"}.bi-building-fill-add::before{content:"\f86c"}.bi-building-fill-check::before{content:"\f86d"}.bi-building-fill-dash::before{content:"\f86e"}.bi-building-fill-down::before{content:"\f86f"}.bi-building-fill-exclamation::before{content:"\f870"}.bi-building-fill-gear::before{content:"\f871"}.bi-building-fill-lock::before{content:"\f872"}.bi-building-fill-slash::before{content:"\f873"}.bi-building-fill-up::before{content:"\f874"}.bi-building-fill-x::before{content:"\f875"}.bi-building-fill::before{content:"\f876"}.bi-building-gear::before{content:"\f877"}.bi-building-lock::before{content:"\f878"}.bi-building-slash::before{content:"\f879"}.bi-building-up::before{content:"\f87a"}.bi-building-x::before{content:"\f87b"}.bi-buildings-fill::before{content:"\f87c"}.bi-buildings::before{content:"\f87d"}.bi-bus-front-fill::before{content:"\f87e"}.bi-bus-front::before{content:"\f87f"}.bi-ev-front-fill::before{content:"\f880"}.bi-ev-front::before{content:"\f881"}.bi-globe-americas::before{content:"\f882"}.bi-globe-asia-australia::before{content:"\f883"}.bi-globe-central-south-asia::before{content:"\f884"}.bi-globe-europe-africa::before{content:"\f885"}.bi-house-add-fill::before{content:"\f886"}.bi-house-add::before{content:"\f887"}.bi-house-check-fill::before{content:"\f888"}.bi-house-check::before{content:"\f889"}.bi-house-dash-fill::before{content:"\f88a"}.bi-house-dash::before{content:"\f88b"}.bi-house-down-fill::before{content:"\f88c"}.bi-house-down::before{content:"\f88d"}.bi-house-exclamation-fill::before{content:"\f88e"}.bi-house-exclamation::before{content:"\f88f"}.bi-house-gear-fill::before{content:"\f890"}.bi-house-gear::before{content:"\f891"}.bi-house-lock-fill::before{content:"\f892"}.bi-house-lock::before{content:"\f893"}.bi-house-slash-fill::before{content:"\f894"}.bi-house-slash::before{content:"\f895"}.bi-house-up-fill::before{content:"\f896"}.bi-house-up::before{content:"\f897"}.bi-house-x-fill::before{content:"\f898"}.bi-house-x::before{content:"\f899"}.bi-person-add::before{content:"\f89a"}.bi-person-down::before{content:"\f89b"}.bi-person-exclamation::before{content:"\f89c"}.bi-person-fill-add::before{content:"\f89d"}.bi-person-fill-check::before{content:"\f89e"}.bi-person-fill-dash::before{content:"\f89f"}.bi-person-fill-down::before{content:"\f8a0"}.bi-person-fill-exclamation::before{content:"\f8a1"}.bi-person-fill-gear::before{content:"\f8a2"}.bi-person-fill-lock::before{content:"\f8a3"}.bi-person-fill-slash::before{content:"\f8a4"}.bi-person-fill-up::before{content:"\f8a5"}.bi-person-fill-x::before{content:"\f8a6"}.bi-person-gear::before{content:"\f8a7"}.bi-person-lock::before{content:"\f8a8"}.bi-person-slash::before{content:"\f8a9"}.bi-person-up::before{content:"\f8aa"}.bi-scooter::before{content:"\f8ab"}.bi-taxi-front-fill::before{content:"\f8ac"}.bi-taxi-front::before{content:"\f8ad"}.bi-amd::before{content:"\f8ae"}.bi-database-add::before{content:"\f8af"}.bi-database-check::before{content:"\f8b0"}.bi-database-dash::before{content:"\f8b1"}.bi-database-down::before{content:"\f8b2"}.bi-database-exclamation::before{content:"\f8b3"}.bi-database-fill-add::before{content:"\f8b4"}.bi-database-fill-check::before{content:"\f8b5"}.bi-database-fill-dash::before{content:"\f8b6"}.bi-database-fill-down::before{content:"\f8b7"}.bi-database-fill-exclamation::before{content:"\f8b8"}.bi-database-fill-gear::before{content:"\f8b9"}.bi-database-fill-lock::before{content:"\f8ba"}.bi-database-fill-slash::before{content:"\f8bb"}.bi-database-fill-up::before{content:"\f8bc"}.bi-database-fill-x::before{content:"\f8bd"}.bi-database-fill::before{content:"\f8be"}.bi-database-gear::before{content:"\f8bf"}.bi-database-lock::before{content:"\f8c0"}.bi-database-slash::before{content:"\f8c1"}.bi-database-up::before{content:"\f8c2"}.bi-database-x::before{content:"\f8c3"}.bi-database::before{content:"\f8c4"}.bi-houses-fill::before{content:"\f8c5"}.bi-houses::before{content:"\f8c6"}.bi-nvidia::before{content:"\f8c7"}.bi-person-vcard-fill::before{content:"\f8c8"}.bi-person-vcard::before{content:"\f8c9"}.bi-sina-weibo::before{content:"\f8ca"}.bi-tencent-qq::before{content:"\f8cb"}.bi-wikipedia::before{content:"\f8cc"} \ No newline at end of file diff --git a/src/mono/sample/wasm/blazor-frame/wwwroot/css/bootstrap-icons/bootstrap-icons.scss b/src/mono/sample/wasm/blazor-frame/wwwroot/css/bootstrap-icons/bootstrap-icons.scss new file mode 100644 index 00000000000000..5ebd3b0673fd72 --- /dev/null +++ b/src/mono/sample/wasm/blazor-frame/wwwroot/css/bootstrap-icons/bootstrap-icons.scss @@ -0,0 +1,1993 @@ +/*! + * Bootstrap Icons v1.10.5 (https://icons.getbootstrap.com/) + * Copyright 2019-2023 The Bootstrap Authors + * Licensed under MIT (https://github.com/twbs/icons/blob/main/LICENSE) + */ + +$bootstrap-icons-font: "bootstrap-icons" !default; +$bootstrap-icons-font-dir: "./fonts" !default; +$bootstrap-icons-font-file: "#{$bootstrap-icons-font-dir}/#{$bootstrap-icons-font}" !default; +$bootstrap-icons-font-hash: "24e3eb84d0bcaf83d77f904c78ac1f47" !default; +$bootstrap-icons-font-src: url("#{$bootstrap-icons-font-file}.woff2?#{$bootstrap-icons-font-hash}") format("woff2"), + url("#{$bootstrap-icons-font-file}.woff?#{$bootstrap-icons-font-hash}") format("woff") !default; + +@font-face { + font-display: block; + font-family: $bootstrap-icons-font; + src: $bootstrap-icons-font-src; +} + +.bi::before, +[class^="bi-"]::before, +[class*=" bi-"]::before { + display: inline-block; + font-family: $bootstrap-icons-font !important; + font-style: normal; + font-weight: normal !important; + font-variant: normal; + text-transform: none; + line-height: 1; + vertical-align: -.125em; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +$bootstrap-icons-map: ( + "123": "\f67f", + "alarm-fill": "\f101", + "alarm": "\f102", + "align-bottom": "\f103", + "align-center": "\f104", + "align-end": "\f105", + "align-middle": "\f106", + "align-start": "\f107", + "align-top": "\f108", + "alt": "\f109", + "app-indicator": "\f10a", + "app": "\f10b", + "archive-fill": "\f10c", + "archive": "\f10d", + "arrow-90deg-down": "\f10e", + "arrow-90deg-left": "\f10f", + "arrow-90deg-right": "\f110", + "arrow-90deg-up": "\f111", + "arrow-bar-down": "\f112", + "arrow-bar-left": "\f113", + "arrow-bar-right": "\f114", + "arrow-bar-up": "\f115", + "arrow-clockwise": "\f116", + "arrow-counterclockwise": "\f117", + "arrow-down-circle-fill": "\f118", + "arrow-down-circle": "\f119", + "arrow-down-left-circle-fill": "\f11a", + "arrow-down-left-circle": "\f11b", + "arrow-down-left-square-fill": "\f11c", + "arrow-down-left-square": "\f11d", + "arrow-down-left": "\f11e", + "arrow-down-right-circle-fill": "\f11f", + "arrow-down-right-circle": "\f120", + "arrow-down-right-square-fill": "\f121", + "arrow-down-right-square": "\f122", + "arrow-down-right": "\f123", + "arrow-down-short": "\f124", + "arrow-down-square-fill": "\f125", + "arrow-down-square": "\f126", + "arrow-down-up": "\f127", + "arrow-down": "\f128", + "arrow-left-circle-fill": "\f129", + "arrow-left-circle": "\f12a", + "arrow-left-right": "\f12b", + "arrow-left-short": "\f12c", + "arrow-left-square-fill": "\f12d", + "arrow-left-square": "\f12e", + "arrow-left": "\f12f", + "arrow-repeat": "\f130", + "arrow-return-left": "\f131", + "arrow-return-right": "\f132", + "arrow-right-circle-fill": "\f133", + "arrow-right-circle": "\f134", + "arrow-right-short": "\f135", + "arrow-right-square-fill": "\f136", + "arrow-right-square": "\f137", + "arrow-right": "\f138", + "arrow-up-circle-fill": "\f139", + "arrow-up-circle": "\f13a", + "arrow-up-left-circle-fill": "\f13b", + "arrow-up-left-circle": "\f13c", + "arrow-up-left-square-fill": "\f13d", + "arrow-up-left-square": "\f13e", + "arrow-up-left": "\f13f", + "arrow-up-right-circle-fill": "\f140", + "arrow-up-right-circle": "\f141", + "arrow-up-right-square-fill": "\f142", + "arrow-up-right-square": "\f143", + "arrow-up-right": "\f144", + "arrow-up-short": "\f145", + "arrow-up-square-fill": "\f146", + "arrow-up-square": "\f147", + "arrow-up": "\f148", + "arrows-angle-contract": "\f149", + "arrows-angle-expand": "\f14a", + "arrows-collapse": "\f14b", + "arrows-expand": "\f14c", + "arrows-fullscreen": "\f14d", + "arrows-move": "\f14e", + "aspect-ratio-fill": "\f14f", + "aspect-ratio": "\f150", + "asterisk": "\f151", + "at": "\f152", + "award-fill": "\f153", + "award": "\f154", + "back": "\f155", + "backspace-fill": "\f156", + "backspace-reverse-fill": "\f157", + "backspace-reverse": "\f158", + "backspace": "\f159", + "badge-3d-fill": "\f15a", + "badge-3d": "\f15b", + "badge-4k-fill": "\f15c", + "badge-4k": "\f15d", + "badge-8k-fill": "\f15e", + "badge-8k": "\f15f", + "badge-ad-fill": "\f160", + "badge-ad": "\f161", + "badge-ar-fill": "\f162", + "badge-ar": "\f163", + "badge-cc-fill": "\f164", + "badge-cc": "\f165", + "badge-hd-fill": "\f166", + "badge-hd": "\f167", + "badge-tm-fill": "\f168", + "badge-tm": "\f169", + "badge-vo-fill": "\f16a", + "badge-vo": "\f16b", + "badge-vr-fill": "\f16c", + "badge-vr": "\f16d", + "badge-wc-fill": "\f16e", + "badge-wc": "\f16f", + "bag-check-fill": "\f170", + "bag-check": "\f171", + "bag-dash-fill": "\f172", + "bag-dash": "\f173", + "bag-fill": "\f174", + "bag-plus-fill": "\f175", + "bag-plus": "\f176", + "bag-x-fill": "\f177", + "bag-x": "\f178", + "bag": "\f179", + "bar-chart-fill": "\f17a", + "bar-chart-line-fill": "\f17b", + "bar-chart-line": "\f17c", + "bar-chart-steps": "\f17d", + "bar-chart": "\f17e", + "basket-fill": "\f17f", + "basket": "\f180", + "basket2-fill": "\f181", + "basket2": "\f182", + "basket3-fill": "\f183", + "basket3": "\f184", + "battery-charging": "\f185", + "battery-full": "\f186", + "battery-half": "\f187", + "battery": "\f188", + "bell-fill": "\f189", + "bell": "\f18a", + "bezier": "\f18b", + "bezier2": "\f18c", + "bicycle": "\f18d", + "binoculars-fill": "\f18e", + "binoculars": "\f18f", + "blockquote-left": "\f190", + "blockquote-right": "\f191", + "book-fill": "\f192", + "book-half": "\f193", + "book": "\f194", + "bookmark-check-fill": "\f195", + "bookmark-check": "\f196", + "bookmark-dash-fill": "\f197", + "bookmark-dash": "\f198", + "bookmark-fill": "\f199", + "bookmark-heart-fill": "\f19a", + "bookmark-heart": "\f19b", + "bookmark-plus-fill": "\f19c", + "bookmark-plus": "\f19d", + "bookmark-star-fill": "\f19e", + "bookmark-star": "\f19f", + "bookmark-x-fill": "\f1a0", + "bookmark-x": "\f1a1", + "bookmark": "\f1a2", + "bookmarks-fill": "\f1a3", + "bookmarks": "\f1a4", + "bookshelf": "\f1a5", + "bootstrap-fill": "\f1a6", + "bootstrap-reboot": "\f1a7", + "bootstrap": "\f1a8", + "border-all": "\f1a9", + "border-bottom": "\f1aa", + "border-center": "\f1ab", + "border-inner": "\f1ac", + "border-left": "\f1ad", + "border-middle": "\f1ae", + "border-outer": "\f1af", + "border-right": "\f1b0", + "border-style": "\f1b1", + "border-top": "\f1b2", + "border-width": "\f1b3", + "border": "\f1b4", + "bounding-box-circles": "\f1b5", + "bounding-box": "\f1b6", + "box-arrow-down-left": "\f1b7", + "box-arrow-down-right": "\f1b8", + "box-arrow-down": "\f1b9", + "box-arrow-in-down-left": "\f1ba", + "box-arrow-in-down-right": "\f1bb", + "box-arrow-in-down": "\f1bc", + "box-arrow-in-left": "\f1bd", + "box-arrow-in-right": "\f1be", + "box-arrow-in-up-left": "\f1bf", + "box-arrow-in-up-right": "\f1c0", + "box-arrow-in-up": "\f1c1", + "box-arrow-left": "\f1c2", + "box-arrow-right": "\f1c3", + "box-arrow-up-left": "\f1c4", + "box-arrow-up-right": "\f1c5", + "box-arrow-up": "\f1c6", + "box-seam": "\f1c7", + "box": "\f1c8", + "braces": "\f1c9", + "bricks": "\f1ca", + "briefcase-fill": "\f1cb", + "briefcase": "\f1cc", + "brightness-alt-high-fill": "\f1cd", + "brightness-alt-high": "\f1ce", + "brightness-alt-low-fill": "\f1cf", + "brightness-alt-low": "\f1d0", + "brightness-high-fill": "\f1d1", + "brightness-high": "\f1d2", + "brightness-low-fill": "\f1d3", + "brightness-low": "\f1d4", + "broadcast-pin": "\f1d5", + "broadcast": "\f1d6", + "brush-fill": "\f1d7", + "brush": "\f1d8", + "bucket-fill": "\f1d9", + "bucket": "\f1da", + "bug-fill": "\f1db", + "bug": "\f1dc", + "building": "\f1dd", + "bullseye": "\f1de", + "calculator-fill": "\f1df", + "calculator": "\f1e0", + "calendar-check-fill": "\f1e1", + "calendar-check": "\f1e2", + "calendar-date-fill": "\f1e3", + "calendar-date": "\f1e4", + "calendar-day-fill": "\f1e5", + "calendar-day": "\f1e6", + "calendar-event-fill": "\f1e7", + "calendar-event": "\f1e8", + "calendar-fill": "\f1e9", + "calendar-minus-fill": "\f1ea", + "calendar-minus": "\f1eb", + "calendar-month-fill": "\f1ec", + "calendar-month": "\f1ed", + "calendar-plus-fill": "\f1ee", + "calendar-plus": "\f1ef", + "calendar-range-fill": "\f1f0", + "calendar-range": "\f1f1", + "calendar-week-fill": "\f1f2", + "calendar-week": "\f1f3", + "calendar-x-fill": "\f1f4", + "calendar-x": "\f1f5", + "calendar": "\f1f6", + "calendar2-check-fill": "\f1f7", + "calendar2-check": "\f1f8", + "calendar2-date-fill": "\f1f9", + "calendar2-date": "\f1fa", + "calendar2-day-fill": "\f1fb", + "calendar2-day": "\f1fc", + "calendar2-event-fill": "\f1fd", + "calendar2-event": "\f1fe", + "calendar2-fill": "\f1ff", + "calendar2-minus-fill": "\f200", + "calendar2-minus": "\f201", + "calendar2-month-fill": "\f202", + "calendar2-month": "\f203", + "calendar2-plus-fill": "\f204", + "calendar2-plus": "\f205", + "calendar2-range-fill": "\f206", + "calendar2-range": "\f207", + "calendar2-week-fill": "\f208", + "calendar2-week": "\f209", + "calendar2-x-fill": "\f20a", + "calendar2-x": "\f20b", + "calendar2": "\f20c", + "calendar3-event-fill": "\f20d", + "calendar3-event": "\f20e", + "calendar3-fill": "\f20f", + "calendar3-range-fill": "\f210", + "calendar3-range": "\f211", + "calendar3-week-fill": "\f212", + "calendar3-week": "\f213", + "calendar3": "\f214", + "calendar4-event": "\f215", + "calendar4-range": "\f216", + "calendar4-week": "\f217", + "calendar4": "\f218", + "camera-fill": "\f219", + "camera-reels-fill": "\f21a", + "camera-reels": "\f21b", + "camera-video-fill": "\f21c", + "camera-video-off-fill": "\f21d", + "camera-video-off": "\f21e", + "camera-video": "\f21f", + "camera": "\f220", + "camera2": "\f221", + "capslock-fill": "\f222", + "capslock": "\f223", + "card-checklist": "\f224", + "card-heading": "\f225", + "card-image": "\f226", + "card-list": "\f227", + "card-text": "\f228", + "caret-down-fill": "\f229", + "caret-down-square-fill": "\f22a", + "caret-down-square": "\f22b", + "caret-down": "\f22c", + "caret-left-fill": "\f22d", + "caret-left-square-fill": "\f22e", + "caret-left-square": "\f22f", + "caret-left": "\f230", + "caret-right-fill": "\f231", + "caret-right-square-fill": "\f232", + "caret-right-square": "\f233", + "caret-right": "\f234", + "caret-up-fill": "\f235", + "caret-up-square-fill": "\f236", + "caret-up-square": "\f237", + "caret-up": "\f238", + "cart-check-fill": "\f239", + "cart-check": "\f23a", + "cart-dash-fill": "\f23b", + "cart-dash": "\f23c", + "cart-fill": "\f23d", + "cart-plus-fill": "\f23e", + "cart-plus": "\f23f", + "cart-x-fill": "\f240", + "cart-x": "\f241", + "cart": "\f242", + "cart2": "\f243", + "cart3": "\f244", + "cart4": "\f245", + "cash-stack": "\f246", + "cash": "\f247", + "cast": "\f248", + "chat-dots-fill": "\f249", + "chat-dots": "\f24a", + "chat-fill": "\f24b", + "chat-left-dots-fill": "\f24c", + "chat-left-dots": "\f24d", + "chat-left-fill": "\f24e", + "chat-left-quote-fill": "\f24f", + "chat-left-quote": "\f250", + "chat-left-text-fill": "\f251", + "chat-left-text": "\f252", + "chat-left": "\f253", + "chat-quote-fill": "\f254", + "chat-quote": "\f255", + "chat-right-dots-fill": "\f256", + "chat-right-dots": "\f257", + "chat-right-fill": "\f258", + "chat-right-quote-fill": "\f259", + "chat-right-quote": "\f25a", + "chat-right-text-fill": "\f25b", + "chat-right-text": "\f25c", + "chat-right": "\f25d", + "chat-square-dots-fill": "\f25e", + "chat-square-dots": "\f25f", + "chat-square-fill": "\f260", + "chat-square-quote-fill": "\f261", + "chat-square-quote": "\f262", + "chat-square-text-fill": "\f263", + "chat-square-text": "\f264", + "chat-square": "\f265", + "chat-text-fill": "\f266", + "chat-text": "\f267", + "chat": "\f268", + "check-all": "\f269", + "check-circle-fill": "\f26a", + "check-circle": "\f26b", + "check-square-fill": "\f26c", + "check-square": "\f26d", + "check": "\f26e", + "check2-all": "\f26f", + "check2-circle": "\f270", + "check2-square": "\f271", + "check2": "\f272", + "chevron-bar-contract": "\f273", + "chevron-bar-down": "\f274", + "chevron-bar-expand": "\f275", + "chevron-bar-left": "\f276", + "chevron-bar-right": "\f277", + "chevron-bar-up": "\f278", + "chevron-compact-down": "\f279", + "chevron-compact-left": "\f27a", + "chevron-compact-right": "\f27b", + "chevron-compact-up": "\f27c", + "chevron-contract": "\f27d", + "chevron-double-down": "\f27e", + "chevron-double-left": "\f27f", + "chevron-double-right": "\f280", + "chevron-double-up": "\f281", + "chevron-down": "\f282", + "chevron-expand": "\f283", + "chevron-left": "\f284", + "chevron-right": "\f285", + "chevron-up": "\f286", + "circle-fill": "\f287", + "circle-half": "\f288", + "circle-square": "\f289", + "circle": "\f28a", + "clipboard-check": "\f28b", + "clipboard-data": "\f28c", + "clipboard-minus": "\f28d", + "clipboard-plus": "\f28e", + "clipboard-x": "\f28f", + "clipboard": "\f290", + "clock-fill": "\f291", + "clock-history": "\f292", + "clock": "\f293", + "cloud-arrow-down-fill": "\f294", + "cloud-arrow-down": "\f295", + "cloud-arrow-up-fill": "\f296", + "cloud-arrow-up": "\f297", + "cloud-check-fill": "\f298", + "cloud-check": "\f299", + "cloud-download-fill": "\f29a", + "cloud-download": "\f29b", + "cloud-drizzle-fill": "\f29c", + "cloud-drizzle": "\f29d", + "cloud-fill": "\f29e", + "cloud-fog-fill": "\f29f", + "cloud-fog": "\f2a0", + "cloud-fog2-fill": "\f2a1", + "cloud-fog2": "\f2a2", + "cloud-hail-fill": "\f2a3", + "cloud-hail": "\f2a4", + "cloud-haze-fill": "\f2a6", + "cloud-haze": "\f2a7", + "cloud-haze2-fill": "\f2a8", + "cloud-lightning-fill": "\f2a9", + "cloud-lightning-rain-fill": "\f2aa", + "cloud-lightning-rain": "\f2ab", + "cloud-lightning": "\f2ac", + "cloud-minus-fill": "\f2ad", + "cloud-minus": "\f2ae", + "cloud-moon-fill": "\f2af", + "cloud-moon": "\f2b0", + "cloud-plus-fill": "\f2b1", + "cloud-plus": "\f2b2", + "cloud-rain-fill": "\f2b3", + "cloud-rain-heavy-fill": "\f2b4", + "cloud-rain-heavy": "\f2b5", + "cloud-rain": "\f2b6", + "cloud-slash-fill": "\f2b7", + "cloud-slash": "\f2b8", + "cloud-sleet-fill": "\f2b9", + "cloud-sleet": "\f2ba", + "cloud-snow-fill": "\f2bb", + "cloud-snow": "\f2bc", + "cloud-sun-fill": "\f2bd", + "cloud-sun": "\f2be", + "cloud-upload-fill": "\f2bf", + "cloud-upload": "\f2c0", + "cloud": "\f2c1", + "clouds-fill": "\f2c2", + "clouds": "\f2c3", + "cloudy-fill": "\f2c4", + "cloudy": "\f2c5", + "code-slash": "\f2c6", + "code-square": "\f2c7", + "code": "\f2c8", + "collection-fill": "\f2c9", + "collection-play-fill": "\f2ca", + "collection-play": "\f2cb", + "collection": "\f2cc", + "columns-gap": "\f2cd", + "columns": "\f2ce", + "command": "\f2cf", + "compass-fill": "\f2d0", + "compass": "\f2d1", + "cone-striped": "\f2d2", + "cone": "\f2d3", + "controller": "\f2d4", + "cpu-fill": "\f2d5", + "cpu": "\f2d6", + "credit-card-2-back-fill": "\f2d7", + "credit-card-2-back": "\f2d8", + "credit-card-2-front-fill": "\f2d9", + "credit-card-2-front": "\f2da", + "credit-card-fill": "\f2db", + "credit-card": "\f2dc", + "crop": "\f2dd", + "cup-fill": "\f2de", + "cup-straw": "\f2df", + "cup": "\f2e0", + "cursor-fill": "\f2e1", + "cursor-text": "\f2e2", + "cursor": "\f2e3", + "dash-circle-dotted": "\f2e4", + "dash-circle-fill": "\f2e5", + "dash-circle": "\f2e6", + "dash-square-dotted": "\f2e7", + "dash-square-fill": "\f2e8", + "dash-square": "\f2e9", + "dash": "\f2ea", + "diagram-2-fill": "\f2eb", + "diagram-2": "\f2ec", + "diagram-3-fill": "\f2ed", + "diagram-3": "\f2ee", + "diamond-fill": "\f2ef", + "diamond-half": "\f2f0", + "diamond": "\f2f1", + "dice-1-fill": "\f2f2", + "dice-1": "\f2f3", + "dice-2-fill": "\f2f4", + "dice-2": "\f2f5", + "dice-3-fill": "\f2f6", + "dice-3": "\f2f7", + "dice-4-fill": "\f2f8", + "dice-4": "\f2f9", + "dice-5-fill": "\f2fa", + "dice-5": "\f2fb", + "dice-6-fill": "\f2fc", + "dice-6": "\f2fd", + "disc-fill": "\f2fe", + "disc": "\f2ff", + "discord": "\f300", + "display-fill": "\f301", + "display": "\f302", + "distribute-horizontal": "\f303", + "distribute-vertical": "\f304", + "door-closed-fill": "\f305", + "door-closed": "\f306", + "door-open-fill": "\f307", + "door-open": "\f308", + "dot": "\f309", + "download": "\f30a", + "droplet-fill": "\f30b", + "droplet-half": "\f30c", + "droplet": "\f30d", + "earbuds": "\f30e", + "easel-fill": "\f30f", + "easel": "\f310", + "egg-fill": "\f311", + "egg-fried": "\f312", + "egg": "\f313", + "eject-fill": "\f314", + "eject": "\f315", + "emoji-angry-fill": "\f316", + "emoji-angry": "\f317", + "emoji-dizzy-fill": "\f318", + "emoji-dizzy": "\f319", + "emoji-expressionless-fill": "\f31a", + "emoji-expressionless": "\f31b", + "emoji-frown-fill": "\f31c", + "emoji-frown": "\f31d", + "emoji-heart-eyes-fill": "\f31e", + "emoji-heart-eyes": "\f31f", + "emoji-laughing-fill": "\f320", + "emoji-laughing": "\f321", + "emoji-neutral-fill": "\f322", + "emoji-neutral": "\f323", + "emoji-smile-fill": "\f324", + "emoji-smile-upside-down-fill": "\f325", + "emoji-smile-upside-down": "\f326", + "emoji-smile": "\f327", + "emoji-sunglasses-fill": "\f328", + "emoji-sunglasses": "\f329", + "emoji-wink-fill": "\f32a", + "emoji-wink": "\f32b", + "envelope-fill": "\f32c", + "envelope-open-fill": "\f32d", + "envelope-open": "\f32e", + "envelope": "\f32f", + "eraser-fill": "\f330", + "eraser": "\f331", + "exclamation-circle-fill": "\f332", + "exclamation-circle": "\f333", + "exclamation-diamond-fill": "\f334", + "exclamation-diamond": "\f335", + "exclamation-octagon-fill": "\f336", + "exclamation-octagon": "\f337", + "exclamation-square-fill": "\f338", + "exclamation-square": "\f339", + "exclamation-triangle-fill": "\f33a", + "exclamation-triangle": "\f33b", + "exclamation": "\f33c", + "exclude": "\f33d", + "eye-fill": "\f33e", + "eye-slash-fill": "\f33f", + "eye-slash": "\f340", + "eye": "\f341", + "eyedropper": "\f342", + "eyeglasses": "\f343", + "facebook": "\f344", + "file-arrow-down-fill": "\f345", + "file-arrow-down": "\f346", + "file-arrow-up-fill": "\f347", + "file-arrow-up": "\f348", + "file-bar-graph-fill": "\f349", + "file-bar-graph": "\f34a", + "file-binary-fill": "\f34b", + "file-binary": "\f34c", + "file-break-fill": "\f34d", + "file-break": "\f34e", + "file-check-fill": "\f34f", + "file-check": "\f350", + "file-code-fill": "\f351", + "file-code": "\f352", + "file-diff-fill": "\f353", + "file-diff": "\f354", + "file-earmark-arrow-down-fill": "\f355", + "file-earmark-arrow-down": "\f356", + "file-earmark-arrow-up-fill": "\f357", + "file-earmark-arrow-up": "\f358", + "file-earmark-bar-graph-fill": "\f359", + "file-earmark-bar-graph": "\f35a", + "file-earmark-binary-fill": "\f35b", + "file-earmark-binary": "\f35c", + "file-earmark-break-fill": "\f35d", + "file-earmark-break": "\f35e", + "file-earmark-check-fill": "\f35f", + "file-earmark-check": "\f360", + "file-earmark-code-fill": "\f361", + "file-earmark-code": "\f362", + "file-earmark-diff-fill": "\f363", + "file-earmark-diff": "\f364", + "file-earmark-easel-fill": "\f365", + "file-earmark-easel": "\f366", + "file-earmark-excel-fill": "\f367", + "file-earmark-excel": "\f368", + "file-earmark-fill": "\f369", + "file-earmark-font-fill": "\f36a", + "file-earmark-font": "\f36b", + "file-earmark-image-fill": "\f36c", + "file-earmark-image": "\f36d", + "file-earmark-lock-fill": "\f36e", + "file-earmark-lock": "\f36f", + "file-earmark-lock2-fill": "\f370", + "file-earmark-lock2": "\f371", + "file-earmark-medical-fill": "\f372", + "file-earmark-medical": "\f373", + "file-earmark-minus-fill": "\f374", + "file-earmark-minus": "\f375", + "file-earmark-music-fill": "\f376", + "file-earmark-music": "\f377", + "file-earmark-person-fill": "\f378", + "file-earmark-person": "\f379", + "file-earmark-play-fill": "\f37a", + "file-earmark-play": "\f37b", + "file-earmark-plus-fill": "\f37c", + "file-earmark-plus": "\f37d", + "file-earmark-post-fill": "\f37e", + "file-earmark-post": "\f37f", + "file-earmark-ppt-fill": "\f380", + "file-earmark-ppt": "\f381", + "file-earmark-richtext-fill": "\f382", + "file-earmark-richtext": "\f383", + "file-earmark-ruled-fill": "\f384", + "file-earmark-ruled": "\f385", + "file-earmark-slides-fill": "\f386", + "file-earmark-slides": "\f387", + "file-earmark-spreadsheet-fill": "\f388", + "file-earmark-spreadsheet": "\f389", + "file-earmark-text-fill": "\f38a", + "file-earmark-text": "\f38b", + "file-earmark-word-fill": "\f38c", + "file-earmark-word": "\f38d", + "file-earmark-x-fill": "\f38e", + "file-earmark-x": "\f38f", + "file-earmark-zip-fill": "\f390", + "file-earmark-zip": "\f391", + "file-earmark": "\f392", + "file-easel-fill": "\f393", + "file-easel": "\f394", + "file-excel-fill": "\f395", + "file-excel": "\f396", + "file-fill": "\f397", + "file-font-fill": "\f398", + "file-font": "\f399", + "file-image-fill": "\f39a", + "file-image": "\f39b", + "file-lock-fill": "\f39c", + "file-lock": "\f39d", + "file-lock2-fill": "\f39e", + "file-lock2": "\f39f", + "file-medical-fill": "\f3a0", + "file-medical": "\f3a1", + "file-minus-fill": "\f3a2", + "file-minus": "\f3a3", + "file-music-fill": "\f3a4", + "file-music": "\f3a5", + "file-person-fill": "\f3a6", + "file-person": "\f3a7", + "file-play-fill": "\f3a8", + "file-play": "\f3a9", + "file-plus-fill": "\f3aa", + "file-plus": "\f3ab", + "file-post-fill": "\f3ac", + "file-post": "\f3ad", + "file-ppt-fill": "\f3ae", + "file-ppt": "\f3af", + "file-richtext-fill": "\f3b0", + "file-richtext": "\f3b1", + "file-ruled-fill": "\f3b2", + "file-ruled": "\f3b3", + "file-slides-fill": "\f3b4", + "file-slides": "\f3b5", + "file-spreadsheet-fill": "\f3b6", + "file-spreadsheet": "\f3b7", + "file-text-fill": "\f3b8", + "file-text": "\f3b9", + "file-word-fill": "\f3ba", + "file-word": "\f3bb", + "file-x-fill": "\f3bc", + "file-x": "\f3bd", + "file-zip-fill": "\f3be", + "file-zip": "\f3bf", + "file": "\f3c0", + "files-alt": "\f3c1", + "files": "\f3c2", + "film": "\f3c3", + "filter-circle-fill": "\f3c4", + "filter-circle": "\f3c5", + "filter-left": "\f3c6", + "filter-right": "\f3c7", + "filter-square-fill": "\f3c8", + "filter-square": "\f3c9", + "filter": "\f3ca", + "flag-fill": "\f3cb", + "flag": "\f3cc", + "flower1": "\f3cd", + "flower2": "\f3ce", + "flower3": "\f3cf", + "folder-check": "\f3d0", + "folder-fill": "\f3d1", + "folder-minus": "\f3d2", + "folder-plus": "\f3d3", + "folder-symlink-fill": "\f3d4", + "folder-symlink": "\f3d5", + "folder-x": "\f3d6", + "folder": "\f3d7", + "folder2-open": "\f3d8", + "folder2": "\f3d9", + "fonts": "\f3da", + "forward-fill": "\f3db", + "forward": "\f3dc", + "front": "\f3dd", + "fullscreen-exit": "\f3de", + "fullscreen": "\f3df", + "funnel-fill": "\f3e0", + "funnel": "\f3e1", + "gear-fill": "\f3e2", + "gear-wide-connected": "\f3e3", + "gear-wide": "\f3e4", + "gear": "\f3e5", + "gem": "\f3e6", + "geo-alt-fill": "\f3e7", + "geo-alt": "\f3e8", + "geo-fill": "\f3e9", + "geo": "\f3ea", + "gift-fill": "\f3eb", + "gift": "\f3ec", + "github": "\f3ed", + "globe": "\f3ee", + "globe2": "\f3ef", + "google": "\f3f0", + "graph-down": "\f3f1", + "graph-up": "\f3f2", + "grid-1x2-fill": "\f3f3", + "grid-1x2": "\f3f4", + "grid-3x2-gap-fill": "\f3f5", + "grid-3x2-gap": "\f3f6", + "grid-3x2": "\f3f7", + "grid-3x3-gap-fill": "\f3f8", + "grid-3x3-gap": "\f3f9", + "grid-3x3": "\f3fa", + "grid-fill": "\f3fb", + "grid": "\f3fc", + "grip-horizontal": "\f3fd", + "grip-vertical": "\f3fe", + "hammer": "\f3ff", + "hand-index-fill": "\f400", + "hand-index-thumb-fill": "\f401", + "hand-index-thumb": "\f402", + "hand-index": "\f403", + "hand-thumbs-down-fill": "\f404", + "hand-thumbs-down": "\f405", + "hand-thumbs-up-fill": "\f406", + "hand-thumbs-up": "\f407", + "handbag-fill": "\f408", + "handbag": "\f409", + "hash": "\f40a", + "hdd-fill": "\f40b", + "hdd-network-fill": "\f40c", + "hdd-network": "\f40d", + "hdd-rack-fill": "\f40e", + "hdd-rack": "\f40f", + "hdd-stack-fill": "\f410", + "hdd-stack": "\f411", + "hdd": "\f412", + "headphones": "\f413", + "headset": "\f414", + "heart-fill": "\f415", + "heart-half": "\f416", + "heart": "\f417", + "heptagon-fill": "\f418", + "heptagon-half": "\f419", + "heptagon": "\f41a", + "hexagon-fill": "\f41b", + "hexagon-half": "\f41c", + "hexagon": "\f41d", + "hourglass-bottom": "\f41e", + "hourglass-split": "\f41f", + "hourglass-top": "\f420", + "hourglass": "\f421", + "house-door-fill": "\f422", + "house-door": "\f423", + "house-fill": "\f424", + "house": "\f425", + "hr": "\f426", + "hurricane": "\f427", + "image-alt": "\f428", + "image-fill": "\f429", + "image": "\f42a", + "images": "\f42b", + "inbox-fill": "\f42c", + "inbox": "\f42d", + "inboxes-fill": "\f42e", + "inboxes": "\f42f", + "info-circle-fill": "\f430", + "info-circle": "\f431", + "info-square-fill": "\f432", + "info-square": "\f433", + "info": "\f434", + "input-cursor-text": "\f435", + "input-cursor": "\f436", + "instagram": "\f437", + "intersect": "\f438", + "journal-album": "\f439", + "journal-arrow-down": "\f43a", + "journal-arrow-up": "\f43b", + "journal-bookmark-fill": "\f43c", + "journal-bookmark": "\f43d", + "journal-check": "\f43e", + "journal-code": "\f43f", + "journal-medical": "\f440", + "journal-minus": "\f441", + "journal-plus": "\f442", + "journal-richtext": "\f443", + "journal-text": "\f444", + "journal-x": "\f445", + "journal": "\f446", + "journals": "\f447", + "joystick": "\f448", + "justify-left": "\f449", + "justify-right": "\f44a", + "justify": "\f44b", + "kanban-fill": "\f44c", + "kanban": "\f44d", + "key-fill": "\f44e", + "key": "\f44f", + "keyboard-fill": "\f450", + "keyboard": "\f451", + "ladder": "\f452", + "lamp-fill": "\f453", + "lamp": "\f454", + "laptop-fill": "\f455", + "laptop": "\f456", + "layer-backward": "\f457", + "layer-forward": "\f458", + "layers-fill": "\f459", + "layers-half": "\f45a", + "layers": "\f45b", + "layout-sidebar-inset-reverse": "\f45c", + "layout-sidebar-inset": "\f45d", + "layout-sidebar-reverse": "\f45e", + "layout-sidebar": "\f45f", + "layout-split": "\f460", + "layout-text-sidebar-reverse": "\f461", + "layout-text-sidebar": "\f462", + "layout-text-window-reverse": "\f463", + "layout-text-window": "\f464", + "layout-three-columns": "\f465", + "layout-wtf": "\f466", + "life-preserver": "\f467", + "lightbulb-fill": "\f468", + "lightbulb-off-fill": "\f469", + "lightbulb-off": "\f46a", + "lightbulb": "\f46b", + "lightning-charge-fill": "\f46c", + "lightning-charge": "\f46d", + "lightning-fill": "\f46e", + "lightning": "\f46f", + "link-45deg": "\f470", + "link": "\f471", + "linkedin": "\f472", + "list-check": "\f473", + "list-nested": "\f474", + "list-ol": "\f475", + "list-stars": "\f476", + "list-task": "\f477", + "list-ul": "\f478", + "list": "\f479", + "lock-fill": "\f47a", + "lock": "\f47b", + "mailbox": "\f47c", + "mailbox2": "\f47d", + "map-fill": "\f47e", + "map": "\f47f", + "markdown-fill": "\f480", + "markdown": "\f481", + "mask": "\f482", + "megaphone-fill": "\f483", + "megaphone": "\f484", + "menu-app-fill": "\f485", + "menu-app": "\f486", + "menu-button-fill": "\f487", + "menu-button-wide-fill": "\f488", + "menu-button-wide": "\f489", + "menu-button": "\f48a", + "menu-down": "\f48b", + "menu-up": "\f48c", + "mic-fill": "\f48d", + "mic-mute-fill": "\f48e", + "mic-mute": "\f48f", + "mic": "\f490", + "minecart-loaded": "\f491", + "minecart": "\f492", + "moisture": "\f493", + "moon-fill": "\f494", + "moon-stars-fill": "\f495", + "moon-stars": "\f496", + "moon": "\f497", + "mouse-fill": "\f498", + "mouse": "\f499", + "mouse2-fill": "\f49a", + "mouse2": "\f49b", + "mouse3-fill": "\f49c", + "mouse3": "\f49d", + "music-note-beamed": "\f49e", + "music-note-list": "\f49f", + "music-note": "\f4a0", + "music-player-fill": "\f4a1", + "music-player": "\f4a2", + "newspaper": "\f4a3", + "node-minus-fill": "\f4a4", + "node-minus": "\f4a5", + "node-plus-fill": "\f4a6", + "node-plus": "\f4a7", + "nut-fill": "\f4a8", + "nut": "\f4a9", + "octagon-fill": "\f4aa", + "octagon-half": "\f4ab", + "octagon": "\f4ac", + "option": "\f4ad", + "outlet": "\f4ae", + "paint-bucket": "\f4af", + "palette-fill": "\f4b0", + "palette": "\f4b1", + "palette2": "\f4b2", + "paperclip": "\f4b3", + "paragraph": "\f4b4", + "patch-check-fill": "\f4b5", + "patch-check": "\f4b6", + "patch-exclamation-fill": "\f4b7", + "patch-exclamation": "\f4b8", + "patch-minus-fill": "\f4b9", + "patch-minus": "\f4ba", + "patch-plus-fill": "\f4bb", + "patch-plus": "\f4bc", + "patch-question-fill": "\f4bd", + "patch-question": "\f4be", + "pause-btn-fill": "\f4bf", + "pause-btn": "\f4c0", + "pause-circle-fill": "\f4c1", + "pause-circle": "\f4c2", + "pause-fill": "\f4c3", + "pause": "\f4c4", + "peace-fill": "\f4c5", + "peace": "\f4c6", + "pen-fill": "\f4c7", + "pen": "\f4c8", + "pencil-fill": "\f4c9", + "pencil-square": "\f4ca", + "pencil": "\f4cb", + "pentagon-fill": "\f4cc", + "pentagon-half": "\f4cd", + "pentagon": "\f4ce", + "people-fill": "\f4cf", + "people": "\f4d0", + "percent": "\f4d1", + "person-badge-fill": "\f4d2", + "person-badge": "\f4d3", + "person-bounding-box": "\f4d4", + "person-check-fill": "\f4d5", + "person-check": "\f4d6", + "person-circle": "\f4d7", + "person-dash-fill": "\f4d8", + "person-dash": "\f4d9", + "person-fill": "\f4da", + "person-lines-fill": "\f4db", + "person-plus-fill": "\f4dc", + "person-plus": "\f4dd", + "person-square": "\f4de", + "person-x-fill": "\f4df", + "person-x": "\f4e0", + "person": "\f4e1", + "phone-fill": "\f4e2", + "phone-landscape-fill": "\f4e3", + "phone-landscape": "\f4e4", + "phone-vibrate-fill": "\f4e5", + "phone-vibrate": "\f4e6", + "phone": "\f4e7", + "pie-chart-fill": "\f4e8", + "pie-chart": "\f4e9", + "pin-angle-fill": "\f4ea", + "pin-angle": "\f4eb", + "pin-fill": "\f4ec", + "pin": "\f4ed", + "pip-fill": "\f4ee", + "pip": "\f4ef", + "play-btn-fill": "\f4f0", + "play-btn": "\f4f1", + "play-circle-fill": "\f4f2", + "play-circle": "\f4f3", + "play-fill": "\f4f4", + "play": "\f4f5", + "plug-fill": "\f4f6", + "plug": "\f4f7", + "plus-circle-dotted": "\f4f8", + "plus-circle-fill": "\f4f9", + "plus-circle": "\f4fa", + "plus-square-dotted": "\f4fb", + "plus-square-fill": "\f4fc", + "plus-square": "\f4fd", + "plus": "\f4fe", + "power": "\f4ff", + "printer-fill": "\f500", + "printer": "\f501", + "puzzle-fill": "\f502", + "puzzle": "\f503", + "question-circle-fill": "\f504", + "question-circle": "\f505", + "question-diamond-fill": "\f506", + "question-diamond": "\f507", + "question-octagon-fill": "\f508", + "question-octagon": "\f509", + "question-square-fill": "\f50a", + "question-square": "\f50b", + "question": "\f50c", + "rainbow": "\f50d", + "receipt-cutoff": "\f50e", + "receipt": "\f50f", + "reception-0": "\f510", + "reception-1": "\f511", + "reception-2": "\f512", + "reception-3": "\f513", + "reception-4": "\f514", + "record-btn-fill": "\f515", + "record-btn": "\f516", + "record-circle-fill": "\f517", + "record-circle": "\f518", + "record-fill": "\f519", + "record": "\f51a", + "record2-fill": "\f51b", + "record2": "\f51c", + "reply-all-fill": "\f51d", + "reply-all": "\f51e", + "reply-fill": "\f51f", + "reply": "\f520", + "rss-fill": "\f521", + "rss": "\f522", + "rulers": "\f523", + "save-fill": "\f524", + "save": "\f525", + "save2-fill": "\f526", + "save2": "\f527", + "scissors": "\f528", + "screwdriver": "\f529", + "search": "\f52a", + "segmented-nav": "\f52b", + "server": "\f52c", + "share-fill": "\f52d", + "share": "\f52e", + "shield-check": "\f52f", + "shield-exclamation": "\f530", + "shield-fill-check": "\f531", + "shield-fill-exclamation": "\f532", + "shield-fill-minus": "\f533", + "shield-fill-plus": "\f534", + "shield-fill-x": "\f535", + "shield-fill": "\f536", + "shield-lock-fill": "\f537", + "shield-lock": "\f538", + "shield-minus": "\f539", + "shield-plus": "\f53a", + "shield-shaded": "\f53b", + "shield-slash-fill": "\f53c", + "shield-slash": "\f53d", + "shield-x": "\f53e", + "shield": "\f53f", + "shift-fill": "\f540", + "shift": "\f541", + "shop-window": "\f542", + "shop": "\f543", + "shuffle": "\f544", + "signpost-2-fill": "\f545", + "signpost-2": "\f546", + "signpost-fill": "\f547", + "signpost-split-fill": "\f548", + "signpost-split": "\f549", + "signpost": "\f54a", + "sim-fill": "\f54b", + "sim": "\f54c", + "skip-backward-btn-fill": "\f54d", + "skip-backward-btn": "\f54e", + "skip-backward-circle-fill": "\f54f", + "skip-backward-circle": "\f550", + "skip-backward-fill": "\f551", + "skip-backward": "\f552", + "skip-end-btn-fill": "\f553", + "skip-end-btn": "\f554", + "skip-end-circle-fill": "\f555", + "skip-end-circle": "\f556", + "skip-end-fill": "\f557", + "skip-end": "\f558", + "skip-forward-btn-fill": "\f559", + "skip-forward-btn": "\f55a", + "skip-forward-circle-fill": "\f55b", + "skip-forward-circle": "\f55c", + "skip-forward-fill": "\f55d", + "skip-forward": "\f55e", + "skip-start-btn-fill": "\f55f", + "skip-start-btn": "\f560", + "skip-start-circle-fill": "\f561", + "skip-start-circle": "\f562", + "skip-start-fill": "\f563", + "skip-start": "\f564", + "slack": "\f565", + "slash-circle-fill": "\f566", + "slash-circle": "\f567", + "slash-square-fill": "\f568", + "slash-square": "\f569", + "slash": "\f56a", + "sliders": "\f56b", + "smartwatch": "\f56c", + "snow": "\f56d", + "snow2": "\f56e", + "snow3": "\f56f", + "sort-alpha-down-alt": "\f570", + "sort-alpha-down": "\f571", + "sort-alpha-up-alt": "\f572", + "sort-alpha-up": "\f573", + "sort-down-alt": "\f574", + "sort-down": "\f575", + "sort-numeric-down-alt": "\f576", + "sort-numeric-down": "\f577", + "sort-numeric-up-alt": "\f578", + "sort-numeric-up": "\f579", + "sort-up-alt": "\f57a", + "sort-up": "\f57b", + "soundwave": "\f57c", + "speaker-fill": "\f57d", + "speaker": "\f57e", + "speedometer": "\f57f", + "speedometer2": "\f580", + "spellcheck": "\f581", + "square-fill": "\f582", + "square-half": "\f583", + "square": "\f584", + "stack": "\f585", + "star-fill": "\f586", + "star-half": "\f587", + "star": "\f588", + "stars": "\f589", + "stickies-fill": "\f58a", + "stickies": "\f58b", + "sticky-fill": "\f58c", + "sticky": "\f58d", + "stop-btn-fill": "\f58e", + "stop-btn": "\f58f", + "stop-circle-fill": "\f590", + "stop-circle": "\f591", + "stop-fill": "\f592", + "stop": "\f593", + "stoplights-fill": "\f594", + "stoplights": "\f595", + "stopwatch-fill": "\f596", + "stopwatch": "\f597", + "subtract": "\f598", + "suit-club-fill": "\f599", + "suit-club": "\f59a", + "suit-diamond-fill": "\f59b", + "suit-diamond": "\f59c", + "suit-heart-fill": "\f59d", + "suit-heart": "\f59e", + "suit-spade-fill": "\f59f", + "suit-spade": "\f5a0", + "sun-fill": "\f5a1", + "sun": "\f5a2", + "sunglasses": "\f5a3", + "sunrise-fill": "\f5a4", + "sunrise": "\f5a5", + "sunset-fill": "\f5a6", + "sunset": "\f5a7", + "symmetry-horizontal": "\f5a8", + "symmetry-vertical": "\f5a9", + "table": "\f5aa", + "tablet-fill": "\f5ab", + "tablet-landscape-fill": "\f5ac", + "tablet-landscape": "\f5ad", + "tablet": "\f5ae", + "tag-fill": "\f5af", + "tag": "\f5b0", + "tags-fill": "\f5b1", + "tags": "\f5b2", + "telegram": "\f5b3", + "telephone-fill": "\f5b4", + "telephone-forward-fill": "\f5b5", + "telephone-forward": "\f5b6", + "telephone-inbound-fill": "\f5b7", + "telephone-inbound": "\f5b8", + "telephone-minus-fill": "\f5b9", + "telephone-minus": "\f5ba", + "telephone-outbound-fill": "\f5bb", + "telephone-outbound": "\f5bc", + "telephone-plus-fill": "\f5bd", + "telephone-plus": "\f5be", + "telephone-x-fill": "\f5bf", + "telephone-x": "\f5c0", + "telephone": "\f5c1", + "terminal-fill": "\f5c2", + "terminal": "\f5c3", + "text-center": "\f5c4", + "text-indent-left": "\f5c5", + "text-indent-right": "\f5c6", + "text-left": "\f5c7", + "text-paragraph": "\f5c8", + "text-right": "\f5c9", + "textarea-resize": "\f5ca", + "textarea-t": "\f5cb", + "textarea": "\f5cc", + "thermometer-half": "\f5cd", + "thermometer-high": "\f5ce", + "thermometer-low": "\f5cf", + "thermometer-snow": "\f5d0", + "thermometer-sun": "\f5d1", + "thermometer": "\f5d2", + "three-dots-vertical": "\f5d3", + "three-dots": "\f5d4", + "toggle-off": "\f5d5", + "toggle-on": "\f5d6", + "toggle2-off": "\f5d7", + "toggle2-on": "\f5d8", + "toggles": "\f5d9", + "toggles2": "\f5da", + "tools": "\f5db", + "tornado": "\f5dc", + "trash-fill": "\f5dd", + "trash": "\f5de", + "trash2-fill": "\f5df", + "trash2": "\f5e0", + "tree-fill": "\f5e1", + "tree": "\f5e2", + "triangle-fill": "\f5e3", + "triangle-half": "\f5e4", + "triangle": "\f5e5", + "trophy-fill": "\f5e6", + "trophy": "\f5e7", + "tropical-storm": "\f5e8", + "truck-flatbed": "\f5e9", + "truck": "\f5ea", + "tsunami": "\f5eb", + "tv-fill": "\f5ec", + "tv": "\f5ed", + "twitch": "\f5ee", + "twitter": "\f5ef", + "type-bold": "\f5f0", + "type-h1": "\f5f1", + "type-h2": "\f5f2", + "type-h3": "\f5f3", + "type-italic": "\f5f4", + "type-strikethrough": "\f5f5", + "type-underline": "\f5f6", + "type": "\f5f7", + "ui-checks-grid": "\f5f8", + "ui-checks": "\f5f9", + "ui-radios-grid": "\f5fa", + "ui-radios": "\f5fb", + "umbrella-fill": "\f5fc", + "umbrella": "\f5fd", + "union": "\f5fe", + "unlock-fill": "\f5ff", + "unlock": "\f600", + "upc-scan": "\f601", + "upc": "\f602", + "upload": "\f603", + "vector-pen": "\f604", + "view-list": "\f605", + "view-stacked": "\f606", + "vinyl-fill": "\f607", + "vinyl": "\f608", + "voicemail": "\f609", + "volume-down-fill": "\f60a", + "volume-down": "\f60b", + "volume-mute-fill": "\f60c", + "volume-mute": "\f60d", + "volume-off-fill": "\f60e", + "volume-off": "\f60f", + "volume-up-fill": "\f610", + "volume-up": "\f611", + "vr": "\f612", + "wallet-fill": "\f613", + "wallet": "\f614", + "wallet2": "\f615", + "watch": "\f616", + "water": "\f617", + "whatsapp": "\f618", + "wifi-1": "\f619", + "wifi-2": "\f61a", + "wifi-off": "\f61b", + "wifi": "\f61c", + "wind": "\f61d", + "window-dock": "\f61e", + "window-sidebar": "\f61f", + "window": "\f620", + "wrench": "\f621", + "x-circle-fill": "\f622", + "x-circle": "\f623", + "x-diamond-fill": "\f624", + "x-diamond": "\f625", + "x-octagon-fill": "\f626", + "x-octagon": "\f627", + "x-square-fill": "\f628", + "x-square": "\f629", + "x": "\f62a", + "youtube": "\f62b", + "zoom-in": "\f62c", + "zoom-out": "\f62d", + "bank": "\f62e", + "bank2": "\f62f", + "bell-slash-fill": "\f630", + "bell-slash": "\f631", + "cash-coin": "\f632", + "check-lg": "\f633", + "coin": "\f634", + "currency-bitcoin": "\f635", + "currency-dollar": "\f636", + "currency-euro": "\f637", + "currency-exchange": "\f638", + "currency-pound": "\f639", + "currency-yen": "\f63a", + "dash-lg": "\f63b", + "exclamation-lg": "\f63c", + "file-earmark-pdf-fill": "\f63d", + "file-earmark-pdf": "\f63e", + "file-pdf-fill": "\f63f", + "file-pdf": "\f640", + "gender-ambiguous": "\f641", + "gender-female": "\f642", + "gender-male": "\f643", + "gender-trans": "\f644", + "headset-vr": "\f645", + "info-lg": "\f646", + "mastodon": "\f647", + "messenger": "\f648", + "piggy-bank-fill": "\f649", + "piggy-bank": "\f64a", + "pin-map-fill": "\f64b", + "pin-map": "\f64c", + "plus-lg": "\f64d", + "question-lg": "\f64e", + "recycle": "\f64f", + "reddit": "\f650", + "safe-fill": "\f651", + "safe2-fill": "\f652", + "safe2": "\f653", + "sd-card-fill": "\f654", + "sd-card": "\f655", + "skype": "\f656", + "slash-lg": "\f657", + "translate": "\f658", + "x-lg": "\f659", + "safe": "\f65a", + "apple": "\f65b", + "microsoft": "\f65d", + "windows": "\f65e", + "behance": "\f65c", + "dribbble": "\f65f", + "line": "\f660", + "medium": "\f661", + "paypal": "\f662", + "pinterest": "\f663", + "signal": "\f664", + "snapchat": "\f665", + "spotify": "\f666", + "stack-overflow": "\f667", + "strava": "\f668", + "wordpress": "\f669", + "vimeo": "\f66a", + "activity": "\f66b", + "easel2-fill": "\f66c", + "easel2": "\f66d", + "easel3-fill": "\f66e", + "easel3": "\f66f", + "fan": "\f670", + "fingerprint": "\f671", + "graph-down-arrow": "\f672", + "graph-up-arrow": "\f673", + "hypnotize": "\f674", + "magic": "\f675", + "person-rolodex": "\f676", + "person-video": "\f677", + "person-video2": "\f678", + "person-video3": "\f679", + "person-workspace": "\f67a", + "radioactive": "\f67b", + "webcam-fill": "\f67c", + "webcam": "\f67d", + "yin-yang": "\f67e", + "bandaid-fill": "\f680", + "bandaid": "\f681", + "bluetooth": "\f682", + "body-text": "\f683", + "boombox": "\f684", + "boxes": "\f685", + "dpad-fill": "\f686", + "dpad": "\f687", + "ear-fill": "\f688", + "ear": "\f689", + "envelope-check-fill": "\f68b", + "envelope-check": "\f68c", + "envelope-dash-fill": "\f68e", + "envelope-dash": "\f68f", + "envelope-exclamation-fill": "\f691", + "envelope-exclamation": "\f692", + "envelope-plus-fill": "\f693", + "envelope-plus": "\f694", + "envelope-slash-fill": "\f696", + "envelope-slash": "\f697", + "envelope-x-fill": "\f699", + "envelope-x": "\f69a", + "explicit-fill": "\f69b", + "explicit": "\f69c", + "git": "\f69d", + "infinity": "\f69e", + "list-columns-reverse": "\f69f", + "list-columns": "\f6a0", + "meta": "\f6a1", + "nintendo-switch": "\f6a4", + "pc-display-horizontal": "\f6a5", + "pc-display": "\f6a6", + "pc-horizontal": "\f6a7", + "pc": "\f6a8", + "playstation": "\f6a9", + "plus-slash-minus": "\f6aa", + "projector-fill": "\f6ab", + "projector": "\f6ac", + "qr-code-scan": "\f6ad", + "qr-code": "\f6ae", + "quora": "\f6af", + "quote": "\f6b0", + "robot": "\f6b1", + "send-check-fill": "\f6b2", + "send-check": "\f6b3", + "send-dash-fill": "\f6b4", + "send-dash": "\f6b5", + "send-exclamation-fill": "\f6b7", + "send-exclamation": "\f6b8", + "send-fill": "\f6b9", + "send-plus-fill": "\f6ba", + "send-plus": "\f6bb", + "send-slash-fill": "\f6bc", + "send-slash": "\f6bd", + "send-x-fill": "\f6be", + "send-x": "\f6bf", + "send": "\f6c0", + "steam": "\f6c1", + "terminal-dash": "\f6c3", + "terminal-plus": "\f6c4", + "terminal-split": "\f6c5", + "ticket-detailed-fill": "\f6c6", + "ticket-detailed": "\f6c7", + "ticket-fill": "\f6c8", + "ticket-perforated-fill": "\f6c9", + "ticket-perforated": "\f6ca", + "ticket": "\f6cb", + "tiktok": "\f6cc", + "window-dash": "\f6cd", + "window-desktop": "\f6ce", + "window-fullscreen": "\f6cf", + "window-plus": "\f6d0", + "window-split": "\f6d1", + "window-stack": "\f6d2", + "window-x": "\f6d3", + "xbox": "\f6d4", + "ethernet": "\f6d5", + "hdmi-fill": "\f6d6", + "hdmi": "\f6d7", + "usb-c-fill": "\f6d8", + "usb-c": "\f6d9", + "usb-fill": "\f6da", + "usb-plug-fill": "\f6db", + "usb-plug": "\f6dc", + "usb-symbol": "\f6dd", + "usb": "\f6de", + "boombox-fill": "\f6df", + "displayport": "\f6e1", + "gpu-card": "\f6e2", + "memory": "\f6e3", + "modem-fill": "\f6e4", + "modem": "\f6e5", + "motherboard-fill": "\f6e6", + "motherboard": "\f6e7", + "optical-audio-fill": "\f6e8", + "optical-audio": "\f6e9", + "pci-card": "\f6ea", + "router-fill": "\f6eb", + "router": "\f6ec", + "thunderbolt-fill": "\f6ef", + "thunderbolt": "\f6f0", + "usb-drive-fill": "\f6f1", + "usb-drive": "\f6f2", + "usb-micro-fill": "\f6f3", + "usb-micro": "\f6f4", + "usb-mini-fill": "\f6f5", + "usb-mini": "\f6f6", + "cloud-haze2": "\f6f7", + "device-hdd-fill": "\f6f8", + "device-hdd": "\f6f9", + "device-ssd-fill": "\f6fa", + "device-ssd": "\f6fb", + "displayport-fill": "\f6fc", + "mortarboard-fill": "\f6fd", + "mortarboard": "\f6fe", + "terminal-x": "\f6ff", + "arrow-through-heart-fill": "\f700", + "arrow-through-heart": "\f701", + "badge-sd-fill": "\f702", + "badge-sd": "\f703", + "bag-heart-fill": "\f704", + "bag-heart": "\f705", + "balloon-fill": "\f706", + "balloon-heart-fill": "\f707", + "balloon-heart": "\f708", + "balloon": "\f709", + "box2-fill": "\f70a", + "box2-heart-fill": "\f70b", + "box2-heart": "\f70c", + "box2": "\f70d", + "braces-asterisk": "\f70e", + "calendar-heart-fill": "\f70f", + "calendar-heart": "\f710", + "calendar2-heart-fill": "\f711", + "calendar2-heart": "\f712", + "chat-heart-fill": "\f713", + "chat-heart": "\f714", + "chat-left-heart-fill": "\f715", + "chat-left-heart": "\f716", + "chat-right-heart-fill": "\f717", + "chat-right-heart": "\f718", + "chat-square-heart-fill": "\f719", + "chat-square-heart": "\f71a", + "clipboard-check-fill": "\f71b", + "clipboard-data-fill": "\f71c", + "clipboard-fill": "\f71d", + "clipboard-heart-fill": "\f71e", + "clipboard-heart": "\f71f", + "clipboard-minus-fill": "\f720", + "clipboard-plus-fill": "\f721", + "clipboard-pulse": "\f722", + "clipboard-x-fill": "\f723", + "clipboard2-check-fill": "\f724", + "clipboard2-check": "\f725", + "clipboard2-data-fill": "\f726", + "clipboard2-data": "\f727", + "clipboard2-fill": "\f728", + "clipboard2-heart-fill": "\f729", + "clipboard2-heart": "\f72a", + "clipboard2-minus-fill": "\f72b", + "clipboard2-minus": "\f72c", + "clipboard2-plus-fill": "\f72d", + "clipboard2-plus": "\f72e", + "clipboard2-pulse-fill": "\f72f", + "clipboard2-pulse": "\f730", + "clipboard2-x-fill": "\f731", + "clipboard2-x": "\f732", + "clipboard2": "\f733", + "emoji-kiss-fill": "\f734", + "emoji-kiss": "\f735", + "envelope-heart-fill": "\f736", + "envelope-heart": "\f737", + "envelope-open-heart-fill": "\f738", + "envelope-open-heart": "\f739", + "envelope-paper-fill": "\f73a", + "envelope-paper-heart-fill": "\f73b", + "envelope-paper-heart": "\f73c", + "envelope-paper": "\f73d", + "filetype-aac": "\f73e", + "filetype-ai": "\f73f", + "filetype-bmp": "\f740", + "filetype-cs": "\f741", + "filetype-css": "\f742", + "filetype-csv": "\f743", + "filetype-doc": "\f744", + "filetype-docx": "\f745", + "filetype-exe": "\f746", + "filetype-gif": "\f747", + "filetype-heic": "\f748", + "filetype-html": "\f749", + "filetype-java": "\f74a", + "filetype-jpg": "\f74b", + "filetype-js": "\f74c", + "filetype-jsx": "\f74d", + "filetype-key": "\f74e", + "filetype-m4p": "\f74f", + "filetype-md": "\f750", + "filetype-mdx": "\f751", + "filetype-mov": "\f752", + "filetype-mp3": "\f753", + "filetype-mp4": "\f754", + "filetype-otf": "\f755", + "filetype-pdf": "\f756", + "filetype-php": "\f757", + "filetype-png": "\f758", + "filetype-ppt": "\f75a", + "filetype-psd": "\f75b", + "filetype-py": "\f75c", + "filetype-raw": "\f75d", + "filetype-rb": "\f75e", + "filetype-sass": "\f75f", + "filetype-scss": "\f760", + "filetype-sh": "\f761", + "filetype-svg": "\f762", + "filetype-tiff": "\f763", + "filetype-tsx": "\f764", + "filetype-ttf": "\f765", + "filetype-txt": "\f766", + "filetype-wav": "\f767", + "filetype-woff": "\f768", + "filetype-xls": "\f76a", + "filetype-xml": "\f76b", + "filetype-yml": "\f76c", + "heart-arrow": "\f76d", + "heart-pulse-fill": "\f76e", + "heart-pulse": "\f76f", + "heartbreak-fill": "\f770", + "heartbreak": "\f771", + "hearts": "\f772", + "hospital-fill": "\f773", + "hospital": "\f774", + "house-heart-fill": "\f775", + "house-heart": "\f776", + "incognito": "\f777", + "magnet-fill": "\f778", + "magnet": "\f779", + "person-heart": "\f77a", + "person-hearts": "\f77b", + "phone-flip": "\f77c", + "plugin": "\f77d", + "postage-fill": "\f77e", + "postage-heart-fill": "\f77f", + "postage-heart": "\f780", + "postage": "\f781", + "postcard-fill": "\f782", + "postcard-heart-fill": "\f783", + "postcard-heart": "\f784", + "postcard": "\f785", + "search-heart-fill": "\f786", + "search-heart": "\f787", + "sliders2-vertical": "\f788", + "sliders2": "\f789", + "trash3-fill": "\f78a", + "trash3": "\f78b", + "valentine": "\f78c", + "valentine2": "\f78d", + "wrench-adjustable-circle-fill": "\f78e", + "wrench-adjustable-circle": "\f78f", + "wrench-adjustable": "\f790", + "filetype-json": "\f791", + "filetype-pptx": "\f792", + "filetype-xlsx": "\f793", + "1-circle-fill": "\f796", + "1-circle": "\f797", + "1-square-fill": "\f798", + "1-square": "\f799", + "2-circle-fill": "\f79c", + "2-circle": "\f79d", + "2-square-fill": "\f79e", + "2-square": "\f79f", + "3-circle-fill": "\f7a2", + "3-circle": "\f7a3", + "3-square-fill": "\f7a4", + "3-square": "\f7a5", + "4-circle-fill": "\f7a8", + "4-circle": "\f7a9", + "4-square-fill": "\f7aa", + "4-square": "\f7ab", + "5-circle-fill": "\f7ae", + "5-circle": "\f7af", + "5-square-fill": "\f7b0", + "5-square": "\f7b1", + "6-circle-fill": "\f7b4", + "6-circle": "\f7b5", + "6-square-fill": "\f7b6", + "6-square": "\f7b7", + "7-circle-fill": "\f7ba", + "7-circle": "\f7bb", + "7-square-fill": "\f7bc", + "7-square": "\f7bd", + "8-circle-fill": "\f7c0", + "8-circle": "\f7c1", + "8-square-fill": "\f7c2", + "8-square": "\f7c3", + "9-circle-fill": "\f7c6", + "9-circle": "\f7c7", + "9-square-fill": "\f7c8", + "9-square": "\f7c9", + "airplane-engines-fill": "\f7ca", + "airplane-engines": "\f7cb", + "airplane-fill": "\f7cc", + "airplane": "\f7cd", + "alexa": "\f7ce", + "alipay": "\f7cf", + "android": "\f7d0", + "android2": "\f7d1", + "box-fill": "\f7d2", + "box-seam-fill": "\f7d3", + "browser-chrome": "\f7d4", + "browser-edge": "\f7d5", + "browser-firefox": "\f7d6", + "browser-safari": "\f7d7", + "c-circle-fill": "\f7da", + "c-circle": "\f7db", + "c-square-fill": "\f7dc", + "c-square": "\f7dd", + "capsule-pill": "\f7de", + "capsule": "\f7df", + "car-front-fill": "\f7e0", + "car-front": "\f7e1", + "cassette-fill": "\f7e2", + "cassette": "\f7e3", + "cc-circle-fill": "\f7e6", + "cc-circle": "\f7e7", + "cc-square-fill": "\f7e8", + "cc-square": "\f7e9", + "cup-hot-fill": "\f7ea", + "cup-hot": "\f7eb", + "currency-rupee": "\f7ec", + "dropbox": "\f7ed", + "escape": "\f7ee", + "fast-forward-btn-fill": "\f7ef", + "fast-forward-btn": "\f7f0", + "fast-forward-circle-fill": "\f7f1", + "fast-forward-circle": "\f7f2", + "fast-forward-fill": "\f7f3", + "fast-forward": "\f7f4", + "filetype-sql": "\f7f5", + "fire": "\f7f6", + "google-play": "\f7f7", + "h-circle-fill": "\f7fa", + "h-circle": "\f7fb", + "h-square-fill": "\f7fc", + "h-square": "\f7fd", + "indent": "\f7fe", + "lungs-fill": "\f7ff", + "lungs": "\f800", + "microsoft-teams": "\f801", + "p-circle-fill": "\f804", + "p-circle": "\f805", + "p-square-fill": "\f806", + "p-square": "\f807", + "pass-fill": "\f808", + "pass": "\f809", + "prescription": "\f80a", + "prescription2": "\f80b", + "r-circle-fill": "\f80e", + "r-circle": "\f80f", + "r-square-fill": "\f810", + "r-square": "\f811", + "repeat-1": "\f812", + "repeat": "\f813", + "rewind-btn-fill": "\f814", + "rewind-btn": "\f815", + "rewind-circle-fill": "\f816", + "rewind-circle": "\f817", + "rewind-fill": "\f818", + "rewind": "\f819", + "train-freight-front-fill": "\f81a", + "train-freight-front": "\f81b", + "train-front-fill": "\f81c", + "train-front": "\f81d", + "train-lightrail-front-fill": "\f81e", + "train-lightrail-front": "\f81f", + "truck-front-fill": "\f820", + "truck-front": "\f821", + "ubuntu": "\f822", + "unindent": "\f823", + "unity": "\f824", + "universal-access-circle": "\f825", + "universal-access": "\f826", + "virus": "\f827", + "virus2": "\f828", + "wechat": "\f829", + "yelp": "\f82a", + "sign-stop-fill": "\f82b", + "sign-stop-lights-fill": "\f82c", + "sign-stop-lights": "\f82d", + "sign-stop": "\f82e", + "sign-turn-left-fill": "\f82f", + "sign-turn-left": "\f830", + "sign-turn-right-fill": "\f831", + "sign-turn-right": "\f832", + "sign-turn-slight-left-fill": "\f833", + "sign-turn-slight-left": "\f834", + "sign-turn-slight-right-fill": "\f835", + "sign-turn-slight-right": "\f836", + "sign-yield-fill": "\f837", + "sign-yield": "\f838", + "ev-station-fill": "\f839", + "ev-station": "\f83a", + "fuel-pump-diesel-fill": "\f83b", + "fuel-pump-diesel": "\f83c", + "fuel-pump-fill": "\f83d", + "fuel-pump": "\f83e", + "0-circle-fill": "\f83f", + "0-circle": "\f840", + "0-square-fill": "\f841", + "0-square": "\f842", + "rocket-fill": "\f843", + "rocket-takeoff-fill": "\f844", + "rocket-takeoff": "\f845", + "rocket": "\f846", + "stripe": "\f847", + "subscript": "\f848", + "superscript": "\f849", + "trello": "\f84a", + "envelope-at-fill": "\f84b", + "envelope-at": "\f84c", + "regex": "\f84d", + "text-wrap": "\f84e", + "sign-dead-end-fill": "\f84f", + "sign-dead-end": "\f850", + "sign-do-not-enter-fill": "\f851", + "sign-do-not-enter": "\f852", + "sign-intersection-fill": "\f853", + "sign-intersection-side-fill": "\f854", + "sign-intersection-side": "\f855", + "sign-intersection-t-fill": "\f856", + "sign-intersection-t": "\f857", + "sign-intersection-y-fill": "\f858", + "sign-intersection-y": "\f859", + "sign-intersection": "\f85a", + "sign-merge-left-fill": "\f85b", + "sign-merge-left": "\f85c", + "sign-merge-right-fill": "\f85d", + "sign-merge-right": "\f85e", + "sign-no-left-turn-fill": "\f85f", + "sign-no-left-turn": "\f860", + "sign-no-parking-fill": "\f861", + "sign-no-parking": "\f862", + "sign-no-right-turn-fill": "\f863", + "sign-no-right-turn": "\f864", + "sign-railroad-fill": "\f865", + "sign-railroad": "\f866", + "building-add": "\f867", + "building-check": "\f868", + "building-dash": "\f869", + "building-down": "\f86a", + "building-exclamation": "\f86b", + "building-fill-add": "\f86c", + "building-fill-check": "\f86d", + "building-fill-dash": "\f86e", + "building-fill-down": "\f86f", + "building-fill-exclamation": "\f870", + "building-fill-gear": "\f871", + "building-fill-lock": "\f872", + "building-fill-slash": "\f873", + "building-fill-up": "\f874", + "building-fill-x": "\f875", + "building-fill": "\f876", + "building-gear": "\f877", + "building-lock": "\f878", + "building-slash": "\f879", + "building-up": "\f87a", + "building-x": "\f87b", + "buildings-fill": "\f87c", + "buildings": "\f87d", + "bus-front-fill": "\f87e", + "bus-front": "\f87f", + "ev-front-fill": "\f880", + "ev-front": "\f881", + "globe-americas": "\f882", + "globe-asia-australia": "\f883", + "globe-central-south-asia": "\f884", + "globe-europe-africa": "\f885", + "house-add-fill": "\f886", + "house-add": "\f887", + "house-check-fill": "\f888", + "house-check": "\f889", + "house-dash-fill": "\f88a", + "house-dash": "\f88b", + "house-down-fill": "\f88c", + "house-down": "\f88d", + "house-exclamation-fill": "\f88e", + "house-exclamation": "\f88f", + "house-gear-fill": "\f890", + "house-gear": "\f891", + "house-lock-fill": "\f892", + "house-lock": "\f893", + "house-slash-fill": "\f894", + "house-slash": "\f895", + "house-up-fill": "\f896", + "house-up": "\f897", + "house-x-fill": "\f898", + "house-x": "\f899", + "person-add": "\f89a", + "person-down": "\f89b", + "person-exclamation": "\f89c", + "person-fill-add": "\f89d", + "person-fill-check": "\f89e", + "person-fill-dash": "\f89f", + "person-fill-down": "\f8a0", + "person-fill-exclamation": "\f8a1", + "person-fill-gear": "\f8a2", + "person-fill-lock": "\f8a3", + "person-fill-slash": "\f8a4", + "person-fill-up": "\f8a5", + "person-fill-x": "\f8a6", + "person-gear": "\f8a7", + "person-lock": "\f8a8", + "person-slash": "\f8a9", + "person-up": "\f8aa", + "scooter": "\f8ab", + "taxi-front-fill": "\f8ac", + "taxi-front": "\f8ad", + "amd": "\f8ae", + "database-add": "\f8af", + "database-check": "\f8b0", + "database-dash": "\f8b1", + "database-down": "\f8b2", + "database-exclamation": "\f8b3", + "database-fill-add": "\f8b4", + "database-fill-check": "\f8b5", + "database-fill-dash": "\f8b6", + "database-fill-down": "\f8b7", + "database-fill-exclamation": "\f8b8", + "database-fill-gear": "\f8b9", + "database-fill-lock": "\f8ba", + "database-fill-slash": "\f8bb", + "database-fill-up": "\f8bc", + "database-fill-x": "\f8bd", + "database-fill": "\f8be", + "database-gear": "\f8bf", + "database-lock": "\f8c0", + "database-slash": "\f8c1", + "database-up": "\f8c2", + "database-x": "\f8c3", + "database": "\f8c4", + "houses-fill": "\f8c5", + "houses": "\f8c6", + "nvidia": "\f8c7", + "person-vcard-fill": "\f8c8", + "person-vcard": "\f8c9", + "sina-weibo": "\f8ca", + "tencent-qq": "\f8cb", + "wikipedia": "\f8cc", +); + +@each $icon, $codepoint in $bootstrap-icons-map { + .bi-#{$icon}::before { content: $codepoint; } +} diff --git a/src/mono/sample/wasm/blazor-frame/wwwroot/css/bootstrap-icons/fonts/bootstrap-icons.woff b/src/mono/sample/wasm/blazor-frame/wwwroot/css/bootstrap-icons/fonts/bootstrap-icons.woff new file mode 100644 index 00000000000000..6e72a590a26bc7 Binary files /dev/null and b/src/mono/sample/wasm/blazor-frame/wwwroot/css/bootstrap-icons/fonts/bootstrap-icons.woff differ diff --git a/src/mono/sample/wasm/blazor-frame/wwwroot/css/bootstrap-icons/fonts/bootstrap-icons.woff2 b/src/mono/sample/wasm/blazor-frame/wwwroot/css/bootstrap-icons/fonts/bootstrap-icons.woff2 new file mode 100644 index 00000000000000..3b957d5a764cc0 Binary files /dev/null and b/src/mono/sample/wasm/blazor-frame/wwwroot/css/bootstrap-icons/fonts/bootstrap-icons.woff2 differ diff --git a/src/mono/sample/wasm/blazor-frame/wwwroot/css/bootstrap/bootstrap.min.css b/src/mono/sample/wasm/blazor-frame/wwwroot/css/bootstrap/bootstrap.min.css new file mode 100644 index 00000000000000..02ae65b5fe5d12 --- /dev/null +++ b/src/mono/sample/wasm/blazor-frame/wwwroot/css/bootstrap/bootstrap.min.css @@ -0,0 +1,7 @@ +@charset "UTF-8";/*! + * Bootstrap v5.1.0 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors + * Copyright 2011-2021 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */:root{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs-secondary:#6c757d;--bs-success:#198754;--bs-info:#0dcaf0;--bs-warning:#ffc107;--bs-danger:#dc3545;--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13,110,253;--bs-secondary-rgb:108,117,125;--bs-success-rgb:25,135,84;--bs-info-rgb:13,202,240;--bs-warning-rgb:255,193,7;--bs-danger-rgb:220,53,69;--bs-light-rgb:248,249,250;--bs-dark-rgb:33,37,41;--bs-white-rgb:255,255,255;--bs-black-rgb:0,0,0;--bs-body-rgb:33,37,41;--bs-font-sans-serif:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--bs-font-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-bg:#fff}*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){.h1,h1{font-size:2.5rem}}.h2,h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){.h2,h2{font-size:2rem}}.h3,h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){.h3,h3{font-size:1.75rem}}.h4,h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){.h4,h4{font-size:1.5rem}}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[data-bs-original-title],abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}.small,small{font-size:.875em}.mark,mark{padding:.2em;background-color:#fcf8e3}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#0a58ca}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:var(--bs-font-monospace);font-size:1em;direction:ltr;unicode-bidi:bidi-override}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]::-webkit-calendar-picker-indicator{display:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:calc(1.625rem + 4.5vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-1{font-size:5rem}}.display-2{font-size:calc(1.575rem + 3.9vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-2{font-size:4.5rem}}.display-3{font-size:calc(1.525rem + 3.3vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-3{font-size:4rem}}.display-4{font-size:calc(1.475rem + 2.7vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-4{font-size:3.5rem}}.display-5{font-size:calc(1.425rem + 2.1vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-5{font-size:3rem}}.display-6{font-size:calc(1.375rem + 1.5vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-6{font-size:2.5rem}}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:.5rem}.initialism{font-size:.875em;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.25rem}.blockquote>:last-child{margin-bottom:0}.blockquote-footer{margin-top:-1rem;margin-bottom:1rem;font-size:.875em;color:#6c757d}.blockquote-footer::before{content:"— "}.img-fluid{max-width:100%;height:auto}.img-thumbnail{padding:.25rem;background-color:#fff;border:1px solid #dee2e6;border-radius:.25rem;max-width:100%;height:auto}.figure{display:inline-block}.figure-img{margin-bottom:.5rem;line-height:1}.figure-caption{font-size:.875em;color:#6c757d}.container,.container-fluid,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{width:100%;padding-right:var(--bs-gutter-x,.75rem);padding-left:var(--bs-gutter-x,.75rem);margin-right:auto;margin-left:auto}@media (min-width:576px){.container,.container-sm{max-width:540px}}@media (min-width:768px){.container,.container-md,.container-sm{max-width:720px}}@media (min-width:992px){.container,.container-lg,.container-md,.container-sm{max-width:960px}}@media (min-width:1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1140px}}@media (min-width:1400px){.container,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{max-width:1320px}}.row{--bs-gutter-x:1.5rem;--bs-gutter-y:0;display:flex;flex-wrap:wrap;margin-top:calc(var(--bs-gutter-y) * -1);margin-right:calc(var(--bs-gutter-x) * -.5);margin-left:calc(var(--bs-gutter-x) * -.5)}.row>*{flex-shrink:0;width:100%;max-width:100%;padding-right:calc(var(--bs-gutter-x) * .5);padding-left:calc(var(--bs-gutter-x) * .5);margin-top:var(--bs-gutter-y)}.col{flex:1 0 0%}.row-cols-auto>*{flex:0 0 auto;width:auto}.row-cols-1>*{flex:0 0 auto;width:100%}.row-cols-2>*{flex:0 0 auto;width:50%}.row-cols-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-4>*{flex:0 0 auto;width:25%}.row-cols-5>*{flex:0 0 auto;width:20%}.row-cols-6>*{flex:0 0 auto;width:16.6666666667%}.col-auto{flex:0 0 auto;width:auto}.col-1{flex:0 0 auto;width:8.33333333%}.col-2{flex:0 0 auto;width:16.66666667%}.col-3{flex:0 0 auto;width:25%}.col-4{flex:0 0 auto;width:33.33333333%}.col-5{flex:0 0 auto;width:41.66666667%}.col-6{flex:0 0 auto;width:50%}.col-7{flex:0 0 auto;width:58.33333333%}.col-8{flex:0 0 auto;width:66.66666667%}.col-9{flex:0 0 auto;width:75%}.col-10{flex:0 0 auto;width:83.33333333%}.col-11{flex:0 0 auto;width:91.66666667%}.col-12{flex:0 0 auto;width:100%}.offset-1{margin-left:8.33333333%}.offset-2{margin-left:16.66666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.33333333%}.offset-5{margin-left:41.66666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.33333333%}.offset-8{margin-left:66.66666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.33333333%}.offset-11{margin-left:91.66666667%}.g-0,.gx-0{--bs-gutter-x:0}.g-0,.gy-0{--bs-gutter-y:0}.g-1,.gx-1{--bs-gutter-x:0.25rem}.g-1,.gy-1{--bs-gutter-y:0.25rem}.g-2,.gx-2{--bs-gutter-x:0.5rem}.g-2,.gy-2{--bs-gutter-y:0.5rem}.g-3,.gx-3{--bs-gutter-x:1rem}.g-3,.gy-3{--bs-gutter-y:1rem}.g-4,.gx-4{--bs-gutter-x:1.5rem}.g-4,.gy-4{--bs-gutter-y:1.5rem}.g-5,.gx-5{--bs-gutter-x:3rem}.g-5,.gy-5{--bs-gutter-y:3rem}@media (min-width:576px){.col-sm{flex:1 0 0%}.row-cols-sm-auto>*{flex:0 0 auto;width:auto}.row-cols-sm-1>*{flex:0 0 auto;width:100%}.row-cols-sm-2>*{flex:0 0 auto;width:50%}.row-cols-sm-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-sm-4>*{flex:0 0 auto;width:25%}.row-cols-sm-5>*{flex:0 0 auto;width:20%}.row-cols-sm-6>*{flex:0 0 auto;width:16.6666666667%}.col-sm-auto{flex:0 0 auto;width:auto}.col-sm-1{flex:0 0 auto;width:8.33333333%}.col-sm-2{flex:0 0 auto;width:16.66666667%}.col-sm-3{flex:0 0 auto;width:25%}.col-sm-4{flex:0 0 auto;width:33.33333333%}.col-sm-5{flex:0 0 auto;width:41.66666667%}.col-sm-6{flex:0 0 auto;width:50%}.col-sm-7{flex:0 0 auto;width:58.33333333%}.col-sm-8{flex:0 0 auto;width:66.66666667%}.col-sm-9{flex:0 0 auto;width:75%}.col-sm-10{flex:0 0 auto;width:83.33333333%}.col-sm-11{flex:0 0 auto;width:91.66666667%}.col-sm-12{flex:0 0 auto;width:100%}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.33333333%}.offset-sm-2{margin-left:16.66666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.33333333%}.offset-sm-5{margin-left:41.66666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.33333333%}.offset-sm-8{margin-left:66.66666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.33333333%}.offset-sm-11{margin-left:91.66666667%}.g-sm-0,.gx-sm-0{--bs-gutter-x:0}.g-sm-0,.gy-sm-0{--bs-gutter-y:0}.g-sm-1,.gx-sm-1{--bs-gutter-x:0.25rem}.g-sm-1,.gy-sm-1{--bs-gutter-y:0.25rem}.g-sm-2,.gx-sm-2{--bs-gutter-x:0.5rem}.g-sm-2,.gy-sm-2{--bs-gutter-y:0.5rem}.g-sm-3,.gx-sm-3{--bs-gutter-x:1rem}.g-sm-3,.gy-sm-3{--bs-gutter-y:1rem}.g-sm-4,.gx-sm-4{--bs-gutter-x:1.5rem}.g-sm-4,.gy-sm-4{--bs-gutter-y:1.5rem}.g-sm-5,.gx-sm-5{--bs-gutter-x:3rem}.g-sm-5,.gy-sm-5{--bs-gutter-y:3rem}}@media (min-width:768px){.col-md{flex:1 0 0%}.row-cols-md-auto>*{flex:0 0 auto;width:auto}.row-cols-md-1>*{flex:0 0 auto;width:100%}.row-cols-md-2>*{flex:0 0 auto;width:50%}.row-cols-md-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-md-4>*{flex:0 0 auto;width:25%}.row-cols-md-5>*{flex:0 0 auto;width:20%}.row-cols-md-6>*{flex:0 0 auto;width:16.6666666667%}.col-md-auto{flex:0 0 auto;width:auto}.col-md-1{flex:0 0 auto;width:8.33333333%}.col-md-2{flex:0 0 auto;width:16.66666667%}.col-md-3{flex:0 0 auto;width:25%}.col-md-4{flex:0 0 auto;width:33.33333333%}.col-md-5{flex:0 0 auto;width:41.66666667%}.col-md-6{flex:0 0 auto;width:50%}.col-md-7{flex:0 0 auto;width:58.33333333%}.col-md-8{flex:0 0 auto;width:66.66666667%}.col-md-9{flex:0 0 auto;width:75%}.col-md-10{flex:0 0 auto;width:83.33333333%}.col-md-11{flex:0 0 auto;width:91.66666667%}.col-md-12{flex:0 0 auto;width:100%}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.33333333%}.offset-md-2{margin-left:16.66666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.33333333%}.offset-md-5{margin-left:41.66666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.33333333%}.offset-md-8{margin-left:66.66666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.33333333%}.offset-md-11{margin-left:91.66666667%}.g-md-0,.gx-md-0{--bs-gutter-x:0}.g-md-0,.gy-md-0{--bs-gutter-y:0}.g-md-1,.gx-md-1{--bs-gutter-x:0.25rem}.g-md-1,.gy-md-1{--bs-gutter-y:0.25rem}.g-md-2,.gx-md-2{--bs-gutter-x:0.5rem}.g-md-2,.gy-md-2{--bs-gutter-y:0.5rem}.g-md-3,.gx-md-3{--bs-gutter-x:1rem}.g-md-3,.gy-md-3{--bs-gutter-y:1rem}.g-md-4,.gx-md-4{--bs-gutter-x:1.5rem}.g-md-4,.gy-md-4{--bs-gutter-y:1.5rem}.g-md-5,.gx-md-5{--bs-gutter-x:3rem}.g-md-5,.gy-md-5{--bs-gutter-y:3rem}}@media (min-width:992px){.col-lg{flex:1 0 0%}.row-cols-lg-auto>*{flex:0 0 auto;width:auto}.row-cols-lg-1>*{flex:0 0 auto;width:100%}.row-cols-lg-2>*{flex:0 0 auto;width:50%}.row-cols-lg-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-lg-4>*{flex:0 0 auto;width:25%}.row-cols-lg-5>*{flex:0 0 auto;width:20%}.row-cols-lg-6>*{flex:0 0 auto;width:16.6666666667%}.col-lg-auto{flex:0 0 auto;width:auto}.col-lg-1{flex:0 0 auto;width:8.33333333%}.col-lg-2{flex:0 0 auto;width:16.66666667%}.col-lg-3{flex:0 0 auto;width:25%}.col-lg-4{flex:0 0 auto;width:33.33333333%}.col-lg-5{flex:0 0 auto;width:41.66666667%}.col-lg-6{flex:0 0 auto;width:50%}.col-lg-7{flex:0 0 auto;width:58.33333333%}.col-lg-8{flex:0 0 auto;width:66.66666667%}.col-lg-9{flex:0 0 auto;width:75%}.col-lg-10{flex:0 0 auto;width:83.33333333%}.col-lg-11{flex:0 0 auto;width:91.66666667%}.col-lg-12{flex:0 0 auto;width:100%}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.33333333%}.offset-lg-2{margin-left:16.66666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.33333333%}.offset-lg-5{margin-left:41.66666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.33333333%}.offset-lg-8{margin-left:66.66666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.33333333%}.offset-lg-11{margin-left:91.66666667%}.g-lg-0,.gx-lg-0{--bs-gutter-x:0}.g-lg-0,.gy-lg-0{--bs-gutter-y:0}.g-lg-1,.gx-lg-1{--bs-gutter-x:0.25rem}.g-lg-1,.gy-lg-1{--bs-gutter-y:0.25rem}.g-lg-2,.gx-lg-2{--bs-gutter-x:0.5rem}.g-lg-2,.gy-lg-2{--bs-gutter-y:0.5rem}.g-lg-3,.gx-lg-3{--bs-gutter-x:1rem}.g-lg-3,.gy-lg-3{--bs-gutter-y:1rem}.g-lg-4,.gx-lg-4{--bs-gutter-x:1.5rem}.g-lg-4,.gy-lg-4{--bs-gutter-y:1.5rem}.g-lg-5,.gx-lg-5{--bs-gutter-x:3rem}.g-lg-5,.gy-lg-5{--bs-gutter-y:3rem}}@media (min-width:1200px){.col-xl{flex:1 0 0%}.row-cols-xl-auto>*{flex:0 0 auto;width:auto}.row-cols-xl-1>*{flex:0 0 auto;width:100%}.row-cols-xl-2>*{flex:0 0 auto;width:50%}.row-cols-xl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xl-4>*{flex:0 0 auto;width:25%}.row-cols-xl-5>*{flex:0 0 auto;width:20%}.row-cols-xl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xl-auto{flex:0 0 auto;width:auto}.col-xl-1{flex:0 0 auto;width:8.33333333%}.col-xl-2{flex:0 0 auto;width:16.66666667%}.col-xl-3{flex:0 0 auto;width:25%}.col-xl-4{flex:0 0 auto;width:33.33333333%}.col-xl-5{flex:0 0 auto;width:41.66666667%}.col-xl-6{flex:0 0 auto;width:50%}.col-xl-7{flex:0 0 auto;width:58.33333333%}.col-xl-8{flex:0 0 auto;width:66.66666667%}.col-xl-9{flex:0 0 auto;width:75%}.col-xl-10{flex:0 0 auto;width:83.33333333%}.col-xl-11{flex:0 0 auto;width:91.66666667%}.col-xl-12{flex:0 0 auto;width:100%}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.33333333%}.offset-xl-2{margin-left:16.66666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.33333333%}.offset-xl-5{margin-left:41.66666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.33333333%}.offset-xl-8{margin-left:66.66666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.33333333%}.offset-xl-11{margin-left:91.66666667%}.g-xl-0,.gx-xl-0{--bs-gutter-x:0}.g-xl-0,.gy-xl-0{--bs-gutter-y:0}.g-xl-1,.gx-xl-1{--bs-gutter-x:0.25rem}.g-xl-1,.gy-xl-1{--bs-gutter-y:0.25rem}.g-xl-2,.gx-xl-2{--bs-gutter-x:0.5rem}.g-xl-2,.gy-xl-2{--bs-gutter-y:0.5rem}.g-xl-3,.gx-xl-3{--bs-gutter-x:1rem}.g-xl-3,.gy-xl-3{--bs-gutter-y:1rem}.g-xl-4,.gx-xl-4{--bs-gutter-x:1.5rem}.g-xl-4,.gy-xl-4{--bs-gutter-y:1.5rem}.g-xl-5,.gx-xl-5{--bs-gutter-x:3rem}.g-xl-5,.gy-xl-5{--bs-gutter-y:3rem}}@media (min-width:1400px){.col-xxl{flex:1 0 0%}.row-cols-xxl-auto>*{flex:0 0 auto;width:auto}.row-cols-xxl-1>*{flex:0 0 auto;width:100%}.row-cols-xxl-2>*{flex:0 0 auto;width:50%}.row-cols-xxl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xxl-4>*{flex:0 0 auto;width:25%}.row-cols-xxl-5>*{flex:0 0 auto;width:20%}.row-cols-xxl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xxl-auto{flex:0 0 auto;width:auto}.col-xxl-1{flex:0 0 auto;width:8.33333333%}.col-xxl-2{flex:0 0 auto;width:16.66666667%}.col-xxl-3{flex:0 0 auto;width:25%}.col-xxl-4{flex:0 0 auto;width:33.33333333%}.col-xxl-5{flex:0 0 auto;width:41.66666667%}.col-xxl-6{flex:0 0 auto;width:50%}.col-xxl-7{flex:0 0 auto;width:58.33333333%}.col-xxl-8{flex:0 0 auto;width:66.66666667%}.col-xxl-9{flex:0 0 auto;width:75%}.col-xxl-10{flex:0 0 auto;width:83.33333333%}.col-xxl-11{flex:0 0 auto;width:91.66666667%}.col-xxl-12{flex:0 0 auto;width:100%}.offset-xxl-0{margin-left:0}.offset-xxl-1{margin-left:8.33333333%}.offset-xxl-2{margin-left:16.66666667%}.offset-xxl-3{margin-left:25%}.offset-xxl-4{margin-left:33.33333333%}.offset-xxl-5{margin-left:41.66666667%}.offset-xxl-6{margin-left:50%}.offset-xxl-7{margin-left:58.33333333%}.offset-xxl-8{margin-left:66.66666667%}.offset-xxl-9{margin-left:75%}.offset-xxl-10{margin-left:83.33333333%}.offset-xxl-11{margin-left:91.66666667%}.g-xxl-0,.gx-xxl-0{--bs-gutter-x:0}.g-xxl-0,.gy-xxl-0{--bs-gutter-y:0}.g-xxl-1,.gx-xxl-1{--bs-gutter-x:0.25rem}.g-xxl-1,.gy-xxl-1{--bs-gutter-y:0.25rem}.g-xxl-2,.gx-xxl-2{--bs-gutter-x:0.5rem}.g-xxl-2,.gy-xxl-2{--bs-gutter-y:0.5rem}.g-xxl-3,.gx-xxl-3{--bs-gutter-x:1rem}.g-xxl-3,.gy-xxl-3{--bs-gutter-y:1rem}.g-xxl-4,.gx-xxl-4{--bs-gutter-x:1.5rem}.g-xxl-4,.gy-xxl-4{--bs-gutter-y:1.5rem}.g-xxl-5,.gx-xxl-5{--bs-gutter-x:3rem}.g-xxl-5,.gy-xxl-5{--bs-gutter-y:3rem}}.table{--bs-table-bg:transparent;--bs-table-accent-bg:transparent;--bs-table-striped-color:#212529;--bs-table-striped-bg:rgba(0, 0, 0, 0.05);--bs-table-active-color:#212529;--bs-table-active-bg:rgba(0, 0, 0, 0.1);--bs-table-hover-color:#212529;--bs-table-hover-bg:rgba(0, 0, 0, 0.075);width:100%;margin-bottom:1rem;color:#212529;vertical-align:top;border-color:#dee2e6}.table>:not(caption)>*>*{padding:.5rem .5rem;background-color:var(--bs-table-bg);border-bottom-width:1px;box-shadow:inset 0 0 0 9999px var(--bs-table-accent-bg)}.table>tbody{vertical-align:inherit}.table>thead{vertical-align:bottom}.table>:not(:last-child)>:last-child>*{border-bottom-color:currentColor}.caption-top{caption-side:top}.table-sm>:not(caption)>*>*{padding:.25rem .25rem}.table-bordered>:not(caption)>*{border-width:1px 0}.table-bordered>:not(caption)>*>*{border-width:0 1px}.table-borderless>:not(caption)>*>*{border-bottom-width:0}.table-striped>tbody>tr:nth-of-type(odd){--bs-table-accent-bg:var(--bs-table-striped-bg);color:var(--bs-table-striped-color)}.table-active{--bs-table-accent-bg:var(--bs-table-active-bg);color:var(--bs-table-active-color)}.table-hover>tbody>tr:hover{--bs-table-accent-bg:var(--bs-table-hover-bg);color:var(--bs-table-hover-color)}.table-primary{--bs-table-bg:#cfe2ff;--bs-table-striped-bg:#c5d7f2;--bs-table-striped-color:#000;--bs-table-active-bg:#bacbe6;--bs-table-active-color:#000;--bs-table-hover-bg:#bfd1ec;--bs-table-hover-color:#000;color:#000;border-color:#bacbe6}.table-secondary{--bs-table-bg:#e2e3e5;--bs-table-striped-bg:#d7d8da;--bs-table-striped-color:#000;--bs-table-active-bg:#cbccce;--bs-table-active-color:#000;--bs-table-hover-bg:#d1d2d4;--bs-table-hover-color:#000;color:#000;border-color:#cbccce}.table-success{--bs-table-bg:#d1e7dd;--bs-table-striped-bg:#c7dbd2;--bs-table-striped-color:#000;--bs-table-active-bg:#bcd0c7;--bs-table-active-color:#000;--bs-table-hover-bg:#c1d6cc;--bs-table-hover-color:#000;color:#000;border-color:#bcd0c7}.table-info{--bs-table-bg:#cff4fc;--bs-table-striped-bg:#c5e8ef;--bs-table-striped-color:#000;--bs-table-active-bg:#badce3;--bs-table-active-color:#000;--bs-table-hover-bg:#bfe2e9;--bs-table-hover-color:#000;color:#000;border-color:#badce3}.table-warning{--bs-table-bg:#fff3cd;--bs-table-striped-bg:#f2e7c3;--bs-table-striped-color:#000;--bs-table-active-bg:#e6dbb9;--bs-table-active-color:#000;--bs-table-hover-bg:#ece1be;--bs-table-hover-color:#000;color:#000;border-color:#e6dbb9}.table-danger{--bs-table-bg:#f8d7da;--bs-table-striped-bg:#eccccf;--bs-table-striped-color:#000;--bs-table-active-bg:#dfc2c4;--bs-table-active-color:#000;--bs-table-hover-bg:#e5c7ca;--bs-table-hover-color:#000;color:#000;border-color:#dfc2c4}.table-light{--bs-table-bg:#f8f9fa;--bs-table-striped-bg:#ecedee;--bs-table-striped-color:#000;--bs-table-active-bg:#dfe0e1;--bs-table-active-color:#000;--bs-table-hover-bg:#e5e6e7;--bs-table-hover-color:#000;color:#000;border-color:#dfe0e1}.table-dark{--bs-table-bg:#212529;--bs-table-striped-bg:#2c3034;--bs-table-striped-color:#fff;--bs-table-active-bg:#373b3e;--bs-table-active-color:#fff;--bs-table-hover-bg:#323539;--bs-table-hover-color:#fff;color:#fff;border-color:#373b3e}.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}@media (max-width:575.98px){.table-responsive-sm{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:767.98px){.table-responsive-md{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:991.98px){.table-responsive-lg{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:1199.98px){.table-responsive-xl{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:1399.98px){.table-responsive-xxl{overflow-x:auto;-webkit-overflow-scrolling:touch}}.form-label{margin-bottom:.5rem}.col-form-label{padding-top:calc(.375rem + 1px);padding-bottom:calc(.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:calc(.5rem + 1px);padding-bottom:calc(.5rem + 1px);font-size:1.25rem}.col-form-label-sm{padding-top:calc(.25rem + 1px);padding-bottom:calc(.25rem + 1px);font-size:.875rem}.form-text{margin-top:.25rem;font-size:.875em;color:#6c757d}.form-control{display:block;width:100%;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.25rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control{transition:none}}.form-control[type=file]{overflow:hidden}.form-control[type=file]:not(:disabled):not([readonly]){cursor:pointer}.form-control:focus{color:#212529;background-color:#fff;border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-control::-webkit-date-and-time-value{height:1.5em}.form-control::-moz-placeholder{color:#6c757d;opacity:1}.form-control::placeholder{color:#6c757d;opacity:1}.form-control:disabled,.form-control[readonly]{background-color:#e9ecef;opacity:1}.form-control::file-selector-button{padding:.375rem .75rem;margin:-.375rem -.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control::file-selector-button{transition:none}}.form-control:hover:not(:disabled):not([readonly])::file-selector-button{background-color:#dde0e3}.form-control::-webkit-file-upload-button{padding:.375rem .75rem;margin:-.375rem -.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;-webkit-transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control::-webkit-file-upload-button{-webkit-transition:none;transition:none}}.form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button{background-color:#dde0e3}.form-control-plaintext{display:block;width:100%;padding:.375rem 0;margin-bottom:0;line-height:1.5;color:#212529;background-color:transparent;border:solid transparent;border-width:1px 0}.form-control-plaintext.form-control-lg,.form-control-plaintext.form-control-sm{padding-right:0;padding-left:0}.form-control-sm{min-height:calc(1.5em + .5rem + 2px);padding:.25rem .5rem;font-size:.875rem;border-radius:.2rem}.form-control-sm::file-selector-button{padding:.25rem .5rem;margin:-.25rem -.5rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}.form-control-sm::-webkit-file-upload-button{padding:.25rem .5rem;margin:-.25rem -.5rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}.form-control-lg{min-height:calc(1.5em + 1rem + 2px);padding:.5rem 1rem;font-size:1.25rem;border-radius:.3rem}.form-control-lg::file-selector-button{padding:.5rem 1rem;margin:-.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.form-control-lg::-webkit-file-upload-button{padding:.5rem 1rem;margin:-.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}textarea.form-control{min-height:calc(1.5em + .75rem + 2px)}textarea.form-control-sm{min-height:calc(1.5em + .5rem + 2px)}textarea.form-control-lg{min-height:calc(1.5em + 1rem + 2px)}.form-control-color{width:3rem;height:auto;padding:.375rem}.form-control-color:not(:disabled):not([readonly]){cursor:pointer}.form-control-color::-moz-color-swatch{height:1.5em;border-radius:.25rem}.form-control-color::-webkit-color-swatch{height:1.5em;border-radius:.25rem}.form-select{display:block;width:100%;padding:.375rem 2.25rem .375rem .75rem;-moz-padding-start:calc(0.75rem - 3px);font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right .75rem center;background-size:16px 12px;border:1px solid #ced4da;border-radius:.25rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-select{transition:none}}.form-select:focus{border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-select[multiple],.form-select[size]:not([size="1"]){padding-right:.75rem;background-image:none}.form-select:disabled{background-color:#e9ecef}.form-select:-moz-focusring{color:transparent;text-shadow:0 0 0 #212529}.form-select-sm{padding-top:.25rem;padding-bottom:.25rem;padding-left:.5rem;font-size:.875rem}.form-select-lg{padding-top:.5rem;padding-bottom:.5rem;padding-left:1rem;font-size:1.25rem}.form-check{display:block;min-height:1.5rem;padding-left:1.5em;margin-bottom:.125rem}.form-check .form-check-input{float:left;margin-left:-1.5em}.form-check-input{width:1em;height:1em;margin-top:.25em;vertical-align:top;background-color:#fff;background-repeat:no-repeat;background-position:center;background-size:contain;border:1px solid rgba(0,0,0,.25);-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;color-adjust:exact}.form-check-input[type=checkbox]{border-radius:.25em}.form-check-input[type=radio]{border-radius:50%}.form-check-input:active{filter:brightness(90%)}.form-check-input:focus{border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-check-input:checked{background-color:#0d6efd;border-color:#0d6efd}.form-check-input:checked[type=checkbox]{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e")}.form-check-input:checked[type=radio]{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e")}.form-check-input[type=checkbox]:indeterminate{background-color:#0d6efd;border-color:#0d6efd;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e")}.form-check-input:disabled{pointer-events:none;filter:none;opacity:.5}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{opacity:.5}.form-switch{padding-left:2.5em}.form-switch .form-check-input{width:2em;margin-left:-2.5em;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e");background-position:left center;border-radius:2em;transition:background-position .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-switch .form-check-input{transition:none}}.form-switch .form-check-input:focus{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2386b7fe'/%3e%3c/svg%3e")}.form-switch .form-check-input:checked{background-position:right center;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e")}.form-check-inline{display:inline-block;margin-right:1rem}.btn-check{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.btn-check:disabled+.btn,.btn-check[disabled]+.btn{pointer-events:none;filter:none;opacity:.65}.form-range{width:100%;height:1.5rem;padding:0;background-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.form-range:focus{outline:0}.form-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem rgba(13,110,253,.25)}.form-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem rgba(13,110,253,.25)}.form-range::-moz-focus-outer{border:0}.form-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;background-color:#0d6efd;border:0;border-radius:1rem;-webkit-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-range::-webkit-slider-thumb{-webkit-transition:none;transition:none}}.form-range::-webkit-slider-thumb:active{background-color:#b6d4fe}.form-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.form-range::-moz-range-thumb{width:1rem;height:1rem;background-color:#0d6efd;border:0;border-radius:1rem;-moz-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-range::-moz-range-thumb{-moz-transition:none;transition:none}}.form-range::-moz-range-thumb:active{background-color:#b6d4fe}.form-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.form-range:disabled{pointer-events:none}.form-range:disabled::-webkit-slider-thumb{background-color:#adb5bd}.form-range:disabled::-moz-range-thumb{background-color:#adb5bd}.form-floating{position:relative}.form-floating>.form-control,.form-floating>.form-select{height:calc(3.5rem + 2px);line-height:1.25}.form-floating>label{position:absolute;top:0;left:0;height:100%;padding:1rem .75rem;pointer-events:none;border:1px solid transparent;transform-origin:0 0;transition:opacity .1s ease-in-out,transform .1s ease-in-out}@media (prefers-reduced-motion:reduce){.form-floating>label{transition:none}}.form-floating>.form-control{padding:1rem .75rem}.form-floating>.form-control::-moz-placeholder{color:transparent}.form-floating>.form-control::placeholder{color:transparent}.form-floating>.form-control:not(:-moz-placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control:focus,.form-floating>.form-control:not(:placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control:-webkit-autofill{padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-select{padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control:not(:-moz-placeholder-shown)~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control:focus~label,.form-floating>.form-control:not(:placeholder-shown)~label,.form-floating>.form-select~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control:-webkit-autofill~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.input-group{position:relative;display:flex;flex-wrap:wrap;align-items:stretch;width:100%}.input-group>.form-control,.input-group>.form-select{position:relative;flex:1 1 auto;width:1%;min-width:0}.input-group>.form-control:focus,.input-group>.form-select:focus{z-index:3}.input-group .btn{position:relative;z-index:2}.input-group .btn:focus{z-index:3}.input-group-text{display:flex;align-items:center;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:.25rem}.input-group-lg>.btn,.input-group-lg>.form-control,.input-group-lg>.form-select,.input-group-lg>.input-group-text{padding:.5rem 1rem;font-size:1.25rem;border-radius:.3rem}.input-group-sm>.btn,.input-group-sm>.form-control,.input-group-sm>.form-select,.input-group-sm>.input-group-text{padding:.25rem .5rem;font-size:.875rem;border-radius:.2rem}.input-group-lg>.form-select,.input-group-sm>.form-select{padding-right:3rem}.input-group:not(.has-validation)>.dropdown-toggle:nth-last-child(n+3),.input-group:not(.has-validation)>:not(:last-child):not(.dropdown-toggle):not(.dropdown-menu){border-top-right-radius:0;border-bottom-right-radius:0}.input-group.has-validation>.dropdown-toggle:nth-last-child(n+4),.input-group.has-validation>:nth-last-child(n+3):not(.dropdown-toggle):not(.dropdown-menu){border-top-right-radius:0;border-bottom-right-radius:0}.input-group>:not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback){margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:#198754}.valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:rgba(25,135,84,.9);border-radius:.25rem}.is-valid~.valid-feedback,.is-valid~.valid-tooltip,.was-validated :valid~.valid-feedback,.was-validated :valid~.valid-tooltip{display:block}.form-control.is-valid,.was-validated .form-control:valid{border-color:#198754;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-valid:focus,.was-validated .form-control:valid:focus{border-color:#198754;box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.was-validated textarea.form-control:valid,textarea.form-control.is-valid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.form-select.is-valid,.was-validated .form-select:valid{border-color:#198754}.form-select.is-valid:not([multiple]):not([size]),.form-select.is-valid:not([multiple])[size="1"],.was-validated .form-select:valid:not([multiple]):not([size]),.was-validated .form-select:valid:not([multiple])[size="1"]{padding-right:4.125rem;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"),url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");background-position:right .75rem center,center right 2.25rem;background-size:16px 12px,calc(.75em + .375rem) calc(.75em + .375rem)}.form-select.is-valid:focus,.was-validated .form-select:valid:focus{border-color:#198754;box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.form-check-input.is-valid,.was-validated .form-check-input:valid{border-color:#198754}.form-check-input.is-valid:checked,.was-validated .form-check-input:valid:checked{background-color:#198754}.form-check-input.is-valid:focus,.was-validated .form-check-input:valid:focus{box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:#198754}.form-check-inline .form-check-input~.valid-feedback{margin-left:.5em}.input-group .form-control.is-valid,.input-group .form-select.is-valid,.was-validated .input-group .form-control:valid,.was-validated .input-group .form-select:valid{z-index:1}.input-group .form-control.is-valid:focus,.input-group .form-select.is-valid:focus,.was-validated .input-group .form-control:valid:focus,.was-validated .input-group .form-select:valid:focus{z-index:3}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:#dc3545}.invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:rgba(220,53,69,.9);border-radius:.25rem}.is-invalid~.invalid-feedback,.is-invalid~.invalid-tooltip,.was-validated :invalid~.invalid-feedback,.was-validated :invalid~.invalid-tooltip{display:block}.form-control.is-invalid,.was-validated .form-control:invalid{border-color:#dc3545;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-invalid:focus,.was-validated .form-control:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.was-validated textarea.form-control:invalid,textarea.form-control.is-invalid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.form-select.is-invalid,.was-validated .form-select:invalid{border-color:#dc3545}.form-select.is-invalid:not([multiple]):not([size]),.form-select.is-invalid:not([multiple])[size="1"],.was-validated .form-select:invalid:not([multiple]):not([size]),.was-validated .form-select:invalid:not([multiple])[size="1"]{padding-right:4.125rem;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"),url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");background-position:right .75rem center,center right 2.25rem;background-size:16px 12px,calc(.75em + .375rem) calc(.75em + .375rem)}.form-select.is-invalid:focus,.was-validated .form-select:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.form-check-input.is-invalid,.was-validated .form-check-input:invalid{border-color:#dc3545}.form-check-input.is-invalid:checked,.was-validated .form-check-input:invalid:checked{background-color:#dc3545}.form-check-input.is-invalid:focus,.was-validated .form-check-input:invalid:focus{box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.form-check-input.is-invalid~.form-check-label,.was-validated .form-check-input:invalid~.form-check-label{color:#dc3545}.form-check-inline .form-check-input~.invalid-feedback{margin-left:.5em}.input-group .form-control.is-invalid,.input-group .form-select.is-invalid,.was-validated .input-group .form-control:invalid,.was-validated .input-group .form-select:invalid{z-index:2}.input-group .form-control.is-invalid:focus,.input-group .form-select.is-invalid:focus,.was-validated .input-group .form-control:invalid:focus,.was-validated .input-group .form-select:invalid:focus{z-index:3}.btn{display:inline-block;font-weight:400;line-height:1.5;color:#212529;text-align:center;text-decoration:none;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:transparent;border:1px solid transparent;padding:.375rem .75rem;font-size:1rem;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.btn{transition:none}}.btn:hover{color:#212529}.btn-check:focus+.btn,.btn:focus{outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.btn.disabled,.btn:disabled,fieldset:disabled .btn{pointer-events:none;opacity:.65}.btn-primary{color:#fff;background-color:#0d6efd;border-color:#0d6efd}.btn-primary:hover{color:#fff;background-color:#0b5ed7;border-color:#0a58ca}.btn-check:focus+.btn-primary,.btn-primary:focus{color:#fff;background-color:#0b5ed7;border-color:#0a58ca;box-shadow:0 0 0 .25rem rgba(49,132,253,.5)}.btn-check:active+.btn-primary,.btn-check:checked+.btn-primary,.btn-primary.active,.btn-primary:active,.show>.btn-primary.dropdown-toggle{color:#fff;background-color:#0a58ca;border-color:#0a53be}.btn-check:active+.btn-primary:focus,.btn-check:checked+.btn-primary:focus,.btn-primary.active:focus,.btn-primary:active:focus,.show>.btn-primary.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(49,132,253,.5)}.btn-primary.disabled,.btn-primary:disabled{color:#fff;background-color:#0d6efd;border-color:#0d6efd}.btn-secondary{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary:hover{color:#fff;background-color:#5c636a;border-color:#565e64}.btn-check:focus+.btn-secondary,.btn-secondary:focus{color:#fff;background-color:#5c636a;border-color:#565e64;box-shadow:0 0 0 .25rem rgba(130,138,145,.5)}.btn-check:active+.btn-secondary,.btn-check:checked+.btn-secondary,.btn-secondary.active,.btn-secondary:active,.show>.btn-secondary.dropdown-toggle{color:#fff;background-color:#565e64;border-color:#51585e}.btn-check:active+.btn-secondary:focus,.btn-check:checked+.btn-secondary:focus,.btn-secondary.active:focus,.btn-secondary:active:focus,.show>.btn-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(130,138,145,.5)}.btn-secondary.disabled,.btn-secondary:disabled{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-success{color:#fff;background-color:#198754;border-color:#198754}.btn-success:hover{color:#fff;background-color:#157347;border-color:#146c43}.btn-check:focus+.btn-success,.btn-success:focus{color:#fff;background-color:#157347;border-color:#146c43;box-shadow:0 0 0 .25rem rgba(60,153,110,.5)}.btn-check:active+.btn-success,.btn-check:checked+.btn-success,.btn-success.active,.btn-success:active,.show>.btn-success.dropdown-toggle{color:#fff;background-color:#146c43;border-color:#13653f}.btn-check:active+.btn-success:focus,.btn-check:checked+.btn-success:focus,.btn-success.active:focus,.btn-success:active:focus,.show>.btn-success.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(60,153,110,.5)}.btn-success.disabled,.btn-success:disabled{color:#fff;background-color:#198754;border-color:#198754}.btn-info{color:#000;background-color:#0dcaf0;border-color:#0dcaf0}.btn-info:hover{color:#000;background-color:#31d2f2;border-color:#25cff2}.btn-check:focus+.btn-info,.btn-info:focus{color:#000;background-color:#31d2f2;border-color:#25cff2;box-shadow:0 0 0 .25rem rgba(11,172,204,.5)}.btn-check:active+.btn-info,.btn-check:checked+.btn-info,.btn-info.active,.btn-info:active,.show>.btn-info.dropdown-toggle{color:#000;background-color:#3dd5f3;border-color:#25cff2}.btn-check:active+.btn-info:focus,.btn-check:checked+.btn-info:focus,.btn-info.active:focus,.btn-info:active:focus,.show>.btn-info.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(11,172,204,.5)}.btn-info.disabled,.btn-info:disabled{color:#000;background-color:#0dcaf0;border-color:#0dcaf0}.btn-warning{color:#000;background-color:#ffc107;border-color:#ffc107}.btn-warning:hover{color:#000;background-color:#ffca2c;border-color:#ffc720}.btn-check:focus+.btn-warning,.btn-warning:focus{color:#000;background-color:#ffca2c;border-color:#ffc720;box-shadow:0 0 0 .25rem rgba(217,164,6,.5)}.btn-check:active+.btn-warning,.btn-check:checked+.btn-warning,.btn-warning.active,.btn-warning:active,.show>.btn-warning.dropdown-toggle{color:#000;background-color:#ffcd39;border-color:#ffc720}.btn-check:active+.btn-warning:focus,.btn-check:checked+.btn-warning:focus,.btn-warning.active:focus,.btn-warning:active:focus,.show>.btn-warning.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(217,164,6,.5)}.btn-warning.disabled,.btn-warning:disabled{color:#000;background-color:#ffc107;border-color:#ffc107}.btn-danger{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-danger:hover{color:#fff;background-color:#bb2d3b;border-color:#b02a37}.btn-check:focus+.btn-danger,.btn-danger:focus{color:#fff;background-color:#bb2d3b;border-color:#b02a37;box-shadow:0 0 0 .25rem rgba(225,83,97,.5)}.btn-check:active+.btn-danger,.btn-check:checked+.btn-danger,.btn-danger.active,.btn-danger:active,.show>.btn-danger.dropdown-toggle{color:#fff;background-color:#b02a37;border-color:#a52834}.btn-check:active+.btn-danger:focus,.btn-check:checked+.btn-danger:focus,.btn-danger.active:focus,.btn-danger:active:focus,.show>.btn-danger.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(225,83,97,.5)}.btn-danger.disabled,.btn-danger:disabled{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-light{color:#000;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:hover{color:#000;background-color:#f9fafb;border-color:#f9fafb}.btn-check:focus+.btn-light,.btn-light:focus{color:#000;background-color:#f9fafb;border-color:#f9fafb;box-shadow:0 0 0 .25rem rgba(211,212,213,.5)}.btn-check:active+.btn-light,.btn-check:checked+.btn-light,.btn-light.active,.btn-light:active,.show>.btn-light.dropdown-toggle{color:#000;background-color:#f9fafb;border-color:#f9fafb}.btn-check:active+.btn-light:focus,.btn-check:checked+.btn-light:focus,.btn-light.active:focus,.btn-light:active:focus,.show>.btn-light.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(211,212,213,.5)}.btn-light.disabled,.btn-light:disabled{color:#000;background-color:#f8f9fa;border-color:#f8f9fa}.btn-dark{color:#fff;background-color:#212529;border-color:#212529}.btn-dark:hover{color:#fff;background-color:#1c1f23;border-color:#1a1e21}.btn-check:focus+.btn-dark,.btn-dark:focus{color:#fff;background-color:#1c1f23;border-color:#1a1e21;box-shadow:0 0 0 .25rem rgba(66,70,73,.5)}.btn-check:active+.btn-dark,.btn-check:checked+.btn-dark,.btn-dark.active,.btn-dark:active,.show>.btn-dark.dropdown-toggle{color:#fff;background-color:#1a1e21;border-color:#191c1f}.btn-check:active+.btn-dark:focus,.btn-check:checked+.btn-dark:focus,.btn-dark.active:focus,.btn-dark:active:focus,.show>.btn-dark.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(66,70,73,.5)}.btn-dark.disabled,.btn-dark:disabled{color:#fff;background-color:#212529;border-color:#212529}.btn-outline-primary{color:#0d6efd;border-color:#0d6efd}.btn-outline-primary:hover{color:#fff;background-color:#0d6efd;border-color:#0d6efd}.btn-check:focus+.btn-outline-primary,.btn-outline-primary:focus{box-shadow:0 0 0 .25rem rgba(13,110,253,.5)}.btn-check:active+.btn-outline-primary,.btn-check:checked+.btn-outline-primary,.btn-outline-primary.active,.btn-outline-primary.dropdown-toggle.show,.btn-outline-primary:active{color:#fff;background-color:#0d6efd;border-color:#0d6efd}.btn-check:active+.btn-outline-primary:focus,.btn-check:checked+.btn-outline-primary:focus,.btn-outline-primary.active:focus,.btn-outline-primary.dropdown-toggle.show:focus,.btn-outline-primary:active:focus{box-shadow:0 0 0 .25rem rgba(13,110,253,.5)}.btn-outline-primary.disabled,.btn-outline-primary:disabled{color:#0d6efd;background-color:transparent}.btn-outline-secondary{color:#6c757d;border-color:#6c757d}.btn-outline-secondary:hover{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-check:focus+.btn-outline-secondary,.btn-outline-secondary:focus{box-shadow:0 0 0 .25rem rgba(108,117,125,.5)}.btn-check:active+.btn-outline-secondary,.btn-check:checked+.btn-outline-secondary,.btn-outline-secondary.active,.btn-outline-secondary.dropdown-toggle.show,.btn-outline-secondary:active{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-check:active+.btn-outline-secondary:focus,.btn-check:checked+.btn-outline-secondary:focus,.btn-outline-secondary.active:focus,.btn-outline-secondary.dropdown-toggle.show:focus,.btn-outline-secondary:active:focus{box-shadow:0 0 0 .25rem rgba(108,117,125,.5)}.btn-outline-secondary.disabled,.btn-outline-secondary:disabled{color:#6c757d;background-color:transparent}.btn-outline-success{color:#198754;border-color:#198754}.btn-outline-success:hover{color:#fff;background-color:#198754;border-color:#198754}.btn-check:focus+.btn-outline-success,.btn-outline-success:focus{box-shadow:0 0 0 .25rem rgba(25,135,84,.5)}.btn-check:active+.btn-outline-success,.btn-check:checked+.btn-outline-success,.btn-outline-success.active,.btn-outline-success.dropdown-toggle.show,.btn-outline-success:active{color:#fff;background-color:#198754;border-color:#198754}.btn-check:active+.btn-outline-success:focus,.btn-check:checked+.btn-outline-success:focus,.btn-outline-success.active:focus,.btn-outline-success.dropdown-toggle.show:focus,.btn-outline-success:active:focus{box-shadow:0 0 0 .25rem rgba(25,135,84,.5)}.btn-outline-success.disabled,.btn-outline-success:disabled{color:#198754;background-color:transparent}.btn-outline-info{color:#0dcaf0;border-color:#0dcaf0}.btn-outline-info:hover{color:#000;background-color:#0dcaf0;border-color:#0dcaf0}.btn-check:focus+.btn-outline-info,.btn-outline-info:focus{box-shadow:0 0 0 .25rem rgba(13,202,240,.5)}.btn-check:active+.btn-outline-info,.btn-check:checked+.btn-outline-info,.btn-outline-info.active,.btn-outline-info.dropdown-toggle.show,.btn-outline-info:active{color:#000;background-color:#0dcaf0;border-color:#0dcaf0}.btn-check:active+.btn-outline-info:focus,.btn-check:checked+.btn-outline-info:focus,.btn-outline-info.active:focus,.btn-outline-info.dropdown-toggle.show:focus,.btn-outline-info:active:focus{box-shadow:0 0 0 .25rem rgba(13,202,240,.5)}.btn-outline-info.disabled,.btn-outline-info:disabled{color:#0dcaf0;background-color:transparent}.btn-outline-warning{color:#ffc107;border-color:#ffc107}.btn-outline-warning:hover{color:#000;background-color:#ffc107;border-color:#ffc107}.btn-check:focus+.btn-outline-warning,.btn-outline-warning:focus{box-shadow:0 0 0 .25rem rgba(255,193,7,.5)}.btn-check:active+.btn-outline-warning,.btn-check:checked+.btn-outline-warning,.btn-outline-warning.active,.btn-outline-warning.dropdown-toggle.show,.btn-outline-warning:active{color:#000;background-color:#ffc107;border-color:#ffc107}.btn-check:active+.btn-outline-warning:focus,.btn-check:checked+.btn-outline-warning:focus,.btn-outline-warning.active:focus,.btn-outline-warning.dropdown-toggle.show:focus,.btn-outline-warning:active:focus{box-shadow:0 0 0 .25rem rgba(255,193,7,.5)}.btn-outline-warning.disabled,.btn-outline-warning:disabled{color:#ffc107;background-color:transparent}.btn-outline-danger{color:#dc3545;border-color:#dc3545}.btn-outline-danger:hover{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-check:focus+.btn-outline-danger,.btn-outline-danger:focus{box-shadow:0 0 0 .25rem rgba(220,53,69,.5)}.btn-check:active+.btn-outline-danger,.btn-check:checked+.btn-outline-danger,.btn-outline-danger.active,.btn-outline-danger.dropdown-toggle.show,.btn-outline-danger:active{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-check:active+.btn-outline-danger:focus,.btn-check:checked+.btn-outline-danger:focus,.btn-outline-danger.active:focus,.btn-outline-danger.dropdown-toggle.show:focus,.btn-outline-danger:active:focus{box-shadow:0 0 0 .25rem rgba(220,53,69,.5)}.btn-outline-danger.disabled,.btn-outline-danger:disabled{color:#dc3545;background-color:transparent}.btn-outline-light{color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:hover{color:#000;background-color:#f8f9fa;border-color:#f8f9fa}.btn-check:focus+.btn-outline-light,.btn-outline-light:focus{box-shadow:0 0 0 .25rem rgba(248,249,250,.5)}.btn-check:active+.btn-outline-light,.btn-check:checked+.btn-outline-light,.btn-outline-light.active,.btn-outline-light.dropdown-toggle.show,.btn-outline-light:active{color:#000;background-color:#f8f9fa;border-color:#f8f9fa}.btn-check:active+.btn-outline-light:focus,.btn-check:checked+.btn-outline-light:focus,.btn-outline-light.active:focus,.btn-outline-light.dropdown-toggle.show:focus,.btn-outline-light:active:focus{box-shadow:0 0 0 .25rem rgba(248,249,250,.5)}.btn-outline-light.disabled,.btn-outline-light:disabled{color:#f8f9fa;background-color:transparent}.btn-outline-dark{color:#212529;border-color:#212529}.btn-outline-dark:hover{color:#fff;background-color:#212529;border-color:#212529}.btn-check:focus+.btn-outline-dark,.btn-outline-dark:focus{box-shadow:0 0 0 .25rem rgba(33,37,41,.5)}.btn-check:active+.btn-outline-dark,.btn-check:checked+.btn-outline-dark,.btn-outline-dark.active,.btn-outline-dark.dropdown-toggle.show,.btn-outline-dark:active{color:#fff;background-color:#212529;border-color:#212529}.btn-check:active+.btn-outline-dark:focus,.btn-check:checked+.btn-outline-dark:focus,.btn-outline-dark.active:focus,.btn-outline-dark.dropdown-toggle.show:focus,.btn-outline-dark:active:focus{box-shadow:0 0 0 .25rem rgba(33,37,41,.5)}.btn-outline-dark.disabled,.btn-outline-dark:disabled{color:#212529;background-color:transparent}.btn-link{font-weight:400;color:#0d6efd;text-decoration:underline}.btn-link:hover{color:#0a58ca}.btn-link.disabled,.btn-link:disabled{color:#6c757d}.btn-group-lg>.btn,.btn-lg{padding:.5rem 1rem;font-size:1.25rem;border-radius:.3rem}.btn-group-sm>.btn,.btn-sm{padding:.25rem .5rem;font-size:.875rem;border-radius:.2rem}.fade{transition:opacity .15s linear}@media (prefers-reduced-motion:reduce){.fade{transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{height:0;overflow:hidden;transition:height .35s ease}@media (prefers-reduced-motion:reduce){.collapsing{transition:none}}.collapsing.collapse-horizontal{width:0;height:auto;transition:width .35s ease}@media (prefers-reduced-motion:reduce){.collapsing.collapse-horizontal{transition:none}}.dropdown,.dropend,.dropstart,.dropup{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty::after{margin-left:0}.dropdown-menu{position:absolute;z-index:1000;display:none;min-width:10rem;padding:.5rem 0;margin:0;font-size:1rem;color:#212529;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}.dropdown-menu[data-bs-popper]{top:100%;left:0;margin-top:.125rem}.dropdown-menu-start{--bs-position:start}.dropdown-menu-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-end{--bs-position:end}.dropdown-menu-end[data-bs-popper]{right:0;left:auto}@media (min-width:576px){.dropdown-menu-sm-start{--bs-position:start}.dropdown-menu-sm-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-sm-end{--bs-position:end}.dropdown-menu-sm-end[data-bs-popper]{right:0;left:auto}}@media (min-width:768px){.dropdown-menu-md-start{--bs-position:start}.dropdown-menu-md-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-md-end{--bs-position:end}.dropdown-menu-md-end[data-bs-popper]{right:0;left:auto}}@media (min-width:992px){.dropdown-menu-lg-start{--bs-position:start}.dropdown-menu-lg-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-lg-end{--bs-position:end}.dropdown-menu-lg-end[data-bs-popper]{right:0;left:auto}}@media (min-width:1200px){.dropdown-menu-xl-start{--bs-position:start}.dropdown-menu-xl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xl-end{--bs-position:end}.dropdown-menu-xl-end[data-bs-popper]{right:0;left:auto}}@media (min-width:1400px){.dropdown-menu-xxl-start{--bs-position:start}.dropdown-menu-xxl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xxl-end{--bs-position:end}.dropdown-menu-xxl-end[data-bs-popper]{right:0;left:auto}}.dropup .dropdown-menu[data-bs-popper]{top:auto;bottom:100%;margin-top:0;margin-bottom:.125rem}.dropup .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty::after{margin-left:0}.dropend .dropdown-menu[data-bs-popper]{top:0;right:auto;left:100%;margin-top:0;margin-left:.125rem}.dropend .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}.dropend .dropdown-toggle:empty::after{margin-left:0}.dropend .dropdown-toggle::after{vertical-align:0}.dropstart .dropdown-menu[data-bs-popper]{top:0;right:100%;left:auto;margin-top:0;margin-right:.125rem}.dropstart .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:""}.dropstart .dropdown-toggle::after{display:none}.dropstart .dropdown-toggle::before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropstart .dropdown-toggle:empty::after{margin-left:0}.dropstart .dropdown-toggle::before{vertical-align:0}.dropdown-divider{height:0;margin:.5rem 0;overflow:hidden;border-top:1px solid rgba(0,0,0,.15)}.dropdown-item{display:block;width:100%;padding:.25rem 1rem;clear:both;font-weight:400;color:#212529;text-align:inherit;text-decoration:none;white-space:nowrap;background-color:transparent;border:0}.dropdown-item:focus,.dropdown-item:hover{color:#1e2125;background-color:#e9ecef}.dropdown-item.active,.dropdown-item:active{color:#fff;text-decoration:none;background-color:#0d6efd}.dropdown-item.disabled,.dropdown-item:disabled{color:#adb5bd;pointer-events:none;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:.5rem 1rem;margin-bottom:0;font-size:.875rem;color:#6c757d;white-space:nowrap}.dropdown-item-text{display:block;padding:.25rem 1rem;color:#212529}.dropdown-menu-dark{color:#dee2e6;background-color:#343a40;border-color:rgba(0,0,0,.15)}.dropdown-menu-dark .dropdown-item{color:#dee2e6}.dropdown-menu-dark .dropdown-item:focus,.dropdown-menu-dark .dropdown-item:hover{color:#fff;background-color:rgba(255,255,255,.15)}.dropdown-menu-dark .dropdown-item.active,.dropdown-menu-dark .dropdown-item:active{color:#fff;background-color:#0d6efd}.dropdown-menu-dark .dropdown-item.disabled,.dropdown-menu-dark .dropdown-item:disabled{color:#adb5bd}.dropdown-menu-dark .dropdown-divider{border-color:rgba(0,0,0,.15)}.dropdown-menu-dark .dropdown-item-text{color:#dee2e6}.dropdown-menu-dark .dropdown-header{color:#adb5bd}.btn-group,.btn-group-vertical{position:relative;display:inline-flex;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;flex:1 1 auto}.btn-group-vertical>.btn-check:checked+.btn,.btn-group-vertical>.btn-check:focus+.btn,.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn-check:checked+.btn,.btn-group>.btn-check:focus+.btn,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:1}.btn-toolbar{display:flex;flex-wrap:wrap;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group>.btn-group:not(:first-child),.btn-group>.btn:not(:first-child){margin-left:-1px}.btn-group>.btn-group:not(:last-child)>.btn,.btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:not(:first-child)>.btn,.btn-group>.btn:nth-child(n+3),.btn-group>:not(.btn-check)+.btn{border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.dropdown-toggle-split::after,.dropend .dropdown-toggle-split::after,.dropup .dropdown-toggle-split::after{margin-left:0}.dropstart .dropdown-toggle-split::before{margin-right:0}.btn-group-sm>.btn+.dropdown-toggle-split,.btn-sm+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-group-lg>.btn+.dropdown-toggle-split,.btn-lg+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-group-vertical{flex-direction:column;align-items:flex-start;justify-content:center}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{width:100%}.btn-group-vertical>.btn-group:not(:first-child),.btn-group-vertical>.btn:not(:first-child){margin-top:-1px}.btn-group-vertical>.btn-group:not(:last-child)>.btn,.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child)>.btn,.btn-group-vertical>.btn~.btn{border-top-left-radius:0;border-top-right-radius:0}.nav{display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:.5rem 1rem;color:#0d6efd;text-decoration:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out}@media (prefers-reduced-motion:reduce){.nav-link{transition:none}}.nav-link:focus,.nav-link:hover{color:#0a58ca}.nav-link.disabled{color:#6c757d;pointer-events:none;cursor:default}.nav-tabs{border-bottom:1px solid #dee2e6}.nav-tabs .nav-link{margin-bottom:-1px;background:0 0;border:1px solid transparent;border-top-left-radius:.25rem;border-top-right-radius:.25rem}.nav-tabs .nav-link:focus,.nav-tabs .nav-link:hover{border-color:#e9ecef #e9ecef #dee2e6;isolation:isolate}.nav-tabs .nav-link.disabled{color:#6c757d;background-color:transparent;border-color:transparent}.nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active{color:#495057;background-color:#fff;border-color:#dee2e6 #dee2e6 #fff}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.nav-pills .nav-link{background:0 0;border:0;border-radius:.25rem}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:#fff;background-color:#0d6efd}.nav-fill .nav-item,.nav-fill>.nav-link{flex:1 1 auto;text-align:center}.nav-justified .nav-item,.nav-justified>.nav-link{flex-basis:0;flex-grow:1;text-align:center}.nav-fill .nav-item .nav-link,.nav-justified .nav-item .nav-link{width:100%}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{position:relative;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;padding-top:.5rem;padding-bottom:.5rem}.navbar>.container,.navbar>.container-fluid,.navbar>.container-lg,.navbar>.container-md,.navbar>.container-sm,.navbar>.container-xl,.navbar>.container-xxl{display:flex;flex-wrap:inherit;align-items:center;justify-content:space-between}.navbar-brand{padding-top:.3125rem;padding-bottom:.3125rem;margin-right:1rem;font-size:1.25rem;text-decoration:none;white-space:nowrap}.navbar-nav{display:flex;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link{padding-right:0;padding-left:0}.navbar-nav .dropdown-menu{position:static}.navbar-text{padding-top:.5rem;padding-bottom:.5rem}.navbar-collapse{flex-basis:100%;flex-grow:1;align-items:center}.navbar-toggler{padding:.25rem .75rem;font-size:1.25rem;line-height:1;background-color:transparent;border:1px solid transparent;border-radius:.25rem;transition:box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.navbar-toggler{transition:none}}.navbar-toggler:hover{text-decoration:none}.navbar-toggler:focus{text-decoration:none;outline:0;box-shadow:0 0 0 .25rem}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;background-repeat:no-repeat;background-position:center;background-size:100%}.navbar-nav-scroll{max-height:var(--bs-scroll-height,75vh);overflow-y:auto}@media (min-width:576px){.navbar-expand-sm{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-sm .navbar-nav{flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-sm .navbar-nav-scroll{overflow:visible}.navbar-expand-sm .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}.navbar-expand-sm .offcanvas-header{display:none}.navbar-expand-sm .offcanvas{position:inherit;bottom:0;z-index:1000;flex-grow:1;visibility:visible!important;background-color:transparent;border-right:0;border-left:0;transition:none;transform:none}.navbar-expand-sm .offcanvas-bottom,.navbar-expand-sm .offcanvas-top{height:auto;border-top:0;border-bottom:0}.navbar-expand-sm .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:768px){.navbar-expand-md{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-md .navbar-nav{flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-md .navbar-nav-scroll{overflow:visible}.navbar-expand-md .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}.navbar-expand-md .offcanvas-header{display:none}.navbar-expand-md .offcanvas{position:inherit;bottom:0;z-index:1000;flex-grow:1;visibility:visible!important;background-color:transparent;border-right:0;border-left:0;transition:none;transform:none}.navbar-expand-md .offcanvas-bottom,.navbar-expand-md .offcanvas-top{height:auto;border-top:0;border-bottom:0}.navbar-expand-md .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:992px){.navbar-expand-lg{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-lg .navbar-nav{flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-lg .navbar-nav-scroll{overflow:visible}.navbar-expand-lg .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}.navbar-expand-lg .offcanvas-header{display:none}.navbar-expand-lg .offcanvas{position:inherit;bottom:0;z-index:1000;flex-grow:1;visibility:visible!important;background-color:transparent;border-right:0;border-left:0;transition:none;transform:none}.navbar-expand-lg .offcanvas-bottom,.navbar-expand-lg .offcanvas-top{height:auto;border-top:0;border-bottom:0}.navbar-expand-lg .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:1200px){.navbar-expand-xl{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-xl .navbar-nav{flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-xl .navbar-nav-scroll{overflow:visible}.navbar-expand-xl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}.navbar-expand-xl .offcanvas-header{display:none}.navbar-expand-xl .offcanvas{position:inherit;bottom:0;z-index:1000;flex-grow:1;visibility:visible!important;background-color:transparent;border-right:0;border-left:0;transition:none;transform:none}.navbar-expand-xl .offcanvas-bottom,.navbar-expand-xl .offcanvas-top{height:auto;border-top:0;border-bottom:0}.navbar-expand-xl .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:1400px){.navbar-expand-xxl{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-xxl .navbar-nav{flex-direction:row}.navbar-expand-xxl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xxl .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-xxl .navbar-nav-scroll{overflow:visible}.navbar-expand-xxl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xxl .navbar-toggler{display:none}.navbar-expand-xxl .offcanvas-header{display:none}.navbar-expand-xxl .offcanvas{position:inherit;bottom:0;z-index:1000;flex-grow:1;visibility:visible!important;background-color:transparent;border-right:0;border-left:0;transition:none;transform:none}.navbar-expand-xxl .offcanvas-bottom,.navbar-expand-xxl .offcanvas-top{height:auto;border-top:0;border-bottom:0}.navbar-expand-xxl .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}.navbar-expand{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand .navbar-nav{flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand .navbar-nav-scroll{overflow:visible}.navbar-expand .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-expand .offcanvas-header{display:none}.navbar-expand .offcanvas{position:inherit;bottom:0;z-index:1000;flex-grow:1;visibility:visible!important;background-color:transparent;border-right:0;border-left:0;transition:none;transform:none}.navbar-expand .offcanvas-bottom,.navbar-expand .offcanvas-top{height:auto;border-top:0;border-bottom:0}.navbar-expand .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}.navbar-light .navbar-brand{color:rgba(0,0,0,.9)}.navbar-light .navbar-brand:focus,.navbar-light .navbar-brand:hover{color:rgba(0,0,0,.9)}.navbar-light .navbar-nav .nav-link{color:rgba(0,0,0,.55)}.navbar-light .navbar-nav .nav-link:focus,.navbar-light .navbar-nav .nav-link:hover{color:rgba(0,0,0,.7)}.navbar-light .navbar-nav .nav-link.disabled{color:rgba(0,0,0,.3)}.navbar-light .navbar-nav .nav-link.active,.navbar-light .navbar-nav .show>.nav-link{color:rgba(0,0,0,.9)}.navbar-light .navbar-toggler{color:rgba(0,0,0,.55);border-color:rgba(0,0,0,.1)}.navbar-light .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-light .navbar-text{color:rgba(0,0,0,.55)}.navbar-light .navbar-text a,.navbar-light .navbar-text a:focus,.navbar-light .navbar-text a:hover{color:rgba(0,0,0,.9)}.navbar-dark .navbar-brand{color:#fff}.navbar-dark .navbar-brand:focus,.navbar-dark .navbar-brand:hover{color:#fff}.navbar-dark .navbar-nav .nav-link{color:rgba(255,255,255,.55)}.navbar-dark .navbar-nav .nav-link:focus,.navbar-dark .navbar-nav .nav-link:hover{color:rgba(255,255,255,.75)}.navbar-dark .navbar-nav .nav-link.disabled{color:rgba(255,255,255,.25)}.navbar-dark .navbar-nav .nav-link.active,.navbar-dark .navbar-nav .show>.nav-link{color:#fff}.navbar-dark .navbar-toggler{color:rgba(255,255,255,.55);border-color:rgba(255,255,255,.1)}.navbar-dark .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-dark .navbar-text{color:rgba(255,255,255,.55)}.navbar-dark .navbar-text a,.navbar-dark .navbar-text a:focus,.navbar-dark .navbar-text a:hover{color:#fff}.card{position:relative;display:flex;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:border-box;border:1px solid rgba(0,0,0,.125);border-radius:.25rem}.card>hr{margin-right:0;margin-left:0}.card>.list-group{border-top:inherit;border-bottom:inherit}.card>.list-group:first-child{border-top-width:0;border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card>.list-group:last-child{border-bottom-width:0;border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card>.card-header+.list-group,.card>.list-group+.card-footer{border-top:0}.card-body{flex:1 1 auto;padding:1rem 1rem}.card-title{margin-bottom:.5rem}.card-subtitle{margin-top:-.25rem;margin-bottom:0}.card-text:last-child{margin-bottom:0}.card-link+.card-link{margin-left:1rem}.card-header{padding:.5rem 1rem;margin-bottom:0;background-color:rgba(0,0,0,.03);border-bottom:1px solid rgba(0,0,0,.125)}.card-header:first-child{border-radius:calc(.25rem - 1px) calc(.25rem - 1px) 0 0}.card-footer{padding:.5rem 1rem;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.125)}.card-footer:last-child{border-radius:0 0 calc(.25rem - 1px) calc(.25rem - 1px)}.card-header-tabs{margin-right:-.5rem;margin-bottom:-.5rem;margin-left:-.5rem;border-bottom:0}.card-header-pills{margin-right:-.5rem;margin-left:-.5rem}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:1rem;border-radius:calc(.25rem - 1px)}.card-img,.card-img-bottom,.card-img-top{width:100%}.card-img,.card-img-top{border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card-img,.card-img-bottom{border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card-group>.card{margin-bottom:.75rem}@media (min-width:576px){.card-group{display:flex;flex-flow:row wrap}.card-group>.card{flex:1 0 0%;margin-bottom:0}.card-group>.card+.card{margin-left:0;border-left:0}.card-group>.card:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:not(:last-child) .card-header,.card-group>.card:not(:last-child) .card-img-top{border-top-right-radius:0}.card-group>.card:not(:last-child) .card-footer,.card-group>.card:not(:last-child) .card-img-bottom{border-bottom-right-radius:0}.card-group>.card:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:not(:first-child) .card-header,.card-group>.card:not(:first-child) .card-img-top{border-top-left-radius:0}.card-group>.card:not(:first-child) .card-footer,.card-group>.card:not(:first-child) .card-img-bottom{border-bottom-left-radius:0}}.accordion-button{position:relative;display:flex;align-items:center;width:100%;padding:1rem 1.25rem;font-size:1rem;color:#212529;text-align:left;background-color:#fff;border:0;border-radius:0;overflow-anchor:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,border-radius .15s ease}@media (prefers-reduced-motion:reduce){.accordion-button{transition:none}}.accordion-button:not(.collapsed){color:#0c63e4;background-color:#e7f1ff;box-shadow:inset 0 -1px 0 rgba(0,0,0,.125)}.accordion-button:not(.collapsed)::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230c63e4'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");transform:rotate(-180deg)}.accordion-button::after{flex-shrink:0;width:1.25rem;height:1.25rem;margin-left:auto;content:"";background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");background-repeat:no-repeat;background-size:1.25rem;transition:transform .2s ease-in-out}@media (prefers-reduced-motion:reduce){.accordion-button::after{transition:none}}.accordion-button:hover{z-index:2}.accordion-button:focus{z-index:3;border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.accordion-header{margin-bottom:0}.accordion-item{background-color:#fff;border:1px solid rgba(0,0,0,.125)}.accordion-item:first-of-type{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.accordion-item:first-of-type .accordion-button{border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.accordion-item:not(:first-of-type){border-top:0}.accordion-item:last-of-type{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.accordion-item:last-of-type .accordion-button.collapsed{border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.accordion-item:last-of-type .accordion-collapse{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.accordion-body{padding:1rem 1.25rem}.accordion-flush .accordion-collapse{border-width:0}.accordion-flush .accordion-item{border-right:0;border-left:0;border-radius:0}.accordion-flush .accordion-item:first-child{border-top:0}.accordion-flush .accordion-item:last-child{border-bottom:0}.accordion-flush .accordion-item .accordion-button{border-radius:0}.breadcrumb{display:flex;flex-wrap:wrap;padding:0 0;margin-bottom:1rem;list-style:none}.breadcrumb-item+.breadcrumb-item{padding-left:.5rem}.breadcrumb-item+.breadcrumb-item::before{float:left;padding-right:.5rem;color:#6c757d;content:var(--bs-breadcrumb-divider, "/")}.breadcrumb-item.active{color:#6c757d}.pagination{display:flex;padding-left:0;list-style:none}.page-link{position:relative;display:block;color:#0d6efd;text-decoration:none;background-color:#fff;border:1px solid #dee2e6;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.page-link{transition:none}}.page-link:hover{z-index:2;color:#0a58ca;background-color:#e9ecef;border-color:#dee2e6}.page-link:focus{z-index:3;color:#0a58ca;background-color:#e9ecef;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.page-item:not(:first-child) .page-link{margin-left:-1px}.page-item.active .page-link{z-index:3;color:#fff;background-color:#0d6efd;border-color:#0d6efd}.page-item.disabled .page-link{color:#6c757d;pointer-events:none;background-color:#fff;border-color:#dee2e6}.page-link{padding:.375rem .75rem}.page-item:first-child .page-link{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.page-item:last-child .page-link{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.pagination-lg .page-link{padding:.75rem 1.5rem;font-size:1.25rem}.pagination-lg .page-item:first-child .page-link{border-top-left-radius:.3rem;border-bottom-left-radius:.3rem}.pagination-lg .page-item:last-child .page-link{border-top-right-radius:.3rem;border-bottom-right-radius:.3rem}.pagination-sm .page-link{padding:.25rem .5rem;font-size:.875rem}.pagination-sm .page-item:first-child .page-link{border-top-left-radius:.2rem;border-bottom-left-radius:.2rem}.pagination-sm .page-item:last-child .page-link{border-top-right-radius:.2rem;border-bottom-right-radius:.2rem}.badge{display:inline-block;padding:.35em .65em;font-size:.75em;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25rem}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.alert{position:relative;padding:1rem 1rem;margin-bottom:1rem;border:1px solid transparent;border-radius:.25rem}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:3rem}.alert-dismissible .btn-close{position:absolute;top:0;right:0;z-index:2;padding:1.25rem 1rem}.alert-primary{color:#084298;background-color:#cfe2ff;border-color:#b6d4fe}.alert-primary .alert-link{color:#06357a}.alert-secondary{color:#41464b;background-color:#e2e3e5;border-color:#d3d6d8}.alert-secondary .alert-link{color:#34383c}.alert-success{color:#0f5132;background-color:#d1e7dd;border-color:#badbcc}.alert-success .alert-link{color:#0c4128}.alert-info{color:#055160;background-color:#cff4fc;border-color:#b6effb}.alert-info .alert-link{color:#04414d}.alert-warning{color:#664d03;background-color:#fff3cd;border-color:#ffecb5}.alert-warning .alert-link{color:#523e02}.alert-danger{color:#842029;background-color:#f8d7da;border-color:#f5c2c7}.alert-danger .alert-link{color:#6a1a21}.alert-light{color:#636464;background-color:#fefefe;border-color:#fdfdfe}.alert-light .alert-link{color:#4f5050}.alert-dark{color:#141619;background-color:#d3d3d4;border-color:#bcbebf}.alert-dark .alert-link{color:#101214}@-webkit-keyframes progress-bar-stripes{0%{background-position-x:1rem}}@keyframes progress-bar-stripes{0%{background-position-x:1rem}}.progress{display:flex;height:1rem;overflow:hidden;font-size:.75rem;background-color:#e9ecef;border-radius:.25rem}.progress-bar{display:flex;flex-direction:column;justify-content:center;overflow:hidden;color:#fff;text-align:center;white-space:nowrap;background-color:#0d6efd;transition:width .6s ease}@media (prefers-reduced-motion:reduce){.progress-bar{transition:none}}.progress-bar-striped{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:1rem 1rem}.progress-bar-animated{-webkit-animation:1s linear infinite progress-bar-stripes;animation:1s linear infinite progress-bar-stripes}@media (prefers-reduced-motion:reduce){.progress-bar-animated{-webkit-animation:none;animation:none}}.list-group{display:flex;flex-direction:column;padding-left:0;margin-bottom:0;border-radius:.25rem}.list-group-numbered{list-style-type:none;counter-reset:section}.list-group-numbered>li::before{content:counters(section, ".") ". ";counter-increment:section}.list-group-item-action{width:100%;color:#495057;text-align:inherit}.list-group-item-action:focus,.list-group-item-action:hover{z-index:1;color:#495057;text-decoration:none;background-color:#f8f9fa}.list-group-item-action:active{color:#212529;background-color:#e9ecef}.list-group-item{position:relative;display:block;padding:.5rem 1rem;color:#212529;text-decoration:none;background-color:#fff;border:1px solid rgba(0,0,0,.125)}.list-group-item:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.list-group-item:last-child{border-bottom-right-radius:inherit;border-bottom-left-radius:inherit}.list-group-item.disabled,.list-group-item:disabled{color:#6c757d;pointer-events:none;background-color:#fff}.list-group-item.active{z-index:2;color:#fff;background-color:#0d6efd;border-color:#0d6efd}.list-group-item+.list-group-item{border-top-width:0}.list-group-item+.list-group-item.active{margin-top:-1px;border-top-width:1px}.list-group-horizontal{flex-direction:row}.list-group-horizontal>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal>.list-group-item.active{margin-top:0}.list-group-horizontal>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}@media (min-width:576px){.list-group-horizontal-sm{flex-direction:row}.list-group-horizontal-sm>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-sm>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-sm>.list-group-item.active{margin-top:0}.list-group-horizontal-sm>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-sm>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:768px){.list-group-horizontal-md{flex-direction:row}.list-group-horizontal-md>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-md>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-md>.list-group-item.active{margin-top:0}.list-group-horizontal-md>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-md>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:992px){.list-group-horizontal-lg{flex-direction:row}.list-group-horizontal-lg>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-lg>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-lg>.list-group-item.active{margin-top:0}.list-group-horizontal-lg>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-lg>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:1200px){.list-group-horizontal-xl{flex-direction:row}.list-group-horizontal-xl>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-xl>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-xl>.list-group-item.active{margin-top:0}.list-group-horizontal-xl>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-xl>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:1400px){.list-group-horizontal-xxl{flex-direction:row}.list-group-horizontal-xxl>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-xxl>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-xxl>.list-group-item.active{margin-top:0}.list-group-horizontal-xxl>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-xxl>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}.list-group-flush{border-radius:0}.list-group-flush>.list-group-item{border-width:0 0 1px}.list-group-flush>.list-group-item:last-child{border-bottom-width:0}.list-group-item-primary{color:#084298;background-color:#cfe2ff}.list-group-item-primary.list-group-item-action:focus,.list-group-item-primary.list-group-item-action:hover{color:#084298;background-color:#bacbe6}.list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#084298;border-color:#084298}.list-group-item-secondary{color:#41464b;background-color:#e2e3e5}.list-group-item-secondary.list-group-item-action:focus,.list-group-item-secondary.list-group-item-action:hover{color:#41464b;background-color:#cbccce}.list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#41464b;border-color:#41464b}.list-group-item-success{color:#0f5132;background-color:#d1e7dd}.list-group-item-success.list-group-item-action:focus,.list-group-item-success.list-group-item-action:hover{color:#0f5132;background-color:#bcd0c7}.list-group-item-success.list-group-item-action.active{color:#fff;background-color:#0f5132;border-color:#0f5132}.list-group-item-info{color:#055160;background-color:#cff4fc}.list-group-item-info.list-group-item-action:focus,.list-group-item-info.list-group-item-action:hover{color:#055160;background-color:#badce3}.list-group-item-info.list-group-item-action.active{color:#fff;background-color:#055160;border-color:#055160}.list-group-item-warning{color:#664d03;background-color:#fff3cd}.list-group-item-warning.list-group-item-action:focus,.list-group-item-warning.list-group-item-action:hover{color:#664d03;background-color:#e6dbb9}.list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#664d03;border-color:#664d03}.list-group-item-danger{color:#842029;background-color:#f8d7da}.list-group-item-danger.list-group-item-action:focus,.list-group-item-danger.list-group-item-action:hover{color:#842029;background-color:#dfc2c4}.list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#842029;border-color:#842029}.list-group-item-light{color:#636464;background-color:#fefefe}.list-group-item-light.list-group-item-action:focus,.list-group-item-light.list-group-item-action:hover{color:#636464;background-color:#e5e5e5}.list-group-item-light.list-group-item-action.active{color:#fff;background-color:#636464;border-color:#636464}.list-group-item-dark{color:#141619;background-color:#d3d3d4}.list-group-item-dark.list-group-item-action:focus,.list-group-item-dark.list-group-item-action:hover{color:#141619;background-color:#bebebf}.list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#141619;border-color:#141619}.btn-close{box-sizing:content-box;width:1em;height:1em;padding:.25em .25em;color:#000;background:transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;border:0;border-radius:.25rem;opacity:.5}.btn-close:hover{color:#000;text-decoration:none;opacity:.75}.btn-close:focus{outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25);opacity:1}.btn-close.disabled,.btn-close:disabled{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:.25}.btn-close-white{filter:invert(1) grayscale(100%) brightness(200%)}.toast{width:350px;max-width:100%;font-size:.875rem;pointer-events:auto;background-color:rgba(255,255,255,.85);background-clip:padding-box;border:1px solid rgba(0,0,0,.1);box-shadow:0 .5rem 1rem rgba(0,0,0,.15);border-radius:.25rem}.toast.showing{opacity:0}.toast:not(.show){display:none}.toast-container{width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:100%;pointer-events:none}.toast-container>:not(:last-child){margin-bottom:.75rem}.toast-header{display:flex;align-items:center;padding:.5rem .75rem;color:#6c757d;background-color:rgba(255,255,255,.85);background-clip:padding-box;border-bottom:1px solid rgba(0,0,0,.05);border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.toast-header .btn-close{margin-right:-.375rem;margin-left:.75rem}.toast-body{padding:.75rem;word-wrap:break-word}.modal{position:fixed;top:0;left:0;z-index:1055;display:none;width:100%;height:100%;overflow-x:hidden;overflow-y:auto;outline:0}.modal-dialog{position:relative;width:auto;margin:.5rem;pointer-events:none}.modal.fade .modal-dialog{transition:transform .3s ease-out;transform:translate(0,-50px)}@media (prefers-reduced-motion:reduce){.modal.fade .modal-dialog{transition:none}}.modal.show .modal-dialog{transform:none}.modal.modal-static .modal-dialog{transform:scale(1.02)}.modal-dialog-scrollable{height:calc(100% - 1rem)}.modal-dialog-scrollable .modal-content{max-height:100%;overflow:hidden}.modal-dialog-scrollable .modal-body{overflow-y:auto}.modal-dialog-centered{display:flex;align-items:center;min-height:calc(100% - 1rem)}.modal-content{position:relative;display:flex;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem;outline:0}.modal-backdrop{position:fixed;top:0;left:0;z-index:1050;width:100vw;height:100vh;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:.5}.modal-header{display:flex;flex-shrink:0;align-items:center;justify-content:space-between;padding:1rem 1rem;border-bottom:1px solid #dee2e6;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.modal-header .btn-close{padding:.5rem .5rem;margin:-.5rem -.5rem -.5rem auto}.modal-title{margin-bottom:0;line-height:1.5}.modal-body{position:relative;flex:1 1 auto;padding:1rem}.modal-footer{display:flex;flex-wrap:wrap;flex-shrink:0;align-items:center;justify-content:flex-end;padding:.75rem;border-top:1px solid #dee2e6;border-bottom-right-radius:calc(.3rem - 1px);border-bottom-left-radius:calc(.3rem - 1px)}.modal-footer>*{margin:.25rem}@media (min-width:576px){.modal-dialog{max-width:500px;margin:1.75rem auto}.modal-dialog-scrollable{height:calc(100% - 3.5rem)}.modal-dialog-centered{min-height:calc(100% - 3.5rem)}.modal-sm{max-width:300px}}@media (min-width:992px){.modal-lg,.modal-xl{max-width:800px}}@media (min-width:1200px){.modal-xl{max-width:1140px}}.modal-fullscreen{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen .modal-header{border-radius:0}.modal-fullscreen .modal-body{overflow-y:auto}.modal-fullscreen .modal-footer{border-radius:0}@media (max-width:575.98px){.modal-fullscreen-sm-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-sm-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-sm-down .modal-header{border-radius:0}.modal-fullscreen-sm-down .modal-body{overflow-y:auto}.modal-fullscreen-sm-down .modal-footer{border-radius:0}}@media (max-width:767.98px){.modal-fullscreen-md-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-md-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-md-down .modal-header{border-radius:0}.modal-fullscreen-md-down .modal-body{overflow-y:auto}.modal-fullscreen-md-down .modal-footer{border-radius:0}}@media (max-width:991.98px){.modal-fullscreen-lg-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-lg-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-lg-down .modal-header{border-radius:0}.modal-fullscreen-lg-down .modal-body{overflow-y:auto}.modal-fullscreen-lg-down .modal-footer{border-radius:0}}@media (max-width:1199.98px){.modal-fullscreen-xl-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-xl-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-xl-down .modal-header{border-radius:0}.modal-fullscreen-xl-down .modal-body{overflow-y:auto}.modal-fullscreen-xl-down .modal-footer{border-radius:0}}@media (max-width:1399.98px){.modal-fullscreen-xxl-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-xxl-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-xxl-down .modal-header{border-radius:0}.modal-fullscreen-xxl-down .modal-body{overflow-y:auto}.modal-fullscreen-xxl-down .modal-footer{border-radius:0}}.tooltip{position:absolute;z-index:1080;display:block;margin:0;font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;opacity:0}.tooltip.show{opacity:.9}.tooltip .tooltip-arrow{position:absolute;display:block;width:.8rem;height:.4rem}.tooltip .tooltip-arrow::before{position:absolute;content:"";border-color:transparent;border-style:solid}.bs-tooltip-auto[data-popper-placement^=top],.bs-tooltip-top{padding:.4rem 0}.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow,.bs-tooltip-top .tooltip-arrow{bottom:0}.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before,.bs-tooltip-top .tooltip-arrow::before{top:-1px;border-width:.4rem .4rem 0;border-top-color:#000}.bs-tooltip-auto[data-popper-placement^=right],.bs-tooltip-end{padding:0 .4rem}.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow,.bs-tooltip-end .tooltip-arrow{left:0;width:.4rem;height:.8rem}.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow::before,.bs-tooltip-end .tooltip-arrow::before{right:-1px;border-width:.4rem .4rem .4rem 0;border-right-color:#000}.bs-tooltip-auto[data-popper-placement^=bottom],.bs-tooltip-bottom{padding:.4rem 0}.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow,.bs-tooltip-bottom .tooltip-arrow{top:0}.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow::before,.bs-tooltip-bottom .tooltip-arrow::before{bottom:-1px;border-width:0 .4rem .4rem;border-bottom-color:#000}.bs-tooltip-auto[data-popper-placement^=left],.bs-tooltip-start{padding:0 .4rem}.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow,.bs-tooltip-start .tooltip-arrow{right:0;width:.4rem;height:.8rem}.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow::before,.bs-tooltip-start .tooltip-arrow::before{left:-1px;border-width:.4rem 0 .4rem .4rem;border-left-color:#000}.tooltip-inner{max-width:200px;padding:.25rem .5rem;color:#fff;text-align:center;background-color:#000;border-radius:.25rem}.popover{position:absolute;top:0;left:0;z-index:1070;display:block;max-width:276px;font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem}.popover .popover-arrow{position:absolute;display:block;width:1rem;height:.5rem}.popover .popover-arrow::after,.popover .popover-arrow::before{position:absolute;display:block;content:"";border-color:transparent;border-style:solid}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow,.bs-popover-top>.popover-arrow{bottom:calc(-.5rem - 1px)}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::before,.bs-popover-top>.popover-arrow::before{bottom:0;border-width:.5rem .5rem 0;border-top-color:rgba(0,0,0,.25)}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::after,.bs-popover-top>.popover-arrow::after{bottom:1px;border-width:.5rem .5rem 0;border-top-color:#fff}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow,.bs-popover-end>.popover-arrow{left:calc(-.5rem - 1px);width:.5rem;height:1rem}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::before,.bs-popover-end>.popover-arrow::before{left:0;border-width:.5rem .5rem .5rem 0;border-right-color:rgba(0,0,0,.25)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::after,.bs-popover-end>.popover-arrow::after{left:1px;border-width:.5rem .5rem .5rem 0;border-right-color:#fff}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow,.bs-popover-bottom>.popover-arrow{top:calc(-.5rem - 1px)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::before,.bs-popover-bottom>.popover-arrow::before{top:0;border-width:0 .5rem .5rem .5rem;border-bottom-color:rgba(0,0,0,.25)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::after,.bs-popover-bottom>.popover-arrow::after{top:1px;border-width:0 .5rem .5rem .5rem;border-bottom-color:#fff}.bs-popover-auto[data-popper-placement^=bottom] .popover-header::before,.bs-popover-bottom .popover-header::before{position:absolute;top:0;left:50%;display:block;width:1rem;margin-left:-.5rem;content:"";border-bottom:1px solid #f0f0f0}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow,.bs-popover-start>.popover-arrow{right:calc(-.5rem - 1px);width:.5rem;height:1rem}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::before,.bs-popover-start>.popover-arrow::before{right:0;border-width:.5rem 0 .5rem .5rem;border-left-color:rgba(0,0,0,.25)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::after,.bs-popover-start>.popover-arrow::after{right:1px;border-width:.5rem 0 .5rem .5rem;border-left-color:#fff}.popover-header{padding:.5rem 1rem;margin-bottom:0;font-size:1rem;background-color:#f0f0f0;border-bottom:1px solid rgba(0,0,0,.2);border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.popover-header:empty{display:none}.popover-body{padding:1rem 1rem;color:#212529}.carousel{position:relative}.carousel.pointer-event{touch-action:pan-y}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner::after{display:block;clear:both;content:""}.carousel-item{position:relative;display:none;float:left;width:100%;margin-right:-100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:transform .6s ease-in-out}@media (prefers-reduced-motion:reduce){.carousel-item{transition:none}}.carousel-item-next,.carousel-item-prev,.carousel-item.active{display:block}.active.carousel-item-end,.carousel-item-next:not(.carousel-item-start){transform:translateX(100%)}.active.carousel-item-start,.carousel-item-prev:not(.carousel-item-end){transform:translateX(-100%)}.carousel-fade .carousel-item{opacity:0;transition-property:opacity;transform:none}.carousel-fade .carousel-item-next.carousel-item-start,.carousel-fade .carousel-item-prev.carousel-item-end,.carousel-fade .carousel-item.active{z-index:1;opacity:1}.carousel-fade .active.carousel-item-end,.carousel-fade .active.carousel-item-start{z-index:0;opacity:0;transition:opacity 0s .6s}@media (prefers-reduced-motion:reduce){.carousel-fade .active.carousel-item-end,.carousel-fade .active.carousel-item-start{transition:none}}.carousel-control-next,.carousel-control-prev{position:absolute;top:0;bottom:0;z-index:1;display:flex;align-items:center;justify-content:center;width:15%;padding:0;color:#fff;text-align:center;background:0 0;border:0;opacity:.5;transition:opacity .15s ease}@media (prefers-reduced-motion:reduce){.carousel-control-next,.carousel-control-prev{transition:none}}.carousel-control-next:focus,.carousel-control-next:hover,.carousel-control-prev:focus,.carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-next-icon,.carousel-control-prev-icon{display:inline-block;width:2rem;height:2rem;background-repeat:no-repeat;background-position:50%;background-size:100% 100%}.carousel-control-prev-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e")}.carousel-control-next-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e")}.carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:2;display:flex;justify-content:center;padding:0;margin-right:15%;margin-bottom:1rem;margin-left:15%;list-style:none}.carousel-indicators [data-bs-target]{box-sizing:content-box;flex:0 1 auto;width:30px;height:3px;padding:0;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:#fff;background-clip:padding-box;border:0;border-top:10px solid transparent;border-bottom:10px solid transparent;opacity:.5;transition:opacity .6s ease}@media (prefers-reduced-motion:reduce){.carousel-indicators [data-bs-target]{transition:none}}.carousel-indicators .active{opacity:1}.carousel-caption{position:absolute;right:15%;bottom:1.25rem;left:15%;padding-top:1.25rem;padding-bottom:1.25rem;color:#fff;text-align:center}.carousel-dark .carousel-control-next-icon,.carousel-dark .carousel-control-prev-icon{filter:invert(1) grayscale(100)}.carousel-dark .carousel-indicators [data-bs-target]{background-color:#000}.carousel-dark .carousel-caption{color:#000}@-webkit-keyframes spinner-border{to{transform:rotate(360deg)}}@keyframes spinner-border{to{transform:rotate(360deg)}}.spinner-border{display:inline-block;width:2rem;height:2rem;vertical-align:-.125em;border:.25em solid currentColor;border-right-color:transparent;border-radius:50%;-webkit-animation:.75s linear infinite spinner-border;animation:.75s linear infinite spinner-border}.spinner-border-sm{width:1rem;height:1rem;border-width:.2em}@-webkit-keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}@keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}.spinner-grow{display:inline-block;width:2rem;height:2rem;vertical-align:-.125em;background-color:currentColor;border-radius:50%;opacity:0;-webkit-animation:.75s linear infinite spinner-grow;animation:.75s linear infinite spinner-grow}.spinner-grow-sm{width:1rem;height:1rem}@media (prefers-reduced-motion:reduce){.spinner-border,.spinner-grow{-webkit-animation-duration:1.5s;animation-duration:1.5s}}.offcanvas{position:fixed;bottom:0;z-index:1045;display:flex;flex-direction:column;max-width:100%;visibility:hidden;background-color:#fff;background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}@media (prefers-reduced-motion:reduce){.offcanvas{transition:none}}.offcanvas-backdrop{position:fixed;top:0;left:0;z-index:1040;width:100vw;height:100vh;background-color:#000}.offcanvas-backdrop.fade{opacity:0}.offcanvas-backdrop.show{opacity:.5}.offcanvas-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1rem}.offcanvas-header .btn-close{padding:.5rem .5rem;margin-top:-.5rem;margin-right:-.5rem;margin-bottom:-.5rem}.offcanvas-title{margin-bottom:0;line-height:1.5}.offcanvas-body{flex-grow:1;padding:1rem 1rem;overflow-y:auto}.offcanvas-start{top:0;left:0;width:400px;border-right:1px solid rgba(0,0,0,.2);transform:translateX(-100%)}.offcanvas-end{top:0;right:0;width:400px;border-left:1px solid rgba(0,0,0,.2);transform:translateX(100%)}.offcanvas-top{top:0;right:0;left:0;height:30vh;max-height:100%;border-bottom:1px solid rgba(0,0,0,.2);transform:translateY(-100%)}.offcanvas-bottom{right:0;left:0;height:30vh;max-height:100%;border-top:1px solid rgba(0,0,0,.2);transform:translateY(100%)}.offcanvas.show{transform:none}.placeholder{display:inline-block;min-height:1em;vertical-align:middle;cursor:wait;background-color:currentColor;opacity:.5}.placeholder.btn::before{display:inline-block;content:""}.placeholder-xs{min-height:.6em}.placeholder-sm{min-height:.8em}.placeholder-lg{min-height:1.2em}.placeholder-glow .placeholder{-webkit-animation:placeholder-glow 2s ease-in-out infinite;animation:placeholder-glow 2s ease-in-out infinite}@-webkit-keyframes placeholder-glow{50%{opacity:.2}}@keyframes placeholder-glow{50%{opacity:.2}}.placeholder-wave{-webkit-mask-image:linear-gradient(130deg,#000 55%,rgba(0,0,0,0.8) 75%,#000 95%);mask-image:linear-gradient(130deg,#000 55%,rgba(0,0,0,0.8) 75%,#000 95%);-webkit-mask-size:200% 100%;mask-size:200% 100%;-webkit-animation:placeholder-wave 2s linear infinite;animation:placeholder-wave 2s linear infinite}@-webkit-keyframes placeholder-wave{100%{-webkit-mask-position:-200% 0%;mask-position:-200% 0%}}@keyframes placeholder-wave{100%{-webkit-mask-position:-200% 0%;mask-position:-200% 0%}}.clearfix::after{display:block;clear:both;content:""}.link-primary{color:#0d6efd}.link-primary:focus,.link-primary:hover{color:#0a58ca}.link-secondary{color:#6c757d}.link-secondary:focus,.link-secondary:hover{color:#565e64}.link-success{color:#198754}.link-success:focus,.link-success:hover{color:#146c43}.link-info{color:#0dcaf0}.link-info:focus,.link-info:hover{color:#3dd5f3}.link-warning{color:#ffc107}.link-warning:focus,.link-warning:hover{color:#ffcd39}.link-danger{color:#dc3545}.link-danger:focus,.link-danger:hover{color:#b02a37}.link-light{color:#f8f9fa}.link-light:focus,.link-light:hover{color:#f9fafb}.link-dark{color:#212529}.link-dark:focus,.link-dark:hover{color:#1a1e21}.ratio{position:relative;width:100%}.ratio::before{display:block;padding-top:var(--bs-aspect-ratio);content:""}.ratio>*{position:absolute;top:0;left:0;width:100%;height:100%}.ratio-1x1{--bs-aspect-ratio:100%}.ratio-4x3{--bs-aspect-ratio:calc(3 / 4 * 100%)}.ratio-16x9{--bs-aspect-ratio:calc(9 / 16 * 100%)}.ratio-21x9{--bs-aspect-ratio:calc(9 / 21 * 100%)}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}.sticky-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}@media (min-width:576px){.sticky-sm-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}@media (min-width:768px){.sticky-md-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}@media (min-width:992px){.sticky-lg-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}@media (min-width:1200px){.sticky-xl-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}@media (min-width:1400px){.sticky-xxl-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}.hstack{display:flex;flex-direction:row;align-items:center;align-self:stretch}.vstack{display:flex;flex:1 1 auto;flex-direction:column;align-self:stretch}.visually-hidden,.visually-hidden-focusable:not(:focus):not(:focus-within){position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;content:""}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vr{display:inline-block;align-self:stretch;width:1px;min-height:1em;background-color:currentColor;opacity:.25}.align-baseline{vertical-align:baseline!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.float-start{float:left!important}.float-end{float:right!important}.float-none{float:none!important}.opacity-0{opacity:0!important}.opacity-25{opacity:.25!important}.opacity-50{opacity:.5!important}.opacity-75{opacity:.75!important}.opacity-100{opacity:1!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.overflow-visible{overflow:visible!important}.overflow-scroll{overflow:scroll!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-grid{display:grid!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:flex!important}.d-inline-flex{display:inline-flex!important}.d-none{display:none!important}.shadow{box-shadow:0 .5rem 1rem rgba(0,0,0,.15)!important}.shadow-sm{box-shadow:0 .125rem .25rem rgba(0,0,0,.075)!important}.shadow-lg{box-shadow:0 1rem 3rem rgba(0,0,0,.175)!important}.shadow-none{box-shadow:none!important}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:-webkit-sticky!important;position:sticky!important}.top-0{top:0!important}.top-50{top:50%!important}.top-100{top:100%!important}.bottom-0{bottom:0!important}.bottom-50{bottom:50%!important}.bottom-100{bottom:100%!important}.start-0{left:0!important}.start-50{left:50%!important}.start-100{left:100%!important}.end-0{right:0!important}.end-50{right:50%!important}.end-100{right:100%!important}.translate-middle{transform:translate(-50%,-50%)!important}.translate-middle-x{transform:translateX(-50%)!important}.translate-middle-y{transform:translateY(-50%)!important}.border{border:1px solid #dee2e6!important}.border-0{border:0!important}.border-top{border-top:1px solid #dee2e6!important}.border-top-0{border-top:0!important}.border-end{border-right:1px solid #dee2e6!important}.border-end-0{border-right:0!important}.border-bottom{border-bottom:1px solid #dee2e6!important}.border-bottom-0{border-bottom:0!important}.border-start{border-left:1px solid #dee2e6!important}.border-start-0{border-left:0!important}.border-primary{border-color:#0d6efd!important}.border-secondary{border-color:#6c757d!important}.border-success{border-color:#198754!important}.border-info{border-color:#0dcaf0!important}.border-warning{border-color:#ffc107!important}.border-danger{border-color:#dc3545!important}.border-light{border-color:#f8f9fa!important}.border-dark{border-color:#212529!important}.border-white{border-color:#fff!important}.border-1{border-width:1px!important}.border-2{border-width:2px!important}.border-3{border-width:3px!important}.border-4{border-width:4px!important}.border-5{border-width:5px!important}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.w-auto{width:auto!important}.mw-100{max-width:100%!important}.vw-100{width:100vw!important}.min-vw-100{min-width:100vw!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.h-auto{height:auto!important}.mh-100{max-height:100%!important}.vh-100{height:100vh!important}.min-vh-100{min-height:100vh!important}.flex-fill{flex:1 1 auto!important}.flex-row{flex-direction:row!important}.flex-column{flex-direction:column!important}.flex-row-reverse{flex-direction:row-reverse!important}.flex-column-reverse{flex-direction:column-reverse!important}.flex-grow-0{flex-grow:0!important}.flex-grow-1{flex-grow:1!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.flex-wrap{flex-wrap:wrap!important}.flex-nowrap{flex-wrap:nowrap!important}.flex-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-0{gap:0!important}.gap-1{gap:.25rem!important}.gap-2{gap:.5rem!important}.gap-3{gap:1rem!important}.gap-4{gap:1.5rem!important}.gap-5{gap:3rem!important}.justify-content-start{justify-content:flex-start!important}.justify-content-end{justify-content:flex-end!important}.justify-content-center{justify-content:center!important}.justify-content-between{justify-content:space-between!important}.justify-content-around{justify-content:space-around!important}.justify-content-evenly{justify-content:space-evenly!important}.align-items-start{align-items:flex-start!important}.align-items-end{align-items:flex-end!important}.align-items-center{align-items:center!important}.align-items-baseline{align-items:baseline!important}.align-items-stretch{align-items:stretch!important}.align-content-start{align-content:flex-start!important}.align-content-end{align-content:flex-end!important}.align-content-center{align-content:center!important}.align-content-between{align-content:space-between!important}.align-content-around{align-content:space-around!important}.align-content-stretch{align-content:stretch!important}.align-self-auto{align-self:auto!important}.align-self-start{align-self:flex-start!important}.align-self-end{align-self:flex-end!important}.align-self-center{align-self:center!important}.align-self-baseline{align-self:baseline!important}.align-self-stretch{align-self:stretch!important}.order-first{order:-1!important}.order-0{order:0!important}.order-1{order:1!important}.order-2{order:2!important}.order-3{order:3!important}.order-4{order:4!important}.order-5{order:5!important}.order-last{order:6!important}.m-0{margin:0!important}.m-1{margin:.25rem!important}.m-2{margin:.5rem!important}.m-3{margin:1rem!important}.m-4{margin:1.5rem!important}.m-5{margin:3rem!important}.m-auto{margin:auto!important}.mx-0{margin-right:0!important;margin-left:0!important}.mx-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-3{margin-right:1rem!important;margin-left:1rem!important}.mx-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-5{margin-right:3rem!important;margin-left:3rem!important}.mx-auto{margin-right:auto!important;margin-left:auto!important}.my-0{margin-top:0!important;margin-bottom:0!important}.my-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-0{margin-top:0!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}.mt-3{margin-top:1rem!important}.mt-4{margin-top:1.5rem!important}.mt-5{margin-top:3rem!important}.mt-auto{margin-top:auto!important}.me-0{margin-right:0!important}.me-1{margin-right:.25rem!important}.me-2{margin-right:.5rem!important}.me-3{margin-right:1rem!important}.me-4{margin-right:1.5rem!important}.me-5{margin-right:3rem!important}.me-auto{margin-right:auto!important}.mb-0{margin-bottom:0!important}.mb-1{margin-bottom:.25rem!important}.mb-2{margin-bottom:.5rem!important}.mb-3{margin-bottom:1rem!important}.mb-4{margin-bottom:1.5rem!important}.mb-5{margin-bottom:3rem!important}.mb-auto{margin-bottom:auto!important}.ms-0{margin-left:0!important}.ms-1{margin-left:.25rem!important}.ms-2{margin-left:.5rem!important}.ms-3{margin-left:1rem!important}.ms-4{margin-left:1.5rem!important}.ms-5{margin-left:3rem!important}.ms-auto{margin-left:auto!important}.p-0{padding:0!important}.p-1{padding:.25rem!important}.p-2{padding:.5rem!important}.p-3{padding:1rem!important}.p-4{padding:1.5rem!important}.p-5{padding:3rem!important}.px-0{padding-right:0!important;padding-left:0!important}.px-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-3{padding-right:1rem!important;padding-left:1rem!important}.px-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-5{padding-right:3rem!important;padding-left:3rem!important}.py-0{padding-top:0!important;padding-bottom:0!important}.py-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-0{padding-top:0!important}.pt-1{padding-top:.25rem!important}.pt-2{padding-top:.5rem!important}.pt-3{padding-top:1rem!important}.pt-4{padding-top:1.5rem!important}.pt-5{padding-top:3rem!important}.pe-0{padding-right:0!important}.pe-1{padding-right:.25rem!important}.pe-2{padding-right:.5rem!important}.pe-3{padding-right:1rem!important}.pe-4{padding-right:1.5rem!important}.pe-5{padding-right:3rem!important}.pb-0{padding-bottom:0!important}.pb-1{padding-bottom:.25rem!important}.pb-2{padding-bottom:.5rem!important}.pb-3{padding-bottom:1rem!important}.pb-4{padding-bottom:1.5rem!important}.pb-5{padding-bottom:3rem!important}.ps-0{padding-left:0!important}.ps-1{padding-left:.25rem!important}.ps-2{padding-left:.5rem!important}.ps-3{padding-left:1rem!important}.ps-4{padding-left:1.5rem!important}.ps-5{padding-left:3rem!important}.font-monospace{font-family:var(--bs-font-monospace)!important}.fs-1{font-size:calc(1.375rem + 1.5vw)!important}.fs-2{font-size:calc(1.325rem + .9vw)!important}.fs-3{font-size:calc(1.3rem + .6vw)!important}.fs-4{font-size:calc(1.275rem + .3vw)!important}.fs-5{font-size:1.25rem!important}.fs-6{font-size:1rem!important}.fst-italic{font-style:italic!important}.fst-normal{font-style:normal!important}.fw-light{font-weight:300!important}.fw-lighter{font-weight:lighter!important}.fw-normal{font-weight:400!important}.fw-bold{font-weight:700!important}.fw-bolder{font-weight:bolder!important}.lh-1{line-height:1!important}.lh-sm{line-height:1.25!important}.lh-base{line-height:1.5!important}.lh-lg{line-height:2!important}.text-start{text-align:left!important}.text-end{text-align:right!important}.text-center{text-align:center!important}.text-decoration-none{text-decoration:none!important}.text-decoration-underline{text-decoration:underline!important}.text-decoration-line-through{text-decoration:line-through!important}.text-lowercase{text-transform:lowercase!important}.text-uppercase{text-transform:uppercase!important}.text-capitalize{text-transform:capitalize!important}.text-wrap{white-space:normal!important}.text-nowrap{white-space:nowrap!important}.text-break{word-wrap:break-word!important;word-break:break-word!important}.text-primary{--bs-text-opacity:1;color:rgba(var(--bs-primary-rgb),var(--bs-text-opacity))!important}.text-secondary{--bs-text-opacity:1;color:rgba(var(--bs-secondary-rgb),var(--bs-text-opacity))!important}.text-success{--bs-text-opacity:1;color:rgba(var(--bs-success-rgb),var(--bs-text-opacity))!important}.text-info{--bs-text-opacity:1;color:rgba(var(--bs-info-rgb),var(--bs-text-opacity))!important}.text-warning{--bs-text-opacity:1;color:rgba(var(--bs-warning-rgb),var(--bs-text-opacity))!important}.text-danger{--bs-text-opacity:1;color:rgba(var(--bs-danger-rgb),var(--bs-text-opacity))!important}.text-light{--bs-text-opacity:1;color:rgba(var(--bs-light-rgb),var(--bs-text-opacity))!important}.text-dark{--bs-text-opacity:1;color:rgba(var(--bs-dark-rgb),var(--bs-text-opacity))!important}.text-black{--bs-text-opacity:1;color:rgba(var(--bs-black-rgb),var(--bs-text-opacity))!important}.text-white{--bs-text-opacity:1;color:rgba(var(--bs-white-rgb),var(--bs-text-opacity))!important}.text-body{--bs-text-opacity:1;color:rgba(var(--bs-body-rgb),var(--bs-text-opacity))!important}.text-muted{--bs-text-opacity:1;color:#6c757d!important}.text-black-50{--bs-text-opacity:1;color:rgba(0,0,0,.5)!important}.text-white-50{--bs-text-opacity:1;color:rgba(255,255,255,.5)!important}.text-reset{--bs-text-opacity:1;color:inherit!important}.text-opacity-25{--bs-text-opacity:0.25}.text-opacity-50{--bs-text-opacity:0.5}.text-opacity-75{--bs-text-opacity:0.75}.text-opacity-100{--bs-text-opacity:1}.bg-primary{--bs-bg-opacity:1;background-color:rgba(var(--bs-primary-rgb),var(--bs-bg-opacity))!important}.bg-secondary{--bs-bg-opacity:1;background-color:rgba(var(--bs-secondary-rgb),var(--bs-bg-opacity))!important}.bg-success{--bs-bg-opacity:1;background-color:rgba(var(--bs-success-rgb),var(--bs-bg-opacity))!important}.bg-info{--bs-bg-opacity:1;background-color:rgba(var(--bs-info-rgb),var(--bs-bg-opacity))!important}.bg-warning{--bs-bg-opacity:1;background-color:rgba(var(--bs-warning-rgb),var(--bs-bg-opacity))!important}.bg-danger{--bs-bg-opacity:1;background-color:rgba(var(--bs-danger-rgb),var(--bs-bg-opacity))!important}.bg-light{--bs-bg-opacity:1;background-color:rgba(var(--bs-light-rgb),var(--bs-bg-opacity))!important}.bg-dark{--bs-bg-opacity:1;background-color:rgba(var(--bs-dark-rgb),var(--bs-bg-opacity))!important}.bg-black{--bs-bg-opacity:1;background-color:rgba(var(--bs-black-rgb),var(--bs-bg-opacity))!important}.bg-white{--bs-bg-opacity:1;background-color:rgba(var(--bs-white-rgb),var(--bs-bg-opacity))!important}.bg-body{--bs-bg-opacity:1;background-color:rgba(var(--bs-body-rgb),var(--bs-bg-opacity))!important}.bg-transparent{--bs-bg-opacity:1;background-color:transparent!important}.bg-opacity-10{--bs-bg-opacity:0.1}.bg-opacity-25{--bs-bg-opacity:0.25}.bg-opacity-50{--bs-bg-opacity:0.5}.bg-opacity-75{--bs-bg-opacity:0.75}.bg-opacity-100{--bs-bg-opacity:1}.bg-gradient{background-image:var(--bs-gradient)!important}.user-select-all{-webkit-user-select:all!important;-moz-user-select:all!important;user-select:all!important}.user-select-auto{-webkit-user-select:auto!important;-moz-user-select:auto!important;user-select:auto!important}.user-select-none{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}.pe-none{pointer-events:none!important}.pe-auto{pointer-events:auto!important}.rounded{border-radius:.25rem!important}.rounded-0{border-radius:0!important}.rounded-1{border-radius:.2rem!important}.rounded-2{border-radius:.25rem!important}.rounded-3{border-radius:.3rem!important}.rounded-circle{border-radius:50%!important}.rounded-pill{border-radius:50rem!important}.rounded-top{border-top-left-radius:.25rem!important;border-top-right-radius:.25rem!important}.rounded-end{border-top-right-radius:.25rem!important;border-bottom-right-radius:.25rem!important}.rounded-bottom{border-bottom-right-radius:.25rem!important;border-bottom-left-radius:.25rem!important}.rounded-start{border-bottom-left-radius:.25rem!important;border-top-left-radius:.25rem!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}@media (min-width:576px){.float-sm-start{float:left!important}.float-sm-end{float:right!important}.float-sm-none{float:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-grid{display:grid!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:flex!important}.d-sm-inline-flex{display:inline-flex!important}.d-sm-none{display:none!important}.flex-sm-fill{flex:1 1 auto!important}.flex-sm-row{flex-direction:row!important}.flex-sm-column{flex-direction:column!important}.flex-sm-row-reverse{flex-direction:row-reverse!important}.flex-sm-column-reverse{flex-direction:column-reverse!important}.flex-sm-grow-0{flex-grow:0!important}.flex-sm-grow-1{flex-grow:1!important}.flex-sm-shrink-0{flex-shrink:0!important}.flex-sm-shrink-1{flex-shrink:1!important}.flex-sm-wrap{flex-wrap:wrap!important}.flex-sm-nowrap{flex-wrap:nowrap!important}.flex-sm-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-sm-0{gap:0!important}.gap-sm-1{gap:.25rem!important}.gap-sm-2{gap:.5rem!important}.gap-sm-3{gap:1rem!important}.gap-sm-4{gap:1.5rem!important}.gap-sm-5{gap:3rem!important}.justify-content-sm-start{justify-content:flex-start!important}.justify-content-sm-end{justify-content:flex-end!important}.justify-content-sm-center{justify-content:center!important}.justify-content-sm-between{justify-content:space-between!important}.justify-content-sm-around{justify-content:space-around!important}.justify-content-sm-evenly{justify-content:space-evenly!important}.align-items-sm-start{align-items:flex-start!important}.align-items-sm-end{align-items:flex-end!important}.align-items-sm-center{align-items:center!important}.align-items-sm-baseline{align-items:baseline!important}.align-items-sm-stretch{align-items:stretch!important}.align-content-sm-start{align-content:flex-start!important}.align-content-sm-end{align-content:flex-end!important}.align-content-sm-center{align-content:center!important}.align-content-sm-between{align-content:space-between!important}.align-content-sm-around{align-content:space-around!important}.align-content-sm-stretch{align-content:stretch!important}.align-self-sm-auto{align-self:auto!important}.align-self-sm-start{align-self:flex-start!important}.align-self-sm-end{align-self:flex-end!important}.align-self-sm-center{align-self:center!important}.align-self-sm-baseline{align-self:baseline!important}.align-self-sm-stretch{align-self:stretch!important}.order-sm-first{order:-1!important}.order-sm-0{order:0!important}.order-sm-1{order:1!important}.order-sm-2{order:2!important}.order-sm-3{order:3!important}.order-sm-4{order:4!important}.order-sm-5{order:5!important}.order-sm-last{order:6!important}.m-sm-0{margin:0!important}.m-sm-1{margin:.25rem!important}.m-sm-2{margin:.5rem!important}.m-sm-3{margin:1rem!important}.m-sm-4{margin:1.5rem!important}.m-sm-5{margin:3rem!important}.m-sm-auto{margin:auto!important}.mx-sm-0{margin-right:0!important;margin-left:0!important}.mx-sm-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-sm-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-sm-3{margin-right:1rem!important;margin-left:1rem!important}.mx-sm-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-sm-5{margin-right:3rem!important;margin-left:3rem!important}.mx-sm-auto{margin-right:auto!important;margin-left:auto!important}.my-sm-0{margin-top:0!important;margin-bottom:0!important}.my-sm-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-sm-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-sm-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-sm-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-sm-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-sm-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-sm-0{margin-top:0!important}.mt-sm-1{margin-top:.25rem!important}.mt-sm-2{margin-top:.5rem!important}.mt-sm-3{margin-top:1rem!important}.mt-sm-4{margin-top:1.5rem!important}.mt-sm-5{margin-top:3rem!important}.mt-sm-auto{margin-top:auto!important}.me-sm-0{margin-right:0!important}.me-sm-1{margin-right:.25rem!important}.me-sm-2{margin-right:.5rem!important}.me-sm-3{margin-right:1rem!important}.me-sm-4{margin-right:1.5rem!important}.me-sm-5{margin-right:3rem!important}.me-sm-auto{margin-right:auto!important}.mb-sm-0{margin-bottom:0!important}.mb-sm-1{margin-bottom:.25rem!important}.mb-sm-2{margin-bottom:.5rem!important}.mb-sm-3{margin-bottom:1rem!important}.mb-sm-4{margin-bottom:1.5rem!important}.mb-sm-5{margin-bottom:3rem!important}.mb-sm-auto{margin-bottom:auto!important}.ms-sm-0{margin-left:0!important}.ms-sm-1{margin-left:.25rem!important}.ms-sm-2{margin-left:.5rem!important}.ms-sm-3{margin-left:1rem!important}.ms-sm-4{margin-left:1.5rem!important}.ms-sm-5{margin-left:3rem!important}.ms-sm-auto{margin-left:auto!important}.p-sm-0{padding:0!important}.p-sm-1{padding:.25rem!important}.p-sm-2{padding:.5rem!important}.p-sm-3{padding:1rem!important}.p-sm-4{padding:1.5rem!important}.p-sm-5{padding:3rem!important}.px-sm-0{padding-right:0!important;padding-left:0!important}.px-sm-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-sm-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-sm-3{padding-right:1rem!important;padding-left:1rem!important}.px-sm-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-sm-5{padding-right:3rem!important;padding-left:3rem!important}.py-sm-0{padding-top:0!important;padding-bottom:0!important}.py-sm-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-sm-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-sm-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-sm-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-sm-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-sm-0{padding-top:0!important}.pt-sm-1{padding-top:.25rem!important}.pt-sm-2{padding-top:.5rem!important}.pt-sm-3{padding-top:1rem!important}.pt-sm-4{padding-top:1.5rem!important}.pt-sm-5{padding-top:3rem!important}.pe-sm-0{padding-right:0!important}.pe-sm-1{padding-right:.25rem!important}.pe-sm-2{padding-right:.5rem!important}.pe-sm-3{padding-right:1rem!important}.pe-sm-4{padding-right:1.5rem!important}.pe-sm-5{padding-right:3rem!important}.pb-sm-0{padding-bottom:0!important}.pb-sm-1{padding-bottom:.25rem!important}.pb-sm-2{padding-bottom:.5rem!important}.pb-sm-3{padding-bottom:1rem!important}.pb-sm-4{padding-bottom:1.5rem!important}.pb-sm-5{padding-bottom:3rem!important}.ps-sm-0{padding-left:0!important}.ps-sm-1{padding-left:.25rem!important}.ps-sm-2{padding-left:.5rem!important}.ps-sm-3{padding-left:1rem!important}.ps-sm-4{padding-left:1.5rem!important}.ps-sm-5{padding-left:3rem!important}.text-sm-start{text-align:left!important}.text-sm-end{text-align:right!important}.text-sm-center{text-align:center!important}}@media (min-width:768px){.float-md-start{float:left!important}.float-md-end{float:right!important}.float-md-none{float:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-grid{display:grid!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:flex!important}.d-md-inline-flex{display:inline-flex!important}.d-md-none{display:none!important}.flex-md-fill{flex:1 1 auto!important}.flex-md-row{flex-direction:row!important}.flex-md-column{flex-direction:column!important}.flex-md-row-reverse{flex-direction:row-reverse!important}.flex-md-column-reverse{flex-direction:column-reverse!important}.flex-md-grow-0{flex-grow:0!important}.flex-md-grow-1{flex-grow:1!important}.flex-md-shrink-0{flex-shrink:0!important}.flex-md-shrink-1{flex-shrink:1!important}.flex-md-wrap{flex-wrap:wrap!important}.flex-md-nowrap{flex-wrap:nowrap!important}.flex-md-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-md-0{gap:0!important}.gap-md-1{gap:.25rem!important}.gap-md-2{gap:.5rem!important}.gap-md-3{gap:1rem!important}.gap-md-4{gap:1.5rem!important}.gap-md-5{gap:3rem!important}.justify-content-md-start{justify-content:flex-start!important}.justify-content-md-end{justify-content:flex-end!important}.justify-content-md-center{justify-content:center!important}.justify-content-md-between{justify-content:space-between!important}.justify-content-md-around{justify-content:space-around!important}.justify-content-md-evenly{justify-content:space-evenly!important}.align-items-md-start{align-items:flex-start!important}.align-items-md-end{align-items:flex-end!important}.align-items-md-center{align-items:center!important}.align-items-md-baseline{align-items:baseline!important}.align-items-md-stretch{align-items:stretch!important}.align-content-md-start{align-content:flex-start!important}.align-content-md-end{align-content:flex-end!important}.align-content-md-center{align-content:center!important}.align-content-md-between{align-content:space-between!important}.align-content-md-around{align-content:space-around!important}.align-content-md-stretch{align-content:stretch!important}.align-self-md-auto{align-self:auto!important}.align-self-md-start{align-self:flex-start!important}.align-self-md-end{align-self:flex-end!important}.align-self-md-center{align-self:center!important}.align-self-md-baseline{align-self:baseline!important}.align-self-md-stretch{align-self:stretch!important}.order-md-first{order:-1!important}.order-md-0{order:0!important}.order-md-1{order:1!important}.order-md-2{order:2!important}.order-md-3{order:3!important}.order-md-4{order:4!important}.order-md-5{order:5!important}.order-md-last{order:6!important}.m-md-0{margin:0!important}.m-md-1{margin:.25rem!important}.m-md-2{margin:.5rem!important}.m-md-3{margin:1rem!important}.m-md-4{margin:1.5rem!important}.m-md-5{margin:3rem!important}.m-md-auto{margin:auto!important}.mx-md-0{margin-right:0!important;margin-left:0!important}.mx-md-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-md-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-md-3{margin-right:1rem!important;margin-left:1rem!important}.mx-md-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-md-5{margin-right:3rem!important;margin-left:3rem!important}.mx-md-auto{margin-right:auto!important;margin-left:auto!important}.my-md-0{margin-top:0!important;margin-bottom:0!important}.my-md-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-md-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-md-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-md-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-md-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-md-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-md-0{margin-top:0!important}.mt-md-1{margin-top:.25rem!important}.mt-md-2{margin-top:.5rem!important}.mt-md-3{margin-top:1rem!important}.mt-md-4{margin-top:1.5rem!important}.mt-md-5{margin-top:3rem!important}.mt-md-auto{margin-top:auto!important}.me-md-0{margin-right:0!important}.me-md-1{margin-right:.25rem!important}.me-md-2{margin-right:.5rem!important}.me-md-3{margin-right:1rem!important}.me-md-4{margin-right:1.5rem!important}.me-md-5{margin-right:3rem!important}.me-md-auto{margin-right:auto!important}.mb-md-0{margin-bottom:0!important}.mb-md-1{margin-bottom:.25rem!important}.mb-md-2{margin-bottom:.5rem!important}.mb-md-3{margin-bottom:1rem!important}.mb-md-4{margin-bottom:1.5rem!important}.mb-md-5{margin-bottom:3rem!important}.mb-md-auto{margin-bottom:auto!important}.ms-md-0{margin-left:0!important}.ms-md-1{margin-left:.25rem!important}.ms-md-2{margin-left:.5rem!important}.ms-md-3{margin-left:1rem!important}.ms-md-4{margin-left:1.5rem!important}.ms-md-5{margin-left:3rem!important}.ms-md-auto{margin-left:auto!important}.p-md-0{padding:0!important}.p-md-1{padding:.25rem!important}.p-md-2{padding:.5rem!important}.p-md-3{padding:1rem!important}.p-md-4{padding:1.5rem!important}.p-md-5{padding:3rem!important}.px-md-0{padding-right:0!important;padding-left:0!important}.px-md-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-md-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-md-3{padding-right:1rem!important;padding-left:1rem!important}.px-md-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-md-5{padding-right:3rem!important;padding-left:3rem!important}.py-md-0{padding-top:0!important;padding-bottom:0!important}.py-md-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-md-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-md-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-md-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-md-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-md-0{padding-top:0!important}.pt-md-1{padding-top:.25rem!important}.pt-md-2{padding-top:.5rem!important}.pt-md-3{padding-top:1rem!important}.pt-md-4{padding-top:1.5rem!important}.pt-md-5{padding-top:3rem!important}.pe-md-0{padding-right:0!important}.pe-md-1{padding-right:.25rem!important}.pe-md-2{padding-right:.5rem!important}.pe-md-3{padding-right:1rem!important}.pe-md-4{padding-right:1.5rem!important}.pe-md-5{padding-right:3rem!important}.pb-md-0{padding-bottom:0!important}.pb-md-1{padding-bottom:.25rem!important}.pb-md-2{padding-bottom:.5rem!important}.pb-md-3{padding-bottom:1rem!important}.pb-md-4{padding-bottom:1.5rem!important}.pb-md-5{padding-bottom:3rem!important}.ps-md-0{padding-left:0!important}.ps-md-1{padding-left:.25rem!important}.ps-md-2{padding-left:.5rem!important}.ps-md-3{padding-left:1rem!important}.ps-md-4{padding-left:1.5rem!important}.ps-md-5{padding-left:3rem!important}.text-md-start{text-align:left!important}.text-md-end{text-align:right!important}.text-md-center{text-align:center!important}}@media (min-width:992px){.float-lg-start{float:left!important}.float-lg-end{float:right!important}.float-lg-none{float:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-grid{display:grid!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:flex!important}.d-lg-inline-flex{display:inline-flex!important}.d-lg-none{display:none!important}.flex-lg-fill{flex:1 1 auto!important}.flex-lg-row{flex-direction:row!important}.flex-lg-column{flex-direction:column!important}.flex-lg-row-reverse{flex-direction:row-reverse!important}.flex-lg-column-reverse{flex-direction:column-reverse!important}.flex-lg-grow-0{flex-grow:0!important}.flex-lg-grow-1{flex-grow:1!important}.flex-lg-shrink-0{flex-shrink:0!important}.flex-lg-shrink-1{flex-shrink:1!important}.flex-lg-wrap{flex-wrap:wrap!important}.flex-lg-nowrap{flex-wrap:nowrap!important}.flex-lg-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-lg-0{gap:0!important}.gap-lg-1{gap:.25rem!important}.gap-lg-2{gap:.5rem!important}.gap-lg-3{gap:1rem!important}.gap-lg-4{gap:1.5rem!important}.gap-lg-5{gap:3rem!important}.justify-content-lg-start{justify-content:flex-start!important}.justify-content-lg-end{justify-content:flex-end!important}.justify-content-lg-center{justify-content:center!important}.justify-content-lg-between{justify-content:space-between!important}.justify-content-lg-around{justify-content:space-around!important}.justify-content-lg-evenly{justify-content:space-evenly!important}.align-items-lg-start{align-items:flex-start!important}.align-items-lg-end{align-items:flex-end!important}.align-items-lg-center{align-items:center!important}.align-items-lg-baseline{align-items:baseline!important}.align-items-lg-stretch{align-items:stretch!important}.align-content-lg-start{align-content:flex-start!important}.align-content-lg-end{align-content:flex-end!important}.align-content-lg-center{align-content:center!important}.align-content-lg-between{align-content:space-between!important}.align-content-lg-around{align-content:space-around!important}.align-content-lg-stretch{align-content:stretch!important}.align-self-lg-auto{align-self:auto!important}.align-self-lg-start{align-self:flex-start!important}.align-self-lg-end{align-self:flex-end!important}.align-self-lg-center{align-self:center!important}.align-self-lg-baseline{align-self:baseline!important}.align-self-lg-stretch{align-self:stretch!important}.order-lg-first{order:-1!important}.order-lg-0{order:0!important}.order-lg-1{order:1!important}.order-lg-2{order:2!important}.order-lg-3{order:3!important}.order-lg-4{order:4!important}.order-lg-5{order:5!important}.order-lg-last{order:6!important}.m-lg-0{margin:0!important}.m-lg-1{margin:.25rem!important}.m-lg-2{margin:.5rem!important}.m-lg-3{margin:1rem!important}.m-lg-4{margin:1.5rem!important}.m-lg-5{margin:3rem!important}.m-lg-auto{margin:auto!important}.mx-lg-0{margin-right:0!important;margin-left:0!important}.mx-lg-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-lg-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-lg-3{margin-right:1rem!important;margin-left:1rem!important}.mx-lg-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-lg-5{margin-right:3rem!important;margin-left:3rem!important}.mx-lg-auto{margin-right:auto!important;margin-left:auto!important}.my-lg-0{margin-top:0!important;margin-bottom:0!important}.my-lg-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-lg-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-lg-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-lg-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-lg-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-lg-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-lg-0{margin-top:0!important}.mt-lg-1{margin-top:.25rem!important}.mt-lg-2{margin-top:.5rem!important}.mt-lg-3{margin-top:1rem!important}.mt-lg-4{margin-top:1.5rem!important}.mt-lg-5{margin-top:3rem!important}.mt-lg-auto{margin-top:auto!important}.me-lg-0{margin-right:0!important}.me-lg-1{margin-right:.25rem!important}.me-lg-2{margin-right:.5rem!important}.me-lg-3{margin-right:1rem!important}.me-lg-4{margin-right:1.5rem!important}.me-lg-5{margin-right:3rem!important}.me-lg-auto{margin-right:auto!important}.mb-lg-0{margin-bottom:0!important}.mb-lg-1{margin-bottom:.25rem!important}.mb-lg-2{margin-bottom:.5rem!important}.mb-lg-3{margin-bottom:1rem!important}.mb-lg-4{margin-bottom:1.5rem!important}.mb-lg-5{margin-bottom:3rem!important}.mb-lg-auto{margin-bottom:auto!important}.ms-lg-0{margin-left:0!important}.ms-lg-1{margin-left:.25rem!important}.ms-lg-2{margin-left:.5rem!important}.ms-lg-3{margin-left:1rem!important}.ms-lg-4{margin-left:1.5rem!important}.ms-lg-5{margin-left:3rem!important}.ms-lg-auto{margin-left:auto!important}.p-lg-0{padding:0!important}.p-lg-1{padding:.25rem!important}.p-lg-2{padding:.5rem!important}.p-lg-3{padding:1rem!important}.p-lg-4{padding:1.5rem!important}.p-lg-5{padding:3rem!important}.px-lg-0{padding-right:0!important;padding-left:0!important}.px-lg-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-lg-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-lg-3{padding-right:1rem!important;padding-left:1rem!important}.px-lg-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-lg-5{padding-right:3rem!important;padding-left:3rem!important}.py-lg-0{padding-top:0!important;padding-bottom:0!important}.py-lg-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-lg-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-lg-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-lg-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-lg-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-lg-0{padding-top:0!important}.pt-lg-1{padding-top:.25rem!important}.pt-lg-2{padding-top:.5rem!important}.pt-lg-3{padding-top:1rem!important}.pt-lg-4{padding-top:1.5rem!important}.pt-lg-5{padding-top:3rem!important}.pe-lg-0{padding-right:0!important}.pe-lg-1{padding-right:.25rem!important}.pe-lg-2{padding-right:.5rem!important}.pe-lg-3{padding-right:1rem!important}.pe-lg-4{padding-right:1.5rem!important}.pe-lg-5{padding-right:3rem!important}.pb-lg-0{padding-bottom:0!important}.pb-lg-1{padding-bottom:.25rem!important}.pb-lg-2{padding-bottom:.5rem!important}.pb-lg-3{padding-bottom:1rem!important}.pb-lg-4{padding-bottom:1.5rem!important}.pb-lg-5{padding-bottom:3rem!important}.ps-lg-0{padding-left:0!important}.ps-lg-1{padding-left:.25rem!important}.ps-lg-2{padding-left:.5rem!important}.ps-lg-3{padding-left:1rem!important}.ps-lg-4{padding-left:1.5rem!important}.ps-lg-5{padding-left:3rem!important}.text-lg-start{text-align:left!important}.text-lg-end{text-align:right!important}.text-lg-center{text-align:center!important}}@media (min-width:1200px){.float-xl-start{float:left!important}.float-xl-end{float:right!important}.float-xl-none{float:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-grid{display:grid!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:flex!important}.d-xl-inline-flex{display:inline-flex!important}.d-xl-none{display:none!important}.flex-xl-fill{flex:1 1 auto!important}.flex-xl-row{flex-direction:row!important}.flex-xl-column{flex-direction:column!important}.flex-xl-row-reverse{flex-direction:row-reverse!important}.flex-xl-column-reverse{flex-direction:column-reverse!important}.flex-xl-grow-0{flex-grow:0!important}.flex-xl-grow-1{flex-grow:1!important}.flex-xl-shrink-0{flex-shrink:0!important}.flex-xl-shrink-1{flex-shrink:1!important}.flex-xl-wrap{flex-wrap:wrap!important}.flex-xl-nowrap{flex-wrap:nowrap!important}.flex-xl-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-xl-0{gap:0!important}.gap-xl-1{gap:.25rem!important}.gap-xl-2{gap:.5rem!important}.gap-xl-3{gap:1rem!important}.gap-xl-4{gap:1.5rem!important}.gap-xl-5{gap:3rem!important}.justify-content-xl-start{justify-content:flex-start!important}.justify-content-xl-end{justify-content:flex-end!important}.justify-content-xl-center{justify-content:center!important}.justify-content-xl-between{justify-content:space-between!important}.justify-content-xl-around{justify-content:space-around!important}.justify-content-xl-evenly{justify-content:space-evenly!important}.align-items-xl-start{align-items:flex-start!important}.align-items-xl-end{align-items:flex-end!important}.align-items-xl-center{align-items:center!important}.align-items-xl-baseline{align-items:baseline!important}.align-items-xl-stretch{align-items:stretch!important}.align-content-xl-start{align-content:flex-start!important}.align-content-xl-end{align-content:flex-end!important}.align-content-xl-center{align-content:center!important}.align-content-xl-between{align-content:space-between!important}.align-content-xl-around{align-content:space-around!important}.align-content-xl-stretch{align-content:stretch!important}.align-self-xl-auto{align-self:auto!important}.align-self-xl-start{align-self:flex-start!important}.align-self-xl-end{align-self:flex-end!important}.align-self-xl-center{align-self:center!important}.align-self-xl-baseline{align-self:baseline!important}.align-self-xl-stretch{align-self:stretch!important}.order-xl-first{order:-1!important}.order-xl-0{order:0!important}.order-xl-1{order:1!important}.order-xl-2{order:2!important}.order-xl-3{order:3!important}.order-xl-4{order:4!important}.order-xl-5{order:5!important}.order-xl-last{order:6!important}.m-xl-0{margin:0!important}.m-xl-1{margin:.25rem!important}.m-xl-2{margin:.5rem!important}.m-xl-3{margin:1rem!important}.m-xl-4{margin:1.5rem!important}.m-xl-5{margin:3rem!important}.m-xl-auto{margin:auto!important}.mx-xl-0{margin-right:0!important;margin-left:0!important}.mx-xl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xl-auto{margin-right:auto!important;margin-left:auto!important}.my-xl-0{margin-top:0!important;margin-bottom:0!important}.my-xl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xl-0{margin-top:0!important}.mt-xl-1{margin-top:.25rem!important}.mt-xl-2{margin-top:.5rem!important}.mt-xl-3{margin-top:1rem!important}.mt-xl-4{margin-top:1.5rem!important}.mt-xl-5{margin-top:3rem!important}.mt-xl-auto{margin-top:auto!important}.me-xl-0{margin-right:0!important}.me-xl-1{margin-right:.25rem!important}.me-xl-2{margin-right:.5rem!important}.me-xl-3{margin-right:1rem!important}.me-xl-4{margin-right:1.5rem!important}.me-xl-5{margin-right:3rem!important}.me-xl-auto{margin-right:auto!important}.mb-xl-0{margin-bottom:0!important}.mb-xl-1{margin-bottom:.25rem!important}.mb-xl-2{margin-bottom:.5rem!important}.mb-xl-3{margin-bottom:1rem!important}.mb-xl-4{margin-bottom:1.5rem!important}.mb-xl-5{margin-bottom:3rem!important}.mb-xl-auto{margin-bottom:auto!important}.ms-xl-0{margin-left:0!important}.ms-xl-1{margin-left:.25rem!important}.ms-xl-2{margin-left:.5rem!important}.ms-xl-3{margin-left:1rem!important}.ms-xl-4{margin-left:1.5rem!important}.ms-xl-5{margin-left:3rem!important}.ms-xl-auto{margin-left:auto!important}.p-xl-0{padding:0!important}.p-xl-1{padding:.25rem!important}.p-xl-2{padding:.5rem!important}.p-xl-3{padding:1rem!important}.p-xl-4{padding:1.5rem!important}.p-xl-5{padding:3rem!important}.px-xl-0{padding-right:0!important;padding-left:0!important}.px-xl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xl-0{padding-top:0!important;padding-bottom:0!important}.py-xl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xl-0{padding-top:0!important}.pt-xl-1{padding-top:.25rem!important}.pt-xl-2{padding-top:.5rem!important}.pt-xl-3{padding-top:1rem!important}.pt-xl-4{padding-top:1.5rem!important}.pt-xl-5{padding-top:3rem!important}.pe-xl-0{padding-right:0!important}.pe-xl-1{padding-right:.25rem!important}.pe-xl-2{padding-right:.5rem!important}.pe-xl-3{padding-right:1rem!important}.pe-xl-4{padding-right:1.5rem!important}.pe-xl-5{padding-right:3rem!important}.pb-xl-0{padding-bottom:0!important}.pb-xl-1{padding-bottom:.25rem!important}.pb-xl-2{padding-bottom:.5rem!important}.pb-xl-3{padding-bottom:1rem!important}.pb-xl-4{padding-bottom:1.5rem!important}.pb-xl-5{padding-bottom:3rem!important}.ps-xl-0{padding-left:0!important}.ps-xl-1{padding-left:.25rem!important}.ps-xl-2{padding-left:.5rem!important}.ps-xl-3{padding-left:1rem!important}.ps-xl-4{padding-left:1.5rem!important}.ps-xl-5{padding-left:3rem!important}.text-xl-start{text-align:left!important}.text-xl-end{text-align:right!important}.text-xl-center{text-align:center!important}}@media (min-width:1400px){.float-xxl-start{float:left!important}.float-xxl-end{float:right!important}.float-xxl-none{float:none!important}.d-xxl-inline{display:inline!important}.d-xxl-inline-block{display:inline-block!important}.d-xxl-block{display:block!important}.d-xxl-grid{display:grid!important}.d-xxl-table{display:table!important}.d-xxl-table-row{display:table-row!important}.d-xxl-table-cell{display:table-cell!important}.d-xxl-flex{display:flex!important}.d-xxl-inline-flex{display:inline-flex!important}.d-xxl-none{display:none!important}.flex-xxl-fill{flex:1 1 auto!important}.flex-xxl-row{flex-direction:row!important}.flex-xxl-column{flex-direction:column!important}.flex-xxl-row-reverse{flex-direction:row-reverse!important}.flex-xxl-column-reverse{flex-direction:column-reverse!important}.flex-xxl-grow-0{flex-grow:0!important}.flex-xxl-grow-1{flex-grow:1!important}.flex-xxl-shrink-0{flex-shrink:0!important}.flex-xxl-shrink-1{flex-shrink:1!important}.flex-xxl-wrap{flex-wrap:wrap!important}.flex-xxl-nowrap{flex-wrap:nowrap!important}.flex-xxl-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-xxl-0{gap:0!important}.gap-xxl-1{gap:.25rem!important}.gap-xxl-2{gap:.5rem!important}.gap-xxl-3{gap:1rem!important}.gap-xxl-4{gap:1.5rem!important}.gap-xxl-5{gap:3rem!important}.justify-content-xxl-start{justify-content:flex-start!important}.justify-content-xxl-end{justify-content:flex-end!important}.justify-content-xxl-center{justify-content:center!important}.justify-content-xxl-between{justify-content:space-between!important}.justify-content-xxl-around{justify-content:space-around!important}.justify-content-xxl-evenly{justify-content:space-evenly!important}.align-items-xxl-start{align-items:flex-start!important}.align-items-xxl-end{align-items:flex-end!important}.align-items-xxl-center{align-items:center!important}.align-items-xxl-baseline{align-items:baseline!important}.align-items-xxl-stretch{align-items:stretch!important}.align-content-xxl-start{align-content:flex-start!important}.align-content-xxl-end{align-content:flex-end!important}.align-content-xxl-center{align-content:center!important}.align-content-xxl-between{align-content:space-between!important}.align-content-xxl-around{align-content:space-around!important}.align-content-xxl-stretch{align-content:stretch!important}.align-self-xxl-auto{align-self:auto!important}.align-self-xxl-start{align-self:flex-start!important}.align-self-xxl-end{align-self:flex-end!important}.align-self-xxl-center{align-self:center!important}.align-self-xxl-baseline{align-self:baseline!important}.align-self-xxl-stretch{align-self:stretch!important}.order-xxl-first{order:-1!important}.order-xxl-0{order:0!important}.order-xxl-1{order:1!important}.order-xxl-2{order:2!important}.order-xxl-3{order:3!important}.order-xxl-4{order:4!important}.order-xxl-5{order:5!important}.order-xxl-last{order:6!important}.m-xxl-0{margin:0!important}.m-xxl-1{margin:.25rem!important}.m-xxl-2{margin:.5rem!important}.m-xxl-3{margin:1rem!important}.m-xxl-4{margin:1.5rem!important}.m-xxl-5{margin:3rem!important}.m-xxl-auto{margin:auto!important}.mx-xxl-0{margin-right:0!important;margin-left:0!important}.mx-xxl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xxl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xxl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xxl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xxl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xxl-auto{margin-right:auto!important;margin-left:auto!important}.my-xxl-0{margin-top:0!important;margin-bottom:0!important}.my-xxl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xxl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xxl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xxl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xxl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xxl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xxl-0{margin-top:0!important}.mt-xxl-1{margin-top:.25rem!important}.mt-xxl-2{margin-top:.5rem!important}.mt-xxl-3{margin-top:1rem!important}.mt-xxl-4{margin-top:1.5rem!important}.mt-xxl-5{margin-top:3rem!important}.mt-xxl-auto{margin-top:auto!important}.me-xxl-0{margin-right:0!important}.me-xxl-1{margin-right:.25rem!important}.me-xxl-2{margin-right:.5rem!important}.me-xxl-3{margin-right:1rem!important}.me-xxl-4{margin-right:1.5rem!important}.me-xxl-5{margin-right:3rem!important}.me-xxl-auto{margin-right:auto!important}.mb-xxl-0{margin-bottom:0!important}.mb-xxl-1{margin-bottom:.25rem!important}.mb-xxl-2{margin-bottom:.5rem!important}.mb-xxl-3{margin-bottom:1rem!important}.mb-xxl-4{margin-bottom:1.5rem!important}.mb-xxl-5{margin-bottom:3rem!important}.mb-xxl-auto{margin-bottom:auto!important}.ms-xxl-0{margin-left:0!important}.ms-xxl-1{margin-left:.25rem!important}.ms-xxl-2{margin-left:.5rem!important}.ms-xxl-3{margin-left:1rem!important}.ms-xxl-4{margin-left:1.5rem!important}.ms-xxl-5{margin-left:3rem!important}.ms-xxl-auto{margin-left:auto!important}.p-xxl-0{padding:0!important}.p-xxl-1{padding:.25rem!important}.p-xxl-2{padding:.5rem!important}.p-xxl-3{padding:1rem!important}.p-xxl-4{padding:1.5rem!important}.p-xxl-5{padding:3rem!important}.px-xxl-0{padding-right:0!important;padding-left:0!important}.px-xxl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xxl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xxl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xxl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xxl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xxl-0{padding-top:0!important;padding-bottom:0!important}.py-xxl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xxl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xxl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xxl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xxl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xxl-0{padding-top:0!important}.pt-xxl-1{padding-top:.25rem!important}.pt-xxl-2{padding-top:.5rem!important}.pt-xxl-3{padding-top:1rem!important}.pt-xxl-4{padding-top:1.5rem!important}.pt-xxl-5{padding-top:3rem!important}.pe-xxl-0{padding-right:0!important}.pe-xxl-1{padding-right:.25rem!important}.pe-xxl-2{padding-right:.5rem!important}.pe-xxl-3{padding-right:1rem!important}.pe-xxl-4{padding-right:1.5rem!important}.pe-xxl-5{padding-right:3rem!important}.pb-xxl-0{padding-bottom:0!important}.pb-xxl-1{padding-bottom:.25rem!important}.pb-xxl-2{padding-bottom:.5rem!important}.pb-xxl-3{padding-bottom:1rem!important}.pb-xxl-4{padding-bottom:1.5rem!important}.pb-xxl-5{padding-bottom:3rem!important}.ps-xxl-0{padding-left:0!important}.ps-xxl-1{padding-left:.25rem!important}.ps-xxl-2{padding-left:.5rem!important}.ps-xxl-3{padding-left:1rem!important}.ps-xxl-4{padding-left:1.5rem!important}.ps-xxl-5{padding-left:3rem!important}.text-xxl-start{text-align:left!important}.text-xxl-end{text-align:right!important}.text-xxl-center{text-align:center!important}}@media (min-width:1200px){.fs-1{font-size:2.5rem!important}.fs-2{font-size:2rem!important}.fs-3{font-size:1.75rem!important}.fs-4{font-size:1.5rem!important}}@media print{.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-grid{display:grid!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:flex!important}.d-print-inline-flex{display:inline-flex!important}.d-print-none{display:none!important}} +/*# sourceMappingURL=bootstrap.min.css.map */ \ No newline at end of file diff --git a/src/mono/sample/wasm/blazor-frame/wwwroot/css/bootstrap/bootstrap.min.css.map b/src/mono/sample/wasm/blazor-frame/wwwroot/css/bootstrap/bootstrap.min.css.map new file mode 100644 index 00000000000000..afcd9e33e9eae3 --- /dev/null +++ b/src/mono/sample/wasm/blazor-frame/wwwroot/css/bootstrap/bootstrap.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../scss/bootstrap.scss","../../scss/_root.scss","../../scss/_reboot.scss","dist/css/bootstrap.css","../../scss/vendor/_rfs.scss","../../scss/mixins/_border-radius.scss","../../scss/_type.scss","../../scss/mixins/_lists.scss","../../scss/_images.scss","../../scss/mixins/_image.scss","../../scss/_containers.scss","../../scss/mixins/_container.scss","../../scss/mixins/_breakpoints.scss","../../scss/_grid.scss","../../scss/mixins/_grid.scss","../../scss/_tables.scss","../../scss/mixins/_table-variants.scss","../../scss/forms/_labels.scss","../../scss/forms/_form-text.scss","../../scss/forms/_form-control.scss","../../scss/mixins/_transition.scss","../../scss/mixins/_gradients.scss","../../scss/forms/_form-select.scss","../../scss/forms/_form-check.scss","../../scss/forms/_form-range.scss","../../scss/forms/_floating-labels.scss","../../scss/forms/_input-group.scss","../../scss/mixins/_forms.scss","../../scss/_buttons.scss","../../scss/mixins/_buttons.scss","../../scss/_transitions.scss","../../scss/_dropdown.scss","../../scss/mixins/_caret.scss","../../scss/_button-group.scss","../../scss/_nav.scss","../../scss/_navbar.scss","../../scss/_card.scss","../../scss/_accordion.scss","../../scss/_breadcrumb.scss","../../scss/_pagination.scss","../../scss/mixins/_pagination.scss","../../scss/_badge.scss","../../scss/_alert.scss","../../scss/mixins/_alert.scss","../../scss/_progress.scss","../../scss/_list-group.scss","../../scss/mixins/_list-group.scss","../../scss/_close.scss","../../scss/_toasts.scss","../../scss/_modal.scss","../../scss/mixins/_backdrop.scss","../../scss/_tooltip.scss","../../scss/mixins/_reset-text.scss","../../scss/_popover.scss","../../scss/_carousel.scss","../../scss/mixins/_clearfix.scss","../../scss/_spinners.scss","../../scss/_offcanvas.scss","../../scss/_placeholders.scss","../../scss/helpers/_colored-links.scss","../../scss/helpers/_ratio.scss","../../scss/helpers/_position.scss","../../scss/helpers/_stacks.scss","../../scss/helpers/_visually-hidden.scss","../../scss/mixins/_visually-hidden.scss","../../scss/helpers/_stretched-link.scss","../../scss/helpers/_text-truncation.scss","../../scss/mixins/_text-truncate.scss","../../scss/helpers/_vr.scss","../../scss/mixins/_utilities.scss","../../scss/utilities/_api.scss"],"names":[],"mappings":"iBAAA;;;;;ACAA,MAQI,UAAA,QAAA,YAAA,QAAA,YAAA,QAAA,UAAA,QAAA,SAAA,QAAA,YAAA,QAAA,YAAA,QAAA,WAAA,QAAA,UAAA,QAAA,UAAA,QAAA,WAAA,KAAA,UAAA,QAAA,eAAA,QAIA,cAAA,QAAA,cAAA,QAAA,cAAA,QAAA,cAAA,QAAA,cAAA,QAAA,cAAA,QAAA,cAAA,QAAA,cAAA,QAAA,cAAA,QAIA,aAAA,QAAA,eAAA,QAAA,aAAA,QAAA,UAAA,QAAA,aAAA,QAAA,YAAA,QAAA,WAAA,QAAA,UAAA,QAIA,iBAAA,EAAA,CAAA,GAAA,CAAA,IAAA,mBAAA,GAAA,CAAA,GAAA,CAAA,IAAA,iBAAA,EAAA,CAAA,GAAA,CAAA,GAAA,cAAA,EAAA,CAAA,GAAA,CAAA,IAAA,iBAAA,GAAA,CAAA,GAAA,CAAA,EAAA,gBAAA,GAAA,CAAA,EAAA,CAAA,GAAA,eAAA,GAAA,CAAA,GAAA,CAAA,IAAA,cAAA,EAAA,CAAA,EAAA,CAAA,GAGF,eAAA,GAAA,CAAA,GAAA,CAAA,IACA,eAAA,CAAA,CAAA,CAAA,CAAA,EACA,cAAA,EAAA,CAAA,EAAA,CAAA,GAMA,qBAAA,SAAA,CAAA,aAAA,CAAA,UAAA,CAAA,MAAA,CAAA,gBAAA,CAAA,KAAA,CAAA,WAAA,CAAA,iBAAA,CAAA,UAAA,CAAA,mBAAA,CAAA,gBAAA,CAAA,iBAAA,CAAA,mBACA,oBAAA,cAAA,CAAA,KAAA,CAAA,MAAA,CAAA,QAAA,CAAA,iBAAA,CAAA,aAAA,CAAA,UACA,cAAA,2EAQA,sBAAA,0BACA,oBAAA,KACA,sBAAA,IACA,sBAAA,IACA,gBAAA,QAIA,aAAA,KClCF,EC+CA,QADA,SD3CE,WAAA,WAeE,8CANJ,MAOM,gBAAA,QAcN,KACE,OAAA,EACA,YAAA,2BEmPI,UAAA,yBFjPJ,YAAA,2BACA,YAAA,2BACA,MAAA,qBACA,WAAA,0BACA,iBAAA,kBACA,yBAAA,KACA,4BAAA,YAUF,GACE,OAAA,KAAA,EACA,MAAA,QACA,iBAAA,aACA,OAAA,EACA,QAAA,IAGF,eACE,OAAA,IAUF,IAAA,IAAA,IAAA,IAAA,IAAA,IAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GACE,WAAA,EACA,cAAA,MAGA,YAAA,IACA,YAAA,IAIF,IAAA,GEwMQ,UAAA,uBAlKJ,0BFtCJ,IAAA,GE+MQ,UAAA,QF1MR,IAAA,GEmMQ,UAAA,sBAlKJ,0BFjCJ,IAAA,GE0MQ,UAAA,MFrMR,IAAA,GE8LQ,UAAA,oBAlKJ,0BF5BJ,IAAA,GEqMQ,UAAA,SFhMR,IAAA,GEyLQ,UAAA,sBAlKJ,0BFvBJ,IAAA,GEgMQ,UAAA,QF3LR,IAAA,GEgLM,UAAA,QF3KN,IAAA,GE2KM,UAAA,KFhKN,EACE,WAAA,EACA,cAAA,KCmBF,6BDRA,YAEE,wBAAA,UAAA,OAAA,gBAAA,UAAA,OACA,OAAA,KACA,iCAAA,KAAA,yBAAA,KAMF,QACE,cAAA,KACA,WAAA,OACA,YAAA,QAMF,GCIA,GDFE,aAAA,KCQF,GDLA,GCIA,GDDE,WAAA,EACA,cAAA,KAGF,MCKA,MACA,MAFA,MDAE,cAAA,EAGF,GACE,YAAA,IAKF,GACE,cAAA,MACA,YAAA,EAMF,WACE,OAAA,EAAA,EAAA,KAQF,ECNA,ODQE,YAAA,OAQF,OAAA,ME4EM,UAAA,OFrEN,MAAA,KACE,QAAA,KACA,iBAAA,QASF,ICpBA,IDsBE,SAAA,SEwDI,UAAA,MFtDJ,YAAA,EACA,eAAA,SAGF,IAAM,OAAA,OACN,IAAM,IAAA,MAKN,EACE,MAAA,QACA,gBAAA,UAEA,QACE,MAAA,QAWF,2BAAA,iCAEE,MAAA,QACA,gBAAA,KCxBJ,KACA,ID8BA,IC7BA,KDiCE,YAAA,yBEcI,UAAA,IFZJ,UAAA,IACA,aAAA,cAOF,IACE,QAAA,MACA,WAAA,EACA,cAAA,KACA,SAAA,KEAI,UAAA,OFKJ,SELI,UAAA,QFOF,MAAA,QACA,WAAA,OAIJ,KEZM,UAAA,OFcJ,MAAA,QACA,UAAA,WAGA,OACE,MAAA,QAIJ,IACE,QAAA,MAAA,MExBI,UAAA,OF0BJ,MAAA,KACA,iBAAA,QG7SE,cAAA,MHgTF,QACE,QAAA,EE/BE,UAAA,IFiCF,YAAA,IASJ,OACE,OAAA,EAAA,EAAA,KAMF,ICjDA,IDmDE,eAAA,OAQF,MACE,aAAA,OACA,gBAAA,SAGF,QACE,YAAA,MACA,eAAA,MACA,MAAA,QACA,WAAA,KAOF,GAEE,WAAA,QACA,WAAA,qBCxDF,MAGA,GAFA,MAGA,GDuDA,MCzDA,GD+DE,aAAA,QACA,aAAA,MACA,aAAA,EAQF,MACE,QAAA,aAMF,OAEE,cAAA,EAQF,iCACE,QAAA,ECtEF,OD2EA,MCzEA,SADA,OAEA,SD6EE,OAAA,EACA,YAAA,QE9HI,UAAA,QFgIJ,YAAA,QAIF,OC5EA,OD8EE,eAAA,KAKF,cACE,OAAA,QAGF,OAGE,UAAA,OAGA,gBACE,QAAA,EAOJ,0CACE,QAAA,KClFF,cACA,aACA,cDwFA,OAIE,mBAAA,OCxFF,6BACA,4BACA,6BDyFI,sBACE,OAAA,QAON,mBACE,QAAA,EACA,aAAA,KAKF,SACE,OAAA,SAUF,SACE,UAAA,EACA,QAAA,EACA,OAAA,EACA,OAAA,EAQF,OACE,MAAA,KACA,MAAA,KACA,QAAA,EACA,cAAA,MEnNM,UAAA,sBFsNN,YAAA,QExXE,0BFiXJ,OExMQ,UAAA,QFiNN,SACE,MAAA,KChGJ,kCDuGA,uCCxGA,mCADA,+BAGA,oCAJA,6BAKA,mCD4GE,QAAA,EAGF,4BACE,OAAA,KASF,cACE,eAAA,KACA,mBAAA,UAmBF,4BACE,mBAAA,KAKF,+BACE,QAAA,EAMF,uBACE,KAAA,QAMF,6BACE,KAAA,QACA,mBAAA,OAKF,OACE,QAAA,aAKF,OACE,OAAA,EAOF,QACE,QAAA,UACA,OAAA,QAQF,SACE,eAAA,SAQF,SACE,QAAA,eInlBF,MFyQM,UAAA,QEvQJ,YAAA,IAKA,WFsQM,UAAA,uBEpQJ,YAAA,IACA,YAAA,IFiGA,0BEpGF,WF6QM,UAAA,ME7QN,WFsQM,UAAA,uBEpQJ,YAAA,IACA,YAAA,IFiGA,0BEpGF,WF6QM,UAAA,QE7QN,WFsQM,UAAA,uBEpQJ,YAAA,IACA,YAAA,IFiGA,0BEpGF,WF6QM,UAAA,ME7QN,WFsQM,UAAA,uBEpQJ,YAAA,IACA,YAAA,IFiGA,0BEpGF,WF6QM,UAAA,QE7QN,WFsQM,UAAA,uBEpQJ,YAAA,IACA,YAAA,IFiGA,0BEpGF,WF6QM,UAAA,ME7QN,WFsQM,UAAA,uBEpQJ,YAAA,IACA,YAAA,IFiGA,0BEpGF,WF6QM,UAAA,QEvPR,eCrDE,aAAA,EACA,WAAA,KDyDF,aC1DE,aAAA,EACA,WAAA,KD4DF,kBACE,QAAA,aAEA,mCACE,aAAA,MAUJ,YFsNM,UAAA,OEpNJ,eAAA,UAIF,YACE,cAAA,KF+MI,UAAA,QE5MJ,wBACE,cAAA,EAIJ,mBACE,WAAA,MACA,cAAA,KFqMI,UAAA,OEnMJ,MAAA,QAEA,2BACE,QAAA,KE9FJ,WCIE,UAAA,KAGA,OAAA,KDDF,eACE,QAAA,OACA,iBAAA,KACA,OAAA,IAAA,MAAA,QHGE,cAAA,OIRF,UAAA,KAGA,OAAA,KDcF,QAEE,QAAA,aAGF,YACE,cAAA,MACA,YAAA,EAGF,gBJ+PM,UAAA,OI7PJ,MAAA,QElCA,WPqmBF,iBAGA,cACA,cACA,cAHA,cADA,eQzmBE,MAAA,KACA,cAAA,0BACA,aAAA,0BACA,aAAA,KACA,YAAA,KCwDE,yBF5CE,WAAA,cACE,UAAA,OE2CJ,yBF5CE,WAAA,cAAA,cACE,UAAA,OE2CJ,yBF5CE,WAAA,cAAA,cAAA,cACE,UAAA,OE2CJ,0BF5CE,WAAA,cAAA,cAAA,cAAA,cACE,UAAA,QE2CJ,0BF5CE,WAAA,cAAA,cAAA,cAAA,cAAA,eACE,UAAA,QGfN,KCAA,cAAA,OACA,cAAA,EACA,QAAA,KACA,UAAA,KACA,WAAA,8BACA,aAAA,+BACA,YAAA,+BDHE,OCYF,YAAA,EACA,MAAA,KACA,UAAA,KACA,cAAA,8BACA,aAAA,8BACA,WAAA,mBA+CI,KACE,KAAA,EAAA,EAAA,GAGF,iBApCJ,KAAA,EAAA,EAAA,KACA,MAAA,KAcA,cACE,KAAA,EAAA,EAAA,KACA,MAAA,KAFF,cACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,cACE,KAAA,EAAA,EAAA,KACA,MAAA,eAFF,cACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,cACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,cACE,KAAA,EAAA,EAAA,KACA,MAAA,eA+BE,UAhDJ,KAAA,EAAA,EAAA,KACA,MAAA,KAqDQ,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,YA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,QAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,QAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,QAhEN,KAAA,EAAA,EAAA,KACA,MAAA,KAuEQ,UAxDV,YAAA,YAwDU,UAxDV,YAAA,aAwDU,UAxDV,YAAA,IAwDU,UAxDV,YAAA,aAwDU,UAxDV,YAAA,aAwDU,UAxDV,YAAA,IAwDU,UAxDV,YAAA,aAwDU,UAxDV,YAAA,aAwDU,UAxDV,YAAA,IAwDU,WAxDV,YAAA,aAwDU,WAxDV,YAAA,aAmEM,KXusBR,MWrsBU,cAAA,EAGF,KXusBR,MWrsBU,cAAA,EAPF,KXitBR,MW/sBU,cAAA,QAGF,KXitBR,MW/sBU,cAAA,QAPF,KX2tBR,MWztBU,cAAA,OAGF,KX2tBR,MWztBU,cAAA,OAPF,KXquBR,MWnuBU,cAAA,KAGF,KXquBR,MWnuBU,cAAA,KAPF,KX+uBR,MW7uBU,cAAA,OAGF,KX+uBR,MW7uBU,cAAA,OAPF,KXyvBR,MWvvBU,cAAA,KAGF,KXyvBR,MWvvBU,cAAA,KFzDN,yBESE,QACE,KAAA,EAAA,EAAA,GAGF,oBApCJ,KAAA,EAAA,EAAA,KACA,MAAA,KAcA,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,KAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eA+BE,aAhDJ,KAAA,EAAA,EAAA,KACA,MAAA,KAqDQ,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,YA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,KAuEQ,aAxDV,YAAA,EAwDU,aAxDV,YAAA,YAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,cAxDV,YAAA,aAwDU,cAxDV,YAAA,aAmEM,QX45BR,SW15BU,cAAA,EAGF,QX45BR,SW15BU,cAAA,EAPF,QXs6BR,SWp6BU,cAAA,QAGF,QXs6BR,SWp6BU,cAAA,QAPF,QXg7BR,SW96BU,cAAA,OAGF,QXg7BR,SW96BU,cAAA,OAPF,QX07BR,SWx7BU,cAAA,KAGF,QX07BR,SWx7BU,cAAA,KAPF,QXo8BR,SWl8BU,cAAA,OAGF,QXo8BR,SWl8BU,cAAA,OAPF,QX88BR,SW58BU,cAAA,KAGF,QX88BR,SW58BU,cAAA,MFzDN,yBESE,QACE,KAAA,EAAA,EAAA,GAGF,oBApCJ,KAAA,EAAA,EAAA,KACA,MAAA,KAcA,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,KAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eA+BE,aAhDJ,KAAA,EAAA,EAAA,KACA,MAAA,KAqDQ,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,YA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,KAuEQ,aAxDV,YAAA,EAwDU,aAxDV,YAAA,YAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,cAxDV,YAAA,aAwDU,cAxDV,YAAA,aAmEM,QXinCR,SW/mCU,cAAA,EAGF,QXinCR,SW/mCU,cAAA,EAPF,QX2nCR,SWznCU,cAAA,QAGF,QX2nCR,SWznCU,cAAA,QAPF,QXqoCR,SWnoCU,cAAA,OAGF,QXqoCR,SWnoCU,cAAA,OAPF,QX+oCR,SW7oCU,cAAA,KAGF,QX+oCR,SW7oCU,cAAA,KAPF,QXypCR,SWvpCU,cAAA,OAGF,QXypCR,SWvpCU,cAAA,OAPF,QXmqCR,SWjqCU,cAAA,KAGF,QXmqCR,SWjqCU,cAAA,MFzDN,yBESE,QACE,KAAA,EAAA,EAAA,GAGF,oBApCJ,KAAA,EAAA,EAAA,KACA,MAAA,KAcA,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,KAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eA+BE,aAhDJ,KAAA,EAAA,EAAA,KACA,MAAA,KAqDQ,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,YA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,KAuEQ,aAxDV,YAAA,EAwDU,aAxDV,YAAA,YAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,cAxDV,YAAA,aAwDU,cAxDV,YAAA,aAmEM,QXs0CR,SWp0CU,cAAA,EAGF,QXs0CR,SWp0CU,cAAA,EAPF,QXg1CR,SW90CU,cAAA,QAGF,QXg1CR,SW90CU,cAAA,QAPF,QX01CR,SWx1CU,cAAA,OAGF,QX01CR,SWx1CU,cAAA,OAPF,QXo2CR,SWl2CU,cAAA,KAGF,QXo2CR,SWl2CU,cAAA,KAPF,QX82CR,SW52CU,cAAA,OAGF,QX82CR,SW52CU,cAAA,OAPF,QXw3CR,SWt3CU,cAAA,KAGF,QXw3CR,SWt3CU,cAAA,MFzDN,0BESE,QACE,KAAA,EAAA,EAAA,GAGF,oBApCJ,KAAA,EAAA,EAAA,KACA,MAAA,KAcA,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,KAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eA+BE,aAhDJ,KAAA,EAAA,EAAA,KACA,MAAA,KAqDQ,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,YA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,KAuEQ,aAxDV,YAAA,EAwDU,aAxDV,YAAA,YAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,cAxDV,YAAA,aAwDU,cAxDV,YAAA,aAmEM,QX2hDR,SWzhDU,cAAA,EAGF,QX2hDR,SWzhDU,cAAA,EAPF,QXqiDR,SWniDU,cAAA,QAGF,QXqiDR,SWniDU,cAAA,QAPF,QX+iDR,SW7iDU,cAAA,OAGF,QX+iDR,SW7iDU,cAAA,OAPF,QXyjDR,SWvjDU,cAAA,KAGF,QXyjDR,SWvjDU,cAAA,KAPF,QXmkDR,SWjkDU,cAAA,OAGF,QXmkDR,SWjkDU,cAAA,OAPF,QX6kDR,SW3kDU,cAAA,KAGF,QX6kDR,SW3kDU,cAAA,MFzDN,0BESE,SACE,KAAA,EAAA,EAAA,GAGF,qBApCJ,KAAA,EAAA,EAAA,KACA,MAAA,KAcA,kBACE,KAAA,EAAA,EAAA,KACA,MAAA,KAFF,kBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,kBACE,KAAA,EAAA,EAAA,KACA,MAAA,eAFF,kBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,kBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,kBACE,KAAA,EAAA,EAAA,KACA,MAAA,eA+BE,cAhDJ,KAAA,EAAA,EAAA,KACA,MAAA,KAqDQ,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,YA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,YAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,YAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,YAhEN,KAAA,EAAA,EAAA,KACA,MAAA,KAuEQ,cAxDV,YAAA,EAwDU,cAxDV,YAAA,YAwDU,cAxDV,YAAA,aAwDU,cAxDV,YAAA,IAwDU,cAxDV,YAAA,aAwDU,cAxDV,YAAA,aAwDU,cAxDV,YAAA,IAwDU,cAxDV,YAAA,aAwDU,cAxDV,YAAA,aAwDU,cAxDV,YAAA,IAwDU,eAxDV,YAAA,aAwDU,eAxDV,YAAA,aAmEM,SXgvDR,UW9uDU,cAAA,EAGF,SXgvDR,UW9uDU,cAAA,EAPF,SX0vDR,UWxvDU,cAAA,QAGF,SX0vDR,UWxvDU,cAAA,QAPF,SXowDR,UWlwDU,cAAA,OAGF,SXowDR,UWlwDU,cAAA,OAPF,SX8wDR,UW5wDU,cAAA,KAGF,SX8wDR,UW5wDU,cAAA,KAPF,SXwxDR,UWtxDU,cAAA,OAGF,SXwxDR,UWtxDU,cAAA,OAPF,SXkyDR,UWhyDU,cAAA,KAGF,SXkyDR,UWhyDU,cAAA,MCpHV,OACE,cAAA,YACA,qBAAA,YACA,yBAAA,QACA,sBAAA,oBACA,wBAAA,QACA,qBAAA,mBACA,uBAAA,QACA,oBAAA,qBAEA,MAAA,KACA,cAAA,KACA,MAAA,QACA,eAAA,IACA,aAAA,QAOA,yBACE,QAAA,MAAA,MACA,iBAAA,mBACA,oBAAA,IACA,WAAA,MAAA,EAAA,EAAA,EAAA,OAAA,0BAGF,aACE,eAAA,QAGF,aACE,eAAA,OAIF,uCACE,oBAAA,aASJ,aACE,aAAA,IAUA,4BACE,QAAA,OAAA,OAeF,gCACE,aAAA,IAAA,EAGA,kCACE,aAAA,EAAA,IAOJ,oCACE,oBAAA,EASF,yCACE,qBAAA,2BACA,MAAA,8BAQJ,cACE,qBAAA,0BACA,MAAA,6BAQA,4BACE,qBAAA,yBACA,MAAA,4BCxHF,eAME,cAAA,QACA,sBAAA,QACA,yBAAA,KACA,qBAAA,QACA,wBAAA,KACA,oBAAA,QACA,uBAAA,KAEA,MAAA,KACA,aAAA,QAfF,iBAME,cAAA,QACA,sBAAA,QACA,yBAAA,KACA,qBAAA,QACA,wBAAA,KACA,oBAAA,QACA,uBAAA,KAEA,MAAA,KACA,aAAA,QAfF,eAME,cAAA,QACA,sBAAA,QACA,yBAAA,KACA,qBAAA,QACA,wBAAA,KACA,oBAAA,QACA,uBAAA,KAEA,MAAA,KACA,aAAA,QAfF,YAME,cAAA,QACA,sBAAA,QACA,yBAAA,KACA,qBAAA,QACA,wBAAA,KACA,oBAAA,QACA,uBAAA,KAEA,MAAA,KACA,aAAA,QAfF,eAME,cAAA,QACA,sBAAA,QACA,yBAAA,KACA,qBAAA,QACA,wBAAA,KACA,oBAAA,QACA,uBAAA,KAEA,MAAA,KACA,aAAA,QAfF,cAME,cAAA,QACA,sBAAA,QACA,yBAAA,KACA,qBAAA,QACA,wBAAA,KACA,oBAAA,QACA,uBAAA,KAEA,MAAA,KACA,aAAA,QAfF,aAME,cAAA,QACA,sBAAA,QACA,yBAAA,KACA,qBAAA,QACA,wBAAA,KACA,oBAAA,QACA,uBAAA,KAEA,MAAA,KACA,aAAA,QAfF,YAME,cAAA,QACA,sBAAA,QACA,yBAAA,KACA,qBAAA,QACA,wBAAA,KACA,oBAAA,QACA,uBAAA,KAEA,MAAA,KACA,aAAA,QDgIA,kBACE,WAAA,KACA,2BAAA,MHvEF,4BGqEA,qBACE,WAAA,KACA,2BAAA,OHvEF,4BGqEA,qBACE,WAAA,KACA,2BAAA,OHvEF,4BGqEA,qBACE,WAAA,KACA,2BAAA,OHvEF,6BGqEA,qBACE,WAAA,KACA,2BAAA,OHvEF,6BGqEA,sBACE,WAAA,KACA,2BAAA,OE/IN,YACE,cAAA,MASF,gBACE,YAAA,oBACA,eAAA,oBACA,cAAA,EboRI,UAAA,QahRJ,YAAA,IAIF,mBACE,YAAA,kBACA,eAAA,kBb0QI,UAAA,QatQN,mBACE,YAAA,mBACA,eAAA,mBboQI,UAAA,QcjSN,WACE,WAAA,OdgSI,UAAA,Oc5RJ,MAAA,QCLF,cACE,QAAA,MACA,MAAA,KACA,QAAA,QAAA,Of8RI,UAAA,Ke3RJ,YAAA,IACA,YAAA,IACA,MAAA,QACA,iBAAA,KACA,gBAAA,YACA,OAAA,IAAA,MAAA,QACA,mBAAA,KAAA,gBAAA,KAAA,WAAA,KdGE,cAAA,OeHE,WAAA,aAAA,KAAA,WAAA,CAAA,WAAA,KAAA,YAIA,uCDhBN,cCiBQ,WAAA,MDGN,yBACE,SAAA,OAEA,wDACE,OAAA,QAKJ,oBACE,MAAA,QACA,iBAAA,KACA,aAAA,QACA,QAAA,EAKE,WAAA,EAAA,EAAA,EAAA,OAAA,qBAOJ,2CAEE,OAAA,MAIF,gCACE,MAAA,QAEA,QAAA,EAHF,2BACE,MAAA,QAEA,QAAA,EAQF,uBAAA,wBAEE,iBAAA,QAGA,QAAA,EAIF,oCACE,QAAA,QAAA,OACA,OAAA,SAAA,QACA,mBAAA,OAAA,kBAAA,OACA,MAAA,QE3EF,iBAAA,QF6EE,eAAA,KACA,aAAA,QACA,aAAA,MACA,aAAA,EACA,wBAAA,IACA,cAAA,ECtEE,WAAA,MAAA,KAAA,WAAA,CAAA,iBAAA,KAAA,WAAA,CAAA,aAAA,KAAA,WAAA,CAAA,WAAA,KAAA,YAIA,uCDuDJ,oCCtDM,WAAA,MDqEN,yEACE,iBAAA,QAGF,0CACE,QAAA,QAAA,OACA,OAAA,SAAA,QACA,mBAAA,OAAA,kBAAA,OACA,MAAA,QE9FF,iBAAA,QFgGE,eAAA,KACA,aAAA,QACA,aAAA,MACA,aAAA,EACA,wBAAA,IACA,cAAA,ECzFE,mBAAA,MAAA,KAAA,WAAA,CAAA,iBAAA,KAAA,WAAA,CAAA,aAAA,KAAA,WAAA,CAAA,WAAA,KAAA,YAAA,WAAA,MAAA,KAAA,WAAA,CAAA,iBAAA,KAAA,WAAA,CAAA,aAAA,KAAA,WAAA,CAAA,WAAA,KAAA,YAIA,uCD0EJ,0CCzEM,mBAAA,KAAA,WAAA,MDwFN,+EACE,iBAAA,QASJ,wBACE,QAAA,MACA,MAAA,KACA,QAAA,QAAA,EACA,cAAA,EACA,YAAA,IACA,MAAA,QACA,iBAAA,YACA,OAAA,MAAA,YACA,aAAA,IAAA,EAEA,wCAAA,wCAEE,cAAA,EACA,aAAA,EAWJ,iBACE,WAAA,0BACA,QAAA,OAAA,MfmJI,UAAA,QClRF,cAAA,McmIF,uCACE,QAAA,OAAA,MACA,OAAA,QAAA,OACA,mBAAA,MAAA,kBAAA,MAGF,6CACE,QAAA,OAAA,MACA,OAAA,QAAA,OACA,mBAAA,MAAA,kBAAA,MAIJ,iBACE,WAAA,yBACA,QAAA,MAAA,KfgII,UAAA,QClRF,cAAA,McsJF,uCACE,QAAA,MAAA,KACA,OAAA,OAAA,MACA,mBAAA,KAAA,kBAAA,KAGF,6CACE,QAAA,MAAA,KACA,OAAA,OAAA,MACA,mBAAA,KAAA,kBAAA,KAQF,sBACE,WAAA,2BAGF,yBACE,WAAA,0BAGF,yBACE,WAAA,yBAKJ,oBACE,MAAA,KACA,OAAA,KACA,QAAA,QAEA,mDACE,OAAA,QAGF,uCACE,OAAA,Md/LA,cAAA,OcmMF,0CACE,OAAA,MdpMA,cAAA,OiBdJ,aACE,QAAA,MACA,MAAA,KACA,QAAA,QAAA,QAAA,QAAA,OAEA,mBAAA,oBlB2RI,UAAA,KkBxRJ,YAAA,IACA,YAAA,IACA,MAAA,QACA,iBAAA,KACA,iBAAA,gOACA,kBAAA,UACA,oBAAA,MAAA,OAAA,OACA,gBAAA,KAAA,KACA,OAAA,IAAA,MAAA,QjBFE,cAAA,OeHE,WAAA,aAAA,KAAA,WAAA,CAAA,WAAA,KAAA,YESJ,mBAAA,KAAA,gBAAA,KAAA,WAAA,KFLI,uCEfN,aFgBQ,WAAA,MEMN,mBACE,aAAA,QACA,QAAA,EAKE,WAAA,EAAA,EAAA,EAAA,OAAA,qBAIJ,uBAAA,mCAEE,cAAA,OACA,iBAAA,KAGF,sBAEE,iBAAA,QAKF,4BACE,MAAA,YACA,YAAA,EAAA,EAAA,EAAA,QAIJ,gBACE,YAAA,OACA,eAAA,OACA,aAAA,MlByOI,UAAA,QkBrON,gBACE,YAAA,MACA,eAAA,MACA,aAAA,KlBkOI,UAAA,QmBjSN,YACE,QAAA,MACA,WAAA,OACA,aAAA,MACA,cAAA,QAEA,8BACE,MAAA,KACA,YAAA,OAIJ,kBACE,MAAA,IACA,OAAA,IACA,WAAA,MACA,eAAA,IACA,iBAAA,KACA,kBAAA,UACA,oBAAA,OACA,gBAAA,QACA,OAAA,IAAA,MAAA,gBACA,mBAAA,KAAA,gBAAA,KAAA,WAAA,KACA,2BAAA,MAAA,aAAA,MAGA,iClBXE,cAAA,MkBeF,8BAEE,cAAA,IAGF,yBACE,OAAA,gBAGF,wBACE,aAAA,QACA,QAAA,EACA,WAAA,EAAA,EAAA,EAAA,OAAA,qBAGF,0BACE,iBAAA,QACA,aAAA,QAEA,yCAII,iBAAA,8NAIJ,sCAII,iBAAA,sIAKN,+CACE,iBAAA,QACA,aAAA,QAKE,iBAAA,wNAIJ,2BACE,eAAA,KACA,OAAA,KACA,QAAA,GAOA,6CAAA,8CACE,QAAA,GAcN,aACE,aAAA,MAEA,+BACE,MAAA,IACA,YAAA,OACA,iBAAA,uJACA,oBAAA,KAAA,OlB9FA,cAAA,IeHE,WAAA,oBAAA,KAAA,YAIA,uCGyFJ,+BHxFM,WAAA,MGgGJ,qCACE,iBAAA,yIAGF,uCACE,oBAAA,MAAA,OAKE,iBAAA,sIAMR,mBACE,QAAA,aACA,aAAA,KAGF,WACE,SAAA,SACA,KAAA,cACA,eAAA,KAIE,yBAAA,0BACE,eAAA,KACA,OAAA,KACA,QAAA,IC9IN,YACE,MAAA,KACA,OAAA,OACA,QAAA,EACA,iBAAA,YACA,mBAAA,KAAA,gBAAA,KAAA,WAAA,KAEA,kBACE,QAAA,EAIA,wCAA0B,WAAA,EAAA,EAAA,EAAA,IAAA,IAAA,CAAA,EAAA,EAAA,EAAA,OAAA,qBAC1B,oCAA0B,WAAA,EAAA,EAAA,EAAA,IAAA,IAAA,CAAA,EAAA,EAAA,EAAA,OAAA,qBAG5B,8BACE,OAAA,EAGF,kCACE,MAAA,KACA,OAAA,KACA,WAAA,QHzBF,iBAAA,QG2BE,OAAA,EnBZA,cAAA,KeHE,mBAAA,iBAAA,KAAA,WAAA,CAAA,aAAA,KAAA,WAAA,CAAA,WAAA,KAAA,YAAA,WAAA,iBAAA,KAAA,WAAA,CAAA,aAAA,KAAA,WAAA,CAAA,WAAA,KAAA,YImBF,mBAAA,KAAA,WAAA,KJfE,uCIMJ,kCJLM,mBAAA,KAAA,WAAA,MIgBJ,yCHjCF,iBAAA,QGsCA,2CACE,MAAA,KACA,OAAA,MACA,MAAA,YACA,OAAA,QACA,iBAAA,QACA,aAAA,YnB7BA,cAAA,KmBkCF,8BACE,MAAA,KACA,OAAA,KHnDF,iBAAA,QGqDE,OAAA,EnBtCA,cAAA,KeHE,gBAAA,iBAAA,KAAA,WAAA,CAAA,aAAA,KAAA,WAAA,CAAA,WAAA,KAAA,YAAA,WAAA,iBAAA,KAAA,WAAA,CAAA,aAAA,KAAA,WAAA,CAAA,WAAA,KAAA,YI6CF,gBAAA,KAAA,WAAA,KJzCE,uCIiCJ,8BJhCM,gBAAA,KAAA,WAAA,MI0CJ,qCH3DF,iBAAA,QGgEA,8BACE,MAAA,KACA,OAAA,MACA,MAAA,YACA,OAAA,QACA,iBAAA,QACA,aAAA,YnBvDA,cAAA,KmB4DF,qBACE,eAAA,KAEA,2CACE,iBAAA,QAGF,uCACE,iBAAA,QCvFN,eACE,SAAA,SAEA,6BtB+iFF,4BsB7iFI,OAAA,mBACA,YAAA,KAGF,qBACE,SAAA,SACA,IAAA,EACA,KAAA,EACA,OAAA,KACA,QAAA,KAAA,OACA,eAAA,KACA,OAAA,IAAA,MAAA,YACA,iBAAA,EAAA,ELDE,WAAA,QAAA,IAAA,WAAA,CAAA,UAAA,IAAA,YAIA,uCKXJ,qBLYM,WAAA,MKCN,6BACE,QAAA,KAAA,OAEA,+CACE,MAAA,YADF,0CACE,MAAA,YAGF,0DAEE,YAAA,SACA,eAAA,QAHF,mCAAA,qDAEE,YAAA,SACA,eAAA,QAGF,8CACE,YAAA,SACA,eAAA,QAIJ,4BACE,YAAA,SACA,eAAA,QAMA,gEACE,QAAA,IACA,UAAA,WAAA,mBAAA,mBAFF,yCtBmjFJ,2DACA,kCsBnjFM,QAAA,IACA,UAAA,WAAA,mBAAA,mBAKF,oDACE,QAAA,IACA,UAAA,WAAA,mBAAA,mBCtDN,aACE,SAAA,SACA,QAAA,KACA,UAAA,KACA,YAAA,QACA,MAAA,KAEA,2BvB2mFF,0BuBzmFI,SAAA,SACA,KAAA,EAAA,EAAA,KACA,MAAA,GACA,UAAA,EAIF,iCvBymFF,gCuBvmFI,QAAA,EAMF,kBACE,SAAA,SACA,QAAA,EAEA,wBACE,QAAA,EAWN,kBACE,QAAA,KACA,YAAA,OACA,QAAA,QAAA,OtBsPI,UAAA,KsBpPJ,YAAA,IACA,YAAA,IACA,MAAA,QACA,WAAA,OACA,YAAA,OACA,iBAAA,QACA,OAAA,IAAA,MAAA,QrBpCE,cAAA,OFuoFJ,qBuBzlFA,8BvBulFA,6BACA,kCuBplFE,QAAA,MAAA,KtBgOI,UAAA,QClRF,cAAA,MFgpFJ,qBuBzlFA,8BvBulFA,6BACA,kCuBplFE,QAAA,OAAA,MtBuNI,UAAA,QClRF,cAAA,MqBgEJ,6BvBulFA,6BuBrlFE,cAAA,KvB0lFF,uEuB7kFI,8FrB/DA,wBAAA,EACA,2BAAA,EFgpFJ,iEuB3kFI,2FrBtEA,wBAAA,EACA,2BAAA,EqBgFF,0IACE,YAAA,KrBpEA,uBAAA,EACA,0BAAA,EsBzBF,gBACE,QAAA,KACA,MAAA,KACA,WAAA,OvByQE,UAAA,OuBtQF,MAAA,QAGF,eACE,SAAA,SACA,IAAA,KACA,QAAA,EACA,QAAA,KACA,UAAA,KACA,QAAA,OAAA,MACA,WAAA,MvB4PE,UAAA,QuBzPF,MAAA,KACA,iBAAA,mBtB1BA,cAAA,OFmsFJ,0BACA,yBwBrqFI,sCxBmqFJ,qCwBjqFM,QAAA,MA9CF,uBAAA,mCAoDE,aAAA,QAGE,cAAA,qBACA,iBAAA,2OACA,kBAAA,UACA,oBAAA,MAAA,wBAAA,OACA,gBAAA,sBAAA,sBAGF,6BAAA,yCACE,aAAA,QACA,WAAA,EAAA,EAAA,EAAA,OAAA,oBAhEJ,2CAAA,+BAyEI,cAAA,qBACA,oBAAA,IAAA,wBAAA,MAAA,wBA1EJ,sBAAA,kCAiFE,aAAA,QAGE,kDAAA,gDAAA,8DAAA,4DAEE,cAAA,SACA,iBAAA,+NAAA,CAAA,2OACA,oBAAA,MAAA,OAAA,MAAA,CAAA,OAAA,MAAA,QACA,gBAAA,KAAA,IAAA,CAAA,sBAAA,sBAIJ,4BAAA,wCACE,aAAA,QACA,WAAA,EAAA,EAAA,EAAA,OAAA,oBA/FJ,2BAAA,uCAsGE,aAAA,QAEA,mCAAA,+CACE,iBAAA,QAGF,iCAAA,6CACE,WAAA,EAAA,EAAA,EAAA,OAAA,oBAGF,6CAAA,yDACE,MAAA,QAKJ,qDACE,YAAA,KAvHF,oCxBwwFJ,mCwBxwFI,gDxBuwFJ,+CwBxoFQ,QAAA,EAIF,0CxB0oFN,yCwB1oFM,sDxByoFN,qDwBxoFQ,QAAA,EAjHN,kBACE,QAAA,KACA,MAAA,KACA,WAAA,OvByQE,UAAA,OuBtQF,MAAA,QAGF,iBACE,SAAA,SACA,IAAA,KACA,QAAA,EACA,QAAA,KACA,UAAA,KACA,QAAA,OAAA,MACA,WAAA,MvB4PE,UAAA,QuBzPF,MAAA,KACA,iBAAA,mBtB1BA,cAAA,OF4xFJ,8BACA,6BwB9vFI,0CxB4vFJ,yCwB1vFM,QAAA,MA9CF,yBAAA,qCAoDE,aAAA,QAGE,cAAA,qBACA,iBAAA,2TACA,kBAAA,UACA,oBAAA,MAAA,wBAAA,OACA,gBAAA,sBAAA,sBAGF,+BAAA,2CACE,aAAA,QACA,WAAA,EAAA,EAAA,EAAA,OAAA,oBAhEJ,6CAAA,iCAyEI,cAAA,qBACA,oBAAA,IAAA,wBAAA,MAAA,wBA1EJ,wBAAA,oCAiFE,aAAA,QAGE,oDAAA,kDAAA,gEAAA,8DAEE,cAAA,SACA,iBAAA,+NAAA,CAAA,2TACA,oBAAA,MAAA,OAAA,MAAA,CAAA,OAAA,MAAA,QACA,gBAAA,KAAA,IAAA,CAAA,sBAAA,sBAIJ,8BAAA,0CACE,aAAA,QACA,WAAA,EAAA,EAAA,EAAA,OAAA,oBA/FJ,6BAAA,yCAsGE,aAAA,QAEA,qCAAA,iDACE,iBAAA,QAGF,mCAAA,+CACE,WAAA,EAAA,EAAA,EAAA,OAAA,oBAGF,+CAAA,2DACE,MAAA,QAKJ,uDACE,YAAA,KAvHF,sCxBi2FJ,qCwBj2FI,kDxBg2FJ,iDwB/tFQ,QAAA,EAEF,4CxBmuFN,2CwBnuFM,wDxBkuFN,uDwBjuFQ,QAAA,ECtIR,KACE,QAAA,aAEA,YAAA,IACA,YAAA,IACA,MAAA,QACA,WAAA,OACA,gBAAA,KAEA,eAAA,OACA,OAAA,QACA,oBAAA,KAAA,iBAAA,KAAA,YAAA,KACA,iBAAA,YACA,OAAA,IAAA,MAAA,YC8GA,QAAA,QAAA,OzBsKI,UAAA,KClRF,cAAA,OeHE,WAAA,MAAA,KAAA,WAAA,CAAA,iBAAA,KAAA,WAAA,CAAA,aAAA,KAAA,WAAA,CAAA,WAAA,KAAA,YAIA,uCQhBN,KRiBQ,WAAA,MQAN,WACE,MAAA,QAIF,sBAAA,WAEE,QAAA,EACA,WAAA,EAAA,EAAA,EAAA,OAAA,qBAcF,cAAA,cAAA,uBAGE,eAAA,KACA,QAAA,IAYF,aCvCA,MAAA,KRhBA,iBAAA,QQkBA,aAAA,QAGA,mBACE,MAAA,KRtBF,iBAAA,QQwBE,aAAA,QAGF,8BAAA,mBAEE,MAAA,KR7BF,iBAAA,QQ+BE,aAAA,QAKE,WAAA,EAAA,EAAA,EAAA,OAAA,oBAIJ,+BAAA,gCAAA,oBAAA,oBAAA,mCAKE,MAAA,KACA,iBAAA,QAGA,aAAA,QAEA,qCAAA,sCAAA,0BAAA,0BAAA,yCAKI,WAAA,EAAA,EAAA,EAAA,OAAA,oBAKN,sBAAA,sBAEE,MAAA,KACA,iBAAA,QAGA,aAAA,QDZF,eCvCA,MAAA,KRhBA,iBAAA,QQkBA,aAAA,QAGA,qBACE,MAAA,KRtBF,iBAAA,QQwBE,aAAA,QAGF,gCAAA,qBAEE,MAAA,KR7BF,iBAAA,QQ+BE,aAAA,QAKE,WAAA,EAAA,EAAA,EAAA,OAAA,qBAIJ,iCAAA,kCAAA,sBAAA,sBAAA,qCAKE,MAAA,KACA,iBAAA,QAGA,aAAA,QAEA,uCAAA,wCAAA,4BAAA,4BAAA,2CAKI,WAAA,EAAA,EAAA,EAAA,OAAA,qBAKN,wBAAA,wBAEE,MAAA,KACA,iBAAA,QAGA,aAAA,QDZF,aCvCA,MAAA,KRhBA,iBAAA,QQkBA,aAAA,QAGA,mBACE,MAAA,KRtBF,iBAAA,QQwBE,aAAA,QAGF,8BAAA,mBAEE,MAAA,KR7BF,iBAAA,QQ+BE,aAAA,QAKE,WAAA,EAAA,EAAA,EAAA,OAAA,oBAIJ,+BAAA,gCAAA,oBAAA,oBAAA,mCAKE,MAAA,KACA,iBAAA,QAGA,aAAA,QAEA,qCAAA,sCAAA,0BAAA,0BAAA,yCAKI,WAAA,EAAA,EAAA,EAAA,OAAA,oBAKN,sBAAA,sBAEE,MAAA,KACA,iBAAA,QAGA,aAAA,QDZF,UCvCA,MAAA,KRhBA,iBAAA,QQkBA,aAAA,QAGA,gBACE,MAAA,KRtBF,iBAAA,QQwBE,aAAA,QAGF,2BAAA,gBAEE,MAAA,KR7BF,iBAAA,QQ+BE,aAAA,QAKE,WAAA,EAAA,EAAA,EAAA,OAAA,oBAIJ,4BAAA,6BAAA,iBAAA,iBAAA,gCAKE,MAAA,KACA,iBAAA,QAGA,aAAA,QAEA,kCAAA,mCAAA,uBAAA,uBAAA,sCAKI,WAAA,EAAA,EAAA,EAAA,OAAA,oBAKN,mBAAA,mBAEE,MAAA,KACA,iBAAA,QAGA,aAAA,QDZF,aCvCA,MAAA,KRhBA,iBAAA,QQkBA,aAAA,QAGA,mBACE,MAAA,KRtBF,iBAAA,QQwBE,aAAA,QAGF,8BAAA,mBAEE,MAAA,KR7BF,iBAAA,QQ+BE,aAAA,QAKE,WAAA,EAAA,EAAA,EAAA,OAAA,mBAIJ,+BAAA,gCAAA,oBAAA,oBAAA,mCAKE,MAAA,KACA,iBAAA,QAGA,aAAA,QAEA,qCAAA,sCAAA,0BAAA,0BAAA,yCAKI,WAAA,EAAA,EAAA,EAAA,OAAA,mBAKN,sBAAA,sBAEE,MAAA,KACA,iBAAA,QAGA,aAAA,QDZF,YCvCA,MAAA,KRhBA,iBAAA,QQkBA,aAAA,QAGA,kBACE,MAAA,KRtBF,iBAAA,QQwBE,aAAA,QAGF,6BAAA,kBAEE,MAAA,KR7BF,iBAAA,QQ+BE,aAAA,QAKE,WAAA,EAAA,EAAA,EAAA,OAAA,mBAIJ,8BAAA,+BAAA,mBAAA,mBAAA,kCAKE,MAAA,KACA,iBAAA,QAGA,aAAA,QAEA,oCAAA,qCAAA,yBAAA,yBAAA,wCAKI,WAAA,EAAA,EAAA,EAAA,OAAA,mBAKN,qBAAA,qBAEE,MAAA,KACA,iBAAA,QAGA,aAAA,QDZF,WCvCA,MAAA,KRhBA,iBAAA,QQkBA,aAAA,QAGA,iBACE,MAAA,KRtBF,iBAAA,QQwBE,aAAA,QAGF,4BAAA,iBAEE,MAAA,KR7BF,iBAAA,QQ+BE,aAAA,QAKE,WAAA,EAAA,EAAA,EAAA,OAAA,qBAIJ,6BAAA,8BAAA,kBAAA,kBAAA,iCAKE,MAAA,KACA,iBAAA,QAGA,aAAA,QAEA,mCAAA,oCAAA,wBAAA,wBAAA,uCAKI,WAAA,EAAA,EAAA,EAAA,OAAA,qBAKN,oBAAA,oBAEE,MAAA,KACA,iBAAA,QAGA,aAAA,QDZF,UCvCA,MAAA,KRhBA,iBAAA,QQkBA,aAAA,QAGA,gBACE,MAAA,KRtBF,iBAAA,QQwBE,aAAA,QAGF,2BAAA,gBAEE,MAAA,KR7BF,iBAAA,QQ+BE,aAAA,QAKE,WAAA,EAAA,EAAA,EAAA,OAAA,kBAIJ,4BAAA,6BAAA,iBAAA,iBAAA,gCAKE,MAAA,KACA,iBAAA,QAGA,aAAA,QAEA,kCAAA,mCAAA,uBAAA,uBAAA,sCAKI,WAAA,EAAA,EAAA,EAAA,OAAA,kBAKN,mBAAA,mBAEE,MAAA,KACA,iBAAA,QAGA,aAAA,QDNF,qBCmBA,MAAA,QACA,aAAA,QAEA,2BACE,MAAA,KACA,iBAAA,QACA,aAAA,QAGF,sCAAA,2BAEE,WAAA,EAAA,EAAA,EAAA,OAAA,oBAGF,uCAAA,wCAAA,4BAAA,0CAAA,4BAKE,MAAA,KACA,iBAAA,QACA,aAAA,QAEA,6CAAA,8CAAA,kCAAA,gDAAA,kCAKI,WAAA,EAAA,EAAA,EAAA,OAAA,oBAKN,8BAAA,8BAEE,MAAA,QACA,iBAAA,YDvDF,uBCmBA,MAAA,QACA,aAAA,QAEA,6BACE,MAAA,KACA,iBAAA,QACA,aAAA,QAGF,wCAAA,6BAEE,WAAA,EAAA,EAAA,EAAA,OAAA,qBAGF,yCAAA,0CAAA,8BAAA,4CAAA,8BAKE,MAAA,KACA,iBAAA,QACA,aAAA,QAEA,+CAAA,gDAAA,oCAAA,kDAAA,oCAKI,WAAA,EAAA,EAAA,EAAA,OAAA,qBAKN,gCAAA,gCAEE,MAAA,QACA,iBAAA,YDvDF,qBCmBA,MAAA,QACA,aAAA,QAEA,2BACE,MAAA,KACA,iBAAA,QACA,aAAA,QAGF,sCAAA,2BAEE,WAAA,EAAA,EAAA,EAAA,OAAA,mBAGF,uCAAA,wCAAA,4BAAA,0CAAA,4BAKE,MAAA,KACA,iBAAA,QACA,aAAA,QAEA,6CAAA,8CAAA,kCAAA,gDAAA,kCAKI,WAAA,EAAA,EAAA,EAAA,OAAA,mBAKN,8BAAA,8BAEE,MAAA,QACA,iBAAA,YDvDF,kBCmBA,MAAA,QACA,aAAA,QAEA,wBACE,MAAA,KACA,iBAAA,QACA,aAAA,QAGF,mCAAA,wBAEE,WAAA,EAAA,EAAA,EAAA,OAAA,oBAGF,oCAAA,qCAAA,yBAAA,uCAAA,yBAKE,MAAA,KACA,iBAAA,QACA,aAAA,QAEA,0CAAA,2CAAA,+BAAA,6CAAA,+BAKI,WAAA,EAAA,EAAA,EAAA,OAAA,oBAKN,2BAAA,2BAEE,MAAA,QACA,iBAAA,YDvDF,qBCmBA,MAAA,QACA,aAAA,QAEA,2BACE,MAAA,KACA,iBAAA,QACA,aAAA,QAGF,sCAAA,2BAEE,WAAA,EAAA,EAAA,EAAA,OAAA,mBAGF,uCAAA,wCAAA,4BAAA,0CAAA,4BAKE,MAAA,KACA,iBAAA,QACA,aAAA,QAEA,6CAAA,8CAAA,kCAAA,gDAAA,kCAKI,WAAA,EAAA,EAAA,EAAA,OAAA,mBAKN,8BAAA,8BAEE,MAAA,QACA,iBAAA,YDvDF,oBCmBA,MAAA,QACA,aAAA,QAEA,0BACE,MAAA,KACA,iBAAA,QACA,aAAA,QAGF,qCAAA,0BAEE,WAAA,EAAA,EAAA,EAAA,OAAA,mBAGF,sCAAA,uCAAA,2BAAA,yCAAA,2BAKE,MAAA,KACA,iBAAA,QACA,aAAA,QAEA,4CAAA,6CAAA,iCAAA,+CAAA,iCAKI,WAAA,EAAA,EAAA,EAAA,OAAA,mBAKN,6BAAA,6BAEE,MAAA,QACA,iBAAA,YDvDF,mBCmBA,MAAA,QACA,aAAA,QAEA,yBACE,MAAA,KACA,iBAAA,QACA,aAAA,QAGF,oCAAA,yBAEE,WAAA,EAAA,EAAA,EAAA,OAAA,qBAGF,qCAAA,sCAAA,0BAAA,wCAAA,0BAKE,MAAA,KACA,iBAAA,QACA,aAAA,QAEA,2CAAA,4CAAA,gCAAA,8CAAA,gCAKI,WAAA,EAAA,EAAA,EAAA,OAAA,qBAKN,4BAAA,4BAEE,MAAA,QACA,iBAAA,YDvDF,kBCmBA,MAAA,QACA,aAAA,QAEA,wBACE,MAAA,KACA,iBAAA,QACA,aAAA,QAGF,mCAAA,wBAEE,WAAA,EAAA,EAAA,EAAA,OAAA,kBAGF,oCAAA,qCAAA,yBAAA,uCAAA,yBAKE,MAAA,KACA,iBAAA,QACA,aAAA,QAEA,0CAAA,2CAAA,+BAAA,6CAAA,+BAKI,WAAA,EAAA,EAAA,EAAA,OAAA,kBAKN,2BAAA,2BAEE,MAAA,QACA,iBAAA,YD3CJ,UACE,YAAA,IACA,MAAA,QACA,gBAAA,UAEA,gBACE,MAAA,QAQF,mBAAA,mBAEE,MAAA,QAWJ,mBAAA,QCuBE,QAAA,MAAA,KzBsKI,UAAA,QClRF,cAAA,MuByFJ,mBAAA,QCmBE,QAAA,OAAA,MzBsKI,UAAA,QClRF,cAAA,MyBnBJ,MVgBM,WAAA,QAAA,KAAA,OAIA,uCUpBN,MVqBQ,WAAA,MUlBN,iBACE,QAAA,EAMF,qBACE,QAAA,KAIJ,YACE,OAAA,EACA,SAAA,OVDI,WAAA,OAAA,KAAA,KAIA,uCULN,YVMQ,WAAA,MUDN,gCACE,MAAA,EACA,OAAA,KVNE,WAAA,MAAA,KAAA,KAIA,uCUAJ,gCVCM,WAAA,MjBs3GR,UADA,SAEA,W4B34GA,QAIE,SAAA,SAGF,iBACE,YAAA,OCqBE,wBACE,QAAA,aACA,YAAA,OACA,eAAA,OACA,QAAA,GAhCJ,WAAA,KAAA,MACA,aAAA,KAAA,MAAA,YACA,cAAA,EACA,YAAA,KAAA,MAAA,YAqDE,8BACE,YAAA,ED3CN,eACE,SAAA,SACA,QAAA,KACA,QAAA,KACA,UAAA,MACA,QAAA,MAAA,EACA,OAAA,E3B+QI,UAAA,K2B7QJ,MAAA,QACA,WAAA,KACA,WAAA,KACA,iBAAA,KACA,gBAAA,YACA,OAAA,IAAA,MAAA,gB1BVE,cAAA,O0BcF,+BACE,IAAA,KACA,KAAA,EACA,WAAA,QAYA,qBACE,cAAA,MAEA,qCACE,MAAA,KACA,KAAA,EAIJ,mBACE,cAAA,IAEA,mCACE,MAAA,EACA,KAAA,KnBCJ,yBmBfA,wBACE,cAAA,MAEA,wCACE,MAAA,KACA,KAAA,EAIJ,sBACE,cAAA,IAEA,sCACE,MAAA,EACA,KAAA,MnBCJ,yBmBfA,wBACE,cAAA,MAEA,wCACE,MAAA,KACA,KAAA,EAIJ,sBACE,cAAA,IAEA,sCACE,MAAA,EACA,KAAA,MnBCJ,yBmBfA,wBACE,cAAA,MAEA,wCACE,MAAA,KACA,KAAA,EAIJ,sBACE,cAAA,IAEA,sCACE,MAAA,EACA,KAAA,MnBCJ,0BmBfA,wBACE,cAAA,MAEA,wCACE,MAAA,KACA,KAAA,EAIJ,sBACE,cAAA,IAEA,sCACE,MAAA,EACA,KAAA,MnBCJ,0BmBfA,yBACE,cAAA,MAEA,yCACE,MAAA,KACA,KAAA,EAIJ,uBACE,cAAA,IAEA,uCACE,MAAA,EACA,KAAA,MAUN,uCACE,IAAA,KACA,OAAA,KACA,WAAA,EACA,cAAA,QC9CA,gCACE,QAAA,aACA,YAAA,OACA,eAAA,OACA,QAAA,GAzBJ,WAAA,EACA,aAAA,KAAA,MAAA,YACA,cAAA,KAAA,MACA,YAAA,KAAA,MAAA,YA8CE,sCACE,YAAA,ED0BJ,wCACE,IAAA,EACA,MAAA,KACA,KAAA,KACA,WAAA,EACA,YAAA,QC5DA,iCACE,QAAA,aACA,YAAA,OACA,eAAA,OACA,QAAA,GAlBJ,WAAA,KAAA,MAAA,YACA,aAAA,EACA,cAAA,KAAA,MAAA,YACA,YAAA,KAAA,MAuCE,uCACE,YAAA,EDoCF,iCACE,eAAA,EAMJ,0CACE,IAAA,EACA,MAAA,KACA,KAAA,KACA,WAAA,EACA,aAAA,QC7EA,mCACE,QAAA,aACA,YAAA,OACA,eAAA,OACA,QAAA,GAWA,mCACE,QAAA,KAGF,oCACE,QAAA,aACA,aAAA,OACA,eAAA,OACA,QAAA,GA9BN,WAAA,KAAA,MAAA,YACA,aAAA,KAAA,MACA,cAAA,KAAA,MAAA,YAiCE,yCACE,YAAA,EDqDF,oCACE,eAAA,EAON,kBACE,OAAA,EACA,OAAA,MAAA,EACA,SAAA,OACA,WAAA,IAAA,MAAA,gBAMF,eACE,QAAA,MACA,MAAA,KACA,QAAA,OAAA,KACA,MAAA,KACA,YAAA,IACA,MAAA,QACA,WAAA,QACA,gBAAA,KACA,YAAA,OACA,iBAAA,YACA,OAAA,EAcA,qBAAA,qBAEE,MAAA,QVzJF,iBAAA,QU8JA,sBAAA,sBAEE,MAAA,KACA,gBAAA,KVjKF,iBAAA,QUqKA,wBAAA,wBAEE,MAAA,QACA,eAAA,KACA,iBAAA,YAMJ,oBACE,QAAA,MAIF,iBACE,QAAA,MACA,QAAA,MAAA,KACA,cAAA,E3B0GI,UAAA,Q2BxGJ,MAAA,QACA,YAAA,OAIF,oBACE,QAAA,MACA,QAAA,OAAA,KACA,MAAA,QAIF,oBACE,MAAA,QACA,iBAAA,QACA,aAAA,gBAGA,mCACE,MAAA,QAEA,yCAAA,yCAEE,MAAA,KVhNJ,iBAAA,sBUoNE,0CAAA,0CAEE,MAAA,KVtNJ,iBAAA,QU0NE,4CAAA,4CAEE,MAAA,QAIJ,sCACE,aAAA,gBAGF,wCACE,MAAA,QAGF,qCACE,MAAA,QE5OJ,W9B2rHA,oB8BzrHE,SAAA,SACA,QAAA,YACA,eAAA,O9B6rHF,yB8B3rHE,gBACE,SAAA,SACA,KAAA,EAAA,EAAA,K9BmsHJ,4CACA,0CAIA,gCADA,gCADA,+BADA,+B8BhsHE,mC9ByrHF,iCAIA,uBADA,uBADA,sBADA,sB8BprHI,QAAA,EAKJ,aACE,QAAA,KACA,UAAA,KACA,gBAAA,WAEA,0BACE,MAAA,K9BgsHJ,wC8B1rHE,kCAEE,YAAA,K9B4rHJ,4C8BxrHE,uD5BRE,wBAAA,EACA,2BAAA,EFqsHJ,6C8BrrHE,+B9BorHF,iCEvrHI,uBAAA,EACA,0BAAA,E4BqBJ,uBACE,cAAA,SACA,aAAA,SAEA,8BAAA,uCAAA,sCAGE,YAAA,EAGF,0CACE,aAAA,EAIJ,0CAAA,+BACE,cAAA,QACA,aAAA,QAGF,0CAAA,+BACE,cAAA,OACA,aAAA,OAoBF,oBACE,eAAA,OACA,YAAA,WACA,gBAAA,OAEA,yB9BmpHF,+B8BjpHI,MAAA,K9BqpHJ,iD8BlpHE,2CAEE,WAAA,K9BopHJ,qD8BhpHE,gE5BvFE,2BAAA,EACA,0BAAA,EF2uHJ,sD8BhpHE,8B5B1GE,uBAAA,EACA,wBAAA,E6BxBJ,KACE,QAAA,KACA,UAAA,KACA,aAAA,EACA,cAAA,EACA,WAAA,KAGF,UACE,QAAA,MACA,QAAA,MAAA,KAGA,MAAA,QACA,gBAAA,KdHI,WAAA,MAAA,KAAA,WAAA,CAAA,iBAAA,KAAA,WAAA,CAAA,aAAA,KAAA,YAIA,uCcPN,UdQQ,WAAA,McCN,gBAAA,gBAEE,MAAA,QAKF,mBACE,MAAA,QACA,eAAA,KACA,OAAA,QAQJ,UACE,cAAA,IAAA,MAAA,QAEA,oBACE,cAAA,KACA,WAAA,IACA,OAAA,IAAA,MAAA,Y7BlBA,uBAAA,OACA,wBAAA,O6BoBA,0BAAA,0BAEE,aAAA,QAAA,QAAA,QAEA,UAAA,QAGF,6BACE,MAAA,QACA,iBAAA,YACA,aAAA,Y/BixHN,mC+B7wHE,2BAEE,MAAA,QACA,iBAAA,KACA,aAAA,QAAA,QAAA,KAGF,yBAEE,WAAA,K7B5CA,uBAAA,EACA,wBAAA,E6BuDF,qBACE,WAAA,IACA,OAAA,E7BnEA,cAAA,O6BuEF,4B/BmwHF,2B+BjwHI,MAAA,KbxFF,iBAAA,QlB+1HF,oB+B5vHE,oBAEE,KAAA,EAAA,EAAA,KACA,WAAA,O/B+vHJ,yB+B1vHE,yBAEE,WAAA,EACA,UAAA,EACA,WAAA,OAMF,8B/BuvHF,mC+BtvHI,MAAA,KAUF,uBACE,QAAA,KAEF,qBACE,QAAA,MCxHJ,QACE,SAAA,SACA,QAAA,KACA,UAAA,KACA,YAAA,OACA,gBAAA,cACA,YAAA,MAEA,eAAA,MAOA,mBhCs2HF,yBAGA,sBADA,sBADA,sBAGA,sBACA,uBgC12HI,QAAA,KACA,UAAA,QACA,YAAA,OACA,gBAAA,cAoBJ,cACE,YAAA,SACA,eAAA,SACA,aAAA,K/B2OI,UAAA,Q+BzOJ,gBAAA,KACA,YAAA,OAaF,YACE,QAAA,KACA,eAAA,OACA,aAAA,EACA,cAAA,EACA,WAAA,KAEA,sBACE,cAAA,EACA,aAAA,EAGF,2BACE,SAAA,OASJ,aACE,YAAA,MACA,eAAA,MAYF,iBACE,WAAA,KACA,UAAA,EAGA,YAAA,OAIF,gBACE,QAAA,OAAA,O/B6KI,UAAA,Q+B3KJ,YAAA,EACA,iBAAA,YACA,OAAA,IAAA,MAAA,Y9BzGE,cAAA,OeHE,WAAA,WAAA,KAAA,YAIA,uCemGN,gBflGQ,WAAA,Me2GN,sBACE,gBAAA,KAGF,sBACE,gBAAA,KACA,QAAA,EACA,WAAA,EAAA,EAAA,EAAA,OAMJ,qBACE,QAAA,aACA,MAAA,MACA,OAAA,MACA,eAAA,OACA,kBAAA,UACA,oBAAA,OACA,gBAAA,KAGF,mBACE,WAAA,6BACA,WAAA,KvB1FE,yBuBsGA,kBAEI,UAAA,OACA,gBAAA,WAEA,8BACE,eAAA,IAEA,6CACE,SAAA,SAGF,wCACE,cAAA,MACA,aAAA,MAIJ,qCACE,SAAA,QAGF,mCACE,QAAA,eACA,WAAA,KAGF,kCACE,QAAA,KAGF,oCACE,QAAA,KAGF,6BACE,SAAA,QACA,OAAA,EACA,QAAA,KACA,UAAA,EACA,WAAA,kBACA,iBAAA,YACA,aAAA,EACA,YAAA,EfhMJ,WAAA,KekMI,UAAA,KhC+yHV,oCgC7yHQ,iCAEE,OAAA,KACA,WAAA,EACA,cAAA,EAGF,kCACE,QAAA,KACA,UAAA,EACA,QAAA,EACA,WAAA,SvBhKN,yBuBsGA,kBAEI,UAAA,OACA,gBAAA,WAEA,8BACE,eAAA,IAEA,6CACE,SAAA,SAGF,wCACE,cAAA,MACA,aAAA,MAIJ,qCACE,SAAA,QAGF,mCACE,QAAA,eACA,WAAA,KAGF,kCACE,QAAA,KAGF,oCACE,QAAA,KAGF,6BACE,SAAA,QACA,OAAA,EACA,QAAA,KACA,UAAA,EACA,WAAA,kBACA,iBAAA,YACA,aAAA,EACA,YAAA,EfhMJ,WAAA,KekMI,UAAA,KhCo2HV,oCgCl2HQ,iCAEE,OAAA,KACA,WAAA,EACA,cAAA,EAGF,kCACE,QAAA,KACA,UAAA,EACA,QAAA,EACA,WAAA,SvBhKN,yBuBsGA,kBAEI,UAAA,OACA,gBAAA,WAEA,8BACE,eAAA,IAEA,6CACE,SAAA,SAGF,wCACE,cAAA,MACA,aAAA,MAIJ,qCACE,SAAA,QAGF,mCACE,QAAA,eACA,WAAA,KAGF,kCACE,QAAA,KAGF,oCACE,QAAA,KAGF,6BACE,SAAA,QACA,OAAA,EACA,QAAA,KACA,UAAA,EACA,WAAA,kBACA,iBAAA,YACA,aAAA,EACA,YAAA,EfhMJ,WAAA,KekMI,UAAA,KhCy5HV,oCgCv5HQ,iCAEE,OAAA,KACA,WAAA,EACA,cAAA,EAGF,kCACE,QAAA,KACA,UAAA,EACA,QAAA,EACA,WAAA,SvBhKN,0BuBsGA,kBAEI,UAAA,OACA,gBAAA,WAEA,8BACE,eAAA,IAEA,6CACE,SAAA,SAGF,wCACE,cAAA,MACA,aAAA,MAIJ,qCACE,SAAA,QAGF,mCACE,QAAA,eACA,WAAA,KAGF,kCACE,QAAA,KAGF,oCACE,QAAA,KAGF,6BACE,SAAA,QACA,OAAA,EACA,QAAA,KACA,UAAA,EACA,WAAA,kBACA,iBAAA,YACA,aAAA,EACA,YAAA,EfhMJ,WAAA,KekMI,UAAA,KhC88HV,oCgC58HQ,iCAEE,OAAA,KACA,WAAA,EACA,cAAA,EAGF,kCACE,QAAA,KACA,UAAA,EACA,QAAA,EACA,WAAA,SvBhKN,0BuBsGA,mBAEI,UAAA,OACA,gBAAA,WAEA,+BACE,eAAA,IAEA,8CACE,SAAA,SAGF,yCACE,cAAA,MACA,aAAA,MAIJ,sCACE,SAAA,QAGF,oCACE,QAAA,eACA,WAAA,KAGF,mCACE,QAAA,KAGF,qCACE,QAAA,KAGF,8BACE,SAAA,QACA,OAAA,EACA,QAAA,KACA,UAAA,EACA,WAAA,kBACA,iBAAA,YACA,aAAA,EACA,YAAA,EfhMJ,WAAA,KekMI,UAAA,KhCmgIV,qCgCjgIQ,kCAEE,OAAA,KACA,WAAA,EACA,cAAA,EAGF,mCACE,QAAA,KACA,UAAA,EACA,QAAA,EACA,WAAA,SA1DN,eAEI,UAAA,OACA,gBAAA,WAEA,2BACE,eAAA,IAEA,0CACE,SAAA,SAGF,qCACE,cAAA,MACA,aAAA,MAIJ,kCACE,SAAA,QAGF,gCACE,QAAA,eACA,WAAA,KAGF,+BACE,QAAA,KAGF,iCACE,QAAA,KAGF,0BACE,SAAA,QACA,OAAA,EACA,QAAA,KACA,UAAA,EACA,WAAA,kBACA,iBAAA,YACA,aAAA,EACA,YAAA,EfhMJ,WAAA,KekMI,UAAA,KhCujIV,iCgCrjIQ,8BAEE,OAAA,KACA,WAAA,EACA,cAAA,EAGF,+BACE,QAAA,KACA,UAAA,EACA,QAAA,EACA,WAAA,QAcR,4BACE,MAAA,eAEA,kCAAA,kCAEE,MAAA,eAKF,oCACE,MAAA,gBAEA,0CAAA,0CAEE,MAAA,eAGF,6CACE,MAAA,ehCqiIR,2CgCjiII,0CAEE,MAAA,eAIJ,8BACE,MAAA,gBACA,aAAA,eAGF,mCACE,iBAAA,4OAGF,2BACE,MAAA,gBAEA,6BhC8hIJ,mCADA,mCgC1hIM,MAAA,eAOJ,2BACE,MAAA,KAEA,iCAAA,iCAEE,MAAA,KAKF,mCACE,MAAA,sBAEA,yCAAA,yCAEE,MAAA,sBAGF,4CACE,MAAA,sBhCqhIR,0CgCjhII,yCAEE,MAAA,KAIJ,6BACE,MAAA,sBACA,aAAA,qBAGF,kCACE,iBAAA,kPAGF,0BACE,MAAA,sBACA,4BhC+gIJ,kCADA,kCgC3gIM,MAAA,KCvUN,MACE,SAAA,SACA,QAAA,KACA,eAAA,OACA,UAAA,EAEA,UAAA,WACA,iBAAA,KACA,gBAAA,WACA,OAAA,IAAA,MAAA,iB/BME,cAAA,O+BFF,SACE,aAAA,EACA,YAAA,EAGF,kBACE,WAAA,QACA,cAAA,QAEA,8BACE,iBAAA,E/BCF,uBAAA,mBACA,wBAAA,mB+BEA,6BACE,oBAAA,E/BUF,2BAAA,mBACA,0BAAA,mB+BJF,+BjCk1IF,+BiCh1II,WAAA,EAIJ,WAGE,KAAA,EAAA,EAAA,KACA,QAAA,KAAA,KAIF,YACE,cAAA,MAGF,eACE,WAAA,QACA,cAAA,EAGF,sBACE,cAAA,EAQA,sBACE,YAAA,KAQJ,aACE,QAAA,MAAA,KACA,cAAA,EAEA,iBAAA,gBACA,cAAA,IAAA,MAAA,iBAEA,yB/BpEE,cAAA,mBAAA,mBAAA,EAAA,E+ByEJ,aACE,QAAA,MAAA,KAEA,iBAAA,gBACA,WAAA,IAAA,MAAA,iBAEA,wB/B/EE,cAAA,EAAA,EAAA,mBAAA,mB+ByFJ,kBACE,aAAA,OACA,cAAA,OACA,YAAA,OACA,cAAA,EAUF,mBACE,aAAA,OACA,YAAA,OAIF,kBACE,SAAA,SACA,IAAA,EACA,MAAA,EACA,OAAA,EACA,KAAA,EACA,QAAA,K/BnHE,cAAA,mB+BuHJ,UjCozIA,iBADA,ciChzIE,MAAA,KAGF,UjCmzIA,cEv6II,uBAAA,mBACA,wBAAA,mB+BwHJ,UjCozIA,iBE/5II,2BAAA,mBACA,0BAAA,mB+BuHF,kBACE,cAAA,OxBpGA,yBwBgGJ,YAQI,QAAA,KACA,UAAA,IAAA,KAGA,kBAEE,KAAA,EAAA,EAAA,GACA,cAAA,EAEA,wBACE,YAAA,EACA,YAAA,EAKA,mC/BpJJ,wBAAA,EACA,2BAAA,EF+7IJ,gDiCzyIU,iDAGE,wBAAA,EjC0yIZ,gDiCxyIU,oDAGE,2BAAA,EAIJ,oC/BrJJ,uBAAA,EACA,0BAAA,EF67IJ,iDiCtyIU,kDAGE,uBAAA,EjCuyIZ,iDiCryIU,qDAGE,0BAAA,GC7MZ,kBACE,SAAA,SACA,QAAA,KACA,YAAA,OACA,MAAA,KACA,QAAA,KAAA,QjC4RI,UAAA,KiC1RJ,MAAA,QACA,WAAA,KACA,iBAAA,KACA,OAAA,EhCKE,cAAA,EgCHF,gBAAA,KjBAI,WAAA,MAAA,KAAA,WAAA,CAAA,iBAAA,KAAA,WAAA,CAAA,aAAA,KAAA,WAAA,CAAA,WAAA,KAAA,WAAA,CAAA,cAAA,KAAA,KAIA,uCiBhBN,kBjBiBQ,WAAA,MiBFN,kCACE,MAAA,QACA,iBAAA,QACA,WAAA,MAAA,EAAA,KAAA,EAAA,iBAEA,yCACE,iBAAA,gRACA,UAAA,gBAKJ,yBACE,YAAA,EACA,MAAA,QACA,OAAA,QACA,YAAA,KACA,QAAA,GACA,iBAAA,gRACA,kBAAA,UACA,gBAAA,QjBvBE,WAAA,UAAA,IAAA,YAIA,uCiBWJ,yBjBVM,WAAA,MiBsBN,wBACE,QAAA,EAGF,wBACE,QAAA,EACA,aAAA,QACA,QAAA,EACA,WAAA,EAAA,EAAA,EAAA,OAAA,qBAIJ,kBACE,cAAA,EAGF,gBACE,iBAAA,KACA,OAAA,IAAA,MAAA,iBAEA,8BhCnCE,uBAAA,OACA,wBAAA,OgCqCA,gDhCtCA,uBAAA,mBACA,wBAAA,mBgC0CF,oCACE,WAAA,EAIF,6BhClCE,2BAAA,OACA,0BAAA,OgCqCE,yDhCtCF,2BAAA,mBACA,0BAAA,mBgC0CA,iDhC3CA,2BAAA,OACA,0BAAA,OgCgDJ,gBACE,QAAA,KAAA,QASA,qCACE,aAAA,EAGF,iCACE,aAAA,EACA,YAAA,EhCxFA,cAAA,EgC2FA,6CAAgB,WAAA,EAChB,4CAAe,cAAA,EAEf,mDhC9FA,cAAA,EiCnBJ,YACE,QAAA,KACA,UAAA,KACA,QAAA,EAAA,EACA,cAAA,KAEA,WAAA,KAOA,kCACE,aAAA,MAEA,0CACE,MAAA,KACA,cAAA,MACA,MAAA,QACA,QAAA,kCAIJ,wBACE,MAAA,QCzBJ,YACE,QAAA,KhCGA,aAAA,EACA,WAAA,KgCAF,WACE,SAAA,SACA,QAAA,MACA,MAAA,QACA,gBAAA,KACA,iBAAA,KACA,OAAA,IAAA,MAAA,QnBKI,WAAA,MAAA,KAAA,WAAA,CAAA,iBAAA,KAAA,WAAA,CAAA,aAAA,KAAA,WAAA,CAAA,WAAA,KAAA,YAIA,uCmBfN,WnBgBQ,WAAA,MmBPN,iBACE,QAAA,EACA,MAAA,QAEA,iBAAA,QACA,aAAA,QAGF,iBACE,QAAA,EACA,MAAA,QACA,iBAAA,QACA,QAAA,EACA,WAAA,EAAA,EAAA,EAAA,OAAA,qBAKF,wCACE,YAAA,KAGF,6BACE,QAAA,EACA,MAAA,KlBlCF,iBAAA,QkBoCE,aAAA,QAGF,+BACE,MAAA,QACA,eAAA,KACA,iBAAA,KACA,aAAA,QC3CF,WACE,QAAA,QAAA,OAOI,kCnCqCJ,uBAAA,OACA,0BAAA,OmChCI,iCnCiBJ,wBAAA,OACA,2BAAA,OmChCF,0BACE,QAAA,OAAA,OpCgSE,UAAA,QoCzRE,iDnCqCJ,uBAAA,MACA,0BAAA,MmChCI,gDnCiBJ,wBAAA,MACA,2BAAA,MmChCF,0BACE,QAAA,OAAA,MpCgSE,UAAA,QoCzRE,iDnCqCJ,uBAAA,MACA,0BAAA,MmChCI,gDnCiBJ,wBAAA,MACA,2BAAA,MoC/BJ,OACE,QAAA,aACA,QAAA,MAAA,MrC8RI,UAAA,MqC5RJ,YAAA,IACA,YAAA,EACA,MAAA,KACA,WAAA,OACA,YAAA,OACA,eAAA,SpCKE,cAAA,OoCAF,aACE,QAAA,KAKJ,YACE,SAAA,SACA,IAAA,KCvBF,OACE,SAAA,SACA,QAAA,KAAA,KACA,cAAA,KACA,OAAA,IAAA,MAAA,YrCWE,cAAA,OqCNJ,eAEE,MAAA,QAIF,YACE,YAAA,IAQF,mBACE,cAAA,KAGA,8BACE,SAAA,SACA,IAAA,EACA,MAAA,EACA,QAAA,EACA,QAAA,QAAA,KAeF,eClDA,MAAA,QtBEA,iBAAA,QsBAA,aAAA,QAEA,2BACE,MAAA,QD6CF,iBClDA,MAAA,QtBEA,iBAAA,QsBAA,aAAA,QAEA,6BACE,MAAA,QD6CF,eClDA,MAAA,QtBEA,iBAAA,QsBAA,aAAA,QAEA,2BACE,MAAA,QD6CF,YClDA,MAAA,QtBEA,iBAAA,QsBAA,aAAA,QAEA,wBACE,MAAA,QD6CF,eClDA,MAAA,QtBEA,iBAAA,QsBAA,aAAA,QAEA,2BACE,MAAA,QD6CF,cClDA,MAAA,QtBEA,iBAAA,QsBAA,aAAA,QAEA,0BACE,MAAA,QD6CF,aClDA,MAAA,QtBEA,iBAAA,QsBAA,aAAA,QAEA,yBACE,MAAA,QD6CF,YClDA,MAAA,QtBEA,iBAAA,QsBAA,aAAA,QAEA,wBACE,MAAA,QCHF,wCACE,GAAK,sBAAA,MADP,gCACE,GAAK,sBAAA,MAKT,UACE,QAAA,KACA,OAAA,KACA,SAAA,OxCwRI,UAAA,OwCtRJ,iBAAA,QvCIE,cAAA,OuCCJ,cACE,QAAA,KACA,eAAA,OACA,gBAAA,OACA,SAAA,OACA,MAAA,KACA,WAAA,OACA,YAAA,OACA,iBAAA,QxBZI,WAAA,MAAA,IAAA,KAIA,uCwBAN,cxBCQ,WAAA,MwBWR,sBvBYE,iBAAA,iKuBVA,gBAAA,KAAA,KAIA,uBACE,kBAAA,GAAA,OAAA,SAAA,qBAAA,UAAA,GAAA,OAAA,SAAA,qBAGE,uCAJJ,uBAKM,kBAAA,KAAA,UAAA,MCvCR,YACE,QAAA,KACA,eAAA,OAGA,aAAA,EACA,cAAA,ExCSE,cAAA,OwCLJ,qBACE,gBAAA,KACA,cAAA,QAEA,gCAEE,QAAA,uBAAA,KACA,kBAAA,QAUJ,wBACE,MAAA,KACA,MAAA,QACA,WAAA,QAGA,8BAAA,8BAEE,QAAA,EACA,MAAA,QACA,gBAAA,KACA,iBAAA,QAGF,+BACE,MAAA,QACA,iBAAA,QASJ,iBACE,SAAA,SACA,QAAA,MACA,QAAA,MAAA,KACA,MAAA,QACA,gBAAA,KACA,iBAAA,KACA,OAAA,IAAA,MAAA,iBAEA,6BxCrCE,uBAAA,QACA,wBAAA,QwCwCF,4BxC3BE,2BAAA,QACA,0BAAA,QwC8BF,0BAAA,0BAEE,MAAA,QACA,eAAA,KACA,iBAAA,KAIF,wBACE,QAAA,EACA,MAAA,KACA,iBAAA,QACA,aAAA,QAGF,kCACE,iBAAA,EAEA,yCACE,WAAA,KACA,iBAAA,IAcF,uBACE,eAAA,IAGE,oDxCrCJ,0BAAA,OAZA,wBAAA,EwCsDI,mDxCtDJ,wBAAA,OAYA,0BAAA,EwC+CI,+CACE,WAAA,EAGF,yDACE,iBAAA,IACA,kBAAA,EAEA,gEACE,YAAA,KACA,kBAAA,IjCpER,yBiC4CA,0BACE,eAAA,IAGE,uDxCrCJ,0BAAA,OAZA,wBAAA,EwCsDI,sDxCtDJ,wBAAA,OAYA,0BAAA,EwC+CI,kDACE,WAAA,EAGF,4DACE,iBAAA,IACA,kBAAA,EAEA,mEACE,YAAA,KACA,kBAAA,KjCpER,yBiC4CA,0BACE,eAAA,IAGE,uDxCrCJ,0BAAA,OAZA,wBAAA,EwCsDI,sDxCtDJ,wBAAA,OAYA,0BAAA,EwC+CI,kDACE,WAAA,EAGF,4DACE,iBAAA,IACA,kBAAA,EAEA,mEACE,YAAA,KACA,kBAAA,KjCpER,yBiC4CA,0BACE,eAAA,IAGE,uDxCrCJ,0BAAA,OAZA,wBAAA,EwCsDI,sDxCtDJ,wBAAA,OAYA,0BAAA,EwC+CI,kDACE,WAAA,EAGF,4DACE,iBAAA,IACA,kBAAA,EAEA,mEACE,YAAA,KACA,kBAAA,KjCpER,0BiC4CA,0BACE,eAAA,IAGE,uDxCrCJ,0BAAA,OAZA,wBAAA,EwCsDI,sDxCtDJ,wBAAA,OAYA,0BAAA,EwC+CI,kDACE,WAAA,EAGF,4DACE,iBAAA,IACA,kBAAA,EAEA,mEACE,YAAA,KACA,kBAAA,KjCpER,0BiC4CA,2BACE,eAAA,IAGE,wDxCrCJ,0BAAA,OAZA,wBAAA,EwCsDI,uDxCtDJ,wBAAA,OAYA,0BAAA,EwC+CI,mDACE,WAAA,EAGF,6DACE,iBAAA,IACA,kBAAA,EAEA,oEACE,YAAA,KACA,kBAAA,KAcZ,kBxC9HI,cAAA,EwCiIF,mCACE,aAAA,EAAA,EAAA,IAEA,8CACE,oBAAA,ECpJJ,yBACE,MAAA,QACA,iBAAA,QAGE,sDAAA,sDAEE,MAAA,QACA,iBAAA,QAGF,uDACE,MAAA,KACA,iBAAA,QACA,aAAA,QAdN,2BACE,MAAA,QACA,iBAAA,QAGE,wDAAA,wDAEE,MAAA,QACA,iBAAA,QAGF,yDACE,MAAA,KACA,iBAAA,QACA,aAAA,QAdN,yBACE,MAAA,QACA,iBAAA,QAGE,sDAAA,sDAEE,MAAA,QACA,iBAAA,QAGF,uDACE,MAAA,KACA,iBAAA,QACA,aAAA,QAdN,sBACE,MAAA,QACA,iBAAA,QAGE,mDAAA,mDAEE,MAAA,QACA,iBAAA,QAGF,oDACE,MAAA,KACA,iBAAA,QACA,aAAA,QAdN,yBACE,MAAA,QACA,iBAAA,QAGE,sDAAA,sDAEE,MAAA,QACA,iBAAA,QAGF,uDACE,MAAA,KACA,iBAAA,QACA,aAAA,QAdN,wBACE,MAAA,QACA,iBAAA,QAGE,qDAAA,qDAEE,MAAA,QACA,iBAAA,QAGF,sDACE,MAAA,KACA,iBAAA,QACA,aAAA,QAdN,uBACE,MAAA,QACA,iBAAA,QAGE,oDAAA,oDAEE,MAAA,QACA,iBAAA,QAGF,qDACE,MAAA,KACA,iBAAA,QACA,aAAA,QAdN,sBACE,MAAA,QACA,iBAAA,QAGE,mDAAA,mDAEE,MAAA,QACA,iBAAA,QAGF,oDACE,MAAA,KACA,iBAAA,QACA,aAAA,QCbR,WACE,WAAA,YACA,MAAA,IACA,OAAA,IACA,QAAA,MAAA,MACA,MAAA,KACA,WAAA,YAAA,0TAAA,MAAA,CAAA,IAAA,KAAA,UACA,OAAA,E1COE,cAAA,O0CLF,QAAA,GAGA,iBACE,MAAA,KACA,gBAAA,KACA,QAAA,IAGF,iBACE,QAAA,EACA,WAAA,EAAA,EAAA,EAAA,OAAA,qBACA,QAAA,EAGF,oBAAA,oBAEE,eAAA,KACA,oBAAA,KAAA,iBAAA,KAAA,YAAA,KACA,QAAA,IAIJ,iBACE,OAAA,UAAA,gBAAA,iBCtCF,OACE,MAAA,MACA,UAAA,K5CmSI,UAAA,Q4ChSJ,eAAA,KACA,iBAAA,sBACA,gBAAA,YACA,OAAA,IAAA,MAAA,eACA,WAAA,EAAA,MAAA,KAAA,gB3CUE,cAAA,O2CPF,eACE,QAAA,EAGF,kBACE,QAAA,KAIJ,iBACE,MAAA,oBAAA,MAAA,iBAAA,MAAA,YACA,UAAA,KACA,eAAA,KAEA,mCACE,cAAA,OAIJ,cACE,QAAA,KACA,YAAA,OACA,QAAA,MAAA,OACA,MAAA,QACA,iBAAA,sBACA,gBAAA,YACA,cAAA,IAAA,MAAA,gB3CVE,uBAAA,mBACA,wBAAA,mB2CYF,yBACE,aAAA,SACA,YAAA,OAIJ,YACE,QAAA,OACA,UAAA,WC1CF,OACE,SAAA,MACA,IAAA,EACA,KAAA,EACA,QAAA,KACA,QAAA,KACA,MAAA,KACA,OAAA,KACA,WAAA,OACA,WAAA,KAGA,QAAA,EAOF,cACE,SAAA,SACA,MAAA,KACA,OAAA,MAEA,eAAA,KAGA,0B7BlBI,WAAA,UAAA,IAAA,S6BoBF,UAAA,mB7BhBE,uC6BcJ,0B7BbM,WAAA,M6BiBN,0BACE,UAAA,KAIF,kCACE,UAAA,YAIJ,yBACE,OAAA,kBAEA,wCACE,WAAA,KACA,SAAA,OAGF,qCACE,WAAA,KAIJ,uBACE,QAAA,KACA,YAAA,OACA,WAAA,kBAIF,eACE,SAAA,SACA,QAAA,KACA,eAAA,OACA,MAAA,KAGA,eAAA,KACA,iBAAA,KACA,gBAAA,YACA,OAAA,IAAA,MAAA,e5C3DE,cAAA,M4C+DF,QAAA,EAIF,gBCpFE,SAAA,MACA,IAAA,EACA,KAAA,EACA,QAAA,KACA,MAAA,MACA,OAAA,MACA,iBAAA,KAGA,qBAAS,QAAA,EACT,qBAAS,QAAA,GDgFX,cACE,QAAA,KACA,YAAA,EACA,YAAA,OACA,gBAAA,cACA,QAAA,KAAA,KACA,cAAA,IAAA,MAAA,Q5CtEE,uBAAA,kBACA,wBAAA,kB4CwEF,yBACE,QAAA,MAAA,MACA,OAAA,OAAA,OAAA,OAAA,KAKJ,aACE,cAAA,EACA,YAAA,IAKF,YACE,SAAA,SAGA,KAAA,EAAA,EAAA,KACA,QAAA,KAIF,cACE,QAAA,KACA,UAAA,KACA,YAAA,EACA,YAAA,OACA,gBAAA,SACA,QAAA,OACA,WAAA,IAAA,MAAA,Q5CzFE,2BAAA,kBACA,0BAAA,kB4C8FF,gBACE,OAAA,OrC3EA,yBqCkFF,cACE,UAAA,MACA,OAAA,QAAA,KAGF,yBACE,OAAA,oBAGF,uBACE,WAAA,oBAOF,UAAY,UAAA,OrCnGV,yBqCuGF,U9CywKF,U8CvwKI,UAAA,OrCzGA,0BqC8GF,UAAY,UAAA,QASV,kBACE,MAAA,MACA,UAAA,KACA,OAAA,KACA,OAAA,EAEA,iCACE,OAAA,KACA,OAAA,E5C3KJ,cAAA,E4C+KE,gC5C/KF,cAAA,E4CmLE,8BACE,WAAA,KAGF,gC5CvLF,cAAA,EOyDA,4BqC0GA,0BACE,MAAA,MACA,UAAA,KACA,OAAA,KACA,OAAA,EAEA,yCACE,OAAA,KACA,OAAA,E5C3KJ,cAAA,E4C+KE,wC5C/KF,cAAA,E4CmLE,sCACE,WAAA,KAGF,wC5CvLF,cAAA,GOyDA,4BqC0GA,0BACE,MAAA,MACA,UAAA,KACA,OAAA,KACA,OAAA,EAEA,yCACE,OAAA,KACA,OAAA,E5C3KJ,cAAA,E4C+KE,wC5C/KF,cAAA,E4CmLE,sCACE,WAAA,KAGF,wC5CvLF,cAAA,GOyDA,4BqC0GA,0BACE,MAAA,MACA,UAAA,KACA,OAAA,KACA,OAAA,EAEA,yCACE,OAAA,KACA,OAAA,E5C3KJ,cAAA,E4C+KE,wC5C/KF,cAAA,E4CmLE,sCACE,WAAA,KAGF,wC5CvLF,cAAA,GOyDA,6BqC0GA,0BACE,MAAA,MACA,UAAA,KACA,OAAA,KACA,OAAA,EAEA,yCACE,OAAA,KACA,OAAA,E5C3KJ,cAAA,E4C+KE,wC5C/KF,cAAA,E4CmLE,sCACE,WAAA,KAGF,wC5CvLF,cAAA,GOyDA,6BqC0GA,2BACE,MAAA,MACA,UAAA,KACA,OAAA,KACA,OAAA,EAEA,0CACE,OAAA,KACA,OAAA,E5C3KJ,cAAA,E4C+KE,yC5C/KF,cAAA,E4CmLE,uCACE,WAAA,KAGF,yC5CvLF,cAAA,G8ClBJ,SACE,SAAA,SACA,QAAA,KACA,QAAA,MACA,OAAA,ECJA,YAAA,0BAEA,WAAA,OACA,YAAA,IACA,YAAA,IACA,WAAA,KACA,WAAA,MACA,gBAAA,KACA,YAAA,KACA,eAAA,KACA,eAAA,OACA,WAAA,OACA,aAAA,OACA,YAAA,OACA,WAAA,KhDsRI,UAAA,Q+C1RJ,UAAA,WACA,QAAA,EAEA,cAAS,QAAA,GAET,wBACE,SAAA,SACA,QAAA,MACA,MAAA,MACA,OAAA,MAEA,gCACE,SAAA,SACA,QAAA,GACA,aAAA,YACA,aAAA,MAKN,6CAAA,gBACE,QAAA,MAAA,EAEA,4DAAA,+BACE,OAAA,EAEA,oEAAA,uCACE,IAAA,KACA,aAAA,MAAA,MAAA,EACA,iBAAA,KAKN,+CAAA,gBACE,QAAA,EAAA,MAEA,8DAAA,+BACE,KAAA,EACA,MAAA,MACA,OAAA,MAEA,sEAAA,uCACE,MAAA,KACA,aAAA,MAAA,MAAA,MAAA,EACA,mBAAA,KAKN,gDAAA,mBACE,QAAA,MAAA,EAEA,+DAAA,kCACE,IAAA,EAEA,uEAAA,0CACE,OAAA,KACA,aAAA,EAAA,MAAA,MACA,oBAAA,KAKN,8CAAA,kBACE,QAAA,EAAA,MAEA,6DAAA,iCACE,MAAA,EACA,MAAA,MACA,OAAA,MAEA,qEAAA,yCACE,KAAA,KACA,aAAA,MAAA,EAAA,MAAA,MACA,kBAAA,KAqBN,eACE,UAAA,MACA,QAAA,OAAA,MACA,MAAA,KACA,WAAA,OACA,iBAAA,K9C7FE,cAAA,OgDnBJ,SACE,SAAA,SACA,IAAA,EACA,KAAA,EACA,QAAA,KACA,QAAA,MACA,UAAA,MDLA,YAAA,0BAEA,WAAA,OACA,YAAA,IACA,YAAA,IACA,WAAA,KACA,WAAA,MACA,gBAAA,KACA,YAAA,KACA,eAAA,KACA,eAAA,OACA,WAAA,OACA,aAAA,OACA,YAAA,OACA,WAAA,KhDsRI,UAAA,QiDzRJ,UAAA,WACA,iBAAA,KACA,gBAAA,YACA,OAAA,IAAA,MAAA,ehDIE,cAAA,MgDAF,wBACE,SAAA,SACA,QAAA,MACA,MAAA,KACA,OAAA,MAEA,+BAAA,gCAEE,SAAA,SACA,QAAA,MACA,QAAA,GACA,aAAA,YACA,aAAA,MAMJ,4DAAA,+BACE,OAAA,mBAEA,oEAAA,uCACE,OAAA,EACA,aAAA,MAAA,MAAA,EACA,iBAAA,gBAGF,mEAAA,sCACE,OAAA,IACA,aAAA,MAAA,MAAA,EACA,iBAAA,KAMJ,8DAAA,+BACE,KAAA,mBACA,MAAA,MACA,OAAA,KAEA,sEAAA,uCACE,KAAA,EACA,aAAA,MAAA,MAAA,MAAA,EACA,mBAAA,gBAGF,qEAAA,sCACE,KAAA,IACA,aAAA,MAAA,MAAA,MAAA,EACA,mBAAA,KAMJ,+DAAA,kCACE,IAAA,mBAEA,uEAAA,0CACE,IAAA,EACA,aAAA,EAAA,MAAA,MAAA,MACA,oBAAA,gBAGF,sEAAA,yCACE,IAAA,IACA,aAAA,EAAA,MAAA,MAAA,MACA,oBAAA,KAKJ,wEAAA,2CACE,SAAA,SACA,IAAA,EACA,KAAA,IACA,QAAA,MACA,MAAA,KACA,YAAA,OACA,QAAA,GACA,cAAA,IAAA,MAAA,QAKF,6DAAA,iCACE,MAAA,mBACA,MAAA,MACA,OAAA,KAEA,qEAAA,yCACE,MAAA,EACA,aAAA,MAAA,EAAA,MAAA,MACA,kBAAA,gBAGF,oEAAA,wCACE,MAAA,IACA,aAAA,MAAA,EAAA,MAAA,MACA,kBAAA,KAqBN,gBACE,QAAA,MAAA,KACA,cAAA,EjDuJI,UAAA,KiDpJJ,iBAAA,QACA,cAAA,IAAA,MAAA,ehDtHE,uBAAA,kBACA,wBAAA,kBgDwHF,sBACE,QAAA,KAIJ,cACE,QAAA,KAAA,KACA,MAAA,QC/IF,UACE,SAAA,SAGF,wBACE,aAAA,MAGF,gBACE,SAAA,SACA,MAAA,KACA,SAAA,OCtBA,uBACE,QAAA,MACA,MAAA,KACA,QAAA,GDuBJ,eACE,SAAA,SACA,QAAA,KACA,MAAA,KACA,MAAA,KACA,aAAA,MACA,4BAAA,OAAA,oBAAA,OlClBI,WAAA,UAAA,IAAA,YAIA,uCkCQN,elCPQ,WAAA,MjBgzLR,oBACA,oBmDhyLA,sBAGE,QAAA,MnDmyLF,0BmD/xLA,8CAEE,UAAA,iBnDkyLF,4BmD/xLA,4CAEE,UAAA,kBAWA,8BACE,QAAA,EACA,oBAAA,QACA,UAAA,KnD0xLJ,uDACA,qDmDxxLE,qCAGE,QAAA,EACA,QAAA,EnDyxLJ,yCmDtxLE,2CAEE,QAAA,EACA,QAAA,ElC/DE,WAAA,QAAA,GAAA,IAIA,uCjBq1LN,yCmD7xLE,2ClCvDM,WAAA,MjB01LR,uBmDtxLA,uBAEE,SAAA,SACA,IAAA,EACA,OAAA,EACA,QAAA,EAEA,QAAA,KACA,YAAA,OACA,gBAAA,OACA,MAAA,IACA,QAAA,EACA,MAAA,KACA,WAAA,OACA,WAAA,IACA,OAAA,EACA,QAAA,GlCzFI,WAAA,QAAA,KAAA,KAIA,uCjB82LN,uBmDzyLA,uBlCpEQ,WAAA,MjBm3LR,6BADA,6BmD1xLE,6BAAA,6BAEE,MAAA,KACA,gBAAA,KACA,QAAA,EACA,QAAA,GAGJ,uBACE,KAAA,EAGF,uBACE,MAAA,EnD8xLF,4BmDzxLA,4BAEE,QAAA,aACA,MAAA,KACA,OAAA,KACA,kBAAA,UACA,oBAAA,IACA,gBAAA,KAAA,KAWF,4BACE,iBAAA,wPAEF,4BACE,iBAAA,yPAQF,qBACE,SAAA,SACA,MAAA,EACA,OAAA,EACA,KAAA,EACA,QAAA,EACA,QAAA,KACA,gBAAA,OACA,QAAA,EAEA,aAAA,IACA,cAAA,KACA,YAAA,IACA,WAAA,KAEA,sCACE,WAAA,YACA,KAAA,EAAA,EAAA,KACA,MAAA,KACA,OAAA,IACA,QAAA,EACA,aAAA,IACA,YAAA,IACA,YAAA,OACA,OAAA,QACA,iBAAA,KACA,gBAAA,YACA,OAAA,EAEA,WAAA,KAAA,MAAA,YACA,cAAA,KAAA,MAAA,YACA,QAAA,GlC5KE,WAAA,QAAA,IAAA,KAIA,uCkCwJJ,sClCvJM,WAAA,MkC2KN,6BACE,QAAA,EASJ,kBACE,SAAA,SACA,MAAA,IACA,OAAA,QACA,KAAA,IACA,YAAA,QACA,eAAA,QACA,MAAA,KACA,WAAA,OnDoxLF,2CmD9wLE,2CAEE,OAAA,UAAA,eAGF,qDACE,iBAAA,KAGF,iCACE,MAAA,KE7NJ,kCACE,GAAK,UAAA,gBADP,0BACE,GAAK,UAAA,gBAIP,gBACE,QAAA,aACA,MAAA,KACA,OAAA,KACA,eAAA,QACA,OAAA,MAAA,MAAA,aACA,mBAAA,YAEA,cAAA,IACA,kBAAA,KAAA,OAAA,SAAA,eAAA,UAAA,KAAA,OAAA,SAAA,eAGF,mBACE,MAAA,KACA,OAAA,KACA,aAAA,KAQF,gCACE,GACE,UAAA,SAEF,IACE,QAAA,EACA,UAAA,MANJ,wBACE,GACE,UAAA,SAEF,IACE,QAAA,EACA,UAAA,MAKJ,cACE,QAAA,aACA,MAAA,KACA,OAAA,KACA,eAAA,QACA,iBAAA,aAEA,cAAA,IACA,QAAA,EACA,kBAAA,KAAA,OAAA,SAAA,aAAA,UAAA,KAAA,OAAA,SAAA,aAGF,iBACE,MAAA,KACA,OAAA,KAIA,uCACE,gBrDo/LJ,cqDl/LM,2BAAA,KAAA,mBAAA,MCjEN,WACE,SAAA,MACA,OAAA,EACA,QAAA,KACA,QAAA,KACA,eAAA,OACA,UAAA,KAEA,WAAA,OACA,iBAAA,KACA,gBAAA,YACA,QAAA,ErCKI,WAAA,UAAA,IAAA,YAIA,uCqCpBN,WrCqBQ,WAAA,MqCLR,oBPdE,SAAA,MACA,IAAA,EACA,KAAA,EACA,QAAA,KACA,MAAA,MACA,OAAA,MACA,iBAAA,KAGA,yBAAS,QAAA,EACT,yBAAS,QAAA,GOQX,kBACE,QAAA,KACA,YAAA,OACA,gBAAA,cACA,QAAA,KAAA,KAEA,6BACE,QAAA,MAAA,MACA,WAAA,OACA,aAAA,OACA,cAAA,OAIJ,iBACE,cAAA,EACA,YAAA,IAGF,gBACE,UAAA,EACA,QAAA,KAAA,KACA,WAAA,KAGF,iBACE,IAAA,EACA,KAAA,EACA,MAAA,MACA,aAAA,IAAA,MAAA,eACA,UAAA,kBAGF,eACE,IAAA,EACA,MAAA,EACA,MAAA,MACA,YAAA,IAAA,MAAA,eACA,UAAA,iBAGF,eACE,IAAA,EACA,MAAA,EACA,KAAA,EACA,OAAA,KACA,WAAA,KACA,cAAA,IAAA,MAAA,eACA,UAAA,kBAGF,kBACE,MAAA,EACA,KAAA,EACA,OAAA,KACA,WAAA,KACA,WAAA,IAAA,MAAA,eACA,UAAA,iBAGF,gBACE,UAAA,KCjFF,aACE,QAAA,aACA,WAAA,IACA,eAAA,OACA,OAAA,KACA,iBAAA,aACA,QAAA,GAEA,yBACE,QAAA,aACA,QAAA,GAKJ,gBACE,WAAA,KAGF,gBACE,WAAA,KAGF,gBACE,WAAA,MAKA,+BACE,kBAAA,iBAAA,GAAA,YAAA,SAAA,UAAA,iBAAA,GAAA,YAAA,SAIJ,oCACE,IACE,QAAA,IAFJ,4BACE,IACE,QAAA,IAIJ,kBACE,mBAAA,8DAAA,WAAA,8DACA,kBAAA,KAAA,KAAA,UAAA,KAAA,KACA,kBAAA,iBAAA,GAAA,OAAA,SAAA,UAAA,iBAAA,GAAA,OAAA,SAGF,oCACE,KACE,sBAAA,MAAA,GAAA,cAAA,MAAA,IAFJ,4BACE,KACE,sBAAA,MAAA,GAAA,cAAA,MAAA,IH9CF,iBACE,QAAA,MACA,MAAA,KACA,QAAA,GIJF,cACE,MAAA,QAGE,oBAAA,oBAEE,MAAA,QANN,gBACE,MAAA,QAGE,sBAAA,sBAEE,MAAA,QANN,cACE,MAAA,QAGE,oBAAA,oBAEE,MAAA,QANN,WACE,MAAA,QAGE,iBAAA,iBAEE,MAAA,QANN,cACE,MAAA,QAGE,oBAAA,oBAEE,MAAA,QANN,aACE,MAAA,QAGE,mBAAA,mBAEE,MAAA,QANN,YACE,MAAA,QAGE,kBAAA,kBAEE,MAAA,QANN,WACE,MAAA,QAGE,iBAAA,iBAEE,MAAA,QCLR,OACE,SAAA,SACA,MAAA,KAEA,eACE,QAAA,MACA,YAAA,uBACA,QAAA,GAGF,SACE,SAAA,SACA,IAAA,EACA,KAAA,EACA,MAAA,KACA,OAAA,KAKF,WACE,kBAAA,KADF,WACE,kBAAA,mBADF,YACE,kBAAA,oBADF,YACE,kBAAA,oBCrBJ,WACE,SAAA,MACA,IAAA,EACA,MAAA,EACA,KAAA,EACA,QAAA,KAGF,cACE,SAAA,MACA,MAAA,EACA,OAAA,EACA,KAAA,EACA,QAAA,KAQE,YACE,SAAA,eAAA,SAAA,OACA,IAAA,EACA,QAAA,KjDqCF,yBiDxCA,eACE,SAAA,eAAA,SAAA,OACA,IAAA,EACA,QAAA,MjDqCF,yBiDxCA,eACE,SAAA,eAAA,SAAA,OACA,IAAA,EACA,QAAA,MjDqCF,yBiDxCA,eACE,SAAA,eAAA,SAAA,OACA,IAAA,EACA,QAAA,MjDqCF,0BiDxCA,eACE,SAAA,eAAA,SAAA,OACA,IAAA,EACA,QAAA,MjDqCF,0BiDxCA,gBACE,SAAA,eAAA,SAAA,OACA,IAAA,EACA,QAAA,MCzBN,QACE,QAAA,KACA,eAAA,IACA,YAAA,OACA,WAAA,QAGF,QACE,QAAA,KACA,KAAA,EAAA,EAAA,KACA,eAAA,OACA,WAAA,QCRF,iB5Dk4MA,0D6D93ME,SAAA,mBACA,MAAA,cACA,OAAA,cACA,QAAA,YACA,OAAA,eACA,SAAA,iBACA,KAAA,wBACA,YAAA,iBACA,OAAA,YCXA,uBACE,SAAA,SACA,IAAA,EACA,MAAA,EACA,OAAA,EACA,KAAA,EACA,QAAA,EACA,QAAA,GCRJ,eCAE,SAAA,OACA,cAAA,SACA,YAAA,OCNF,IACE,QAAA,aACA,WAAA,QACA,MAAA,IACA,WAAA,IACA,iBAAA,aACA,QAAA,ICyDM,gBAOI,eAAA,mBAPJ,WAOI,eAAA,cAPJ,cAOI,eAAA,iBAPJ,cAOI,eAAA,iBAPJ,mBAOI,eAAA,sBAPJ,gBAOI,eAAA,mBAPJ,aAOI,MAAA,eAPJ,WAOI,MAAA,gBAPJ,YAOI,MAAA,eAPJ,WAOI,QAAA,YAPJ,YAOI,QAAA,cAPJ,YAOI,QAAA,aAPJ,YAOI,QAAA,cAPJ,aAOI,QAAA,YAPJ,eAOI,SAAA,eAPJ,iBAOI,SAAA,iBAPJ,kBAOI,SAAA,kBAPJ,iBAOI,SAAA,iBAPJ,UAOI,QAAA,iBAPJ,gBAOI,QAAA,uBAPJ,SAOI,QAAA,gBAPJ,QAOI,QAAA,eAPJ,SAOI,QAAA,gBAPJ,aAOI,QAAA,oBAPJ,cAOI,QAAA,qBAPJ,QAOI,QAAA,eAPJ,eAOI,QAAA,sBAPJ,QAOI,QAAA,eAPJ,QAOI,WAAA,EAAA,MAAA,KAAA,0BAPJ,WAOI,WAAA,EAAA,QAAA,OAAA,2BAPJ,WAOI,WAAA,EAAA,KAAA,KAAA,2BAPJ,aAOI,WAAA,eAPJ,iBAOI,SAAA,iBAPJ,mBAOI,SAAA,mBAPJ,mBAOI,SAAA,mBAPJ,gBAOI,SAAA,gBAPJ,iBAOI,SAAA,yBAAA,SAAA,iBAPJ,OAOI,IAAA,YAPJ,QAOI,IAAA,cAPJ,SAOI,IAAA,eAPJ,UAOI,OAAA,YAPJ,WAOI,OAAA,cAPJ,YAOI,OAAA,eAPJ,SAOI,KAAA,YAPJ,UAOI,KAAA,cAPJ,WAOI,KAAA,eAPJ,OAOI,MAAA,YAPJ,QAOI,MAAA,cAPJ,SAOI,MAAA,eAPJ,kBAOI,UAAA,+BAPJ,oBAOI,UAAA,2BAPJ,oBAOI,UAAA,2BAPJ,QAOI,OAAA,IAAA,MAAA,kBAPJ,UAOI,OAAA,YAPJ,YAOI,WAAA,IAAA,MAAA,kBAPJ,cAOI,WAAA,YAPJ,YAOI,aAAA,IAAA,MAAA,kBAPJ,cAOI,aAAA,YAPJ,eAOI,cAAA,IAAA,MAAA,kBAPJ,iBAOI,cAAA,YAPJ,cAOI,YAAA,IAAA,MAAA,kBAPJ,gBAOI,YAAA,YAPJ,gBAOI,aAAA,kBAPJ,kBAOI,aAAA,kBAPJ,gBAOI,aAAA,kBAPJ,aAOI,aAAA,kBAPJ,gBAOI,aAAA,kBAPJ,eAOI,aAAA,kBAPJ,cAOI,aAAA,kBAPJ,aAOI,aAAA,kBAPJ,cAOI,aAAA,eAPJ,UAOI,aAAA,cAPJ,UAOI,aAAA,cAPJ,UAOI,aAAA,cAPJ,UAOI,aAAA,cAPJ,UAOI,aAAA,cAPJ,MAOI,MAAA,cAPJ,MAOI,MAAA,cAPJ,MAOI,MAAA,cAPJ,OAOI,MAAA,eAPJ,QAOI,MAAA,eAPJ,QAOI,UAAA,eAPJ,QAOI,MAAA,gBAPJ,YAOI,UAAA,gBAPJ,MAOI,OAAA,cAPJ,MAOI,OAAA,cAPJ,MAOI,OAAA,cAPJ,OAOI,OAAA,eAPJ,QAOI,OAAA,eAPJ,QAOI,WAAA,eAPJ,QAOI,OAAA,gBAPJ,YAOI,WAAA,gBAPJ,WAOI,KAAA,EAAA,EAAA,eAPJ,UAOI,eAAA,cAPJ,aAOI,eAAA,iBAPJ,kBAOI,eAAA,sBAPJ,qBAOI,eAAA,yBAPJ,aAOI,UAAA,YAPJ,aAOI,UAAA,YAPJ,eAOI,YAAA,YAPJ,eAOI,YAAA,YAPJ,WAOI,UAAA,eAPJ,aAOI,UAAA,iBAPJ,mBAOI,UAAA,uBAPJ,OAOI,IAAA,YAPJ,OAOI,IAAA,iBAPJ,OAOI,IAAA,gBAPJ,OAOI,IAAA,eAPJ,OAOI,IAAA,iBAPJ,OAOI,IAAA,eAPJ,uBAOI,gBAAA,qBAPJ,qBAOI,gBAAA,mBAPJ,wBAOI,gBAAA,iBAPJ,yBAOI,gBAAA,wBAPJ,wBAOI,gBAAA,uBAPJ,wBAOI,gBAAA,uBAPJ,mBAOI,YAAA,qBAPJ,iBAOI,YAAA,mBAPJ,oBAOI,YAAA,iBAPJ,sBAOI,YAAA,mBAPJ,qBAOI,YAAA,kBAPJ,qBAOI,cAAA,qBAPJ,mBAOI,cAAA,mBAPJ,sBAOI,cAAA,iBAPJ,uBAOI,cAAA,wBAPJ,sBAOI,cAAA,uBAPJ,uBAOI,cAAA,kBAPJ,iBAOI,WAAA,eAPJ,kBAOI,WAAA,qBAPJ,gBAOI,WAAA,mBAPJ,mBAOI,WAAA,iBAPJ,qBAOI,WAAA,mBAPJ,oBAOI,WAAA,kBAPJ,aAOI,MAAA,aAPJ,SAOI,MAAA,YAPJ,SAOI,MAAA,YAPJ,SAOI,MAAA,YAPJ,SAOI,MAAA,YAPJ,SAOI,MAAA,YAPJ,SAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,KAOI,OAAA,YAPJ,KAOI,OAAA,iBAPJ,KAOI,OAAA,gBAPJ,KAOI,OAAA,eAPJ,KAOI,OAAA,iBAPJ,KAOI,OAAA,eAPJ,QAOI,OAAA,eAPJ,MAOI,aAAA,YAAA,YAAA,YAPJ,MAOI,aAAA,iBAAA,YAAA,iBAPJ,MAOI,aAAA,gBAAA,YAAA,gBAPJ,MAOI,aAAA,eAAA,YAAA,eAPJ,MAOI,aAAA,iBAAA,YAAA,iBAPJ,MAOI,aAAA,eAAA,YAAA,eAPJ,SAOI,aAAA,eAAA,YAAA,eAPJ,MAOI,WAAA,YAAA,cAAA,YAPJ,MAOI,WAAA,iBAAA,cAAA,iBAPJ,MAOI,WAAA,gBAAA,cAAA,gBAPJ,MAOI,WAAA,eAAA,cAAA,eAPJ,MAOI,WAAA,iBAAA,cAAA,iBAPJ,MAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,MAOI,WAAA,YAPJ,MAOI,WAAA,iBAPJ,MAOI,WAAA,gBAPJ,MAOI,WAAA,eAPJ,MAOI,WAAA,iBAPJ,MAOI,WAAA,eAPJ,SAOI,WAAA,eAPJ,MAOI,aAAA,YAPJ,MAOI,aAAA,iBAPJ,MAOI,aAAA,gBAPJ,MAOI,aAAA,eAPJ,MAOI,aAAA,iBAPJ,MAOI,aAAA,eAPJ,SAOI,aAAA,eAPJ,MAOI,cAAA,YAPJ,MAOI,cAAA,iBAPJ,MAOI,cAAA,gBAPJ,MAOI,cAAA,eAPJ,MAOI,cAAA,iBAPJ,MAOI,cAAA,eAPJ,SAOI,cAAA,eAPJ,MAOI,YAAA,YAPJ,MAOI,YAAA,iBAPJ,MAOI,YAAA,gBAPJ,MAOI,YAAA,eAPJ,MAOI,YAAA,iBAPJ,MAOI,YAAA,eAPJ,SAOI,YAAA,eAPJ,KAOI,QAAA,YAPJ,KAOI,QAAA,iBAPJ,KAOI,QAAA,gBAPJ,KAOI,QAAA,eAPJ,KAOI,QAAA,iBAPJ,KAOI,QAAA,eAPJ,MAOI,cAAA,YAAA,aAAA,YAPJ,MAOI,cAAA,iBAAA,aAAA,iBAPJ,MAOI,cAAA,gBAAA,aAAA,gBAPJ,MAOI,cAAA,eAAA,aAAA,eAPJ,MAOI,cAAA,iBAAA,aAAA,iBAPJ,MAOI,cAAA,eAAA,aAAA,eAPJ,MAOI,YAAA,YAAA,eAAA,YAPJ,MAOI,YAAA,iBAAA,eAAA,iBAPJ,MAOI,YAAA,gBAAA,eAAA,gBAPJ,MAOI,YAAA,eAAA,eAAA,eAPJ,MAOI,YAAA,iBAAA,eAAA,iBAPJ,MAOI,YAAA,eAAA,eAAA,eAPJ,MAOI,YAAA,YAPJ,MAOI,YAAA,iBAPJ,MAOI,YAAA,gBAPJ,MAOI,YAAA,eAPJ,MAOI,YAAA,iBAPJ,MAOI,YAAA,eAPJ,MAOI,cAAA,YAPJ,MAOI,cAAA,iBAPJ,MAOI,cAAA,gBAPJ,MAOI,cAAA,eAPJ,MAOI,cAAA,iBAPJ,MAOI,cAAA,eAPJ,MAOI,eAAA,YAPJ,MAOI,eAAA,iBAPJ,MAOI,eAAA,gBAPJ,MAOI,eAAA,eAPJ,MAOI,eAAA,iBAPJ,MAOI,eAAA,eAPJ,MAOI,aAAA,YAPJ,MAOI,aAAA,iBAPJ,MAOI,aAAA,gBAPJ,MAOI,aAAA,eAPJ,MAOI,aAAA,iBAPJ,MAOI,aAAA,eAPJ,gBAOI,YAAA,mCAPJ,MAOI,UAAA,iCAPJ,MAOI,UAAA,gCAPJ,MAOI,UAAA,8BAPJ,MAOI,UAAA,gCAPJ,MAOI,UAAA,kBAPJ,MAOI,UAAA,eAPJ,YAOI,WAAA,iBAPJ,YAOI,WAAA,iBAPJ,UAOI,YAAA,cAPJ,YAOI,YAAA,kBAPJ,WAOI,YAAA,cAPJ,SAOI,YAAA,cAPJ,WAOI,YAAA,iBAPJ,MAOI,YAAA,YAPJ,OAOI,YAAA,eAPJ,SAOI,YAAA,cAPJ,OAOI,YAAA,YAPJ,YAOI,WAAA,eAPJ,UAOI,WAAA,gBAPJ,aAOI,WAAA,iBAPJ,sBAOI,gBAAA,eAPJ,2BAOI,gBAAA,oBAPJ,8BAOI,gBAAA,uBAPJ,gBAOI,eAAA,oBAPJ,gBAOI,eAAA,oBAPJ,iBAOI,eAAA,qBAPJ,WAOI,YAAA,iBAPJ,aAOI,YAAA,iBAPJ,YAOI,UAAA,qBAAA,WAAA,qBAPJ,cAIQ,kBAAA,EAGJ,MAAA,6DAPJ,gBAIQ,kBAAA,EAGJ,MAAA,+DAPJ,cAIQ,kBAAA,EAGJ,MAAA,6DAPJ,WAIQ,kBAAA,EAGJ,MAAA,0DAPJ,cAIQ,kBAAA,EAGJ,MAAA,6DAPJ,aAIQ,kBAAA,EAGJ,MAAA,4DAPJ,YAIQ,kBAAA,EAGJ,MAAA,2DAPJ,WAIQ,kBAAA,EAGJ,MAAA,0DAPJ,YAIQ,kBAAA,EAGJ,MAAA,2DAPJ,YAIQ,kBAAA,EAGJ,MAAA,2DAPJ,WAIQ,kBAAA,EAGJ,MAAA,0DAPJ,YAIQ,kBAAA,EAGJ,MAAA,kBAPJ,eAIQ,kBAAA,EAGJ,MAAA,yBAPJ,eAIQ,kBAAA,EAGJ,MAAA,+BAPJ,YAIQ,kBAAA,EAGJ,MAAA,kBAjBJ,iBACE,kBAAA,KADF,iBACE,kBAAA,IADF,iBACE,kBAAA,KADF,kBACE,kBAAA,EASF,YAIQ,gBAAA,EAGJ,iBAAA,2DAPJ,cAIQ,gBAAA,EAGJ,iBAAA,6DAPJ,YAIQ,gBAAA,EAGJ,iBAAA,2DAPJ,SAIQ,gBAAA,EAGJ,iBAAA,wDAPJ,YAIQ,gBAAA,EAGJ,iBAAA,2DAPJ,WAIQ,gBAAA,EAGJ,iBAAA,0DAPJ,UAIQ,gBAAA,EAGJ,iBAAA,yDAPJ,SAIQ,gBAAA,EAGJ,iBAAA,wDAPJ,UAIQ,gBAAA,EAGJ,iBAAA,yDAPJ,UAIQ,gBAAA,EAGJ,iBAAA,yDAPJ,SAIQ,gBAAA,EAGJ,iBAAA,wDAPJ,gBAIQ,gBAAA,EAGJ,iBAAA,sBAjBJ,eACE,gBAAA,IADF,eACE,gBAAA,KADF,eACE,gBAAA,IADF,eACE,gBAAA,KADF,gBACE,gBAAA,EASF,aAOI,iBAAA,6BAPJ,iBAOI,oBAAA,cAAA,iBAAA,cAAA,YAAA,cAPJ,kBAOI,oBAAA,eAAA,iBAAA,eAAA,YAAA,eAPJ,kBAOI,oBAAA,eAAA,iBAAA,eAAA,YAAA,eAPJ,SAOI,eAAA,eAPJ,SAOI,eAAA,eAPJ,SAOI,cAAA,iBAPJ,WAOI,cAAA,YAPJ,WAOI,cAAA,gBAPJ,WAOI,cAAA,iBAPJ,WAOI,cAAA,gBAPJ,gBAOI,cAAA,cAPJ,cAOI,cAAA,gBAPJ,aAOI,uBAAA,iBAAA,wBAAA,iBAPJ,aAOI,wBAAA,iBAAA,2BAAA,iBAPJ,gBAOI,2BAAA,iBAAA,0BAAA,iBAPJ,eAOI,0BAAA,iBAAA,uBAAA,iBAPJ,SAOI,WAAA,kBAPJ,WAOI,WAAA,iBzDPR,yByDAI,gBAOI,MAAA,eAPJ,cAOI,MAAA,gBAPJ,eAOI,MAAA,eAPJ,aAOI,QAAA,iBAPJ,mBAOI,QAAA,uBAPJ,YAOI,QAAA,gBAPJ,WAOI,QAAA,eAPJ,YAOI,QAAA,gBAPJ,gBAOI,QAAA,oBAPJ,iBAOI,QAAA,qBAPJ,WAOI,QAAA,eAPJ,kBAOI,QAAA,sBAPJ,WAOI,QAAA,eAPJ,cAOI,KAAA,EAAA,EAAA,eAPJ,aAOI,eAAA,cAPJ,gBAOI,eAAA,iBAPJ,qBAOI,eAAA,sBAPJ,wBAOI,eAAA,yBAPJ,gBAOI,UAAA,YAPJ,gBAOI,UAAA,YAPJ,kBAOI,YAAA,YAPJ,kBAOI,YAAA,YAPJ,cAOI,UAAA,eAPJ,gBAOI,UAAA,iBAPJ,sBAOI,UAAA,uBAPJ,UAOI,IAAA,YAPJ,UAOI,IAAA,iBAPJ,UAOI,IAAA,gBAPJ,UAOI,IAAA,eAPJ,UAOI,IAAA,iBAPJ,UAOI,IAAA,eAPJ,0BAOI,gBAAA,qBAPJ,wBAOI,gBAAA,mBAPJ,2BAOI,gBAAA,iBAPJ,4BAOI,gBAAA,wBAPJ,2BAOI,gBAAA,uBAPJ,2BAOI,gBAAA,uBAPJ,sBAOI,YAAA,qBAPJ,oBAOI,YAAA,mBAPJ,uBAOI,YAAA,iBAPJ,yBAOI,YAAA,mBAPJ,wBAOI,YAAA,kBAPJ,wBAOI,cAAA,qBAPJ,sBAOI,cAAA,mBAPJ,yBAOI,cAAA,iBAPJ,0BAOI,cAAA,wBAPJ,yBAOI,cAAA,uBAPJ,0BAOI,cAAA,kBAPJ,oBAOI,WAAA,eAPJ,qBAOI,WAAA,qBAPJ,mBAOI,WAAA,mBAPJ,sBAOI,WAAA,iBAPJ,wBAOI,WAAA,mBAPJ,uBAOI,WAAA,kBAPJ,gBAOI,MAAA,aAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,eAOI,MAAA,YAPJ,QAOI,OAAA,YAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,gBAPJ,QAOI,OAAA,eAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,eAPJ,WAOI,OAAA,eAPJ,SAOI,aAAA,YAAA,YAAA,YAPJ,SAOI,aAAA,iBAAA,YAAA,iBAPJ,SAOI,aAAA,gBAAA,YAAA,gBAPJ,SAOI,aAAA,eAAA,YAAA,eAPJ,SAOI,aAAA,iBAAA,YAAA,iBAPJ,SAOI,aAAA,eAAA,YAAA,eAPJ,YAOI,aAAA,eAAA,YAAA,eAPJ,SAOI,WAAA,YAAA,cAAA,YAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,gBAAA,cAAA,gBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,YAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,YAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,gBAPJ,SAOI,WAAA,eAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,eAPJ,YAOI,WAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,YAOI,aAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,YAOI,cAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,YAOI,YAAA,eAPJ,QAOI,QAAA,YAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,gBAPJ,QAOI,QAAA,eAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,eAPJ,SAOI,cAAA,YAAA,aAAA,YAPJ,SAOI,cAAA,iBAAA,aAAA,iBAPJ,SAOI,cAAA,gBAAA,aAAA,gBAPJ,SAOI,cAAA,eAAA,aAAA,eAPJ,SAOI,cAAA,iBAAA,aAAA,iBAPJ,SAOI,cAAA,eAAA,aAAA,eAPJ,SAOI,YAAA,YAAA,eAAA,YAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,gBAAA,eAAA,gBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,SAOI,eAAA,YAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,gBAPJ,SAOI,eAAA,eAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,eAOI,WAAA,eAPJ,aAOI,WAAA,gBAPJ,gBAOI,WAAA,kBzDPR,yByDAI,gBAOI,MAAA,eAPJ,cAOI,MAAA,gBAPJ,eAOI,MAAA,eAPJ,aAOI,QAAA,iBAPJ,mBAOI,QAAA,uBAPJ,YAOI,QAAA,gBAPJ,WAOI,QAAA,eAPJ,YAOI,QAAA,gBAPJ,gBAOI,QAAA,oBAPJ,iBAOI,QAAA,qBAPJ,WAOI,QAAA,eAPJ,kBAOI,QAAA,sBAPJ,WAOI,QAAA,eAPJ,cAOI,KAAA,EAAA,EAAA,eAPJ,aAOI,eAAA,cAPJ,gBAOI,eAAA,iBAPJ,qBAOI,eAAA,sBAPJ,wBAOI,eAAA,yBAPJ,gBAOI,UAAA,YAPJ,gBAOI,UAAA,YAPJ,kBAOI,YAAA,YAPJ,kBAOI,YAAA,YAPJ,cAOI,UAAA,eAPJ,gBAOI,UAAA,iBAPJ,sBAOI,UAAA,uBAPJ,UAOI,IAAA,YAPJ,UAOI,IAAA,iBAPJ,UAOI,IAAA,gBAPJ,UAOI,IAAA,eAPJ,UAOI,IAAA,iBAPJ,UAOI,IAAA,eAPJ,0BAOI,gBAAA,qBAPJ,wBAOI,gBAAA,mBAPJ,2BAOI,gBAAA,iBAPJ,4BAOI,gBAAA,wBAPJ,2BAOI,gBAAA,uBAPJ,2BAOI,gBAAA,uBAPJ,sBAOI,YAAA,qBAPJ,oBAOI,YAAA,mBAPJ,uBAOI,YAAA,iBAPJ,yBAOI,YAAA,mBAPJ,wBAOI,YAAA,kBAPJ,wBAOI,cAAA,qBAPJ,sBAOI,cAAA,mBAPJ,yBAOI,cAAA,iBAPJ,0BAOI,cAAA,wBAPJ,yBAOI,cAAA,uBAPJ,0BAOI,cAAA,kBAPJ,oBAOI,WAAA,eAPJ,qBAOI,WAAA,qBAPJ,mBAOI,WAAA,mBAPJ,sBAOI,WAAA,iBAPJ,wBAOI,WAAA,mBAPJ,uBAOI,WAAA,kBAPJ,gBAOI,MAAA,aAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,eAOI,MAAA,YAPJ,QAOI,OAAA,YAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,gBAPJ,QAOI,OAAA,eAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,eAPJ,WAOI,OAAA,eAPJ,SAOI,aAAA,YAAA,YAAA,YAPJ,SAOI,aAAA,iBAAA,YAAA,iBAPJ,SAOI,aAAA,gBAAA,YAAA,gBAPJ,SAOI,aAAA,eAAA,YAAA,eAPJ,SAOI,aAAA,iBAAA,YAAA,iBAPJ,SAOI,aAAA,eAAA,YAAA,eAPJ,YAOI,aAAA,eAAA,YAAA,eAPJ,SAOI,WAAA,YAAA,cAAA,YAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,gBAAA,cAAA,gBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,YAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,YAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,gBAPJ,SAOI,WAAA,eAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,eAPJ,YAOI,WAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,YAOI,aAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,YAOI,cAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,YAOI,YAAA,eAPJ,QAOI,QAAA,YAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,gBAPJ,QAOI,QAAA,eAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,eAPJ,SAOI,cAAA,YAAA,aAAA,YAPJ,SAOI,cAAA,iBAAA,aAAA,iBAPJ,SAOI,cAAA,gBAAA,aAAA,gBAPJ,SAOI,cAAA,eAAA,aAAA,eAPJ,SAOI,cAAA,iBAAA,aAAA,iBAPJ,SAOI,cAAA,eAAA,aAAA,eAPJ,SAOI,YAAA,YAAA,eAAA,YAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,gBAAA,eAAA,gBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,SAOI,eAAA,YAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,gBAPJ,SAOI,eAAA,eAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,eAOI,WAAA,eAPJ,aAOI,WAAA,gBAPJ,gBAOI,WAAA,kBzDPR,yByDAI,gBAOI,MAAA,eAPJ,cAOI,MAAA,gBAPJ,eAOI,MAAA,eAPJ,aAOI,QAAA,iBAPJ,mBAOI,QAAA,uBAPJ,YAOI,QAAA,gBAPJ,WAOI,QAAA,eAPJ,YAOI,QAAA,gBAPJ,gBAOI,QAAA,oBAPJ,iBAOI,QAAA,qBAPJ,WAOI,QAAA,eAPJ,kBAOI,QAAA,sBAPJ,WAOI,QAAA,eAPJ,cAOI,KAAA,EAAA,EAAA,eAPJ,aAOI,eAAA,cAPJ,gBAOI,eAAA,iBAPJ,qBAOI,eAAA,sBAPJ,wBAOI,eAAA,yBAPJ,gBAOI,UAAA,YAPJ,gBAOI,UAAA,YAPJ,kBAOI,YAAA,YAPJ,kBAOI,YAAA,YAPJ,cAOI,UAAA,eAPJ,gBAOI,UAAA,iBAPJ,sBAOI,UAAA,uBAPJ,UAOI,IAAA,YAPJ,UAOI,IAAA,iBAPJ,UAOI,IAAA,gBAPJ,UAOI,IAAA,eAPJ,UAOI,IAAA,iBAPJ,UAOI,IAAA,eAPJ,0BAOI,gBAAA,qBAPJ,wBAOI,gBAAA,mBAPJ,2BAOI,gBAAA,iBAPJ,4BAOI,gBAAA,wBAPJ,2BAOI,gBAAA,uBAPJ,2BAOI,gBAAA,uBAPJ,sBAOI,YAAA,qBAPJ,oBAOI,YAAA,mBAPJ,uBAOI,YAAA,iBAPJ,yBAOI,YAAA,mBAPJ,wBAOI,YAAA,kBAPJ,wBAOI,cAAA,qBAPJ,sBAOI,cAAA,mBAPJ,yBAOI,cAAA,iBAPJ,0BAOI,cAAA,wBAPJ,yBAOI,cAAA,uBAPJ,0BAOI,cAAA,kBAPJ,oBAOI,WAAA,eAPJ,qBAOI,WAAA,qBAPJ,mBAOI,WAAA,mBAPJ,sBAOI,WAAA,iBAPJ,wBAOI,WAAA,mBAPJ,uBAOI,WAAA,kBAPJ,gBAOI,MAAA,aAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,eAOI,MAAA,YAPJ,QAOI,OAAA,YAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,gBAPJ,QAOI,OAAA,eAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,eAPJ,WAOI,OAAA,eAPJ,SAOI,aAAA,YAAA,YAAA,YAPJ,SAOI,aAAA,iBAAA,YAAA,iBAPJ,SAOI,aAAA,gBAAA,YAAA,gBAPJ,SAOI,aAAA,eAAA,YAAA,eAPJ,SAOI,aAAA,iBAAA,YAAA,iBAPJ,SAOI,aAAA,eAAA,YAAA,eAPJ,YAOI,aAAA,eAAA,YAAA,eAPJ,SAOI,WAAA,YAAA,cAAA,YAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,gBAAA,cAAA,gBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,YAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,YAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,gBAPJ,SAOI,WAAA,eAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,eAPJ,YAOI,WAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,YAOI,aAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,YAOI,cAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,YAOI,YAAA,eAPJ,QAOI,QAAA,YAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,gBAPJ,QAOI,QAAA,eAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,eAPJ,SAOI,cAAA,YAAA,aAAA,YAPJ,SAOI,cAAA,iBAAA,aAAA,iBAPJ,SAOI,cAAA,gBAAA,aAAA,gBAPJ,SAOI,cAAA,eAAA,aAAA,eAPJ,SAOI,cAAA,iBAAA,aAAA,iBAPJ,SAOI,cAAA,eAAA,aAAA,eAPJ,SAOI,YAAA,YAAA,eAAA,YAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,gBAAA,eAAA,gBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,SAOI,eAAA,YAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,gBAPJ,SAOI,eAAA,eAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,eAOI,WAAA,eAPJ,aAOI,WAAA,gBAPJ,gBAOI,WAAA,kBzDPR,0ByDAI,gBAOI,MAAA,eAPJ,cAOI,MAAA,gBAPJ,eAOI,MAAA,eAPJ,aAOI,QAAA,iBAPJ,mBAOI,QAAA,uBAPJ,YAOI,QAAA,gBAPJ,WAOI,QAAA,eAPJ,YAOI,QAAA,gBAPJ,gBAOI,QAAA,oBAPJ,iBAOI,QAAA,qBAPJ,WAOI,QAAA,eAPJ,kBAOI,QAAA,sBAPJ,WAOI,QAAA,eAPJ,cAOI,KAAA,EAAA,EAAA,eAPJ,aAOI,eAAA,cAPJ,gBAOI,eAAA,iBAPJ,qBAOI,eAAA,sBAPJ,wBAOI,eAAA,yBAPJ,gBAOI,UAAA,YAPJ,gBAOI,UAAA,YAPJ,kBAOI,YAAA,YAPJ,kBAOI,YAAA,YAPJ,cAOI,UAAA,eAPJ,gBAOI,UAAA,iBAPJ,sBAOI,UAAA,uBAPJ,UAOI,IAAA,YAPJ,UAOI,IAAA,iBAPJ,UAOI,IAAA,gBAPJ,UAOI,IAAA,eAPJ,UAOI,IAAA,iBAPJ,UAOI,IAAA,eAPJ,0BAOI,gBAAA,qBAPJ,wBAOI,gBAAA,mBAPJ,2BAOI,gBAAA,iBAPJ,4BAOI,gBAAA,wBAPJ,2BAOI,gBAAA,uBAPJ,2BAOI,gBAAA,uBAPJ,sBAOI,YAAA,qBAPJ,oBAOI,YAAA,mBAPJ,uBAOI,YAAA,iBAPJ,yBAOI,YAAA,mBAPJ,wBAOI,YAAA,kBAPJ,wBAOI,cAAA,qBAPJ,sBAOI,cAAA,mBAPJ,yBAOI,cAAA,iBAPJ,0BAOI,cAAA,wBAPJ,yBAOI,cAAA,uBAPJ,0BAOI,cAAA,kBAPJ,oBAOI,WAAA,eAPJ,qBAOI,WAAA,qBAPJ,mBAOI,WAAA,mBAPJ,sBAOI,WAAA,iBAPJ,wBAOI,WAAA,mBAPJ,uBAOI,WAAA,kBAPJ,gBAOI,MAAA,aAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,eAOI,MAAA,YAPJ,QAOI,OAAA,YAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,gBAPJ,QAOI,OAAA,eAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,eAPJ,WAOI,OAAA,eAPJ,SAOI,aAAA,YAAA,YAAA,YAPJ,SAOI,aAAA,iBAAA,YAAA,iBAPJ,SAOI,aAAA,gBAAA,YAAA,gBAPJ,SAOI,aAAA,eAAA,YAAA,eAPJ,SAOI,aAAA,iBAAA,YAAA,iBAPJ,SAOI,aAAA,eAAA,YAAA,eAPJ,YAOI,aAAA,eAAA,YAAA,eAPJ,SAOI,WAAA,YAAA,cAAA,YAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,gBAAA,cAAA,gBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,YAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,YAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,gBAPJ,SAOI,WAAA,eAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,eAPJ,YAOI,WAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,YAOI,aAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,YAOI,cAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,YAOI,YAAA,eAPJ,QAOI,QAAA,YAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,gBAPJ,QAOI,QAAA,eAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,eAPJ,SAOI,cAAA,YAAA,aAAA,YAPJ,SAOI,cAAA,iBAAA,aAAA,iBAPJ,SAOI,cAAA,gBAAA,aAAA,gBAPJ,SAOI,cAAA,eAAA,aAAA,eAPJ,SAOI,cAAA,iBAAA,aAAA,iBAPJ,SAOI,cAAA,eAAA,aAAA,eAPJ,SAOI,YAAA,YAAA,eAAA,YAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,gBAAA,eAAA,gBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,SAOI,eAAA,YAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,gBAPJ,SAOI,eAAA,eAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,eAOI,WAAA,eAPJ,aAOI,WAAA,gBAPJ,gBAOI,WAAA,kBzDPR,0ByDAI,iBAOI,MAAA,eAPJ,eAOI,MAAA,gBAPJ,gBAOI,MAAA,eAPJ,cAOI,QAAA,iBAPJ,oBAOI,QAAA,uBAPJ,aAOI,QAAA,gBAPJ,YAOI,QAAA,eAPJ,aAOI,QAAA,gBAPJ,iBAOI,QAAA,oBAPJ,kBAOI,QAAA,qBAPJ,YAOI,QAAA,eAPJ,mBAOI,QAAA,sBAPJ,YAOI,QAAA,eAPJ,eAOI,KAAA,EAAA,EAAA,eAPJ,cAOI,eAAA,cAPJ,iBAOI,eAAA,iBAPJ,sBAOI,eAAA,sBAPJ,yBAOI,eAAA,yBAPJ,iBAOI,UAAA,YAPJ,iBAOI,UAAA,YAPJ,mBAOI,YAAA,YAPJ,mBAOI,YAAA,YAPJ,eAOI,UAAA,eAPJ,iBAOI,UAAA,iBAPJ,uBAOI,UAAA,uBAPJ,WAOI,IAAA,YAPJ,WAOI,IAAA,iBAPJ,WAOI,IAAA,gBAPJ,WAOI,IAAA,eAPJ,WAOI,IAAA,iBAPJ,WAOI,IAAA,eAPJ,2BAOI,gBAAA,qBAPJ,yBAOI,gBAAA,mBAPJ,4BAOI,gBAAA,iBAPJ,6BAOI,gBAAA,wBAPJ,4BAOI,gBAAA,uBAPJ,4BAOI,gBAAA,uBAPJ,uBAOI,YAAA,qBAPJ,qBAOI,YAAA,mBAPJ,wBAOI,YAAA,iBAPJ,0BAOI,YAAA,mBAPJ,yBAOI,YAAA,kBAPJ,yBAOI,cAAA,qBAPJ,uBAOI,cAAA,mBAPJ,0BAOI,cAAA,iBAPJ,2BAOI,cAAA,wBAPJ,0BAOI,cAAA,uBAPJ,2BAOI,cAAA,kBAPJ,qBAOI,WAAA,eAPJ,sBAOI,WAAA,qBAPJ,oBAOI,WAAA,mBAPJ,uBAOI,WAAA,iBAPJ,yBAOI,WAAA,mBAPJ,wBAOI,WAAA,kBAPJ,iBAOI,MAAA,aAPJ,aAOI,MAAA,YAPJ,aAOI,MAAA,YAPJ,aAOI,MAAA,YAPJ,aAOI,MAAA,YAPJ,aAOI,MAAA,YAPJ,aAOI,MAAA,YAPJ,gBAOI,MAAA,YAPJ,SAOI,OAAA,YAPJ,SAOI,OAAA,iBAPJ,SAOI,OAAA,gBAPJ,SAOI,OAAA,eAPJ,SAOI,OAAA,iBAPJ,SAOI,OAAA,eAPJ,YAOI,OAAA,eAPJ,UAOI,aAAA,YAAA,YAAA,YAPJ,UAOI,aAAA,iBAAA,YAAA,iBAPJ,UAOI,aAAA,gBAAA,YAAA,gBAPJ,UAOI,aAAA,eAAA,YAAA,eAPJ,UAOI,aAAA,iBAAA,YAAA,iBAPJ,UAOI,aAAA,eAAA,YAAA,eAPJ,aAOI,aAAA,eAAA,YAAA,eAPJ,UAOI,WAAA,YAAA,cAAA,YAPJ,UAOI,WAAA,iBAAA,cAAA,iBAPJ,UAOI,WAAA,gBAAA,cAAA,gBAPJ,UAOI,WAAA,eAAA,cAAA,eAPJ,UAOI,WAAA,iBAAA,cAAA,iBAPJ,UAOI,WAAA,eAAA,cAAA,eAPJ,aAOI,WAAA,eAAA,cAAA,eAPJ,UAOI,WAAA,YAPJ,UAOI,WAAA,iBAPJ,UAOI,WAAA,gBAPJ,UAOI,WAAA,eAPJ,UAOI,WAAA,iBAPJ,UAOI,WAAA,eAPJ,aAOI,WAAA,eAPJ,UAOI,aAAA,YAPJ,UAOI,aAAA,iBAPJ,UAOI,aAAA,gBAPJ,UAOI,aAAA,eAPJ,UAOI,aAAA,iBAPJ,UAOI,aAAA,eAPJ,aAOI,aAAA,eAPJ,UAOI,cAAA,YAPJ,UAOI,cAAA,iBAPJ,UAOI,cAAA,gBAPJ,UAOI,cAAA,eAPJ,UAOI,cAAA,iBAPJ,UAOI,cAAA,eAPJ,aAOI,cAAA,eAPJ,UAOI,YAAA,YAPJ,UAOI,YAAA,iBAPJ,UAOI,YAAA,gBAPJ,UAOI,YAAA,eAPJ,UAOI,YAAA,iBAPJ,UAOI,YAAA,eAPJ,aAOI,YAAA,eAPJ,SAOI,QAAA,YAPJ,SAOI,QAAA,iBAPJ,SAOI,QAAA,gBAPJ,SAOI,QAAA,eAPJ,SAOI,QAAA,iBAPJ,SAOI,QAAA,eAPJ,UAOI,cAAA,YAAA,aAAA,YAPJ,UAOI,cAAA,iBAAA,aAAA,iBAPJ,UAOI,cAAA,gBAAA,aAAA,gBAPJ,UAOI,cAAA,eAAA,aAAA,eAPJ,UAOI,cAAA,iBAAA,aAAA,iBAPJ,UAOI,cAAA,eAAA,aAAA,eAPJ,UAOI,YAAA,YAAA,eAAA,YAPJ,UAOI,YAAA,iBAAA,eAAA,iBAPJ,UAOI,YAAA,gBAAA,eAAA,gBAPJ,UAOI,YAAA,eAAA,eAAA,eAPJ,UAOI,YAAA,iBAAA,eAAA,iBAPJ,UAOI,YAAA,eAAA,eAAA,eAPJ,UAOI,YAAA,YAPJ,UAOI,YAAA,iBAPJ,UAOI,YAAA,gBAPJ,UAOI,YAAA,eAPJ,UAOI,YAAA,iBAPJ,UAOI,YAAA,eAPJ,UAOI,cAAA,YAPJ,UAOI,cAAA,iBAPJ,UAOI,cAAA,gBAPJ,UAOI,cAAA,eAPJ,UAOI,cAAA,iBAPJ,UAOI,cAAA,eAPJ,UAOI,eAAA,YAPJ,UAOI,eAAA,iBAPJ,UAOI,eAAA,gBAPJ,UAOI,eAAA,eAPJ,UAOI,eAAA,iBAPJ,UAOI,eAAA,eAPJ,UAOI,aAAA,YAPJ,UAOI,aAAA,iBAPJ,UAOI,aAAA,gBAPJ,UAOI,aAAA,eAPJ,UAOI,aAAA,iBAPJ,UAOI,aAAA,eAPJ,gBAOI,WAAA,eAPJ,cAOI,WAAA,gBAPJ,iBAOI,WAAA,kBCnDZ,0BD4CQ,MAOI,UAAA,iBAPJ,MAOI,UAAA,eAPJ,MAOI,UAAA,kBAPJ,MAOI,UAAA,kBChCZ,aDyBQ,gBAOI,QAAA,iBAPJ,sBAOI,QAAA,uBAPJ,eAOI,QAAA,gBAPJ,cAOI,QAAA,eAPJ,eAOI,QAAA,gBAPJ,mBAOI,QAAA,oBAPJ,oBAOI,QAAA,qBAPJ,cAOI,QAAA,eAPJ,qBAOI,QAAA,sBAPJ,cAOI,QAAA","sourcesContent":["/*!\n * Bootstrap v5.1.0 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n\n// scss-docs-start import-stack\n// Configuration\n@import \"functions\";\n@import \"variables\";\n@import \"mixins\";\n@import \"utilities\";\n\n// Layout & components\n@import \"root\";\n@import \"reboot\";\n@import \"type\";\n@import \"images\";\n@import \"containers\";\n@import \"grid\";\n@import \"tables\";\n@import \"forms\";\n@import \"buttons\";\n@import \"transitions\";\n@import \"dropdown\";\n@import \"button-group\";\n@import \"nav\";\n@import \"navbar\";\n@import \"card\";\n@import \"accordion\";\n@import \"breadcrumb\";\n@import \"pagination\";\n@import \"badge\";\n@import \"alert\";\n@import \"progress\";\n@import \"list-group\";\n@import \"close\";\n@import \"toasts\";\n@import \"modal\";\n@import \"tooltip\";\n@import \"popover\";\n@import \"carousel\";\n@import \"spinners\";\n@import \"offcanvas\";\n@import \"placeholders\";\n\n// Helpers\n@import \"helpers\";\n\n// Utilities\n@import \"utilities/api\";\n// scss-docs-end import-stack\n",":root {\n // Note: Custom variable values only support SassScript inside `#{}`.\n\n // Colors\n //\n // Generate palettes for full colors, grays, and theme colors.\n\n @each $color, $value in $colors {\n --#{$variable-prefix}#{$color}: #{$value};\n }\n\n @each $color, $value in $grays {\n --#{$variable-prefix}gray-#{$color}: #{$value};\n }\n\n @each $color, $value in $theme-colors {\n --#{$variable-prefix}#{$color}: #{$value};\n }\n\n @each $color, $value in $theme-colors-rgb {\n --#{$variable-prefix}#{$color}-rgb: #{$value};\n }\n\n --#{$variable-prefix}white-rgb: #{to-rgb($white)};\n --#{$variable-prefix}black-rgb: #{to-rgb($black)};\n --#{$variable-prefix}body-rgb: #{to-rgb($body-color)};\n\n // Fonts\n\n // Note: Use `inspect` for lists so that quoted items keep the quotes.\n // See https://github.com/sass/sass/issues/2383#issuecomment-336349172\n --#{$variable-prefix}font-sans-serif: #{inspect($font-family-sans-serif)};\n --#{$variable-prefix}font-monospace: #{inspect($font-family-monospace)};\n --#{$variable-prefix}gradient: #{$gradient};\n\n // Root and body\n // stylelint-disable custom-property-empty-line-before\n // scss-docs-start root-body-variables\n @if $font-size-root != null {\n --#{$variable-prefix}root-font-size: #{$font-size-root};\n }\n --#{$variable-prefix}body-font-family: #{$font-family-base};\n --#{$variable-prefix}body-font-size: #{$font-size-base};\n --#{$variable-prefix}body-font-weight: #{$font-weight-base};\n --#{$variable-prefix}body-line-height: #{$line-height-base};\n --#{$variable-prefix}body-color: #{$body-color};\n @if $body-text-align != null {\n --#{$variable-prefix}body-text-align: #{$body-text-align};\n }\n --#{$variable-prefix}body-bg: #{$body-bg};\n // scss-docs-end root-body-variables\n // stylelint-enable custom-property-empty-line-before\n}\n","// stylelint-disable declaration-no-important, selector-no-qualifying-type, property-no-vendor-prefix\n\n\n// Reboot\n//\n// Normalization of HTML elements, manually forked from Normalize.css to remove\n// styles targeting irrelevant browsers while applying new styles.\n//\n// Normalize is licensed MIT. https://github.com/necolas/normalize.css\n\n\n// Document\n//\n// Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`.\n\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n\n// Root\n//\n// Ability to the value of the root font sizes, affecting the value of `rem`.\n// null by default, thus nothing is generated.\n\n:root {\n @if $font-size-root != null {\n font-size: var(--#{$variable-prefix}-root-font-size);\n }\n\n @if $enable-smooth-scroll {\n @media (prefers-reduced-motion: no-preference) {\n scroll-behavior: smooth;\n }\n }\n}\n\n\n// Body\n//\n// 1. Remove the margin in all browsers.\n// 2. As a best practice, apply a default `background-color`.\n// 3. Prevent adjustments of font size after orientation changes in iOS.\n// 4. Change the default tap highlight to be completely transparent in iOS.\n\n// scss-docs-start reboot-body-rules\nbody {\n margin: 0; // 1\n font-family: var(--#{$variable-prefix}body-font-family);\n @include font-size(var(--#{$variable-prefix}body-font-size));\n font-weight: var(--#{$variable-prefix}body-font-weight);\n line-height: var(--#{$variable-prefix}body-line-height);\n color: var(--#{$variable-prefix}body-color);\n text-align: var(--#{$variable-prefix}body-text-align);\n background-color: var(--#{$variable-prefix}body-bg); // 2\n -webkit-text-size-adjust: 100%; // 3\n -webkit-tap-highlight-color: rgba($black, 0); // 4\n}\n// scss-docs-end reboot-body-rules\n\n\n// Content grouping\n//\n// 1. Reset Firefox's gray color\n// 2. Set correct height and prevent the `size` attribute to make the `hr` look like an input field\n\nhr {\n margin: $hr-margin-y 0;\n color: $hr-color; // 1\n background-color: currentColor;\n border: 0;\n opacity: $hr-opacity;\n}\n\nhr:not([size]) {\n height: $hr-height; // 2\n}\n\n\n// Typography\n//\n// 1. Remove top margins from headings\n// By default, `

`-`

` all receive top and bottom margins. We nuke the top\n// margin for easier control within type scales as it avoids margin collapsing.\n\n%heading {\n margin-top: 0; // 1\n margin-bottom: $headings-margin-bottom;\n font-family: $headings-font-family;\n font-style: $headings-font-style;\n font-weight: $headings-font-weight;\n line-height: $headings-line-height;\n color: $headings-color;\n}\n\nh1 {\n @extend %heading;\n @include font-size($h1-font-size);\n}\n\nh2 {\n @extend %heading;\n @include font-size($h2-font-size);\n}\n\nh3 {\n @extend %heading;\n @include font-size($h3-font-size);\n}\n\nh4 {\n @extend %heading;\n @include font-size($h4-font-size);\n}\n\nh5 {\n @extend %heading;\n @include font-size($h5-font-size);\n}\n\nh6 {\n @extend %heading;\n @include font-size($h6-font-size);\n}\n\n\n// Reset margins on paragraphs\n//\n// Similarly, the top margin on `

`s get reset. However, we also reset the\n// bottom margin to use `rem` units instead of `em`.\n\np {\n margin-top: 0;\n margin-bottom: $paragraph-margin-bottom;\n}\n\n\n// Abbreviations\n//\n// 1. Duplicate behavior to the data-bs-* attribute for our tooltip plugin\n// 2. Add the correct text decoration in Chrome, Edge, Opera, and Safari.\n// 3. Add explicit cursor to indicate changed behavior.\n// 4. Prevent the text-decoration to be skipped.\n\nabbr[title],\nabbr[data-bs-original-title] { // 1\n text-decoration: underline dotted; // 2\n cursor: help; // 3\n text-decoration-skip-ink: none; // 4\n}\n\n\n// Address\n\naddress {\n margin-bottom: 1rem;\n font-style: normal;\n line-height: inherit;\n}\n\n\n// Lists\n\nol,\nul {\n padding-left: 2rem;\n}\n\nol,\nul,\ndl {\n margin-top: 0;\n margin-bottom: 1rem;\n}\n\nol ol,\nul ul,\nol ul,\nul ol {\n margin-bottom: 0;\n}\n\ndt {\n font-weight: $dt-font-weight;\n}\n\n// 1. Undo browser default\n\ndd {\n margin-bottom: .5rem;\n margin-left: 0; // 1\n}\n\n\n// Blockquote\n\nblockquote {\n margin: 0 0 1rem;\n}\n\n\n// Strong\n//\n// Add the correct font weight in Chrome, Edge, and Safari\n\nb,\nstrong {\n font-weight: $font-weight-bolder;\n}\n\n\n// Small\n//\n// Add the correct font size in all browsers\n\nsmall {\n @include font-size($small-font-size);\n}\n\n\n// Mark\n\nmark {\n padding: $mark-padding;\n background-color: $mark-bg;\n}\n\n\n// Sub and Sup\n//\n// Prevent `sub` and `sup` elements from affecting the line height in\n// all browsers.\n\nsub,\nsup {\n position: relative;\n @include font-size($sub-sup-font-size);\n line-height: 0;\n vertical-align: baseline;\n}\n\nsub { bottom: -.25em; }\nsup { top: -.5em; }\n\n\n// Links\n\na {\n color: $link-color;\n text-decoration: $link-decoration;\n\n &:hover {\n color: $link-hover-color;\n text-decoration: $link-hover-decoration;\n }\n}\n\n// And undo these styles for placeholder links/named anchors (without href).\n// It would be more straightforward to just use a[href] in previous block, but that\n// causes specificity issues in many other styles that are too complex to fix.\n// See https://github.com/twbs/bootstrap/issues/19402\n\na:not([href]):not([class]) {\n &,\n &:hover {\n color: inherit;\n text-decoration: none;\n }\n}\n\n\n// Code\n\npre,\ncode,\nkbd,\nsamp {\n font-family: $font-family-code;\n @include font-size(1em); // Correct the odd `em` font sizing in all browsers.\n direction: ltr #{\"/* rtl:ignore */\"};\n unicode-bidi: bidi-override;\n}\n\n// 1. Remove browser default top margin\n// 2. Reset browser default of `1em` to use `rem`s\n// 3. Don't allow content to break outside\n\npre {\n display: block;\n margin-top: 0; // 1\n margin-bottom: 1rem; // 2\n overflow: auto; // 3\n @include font-size($code-font-size);\n color: $pre-color;\n\n // Account for some code outputs that place code tags in pre tags\n code {\n @include font-size(inherit);\n color: inherit;\n word-break: normal;\n }\n}\n\ncode {\n @include font-size($code-font-size);\n color: $code-color;\n word-wrap: break-word;\n\n // Streamline the style when inside anchors to avoid broken underline and more\n a > & {\n color: inherit;\n }\n}\n\nkbd {\n padding: $kbd-padding-y $kbd-padding-x;\n @include font-size($kbd-font-size);\n color: $kbd-color;\n background-color: $kbd-bg;\n @include border-radius($border-radius-sm);\n\n kbd {\n padding: 0;\n @include font-size(1em);\n font-weight: $nested-kbd-font-weight;\n }\n}\n\n\n// Figures\n//\n// Apply a consistent margin strategy (matches our type styles).\n\nfigure {\n margin: 0 0 1rem;\n}\n\n\n// Images and content\n\nimg,\nsvg {\n vertical-align: middle;\n}\n\n\n// Tables\n//\n// Prevent double borders\n\ntable {\n caption-side: bottom;\n border-collapse: collapse;\n}\n\ncaption {\n padding-top: $table-cell-padding-y;\n padding-bottom: $table-cell-padding-y;\n color: $table-caption-color;\n text-align: left;\n}\n\n// 1. Removes font-weight bold by inheriting\n// 2. Matches default `` alignment by inheriting `text-align`.\n// 3. Fix alignment for Safari\n\nth {\n font-weight: $table-th-font-weight; // 1\n text-align: inherit; // 2\n text-align: -webkit-match-parent; // 3\n}\n\nthead,\ntbody,\ntfoot,\ntr,\ntd,\nth {\n border-color: inherit;\n border-style: solid;\n border-width: 0;\n}\n\n\n// Forms\n//\n// 1. Allow labels to use `margin` for spacing.\n\nlabel {\n display: inline-block; // 1\n}\n\n// Remove the default `border-radius` that macOS Chrome adds.\n// See https://github.com/twbs/bootstrap/issues/24093\n\nbutton {\n // stylelint-disable-next-line property-disallowed-list\n border-radius: 0;\n}\n\n// Explicitly remove focus outline in Chromium when it shouldn't be\n// visible (e.g. as result of mouse click or touch tap). It already\n// should be doing this automatically, but seems to currently be\n// confused and applies its very visible two-tone outline anyway.\n\nbutton:focus:not(:focus-visible) {\n outline: 0;\n}\n\n// 1. Remove the margin in Firefox and Safari\n\ninput,\nbutton,\nselect,\noptgroup,\ntextarea {\n margin: 0; // 1\n font-family: inherit;\n @include font-size(inherit);\n line-height: inherit;\n}\n\n// Remove the inheritance of text transform in Firefox\nbutton,\nselect {\n text-transform: none;\n}\n// Set the cursor for non-`